From 311ab89f93558233a40079f7cb16605b141b5346 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 12 Dec 2021 19:38:06 +0100 Subject: Move sources and resources --- src/Java/gregtech/api/enums/TAE.java | 139 - src/Java/gregtech/api/util/EmptyRecipeMap.java | 51 - src/Java/gregtech/api/util/FishPondFakeRecipe.java | 80 - src/Java/gregtech/api/util/GTPP_Recipe.java | 1017 --- src/Java/gregtech/api/util/GasSpargingRecipe.java | 99 - .../gregtech/api/util/GasSpargingRecipeMap.java | 48 - src/Java/gregtech/api/util/HotFuel.java | 28 - .../gregtech/api/util/SemiFluidFuelHandler.java | 117 - src/Java/gregtech/api/util/ThermalFuel.java | 43 - src/Java/gtPlusPlus/GTplusplus.java | 564 -- src/Java/gtPlusPlus/GenerateDictionaries.java | 176 - src/Java/gtPlusPlus/RoadMap.java | 80 - .../gtPlusPlus/api/damage/DamageTeslaTower.java | 24 - src/Java/gtPlusPlus/api/enums/ParticleNames.java | 37 - src/Java/gtPlusPlus/api/enums/Quality.java | 62 - .../api/helpers/GregtechPlusPlus_API.java | 203 - .../gtPlusPlus/api/helpers/MaterialHelper.java | 76 - .../gtPlusPlus/api/interfaces/IChunkLoader.java | 33 - .../api/interfaces/IComparableRecipe.java | 8 - .../gtPlusPlus/api/interfaces/IEntityCatcher.java | 21 - .../gtPlusPlus/api/interfaces/IGeneratorWorld.java | 17 - .../api/interfaces/IGregtechPacketEntity.java | 13 - .../gtPlusPlus/api/interfaces/IGregtechPower.java | 145 - .../gtPlusPlus/api/interfaces/ILazyCoverable.java | 144 - src/Java/gtPlusPlus/api/interfaces/IPlugin.java | 40 - .../api/interfaces/IRandomGenerator.java | 55 - .../gtPlusPlus/api/interfaces/ITexturedBlock.java | 14 - .../gtPlusPlus/api/interfaces/ITileTooltip.java | 7 - src/Java/gtPlusPlus/api/interfaces/IToolable.java | 17 - .../api/interfaces/RunnableWithInfo.java | 12 - .../gtPlusPlus/api/objects/GregtechException.java | 28 - src/Java/gtPlusPlus/api/objects/Logger.java | 179 - src/Java/gtPlusPlus/api/objects/data/AutoMap.java | 345 - .../api/objects/data/ConcurrentHashSet.java | 18 - .../gtPlusPlus/api/objects/data/ConcurrentSet.java | 53 - .../gtPlusPlus/api/objects/data/FlexiblePair.java | 39 - src/Java/gtPlusPlus/api/objects/data/ObjMap.java | 285 - src/Java/gtPlusPlus/api/objects/data/Pair.java | 35 - src/Java/gtPlusPlus/api/objects/data/Quad.java | 45 - .../api/objects/data/ReverseAutoMap.java | 175 - src/Java/gtPlusPlus/api/objects/data/Triplet.java | 27 - .../gtPlusPlus/api/objects/data/TypeCounter.java | 178 - .../api/objects/data/WeightedCollection.java | 102 - .../api/objects/data/weakref/WeakAutoMap.java | 12 - .../gtPlusPlus/api/objects/minecraft/AABB.java | 65 - .../api/objects/minecraft/BTF_FluidTank.java | 188 - .../api/objects/minecraft/BTF_Inventory.java | 228 - .../gtPlusPlus/api/objects/minecraft/BlockPos.java | 250 - .../api/objects/minecraft/CubicObject.java | 62 - .../api/objects/minecraft/DimChunkPos.java | 52 - .../api/objects/minecraft/FakeBlockPos.java | 253 - .../api/objects/minecraft/FakeWorld.java | 173 - .../gtPlusPlus/api/objects/minecraft/FluidGT6.java | 31 - .../objects/minecraft/FormattedTooltipString.java | 25 - .../api/objects/minecraft/GenericStack.java | 42 - .../api/objects/minecraft/ItemPackage.java | 58 - .../api/objects/minecraft/ItemStackData.java | 35 - .../objects/minecraft/NoConflictGTRecipeMap.java | 123 - .../api/objects/minecraft/SafeTexture.java | 64 - .../api/objects/minecraft/ShapedRecipe.java | 250 - .../api/objects/minecraft/TexturePackage.java | 55 - .../api/objects/minecraft/ThreadPooCollector.java | 111 - .../minecraft/multi/NoEUBonusMultiBehaviour.java | 27 - .../multi/NoOutputBonusMultiBehaviour.java | 27 - .../multi/NoSpeedBonusMultiBehaviour.java | 27 - .../minecraft/multi/SpecialMultiBehaviour.java | 44 - .../api/objects/random/CSPRNG_DO_NOT_USE.java | 271 - .../api/objects/random/UUIDGenerator.java | 449 -- src/Java/gtPlusPlus/api/objects/random/XSTR.java | 278 - src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java | 47 - .../api/thermal/energy/IThermalConnection.java | 7 - .../api/thermal/energy/IThermalContainerItem.java | 15 - .../api/thermal/energy/IThermalHandler.java | 15 - .../api/thermal/energy/IThermalProvider.java | 13 - .../api/thermal/energy/IThermalReceiver.java | 13 - .../api/thermal/energy/IThermalStorage.java | 13 - .../api/thermal/energy/ThermalStorage.java | 116 - .../api/thermal/energy/ThermalStorageAdv.java | 34 - .../api/thermal/sample/ItemThermalContainer.java | 84 - .../api/thermal/sample/TileThermalHandler.java | 42 - .../api/thermal/tileentity/IThermalInfo.java | 13 - .../gtPlusPlus/australia/GTplusplus_Australia.java | 158 - .../australia/biome/CustomDecorator.java | 355 - .../australia/biome/GenLayerAustralia.java | 32 - .../biome/GenLayerBiomesAustraliaDimension.java | 47 - .../biome/type/Biome_AustralianDesert.java | 355 - .../biome/type/Biome_AustralianDesert2.java | 355 - .../biome/type/Biome_AustralianDesert_Ex.java | 65 - .../biome/type/Biome_AustralianForest.java | 198 - .../biome/type/Biome_AustralianOcean.java | 52 - .../biome/type/Biome_AustralianOutback.java | 381 -- .../biome/type/Biome_AustralianPlains.java | 122 - .../australia/block/AustraliaContentLoader.java | 67 - .../australia/block/BlockAustraliaPortal.java | 403 -- .../australia/block/BlockAustraliaSand.java | 25 - .../australia/block/BlockAustraliaTopSoil.java | 76 - .../australia/block/BlockDarkWorldPortalFrame.java | 30 - .../australia/chunk/ChunkProviderAustralia.java | 821 --- .../australia/dimension/Dimension_Australia.java | 23 - .../entity/model/ModelAustralianSpider.java | 148 - .../australia/entity/model/ModelBoar.java | 20 - .../australia/entity/model/ModelDingo.java | 168 - .../australia/entity/model/ModelOctopus.java | 67 - .../entity/render/RenderAustralianSpider.java | 84 - .../australia/entity/render/RenderBoar.java | 64 - .../australia/entity/render/RenderDingo.java | 90 - .../australia/entity/render/RenderOctopus.java | 120 - .../entity/type/EntityAustralianSpiderBase.java | 41 - .../australia/entity/type/EntityBoar.java | 220 - .../australia/entity/type/EntityDingo.java | 536 -- .../australia/entity/type/EntityOctopus.java | 228 - .../australia/gen/gt/WorldGen_Australia_Ores.java | 294 - .../australia/gen/gt/WorldGen_GT_Australia.java | 48 - .../gen/gt/WorldGen_GT_Australia_Base.java | 471 -- .../gen/gt/WorldGen_GT_Australia_Ore_Layer.java | 511 -- .../australia/gen/map/MapGenExtendedVillage.java | 265 - .../australia/gen/map/MapGenLargeRavine.java | 217 - .../gen/map/component/AustraliaComponent.java | 196 - .../australia/gen/map/component/ComponentHut.java | 474 -- .../gen/map/component/ComponentShack.java | 279 - .../gen/map/structure/StructureManager.java | 20 - .../map/structure/type/ComponentVillageBank.java | 175 - .../australia/gen/world/WorldGenAustralianOre.java | 87 - .../gen/world/WorldGenAustralianTrees.java | 250 - .../australia/item/ItemAustraliaPortalTrigger.java | 100 - .../australia/item/ItemBlockAustralia.java | 39 - .../australia/world/AustraliaPortalPosition.java | 14 - .../world/AustraliaTeleporterDimensionMod.java | 470 -- .../world/AustraliaWorldChunkManager.java | 257 - .../australia/world/AustraliaWorldGenerator.java | 142 - .../australia/world/AustraliaWorldProvider.java | 80 - .../australia/world/AustraliaWorldType.java | 59 - src/Java/gtPlusPlus/core/block/ModBlocks.java | 162 - .../gtPlusPlus/core/block/base/AdvancedBlock.java | 39 - .../gtPlusPlus/core/block/base/BasicBlock.java | 81 - .../core/block/base/BasicTileBlockWithTooltip.java | 328 - .../gtPlusPlus/core/block/base/BlockBaseFluid.java | 103 - .../core/block/base/BlockBaseModular.java | 211 - .../gtPlusPlus/core/block/base/BlockBaseNBT.java | 81 - .../gtPlusPlus/core/block/base/BlockBaseOre.java | 229 - src/Java/gtPlusPlus/core/block/base/MetaBlock.java | 35 - .../core/block/base/MultiTextureBlock.java | 37 - .../block/general/BlockCompressedObsidian.java | 94 - .../gtPlusPlus/core/block/general/BlockNet.java | 37 - .../core/block/general/BlockSuperLight.java | 220 - .../core/block/general/BlockTankXpConverter.java | 192 - .../gtPlusPlus/core/block/general/FirePit.java | 230 - .../core/block/general/FluidTankInfinite.java | 136 - .../gtPlusPlus/core/block/general/HellFire.java | 557 -- .../gtPlusPlus/core/block/general/LightGlass.java | 144 - .../core/block/general/MiningExplosives.java | 172 - .../gtPlusPlus/core/block/general/PlayerDoors.java | 467 -- .../block/general/antigrief/BlockWitherProof.java | 166 - .../core/block/general/antigrief/TowerDevice.java | 293 - .../block/general/fluids/BlockFluidSludge.java | 63 - .../general/redstone/BlockGenericRedstone.java | 370 - .../redstone/BlockGenericRedstoneDetector.java | 131 - .../redstone/BlockGenericRedstoneEmitter.java | 5 - .../general/redstone/BlockGenericRedstoneTest.java | 201 - .../core/block/machine/BlockGtFrameBox.java | 42 - .../core/block/machine/CircuitProgrammer.java | 159 - .../core/block/machine/DecayablesChest.java | 223 - src/Java/gtPlusPlus/core/block/machine/EggBox.java | 175 - .../gtPlusPlus/core/block/machine/FishTrap.java | 152 - .../core/block/machine/HeliumGenerator.java | 95 - .../block/machine/Machine_ModularityTable.java | 103 - .../core/block/machine/Machine_PestKiller.java | 137 - .../core/block/machine/Machine_PooCollector.java | 182 - .../core/block/machine/Machine_ProjectTable.java | 164 - .../core/block/machine/Machine_RoundRobinator.java | 131 - .../core/block/machine/Machine_SuperJukebox.java | 579 -- .../core/block/machine/Machine_TradeTable.java | 86 - .../core/block/machine/Machine_WireiusDeletus.java | 5 - .../core/block/machine/Machine_Workbench.java | 152 - .../block/machine/Machine_WorkbenchAdvanced.java | 111 - .../core/block/machine/VolumetricFlaskSetter.java | 169 - .../block/machine/bedrock/Mining_Head_Fake.java | 159 - .../block/machine/bedrock/Mining_Pipe_Fake.java | 136 - .../core/chunkloading/GTPP_ChunkManager.java | 217 - .../core/chunkloading/StaticChunkFunctions.java | 63 - .../gtPlusPlus/core/client/CustomTextureSet.java | 28 - .../gtPlusPlus/core/client/model/ModelBatKing.java | 120 - .../core/client/model/ModelDecayChest.java | 46 - .../gtPlusPlus/core/client/model/ModelEggBox.java | 65 - .../core/client/model/ModelGiantChicken.java | 112 - .../core/client/model/ModelSickBlaze.java | 93 - .../core/client/model/ModelStaballoyConstruct.java | 120 - .../core/client/model/tabula/ModelTabulaBase.java | 38 - .../client/renderer/CustomItemBlockRenderer.java | 85 - .../client/renderer/CustomOreBlockRenderer.java | 2083 ------ .../core/client/renderer/RenderBatKing.java | 152 - .../core/client/renderer/RenderDecayChest.java | 82 - .../core/client/renderer/RenderGiantChicken.java | 15 - .../renderer/RenderMiningExplosivesPrimed.java | 107 - .../core/client/renderer/RenderPlasmaBolt.java | 168 - .../core/client/renderer/RenderPotionthrow.java | 104 - .../core/client/renderer/RenderSickBlaze.java | 99 - .../client/renderer/RenderStaballoyConstruct.java | 149 - .../core/client/renderer/RenderToxinball.java | 93 - .../renderer/particle/EntityDropParticleFX.java | 96 - .../client/renderer/tabula/RenderTabulaBase.java | 46 - .../core/commands/CommandDebugChunks.java | 152 - .../commands/CommandEnableDebugWhileRunning.java | 270 - src/Java/gtPlusPlus/core/commands/CommandMath.java | 100 - .../gtPlusPlus/core/commands/CommandUtils.java | 20 - src/Java/gtPlusPlus/core/common/BasePlayer.java | 212 - src/Java/gtPlusPlus/core/common/CommonProxy.java | 306 - .../core/common/compat/COMPAT_Baubles.java | 71 - .../core/common/compat/COMPAT_BigReactors.java | 21 - .../common/compat/COMPAT_CompactWindmills.java | 172 - .../core/common/compat/COMPAT_EnderIO.java | 28 - .../core/common/compat/COMPAT_ExtraUtils.java | 32 - .../core/common/compat/COMPAT_HarvestCraft.java | 15 - .../gtPlusPlus/core/common/compat/COMPAT_IC2.java | 64 - .../core/common/compat/COMPAT_MorePlanets.java | 37 - .../core/common/compat/COMPAT_OpenBlocks.java | 29 - .../core/common/compat/COMPAT_PlayerAPI.java | 52 - .../core/common/compat/COMPAT_PneumaticCraft.java | 19 - .../core/common/compat/COMPAT_RFTools.java | 20 - .../core/common/compat/COMPAT_Railcraft.java | 14 - .../core/common/compat/COMPAT_SimplyJetpacks.java | 20 - .../core/common/compat/COMPAT_Thaumcraft.java | 45 - .../core/common/compat/COMPAT_Witchery.java | 26 - src/Java/gtPlusPlus/core/config/ConfigHandler.java | 245 - .../core/container/Container_BackpackBase.java | 208 - .../container/Container_CircuitProgrammer.java | 190 - .../core/container/Container_DecayablesChest.java | 140 - .../core/container/Container_EggBox.java | 140 - .../core/container/Container_FishTrap.java | 142 - .../core/container/Container_Grindle.java | 160 - .../core/container/Container_HeliumGenerator.java | 193 - .../core/container/Container_ModularityTable.java | 252 - .../core/container/Container_PestKiller.java | 154 - .../core/container/Container_ProjectTable.java | 242 - .../core/container/Container_RoundRobinator.java | 246 - .../core/container/Container_SuperJukebox.java | 251 - .../core/container/Container_TradeTable.java | 223 - .../container/Container_VolumetricFlaskSetter.java | 185 - .../core/container/Container_Workbench.java | 413 -- .../container/Container_WorkbenchAdvanced.java | 377 -- .../core/container/box/LunchBoxContainer.java | 13 - .../core/container/box/MagicBagContainer.java | 13 - .../core/container/box/ToolBoxContainer.java | 15 - .../gtPlusPlus/core/creative/AddToCreativeTab.java | 35 - .../creative/tabs/MiscUtilCreativeTabBlock.java | 27 - .../creative/tabs/MiscUtilCreativeTabMachines.java | 21 - .../creative/tabs/MiscUtilCreativeTabMisc.java | 20 - .../creative/tabs/MiscUtilCreativeTabOther.java | 20 - .../creative/tabs/MiscUtilCreativeTabTools.java | 20 - .../core/entity/EntityPrimedMiningExplosive.java | 216 - .../gtPlusPlus/core/entity/EntityTeleportFX.java | 247 - .../core/entity/EntityTeslaTowerLightning.java | 168 - .../core/entity/InternalEntityRegistry.java | 96 - .../entity/ai/batking/EntityAIBatKingAttack.java | 406 -- .../core/entity/item/ItemEntityGiantEgg.java | 117 - .../core/entity/monster/EntityBatKing.java | 712 -- .../entity/monster/EntityGiantChickenBase.java | 311 - .../core/entity/monster/EntitySickBlaze.java | 225 - .../entity/monster/EntityStaballoyConstruct.java | 553 -- .../projectile/EntityHydrofluoricAcidPotion.java | 127 - .../entity/projectile/EntityLightningAttack.java | 76 - .../projectile/EntitySulfuricAcidPotion.java | 115 - .../entity/projectile/EntityThrowableBomb.java | 145 - .../core/entity/projectile/EntityToxinball.java | 327 - .../entity/projectile/EntityToxinballSmall.java | 88 - .../gtPlusPlus/core/fluids/BlockFluidBase.java | 104 - src/Java/gtPlusPlus/core/fluids/FactoryFluid.java | 49 - src/Java/gtPlusPlus/core/fluids/FluidFactory.java | 214 - src/Java/gtPlusPlus/core/fluids/FluidPackage.java | 83 - .../core/fluids/FluidRegistryHandler.java | 53 - .../core/fluids/ItemGenericFluidBucket.java | 319 - .../gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java | 15 - .../gtPlusPlus/core/gui/beta/Gui_ID_Registry.java | 56 - src/Java/gtPlusPlus/core/gui/beta/Gui_Types.java | 8 - src/Java/gtPlusPlus/core/gui/beta/MU_GuiId.java | 32 - .../gtPlusPlus/core/gui/item/GuiBaseBackpack.java | 121 - .../gtPlusPlus/core/gui/item/GuiBaseGrindle.java | 564 -- .../gtPlusPlus/core/gui/item/GuiScreenGrindle.java | 490 -- .../gtPlusPlus/core/gui/item/box/GuiBaseBox.java | 116 - .../gtPlusPlus/core/gui/item/box/LunchBoxGui.java | 11 - .../gtPlusPlus/core/gui/item/box/MagicBagGui.java | 11 - .../gtPlusPlus/core/gui/item/box/ToolBoxGui.java | 11 - .../core/gui/machine/GUI_CircuitProgrammer.java | 44 - .../core/gui/machine/GUI_DecayablesChest.java | 59 - .../gtPlusPlus/core/gui/machine/GUI_EggBox.java | 60 - .../gtPlusPlus/core/gui/machine/GUI_FishTrap.java | 59 - .../core/gui/machine/GUI_HeliumGenerator.java | 39 - .../core/gui/machine/GUI_ModularityTable.java | 83 - .../core/gui/machine/GUI_PestKiller.java | 159 - .../core/gui/machine/GUI_ProjectTable.java | 65 - .../core/gui/machine/GUI_RoundRobinator.java | 120 - .../core/gui/machine/GUI_ScrollTest.java | 229 - .../core/gui/machine/GUI_SuperJukebox.java | 90 - .../core/gui/machine/GUI_TradeTable.java | 50 - .../gui/machine/GUI_VolumetricFlaskSetter.java | 183 - .../gtPlusPlus/core/gui/machine/GUI_Workbench.java | 81 - .../core/gui/machine/GUI_WorkbenchAdvanced.java | 42 - .../gtPlusPlus/core/gui/widget/GuiValueField.java | 86 - .../core/handler/AchievementHandler.java | 421 -- src/Java/gtPlusPlus/core/handler/BookHandler.java | 404 -- .../core/handler/BurnableFuelHandler.java | 35 - .../gtPlusPlus/core/handler/COMPAT_HANDLER.java | 320 - .../core/handler/COMPAT_IntermodStaging.java | 91 - .../gtPlusPlus/core/handler/CraftingManager.java | 17 - .../gtPlusPlus/core/handler/EnumHelperHandler.java | 21 - src/Java/gtPlusPlus/core/handler/GuiHandler.java | 231 - .../gtPlusPlus/core/handler/OldCircuitHandler.java | 66 - .../gtPlusPlus/core/handler/PacketHandler.java | 91 - .../core/handler/Recipes/DecayableRecipe.java | 39 - .../handler/Recipes/LateRegistrationHandler.java | 28 - .../core/handler/Recipes/RegistrationHandler.java | 27 - .../handler/StopAnnoyingFuckingAchievements.java | 49 - .../core/handler/events/BlockEventHandler.java | 229 - .../core/handler/events/CustomMovementHandler.java | 163 - .../handler/events/EnderDragonDeathHandler.java | 59 - .../core/handler/events/EntityDeathHandler.java | 124 - .../handler/events/GeneralTooltipEventHandler.java | 107 - .../core/handler/events/LoginEventHandler.java | 128 - .../core/handler/events/MissingMappingsEvent.java | 56 - .../events/PickaxeBlockBreakEventHandler.java | 80 - .../core/handler/events/PlayerTickHandler.java | 18 - .../core/handler/events/SneakManager.java | 131 - .../handler/events/UnbreakableBlockManager.java | 138 - .../events/ZombieBackupSpawnEventHandler.java | 55 - .../core/handler/render/CapeHandler.java | 122 - .../core/handler/render/FirepitModel.java | 121 - .../core/handler/render/FirepitRender.java | 55 - .../workbench/Workbench_CraftingHandler.java | 208 - .../handler/workbench/Workbench_RecipeSorter.java | 44 - .../gtPlusPlus/core/interfaces/IGuiManager.java | 16 - .../core/interfaces/IGuiManagerMiscUtils.java | 3 - .../gtPlusPlus/core/interfaces/IItemBlueprint.java | 48 - .../core/inventories/BaseInventoryBackpack.java | 241 - .../core/inventories/BaseInventoryGrindle.java | 224 - .../inventories/InventoryCircuitProgrammer.java | 173 - .../core/inventories/InventoryFishTrap.java | 176 - .../core/inventories/InventoryHeliumGenerator.java | 176 - .../core/inventories/InventoryPestKiller.java | 176 - .../core/inventories/InventoryWorkbenchChest.java | 188 - .../inventories/InventoryWorkbenchCrafting.java | 201 - .../InventoryWorkbenchHoloCrafting.java | 164 - .../inventories/InventoryWorkbenchHoloSlots.java | 269 - .../core/inventories/InventoryWorkbenchTools.java | 188 - .../InventoryWorkbenchToolsElectric.java | 193 - .../inventories/Inventory_DecayablesChest.java | 176 - .../core/inventories/Inventory_EggBox.java | 176 - .../core/inventories/Inventory_RoundRobinator.java | 172 - .../core/inventories/Inventory_SuperJukebox.java | 172 - .../Inventory_VolumetricFlaskSetter.java | 173 - .../core/inventories/box/LunchBoxInventory.java | 15 - .../core/inventories/box/MagicBagInventory.java | 15 - .../core/inventories/box/ToolBoxInventory.java | 16 - .../modulartable/InventoryModularMain.java | 202 - .../modulartable/InventoryModularOutput.java | 192 - .../projecttable/InventoryProjectMain.java | 201 - .../projecttable/InventoryProjectOutput.java | 188 - .../inventories/tradetable/InventoryTradeMain.java | 201 - .../tradetable/InventoryTradeOutput.java | 188 - src/Java/gtPlusPlus/core/item/ModItems.java | 1229 ---- src/Java/gtPlusPlus/core/item/base/BaseEuItem.java | 582 -- .../core/item/base/BaseItemBackpack.java | 92 - .../gtPlusPlus/core/item/base/BaseItemBrain.java | 109 - .../core/item/base/BaseItemBurnable.java | 44 - .../core/item/base/BaseItemColourable.java | 98 - .../core/item/base/BaseItemComponent.java | 566 -- .../core/item/base/BaseItemDamageable.java | 201 - .../gtPlusPlus/core/item/base/BaseItemGeneric.java | 28 - .../gtPlusPlus/core/item/base/BaseItemLoot.java | 109 - .../gtPlusPlus/core/item/base/BaseItemTCShard.java | 82 - .../core/item/base/BaseItemTickable.java | 341 - .../core/item/base/BaseItemWithCharge.java | 76 - .../core/item/base/BaseItemWithDamageValue.java | 27 - .../gtPlusPlus/core/item/base/BasicSpawnEgg.java | 254 - src/Java/gtPlusPlus/core/item/base/CoreItem.java | 237 - .../core/item/base/bolts/BaseItemBolt.java | 11 - .../core/item/base/cell/BaseItemCell.java | 66 - .../core/item/base/cell/BaseItemPlasmaCell.java | 83 - .../core/item/base/dusts/BaseItemDust.java | 145 - .../core/item/base/dusts/BaseItemDustAbstract.java | 44 - .../core/item/base/dusts/BaseItemDustEx.java | 126 - .../core/item/base/dusts/BaseItemDustUnique.java | 162 - .../item/base/dusts/decimal/BaseItemCentidust.java | 58 - .../item/base/dusts/decimal/BaseItemDecidust.java | 58 - .../core/item/base/foil/BaseItemFoil.java | 11 - .../core/item/base/foods/BaseItemFood.java | 50 - .../core/item/base/foods/BaseItemHotFood.java | 80 - .../core/item/base/gears/BaseItemGear.java | 11 - .../core/item/base/gears/BaseItemSmallGear.java | 11 - .../core/item/base/ingots/BaseItemIngot.java | 21 - .../core/item/base/ingots/BaseItemIngotHot.java | 110 - .../core/item/base/ingots/BaseItemIngot_OLD.java | 101 - .../core/item/base/itemblock/FluidItemBlock.java | 61 - .../item/base/itemblock/ItemBlockBasicTile.java | 71 - .../core/item/base/itemblock/ItemBlockDoor.java | 100 - .../item/base/itemblock/ItemBlockEntityBase.java | 41 - .../core/item/base/itemblock/ItemBlockGtBlock.java | 156 - .../item/base/itemblock/ItemBlockGtFrameBox.java | 94 - .../core/item/base/itemblock/ItemBlockMeta.java | 114 - .../core/item/base/itemblock/ItemBlockNBT.java | 104 - .../core/item/base/itemblock/ItemBlockOre.java | 161 - .../base/itemblock/ItemBlockRoundRobinator.java | 115 - .../core/item/base/itemblock/ItemBlockSpawner.java | 39 - .../core/item/base/misc/BaseItemMisc.java | 174 - .../core/item/base/misc/BaseItemParticle.java | 57 - .../core/item/base/nugget/BaseItemNugget.java | 12 - .../base/ore/BaseItemCentrifugedCrushedOre.java | 10 - .../core/item/base/ore/BaseItemCrushedOre.java | 10 - .../core/item/base/ore/BaseItemImpureDust.java | 10 - .../core/item/base/ore/BaseItemMilledOre.java | 25 - .../item/base/ore/BaseItemPurifiedCrushedOre.java | 10 - .../core/item/base/ore/BaseItemPurifiedDust.java | 10 - .../core/item/base/ore/BaseOreComponent.java | 279 - .../core/item/base/plates/BaseItemPlate.java | 18 - .../core/item/base/plates/BaseItemPlateDouble.java | 20 - .../core/item/base/plates/BaseItemPlateHeavy.java | 47 - .../core/item/base/plates/BaseItemPlate_OLD.java | 95 - .../core/item/base/rings/BaseItemRing.java | 12 - .../core/item/base/rods/BaseItemRod.java | 12 - .../core/item/base/rods/BaseItemRodLong.java | 18 - .../core/item/base/rotors/BaseItemRotor.java | 11 - .../core/item/base/screws/BaseItemScrew.java | 12 - .../gtPlusPlus/core/item/bauble/BaseBauble.java | 190 - .../core/item/bauble/BatteryPackBaseBauble.java | 259 - .../core/item/bauble/ElectricBaseBauble.java | 197 - .../core/item/bauble/FireProtectionBauble.java | 137 - .../core/item/bauble/HealthBoostBauble.java | 39 - .../gtPlusPlus/core/item/bauble/ModularBauble.java | 408 -- .../core/item/bauble/MonsterKillerBaseBauble.java | 175 - .../core/item/chemistry/AgriculturalChem.java | 614 -- .../gtPlusPlus/core/item/chemistry/CoalTar.java | 378 -- .../core/item/chemistry/GenericChem.java | 1115 --- .../core/item/chemistry/IonParticles.java | 165 - .../core/item/chemistry/MilledOreProcessing.java | 820 --- .../core/item/chemistry/NuclearChem.java | 116 - .../gtPlusPlus/core/item/chemistry/OilChem.java | 45 - .../core/item/chemistry/RocketFuels.java | 1071 --- .../core/item/chemistry/StandardBaseParticles.java | 161 - .../chemistry/general/ItemGenericChemBase.java | 318 - .../chemistry/general/ItemNuclearChemBase.java | 152 - .../core/item/circuit/ItemAdvancedChip.java | 237 - .../core/item/crafting/ItemDummyResearch.java | 114 - .../gtPlusPlus/core/item/effects/RarityEffect.java | 42 - .../gtPlusPlus/core/item/effects/RarityEpic.java | 29 - .../gtPlusPlus/core/item/effects/RarityRare.java | 29 - .../core/item/effects/RarityUncommon.java | 23 - .../core/item/food/BaseItemMetaFood.java | 431 -- .../core/item/general/BaseItemGrindle.java | 84 - .../core/item/general/BedLocator_Base.java | 107 - .../gtPlusPlus/core/item/general/BufferCore.java | 72 - .../core/item/general/ItemAirFilter.java | 141 - .../core/item/general/ItemAreaClear.java | 202 - .../core/item/general/ItemBasicFirestarter.java | 85 - .../item/general/ItemBasicScrubberTurbine.java | 147 - .../core/item/general/ItemBlueprint.java | 295 - .../core/item/general/ItemCloakingDevice.java | 259 - .../core/item/general/ItemControlCore.java | 128 - .../core/item/general/ItemCreativeTab.java | 59 - .../gtPlusPlus/core/item/general/ItemEmpty.java | 21 - .../core/item/general/ItemGemShards.java | 78 - .../core/item/general/ItemGenericToken.java | 182 - .../gtPlusPlus/core/item/general/ItemGiantEgg.java | 300 - .../core/item/general/ItemHalfCompleteCasings.java | 63 - .../core/item/general/ItemHealingDevice.java | 432 -- .../core/item/general/ItemLavaFilter.java | 127 - .../core/item/general/ItemSlowBuildingRing.java | 140 - .../core/item/general/NuclearFuelRodBase.java | 211 - .../core/item/general/RF2EU_Battery.java | 315 - .../core/item/general/books/ItemBaseBook.java | 130 - .../item/general/capture/ItemEntityCatcher.java | 246 - .../item/general/chassis/ItemBoilerChassis.java | 86 - .../item/general/chassis/ItemDehydratorCoil.java | 93 - .../general/chassis/ItemDehydratorCoilWire.java | 93 - .../core/item/general/fuelrods/FuelRod_Base.java | 223 - .../item/general/fuelrods/FuelRod_Thorium.java | 13 - .../general/rfchargingpack/ChargingPackBase.java | 84 - .../item/general/spawn/ItemCustomSpawnEgg.java | 285 - .../throwables/ItemHydrofluoricAcidPotion.java | 30 - .../general/throwables/ItemSulfuricAcidPotion.java | 30 - .../item/general/throwables/ItemThrowableBomb.java | 124 - src/Java/gtPlusPlus/core/item/init/ItemsFoods.java | 80 - .../gtPlusPlus/core/item/init/ItemsMultiTools.java | 74 - .../core/item/materials/DustDecayable.java | 97 - .../core/item/materials/MaterialHandler.java | 10 - .../core/item/tool/misc/ConnectedBlockFinder.java | 142 - .../core/item/tool/misc/DebugScanner.java | 104 - .../core/item/tool/misc/FakeGregtechTool.java | 74 - .../core/item/tool/misc/GregtechPump.java | 1302 ---- .../core/item/tool/misc/SandstoneHammer.java | 80 - .../core/item/tool/misc/box/AutoLunchBox.java | 11 - .../core/item/tool/misc/box/BaseBoxItem.java | 59 - .../core/item/tool/misc/box/ContainerBoxBase.java | 328 - .../item/tool/misc/box/CustomBoxInventory.java | 243 - .../core/item/tool/misc/box/MagicToolBag.java | 11 - .../core/item/tool/misc/box/UniversalToolBox.java | 13 - .../core/item/tool/staballoy/MultiPickaxeBase.java | 311 - .../core/item/tool/staballoy/MultiSpadeBase.java | 126 - .../core/item/tool/staballoy/StaballoyAxe.java | 345 - .../core/item/tool/staballoy/StaballoyPickaxe.java | 462 -- .../core/item/tool/staballoy/StaballoySpade.java | 411 -- .../core/item/wearable/WearableLoader.java | 15 - .../core/item/wearable/armour/ArmourLoader.java | 41 - .../core/item/wearable/armour/base/BaseArmour.java | 11 - .../item/wearable/armour/base/BaseArmourBoots.java | 10 - .../item/wearable/armour/base/BaseArmourChest.java | 10 - .../item/wearable/armour/base/BaseArmourHelm.java | 10 - .../item/wearable/armour/base/BaseArmourLegs.java | 10 - .../item/wearable/armour/hazmat/ArmourHazmat.java | 117 - .../wearable/armour/tinfoil/ArmourTinFoilHat.java | 183 - .../core/item/wearable/base/BaseItemWearable.java | 65 - .../item/wearable/hazmat/ItemArmorHazmatEx.java | 31 - src/Java/gtPlusPlus/core/lib/CORE.java | 363 - src/Java/gtPlusPlus/core/lib/LoadedMods.java | 348 - src/Java/gtPlusPlus/core/lib/VanillaColours.java | 28 - src/Java/gtPlusPlus/core/material/ALLOY.java | 1009 --- src/Java/gtPlusPlus/core/material/ELEMENT.java | 254 - src/Java/gtPlusPlus/core/material/Ion.java | 30 - .../gtPlusPlus/core/material/MISC_MATERIALS.java | 308 - src/Java/gtPlusPlus/core/material/Material.java | 1461 ---- .../core/material/MaterialGenerator.java | 409 -- .../gtPlusPlus/core/material/MaterialStack.java | 109 - src/Java/gtPlusPlus/core/material/NONMATERIAL.java | 44 - src/Java/gtPlusPlus/core/material/ORES.java | 849 --- src/Java/gtPlusPlus/core/material/Particle.java | 153 - .../core/material/gregtech/CustomGTMaterials.java | 79 - .../core/material/nuclear/FLUORIDES.java | 284 - .../gtPlusPlus/core/material/nuclear/NUCLIDE.java | 376 -- .../core/material/state/MaterialState.java | 18 - .../handler/AbstractClientMessageHandler.java | 13 - .../network/handler/AbstractMessageHandler.java | 37 - .../handler/AbstractServerMessageHandler.java | 13 - .../core/network/packet/AbstractPacket.java | 9 - .../network/packet/Packet_VolumetricFlaskGui.java | 128 - .../network/packet/Packet_VolumetricFlaskGui2.java | 127 - src/Java/gtPlusPlus/core/players/FakeFarmer.java | 86 - src/Java/gtPlusPlus/core/proxy/ClientProxy.java | 271 - src/Java/gtPlusPlus/core/proxy/ServerProxy.java | 29 - .../core/recipe/Gregtech_Recipe_Adder.java | 100 - .../core/recipe/LOADER_Machine_Components.java | 216 - .../gtPlusPlus/core/recipe/RECIPES_Extruder.java | 47 - .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 2270 ------- .../gtPlusPlus/core/recipe/RECIPES_General.java | 509 -- .../core/recipe/RECIPES_LaserEngraver.java | 135 - .../gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java | 27 - .../core/recipe/RECIPES_MachineComponents.java | 410 -- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 2926 -------- .../core/recipe/RECIPES_Old_Circuits.java | 458 -- .../core/recipe/RECIPES_RareEarthProcessing.java | 226 - .../core/recipe/RECIPES_SeleniumProcessing.java | 222 - .../gtPlusPlus/core/recipe/RECIPES_Shapeless.java | 35 - src/Java/gtPlusPlus/core/recipe/RECIPES_Tools.java | 181 - .../gtPlusPlus/core/recipe/RECIPE_Batteries.java | 52 - .../gtPlusPlus/core/recipe/ShapedRecipeObject.java | 43 - src/Java/gtPlusPlus/core/recipe/common/CI.java | 1343 ---- src/Java/gtPlusPlus/core/slots/SlotAirFilter.java | 30 - src/Java/gtPlusPlus/core/slots/SlotBlueprint.java | 31 - src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java | 77 - .../core/slots/SlotChemicalPlantInput.java | 45 - src/Java/gtPlusPlus/core/slots/SlotCrafting.java | 151 - .../core/slots/SlotCraftingNoCollect.java | 147 - src/Java/gtPlusPlus/core/slots/SlotDataStick.java | 42 - src/Java/gtPlusPlus/core/slots/SlotElectric.java | 45 - src/Java/gtPlusPlus/core/slots/SlotFrame.java | 26 - src/Java/gtPlusPlus/core/slots/SlotFuelRod.java | 55 - src/Java/gtPlusPlus/core/slots/SlotGeneric.java | 23 - src/Java/gtPlusPlus/core/slots/SlotGtTool.java | 33 - .../gtPlusPlus/core/slots/SlotGtToolElectric.java | 94 - .../core/slots/SlotIntegratedCircuit.java | 105 - .../gtPlusPlus/core/slots/SlotItemBackpackInv.java | 26 - src/Java/gtPlusPlus/core/slots/SlotJukebox.java | 37 - .../gtPlusPlus/core/slots/SlotLockedInput.java | 57 - src/Java/gtPlusPlus/core/slots/SlotLunchBox.java | 30 - .../gtPlusPlus/core/slots/SlotMagicToolBag.java | 29 - .../gtPlusPlus/core/slots/SlotModularBauble.java | 32 - .../core/slots/SlotModularBaubleUpgrades.java | 56 - src/Java/gtPlusPlus/core/slots/SlotNoInput.java | 23 - .../gtPlusPlus/core/slots/SlotNoInputLogging.java | 36 - src/Java/gtPlusPlus/core/slots/SlotOutput.java | 96 - .../core/slots/SlotPollutionScrubber.java | 66 - src/Java/gtPlusPlus/core/slots/SlotRTG.java | 26 - src/Java/gtPlusPlus/core/slots/SlotToolBox.java | 113 - .../gtPlusPlus/core/slots/SlotVolumetricFlask.java | 30 - .../core/tileentities/ModTileEntities.java | 63 - .../core/tileentities/base/TILE_ENTITY_BASE.java | 39 - .../core/tileentities/base/TileBasicTank.java | 150 - .../core/tileentities/base/TileEntityBase.java | 1347 ---- .../core/tileentities/base/TilePoweredGT.java | 1168 ---- .../general/TileEntityCircuitProgrammer.java | 307 - .../general/TileEntityDecayablesChest.java | 359 - .../tileentities/general/TileEntityEggBox.java | 359 - .../tileentities/general/TileEntityFirepit.java | 39 - .../tileentities/general/TileEntityFishTrap.java | 410 -- .../general/TileEntityHeliumGenerator.java | 124 - .../general/TileEntityInfiniteFluid.java | 139 - .../general/TileEntityPlayerDoorBase.java | 285 - .../tileentities/general/TileEntityReverter.java | 312 - .../general/TileEntityVolumetricFlaskSetter.java | 403 -- .../general/TileEntityXpConverter.java | 298 - .../redstone/TileEntityRedstoneHandler.java | 468 -- .../machines/TileEntityAdvPooCollector.java | 155 - .../machines/TileEntityBaseFluidCollector.java | 238 - .../machines/TileEntityModularityTable.java | 480 -- .../machines/TileEntityPestKiller.java | 506 -- .../machines/TileEntityPooCollector.java | 147 - .../machines/TileEntityProjectTable.java | 288 - .../machines/TileEntityRoundRobinator.java | 739 -- .../machines/TileEntityTradeTable.java | 133 - .../tileentities/machines/TileEntityWorkbench.java | 172 - .../machines/TileEntityWorkbenchAdvanced.java | 245 - src/Java/gtPlusPlus/core/util/Utils.java | 946 --- src/Java/gtPlusPlus/core/util/data/AES.java | 1 - src/Java/gtPlusPlus/core/util/data/ArrayUtils.java | 121 - src/Java/gtPlusPlus/core/util/data/EnumUtils.java | 51 - src/Java/gtPlusPlus/core/util/data/FileUtils.java | 118 - .../gtPlusPlus/core/util/data/LocaleUtils.java | 90 - .../gtPlusPlus/core/util/data/LoggingUtils.java | 49 - .../gtPlusPlus/core/util/data/StringUtils.java | 219 - src/Java/gtPlusPlus/core/util/data/UUIDUtils.java | 25 - .../gtPlusPlus/core/util/debug/DEBUG_INIT.java | 37 - .../core/util/debug/DEBUG_ITEM_ShapeSpawner.java | 58 - .../util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java | 918 --- .../core/util/debug/DEBUG_ScreenOverlay.java | 47 - .../core/util/debug/DEBUG_TimerThread.java | 64 - .../core/util/debug/UtilityGL11Debug.java | 343 - src/Java/gtPlusPlus/core/util/math/MathUtils.java | 787 --- .../core/util/minecraft/ClientUtils.java | 18 - .../core/util/minecraft/EnchantingUtils.java | 102 - .../core/util/minecraft/EnergyUtils.java | 134 - .../core/util/minecraft/EntityUtils.java | 290 - .../gtPlusPlus/core/util/minecraft/FluidUtils.java | 641 -- .../gtPlusPlus/core/util/minecraft/FoodUtils.java | 60 - .../core/util/minecraft/HazmatUtils.java | 604 -- .../core/util/minecraft/InventoryUtils.java | 88 - .../gtPlusPlus/core/util/minecraft/ItemUtils.java | 1419 ---- .../gtPlusPlus/core/util/minecraft/LangUtils.java | 150 - .../core/util/minecraft/MaterialUtils.java | 523 -- .../core/util/minecraft/MiningUtils.java | 265 - .../core/util/minecraft/ModularArmourUtils.java | 161 - .../gtPlusPlus/core/util/minecraft/NBTUtils.java | 580 -- .../core/util/minecraft/OreDictUtils.java | 25 - .../core/util/minecraft/PlayerUtils.java | 260 - .../core/util/minecraft/RecipeUtils.java | 803 --- .../core/util/minecraft/ShapelessUtils.java | 56 - .../util/minecraft/gregtech/PollutionUtils.java | 305 - .../gregtech/material/MaterialBuilder.java | 244 - .../gregtech/recipehandlers/GregtechRecipe.java | 3 - .../core/util/minecraft/network/CustomPacket.java | 39 - .../core/util/minecraft/network/PacketBuilder.java | 25 - .../util/minecraft/network/PacketDispatcher.java | 88 - .../core/util/minecraft/network/PacketHandler.java | 71 - .../util/minecraft/network/PacketTileEntity.java | 79 - .../minecraft/particles/BlockBreakParticles.java | 18 - .../particles/EntityParticleFXMysterious.java | 17 - .../gtPlusPlus/core/util/player/PlayerCache.java | 160 - .../core/util/reflect/AddGregtechRecipe.java | 291 - .../gtPlusPlus/core/util/reflect/ProxyFinder.java | 55 - .../core/util/reflect/ReflectionUtils.java | 1090 --- .../gtPlusPlus/core/util/sys/KeyboardUtils.java | 39 - src/Java/gtPlusPlus/core/util/sys/Log.java | 24 - src/Java/gtPlusPlus/core/util/sys/SystemUtils.java | 90 - .../core/world/damage/BaseCustomDamageSource.java | 22 - .../core/world/explosions/ExplosionHandler.java | 31 - .../core/world/explosions/MiningExplosion.java | 275 - .../everglades/GTplusplus_Everglades.java | 235 - .../everglades/biome/BiomeGenerator_Custom.java | 351 - .../everglades/biome/Biome_Everglades.java | 150 - .../everglades/biome/GenLayerBiomes.java | 31 - .../everglades/biome/GenLayerEverglades.java | 32 - .../everglades/block/BlockDarkWorldGround.java | 25 - .../block/BlockDarkWorldPollutedDirt.java | 74 - .../block/BlockDarkWorldPortalFrame.java | 30 - .../block/BlockDarkWorldSludgeFluid.java | 101 - .../everglades/block/BlockEvergladesPortal.java | 403 -- .../everglades/block/DarkWorldContentLoader.java | 71 - .../everglades/chunk/ChunkProviderModded.java | 510 -- .../everglades/dimension/Dimension_Everglades.java | 30 - .../everglades/gen/WorldGenDeadLilly.java | 28 - .../everglades/gen/WorldGenMinable_Custom.java | 90 - .../gtPlusPlus/everglades/gen/gt/WorldGen_GT.java | 49 - .../everglades/gen/gt/WorldGen_GT_Base.java | 471 -- .../everglades/gen/gt/WorldGen_GT_Ore_Layer.java | 514 -- .../everglades/gen/gt/WorldGen_Ores.java | 97 - .../everglades/item/ItemBlockToxicEverglades.java | 42 - .../item/ItemEvergladesPortalTrigger.java | 101 - .../gtPlusPlus/everglades/object/BoxedQuad.java | 56 - .../everglades/world/CustomWorldType.java | 59 - .../everglades/world/EvergladesPortalPosition.java | 14 - .../everglades/world/TeleporterDimensionMod.java | 471 -- .../everglades/world/WorldChunkManagerCustom.java | 263 - .../everglades/world/WorldProviderMod.java | 71 - .../gtPlusPlus/nei/DecayableRecipeHandler.java | 264 - .../gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java | 942 --- src/Java/gtPlusPlus/nei/GT_NEI_FlotationCell.java | 100 - src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java | 195 - src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java | 118 - src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java | 372 - src/Java/gtPlusPlus/nei/GT_NEI_MillingMachine.java | 136 - src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java | 58 - src/Java/gtPlusPlus/nei/NEI_GT_Config.java | 100 - src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java | 51 - .../gtPlusPlus/nei/handlers/NeiTextureHandler.java | 164 - .../plugin/agrichem/AlgaeDefinition.java | 60 - .../gtPlusPlus/plugin/agrichem/AlgaeUtils.java | 11 - .../gtPlusPlus/plugin/agrichem/BioRecipes.java | 1425 ---- .../gtPlusPlus/plugin/agrichem/Core_Agrichem.java | 70 - .../gtPlusPlus/plugin/agrichem/IAlgalItem.java | 12 - .../plugin/agrichem/block/AgrichemFluids.java | 88 - .../plugin/agrichem/fluids/FluidLoader.java | 21 - .../agrichem/item/algae/ItemAgrichemBase.java | 312 - .../plugin/agrichem/item/algae/ItemAlgaeBase.java | 235 - .../plugin/agrichem/item/algae/ItemBioChip.java | 238 - .../plugin/agrichem/logic/AlgaeGeneticData.java | 130 - .../agrichem/logic/AlgaeGrowthRequirement.java | 5 - .../gtPlusPlus/plugin/fishing/Core_Fishing.java | 54 - .../plugin/fishing/block/BlockFishEggs.java | 12 - .../gtPlusPlus/plugin/fishing/item/BaseFish.java | 119 - .../plugin/fishing/misc/BaseFishTypes.java | 140 - .../plugin/fixes/interfaces/IBugFix.java | 7 - .../plugin/fixes/vanilla/Core_VanillaFixes.java | 95 - .../fixes/vanilla/VanillaBackgroundMusicFix.java | 63 - .../plugin/fixes/vanilla/VanillaBedHeightFix.java | 82 - .../plugin/fixes/vanilla/music/MusicTocker.java | 130 - .../gtPlusPlus/plugin/manager/Core_Manager.java | 110 - .../plugin/sulfurchem/Core_SulfuricChemistry.java | 314 - .../plugin/villagers/Core_VillagerAdditions.java | 130 - .../gtPlusPlus/plugin/villagers/NameLists.java | 994 --- .../plugin/villagers/VillagerEventHandler.java | 47 - .../plugin/villagers/VillagerObject.java | 40 - .../gtPlusPlus/plugin/villagers/VillagerUtils.java | 23 - .../villagers/block/BlockGenericSpawner.java | 60 - .../villagers/entity/EntityBaseVillager.java | 538 -- .../villagers/entity/EntityNativeAustralian.java | 525 -- .../villagers/entity/trade/BaseVillagerTrade.java | 32 - .../villagers/tile/MobSpawnerCustomLogic.java | 69 - .../villagers/tile/TileEntityGenericSpawner.java | 245 - .../villagers/trade/TradeHandlerAboriginal.java | 161 - .../plugin/villagers/trade/TradeHandlerBanker.java | 27 - .../plugin/villagers/trade/TradeHandlerBase.java | 25 - .../villagers/trade/TradeHandlerTechnician.java | 27 - .../plugin/villagers/trade/TradeHandlerTrader.java | 45 - .../gtPlusPlus/plugin/waila/Core_WailaPlugin.java | 59 - src/Java/gtPlusPlus/preloader/CORE_Preloader.java | 33 - src/Java/gtPlusPlus/preloader/ChunkDebugger.java | 54 - .../gtPlusPlus/preloader/CustomClassLoader.java | 57 - src/Java/gtPlusPlus/preloader/DevHelper.java | 7139 -------------------- .../gtPlusPlus/preloader/Preloader_GT_OreDict.java | 173 - .../gtPlusPlus/preloader/Preloader_Logger.java | 60 - src/Java/gtPlusPlus/preloader/asm/AsmConfig.java | 211 - .../preloader/asm/ClassesToTransform.java | 74 - .../preloader/asm/Preloader_DummyContainer.java | 95 - .../preloader/asm/Preloader_FMLLoadingPlugin.java | 84 - .../preloader/asm/Preloader_SetupClass.java | 23 - .../preloader/asm/helpers/MethodHelper_CC.java | 28 - .../preloader/asm/helpers/MethodHelper_GT.java | 25 - .../ClassTransformer_CC_GuiContainerManager.java | 121 - ...ClassTransformer_COFH_OreDictionaryArbiter.java | 185 - .../ClassTransformer_Forge_ChunkLoading.java | 684 -- ...ansformer_Forge_EntityLivingBase_SetHealth.java | 130 - .../ClassTransformer_GC_EntityAutoRocket.java | 527 -- .../ClassTransformer_GC_FluidUtil.java | 242 - .../ClassTransformer_GC_FuelLoader.java | 622 -- .../ClassTransformer_GT_Achievements.java | 1896 ------ .../ClassTransformer_GT_Achievements_CrashFix.java | 218 - .../ClassTransformer_GT_BaseMetaTileEntity.java | 158 - ...ransformer_GT_BlockMachines_MetaPipeEntity.java | 286 - .../ClassTransformer_GT_BlockMachines_NBT.java | 193 - .../ClassTransformer_GT_CharcoalPit.java | 184 - .../transformers/ClassTransformer_GT_Client.java | 410 -- .../ClassTransformer_GT_EnergyHatchPatch.java | 317 - .../ClassTransformer_GT_ItemMachines_Tooltip.java | 139 - .../ClassTransformer_GT_MetaGenerated_Tool.java | 116 - .../ClassTransformer_GT_Packet_TileEntity.java | 319 - .../transformers/ClassTransformer_GT_Utility.java | 283 - .../ClassTransformer_IC2_GetHarvestTool.java | 214 - .../transformers/ClassTransformer_IC2_Hazmat.java | 147 - .../ClassTransformer_LWJGL_Keyboard.java | 278 - ...assTransformer_Railcraft_FluidCartHandling.java | 117 - .../ClassTransformer_Railcraft_FluidHelper.java | 695 -- .../ClassTransformer_Railcraft_InvTools.java | 235 - .../ClassTransformer_TC_ItemWispEssence.java | 278 - .../ClassTransformer_TT_ThaumicRestorer.java | 611 -- .../transformers/ClassTransformer_TiConFluids.java | 164 - .../transformers/Preloader_ClassTransformer.java | 79 - .../transformers/Preloader_ClassTransformer2.java | 16 - .../Preloader_Transformer_Handler.java | 286 - .../preloader/keyboard/BetterKeyboard.java | 132 - .../xmod/bartcrops/HANDLER_CropsPlusPlus.java | 21 - .../xmod/bartcrops/LoaderOfTheCrops.java | 109 - .../bartcrops/abstracts/BaseAestheticCrop.java | 37 - .../xmod/bartcrops/abstracts/BaseCrop.java | 56 - .../bartcrops/abstracts/BaseHarvestableCrop.java | 69 - .../gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java | 56 - .../gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java | 181 - .../xmod/bop/blocks/BOP_Block_Registrator.java | 198 - .../xmod/bop/blocks/base/LeavesBase.java | 109 - .../gtPlusPlus/xmod/bop/blocks/base/LogBase.java | 86 - .../xmod/bop/blocks/base/SaplingBase.java | 198 - .../xmod/bop/blocks/pine/LeavesPineTree.java | 36 - .../xmod/bop/blocks/pine/LogPineTree.java | 24 - .../xmod/bop/blocks/pine/SaplingPineTree.java | 55 - .../blocks/rainforest/LeavesRainforestTree.java | 26 - .../bop/blocks/rainforest/LogRainforestTree.java | 24 - .../blocks/rainforest/SaplingRainforestTree.java | 66 - .../xmod/bop/creative/MiscUtilsBOPTab.java | 20 - .../bop/world/features/trees/WorldGenPineTree.java | 171 - .../features/trees/WorldGenRainForestTree_Ex.java | 246 - src/Java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java | 15 - .../xmod/computronics/HANDLER_Computronics.java | 39 - .../xmod/eio/handler/HandlerTooltip_EIO.java | 87 - .../gtPlusPlus/xmod/eio/material/MaterialEIO.java | 121 - src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java | 61 - .../forestry/bees/blocks/BlockDenseBeeHouse.java | 24 - .../forestry/bees/blocks/FR_BlockRegistry.java | 26 - .../xmod/forestry/bees/custom/CustomCombs.java | 119 - .../forestry/bees/custom/GTPP_Bee_Definition.java | 876 --- .../xmod/forestry/bees/custom/GTPP_Bees.java | 195 - .../bees/custom/GTPP_Branch_Definition.java | 80 - .../xmod/forestry/bees/custom/ItemCustomComb.java | 181 - .../xmod/forestry/bees/gui/ContainerBeeHouse.java | 43 - .../xmod/forestry/bees/gui/GuiBeeHouse.java | 53 - .../bees/inventory/InventoryDenseBeeHouse.java | 94 - .../xmod/forestry/bees/items/FR_CustomBee.java | 5 - .../xmod/forestry/bees/items/FR_ItemRegistry.java | 107 - .../xmod/forestry/bees/items/FR_StringUtil.java | 24 - .../xmod/forestry/bees/items/MB_FrameType.java | 126 - .../xmod/forestry/bees/items/MB_ItemFrame.java | 143 - .../forestry/bees/recipe/FR_Gregtech_Recipes.java | 129 - .../bees/tileentities/TileDenseBeeHouse.java | 92 - .../xmod/galacticraft/HANDLER_GalactiCraft.java | 34 - .../galacticraft/handler/HandlerTooltip_GC.java | 83 - .../xmod/galacticraft/util/GalacticUtils.java | 169 - src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 612 -- .../xmod/gregtech/api/energy/IC2ElectricItem.java | 55 - .../api/energy/IC2ElectricItemManager.java | 95 - .../xmod/gregtech/api/enums/CustomGtTextures.java | 81 - .../xmod/gregtech/api/enums/CustomOrePrefix.java | 112 - .../xmod/gregtech/api/enums/GregtechItemList.java | 903 --- .../gregtech/api/enums/GregtechOreDictNames.java | 39 - .../gregtech/api/enums/GregtechOrePrefixes.java | 941 --- .../gregtech/api/enums/GregtechTextureSet.java | 144 - .../xmod/gregtech/api/enums/GregtechTextures.java | 203 - .../gregtech/api/enums/GregtechToolDictNames.java | 7 - .../gregtech/api/gui/CONTAINER_AdvancedBoiler.java | 93 - .../xmod/gregtech/api/gui/CONTAINER_Cyclotron.java | 37 - .../gregtech/api/gui/CONTAINER_DeluxeTank.java | 80 - .../api/gui/CONTAINER_Hatch_Muffler_Advanced.java | 51 - .../api/gui/CONTAINER_IndustrialCentrifuge.java | 39 - .../api/gui/CONTAINER_IronBlastFurnace.java | 32 - .../xmod/gregtech/api/gui/CONTAINER_MatterFab.java | 42 - .../api/gui/CONTAINER_MetaTileMachineLong.java | 244 - .../gregtech/api/gui/CONTAINER_MultiMachine.java | 283 - .../CONTAINER_MultiMachine_NoPlayerInventory.java | 27 - .../api/gui/CONTAINER_PowerSubStation.java | 41 - .../xmod/gregtech/api/gui/CONTAINER_SafeBlock.java | 124 - .../gregtech/api/gui/CONTAINER_SolarGenerator.java | 85 - .../gregtech/api/gui/CONTAINER_SteamCondenser.java | 99 - .../gregtech/api/gui/CONTAINER_SuperChest.java | 78 - .../gregtech/api/gui/CONTAINER_TreeFarmer.java | 71 - .../xmod/gregtech/api/gui/GUI_AdvancedBoiler.java | 44 - .../xmod/gregtech/api/gui/GUI_Cyclotron.java | 44 - .../xmod/gregtech/api/gui/GUI_DeluxeTank.java | 37 - .../api/gui/GUI_Hatch_Muffler_Advanced.java | 46 - .../gregtech/api/gui/GUI_IndustrialCentrifuge.java | 73 - .../gregtech/api/gui/GUI_IronBlastFurnace.java | 32 - .../xmod/gregtech/api/gui/GUI_MatterFab.java | 81 - .../xmod/gregtech/api/gui/GUI_MultiMachine.java | 296 - .../gregtech/api/gui/GUI_MultiMachine_Default.java | 68 - .../gregtech/api/gui/GUI_Multi_Basic_Slotted.java | 88 - .../xmod/gregtech/api/gui/GUI_PowerSubStation.java | 175 - .../xmod/gregtech/api/gui/GUI_SafeBlock.java | 51 - .../xmod/gregtech/api/gui/GUI_SolarGenerator.java | 44 - .../xmod/gregtech/api/gui/GUI_SteamCondenser.java | 56 - .../xmod/gregtech/api/gui/GUI_SuperChest.java | 38 - .../xmod/gregtech/api/gui/GUI_TreeFarmer.java | 46 - .../api/gui/basic/CONTAINER_PollutionCleaner.java | 105 - .../api/gui/basic/GUI_PollutionCleaner.java | 65 - .../gui/fluidreactor/Container_FluidReactor.java | 184 - .../api/gui/fluidreactor/GUI_FluidReactor.java | 122 - .../api/gui/hatches/CONTAINER_1by1_Turbine.java | 60 - .../gregtech/api/gui/hatches/CONTAINER_2by2.java | 32 - .../gregtech/api/gui/hatches/CONTAINER_4by4.java | 44 - .../gui/hatches/CONTAINER_HatchNbtConsumable.java | 282 - .../gregtech/api/gui/hatches/GUI_1by1_Turbine.java | 36 - .../xmod/gregtech/api/gui/hatches/GUI_2by2.java | 36 - .../xmod/gregtech/api/gui/hatches/GUI_4by4.java | 36 - .../api/gui/hatches/GUI_HatchNbtConsumable.java | 59 - .../hatches/charge/CONTAINER_Electric_2by2.java | 24 - .../hatches/charge/CONTAINER_Electric_4by4.java | 37 - .../api/gui/hatches/charge/GUI_Electric_2by2.java | 21 - .../api/gui/hatches/charge/GUI_Electric_4by4.java | 22 - .../api/gui/power/CONTAINER_BasicTank.java | 69 - .../xmod/gregtech/api/gui/power/GUI_BasicTank.java | 36 - .../api/interfaces/GregtechItemContainer.java | 24 - .../xmod/gregtech/api/interfaces/IHeatEntity.java | 26 - .../xmod/gregtech/api/interfaces/IHeatSink.java | 13 - .../api/interfaces/IMetaTileEntityHeatPipe.java | 14 - .../interfaces/internal/IGregtech_RecipeAdder.java | 343 - .../internal/Interface_IconContainer.java | 21 - .../internal/Interface_ItemBehaviour.java | 42 - .../internal/Interface_OreRecipeRegistrator.java | 21 - .../Interface_OreRecipeRegistrator_GT.java | 18 - .../api/interfaces/internal/Interface_Texture.java | 20 - .../interfaces/internal/Interface_ToolStats.java | 193 - .../gregtech/api/items/Gregtech_Generic_Item.java | 192 - .../xmod/gregtech/api/items/Gregtech_MetaItem.java | 345 - .../gregtech/api/items/Gregtech_MetaItem_Base.java | 675 -- .../gregtech/api/items/Gregtech_MetaItem_X32.java | 243 - .../xmod/gregtech/api/items/Gregtech_MetaTool.java | 503 -- .../gregtech/api/items/tools/GT_MetaGenTool.java | 546 -- .../gregtech/api/items/types/ToolType_Base.java | 85 - .../api/items/types/ToolType_HardHammer.java | 125 - .../gregtech/api/items/types/ToolType_Pump.java | 150 - .../gregtech/api/items/types/ToolType_Wrench.java | 150 - .../api/metatileentity/BaseCustomTileEntity.java | 197 - .../custom/power/BaseCustomPower_MTE.java | 280 - .../power/GTPP_MTE_BasicLosslessGenerator.java | 313 - .../custom/power/GTPP_MTE_BasicMachine.java | 860 --- .../custom/power/GTPP_MTE_BasicTank.java | 266 - .../custom/power/GTPP_MTE_TieredMachineBlock.java | 100 - .../custom/power/MetaTileEntityCustomPower.java | 91 - .../GT_MetaTileEntity_BasicBreaker.java | 283 - ...GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java | 38 - .../GT_MetaTileEntity_Dehydrator.java | 163 - .../GT_MetaTileEntity_DeluxeMachine.java | 862 --- .../GT_MetaTileEntity_DeluxeTank.java | 345 - .../GT_MetaTileEntity_Hatch_AirIntake.java | 290 - .../GT_MetaTileEntity_Hatch_ControlCore.java | 148 - .../GT_MetaTileEntity_Hatch_DynamoBuffer.java | 84 - ...etaTileEntity_Hatch_ElementalDataOrbHolder.java | 149 - .../GT_MetaTileEntity_Hatch_Energy_RTG.java | 287 - .../GT_MetaTileEntity_Hatch_InputBattery.java | 258 - .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 329 - .../GT_MetaTileEntity_Hatch_Naquadah.java | 208 - .../GT_MetaTileEntity_Hatch_OutputBattery.java | 236 - .../GT_MetaTileEntity_Hatch_Plasma.java | 219 - .../GT_MetaTileEntity_Hatch_Steam_BusInput.java | 234 - .../GT_MetaTileEntity_Hatch_Steam_BusOutput.java | 175 - .../GT_MetaTileEntity_Hatch_Turbine.java | 316 - .../GT_MetaTileEntity_Hatch_TurbineProvider.java | 220 - .../GT_MetaTileEntity_SuperBus_Input.java | 230 - .../GT_MetaTileEntity_SuperBus_Output.java | 180 - .../GregtechMetaPipeEntityFluid.java | 119 - .../GregtechMetaPipeEntity_Cable.java | 165 - .../GregtechMetaTreeFarmerStructural.java | 56 - .../implementations/base/CustomMetaTileBase.java | 60 - .../GT_MetaTileEntity_Hatch_CustomFluidBase.java | 131 - .../base/GregtechMetaPipeEntityBase_Cable.java | 468 -- .../base/GregtechMetaTileEntity.java | 77 - .../base/GregtechMetaTransformerHiAmp.java | 115 - .../base/GregtechMeta_MultiBlockBase.java | 2656 -------- .../base/GregtechMeta_SteamMultiBase.java | 796 --- .../GregtechDoubleFuelGeneratorBase.java | 428 -- .../base/generators/GregtechMetaBoilerBase.java | 382 -- .../generators/GregtechMetaSolarGenerator.java | 215 - .../GregtechRocketFuelGeneratorBase.java | 372 - .../base/machines/GregtechMetaSafeBlockBase.java | 291 - .../base/machines/GregtechMetaTreeFarmerBase.java | 176 - .../GT_MetaTileEntity_Hatch_Catalysts.java | 71 - .../GT_MetaTileEntity_Hatch_MillingBalls.java | 71 - .../GT_MetaTileEntity_Hatch_NbtConsumable.java | 273 - .../xmod/gregtech/api/objects/GregtechFluid.java | 28 - .../gregtech/api/objects/GregtechItemData.java | 144 - .../api/objects/GregtechMaterialStack.java | 49 - .../gregtech/api/objects/MultiblockBlueprint.java | 469 -- .../xmod/gregtech/api/objects/MultiblockLayer.java | 643 -- .../api/objects/MultiblockRequirements.java | 108 - .../ProcessingSkookumChoocherToolRecipes.java | 22 - .../xmod/gregtech/api/util/GTPP_Config.java | 100 - .../api/util/GregtechOreDictUnificator.java | 402 -- .../api/util/SpecialBehaviourTooltipHandler.java | 35 - .../xmod/gregtech/api/world/GTPP_Worldgen.java | 61 - .../gregtech/api/world/GTPP_Worldgen_Boulder.java | 77 - .../api/world/GTPP_Worldgen_GT_Ore_Layer.java | 167 - .../gregtech/api/world/GTPP_Worldgen_Handler.java | 41 - .../xmod/gregtech/api/world/GTPP_Worldgen_Ore.java | 33 - .../api/world/GTPP_Worldgen_Ore_Normal.java | 75 - .../xmod/gregtech/api/world/GT_OreVein_Object.java | 31 - .../xmod/gregtech/api/world/WorldGenUtils.java | 23 - .../xmod/gregtech/common/Meta_GT_Proxy.java | 631 -- .../xmod/gregtech/common/StaticFields59.java | 303 - .../common/blocks/GTPP_Block_Machines.java | 534 -- .../gregtech/common/blocks/GTPP_Item_Machines.java | 229 - .../common/blocks/GregtechMetaCasingBlocks.java | 78 - .../common/blocks/GregtechMetaCasingBlocks2.java | 89 - .../common/blocks/GregtechMetaCasingBlocks3.java | 366 - .../common/blocks/GregtechMetaCasingBlocks4.java | 115 - .../common/blocks/GregtechMetaCasingBlocks5.java | 83 - .../blocks/GregtechMetaCasingBlocksAbstract.java | 150 - .../common/blocks/GregtechMetaCasingItems.java | 10 - .../common/blocks/GregtechMetaItemCasings1.java | 36 - .../blocks/GregtechMetaItemCasingsAbstract.java | 61 - .../blocks/GregtechMetaSpecialMachineCasings.java | 81 - .../blocks/GregtechMetaSpecialMultiCasings.java | 103 - .../blocks/GregtechMetaTieredCasingBlocks1.java | 110 - .../common/blocks/fluid/GregtechFluidHandler.java | 111 - .../blocks/textures/CasingTextureHandler.java | 82 - .../blocks/textures/CasingTextureHandler2.java | 57 - .../blocks/textures/CasingTextureHandler3.java | 68 - .../textures/TexturesCentrifugeMultiblock.java | 166 - .../common/blocks/textures/TexturesGregtech58.java | 443 -- .../common/blocks/textures/TexturesGregtech59.java | 444 -- .../blocks/textures/TexturesGrinderMultiblock.java | 150 - .../common/blocks/textures/TexturesGtBlock.java | 652 -- .../blocks/textures/TexturesGtCutomCovers.java | 32 - .../common/blocks/textures/TexturesGtTools.java | 61 - .../turbine/LargeTurbineTextureHandler.java | 318 - .../common/blueprint/Blueprint_Generic_3x3.java | 87 - .../gregtech/common/blueprint/Blueprint_LFTR.java | 137 - .../xmod/gregtech/common/covers/CoverManager.java | 102 - .../common/covers/GTPP_Cover_Overflow.java | 247 - .../common/covers/GTPP_Cover_Overflow_Item.java | 182 - .../common/covers/GTPP_Cover_ToggleVisual.java | 186 - .../gregtech/common/helpers/ChargingHelper.java | 429 -- .../gregtech/common/helpers/CraftingHelper.java | 42 - .../common/helpers/FlotationRecipeHandler.java | 79 - .../gregtech/common/helpers/GT_MethodHelper.java | 80 - .../common/helpers/MachineUpdateHandler.java | 42 - .../gregtech/common/helpers/TreeFarmHelper.java | 1033 --- .../common/helpers/VolumetricFlaskHelper.java | 188 - .../helpers/autocrafter/AC_Helper_Container.java | 118 - .../helpers/autocrafter/AC_Helper_Utils.java | 80 - .../common/helpers/tesseract/TesseractHelper.java | 263 - .../common/helpers/treefarm/TreeGenerator.java | 386 -- .../gregtech/common/items/MetaCustomCoverItem.java | 225 - .../common/items/MetaGeneratedGregtechItems.java | 453 -- .../common/items/MetaGeneratedGregtechTools.java | 101 - .../items/behaviours/Behaviour_Choocher.java | 88 - .../behaviours/Behaviour_Electric_Lighter.java | 220 - .../common/items/behaviours/Behaviour_Grinder.java | 94 - .../items/behaviours/Behaviour_Prospecting_Ex.java | 123 - .../common/items/covers/MetaItemCoverCasings.java | 40 - .../gregtech/common/render/GTPP_CapeRenderer.java | 517 -- .../gregtech/common/render/GTPP_FlaskRenderer.java | 94 - .../common/render/GTPP_Render_MachineBlock.java | 659 -- .../requirements/RequirementsBasicCubic.java | 11 - .../GT_MetaTileEntity_TesseractGenerator.java | 730 -- .../GT_MetaTileEntity_TesseractTerminal.java | 581 -- .../generators/GT_MetaTileEntity_Boiler_Base.java | 296 - .../generators/GT_MetaTileEntity_Boiler_HV.java | 56 - .../generators/GT_MetaTileEntity_Boiler_LV.java | 52 - .../generators/GT_MetaTileEntity_Boiler_MV.java | 52 - .../generators/GT_MetaTileEntity_Boiler_Solar.java | 194 - .../generators/GT_MetaTileEntity_RfConvertor.java | 348 - .../GT_MetaTileEntity_SemiFluidGenerator.java | 171 - ...gtechMetaTileEntityDoubleFuelGeneratorBase.java | 153 - .../GregtechMetaTileEntityGeothermalGenerator.java | 151 - .../GregtechMetaTileEntityRocketFuelGenerator.java | 142 - .../GregtechMetaTileEntitySolarGenerator.java | 187 - .../generators/GregtechMetaTileEntity_RTG.java | 390 -- .../GT_MetaTileEntity_ULV_CombustionGenerator.java | 50 - .../ULV/GT_MetaTileEntity_ULV_GasTurbine.java | 59 - .../ULV/GT_MetaTileEntity_ULV_SteamTurbine.java | 58 - .../creative/GregtechMetaCreativeEnergyBuffer.java | 229 - .../basic/GT_MetaTileEntity_WorldAccelerator.java | 328 - .../GregtechMetaAtmosphericReconditioner.java | 789 --- .../machines/basic/GregtechMetaCondensor.java | 174 - .../basic/GregtechMetaGarbageCollector.java | 323 - .../basic/GregtechMetaPollutionCreator.java | 386 -- .../basic/GregtechMetaPollutionDetector.java | 439 -- .../basic/GregtechMetaTileEntityChunkLoader.java | 394 -- ...GregtechMetaTileEntityThaumcraftResearcher.java | 204 - .../basic/GregtechMetaTileEntity_BasicWasher.java | 71 - .../GregtechMetaTileEntity_ChemicalReactor.java | 666 -- ...regtechMetaTileEntity_CompactFusionReactor.java | 702 -- .../basic/GregtechMetaTileEntity_PocketFusion.java | 704 -- .../GregtechMetaTileEntity_ReactorColdTrap.java | 67 - ...egtechMetaTileEntity_ReactorProcessingUnit.java | 67 - .../basic/GregtechMetaWirelessCharger.java | 560 -- .../machines/multi/misc/GMTE_AmazonPackager.java | 323 - .../multi/misc/GregtechMTE_TeslaTower.java | 479 -- ...gtechMetaTileEntity_IndustrialAlloySmelter.java | 403 -- ...regtechMetaTileEntity_IndustrialArcFurnace.java | 320 - ...regtechMetaTileEntity_IndustrialCentrifuge.java | 263 - .../GregtechMetaTileEntity_IndustrialCokeOven.java | 230 - ...echMetaTileEntity_IndustrialCuttingMachine.java | 234 - ...regtechMetaTileEntity_IndustrialDehydrator.java | 415 -- ...gtechMetaTileEntity_IndustrialElectrolyzer.java | 193 - .../GregtechMetaTileEntity_IndustrialExtruder.java | 260 - ...GregtechMetaTileEntity_IndustrialMacerator.java | 259 - .../GregtechMetaTileEntity_IndustrialMixer.java | 257 - ...gtechMetaTileEntity_IndustrialMultiMachine.java | 541 -- ...regtechMetaTileEntity_IndustrialPlatePress.java | 242 - .../GregtechMetaTileEntity_IndustrialSifter.java | 225 - .../GregtechMetaTileEntity_IndustrialSinter.java | 268 - ...MetaTileEntity_IndustrialThermalCentrifuge.java | 224 - ...techMetaTileEntity_IndustrialVacuumFreezer.java | 261 - ...GregtechMetaTileEntity_IndustrialWashPlant.java | 335 - .../GregtechMetaTileEntity_IndustrialWireMill.java | 206 - .../GregtechMetaTileEntity_IronBlastFurnace.java | 403 -- .../processing/GregtechMetaTileEntity_IsaMill.java | 666 -- .../GregtechMetaTileEntity_SpargeTower.java | 414 -- .../GregtechMetaTileEntity_Adv_AssemblyLine.java | 629 -- ...egtechMetaTileEntity_Adv_DistillationTower.java | 481 -- .../advanced/GregtechMetaTileEntity_Adv_EBF.java | 484 -- .../GregtechMetaTileEntity_Adv_Fusion_MK4.java | 153 - .../GregtechMetaTileEntity_Adv_Implosion.java | 207 - .../GregtechMetaTileEntity_SteamMacerator.java | 165 - .../multi/production/GT4Entity_AutoCrafter.java | 656 -- .../multi/production/GT4Entity_ThermalBoiler.java | 354 - .../GregtechMTE_ElementalDuplicator.java | 744 -- .../production/GregtechMTE_FastNeutronReactor.java | 231 - .../production/GregtechMTE_FrothFlotationCell.java | 449 -- .../production/GregtechMTE_LargeNaqReactor.java | 501 -- .../production/GregtechMTE_MiniFusionPlant.java | 386 -- .../production/GregtechMTE_NuclearReactor.java | 523 -- .../GregtechMetaTileEntityGeneratorArray.java | 521 -- .../production/GregtechMetaTileEntityTreeFarm.java | 332 - .../GregtechMetaTileEntity_AlloyBlastSmelter.java | 336 - .../GregtechMetaTileEntity_Cyclotron.java | 481 -- ...egtechMetaTileEntity_IndustrialFishingPond.java | 623 -- .../GregtechMetaTileEntity_LargeRocketEngine.java | 629 -- ...techMetaTileEntity_LargeSemifluidGenerator.java | 341 - .../GregtechMetaTileEntity_MassFabricator.java | 425 -- .../GregtechMetaTileEntity_Refinery.java | 238 - .../GregtechMetaTileEntity_SolarTower.java | 702 -- .../algae/GregtechMTE_AlgaePondBase.java | 486 -- ...gtechMetaTileEntity_BedrockMiningPlatform1.java | 46 - ...gtechMetaTileEntity_BedrockMiningPlatform2.java | 46 - ...chMetaTileEntity_BedrockMiningPlatformBase.java | 683 -- .../chemplant/GregtechMTE_ChemicalPlant.java | 1046 --- .../turbines/GT_MTE_LargeTurbine_SHSteam.java | 179 - .../turbines/GT_MTE_LargeTurbine_Steam.java | 189 - .../GregtechMetaTileEntity_LargerTurbineBase.java | 663 -- .../storage/GregtechMetaTileEntity_MultiTank.java | 621 -- ...chMetaTileEntity_PowerSubStationController.java | 657 -- .../tileentities/misc/TileEntitySolarHeater.java | 348 - .../GT_MetaTileEntity_ConnectableCrate.java | 574 -- .../storage/GT_MetaTileEntity_TieredChest.java | 199 - .../storage/GT_MetaTileEntity_TieredTank.java | 160 - .../storage/GregtechMetaEnergyBuffer.java | 421 -- .../storage/GregtechMetaSafeBlock.java | 62 - .../GT_MetaTileEntity_InfiniteItemHolder.java | 105 - .../storage/shelving/GT4Entity_Shelf.java | 359 - .../shelving/GT4Entity_Shelf_Compartment.java | 39 - .../storage/shelving/GT4Entity_Shelf_Desk.java | 45 - .../shelving/GT4Entity_Shelf_FileCabinet.java | 55 - .../storage/shelving/GT4Entity_Shelf_Iron.java | 41 - .../storage/shelving/GT4Entity_Shelf_Large.java | 266 - .../common/tools/TOOL_Gregtech_AngleGrinder.java | 199 - .../gregtech/common/tools/TOOL_Gregtech_Base.java | 180 - .../common/tools/TOOL_Gregtech_Choocher.java | 196 - .../tools/TOOL_Gregtech_ElectricButcherKnife.java | 192 - .../tools/TOOL_Gregtech_ElectricLighter.java | 166 - .../common/tools/TOOL_Gregtech_ElectricSnips.java | 97 - .../xmod/gregtech/loaders/GT_Material_Loader.java | 290 - .../xmod/gregtech/loaders/Gregtech_Blocks.java | 22 - .../gregtech/loaders/ProcessingAngleGrinder.java | 135 - .../loaders/ProcessingElectricButcherKnife.java | 134 - .../loaders/ProcessingElectricLighter.java | 131 - .../gregtech/loaders/ProcessingElectricSnips.java | 130 - .../loaders/ProcessingToolHeadChoocher.java | 92 - .../loaders/Processing_Textures_Items.java | 11 - .../gregtech/loaders/RecipeGen_AlloySmelter.java | 66 - .../xmod/gregtech/loaders/RecipeGen_Assembler.java | 81 - .../xmod/gregtech/loaders/RecipeGen_Base.java | 16 - .../gregtech/loaders/RecipeGen_BlastSmelter.java | 280 - .../loaders/RecipeGen_BlastSmelterGT_Ex.java | 153 - .../loaders/RecipeGen_BlastSmelterGT_GTNH.java | 215 - .../gregtech/loaders/RecipeGen_DustGeneration.java | 444 -- .../xmod/gregtech/loaders/RecipeGen_Extruder.java | 176 - .../gregtech/loaders/RecipeGen_FluidCanning.java | 230 - .../xmod/gregtech/loaders/RecipeGen_Fluids.java | 298 - .../loaders/RecipeGen_MaterialProcessing.java | 274 - .../gregtech/loaders/RecipeGen_MetalRecipe.java | 119 - .../RecipeGen_MultisUsingFluidInsteadOfCells.java | 187 - .../xmod/gregtech/loaders/RecipeGen_Ore.java | 573 -- .../xmod/gregtech/loaders/RecipeGen_Plasma.java | 42 - .../xmod/gregtech/loaders/RecipeGen_Plates.java | 154 - .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 373 - .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 264 - .../loaders/misc/AddCustomMachineToPA.java | 51 - .../gregtech/loaders/misc/AssLineAchievements.java | 180 - .../loaders/recipe/RecipeLoader_AlgaeFarm.java | 207 - .../gregtech/loaders/recipe/RecipeLoader_GTNH.java | 22 - .../gregtech/loaders/recipe/RecipeLoader_LFTR.java | 173 - .../loaders/recipe/RecipeLoader_Nuclear.java | 695 -- .../recipe/RecipeLoader_NuclearFuelProcessing.java | 372 - .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 1851 ----- .../xmod/gregtech/recipes/RecipesToRemove.java | 57 - .../machines/RECIPEHANDLER_AssemblyLine.java | 20 - .../recipes/machines/RECIPEHANDLER_CokeOven.java | 47 - .../recipes/machines/RECIPEHANDLER_Dehydrator.java | 82 - .../machines/RECIPEHANDLER_MatterFabricator.java | 55 - .../registration/gregtech/Gregtech4Content.java | 85 - .../gregtech/GregtechAdvancedBoilers.java | 104 - .../gregtech/GregtechAdvancedMixer.java | 132 - .../gregtech/GregtechAlgaeContent.java | 55 - .../gregtech/GregtechAmazonWarehouse.java | 21 - .../gregtech/GregtechBedrockPlatforms.java | 18 - .../gregtech/GregtechBufferDynamos.java | 64 - .../gregtech/GregtechComponentAssembler.java | 532 -- .../registration/gregtech/GregtechConduits.java | 698 -- .../gregtech/GregtechCustomHatches.java | 217 - .../registration/gregtech/GregtechCyclotron.java | 22 - .../registration/gregtech/GregtechDehydrator.java | 193 - .../gregtech/GregtechEnergyBuffer.java | 94 - .../GregtechFactoryGradeReplacementMultis.java | 35 - .../gregtech/GregtechFluidReactor.java | 25 - .../registration/gregtech/GregtechGeneratorsULV | 15 - .../gregtech/GregtechGeneratorsULV.java | 26 - .../GregtechGeothermalThermalGenerator.java | 68 - .../gregtech/GregtechHiAmpTransformer.java | 158 - .../gregtech/GregtechIndustrialAlloySmelter.java | 22 - .../gregtech/GregtechIndustrialArcFurnace.java | 22 - .../gregtech/GregtechIndustrialBlastSmelter.java | 26 - .../gregtech/GregtechIndustrialCentrifuge.java | 26 - .../gregtech/GregtechIndustrialCokeOven.java | 26 - .../gregtech/GregtechIndustrialCuttingFactory.java | 25 - .../gregtech/GregtechIndustrialElectrolyzer.java | 26 - .../GregtechIndustrialElementDuplicator.java | 20 - .../gregtech/GregtechIndustrialExtruder.java | 26 - .../gregtech/GregtechIndustrialFishPond.java | 24 - .../gregtech/GregtechIndustrialFuelRefinery.java | 26 - .../gregtech/GregtechIndustrialGeneratorArray.java | 26 - .../gregtech/GregtechIndustrialMacerator.java | 26 - .../gregtech/GregtechIndustrialMassFabricator.java | 230 - .../gregtech/GregtechIndustrialMixer.java | 27 - .../gregtech/GregtechIndustrialMultiMachine.java | 25 - .../gregtech/GregtechIndustrialMultiTank.java | 32 - .../gregtech/GregtechIndustrialPlatePress.java | 26 - .../gregtech/GregtechIndustrialSifter.java | 26 - .../GregtechIndustrialThermalCentrifuge.java | 25 - .../gregtech/GregtechIndustrialTreeFarm.java | 28 - .../gregtech/GregtechIndustrialWashPlant.java | 25 - .../gregtech/GregtechIndustrialWiremill.java | 25 - .../gregtech/GregtechIronBlastFurnace.java | 24 - .../registration/gregtech/GregtechIsaMill.java | 23 - .../registration/gregtech/GregtechLFTR.java | 36 - .../GregtechLargeTurbinesAndHeatExchanger.java | 22 - .../gregtech/GregtechMiniRaFusion.java | 45 - .../registration/gregtech/GregtechNaqReactor.java | 24 - .../gregtech/GregtechNitroDieselFix.java | 182 - .../gregtech/GregtechPollutionDevices.java | 57 - .../gregtech/GregtechPowerBreakers.java | 42 - .../gregtech/GregtechPowerSubStation.java | 43 - .../registration/gregtech/GregtechRTG.java | 22 - .../gregtech/GregtechRocketFuelGenerator.java | 128 - .../registration/gregtech/GregtechSafeBlock.java | 118 - .../gregtech/GregtechSemiFluidgenerators.java | 20 - .../gregtech/GregtechSimpleWasher.java | 109 - .../gregtech/GregtechSolarGenerators.java | 49 - .../registration/gregtech/GregtechSolarTower.java | 32 - .../gregtech/GregtechSteamCondenser.java | 26 - .../registration/gregtech/GregtechSteamMultis.java | 22 - .../registration/gregtech/GregtechSuperChests.java | 73 - .../gregtech/GregtechSuperConductionPoint.java | 19 - .../registration/gregtech/GregtechTeslaTower.java | 17 - .../gregtech/GregtechThaumcraftDevices.java | 26 - .../gregtech/GregtechThreadedBuffers.java | 136 - .../gregtech/GregtechTieredChunkloaders.java | 28 - .../gregtech/GregtechTieredFluidTanks.java | 58 - .../gregtech/GregtechTreeFarmerTE.java | 22 - .../gregtech/GregtechWirelessChargers.java | 48 - .../gregtech/NewHorizonsAccelerator.java | 99 - .../gtPlusPlus/xmod/growthcraft/HANDLER_GC.java | 26 - .../xmod/growthcraft/fishtrap/FishTrapHandler.java | 232 - .../xmod/growthcraft/fishtrap/Growthcraft_New.java | 86 - .../xmod/growthcraft/fishtrap/Growthcraft_Old.java | 86 - .../gtPlusPlus/xmod/ic2/CustomInternalName.java | 22 - src/Java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java | 28 - .../xmod/ic2/block/RTGGenerator/BlockRTG.java | 208 - .../xmod/ic2/block/RTGGenerator/TileEntityRTG.java | 88 - .../ic2/block/RTGGenerator/gui/CONTAINER_RTG.java | 37 - .../xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java | 52 - .../kieticgenerator/IC2_BlockKineticGenerator.java | 77 - .../ic2/block/kieticgenerator/IC2_TEComponent.java | 48 - .../container/ContainerKineticWindgenerator.java | 28 - .../container/IC2_ContainerBase.java | 5 - .../gui/GuiKineticWindGenerator.java | 78 - .../tileentity/TileEntityKineticWindGenerator.java | 389 -- .../xmod/ic2/item/CustomKineticRotor.java | 276 - .../gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java | 43 - .../xmod/ic2/item/IC2_ItemGradualInteger.java | 54 - src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java | 106 - src/Java/gtPlusPlus/xmod/ic2/item/IC2_Items.java | 60 - .../gtPlusPlus/xmod/ic2/item/ItemGenerators.java | 55 - src/Java/gtPlusPlus/xmod/ic2/item/RotorBase.java | 100 - .../gtPlusPlus/xmod/ic2/item/RotorIridium.java | 127 - .../xmod/ic2/item/reactor/IC2_FuelRod_Base.java | 52 - .../gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java | 326 - .../gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java | 277 - src/Java/gtPlusPlus/xmod/ob/GliderHandler.java | 127 - .../gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java | 38 - src/Java/gtPlusPlus/xmod/ob/SprinklerHandler.java | 66 - .../xmod/railcraft/HANDLER_Railcraft.java | 83 - .../xmod/railcraft/utils/RailcraftUtils.java | 13 - .../xmod/reliquary/HANDLER_Reliquary.java | 26 - .../xmod/reliquary/item/ReliquaryItems.java | 160 - .../xmod/reliquary/util/AlkahestRecipeWrapper.java | 47 - .../reliquary/util/ReliquaryRecipeHandler.java | 56 - src/Java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java | 21 - .../xmod/sc2/modules/ModuleExoticSeeds.java | 117 - .../gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java | 61 - .../xmod/thaumcraft/HANDLER_Thaumcraft.java | 59 - .../xmod/thaumcraft/aspect/GTPP_AspectCompat.java | 200 - .../xmod/thaumcraft/aspect/GTPP_AspectStack.java | 15 - .../thaumcraft/commands/CommandDumpAspects.java | 90 - .../thaumcraft/objects/ThreadAspectScanner.java | 158 - .../wrapper/aspect/TC_AspectList_Wrapper.java | 40 - .../objects/wrapper/aspect/TC_Aspect_Wrapper.java | 327 - .../wrapper/recipe/Base_Recipe_Wrapper.java | 10 - .../wrapper/recipe/TC_CrucibleRecipe_Wrapper.java | 19 - .../wrapper/recipe/TC_IArcaneRecipe_Wrapper.java | 19 - .../TC_InfusionEnchantmentRecipe_Wrapper.java | 19 - .../wrapper/recipe/TC_InfusionRecipe_Wrapper.java | 19 - .../wrapper/research/TC_PageType_Wrapper.java | 17 - .../research/TC_ResearchCategories_Wrapper.java | 89 - .../research/TC_ResearchCategoryList_Wrapper.java | 21 - .../wrapper/research/TC_ResearchItem_Wrapper.java | 246 - .../research/TC_ResearchNoteData_Wrapper.java | 14 - .../wrapper/research/TC_ResearchPage_Wrapper.java | 228 - .../xmod/thaumcraft/util/ThaumcraftUtils.java | 464 -- .../xmod/thermalfoundation/HANDLER_TF.java | 43 - .../block/TF_Block_Fluid_Cryotheum.java | 191 - .../block/TF_Block_Fluid_Ender.java | 68 - .../block/TF_Block_Fluid_Pyrotheum.java | 191 - .../xmod/thermalfoundation/block/TF_Blocks.java | 29 - .../xmod/thermalfoundation/fluid/TF_Fluids.java | 79 - .../xmod/thermalfoundation/item/TF_Items.java | 88 - .../recipe/TF_Gregtech_Recipes.java | 101 - .../gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java | 105 - .../xmod/tinkers/material/BaseTinkersMaterial.java | 274 - .../xmod/tinkers/util/TinkersDryingRecipe.java | 120 - .../gtPlusPlus/xmod/tinkers/util/TinkersUtils.java | 544 -- src/Java/gtPlusPlus/xmod/witchery/WitchUtils.java | 99 - .../vswe/stevescarts/ModuleData/GppModuleData.java | 49 - src/main/java/gregtech/api/enums/TAE.java | 139 + .../java/gregtech/api/util/EmptyRecipeMap.java | 51 + .../java/gregtech/api/util/FishPondFakeRecipe.java | 80 + src/main/java/gregtech/api/util/GTPP_Recipe.java | 1017 +++ .../java/gregtech/api/util/GasSpargingRecipe.java | 99 + .../gregtech/api/util/GasSpargingRecipeMap.java | 48 + src/main/java/gregtech/api/util/HotFuel.java | 28 + .../gregtech/api/util/SemiFluidFuelHandler.java | 117 + src/main/java/gregtech/api/util/ThermalFuel.java | 43 + src/main/java/gtPlusPlus/GTplusplus.java | 564 ++ src/main/java/gtPlusPlus/GenerateDictionaries.java | 176 + src/main/java/gtPlusPlus/RoadMap.java | 80 + .../gtPlusPlus/api/damage/DamageTeslaTower.java | 24 + .../java/gtPlusPlus/api/enums/ParticleNames.java | 37 + src/main/java/gtPlusPlus/api/enums/Quality.java | 62 + .../api/helpers/GregtechPlusPlus_API.java | 203 + .../gtPlusPlus/api/helpers/MaterialHelper.java | 76 + .../gtPlusPlus/api/interfaces/IChunkLoader.java | 33 + .../api/interfaces/IComparableRecipe.java | 8 + .../gtPlusPlus/api/interfaces/IEntityCatcher.java | 21 + .../gtPlusPlus/api/interfaces/IGeneratorWorld.java | 17 + .../api/interfaces/IGregtechPacketEntity.java | 13 + .../gtPlusPlus/api/interfaces/IGregtechPower.java | 145 + .../gtPlusPlus/api/interfaces/ILazyCoverable.java | 144 + .../java/gtPlusPlus/api/interfaces/IPlugin.java | 40 + .../api/interfaces/IRandomGenerator.java | 55 + .../gtPlusPlus/api/interfaces/ITexturedBlock.java | 14 + .../gtPlusPlus/api/interfaces/ITileTooltip.java | 7 + .../java/gtPlusPlus/api/interfaces/IToolable.java | 17 + .../api/interfaces/RunnableWithInfo.java | 12 + .../gtPlusPlus/api/objects/GregtechException.java | 28 + src/main/java/gtPlusPlus/api/objects/Logger.java | 179 + .../java/gtPlusPlus/api/objects/data/AutoMap.java | 345 + .../api/objects/data/ConcurrentHashSet.java | 18 + .../gtPlusPlus/api/objects/data/ConcurrentSet.java | 53 + .../gtPlusPlus/api/objects/data/FlexiblePair.java | 39 + .../java/gtPlusPlus/api/objects/data/ObjMap.java | 285 + .../java/gtPlusPlus/api/objects/data/Pair.java | 35 + .../java/gtPlusPlus/api/objects/data/Quad.java | 45 + .../api/objects/data/ReverseAutoMap.java | 175 + .../java/gtPlusPlus/api/objects/data/Triplet.java | 27 + .../gtPlusPlus/api/objects/data/TypeCounter.java | 178 + .../api/objects/data/WeightedCollection.java | 102 + .../api/objects/data/weakref/WeakAutoMap.java | 12 + .../gtPlusPlus/api/objects/minecraft/AABB.java | 65 + .../api/objects/minecraft/BTF_FluidTank.java | 188 + .../api/objects/minecraft/BTF_Inventory.java | 228 + .../gtPlusPlus/api/objects/minecraft/BlockPos.java | 250 + .../api/objects/minecraft/CubicObject.java | 62 + .../api/objects/minecraft/DimChunkPos.java | 52 + .../api/objects/minecraft/FakeBlockPos.java | 253 + .../api/objects/minecraft/FakeWorld.java | 173 + .../gtPlusPlus/api/objects/minecraft/FluidGT6.java | 31 + .../objects/minecraft/FormattedTooltipString.java | 25 + .../api/objects/minecraft/GenericStack.java | 42 + .../api/objects/minecraft/ItemPackage.java | 58 + .../api/objects/minecraft/ItemStackData.java | 35 + .../objects/minecraft/NoConflictGTRecipeMap.java | 123 + .../api/objects/minecraft/SafeTexture.java | 64 + .../api/objects/minecraft/ShapedRecipe.java | 250 + .../api/objects/minecraft/TexturePackage.java | 55 + .../api/objects/minecraft/ThreadPooCollector.java | 111 + .../minecraft/multi/NoEUBonusMultiBehaviour.java | 27 + .../multi/NoOutputBonusMultiBehaviour.java | 27 + .../multi/NoSpeedBonusMultiBehaviour.java | 27 + .../minecraft/multi/SpecialMultiBehaviour.java | 44 + .../api/objects/random/CSPRNG_DO_NOT_USE.java | 271 + .../api/objects/random/UUIDGenerator.java | 449 ++ .../java/gtPlusPlus/api/objects/random/XSTR.java | 278 + .../java/gtPlusPlus/api/plugin/Sample_Plugin.java | 47 + .../api/thermal/energy/IThermalConnection.java | 7 + .../api/thermal/energy/IThermalContainerItem.java | 15 + .../api/thermal/energy/IThermalHandler.java | 15 + .../api/thermal/energy/IThermalProvider.java | 13 + .../api/thermal/energy/IThermalReceiver.java | 13 + .../api/thermal/energy/IThermalStorage.java | 13 + .../api/thermal/energy/ThermalStorage.java | 116 + .../api/thermal/energy/ThermalStorageAdv.java | 34 + .../api/thermal/sample/ItemThermalContainer.java | 84 + .../api/thermal/sample/TileThermalHandler.java | 42 + .../api/thermal/tileentity/IThermalInfo.java | 13 + .../gtPlusPlus/australia/GTplusplus_Australia.java | 158 + .../australia/biome/CustomDecorator.java | 355 + .../australia/biome/GenLayerAustralia.java | 32 + .../biome/GenLayerBiomesAustraliaDimension.java | 47 + .../biome/type/Biome_AustralianDesert.java | 355 + .../biome/type/Biome_AustralianDesert2.java | 355 + .../biome/type/Biome_AustralianDesert_Ex.java | 65 + .../biome/type/Biome_AustralianForest.java | 198 + .../biome/type/Biome_AustralianOcean.java | 52 + .../biome/type/Biome_AustralianOutback.java | 381 ++ .../biome/type/Biome_AustralianPlains.java | 122 + .../australia/block/AustraliaContentLoader.java | 67 + .../australia/block/BlockAustraliaPortal.java | 403 ++ .../australia/block/BlockAustraliaSand.java | 25 + .../australia/block/BlockAustraliaTopSoil.java | 76 + .../australia/block/BlockDarkWorldPortalFrame.java | 30 + .../australia/chunk/ChunkProviderAustralia.java | 821 +++ .../australia/dimension/Dimension_Australia.java | 23 + .../entity/model/ModelAustralianSpider.java | 148 + .../australia/entity/model/ModelBoar.java | 20 + .../australia/entity/model/ModelDingo.java | 168 + .../australia/entity/model/ModelOctopus.java | 67 + .../entity/render/RenderAustralianSpider.java | 84 + .../australia/entity/render/RenderBoar.java | 64 + .../australia/entity/render/RenderDingo.java | 90 + .../australia/entity/render/RenderOctopus.java | 120 + .../entity/type/EntityAustralianSpiderBase.java | 41 + .../australia/entity/type/EntityBoar.java | 220 + .../australia/entity/type/EntityDingo.java | 536 ++ .../australia/entity/type/EntityOctopus.java | 228 + .../australia/gen/gt/WorldGen_Australia_Ores.java | 294 + .../australia/gen/gt/WorldGen_GT_Australia.java | 48 + .../gen/gt/WorldGen_GT_Australia_Base.java | 471 ++ .../gen/gt/WorldGen_GT_Australia_Ore_Layer.java | 511 ++ .../australia/gen/map/MapGenExtendedVillage.java | 265 + .../australia/gen/map/MapGenLargeRavine.java | 217 + .../gen/map/component/AustraliaComponent.java | 196 + .../australia/gen/map/component/ComponentHut.java | 474 ++ .../gen/map/component/ComponentShack.java | 279 + .../gen/map/structure/StructureManager.java | 20 + .../map/structure/type/ComponentVillageBank.java | 175 + .../australia/gen/world/WorldGenAustralianOre.java | 87 + .../gen/world/WorldGenAustralianTrees.java | 250 + .../australia/item/ItemAustraliaPortalTrigger.java | 100 + .../australia/item/ItemBlockAustralia.java | 39 + .../australia/world/AustraliaPortalPosition.java | 14 + .../world/AustraliaTeleporterDimensionMod.java | 470 ++ .../world/AustraliaWorldChunkManager.java | 257 + .../australia/world/AustraliaWorldGenerator.java | 142 + .../australia/world/AustraliaWorldProvider.java | 80 + .../australia/world/AustraliaWorldType.java | 59 + src/main/java/gtPlusPlus/core/block/ModBlocks.java | 162 + .../gtPlusPlus/core/block/base/AdvancedBlock.java | 39 + .../gtPlusPlus/core/block/base/BasicBlock.java | 81 + .../core/block/base/BasicTileBlockWithTooltip.java | 328 + .../gtPlusPlus/core/block/base/BlockBaseFluid.java | 103 + .../core/block/base/BlockBaseModular.java | 211 + .../gtPlusPlus/core/block/base/BlockBaseNBT.java | 81 + .../gtPlusPlus/core/block/base/BlockBaseOre.java | 229 + .../java/gtPlusPlus/core/block/base/MetaBlock.java | 35 + .../core/block/base/MultiTextureBlock.java | 37 + .../block/general/BlockCompressedObsidian.java | 94 + .../gtPlusPlus/core/block/general/BlockNet.java | 37 + .../core/block/general/BlockSuperLight.java | 220 + .../core/block/general/BlockTankXpConverter.java | 192 + .../gtPlusPlus/core/block/general/FirePit.java | 230 + .../core/block/general/FluidTankInfinite.java | 136 + .../gtPlusPlus/core/block/general/HellFire.java | 557 ++ .../gtPlusPlus/core/block/general/LightGlass.java | 144 + .../core/block/general/MiningExplosives.java | 172 + .../gtPlusPlus/core/block/general/PlayerDoors.java | 467 ++ .../block/general/antigrief/BlockWitherProof.java | 166 + .../core/block/general/antigrief/TowerDevice.java | 293 + .../block/general/fluids/BlockFluidSludge.java | 63 + .../general/redstone/BlockGenericRedstone.java | 370 + .../redstone/BlockGenericRedstoneDetector.java | 131 + .../redstone/BlockGenericRedstoneEmitter.java | 5 + .../general/redstone/BlockGenericRedstoneTest.java | 201 + .../core/block/machine/BlockGtFrameBox.java | 42 + .../core/block/machine/CircuitProgrammer.java | 159 + .../core/block/machine/DecayablesChest.java | 223 + .../java/gtPlusPlus/core/block/machine/EggBox.java | 175 + .../gtPlusPlus/core/block/machine/FishTrap.java | 152 + .../core/block/machine/HeliumGenerator.java | 95 + .../block/machine/Machine_ModularityTable.java | 103 + .../core/block/machine/Machine_PestKiller.java | 137 + .../core/block/machine/Machine_PooCollector.java | 182 + .../core/block/machine/Machine_ProjectTable.java | 164 + .../core/block/machine/Machine_RoundRobinator.java | 131 + .../core/block/machine/Machine_SuperJukebox.java | 579 ++ .../core/block/machine/Machine_TradeTable.java | 86 + .../core/block/machine/Machine_WireiusDeletus.java | 5 + .../core/block/machine/Machine_Workbench.java | 152 + .../block/machine/Machine_WorkbenchAdvanced.java | 111 + .../core/block/machine/VolumetricFlaskSetter.java | 169 + .../block/machine/bedrock/Mining_Head_Fake.java | 159 + .../block/machine/bedrock/Mining_Pipe_Fake.java | 136 + .../core/chunkloading/GTPP_ChunkManager.java | 217 + .../core/chunkloading/StaticChunkFunctions.java | 63 + .../gtPlusPlus/core/client/CustomTextureSet.java | 28 + .../gtPlusPlus/core/client/model/ModelBatKing.java | 120 + .../core/client/model/ModelDecayChest.java | 46 + .../gtPlusPlus/core/client/model/ModelEggBox.java | 65 + .../core/client/model/ModelGiantChicken.java | 112 + .../core/client/model/ModelSickBlaze.java | 93 + .../core/client/model/ModelStaballoyConstruct.java | 120 + .../core/client/model/tabula/ModelTabulaBase.java | 38 + .../client/renderer/CustomItemBlockRenderer.java | 85 + .../client/renderer/CustomOreBlockRenderer.java | 2083 ++++++ .../core/client/renderer/RenderBatKing.java | 152 + .../core/client/renderer/RenderDecayChest.java | 82 + .../core/client/renderer/RenderGiantChicken.java | 15 + .../renderer/RenderMiningExplosivesPrimed.java | 107 + .../core/client/renderer/RenderPlasmaBolt.java | 168 + .../core/client/renderer/RenderPotionthrow.java | 104 + .../core/client/renderer/RenderSickBlaze.java | 99 + .../client/renderer/RenderStaballoyConstruct.java | 149 + .../core/client/renderer/RenderToxinball.java | 93 + .../renderer/particle/EntityDropParticleFX.java | 96 + .../client/renderer/tabula/RenderTabulaBase.java | 46 + .../core/commands/CommandDebugChunks.java | 152 + .../commands/CommandEnableDebugWhileRunning.java | 270 + .../java/gtPlusPlus/core/commands/CommandMath.java | 100 + .../gtPlusPlus/core/commands/CommandUtils.java | 20 + .../java/gtPlusPlus/core/common/BasePlayer.java | 212 + .../java/gtPlusPlus/core/common/CommonProxy.java | 306 + .../core/common/compat/COMPAT_Baubles.java | 71 + .../core/common/compat/COMPAT_BigReactors.java | 21 + .../common/compat/COMPAT_CompactWindmills.java | 172 + .../core/common/compat/COMPAT_EnderIO.java | 28 + .../core/common/compat/COMPAT_ExtraUtils.java | 32 + .../core/common/compat/COMPAT_HarvestCraft.java | 15 + .../gtPlusPlus/core/common/compat/COMPAT_IC2.java | 64 + .../core/common/compat/COMPAT_MorePlanets.java | 37 + .../core/common/compat/COMPAT_OpenBlocks.java | 29 + .../core/common/compat/COMPAT_PlayerAPI.java | 52 + .../core/common/compat/COMPAT_PneumaticCraft.java | 19 + .../core/common/compat/COMPAT_RFTools.java | 20 + .../core/common/compat/COMPAT_Railcraft.java | 14 + .../core/common/compat/COMPAT_SimplyJetpacks.java | 20 + .../core/common/compat/COMPAT_Thaumcraft.java | 45 + .../core/common/compat/COMPAT_Witchery.java | 26 + .../java/gtPlusPlus/core/config/ConfigHandler.java | 245 + .../core/container/Container_BackpackBase.java | 208 + .../container/Container_CircuitProgrammer.java | 190 + .../core/container/Container_DecayablesChest.java | 140 + .../core/container/Container_EggBox.java | 140 + .../core/container/Container_FishTrap.java | 142 + .../core/container/Container_Grindle.java | 160 + .../core/container/Container_HeliumGenerator.java | 193 + .../core/container/Container_ModularityTable.java | 252 + .../core/container/Container_PestKiller.java | 154 + .../core/container/Container_ProjectTable.java | 242 + .../core/container/Container_RoundRobinator.java | 246 + .../core/container/Container_SuperJukebox.java | 251 + .../core/container/Container_TradeTable.java | 223 + .../container/Container_VolumetricFlaskSetter.java | 185 + .../core/container/Container_Workbench.java | 413 ++ .../container/Container_WorkbenchAdvanced.java | 377 ++ .../core/container/box/LunchBoxContainer.java | 13 + .../core/container/box/MagicBagContainer.java | 13 + .../core/container/box/ToolBoxContainer.java | 15 + .../gtPlusPlus/core/creative/AddToCreativeTab.java | 35 + .../creative/tabs/MiscUtilCreativeTabBlock.java | 27 + .../creative/tabs/MiscUtilCreativeTabMachines.java | 21 + .../creative/tabs/MiscUtilCreativeTabMisc.java | 20 + .../creative/tabs/MiscUtilCreativeTabOther.java | 20 + .../creative/tabs/MiscUtilCreativeTabTools.java | 20 + .../core/entity/EntityPrimedMiningExplosive.java | 216 + .../gtPlusPlus/core/entity/EntityTeleportFX.java | 247 + .../core/entity/EntityTeslaTowerLightning.java | 168 + .../core/entity/InternalEntityRegistry.java | 96 + .../entity/ai/batking/EntityAIBatKingAttack.java | 406 ++ .../core/entity/item/ItemEntityGiantEgg.java | 117 + .../core/entity/monster/EntityBatKing.java | 712 ++ .../entity/monster/EntityGiantChickenBase.java | 311 + .../core/entity/monster/EntitySickBlaze.java | 225 + .../entity/monster/EntityStaballoyConstruct.java | 553 ++ .../projectile/EntityHydrofluoricAcidPotion.java | 127 + .../entity/projectile/EntityLightningAttack.java | 76 + .../projectile/EntitySulfuricAcidPotion.java | 115 + .../entity/projectile/EntityThrowableBomb.java | 145 + .../core/entity/projectile/EntityToxinball.java | 327 + .../entity/projectile/EntityToxinballSmall.java | 88 + .../gtPlusPlus/core/fluids/BlockFluidBase.java | 104 + .../java/gtPlusPlus/core/fluids/FactoryFluid.java | 49 + .../java/gtPlusPlus/core/fluids/FluidFactory.java | 214 + .../java/gtPlusPlus/core/fluids/FluidPackage.java | 83 + .../core/fluids/FluidRegistryHandler.java | 53 + .../core/fluids/ItemGenericFluidBucket.java | 319 + .../gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java | 15 + .../gtPlusPlus/core/gui/beta/Gui_ID_Registry.java | 56 + .../java/gtPlusPlus/core/gui/beta/Gui_Types.java | 8 + .../java/gtPlusPlus/core/gui/beta/MU_GuiId.java | 32 + .../gtPlusPlus/core/gui/item/GuiBaseBackpack.java | 121 + .../gtPlusPlus/core/gui/item/GuiBaseGrindle.java | 564 ++ .../gtPlusPlus/core/gui/item/GuiScreenGrindle.java | 490 ++ .../gtPlusPlus/core/gui/item/box/GuiBaseBox.java | 116 + .../gtPlusPlus/core/gui/item/box/LunchBoxGui.java | 11 + .../gtPlusPlus/core/gui/item/box/MagicBagGui.java | 11 + .../gtPlusPlus/core/gui/item/box/ToolBoxGui.java | 11 + .../core/gui/machine/GUI_CircuitProgrammer.java | 44 + .../core/gui/machine/GUI_DecayablesChest.java | 59 + .../gtPlusPlus/core/gui/machine/GUI_EggBox.java | 60 + .../gtPlusPlus/core/gui/machine/GUI_FishTrap.java | 59 + .../core/gui/machine/GUI_HeliumGenerator.java | 39 + .../core/gui/machine/GUI_ModularityTable.java | 83 + .../core/gui/machine/GUI_PestKiller.java | 159 + .../core/gui/machine/GUI_ProjectTable.java | 65 + .../core/gui/machine/GUI_RoundRobinator.java | 120 + .../core/gui/machine/GUI_ScrollTest.java | 229 + .../core/gui/machine/GUI_SuperJukebox.java | 90 + .../core/gui/machine/GUI_TradeTable.java | 50 + .../gui/machine/GUI_VolumetricFlaskSetter.java | 183 + .../gtPlusPlus/core/gui/machine/GUI_Workbench.java | 81 + .../core/gui/machine/GUI_WorkbenchAdvanced.java | 42 + .../gtPlusPlus/core/gui/widget/GuiValueField.java | 86 + .../core/handler/AchievementHandler.java | 421 ++ .../java/gtPlusPlus/core/handler/BookHandler.java | 404 ++ .../core/handler/BurnableFuelHandler.java | 35 + .../gtPlusPlus/core/handler/COMPAT_HANDLER.java | 320 + .../core/handler/COMPAT_IntermodStaging.java | 91 + .../gtPlusPlus/core/handler/CraftingManager.java | 17 + .../gtPlusPlus/core/handler/EnumHelperHandler.java | 21 + .../java/gtPlusPlus/core/handler/GuiHandler.java | 231 + .../gtPlusPlus/core/handler/OldCircuitHandler.java | 66 + .../gtPlusPlus/core/handler/PacketHandler.java | 91 + .../core/handler/Recipes/DecayableRecipe.java | 39 + .../handler/Recipes/LateRegistrationHandler.java | 28 + .../core/handler/Recipes/RegistrationHandler.java | 27 + .../handler/StopAnnoyingFuckingAchievements.java | 49 + .../core/handler/events/BlockEventHandler.java | 229 + .../core/handler/events/CustomMovementHandler.java | 163 + .../handler/events/EnderDragonDeathHandler.java | 59 + .../core/handler/events/EntityDeathHandler.java | 124 + .../handler/events/GeneralTooltipEventHandler.java | 107 + .../core/handler/events/LoginEventHandler.java | 128 + .../core/handler/events/MissingMappingsEvent.java | 56 + .../events/PickaxeBlockBreakEventHandler.java | 80 + .../core/handler/events/PlayerTickHandler.java | 18 + .../core/handler/events/SneakManager.java | 131 + .../handler/events/UnbreakableBlockManager.java | 138 + .../events/ZombieBackupSpawnEventHandler.java | 55 + .../core/handler/render/CapeHandler.java | 122 + .../core/handler/render/FirepitModel.java | 121 + .../core/handler/render/FirepitRender.java | 55 + .../workbench/Workbench_CraftingHandler.java | 208 + .../handler/workbench/Workbench_RecipeSorter.java | 44 + .../gtPlusPlus/core/interfaces/IGuiManager.java | 16 + .../core/interfaces/IGuiManagerMiscUtils.java | 3 + .../gtPlusPlus/core/interfaces/IItemBlueprint.java | 48 + .../core/inventories/BaseInventoryBackpack.java | 241 + .../core/inventories/BaseInventoryGrindle.java | 224 + .../inventories/InventoryCircuitProgrammer.java | 173 + .../core/inventories/InventoryFishTrap.java | 176 + .../core/inventories/InventoryHeliumGenerator.java | 176 + .../core/inventories/InventoryPestKiller.java | 176 + .../core/inventories/InventoryWorkbenchChest.java | 188 + .../inventories/InventoryWorkbenchCrafting.java | 201 + .../InventoryWorkbenchHoloCrafting.java | 164 + .../inventories/InventoryWorkbenchHoloSlots.java | 269 + .../core/inventories/InventoryWorkbenchTools.java | 188 + .../InventoryWorkbenchToolsElectric.java | 193 + .../inventories/Inventory_DecayablesChest.java | 176 + .../core/inventories/Inventory_EggBox.java | 176 + .../core/inventories/Inventory_RoundRobinator.java | 172 + .../core/inventories/Inventory_SuperJukebox.java | 172 + .../Inventory_VolumetricFlaskSetter.java | 173 + .../core/inventories/box/LunchBoxInventory.java | 15 + .../core/inventories/box/MagicBagInventory.java | 15 + .../core/inventories/box/ToolBoxInventory.java | 16 + .../modulartable/InventoryModularMain.java | 202 + .../modulartable/InventoryModularOutput.java | 192 + .../projecttable/InventoryProjectMain.java | 201 + .../projecttable/InventoryProjectOutput.java | 188 + .../inventories/tradetable/InventoryTradeMain.java | 201 + .../tradetable/InventoryTradeOutput.java | 188 + src/main/java/gtPlusPlus/core/item/ModItems.java | 1229 ++++ .../java/gtPlusPlus/core/item/base/BaseEuItem.java | 582 ++ .../core/item/base/BaseItemBackpack.java | 92 + .../gtPlusPlus/core/item/base/BaseItemBrain.java | 109 + .../core/item/base/BaseItemBurnable.java | 44 + .../core/item/base/BaseItemColourable.java | 98 + .../core/item/base/BaseItemComponent.java | 566 ++ .../core/item/base/BaseItemDamageable.java | 201 + .../gtPlusPlus/core/item/base/BaseItemGeneric.java | 28 + .../gtPlusPlus/core/item/base/BaseItemLoot.java | 109 + .../gtPlusPlus/core/item/base/BaseItemTCShard.java | 82 + .../core/item/base/BaseItemTickable.java | 341 + .../core/item/base/BaseItemWithCharge.java | 76 + .../core/item/base/BaseItemWithDamageValue.java | 27 + .../gtPlusPlus/core/item/base/BasicSpawnEgg.java | 254 + .../java/gtPlusPlus/core/item/base/CoreItem.java | 237 + .../core/item/base/bolts/BaseItemBolt.java | 11 + .../core/item/base/cell/BaseItemCell.java | 66 + .../core/item/base/cell/BaseItemPlasmaCell.java | 83 + .../core/item/base/dusts/BaseItemDust.java | 145 + .../core/item/base/dusts/BaseItemDustAbstract.java | 44 + .../core/item/base/dusts/BaseItemDustEx.java | 126 + .../core/item/base/dusts/BaseItemDustUnique.java | 162 + .../item/base/dusts/decimal/BaseItemCentidust.java | 58 + .../item/base/dusts/decimal/BaseItemDecidust.java | 58 + .../core/item/base/foil/BaseItemFoil.java | 11 + .../core/item/base/foods/BaseItemFood.java | 50 + .../core/item/base/foods/BaseItemHotFood.java | 80 + .../core/item/base/gears/BaseItemGear.java | 11 + .../core/item/base/gears/BaseItemSmallGear.java | 11 + .../core/item/base/ingots/BaseItemIngot.java | 21 + .../core/item/base/ingots/BaseItemIngotHot.java | 110 + .../core/item/base/ingots/BaseItemIngot_OLD.java | 101 + .../core/item/base/itemblock/FluidItemBlock.java | 61 + .../item/base/itemblock/ItemBlockBasicTile.java | 71 + .../core/item/base/itemblock/ItemBlockDoor.java | 100 + .../item/base/itemblock/ItemBlockEntityBase.java | 41 + .../core/item/base/itemblock/ItemBlockGtBlock.java | 156 + .../item/base/itemblock/ItemBlockGtFrameBox.java | 94 + .../core/item/base/itemblock/ItemBlockMeta.java | 114 + .../core/item/base/itemblock/ItemBlockNBT.java | 104 + .../core/item/base/itemblock/ItemBlockOre.java | 161 + .../base/itemblock/ItemBlockRoundRobinator.java | 115 + .../core/item/base/itemblock/ItemBlockSpawner.java | 39 + .../core/item/base/misc/BaseItemMisc.java | 174 + .../core/item/base/misc/BaseItemParticle.java | 57 + .../core/item/base/nugget/BaseItemNugget.java | 12 + .../base/ore/BaseItemCentrifugedCrushedOre.java | 10 + .../core/item/base/ore/BaseItemCrushedOre.java | 10 + .../core/item/base/ore/BaseItemImpureDust.java | 10 + .../core/item/base/ore/BaseItemMilledOre.java | 25 + .../item/base/ore/BaseItemPurifiedCrushedOre.java | 10 + .../core/item/base/ore/BaseItemPurifiedDust.java | 10 + .../core/item/base/ore/BaseOreComponent.java | 279 + .../core/item/base/plates/BaseItemPlate.java | 18 + .../core/item/base/plates/BaseItemPlateDouble.java | 20 + .../core/item/base/plates/BaseItemPlateHeavy.java | 47 + .../core/item/base/plates/BaseItemPlate_OLD.java | 95 + .../core/item/base/rings/BaseItemRing.java | 12 + .../core/item/base/rods/BaseItemRod.java | 12 + .../core/item/base/rods/BaseItemRodLong.java | 18 + .../core/item/base/rotors/BaseItemRotor.java | 11 + .../core/item/base/screws/BaseItemScrew.java | 12 + .../gtPlusPlus/core/item/bauble/BaseBauble.java | 190 + .../core/item/bauble/BatteryPackBaseBauble.java | 259 + .../core/item/bauble/ElectricBaseBauble.java | 197 + .../core/item/bauble/FireProtectionBauble.java | 137 + .../core/item/bauble/HealthBoostBauble.java | 39 + .../gtPlusPlus/core/item/bauble/ModularBauble.java | 408 ++ .../core/item/bauble/MonsterKillerBaseBauble.java | 175 + .../core/item/chemistry/AgriculturalChem.java | 614 ++ .../gtPlusPlus/core/item/chemistry/CoalTar.java | 378 ++ .../core/item/chemistry/GenericChem.java | 1115 +++ .../core/item/chemistry/IonParticles.java | 165 + .../core/item/chemistry/MilledOreProcessing.java | 820 +++ .../core/item/chemistry/NuclearChem.java | 116 + .../gtPlusPlus/core/item/chemistry/OilChem.java | 45 + .../core/item/chemistry/RocketFuels.java | 1071 +++ .../core/item/chemistry/StandardBaseParticles.java | 161 + .../chemistry/general/ItemGenericChemBase.java | 318 + .../chemistry/general/ItemNuclearChemBase.java | 152 + .../core/item/circuit/ItemAdvancedChip.java | 237 + .../core/item/crafting/ItemDummyResearch.java | 114 + .../gtPlusPlus/core/item/effects/RarityEffect.java | 42 + .../gtPlusPlus/core/item/effects/RarityEpic.java | 29 + .../gtPlusPlus/core/item/effects/RarityRare.java | 29 + .../core/item/effects/RarityUncommon.java | 23 + .../core/item/food/BaseItemMetaFood.java | 431 ++ .../core/item/general/BaseItemGrindle.java | 84 + .../core/item/general/BedLocator_Base.java | 107 + .../gtPlusPlus/core/item/general/BufferCore.java | 72 + .../core/item/general/ItemAirFilter.java | 141 + .../core/item/general/ItemAreaClear.java | 202 + .../core/item/general/ItemBasicFirestarter.java | 85 + .../item/general/ItemBasicScrubberTurbine.java | 147 + .../core/item/general/ItemBlueprint.java | 295 + .../core/item/general/ItemCloakingDevice.java | 259 + .../core/item/general/ItemControlCore.java | 128 + .../core/item/general/ItemCreativeTab.java | 59 + .../gtPlusPlus/core/item/general/ItemEmpty.java | 21 + .../core/item/general/ItemGemShards.java | 78 + .../core/item/general/ItemGenericToken.java | 182 + .../gtPlusPlus/core/item/general/ItemGiantEgg.java | 300 + .../core/item/general/ItemHalfCompleteCasings.java | 63 + .../core/item/general/ItemHealingDevice.java | 432 ++ .../core/item/general/ItemLavaFilter.java | 127 + .../core/item/general/ItemSlowBuildingRing.java | 140 + .../core/item/general/NuclearFuelRodBase.java | 211 + .../core/item/general/RF2EU_Battery.java | 315 + .../core/item/general/books/ItemBaseBook.java | 130 + .../item/general/capture/ItemEntityCatcher.java | 246 + .../item/general/chassis/ItemBoilerChassis.java | 86 + .../item/general/chassis/ItemDehydratorCoil.java | 93 + .../general/chassis/ItemDehydratorCoilWire.java | 93 + .../core/item/general/fuelrods/FuelRod_Base.java | 223 + .../item/general/fuelrods/FuelRod_Thorium.java | 13 + .../general/rfchargingpack/ChargingPackBase.java | 84 + .../item/general/spawn/ItemCustomSpawnEgg.java | 285 + .../throwables/ItemHydrofluoricAcidPotion.java | 30 + .../general/throwables/ItemSulfuricAcidPotion.java | 30 + .../item/general/throwables/ItemThrowableBomb.java | 124 + .../java/gtPlusPlus/core/item/init/ItemsFoods.java | 80 + .../gtPlusPlus/core/item/init/ItemsMultiTools.java | 74 + .../core/item/materials/DustDecayable.java | 97 + .../core/item/materials/MaterialHandler.java | 10 + .../core/item/tool/misc/ConnectedBlockFinder.java | 142 + .../core/item/tool/misc/DebugScanner.java | 104 + .../core/item/tool/misc/FakeGregtechTool.java | 74 + .../core/item/tool/misc/GregtechPump.java | 1302 ++++ .../core/item/tool/misc/SandstoneHammer.java | 80 + .../core/item/tool/misc/box/AutoLunchBox.java | 11 + .../core/item/tool/misc/box/BaseBoxItem.java | 59 + .../core/item/tool/misc/box/ContainerBoxBase.java | 328 + .../item/tool/misc/box/CustomBoxInventory.java | 243 + .../core/item/tool/misc/box/MagicToolBag.java | 11 + .../core/item/tool/misc/box/UniversalToolBox.java | 13 + .../core/item/tool/staballoy/MultiPickaxeBase.java | 311 + .../core/item/tool/staballoy/MultiSpadeBase.java | 126 + .../core/item/tool/staballoy/StaballoyAxe.java | 345 + .../core/item/tool/staballoy/StaballoyPickaxe.java | 462 ++ .../core/item/tool/staballoy/StaballoySpade.java | 411 ++ .../core/item/wearable/WearableLoader.java | 15 + .../core/item/wearable/armour/ArmourLoader.java | 41 + .../core/item/wearable/armour/base/BaseArmour.java | 11 + .../item/wearable/armour/base/BaseArmourBoots.java | 10 + .../item/wearable/armour/base/BaseArmourChest.java | 10 + .../item/wearable/armour/base/BaseArmourHelm.java | 10 + .../item/wearable/armour/base/BaseArmourLegs.java | 10 + .../item/wearable/armour/hazmat/ArmourHazmat.java | 117 + .../wearable/armour/tinfoil/ArmourTinFoilHat.java | 183 + .../core/item/wearable/base/BaseItemWearable.java | 65 + .../item/wearable/hazmat/ItemArmorHazmatEx.java | 31 + src/main/java/gtPlusPlus/core/lib/CORE.java | 363 + src/main/java/gtPlusPlus/core/lib/LoadedMods.java | 348 + .../java/gtPlusPlus/core/lib/VanillaColours.java | 28 + src/main/java/gtPlusPlus/core/material/ALLOY.java | 1009 +++ .../java/gtPlusPlus/core/material/ELEMENT.java | 254 + src/main/java/gtPlusPlus/core/material/Ion.java | 30 + .../gtPlusPlus/core/material/MISC_MATERIALS.java | 308 + .../java/gtPlusPlus/core/material/Material.java | 1461 ++++ .../core/material/MaterialGenerator.java | 409 ++ .../gtPlusPlus/core/material/MaterialStack.java | 109 + .../java/gtPlusPlus/core/material/NONMATERIAL.java | 44 + src/main/java/gtPlusPlus/core/material/ORES.java | 849 +++ .../java/gtPlusPlus/core/material/Particle.java | 153 + .../core/material/gregtech/CustomGTMaterials.java | 79 + .../core/material/nuclear/FLUORIDES.java | 284 + .../gtPlusPlus/core/material/nuclear/NUCLIDE.java | 376 ++ .../core/material/state/MaterialState.java | 18 + .../handler/AbstractClientMessageHandler.java | 13 + .../network/handler/AbstractMessageHandler.java | 37 + .../handler/AbstractServerMessageHandler.java | 13 + .../core/network/packet/AbstractPacket.java | 9 + .../network/packet/Packet_VolumetricFlaskGui.java | 128 + .../network/packet/Packet_VolumetricFlaskGui2.java | 127 + .../java/gtPlusPlus/core/players/FakeFarmer.java | 86 + .../java/gtPlusPlus/core/proxy/ClientProxy.java | 271 + .../java/gtPlusPlus/core/proxy/ServerProxy.java | 29 + .../core/recipe/Gregtech_Recipe_Adder.java | 100 + .../core/recipe/LOADER_Machine_Components.java | 216 + .../gtPlusPlus/core/recipe/RECIPES_Extruder.java | 47 + .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 2270 +++++++ .../gtPlusPlus/core/recipe/RECIPES_General.java | 509 ++ .../core/recipe/RECIPES_LaserEngraver.java | 135 + .../gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java | 27 + .../core/recipe/RECIPES_MachineComponents.java | 410 ++ .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 2926 ++++++++ .../core/recipe/RECIPES_Old_Circuits.java | 458 ++ .../core/recipe/RECIPES_RareEarthProcessing.java | 226 + .../core/recipe/RECIPES_SeleniumProcessing.java | 222 + .../gtPlusPlus/core/recipe/RECIPES_Shapeless.java | 35 + .../java/gtPlusPlus/core/recipe/RECIPES_Tools.java | 181 + .../gtPlusPlus/core/recipe/RECIPE_Batteries.java | 52 + .../gtPlusPlus/core/recipe/ShapedRecipeObject.java | 43 + .../java/gtPlusPlus/core/recipe/common/CI.java | 1343 ++++ .../java/gtPlusPlus/core/slots/SlotAirFilter.java | 30 + .../java/gtPlusPlus/core/slots/SlotBlueprint.java | 31 + .../java/gtPlusPlus/core/slots/SlotBuzzSaw.java | 77 + .../core/slots/SlotChemicalPlantInput.java | 45 + .../java/gtPlusPlus/core/slots/SlotCrafting.java | 151 + .../core/slots/SlotCraftingNoCollect.java | 147 + .../java/gtPlusPlus/core/slots/SlotDataStick.java | 42 + .../java/gtPlusPlus/core/slots/SlotElectric.java | 45 + src/main/java/gtPlusPlus/core/slots/SlotFrame.java | 26 + .../java/gtPlusPlus/core/slots/SlotFuelRod.java | 55 + .../java/gtPlusPlus/core/slots/SlotGeneric.java | 23 + .../java/gtPlusPlus/core/slots/SlotGtTool.java | 33 + .../gtPlusPlus/core/slots/SlotGtToolElectric.java | 94 + .../core/slots/SlotIntegratedCircuit.java | 105 + .../gtPlusPlus/core/slots/SlotItemBackpackInv.java | 26 + .../java/gtPlusPlus/core/slots/SlotJukebox.java | 37 + .../gtPlusPlus/core/slots/SlotLockedInput.java | 57 + .../java/gtPlusPlus/core/slots/SlotLunchBox.java | 30 + .../gtPlusPlus/core/slots/SlotMagicToolBag.java | 29 + .../gtPlusPlus/core/slots/SlotModularBauble.java | 32 + .../core/slots/SlotModularBaubleUpgrades.java | 56 + .../java/gtPlusPlus/core/slots/SlotNoInput.java | 23 + .../gtPlusPlus/core/slots/SlotNoInputLogging.java | 36 + .../java/gtPlusPlus/core/slots/SlotOutput.java | 96 + .../core/slots/SlotPollutionScrubber.java | 66 + src/main/java/gtPlusPlus/core/slots/SlotRTG.java | 26 + .../java/gtPlusPlus/core/slots/SlotToolBox.java | 113 + .../gtPlusPlus/core/slots/SlotVolumetricFlask.java | 30 + .../core/tileentities/ModTileEntities.java | 63 + .../core/tileentities/base/TILE_ENTITY_BASE.java | 39 + .../core/tileentities/base/TileBasicTank.java | 150 + .../core/tileentities/base/TileEntityBase.java | 1347 ++++ .../core/tileentities/base/TilePoweredGT.java | 1168 ++++ .../general/TileEntityCircuitProgrammer.java | 307 + .../general/TileEntityDecayablesChest.java | 359 + .../tileentities/general/TileEntityEggBox.java | 359 + .../tileentities/general/TileEntityFirepit.java | 39 + .../tileentities/general/TileEntityFishTrap.java | 410 ++ .../general/TileEntityHeliumGenerator.java | 124 + .../general/TileEntityInfiniteFluid.java | 139 + .../general/TileEntityPlayerDoorBase.java | 285 + .../tileentities/general/TileEntityReverter.java | 312 + .../general/TileEntityVolumetricFlaskSetter.java | 403 ++ .../general/TileEntityXpConverter.java | 298 + .../redstone/TileEntityRedstoneHandler.java | 468 ++ .../machines/TileEntityAdvPooCollector.java | 155 + .../machines/TileEntityBaseFluidCollector.java | 238 + .../machines/TileEntityModularityTable.java | 480 ++ .../machines/TileEntityPestKiller.java | 506 ++ .../machines/TileEntityPooCollector.java | 147 + .../machines/TileEntityProjectTable.java | 288 + .../machines/TileEntityRoundRobinator.java | 739 ++ .../machines/TileEntityTradeTable.java | 133 + .../tileentities/machines/TileEntityWorkbench.java | 172 + .../machines/TileEntityWorkbenchAdvanced.java | 245 + src/main/java/gtPlusPlus/core/util/Utils.java | 946 +++ src/main/java/gtPlusPlus/core/util/data/AES.java | 1 + .../java/gtPlusPlus/core/util/data/ArrayUtils.java | 121 + .../java/gtPlusPlus/core/util/data/EnumUtils.java | 51 + .../java/gtPlusPlus/core/util/data/FileUtils.java | 118 + .../gtPlusPlus/core/util/data/LocaleUtils.java | 90 + .../gtPlusPlus/core/util/data/LoggingUtils.java | 49 + .../gtPlusPlus/core/util/data/StringUtils.java | 219 + .../java/gtPlusPlus/core/util/data/UUIDUtils.java | 25 + .../gtPlusPlus/core/util/debug/DEBUG_INIT.java | 37 + .../core/util/debug/DEBUG_ITEM_ShapeSpawner.java | 58 + .../util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java | 918 +++ .../core/util/debug/DEBUG_ScreenOverlay.java | 47 + .../core/util/debug/DEBUG_TimerThread.java | 64 + .../core/util/debug/UtilityGL11Debug.java | 343 + .../java/gtPlusPlus/core/util/math/MathUtils.java | 787 +++ .../core/util/minecraft/ClientUtils.java | 18 + .../core/util/minecraft/EnchantingUtils.java | 102 + .../core/util/minecraft/EnergyUtils.java | 134 + .../core/util/minecraft/EntityUtils.java | 290 + .../gtPlusPlus/core/util/minecraft/FluidUtils.java | 641 ++ .../gtPlusPlus/core/util/minecraft/FoodUtils.java | 60 + .../core/util/minecraft/HazmatUtils.java | 604 ++ .../core/util/minecraft/InventoryUtils.java | 88 + .../gtPlusPlus/core/util/minecraft/ItemUtils.java | 1419 ++++ .../gtPlusPlus/core/util/minecraft/LangUtils.java | 150 + .../core/util/minecraft/MaterialUtils.java | 523 ++ .../core/util/minecraft/MiningUtils.java | 265 + .../core/util/minecraft/ModularArmourUtils.java | 161 + .../gtPlusPlus/core/util/minecraft/NBTUtils.java | 580 ++ .../core/util/minecraft/OreDictUtils.java | 25 + .../core/util/minecraft/PlayerUtils.java | 260 + .../core/util/minecraft/RecipeUtils.java | 803 +++ .../core/util/minecraft/ShapelessUtils.java | 56 + .../util/minecraft/gregtech/PollutionUtils.java | 305 + .../gregtech/material/MaterialBuilder.java | 244 + .../gregtech/recipehandlers/GregtechRecipe.java | 3 + .../core/util/minecraft/network/CustomPacket.java | 39 + .../core/util/minecraft/network/PacketBuilder.java | 25 + .../util/minecraft/network/PacketDispatcher.java | 88 + .../core/util/minecraft/network/PacketHandler.java | 71 + .../util/minecraft/network/PacketTileEntity.java | 79 + .../minecraft/particles/BlockBreakParticles.java | 18 + .../particles/EntityParticleFXMysterious.java | 17 + .../gtPlusPlus/core/util/player/PlayerCache.java | 160 + .../core/util/reflect/AddGregtechRecipe.java | 291 + .../gtPlusPlus/core/util/reflect/ProxyFinder.java | 55 + .../core/util/reflect/ReflectionUtils.java | 1090 +++ .../gtPlusPlus/core/util/sys/KeyboardUtils.java | 39 + src/main/java/gtPlusPlus/core/util/sys/Log.java | 24 + .../java/gtPlusPlus/core/util/sys/SystemUtils.java | 90 + .../core/world/damage/BaseCustomDamageSource.java | 22 + .../core/world/explosions/ExplosionHandler.java | 31 + .../core/world/explosions/MiningExplosion.java | 275 + .../everglades/GTplusplus_Everglades.java | 235 + .../everglades/biome/BiomeGenerator_Custom.java | 351 + .../everglades/biome/Biome_Everglades.java | 150 + .../everglades/biome/GenLayerBiomes.java | 31 + .../everglades/biome/GenLayerEverglades.java | 32 + .../everglades/block/BlockDarkWorldGround.java | 25 + .../block/BlockDarkWorldPollutedDirt.java | 74 + .../block/BlockDarkWorldPortalFrame.java | 30 + .../block/BlockDarkWorldSludgeFluid.java | 101 + .../everglades/block/BlockEvergladesPortal.java | 403 ++ .../everglades/block/DarkWorldContentLoader.java | 71 + .../everglades/chunk/ChunkProviderModded.java | 510 ++ .../everglades/dimension/Dimension_Everglades.java | 30 + .../everglades/gen/WorldGenDeadLilly.java | 28 + .../everglades/gen/WorldGenMinable_Custom.java | 90 + .../gtPlusPlus/everglades/gen/gt/WorldGen_GT.java | 49 + .../everglades/gen/gt/WorldGen_GT_Base.java | 471 ++ .../everglades/gen/gt/WorldGen_GT_Ore_Layer.java | 514 ++ .../everglades/gen/gt/WorldGen_Ores.java | 97 + .../everglades/item/ItemBlockToxicEverglades.java | 42 + .../item/ItemEvergladesPortalTrigger.java | 101 + .../gtPlusPlus/everglades/object/BoxedQuad.java | 56 + .../everglades/world/CustomWorldType.java | 59 + .../everglades/world/EvergladesPortalPosition.java | 14 + .../everglades/world/TeleporterDimensionMod.java | 471 ++ .../everglades/world/WorldChunkManagerCustom.java | 263 + .../everglades/world/WorldProviderMod.java | 71 + .../gtPlusPlus/nei/DecayableRecipeHandler.java | 264 + .../gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java | 942 +++ .../java/gtPlusPlus/nei/GT_NEI_FlotationCell.java | 100 + .../java/gtPlusPlus/nei/GT_NEI_FluidReactor.java | 195 + src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java | 118 + .../java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java | 372 + .../java/gtPlusPlus/nei/GT_NEI_MillingMachine.java | 136 + .../java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java | 58 + src/main/java/gtPlusPlus/nei/NEI_GT_Config.java | 100 + src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java | 51 + .../gtPlusPlus/nei/handlers/NeiTextureHandler.java | 164 + .../plugin/agrichem/AlgaeDefinition.java | 60 + .../gtPlusPlus/plugin/agrichem/AlgaeUtils.java | 11 + .../gtPlusPlus/plugin/agrichem/BioRecipes.java | 1425 ++++ .../gtPlusPlus/plugin/agrichem/Core_Agrichem.java | 70 + .../gtPlusPlus/plugin/agrichem/IAlgalItem.java | 12 + .../plugin/agrichem/block/AgrichemFluids.java | 88 + .../plugin/agrichem/fluids/FluidLoader.java | 21 + .../agrichem/item/algae/ItemAgrichemBase.java | 312 + .../plugin/agrichem/item/algae/ItemAlgaeBase.java | 235 + .../plugin/agrichem/item/algae/ItemBioChip.java | 238 + .../plugin/agrichem/logic/AlgaeGeneticData.java | 130 + .../agrichem/logic/AlgaeGrowthRequirement.java | 5 + .../gtPlusPlus/plugin/fishing/Core_Fishing.java | 54 + .../plugin/fishing/block/BlockFishEggs.java | 12 + .../gtPlusPlus/plugin/fishing/item/BaseFish.java | 119 + .../plugin/fishing/misc/BaseFishTypes.java | 140 + .../plugin/fixes/interfaces/IBugFix.java | 7 + .../plugin/fixes/vanilla/Core_VanillaFixes.java | 95 + .../fixes/vanilla/VanillaBackgroundMusicFix.java | 63 + .../plugin/fixes/vanilla/VanillaBedHeightFix.java | 82 + .../plugin/fixes/vanilla/music/MusicTocker.java | 130 + .../gtPlusPlus/plugin/manager/Core_Manager.java | 110 + .../plugin/sulfurchem/Core_SulfuricChemistry.java | 314 + .../plugin/villagers/Core_VillagerAdditions.java | 130 + .../gtPlusPlus/plugin/villagers/NameLists.java | 994 +++ .../plugin/villagers/VillagerEventHandler.java | 47 + .../plugin/villagers/VillagerObject.java | 40 + .../gtPlusPlus/plugin/villagers/VillagerUtils.java | 23 + .../villagers/block/BlockGenericSpawner.java | 60 + .../villagers/entity/EntityBaseVillager.java | 538 ++ .../villagers/entity/EntityNativeAustralian.java | 525 ++ .../villagers/entity/trade/BaseVillagerTrade.java | 32 + .../villagers/tile/MobSpawnerCustomLogic.java | 69 + .../villagers/tile/TileEntityGenericSpawner.java | 245 + .../villagers/trade/TradeHandlerAboriginal.java | 161 + .../plugin/villagers/trade/TradeHandlerBanker.java | 27 + .../plugin/villagers/trade/TradeHandlerBase.java | 25 + .../villagers/trade/TradeHandlerTechnician.java | 27 + .../plugin/villagers/trade/TradeHandlerTrader.java | 45 + .../gtPlusPlus/plugin/waila/Core_WailaPlugin.java | 59 + .../java/gtPlusPlus/preloader/CORE_Preloader.java | 33 + .../java/gtPlusPlus/preloader/ChunkDebugger.java | 54 + .../gtPlusPlus/preloader/CustomClassLoader.java | 57 + src/main/java/gtPlusPlus/preloader/DevHelper.java | 7139 ++++++++++++++++++++ .../gtPlusPlus/preloader/Preloader_GT_OreDict.java | 173 + .../gtPlusPlus/preloader/Preloader_Logger.java | 60 + .../java/gtPlusPlus/preloader/asm/AsmConfig.java | 211 + .../preloader/asm/ClassesToTransform.java | 74 + .../preloader/asm/Preloader_DummyContainer.java | 95 + .../preloader/asm/Preloader_FMLLoadingPlugin.java | 84 + .../preloader/asm/Preloader_SetupClass.java | 23 + .../preloader/asm/helpers/MethodHelper_CC.java | 28 + .../preloader/asm/helpers/MethodHelper_GT.java | 25 + .../ClassTransformer_CC_GuiContainerManager.java | 121 + ...ClassTransformer_COFH_OreDictionaryArbiter.java | 185 + .../ClassTransformer_Forge_ChunkLoading.java | 684 ++ ...ansformer_Forge_EntityLivingBase_SetHealth.java | 130 + .../ClassTransformer_GC_EntityAutoRocket.java | 527 ++ .../ClassTransformer_GC_FluidUtil.java | 242 + .../ClassTransformer_GC_FuelLoader.java | 622 ++ .../ClassTransformer_GT_Achievements.java | 1896 ++++++ .../ClassTransformer_GT_Achievements_CrashFix.java | 218 + .../ClassTransformer_GT_BaseMetaTileEntity.java | 158 + ...ransformer_GT_BlockMachines_MetaPipeEntity.java | 286 + .../ClassTransformer_GT_BlockMachines_NBT.java | 193 + .../ClassTransformer_GT_CharcoalPit.java | 184 + .../transformers/ClassTransformer_GT_Client.java | 410 ++ .../ClassTransformer_GT_EnergyHatchPatch.java | 317 + .../ClassTransformer_GT_ItemMachines_Tooltip.java | 139 + .../ClassTransformer_GT_MetaGenerated_Tool.java | 116 + .../ClassTransformer_GT_Packet_TileEntity.java | 319 + .../transformers/ClassTransformer_GT_Utility.java | 283 + .../ClassTransformer_IC2_GetHarvestTool.java | 214 + .../transformers/ClassTransformer_IC2_Hazmat.java | 147 + .../ClassTransformer_LWJGL_Keyboard.java | 278 + ...assTransformer_Railcraft_FluidCartHandling.java | 117 + .../ClassTransformer_Railcraft_FluidHelper.java | 695 ++ .../ClassTransformer_Railcraft_InvTools.java | 235 + .../ClassTransformer_TC_ItemWispEssence.java | 278 + .../ClassTransformer_TT_ThaumicRestorer.java | 611 ++ .../transformers/ClassTransformer_TiConFluids.java | 164 + .../transformers/Preloader_ClassTransformer.java | 79 + .../transformers/Preloader_ClassTransformer2.java | 16 + .../Preloader_Transformer_Handler.java | 286 + .../preloader/keyboard/BetterKeyboard.java | 132 + .../xmod/bartcrops/HANDLER_CropsPlusPlus.java | 21 + .../xmod/bartcrops/LoaderOfTheCrops.java | 109 + .../bartcrops/abstracts/BaseAestheticCrop.java | 37 + .../xmod/bartcrops/abstracts/BaseCrop.java | 56 + .../bartcrops/abstracts/BaseHarvestableCrop.java | 69 + .../gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java | 56 + .../gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java | 181 + .../xmod/bop/blocks/BOP_Block_Registrator.java | 198 + .../xmod/bop/blocks/base/LeavesBase.java | 109 + .../gtPlusPlus/xmod/bop/blocks/base/LogBase.java | 86 + .../xmod/bop/blocks/base/SaplingBase.java | 198 + .../xmod/bop/blocks/pine/LeavesPineTree.java | 36 + .../xmod/bop/blocks/pine/LogPineTree.java | 24 + .../xmod/bop/blocks/pine/SaplingPineTree.java | 55 + .../blocks/rainforest/LeavesRainforestTree.java | 26 + .../bop/blocks/rainforest/LogRainforestTree.java | 24 + .../blocks/rainforest/SaplingRainforestTree.java | 66 + .../xmod/bop/creative/MiscUtilsBOPTab.java | 20 + .../bop/world/features/trees/WorldGenPineTree.java | 171 + .../features/trees/WorldGenRainForestTree_Ex.java | 246 + .../java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java | 15 + .../xmod/computronics/HANDLER_Computronics.java | 39 + .../xmod/eio/handler/HandlerTooltip_EIO.java | 87 + .../gtPlusPlus/xmod/eio/material/MaterialEIO.java | 121 + .../java/gtPlusPlus/xmod/forestry/HANDLER_FR.java | 61 + .../forestry/bees/blocks/BlockDenseBeeHouse.java | 24 + .../forestry/bees/blocks/FR_BlockRegistry.java | 26 + .../xmod/forestry/bees/custom/CustomCombs.java | 119 + .../forestry/bees/custom/GTPP_Bee_Definition.java | 876 +++ .../xmod/forestry/bees/custom/GTPP_Bees.java | 195 + .../bees/custom/GTPP_Branch_Definition.java | 80 + .../xmod/forestry/bees/custom/ItemCustomComb.java | 181 + .../xmod/forestry/bees/gui/ContainerBeeHouse.java | 43 + .../xmod/forestry/bees/gui/GuiBeeHouse.java | 53 + .../bees/inventory/InventoryDenseBeeHouse.java | 94 + .../xmod/forestry/bees/items/FR_CustomBee.java | 5 + .../xmod/forestry/bees/items/FR_ItemRegistry.java | 107 + .../xmod/forestry/bees/items/FR_StringUtil.java | 24 + .../xmod/forestry/bees/items/MB_FrameType.java | 126 + .../xmod/forestry/bees/items/MB_ItemFrame.java | 143 + .../forestry/bees/recipe/FR_Gregtech_Recipes.java | 129 + .../bees/tileentities/TileDenseBeeHouse.java | 92 + .../xmod/galacticraft/HANDLER_GalactiCraft.java | 34 + .../galacticraft/handler/HandlerTooltip_GC.java | 83 + .../xmod/galacticraft/util/GalacticUtils.java | 169 + .../java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 612 ++ .../xmod/gregtech/api/energy/IC2ElectricItem.java | 55 + .../api/energy/IC2ElectricItemManager.java | 95 + .../xmod/gregtech/api/enums/CustomGtTextures.java | 81 + .../xmod/gregtech/api/enums/CustomOrePrefix.java | 112 + .../xmod/gregtech/api/enums/GregtechItemList.java | 903 +++ .../gregtech/api/enums/GregtechOreDictNames.java | 39 + .../gregtech/api/enums/GregtechOrePrefixes.java | 941 +++ .../gregtech/api/enums/GregtechTextureSet.java | 144 + .../xmod/gregtech/api/enums/GregtechTextures.java | 203 + .../gregtech/api/enums/GregtechToolDictNames.java | 7 + .../gregtech/api/gui/CONTAINER_AdvancedBoiler.java | 93 + .../xmod/gregtech/api/gui/CONTAINER_Cyclotron.java | 37 + .../gregtech/api/gui/CONTAINER_DeluxeTank.java | 80 + .../api/gui/CONTAINER_Hatch_Muffler_Advanced.java | 51 + .../api/gui/CONTAINER_IndustrialCentrifuge.java | 39 + .../api/gui/CONTAINER_IronBlastFurnace.java | 32 + .../xmod/gregtech/api/gui/CONTAINER_MatterFab.java | 42 + .../api/gui/CONTAINER_MetaTileMachineLong.java | 244 + .../gregtech/api/gui/CONTAINER_MultiMachine.java | 283 + .../CONTAINER_MultiMachine_NoPlayerInventory.java | 27 + .../api/gui/CONTAINER_PowerSubStation.java | 41 + .../xmod/gregtech/api/gui/CONTAINER_SafeBlock.java | 124 + .../gregtech/api/gui/CONTAINER_SolarGenerator.java | 85 + .../gregtech/api/gui/CONTAINER_SteamCondenser.java | 99 + .../gregtech/api/gui/CONTAINER_SuperChest.java | 78 + .../gregtech/api/gui/CONTAINER_TreeFarmer.java | 71 + .../xmod/gregtech/api/gui/GUI_AdvancedBoiler.java | 44 + .../xmod/gregtech/api/gui/GUI_Cyclotron.java | 44 + .../xmod/gregtech/api/gui/GUI_DeluxeTank.java | 37 + .../api/gui/GUI_Hatch_Muffler_Advanced.java | 46 + .../gregtech/api/gui/GUI_IndustrialCentrifuge.java | 73 + .../gregtech/api/gui/GUI_IronBlastFurnace.java | 32 + .../xmod/gregtech/api/gui/GUI_MatterFab.java | 81 + .../xmod/gregtech/api/gui/GUI_MultiMachine.java | 296 + .../gregtech/api/gui/GUI_MultiMachine_Default.java | 68 + .../gregtech/api/gui/GUI_Multi_Basic_Slotted.java | 88 + .../xmod/gregtech/api/gui/GUI_PowerSubStation.java | 175 + .../xmod/gregtech/api/gui/GUI_SafeBlock.java | 51 + .../xmod/gregtech/api/gui/GUI_SolarGenerator.java | 44 + .../xmod/gregtech/api/gui/GUI_SteamCondenser.java | 56 + .../xmod/gregtech/api/gui/GUI_SuperChest.java | 38 + .../xmod/gregtech/api/gui/GUI_TreeFarmer.java | 46 + .../api/gui/basic/CONTAINER_PollutionCleaner.java | 105 + .../api/gui/basic/GUI_PollutionCleaner.java | 65 + .../gui/fluidreactor/Container_FluidReactor.java | 184 + .../api/gui/fluidreactor/GUI_FluidReactor.java | 122 + .../api/gui/hatches/CONTAINER_1by1_Turbine.java | 60 + .../gregtech/api/gui/hatches/CONTAINER_2by2.java | 32 + .../gregtech/api/gui/hatches/CONTAINER_4by4.java | 44 + .../gui/hatches/CONTAINER_HatchNbtConsumable.java | 282 + .../gregtech/api/gui/hatches/GUI_1by1_Turbine.java | 36 + .../xmod/gregtech/api/gui/hatches/GUI_2by2.java | 36 + .../xmod/gregtech/api/gui/hatches/GUI_4by4.java | 36 + .../api/gui/hatches/GUI_HatchNbtConsumable.java | 59 + .../hatches/charge/CONTAINER_Electric_2by2.java | 24 + .../hatches/charge/CONTAINER_Electric_4by4.java | 37 + .../api/gui/hatches/charge/GUI_Electric_2by2.java | 21 + .../api/gui/hatches/charge/GUI_Electric_4by4.java | 22 + .../api/gui/power/CONTAINER_BasicTank.java | 69 + .../xmod/gregtech/api/gui/power/GUI_BasicTank.java | 36 + .../api/interfaces/GregtechItemContainer.java | 24 + .../xmod/gregtech/api/interfaces/IHeatEntity.java | 26 + .../xmod/gregtech/api/interfaces/IHeatSink.java | 13 + .../api/interfaces/IMetaTileEntityHeatPipe.java | 14 + .../interfaces/internal/IGregtech_RecipeAdder.java | 343 + .../internal/Interface_IconContainer.java | 21 + .../internal/Interface_ItemBehaviour.java | 42 + .../internal/Interface_OreRecipeRegistrator.java | 21 + .../Interface_OreRecipeRegistrator_GT.java | 18 + .../api/interfaces/internal/Interface_Texture.java | 20 + .../interfaces/internal/Interface_ToolStats.java | 193 + .../gregtech/api/items/Gregtech_Generic_Item.java | 192 + .../xmod/gregtech/api/items/Gregtech_MetaItem.java | 345 + .../gregtech/api/items/Gregtech_MetaItem_Base.java | 675 ++ .../gregtech/api/items/Gregtech_MetaItem_X32.java | 243 + .../xmod/gregtech/api/items/Gregtech_MetaTool.java | 503 ++ .../gregtech/api/items/tools/GT_MetaGenTool.java | 546 ++ .../gregtech/api/items/types/ToolType_Base.java | 85 + .../api/items/types/ToolType_HardHammer.java | 125 + .../gregtech/api/items/types/ToolType_Pump.java | 150 + .../gregtech/api/items/types/ToolType_Wrench.java | 150 + .../api/metatileentity/BaseCustomTileEntity.java | 197 + .../custom/power/BaseCustomPower_MTE.java | 280 + .../power/GTPP_MTE_BasicLosslessGenerator.java | 313 + .../custom/power/GTPP_MTE_BasicMachine.java | 860 +++ .../custom/power/GTPP_MTE_BasicTank.java | 266 + .../custom/power/GTPP_MTE_TieredMachineBlock.java | 100 + .../custom/power/MetaTileEntityCustomPower.java | 91 + .../GT_MetaTileEntity_BasicBreaker.java | 283 + ...GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java | 38 + .../GT_MetaTileEntity_Dehydrator.java | 163 + .../GT_MetaTileEntity_DeluxeMachine.java | 862 +++ .../GT_MetaTileEntity_DeluxeTank.java | 345 + .../GT_MetaTileEntity_Hatch_AirIntake.java | 290 + .../GT_MetaTileEntity_Hatch_ControlCore.java | 148 + .../GT_MetaTileEntity_Hatch_DynamoBuffer.java | 84 + ...etaTileEntity_Hatch_ElementalDataOrbHolder.java | 149 + .../GT_MetaTileEntity_Hatch_Energy_RTG.java | 287 + .../GT_MetaTileEntity_Hatch_InputBattery.java | 258 + .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 329 + .../GT_MetaTileEntity_Hatch_Naquadah.java | 208 + .../GT_MetaTileEntity_Hatch_OutputBattery.java | 236 + .../GT_MetaTileEntity_Hatch_Plasma.java | 219 + .../GT_MetaTileEntity_Hatch_Steam_BusInput.java | 234 + .../GT_MetaTileEntity_Hatch_Steam_BusOutput.java | 175 + .../GT_MetaTileEntity_Hatch_Turbine.java | 316 + .../GT_MetaTileEntity_Hatch_TurbineProvider.java | 220 + .../GT_MetaTileEntity_SuperBus_Input.java | 230 + .../GT_MetaTileEntity_SuperBus_Output.java | 180 + .../GregtechMetaPipeEntityFluid.java | 119 + .../GregtechMetaPipeEntity_Cable.java | 165 + .../GregtechMetaTreeFarmerStructural.java | 56 + .../implementations/base/CustomMetaTileBase.java | 60 + .../GT_MetaTileEntity_Hatch_CustomFluidBase.java | 131 + .../base/GregtechMetaPipeEntityBase_Cable.java | 468 ++ .../base/GregtechMetaTileEntity.java | 77 + .../base/GregtechMetaTransformerHiAmp.java | 115 + .../base/GregtechMeta_MultiBlockBase.java | 2656 ++++++++ .../base/GregtechMeta_SteamMultiBase.java | 796 +++ .../GregtechDoubleFuelGeneratorBase.java | 428 ++ .../base/generators/GregtechMetaBoilerBase.java | 382 ++ .../generators/GregtechMetaSolarGenerator.java | 215 + .../GregtechRocketFuelGeneratorBase.java | 372 + .../base/machines/GregtechMetaSafeBlockBase.java | 291 + .../base/machines/GregtechMetaTreeFarmerBase.java | 176 + .../GT_MetaTileEntity_Hatch_Catalysts.java | 71 + .../GT_MetaTileEntity_Hatch_MillingBalls.java | 71 + .../GT_MetaTileEntity_Hatch_NbtConsumable.java | 273 + .../xmod/gregtech/api/objects/GregtechFluid.java | 28 + .../gregtech/api/objects/GregtechItemData.java | 144 + .../api/objects/GregtechMaterialStack.java | 49 + .../gregtech/api/objects/MultiblockBlueprint.java | 469 ++ .../xmod/gregtech/api/objects/MultiblockLayer.java | 643 ++ .../api/objects/MultiblockRequirements.java | 108 + .../ProcessingSkookumChoocherToolRecipes.java | 22 + .../xmod/gregtech/api/util/GTPP_Config.java | 100 + .../api/util/GregtechOreDictUnificator.java | 402 ++ .../api/util/SpecialBehaviourTooltipHandler.java | 35 + .../xmod/gregtech/api/world/GTPP_Worldgen.java | 61 + .../gregtech/api/world/GTPP_Worldgen_Boulder.java | 77 + .../api/world/GTPP_Worldgen_GT_Ore_Layer.java | 167 + .../gregtech/api/world/GTPP_Worldgen_Handler.java | 41 + .../xmod/gregtech/api/world/GTPP_Worldgen_Ore.java | 33 + .../api/world/GTPP_Worldgen_Ore_Normal.java | 75 + .../xmod/gregtech/api/world/GT_OreVein_Object.java | 31 + .../xmod/gregtech/api/world/WorldGenUtils.java | 23 + .../xmod/gregtech/common/Meta_GT_Proxy.java | 631 ++ .../xmod/gregtech/common/StaticFields59.java | 303 + .../common/blocks/GTPP_Block_Machines.java | 534 ++ .../gregtech/common/blocks/GTPP_Item_Machines.java | 229 + .../common/blocks/GregtechMetaCasingBlocks.java | 78 + .../common/blocks/GregtechMetaCasingBlocks2.java | 89 + .../common/blocks/GregtechMetaCasingBlocks3.java | 366 + .../common/blocks/GregtechMetaCasingBlocks4.java | 115 + .../common/blocks/GregtechMetaCasingBlocks5.java | 83 + .../blocks/GregtechMetaCasingBlocksAbstract.java | 150 + .../common/blocks/GregtechMetaCasingItems.java | 10 + .../common/blocks/GregtechMetaItemCasings1.java | 36 + .../blocks/GregtechMetaItemCasingsAbstract.java | 61 + .../blocks/GregtechMetaSpecialMachineCasings.java | 81 + .../blocks/GregtechMetaSpecialMultiCasings.java | 103 + .../blocks/GregtechMetaTieredCasingBlocks1.java | 110 + .../common/blocks/fluid/GregtechFluidHandler.java | 111 + .../blocks/textures/CasingTextureHandler.java | 82 + .../blocks/textures/CasingTextureHandler2.java | 57 + .../blocks/textures/CasingTextureHandler3.java | 68 + .../textures/TexturesCentrifugeMultiblock.java | 166 + .../common/blocks/textures/TexturesGregtech58.java | 443 ++ .../common/blocks/textures/TexturesGregtech59.java | 444 ++ .../blocks/textures/TexturesGrinderMultiblock.java | 150 + .../common/blocks/textures/TexturesGtBlock.java | 652 ++ .../blocks/textures/TexturesGtCutomCovers.java | 32 + .../common/blocks/textures/TexturesGtTools.java | 61 + .../turbine/LargeTurbineTextureHandler.java | 318 + .../common/blueprint/Blueprint_Generic_3x3.java | 87 + .../gregtech/common/blueprint/Blueprint_LFTR.java | 137 + .../xmod/gregtech/common/covers/CoverManager.java | 102 + .../common/covers/GTPP_Cover_Overflow.java | 247 + .../common/covers/GTPP_Cover_Overflow_Item.java | 182 + .../common/covers/GTPP_Cover_ToggleVisual.java | 186 + .../gregtech/common/helpers/ChargingHelper.java | 429 ++ .../gregtech/common/helpers/CraftingHelper.java | 42 + .../common/helpers/FlotationRecipeHandler.java | 79 + .../gregtech/common/helpers/GT_MethodHelper.java | 80 + .../common/helpers/MachineUpdateHandler.java | 42 + .../gregtech/common/helpers/TreeFarmHelper.java | 1033 +++ .../common/helpers/VolumetricFlaskHelper.java | 188 + .../helpers/autocrafter/AC_Helper_Container.java | 118 + .../helpers/autocrafter/AC_Helper_Utils.java | 80 + .../common/helpers/tesseract/TesseractHelper.java | 263 + .../common/helpers/treefarm/TreeGenerator.java | 386 ++ .../gregtech/common/items/MetaCustomCoverItem.java | 225 + .../common/items/MetaGeneratedGregtechItems.java | 453 ++ .../common/items/MetaGeneratedGregtechTools.java | 101 + .../items/behaviours/Behaviour_Choocher.java | 88 + .../behaviours/Behaviour_Electric_Lighter.java | 220 + .../common/items/behaviours/Behaviour_Grinder.java | 94 + .../items/behaviours/Behaviour_Prospecting_Ex.java | 123 + .../common/items/covers/MetaItemCoverCasings.java | 40 + .../gregtech/common/render/GTPP_CapeRenderer.java | 517 ++ .../gregtech/common/render/GTPP_FlaskRenderer.java | 94 + .../common/render/GTPP_Render_MachineBlock.java | 659 ++ .../requirements/RequirementsBasicCubic.java | 11 + .../GT_MetaTileEntity_TesseractGenerator.java | 730 ++ .../GT_MetaTileEntity_TesseractTerminal.java | 581 ++ .../generators/GT_MetaTileEntity_Boiler_Base.java | 296 + .../generators/GT_MetaTileEntity_Boiler_HV.java | 56 + .../generators/GT_MetaTileEntity_Boiler_LV.java | 52 + .../generators/GT_MetaTileEntity_Boiler_MV.java | 52 + .../generators/GT_MetaTileEntity_Boiler_Solar.java | 194 + .../generators/GT_MetaTileEntity_RfConvertor.java | 348 + .../GT_MetaTileEntity_SemiFluidGenerator.java | 171 + ...gtechMetaTileEntityDoubleFuelGeneratorBase.java | 153 + .../GregtechMetaTileEntityGeothermalGenerator.java | 151 + .../GregtechMetaTileEntityRocketFuelGenerator.java | 142 + .../GregtechMetaTileEntitySolarGenerator.java | 187 + .../generators/GregtechMetaTileEntity_RTG.java | 390 ++ .../GT_MetaTileEntity_ULV_CombustionGenerator.java | 50 + .../ULV/GT_MetaTileEntity_ULV_GasTurbine.java | 59 + .../ULV/GT_MetaTileEntity_ULV_SteamTurbine.java | 58 + .../creative/GregtechMetaCreativeEnergyBuffer.java | 229 + .../basic/GT_MetaTileEntity_WorldAccelerator.java | 328 + .../GregtechMetaAtmosphericReconditioner.java | 789 +++ .../machines/basic/GregtechMetaCondensor.java | 174 + .../basic/GregtechMetaGarbageCollector.java | 323 + .../basic/GregtechMetaPollutionCreator.java | 386 ++ .../basic/GregtechMetaPollutionDetector.java | 439 ++ .../basic/GregtechMetaTileEntityChunkLoader.java | 394 ++ ...GregtechMetaTileEntityThaumcraftResearcher.java | 204 + .../basic/GregtechMetaTileEntity_BasicWasher.java | 71 + .../GregtechMetaTileEntity_ChemicalReactor.java | 666 ++ ...regtechMetaTileEntity_CompactFusionReactor.java | 702 ++ .../basic/GregtechMetaTileEntity_PocketFusion.java | 704 ++ .../GregtechMetaTileEntity_ReactorColdTrap.java | 67 + ...egtechMetaTileEntity_ReactorProcessingUnit.java | 67 + .../basic/GregtechMetaWirelessCharger.java | 560 ++ .../machines/multi/misc/GMTE_AmazonPackager.java | 323 + .../multi/misc/GregtechMTE_TeslaTower.java | 479 ++ ...gtechMetaTileEntity_IndustrialAlloySmelter.java | 403 ++ ...regtechMetaTileEntity_IndustrialArcFurnace.java | 320 + ...regtechMetaTileEntity_IndustrialCentrifuge.java | 263 + .../GregtechMetaTileEntity_IndustrialCokeOven.java | 230 + ...echMetaTileEntity_IndustrialCuttingMachine.java | 234 + ...regtechMetaTileEntity_IndustrialDehydrator.java | 415 ++ ...gtechMetaTileEntity_IndustrialElectrolyzer.java | 193 + .../GregtechMetaTileEntity_IndustrialExtruder.java | 260 + ...GregtechMetaTileEntity_IndustrialMacerator.java | 259 + .../GregtechMetaTileEntity_IndustrialMixer.java | 257 + ...gtechMetaTileEntity_IndustrialMultiMachine.java | 541 ++ ...regtechMetaTileEntity_IndustrialPlatePress.java | 242 + .../GregtechMetaTileEntity_IndustrialSifter.java | 225 + .../GregtechMetaTileEntity_IndustrialSinter.java | 268 + ...MetaTileEntity_IndustrialThermalCentrifuge.java | 224 + ...techMetaTileEntity_IndustrialVacuumFreezer.java | 261 + ...GregtechMetaTileEntity_IndustrialWashPlant.java | 335 + .../GregtechMetaTileEntity_IndustrialWireMill.java | 206 + .../GregtechMetaTileEntity_IronBlastFurnace.java | 403 ++ .../processing/GregtechMetaTileEntity_IsaMill.java | 666 ++ .../GregtechMetaTileEntity_SpargeTower.java | 414 ++ .../GregtechMetaTileEntity_Adv_AssemblyLine.java | 629 ++ ...egtechMetaTileEntity_Adv_DistillationTower.java | 481 ++ .../advanced/GregtechMetaTileEntity_Adv_EBF.java | 484 ++ .../GregtechMetaTileEntity_Adv_Fusion_MK4.java | 153 + .../GregtechMetaTileEntity_Adv_Implosion.java | 207 + .../GregtechMetaTileEntity_SteamMacerator.java | 165 + .../multi/production/GT4Entity_AutoCrafter.java | 656 ++ .../multi/production/GT4Entity_ThermalBoiler.java | 354 + .../GregtechMTE_ElementalDuplicator.java | 744 ++ .../production/GregtechMTE_FastNeutronReactor.java | 231 + .../production/GregtechMTE_FrothFlotationCell.java | 449 ++ .../production/GregtechMTE_LargeNaqReactor.java | 501 ++ .../production/GregtechMTE_MiniFusionPlant.java | 386 ++ .../production/GregtechMTE_NuclearReactor.java | 523 ++ .../GregtechMetaTileEntityGeneratorArray.java | 521 ++ .../production/GregtechMetaTileEntityTreeFarm.java | 332 + .../GregtechMetaTileEntity_AlloyBlastSmelter.java | 336 + .../GregtechMetaTileEntity_Cyclotron.java | 481 ++ ...egtechMetaTileEntity_IndustrialFishingPond.java | 623 ++ .../GregtechMetaTileEntity_LargeRocketEngine.java | 629 ++ ...techMetaTileEntity_LargeSemifluidGenerator.java | 341 + .../GregtechMetaTileEntity_MassFabricator.java | 425 ++ .../GregtechMetaTileEntity_Refinery.java | 238 + .../GregtechMetaTileEntity_SolarTower.java | 702 ++ .../algae/GregtechMTE_AlgaePondBase.java | 486 ++ ...gtechMetaTileEntity_BedrockMiningPlatform1.java | 46 + ...gtechMetaTileEntity_BedrockMiningPlatform2.java | 46 + ...chMetaTileEntity_BedrockMiningPlatformBase.java | 683 ++ .../chemplant/GregtechMTE_ChemicalPlant.java | 1046 +++ .../turbines/GT_MTE_LargeTurbine_SHSteam.java | 179 + .../turbines/GT_MTE_LargeTurbine_Steam.java | 189 + .../GregtechMetaTileEntity_LargerTurbineBase.java | 663 ++ .../storage/GregtechMetaTileEntity_MultiTank.java | 621 ++ ...chMetaTileEntity_PowerSubStationController.java | 657 ++ .../tileentities/misc/TileEntitySolarHeater.java | 348 + .../GT_MetaTileEntity_ConnectableCrate.java | 574 ++ .../storage/GT_MetaTileEntity_TieredChest.java | 199 + .../storage/GT_MetaTileEntity_TieredTank.java | 160 + .../storage/GregtechMetaEnergyBuffer.java | 421 ++ .../storage/GregtechMetaSafeBlock.java | 62 + .../GT_MetaTileEntity_InfiniteItemHolder.java | 105 + .../storage/shelving/GT4Entity_Shelf.java | 359 + .../shelving/GT4Entity_Shelf_Compartment.java | 39 + .../storage/shelving/GT4Entity_Shelf_Desk.java | 45 + .../shelving/GT4Entity_Shelf_FileCabinet.java | 55 + .../storage/shelving/GT4Entity_Shelf_Iron.java | 41 + .../storage/shelving/GT4Entity_Shelf_Large.java | 266 + .../common/tools/TOOL_Gregtech_AngleGrinder.java | 199 + .../gregtech/common/tools/TOOL_Gregtech_Base.java | 180 + .../common/tools/TOOL_Gregtech_Choocher.java | 196 + .../tools/TOOL_Gregtech_ElectricButcherKnife.java | 192 + .../tools/TOOL_Gregtech_ElectricLighter.java | 166 + .../common/tools/TOOL_Gregtech_ElectricSnips.java | 97 + .../xmod/gregtech/loaders/GT_Material_Loader.java | 290 + .../xmod/gregtech/loaders/Gregtech_Blocks.java | 22 + .../gregtech/loaders/ProcessingAngleGrinder.java | 135 + .../loaders/ProcessingElectricButcherKnife.java | 134 + .../loaders/ProcessingElectricLighter.java | 131 + .../gregtech/loaders/ProcessingElectricSnips.java | 130 + .../loaders/ProcessingToolHeadChoocher.java | 92 + .../loaders/Processing_Textures_Items.java | 11 + .../gregtech/loaders/RecipeGen_AlloySmelter.java | 66 + .../xmod/gregtech/loaders/RecipeGen_Assembler.java | 81 + .../xmod/gregtech/loaders/RecipeGen_Base.java | 16 + .../gregtech/loaders/RecipeGen_BlastSmelter.java | 280 + .../loaders/RecipeGen_BlastSmelterGT_Ex.java | 153 + .../loaders/RecipeGen_BlastSmelterGT_GTNH.java | 215 + .../gregtech/loaders/RecipeGen_DustGeneration.java | 444 ++ .../xmod/gregtech/loaders/RecipeGen_Extruder.java | 176 + .../gregtech/loaders/RecipeGen_FluidCanning.java | 230 + .../xmod/gregtech/loaders/RecipeGen_Fluids.java | 298 + .../loaders/RecipeGen_MaterialProcessing.java | 274 + .../gregtech/loaders/RecipeGen_MetalRecipe.java | 119 + .../RecipeGen_MultisUsingFluidInsteadOfCells.java | 187 + .../xmod/gregtech/loaders/RecipeGen_Ore.java | 573 ++ .../xmod/gregtech/loaders/RecipeGen_Plasma.java | 42 + .../xmod/gregtech/loaders/RecipeGen_Plates.java | 154 + .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 373 + .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 264 + .../loaders/misc/AddCustomMachineToPA.java | 51 + .../gregtech/loaders/misc/AssLineAchievements.java | 180 + .../loaders/recipe/RecipeLoader_AlgaeFarm.java | 207 + .../gregtech/loaders/recipe/RecipeLoader_GTNH.java | 22 + .../gregtech/loaders/recipe/RecipeLoader_LFTR.java | 173 + .../loaders/recipe/RecipeLoader_Nuclear.java | 695 ++ .../recipe/RecipeLoader_NuclearFuelProcessing.java | 372 + .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 1851 +++++ .../xmod/gregtech/recipes/RecipesToRemove.java | 57 + .../machines/RECIPEHANDLER_AssemblyLine.java | 20 + .../recipes/machines/RECIPEHANDLER_CokeOven.java | 47 + .../recipes/machines/RECIPEHANDLER_Dehydrator.java | 82 + .../machines/RECIPEHANDLER_MatterFabricator.java | 55 + .../registration/gregtech/Gregtech4Content.java | 85 + .../gregtech/GregtechAdvancedBoilers.java | 104 + .../gregtech/GregtechAdvancedMixer.java | 132 + .../gregtech/GregtechAlgaeContent.java | 55 + .../gregtech/GregtechAmazonWarehouse.java | 21 + .../gregtech/GregtechBedrockPlatforms.java | 18 + .../gregtech/GregtechBufferDynamos.java | 64 + .../gregtech/GregtechComponentAssembler.java | 532 ++ .../registration/gregtech/GregtechConduits.java | 698 ++ .../gregtech/GregtechCustomHatches.java | 217 + .../registration/gregtech/GregtechCyclotron.java | 22 + .../registration/gregtech/GregtechDehydrator.java | 193 + .../gregtech/GregtechEnergyBuffer.java | 94 + .../GregtechFactoryGradeReplacementMultis.java | 35 + .../gregtech/GregtechFluidReactor.java | 25 + .../registration/gregtech/GregtechGeneratorsULV | 15 + .../gregtech/GregtechGeneratorsULV.java | 26 + .../GregtechGeothermalThermalGenerator.java | 68 + .../gregtech/GregtechHiAmpTransformer.java | 158 + .../gregtech/GregtechIndustrialAlloySmelter.java | 22 + .../gregtech/GregtechIndustrialArcFurnace.java | 22 + .../gregtech/GregtechIndustrialBlastSmelter.java | 26 + .../gregtech/GregtechIndustrialCentrifuge.java | 26 + .../gregtech/GregtechIndustrialCokeOven.java | 26 + .../gregtech/GregtechIndustrialCuttingFactory.java | 25 + .../gregtech/GregtechIndustrialElectrolyzer.java | 26 + .../GregtechIndustrialElementDuplicator.java | 20 + .../gregtech/GregtechIndustrialExtruder.java | 26 + .../gregtech/GregtechIndustrialFishPond.java | 24 + .../gregtech/GregtechIndustrialFuelRefinery.java | 26 + .../gregtech/GregtechIndustrialGeneratorArray.java | 26 + .../gregtech/GregtechIndustrialMacerator.java | 26 + .../gregtech/GregtechIndustrialMassFabricator.java | 230 + .../gregtech/GregtechIndustrialMixer.java | 27 + .../gregtech/GregtechIndustrialMultiMachine.java | 25 + .../gregtech/GregtechIndustrialMultiTank.java | 32 + .../gregtech/GregtechIndustrialPlatePress.java | 26 + .../gregtech/GregtechIndustrialSifter.java | 26 + .../GregtechIndustrialThermalCentrifuge.java | 25 + .../gregtech/GregtechIndustrialTreeFarm.java | 28 + .../gregtech/GregtechIndustrialWashPlant.java | 25 + .../gregtech/GregtechIndustrialWiremill.java | 25 + .../gregtech/GregtechIronBlastFurnace.java | 24 + .../registration/gregtech/GregtechIsaMill.java | 23 + .../registration/gregtech/GregtechLFTR.java | 36 + .../GregtechLargeTurbinesAndHeatExchanger.java | 22 + .../gregtech/GregtechMiniRaFusion.java | 45 + .../registration/gregtech/GregtechNaqReactor.java | 24 + .../gregtech/GregtechNitroDieselFix.java | 182 + .../gregtech/GregtechPollutionDevices.java | 57 + .../gregtech/GregtechPowerBreakers.java | 42 + .../gregtech/GregtechPowerSubStation.java | 43 + .../registration/gregtech/GregtechRTG.java | 22 + .../gregtech/GregtechRocketFuelGenerator.java | 128 + .../registration/gregtech/GregtechSafeBlock.java | 118 + .../gregtech/GregtechSemiFluidgenerators.java | 20 + .../gregtech/GregtechSimpleWasher.java | 109 + .../gregtech/GregtechSolarGenerators.java | 49 + .../registration/gregtech/GregtechSolarTower.java | 32 + .../gregtech/GregtechSteamCondenser.java | 26 + .../registration/gregtech/GregtechSteamMultis.java | 22 + .../registration/gregtech/GregtechSuperChests.java | 73 + .../gregtech/GregtechSuperConductionPoint.java | 19 + .../registration/gregtech/GregtechTeslaTower.java | 17 + .../gregtech/GregtechThaumcraftDevices.java | 26 + .../gregtech/GregtechThreadedBuffers.java | 136 + .../gregtech/GregtechTieredChunkloaders.java | 28 + .../gregtech/GregtechTieredFluidTanks.java | 58 + .../gregtech/GregtechTreeFarmerTE.java | 22 + .../gregtech/GregtechWirelessChargers.java | 48 + .../gregtech/NewHorizonsAccelerator.java | 99 + .../gtPlusPlus/xmod/growthcraft/HANDLER_GC.java | 26 + .../xmod/growthcraft/fishtrap/FishTrapHandler.java | 232 + .../xmod/growthcraft/fishtrap/Growthcraft_New.java | 86 + .../xmod/growthcraft/fishtrap/Growthcraft_Old.java | 86 + .../gtPlusPlus/xmod/ic2/CustomInternalName.java | 22 + src/main/java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java | 28 + .../xmod/ic2/block/RTGGenerator/BlockRTG.java | 208 + .../xmod/ic2/block/RTGGenerator/TileEntityRTG.java | 88 + .../ic2/block/RTGGenerator/gui/CONTAINER_RTG.java | 37 + .../xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java | 52 + .../kieticgenerator/IC2_BlockKineticGenerator.java | 77 + .../ic2/block/kieticgenerator/IC2_TEComponent.java | 48 + .../container/ContainerKineticWindgenerator.java | 28 + .../container/IC2_ContainerBase.java | 5 + .../gui/GuiKineticWindGenerator.java | 78 + .../tileentity/TileEntityKineticWindGenerator.java | 389 ++ .../xmod/ic2/item/CustomKineticRotor.java | 276 + .../gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java | 43 + .../xmod/ic2/item/IC2_ItemGradualInteger.java | 54 + .../java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java | 106 + .../java/gtPlusPlus/xmod/ic2/item/IC2_Items.java | 60 + .../gtPlusPlus/xmod/ic2/item/ItemGenerators.java | 55 + .../java/gtPlusPlus/xmod/ic2/item/RotorBase.java | 100 + .../gtPlusPlus/xmod/ic2/item/RotorIridium.java | 127 + .../xmod/ic2/item/reactor/IC2_FuelRod_Base.java | 52 + .../gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java | 326 + .../gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java | 277 + .../java/gtPlusPlus/xmod/ob/GliderHandler.java | 127 + .../gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java | 38 + .../java/gtPlusPlus/xmod/ob/SprinklerHandler.java | 66 + .../xmod/railcraft/HANDLER_Railcraft.java | 83 + .../xmod/railcraft/utils/RailcraftUtils.java | 13 + .../xmod/reliquary/HANDLER_Reliquary.java | 26 + .../xmod/reliquary/item/ReliquaryItems.java | 160 + .../xmod/reliquary/util/AlkahestRecipeWrapper.java | 47 + .../reliquary/util/ReliquaryRecipeHandler.java | 56 + src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java | 21 + .../xmod/sc2/modules/ModuleExoticSeeds.java | 117 + .../gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java | 61 + .../xmod/thaumcraft/HANDLER_Thaumcraft.java | 59 + .../xmod/thaumcraft/aspect/GTPP_AspectCompat.java | 200 + .../xmod/thaumcraft/aspect/GTPP_AspectStack.java | 15 + .../thaumcraft/commands/CommandDumpAspects.java | 90 + .../thaumcraft/objects/ThreadAspectScanner.java | 158 + .../wrapper/aspect/TC_AspectList_Wrapper.java | 40 + .../objects/wrapper/aspect/TC_Aspect_Wrapper.java | 327 + .../wrapper/recipe/Base_Recipe_Wrapper.java | 10 + .../wrapper/recipe/TC_CrucibleRecipe_Wrapper.java | 19 + .../wrapper/recipe/TC_IArcaneRecipe_Wrapper.java | 19 + .../TC_InfusionEnchantmentRecipe_Wrapper.java | 19 + .../wrapper/recipe/TC_InfusionRecipe_Wrapper.java | 19 + .../wrapper/research/TC_PageType_Wrapper.java | 17 + .../research/TC_ResearchCategories_Wrapper.java | 89 + .../research/TC_ResearchCategoryList_Wrapper.java | 21 + .../wrapper/research/TC_ResearchItem_Wrapper.java | 246 + .../research/TC_ResearchNoteData_Wrapper.java | 14 + .../wrapper/research/TC_ResearchPage_Wrapper.java | 228 + .../xmod/thaumcraft/util/ThaumcraftUtils.java | 464 ++ .../xmod/thermalfoundation/HANDLER_TF.java | 43 + .../block/TF_Block_Fluid_Cryotheum.java | 191 + .../block/TF_Block_Fluid_Ender.java | 68 + .../block/TF_Block_Fluid_Pyrotheum.java | 191 + .../xmod/thermalfoundation/block/TF_Blocks.java | 29 + .../xmod/thermalfoundation/fluid/TF_Fluids.java | 79 + .../xmod/thermalfoundation/item/TF_Items.java | 88 + .../recipe/TF_Gregtech_Recipes.java | 101 + .../gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java | 105 + .../xmod/tinkers/material/BaseTinkersMaterial.java | 274 + .../xmod/tinkers/util/TinkersDryingRecipe.java | 120 + .../gtPlusPlus/xmod/tinkers/util/TinkersUtils.java | 544 ++ .../java/gtPlusPlus/xmod/witchery/WitchUtils.java | 99 + .../vswe/stevescarts/ModuleData/GppModuleData.java | 49 + .../resources/assets/forestry/AlvearyFrame.png | Bin 0 -> 931 bytes .../resources/assets/forestry/AlvearyMutator.png | Bin 0 -> 731 bytes .../blocks/apiculture/alveary.framehousing.off.png | Bin 0 -> 670 bytes .../blocks/apiculture/alveary.framehousing.on.png | Bin 0 -> 670 bytes .../blocks/apiculture/alveary.mutator.off.png | Bin 0 -> 558 bytes .../blocks/apiculture/alveary.mutator.on.png | Bin 0 -> 558 bytes src/main/resources/assets/gregtech/lang/en_US.lang | 222 + src/main/resources/assets/gregtech/lang/zh_CN.lang | 239 + .../textures/blocks/fluids/fluid.argon.png | Bin 0 -> 178 bytes .../textures/blocks/fluids/fluid.nitrofuel_old.png | Bin 0 -> 5538 bytes .../blocks/fluids/fluid.nitrofuel_old.png.mcmeta | 5 + .../blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png | Bin 0 -> 1505 bytes .../iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta | 5 + .../blocks/iconsets/OVERLAY_ACCELERATOR.png | Bin 0 -> 187 bytes .../blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png | Bin 0 -> 264 bytes .../iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta | 5 + .../blocks/iconsets/OVERLAY_ACCELERATOR_TE.png | Bin 0 -> 220 bytes .../iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png | Bin 0 -> 299 bytes .../OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta | 5 + .../blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png | Bin 0 -> 1505 bytes .../iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta | 5 + .../blocks/materialicons/ENRICHED/block1.png | Bin 0 -> 437 bytes .../blocks/materialicons/ENRICHED/block2.png | Bin 0 -> 459 bytes .../blocks/materialicons/ENRICHED/block3.png | Bin 0 -> 490 bytes .../blocks/materialicons/ENRICHED/block4.png | Bin 0 -> 480 bytes .../blocks/materialicons/ENRICHED/block5.png | Bin 0 -> 414 bytes .../blocks/materialicons/ENRICHED/block6.png | Bin 0 -> 437 bytes .../blocks/materialicons/ENRICHED/foil.png | Bin 0 -> 368 bytes .../blocks/materialicons/ENRICHED/frameGt.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/ENRICHED/ore.png | Bin 0 -> 271 bytes .../blocks/materialicons/ENRICHED/oreSmall.png | Bin 0 -> 339 bytes .../blocks/materialicons/ENRICHED/ore_animated.png | Bin 0 -> 591 bytes .../materialicons/ENRICHED/ore_animated.png.mcmeta | 6 + .../blocks/materialicons/ENRICHED/pipeHuge.png | Bin 0 -> 348 bytes .../blocks/materialicons/ENRICHED/pipeLarge.png | Bin 0 -> 429 bytes .../blocks/materialicons/ENRICHED/pipeMedium.png | Bin 0 -> 429 bytes .../blocks/materialicons/ENRICHED/pipeSide.png | Bin 0 -> 401 bytes .../blocks/materialicons/ENRICHED/pipeSmall.png | Bin 0 -> 427 bytes .../blocks/materialicons/ENRICHED/pipeTiny.png | Bin 0 -> 418 bytes .../blocks/materialicons/ENRICHED/void.png | Bin 0 -> 143 bytes .../blocks/materialicons/ENRICHED/wire.png | Bin 0 -> 513 bytes .../textures/blocks/materialicons/GEM_A/block1.png | Bin 0 -> 490 bytes .../textures/blocks/materialicons/GEM_A/block2.png | Bin 0 -> 459 bytes .../textures/blocks/materialicons/GEM_A/block3.png | Bin 0 -> 490 bytes .../textures/blocks/materialicons/GEM_A/block4.png | Bin 0 -> 480 bytes .../textures/blocks/materialicons/GEM_A/block5.png | Bin 0 -> 414 bytes .../textures/blocks/materialicons/GEM_A/block6.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/GEM_A/foil.png | Bin 0 -> 368 bytes .../blocks/materialicons/GEM_A/frameGt.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/GEM_A/ore.png | Bin 0 -> 280 bytes .../blocks/materialicons/GEM_A/oreSmall.png | Bin 0 -> 339 bytes .../blocks/materialicons/GEM_A/pipeHuge.png | Bin 0 -> 348 bytes .../blocks/materialicons/GEM_A/pipeLarge.png | Bin 0 -> 429 bytes .../blocks/materialicons/GEM_A/pipeMedium.png | Bin 0 -> 429 bytes .../blocks/materialicons/GEM_A/pipeSide.png | Bin 0 -> 401 bytes .../blocks/materialicons/GEM_A/pipeSmall.png | Bin 0 -> 427 bytes .../blocks/materialicons/GEM_A/pipeTiny.png | Bin 0 -> 418 bytes .../textures/blocks/materialicons/GEM_A/void.png | Bin 0 -> 143 bytes .../textures/blocks/materialicons/GEM_A/wire.png | Bin 0 -> 513 bytes .../blocks/materialicons/NUCLEAR/block1.png | Bin 0 -> 437 bytes .../blocks/materialicons/NUCLEAR/block2.png | Bin 0 -> 459 bytes .../blocks/materialicons/NUCLEAR/block3.png | Bin 0 -> 490 bytes .../blocks/materialicons/NUCLEAR/block4.png | Bin 0 -> 480 bytes .../blocks/materialicons/NUCLEAR/block5.png | Bin 0 -> 414 bytes .../blocks/materialicons/NUCLEAR/block6.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/NUCLEAR/foil.png | Bin 0 -> 368 bytes .../blocks/materialicons/NUCLEAR/frameGt.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/NUCLEAR/ore.png | Bin 0 -> 589 bytes .../blocks/materialicons/NUCLEAR/ore.png.mcmeta | 6 + .../blocks/materialicons/NUCLEAR/oreSmall.png | Bin 0 -> 339 bytes .../blocks/materialicons/NUCLEAR/pipeHuge.png | Bin 0 -> 348 bytes .../blocks/materialicons/NUCLEAR/pipeLarge.png | Bin 0 -> 429 bytes .../blocks/materialicons/NUCLEAR/pipeMedium.png | Bin 0 -> 429 bytes .../blocks/materialicons/NUCLEAR/pipeSide.png | Bin 0 -> 401 bytes .../blocks/materialicons/NUCLEAR/pipeSmall.png | Bin 0 -> 427 bytes .../blocks/materialicons/NUCLEAR/pipeTiny.png | Bin 0 -> 418 bytes .../textures/blocks/materialicons/NUCLEAR/void.png | Bin 0 -> 143 bytes .../textures/blocks/materialicons/NUCLEAR/wire.png | Bin 0 -> 513 bytes .../blocks/materialicons/REFINED/block1.png | Bin 0 -> 487 bytes .../blocks/materialicons/REFINED/block2.png | Bin 0 -> 459 bytes .../blocks/materialicons/REFINED/block3.png | Bin 0 -> 490 bytes .../blocks/materialicons/REFINED/block4.png | Bin 0 -> 480 bytes .../blocks/materialicons/REFINED/block5.png | Bin 0 -> 414 bytes .../blocks/materialicons/REFINED/block6.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/REFINED/foil.png | Bin 0 -> 368 bytes .../blocks/materialicons/REFINED/frameGt.png | Bin 0 -> 437 bytes .../textures/blocks/materialicons/REFINED/ore.png | Bin 0 -> 632 bytes .../blocks/materialicons/REFINED/oreSmall.png | Bin 0 -> 339 bytes .../blocks/materialicons/REFINED/pipeHuge.png | Bin 0 -> 500 bytes .../blocks/materialicons/REFINED/pipeLarge.png | Bin 0 -> 555 bytes .../blocks/materialicons/REFINED/pipeMedium.png | Bin 0 -> 569 bytes .../blocks/materialicons/REFINED/pipeSide.png | Bin 0 -> 540 bytes .../blocks/materialicons/REFINED/pipeSmall.png | Bin 0 -> 545 bytes .../blocks/materialicons/REFINED/pipeTiny.png | Bin 0 -> 560 bytes .../textures/blocks/materialicons/REFINED/void.png | Bin 0 -> 143 bytes .../textures/blocks/materialicons/REFINED/wire.png | Bin 0 -> 513 bytes .../textures/gui/HatchNbtConsumable_2By2.png | Bin 0 -> 1642 bytes .../textures/gui/HatchNbtConsumable_3By3.png | Bin 0 -> 1664 bytes .../textures/gui/HatchNbtConsumable_4By4.png | Bin 0 -> 1689 bytes .../gregtech/textures/gui/PowerSubStation.png | Bin 0 -> 970 bytes .../textures/gui/basicmachines/BlastSmelter.png | Bin 0 -> 1358 bytes .../textures/gui/basicmachines/Dehydrator.png | Bin 0 -> 1401 bytes .../textures/gui/basicmachines/FissionFuel.png | Bin 0 -> 2393 bytes .../gregtech/textures/gui/basicmachines/LFTR.png | Bin 0 -> 1236 bytes .../textures/gui/basicmachines/MixerAdvanced.png | Bin 0 -> 1871 bytes .../gregtech/textures/gui/multimachines/LFTR.png | Bin 0 -> 1236 bytes .../textures/items/gt.Volumetric_Flask_32k.png | Bin 0 -> 1013 bytes .../items/gt.Volumetric_Flask_32k.window.png | Bin 0 -> 399 bytes .../textures/items/gt.Volumetric_Flask_8k.png | Bin 0 -> 1010 bytes .../items/gt.Volumetric_Flask_8k.window.png | Bin 0 -> 398 bytes .../items/materialicons/ENRICHED/TURBINE_BLADE.png | Bin 0 -> 395 bytes .../ENRICHED/TURBINE_BLADE_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/ENRICHED/arrowGtPlastic.png | Bin 0 -> 291 bytes .../ENRICHED/arrowGtPlastic_OVERLAY.png | Bin 0 -> 289 bytes .../items/materialicons/ENRICHED/arrowGtWood.png | Bin 0 -> 291 bytes .../materialicons/ENRICHED/arrowGtWood_OVERLAY.png | Bin 0 -> 302 bytes .../textures/items/materialicons/ENRICHED/bolt.png | Bin 0 -> 161 bytes .../items/materialicons/ENRICHED/bolt_OVERLAY.png | Bin 0 -> 206 bytes .../textures/items/materialicons/ENRICHED/cell.png | Bin 0 -> 328 bytes .../items/materialicons/ENRICHED/cellPlasma.png | Bin 0 -> 328 bytes .../materialicons/ENRICHED/cellPlasma_OVERLAY.png | Bin 0 -> 290 bytes .../items/materialicons/ENRICHED/cell_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/ENRICHED/crateGtDust.png | Bin 0 -> 370 bytes .../materialicons/ENRICHED/crateGtDust_OVERLAY.png | Bin 0 -> 506 bytes .../items/materialicons/ENRICHED/crateGtGem.png | Bin 0 -> 401 bytes .../materialicons/ENRICHED/crateGtGem_OVERLAY.png | Bin 0 -> 526 bytes .../items/materialicons/ENRICHED/crateGtIngot.png | Bin 0 -> 380 bytes .../ENRICHED/crateGtIngot_OVERLAY.png | Bin 0 -> 517 bytes .../items/materialicons/ENRICHED/crateGtPlate.png | Bin 0 -> 455 bytes .../ENRICHED/crateGtPlate_OVERLAY.png | Bin 0 -> 449 bytes .../items/materialicons/ENRICHED/crushed.png | Bin 0 -> 441 bytes .../materialicons/ENRICHED/crushedCentrifuged.png | Bin 0 -> 561 bytes .../ENRICHED/crushedCentrifuged_OVERLAY.png | Bin 0 -> 430 bytes .../materialicons/ENRICHED/crushedPurified.png | Bin 0 -> 460 bytes .../ENRICHED/crushedPurified_OVERLAY.png | Bin 0 -> 583 bytes .../materialicons/ENRICHED/crushed_OVERLAY.png | Bin 0 -> 426 bytes .../textures/items/materialicons/ENRICHED/dust.png | Bin 0 -> 312 bytes .../items/materialicons/ENRICHED/dustImpure.png | Bin 0 -> 312 bytes .../materialicons/ENRICHED/dustImpure_OVERLAY.png | Bin 0 -> 415 bytes .../items/materialicons/ENRICHED/dustPure.png | Bin 0 -> 312 bytes .../materialicons/ENRICHED/dustPure_OVERLAY.png | Bin 0 -> 383 bytes .../items/materialicons/ENRICHED/dustSmall.png | Bin 0 -> 286 bytes .../materialicons/ENRICHED/dustSmall_OVERLAY.png | Bin 0 -> 252 bytes .../items/materialicons/ENRICHED/dustTiny.png | Bin 0 -> 221 bytes .../materialicons/ENRICHED/dustTiny_OVERLAY.png | Bin 0 -> 221 bytes .../items/materialicons/ENRICHED/dust_OVERLAY.png | Bin 0 -> 222 bytes .../textures/items/materialicons/ENRICHED/foil.png | Bin 0 -> 475 bytes .../items/materialicons/ENRICHED/foil_OVERLAY.png | Bin 0 -> 539 bytes .../items/materialicons/ENRICHED/gearGt.png | Bin 0 -> 434 bytes .../items/materialicons/ENRICHED/gearGtSmall.png | Bin 0 -> 563 bytes .../materialicons/ENRICHED/gearGtSmall_OVERLAY.png | Bin 0 -> 365 bytes .../materialicons/ENRICHED/gearGt_OVERLAY.png | Bin 0 -> 503 bytes .../textures/items/materialicons/ENRICHED/gem.png | Bin 0 -> 419 bytes .../items/materialicons/ENRICHED/gemChipped.png | Bin 0 -> 575 bytes .../materialicons/ENRICHED/gemChipped_OVERLAY.png | Bin 0 -> 465 bytes .../items/materialicons/ENRICHED/gemExquisite.png | Bin 0 -> 619 bytes .../ENRICHED/gemExquisite_OVERLAY.png | Bin 0 -> 613 bytes .../items/materialicons/ENRICHED/gemFlawed.png | Bin 0 -> 504 bytes .../materialicons/ENRICHED/gemFlawed_OVERLAY.png | Bin 0 -> 487 bytes .../items/materialicons/ENRICHED/gemFlawless.png | Bin 0 -> 691 bytes .../materialicons/ENRICHED/gemFlawless_OVERLAY.png | Bin 0 -> 504 bytes .../items/materialicons/ENRICHED/gem_OVERLAY.png | Bin 0 -> 465 bytes .../items/materialicons/ENRICHED/handleMallet.png | Bin 0 -> 356 bytes .../ENRICHED/handleMallet_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/ENRICHED/ingot.png | Bin 0 -> 344 bytes .../items/materialicons/ENRICHED/ingotDouble.png | Bin 0 -> 403 bytes .../materialicons/ENRICHED/ingotDouble_OVERLAY.png | Bin 0 -> 419 bytes .../items/materialicons/ENRICHED/ingotHot.png | Bin 0 -> 335 bytes .../materialicons/ENRICHED/ingotHot_OVERLAY.png | Bin 0 -> 309 bytes .../materialicons/ENRICHED/ingotQuadruple.png | Bin 0 -> 375 bytes .../ENRICHED/ingotQuadruple_OVERLAY.png | Bin 0 -> 379 bytes .../materialicons/ENRICHED/ingotQuintuple.png | Bin 0 -> 358 bytes .../ENRICHED/ingotQuintuple_OVERLAY.png | Bin 0 -> 362 bytes .../items/materialicons/ENRICHED/ingotTriple.png | Bin 0 -> 388 bytes .../materialicons/ENRICHED/ingotTriple_OVERLAY.png | Bin 0 -> 395 bytes .../items/materialicons/ENRICHED/ingot_OVERLAY.png | Bin 0 -> 365 bytes .../textures/items/materialicons/ENRICHED/lens.png | Bin 0 -> 296 bytes .../items/materialicons/ENRICHED/lens_OVERLAY.png | Bin 0 -> 594 bytes .../items/materialicons/ENRICHED/nugget.png | Bin 0 -> 250 bytes .../materialicons/ENRICHED/nugget_OVERLAY.png | Bin 0 -> 261 bytes .../items/materialicons/ENRICHED/plate.png | Bin 0 -> 275 bytes .../items/materialicons/ENRICHED/plateDense.png | Bin 0 -> 298 bytes .../materialicons/ENRICHED/plateDense_OVERLAY.png | Bin 0 -> 322 bytes .../items/materialicons/ENRICHED/plateDouble.png | Bin 0 -> 297 bytes .../materialicons/ENRICHED/plateDouble_OVERLAY.png | Bin 0 -> 338 bytes .../materialicons/ENRICHED/plateQuadruple.png | Bin 0 -> 310 bytes .../ENRICHED/plateQuadruple_OVERLAY.png | Bin 0 -> 372 bytes .../materialicons/ENRICHED/plateQuintuple.png | Bin 0 -> 312 bytes .../ENRICHED/plateQuintuple_OVERLAY.png | Bin 0 -> 380 bytes .../items/materialicons/ENRICHED/plateTriple.png | Bin 0 -> 304 bytes .../materialicons/ENRICHED/plateTriple_OVERLAY.png | Bin 0 -> 360 bytes .../items/materialicons/ENRICHED/plate_OVERLAY.png | Bin 0 -> 300 bytes .../textures/items/materialicons/ENRICHED/ring.png | Bin 0 -> 311 bytes .../items/materialicons/ENRICHED/ring_OVERLAY.png | Bin 0 -> 413 bytes .../items/materialicons/ENRICHED/rotor.png | Bin 0 -> 443 bytes .../items/materialicons/ENRICHED/rotor_OVERLAY.png | Bin 0 -> 470 bytes .../items/materialicons/ENRICHED/round.png | Bin 0 -> 200 bytes .../items/materialicons/ENRICHED/round_OVERLAY.png | Bin 0 -> 205 bytes .../items/materialicons/ENRICHED/screw.png | Bin 0 -> 199 bytes .../items/materialicons/ENRICHED/screw_OVERLAY.png | Bin 0 -> 226 bytes .../items/materialicons/ENRICHED/spring.png | Bin 0 -> 276 bytes .../items/materialicons/ENRICHED/springSmall.png | Bin 0 -> 317 bytes .../materialicons/ENRICHED/springSmall_OVERLAY.png | Bin 0 -> 283 bytes .../materialicons/ENRICHED/spring_OVERLAY.png | Bin 0 -> 304 bytes .../items/materialicons/ENRICHED/stick.png | Bin 0 -> 230 bytes .../items/materialicons/ENRICHED/stickLong.png | Bin 0 -> 246 bytes .../materialicons/ENRICHED/stickLong_OVERLAY.png | Bin 0 -> 217 bytes .../items/materialicons/ENRICHED/stick_OVERLAY.png | Bin 0 -> 248 bytes .../items/materialicons/ENRICHED/toolHeadArrow.png | Bin 0 -> 424 bytes .../ENRICHED/toolHeadArrow_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/ENRICHED/toolHeadAxe.png | Bin 0 -> 255 bytes .../materialicons/ENRICHED/toolHeadAxe_OVERLAY.png | Bin 0 -> 250 bytes .../materialicons/ENRICHED/toolHeadBuzzSaw.png | Bin 0 -> 533 bytes .../ENRICHED/toolHeadBuzzSaw_OVERLAY.png | Bin 0 -> 557 bytes .../materialicons/ENRICHED/toolHeadChainsaw.png | Bin 0 -> 531 bytes .../ENRICHED/toolHeadChainsaw_OVERLAY.png | Bin 0 -> 347 bytes .../items/materialicons/ENRICHED/toolHeadDrill.png | Bin 0 -> 525 bytes .../ENRICHED/toolHeadDrill_OVERLAY.png | Bin 0 -> 348 bytes .../items/materialicons/ENRICHED/toolHeadFile.png | Bin 0 -> 257 bytes .../ENRICHED/toolHeadFile_OVERLAY.png | Bin 0 -> 295 bytes .../materialicons/ENRICHED/toolHeadHammer.png | Bin 0 -> 235 bytes .../ENRICHED/toolHeadHammer_OVERLAY.png | Bin 0 -> 253 bytes .../items/materialicons/ENRICHED/toolHeadHoe.png | Bin 0 -> 230 bytes .../materialicons/ENRICHED/toolHeadHoe_OVERLAY.png | Bin 0 -> 240 bytes .../materialicons/ENRICHED/toolHeadMallet.png | Bin 0 -> 340 bytes .../ENRICHED/toolHeadMallet_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/ENRICHED/toolHeadPickaxe.png | Bin 0 -> 241 bytes .../ENRICHED/toolHeadPickaxe_OVERLAY.png | Bin 0 -> 280 bytes .../items/materialicons/ENRICHED/toolHeadPlow.png | Bin 0 -> 268 bytes .../ENRICHED/toolHeadPlow_OVERLAY.png | Bin 0 -> 271 bytes .../items/materialicons/ENRICHED/toolHeadSaw.png | Bin 0 -> 258 bytes .../materialicons/ENRICHED/toolHeadSaw_OVERLAY.png | Bin 0 -> 280 bytes .../materialicons/ENRICHED/toolHeadScrewdriver.png | Bin 0 -> 178 bytes .../ENRICHED/toolHeadScrewdriver_OVERLAY.png | Bin 0 -> 231 bytes .../items/materialicons/ENRICHED/toolHeadSense.png | Bin 0 -> 259 bytes .../ENRICHED/toolHeadSense_OVERLAY.png | Bin 0 -> 285 bytes .../materialicons/ENRICHED/toolHeadShovel.png | Bin 0 -> 251 bytes .../ENRICHED/toolHeadShovel_OVERLAY.png | Bin 0 -> 270 bytes .../materialicons/ENRICHED/toolHeadSoldering.png | Bin 0 -> 314 bytes .../ENRICHED/toolHeadSoldering_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/ENRICHED/toolHeadSword.png | Bin 0 -> 269 bytes .../ENRICHED/toolHeadSword_OVERLAY.png | Bin 0 -> 280 bytes .../ENRICHED/toolHeadUniversalSpade.png | Bin 0 -> 254 bytes .../ENRICHED/toolHeadUniversalSpade_OVERLAY.png | Bin 0 -> 262 bytes .../materialicons/ENRICHED/toolHeadWrench.png | Bin 0 -> 517 bytes .../ENRICHED/toolHeadWrench_OVERLAY.png | Bin 0 -> 310 bytes .../items/materialicons/ENRICHED/turbineBlade.png | Bin 0 -> 395 bytes .../ENRICHED/turbineBlade_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/ENRICHED/void.png | Bin 0 -> 143 bytes .../items/materialicons/ENRICHED/void_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/ENRICHED/wireFine.png | Bin 0 -> 481 bytes .../materialicons/ENRICHED/wireFine_OVERLAY.png | Bin 0 -> 458 bytes .../items/materialicons/GEM_A/TURBINE_BLADE.png | Bin 0 -> 395 bytes .../materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/arrowGtPlastic.png | Bin 0 -> 297 bytes .../materialicons/GEM_A/arrowGtPlastic_OVERLAY.png | Bin 0 -> 283 bytes .../items/materialicons/GEM_A/arrowGtWood.png | Bin 0 -> 297 bytes .../materialicons/GEM_A/arrowGtWood_OVERLAY.png | Bin 0 -> 294 bytes .../textures/items/materialicons/GEM_A/bolt.png | Bin 0 -> 161 bytes .../items/materialicons/GEM_A/bolt_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/cell.png | Bin 0 -> 328 bytes .../items/materialicons/GEM_A/cellPlasma.png | Bin 0 -> 328 bytes .../materialicons/GEM_A/cellPlasma_OVERLAY.png | Bin 0 -> 290 bytes .../items/materialicons/GEM_A/cell_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/GEM_A/crateGtDust.png | Bin 0 -> 370 bytes .../materialicons/GEM_A/crateGtDust_OVERLAY.png | Bin 0 -> 506 bytes .../items/materialicons/GEM_A/crateGtGem.png | Bin 0 -> 401 bytes .../materialicons/GEM_A/crateGtGem_OVERLAY.png | Bin 0 -> 526 bytes .../items/materialicons/GEM_A/crateGtIngot.png | Bin 0 -> 380 bytes .../materialicons/GEM_A/crateGtIngot_OVERLAY.png | Bin 0 -> 517 bytes .../items/materialicons/GEM_A/crateGtPlate.png | Bin 0 -> 455 bytes .../materialicons/GEM_A/crateGtPlate_OVERLAY.png | Bin 0 -> 449 bytes .../textures/items/materialicons/GEM_A/crushed.png | Bin 0 -> 441 bytes .../materialicons/GEM_A/crushedCentrifuged.png | Bin 0 -> 561 bytes .../GEM_A/crushedCentrifuged_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/crushedPurified.png | Bin 0 -> 460 bytes .../GEM_A/crushedPurified_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/crushed_OVERLAY.png | Bin 0 -> 448 bytes .../textures/items/materialicons/GEM_A/dust.png | Bin 0 -> 312 bytes .../items/materialicons/GEM_A/dustImpure.png | Bin 0 -> 312 bytes .../materialicons/GEM_A/dustImpure_OVERLAY.png | Bin 0 -> 430 bytes .../items/materialicons/GEM_A/dustPure.png | Bin 0 -> 312 bytes .../items/materialicons/GEM_A/dustPure_OVERLAY.png | Bin 0 -> 424 bytes .../items/materialicons/GEM_A/dustSmall.png | Bin 0 -> 286 bytes .../materialicons/GEM_A/dustSmall_OVERLAY.png | Bin 0 -> 149 bytes .../items/materialicons/GEM_A/dustTiny.png | Bin 0 -> 221 bytes .../items/materialicons/GEM_A/dustTiny_OVERLAY.png | Bin 0 -> 149 bytes .../items/materialicons/GEM_A/dust_OVERLAY.png | Bin 0 -> 172 bytes .../textures/items/materialicons/GEM_A/foil.png | Bin 0 -> 475 bytes .../items/materialicons/GEM_A/foil_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/gearGt.png | Bin 0 -> 434 bytes .../items/materialicons/GEM_A/gearGtSmall.png | Bin 0 -> 563 bytes .../materialicons/GEM_A/gearGtSmall_OVERLAY.png | Bin 0 -> 312 bytes .../items/materialicons/GEM_A/gearGt_OVERLAY.png | Bin 0 -> 172 bytes .../textures/items/materialicons/GEM_A/gem.png | Bin 0 -> 341 bytes .../items/materialicons/GEM_A/gemChipped.png | Bin 0 -> 575 bytes .../materialicons/GEM_A/gemChipped_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/gemExquisite.png | Bin 0 -> 619 bytes .../materialicons/GEM_A/gemExquisite_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/gemFlawed.png | Bin 0 -> 504 bytes .../materialicons/GEM_A/gemFlawed_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/gemFlawless.png | Bin 0 -> 691 bytes .../materialicons/GEM_A/gemFlawless_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/gem_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/handleMallet.png | Bin 0 -> 356 bytes .../materialicons/GEM_A/handleMallet_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/ingot.png | Bin 0 -> 344 bytes .../items/materialicons/GEM_A/ingotDouble.png | Bin 0 -> 403 bytes .../materialicons/GEM_A/ingotDouble_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/ingotHot.png | Bin 0 -> 335 bytes .../items/materialicons/GEM_A/ingotHot_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/GEM_A/ingotQuadruple.png | Bin 0 -> 375 bytes .../materialicons/GEM_A/ingotQuadruple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/ingotQuintuple.png | Bin 0 -> 358 bytes .../materialicons/GEM_A/ingotQuintuple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/ingotTriple.png | Bin 0 -> 388 bytes .../materialicons/GEM_A/ingotTriple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/ingot_OVERLAY.png | Bin 0 -> 180 bytes .../textures/items/materialicons/GEM_A/lens.png | Bin 0 -> 296 bytes .../items/materialicons/GEM_A/lens_OVERLAY.png | Bin 0 -> 556 bytes .../textures/items/materialicons/GEM_A/nugget.png | Bin 0 -> 250 bytes .../items/materialicons/GEM_A/nugget_OVERLAY.png | Bin 0 -> 163 bytes .../textures/items/materialicons/GEM_A/plate.png | Bin 0 -> 275 bytes .../items/materialicons/GEM_A/plateDense.png | Bin 0 -> 298 bytes .../materialicons/GEM_A/plateDense_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/plateDouble.png | Bin 0 -> 297 bytes .../materialicons/GEM_A/plateDouble_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/plateQuadruple.png | Bin 0 -> 310 bytes .../materialicons/GEM_A/plateQuadruple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/plateQuintuple.png | Bin 0 -> 312 bytes .../materialicons/GEM_A/plateQuintuple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/plateTriple.png | Bin 0 -> 304 bytes .../materialicons/GEM_A/plateTriple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/plate_OVERLAY.png | Bin 0 -> 173 bytes .../textures/items/materialicons/GEM_A/ring.png | Bin 0 -> 311 bytes .../items/materialicons/GEM_A/ring_OVERLAY.png | Bin 0 -> 174 bytes .../textures/items/materialicons/GEM_A/rotor.png | Bin 0 -> 443 bytes .../items/materialicons/GEM_A/rotor_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/round.png | Bin 0 -> 200 bytes .../items/materialicons/GEM_A/round_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/screw.png | Bin 0 -> 199 bytes .../items/materialicons/GEM_A/screw_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/spring.png | Bin 0 -> 276 bytes .../items/materialicons/GEM_A/springSmall.png | Bin 0 -> 317 bytes .../materialicons/GEM_A/springSmall_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/spring_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/stick.png | Bin 0 -> 230 bytes .../items/materialicons/GEM_A/stickLong.png | Bin 0 -> 246 bytes .../materialicons/GEM_A/stickLong_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/stick_OVERLAY.png | Bin 0 -> 230 bytes .../items/materialicons/GEM_A/toolHeadArrow.png | Bin 0 -> 399 bytes .../materialicons/GEM_A/toolHeadArrow_OVERLAY.png | Bin 0 -> 183 bytes .../items/materialicons/GEM_A/toolHeadAxe.png | Bin 0 -> 255 bytes .../materialicons/GEM_A/toolHeadAxe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadBuzzSaw.png | Bin 0 -> 533 bytes .../GEM_A/toolHeadBuzzSaw_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadChainsaw.png | Bin 0 -> 531 bytes .../GEM_A/toolHeadChainsaw_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadDrill.png | Bin 0 -> 525 bytes .../materialicons/GEM_A/toolHeadDrill_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadFile.png | Bin 0 -> 257 bytes .../materialicons/GEM_A/toolHeadFile_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadHammer.png | Bin 0 -> 235 bytes .../materialicons/GEM_A/toolHeadHammer_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadHoe.png | Bin 0 -> 230 bytes .../materialicons/GEM_A/toolHeadHoe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadMallet.png | Bin 0 -> 340 bytes .../materialicons/GEM_A/toolHeadMallet_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadPickaxe.png | Bin 0 -> 241 bytes .../GEM_A/toolHeadPickaxe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadPlow.png | Bin 0 -> 268 bytes .../materialicons/GEM_A/toolHeadPlow_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadSaw.png | Bin 0 -> 258 bytes .../materialicons/GEM_A/toolHeadSaw_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/GEM_A/toolHeadScrewdriver.png | Bin 0 -> 178 bytes .../GEM_A/toolHeadScrewdriver_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadSense.png | Bin 0 -> 259 bytes .../materialicons/GEM_A/toolHeadSense_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadShovel.png | Bin 0 -> 251 bytes .../materialicons/GEM_A/toolHeadShovel_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/GEM_A/toolHeadSoldering.png | Bin 0 -> 314 bytes .../GEM_A/toolHeadSoldering_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadSword.png | Bin 0 -> 269 bytes .../materialicons/GEM_A/toolHeadSword_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/GEM_A/toolHeadUniversalSpade.png | Bin 0 -> 254 bytes .../GEM_A/toolHeadUniversalSpade_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/toolHeadWrench.png | Bin 0 -> 517 bytes .../materialicons/GEM_A/toolHeadWrench_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/turbineBlade.png | Bin 0 -> 395 bytes .../materialicons/GEM_A/turbineBlade_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/GEM_A/void.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/void_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/GEM_A/wireFine.png | Bin 0 -> 481 bytes .../items/materialicons/GEM_A/wireFine_OVERLAY.png | Bin 0 -> 271 bytes .../items/materialicons/NUCLEAR/Fiery/cell.png | Bin 0 -> 328 bytes .../materialicons/NUCLEAR/Fiery/cellPlasma.png | Bin 0 -> 328 bytes .../NUCLEAR/Fiery/cellPlasma_OVERLAY.png | Bin 0 -> 290 bytes .../materialicons/NUCLEAR/Fiery/cell_OVERLAY.png | Bin 0 -> 309 bytes .../materialicons/NUCLEAR/Fiery/crateGtDust.png | Bin 0 -> 370 bytes .../NUCLEAR/Fiery/crateGtDust_OVERLAY.png | Bin 0 -> 506 bytes .../materialicons/NUCLEAR/Fiery/crateGtGem.png | Bin 0 -> 401 bytes .../NUCLEAR/Fiery/crateGtGem_OVERLAY.png | Bin 0 -> 526 bytes .../materialicons/NUCLEAR/Fiery/crateGtIngot.png | Bin 0 -> 380 bytes .../NUCLEAR/Fiery/crateGtIngot_OVERLAY.png | Bin 0 -> 517 bytes .../materialicons/NUCLEAR/Fiery/crateGtPlate.png | Bin 0 -> 455 bytes .../NUCLEAR/Fiery/crateGtPlate_OVERLAY.png | Bin 0 -> 449 bytes .../NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png | Bin 0 -> 430 bytes .../NUCLEAR/Fiery/crushedPurified_OVERLAY.png | Bin 0 -> 583 bytes .../NUCLEAR/Fiery/crushed_OVERLAY.png | Bin 0 -> 426 bytes .../NUCLEAR/Fiery/dustTiny_OVERLAY.png | Bin 0 -> 221 bytes .../materialicons/NUCLEAR/Fiery/dust_OVERLAY.png | Bin 0 -> 222 bytes .../materialicons/NUCLEAR/Fiery/foil_OVERLAY.png | Bin 0 -> 539 bytes .../NUCLEAR/Fiery/gearGtSmall_OVERLAY.png | Bin 0 -> 365 bytes .../materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png | Bin 0 -> 503 bytes .../NUCLEAR/Fiery/gemChipped_OVERLAY.png | Bin 0 -> 465 bytes .../NUCLEAR/Fiery/gemExquisite_OVERLAY.png | Bin 0 -> 613 bytes .../NUCLEAR/Fiery/gemFlawed_OVERLAY.png | Bin 0 -> 487 bytes .../NUCLEAR/Fiery/gemFlawless_OVERLAY.png | Bin 0 -> 504 bytes .../materialicons/NUCLEAR/Fiery/gem_OVERLAY.png | Bin 0 -> 465 bytes .../NUCLEAR/Fiery/ingotDouble_OVERLAY.png | Bin 0 -> 419 bytes .../NUCLEAR/Fiery/ingotHot_OVERLAY.png | Bin 0 -> 309 bytes .../NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png | Bin 0 -> 379 bytes .../NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png | Bin 0 -> 362 bytes .../NUCLEAR/Fiery/ingotTriple_OVERLAY.png | Bin 0 -> 395 bytes .../materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png | Bin 0 -> 365 bytes .../items/materialicons/NUCLEAR/Fiery/lens.png | Bin 0 -> 296 bytes .../materialicons/NUCLEAR/Fiery/lens_OVERLAY.png | Bin 0 -> 594 bytes .../materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png | Bin 0 -> 261 bytes .../NUCLEAR/Fiery/plateDense_OVERLAY.png | Bin 0 -> 322 bytes .../NUCLEAR/Fiery/plateDouble_OVERLAY.png | Bin 0 -> 338 bytes .../NUCLEAR/Fiery/plateQuadruple_OVERLAY.png | Bin 0 -> 372 bytes .../NUCLEAR/Fiery/plateQuintuple_OVERLAY.png | Bin 0 -> 380 bytes .../NUCLEAR/Fiery/plateTriple_OVERLAY.png | Bin 0 -> 360 bytes .../materialicons/NUCLEAR/Fiery/plate_OVERLAY.png | Bin 0 -> 300 bytes .../materialicons/NUCLEAR/Fiery/ring_OVERLAY.png | Bin 0 -> 413 bytes .../materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png | Bin 0 -> 470 bytes .../materialicons/NUCLEAR/Fiery/round_OVERLAY.png | Bin 0 -> 205 bytes .../materialicons/NUCLEAR/Fiery/screw_OVERLAY.png | Bin 0 -> 226 bytes .../NUCLEAR/Fiery/springSmall_OVERLAY.png | Bin 0 -> 283 bytes .../materialicons/NUCLEAR/Fiery/spring_OVERLAY.png | Bin 0 -> 304 bytes .../NUCLEAR/Fiery/stickLong_OVERLAY.png | Bin 0 -> 217 bytes .../materialicons/NUCLEAR/Fiery/stick_OVERLAY.png | Bin 0 -> 248 bytes .../items/materialicons/NUCLEAR/Fiery/wireFine.png | Bin 0 -> 481 bytes .../NUCLEAR/Fiery/wireFine_OVERLAY.png | Bin 0 -> 458 bytes .../items/materialicons/NUCLEAR/TURBINE_BLADE.png | Bin 0 -> 395 bytes .../NUCLEAR/TURBINE_BLADE_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/arrowGtPlastic.png | Bin 0 -> 297 bytes .../NUCLEAR/arrowGtPlastic_OVERLAY.png | Bin 0 -> 283 bytes .../items/materialicons/NUCLEAR/arrowGtWood.png | Bin 0 -> 297 bytes .../materialicons/NUCLEAR/arrowGtWood_OVERLAY.png | Bin 0 -> 294 bytes .../textures/items/materialicons/NUCLEAR/bolt.png | Bin 0 -> 161 bytes .../items/materialicons/NUCLEAR/bolt_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/NUCLEAR/cell.png | Bin 0 -> 328 bytes .../items/materialicons/NUCLEAR/cellPlasma.png | Bin 0 -> 328 bytes .../materialicons/NUCLEAR/cellPlasma_OVERLAY.png | Bin 0 -> 290 bytes .../items/materialicons/NUCLEAR/cell_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/NUCLEAR/crateGtDust.png | Bin 0 -> 370 bytes .../materialicons/NUCLEAR/crateGtDust_OVERLAY.png | Bin 0 -> 506 bytes .../items/materialicons/NUCLEAR/crateGtGem.png | Bin 0 -> 401 bytes .../materialicons/NUCLEAR/crateGtGem_OVERLAY.png | Bin 0 -> 526 bytes .../items/materialicons/NUCLEAR/crateGtIngot.png | Bin 0 -> 380 bytes .../materialicons/NUCLEAR/crateGtIngot_OVERLAY.png | Bin 0 -> 517 bytes .../items/materialicons/NUCLEAR/crateGtPlate.png | Bin 0 -> 455 bytes .../materialicons/NUCLEAR/crateGtPlate_OVERLAY.png | Bin 0 -> 449 bytes .../items/materialicons/NUCLEAR/crushed.png | Bin 0 -> 462 bytes .../materialicons/NUCLEAR/crushedCentrifuged.png | Bin 0 -> 561 bytes .../NUCLEAR/crushedCentrifuged_OVERLAY.png | Bin 0 -> 393 bytes .../materialicons/NUCLEAR/crushedPurified.png | Bin 0 -> 460 bytes .../NUCLEAR/crushedPurified_OVERLAY.png | Bin 0 -> 538 bytes .../materialicons/NUCLEAR/crushed_OVERLAY.png | Bin 0 -> 539 bytes .../textures/items/materialicons/NUCLEAR/dust.png | Bin 0 -> 312 bytes .../items/materialicons/NUCLEAR/dustImpure.png | Bin 0 -> 312 bytes .../materialicons/NUCLEAR/dustImpure_OVERLAY.png | Bin 0 -> 430 bytes .../items/materialicons/NUCLEAR/dustPure.png | Bin 0 -> 312 bytes .../materialicons/NUCLEAR/dustPure_OVERLAY.png | Bin 0 -> 424 bytes .../items/materialicons/NUCLEAR/dustSmall.png | Bin 0 -> 286 bytes .../materialicons/NUCLEAR/dustSmall_OVERLAY.png | Bin 0 -> 256 bytes .../items/materialicons/NUCLEAR/dustTiny.png | Bin 0 -> 221 bytes .../materialicons/NUCLEAR/dustTiny_OVERLAY.png | Bin 0 -> 251 bytes .../items/materialicons/NUCLEAR/dust_OVERLAY.png | Bin 0 -> 281 bytes .../textures/items/materialicons/NUCLEAR/foil.png | Bin 0 -> 475 bytes .../items/materialicons/NUCLEAR/foil_OVERLAY.png | Bin 0 -> 568 bytes .../items/materialicons/NUCLEAR/gearGt.png | Bin 0 -> 434 bytes .../items/materialicons/NUCLEAR/gearGtSmall.png | Bin 0 -> 563 bytes .../materialicons/NUCLEAR/gearGtSmall_OVERLAY.png | Bin 0 -> 312 bytes .../items/materialicons/NUCLEAR/gearGt_OVERLAY.png | Bin 0 -> 172 bytes .../textures/items/materialicons/NUCLEAR/gem.png | Bin 0 -> 419 bytes .../items/materialicons/NUCLEAR/gemChipped.png | Bin 0 -> 575 bytes .../materialicons/NUCLEAR/gemChipped_OVERLAY.png | Bin 0 -> 511 bytes .../items/materialicons/NUCLEAR/gemExquisite.png | Bin 0 -> 619 bytes .../materialicons/NUCLEAR/gemExquisite_OVERLAY.png | Bin 0 -> 552 bytes .../items/materialicons/NUCLEAR/gemFlawed.png | Bin 0 -> 504 bytes .../materialicons/NUCLEAR/gemFlawed_OVERLAY.png | Bin 0 -> 543 bytes .../items/materialicons/NUCLEAR/gemFlawless.png | Bin 0 -> 691 bytes .../materialicons/NUCLEAR/gemFlawless_OVERLAY.png | Bin 0 -> 516 bytes .../items/materialicons/NUCLEAR/gem_OVERLAY.png | Bin 0 -> 437 bytes .../items/materialicons/NUCLEAR/handleMallet.png | Bin 0 -> 356 bytes .../materialicons/NUCLEAR/handleMallet_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/NUCLEAR/ingot.png | Bin 0 -> 344 bytes .../items/materialicons/NUCLEAR/ingotDouble.png | Bin 0 -> 403 bytes .../materialicons/NUCLEAR/ingotDouble_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/ingotHot.png | Bin 0 -> 335 bytes .../materialicons/NUCLEAR/ingotHot_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/NUCLEAR/ingotQuadruple.png | Bin 0 -> 375 bytes .../NUCLEAR/ingotQuadruple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/ingotQuintuple.png | Bin 0 -> 358 bytes .../NUCLEAR/ingotQuintuple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/ingotTriple.png | Bin 0 -> 388 bytes .../materialicons/NUCLEAR/ingotTriple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/ingot_OVERLAY.png | Bin 0 -> 333 bytes .../textures/items/materialicons/NUCLEAR/lens.png | Bin 0 -> 296 bytes .../items/materialicons/NUCLEAR/lens_OVERLAY.png | Bin 0 -> 556 bytes .../items/materialicons/NUCLEAR/nugget.png | Bin 0 -> 250 bytes .../items/materialicons/NUCLEAR/nugget_OVERLAY.png | Bin 0 -> 286 bytes .../textures/items/materialicons/NUCLEAR/plate.png | Bin 0 -> 275 bytes .../items/materialicons/NUCLEAR/plateDense.png | Bin 0 -> 298 bytes .../materialicons/NUCLEAR/plateDense_OVERLAY.png | Bin 0 -> 310 bytes .../items/materialicons/NUCLEAR/plateDouble.png | Bin 0 -> 297 bytes .../materialicons/NUCLEAR/plateDouble_OVERLAY.png | Bin 0 -> 319 bytes .../items/materialicons/NUCLEAR/plateQuadruple.png | Bin 0 -> 310 bytes .../NUCLEAR/plateQuadruple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/plateQuintuple.png | Bin 0 -> 312 bytes .../NUCLEAR/plateQuintuple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/plateTriple.png | Bin 0 -> 304 bytes .../materialicons/NUCLEAR/plateTriple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/plate_OVERLAY.png | Bin 0 -> 290 bytes .../textures/items/materialicons/NUCLEAR/ring.png | Bin 0 -> 311 bytes .../items/materialicons/NUCLEAR/ring_OVERLAY.png | Bin 0 -> 174 bytes .../textures/items/materialicons/NUCLEAR/rotor.png | Bin 0 -> 443 bytes .../items/materialicons/NUCLEAR/rotor_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/NUCLEAR/round.png | Bin 0 -> 200 bytes .../items/materialicons/NUCLEAR/round_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/NUCLEAR/screw.png | Bin 0 -> 199 bytes .../items/materialicons/NUCLEAR/screw_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/spring.png | Bin 0 -> 276 bytes .../items/materialicons/NUCLEAR/springSmall.png | Bin 0 -> 317 bytes .../materialicons/NUCLEAR/springSmall_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/spring_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/NUCLEAR/stick.png | Bin 0 -> 230 bytes .../items/materialicons/NUCLEAR/stickLong.png | Bin 0 -> 246 bytes .../materialicons/NUCLEAR/stickLong_OVERLAY.png | Bin 0 -> 305 bytes .../items/materialicons/NUCLEAR/stick_OVERLAY.png | Bin 0 -> 314 bytes .../items/materialicons/NUCLEAR/toolHeadArrow.png | Bin 0 -> 399 bytes .../NUCLEAR/toolHeadArrow_OVERLAY.png | Bin 0 -> 183 bytes .../items/materialicons/NUCLEAR/toolHeadAxe.png | Bin 0 -> 255 bytes .../materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/NUCLEAR/toolHeadBuzzSaw.png | Bin 0 -> 533 bytes .../NUCLEAR/toolHeadBuzzSaw_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/NUCLEAR/toolHeadChainsaw.png | Bin 0 -> 531 bytes .../NUCLEAR/toolHeadChainsaw_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadDrill.png | Bin 0 -> 525 bytes .../NUCLEAR/toolHeadDrill_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadFile.png | Bin 0 -> 257 bytes .../materialicons/NUCLEAR/toolHeadFile_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadHammer.png | Bin 0 -> 235 bytes .../NUCLEAR/toolHeadHammer_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadHoe.png | Bin 0 -> 230 bytes .../materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadMallet.png | Bin 0 -> 340 bytes .../NUCLEAR/toolHeadMallet_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/NUCLEAR/toolHeadPickaxe.png | Bin 0 -> 241 bytes .../NUCLEAR/toolHeadPickaxe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadPlow.png | Bin 0 -> 268 bytes .../materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadSaw.png | Bin 0 -> 258 bytes .../materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/NUCLEAR/toolHeadScrewdriver.png | Bin 0 -> 178 bytes .../NUCLEAR/toolHeadScrewdriver_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadSense.png | Bin 0 -> 259 bytes .../NUCLEAR/toolHeadSense_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadShovel.png | Bin 0 -> 251 bytes .../NUCLEAR/toolHeadShovel_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/NUCLEAR/toolHeadSoldering.png | Bin 0 -> 314 bytes .../NUCLEAR/toolHeadSoldering_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadSword.png | Bin 0 -> 269 bytes .../NUCLEAR/toolHeadSword_OVERLAY.png | Bin 0 -> 143 bytes .../NUCLEAR/toolHeadUniversalSpade.png | Bin 0 -> 254 bytes .../NUCLEAR/toolHeadUniversalSpade_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/toolHeadWrench.png | Bin 0 -> 517 bytes .../NUCLEAR/toolHeadWrench_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/turbineBlade.png | Bin 0 -> 395 bytes .../materialicons/NUCLEAR/turbineBlade_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/NUCLEAR/void.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/void_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/NUCLEAR/wireFine.png | Bin 0 -> 481 bytes .../materialicons/NUCLEAR/wireFine_OVERLAY.png | Bin 0 -> 271 bytes .../items/materialicons/REFINED/TURBINE_BLADE.png | Bin 0 -> 395 bytes .../REFINED/TURBINE_BLADE_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/arrowGtPlastic.png | Bin 0 -> 297 bytes .../REFINED/arrowGtPlastic_OVERLAY.png | Bin 0 -> 283 bytes .../items/materialicons/REFINED/arrowGtWood.png | Bin 0 -> 297 bytes .../materialicons/REFINED/arrowGtWood_OVERLAY.png | Bin 0 -> 294 bytes .../textures/items/materialicons/REFINED/bolt.png | Bin 0 -> 161 bytes .../items/materialicons/REFINED/bolt_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/REFINED/cell.png | Bin 0 -> 328 bytes .../items/materialicons/REFINED/cellPlasma.png | Bin 0 -> 328 bytes .../materialicons/REFINED/cellPlasma_OVERLAY.png | Bin 0 -> 290 bytes .../items/materialicons/REFINED/cell_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/REFINED/crateGtDust.png | Bin 0 -> 370 bytes .../materialicons/REFINED/crateGtDust_OVERLAY.png | Bin 0 -> 506 bytes .../items/materialicons/REFINED/crateGtGem.png | Bin 0 -> 401 bytes .../materialicons/REFINED/crateGtGem_OVERLAY.png | Bin 0 -> 526 bytes .../items/materialicons/REFINED/crateGtIngot.png | Bin 0 -> 380 bytes .../materialicons/REFINED/crateGtIngot_OVERLAY.png | Bin 0 -> 517 bytes .../items/materialicons/REFINED/crateGtPlate.png | Bin 0 -> 455 bytes .../materialicons/REFINED/crateGtPlate_OVERLAY.png | Bin 0 -> 449 bytes .../items/materialicons/REFINED/crushed.png | Bin 0 -> 441 bytes .../materialicons/REFINED/crushedCentrifuged.png | Bin 0 -> 561 bytes .../REFINED/crushedCentrifuged_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/crushedPurified.png | Bin 0 -> 460 bytes .../REFINED/crushedPurified_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/crushed_OVERLAY.png | Bin 0 -> 448 bytes .../textures/items/materialicons/REFINED/dust.png | Bin 0 -> 312 bytes .../items/materialicons/REFINED/dustImpure.png | Bin 0 -> 312 bytes .../materialicons/REFINED/dustImpure_OVERLAY.png | Bin 0 -> 430 bytes .../items/materialicons/REFINED/dustPure.png | Bin 0 -> 312 bytes .../materialicons/REFINED/dustPure_OVERLAY.png | Bin 0 -> 424 bytes .../items/materialicons/REFINED/dustSmall.png | Bin 0 -> 286 bytes .../materialicons/REFINED/dustSmall_OVERLAY.png | Bin 0 -> 149 bytes .../items/materialicons/REFINED/dustTiny.png | Bin 0 -> 221 bytes .../materialicons/REFINED/dustTiny_OVERLAY.png | Bin 0 -> 149 bytes .../items/materialicons/REFINED/dust_OVERLAY.png | Bin 0 -> 172 bytes .../textures/items/materialicons/REFINED/foil.png | Bin 0 -> 475 bytes .../items/materialicons/REFINED/foil_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/gearGt.png | Bin 0 -> 434 bytes .../items/materialicons/REFINED/gearGtSmall.png | Bin 0 -> 563 bytes .../materialicons/REFINED/gearGtSmall_OVERLAY.png | Bin 0 -> 312 bytes .../items/materialicons/REFINED/gearGt_OVERLAY.png | Bin 0 -> 172 bytes .../textures/items/materialicons/REFINED/gem.png | Bin 0 -> 419 bytes .../items/materialicons/REFINED/gemChipped.png | Bin 0 -> 575 bytes .../materialicons/REFINED/gemChipped_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/gemExquisite.png | Bin 0 -> 619 bytes .../materialicons/REFINED/gemExquisite_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/gemFlawed.png | Bin 0 -> 504 bytes .../materialicons/REFINED/gemFlawed_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/gemFlawless.png | Bin 0 -> 691 bytes .../materialicons/REFINED/gemFlawless_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/gem_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/handleMallet.png | Bin 0 -> 356 bytes .../materialicons/REFINED/handleMallet_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/REFINED/ingot.png | Bin 0 -> 344 bytes .../items/materialicons/REFINED/ingotDouble.png | Bin 0 -> 403 bytes .../materialicons/REFINED/ingotDouble_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/ingotHot.png | Bin 0 -> 335 bytes .../materialicons/REFINED/ingotHot_OVERLAY.png | Bin 0 -> 309 bytes .../items/materialicons/REFINED/ingotQuadruple.png | Bin 0 -> 375 bytes .../REFINED/ingotQuadruple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/ingotQuintuple.png | Bin 0 -> 358 bytes .../REFINED/ingotQuintuple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/ingotTriple.png | Bin 0 -> 388 bytes .../materialicons/REFINED/ingotTriple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/ingot_OVERLAY.png | Bin 0 -> 180 bytes .../textures/items/materialicons/REFINED/lens.png | Bin 0 -> 296 bytes .../items/materialicons/REFINED/lens_OVERLAY.png | Bin 0 -> 556 bytes .../items/materialicons/REFINED/nugget.png | Bin 0 -> 250 bytes .../items/materialicons/REFINED/nugget_OVERLAY.png | Bin 0 -> 163 bytes .../textures/items/materialicons/REFINED/plate.png | Bin 0 -> 275 bytes .../items/materialicons/REFINED/plateDense.png | Bin 0 -> 298 bytes .../materialicons/REFINED/plateDense_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/plateDouble.png | Bin 0 -> 297 bytes .../materialicons/REFINED/plateDouble_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/plateQuadruple.png | Bin 0 -> 310 bytes .../REFINED/plateQuadruple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/plateQuintuple.png | Bin 0 -> 312 bytes .../REFINED/plateQuintuple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/plateTriple.png | Bin 0 -> 304 bytes .../materialicons/REFINED/plateTriple_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/plate_OVERLAY.png | Bin 0 -> 173 bytes .../textures/items/materialicons/REFINED/ring.png | Bin 0 -> 311 bytes .../items/materialicons/REFINED/ring_OVERLAY.png | Bin 0 -> 174 bytes .../textures/items/materialicons/REFINED/rotor.png | Bin 0 -> 443 bytes .../items/materialicons/REFINED/rotor_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/REFINED/round.png | Bin 0 -> 200 bytes .../items/materialicons/REFINED/round_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/REFINED/screw.png | Bin 0 -> 199 bytes .../items/materialicons/REFINED/screw_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/spring.png | Bin 0 -> 276 bytes .../items/materialicons/REFINED/springSmall.png | Bin 0 -> 317 bytes .../materialicons/REFINED/springSmall_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/spring_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/REFINED/stick.png | Bin 0 -> 230 bytes .../items/materialicons/REFINED/stickLong.png | Bin 0 -> 246 bytes .../materialicons/REFINED/stickLong_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/stick_OVERLAY.png | Bin 0 -> 230 bytes .../items/materialicons/REFINED/toolHeadArrow.png | Bin 0 -> 399 bytes .../REFINED/toolHeadArrow_OVERLAY.png | Bin 0 -> 183 bytes .../items/materialicons/REFINED/toolHeadAxe.png | Bin 0 -> 255 bytes .../materialicons/REFINED/toolHeadAxe_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/toolHeadBuzzSaw.png | Bin 0 -> 533 bytes .../REFINED/toolHeadBuzzSaw_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/toolHeadChainsaw.png | Bin 0 -> 531 bytes .../REFINED/toolHeadChainsaw_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadDrill.png | Bin 0 -> 525 bytes .../REFINED/toolHeadDrill_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadFile.png | Bin 0 -> 257 bytes .../materialicons/REFINED/toolHeadFile_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadHammer.png | Bin 0 -> 235 bytes .../REFINED/toolHeadHammer_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadHoe.png | Bin 0 -> 230 bytes .../materialicons/REFINED/toolHeadHoe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadMallet.png | Bin 0 -> 340 bytes .../REFINED/toolHeadMallet_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/toolHeadPickaxe.png | Bin 0 -> 241 bytes .../REFINED/toolHeadPickaxe_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadPlow.png | Bin 0 -> 268 bytes .../materialicons/REFINED/toolHeadPlow_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadSaw.png | Bin 0 -> 258 bytes .../materialicons/REFINED/toolHeadSaw_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/toolHeadScrewdriver.png | Bin 0 -> 178 bytes .../REFINED/toolHeadScrewdriver_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadSense.png | Bin 0 -> 259 bytes .../REFINED/toolHeadSense_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadShovel.png | Bin 0 -> 251 bytes .../REFINED/toolHeadShovel_OVERLAY.png | Bin 0 -> 143 bytes .../materialicons/REFINED/toolHeadSoldering.png | Bin 0 -> 314 bytes .../REFINED/toolHeadSoldering_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadSword.png | Bin 0 -> 269 bytes .../REFINED/toolHeadSword_OVERLAY.png | Bin 0 -> 143 bytes .../REFINED/toolHeadUniversalSpade.png | Bin 0 -> 254 bytes .../REFINED/toolHeadUniversalSpade_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/toolHeadWrench.png | Bin 0 -> 517 bytes .../REFINED/toolHeadWrench_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/turbineBlade.png | Bin 0 -> 395 bytes .../materialicons/REFINED/turbineBlade_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/materialicons/REFINED/void.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/void_OVERLAY.png | Bin 0 -> 143 bytes .../items/materialicons/REFINED/wireFine.png | Bin 0 -> 481 bytes .../materialicons/REFINED/wireFine_OVERLAY.png | Bin 0 -> 271 bytes src/main/resources/assets/ic2/lang/de_DE.lang | 29 + src/main/resources/assets/ic2/lang/en_US.lang | 35 + src/main/resources/assets/ic2/lang/zh_CN.lang | 29 + .../assets/ic2/textures/armor/hazmatEx_1.png | Bin 0 -> 2669 bytes .../assets/ic2/textures/armor/hazmatEx_2.png | Bin 0 -> 967 bytes .../ic2/textures/items/cell/HydrofluoricAcid.png | Bin 0 -> 383 bytes .../ic2/textures/items/cell/HydrogenChloride.png | Bin 0 -> 402 bytes .../ic2/textures/items/cell/LithiumHydroxide.png | Bin 0 -> 289 bytes .../ic2/textures/items/cell/SulfurDioxide.png | Bin 0 -> 402 bytes .../ic2/textures/items/cell/SulfuricApatite.png | Bin 0 -> 408 bytes .../ic2/textures/items/cell/SulfuricLithium.png | Bin 0 -> 431 bytes .../ic2/textures/items/cell/SulfurousAcid.png | Bin 0 -> 409 bytes .../textures/items/cell/ThoriumTetraFluoride.png | Bin 0 -> 460 bytes .../textures/items/cell/UraniumHexaFluoride.png | Bin 0 -> 398 bytes .../textures/items/cell/UraniumTetraFluoride.png | Bin 0 -> 445 bytes .../textures/items/itemArmorHazmatChestplateEx.png | Bin 0 -> 525 bytes .../ic2/textures/items/itemArmorHazmatHelmetEx.png | Bin 0 -> 464 bytes .../textures/items/itemArmorHazmatLeggingsEx.png | Bin 0 -> 418 bytes .../ic2/textures/items/itemArmorRubBootsEx.png | Bin 0 -> 459 bytes .../textures/items/rotors/itemEnergeticRotor.png | Bin 0 -> 608 bytes .../ic2/textures/items/rotors/itemIridiumRotor.png | Bin 0 -> 555 bytes .../textures/items/rotors/itemMagnaliumRotor.png | Bin 0 -> 566 bytes .../items/rotors/itemTungstenSteelRotor.png | Bin 0 -> 523 bytes .../ic2/textures/items/rotors/itemUltimetRotor.png | Bin 0 -> 542 bytes .../ic2/textures/items/rotors/itemVibrantRotor.png | Bin 0 -> 575 bytes .../textures/items/rotors/rotorEnergeticModel.png | Bin 0 -> 3650 bytes .../textures/items/rotors/rotorIridiumModel.png | Bin 0 -> 3748 bytes .../textures/items/rotors/rotorMagnaliumModel.png | Bin 0 -> 3748 bytes .../items/rotors/rotorTungstenSteelModel.png | Bin 0 -> 3748 bytes .../textures/items/rotors/rotorUltimetModel.png | Bin 0 -> 3748 bytes .../textures/items/rotors/rotorVibrantModel.png | Bin 0 -> 3502 bytes .../assets/minecraft/sounds/mob/witch/death.ogg | Bin 0 -> 8428 bytes .../assets/minecraft/sounds/mob/witch/hit1.ogg | Bin 0 -> 5843 bytes .../assets/minecraft/sounds/mob/witch/hit2.ogg | Bin 0 -> 5455 bytes .../assets/minecraft/sounds/mob/witch/hit3.ogg | Bin 0 -> 5424 bytes .../assets/minecraft/sounds/mob/witch/hit4.ogg | Bin 0 -> 5160 bytes .../assets/minecraft/sounds/mob/witch/idle1.ogg | Bin 0 -> 8605 bytes .../assets/minecraft/sounds/mob/witch/idle2.ogg | Bin 0 -> 10948 bytes .../assets/minecraft/sounds/mob/witch/idle3.ogg | Bin 0 -> 7106 bytes .../resources/assets/miscutils/lang/de_DE.lang | 1908 ++++++ .../resources/assets/miscutils/lang/en_US.lang | 3366 +++++++++ .../resources/assets/miscutils/lang/ru_RU.lang | 303 + .../resources/assets/miscutils/lang/zh_CN.lang | 3243 +++++++++ .../assets/miscutils/textures/DevCape.png | Bin 0 -> 1232 bytes .../assets/miscutils/textures/DevCapeHD.png | Bin 0 -> 4788 bytes .../assets/miscutils/textures/FancyCape.png | Bin 0 -> 1191 bytes .../assets/miscutils/textures/FancyCapeHD.png | Bin 0 -> 9643 bytes .../resources/assets/miscutils/textures/Orange.png | Bin 0 -> 364 bytes .../assets/miscutils/textures/OrangeHD.png | Bin 0 -> 5904 bytes .../assets/miscutils/textures/PatreonCapeHD.png | Bin 0 -> 10267 bytes .../assets/miscutils/textures/TesterCape.png | Bin 0 -> 1101 bytes .../assets/miscutils/textures/TesterCapeHD.png | Bin 0 -> 7976 bytes .../miscutils/textures/aspects/Sagrausten.png | Bin 0 -> 2997 bytes .../assets/miscutils/textures/aspects/Slusium.png | Bin 0 -> 697 bytes .../assets/miscutils/textures/aspects/Xablum.png | Bin 0 -> 563 bytes .../assets/miscutils/textures/aspects/Xenil.png | Bin 0 -> 1000 bytes .../assets/miscutils/textures/aspects/Zetralt.png | Bin 0 -> 1461 bytes .../miscutils/textures/blocks/FirePit/Firepit.tcn | Bin 0 -> 1583 bytes .../textures/blocks/FirePit/mossyFirepit.png | Bin 0 -> 612 bytes .../miscutils/textures/blocks/SwirlBigBlue.png | Bin 0 -> 259 bytes .../assets/miscutils/textures/blocks/SwirlBlue.png | Bin 0 -> 284 bytes .../assets/miscutils/textures/blocks/SwirlCyan.png | Bin 0 -> 286 bytes .../assets/miscutils/textures/blocks/SwirlGray.png | Bin 0 -> 270 bytes .../assets/miscutils/textures/blocks/SwirlRed.png | Bin 0 -> 286 bytes .../miscutils/textures/blocks/SwirlYellow.png | Bin 0 -> 280 bytes .../textures/blocks/TileEntities/CASING_AMAZON.png | Bin 0 -> 677 bytes .../textures/blocks/TileEntities/Compartment/0.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/1.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/10.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/11.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/12.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/13.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/14.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/15.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/16.png | Bin 0 -> 364 bytes .../blocks/TileEntities/Compartment/17.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/18.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/19.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/2.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/20.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/21.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/22.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/23.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/24.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/25.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/26.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/27.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/28.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/29.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/3.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/30.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/31.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/4.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/5.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/6.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/7.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/8.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/Compartment/9.png | Bin 0 -> 822 bytes .../blocks/TileEntities/Compartment/wood_shelf.png | Bin 0 -> 822 bytes .../TileEntities/Compartment/wood_shelf_cans.png | Bin 0 -> 822 bytes .../TileEntities/Compartment/wood_shelf_paper.png | Bin 0 -> 822 bytes .../blocks/TileEntities/DecayablesChest_bottom.png | Bin 0 -> 738 bytes .../TileEntities/DecayablesChest_bottom_old.png | Bin 0 -> 617 bytes .../blocks/TileEntities/DecayablesChest_full.png | Bin 0 -> 2249 bytes .../blocks/TileEntities/DecayablesChest_side.png | Bin 0 -> 666 bytes .../blocks/TileEntities/DecayablesChest_top.png | Bin 0 -> 670 bytes .../textures/blocks/TileEntities/EggBox_full.png | Bin 0 -> 1777 bytes .../textures/blocks/TileEntities/EggBox_side.png | Bin 0 -> 504 bytes .../textures/blocks/TileEntities/EggBox_top.png | Bin 0 -> 654 bytes .../TileEntities/FluidReactor/OVERLAY_FRONT.png | Bin 0 -> 313 bytes .../FluidReactor/OVERLAY_FRONT_ACTIVE.png | Bin 0 -> 704 bytes .../FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta | 6 + .../TileEntities/FluidReactor/OVERLAY_SIDE.png | Bin 0 -> 333 bytes .../FluidReactor/OVERLAY_SIDE_ACTIVE.png | Bin 0 -> 1049 bytes .../FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta | 6 + .../TileEntities/FluidReactor/OVERLAY_TOP.png | Bin 0 -> 228 bytes .../FluidReactor/OVERLAY_TOP_ACTIVE.png | Bin 0 -> 224 bytes .../TileEntities/Generic_Creative_Texture.png | Bin 0 -> 383 bytes .../MACHINE_CASING_ADVANCED_CRYOGENIC.png | Bin 0 -> 586 bytes .../MACHINE_CASING_ADVANCED_VOLCANUS.png | Bin 0 -> 601 bytes .../TileEntities/MACHINE_CASING_CENTRIFUGE.png | Bin 0 -> 632 bytes .../MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png | Bin 0 -> 522 bytes .../MACHINE_CASING_FIREBOX_STABALLOY.png | Bin 0 -> 825 bytes .../TileEntities/MACHINE_CASING_FLOTATION.png | Bin 0 -> 647 bytes .../MACHINE_CASING_FLUID_INCOLOY_DS.png | Bin 0 -> 1232 bytes .../TileEntities/MACHINE_CASING_FUSION_FRONT.png | Bin 0 -> 515 bytes .../MACHINE_CASING_FUSION_FRONT_ACTIVE.png | Bin 0 -> 502 bytes .../TileEntities/MACHINE_CASING_GEARBOX_T1.png | Bin 0 -> 633 bytes .../MACHINE_CASING_GRINDING_FACTORY.png | Bin 0 -> 671 bytes .../TileEntities/MACHINE_CASING_LAURENIUM.png | Bin 0 -> 416 bytes .../blocks/TileEntities/MACHINE_CASING_PIPE_T1.png | Bin 0 -> 598 bytes .../TileEntities/MACHINE_CASING_ROCKETDYNE.png | Bin 0 -> 643 bytes .../TileEntities/MACHINE_CASING_STABLE_GRISIUM.png | Bin 0 -> 662 bytes .../MACHINE_CASING_STABLE_HASTELLOY_N.png | Bin 0 -> 642 bytes .../MACHINE_CASING_STABLE_HASTELLOY_X.png | Bin 0 -> 649 bytes .../MACHINE_CASING_STABLE_INCOLOY_020.png | Bin 0 -> 665 bytes .../MACHINE_CASING_STABLE_INCOLOY_DS.png | Bin 0 -> 660 bytes .../MACHINE_CASING_STABLE_INCOLOY_MA956.png | Bin 0 -> 654 bytes .../MACHINE_CASING_STABLE_MARAGINGSTEEL.png | Bin 0 -> 394 bytes .../TileEntities/MACHINE_CASING_STABLE_POTIN.png | Bin 0 -> 635 bytes .../MACHINE_CASING_STABLE_RED_STEEL.png | Bin 0 -> 529 bytes .../MACHINE_CASING_STABLE_STELLITE.png | Bin 0 -> 659 bytes .../MACHINE_CASING_STABLE_TALONITE.png | Bin 0 -> 665 bytes .../MACHINE_CASING_STABLE_TANTALLOY61.png | Bin 0 -> 654 bytes .../MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png | Bin 0 -> 459 bytes ...CHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png | Bin 0 -> 436 bytes ...MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png | Bin 0 -> 623 bytes .../MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png | Bin 0 -> 504 bytes .../TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png | Bin 0 -> 662 bytes .../MACHINE_CASING_STABLE_ZERON100.png | Bin 0 -> 649 bytes .../MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png | Bin 0 -> 665 bytes .../blocks/TileEntities/MACHINE_PESTKILLER_TOP.png | Bin 0 -> 624 bytes .../blocks/TileEntities/ModularTable_output.png | Bin 0 -> 260 bytes .../blocks/TileEntities/ModularTable_side.png | Bin 0 -> 244 bytes .../blocks/TileEntities/ModularTable_top.png | Bin 0 -> 289 bytes .../TileEntities/ReactorColdTrap/OVERLAY_FRONT.png | Bin 0 -> 344 bytes .../ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png | Bin 0 -> 387 bytes .../TileEntities/ReactorColdTrap/OVERLAY_SIDE.png | Bin 0 -> 345 bytes .../ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png | Bin 0 -> 668 bytes .../ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta | 6 + .../TileEntities/ReactorColdTrap/OVERLAY_TOP.png | Bin 0 -> 228 bytes .../ReactorColdTrap/OVERLAY_TOP_ACTIVE.png | Bin 0 -> 224 bytes .../ReactorProcessingUnit/OVERLAY_FRONT.png | Bin 0 -> 439 bytes .../ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png | Bin 0 -> 704 bytes .../OVERLAY_FRONT_ACTIVE.png.mcmeta | 6 + .../ReactorProcessingUnit/OVERLAY_SIDE.png | Bin 0 -> 439 bytes .../ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png | Bin 0 -> 1049 bytes .../OVERLAY_SIDE_ACTIVE.png.mcmeta | 6 + .../ReactorProcessingUnit/OVERLAY_TOP.png | Bin 0 -> 367 bytes .../ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png | Bin 0 -> 366 bytes .../RoundRobinator/MACHINE_CASING_VENT.png | Bin 0 -> 467 bytes .../blocks/TileEntities/RoundRobinator/Side_0.png | Bin 0 -> 1448 bytes .../blocks/TileEntities/RoundRobinator/Side_1.png | Bin 0 -> 1444 bytes .../blocks/TileEntities/RoundRobinator/Side_2.png | Bin 0 -> 1446 bytes .../blocks/TileEntities/RoundRobinator/Side_3.png | Bin 0 -> 1446 bytes .../blocks/TileEntities/RoundRobinator/Side_4.png | Bin 0 -> 1443 bytes .../blocks/TileEntities/RoundRobinator/Top_0.png | Bin 0 -> 1405 bytes .../blocks/TileEntities/RoundRobinator/Top_1.png | Bin 0 -> 1403 bytes .../blocks/TileEntities/RoundRobinator/Top_2.png | Bin 0 -> 1403 bytes .../blocks/TileEntities/RoundRobinator/Top_3.png | Bin 0 -> 1402 bytes .../blocks/TileEntities/RoundRobinator/Top_4.png | Bin 0 -> 1400 bytes .../TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png | Bin 0 -> 1505 bytes .../STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta | 5 + .../textures/blocks/TileEntities/_PlaceHolder.png | Bin 0 -> 696 bytes .../TileEntities/adv_machine_dimensional.png | Bin 0 -> 1660 bytes .../adv_machine_dimensional.png.mcmeta | 5 + .../adv_machine_dimensional_cover_blue.png | Bin 0 -> 1457 bytes .../adv_machine_dimensional_cover_blue.png.mcmeta | 5 + .../adv_machine_dimensional_cover_orange.png | Bin 0 -> 1383 bytes ...adv_machine_dimensional_cover_orange.png.mcmeta | 5 + .../blocks/TileEntities/adv_machine_lesu.png | Bin 0 -> 822 bytes .../blocks/TileEntities/adv_machine_matterfab.png | Bin 0 -> 296 bytes .../TileEntities/adv_machine_matterfab_active.png | Bin 0 -> 277 bytes .../adv_machine_matterfab_active_animated.png | Bin 0 -> 694 bytes ...dv_machine_matterfab_active_animated.png.mcmeta | 6 + .../adv_machine_matterfab_animated.png | Bin 0 -> 762 bytes .../adv_machine_matterfab_animated.png.mcmeta | 6 + .../blocks/TileEntities/adv_machine_oil.png | Bin 0 -> 238 bytes .../TileEntities/adv_machine_screen_frequency.png | Bin 0 -> 427 bytes .../TileEntities/adv_machine_screen_logo.png | Bin 0 -> 526 bytes .../adv_machine_screen_logo.png.mcmeta | 6 + .../TileEntities/adv_machine_screen_random1.png | Bin 0 -> 12342 bytes .../adv_machine_screen_random1.png.mcmeta | 5 + .../TileEntities/adv_machine_screen_random2.png | Bin 0 -> 12342 bytes .../adv_machine_screen_random2.png.mcmeta | 5 + .../TileEntities/adv_machine_screen_random3.png | Bin 0 -> 12342 bytes .../adv_machine_screen_random3.png.mcmeta | 5 + .../blocks/TileEntities/adv_machine_uum.png | Bin 0 -> 334 bytes .../TileEntities/adv_machine_vent_rotating.png | Bin 0 -> 3126 bytes .../adv_machine_vent_rotating.png.mcmeta | 5 + .../textures/blocks/TileEntities/audio_out.png | Bin 0 -> 275 bytes .../blocks/TileEntities/audio_out_active.png | Bin 0 -> 433 bytes .../TileEntities/audio_out_active.png.mcmeta | 5 + .../textures/blocks/TileEntities/bronze_side.png | Bin 0 -> 395 bytes .../blocks/TileEntities/bronze_side_cabinet.png | Bin 0 -> 401 bytes .../blocks/TileEntities/bronze_top_crafting.png | Bin 0 -> 383 bytes .../textures/blocks/TileEntities/cover_charger.png | Bin 0 -> 284 bytes .../blocks/TileEntities/cover_crafting.png | Bin 0 -> 822 bytes .../blocks/TileEntities/cover_discharge.png | Bin 0 -> 272 bytes .../TileEntities/cover_redstone_conductor.png | Bin 0 -> 822 bytes .../blocks/TileEntities/cover_redstone_emitter.png | Bin 0 -> 822 bytes .../blocks/TileEntities/dirt_podzol_top.png | Bin 0 -> 823 bytes .../textures/blocks/TileEntities/fishtrap.png | Bin 0 -> 326 bytes .../blocks/TileEntities/gt4/machine_bottom.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/machine_side.png | Bin 0 -> 822 bytes .../TileEntities/gt4/machine_side_cabinet.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/machine_top.png | Bin 0 -> 822 bytes .../blocks/TileEntities/high_adv_machine.png | Bin 0 -> 822 bytes .../TileEntities/high_adv_machine_dimensional.png | Bin 0 -> 1713 bytes .../high_adv_machine_dimensional.png.mcmeta | 5 + .../blocks/TileEntities/log_acacia_top.png | Bin 0 -> 603 bytes .../blocks/TileEntities/machine_bottom.png | Bin 0 -> 822 bytes .../textures/blocks/TileEntities/machine_top.png | Bin 0 -> 822 bytes .../TileEntities/machine_top_dieselmotor.png | Bin 0 -> 258 bytes .../TileEntities/machine_top_dieselmotor2.png | Bin 0 -> 233 bytes .../machine_top_dieselmotor2_active.png | Bin 0 -> 395 bytes .../machine_top_dieselmotor2_active.png.mcmeta | 5 + .../machine_top_dieselmotor_active.png | Bin 0 -> 427 bytes .../machine_top_dieselmotor_active.png.mcmeta | 5 + .../TileEntities/machine_top_vent_rotating.png | Bin 0 -> 517 bytes .../machine_top_vent_rotating.png.mcmeta | 5 + .../machine_top_vent_rotating_fast.png | Bin 0 -> 517 bytes .../machine_top_vent_rotating_fast.png.mcmeta | 5 + .../blocks/TileEntities/sewer_adv_sides.png | Bin 0 -> 379 bytes .../textures/blocks/TileEntities/sewer_adv_top.png | Bin 0 -> 373 bytes .../textures/blocks/TileEntities/sewer_sides.png | Bin 0 -> 375 bytes .../textures/blocks/TileEntities/sewer_top.png | Bin 0 -> 375 bytes .../miscutils/textures/blocks/blockAntiGrief.png | Bin 0 -> 1086 bytes .../miscutils/textures/blocks/blockBlock.png | Bin 0 -> 424 bytes .../miscutils/textures/blocks/blockBloodSteel.png | Bin 0 -> 529 bytes .../miscutils/textures/blocks/blockDefault.png | Bin 0 -> 942 bytes .../miscutils/textures/blocks/blockFrameGt.png | Bin 0 -> 437 bytes .../miscutils/textures/blocks/blockMFEffect.png | Bin 0 -> 205 bytes .../blocks/blockNuclearFueledHeliumGenerator.png | Bin 0 -> 440 bytes .../miscutils/textures/blocks/blockOre_Overlay.png | Bin 0 -> 231 bytes .../miscutils/textures/blocks/blockStaballoy.png | Bin 0 -> 942 bytes .../miscutils/textures/blocks/blockStone.png | Bin 0 -> 223 bytes .../textures/blocks/chrono/CyberPanel.png | Bin 0 -> 328 bytes .../textures/blocks/chrono/CyberPanel2.png | Bin 0 -> 350 bytes .../textures/blocks/chrono/MetalFunnel.png | Bin 0 -> 378 bytes .../textures/blocks/chrono/MetalGrate.png | Bin 0 -> 333 bytes .../textures/blocks/chrono/MetalGrate2.png | Bin 0 -> 269 bytes .../textures/blocks/chrono/MetalGrate3.png | Bin 0 -> 292 bytes .../textures/blocks/chrono/MetalGrateA_Solid.png | Bin 0 -> 304 bytes .../textures/blocks/chrono/MetalPanel.png | Bin 0 -> 318 bytes .../textures/blocks/chrono/MetalSheet.png | Bin 0 -> 298 bytes .../textures/blocks/chrono/MetalSheet10.png | Bin 0 -> 675 bytes .../textures/blocks/chrono/MetalSheet11.png | Bin 0 -> 574 bytes .../textures/blocks/chrono/MetalSheet12.png | Bin 0 -> 753 bytes .../textures/blocks/chrono/MetalSheet2.png | Bin 0 -> 318 bytes .../textures/blocks/chrono/MetalSheet3.png | Bin 0 -> 863 bytes .../textures/blocks/chrono/MetalSheet4.png | Bin 0 -> 851 bytes .../textures/blocks/chrono/MetalSheet5.png | Bin 0 -> 877 bytes .../textures/blocks/chrono/MetalSheet6.png | Bin 0 -> 401 bytes .../textures/blocks/chrono/MetalSheet7.png | Bin 0 -> 543 bytes .../textures/blocks/chrono/MetalSheet8.png | Bin 0 -> 834 bytes .../textures/blocks/chrono/MetalSheet9.png | Bin 0 -> 941 bytes .../textures/blocks/chrono/Overlay_Cyber.png | Bin 0 -> 295 bytes .../miscutils/textures/blocks/clear_flow.png | Bin 0 -> 942 bytes .../miscutils/textures/blocks/clear_still.png | Bin 0 -> 942 bytes .../textures/blocks/compressed/obsidian1.png | Bin 0 -> 656 bytes .../textures/blocks/compressed/obsidian2.png | Bin 0 -> 757 bytes .../textures/blocks/compressed/obsidian3.png | Bin 0 -> 801 bytes .../textures/blocks/compressed/obsidian4.png | Bin 0 -> 814 bytes .../textures/blocks/compressed/obsidian5.png | Bin 0 -> 787 bytes .../textures/blocks/compressed/obsidian_invert.png | Bin 0 -> 770 bytes .../textures/blocks/crop/blockCrop.Hemp.1.png | Bin 0 -> 220 bytes .../textures/blocks/crop/blockCrop.Hemp.2.png | Bin 0 -> 399 bytes .../textures/blocks/crop/blockCrop.Hemp.3.png | Bin 0 -> 572 bytes .../textures/blocks/crop/blockCrop.Hemp.4.png | Bin 0 -> 534 bytes .../textures/blocks/crop/blockCrop.Hemp.5.png | Bin 0 -> 661 bytes .../textures/blocks/door_cactus_lower.png | Bin 0 -> 558 bytes .../textures/blocks/door_cactus_upper.png | Bin 0 -> 563 bytes .../miscutils/textures/blocks/door_glass_lower.png | Bin 0 -> 176 bytes .../miscutils/textures/blocks/door_glass_upper.png | Bin 0 -> 183 bytes .../miscutils/textures/blocks/door_ice_lower.png | Bin 0 -> 508 bytes .../miscutils/textures/blocks/door_ice_upper.png | Bin 0 -> 542 bytes .../textures/blocks/fluid/Fluid_Cryotheum_Flow.png | Bin 0 -> 2943 bytes .../blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta | 5 + .../blocks/fluid/Fluid_Cryotheum_Still.png | Bin 0 -> 1911 bytes .../blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta | 45 + .../textures/blocks/fluid/Fluid_Ender_Flow.png | Bin 0 -> 3595 bytes .../blocks/fluid/Fluid_Ender_Flow.png.mcmeta | 5 + .../textures/blocks/fluid/Fluid_Ender_Still.png | Bin 0 -> 2001 bytes .../blocks/fluid/Fluid_Ender_Still.png.mcmeta | 45 + .../textures/blocks/fluid/Fluid_Pyrotheum_Flow.png | Bin 0 -> 3210 bytes .../blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta | 5 + .../blocks/fluid/Fluid_Pyrotheum_Still.png | Bin 0 -> 3691 bytes .../blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta | 45 + .../textures/blocks/fluid/Fluid_Sludge_Flow.png | Bin 0 -> 3601 bytes .../blocks/fluid/Fluid_Sludge_Flow.png.mcmeta | 5 + .../textures/blocks/fluid/Fluid_Sludge_Still.png | Bin 0 -> 2038 bytes .../blocks/fluid/Fluid_Sludge_Still.png.mcmeta | 45 + .../textures/blocks/fluids/fluid.cryotheum.png | Bin 0 -> 1911 bytes .../blocks/fluids/fluid.cryotheum.png.mcmeta | 45 + .../textures/blocks/fluids/fluid.ender.png | Bin 0 -> 2001 bytes .../textures/blocks/fluids/fluid.ender.png.mcmeta | 45 + .../fluids/fluid.fluid.autogenerated.flowing.png | Bin 0 -> 9232 bytes .../fluid.fluid.autogenerated.flowing.png.mcmeta | 3 + .../blocks/fluids/fluid.fluid.autogenerated.png | Bin 0 -> 7019 bytes .../fluids/fluid.fluid.autogenerated.png.mcmeta | 5 + .../fluids/fluid.fluid.autogenerated.still.png | Bin 0 -> 9586 bytes .../fluid.fluid.autogenerated.still.png.mcmeta | 5 + .../blocks/fluids/fluid.hydrofluoricacid.png | Bin 0 -> 3998 bytes .../fluids/fluid.hydrofluoricacid.png.mcmeta | 5 + .../blocks/fluids/fluid.hydrogenchloride.png | Bin 0 -> 2844 bytes .../fluids/fluid.hydrogenchloride.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.jackdaniels.png | Bin 0 -> 3454 bytes .../blocks/fluids/fluid.jackdaniels.png.mcmeta | 5 + .../blocks/fluids/fluid.lithiumhydroxide.png | Bin 0 -> 22548 bytes .../fluids/fluid.lithiumhydroxide.png.mcmeta | 5 + .../fluids/fluid.molten.autogenerated.new.1.png | Bin 0 -> 4175 bytes .../fluids/fluid.molten.autogenerated.old.png | Bin 0 -> 7019 bytes .../blocks/fluids/fluid.molten.autogenerated.png | Bin 0 -> 2928 bytes .../fluids/fluid.molten.autogenerated.png.mcmeta | 5 + .../blocks/fluids/fluid.plasma.autogenerated.png | Bin 0 -> 1461 bytes .../fluids/fluid.plasma.autogenerated.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.pyrotheum.png | Bin 0 -> 3691 bytes .../blocks/fluids/fluid.pyrotheum.png.mcmeta | 45 + .../textures/blocks/fluids/fluid.sulfurdioxide.png | Bin 0 -> 2844 bytes .../blocks/fluids/fluid.sulfurdioxide.png.mcmeta | 5 + .../blocks/fluids/fluid.sulfuricapatite.png | Bin 0 -> 2844 bytes .../blocks/fluids/fluid.sulfuricapatite.png.mcmeta | 5 + .../blocks/fluids/fluid.sulfuriclithium.png | Bin 0 -> 31006 bytes .../blocks/fluids/fluid.sulfuriclithium.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.sulfurousacid.png | Bin 0 -> 2844 bytes .../blocks/fluids/fluid.sulfurousacid.png.mcmeta | 5 + .../blocks/fluids/fluid.thoriumhexafluoride.png | Bin 0 -> 3011 bytes .../blocks/fluids/fluid.thoriumtetrafluoride.png | Bin 0 -> 3167 bytes .../fluids/fluid.thoriumtetrafluoride.png.mcmeta | 5 + .../blocks/fluids/fluid.uraniumhexafluoride.png | Bin 0 -> 3196 bytes .../fluids/fluid.uraniumhexafluoride.png.mcmeta | 5 + .../blocks/fluids/fluid.uraniumtetrafluoride.png | Bin 0 -> 3196 bytes .../fluids/fluid.uraniumtetrafluoride.png.mcmeta | 5 + .../blocks/hellfire/blockHellFire_layer_0.png | Bin 0 -> 13281 bytes .../hellfire/blockHellFire_layer_0.png.mcmeta | 38 + .../blocks/hellfire/blockHellFire_layer_1.png | Bin 0 -> 13886 bytes .../hellfire/blockHellFire_layer_1.png.mcmeta | 3 + .../iconsets/BigTurbine/LARGE_TURBINE_HP_1.png | Bin 0 -> 334 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_2.png | Bin 0 -> 448 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_3.png | Bin 0 -> 367 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_4.png | Bin 0 -> 461 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_5.png | Bin 0 -> 332 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_6.png | Bin 0 -> 505 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_7.png | Bin 0 -> 391 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_8.png | Bin 0 -> 446 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_9.png | Bin 0 -> 359 bytes .../LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png | Bin 0 -> 546 bytes .../LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png | Bin 0 -> 865 bytes .../LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png | Bin 0 -> 608 bytes .../LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png | Bin 0 -> 909 bytes .../LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png | Bin 0 -> 880 bytes .../LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png | Bin 0 -> 945 bytes .../LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png | Bin 0 -> 656 bytes .../LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png | Bin 0 -> 875 bytes .../LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png | Bin 0 -> 644 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_1.png | Bin 0 -> 399 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_2.png | Bin 0 -> 445 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_3.png | Bin 0 -> 452 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_4.png | Bin 0 -> 479 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_5.png | Bin 0 -> 332 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_6.png | Bin 0 -> 494 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_7.png | Bin 0 -> 470 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_8.png | Bin 0 -> 466 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_9.png | Bin 0 -> 447 bytes .../LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png | Bin 0 -> 604 bytes .../LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png | Bin 0 -> 851 bytes .../LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png | Bin 0 -> 646 bytes .../LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png | Bin 0 -> 897 bytes .../LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png | Bin 0 -> 880 bytes .../LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png | Bin 0 -> 939 bytes .../LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png | Bin 0 -> 633 bytes .../LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png | Bin 0 -> 894 bytes .../LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta | 3 + .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png | Bin 0 -> 659 bytes .../textures/blocks/iconsets/FUSIONIII_1.png | Bin 0 -> 486 bytes .../textures/blocks/iconsets/FUSIONIII_10.png | Bin 0 -> 491 bytes .../textures/blocks/iconsets/FUSIONIII_11.png | Bin 0 -> 508 bytes .../textures/blocks/iconsets/FUSIONIII_12.png | Bin 0 -> 494 bytes .../textures/blocks/iconsets/FUSIONIII_2.png | Bin 0 -> 504 bytes .../textures/blocks/iconsets/FUSIONIII_3.png | Bin 0 -> 463 bytes .../textures/blocks/iconsets/FUSIONIII_4.png | Bin 0 -> 460 bytes .../textures/blocks/iconsets/FUSIONIII_5.png | Bin 0 -> 478 bytes .../textures/blocks/iconsets/FUSIONIII_6.png | Bin 0 -> 473 bytes .../textures/blocks/iconsets/FUSIONIII_7.png | Bin 0 -> 429 bytes .../textures/blocks/iconsets/FUSIONIII_8.png | Bin 0 -> 531 bytes .../textures/blocks/iconsets/FUSIONIII_9.png | Bin 0 -> 486 bytes .../textures/blocks/iconsets/Grinder/GRINDER1.png | Bin 0 -> 647 bytes .../textures/blocks/iconsets/Grinder/GRINDER2.png | Bin 0 -> 541 bytes .../textures/blocks/iconsets/Grinder/GRINDER3.png | Bin 0 -> 663 bytes .../textures/blocks/iconsets/Grinder/GRINDER4.png | Bin 0 -> 533 bytes .../textures/blocks/iconsets/Grinder/GRINDER5.png | Bin 0 -> 271 bytes .../textures/blocks/iconsets/Grinder/GRINDER6.png | Bin 0 -> 526 bytes .../textures/blocks/iconsets/Grinder/GRINDER7.png | Bin 0 -> 665 bytes .../textures/blocks/iconsets/Grinder/GRINDER8.png | Bin 0 -> 528 bytes .../textures/blocks/iconsets/Grinder/GRINDER9.png | Bin 0 -> 625 bytes .../blocks/iconsets/Grinder/GRINDER_ACTIVE1.png | Bin 0 -> 748 bytes .../iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE2.png | Bin 0 -> 766 bytes .../iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE3.png | Bin 0 -> 849 bytes .../iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn | Bin 0 -> 5038 bytes .../blocks/iconsets/Grinder/GRINDER_ACTIVE4.png | Bin 0 -> 897 bytes .../iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE5.png | Bin 0 -> 464 bytes .../iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE6.png | Bin 0 -> 971 bytes .../iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE7.png | Bin 0 -> 768 bytes .../iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE8.png | Bin 0 -> 757 bytes .../iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta | 3 + .../blocks/iconsets/Grinder/GRINDER_ACTIVE9.png | Bin 0 -> 747 bytes .../iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta | 3 + .../textures/blocks/iconsets/LARGECENTRIFUGE1.png | Bin 0 -> 515 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE2.png | Bin 0 -> 507 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE3.png | Bin 0 -> 539 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE4.png | Bin 0 -> 546 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE5.png | Bin 0 -> 332 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE6.png | Bin 0 -> 530 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE7.png | Bin 0 -> 546 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE8.png | Bin 0 -> 511 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE9.png | Bin 0 -> 509 bytes .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png | Bin 0 -> 670 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png | Bin 0 -> 863 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png | Bin 0 -> 687 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png | Bin 0 -> 944 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png | Bin 0 -> 880 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png | Bin 0 -> 955 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png | Bin 0 -> 696 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png | Bin 0 -> 866 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta | 3 + .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png | Bin 0 -> 657 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta | 3 + .../blocks/iconsets/MACHINE_CASING_FUSION_3.png | Bin 0 -> 525 bytes .../iconsets/MACHINE_CASING_FUSION_COIL_II.png | Bin 0 -> 517 bytes .../iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png | Bin 0 -> 505 bytes .../textures/blocks/iconsets/OVERLAY_CATALYSTS.png | Bin 0 -> 1371 bytes .../blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta | 5 + .../blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png | Bin 0 -> 553 bytes .../blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png | Bin 0 -> 334 bytes .../iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png | Bin 0 -> 455 bytes .../blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png | Bin 0 -> 353 bytes .../blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png | Bin 0 -> 377 bytes .../OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png | Bin 0 -> 724 bytes ...Y_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta | 5 + ...Y_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png | Bin 0 -> 733 bytes ..._ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta | 5 + .../OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png | Bin 0 -> 363 bytes ...OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png | Bin 0 -> 350 bytes ...ERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png | Bin 0 -> 533 bytes ...RONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta | 5 + ...RONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png | Bin 0 -> 557 bytes ...ECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta | 5 + .../blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png | Bin 0 -> 1652 bytes .../iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta | 5 + .../blocks/iconsets/OVERLAY_MUFFLER_ADV.png | Bin 0 -> 754 bytes .../blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png | Bin 0 -> 878 bytes .../iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta | 6 + .../blocks/iconsets/TieredHulls/CASING_EV.png | Bin 0 -> 2035 bytes .../blocks/iconsets/TieredHulls/CASING_HV.png | Bin 0 -> 2048 bytes .../blocks/iconsets/TieredHulls/CASING_IV.png | Bin 0 -> 2039 bytes .../blocks/iconsets/TieredHulls/CASING_LV.png | Bin 0 -> 1887 bytes .../blocks/iconsets/TieredHulls/CASING_LuV.png | Bin 0 -> 1929 bytes .../blocks/iconsets/TieredHulls/CASING_MAX.png | Bin 0 -> 2055 bytes .../blocks/iconsets/TieredHulls/CASING_MV.png | Bin 0 -> 2060 bytes .../blocks/iconsets/TieredHulls/CASING_ULV.png | Bin 0 -> 1952 bytes .../blocks/iconsets/TieredHulls/CASING_UV.png | Bin 0 -> 2049 bytes .../blocks/iconsets/TieredHulls/CASING_ZPM.png | Bin 0 -> 2112 bytes .../assets/miscutils/textures/blocks/mash_flow.png | Bin 0 -> 942 bytes .../miscutils/textures/blocks/mash_still.png | Bin 0 -> 942 bytes .../textures/blocks/metro/OVERLAY_GRATE_A.png | Bin 0 -> 423 bytes .../textures/blocks/metro/TEXTURE_MAGIC_A.png | Bin 0 -> 1156 bytes .../blocks/metro/TEXTURE_MAGIC_A.png.mcmeta | 6 + .../blocks/metro/TEXTURE_METAL_GRATE_A.png | Bin 0 -> 344 bytes .../blocks/metro/TEXTURE_METAL_PANEL_A.png | Bin 0 -> 533 bytes .../blocks/metro/TEXTURE_METAL_PANEL_B.png | Bin 0 -> 569 bytes .../blocks/metro/TEXTURE_METAL_PANEL_C.png | Bin 0 -> 447 bytes .../blocks/metro/TEXTURE_METAL_PANEL_D.png | Bin 0 -> 448 bytes .../blocks/metro/TEXTURE_METAL_PANEL_E.png | Bin 0 -> 537 bytes .../blocks/metro/TEXTURE_METAL_PANEL_F.png | Bin 0 -> 453 bytes .../blocks/metro/TEXTURE_METAL_PANEL_G.png | Bin 0 -> 1220 bytes .../blocks/metro/TEXTURE_METAL_PANEL_H.png | Bin 0 -> 312 bytes .../blocks/metro/TEXTURE_METAL_PANEL_I.png | Bin 0 -> 493 bytes .../blocks/metro/TEXTURE_ORGANIC_PANEL_A.png | Bin 0 -> 598 bytes .../metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png | Bin 0 -> 2503 bytes .../TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta | 6 + .../textures/blocks/metro/TEXTURE_STONE_BIRD_A.png | Bin 0 -> 647 bytes .../blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png | Bin 0 -> 630 bytes .../blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png | Bin 0 -> 627 bytes .../textures/blocks/metro/TEXTURE_STONE_BLUE_A.png | Bin 0 -> 410 bytes .../blocks/metro/TEXTURE_STONE_GREEN_A.png | Bin 0 -> 244 bytes .../textures/blocks/metro/TEXTURE_STONE_RED_A.png | Bin 0 -> 532 bytes .../textures/blocks/metro/TEXTURE_STONE_RED_B.png | Bin 0 -> 367 bytes .../blocks/metro/TEXTURE_STONE_TABLET_A.png | Bin 0 -> 572 bytes .../blocks/metro/TEXTURE_STONE_TABLET_B.png | Bin 0 -> 579 bytes .../textures/blocks/metro/TEXTURE_TECH_A.png | Bin 0 -> 266 bytes .../textures/blocks/metro/TEXTURE_TECH_B.png | Bin 0 -> 285 bytes .../textures/blocks/metro/TEXTURE_TECH_C.png | Bin 0 -> 312 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_A.png | Bin 0 -> 513 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_B.png | Bin 0 -> 474 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_C.png | Bin 0 -> 469 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_D.png | Bin 0 -> 360 bytes .../assets/miscutils/textures/blocks/net.png | Bin 0 -> 350 bytes .../miscutils/textures/blocks/redox/redox1.png | Bin 0 -> 562 bytes .../miscutils/textures/blocks/redox/redox2.png | Bin 0 -> 721 bytes .../miscutils/textures/blocks/redox/redox3.png | Bin 0 -> 776 bytes .../miscutils/textures/blocks/redox/redox4.png | Bin 0 -> 781 bytes .../miscutils/textures/blocks/redox/redox5.png | Bin 0 -> 794 bytes .../miscutils/textures/blocks/redox/redox6.png | Bin 0 -> 779 bytes .../blocks/redstone/redstone_meter/top.png | Bin 0 -> 822 bytes .../miscutils/textures/blocks/rum_mature_flow.png | Bin 0 -> 942 bytes .../miscutils/textures/blocks/rum_mature_still.png | Bin 0 -> 942 bytes .../textures/blocks/rum_semi_mature_flow.png | Bin 0 -> 942 bytes .../textures/blocks/rum_semi_mature_still.png | Bin 0 -> 942 bytes .../textures/blocks/trees/leaves/leaves_pine.png | Bin 0 -> 688 bytes .../blocks/trees/leaves/leaves_pine_opaque.png | Bin 0 -> 687 bytes .../blocks/trees/leaves/leaves_rainforest.png | Bin 0 -> 455 bytes .../trees/leaves/leaves_rainforest_opaque.png | Bin 0 -> 457 bytes .../textures/blocks/trees/logs/log_pine.png | Bin 0 -> 300 bytes .../textures/blocks/trees/logs/log_pine_top.png | Bin 0 -> 572 bytes .../textures/blocks/trees/logs/log_rainforest.png | Bin 0 -> 579 bytes .../blocks/trees/logs/log_rainforest_top.png | Bin 0 -> 580 bytes .../blocks/trees/saplings/sapling_pine.png | Bin 0 -> 432 bytes .../blocks/trees/saplings/sapling_rainforest.png | Bin 0 -> 372 bytes .../assets/miscutils/textures/blocks/workbench.png | Bin 0 -> 410 bytes .../miscutils/textures/blocks/workbench_top.png | Bin 0 -> 550 bytes .../miscutils/textures/entity/australia/boar.png | Bin 0 -> 3022 bytes .../textures/entity/australia/bush_spider.png | Bin 0 -> 1445 bytes .../textures/entity/australia/dingo/dingo.png | Bin 0 -> 3643 bytes .../entity/australia/dingo/dingo_angry.png | Bin 0 -> 1712 bytes .../entity/australia/dingo/dingo_collar.png | Bin 0 -> 3576 bytes .../textures/entity/australia/dingo/dingo_tame.png | Bin 0 -> 3676 bytes .../textures/entity/australia/octopus.png | Bin 0 -> 720 bytes .../assets/miscutils/textures/entity/batKing.png | Bin 0 -> 1994 bytes .../miscutils/textures/entity/golemStaballoy.png | Bin 0 -> 5433 bytes .../assets/miscutils/textures/entity/sickBlaze.png | Bin 0 -> 1221 bytes .../textures/entity/villager/aboriginal.png | Bin 0 -> 1154 bytes .../miscutils/textures/entity/villager/banker.png | Bin 0 -> 937 bytes .../textures/entity/villager/technician.png | Bin 0 -> 996 bytes .../miscutils/textures/entity/villager/trader.png | Bin 0 -> 955 bytes .../miscutils/textures/enviroment/moon_phases.png | Bin 0 -> 1029 bytes .../assets/miscutils/textures/enviroment/snow.png | Bin 0 -> 849 bytes .../assets/miscutils/textures/enviroment/sun.png | Bin 0 -> 694 bytes .../miscutils/textures/gui/AdvancedBoiler.png | Bin 0 -> 1457 bytes .../textures/gui/AdvancedCraftingTable.png | Bin 0 -> 1212 bytes .../miscutils/textures/gui/BronzeCraftingTable.png | Bin 0 -> 1057 bytes .../miscutils/textures/gui/CircuitProgrammer.png | Bin 0 -> 2857 bytes .../assets/miscutils/textures/gui/CokeOven.png | Bin 0 -> 1025 bytes .../assets/miscutils/textures/gui/Cyclotron.png | Bin 0 -> 2756 bytes .../assets/miscutils/textures/gui/FishTrap.png | Bin 0 -> 882 bytes .../assets/miscutils/textures/gui/FluidReactor.png | Bin 0 -> 3587 bytes .../assets/miscutils/textures/gui/Generic3By3.png | Bin 0 -> 934 bytes .../textures/gui/IndustrialCentrifuge.png | Bin 0 -> 1104 bytes .../textures/gui/IndustrialCuttingMachine.png | Bin 0 -> 889 bytes .../textures/gui/IndustrialElectrolyzer.png | Bin 0 -> 1136 bytes .../miscutils/textures/gui/IndustrialExtruder.png | Bin 0 -> 889 bytes .../miscutils/textures/gui/IndustrialMixer.png | Bin 0 -> 909 bytes .../miscutils/textures/gui/IndustrialSifter.png | Bin 0 -> 921 bytes .../textures/gui/IndustrialThermalCentrifuge.png | Bin 0 -> 912 bytes .../miscutils/textures/gui/IndustrialWashPlant.png | Bin 0 -> 911 bytes .../textures/gui/IndustrialWireFactory.png | Bin 0 -> 1030 bytes .../miscutils/textures/gui/IronBlastFurnace.png | Bin 0 -> 954 bytes .../miscutils/textures/gui/MacerationStack.png | Bin 0 -> 1070 bytes .../miscutils/textures/gui/MaterialPress.png | Bin 0 -> 1156 bytes .../miscutils/textures/gui/MatterFabricator.png | Bin 0 -> 1167 bytes .../miscutils/textures/gui/ModularityTable.png | Bin 0 -> 1014 bytes .../miscutils/textures/gui/MultiblockDisplay.png | Bin 0 -> 899 bytes .../textures/gui/MultiblockDisplay_Generic.png | Bin 0 -> 1743 bytes .../assets/miscutils/textures/gui/PestKiller.png | Bin 0 -> 1833 bytes .../miscutils/textures/gui/PollutionCleaner.png | Bin 0 -> 1652 bytes .../miscutils/textures/gui/PowerSubStation.png | Bin 0 -> 1005 bytes .../assets/miscutils/textures/gui/ProjectTable.png | Bin 0 -> 1124 bytes .../miscutils/textures/gui/RoundRobinator.png | Bin 0 -> 1648 bytes .../assets/miscutils/textures/gui/SafeBlock.png | Bin 0 -> 952 bytes .../assets/miscutils/textures/gui/SlowFusion.png | Bin 0 -> 2182 bytes .../assets/miscutils/textures/gui/SteelBoiler.png | Bin 0 -> 1430 bytes .../assets/miscutils/textures/gui/SuperJukebox.png | Bin 0 -> 5198 bytes .../assets/miscutils/textures/gui/TreeFarmer.png | Bin 0 -> 832 bytes .../textures/gui/VolumetricFlaskSetter.png | Bin 0 -> 2482 bytes .../assets/miscutils/textures/gui/Workbench.png | Bin 0 -> 1057 bytes .../textures/gui/helium_collector_gui.png | Bin 0 -> 2682 bytes .../assets/miscutils/textures/gui/itemBackpack.png | Bin 0 -> 888 bytes .../assets/miscutils/textures/gui/itemGrindle.png | Bin 0 -> 1254 bytes .../miscutils/textures/gui/machine_Charger.png | Bin 0 -> 548 bytes .../miscutils/textures/gui/nei/decayables.png | Bin 0 -> 2623 bytes .../assets/miscutils/textures/gui/nei/widgets.png | Bin 0 -> 1876 bytes .../textures/items/IndustrialDiamondExquisite.png | Bin 0 -> 608 bytes .../miscutils/textures/items/MU-metaitem.01/0.png | Bin 0 -> 501 bytes .../miscutils/textures/items/MU-metaitem.01/1.png | Bin 0 -> 501 bytes .../miscutils/textures/items/MU-metaitem.01/10.png | Bin 0 -> 358 bytes .../textures/items/MU-metaitem.01/100.png | Bin 0 -> 2112 bytes .../textures/items/MU-metaitem.01/101.png | Bin 0 -> 309 bytes .../textures/items/MU-metaitem.01/102.png | Bin 0 -> 10825 bytes .../textures/items/MU-metaitem.01/103.png | Bin 0 -> 13990 bytes .../textures/items/MU-metaitem.01/104.png | Bin 0 -> 24047 bytes .../textures/items/MU-metaitem.01/105.png | Bin 0 -> 30527 bytes .../textures/items/MU-metaitem.01/106.png | Bin 0 -> 300 bytes .../textures/items/MU-metaitem.01/107.png | Bin 0 -> 304 bytes .../textures/items/MU-metaitem.01/108.png | Bin 0 -> 299 bytes .../textures/items/MU-metaitem.01/109.png | Bin 0 -> 297 bytes .../miscutils/textures/items/MU-metaitem.01/11.png | Bin 0 -> 358 bytes .../textures/items/MU-metaitem.01/110.png | Bin 0 -> 393 bytes .../textures/items/MU-metaitem.01/111.png | Bin 0 -> 345 bytes .../textures/items/MU-metaitem.01/112.png | Bin 0 -> 341 bytes .../textures/items/MU-metaitem.01/113.png | Bin 0 -> 337 bytes .../textures/items/MU-metaitem.01/114.png | Bin 0 -> 396 bytes .../textures/items/MU-metaitem.01/115.png | Bin 0 -> 428 bytes .../miscutils/textures/items/MU-metaitem.01/12.png | Bin 0 -> 411 bytes .../miscutils/textures/items/MU-metaitem.01/13.png | Bin 0 -> 411 bytes .../textures/items/MU-metaitem.01/130.png | Bin 0 -> 489 bytes .../textures/items/MU-metaitem.01/131.png | Bin 0 -> 451 bytes .../textures/items/MU-metaitem.01/132.png | Bin 0 -> 449 bytes .../textures/items/MU-metaitem.01/133.png | Bin 0 -> 463 bytes .../textures/items/MU-metaitem.01/134.png | Bin 0 -> 465 bytes .../textures/items/MU-metaitem.01/135.png | Bin 0 -> 462 bytes .../textures/items/MU-metaitem.01/136.png | Bin 0 -> 477 bytes .../textures/items/MU-metaitem.01/137.png | Bin 0 -> 461 bytes .../textures/items/MU-metaitem.01/138.png | Bin 0 -> 474 bytes .../textures/items/MU-metaitem.01/139.png | Bin 0 -> 482 bytes .../miscutils/textures/items/MU-metaitem.01/14.png | Bin 0 -> 411 bytes .../textures/items/MU-metaitem.01/140.png | Bin 0 -> 660 bytes .../textures/items/MU-metaitem.01/141.png | Bin 0 -> 655 bytes .../textures/items/MU-metaitem.01/142.png | Bin 0 -> 627 bytes .../textures/items/MU-metaitem.01/143.png | Bin 0 -> 675 bytes .../textures/items/MU-metaitem.01/144.png | Bin 0 -> 645 bytes .../textures/items/MU-metaitem.01/145.png | Bin 0 -> 651 bytes .../textures/items/MU-metaitem.01/146.png | Bin 0 -> 630 bytes .../textures/items/MU-metaitem.01/147.png | Bin 0 -> 648 bytes .../textures/items/MU-metaitem.01/148.png | Bin 0 -> 645 bytes .../textures/items/MU-metaitem.01/149.png | Bin 0 -> 659 bytes .../miscutils/textures/items/MU-metaitem.01/15.png | Bin 0 -> 411 bytes .../textures/items/MU-metaitem.01/150.png | Bin 0 -> 667 bytes .../textures/items/MU-metaitem.01/151.png | Bin 0 -> 335 bytes .../miscutils/textures/items/MU-metaitem.01/16.png | Bin 0 -> 461 bytes .../textures/items/MU-metaitem.01/160.png | Bin 0 -> 459 bytes .../textures/items/MU-metaitem.01/161.png | Bin 0 -> 455 bytes .../textures/items/MU-metaitem.01/162.png | Bin 0 -> 455 bytes .../miscutils/textures/items/MU-metaitem.01/17.png | Bin 0 -> 461 bytes .../miscutils/textures/items/MU-metaitem.01/18.png | Bin 0 -> 461 bytes .../miscutils/textures/items/MU-metaitem.01/19.png | Bin 0 -> 461 bytes .../miscutils/textures/items/MU-metaitem.01/2.png | Bin 0 -> 501 bytes .../miscutils/textures/items/MU-metaitem.01/20.png | Bin 0 -> 617 bytes .../textures/items/MU-metaitem.01/200.png | Bin 0 -> 231 bytes .../textures/items/MU-metaitem.01/201.png | Bin 0 -> 292 bytes .../textures/items/MU-metaitem.01/202.png | Bin 0 -> 321 bytes .../textures/items/MU-metaitem.01/203.png | Bin 0 -> 319 bytes .../textures/items/MU-metaitem.01/204.png | Bin 0 -> 315 bytes .../textures/items/MU-metaitem.01/205.png | Bin 0 -> 348 bytes .../textures/items/MU-metaitem.01/206.png | Bin 0 -> 364 bytes .../textures/items/MU-metaitem.01/207.png | Bin 0 -> 375 bytes .../textures/items/MU-metaitem.01/208.png | Bin 0 -> 338 bytes .../miscutils/textures/items/MU-metaitem.01/21.png | Bin 0 -> 617 bytes .../textures/items/MU-metaitem.01/210.png | Bin 0 -> 223 bytes .../textures/items/MU-metaitem.01/211.png | Bin 0 -> 223 bytes .../textures/items/MU-metaitem.01/212.png | Bin 0 -> 252 bytes .../textures/items/MU-metaitem.01/213.png | Bin 0 -> 435 bytes .../textures/items/MU-metaitem.01/214.png | Bin 0 -> 461 bytes .../textures/items/MU-metaitem.01/215.png | Bin 0 -> 273 bytes .../textures/items/MU-metaitem.01/216.png | Bin 0 -> 441 bytes .../textures/items/MU-metaitem.01/217.png | Bin 0 -> 450 bytes .../textures/items/MU-metaitem.01/218.png | Bin 0 -> 508 bytes .../textures/items/MU-metaitem.01/219.png | Bin 0 -> 277 bytes .../miscutils/textures/items/MU-metaitem.01/22.png | Bin 0 -> 617 bytes .../textures/items/MU-metaitem.01/220.png | Bin 0 -> 331 bytes .../textures/items/MU-metaitem.01/221.png | Bin 0 -> 513 bytes .../miscutils/textures/items/MU-metaitem.01/23.png | Bin 0 -> 617 bytes .../miscutils/textures/items/MU-metaitem.01/24.png | Bin 0 -> 545 bytes .../miscutils/textures/items/MU-metaitem.01/25.png | Bin 0 -> 545 bytes .../miscutils/textures/items/MU-metaitem.01/26.png | Bin 0 -> 545 bytes .../miscutils/textures/items/MU-metaitem.01/27.png | Bin 0 -> 545 bytes .../miscutils/textures/items/MU-metaitem.01/28.png | Bin 0 -> 482 bytes .../miscutils/textures/items/MU-metaitem.01/29.png | Bin 0 -> 482 bytes .../miscutils/textures/items/MU-metaitem.01/3.png | Bin 0 -> 501 bytes .../miscutils/textures/items/MU-metaitem.01/30.png | Bin 0 -> 482 bytes .../miscutils/textures/items/MU-metaitem.01/31.png | Bin 0 -> 482 bytes .../miscutils/textures/items/MU-metaitem.01/32.png | Bin 0 -> 501 bytes .../miscutils/textures/items/MU-metaitem.01/33.png | Bin 0 -> 415 bytes .../miscutils/textures/items/MU-metaitem.01/34.png | Bin 0 -> 358 bytes .../miscutils/textures/items/MU-metaitem.01/35.png | Bin 0 -> 411 bytes .../miscutils/textures/items/MU-metaitem.01/36.png | Bin 0 -> 461 bytes .../miscutils/textures/items/MU-metaitem.01/37.png | Bin 0 -> 617 bytes .../miscutils/textures/items/MU-metaitem.01/38.png | Bin 0 -> 545 bytes .../miscutils/textures/items/MU-metaitem.01/39.png | Bin 0 -> 482 bytes .../miscutils/textures/items/MU-metaitem.01/4.png | Bin 0 -> 415 bytes .../miscutils/textures/items/MU-metaitem.01/40.png | Bin 0 -> 788 bytes .../miscutils/textures/items/MU-metaitem.01/41.png | Bin 0 -> 750 bytes .../miscutils/textures/items/MU-metaitem.01/42.png | Bin 0 -> 834 bytes .../miscutils/textures/items/MU-metaitem.01/43.png | Bin 0 -> 936 bytes .../miscutils/textures/items/MU-metaitem.01/44.png | Bin 0 -> 764 bytes .../miscutils/textures/items/MU-metaitem.01/5.png | Bin 0 -> 415 bytes .../miscutils/textures/items/MU-metaitem.01/50.png | Bin 0 -> 499 bytes .../textures/items/MU-metaitem.01/50/1.png | Bin 0 -> 480 bytes .../textures/items/MU-metaitem.01/50/2.png | Bin 0 -> 490 bytes .../textures/items/MU-metaitem.01/50/3.png | Bin 0 -> 485 bytes .../textures/items/MU-metaitem.01/50/4.png | Bin 0 -> 490 bytes .../textures/items/MU-metaitem.01/50/5.png | Bin 0 -> 488 bytes .../textures/items/MU-metaitem.01/50/6.png | Bin 0 -> 498 bytes .../textures/items/MU-metaitem.01/50/7.png | Bin 0 -> 491 bytes .../textures/items/MU-metaitem.01/50/8.png | Bin 0 -> 485 bytes .../miscutils/textures/items/MU-metaitem.01/52.png | Bin 0 -> 499 bytes .../textures/items/MU-metaitem.01/52/1.png | Bin 0 -> 480 bytes .../textures/items/MU-metaitem.01/52/2.png | Bin 0 -> 490 bytes .../textures/items/MU-metaitem.01/52/3.png | Bin 0 -> 485 bytes .../textures/items/MU-metaitem.01/52/4.png | Bin 0 -> 490 bytes .../textures/items/MU-metaitem.01/52/5.png | Bin 0 -> 488 bytes .../textures/items/MU-metaitem.01/52/6.png | Bin 0 -> 498 bytes .../textures/items/MU-metaitem.01/52/7.png | Bin 0 -> 491 bytes .../textures/items/MU-metaitem.01/52/8.png | Bin 0 -> 485 bytes .../miscutils/textures/items/MU-metaitem.01/54.png | Bin 0 -> 499 bytes .../textures/items/MU-metaitem.01/54/1.png | Bin 0 -> 480 bytes .../textures/items/MU-metaitem.01/54/2.png | Bin 0 -> 490 bytes .../textures/items/MU-metaitem.01/54/3.png | Bin 0 -> 485 bytes .../textures/items/MU-metaitem.01/54/4.png | Bin 0 -> 490 bytes .../textures/items/MU-metaitem.01/54/5.png | Bin 0 -> 488 bytes .../textures/items/MU-metaitem.01/54/6.png | Bin 0 -> 498 bytes .../textures/items/MU-metaitem.01/54/7.png | Bin 0 -> 491 bytes .../textures/items/MU-metaitem.01/54/8.png | Bin 0 -> 485 bytes .../miscutils/textures/items/MU-metaitem.01/55.png | Bin 0 -> 24039 bytes .../miscutils/textures/items/MU-metaitem.01/6.png | Bin 0 -> 415 bytes .../miscutils/textures/items/MU-metaitem.01/60.png | Bin 0 -> 5146 bytes .../miscutils/textures/items/MU-metaitem.01/61.png | Bin 0 -> 352 bytes .../miscutils/textures/items/MU-metaitem.01/62.png | Bin 0 -> 352 bytes .../miscutils/textures/items/MU-metaitem.01/63.png | Bin 0 -> 352 bytes .../miscutils/textures/items/MU-metaitem.01/64.png | Bin 0 -> 358 bytes .../miscutils/textures/items/MU-metaitem.01/66.png | Bin 0 -> 392 bytes .../miscutils/textures/items/MU-metaitem.01/68.png | Bin 0 -> 390 bytes .../miscutils/textures/items/MU-metaitem.01/7.png | Bin 0 -> 415 bytes .../miscutils/textures/items/MU-metaitem.01/70.png | Bin 0 -> 398 bytes .../textures/items/MU-metaitem.01/700.png | Bin 0 -> 328 bytes .../textures/items/MU-metaitem.01/701.png | Bin 0 -> 361 bytes .../textures/items/MU-metaitem.01/702.png | Bin 0 -> 369 bytes .../textures/items/MU-metaitem.01/703.png | Bin 0 -> 366 bytes .../textures/items/MU-metaitem.01/704.png | Bin 0 -> 368 bytes .../textures/items/MU-metaitem.01/705.png | Bin 0 -> 375 bytes .../textures/items/MU-metaitem.01/706.png | Bin 0 -> 375 bytes .../textures/items/MU-metaitem.01/707.png | Bin 0 -> 386 bytes .../textures/items/MU-metaitem.01/708.png | Bin 0 -> 362 bytes .../miscutils/textures/items/MU-metaitem.01/71.png | Bin 0 -> 304 bytes .../textures/items/MU-metaitem.01/710.png | Bin 0 -> 326 bytes .../textures/items/MU-metaitem.01/711.png | Bin 0 -> 326 bytes .../textures/items/MU-metaitem.01/712.png | Bin 0 -> 343 bytes .../textures/items/MU-metaitem.01/713.png | Bin 0 -> 352 bytes .../textures/items/MU-metaitem.01/714.png | Bin 0 -> 363 bytes .../textures/items/MU-metaitem.01/715.png | Bin 0 -> 363 bytes .../textures/items/MU-metaitem.01/716.png | Bin 0 -> 343 bytes .../textures/items/MU-metaitem.01/717.png | Bin 0 -> 343 bytes .../textures/items/MU-metaitem.01/718.png | Bin 0 -> 343 bytes .../textures/items/MU-metaitem.01/719.png | Bin 0 -> 464 bytes .../miscutils/textures/items/MU-metaitem.01/72.png | Bin 0 -> 314 bytes .../textures/items/MU-metaitem.01/720.png | Bin 0 -> 455 bytes .../textures/items/MU-metaitem.01/721.png | Bin 0 -> 465 bytes .../miscutils/textures/items/MU-metaitem.01/73.png | Bin 0 -> 318 bytes .../miscutils/textures/items/MU-metaitem.01/74.png | Bin 0 -> 319 bytes .../miscutils/textures/items/MU-metaitem.01/75.png | Bin 0 -> 323 bytes .../textures/items/MU-metaitem.01/751.png | Bin 0 -> 317 bytes .../textures/items/MU-metaitem.01/752.png | Bin 0 -> 447 bytes .../textures/items/MU-metaitem.01/753.png | Bin 0 -> 462 bytes .../textures/items/MU-metaitem.01/754.png | Bin 0 -> 459 bytes .../textures/items/MU-metaitem.01/755.png | Bin 0 -> 463 bytes .../textures/items/MU-metaitem.01/756.png | Bin 0 -> 466 bytes .../textures/items/MU-metaitem.01/757.png | Bin 0 -> 464 bytes .../textures/items/MU-metaitem.01/758.png | Bin 0 -> 477 bytes .../textures/items/MU-metaitem.01/759.png | Bin 0 -> 444 bytes .../miscutils/textures/items/MU-metaitem.01/76.png | Bin 0 -> 321 bytes .../miscutils/textures/items/MU-metaitem.01/77.png | Bin 0 -> 324 bytes .../miscutils/textures/items/MU-metaitem.01/78.png | Bin 0 -> 324 bytes .../miscutils/textures/items/MU-metaitem.01/79.png | Bin 0 -> 314 bytes .../miscutils/textures/items/MU-metaitem.01/8.png | Bin 0 -> 358 bytes .../miscutils/textures/items/MU-metaitem.01/9.png | Bin 0 -> 358 bytes .../miscutils/textures/items/MU-metatool.01/0.png | Bin 0 -> 1153 bytes .../miscutils/textures/items/MU-metatool.01/1.png | Bin 0 -> 1142 bytes .../miscutils/textures/items/MU-metatool.01/2.png | Bin 0 -> 1139 bytes .../miscutils/textures/items/MU-metatool.01/3.png | Bin 0 -> 1143 bytes .../miscutils/textures/items/StoneStatue.png | Bin 0 -> 3703 bytes .../items/baubles/itemFireProtectGlovesBetter.png | Bin 0 -> 1326 bytes .../textures/items/bioscience/BasicAlgae.png | Bin 0 -> 1122 bytes .../items/bioscience/BasicAlgae_Overlay.png | Bin 0 -> 1045 bytes .../textures/items/bioscience/BioCircuit.png | Bin 0 -> 432 bytes .../textures/items/bioscience/MetaItem1/0.png | Bin 0 -> 605 bytes .../textures/items/bioscience/MetaItem1/1.png | Bin 0 -> 627 bytes .../textures/items/bioscience/MetaItem1/10.png | Bin 0 -> 516 bytes .../textures/items/bioscience/MetaItem1/11.png | Bin 0 -> 392 bytes .../textures/items/bioscience/MetaItem1/12.png | Bin 0 -> 704 bytes .../textures/items/bioscience/MetaItem1/13.png | Bin 0 -> 373 bytes .../textures/items/bioscience/MetaItem1/14.png | Bin 0 -> 427 bytes .../textures/items/bioscience/MetaItem1/15.png | Bin 0 -> 376 bytes .../textures/items/bioscience/MetaItem1/16.png | Bin 0 -> 397 bytes .../textures/items/bioscience/MetaItem1/17.png | Bin 0 -> 306 bytes .../textures/items/bioscience/MetaItem1/18.png | Bin 0 -> 442 bytes .../textures/items/bioscience/MetaItem1/19.png | Bin 0 -> 347 bytes .../textures/items/bioscience/MetaItem1/2.png | Bin 0 -> 633 bytes .../textures/items/bioscience/MetaItem1/20.png | Bin 0 -> 364 bytes .../textures/items/bioscience/MetaItem1/21.png | Bin 0 -> 280 bytes .../textures/items/bioscience/MetaItem1/22.png | Bin 0 -> 437 bytes .../textures/items/bioscience/MetaItem1/23.png | Bin 0 -> 701 bytes .../textures/items/bioscience/MetaItem1/24.png | Bin 0 -> 357 bytes .../textures/items/bioscience/MetaItem1/25.png | Bin 0 -> 648 bytes .../textures/items/bioscience/MetaItem1/3.png | Bin 0 -> 646 bytes .../textures/items/bioscience/MetaItem1/4.png | Bin 0 -> 622 bytes .../textures/items/bioscience/MetaItem1/5.png | Bin 0 -> 490 bytes .../textures/items/bioscience/MetaItem1/6.png | Bin 0 -> 455 bytes .../textures/items/bioscience/MetaItem1/7.png | Bin 0 -> 452 bytes .../textures/items/bioscience/MetaItem1/8.png | Bin 0 -> 654 bytes .../textures/items/bioscience/MetaItem1/9.png | Bin 0 -> 277 bytes .../assets/miscutils/textures/items/bomb.png | Bin 0 -> 311 bytes .../miscutils/textures/items/bomb_casing.png | Bin 0 -> 280 bytes .../assets/miscutils/textures/items/bomb_lit.png | Bin 0 -> 328 bytes .../textures/items/bucket.generic.overlay.png | Bin 0 -> 279 bytes .../textures/items/bucket/BucketCryotheum.png | Bin 0 -> 602 bytes .../items/bucket/BucketCryotheum.png.mcmeta | 5 + .../textures/items/bucket/BucketEnder.png | Bin 0 -> 715 bytes .../textures/items/bucket/BucketEnder.png.mcmeta | 5 + .../textures/items/bucket/BucketPyrotheum.png | Bin 0 -> 2141 bytes .../items/bucket/BucketPyrotheum.png.mcmeta | 23 + .../textures/items/bucket/OverlayIcon.png | Bin 0 -> 195 bytes .../items/burnables/itemCactusCharcoal.png | Bin 0 -> 354 bytes .../textures/items/burnables/itemCactusCoke.png | Bin 0 -> 379 bytes .../textures/items/burnables/itemCoalCoke.png | Bin 0 -> 282 bytes .../textures/items/burnables/itemSugarCharcoal.png | Bin 0 -> 387 bytes .../textures/items/burnables/itemSugarCoke.png | Bin 0 -> 397 bytes .../miscutils/textures/items/chargepack/1.png | Bin 0 -> 1327 bytes .../miscutils/textures/items/chargepack/2.png | Bin 0 -> 1335 bytes .../miscutils/textures/items/chargepack/3.png | Bin 0 -> 1340 bytes .../miscutils/textures/items/chargepack/4.png | Bin 0 -> 1306 bytes .../miscutils/textures/items/chargepack/5.png | Bin 0 -> 1302 bytes .../miscutils/textures/items/chargepack/6.png | Bin 0 -> 1338 bytes .../miscutils/textures/items/chargepack/7.png | Bin 0 -> 1317 bytes .../miscutils/textures/items/chargepack/8.png | Bin 0 -> 1402 bytes .../miscutils/textures/items/chargepack/9.png | Bin 0 -> 1183 bytes .../textures/items/controlcore/Core_0.png | Bin 0 -> 527 bytes .../textures/items/controlcore/Core_1.png | Bin 0 -> 495 bytes .../textures/items/controlcore/Core_2.png | Bin 0 -> 492 bytes .../textures/items/controlcore/Core_3.png | Bin 0 -> 495 bytes .../textures/items/controlcore/Core_4.png | Bin 0 -> 483 bytes .../textures/items/controlcore/Core_5.png | Bin 0 -> 479 bytes .../textures/items/controlcore/Core_6.png | Bin 0 -> 476 bytes .../textures/items/controlcore/Core_7.png | Bin 0 -> 465 bytes .../textures/items/controlcore/Core_8.png | Bin 0 -> 465 bytes .../textures/items/controlcore/Core_9.png | Bin 0 -> 412 bytes .../assets/miscutils/textures/items/covers/0.png | Bin 0 -> 489 bytes .../assets/miscutils/textures/items/covers/1.png | Bin 0 -> 451 bytes .../assets/miscutils/textures/items/covers/10.png | Bin 0 -> 426 bytes .../assets/miscutils/textures/items/covers/11.png | Bin 0 -> 408 bytes .../assets/miscutils/textures/items/covers/12.png | Bin 0 -> 439 bytes .../assets/miscutils/textures/items/covers/13.png | Bin 0 -> 439 bytes .../assets/miscutils/textures/items/covers/14.png | Bin 0 -> 422 bytes .../assets/miscutils/textures/items/covers/15.png | Bin 0 -> 443 bytes .../assets/miscutils/textures/items/covers/2.png | Bin 0 -> 449 bytes .../assets/miscutils/textures/items/covers/3.png | Bin 0 -> 463 bytes .../assets/miscutils/textures/items/covers/4.png | Bin 0 -> 465 bytes .../assets/miscutils/textures/items/covers/5.png | Bin 0 -> 462 bytes .../assets/miscutils/textures/items/covers/6.png | Bin 0 -> 477 bytes .../assets/miscutils/textures/items/covers/7.png | Bin 0 -> 461 bytes .../assets/miscutils/textures/items/covers/8.png | Bin 0 -> 474 bytes .../assets/miscutils/textures/items/covers/9.png | Bin 0 -> 482 bytes .../items/dehydrator/itemDehydratorCoilWire_0.png | Bin 0 -> 309 bytes .../items/dehydrator/itemDehydratorCoilWire_1.png | Bin 0 -> 302 bytes .../items/dehydrator/itemDehydratorCoilWire_2.png | Bin 0 -> 288 bytes .../items/dehydrator/itemDehydratorCoilWire_3.png | Bin 0 -> 286 bytes .../items/dehydrator/itemDehydratorCoil_0.png | Bin 0 -> 461 bytes .../items/dehydrator/itemDehydratorCoil_1.png | Bin 0 -> 459 bytes .../items/dehydrator/itemDehydratorCoil_2.png | Bin 0 -> 386 bytes .../items/dehydrator/itemDehydratorCoil_3.png | Bin 0 -> 388 bytes .../assets/miscutils/textures/items/dust.png | Bin 0 -> 302 bytes .../assets/miscutils/textures/items/dustSmall.png | Bin 0 -> 264 bytes .../assets/miscutils/textures/items/dustTiny.png | Bin 0 -> 219 bytes .../miscutils/textures/items/food/MetaItem1/0.png | Bin 0 -> 565 bytes .../miscutils/textures/items/food/MetaItem1/1.png | Bin 0 -> 548 bytes .../miscutils/textures/items/food/MetaItem1/2.png | Bin 0 -> 455 bytes .../miscutils/textures/items/food/MetaItem1/3.png | Bin 0 -> 556 bytes .../miscutils/textures/items/food/MetaItem1/4.png | Bin 0 -> 453 bytes .../miscutils/textures/items/food/MetaItem1/5.png | Bin 0 -> 447 bytes .../miscutils/textures/items/food/MetaItem1/6.png | Bin 0 -> 402 bytes .../miscutils/textures/items/food/MetaItem1/7.png | Bin 0 -> 562 bytes .../miscutils/textures/items/food/MetaItem1/8.png | Bin 0 -> 447 bytes .../miscutils/textures/items/frameAccelerated.png | Bin 0 -> 412 bytes .../miscutils/textures/items/frameArborists.png | Bin 0 -> 297 bytes .../assets/miscutils/textures/items/frameBusy.png | Bin 0 -> 412 bytes .../miscutils/textures/items/frameChocolate.png | Bin 0 -> 339 bytes .../miscutils/textures/items/frameDecaying.png | Bin 0 -> 449 bytes .../miscutils/textures/items/frameHealing.png | Bin 0 -> 354 bytes .../miscutils/textures/items/frameMutagenic.png | Bin 0 -> 412 bytes .../assets/miscutils/textures/items/frameNova.png | Bin 0 -> 636 bytes .../miscutils/textures/items/frameRestraint.png | Bin 0 -> 355 bytes .../miscutils/textures/items/frameSlowing.png | Bin 0 -> 307 bytes .../assets/miscutils/textures/items/frameSoul.png | Bin 0 -> 584 bytes .../miscutils/textures/items/frameStabilizing.png | Bin 0 -> 449 bytes .../miscutils/textures/items/frameUseless.png | Bin 0 -> 427 bytes .../assets/miscutils/textures/items/frameVoid.png | Bin 0 -> 663 bytes .../textures/items/iconsets/ANGLE_GRINDER.png | Bin 0 -> 387 bytes .../items/iconsets/ANGLE_GRINDER_OVERLAY.png | Bin 0 -> 143 bytes .../items/iconsets/ELECTRIC_BUTCHER_KNIFE.png | Bin 0 -> 336 bytes .../iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/iconsets/ELECTRIC_LIGHTER.png | Bin 0 -> 313 bytes .../items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png | Bin 0 -> 257 bytes .../textures/items/iconsets/ELECTRIC_SNIPS.png | Bin 0 -> 501 bytes .../items/iconsets/ELECTRIC_SNIPS_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/iconsets/PUMP_OVERLAY.png | Bin 0 -> 143 bytes .../textures/items/iconsets/RENDERING_ERROR.png | Bin 0 -> 161 bytes .../items/iconsets/RENDERING_ERROR_OVERLAY.png | Bin 0 -> 161 bytes .../textures/items/iconsets/SKOOKUMCHOOCHER.png | Bin 0 -> 382 bytes .../items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png | Bin 0 -> 143 bytes .../miscutils/textures/items/iconsets/VOID.png | Bin 0 -> 357 bytes .../textures/items/iconsets/VOID_OVERLAY.png | Bin 0 -> 143 bytes .../assets/miscutils/textures/items/ion/0.png | Bin 0 -> 112 bytes .../assets/miscutils/textures/items/ion/1.png | Bin 0 -> 146 bytes .../assets/miscutils/textures/items/ion/10.png | Bin 0 -> 161 bytes .../assets/miscutils/textures/items/ion/100.png | Bin 0 -> 161 bytes .../assets/miscutils/textures/items/ion/101.png | Bin 0 -> 153 bytes .../assets/miscutils/textures/items/ion/102.png | Bin 0 -> 124 bytes .../assets/miscutils/textures/items/ion/103.png | Bin 0 -> 148 bytes .../assets/miscutils/textures/items/ion/104.png | Bin 0 -> 156 bytes .../assets/miscutils/textures/items/ion/105.png | Bin 0 -> 175 bytes .../assets/miscutils/textures/items/ion/106.png | Bin 0 -> 148 bytes .../assets/miscutils/textures/items/ion/107.png | Bin 0 -> 143 bytes .../assets/miscutils/textures/items/ion/108.png | Bin 0 -> 152 bytes .../assets/miscutils/textures/items/ion/109.png | Bin 0 -> 154 bytes .../assets/miscutils/textures/items/ion/11.png | Bin 0 -> 178 bytes .../assets/miscutils/textures/items/ion/110.png | Bin 0 -> 163 bytes .../assets/miscutils/textures/items/ion/111.png | Bin 0 -> 146 bytes .../assets/miscutils/textures/items/ion/112.png | Bin 0 -> 148 bytes .../assets/miscutils/textures/items/ion/113.png | Bin 0 -> 113 bytes .../assets/miscutils/textures/items/ion/114.png | Bin 0 -> 160 bytes .../assets/miscutils/textures/items/ion/115.png | Bin 0 -> 138 bytes .../assets/miscutils/textures/items/ion/116.png | Bin 0 -> 140 bytes .../assets/miscutils/textures/items/ion/117.png | Bin 0 -> 166 bytes .../assets/miscutils/textures/items/ion/12.png | Bin 0 -> 147 bytes .../assets/miscutils/textures/items/ion/13.png | Bin 0 -> 151 bytes .../assets/miscutils/textures/items/ion/14.png | Bin 0 -> 125 bytes .../assets/miscutils/textures/items/ion/15.png | Bin 0 -> 136 bytes .../assets/miscutils/textures/items/ion/16.png | Bin 0 -> 136 bytes .../assets/miscutils/textures/items/ion/17.png | Bin 0 -> 148 bytes .../assets/miscutils/textures/items/ion/18.png | Bin 0 -> 143 bytes .../assets/miscutils/textures/items/ion/19.png | Bin 0 -> 161 bytes .../assets/miscutils/textures/items/ion/2.png | Bin 0 -> 115 bytes .../assets/miscutils/textures/items/ion/20.png | Bin 0 -> 155 bytes .../assets/miscutils/textures/items/ion/21.png | Bin 0 -> 115 bytes .../assets/miscutils/textures/items/ion/22.png | Bin 0 -> 132 bytes .../assets/miscutils/textures/items/ion/23.png | Bin 0 -> 144 bytes .../assets/miscutils/textures/items/ion/24.png | Bin 0 -> 150 bytes .../assets/miscutils/textures/items/ion/25.png | Bin 0 -> 141 bytes .../assets/miscutils/textures/items/ion/26.png | Bin 0 -> 148 bytes .../assets/miscutils/textures/items/ion/27.png | Bin 0 -> 141 bytes .../assets/miscutils/textures/items/ion/28.png | Bin 0 -> 142 bytes .../assets/miscutils/textures/items/ion/29.png | Bin 0 -> 145 bytes .../assets/miscutils/textures/items/ion/3.png | Bin 0 -> 150 bytes .../assets/miscutils/textures/items/ion/30.png | Bin 0 -> 159 bytes .../assets/miscutils/textures/items/ion/31.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/32.png | Bin 0 -> 158 bytes .../assets/miscutils/textures/items/ion/33.png | Bin 0 -> 158 bytes .../assets/miscutils/textures/items/ion/34.png | Bin 0 -> 144 bytes .../assets/miscutils/textures/items/ion/35.png | Bin 0 -> 159 bytes .../assets/miscutils/textures/items/ion/36.png | Bin 0 -> 155 bytes .../assets/miscutils/textures/items/ion/37.png | Bin 0 -> 149 bytes .../assets/miscutils/textures/items/ion/38.png | Bin 0 -> 135 bytes .../assets/miscutils/textures/items/ion/39.png | Bin 0 -> 141 bytes .../assets/miscutils/textures/items/ion/4.png | Bin 0 -> 125 bytes .../assets/miscutils/textures/items/ion/40.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/41.png | Bin 0 -> 162 bytes .../assets/miscutils/textures/items/ion/42.png | Bin 0 -> 133 bytes .../assets/miscutils/textures/items/ion/43.png | Bin 0 -> 147 bytes .../assets/miscutils/textures/items/ion/44.png | Bin 0 -> 155 bytes .../assets/miscutils/textures/items/ion/45.png | Bin 0 -> 152 bytes .../assets/miscutils/textures/items/ion/46.png | Bin 0 -> 173 bytes .../assets/miscutils/textures/items/ion/47.png | Bin 0 -> 154 bytes .../assets/miscutils/textures/items/ion/48.png | Bin 0 -> 129 bytes .../assets/miscutils/textures/items/ion/49.png | Bin 0 -> 152 bytes .../assets/miscutils/textures/items/ion/5.png | Bin 0 -> 127 bytes .../assets/miscutils/textures/items/ion/50.png | Bin 0 -> 163 bytes .../assets/miscutils/textures/items/ion/51.png | Bin 0 -> 142 bytes .../assets/miscutils/textures/items/ion/52.png | Bin 0 -> 110 bytes .../assets/miscutils/textures/items/ion/53.png | Bin 0 -> 167 bytes .../assets/miscutils/textures/items/ion/54.png | Bin 0 -> 155 bytes .../assets/miscutils/textures/items/ion/55.png | Bin 0 -> 152 bytes .../assets/miscutils/textures/items/ion/56.png | Bin 0 -> 142 bytes .../assets/miscutils/textures/items/ion/57.png | Bin 0 -> 154 bytes .../assets/miscutils/textures/items/ion/58.png | Bin 0 -> 136 bytes .../assets/miscutils/textures/items/ion/59.png | Bin 0 -> 156 bytes .../assets/miscutils/textures/items/ion/6.png | Bin 0 -> 131 bytes .../assets/miscutils/textures/items/ion/60.png | Bin 0 -> 142 bytes .../assets/miscutils/textures/items/ion/61.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/62.png | Bin 0 -> 129 bytes .../assets/miscutils/textures/items/ion/63.png | Bin 0 -> 165 bytes .../assets/miscutils/textures/items/ion/64.png | Bin 0 -> 134 bytes .../assets/miscutils/textures/items/ion/65.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/66.png | Bin 0 -> 139 bytes .../assets/miscutils/textures/items/ion/67.png | Bin 0 -> 129 bytes .../assets/miscutils/textures/items/ion/68.png | Bin 0 -> 126 bytes .../assets/miscutils/textures/items/ion/69.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/7.png | Bin 0 -> 128 bytes .../assets/miscutils/textures/items/ion/70.png | Bin 0 -> 121 bytes .../assets/miscutils/textures/items/ion/71.png | Bin 0 -> 127 bytes .../assets/miscutils/textures/items/ion/72.png | Bin 0 -> 137 bytes .../assets/miscutils/textures/items/ion/73.png | Bin 0 -> 150 bytes .../assets/miscutils/textures/items/ion/74.png | Bin 0 -> 153 bytes .../assets/miscutils/textures/items/ion/75.png | Bin 0 -> 154 bytes .../assets/miscutils/textures/items/ion/76.png | Bin 0 -> 126 bytes .../assets/miscutils/textures/items/ion/77.png | Bin 0 -> 138 bytes .../assets/miscutils/textures/items/ion/78.png | Bin 0 -> 152 bytes .../assets/miscutils/textures/items/ion/79.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/8.png | Bin 0 -> 107 bytes .../assets/miscutils/textures/items/ion/80.png | Bin 0 -> 112 bytes .../assets/miscutils/textures/items/ion/81.png | Bin 0 -> 151 bytes .../assets/miscutils/textures/items/ion/82.png | Bin 0 -> 139 bytes .../assets/miscutils/textures/items/ion/83.png | Bin 0 -> 149 bytes .../assets/miscutils/textures/items/ion/84.png | Bin 0 -> 153 bytes .../assets/miscutils/textures/items/ion/85.png | Bin 0 -> 152 bytes .../assets/miscutils/textures/items/ion/86.png | Bin 0 -> 125 bytes .../assets/miscutils/textures/items/ion/87.png | Bin 0 -> 153 bytes .../assets/miscutils/textures/items/ion/88.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/89.png | Bin 0 -> 125 bytes .../assets/miscutils/textures/items/ion/9.png | Bin 0 -> 161 bytes .../assets/miscutils/textures/items/ion/90.png | Bin 0 -> 146 bytes .../assets/miscutils/textures/items/ion/91.png | Bin 0 -> 119 bytes .../assets/miscutils/textures/items/ion/92.png | Bin 0 -> 163 bytes .../assets/miscutils/textures/items/ion/93.png | Bin 0 -> 138 bytes .../assets/miscutils/textures/items/ion/94.png | Bin 0 -> 153 bytes .../assets/miscutils/textures/items/ion/95.png | Bin 0 -> 150 bytes .../assets/miscutils/textures/items/ion/96.png | Bin 0 -> 157 bytes .../assets/miscutils/textures/items/ion/97.png | Bin 0 -> 146 bytes .../assets/miscutils/textures/items/ion/98.png | Bin 0 -> 143 bytes .../assets/miscutils/textures/items/ion/99.png | Bin 0 -> 128 bytes .../miscutils/textures/items/ion/IonBase.png | Bin 0 -> 1789 bytes .../assets/miscutils/textures/items/item.empty.png | Bin 0 -> 179 bytes .../miscutils/textures/items/itemAirFilter.png | Bin 0 -> 1469 bytes .../miscutils/textures/items/itemAlkalusDisk.png | Bin 0 -> 424 bytes .../assets/miscutils/textures/items/itemAmulet.png | Bin 0 -> 346 bytes .../miscutils/textures/items/itemBackpack.png | Bin 0 -> 2409 bytes .../miscutils/textures/items/itemBasicTurbine.png | Bin 0 -> 475 bytes .../assets/miscutils/textures/items/itemBelt.png | Bin 0 -> 377 bytes .../assets/miscutils/textures/items/itemBigEgg.png | Bin 0 -> 5331 bytes .../miscutils/textures/items/itemBlueprint.png | Bin 0 -> 782 bytes .../miscutils/textures/items/itemBoilerChassis.png | Bin 0 -> 1821 bytes .../assets/miscutils/textures/items/itemBolt.png | Bin 0 -> 161 bytes .../assets/miscutils/textures/items/itemBook.png | Bin 0 -> 303 bytes .../assets/miscutils/textures/items/itemBoots.png | Bin 0 -> 358 bytes .../assets/miscutils/textures/items/itemBottle.png | Bin 0 -> 262 bytes .../assets/miscutils/textures/items/itemBread.png | Bin 0 -> 5146 bytes .../miscutils/textures/items/itemBufferCore.png | Bin 0 -> 1329 bytes .../assets/miscutils/textures/items/itemCell.png | Bin 0 -> 362 bytes .../miscutils/textures/items/itemCellPlasma.png | Bin 0 -> 290 bytes .../textures/items/itemCellPlasma_Overlay.png | Bin 0 -> 328 bytes .../miscutils/textures/items/itemCell_Overlay.png | Bin 0 -> 297 bytes .../miscutils/textures/items/itemCentidust.png | Bin 0 -> 326 bytes .../miscutils/textures/items/itemCircuitLFTR.png | Bin 0 -> 181 bytes .../textures/items/itemDebugShapeSpawner.png | Bin 0 -> 6534 bytes .../miscutils/textures/items/itemDecidust.png | Bin 0 -> 341 bytes .../miscutils/textures/items/itemDefault.png | Bin 0 -> 376 bytes .../textures/items/itemDehydratorCoil.png | Bin 0 -> 653 bytes .../textures/items/itemDehydratorCoilWire.png | Bin 0 -> 735 bytes .../miscutils/textures/items/itemDroplet.png | Bin 0 -> 218 bytes .../textures/items/itemEnergeticRotorBlade.png | Bin 0 -> 541 bytes .../textures/items/itemEnergeticShaft.png | Bin 0 -> 444 bytes .../assets/miscutils/textures/items/itemFiber.png | Bin 0 -> 455 bytes .../miscutils/textures/items/itemFineWire.png | Bin 0 -> 514 bytes .../miscutils/textures/items/itemFireStarter.png | Bin 0 -> 1850 bytes .../textures/items/itemFoodCurriedSausages.png | Bin 0 -> 1897 bytes .../textures/items/itemFoodRaisinToast.png | Bin 0 -> 2076 bytes .../assets/miscutils/textures/items/itemGear.png | Bin 0 -> 455 bytes .../assets/miscutils/textures/items/itemGem.png | Bin 0 -> 420 bytes .../miscutils/textures/items/itemHatTinFoil.png | Bin 0 -> 261 bytes .../miscutils/textures/items/itemHeavyPlate.png | Bin 0 -> 397 bytes .../textures/items/itemHeavyPlate_Overlay.png | Bin 0 -> 471 bytes .../miscutils/textures/items/itemHeliumBlob.png | Bin 0 -> 350 bytes .../assets/miscutils/textures/items/itemHelmet.png | Bin 0 -> 396 bytes .../textures/items/itemHotIngotRaisinBread.png | Bin 0 -> 5146 bytes .../miscutils/textures/items/itemHydrogenBlob.png | Bin 0 -> 241 bytes .../assets/miscutils/textures/items/itemIngot.png | Bin 0 -> 390 bytes .../textures/items/itemIngotBatteryAlloy.png | Bin 0 -> 420 bytes .../miscutils/textures/items/itemIngotHot.png | Bin 0 -> 423 bytes .../textures/items/itemIngotRaisinBread.png | Bin 0 -> 5146 bytes .../textures/items/itemIridiumRotorBlade.png | Bin 0 -> 560 bytes .../miscutils/textures/items/itemIridiumShaft.png | Bin 0 -> 447 bytes .../assets/miscutils/textures/items/itemKey.png | Bin 0 -> 258 bytes .../assets/miscutils/textures/items/itemKeyBig.png | Bin 0 -> 293 bytes .../miscutils/textures/items/itemKeyGold.png | Bin 0 -> 354 bytes .../miscutils/textures/items/itemKeyGoldBoss.png | Bin 0 -> 311 bytes .../miscutils/textures/items/itemLavaFilter.png | Bin 0 -> 531 bytes .../textures/items/itemMagnaliumRotorBlade.png | Bin 0 -> 560 bytes .../textures/items/itemMagnaliumShaft.png | Bin 0 -> 447 bytes .../miscutils/textures/items/itemMushroom.png | Bin 0 -> 260 bytes .../miscutils/textures/items/itemMushroomRed.png | Bin 0 -> 273 bytes .../assets/miscutils/textures/items/itemNugget.png | Bin 0 -> 1986 bytes .../textures/items/itemPLACEHOLDER_Circuit.png | Bin 0 -> 405 bytes .../miscutils/textures/items/itemPickaxe.png | Bin 0 -> 178 bytes .../miscutils/textures/items/itemPineapple.png | Bin 0 -> 297 bytes .../assets/miscutils/textures/items/itemPlate.png | Bin 0 -> 278 bytes .../textures/items/itemPlateBatteryAlloy.png | Bin 0 -> 491 bytes .../miscutils/textures/items/itemPlateDouble.png | Bin 0 -> 297 bytes .../miscutils/textures/items/itemPlatebody.png | Bin 0 -> 378 bytes .../miscutils/textures/items/itemPlatelegs.png | Bin 0 -> 342 bytes .../assets/miscutils/textures/items/itemPotion.png | Bin 0 -> 271 bytes .../miscutils/textures/items/itemPotionBlack.png | Bin 0 -> 284 bytes .../miscutils/textures/items/itemPotionRed.png | Bin 0 -> 284 bytes .../assets/miscutils/textures/items/itemRing.png | Bin 0 -> 311 bytes .../miscutils/textures/items/itemRingWearable.png | Bin 0 -> 350 bytes .../assets/miscutils/textures/items/itemRod.png | Bin 0 -> 250 bytes .../miscutils/textures/items/itemRodLong.png | Bin 0 -> 246 bytes .../assets/miscutils/textures/items/itemRope.png | Bin 0 -> 316 bytes .../assets/miscutils/textures/items/itemRotor.png | Bin 0 -> 443 bytes .../textures/items/itemSandstoneHammer.png | Bin 0 -> 422 bytes .../assets/miscutils/textures/items/itemScrew.png | Bin 0 -> 199 bytes .../assets/miscutils/textures/items/itemShard.png | Bin 0 -> 620 bytes .../assets/miscutils/textures/items/itemShovel.png | Bin 0 -> 154 bytes .../textures/items/itemSlowBuildersRing.png | Bin 0 -> 427 bytes .../miscutils/textures/items/itemSmallSpring.png | Bin 0 -> 317 bytes .../assets/miscutils/textures/items/itemSpring.png | Bin 0 -> 276 bytes .../miscutils/textures/items/itemStaballoyAxe.png | Bin 0 -> 534 bytes .../textures/items/itemStaballoyPickaxe.png | Bin 0 -> 525 bytes .../miscutils/textures/items/itemStickyRubber.png | Bin 0 -> 397 bytes .../textures/items/itemSulfuricAcidPotion.png | Bin 0 -> 416 bytes .../assets/miscutils/textures/items/itemSword.png | Bin 0 -> 363 bytes .../assets/miscutils/textures/items/itemTablet.png | Bin 0 -> 372 bytes .../textures/items/itemTungstenSteelRotorBlade.png | Bin 0 -> 544 bytes .../textures/items/itemTungstenSteelShaft.png | Bin 0 -> 326 bytes .../textures/items/itemUltimetRotorBlade.png | Bin 0 -> 557 bytes .../miscutils/textures/items/itemUltimetShaft.png | Bin 0 -> 447 bytes .../textures/items/itemVibrantRotorBlade.png | Bin 0 -> 530 bytes .../miscutils/textures/items/itemVibrantShaft.png | Bin 0 -> 447 bytes .../miscutils/textures/items/itemWaterBottle.png | Bin 0 -> 262 bytes .../textures/items/material/DustBlizz.png | Bin 0 -> 914 bytes .../textures/items/material/DustBlizz.png.mcmeta | 5 + .../textures/items/material/DustCryotheum.png | Bin 0 -> 1303 bytes .../items/material/DustCryotheum.png.mcmeta | 5 + .../textures/items/material/DustPyrotheum.png | Bin 0 -> 1202 bytes .../items/material/DustPyrotheum.png.mcmeta | 5 + .../miscutils/textures/items/material/RodBlizz.png | Bin 0 -> 439 bytes .../assets/miscutils/textures/items/particle/0.PNG | Bin 0 -> 1672 bytes .../assets/miscutils/textures/items/particle/1.png | Bin 0 -> 1669 bytes .../miscutils/textures/items/particle/10.PNG | Bin 0 -> 1644 bytes .../miscutils/textures/items/particle/11.PNG | Bin 0 -> 1678 bytes .../miscutils/textures/items/particle/12.PNG | Bin 0 -> 1658 bytes .../miscutils/textures/items/particle/13.PNG | Bin 0 -> 1668 bytes .../miscutils/textures/items/particle/14.PNG | Bin 0 -> 1676 bytes .../miscutils/textures/items/particle/15.PNG | Bin 0 -> 1675 bytes .../miscutils/textures/items/particle/16.PNG | Bin 0 -> 1679 bytes .../miscutils/textures/items/particle/17.PNG | Bin 0 -> 1674 bytes .../miscutils/textures/items/particle/18.PNG | Bin 0 -> 1674 bytes .../miscutils/textures/items/particle/19.PNG | Bin 0 -> 1685 bytes .../assets/miscutils/textures/items/particle/2.png | Bin 0 -> 1683 bytes .../miscutils/textures/items/particle/20.PNG | Bin 0 -> 1663 bytes .../miscutils/textures/items/particle/21.PNG | Bin 0 -> 1653 bytes .../miscutils/textures/items/particle/22.PNG | Bin 0 -> 1665 bytes .../miscutils/textures/items/particle/23.PNG | Bin 0 -> 1680 bytes .../miscutils/textures/items/particle/24.PNG | Bin 0 -> 1673 bytes .../assets/miscutils/textures/items/particle/3.png | Bin 0 -> 1681 bytes .../assets/miscutils/textures/items/particle/4.png | Bin 0 -> 1682 bytes .../assets/miscutils/textures/items/particle/5.png | Bin 0 -> 1675 bytes .../assets/miscutils/textures/items/particle/6.png | Bin 0 -> 1674 bytes .../assets/miscutils/textures/items/particle/7.PNG | Bin 0 -> 1667 bytes .../assets/miscutils/textures/items/particle/8.PNG | Bin 0 -> 1656 bytes .../assets/miscutils/textures/items/particle/9.PNG | Bin 0 -> 1663 bytes .../miscutils/textures/items/particle/new/0.png | Bin 0 -> 1217 bytes .../miscutils/textures/items/particle/new/1.png | Bin 0 -> 1493 bytes .../miscutils/textures/items/particle/new/10.png | Bin 0 -> 1616 bytes .../miscutils/textures/items/particle/new/11.png | Bin 0 -> 1450 bytes .../miscutils/textures/items/particle/new/12.png | Bin 0 -> 1635 bytes .../miscutils/textures/items/particle/new/13.png | Bin 0 -> 1601 bytes .../miscutils/textures/items/particle/new/14.png | Bin 0 -> 1522 bytes .../miscutils/textures/items/particle/new/15.png | Bin 0 -> 1710 bytes .../miscutils/textures/items/particle/new/16.png | Bin 0 -> 1647 bytes .../miscutils/textures/items/particle/new/17.png | Bin 0 -> 1569 bytes .../miscutils/textures/items/particle/new/18.png | Bin 0 -> 1451 bytes .../miscutils/textures/items/particle/new/19.png | Bin 0 -> 1404 bytes .../miscutils/textures/items/particle/new/2.png | Bin 0 -> 1561 bytes .../miscutils/textures/items/particle/new/20.png | Bin 0 -> 1517 bytes .../miscutils/textures/items/particle/new/21.png | Bin 0 -> 1498 bytes .../miscutils/textures/items/particle/new/22.png | Bin 0 -> 1554 bytes .../miscutils/textures/items/particle/new/23.png | Bin 0 -> 1196 bytes .../miscutils/textures/items/particle/new/24.png | Bin 0 -> 1323 bytes .../miscutils/textures/items/particle/new/3.png | Bin 0 -> 1465 bytes .../miscutils/textures/items/particle/new/4.png | Bin 0 -> 1501 bytes .../miscutils/textures/items/particle/new/5.png | Bin 0 -> 1487 bytes .../miscutils/textures/items/particle/new/6.png | Bin 0 -> 1512 bytes .../miscutils/textures/items/particle/new/7.png | Bin 0 -> 1485 bytes .../miscutils/textures/items/particle/new/8.png | Bin 0 -> 1595 bytes .../miscutils/textures/items/particle/new/9.png | Bin 0 -> 1567 bytes .../textures/items/personalCloakingDevice.png | Bin 0 -> 245 bytes .../textures/items/processing/MilledOre/milled.png | Bin 0 -> 595 bytes .../items/processing/MilledOre/milled_OVERLAY.png | Bin 0 -> 437 bytes .../miscutils/textures/items/research/note.png | Bin 0 -> 348 bytes .../miscutils/textures/items/science/Atom.png | Bin 0 -> 1175 bytes .../items/science/general/AdvancedCircuit.png | Bin 0 -> 515 bytes .../textures/items/science/general/MetaItem1/0.png | Bin 0 -> 441 bytes .../textures/items/science/general/MetaItem1/1.png | Bin 0 -> 440 bytes .../items/science/general/MetaItem1/10.png | Bin 0 -> 328 bytes .../items/science/general/MetaItem1/11.png | Bin 0 -> 339 bytes .../items/science/general/MetaItem1/12.png | Bin 0 -> 320 bytes .../textures/items/science/general/MetaItem1/2.png | Bin 0 -> 447 bytes .../textures/items/science/general/MetaItem1/3.png | Bin 0 -> 448 bytes .../textures/items/science/general/MetaItem1/4.png | Bin 0 -> 434 bytes .../textures/items/science/general/MetaItem1/5.png | Bin 0 -> 440 bytes .../textures/items/science/general/MetaItem1/6.png | Bin 0 -> 429 bytes .../textures/items/science/general/MetaItem1/7.png | Bin 0 -> 376 bytes .../textures/items/science/general/MetaItem1/8.png | Bin 0 -> 492 bytes .../textures/items/science/general/MetaItem1/9.png | Bin 0 -> 340 bytes .../textures/items/science/nuclear/MetaItem1/0.png | Bin 0 -> 243 bytes .../textures/items/science/nuclear/MetaItem1/1.png | Bin 0 -> 243 bytes .../textures/items/science/nuclear/MetaItem1/2.png | Bin 0 -> 243 bytes .../textures/items/science/nuclear/MetaItem1/3.png | Bin 0 -> 243 bytes .../textures/items/science/nuclear/MetaItem1/4.png | Bin 0 -> 328 bytes .../textures/items/science/nuclear/MetaItem1/5.png | Bin 0 -> 328 bytes .../textures/items/science/nuclear/MetaItem1/6.png | Bin 0 -> 328 bytes .../assets/miscutils/textures/items/spawn_egg.png | Bin 0 -> 270 bytes .../miscutils/textures/items/spawn_egg_overlay.png | Bin 0 -> 402 bytes .../assets/miscutils/textures/items/token/0.png | Bin 0 -> 3345 bytes .../assets/miscutils/textures/items/token/1.png | Bin 0 -> 3688 bytes .../assets/miscutils/textures/items/token/2.png | Bin 0 -> 3698 bytes .../assets/miscutils/textures/items/token/3.png | Bin 0 -> 3758 bytes .../assets/miscutils/textures/items/token/4.png | Bin 0 -> 3719 bytes .../assets/miscutils/textures/models/TinFoil.png | Bin 0 -> 536 bytes .../assets/miscutils/textures/space/RocketGui.png | Bin 0 -> 490 bytes .../assets/miscutils/textures/space/hd10180/A.png | Bin 0 -> 220 bytes .../assets/miscutils/textures/space/hd10180/B.png | Bin 0 -> 810 bytes .../assets/miscutils/textures/space/hd10180/C.png | Bin 0 -> 810 bytes .../assets/miscutils/textures/space/hd10180/D.png | Bin 0 -> 817 bytes .../resources/assets/spiceoflife/lang/de_DE.lang | 2 + .../resources/assets/spiceoflife/lang/en_US.lang | 2 + .../resources/assets/spiceoflife/lang/es_ES.lang | 2 + .../resources/assets/spiceoflife/lang/fr_FR.lang | 2 + .../resources/assets/spiceoflife/lang/it_IT.lang | 2 + .../resources/assets/spiceoflife/lang/ko_KR.lang | 2 + .../resources/assets/spiceoflife/lang/ru_RU.lang | 2 + .../resources/assets/spiceoflife/lang/zh_CN.lang | 2 + .../spiceoflife/textures/items/foodcrate.png | Bin 0 -> 365 bytes .../textures/items/foodcrate_open_empty.png | Bin 0 -> 355 bytes .../textures/items/foodcrate_open_full.png | Bin 0 -> 509 bytes .../resources/assets/stevescarts/lang/en_US.lang | 1 + .../resources/assets/stevescarts/lang/zh_CN.lang | 2 + .../textures/items/crop_exotic_seeds_icon.png | Bin 0 -> 540 bytes src/main/resources/mcmod.info | 18 + src/resources/GradleStartClient.java | 103 - src/resources/assets/forestry/AlvearyFrame.png | Bin 931 -> 0 bytes src/resources/assets/forestry/AlvearyMutator.png | Bin 731 -> 0 bytes .../blocks/apiculture/alveary.framehousing.off.png | Bin 670 -> 0 bytes .../blocks/apiculture/alveary.framehousing.on.png | Bin 670 -> 0 bytes .../blocks/apiculture/alveary.mutator.off.png | Bin 558 -> 0 bytes .../blocks/apiculture/alveary.mutator.on.png | Bin 558 -> 0 bytes src/resources/assets/gregtech/lang/en_US.lang | 222 - src/resources/assets/gregtech/lang/zh_CN.lang | 239 - .../textures/blocks/fluids/fluid.argon.png | Bin 178 -> 0 bytes .../textures/blocks/fluids/fluid.nitrofuel_old.png | Bin 5538 -> 0 bytes .../blocks/fluids/fluid.nitrofuel_old.png.mcmeta | 5 - .../blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png | Bin 1505 -> 0 bytes .../iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta | 5 - .../blocks/iconsets/OVERLAY_ACCELERATOR.png | Bin 187 -> 0 bytes .../blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png | Bin 264 -> 0 bytes .../iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta | 5 - .../blocks/iconsets/OVERLAY_ACCELERATOR_TE.png | Bin 220 -> 0 bytes .../iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png | Bin 299 -> 0 bytes .../OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta | 5 - .../blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png | Bin 1505 -> 0 bytes .../iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta | 5 - .../blocks/materialicons/ENRICHED/block1.png | Bin 437 -> 0 bytes .../blocks/materialicons/ENRICHED/block2.png | Bin 459 -> 0 bytes .../blocks/materialicons/ENRICHED/block3.png | Bin 490 -> 0 bytes .../blocks/materialicons/ENRICHED/block4.png | Bin 480 -> 0 bytes .../blocks/materialicons/ENRICHED/block5.png | Bin 414 -> 0 bytes .../blocks/materialicons/ENRICHED/block6.png | Bin 437 -> 0 bytes .../blocks/materialicons/ENRICHED/foil.png | Bin 368 -> 0 bytes .../blocks/materialicons/ENRICHED/frameGt.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/ENRICHED/ore.png | Bin 271 -> 0 bytes .../blocks/materialicons/ENRICHED/oreSmall.png | Bin 339 -> 0 bytes .../blocks/materialicons/ENRICHED/ore_animated.png | Bin 591 -> 0 bytes .../materialicons/ENRICHED/ore_animated.png.mcmeta | 6 - .../blocks/materialicons/ENRICHED/pipeHuge.png | Bin 348 -> 0 bytes .../blocks/materialicons/ENRICHED/pipeLarge.png | Bin 429 -> 0 bytes .../blocks/materialicons/ENRICHED/pipeMedium.png | Bin 429 -> 0 bytes .../blocks/materialicons/ENRICHED/pipeSide.png | Bin 401 -> 0 bytes .../blocks/materialicons/ENRICHED/pipeSmall.png | Bin 427 -> 0 bytes .../blocks/materialicons/ENRICHED/pipeTiny.png | Bin 418 -> 0 bytes .../blocks/materialicons/ENRICHED/void.png | Bin 143 -> 0 bytes .../blocks/materialicons/ENRICHED/wire.png | Bin 513 -> 0 bytes .../textures/blocks/materialicons/GEM_A/block1.png | Bin 490 -> 0 bytes .../textures/blocks/materialicons/GEM_A/block2.png | Bin 459 -> 0 bytes .../textures/blocks/materialicons/GEM_A/block3.png | Bin 490 -> 0 bytes .../textures/blocks/materialicons/GEM_A/block4.png | Bin 480 -> 0 bytes .../textures/blocks/materialicons/GEM_A/block5.png | Bin 414 -> 0 bytes .../textures/blocks/materialicons/GEM_A/block6.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/GEM_A/foil.png | Bin 368 -> 0 bytes .../blocks/materialicons/GEM_A/frameGt.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/GEM_A/ore.png | Bin 280 -> 0 bytes .../blocks/materialicons/GEM_A/oreSmall.png | Bin 339 -> 0 bytes .../blocks/materialicons/GEM_A/pipeHuge.png | Bin 348 -> 0 bytes .../blocks/materialicons/GEM_A/pipeLarge.png | Bin 429 -> 0 bytes .../blocks/materialicons/GEM_A/pipeMedium.png | Bin 429 -> 0 bytes .../blocks/materialicons/GEM_A/pipeSide.png | Bin 401 -> 0 bytes .../blocks/materialicons/GEM_A/pipeSmall.png | Bin 427 -> 0 bytes .../blocks/materialicons/GEM_A/pipeTiny.png | Bin 418 -> 0 bytes .../textures/blocks/materialicons/GEM_A/void.png | Bin 143 -> 0 bytes .../textures/blocks/materialicons/GEM_A/wire.png | Bin 513 -> 0 bytes .../blocks/materialicons/NUCLEAR/block1.png | Bin 437 -> 0 bytes .../blocks/materialicons/NUCLEAR/block2.png | Bin 459 -> 0 bytes .../blocks/materialicons/NUCLEAR/block3.png | Bin 490 -> 0 bytes .../blocks/materialicons/NUCLEAR/block4.png | Bin 480 -> 0 bytes .../blocks/materialicons/NUCLEAR/block5.png | Bin 414 -> 0 bytes .../blocks/materialicons/NUCLEAR/block6.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/NUCLEAR/foil.png | Bin 368 -> 0 bytes .../blocks/materialicons/NUCLEAR/frameGt.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/NUCLEAR/ore.png | Bin 589 -> 0 bytes .../blocks/materialicons/NUCLEAR/ore.png.mcmeta | 6 - .../blocks/materialicons/NUCLEAR/oreSmall.png | Bin 339 -> 0 bytes .../blocks/materialicons/NUCLEAR/pipeHuge.png | Bin 348 -> 0 bytes .../blocks/materialicons/NUCLEAR/pipeLarge.png | Bin 429 -> 0 bytes .../blocks/materialicons/NUCLEAR/pipeMedium.png | Bin 429 -> 0 bytes .../blocks/materialicons/NUCLEAR/pipeSide.png | Bin 401 -> 0 bytes .../blocks/materialicons/NUCLEAR/pipeSmall.png | Bin 427 -> 0 bytes .../blocks/materialicons/NUCLEAR/pipeTiny.png | Bin 418 -> 0 bytes .../textures/blocks/materialicons/NUCLEAR/void.png | Bin 143 -> 0 bytes .../textures/blocks/materialicons/NUCLEAR/wire.png | Bin 513 -> 0 bytes .../blocks/materialicons/REFINED/block1.png | Bin 487 -> 0 bytes .../blocks/materialicons/REFINED/block2.png | Bin 459 -> 0 bytes .../blocks/materialicons/REFINED/block3.png | Bin 490 -> 0 bytes .../blocks/materialicons/REFINED/block4.png | Bin 480 -> 0 bytes .../blocks/materialicons/REFINED/block5.png | Bin 414 -> 0 bytes .../blocks/materialicons/REFINED/block6.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/REFINED/foil.png | Bin 368 -> 0 bytes .../blocks/materialicons/REFINED/frameGt.png | Bin 437 -> 0 bytes .../textures/blocks/materialicons/REFINED/ore.png | Bin 632 -> 0 bytes .../blocks/materialicons/REFINED/oreSmall.png | Bin 339 -> 0 bytes .../blocks/materialicons/REFINED/pipeHuge.png | Bin 500 -> 0 bytes .../blocks/materialicons/REFINED/pipeLarge.png | Bin 555 -> 0 bytes .../blocks/materialicons/REFINED/pipeMedium.png | Bin 569 -> 0 bytes .../blocks/materialicons/REFINED/pipeSide.png | Bin 540 -> 0 bytes .../blocks/materialicons/REFINED/pipeSmall.png | Bin 545 -> 0 bytes .../blocks/materialicons/REFINED/pipeTiny.png | Bin 560 -> 0 bytes .../textures/blocks/materialicons/REFINED/void.png | Bin 143 -> 0 bytes .../textures/blocks/materialicons/REFINED/wire.png | Bin 513 -> 0 bytes .../textures/gui/HatchNbtConsumable_2By2.png | Bin 1642 -> 0 bytes .../textures/gui/HatchNbtConsumable_3By3.png | Bin 1664 -> 0 bytes .../textures/gui/HatchNbtConsumable_4By4.png | Bin 1689 -> 0 bytes .../gregtech/textures/gui/PowerSubStation.png | Bin 970 -> 0 bytes .../textures/gui/basicmachines/BlastSmelter.png | Bin 1358 -> 0 bytes .../textures/gui/basicmachines/Dehydrator.png | Bin 1401 -> 0 bytes .../textures/gui/basicmachines/FissionFuel.png | Bin 2393 -> 0 bytes .../gregtech/textures/gui/basicmachines/LFTR.png | Bin 1236 -> 0 bytes .../textures/gui/basicmachines/MixerAdvanced.png | Bin 1871 -> 0 bytes .../gregtech/textures/gui/multimachines/LFTR.png | Bin 1236 -> 0 bytes .../textures/items/gt.Volumetric_Flask_32k.png | Bin 1013 -> 0 bytes .../items/gt.Volumetric_Flask_32k.window.png | Bin 399 -> 0 bytes .../textures/items/gt.Volumetric_Flask_8k.png | Bin 1010 -> 0 bytes .../items/gt.Volumetric_Flask_8k.window.png | Bin 398 -> 0 bytes .../items/materialicons/ENRICHED/TURBINE_BLADE.png | Bin 395 -> 0 bytes .../ENRICHED/TURBINE_BLADE_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/ENRICHED/arrowGtPlastic.png | Bin 291 -> 0 bytes .../ENRICHED/arrowGtPlastic_OVERLAY.png | Bin 289 -> 0 bytes .../items/materialicons/ENRICHED/arrowGtWood.png | Bin 291 -> 0 bytes .../materialicons/ENRICHED/arrowGtWood_OVERLAY.png | Bin 302 -> 0 bytes .../textures/items/materialicons/ENRICHED/bolt.png | Bin 161 -> 0 bytes .../items/materialicons/ENRICHED/bolt_OVERLAY.png | Bin 206 -> 0 bytes .../textures/items/materialicons/ENRICHED/cell.png | Bin 328 -> 0 bytes .../items/materialicons/ENRICHED/cellPlasma.png | Bin 328 -> 0 bytes .../materialicons/ENRICHED/cellPlasma_OVERLAY.png | Bin 290 -> 0 bytes .../items/materialicons/ENRICHED/cell_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/ENRICHED/crateGtDust.png | Bin 370 -> 0 bytes .../materialicons/ENRICHED/crateGtDust_OVERLAY.png | Bin 506 -> 0 bytes .../items/materialicons/ENRICHED/crateGtGem.png | Bin 401 -> 0 bytes .../materialicons/ENRICHED/crateGtGem_OVERLAY.png | Bin 526 -> 0 bytes .../items/materialicons/ENRICHED/crateGtIngot.png | Bin 380 -> 0 bytes .../ENRICHED/crateGtIngot_OVERLAY.png | Bin 517 -> 0 bytes .../items/materialicons/ENRICHED/crateGtPlate.png | Bin 455 -> 0 bytes .../ENRICHED/crateGtPlate_OVERLAY.png | Bin 449 -> 0 bytes .../items/materialicons/ENRICHED/crushed.png | Bin 441 -> 0 bytes .../materialicons/ENRICHED/crushedCentrifuged.png | Bin 561 -> 0 bytes .../ENRICHED/crushedCentrifuged_OVERLAY.png | Bin 430 -> 0 bytes .../materialicons/ENRICHED/crushedPurified.png | Bin 460 -> 0 bytes .../ENRICHED/crushedPurified_OVERLAY.png | Bin 583 -> 0 bytes .../materialicons/ENRICHED/crushed_OVERLAY.png | Bin 426 -> 0 bytes .../textures/items/materialicons/ENRICHED/dust.png | Bin 312 -> 0 bytes .../items/materialicons/ENRICHED/dustImpure.png | Bin 312 -> 0 bytes .../materialicons/ENRICHED/dustImpure_OVERLAY.png | Bin 415 -> 0 bytes .../items/materialicons/ENRICHED/dustPure.png | Bin 312 -> 0 bytes .../materialicons/ENRICHED/dustPure_OVERLAY.png | Bin 383 -> 0 bytes .../items/materialicons/ENRICHED/dustSmall.png | Bin 286 -> 0 bytes .../materialicons/ENRICHED/dustSmall_OVERLAY.png | Bin 252 -> 0 bytes .../items/materialicons/ENRICHED/dustTiny.png | Bin 221 -> 0 bytes .../materialicons/ENRICHED/dustTiny_OVERLAY.png | Bin 221 -> 0 bytes .../items/materialicons/ENRICHED/dust_OVERLAY.png | Bin 222 -> 0 bytes .../textures/items/materialicons/ENRICHED/foil.png | Bin 475 -> 0 bytes .../items/materialicons/ENRICHED/foil_OVERLAY.png | Bin 539 -> 0 bytes .../items/materialicons/ENRICHED/gearGt.png | Bin 434 -> 0 bytes .../items/materialicons/ENRICHED/gearGtSmall.png | Bin 563 -> 0 bytes .../materialicons/ENRICHED/gearGtSmall_OVERLAY.png | Bin 365 -> 0 bytes .../materialicons/ENRICHED/gearGt_OVERLAY.png | Bin 503 -> 0 bytes .../textures/items/materialicons/ENRICHED/gem.png | Bin 419 -> 0 bytes .../items/materialicons/ENRICHED/gemChipped.png | Bin 575 -> 0 bytes .../materialicons/ENRICHED/gemChipped_OVERLAY.png | Bin 465 -> 0 bytes .../items/materialicons/ENRICHED/gemExquisite.png | Bin 619 -> 0 bytes .../ENRICHED/gemExquisite_OVERLAY.png | Bin 613 -> 0 bytes .../items/materialicons/ENRICHED/gemFlawed.png | Bin 504 -> 0 bytes .../materialicons/ENRICHED/gemFlawed_OVERLAY.png | Bin 487 -> 0 bytes .../items/materialicons/ENRICHED/gemFlawless.png | Bin 691 -> 0 bytes .../materialicons/ENRICHED/gemFlawless_OVERLAY.png | Bin 504 -> 0 bytes .../items/materialicons/ENRICHED/gem_OVERLAY.png | Bin 465 -> 0 bytes .../items/materialicons/ENRICHED/handleMallet.png | Bin 356 -> 0 bytes .../ENRICHED/handleMallet_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/ENRICHED/ingot.png | Bin 344 -> 0 bytes .../items/materialicons/ENRICHED/ingotDouble.png | Bin 403 -> 0 bytes .../materialicons/ENRICHED/ingotDouble_OVERLAY.png | Bin 419 -> 0 bytes .../items/materialicons/ENRICHED/ingotHot.png | Bin 335 -> 0 bytes .../materialicons/ENRICHED/ingotHot_OVERLAY.png | Bin 309 -> 0 bytes .../materialicons/ENRICHED/ingotQuadruple.png | Bin 375 -> 0 bytes .../ENRICHED/ingotQuadruple_OVERLAY.png | Bin 379 -> 0 bytes .../materialicons/ENRICHED/ingotQuintuple.png | Bin 358 -> 0 bytes .../ENRICHED/ingotQuintuple_OVERLAY.png | Bin 362 -> 0 bytes .../items/materialicons/ENRICHED/ingotTriple.png | Bin 388 -> 0 bytes .../materialicons/ENRICHED/ingotTriple_OVERLAY.png | Bin 395 -> 0 bytes .../items/materialicons/ENRICHED/ingot_OVERLAY.png | Bin 365 -> 0 bytes .../textures/items/materialicons/ENRICHED/lens.png | Bin 296 -> 0 bytes .../items/materialicons/ENRICHED/lens_OVERLAY.png | Bin 594 -> 0 bytes .../items/materialicons/ENRICHED/nugget.png | Bin 250 -> 0 bytes .../materialicons/ENRICHED/nugget_OVERLAY.png | Bin 261 -> 0 bytes .../items/materialicons/ENRICHED/plate.png | Bin 275 -> 0 bytes .../items/materialicons/ENRICHED/plateDense.png | Bin 298 -> 0 bytes .../materialicons/ENRICHED/plateDense_OVERLAY.png | Bin 322 -> 0 bytes .../items/materialicons/ENRICHED/plateDouble.png | Bin 297 -> 0 bytes .../materialicons/ENRICHED/plateDouble_OVERLAY.png | Bin 338 -> 0 bytes .../materialicons/ENRICHED/plateQuadruple.png | Bin 310 -> 0 bytes .../ENRICHED/plateQuadruple_OVERLAY.png | Bin 372 -> 0 bytes .../materialicons/ENRICHED/plateQuintuple.png | Bin 312 -> 0 bytes .../ENRICHED/plateQuintuple_OVERLAY.png | Bin 380 -> 0 bytes .../items/materialicons/ENRICHED/plateTriple.png | Bin 304 -> 0 bytes .../materialicons/ENRICHED/plateTriple_OVERLAY.png | Bin 360 -> 0 bytes .../items/materialicons/ENRICHED/plate_OVERLAY.png | Bin 300 -> 0 bytes .../textures/items/materialicons/ENRICHED/ring.png | Bin 311 -> 0 bytes .../items/materialicons/ENRICHED/ring_OVERLAY.png | Bin 413 -> 0 bytes .../items/materialicons/ENRICHED/rotor.png | Bin 443 -> 0 bytes .../items/materialicons/ENRICHED/rotor_OVERLAY.png | Bin 470 -> 0 bytes .../items/materialicons/ENRICHED/round.png | Bin 200 -> 0 bytes .../items/materialicons/ENRICHED/round_OVERLAY.png | Bin 205 -> 0 bytes .../items/materialicons/ENRICHED/screw.png | Bin 199 -> 0 bytes .../items/materialicons/ENRICHED/screw_OVERLAY.png | Bin 226 -> 0 bytes .../items/materialicons/ENRICHED/spring.png | Bin 276 -> 0 bytes .../items/materialicons/ENRICHED/springSmall.png | Bin 317 -> 0 bytes .../materialicons/ENRICHED/springSmall_OVERLAY.png | Bin 283 -> 0 bytes .../materialicons/ENRICHED/spring_OVERLAY.png | Bin 304 -> 0 bytes .../items/materialicons/ENRICHED/stick.png | Bin 230 -> 0 bytes .../items/materialicons/ENRICHED/stickLong.png | Bin 246 -> 0 bytes .../materialicons/ENRICHED/stickLong_OVERLAY.png | Bin 217 -> 0 bytes .../items/materialicons/ENRICHED/stick_OVERLAY.png | Bin 248 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadArrow.png | Bin 424 -> 0 bytes .../ENRICHED/toolHeadArrow_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadAxe.png | Bin 255 -> 0 bytes .../materialicons/ENRICHED/toolHeadAxe_OVERLAY.png | Bin 250 -> 0 bytes .../materialicons/ENRICHED/toolHeadBuzzSaw.png | Bin 533 -> 0 bytes .../ENRICHED/toolHeadBuzzSaw_OVERLAY.png | Bin 557 -> 0 bytes .../materialicons/ENRICHED/toolHeadChainsaw.png | Bin 531 -> 0 bytes .../ENRICHED/toolHeadChainsaw_OVERLAY.png | Bin 347 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadDrill.png | Bin 525 -> 0 bytes .../ENRICHED/toolHeadDrill_OVERLAY.png | Bin 348 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadFile.png | Bin 257 -> 0 bytes .../ENRICHED/toolHeadFile_OVERLAY.png | Bin 295 -> 0 bytes .../materialicons/ENRICHED/toolHeadHammer.png | Bin 235 -> 0 bytes .../ENRICHED/toolHeadHammer_OVERLAY.png | Bin 253 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadHoe.png | Bin 230 -> 0 bytes .../materialicons/ENRICHED/toolHeadHoe_OVERLAY.png | Bin 240 -> 0 bytes .../materialicons/ENRICHED/toolHeadMallet.png | Bin 340 -> 0 bytes .../ENRICHED/toolHeadMallet_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/ENRICHED/toolHeadPickaxe.png | Bin 241 -> 0 bytes .../ENRICHED/toolHeadPickaxe_OVERLAY.png | Bin 280 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadPlow.png | Bin 268 -> 0 bytes .../ENRICHED/toolHeadPlow_OVERLAY.png | Bin 271 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadSaw.png | Bin 258 -> 0 bytes .../materialicons/ENRICHED/toolHeadSaw_OVERLAY.png | Bin 280 -> 0 bytes .../materialicons/ENRICHED/toolHeadScrewdriver.png | Bin 178 -> 0 bytes .../ENRICHED/toolHeadScrewdriver_OVERLAY.png | Bin 231 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadSense.png | Bin 259 -> 0 bytes .../ENRICHED/toolHeadSense_OVERLAY.png | Bin 285 -> 0 bytes .../materialicons/ENRICHED/toolHeadShovel.png | Bin 251 -> 0 bytes .../ENRICHED/toolHeadShovel_OVERLAY.png | Bin 270 -> 0 bytes .../materialicons/ENRICHED/toolHeadSoldering.png | Bin 314 -> 0 bytes .../ENRICHED/toolHeadSoldering_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/ENRICHED/toolHeadSword.png | Bin 269 -> 0 bytes .../ENRICHED/toolHeadSword_OVERLAY.png | Bin 280 -> 0 bytes .../ENRICHED/toolHeadUniversalSpade.png | Bin 254 -> 0 bytes .../ENRICHED/toolHeadUniversalSpade_OVERLAY.png | Bin 262 -> 0 bytes .../materialicons/ENRICHED/toolHeadWrench.png | Bin 517 -> 0 bytes .../ENRICHED/toolHeadWrench_OVERLAY.png | Bin 310 -> 0 bytes .../items/materialicons/ENRICHED/turbineBlade.png | Bin 395 -> 0 bytes .../ENRICHED/turbineBlade_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/ENRICHED/void.png | Bin 143 -> 0 bytes .../items/materialicons/ENRICHED/void_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/ENRICHED/wireFine.png | Bin 481 -> 0 bytes .../materialicons/ENRICHED/wireFine_OVERLAY.png | Bin 458 -> 0 bytes .../items/materialicons/GEM_A/TURBINE_BLADE.png | Bin 395 -> 0 bytes .../materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/arrowGtPlastic.png | Bin 297 -> 0 bytes .../materialicons/GEM_A/arrowGtPlastic_OVERLAY.png | Bin 283 -> 0 bytes .../items/materialicons/GEM_A/arrowGtWood.png | Bin 297 -> 0 bytes .../materialicons/GEM_A/arrowGtWood_OVERLAY.png | Bin 294 -> 0 bytes .../textures/items/materialicons/GEM_A/bolt.png | Bin 161 -> 0 bytes .../items/materialicons/GEM_A/bolt_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/cell.png | Bin 328 -> 0 bytes .../items/materialicons/GEM_A/cellPlasma.png | Bin 328 -> 0 bytes .../materialicons/GEM_A/cellPlasma_OVERLAY.png | Bin 290 -> 0 bytes .../items/materialicons/GEM_A/cell_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/GEM_A/crateGtDust.png | Bin 370 -> 0 bytes .../materialicons/GEM_A/crateGtDust_OVERLAY.png | Bin 506 -> 0 bytes .../items/materialicons/GEM_A/crateGtGem.png | Bin 401 -> 0 bytes .../materialicons/GEM_A/crateGtGem_OVERLAY.png | Bin 526 -> 0 bytes .../items/materialicons/GEM_A/crateGtIngot.png | Bin 380 -> 0 bytes .../materialicons/GEM_A/crateGtIngot_OVERLAY.png | Bin 517 -> 0 bytes .../items/materialicons/GEM_A/crateGtPlate.png | Bin 455 -> 0 bytes .../materialicons/GEM_A/crateGtPlate_OVERLAY.png | Bin 449 -> 0 bytes .../textures/items/materialicons/GEM_A/crushed.png | Bin 441 -> 0 bytes .../materialicons/GEM_A/crushedCentrifuged.png | Bin 561 -> 0 bytes .../GEM_A/crushedCentrifuged_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/crushedPurified.png | Bin 460 -> 0 bytes .../GEM_A/crushedPurified_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/crushed_OVERLAY.png | Bin 448 -> 0 bytes .../textures/items/materialicons/GEM_A/dust.png | Bin 312 -> 0 bytes .../items/materialicons/GEM_A/dustImpure.png | Bin 312 -> 0 bytes .../materialicons/GEM_A/dustImpure_OVERLAY.png | Bin 430 -> 0 bytes .../items/materialicons/GEM_A/dustPure.png | Bin 312 -> 0 bytes .../items/materialicons/GEM_A/dustPure_OVERLAY.png | Bin 424 -> 0 bytes .../items/materialicons/GEM_A/dustSmall.png | Bin 286 -> 0 bytes .../materialicons/GEM_A/dustSmall_OVERLAY.png | Bin 149 -> 0 bytes .../items/materialicons/GEM_A/dustTiny.png | Bin 221 -> 0 bytes .../items/materialicons/GEM_A/dustTiny_OVERLAY.png | Bin 149 -> 0 bytes .../items/materialicons/GEM_A/dust_OVERLAY.png | Bin 172 -> 0 bytes .../textures/items/materialicons/GEM_A/foil.png | Bin 475 -> 0 bytes .../items/materialicons/GEM_A/foil_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/gearGt.png | Bin 434 -> 0 bytes .../items/materialicons/GEM_A/gearGtSmall.png | Bin 563 -> 0 bytes .../materialicons/GEM_A/gearGtSmall_OVERLAY.png | Bin 312 -> 0 bytes .../items/materialicons/GEM_A/gearGt_OVERLAY.png | Bin 172 -> 0 bytes .../textures/items/materialicons/GEM_A/gem.png | Bin 341 -> 0 bytes .../items/materialicons/GEM_A/gemChipped.png | Bin 575 -> 0 bytes .../materialicons/GEM_A/gemChipped_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/gemExquisite.png | Bin 619 -> 0 bytes .../materialicons/GEM_A/gemExquisite_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/gemFlawed.png | Bin 504 -> 0 bytes .../materialicons/GEM_A/gemFlawed_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/gemFlawless.png | Bin 691 -> 0 bytes .../materialicons/GEM_A/gemFlawless_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/gem_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/handleMallet.png | Bin 356 -> 0 bytes .../materialicons/GEM_A/handleMallet_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/ingot.png | Bin 344 -> 0 bytes .../items/materialicons/GEM_A/ingotDouble.png | Bin 403 -> 0 bytes .../materialicons/GEM_A/ingotDouble_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/ingotHot.png | Bin 335 -> 0 bytes .../items/materialicons/GEM_A/ingotHot_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/GEM_A/ingotQuadruple.png | Bin 375 -> 0 bytes .../materialicons/GEM_A/ingotQuadruple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/ingotQuintuple.png | Bin 358 -> 0 bytes .../materialicons/GEM_A/ingotQuintuple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/ingotTriple.png | Bin 388 -> 0 bytes .../materialicons/GEM_A/ingotTriple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/ingot_OVERLAY.png | Bin 180 -> 0 bytes .../textures/items/materialicons/GEM_A/lens.png | Bin 296 -> 0 bytes .../items/materialicons/GEM_A/lens_OVERLAY.png | Bin 556 -> 0 bytes .../textures/items/materialicons/GEM_A/nugget.png | Bin 250 -> 0 bytes .../items/materialicons/GEM_A/nugget_OVERLAY.png | Bin 163 -> 0 bytes .../textures/items/materialicons/GEM_A/plate.png | Bin 275 -> 0 bytes .../items/materialicons/GEM_A/plateDense.png | Bin 298 -> 0 bytes .../materialicons/GEM_A/plateDense_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/plateDouble.png | Bin 297 -> 0 bytes .../materialicons/GEM_A/plateDouble_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/plateQuadruple.png | Bin 310 -> 0 bytes .../materialicons/GEM_A/plateQuadruple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/plateQuintuple.png | Bin 312 -> 0 bytes .../materialicons/GEM_A/plateQuintuple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/plateTriple.png | Bin 304 -> 0 bytes .../materialicons/GEM_A/plateTriple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/plate_OVERLAY.png | Bin 173 -> 0 bytes .../textures/items/materialicons/GEM_A/ring.png | Bin 311 -> 0 bytes .../items/materialicons/GEM_A/ring_OVERLAY.png | Bin 174 -> 0 bytes .../textures/items/materialicons/GEM_A/rotor.png | Bin 443 -> 0 bytes .../items/materialicons/GEM_A/rotor_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/round.png | Bin 200 -> 0 bytes .../items/materialicons/GEM_A/round_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/screw.png | Bin 199 -> 0 bytes .../items/materialicons/GEM_A/screw_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/spring.png | Bin 276 -> 0 bytes .../items/materialicons/GEM_A/springSmall.png | Bin 317 -> 0 bytes .../materialicons/GEM_A/springSmall_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/spring_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/stick.png | Bin 230 -> 0 bytes .../items/materialicons/GEM_A/stickLong.png | Bin 246 -> 0 bytes .../materialicons/GEM_A/stickLong_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/stick_OVERLAY.png | Bin 230 -> 0 bytes .../items/materialicons/GEM_A/toolHeadArrow.png | Bin 399 -> 0 bytes .../materialicons/GEM_A/toolHeadArrow_OVERLAY.png | Bin 183 -> 0 bytes .../items/materialicons/GEM_A/toolHeadAxe.png | Bin 255 -> 0 bytes .../materialicons/GEM_A/toolHeadAxe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadBuzzSaw.png | Bin 533 -> 0 bytes .../GEM_A/toolHeadBuzzSaw_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadChainsaw.png | Bin 531 -> 0 bytes .../GEM_A/toolHeadChainsaw_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadDrill.png | Bin 525 -> 0 bytes .../materialicons/GEM_A/toolHeadDrill_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadFile.png | Bin 257 -> 0 bytes .../materialicons/GEM_A/toolHeadFile_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadHammer.png | Bin 235 -> 0 bytes .../materialicons/GEM_A/toolHeadHammer_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadHoe.png | Bin 230 -> 0 bytes .../materialicons/GEM_A/toolHeadHoe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadMallet.png | Bin 340 -> 0 bytes .../materialicons/GEM_A/toolHeadMallet_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadPickaxe.png | Bin 241 -> 0 bytes .../GEM_A/toolHeadPickaxe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadPlow.png | Bin 268 -> 0 bytes .../materialicons/GEM_A/toolHeadPlow_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadSaw.png | Bin 258 -> 0 bytes .../materialicons/GEM_A/toolHeadSaw_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/GEM_A/toolHeadScrewdriver.png | Bin 178 -> 0 bytes .../GEM_A/toolHeadScrewdriver_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadSense.png | Bin 259 -> 0 bytes .../materialicons/GEM_A/toolHeadSense_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadShovel.png | Bin 251 -> 0 bytes .../materialicons/GEM_A/toolHeadShovel_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/GEM_A/toolHeadSoldering.png | Bin 314 -> 0 bytes .../GEM_A/toolHeadSoldering_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadSword.png | Bin 269 -> 0 bytes .../materialicons/GEM_A/toolHeadSword_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/GEM_A/toolHeadUniversalSpade.png | Bin 254 -> 0 bytes .../GEM_A/toolHeadUniversalSpade_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/toolHeadWrench.png | Bin 517 -> 0 bytes .../materialicons/GEM_A/toolHeadWrench_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/turbineBlade.png | Bin 395 -> 0 bytes .../materialicons/GEM_A/turbineBlade_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/GEM_A/void.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/void_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/GEM_A/wireFine.png | Bin 481 -> 0 bytes .../items/materialicons/GEM_A/wireFine_OVERLAY.png | Bin 271 -> 0 bytes .../items/materialicons/NUCLEAR/Fiery/cell.png | Bin 328 -> 0 bytes .../materialicons/NUCLEAR/Fiery/cellPlasma.png | Bin 328 -> 0 bytes .../NUCLEAR/Fiery/cellPlasma_OVERLAY.png | Bin 290 -> 0 bytes .../materialicons/NUCLEAR/Fiery/cell_OVERLAY.png | Bin 309 -> 0 bytes .../materialicons/NUCLEAR/Fiery/crateGtDust.png | Bin 370 -> 0 bytes .../NUCLEAR/Fiery/crateGtDust_OVERLAY.png | Bin 506 -> 0 bytes .../materialicons/NUCLEAR/Fiery/crateGtGem.png | Bin 401 -> 0 bytes .../NUCLEAR/Fiery/crateGtGem_OVERLAY.png | Bin 526 -> 0 bytes .../materialicons/NUCLEAR/Fiery/crateGtIngot.png | Bin 380 -> 0 bytes .../NUCLEAR/Fiery/crateGtIngot_OVERLAY.png | Bin 517 -> 0 bytes .../materialicons/NUCLEAR/Fiery/crateGtPlate.png | Bin 455 -> 0 bytes .../NUCLEAR/Fiery/crateGtPlate_OVERLAY.png | Bin 449 -> 0 bytes .../NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png | Bin 430 -> 0 bytes .../NUCLEAR/Fiery/crushedPurified_OVERLAY.png | Bin 583 -> 0 bytes .../NUCLEAR/Fiery/crushed_OVERLAY.png | Bin 426 -> 0 bytes .../NUCLEAR/Fiery/dustTiny_OVERLAY.png | Bin 221 -> 0 bytes .../materialicons/NUCLEAR/Fiery/dust_OVERLAY.png | Bin 222 -> 0 bytes .../materialicons/NUCLEAR/Fiery/foil_OVERLAY.png | Bin 539 -> 0 bytes .../NUCLEAR/Fiery/gearGtSmall_OVERLAY.png | Bin 365 -> 0 bytes .../materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png | Bin 503 -> 0 bytes .../NUCLEAR/Fiery/gemChipped_OVERLAY.png | Bin 465 -> 0 bytes .../NUCLEAR/Fiery/gemExquisite_OVERLAY.png | Bin 613 -> 0 bytes .../NUCLEAR/Fiery/gemFlawed_OVERLAY.png | Bin 487 -> 0 bytes .../NUCLEAR/Fiery/gemFlawless_OVERLAY.png | Bin 504 -> 0 bytes .../materialicons/NUCLEAR/Fiery/gem_OVERLAY.png | Bin 465 -> 0 bytes .../NUCLEAR/Fiery/ingotDouble_OVERLAY.png | Bin 419 -> 0 bytes .../NUCLEAR/Fiery/ingotHot_OVERLAY.png | Bin 309 -> 0 bytes .../NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png | Bin 379 -> 0 bytes .../NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png | Bin 362 -> 0 bytes .../NUCLEAR/Fiery/ingotTriple_OVERLAY.png | Bin 395 -> 0 bytes .../materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png | Bin 365 -> 0 bytes .../items/materialicons/NUCLEAR/Fiery/lens.png | Bin 296 -> 0 bytes .../materialicons/NUCLEAR/Fiery/lens_OVERLAY.png | Bin 594 -> 0 bytes .../materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png | Bin 261 -> 0 bytes .../NUCLEAR/Fiery/plateDense_OVERLAY.png | Bin 322 -> 0 bytes .../NUCLEAR/Fiery/plateDouble_OVERLAY.png | Bin 338 -> 0 bytes .../NUCLEAR/Fiery/plateQuadruple_OVERLAY.png | Bin 372 -> 0 bytes .../NUCLEAR/Fiery/plateQuintuple_OVERLAY.png | Bin 380 -> 0 bytes .../NUCLEAR/Fiery/plateTriple_OVERLAY.png | Bin 360 -> 0 bytes .../materialicons/NUCLEAR/Fiery/plate_OVERLAY.png | Bin 300 -> 0 bytes .../materialicons/NUCLEAR/Fiery/ring_OVERLAY.png | Bin 413 -> 0 bytes .../materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png | Bin 470 -> 0 bytes .../materialicons/NUCLEAR/Fiery/round_OVERLAY.png | Bin 205 -> 0 bytes .../materialicons/NUCLEAR/Fiery/screw_OVERLAY.png | Bin 226 -> 0 bytes .../NUCLEAR/Fiery/springSmall_OVERLAY.png | Bin 283 -> 0 bytes .../materialicons/NUCLEAR/Fiery/spring_OVERLAY.png | Bin 304 -> 0 bytes .../NUCLEAR/Fiery/stickLong_OVERLAY.png | Bin 217 -> 0 bytes .../materialicons/NUCLEAR/Fiery/stick_OVERLAY.png | Bin 248 -> 0 bytes .../items/materialicons/NUCLEAR/Fiery/wireFine.png | Bin 481 -> 0 bytes .../NUCLEAR/Fiery/wireFine_OVERLAY.png | Bin 458 -> 0 bytes .../items/materialicons/NUCLEAR/TURBINE_BLADE.png | Bin 395 -> 0 bytes .../NUCLEAR/TURBINE_BLADE_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/arrowGtPlastic.png | Bin 297 -> 0 bytes .../NUCLEAR/arrowGtPlastic_OVERLAY.png | Bin 283 -> 0 bytes .../items/materialicons/NUCLEAR/arrowGtWood.png | Bin 297 -> 0 bytes .../materialicons/NUCLEAR/arrowGtWood_OVERLAY.png | Bin 294 -> 0 bytes .../textures/items/materialicons/NUCLEAR/bolt.png | Bin 161 -> 0 bytes .../items/materialicons/NUCLEAR/bolt_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/NUCLEAR/cell.png | Bin 328 -> 0 bytes .../items/materialicons/NUCLEAR/cellPlasma.png | Bin 328 -> 0 bytes .../materialicons/NUCLEAR/cellPlasma_OVERLAY.png | Bin 290 -> 0 bytes .../items/materialicons/NUCLEAR/cell_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/NUCLEAR/crateGtDust.png | Bin 370 -> 0 bytes .../materialicons/NUCLEAR/crateGtDust_OVERLAY.png | Bin 506 -> 0 bytes .../items/materialicons/NUCLEAR/crateGtGem.png | Bin 401 -> 0 bytes .../materialicons/NUCLEAR/crateGtGem_OVERLAY.png | Bin 526 -> 0 bytes .../items/materialicons/NUCLEAR/crateGtIngot.png | Bin 380 -> 0 bytes .../materialicons/NUCLEAR/crateGtIngot_OVERLAY.png | Bin 517 -> 0 bytes .../items/materialicons/NUCLEAR/crateGtPlate.png | Bin 455 -> 0 bytes .../materialicons/NUCLEAR/crateGtPlate_OVERLAY.png | Bin 449 -> 0 bytes .../items/materialicons/NUCLEAR/crushed.png | Bin 462 -> 0 bytes .../materialicons/NUCLEAR/crushedCentrifuged.png | Bin 561 -> 0 bytes .../NUCLEAR/crushedCentrifuged_OVERLAY.png | Bin 393 -> 0 bytes .../materialicons/NUCLEAR/crushedPurified.png | Bin 460 -> 0 bytes .../NUCLEAR/crushedPurified_OVERLAY.png | Bin 538 -> 0 bytes .../materialicons/NUCLEAR/crushed_OVERLAY.png | Bin 539 -> 0 bytes .../textures/items/materialicons/NUCLEAR/dust.png | Bin 312 -> 0 bytes .../items/materialicons/NUCLEAR/dustImpure.png | Bin 312 -> 0 bytes .../materialicons/NUCLEAR/dustImpure_OVERLAY.png | Bin 430 -> 0 bytes .../items/materialicons/NUCLEAR/dustPure.png | Bin 312 -> 0 bytes .../materialicons/NUCLEAR/dustPure_OVERLAY.png | Bin 424 -> 0 bytes .../items/materialicons/NUCLEAR/dustSmall.png | Bin 286 -> 0 bytes .../materialicons/NUCLEAR/dustSmall_OVERLAY.png | Bin 256 -> 0 bytes .../items/materialicons/NUCLEAR/dustTiny.png | Bin 221 -> 0 bytes .../materialicons/NUCLEAR/dustTiny_OVERLAY.png | Bin 251 -> 0 bytes .../items/materialicons/NUCLEAR/dust_OVERLAY.png | Bin 281 -> 0 bytes .../textures/items/materialicons/NUCLEAR/foil.png | Bin 475 -> 0 bytes .../items/materialicons/NUCLEAR/foil_OVERLAY.png | Bin 568 -> 0 bytes .../items/materialicons/NUCLEAR/gearGt.png | Bin 434 -> 0 bytes .../items/materialicons/NUCLEAR/gearGtSmall.png | Bin 563 -> 0 bytes .../materialicons/NUCLEAR/gearGtSmall_OVERLAY.png | Bin 312 -> 0 bytes .../items/materialicons/NUCLEAR/gearGt_OVERLAY.png | Bin 172 -> 0 bytes .../textures/items/materialicons/NUCLEAR/gem.png | Bin 419 -> 0 bytes .../items/materialicons/NUCLEAR/gemChipped.png | Bin 575 -> 0 bytes .../materialicons/NUCLEAR/gemChipped_OVERLAY.png | Bin 511 -> 0 bytes .../items/materialicons/NUCLEAR/gemExquisite.png | Bin 619 -> 0 bytes .../materialicons/NUCLEAR/gemExquisite_OVERLAY.png | Bin 552 -> 0 bytes .../items/materialicons/NUCLEAR/gemFlawed.png | Bin 504 -> 0 bytes .../materialicons/NUCLEAR/gemFlawed_OVERLAY.png | Bin 543 -> 0 bytes .../items/materialicons/NUCLEAR/gemFlawless.png | Bin 691 -> 0 bytes .../materialicons/NUCLEAR/gemFlawless_OVERLAY.png | Bin 516 -> 0 bytes .../items/materialicons/NUCLEAR/gem_OVERLAY.png | Bin 437 -> 0 bytes .../items/materialicons/NUCLEAR/handleMallet.png | Bin 356 -> 0 bytes .../materialicons/NUCLEAR/handleMallet_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/NUCLEAR/ingot.png | Bin 344 -> 0 bytes .../items/materialicons/NUCLEAR/ingotDouble.png | Bin 403 -> 0 bytes .../materialicons/NUCLEAR/ingotDouble_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/ingotHot.png | Bin 335 -> 0 bytes .../materialicons/NUCLEAR/ingotHot_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/NUCLEAR/ingotQuadruple.png | Bin 375 -> 0 bytes .../NUCLEAR/ingotQuadruple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/ingotQuintuple.png | Bin 358 -> 0 bytes .../NUCLEAR/ingotQuintuple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/ingotTriple.png | Bin 388 -> 0 bytes .../materialicons/NUCLEAR/ingotTriple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/ingot_OVERLAY.png | Bin 333 -> 0 bytes .../textures/items/materialicons/NUCLEAR/lens.png | Bin 296 -> 0 bytes .../items/materialicons/NUCLEAR/lens_OVERLAY.png | Bin 556 -> 0 bytes .../items/materialicons/NUCLEAR/nugget.png | Bin 250 -> 0 bytes .../items/materialicons/NUCLEAR/nugget_OVERLAY.png | Bin 286 -> 0 bytes .../textures/items/materialicons/NUCLEAR/plate.png | Bin 275 -> 0 bytes .../items/materialicons/NUCLEAR/plateDense.png | Bin 298 -> 0 bytes .../materialicons/NUCLEAR/plateDense_OVERLAY.png | Bin 310 -> 0 bytes .../items/materialicons/NUCLEAR/plateDouble.png | Bin 297 -> 0 bytes .../materialicons/NUCLEAR/plateDouble_OVERLAY.png | Bin 319 -> 0 bytes .../items/materialicons/NUCLEAR/plateQuadruple.png | Bin 310 -> 0 bytes .../NUCLEAR/plateQuadruple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/plateQuintuple.png | Bin 312 -> 0 bytes .../NUCLEAR/plateQuintuple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/plateTriple.png | Bin 304 -> 0 bytes .../materialicons/NUCLEAR/plateTriple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/plate_OVERLAY.png | Bin 290 -> 0 bytes .../textures/items/materialicons/NUCLEAR/ring.png | Bin 311 -> 0 bytes .../items/materialicons/NUCLEAR/ring_OVERLAY.png | Bin 174 -> 0 bytes .../textures/items/materialicons/NUCLEAR/rotor.png | Bin 443 -> 0 bytes .../items/materialicons/NUCLEAR/rotor_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/NUCLEAR/round.png | Bin 200 -> 0 bytes .../items/materialicons/NUCLEAR/round_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/NUCLEAR/screw.png | Bin 199 -> 0 bytes .../items/materialicons/NUCLEAR/screw_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/spring.png | Bin 276 -> 0 bytes .../items/materialicons/NUCLEAR/springSmall.png | Bin 317 -> 0 bytes .../materialicons/NUCLEAR/springSmall_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/spring_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/NUCLEAR/stick.png | Bin 230 -> 0 bytes .../items/materialicons/NUCLEAR/stickLong.png | Bin 246 -> 0 bytes .../materialicons/NUCLEAR/stickLong_OVERLAY.png | Bin 305 -> 0 bytes .../items/materialicons/NUCLEAR/stick_OVERLAY.png | Bin 314 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadArrow.png | Bin 399 -> 0 bytes .../NUCLEAR/toolHeadArrow_OVERLAY.png | Bin 183 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadAxe.png | Bin 255 -> 0 bytes .../materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/NUCLEAR/toolHeadBuzzSaw.png | Bin 533 -> 0 bytes .../NUCLEAR/toolHeadBuzzSaw_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/NUCLEAR/toolHeadChainsaw.png | Bin 531 -> 0 bytes .../NUCLEAR/toolHeadChainsaw_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadDrill.png | Bin 525 -> 0 bytes .../NUCLEAR/toolHeadDrill_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadFile.png | Bin 257 -> 0 bytes .../materialicons/NUCLEAR/toolHeadFile_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadHammer.png | Bin 235 -> 0 bytes .../NUCLEAR/toolHeadHammer_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadHoe.png | Bin 230 -> 0 bytes .../materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadMallet.png | Bin 340 -> 0 bytes .../NUCLEAR/toolHeadMallet_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/NUCLEAR/toolHeadPickaxe.png | Bin 241 -> 0 bytes .../NUCLEAR/toolHeadPickaxe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadPlow.png | Bin 268 -> 0 bytes .../materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadSaw.png | Bin 258 -> 0 bytes .../materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/NUCLEAR/toolHeadScrewdriver.png | Bin 178 -> 0 bytes .../NUCLEAR/toolHeadScrewdriver_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadSense.png | Bin 259 -> 0 bytes .../NUCLEAR/toolHeadSense_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadShovel.png | Bin 251 -> 0 bytes .../NUCLEAR/toolHeadShovel_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/NUCLEAR/toolHeadSoldering.png | Bin 314 -> 0 bytes .../NUCLEAR/toolHeadSoldering_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadSword.png | Bin 269 -> 0 bytes .../NUCLEAR/toolHeadSword_OVERLAY.png | Bin 143 -> 0 bytes .../NUCLEAR/toolHeadUniversalSpade.png | Bin 254 -> 0 bytes .../NUCLEAR/toolHeadUniversalSpade_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/toolHeadWrench.png | Bin 517 -> 0 bytes .../NUCLEAR/toolHeadWrench_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/turbineBlade.png | Bin 395 -> 0 bytes .../materialicons/NUCLEAR/turbineBlade_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/NUCLEAR/void.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/void_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/NUCLEAR/wireFine.png | Bin 481 -> 0 bytes .../materialicons/NUCLEAR/wireFine_OVERLAY.png | Bin 271 -> 0 bytes .../items/materialicons/REFINED/TURBINE_BLADE.png | Bin 395 -> 0 bytes .../REFINED/TURBINE_BLADE_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/arrowGtPlastic.png | Bin 297 -> 0 bytes .../REFINED/arrowGtPlastic_OVERLAY.png | Bin 283 -> 0 bytes .../items/materialicons/REFINED/arrowGtWood.png | Bin 297 -> 0 bytes .../materialicons/REFINED/arrowGtWood_OVERLAY.png | Bin 294 -> 0 bytes .../textures/items/materialicons/REFINED/bolt.png | Bin 161 -> 0 bytes .../items/materialicons/REFINED/bolt_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/REFINED/cell.png | Bin 328 -> 0 bytes .../items/materialicons/REFINED/cellPlasma.png | Bin 328 -> 0 bytes .../materialicons/REFINED/cellPlasma_OVERLAY.png | Bin 290 -> 0 bytes .../items/materialicons/REFINED/cell_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/REFINED/crateGtDust.png | Bin 370 -> 0 bytes .../materialicons/REFINED/crateGtDust_OVERLAY.png | Bin 506 -> 0 bytes .../items/materialicons/REFINED/crateGtGem.png | Bin 401 -> 0 bytes .../materialicons/REFINED/crateGtGem_OVERLAY.png | Bin 526 -> 0 bytes .../items/materialicons/REFINED/crateGtIngot.png | Bin 380 -> 0 bytes .../materialicons/REFINED/crateGtIngot_OVERLAY.png | Bin 517 -> 0 bytes .../items/materialicons/REFINED/crateGtPlate.png | Bin 455 -> 0 bytes .../materialicons/REFINED/crateGtPlate_OVERLAY.png | Bin 449 -> 0 bytes .../items/materialicons/REFINED/crushed.png | Bin 441 -> 0 bytes .../materialicons/REFINED/crushedCentrifuged.png | Bin 561 -> 0 bytes .../REFINED/crushedCentrifuged_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/crushedPurified.png | Bin 460 -> 0 bytes .../REFINED/crushedPurified_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/crushed_OVERLAY.png | Bin 448 -> 0 bytes .../textures/items/materialicons/REFINED/dust.png | Bin 312 -> 0 bytes .../items/materialicons/REFINED/dustImpure.png | Bin 312 -> 0 bytes .../materialicons/REFINED/dustImpure_OVERLAY.png | Bin 430 -> 0 bytes .../items/materialicons/REFINED/dustPure.png | Bin 312 -> 0 bytes .../materialicons/REFINED/dustPure_OVERLAY.png | Bin 424 -> 0 bytes .../items/materialicons/REFINED/dustSmall.png | Bin 286 -> 0 bytes .../materialicons/REFINED/dustSmall_OVERLAY.png | Bin 149 -> 0 bytes .../items/materialicons/REFINED/dustTiny.png | Bin 221 -> 0 bytes .../materialicons/REFINED/dustTiny_OVERLAY.png | Bin 149 -> 0 bytes .../items/materialicons/REFINED/dust_OVERLAY.png | Bin 172 -> 0 bytes .../textures/items/materialicons/REFINED/foil.png | Bin 475 -> 0 bytes .../items/materialicons/REFINED/foil_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/gearGt.png | Bin 434 -> 0 bytes .../items/materialicons/REFINED/gearGtSmall.png | Bin 563 -> 0 bytes .../materialicons/REFINED/gearGtSmall_OVERLAY.png | Bin 312 -> 0 bytes .../items/materialicons/REFINED/gearGt_OVERLAY.png | Bin 172 -> 0 bytes .../textures/items/materialicons/REFINED/gem.png | Bin 419 -> 0 bytes .../items/materialicons/REFINED/gemChipped.png | Bin 575 -> 0 bytes .../materialicons/REFINED/gemChipped_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/gemExquisite.png | Bin 619 -> 0 bytes .../materialicons/REFINED/gemExquisite_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/gemFlawed.png | Bin 504 -> 0 bytes .../materialicons/REFINED/gemFlawed_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/gemFlawless.png | Bin 691 -> 0 bytes .../materialicons/REFINED/gemFlawless_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/gem_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/handleMallet.png | Bin 356 -> 0 bytes .../materialicons/REFINED/handleMallet_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/REFINED/ingot.png | Bin 344 -> 0 bytes .../items/materialicons/REFINED/ingotDouble.png | Bin 403 -> 0 bytes .../materialicons/REFINED/ingotDouble_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/ingotHot.png | Bin 335 -> 0 bytes .../materialicons/REFINED/ingotHot_OVERLAY.png | Bin 309 -> 0 bytes .../items/materialicons/REFINED/ingotQuadruple.png | Bin 375 -> 0 bytes .../REFINED/ingotQuadruple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/ingotQuintuple.png | Bin 358 -> 0 bytes .../REFINED/ingotQuintuple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/ingotTriple.png | Bin 388 -> 0 bytes .../materialicons/REFINED/ingotTriple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/ingot_OVERLAY.png | Bin 180 -> 0 bytes .../textures/items/materialicons/REFINED/lens.png | Bin 296 -> 0 bytes .../items/materialicons/REFINED/lens_OVERLAY.png | Bin 556 -> 0 bytes .../items/materialicons/REFINED/nugget.png | Bin 250 -> 0 bytes .../items/materialicons/REFINED/nugget_OVERLAY.png | Bin 163 -> 0 bytes .../textures/items/materialicons/REFINED/plate.png | Bin 275 -> 0 bytes .../items/materialicons/REFINED/plateDense.png | Bin 298 -> 0 bytes .../materialicons/REFINED/plateDense_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/plateDouble.png | Bin 297 -> 0 bytes .../materialicons/REFINED/plateDouble_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/plateQuadruple.png | Bin 310 -> 0 bytes .../REFINED/plateQuadruple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/plateQuintuple.png | Bin 312 -> 0 bytes .../REFINED/plateQuintuple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/plateTriple.png | Bin 304 -> 0 bytes .../materialicons/REFINED/plateTriple_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/plate_OVERLAY.png | Bin 173 -> 0 bytes .../textures/items/materialicons/REFINED/ring.png | Bin 311 -> 0 bytes .../items/materialicons/REFINED/ring_OVERLAY.png | Bin 174 -> 0 bytes .../textures/items/materialicons/REFINED/rotor.png | Bin 443 -> 0 bytes .../items/materialicons/REFINED/rotor_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/REFINED/round.png | Bin 200 -> 0 bytes .../items/materialicons/REFINED/round_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/REFINED/screw.png | Bin 199 -> 0 bytes .../items/materialicons/REFINED/screw_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/spring.png | Bin 276 -> 0 bytes .../items/materialicons/REFINED/springSmall.png | Bin 317 -> 0 bytes .../materialicons/REFINED/springSmall_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/spring_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/REFINED/stick.png | Bin 230 -> 0 bytes .../items/materialicons/REFINED/stickLong.png | Bin 246 -> 0 bytes .../materialicons/REFINED/stickLong_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/stick_OVERLAY.png | Bin 230 -> 0 bytes .../items/materialicons/REFINED/toolHeadArrow.png | Bin 399 -> 0 bytes .../REFINED/toolHeadArrow_OVERLAY.png | Bin 183 -> 0 bytes .../items/materialicons/REFINED/toolHeadAxe.png | Bin 255 -> 0 bytes .../materialicons/REFINED/toolHeadAxe_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/toolHeadBuzzSaw.png | Bin 533 -> 0 bytes .../REFINED/toolHeadBuzzSaw_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/toolHeadChainsaw.png | Bin 531 -> 0 bytes .../REFINED/toolHeadChainsaw_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadDrill.png | Bin 525 -> 0 bytes .../REFINED/toolHeadDrill_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadFile.png | Bin 257 -> 0 bytes .../materialicons/REFINED/toolHeadFile_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadHammer.png | Bin 235 -> 0 bytes .../REFINED/toolHeadHammer_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadHoe.png | Bin 230 -> 0 bytes .../materialicons/REFINED/toolHeadHoe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadMallet.png | Bin 340 -> 0 bytes .../REFINED/toolHeadMallet_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/toolHeadPickaxe.png | Bin 241 -> 0 bytes .../REFINED/toolHeadPickaxe_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadPlow.png | Bin 268 -> 0 bytes .../materialicons/REFINED/toolHeadPlow_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadSaw.png | Bin 258 -> 0 bytes .../materialicons/REFINED/toolHeadSaw_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/toolHeadScrewdriver.png | Bin 178 -> 0 bytes .../REFINED/toolHeadScrewdriver_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadSense.png | Bin 259 -> 0 bytes .../REFINED/toolHeadSense_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadShovel.png | Bin 251 -> 0 bytes .../REFINED/toolHeadShovel_OVERLAY.png | Bin 143 -> 0 bytes .../materialicons/REFINED/toolHeadSoldering.png | Bin 314 -> 0 bytes .../REFINED/toolHeadSoldering_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadSword.png | Bin 269 -> 0 bytes .../REFINED/toolHeadSword_OVERLAY.png | Bin 143 -> 0 bytes .../REFINED/toolHeadUniversalSpade.png | Bin 254 -> 0 bytes .../REFINED/toolHeadUniversalSpade_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/toolHeadWrench.png | Bin 517 -> 0 bytes .../REFINED/toolHeadWrench_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/turbineBlade.png | Bin 395 -> 0 bytes .../materialicons/REFINED/turbineBlade_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/materialicons/REFINED/void.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/void_OVERLAY.png | Bin 143 -> 0 bytes .../items/materialicons/REFINED/wireFine.png | Bin 481 -> 0 bytes .../materialicons/REFINED/wireFine_OVERLAY.png | Bin 271 -> 0 bytes src/resources/assets/ic2/lang/de_DE.lang | 29 - src/resources/assets/ic2/lang/en_US.lang | 35 - src/resources/assets/ic2/lang/zh_CN.lang | 29 - .../assets/ic2/textures/armor/hazmatEx_1.png | Bin 2669 -> 0 bytes .../assets/ic2/textures/armor/hazmatEx_2.png | Bin 967 -> 0 bytes .../ic2/textures/items/cell/HydrofluoricAcid.png | Bin 383 -> 0 bytes .../ic2/textures/items/cell/HydrogenChloride.png | Bin 402 -> 0 bytes .../ic2/textures/items/cell/LithiumHydroxide.png | Bin 289 -> 0 bytes .../ic2/textures/items/cell/SulfurDioxide.png | Bin 402 -> 0 bytes .../ic2/textures/items/cell/SulfuricApatite.png | Bin 408 -> 0 bytes .../ic2/textures/items/cell/SulfuricLithium.png | Bin 431 -> 0 bytes .../ic2/textures/items/cell/SulfurousAcid.png | Bin 409 -> 0 bytes .../textures/items/cell/ThoriumTetraFluoride.png | Bin 460 -> 0 bytes .../textures/items/cell/UraniumHexaFluoride.png | Bin 398 -> 0 bytes .../textures/items/cell/UraniumTetraFluoride.png | Bin 445 -> 0 bytes .../textures/items/itemArmorHazmatChestplateEx.png | Bin 525 -> 0 bytes .../ic2/textures/items/itemArmorHazmatHelmetEx.png | Bin 464 -> 0 bytes .../textures/items/itemArmorHazmatLeggingsEx.png | Bin 418 -> 0 bytes .../ic2/textures/items/itemArmorRubBootsEx.png | Bin 459 -> 0 bytes .../textures/items/rotors/itemEnergeticRotor.png | Bin 608 -> 0 bytes .../ic2/textures/items/rotors/itemIridiumRotor.png | Bin 555 -> 0 bytes .../textures/items/rotors/itemMagnaliumRotor.png | Bin 566 -> 0 bytes .../items/rotors/itemTungstenSteelRotor.png | Bin 523 -> 0 bytes .../ic2/textures/items/rotors/itemUltimetRotor.png | Bin 542 -> 0 bytes .../ic2/textures/items/rotors/itemVibrantRotor.png | Bin 575 -> 0 bytes .../textures/items/rotors/rotorEnergeticModel.png | Bin 3650 -> 0 bytes .../textures/items/rotors/rotorIridiumModel.png | Bin 3748 -> 0 bytes .../textures/items/rotors/rotorMagnaliumModel.png | Bin 3748 -> 0 bytes .../items/rotors/rotorTungstenSteelModel.png | Bin 3748 -> 0 bytes .../textures/items/rotors/rotorUltimetModel.png | Bin 3748 -> 0 bytes .../textures/items/rotors/rotorVibrantModel.png | Bin 3502 -> 0 bytes .../assets/minecraft/sounds/mob/witch/death.ogg | Bin 8428 -> 0 bytes .../assets/minecraft/sounds/mob/witch/hit1.ogg | Bin 5843 -> 0 bytes .../assets/minecraft/sounds/mob/witch/hit2.ogg | Bin 5455 -> 0 bytes .../assets/minecraft/sounds/mob/witch/hit3.ogg | Bin 5424 -> 0 bytes .../assets/minecraft/sounds/mob/witch/hit4.ogg | Bin 5160 -> 0 bytes .../assets/minecraft/sounds/mob/witch/idle1.ogg | Bin 8605 -> 0 bytes .../assets/minecraft/sounds/mob/witch/idle2.ogg | Bin 10948 -> 0 bytes .../assets/minecraft/sounds/mob/witch/idle3.ogg | Bin 7106 -> 0 bytes src/resources/assets/miscutils/lang/de_DE.lang | 1908 ------ src/resources/assets/miscutils/lang/en_US.lang | 3366 --------- src/resources/assets/miscutils/lang/ru_RU.lang | 303 - src/resources/assets/miscutils/lang/zh_CN.lang | 3243 --------- .../assets/miscutils/textures/DevCape.png | Bin 1232 -> 0 bytes .../assets/miscutils/textures/DevCapeHD.png | Bin 4788 -> 0 bytes .../assets/miscutils/textures/FancyCape.png | Bin 1191 -> 0 bytes .../assets/miscutils/textures/FancyCapeHD.png | Bin 9643 -> 0 bytes src/resources/assets/miscutils/textures/Orange.png | Bin 364 -> 0 bytes .../assets/miscutils/textures/OrangeHD.png | Bin 5904 -> 0 bytes .../assets/miscutils/textures/PatreonCapeHD.png | Bin 10267 -> 0 bytes .../assets/miscutils/textures/TesterCape.png | Bin 1101 -> 0 bytes .../assets/miscutils/textures/TesterCapeHD.png | Bin 7976 -> 0 bytes .../miscutils/textures/aspects/Sagrausten.png | Bin 2997 -> 0 bytes .../assets/miscutils/textures/aspects/Slusium.png | Bin 697 -> 0 bytes .../assets/miscutils/textures/aspects/Xablum.png | Bin 563 -> 0 bytes .../assets/miscutils/textures/aspects/Xenil.png | Bin 1000 -> 0 bytes .../assets/miscutils/textures/aspects/Zetralt.png | Bin 1461 -> 0 bytes .../miscutils/textures/blocks/FirePit/Firepit.tcn | Bin 1583 -> 0 bytes .../textures/blocks/FirePit/mossyFirepit.png | Bin 612 -> 0 bytes .../miscutils/textures/blocks/SwirlBigBlue.png | Bin 259 -> 0 bytes .../assets/miscutils/textures/blocks/SwirlBlue.png | Bin 284 -> 0 bytes .../assets/miscutils/textures/blocks/SwirlCyan.png | Bin 286 -> 0 bytes .../assets/miscutils/textures/blocks/SwirlGray.png | Bin 270 -> 0 bytes .../assets/miscutils/textures/blocks/SwirlRed.png | Bin 286 -> 0 bytes .../miscutils/textures/blocks/SwirlYellow.png | Bin 280 -> 0 bytes .../textures/blocks/TileEntities/CASING_AMAZON.png | Bin 677 -> 0 bytes .../textures/blocks/TileEntities/Compartment/0.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/1.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/10.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/11.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/12.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/13.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/14.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/15.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/16.png | Bin 364 -> 0 bytes .../blocks/TileEntities/Compartment/17.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/18.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/19.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/2.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/20.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/21.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/22.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/23.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/24.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/25.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/26.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/27.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/28.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/29.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/3.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/30.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/31.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/4.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/5.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/6.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/7.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/8.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/Compartment/9.png | Bin 822 -> 0 bytes .../blocks/TileEntities/Compartment/wood_shelf.png | Bin 822 -> 0 bytes .../TileEntities/Compartment/wood_shelf_cans.png | Bin 822 -> 0 bytes .../TileEntities/Compartment/wood_shelf_paper.png | Bin 822 -> 0 bytes .../blocks/TileEntities/DecayablesChest_bottom.png | Bin 738 -> 0 bytes .../TileEntities/DecayablesChest_bottom_old.png | Bin 617 -> 0 bytes .../blocks/TileEntities/DecayablesChest_full.png | Bin 2249 -> 0 bytes .../blocks/TileEntities/DecayablesChest_side.png | Bin 666 -> 0 bytes .../blocks/TileEntities/DecayablesChest_top.png | Bin 670 -> 0 bytes .../textures/blocks/TileEntities/EggBox_full.png | Bin 1777 -> 0 bytes .../textures/blocks/TileEntities/EggBox_side.png | Bin 504 -> 0 bytes .../textures/blocks/TileEntities/EggBox_top.png | Bin 654 -> 0 bytes .../TileEntities/FluidReactor/OVERLAY_FRONT.png | Bin 313 -> 0 bytes .../FluidReactor/OVERLAY_FRONT_ACTIVE.png | Bin 704 -> 0 bytes .../FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta | 6 - .../TileEntities/FluidReactor/OVERLAY_SIDE.png | Bin 333 -> 0 bytes .../FluidReactor/OVERLAY_SIDE_ACTIVE.png | Bin 1049 -> 0 bytes .../FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta | 6 - .../TileEntities/FluidReactor/OVERLAY_TOP.png | Bin 228 -> 0 bytes .../FluidReactor/OVERLAY_TOP_ACTIVE.png | Bin 224 -> 0 bytes .../TileEntities/Generic_Creative_Texture.png | Bin 383 -> 0 bytes .../MACHINE_CASING_ADVANCED_CRYOGENIC.png | Bin 586 -> 0 bytes .../MACHINE_CASING_ADVANCED_VOLCANUS.png | Bin 601 -> 0 bytes .../TileEntities/MACHINE_CASING_CENTRIFUGE.png | Bin 632 -> 0 bytes .../MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png | Bin 522 -> 0 bytes .../MACHINE_CASING_FIREBOX_STABALLOY.png | Bin 825 -> 0 bytes .../TileEntities/MACHINE_CASING_FLOTATION.png | Bin 647 -> 0 bytes .../MACHINE_CASING_FLUID_INCOLOY_DS.png | Bin 1232 -> 0 bytes .../TileEntities/MACHINE_CASING_FUSION_FRONT.png | Bin 515 -> 0 bytes .../MACHINE_CASING_FUSION_FRONT_ACTIVE.png | Bin 502 -> 0 bytes .../TileEntities/MACHINE_CASING_GEARBOX_T1.png | Bin 633 -> 0 bytes .../MACHINE_CASING_GRINDING_FACTORY.png | Bin 671 -> 0 bytes .../TileEntities/MACHINE_CASING_LAURENIUM.png | Bin 416 -> 0 bytes .../blocks/TileEntities/MACHINE_CASING_PIPE_T1.png | Bin 598 -> 0 bytes .../TileEntities/MACHINE_CASING_ROCKETDYNE.png | Bin 643 -> 0 bytes .../TileEntities/MACHINE_CASING_STABLE_GRISIUM.png | Bin 662 -> 0 bytes .../MACHINE_CASING_STABLE_HASTELLOY_N.png | Bin 642 -> 0 bytes .../MACHINE_CASING_STABLE_HASTELLOY_X.png | Bin 649 -> 0 bytes .../MACHINE_CASING_STABLE_INCOLOY_020.png | Bin 665 -> 0 bytes .../MACHINE_CASING_STABLE_INCOLOY_DS.png | Bin 660 -> 0 bytes .../MACHINE_CASING_STABLE_INCOLOY_MA956.png | Bin 654 -> 0 bytes .../MACHINE_CASING_STABLE_MARAGINGSTEEL.png | Bin 394 -> 0 bytes .../TileEntities/MACHINE_CASING_STABLE_POTIN.png | Bin 635 -> 0 bytes .../MACHINE_CASING_STABLE_RED_STEEL.png | Bin 529 -> 0 bytes .../MACHINE_CASING_STABLE_STELLITE.png | Bin 659 -> 0 bytes .../MACHINE_CASING_STABLE_TALONITE.png | Bin 665 -> 0 bytes .../MACHINE_CASING_STABLE_TANTALLOY61.png | Bin 654 -> 0 bytes .../MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png | Bin 459 -> 0 bytes ...CHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png | Bin 436 -> 0 bytes ...MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png | Bin 623 -> 0 bytes .../MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png | Bin 504 -> 0 bytes .../TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png | Bin 662 -> 0 bytes .../MACHINE_CASING_STABLE_ZERON100.png | Bin 649 -> 0 bytes .../MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png | Bin 665 -> 0 bytes .../blocks/TileEntities/MACHINE_PESTKILLER_TOP.png | Bin 624 -> 0 bytes .../blocks/TileEntities/ModularTable_output.png | Bin 260 -> 0 bytes .../blocks/TileEntities/ModularTable_side.png | Bin 244 -> 0 bytes .../blocks/TileEntities/ModularTable_top.png | Bin 289 -> 0 bytes .../TileEntities/ReactorColdTrap/OVERLAY_FRONT.png | Bin 344 -> 0 bytes .../ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png | Bin 387 -> 0 bytes .../TileEntities/ReactorColdTrap/OVERLAY_SIDE.png | Bin 345 -> 0 bytes .../ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png | Bin 668 -> 0 bytes .../ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta | 6 - .../TileEntities/ReactorColdTrap/OVERLAY_TOP.png | Bin 228 -> 0 bytes .../ReactorColdTrap/OVERLAY_TOP_ACTIVE.png | Bin 224 -> 0 bytes .../ReactorProcessingUnit/OVERLAY_FRONT.png | Bin 439 -> 0 bytes .../ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png | Bin 704 -> 0 bytes .../OVERLAY_FRONT_ACTIVE.png.mcmeta | 6 - .../ReactorProcessingUnit/OVERLAY_SIDE.png | Bin 439 -> 0 bytes .../ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png | Bin 1049 -> 0 bytes .../OVERLAY_SIDE_ACTIVE.png.mcmeta | 6 - .../ReactorProcessingUnit/OVERLAY_TOP.png | Bin 367 -> 0 bytes .../ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png | Bin 366 -> 0 bytes .../RoundRobinator/MACHINE_CASING_VENT.png | Bin 467 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Side_0.png | Bin 1448 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Side_1.png | Bin 1444 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Side_2.png | Bin 1446 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Side_3.png | Bin 1446 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Side_4.png | Bin 1443 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Top_0.png | Bin 1405 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Top_1.png | Bin 1403 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Top_2.png | Bin 1403 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Top_3.png | Bin 1402 -> 0 bytes .../blocks/TileEntities/RoundRobinator/Top_4.png | Bin 1400 -> 0 bytes .../TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png | Bin 1505 -> 0 bytes .../STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta | 5 - .../textures/blocks/TileEntities/_PlaceHolder.png | Bin 696 -> 0 bytes .../TileEntities/adv_machine_dimensional.png | Bin 1660 -> 0 bytes .../adv_machine_dimensional.png.mcmeta | 5 - .../adv_machine_dimensional_cover_blue.png | Bin 1457 -> 0 bytes .../adv_machine_dimensional_cover_blue.png.mcmeta | 5 - .../adv_machine_dimensional_cover_orange.png | Bin 1383 -> 0 bytes ...adv_machine_dimensional_cover_orange.png.mcmeta | 5 - .../blocks/TileEntities/adv_machine_lesu.png | Bin 822 -> 0 bytes .../blocks/TileEntities/adv_machine_matterfab.png | Bin 296 -> 0 bytes .../TileEntities/adv_machine_matterfab_active.png | Bin 277 -> 0 bytes .../adv_machine_matterfab_active_animated.png | Bin 694 -> 0 bytes ...dv_machine_matterfab_active_animated.png.mcmeta | 6 - .../adv_machine_matterfab_animated.png | Bin 762 -> 0 bytes .../adv_machine_matterfab_animated.png.mcmeta | 6 - .../blocks/TileEntities/adv_machine_oil.png | Bin 238 -> 0 bytes .../TileEntities/adv_machine_screen_frequency.png | Bin 427 -> 0 bytes .../TileEntities/adv_machine_screen_logo.png | Bin 526 -> 0 bytes .../adv_machine_screen_logo.png.mcmeta | 6 - .../TileEntities/adv_machine_screen_random1.png | Bin 12342 -> 0 bytes .../adv_machine_screen_random1.png.mcmeta | 5 - .../TileEntities/adv_machine_screen_random2.png | Bin 12342 -> 0 bytes .../adv_machine_screen_random2.png.mcmeta | 5 - .../TileEntities/adv_machine_screen_random3.png | Bin 12342 -> 0 bytes .../adv_machine_screen_random3.png.mcmeta | 5 - .../blocks/TileEntities/adv_machine_uum.png | Bin 334 -> 0 bytes .../TileEntities/adv_machine_vent_rotating.png | Bin 3126 -> 0 bytes .../adv_machine_vent_rotating.png.mcmeta | 5 - .../textures/blocks/TileEntities/audio_out.png | Bin 275 -> 0 bytes .../blocks/TileEntities/audio_out_active.png | Bin 433 -> 0 bytes .../TileEntities/audio_out_active.png.mcmeta | 5 - .../textures/blocks/TileEntities/bronze_side.png | Bin 395 -> 0 bytes .../blocks/TileEntities/bronze_side_cabinet.png | Bin 401 -> 0 bytes .../blocks/TileEntities/bronze_top_crafting.png | Bin 383 -> 0 bytes .../textures/blocks/TileEntities/cover_charger.png | Bin 284 -> 0 bytes .../blocks/TileEntities/cover_crafting.png | Bin 822 -> 0 bytes .../blocks/TileEntities/cover_discharge.png | Bin 272 -> 0 bytes .../TileEntities/cover_redstone_conductor.png | Bin 822 -> 0 bytes .../blocks/TileEntities/cover_redstone_emitter.png | Bin 822 -> 0 bytes .../blocks/TileEntities/dirt_podzol_top.png | Bin 823 -> 0 bytes .../textures/blocks/TileEntities/fishtrap.png | Bin 326 -> 0 bytes .../blocks/TileEntities/gt4/machine_bottom.png | Bin 822 -> 0 bytes .../blocks/TileEntities/gt4/machine_side.png | Bin 822 -> 0 bytes .../TileEntities/gt4/machine_side_cabinet.png | Bin 822 -> 0 bytes .../blocks/TileEntities/gt4/machine_top.png | Bin 822 -> 0 bytes .../blocks/TileEntities/high_adv_machine.png | Bin 822 -> 0 bytes .../TileEntities/high_adv_machine_dimensional.png | Bin 1713 -> 0 bytes .../high_adv_machine_dimensional.png.mcmeta | 5 - .../blocks/TileEntities/log_acacia_top.png | Bin 603 -> 0 bytes .../blocks/TileEntities/machine_bottom.png | Bin 822 -> 0 bytes .../textures/blocks/TileEntities/machine_top.png | Bin 822 -> 0 bytes .../TileEntities/machine_top_dieselmotor.png | Bin 258 -> 0 bytes .../TileEntities/machine_top_dieselmotor2.png | Bin 233 -> 0 bytes .../machine_top_dieselmotor2_active.png | Bin 395 -> 0 bytes .../machine_top_dieselmotor2_active.png.mcmeta | 5 - .../machine_top_dieselmotor_active.png | Bin 427 -> 0 bytes .../machine_top_dieselmotor_active.png.mcmeta | 5 - .../TileEntities/machine_top_vent_rotating.png | Bin 517 -> 0 bytes .../machine_top_vent_rotating.png.mcmeta | 5 - .../machine_top_vent_rotating_fast.png | Bin 517 -> 0 bytes .../machine_top_vent_rotating_fast.png.mcmeta | 5 - .../blocks/TileEntities/sewer_adv_sides.png | Bin 379 -> 0 bytes .../textures/blocks/TileEntities/sewer_adv_top.png | Bin 373 -> 0 bytes .../textures/blocks/TileEntities/sewer_sides.png | Bin 375 -> 0 bytes .../textures/blocks/TileEntities/sewer_top.png | Bin 375 -> 0 bytes .../miscutils/textures/blocks/blockAntiGrief.png | Bin 1086 -> 0 bytes .../miscutils/textures/blocks/blockBlock.png | Bin 424 -> 0 bytes .../miscutils/textures/blocks/blockBloodSteel.png | Bin 529 -> 0 bytes .../miscutils/textures/blocks/blockDefault.png | Bin 942 -> 0 bytes .../miscutils/textures/blocks/blockFrameGt.png | Bin 437 -> 0 bytes .../miscutils/textures/blocks/blockMFEffect.png | Bin 205 -> 0 bytes .../blocks/blockNuclearFueledHeliumGenerator.png | Bin 440 -> 0 bytes .../miscutils/textures/blocks/blockOre_Overlay.png | Bin 231 -> 0 bytes .../miscutils/textures/blocks/blockStaballoy.png | Bin 942 -> 0 bytes .../miscutils/textures/blocks/blockStone.png | Bin 223 -> 0 bytes .../textures/blocks/chrono/CyberPanel.png | Bin 328 -> 0 bytes .../textures/blocks/chrono/CyberPanel2.png | Bin 350 -> 0 bytes .../textures/blocks/chrono/MetalFunnel.png | Bin 378 -> 0 bytes .../textures/blocks/chrono/MetalGrate.png | Bin 333 -> 0 bytes .../textures/blocks/chrono/MetalGrate2.png | Bin 269 -> 0 bytes .../textures/blocks/chrono/MetalGrate3.png | Bin 292 -> 0 bytes .../textures/blocks/chrono/MetalGrateA_Solid.png | Bin 304 -> 0 bytes .../textures/blocks/chrono/MetalPanel.png | Bin 318 -> 0 bytes .../textures/blocks/chrono/MetalSheet.png | Bin 298 -> 0 bytes .../textures/blocks/chrono/MetalSheet10.png | Bin 675 -> 0 bytes .../textures/blocks/chrono/MetalSheet11.png | Bin 574 -> 0 bytes .../textures/blocks/chrono/MetalSheet12.png | Bin 753 -> 0 bytes .../textures/blocks/chrono/MetalSheet2.png | Bin 318 -> 0 bytes .../textures/blocks/chrono/MetalSheet3.png | Bin 863 -> 0 bytes .../textures/blocks/chrono/MetalSheet4.png | Bin 851 -> 0 bytes .../textures/blocks/chrono/MetalSheet5.png | Bin 877 -> 0 bytes .../textures/blocks/chrono/MetalSheet6.png | Bin 401 -> 0 bytes .../textures/blocks/chrono/MetalSheet7.png | Bin 543 -> 0 bytes .../textures/blocks/chrono/MetalSheet8.png | Bin 834 -> 0 bytes .../textures/blocks/chrono/MetalSheet9.png | Bin 941 -> 0 bytes .../textures/blocks/chrono/Overlay_Cyber.png | Bin 295 -> 0 bytes .../miscutils/textures/blocks/clear_flow.png | Bin 942 -> 0 bytes .../miscutils/textures/blocks/clear_still.png | Bin 942 -> 0 bytes .../textures/blocks/compressed/obsidian1.png | Bin 656 -> 0 bytes .../textures/blocks/compressed/obsidian2.png | Bin 757 -> 0 bytes .../textures/blocks/compressed/obsidian3.png | Bin 801 -> 0 bytes .../textures/blocks/compressed/obsidian4.png | Bin 814 -> 0 bytes .../textures/blocks/compressed/obsidian5.png | Bin 787 -> 0 bytes .../textures/blocks/compressed/obsidian_invert.png | Bin 770 -> 0 bytes .../textures/blocks/crop/blockCrop.Hemp.1.png | Bin 220 -> 0 bytes .../textures/blocks/crop/blockCrop.Hemp.2.png | Bin 399 -> 0 bytes .../textures/blocks/crop/blockCrop.Hemp.3.png | Bin 572 -> 0 bytes .../textures/blocks/crop/blockCrop.Hemp.4.png | Bin 534 -> 0 bytes .../textures/blocks/crop/blockCrop.Hemp.5.png | Bin 661 -> 0 bytes .../textures/blocks/door_cactus_lower.png | Bin 558 -> 0 bytes .../textures/blocks/door_cactus_upper.png | Bin 563 -> 0 bytes .../miscutils/textures/blocks/door_glass_lower.png | Bin 176 -> 0 bytes .../miscutils/textures/blocks/door_glass_upper.png | Bin 183 -> 0 bytes .../miscutils/textures/blocks/door_ice_lower.png | Bin 508 -> 0 bytes .../miscutils/textures/blocks/door_ice_upper.png | Bin 542 -> 0 bytes .../textures/blocks/fluid/Fluid_Cryotheum_Flow.png | Bin 2943 -> 0 bytes .../blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta | 5 - .../blocks/fluid/Fluid_Cryotheum_Still.png | Bin 1911 -> 0 bytes .../blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta | 45 - .../textures/blocks/fluid/Fluid_Ender_Flow.png | Bin 3595 -> 0 bytes .../blocks/fluid/Fluid_Ender_Flow.png.mcmeta | 5 - .../textures/blocks/fluid/Fluid_Ender_Still.png | Bin 2001 -> 0 bytes .../blocks/fluid/Fluid_Ender_Still.png.mcmeta | 45 - .../textures/blocks/fluid/Fluid_Pyrotheum_Flow.png | Bin 3210 -> 0 bytes .../blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta | 5 - .../blocks/fluid/Fluid_Pyrotheum_Still.png | Bin 3691 -> 0 bytes .../blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta | 45 - .../textures/blocks/fluid/Fluid_Sludge_Flow.png | Bin 3601 -> 0 bytes .../blocks/fluid/Fluid_Sludge_Flow.png.mcmeta | 5 - .../textures/blocks/fluid/Fluid_Sludge_Still.png | Bin 2038 -> 0 bytes .../blocks/fluid/Fluid_Sludge_Still.png.mcmeta | 45 - .../textures/blocks/fluids/fluid.cryotheum.png | Bin 1911 -> 0 bytes .../blocks/fluids/fluid.cryotheum.png.mcmeta | 45 - .../textures/blocks/fluids/fluid.ender.png | Bin 2001 -> 0 bytes .../textures/blocks/fluids/fluid.ender.png.mcmeta | 45 - .../fluids/fluid.fluid.autogenerated.flowing.png | Bin 9232 -> 0 bytes .../fluid.fluid.autogenerated.flowing.png.mcmeta | 3 - .../blocks/fluids/fluid.fluid.autogenerated.png | Bin 7019 -> 0 bytes .../fluids/fluid.fluid.autogenerated.png.mcmeta | 5 - .../fluids/fluid.fluid.autogenerated.still.png | Bin 9586 -> 0 bytes .../fluid.fluid.autogenerated.still.png.mcmeta | 5 - .../blocks/fluids/fluid.hydrofluoricacid.png | Bin 3998 -> 0 bytes .../fluids/fluid.hydrofluoricacid.png.mcmeta | 5 - .../blocks/fluids/fluid.hydrogenchloride.png | Bin 2844 -> 0 bytes .../fluids/fluid.hydrogenchloride.png.mcmeta | 5 - .../textures/blocks/fluids/fluid.jackdaniels.png | Bin 3454 -> 0 bytes .../blocks/fluids/fluid.jackdaniels.png.mcmeta | 5 - .../blocks/fluids/fluid.lithiumhydroxide.png | Bin 22548 -> 0 bytes .../fluids/fluid.lithiumhydroxide.png.mcmeta | 5 - .../fluids/fluid.molten.autogenerated.new.1.png | Bin 4175 -> 0 bytes .../fluids/fluid.molten.autogenerated.old.png | Bin 7019 -> 0 bytes .../blocks/fluids/fluid.molten.autogenerated.png | Bin 2928 -> 0 bytes .../fluids/fluid.molten.autogenerated.png.mcmeta | 5 - .../blocks/fluids/fluid.plasma.autogenerated.png | Bin 1461 -> 0 bytes .../fluids/fluid.plasma.autogenerated.png.mcmeta | 5 - .../textures/blocks/fluids/fluid.pyrotheum.png | Bin 3691 -> 0 bytes .../blocks/fluids/fluid.pyrotheum.png.mcmeta | 45 - .../textures/blocks/fluids/fluid.sulfurdioxide.png | Bin 2844 -> 0 bytes .../blocks/fluids/fluid.sulfurdioxide.png.mcmeta | 5 - .../blocks/fluids/fluid.sulfuricapatite.png | Bin 2844 -> 0 bytes .../blocks/fluids/fluid.sulfuricapatite.png.mcmeta | 5 - .../blocks/fluids/fluid.sulfuriclithium.png | Bin 31006 -> 0 bytes .../blocks/fluids/fluid.sulfuriclithium.png.mcmeta | 5 - .../textures/blocks/fluids/fluid.sulfurousacid.png | Bin 2844 -> 0 bytes .../blocks/fluids/fluid.sulfurousacid.png.mcmeta | 5 - .../blocks/fluids/fluid.thoriumhexafluoride.png | Bin 3011 -> 0 bytes .../blocks/fluids/fluid.thoriumtetrafluoride.png | Bin 3167 -> 0 bytes .../fluids/fluid.thoriumtetrafluoride.png.mcmeta | 5 - .../blocks/fluids/fluid.uraniumhexafluoride.png | Bin 3196 -> 0 bytes .../fluids/fluid.uraniumhexafluoride.png.mcmeta | 5 - .../blocks/fluids/fluid.uraniumtetrafluoride.png | Bin 3196 -> 0 bytes .../fluids/fluid.uraniumtetrafluoride.png.mcmeta | 5 - .../blocks/hellfire/blockHellFire_layer_0.png | Bin 13281 -> 0 bytes .../hellfire/blockHellFire_layer_0.png.mcmeta | 38 - .../blocks/hellfire/blockHellFire_layer_1.png | Bin 13886 -> 0 bytes .../hellfire/blockHellFire_layer_1.png.mcmeta | 3 - .../iconsets/BigTurbine/LARGE_TURBINE_HP_1.png | Bin 334 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_2.png | Bin 448 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_3.png | Bin 367 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_4.png | Bin 461 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_5.png | Bin 332 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_6.png | Bin 505 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_7.png | Bin 391 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_8.png | Bin 446 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_HP_9.png | Bin 359 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png | Bin 546 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png | Bin 865 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png | Bin 608 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png | Bin 909 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png | Bin 880 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png | Bin 945 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png | Bin 656 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png | Bin 875 -> 0 bytes .../LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png | Bin 644 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_1.png | Bin 399 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_2.png | Bin 445 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_3.png | Bin 452 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_4.png | Bin 479 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_5.png | Bin 332 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_6.png | Bin 494 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_7.png | Bin 470 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_8.png | Bin 466 -> 0 bytes .../iconsets/BigTurbine/LARGE_TURBINE_LP_9.png | Bin 447 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png | Bin 604 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png | Bin 851 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png | Bin 646 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png | Bin 897 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png | Bin 880 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png | Bin 939 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png | Bin 633 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png | Bin 894 -> 0 bytes .../LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta | 3 - .../BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png | Bin 659 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_1.png | Bin 486 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_10.png | Bin 491 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_11.png | Bin 508 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_12.png | Bin 494 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_2.png | Bin 504 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_3.png | Bin 463 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_4.png | Bin 460 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_5.png | Bin 478 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_6.png | Bin 473 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_7.png | Bin 429 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_8.png | Bin 531 -> 0 bytes .../textures/blocks/iconsets/FUSIONIII_9.png | Bin 486 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER1.png | Bin 647 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER2.png | Bin 541 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER3.png | Bin 663 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER4.png | Bin 533 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER5.png | Bin 271 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER6.png | Bin 526 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER7.png | Bin 665 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER8.png | Bin 528 -> 0 bytes .../textures/blocks/iconsets/Grinder/GRINDER9.png | Bin 625 -> 0 bytes .../blocks/iconsets/Grinder/GRINDER_ACTIVE1.png | Bin 748 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE2.png | Bin 766 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE3.png | Bin 849 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn | Bin 5038 -> 0 bytes .../blocks/iconsets/Grinder/GRINDER_ACTIVE4.png | Bin 897 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE5.png | Bin 464 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE6.png | Bin 971 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE7.png | Bin 768 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE8.png | Bin 757 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta | 3 - .../blocks/iconsets/Grinder/GRINDER_ACTIVE9.png | Bin 747 -> 0 bytes .../iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta | 3 - .../textures/blocks/iconsets/LARGECENTRIFUGE1.png | Bin 515 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE2.png | Bin 507 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE3.png | Bin 539 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE4.png | Bin 546 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE5.png | Bin 332 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE6.png | Bin 530 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE7.png | Bin 546 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE8.png | Bin 511 -> 0 bytes .../textures/blocks/iconsets/LARGECENTRIFUGE9.png | Bin 509 -> 0 bytes .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png | Bin 670 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png | Bin 863 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png | Bin 687 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png | Bin 944 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png | Bin 880 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png | Bin 955 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png | Bin 696 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png | Bin 866 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta | 3 - .../blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png | Bin 657 -> 0 bytes .../iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta | 3 - .../blocks/iconsets/MACHINE_CASING_FUSION_3.png | Bin 525 -> 0 bytes .../iconsets/MACHINE_CASING_FUSION_COIL_II.png | Bin 517 -> 0 bytes .../iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png | Bin 505 -> 0 bytes .../textures/blocks/iconsets/OVERLAY_CATALYSTS.png | Bin 1371 -> 0 bytes .../blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta | 5 - .../blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png | Bin 553 -> 0 bytes .../blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png | Bin 334 -> 0 bytes .../iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png | Bin 455 -> 0 bytes .../blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png | Bin 353 -> 0 bytes .../blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png | Bin 377 -> 0 bytes .../OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png | Bin 724 -> 0 bytes ...Y_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta | 5 - ...Y_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png | Bin 733 -> 0 bytes ..._ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta | 5 - .../OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png | Bin 363 -> 0 bytes ...OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png | Bin 350 -> 0 bytes ...ERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png | Bin 533 -> 0 bytes ...RONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta | 5 - ...RONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png | Bin 557 -> 0 bytes ...ECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta | 5 - .../blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png | Bin 1652 -> 0 bytes .../iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta | 5 - .../blocks/iconsets/OVERLAY_MUFFLER_ADV.png | Bin 754 -> 0 bytes .../blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png | Bin 878 -> 0 bytes .../iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta | 6 - .../blocks/iconsets/TieredHulls/CASING_EV.png | Bin 2035 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_HV.png | Bin 2048 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_IV.png | Bin 2039 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_LV.png | Bin 1887 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_LuV.png | Bin 1929 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_MAX.png | Bin 2055 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_MV.png | Bin 2060 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_ULV.png | Bin 1952 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_UV.png | Bin 2049 -> 0 bytes .../blocks/iconsets/TieredHulls/CASING_ZPM.png | Bin 2112 -> 0 bytes .../assets/miscutils/textures/blocks/mash_flow.png | Bin 942 -> 0 bytes .../miscutils/textures/blocks/mash_still.png | Bin 942 -> 0 bytes .../textures/blocks/metro/OVERLAY_GRATE_A.png | Bin 423 -> 0 bytes .../textures/blocks/metro/TEXTURE_MAGIC_A.png | Bin 1156 -> 0 bytes .../blocks/metro/TEXTURE_MAGIC_A.png.mcmeta | 6 - .../blocks/metro/TEXTURE_METAL_GRATE_A.png | Bin 344 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_A.png | Bin 533 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_B.png | Bin 569 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_C.png | Bin 447 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_D.png | Bin 448 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_E.png | Bin 537 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_F.png | Bin 453 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_G.png | Bin 1220 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_H.png | Bin 312 -> 0 bytes .../blocks/metro/TEXTURE_METAL_PANEL_I.png | Bin 493 -> 0 bytes .../blocks/metro/TEXTURE_ORGANIC_PANEL_A.png | Bin 598 -> 0 bytes .../metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png | Bin 2503 -> 0 bytes .../TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta | 6 - .../textures/blocks/metro/TEXTURE_STONE_BIRD_A.png | Bin 647 -> 0 bytes .../blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png | Bin 630 -> 0 bytes .../blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png | Bin 627 -> 0 bytes .../textures/blocks/metro/TEXTURE_STONE_BLUE_A.png | Bin 410 -> 0 bytes .../blocks/metro/TEXTURE_STONE_GREEN_A.png | Bin 244 -> 0 bytes .../textures/blocks/metro/TEXTURE_STONE_RED_A.png | Bin 532 -> 0 bytes .../textures/blocks/metro/TEXTURE_STONE_RED_B.png | Bin 367 -> 0 bytes .../blocks/metro/TEXTURE_STONE_TABLET_A.png | Bin 572 -> 0 bytes .../blocks/metro/TEXTURE_STONE_TABLET_B.png | Bin 579 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_A.png | Bin 266 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_B.png | Bin 285 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_C.png | Bin 312 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_A.png | Bin 513 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_B.png | Bin 474 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_C.png | Bin 469 -> 0 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_D.png | Bin 360 -> 0 bytes .../assets/miscutils/textures/blocks/net.png | Bin 350 -> 0 bytes .../miscutils/textures/blocks/redox/redox1.png | Bin 562 -> 0 bytes .../miscutils/textures/blocks/redox/redox2.png | Bin 721 -> 0 bytes .../miscutils/textures/blocks/redox/redox3.png | Bin 776 -> 0 bytes .../miscutils/textures/blocks/redox/redox4.png | Bin 781 -> 0 bytes .../miscutils/textures/blocks/redox/redox5.png | Bin 794 -> 0 bytes .../miscutils/textures/blocks/redox/redox6.png | Bin 779 -> 0 bytes .../blocks/redstone/redstone_meter/top.png | Bin 822 -> 0 bytes .../miscutils/textures/blocks/rum_mature_flow.png | Bin 942 -> 0 bytes .../miscutils/textures/blocks/rum_mature_still.png | Bin 942 -> 0 bytes .../textures/blocks/rum_semi_mature_flow.png | Bin 942 -> 0 bytes .../textures/blocks/rum_semi_mature_still.png | Bin 942 -> 0 bytes .../textures/blocks/trees/leaves/leaves_pine.png | Bin 688 -> 0 bytes .../blocks/trees/leaves/leaves_pine_opaque.png | Bin 687 -> 0 bytes .../blocks/trees/leaves/leaves_rainforest.png | Bin 455 -> 0 bytes .../trees/leaves/leaves_rainforest_opaque.png | Bin 457 -> 0 bytes .../textures/blocks/trees/logs/log_pine.png | Bin 300 -> 0 bytes .../textures/blocks/trees/logs/log_pine_top.png | Bin 572 -> 0 bytes .../textures/blocks/trees/logs/log_rainforest.png | Bin 579 -> 0 bytes .../blocks/trees/logs/log_rainforest_top.png | Bin 580 -> 0 bytes .../blocks/trees/saplings/sapling_pine.png | Bin 432 -> 0 bytes .../blocks/trees/saplings/sapling_rainforest.png | Bin 372 -> 0 bytes .../assets/miscutils/textures/blocks/workbench.png | Bin 410 -> 0 bytes .../miscutils/textures/blocks/workbench_top.png | Bin 550 -> 0 bytes .../miscutils/textures/entity/australia/boar.png | Bin 3022 -> 0 bytes .../textures/entity/australia/bush_spider.png | Bin 1445 -> 0 bytes .../textures/entity/australia/dingo/dingo.png | Bin 3643 -> 0 bytes .../entity/australia/dingo/dingo_angry.png | Bin 1712 -> 0 bytes .../entity/australia/dingo/dingo_collar.png | Bin 3576 -> 0 bytes .../textures/entity/australia/dingo/dingo_tame.png | Bin 3676 -> 0 bytes .../textures/entity/australia/octopus.png | Bin 720 -> 0 bytes .../assets/miscutils/textures/entity/batKing.png | Bin 1994 -> 0 bytes .../miscutils/textures/entity/golemStaballoy.png | Bin 5433 -> 0 bytes .../assets/miscutils/textures/entity/sickBlaze.png | Bin 1221 -> 0 bytes .../textures/entity/villager/aboriginal.png | Bin 1154 -> 0 bytes .../miscutils/textures/entity/villager/banker.png | Bin 937 -> 0 bytes .../textures/entity/villager/technician.png | Bin 996 -> 0 bytes .../miscutils/textures/entity/villager/trader.png | Bin 955 -> 0 bytes .../miscutils/textures/enviroment/moon_phases.png | Bin 1029 -> 0 bytes .../assets/miscutils/textures/enviroment/snow.png | Bin 849 -> 0 bytes .../assets/miscutils/textures/enviroment/sun.png | Bin 694 -> 0 bytes .../miscutils/textures/gui/AdvancedBoiler.png | Bin 1457 -> 0 bytes .../textures/gui/AdvancedCraftingTable.png | Bin 1212 -> 0 bytes .../miscutils/textures/gui/BronzeCraftingTable.png | Bin 1057 -> 0 bytes .../miscutils/textures/gui/CircuitProgrammer.png | Bin 2857 -> 0 bytes .../assets/miscutils/textures/gui/CokeOven.png | Bin 1025 -> 0 bytes .../assets/miscutils/textures/gui/Cyclotron.png | Bin 2756 -> 0 bytes .../assets/miscutils/textures/gui/FishTrap.png | Bin 882 -> 0 bytes .../assets/miscutils/textures/gui/FluidReactor.png | Bin 3587 -> 0 bytes .../assets/miscutils/textures/gui/Generic3By3.png | Bin 934 -> 0 bytes .../textures/gui/IndustrialCentrifuge.png | Bin 1104 -> 0 bytes .../textures/gui/IndustrialCuttingMachine.png | Bin 889 -> 0 bytes .../textures/gui/IndustrialElectrolyzer.png | Bin 1136 -> 0 bytes .../miscutils/textures/gui/IndustrialExtruder.png | Bin 889 -> 0 bytes .../miscutils/textures/gui/IndustrialMixer.png | Bin 909 -> 0 bytes .../miscutils/textures/gui/IndustrialSifter.png | Bin 921 -> 0 bytes .../textures/gui/IndustrialThermalCentrifuge.png | Bin 912 -> 0 bytes .../miscutils/textures/gui/IndustrialWashPlant.png | Bin 911 -> 0 bytes .../textures/gui/IndustrialWireFactory.png | Bin 1030 -> 0 bytes .../miscutils/textures/gui/IronBlastFurnace.png | Bin 954 -> 0 bytes .../miscutils/textures/gui/MacerationStack.png | Bin 1070 -> 0 bytes .../miscutils/textures/gui/MaterialPress.png | Bin 1156 -> 0 bytes .../miscutils/textures/gui/MatterFabricator.png | Bin 1167 -> 0 bytes .../miscutils/textures/gui/ModularityTable.png | Bin 1014 -> 0 bytes .../miscutils/textures/gui/MultiblockDisplay.png | Bin 899 -> 0 bytes .../textures/gui/MultiblockDisplay_Generic.png | Bin 1743 -> 0 bytes .../assets/miscutils/textures/gui/PestKiller.png | Bin 1833 -> 0 bytes .../miscutils/textures/gui/PollutionCleaner.png | Bin 1652 -> 0 bytes .../miscutils/textures/gui/PowerSubStation.png | Bin 1005 -> 0 bytes .../assets/miscutils/textures/gui/ProjectTable.png | Bin 1124 -> 0 bytes .../miscutils/textures/gui/RoundRobinator.png | Bin 1648 -> 0 bytes .../assets/miscutils/textures/gui/SafeBlock.png | Bin 952 -> 0 bytes .../assets/miscutils/textures/gui/SlowFusion.png | Bin 2182 -> 0 bytes .../assets/miscutils/textures/gui/SteelBoiler.png | Bin 1430 -> 0 bytes .../assets/miscutils/textures/gui/SuperJukebox.png | Bin 5198 -> 0 bytes .../assets/miscutils/textures/gui/TreeFarmer.png | Bin 832 -> 0 bytes .../textures/gui/VolumetricFlaskSetter.png | Bin 2482 -> 0 bytes .../assets/miscutils/textures/gui/Workbench.png | Bin 1057 -> 0 bytes .../textures/gui/helium_collector_gui.png | Bin 2682 -> 0 bytes .../assets/miscutils/textures/gui/itemBackpack.png | Bin 888 -> 0 bytes .../assets/miscutils/textures/gui/itemGrindle.png | Bin 1254 -> 0 bytes .../miscutils/textures/gui/machine_Charger.png | Bin 548 -> 0 bytes .../miscutils/textures/gui/nei/decayables.png | Bin 2623 -> 0 bytes .../assets/miscutils/textures/gui/nei/widgets.png | Bin 1876 -> 0 bytes .../textures/items/IndustrialDiamondExquisite.png | Bin 608 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/0.png | Bin 501 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/1.png | Bin 501 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/10.png | Bin 358 -> 0 bytes .../textures/items/MU-metaitem.01/100.png | Bin 2112 -> 0 bytes .../textures/items/MU-metaitem.01/101.png | Bin 309 -> 0 bytes .../textures/items/MU-metaitem.01/102.png | Bin 10825 -> 0 bytes .../textures/items/MU-metaitem.01/103.png | Bin 13990 -> 0 bytes .../textures/items/MU-metaitem.01/104.png | Bin 24047 -> 0 bytes .../textures/items/MU-metaitem.01/105.png | Bin 30527 -> 0 bytes .../textures/items/MU-metaitem.01/106.png | Bin 300 -> 0 bytes .../textures/items/MU-metaitem.01/107.png | Bin 304 -> 0 bytes .../textures/items/MU-metaitem.01/108.png | Bin 299 -> 0 bytes .../textures/items/MU-metaitem.01/109.png | Bin 297 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/11.png | Bin 358 -> 0 bytes .../textures/items/MU-metaitem.01/110.png | Bin 393 -> 0 bytes .../textures/items/MU-metaitem.01/111.png | Bin 345 -> 0 bytes .../textures/items/MU-metaitem.01/112.png | Bin 341 -> 0 bytes .../textures/items/MU-metaitem.01/113.png | Bin 337 -> 0 bytes .../textures/items/MU-metaitem.01/114.png | Bin 396 -> 0 bytes .../textures/items/MU-metaitem.01/115.png | Bin 428 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/12.png | Bin 411 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/13.png | Bin 411 -> 0 bytes .../textures/items/MU-metaitem.01/130.png | Bin 489 -> 0 bytes .../textures/items/MU-metaitem.01/131.png | Bin 451 -> 0 bytes .../textures/items/MU-metaitem.01/132.png | Bin 449 -> 0 bytes .../textures/items/MU-metaitem.01/133.png | Bin 463 -> 0 bytes .../textures/items/MU-metaitem.01/134.png | Bin 465 -> 0 bytes .../textures/items/MU-metaitem.01/135.png | Bin 462 -> 0 bytes .../textures/items/MU-metaitem.01/136.png | Bin 477 -> 0 bytes .../textures/items/MU-metaitem.01/137.png | Bin 461 -> 0 bytes .../textures/items/MU-metaitem.01/138.png | Bin 474 -> 0 bytes .../textures/items/MU-metaitem.01/139.png | Bin 482 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/14.png | Bin 411 -> 0 bytes .../textures/items/MU-metaitem.01/140.png | Bin 660 -> 0 bytes .../textures/items/MU-metaitem.01/141.png | Bin 655 -> 0 bytes .../textures/items/MU-metaitem.01/142.png | Bin 627 -> 0 bytes .../textures/items/MU-metaitem.01/143.png | Bin 675 -> 0 bytes .../textures/items/MU-metaitem.01/144.png | Bin 645 -> 0 bytes .../textures/items/MU-metaitem.01/145.png | Bin 651 -> 0 bytes .../textures/items/MU-metaitem.01/146.png | Bin 630 -> 0 bytes .../textures/items/MU-metaitem.01/147.png | Bin 648 -> 0 bytes .../textures/items/MU-metaitem.01/148.png | Bin 645 -> 0 bytes .../textures/items/MU-metaitem.01/149.png | Bin 659 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/15.png | Bin 411 -> 0 bytes .../textures/items/MU-metaitem.01/150.png | Bin 667 -> 0 bytes .../textures/items/MU-metaitem.01/151.png | Bin 335 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/16.png | Bin 461 -> 0 bytes .../textures/items/MU-metaitem.01/160.png | Bin 459 -> 0 bytes .../textures/items/MU-metaitem.01/161.png | Bin 455 -> 0 bytes .../textures/items/MU-metaitem.01/162.png | Bin 455 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/17.png | Bin 461 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/18.png | Bin 461 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/19.png | Bin 461 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/2.png | Bin 501 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/20.png | Bin 617 -> 0 bytes .../textures/items/MU-metaitem.01/200.png | Bin 231 -> 0 bytes .../textures/items/MU-metaitem.01/201.png | Bin 292 -> 0 bytes .../textures/items/MU-metaitem.01/202.png | Bin 321 -> 0 bytes .../textures/items/MU-metaitem.01/203.png | Bin 319 -> 0 bytes .../textures/items/MU-metaitem.01/204.png | Bin 315 -> 0 bytes .../textures/items/MU-metaitem.01/205.png | Bin 348 -> 0 bytes .../textures/items/MU-metaitem.01/206.png | Bin 364 -> 0 bytes .../textures/items/MU-metaitem.01/207.png | Bin 375 -> 0 bytes .../textures/items/MU-metaitem.01/208.png | Bin 338 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/21.png | Bin 617 -> 0 bytes .../textures/items/MU-metaitem.01/210.png | Bin 223 -> 0 bytes .../textures/items/MU-metaitem.01/211.png | Bin 223 -> 0 bytes .../textures/items/MU-metaitem.01/212.png | Bin 252 -> 0 bytes .../textures/items/MU-metaitem.01/213.png | Bin 435 -> 0 bytes .../textures/items/MU-metaitem.01/214.png | Bin 461 -> 0 bytes .../textures/items/MU-metaitem.01/215.png | Bin 273 -> 0 bytes .../textures/items/MU-metaitem.01/216.png | Bin 441 -> 0 bytes .../textures/items/MU-metaitem.01/217.png | Bin 450 -> 0 bytes .../textures/items/MU-metaitem.01/218.png | Bin 508 -> 0 bytes .../textures/items/MU-metaitem.01/219.png | Bin 277 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/22.png | Bin 617 -> 0 bytes .../textures/items/MU-metaitem.01/220.png | Bin 331 -> 0 bytes .../textures/items/MU-metaitem.01/221.png | Bin 513 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/23.png | Bin 617 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/24.png | Bin 545 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/25.png | Bin 545 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/26.png | Bin 545 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/27.png | Bin 545 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/28.png | Bin 482 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/29.png | Bin 482 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/3.png | Bin 501 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/30.png | Bin 482 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/31.png | Bin 482 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/32.png | Bin 501 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/33.png | Bin 415 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/34.png | Bin 358 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/35.png | Bin 411 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/36.png | Bin 461 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/37.png | Bin 617 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/38.png | Bin 545 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/39.png | Bin 482 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/4.png | Bin 415 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/40.png | Bin 788 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/41.png | Bin 750 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/42.png | Bin 834 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/43.png | Bin 936 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/44.png | Bin 764 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/5.png | Bin 415 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/50.png | Bin 499 -> 0 bytes .../textures/items/MU-metaitem.01/50/1.png | Bin 480 -> 0 bytes .../textures/items/MU-metaitem.01/50/2.png | Bin 490 -> 0 bytes .../textures/items/MU-metaitem.01/50/3.png | Bin 485 -> 0 bytes .../textures/items/MU-metaitem.01/50/4.png | Bin 490 -> 0 bytes .../textures/items/MU-metaitem.01/50/5.png | Bin 488 -> 0 bytes .../textures/items/MU-metaitem.01/50/6.png | Bin 498 -> 0 bytes .../textures/items/MU-metaitem.01/50/7.png | Bin 491 -> 0 bytes .../textures/items/MU-metaitem.01/50/8.png | Bin 485 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/52.png | Bin 499 -> 0 bytes .../textures/items/MU-metaitem.01/52/1.png | Bin 480 -> 0 bytes .../textures/items/MU-metaitem.01/52/2.png | Bin 490 -> 0 bytes .../textures/items/MU-metaitem.01/52/3.png | Bin 485 -> 0 bytes .../textures/items/MU-metaitem.01/52/4.png | Bin 490 -> 0 bytes .../textures/items/MU-metaitem.01/52/5.png | Bin 488 -> 0 bytes .../textures/items/MU-metaitem.01/52/6.png | Bin 498 -> 0 bytes .../textures/items/MU-metaitem.01/52/7.png | Bin 491 -> 0 bytes .../textures/items/MU-metaitem.01/52/8.png | Bin 485 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/54.png | Bin 499 -> 0 bytes .../textures/items/MU-metaitem.01/54/1.png | Bin 480 -> 0 bytes .../textures/items/MU-metaitem.01/54/2.png | Bin 490 -> 0 bytes .../textures/items/MU-metaitem.01/54/3.png | Bin 485 -> 0 bytes .../textures/items/MU-metaitem.01/54/4.png | Bin 490 -> 0 bytes .../textures/items/MU-metaitem.01/54/5.png | Bin 488 -> 0 bytes .../textures/items/MU-metaitem.01/54/6.png | Bin 498 -> 0 bytes .../textures/items/MU-metaitem.01/54/7.png | Bin 491 -> 0 bytes .../textures/items/MU-metaitem.01/54/8.png | Bin 485 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/55.png | Bin 24039 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/6.png | Bin 415 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/60.png | Bin 5146 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/61.png | Bin 352 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/62.png | Bin 352 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/63.png | Bin 352 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/64.png | Bin 358 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/66.png | Bin 392 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/68.png | Bin 390 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/7.png | Bin 415 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/70.png | Bin 398 -> 0 bytes .../textures/items/MU-metaitem.01/700.png | Bin 328 -> 0 bytes .../textures/items/MU-metaitem.01/701.png | Bin 361 -> 0 bytes .../textures/items/MU-metaitem.01/702.png | Bin 369 -> 0 bytes .../textures/items/MU-metaitem.01/703.png | Bin 366 -> 0 bytes .../textures/items/MU-metaitem.01/704.png | Bin 368 -> 0 bytes .../textures/items/MU-metaitem.01/705.png | Bin 375 -> 0 bytes .../textures/items/MU-metaitem.01/706.png | Bin 375 -> 0 bytes .../textures/items/MU-metaitem.01/707.png | Bin 386 -> 0 bytes .../textures/items/MU-metaitem.01/708.png | Bin 362 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/71.png | Bin 304 -> 0 bytes .../textures/items/MU-metaitem.01/710.png | Bin 326 -> 0 bytes .../textures/items/MU-metaitem.01/711.png | Bin 326 -> 0 bytes .../textures/items/MU-metaitem.01/712.png | Bin 343 -> 0 bytes .../textures/items/MU-metaitem.01/713.png | Bin 352 -> 0 bytes .../textures/items/MU-metaitem.01/714.png | Bin 363 -> 0 bytes .../textures/items/MU-metaitem.01/715.png | Bin 363 -> 0 bytes .../textures/items/MU-metaitem.01/716.png | Bin 343 -> 0 bytes .../textures/items/MU-metaitem.01/717.png | Bin 343 -> 0 bytes .../textures/items/MU-metaitem.01/718.png | Bin 343 -> 0 bytes .../textures/items/MU-metaitem.01/719.png | Bin 464 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/72.png | Bin 314 -> 0 bytes .../textures/items/MU-metaitem.01/720.png | Bin 455 -> 0 bytes .../textures/items/MU-metaitem.01/721.png | Bin 465 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/73.png | Bin 318 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/74.png | Bin 319 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/75.png | Bin 323 -> 0 bytes .../textures/items/MU-metaitem.01/751.png | Bin 317 -> 0 bytes .../textures/items/MU-metaitem.01/752.png | Bin 447 -> 0 bytes .../textures/items/MU-metaitem.01/753.png | Bin 462 -> 0 bytes .../textures/items/MU-metaitem.01/754.png | Bin 459 -> 0 bytes .../textures/items/MU-metaitem.01/755.png | Bin 463 -> 0 bytes .../textures/items/MU-metaitem.01/756.png | Bin 466 -> 0 bytes .../textures/items/MU-metaitem.01/757.png | Bin 464 -> 0 bytes .../textures/items/MU-metaitem.01/758.png | Bin 477 -> 0 bytes .../textures/items/MU-metaitem.01/759.png | Bin 444 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/76.png | Bin 321 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/77.png | Bin 324 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/78.png | Bin 324 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/79.png | Bin 314 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/8.png | Bin 358 -> 0 bytes .../miscutils/textures/items/MU-metaitem.01/9.png | Bin 358 -> 0 bytes .../miscutils/textures/items/MU-metatool.01/0.png | Bin 1153 -> 0 bytes .../miscutils/textures/items/MU-metatool.01/1.png | Bin 1142 -> 0 bytes .../miscutils/textures/items/MU-metatool.01/2.png | Bin 1139 -> 0 bytes .../miscutils/textures/items/MU-metatool.01/3.png | Bin 1143 -> 0 bytes .../miscutils/textures/items/StoneStatue.png | Bin 3703 -> 0 bytes .../items/baubles/itemFireProtectGlovesBetter.png | Bin 1326 -> 0 bytes .../textures/items/bioscience/BasicAlgae.png | Bin 1122 -> 0 bytes .../items/bioscience/BasicAlgae_Overlay.png | Bin 1045 -> 0 bytes .../textures/items/bioscience/BioCircuit.png | Bin 432 -> 0 bytes .../textures/items/bioscience/MetaItem1/0.png | Bin 605 -> 0 bytes .../textures/items/bioscience/MetaItem1/1.png | Bin 627 -> 0 bytes .../textures/items/bioscience/MetaItem1/10.png | Bin 516 -> 0 bytes .../textures/items/bioscience/MetaItem1/11.png | Bin 392 -> 0 bytes .../textures/items/bioscience/MetaItem1/12.png | Bin 704 -> 0 bytes .../textures/items/bioscience/MetaItem1/13.png | Bin 373 -> 0 bytes .../textures/items/bioscience/MetaItem1/14.png | Bin 427 -> 0 bytes .../textures/items/bioscience/MetaItem1/15.png | Bin 376 -> 0 bytes .../textures/items/bioscience/MetaItem1/16.png | Bin 397 -> 0 bytes .../textures/items/bioscience/MetaItem1/17.png | Bin 306 -> 0 bytes .../textures/items/bioscience/MetaItem1/18.png | Bin 442 -> 0 bytes .../textures/items/bioscience/MetaItem1/19.png | Bin 347 -> 0 bytes .../textures/items/bioscience/MetaItem1/2.png | Bin 633 -> 0 bytes .../textures/items/bioscience/MetaItem1/20.png | Bin 364 -> 0 bytes .../textures/items/bioscience/MetaItem1/21.png | Bin 280 -> 0 bytes .../textures/items/bioscience/MetaItem1/22.png | Bin 437 -> 0 bytes .../textures/items/bioscience/MetaItem1/23.png | Bin 701 -> 0 bytes .../textures/items/bioscience/MetaItem1/24.png | Bin 357 -> 0 bytes .../textures/items/bioscience/MetaItem1/25.png | Bin 648 -> 0 bytes .../textures/items/bioscience/MetaItem1/3.png | Bin 646 -> 0 bytes .../textures/items/bioscience/MetaItem1/4.png | Bin 622 -> 0 bytes .../textures/items/bioscience/MetaItem1/5.png | Bin 490 -> 0 bytes .../textures/items/bioscience/MetaItem1/6.png | Bin 455 -> 0 bytes .../textures/items/bioscience/MetaItem1/7.png | Bin 452 -> 0 bytes .../textures/items/bioscience/MetaItem1/8.png | Bin 654 -> 0 bytes .../textures/items/bioscience/MetaItem1/9.png | Bin 277 -> 0 bytes .../assets/miscutils/textures/items/bomb.png | Bin 311 -> 0 bytes .../miscutils/textures/items/bomb_casing.png | Bin 280 -> 0 bytes .../assets/miscutils/textures/items/bomb_lit.png | Bin 328 -> 0 bytes .../textures/items/bucket.generic.overlay.png | Bin 279 -> 0 bytes .../textures/items/bucket/BucketCryotheum.png | Bin 602 -> 0 bytes .../items/bucket/BucketCryotheum.png.mcmeta | 5 - .../textures/items/bucket/BucketEnder.png | Bin 715 -> 0 bytes .../textures/items/bucket/BucketEnder.png.mcmeta | 5 - .../textures/items/bucket/BucketPyrotheum.png | Bin 2141 -> 0 bytes .../items/bucket/BucketPyrotheum.png.mcmeta | 23 - .../textures/items/bucket/OverlayIcon.png | Bin 195 -> 0 bytes .../items/burnables/itemCactusCharcoal.png | Bin 354 -> 0 bytes .../textures/items/burnables/itemCactusCoke.png | Bin 379 -> 0 bytes .../textures/items/burnables/itemCoalCoke.png | Bin 282 -> 0 bytes .../textures/items/burnables/itemSugarCharcoal.png | Bin 387 -> 0 bytes .../textures/items/burnables/itemSugarCoke.png | Bin 397 -> 0 bytes .../miscutils/textures/items/chargepack/1.png | Bin 1327 -> 0 bytes .../miscutils/textures/items/chargepack/2.png | Bin 1335 -> 0 bytes .../miscutils/textures/items/chargepack/3.png | Bin 1340 -> 0 bytes .../miscutils/textures/items/chargepack/4.png | Bin 1306 -> 0 bytes .../miscutils/textures/items/chargepack/5.png | Bin 1302 -> 0 bytes .../miscutils/textures/items/chargepack/6.png | Bin 1338 -> 0 bytes .../miscutils/textures/items/chargepack/7.png | Bin 1317 -> 0 bytes .../miscutils/textures/items/chargepack/8.png | Bin 1402 -> 0 bytes .../miscutils/textures/items/chargepack/9.png | Bin 1183 -> 0 bytes .../textures/items/controlcore/Core_0.png | Bin 527 -> 0 bytes .../textures/items/controlcore/Core_1.png | Bin 495 -> 0 bytes .../textures/items/controlcore/Core_2.png | Bin 492 -> 0 bytes .../textures/items/controlcore/Core_3.png | Bin 495 -> 0 bytes .../textures/items/controlcore/Core_4.png | Bin 483 -> 0 bytes .../textures/items/controlcore/Core_5.png | Bin 479 -> 0 bytes .../textures/items/controlcore/Core_6.png | Bin 476 -> 0 bytes .../textures/items/controlcore/Core_7.png | Bin 465 -> 0 bytes .../textures/items/controlcore/Core_8.png | Bin 465 -> 0 bytes .../textures/items/controlcore/Core_9.png | Bin 412 -> 0 bytes .../assets/miscutils/textures/items/covers/0.png | Bin 489 -> 0 bytes .../assets/miscutils/textures/items/covers/1.png | Bin 451 -> 0 bytes .../assets/miscutils/textures/items/covers/10.png | Bin 426 -> 0 bytes .../assets/miscutils/textures/items/covers/11.png | Bin 408 -> 0 bytes .../assets/miscutils/textures/items/covers/12.png | Bin 439 -> 0 bytes .../assets/miscutils/textures/items/covers/13.png | Bin 439 -> 0 bytes .../assets/miscutils/textures/items/covers/14.png | Bin 422 -> 0 bytes .../assets/miscutils/textures/items/covers/15.png | Bin 443 -> 0 bytes .../assets/miscutils/textures/items/covers/2.png | Bin 449 -> 0 bytes .../assets/miscutils/textures/items/covers/3.png | Bin 463 -> 0 bytes .../assets/miscutils/textures/items/covers/4.png | Bin 465 -> 0 bytes .../assets/miscutils/textures/items/covers/5.png | Bin 462 -> 0 bytes .../assets/miscutils/textures/items/covers/6.png | Bin 477 -> 0 bytes .../assets/miscutils/textures/items/covers/7.png | Bin 461 -> 0 bytes .../assets/miscutils/textures/items/covers/8.png | Bin 474 -> 0 bytes .../assets/miscutils/textures/items/covers/9.png | Bin 482 -> 0 bytes .../items/dehydrator/itemDehydratorCoilWire_0.png | Bin 309 -> 0 bytes .../items/dehydrator/itemDehydratorCoilWire_1.png | Bin 302 -> 0 bytes .../items/dehydrator/itemDehydratorCoilWire_2.png | Bin 288 -> 0 bytes .../items/dehydrator/itemDehydratorCoilWire_3.png | Bin 286 -> 0 bytes .../items/dehydrator/itemDehydratorCoil_0.png | Bin 461 -> 0 bytes .../items/dehydrator/itemDehydratorCoil_1.png | Bin 459 -> 0 bytes .../items/dehydrator/itemDehydratorCoil_2.png | Bin 386 -> 0 bytes .../items/dehydrator/itemDehydratorCoil_3.png | Bin 388 -> 0 bytes .../assets/miscutils/textures/items/dust.png | Bin 302 -> 0 bytes .../assets/miscutils/textures/items/dustSmall.png | Bin 264 -> 0 bytes .../assets/miscutils/textures/items/dustTiny.png | Bin 219 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/0.png | Bin 565 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/1.png | Bin 548 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/2.png | Bin 455 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/3.png | Bin 556 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/4.png | Bin 453 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/5.png | Bin 447 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/6.png | Bin 402 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/7.png | Bin 562 -> 0 bytes .../miscutils/textures/items/food/MetaItem1/8.png | Bin 447 -> 0 bytes .../miscutils/textures/items/frameAccelerated.png | Bin 412 -> 0 bytes .../miscutils/textures/items/frameArborists.png | Bin 297 -> 0 bytes .../assets/miscutils/textures/items/frameBusy.png | Bin 412 -> 0 bytes .../miscutils/textures/items/frameChocolate.png | Bin 339 -> 0 bytes .../miscutils/textures/items/frameDecaying.png | Bin 449 -> 0 bytes .../miscutils/textures/items/frameHealing.png | Bin 354 -> 0 bytes .../miscutils/textures/items/frameMutagenic.png | Bin 412 -> 0 bytes .../assets/miscutils/textures/items/frameNova.png | Bin 636 -> 0 bytes .../miscutils/textures/items/frameRestraint.png | Bin 355 -> 0 bytes .../miscutils/textures/items/frameSlowing.png | Bin 307 -> 0 bytes .../assets/miscutils/textures/items/frameSoul.png | Bin 584 -> 0 bytes .../miscutils/textures/items/frameStabilizing.png | Bin 449 -> 0 bytes .../miscutils/textures/items/frameUseless.png | Bin 427 -> 0 bytes .../assets/miscutils/textures/items/frameVoid.png | Bin 663 -> 0 bytes .../textures/items/iconsets/ANGLE_GRINDER.png | Bin 387 -> 0 bytes .../items/iconsets/ANGLE_GRINDER_OVERLAY.png | Bin 143 -> 0 bytes .../items/iconsets/ELECTRIC_BUTCHER_KNIFE.png | Bin 336 -> 0 bytes .../iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/iconsets/ELECTRIC_LIGHTER.png | Bin 313 -> 0 bytes .../items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png | Bin 257 -> 0 bytes .../textures/items/iconsets/ELECTRIC_SNIPS.png | Bin 501 -> 0 bytes .../items/iconsets/ELECTRIC_SNIPS_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/iconsets/PUMP_OVERLAY.png | Bin 143 -> 0 bytes .../textures/items/iconsets/RENDERING_ERROR.png | Bin 161 -> 0 bytes .../items/iconsets/RENDERING_ERROR_OVERLAY.png | Bin 161 -> 0 bytes .../textures/items/iconsets/SKOOKUMCHOOCHER.png | Bin 382 -> 0 bytes .../items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png | Bin 143 -> 0 bytes .../miscutils/textures/items/iconsets/VOID.png | Bin 357 -> 0 bytes .../textures/items/iconsets/VOID_OVERLAY.png | Bin 143 -> 0 bytes .../assets/miscutils/textures/items/ion/0.png | Bin 112 -> 0 bytes .../assets/miscutils/textures/items/ion/1.png | Bin 146 -> 0 bytes .../assets/miscutils/textures/items/ion/10.png | Bin 161 -> 0 bytes .../assets/miscutils/textures/items/ion/100.png | Bin 161 -> 0 bytes .../assets/miscutils/textures/items/ion/101.png | Bin 153 -> 0 bytes .../assets/miscutils/textures/items/ion/102.png | Bin 124 -> 0 bytes .../assets/miscutils/textures/items/ion/103.png | Bin 148 -> 0 bytes .../assets/miscutils/textures/items/ion/104.png | Bin 156 -> 0 bytes .../assets/miscutils/textures/items/ion/105.png | Bin 175 -> 0 bytes .../assets/miscutils/textures/items/ion/106.png | Bin 148 -> 0 bytes .../assets/miscutils/textures/items/ion/107.png | Bin 143 -> 0 bytes .../assets/miscutils/textures/items/ion/108.png | Bin 152 -> 0 bytes .../assets/miscutils/textures/items/ion/109.png | Bin 154 -> 0 bytes .../assets/miscutils/textures/items/ion/11.png | Bin 178 -> 0 bytes .../assets/miscutils/textures/items/ion/110.png | Bin 163 -> 0 bytes .../assets/miscutils/textures/items/ion/111.png | Bin 146 -> 0 bytes .../assets/miscutils/textures/items/ion/112.png | Bin 148 -> 0 bytes .../assets/miscutils/textures/items/ion/113.png | Bin 113 -> 0 bytes .../assets/miscutils/textures/items/ion/114.png | Bin 160 -> 0 bytes .../assets/miscutils/textures/items/ion/115.png | Bin 138 -> 0 bytes .../assets/miscutils/textures/items/ion/116.png | Bin 140 -> 0 bytes .../assets/miscutils/textures/items/ion/117.png | Bin 166 -> 0 bytes .../assets/miscutils/textures/items/ion/12.png | Bin 147 -> 0 bytes .../assets/miscutils/textures/items/ion/13.png | Bin 151 -> 0 bytes .../assets/miscutils/textures/items/ion/14.png | Bin 125 -> 0 bytes .../assets/miscutils/textures/items/ion/15.png | Bin 136 -> 0 bytes .../assets/miscutils/textures/items/ion/16.png | Bin 136 -> 0 bytes .../assets/miscutils/textures/items/ion/17.png | Bin 148 -> 0 bytes .../assets/miscutils/textures/items/ion/18.png | Bin 143 -> 0 bytes .../assets/miscutils/textures/items/ion/19.png | Bin 161 -> 0 bytes .../assets/miscutils/textures/items/ion/2.png | Bin 115 -> 0 bytes .../assets/miscutils/textures/items/ion/20.png | Bin 155 -> 0 bytes .../assets/miscutils/textures/items/ion/21.png | Bin 115 -> 0 bytes .../assets/miscutils/textures/items/ion/22.png | Bin 132 -> 0 bytes .../assets/miscutils/textures/items/ion/23.png | Bin 144 -> 0 bytes .../assets/miscutils/textures/items/ion/24.png | Bin 150 -> 0 bytes .../assets/miscutils/textures/items/ion/25.png | Bin 141 -> 0 bytes .../assets/miscutils/textures/items/ion/26.png | Bin 148 -> 0 bytes .../assets/miscutils/textures/items/ion/27.png | Bin 141 -> 0 bytes .../assets/miscutils/textures/items/ion/28.png | Bin 142 -> 0 bytes .../assets/miscutils/textures/items/ion/29.png | Bin 145 -> 0 bytes .../assets/miscutils/textures/items/ion/3.png | Bin 150 -> 0 bytes .../assets/miscutils/textures/items/ion/30.png | Bin 159 -> 0 bytes .../assets/miscutils/textures/items/ion/31.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/32.png | Bin 158 -> 0 bytes .../assets/miscutils/textures/items/ion/33.png | Bin 158 -> 0 bytes .../assets/miscutils/textures/items/ion/34.png | Bin 144 -> 0 bytes .../assets/miscutils/textures/items/ion/35.png | Bin 159 -> 0 bytes .../assets/miscutils/textures/items/ion/36.png | Bin 155 -> 0 bytes .../assets/miscutils/textures/items/ion/37.png | Bin 149 -> 0 bytes .../assets/miscutils/textures/items/ion/38.png | Bin 135 -> 0 bytes .../assets/miscutils/textures/items/ion/39.png | Bin 141 -> 0 bytes .../assets/miscutils/textures/items/ion/4.png | Bin 125 -> 0 bytes .../assets/miscutils/textures/items/ion/40.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/41.png | Bin 162 -> 0 bytes .../assets/miscutils/textures/items/ion/42.png | Bin 133 -> 0 bytes .../assets/miscutils/textures/items/ion/43.png | Bin 147 -> 0 bytes .../assets/miscutils/textures/items/ion/44.png | Bin 155 -> 0 bytes .../assets/miscutils/textures/items/ion/45.png | Bin 152 -> 0 bytes .../assets/miscutils/textures/items/ion/46.png | Bin 173 -> 0 bytes .../assets/miscutils/textures/items/ion/47.png | Bin 154 -> 0 bytes .../assets/miscutils/textures/items/ion/48.png | Bin 129 -> 0 bytes .../assets/miscutils/textures/items/ion/49.png | Bin 152 -> 0 bytes .../assets/miscutils/textures/items/ion/5.png | Bin 127 -> 0 bytes .../assets/miscutils/textures/items/ion/50.png | Bin 163 -> 0 bytes .../assets/miscutils/textures/items/ion/51.png | Bin 142 -> 0 bytes .../assets/miscutils/textures/items/ion/52.png | Bin 110 -> 0 bytes .../assets/miscutils/textures/items/ion/53.png | Bin 167 -> 0 bytes .../assets/miscutils/textures/items/ion/54.png | Bin 155 -> 0 bytes .../assets/miscutils/textures/items/ion/55.png | Bin 152 -> 0 bytes .../assets/miscutils/textures/items/ion/56.png | Bin 142 -> 0 bytes .../assets/miscutils/textures/items/ion/57.png | Bin 154 -> 0 bytes .../assets/miscutils/textures/items/ion/58.png | Bin 136 -> 0 bytes .../assets/miscutils/textures/items/ion/59.png | Bin 156 -> 0 bytes .../assets/miscutils/textures/items/ion/6.png | Bin 131 -> 0 bytes .../assets/miscutils/textures/items/ion/60.png | Bin 142 -> 0 bytes .../assets/miscutils/textures/items/ion/61.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/62.png | Bin 129 -> 0 bytes .../assets/miscutils/textures/items/ion/63.png | Bin 165 -> 0 bytes .../assets/miscutils/textures/items/ion/64.png | Bin 134 -> 0 bytes .../assets/miscutils/textures/items/ion/65.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/66.png | Bin 139 -> 0 bytes .../assets/miscutils/textures/items/ion/67.png | Bin 129 -> 0 bytes .../assets/miscutils/textures/items/ion/68.png | Bin 126 -> 0 bytes .../assets/miscutils/textures/items/ion/69.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/7.png | Bin 128 -> 0 bytes .../assets/miscutils/textures/items/ion/70.png | Bin 121 -> 0 bytes .../assets/miscutils/textures/items/ion/71.png | Bin 127 -> 0 bytes .../assets/miscutils/textures/items/ion/72.png | Bin 137 -> 0 bytes .../assets/miscutils/textures/items/ion/73.png | Bin 150 -> 0 bytes .../assets/miscutils/textures/items/ion/74.png | Bin 153 -> 0 bytes .../assets/miscutils/textures/items/ion/75.png | Bin 154 -> 0 bytes .../assets/miscutils/textures/items/ion/76.png | Bin 126 -> 0 bytes .../assets/miscutils/textures/items/ion/77.png | Bin 138 -> 0 bytes .../assets/miscutils/textures/items/ion/78.png | Bin 152 -> 0 bytes .../assets/miscutils/textures/items/ion/79.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/8.png | Bin 107 -> 0 bytes .../assets/miscutils/textures/items/ion/80.png | Bin 112 -> 0 bytes .../assets/miscutils/textures/items/ion/81.png | Bin 151 -> 0 bytes .../assets/miscutils/textures/items/ion/82.png | Bin 139 -> 0 bytes .../assets/miscutils/textures/items/ion/83.png | Bin 149 -> 0 bytes .../assets/miscutils/textures/items/ion/84.png | Bin 153 -> 0 bytes .../assets/miscutils/textures/items/ion/85.png | Bin 152 -> 0 bytes .../assets/miscutils/textures/items/ion/86.png | Bin 125 -> 0 bytes .../assets/miscutils/textures/items/ion/87.png | Bin 153 -> 0 bytes .../assets/miscutils/textures/items/ion/88.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/89.png | Bin 125 -> 0 bytes .../assets/miscutils/textures/items/ion/9.png | Bin 161 -> 0 bytes .../assets/miscutils/textures/items/ion/90.png | Bin 146 -> 0 bytes .../assets/miscutils/textures/items/ion/91.png | Bin 119 -> 0 bytes .../assets/miscutils/textures/items/ion/92.png | Bin 163 -> 0 bytes .../assets/miscutils/textures/items/ion/93.png | Bin 138 -> 0 bytes .../assets/miscutils/textures/items/ion/94.png | Bin 153 -> 0 bytes .../assets/miscutils/textures/items/ion/95.png | Bin 150 -> 0 bytes .../assets/miscutils/textures/items/ion/96.png | Bin 157 -> 0 bytes .../assets/miscutils/textures/items/ion/97.png | Bin 146 -> 0 bytes .../assets/miscutils/textures/items/ion/98.png | Bin 143 -> 0 bytes .../assets/miscutils/textures/items/ion/99.png | Bin 128 -> 0 bytes .../miscutils/textures/items/ion/IonBase.png | Bin 1789 -> 0 bytes .../assets/miscutils/textures/items/item.empty.png | Bin 179 -> 0 bytes .../miscutils/textures/items/itemAirFilter.png | Bin 1469 -> 0 bytes .../miscutils/textures/items/itemAlkalusDisk.png | Bin 424 -> 0 bytes .../assets/miscutils/textures/items/itemAmulet.png | Bin 346 -> 0 bytes .../miscutils/textures/items/itemBackpack.png | Bin 2409 -> 0 bytes .../miscutils/textures/items/itemBasicTurbine.png | Bin 475 -> 0 bytes .../assets/miscutils/textures/items/itemBelt.png | Bin 377 -> 0 bytes .../assets/miscutils/textures/items/itemBigEgg.png | Bin 5331 -> 0 bytes .../miscutils/textures/items/itemBlueprint.png | Bin 782 -> 0 bytes .../miscutils/textures/items/itemBoilerChassis.png | Bin 1821 -> 0 bytes .../assets/miscutils/textures/items/itemBolt.png | Bin 161 -> 0 bytes .../assets/miscutils/textures/items/itemBook.png | Bin 303 -> 0 bytes .../assets/miscutils/textures/items/itemBoots.png | Bin 358 -> 0 bytes .../assets/miscutils/textures/items/itemBottle.png | Bin 262 -> 0 bytes .../assets/miscutils/textures/items/itemBread.png | Bin 5146 -> 0 bytes .../miscutils/textures/items/itemBufferCore.png | Bin 1329 -> 0 bytes .../assets/miscutils/textures/items/itemCell.png | Bin 362 -> 0 bytes .../miscutils/textures/items/itemCellPlasma.png | Bin 290 -> 0 bytes .../textures/items/itemCellPlasma_Overlay.png | Bin 328 -> 0 bytes .../miscutils/textures/items/itemCell_Overlay.png | Bin 297 -> 0 bytes .../miscutils/textures/items/itemCentidust.png | Bin 326 -> 0 bytes .../miscutils/textures/items/itemCircuitLFTR.png | Bin 181 -> 0 bytes .../textures/items/itemDebugShapeSpawner.png | Bin 6534 -> 0 bytes .../miscutils/textures/items/itemDecidust.png | Bin 341 -> 0 bytes .../miscutils/textures/items/itemDefault.png | Bin 376 -> 0 bytes .../textures/items/itemDehydratorCoil.png | Bin 653 -> 0 bytes .../textures/items/itemDehydratorCoilWire.png | Bin 735 -> 0 bytes .../miscutils/textures/items/itemDroplet.png | Bin 218 -> 0 bytes .../textures/items/itemEnergeticRotorBlade.png | Bin 541 -> 0 bytes .../textures/items/itemEnergeticShaft.png | Bin 444 -> 0 bytes .../assets/miscutils/textures/items/itemFiber.png | Bin 455 -> 0 bytes .../miscutils/textures/items/itemFineWire.png | Bin 514 -> 0 bytes .../miscutils/textures/items/itemFireStarter.png | Bin 1850 -> 0 bytes .../textures/items/itemFoodCurriedSausages.png | Bin 1897 -> 0 bytes .../textures/items/itemFoodRaisinToast.png | Bin 2076 -> 0 bytes .../assets/miscutils/textures/items/itemGear.png | Bin 455 -> 0 bytes .../assets/miscutils/textures/items/itemGem.png | Bin 420 -> 0 bytes .../miscutils/textures/items/itemHatTinFoil.png | Bin 261 -> 0 bytes .../miscutils/textures/items/itemHeavyPlate.png | Bin 397 -> 0 bytes .../textures/items/itemHeavyPlate_Overlay.png | Bin 471 -> 0 bytes .../miscutils/textures/items/itemHeliumBlob.png | Bin 350 -> 0 bytes .../assets/miscutils/textures/items/itemHelmet.png | Bin 396 -> 0 bytes .../textures/items/itemHotIngotRaisinBread.png | Bin 5146 -> 0 bytes .../miscutils/textures/items/itemHydrogenBlob.png | Bin 241 -> 0 bytes .../assets/miscutils/textures/items/itemIngot.png | Bin 390 -> 0 bytes .../textures/items/itemIngotBatteryAlloy.png | Bin 420 -> 0 bytes .../miscutils/textures/items/itemIngotHot.png | Bin 423 -> 0 bytes .../textures/items/itemIngotRaisinBread.png | Bin 5146 -> 0 bytes .../textures/items/itemIridiumRotorBlade.png | Bin 560 -> 0 bytes .../miscutils/textures/items/itemIridiumShaft.png | Bin 447 -> 0 bytes .../assets/miscutils/textures/items/itemKey.png | Bin 258 -> 0 bytes .../assets/miscutils/textures/items/itemKeyBig.png | Bin 293 -> 0 bytes .../miscutils/textures/items/itemKeyGold.png | Bin 354 -> 0 bytes .../miscutils/textures/items/itemKeyGoldBoss.png | Bin 311 -> 0 bytes .../miscutils/textures/items/itemLavaFilter.png | Bin 531 -> 0 bytes .../textures/items/itemMagnaliumRotorBlade.png | Bin 560 -> 0 bytes .../textures/items/itemMagnaliumShaft.png | Bin 447 -> 0 bytes .../miscutils/textures/items/itemMushroom.png | Bin 260 -> 0 bytes .../miscutils/textures/items/itemMushroomRed.png | Bin 273 -> 0 bytes .../assets/miscutils/textures/items/itemNugget.png | Bin 1986 -> 0 bytes .../textures/items/itemPLACEHOLDER_Circuit.png | Bin 405 -> 0 bytes .../miscutils/textures/items/itemPickaxe.png | Bin 178 -> 0 bytes .../miscutils/textures/items/itemPineapple.png | Bin 297 -> 0 bytes .../assets/miscutils/textures/items/itemPlate.png | Bin 278 -> 0 bytes .../textures/items/itemPlateBatteryAlloy.png | Bin 491 -> 0 bytes .../miscutils/textures/items/itemPlateDouble.png | Bin 297 -> 0 bytes .../miscutils/textures/items/itemPlatebody.png | Bin 378 -> 0 bytes .../miscutils/textures/items/itemPlatelegs.png | Bin 342 -> 0 bytes .../assets/miscutils/textures/items/itemPotion.png | Bin 271 -> 0 bytes .../miscutils/textures/items/itemPotionBlack.png | Bin 284 -> 0 bytes .../miscutils/textures/items/itemPotionRed.png | Bin 284 -> 0 bytes .../assets/miscutils/textures/items/itemRing.png | Bin 311 -> 0 bytes .../miscutils/textures/items/itemRingWearable.png | Bin 350 -> 0 bytes .../assets/miscutils/textures/items/itemRod.png | Bin 250 -> 0 bytes .../miscutils/textures/items/itemRodLong.png | Bin 246 -> 0 bytes .../assets/miscutils/textures/items/itemRope.png | Bin 316 -> 0 bytes .../assets/miscutils/textures/items/itemRotor.png | Bin 443 -> 0 bytes .../textures/items/itemSandstoneHammer.png | Bin 422 -> 0 bytes .../assets/miscutils/textures/items/itemScrew.png | Bin 199 -> 0 bytes .../assets/miscutils/textures/items/itemShard.png | Bin 620 -> 0 bytes .../assets/miscutils/textures/items/itemShovel.png | Bin 154 -> 0 bytes .../textures/items/itemSlowBuildersRing.png | Bin 427 -> 0 bytes .../miscutils/textures/items/itemSmallSpring.png | Bin 317 -> 0 bytes .../assets/miscutils/textures/items/itemSpring.png | Bin 276 -> 0 bytes .../miscutils/textures/items/itemStaballoyAxe.png | Bin 534 -> 0 bytes .../textures/items/itemStaballoyPickaxe.png | Bin 525 -> 0 bytes .../miscutils/textures/items/itemStickyRubber.png | Bin 397 -> 0 bytes .../textures/items/itemSulfuricAcidPotion.png | Bin 416 -> 0 bytes .../assets/miscutils/textures/items/itemSword.png | Bin 363 -> 0 bytes .../assets/miscutils/textures/items/itemTablet.png | Bin 372 -> 0 bytes .../textures/items/itemTungstenSteelRotorBlade.png | Bin 544 -> 0 bytes .../textures/items/itemTungstenSteelShaft.png | Bin 326 -> 0 bytes .../textures/items/itemUltimetRotorBlade.png | Bin 557 -> 0 bytes .../miscutils/textures/items/itemUltimetShaft.png | Bin 447 -> 0 bytes .../textures/items/itemVibrantRotorBlade.png | Bin 530 -> 0 bytes .../miscutils/textures/items/itemVibrantShaft.png | Bin 447 -> 0 bytes .../miscutils/textures/items/itemWaterBottle.png | Bin 262 -> 0 bytes .../textures/items/material/DustBlizz.png | Bin 914 -> 0 bytes .../textures/items/material/DustBlizz.png.mcmeta | 5 - .../textures/items/material/DustCryotheum.png | Bin 1303 -> 0 bytes .../items/material/DustCryotheum.png.mcmeta | 5 - .../textures/items/material/DustPyrotheum.png | Bin 1202 -> 0 bytes .../items/material/DustPyrotheum.png.mcmeta | 5 - .../miscutils/textures/items/material/RodBlizz.png | Bin 439 -> 0 bytes .../assets/miscutils/textures/items/particle/0.PNG | Bin 1672 -> 0 bytes .../assets/miscutils/textures/items/particle/1.png | Bin 1669 -> 0 bytes .../miscutils/textures/items/particle/10.PNG | Bin 1644 -> 0 bytes .../miscutils/textures/items/particle/11.PNG | Bin 1678 -> 0 bytes .../miscutils/textures/items/particle/12.PNG | Bin 1658 -> 0 bytes .../miscutils/textures/items/particle/13.PNG | Bin 1668 -> 0 bytes .../miscutils/textures/items/particle/14.PNG | Bin 1676 -> 0 bytes .../miscutils/textures/items/particle/15.PNG | Bin 1675 -> 0 bytes .../miscutils/textures/items/particle/16.PNG | Bin 1679 -> 0 bytes .../miscutils/textures/items/particle/17.PNG | Bin 1674 -> 0 bytes .../miscutils/textures/items/particle/18.PNG | Bin 1674 -> 0 bytes .../miscutils/textures/items/particle/19.PNG | Bin 1685 -> 0 bytes .../assets/miscutils/textures/items/particle/2.png | Bin 1683 -> 0 bytes .../miscutils/textures/items/particle/20.PNG | Bin 1663 -> 0 bytes .../miscutils/textures/items/particle/21.PNG | Bin 1653 -> 0 bytes .../miscutils/textures/items/particle/22.PNG | Bin 1665 -> 0 bytes .../miscutils/textures/items/particle/23.PNG | Bin 1680 -> 0 bytes .../miscutils/textures/items/particle/24.PNG | Bin 1673 -> 0 bytes .../assets/miscutils/textures/items/particle/3.png | Bin 1681 -> 0 bytes .../assets/miscutils/textures/items/particle/4.png | Bin 1682 -> 0 bytes .../assets/miscutils/textures/items/particle/5.png | Bin 1675 -> 0 bytes .../assets/miscutils/textures/items/particle/6.png | Bin 1674 -> 0 bytes .../assets/miscutils/textures/items/particle/7.PNG | Bin 1667 -> 0 bytes .../assets/miscutils/textures/items/particle/8.PNG | Bin 1656 -> 0 bytes .../assets/miscutils/textures/items/particle/9.PNG | Bin 1663 -> 0 bytes .../miscutils/textures/items/particle/new/0.png | Bin 1217 -> 0 bytes .../miscutils/textures/items/particle/new/1.png | Bin 1493 -> 0 bytes .../miscutils/textures/items/particle/new/10.png | Bin 1616 -> 0 bytes .../miscutils/textures/items/particle/new/11.png | Bin 1450 -> 0 bytes .../miscutils/textures/items/particle/new/12.png | Bin 1635 -> 0 bytes .../miscutils/textures/items/particle/new/13.png | Bin 1601 -> 0 bytes .../miscutils/textures/items/particle/new/14.png | Bin 1522 -> 0 bytes .../miscutils/textures/items/particle/new/15.png | Bin 1710 -> 0 bytes .../miscutils/textures/items/particle/new/16.png | Bin 1647 -> 0 bytes .../miscutils/textures/items/particle/new/17.png | Bin 1569 -> 0 bytes .../miscutils/textures/items/particle/new/18.png | Bin 1451 -> 0 bytes .../miscutils/textures/items/particle/new/19.png | Bin 1404 -> 0 bytes .../miscutils/textures/items/particle/new/2.png | Bin 1561 -> 0 bytes .../miscutils/textures/items/particle/new/20.png | Bin 1517 -> 0 bytes .../miscutils/textures/items/particle/new/21.png | Bin 1498 -> 0 bytes .../miscutils/textures/items/particle/new/22.png | Bin 1554 -> 0 bytes .../miscutils/textures/items/particle/new/23.png | Bin 1196 -> 0 bytes .../miscutils/textures/items/particle/new/24.png | Bin 1323 -> 0 bytes .../miscutils/textures/items/particle/new/3.png | Bin 1465 -> 0 bytes .../miscutils/textures/items/particle/new/4.png | Bin 1501 -> 0 bytes .../miscutils/textures/items/particle/new/5.png | Bin 1487 -> 0 bytes .../miscutils/textures/items/particle/new/6.png | Bin 1512 -> 0 bytes .../miscutils/textures/items/particle/new/7.png | Bin 1485 -> 0 bytes .../miscutils/textures/items/particle/new/8.png | Bin 1595 -> 0 bytes .../miscutils/textures/items/particle/new/9.png | Bin 1567 -> 0 bytes .../textures/items/personalCloakingDevice.png | Bin 245 -> 0 bytes .../textures/items/processing/MilledOre/milled.png | Bin 595 -> 0 bytes .../items/processing/MilledOre/milled_OVERLAY.png | Bin 437 -> 0 bytes .../miscutils/textures/items/research/note.png | Bin 348 -> 0 bytes .../miscutils/textures/items/science/Atom.png | Bin 1175 -> 0 bytes .../items/science/general/AdvancedCircuit.png | Bin 515 -> 0 bytes .../textures/items/science/general/MetaItem1/0.png | Bin 441 -> 0 bytes .../textures/items/science/general/MetaItem1/1.png | Bin 440 -> 0 bytes .../items/science/general/MetaItem1/10.png | Bin 328 -> 0 bytes .../items/science/general/MetaItem1/11.png | Bin 339 -> 0 bytes .../items/science/general/MetaItem1/12.png | Bin 320 -> 0 bytes .../textures/items/science/general/MetaItem1/2.png | Bin 447 -> 0 bytes .../textures/items/science/general/MetaItem1/3.png | Bin 448 -> 0 bytes .../textures/items/science/general/MetaItem1/4.png | Bin 434 -> 0 bytes .../textures/items/science/general/MetaItem1/5.png | Bin 440 -> 0 bytes .../textures/items/science/general/MetaItem1/6.png | Bin 429 -> 0 bytes .../textures/items/science/general/MetaItem1/7.png | Bin 376 -> 0 bytes .../textures/items/science/general/MetaItem1/8.png | Bin 492 -> 0 bytes .../textures/items/science/general/MetaItem1/9.png | Bin 340 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/0.png | Bin 243 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/1.png | Bin 243 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/2.png | Bin 243 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/3.png | Bin 243 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/4.png | Bin 328 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/5.png | Bin 328 -> 0 bytes .../textures/items/science/nuclear/MetaItem1/6.png | Bin 328 -> 0 bytes .../assets/miscutils/textures/items/spawn_egg.png | Bin 270 -> 0 bytes .../miscutils/textures/items/spawn_egg_overlay.png | Bin 402 -> 0 bytes .../assets/miscutils/textures/items/token/0.png | Bin 3345 -> 0 bytes .../assets/miscutils/textures/items/token/1.png | Bin 3688 -> 0 bytes .../assets/miscutils/textures/items/token/2.png | Bin 3698 -> 0 bytes .../assets/miscutils/textures/items/token/3.png | Bin 3758 -> 0 bytes .../assets/miscutils/textures/items/token/4.png | Bin 3719 -> 0 bytes .../assets/miscutils/textures/models/TinFoil.png | Bin 536 -> 0 bytes .../assets/miscutils/textures/space/RocketGui.png | Bin 490 -> 0 bytes .../assets/miscutils/textures/space/hd10180/A.png | Bin 220 -> 0 bytes .../assets/miscutils/textures/space/hd10180/B.png | Bin 810 -> 0 bytes .../assets/miscutils/textures/space/hd10180/C.png | Bin 810 -> 0 bytes .../assets/miscutils/textures/space/hd10180/D.png | Bin 817 -> 0 bytes src/resources/assets/spiceoflife/lang/de_DE.lang | 2 - src/resources/assets/spiceoflife/lang/en_US.lang | 2 - src/resources/assets/spiceoflife/lang/es_ES.lang | 2 - src/resources/assets/spiceoflife/lang/fr_FR.lang | 2 - src/resources/assets/spiceoflife/lang/it_IT.lang | 2 - src/resources/assets/spiceoflife/lang/ko_KR.lang | 2 - src/resources/assets/spiceoflife/lang/ru_RU.lang | 2 - src/resources/assets/spiceoflife/lang/zh_CN.lang | 2 - .../spiceoflife/textures/items/foodcrate.png | Bin 365 -> 0 bytes .../textures/items/foodcrate_open_empty.png | Bin 355 -> 0 bytes .../textures/items/foodcrate_open_full.png | Bin 509 -> 0 bytes src/resources/assets/stevescarts/lang/en_US.lang | 1 - src/resources/assets/stevescarts/lang/zh_CN.lang | 2 - .../textures/items/crop_exotic_seeds_icon.png | Bin 540 -> 0 bytes src/resources/mcmod.info | 18 - 6661 files changed, 259732 insertions(+), 259835 deletions(-) delete mode 100644 src/Java/gregtech/api/enums/TAE.java delete mode 100644 src/Java/gregtech/api/util/EmptyRecipeMap.java delete mode 100644 src/Java/gregtech/api/util/FishPondFakeRecipe.java delete mode 100644 src/Java/gregtech/api/util/GTPP_Recipe.java delete mode 100644 src/Java/gregtech/api/util/GasSpargingRecipe.java delete mode 100644 src/Java/gregtech/api/util/GasSpargingRecipeMap.java delete mode 100644 src/Java/gregtech/api/util/HotFuel.java delete mode 100644 src/Java/gregtech/api/util/SemiFluidFuelHandler.java delete mode 100644 src/Java/gregtech/api/util/ThermalFuel.java delete mode 100644 src/Java/gtPlusPlus/GTplusplus.java delete mode 100644 src/Java/gtPlusPlus/GenerateDictionaries.java delete mode 100644 src/Java/gtPlusPlus/RoadMap.java delete mode 100644 src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java delete mode 100644 src/Java/gtPlusPlus/api/enums/ParticleNames.java delete mode 100644 src/Java/gtPlusPlus/api/enums/Quality.java delete mode 100644 src/Java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java delete mode 100644 src/Java/gtPlusPlus/api/helpers/MaterialHelper.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IChunkLoader.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IComparableRecipe.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IEntityCatcher.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IGeneratorWorld.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IGregtechPower.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/ILazyCoverable.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IPlugin.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IRandomGenerator.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/ITexturedBlock.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/ITileTooltip.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/IToolable.java delete mode 100644 src/Java/gtPlusPlus/api/interfaces/RunnableWithInfo.java delete mode 100644 src/Java/gtPlusPlus/api/objects/GregtechException.java delete mode 100644 src/Java/gtPlusPlus/api/objects/Logger.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/AutoMap.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/ConcurrentSet.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/FlexiblePair.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/ObjMap.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/Pair.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/Quad.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/ReverseAutoMap.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/Triplet.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/TypeCounter.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/WeightedCollection.java delete mode 100644 src/Java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/AABB.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/BlockPos.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/CubicObject.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/GenericStack.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/SafeTexture.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/TexturePackage.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java delete mode 100644 src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java delete mode 100644 src/Java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java delete mode 100644 src/Java/gtPlusPlus/api/objects/random/UUIDGenerator.java delete mode 100644 src/Java/gtPlusPlus/api/objects/random/XSTR.java delete mode 100644 src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java delete mode 100644 src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java delete mode 100644 src/Java/gtPlusPlus/australia/GTplusplus_Australia.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/CustomDecorator.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/GenLayerAustralia.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java delete mode 100644 src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java delete mode 100644 src/Java/gtPlusPlus/australia/block/AustraliaContentLoader.java delete mode 100644 src/Java/gtPlusPlus/australia/block/BlockAustraliaPortal.java delete mode 100644 src/Java/gtPlusPlus/australia/block/BlockAustraliaSand.java delete mode 100644 src/Java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java delete mode 100644 src/Java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java delete mode 100644 src/Java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java delete mode 100644 src/Java/gtPlusPlus/australia/dimension/Dimension_Australia.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/model/ModelBoar.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/model/ModelDingo.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/model/ModelOctopus.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/render/RenderBoar.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/render/RenderDingo.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/render/RenderOctopus.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/type/EntityAustralianSpiderBase.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/type/EntityBoar.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/type/EntityDingo.java delete mode 100644 src/Java/gtPlusPlus/australia/entity/type/EntityOctopus.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/structure/StructureManager.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java delete mode 100644 src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java delete mode 100644 src/Java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java delete mode 100644 src/Java/gtPlusPlus/australia/item/ItemBlockAustralia.java delete mode 100644 src/Java/gtPlusPlus/australia/world/AustraliaPortalPosition.java delete mode 100644 src/Java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java delete mode 100644 src/Java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java delete mode 100644 src/Java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java delete mode 100644 src/Java/gtPlusPlus/australia/world/AustraliaWorldProvider.java delete mode 100644 src/Java/gtPlusPlus/australia/world/AustraliaWorldType.java delete mode 100644 src/Java/gtPlusPlus/core/block/ModBlocks.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/AdvancedBlock.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/BasicBlock.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/BlockBaseNBT.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/MetaBlock.java delete mode 100644 src/Java/gtPlusPlus/core/block/base/MultiTextureBlock.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/BlockNet.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/BlockSuperLight.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/FirePit.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/HellFire.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/LightGlass.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/MiningExplosives.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/PlayerDoors.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java delete mode 100644 src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/CircuitProgrammer.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/EggBox.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/FishTrap.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/HeliumGenerator.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_PooCollector.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java delete mode 100644 src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java delete mode 100644 src/Java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java delete mode 100644 src/Java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java delete mode 100644 src/Java/gtPlusPlus/core/client/CustomTextureSet.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelBatKing.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelEggBox.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java delete mode 100644 src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderDecayChest.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderPlasmaBolt.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/RenderToxinball.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/particle/EntityDropParticleFX.java delete mode 100644 src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java delete mode 100644 src/Java/gtPlusPlus/core/commands/CommandDebugChunks.java delete mode 100644 src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java delete mode 100644 src/Java/gtPlusPlus/core/commands/CommandMath.java delete mode 100644 src/Java/gtPlusPlus/core/commands/CommandUtils.java delete mode 100644 src/Java/gtPlusPlus/core/common/BasePlayer.java delete mode 100644 src/Java/gtPlusPlus/core/common/CommonProxy.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java delete mode 100644 src/Java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java delete mode 100644 src/Java/gtPlusPlus/core/config/ConfigHandler.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_BackpackBase.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_CircuitProgrammer.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_DecayablesChest.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_EggBox.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_FishTrap.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_Grindle.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_ModularityTable.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_PestKiller.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_ProjectTable.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_RoundRobinator.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_SuperJukebox.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_TradeTable.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_VolumetricFlaskSetter.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_Workbench.java delete mode 100644 src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java delete mode 100644 src/Java/gtPlusPlus/core/container/box/LunchBoxContainer.java delete mode 100644 src/Java/gtPlusPlus/core/container/box/MagicBagContainer.java delete mode 100644 src/Java/gtPlusPlus/core/container/box/ToolBoxContainer.java delete mode 100644 src/Java/gtPlusPlus/core/creative/AddToCreativeTab.java delete mode 100644 src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java delete mode 100644 src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java delete mode 100644 src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java delete mode 100644 src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java delete mode 100644 src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java delete mode 100644 src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java delete mode 100644 src/Java/gtPlusPlus/core/entity/EntityTeleportFX.java delete mode 100644 src/Java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java delete mode 100644 src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java delete mode 100644 src/Java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java delete mode 100644 src/Java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java delete mode 100644 src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java delete mode 100644 src/Java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java delete mode 100644 src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java delete mode 100644 src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java delete mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java delete mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java delete mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java delete mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java delete mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java delete mode 100644 src/Java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java delete mode 100644 src/Java/gtPlusPlus/core/fluids/BlockFluidBase.java delete mode 100644 src/Java/gtPlusPlus/core/fluids/FactoryFluid.java delete mode 100644 src/Java/gtPlusPlus/core/fluids/FluidFactory.java delete mode 100644 src/Java/gtPlusPlus/core/fluids/FluidPackage.java delete mode 100644 src/Java/gtPlusPlus/core/fluids/FluidRegistryHandler.java delete mode 100644 src/Java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java delete mode 100644 src/Java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java delete mode 100644 src/Java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java delete mode 100644 src/Java/gtPlusPlus/core/gui/beta/Gui_Types.java delete mode 100644 src/Java/gtPlusPlus/core/gui/beta/MU_GuiId.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/box/MagicBagGui.java delete mode 100644 src/Java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_EggBox.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java delete mode 100644 src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java delete mode 100644 src/Java/gtPlusPlus/core/gui/widget/GuiValueField.java delete mode 100644 src/Java/gtPlusPlus/core/handler/AchievementHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/BookHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/BurnableFuelHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java delete mode 100644 src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java delete mode 100644 src/Java/gtPlusPlus/core/handler/CraftingManager.java delete mode 100644 src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/GuiHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/PacketHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java delete mode 100644 src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/PlayerTickHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/SneakManager.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java delete mode 100644 src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/render/CapeHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/render/FirepitModel.java delete mode 100644 src/Java/gtPlusPlus/core/handler/render/FirepitRender.java delete mode 100644 src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java delete mode 100644 src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java delete mode 100644 src/Java/gtPlusPlus/core/interfaces/IGuiManager.java delete mode 100644 src/Java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java delete mode 100644 src/Java/gtPlusPlus/core/interfaces/IItemBlueprint.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryFishTrap.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryPestKiller.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/Inventory_EggBox.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/box/MagicBagInventory.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java delete mode 100644 src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java delete mode 100644 src/Java/gtPlusPlus/core/item/ModItems.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseEuItem.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemBrain.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemBurnable.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemColourable.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemGeneric.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemLoot.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemTCShard.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemWithCharge.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemWithDamageValue.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/BasicSpawnEgg.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/CoreItem.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/bolts/BaseItemBolt.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/foods/BaseItemFood.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/gears/BaseItemGear.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/rings/BaseItemRing.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java delete mode 100644 src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/BaseBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/NuclearChem.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/OilChem.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/circuit/ItemAdvancedChip.java delete mode 100644 src/Java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java delete mode 100644 src/Java/gtPlusPlus/core/item/effects/RarityEffect.java delete mode 100644 src/Java/gtPlusPlus/core/item/effects/RarityEpic.java delete mode 100644 src/Java/gtPlusPlus/core/item/effects/RarityRare.java delete mode 100644 src/Java/gtPlusPlus/core/item/effects/RarityUncommon.java delete mode 100644 src/Java/gtPlusPlus/core/item/food/BaseItemMetaFood.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/BaseItemGrindle.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/BedLocator_Base.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/BufferCore.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemCloakingDevice.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemControlCore.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemCreativeTab.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemEmpty.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemGemShards.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemGiantEgg.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java delete mode 100644 src/Java/gtPlusPlus/core/item/init/ItemsFoods.java delete mode 100644 src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java delete mode 100644 src/Java/gtPlusPlus/core/item/materials/DustDecayable.java delete mode 100644 src/Java/gtPlusPlus/core/item/materials/MaterialHandler.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/ConnectedBlockFinder.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/DebugScanner.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java delete mode 100644 src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/WearableLoader.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java delete mode 100644 src/Java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java delete mode 100644 src/Java/gtPlusPlus/core/lib/CORE.java delete mode 100644 src/Java/gtPlusPlus/core/lib/LoadedMods.java delete mode 100644 src/Java/gtPlusPlus/core/lib/VanillaColours.java delete mode 100644 src/Java/gtPlusPlus/core/material/ALLOY.java delete mode 100644 src/Java/gtPlusPlus/core/material/ELEMENT.java delete mode 100644 src/Java/gtPlusPlus/core/material/Ion.java delete mode 100644 src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java delete mode 100644 src/Java/gtPlusPlus/core/material/Material.java delete mode 100644 src/Java/gtPlusPlus/core/material/MaterialGenerator.java delete mode 100644 src/Java/gtPlusPlus/core/material/MaterialStack.java delete mode 100644 src/Java/gtPlusPlus/core/material/NONMATERIAL.java delete mode 100644 src/Java/gtPlusPlus/core/material/ORES.java delete mode 100644 src/Java/gtPlusPlus/core/material/Particle.java delete mode 100644 src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java delete mode 100644 src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java delete mode 100644 src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java delete mode 100644 src/Java/gtPlusPlus/core/material/state/MaterialState.java delete mode 100644 src/Java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java delete mode 100644 src/Java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java delete mode 100644 src/Java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java delete mode 100644 src/Java/gtPlusPlus/core/network/packet/AbstractPacket.java delete mode 100644 src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java delete mode 100644 src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java delete mode 100644 src/Java/gtPlusPlus/core/players/FakeFarmer.java delete mode 100644 src/Java/gtPlusPlus/core/proxy/ClientProxy.java delete mode 100644 src/Java/gtPlusPlus/core/proxy/ServerProxy.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_Extruder.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_General.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPES_Tools.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/RECIPE_Batteries.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java delete mode 100644 src/Java/gtPlusPlus/core/recipe/common/CI.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotAirFilter.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotBlueprint.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotCrafting.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotDataStick.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotElectric.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotFrame.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotFuelRod.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotGeneric.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotGtTool.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotItemBackpackInv.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotJukebox.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotLockedInput.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotLunchBox.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotMagicToolBag.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotModularBauble.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotNoInput.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotNoInputLogging.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotOutput.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotPollutionScrubber.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotRTG.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotToolBox.java delete mode 100644 src/Java/gtPlusPlus/core/slots/SlotVolumetricFlask.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/base/TileBasicTank.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityHeliumGenerator.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/general/redstone/TileEntityRedstoneHandler.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityRoundRobinator.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java delete mode 100644 src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java delete mode 100644 src/Java/gtPlusPlus/core/util/Utils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/AES.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/ArrayUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/EnumUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/FileUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/LocaleUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/LoggingUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/StringUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/data/UUIDUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/debug/DEBUG_INIT.java delete mode 100644 src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java delete mode 100644 src/Java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java delete mode 100644 src/Java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java delete mode 100644 src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java delete mode 100644 src/Java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java delete mode 100644 src/Java/gtPlusPlus/core/util/math/MathUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/ClientUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/FoodUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/InventoryUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/LangUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/MiningUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/OreDictUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java delete mode 100644 src/Java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java delete mode 100644 src/Java/gtPlusPlus/core/util/player/PlayerCache.java delete mode 100644 src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java delete mode 100644 src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java delete mode 100644 src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/sys/KeyboardUtils.java delete mode 100644 src/Java/gtPlusPlus/core/util/sys/Log.java delete mode 100644 src/Java/gtPlusPlus/core/util/sys/SystemUtils.java delete mode 100644 src/Java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java delete mode 100644 src/Java/gtPlusPlus/core/world/explosions/ExplosionHandler.java delete mode 100644 src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java delete mode 100644 src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java delete mode 100644 src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java delete mode 100644 src/Java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java delete mode 100644 src/Java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java delete mode 100644 src/Java/gtPlusPlus/everglades/object/BoxedQuad.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/CustomWorldType.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/WorldProviderMod.java delete mode 100644 src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java delete mode 100644 src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_FlotationCell.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_MillingMachine.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java delete mode 100644 src/Java/gtPlusPlus/nei/NEI_GT_Config.java delete mode 100644 src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java delete mode 100644 src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/BioRecipes.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/IAlgalItem.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java delete mode 100644 src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java delete mode 100644 src/Java/gtPlusPlus/plugin/fishing/Core_Fishing.java delete mode 100644 src/Java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java delete mode 100644 src/Java/gtPlusPlus/plugin/fishing/item/BaseFish.java delete mode 100644 src/Java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java delete mode 100644 src/Java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java delete mode 100644 src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java delete mode 100644 src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java delete mode 100644 src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java delete mode 100644 src/Java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java delete mode 100644 src/Java/gtPlusPlus/plugin/manager/Core_Manager.java delete mode 100644 src/Java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/NameLists.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/VillagerObject.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/VillagerUtils.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java delete mode 100644 src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java delete mode 100644 src/Java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java delete mode 100644 src/Java/gtPlusPlus/preloader/CORE_Preloader.java delete mode 100644 src/Java/gtPlusPlus/preloader/ChunkDebugger.java delete mode 100644 src/Java/gtPlusPlus/preloader/CustomClassLoader.java delete mode 100644 src/Java/gtPlusPlus/preloader/DevHelper.java delete mode 100644 src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java delete mode 100644 src/Java/gtPlusPlus/preloader/Preloader_Logger.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/AsmConfig.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/ClassesToTransform.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java delete mode 100644 src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java delete mode 100644 src/Java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java delete mode 100644 src/Java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java delete mode 100644 src/Java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java delete mode 100644 src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java delete mode 100644 src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java delete mode 100644 src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java delete mode 100644 src/Java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java delete mode 100644 src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java delete mode 100644 src/Java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java delete mode 100644 src/Java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java delete mode 100644 src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java delete mode 100644 src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java delete mode 100644 src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java delete mode 100644 src/Java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java delete mode 100644 src/Java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java delete mode 100644 src/Java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/Processing_Textures_Items.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AssLineAchievements.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_GTNH.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java delete mode 100644 src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java delete mode 100644 src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/CustomInternalName.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/IC2_Items.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/RotorBase.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/RotorIridium.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java delete mode 100644 src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java delete mode 100644 src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java delete mode 100644 src/Java/gtPlusPlus/xmod/ob/GliderHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java delete mode 100644 src/Java/gtPlusPlus/xmod/ob/SprinklerHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java delete mode 100644 src/Java/gtPlusPlus/xmod/railcraft/utils/RailcraftUtils.java delete mode 100644 src/Java/gtPlusPlus/xmod/reliquary/HANDLER_Reliquary.java delete mode 100644 src/Java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java delete mode 100644 src/Java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java delete mode 100644 src/Java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java delete mode 100644 src/Java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java delete mode 100644 src/Java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java delete mode 100644 src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java delete mode 100644 src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java delete mode 100644 src/Java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java delete mode 100644 src/Java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java delete mode 100644 src/Java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java delete mode 100644 src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java delete mode 100644 src/Java/gtPlusPlus/xmod/witchery/WitchUtils.java delete mode 100644 src/Java/vswe/stevescarts/ModuleData/GppModuleData.java create mode 100644 src/main/java/gregtech/api/enums/TAE.java create mode 100644 src/main/java/gregtech/api/util/EmptyRecipeMap.java create mode 100644 src/main/java/gregtech/api/util/FishPondFakeRecipe.java create mode 100644 src/main/java/gregtech/api/util/GTPP_Recipe.java create mode 100644 src/main/java/gregtech/api/util/GasSpargingRecipe.java create mode 100644 src/main/java/gregtech/api/util/GasSpargingRecipeMap.java create mode 100644 src/main/java/gregtech/api/util/HotFuel.java create mode 100644 src/main/java/gregtech/api/util/SemiFluidFuelHandler.java create mode 100644 src/main/java/gregtech/api/util/ThermalFuel.java create mode 100644 src/main/java/gtPlusPlus/GTplusplus.java create mode 100644 src/main/java/gtPlusPlus/GenerateDictionaries.java create mode 100644 src/main/java/gtPlusPlus/RoadMap.java create mode 100644 src/main/java/gtPlusPlus/api/damage/DamageTeslaTower.java create mode 100644 src/main/java/gtPlusPlus/api/enums/ParticleNames.java create mode 100644 src/main/java/gtPlusPlus/api/enums/Quality.java create mode 100644 src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java create mode 100644 src/main/java/gtPlusPlus/api/helpers/MaterialHelper.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IChunkLoader.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IComparableRecipe.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IEntityCatcher.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IGeneratorWorld.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IGregtechPower.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IPlugin.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IRandomGenerator.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/ITexturedBlock.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/ITileTooltip.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/IToolable.java create mode 100644 src/main/java/gtPlusPlus/api/interfaces/RunnableWithInfo.java create mode 100644 src/main/java/gtPlusPlus/api/objects/GregtechException.java create mode 100644 src/main/java/gtPlusPlus/api/objects/Logger.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/AutoMap.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/ConcurrentSet.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/FlexiblePair.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/ObjMap.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/Pair.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/Quad.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/ReverseAutoMap.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/Triplet.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java create mode 100644 src/main/java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/CubicObject.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/GenericStack.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/ItemStackData.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/TexturePackage.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java create mode 100644 src/main/java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java create mode 100644 src/main/java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java create mode 100644 src/main/java/gtPlusPlus/api/objects/random/UUIDGenerator.java create mode 100644 src/main/java/gtPlusPlus/api/objects/random/XSTR.java create mode 100644 src/main/java/gtPlusPlus/api/plugin/Sample_Plugin.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java create mode 100644 src/main/java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java create mode 100644 src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/GenLayerAustralia.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java create mode 100644 src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java create mode 100644 src/main/java/gtPlusPlus/australia/block/AustraliaContentLoader.java create mode 100644 src/main/java/gtPlusPlus/australia/block/BlockAustraliaPortal.java create mode 100644 src/main/java/gtPlusPlus/australia/block/BlockAustraliaSand.java create mode 100644 src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java create mode 100644 src/main/java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java create mode 100644 src/main/java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java create mode 100644 src/main/java/gtPlusPlus/australia/dimension/Dimension_Australia.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/model/ModelBoar.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/model/ModelDingo.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/model/ModelOctopus.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/render/RenderBoar.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/render/RenderDingo.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/render/RenderOctopus.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/type/EntityAustralianSpiderBase.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/type/EntityBoar.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/type/EntityDingo.java create mode 100644 src/main/java/gtPlusPlus/australia/entity/type/EntityOctopus.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/component/ComponentHut.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/component/ComponentShack.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/structure/StructureManager.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java create mode 100644 src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java create mode 100644 src/main/java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java create mode 100644 src/main/java/gtPlusPlus/australia/item/ItemBlockAustralia.java create mode 100644 src/main/java/gtPlusPlus/australia/world/AustraliaPortalPosition.java create mode 100644 src/main/java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java create mode 100644 src/main/java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java create mode 100644 src/main/java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java create mode 100644 src/main/java/gtPlusPlus/australia/world/AustraliaWorldProvider.java create mode 100644 src/main/java/gtPlusPlus/australia/world/AustraliaWorldType.java create mode 100644 src/main/java/gtPlusPlus/core/block/ModBlocks.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/BasicBlock.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/BlockBaseNBT.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/MetaBlock.java create mode 100644 src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/BlockNet.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/FirePit.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/FluidTankInfinite.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/HellFire.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/LightGlass.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/MiningExplosives.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java create mode 100644 src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/EggBox.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/FishTrap.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/HeliumGenerator.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_PooCollector.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_TradeTable.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java create mode 100644 src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java create mode 100644 src/main/java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java create mode 100644 src/main/java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java create mode 100644 src/main/java/gtPlusPlus/core/client/CustomTextureSet.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java create mode 100644 src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderDecayChest.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderPlasmaBolt.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderToxinball.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/particle/EntityDropParticleFX.java create mode 100644 src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java create mode 100644 src/main/java/gtPlusPlus/core/commands/CommandDebugChunks.java create mode 100644 src/main/java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java create mode 100644 src/main/java/gtPlusPlus/core/commands/CommandMath.java create mode 100644 src/main/java/gtPlusPlus/core/commands/CommandUtils.java create mode 100644 src/main/java/gtPlusPlus/core/common/BasePlayer.java create mode 100644 src/main/java/gtPlusPlus/core/common/CommonProxy.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java create mode 100644 src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java create mode 100644 src/main/java/gtPlusPlus/core/config/ConfigHandler.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_BackpackBase.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_CircuitProgrammer.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_EggBox.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_FishTrap.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_Grindle.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_HeliumGenerator.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_ModularityTable.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_PestKiller.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_RoundRobinator.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_SuperJukebox.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_TradeTable.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_VolumetricFlaskSetter.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_Workbench.java create mode 100644 src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java create mode 100644 src/main/java/gtPlusPlus/core/container/box/LunchBoxContainer.java create mode 100644 src/main/java/gtPlusPlus/core/container/box/MagicBagContainer.java create mode 100644 src/main/java/gtPlusPlus/core/container/box/ToolBoxContainer.java create mode 100644 src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java create mode 100644 src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java create mode 100644 src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java create mode 100644 src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java create mode 100644 src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java create mode 100644 src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java create mode 100644 src/main/java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java create mode 100644 src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java create mode 100644 src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java create mode 100644 src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java create mode 100644 src/main/java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java create mode 100644 src/main/java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java create mode 100644 src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java create mode 100644 src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java create mode 100644 src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java create mode 100644 src/main/java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java create mode 100644 src/main/java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java create mode 100644 src/main/java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java create mode 100644 src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java create mode 100644 src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java create mode 100644 src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java create mode 100644 src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java create mode 100644 src/main/java/gtPlusPlus/core/fluids/BlockFluidBase.java create mode 100644 src/main/java/gtPlusPlus/core/fluids/FactoryFluid.java create mode 100644 src/main/java/gtPlusPlus/core/fluids/FluidFactory.java create mode 100644 src/main/java/gtPlusPlus/core/fluids/FluidPackage.java create mode 100644 src/main/java/gtPlusPlus/core/fluids/FluidRegistryHandler.java create mode 100644 src/main/java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java create mode 100644 src/main/java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java create mode 100644 src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java create mode 100644 src/main/java/gtPlusPlus/core/gui/beta/Gui_Types.java create mode 100644 src/main/java/gtPlusPlus/core/gui/beta/MU_GuiId.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/box/MagicBagGui.java create mode 100644 src/main/java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_EggBox.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java create mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java create mode 100644 src/main/java/gtPlusPlus/core/gui/widget/GuiValueField.java create mode 100644 src/main/java/gtPlusPlus/core/handler/AchievementHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/BookHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/BurnableFuelHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java create mode 100644 src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java create mode 100644 src/main/java/gtPlusPlus/core/handler/CraftingManager.java create mode 100644 src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/GuiHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/PacketHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java create mode 100644 src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/BlockEventHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/EntityDeathHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/PlayerTickHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/SneakManager.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java create mode 100644 src/main/java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/render/FirepitModel.java create mode 100644 src/main/java/gtPlusPlus/core/handler/render/FirepitRender.java create mode 100644 src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java create mode 100644 src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java create mode 100644 src/main/java/gtPlusPlus/core/interfaces/IGuiManager.java create mode 100644 src/main/java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java create mode 100644 src/main/java/gtPlusPlus/core/interfaces/IItemBlueprint.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryFishTrap.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryPestKiller.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/Inventory_EggBox.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/box/MagicBagInventory.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java create mode 100644 src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java create mode 100644 src/main/java/gtPlusPlus/core/item/ModItems.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseEuItem.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemBurnable.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemColourable.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemTCShard.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemTickable.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemWithCharge.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BaseItemWithDamageValue.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/BasicSpawnEgg.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/CoreItem.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/bolts/BaseItemBolt.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/cell/BaseItemCell.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/cell/BaseItemPlasmaCell.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/foods/BaseItemFood.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/gears/BaseItemGear.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/rings/BaseItemRing.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRod.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java create mode 100644 src/main/java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/circuit/ItemAdvancedChip.java create mode 100644 src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java create mode 100644 src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java create mode 100644 src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java create mode 100644 src/main/java/gtPlusPlus/core/item/effects/RarityRare.java create mode 100644 src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java create mode 100644 src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/BufferCore.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemCloakingDevice.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemEmpty.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemGenericToken.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/books/ItemBaseBook.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java create mode 100644 src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java create mode 100644 src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java create mode 100644 src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java create mode 100644 src/main/java/gtPlusPlus/core/item/materials/DustDecayable.java create mode 100644 src/main/java/gtPlusPlus/core/item/materials/MaterialHandler.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/ConnectedBlockFinder.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/DebugScanner.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java create mode 100644 src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/WearableLoader.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java create mode 100644 src/main/java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java create mode 100644 src/main/java/gtPlusPlus/core/lib/CORE.java create mode 100644 src/main/java/gtPlusPlus/core/lib/LoadedMods.java create mode 100644 src/main/java/gtPlusPlus/core/lib/VanillaColours.java create mode 100644 src/main/java/gtPlusPlus/core/material/ALLOY.java create mode 100644 src/main/java/gtPlusPlus/core/material/ELEMENT.java create mode 100644 src/main/java/gtPlusPlus/core/material/Ion.java create mode 100644 src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java create mode 100644 src/main/java/gtPlusPlus/core/material/Material.java create mode 100644 src/main/java/gtPlusPlus/core/material/MaterialGenerator.java create mode 100644 src/main/java/gtPlusPlus/core/material/MaterialStack.java create mode 100644 src/main/java/gtPlusPlus/core/material/NONMATERIAL.java create mode 100644 src/main/java/gtPlusPlus/core/material/ORES.java create mode 100644 src/main/java/gtPlusPlus/core/material/Particle.java create mode 100644 src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java create mode 100644 src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java create mode 100644 src/main/java/gtPlusPlus/core/material/nuclear/NUCLIDE.java create mode 100644 src/main/java/gtPlusPlus/core/material/state/MaterialState.java create mode 100644 src/main/java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java create mode 100644 src/main/java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java create mode 100644 src/main/java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java create mode 100644 src/main/java/gtPlusPlus/core/network/packet/AbstractPacket.java create mode 100644 src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java create mode 100644 src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java create mode 100644 src/main/java/gtPlusPlus/core/players/FakeFarmer.java create mode 100644 src/main/java/gtPlusPlus/core/proxy/ClientProxy.java create mode 100644 src/main/java/gtPlusPlus/core/proxy/ServerProxy.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_Extruder.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPES_Tools.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/RECIPE_Batteries.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/ShapedRecipeObject.java create mode 100644 src/main/java/gtPlusPlus/core/recipe/common/CI.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotAirFilter.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotBlueprint.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotBuzzSaw.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotCrafting.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotDataStick.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotElectric.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotFrame.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotGeneric.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotGtTool.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotItemBackpackInv.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotJukebox.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotLockedInput.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotModularBauble.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotNoInput.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotNoInputLogging.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotOutput.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotPollutionScrubber.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotRTG.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotToolBox.java create mode 100644 src/main/java/gtPlusPlus/core/slots/SlotVolumetricFlask.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityHeliumGenerator.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/general/redstone/TileEntityRedstoneHandler.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityRoundRobinator.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java create mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java create mode 100644 src/main/java/gtPlusPlus/core/util/Utils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/AES.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/ArrayUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/EnumUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/FileUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/LocaleUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/StringUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java create mode 100644 src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java create mode 100644 src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java create mode 100644 src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java create mode 100644 src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java create mode 100644 src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java create mode 100644 src/main/java/gtPlusPlus/core/util/math/MathUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/EntityUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/HazmatUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/InventoryUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/ItemUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/LangUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/NBTUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/OreDictUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java create mode 100644 src/main/java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java create mode 100644 src/main/java/gtPlusPlus/core/util/player/PlayerCache.java create mode 100644 src/main/java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java create mode 100644 src/main/java/gtPlusPlus/core/util/reflect/ProxyFinder.java create mode 100644 src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/sys/KeyboardUtils.java create mode 100644 src/main/java/gtPlusPlus/core/util/sys/Log.java create mode 100644 src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java create mode 100644 src/main/java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java create mode 100644 src/main/java/gtPlusPlus/core/world/explosions/ExplosionHandler.java create mode 100644 src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java create mode 100644 src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java create mode 100644 src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java create mode 100644 src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java create mode 100644 src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java create mode 100644 src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java create mode 100644 src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java create mode 100644 src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java create mode 100644 src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java create mode 100644 src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java create mode 100644 src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java create mode 100644 src/main/java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java create mode 100644 src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java create mode 100644 src/main/java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java create mode 100644 src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java create mode 100644 src/main/java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java create mode 100644 src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java create mode 100644 src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java create mode 100644 src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java create mode 100644 src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java create mode 100644 src/main/java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java create mode 100644 src/main/java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java create mode 100644 src/main/java/gtPlusPlus/everglades/object/BoxedQuad.java create mode 100644 src/main/java/gtPlusPlus/everglades/world/CustomWorldType.java create mode 100644 src/main/java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java create mode 100644 src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java create mode 100644 src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java create mode 100644 src/main/java/gtPlusPlus/everglades/world/WorldProviderMod.java create mode 100644 src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java create mode 100644 src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java create mode 100644 src/main/java/gtPlusPlus/nei/GT_NEI_FlotationCell.java create mode 100644 src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java create mode 100644 src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java create mode 100644 src/main/java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java create mode 100644 src/main/java/gtPlusPlus/nei/GT_NEI_MillingMachine.java create mode 100644 src/main/java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java create mode 100644 src/main/java/gtPlusPlus/nei/NEI_GT_Config.java create mode 100644 src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java create mode 100644 src/main/java/gtPlusPlus/nei/handlers/NeiTextureHandler.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/IAlgalItem.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java create mode 100644 src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java create mode 100644 src/main/java/gtPlusPlus/plugin/fishing/Core_Fishing.java create mode 100644 src/main/java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java create mode 100644 src/main/java/gtPlusPlus/plugin/fishing/item/BaseFish.java create mode 100644 src/main/java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java create mode 100644 src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java create mode 100644 src/main/java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java create mode 100644 src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java create mode 100644 src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java create mode 100644 src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java create mode 100644 src/main/java/gtPlusPlus/plugin/manager/Core_Manager.java create mode 100644 src/main/java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/NameLists.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/VillagerObject.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/VillagerUtils.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java create mode 100644 src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java create mode 100644 src/main/java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java create mode 100644 src/main/java/gtPlusPlus/preloader/CORE_Preloader.java create mode 100644 src/main/java/gtPlusPlus/preloader/ChunkDebugger.java create mode 100644 src/main/java/gtPlusPlus/preloader/CustomClassLoader.java create mode 100644 src/main/java/gtPlusPlus/preloader/DevHelper.java create mode 100644 src/main/java/gtPlusPlus/preloader/Preloader_GT_OreDict.java create mode 100644 src/main/java/gtPlusPlus/preloader/Preloader_Logger.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/AsmConfig.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/ClassesToTransform.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java create mode 100644 src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java create mode 100644 src/main/java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java create mode 100644 src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java create mode 100644 src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java create mode 100644 src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java create mode 100644 src/main/java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java create mode 100644 src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java create mode 100644 src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java create mode 100644 src/main/java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java create mode 100644 src/main/java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java create mode 100644 src/main/java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/Processing_Textures_Items.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AssLineAchievements.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_GTNH.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java create mode 100644 src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java create mode 100644 src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/CustomInternalName.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/IC2_Items.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/RotorBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/RotorIridium.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java create mode 100644 src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java create mode 100644 src/main/java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java create mode 100644 src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java create mode 100644 src/main/java/gtPlusPlus/xmod/ob/SprinklerHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java create mode 100644 src/main/java/gtPlusPlus/xmod/railcraft/utils/RailcraftUtils.java create mode 100644 src/main/java/gtPlusPlus/xmod/reliquary/HANDLER_Reliquary.java create mode 100644 src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java create mode 100644 src/main/java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java create mode 100644 src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java create mode 100644 src/main/java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java create mode 100644 src/main/java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java create mode 100644 src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java create mode 100644 src/main/java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java create mode 100644 src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java create mode 100644 src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java create mode 100644 src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java create mode 100644 src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java create mode 100644 src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java create mode 100644 src/main/java/vswe/stevescarts/ModuleData/GppModuleData.java create mode 100644 src/main/resources/assets/forestry/AlvearyFrame.png create mode 100644 src/main/resources/assets/forestry/AlvearyMutator.png create mode 100644 src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png create mode 100644 src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png create mode 100644 src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png create mode 100644 src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png create mode 100644 src/main/resources/assets/gregtech/lang/en_US.lang create mode 100644 src/main/resources/assets/gregtech/lang/zh_CN.lang create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/PowerSubStation.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/multimachines/LFTR.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png create mode 100644 src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png create mode 100644 src/main/resources/assets/ic2/lang/de_DE.lang create mode 100644 src/main/resources/assets/ic2/lang/en_US.lang create mode 100644 src/main/resources/assets/ic2/lang/zh_CN.lang create mode 100644 src/main/resources/assets/ic2/textures/armor/hazmatEx_1.png create mode 100644 src/main/resources/assets/ic2/textures/armor/hazmatEx_2.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/HydrogenChloride.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/SulfurDioxide.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/SulfuricApatite.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/SulfuricLithium.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/SulfurousAcid.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png create mode 100644 src/main/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png create mode 100644 src/main/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png create mode 100644 src/main/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png create mode 100644 src/main/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png create mode 100644 src/main/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png create mode 100644 src/main/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/death.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/hit1.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/hit2.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/hit3.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/hit4.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/idle1.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/idle2.ogg create mode 100644 src/main/resources/assets/minecraft/sounds/mob/witch/idle3.ogg create mode 100644 src/main/resources/assets/miscutils/lang/de_DE.lang create mode 100644 src/main/resources/assets/miscutils/lang/en_US.lang create mode 100644 src/main/resources/assets/miscutils/lang/ru_RU.lang create mode 100644 src/main/resources/assets/miscutils/lang/zh_CN.lang create mode 100644 src/main/resources/assets/miscutils/textures/DevCape.png create mode 100644 src/main/resources/assets/miscutils/textures/DevCapeHD.png create mode 100644 src/main/resources/assets/miscutils/textures/FancyCape.png create mode 100644 src/main/resources/assets/miscutils/textures/FancyCapeHD.png create mode 100644 src/main/resources/assets/miscutils/textures/Orange.png create mode 100644 src/main/resources/assets/miscutils/textures/OrangeHD.png create mode 100644 src/main/resources/assets/miscutils/textures/PatreonCapeHD.png create mode 100644 src/main/resources/assets/miscutils/textures/TesterCape.png create mode 100644 src/main/resources/assets/miscutils/textures/TesterCapeHD.png create mode 100644 src/main/resources/assets/miscutils/textures/aspects/Sagrausten.png create mode 100644 src/main/resources/assets/miscutils/textures/aspects/Slusium.png create mode 100644 src/main/resources/assets/miscutils/textures/aspects/Xablum.png create mode 100644 src/main/resources/assets/miscutils/textures/aspects/Xenil.png create mode 100644 src/main/resources/assets/miscutils/textures/aspects/Zetralt.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn create mode 100644 src/main/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/SwirlBlue.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/SwirlCyan.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/SwirlGray.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/SwirlRed.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/SwirlYellow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockAntiGrief.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockBlock.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockBloodSteel.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockDefault.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockFrameGt.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockMFEffect.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockStaballoy.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/blockStone.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/clear_flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/clear_still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/door_cactus_lower.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/door_cactus_upper.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/door_glass_lower.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/door_glass_upper.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/door_ice_lower.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/door_ice_upper.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/mash_flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/mash_still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/net.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redox/redox1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redox/redox2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redox/redox3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redox/redox4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redox/redox5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redox/redox6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/rum_mature_flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/rum_mature_still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/workbench.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/workbench_top.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/boar.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/bush_spider.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/australia/octopus.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/batKing.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/golemStaballoy.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/sickBlaze.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/villager/aboriginal.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/villager/banker.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/villager/technician.png create mode 100644 src/main/resources/assets/miscutils/textures/entity/villager/trader.png create mode 100644 src/main/resources/assets/miscutils/textures/enviroment/moon_phases.png create mode 100644 src/main/resources/assets/miscutils/textures/enviroment/snow.png create mode 100644 src/main/resources/assets/miscutils/textures/enviroment/sun.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/AdvancedBoiler.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/CircuitProgrammer.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/CokeOven.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/Cyclotron.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/FishTrap.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/FluidReactor.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/Generic3By3.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialExtruder.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialMixer.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialSifter.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/IronBlastFurnace.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/MacerationStack.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/MaterialPress.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/MatterFabricator.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/ModularityTable.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/PestKiller.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/PollutionCleaner.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/PowerSubStation.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/ProjectTable.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/RoundRobinator.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/SafeBlock.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/SlowFusion.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/SteelBoiler.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/SuperJukebox.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/TreeFarmer.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/Workbench.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/helium_collector_gui.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/itemBackpack.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/itemGrindle.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/machine_Charger.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/nei/decayables.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/nei/widgets.png create mode 100644 src/main/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metatool.01/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metatool.01/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metatool.01/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/MU-metatool.01/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/StoneStatue.png create mode 100644 src/main/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bomb.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bomb_casing.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bomb_lit.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket.generic.overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png create mode 100644 src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png create mode 100644 src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png create mode 100644 src/main/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png create mode 100644 src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png create mode 100644 src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/chargepack/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/controlcore/Core_9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/10.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/11.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/12.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/13.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/14.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/15.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/covers/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dust.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dustSmall.png create mode 100644 src/main/resources/assets/miscutils/textures/items/dustTiny.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/food/MetaItem1/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameAccelerated.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameArborists.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameBusy.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameChocolate.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameDecaying.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameHealing.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameMutagenic.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameNova.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameRestraint.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameSlowing.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameSoul.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameStabilizing.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameUseless.png create mode 100644 src/main/resources/assets/miscutils/textures/items/frameVoid.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/VOID.png create mode 100644 src/main/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/10.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/100.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/101.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/102.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/103.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/104.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/105.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/106.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/107.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/108.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/109.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/11.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/110.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/111.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/112.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/113.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/114.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/115.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/116.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/117.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/12.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/13.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/14.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/15.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/16.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/17.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/18.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/19.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/20.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/21.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/22.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/23.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/24.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/25.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/26.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/27.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/28.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/29.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/30.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/31.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/32.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/33.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/34.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/35.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/36.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/37.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/38.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/39.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/40.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/41.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/42.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/43.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/44.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/45.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/46.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/47.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/48.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/49.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/50.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/51.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/52.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/53.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/54.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/55.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/56.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/57.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/58.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/59.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/60.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/61.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/62.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/63.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/64.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/65.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/66.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/67.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/68.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/69.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/70.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/71.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/72.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/73.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/74.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/75.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/76.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/77.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/78.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/79.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/80.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/81.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/82.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/83.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/84.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/85.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/86.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/87.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/88.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/89.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/90.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/91.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/92.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/93.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/94.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/95.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/96.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/97.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/98.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/99.png create mode 100644 src/main/resources/assets/miscutils/textures/items/ion/IonBase.png create mode 100644 src/main/resources/assets/miscutils/textures/items/item.empty.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemAirFilter.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemAlkalusDisk.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemAmulet.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBackpack.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBasicTurbine.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBelt.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBigEgg.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBlueprint.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBoilerChassis.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBolt.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBook.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBoots.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBottle.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBread.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemBufferCore.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemCell.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemCellPlasma.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemCell_Overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemCentidust.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemCircuitLFTR.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemDecidust.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemDefault.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemDehydratorCoil.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemDroplet.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemEnergeticShaft.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemFiber.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemFineWire.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemFireStarter.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemGear.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemGem.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHatTinFoil.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHeavyPlate.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHeliumBlob.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHelmet.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemHydrogenBlob.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemIngot.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemIngotHot.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemIridiumShaft.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemKey.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemKeyBig.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemKeyGold.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemLavaFilter.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemMushroom.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemMushroomRed.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemNugget.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPickaxe.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPineapple.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPlate.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPlateDouble.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPlatebody.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPlatelegs.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPotion.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPotionBlack.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemPotionRed.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemRing.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemRingWearable.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemRod.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemRodLong.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemRope.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemRotor.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSandstoneHammer.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemScrew.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemShard.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemShovel.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSmallSpring.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSpring.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemStaballoyAxe.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemStickyRubber.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSword.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemTablet.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemUltimetShaft.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemVibrantShaft.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemWaterBottle.png create mode 100644 src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png create mode 100644 src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png create mode 100644 src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png create mode 100644 src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta create mode 100644 src/main/resources/assets/miscutils/textures/items/material/RodBlizz.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/0.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/10.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/11.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/12.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/13.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/14.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/15.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/16.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/17.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/18.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/19.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/20.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/21.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/22.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/23.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/24.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/7.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/8.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/9.PNG create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/10.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/11.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/12.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/13.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/14.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/15.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/16.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/17.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/18.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/19.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/20.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/21.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/22.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/23.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/24.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/particle/new/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/personalCloakingDevice.png create mode 100644 src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png create mode 100644 src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png create mode 100644 src/main/resources/assets/miscutils/textures/items/research/note.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/Atom.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png create mode 100644 src/main/resources/assets/miscutils/textures/items/spawn_egg.png create mode 100644 src/main/resources/assets/miscutils/textures/items/spawn_egg_overlay.png create mode 100644 src/main/resources/assets/miscutils/textures/items/token/0.png create mode 100644 src/main/resources/assets/miscutils/textures/items/token/1.png create mode 100644 src/main/resources/assets/miscutils/textures/items/token/2.png create mode 100644 src/main/resources/assets/miscutils/textures/items/token/3.png create mode 100644 src/main/resources/assets/miscutils/textures/items/token/4.png create mode 100644 src/main/resources/assets/miscutils/textures/models/TinFoil.png create mode 100644 src/main/resources/assets/miscutils/textures/space/RocketGui.png create mode 100644 src/main/resources/assets/miscutils/textures/space/hd10180/A.png create mode 100644 src/main/resources/assets/miscutils/textures/space/hd10180/B.png create mode 100644 src/main/resources/assets/miscutils/textures/space/hd10180/C.png create mode 100644 src/main/resources/assets/miscutils/textures/space/hd10180/D.png create mode 100644 src/main/resources/assets/spiceoflife/lang/de_DE.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/en_US.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/es_ES.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/fr_FR.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/it_IT.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/ko_KR.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/ru_RU.lang create mode 100644 src/main/resources/assets/spiceoflife/lang/zh_CN.lang create mode 100644 src/main/resources/assets/spiceoflife/textures/items/foodcrate.png create mode 100644 src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png create mode 100644 src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png create mode 100644 src/main/resources/assets/stevescarts/lang/en_US.lang create mode 100644 src/main/resources/assets/stevescarts/lang/zh_CN.lang create mode 100644 src/main/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png create mode 100644 src/main/resources/mcmod.info delete mode 100644 src/resources/GradleStartClient.java delete mode 100644 src/resources/assets/forestry/AlvearyFrame.png delete mode 100644 src/resources/assets/forestry/AlvearyMutator.png delete mode 100644 src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png delete mode 100644 src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png delete mode 100644 src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png delete mode 100644 src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png delete mode 100644 src/resources/assets/gregtech/lang/en_US.lang delete mode 100644 src/resources/assets/gregtech/lang/zh_CN.lang delete mode 100644 src/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png delete mode 100644 src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png delete mode 100644 src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png delete mode 100644 src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png delete mode 100644 src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png delete mode 100644 src/resources/assets/gregtech/textures/gui/PowerSubStation.png delete mode 100644 src/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png delete mode 100644 src/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png delete mode 100644 src/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png delete mode 100644 src/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png delete mode 100644 src/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png delete mode 100644 src/resources/assets/gregtech/textures/gui/multimachines/LFTR.png delete mode 100644 src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png delete mode 100644 src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png delete mode 100644 src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png delete mode 100644 src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png delete mode 100644 src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png delete mode 100644 src/resources/assets/ic2/lang/de_DE.lang delete mode 100644 src/resources/assets/ic2/lang/en_US.lang delete mode 100644 src/resources/assets/ic2/lang/zh_CN.lang delete mode 100644 src/resources/assets/ic2/textures/armor/hazmatEx_1.png delete mode 100644 src/resources/assets/ic2/textures/armor/hazmatEx_2.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/HydrogenChloride.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/SulfurDioxide.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/SulfuricApatite.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/SulfuricLithium.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/SulfurousAcid.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png delete mode 100644 src/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png delete mode 100644 src/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png delete mode 100644 src/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png delete mode 100644 src/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png delete mode 100644 src/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png delete mode 100644 src/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/death.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/hit1.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/hit2.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/hit3.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/hit4.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/idle1.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/idle2.ogg delete mode 100644 src/resources/assets/minecraft/sounds/mob/witch/idle3.ogg delete mode 100644 src/resources/assets/miscutils/lang/de_DE.lang delete mode 100644 src/resources/assets/miscutils/lang/en_US.lang delete mode 100644 src/resources/assets/miscutils/lang/ru_RU.lang delete mode 100644 src/resources/assets/miscutils/lang/zh_CN.lang delete mode 100644 src/resources/assets/miscutils/textures/DevCape.png delete mode 100644 src/resources/assets/miscutils/textures/DevCapeHD.png delete mode 100644 src/resources/assets/miscutils/textures/FancyCape.png delete mode 100644 src/resources/assets/miscutils/textures/FancyCapeHD.png delete mode 100644 src/resources/assets/miscutils/textures/Orange.png delete mode 100644 src/resources/assets/miscutils/textures/OrangeHD.png delete mode 100644 src/resources/assets/miscutils/textures/PatreonCapeHD.png delete mode 100644 src/resources/assets/miscutils/textures/TesterCape.png delete mode 100644 src/resources/assets/miscutils/textures/TesterCapeHD.png delete mode 100644 src/resources/assets/miscutils/textures/aspects/Sagrausten.png delete mode 100644 src/resources/assets/miscutils/textures/aspects/Slusium.png delete mode 100644 src/resources/assets/miscutils/textures/aspects/Xablum.png delete mode 100644 src/resources/assets/miscutils/textures/aspects/Xenil.png delete mode 100644 src/resources/assets/miscutils/textures/aspects/Zetralt.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn delete mode 100644 src/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/SwirlBlue.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/SwirlCyan.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/SwirlGray.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/SwirlRed.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/SwirlYellow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockAntiGrief.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockBlock.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockBloodSteel.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockDefault.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockFrameGt.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockMFEffect.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockStaballoy.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/blockStone.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/clear_flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/clear_still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/door_cactus_lower.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/door_cactus_upper.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/door_glass_lower.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/door_glass_upper.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/door_ice_lower.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/door_ice_upper.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/mash_flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/mash_still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/net.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redox/redox1.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redox/redox2.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redox/redox3.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redox/redox4.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redox/redox5.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redox/redox6.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/rum_mature_flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/rum_mature_still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/workbench.png delete mode 100644 src/resources/assets/miscutils/textures/blocks/workbench_top.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/boar.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/bush_spider.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png delete mode 100644 src/resources/assets/miscutils/textures/entity/australia/octopus.png delete mode 100644 src/resources/assets/miscutils/textures/entity/batKing.png delete mode 100644 src/resources/assets/miscutils/textures/entity/golemStaballoy.png delete mode 100644 src/resources/assets/miscutils/textures/entity/sickBlaze.png delete mode 100644 src/resources/assets/miscutils/textures/entity/villager/aboriginal.png delete mode 100644 src/resources/assets/miscutils/textures/entity/villager/banker.png delete mode 100644 src/resources/assets/miscutils/textures/entity/villager/technician.png delete mode 100644 src/resources/assets/miscutils/textures/entity/villager/trader.png delete mode 100644 src/resources/assets/miscutils/textures/enviroment/moon_phases.png delete mode 100644 src/resources/assets/miscutils/textures/enviroment/snow.png delete mode 100644 src/resources/assets/miscutils/textures/enviroment/sun.png delete mode 100644 src/resources/assets/miscutils/textures/gui/AdvancedBoiler.png delete mode 100644 src/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png delete mode 100644 src/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png delete mode 100644 src/resources/assets/miscutils/textures/gui/CircuitProgrammer.png delete mode 100644 src/resources/assets/miscutils/textures/gui/CokeOven.png delete mode 100644 src/resources/assets/miscutils/textures/gui/Cyclotron.png delete mode 100644 src/resources/assets/miscutils/textures/gui/FishTrap.png delete mode 100644 src/resources/assets/miscutils/textures/gui/FluidReactor.png delete mode 100644 src/resources/assets/miscutils/textures/gui/Generic3By3.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialExtruder.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialMixer.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialSifter.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png delete mode 100644 src/resources/assets/miscutils/textures/gui/IronBlastFurnace.png delete mode 100644 src/resources/assets/miscutils/textures/gui/MacerationStack.png delete mode 100644 src/resources/assets/miscutils/textures/gui/MaterialPress.png delete mode 100644 src/resources/assets/miscutils/textures/gui/MatterFabricator.png delete mode 100644 src/resources/assets/miscutils/textures/gui/ModularityTable.png delete mode 100644 src/resources/assets/miscutils/textures/gui/MultiblockDisplay.png delete mode 100644 src/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png delete mode 100644 src/resources/assets/miscutils/textures/gui/PestKiller.png delete mode 100644 src/resources/assets/miscutils/textures/gui/PollutionCleaner.png delete mode 100644 src/resources/assets/miscutils/textures/gui/PowerSubStation.png delete mode 100644 src/resources/assets/miscutils/textures/gui/ProjectTable.png delete mode 100644 src/resources/assets/miscutils/textures/gui/RoundRobinator.png delete mode 100644 src/resources/assets/miscutils/textures/gui/SafeBlock.png delete mode 100644 src/resources/assets/miscutils/textures/gui/SlowFusion.png delete mode 100644 src/resources/assets/miscutils/textures/gui/SteelBoiler.png delete mode 100644 src/resources/assets/miscutils/textures/gui/SuperJukebox.png delete mode 100644 src/resources/assets/miscutils/textures/gui/TreeFarmer.png delete mode 100644 src/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png delete mode 100644 src/resources/assets/miscutils/textures/gui/Workbench.png delete mode 100644 src/resources/assets/miscutils/textures/gui/helium_collector_gui.png delete mode 100644 src/resources/assets/miscutils/textures/gui/itemBackpack.png delete mode 100644 src/resources/assets/miscutils/textures/gui/itemGrindle.png delete mode 100644 src/resources/assets/miscutils/textures/gui/machine_Charger.png delete mode 100644 src/resources/assets/miscutils/textures/gui/nei/decayables.png delete mode 100644 src/resources/assets/miscutils/textures/gui/nei/widgets.png delete mode 100644 src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metatool.01/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metatool.01/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metatool.01/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/MU-metatool.01/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/StoneStatue.png delete mode 100644 src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/bomb.png delete mode 100644 src/resources/assets/miscutils/textures/items/bomb_casing.png delete mode 100644 src/resources/assets/miscutils/textures/items/bomb_lit.png delete mode 100644 src/resources/assets/miscutils/textures/items/bucket.generic.overlay.png delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png delete mode 100644 src/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png delete mode 100644 src/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png delete mode 100644 src/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png delete mode 100644 src/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png delete mode 100644 src/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/chargepack/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_0.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_1.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_2.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_3.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_4.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_5.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_6.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_7.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_8.png delete mode 100644 src/resources/assets/miscutils/textures/items/controlcore/Core_9.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/10.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/11.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/12.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/13.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/14.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/15.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/covers/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png delete mode 100644 src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png delete mode 100644 src/resources/assets/miscutils/textures/items/dust.png delete mode 100644 src/resources/assets/miscutils/textures/items/dustSmall.png delete mode 100644 src/resources/assets/miscutils/textures/items/dustTiny.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/food/MetaItem1/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameAccelerated.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameArborists.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameBusy.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameChocolate.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameDecaying.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameHealing.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameMutagenic.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameNova.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameRestraint.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameSlowing.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameSoul.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameStabilizing.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameUseless.png delete mode 100644 src/resources/assets/miscutils/textures/items/frameVoid.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/VOID.png delete mode 100644 src/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/10.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/100.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/101.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/102.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/103.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/104.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/105.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/106.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/107.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/108.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/109.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/11.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/110.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/111.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/112.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/113.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/114.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/115.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/116.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/117.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/12.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/13.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/14.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/15.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/16.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/17.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/18.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/19.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/20.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/21.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/22.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/23.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/24.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/25.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/26.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/27.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/28.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/29.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/30.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/31.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/32.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/33.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/34.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/35.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/36.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/37.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/38.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/39.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/40.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/41.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/42.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/43.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/44.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/45.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/46.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/47.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/48.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/49.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/50.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/51.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/52.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/53.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/54.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/55.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/56.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/57.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/58.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/59.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/60.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/61.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/62.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/63.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/64.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/65.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/66.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/67.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/68.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/69.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/70.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/71.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/72.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/73.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/74.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/75.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/76.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/77.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/78.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/79.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/80.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/81.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/82.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/83.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/84.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/85.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/86.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/87.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/88.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/89.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/90.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/91.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/92.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/93.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/94.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/95.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/96.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/97.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/98.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/99.png delete mode 100644 src/resources/assets/miscutils/textures/items/ion/IonBase.png delete mode 100644 src/resources/assets/miscutils/textures/items/item.empty.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemAirFilter.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemAlkalusDisk.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemAmulet.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBackpack.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBasicTurbine.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBelt.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBigEgg.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBlueprint.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBoilerChassis.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBolt.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBook.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBoots.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBottle.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBread.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemBufferCore.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemCell.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemCellPlasma.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemCell_Overlay.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemCentidust.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemDecidust.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemDefault.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemDehydratorCoil.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemDroplet.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemEnergeticShaft.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemFiber.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemFineWire.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemFireStarter.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemGear.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemGem.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHatTinFoil.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHeavyPlate.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHeliumBlob.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHelmet.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemHydrogenBlob.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemIngot.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemIngotHot.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemIridiumShaft.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemKey.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemKeyBig.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemKeyGold.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemLavaFilter.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemMushroom.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemMushroomRed.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemNugget.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPickaxe.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPineapple.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPlate.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPlateDouble.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPlatebody.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPlatelegs.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPotion.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPotionBlack.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemPotionRed.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemRing.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemRingWearable.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemRod.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemRodLong.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemRope.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemRotor.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemSandstoneHammer.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemScrew.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemShard.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemShovel.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemSmallSpring.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemSpring.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemStaballoyAxe.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemStickyRubber.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemSword.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemTablet.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemUltimetShaft.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemVibrantShaft.png delete mode 100644 src/resources/assets/miscutils/textures/items/itemWaterBottle.png delete mode 100644 src/resources/assets/miscutils/textures/items/material/DustBlizz.png delete mode 100644 src/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/items/material/DustCryotheum.png delete mode 100644 src/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png delete mode 100644 src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta delete mode 100644 src/resources/assets/miscutils/textures/items/material/RodBlizz.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/0.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/10.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/11.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/12.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/13.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/14.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/15.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/16.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/17.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/18.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/19.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/20.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/21.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/22.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/23.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/24.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/7.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/8.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/9.PNG delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/10.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/11.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/12.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/13.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/14.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/15.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/16.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/17.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/18.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/19.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/20.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/21.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/22.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/23.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/24.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/particle/new/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/personalCloakingDevice.png delete mode 100644 src/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png delete mode 100644 src/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png delete mode 100644 src/resources/assets/miscutils/textures/items/research/note.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/Atom.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png delete mode 100644 src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png delete mode 100644 src/resources/assets/miscutils/textures/items/spawn_egg.png delete mode 100644 src/resources/assets/miscutils/textures/items/spawn_egg_overlay.png delete mode 100644 src/resources/assets/miscutils/textures/items/token/0.png delete mode 100644 src/resources/assets/miscutils/textures/items/token/1.png delete mode 100644 src/resources/assets/miscutils/textures/items/token/2.png delete mode 100644 src/resources/assets/miscutils/textures/items/token/3.png delete mode 100644 src/resources/assets/miscutils/textures/items/token/4.png delete mode 100644 src/resources/assets/miscutils/textures/models/TinFoil.png delete mode 100644 src/resources/assets/miscutils/textures/space/RocketGui.png delete mode 100644 src/resources/assets/miscutils/textures/space/hd10180/A.png delete mode 100644 src/resources/assets/miscutils/textures/space/hd10180/B.png delete mode 100644 src/resources/assets/miscutils/textures/space/hd10180/C.png delete mode 100644 src/resources/assets/miscutils/textures/space/hd10180/D.png delete mode 100644 src/resources/assets/spiceoflife/lang/de_DE.lang delete mode 100644 src/resources/assets/spiceoflife/lang/en_US.lang delete mode 100644 src/resources/assets/spiceoflife/lang/es_ES.lang delete mode 100644 src/resources/assets/spiceoflife/lang/fr_FR.lang delete mode 100644 src/resources/assets/spiceoflife/lang/it_IT.lang delete mode 100644 src/resources/assets/spiceoflife/lang/ko_KR.lang delete mode 100644 src/resources/assets/spiceoflife/lang/ru_RU.lang delete mode 100644 src/resources/assets/spiceoflife/lang/zh_CN.lang delete mode 100644 src/resources/assets/spiceoflife/textures/items/foodcrate.png delete mode 100644 src/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png delete mode 100644 src/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png delete mode 100644 src/resources/assets/stevescarts/lang/en_US.lang delete mode 100644 src/resources/assets/stevescarts/lang/zh_CN.lang delete mode 100644 src/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png delete mode 100644 src/resources/mcmod.info (limited to 'src') diff --git a/src/Java/gregtech/api/enums/TAE.java b/src/Java/gregtech/api/enums/TAE.java deleted file mode 100644 index e8fd31d89e..0000000000 --- a/src/Java/gregtech/api/enums/TAE.java +++ /dev/null @@ -1,139 +0,0 @@ -package gregtech.api.enums; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.HashSet; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class TAE { - - //TAE stands for Texture Array Expansion. - - public static int gtPPLastUsedIndex = 64; - public static int secondaryIndex = 0; - - public static HashMap mTAE = new HashMap(); - private static final HashSet mFreeSlots = new HashSet(64); - - static { - for (int i=64;i<128;i++) { - mFreeSlots.add(i); - } - Logger.INFO("Initialising TAE."); - } - - /** - * - * @param aPage - The Texture page (0-3) - * @param aID - The ID on the specified page (0-15) - * @param gt_CopiedBlockTexture - The Texture to register - * @return - Did it register correctly? - */ - public static boolean registerTexture(int aPage, int aID, GT_CopiedBlockTexture gt_CopiedBlockTexture) { - int aRealID = aID + (aPage * 16); - return registerTexture(64 + aRealID, gt_CopiedBlockTexture); - } - - public static boolean registerTexture(int aID, GT_CopiedBlockTexture gt_CopiedBlockTexture) { - if (mFreeSlots.contains(aID)) { - mFreeSlots.remove(aID); - mTAE.put(aID, gt_CopiedBlockTexture); - return true; - } - else { - CORE.crash("Tried to register texture with ID "+aID+" to TAE, but it is already in use."); - return false; // Dead Code - } - } - - public static void finalizeTAE() { - String aFreeSpaces = ""; - AutoMap aTemp = new AutoMap(mFreeSlots); - for (int i = 0; i < mFreeSlots.size() ; i++) { - aFreeSpaces += aTemp.get(i); - if (i != (mFreeSlots.size() - 1)) { - aFreeSpaces += ", "; - } - } - Logger.INFO("Free Indexes within TAE: "+aFreeSpaces); - Logger.INFO("Filling them with ERROR textures."); - for (int aFreeSlot : aTemp.values()) { - registerTexture(aFreeSlot, new GT_CopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15)); - } - Logger.INFO("Finalising TAE."); - for (int aKeyTae : mTAE.keySet()) { - Textures.BlockIcons.setCasingTextureForId(aKeyTae, mTAE.get(aKeyTae)); - } - Logger.INFO("Finalised TAE."); - } - - private static boolean registerTextures(GT_CopiedBlockTexture gt_CopiedBlockTexture) { - try { - //Handle page 2. - Logger.INFO("[TAE} Registering Texture, Last used casing ID is "+gtPPLastUsedIndex+"."); - if (gtPPLastUsedIndex >= 128) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) { - Field x = ReflectionUtils.getField(Textures.BlockIcons.class, "casingTexturePages"); - if (x != null) { - ITexture[][] h = (ITexture[][]) x.get(null); - if (h != null) { - h[64][secondaryIndex++] = gt_CopiedBlockTexture; - x.set(null, h); - Logger.INFO("[TAE} Registered Texture with ID "+(secondaryIndex-1)+" in secondary index."); - return true; - } - } - } - } - - //set to page 1. - else { - Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, gt_CopiedBlockTexture); - Logger.INFO("[TAE} Registered Texture with ID "+(gtPPLastUsedIndex)+" in main index."); - gtPPLastUsedIndex++; - return true; - } - } - catch (Throwable t) { - t.printStackTrace(); - } - Logger.INFO("[TAE} Failed to register texture, Last used casing ID is "+gtPPLastUsedIndex+"."); - return false; - } - - public static ITexture getTexture(int index){ - if (gtPPLastUsedIndex >= 128) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) { - return Textures.BlockIcons.getCasingTextureForId(((64*128)+index)); - } - } - return Textures.BlockIcons.getCasingTextureForId((64+index)); - } - - public static int GTPP_INDEX(int ID){ - - if (ID >= 64) { - if (gtPPLastUsedIndex >= 128) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) { - return (128+ID); - } - } - } - return (64+ID); - } - - public static int getIndexFromPage(int page, int blockMeta) { - int id = 64; - id += (page == 0 ? 0 : page == 1 ? 16 : page == 2 ? 32 : page == 3 ? 48 : page == 4 ? 64 : 0); - id += blockMeta; - return id; - } -} diff --git a/src/Java/gregtech/api/util/EmptyRecipeMap.java b/src/Java/gregtech/api/util/EmptyRecipeMap.java deleted file mode 100644 index 31e1e3db17..0000000000 --- a/src/Java/gregtech/api/util/EmptyRecipeMap.java +++ /dev/null @@ -1,51 +0,0 @@ -package gregtech.api.util; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; - -import net.minecraftforge.fluids.FluidStack; - -public class EmptyRecipeMap extends GT_Recipe_Map{ - - public EmptyRecipeMap(Collection aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, - aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, - aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); - - } - - @Override - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return null; - - } - - @Override - public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return null; - } - - @Override - public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return null; - } - - @Override - public GT_Recipe addRecipe(GT_Recipe aRecipe) { - return null; - } - - @Override - protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { - return null; - } - - @Override - public GT_Recipe add(GT_Recipe aRecipe) { - return null; - } - -} diff --git a/src/Java/gregtech/api/util/FishPondFakeRecipe.java b/src/Java/gregtech/api/util/FishPondFakeRecipe.java deleted file mode 100644 index bc7cdb4701..0000000000 --- a/src/Java/gregtech/api/util/FishPondFakeRecipe.java +++ /dev/null @@ -1,80 +0,0 @@ -package gregtech.api.util; - -import java.util.ArrayList; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomFishable; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraftforge.common.FishingHooks; -import net.minecraftforge.fluids.FluidStack; - -public class FishPondFakeRecipe { - - public static ArrayList fish = new ArrayList(); - public static ArrayList junk = new ArrayList(); - public static ArrayList treasure = new ArrayList(); - - @SuppressWarnings("unchecked") - public static boolean generateFishPondRecipes() { - - try { - fish = (ArrayList) ReflectionUtils.getField(FishingHooks.class, "fish").get(null); - junk = (ArrayList) ReflectionUtils.getField(FishingHooks.class, "junk").get(null); - treasure = (ArrayList) ReflectionUtils.getField(FishingHooks.class, "treasure").get(null); - } - catch (IllegalArgumentException | IllegalAccessException e) { - Logger.INFO("Error generating Fish Pond Recipes. [1]"); - e.printStackTrace(); - } - - AutoMap> mega = new AutoMap>(); - mega.put(fish); - mega.put(junk); - mega.put(treasure); - - int mType = 14; - for (ArrayList f : mega.values()) { - for (int e=0;e mHashMap = new AutoMap(); - - public GTPP_Recipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecialItems, final int[] aChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - super(aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); - //Logger.SPECIFIC_WARNING(this.getClass().getName()+" | [GregtechRecipe]", "Created new recipe instance for "+ItemUtils.getArrayStackNames(aInputs), 167); - mRecipeHash = getRecipeHash(this); - mHashMap.addAll(convertStringDataToInts(getEncodedRecipeData(this))); - } - - public GTPP_Recipe(final ItemStack aInput1, final ItemStack aOutput1, final int aFuelValue, final int aType) { - this(aInput1, aOutput1, null, null, null, aFuelValue, aType); - } - - private static AutoMap convertStringDataToInts(AutoMap aData){ - AutoMap aMap = new AutoMap(); - for (String string : aData) { - aMap.add(string.hashCode()); - } - return aMap; - } - - private static AutoMap getEncodedRecipeData(GTPP_Recipe aRecipe){ - AutoMap aData = new AutoMap(); - aData.add(aRecipe.mRecipeHash); - aData.add(""+aRecipe.mCanBeBuffered); - aData.add(""+aRecipe.mHidden); - aData.add(""+aRecipe.mEnabled); - aData.add(""+aRecipe.mDuration); - aData.add(""+aRecipe.mEUt); - aData.add(""+aRecipe.mFakeRecipe); - aData.add(""+aRecipe.mSpecialItems); - aData.add(aRecipe.mChances.toString()); - aData.add(aRecipe.mInputs.toString()); - aData.add(aRecipe.mOutputs.toString()); - aData.add(aRecipe.mFluidInputs.toString()); - aData.add(aRecipe.mFluidOutputs.toString()); - return aData; - } - - public static String getRecipeHash(GT_Recipe aRecipe) { - String aEncoderString = aRecipe.toString(); - return aEncoderString; - } - - private final void checkModified() { - if (hasBeenModified()) { - CORE.crash("Someone has edited an internal GT++ recipe, which is no longer allowed. Please complain to whoever has done this, not Alkalus."); - } - } - - private final boolean hasBeenModified() { - String aEncoderString = this.toString(); - boolean aBasicHashCheck = mRecipeHash.equals(aEncoderString); - if (!aBasicHashCheck) { - Logger.INFO("This Recipe Hash: "+aEncoderString); - Logger.INFO("Expected Hash Code: "+mRecipeHash); - return true; - } - AutoMap aData = new AutoMap(); - aData.addAll(convertStringDataToInts(getEncodedRecipeData(this))); - long aHashTotal = 0; - long aExpectedHashTotal = 0; - for (int a : aData) { - aHashTotal += a; - } - for (int a : mHashMap) { - aExpectedHashTotal += a; - } - if (aHashTotal != aExpectedHashTotal) { - Logger.INFO("This Recipe Hash: "+aEncoderString); - Logger.INFO("Expected Hash Code: "+mRecipeHash); - Logger.INFO("This Recipe Hash: "+aHashTotal); - Logger.INFO("Expected Hash Code: "+aExpectedHashTotal); - return true; - } - return false; - } - - // aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000! - public GTPP_Recipe(final ItemStack aInput1, final ItemStack aOutput1, final ItemStack aOutput2, final ItemStack aOutput3, final ItemStack aOutput4, final int aSpecialValue, final int aType) { - this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue)); - - Logger.WARNING("Switch case method for adding fuels"); - if ((this.mInputs.length > 0) && (aSpecialValue > 0)) { - switch (aType) { - // Diesel Generator - case 0: - Logger.WARNING("Added fuel "+aInput1.getDisplayName()+" is ROCKET FUEL - continuing"); - GTPP_Recipe_Map.sRocketFuels.addRecipe(this); - break; - // Gas Turbine - case 1: - GTPP_Recipe_Map.sGeoThermalFuels.addRecipe(this); - break; - // Thermal Generator - case 2: - GTPP_Recipe_Map.sRTGFuels.addRecipe(this); - break; - // Plasma Generator - case 4: - //Gregtech_Recipe_Map.sPlasmaFuels.addRecipe(this); - break; - // Magic Generator - case 5: - //Gregtech_Recipe_Map.sMagicFuels.addRecipe(this); - break; - // Fluid Generator. Usually 3. Every wrong Type ends up in the Semifluid Generator - default: - //Gregtech_Recipe_Map.sDenseLiquidFuels.addRecipe(this); - break; - } - } - } - - //Custom Recipe Handlers - public GTPP_Recipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput, final int aDuration, final int aEUt) { - this(true, new ItemStack[]{aInput}, aOutput.clone(), null, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); - if ((this.mInputs.length > 0) && (this.mOutputs[0] != null)) { - GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(this); - } - } - - /*public GregtechRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) { - this(true, new ItemStack[]{aInput}, aOutput.clone(), null, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); - if (mInputs.length > 0 && mOutputs[0] != null) { - Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(this); - } - }*/ - - - public static void reInit() { - GT_Log.out.println("GT_Mod: Re-Unificating Recipes."); - for (final GTPP_Recipe_Map tMapEntry : GTPP_Recipe_Map.sMappings) { - //tMapEntry.reInit(); - if (tMapEntry != null && tMapEntry.mRecipeList != null && !tMapEntry.mRecipeList.isEmpty()) { - for (GT_Recipe aRecipe : tMapEntry.mRecipeList) { - checkRecipeOwnership(aRecipe); - } - } - } - for (final GTPP_Recipe_Map_Internal tMapEntry : GTPP_Recipe_Map_Internal.sMappingsEx) { - //tMapEntry.reInit(); - if (tMapEntry != null && tMapEntry.mRecipeList != null && !tMapEntry.mRecipeList.isEmpty()) { - for (GT_Recipe aRecipe : tMapEntry.mRecipeList) { - checkRecipeOwnership(aRecipe); - } - } - } - } - - private final static boolean checkRecipeOwnership(GT_Recipe aRecipe) { - if (aRecipe != null && aRecipe instanceof GTPP_Recipe) { - GTPP_Recipe nRecipe = (GTPP_Recipe) aRecipe; - GTPP_Recipe_Map_Internal.mHashedRecipes.put(nRecipe.hashCode(), nRecipe); - return true; - } - return false; - } - - public final static void checkRecipeModifications() { - for (GTPP_Recipe aRecipe : GTPP_Recipe_Map_Internal.mHashedRecipes.values()) { - Logger.INFO("Checking recipe: "+aRecipe.hashCode()); - aRecipe.checkModified(); - } - } - - @Override - public ItemStack getRepresentativeInput(final int aIndex) { - if ((aIndex < 0) || (aIndex >= this.mInputs.length)) { - return null; - } - return GT_Utility.copy(this.mInputs[aIndex]); - } - - @Override - public ItemStack getOutput(final int aIndex) { - if ((aIndex < 0) || (aIndex >= this.mOutputs.length)) { - return null; - } - return GT_Utility.copy(this.mOutputs[aIndex]); - } - - @Override - public int getOutputChance(final int aIndex) { - if ((aIndex < 0) || (aIndex >= this.mChances.length)) { - return 10000; - } - return this.mChances[aIndex]; - } - - @Override - public FluidStack getRepresentativeFluidInput(final int aIndex) { - if ((aIndex < 0) || (aIndex >= this.mFluidInputs.length) || (this.mFluidInputs[aIndex] == null)) { - return null; - } - return this.mFluidInputs[aIndex].copy(); - } - - @Override - public FluidStack getFluidOutput(final int aIndex) { - if ((aIndex < 0) || (aIndex >= this.mFluidOutputs.length) || (this.mFluidOutputs[aIndex] == null)) { - return null; - } - return this.mFluidOutputs[aIndex].copy(); - } - - @Override - public boolean isRecipeInputEqual(final boolean aDecreaseStacksizeBySuccess, final FluidStack[] aFluidInputs, final ItemStack... aInputs) { - return this.isRecipeInputEqual(aDecreaseStacksizeBySuccess, false, aFluidInputs, aInputs); - } - - @Override - public boolean isRecipeInputEqual(final boolean aDecreaseStacksizeBySuccess, final boolean aDontCheckStackSizes, final FluidStack[] aFluidInputs, final ItemStack... aInputs) { - if ((this.mFluidInputs.length > 0) && (aFluidInputs == null)) { - return false; - } - for (final FluidStack tFluid : this.mFluidInputs) { - if (tFluid != null) { - boolean temp = true; - for (final FluidStack aFluid : aFluidInputs) { - if ((aFluid != null) && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || (aFluid.amount >= tFluid.amount))) { - temp = false; - break; - } - } - if (temp) { - return false; - } - } - } - - if ((this.mInputs.length > 0) && (aInputs == null)) { - return false; - } - - for (final ItemStack tStack : this.mInputs) { - if (tStack != null) { - boolean temp = true; - for (final ItemStack aStack : aInputs) { - if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true)) && (aDontCheckStackSizes || (aStack.stackSize >= tStack.stackSize))) { - temp = false; - break; - } - } - if (temp) { - return false; - } - } - } - - if (aDecreaseStacksizeBySuccess) { - if (aFluidInputs != null) { - for (final FluidStack tFluid : this.mFluidInputs) { - if (tFluid != null) { - for (final FluidStack aFluid : aFluidInputs) { - if ((aFluid != null) && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || (aFluid.amount >= tFluid.amount))) { - aFluid.amount -= tFluid.amount; - break; - } - } - } - } - } - - if (aInputs != null) { - for (final ItemStack tStack : this.mInputs) { - if (tStack != null) { - for (final ItemStack aStack : aInputs) { - if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true)) && (aDontCheckStackSizes || (aStack.stackSize >= tStack.stackSize))) { - aStack.stackSize -= tStack.stackSize; - break; - } - } - } - } - } - } - - return true; - } - - public static class GTPP_Recipe_Map_Internal extends GT_Recipe_Map { - - public static final Collection sMappingsEx = new ArrayList<>(); - private static final HashMap mHashedRecipes = new HashMap(); - - public GTPP_Recipe_Map_Internal(Collection aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); - GT_Recipe_Map.sMappings.remove(this); - GTPP_Recipe_Map_Internal.sMappingsEx.add(this); - } - - } - - public static class GTPP_Recipe_Map { - /** - * Contains all Recipe Maps - */ - public static final Collection sMappings = new ArrayList<>(); - //public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map(new HashSet(200), "gtpp.recipe.chemicalbath", "Chemical Bath", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true); - public static final GTPP_Recipe_Map_Internal sCokeOvenRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 1, 0, 1, E, 1, E, true, true); - public static final GTPP_Recipe_Map_Internal sMatterFab2Recipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.matterfab2", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Default", 9, 9, 0, 0, 1, E, 1, E, true, true); - //public static final Gregtech_Recipe_Map sMatterFabRecipes = new Gregtech_Recipe_Map(new HashSet(200), "gtpp.recipe.matterfab", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 3, 1, 1, 1, E, 1, E, true, true); - - public static final GT_Recipe_Map_Fuel sRocketFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gtpp.recipe.rocketenginefuel", "Rocket Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 3000, " EU", true, true); - - public static final GTPP_Recipe_Map_Internal sGeoThermalFuels = new GTPP_Recipe_Map_Internal(new HashSet(10), "gtpp.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - public static final GTPP_Recipe_Map_Internal sChemicalDehydratorRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.chemicaldehydrator", "Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true); - public static final GTPP_Recipe_Map_Internal sVacuumFurnaceRecipes = new GTPP_Recipe_Map_Internal(new HashSet(500), "gtpp.recipe.vacfurnace", "Vacuum Furnace", null, "gregtech:textures/gui/basicmachines/Default", 6, 6, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true); - public static final GTPP_Recipe_Map_Internal sAlloyBlastSmelterRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.alloyblastsmelter", "Alloy Blast Smelter", null, RES_PATH_GUI + "basicmachines/BlastSmelter", 9, 9, 1, 0, 1, E, 1, E, true, true); - public static final GTPP_Recipe_Map_Internal sSteamTurbineFuels = new GTPP_Recipe_Map_Internal(new HashSet(10), "gtpp.recipe.steamturbinefuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - - //LFTR recipes - public static final GTPP_Recipe_Map_Internal sLiquidFluorineThoriumReactorRecipes = new GTPP_Recipe_Map_Internal(new HashSet(50), "gtpp.recipe.lftr", "Liquid Fluoride Thorium Reactor", null, RES_PATH_GUI + "basicmachines/FissionFuel", 0, 0, 0, 2, 0, "Power: ", 1, " EU/t per Dynamo", true, true); - - // Ore Milling Map - public static final GTPP_Recipe_Map_Internal sOreMillRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.oremill", "Milling", null, RES_PATH_GUI + "basicmachines/LFTR", 3, 4, 1, 0, 1, E, 1, E, true, false); - - //Fission Fuel Plant Recipes - public static final GTPP_Recipe_Map_Internal sFissionFuelProcessing = new GTPP_Recipe_Map_Internal(new HashSet(50), "gtpp.recipe.fissionfuel", "Nuclear Fuel Processing", null, RES_PATH_GUI + "basicmachines/FissionFuel", 0, 0, 0, 0, 1, E, 1, E, true, false); - - //Cold Trap - public static final GTPP_Recipe_Map_Internal sColdTrapRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.coldtrap", "Cold Trap", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true); - - //Reactor Processing Unit - public static final GTPP_Recipe_Map_Internal sReactorProcessingUnitRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.reactorprocessingunit", "Reactor Processing Unit", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true); - - //Basic Washer Map - public static final GTPP_Recipe_Map_Internal sSimpleWasherRecipes = new GTPP_Recipe_Map_Internal(new HashSet(3), "gtpp.recipe.simplewasher", "Simple Dust Washer", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 1, 1, 0, 0, 1, E, 1, E, true, true); - - //public static final GT_Recipe_Map sSimpleWasherRecipes_FakeFuckBW = new GT_Recipe_Map(new HashSet(3), "gtpp.recipe.simplewasher", "Fuck you Bart", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 1, 1, 0, 0, 1, E, 1, E, true, false); - - public static final GTPP_Recipe_Map_Internal sChemicalPlantRecipes = new GTPP_Recipe_Map_Internal( - new HashSet(100), - "gtpp.recipe.fluidchemicaleactor", - "Chemical Plant", - null, - CORE.MODID+":textures/gui/FluidReactor", - 0, - 0, - 0, - 2, - 1, - "Tier: ", - 1, - E, - true, - false); - - - //RTG Fuel Map - public static final GT_Recipe.GT_Recipe_Map_Fuel sRTGFuels = new GTPP_Recipe.GT_Recipe_Map_Fuel( - new HashSet(10), "gtpp.recipe.RTGgenerators", "RTG", null, - "gregtech:textures/gui/basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 365, " Minecraft Days", true, true); - - //Thermal Boiler map - public static final GT_Recipe.GT_Recipe_Map_Fuel sThermalFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gtpp.recipe.thermalgeneratorfuel", - "Thermal Generator Fuel", null, "gregtech:textures/gui/basicmachines/Default", 1, 1, 0, 0, 1, - "Fuel Value: ", 1000, " EU", true, false); - - //Cyclotron recipe map - public static final GTPP_Recipe_Map_Internal sCyclotronRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.cyclotron", "COMET - Compact Cyclotron", null, RES_PATH_GUI + "basicmachines/BlastSmelter", 2, 16, 0, 0, 1, E, 1, E, true, true); - - //Advanced Mixer - public static final GTPP_Recipe_Map_Internal sAdvancedMixerRecipes = new GTPP_Recipe_Map_Internal(new HashSet(1000), "gtpp.recipe.advanced.mixer", - "Advanced Material Combiner", null, "gregtech:textures/gui/basicmachines/MixerAdvanced", 4, 4, 1, 0, 2, "", 1, "", true, true); - - - //Mini Fusion - public static final GTPP_Recipe_Map_Internal sSlowFusionRecipes = new GTPP_Recipe_Map_Internal(new HashSet(50), "gtpp.recipe.slowfusionreactor", - "Mimir - Slow Fusion", null, "gregtech:textures/gui/basicmachines/LFTR", 0, 0, 0, 2, 1, "Start: ", 1, - " EU", true, true); - - - //Component Assembler - public static final GT_Recipe_Map sComponentAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet(300), "gtpp.recipe.componentassembler", "Component Assembler", null, RES_PATH_GUI + "basicmachines/Assembler", 6, 1, 1, 0, 1, E, 1, E, true, true); - - //Special Maps for Multis - public static final GTPP_Recipe_Map_Internal sFishPondRecipes = new GTPP_Recipe_Map_Internal(new HashSet(3), "gtpp.recipe.fishpond", "Zhuhai - Fishing Port", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 1, 0, 0, 1, "Requires Circuit: ", 1, ".", true, true); - public static final GTPP_Recipe_Map_Internal sSpargeTowerRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.spargetower", "Sparging", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, E, 1, E, true, false); - - //public static final GTPP_Recipe_Map sMultiblockCentrifugeRecipes = new GT_Recipe_Map_LargeCentrifuge(); - //public static final GTPP_Recipe_Map sMultiblockElectrolyzerRecipes = new GT_Recipe_Map_LargeElectrolyzer(); - //public static final GTPP_Recipe_Map sAdvFreezerRecipes = new GT_Recipe_Map_AdvancedVacuumFreezer(); - - public static final GTPP_Recipe_Map_Internal sAdvFreezerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.cryogenicfreezer", "Cryogenic Freezer", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, "", 0, "", false, true); - public static final GTPP_Recipe_Map_Internal sMultiblockCentrifugeRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.multicentrifuge", "Multiblock Centrifuge", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, "", 0, "", false, true); - public static final GTPP_Recipe_Map_Internal sMultiblockElectrolyzerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.multielectro", "Multiblock Electrolyzer", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, "", 0, "", false, true); - public static final GTPP_Recipe_Map_Internal sChemicalPlant_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.temp4", "temp4", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 0, 0, 0, 0, "", 0, "", false, false); - public static final GTPP_Recipe_Map_Internal sMultiblockMixerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.multimixer", "Multiblock Mixer", null, RES_PATH_GUI + "basicmachines/FissionFuel", 12, 9, 0, 0, 1, "", 0, "", false, true); - - //Semi-Fluid Fuel Map - public static final GT_Recipe_Map_Fuel sSemiFluidLiquidFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gtpp.recipe.semifluidgeneratorfuels", "Semifluid Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); - - // Flotation Cell - public static final GTPP_Recipe_Map_Internal sFlotationCellRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.flotationcell", "Flotation Cell", null, RES_PATH_GUI + "basicmachines/LFTR", 6, 4, 1, 1, 1, "Ore Key: ", 1, E, true, false); - - - - - /** - * HashMap of Recipes based on their Items - */ - public final Map> mRecipeItemMap = new HashMap<>(); - /** - * HashMap of Recipes based on their Fluids - */ - public final Map> mRecipeFluidMap = new HashMap<>(); - /** - * The List of all Recipes - */ - public final Collection mRecipeList; - /** - * String used as an unlocalised Name. - */ - public final String mUnlocalizedName; - /** - * String used in NEI for the Recipe Lists. If null it will use the unlocalised Name instead - */ - public final String mNEIName; - /** - * GUI used for NEI Display. Usually the GUI of the Machine itself - */ - public final String mNEIGUIPath; - public final String mNEISpecialValuePre, mNEISpecialValuePost; - public final int mUsualInputCount, mUsualOutputCount, mNEISpecialValueMultiplier, mMinimalInputItems, mMinimalInputFluids, mAmperage; - public final boolean mNEIAllowed, mShowVoltageAmperageInNEI; - - /** - * Initialises a new type of Recipe Handler. - * - * @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a pre-initialised Size. - * @param aUnlocalizedName the unlocalised Name of this Recipe Handler, used mainly for NEI. - * @param aLocalName the displayed Name inside the NEI Recipe GUI. - * @param aNEIGUIPath the displayed GUI Texture, usually just a Machine GUI. Auto-Attaches ".png" if forgotten. - * @param aUsualInputCount the usual amount of Input Slots this Recipe Class has. - * @param aUsualOutputCount the usual amount of Output Slots this Recipe Class has. - * @param aNEISpecialValuePre the String in front of the Special Value in NEI. - * @param aNEISpecialValueMultiplier the Value the Special Value is getting Multiplied with before displaying - * @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something. - * @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general. - */ - public GTPP_Recipe_Map(final Collection aRecipeList, - final String aUnlocalizedName, final String aLocalName, final String aNEIName, - final String aNEIGUIPath, final int aUsualInputCount, - final int aUsualOutputCount, final int aMinimalInputItems, - final int aMinimalInputFluids, final int aAmperage, - final String aNEISpecialValuePre, final int aNEISpecialValueMultiplier, - final String aNEISpecialValuePost, final boolean aShowVoltageAmperageInNEI, - final boolean aNEIAllowed) { - sMappings.add(this); - this.mNEIAllowed = aNEIAllowed; - this.mShowVoltageAmperageInNEI = aShowVoltageAmperageInNEI; - this.mRecipeList = aRecipeList; - this.mNEIName = aNEIName == null ? aUnlocalizedName : aNEIName; - this.mNEIGUIPath = aNEIGUIPath.endsWith(".png") ? aNEIGUIPath : aNEIGUIPath + ".png"; - this.mNEISpecialValuePre = aNEISpecialValuePre; - this.mNEISpecialValueMultiplier = aNEISpecialValueMultiplier; - this.mNEISpecialValuePost = aNEISpecialValuePost; - this.mAmperage = aAmperage; - this.mUsualInputCount = aUsualInputCount; - this.mUsualOutputCount = aUsualOutputCount; - this.mMinimalInputItems = aMinimalInputItems; - this.mMinimalInputFluids = aMinimalInputFluids; - GregTech_API.sFluidMappings.add(this.mRecipeFluidMap); - GregTech_API.sItemStackMappings.add(this.mRecipeItemMap); - GT_LanguageManager.addStringLocalization(this.mUnlocalizedName = aUnlocalizedName, aLocalName); - } - - public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return this.addRecipe(new GTPP_Recipe(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - - public GTPP_Recipe addRecipe(final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return this.addRecipe(new GTPP_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false); - } - - public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return this.addRecipe(new GTPP_Recipe(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - - public GTPP_Recipe addRecipe(final boolean aOptimize, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return this.addRecipe(new GTPP_Recipe(aOptimize, null, null, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - - /*public GregtechRecipe addRecipe(boolean aOptimize, FluidStack aInput1, FluidStack aOutput1, ItemStack[] bInput1, ItemStack[] bOutput1, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe(new GregtechRecipe(aOptimize, aInput1, aOutput1, bInput1,bOutput1, aDuration, aEUt, aSpecialValue)); - - }*/ - - public GTPP_Recipe addRecipe(final GTPP_Recipe aRecipe) { - Logger.WARNING("Adding Recipe Method 1"); - return this.addRecipe(aRecipe, true, false, false); - } - - protected GTPP_Recipe addRecipe(final GTPP_Recipe aRecipe, final boolean aCheckForCollisions, final boolean aFakeRecipe, final boolean aHidden) { - Logger.WARNING("Adding Recipe Method 2 - This Checks if hidden, fake or if duplicate recipes exists, I think."); - aRecipe.mHidden = aHidden; - aRecipe.mFakeRecipe = aFakeRecipe; - Logger.WARNING("Logging some data about this method: GregtechRecipe["+aRecipe.toString()+"] | aCheckForCollisions["+aCheckForCollisions+"] | aFakeRecipe["+aFakeRecipe+"] | aHidden["+aHidden+"]"); - Logger.WARNING("Logging some data about this method: mMinimalInputFluids["+this.mMinimalInputFluids+"] | mMinimalInputItems["+this.mMinimalInputItems+"] | aRecipe.mFluidInputs.length["+aRecipe.mFluidInputs.length+"] | aRecipe.mInputs.length["+aRecipe.mInputs.length+"]"); - if ((aRecipe.mFluidInputs.length < this.mMinimalInputFluids) && (aRecipe.mInputs.length < this.mMinimalInputItems)){ - Logger.WARNING("Step 2 failed"); - return null;} - - Logger.WARNING("Logging some data about this method: aCheckForCollisions["+aCheckForCollisions+"] | findRecipe != null ["+(this.findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null)+"]"); - if (aCheckForCollisions && (this.findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null)){ - Logger.WARNING("Step 2 failed - 2"); - return null; - } - return this.add(aRecipe); - } - - - - /** - * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes - */ - public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return this.addFakeRecipe(aCheckForCollisions, new GTPP_Recipe(false, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - - /** - * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes - */ - public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return this.addFakeRecipe(aCheckForCollisions, new GTPP_Recipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); - } - - /** - * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes - */ - public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final GTPP_Recipe aRecipe) { - return this.addRecipe(aRecipe, aCheckForCollisions, true, false); - } - - public GTPP_Recipe add(final GTPP_Recipe aRecipe) { - Logger.WARNING("Adding Recipe Method 3"); - this.mRecipeList.add(aRecipe); - for (final FluidStack aFluid : aRecipe.mFluidInputs) { - if (aFluid != null) { - Logger.WARNING("Fluid is valid - getting some kind of fluid instance to add to the recipe hashmap."); - Collection tList = this.mRecipeFluidMap.get(aFluid.getFluid()); - if (tList == null) { - this.mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<>(1)); - } - tList.add(aRecipe); - } - } - return this.addToItemMap(aRecipe); - } - - public void reInit() { - final Map> tMap = this.mRecipeItemMap; - if (tMap != null) { - tMap.clear(); - } - for (final GTPP_Recipe tRecipe : this.mRecipeList) { - GT_OreDictUnificator.setStackArray(true, tRecipe.mInputs); - GT_OreDictUnificator.setStackArray(true, tRecipe.mOutputs); - if (tMap != null) { - this.addToItemMap(tRecipe); - } - } - } - - /** - * @return if this Item is a valid Input for any for the Recipes - */ - public boolean containsInput(final ItemStack aStack) { - return (aStack != null) && (this.mRecipeItemMap.containsKey(new GT_ItemStack(aStack)) || this.mRecipeItemMap.containsKey(new GT_ItemStack(GT_Utility.copyMetaData(W, aStack)))); - } - - /** - * @return if this Fluid is a valid Input for any for the Recipes - */ - public boolean containsInput(final FluidStack aFluid) { - return (aFluid != null) && this.containsInput(aFluid.getFluid()); - } - - /** - * @return if this Fluid is a valid Input for any for the Recipes - */ - public boolean containsInput(final Fluid aFluid) { - return (aFluid != null) && this.mRecipeFluidMap.containsKey(aFluid); - } - - public GTPP_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs); - } - - public GTPP_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GTPP_Recipe aRecipe, final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, null, aInputs); - } - - /** - * finds a Recipe matching the aFluid and ItemStack Inputs. - * - * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup. - * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up. - * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs - * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage - * @param aFluids the Fluid Inputs - * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do. - * @param aInputs the Item Inputs - * @return the Recipe it has found or null for no matching Recipe - */ - public GTPP_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GTPP_Recipe aRecipe, final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, final ItemStack aSpecialSlot, ItemStack... aInputs) { - // No Recipes? Well, nothing to be found then. - if (this.mRecipeList.isEmpty()) { - return null; - } - - // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes. - // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes. - if (GregTech_API.sPostloadFinished) { - if (this.mMinimalInputFluids > 0) { - if (aFluids == null) { - return null; - } - int tAmount = 0; - for (final FluidStack aFluid : aFluids) { - if (aFluid != null) { - tAmount++; - } - } - if (tAmount < this.mMinimalInputFluids) { - return null; - } - } - if (this.mMinimalInputItems > 0) { - if (aInputs == null) { - return null; - } - int tAmount = 0; - for (final ItemStack aInput : aInputs) { - if (aInput != null) { - tAmount++; - } - } - if (tAmount < this.mMinimalInputItems) { - return null; - } - } - } - - // Unification happens here in case the Input isn't already unificated. - if (aNotUnificated) { - aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); - } - - // Check the Recipe which has been used last time in order to not have to search for it again, if possible. - if (aRecipe != null) { - if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return aRecipe.mEnabled && ((aVoltage * this.mAmperage) >= aRecipe.mEUt) ? aRecipe : null; - } - } - - // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. - if ((this.mUsualInputCount > 0) && (aInputs != null)) { - for (final ItemStack tStack : aInputs) { - if (tStack != null) { - Collection - tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(tStack)); - if (tRecipes != null) { - for (final GTPP_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; - } - } - } - tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack))); - if (tRecipes != null) { - for (final GTPP_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; - } - } - } - } - } - } - - // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too. - if ((this.mMinimalInputItems == 0) && (aFluids != null)) { - for (final FluidStack aFluid : aFluids) { - if (aFluid != null) { - final Collection - tRecipes = this.mRecipeFluidMap.get(aFluid.getFluid()); - if (tRecipes != null) { - for (final GTPP_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; - } - } - } - } - } - } - - // And nothing has been found. - return null; - } - - protected GTPP_Recipe addToItemMap(final GTPP_Recipe aRecipe) { - Logger.WARNING("Adding Recipe Method 4"); - for (final ItemStack aStack : aRecipe.mInputs) { - if (aStack != null) { - Logger.WARNING("Method 4 - Manipulating "+aStack.getDisplayName()); - final GT_ItemStack tStack = new GT_ItemStack(aStack); - Logger.WARNING("Method 4 - Made gt stack of item "+tStack.toStack().getDisplayName()); - Collection tList = this.mRecipeItemMap.get(tStack); - if (tList != null){ - Logger.WARNING("Method 4 - Gt Recipe Hashmap: "+tList.toString()); - } - if (tList == null){ - Logger.WARNING("Method 4 - brrr list was NUll"); - this.mRecipeItemMap.put(tStack, tList = new HashSet<>(1)); - Logger.WARNING("Method 4 - Attemping backup method for Gt Recipe Hashmap:"); - - while (tList.iterator().hasNext()){ - Logger.WARNING(tList.iterator().next().toString()); - } - - } - tList.add(aRecipe); - Logger.WARNING("Method 4 - Added recipe to map? I think."); - } - } - return aRecipe; - } - - public GTPP_Recipe findRecipe(final IGregTechTileEntity baseMetaTileEntity, final GTPP_Recipe aRecipe, final boolean aNotUnificated, - final long aVoltage, final FluidStack[] aFluids, final FluidStack[] fluidStacks) { - - ItemStack aInputs[] = null; - // No Recipes? Well, nothing to be found then. - if (this.mRecipeList.isEmpty()) { - return null; - } - - // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes. - // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes. - if (GregTech_API.sPostloadFinished) { - if (this.mMinimalInputFluids > 0) { - if (aFluids == null) { - return null; - } - int tAmount = 0; - for (final FluidStack aFluid : aFluids) { - if (aFluid != null) { - tAmount++; - } - } - if (tAmount < this.mMinimalInputFluids) { - return null; - } - } - if (this.mMinimalInputItems > 0) { - if (aInputs == null) { - return null; - } - int tAmount = 0; - for (final ItemStack aInput : aInputs) { - if (aInput != null) { - tAmount++; - } - } - if (tAmount < this.mMinimalInputItems) { - return null; - } - } - } - - // Unification happens here in case the Input isn't already unificated. - if (aNotUnificated) { - aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); - } - - // Check the Recipe which has been used last time in order to not have to search for it again, if possible. - if (aRecipe != null) { - if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return aRecipe.mEnabled && ((aVoltage * this.mAmperage) >= aRecipe.mEUt) ? aRecipe : null; - } - } - - // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. - if ((this.mUsualInputCount > 0) && (aInputs != null)) { - for (final ItemStack tStack : aInputs) { - if (tStack != null) { - Collection - tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(tStack)); - if (tRecipes != null) { - for (final GTPP_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; - } - } - } - tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack))); - if (tRecipes != null) { - for (final GTPP_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; - } - } - } - } - } - } - - // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too. - if ((this.mMinimalInputItems == 0) && (aFluids != null)) { - for (final FluidStack aFluid : aFluids) { - if (aFluid != null) { - final Collection - tRecipes = this.mRecipeFluidMap.get(aFluid.getFluid()); - if (tRecipes != null) { - for (final GTPP_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { - return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; - } - } - } - } - } - } - - // And nothing has been found. - return null; - } - } - - // ----------------------------------------------------------------------------------------------------------------- - // Here are a few Classes I use for Special Cases in some Machines without having to write a separate Machine Class. - // ----------------------------------------------------------------------------------------------------------------- - - /** - * Abstract Class for general Recipe Handling of non GT Recipes - */ - public static abstract class GT_Recipe_Map_NonGTRecipes extends GTPP_Recipe_Map { - public GT_Recipe_Map_NonGTRecipes(final Collection aRecipeList, final String aUnlocalizedName, final String aLocalName, final String aNEIName, final String aNEIGUIPath, final int aUsualInputCount, final int aUsualOutputCount, final int aMinimalInputItems, final int aMinimalInputFluids, final int aAmperage, final String aNEISpecialValuePre, final int aNEISpecialValueMultiplier, final String aNEISpecialValuePost, final boolean aShowVoltageAmperageInNEI, final boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); - } - - @Override - public boolean containsInput(final ItemStack aStack) { - return false; - } - - @Override - public boolean containsInput(final FluidStack aFluid) { - return false; - } - - @Override - public boolean containsInput(final Fluid aFluid) { - return false; - } - - @Override - public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return null; - } - - @Override - public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return null; - } - - @Override - public GTPP_Recipe addRecipe(final GTPP_Recipe aRecipe) { - return null; - } - - @Override - public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return null; - } - - @Override - public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { - return null; - } - - @Override - public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final GTPP_Recipe aRecipe) { - return null; - } - - @Override - public GTPP_Recipe add(final GTPP_Recipe aRecipe) { - return null; - } - - @Override - public void reInit() {/**/} - - @Override - protected GTPP_Recipe addToItemMap(final GTPP_Recipe aRecipe) { - return null; - } - } - - /** - * Just a Recipe Map with Utility specifically for Fuels. - */ - public static class Gregtech_Recipe_Map_Fuel extends GTPP_Recipe_Map { - public Gregtech_Recipe_Map_Fuel(final Collection aRecipeList, final String aUnlocalizedName, final String aLocalName, final String aNEIName, final String aNEIGUIPath, final int aUsualInputCount, final int aUsualOutputCount, final int aMinimalInputItems, final int aMinimalInputFluids, final int aAmperage, final String aNEISpecialValuePre, final int aNEISpecialValueMultiplier, final String aNEISpecialValuePost, final boolean aShowVoltageAmperageInNEI, final boolean aNEIAllowed) { - super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); - } - - public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final int aFuelValueInEU) { - Logger.WARNING("Adding Fuel using method 1"); - return this.addFuel(aInput, aOutput, null, null, 10000, aFuelValueInEU); - } - - public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final int aChance, final int aFuelValueInEU) { - Logger.WARNING("Adding Fuel using method 2"); - return this.addFuel(aInput, aOutput, null, null, aChance, aFuelValueInEU); - } - - public GTPP_Recipe addFuel(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aFuelValueInEU) { - Logger.WARNING("Adding Fuel using method 3"); - return this.addFuel(null, null, aFluidInput, aFluidOutput, 10000, aFuelValueInEU); - } - - public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aFuelValueInEU) { - Logger.WARNING("Adding Fuel using method 4"); - return this.addFuel(aInput, aOutput, aFluidInput, aFluidOutput, 10000, aFuelValueInEU); - } - - public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aChance, final int aFuelValueInEU) { - Logger.WARNING("Adding Fuel using method 5"); - return this.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, 0, 0, aFuelValueInEU); - } - } - - public ArrayList getInputPositionedStacks() { - return null; - } - - public ArrayList getOutputPositionedStacks() { - return null; - } - - public int compareTo(GTPP_Recipe recipe) { - // first lowest tier recipes - // then fastest - // then with lowest special value - // then dry recipes - // then with fewer inputs - if (this.mEUt != recipe.mEUt) { - return this.mEUt - recipe.mEUt; - } else if (this.mDuration != recipe.mDuration) { - return this.mDuration - recipe.mDuration; - } else if (this.mSpecialValue != recipe.mSpecialValue) { - return this.mSpecialValue - recipe.mSpecialValue; - } else if (this.mFluidInputs.length != recipe.mFluidInputs.length) { - return this.mFluidInputs.length - recipe.mFluidInputs.length; - } else if (this.mInputs.length != recipe.mInputs.length) { - return this.mInputs.length - recipe.mInputs.length; - } - return 0; - } - - public int compareTo(GT_Recipe recipe) { - // first lowest tier recipes - // then fastest - // then with lowest special value - // then dry recipes - // then with fewer inputs - if (this.mEUt != recipe.mEUt) { - return this.mEUt - recipe.mEUt; - } else if (this.mDuration != recipe.mDuration) { - return this.mDuration - recipe.mDuration; - } else if (this.mSpecialValue != recipe.mSpecialValue) { - return this.mSpecialValue - recipe.mSpecialValue; - } else if (this.mFluidInputs.length != recipe.mFluidInputs.length) { - return this.mFluidInputs.length - recipe.mFluidInputs.length; - } else if (this.mInputs.length != recipe.mInputs.length) { - return this.mInputs.length - recipe.mInputs.length; - } - return 0; - } - -} diff --git a/src/Java/gregtech/api/util/GasSpargingRecipe.java b/src/Java/gregtech/api/util/GasSpargingRecipe.java deleted file mode 100644 index 493c31dc65..0000000000 --- a/src/Java/gregtech/api/util/GasSpargingRecipe.java +++ /dev/null @@ -1,99 +0,0 @@ -package gregtech.api.util; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.data.ArrayUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import net.minecraftforge.fluids.FluidStack; - -public class GasSpargingRecipe implements Comparable { - - public final FluidStack mInputGas; - public final FluidStack mInputSpentFuel; - public final FluidStack mOutputSpargedFuel; - public final int[] mMaxOutputQuantity; - public final FluidStack[] mFluidInputs; - public final FluidStack[] mFluidOutputs; - public final int mDuration; - public final int mEUt; - - public GasSpargingRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel, FluidStack aSpargedFuel, FluidStack[] aOutputs, int[] aMaxOutputQuantity) { - mInputGas = aSpargeGas; - mInputSpentFuel = aSpentFuel; - mOutputSpargedFuel = aSpargedFuel; - mFluidInputs = new FluidStack[] {mInputGas, mInputSpentFuel}; - aOutputs = ArrayUtils.insertElementAtIndex(aOutputs, 0, aSpargeGas); - aOutputs = ArrayUtils.insertElementAtIndex(aOutputs, 1, aSpargedFuel); - mFluidOutputs = aOutputs; - mMaxOutputQuantity = aMaxOutputQuantity; - mDuration = 20 * 60 * 5; - mEUt = MaterialUtils.getVoltageForTier(3); - } - - @Override - public boolean equals(Object o) { - if (o instanceof GasSpargingRecipe) { - GasSpargingRecipe i = (GasSpargingRecipe) o; - if (this.mInputGas.equals(i.mInputGas) && this.mInputSpentFuel.equals(i.mInputSpentFuel)) { - return true; - } - } - return false; - } - - public int getMaxOutput(int aIndex) { - if (aIndex == 0) { - return mInputGas.amount * 100; - } - else if (aIndex == 1) { - return mOutputSpargedFuel.amount * 100; - } - aIndex -= 2; - if ((aIndex < 0) || (aIndex >= this.mMaxOutputQuantity.length)) { - return 10000; - } - return this.mMaxOutputQuantity[aIndex]; - } - - public boolean isValid() { - if (mInputGas == null || mInputGas.amount <= 0 || - mInputSpentFuel == null || mInputSpentFuel.amount <= 0 || - mFluidOutputs == null || mFluidOutputs.length < 1 || - mMaxOutputQuantity == null || mMaxOutputQuantity.length < 1 || - mFluidOutputs.length != mMaxOutputQuantity.length) { - return false; - } - return true; - } - - public boolean containsInputs(FluidStack aSpargeGas, FluidStack aSpentFuel) { - if (aSpargeGas != null && aSpargeGas.getFluid().equals(this.mInputGas.getFluid())) { - if (aSpentFuel != null && aSpentFuel.getFluid().equals(this.mInputSpentFuel.getFluid())) { - return true; - } - } - return false; - } - - @Override - public int compareTo(GasSpargingRecipe o) { - if (o.mFluidOutputs.length > this.mFluidOutputs.length) { - return 1; - } else if (o.mFluidOutputs.length == this.mFluidOutputs.length) { - return 0; - } else { - return -1; - } - } - - public String[] getRecipeInfo() { - AutoMap result = new AutoMap(); - result.put("Input "+ItemUtils.getArrayStackNames(mFluidInputs)); - result.put("Output "+ItemUtils.getArrayStackNames(mFluidOutputs)); - result.put("Duration: "+mDuration); - result.put("EU/t: "+mEUt); - String s[] = result.toArray(); - return s; - } - -} diff --git a/src/Java/gregtech/api/util/GasSpargingRecipeMap.java b/src/Java/gregtech/api/util/GasSpargingRecipeMap.java deleted file mode 100644 index 6e60cc7ac3..0000000000 --- a/src/Java/gregtech/api/util/GasSpargingRecipeMap.java +++ /dev/null @@ -1,48 +0,0 @@ -package gregtech.api.util; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraftforge.fluids.FluidStack; - -public class GasSpargingRecipeMap extends AutoMap{ - - public static final AutoMap mRecipes = new AutoMap(); - public static final String mUnlocalizedName = "gtpp.recipe.lftr.sparging"; - public static final String mNEIName = mUnlocalizedName; - public static final String mNEIDisplayName = "LFTR Gas Sparging"; - public static final String mNEIGUIPath = RES_PATH_GUI + "basicmachines/FissionFuel.png"; - - - public static boolean addRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel, FluidStack aSpargedFuel, FluidStack[] aOutputs, int[] aMaxOutputs) { - if (aSpargeGas == null || aSpargeGas.amount <= 0 || - aSpentFuel == null || aSpentFuel.amount <= 0 || - aSpargedFuel == null || aSpargedFuel.amount <= 0 || - aOutputs == null || aOutputs.length < 1 || - aMaxOutputs == null || aMaxOutputs.length < 1 || - aOutputs.length != aMaxOutputs.length) { - return false; - } - int aMapSize = mRecipes.size(); - GasSpargingRecipe aRecipe = new GasSpargingRecipe( - aSpargeGas, - aSpentFuel, - aSpargedFuel, - aOutputs, - aMaxOutputs - ); - mRecipes.put(aRecipe); - return mRecipes.size() > aMapSize; - } - - public static GasSpargingRecipe findRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel) { - for (GasSpargingRecipe aRecipe : mRecipes) { - if (aRecipe.containsInputs(aSpargeGas, aSpentFuel)) { - return aRecipe; - } - } - return null; - } -} - - diff --git a/src/Java/gregtech/api/util/HotFuel.java b/src/Java/gregtech/api/util/HotFuel.java deleted file mode 100644 index c9a6dcf7c5..0000000000 --- a/src/Java/gregtech/api/util/HotFuel.java +++ /dev/null @@ -1,28 +0,0 @@ -package gregtech.api.util; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public class HotFuel { - - public static void addNewHotFuel(FluidStack aInput1, FluidStack aOutput1, ItemStack[] outputItems, int[] chances, int aSpecialValue) { - GTPP_Recipe x = new GTPP_Recipe( - true, - null, - outputItems, - null, - chances, - new FluidStack[]{aInput1}, - new FluidStack[]{aOutput1}, - 1, //1 Tick - 0, //No Eu produced - aSpecialValue //Magic Number - ); - GTPP_Recipe.GTPP_Recipe_Map.sThermalFuels.addRecipe(x); - } - - - - -} diff --git a/src/Java/gregtech/api/util/SemiFluidFuelHandler.java b/src/Java/gregtech/api/util/SemiFluidFuelHandler.java deleted file mode 100644 index fa01ea9b5d..0000000000 --- a/src/Java/gregtech/api/util/SemiFluidFuelHandler.java +++ /dev/null @@ -1,117 +0,0 @@ -package gregtech.api.util; - -import static gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sSemiFluidLiquidFuels; - -import java.util.HashMap; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class SemiFluidFuelHandler { - - - public static boolean addSemiFluidFuel(ItemStack aFuelItem, int aFuelValue) { - FluidStack p = FluidContainerRegistry.getFluidForFilledItem(aFuelItem); - if (p != null && aFuelValue > 0) { - return addSemiFluidFuel(p, aFuelValue); - } else { - Logger.INFO("Fuel value for " + aFuelItem.getDisplayName() + " is <= 0, ignoring."); - } - return false; - } - - - public static boolean addSemiFluidFuel(FluidStack aFuel, int aFuelValue) { - FluidStack p = aFuel; - if (p != null && aFuelValue > 0) { - GT_Recipe aRecipe = - new GTPP_Recipe(true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] { p }, - null, - 0, - 0, - aFuelValue); - if (aRecipe.mSpecialValue > 0) { - Logger.INFO("Added " + aRecipe.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+(aRecipe.mSpecialValue*1000)+"EU per 1000L."); - sSemiFluidLiquidFuels.add(aRecipe); - return true; - } - } else { - Logger.INFO("Fuel value for " + p != null ? p.getLocalizedName() : "NULL Fluid" + " is <= 0, ignoring."); - } - return false; - } - - - - - - - public static boolean generateFuels() { - final FluidStack aCreosote = FluidUtils.getFluidStack("creosote", 1000); - final FluidStack aHeavyFuel = FluidUtils.getFluidStack("liquid_heavy_fuel", 1000); - final FluidStack aHeavyOil = FluidUtils.getFluidStack("liquid_heavy_oil", 1000); - final HashMap> aFoundFluidsFromItems = new HashMap>(); - // Find Fluids From items - for (final GT_Recipe r : gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDenseLiquidFuels.mRecipeList) { - - GT_Recipe g = r.copy(); - - - if (g != null && g.mEnabled && g.mInputs.length > 0 && g.mInputs[0] != null) { - for (ItemStack i : g.mInputs) { - FluidStack f = FluidContainerRegistry.getFluidForFilledItem(i); - if (f != null) { - Pair aData = new Pair(f, g.mSpecialValue); - aFoundFluidsFromItems.put(aData.hashCode(), aData); - } - } - } else if (g != null && g.mEnabled && g.mFluidInputs.length > 0 && g.mFluidInputs[0] != null) { - boolean aContainsCreosote = false; - for (FluidStack f : g.mFluidInputs) { - if (f.isFluidEqual(aCreosote)) { - aContainsCreosote = true; - } - } - g.mSpecialValue *= aContainsCreosote ? 6 : 3; - Logger.INFO("Added " + g.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+g.mSpecialValue+"EU per 1000L."); - sSemiFluidLiquidFuels.add(g); - } - } - for (Pair p : aFoundFluidsFromItems.values()) { - if (p != null) { - int aFuelValue = p.getValue(); - if (p.getKey().isFluidEqual(aCreosote)) { - aFuelValue *= 6; - } - else if (p.getKey().isFluidEqual(aHeavyFuel) || p.getKey().isFluidEqual(aHeavyOil)){ - aFuelValue *= 1.5; - } - else { - aFuelValue *= 2; - } - - if (aFuelValue <= (128*3)) { - GT_Recipe aRecipe = new GTPP_Recipe(true, new ItemStack[] {}, new ItemStack[] {}, null, new int[] {}, - new FluidStack[] { p.getKey() }, null, 0, 0, aFuelValue); - if (aRecipe.mSpecialValue > 0) { - Logger.INFO("Added " + aRecipe.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+(aRecipe.mSpecialValue*1000)+"EU per 1000L."); - sSemiFluidLiquidFuels.add(aRecipe); - } - } else { - Logger.INFO("Boosted Fuel value for " + p.getKey().getLocalizedName() + " exceeds 512k, ignoring."); - } - } - } - return sSemiFluidLiquidFuels.mRecipeList.size() > 0; - } - -} diff --git a/src/Java/gregtech/api/util/ThermalFuel.java b/src/Java/gregtech/api/util/ThermalFuel.java deleted file mode 100644 index d7b732ce5d..0000000000 --- a/src/Java/gregtech/api/util/ThermalFuel.java +++ /dev/null @@ -1,43 +0,0 @@ -package gregtech.api.util; - -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraftforge.fluids.FluidStack; - -public class ThermalFuel { - - public static void addThermalFuel(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int euValue, int aSpecialValue) { - GTPP_Recipe x = new GTPP_Recipe( - true, - null, - null, - null, - null, - new FluidStack[]{aInput1, aInput2}, - new FluidStack[]{aOutput1}, - 20, //1 Tick - euValue, //No Eu produced - aSpecialValue //Magic Number - ); - GTPP_Recipe.GTPP_Recipe_Map.sGeoThermalFuels.addRecipe(x); - } - - public static void addSteamTurbineFuel(FluidStack aInput1) { - GTPP_Recipe x = new GTPP_Recipe( - true, - null, - null, - null, - null, - new FluidStack[]{aInput1}, - null, - 20, //1 Tick - MathUtils.findPercentageOfInt((aInput1.amount/2), 95), //No Eu produced - 0 //Magic Number - ); - GTPP_Recipe.GTPP_Recipe_Map.sSteamTurbineFuels.addRecipe(x); - } - - - - -} diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java deleted file mode 100644 index a70ce24e45..0000000000 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ /dev/null @@ -1,564 +0,0 @@ -package gtPlusPlus; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableAnimatedTurbines; -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableCustomCapes; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Collection; -import java.util.HashMap; - -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.*; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.util.*; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.chunkloading.GTPP_ChunkManager; -import gtPlusPlus.core.commands.CommandDebugChunks; -import gtPlusPlus.core.commands.CommandEnableDebugWhileRunning; -import gtPlusPlus.core.commands.CommandMath; -import gtPlusPlus.core.common.CommonProxy; -import gtPlusPlus.core.config.ConfigHandler; -import gtPlusPlus.core.handler.BookHandler; -import gtPlusPlus.core.handler.PacketHandler; -import gtPlusPlus.core.handler.Recipes.RegistrationHandler; -import gtPlusPlus.core.handler.events.BlockEventHandler; -import gtPlusPlus.core.handler.events.LoginEventHandler; -import gtPlusPlus.core.handler.events.MissingMappingsEvent; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.general.ItemGiantEgg; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.LocaleUtils; -import gtPlusPlus.core.util.minecraft.HazmatUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.nei.NEI_IMC_Sender; -import gtPlusPlus.plugin.manager.Core_Manager; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.chemplant.GregtechMTE_ChemicalPlant; -import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelterGT_GTNH; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MultisUsingFluidInsteadOfCells; -import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.launchwrapper.Launch; -import net.minecraft.util.IIcon; - -@MCVersion(value = "1.7.10") -@Mod(modid = CORE.MODID, name = CORE.name, version = CORE.VERSION, dependencies = "required-after:Forge; after:TConstruct; after:PlayerAPI; after:dreamcraft; after:IC2; after:ihl; after:psychedelicraft; after:gregtech; after:Forestry; after:MagicBees; after:CoFHCore; after:Growthcraft; after:Railcraft; after:CompactWindmills; after:ForbiddenMagic; after:MorePlanet; after:PneumaticCraft; after:ExtraUtilities; after:Thaumcraft; after:rftools; after:simplyjetpacks; after:BigReactors; after:EnderIO; after:tectech; after:GTRedtech; after:beyondrealitycore; after:OpenBlocks; after:IC2NuclearControl; after:TGregworks; after:StevesCarts; after:xreliquary;") -public class GTplusplus implements ActionListener { - - public static enum INIT_PHASE { - SUPER(null), PRE_INIT(SUPER), INIT(PRE_INIT), POST_INIT( - INIT - ), SERVER_START(POST_INIT), STARTED(SERVER_START); - protected boolean mIsPhaseActive = false; - private final INIT_PHASE mPrev; - - private INIT_PHASE(INIT_PHASE aPreviousPhase) { - mPrev = aPreviousPhase; - } - - public synchronized final boolean isPhaseActive() { - return mIsPhaseActive; - } - public synchronized final void setPhaseActive(boolean aIsPhaseActive) { - if (mPrev != null && mPrev.isPhaseActive()) { - mPrev.setPhaseActive(false); - } - mIsPhaseActive = aIsPhaseActive; - if (CURRENT_LOAD_PHASE != this) { - CURRENT_LOAD_PHASE = this; - } - } - } - - public static INIT_PHASE CURRENT_LOAD_PHASE = INIT_PHASE.SUPER; - - // Mod Instance - @Mod.Instance(CORE.MODID) - public static GTplusplus instance; - - // Material Loader - public static GT_Material_Loader mGregMatLoader; - - // GT_Proxy instance - protected static Meta_GT_Proxy mGregProxy; - - // GT++ Proxy Instances - @SidedProxy(clientSide = "gtPlusPlus.core.proxy.ClientProxy", serverSide = "gtPlusPlus.core.proxy.ServerProxy") - public static CommonProxy proxy; - - // Loads Textures - @SideOnly(value = Side.CLIENT) - public static void loadTextures() { - Logger.INFO("Loading some textures on the client."); - // Tools - Logger.WARNING( - "Processing texture: " - + TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile().getResourcePath() - ); - Logger.WARNING( - "Processing texture: " - + TexturesGtTools.ANGLE_GRINDER.getTextureFile().getResourcePath() - ); - Logger.WARNING( - "Processing texture: " - + TexturesGtTools.ELECTRIC_SNIPS.getTextureFile().getResourcePath() - ); - Logger.WARNING( - "Processing texture: " - + TexturesGtTools.ELECTRIC_LIGHTER.getTextureFile().getResourcePath() - ); - Logger.WARNING( - "Processing texture: " - + TexturesGtTools.ELECTRIC_BUTCHER_KNIFE.getTextureFile().getResourcePath() - ); - - // Blocks - Logger.WARNING( - "Processing texture: " - + TexturesGtBlock.Casing_Machine_Dimensional.getTextureFile().getResourcePath() - ); - } - - public GTplusplus() { - super(); - INIT_PHASE.SUPER.setPhaseActive(true); - } - - // Pre-Init - @Mod.EventHandler - public void preInit(final FMLPreInitializationEvent event) { - INIT_PHASE.PRE_INIT.setPhaseActive(true); - Logger.INFO( - "Loading " + CORE.name + " " + CORE.VERSION + " on Gregtech " - + Utils.getGregtechVersionAsString() - ); - // Load all class objects within the plugin package. - Core_Manager.veryEarlyInit(); - PacketHandler.init(); - - if (!Utils.isServer()) { - enableCustomCapes = true; - } - - // Give this a go mate. - // initAnalytics(); - setupMaterialBlacklist(); - // setupMaterialWhitelist(); - - // Handle GT++ Config - ConfigHandler.handleConfigFile(event); - - // Check for Dev - CORE.DEVENV = (Boolean) Launch.blackboard.get( - "fml.deobfuscatedEnvironment" - ); - // Utils.LOG_INFO("User's Country: " + CORE.USER_COUNTRY); - - Utils.registerEvent(new LoginEventHandler()); - Utils.registerEvent(new MissingMappingsEvent()); - Logger.INFO("Login Handler Initialized"); - - proxy.preInit(event); - Logger.INFO("Setting up our own GT_Proxy."); - Meta_GT_Proxy.preInit(); - Core_Manager.preInit(); - GTPP_ChunkManager.init(); - } - - // Init - @Mod.EventHandler - public void init(final FMLInitializationEvent event) { - INIT_PHASE.INIT.setPhaseActive(true); - proxy.init(event); - proxy.registerNetworkStuff(); - Meta_GT_Proxy.init(); - Core_Manager.init(); - NEI_IMC_Sender.IMCSender(); - // Used by foreign players to generate .lang files for translation. - if (CORE.ConfigSwitches.dumpItemAndBlockData) { - LocaleUtils.generateFakeLocaleFile(); - } - - } - - // Post-Init - @Mod.EventHandler - public void postInit(final FMLPostInitializationEvent event) { - INIT_PHASE.POST_INIT.setPhaseActive(true); - proxy.postInit(event); - HazmatUtils.init(); - BookHandler.runLater(); - Meta_GT_Proxy.postInit(); - Core_Manager.postInit(); - // SprinklerHandler.registerModFerts(); - - ItemGiantEgg.postInit(ModItems.itemBigEgg); - BlockEventHandler.init(); - GTPP_Recipe.reInit(); - - Logger.INFO( - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - ); - Logger.INFO( - "| Recipes succesfully Loaded: " - + RegistrationHandler.recipesSuccess + " | Failed: " - + RegistrationHandler.recipesFailed + " |" - ); - Logger.INFO( - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - ); - Logger.INFO( - "Finally, we are finished. Have some cripsy bacon as a reward." - ); - } - - @EventHandler - public synchronized void serverStarting( - final FMLServerStartingEvent event - ) { - INIT_PHASE.SERVER_START.setPhaseActive(true); - event.registerServerCommand(new CommandMath()); - event.registerServerCommand(new CommandEnableDebugWhileRunning()); - event.registerServerCommand(new CommandDebugChunks()); - if (LoadedMods.Thaumcraft) { - event.registerServerCommand(new CommandDumpAspects()); - } - if (GTPP_ChunkManager.debugChunkloaders) { - event.registerServerCommand(new GTPP_ChunkManager.DebugCommand()); - } - Core_Manager.serverStart(); - INIT_PHASE.STARTED.setPhaseActive(true); - } - - @Mod.EventHandler - public synchronized void serverStopping( - final FMLServerStoppingEvent event - ) { - Core_Manager.serverStop(); - } - - @Override - public void actionPerformed(final ActionEvent arg0) { - - } - - /** - * This {@link EventHandler} is called after the - * {@link FMLPostInitializationEvent} stages of all loaded mods executes - * successfully. {@link #onLoadComplete(FMLLoadCompleteEvent)} exists to - * inject recipe generation after Gregtech and all other mods are entirely - * loaded and initialized. - * - * @param event - * - The {@link EventHandler} object passed through from FML to - * {@link #GTplusplus()}'s {@link #instance}. - */ - @Mod.EventHandler - public void onLoadComplete(FMLLoadCompleteEvent event) { - proxy.onLoadComplete(event); - generateGregtechRecipeMaps(); - // Check our maps are untouched - GTPP_Recipe.checkRecipeModifications(); - Logger.INFO("Passed verification checks."); - } - - @Mod.EventHandler - public void onIDChangingEvent(FMLModIdMappingEvent aEvent) { - GTPP_Recipe.reInit(); - } - - public static void tryPatchTurbineTextures() { - if (enableAnimatedTurbines) { - BlockIcons h = Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE; - BlockIcons h2 = Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE; - try { - Logger.INFO( - "Trying to patch GT textures to make Turbines animated." - ); - IIcon aIcon = TexturesGtBlock.Overlay_Machine_Turbine_Active.getIcon(); - if (ReflectionUtils.setField(h, "mIcon", aIcon)) { - Logger.INFO("Patched Gas Turbine Icon."); - } - if (ReflectionUtils.setField(h2, "mIcon", aIcon)) { - Logger.INFO("Patched Steam Turbine Icon."); - } - } - catch (Throwable e) { - e.printStackTrace(); - } - } - } - - protected void generateGregtechRecipeMaps() { - - int[] mValidCount = new int[]{ - 0, 0, 0 - }; - int[] mInvalidCount = new int[]{ - 0, 0, 0, 0 - }; - int[] mOriginalCount = new int[]{ - 0, 0, 0 - }; - - RecipeGen_BlastSmelterGT_GTNH.generateGTNHBlastSmelterRecipesFromEBFList(); - FishPondFakeRecipe.generateFishPondRecipes(); - //GregtechMiniRaFusion.generateSlowFusionrecipes(); - SemiFluidFuelHandler.generateFuels(); - GregtechMTE_ChemicalPlant.generateRecipes(); - - mInvalidCount[0] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT - ); - mInvalidCount[1] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( - GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT - ); - mInvalidCount[2] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( - GT_Recipe.GT_Recipe_Map.sVacuumRecipes, GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT - ); - mInvalidCount[3] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( - GT_Recipe.GT_Recipe_Map.sMixerRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT - ); - /* - - //Large Centrifuge generation - mOriginalCount[0] = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size(); - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList) { - if (x != null) { - if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { - if (CORE.RA.addMultiblockCentrifugeRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { - mValidCount[0]++; - } - else { - mInvalidCount[0]++; - } - } - else { - Logger.INFO("[Recipe] Error generating Large Centrifuge recipe."); - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(x.mInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(x.mFluidInputs)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(x.mOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(x.mFluidOutputs)); - } - } - else { - mInvalidCount[0]++; - } - } - - if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.size() < 1) { - for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList) { - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.add(a); - } - } - - //Large Electrolyzer generation - mOriginalCount[1] = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size(); - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList) { - if (x != null) { - if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { - if (CORE.RA.addMultiblockElectrolyzerRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { - mValidCount[1]++; - } - else { - mInvalidCount[1]++; - } - } - else { - Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe."); - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(x.mInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(x.mFluidInputs)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(x.mOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(x.mFluidOutputs)); - } - } - else { - mInvalidCount[1]++; - } - } - - if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList.size() < 1) { - for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList) { - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.add(a); - } - } - - //Advanced Vacuum Freezer generation - mOriginalCount[2] = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList.size(); - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList) { - if (x != null && RecipeUtils.doesGregtechRecipeHaveEqualCells(x)) { - if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { - if (CORE.RA.addAdvancedFreezerRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { - mValidCount[2]++; - } - } - else { - mInvalidCount[2]++; - } - } - else { - mInvalidCount[2]++; - } - } - - //Redo plasma recipes in Adv. Vac. - //Meta_GT_Proxy.generatePlasmaRecipesForAdvVacFreezer(); - - - String[] machineName = new String[] {"Centrifuge", "Electrolyzer", "Vacuum Freezer"}; - for (int i=0;i<3;i++) { - Logger.INFO("[Recipe] Generated "+mValidCount[i]+" recipes for the Industrial "+machineName[i]+". The original machine can process "+mOriginalCount[i]+" recipes, meaning "+mInvalidCount[i]+" are invalid for this Multiblock's processing in some way."); - }*/ - } - - protected void dumpGtRecipeMap(final GT_Recipe_Map r) { - final Collection x = r.mRecipeList; - Logger.INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug."); - for (final GT_Recipe newBo : x) { - Logger.INFO("========================"); - Logger.INFO( - "Dumping Input: " - + ItemUtils.getArrayStackNames(newBo.mInputs) - ); - Logger.INFO( - "Dumping Inputs " + ItemUtils.getFluidArrayStackNames( - newBo.mFluidInputs - ) - ); - Logger.INFO("Dumping Duration: " + newBo.mDuration); - Logger.INFO("Dumping EU/t: " + newBo.mEUt); - Logger.INFO( - "Dumping Output: " - + ItemUtils.getArrayStackNames(newBo.mOutputs) - ); - Logger.INFO( - "Dumping Output: " + ItemUtils.getFluidArrayStackNames( - newBo.mFluidOutputs - ) - ); - Logger.INFO("========================"); - } - } - - private static final boolean setupMaterialBlacklist() { - Material.invalidMaterials.put(Materials._NULL); - Material.invalidMaterials.put(Materials.Clay); - Material.invalidMaterials.put(Materials.Phosphorus); - Material.invalidMaterials.put(Materials.Steel); - Material.invalidMaterials.put(Materials.Bronze); - Material.invalidMaterials.put(Materials.Hydrogen); - // Infused TC stuff - Material.invalidMaterials.put(Materials.InfusedAir); - Material.invalidMaterials.put(Materials.InfusedEarth); - Material.invalidMaterials.put(Materials.InfusedFire); - Material.invalidMaterials.put(Materials.InfusedWater); - // EIO Materials - Material.invalidMaterials.put(Materials.SoulSand); - Material.invalidMaterials.put(Materials.EnderPearl); - Material.invalidMaterials.put(Materials.EnderEye); - Material.invalidMaterials.put(Materials.Redstone); - Material.invalidMaterials.put(Materials.Glowstone); - Material.invalidMaterials.put(Materials.Soularium); - Material.invalidMaterials.put(Materials.PhasedIron); - - if (Material.invalidMaterials.size() > 0) { - return true; - } - return false; - - } - - @SuppressWarnings("unused") - private void setupMaterialWhitelist() { - - mGregMatLoader = new GT_Material_Loader(); - - // Non GTNH Materials - if (!CORE.GTNH) { - // Mithril - Random Dungeon Loot - mGregMatLoader.enableMaterial(Materials.Mithril); - } - - // Force - Alloying - mGregMatLoader.enableMaterial(Materials.Force); - } - - private static final HashMap sMissingItemMappings = new HashMap(); - private static final HashMap sMissingBlockMappings = new HashMap(); - - private static void processMissingMappings() { - sMissingItemMappings.put("miscutils:Ammonium", GameRegistry.findItem(CORE.MODID, "itemCellAmmonium")); - sMissingItemMappings.put("miscutils:Hydroxide", GameRegistry.findItem(CORE.MODID, "itemCellHydroxide")); - sMissingItemMappings.put("miscutils:BerylliumHydroxide", GameRegistry.findItem(CORE.MODID, "itemCellmiscutils:BerylliumHydroxide")); - sMissingItemMappings.put("miscutils:Bromine", GameRegistry.findItem(CORE.MODID, "itemCellBromine")); - sMissingItemMappings.put("miscutils:Krypton", GameRegistry.findItem(CORE.MODID, "itemCellKrypton")); - sMissingItemMappings.put("miscutils:itemCellZirconiumTetrafluoride", GameRegistry.findItem(CORE.MODID, "ZirconiumTetrafluoride")); - sMissingItemMappings.put("miscutils:Li2BeF4", GameRegistry.findItem(CORE.MODID, "itemCellLithiumTetrafluoroberyllate")); - - // Cryolite - sMissingBlockMappings.put("miscutils:oreCryolite", GameRegistry.findBlock(CORE.MODID, "oreCryoliteF")); - sMissingItemMappings.put("miscutils:itemDustTinyCryolite", GameRegistry.findItem(CORE.MODID, "itemDustTinyCryoliteF")); - sMissingItemMappings.put("miscutils:itemDustSmallCryolite", GameRegistry.findItem(CORE.MODID, "itemDustSmallCryoliteF")); - sMissingItemMappings.put("miscutils:itemDustCryolite", GameRegistry.findItem(CORE.MODID, "itemDustCryoliteF")); - sMissingItemMappings.put("miscutils:dustPureCryolite", GameRegistry.findItem(CORE.MODID, "dustPureCryoliteF")); - sMissingItemMappings.put("miscutils:dustImpureCryolite", GameRegistry.findItem(CORE.MODID, "dustImpureCryoliteF")); - sMissingItemMappings.put("miscutils:crushedCryolite", GameRegistry.findItem(CORE.MODID, "crushedCryoliteF")); - sMissingItemMappings.put("miscutils:crushedPurifiedCryolite", GameRegistry.findItem(CORE.MODID, "crushedPurifiedCryoliteF")); - sMissingItemMappings.put("miscutils:crushedCentrifugedCryolite", GameRegistry.findItem(CORE.MODID, "crushedCentrifugedCryoliteF")); - sMissingItemMappings.put("miscutils:oreCryolite", GameRegistry.findItem(CORE.MODID, "oreCryoliteF")); - } - - @Mod.EventHandler - public void missingMapping(FMLMissingMappingsEvent event) { - processMissingMappings(); - for (FMLMissingMappingsEvent.MissingMapping mapping : event.get()) { - if (mapping.type == GameRegistry.Type.ITEM) { - Item aReplacement = sMissingItemMappings.get(mapping.name); - if (aReplacement != null) { - remap(aReplacement, mapping); - } - else { - //Logger.INFO("Unable to remap: "+mapping.name+", item has no replacement mapping."); - } - } - else if (mapping.type == GameRegistry.Type.BLOCK) { - Block aReplacement = sMissingBlockMappings.get(mapping.name); - if (aReplacement != null) { - remap(aReplacement, mapping); - } - else { - //Logger.INFO("Unable to remap: "+mapping.name+", block has no replacement mapping."); - } - } - } - } - - private static void remap(Item item, FMLMissingMappingsEvent.MissingMapping mapping) { - mapping.remap(item); - Logger.INFO("Remapping item " + mapping.name + " to " + CORE.MODID + ":" + item.getUnlocalizedName()); - } - - private static void remap(Block block, FMLMissingMappingsEvent.MissingMapping mapping) { - mapping.remap(block); - Logger.INFO("Remapping block " + mapping.name + " to " + CORE.MODID + ":" + block.getUnlocalizedName()); - } - -} diff --git a/src/Java/gtPlusPlus/GenerateDictionaries.java b/src/Java/gtPlusPlus/GenerateDictionaries.java deleted file mode 100644 index abdf4f4027..0000000000 --- a/src/Java/gtPlusPlus/GenerateDictionaries.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus; - -import java.io.File; -import java.io.IOException; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Random; - -import gtPlusPlus.api.objects.random.XSTR; - -public class GenerateDictionaries { - - public static void main(String[] args) { - - File aMainDictionary = new File("proguard/DictionaryMain.txt"); - File aMethodDict = new File("proguard/method-dict.txt"); - File aClassDict = new File("proguard/class-dict.txt"); - - if (Utils.doesFileExist(aMainDictionary)) { - Utils.log("Found Main Dictionary"); - List aLines = Utils.readLines(aMainDictionary); - - ArrayList aLinesToWriteMethods = new ArrayList(); - ArrayList aLinesToWriteClasses = new ArrayList(); - - if (aLines != null && aLines.size() > 0) { - Utils.log("Main Dictionary has > 0 keywords ("+aLines.size()+")"); - HashSet aUsedIndicies = new HashSet(); - int aCount = aLines.size() / 5; - - Utils.log("Mapping "+aCount+" to each dict."); - // Map New Method Names - for (int i=0;aLinesToWriteMethods.size() 0) { - aLinesToWriteMethods.add(aLineAtIndex); - aUsedIndicies.add(aIndex); - } - } - if (i >= aCount * 5) { - break; - } - } - - // Map New Class Names - for (int i=0;aLinesToWriteClasses.size() 0) { - aLinesToWriteClasses.add(aLineAtIndex); - aUsedIndicies.add(aIndex); - } - } - if (i >= aCount * 5) { - break; - } - } - } - - // Remove old generated Dicts - if (Utils.doesFileExist(aMethodDict)) { - aMethodDict.delete(); - Utils.log("Removed old Method-Dict"); - } - if (Utils.doesFileExist(aClassDict)) { - aClassDict.delete(); - Utils.log("Removed old Class-Dict"); - } - - // Create new empty dict files - if (!Utils.doesFileExist(aMethodDict)) { - Utils.createFile(aMethodDict); - } - if (!Utils.doesFileExist(aClassDict)) { - Utils.createFile(aClassDict); - } - - Utils.log("Writing new Dictionaries."); - // Write - Utils.appendListToFile(aMethodDict, aLinesToWriteMethods); - Utils.appendListToFile(aClassDict, aLinesToWriteClasses); - - Utils.log("Finished all generation of new Dictionaries."); - - } - - } - - - - private static final class Utils { - - private static final Charset utf8 = StandardCharsets.UTF_8; - private static final Random rand = new XSTR(); - - private static final void log(String s) { - System.out.println("[GTPP-Proguard] "+s); - } - - public static int randInt(final int min, final int max) { - return rand.nextInt((max - min) + 1) + min; - } - - public static boolean doesFileExist(File f) { - if (f != null && f.exists() && !f.isDirectory()) { - return true; - } - return false; - } - - public static File createFile(File aFile) { - boolean blnCreated = false; - log("Trying to use relative path "+aFile.getPath()); - try { - //log("Trying to use path "+aFile.getCanonicalPath()); - //log("Trying to use absolute path "+aFile.getAbsolutePath()); - blnCreated = aFile.createNewFile(); - } catch (IOException ioe) { - log("Error while creating a new empty file :" + ioe); - return null; - } - return blnCreated ? aFile : null; - } - - public static boolean appendListToFile(File file, List content) { - try { - long oldSize; - long newSize; - if (doesFileExist(file)) { - Path p = Paths.get(file.getPath()); - if (p != null && Files.isWritable(p)) { - oldSize = Files.size(p); - try { - Files.write(p, content, utf8, StandardOpenOption.APPEND); - } catch (IOException e) { - e.printStackTrace(); - } - newSize = Files.size(p); - return newSize > oldSize; - } - } - } catch (IOException e) { - } - return false; - } - - /** - * Reads the contents of a file line by line to a List of Strings using the default encoding for the VM. - * The file is always closed. - * - * @param file the file to read, must not be {@code null} - * @return the list of Strings representing each line in the file, never {@code null} - * @throws IOException in case of an I/O error - * @since 1.3 - */ - public static List readLines(File file) { - try { - return org.apache.commons.io.FileUtils.readLines(file, utf8); - } - catch (IOException e) { - return new ArrayList(); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/RoadMap.java b/src/Java/gtPlusPlus/RoadMap.java deleted file mode 100644 index c7bb4d5a22..0000000000 --- a/src/Java/gtPlusPlus/RoadMap.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus; - -import java.util.LinkedHashMap; - -import com.google.common.base.Objects; - -import gtPlusPlus.api.objects.data.ObjMap; -import net.minecraft.item.ItemStack; - -/** - * This Class purely exists to note down ideas and or plans to (re)implement things. - * - * @author Alkalus - * - */ -public class RoadMap { - - //Reorganization of Item, Block and Common Class loading. - /* - * So, due to the complex/silly way I've done things, I've ran into some circular loading problems around the mod. - * Issues occur where Classes like CI.java try access the GregtechItemList.java objects before they're actually set. - * A plan should be created to organize the best scheme to load things in the best order. - */ - - //Recreation of GUIs for all Multiblocks - /* - * Most Multi's use generic or straight out wrong GUI's on the controller. - * I'd like to go back and recreate all of these. - * - * Some could even benefit from a totally new type of UI (Instead of Text issues, just change a 2x2px area between red and green for status lights) - * These advanced GUIs are probably out of my capability, but if anyone thinks they're a good idea, I'll give them a go. - */ - - //Better Integration with GTNH - /* - * Refactor things to be more common, refactor things to automatically switch between GTNH and standard variants - * without having to over-abuse CORE.GTNH switches everywhere. - * Most of this can be done via expanding CI.java, so that we have automated handlers for everything - * (IE. getX(5) will get 5x of the correct version of X) - */ - - - /* - Thallium - Everglades only. (Mostly useless) - Technetium - Has some recipes but seem to be dead ends so unobtainable. - Polonium - Unobtainable. (Radioactive, Mostly Useless) - Francium - Unobtainable. (Radioactive, Mostly Useless) - Promethium - Unobtainable. - Radium - Everglades only. (Do use, Moderately Rare) - Actinium - Unobtainable. (Radioactive, Do use) - Proactinium - Unobtainable. (Do use) - Neptunium - Has some recipes but seem to be dead ends so unobtainable. - Curium - Fusion only. - Berkelium - Unobtainable. - Californium - Fusion only. - Einsteinium - Unobtainable. - Fermium - Unobtainable. - Strontium - Everglades only. (Do use 1) - Iodine - Everglades only. - Dysprosium - Everglades only. (Do use 1) - Rhenium - Weird ABS recipe only. - Flerovium - Unobtainable. - Dubnium - Unobtainable. - Seaborgium - Unobtainable. - Bohrium - Unobtainable. - Hassium - Unobtainable. - Meitnerium - Unobtainable. - Darmstadtium - Unobtainable. - Roentgenium - Unobtainable. - Copernicium - Unobtainable. - Nihonium - Unobtainable. - Moscovium - Unobtainable. - Livermorium - Unobtainable. - Tennessine - Unobtainable. - Nobelium - Unobtainable. - Lawrencium - Unobtainable. - Astatine - Unobtainable. (Radioactive, Mostly Useless) - */ - -} diff --git a/src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java b/src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java deleted file mode 100644 index f35c9cbc6b..0000000000 --- a/src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.api.damage; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ChatComponentTranslation; -import net.minecraft.util.IChatComponent; - -import gtPlusPlus.core.world.damage.BaseCustomDamageSource; - -public class DamageTeslaTower extends BaseCustomDamageSource{ - - public DamageTeslaTower(Entity transmitter) { - super("plasmabolt", transmitter, null); - this.setDamageBypassesArmor(); - this.setDamageIsAbsolute(); - } - - @Override - public IChatComponent func_151519_b(EntityLivingBase target) { - String s = "death.attack." + this.damageType; - return new ChatComponentTranslation(s, target.getCommandSenderName(), "Plasma"); - } - -} diff --git a/src/Java/gtPlusPlus/api/enums/ParticleNames.java b/src/Java/gtPlusPlus/api/enums/ParticleNames.java deleted file mode 100644 index d082cd6779..0000000000 --- a/src/Java/gtPlusPlus/api/enums/ParticleNames.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.api.enums; - -public enum ParticleNames { - - explode, - largeexplode, - hugeexplosion, - bubble, - splash, - suspended, - depthsuspend, - crit, - magicCrit, - smoke, - largesmoke, - spell, - instantSpell, - mobSpell, - dripWater, - dripLava, - townaura, - note, - portal, - enchantmenttable, - flame, - lava, - footstep, - cloud, - reddust, - snowballpoof, - snowshovel, - slime, - heart, - iconcrack_, - tilecrack_; - -} diff --git a/src/Java/gtPlusPlus/api/enums/Quality.java b/src/Java/gtPlusPlus/api/enums/Quality.java deleted file mode 100644 index 050f335b5e..0000000000 --- a/src/Java/gtPlusPlus/api/enums/Quality.java +++ /dev/null @@ -1,62 +0,0 @@ -package gtPlusPlus.api.enums; - -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.util.math.MathUtils; - -public enum Quality { - - // Magic Blue - // Rare Yellow - // Set Green - // Unique Gold/Purple - // Trade-off Brown - - POOR("Poor", EnumChatFormatting.GRAY), COMMON("Common", EnumChatFormatting.WHITE), UNCOMMON("Uncommon", - EnumChatFormatting.DARK_GREEN), MAGIC("Magic", EnumChatFormatting.BLUE), RARE("Rare", - EnumChatFormatting.YELLOW), UNIQUE("Unique", EnumChatFormatting.GOLD), ARTIFACT("Artifact", - EnumChatFormatting.AQUA), SET("Set Piece", EnumChatFormatting.GREEN), TRADEOFF("Trade-off", - EnumChatFormatting.DARK_RED), EPIC("Epic", EnumChatFormatting.LIGHT_PURPLE); - - private String LOOT; - private EnumChatFormatting COLOUR; - - private Quality(final String lootTier, final EnumChatFormatting tooltipColour) { - this.LOOT = lootTier; - this.COLOUR = tooltipColour; - } - - public String getQuality() { - return this.LOOT; - } - - protected EnumChatFormatting getColour() { - return this.COLOUR; - } - - public String formatted() { - return this.COLOUR + this.LOOT; - } - - public static Quality getRandomQuality() { - final int lootChance = MathUtils.randInt(0, 100); - if (lootChance <= 10) { - return Quality.POOR; - } else if (lootChance <= 45) { - return Quality.COMMON; - } else if (lootChance <= 65) { - return Quality.UNCOMMON; - } else if (lootChance <= 82) { - return Quality.MAGIC; - } else if (lootChance <= 92) { - return Quality.EPIC; - } else if (lootChance <= 97) { - return Quality.RARE; - } else if (lootChance <= 99) { - return Quality.ARTIFACT; - } else { - return null; - } - } - -} diff --git a/src/Java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java b/src/Java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java deleted file mode 100644 index 6fe4209efe..0000000000 --- a/src/Java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java +++ /dev/null @@ -1,203 +0,0 @@ -package gtPlusPlus.api.helpers; - -import java.util.HashMap; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.WeightedCollection; -import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; -import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - -public class GregtechPlusPlus_API { - - public static class Multiblock_API { - - private static final HashMap mSpecialBehaviourItemMap = new HashMap(); - - /** - * Register a special behaviour for GT++ Multis to listen use. - * @param aBehaviour - An Object which has extended {@link SpecialMultiBehaviour}'s base implementation. - * @return - Did this behaviour register properly? - */ - public static boolean registerSpecialMultiBehaviour(SpecialMultiBehaviour aBehaviour) { - if (aBehaviour.getTriggerItem() == null || aBehaviour.getTriggerItemTooltip() == null || aBehaviour.getTriggerItemTooltip().length() <= 0) { - Logger.INFO("Failed to attach custom multiblock logic to "+ItemUtils.getItemName(aBehaviour.getTriggerItem())); - return false; - } - mSpecialBehaviourItemMap.put("UniqueKey_"+aBehaviour.hashCode(), aBehaviour); - SpecialBehaviourTooltipHandler.addTooltipForItem(aBehaviour.getTriggerItem(), aBehaviour.getTriggerItemTooltip()); - Logger.INFO("Attached custom multiblock logic to "+ItemUtils.getItemName(aBehaviour.getTriggerItem())); - return true; - } - - public static final HashMap getSpecialBehaviourItemMap() { - return mSpecialBehaviourItemMap; - } - - /** - * Allows RTG Fuel pellets from other mods to be used in the RTG hatch. - * @param aStack - The Pellet Stack, sanitsed after passing through. - * @param aFuelValue - The Fuel Value of the Pellet to be added to the energy storage. - * @return - Did register? - */ - public static boolean registerPelletForRtgHatch(ItemStack aStack, long aFuelValue) { - return GT_MetaTileEntity_Hatch_Energy_RTG.registerPelletForHatch(aStack, aFuelValue); - } - - } - - public static class VoidMiner_API { - - private static final HashMap>> mMinerLootCache; - - static { - mMinerLootCache = new HashMap>>(); - } - - - /** - * - * Registers an ore block for a dimension. Uses a default weight of 100. - * @param aDim - The Dimension ID - * @param aOredictName - The OreDict name of the Ore to be mined. - * @return - If there was a valid Block found in the OreDict for the provided name. - */ - public static boolean registerOreForVoidMiner(int aDim, String aOredictName) { - return registerOreForVoidMiner(aDim, aOredictName, 100); - } - - /** - * - * Registers an ore block for a dimension. Uses a default weight of 100. - * @param aDim - The Dimension ID - * @param aOredictName - The OreDict name of the Ore to be mined. - * @param aWeight - The weight of this ore Block. - * @return - If there was a valid Block found in the OreDict for the provided name. - */ - public static boolean registerOreForVoidMiner(int aDim, String aOredictName, int aWeight) { - Block b = null; - ItemStack[] aValidItems = ItemUtils.validItemsForOreDict(aOredictName); - for (ItemStack g : aValidItems) { - if (g != null) { - b = Block.getBlockFromItem(g.getItem()); - if (b != null) { - break; - } - } - } - if (b != null) { - registerOreForVoidMiner(aDim, b, aWeight); - return true; - } - return false; - } - - - /** - * Registers an ore block for a dimension. Uses a default weight of 100. - * @param aDim - The Dimension ID - * @param aOreBlock - The Ore Block to be mined. - */ - public static void registerOreForVoidMiner(int aDim, Block aOreBlock) { - registerOreForVoidMiner(aDim, aOreBlock, 100); - } - - /** - * Registers an ore block for a dimension. - * @param aDim - The Dimension ID - * @param aOreBlock - The Ore Block to be mined. - * @param aWeight - The weight of this ore Block. - */ - public static void registerOreForVoidMiner(int aDim, Block aOreBlock, int aWeight) { - GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aOreBlock, aWeight); - } - - /** - * Registers a surface block for a dimension. Uses a default weight of 100. - * @param aDim - The Dimension ID - * @param aDirtBlock - The Dirt/Grass Block to be mined. - */ - public static void registerEarthSurfaceForVoidMiner(int aDim, Block aDirtBlock) { - registerEarthSurfaceForVoidMiner(aDim, aDirtBlock, 100); - } - - /** - * Registers a surface block for a dimension. - * @param aDim - The Dimension ID - * @param aDirtBlock - The Dirt/Grass Block to be mined. - * @param aWeight - The weight of this Dirt/Grass Block. - */ - public static void registerEarthSurfaceForVoidMiner(int aDim, Block aDirtBlock, int aWeight) { - GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aDirtBlock, aWeight); - } - - /** - * Registers a stone block for a dimension. Uses a default weight of 100. - * @param aDim - The Dimension ID - * @param aStoneBlock - The Stone Block to be mined. - */ - public static void registerEarthStoneForVoidMiner(int aDim, Block aStoneBlock) { - registerEarthStoneForVoidMiner(aDim, aStoneBlock, 100); - } - - /** - * Registers a stone block for a dimension. - * @param aDim - The Dimension ID - * @param aStoneBlock - The Stone Block to be mined. - * @param aWeight - The weight of this Stone Block. - */ - public static void registerEarthStoneForVoidMiner(int aDim, Block aStoneBlock, int aWeight) { - GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aStoneBlock, aWeight); - } - - - - - public static WeightedCollection getAllRegisteredOresForDimension(int aDim) { - return mMinerLootCache.get(aDim).get("ore"); - } - - public static WeightedCollection getAllRegisteredDirtTypesForDimension(int aDim) { - return mMinerLootCache.get(aDim).get("dirt"); - } - - public static WeightedCollection getAllRegisteredStoneTypesForDimension(int aDim) { - return mMinerLootCache.get(aDim).get("stone"); - } - - public static final HashMap>> getVoidMinerLootCache() { - return mMinerLootCache; - } - - } - - - private static class GregtechPlusPlus_API_Internal { - - private static void writeBlockToDimensionInCache(int aDim, int aType, Block aBlock, int aWeight) { - HashMap> aDimMap = VoidMiner_API.mMinerLootCache.get(aDim); - if (aDimMap == null) { - aDimMap = new HashMap>(); - } - WeightedCollection aMappedBlocks = getBlockMap(aType, aDimMap); - aMappedBlocks.put(aWeight, aBlock); - - } - - private static WeightedCollection getBlockMap(int aType, HashMap> aDimMap){ - WeightedCollection aMappedBlocks; - String aTypeName = ((aType == 0) ? "ore" : (aType == 1) ? "dirt" : (aType == 2) ? "stone" : "error"); - aMappedBlocks = aDimMap.get(aTypeName); - if (aMappedBlocks == null) { - aMappedBlocks = new WeightedCollection(); - } - return aMappedBlocks; - } - - } - - -} diff --git a/src/Java/gtPlusPlus/api/helpers/MaterialHelper.java b/src/Java/gtPlusPlus/api/helpers/MaterialHelper.java deleted file mode 100644 index 9d2e894d99..0000000000 --- a/src/Java/gtPlusPlus/api/helpers/MaterialHelper.java +++ /dev/null @@ -1,76 +0,0 @@ -package gtPlusPlus.api.helpers; - -import net.minecraft.item.ItemStack; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class MaterialHelper { - - public static ItemStack getComponentFromMaterial(OrePrefixes oreprefix, Material material, int amount){ - return ItemUtils.getOrePrefixStack(oreprefix, material, amount); - } - public static ItemStack getComponentFromGtMaterial(OrePrefixes oreprefix, Materials material, int amount){ - return ItemUtils.getGregtechOreStack(oreprefix, material, amount); - } - - /** - * Generates a 16 Fluid Pipe - * @see {@code Example: Copper 16x Pipe (Materials.Copper, Materials.Copper.mName, "Copper", ID, 60, 1000, true)} - * @param aMaterial - Pipe Material - * @param name - Pipe Internal name - * @param displayName - Pipe Display Name - * @param aID - Pipe's Meta ID - * @param baseCapacity - Pipes Base Capacity - * @param heatCapacity - Pipe Max Temp - * @param gasProof - Is Gas Proof? - * @return A boolean which corresponds to whether or not the Pipe was registered to the Ore Dictionary. - */ - public static boolean generateHexadecuplePipe(Materials aMaterial, String name, String displayName, int aID, - int baseCapacity, int heatCapacity, boolean gasProof) { - if (Utils.getGregtechVersionAsInt() >= 50930) { - try { - Class aPipeEntity = GT_MetaPipeEntity_Fluid.class; - Constructor constructor = aPipeEntity - .getConstructor(new Class[] { int.class, String.class, String.class, float.class, - Materials.class, int.class, int.class, boolean.class, int.class }); - if (constructor != null) { - GT_MetaPipeEntity_Fluid aPipe; - aPipe = constructor.newInstance(aID, "GT_Pipe_" + name + "_Hexadecuple", - "Hexadecuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, - gasProof, 16); - return GT_OreDictUnificator.registerOre("pipeHexadecuple" + aMaterial, aPipe.getStackForm(1L)); - } - - } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - } - } - return false; - } - - public static ItemStack getCells(Materials aMaterial, int i) { - return ItemUtils.getOrePrefixStack(OrePrefixes.cell, aMaterial, i); - } - public static ItemStack getDust(Materials aMaterial, int i) { - return ItemUtils.getOrePrefixStack(OrePrefixes.dust, aMaterial, i); - } - public static ItemStack getDustSmall(Materials aMaterial, int i) { - return ItemUtils.getOrePrefixStack(OrePrefixes.dustSmall, aMaterial, i); - } - public static ItemStack getDustTiny(Materials aMaterial, int i) { - return ItemUtils.getOrePrefixStack(OrePrefixes.dustTiny, aMaterial, i); - } - public static ItemStack getGems(Materials aMaterial, int i) { - return ItemUtils.getOrePrefixStack(OrePrefixes.gem, aMaterial, i); - } -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IChunkLoader.java b/src/Java/gtPlusPlus/api/interfaces/IChunkLoader.java deleted file mode 100644 index c04e25f570..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IChunkLoader.java +++ /dev/null @@ -1,33 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import java.util.Set; - -import net.minecraft.world.ChunkCoordIntPair; - -public interface IChunkLoader { - - public long getTicksRemaining(); - - public void setTicksRemaining(long aTicks); - - public ChunkCoordIntPair getResidingChunk(); - - public void setResidingChunk(ChunkCoordIntPair aCurrentChunk); - - public boolean getChunkLoadingActive(); - - public void setChunkLoadingActive(boolean aActive); - - public boolean getDoesWorkChunkNeedReload(); - - public void setDoesWorkChunkNeedReload(boolean aActive); - - public boolean addChunkToLoadedList(ChunkCoordIntPair aActiveChunk); - - public boolean removeChunkFromLoadedList(ChunkCoordIntPair aActiveChunk); - - public Set getManagedChunks(); - - public int getChunkloaderTier(); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IComparableRecipe.java b/src/Java/gtPlusPlus/api/interfaces/IComparableRecipe.java deleted file mode 100644 index ddbf9f38bb..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IComparableRecipe.java +++ /dev/null @@ -1,8 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; - -public interface IComparableRecipe extends Comparable{ - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IEntityCatcher.java b/src/Java/gtPlusPlus/api/interfaces/IEntityCatcher.java deleted file mode 100644 index 5ab90d47ce..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IEntityCatcher.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.minecraft.BlockPos; - -public interface IEntityCatcher { - - public boolean hasEntity(ItemStack aStack); - - public Entity getStoredEntity(World aWorld, ItemStack aStack); - - public boolean setStoredEntity(World aWorld, ItemStack aStack, Entity aEntity); - - public Class getStoredEntityClass(ItemStack aStack); - - public boolean spawnStoredEntity(World aWorld, ItemStack aStack, BlockPos aPos); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IGeneratorWorld.java b/src/Java/gtPlusPlus/api/interfaces/IGeneratorWorld.java deleted file mode 100644 index 63f2adbba7..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IGeneratorWorld.java +++ /dev/null @@ -1,17 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import java.util.Random; -import net.minecraft.world.World; - -public abstract interface IGeneratorWorld -{ - public abstract boolean generate(World paramWorld, Random paramRandom, int paramInt1, int paramInt2); - - public abstract void initiate(); - - public abstract int getExtentX(); - - public abstract int getExtentZ(); - - public abstract int getRange(); -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java b/src/Java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java deleted file mode 100644 index fa59c58d9f..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -public interface IGregtechPacketEntity { - - public void writePacketData(DataOutputStream data) throws IOException; - - public void readPacketData(DataInputStream data) throws IOException; - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IGregtechPower.java b/src/Java/gtPlusPlus/api/interfaces/IGregtechPower.java deleted file mode 100644 index 4bb29b3354..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IGregtechPower.java +++ /dev/null @@ -1,145 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import net.minecraft.block.Block; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.interfaces.IDescribable; -import gregtech.api.interfaces.tileentity.*; - -public abstract interface IGregtechPower extends IGearEnergyTileEntity, ITurnable, IGregTechDeviceInformation, IDescribable, IBasicEnergyContainer { - - @Override - public String[] getDescription(); - - @Override - default boolean isUniversalEnergyStored(long p0) { - return false; - } - - @Override - public long getOutputAmperage(); - - @Override - public long getOutputVoltage(); - - @Override - public long getInputAmperage(); - - @Override - public long getInputVoltage(); - - @Override - public boolean decreaseStoredEnergyUnits(long p0, boolean p1); - - @Override - public boolean increaseStoredEnergyUnits(long p0, boolean p1); - - @Override - public boolean drainEnergyUnits(byte p0, long p1, long p2); - - @Override - public long getAverageElectricInput(); - - @Override - public long getAverageElectricOutput(); - - @Override - public long getStoredEU(); - - @Override - public long getEUCapacity(); - - @Override - public long getStoredSteam(); - - @Override - public long getSteamCapacity(); - - @Override - public boolean increaseStoredSteam(long p0, boolean p1); - - @Override - public Block getBlockAtSide(byte p0); - - @Override - public Block getBlockAtSideAndDistance(byte p0, int p1); - - @Override - public Block getBlockOffset(int p0, int p1, int p2); - - - @Override - public TileEntity getTileEntity(int p0, int p1, int p2); - - @Override - public TileEntity getTileEntityAtSide(byte p0); - - @Override - public TileEntity getTileEntityAtSideAndDistance(byte p0, int p1); - - @Override - public TileEntity getTileEntityOffset(int p0, int p1, int p2); - - @Override - public World getWorld(); - - @Override - public int getXCoord(); - - @Override - public short getYCoord(); - - @Override - public int getZCoord(); - - @Override - public boolean isClientSide(); - - @Override - public boolean isDead(); - - @Override - public boolean isInvalidTileEntity(); - - @Override - public boolean isServerSide(); - - @Override - public void readFromNBT(NBTTagCompound p0); - - @Override - public void writeToNBT(NBTTagCompound p0); - - @Override - public boolean acceptsRotationalEnergy(byte p0); - - @Override - public boolean injectRotationalEnergy(byte p0, long p1, long p2); - - @Override - public long injectEnergyUnits(byte p0, long p1, long p2); - - @Override - public boolean inputEnergyFrom(byte p0); - - @Override - public boolean outputsEnergyTo(byte p0); - - @Override - public String[] getInfoData(); - - @Override - default public boolean isGivingInformation() { - return true; - } - -/* boolean onPreTick(TilePoweredGT tilePoweredGT, long mTickTimer2); - - boolean onTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2); - - boolean onPostTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2);*/ - - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/ILazyCoverable.java b/src/Java/gtPlusPlus/api/interfaces/ILazyCoverable.java deleted file mode 100644 index 9e1a7431db..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/ILazyCoverable.java +++ /dev/null @@ -1,144 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public interface ILazyCoverable extends ICoverable { - - @Override - default byte getColorization() { - return 0; - } - - @Override - default byte setColorization(byte arg0) { - return 0; - } - - @Override - default byte getInputRedstoneSignal(byte arg0) { - return 0; - } - - @Override - default byte getStrongestRedstone() { - return 0; - } - - @Override - default boolean getRedstone() { - // TODO Auto-generated method stub - return false; - } - - @Override - default boolean getRedstone(byte arg0) { - return false; - } - - @Override - default boolean isUniversalEnergyStored(long arg0) { - return false; - } - - @Override - default long getUniversalEnergyStored() { - return 0; - } - - @Override - default long getUniversalEnergyCapacity() { - return 0; - } - - @Override - default long getStoredSteam() { - return 0; - } - - @Override - default long getSteamCapacity() { - return 0; - } - - @Override - default boolean increaseStoredSteam(long arg0, boolean arg2) { - return false; - } - - @Override - default byte getOutputRedstoneSignal(byte arg0) { - return 0; - } - - @Override - default void setOutputRedstoneSignal(byte arg0, byte arg1) { - - } - - @Override - default byte getStrongOutputRedstoneSignal(byte arg0) { - return 0; - } - - @Override - default void setStrongOutputRedstoneSignal(byte arg0, byte arg1) { - - } - - @Override - default byte getComparatorValue(byte arg0) { - return 0; - } - - @Override - default IGregTechTileEntity getIGregTechTileEntity(int arg0, int arg1, int arg2) { - return null; - } - - @Override - default IGregTechTileEntity getIGregTechTileEntityOffset(int arg0, int arg1, int arg2) { - return null; - } - - @Override - default IGregTechTileEntity getIGregTechTileEntityAtSide(byte arg0) { - return null; - } - - @Override - default IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte arg0, int arg1) { - return null; - } - - @Override - default byte getMetaID(int arg0, int arg1, int arg2) { - return 0; - } - - @Override - default byte getMetaIDOffset(int arg0, int arg1, int arg2) { - return 0; - } - - @Override - default byte getMetaIDAtSide(byte arg0) { - return 0; - } - - @Override - default byte getMetaIDAtSideAndDistance(byte arg0, int arg1) { - return 0; - } - - @Override - default boolean isDead() { - return false; - } - - @Override - default void setLightValue(byte arg0) { - - } - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IPlugin.java b/src/Java/gtPlusPlus/api/interfaces/IPlugin.java deleted file mode 100644 index 67be182402..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IPlugin.java +++ /dev/null @@ -1,40 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import gtPlusPlus.api.objects.Logger; - -public interface IPlugin { - - /** - * @return A {@link String} object which returns the {@link IPlugin}'s name. - */ - public String getPluginName(); - - /** - * @return - * A {@link String} object which returns the {@link IPlugin}'s short name. - * This String should only contain 4 Characters. - */ - public String getPluginAbbreviation(); - - /** - * @param message - A {@link String} object which holds a message to be logged to console. - */ - default void log(String message) { - Logger.INFO("["+getPluginAbbreviation()+"] "+message); - } - - /** - * @param message - A {@link String} object which holds a warning/error message to be logged to console. - */ - default void logDebug(String message) { - Logger.WARNING("["+getPluginAbbreviation()+"] "+message); - } - - public boolean preInit(); - public boolean init(); - public boolean postInit(); - - public boolean serverStart(); - public boolean serverStop(); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IRandomGenerator.java b/src/Java/gtPlusPlus/api/interfaces/IRandomGenerator.java deleted file mode 100644 index 233fb93d4d..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IRandomGenerator.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2005, Nick Galbreath -- nickg [at] modp [dot] com - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the modp.com nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This is the standard "new" BSD license: - * http://www.opensource.org/licenses/bsd-license.php - */ - -package gtPlusPlus.api.interfaces; - -/** - * Simplified interface for random number generation - * - * @author Nick Galbreath -- nickg [at] modp [dot] com - * @version 1 -- 06-Jul-2005 - */ -public interface IRandomGenerator { - - /** - * Returns N random bits - * - * See also java.util.Random#next - * @param numBits - * @return and int with the LSB being random - */ - public int next(int numBits); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/ITexturedBlock.java b/src/Java/gtPlusPlus/api/interfaces/ITexturedBlock.java deleted file mode 100644 index 47e692bffb..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/ITexturedBlock.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.api.interfaces; - -import net.minecraft.block.Block; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.ITexturedTileEntity; - -public interface ITexturedBlock extends ITexturedTileEntity{ - - ITexture[] getTexture(byte side); - - ITexture[] getTexture(Block block, byte side); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/ITileTooltip.java b/src/Java/gtPlusPlus/api/interfaces/ITileTooltip.java deleted file mode 100644 index 08866c2712..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/ITileTooltip.java +++ /dev/null @@ -1,7 +0,0 @@ -package gtPlusPlus.api.interfaces; - -public interface ITileTooltip { - - public abstract int getTooltipID(); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/IToolable.java b/src/Java/gtPlusPlus/api/interfaces/IToolable.java deleted file mode 100644 index 24797825a9..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/IToolable.java +++ /dev/null @@ -1,17 +0,0 @@ -package gtPlusPlus.api.interfaces; - -public interface IToolable { - - public boolean isScrewdriverable(); - public boolean onScrewdriverLMB(); - public boolean onScrewdriverRMB(); - - public boolean isWrenchable(); - public boolean onWrenchLMB(); - public boolean onWrenchRMB(); - - public boolean isMalletable(); - public boolean onMalletLMB(); - public boolean onMalletRMB(); - -} diff --git a/src/Java/gtPlusPlus/api/interfaces/RunnableWithInfo.java b/src/Java/gtPlusPlus/api/interfaces/RunnableWithInfo.java deleted file mode 100644 index 4f4b9d7acd..0000000000 --- a/src/Java/gtPlusPlus/api/interfaces/RunnableWithInfo.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.api.interfaces; - -public interface RunnableWithInfo extends Runnable { - - public V getInfoData(); - - default public Class getInfoDataType() { - return getInfoData().getClass(); - } - - -} diff --git a/src/Java/gtPlusPlus/api/objects/GregtechException.java b/src/Java/gtPlusPlus/api/objects/GregtechException.java deleted file mode 100644 index 916dbc4aaf..0000000000 --- a/src/Java/gtPlusPlus/api/objects/GregtechException.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.api.objects; - -public class GregtechException extends Throwable { - - private static final long serialVersionUID = 3601884582161841486L; - - public GregtechException(String aError) { - this(aError, true); - } - - public GregtechException(String aError, boolean aIsVerbose) { - Logger.ERROR("Throwing GT++ Exception!"); - Logger.ERROR("[EXCEPTION] "+aError); - if (aIsVerbose) { - Logger.INFO("Throwing GT++ Exception!"); - Logger.INFO("[EXCEPTION] "+aError); - printStackTrace(); - } - } - - @Override - public void printStackTrace() { - super.printStackTrace(); - } - - - -} diff --git a/src/Java/gtPlusPlus/api/objects/Logger.java b/src/Java/gtPlusPlus/api/objects/Logger.java deleted file mode 100644 index 1a1da6868b..0000000000 --- a/src/Java/gtPlusPlus/api/objects/Logger.java +++ /dev/null @@ -1,179 +0,0 @@ -package gtPlusPlus.api.objects; - -import cpw.mods.fml.common.FMLLog; -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.preloader.asm.AsmConfig; -import org.apache.logging.log4j.LogManager; - -public class Logger { - - public Logger(String string) { - - } - - // Logging Functions - public static final org.apache.logging.log4j.Logger modLogger = Logger.makeLogger(); - - // Generate GT++ Logger - public static org.apache.logging.log4j.Logger makeLogger() { - final org.apache.logging.log4j.Logger gtPlusPlusLogger = LogManager.getLogger("GT++"); - return gtPlusPlusLogger; - } - - private static final boolean enabled = !AsmConfig.disableAllLogging; - - public static final org.apache.logging.log4j.Logger getLogger() { - return modLogger; - } - - // Non-Dev Comments - public static void INFO(final String s) { - if (enabled) { - modLogger.info(s); - } - } - - // Non-Dev Comments - public static void MACHINE_INFO(String s, Object... args) { - if (enabled) { - boolean localPlayer = CORE_Preloader.DEV_ENVIRONMENT; - if (CORE.ConfigSwitches.MACHINE_INFO || localPlayer) { - final String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2); - modLogger.info("Machine Info: " + s + " | " + name1, args); - } - } - } - - // Developer Comments - public static void WARNING(final String s) { - if (enabled) { - if (CORE_Preloader.DEBUG_MODE) { - modLogger.warn(s); - } - } - } - - // Errors - public static void ERROR(final String s) { - if (enabled) { - if (CORE_Preloader.DEBUG_MODE) { - modLogger.fatal(s); - } - } - } - - // Developer Logger - public static void SPECIFIC_WARNING(final String whatToLog, final String msg, final int line) { - if (enabled) { - // if (!CORE_Preloader.DEBUG_MODE){ - FMLLog.warning("GT++ |" + line + "| " + whatToLog + " | " + msg); - // } - } - } - - // ASM Comments - public static void LOG_ASM(final String s) { - if (enabled) { - FMLRelaunchLog.info("[Special ASM Logging] ", s); - } - } - - - - - - - - - - - /** - * Special Loggers - */ - - /** - * Special Logger for Bee related content - */ - public static void BEES(final String s) { - if (enabled) { - if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { - modLogger.info("[Bees] "+s); - } - } - } - /** - * Special Logger for Debugging Bee related content - */ - public static void DEBUG_BEES(final String s) { - if (enabled) { - if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { - modLogger.info("[Debug][Bees] "+s); - } - } - } - - - - /** - * Special Logger for Materials related content - */ - public static void MATERIALS(final String s) { - if (enabled) { - if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { - modLogger.info("[Materials] "+s); - } - } - } - /** - * Special Logger for Debugging Materials related content - */ - public static void DEBUG_MATERIALS(final String s) { - if (enabled) { - if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { - modLogger.info("[Debug][Materials] "+s); - } - } - } - - /** - * Special Logger for Reflection related content - */ - public static void REFLECTION(final String s) { - if (enabled) { - if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { - modLogger.info("[Reflection] "+s); - } - } - } - - - /** - * Special Logger for Darkworld related content - */ - public static void WORLD(final String s) { - if (enabled) { - if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { - modLogger.info("[WorldGen] "+s); - } - } - } - - public static void RECIPE(String string) { - if (enabled) { - if (/*CORE_Preloader.DEV_ENVIRONMENT || */CORE_Preloader.DEBUG_MODE) { - modLogger.info("[Recipe] "+string); - } - } - } - - public static void SPACE(final String s) { - if (enabled) { - modLogger.info("[Space] "+s); - } - } - - - -} diff --git a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java deleted file mode 100644 index e04f1af03a..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java +++ /dev/null @@ -1,345 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.io.Serializable; -import java.util.*; - -public class AutoMap implements Iterable, Cloneable, Serializable, Collection, Queue, List { - - /** - * The Internal Map - */ - protected final Map mInternalMap; - protected final Map mInternalNameMap; - - /** - * The Internal ID - */ - private int mInternalID = 0; - private static final long serialVersionUID = 3771412318075131790L; - - - public AutoMap() { - this(new LinkedHashMap()); - } - - public Map getMap(){ - return mInternalMap; - } - - public AutoMap(Map defaultMapType) { - mInternalMap = defaultMapType; - mInternalNameMap = new LinkedHashMap(); - } - - /** - * Generates an AutoMap from the List. - * @param aList - Data to be inserted into the AutoMap. - */ - public AutoMap(List aList) { - mInternalMap = new LinkedHashMap(); - mInternalNameMap = new LinkedHashMap(); - if (aList != null && aList.size() > 0) { - for (V obj : aList) { - add(obj); - } - } - } - /** - * Generates an AutoMap from a Set. - * @param aList - Data to be inserted into the AutoMap. - */ - public AutoMap(Set aList) { - mInternalMap = new LinkedHashMap(); - mInternalNameMap = new LinkedHashMap(); - if (aList != null && aList.size() > 0) { - for (V obj : aList) { - add(obj); - } - } - } - /** - * Generates an AutoMap from a Collection. - * @param aList - Data to be inserted into the AutoMap. - */ - public AutoMap(Collection aList) { - mInternalMap = new LinkedHashMap(); - mInternalNameMap = new LinkedHashMap(); - if (aList != null && aList.size() > 0) { - for (V obj : aList) { - add(obj); - } - } - } - - /** - * Generates an AutoMap from a Array. - * @param aArray - Data to be inserted into the AutoMap. - */ - public AutoMap(V[] aArray) { - mInternalMap = new LinkedHashMap(); - mInternalNameMap = new LinkedHashMap(); - if (aArray != null && aArray.length > 0) { - for (V obj : aArray) { - add(obj); - } - } - } - - @Override - public Iterator iterator() { - return values().iterator(); - } - - public synchronized boolean setValue(V object){ - int mOriginalID = this.mInternalID; - put(object); - if (this.mInternalMap.get(mOriginalID).equals(object) || mOriginalID > this.mInternalID){ - return true; - } - else { - return false; - } - } - - public synchronized V put(V object){ - return set(object); - } - - public synchronized boolean add(V object){ - return set(object) != null; - } - - public synchronized V set(V object){ - if (object == null) { - return null; - } - mInternalNameMap.put(""+object.hashCode(), (mInternalID+1)); - return mInternalMap.put(mInternalID++, object); - } - - public synchronized V get(int id){ - return mInternalMap.get(id); - } - - public synchronized Collection values(){ - return mInternalMap.values(); - } - - public synchronized int size(){ - return mInternalMap.size(); - } - - public synchronized int hashCode(){ - return mInternalMap.hashCode(); - } - - public synchronized boolean containsKey(int key){ - return mInternalMap.containsKey(key); - } - - public synchronized boolean containsValue(V value){ - return mInternalMap.containsValue(value); - } - - public synchronized boolean isEmpty(){ - return mInternalMap.isEmpty(); - } - - public synchronized void clear(){ - this.mInternalID = 0; - this.mInternalMap.clear(); - this.mInternalNameMap.clear(); - return; - } - - @SuppressWarnings("unchecked") - public V[] toArray() { - V[] toR = (V[]) java.lang.reflect.Array.newInstance(mInternalMap.get(0).getClass(), mInternalMap.size()); - for (int i = 0; i < mInternalMap.size(); i++) { - toR[i] = mInternalMap.get(i); - } - return toR; - } - - public synchronized final int getInternalID() { - return mInternalID; - } - - public synchronized final boolean remove(Object value) { - value.getClass(); - if (this.mInternalMap.containsValue(value)) { - return this.mInternalMap.remove(mInternalNameMap.get(""+value.hashCode()), value); - } - return false; - } - - @Override - public boolean contains(Object o) { - for (V g : this.mInternalMap.values()) { - if (g.equals(o)) { - return true; - } - } - return false; - } - - @SuppressWarnings("unchecked") - @Override - public V[] toArray(V[] a) { - return (V[]) toArray(); - } - - @Override - public boolean containsAll(Collection c) { - boolean aTrue = true; - for (Object g : c) { - if (!this.contains(g)) { - aTrue = false; - } - } - return aTrue; - } - - @Override - public boolean addAll(Collection c) { - boolean aTrue = true; - for (V g : c) { - if (!this.add(g)) { - aTrue = false; - } - } - return aTrue; - } - - @Override - public boolean removeAll(Collection c) { - boolean aTrue = true; - for (Object g : c) { - if (!this.remove(g)) { - aTrue = false; - } - } - return aTrue; - } - - @Override - public boolean retainAll(Collection c) { - AutoMap aTempAllocation = new AutoMap(); - boolean aTrue = false; - aTempAllocation = this; - aTempAllocation.removeAll(c); - aTempAllocation.clear(); - aTrue = aTempAllocation.isEmpty(); - aTempAllocation.clear(); - return aTrue; - } - - @Override - public boolean offer(V e) { - return add(e); - } - - @Override - public V remove() { - V y = this.get(0); - if (remove(y)) - return y; - else - return null; - } - - @Override - public V poll() { - if (this.mInternalMap.isEmpty()) { - return null; - } - return remove(); - } - - @Override - public V element() { - if (this.mInternalMap.isEmpty()) { - return null; - } - return this.get(0); - } - - @Override - public V peek() { - return element(); - } - - @Override - public boolean addAll(int index, Collection c) { - for (V y : c) { - add(y); - } - return true; - } - - @Override - public V set(int index, V element) { - return mInternalMap.put(index, element); - } - - @Override - public void add(int index, V element) { - add(element); - } - - @Override - public V remove(int index) { - V h = mInternalMap.get(index); - set(index, null); - return h; - } - - @Override - public int indexOf(Object o) { - int aCount = 0; - for (V of : mInternalMap.values()) { - if (of != o) { - aCount++; - continue; - } - else { - return aCount; - } - } - return -1; - } - - @Override - public int lastIndexOf(Object o) { - //TODO - return indexOf(o); - } - - @Override - public ListIterator listIterator() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ListIterator listIterator(int index) { - // TODO Auto-generated method stub - return null; - } - - @Override - public List subList(int fromIndex, int toIndex) { - AutoMap aNewSubList = new AutoMap(); - for (int slot=fromIndex; slot<=toIndex; slot++) { - V obj = mInternalMap.get(slot); - if (obj == null) { - continue; - } - else { - aNewSubList.put(obj); - } - } - return aNewSubList; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java b/src/Java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java deleted file mode 100644 index 991908e402..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -public class ConcurrentHashSet extends ConcurrentSet { - - private static final long serialVersionUID = -1293478938482781728L; - - public ConcurrentHashSet() { - this(new ConcurrentHashMap()); - } - - public ConcurrentHashSet(ConcurrentMap defaultMapType) { - super(defaultMapType); - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/data/ConcurrentSet.java b/src/Java/gtPlusPlus/api/objects/data/ConcurrentSet.java deleted file mode 100644 index 1d3ffc1c01..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/ConcurrentSet.java +++ /dev/null @@ -1,53 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.io.Serializable; -import java.util.AbstractSet; -import java.util.Iterator; -import java.util.concurrent.ConcurrentMap; - -public abstract class ConcurrentSet extends AbstractSet implements Serializable { - - private static final long serialVersionUID = -6761513279741915432L; - - private final ConcurrentMap mInternalMap; - - private int mInternalID = 0; - - /** - * Creates a new instance which wraps the specified {@code map}. - */ - public ConcurrentSet(ConcurrentMap aMap) { - mInternalMap = aMap; - } - - @Override - public int size() { - return mInternalMap.size(); - } - - @Override - public boolean contains(Object o) { - return mInternalMap.containsKey(o); - } - - @Override - public boolean add(E o) { - return mInternalMap.putIfAbsent(mInternalID++, o) == null; - } - - @Override - public boolean remove(Object o) { - return mInternalMap.remove(o) != null; - } - - @Override - public void clear() { - this.mInternalID = 0; - mInternalMap.clear(); - } - - @Override - public Iterator iterator() { - return mInternalMap.values().iterator(); - } -} diff --git a/src/Java/gtPlusPlus/api/objects/data/FlexiblePair.java b/src/Java/gtPlusPlus/api/objects/data/FlexiblePair.java deleted file mode 100644 index 64f57b4e5a..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/FlexiblePair.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.io.Serializable; - -import com.google.common.base.Objects; - -public class FlexiblePair implements Serializable { - - /** - * SVUID - */ - private static final long serialVersionUID = 1250550491092812443L; - private final K key; - private V value; - - public FlexiblePair(final K key, final V value){ - this.key = key; - this.value = value; - } - - final public K getKey(){ - return this.key; - } - - final public V getValue(){ - return this.value; - } - - final public void setValue(V aObj) { - value = aObj; - } - - @Override - public int hashCode() { - Integer aCode = Objects.hashCode(getKey(), getValue()); - return aCode != null ? aCode : super.hashCode(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/objects/data/ObjMap.java b/src/Java/gtPlusPlus/api/objects/data/ObjMap.java deleted file mode 100644 index 49dd70d2b8..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/ObjMap.java +++ /dev/null @@ -1,285 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.util.Arrays; - -/** - * Object-2-object map based on IntIntMap4a - */ -public class ObjMap -{ - private static final Object FREE_KEY = new Object(); - private static final Object REMOVED_KEY = new Object(); - - /** Keys and values */ - private Object[] m_data; - - /** Value for the null key (if inserted into a map) */ - private Object m_nullValue; - private boolean m_hasNull; - - /** Fill factor, must be between (0 and 1) */ - private final float m_fillFactor; - /** We will resize a map once it reaches this size */ - private int m_threshold; - /** Current map size */ - private int m_size; - /** Mask to calculate the original position */ - private int m_mask; - /** Mask to wrap the actual array pointer */ - private int m_mask2; - - public ObjMap( final int size, final float fillFactor ) - { - if ( fillFactor <= 0 || fillFactor >= 1 ) - throw new IllegalArgumentException( "FillFactor must be in (0, 1)" ); - if ( size <= 0 ) - throw new IllegalArgumentException( "Size must be positive!" ); - final int capacity = arraySize(size, fillFactor); - m_mask = capacity - 1; - m_mask2 = capacity * 2 - 1; - m_fillFactor = fillFactor; - - m_data = new Object[capacity * 2]; - Arrays.fill( m_data, FREE_KEY ); - - m_threshold = (int) (capacity * fillFactor); - } - - @SuppressWarnings("unchecked") - public V get( final K key ) - { - if ( key == null ) - return (V) m_nullValue; //we null it on remove, so safe not to check a flag here - - int ptr = (key.hashCode() & m_mask) << 1; - Object k = m_data[ ptr ]; - - if ( k == FREE_KEY ) - return null; //end of chain already - if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call - return (V) m_data[ ptr + 1 ]; - while ( true ) - { - ptr = (ptr + 2) & m_mask2; //that's next index - k = m_data[ ptr ]; - if ( k == FREE_KEY ) - return null; - if ( k.equals( key ) ) - return (V) m_data[ ptr + 1 ]; - } - } - - @SuppressWarnings("unchecked") - public V put( final K key, final V value ) - { - if ( key == null ) - return insertNullKey(value); - - int ptr = getStartIndex(key) << 1; - Object k = m_data[ptr]; - - if ( k == FREE_KEY ) //end of chain already - { - m_data[ ptr ] = key; - m_data[ ptr + 1 ] = value; - if ( m_size >= m_threshold ) - rehash( m_data.length * 2 ); //size is set inside - else - ++m_size; - return null; - } - else if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call - { - final Object ret = m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = value; - return (V) ret; - } - - int firstRemoved = -1; - if ( k == REMOVED_KEY ) - firstRemoved = ptr; //we may find a key later - - while ( true ) - { - ptr = ( ptr + 2 ) & m_mask2; //that's next index calculation - k = m_data[ ptr ]; - if ( k == FREE_KEY ) - { - if ( firstRemoved != -1 ) - ptr = firstRemoved; - m_data[ ptr ] = key; - m_data[ ptr + 1 ] = value; - if ( m_size >= m_threshold ) - rehash( m_data.length * 2 ); //size is set inside - else - ++m_size; - return null; - } - else if ( k.equals( key ) ) - { - final Object ret = m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = value; - return (V) ret; - } - else if ( k == REMOVED_KEY ) - { - if ( firstRemoved == -1 ) - firstRemoved = ptr; - } - } - } - - @SuppressWarnings("unchecked") - public V remove( final K key ) - { - if ( key == null ) - return removeNullKey(); - - int ptr = getStartIndex(key) << 1; - Object k = m_data[ ptr ]; - if ( k == FREE_KEY ) - return null; //end of chain already - else if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call - { - --m_size; - if ( m_data[ ( ptr + 2 ) & m_mask2 ] == FREE_KEY ) - m_data[ ptr ] = FREE_KEY; - else - m_data[ ptr ] = REMOVED_KEY; - final V ret = (V) m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = null; - return ret; - } - while ( true ) - { - ptr = ( ptr + 2 ) & m_mask2; //that's next index calculation - k = m_data[ ptr ]; - if ( k == FREE_KEY ) - return null; - else if ( k.equals( key ) ) - { - --m_size; - if ( m_data[ ( ptr + 2 ) & m_mask2 ] == FREE_KEY ) - m_data[ ptr ] = FREE_KEY; - else - m_data[ ptr ] = REMOVED_KEY; - final V ret = (V) m_data[ ptr + 1 ]; - m_data[ ptr + 1 ] = null; - return ret; - } - } - } - - @SuppressWarnings("unchecked") - private V insertNullKey(final V value) - { - if ( m_hasNull ) - { - final Object ret = m_nullValue; - m_nullValue = value; - return (V) ret; - } - else - { - m_nullValue = value; - ++m_size; - return null; - } - } - - @SuppressWarnings("unchecked") - private V removeNullKey() - { - if ( m_hasNull ) - { - final Object ret = m_nullValue; - m_nullValue = null; - m_hasNull = false; - --m_size; - return (V) ret; - } - else - { - return null; - } - } - - public int size() - { - return m_size; - } - - @SuppressWarnings("unchecked") - private void rehash( final int newCapacity ) - { - m_threshold = (int) (newCapacity/2 * m_fillFactor); - m_mask = newCapacity/2 - 1; - m_mask2 = newCapacity - 1; - - final int oldCapacity = m_data.length; - final Object[] oldData = m_data; - - m_data = new Object[ newCapacity ]; - Arrays.fill( m_data, FREE_KEY ); - - m_size = m_hasNull ? 1 : 0; - - for ( int i = 0; i < oldCapacity; i += 2 ) { - final Object oldKey = oldData[ i ]; - if( oldKey != FREE_KEY && oldKey != REMOVED_KEY ) - put( (K)oldKey, (V)oldData[ i + 1 ]); - } - } - - public int getStartIndex( final Object key ) - { - //key is not null here - return key.hashCode() & m_mask; - } - - public Object[] values() { - return m_data; - } - - /** Taken from FastUtil implementation */ - - /** Return the least power of two greater than or equal to the specified value. - * - *

Note that this function will return 1 when the argument is 0. - * - * @param x a long integer smaller than or equal to 262. - * @return the least power of two greater than or equal to the specified value. - */ - public static long nextPowerOfTwo( long x ) { - if ( x == 0 ) return 1; - x--; - x |= x >> 1; - x |= x >> 2; - x |= x >> 4; - x |= x >> 8; - x |= x >> 16; - return ( x | x >> 32 ) + 1; - } - - /** Returns the least power of two smaller than or equal to 230 and larger than or equal to Math.ceil( expected / f ). - * - * @param expected the expected number of elements in a hash table. - * @param f the load factor. - * @return the minimum possible size for a backing array. - * @throws IllegalArgumentException if the necessary size is larger than 230. - */ - public static int arraySize( final int expected, final float f ) { - final long s = Math.max( 2, nextPowerOfTwo( (long)Math.ceil( expected / f ) ) ); - if ( s > (1 << 30) ) throw new IllegalArgumentException( "Too large (" + expected + " expected elements with load factor " + f + ")" ); - return (int)s; - } - - //taken from FastUtil - private static final int INT_PHI = 0x9E3779B9; - - public static int phiMix( final int x ) { - final int h = x * INT_PHI; - return h ^ (h >> 16); -} - -} diff --git a/src/Java/gtPlusPlus/api/objects/data/Pair.java b/src/Java/gtPlusPlus/api/objects/data/Pair.java deleted file mode 100644 index e1d23e6b43..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/Pair.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.io.Serializable; - -import com.google.common.base.Objects; - -public class Pair implements Serializable { - - /** - * SVUID - */ - private static final long serialVersionUID = 1250550491092812443L; - private final K key; - private final V value; - - public Pair(final K key, final V value){ - this.key = key; - this.value = value; - } - - final public K getKey(){ - return this.key; - } - - final public V getValue(){ - return this.value; - } - - @Override - public int hashCode() { - Integer aCode = Objects.hashCode(getKey(), getValue()); - return aCode != null ? aCode : super.hashCode(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/objects/data/Quad.java b/src/Java/gtPlusPlus/api/objects/data/Quad.java deleted file mode 100644 index fa2e52951e..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/Quad.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.util.ArrayList; -import java.util.List; - -public class Quad { - - private final K key; - private final V value; - private final C value2; - private final R value3; - - public Quad(final K key, final V value, final C value2, final R value3){ - this.key = key; - this.value = value; - this.value2 = value2; - this.value3 = value3; - } - - final public K getKey(){ - return this.key; - } - - final public V getValue_1(){ - return this.value; - } - - final public C getValue_2(){ - return this.value2; - } - - final public R getValue_3(){ - return this.value3; - } - - public final List values() { - List aVals = new ArrayList(); - aVals.add(key); - aVals.add(value); - aVals.add(value2); - aVals.add(value3); - return aVals; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/objects/data/ReverseAutoMap.java b/src/Java/gtPlusPlus/api/objects/data/ReverseAutoMap.java deleted file mode 100644 index 72ec0bc293..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/ReverseAutoMap.java +++ /dev/null @@ -1,175 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.util.*; - -public class ReverseAutoMap extends AutoMap { - - /** - * The Internal Map - */ - private Map mInternalMapReverseLookup = new HashMap(); - - /** - * The Internal ID - */ - private int mInternalID = 0; - private static final long serialVersionUID = 3771412318075131790L; - - @Override - public Iterator iterator() { - return values().iterator(); - } - - public synchronized boolean setValue(N object){ - int mOriginalID = this.mInternalID; - put(object); - if (this.mInternalMap.get(mOriginalID).equals(object) || mOriginalID > this.mInternalID){ - return true; - } - else { - return false; - } - } - - @Override - public synchronized N put(N object){ - return set(object); - } - - @Override - public synchronized N set(N object){ - int newID = getNextFreeMapID(); - mInternalMapReverseLookup.put(object, newID); - return mInternalMap.put(newID, object); - } - - public synchronized int putToInternalMap(N object){ - return setInternalMap(object); - } - - public synchronized int setInternalMap(N object){ - int newID = getNextFreeMapID(); - mInternalMap.put(newID, object); - mInternalMapReverseLookup.put(object, newID); - return newID; - } - - public synchronized boolean injectCleanDataToAutoMap(Integer g, N object){ - if (!mInternalMap.containsKey(g) && !mInternalMapReverseLookup.containsKey(object)) { - int a1 = 0, a2 = 0, a11 = 0, a22 = 0; - a1 = mInternalMap.size(); - a2 = mInternalMapReverseLookup.size(); - a11 = a1; - a22 = a2; - mInternalMap.put(g, object); - a1 = mInternalMap.size(); - mInternalMapReverseLookup.put(object, g); - a2 = mInternalMapReverseLookup.size(); - if (a1 > a11 && a2 > a22) - return true; - } - return false; - } - - public synchronized boolean injectDataToAutoMap(Integer g, N object){ - int a1 = 0, a2 = 0, a11 = 0, a22 = 0; - a1 = mInternalMap.size(); - a2 = mInternalMapReverseLookup.size(); - a11 = a1; - a22 = a2; - mInternalMap.put(g, object); - a1 = mInternalMap.size(); - mInternalMapReverseLookup.put(object, g); - a2 = mInternalMapReverseLookup.size(); - if (a1 > a11 && a2 > a22) - return true; - return false; - } - - private boolean raiseInternalID() { - int mOld = mInternalID; - mInternalID++; - return mInternalID > mOld; - } - - public synchronized int getNextFreeMapID() { - if (raiseInternalID()) { - return mInternalID; - } - return Short.MIN_VALUE; - } - - @Override - public synchronized N get(int id){ - return mInternalMap.get(id); - } - - public synchronized int get(N key) { - return mInternalMapReverseLookup.get(key); - } - - @Override - public synchronized Collection values(){ - return mInternalMap.values(); - } - - public synchronized Collection keys(){ - return mInternalMapReverseLookup.values(); - } - - @Override - public synchronized int size(){ - return mInternalMap.size(); - } - - @Override - public synchronized int hashCode(){ - return mInternalMap.hashCode()+mInternalMapReverseLookup.hashCode(); - } - - @Override - public synchronized boolean containsKey(int key){ - return mInternalMap.containsKey(key); - } - - @Override - public synchronized boolean containsValue(N value){ - return mInternalMap.containsValue(value); - } - - public synchronized boolean containsKey(N key){ - return mInternalMapReverseLookup.containsKey(key); - } - - public synchronized boolean containsValue(int value){ - return mInternalMapReverseLookup.containsValue(value); - } - - @Override - public synchronized boolean isEmpty(){ - return mInternalMap.isEmpty() && mInternalMapReverseLookup.isEmpty(); - } - - @Override - public synchronized void clear(){ - this.mInternalID = 0; - this.mInternalMap.clear(); - this.mInternalMapReverseLookup.clear(); - return; - } - - @Override - public synchronized N[] toArray() { - Collection col = this.mInternalMap.values(); - @SuppressWarnings("unchecked") - N[] val = (N[]) col.toArray(); - return val; - } - - public synchronized Integer[] toArrayInternalMap() { - Collection col = this.mInternalMapReverseLookup.values(); - Integer[] val = col.toArray(new Integer[col.size()]); - return val; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/data/Triplet.java b/src/Java/gtPlusPlus/api/objects/data/Triplet.java deleted file mode 100644 index affb03d868..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/Triplet.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.api.objects.data; - -public class Triplet { - - private final K key; - private final V value; - private final C count; - - public Triplet(final K key, final V value, final C value2){ - this.key = key; - this.value = value; - this.count = value2; - } - - final public K getValue_1(){ - return this.key; - } - - final public V getValue_2(){ - return this.value; - } - - final public C getValue_3(){ - return this.count; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/objects/data/TypeCounter.java b/src/Java/gtPlusPlus/api/objects/data/TypeCounter.java deleted file mode 100644 index 601a51392f..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/TypeCounter.java +++ /dev/null @@ -1,178 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Set; - -import gtPlusPlus.api.objects.Logger; - - -public class TypeCounter implements Set { - - private Map> mInternalMap = new LinkedHashMap>(); - private String mHighestValueKey; - private int mHighestValue = 0; - private final Class mClass; - - public TypeCounter(Class o) { - Logger.WARNING("Created new TypeCounter for "+o.getName()); - mClass = o; - } - - public static class InternalTypeCounterObject { - private final Z mObject; - private int mCounter = 0; - - public InternalTypeCounterObject(Z o) { - mObject = o; - } - - public String hash() { - return String.valueOf(mObject.hashCode()); - } - - public Z get() { - return mObject; - } - - public void add() { - mCounter++; - } - - public int count() { - return mCounter; - } - - } - - public boolean add(V arg0) { - return add(arg0, null); - } - - public boolean add(V arg0, String aKeyName) { - String aKey = aKeyName != null ? aKeyName : arg0.toString(); - InternalTypeCounterObject aValue = mInternalMap.get(aKey); - if (aValue == null) { - aValue = new InternalTypeCounterObject((V) arg0); - Logger.WARNING("Adding new key to map: "+aKey); - } - aValue.add(); - int a = aValue.count(); - if (a > mHighestValue) { - mHighestValue = a; - mHighestValueKey = aKey; - Logger.WARNING("New Highest Count - "+aKey+":"+a); - } - mInternalMap.put(aKey, aValue); - Logger.WARNING(aKey+":"+a); - return true; - } - - @Override - public boolean addAll(Collection arg0) { - boolean aReturn = true; - for (Object o : arg0) { - if (mClass.isInstance(o)) { - V j = (V) o; - boolean b = add(j); - if (!b) { - aReturn = false; - } - } - } - return aReturn; - } - - @Override - public void clear() { - mInternalMap.clear(); - } - - @Override - public boolean contains(Object arg0) { - return mInternalMap.containsKey(arg0.toString()); - } - - @Override - public boolean containsAll(Collection arg0) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean isEmpty() { - return mInternalMap.isEmpty(); - } - - @Override - public Iterator iterator() { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean remove(Object arg0) { - InternalTypeCounterObject aValue = mInternalMap.remove(arg0.toString()); - if (aValue != null) { - return true; - } - else { - return false; - } - } - - @Override - public boolean removeAll(Collection arg0) { - boolean aReturn = true; - for (Object o : arg0) { - boolean a = remove(o); - if (!a) { - aReturn = false; - } - } - return aReturn; - } - - @Override - public boolean retainAll(Collection arg0) { - // TODO Auto-generated method stub - return false; - } - - @Override - public int size() { - return this.mInternalMap.size(); - } - - @Override - public Object[] toArray() { - Object[] aArray = new Object[this.mInternalMap.size()]; - int aPos = 0; - for (String k : this.mInternalMap.keySet()) { - if (k != null) { - InternalTypeCounterObject aVal = this.mInternalMap.get(k); - aArray[aPos++] = new Pair>(k, aVal); - } - } - return aArray; - } - - @Override - public V[] toArray(Object[] a) { - Object[] aArray = new Object[a.length]; - int aPos = 0; - for (Object k : a) { - if (k != null) { - aArray[aPos++] = k; - } - } - return (V[]) aArray; - } - - public V getResults() { - InternalTypeCounterObject x = mInternalMap.get(mHighestValueKey); - return x.get(); - } -} diff --git a/src/Java/gtPlusPlus/api/objects/data/WeightedCollection.java b/src/Java/gtPlusPlus/api/objects/data/WeightedCollection.java deleted file mode 100644 index f9966474b0..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/WeightedCollection.java +++ /dev/null @@ -1,102 +0,0 @@ -package gtPlusPlus.api.objects.data; - -import java.util.Collection; -import java.util.Map; -import java.util.NavigableMap; -import java.util.Random; -import java.util.Set; -import java.util.TreeMap; - -import gtPlusPlus.api.objects.random.XSTR; - -public class WeightedCollection implements Map { - - private NavigableMap map = new TreeMap(); - private Random random; - private int total = 0; - - public WeightedCollection() { - this(new XSTR()); - } - - public WeightedCollection(Random random) { - this.random = random; - } - - public E add(int weight, E object) { - if (weight <= 0) return null; - total += weight; - return map.put(total, object); - } - - private E next() { - int value = random.nextInt(total) + 1; // Can also use floating-point weights - return map.ceilingEntry(value).getValue(); - } - - @Override - public int size() { - return map.size(); - } - - @Override - public boolean isEmpty() { - return map.isEmpty(); - } - - @Override - public boolean containsKey(Object key) { - return map.containsKey(key); - } - - @Override - public boolean containsValue(Object value) { - return map.containsValue(value); - } - - public E get() { - return next(); - } - - @Override - public E get(Object key) { - return next(); - } - - @Override - public void putAll(Map m) { - map.putAll(m); - } - - @Override - public void clear() { - map.clear(); - this.total = 0; - } - - @Override - public Set keySet() { - return map.keySet(); - } - - @Override - public Collection values() { - return map.values(); - } - - @Override - public Set entrySet() { - return map.entrySet(); - } - - @Override - public E put(Integer key, E value) { - return add(key, value); - } - - @Override - public E remove(Object key) { - return map.remove(key); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java b/src/Java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java deleted file mode 100644 index 6c55822ca9..0000000000 --- a/src/Java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.api.objects.data.weakref; - -import java.util.WeakHashMap; - -import gtPlusPlus.api.objects.data.AutoMap; - -public class WeakAutoMap extends AutoMap { - private static final long serialVersionUID = 8328345351801363386L; - public WeakAutoMap() { - super(new WeakHashMap()); - } -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/AABB.java b/src/Java/gtPlusPlus/api/objects/minecraft/AABB.java deleted file mode 100644 index 722ac00b64..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/AABB.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import gtPlusPlus.core.util.minecraft.EntityUtils; -import net.minecraft.entity.Entity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; - -/** - * Generates an AABB around an entity. - * @author Alkalus - * - */ -public class AABB { - - private final AxisAlignedBB mAabb; - private final World mWorld; - - /** - * Creates a AxisAlignedBB based around an Entity. - * @param aEntity - The Entity to work with. - * @param x - Maximum X from origin. - * @param y - Maximum Y from origin. - * @param z - Maximum Z from origin. - */ - public AABB(Entity aEntity, int x, int y, int z) { - if (aEntity == null) { - mAabb = null; - mWorld = null; - } - else { - mWorld = aEntity.worldObj; - BlockPos aEntityLocation = EntityUtils.findBlockPosUnderEntity(aEntity); - int xMin, xMax, yMin, yMax, zMin, zMax; - xMin = aEntityLocation.xPos; - yMin = aEntityLocation.yPos; - zMin = aEntityLocation.zPos; - xMax = aEntityLocation.xPos + x; - yMax = aEntityLocation.yPos + y; - zMax = aEntityLocation.zPos + z; - mAabb = AxisAlignedBB.getBoundingBox(xMin, yMin, zMin, xMax, yMax, zMax); - } - - } - - /** - * Used to get the AxisAlignedBB from this class. - * @return - */ - public AxisAlignedBB get() { - return mAabb; - } - - /** - * Used to determine if this object is valid or not. - * @return - */ - public boolean valid() { - return mAabb != null && mWorld != null; - } - - public World world() { - return mWorld; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java b/src/Java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java deleted file mode 100644 index 0b8f97b378..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java +++ /dev/null @@ -1,188 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import gtPlusPlus.core.util.minecraft.FluidUtils; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.FluidTankInfo; - -public class BTF_FluidTank extends FluidTank { - - public FluidStack mFluid; - - public BTF_FluidTank(int capacity) { - super(capacity); - } - - /** - * Let's replace the Default handling with GT's own handling code, because it's probably better, right? - * @author Alkalus/GregoriusT - */ - - - public FluidStack getFluid() { - return this.getDrainableStack(); - } - - public int getFluidAmount() { - return this.getDrainableStack() != null ? this.getDrainableStack().amount : 0; - } - - public NBTTagCompound writeToNBT(NBTTagCompound aNBT) { - super.writeToNBT(aNBT); - if (this.mFluid != null) { - aNBT.setTag("mFluid", this.mFluid.writeToNBT(new NBTTagCompound())); - } - return aNBT; - } - - public FluidTank readFromNBT(NBTTagCompound aNBT) { - this.mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); - return this; - } - -/* public abstract boolean isLiquidInput(byte arg0); - - public abstract boolean isLiquidOutput(byte arg0); - - public abstract boolean doesFillContainers(); - - public abstract boolean doesEmptyContainers();*/ - - public boolean canTankBeFilled() { - return true; - } - - public boolean canTankBeEmptied() { - return true; - } - - - public boolean isFluidInputAllowed(FluidStack aFluid) { - return true; - } - - public FluidStack getFillableStack() { - return this.mFluid; - } - - public FluidStack setFillableStack(FluidStack aFluid) { - this.mFluid = aFluid; - return this.mFluid; - } - - public FluidStack getDrainableStack() { - return this.mFluid; - } - - public FluidStack setDrainableStack(FluidStack aFluid) { - this.mFluid = aFluid; - return this.mFluid; - } - - public FluidStack getDisplayedFluid() { - return this.getDrainableStack(); - } - - public boolean isFluidChangingAllowed() { - return true; - } - - public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid != null && aFluid.getFluid().getID() > 0 && aFluid.amount > 0 && this.canTankBeFilled() - && this.isFluidInputAllowed(aFluid)) { - if (this.getFillableStack() != null && this.getFillableStack().getFluid().getID() > 0) { - if (!this.getFillableStack().isFluidEqual(aFluid)) { - return 0; - } else { - int space = this.getCapacity() - this.getFillableStack().amount; - if (aFluid.amount <= space) { - if (doFill) { - FluidStack arg9999 = this.getFillableStack(); - arg9999.amount += aFluid.amount; - } - - return aFluid.amount; - } else { - if (doFill) { - this.getFillableStack().amount = this.getCapacity(); - } - - return space; - } - } - } else if (aFluid.amount <= this.getCapacity()) { - if (doFill) { - this.setFillableStack(aFluid.copy()); - } - - return aFluid.amount; - } else { - if (doFill) { - this.setFillableStack(aFluid.copy()); - this.getFillableStack().amount = this.getCapacity(); - } - - return this.getCapacity(); - } - } else { - return 0; - } - } - - public FluidStack drain(int maxDrain, boolean doDrain) { - if (this.getDrainableStack() != null && this.canTankBeEmptied()) { - if (this.getDrainableStack().amount <= 0 && this.isFluidChangingAllowed()) { - this.setDrainableStack((FluidStack) null); - return null; - } else { - int used = maxDrain; - if (this.getDrainableStack().amount < maxDrain) { - used = this.getDrainableStack().amount; - } - - if (doDrain) { - FluidStack arg9999 = this.getDrainableStack(); - arg9999.amount -= used; - } - - FluidStack drained = this.getDrainableStack().copy(); - drained.amount = used; - if (this.getDrainableStack().amount <= 0 && this.isFluidChangingAllowed()) { - this.setDrainableStack((FluidStack) null); - } - - return drained; - } - } else { - return null; - } - } - - @Override - public int getCapacity() { - return super.getCapacity(); - } - - @Override - public FluidTankInfo getInfo() { - return new FluidTankInfo(this); - } - - @Override - public void setFluid(FluidStack fluid) { - setFillableStack(fluid); - } - - @Override - public void setCapacity(int capacity) { - super.setCapacity(capacity); - } - - public FluidStack drain(FluidStack aFluid, boolean doDrain) { - return drain(aFluid.amount, doDrain); - } - - - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java b/src/Java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java deleted file mode 100644 index 04ce0dff19..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java +++ /dev/null @@ -1,228 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.ArrayList; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.util.data.ArrayUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; - -public class BTF_Inventory implements ISidedInventory{ - - public final ItemStack[] mInventory; - public final TileEntityBase mTile; - - public BTF_Inventory(int aSlots, TileEntityBase tile) { - this.mInventory = new ItemStack[aSlots]; - this.mTile = tile; - } - - public ItemStack[] getRealInventory() { - purgeNulls(); - return this.mInventory; - } - - public int getSizeInventory() { - return this.mInventory.length; - } - - public ItemStack getStackInSlot(int aIndex) { - return aIndex >= 0 && aIndex < this.mInventory.length ? this.mInventory[aIndex] : null; - } - - public void setInventorySlotContents(int aIndex, ItemStack aStack) { - if (aIndex >= 0 && aIndex < this.mInventory.length) { - this.mInventory[aIndex] = aStack; - } - } - - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - public boolean isValidSlot(int aIndex) { - return true; - } - - public int getInventoryStackLimit() { - return 64; - } - - - public boolean setStackToZeroInsteadOfNull(int aIndex) { - return false; -} - - public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { - return isValidSlot(aIndex); - } - - public ItemStack decrStackSize(int aIndex, int aAmount) { - ItemStack tStack = this.getStackInSlot(aIndex); - ItemStack rStack = GT_Utility.copy(new Object[]{tStack}); - if (tStack != null) { - if (tStack.stackSize <= aAmount) { - if (this.setStackToZeroInsteadOfNull(aIndex)) { - tStack.stackSize = 0; - } else { - this.setInventorySlotContents(aIndex, (ItemStack) null); - } - } else { - rStack = tStack.splitStack(aAmount); - if (tStack.stackSize == 0 && !this.setStackToZeroInsteadOfNull(aIndex)) { - this.setInventorySlotContents(aIndex, (ItemStack) null); - } - } - } - - return rStack; - } - - public int[] getAccessibleSlotsFromSide(int aSide) { - ArrayList tList = new ArrayList(); - TileEntityBase tTileEntity = this.mTile; - boolean tSkip = tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, - tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), -2, - tTileEntity) - || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, - tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), -2, - tTileEntity); - - for (int rArray = 0; rArray < this.getSizeInventory(); ++rArray) { - if (this.isValidSlot(rArray) && (tSkip - || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, - tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), - rArray, tTileEntity) - || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, - tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), - rArray, tTileEntity))) { - tList.add(Integer.valueOf(rArray)); - } - } - - int[] arg6 = new int[tList.size()]; - - for (int i = 0; i < arg6.length; ++i) { - arg6[i] = ((Integer) tList.get(i)).intValue(); - } - - return arg6; - } - - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return this.isValidSlot(aIndex) && aStack != null && aIndex < this.mInventory.length - && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, this.mInventory[aIndex])) - && this.allowPutStack(this.mTile, aIndex, (byte) aSide, aStack); - } - - public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return this.isValidSlot(aIndex) && aStack != null && aIndex < this.mInventory.length - && this.allowPullStack(this.mTile, aIndex, (byte) aSide, aStack); - } - - public boolean allowPullStack(TileEntityBase mTile2, int aIndex, byte aSide, ItemStack aStack) { - return aIndex >= 0 && aIndex < this.getSizeInventory(); - } - - public boolean allowPutStack(TileEntityBase aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (aIndex >= 0 && aIndex < this.getSizeInventory()) && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(this.mInventory[aIndex], aStack)); - } - - public ItemStack getStackInSlotOnClosing(int i) { - return null; - } - - public final boolean hasCustomInventoryName() { - return mTile != null ? mTile.hasCustomInventoryName() : false; - } - - - public void markDirty() { - if (mTile != null) { - purgeNulls(); - mTile.markDirty(); - } - } - - public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return true; - } - - public void openInventory() { - - } - - public void closeInventory() { - - } - - @Override - public final String getInventoryName() { - return this.mTile != null ? mTile.getInventoryName() : ""; - } - - public boolean isFull() { - for (int s=0;s getSurroundingBlocks(){ - AutoMap sides = new AutoMap(); - sides.put(getUp()); - sides.put(getDown()); - sides.put(getXPos()); - sides.put(getXNeg()); - sides.put(getZPos()); - sides.put(getZNeg()); - return sides; - } - - public Block getBlockAtPos() { - return getBlockAtPos(this); - } - - public Block getBlockAtPos(BlockPos pos) { - return getBlockAtPos(world, pos); - } - - public Block getBlockAtPos(World world, BlockPos pos) { - return world.getBlock(pos.xPos, pos.yPos, pos.zPos); - } - - public int getMetaAtPos() { - return getMetaAtPos(this); - } - - public int getMetaAtPos(BlockPos pos) { - return getMetaAtPos(world, pos); - } - - public int getMetaAtPos(World world, BlockPos pos) { - return world.getBlockMetadata(pos.xPos, pos.yPos, pos.zPos); - } - - public boolean hasSimilarNeighbour() { - return hasSimilarNeighbour(false); - } - - /** - * @param strict - Does this check Meta Data? - * @return - Does this block have a neighbour that is the same? - */ - public boolean hasSimilarNeighbour(boolean strict) { - for (BlockPos g : getSurroundingBlocks().values()) { - if (getBlockAtPos(g) == getBlockAtPos()) { - if (!strict) { - return true; - } - else { - if (getMetaAtPos() == getMetaAtPos(g)) { - return true; - } - } - } - } - return false; - } - - public AutoMap getSimilarNeighbour() { - return getSimilarNeighbour(false); - } - - /** - * @param strict - Does this check Meta Data? - * @return - Does this block have a neighbour that is the same? - */ - public AutoMap getSimilarNeighbour(boolean strict) { - AutoMap sides = new AutoMap(); - for (BlockPos g : getSurroundingBlocks().values()) { - if (getBlockAtPos(g) == getBlockAtPos()) { - if (!strict) { - sides.put(g); - } - else { - if (getMetaAtPos() == getMetaAtPos(g)) { - sides.put(g); - } - } - } - } - return sides; - } - - public Set getValidNeighboursAndSelf(){ - AutoMap h = getSimilarNeighbour(true); - h.put(this); - Set result = new HashSet(); - for (BlockPos f : h.values()) { - result.add(f); - } - return result; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/CubicObject.java b/src/Java/gtPlusPlus/api/objects/minecraft/CubicObject.java deleted file mode 100644 index 8c76513d09..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/CubicObject.java +++ /dev/null @@ -1,62 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraftforge.common.util.ForgeDirection; - -public class CubicObject { - - public final T NORTH; - public final T SOUTH; - - public final T WEST; - public final T EAST; - - public final T UP; - public final T DOWN; - - public CubicObject(AutoMap aDataSet) { - this(aDataSet.get(0), aDataSet.get(1), aDataSet.get(2), aDataSet.get(3), aDataSet.get(4), aDataSet.get(5)); - } - - public CubicObject(T[] aDataSet) { - this(aDataSet[0], aDataSet[1], aDataSet[2], aDataSet[3], aDataSet[4], aDataSet[5]); - } - - public CubicObject(T aDOWN, T aUP, T aNORTH, T aSOUTH, T aWEST, T aEAST) { - DOWN = aDOWN; - UP = aUP; - NORTH = aNORTH; - SOUTH = aSOUTH; - WEST = aWEST; - EAST = aEAST; - } - - public T get(int aSide) { - return get(ForgeDirection.getOrientation(aSide)); - } - - public T get(ForgeDirection aSide) { - if (aSide == ForgeDirection.DOWN) { - return DOWN; - } - else if (aSide == ForgeDirection.UP) { - return UP; - } - else if (aSide == ForgeDirection.NORTH) { - return NORTH; - } - else if (aSide == ForgeDirection.SOUTH) { - return SOUTH; - } - else if (aSide == ForgeDirection.WEST) { - return WEST; - } - else if (aSide == ForgeDirection.EAST) { - return EAST; - } - else { - return null; - } - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java b/src/Java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java deleted file mode 100644 index 010e522a14..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import net.minecraft.client.Minecraft; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -public class DimChunkPos { - - public final int dimension; - public final int xPos; - public final int zPos; - public final Chunk mainChunk; - - - public DimChunkPos(World world, BlockPos block){ - this.dimension = world.provider.dimensionId; - this.mainChunk = world.getChunkFromBlockCoords(block.xPos, block.zPos); - this.xPos = this.mainChunk.xPosition; - this.zPos = this.mainChunk.zPosition; - } - - - public DimChunkPos(TileEntity tile){ - this.dimension = tile.getWorldObj().provider.dimensionId; - this.mainChunk = tile.getWorldObj().getChunkFromBlockCoords(tile.xCoord, tile.zCoord); - this.xPos = this.mainChunk.xPosition; - this.zPos = this.mainChunk.zPosition; - } - - public DimChunkPos(int dim, int x, int z){ - this.dimension = dim; - this.xPos = x; - this.zPos = z; - Chunk h = Minecraft.getMinecraft().getIntegratedServer().worldServerForDimension(dim).getChunkFromChunkCoords(xPos, zPos); - if (h == null) { - this.mainChunk = null; - } - else { - this.mainChunk = h; - } - } - - public Chunk getChunk() { - if (this.mainChunk != null) { - return this.mainChunk; - } - Chunk h = Minecraft.getMinecraft().getIntegratedServer().worldServerForDimension(this.dimension).getChunkFromChunkCoords(xPos, zPos); - return h; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java b/src/Java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java deleted file mode 100644 index d5db8081dc..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java +++ /dev/null @@ -1,253 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.HashSet; -import java.util.Set; - -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; - -public class FakeBlockPos extends BlockPos { - - private static final long serialVersionUID = -6442245826092414593L; - private transient Block aBlockAtPos; - private int aBlockMetaAtPos = 0; - - public static FakeBlockPos generateBlockPos(String sUUID) { - String[] s2 = sUUID.split("@"); - return new FakeBlockPos(s2); - } - - public FakeBlockPos(String[] s){ - this(Integer.parseInt(s[1]), Integer.parseInt(s[2]), Integer.parseInt(s[3]), Integer.parseInt(s[0])); - } - - public FakeBlockPos(int x, int y, int z, Block aBlock, int aMeta){ - this(x, y, z, 0); - aBlockAtPos = aBlock; - aBlockMetaAtPos = aMeta; - } - - private FakeBlockPos(int x, int y, int z, int dim){ - this(x, y, z, DimensionManager.getWorld(dim)); - } - - private FakeBlockPos(int x, int y, int z, World dim){ - super(x, y, z, null); - } - - public String getLocationString() { - String S = ""+this.xPos+"@"+this.yPos+"@"+this.zPos; - return S; - } - - public String getUniqueIdentifier() { - String S = ""+this.xPos+"@"+this.yPos+"@"+this.zPos+this.aBlockAtPos.getLocalizedName()+"@"+this.aBlockMetaAtPos; - return S; - } - - @Override - public int hashCode() { - int hash = 5; - hash += (13 * this.xPos); - hash += (19 * this.yPos); - hash += (31 * this.zPos); - hash += (17 * this.dim); - return hash; - } - - @Override - public boolean equals(Object other) { - if (other == null) { - return false; - } - if (other == this) { - return true; - } - if(!(other instanceof FakeBlockPos)) { - return false; - } - FakeBlockPos otherPoint = (FakeBlockPos) other; - return this.xPos == otherPoint.xPos && this.yPos == otherPoint.yPos && this.zPos == otherPoint.zPos; - } - - public int distanceFrom(FakeBlockPos target) { - if (target.dim != this.dim) { - return Short.MIN_VALUE; - } - return distanceFrom(target.xPos, target.yPos, target.zPos); - } - - /** - * - * @param x X coordinate of target. - * @param y Y coordinate of target. - * @param z Z coordinate of target. - * @return square of distance - */ - public int distanceFrom(int x, int y, int z) { - int distanceX = this.xPos - x; - int distanceY = this.yPos - y; - int distanceZ = this.zPos - z; - return distanceX * distanceX + distanceY * distanceY + distanceZ * distanceZ; - } - - public boolean isWithinRange(FakeBlockPos target, int range) { - if (target.dim != this.dim) { - return false; - } - return isWithinRange(target.xPos, target.yPos, target.zPos, range); - } - - public boolean isWithinRange(int x, int y, int z, int range) { - return distanceFrom(x, y, z) <= (range * range); - } - - - public FakeBlockPos getUp() { - return new FakeBlockPos(this.xPos, this.yPos+1, this.zPos, this.dim); - } - - public FakeBlockPos getDown() { - return new FakeBlockPos(this.xPos, this.yPos-1, this.zPos, this.dim); - } - - public FakeBlockPos getXPos() { - return new FakeBlockPos(this.xPos+1, this.yPos, this.zPos, this.dim); - } - - public FakeBlockPos getXNeg() { - return new FakeBlockPos(this.xPos-1, this.yPos, this.zPos, this.dim); - } - - public FakeBlockPos getZPos() { - return new FakeBlockPos(this.xPos, this.yPos, this.zPos+1, this.dim); - } - - public FakeBlockPos getZNeg() { - return new FakeBlockPos(this.xPos, this.yPos, this.zPos-1, this.dim); - } - - public AutoMap getSurroundingBlocks(){ - AutoMap sides = new AutoMap(); - sides.put(getUp()); - sides.put(getDown()); - sides.put(getXPos()); - sides.put(getXNeg()); - sides.put(getZPos()); - sides.put(getZNeg()); - return sides; - } - - public Block getBlockAtPos() { - return getBlockAtPos(this); - } - - public Block getBlockAtPos(FakeBlockPos pos) { - return getBlockAtPos(world, pos); - } - - public Block getBlockAtPos(World world, FakeBlockPos pos) { - return aBlockAtPos; - } - - public int getMetaAtPos() { - return getMetaAtPos(this); - } - - public int getMetaAtPos(FakeBlockPos pos) { - return getMetaAtPos(world, pos); - } - - public int getMetaAtPos(World world, FakeBlockPos pos) { - return aBlockMetaAtPos; - } - - public boolean hasSimilarNeighbour() { - return hasSimilarNeighbour(false); - } - - /** - * @param strict - Does this check Meta Data? - * @return - Does this block have a neighbour that is the same? - */ - public boolean hasSimilarNeighbour(boolean strict) { - for (BlockPos g : getSurroundingBlocks().values()) { - if (getBlockAtPos(g) == getBlockAtPos()) { - if (!strict) { - return true; - } - else { - if (getMetaAtPos() == getMetaAtPos(g)) { - return true; - } - } - } - } - return false; - } - - public AutoMap getSimilarNeighbour() { - return getSimilarNeighbour(false); - } - - /** - * @param strict - Does this check Meta Data? - * @return - Does this block have a neighbour that is the same? - */ - public AutoMap getSimilarNeighbour(boolean strict) { - AutoMap sides = new AutoMap(); - for (BlockPos g : getSurroundingBlocks().values()) { - if (getBlockAtPos(g) == getBlockAtPos()) { - if (!strict) { - sides.put(g); - } - else { - if (getMetaAtPos() == getMetaAtPos(g)) { - sides.put(g); - } - } - } - } - return sides; - } - - public Set getValidNeighboursAndSelf(){ - AutoMap h = getSimilarNeighbour(true); - h.put(this); - Set result = new HashSet(); - for (BlockPos f : h.values()) { - result.add(f); - } - return result; - } - - /** - * Called when a plant grows on this block, only implemented for saplings using the WorldGen*Trees classes right now. - * Modder may implement this for custom plants. - * This does not use ForgeDirection, because large/huge trees can be located in non-representable direction, - * so the source location is specified. - * Currently this just changes the block to dirt if it was grass. - * - * Note: This happens DURING the generation, the generation may not be complete when this is called. - * - * @param world Current world - * @param x Soil X - * @param y Soil Y - * @param z Soil Z - * @param sourceX Plant growth location X - * @param sourceY Plant growth location Y - * @param sourceZ Plant growth location Z - */ - public void onPlantGrow(FakeWorld world, int x, int y, int z, int sourceX, int sourceY, int sourceZ) - { - if (getBlockAtPos() == Blocks.grass || getBlockAtPos() == Blocks.farmland) - { - this.aBlockAtPos = Blocks.dirt; - this.aBlockMetaAtPos = 0; - } - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java b/src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java deleted file mode 100644 index 8ee033a341..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/FakeWorld.java +++ /dev/null @@ -1,173 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.HashMap; - -import gregtech.api.enums.Materials; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.util.ForgeDirection; - -public class FakeWorld implements IBlockAccess { - - public static HashMap mStaticFakeWorldData; - - public HashMap mFakeWorldData = new HashMap(); - - /** - * Must be an odd number - */ - private int aWorldSize = 99; - private final int aDistanceFromOrigin; - private final int aWorldHeight; - - public FakeWorld() { - this(99); - } - - public FakeWorld(int aSize) { - if (MathUtils.isNumberEven(aSize)) { - aSize++; - } - aWorldSize = aSize; - aDistanceFromOrigin = ((aWorldSize-1)/2); - aWorldHeight = aDistanceFromOrigin >= 255 ? 255 : aDistanceFromOrigin; - Logger.WARNING("Created a Fake World with data:"); - Logger.WARNING("World Size: "+aWorldSize); - Logger.WARNING("Distance from Origin in each dir: "+aDistanceFromOrigin); - Logger.WARNING("World Height: "+aWorldHeight); - init(); - } - - public void init() { - - /*if (mStaticFakeWorldData == null) { - Logger.WARNING("Setting all Blocks in Fake World to Air."); - mStaticFakeWorldData = new HashMap(); - for (int y=0;y<=aWorldHeight;y++) { - for (int x=-aDistanceFromOrigin;x<=aDistanceFromOrigin;x++) { - for (int z=-aDistanceFromOrigin;z<=aDistanceFromOrigin;z++) { - FakeBlockPos aTempPos = new FakeBlockPos(x, y, z, Blocks.air, 0); - mStaticFakeWorldData.put(aTempPos.getLocationString(), aTempPos); - } - } - } - }*/ - //if (mStaticFakeWorldData != null) { - //Logger.WARNING(" Instancing static air world."); - mFakeWorldData = new HashMap(); - //mFakeWorldData = (HashMap) mStaticFakeWorldData.clone(); - //} - - - //Logger.WARNING("Initialisation of FakeWorld is now complete."); - } - - public FakeBlockPos getBlockAtCoords(int x, int y, int z) { - String S = ""+x+"@"+y+"@"+z; - FakeBlockPos aBlock = mFakeWorldData.get(S); - if (aBlock == null) { - return new FakeBlockPos(x, y, z, Blocks.air, 0); - } - return aBlock; - } - - public void setBlockAtCoords(int x, int y, int z, Block aBlock, int aMeta) { - FakeBlockPos aTempPos = new FakeBlockPos(x, y, z, aBlock, aMeta); - Logger.WARNING("Setting "+x+", "+y+", "+z+" to "+aBlock.getLocalizedName()+":"+aMeta); - mFakeWorldData.put(aTempPos.getLocationString(), aTempPos); - } - - public AutoMap getAllBlocksStoredInFakeWorld(){ - AutoMap aOutput = new AutoMap(); - for (FakeBlockPos aPos : mFakeWorldData.values()) { - if (aPos == null || aPos.getBlockAtPos() == Blocks.air) { - continue; - } - else { - ItemStack aTempStack = ItemUtils.simpleMetaStack(aPos.getBlockAtPos(), aPos.getMetaAtPos(), 1); - if (ItemUtils.checkForInvalidItems(aTempStack)) { - //Logger.WARNING("Output: "+aTempStack.getDisplayName()); - aOutput.put(aTempStack); - } - } - } - return aOutput; - } - - public Block getBlock(int x, int y, int z) { - FakeBlockPos aPos = getBlockAtCoords(x, y, z); - return aPos.getBlockAtPos(); - } - - public boolean isAirBlock(int x, int y, int z) { - Block aBlock = getBlock(x, y, z); - return aBlock == Blocks.air || aBlock.getMaterial() == Material.air; - } - - - - - - - - - - - - - - @Override - public TileEntity getTileEntity(int p_147438_1_, int p_147438_2_, int p_147438_3_) { - return null; - } - - @Override - public int getLightBrightnessForSkyBlocks(int p_72802_1_, int p_72802_2_, int p_72802_3_, int p_72802_4_) { - return 0; - } - - @Override - public int getBlockMetadata(int x, int y, int z) { - return getBlockAtCoords(x, y, z).getMetaAtPos(); - } - - @Override - public int isBlockProvidingPowerTo(int p_72879_1_, int p_72879_2_, int p_72879_3_, int p_72879_4_) { - return 0; - } - - @Override - public BiomeGenBase getBiomeGenForCoords(int p_72807_1_, int p_72807_2_) { - return BiomeGenBase.plains; - } - - @Override - public int getHeight() { - return aWorldHeight; - } - - @Override - public boolean extendedLevelsInChunkCache() { - return false; - } - - @Override - public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) { - if (!isAirBlock(x, y, z)) { - return true; - } - return false; - } - - - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java b/src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java deleted file mode 100644 index 2535046792..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import gregtech.api.GregTech_API; - -import gtPlusPlus.core.lib.CORE; -import net.minecraftforge.fluids.Fluid; - -public class FluidGT6 extends Fluid implements Runnable -{ - private final short[] mRGBa; - public final String mTextureName; - - public FluidGT6(final String aName, final String aTextureName, final short[] aRGBa) { - super(aName); - this.mRGBa = aRGBa; - this.mTextureName = aTextureName; - if (GregTech_API.sGTBlockIconload != null) { - GregTech_API.sGTBlockIconload.add(this); - } - } - - @Override - public int getColor() { - return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2])); - } - - @Override - public void run() { - this.setIcons(GregTech_API.sBlockIcons.registerIcon(CORE.MODID+ ":" + "fluids/fluid." + this.mTextureName)); - } -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java b/src/Java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java deleted file mode 100644 index ec13c82ea0..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -public class FormattedTooltipString { - - public final String mText; - public final boolean mPrefix; - - public FormattedTooltipString(String aText, boolean aPrefix) { - mText = aText; - mPrefix = aPrefix; - } - - public String getTooltip(Object aTagValue) { - String aTip; - - if (mPrefix) { - aTip = mText+": "+aTagValue.toString(); - } - else { - aTip = ""+aTagValue.toString()+": "+mText; - } - return aTip; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/GenericStack.java b/src/Java/gtPlusPlus/api/objects/minecraft/GenericStack.java deleted file mode 100644 index 9c1b231961..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/GenericStack.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public class GenericStack { - - private ItemStack mItemStack; - private FluidStack mFluidStack; - - public GenericStack(ItemStack s){ - this.mItemStack = s; - this.mFluidStack = null; - } - - public GenericStack(FluidStack f){ - this.mItemStack = null; - this.mFluidStack = f; - } - - public GenericStack() { - this.mItemStack = null; - this.mFluidStack = null; - } - - public synchronized final FluidStack getFluidStack() { - return mFluidStack; - } - - public synchronized final ItemStack getItemStack() { - return mItemStack; - } - - public synchronized final void setItemStack(ItemStack mItemStack) { - this.mItemStack = mItemStack; - } - - public synchronized final void setFluidStack(FluidStack mFluidStack) { - this.mFluidStack = mFluidStack; - } -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java b/src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java deleted file mode 100644 index fa85f23cf3..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.core.handler.COMPAT_HANDLER; - -public abstract class ItemPackage implements RunnableWithInfo { - - public ItemPackage() { - this(false); - } - - public ItemPackage(boolean hasExtraLateRun) { - // Register for late run - COMPAT_HANDLER.mObjectsToRunInPostInit.put(this); - if (hasExtraLateRun) { - COMPAT_HANDLER.mObjectsToRunInOnLoadComplete.put(this); - } - init(); - } - - @Override - public final void run() { - generateRecipes(); - } - - @Override - public final String getInfoData() { - return errorMessage(); - } - - public abstract String errorMessage(); - - public abstract boolean generateRecipes(); - - private final void init() { - items(); - blocks(); - fluids(); - } - - public abstract void items(); - - public abstract void blocks(); - - public abstract void fluids(); - - /** - * Override this to handle GT Recipe map manipulation after they're Baked. - * @param event - the {@link FMLLoadCompleteEvent}. - * @return - Did we do anything? - */ - public boolean onLoadComplete(FMLLoadCompleteEvent event) { - return false; - }; - - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java b/src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java deleted file mode 100644 index 476926826b..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class ItemStackData { - - protected final Item mItem; - protected final int mDamage; - protected final int mStackSize; - protected final NBTTagCompound mNBT; - protected final String mUniqueDataTag; - - public ItemStackData (ItemStack aStack) { - mItem = aStack.getItem(); - mDamage = aStack.getItemDamage(); - mStackSize = aStack.stackSize; - mNBT = (aStack.getTagCompound() != null ? aStack.getTagCompound() : new NBTTagCompound()); - mUniqueDataTag = ""+Item.getIdFromItem(mItem)+""+mDamage+""+mStackSize+""+mNBT.getId(); - } - - public String getUniqueDataIdentifier() { - return this.mUniqueDataTag; - } - - public ItemStack getStack() { - ItemStack aTemp = ItemUtils.simpleMetaStack(mItem, mDamage, mStackSize); - aTemp.setTagCompound(mNBT); - return aTemp; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java b/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java deleted file mode 100644 index 78e925fe04..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java +++ /dev/null @@ -1,123 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.Collection; -import java.util.Iterator; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Recipe; - -import gtPlusPlus.api.objects.data.AutoMap; - -public class NoConflictGTRecipeMap implements Collection { - - private AutoMap mRecipeCache = new AutoMap(); - private final IGregTechTileEntity mMachineType; - - public NoConflictGTRecipeMap () { - this(null); - } - - public NoConflictGTRecipeMap (IGregTechTileEntity tile0) { - this.mMachineType = tile0; - } - public boolean put(GT_Recipe recipe) { - return add(recipe); - } - - public boolean add(GT_Recipe recipe) { - return mRecipeCache.setValue(recipe); - } - - public Collection getRecipeMap() { - return mRecipeCache.values(); - } - - public boolean isMapValidForMachine(IGregTechTileEntity tile) { - return tile == mMachineType; - } - - @Override - public boolean addAll(Collection arg0) { - int a = 0; - for (Object v : arg0) { - if (!this.mRecipeCache.containsValue((GT_Recipe) v)) { - this.mRecipeCache.put((GT_Recipe) v); - a++; - } - } - return a > 0; - } - - @Override - public void clear() { - mRecipeCache.clear(); - } - - @Override - public boolean contains(Object arg0) { - return mRecipeCache.containsValue((GT_Recipe) arg0); - } - - @Override - public boolean containsAll(Collection arg0) { - int a = 0; - for (Object v : arg0) { - if (this.mRecipeCache.containsValue((GT_Recipe) v)) { - a++; - } - } - return a == arg0.size(); - } - - @Override - public boolean isEmpty() { - return mRecipeCache.isEmpty(); - } - - @Override - public Iterator iterator() { - return mRecipeCache.iterator(); - } - - @Override - public boolean remove(Object arg0) { - return mRecipeCache.remove((GT_Recipe) arg0); - } - - @Override - public boolean removeAll(Collection arg0) { - int a = 0; - for (Object v : arg0) { - if (this.mRecipeCache.containsValue((GT_Recipe) v)) { - this.mRecipeCache.remove((GT_Recipe) v); - a++; - } - } - return a > 0; - } - - @Override - public boolean retainAll(Collection arg0) { - int mStartSize = this.mRecipeCache.size(); - this.mRecipeCache = (AutoMap) arg0; - int mEndsize = this.mRecipeCache.size(); - return mStartSize != mEndsize; - } - - @Override - public int size() { - return this.mRecipeCache.size(); - } - - @Override - public Object[] toArray() { - return this.mRecipeCache.toArray(); - } - - @Override - public T[] toArray(T[] arg0) { - return (T[]) this.mRecipeCache.toArray(); - } - - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/SafeTexture.java b/src/Java/gtPlusPlus/api/objects/minecraft/SafeTexture.java deleted file mode 100644 index 7c418b5a77..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/SafeTexture.java +++ /dev/null @@ -1,64 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.HashMap; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gtPlusPlus.core.util.Utils; -import net.minecraft.util.IIcon; - -/** - * A Server Side safe object that can hold {@link IIcon}s. - * @author Alkalus - * - */ -public class SafeTexture implements Runnable { - - @SideOnly(Side.CLIENT) - private static final HashMap mHashToIconCache = new HashMap(); - - @SideOnly(Side.CLIENT) - private static final HashMap mPathToHashCash = new HashMap(); - - private static final HashMap mTextureObjectCache = new HashMap(); - - private final int mHash; - - private final String mTextureName; - - private final static String getKey(String aTexPath) { - String aNameKey = Utils.sanitizeString(aTexPath); - aNameKey = aNameKey.replace('/', ' '); - aNameKey = aNameKey.toLowerCase(); - return aNameKey; - } - - public static SafeTexture register(String aTexturePath) { - String aNameKey = getKey(aTexturePath); - SafeTexture g = mTextureObjectCache.get(aNameKey); - if (g == null) { - g = new SafeTexture(aTexturePath); - mTextureObjectCache.put(aNameKey, g); - mPathToHashCash.put(aTexturePath, aTexturePath.hashCode()); - } - return g; - } - - private SafeTexture(String aTexturePath) { - mTextureName = aTexturePath; - mHash = getKey(aTexturePath).hashCode(); - GregTech_API.sGTBlockIconload.add(this); - } - - @SideOnly(Side.CLIENT) - public IIcon getIcon() { - return mHashToIconCache.get(mHash); - } - - @Override - public void run() { - mHashToIconCache.put(getKey(mTextureName).hashCode(), GregTech_API.sBlockIcons.registerIcon(mTextureName)); - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java deleted file mode 100644 index c0e9b20c54..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java +++ /dev/null @@ -1,250 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.ShapedOreRecipe; - -public class ShapedRecipe { - - private final static String CHARS = "abcdefghijklmnop"; - public ShapedOreRecipe mRecipe; - - ItemStack[] mBlackList = null; - - public ShapedRecipe( - Object aInput1, Object aInput2, Object aInput3, - Object aInput4, Object aInput5, Object aInput6, - Object aInput7, Object aInput8, Object aInput9, - ItemStack aOutput) { - - this(new Object[] {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, aOutput); - - } - - public ShapedRecipe(Object[] aInputs, ItemStack aOutput) { - String aGridWhole = ""; - String aGrid[] = new String[3]; - char[] aChar = new char[9]; - String[] aLoggingInfo = new String[9]; - - if (mBlackList == null) { - mBlackList = new ItemStack[] {}; - } - - //Just to be safe - try { - int xSlot = 0; - int xNull = 0; - for (Object u : aInputs) { - String mInfo = ""; - if (u instanceof String) { - mInfo = (String) u; - Logger.RECIPE("Input slot "+xSlot+++" contains "+mInfo); - } - else if (u instanceof ItemStack || u instanceof Item) { - if (u instanceof Item) { - u = ItemUtils.getSimpleStack((Item) u); - } - mInfo = ((ItemStack) u).getDisplayName(); - Logger.RECIPE("Input slot "+xSlot+++" contains "+mInfo); - } - else if (u == null) { - xNull++; - } - } - Logger.RECIPE("Found "+xNull+" null inputs."); - //Check if the output is invalid - if (aOutput != null && xNull < 9) { - - for (ItemStack q : mBlackList) { - if (q != null) { - if (q.isItemEqual(aOutput)) { - Logger.RECIPE("Found recipe Alkalus is Debugging."); - } - } - } - - Object[] mVarags2 = null; - Logger.RECIPE("Generating Shaped Crafting Recipe for "+aOutput.getDisplayName()); - - if (aInputs.length < 9 || aInputs.length > 9) { - Logger.RECIPE("[Fix] Recipe for "+aOutput.getDisplayName()+" has incorrect number of inputs. Size: "+aInputs.length+"."); - //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(1)); - //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(2)); - //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(3)); - //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(4)); - //Logger.RECIPE("Reciped exists at location: "+ReflectionUtils.getMethodName(1)); - } - - - //Build a Pair for each slot - AutoMap> aRecipePairs = new AutoMap>(); - int aCharSlot = 0; - int aMemSlot = 0; - int aInfoSlot = 0; - for (Object stack : aInputs) { - if (stack != null) { - String mInfo = ""; - if (stack instanceof String) { - mInfo = (String) stack; - } - else if (stack instanceof ItemStack || stack instanceof Item) { - if (stack instanceof Item) { - stack = ItemUtils.getSimpleStack((Item) stack); - } - mInfo = ((ItemStack) stack).getDisplayName(); - } - aRecipePairs.put(new Pair(CHARS.charAt(aCharSlot), stack)); - Logger.RECIPE("Storing '"+CHARS.charAt(aCharSlot)+"' with an object of type "+stack.getClass().getSimpleName()+" and a value of "+mInfo); - aChar[aMemSlot++] = CHARS.charAt(aCharSlot); - aCharSlot++; - aLoggingInfo[aInfoSlot++] = mInfo; - } - else { - aRecipePairs.put(new Pair(' ', (ItemStack) null)); - Logger.RECIPE("Storing ' ' with an object of type null"); - aChar[aMemSlot++] = ' '; - aLoggingInfo[aInfoSlot++] = "Empty"; - } - } - - Logger.RECIPE(aRecipePairs.size()+" Char|Object pairs registered for recipe."); - //If we have enough valid slots, iterate them and build a String which represents the entire grid. - //If this String is the correct length, we will split it into thirds and build the grid String array. - if (aRecipePairs.size() == 9) { - - for (Pair h : aRecipePairs) { - if (h.getKey() != null) { - aGridWhole += String.valueOf(h.getKey()); - Logger.RECIPE("Adding '"+String.valueOf(h.getKey())+"' to aGridWhole."); - } - } - - Logger.RECIPE("aGridWhole: "+aGridWhole+" | size: "+aGridWhole.length()); - - //Build crafting grid - if (aGridWhole.length() == 9) { - Logger.RECIPE("aGridWhole size == 9"); - aGrid[0] = ""+aGridWhole.charAt(0)+aGridWhole.charAt(1)+aGridWhole.charAt(2); - aGrid[1] = ""+aGridWhole.charAt(3)+aGridWhole.charAt(4)+aGridWhole.charAt(5); - aGrid[2] = ""+aGridWhole.charAt(6)+aGridWhole.charAt(7)+aGridWhole.charAt(8); - } - else { - Logger.RECIPE("[Fix] Grid length for recipe outputting "+aOutput.getDisplayName()+" is not 9."); - } - - //Rebuild the Map without spaces - aRecipePairs.clear(); - aCharSlot = 0; - - //The amount of spaces in the Varags that the Shape strings takes. - //Currently they are inserted as a single array into index 0. - final int KEY_COUNTER = 1; - - int counter = KEY_COUNTER; - for (Object stack : aInputs) { - if (stack != null) { - String mInfo = ""; - if (stack instanceof String) { - mInfo = (String) stack; - } - else if (stack instanceof ItemStack || stack instanceof Item) { - if (stack instanceof Item) { - stack = ItemUtils.getSimpleStack((Item) stack); - } - mInfo = ((ItemStack) stack).getDisplayName(); - } - aRecipePairs.put(new Pair(CHARS.charAt(aCharSlot), stack)); - Logger.RECIPE("Registering Pair of '"+CHARS.charAt(aCharSlot)+"' and a "+stack.getClass().getSimpleName()+" object. Object has a value of "+mInfo); - aCharSlot++; - counter++; - } - } - - Logger.RECIPE("Counter started at "+KEY_COUNTER+", counter is now at "+counter+". Trying to create Varag array with a size of "+(KEY_COUNTER+(counter-KEY_COUNTER)*2)); - //Counter started at 3, counter is now at 4. Trying to create Varag array with a size of 2 - - //Register the shaped grid straight to the varags - mVarags2 = new Object[(KEY_COUNTER+(counter-KEY_COUNTER)*2)]; - /*mVarags2[0] = aGrid[0]; - mVarags2[1] = aGrid[1]; - mVarags2[2] = aGrid[2];*/ - mVarags2[0] = aGrid; - - //Add Each Char, then Item to the varags, sequentially. - int counter2 = KEY_COUNTER; - for (Pair r : aRecipePairs) { - char c = r.getKey(); - Object o = r.getValue(); - - if (o instanceof ItemStack || o instanceof Item) { - if (o instanceof Item) { - o = ItemUtils.getSimpleStack((Item) o); - } - o = ((ItemStack) o).copy(); - } - - mVarags2[counter2] = (char) c; - mVarags2[counter2+1] = o; - counter2 += 2; - } - - Logger.RECIPE("Recipe Summary"); - Logger.RECIPE("+ = + = + = +"); - Logger.RECIPE("= "+aChar[0]+" = "+aChar[1]+" = "+aChar[2]+" ="); - Logger.RECIPE("+ = + = + = +"); - Logger.RECIPE("= "+aChar[3]+" = "+aChar[4]+" = "+aChar[5]+" ="); - Logger.RECIPE("+ = + = + = +"); - Logger.RECIPE("= "+aChar[6]+" = "+aChar[7]+" = "+aChar[8]+" ="); - Logger.RECIPE("+ = + = + = +"); - for (int r=0;r<9;r++) { - if (aChar[r] != ' ') { - Logger.RECIPE(""+aChar[r]+" : "+aLoggingInfo[r]); - } - } - - } - else { - Logger.RECIPE("[Fix] Recipe for "+aOutput.getDisplayName()+" contains a strange number of inputs."); - } - - //Try set the recipe for this object. - ShapedOreRecipe testRecipe = null; - try { - testRecipe = new ShapedOreRecipe(aOutput, mVarags2); - } - catch (Throwable t) { - Logger.RECIPE("[Fix][0] Error thrown when making a ShapedOreRecipe object."); - t.printStackTrace(); - } - if (testRecipe == null) { - this.mRecipe = null; - Logger.RECIPE("[Fix] Failed to generate a shaped recipe."); - } - else { - this.mRecipe = testRecipe; - Logger.RECIPE("Generated a shaped recipe successfully."); - } - } - - //Output was not valid - else { - this.mRecipe = null; - Logger.RECIPE("[Fix] Failed to generate a shaped recipe. Output was not valid."); - } - - - } - catch(Throwable t) { - this.mRecipe = null; - Logger.RECIPE("[Fix][1] Error thrown when making a ShapedOreRecipe object."); - t.printStackTrace(); - } - - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/TexturePackage.java b/src/Java/gtPlusPlus/api/objects/minecraft/TexturePackage.java deleted file mode 100644 index e610f8fdf0..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/TexturePackage.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.LinkedHashMap; -import java.util.Set; - -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraft.util.IIcon; - -public class TexturePackage { - - private AutoMap mAnimationArray = new AutoMap(); - - public IIcon getFrame(int aFrame) { - if (aFrame < 0 || aFrame >= mAnimationArray.size()) { - return mAnimationArray.get(0); - } - return mAnimationArray.get(aFrame); - } - - public boolean addFrame(IIcon aFrame) { - if (aFrame != null) { - return mAnimationArray.add(aFrame); - } - return false; - } - - public boolean addFrames(AutoMap aFrames) { - for (IIcon h : aFrames) { - if (!addFrame(h)) { - return false; - } - } - return true; - } - - public boolean addFrames(LinkedHashMap aFrames) { - for (IIcon h : aFrames.values()) { - if (!addFrame(h)) { - return false; - } - } - return true; - } - - public boolean addFrames(Set aFrames) { - for (IIcon h : aFrames) { - if (!addFrame(h)) { - return false; - } - } - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java b/src/Java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java deleted file mode 100644 index 0ff6e112ac..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.api.objects.minecraft; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.GTplusplus.INIT_PHASE; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; -import gtPlusPlus.core.util.Utils; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -public class ThreadPooCollector extends Thread { - - public boolean canRun = true; - public boolean isRunning = false; - - private static final long INIT_TIME; - private static long internalTickCounter = 0; - - private static final ThreadPooCollector mThread; - private static final HashMap> mPooCollectors = new LinkedHashMap>(); - - - static { - mThread = new ThreadPooCollector(); - INIT_TIME = (System.currentTimeMillis()); - } - - public ThreadPooCollector() { - setName("gtpp.handler.poop"); - start(); - } - - public static ThreadPooCollector getInstance() { - return mThread; - } - - public static void addTask(TileEntityPooCollector aTile) { - BlockPos aTempPos = new BlockPos(aTile); - mPooCollectors.put(aTempPos.getUniqueIdentifier(), new Pair(aTempPos, aTile)); - } - - public static void stopThread() { - mThread.canRun = false; - } - - - @Override - public void run() { - - if (!isRunning) { - isRunning = true; - } - else { - return; - } - - while (canRun) { - if (mPooCollectors.isEmpty() || GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED) { - continue; - } else { - internalTickCounter = Utils.getTicksFromSeconds( - Utils.getSecondsFromMillis(Utils.getMillisSince(INIT_TIME, System.currentTimeMillis()))); - if (internalTickCounter % 100 == 0) { - for (Pair pair : mPooCollectors.values()) { - if (pair != null) { - BlockPos p = pair.getKey(); - if (p != null) { - if (p.world != null) { - World w = p.world; - if (w == null) { - continue; - } - Chunk c = w.getChunkFromBlockCoords(p.xPos, p.zPos); - if (c != null) { - if (c.isChunkLoaded) { - int startX = p.xPos - 2; - int startY = p.yPos; - int startZ = p.zPos - 2; - int endX = p.xPos + 3; - int endY = p.yPos + 5; - int endZ = p.zPos + 3; - AxisAlignedBB box = AxisAlignedBB.getBoundingBox(startX, startY, startZ, - endX, endY, endZ); - if (box != null) { - @SuppressWarnings("unchecked") - List animals = w.getEntitiesWithinAABB(EntityAnimal.class, box); - if (animals != null && !animals.isEmpty()) { - pair.getValue().onPostTick(animals); - } - } else { - continue; - } - } - } - } - } - } - } - } - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java b/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java deleted file mode 100644 index 78341db7a1..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.api.objects.minecraft.multi; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.item.ItemStack; - -public class NoEUBonusMultiBehaviour extends SpecialMultiBehaviour { - - public NoEUBonusMultiBehaviour() { - // Used by other mods which may wish to not obtain bonus outputs on their Sifting or Maceration recipes. - } - - @Override - public ItemStack getTriggerItem() { - return GregtechItemList.Chip_MultiNerf_NoEuBonus.get(1); - } - - @Override - public String getTriggerItemTooltip() { - return "Prevents EU discounts on GT++ multiblocks when used"; - } - - @Override - public int getEUPercent() { - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java b/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java deleted file mode 100644 index 8137f2573d..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.api.objects.minecraft.multi; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.item.ItemStack; - -public class NoOutputBonusMultiBehaviour extends SpecialMultiBehaviour { - - public NoOutputBonusMultiBehaviour() { - // Used by other mods which may wish to not obtain bonus outputs on their Sifting or Maceration recipes. - } - - @Override - public ItemStack getTriggerItem() { - return GregtechItemList.Chip_MultiNerf_NoOutputBonus.get(1); - } - - @Override - public String getTriggerItemTooltip() { - return "Prevents bonus output % on GT++ multiblocks when used"; - } - - @Override - public int getOutputChanceRoll() { - return 10000; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java b/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java deleted file mode 100644 index fe7a90960d..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.api.objects.minecraft.multi; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.item.ItemStack; - -public class NoSpeedBonusMultiBehaviour extends SpecialMultiBehaviour { - - public NoSpeedBonusMultiBehaviour() { - // Used by other mods which may wish to not obtain bonus outputs on their Sifting or Maceration recipes. - } - - @Override - public ItemStack getTriggerItem() { - return GregtechItemList.Chip_MultiNerf_NoSpeedBonus.get(1); - } - - @Override - public String getTriggerItemTooltip() { - return "Prevents speed bonuses on GT++ multiblocks when used"; - } - - @Override - public int getSpeedBonusPercent() { - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java b/src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java deleted file mode 100644 index e562ccc40b..0000000000 --- a/src/Java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.api.objects.minecraft.multi; - -import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; - -/** - * Extend this class to implement custom behaviour for multiblocks. - * The Trigger item when in a special slot or input bus, will cause the multiblock to behave as specified. - * Not overriding a method here will cause the default values to be used. - * @author Alkalus - * - */ -public abstract class SpecialMultiBehaviour { - - private final int mMaxParallelRecipes = Short.MIN_VALUE; - private final int mEUPercent = Short.MIN_VALUE; - private final int mSpeedBonusPercent = Short.MIN_VALUE; - private final int mOutputChanceRoll = Short.MIN_VALUE; - - public abstract ItemStack getTriggerItem(); - - public abstract String getTriggerItemTooltip(); - - public int getMaxParallelRecipes() { - return this.mMaxParallelRecipes; - } - - public int getEUPercent() { - return this.mEUPercent; - } - - public int getSpeedBonusPercent() { - return this.mSpeedBonusPercent; - } - - public int getOutputChanceRoll() { - return this.mOutputChanceRoll; - } - - public final boolean isTriggerItem(ItemStack aToMatch) { - return GT_Utility.areStacksEqual(getTriggerItem(), aToMatch, false); - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java b/src/Java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java deleted file mode 100644 index b2dc984456..0000000000 --- a/src/Java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright 2005, Nick Galbreath -- nickg [at] modp [dot] com - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the modp.com nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This is the standard "new" BSD license: - * http://www.opensource.org/licenses/bsd-license.php - */ - -package gtPlusPlus.api.objects.random; -import java.math.BigInteger; -import java.security.SecureRandom; -import java.util.Random; - -import gtPlusPlus.api.interfaces.IRandomGenerator; -import gtPlusPlus.core.util.Utils; - -/** - * The Blum-Blum-Shub random number generator. - * - *

- * The Blum-Blum-Shub is a "cryptographically secure" random number - * generator. It has been proven that predicting the ouput - * is equivalent to factoring n, a large integer generated - * from two prime numbers. - *

- * - *

- * The Algorithm: - *

- *
    - *
  1. - * (setup) generate two secret prime numbers p, q such that - * pq, p ≡ 3 mod 4, q ≡ 3 mod 4. - *
  2. - *
  3. (setup) compute n = pq. n can be re-used, but - * p, and q are secret and should be disposed of.
  4. - *
  5. Generate a (secure) random seed s in the range [1, n -1] - * such that gcd(s, n) = 1. - *
  6. Compute x = s2 mod n
  7. - *
  8. Compute a single random bit with: - *
      - *
    1. x = x2 mod n
    2. - *
    3. return Least-Significant-Bit(x) (i.e. x & 1)
    4. - *
    - * Repeat as necessary. - *
  9. - *
- * - *

- * The code originally appeared in Cryptography for - * Internet and Database Applications , Chapter 4, pages 174-177 - *

- *

- * More details are in the Handbook of Applied Cryptography, - * Section 5.5.2 - *

- * - * @author Nick Galbreath -- nickg [at] modp [dot] com - * @version 3 -- 06-Jul-2005 - * - */ -public class CSPRNG_DO_NOT_USE extends Random implements IRandomGenerator { - - // pre-compute a few values - private static final BigInteger two = BigInteger.valueOf(2L); - - private static final BigInteger three = BigInteger.valueOf(3L); - - private static final BigInteger four = BigInteger.valueOf(4L); - - /** - * main parameter - */ - private BigInteger n; - - private BigInteger state; - - /** - * Generate appropriate prime number for use in Blum-Blum-Shub. - * - * This generates the appropriate primes (p = 3 mod 4) needed to compute the - * "n-value" for Blum-Blum-Shub. - * - * @param bits Number of bits in prime - * @param rand A source of randomness - */ - private static BigInteger getPrime(int bits, Random rand) { - BigInteger p; - while (true) { - p = new BigInteger(bits, 100, rand); - if (p.mod(four).equals(three)) - break; - } - return p; - } - - /** - * This generates the "n value" -- the multiplication of two equally sized - * random prime numbers -- for use in the Blum-Blum-Shub algorithm. - * - * @param bits - * The number of bits of security - * @param rand - * A random instance to aid in generating primes - * @return A BigInteger, the n. - */ - public static BigInteger generateN(int bits, Random rand) { - BigInteger p = getPrime(bits/2, rand); - BigInteger q = getPrime(bits/2, rand); - - // make sure p != q (almost always true, but just in case, check) - while (p.equals(q)) { - q = getPrime(bits, rand); - } - return p.multiply(q); - } - - /** - * Constructor, specifing bits for n - * - * @param bits number of bits - */ - public CSPRNG_DO_NOT_USE(int bits) { - this(bits, new Random()); - } - - /** - * Constructor, generates prime and seed - * - * @param bits - * @param rand - */ - public CSPRNG_DO_NOT_USE(int bits, Random rand) { - this(generateN(bits, rand)); - } - - /** - * A constructor to specify the "n-value" to the Blum-Blum-Shub algorithm. - * The inital seed is computed using Java's internal "true" random number - * generator. - * - * @param n - * The n-value. - */ - public CSPRNG_DO_NOT_USE(BigInteger n) { - this(n, SecureRandom.getSeed(n.bitLength() / 8)); - } - - /** - * A constructor to specify both the n-value and the seed to the - * Blum-Blum-Shub algorithm. - * - * @param n - * The n-value using a BigInteger - * @param seed - * The seed value using a byte[] array. - */ - public CSPRNG_DO_NOT_USE(BigInteger n, byte[] seed) { - this.n = n; - setSeed(seed); - } - - /** - * Sets or resets the seed value and internal state - * - * @param seedBytes - * The new seed. - */ - public void setSeed(byte[] seedBytes) { - // ADD: use hardwired default for n - BigInteger seed = new BigInteger(1, seedBytes); - state = seed.mod(n); - } - - /** - * Returns up to numBit random bits - * - * @return int - */ - @Override - public int next(int numBits) { - // TODO: find out how many LSB one can extract per cycle. - // it is more than one. - int result = 0; - for (int i = numBits; i != 0; --i) { - state = state.modPow(two, n); - result = (result << 1) | (state.testBit(0) == true ? 1 : 0); - } - return result; - } - - - public static CSPRNG_DO_NOT_USE generate(){ - return generate(512); - } - - /** - * @return CSPRNG_DO_NOT_USE - * @Author Draknyte1/Alkalus - */ - public static CSPRNG_DO_NOT_USE generate(int bitsize){ - // First use the internal, stock "true" random number - // generator to get a "true random seed" - SecureRandom r = Utils.generateSecureRandom(); - r.nextInt(); // need to do something for SR to be triggered. - // Use this seed to generate a n-value for Blum-Blum-Shub - // This value can be re-used if desired. - BigInteger nval = CSPRNG_DO_NOT_USE.generateN(bitsize, r); - // now get a seed - byte[] seed = new byte[bitsize/8]; - r.nextBytes(seed); - // now create an instance of BlumBlumShub - CSPRNG_DO_NOT_USE bbs = new CSPRNG_DO_NOT_USE(nval, seed); - return bbs; - } - - - /** - * @return CSPRNG_DO_NOT_USE - * @Author Draknyte1/Alkalus - */ - public static CSPRNG_DO_NOT_USE generate(Random aRandom){ - return generate(512, aRandom); - } - - /** - * @return CSPRNG_DO_NOT_USE - * @Author Draknyte1/Alkalus - */ - public static CSPRNG_DO_NOT_USE generate(int aBitSize, Random aRandom){ - // First use the internal, stock "true" random number - // generator to get a "true random seed" - SecureRandom r = Utils.generateSecureRandom(); - r.nextInt(); // need to do something for SR to be triggered. - // Use this seed to generate a n-value for Blum-Blum-Shub - // This value can be re-used if desired. - int bitsize = aBitSize; - // now create an instance of BlumBlumShub - // do everything almost automatically - CSPRNG_DO_NOT_USE bbs = new CSPRNG_DO_NOT_USE(bitsize, aRandom); - return bbs; - } - -} diff --git a/src/Java/gtPlusPlus/api/objects/random/UUIDGenerator.java b/src/Java/gtPlusPlus/api/objects/random/UUIDGenerator.java deleted file mode 100644 index fec92368f8..0000000000 --- a/src/Java/gtPlusPlus/api/objects/random/UUIDGenerator.java +++ /dev/null @@ -1,449 +0,0 @@ -package gtPlusPlus.api.objects.random; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.Random; -import java.util.UUID; - -/** - * - * Implement modified version of Apache's OpenJPA UUID generator. - * This UUID generator is paired with a Blum-Blum-Shub random number generator - * which in itself is seeded by custom SecureRandom. - * - * The UUID generator class has been converted from a static factory to an instanced factory. - * - */ - -//========================================= APACHE BLOCK ========================================= - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * UUID value generator. Type 1 generator is based on the time-based generator - * in the Apache Commons Id project: http://jakarta.apache.org/commons/sandbox - * /id/uuid.html The type 4 generator uses the standard Java UUID generator. - * - * The type 1 code has been vastly simplified and modified to replace the - * ethernet address of the host machine with the IP, since we do not want to - * require native libs and Java cannot access the MAC address directly. - * - * In spirit, implements the IETF UUID draft specification, found here:
- * http://www1.ics.uci.edu/~ejw/authoring/uuid-guid/draft-leach-uuids-guids-01 - * .txt - * - * @author Abe White, Kevin Sutter - * @since 0.3.3 - */ -public class UUIDGenerator { - - // supported UUID types - public static final int TYPE1 = 1; - public static final int TYPE4 = 4; - // indexes within the uuid array for certain boundaries - private static final byte IDX_TIME_HI = 6; - private static final byte IDX_TYPE = 6; // multiplexed - private static final byte IDX_TIME_MID = 4; - private static final byte IDX_TIME_LO = 0; - private static final byte IDX_TIME_SEQ = 8; - private static final byte IDX_VARIATION = 8; // multiplexed - // indexes and lengths within the timestamp for certain boundaries - private static final byte TS_TIME_LO_IDX = 4; - private static final byte TS_TIME_LO_LEN = 4; - private static final byte TS_TIME_MID_IDX = 2; - private static final byte TS_TIME_MID_LEN = 2; - private static final byte TS_TIME_HI_IDX = 0; - private static final byte TS_TIME_HI_LEN = 2; - // offset to move from 1/1/1970, which is 0-time for Java, to gregorian - // 0-time 10/15/1582, and multiplier to go from 100nsec to msec units - private static final long GREG_OFFSET = 0xB1D069B5400L; - private static final long MILLI_MULT = 10000L; - // type of UUID -- time based - private final static byte TYPE_TIME_BASED = 0x10; - // random number generator used to reduce conflicts with other JVMs, and - // hasher for strings. - private Random RANDOM; - // 4-byte IP address + 2 random bytes to compensate for the fact that - // the MAC address is usually 6 bytes - private byte[] IP; - // counter is initialized to 0 and is incremented for each uuid request - // within the same timestamp window. - private int _counter; - // current timestamp (used to detect multiple uuid requests within same - // timestamp) - private long _currentMillis; - // last used millis time, and a semi-random sequence that gets reset - // when it overflows - private long _lastMillis = 0L; - private static final int MAX_14BIT = 0x3FFF; - private short _seq = 0; - private boolean type1Initialized = false; /* - * Initializer for type 1 UUIDs. Creates random generator and genenerates - * the node portion of the UUID using the IP address. - */ - private synchronized void initializeForType1() { - if (type1Initialized == true) { - return; - } - // note that secure random is very slow the first time - // it is used; consider switching to a standard random - RANDOM = CSPRNG_DO_NOT_USE.generate(); - _seq = (short) RANDOM.nextInt(MAX_14BIT); - - byte[] ip = null; - try { - ip = InetAddress.getLocalHost().getAddress(); - } catch (IOException ioe) { - throw new RuntimeException(ioe); - } - IP = new byte[6]; - RANDOM.nextBytes(IP); - //OPENJPA-2055: account for the fact that 'getAddress' - //may return an IPv6 address which is 16 bytes wide. - for( int i = 0 ; i < ip.length; ++i ) { - IP[2+(i%4)] ^= ip[i]; - } - type1Initialized = true; - } - /** - * Return a unique UUID value. - */ - public byte[] next(int type) { - if (type == TYPE4) { - return createType4(); - } - return createType1(); - } - /* - * Creates a type 1 UUID - */ - public byte[] createType1() { - if (type1Initialized == false) { - initializeForType1(); - } - // set ip addr - byte[] uuid = new byte[16]; - System.arraycopy(IP, 0, uuid, 10, IP.length); - // Set time info. Have to do this processing within a synchronized - // block because of the statics... - long now = 0; - synchronized (UUIDGenerator.class) { - // Get the time to use for this uuid. This method has the side - // effect of modifying the clock sequence, as well. - now = getTime(); - // Insert the resulting clock sequence into the uuid - uuid[IDX_TIME_SEQ] = (byte) ((_seq & 0x3F00) >>> 8); - uuid[IDX_VARIATION] |= 0x80; - uuid[IDX_TIME_SEQ+1] = (byte) (_seq & 0xFF); - } - // have to break up time because bytes are spread through uuid - byte[] timeBytes = Bytes.toBytes(now); - // Copy time low - System.arraycopy(timeBytes, TS_TIME_LO_IDX, uuid, IDX_TIME_LO, - TS_TIME_LO_LEN); - // Copy time mid - System.arraycopy(timeBytes, TS_TIME_MID_IDX, uuid, IDX_TIME_MID, - TS_TIME_MID_LEN); - // Copy time hi - System.arraycopy(timeBytes, TS_TIME_HI_IDX, uuid, IDX_TIME_HI, - TS_TIME_HI_LEN); - //Set version (time-based) - uuid[IDX_TYPE] |= TYPE_TIME_BASED; // 0001 0000 - return uuid; - } - /* - * Creates a type 4 UUID - */ - private byte[] createType4() { - UUID type4 = UUID.randomUUID(); - byte[] uuid = new byte[16]; - longToBytes(type4.getMostSignificantBits(), uuid, 0); - longToBytes(type4.getLeastSignificantBits(), uuid, 8); - return uuid; - } - /* - * Converts a long to byte values, setting them in a byte array - * at a given starting position. - */ - private void longToBytes(long longVal, byte[] buf, int sPos) { - sPos += 7; - for(int i = 0; i < 8; i++) - buf[sPos-i] = (byte)(longVal >>> (i * 8)); - } - - /** - * Return the next unique uuid value as a 16-character string. - */ - public String nextString(int type) { - byte[] bytes = next(type); - try { - return new String(bytes, "ISO-8859-1"); - } catch (Exception e) { - return new String(bytes); - } - } - /** - * Return the next unique uuid value as a 32-character hex string. - */ - public String nextHex(int type) { - return Base16Encoder.encode(next(type)); - } - /** - * Get the timestamp to be used for this uuid. Must be called from - * a synchronized block. - * - * @return long timestamp - */ - // package-visibility for testing - private long getTime() { - if (RANDOM == null) - initializeForType1(); - long newTime = getUUIDTime(); - if (newTime <= _lastMillis) { - incrementSequence(); - newTime = getUUIDTime(); - } - _lastMillis = newTime; - return newTime; - } - /** - * Gets the appropriately modified timestamep for the UUID. Must be called - * from a synchronized block. - * - * @return long timestamp in 100ns intervals since the Gregorian change - * offset - */ - private long getUUIDTime() { - if (_currentMillis != System.currentTimeMillis()) { - _currentMillis = System.currentTimeMillis(); - _counter = 0; // reset counter - } - // check to see if we have created too many uuid's for this timestamp - if (_counter + 1 >= MILLI_MULT) { - // Original algorithm threw exception. Seemed like overkill. - // Let's just increment the timestamp instead and start over... - _currentMillis++; - _counter = 0; - } - // calculate time as current millis plus offset times 100 ns ticks - long currentTime = (_currentMillis + GREG_OFFSET) * MILLI_MULT; - // return the uuid time plus the artificial tick counter incremented - return currentTime + _counter++; - } - /** - * Increments the clock sequence for this uuid. Must be called from a - * synchronized block. - */ - private void incrementSequence() { - // increment, but if it's greater than its 14-bits, reset it - if (++_seq > MAX_14BIT) { - _seq = (short) RANDOM.nextInt(MAX_14BIT); // semi-random - } - } - - //Add Dependant classes internally - - /** - * This class came from the Apache Commons Id sandbox project in support - * of the UUIDGenerator implementation. - * - *

Static methods for managing byte arrays (all methods follow Big - * Endian order where most significant bits are in front).

- */ - public static final class Bytes { - /** - *

Hide constructor in utility class.

- */ - private Bytes() { - } - /** - * Appends two bytes array into one. - * - * @param a A byte[]. - * @param b A byte[]. - * @return A byte[]. - */ - public static byte[] append(byte[] a, byte[] b) { - byte[] z = new byte[a.length + b.length]; - System.arraycopy(a, 0, z, 0, a.length); - System.arraycopy(b, 0, z, a.length, b.length); - return z; - } - /** - * Returns a 8-byte array built from a long. - * - * @param n The number to convert. - * @return A byte[]. - */ - public static byte[] toBytes(long n) { - return toBytes(n, new byte[8]); - } - /** - * Build a 8-byte array from a long. No check is performed on the - * array length. - * - * @param n The number to convert. - * @param b The array to fill. - * @return A byte[]. - */ - public static byte[] toBytes(long n, byte[] b) { - b[7] = (byte) (n); - n >>>= 8; - b[6] = (byte) (n); - n >>>= 8; - b[5] = (byte) (n); - n >>>= 8; - b[4] = (byte) (n); - n >>>= 8; - b[3] = (byte) (n); - n >>>= 8; - b[2] = (byte) (n); - n >>>= 8; - b[1] = (byte) (n); - n >>>= 8; - b[0] = (byte) (n); - - return b; - } - /** - * Build a long from first 8 bytes of the array. - * - * @param b The byte[] to convert. - * @return A long. - */ - public static long toLong(byte[] b) { - return ((((long) b[7]) & 0xFF) - + ((((long) b[6]) & 0xFF) << 8) - + ((((long) b[5]) & 0xFF) << 16) - + ((((long) b[4]) & 0xFF) << 24) - + ((((long) b[3]) & 0xFF) << 32) - + ((((long) b[2]) & 0xFF) << 40) - + ((((long) b[1]) & 0xFF) << 48) - + ((((long) b[0]) & 0xFF) << 56)); - } - /** - * Compares two byte arrays for equality. - * - * @param a A byte[]. - * @param b A byte[]. - * @return True if the arrays have identical contents. - */ - public static boolean areEqual(byte[] a, byte[] b) { - int aLength = a.length; - if (aLength != b.length) { - return false; - } - for (int i = 0; i < aLength; i++) { - if (a[i] != b[i]) { - return false; - } - } - return true; - } - /** - *

Compares two byte arrays as specified by Comparable. - * - * @param lhs - left hand value in the comparison operation. - * @param rhs - right hand value in the comparison operation. - * @return a negative integer, zero, or a positive integer as - * lhs is less than, equal to, or greater than - * rhs. - */ - public static int compareTo(byte[] lhs, byte[] rhs) { - if (lhs == rhs) { - return 0; - } - if (lhs == null) { - return -1; - } - if (rhs == null) { - return +1; - } - if (lhs.length != rhs.length) { - return ((lhs.length < rhs.length) ? -1 : +1); - } - for (int i = 0; i < lhs.length; i++) { - if (lhs[i] < rhs[i]) { - return -1; - } else if (lhs[i] > rhs[i]) { - return 1; - } - } - return 0; - } - /** - * Build a short from first 2 bytes of the array. - * - * @param b The byte[] to convert. - * @return A short. - */ - public static short toShort(byte[] b) { - return (short) ((b[1] & 0xFF) + ((b[0] & 0xFF) << 8)); - } - } - /** - * Base 16 encoder. - * - * @author Marc Prud'hommeaux - */ - public static final class Base16Encoder { - - private final static char[] HEX = new char[]{ - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; - /** - * Convert bytes to a base16 string. - */ - public static String encode(byte[] byteArray) { - StringBuilder hexBuffer = new StringBuilder(byteArray.length * 2); - for (int i = 0; i < byteArray.length; i++) - for (int j = 1; j >= 0; j--) - hexBuffer.append(HEX[(byteArray[i] >> (j * 4)) & 0xF]); - return hexBuffer.toString(); - } - /** - * Convert a base16 string into a byte array. - */ - public static byte[] decode(String s) { - int len = s.length(); - byte[] r = new byte[len / 2]; - for (int i = 0; i < r.length; i++) { - int digit1 = s.charAt(i * 2), digit2 = s.charAt(i * 2 + 1); - if (digit1 >= '0' && digit1 <= '9') - digit1 -= '0'; - else if (digit1 >= 'A' && digit1 <= 'F') - digit1 -= 'A' - 10; - if (digit2 >= '0' && digit2 <= '9') - digit2 -= '0'; - else if (digit2 >= 'A' && digit2 <= 'F') - digit2 -= 'A' - 10; - - r[i] = (byte) ((digit1 << 4) + digit2); - } - return r; - } - } - - - -} - -//========================================= APACHE BLOCK ========================================= - diff --git a/src/Java/gtPlusPlus/api/objects/random/XSTR.java b/src/Java/gtPlusPlus/api/objects/random/XSTR.java deleted file mode 100644 index 6ce1cbeb6c..0000000000 --- a/src/Java/gtPlusPlus/api/objects/random/XSTR.java +++ /dev/null @@ -1,278 +0,0 @@ -package gtPlusPlus.api.objects.random; -/** - * A subclass of java.util.random that implements the Xorshift random number - * generator - * - * - it is 30% faster than the generator from Java's library - it produces - * random sequences of higher quality than java.util.Random - this class also - * provides a clone() function - * - * Usage: XSRandom rand = new XSRandom(); //Instantiation x = rand.nextInt(); - * //pull a random number - * - * To use the class in legacy code, you may also instantiate an XSRandom object - * and assign it to a java.util.Random object: java.util.Random rand = new - * XSRandom(); - * - * for an explanation of the algorithm, see - * http://demesos.blogspot.com/2011/09/pseudo-random-number-generators.html - * - * @author Wilfried Elmenreich University of Klagenfurt/Lakeside Labs - * http://www.elmenreich.tk - * - * This code is released under the GNU Lesser General Public License Version 3 - * http://www.gnu.org/licenses/lgpl-3.0.txt - */ - -import java.util.Random; -import java.util.concurrent.atomic.AtomicLong; - -/** - * XSTR - Xorshift ThermiteRandom - * Modified by Bogdan-G - * 03.06.2016 - * version 0.0.4 - */ -public class XSTR extends Random implements Cloneable { - - private static final long serialVersionUID = 6208727693524452904L; - private long seed; - private long last; - private static final long GAMMA = 0x9e3779b97f4a7c15L; - private static final int PROBE_INCREMENT = 0x9e3779b9; - private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL; - private static final double DOUBLE_UNIT = 0x1.0p-53; // 1.0 / (1L << 53) - private static final float FLOAT_UNIT = 0x1.0p-24f; // 1.0f / (1 << 24) - - /* - MODIFIED BY: Robotia - Modification: Implemented Random class seed generator - */ - /** - * Creates a new pseudo random number generator. The seed is initialized to - * the current time, as if by - * setSeed(System.currentTimeMillis());. - */ - public XSTR() { - this(seedUniquifier() ^ System.nanoTime()); - } - private static final AtomicLong seedUniquifier - = new AtomicLong(8682522807148012L); - - private static long seedUniquifier() { - // L'Ecuyer, "Tables of Linear Congruential Generators of - // Different Sizes and Good Lattice Structure", 1999 - for (;;) { - final long current = seedUniquifier.get(); - final long next = current * 181783497276652981L; - if (seedUniquifier.compareAndSet(current, next)) { - return next; - } - } - } - - /** - * Creates a new pseudo random number generator, starting with the specified - * seed, using setSeed(seed);. - * - * @param seed the initial seed - */ - public XSTR(final long seed) { - this.seed = seed; - } - @Override - public boolean nextBoolean() { - return this.next(1) != 0; - } - - @Override - public double nextDouble() { - return (((long)(this.next(26)) << 27) + this.next(27)) * DOUBLE_UNIT; - } - /** - * Returns the current state of the seed, can be used to clone the object - * - * @return the current seed - */ - public synchronized long getSeed() { - return this.seed; - } - - /** - * Sets the seed for this pseudo random number generator. As described - * above, two instances of the same random class, starting with the same - * seed, produce the same results, if the same methods are called. - * - * @param seed the new seed - */ - @Override - public synchronized void setSeed(final long seed) { - this.seed = seed; - } - - /** - * @return Returns an XSRandom object with the same state as the original - */ - @Override - public XSTR clone() { - try { - super.clone(); - } - catch (CloneNotSupportedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return new XSTR(this.getSeed()); - } - - /** - * Implementation of George Marsaglia's elegant Xorshift random generator - * 30% faster and better quality than the built-in java.util.random see also - * see http://www.javamex.com/tutorials/random_numbers/xorshift.shtml - * - * @param nbits - * @return - */ - @Override - public int next(final int nbits) { - long x = this.seed; - x ^= (x << 21); - x ^= (x >>> 35); - x ^= (x << 4); - this.seed = x; - x &= ((1L << nbits) - 1); - return (int) x; - } - boolean haveNextNextGaussian = false; - double nextNextGaussian = 0; - @Override - synchronized public double nextGaussian() { - // See Knuth, ACP, Section 3.4.1 Algorithm C. - if (this.haveNextNextGaussian) { - this.haveNextNextGaussian = false; - return this.nextNextGaussian; - } - double v1, v2, s; - do { - v1 = (2 * this.nextDouble()) - 1; // between -1 and 1 - v2 = (2 * this.nextDouble()) - 1; // between -1 and 1 - s = (v1 * v1) + (v2 * v2); - } while ((s >= 1) || (s == 0)); - final double multiplier = StrictMath.sqrt((-2 * StrictMath.log(s))/s); - this.nextNextGaussian = v2 * multiplier; - this.haveNextNextGaussian = true; - return v1 * multiplier; - } - /** - * Returns a pseudorandom, uniformly distributed {@code int} value between 0 - * (inclusive) and the specified value (exclusive), drawn from this random - * number generator's sequence. The general contract of {@code nextInt} is - * that one {@code int} value in the specified range is pseudorandomly - * generated and returned. All {@code bound} possible {@code int} values are - * produced with (approximately) equal probability. The method - * {@code nextInt(int bound)} is implemented by class {@code Random} as if - * by: - *

 {@code
-	 * public int nextInt(int bound) {
-	 *   if (bound <= 0)
-	 *     throw new IllegalArgumentException("bound must be positive");
-	 *
-	 *   if ((bound & -bound) == bound)  // i.e., bound is a power of 2
-	 *     return (int)((bound * (long)next(31)) >> 31);
-	 *
-	 *   int bits, val;
-	 *   do {
-	 *       bits = next(31);
-	 *       val = bits % bound;
-	 *   } while (bits - val + (bound-1) < 0);
-	 *   return val;
-	 * }}
- * - *

The hedge "approx - * imately" is used in the foregoing description only because the next - * method is only approximately an unbiased source of independently chosen - * bits. If it were a perfect source of randomly chosen bits, then the - * algorithm shown would choose {@code int} values from the stated range - * with perfect uniformity. - *

- * The algorithm is slightly tricky. It rejects values that would result in - * an uneven distribution (due to the fact that 2^31 is not divisible by n). - * The probability of a value being rejected depends on n. The worst case is - * n=2^30+1, for which the probability of a reject is 1/2, and the expected - * number of iterations before the loop terminates is 2. - *

- * The algorithm treats the case where n is a power of two specially: it - * returns the correct number of high-order bits from the underlying - * pseudo-random number generator. In the absence of special treatment, the - * correct number of low-order bits would be returned. Linear - * congruential pseudo-random number generators such as the one implemented - * by this class are known to have short periods in the sequence of values - * of their low-order bits. Thus, this special case greatly increases the - * length of the sequence of values returned by successive calls to this - * method if n is a small power of two. - * - * @param bound the upper bound (exclusive). Must be positive. - * @return the next pseudorandom, uniformly distributed {@code int} value - * between zero (inclusive) and {@code bound} (exclusive) from this random - * number generator's sequence - * @throws IllegalArgumentException if bound is not positive - * @since 1.2 - */ - @Override - public int nextInt(final int bound) { - final int newBound; - if (bound <= 0) { - newBound = 1; - //throw new RuntimeException("BadBound"); - } - else { - newBound = bound; - } - - /*int r = next(31); - int m = bound - 1; - if ((bound & m) == 0) // i.e., bound is a power of 2 - { - r = (int) ((bound * (long) r) >> 31); - } else { - for (int u = r; - u - (r = u % bound) + m < 0; - u = next(31)) - ; - } - return r;*/ - //speedup, new nextInt ~+40% - this.last = this.seed ^ (this.seed << 21); - this.last ^= (this.last >>> 35); - this.last ^= (this.last << 4); - this.seed = this.last; - final int out = (int) this.last % newBound; - return (out < 0) ? -out : out; - } - @Override - public int nextInt() { - return this.next(32); - } - - @Override - public float nextFloat() { - return this.next(24) * FLOAT_UNIT; - } - - @Override - public long nextLong() { - // it's okay that the bottom word remains signed. - return ((long)(this.next(32)) << 32) + this.next(32); - } - - @Override - public void nextBytes(final byte[] bytes_arr) { - for (int iba = 0, lenba = bytes_arr.length; iba < lenba; ) { - for (int rndba = this.nextInt(), - nba = Math.min(lenba - iba, Integer.SIZE/Byte.SIZE); - nba-- > 0; rndba >>= Byte.SIZE) { - bytes_arr[iba++] = (byte)rndba; - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java b/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java deleted file mode 100644 index 543ec8e1fa..0000000000 --- a/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.api.plugin; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.plugin.manager.Core_Manager; - -public final class Sample_Plugin implements IPlugin { - - public Sample_Plugin() { - Core_Manager.registerPlugin(this); //This must be called, else it won't load. - } - - @Override - public boolean preInit() { - return true; - } - - @Override - public boolean init() { - return true; - } - - @Override - public boolean postInit() { - return true; - } - - @Override - public boolean serverStart() { - return true; - } - - @Override - public boolean serverStop() { - return true; - } - - @Override - public String getPluginName() { - return "Sample Plugin"; - } - - @Override - public String getPluginAbbreviation() { - return "Test"; - } - -} diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java deleted file mode 100644 index d8573000fc..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java +++ /dev/null @@ -1,7 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IThermalConnection { - boolean canConnectThermalEnergy(ForgeDirection arg0); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java deleted file mode 100644 index 072695bd76..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -import net.minecraft.item.ItemStack; - -public interface IThermalContainerItem { - - int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2); - - int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2); - - int getThermalEnergyStored(ItemStack arg0); - - int getMaxThermalEnergyStored(ItemStack arg0); - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java deleted file mode 100644 index 3ab7127757..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IThermalHandler extends IThermalProvider, IThermalReceiver { - - int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); - - int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); - - int getThermalEnergyStored(ForgeDirection arg0); - - int getMaxThermalEnergyStored(ForgeDirection arg0); - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java deleted file mode 100644 index 0e4a060b23..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IThermalProvider extends IThermalConnection { - - int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); - - int getThermalEnergyStored(ForgeDirection arg0); - - int getMaxThermalEnergyStored(ForgeDirection arg0); - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java deleted file mode 100644 index e08ce48a06..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IThermalReceiver extends IThermalConnection { - - int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); - - int getThermalEnergyStored(ForgeDirection arg0); - - int getMaxThermalEnergyStored(ForgeDirection arg0); - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java deleted file mode 100644 index db3e6c8966..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -public interface IThermalStorage { - - int receiveThermalEnergy(int arg0, boolean arg1); - - int extractThermalEnergy(int arg0, boolean arg1); - - int getThermalEnergyStored(); - - int getMaxThermalEnergyStored(); - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java deleted file mode 100644 index 9c7bb0066c..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java +++ /dev/null @@ -1,116 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -import net.minecraft.nbt.NBTTagCompound; - -public class ThermalStorage implements IThermalStorage { - - protected int thermal_energy; - protected int capacity; - protected int maxReceive; - protected int maxExtract; - - public ThermalStorage(int arg0) { - this(arg0, arg0, arg0); - } - - public ThermalStorage(int arg0, int arg1) { - this(arg0, arg1, arg1); - } - - public ThermalStorage(int arg0, int arg1, int arg2) { - this.capacity = arg0; - this.maxReceive = arg1; - this.maxExtract = arg2; - } - - public ThermalStorage readFromNBT(NBTTagCompound arg0) { - this.thermal_energy = arg0.getInteger("ThermalEnergy"); - if (this.thermal_energy > this.capacity) { - this.thermal_energy = this.capacity; - } - return this; - } - - public NBTTagCompound writeToNBT(NBTTagCompound arg0) { - if (this.thermal_energy < 0) { - this.thermal_energy = 0; - } - arg0.setInteger("ThermalEnergy", this.thermal_energy); - return arg0; - } - - public void setCapacity(int arg0) { - this.capacity = arg0; - if (this.thermal_energy > arg0) { - this.thermal_energy = arg0; - } - - } - - public void setMaxTransfer(int arg0) { - this.setMaxReceive(arg0); - this.setMaxExtract(arg0); - } - - public void setMaxReceive(int arg0) { - this.maxReceive = arg0; - } - - public void setMaxExtract(int arg0) { - this.maxExtract = arg0; - } - - public int getMaxReceive() { - return this.maxReceive; - } - - public int getMaxExtract() { - return this.maxExtract; - } - - public void setEnergyStored(int arg0) { - this.thermal_energy = arg0; - if (this.thermal_energy > this.capacity) { - this.thermal_energy = this.capacity; - } else if (this.thermal_energy < 0) { - this.thermal_energy = 0; - } - - } - - public void modifyEnergyStored(int arg0) { - this.thermal_energy += arg0; - if (this.thermal_energy > this.capacity) { - this.thermal_energy = this.capacity; - } else if (this.thermal_energy < 0) { - this.thermal_energy = 0; - } - - } - - public int receiveThermalEnergy(int arg0, boolean arg1) { - int arg2 = Math.min(this.capacity - this.thermal_energy, Math.min(this.maxReceive, arg0)); - if (!arg1) { - this.thermal_energy += arg2; - } - - return arg2; - } - - public int extractThermalEnergy(int arg0, boolean arg1) { - int arg2 = Math.min(this.thermal_energy, Math.min(this.maxExtract, arg0)); - if (!arg1) { - this.thermal_energy -= arg2; - } - - return arg2; - } - - public int getThermalEnergyStored() { - return this.thermal_energy; - } - - public int getMaxThermalEnergyStored() { - return this.capacity; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java deleted file mode 100644 index 47af7e79a6..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java +++ /dev/null @@ -1,34 +0,0 @@ -package gtPlusPlus.api.thermal.energy; - -public class ThermalStorageAdv extends ThermalStorage { - - public ThermalStorageAdv(int arg0) { - this(arg0, arg0, arg0); - } - - public ThermalStorageAdv(int arg0, int arg1) { - this(arg0, arg1, arg1); - } - - public ThermalStorageAdv(int arg0, int arg1, int arg2) { - super(arg0, arg1, arg2); - } - - public int receiveEnergyNoLimit(int arg0, boolean arg1) { - int arg2 = Math.min(super.capacity - super.thermal_energy, arg0); - if (!arg1) { - super.thermal_energy += arg2; - } - - return arg2; - } - - public int extractEnergyNoLimit(int arg0, boolean arg1) { - int arg2 = Math.min(super.thermal_energy, arg0); - if (!arg1) { - super.thermal_energy -= arg2; - } - - return arg2; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java deleted file mode 100644 index 015e5fd5f3..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java +++ /dev/null @@ -1,84 +0,0 @@ -package gtPlusPlus.api.thermal.sample; - -import gtPlusPlus.api.thermal.energy.IThermalContainerItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class ItemThermalContainer extends Item implements IThermalContainerItem { - protected int capacity; - protected int maxReceive; - protected int maxExtract; - - public ItemThermalContainer() { - } - - public ItemThermalContainer(int arg0) { - this(arg0, arg0, arg0); - } - - public ItemThermalContainer(int arg0, int arg1) { - this(arg0, arg1, arg1); - } - - public ItemThermalContainer(int arg0, int arg1, int arg2) { - this.capacity = arg0; - this.maxReceive = arg1; - this.maxExtract = arg2; - } - - public ItemThermalContainer setCapacity(int arg0) { - this.capacity = arg0; - return this; - } - - public void setMaxTransfer(int arg0) { - this.setMaxReceive(arg0); - this.setMaxExtract(arg0); - } - - public void setMaxReceive(int arg0) { - this.maxReceive = arg0; - } - - public void setMaxExtract(int arg0) { - this.maxExtract = arg0; - } - - public int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { - if (arg0.getTagCompound() == null) { - arg0.stackTagCompound = new NBTTagCompound(); - } - int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); - int arg4 = Math.min(this.capacity - arg3, Math.min(this.maxReceive, arg1)); - if (!arg2) { - arg3 += arg4; - arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); - } - return arg4; - } - - public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { - if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")) { - int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); - int arg4 = Math.min(arg3, Math.min(this.maxExtract, arg1)); - if (!arg2) { - arg3 -= arg4; - arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); - } - return arg4; - } else { - return 0; - } - } - - public int getThermalEnergyStored(ItemStack arg0) { - return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy") - ? arg0.stackTagCompound.getInteger("ThermalEnergy") - : 0; - } - - public int getMaxThermalEnergyStored(ItemStack arg0) { - return this.capacity; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java deleted file mode 100644 index e2e3c50ab7..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.api.thermal.sample; - -import gtPlusPlus.api.thermal.energy.IThermalHandler; -import gtPlusPlus.api.thermal.energy.ThermalStorage; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileThermalHandler extends TileEntity implements IThermalHandler { - - protected ThermalStorage storage = new ThermalStorage(32000); - - public void readFromNBT(NBTTagCompound arg0) { - super.readFromNBT(arg0); - this.storage.readFromNBT(arg0); - } - - public void writeToNBT(NBTTagCompound arg0) { - super.writeToNBT(arg0); - this.storage.writeToNBT(arg0); - } - - public boolean canConnectThermalEnergy(ForgeDirection arg0) { - return true; - } - - public int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) { - return this.storage.receiveThermalEnergy(arg1, arg2); - } - - public int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) { - return this.storage.extractThermalEnergy(arg1, arg2); - } - - public int getThermalEnergyStored(ForgeDirection arg0) { - return this.storage.getThermalEnergyStored(); - } - - public int getMaxThermalEnergyStored(ForgeDirection arg0) { - return this.storage.getMaxThermalEnergyStored(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java b/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java deleted file mode 100644 index a40535887c..0000000000 --- a/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.api.thermal.tileentity; - -public interface IThermalInfo { - - int getInfoEnergyPerTick(); - - int getInfoMaxEnergyPerTick(); - - int getInfoEnergyStored(); - - int getInfoMaxEnergyStored(); - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/GTplusplus_Australia.java b/src/Java/gtPlusPlus/australia/GTplusplus_Australia.java deleted file mode 100644 index 9a16ad1785..0000000000 --- a/src/Java/gtPlusPlus/australia/GTplusplus_Australia.java +++ /dev/null @@ -1,158 +0,0 @@ -package gtPlusPlus.australia; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; - -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.event.FMLInitializationEvent; -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.registry.GameRegistry; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.biome.type.Biome_AustralianDesert_Ex; -import gtPlusPlus.australia.biome.type.Biome_AustralianForest; -import gtPlusPlus.australia.biome.type.Biome_AustralianOcean; -import gtPlusPlus.australia.biome.type.Biome_AustralianOutback; -import gtPlusPlus.australia.biome.type.Biome_AustralianPlains; -import gtPlusPlus.australia.block.AustraliaContentLoader; -import gtPlusPlus.australia.dimension.Dimension_Australia; -import gtPlusPlus.australia.gen.gt.WorldGen_Australia_Ores; -import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia_Base; -import gtPlusPlus.australia.gen.map.structure.StructureManager; -import gtPlusPlus.australia.world.AustraliaWorldGenerator; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.Australia; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.config.Configuration; - -@MCVersion(value = "1.7.10") -@Mod(modid = Australia.MODID, name = Australia.NAME, version = Australia.VERSION, dependencies = "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") -public class GTplusplus_Australia implements ActionListener { - - //Mod Instance - @Mod.Instance(Australia.MODID) - public static GTplusplus_Australia instance; - public static GTPP_Config sCustomWorldgenFile = null; - - // Dark World Handler - //protected static volatile Biome_AustralianDesert Australian_Desert_Biome_1; - //protected static volatile Biome_AustralianDesert2 Australian_Desert_Biome_2; - - public static volatile Biome_AustralianDesert_Ex Australian_Desert_Biome_3; - public static volatile Biome_AustralianForest Australian_Forest_Biome; - public static volatile Biome_AustralianOcean Australian_Ocean_Biome; - public static volatile Biome_AustralianOutback Australian_Outback_Biome; - public static volatile Biome_AustralianPlains Australian_Plains_Biome; - - public static volatile Dimension_Australia Australia_Dimension; - public static AustraliaWorldGenerator Australia_World_Generator; - public static int globalAustraliaPortalSpawnTimer = 0; - - // Pre-Init - @Mod.EventHandler - public void preInit(final FMLPreInitializationEvent event) { - Logger.INFO("Loading " + Australia.MODID + " V" + Australia.VERSION); - - //Setup - setVars(event); - - Australia_Dimension = new Dimension_Australia(); - Australia_Dimension.instance = instance; - - //Australian_Desert_Biome_1 = (new Biome_AustralianDesert()); - //Australian_Desert_Biome_2 = (new Biome_AustralianDesert2()); - //Australian_Desert_Biome_1.instance = instance; - //Australian_Desert_Biome_2.instance = instance; - //Australian_Desert_Biome_1.preInit(event); - //Australian_Desert_Biome_2.preInit(event); - - - Australian_Desert_Biome_3 = (Biome_AustralianDesert_Ex.biome); - Australian_Forest_Biome = (Biome_AustralianForest.biome); - Australian_Ocean_Biome = (Biome_AustralianOcean.biome); - Australian_Outback_Biome = (Biome_AustralianOutback.biome); - Australian_Plains_Biome = Biome_AustralianPlains.biome; - - //Load Villages - StructureManager.registerVillageComponents(); - - setupWorldGenerator(); - - //Load/Set Custom Ore Gen - sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "Australia.cfg"))); - - } - - @EventHandler - public void load(final FMLInitializationEvent e) { - Logger.INFO("Begin resource allocation for " + Australia.MODID + " V" +Australia.VERSION); - - //Load World and Biome - GameRegistry.registerWorldGenerator(new WorldGen_GT_Australia_Base(), Short.MAX_VALUE); - - //Australian_Desert_Biome_1.load(); - //Australian_Desert_Biome_2.load(); - Australian_Desert_Biome_3.load(); - Australian_Forest_Biome.load(); - Australian_Ocean_Biome.load(); - Australian_Outback_Biome.load(); - Australian_Plains_Biome.load(); - - Australia_Dimension.load(); - - } - - public static synchronized void GenerateOreMaterials() { - - } - - protected synchronized void setVars(FMLPreInitializationEvent event){ - - sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "Australia.cfg"))); - - if (DimensionManager.isDimensionRegistered(Dimension_Australia.DIMID)){ - Dimension_Australia.DIMID = DimensionManager.getNextFreeDimId(); - } - - /* - * Set World Generation Values - */ - WorldGen_Australia_Ores.generateValidOreVeins(); - WorldGen_GT_Australia_Base.oreveinPercentage = 16; - WorldGen_GT_Australia_Base.oreveinAttempts = 16; - WorldGen_GT_Australia_Base.oreveinMaxPlacementAttempts = 2; - if (CORE_Preloader.DEBUG_MODE || CORE.DEVENV){ - WorldGen_GT_Australia_Base.debugWorldGen = true; - } - AustraliaContentLoader.run(); - } - - @EventHandler - public void serverLoad(FMLServerStartingEvent event) { - Australia_World_Generator.initiate(); - } - - @EventHandler - public static void postInit(final FMLPostInitializationEvent e) { - Logger.INFO("Finished loading Australia plugin for GT++."); - } - - @Override - public void actionPerformed(ActionEvent arg0) { - // TODO Auto-generated method stub - - } - - private void setupWorldGenerator() { - Logger.INFO("Registering World Generator for Australia."); - Australia_World_Generator = new AustraliaWorldGenerator(); - GameRegistry.registerWorldGenerator(Australia_World_Generator, 0); - } - -} diff --git a/src/Java/gtPlusPlus/australia/biome/CustomDecorator.java b/src/Java/gtPlusPlus/australia/biome/CustomDecorator.java deleted file mode 100644 index 2d9b335d52..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/CustomDecorator.java +++ /dev/null @@ -1,355 +0,0 @@ -package gtPlusPlus.australia.biome; - -import java.util.Random; - -import gtPlusPlus.api.interfaces.IGeneratorWorld; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.GTplusplus_Australia; -import gtPlusPlus.australia.gen.world.WorldGenAustralianOre; -import net.minecraft.block.BlockFlower; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraft.world.gen.feature.WorldGenBigMushroom; -import net.minecraft.world.gen.feature.WorldGenCactus; -import net.minecraft.world.gen.feature.WorldGenDeadBush; -import net.minecraft.world.gen.feature.WorldGenFlowers; -import net.minecraft.world.gen.feature.WorldGenLiquids; -import net.minecraft.world.gen.feature.WorldGenMinable; -import net.minecraft.world.gen.feature.WorldGenPumpkin; -import net.minecraft.world.gen.feature.WorldGenReed; -import net.minecraft.world.gen.feature.WorldGenSand; -import net.minecraft.world.gen.feature.WorldGenWaterlily; -import net.minecraft.world.gen.feature.WorldGenerator; - -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; -import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; -import net.minecraftforge.common.*; -import net.minecraftforge.event.terraingen.*; - -public class CustomDecorator extends BiomeDecorator { - - - public CustomDecorator() { - this.sandGen = new WorldGenSand(Blocks.sand, 10); - this.gravelAsSandGen = new WorldGenSand(Blocks.gravel, 6); - this.dirtGen = new WorldGenMinable(Blocks.dirt, 16); - this.gravelGen = new WorldGenMinable(Blocks.gravel, 16); - - this.coalGen = new WorldGenAustralianOre(Blocks.coal_ore, 4); - this.ironGen = new WorldGenAustralianOre(Blocks.clay, 4); - this.goldGen = new WorldGenAustralianOre(Blocks.soul_sand, 20); - this.redstoneGen = new WorldGenAustralianOre(Blocks.bedrock, 8); - this.diamondGen = new WorldGenAustralianOre(Blocks.diamond_ore, 1); - this.lapisGen = new WorldGenAustralianOre(Blocks.lava, 16); - - this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); - this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); - this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); - this.bigMushroomGen = new WorldGenBigMushroom(); - this.reedGen = new WorldGenReed(); - this.cactusGen = new WorldGenCactus(); - this.waterlilyGen = new WorldGenWaterlily(); - this.flowersPerChunk = 2; - this.grassPerChunk = 1; - this.sandPerChunk = 1; - this.sandPerChunk2 = 3; - this.clayPerChunk = 2; - this.generateLakes = true; - } - - int mDecoratorTimeout = 0; - - public void decorateChunk(World aWorld, Random aRand, BiomeGenBase aGen, int aX, int aZ) { - if (this.currentWorld != null && this.chunk_X == aX && this.chunk_Z == aZ) { - try { - while (this.currentWorld != null) { - if (mDecoratorTimeout % 1000 == 0) { - Logger.WORLD("Waiting for chunk @ "+aX+", "+aZ+" to generate. Waited "+mDecoratorTimeout+"ms already."); - } - if (this.currentWorld == null) { - break; - } - if (mDecoratorTimeout >= 5000) { - throw new RuntimeException("Already decorating!!"); - } - mDecoratorTimeout++; - } - } - catch (Throwable t) { - t.printStackTrace(); - throw new RuntimeException("Already decorating!!"); - } - } - if (this.currentWorld == null) { - this.currentWorld = aWorld; - this.randomGenerator = aRand; - this.chunk_X = aX; - this.chunk_Z = aZ; - this.genDecorations(aGen); - this.currentWorld = null; - this.randomGenerator = null; - } - } - - protected void genDecorations(BiomeGenBase p_150513_1_) { - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - this.generateOres(); - int i; - int j; - int k; - - boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); - for (i = 0; doGen && i < this.sandPerChunk2; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.sandGen.generate(this.currentWorld, this.randomGenerator, j, - this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); - for (i = 0; doGen && i < this.clayPerChunk; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.clayGen.generate(this.currentWorld, this.randomGenerator, j, - this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); - for (i = 0; doGen && i < this.sandPerChunk; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, - this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - i = this.treesPerChunk; - - if (this.randomGenerator.nextInt(10) == 0) { - ++i; - } - - int l; - int i1; - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); - for (j = 0; doGen && j < i; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); - worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); - - if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) { - worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); - for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, - this.currentWorld.getHeightValue(k, l), l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); - for (j = 0; doGen && j < this.flowersPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); - String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); - BlockFlower blockflower = BlockFlower.func_149857_e(s); - - if (blockflower.getMaterial() != Material.air) { - this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); - this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); - for (j = 0; doGen && j < this.grassPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); - worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); - for (j = 0; doGen && j < this.deadBushPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); - for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - - for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 - && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) { - ; - } - - this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); - for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) { - if (this.randomGenerator.nextInt(4) == 0) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - if (this.randomGenerator.nextInt(8) == 0) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - if (doGen && this.randomGenerator.nextInt(4) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - if (doGen && this.randomGenerator.nextInt(8) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); - for (j = 0; doGen && j < this.reedsPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - for (j = 0; doGen && j < 10; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); - if (doGen && this.randomGenerator.nextInt(32) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); - for (j = 0; doGen && j < this.cactiPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - try { - int midX = Math.max(0, 7 / 2); - int midZ = Math.max(0, 7 / 2); - int mCurrentBiomeID = Integer.valueOf(currentWorld.getBiomeGenForCoords(chunk_X+midX, chunk_Z+midZ).biomeID); - - if (mCurrentBiomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { - this.generateLakes = false; - } - - if (mCurrentBiomeID != GTplusplus_Australia.Australian_Outback_Biome.biomeID) { - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); - if (doGen && this.generateLakes) { - for (j = 0; j < 50; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - - for (j = 0; j < 20; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator - .nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - } - } - } - catch (Throwable t) { - - } - - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } - - /** - * Standard ore generation helper. Generates most ores. - */ - protected void genStandardOre1(int aAmount, WorldGenerator aOreGenerator, int p_76795_3_, int p_76795_4_) { - for (int l = 0; l < aAmount; ++l) { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - aOreGenerator.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } - - /** - * Standard ore generation helper. Generates Lapis Lazuli. - */ - protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) { - for (int l = 0; l < p_76793_1_; ++l) { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) - + (p_76793_3_ - p_76793_4_); - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } - - /** - * Generates ores in the current chunk - */ - protected void generateOres() { - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) - this.genStandardOre1(20, this.dirtGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) - this.genStandardOre1(10, this.gravelGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) - this.genStandardOre1(20, this.coalGen, 0, 128); - if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) - this.genStandardOre1(10, this.ironGen, 0, 64); - if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) - this.genStandardOre1(15, this.goldGen, 0, 32); - if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) - this.genStandardOre1(10, this.redstoneGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) - this.genStandardOre1(1, this.diamondGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) - this.genStandardOre2(10, this.lapisGen, 16, 16); - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } - - private int nextInt(int i) { - if (i <= 1) - return 0; - return this.randomGenerator.nextInt(i); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/GenLayerAustralia.java b/src/Java/gtPlusPlus/australia/biome/GenLayerAustralia.java deleted file mode 100644 index d9c328d756..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/GenLayerAustralia.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.australia.biome; - -import net.minecraft.world.WorldType; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.GenLayerVoronoiZoom; -import net.minecraft.world.gen.layer.GenLayerZoom; - -public class GenLayerAustralia extends GenLayer { - - public GenLayerAustralia(long seed) { - super(seed); - } - - public static GenLayer[] makeTheWorld(long seed, WorldType type) { - GenLayer biomes = new GenLayerBiomesAustraliaDimension(1L); - biomes = new GenLayerZoom(1000L, biomes); - biomes = new GenLayerZoom(1001L, biomes); - biomes = new GenLayerZoom(1002L, biomes); - biomes = new GenLayerZoom(1003L, biomes); - biomes = new GenLayerZoom(1004L, biomes); - biomes = new GenLayerZoom(1005L, biomes); - GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes); - biomes.initWorldGenSeed(seed); - genlayervoronoizoom.initWorldGenSeed(seed); - return new GenLayer[] { biomes, genlayervoronoizoom }; - } - - @Override - public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { - return new int[] {}; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java b/src/Java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java deleted file mode 100644 index 571ae636e0..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.australia.biome; - -import gtPlusPlus.australia.biome.type.Biome_AustralianDesert_Ex; -import gtPlusPlus.australia.biome.type.Biome_AustralianForest; -import gtPlusPlus.australia.biome.type.Biome_AustralianOcean; -import gtPlusPlus.australia.biome.type.Biome_AustralianOutback; -import gtPlusPlus.australia.biome.type.Biome_AustralianPlains; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.IntCache; - -public class GenLayerBiomesAustraliaDimension extends GenLayer { - - protected BiomeGenBase[] allowedBiomes = { - Biome_AustralianDesert_Ex.biome, - Biome_AustralianDesert_Ex.biome, - Biome_AustralianOutback.biome, - Biome_AustralianOutback.biome, - Biome_AustralianForest.biome, - Biome_AustralianForest.biome, - Biome_AustralianPlains.biome, - Biome_AustralianPlains.biome, - Biome_AustralianOcean.biome, - }; - - public GenLayerBiomesAustraliaDimension(long seed) { - super(seed); - } - - public GenLayerBiomesAustraliaDimension(long seed, GenLayer genlayer) { - super(seed); - this.parent = genlayer; - } - - @Override - public int[] getInts(int x, int z, int width, int depth) { - int[] dest = IntCache.getIntCache(width * depth); - for (int dz = 0; dz < depth; dz++) { - for (int dx = 0; dx < width; dx++) { - this.initChunkSeed(dx + x, dz + z); - dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID; - } - } - return dest; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java deleted file mode 100644 index 666360f058..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java +++ /dev/null @@ -1,355 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import java.lang.reflect.Field; -import java.util.Random; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntitySilverfish; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.entity.monster.EntityWitch; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.passive.EntityCow; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntitySquid; -import net.minecraft.entity.passive.EntityWolf; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraft.world.gen.feature.WorldGenerator; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianDesert { - - - public Object instance; - - public static Block blockTopLayer; - public static Block blockSecondLayer; - public static Block blockMainFiller = Blocks.stone; - public static Block blockSecondaryFiller; - public static Block blockFluidLakes; - - public Biome_AustralianDesert() { - - } - - public static BiomeGenAustralianDesert biome = new BiomeGenAustralianDesert(); - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); - BiomeManager.addSpawnBiome(biome); - } - - public void generateNether(World world, Random random, int chunkX, int chunkZ) { - } - - public void generateSurface(World world, Random random, int chunkX, int chunkZ) { - } - - public void registerRenderers() { - } - - public int addFuel(ItemStack fuel) { - return 0; - } - - public void serverLoad(FMLServerStartingEvent event) { - } - - public void preInit(FMLPreInitializationEvent event) { - } - - static class BiomeGenAustralianDesert extends BiomeGenBase { - @SuppressWarnings("unchecked") - public BiomeGenAustralianDesert() { - super(CORE.AUSTRALIA_BIOME_DESERT_1_ID); - this.setBiomeName("Australian Desert"); - //this.setBiomeID(); - this.enableRain = true; - this.enableSnow = false; - this.topBlock = blockTopLayer; - this.fillerBlock = blockSecondLayer; - //this.theBiomeDecorator = new BiomeGenerator_Custom(); - this.theBiomeDecorator.generateLakes = true; - this.theBiomeDecorator.treesPerChunk = 20; - this.theBiomeDecorator.flowersPerChunk = 0; - this.theBiomeDecorator.grassPerChunk = 5; - this.theBiomeDecorator.deadBushPerChunk = 63; - this.theBiomeDecorator.mushroomsPerChunk = 0; - this.theBiomeDecorator.reedsPerChunk = 42; - this.theBiomeDecorator.cactiPerChunk = 56; - this.theBiomeDecorator.sandPerChunk = 84; - this.rainfall = 0.1F; - this.waterColorMultiplier = 13434879; - setHeight(new BiomeGenBase.Height(0.15F, 0.45F)); - this.rootHeight = -0.25f; //Ground level - - this.spawnableMonsterList.clear(); - this.spawnableCreatureList.clear(); - this.spawnableWaterCreatureList.clear(); - this.spawnableCaveCreatureList.clear(); - - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySilverfish.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 5, 1, 5)); - - this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 5, 1, 5)); - - } - - private synchronized boolean setBiomeID() { - try { - Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); - Field mClone = mInternalBiomeList; - BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); - BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; - for (int index=0;index EntityClass, int a, int b, int c){ - //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); - this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); - return true; - } - - @Override - public WorldGenAbstractTree func_150567_a(Random par1Random){ - return (WorldGenAbstractTree)(getRandomWorldGenForTrees(par1Random)); - } - - - //TODO - DOES THIS WORK? - public WorldGenerator getRandomWorldGenForTrees(Random par1Random) - { - return new Tree(); - } - - class Tree - extends WorldGenAbstractTree - { - private final int minTreeHeight; - private final boolean vinesGrow; - private final int metaWood; - private final int metaLeaves; - - public Tree() - { - super(false); - this.minTreeHeight = 5; - this.metaWood = 0; - this.metaLeaves = 0; - this.vinesGrow = false; - } - - public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) - { - int var6 = par2Random.nextInt(3) + this.minTreeHeight; - boolean var7 = true; - if ((par4 >= 1) && (par4 + var6 + 1 <= 256)) - { - for (int var8 = par4; var8 <= par4 + 1 + var6; var8++) - { - byte var9 = 1; - if (var8 == par4) { - var9 = 0; - } - if (var8 >= par4 + 1 + var6 - 2) { - var9 = 2; - } - for (int var10 = par3 - var9; (var10 <= par3 + var9) && (var7); var10++) { - for (int var11 = par5 - var9; (var11 <= par5 + var9) && (var7); var11++) { - if ((var8 >= 0) && (var8 < 256)) - { - Block var12s = par1World.getBlock(var10, var8, var11); - int var12 = Block.getIdFromBlock(var12s); - if ((var12 != 0) && (var12s != Blocks.air) && (var12s != Blocks.grass) && (var12s != Blocks.dirt) && (var12s != Blocks.cactus)) { - var7 = false; - } - } - else - { - var7 = false; - } - } - } - } - if (!var7) { - return false; - } - Block var8s = par1World.getBlock(par3, par4 - 1, par5); - int var8 = Block.getIdFromBlock(var8s); - if (((var8s == Blocks.grass) || (var8s == Blocks.dirt)) && (par4 < 256 - var6 - 1)) - { - par1World.setBlock(par3, par4 - 1, par5, Blocks.dirt, 0, 2); - byte var9 = 3; - byte var18 = 0; - for (int var11 = par4 - var9 + var6; var11 <= par4 + var6; var11++) - { - int var12 = var11 - (par4 + var6); - int var13 = var18 + 1 - var12 / 2; - for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) - { - int var15 = var14 - par3; - for (int var16 = par5 - var13; var16 <= par5 + var13; var16++) - { - int var17 = var16 - par5; - if ((Math.abs(var15) != var13) || (Math.abs(var17) != var13) || ((par2Random.nextInt(2) != 0) && (var12 != 0))) { - par1World.setBlock(var14, var11, var16, Blocks.air, this.metaLeaves, 2); - } - } - } - } - for (int var11 = 0; var11 < var6; var11++) - { - Block var12s = par1World.getBlock(par3, par4 + var11, par5); - int var12 = Block.getIdFromBlock(var12s); - if ((var12 == 0) || (var12s == Blocks.air)) - { - par1World.setBlock(par3, par4 + var11, par5, Blocks.cactus, this.metaWood, 2); - if ((this.vinesGrow) && (var11 > 0)) - { - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 - 1, par4 + var11, par5))) { - par1World.setBlock(par3 - 1, par4 + var11, par5, Blocks.air, 8, 2); - } - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 + 1, par4 + var11, par5))) { - par1World.setBlock(par3 + 1, par4 + var11, par5, Blocks.air, 2, 2); - } - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 - 1))) { - par1World.setBlock(par3, par4 + var11, par5 - 1, Blocks.air, 1, 2); - } - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 + 1))) { - par1World.setBlock(par3, par4 + var11, par5 + 1, Blocks.air, 4, 2); - } - } - } - } - if (this.vinesGrow) - { - for (int var11 = par4 - 3 + var6; var11 <= par4 + var6; var11++) - { - int var12 = var11 - (par4 + var6); - int var13 = 2 - var12 / 2; - for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) { - for (int var15 = par5 - var13; var15 <= par5 + var13; var15++) { - if (par1World.getBlock(var14, var11, var15) == Blocks.air) - { - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14 - 1, var11, var15)) == 0)) { - growVines(par1World, var14 - 1, var11, var15, 8); - } - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14 + 1, var11, var15)) == 0)) { - growVines(par1World, var14 + 1, var11, var15, 2); - } - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 - 1)) == 0)) { - growVines(par1World, var14, var11, var15 - 1, 1); - } - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 + 1)) == 0)) { - growVines(par1World, var14, var11, var15 + 1, 4); - } - } - } - } - } - if ((par2Random.nextInt(5) == 0) && (var6 > 5)) { - for (int var11 = 0; var11 < 2; var11++) { - for (int var12 = 0; var12 < 4; var12++) { - if (par2Random.nextInt(4 - var11) == 0) - { - int var13 = par2Random.nextInt(3); - par1World.setBlock(par3 + net.minecraft.util.Direction.offsetX[net.minecraft.util.Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + net.minecraft.util.Direction.offsetZ[net.minecraft.util.Direction.rotateOpposite[var12]], Blocks.air, var13 << 2 | var12, 2); - } - } - } - } - } - return true; - } - return false; - } - return false; - } - - private void growVines(World par1World, int par2, int par3, int par4, int par5) - { - par1World.setBlock(par2, par3, par4, Blocks.vine, par5, 2); - int var6 = 4; - for (;;) - { - par3--; - if ((Block.getIdFromBlock(par1World.getBlock(par2, par3, par4)) != 0) || (var6 <= 0)) { - return; - } - par1World.setBlock(par2, par3, par4, Blocks.air, par5, 2); - var6--; - } - } - } - - } - -} diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java deleted file mode 100644 index 2ac11bb412..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java +++ /dev/null @@ -1,355 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import java.lang.reflect.Field; -import java.util.Random; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntitySilverfish; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySlime; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.entity.monster.EntityWitch; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.passive.EntityCow; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntitySquid; -import net.minecraft.entity.passive.EntityWolf; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraft.world.gen.feature.WorldGenerator; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianDesert2 { - - public static BiomeGenAustralianDesert2 biome = new BiomeGenAustralianDesert2(); - - public Object instance; - - public static Block blockTopLayer; - public static Block blockSecondLayer; - public static Block blockMainFiller = Blocks.stone; - public static Block blockSecondaryFiller; - public static Block blockFluidLakes; - - public Biome_AustralianDesert2() { - } - - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); - BiomeManager.addSpawnBiome(biome); - } - - public void generateNether(World world, Random random, int chunkX, int chunkZ) { - } - - public void generateSurface(World world, Random random, int chunkX, int chunkZ) { - } - - public void registerRenderers() { - } - - public int addFuel(ItemStack fuel) { - return 0; - } - - public void serverLoad(FMLServerStartingEvent event) { - } - - public void preInit(FMLPreInitializationEvent event) { - } - - static class BiomeGenAustralianDesert2 extends BiomeGenBase { - @SuppressWarnings("unchecked") - public BiomeGenAustralianDesert2() { - super(CORE.AUSTRALIA_BIOME_DESERT_2_ID); - this.setBiomeName("Australian Desert II"); - //this.setBiomeID(); - this.enableRain = true; - this.enableSnow = false; - this.topBlock = blockTopLayer; - this.fillerBlock = blockSecondLayer; - //this.theBiomeDecorator = new BiomeGenerator_Custom(); - this.theBiomeDecorator.generateLakes = true; - this.theBiomeDecorator.treesPerChunk = 40; - this.theBiomeDecorator.flowersPerChunk = 0; - this.theBiomeDecorator.grassPerChunk = 0; - this.theBiomeDecorator.deadBushPerChunk = 63; - this.theBiomeDecorator.mushroomsPerChunk = 0; - this.theBiomeDecorator.reedsPerChunk = 42; - this.theBiomeDecorator.cactiPerChunk = 84; - this.theBiomeDecorator.sandPerChunk = 84; - this.rainfall = 0.1F; - this.waterColorMultiplier = 13434879; - setHeight(new BiomeGenBase.Height(0.10F, 0.35F)); - this.rootHeight = -0.15f; //Ground level - - this.spawnableMonsterList.clear(); - this.spawnableCreatureList.clear(); - this.spawnableWaterCreatureList.clear(); - this.spawnableCaveCreatureList.clear(); - - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySilverfish.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 5, 1, 5)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 5, 1, 5)); - - this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 5, 1, 5)); - - } - - private synchronized boolean setBiomeID() { - try { - Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); - Field mClone = mInternalBiomeList; - BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); - BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; - for (int index=0;index EntityClass, int a, int b, int c){ - //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); - this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); - return true; - } - - @Override - public WorldGenAbstractTree func_150567_a(Random par1Random){ - boolean a = (MathUtils.randInt(0, 100) < MathUtils.randInt(30, 65)); - return a ? getRandomWorldGenForTrees(par1Random) : super.func_150567_a(par1Random); - } - - //TODO - DOES THIS WORK? - public WorldGenAbstractTree getRandomWorldGenForTrees(Random par1Random) - { - return new Tree(); - } - - class Tree - extends WorldGenAbstractTree - { - private final int minTreeHeight; - private final boolean vinesGrow; - private final int metaWood; - private final int metaLeaves; - - public Tree() - { - super(false); - this.minTreeHeight = 3; - this.metaWood = 0; - this.metaLeaves = 0; - this.vinesGrow = false; - } - - public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) - { - int var6 = par2Random.nextInt(3) + this.minTreeHeight; - boolean var7 = true; - if ((par4 >= 1) && (par4 + var6 + 1 <= 256)) - { - for (int var8 = par4; var8 <= par4 + 1 + var6; var8++) - { - byte var9 = 1; - if (var8 == par4) { - var9 = 0; - } - if (var8 >= par4 + 1 + var6 - 2) { - var9 = 2; - } - for (int var10 = par3 - var9; (var10 <= par3 + var9) && (var7); var10++) { - for (int var11 = par5 - var9; (var11 <= par5 + var9) && (var7); var11++) { - if ((var8 >= 0) && (var8 < 256)) - { - Block var12s = par1World.getBlock(var10, var8, var11); - int var12 = Block.getIdFromBlock(var12s); - if ((var12 != 0) && (var12s != Blocks.air) && (var12s != Blocks.grass) && (var12s != Blocks.dirt) && (var12s != Blocks.cactus)) { - var7 = false; - } - } - else - { - var7 = false; - } - } - } - } - if (!var7) { - return false; - } - Block var8s = par1World.getBlock(par3, par4 - 1, par5); - int var8 = Block.getIdFromBlock(var8s); - if (((var8s == Blocks.grass) || (var8s == Blocks.dirt)) && (par4 < 256 - var6 - 1)) - { - par1World.setBlock(par3, par4 - 1, par5, Blocks.dirt, 0, 2); - byte var9 = 3; - byte var18 = 0; - for (int var11 = par4 - var9 + var6; var11 <= par4 + var6; var11++) - { - int var12 = var11 - (par4 + var6); - int var13 = var18 + 1 - var12 / 2; - for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) - { - int var15 = var14 - par3; - for (int var16 = par5 - var13; var16 <= par5 + var13; var16++) - { - int var17 = var16 - par5; - if ((Math.abs(var15) != var13) || (Math.abs(var17) != var13) || ((par2Random.nextInt(2) != 0) && (var12 != 0))) { - par1World.setBlock(var14, var11, var16, Blocks.air, this.metaLeaves, 2); - } - } - } - } - for (int var11 = 0; var11 < var6; var11++) - { - Block var12s = par1World.getBlock(par3, par4 + var11, par5); - int var12 = Block.getIdFromBlock(var12s); - if ((var12 == 0) || (var12s == Blocks.air)) - { - par1World.setBlock(par3, par4 + var11, par5, Blocks.cactus, this.metaWood, 2); - if ((this.vinesGrow) && (var11 > 0)) - { - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 - 1, par4 + var11, par5))) { - par1World.setBlock(par3 - 1, par4 + var11, par5, Blocks.air, 8, 2); - } - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 + 1, par4 + var11, par5))) { - par1World.setBlock(par3 + 1, par4 + var11, par5, Blocks.air, 2, 2); - } - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 - 1))) { - par1World.setBlock(par3, par4 + var11, par5 - 1, Blocks.air, 1, 2); - } - if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 + 1))) { - par1World.setBlock(par3, par4 + var11, par5 + 1, Blocks.air, 4, 2); - } - } - } - } - if (this.vinesGrow) - { - for (int var11 = par4 - 3 + var6; var11 <= par4 + var6; var11++) - { - int var12 = var11 - (par4 + var6); - int var13 = 2 - var12 / 2; - for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) { - for (int var15 = par5 - var13; var15 <= par5 + var13; var15++) { - if (par1World.getBlock(var14, var11, var15) == Blocks.air) - { - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14 - 1, var11, var15)) == 0)) { - growVines(par1World, var14 - 1, var11, var15, 8); - } - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14 + 1, var11, var15)) == 0)) { - growVines(par1World, var14 + 1, var11, var15, 2); - } - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 - 1)) == 0)) { - growVines(par1World, var14, var11, var15 - 1, 1); - } - if ((par2Random.nextInt(4) == 0) && - (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 + 1)) == 0)) { - growVines(par1World, var14, var11, var15 + 1, 4); - } - } - } - } - } - if ((par2Random.nextInt(5) == 0) && (var6 > 5)) { - for (int var11 = 0; var11 < 2; var11++) { - for (int var12 = 0; var12 < 4; var12++) { - if (par2Random.nextInt(4 - var11) == 0) - { - int var13 = par2Random.nextInt(3); - par1World.setBlock(par3 + net.minecraft.util.Direction.offsetX[net.minecraft.util.Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + net.minecraft.util.Direction.offsetZ[net.minecraft.util.Direction.rotateOpposite[var12]], Blocks.air, var13 << 2 | var12, 2); - } - } - } - } - } - return true; - } - return false; - } - return false; - } - - private void growVines(World par1World, int par2, int par3, int par4, int par5) - { - par1World.setBlock(par2, par3, par4, Blocks.vine, par5, 2); - int var6 = 4; - for (;;) - { - par3--; - if ((Block.getIdFromBlock(par1World.getBlock(par2, par3, par4)) != 0) || (var6 <= 0)) { - return; - } - par1World.setBlock(par2, par3, par4, Blocks.air, par5, 2); - var6--; - } - } - } - - } - -} diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java deleted file mode 100644 index bfb0fb8631..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import java.util.Random; - -import gtPlusPlus.australia.biome.CustomDecorator; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenDesert; -import net.minecraft.world.gen.feature.WorldGenDesertWells; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianDesert_Ex extends BiomeGenDesert { - - public Biome_AustralianDesert_Ex(int aID) - { - super(aID); - this.spawnableCreatureList.clear(); - this.topBlock = Blocks.sand; - this.fillerBlock = Blocks.sand; - this.theBiomeDecorator.treesPerChunk = -999; - this.theBiomeDecorator.deadBushPerChunk = 2; - this.theBiomeDecorator.reedsPerChunk = 50; - this.theBiomeDecorator.cactiPerChunk = 20; - this.setColor(16421912); - this.setBiomeName("Australian Desert III"); - this.setDisableRain(); - this.setTemperatureRainfall(2.0F, 0.0F); - this.setHeight(height_LowPlains); - this.spawnableCreatureList.clear(); - } - - public static Biome_AustralianDesert_Ex biome = new Biome_AustralianDesert_Ex(CORE.AUSTRALIA_BIOME_DESERT_3_ID); - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); - BiomeManager.addSpawnBiome(biome); - } - - public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) - { - super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); - - if (p_76728_2_.nextInt(850) == 0) - { - int k = p_76728_3_ + p_76728_2_.nextInt(16) + 8; - int l = p_76728_4_ + p_76728_2_.nextInt(16) + 8; - WorldGenDesertWells worldgendesertwells = new WorldGenDesertWells(); - worldgendesertwells.generate(p_76728_1_, p_76728_2_, k, p_76728_1_.getHeightValue(k, l) + 1, l); - } - } - - /** - * Allocate a new BiomeDecorator for this BiomeGenBase - */ - @Override - public BiomeDecorator createBiomeDecorator() - { - return getModdedBiomeDecorator(new CustomDecorator()); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java deleted file mode 100644 index c00fd5edef..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java +++ /dev/null @@ -1,198 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.australia.biome.CustomDecorator; -import gtPlusPlus.australia.gen.world.WorldGenAustralianTrees; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; - -import java.util.Random; -import net.minecraft.block.BlockFlower; -import net.minecraft.entity.passive.EntityWolf; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.BiomeGenForest; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraft.world.gen.feature.WorldGenBigMushroom; -import net.minecraft.world.gen.feature.WorldGenCanopyTree; -import net.minecraft.world.gen.feature.WorldGenForest; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianForest extends BiomeGenForest { - - private int mWoodMeta; - protected static final WorldGenForest mGenTreeForest = new WorldGenForest(false, true); - protected static final WorldGenForest mGenTreeForest2 = new WorldGenForest(false, false); - protected static final WorldGenCanopyTree mGenTreeCanopy = new WorldGenCanopyTree(false); - protected static final WorldGenAustralianTrees mGenTreeAustralian = new WorldGenAustralianTrees(true); - - public static Biome_AustralianForest biome = new Biome_AustralianForest(CORE.AUSTRALIA_BIOME_FOREST_ID, 2); - - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.FOREST); - BiomeManager.addSpawnBiome(biome); - } - - public Biome_AustralianForest(int p_i45377_1_, int aWoodMeta) { - super(p_i45377_1_, aWoodMeta); - this.mWoodMeta = aWoodMeta; - this.setColor(353825); - this.setBiomeName("Australian Forest"); - this.setTemperatureRainfall(1.1F, 0.75F); - this.theBiomeDecorator.treesPerChunk = 16; - this.theBiomeDecorator.grassPerChunk = 5; - this.theBiomeDecorator.flowersPerChunk = 2; - this.func_76733_a(5159473); - this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 5, 4, 4)); - } - - public BiomeGenBase func_150557_a(int p_150557_1_, boolean p_150557_2_) { - if (this.mWoodMeta == 2) { - this.field_150609_ah = 353825; - this.color = p_150557_1_; - - if (p_150557_2_) { - this.field_150609_ah = (this.field_150609_ah & 16711422) >> 1; - } - - return this; - } else { - return super.func_150557_a(p_150557_1_, p_150557_2_); - } - } - - public WorldGenAbstractTree func_150567_a(Random p_150567_1_) { - int mTreeType = MathUtils.getRandomFromArray(new int[] { - 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5 - }); - if (mTreeType == 0) { - return mGenTreeCanopy; - } - else if (mTreeType == 1) { - return mGenTreeAustralian; - } - else if (mTreeType == 2) { - return mGenTreeForest; - } - else if (mTreeType == 3) { - return mGenTreeForest2; - } - else if (mTreeType == 4) { - return this.worldGeneratorSwamp; - } - else { - return MathUtils.randInt(0, 1) == 0 ? this.worldGeneratorTrees : this.worldGeneratorBigTree; - } - } - - public String func_150572_a(Random p_150572_1_, int p_150572_2_, int p_150572_3_, int p_150572_4_) { - if (this.mWoodMeta == 1) { - double d0 = MathHelper.clamp_double( - (1.0D + plantNoise.func_151601_a((double) p_150572_2_ / 48.0D, (double) p_150572_4_ / 48.0D)) - / 2.0D, - 0.0D, 0.9999D); - int l = (int) (d0 * (double) BlockFlower.field_149859_a.length); - - if (l == 1) { - l = 0; - } - - return BlockFlower.field_149859_a[l]; - } else { - return super.func_150572_a(p_150572_1_, p_150572_2_, p_150572_3_, p_150572_4_); - } - } - - public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) { - int k; - int l; - int i1; - int j1; - int k1; - - if (this.mWoodMeta == 3) { - for (k = 0; k < 4; ++k) { - for (l = 0; l < 4; ++l) { - i1 = p_76728_3_ + k * 4 + 1 + 8 + p_76728_2_.nextInt(3); - j1 = p_76728_4_ + l * 4 + 1 + 8 + p_76728_2_.nextInt(3); - k1 = p_76728_1_.getHeightValue(i1, j1); - - if (p_76728_2_.nextInt(20) == 0) { - WorldGenBigMushroom worldgenbigmushroom = new WorldGenBigMushroom(); - worldgenbigmushroom.generate(p_76728_1_, p_76728_2_, i1, k1, j1); - } else { - WorldGenAbstractTree worldgenabstracttree = this.func_150567_a(p_76728_2_); - worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); - - if (worldgenabstracttree.generate(p_76728_1_, p_76728_2_, i1, k1, j1)) { - worldgenabstracttree.func_150524_b(p_76728_1_, p_76728_2_, i1, k1, j1); - } - } - } - } - } - - k = p_76728_2_.nextInt(5) - 3; - - if (this.mWoodMeta == 1) { - k += 2; - } - - l = 0; - - while (l < k) { - i1 = p_76728_2_.nextInt(3); - - if (i1 == 0) { - genTallFlowers.func_150548_a(1); - } else if (i1 == 1) { - genTallFlowers.func_150548_a(4); - } else if (i1 == 2) { - genTallFlowers.func_150548_a(5); - } - - j1 = 0; - - while (true) { - if (j1 < 5) { - k1 = p_76728_3_ + p_76728_2_.nextInt(16) + 8; - int i2 = p_76728_4_ + p_76728_2_.nextInt(16) + 8; - int l1 = p_76728_2_.nextInt(p_76728_1_.getHeightValue(k1, i2) + 32); - - if (!genTallFlowers.generate(p_76728_1_, p_76728_2_, k1, l1, i2)) { - ++j1; - continue; - } - } - - ++l; - break; - } - } - - super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); - } - - /** - * Provides the basic grass color based on the biome temperature and rainfall - */ - @SideOnly(Side.CLIENT) - public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_) { - int l = super.getBiomeGrassColor(p_150558_1_, p_150558_2_, p_150558_3_); - return this.mWoodMeta == 3 ? (l & 16711422) + 2634762 >> 1 : l; - } - - /** - * Allocate a new BiomeDecorator for this BiomeGenBase - */ - @Override - public BiomeDecorator createBiomeDecorator() - { - return getModdedBiomeDecorator(new CustomDecorator()); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java deleted file mode 100644 index ebfb455882..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import java.util.Random; - -import gtPlusPlus.australia.biome.CustomDecorator; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.BiomeGenOcean; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianOcean extends BiomeGenOcean { - - public Biome_AustralianOcean(int p_i1985_1_) - { - super(p_i1985_1_); - this.setColor(48); - this.setBiomeName("Australian Ocean"); - this.setHeight(height_DeepOceans); - this.spawnableCreatureList.clear(); - } - - public static Biome_AustralianOcean biome = new Biome_AustralianOcean(CORE.AUSTRALIA_BIOME_OCEAN_ID); - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.COLD); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.OCEAN); - BiomeManager.addSpawnBiome(biome); - } - - public BiomeGenBase.TempCategory getTempCategory() - { - return BiomeGenBase.TempCategory.OCEAN; - } - - public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_) - { - super.genTerrainBlocks(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_); - } - - /** - * Allocate a new BiomeDecorator for this BiomeGenBase - */ - @Override - public BiomeDecorator createBiomeDecorator() - { - return getModdedBiomeDecorator(new CustomDecorator()); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java deleted file mode 100644 index 439c213ac7..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java +++ /dev/null @@ -1,381 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.australia.biome.CustomDecorator; -import gtPlusPlus.core.lib.CORE; - -import java.util.Arrays; -import java.util.Random; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.BiomeGenMesa; -import net.minecraft.world.gen.NoiseGeneratorPerlin; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianOutback extends BiomeGenMesa -{ - private byte[] field_150621_aC; - private long field_150622_aD; - private NoiseGeneratorPerlin field_150623_aE; - private NoiseGeneratorPerlin field_150624_aF; - private NoiseGeneratorPerlin field_150625_aG; - private boolean field_150626_aH; - private boolean field_150620_aI; - - public Biome_AustralianOutback(int p_i45380_1_){ - super(p_i45380_1_, false, false); - this.setColor(14238997); - this.setBiomeName("Australian Outback"); - this.field_150626_aH = false; - this.field_150620_aI = false; - this.theBiomeDecorator.generateLakes = false; - this.setDisableRain(); - this.setTemperatureRainfall(2.0F, 0.0F); - this.spawnableCreatureList.clear(); - this.topBlock = Blocks.sand; - this.field_150604_aj = 1; - this.fillerBlock = Blocks.stained_hardened_clay; - this.theBiomeDecorator.deadBushPerChunk = 20; - this.theBiomeDecorator.reedsPerChunk = 3; - this.theBiomeDecorator.cactiPerChunk = 20; - this.theBiomeDecorator.flowersPerChunk = 0; - this.spawnableCreatureList.clear(); - this.theBiomeDecorator.treesPerChunk = 5; - } - - public static Biome_AustralianOutback biome = new Biome_AustralianOutback(CORE.AUSTRALIA_BIOME_OUTBACK_ID); - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); - BiomeManager.addSpawnBiome(biome); - } - - public WorldGenAbstractTree func_150567_a(Random p_150567_1_) - { - return this.worldGeneratorTrees; - } - - public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) - { - super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); - } - - public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_) - { - if (this.field_150621_aC == null || this.field_150622_aD != p_150573_1_.getSeed()) - { - this.func_150619_a(p_150573_1_.getSeed()); - } - - if (this.field_150623_aE == null || this.field_150624_aF == null || this.field_150622_aD != p_150573_1_.getSeed()) - { - Random random1 = new Random(this.field_150622_aD); - this.field_150623_aE = new NoiseGeneratorPerlin(random1, 3); - this.field_150624_aF = new NoiseGeneratorPerlin(random1, 3); - } - - this.field_150622_aD = p_150573_1_.getSeed(); - double d5 = 0.0D; - int k; - int l; - - if (this.field_150626_aH) - { - k = (p_150573_5_ & -16) + (p_150573_6_ & 15); - l = (p_150573_6_ & -16) + (p_150573_5_ & 15); - double d1 = Math.min(Math.abs(p_150573_7_), this.field_150623_aE.func_151601_a((double)k * 0.25D, (double)l * 0.25D)); - - if (d1 > 0.0D) - { - double d2 = 0.001953125D; - double d3 = Math.abs(this.field_150624_aF.func_151601_a((double)k * d2, (double)l * d2)); - d5 = d1 * d1 * 2.5D; - double d4 = Math.ceil(d3 * 50.0D) + 32.0D; - - if (d5 > d4) - { - d5 = d4; - } - - d5 += 64.0D; - } - } - - k = p_150573_5_ & 15; - l = p_150573_6_ & 15; - boolean flag = true; - Block block = Blocks.stained_hardened_clay; - Block block2 = this.fillerBlock; - int i1 = (int)(p_150573_7_ / 3.0D + 3.0D + p_150573_2_.nextDouble() * 0.25D); - boolean flag1 = Math.cos(p_150573_7_ / 3.0D * Math.PI) > 0.0D; - int j1 = -1; - boolean flag2 = false; - int k1 = p_150573_3_.length / 256; - - for (int l1 = 255; l1 >= 0; --l1) - { - int i2 = (l * 16 + k) * k1 + l1; - - if ((p_150573_3_[i2] == null || p_150573_3_[i2].getMaterial() == Material.air) && l1 < (int)d5) - { - p_150573_3_[i2] = Blocks.stone; - } - - if (l1 <= 0 + p_150573_2_.nextInt(5)) - { - p_150573_3_[i2] = Blocks.bedrock; - } - else - { - Block block1 = p_150573_3_[i2]; - - if (block1 != null && block1.getMaterial() != Material.air) - { - if (block1 == Blocks.stone) - { - byte b0; - - if (j1 == -1) - { - flag2 = false; - - if (i1 <= 0) - { - block = null; - block2 = Blocks.stone; - } - else if (l1 >= 59 && l1 <= 64) - { - block = Blocks.stained_hardened_clay; - block2 = this.fillerBlock; - } - - if (l1 < 63 && (block == null || block.getMaterial() == Material.air)) - { - block = Blocks.sandstone; - } - - j1 = i1 + Math.max(0, l1 - 63); - - if (l1 >= 62) - { - if (this.field_150620_aI && l1 > 86 + i1 * 2) - { - if (flag1) - { - p_150573_3_[i2] = Blocks.dirt; - p_150573_4_[i2] = 1; - } - else - { - p_150573_3_[i2] = Blocks.grass; - } - } - else if (l1 > 66 + i1) - { - b0 = 16; - - if (l1 >= 64 && l1 <= 127) - { - if (!flag1) - { - b0 = this.func_150618_d(p_150573_5_, l1, p_150573_6_); - } - } - else - { - b0 = 1; - } - - if (b0 < 16) - { - p_150573_3_[i2] = Blocks.stained_hardened_clay; - p_150573_4_[i2] = (byte)b0; - } - else - { - p_150573_3_[i2] = Blocks.hardened_clay; - } - } - else - { - p_150573_3_[i2] = this.topBlock; - p_150573_4_[i2] = (byte)this.field_150604_aj; - flag2 = true; - } - } - else - { - p_150573_3_[i2] = block2; - - if (block2 == Blocks.stained_hardened_clay) - { - p_150573_4_[i2] = 1; - } - } - } - else if (j1 > 0) - { - --j1; - - if (flag2) - { - p_150573_3_[i2] = Blocks.stained_hardened_clay; - p_150573_4_[i2] = 1; - } - else - { - b0 = this.func_150618_d(p_150573_5_, l1, p_150573_6_); - - if (b0 < 16) - { - p_150573_3_[i2] = Blocks.stained_hardened_clay; - p_150573_4_[i2] = b0; - } - else - { - p_150573_3_[i2] = Blocks.hardened_clay; - } - } - } - } - } - else - { - j1 = -1; - } - } - } - super.genTerrainBlocks(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_); - } - - public void func_150619_a(long p_150619_1_) - { - this.field_150621_aC = new byte[128]; - Arrays.fill(this.field_150621_aC, (byte)16); - Random random = new Random(p_150619_1_); - this.field_150625_aG = new NoiseGeneratorPerlin(random, 3); - int j; - - for (j = 0; j < 128; ++j) - { - j += random.nextInt(8) + 1; - - if (j < 128) - { - this.field_150621_aC[j] = 1; - } - } - - j = random.nextInt(7) + 2; - int k; - int l; - int i1; - int j1; - - for (k = 0; k < j; ++k) - { - l = random.nextInt(7) + 1; - i1 = random.nextInt(128); - - for (j1 = 0; i1 + j1 < 128 && j1 < l; ++j1) - { - this.field_150621_aC[i1 + j1] = 4; - } - } - - k = random.nextInt(6) + 2; - int k1; - - for (l = 0; l < k; ++l) - { - i1 = random.nextInt(7) + 2; - j1 = random.nextInt(128); - - for (k1 = 0; j1 + k1 < 128 && k1 < i1; ++k1) - { - this.field_150621_aC[j1 + k1] = 12; - } - } - - l = random.nextInt(7) + 2; - - for (i1 = 0; i1 < l; ++i1) - { - j1 = random.nextInt(5) + 1; - k1 = random.nextInt(128); - - for (int l1 = 0; k1 + l1 < 128 && l1 < j1; ++l1) - { - this.field_150621_aC[k1 + l1] = 14; - } - } - - i1 = random.nextInt(8) + 3; - j1 = 0; - - for (k1 = 0; k1 < i1; ++k1) - { - byte b0 = 1; - j1 += random.nextInt(8) + 4; - - for (int i2 = 0; j1 + i2 < 128 && i2 < b0; ++i2) - { - this.field_150621_aC[j1 + i2] = 0; - - if (j1 + i2 > 1 && random.nextBoolean()) - { - this.field_150621_aC[j1 + i2 - 1] = 8; - } - - if (j1 + i2 < 63 && random.nextBoolean()) - { - this.field_150621_aC[j1 + i2 + 1] = 8; - } - } - } - } - - /** - * Provides the basic foliage color based on the biome temperature and rainfall - */ - @SideOnly(Side.CLIENT) - public int getBiomeFoliageColor(int p_150571_1_, int p_150571_2_, int p_150571_3_) - { - return 10387789; - } - - /** - * Provides the basic grass color based on the biome temperature and rainfall - */ - @SideOnly(Side.CLIENT) - public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_) - { - return 9470285; - } - - public byte func_150618_d(int p_150618_1_, int p_150618_2_, int p_150618_3_) - { - int l = (int)Math.round(this.field_150625_aG.func_151601_a((double)p_150618_1_ * 1.0D / 512.0D, (double)p_150618_1_ * 1.0D / 512.0D) * 2.0D); - return this.field_150621_aC[(p_150618_2_ + l + 64) % 64]; - } - - /** - * Allocate a new BiomeDecorator for this BiomeGenBase - */ - @Override - public BiomeDecorator createBiomeDecorator() - { - return getModdedBiomeDecorator(new CustomDecorator()); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java b/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java deleted file mode 100644 index c04f211fd3..0000000000 --- a/src/Java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java +++ /dev/null @@ -1,122 +0,0 @@ -package gtPlusPlus.australia.biome.type; - -import java.util.Random; - -import gtPlusPlus.australia.biome.CustomDecorator; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.BlockFlower; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.BiomeGenPlains; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_AustralianPlains extends BiomeGenPlains -{ - - public Biome_AustralianPlains(int p_i1986_1_) - { - super(p_i1986_1_); - this.setTemperatureRainfall(0.8F, 0.4F); - this.setColor(9286496); - this.setBiomeName("Plainlands"); - this.setHeight(height_LowPlains); - this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 2, 6)); - this.theBiomeDecorator.treesPerChunk = 1; - this.theBiomeDecorator.flowersPerChunk = 4; - this.theBiomeDecorator.grassPerChunk = 20; - this.flowers.clear(); - this.addFlower(Blocks.red_flower, 4, 3); - this.addFlower(Blocks.red_flower, 5, 3); - this.addFlower(Blocks.red_flower, 6, 3); - this.addFlower(Blocks.red_flower, 7, 3); - this.addFlower(Blocks.red_flower, 0, 20); - this.addFlower(Blocks.red_flower, 3, 20); - this.addFlower(Blocks.red_flower, 8, 20); - this.addFlower(Blocks.yellow_flower, 0, 30); - } - - public static Biome_AustralianPlains biome = new Biome_AustralianPlains(CORE.AUSTRALIA_BIOME_PLAINS_ID); - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); - BiomeManager.addSpawnBiome(biome); - } - - public String func_150572_a(Random p_150572_1_, int p_150572_2_, int p_150572_3_, int p_150572_4_) - { - double d0 = plantNoise.func_151601_a((double)p_150572_2_ / 200.0D, (double)p_150572_4_ / 200.0D); - int l; - - if (d0 < -0.8D) - { - l = p_150572_1_.nextInt(4); - return BlockFlower.field_149859_a[4 + l]; - } - else if (p_150572_1_.nextInt(3) > 0) - { - l = p_150572_1_.nextInt(3); - return l == 0 ? BlockFlower.field_149859_a[0] : (l == 1 ? BlockFlower.field_149859_a[3] : BlockFlower.field_149859_a[8]); - } - else - { - return BlockFlower.field_149858_b[0]; - } - } - - public void decorate(World aWorld, Random aRand, int aX, int aZ) - { - double d0 = plantNoise.func_151601_a((double)(aX + 8) / 200.0D, (double)(aZ + 8) / 200.0D); - int k; - int l; - int i1; - int j1; - - if (d0 < -0.8D) - { - this.theBiomeDecorator.flowersPerChunk = 15; - this.theBiomeDecorator.grassPerChunk = 5; - } - else - { - this.theBiomeDecorator.flowersPerChunk = 4; - this.theBiomeDecorator.grassPerChunk = 10; - genTallFlowers.func_150548_a(2); - - for (k = 0; k < 7; ++k) - { - l = aX + aRand.nextInt(16) + 8; - i1 = aZ + aRand.nextInt(16) + 8; - j1 = aRand.nextInt(aWorld.getHeightValue(l, i1) + 32); - genTallFlowers.generate(aWorld, aRand, l, j1, i1); - } - } - - if (this.field_150628_aC) - { - genTallFlowers.func_150548_a(0); - - for (k = 0; k < 10; ++k) - { - l = aX + aRand.nextInt(16) + 8; - i1 = aZ + aRand.nextInt(16) + 8; - j1 = aRand.nextInt(aWorld.getHeightValue(l, i1) + 32); - genTallFlowers.generate(aWorld, aRand, l, j1, i1); - } - } - - this.theBiomeDecorator.decorateChunk(aWorld, aRand, this, aX, aZ); - } - - /** - * Allocate a new BiomeDecorator for this BiomeGenBase - */ - @Override - public BiomeDecorator createBiomeDecorator() - { - return getModdedBiomeDecorator(new CustomDecorator()); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/block/AustraliaContentLoader.java b/src/Java/gtPlusPlus/australia/block/AustraliaContentLoader.java deleted file mode 100644 index 0df84500e1..0000000000 --- a/src/Java/gtPlusPlus/australia/block/AustraliaContentLoader.java +++ /dev/null @@ -1,67 +0,0 @@ -package gtPlusPlus.australia.block; - -import static gtPlusPlus.australia.dimension.Dimension_Australia.*; - -import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.australia.biome.type.Biome_AustralianDesert; -import gtPlusPlus.australia.biome.type.Biome_AustralianDesert2; -import gtPlusPlus.australia.item.ItemAustraliaPortalTrigger; -import gtPlusPlus.australia.item.ItemBlockAustralia; - -public class AustraliaContentLoader { - - private static Block blockAustralianSand; - private static Block blockAustralianTopSoil; - - public static AutoMap mValidGenerationBlocks = new AutoMap(); - - public synchronized static void run() { - initMisc(); - initItems(); - initBlocks(); - } - - public synchronized static boolean initMisc(){ - return true; - } - - public synchronized static boolean initItems(){ - portalItem = (ItemAustraliaPortalTrigger) (new ItemAustraliaPortalTrigger().setUnlocalizedName("australia.trigger")); - GameRegistry.registerItem(portalItem, "australia.trigger"); - return true; - } - - public synchronized static boolean initBlocks(){ - - //Create Block Instances - portalBlock = new BlockAustraliaPortal(); - blockPortalFrame = new BlockDarkWorldPortalFrame(); - blockAustralianSand = new BlockAustraliaSand(); - blockAustralianTopSoil = new BlockAustraliaTopSoil(); - mValidGenerationBlocks.put(blockAustralianSand); - mValidGenerationBlocks.put(blockAustralianTopSoil); - - //Registry - GameRegistry.registerBlock(portalBlock, ItemBlockAustralia.class, "dimensionAustraliaPortalBlock"); - GameRegistry.registerBlock(blockPortalFrame, ItemBlockAustralia.class, "blockAustraliaPortalFrame"); - - GameRegistry.registerBlock(blockAustralianSand, ItemBlockAustralia.class, "blockAustralianTopSoil"); - GameRegistry.registerBlock(blockAustralianTopSoil, ItemBlockAustralia.class, "blockAustralianSand"); - - //Set Biome Blocks up - Biome_AustralianDesert.blockFluidLakes = Blocks.water; - Biome_AustralianDesert.blockTopLayer = blockAustralianSand; - Biome_AustralianDesert.blockSecondLayer = blockAustralianTopSoil; - - Biome_AustralianDesert2.blockFluidLakes = Blocks.water; - Biome_AustralianDesert2.blockTopLayer = blockAustralianSand; - Biome_AustralianDesert2.blockSecondLayer = blockAustralianTopSoil; - - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/australia/block/BlockAustraliaPortal.java b/src/Java/gtPlusPlus/australia/block/BlockAustraliaPortal.java deleted file mode 100644 index 44ece25e43..0000000000 --- a/src/Java/gtPlusPlus/australia/block/BlockAustraliaPortal.java +++ /dev/null @@ -1,403 +0,0 @@ -package gtPlusPlus.australia.block; - -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockBreakable; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.australia.dimension.Dimension_Australia; -import gtPlusPlus.australia.world.AustraliaTeleporterDimensionMod; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class BlockAustraliaPortal extends BlockBreakable implements ITileTooltip{ - IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null; - - public BlockAustraliaPortal() { - super("portal", Material.portal, false); - this.setTickRandomly(true); - this.setHardness(-1.0F); - this.setLightLevel(0.75F); - this.setCreativeTab(CreativeTabs.tabBlock); - this.setBlockName("dimensionAustraliaPortalBlock"); - - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIcon(int i, int par2) { - - if (i == 0) - return gor; - - else if (i == 1) - return dol; - - else if (i == 2) - return st1; - - else if (i == 3) - return st2; - - else if (i == 4) - return st4; - - else if (i == 5) - return st3; - - else - return gor; - - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister reg) { - this.gor = reg.registerIcon("portal"); - this.dol = reg.registerIcon("portal"); - this.st1 = reg.registerIcon("portal"); - this.st2 = reg.registerIcon("portal"); - this.st3 = reg.registerIcon("portal"); - this.st4 = reg.registerIcon("portal"); - } - - /** - * Ticks the block if it's been scheduled - */ - @Override - public void updateTick(World par1World, int x, int y, int z, Random par5Random) { - super.updateTick(par1World, x, y, z, par5Random); - - int blockCount = 0; - BlockPos portal = new BlockPos(x, y, z, par1World.provider.dimensionId); - - for (BlockPos side : portal.getSurroundingBlocks()) { - Block b = side.getBlockAtPos(); - if (b == Dimension_Australia.blockPortalFrame || b == Dimension_Australia.portalBlock) { - blockCount++; - } - } - if (blockCount < 4) { - par1World.setBlockToAir(x, y, z); - } - - } - - /** - * Returns a bounding box from the pool of bounding boxes (this means - * this box can change after the pool has been cleared to be reused) - */ - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { - return null; - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, - * y, z - */ - @Override - public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - float f; - float f1; - if (par1IBlockAccess.getBlock(par2 - 1, par3, par4) != this && par1IBlockAccess.getBlock(par2 + 1, par3, par4) != this) { - f = 0.125F; - f1 = 0.5F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); - } else { - f = 0.5F; - f1 = 0.125F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); - } - } - - /** - * Is this block (a) opaque and (B) a full 1m cube? This determines - * whether or not to render the shared face of two adjacent blocks and - * also whether the player can attach torches, redstone wire, etc to - * this block. - */ - @Override - public boolean isOpaqueCube() { - return false; - } - - /** - * If this block doesn't render as an ordinary block it will return - * False (examples: signs, buttons, stairs, etc) - */ - @Override - public boolean renderAsNormalBlock() { - return false; - } - - /** - * Checks to see if this location is valid to create a portal and will - * return True if it does. Args: world, x, y, z - */ - public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) { - byte b0 = 0; - byte b1 = 0; - if (par1World.getBlock(par2 - 1, par3, par4) == Dimension_Australia.blockPortalFrame - || par1World.getBlock(par2 + 1, par3, par4) == Dimension_Australia.blockPortalFrame) { - b0 = 1; - } - if (par1World.getBlock(par2, par3, par4 - 1) == Dimension_Australia.blockPortalFrame - || par1World.getBlock(par2, par3, par4 + 1) == Dimension_Australia.blockPortalFrame) { - b1 = 1; - } - if (b0 == b1) { - return false; - } else { - if (par1World.getBlock(par2 - b0, par3, par4 - b1) == Blocks.air) { - par2 -= b0; - par4 -= b1; - } - int l; - int i1; - for (l = -1; l <= 2; ++l) { - for (i1 = -1; i1 <= 3; ++i1) { - boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3; - if (l != -1 && l != 2 || i1 != -1 && i1 != 3) { - Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); - if (flag) { - if (j1 != Dimension_Australia.blockPortalFrame) { - return false; - } - } - /* - * else if (j1 != 0 && j1 != - * Main.TutorialFire.blockID) { return false; } - */ - } - } - } - for (l = 0; l < 2; ++l) { - for (i1 = 0; i1 < 3; ++i1) { - par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, this, 0, 2); - } - } - return true; - } - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know - * which neighbor changed (coordinates passed are their own) Args: x, y, - * z, neighbor blockID - */ - public void onNeighborBlockChange(BlockPos pos) { - int x = pos.xPos, y = pos.yPos, z = pos.zPos; - //Logger.INFO("Trigger"); - int blockCount = 0; - BlockPos portal = pos; - World par1World = portal.world; - for (BlockPos side : portal.getSurroundingBlocks()) { - Block b = side.getBlockAtPos(); - if (b == Dimension_Australia.blockPortalFrame || b == Dimension_Australia.portalBlock) { - blockCount++; - } - } - if (blockCount < 4) { - par1World.setBlockToAir(x, y, z); - par1World.scheduleBlockUpdate(x, y, z, portal.getBlockAtPos(), 0); - } - - - - byte b0 = 0; - byte b1 = 1; - if (par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this) { - b0 = 1; - b1 = 0; - } - int i1; - for (i1 = y; par1World.getBlock(x, i1 - 1, z) == this; --i1) { - ; - } - if (par1World.getBlock(x, i1 - 1, z) != Dimension_Australia.blockPortalFrame) { - par1World.setBlockToAir(x, y, z); - } else { - int j1; - for (j1 = 1; j1 < 4 && par1World.getBlock(x, i1 + j1, z) == this; ++j1) { - ; - } - if (j1 == 3 && par1World.getBlock(x, i1 + j1, z) == Dimension_Australia.blockPortalFrame) { - boolean flag = par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this; - boolean flag1 = par1World.getBlock(x, y, z - 1) == this || par1World.getBlock(x, y, z + 1) == this; - if (flag && flag1) { - par1World.setBlockToAir(x, y, z); - } else { - if ((par1World.getBlock(x + b0, y, z + b1) != Dimension_Australia.blockPortalFrame || par1World - .getBlock(x - b0, y, z - b1) != this) - && (par1World.getBlock(x - b0, y, z - b1) != Dimension_Australia.blockPortalFrame || par1World.getBlock(x + b0, y, - z + b1) != this)) { - par1World.setBlockToAir(x, y, z); - } - } - } else { - par1World.setBlockToAir(x, y, z); - } - } - } - - @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { - onNeighborBlockChange(new BlockPos(x, y, z, world.provider.dimensionId)); - super.onNeighborBlockChange(world, x, y, z, block); - } - - /*@Override - public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) { - onNeighborBlockChange(new BlockPos(x, y, z, world.)); - super.onNeighborChange(world, x, y, z, tileX, tileY, tileZ); - }*/ - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given - * coordinates. Args: blockAccess, x, y, z, side - */ - public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { - if (par1IBlockAccess.getBlock(par2, par3, par4) == this) { - return false; - } else { - boolean flag = par1IBlockAccess.getBlock(par2 - 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 - 2, par3, par4) != this; - boolean flag1 = par1IBlockAccess.getBlock(par2 + 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 + 2, par3, par4) != this; - boolean flag2 = par1IBlockAccess.getBlock(par2, par3, par4 - 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 - 2) != this; - boolean flag3 = par1IBlockAccess.getBlock(par2, par3, par4 + 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this; - boolean flag4 = flag || flag1; - boolean flag5 = flag2 || flag3; - return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3)); - } - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - @Override - public int quantityDropped(Random par1Random) { - return 0; - } - - /** - * Triggered whenever an entity collides with this block (enters into - * the block). Args: world, x, y, z, entity - */ - @Override - public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { - if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { - EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity; - if (thePlayer.timeUntilPortal > 0) { - thePlayer.timeUntilPortal = 100; - } else if (thePlayer.dimension != Dimension_Australia.DIMID) { - thePlayer.timeUntilPortal = 100; - thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, Dimension_Australia.DIMID, - new AustraliaTeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(Dimension_Australia.DIMID))); - } else { - thePlayer.timeUntilPortal = 100; - thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, - new AustraliaTeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(0))); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha - */ - public int getRenderBlockPass() { - return 1; - } - - @Override - @SideOnly(Side.CLIENT) - /** - * A randomly called display update to be able to add particles or other items for display - */ - public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { - if (CORE.RANDOM.nextInt(100) == 0) { - par1World.playSound(par2 + 0.5D, par3 + 0.5D, par4 + 0.5D, "portal.portal", 0.5F, - CORE.RANDOM.nextFloat() * 0.4F + 0.8F, false); - } - for (int l = 0; l < 4; ++l) { - double d0 = par2 + CORE.RANDOM.nextFloat(); - double d1 = par3 + CORE.RANDOM.nextFloat(); - double d2 = par4 + CORE.RANDOM.nextFloat(); - double d3 = 0.0D; - double d4 = 0.0D; - double d5 = 0.0D; - int i1 = CORE.RANDOM.nextInt(2) * 2 - 1; - d3 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - d4 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - d5 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - if (par1World.getBlock(par2 - 1, par3, par4) != this && par1World.getBlock(par2 + 1, par3, par4) != this) { - d0 = par2 + 0.5D + 0.25D * i1; - d3 = CORE.RANDOM.nextFloat() * 2.0F * i1; - } else { - d2 = par4 + 0.5D + 0.25D * i1; - d5 = CORE.RANDOM.nextFloat() * 2.0F * i1; - } - par1World.spawnParticle("reddust", d0+0.1D, d1, d2, d3, d4, d5); - par1World.spawnParticle("smoke", d0, d1+0.1D, d2, 0, 0, 0); - - Random R = new Random(); - - if (R.nextInt(10) == 0){ - par1World.spawnParticle("largesmoke", d0, d1, d2, 0, 0+0.2D, 0); - } - else if (R.nextInt(5)==1){ - par1World.spawnParticle("flame", d0, d1, d2, 0, 0+0.1D, 0); - } - } - } - - @SideOnly(Side.CLIENT) - /** - * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) - */ - public int idPicked(World par1World, int par2, int par3, int par4) { - return 0; - } - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - return Utils.rgbtoHexValue(0, 255, 0); - } - - @Override - public int getRenderColor(final int aMeta) { - return Utils.rgbtoHexValue(0, 255, 0); - } - - @Override - public String getLocalizedName() { - return EnumChatFormatting.OBFUSCATED+super.getLocalizedName(); - } - - @Override - public int getTooltipID() { - return 1; - } -} - - diff --git a/src/Java/gtPlusPlus/australia/block/BlockAustraliaSand.java b/src/Java/gtPlusPlus/australia/block/BlockAustraliaSand.java deleted file mode 100644 index 62d443bc13..0000000000 --- a/src/Java/gtPlusPlus/australia/block/BlockAustraliaSand.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.australia.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; - -import net.minecraft.block.BlockGrass; -import net.minecraft.block.BlockSand; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockAustraliaSand extends BlockSand implements ITileTooltip{ - - public BlockAustraliaSand() { - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setBlockName("blockAustralianSand"); - this.setHardness(0.1F); - this.setBlockTextureName("minecraft" + ":" + "sand"); - LanguageRegistry.addName(this, "Sandy Earth"); - } - - @Override - public int getTooltipID() { - return 2; - } - -} diff --git a/src/Java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java b/src/Java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java deleted file mode 100644 index 09c7dbf22d..0000000000 --- a/src/Java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java +++ /dev/null @@ -1,76 +0,0 @@ -package gtPlusPlus.australia.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockDirt; -import net.minecraft.block.BlockSand; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.world.ColorizerGrass; -import net.minecraft.world.IBlockAccess; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockAustraliaTopSoil extends BlockSand implements ITileTooltip{ - - public BlockAustraliaTopSoil() { - this.setHardness(0.5F); - this.setBlockTextureName("minecraft" + ":" + "dirt"); - this.setCreativeTab(CreativeTabs.tabBlock); - this.setBlockName("blockAustralianTopSoil"); - LanguageRegistry.addName(this, "Desert Earth"); - } - - @Override - @SideOnly(Side.CLIENT) - public int getBlockColor() - { - double d0 = 0.5D; - double d1 = 1.0D; - return ColorizerGrass.getGrassColor(d0, d1); - } - - /** - * Returns the color this block should be rendered. Used by leaves. - */ - @Override - @SideOnly(Side.CLIENT) - public int getRenderColor(int p_149741_1_) - { - return this.getBlockColor(); - } - - /** - * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called - * when first determining what to render. - */ - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) - { - int l = 0; - int i1 = 0; - int j1 = 0; - - for (int k1 = -1; k1 <= 1; ++k1) - { - for (int l1 = -1; l1 <= 1; ++l1) - { - int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); - l += (i2 & 16711680) >> 16; - i1 += (i2 & 65280) >> 8; - j1 += i2 & 255; - } - } - - return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; - } - - @Override - public int getTooltipID() { - return 3; - } - -} diff --git a/src/Java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java b/src/Java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java deleted file mode 100644 index 1de7425f6a..0000000000 --- a/src/Java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.australia.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip{ - - public BlockDarkWorldPortalFrame() { - super(Material.iron); - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setBlockName("blockAustraliaPortalFrame"); - this.setHardness(3.0F); - this.setLightLevel(0.5F); - this.setBlockTextureName(CORE.MODID + ":" + "metro/TEXTURE_TECH_PANEL_A"); - LanguageRegistry.addName(this, "Containment Frame"); - - } - - @Override - public int getTooltipID() { - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java b/src/Java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java deleted file mode 100644 index 07f5f969e2..0000000000 --- a/src/Java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java +++ /dev/null @@ -1,821 +0,0 @@ -package gtPlusPlus.australia.chunk; - -import static net.minecraft.world.gen.structure.MapGenVillage.villageSpawnBiomes; -import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import cpw.mods.fml.common.eventhandler.Event.Result; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.gen.map.MapGenLargeRavine; -import net.minecraft.block.Block; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.util.IProgressUpdate; -import net.minecraft.util.MathHelper; -import net.minecraft.world.ChunkPosition; -import net.minecraft.world.SpawnerAnimals; -import net.minecraft.world.World; -import net.minecraft.world.WorldType; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.ChunkProviderGenerate; -import net.minecraft.world.gen.MapGenBase; -import net.minecraft.world.gen.MapGenCaves; -import net.minecraft.world.gen.NoiseGenerator; -import net.minecraft.world.gen.NoiseGeneratorOctaves; -import net.minecraft.world.gen.NoiseGeneratorPerlin; -import net.minecraft.world.gen.feature.WorldGenDungeons; -import net.minecraft.world.gen.structure.MapGenMineshaft; -import net.minecraft.world.gen.structure.MapGenScatteredFeature; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.terraingen.ChunkProviderEvent; -import net.minecraftforge.event.terraingen.PopulateChunkEvent; -import net.minecraftforge.event.terraingen.TerrainGen; - -public class ChunkProviderAustralia extends ChunkProviderGenerate implements IChunkProvider { - private Random rand; - private NoiseGeneratorOctaves noiseGen1; - private NoiseGeneratorOctaves noiseGen2; - private NoiseGeneratorOctaves noiseGen3; - private NoiseGeneratorPerlin noiseGen4; - /** - * Reference to the World object. - */ - private World worldObj; - private WorldType worldType; - private final double[] field_147434_q; - private final float[] parabolicField; - private double[] stoneNoise = new double[256]; - private MapGenBase caveGenerator = new MapGenCaves(); - /** - * Holds Stronghold Generator - */ - // private MapGenStronghold strongholdGenerator = new - // MapGenStronghold(); - - /** - * Holds Mineshaft Generator - */ - private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft(); - private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); - /** - * Holds ravine generator - */ - private MapGenBase ravineGenerator = new MapGenLargeRavine(); - /** - * The biomes that are used to generate the chunk - */ - private BiomeGenBase[] biomesForGeneration; - double[] doubleArray1; - double[] doubleArray2; - double[] doubleArray3; - double[] doubleArray4; - - int[][] field_73219_j = new int[32][32]; - Map map; - - // Some Init Field? - { - - try { - List y = new ArrayList(); - if (!villageSpawnBiomes.isEmpty()) { - y.addAll(villageSpawnBiomes); - } - - for (BiomeGenBase h : gtPlusPlus.australia.gen.map.MapGenExtendedVillage.villageSpawnBiomes) { - if (!y.contains(h)) { - if (h instanceof BiomeGenBase) { - try { - y.add(h); - } - catch (Throwable t) {} - } - } - } - if (y.size() > villageSpawnBiomes.size()) { - villageSpawnBiomes = y; - } - } - catch (Throwable t) {} - - caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); - mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT); - scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE); - ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE); - } - - public ChunkProviderAustralia(World par1World, long par2) { - super(par1World, par2, true); - this.worldObj = par1World; - this.worldType = par1World.getWorldInfo().getTerrainType(); - this.rand = new Random(par2); - this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16); - this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16); - this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8); - this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4); - this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); - this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); - this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); - this.field_147434_q = new double[2500]; - this.parabolicField = new float[25]; - for (int j = -2; j <= 2; j++) { - for (int k = -2; k <= 2; k++) { - float f = 10.0F / MathHelper.sqrt_float(j * j + k * k + 0.2F); - this.parabolicField[(j + 2 + (k + 2) * 5)] = f; - } - } - NoiseGenerator[] noiseGens = { this.noiseGen1, this.noiseGen2, this.noiseGen3, this.noiseGen4, this.noiseGen5, - this.noiseGen6, this.mobSpawnerNoise }; - noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens); - this.noiseGen1 = ((NoiseGeneratorOctaves) noiseGens[0]); - this.noiseGen2 = ((NoiseGeneratorOctaves) noiseGens[1]); - this.noiseGen3 = ((NoiseGeneratorOctaves) noiseGens[2]); - this.noiseGen4 = ((NoiseGeneratorPerlin) noiseGens[3]); - this.noiseGen5 = ((NoiseGeneratorOctaves) noiseGens[4]); - this.noiseGen6 = ((NoiseGeneratorOctaves) noiseGens[5]); - this.mobSpawnerNoise = ((NoiseGeneratorOctaves) noiseGens[6]); - } - - public void func_147424_a(int p_147424_1_, int p_147424_2_, Block[] p_147424_3_) { - byte b0 = 63; - this.biomesForGeneration = this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration, - p_147424_1_ * 4 - 2, p_147424_2_ * 4 - 2, 10, 10); - - func_147423_a(p_147424_1_ * 4, 0, p_147424_2_ * 4); - for (int k = 0; k < 4; k++) { - int l = k * 5; - int i1 = (k + 1) * 5; - for (int j1 = 0; j1 < 4; j1++) { - int k1 = (l + j1) * 33; - int l1 = (l + j1 + 1) * 33; - int i2 = (i1 + j1) * 33; - int j2 = (i1 + j1 + 1) * 33; - for (int k2 = 0; k2 < 32; k2++) { - double d0 = 0.125D; - double d1 = this.field_147434_q[(k1 + k2)]; - double d2 = this.field_147434_q[(l1 + k2)]; - double d3 = this.field_147434_q[(i2 + k2)]; - double d4 = this.field_147434_q[(j2 + k2)]; - double d5 = (this.field_147434_q[(k1 + k2 + 1)] - d1) * d0; - double d6 = (this.field_147434_q[(l1 + k2 + 1)] - d2) * d0; - double d7 = (this.field_147434_q[(i2 + k2 + 1)] - d3) * d0; - double d8 = (this.field_147434_q[(j2 + k2 + 1)] - d4) * d0; - for (int l2 = 0; l2 < 8; l2++) { - double d9 = 0.25D; - double d10 = d1; - double d11 = d2; - double d12 = (d3 - d1) * d9; - double d13 = (d4 - d2) * d9; - for (int i3 = 0; i3 < 4; i3++) { - int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2; - short short1 = 256; - j3 -= short1; - double d14 = 0.25D; - double d16 = (d11 - d10) * d14; - double d15 = d10 - d16; - for (int k3 = 0; k3 < 4; k3++) { - if ((d15 += d16) > 0.0D) { - p_147424_3_[(j3 += short1)] = Blocks.stone; - } else if (k2 * 8 + l2 < b0) { - p_147424_3_[(j3 += short1)] = Blocks.water; - } else { - p_147424_3_[(j3 += short1)] = null; - } - } - d10 += d12; - d11 += d13; - } - d1 += d5; - d2 += d6; - d3 += d7; - d4 += d8; - } - } - } - } - } - - public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, - BiomeGenBase[] p_147422_5_) { - ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, - p_147422_2_, p_147422_3_, p_147422_5_); - MinecraftForge.EVENT_BUS.post(event); - if (event.getResult() == Result.DENY) { - return; - } - double d0 = 0.03125D; - this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16, 16, - d0 * 2.0D, d0 * 2.0D, 1.0D); - for (int k = 0; k < 16; k++) { - for (int l = 0; l < 16; l++) { - BiomeGenBase biomegenbase = p_147422_5_[(l + k * 16)]; - biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, - p_147422_2_ * 16 + l, this.stoneNoise[(l + k * 16)]); - } - } - } - - /** - * loads or generates the chunk at the chunk location specified - */ - @Override - public Chunk loadChunk(int par1, int par2) { - return this.provideChunk(par1, par2); - } - - /** - * Will return back a chunk, if it doesn't exist and its not a MP client it will - * generates all the blocks for the specified chunk from the map seed and chunk - * seed - */ - @Override - public Chunk provideChunk(int x, int z) { - try { - Block[] ablock = new Block[65536]; - //generateTerrain(x, z, ablock); - caveGenerator.func_151539_a(this, worldObj, x, z, ablock); - ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); - } catch (Exception e) { - e.printStackTrace(); - } - return super.provideChunk(x, z); - /* - * rand.setSeed(x * 341873128712L + z * 132897987541L); Block[] ablock = new - * Block[65536]; byte[] abyte = new byte[65536]; generateTerrain(x, z, ablock); - * biomesForGeneration = - * worldObj.getWorldChunkManager().loadBlockGeneratorData(biomesForGeneration, x - * * 16, z * 16, 16, 16); replaceBlocksForBiome(x, z, ablock, abyte, - * biomesForGeneration); - * - * caveGenerator.func_151539_a(this, worldObj, x, z, ablock); - * caveGenerator.func_151539_a(this, worldObj, x, z, ablock); - * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); - * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); - * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); - * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); - * //villageGenerator.func_151539_a(this, worldObj, x, z, ablock); - * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); - * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); - * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); - * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); - * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); - * mineshaftGenerator.func_151539_a(this, worldObj, x, z, ablock); - * - * Chunk chunk = new Chunk(worldObj, ablock, abyte, x, z); byte[] abyte1 = - * chunk.getBiomeArray(); - * - * for (int k = 0; k < abyte1.length; ++k) abyte1[k] = - * (byte)biomesForGeneration[k].biomeID; - * - * chunk.generateSkylightMap(); return chunk; - */ - } - - public void generateTerrain(int x, int z, Block[] par3BlockArray) { - byte b0 = 63; - biomesForGeneration = worldObj.getWorldChunkManager().getBiomesForGeneration(biomesForGeneration, x * 4 - 2, - z * 4 - 2, 10, 10); - generateNoise(x * 4, 0, z * 4); - - for (int k = 0; k < 4; ++k) { - int l = k * 5; - int i1 = (k + 1) * 5; - - for (int j1 = 0; j1 < 4; ++j1) { - int k1 = (l + j1) * 33; - int l1 = (l + j1 + 1) * 33; - int i2 = (i1 + j1) * 33; - int j2 = (i1 + j1 + 1) * 33; - - for (int k2 = 0; k2 < 32; ++k2) { - double d0 = 0.125D; - double d1 = field_147434_q[k1 + k2]; - double d2 = field_147434_q[l1 + k2]; - double d3 = field_147434_q[i2 + k2]; - double d4 = field_147434_q[j2 + k2]; - double d5 = (field_147434_q[k1 + k2 + 1] - d1) * d0; - double d6 = (field_147434_q[l1 + k2 + 1] - d2) * d0; - double d7 = (field_147434_q[i2 + k2 + 1] - d3) * d0; - double d8 = (field_147434_q[j2 + k2 + 1] - d4) * d0; - - for (int l2 = 0; l2 < 8; ++l2) { - double d9 = 0.25D; - double d10 = d1; - double d11 = d2; - double d12 = (d3 - d1) * d9; - double d13 = (d4 - d2) * d9; - - for (int i3 = 0; i3 < 4; ++i3) { - int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2; - short short1 = 256; - j3 -= short1; - double d14 = 0.25D; - double d16 = (d11 - d10) * d14; - double d15 = d10 - d16; - - for (int k3 = 0; k3 < 4; ++k3) - if ((d15 += d16) > 0.0D) - par3BlockArray[j3 += short1] = Blocks.stone; - else if (k2 * 8 + l2 < b0) - par3BlockArray[j3 += short1] = Blocks.water; - else - par3BlockArray[j3 += short1] = null; - - d10 += d12; - d11 += d13; - } - - d1 += d5; - d2 += d6; - d3 += d7; - d4 += d8; - } - } - } - } - } - - private void generateNoise(int x, int y, int z) { - doubleArray4 = noiseGen6.generateNoiseOctaves(doubleArray4, x, z, 5, 5, 200.0D, 200.0D, 0.5D); - doubleArray1 = noiseGen3.generateNoiseOctaves(doubleArray1, x, y, z, 5, 33, 5, 8.555150000000001D, - 4.277575000000001D, 8.555150000000001D); - doubleArray2 = noiseGen1.generateNoiseOctaves(doubleArray2, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D); - doubleArray3 = noiseGen2.generateNoiseOctaves(doubleArray3, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D); - int l = 0; - int i1 = 0; - for (int j1 = 0; j1 < 5; ++j1) - for (int k1 = 0; k1 < 5; ++k1) { - float f = 0.0F; - float f1 = 0.0F; - float f2 = 0.0F; - byte b0 = 2; - BiomeGenBase biomegenbase = biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; - - for (int l1 = -b0; l1 <= b0; ++l1) - for (int i2 = -b0; i2 <= b0; ++i2) { - BiomeGenBase biomegenbase1 = biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10]; - float f3 = biomegenbase1.rootHeight; - float f4 = biomegenbase1.heightVariation; - - if (worldType == WorldType.AMPLIFIED && f3 > 0.0F) { - f3 = 1.0F + f3 * 2.0F; - f4 = 1.0F + f4 * 4.0F; - } - - float f5 = parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F); - - if (biomegenbase1.rootHeight > biomegenbase.rootHeight) - f5 /= 2.0F; - - f += f4 * f5; - f1 += f3 * f5; - f2 += f5; - } - - f /= f2; - f1 /= f2; - f = f * 0.9F + 0.1F; - f1 = (f1 * 4.0F - 1.0F) / 8.0F; - double d13 = doubleArray4[i1] / 8000.0D; - - if (d13 < 0.0D) - d13 = -d13 * 0.3D; - - d13 = d13 * 3.0D - 2.0D; - - if (d13 < 0.0D) { - d13 /= 2.0D; - - if (d13 < -1.0D) - d13 = -1.0D; - - d13 /= 1.4D; - d13 /= 2.0D; - } else { - if (d13 > 1.0D) - d13 = 1.0D; - - d13 /= 8.0D; - } - - ++i1; - double d12 = f1; - double d14 = f; - d12 += d13 * 0.2D; - d12 = d12 * 8.5D / 8.0D; - double d5 = 8.5D + d12 * 4.0D; - - for (int j2 = 0; j2 < 33; ++j2) { - double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; - - if (d6 < 0.0D) - d6 *= 4.0D; - - double d7 = doubleArray2[l] / 512.0D; - double d8 = doubleArray3[l] / 512.0D; - double d9 = (doubleArray1[l] / 10.0D + 1.0D) / 2.0D; - double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; - - if (j2 > 29) { - double d11 = (j2 - 29) / 3.0F; - d10 = d10 * (1.0D - d11) + -10.0D * d11; - } - - field_147434_q[l] = d10; - ++l; - } - } - } - - private void func_147423_a(int p_147423_1_, int p_147423_2_, int p_147423_3_) { - double d0 = 684.412D; - double d1 = 684.412D; - double d2 = 512.0D; - double d3 = 512.0D; - this.doubleArray4 = this.noiseGen6.generateNoiseOctaves(this.doubleArray4, p_147423_1_, p_147423_3_, 5, 5, - 200.0D, 200.0D, 0.5D); - this.doubleArray1 = this.noiseGen3.generateNoiseOctaves(this.doubleArray1, p_147423_1_, p_147423_2_, - p_147423_3_, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D); - - this.doubleArray2 = this.noiseGen1.generateNoiseOctaves(this.doubleArray2, p_147423_1_, p_147423_2_, - p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); - - this.doubleArray3 = this.noiseGen2.generateNoiseOctaves(this.doubleArray3, p_147423_1_, p_147423_2_, - p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); - - boolean flag1 = false; - boolean flag = false; - int l = 0; - int i1 = 0; - double d4 = 8.5D; - for (int j1 = 0; j1 < 5; j1++) { - for (int k1 = 0; k1 < 5; k1++) { - float f = 0.0F; - float f1 = 0.0F; - float f2 = 0.0F; - byte b0 = 2; - BiomeGenBase biomegenbase = this.biomesForGeneration[(j1 + 2 + (k1 + 2) * 10)]; - for (int l1 = -b0; l1 <= b0; l1++) { - for (int i2 = -b0; i2 <= b0; i2++) { - BiomeGenBase biomegenbase1 = this.biomesForGeneration[(j1 + l1 + 2 + (k1 + i2 + 2) * 10)]; - float f3 = biomegenbase1.rootHeight; - float f4 = biomegenbase1.heightVariation; - if ((this.worldType == WorldType.AMPLIFIED) && (f3 > 0.0F)) { - f3 = 1.0F + f3 * 2.0F; - f4 = 1.0F + f4 * 4.0F; - } - float f5 = this.parabolicField[(l1 + 2 + (i2 + 2) * 5)] / (f3 + 2.0F); - if (biomegenbase1.rootHeight > biomegenbase.rootHeight) { - f5 /= 2.0F; - } - f += f4 * f5; - f1 += f3 * f5; - f2 += f5; - } - } - f /= f2; - f1 /= f2; - f = f * 0.9F + 0.1F; - f1 = (f1 * 4.0F - 1.0F) / 8.0F; - double d13 = this.doubleArray4[i1] / 8000.0D; - if (d13 < 0.0D) { - d13 = -d13 * 0.3D; - } - d13 = d13 * 3.0D - 2.0D; - if (d13 < 0.0D) { - d13 /= 2.0D; - if (d13 < -1.0D) { - d13 = -1.0D; - } - d13 /= 1.4D; - d13 /= 2.0D; - } else { - if (d13 > 1.0D) { - d13 = 1.0D; - } - d13 /= 8.0D; - } - i1++; - double d12 = f1; - double d14 = f; - d12 += d13 * 0.2D; - d12 = d12 * 8.5D / 8.0D; - double d5 = 8.5D + d12 * 4.0D; - for (int j2 = 0; j2 < 33; j2++) { - double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; - if (d6 < 0.0D) { - d6 *= 4.0D; - } - double d7 = this.doubleArray2[l] / 512.0D; - double d8 = this.doubleArray3[l] / 512.0D; - double d9 = (this.doubleArray1[l] / 10.0D + 1.0D) / 2.0D; - double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; - if (j2 > 29) { - double d11 = (j2 - 29) / 3.0F; - d10 = d10 * (1.0D - d11) + -10.0D * d11; - } - this.field_147434_q[l] = d10; - l++; - } - } - } - } - - /** - * Checks to see if a chunk exists at x, y - */ - @Override - public boolean chunkExists(int par1, int par2) { - return super.chunkExists(par1, par2); - } - - /** - * Populates chunk with ores etc etc - */ - @Override - public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { - - if (this.worldObj.getChunkFromChunkCoords(par2, par3) != null) { - super.populate(par1IChunkProvider, par2, par3); - try { - //Maybe Custom stuff? - boolean doGen = false; - boolean flag = false; - int k1; - int l1; - int i2; - int x = par2 * 16; - int z = par3 * 16; - BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(x + 16, z + 16); - MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); - doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON); - for (k1 = 0; doGen && k1 < 8; ++k1) { - l1 = x + this.rand.nextInt(16) + 8; - i2 = this.rand.nextInt(256); - int j2 = z + this.rand.nextInt(16) + 8; - (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2); - } - - if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) { - SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand); - SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand); - } - MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - - - /*boolean generateStructures = true; - - BlockFalling.fallInstantly = true; - int x = par2 * 16; - int z = par3 * 16; - BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(x + 16, z + 16); - this.rand.setSeed(this.worldObj.getSeed()); - long i1 = this.rand.nextLong() / 2L * 2L + 1L; - long j1 = this.rand.nextLong() / 2L * 2L + 1L; - this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed()); - boolean flag = false; - - MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); - - if (generateStructures) { - this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); - // flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, - // this.rand, par2, par3); - this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); - } - - int k1; - int l1; - int i2; - - if (generateStructures) { - if (generateStructures) { - // No specific liquid dimlets specified: we generate default lakes (water and - // lava were appropriate). - if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag - && this.rand.nextInt(4) == 0 - && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, - net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE)) { - k1 = x + this.rand.nextInt(16) + 8; - l1 = this.rand.nextInt(256); - i2 = z + this.rand.nextInt(16) + 8; - (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2); - } - - if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, - net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA) && !flag - && this.rand.nextInt(8) == 0) { - k1 = x + this.rand.nextInt(16) + 8; - l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); - i2 = z + this.rand.nextInt(16) + 8; - - if (l1 < 63 || this.rand.nextInt(10) == 0) { - (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); - } - } - } - * else { // Generate lakes for the specified biomes. for (Block liquid : - * dimensionInformation.getFluidsForLakes()) { if (!flag && this.rand.nextInt(4) - * == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, - * flag, - * net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType. - * LAKE)) { k1 = x + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 - * = z + this.rand.nextInt(16) + 8; (new - * WorldGenLakes(liquid)).generate(this.worldObj, this.rand, k1, l1, i2); } } } - - } - - boolean doGen = false; - if (generateStructures) { - doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, - net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON); - for (k1 = 0; doGen && k1 < 8; ++k1) { - l1 = x + this.rand.nextInt(16) + 8; - i2 = this.rand.nextInt(256); - int j2 = z + this.rand.nextInt(16) + 8; - (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2); - } - } - - biomegenbase.decorate(this.worldObj, this.rand, x, z); - if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) { - SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand); - } - x += 8; - z += 8; - - doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, - net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE); - for (k1 = 0; doGen && k1 < 16; ++k1) { - for (l1 = 0; l1 < 16; ++l1) { - i2 = this.worldObj.getPrecipitationHeight(x + k1, z + l1); - - if (this.worldObj.isBlockFreezable(k1 + x, i2 - 1, l1 + z)) { - this.worldObj.setBlock(k1 + x, i2 - 1, l1 + z, Blocks.ice, 0, 2); - } - - if (this.worldObj.func_147478_e(k1 + x, i2, l1 + z, true)) { - this.worldObj.setBlock(k1 + x, i2, l1 + z, Blocks.snow_layer, 0, 2); - } - } - } - - MinecraftForge.EVENT_BUS - .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); - - BlockFalling.fallInstantly = false;*/ - // super.populate(par1IChunkProvider, par2, par3); - /* - * net.minecraft.block.BlockFalling.fallInstantly = false; int k = par2 * 16; - * int l = par3 * 16; BiomeGenBase biomegenbase = - * this.worldObj.getBiomeGenForCoords(k + 16, l + 16); - * this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / - * 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; - * this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed()); boolean - * flag = false; - * - * MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, - * this.worldObj, this.rand, par2, par3, flag)); - * - * - * this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, - * par2, par3); flag = - * this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, - * par2, par3); - * this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, - * this.rand, par2, par3); if (flag) { Logger.INFO("Did Generate? "+flag); } - * else { - * //Logger.INFO("Can village spawn here? "+villageGenerator.villageSpawnBiomes. - * contains(biomegenbase)); } - * - * - * if ((biomegenbase != BiomeGenBase.desert) && (biomegenbase != - * BiomeGenBase.desertHills) && (!flag)) { if ((this.rand.nextInt(4) == 0) && - * (TerrainGen.populate(par1IChunkProvider, this.worldObj, this.rand, par2, - * par3, flag, PopulateChunkEvent.Populate.EventType.LAKE))) { int k1 = k + - * this.rand.nextInt(16) + 8; int l1 = this.rand.nextInt(256); int i2 = l + - * this.rand.nextInt(16) + 8; new - * WorldGenLakes(Blocks.water).generate(this.worldObj, this.rand, k1, l1, i2); } - * } if ((TerrainGen.populate(par1IChunkProvider, this.worldObj, this.rand, - * par2, par3, flag, PopulateChunkEvent.Populate.EventType.LAVA)) && (!flag) && - * (this.rand.nextInt(8) == 0)) { int k1 = k + this.rand.nextInt(16) + 8; int l1 - * = this.rand.nextInt(this.rand.nextInt(248) + 8); int i2 = l + - * this.rand.nextInt(16) + 8; if ((l1 < 63) || (this.rand.nextInt(10) == 0)) { - * new WorldGenLakes(Blocks.water).generate(this.worldObj, this.rand, k1, l1, - * i2); } } int var4 = par2 * 16; int var5 = par3 * 16; - * - * biomegenbase.decorate(this.worldObj, this.rand, k, l); - * SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l - * + 8, 16, 16, this.rand); if (TerrainGen.populate(this, worldObj, rand, par2, - * par3, flag, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, - * biomegenbase, k + 8, l + 8, 16, 16, this.rand); } k += 8; l += 8; - * - * MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, - * this.worldObj, this.rand, par2, par3, flag)); - * - * net.minecraft.block.BlockFalling.fallInstantly = false; - */ - } - - /** - * Two modes of operation: if passed true, save all Chunks in one go. If passed - * false, save up to two chunks. Return true if all chunks have been saved. - */ - @Override - public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate) { - return super.saveChunks(par1, par2IProgressUpdate); - } - - /** - * Save extra data not associated with any Chunk. Not saved during autosave, - * only during world unload. Currently unimplemented. - */ - @Override - public void saveExtraData() { - super.saveExtraData(); - } - - /** - * Unloads chunks that are marked to be unloaded. This is not guaranteed to - * unload every such chunk. - */ - @Override - public boolean unloadQueuedChunks() { - return super.unloadQueuedChunks(); - } - - /** - * Returns if the IChunkProvider supports saving. - */ - @Override - public boolean canSave() { - return super.canSave(); - } - - /** - * Converts the instance data to a readable string. - */ - @Override - public String makeString() { - return "RandomLevelSource"; - } - - /** - * Returns a list of creatures of the specified type that can spawn at the given - * location. - */ - @SuppressWarnings("rawtypes") - @Override - public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { - BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4); - return (par1EnumCreatureType == EnumCreatureType.monster) - && (this.scatteredFeatureGenerator.func_143030_a(par2, par3, par4)) - ? this.scatteredFeatureGenerator.getScatteredFeatureSpawnList() - : biomegenbase.getSpawnableList(par1EnumCreatureType); - } - - @Override - public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, - int p_147416_5_) { - Logger.INFO("func_147416_a: " + p_147416_2_); - return super.func_147416_a(p_147416_1_, p_147416_2_, p_147416_3_, p_147416_4_, p_147416_5_); - /* - * return "ExtendedVillage".equals(p_147416_2_) && this.villageGenerator != null - * ? this.villageGenerator.func_151545_a(p_147416_1_, p_147416_3_, p_147416_4_, - * p_147416_5_) : null; - */ - } - - @Override - public int getLoadedChunkCount() { - return super.getLoadedChunkCount(); - } - - @Override - public void recreateStructures(int par1, int par2) { - super.recreateStructures(par1, par2); - // this.mineshaftGenerator.func_151539_a(this, this.worldObj, par1, par2, - // (Block[])null); - // this.villageGenerator.func_151539_a(this, this.worldObj, par1, par2, - // (Block[])null); - // this.scatteredFeatureGenerator.func_151539_a(this, this.worldObj, par1, par2, - // (Block[])null); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/dimension/Dimension_Australia.java b/src/Java/gtPlusPlus/australia/dimension/Dimension_Australia.java deleted file mode 100644 index ff9e81085d..0000000000 --- a/src/Java/gtPlusPlus/australia/dimension/Dimension_Australia.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.australia.dimension; - -import net.minecraft.block.Block; -import gtPlusPlus.australia.block.BlockAustraliaPortal; -import gtPlusPlus.australia.item.ItemAustraliaPortalTrigger; -import gtPlusPlus.australia.world.AustraliaWorldProvider; -import gtPlusPlus.core.lib.CORE; -import net.minecraftforge.common.DimensionManager; - -public class Dimension_Australia { - - public Object instance; - public static int DIMID = CORE.AUSTRALIA_ID; - public static BlockAustraliaPortal portalBlock; - public static ItemAustraliaPortalTrigger portalItem; - public static Block blockPortalFrame; - - public void load() { - DimensionManager.registerProviderType(DIMID, AustraliaWorldProvider.class, false); - DimensionManager.registerDimension(DIMID, DIMID); - } - -} diff --git a/src/Java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java b/src/Java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java deleted file mode 100644 index 05b43b7558..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java +++ /dev/null @@ -1,148 +0,0 @@ -package gtPlusPlus.australia.entity.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -@SideOnly(Side.CLIENT) -public class ModelAustralianSpider extends ModelBase { - - /** The spider's head box */ - public ModelRenderer spiderHead; - /** The spider's neck box */ - public ModelRenderer spiderNeck; - /** The spider's body box */ - public ModelRenderer spiderBody; - /** Spider's first leg */ - public ModelRenderer spiderLeg1; - /** Spider's second leg */ - public ModelRenderer spiderLeg2; - /** Spider's third leg */ - public ModelRenderer spiderLeg3; - /** Spider's fourth leg */ - public ModelRenderer spiderLeg4; - /** Spider's fifth leg */ - public ModelRenderer spiderLeg5; - /** Spider's sixth leg */ - public ModelRenderer spiderLeg6; - /** Spider's seventh leg */ - public ModelRenderer spiderLeg7; - /** Spider's eight leg */ - public ModelRenderer spiderLeg8; - - public ModelAustralianSpider() { - float f = 0.0F; - byte b0 = 15; - this.spiderHead = new ModelRenderer(this, 32, 4); - this.spiderHead.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 8, f); - this.spiderHead.setRotationPoint(0.0F, (float) b0, -3.0F); - this.spiderNeck = new ModelRenderer(this, 0, 0); - this.spiderNeck.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, f); - this.spiderNeck.setRotationPoint(0.0F, (float) b0, 0.0F); - this.spiderBody = new ModelRenderer(this, 0, 12); - this.spiderBody.addBox(-5.0F, -4.0F, -6.0F, 10, 8, 12, f); - this.spiderBody.setRotationPoint(0.0F, (float) b0, 9.0F); - this.spiderLeg1 = new ModelRenderer(this, 18, 0); - this.spiderLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg1.setRotationPoint(-4.0F, (float) b0, 2.0F); - this.spiderLeg2 = new ModelRenderer(this, 18, 0); - this.spiderLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg2.setRotationPoint(4.0F, (float) b0, 2.0F); - this.spiderLeg3 = new ModelRenderer(this, 18, 0); - this.spiderLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg3.setRotationPoint(-4.0F, (float) b0, 1.0F); - this.spiderLeg4 = new ModelRenderer(this, 18, 0); - this.spiderLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg4.setRotationPoint(4.0F, (float) b0, 1.0F); - this.spiderLeg5 = new ModelRenderer(this, 18, 0); - this.spiderLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg5.setRotationPoint(-4.0F, (float) b0, 0.0F); - this.spiderLeg6 = new ModelRenderer(this, 18, 0); - this.spiderLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg6.setRotationPoint(4.0F, (float) b0, 0.0F); - this.spiderLeg7 = new ModelRenderer(this, 18, 0); - this.spiderLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg7.setRotationPoint(-4.0F, (float) b0, -1.0F); - this.spiderLeg8 = new ModelRenderer(this, 18, 0); - this.spiderLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); - this.spiderLeg8.setRotationPoint(4.0F, (float) b0, -1.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, - float p_78088_6_, float p_78088_7_) { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - this.spiderHead.render(p_78088_7_); - this.spiderNeck.render(p_78088_7_); - this.spiderBody.render(p_78088_7_); - this.spiderLeg1.render(p_78088_7_); - this.spiderLeg2.render(p_78088_7_); - this.spiderLeg3.render(p_78088_7_); - this.spiderLeg4.render(p_78088_7_); - this.spiderLeg5.render(p_78088_7_); - this.spiderLeg6.render(p_78088_7_); - this.spiderLeg7.render(p_78088_7_); - this.spiderLeg8.render(p_78088_7_); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used - * for animating the movement of arms and legs, where par1 represents the - * time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, - float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { - this.spiderHead.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI); - this.spiderHead.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI); - float f6 = ((float) Math.PI / 4F); - this.spiderLeg1.rotateAngleZ = -f6; - this.spiderLeg2.rotateAngleZ = f6; - this.spiderLeg3.rotateAngleZ = -f6 * 0.74F; - this.spiderLeg4.rotateAngleZ = f6 * 0.74F; - this.spiderLeg5.rotateAngleZ = -f6 * 0.74F; - this.spiderLeg6.rotateAngleZ = f6 * 0.74F; - this.spiderLeg7.rotateAngleZ = -f6; - this.spiderLeg8.rotateAngleZ = f6; - float f7 = -0.0F; - float f8 = 0.3926991F; - this.spiderLeg1.rotateAngleY = f8 * 2.0F + f7; - this.spiderLeg2.rotateAngleY = -f8 * 2.0F - f7; - this.spiderLeg3.rotateAngleY = f8 * 1.0F + f7; - this.spiderLeg4.rotateAngleY = -f8 * 1.0F - f7; - this.spiderLeg5.rotateAngleY = -f8 * 1.0F + f7; - this.spiderLeg6.rotateAngleY = f8 * 1.0F - f7; - this.spiderLeg7.rotateAngleY = -f8 * 2.0F + f7; - this.spiderLeg8.rotateAngleY = f8 * 2.0F - f7; - float f9 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + 0.0F) * 0.4F) * p_78087_2_; - float f10 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + (float) Math.PI) * 0.4F) * p_78087_2_; - float f11 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + ((float) Math.PI / 2F)) * 0.4F) * p_78087_2_; - float f12 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + ((float) Math.PI * 3F / 2F)) * 0.4F) * p_78087_2_; - float f13 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + 0.0F) * 0.4F) * p_78087_2_; - float f14 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + (float) Math.PI) * 0.4F) * p_78087_2_; - float f15 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + ((float) Math.PI / 2F)) * 0.4F) * p_78087_2_; - float f16 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + ((float) Math.PI * 3F / 2F)) * 0.4F) * p_78087_2_; - this.spiderLeg1.rotateAngleY += f9; - this.spiderLeg2.rotateAngleY += -f9; - this.spiderLeg3.rotateAngleY += f10; - this.spiderLeg4.rotateAngleY += -f10; - this.spiderLeg5.rotateAngleY += f11; - this.spiderLeg6.rotateAngleY += -f11; - this.spiderLeg7.rotateAngleY += f12; - this.spiderLeg8.rotateAngleY += -f12; - this.spiderLeg1.rotateAngleZ += f13; - this.spiderLeg2.rotateAngleZ += -f13; - this.spiderLeg3.rotateAngleZ += f14; - this.spiderLeg4.rotateAngleZ += -f14; - this.spiderLeg5.rotateAngleZ += f15; - this.spiderLeg6.rotateAngleZ += -f15; - this.spiderLeg7.rotateAngleZ += f16; - this.spiderLeg8.rotateAngleZ += -f16; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/model/ModelBoar.java b/src/Java/gtPlusPlus/australia/entity/model/ModelBoar.java deleted file mode 100644 index 7d858e39f0..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/model/ModelBoar.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.australia.entity.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.model.ModelQuadruped; - -@SideOnly(Side.CLIENT) -public class ModelBoar extends ModelQuadruped { - - public ModelBoar() { - this(0.0F); - } - - public ModelBoar(float p_i1151_1_) { - super(6, p_i1151_1_); - this.head.setTextureOffset(16, 16).addBox(-2.0F, 0.0F, -9.0F, 4, 3, 1, p_i1151_1_); - this.field_78145_g = 4.0F; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/model/ModelDingo.java b/src/Java/gtPlusPlus/australia/entity/model/ModelDingo.java deleted file mode 100644 index 2999cdf2dd..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/model/ModelDingo.java +++ /dev/null @@ -1,168 +0,0 @@ -package gtPlusPlus.australia.entity.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntityWolf; -import net.minecraft.util.MathHelper; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class ModelDingo extends ModelBase { - - /** main box for the dingo head */ - public ModelRenderer dingoHeadMain; - /** The dingo's body */ - public ModelRenderer dingoBody; - /** dingo'se first leg */ - public ModelRenderer dingoLeg1; - /** dingo's second leg */ - public ModelRenderer dingoLeg2; - /** dingo's third leg */ - public ModelRenderer dingoLeg3; - /** dingo's fourth leg */ - public ModelRenderer dingoLeg4; - /** The dingo's tail */ - ModelRenderer dingoTail; - /** The dingo's mane */ - ModelRenderer dingoMane; - - public ModelDingo() { - float f = 0.0F; - float f1 = 13.5F; - this.dingoHeadMain = new ModelRenderer(this, 0, 0); - this.dingoHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, f); - this.dingoHeadMain.setRotationPoint(-1.0F, f1, -7.0F); - this.dingoBody = new ModelRenderer(this, 18, 14); - this.dingoBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, f); - this.dingoBody.setRotationPoint(0.0F, 14.0F, 2.0F); - this.dingoMane = new ModelRenderer(this, 21, 0); - this.dingoMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, f); - this.dingoMane.setRotationPoint(-1.0F, 14.0F, 2.0F); - this.dingoLeg1 = new ModelRenderer(this, 0, 18); - this.dingoLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); - this.dingoLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F); - this.dingoLeg2 = new ModelRenderer(this, 0, 18); - this.dingoLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); - this.dingoLeg2.setRotationPoint(0.5F, 16.0F, 7.0F); - this.dingoLeg3 = new ModelRenderer(this, 0, 18); - this.dingoLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); - this.dingoLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F); - this.dingoLeg4 = new ModelRenderer(this, 0, 18); - this.dingoLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); - this.dingoLeg4.setRotationPoint(0.5F, 16.0F, -4.0F); - this.dingoTail = new ModelRenderer(this, 9, 18); - this.dingoTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); - this.dingoTail.setRotationPoint(-1.0F, 12.0F, 8.0F); - this.dingoHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, f); - this.dingoHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, f); - this.dingoHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, f); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, - float p_78088_6_, float p_78088_7_) { - super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - - if (this.isChild) { - float f6 = 2.0F; - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 5.0F * p_78088_7_, 2.0F * p_78088_7_); - this.dingoHeadMain.renderWithRotation(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); - GL11.glTranslatef(0.0F, 24.0F * p_78088_7_, 0.0F); - this.dingoBody.render(p_78088_7_); - this.dingoLeg1.render(p_78088_7_); - this.dingoLeg2.render(p_78088_7_); - this.dingoLeg3.render(p_78088_7_); - this.dingoLeg4.render(p_78088_7_); - this.dingoTail.renderWithRotation(p_78088_7_); - this.dingoMane.render(p_78088_7_); - GL11.glPopMatrix(); - } else { - this.dingoHeadMain.renderWithRotation(p_78088_7_); - this.dingoBody.render(p_78088_7_); - this.dingoLeg1.render(p_78088_7_); - this.dingoLeg2.render(p_78088_7_); - this.dingoLeg3.render(p_78088_7_); - this.dingoLeg4.render(p_78088_7_); - this.dingoTail.renderWithRotation(p_78088_7_); - this.dingoMane.render(p_78088_7_); - } - } - - /** - * Used for easily adding entity-dependent animations. The second and third - * float params here are the same second and third as in the setRotationAngles - * method. - */ - public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) { - EntityWolf entitydingo = (EntityWolf) p_78086_1_; - - if (entitydingo.isAngry()) { - this.dingoTail.rotateAngleY = 0.0F; - } else { - this.dingoTail.rotateAngleY = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; - } - - if (entitydingo.isSitting()) { - this.dingoMane.setRotationPoint(-1.0F, 16.0F, -3.0F); - this.dingoMane.rotateAngleX = ((float) Math.PI * 2F / 5F); - this.dingoMane.rotateAngleY = 0.0F; - this.dingoBody.setRotationPoint(0.0F, 18.0F, 0.0F); - this.dingoBody.rotateAngleX = ((float) Math.PI / 4F); - this.dingoTail.setRotationPoint(-1.0F, 21.0F, 6.0F); - this.dingoLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F); - this.dingoLeg1.rotateAngleX = ((float) Math.PI * 3F / 2F); - this.dingoLeg2.setRotationPoint(0.5F, 22.0F, 2.0F); - this.dingoLeg2.rotateAngleX = ((float) Math.PI * 3F / 2F); - this.dingoLeg3.rotateAngleX = 5.811947F; - this.dingoLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F); - this.dingoLeg4.rotateAngleX = 5.811947F; - this.dingoLeg4.setRotationPoint(0.51F, 17.0F, -4.0F); - } else { - this.dingoBody.setRotationPoint(0.0F, 14.0F, 2.0F); - this.dingoBody.rotateAngleX = ((float) Math.PI / 2F); - this.dingoMane.setRotationPoint(-1.0F, 14.0F, -3.0F); - this.dingoMane.rotateAngleX = this.dingoBody.rotateAngleX; - this.dingoTail.setRotationPoint(-1.0F, 12.0F, 8.0F); - this.dingoLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F); - this.dingoLeg2.setRotationPoint(0.5F, 16.0F, 7.0F); - this.dingoLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F); - this.dingoLeg4.setRotationPoint(0.5F, 16.0F, -4.0F); - this.dingoLeg1.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; - this.dingoLeg2.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float) Math.PI) * 1.4F * p_78086_3_; - this.dingoLeg3.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float) Math.PI) * 1.4F * p_78086_3_; - this.dingoLeg4.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; - } - - this.dingoHeadMain.rotateAngleZ = entitydingo.getInterestedAngle(p_78086_4_) - + entitydingo.getShakeAngle(p_78086_4_, 0.0F); - this.dingoMane.rotateAngleZ = entitydingo.getShakeAngle(p_78086_4_, -0.08F); - this.dingoBody.rotateAngleZ = entitydingo.getShakeAngle(p_78086_4_, -0.16F); - this.dingoTail.rotateAngleZ = entitydingo.getShakeAngle(p_78086_4_, -0.2F); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used - * for animating the movement of arms and legs, where par1 represents the - * time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, - float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { - super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, p_78087_7_); - this.dingoHeadMain.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI); - this.dingoHeadMain.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI); - this.dingoTail.rotateAngleX = p_78087_3_; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/model/ModelOctopus.java b/src/Java/gtPlusPlus/australia/entity/model/ModelOctopus.java deleted file mode 100644 index f820d0ad85..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/model/ModelOctopus.java +++ /dev/null @@ -1,67 +0,0 @@ -package gtPlusPlus.australia.entity.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -@SideOnly(Side.CLIENT) -public class ModelOctopus extends ModelBase { - - /** The squid's body */ - ModelRenderer octopusBody; - /** The squid's tentacles */ - ModelRenderer[] octoTentacles = new ModelRenderer[8]; - - public ModelOctopus() { - byte b0 = -16; - this.octopusBody = new ModelRenderer(this, 0, 0); - this.octopusBody.addBox(-6.0F, -8.0F, -6.0F, 12, 16, 12); - this.octopusBody.rotationPointY += (float) (24 + b0); - - for (int i = 0; i < this.octoTentacles.length; ++i) { - this.octoTentacles[i] = new ModelRenderer(this, 48, 0); - double d0 = (double) i * Math.PI * 2.0D / (double) this.octoTentacles.length; - float f = (float) Math.cos(d0) * 5.0F; - float f1 = (float) Math.sin(d0) * 5.0F; - this.octoTentacles[i].addBox(-1.0F, 0.0F, -1.0F, 2, 18, 2); - this.octoTentacles[i].rotationPointX = f; - this.octoTentacles[i].rotationPointZ = f1; - this.octoTentacles[i].rotationPointY = (float) (31 + b0); - d0 = (double) i * Math.PI * -2.0D / (double) this.octoTentacles.length + (Math.PI / 2D); - this.octoTentacles[i].rotateAngleY = (float) d0; - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used - * for animating the movement of arms and legs, where par1 represents the - * time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, - float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { - ModelRenderer[] amodelrenderer = this.octoTentacles; - int i = amodelrenderer.length; - - for (int j = 0; j < i; ++j) { - ModelRenderer modelrenderer = amodelrenderer[j]; - modelrenderer.rotateAngleX = p_78087_3_; - } - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, - float p_78088_6_, float p_78088_7_) { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - this.octopusBody.render(p_78088_7_); - - for (int i = 0; i < this.octoTentacles.length; ++i) { - this.octoTentacles[i].render(p_78088_7_); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java b/src/Java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java deleted file mode 100644 index af432e04b9..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java +++ /dev/null @@ -1,84 +0,0 @@ -package gtPlusPlus.australia.entity.render; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.australia.entity.model.ModelAustralianSpider; -import gtPlusPlus.australia.entity.type.EntityAustralianSpiderBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class RenderAustralianSpider extends RenderLiving { - - private static final ResourceLocation spiderEyesTextures = new ResourceLocation("textures/entity/spider_eyes.png"); - private static final ResourceLocation spiderTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/australia/bush_spider.png"); - - public RenderAustralianSpider() { - super(new ModelAustralianSpider(), 1.0F); - this.setRenderPassModel(new ModelAustralianSpider()); - } - - protected float getDeathMaxRotation(EntityAustralianSpiderBase p_77037_1_) { - return 180.0F; - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityAustralianSpiderBase p_77032_1_, int p_77032_2_, float p_77032_3_) { - if (p_77032_2_ != 0) { - return -1; - } else { - this.bindTexture(spiderEyesTextures); - GL11.glEnable(GL11.GL_BLEND); - GL11.glDisable(GL11.GL_ALPHA_TEST); - GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); - - if (p_77032_1_.isInvisible()) { - GL11.glDepthMask(false); - } else { - GL11.glDepthMask(true); - } - - char c0 = 61680; - int j = c0 % 65536; - int k = c0 / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - return 1; - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless - * you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityAustralianSpiderBase p_110775_1_) { - return spiderTextures; - } - - protected float getDeathMaxRotation(EntityLivingBase p_77037_1_) { - return this.getDeathMaxRotation((EntityAustralianSpiderBase) p_77037_1_); - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { - return this.shouldRenderPass((EntityAustralianSpiderBase) p_77032_1_, p_77032_2_, p_77032_3_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless - * you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return this.getEntityTexture((EntityAustralianSpiderBase) p_110775_1_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/render/RenderBoar.java b/src/Java/gtPlusPlus/australia/entity/render/RenderBoar.java deleted file mode 100644 index cc4bfa8906..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/render/RenderBoar.java +++ /dev/null @@ -1,64 +0,0 @@ -package gtPlusPlus.australia.entity.render; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.australia.entity.type.EntityBoar; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class RenderBoar extends RenderLiving -{ - private static final ResourceLocation saddledBoarTextures = new ResourceLocation("textures/entity/boar/boar_saddle.png"); - private static final ResourceLocation boarTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/australia/boar.png"); - - public RenderBoar(ModelBase p_i1265_1_, ModelBase p_i1265_2_, float p_i1265_3_) - { - super(p_i1265_1_, p_i1265_3_); - this.setRenderPassModel(p_i1265_2_); - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityBoar p_77032_1_, int p_77032_2_, float p_77032_3_) - { - if (p_77032_2_ == 0 && p_77032_1_.getSaddled()) - { - this.bindTexture(saddledBoarTextures); - return 1; - } - else - { - return -1; - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityBoar p_110775_1_) - { - return boarTextures; - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) - { - return this.shouldRenderPass((EntityBoar)p_77032_1_, p_77032_2_, p_77032_3_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return this.getEntityTexture((EntityBoar)p_110775_1_); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/render/RenderDingo.java b/src/Java/gtPlusPlus/australia/entity/render/RenderDingo.java deleted file mode 100644 index 8bbf0392cd..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/render/RenderDingo.java +++ /dev/null @@ -1,90 +0,0 @@ -package gtPlusPlus.australia.entity.render; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.australia.entity.type.EntityDingo; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class RenderDingo extends RenderLiving { - - private static final ResourceLocation dingoTextures = new ResourceLocation( - CORE.MODID + ":" + "textures/entity/australia/dingo/dingo.png"); - private static final ResourceLocation tamedDingoTextures = new ResourceLocation( - CORE.MODID + ":" + "textures/entity/australia/dingo/wdingo_tame.png"); - private static final ResourceLocation anrgyDingoTextures = new ResourceLocation( - CORE.MODID + ":" + "textures/entity/australia/dingo/dingo_angry.png"); - private static final ResourceLocation dingoCollarTextures = new ResourceLocation( - CORE.MODID + ":" + "textures/entity/australia/wdingoolf/dingo_collar.png"); - - public RenderDingo(ModelBase p_i1269_1_, ModelBase p_i1269_2_, float p_i1269_3_) { - super(p_i1269_1_, p_i1269_3_); - this.setRenderPassModel(p_i1269_2_); - } - - /** - * Defines what float the third param in setRotationAngles of ModelBase is - */ - protected float handleRotationFloat(EntityDingo p_77044_1_, float p_77044_2_) { - return p_77044_1_.getTailRotation(); - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityDingo p_77032_1_, int p_77032_2_, float p_77032_3_) { - if (p_77032_2_ == 0 && p_77032_1_.getWolfShaking()) { - float f1 = p_77032_1_.getBrightness(p_77032_3_) * p_77032_1_.getShadingWhileShaking(p_77032_3_); - this.bindTexture(dingoTextures); - GL11.glColor3f(f1, f1, f1); - return 1; - } else if (p_77032_2_ == 1 && p_77032_1_.isTamed()) { - this.bindTexture(dingoCollarTextures); - int j = p_77032_1_.getCollarColor(); - GL11.glColor3f(EntitySheep.fleeceColorTable[j][0], EntitySheep.fleeceColorTable[j][1], - EntitySheep.fleeceColorTable[j][2]); - return 1; - } else { - return -1; - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless - * you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityDingo p_110775_1_) { - return p_110775_1_.isTamed() ? tamedDingoTextures - : (p_110775_1_.isAngry() ? anrgyDingoTextures : dingoTextures); - } - - /** - * Queries whether should render the specified pass or not. - */ - protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { - return this.shouldRenderPass((EntityDingo) p_77032_1_, p_77032_2_, p_77032_3_); - } - - /** - * Defines what float the third param in setRotationAngles of ModelBase is - */ - protected float handleRotationFloat(EntityLivingBase p_77044_1_, float p_77044_2_) { - return this.handleRotationFloat((EntityDingo) p_77044_1_, p_77044_2_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless - * you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return this.getEntityTexture((EntityDingo) p_110775_1_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/render/RenderOctopus.java b/src/Java/gtPlusPlus/australia/entity/render/RenderOctopus.java deleted file mode 100644 index 592ef9391a..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/render/RenderOctopus.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.australia.entity.render; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.australia.entity.type.EntityOctopus; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class RenderOctopus extends RenderLiving { - - private static final ResourceLocation octopusTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/australia/octopus.png"); - - public RenderOctopus(ModelBase p_i1268_1_, float p_i1268_2_) { - super(p_i1268_1_, p_i1268_2_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker function - * which does the actual work. In all probabilty, the class Render is generic - * (Render 0) { - ((EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.poison.id, b0 * 20, 0)); - } - } - return true; - } else { - return false; - } - } - - public IEntityLivingData onSpawnWithEgg(IEntityLivingData p_110161_1_) { - return p_110161_1_; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/type/EntityBoar.java b/src/Java/gtPlusPlus/australia/entity/type/EntityBoar.java deleted file mode 100644 index 871b1a5356..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/type/EntityBoar.java +++ /dev/null @@ -1,220 +0,0 @@ -package gtPlusPlus.australia.entity.type; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIControlledByPlayer; -import net.minecraft.entity.ai.EntityAIFollowParent; -import net.minecraft.entity.ai.EntityAILookIdle; -import net.minecraft.entity.ai.EntityAIMate; -import net.minecraft.entity.ai.EntityAIPanic; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAITempt; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.EntityAIWatchClosest; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.stats.AchievementList; -import net.minecraft.world.World; - -public class EntityBoar extends EntityAnimal { - /** AI task for player control. */ - private final EntityAIControlledByPlayer aiControlledByPlayer; - - public EntityBoar(World p_i1689_1_) { - super(p_i1689_1_); - this.setSize(0.9F, 0.9F); - this.getNavigator().setAvoidsWater(true); - this.tasks.addTask(0, new EntityAISwimming(this)); - //this.tasks.addTask(1, new EntityAIPanic(this, 1.25D)); - this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F)); - this.tasks.addTask(3, new EntityAIMate(this, 1.0D)); - this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false)); - this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false)); - this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D)); - this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - } - - /** - * Returns true if the newer Entity AI code should be run - */ - public boolean isAIEnabled() { - return true; - } - - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D); - } - - protected void updateAITasks() { - super.updateAITasks(); - } - - /** - * returns true if all the conditions for steering the entity are met. For pigs, - * this is true if it is being ridden by a player and the player is holding a - * carrot-on-a-stick - */ - public boolean canBeSteered() { - ItemStack itemstack = ((EntityPlayer) this.riddenByEntity).getHeldItem(); - return itemstack != null && itemstack.getItem() == Items.carrot_on_a_stick; - } - - protected void entityInit() { - super.entityInit(); - this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) { - super.writeEntityToNBT(p_70014_1_); - p_70014_1_.setBoolean("Saddle", this.getSaddled()); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) { - super.readEntityFromNBT(p_70037_1_); - this.setSaddled(p_70037_1_.getBoolean("Saddle")); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() { - return "mob.pig.say"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() { - return "mob.pig.say"; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() { - return "mob.pig.death"; - } - - protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { - this.playSound("mob.pig.step", 0.15F, 1.0F); - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets - * into the saddle on a pig. - */ - public boolean interact(EntityPlayer p_70085_1_) { - if (super.interact(p_70085_1_)) { - return true; - } else if (this.getSaddled() && !this.worldObj.isRemote - && (this.riddenByEntity == null || this.riddenByEntity == p_70085_1_)) { - p_70085_1_.mountEntity(this); - return true; - } else { - return false; - } - } - - protected Item getDropItem() { - return this.isBurning() ? Items.cooked_porkchop : Items.porkchop; - } - - /** - * Drop 0-2 items of this living's type. @param par1 - Whether this entity has - * recently been hit by a player. @param par2 - Level of Looting used to kill - * this mob. - */ - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { - int j = this.rand.nextInt(3) + 1 + this.rand.nextInt(1 + p_70628_2_); - - for (int k = 0; k < j; ++k) { - if (this.isBurning()) { - this.dropItem(Items.cooked_porkchop, 1); - } else { - this.dropItem(Items.porkchop, 1); - } - } - - if (this.getSaddled()) { - this.dropItem(Items.saddle, 1); - } - } - - /** - * Returns true if the pig is saddled. - */ - public boolean getSaddled() { - return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; - } - - /** - * Set or remove the saddle of the pig. - */ - public void setSaddled(boolean p_70900_1_) { - if (p_70900_1_) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1)); - } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0)); - } - } - - /** - * Called when a lightning bolt hits the entity. - */ - public void onStruckByLightning(EntityLightningBolt p_70077_1_) { - if (!this.worldObj.isRemote) { - EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj); - entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword)); - entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); - this.worldObj.spawnEntityInWorld(entitypigzombie); - this.setDead(); - } - } - - /** - * Called when the mob is falling. Calculates and applies fall damage. - */ - protected void fall(float p_70069_1_) { - super.fall(p_70069_1_); - - if (p_70069_1_ > 5.0F && this.riddenByEntity instanceof EntityPlayer) { - ((EntityPlayer) this.riddenByEntity).triggerAchievement(AchievementList.flyPig); - } - } - - public EntityBoar createChild(EntityAgeable p_90011_1_) { - return new EntityBoar(this.worldObj); - } - - /** - * 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 p_70877_1_) { - return p_70877_1_ != null && p_70877_1_.getItem() == Items.carrot; - } - - /** - * Return the AI task for player control. - */ - public EntityAIControlledByPlayer getAIControlledByPlayer() { - return this.aiControlledByPlayer; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/type/EntityDingo.java b/src/Java/gtPlusPlus/australia/entity/type/EntityDingo.java deleted file mode 100644 index 11b9737c4f..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/type/EntityDingo.java +++ /dev/null @@ -1,536 +0,0 @@ -package gtPlusPlus.australia.entity.type; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.BlockColored; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIBeg; -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.EntityAIMate; -import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; -import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; -import net.minecraft.entity.ai.EntityAISwimming; -import net.minecraft.entity.ai.EntityAITargetNonTamed; -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.EntityAnimal; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntitySheep; -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.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.pathfinding.PathEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -public class EntityDingo extends EntityWolf { - - private float mPrivateField1; - private float mPrivateField2; - private boolean mPrivateField3; - - /** true is the dingo is wet else false */ - private boolean isShaking; - /** This time increases while dingo is shaking and emitting water particles. */ - private float timeWolfIsShaking; - private float prevTimeWolfIsShaking; - - public EntityDingo(World p_i1696_1_) { - super(p_i1696_1_); - this.setSize(0.6F, 0.8F); - this.getNavigator().setAvoidsWater(true); - this.tasks.addTask(1, new EntityAISwimming(this)); - this.tasks.addTask(2, this.aiSit); - this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); - this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true)); - this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); - this.tasks.addTask(6, new EntityAIMate(this, 1.0D)); - this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(8, new EntityAIBeg(this, 8.0F)); - this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - this.tasks.addTask(9, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); - this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); - this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); - this.setTamed(false); - } - - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); - - if (this.isTamed()) { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); - } else { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.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 p_70624_1_) { - super.setAttackTarget(p_70624_1_); - - if (p_70624_1_ == null) { - this.setAngry(false); - } else if (!this.isTamed()) { - this.setAngry(true); - } - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - protected void updateAITick() { - this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth())); - } - - protected void entityInit() { - super.entityInit(); - } - - protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { - this.playSound("mob.wolf.step", 0.15F, 1.0F); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) { - super.writeEntityToNBT(p_70014_1_); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) { - super.readEntityFromNBT(p_70037_1_); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() { - 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; - } - - protected Item getDropItem() { - return Item.getItemById(-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(); - - if (!this.worldObj.isRemote && this.isShaking && !this.mPrivateField3 && !this.hasPath() && this.onGround) { - this.mPrivateField3 = true; - this.timeWolfIsShaking = 0.0F; - this.prevTimeWolfIsShaking = 0.0F; - this.worldObj.setEntityState(this, (byte) 8); - } - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() { - super.onUpdate(); - this.mPrivateField2 = this.mPrivateField1; - - if (this.func_70922_bv()) { - this.mPrivateField1 += (1.0F - this.mPrivateField1) * 0.4F; - } else { - this.mPrivateField1 += (0.0F - this.mPrivateField1) * 0.4F; - } - - if (this.func_70922_bv()) { - this.numTicksToChaseTarget = 10; - } - - if (this.isWet()) { - this.isShaking = true; - this.mPrivateField3 = false; - this.timeWolfIsShaking = 0.0F; - this.prevTimeWolfIsShaking = 0.0F; - } else if ((this.isShaking || this.mPrivateField3) && this.mPrivateField3) { - if (this.timeWolfIsShaking == 0.0F) { - this.playSound("mob.wolf.shake", this.getSoundVolume(), - (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); - } - - this.prevTimeWolfIsShaking = this.timeWolfIsShaking; - this.timeWolfIsShaking += 0.05F; - - if (this.prevTimeWolfIsShaking >= 2.0F) { - this.isShaking = false; - this.mPrivateField3 = false; - this.prevTimeWolfIsShaking = 0.0F; - this.timeWolfIsShaking = 0.0F; - } - - if (this.timeWolfIsShaking > 0.4F) { - float f = (float) this.boundingBox.minY; - int i = (int) (MathHelper.sin((this.timeWolfIsShaking - 0.4F) * (float) Math.PI) * 7.0F); - - for (int j = 0; j < i; ++j) { - float f1 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F; - float f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F; - this.worldObj.spawnParticle("splash", this.posX + (double) f1, (double) (f + 0.8F), - this.posZ + (double) f2, this.motionX, this.motionY, this.motionZ); - } - } - } - } - - @SideOnly(Side.CLIENT) - public boolean getWolfShaking() { - return this.isShaking; - } - - /** - * Used when calculating the amount of shading to apply while the dingo is - * shaking. - */ - @SideOnly(Side.CLIENT) - public float getShadingWhileShaking(float p_70915_1_) { - return 0.75F + (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70915_1_) - / 2.0F * 0.25F; - } - - @SideOnly(Side.CLIENT) - public float getShakeAngle(float p_70923_1_, float p_70923_2_) { - float f2 = (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70923_1_ - + p_70923_2_) / 1.8F; - - if (f2 < 0.0F) { - f2 = 0.0F; - } else if (f2 > 1.0F) { - f2 = 1.0F; - } - - return MathHelper.sin(f2 * (float) Math.PI) * MathHelper.sin(f2 * (float) Math.PI * 11.0F) * 0.15F - * (float) Math.PI; - } - - public float getEyeHeight() { - return this.height * 0.8F; - } - - @SideOnly(Side.CLIENT) - public float getInterestedAngle(float p_70917_1_) { - return (this.mPrivateField2 + (this.mPrivateField1 - this.mPrivateField2) * p_70917_1_) * 0.15F - * (float) Math.PI; - } - - /** - * 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 p_70097_1_, float p_70097_2_) { - if (this.isEntityInvulnerable()) { - return false; - } else { - Entity entity = p_70097_1_.getEntity(); - this.aiSit.setSitting(false); - - if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) { - p_70097_2_ = (p_70097_2_ + 1.0F) / 2.0F; - } - - return super.attackEntityFrom(p_70097_1_, p_70097_2_); - } - } - - public boolean attackEntityAsMob(Entity p_70652_1_) { - int i = this.isTamed() ? 4 : 2; - return p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); - } - - public void setTamed(boolean p_70903_1_) { - super.setTamed(p_70903_1_); - - if (p_70903_1_) { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); - } else { - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.0D); - } - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets - * into the saddle on a pig. - */ - public boolean interact(EntityPlayer p_70085_1_) { - ItemStack itemstack = p_70085_1_.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) < 20.0F) { - if (!p_70085_1_.capabilities.isCreativeMode) { - --itemstack.stackSize; - } - - this.heal((float) itemfood.func_150905_g(itemstack)); - - if (itemstack.stackSize <= 0) { - p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, - (ItemStack) null); - } - - return true; - } - } else if (itemstack.getItem() == Items.dye) { - int i = BlockColored.func_150032_b(itemstack.getItemDamage()); - - if (i != this.getCollarColor()) { - this.setCollarColor(i); - - if (!p_70085_1_.capabilities.isCreativeMode && --itemstack.stackSize <= 0) { - p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, - (ItemStack) null); - } - - return true; - } - } - } - - if (this.func_152114_e(p_70085_1_) && !this.worldObj.isRemote && !this.isBreedingItem(itemstack)) { - this.aiSit.setSitting(!this.isSitting()); - this.isJumping = false; - this.setPathToEntity((PathEntity) null); - this.setTarget((Entity) null); - this.setAttackTarget((EntityLivingBase) null); - } - } else if (itemstack != null && itemstack.getItem() == Items.bone && !this.isAngry()) { - if (!p_70085_1_.capabilities.isCreativeMode) { - --itemstack.stackSize; - } - - if (itemstack.stackSize <= 0) { - p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack) null); - } - - if (!this.worldObj.isRemote) { - if (this.rand.nextInt(3) == 0) { - this.setTamed(true); - this.setPathToEntity((PathEntity) null); - this.setAttackTarget((EntityLivingBase) null); - this.aiSit.setSitting(true); - this.setHealth(20.0F); - this.func_152115_b(p_70085_1_.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(p_70085_1_); - } - - @SideOnly(Side.CLIENT) - public void handleHealthUpdate(byte p_70103_1_) { - if (p_70103_1_ == 8) { - this.mPrivateField3 = true; - this.timeWolfIsShaking = 0.0F; - this.prevTimeWolfIsShaking = 0.0F; - } else { - super.handleHealthUpdate(p_70103_1_); - } - } - - @SideOnly(Side.CLIENT) - public float getTailRotation() { - return this.isAngry() ? 1.5393804F - : (this.isTamed() - ? (0.55F - (20.0F - this.dataWatcher.getWatchableObjectFloat(18)) * 0.02F) * (float) Math.PI - : ((float) Math.PI / 5F)); - } - - /** - * 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 p_70877_1_) { - return p_70877_1_ == null ? false - : (!(p_70877_1_.getItem() instanceof ItemFood) ? false - : ((ItemFood) p_70877_1_.getItem()).isWolfsFavoriteMeat()); - } - - /** - * Will return how many at most can spawn in a chunk at once. - */ - public int getMaxSpawnedInChunk() { - return 8; - } - - /** - * Determines whether this dingo is angry or not. - */ - public boolean isAngry() { - return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; - } - - /** - * Sets whether this dingo is angry or not. - */ - public void setAngry(boolean p_70916_1_) { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (p_70916_1_) { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); - } else { - this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); - } - } - - /** - * Return this dingo's collar color. - */ - public int getCollarColor() { - return this.dataWatcher.getWatchableObjectByte(20) & 15; - } - - /** - * Set this dingo's collar color. - */ - public void setCollarColor(int p_82185_1_) { - this.dataWatcher.updateObject(20, Byte.valueOf((byte) (p_82185_1_ & 15))); - } - - public EntityDingo createChild(EntityAgeable p_90011_1_) { - EntityDingo entitydingo = new EntityDingo(this.worldObj); - String s = this.func_152113_b(); - - if (s != null && s.trim().length() > 0) { - entitydingo.func_152115_b(s); - entitydingo.setTamed(true); - } - - return entitydingo; - } - - public void func_70918_i(boolean p_70918_1_) { - if (p_70918_1_) { - this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); - } else { - this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); - } - } - - /** - * Returns true if the mob is currently able to mate with the specified mob. - */ - public boolean canMateWith(EntityAnimal p_70878_1_) { - if (p_70878_1_ == this) { - return false; - } else if (!this.isTamed()) { - return false; - } else if (!(p_70878_1_ instanceof EntityDingo)) { - return false; - } else { - EntityDingo entitydingo = (EntityDingo) p_70878_1_; - return !entitydingo.isTamed() ? false - : (entitydingo.isSitting() ? false : this.isInLove() && entitydingo.isInLove()); - } - } - - 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 !this.isTamed() && this.ticksExisted > 2400; - } - - public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) { - if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) { - if (p_142018_1_ instanceof EntityDingo) { - EntityDingo entitydingo = (EntityDingo) p_142018_1_; - - if (entitydingo.isTamed() && entitydingo.getOwner() == p_142018_2_) { - return false; - } - } - - return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer - && !((EntityPlayer) p_142018_2_).canAttackPlayer((EntityPlayer) p_142018_1_) ? false - : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse) p_142018_1_).isTame(); - } else { - return false; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/entity/type/EntityOctopus.java b/src/Java/gtPlusPlus/australia/entity/type/EntityOctopus.java deleted file mode 100644 index f88d931b52..0000000000 --- a/src/Java/gtPlusPlus/australia/entity/type/EntityOctopus.java +++ /dev/null @@ -1,228 +0,0 @@ -package gtPlusPlus.australia.entity.type; - -import net.minecraft.block.material.Material; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.passive.EntityWaterMob; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -public class EntityOctopus extends EntityWaterMob -{ - public float octopusPitch; - public float prevSquidPitch; - public float octopusYaw; - public float prevSquidYaw; - /** appears to be rotation in radians; we already have pitch & yaw, so this completes the triumvirate. */ - public float octopusRotation; - /** previous octopusRotation in radians */ - public float prevSquidRotation; - /** angle of the tentacles in radians */ - public float tentacleAngle; - /** the last calculated angle of the tentacles in radians */ - public float lastTentacleAngle; - private float randomMotionSpeed; - /** change in octopusRotation in radians. */ - private float rotationVelocity; - private float field_70871_bB; - private float randomMotionVecX; - private float randomMotionVecY; - private float randomMotionVecZ; - - public EntityOctopus(World p_i1693_1_) - { - super(p_i1693_1_); - this.setSize(0.95F, 0.95F); - this.rotationVelocity = 1.0F / (this.rand.nextFloat() + 1.0F) * 0.2F; - } - - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() - { - return null; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected String getHurtSound() - { - return null; - } - - /** - * Returns the sound this mob makes on death. - */ - protected String getDeathSound() - { - return null; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - protected Item getDropItem() - { - return Item.getItemById(0); - } - - /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops - */ - protected boolean canTriggerWalking() - { - return false; - } - - /** - * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param - * par2 - Level of Looting used to kill this mob. - */ - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) - { - int j = this.rand.nextInt(3 + p_70628_2_) + 1; - - for (int k = 0; k < j; ++k) - { - this.entityDropItem(new ItemStack(Items.dye, 1, 0), 0.0F); - } - } - - /** - * Checks if this entity is inside water (if inWater field is true as a result of handleWaterMovement() returning - * true) - */ - public boolean isInWater() - { - return this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.6000000238418579D, 0.0D), Material.water, this); - } - - /** - * 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(); - this.prevSquidPitch = this.octopusPitch; - this.prevSquidYaw = this.octopusYaw; - this.prevSquidRotation = this.octopusRotation; - this.lastTentacleAngle = this.tentacleAngle; - this.octopusRotation += this.rotationVelocity; - - if (this.octopusRotation > ((float)Math.PI * 2F)) - { - this.octopusRotation -= ((float)Math.PI * 2F); - - if (this.rand.nextInt(10) == 0) - { - this.rotationVelocity = 1.0F / (this.rand.nextFloat() + 1.0F) * 0.2F; - } - } - - if (this.isInWater()) - { - float f; - - if (this.octopusRotation < (float)Math.PI) - { - f = this.octopusRotation / (float)Math.PI; - this.tentacleAngle = MathHelper.sin(f * f * (float)Math.PI) * (float)Math.PI * 0.25F; - - if ((double)f > 0.75D) - { - this.randomMotionSpeed = 1.0F; - this.field_70871_bB = 1.0F; - } - else - { - this.field_70871_bB *= 0.8F; - } - } - else - { - this.tentacleAngle = 0.0F; - this.randomMotionSpeed *= 0.9F; - this.field_70871_bB *= 0.99F; - } - - if (!this.worldObj.isRemote) - { - this.motionX = (double)(this.randomMotionVecX * this.randomMotionSpeed); - this.motionY = (double)(this.randomMotionVecY * this.randomMotionSpeed); - this.motionZ = (double)(this.randomMotionVecZ * this.randomMotionSpeed); - } - - f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.renderYawOffset += (-((float)Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float)Math.PI - this.renderYawOffset) * 0.1F; - this.rotationYaw = this.renderYawOffset; - this.octopusYaw += (float)Math.PI * this.field_70871_bB * 1.5F; - this.octopusPitch += (-((float)Math.atan2((double)f, this.motionY)) * 180.0F / (float)Math.PI - this.octopusPitch) * 0.1F; - } - else - { - this.tentacleAngle = MathHelper.abs(MathHelper.sin(this.octopusRotation)) * (float)Math.PI * 0.25F; - - if (!this.worldObj.isRemote) - { - this.motionX = 0.0D; - this.motionY -= 0.08D; - this.motionY *= 0.9800000190734863D; - this.motionZ = 0.0D; - } - - this.octopusPitch = (float)((double)this.octopusPitch + (double)(-90.0F - this.octopusPitch) * 0.02D); - } - } - - /** - * Moves the entity based on the specified heading. Args: strafe, forward - */ - public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) - { - this.moveEntity(this.motionX, this.motionY, this.motionZ); - } - - protected void updateEntityActionState() - { - ++this.entityAge; - - if (this.entityAge > 100) - { - this.randomMotionVecX = this.randomMotionVecY = this.randomMotionVecZ = 0.0F; - } - else if (this.rand.nextInt(50) == 0 || !this.inWater || this.randomMotionVecX == 0.0F && this.randomMotionVecY == 0.0F && this.randomMotionVecZ == 0.0F) - { - float f = this.rand.nextFloat() * (float)Math.PI * 2.0F; - this.randomMotionVecX = MathHelper.cos(f) * 0.2F; - this.randomMotionVecY = -0.1F + this.rand.nextFloat() * 0.2F; - this.randomMotionVecZ = MathHelper.sin(f) * 0.2F; - } - - this.despawnEntity(); - } - - /** - * Checks if the entity's current position is a valid location to spawn this entity. - */ - public boolean getCanSpawnHere() - { - return this.posY > 45.0D && this.posY < 63.0D && super.getCanSpawnHere(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java b/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java deleted file mode 100644 index 18f9e6684f..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java +++ /dev/null @@ -1,294 +0,0 @@ -package gtPlusPlus.australia.gen.gt; - -import java.util.Hashtable; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.everglades.object.BoxedQuad; - -public class WorldGen_Australia_Ores { - - /** - * Set Ore Types on by one. - */ - - private static final Material PYRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Pyrite); - private static final Material PYROPE = MaterialUtils.generateMaterialFromGtENUM(Materials.Pyrope); - private static final Material ALMANDINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Almandine); - private static final Material RUBY = MaterialUtils.generateMaterialFromGtENUM(Materials.Ruby); - private static final Material CHALCOPYRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chalcopyrite); - private static final Material TOPAZ = MaterialUtils.generateMaterialFromGtENUM(Materials.Topaz); - private static final Material SAPPHIRE_GREEN = MaterialUtils.generateMaterialFromGtENUM(Materials.GreenSapphire); - private static final Material SAPPHIRE_BLUE = MaterialUtils.generateMaterialFromGtENUM(Materials.Sapphire); - - - private static final Material EMERALD = MaterialUtils.generateMaterialFromGtENUM(Materials.Emerald); - private static final Material DIAMOND = MaterialUtils.generateMaterialFromGtENUM(Materials.Diamond); - private static final Material BANDED_IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.BandedIron); - private static final Material LIM_YELLOW = MaterialUtils.generateMaterialFromGtENUM(Materials.YellowLimonite); - private static final Material LIM_BROWN = MaterialUtils.generateMaterialFromGtENUM(Materials.BrownLimonite); - private static final Material TETRAHEDRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Tetrahedrite); - private static final Material COAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Coal); - private static final Material SHIT_COAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Lignite); - private static final Material GRAPHITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Graphite); - - - - public static WorldGen_GT_Australia_Ore_Layer BaseVein = new WorldGen_GT_Australia_Ore_Layer( - "veinA", - 0, 128, - 5, - 8, - 32, - ELEMENT.getInstance().IRON, - BANDED_IRON, - LIM_YELLOW, - TETRAHEDRITE); - - - - /** - * Custom ore Veins - */ - - public static WorldGen_GT_Australia_Ore_Layer Vein1 = new WorldGen_GT_Australia_Ore_Layer( - "vein1", - 0, 10, - 1, - 8, - 16, - EMERALD, - SHIT_COAL, - TOPAZ, - DIAMOND); - - public static WorldGen_GT_Australia_Ore_Layer Vein2 = new WorldGen_GT_Australia_Ore_Layer( - "vein2", - 0, 128, - 20, - 16, - 64, - COAL, - COAL, - SHIT_COAL, - SHIT_COAL); - - public static WorldGen_GT_Australia_Ore_Layer Vein3 = new WorldGen_GT_Australia_Ore_Layer( - "vein3", - 0, 128, - 5, - 8, - 32, - ELEMENT.getInstance().IRON, - ELEMENT.getInstance().TIN, - ELEMENT.getInstance().GOLD, - ELEMENT.getInstance().LEAD); - - public static WorldGen_GT_Australia_Ore_Layer Vein4 = new WorldGen_GT_Australia_Ore_Layer( - "vein4", - 0, 128, - 5, - 8, - 32, - ELEMENT.getInstance().GOLD, - ELEMENT.getInstance().COPPER, - ELEMENT.getInstance().COBALT, - ALMANDINE); - - - - public static WorldGen_GT_Australia_Ore_Layer Vein5 = new WorldGen_GT_Australia_Ore_Layer( - "vein5", - 0, 128, - 15, - 8, - 16, - PYRITE, - PYROPE, - LIM_YELLOW, - CHALCOPYRITE); - - public static WorldGen_GT_Australia_Ore_Layer Vein6 = new WorldGen_GT_Australia_Ore_Layer( - "vein6", - 0, 128, - 5, - 8, - 32, - LIM_BROWN, - SAPPHIRE_GREEN, - ELEMENT.getInstance().IRON, - ELEMENT.getInstance().COPPER); - - public static WorldGen_GT_Australia_Ore_Layer Vein7 = new WorldGen_GT_Australia_Ore_Layer( - "vein7", - 0, 128, - 5, - 8, - 32, - GRAPHITE, - RUBY, - LIM_YELLOW, - ELEMENT.getInstance().NICKEL); - - public static WorldGen_GT_Australia_Ore_Layer Vein8 = new WorldGen_GT_Australia_Ore_Layer( - "vein8", - 0, 128, - 5, - 8, - 32, - ELEMENT.getInstance().IRON, - SAPPHIRE_BLUE, - LIM_YELLOW, - GRAPHITE); - - - - - /*public static WorldGen_GT_Australia_Ore_Layer Vein9 = new WorldGen_GT_Australia_Ore_Layer( - "vein9", - 10, 30, - 20, - 4, - 64, - ORES.LANTHANITE_CE, - FLUORIDES.FLUORITE, - PLATINUM, - ORES.FLORENCITE); - public static WorldGen_GT_Australia_Ore_Layer Vein10 = new WorldGen_GT_Australia_Ore_Layer( - "vein10", - 20, 50, - 20, - 8, - 32, - ORES.GEIKIELITE, - ORES.YTTROCERITE, - ORES.LANTHANITE_LA, - BAUXITE); - public static WorldGen_GT_Australia_Ore_Layer Vein11 = new WorldGen_GT_Australia_Ore_Layer( - "vein11", - 30, 70, - 20, - 5, - 64, - FLUORIDES.FLUORITE, - SAPPHIRE_BLUE, - ORES.ZIRCON, - ORES.CRYOLITE); - public static WorldGen_GT_Australia_Ore_Layer Vein12 = new WorldGen_GT_Australia_Ore_Layer( - "vein12", - 40, 80, - 20, - 8, - 32, - ORES.CERITE, - SAPPHIRE_GREEN, - CHALCOPYRITE, - ORES.HIBONITE); - - *//** - * Best Rarest Veins 2017 - *//* - - public static WorldGen_GT_Australia_Ore_Layer Vein13 = new WorldGen_GT_Australia_Ore_Layer( - "vein13", - 5, 15, - 5, - 5, - 16, - ORES.CRYOLITE, - NAQPLUS, - NAQUADRIA, - ORES.FLORENCITE); - - public static WorldGen_GT_Australia_Ore_Layer Vein14 = new WorldGen_GT_Australia_Ore_Layer( - "vein14", - 10, 20, - 8, - 3, - 16, - URNAIUM235, - PLUTONIUM, - OSMIUM, - AMETHYST); - - public static WorldGen_GT_Australia_Ore_Layer Vein15 = new WorldGen_GT_Australia_Ore_Layer( - "vein15", - 5, 25, - 5, - 6, - 24, - ORES.FLUORCAPHITE, - BISMUTH, - ORES.GADOLINITE_CE, - ORES.GADOLINITE_Y); - - public static WorldGen_GT_Australia_Ore_Layer Vein16 = new WorldGen_GT_Australia_Ore_Layer( - "vein16", - 0, 25, - 4, - 6, - 32, - ORES.YTTROCERITE, - ORES.LEPERSONNITE, - INFUSEDGOLD, - FLUORIDES.FLUORITE); - - public static WorldGen_GT_Australia_Ore_Layer Vein17 = new WorldGen_GT_Australia_Ore_Layer( - "vein17", - 10, 35, - 4, - 5, - 32, - ORES.FLORENCITE, - URNAIUM235, - ORES.SAMARSKITE_YB, - ORES.POLYCRASE); - public static WorldGen_GT_Australia_Ore_Layer Vein18 = new WorldGen_GT_Australia_Ore_Layer( - "vein18", - 15, 40, - 4, - 4, - 64, - ORES.GADOLINITE_CE, - ORES.GADOLINITE_Y, - ORES.AGARDITE_LA, - ORES.AGARDITE_CD);*/ - - - - - public static Hashtable validOreveins = new Hashtable( - 1024); - - - public static volatile BoxedQuad OreVein1 = new BoxedQuad(null, null, null, null); - - static long ID = 0; - public static void generateValidOreVeins(){ - validOreveins.put(ID++, BaseVein); - - validOreveins.put(ID++, Vein1); - validOreveins.put(ID++, Vein2); - validOreveins.put(ID++, Vein3); - validOreveins.put(ID++, Vein4); - validOreveins.put(ID++, Vein5); - validOreveins.put(ID++, Vein6); - validOreveins.put(ID++, Vein7); - validOreveins.put(ID++, Vein8); - - /*validOreveins.put(ID++, Vein9); - validOreveins.put(ID++, Vein10); - validOreveins.put(ID++, Vein11); - validOreveins.put(ID++, Vein12); - validOreveins.put(ID++, Vein13); - validOreveins.put(ID++, Vein14); - validOreveins.put(ID++, Vein15); - validOreveins.put(ID++, Vein16); - validOreveins.put(ID++, Vein17); - validOreveins.put(ID++, Vein18);*/ - } - -} diff --git a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java b/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java deleted file mode 100644 index 93d5524a66..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java +++ /dev/null @@ -1,48 +0,0 @@ -package gtPlusPlus.australia.gen.gt; - -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.ConcurrentHashMap; - -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; -import gtPlusPlus.australia.GTplusplus_Australia; - -public abstract class WorldGen_GT_Australia { - public final String mWorldGenName; - public final boolean mEnabled; - private final Map mDimensionMap = new ConcurrentHashMap(); - - public WorldGen_GT_Australia(String aName, List aList, boolean aDefault) { - this.mWorldGenName = aName; - this.mEnabled = GTplusplus_Australia.sCustomWorldgenFile.get("worldgen", this.mWorldGenName, aDefault); - if (this.mEnabled) { - aList.add(this); - } - - } - - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return false; - } - - public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return false; - } - - public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { - String aDimName = aWorld.provider.getDimensionName(); - Boolean tAllowed = (Boolean) this.mDimensionMap.get(aDimName); - if (tAllowed == null) { - boolean tValue = GTplusplus_Australia.sCustomWorldgenFile.get("worldgen.dimensions." + this.mWorldGenName, aDimName, - aDimensionType == aAllowedDimensionType); - this.mDimensionMap.put(aDimName, Boolean.valueOf(tValue)); - return tValue; - } else { - return tAllowed.booleanValue(); - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java b/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java deleted file mode 100644 index 917c1eb746..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java +++ /dev/null @@ -1,471 +0,0 @@ -package gtPlusPlus.australia.gen.gt; - -import java.util.*; - -import cpw.mods.fml.common.IWorldGenerator; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.feature.WorldGenMinable; - -import gregtech.api.util.GT_Log; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.australia.dimension.Dimension_Australia; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; - -public class WorldGen_GT_Australia_Base implements IWorldGenerator { - - /** - * Class Variables - */ - - /** - * Control percentage of filled 3x3 chunks. Lower number means less oreveins - * spawn - */ - public static int oreveinPercentage; - /** - * Control number of attempts to find a valid orevein. Generally this - * maximum limit isn't hit, selecting a vein is cheap - */ - public static int oreveinAttempts; - /** - * Control number of attempts to place a valid orevein. If a vein wasn't - * placed due to height restrictions, completely in the water, etc, another - * attempt is tried. - */ - public static int oreveinMaxPlacementAttempts; - /** - * Debug parameter for world generation. Tracks chunks added/removed from - * run queue. - */ - public static boolean debugWorldGen = false; - /** - * Try re-implement Richard Hendrick's Chunk by Chunk Ore Generation from - * his GT5u fork. - */ - - public static List mList = new ArrayList(); - public static HashSet ProcChunks = new HashSet(); - // This is probably not going to work. Trying to create a fake orevein to - // put into hashtable when there will be no ores in a vein. - public static WorldGen_GT_Australia_Ore_Layer noOresInVein = new WorldGen_GT_Australia_Ore_Layer("vein0", 0, 255, 0, 0, - 0, ELEMENT.getInstance().IRON, ELEMENT.getInstance().GOLD, ELEMENT.getInstance().LEAD, ELEMENT.getInstance().TIN); - - public static Hashtable validOreveins = new Hashtable( - 1024); - - public boolean mIsGenerating = false; - public static final Object listLock = new Object(); - // private static boolean gcAsteroids = true; - - public WorldGen_GT_Australia_Base() { - if (debugWorldGen) { - GT_Log.out.println("GTPP_Worldgenerator created"); - } - } - - @Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, - IChunkProvider chunkProvider) { - if (world.provider.dimensionId == Dimension_Australia.DIMID) { - generateSafely(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); - } - } - - public synchronized void generateSafely(Random random, int chunkX, int chunkZ, World world, - IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - int xDim = Dimension_Australia.DIMID; - switch (world.provider.dimensionId) { - case -1: // Nether - // generateNether(world, random, chunkX * 16, chunkZ * 16); - break; - case 0: // Overworld - // generateSurface(world, random, chunkX * 16, chunkZ * 16); - break; - case 1: // End - // generateEnd(world, random, chunkX * 16, chunkZ * 16); - break; - default: // Any other dimension - if (world.provider.dimensionId != xDim) { - break; - } - else { - generateEverglades(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); - break; - } - } - } - - private synchronized void generateEverglades(Random aRandom, int aX, int aZ, World aWorld, - IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - Logger.WARNING("Trying to Generate Dimension."); - synchronized (listLock) { - Logger.WARNING("Locked List addition."); - if (WorldGen_GT_Australia_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) + 1), aX, aZ, - Dimension_Australia.DIMID, - aWorld, aChunkGenerator, aChunkProvider, - aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName))){ - Logger.WARNING("Locked List addition. Success."); - } - else { - Logger.WARNING("Locked List addition. Fail."); - } - if (debugWorldGen) - GT_Log.out.println("ADD WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId - + " chunk x:" + aX + " z:" + aZ + " SIZE: " + WorldGen_GT_Australia_Base.mList.size()); - } - - if (!this.mIsGenerating) { - Logger.WARNING("Is not generating."); - this.mIsGenerating = true; - Logger.WARNING("Setting Generation to true."); - int mList_sS = WorldGen_GT_Australia_Base.mList.size(); - mList_sS = Math.min(mList_sS, 3); // Run a maximum of 3 chunks at a - // time through worldgen. Extra - // chunks get done later. - for (int i = 0; i < mList_sS; i++) { - WorldGenContainer toRun = (WorldGenContainer) WorldGen_GT_Australia_Base.mList.get(0); - if (debugWorldGen) - GT_Log.out.println("RUN WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId - + " chunk x:" + toRun.mX + " z:" + toRun.mZ + " SIZE: " + WorldGen_GT_Australia_Base.mList.size() - + " i: " + i); - synchronized (listLock) { - Logger.WARNING("Locked List Removal."); - WorldGen_GT_Australia_Base.mList.remove(0); - } - toRun.run(); - } - this.mIsGenerating = false; - Logger.WARNING("Is Generating now set to false.."); - } - } - - public void generateOre(Block block, World world, Random random, int chunk_x, int chunk_z, int maxX, int maxZ, - int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block generateIn) { - int heightRange = maxY - minY; - WorldGenMinable worldgenminable = new WorldGenMinable(block, maxVeinSize, generateIn); - for (int k1 = 0; k1 < chancesToSpawn; ++k1) { - int xrand = random.nextInt(16); - int yrand = random.nextInt(heightRange) + minY; - int zrand = random.nextInt(16); - worldgenminable.generate(world, random, chunk_x + xrand, yrand, chunk_z + zrand); - } - } - - public static class WorldGenContainer implements Runnable { - public final Random mRandom; - public final int mX; - public final int mZ; - public final int mDimensionType; - public final World mWorld; - public final IChunkProvider mChunkGenerator; - public final IChunkProvider mChunkProvider; - public final String mBiome; - - // Local class to track which orevein seeds must be checked when doing - // chunkified worldgen - class NearbySeeds { - public int mX; - public int mZ; - - NearbySeeds(int x, int z) { - this.mX = x; - this.mZ = z; - } - }; - - public static ArrayList seedList = new ArrayList(); - - // aX and aZ are now the by-chunk X and Z for the chunk of interest - public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, - IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { - this.mRandom = aRandom; - this.mX = aX; - this.mZ = aZ; - this.mDimensionType = aDimensionType; - this.mWorld = aWorld; - this.mChunkGenerator = aChunkGenerator; - this.mChunkProvider = aChunkProvider; - this.mBiome = aBiome; - } - - public void worldGenFindVein(int oreseedX, int oreseedZ) { - // Explanation of oreveinseed implementation. - // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen - // passes, one with getSeed set to +1 the original world seed. This - // pushes that +1 off the low bits of oreseedZ, so that the hashes - // are far apart for the two passes. - // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the - // dimension in the top bits of the hash, to make sure to get unique - // hashes per dimension - // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in - // the bits 29-55. Cuts off the top few bits of the chunk so we have - // bits for dimension. - // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the - // bits 0-27. Cuts off the top few bits of the chunk so we have bits - // for dimension. - long oreveinSeed = (this.mWorld.getSeed() << 16) ^ ((this.mWorld.provider.dimensionId & 0xffL) << 56 - | ((oreseedX & 0x000000000fffffffL) << 28) | (oreseedZ & 0x000000000fffffffL)); // Use - // an - // RNG - // that - // is - // identical - // every - // time - // it - // is - // called - // for - // this - // oreseed. - XSTR oreveinRNG = new XSTR(oreveinSeed); - int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the - // dice, see - // if we get - // an - // orevein - // here at - // all - int noOrePlacedCount = 0; - String tDimensionName = ""; - if (debugWorldGen) { - tDimensionName = this.mWorld.provider.getDimensionName(); - } - - if (debugWorldGen){ - GT_Log.out.println(" Finding oreveins for oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" - + this.mZ + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " worldSeed=" - + this.mWorld.getSeed()); - } - - Logger.WARNING("[World Generation Debug] !validOreveins.containsKey(oreveinSeed) | oreveinSeed: "+oreveinSeed); - // Search for a valid orevein for this dimension - if (!validOreveins.containsKey(oreveinSeed)) { - - - Logger.WARNING("[World Generation Debug] oreveinPercentageRoll < oreveinPercentage? "+((oreveinPercentageRoll < oreveinPercentage))); - Logger.WARNING("[World Generation Debug] WorldGen_GT_Ore_Layer.sWeight > 0? "+(WorldGen_GT_Australia_Ore_Layer.sWeight > 0)); - Logger.WARNING("[World Generation Debug] WorldGen_GT_Ore_Layer.sList.size() > 0? "+(WorldGen_GT_Australia_Ore_Layer.sList.size() > 0)); - if ((oreveinPercentageRoll < oreveinPercentage) && (WorldGen_GT_Australia_Ore_Layer.sWeight > 0) - && (WorldGen_GT_Australia_Ore_Layer.sList.size() > 0)) { - int placementAttempts = 0; - boolean oreveinFound = false; - int i; - for (i = 0; (i < oreveinAttempts) && (!oreveinFound) - && (placementAttempts < oreveinMaxPlacementAttempts); i++) { - Logger.WARNING("[World Generation Debug] i: "+i); - Logger.WARNING("[World Generation Debug] placementAttempts: "+placementAttempts); - Logger.WARNING("[World Generation Debug] oreveinAttempts: "+oreveinAttempts); - Logger.WARNING("[World Generation Debug] (placementAttempts < oreveinMaxPlacementAttempts): "+(placementAttempts < oreveinMaxPlacementAttempts)); - Logger.WARNING("[World Generation Debug] oreveinFound: "+oreveinFound); - int tRandomWeight = oreveinRNG.nextInt(WorldGen_GT_Australia_Ore_Layer.sWeight); - for (WorldGen_GT_Australia_Ore_Layer tWorldGen : WorldGen_GT_Australia_Ore_Layer.sList) { - Logger.WARNING("[World Generation Debug] Iterating sList - Size: "+WorldGen_GT_Australia_Ore_Layer.sList.size()); - tRandomWeight -= (tWorldGen).mWeight; - if (tRandomWeight <= 0) { - try { - // Adjust the seed so that this layer has a - // series of unique random numbers. - // Otherwise multiple attempts at this same - // oreseed will get the same offset and X/Z - // values. If an orevein failed, any orevein - // with the - // same minimum heights would fail as well. - // This prevents that, giving each orevein a - // unique height each pass through here. - int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, - new XSTR(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))), this.mBiome, - this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, - oreseedZ * 16, this.mChunkGenerator, this.mChunkProvider); - switch (placementResult) { - case WorldGen_GT_Australia_Ore_Layer.ORE_PLACED: - if (debugWorldGen) - GT_Log.out.println(" Added oreveinSeed=" + oreveinSeed - + " tries at oremix=" + i + " placementAttempts=" - + placementAttempts + " dimensionName=" + tDimensionName); - validOreveins.put(oreveinSeed, tWorldGen); - oreveinFound = true; - Logger.WARNING("[World Generation Debug] ORE_PLACED"); - break; - case WorldGen_GT_Australia_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: - placementAttempts++; - Logger.WARNING("[World Generation Debug] NO_ORE_IN_BOTTOM_LAYER | Attempts: "+placementAttempts); - // SHould do retry in this case - // until out of chances - break; - case WorldGen_GT_Australia_Ore_Layer.NO_OVERLAP: - // Orevein didn't reach this chunk, - // can't add it yet to the hash - Logger.WARNING("[World Generation Debug] NO_OVERLAP"); - if (debugWorldGen) GT_Log.out.println( - " Added far oreveinSeed=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); - validOreveins.put(oreveinSeed, tWorldGen); - oreveinFound = true; - break; - case WorldGen_GT_Australia_Ore_Layer.NO_OVERLAP_AIR_BLOCK: - if (debugWorldGen) GT_Log.out.println( - " No overlap and air block in test spot=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); - // SHould do retry in this case until out of chances - Logger.WARNING("[World Generation Debug] NO_OVERLAP_AIR_BLOCK"); - placementAttempts++; - break; - } - break; // Try the next orevein - } - catch (Throwable e) { - if (debugWorldGen) - GT_Log.out.println("Exception occurred on oreVein" + tWorldGen + " oreveinSeed=" - + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + " oreseedX=" - + oreseedX + " oreseedZ=" + oreseedZ); - e.printStackTrace(GT_Log.err); - } - } - } - } - // Only add an empty orevein if are unable to place a vein - // at the oreseed chunk. - if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) { - if (debugWorldGen) - GT_Log.out.println(" Empty oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ - + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " tries at oremix=" + i - + " placementAttempts=" + placementAttempts + " dimensionName=" + tDimensionName); - validOreveins.put(oreveinSeed, noOresInVein); - } - } - else if (oreveinPercentageRoll >= oreveinPercentage) { - if (debugWorldGen) - GT_Log.out.println(" Skipped oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ - + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " RNG=" + oreveinPercentageRoll - + " %=" + oreveinPercentage + " dimensionName=" + tDimensionName); - validOreveins.put(oreveinSeed, noOresInVein); - } - } - else { - // oreseed is located in the previously processed table - if (debugWorldGen) - GT_Log.out.print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" - + validOreveins.size() + " "); - WorldGen_GT_Australia_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed); - oreveinRNG.setSeed(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))); // Reset - // RNG - // to - // only - // be - // based - // on - // oreseed - // X/Z - // and - // type - // of - // vein - int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, - this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, oreseedZ * 16, - this.mChunkGenerator, this.mChunkProvider); - switch (placementResult) { - case WorldGen_GT_Australia_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: - if (debugWorldGen) - GT_Log.out.println(" No ore in bottom layer"); - break; - case WorldGen_GT_Australia_Ore_Layer.NO_OVERLAP: - if (debugWorldGen) - GT_Log.out.println(" No overlap"); - break; - } - } - } - - @Override - public void run() { - long startTime = System.nanoTime(); - int oreveinMaxSize; - - // Determine bounding box on how far out to check for oreveins - // affecting this chunk - // For now, manually reducing oreveinMaxSize when not in the - // Underdark for performance - if (this.mWorld.provider.getDimensionName().equals("Underdark")) { - oreveinMaxSize = 24; // Leave Deep Dark/Underdark max oregen at - // 32, instead of 64 - } - else { - oreveinMaxSize = 48; - } - - int wXbox = this.mX - (oreveinMaxSize / 16); - int eXbox = this.mX + (oreveinMaxSize / 16 + 1); // Need to add 1 - // since it is - // compared - // using a < - int nZbox = this.mZ - (oreveinMaxSize / 16); - int sZbox = this.mZ + (oreveinMaxSize / 16 + 1); - - // Search for orevein seeds and add to the list; - for (int x = wXbox; x < eXbox; x++) { - for (int z = nZbox; z < sZbox; z++) { - // Determine if this X/Z is an orevein seed - if (((Math.abs(x) % 3) == 1) && ((Math.abs(z) % 3) == 1)) { - if (debugWorldGen) - GT_Log.out.println("Adding seed x=" + x + " z=" + z); - seedList.add(new NearbySeeds(x, z)); - } - } - } - - // Now process each oreseed vs this requested chunk - for (; seedList.size() != 0; seedList.remove(0)) { - if (debugWorldGen) - GT_Log.out.println("Processing seed x=" + seedList.get(0).mX + " z=" + seedList.get(0).mZ); - worldGenFindVein(seedList.get(0).mX, seedList.get(0).mZ); - } - - long oregenTime = System.nanoTime(); - - // Do leftover worldgen for this chunk (GT_Stones and GT_small_ores) - try { - for (WorldGen_GT_Australia tWorldGen : HANDLER_GT.sWorldgenListAustralia) { - /* - * if (debugWorldGen) GT_Log.out.println( - * "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); - */ - tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX * 16, - this.mZ * 16, this.mChunkGenerator, this.mChunkProvider); - } - } - catch (Throwable e) { - e.printStackTrace(GT_Log.err); - } - - long leftOverTime = System.nanoTime(); - - Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ); - if (tChunk != null) { - tChunk.isModified = true; - } - long endTime = System.nanoTime(); - long duration = (endTime - startTime); - if (debugWorldGen) { - GT_Log.out.println(" Oregen took " + (oregenTime - startTime) + " Leftover gen took " - + (leftOverTime - oregenTime) + " Worldgen took " + duration + " nanoseconds"); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java b/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java deleted file mode 100644 index a5e5f8b245..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java +++ /dev/null @@ -1,511 +0,0 @@ -package gtPlusPlus.australia.gen.gt; - -import static gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia_Base.debugWorldGen; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.*; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Log; -import gregtech.common.blocks.GT_Block_Ores; -import gregtech.common.blocks.GT_TileEntity_Ores; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.GTplusplus_Australia; -import gtPlusPlus.australia.dimension.Dimension_Australia; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class WorldGen_GT_Australia_Ore_Layer -extends WorldGen_GT_Australia { - public static ArrayList sList = new ArrayList(); - public static int sWeight = 0; - public final short mMinY; - public final short mMaxY; - public final short mWeight; - public final short mDensity; - public final short mSize; - public Block mPrimaryMeta; - public Block mSecondaryMeta; - public Block mBetweenMeta; - public Block mSporadicMeta; - public final Material mPrimary; - public final Material mSecondary; - public final Material mBetween; - public final Material mSporadic; - - public static boolean mUpdated = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; - public static final Block mStoneTypes; - - //public final String mBiome; - public final String mRestrictBiome; - public final boolean mOverworld; - public final boolean mNether; - public final boolean mEnd; - public static final int WRONG_BIOME=0; - public static final int WRONG_DIMENSION=1; - public static final int NO_ORE_IN_BOTTOM_LAYER=2; - public static final int NO_OVERLAP=3; - public static final int ORE_PLACED=4; - public static final int NO_OVERLAP_AIR_BLOCK=5; - - //public final boolean mMoon; - //public final boolean mMars; - //public final boolean mAsteroid; - public final String aTextWorldgen = "worldgen."; - - static { - if (mUpdated) { - Object tempBlock = null; - try { - Field temp = ReflectionUtils.getField(GregTech_API.class, "sBlockStones"); - tempBlock = temp.get(null); - } - catch (IllegalArgumentException | IllegalAccessException e) {} - mStoneTypes = (Block) tempBlock; - } - else { - mStoneTypes = null; - } - } - - - public WorldGen_GT_Australia_Ore_Layer(String aName, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { - this(aName, true, aMinY, aMaxY, aWeight, aDensity, aSize, false, false, false, false, false, false, aPrimary, aSecondary, aBetween, aSporadic); - } - - - public WorldGen_GT_Australia_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { - super(aName, sList, aDefault); - Logger.WARNING("Creating Ore Layer Object"); - this.mOverworld = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); - this.mNether = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); - this.mEnd = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); - //this.mMoon = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); - //this.mMars = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); - //this.mAsteroid = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); - this.mMinY = 5; - short mMaxY = 14; - if (mMaxY < (this.mMinY + 7)) { - GT_Log.out.println( - "Oremix " + this.mWorldGenName + - " has invalid Min/Max heights!" - ); - mMaxY = (short) (this.mMinY + 7); - } - this.mMaxY = mMaxY; - this.mWeight = ((short) GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); - this.mDensity = ((short) GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); - this.mSize = ((short) Math.max(1, GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); - this.mPrimary = aPrimary; - this.mSecondary = aSecondary; - this.mBetween = aBetween; - this.mSporadic = aSporadic; - this.mPrimaryMeta = aPrimary.getOreBlock(1); - this.mSecondaryMeta = aSecondary.getOreBlock(1); - this.mBetweenMeta = aBetween.getOreBlock(1); - this.mSporadicMeta = aSporadic.getOreBlock(1); - this.mRestrictBiome = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); - - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist"); - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist"); - - if (this.mEnabled) { - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - sWeight += this.mWeight; - } - } - - public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - - //Debug Handler - /** - * This handles Variables that are null during Init - */ - - if (this.mPrimaryMeta == Blocks.stone || this.mSecondaryMeta == Blocks.stone - || this.mBetweenMeta == Blocks.stone || this.mSporadicMeta == Blocks.stone){ - this.mPrimaryMeta = this.mPrimary.getOreBlock(1); - this.mSecondaryMeta = this.mSecondary.getOreBlock(1); - this.mBetweenMeta = this.mBetween.getOreBlock(1); - this.mSporadicMeta = this.mSporadic.getOreBlock(1); - Logger.WARNING("[Vein Generator] An Ore in a Vein had defaulted back to a default value, so they have now been reset to correct values."); - } - - if( mWorldGenName.equals("vein0") ) { - if (debugWorldGen) GT_Log.out.println( - " NoOresInVein-vein0" - ); - // This is a special empty orevein - Logger.WARNING("[World Generation Debug] Special Empty Vein placed."); - return ORE_PLACED; - } - if (aDimensionType != Dimension_Australia.DIMID) { - /* // Debug code, but spams log - if (debugWorldGen) { - GT_Log.out.println( - "Wrong dimension" - ); - } - */ - Logger.WARNING("[World Generation Debug] Wrong dimension."); - return WRONG_DIMENSION; - } - if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { - return WRONG_BIOME; - } - int[] placeCount=new int[4]; - - int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5); - // Determine West/East ends of orevein - int wXVein = aSeedX - aRandom.nextInt(mSize); // West side - int eXVein = aSeedX + 16 + aRandom.nextInt(mSize); - // Limit Orevein to only blocks present in current chunk - int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade. - int eX = Math.min( eXVein, aChunkX + 2 + 16); - if (wX >= eX) { //No overlap between orevein and this chunk exists in X - Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); - if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || - (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { - // Didn't reach, but could have placed. Save orevein for future use. - return NO_OVERLAP; - } else { - // Didn't reach, but couldn't place in test spot anywys, try for another orevein - return NO_OVERLAP_AIR_BLOCK; - } - } - // Determine North/Sound ends of orevein - int nZVein = aSeedZ - aRandom.nextInt(mSize); - int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize); - - int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade. - int sZ = Math.min(sZVein, aChunkZ + 2 + 16); - if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z - Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); - if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || - (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { - // Didn't reach, but could have placed. Save orevein for future use. - return NO_OVERLAP; - } else { - // Didn't reach, but couldn't place in test spot anywys, try for another orevein - return NO_OVERLAP_AIR_BLOCK; - } - - } - - if (debugWorldGen) { - String tDimensionName = aWorld.provider.getDimensionName(); - GT_Log.out.print( - "Trying Orevein:" + this.mWorldGenName + - " Dimension=" + tDimensionName + - " mX="+aChunkX/16+ - " mZ="+aChunkZ/16+ - " oreseedX="+ aSeedX/16 + - " oreseedZ="+ aSeedZ/16 + - " cY="+tMinY - ); - } - // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt(). - int localDensity = (Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))))); - - // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop - // Now we do bottom-level-first oregen, and work our way upwards. - int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure. - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - /*if ((placeCount[1]+placeCount[3])==0) { - if (debugWorldGen) GT_Log.out.println( - " No ore in bottom layer" - ); - return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer - }*/ - Logger.WARNING("[World Generation Debug] Trying to set Ores?"); - for (level = tMinY; level < (tMinY-1+3); level++) { - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - } - // Low Middle layer is between + sporadic - // level should be = tMinY-1+3 from end of for loop - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { - placeCount[2]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - // High Middle layer is between + primary + sporadic - level++; // Increment level to next layer - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { - placeCount[2]++; - } - } - else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { - placeCount[0]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - // Top two layers are primary + sporadic - level++; // Increment level to next layer - for( ; level < (tMinY + 6); level++){ // should do two layers - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { - placeCount[0]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - } - if (debugWorldGen) { - String tDimensionName = aWorld.provider.getDimensionName(); - GT_Log.out.println( - "Generated Orevein:" + this.mWorldGenName + - " Dimension=" + tDimensionName + - " mX="+aChunkX/16+ - " mZ="+aChunkZ/16+ - " oreseedX="+ aSeedX/16 + - " oreseedZ="+ aSeedZ/16 + - " cY="+tMinY+ - " wXVein" + wXVein + - " eXVein" + eXVein + - " nZVein" + nZVein + - " sZVein" + sZVein + - " locDen=" + localDensity + - " Den=" + this.mDensity + - " Sec="+placeCount[1]+ - " Spo="+placeCount[3]+ - " Bet="+placeCount[2]+ - " Pri="+placeCount[0] - ); - } - // Something (at least the bottom layer must have 1 block) must have been placed, return true - return ORE_PLACED; - } - - private String fString = "unset", ore1String = "unset", ore2String = "unset", ore3String = "unset", ore4String = "unset"; - Map gtOreMap = new HashMap(); - - @SuppressWarnings("deprecation") - public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData, boolean isSmallOre, - boolean air) { - if (!air) { - aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); - } - - //Set GT ORE - if (aMetaData instanceof GT_Block_Ores){ - if (ore1String.equals("unset")) { - ore1String = Utils.sanitizeString(this.mPrimary.getLocalizedName().toLowerCase()); - } - if (ore2String.equals("unset")) { - ore2String = Utils.sanitizeString(this.mSecondaryMeta.getLocalizedName().toLowerCase()); - } - if (ore3String.equals("unset")) { - ore3String = Utils.sanitizeString(this.mBetweenMeta.getLocalizedName().toLowerCase()); - } - if (ore4String.equals("unset")) { - ore4String = Utils.sanitizeString(this.mSporadicMeta.getLocalizedName().toLowerCase()); - } - - if (this.mPrimaryMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore1String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - if (this.mSecondaryMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore2String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - if (this.mBetweenMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore3String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - if (this.mSporadicMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore4String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - - } - - Block tBlock = aWorld.getBlock(aX, aY, aZ); - Block tOreBlock = aMetaData; - int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ); - String BlockName = tBlock.getUnlocalizedName(); - if ( - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sand) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) || - (mUpdated && tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, mStoneTypes)) ||/* - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondLayer) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockMainFiller) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondaryFiller) ||*/ - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sandstone)) { - - if (aWorld.setBlock(aX, aY, aZ, tOreBlock, 0, 3)){ - Logger.WARNING("[World Generation Debug] Set "+tOreBlock.getLocalizedName()+" at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - return false; - } - - - private boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int mMetaItemSubID, boolean useless){ - - //Get Class and Methods - Method setOres = null; - boolean is08 = !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; - - //GT 5.08 - if (is08){ - try { - setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class); - } - catch (NoSuchMethodException | SecurityException e) { - - } - } - //GT 5.09 - else { - try { - setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class); - } - catch (NoSuchMethodException | SecurityException e) { - - } - } - - try { - if (is08 && setOres != null){ - setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID); - } - else if (!is08 && setOres != null){ - setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID, useless); - } - else { - return false; - }} - catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - - } - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java b/src/Java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java deleted file mode 100644 index 8fc6940242..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java +++ /dev/null @@ -1,265 +0,0 @@ -package gtPlusPlus.australia.gen.map; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.GTplusplus_Australia; - -import java.util.Map.Entry; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.structure.MapGenStructure; -import net.minecraft.world.gen.structure.StructureBoundingBox; -import net.minecraft.world.gen.structure.StructureComponent; -import net.minecraft.world.gen.structure.StructureStart; -import net.minecraft.world.gen.structure.StructureVillagePieces; - -public class MapGenExtendedVillage extends MapGenStructure -{ - /** A list of all the biomes villages can spawn in. */ - public static List villageSpawnBiomes = Arrays.asList(new BiomeGenBase[] {GTplusplus_Australia.Australian_Desert_Biome_3, GTplusplus_Australia.Australian_Plains_Biome, GTplusplus_Australia.Australian_Forest_Biome, GTplusplus_Australia.Australian_Outback_Biome}); - /** World terrain type, 0 for normal, 1 for flat map */ - private int terrainType; - private int field_82665_g; - private int field_82666_h; - - public MapGenExtendedVillage(){ - this.field_82665_g = 8; - this.field_82666_h = 4; - } - - public MapGenExtendedVillage(Map p_i2093_1_){ - this(); - Iterator iterator = p_i2093_1_.entrySet().iterator(); - - Logger.INFO("Created Extended Village Object."); - - while (iterator.hasNext()) - { - Entry entry = (Entry)iterator.next(); - - if (((String)entry.getKey()).equals("size")) - { - this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0); - } - else if (((String)entry.getKey()).equals("distance")) - { - this.field_82665_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82665_g, this.field_82666_h + 1); - } - } - } - - public String func_143025_a() - { - return "ExtendedVillage"; - } - - protected boolean canSpawnStructureAtCoords(int p_75047_1_, int p_75047_2_) - { - - - int k = p_75047_1_; - int l = p_75047_2_; - - if (p_75047_1_ < 0) - { - p_75047_1_ -= this.field_82665_g - 1; - } - - if (p_75047_2_ < 0) - { - p_75047_2_ -= this.field_82665_g - 1; - } - - int i1 = p_75047_1_ / this.field_82665_g; - int j1 = p_75047_2_ / this.field_82665_g; - Random random = this.worldObj.setRandomSeed(i1, j1, 10387312); - i1 *= this.field_82665_g; - j1 *= this.field_82665_g; - i1 += random.nextInt(this.field_82665_g - this.field_82666_h); - j1 += random.nextInt(this.field_82665_g - this.field_82666_h); - - if (k == i1 && l == j1) - { - boolean flag = this.worldObj.getWorldChunkManager().areBiomesViable(k * 16 + 8, l * 16 + 8, 0, villageSpawnBiomes); - - if (flag) - { - Logger.INFO("Found viable biome(s) for custom village"); - return true; - } - } - - return false; - } - - protected StructureStart getStructureStart(int p_75049_1_, int p_75049_2_) - { - return new MapGenExtendedVillage.Start(this.worldObj, this.rand, p_75049_1_, p_75049_2_, this.terrainType); - } - - public static class Start extends StructureStart - { - /** well ... thats what it does */ - private boolean hasMoreThanTwoComponents; - - public Start() { - } - - public Start(World p_i2092_1_, Random p_i2092_2_, int p_i2092_3_, int p_i2092_4_, int p_i2092_5_) - { - super(p_i2092_3_, p_i2092_4_); - Logger.INFO("Trying to Start Village Builder."); - List list = StructureVillagePieces.getStructureVillageWeightedPieceList(p_i2092_2_, p_i2092_5_); - StructureVillagePieces.Start start = new StructureVillagePieces.Start(p_i2092_1_.getWorldChunkManager(), 0, p_i2092_2_, (p_i2092_3_ << 4) + 2, (p_i2092_4_ << 4) + 2, list, p_i2092_5_); - this.components.add(start); - start.buildComponent(start, this.components, p_i2092_2_); - List list1 = start.field_74930_j; - List list2 = start.field_74932_i; - int l; - Logger.INFO("List1: "+list1.size()+" | List2: "+list2.size()); - - while (!list1.isEmpty() || !list2.isEmpty()) - { - Logger.INFO("Iterating non empty list."); - StructureComponent structurecomponent; - - if (list1.isEmpty()) - { - l = p_i2092_2_.nextInt(list2.size()); - structurecomponent = (StructureComponent)list2.remove(l); - structurecomponent.buildComponent(start, this.components, p_i2092_2_); - } - else - { - l = p_i2092_2_.nextInt(list1.size()); - structurecomponent = (StructureComponent)list1.remove(l); - structurecomponent.buildComponent(start, this.components, p_i2092_2_); - } - } - Logger.INFO("Finished iterating lists, updating bounding box for structure."); - - this.updateBoundingBox(); - l = 0; - Iterator iterator = this.components.iterator(); - - while (iterator.hasNext()) - { - Logger.INFO("Iterating Components."); - StructureComponent structurecomponent1 = (StructureComponent)iterator.next(); - - if (!(structurecomponent1 instanceof StructureVillagePieces.Road)) - { - ++l; - } - } - - Logger.INFO("hasMoreThanTwoComponents? "+(l > 2)); - this.hasMoreThanTwoComponents = l > 2; - } - - /** - * currently only defined for Villages, returns true if Village has more than 2 non-road components - */ - public boolean isSizeableStructure() - { - //return this.hasMoreThanTwoComponents; - return true; - } - - public void func_143022_a(NBTTagCompound p_143022_1_) - { - super.func_143022_a(p_143022_1_); - p_143022_1_.setBoolean("Valid", this.hasMoreThanTwoComponents); - } - - public void func_143017_b(NBTTagCompound p_143017_1_) - { - super.func_143017_b(p_143017_1_); - this.hasMoreThanTwoComponents = p_143017_1_.getBoolean("Valid"); - } - } - - /** - * Generates structures in specified chunk next to existing structures. Does *not* generate StructureStarts. - */ - @Override - public boolean generateStructuresInChunk(World p_75051_1_, Random p_75051_2_, int p_75051_3_, int p_75051_4_){ - //Logger.INFO("Try generate Structs in chunk."); - this.callPrivateFunction1(p_75051_1_); - int k = (p_75051_3_ << 4) + 8; - int l = (p_75051_4_ << 4) + 8; - boolean flag = false; - Iterator iterator = this.structureMap.values().iterator(); - - //Logger.INFO("Iteration Size: "+this.structureMap.values().size()); - while (iterator.hasNext()) - { - //Logger.INFO("Iterating."); - StructureStart structurestart = (StructureStart)iterator.next(); - - if (structurestart.isSizeableStructure() && (structurestart.getBoundingBox().intersectsWith(k, l, k + 15, l + 15) || structurestart.getBoundingBox().intersectsWith(k, l, k - 15, l - 15))) - { - Logger.INFO("Iterating. 2"); - structurestart.generateStructure(p_75051_1_, p_75051_2_, new StructureBoundingBox(k, l, k + 15, l + 15)); - flag = true; - this.callPrivateFunction2(structurestart.func_143019_e(), structurestart.func_143018_f(), structurestart); - } - /* else { - Logger.INFO("Iterating. 3"); - Logger.INFO("structurestart.isSizeableStructure()? "+structurestart.isSizeableStructure()); - Logger.INFO("structurestart.getBoundingBox().intersectsWith(k, l, k + 15, l + 15)? "+(structurestart.getBoundingBox().intersectsWith(k, l, k + 15, l + 15) || structurestart.getBoundingBox().intersectsWith(k, l, k - 15, l - 15))); - Logger.INFO("K: "+k+" | L: "+l); - Logger.INFO("structure bounding box info: x-:"+structurestart.getBoundingBox().minX+" y-:"+structurestart.getBoundingBox().minY+" x+:"+structurestart.getBoundingBox().maxX+" y+:"+structurestart.getBoundingBox().maxY); - }*/ - } - - return flag; - } - - Method mMethod1; - Method mMethod2; - private boolean callPrivateFunction1(World aWorld) { - if (mMethod1 == null) { - try { - mMethod1 = MapGenStructure.class.getDeclaredMethod("func_143027_a", World.class); - } catch (NoSuchMethodException | SecurityException e) { - return false; - } - } - if (mMethod1 != null) { - try { - //Logger.INFO("Invoking func_143027_a"); - mMethod1.invoke(this, aWorld); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - } - return false; - } - - private boolean callPrivateFunction2(int aInt1, int aInt2, StructureStart aStruct) { - if (mMethod2 == null) { - try { - mMethod2 = MapGenStructure.class.getDeclaredMethod("func_143026_a", int.class, int.class, StructureStart.class); - } catch (NoSuchMethodException | SecurityException e) { - return false; - } - } - if (mMethod2 != null) { - try { - Logger.INFO("Invoking func_143026_a"); - mMethod2.invoke(this, aInt1, aInt2, aStruct); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - } - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java b/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java deleted file mode 100644 index 0eab94c5d1..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java +++ /dev/null @@ -1,217 +0,0 @@ -package gtPlusPlus.australia.gen.map; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.gen.MapGenRavine; - -public class MapGenLargeRavine extends MapGenRavine { - private float[] field_75046_d = new float[1024]; - - @Override - protected void func_151540_a(long aSeed, int var1, int var2, Block[] aBlocksInChunkOrPassedIn, double p_151540_6_, - double p_151540_8_, double p_151540_10_, float p_151540_12_, float p_151540_13_, float p_151540_14_, - int possibleCurrentY, int possibleMaxY, double p_151540_17_) { - Random random = CORE.RANDOM; - //gtPlusPlus.api.objects.Logger.WORLD("Generating Large Ravine. 1"); - this.range *= 2; - double d4 = (double) (var1 * 24 + 16); - double d5 = (double) (var2 * 24 + 16); - float f3 = 0.0F; - float f4 = 0.0F; - - if (possibleMaxY <= 25) { - int j1 = Math.min(this.range * 16 - 32, 200); - possibleMaxY = j1 - random.nextInt(j1 / 4); - } - - boolean possibleIsUnderGroundFlag = false; - - if (possibleCurrentY <= -1) { - possibleCurrentY = possibleMaxY / 3; - possibleIsUnderGroundFlag = true; - } - - float f5 = 1.0F; - - for (int k1 = 0; k1 < 256; ++k1) { - if (k1 == 0 || random.nextInt(3) == 0) { - f5 = 1.0F + random.nextFloat() * random.nextFloat() * 1.0F; - } - - this.field_75046_d[k1] = f5 * f5; - } - - for (; possibleCurrentY < possibleMaxY; ++possibleCurrentY) { - double d12 = 3.5D + (double) (MathHelper.sin((float) possibleCurrentY * CORE.PI / (float) possibleMaxY) - * p_151540_12_ * 1.0F); - double d6 = d12 * p_151540_17_; - d12 *= (double) random.nextFloat() * 0.55D + 0.75D; - d6 *= (double) random.nextFloat() * 0.55D + 0.75D; - float f6 = MathHelper.cos(p_151540_14_); - float f7 = MathHelper.sin(p_151540_14_); - p_151540_6_ += (double) (MathHelper.cos(p_151540_13_) * f6); - p_151540_8_ += (double) f7; - p_151540_10_ += (double) (MathHelper.sin(p_151540_13_) * f6); - p_151540_14_ *= 1.7F; - p_151540_14_ += f4 * 0.25F; - p_151540_13_ += f3 * 0.25F; - f4 *= 0.8F; - f3 *= 0.5F; - f4 += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 2.0F; - f3 += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 4.0F; - - if (possibleIsUnderGroundFlag || random.nextInt(4) != 0) { - double d7 = p_151540_6_ - d4; - double d8 = p_151540_10_ - d5; - double d9 = (double) (possibleMaxY - possibleCurrentY); - double d10 = (double) (p_151540_12_ + 2.0F + 16.0F); - - if (d7 * d7 + d8 * d8 - d9 * d9 > d10 * d10) { - return; - } - - if (p_151540_6_ >= d4 - 16.0D - d12 * 2.0D && p_151540_10_ >= d5 - 16.0D - d12 * 2.0D - && p_151540_6_ <= d4 + 16.0D + d12 * 2.0D && p_151540_10_ <= d5 + 16.0D + d12 * 2.0D) { - int i4 = MathHelper.floor_double(p_151540_6_ - d12) - var1 * 16 - 1; - int l1 = MathHelper.floor_double(p_151540_6_ + d12) - var1 * 16 + 1; - int j4 = MathHelper.floor_double(p_151540_8_ - d6) - 1; - int i2 = MathHelper.floor_double(p_151540_8_ + d6) + 1; - int k4 = MathHelper.floor_double(p_151540_10_ - d12) - var2 * 16 - 1; - int j2 = MathHelper.floor_double(p_151540_10_ + d12) - var2 * 16 + 1; - - if (i4 < 0) { - i4 = 0; - } - - if (l1 > 16) { - l1 = 16; - } - - if (j4 < 1) { - j4 = 1; - } - - if (i2 > 248) { - i2 = 248; - } - - if (k4 < 0) { - k4 = 0; - } - - if (j2 > 16) { - j2 = 16; - } - - boolean flag2 = false; - int k2; - int j3; - - for (k2 = i4; !flag2 && k2 < l1; ++k2) { - for (int l2 = k4; !flag2 && l2 < j2; ++l2) { - for (int i3 = i2 + 1; !flag2 && i3 >= j4 - 1; --i3) { - j3 = (k2 * 16 + l2) * 256 + i3; - - if (i3 >= 0 && i3 < 256) { - Block block = aBlocksInChunkOrPassedIn[j3]; - - if (isOceanBlock(aBlocksInChunkOrPassedIn, j3, k2, i3, l2, var1, var2)) { - flag2 = true; - } - - if (i3 != j4 - 1 && k2 != i4 && k2 != l1 - 1 && l2 != k4 && l2 != j2 - 1) { - i3 = j4; - } - } - } - } - } - - if (!flag2) { - for (k2 = i4; k2 < l1; ++k2) { - double d13 = ((double) (k2 + var1 * 16) + 0.5D - p_151540_6_) / d12; - - for (j3 = k4; j3 < j2; ++j3) { - double d14 = ((double) (j3 + var2 * 16) + 0.5D - p_151540_10_) / d12; - int k3 = (k2 * 16 + j3) * 256 + i2; - boolean flag = false; - - if (d13 * d13 + d14 * d14 < 1.0D) { - for (int l3 = i2 - 1; l3 >= j4; --l3) { - double d11 = ((double) l3 + 0.5D - p_151540_8_) / d6; - - if ((d13 * d13 + d14 * d14) * (double) this.field_75046_d[l3] - + d11 * d11 / 6.0D < 1.0D) { - Block block1 = aBlocksInChunkOrPassedIn[k3]; - - if (checkIfTopBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2)) { - flag = true; - } - - Logger.WORLD("Generating Large Ravine. 2"); - digBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2, flag); - } - - --k3; - } - } - } - } - - if (possibleIsUnderGroundFlag) { - break; - } - } - } - } - } - } - - // generate? - @Override - protected void func_151538_a(World p_151538_1_, int p_151538_2_, int p_151538_3_, int chunkX, int chunkZ, - Block[] blocks) { - if (this.rand.nextInt(50) == 0) { - double d0 = (double) (p_151538_2_ * 16 + this.rand.nextInt(16)); - double d1 = (double) (this.rand.nextInt(this.rand.nextInt(40) + 8) + 20); - double d2 = (double) (p_151538_3_ * 16 + this.rand.nextInt(16)); - byte b0 = 1; - - for (int i1 = 0; i1 < b0; ++i1) { - float f = this.rand.nextFloat() * (float) Math.PI * 2.0F; - float f1 = (this.rand.nextFloat() - 0.5F) * 2.0F / 8.0F; - float f2 = (this.rand.nextFloat() * 2.0F + this.rand.nextFloat()) * 2.0F; - this.func_151540_a(this.rand.nextLong(), chunkX, chunkZ, blocks, d0, d1, d2, f2, f, f1, 0, 0, 3.0D); - } - } - } - - private static Method isTopBlock; - - // Determine if the block at the specified location is the top block for the - // biome, we take into account - private synchronized boolean checkIfTopBlock(Block[] data, int index, int x, int y, int z, int chunkX, int chunkZ) { - try { - if (isTopBlock == null) { - isTopBlock = MapGenRavine.class.getDeclaredMethod("isTopBlock", Block[].class, int.class, int.class, - int.class, int.class, int.class, int.class); - } - if (isTopBlock != null) { - return (boolean) isTopBlock.invoke(this, data, index, x, y, z, chunkX, chunkZ); - } else { - return false; - } - } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException n) { - return false; - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java b/src/Java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java deleted file mode 100644 index b6b83d997b..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java +++ /dev/null @@ -1,196 +0,0 @@ -package gtPlusPlus.australia.gen.map.component; - -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityDispenser; -import net.minecraft.tileentity.TileEntityMobSpawner; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraft.world.World; -import net.minecraft.world.gen.structure.StructureBoundingBox; -import net.minecraft.world.gen.structure.StructureComponent; -import net.minecraftforge.common.ChestGenHooks; - -public class AustraliaComponent extends StructureComponent { - public AustraliaComponent() { - } - - public AustraliaComponent(int direction, Random random, int x, int z, int dimX, int dimY, int dimZ) { - super(direction); - this.coordBaseMode = direction; - this.boundingBox = calcBox(direction, x + (16 - dimX) / 2, 64, z + (16 - dimZ) / 2, dimX, dimY, dimZ, 0); - } - - public boolean addComponentParts(World world, Random random) { - return true; - } - - protected void func_151554_b(World par1World, Block par2, int par3, int par4, int par5, int par6, - StructureBoundingBox par7StructureBoundingBox) { - int j1 = getXWithOffset(par4, par6); - int k0 = getYWithOffset(par5); - int k1 = k0; - int l1 = getZWithOffset(par4, par6); - if (par7StructureBoundingBox.isVecInside(j1, k1, l1)) { - if (par1World.isAirBlock(j1, k1, l1)) { - return; - } - k1--; - while (((par1World.isAirBlock(j1, k1, l1)) || (!par1World.getBlock(j1, k1, l1).getMaterial().isSolid()) - || (par1World.getBlock(j1, k1, l1) == Blocks.ice)) && (k1 > 1)) { - par1World.setBlock(j1, k1, l1, par2, par3, 2); - - k1--; - } - } - } - - protected void clearCurrentPositionBlocksUpwards(World par1World, int par2, int par3, int par4, - StructureBoundingBox par5StructureBoundingBox) { - int l = getXWithOffset(par2, par4); - int i1 = getYWithOffset(par3); - int j1 = getZWithOffset(par2, par4); - if (par5StructureBoundingBox.isVecInside(l, i1, j1)) { - int i = 0; - for (;;) { - i++; - if (((i >= 20) && (par1World.isAirBlock(l, i1, j1))) || (i1 >= 255)) { - break; - } - par1World.setBlock(l, i1, j1, Blocks.air, 0, 2); - i1++; - } - } - } - - protected boolean isWaterBelow(World par1World, int par4, int par5, int par6, - StructureBoundingBox par7StructureBoundingBox) { - int j1 = getXWithOffset(par4, par6); - int k1 = getYWithOffset(par5); - int l1 = getZWithOffset(par4, par6); - for (int i = 0; i < 10; i++) { - Material material = par1World.getBlock(j1, k1, l1).getMaterial(); - if ((material.isLiquid()) || (material == Material.ice)) { - return true; - } - if (!par1World.isAirBlock(j1, k1, l1)) { - return false; - } - } - return false; - } - - public void setDispenser(int x, int y, int z, Random random, World world, int facing) { - int i1 = getXWithOffset(x, z); - int j1 = getYWithOffset(y); - int k1 = getZWithOffset(x, z); - - world.setBlock(i1, j1, k1, Blocks.dispenser, facing, 0); - TileEntity tileDispenser = world.getTileEntity(i1, j1, k1); - if ((tileDispenser != null) && ((tileDispenser instanceof TileEntityDispenser))) { - ChestGenHooks info = ChestGenHooks.getInfo("mineshaftCorridor"); - WeightedRandomChestContent.generateChestContents(random, info.getItems(random), - (TileEntityDispenser) tileDispenser, info.getCount(random)); - } else { - Logger.WARNING("Failed to fetch dispenser entity at (" + i1 + ", " + j1 + ", " + k1 + ")"); - } - } - - protected void setSpawner(int x, int y, int z, String mobName, World world) { - int i1 = getXWithOffset(x, z); - int j1 = getYWithOffset(y); - int k1 = getZWithOffset(x, z); - - world.setBlock(i1, j1, k1, Blocks.mob_spawner, 0, 2); - TileEntity tileSpawner = world.getTileEntity(i1, j1, k1); - if ((tileSpawner != null) && ((tileSpawner instanceof TileEntityMobSpawner))) { - ((TileEntityMobSpawner) tileSpawner).func_145881_a().setEntityName(mobName); - } else { - Logger.WARNING("Failed to fetch mob spawner entity at (" + i1 + ", " + j1 + ", " + k1 + ")"); - } - } - - protected void setFurnace(int x, int y, int z, World world) { - int i1 = getXWithOffset(x, z); - int j1 = getYWithOffset(y); - int k1 = getZWithOffset(x, z); - - world.setBlock(i1, j1, k1, Blocks.furnace, getMetadataWithOffset(Blocks.piston, 3), 2); - } - - protected void placeAirBlockAtPos(int x, int y, int z, StructureBoundingBox bounds, World world) { - placeBlockAtCurrentPosition(world, Blocks.air, 0, x, y, z, bounds); - } - - protected void place(Block block, int meta, int x, int y, int z, StructureBoundingBox bounds, World world) { - placeBlockAtCurrentPosition(world, block, meta, x, y, z, bounds); - } - - protected StructureBoundingBox calcBox(int direction, int x, int y, int z, int xLength, int height, int zLength, - int xShift) { - int minX = 0; - int maxX = 0; - int minY = y; - int maxY = y + height; - int minZ = 0; - int maxZ = 0; - switch (direction) { - case 0: - minX = x - xShift; - maxX = x - xShift + xLength; - minZ = z; - maxZ = z + zLength; - break; - case 1: - minX = x - zLength; - maxX = x; - minZ = z - xShift; - maxZ = z - xShift + xLength; - break; - case 2: - minX = x - xShift; - maxX = x - xShift + xLength; - minZ = z - zLength; - maxZ = z; - break; - case 3: - minX = x; - maxX = x + zLength; - minZ = z - xShift; - maxZ = z - xShift + xLength; - } - return new StructureBoundingBox(minX, minY, minZ, maxX, maxY, maxZ); - } - - protected int calcGroundHeight(World world, StructureBoundingBox boundingBox) { - int height = 0; - int count = 0; - for (int z = boundingBox.minZ; z <= boundingBox.maxZ; z++) { - for (int x = boundingBox.minX; x <= boundingBox.maxX; x++) { - if (boundingBox.isVecInside(x, 64, z)) { - height += Math.max(world.getTopSolidOrLiquidBlock(x, z), world.provider.getAverageGroundLevel()); - count++; - } - } - } - if (count == 0) { - return -1; - } - return height / count; - } - - protected void func_143012_a(NBTTagCompound nbttagcompound) { - } - - protected void func_143011_b(NBTTagCompound nbttagcompound) { - } - - public boolean addComponentParts(World world, Random random, StructureBoundingBox structureboundingbox) { - return true; - } -} diff --git a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java b/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java deleted file mode 100644 index 1f5dd59667..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java +++ /dev/null @@ -1,474 +0,0 @@ -package gtPlusPlus.australia.gen.map.component; - -import java.util.Random; - -import gtPlusPlus.api.interfaces.IGeneratorWorld; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.GTplusplus_Australia; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.plugin.villagers.entity.EntityNativeAustralian; -import net.minecraft.block.Block; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.structure.StructureBoundingBox; - -public class ComponentHut extends AustraliaComponent { - public static final int DIM_X = 7; - public static final int DIM_Y = 10; - public static final int DIM_Z = 7; - - public ComponentHut() { - } - - public ComponentHut(int direction, Random random, int x, int z) { - super(direction, random, x, z, 7, 10, 7); - } - - public boolean addComponentParts(World world, Random random) { - - BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0)); - int groundAvg = calcGroundHeight(world, this.boundingBox); - if (groundAvg < 0) { - return true; - } - this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0); - if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox)) - || (isWaterBelow(world, 6, -1, 0, this.boundingBox)) - || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) { - return false; - } - - Block aWall1, aWall2, aRoof, aFloor; - - if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) { - aWall1 = Blocks.sand; - aWall2 = Blocks.sandstone; - aRoof = Blocks.sandstone; - aFloor = Blocks.sandstone; - } - else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { - aWall1 = Blocks.clay; - aWall2 = Blocks.hardened_clay; - aRoof = Blocks.hardened_clay; - aFloor = Blocks.stained_hardened_clay; - } - else { - aWall1 = Blocks.sand; - aWall2 = Blocks.sandstone; - aRoof = Blocks.sandstone; - aFloor = Blocks.sandstone; - } - - //Empty Area - fillWithAir(world, this.boundingBox, 0, 1, 0, 6, 9, 6); - - //Build Floor - fillWithMetadataBlocks(world, this.boundingBox, 0, 0, 0, 6, 0, 6, aFloor, 0, aFloor, 1, false); - - //Layer 2 - int dir = MathUtils.randInt(0, 3); - - //Door First - if (dir == 0) { - placeDoorAtCurrentPosition( - world, this.boundingBox, random, 0, 1, 3, getMetadataWithOffset(Blocks.wooden_door, 1)); - } - else if (dir == 1) { - placeDoorAtCurrentPosition( - world, this.boundingBox, random, 3, 1, 6, getMetadataWithOffset(Blocks.wooden_door, 1)); - } - else if (dir == 2) { - placeDoorAtCurrentPosition( - world, this.boundingBox, random, 6, 1, 3, getMetadataWithOffset(Blocks.wooden_door, 1)); - } - else { - placeDoorAtCurrentPosition( - world, this.boundingBox, random, 3, 1, 0, getMetadataWithOffset(Blocks.wooden_door, 1)); - } - - //Layer 1 - //Wall Top - place(aWall1, 0, 0, 1, 2, this.boundingBox, world); - if (dir != 0) place(aWall1, 0, 0, 1, 3, this.boundingBox, world); - place(aWall1, 0, 0, 1, 4, this.boundingBox, world); - //Wall Right - place(aWall1, 0, 2, 1, 6, this.boundingBox, world); - if (dir != 1) place(aWall2, 0, 3, 1, 6, this.boundingBox, world); - place(aWall1, 0, 4, 1, 6, this.boundingBox, world); - //Wall Bottom - place(aWall2, 0, 6, 1, 4, this.boundingBox, world); - if (dir != 2) place(aWall1, 0, 6, 1, 3, this.boundingBox, world); - place(aWall1, 0, 6, 1, 2, this.boundingBox, world); - //Wall Left - place(aWall1, 0, 4, 1, 0, this.boundingBox, world); - if (dir != 3) place(aWall1, 0, 3, 1, 0, this.boundingBox, world); - place(aWall2, 0, 2, 1, 0, this.boundingBox, world); - //Corners - place(aWall1, 0, 1, 1, 5, this.boundingBox, world); - place(aWall2, 0, 5, 1, 5, this.boundingBox, world); - place(aWall1, 0, 5, 1, 1, this.boundingBox, world); - place(aWall1, 0, 1, 1, 1, this.boundingBox, world); - - - //Wall Top - place(aWall1, 0, 0, 2, 2, this.boundingBox, world); - //place(aWall1, 0, 0, 2, 3, this.boundingBox, world); - place(aWall2, 0, 0, 2, 4, this.boundingBox, world); - - //Wall Right - place(aWall2, 0, 2, 2, 6, this.boundingBox, world); - //place(aWall1, 0, 3, 2, 6, this.boundingBox, world); - place(aWall1, 0, 4, 2, 6, this.boundingBox, world); - - //Wall Bottom - place(aWall1, 0, 6, 2, 4, this.boundingBox, world); - //place(aWall1, 0, 6, 2, 3, this.boundingBox, world); - place(aWall2, 0, 6, 2, 2, this.boundingBox, world); - - //Wall Left - place(aWall1, 0, 4, 2, 0, this.boundingBox, world); - //place(aWall2, 0, 4, 2, 0, this.boundingBox, world); - place(aWall1, 0, 2, 2, 0, this.boundingBox, world); - - //Corners - place(aWall1, 0, 1, 2, 5, this.boundingBox, world); - place(aWall1, 0, 5, 2, 5, this.boundingBox, world); - place(aWall2, 0, 5, 2, 1, this.boundingBox, world); - place(aWall2, 0, 1, 2, 1, this.boundingBox, world); - - //Layer 3 - //Wall Top - place(aWall2, 0, 0, 3, 2, this.boundingBox, world); - place(aWall1, 0, 0, 3, 3, this.boundingBox, world); - place(aWall1, 0, 0, 3, 4, this.boundingBox, world); - //Wall Right - place(aWall1, 0, 2, 3, 6, this.boundingBox, world); - place(aWall1, 0, 3, 3, 6, this.boundingBox, world); - place(aWall1, 0, 4, 3, 6, this.boundingBox, world); - //Wall Bottom - place(aWall1, 0, 6, 3, 4, this.boundingBox, world); - place(aWall2, 0, 6, 3, 3, this.boundingBox, world); - place(aWall1, 0, 6, 3, 2, this.boundingBox, world); - //Wall Left - place(aWall1, 0, 4, 3, 0, this.boundingBox, world); - place(aWall2, 0, 3, 3, 0, this.boundingBox, world); - place(aWall1, 0, 2, 3, 0, this.boundingBox, world); - //Corners - place(aWall1, 0, 1, 3, 5, this.boundingBox, world); - place(aWall2, 0, 5, 3, 5, this.boundingBox, world); - place(aWall1, 0, 5, 3, 1, this.boundingBox, world); - place(aWall1, 0, 1, 3, 1, this.boundingBox, world); - - //Roof - //Roof 1 Top - place(aRoof, 0, 1, 4, 2, this.boundingBox, world); - place(aRoof, 0, 1, 4, 3, this.boundingBox, world); - place(aRoof, 0, 1, 4, 4, this.boundingBox, world); - //Roof 1 Right - place(aRoof, 0, 2, 4, 5, this.boundingBox, world); - place(aRoof, 0, 3, 4, 5, this.boundingBox, world); - place(aRoof, 0, 4, 4, 5, this.boundingBox, world); - //Roof 1 Bottom - place(aRoof, 0, 5, 4, 4, this.boundingBox, world); - place(aRoof, 0, 5, 4, 3, this.boundingBox, world); - place(aRoof, 0, 5, 4, 2, this.boundingBox, world); - //Roof 1 Left - place(aRoof, 0, 4, 4, 1, this.boundingBox, world); - place(aRoof, 0, 3, 4, 1, this.boundingBox, world); - place(aRoof, 0, 2, 4, 1, this.boundingBox, world); - - //Roof 2 Top - place(aRoof, 0, 2, 5, 2, this.boundingBox, world); - place(aRoof, 0, 2, 5, 3, this.boundingBox, world); - place(aRoof, 0, 2, 5, 4, this.boundingBox, world); - - //Roof 2 Right - //place(aWall1, 0, 2, 5, 4, this.boundingBox, world); - place(aRoof, 0, 3, 5, 4, this.boundingBox, world); - //place(aWall1, 0, 4, 5, 4, this.boundingBox, world); - - //Roof 2 Bottom - place(aRoof, 0, 4, 5, 4, this.boundingBox, world); - place(aRoof, 0, 4, 5, 3, this.boundingBox, world); - place(aRoof, 0, 4, 5, 2, this.boundingBox, world); - - //Roof 2 Left - //place(aWall1, 0, 4, 5, 2, this.boundingBox, world); - place(aRoof, 0, 3, 5, 2, this.boundingBox, world); - //place(aWall1, 0, 2, 5, 2, this.boundingBox, world); - - //Roof 3 Top - place(Blocks.glowstone, 0, 3, 5, 3, this.boundingBox, world); - /* - int logID = MathUtils.randInt(0, 1); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 1, this.boundingBox, world); - - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 5, this.boundingBox, world); - - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 1, this.boundingBox, world); - - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 5, this.boundingBox, world); - - int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8; - - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 2, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 3, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 4, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 2, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 3, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 4, this.boundingBox, world); - - for (int x = -2; x < 9; x++) { - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 0, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 1, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 2, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 3, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 4, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 5, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 6, this.boundingBox, world); - } - - int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8))); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 2, 2, 1, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 2, 2, 5, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 4, 2, 5, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 0, 2, 3, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 6, 2, 3, this.boundingBox, world); - - placeDoorAtCurrentPosition(world, this.boundingBox, random, 4, 1, 1, - getMetadataWithOffset(Blocks.wooden_door, 1)); - - place(Blocks.leaves, MathUtils.randInt(0, 3), 1, 1, 4, this.boundingBox, world); - place(Blocks.torch, 0, 1, 2, 3, this.boundingBox, world); - place(Blocks.torch, 0, 3, 2, 2, this.boundingBox, world); - if (!this.hasMadeChest) { - int ic = getYWithOffset(0); - int jc = getXWithOffset(7, 1); - int kc = getZWithOffset(7, 1); - if (this.boundingBox.isVecInside(jc, ic, kc)) { - this.hasMadeChest = true; - generateStructureChestContents(world, this.boundingBox, random, 1, 1, 2, shackChestContents, - 1 + random.nextInt(3)); - } - }*/ - for (int i = 0; i < 7; i++) { - for (int j = 0; j < 7; j++) { - clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox); - func_151554_b(world, aFloor, 0, j, 0, i, this.boundingBox); - } - } - spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5)); - - return true; - - /* - BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0)); - int groundAvg = calcGroundHeight(world, this.boundingBox); - if (groundAvg < 0) { - return true; - } - this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0); - if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox)) - || (isWaterBelow(world, 6, -1, 0, this.boundingBox)) - || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) { - return false; - } - Block groundID = Blocks.grass; - Block undergroundID = Blocks.dirt; - if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) { - groundID = Blocks.sand; - undergroundID = Blocks.sand; - } - else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { - groundID = Blocks.hardened_clay; - undergroundID = Blocks.stained_hardened_clay; - } - - - fillWithAir(world, this.boundingBox, 0, 1, 0, 6, 9, 6); - fillWithMetadataBlocks(world, this.boundingBox, 0, 0, 1, 6, 1, 5, Blocks.dirt, 0, Blocks.dirt, 1, false); - fillWithMetadataBlocks(world, this.boundingBox, 0, 2, 1, 6, 3, 5, Blocks.cobblestone, 0, Blocks.cobblestone, 0, false); - fillWithAir(world, this.boundingBox, 1, 1, 2, 5, 3, 4); - - int logID = MathUtils.randInt(0, 1); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 1, this.boundingBox, world); - - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 5, this.boundingBox, world); - - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 1, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 1, this.boundingBox, world); - - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 5, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 5, this.boundingBox, world); - - int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8; - - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 2, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 3, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 4, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 2, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 3, this.boundingBox, world); - place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 4, this.boundingBox, world); - - for (int x = -2; x < 9; x++) { - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 0, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 1, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 2, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 3, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 4, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 5, this.boundingBox, world); - place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 6, this.boundingBox, world); - } - - int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8))); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 2, 2, 1, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 2, 2, 5, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 4, 2, 5, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 0, 2, 3, this.boundingBox, world); - if (MathUtils.randInt(0, 5) > 4) - place(Blocks.stained_glass, glassMeta, 6, 2, 3, this.boundingBox, world); - - placeDoorAtCurrentPosition(world, this.boundingBox, random, 4, 1, 1, - getMetadataWithOffset(Blocks.wooden_door, 1)); - - place(Blocks.leaves, MathUtils.randInt(0, 3), 1, 1, 4, this.boundingBox, world); - place(Blocks.torch, 0, 1, 2, 3, this.boundingBox, world); - place(Blocks.torch, 0, 3, 2, 2, this.boundingBox, world); - if (!this.hasMadeChest) { - int ic = getYWithOffset(0); - int jc = getXWithOffset(7, 1); - int kc = getZWithOffset(7, 1); - if (this.boundingBox.isVecInside(jc, ic, kc)) { - this.hasMadeChest = true; - generateStructureChestContents(world, this.boundingBox, random, 1, 1, 2, shackChestContents, - 1 + random.nextInt(3)); - } - } - for (int i = 0; i < 7; i++) { - for (int j = 0; j < 7; j++) { - clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox); - func_151554_b(world, undergroundID, 0, j, 0, i, this.boundingBox); - } - } - spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5)); - - return true; - */} - - private int nativesSpawned = 0; - - private void spawnNatives(World par1World, StructureBoundingBox par2StructureBoundingBox, int par3, int par4, - int par5, int maxSpawned) { - if (this.nativesSpawned < maxSpawned) { - for (int i1 = this.nativesSpawned; i1 < maxSpawned; i1++) { - int j1 = getXWithOffset(par3 + i1, par5); - int k1 = getYWithOffset(par4); - int l1 = getZWithOffset(par3 + i1, par5); - if (!par2StructureBoundingBox.isVecInside(j1, k1, l1)) { - break; - } - if (par1World.rand.nextInt(MathUtils.randInt(3, 5)) != 0) { - EntityNativeAustralian entityvillager = new EntityNativeAustralian(par1World); - entityvillager.func_110163_bv(); - entityvillager.setLocationAndAngles(j1 + 0.5D, k1, l1 + 0.5D, 0.0F, 0.0F); - par1World.spawnEntityInWorld(entityvillager); - this.nativesSpawned += 1; - } - } - } - } - - public static final WeightedRandomChestContent[] shackChestContents = { - new WeightedRandomChestContent(Items.glass_bottle, 0, 1, 1, 10), - new WeightedRandomChestContent(Items.bread, 0, 1, 3, 15), - new WeightedRandomChestContent(Items.apple, 0, 1, 3, 15), - new WeightedRandomChestContent(Items.cooked_fished, 0, 1, 3, 10), - new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.sapling), 1, 1, 1, 15), - // new WeightedRandomChestContent(Witchery.Items.GENERIC, - // Witchery.Items.GENERIC.itemRowanBerries.damageValue, 1, 2, 10), - new WeightedRandomChestContent(Items.iron_shovel, 0, 1, 1, 5), - new WeightedRandomChestContent(Items.iron_pickaxe, 0, 1, 1, 5) }; - private boolean hasMadeChest; - private static final String CHEST_KEY = "AUSShackChest"; - - protected void func_143012_a(NBTTagCompound par1NBTTagCompound) { - super.func_143012_a(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("AUSShackChest", this.hasMadeChest); - par1NBTTagCompound.setInteger("AUSWCount", this.nativesSpawned); - } - - protected void func_143011_b(NBTTagCompound par1NBTTagCompound) { - super.func_143011_b(par1NBTTagCompound); - this.hasMadeChest = par1NBTTagCompound.getBoolean("AUSShackChest"); - if (par1NBTTagCompound.hasKey("AUSWCount")) { - this.nativesSpawned = par1NBTTagCompound.getInteger("AUSWCount"); - } else { - this.nativesSpawned = 0; - } - } - - public static class WorldHandlerHut implements IGeneratorWorld { - private final double chance; - private final int range; - - public WorldHandlerHut(double chance) { - this.chance = chance; - this.range = 400; - } - - public int getExtentX() { - return 7; - } - - public int getExtentZ() { - return 7; - } - - public int getRange() { - return this.range; - } - - public boolean generate(World world, Random random, int x, int z) { - if ((MathUtils.randInt(0, 100) < (this.chance/5))) { - int direction = MathUtils.randInt(0, 3); - new ComponentHut(direction, random, x, z).addComponentParts(world, random); - Logger.WORLD("NativeHut x: " + x + " | z: " + z + " | Dir: " + direction); - return true; - } - return false; - } - - public void initiate() { - } - } - -} diff --git a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java b/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java deleted file mode 100644 index e3f501468b..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java +++ /dev/null @@ -1,279 +0,0 @@ -package gtPlusPlus.australia.gen.map.component; - -import java.util.Random; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gtPlusPlus.api.interfaces.IGeneratorWorld; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.GTplusplus_Australia; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.structure.StructureBoundingBox; - -public class ComponentShack extends AustraliaComponent { - public static final int DIM_X = 9; - public static final int DIM_Y = 10; - public static final int DIM_Z = 9; - - public ComponentShack() { - } - - public ComponentShack(int direction, Random random, int x, int z) { - super(direction, random, x, z, DIM_X, DIM_Y, DIM_Z); - } - - public boolean addComponentParts(World world, Random random) { - BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0)); - int groundAvg = calcGroundHeight(world, this.boundingBox); - if (groundAvg < 0) { - return true; - } - this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0); - if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox)) - || (isWaterBelow(world, 6, -1, 0, this.boundingBox)) - || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) { - return false; - } - Block mStone; - Block groundID = Blocks.grass; - Block undergroundID = Blocks.dirt; - if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) { - groundID = Blocks.sand; - undergroundID = Blocks.sand; - mStone = Blocks.sandstone; - } - else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { - groundID = Blocks.hardened_clay; - undergroundID = Blocks.stained_hardened_clay; - mStone = Blocks.stained_hardened_clay; - } - else { - mStone = Blocks.stonebrick; - } - - int mWoodType = MathUtils.randInt(0, 5); - int logID; - Block mWoodenStairs; - Block mLog; - if (mWoodType == 1) { - mWoodenStairs = Blocks.spruce_stairs; - logID = 1; - } - else if (mWoodType == 2) { - mWoodenStairs = Blocks.birch_stairs; - logID = 2; - - } - else if (mWoodType == 3) { - mWoodenStairs = Blocks.jungle_stairs; - logID = 3; - } - else if (mWoodType == 4) { - mWoodenStairs = Blocks.acacia_stairs; - logID = 0; - } - else if (mWoodType == 5) { - mWoodenStairs = Blocks.dark_oak_stairs; - logID = 1; - } - else { - mWoodenStairs = Blocks.oak_stairs; - logID = 0; - } - if (mWoodType >= 4) { - mLog = Blocks.log2; - } - else { - mLog = Blocks.log; - } - - int mStoneMeta = MathUtils.randInt(0, mStone == Blocks.stained_hardened_clay ? 15 : mStone == Blocks.sandstone ? 2 : 3); - - fillWithAir(world, this.boundingBox, 0, 1, 0, 7, 7, 4); - fillWithMetadataBlocks(world, this.boundingBox, 1, 0, 1, 7, 1, 5, mStone, mStoneMeta, mStone, mStoneMeta, false); - fillWithMetadataBlocks(world, this.boundingBox, 1, 2, 1, 7, 3, 5, Blocks.planks, mWoodType, Blocks.planks, mWoodType, false); - fillWithAir(world, this.boundingBox, 2, 1, 2, 6, 3, 4); - - place(mLog, logID, 1, 1, 1, this.boundingBox, world); - place(mLog, logID, 1, 2, 1, this.boundingBox, world); - place(mLog, logID, 1, 3, 1, this.boundingBox, world); - - place(mLog, logID, 1, 1, 5, this.boundingBox, world); - place(mLog, logID, 1, 2, 5, this.boundingBox, world); - place(mLog, logID, 1, 3, 5, this.boundingBox, world); - - place(mLog, logID, 7, 1, 1, this.boundingBox, world); - place(mLog, logID, 7, 2, 1, this.boundingBox, world); - place(mLog, logID, 7, 3, 1, this.boundingBox, world); - - place(mLog, logID, 7, 1, 5, this.boundingBox, world); - place(mLog, logID, 7, 2, 5, this.boundingBox, world); - place(mLog, logID, 7, 3, 5, this.boundingBox, world); - - int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8; - - place(mLog, logID, 1, 4, 2, this.boundingBox, world); - place(mLog, logID, 1, 4, 3, this.boundingBox, world); - place(mLog, logID, 1, 4, 4, this.boundingBox, world); - place(mLog, logID, 7, 4, 2, this.boundingBox, world); - place(mLog, logID, 7, 4, 3, this.boundingBox, world); - place(mLog, logID, 7, 4, 4, this.boundingBox, world); - - for (int x = 0; x < 9; x++) { - place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 3, 0, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 4, 1, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 5, 2, this.boundingBox, world); - place(Blocks.planks, mWoodType, x, 5, 3, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 2), x, 5, 4, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 2), x, 4, 5, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 2), x, 3, 6, this.boundingBox, world); - } - - int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8))); - - place(Blocks.stained_glass_pane, glassMeta, 3, 2, 1, this.boundingBox, world); - place(Blocks.stained_glass_pane, glassMeta, 3, 2, 5, this.boundingBox, world); - place(Blocks.stained_glass_pane, glassMeta, 5, 2, 5, this.boundingBox, world); - place(Blocks.stained_glass_pane, glassMeta, 1, 2, 3, this.boundingBox, world); - place(Blocks.stained_glass_pane, glassMeta, 7, 2, 3, this.boundingBox, world); - - placeDoorAtCurrentPosition(world, this.boundingBox, random, 5, 1, 1, - getMetadataWithOffset(Blocks.wooden_door, 1)); - - place(Blocks.redstone_lamp, mWoodType, 2, 1, 4, this.boundingBox, world); - place(Blocks.redstone_torch, 0, 2, 2, 4, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 1), 2, 1, 3, this.boundingBox, world); - place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 3), 3, 1, 4, this.boundingBox, world); - place(Blocks.fence, 0, 3, 1, 3, this.boundingBox, world); - place(Blocks.heavy_weighted_pressure_plate, 0, 3, 2, 3, this.boundingBox, world); - if (!this.hasMadeChest) { - int ic = getYWithOffset(0); - int jc = getXWithOffset(7, 1); - int kc = getZWithOffset(7, 1); - if (this.boundingBox.isVecInside(jc, ic, kc)) { - this.hasMadeChest = true; - generateStructureChestContents(world, this.boundingBox, random, 2, 1, 2, shackChestContents, - 1 + random.nextInt(3)); - } - } - for (int i = 0; i < 9; i++) { - for (int j = 0; j < 9; j++) { - clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox); - func_151554_b(world, undergroundID, 0, j, 0, i, this.boundingBox); - } - } - spawnNatives(world, this.boundingBox, 3, 2, 3, MathUtils.randInt(3, 5)); - - return true; - } - - private int nativesSpawned = 0; - - private void spawnNatives(World par1World, StructureBoundingBox par2StructureBoundingBox, int par3, int par4, - int par5, int maxSpawned) { - if (this.nativesSpawned < maxSpawned) { - for (int i1 = this.nativesSpawned; i1 < maxSpawned; i1++) { - int j1 = getXWithOffset(par3 + i1, par5); - int k1 = getYWithOffset(par4); - int l1 = getZWithOffset(par3 + i1, par5); - if (!par2StructureBoundingBox.isVecInside(j1, k1, l1)) { - break; - } - if (par1World.rand.nextInt(MathUtils.randInt(1, 3)) != 0) { - EntityVillager entityvillager = new EntityVillager(par1World, 7736+(MathUtils.randInt(0, 1))); - entityvillager.func_110163_bv(); - entityvillager.setLocationAndAngles(j1 + 0.5D, k1, l1 + 0.5D, 0.0F, 0.0F); - par1World.spawnEntityInWorld(entityvillager); - this.nativesSpawned += 1; - } - } - } - } - - //Min, max, Weight - public static final WeightedRandomChestContent[] shackChestContents = { - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustIron", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 9), 50), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 6), 50), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustTin", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 6), 50), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustGold", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 3), 30), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 3), 30), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", MathUtils.randInt(1, 2)), 0, MathUtils.randInt(1, 2), 5), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemEmerald", MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemRuby", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 4), 15), - new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemSapphire", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 4), 15), - new WeightedRandomChestContent(ItemUtils.getSimpleStack(CI.electricMotor_LV, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), - new WeightedRandomChestContent(ItemUtils.getSimpleStack(CI.electricPiston_LV, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), - new WeightedRandomChestContent(ItemUtils.getSimpleStack(CI.robotArm_LV, MathUtils.randInt(1, 2)), 0, MathUtils.randInt(1, 2), 2), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, Materials.Copper, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 25), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, Materials.Tin, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 25), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.wireGt01, Materials.Copper, MathUtils.randInt(2, 5)), 0, MathUtils.randInt(2, 5), 35), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.wireGt01, Materials.Tin, MathUtils.randInt(2, 5)), 0, MathUtils.randInt(2, 5), 35), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.pipeSmall, Materials.Copper, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 25), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.pipeSmall, Materials.Bronze, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 15), - new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.pipeTiny, Materials.Steel, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), - }; - - private boolean hasMadeChest; - private static final String CHEST_KEY = "AUSShackChest"; - - protected void func_143012_a(NBTTagCompound par1NBTTagCompound) { - super.func_143012_a(par1NBTTagCompound); - par1NBTTagCompound.setBoolean("AUSShackChest", this.hasMadeChest); - par1NBTTagCompound.setInteger("AUSWCount", this.nativesSpawned); - } - - protected void func_143011_b(NBTTagCompound par1NBTTagCompound) { - super.func_143011_b(par1NBTTagCompound); - this.hasMadeChest = par1NBTTagCompound.getBoolean("AUSShackChest"); - if (par1NBTTagCompound.hasKey("AUSWCount")) { - this.nativesSpawned = par1NBTTagCompound.getInteger("AUSWCount"); - } else { - this.nativesSpawned = 0; - } - } - - public static class WorldHandlerShack implements IGeneratorWorld { - private final double chance; - private final int range; - - public WorldHandlerShack(double chance) { - this.chance = chance; - this.range = 400; - } - - public int getExtentX() { - return 7; - } - - public int getExtentZ() { - return 7; - } - - public int getRange() { - return this.range; - } - - public boolean generate(World world, Random random, int x, int z) { - if ((MathUtils.randInt(0, 100) < (this.chance/5))) { - int direction = MathUtils.randInt(0, 3); - new ComponentShack(direction, random, x, z).addComponentParts(world, random); - Logger.WORLD("NativeShack x: " + x + " | z: " + z + " | dir: " + direction); - return true; - } - return false; - } - - public void initiate() { - } - } - -} diff --git a/src/Java/gtPlusPlus/australia/gen/map/structure/StructureManager.java b/src/Java/gtPlusPlus/australia/gen/map/structure/StructureManager.java deleted file mode 100644 index b3238a5903..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/structure/StructureManager.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.australia.gen.map.structure; - -import gtPlusPlus.australia.gen.map.MapGenExtendedVillage; -import gtPlusPlus.australia.gen.map.structure.type.ComponentVillageBank; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.world.gen.structure.MapGenStructureIO; - -public class StructureManager { - - public static void registerVillageComponents() { - try { - //Register Village - MapGenStructureIO.registerStructure(MapGenExtendedVillage.Start.class, "ExtendedVillage"); - - //Register Structures within village - MapGenStructureIO.func_143031_a(ComponentVillageBank.class, CORE.MODID+":"+"Bank"); - } catch (Throwable e) {} - } - -} diff --git a/src/Java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java b/src/Java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java deleted file mode 100644 index 5b7017aaf0..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java +++ /dev/null @@ -1,175 +0,0 @@ -package gtPlusPlus.australia.gen.map.structure.type; - -import static net.minecraftforge.common.ChestGenHooks.VILLAGE_BLACKSMITH; - -import java.util.List; -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.WeightedRandomChestContent; -import net.minecraft.world.World; -import net.minecraft.world.gen.structure.StructureBoundingBox; -import net.minecraft.world.gen.structure.StructureComponent; -import net.minecraft.world.gen.structure.StructureVillagePieces; -import net.minecraft.world.gen.structure.StructureVillagePieces.House2; -import net.minecraftforge.common.ChestGenHooks; - -public class ComponentVillageBank extends House2 { - - /** List of items that Village's Blacksmith chest can contain. */ - public static final WeightedRandomChestContent[] villageBlacksmithChestContents = new WeightedRandomChestContent[] { - new WeightedRandomChestContent(Items.diamond, 0, 1, 3, 3), - new WeightedRandomChestContent(Items.iron_ingot, 0, 1, 5, 10), - new WeightedRandomChestContent(Items.gold_ingot, 0, 1, 3, 5), - new WeightedRandomChestContent(Items.bread, 0, 1, 3, 15), - new WeightedRandomChestContent(Items.apple, 0, 1, 3, 15), - new WeightedRandomChestContent(Items.iron_pickaxe, 0, 1, 1, 5), - new WeightedRandomChestContent(Items.iron_sword, 0, 1, 1, 5), - new WeightedRandomChestContent(Items.iron_chestplate, 0, 1, 1, 5), - new WeightedRandomChestContent(Items.iron_helmet, 0, 1, 1, 5), - new WeightedRandomChestContent(Items.iron_leggings, 0, 1, 1, 5), - new WeightedRandomChestContent(Items.iron_boots, 0, 1, 1, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.obsidian), 0, 3, 7, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.sapling), 0, 3, 7, 5), - new WeightedRandomChestContent(Items.saddle, 0, 1, 1, 3), - new WeightedRandomChestContent(Items.iron_horse_armor, 0, 1, 1, 1), - new WeightedRandomChestContent(Items.golden_horse_armor, 0, 1, 1, 1), - new WeightedRandomChestContent(Items.diamond_horse_armor, 0, 1, 1, 1) - }; - - private boolean hasMadeChest; - - public ComponentVillageBank() { - Logger.INFO("Created a Bank."); - } - - public ComponentVillageBank(StructureVillagePieces.Start aStart, int p_i2103_2_, Random aRand, - StructureBoundingBox aBox, int aCoordBaseMode) { - super(aStart, p_i2103_2_, aRand, aBox, aCoordBaseMode); - this.coordBaseMode = aCoordBaseMode; - this.boundingBox = aBox; - } - - public static StructureVillagePieces.House2 func_74915_a(StructureVillagePieces.Start p_74915_0_, List p_74915_1_, - Random p_74915_2_, int p_74915_3_, int p_74915_4_, int p_74915_5_, int p_74915_6_, int p_74915_7_) { - StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p_74915_3_, - p_74915_4_, p_74915_5_, 0, 0, 0, 10, 6, 7, p_74915_6_); - Logger.INFO("12334453"); - return canVillageGoDeeper(structureboundingbox) - && StructureComponent.findIntersecting(p_74915_1_, structureboundingbox) == null - ? new StructureVillagePieces.House2(p_74915_0_, p_74915_7_, p_74915_2_, structureboundingbox, - p_74915_6_) - : null; - } - - protected void func_143012_a(NBTTagCompound aNBT) { - super.func_143012_a(aNBT); - aNBT.setBoolean("Chest", this.hasMadeChest); - } - - protected void func_143011_b(NBTTagCompound aNBT) { - super.func_143011_b(aNBT); - this.hasMadeChest = aNBT.getBoolean("Chest"); - } - - /** - * second Part of Structure generating, this for example places Spiderwebs, Mob - * Spawners, it closes Mineshafts at the end, it adds Fences... - */ - public boolean addComponentParts(World aWorld, Random aRand, StructureBoundingBox aBox) { - if (this.field_143015_k < 0) { - this.field_143015_k = this.getAverageGroundLevel(aWorld, aBox); - - if (this.field_143015_k < 0) { - return true; - } - - this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 6 - 1, 0); - } - - this.fillWithBlocks(aWorld, aBox, 0, 1, 0, 9, 4, 6, Blocks.air, Blocks.air, false); - this.fillWithBlocks(aWorld, aBox, 0, 0, 0, 9, 0, 6, Blocks.cobblestone, Blocks.cobblestone, false); - this.fillWithBlocks(aWorld, aBox, 0, 4, 0, 9, 4, 6, Blocks.cobblestone, Blocks.cobblestone, false); - this.fillWithBlocks(aWorld, aBox, 0, 5, 0, 9, 5, 6, Blocks.stone_slab, Blocks.stone_slab, false); - this.fillWithBlocks(aWorld, aBox, 1, 5, 1, 8, 5, 5, Blocks.air, Blocks.air, false); - this.fillWithBlocks(aWorld, aBox, 1, 1, 0, 2, 3, 0, Blocks.planks, Blocks.planks, false); - this.fillWithBlocks(aWorld, aBox, 0, 1, 0, 0, 4, 0, Blocks.log, Blocks.log, false); - this.fillWithBlocks(aWorld, aBox, 3, 1, 0, 3, 4, 0, Blocks.log, Blocks.log, false); - this.fillWithBlocks(aWorld, aBox, 0, 1, 6, 0, 4, 6, Blocks.log, Blocks.log, false); - this.placeBlockAtCurrentPosition(aWorld, Blocks.planks, 0, 3, 3, 1, aBox); - this.fillWithBlocks(aWorld, aBox, 3, 1, 2, 3, 3, 2, Blocks.planks, Blocks.planks, false); - this.fillWithBlocks(aWorld, aBox, 4, 1, 3, 5, 3, 3, Blocks.planks, Blocks.planks, false); - this.fillWithBlocks(aWorld, aBox, 0, 1, 1, 0, 3, 5, Blocks.planks, Blocks.planks, false); - this.fillWithBlocks(aWorld, aBox, 1, 1, 6, 5, 3, 6, Blocks.planks, Blocks.planks, false); - this.fillWithBlocks(aWorld, aBox, 5, 1, 0, 5, 3, 0, Blocks.fence, Blocks.fence, false); - this.fillWithBlocks(aWorld, aBox, 9, 1, 0, 9, 3, 0, Blocks.fence, Blocks.fence, false); - this.fillWithBlocks(aWorld, aBox, 6, 1, 4, 9, 4, 6, Blocks.cobblestone, Blocks.cobblestone, false); - this.placeBlockAtCurrentPosition(aWorld, Blocks.flowing_lava, 0, 7, 1, 5, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.flowing_lava, 0, 8, 1, 5, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.iron_bars, 0, 9, 2, 5, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.iron_bars, 0, 9, 2, 4, aBox); - this.fillWithBlocks(aWorld, aBox, 7, 2, 4, 8, 2, 5, Blocks.air, Blocks.air, false); - this.placeBlockAtCurrentPosition(aWorld, Blocks.cobblestone, 0, 6, 1, 3, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.furnace, 0, 6, 2, 3, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.furnace, 0, 6, 3, 3, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.double_stone_slab, 0, 8, 1, 1, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 0, 2, 2, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 0, 2, 4, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 2, 2, 6, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 4, 2, 6, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.fence, 0, 2, 1, 4, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.wooden_pressure_plate, 0, 2, 2, 4, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.planks, 0, 1, 1, 5, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.oak_stairs, - this.getMetadataWithOffset(Blocks.oak_stairs, 3), 2, 1, 5, aBox); - this.placeBlockAtCurrentPosition(aWorld, Blocks.oak_stairs, - this.getMetadataWithOffset(Blocks.oak_stairs, 1), 1, 1, 4, aBox); - int i; - int j; - - if (!this.hasMadeChest) { - i = this.getYWithOffset(1); - j = this.getXWithOffset(5, 5); - int k = this.getZWithOffset(5, 5); - - if (aBox.isVecInside(j, i, k)) { - this.hasMadeChest = true; - this.generateStructureChestContents(aWorld, aBox, aRand, 5, 1, 5, - ChestGenHooks.getItems(VILLAGE_BLACKSMITH, aRand), - ChestGenHooks.getCount(VILLAGE_BLACKSMITH, aRand)); - } - } - - for (i = 6; i <= 8; ++i) { - if (this.getBlockAtCurrentPosition(aWorld, i, 0, -1, aBox).getMaterial() == Material.air && this - .getBlockAtCurrentPosition(aWorld, i, -1, -1, aBox).getMaterial() != Material.air) { - this.placeBlockAtCurrentPosition(aWorld, Blocks.stone_stairs, - this.getMetadataWithOffset(Blocks.stone_stairs, 3), i, 0, -1, aBox); - } - } - - for (i = 0; i < 7; ++i) { - for (j = 0; j < 10; ++j) { - this.clearCurrentPositionBlocksUpwards(aWorld, j, 6, i, aBox); - this.func_151554_b(aWorld, Blocks.cobblestone, 0, j, -1, i, aBox); - } - } - - this.spawnVillagers(aWorld, aBox, 7, 1, 1, 1); - return true; - } - - /** - * Returns the villager type to spawn in this component, based on the number of - * villagers already spawned. - */ - protected int getVillagerType(int p_74888_1_) { - return 7735; - } - -} diff --git a/src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java b/src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java deleted file mode 100644 index 9adb84eef2..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java +++ /dev/null @@ -1,87 +0,0 @@ -package gtPlusPlus.australia.gen.world; - -import java.util.Random; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenerator; - -public class WorldGenAustralianOre extends WorldGenerator { - - private Block mOreToSpawn; - private int numberOfBlocks; - private Block mBlockToReplace; - private int mineableBlockMeta; - - public WorldGenAustralianOre(Block aBlock, int aNumber) { - this(aBlock, aNumber, Blocks.stone); - this.mineableBlockMeta = 0; - } - - public WorldGenAustralianOre(Block aBlock, int aNumber, Block aReplace) { - this.mOreToSpawn = aBlock; - this.numberOfBlocks = aNumber; - this.mBlockToReplace = aReplace; - } - - public WorldGenAustralianOre(Block block, int meta, int number, Block target) { - this(block, number, target); - this.mineableBlockMeta = meta; - } - - - - public boolean generate(World aWorld, Random aRand, int aX, int aY, int aZ) { - float f = MathUtils.randFloat(0f, 1.5f) * CORE.PI; - double d0 = (double) ((float) (aX + 8) + MathHelper.sin(f) * (float) this.numberOfBlocks / 8.0F); - double d1 = (double) ((float) (aX + 8) - MathHelper.sin(f) * (float) this.numberOfBlocks / 8.0F); - double d2 = (double) ((float) (aZ + 8) + MathHelper.cos(f) * (float) this.numberOfBlocks / 8.0F); - double d3 = (double) ((float) (aZ + 8) - MathHelper.cos(f) * (float) this.numberOfBlocks / 8.0F); - double d4 = (double) (aY + aRand.nextInt(MathUtils.randInt(3, 6)) - 2); - double d5 = (double) (aY + aRand.nextInt(MathUtils.randInt(3, 6)) - 2); - - for (int aOreGenerated = 0; aOreGenerated <= this.numberOfBlocks; ++aOreGenerated) { - double d6 = d0 + (d1 - d0) * (double) aOreGenerated / (double) this.numberOfBlocks; - double d7 = d4 + (d5 - d4) * (double) aOreGenerated / (double) this.numberOfBlocks; - double d8 = d2 + (d3 - d2) * (double) aOreGenerated / (double) this.numberOfBlocks; - double d9 = aRand.nextDouble() * (double) this.numberOfBlocks / 16.0D; - double d10 = (double) (MathHelper.sin((float) aOreGenerated * CORE.PI / (float) this.numberOfBlocks) + 1.0F) - * d9 + 1.0D; - double d11 = (double) (MathHelper.sin((float) aOreGenerated * CORE.PI / (float) this.numberOfBlocks) + 1.0F) - * d9 + 1.0D; - int i1 = MathHelper.floor_double(d6 - d10 / 2.0D); - int j1 = MathHelper.floor_double(d7 - d11 / 2.0D); - int k1 = MathHelper.floor_double(d8 - d10 / 2.0D); - int l1 = MathHelper.floor_double(d6 + d10 / 2.0D); - int i2 = MathHelper.floor_double(d7 + d11 / 2.0D); - int j2 = MathHelper.floor_double(d8 + d10 / 2.0D); - - for (int k2 = i1; k2 <= l1; ++k2) { - double d12 = ((double) k2 + 0.5D - d6) / (d10 / 2.0D); - - if (d12 * d12 < 1.0D) { - for (int l2 = j1; l2 <= i2; ++l2) { - double d13 = ((double) l2 + 0.5D - d7) / (d11 / 2.0D); - - if (d12 * d12 + d13 * d13 < 1.0D) { - for (int i3 = k1; i3 <= j2; ++i3) { - double d14 = ((double) i3 + 0.5D - d8) / (d10 / 2.0D); - - if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && aWorld.getBlock(k2, l2, i3) - .isReplaceableOreGen(aWorld, k2, l2, i3, mBlockToReplace)) { - aWorld.setBlock(k2, l2, i3, this.mOreToSpawn, mineableBlockMeta, 2); - } - } - } - } - } - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java b/src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java deleted file mode 100644 index f3529aff0b..0000000000 --- a/src/Java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java +++ /dev/null @@ -1,250 +0,0 @@ -package gtPlusPlus.australia.gen.world; - -import java.util.Random; - -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.util.Direction; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenTrees; -import net.minecraftforge.common.util.ForgeDirection; - -public class WorldGenAustralianTrees extends WorldGenTrees { - - /** The minimum height of a generated tree. */ - private final int minHeight; - /** True if this tree should grow Vines. */ - private final boolean growVines; - /** The metadata value of the wood to use in tree generation. */ - private final int woodMeta; - /** The metadata value of the leaves to use in tree generation. */ - private final int leavesMeta; - - public WorldGenAustralianTrees(boolean p_i2027_1_) { - this(p_i2027_1_, 4, false); - } - - public WorldGenAustralianTrees(boolean p_i2028_1_, int aMinHeight, boolean aVinesGrow) { - super(p_i2028_1_, aMinHeight, 0, 0, aVinesGrow); - this.minHeight = aMinHeight; - this.woodMeta = 0; - this.leavesMeta = 0; - this.growVines = aVinesGrow; - } - - public boolean generate(World aWorld, Random aRand, int aX, int aY, int aZ) { - int aActualMinHeight = MathUtils.randInt(4, 8) + this.minHeight; - boolean flag = true; - - if (aY >= 1 && aY + aActualMinHeight + 1 <= 256) { - byte b0; - int k1; - Block block; - - for (int i1 = aY; i1 <= aY + 1 + aActualMinHeight; ++i1) { - b0 = 1; - - if (i1 == aY) { - b0 = 0; - } - - if (i1 >= aY + 1 + aActualMinHeight - 2) { - b0 = 2; - } - - for (int j1 = aX - b0; j1 <= aX + b0 && flag; ++j1) { - for (k1 = aZ - b0; k1 <= aZ + b0 && flag; ++k1) { - if (i1 >= 0 && i1 < 256) { - block = aWorld.getBlock(j1, i1, k1); - - if (!this.isReplaceable(aWorld, j1, i1, k1)) { - flag = false; - } - } else { - flag = false; - } - } - } - } - - if (!flag) { - return false; - } else { - Block block2 = aWorld.getBlock(aX, aY - 1, aZ); - boolean isSoil = true; - for (int gh = 0; gh < 5; gh++) { - int xMod, zMod; - if (gh == 0) { - xMod = 1; - zMod = 0; - } - else if (gh == 1) { - xMod = 0; - zMod = 1; - } - else if (gh == 2) { - xMod = -1; - zMod = 0; - } - else if (gh == 3) { - xMod = 0; - zMod = -1; - } - else { - xMod = 0; - zMod = 0; - } - block2 = aWorld.getBlock(aX+xMod, aY - 1, aZ+zMod); - if (block2 == Blocks.air || !block2.canSustainPlant(aWorld, aX+xMod, aY - 1, aZ+zMod, ForgeDirection.UP, (BlockSapling) Blocks.sapling)) { - isSoil = false; - break; - } - } - - if (isSoil && aY < 256 - aActualMinHeight - 1) { - block2.onPlantGrow(aWorld, aX, aY - 1, aZ, aX, aY, aZ); - b0 = 5; - byte b1 = 0; - int l1; - int i2; - int j2; - int i3; - - for (k1 = aY - b0 + aActualMinHeight; k1 <= aY + aActualMinHeight; ++k1) { - i3 = k1 - (aY + aActualMinHeight); - l1 = b1 + 3 - i3 / 2; - - for (i2 = aX - l1; i2 <= aX + l1; ++i2) { - j2 = i2 - aX; - - for (int k2 = aZ - l1; k2 <= aZ + l1; ++k2) { - int l2 = k2 - aZ; - - if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || aRand.nextInt(2) != 0 && i3 != 0) { - Block block1 = aWorld.getBlock(i2, k1, k2); - - if (block1.isAir(aWorld, i2, k1, k2) || block1.isLeaves(aWorld, i2, k1, k2)) { - this.setBlockAndNotifyAdequately(aWorld, i2, k1, k2, Blocks.leaves, - this.leavesMeta); - } - } - } - } - } - - for (k1 = 0; k1 < aActualMinHeight; ++k1) { - block = aWorld.getBlock(aX, aY + k1, aZ); - - if (block.isAir(aWorld, aX, aY + k1, aZ) || block.isLeaves(aWorld, aX, aY + k1, aZ)) { - - //Set Middle Trunk - this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ, Blocks.log, this.woodMeta); - //Set Sides - if (k1 < (aActualMinHeight - 2)) { - if (aWorld.isAirBlock(aX+1, aY + k1, aZ) || block.isLeaves(aWorld, aX+1, aY + k1, aZ)) this.setBlockAndNotifyAdequately(aWorld, aX+1, aY + k1, aZ, Blocks.log, this.woodMeta); - if (aWorld.isAirBlock(aX-1, aY + k1, aZ) || block.isLeaves(aWorld, aX-1, aY + k1, aZ)) this.setBlockAndNotifyAdequately(aWorld, aX-1, aY + k1, aZ, Blocks.log, this.woodMeta); - if (aWorld.isAirBlock(aX, aY + k1, aZ+1) || block.isLeaves(aWorld, aX, aY + k1, aZ+1)) this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ+1, Blocks.log, this.woodMeta); - if (aWorld.isAirBlock(aX, aY + k1, aZ-1) || block.isLeaves(aWorld, aX, aY + k1, aZ-1)) this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ-1, Blocks.log, this.woodMeta); - } - - if (this.growVines && k1 > 0) { - if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX - 1, aY + k1, aZ)) { - this.setBlockAndNotifyAdequately(aWorld, aX - 1, aY + k1, aZ, Blocks.vine, 8); - } - - if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX + 1, aY + k1, aZ)) { - this.setBlockAndNotifyAdequately(aWorld, aX + 1, aY + k1, aZ, Blocks.vine, 2); - } - - if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX, aY + k1, aZ - 1)) { - this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ - 1, Blocks.vine, 1); - } - - if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX, aY + k1, aZ + 1)) { - this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ + 1, Blocks.vine, 4); - } - } - } - } - - if (this.growVines) { - for (k1 = aY - 3 + aActualMinHeight; k1 <= aY + aActualMinHeight; ++k1) { - i3 = k1 - (aY + aActualMinHeight); - l1 = 2 - i3 / 2; - - for (i2 = aX - l1; i2 <= aX + l1; ++i2) { - for (j2 = aZ - l1; j2 <= aZ + l1; ++j2) { - if (aWorld.getBlock(i2, k1, j2).isLeaves(aWorld, i2, k1, j2)) { - if (aRand.nextInt(4) == 0 - && aWorld.getBlock(i2 - 1, k1, j2).isAir(aWorld, i2 - 1, k1, j2)) { - this.growVines(aWorld, i2 - 1, k1, j2, 8); - } - - if (aRand.nextInt(4) == 0 - && aWorld.getBlock(i2 + 1, k1, j2).isAir(aWorld, i2 + 1, k1, j2)) { - this.growVines(aWorld, i2 + 1, k1, j2, 2); - } - - if (aRand.nextInt(4) == 0 - && aWorld.getBlock(i2, k1, j2 - 1).isAir(aWorld, i2, k1, j2 - 1)) { - this.growVines(aWorld, i2, k1, j2 - 1, 1); - } - - if (aRand.nextInt(4) == 0 - && aWorld.getBlock(i2, k1, j2 + 1).isAir(aWorld, i2, k1, j2 + 1)) { - this.growVines(aWorld, i2, k1, j2 + 1, 4); - } - } - } - } - } - - if (aRand.nextInt(5) == 0 && aActualMinHeight > 5) { - for (k1 = 0; k1 < 2; ++k1) { - for (i3 = 0; i3 < 4; ++i3) { - if (aRand.nextInt(4 - k1) == 0) { - l1 = aRand.nextInt(3); - this.setBlockAndNotifyAdequately(aWorld, - aX + Direction.offsetX[Direction.rotateOpposite[i3]], aY + aActualMinHeight - 5 + k1, - aZ + Direction.offsetZ[Direction.rotateOpposite[i3]], Blocks.cocoa, - l1 << 2 | i3); - } - } - } - } - } - - return true; - } else { - return false; - } - } - } else { - return false; - } - } - - /** - * Grows vines downward from the given block for a given length. Args: World, x, - * starty, z, vine-length - */ - private void growVines(World p_76529_1_, int p_76529_2_, int p_76529_3_, int p_76529_4_, int p_76529_5_) { - this.setBlockAndNotifyAdequately(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_, Blocks.vine, p_76529_5_); - int i1 = 4; - - while (true) { - --p_76529_3_; - - if (!p_76529_1_.getBlock(p_76529_2_, p_76529_3_, p_76529_4_).isAir(p_76529_1_, p_76529_2_, p_76529_3_, - p_76529_4_) || i1 <= 0) { - return; - } - - this.setBlockAndNotifyAdequately(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_, Blocks.vine, p_76529_5_); - --i1; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java b/src/Java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java deleted file mode 100644 index 5100ed31c5..0000000000 --- a/src/Java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.australia.item; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import gtPlusPlus.australia.dimension.Dimension_Australia; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class ItemAustraliaPortalTrigger extends Item { - public ItemAustraliaPortalTrigger() { - super(); - this.maxStackSize = 1; - setMaxDamage(64); - setCreativeTab(CreativeTabs.tabTools); - this.setTextureName(CORE.MODID + ":" + "itemAlkalusDisk"); - } - - @Override - public Item setMaxStackSize(int int1) { - return super.setMaxStackSize(1); - } - - @Override - public EnumRarity getRarity(ItemStack thisItem) { - return EnumRarity.rare; - } - - @Override - public boolean hasEffect(ItemStack par1ItemStack, int pass) { - return false; - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return EnumChatFormatting.GOLD+"Alkalus ROM ["+EnumChatFormatting.RED+"Activated"+EnumChatFormatting.GOLD+"]"; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GREEN+"Shows a glipse of the past."); - list.add(EnumChatFormatting.GREEN+"This item produces such a temperature, that you'd hate to use it incorrectly."); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - return Utils.rgbtoHexValue(128, 192, 64); - } - - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, - float par8, float par9, float par10) { - if (par7 == 0) { - par5--; - } - if (par7 == 1) { - par5++; - } - if (par7 == 2) { - par6--; - } - if (par7 == 3) { - par6++; - } - if (par7 == 4) { - par4--; - } - if (par7 == 5) { - par4++; - } - if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { - return false; - } - Block i1 = par3World.getBlock(par4, par5, par6); - if (i1 == Blocks.air) { - par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - if (Dimension_Australia.portalBlock.tryToCreatePortal(par3World, par4, par5, par6)){ - //Make a Portal - } - else { - if (!par3World.isRemote){ - par3World.setBlock(par4, par5, par6, ModBlocks.blockHellfire, 0, 3); - } - } - } - par1ItemStack.damageItem(1, par2EntityPlayer); - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/item/ItemBlockAustralia.java b/src/Java/gtPlusPlus/australia/item/ItemBlockAustralia.java deleted file mode 100644 index 9854f9fa6a..0000000000 --- a/src/Java/gtPlusPlus/australia/item/ItemBlockAustralia.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.australia.item; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.interfaces.ITileTooltip; - -public class ItemBlockAustralia extends ItemBlock { - - protected final int mID; - - public ItemBlockAustralia(final Block block) { - super(block); - this.mID = ((ITileTooltip) block).getTooltipID(); - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.mID == 0){ //blockDarkWorldPortalFrame - list.add("Use this to access Australia."); - list.add("Assembled in the same shape as the Nether Portal."); - } - else if (this.mID == 1){ //blockDarkWorldPortal - list.add("Place this if you are lazy to create the portal structure, slacker."); - } - else if (this.mID == 2){ //blockDarkWorldGround - list.add("Pure Australian Outback."); - } - else if (this.mID == 3){ //blockDarkWorldPollutedDirt - list.add("Maybe you can do something with this?."); - } - } - - -} diff --git a/src/Java/gtPlusPlus/australia/world/AustraliaPortalPosition.java b/src/Java/gtPlusPlus/australia/world/AustraliaPortalPosition.java deleted file mode 100644 index 865c0c3bb2..0000000000 --- a/src/Java/gtPlusPlus/australia/world/AustraliaPortalPosition.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.australia.world; - -import net.minecraft.util.ChunkCoordinates; - -public class AustraliaPortalPosition extends ChunkCoordinates { - public long field_85087_d; - final AustraliaTeleporterDimensionMod field_85088_e; - - public AustraliaPortalPosition(AustraliaTeleporterDimensionMod gladesTeleporter, int par2, int par3, int par4, long par5) { - super(par2, par3, par4); - this.field_85088_e = gladesTeleporter; - this.field_85087_d = par5; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java b/src/Java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java deleted file mode 100644 index 4ad693263e..0000000000 --- a/src/Java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java +++ /dev/null @@ -1,470 +0,0 @@ -package gtPlusPlus.australia.world; - -import java.util.*; - -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.util.*; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.Teleporter; -import net.minecraft.world.WorldServer; -import gtPlusPlus.australia.dimension.Dimension_Australia; - -public class AustraliaTeleporterDimensionMod extends Teleporter { - - private final WorldServer worldServerInstance; - /** - * A private Random() function in Teleporter - */ - private final Random random; - /** - * Stores successful portal placement locations for rapid lookup. - */ - private final LongHashMap destinationCoordinateCache = new LongHashMap(); - /** - * A list of valid keys for the destinationCoordainteCache. These are - * based on the X & Z of the players initial location. - */ - @SuppressWarnings("rawtypes") - private final List destinationCoordinateKeys = new ArrayList(); - - public AustraliaTeleporterDimensionMod(WorldServer par1WorldServer) { - super(par1WorldServer); - this.worldServerInstance = par1WorldServer; - this.random = new Random(par1WorldServer.getSeed()); - } - - /** - * Place an entity in a nearby portal, creating one if necessary. - */ - @Override - public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { - if (this.worldServerInstance.provider.dimensionId != 1) { - if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { - this.makePortal(par1Entity); - this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); - } - } - else { - int i = MathHelper.floor_double(par1Entity.posX); - int j = MathHelper.floor_double(par1Entity.posY) - 1; - int k = MathHelper.floor_double(par1Entity.posZ); - byte b0 = 1; - byte b1 = 0; - - for (int l = -2; l <= 2; ++l) { - for (int i1 = -2; i1 <= 2; ++i1) { - for (int j1 = -1; j1 < 3; ++j1) { - int k1 = i + i1 * b0 + l * b1; - int l1 = j + j1; - int i2 = k + i1 * b1 - l * b0; - boolean flag = j1 < 0; - this.worldServerInstance.setBlock(k1, l1, i2, flag ? Dimension_Australia.blockPortalFrame : Blocks.air); - } - } - } - - par1Entity.setLocationAndAngles(i, j, k, par1Entity.rotationYaw, 0.0F); - par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; - } - } - - /** - * Place an entity in a nearby portal which already exists. - */ - @Override - public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { - short short1 = 128; - double d3 = -1.0D; - int i = 0; - int j = 0; - int k = 0; - int l = MathHelper.floor_double(par1Entity.posX); - int i1 = MathHelper.floor_double(par1Entity.posZ); - long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1); - boolean flag = true; - double d7; - int l3; - - if (this.destinationCoordinateCache.containsItem(j1)) { - Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache - .getValueByKey(j1); - d3 = 0.0D; - i = portalposition.posX; - j = portalposition.posY; - k = portalposition.posZ; - portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); - flag = false; - } - else { - for (l3 = l - short1; l3 <= l + short1; ++l3) { - double d4 = l3 + 0.5D - par1Entity.posX; - - for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) { - double d5 = l1 + 0.5D - par1Entity.posZ; - - for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) { - if (this.worldServerInstance.getBlock(l3, i2, l1) == Dimension_Australia.portalBlock) { - while (this.worldServerInstance.getBlock(l3, i2 - 1, l1) == Dimension_Australia.portalBlock) { - --i2; - } - - d7 = i2 + 0.5D - par1Entity.posY; - double d8 = d4 * d4 + d7 * d7 + d5 * d5; - - if (d3 < 0.0D || d8 < d3) { - d3 = d8; - i = l3; - j = i2; - k = l1; - } - } - } - } - } - } - - if (d3 >= 0.0D) { - if (flag) { - this.destinationCoordinateCache.add(j1, - new Teleporter.PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); - this.destinationCoordinateKeys.add(Long.valueOf(j1)); - } - - double d11 = i + 0.5D; - double d6 = j + 0.5D; - d7 = k + 0.5D; - int i4 = -1; - - if (this.worldServerInstance.getBlock(i - 1, j, k) == Dimension_Australia.portalBlock) { - i4 = 2; - } - - if (this.worldServerInstance.getBlock(i + 1, j, k) == Dimension_Australia.portalBlock) { - i4 = 0; - } - - if (this.worldServerInstance.getBlock(i, j, k - 1) == Dimension_Australia.portalBlock) { - i4 = 3; - } - - if (this.worldServerInstance.getBlock(i, j, k + 1) == Dimension_Australia.portalBlock) { - i4 = 1; - } - - int j2 = par1Entity.getTeleportDirection(); - - if (i4 > -1) { - int k2 = Direction.rotateLeft[i4]; - int l2 = Direction.offsetX[i4]; - int i3 = Direction.offsetZ[i4]; - int j3 = Direction.offsetX[k2]; - int k3 = Direction.offsetZ[k2]; - boolean flag1 = !this.worldServerInstance.isAirBlock(i + l2 + j3, j, k + i3 + k3) - || !this.worldServerInstance.isAirBlock(i + l2 + j3, j + 1, k + i3 + k3); - boolean flag2 = !this.worldServerInstance.isAirBlock(i + l2, j, k + i3) - || !this.worldServerInstance.isAirBlock(i + l2, j + 1, k + i3); - - if (flag1 && flag2) { - i4 = Direction.rotateOpposite[i4]; - k2 = Direction.rotateOpposite[k2]; - l2 = Direction.offsetX[i4]; - i3 = Direction.offsetZ[i4]; - j3 = Direction.offsetX[k2]; - k3 = Direction.offsetZ[k2]; - l3 = i - j3; - d11 -= j3; - int k1 = k - k3; - d7 -= k3; - flag1 = !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j, k1 + i3 + k3) - || !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j + 1, k1 + i3 + k3); - flag2 = !this.worldServerInstance.isAirBlock(l3 + l2, j, k1 + i3) - || !this.worldServerInstance.isAirBlock(l3 + l2, j + 1, k1 + i3); - } - - float f1 = 0.5F; - float f2 = 0.5F; - - if (!flag1 && flag2) { - f1 = 1.0F; - } - else if (flag1 && !flag2) { - f1 = 0.0F; - } - else if (flag1 && flag2) { - f2 = 0.0F; - } - - d11 += j3 * f1 + f2 * l2; - d7 += k3 * f1 + f2 * i3; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - - if (i4 == j2) { - f3 = 1.0F; - f4 = 1.0F; - } - else if (i4 == Direction.rotateOpposite[j2]) { - f3 = -1.0F; - f4 = -1.0F; - } - else if (i4 == Direction.rotateRight[j2]) { - f5 = 1.0F; - f6 = -1.0F; - } - else { - f5 = -1.0F; - f6 = 1.0F; - } - - double d9 = par1Entity.motionX; - double d10 = par1Entity.motionZ; - par1Entity.motionX = d9 * f3 + d10 * f6; - par1Entity.motionZ = d9 * f5 + d10 * f4; - par1Entity.rotationYaw = par8 - j2 * 90 + i4 * 90; - } - else { - par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; - } - - par1Entity.setLocationAndAngles(d11, d6, d7, par1Entity.rotationYaw, par1Entity.rotationPitch); - return true; - } - else { - return false; - } - } - - @Override - public boolean makePortal(Entity par1Entity) { - byte b0 = 16; - double d0 = -1.0D; - int i = MathHelper.floor_double(par1Entity.posX); - int j = MathHelper.floor_double(par1Entity.posY); - int k = MathHelper.floor_double(par1Entity.posZ); - int l = i; - int i1 = j; - int j1 = k; - int k1 = 0; - int l1 = this.random.nextInt(4); - int i2; - double d1; - double d2; - int k2; - int i3; - int k3; - int j3; - int i4; - int l3; - int k4; - int j4; - int i5; - int l4; - double d3; - double d4; - - for (i2 = i - b0; i2 <= i + b0; ++i2) { - d1 = i2 + 0.5D - par1Entity.posX; - - for (k2 = k - b0; k2 <= k + b0; ++k2) { - d2 = k2 + 0.5D - par1Entity.posZ; - label274: - - for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { - if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { - while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { - --i3; - } - - for (j3 = l1; j3 < l1 + 4; ++j3) { - k3 = j3 % 2; - l3 = 1 - k3; - - if (j3 % 4 >= 2) { - k3 = -k3; - l3 = -l3; - } - - for (i4 = 0; i4 < 3; ++i4) { - for (j4 = 0; j4 < 4; ++j4) { - for (k4 = -1; k4 < 4; ++k4) { - l4 = i2 + (j4 - 1) * k3 + i4 * l3; - i5 = i3 + k4; - int j5 = k2 + (j4 - 1) * l3 - i4 * k3; - - if (k4 < 0 - && !this.worldServerInstance.getBlock(l4, i5, j5).getMaterial() - .isSolid() - || k4 >= 0 && !this.worldServerInstance.isAirBlock(l4, i5, j5)) { - continue label274; - } - } - } - } - - d4 = i3 + 0.5D - par1Entity.posY; - d3 = d1 * d1 + d4 * d4 + d2 * d2; - - if (d0 < 0.0D || d3 < d0) { - d0 = d3; - l = i2; - i1 = i3; - j1 = k2; - k1 = j3 % 4; - } - } - } - } - } - } - - if (d0 < 0.0D) { - for (i2 = i - b0; i2 <= i + b0; ++i2) { - d1 = i2 + 0.5D - par1Entity.posX; - - for (k2 = k - b0; k2 <= k + b0; ++k2) { - d2 = k2 + 0.5D - par1Entity.posZ; - label222: - - for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { - if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { - while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { - --i3; - } - - for (j3 = l1; j3 < l1 + 2; ++j3) { - k3 = j3 % 2; - l3 = 1 - k3; - - for (i4 = 0; i4 < 4; ++i4) { - for (j4 = -1; j4 < 4; ++j4) { - k4 = i2 + (i4 - 1) * k3; - l4 = i3 + j4; - i5 = k2 + (i4 - 1) * l3; - - if (j4 < 0 - && !this.worldServerInstance.getBlock(k4, l4, i5).getMaterial() - .isSolid() - || j4 >= 0 && !this.worldServerInstance.isAirBlock(k4, l4, i5)) { - continue label222; - } - } - } - - d4 = i3 + 0.5D - par1Entity.posY; - d3 = d1 * d1 + d4 * d4 + d2 * d2; - - if (d0 < 0.0D || d3 < d0) { - d0 = d3; - l = i2; - i1 = i3; - j1 = k2; - k1 = j3 % 2; - } - } - } - } - } - } - } - - int k5 = l; - int j2 = i1; - k2 = j1; - int l5 = k1 % 2; - int l2 = 1 - l5; - - if (k1 % 4 >= 2) { - l5 = -l5; - l2 = -l2; - } - - boolean flag; - - if (d0 < 0.0D) { - if (i1 < 70) { - i1 = 70; - } - - if (i1 > this.worldServerInstance.getActualHeight() - 10) { - i1 = this.worldServerInstance.getActualHeight() - 10; - } - - j2 = i1; - - for (i3 = -1; i3 <= 1; ++i3) { - for (j3 = 1; j3 < 3; ++j3) { - for (k3 = -1; k3 < 3; ++k3) { - l3 = k5 + (j3 - 1) * l5 + i3 * l2; - i4 = j2 + k3; - j4 = k2 + (j3 - 1) * l2 - i3 * l5; - flag = k3 < 0; - this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Australia.blockPortalFrame : Blocks.air); - } - } - } - } - - for (i3 = 0; i3 < 4; ++i3) { - for (j3 = 0; j3 < 4; ++j3) { - for (k3 = -1; k3 < 4; ++k3) { - l3 = k5 + (j3 - 1) * l5; - i4 = j2 + k3; - j4 = k2 + (j3 - 1) * l2; - flag = j3 == 0 || j3 == 3 || k3 == -1 || k3 == 3; - this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Australia.blockPortalFrame : Dimension_Australia.portalBlock, 0, 2); - } - } - - for (j3 = 0; j3 < 4; ++j3) { - for (k3 = -1; k3 < 4; ++k3) { - l3 = k5 + (j3 - 1) * l5; - i4 = j2 + k3; - j4 = k2 + (j3 - 1) * l2; - this.worldServerInstance.notifyBlocksOfNeighborChange(l3, i4, j4, - this.worldServerInstance.getBlock(l3, i4, j4)); - } - } - } - - return true; - } - - /** - * called periodically to remove out-of-date portal locations from the - * cache list. Argument par1 is a WorldServer.getTotalWorldTime() value. - */ - @Override - public void removeStalePortalLocations(long par1) { - if (par1 % 100L == 0L) { - @SuppressWarnings("rawtypes") - Iterator iterator = this.destinationCoordinateKeys.iterator(); - long j = par1 - 600L; - - while (iterator.hasNext()) { - Long olong = (Long) iterator.next(); - Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache - .getValueByKey(olong.longValue()); - - if (portalposition == null || portalposition.lastUpdateTime < j) { - iterator.remove(); - this.destinationCoordinateCache.remove(olong.longValue()); - } - } - } - } - - public class PortalPosition extends ChunkCoordinates { - /** - * The worldtime at which this PortalPosition was last verified - */ - public long lastUpdateTime; - - public PortalPosition(int par2, int par3, int par4, long par5) { - super(par2, par3, par4); - this.lastUpdateTime = par5; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java b/src/Java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java deleted file mode 100644 index f0bd35a8b9..0000000000 --- a/src/Java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java +++ /dev/null @@ -1,257 +0,0 @@ -package gtPlusPlus.australia.world; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.crash.CrashReport; -import net.minecraft.crash.CrashReportCategory; -import net.minecraft.util.ReportedException; -import net.minecraft.world.ChunkPosition; -import net.minecraft.world.World; -import net.minecraft.world.WorldType; -import net.minecraft.world.biome.BiomeCache; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.WorldChunkManager; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.IntCache; -import gtPlusPlus.australia.biome.GenLayerAustralia; - -public class AustraliaWorldChunkManager extends WorldChunkManager { - - private GenLayer genBiomes; - /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */ - private GenLayer biomeIndexLayer; - /** The BiomeCache object for this world. */ - private BiomeCache biomeCache; - /** A list of biomes that the player can spawn in. */ - private List biomesToSpawnIn; - - @SuppressWarnings({ "rawtypes" }) - public AustraliaWorldChunkManager() { - this.biomeCache = new BiomeCache(this); - this.biomesToSpawnIn = new ArrayList(); - this.biomesToSpawnIn.addAll(allowedBiomes); // TODO - } - - public AustraliaWorldChunkManager(long seed, WorldType worldType) { - this(); - // i changed this to my GenLayerDarkWorld - GenLayer[] agenlayer = GenLayerAustralia.makeTheWorld(seed, worldType); - - agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer); - this.genBiomes = agenlayer[0]; - this.biomeIndexLayer = agenlayer[1]; - - - - } - - public AustraliaWorldChunkManager(World world) { - this(world.getSeed(), world.getWorldInfo().getTerrainType()); - - } - - /** - * Gets the list of valid biomes for the player to spawn in. - */ - @Override - public List getBiomesToSpawnIn() { - return this.biomesToSpawnIn; - } - - /** - * Returns a list of rainfall values for the specified blocks. Args: - * listToReuse, x, z, width, length. - */ - @Override - public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) { - IntCache.resetIntCache(); - - if ((listToReuse == null) || (listToReuse.length < width * length)) { - listToReuse = new float[width * length]; - } - int[] aint = this.biomeIndexLayer.getInts(x, z, width, length); - for (int i1 = 0; i1 < width * length; i1++) { - try - { - float f = BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F; - if (f > 1.0F) { - f = 1.0F; - } - listToReuse[i1] = f; - } - catch (Throwable throwable) - { - CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); - CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock"); - crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1)); - crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length)); - crashreportcategory.addCrashSection("x", Integer.valueOf(x)); - crashreportcategory.addCrashSection("z", Integer.valueOf(z)); - crashreportcategory.addCrashSection("w", Integer.valueOf(width)); - crashreportcategory.addCrashSection("h", Integer.valueOf(length)); - throw new ReportedException(crashreport); - } - } - return listToReuse; - } - - /** - * Return an adjusted version of a given temperature based on the y - * height - */ - @Override - @SideOnly(Side.CLIENT) - public float getTemperatureAtHeight(float par1, int par2) { - return par1; - } - - /** - * Returns an array of biomes for the location input. - */ - @Override - public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { - IntCache.resetIntCache(); - - if ((par1ArrayOfBiomeGenBase == null) || (par1ArrayOfBiomeGenBase.length < par4 * par5)) { - par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; - } - int[] aint = this.genBiomes.getInts(par2, par3, par4, par5); - try - { - for (int i = 0; i < par4 * par5; i++) { - par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]); - } - return par1ArrayOfBiomeGenBase; - } - catch (Throwable throwable) - { - CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); - CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock"); - crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length)); - crashreportcategory.addCrashSection("x", Integer.valueOf(par2)); - crashreportcategory.addCrashSection("z", Integer.valueOf(par3)); - crashreportcategory.addCrashSection("w", Integer.valueOf(par4)); - crashreportcategory.addCrashSection("h", Integer.valueOf(par5)); - throw new ReportedException(crashreport); - } - - } - - /** - * Returns biomes to use for the blocks and loads the other data like - * temperature and humidity onto the WorldChunkManager Args: - * oldBiomeList, x, z, width, depth - */ - @Override - public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth) { - return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true); - } - - /** - * Return a list of biomes for the specified blocks. Args: listToReuse, - * x, y, width, length, cacheFlag (if false, don't check biomeCache to - * avoid infinite loop in BiomeCacheBlock) - */ - @Override - public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag) { - IntCache.resetIntCache(); - if ((listToReuse == null) || (listToReuse.length < width * length)) { - listToReuse = new BiomeGenBase[width * length]; - } - if ((cacheFlag) && (width == 16) && (length == 16) && ((x & 0xF) == 0) && ((y & 0xF) == 0)) - { - BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y); - System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length); - return listToReuse; - } - int[] aint = this.biomeIndexLayer.getInts(x, y, width, length); - for (int i = 0; i < width * length; i++) { - listToReuse[i] = BiomeGenBase.getBiome(aint[i]); - } - return listToReuse; - } - - /** - * checks given Chunk's Biomes against List of allowed ones - */ - @Override - @SuppressWarnings("rawtypes") - public boolean areBiomesViable(int x, int y, int z, List par4List) { - IntCache.resetIntCache(); - int l = x - z >> 2; - int i1 = y - z >> 2; - int j1 = x + z >> 2; - int k1 = y + z >> 2; - int l1 = j1 - l + 1; - int i2 = k1 - i1 + 1; - int[] aint = this.genBiomes.getInts(l, i1, l1, i2); - try - { - for (int j2 = 0; j2 < l1 * i2; j2++) - { - BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]); - if (!par4List.contains(biomegenbase)) { - return false; - } - } - return true; - } - catch (Throwable throwable) - { - CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); - CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer"); - crashreportcategory.addCrashSection("Layer", this.genBiomes.toString()); - crashreportcategory.addCrashSection("x", Integer.valueOf(x)); - crashreportcategory.addCrashSection("z", Integer.valueOf(y)); - crashreportcategory.addCrashSection("radius", Integer.valueOf(z)); - crashreportcategory.addCrashSection("allowed", par4List); - throw new ReportedException(crashreport); - } - } - - /** - * Finds a valid position within a range, that is in one of the listed - * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive - * y positions. - */ - @Override - @SuppressWarnings("rawtypes") - public ChunkPosition findBiomePosition(int p_150795_1_, int p_150795_2_, int p_150795_3_, List p_150795_4_, Random p_150795_5_) { - IntCache.resetIntCache(); - int l = p_150795_1_ - p_150795_3_ >> 2; - int i1 = p_150795_2_ - p_150795_3_ >> 2; - int j1 = p_150795_1_ + p_150795_3_ >> 2; - int k1 = p_150795_2_ + p_150795_3_ >> 2; - int l1 = j1 - l + 1; - int i2 = k1 - i1 + 1; - int[] aint = this.genBiomes.getInts(l, i1, l1, i2); - ChunkPosition chunkposition = null; - int j2 = 0; - for (int k2 = 0; k2 < l1 * i2; k2++) - { - int l2 = l + k2 % l1 << 2; - int i3 = i1 + k2 / l1 << 2; - BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]); - if ((p_150795_4_.contains(biomegenbase)) && ((chunkposition == null) || (p_150795_5_.nextInt(j2 + 1) == 0))) - { - chunkposition = new ChunkPosition(l2, 0, i3); - j2++; - } - } - return chunkposition; - } - - /** - * Calls the WorldChunkManager's biomeCache.cleanupCache() - */ - @Override - public void cleanupCache() { - this.biomeCache.cleanupCache(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java b/src/Java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java deleted file mode 100644 index 93112bb30f..0000000000 --- a/src/Java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java +++ /dev/null @@ -1,142 +0,0 @@ -package gtPlusPlus.australia.world; - -import cpw.mods.fml.common.IWorldGenerator; -import gtPlusPlus.api.interfaces.IGeneratorWorld; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.australia.GTplusplus_Australia; -import gtPlusPlus.australia.gen.map.MapGenExtendedVillage; -import gtPlusPlus.australia.gen.map.component.ComponentHut.WorldHandlerHut; -import gtPlusPlus.australia.gen.map.component.ComponentShack.WorldHandlerShack; -import gtPlusPlus.core.lib.CORE; - -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.Random; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.IChunkProvider; - -public class AustraliaWorldGenerator implements IWorldGenerator { - private LinkedList structuresList = new LinkedList(); - //private final WorldHandlerCoven covenGen; - //private final WorldHandlerWickerMan wickerManGen; - private final WorldHandlerShack shackGen; - private final WorldHandlerHut hutGen; - private final List generators; - private int midX; - private int midZ; - int field_82665_g; - int field_82666_h = 8; - - public static final AutoMap SHACK_ALLOWED_BIOMES = new AutoMap(); - public static final AutoMap HUT_ALLOWED_BIOMES = new AutoMap(); - public static final AutoMap ALLOWED_BIOMES = new AutoMap(); - - public AustraliaWorldGenerator() { - - SHACK_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Plains_Biome.biomeID); - SHACK_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Forest_Biome.biomeID); - HUT_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Desert_Biome_3.biomeID); - HUT_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Outback_Biome.biomeID); - - ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Plains_Biome.biomeID); - ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Forest_Biome.biomeID); - ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Desert_Biome_3.biomeID); - ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Outback_Biome.biomeID); - - - this.shackGen = new WorldHandlerShack(3); - this.hutGen = new WorldHandlerHut(5); - - //IGeneratorWorld goblinHut = new WorldHandlerClonedStructure(ComponentGoblinHut.class, 1.0D, 400, 7, 7, 7); - this.generators = Arrays - .asList(new IGeneratorWorld[] { this.shackGen, this.hutGen }); - - this.field_82665_g = (8 + Math.max(gtPlusPlus.core.util.math.MathUtils.randInt(/*Config.instance().worldGenFrequency*/32, 64), 1)); - - this.midX = 0; - this.midZ = 0; - for (IGeneratorWorld gen : this.generators) { - this.midX = Math.max(this.midX, gen.getExtentX() / 2); - this.midZ = Math.max(this.midZ, gen.getExtentZ() / 2); - } - } - - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, - IChunkProvider chunkProvider) { - if (world.provider.dimensionId == CORE.AUSTRALIA_ID) { - generateOverworld(world, world.rand, chunkX * 16, chunkZ * 16); - } - } - - private void generateOverworld(World world, Random random, int x, int z) { - boolean gen = false; - try { - if (ALLOWED_BIOMES.containsValue(Integer.valueOf(world.getBiomeGenForCoords(x + this.midX, z + this.midZ).biomeID))) { - Collections.shuffle(this.generators, random); - for (IGeneratorWorld generator : this.generators) { - boolean canGenerate = false; - - if (generator instanceof WorldHandlerShack) { - if (SHACK_ALLOWED_BIOMES.containsValue(Integer.valueOf(world.getBiomeGenForCoords(x + this.midX, z + this.midZ).biomeID))) { - canGenerate = true; - } - } - else if (generator instanceof WorldHandlerHut) { - if (HUT_ALLOWED_BIOMES.containsValue(Integer.valueOf(world.getBiomeGenForCoords(x + this.midX, z + this.midZ).biomeID))) { - canGenerate = true; - } - } - - if (canGenerate) { - //Logger.WORLD("Running World Generator on Australia."); - boolean a1, a2; - a1 = generator.generate(world, random, x, z); - a2 = nonInRange(world, x, z, generator.getRange()); - //Logger.INFO("A1: "+a1+" | A2: "+a2); - if (a1 && a2) { - this.structuresList.add(new ChunkCoordIntPair(x, z)); - gen = true; - //Logger.INFO("Generated a structure"); - break; - } - } - } - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - protected boolean nonInRange(World worldObj, int x, int z, int range) { - int par1 = x / 16; - int par2 = z / 16; - - int k = par1; - int l = par2; - if (par1 < 0) { - par1 -= this.field_82665_g - 1; - } - if (par2 < 0) { - par2 -= this.field_82665_g - 1; - } - int i1 = par1 / this.field_82665_g; - int j1 = par2 / this.field_82665_g; - Random random = worldObj.setRandomSeed(i1, j1, 10387312); - i1 *= this.field_82665_g; - j1 *= this.field_82665_g; - i1 += random.nextInt(this.field_82665_g - this.field_82666_h); - j1 += random.nextInt(this.field_82665_g - this.field_82666_h); - - return (k == i1) && (l == j1); - } - - public void initiate() { - this.structuresList.clear(); - } -} diff --git a/src/Java/gtPlusPlus/australia/world/AustraliaWorldProvider.java b/src/Java/gtPlusPlus/australia/world/AustraliaWorldProvider.java deleted file mode 100644 index af1ca90cc9..0000000000 --- a/src/Java/gtPlusPlus/australia/world/AustraliaWorldProvider.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.australia.world; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.util.Vec3; -import net.minecraft.world.WorldProvider; -import net.minecraft.world.WorldType; -import net.minecraft.world.chunk.IChunkProvider; -import gtPlusPlus.australia.chunk.ChunkProviderAustralia; -import gtPlusPlus.australia.dimension.Dimension_Australia; - -public class AustraliaWorldProvider extends WorldProvider { - - @Override - public void registerWorldChunkManager() { - this.worldChunkMgr = new AustraliaWorldChunkManager(this.worldObj.getSeed(), WorldType.LARGE_BIOMES); - this.isHellWorld = false; - this.hasNoSky = false; - this.dimensionId = Dimension_Australia.DIMID; - } - - @Override - public float getSunBrightness(float par1) { - return (par1*2F); - } - - @Override - public float getStarBrightness(float par1) { - return (par1*5F); - } - - @SideOnly(Side.CLIENT) - public Vec3 getFogColor(float par1, float par2) - { - return Vec3.createVectorHelper(0.8D, 0.8D, 0.8D); - } - - @Override - public IChunkProvider createChunkGenerator() { - return new ChunkProviderAustralia(this.worldObj, this.worldObj.getSeed() - 15726L); - } - - public boolean isSurfaceWorld() - { - return true; - } - - public boolean canCoordinateBeSpawn(int par1, int par2) - { - return false; - } - - public boolean canRespawnHere() - { - return true; - } - - @SideOnly(Side.CLIENT) - public boolean doesXZShowFog(int par1, int par2) - { - return false; - } - - public String getDimensionName() - { - return "Australia"; - } - - protected void generateLightBrightnessTable() - { - float f = 0.5F; - for (int i = 0; i <= 15; i++) - { - float f1 = 1.0F - i / 15.0F; - this.lightBrightnessTable[i] = ((1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/australia/world/AustraliaWorldType.java b/src/Java/gtPlusPlus/australia/world/AustraliaWorldType.java deleted file mode 100644 index e8c8af4f76..0000000000 --- a/src/Java/gtPlusPlus/australia/world/AustraliaWorldType.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.australia.world; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.minecraft.world.WorldType; - -public class AustraliaWorldType extends WorldType{ - - public AustraliaWorldType(String name) { - super(name); - } - - public AustraliaWorldType(int p_i1959_1_, String p_i1959_2_){ - this("test"); - try { - //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); - Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); - m.setAccessible(true); - m.invoke(this, p_i1959_1_, p_i1959_2_, 0); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public AustraliaWorldType(int p_i1960_1_, String p_i1960_2_, int p_i1960_3_){ - this("test2"); - try { - //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); - Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); - m.setAccessible(true); - m.invoke(this, p_i1960_1_, p_i1960_2_, p_i1960_3_); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - private WorldType getMC(){ - try { - Constructor c = WorldType.class.getDeclaredConstructor(); - c.setAccessible(true); // solution - return c.newInstance(); - - // production code should handle these exceptions more gracefully - } catch (InvocationTargetException x) { - x.printStackTrace(); - } catch (NoSuchMethodException x) { - x.printStackTrace(); - } catch (InstantiationException x) { - x.printStackTrace(); - } catch (IllegalAccessException x) { - x.printStackTrace(); - } - return null; - } -} - diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java deleted file mode 100644 index b51915bb7b..0000000000 --- a/src/Java/gtPlusPlus/core/block/ModBlocks.java +++ /dev/null @@ -1,162 +0,0 @@ -package gtPlusPlus.core.block; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.general.BlockCompressedObsidian; -import gtPlusPlus.core.block.general.BlockNet; -import gtPlusPlus.core.block.general.BlockTankXpConverter; -import gtPlusPlus.core.block.general.FirePit; -import gtPlusPlus.core.block.general.FluidTankInfinite; -import gtPlusPlus.core.block.general.HellFire; -import gtPlusPlus.core.block.general.LightGlass; -import gtPlusPlus.core.block.general.MiningExplosives; -import gtPlusPlus.core.block.general.PlayerDoors; -import gtPlusPlus.core.block.general.antigrief.BlockWitherProof; -import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneDetector; -import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneTest; -import gtPlusPlus.core.block.machine.*; -import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; -import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; -import gtPlusPlus.core.fluids.FluidRegistryHandler; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public final class ModBlocks { - - public static Block blockRoundRobinator; - public static Block blockCircuitProgrammer; - public static Block blockVolumetricFlaskSetter; - public static Block blockFakeMiningPipe; - public static Block blockFakeMiningHead; - - public static Block blockFishTrap; - public static Block blockWorkbench; - public static Block blockWorkbenchAdvanced; - public static Block blockDecayablesChest; - public static Block blockEggBox; - - //Blocks - //public static Block blockBloodSteel; - //public static Block blockStaballoy; - // WIP TODO public static Block blockToolBuilder; - public static Block blockGriefSaver; - - public static Block blockCasingsMisc; - public static Block blockCasings2Misc; - public static Block blockCasings3Misc; - public static Block blockCasings4Misc; - public static Block blockCasings5Misc; - public static Block blockCasingsTieredGTPP; - public static Block blockSpecialMultiCasings; - public static Block blockCustomMachineCasings; - - public static Block blockMetaTileEntity; - public static Block blockHeliumGenerator; - public static Block blockNHG; - public static Block blockCharger; - - public static Block MatterFabricatorEffectBlock; - - public static Fluid fluidSludge = new Fluid("fluid.sludge"); - public static Block blockFluidSludge; - - public static Block blockFirePit; - - public static Block blockOreFluorite; - - public static Block blockMiningExplosive; - - public static Block blockHellfire; - public static Block blockInfiniteFLuidTank; - public static Block blockProjectTable; - public static Block blockTradeTable; - public static Block blockModularTable; - - public static Block blockWitherGuard; - public static Block blockXpConverter; - public static Block blockCompressedObsidian; - public static Block blockNet; - - public static Block blockPlayerDoorWooden; - public static Block blockPlayerDoorIron; - public static Block blockPlayerDoorCustom_Glass; - public static Block blockPlayerDoorCustom_Ice; - public static Block blockPlayerDoorCustom_Cactus; - - public static Block blockCustomMobSpawner; - public static Block blockCustomSuperLight; - public static Block blockCustomJukebox; - - public static Block blockPooCollector; - - public static Block blockPestKiller; - - public static void init() { - Logger.INFO("Initializing Blocks."); - //blockGriefSaver = new TowerDevice().setBlockName("blockGriefSaver").setCreativeTab(AddToCreativeTab.tabBlock).setBlockTextureName("blockDefault"); - - registerBlocks(); - } - - public static void registerBlocks(){ - - Logger.INFO("Registering Blocks."); - MatterFabricatorEffectBlock = new LightGlass(false); - - //Fluids - FluidRegistryHandler.registerFluids(); - - //Workbench - blockWorkbench = new Machine_Workbench().setHardness(1.5F); - blockWorkbenchAdvanced = new Machine_WorkbenchAdvanced().setHardness(2.5F); - blockHeliumGenerator = new HeliumGenerator(); - blockFirePit = new FirePit(); - blockFishTrap = new FishTrap(); - blockInfiniteFLuidTank = new FluidTankInfinite(); - //blockOreFluorite = new BlockBaseOre.oldOreBlock("oreFluorite", "Fluorite", Material.rock, BlockTypes.ORE, Utils.rgbtoHexValue(120, 120, 30), 3); - blockMiningExplosive = new MiningExplosives(); - blockHellfire = new HellFire(); - blockProjectTable = new Machine_ProjectTable(); - blockTradeTable = new Machine_TradeTable(); - blockModularTable = new Machine_ModularityTable(); - blockWitherGuard = new BlockWitherProof(); - blockXpConverter = new BlockTankXpConverter(); - blockCompressedObsidian = new BlockCompressedObsidian(); - blockNet = new BlockNet(); - - blockFakeMiningPipe = new Mining_Pipe_Fake(); - blockFakeMiningHead = new Mining_Head_Fake(); - - blockCircuitProgrammer = new CircuitProgrammer(); - - blockDecayablesChest = new DecayablesChest(); - blockEggBox = new EggBox(); - - blockPlayerDoorWooden = new PlayerDoors(Material.wood, "door_wood", true); - blockPlayerDoorIron = new PlayerDoors(Material.iron, "door_iron", true); - blockPlayerDoorCustom_Glass = new PlayerDoors(Material.glass, "door_glass", false); - blockPlayerDoorCustom_Ice = new PlayerDoors(Material.ice, "door_ice", false); - blockPlayerDoorCustom_Cactus = new PlayerDoors(Material.cactus, "door_cactus", false, 0.6f, Block.soundTypeGrass, "Cactus"); - - //blockCustomSuperLight = new BlockSuperLight(); - blockCustomJukebox = new Machine_SuperJukebox(); - - blockPooCollector = new Machine_PooCollector(); - - blockPestKiller = new Machine_PestKiller(); - - blockRoundRobinator = new Machine_RoundRobinator(); - - if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { - blockVolumetricFlaskSetter = new VolumetricFlaskSetter(); - } - - new BlockGenericRedstoneDetector(); - new BlockGenericRedstoneTest(); - - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/base/AdvancedBlock.java b/src/Java/gtPlusPlus/core/block/base/AdvancedBlock.java deleted file mode 100644 index f63762a2d7..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/AdvancedBlock.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.block.base; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.core.lib.CORE; - -public class AdvancedBlock extends Block { - - protected AdvancedBlock(final String unlocalizedName, final Material material, final CreativeTabs x, final float blockHardness, final float blockResistance, final float blockLightLevel, - final String blockHarvestTool, final int blockHarvestLevel, final SoundType BlockSound) { - super(material); - this.setBlockName(unlocalizedName); - this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(x); - this.setHardness(blockHardness); //block Hardness - this.setResistance(blockResistance); - this.setLightLevel(blockLightLevel); - this.setHarvestLevel(blockHarvestTool, blockHarvestLevel); - this.setStepSound(BlockSound); - } - - @Override - public boolean onBlockActivated(final World p_149727_1_, final int p_149727_2_, final int p_149727_3_, final int p_149727_4_, final EntityPlayer p_149727_5_, final int p_149727_6_, final float p_149727_7_, final float p_149727_8_, final float p_149727_9_) - { - return false; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java deleted file mode 100644 index 6014388cda..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.core.block.base; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class BasicBlock extends BlockContainer { - - public BasicBlock(final String unlocalizedName, final Material material) { - this(BlockTypes.STANDARD, unlocalizedName, material, 2); - } - - public BasicBlock(final BlockTypes type, final String unlocalizedName, final Material material) { - this(type, unlocalizedName, material, 2); - } - - public BasicBlock(BlockTypes type, final String unlocalizedName, final Material material, final int harvestLevel) { - super(material); - this.setBlockName(Utils.sanitizeString(unlocalizedName)); - - if (type != BlockTypes.ORE && !unlocalizedName.toLowerCase().contains("ore")) { - this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); - } - - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setResistance(6.0F); - this.setLightLevel(0.0F); - this.setHardness(1.0f*harvestLevel); - this.setHarvestLevel("pickaxe", harvestLevel); - this.setStepSound(soundTypeMetal); - } - - - public static enum BlockTypes { - STANDARD("blockBlock", "pickaxe", soundTypeMetal), - FRAME("blockFrameGt", "wrench", soundTypeMetal), - ORE("blockStone", "pickaxe", soundTypeStone); - - private String TEXTURE_NAME; - private String HARVEST_TOOL; - private SoundType soundOfBlock; - private BlockTypes (final String textureName, final String harvestTool, final SoundType blockSound) - { - this.TEXTURE_NAME = textureName; - this.HARVEST_TOOL = harvestTool; - this.soundOfBlock = blockSound; - } - - public String getTexture() { - return this.TEXTURE_NAME; - } - - public String getHarvestTool(){ - return this.HARVEST_TOOL; - } - - public SoundType getBlockSoundType(){ - return this.soundOfBlock; - } - - } - - - @Override - public TileEntity createNewTileEntity(final World p_149915_1_, final int p_149915_2_) { - return null; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java b/src/Java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java deleted file mode 100644 index 2bfd09d848..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java +++ /dev/null @@ -1,328 +0,0 @@ -package gtPlusPlus.core.block.base; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.CubicObject; -import gtPlusPlus.api.objects.minecraft.SafeTexture; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.InventoryUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public abstract class BasicTileBlockWithTooltip extends BlockContainer implements ITileTooltip { - - /** - * Each mapped object holds the data for the six sides. - */ - @SideOnly(Side.CLIENT) - private AutoMap> mSidedTextureArray; - - /** - * Holds the data for the six sides, each side holds an array of data for each respective meta. - */ - @SideOnly(Side.CLIENT) - private AutoMap> mSidedTexturePathArray; - - /** - * Does this block have any meta at all? - * @return - */ - public final boolean hasMeta() { - return getMetaCount() > 0; - } - - /** - * The amount of meta this block has. - * @return - */ - public abstract int getMetaCount(); - - /** - * Does this {@link Block} require special {@link ItemBlock} handling? - * @return The {@link Class} that will be used for this {@link Block}. - */ - public Class getItemBlockClass() { - return ItemBlock.class; - } - - /** - * A lazy way to declare the unlocal name for the block, makes boilerplating easy. - * @return The internal name for this block. - */ - public abstract String getUnlocalBlockName(); - - /** - * Does this Block have {@link ITileTooltip} support? - * @return {@link boolean} that represents if this block supports {@link ITileTooltip} or not. - */ - public final boolean hasTooltip() { - return getTooltipID() >= -1; - } - - /** - * Lazy Boilerplating. - * @return Block Hardness. - */ - protected abstract float initBlockHardness(); - - /** - * Lazy Boilerplating. - * @return Block Resistance. - */ - protected abstract float initBlockResistance(); - - /** - * Lazy Boilerplating. - * @return The {@link CreativeTab} this Block is shown on. - */ - protected abstract CreativeTabs initCreativeTab(); - - /** - * The ID used by the {@link ITileTooltip} handler. Return -1 if you are not providing a custom {@link ItemBlock} in {@link #getItemBlockClass}(). - * @return - */ - @Override - public abstract int getTooltipID(); - - public BasicTileBlockWithTooltip(Material aBlockMat){ - super(aBlockMat); - //Use Abstract method values - this.setHardness(initBlockHardness()); - this.setResistance(initBlockResistance()); - this.setBlockName(getUnlocalBlockName()); - this.setCreativeTab(initCreativeTab()); - // Register the block last. - GameRegistry.registerBlock(this, getItemBlockClass(), getUnlocalBlockName()); - Logger.INFO("Registered "+getTileEntityName()+"."); - if (Utils.isClient()) { - // Handle Textures - handleTextures(); - } - } - - /** - * The name of the Tile Entity. - * @return - */ - protected abstract String getTileEntityName(); - - /** - * The String used for texture pathing. - * @return Sanitized {@link String}, containing no spaces or illegal characters. - */ - private final String getTileEntityNameForTexturePathing() { - return Utils.sanitizeString(getTileEntityName().replace(" ", "")); - } - - /** - * An array of CubicObjects, one for each meta, else just a single cell array. - * Expected to be null regularly, as the default texture handling should suffice. - * Handy if re-using textures or using a non-standard structure for them. FULL texture path must be used, - * inclusive of the MODID and a colon. - * @return - */ - public CubicObject[] getCustomTextureDirectoryObject(){ - return null; - } - - @Override - @SideOnly(Side.CLIENT) - public final IIcon getIcon(final int aSide, final int aMeta) { - return mSidedTextureArray.get(aMeta).get(aSide).getIcon(); - } - - @Override - public IIcon getIcon(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - return super.getIcon(aWorld, aX, aY, aZ, aSide); - } - - @SideOnly(Side.CLIENT) - private final void handleTextures() { - - Logger.INFO("[TeTexture] Building Texture Maps for "+getTileEntityName()+"."); - - // Init on the Client side only, to prevent Field initialisers existing in the Server side bytecode. - mSidedTextureArray = new AutoMap>(); - mSidedTexturePathArray = new AutoMap>(); - - - //Store them in forge order - //DOWN, UP, NORTH, SOUTH, WEST, EAST - - // Default Path Name, this will make us look inside 'miscutils\textures\blocks' - final String aPrefixTexPath = CORE.MODID + ":"; - // Default Path Name, this will make us look in the sub-directory for this Tile Entity. - final String aTexPathMid = "TileEntities"+CORE.SEPERATOR+getTileEntityNameForTexturePathing()+CORE.SEPERATOR; - // Construct a full path - String aTexPathBuilt = aPrefixTexPath + aTexPathMid; - // File Name Suffixes, without meta tags - String aStringBot; - String aStringTop; - String aStringBack; - String aStringFront; - String aStringLeft; - String aStringRight; - // Do we provide a matrix of custom data to be used for texture processing instead? - if (getCustomTextureDirectoryObject() != null) { - // Get custom provided texture data. - CubicObject[] aDataMap = getCustomTextureDirectoryObject(); - Logger.INFO("[TeTexture] Found custom texture data, using this instead. Size: "+aDataMap.length); - // Map each meta string data to the main map. - for (int i=0;i aMetaBlob = new CubicObject(aStringBot, aStringTop, aStringBack, aStringFront, aStringLeft, aStringRight); - mSidedTexturePathArray.put(aMetaBlob); - Logger.INFO("[TeTexture] Added Texture Path data to map for meta "+i); - } - } - Logger.INFO("[TeTexture] Map size for pathing: "+mSidedTexturePathArray.size()); - - // Iteration Index - int aIndex = 0; - - // Iterate each CubicObject, holding the six texture paths for each meta. - for (CubicObject aMetaBlob : mSidedTexturePathArray) { - // Make a Safe Texture for each side - SafeTexture aBottom = SafeTexture.register(aMetaBlob.DOWN); - SafeTexture aTop = SafeTexture.register(aMetaBlob.UP); - SafeTexture aBack = SafeTexture.register(aMetaBlob.NORTH); - SafeTexture aFont = SafeTexture.register(aMetaBlob.SOUTH); - SafeTexture aWest = SafeTexture.register(aMetaBlob.WEST); - SafeTexture aEast = SafeTexture.register(aMetaBlob.EAST); - // Store them in an Array - SafeTexture[] aInjectBlob = new SafeTexture[] { - aBottom, - aTop, - aBack, - aFont, - aWest, - aEast - }; - // Convenience Blob - CubicObject aMetaBlob2 = new CubicObject(aInjectBlob); - // Store this Blob into - mSidedTextureArray.put(aMetaBlob2); - Logger.INFO("[TeTexture] Added SafeTexture data to map for meta "+(aIndex++)); - } - Logger.INFO("[TeTexture] Map size for registration: "+mSidedTextureArray.size()); - - - } - - @Override - @SideOnly(Side.CLIENT) - public final void registerBlockIcons(final IIconRegister aRegisterer){ - this.blockIcon = aRegisterer.registerIcon(CORE.MODID + ":" + "net"); - } - - @Override - public abstract TileEntity createNewTileEntity(final World world, final int p_149915_2_); - - /** - * Called when {@link #breakBlock}() is called, but before {@link InventoryUtils#dropInventoryItems} and the super call. - */ - public void onBlockBreak() { - - } - - @Override - public final void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { - onBlockBreak(); - InventoryUtils.dropInventoryItems(world, x, y, z, block); - super.breakBlock(world, x, y, z, block, number); - } - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public final void getSubBlocks(Item aItem, CreativeTabs p_149666_2_, List aList) { - if (hasMeta()) { - for (int i=0;i getDrops(World world, int x, int y, int z, int metadata, int fortune){ - ArrayList drops = new ArrayList(); - drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); - return drops; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java deleted file mode 100644 index db37e18a32..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java +++ /dev/null @@ -1,103 +0,0 @@ -package gtPlusPlus.core.block.base; - -import java.util.Random; - -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import gtPlusPlus.core.client.renderer.particle.EntityDropParticleFX; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; - -public class BlockBaseFluid extends BlockFluidClassic { - - private final String name; - private final IIcon textureArray[] = new IIcon[6]; - - protected float particleRed = 1.0F; - protected float particleGreen = 1.0F; - protected float particleBlue = 1.0F; - - public BlockBaseFluid(String materialName, Fluid fluid, Material material) { - super(fluid, material); - this.setLightOpacity(2); - this.name = Utils.sanitizeString(materialName); - this.setBlockName("fluid"+this.name); - this.setCreativeTab(AddToCreativeTab.tabBlock); - GameRegistry.registerBlock(this, ItemBlockMeta.class, "fluid"+this.name); - } - - public BlockFluidClassic setParticleColor(int arg0) { - return this.setParticleColor((arg0 >> 16 & 255) / 255.0F, (arg0 >> 8 & 255) / 255.0F, - (arg0 >> 0 & 255) / 255.0F); - } - - public BlockFluidClassic setParticleColor(float arg0, float arg1, float arg2) { - this.particleRed = arg0; - this.particleGreen = arg1; - this.particleBlue = arg2; - return this; - } - - @Override - public boolean canCreatureSpawn(EnumCreatureType arg0, IBlockAccess arg1, int arg2, int arg3, int arg4) { - return false; - } - - public boolean preInit() { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) { - return side <= 1 ? this.textureArray[0] : this.textureArray[1]; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iicon) { - this.textureArray[0] = iicon.registerIcon(CORE.MODID + ":" + "fluid/" + "Fluid_" + this.name + "_Still"); - this.textureArray[1] = iicon.registerIcon(CORE.MODID + ":" + "fluid/" + "Fluid_" + this.name + "_Flow"); - //IconRegistry.addIcon("Fluid" + this.name, this.modName + ":fluid/Fluid_" + this.name + "_Still", arg0); - //IconRegistry.addIcon("Fluid" + this.name + "1", this.modName + ":fluid/Fluid_" + this.name + "_Flow", arg0); - } - - @Override - @Optional.Method(modid = "CoFHCore") - @SideOnly(Side.CLIENT) - public void randomDisplayTick(World arg0, int arg1, int arg2, int arg3, Random arg4) { - super.randomDisplayTick(arg0, arg1, arg2, arg3, arg4); - double arg5 = arg1 + arg4.nextFloat(); - double arg7 = arg2 - 1.05D; - double arg9 = arg3 + arg4.nextFloat(); - if (super.density < 0) { - arg7 = arg2 + 2.1D; - } - - if (arg4.nextInt(20) == 0 - && arg0.isSideSolid(arg1, arg2 + super.densityDir, arg3, - super.densityDir == -1 ? ForgeDirection.UP : ForgeDirection.DOWN) - && !arg0.getBlock(arg1, arg2 + 2 * super.densityDir, arg3).getMaterial().blocksMovement()) { - EntityDropParticleFX arg11 = new EntityDropParticleFX(arg0, arg5, arg7, arg9, this.particleRed, - this.particleGreen, this.particleBlue, super.densityDir); - FMLClientHandler.instance().getClient().effectRenderer.addEffect(arg11); - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java deleted file mode 100644 index c0113e869b..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java +++ /dev/null @@ -1,211 +0,0 @@ -package gtPlusPlus.core.block.base; - -import java.util.HashMap; -import java.util.Map; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.TextureSet; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock; -import gtPlusPlus.core.item.base.itemblock.ItemBlockGtFrameBox; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BlockBaseModular extends BasicBlock { - - protected Material blockMaterial; - - protected int blockColour; - protected BlockTypes thisBlock; - protected String thisBlockMaterial; - protected final String thisBlockType; - - public BlockBaseModular(final Material material, final BlockTypes blockType) { - this(material, blockType, material.getRgbAsHex()); - } - - public BlockBaseModular(final Material material, final BlockTypes blockType, final int colour) { - this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, - blockType, colour, Math.min(Math.max(material.vTier, 1), 6)); - blockMaterial = material; - registerComponent(); - } - - protected BlockBaseModular(final String unlocalizedName, final String blockMaterial, - final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, - final int miningLevel) { - super(blockType, unlocalizedName, vanillaMaterial, miningLevel); - this.setHarvestLevel(blockType.getHarvestTool(), miningLevel); - this.setBlockTextureName(CORE.MODID + ":" + blockType.getTexture()); - this.blockColour = colour; - this.thisBlock = blockType; - this.thisBlockMaterial = blockMaterial; - this.thisBlockType = blockType.name().toUpperCase(); - this.setBlockName(this.GetProperName()); - int fx = getBlockTypeMeta(); - if (fx == 0) { - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, - Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); - GT_OreDictUnificator.registerOre( - "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") - .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), - ItemUtils.getSimpleStack(this)); - } - else if (fx == 1) { - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, - Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); - GT_OreDictUnificator.registerOre( - "frameGt" + getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "") - .replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), - ItemUtils.getSimpleStack(this)); - } - else if (fx == 2) { - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, - Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); - GT_OreDictUnificator.registerOre( - "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") - .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), - ItemUtils.getSimpleStack(this)); - } - } - - public boolean registerComponent() { - Logger.MATERIALS("Attempting to register "+this.getUnlocalizedName()+"."); - if (this.blockMaterial == null) { - Logger.MATERIALS("Tried to register "+this.getUnlocalizedName()+" but the material was null."); - return false; - } - String aName = blockMaterial.getUnlocalizedName(); - //Register Component - Map aMap = Material.mComponentMap.get(aName); - if (aMap == null) { - aMap = new HashMap(); - } - int fx = getBlockTypeMeta(); - String aKey = (fx == 0 ? OrePrefixes.block.name() : ( fx == 1 ? OrePrefixes.frameGt.name() : OrePrefixes.ore.name())); - ItemStack x = aMap.get(aKey); - if (x == null) { - aMap.put(aKey, ItemUtils.getSimpleStack(this)); - Logger.MATERIALS("Registering a material component. Item: ["+aName+"] Map: ["+aKey+"]"); - Material.mComponentMap.put(aName, aMap); - return true; - } - else { - //Bad - Logger.MATERIALS("Tried to double register a material component."); - return false; - } - } - - public int getBlockTypeMeta() { - if (this.thisBlockType.equals(BlockTypes.STANDARD.name().toUpperCase())) { - return 0; - } - else if (this.thisBlockType.equals(BlockTypes.FRAME.name().toUpperCase())) { - return 1; - } - else if (this.thisBlockType.equals(BlockTypes.ORE.name().toUpperCase())) { - return 2; - } - return 0; - } - - /** - * Returns which pass should this block be rendered on. 0 for solids and 1 - * for alpha - */ - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - if (this.thisBlock == BlockTypes.FRAME) { - return 1; - } - return 0; - } - - public String GetProperName() { - String tempIngot; - if (this.thisBlock == BlockTypes.STANDARD) { - tempIngot = "Block of " + this.thisBlockMaterial; - } - else if (this.thisBlock == BlockTypes.FRAME) { - tempIngot = this.thisBlockMaterial + " Frame Box"; - } - else if (this.thisBlock == BlockTypes.ORE) { - tempIngot = this.thisBlockMaterial + " Ore [Old]"; - } - else { - - tempIngot = this.getUnlocalizedName().replace("tile.blockGt", "ingot"); - } - return tempIngot; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - public Material getMaterialEx(){ - return this.blockMaterial; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon) { - if (!CORE.ConfigSwitches.useGregtechTextures || this.blockMaterial == null || this.thisBlock == BlockTypes.ORE){ - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture()); - } - String metType = "9j4852jyo3rjmh3owlhw9oe"; - if (this.blockMaterial != null) { - TextureSet u = this.blockMaterial.getTextureSet(); - if (u != null) { - metType = u.mSetName; - } - } - metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType); - int tier = blockMaterial != null ? this.blockMaterial.vTier : 0; - String aType = (this.thisBlock == BlockTypes.FRAME) ? "frameGt" : (tier <= 4 ? "block1" : "block5"); - this.blockIcon = iIcon.registerIcon("gregtech" + ":" + "materialicons/"+ metType +"/" + aType); - } - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) { - - if (this.blockColour == 0) { - return MathUtils.generateSingularRandomHexValue(); - } - - return this.blockColour; - } - - @Override - public int getRenderColor(final int aMeta) { - if (this.blockColour == 0) { - return MathUtils.generateSingularRandomHexValue(); - } - - return this.blockColour; - } - - @Override - public int getBlockColor() { - if (this.blockColour == 0) { - return MathUtils.generateSingularRandomHexValue(); - } - - return this.blockColour; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseNBT.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseNBT.java deleted file mode 100644 index e4dff82ec4..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseNBT.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.core.block.base; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockNBT; - -public abstract class BlockBaseNBT extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public BlockBaseNBT(final Material material, final String unlocalName, final String displayName){ - super(material); - this.setBlockName(unlocalName); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockNBT.class, unlocalName); - //LanguageRegistry.addName(this, displayName); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_){ - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - public abstract TileEntity createNewTileEntity(final World world, final int p_149915_2_); - - @Override - public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int meta) { - super.breakBlock(world, x, y, z, block, meta); - } - - @Override - public void onBlockDestroyedByPlayer(final World world, final int x, final int y, final int z, final int meta) { - super.onBlockDestroyedByPlayer(world, x, y, z, meta); - } - - @Override - public void onBlockDestroyedByExplosion(final World world, final int x, final int y, final int z, final Explosion explosion) { - super.onBlockDestroyedByExplosion(world, x, y, z, explosion); - } - - @Override - public void onBlockHarvested(final World world, final int x, final int y, final int z, final int meta, final EntityPlayer player) { - super.onBlockHarvested(world, x, y, z, meta, player); - } - - @Override - public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion) { - super.onBlockExploded(world, x, y, z, explosion); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java deleted file mode 100644 index e1bc3462be..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ /dev/null @@ -1,229 +0,0 @@ -package gtPlusPlus.core.block.base; - -import java.lang.reflect.Field; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.interfaces.ITexturedBlock; -import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer; -import gtPlusPlus.core.item.base.itemblock.ItemBlockOre; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -public class BlockBaseOre extends BasicBlock implements ITexturedBlock { - - private final Material blockMaterial; - - public BlockBaseOre(final Material material, final BlockTypes blockType, final int colour) { - super(blockType, Utils.sanitizeString(material.getUnlocalizedName()), net.minecraft.block.material.Material.rock, Math.min(Math.max(material.vTier, 1), 6)); - int aMaterialTierForMining = Math.min(Math.max(material.vTier, 1), 6); - this.blockMaterial = material; - this.setHardness(1.0f*aMaterialTierForMining); - this.setResistance(6.0F); - this.setLightLevel(0.0F); - this.setHarvestLevel("pickaxe", aMaterialTierForMining); - this.setStepSound(soundTypeStone); - this.setBlockName("Ore"+Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName()))); - this.setBlockTextureName("stone"); - try { - GameRegistry.registerBlock(this, ItemBlockOre.class, Utils.sanitizeString("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()))); - GT_OreDictUnificator.registerOre("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()), ItemUtils.getSimpleStack(this)); - } - catch (Throwable t){ - t.printStackTrace(); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - public Material getMaterialEx(){ - return this.blockMaterial; - } - - @Override - public int getRenderType() { - try { - if (CustomOreBlockRenderer.INSTANCE != null){ - return CustomOreBlockRenderer.INSTANCE.mRenderID; - } - return super.getRenderType(); - } - catch (NullPointerException n) { - return 0; - } - } - - @Override - public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { - return Blocks.stone.getIcon(0, 0); - } - - @Override - public IIcon getIcon(int aSide, int aMeta) { - return Blocks.stone.getIcon(0, 0); - } - - /** - * GT Texture Handler - */ - - //.08 compat - public static IIconContainer[] hiddenTextureArray; - public ITexture[] getTexture(byte arg0) { - return getTexture(null, arg0); - } - - public ITexture[] getTexture(Block block, byte side) { - if (this.blockMaterial != null){ - GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); - if (aIconSet != null){ - return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; - } - } - - if (hiddenTextureArray == null){ - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - hiddenTextureArray = Textures.BlockIcons.GRANITES; - } - else { - try { - Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES"); - if (o != null){ - hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); - } - if (hiddenTextureArray == null){ - hiddenTextureArray = new IIconContainer[6]; - } - } - catch (IllegalArgumentException | IllegalAccessException e) { - hiddenTextureArray = new IIconContainer[6]; - } - } - } - return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; - } - - @Override - public void registerBlockIcons(IIconRegister p_149651_1_) { - - } - - public static class oldOreBlock extends BlockBaseModular implements ITexturedBlock{ - - public oldOreBlock(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) { - this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2); - } - - public oldOreBlock(final String unlocalizedName, final String blockMaterial, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) { - super(unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel); - } - - /*@Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon) - { - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture()); - //this.base = iIcon.registerIcon(CORE.MODID + ":" + "blockStone"); - //this.overlay = iIcon.registerIcon(CORE.MODID + ":" + "blockOre_Overlay"); - } - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - if (this.blockColour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.blockColour; - } - - @Override - public int getRenderColor(final int aMeta) { - if (this.blockColour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.blockColour; - }*/ - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public int getRenderType() { - if (CustomOreBlockRenderer.INSTANCE != null){ - return CustomOreBlockRenderer.INSTANCE.mRenderID; - } - return super.getRenderType(); - } - - @Override - public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { - return Blocks.stone.getIcon(0, 0); - } - - @Override - public IIcon getIcon(int aSide, int aMeta) { - return Blocks.stone.getIcon(0, 0); - } - - /** - * GT Texture Handler - */ - - //.08 compat - IIconContainer[] hiddenTextureArray; - public ITexture[] getTexture(byte arg0) { - return getTexture(null, arg0); - } - - public ITexture[] getTexture(Block block, byte side) { - if (this.blockMaterial != null){ - GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); - if (aIconSet != null){ - return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; - } - } - - if (hiddenTextureArray == null){ - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - hiddenTextureArray = Textures.BlockIcons.GRANITES; - } - else { - try { - Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES"); - if (o != null){ - hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); - } - if (hiddenTextureArray == null){ - hiddenTextureArray = new IIconContainer[6]; - } - } - catch (IllegalArgumentException | IllegalAccessException e) { - hiddenTextureArray = new IIconContainer[6]; - } - } - } - return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/block/base/MetaBlock.java b/src/Java/gtPlusPlus/core/block/base/MetaBlock.java deleted file mode 100644 index 880bb3a597..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/MetaBlock.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.core.block.base; - -import java.util.List; - -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; - -public class MetaBlock extends MultiTextureBlock { - - protected MetaBlock(final String unlocalizedName, final Material material, final SoundType soundType) { - super(unlocalizedName, material, soundType); - } - - @Override - public int damageDropped(final int meta) { - return meta; - } - - @Override - public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { - for (int i = 0; i < 6; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/base/MultiTextureBlock.java b/src/Java/gtPlusPlus/core/block/base/MultiTextureBlock.java deleted file mode 100644 index a04bf841ba..0000000000 --- a/src/Java/gtPlusPlus/core/block/base/MultiTextureBlock.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.block.base; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class MultiTextureBlock extends Block { - - public IIcon[] icons = new IIcon[6]; - - protected MultiTextureBlock(final String unlocalizedName, final Material material, final SoundType blockSound) - { - super(material); - this.setBlockName(unlocalizedName); - this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setHardness(2.0F); - this.setResistance(6.0F); - this.setStepSound(blockSound); - } - - @Override - public void registerBlockIcons(final IIconRegister reg) { - for (int i = 0; i < 6; i ++) { - this.icons[i] = reg.registerIcon(this.textureName + "_" + i); - } - } - - @Override - public IIcon getIcon(final int side, final int meta) { - return this.icons[side]; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java deleted file mode 100644 index 03ca846b7d..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java +++ /dev/null @@ -1,94 +0,0 @@ -package gtPlusPlus.core.block.general; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockObsidian; -import net.minecraft.block.material.MapColor; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; -import gtPlusPlus.core.lib.CORE; - -public class BlockCompressedObsidian extends BlockObsidian { - - private final IIcon textureArray[] = new IIcon[6]; - - public BlockCompressedObsidian() { - this.setBlockName("blockCompressedObsidian"); - this.setHardness(50.0F); - this.setResistance(2000.0F); - this.setStepSound(soundTypePiston); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockMeta.class, "blockCompressedObsidian"); - } - - @Override - public MapColor getMapColor(final int meta) { - if (meta != 5) { - return MapColor.obsidianColor; - } - else { - return MapColor.sandColor; - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iicon) { - this.textureArray[0] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian1"); - this.textureArray[1] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian2"); - this.textureArray[2] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian3"); - this.textureArray[3] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian4"); - this.textureArray[4] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian5"); - this.textureArray[5] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian_invert"); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int side, final int meta) { - return this.textureArray[meta]; - } - - @Override - public int damageDropped(final int damage) { - return damage; - } - - @Override - public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { - for (int i = 0; i < 6; i++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public Item getItemDropped(final int meta, final Random rand, final int fortune) { - return Item.getItemFromBlock(this); - } - - @Override - public ArrayList getDrops(final World world, final int x, final int y, final int z, final int metadata, - final int fortune) { - int m = metadata; - if (m == 5) { - m = 1; - } - return super.getDrops(world, x, y, z, m, fortune); - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/BlockNet.java b/src/Java/gtPlusPlus/core/block/general/BlockNet.java deleted file mode 100644 index 1f0f145392..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/BlockNet.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.block.general; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockWeb; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; - -public class BlockNet extends BlockWeb{ - - public BlockNet(){ - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setLightOpacity(1); - this.setHardness(4.0F); - this.setBlockName("blockNet"); - GameRegistry.registerBlock(this, "blockNet"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon){ - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "net"); - } - - @Override - public Item getItemDropped(final int p_149650_1_, final Random p_149650_2_, final int p_149650_3_){ - return ModItems.itemRope; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/general/BlockSuperLight.java b/src/Java/gtPlusPlus/core/block/general/BlockSuperLight.java deleted file mode 100644 index a1ba3be487..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/BlockSuperLight.java +++ /dev/null @@ -1,220 +0,0 @@ -package gtPlusPlus.core.block.general; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class BlockSuperLight extends BlockContainer { - - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - //propecia (Inhibit DHD - recover hair get depression) - - public BlockSuperLight() { - super(Material.circuits); - this.setBlockName("blockSuperLight"); - this.setCreativeTab(CreativeTabs.tabRedstone); - GameRegistry.registerBlock(this, "blockSuperLight"); - LanguageRegistry.addName(this, "Shining Star"); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { - return this.blockIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlBigBlue"); - } - - /** - * Returns a new instance of a block's tile entity class. Called on placing the - * block. - */ - public TileEntity createNewTileEntity(World aWorld, int p_149915_2_) { - return new TileEntitySuperLight(); - } - - public static class TileEntitySuperLight extends TileEntity { - - private long mCreated; - - private long mLastUpdateTick = 0; - - private int mLitBlockCount = 0; - - private int[][][][] aLitBlocks = new int[50][10][50][1]; - - private boolean mPowered = false; - - public TileEntitySuperLight() { - mCreated = System.currentTimeMillis(); - Logger.INFO("Created Super-Lamp"); - } - - public void readFromNBT(NBTTagCompound aNBT) { - super.readFromNBT(aNBT); - mCreated = aNBT.getLong("mCreated"); - mPowered = aNBT.getBoolean("mPowered"); - NBTTagCompound aLightingData = aNBT.getCompoundTag("lighting"); - for (int x = 0; x < 50; x++) { - for (int y = 0; y < 10; y++) { - for (int z = 0; z < 50; z++) { - int aData = aLightingData.getInteger("["+x+"]["+y+"]["+z+"]"); - aLitBlocks[x][y][z][0] = aData; - } - } - } - } - - public void writeToNBT(NBTTagCompound aNBT) { - super.writeToNBT(aNBT); - aNBT.setLong("mCreated", mCreated); - aNBT.setBoolean("mPowered", mPowered); - NBTTagCompound aLightingData = new NBTTagCompound(); - for (int x = 0; x < 50; x++) { - for (int y = 0; y < 10; y++) { - for (int z = 0; z < 50; z++) { - int aFlag = aLitBlocks[x][y][z][0]; - aLightingData.setInteger("["+x+"]["+y+"]["+z+"]", aFlag); - } - } - } - aNBT.setTag("lighting", aLightingData); - } - - @Override - public void updateEntity() { - super.updateEntity(); - - if (this.worldObj.isRemote) { - return; - } - - try { - if (mLastUpdateTick == 0 || (System.currentTimeMillis() - mLastUpdateTick) >= 30000) { - boolean powered = (this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord)); - boolean aLastState = mPowered; - //Logger.INFO("Powered: "+powered); - mPowered = powered; - if (mPowered != aLastState) { - updateLighting(powered); - } - } - } catch (Throwable t) { - } - } - - @Override - public void markDirty() { - super.markDirty(); - } - - @Override - public boolean canUpdate() { - return super.canUpdate(); - } - - public void updateLighting(boolean enable) { - - - mLastUpdateTick = System.currentTimeMillis(); - - if (false) { - return; - } - - aLitBlocks = new int[50][10][50][1]; - int aLitCounter = 0; - AutoMap aBlocksToUpdate = new AutoMap(); - Logger.INFO("Trying to relight area."); - - BlockPos aStartIterationPoint = new BlockPos(this.xCoord-24, this.yCoord-4, this.zCoord-24, this.worldObj); - for (int x = 0; x < 50; x++) { - for (int y = 0; y < 10; y++) { - for (int z = 0; z < 50; z++) { - int xOff = aStartIterationPoint.xPos + x; - int yOff = aStartIterationPoint.yPos + y; - int zOff = aStartIterationPoint.zPos + z; - Block aBlockGet = this.worldObj.getBlock(xOff, yOff, zOff); - if (aBlockGet != null) { - if (aBlockGet instanceof BlockAir || aBlockGet instanceof LightGlass) { - - int aLight = aBlockGet.getLightValue(); - - //Don't Need to relight anything. - if ((enable && aLight > 0) || (!enable && aLight == 0)) { - continue; - } - //Turning Lights on - else if (enable && aLight == 0) { - aBlocksToUpdate.put(new BlockPos(xOff, yOff, zOff, this.worldObj)); - if (aBlockGet instanceof BlockAir) { - Logger.INFO("Lit air."); - this.worldObj.setBlock(xOff, yOff, zOff, ModBlocks.MatterFabricatorEffectBlock, 0, 3); - } - //aBlockGet.setLightLevel(15); - aLitCounter++; - } - //Turning Lights off - else if (!enable && aLight > 0) { - aBlocksToUpdate.put(new BlockPos(xOff, yOff, zOff, this.worldObj)); - if (aBlockGet instanceof LightGlass) { - Logger.INFO("Dimmed air."); - this.worldObj.setBlock(xOff, yOff, zOff, Blocks.air, 0, 3); - } - //aBlockGet.setLightLevel(0); - } - aLitBlocks[x][y][z][0] = enable ? 15 : 0; - } - else { - aLitBlocks[x][y][z][0] = -1; - } - } - else { - aLitBlocks[x][y][z][0] = -1; - } - } - } - } - mLitBlockCount = aLitCounter; - doLargeBlockUpdate(aBlocksToUpdate); - } - - public void doLargeBlockUpdate(AutoMap aUpdateMap) { - if (aUpdateMap.isEmpty()) { - return; - } - for (BlockPos p : aUpdateMap) { - //this.worldObj.markBlockForUpdate(p.xPos, p.yPos, p.zPos); - //this.worldObj.markBlocksDirtyVertical(p_72975_1_, p_72975_2_, p_72975_3_, p_72975_4_); - } - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java b/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java deleted file mode 100644 index f7f0b446ce..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java +++ /dev/null @@ -1,192 +0,0 @@ -package gtPlusPlus.core.block.general; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockEntityBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class BlockTankXpConverter extends BlockContainer { - - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public BlockTankXpConverter() { - super(Material.iron); - this.setBlockName("blockTankXpConverter"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockEntityBase.class, "blockTankXpConverter"); - LanguageRegistry.addName(this, "Xp Converter"); - this.generateRainbowMap(); - if (!this.getTickRandomly()) { - this.setTickRandomly(true); - } - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { - return p_149691_1_ == 1 ? this.textureTop - : (p_149691_1_ == 0 ? this.textureBottom - : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, - final int side, final float lx, final float ly, final float lz) { - - return true; - - /* - if (world.isRemote) { - return true; - } - else { - boolean mDidScrewDriver = false; - // Check For Screwdriver - try { - final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); - final Item mHandItem = mHandStack.getItem(); - if (((mHandItem instanceof GT_MetaGenerated_Tool_01) - && ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { - final TileEntityXpConverter tile = (TileEntityXpConverter) world.getTileEntity(x, y, z); - if (tile != null) { - mDidScrewDriver = true; - tile.onScrewdriverRightClick((byte) side, player, x, y, z); - } - - } - } - catch (final Throwable t) { - mDidScrewDriver = false; - } - - if (!mDidScrewDriver) { - - try { - final TileEntityXpConverter tile = (TileEntityXpConverter) world.getTileEntity(x, y, z); - if (tile != null) { - tile.onRightClick((byte) side, player, x, y, z); - } - } - catch (final Throwable t) { - } - - final TileEntityXpConverter tank = (TileEntityXpConverter) world.getTileEntity(x, y, z); - if (tank != null) { - if (tank.tankEssence.getFluid() != null) { - PlayerUtils.messagePlayer(player, "This tank contains " + tank.tankEssence.getFluidAmount() - + "L of " + tank.tankEssence.getFluid().getLocalizedName()); - } - if (tank.tankLiquidXp.getFluid() != null) { - PlayerUtils.messagePlayer(player, "This tank contains " + tank.tankLiquidXp.getFluidAmount() - + "L of " + tank.tankLiquidXp.getFluid().getLocalizedName()); - } - if ((tank.tankEssence.getFluid() != null) && (tank.tankLiquidXp.getFluid() != null)) { - PlayerUtils.messagePlayer(player, "This is worth " - + EnchantingUtils.getLevelForLiquid(tank.tankLiquidXp.getFluidAmount()) + " levels."); - } - } - } - } - return true; - */} - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - //return new TileEntityXpConverter(); - return null; - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, - final int z) { - return false; - } - - private final boolean generateRainbowMap() { - return true; - } - - @Override - public int getBlockColor() { - return super.getBlockColor(); - } - - @Override - public int colorMultiplier(final IBlockAccess p_149720_1_, final int p_149720_2_, final int p_149720_3_, - final int p_149720_4_) { - return super.colorMultiplier(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_); - } - - @Override - public void updateTick(final World world, final int x, final int y, final int z, final Random rand) { - // this.mRainbowTick++; - super.updateTick(world, x, y, z, rand); - } - - @Override - public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random rand) { - //this.mRainbowTick++; - super.randomDisplayTick(world, x, y, z, rand); - } - - @Override - public int tickRate(final World p_149738_1_) { - return 20; - } - - @Override - public int getLightValue() { - return 6; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/FirePit.java b/src/Java/gtPlusPlus/core/block/general/FirePit.java deleted file mode 100644 index 6f35715c48..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/FirePit.java +++ /dev/null @@ -1,230 +0,0 @@ -package gtPlusPlus.core.block.general; - -import static net.minecraftforge.common.util.ForgeDirection.*; - -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.core.block.base.BasicBlock; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.tileentities.general.TileEntityFirepit; -import net.minecraftforge.common.util.ForgeDirection; - -public class FirePit extends BasicBlock{ - private static IIcon[] TEXTURE; - public static final int META_ANTIBUILDER = 2; - private int meta; - - @SuppressWarnings("deprecation") - public FirePit() { - super("blockFirePit", Material.wood); - this.setBlockName("blockFirePit"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setHardness(10.0F); - this.setResistance(35.0F); - this.setStepSound(Block.soundTypeWood); - GameRegistry.registerBlock(this, "blockFirePit"); - LanguageRegistry.addName(this, "Fire Pit"); - } - - @Override - public int tickRate(final World aParWorld) { - return 30; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int i) { - return new TileEntityFirepit(); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister par1IconRegister){ - TEXTURE = new IIcon[] {par1IconRegister.registerIcon(this.getTextureName() + "_layer_0"), par1IconRegister.registerIcon(this.getTextureName() + "_layer_1")}; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void getSubBlocks(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List){ - par3List.add(new ItemStack(par1, 1, 2)); - } - - @Override - public void updateTick(final World par1World, final int x, final int y, final int z, final Random par5Random){ - if (!par1World.isRemote){ - //Sets meta. - this.meta = par1World.getBlockMetadata(x, y, z); - //If Raining, Put out. - if (par1World.isRaining() - && (par1World.canLightningStrikeAt(x, y, z) - || par1World.canLightningStrikeAt(x - 1, y, z) - || par1World.canLightningStrikeAt(x + 1, y, z) - || par1World.canLightningStrikeAt(x, y, z - 1) - || par1World.canLightningStrikeAt(x, y, z + 1))){ - //Fire goes out - par1World.setBlockMetadataWithNotify(x, y, z, 1, 4); - } - if (isNeighborBurning(par1World, x, y, z)){ - //Fire can ignite from a nearby flame source. - par1World.setBlockMetadataWithNotify(x, y, z, 2, 4); - } - } - } - - @Override - public Item getItemDropped(final int meta, final Random par2Random, final int par3){ - switch (meta){ - case 0: - return null; - default: - break; - } - return Item.getItemFromBlock(this); - } - - @Override - public int damageDropped(final int meta){ - return meta; - } - - @Override - public boolean isOpaqueCube(){ - return false; - } - - @Override - public int getRenderType(){ - return -1; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass(){ - return 1; - } - - @Override - public boolean renderAsNormalBlock(){ - return false; - } - - /*@Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aParWorld, int x, int y, int z){ - return null; - }*/ - - @Override - protected boolean canSilkHarvest(){ - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(final World p_149734_1_, final int p_149734_2_, final int p_149734_3_, final int p_149734_4_, final Random p_149734_5_){ - int l; - float f; - float f1; - float f2; - if (this.meta == 2) { - if (p_149734_5_.nextInt(24) == 0){ - p_149734_1_.playSound(p_149734_2_ + 0.5F, p_149734_3_ + 0.5F, p_149734_4_ + 0.5F, "fire.fire", 1.0F + p_149734_5_.nextFloat(), (p_149734_5_.nextFloat() * 0.7F) + 0.3F, false); - } - } - if (this.meta == 2) { - if (!World.doesBlockHaveSolidTopSurface(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP)){ - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_, EAST)){ - for (l = 0; l < 2; ++l){ - f = p_149734_2_ + (p_149734_5_.nextFloat() * 0.1F); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_, WEST)){ - for (l = 0; l < 2; ++l){ - f = p_149734_2_ + 1 - (p_149734_5_.nextFloat() * 0.1F); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1, SOUTH)){ - for (l = 0; l < 2; ++l){ - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + (p_149734_5_.nextFloat() * 0.1F); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1, NORTH)){ - for (l = 0; l < 2; ++l){ - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + 1 - (p_149734_5_.nextFloat() * 0.1F); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_, DOWN)){ - for (l = 0; l < 2; ++l){ - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + 1 - (p_149734_5_.nextFloat() * 0.1F); - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - } - else{ - if (this.meta == 2) { - for (l = 0; l < 3; ++l){ - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + (p_149734_5_.nextFloat() * 0.5F) + 0.5F; - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - } - } - } - - @SideOnly(Side.CLIENT) - public static IIcon getFireIcon(final int p_149840_1_){ - return FirePit.TEXTURE[p_149840_1_]; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_){ - return FirePit.TEXTURE[0]; - } - - private static boolean isNeighborBurning(final World world, final int x, final int y, final int z){ - return canCatchFire(world, x + 1, y, z, WEST ) || - canCatchFire(world, x - 1, y, z, EAST ) || - canCatchFire(world, x, y - 1, z, UP ) || - canCatchFire(world, x, y + 1, z, DOWN ) || - canCatchFire(world, x, y, z - 1, SOUTH) || - canCatchFire(world, x, y, z + 1, NORTH); - } - - public static boolean canCatchFire(final World world, final int x, final int y, final int z, final ForgeDirection face) - { - return world.getBlock(x, y, z).isFireSource(world, x, y, z, face); - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java b/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java deleted file mode 100644 index b979f7864b..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java +++ /dev/null @@ -1,136 +0,0 @@ -package gtPlusPlus.core.block.general; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityInfiniteFluid; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; -import net.minecraftforge.fluids.ItemFluidContainer; - -public class FluidTankInfinite extends BlockContainer { - - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public FluidTankInfinite() { - super(Material.iron); - this.setBlockName("blockInfiniteFluidTank"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockInfiniteFluidTank"); - LanguageRegistry.addName(this, "Infinite Fluid Tank"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { - return p_149691_1_ == 1 ? this.textureTop - : (p_149691_1_ == 0 ? this.textureBottom - : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, - final int side, final float lx, final float ly, final float lz) { - if (world.isRemote) { - return true; - } else { - TileEntityInfiniteFluid tank = (TileEntityInfiniteFluid) world.getTileEntity(x, y, z); - if (tank != null) { - Item handItem; - try { - handItem = player.getHeldItem().getItem(); - } catch (Throwable t) { - handItem = null; - } - if (handItem != null - && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer - || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) { - if (tank.tank.getFluid() == null) { - try { - if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())) { - ItemStack handItemStack = player.getHeldItem(); - IFluidContainerItem container = (IFluidContainerItem) handItem; - FluidStack containerFluid = container.getFluid(handItemStack); - container.drain(handItemStack, container.getFluid(handItemStack).amount, true); - tank.tank.setFluid(containerFluid); - } else { - ItemStack handItemStack = player.getHeldItem(); - FluidContainerRegistry.drainFluidContainer(handItemStack); - FluidStack containerFluid = FluidContainerRegistry.getFluidForFilledItem(handItemStack); - ItemStack emptyContainer = FluidContainerRegistry.drainFluidContainer(handItemStack); - player.setItemInUse(emptyContainer, 0); - - tank.tank.setFluid(containerFluid); - } - } catch (Throwable t) { - t.printStackTrace(); - } - } - - } - if (tank.tank.getFluid() != null) { - PlayerUtils.messagePlayer(player, "This tank contains " + tank.tank.getFluidAmount() + "L of " - + tank.tank.getFluid().getLocalizedName()); - } - } - } - return true; - } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityInfiniteFluid(); - } - - @Override - public void onBlockAdded(World world, int x, int y, int z) { - super.onBlockAdded(world, x, y, z); - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/HellFire.java b/src/Java/gtPlusPlus/core/block/general/HellFire.java deleted file mode 100644 index 233f200815..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/HellFire.java +++ /dev/null @@ -1,557 +0,0 @@ -package gtPlusPlus.core.block.general; - -import static net.minecraftforge.common.util.ForgeDirection.*; - -import java.util.IdentityHashMap; -import java.util.Map.Entry; -import java.util.Random; - -import com.google.common.collect.Maps; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockFire; -import net.minecraft.block.material.MapColor; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraftforge.common.util.ForgeDirection; - -public class HellFire extends BlockFire { - @Deprecated - private final int[] field_149849_a = new int[Short.MAX_VALUE]; - @Deprecated - private final int[] field_149848_b = new int[Short.MAX_VALUE]; - @SideOnly(Side.CLIENT) - private IIcon[] IIconArray; - - public HellFire() { - this.setTickRandomly(true); - this.setLightLevel(1F); - this.setLightOpacity(0); - //this.setBlockTextureName(CORE.MODID + "hellfire/blockHellFire"); - this.setBlockName("blockHellFire"); - this.setCreativeTab(AddToCreativeTab.tabBlock); - GameRegistry.registerBlock(this, "blockHellFire"); - LanguageRegistry.addName(this, "Hellish Fire"); - this.enableBrutalFire(); - } - - private void enableBrutalFire() { - for (final Object o : Block.blockRegistry.getKeys()) - { - - try { - - final String name = (String)o; - final Block b = Block.getBlockFromName(name); - if (b != Blocks.air) - { - final int spread = Blocks.fire.getEncouragement(b); - final int flamm = Blocks.fire.getFlammability(b); - if (flamm > 0 && spread > 0) { - this.setFireInfo(b, spread * 4, flamm * 4); - } - } - - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - //Special Case madness - this.setFireInfo(Blocks.brown_mushroom_block, 20, 100); - this.setFireInfo(Blocks.red_mushroom_block, 20, 100); - this.setFireInfo(Blocks.grass, 20, 100); - this.setFireInfo(Blocks.mycelium, 20, 100); - - } - - /** - * How many world ticks before ticking - */ - @Override - public int tickRate(final World world) { - return 5; - } - - /** - * Ticks the block if it's been scheduled - */ - @Override - public void updateTick(final World world, final int x, final int y, final int z, Random random) { - - random = new XSTR(); - - if (world.getGameRules().getGameRuleBooleanValue("doFireTick")) { - final boolean flag = world.getBlock(x, y - 1, z).isFireSource(world, x, y - 1, z, UP); - - if (!this.canPlaceBlockAt(world, x, y, z)) { - world.setBlockToAir(x, y, z); - } - - if (!flag && world.isRaining() - && (world.canLightningStrikeAt(x, y, z) || world.canLightningStrikeAt(x - 1, y, z) - || world.canLightningStrikeAt(x + 1, y, z) || world.canLightningStrikeAt(x, y, z - 1) - || world.canLightningStrikeAt(x, y, z + 1))) { - - if (MathUtils.randInt(0, 100) >= 90){ - world.setBlockToAir(x, y, z); - } - } - else { - final int blockMeta = world.getBlockMetadata(x, y, z); - - if (blockMeta < 15) { - world.setBlockMetadataWithNotify(x, y, z, blockMeta + (random.nextInt(3) / 2), 4); - } - - world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world) + random.nextInt(10)); - - if (!flag && !this.canNeighborBurn(world, x, y, z)) { - if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) || (blockMeta > 3)) { - world.setBlockToAir(x, y, z); - } - } - else if (!flag && !this.canCatchFire(world, x, y - 1, z, UP) && (blockMeta == 15) && (random.nextInt(4) == 0)) { - world.setBlockToAir(x, y, z); - } - else { - final boolean flag1 = world.isBlockHighHumidity(x, y, z); - byte b0 = 0; - - if (flag1) { - b0 = -50; - } - - this.tryCatchFire(world, x + 1, y, z, 300 + b0, random, blockMeta, WEST); - this.tryCatchFire(world, x - 1, y, z, 300 + b0, random, blockMeta, EAST); - this.tryCatchFire(world, x, y - 1, z, 250 + b0, random, blockMeta, UP); - this.tryCatchFire(world, x, y + 1, z, 250 + b0, random, blockMeta, DOWN); - this.tryCatchFire(world, x, y, z - 1, 300 + b0, random, blockMeta, SOUTH); - this.tryCatchFire(world, x, y, z + 1, 300 + b0, random, blockMeta, NORTH); - - for (int i1 = x - 1; i1 <= (x + 1); ++i1) { - for (int j1 = z - 1; j1 <= (z + 1); ++j1) { - for (int k1 = y - 1; k1 <= (y + 4); ++k1) { - if ((i1 != x) || (k1 != y) || (j1 != z)) { - int l1 = 100; - - if (k1 > (y + 1)) { - l1 += (k1 - (y + 1)) * 100; - } - - final int neighbourFireChance = this.getChanceOfNeighborsEncouragingFire(world, i1, k1, j1); - - if (neighbourFireChance > 0) { - int j2 = (neighbourFireChance + 40 + (world.difficultySetting.getDifficultyId() * 14)) / (blockMeta + 30); - - if (flag1) { - j2 /= 2; - } - - if ((j2 > 0) && (random.nextInt(l1) <= j2) - && (!world.isRaining() || !world.canLightningStrikeAt(i1, k1, j1)) - && !world.canLightningStrikeAt(i1 - 1, k1, z) - && !world.canLightningStrikeAt(i1 + 1, k1, j1) - && !world.canLightningStrikeAt(i1, k1, j1 - 1) - && !world.canLightningStrikeAt(i1, k1, j1 + 1)) { - int k2 = blockMeta + (random.nextInt(5) / 4); - - if (k2 > 15) { - k2 = 15; - } - - world.setBlock(i1, k1, j1, this, k2, 3); - } - } - } - } - } - } - } - } - } - } - - private void tryCatchFire(final World world, final int p_149841_2_, final int p_149841_3_, final int p_149841_4_, final int p_149841_5_, final Random p_149841_6_, final int p_149841_7_, final ForgeDirection face) { - final int j1 = world.getBlock(p_149841_2_, p_149841_3_, p_149841_4_).getFlammability(world, p_149841_2_, - p_149841_3_, p_149841_4_, face); - - if (p_149841_6_.nextInt(p_149841_5_) < j1) { - final boolean flag = world.getBlock(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.tnt; - - if ((p_149841_6_.nextInt(p_149841_7_ + 10) < 5) - && !world.canLightningStrikeAt(p_149841_2_, p_149841_3_, p_149841_4_)) { - int k1 = p_149841_7_ + (p_149841_6_.nextInt(5) / 4); - - if (k1 > 15) { - k1 = 15; - } - - world.setBlock(p_149841_2_, p_149841_3_, p_149841_4_, this, k1, 3); - } - else { - world.setBlockToAir(p_149841_2_, p_149841_3_, p_149841_4_); - } - - if (flag) { - Blocks.tnt.onBlockDestroyedByPlayer(world, p_149841_2_, p_149841_3_, p_149841_4_, 1); - } - } - } - - /** - * Returns true if at least one block next to this one can burn. - */ - private boolean canNeighborBurn(final World world, final int x, final int y, final int z) { - return this.canCatchFire(world, x + 1, y, z, WEST) - || this.canCatchFire(world, x - 1, y, z, EAST) - || this.canCatchFire(world, x, y - 1, z, UP) - || this.canCatchFire(world, x, y + 1, z, DOWN) - || this.canCatchFire(world, x, y, z - 1, SOUTH) - || this.canCatchFire(world, x, y, z + 1, NORTH); - } - - /** - * Gets the highest chance of a neighbor block encouraging this block to - * catch fire - */ - private int getChanceOfNeighborsEncouragingFire(final World world, final int x, final int y, final int z) { - final byte b0 = 0; - - if (!world.isAirBlock(x, y, z)) { - return 0; - } - else { - int l = b0; - l = this.getChanceToEncourageFire(world, x + 1, y, z, l, WEST); - l = this.getChanceToEncourageFire(world, x - 1, y, z, l, EAST); - l = this.getChanceToEncourageFire(world, x, y - 1, z, l, UP); - l = this.getChanceToEncourageFire(world, x, y + 1, z, l, DOWN); - l = this.getChanceToEncourageFire(world, x, y, z - 1, l, SOUTH); - l = this.getChanceToEncourageFire(world, x, y, z + 1, l, NORTH); - return l; - } - } - - /** - * Checks the specified block coordinate to see if it can catch fire. Args: - * blockAccess, x, y, z - */ - @Override - @Deprecated - public boolean canBlockCatchFire(final IBlockAccess p_149844_1_, final int p_149844_2_, final int p_149844_3_, final int p_149844_4_) { - return this.canCatchFire(p_149844_1_, p_149844_2_, p_149844_3_, p_149844_4_, UP); - } - - /** - * Checks to see if its valid to put this block at the specified - * coordinates. Args: world, x, y, z - */ - @Override - public boolean canPlaceBlockAt(final World worldObj, final int x, final int y, final int z) { - return World.doesBlockHaveSolidTopSurface(worldObj, x, y - 1, z) - || this.canNeighborBurn(worldObj, x, y, z); - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know which - * neighbor changed (coordinates passed are their own) Args: x, y, z, - * neighbor Block - */ - @Override - public void onNeighborBlockChange(final World worldObj, final int x, final int y, final int z, final Block blockObj) { - if (!World.doesBlockHaveSolidTopSurface(worldObj, x, y - 1, z) - && !this.canNeighborBurn(worldObj, x, y, z)) { - worldObj.setBlockToAir(x, y, z); - } - } - - /** - * Called whenever the block is added into the world. Args: world, x, y, z - */ - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - if ((world.provider.dimensionId > 0) - || !Blocks.portal.func_150000_e(world, x, y, z)) { - if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) - && !this.canNeighborBurn(world, x, y, z)) { - world.setBlockToAir(x, y, z); - } - else { - world.scheduleBlockUpdate(x, y, z, this, - this.tickRate(world) + world.rand.nextInt(10)); - } - } - } - - //Burn - @Override - public void onEntityWalking(final World world, final int i, final int j, final int k, final Entity entity) { - entity.setFire(10); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - //Burn - @Override - public void onEntityCollidedWithBlock(final World world, final int i, final int j, final int k, final Entity entity) { - entity.setFire(10); - } - - /** - * A randomly called display update to be able to add particles or other - * items for display - */ - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(final World world, final int x, final int y, final int z, Random randomObj) { - - randomObj = new XSTR(); - - if (randomObj.nextInt(24) == 0) { - world.playSound(x + 0.5F, y + 0.5F, z + 0.5F, "fire.fire", - 1.0F + randomObj.nextFloat(), (randomObj.nextFloat() * 0.7F) + 0.3F, false); - } - - int l; - float f; - float f1; - float f2; - - if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) - && !Blocks.fire.canCatchFire(world, x, y - 1, z, UP)) { - if (Blocks.fire.canCatchFire(world, x - 1, y, z, EAST)) { - for (l = 0; l < 2; ++l) { - f = x + (randomObj.nextFloat() * 0.1F); - f1 = y + randomObj.nextFloat(); - f2 = z + randomObj.nextFloat(); - world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - - } - } - - if (Blocks.fire.canCatchFire(world, x + 1, y, z, WEST)) { - for (l = 0; l < 2; ++l) { - f = (x + 1) - (randomObj.nextFloat() * 0.1F); - f1 = y + randomObj.nextFloat(); - f2 = z + randomObj.nextFloat(); - world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - } - } - - if (Blocks.fire.canCatchFire(world, x, y, z - 1, SOUTH)) { - for (l = 0; l < 2; ++l) { - f = x + randomObj.nextFloat(); - f1 = y + randomObj.nextFloat(); - f2 = z + (randomObj.nextFloat() * 0.1F); - world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - } - } - - if (Blocks.fire.canCatchFire(world, x, y, z + 1, NORTH)) { - for (l = 0; l < 2; ++l) { - f = x + randomObj.nextFloat(); - f1 = y + randomObj.nextFloat(); - f2 = (z + 1) - (randomObj.nextFloat() * 0.1F); - world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - } - } - - if (Blocks.fire.canCatchFire(world, x, y + 1, z, DOWN)) { - for (l = 0; l < 2; ++l) { - f = x + randomObj.nextFloat(); - f1 = (y + 1) - (randomObj.nextFloat() * 0.1F); - f2 = z + randomObj.nextFloat(); - world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - } - } - } - else { - for (l = 0; l < 5; ++l) { - f = x + randomObj.nextFloat(); - f1 = y + (randomObj.nextFloat() * 0.5F) + 0.5F; - f2 = z + randomObj.nextFloat(); - world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister IIconRegister) { - this.IIconArray = new IIcon[] { - IIconRegister.registerIcon(CORE.MODID + ":" + "hellfire/" + "blockHellFire" + "_layer_0"), - IIconRegister.registerIcon(CORE.MODID + ":" + "hellfire/" + "blockHellFire" + "_layer_1") }; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getFireIcon(final int p_149840_1_) { - return this.IIconArray[p_149840_1_]; - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { - return this.IIconArray[0]; - } - - @Override - public MapColor getMapColor(final int p_149728_1_) { - return MapColor.snowColor; - } - - /* - * ================================= Forge Start - * ====================================== - */ - private static class FireInfo { - private int encouragement = 0; - private int flammibility = 0; - } - - private final IdentityHashMap blockInfo = Maps.newIdentityHashMap(); - - @Override - public void setFireInfo(final Block block, final int encouragement, final int flammibility) { - try { - if (block == Blocks.air) { - throw new IllegalArgumentException("Tried to set air on fire... This is bad."); - } - final int id = Block.getIdFromBlock(block); - if (id >= 4096 || id >= field_149849_a.length || id >= field_149848_b.length) { - return; - } - this.field_149849_a[id] = encouragement; - this.field_149848_b[id] = flammibility; - - final FireInfo info = this.getInfo(block, true); - info.encouragement = encouragement; - info.flammibility = flammibility; - } - catch (Throwable t) {} - } - - private FireInfo getInfo(final Block block, final boolean garentee) { - FireInfo ret = this.blockInfo.get(block); - if ((ret == null) && garentee) { - ret = new FireInfo(); - this.blockInfo.put(block, ret); - } - return ret; - } - - @Override - public void rebuildFireInfo() { - for (int x = 0; x < 4096; x++) { - // If we care.. we could detect changes in here and make sure we - // keep them, however - // it's my thinking that anyone who hacks into the private variables - // should DIAF and we don't care about them. - this.field_149849_a[x] = 0; - this.field_149848_b[x] = 0; - } - - for (final Entry e : this.blockInfo.entrySet()) { - final int id = Block.getIdFromBlock(e.getKey()); - if ((id >= 0) && (id < 4096)) { - this.field_149849_a[id] = e.getValue().encouragement; - this.field_149848_b[id] = e.getValue().flammibility; - } - } - } - - @Override - public int getFlammability(final Block block) { - final int id = Block.getIdFromBlock(block); - return (id >= 0) && (id < 4096) ? this.field_149848_b[id] : 0; - } - - @Override - public int getEncouragement(final Block block) { - final int id = Block.getIdFromBlock(block); - return (id >= 0) && (id < 4096) ? this.field_149849_a[id] : 0; - } - - /** - * Side sensitive version that calls the block function. - * - * @param world - * The current world - * @param x - * X Position - * @param y - * Y Position - * @param z - * Z Position - * @param face - * The side the fire is coming from - * @return True if the face can catch fire. - */ - @Override - public boolean canCatchFire(final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection face) { - return world.getBlock(x, y, z).isFlammable(world, x, y, z, face); - } - - /** - * Side sensitive version that calls the block function. - * - * @param world - * The current world - * @param x - * X Position - * @param y - * Y Position - * @param z - * Z Position - * @param oldChance - * The previous maximum chance. - * @param face - * The side the fire is coming from - * @return The chance of the block catching fire, or oldChance if it is - * higher - */ - @Override - public int getChanceToEncourageFire(final IBlockAccess world, final int x, final int y, final int z, final int oldChance, final ForgeDirection face) { - final int newChance = world.getBlock(x, y, z).getFireSpreadSpeed(world, x, y, z, face); - return (newChance > oldChance ? newChance : oldChance); - } - /* - * ================================= Forge Start - * ====================================== - */ -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/general/LightGlass.java b/src/Java/gtPlusPlus/core/block/general/LightGlass.java deleted file mode 100644 index 30da7f1d56..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/LightGlass.java +++ /dev/null @@ -1,144 +0,0 @@ -package gtPlusPlus.core.block.general; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -/*public class LightGlass extends BlockBreakable -{*/ -public class LightGlass extends BlockAir -{ - -private int state = 0; - private final int a = 255; - private int r = 255; - private int g = 0; - private int b = 0; - private int hex; - - public LightGlass(final boolean bool) - { - //super("blockMFEffect", Material.air, bool); - super(); - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setBlockName("blockMFEffect"); - this.setLightLevel(12F); - setHardness(0.1F); - setBlockTextureName(CORE.MODID + ":" + "blockMFEffect"); - setStepSound(Block.soundTypeGlass); - GameRegistry.registerBlock(this, "blockMFEffect"); - - /* - this.setLightOpacity(0); - this.setTickRandomly(true); - this.setResistance(1);*/ - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - @Override - public int quantityDropped(final Random rand) - { - return 0; - } - - /** - * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha - */ - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() - { - return 0; - } - - /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) - */ - @Override - public boolean renderAsNormalBlock() - { - return false; - } - - /** - * Return true if a player with Silk Touch can harvest this block directly, and not its normal drops. - */ - @Override - protected boolean canSilkHarvest() - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon) - { - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockMFEffect"); - } - - @Override - //http://stackoverflow.com/questions/31784658/how-can-i-loop-through-all-rgb-combinations-in-rainbow-order-in-java - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) - { - if(this.state == 0){ - this.g++; - if(this.g == 255) { - this.state = 1; - } - } - if(this.state == 1){ - this.r--; - if(this.r == 0) { - this.state = 2; - } - } - if(this.state == 2){ - this.b++; - if(this.b == 255) { - this.state = 3; - } - } - if(this.state == 3){ - this.g--; - if(this.g == 0) { - this.state = 4; - } - } - if(this.state == 4){ - this.r++; - if(this.r == 255) { - this.state = 5; - } - } - if(this.state == 5){ - this.b--; - if(this.b == 0) { - this.state = 0; - } - } - this.hex = (this.a << 24) + (this.r << 16) + (this.g << 8) + (this.b); - return this.hex; - } - - /** - * A randomly called display update to be able to add particles or other items for display - */ - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(final World world, final int posX, final int posY, final int posZ, final Random random){ - //Utils.spawnFX(world, posX, posY, posZ, "smoke", "cloud"); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/general/MiningExplosives.java b/src/Java/gtPlusPlus/core/block/general/MiningExplosives.java deleted file mode 100644 index 8925962e4e..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/MiningExplosives.java +++ /dev/null @@ -1,172 +0,0 @@ -package gtPlusPlus.core.block.general; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockTNT; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.init.Items; -import net.minecraft.util.IIcon; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; -import gtPlusPlus.core.lib.CORE; - -public class MiningExplosives extends BlockTNT { - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - - public MiningExplosives(){ - this.setBlockName("blockMiningExplosives"); - GameRegistry.registerBlock(this, "blockMiningExplosives"); - LanguageRegistry.addName(this, "Earth Blasting Explosives"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_){ - return p_149691_1_ == 0 ? this.textureBottom : (p_149691_1_ == 1 ? this.textureTop : this.blockIcon); - } - - /** - * Called whenever the block is added into the world. Args: world, x, y, z - */ - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z){ - super.onBlockAdded(world, x, y, z); - - if (world.isBlockIndirectlyGettingPowered(x, y, z)) - { - this.onBlockDestroyedByPlayer(world, x, y, z, 1); - world.setBlockToAir(x, y, z); - } - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are - * their own) Args: x, y, z, neighbor Block - */ - @Override - public void onNeighborBlockChange(final World world, final int x, final int y, final int z, final Block neighbourblock){ - if (world.isBlockIndirectlyGettingPowered(x, y, z)) - { - this.onBlockDestroyedByPlayer(world, x, y, z, 1); - world.setBlockToAir(x, y, z); - } - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - @Override - public int quantityDropped(final Random random){ - return 1; - } - - /** - * Called upon the block being destroyed by an explosion - */ - @Override - public void onBlockDestroyedByExplosion(final World world, final int x, final int y, final int z, final Explosion bang){ - if (!world.isRemote) - { - final EntityPrimedMiningExplosive EntityPrimedMiningExplosive = new EntityPrimedMiningExplosive(world, x + 0.5F, y + 0.5F, z + 0.5F, bang.getExplosivePlacedBy()); - EntityPrimedMiningExplosive.fuse = world.rand.nextInt(EntityPrimedMiningExplosive.fuse / 4) + (EntityPrimedMiningExplosive.fuse / 8); - world.spawnEntityInWorld(EntityPrimedMiningExplosive); - } - } - - /** - * Called right before the block is destroyed by a player. Args: world, x, y, z, metaData - */ - @Override - public void onBlockDestroyedByPlayer(final World world, final int x, final int y, final int z, final int meta){ - this.func_150114_a(world, x, y, z, meta, (EntityLivingBase)null); - } - - //TODO Spawns Primed TNT? - @Override - public void func_150114_a(final World world, final int p_150114_2_, final int p_150114_3_, final int p_150114_4_, final int p_150114_5_, final EntityLivingBase entityLiving){ - if (!world.isRemote) - { - if ((p_150114_5_ & 1) == 1) - { - final EntityPrimedMiningExplosive EntityPrimedMiningExplosive = new EntityPrimedMiningExplosive(world, p_150114_2_ + 0.5F, p_150114_3_ + 0.5F, p_150114_4_ + 0.5F, entityLiving); - world.spawnEntityInWorld(EntityPrimedMiningExplosive); - world.playSoundAtEntity(EntityPrimedMiningExplosive, "game.tnt.primed", 1.0F, 1.0F); - } - } - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer clickingPlayer, final int p_149727_6_, final float p_149727_7_, final float p_149727_8_, final float p_149727_9_){ - if ((clickingPlayer.getCurrentEquippedItem() != null) && (clickingPlayer.getCurrentEquippedItem().getItem() == Items.flint_and_steel)) - { - this.func_150114_a(world, x, y, z, 1, clickingPlayer); - world.setBlockToAir(x, y, z); - clickingPlayer.getCurrentEquippedItem().damageItem(1, clickingPlayer); - return true; - } - else - { - return super.onBlockActivated(world, x, y, z, clickingPlayer, p_149727_6_, p_149727_7_, p_149727_8_, p_149727_9_); - } - } - - /** - * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity - */ - @Override - public void onEntityCollidedWithBlock(final World world, final int x, final int y, final int z, final Entity entityTriggering){ - if ((entityTriggering instanceof EntityArrow) && !world.isRemote) - { - final EntityArrow entityarrow = (EntityArrow)entityTriggering; - - if (entityarrow.isBurning()) - { - this.func_150114_a(world, x, y, z, 1, entityarrow.shootingEntity instanceof EntityLivingBase ? (EntityLivingBase)entityarrow.shootingEntity : null); - world.setBlockToAir(x, y, z); - } - } - } - - /** - * Return whether this block can drop from an explosion. - */ - @Override - public boolean canDropFromExplosion(final Explosion bang){ - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iconRegister){ - // - /*this.blockIcon = iconRegister.registerIcon(this.getTextureName() + "_side"); - this.textureTop = iconRegister.registerIcon(this.getTextureName() + "_top"); - this.textureBottom = iconRegister.registerIcon(this.getTextureName() + "_bottom");*/ - this.blockIcon = iconRegister.registerIcon(CORE.MODID + ":" + "chrono/" + "MetalSheet2"); - this.textureTop = iconRegister.registerIcon(CORE.MODID + ":" + "chrono/" + "MetalFunnel"); - this.textureBottom = iconRegister.registerIcon(CORE.MODID + ":" + "chrono/" + "MetalPanel"); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/general/PlayerDoors.java b/src/Java/gtPlusPlus/core/block/general/PlayerDoors.java deleted file mode 100644 index a4c0c1a0a5..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/PlayerDoors.java +++ /dev/null @@ -1,467 +0,0 @@ -package gtPlusPlus.core.block.general; - -import java.util.HashMap; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.base.itemblock.ItemBlockDoor; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityPlayerDoorBase; -import gtPlusPlus.core.util.Utils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockDoor; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.IconFlipped; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class PlayerDoors extends BlockDoor implements ITileEntityProvider { - - @SideOnly(Side.CLIENT) - private IIcon[] aTextureUpper; - @SideOnly(Side.CLIENT) - private IIcon[] aTextureLower; - - private final static HashMap mDoorMap = new HashMap(); - - public PlayerDoors(Material aMaterial, String aTextureName, boolean vanillaType) { - this(aMaterial, aTextureName, vanillaType, 0f, null, null); - } - - public PlayerDoors(Material aMaterial, String aTextureName, boolean vanillaType, float aHardness, - SoundType aStepSound, String aBlockExtensionName) { - super(aMaterial); - this.disableStats(); - this.isBlockContainer = true; - if (mDoorMap.get(aMaterial) == null) { - mDoorMap.put(aMaterial, this); - } - float f = 0.5F; - float f1 = 1.0F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f); - - this.setBlockName("playerDoor_" + aTextureName); - if (aMaterial == Material.wood) { - setHardness(3.0F); - setStepSound(soundTypeWood); - setBlockName("playerDoor" + "Wood"); - this.setHarvestLevel("axe", 1); - } else if (aMaterial == Material.iron) { - setHardness(5.0F); - setStepSound(Block.soundTypeMetal); - setBlockName("playerDoor" + "Iron"); - this.setHarvestLevel("pickaxe", 1); - - } else if (aMaterial == Material.glass) { - setHardness(0.1F); - setStepSound(Block.soundTypeGlass); - setBlockName("playerDoor" + "Glass"); - this.setHarvestLevel("pickaxe", 1); - - } else if (aMaterial == Material.ice) { - setHardness(0.5F); - setStepSound(Block.soundTypeSnow); - setBlockName("playerDoor" + "Ice"); - this.setHarvestLevel("pickaxe", 1); - } else { - setHardness(aHardness); - setStepSound(aStepSound); - setBlockName("playerDoor" + aBlockExtensionName); - this.setHarvestLevel("axe", 1); - - } - this.setBlockTextureName(vanillaType ? aTextureName : CORE.MODID + ":" + aTextureName); - GameRegistry.registerBlock(this, ItemBlockDoor.class, Utils.sanitizeString(this.getUnlocalizedName())); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @SideOnly(Side.CLIENT) - public IIcon getIcon(int p_149691_1_, int p_149691_2_) { - return this.aTextureLower[0]; - } - - @SideOnly(Side.CLIENT) - public IIcon getIcon(IBlockAccess aAccess, int p_149673_2_, int p_149673_3_, int p_149673_4_, int p_149673_5_) { - if (p_149673_5_ != 1 && p_149673_5_ != 0) { - int i1 = this.getState(aAccess, p_149673_2_, p_149673_3_, p_149673_4_); - int j1 = i1 & 3; - boolean flag = (i1 & 4) != 0; - boolean flag1 = false; - boolean flag2 = (i1 & 8) != 0; - - if (flag) { - if (j1 == 0 && p_149673_5_ == 2) { - flag1 = !flag1; - } else if (j1 == 1 && p_149673_5_ == 5) { - flag1 = !flag1; - } else if (j1 == 2 && p_149673_5_ == 3) { - flag1 = !flag1; - } else if (j1 == 3 && p_149673_5_ == 4) { - flag1 = !flag1; - } - } else { - if (j1 == 0 && p_149673_5_ == 5) { - flag1 = !flag1; - } else if (j1 == 1 && p_149673_5_ == 3) { - flag1 = !flag1; - } else if (j1 == 2 && p_149673_5_ == 4) { - flag1 = !flag1; - } else if (j1 == 3 && p_149673_5_ == 2) { - flag1 = !flag1; - } - - if ((i1 & 16) != 0) { - flag1 = !flag1; - } - } - - return flag2 ? this.aTextureUpper[flag1 ? 1 : 0] : this.aTextureLower[flag1 ? 1 : 0]; - } else { - return this.aTextureLower[0]; - } - } - - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister p_149651_1_) { - this.aTextureUpper = new IIcon[2]; - this.aTextureLower = new IIcon[2]; - this.aTextureUpper[0] = p_149651_1_.registerIcon(this.getTextureName() + "_upper"); - this.aTextureLower[0] = p_149651_1_.registerIcon(this.getTextureName() + "_lower"); - this.aTextureUpper[1] = new IconFlipped(this.aTextureUpper[0], true, false); - this.aTextureLower[1] = new IconFlipped(this.aTextureLower[0], true, false); - } - - public boolean getBlocksMovement(IBlockAccess aAccess, int aX, int aY, int aZ) { - int l = this.getState(aAccess, aX, aY, aZ); - return (l & 4) != 0; - } - - /** - * If this block doesn't render as an ordinary block it will return False - * (examples: signs, buttons, stairs, etc) - */ - public boolean renderAsNormalBlock() { - return false; - } - - /** - * The type of render function that is called for this block - */ - public int getRenderType() { - return 7; - } - - /** - * Returns the bounding box of the wired rectangular prism to render. - */ - @SideOnly(Side.CLIENT) - public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - this.setBlockBoundsBasedOnState(aWorld, aX, aY, aZ); - return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - - /** - * Returns a bounding box from the pool of bounding boxes (this means this box - * can change after the pool has been cleared to be reused) - */ - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - this.setBlockBoundsBasedOnState(aWorld, aX, aY, aZ); - return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, y, z - */ - public void setBlockBoundsBasedOnState(IBlockAccess aAccess, int aX, int aY, int aZ) { - this.setBounds(this.getState(aAccess, aX, aY, aZ)); - } - - public int func_150013_e(IBlockAccess p_150013_1_, int p_150013_2_, int p_150013_3_, int p_150013_4_) { - return this.getState(p_150013_1_, p_150013_2_, p_150013_3_, p_150013_4_) & 3; - } - - public boolean func_150015_f(IBlockAccess p_150015_1_, int p_150015_2_, int p_150015_3_, int p_150015_4_) { - return (this.getState(p_150015_1_, p_150015_2_, p_150015_3_, p_150015_4_) & 4) != 0; - } - - private void setBounds(int aState) { - float f = 0.1875F; - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F); - int j = aState & 3; - boolean flag = (aState & 4) != 0; - boolean flag1 = (aState & 16) != 0; - - if (j == 0) { - if (flag) { - if (!flag1) { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); - } else { - this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); - } - } else { - this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); - } - } else if (j == 1) { - if (flag) { - if (!flag1) { - this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } else { - this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); - } - } else { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); - } - } else if (j == 2) { - if (flag) { - if (!flag1) { - this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); - } else { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); - } - } else { - this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - } else if (j == 3) { - if (flag) { - if (!flag1) { - this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); - } else { - this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - } else { - this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); - } - } - } - - /** - * Called upon block activation (right click on the block.) - */ - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int p_149727_6_, - float p_149727_7_, float p_149727_8_, float p_149727_9_) { - if (this.blockMaterial == Material.iron) { - return false; // Allow items to interact with the door - } else { - int i1 = this.getState(aWorld, aX, aY, aZ); - int j1 = i1 & 7; - j1 ^= 4; - - if ((i1 & 8) == 0) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, j1, 2); - aWorld.markBlockRangeForRenderUpdate(aX, aY, aZ, aX, aY, aZ); - } else { - aWorld.setBlockMetadataWithNotify(aX, aY - 1, aZ, j1, 2); - aWorld.markBlockRangeForRenderUpdate(aX, aY - 1, aZ, aX, aY, aZ); - } - - aWorld.playAuxSFXAtEntity(aPlayer, 1003, aX, aY, aZ, 0); - return true; - } - } - - public void func_150014_a(World aWorld, int aX, int aY, int aZ, boolean aFlag) { - int l = this.getState(aWorld, aX, aY, aZ); - boolean flag1 = (l & 4) != 0; - - if (flag1 != aFlag) { - int i1 = l & 7; - i1 ^= 4; - - if ((l & 8) == 0) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, i1, 2); - aWorld.markBlockRangeForRenderUpdate(aX, aY, aZ, aX, aY, aZ); - } else { - aWorld.setBlockMetadataWithNotify(aX, aY - 1, aZ, i1, 2); - aWorld.markBlockRangeForRenderUpdate(aX, aY - 1, aZ, aX, aY, aZ); - } - - aWorld.playAuxSFXAtEntity((EntityPlayer) null, 1003, aX, aY, aZ, 0); - } - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know which - * neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor - * Block - */ - public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aNeighbour) { - int l = aWorld.getBlockMetadata(aX, aY, aZ); - - if ((l & 8) == 0) { - boolean flag = false; - - if (aWorld.getBlock(aX, aY + 1, aZ) != this) { - aWorld.setBlockToAir(aX, aY, aZ); - flag = true; - } - - if (!World.doesBlockHaveSolidTopSurface(aWorld, aX, aY - 1, aZ)) { - aWorld.setBlockToAir(aX, aY, aZ); - flag = true; - - if (aWorld.getBlock(aX, aY + 1, aZ) == this) { - aWorld.setBlockToAir(aX, aY + 1, aZ); - } - } - - if (flag) { - if (!aWorld.isRemote) { - this.dropBlockAsItem(aWorld, aX, aY, aZ, l, 0); - } - } else { - boolean flag1 = aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ) - || aWorld.isBlockIndirectlyGettingPowered(aX, aY + 1, aZ); - - if ((flag1 || aNeighbour.canProvidePower()) && aNeighbour != this) { - this.func_150014_a(aWorld, aX, aY, aZ, flag1); - } - } - } else { - if (aWorld.getBlock(aX, aY - 1, aZ) != this) { - aWorld.setBlockToAir(aX, aY, aZ); - } - - if (aNeighbour != this) { - this.onNeighborBlockChange(aWorld, aX, aY - 1, aZ, aNeighbour); - } - } - } - - public Item getItemDropped(int p_149650_1_, Random aRand, int p_149650_3_) { - if ((p_149650_1_ & 8) != 0) { - return null; - } else { - Block b = mDoorMap.get(this.blockMaterial); - if (b != null) { - return Item.getItemFromBlock(b); - } - } - return null; - } - - /** - * Ray traces through the blocks collision from start vector to end vector - * returning a ray trace hit. Args: world, x, y, z, startVec, endVec - */ - public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, - Vec3 p_149731_5_, Vec3 p_149731_6_) { - this.setBlockBoundsBasedOnState(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_); - return super.collisionRayTrace(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_, p_149731_5_, p_149731_6_); - } - - /** - * Checks to see if its valid to put this block at the specified coordinates. - * Args: world, x, y, z - */ - public boolean canPlaceBlockAt(World aWorld, int aX, int aY, int aZ) { - boolean aHeight = (aY < aWorld.getHeight() - 1); - boolean aSolidTopSurface = World.doesBlockHaveSolidTopSurface(aWorld, aX, aY - 1, aZ); - - boolean aCanPlace = aWorld.getBlock(aX, aY, aZ).isReplaceable(aWorld, aX, aY, aZ); - boolean aCanPlace2 = aWorld.getBlock(aX, aY, aZ).isReplaceable(aWorld, aX, aY + 1, aZ); - - // Logger.INFO(""+aY+"/"+aWorld.getHeight()+" | Trying to place door. Good - // height? "+aHeight+" | Solid top surface? "+aSolidTopSurface+" | Can Place? - // "+aCanPlace+"|"+aCanPlace2); - - return aHeight && aSolidTopSurface && aCanPlace && aCanPlace2; - } - - /** - * Returns the mobility information of the block, 0 = free, 1 = can't push but - * can move over, 2 = total immobility and stop pistons - */ - public int getMobilityFlag() { - return 1; - } - - public int getState(IBlockAccess aAccess, int aX, int aY, int aZ) { - int l = aAccess.getBlockMetadata(aX, aY, aZ); - boolean flag = (l & 8) != 0; - int i1; - int j1; - - if (flag) { - i1 = aAccess.getBlockMetadata(aX, aY - 1, aZ); - j1 = l; - } else { - i1 = l; - j1 = aAccess.getBlockMetadata(aX, aY + 1, aZ); - } - - boolean flag1 = (j1 & 1) != 0; - return i1 & 7 | (flag ? 8 : 0) | (flag1 ? 16 : 0); - } - - /** - * Gets an item for the block being called on. Args: world, x, y, z - */ - @SideOnly(Side.CLIENT) - public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { - Block b = mDoorMap.get(this.blockMaterial); - if (b != null) { - return Item.getItemFromBlock(b); - } - // return this.blockMaterial == Material.iron ? Items.iron_door : - // Items.wooden_door; - return null; - } - - /** - * Called when the block is attempted to be harvested - */ - public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, - EntityPlayer p_149681_6_) { - if (p_149681_6_.capabilities.isCreativeMode && (p_149681_5_ & 8) != 0 - && p_149681_1_.getBlock(p_149681_2_, p_149681_3_ - 1, p_149681_4_) == this) { - p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_); - } - } - - /** - * Called whenever the block is added into the world. Args: world, x, y, z - */ - @Override - public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) { - super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_); - } - - @Override - public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, - int p_149749_6_) { - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); - } - - @Override - public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, - int p_149696_5_, int p_149696_6_) { - super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); - TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); - return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false; - } - - @Override - public TileEntity createNewTileEntity(World world, int metadata) { - return new TileEntityPlayerDoorBase(this, metadata); - } - - @Override - public TileEntity createTileEntity(World world, int metadata) { - return new TileEntityPlayerDoorBase(this, metadata); - } -} diff --git a/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java b/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java deleted file mode 100644 index 2210e68e8a..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java +++ /dev/null @@ -1,166 +0,0 @@ -package gtPlusPlus.core.block.general.antigrief; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.boss.EntityDragon; -import net.minecraft.entity.boss.EntityWither; -import net.minecraft.entity.boss.IBossDisplayData; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class BlockWitherProof extends Block{ - - public BlockWitherProof(){ - super(Material.redstoneLight); - this.setBlockName(Utils.sanitizeString("blockBlackGate")); - this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt"); - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setHardness(-1F); - this.setResistance(5000.0F); - this.setHarvestLevel("pickaxe", 3); - this.setStepSound(soundTypeMetal); - //LanguageRegistry.addName(this, "Wither Cage"); - GameRegistry.registerBlock(this, Utils.sanitizeString("blockBlackGate")); - } - - public String GetProperName(){ - return "Wither Cage"; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass(){ - return 1; - } - - @Override - public boolean isOpaqueCube(){ - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon){ - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt"); - } - - @Override - public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion){ - //prevent from being destroyed by wither and nukes. - } - - @Override - public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, - final int p_149723_3_, final int p_149723_4_, final Explosion p_149723_5_) { - - } - - @Override - public boolean canDropFromExplosion(final Explosion p_149659_1_) { - return false; - } - - @Override - public boolean canEntityDestroy(final IBlockAccess world, final int x, final int y, final int z, - final Entity entity) { - if ((entity == null) || !entity.isEntityAlive()){ - return false; - } - if ((entity instanceof EntityWither) || (entity instanceof EntityDragon) || (entity instanceof IBossDisplayData)){ - return false; - } - else { - return super.canEntityDestroy(world, x, y, z, entity); - } - } - - - //Colour Handling - private static final int mWitherColour = Utils.rgbtoHexValue(32, 32, 32); - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - return mWitherColour; - } - - @Override - public int getRenderColor(final int aMeta) { - return mWitherColour; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - } - - @Override - public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World p_149737_2_, int p_149737_3_, int p_149737_4_, int p_149737_5_) { - if (aPlayer != null && aPlayer instanceof EntityPlayerMP) { - return 1f; - } - return -1f; - } - - @Override - public float getExplosionResistance(Entity p_149638_1_) { - return Float.MAX_VALUE; - } - - @Override - public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) { - super.onBlockClicked(p_149699_1_, p_149699_2_, p_149699_3_, p_149699_4_, p_149699_5_); - } - - @Override - public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { - if ((entity == null) || !entity.isEntityAlive()){ - return; - } - if ((entity instanceof EntityWither) || (entity instanceof EntityDragon) || (entity instanceof IBossDisplayData)){ - return; - } - else { - super.onEntityCollidedWithBlock(world, x, y, z, entity); - } - } - - @Override - public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_) { - super.harvestBlock( p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_); - } - - @Override - public boolean canHarvestBlock(EntityPlayer player, int meta) { - if (player != null && player instanceof EntityPlayerMP) { - return true; - } - return super.canHarvestBlock(player, meta); - } - - @Override - public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { - return Float.MAX_VALUE; - } - - - -} diff --git a/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java b/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java deleted file mode 100644 index 01a2116a0b..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java +++ /dev/null @@ -1,293 +0,0 @@ -package gtPlusPlus.core.block.general.antigrief; - -import static gtPlusPlus.core.block.ModBlocks.blockGriefSaver; - -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityReverter; - -public class TowerDevice extends Block { - private static IIcon TEX_ANTIBUILDER; - public static final int META_ANTIBUILDER = 9; - private boolean bUnbreakable; - - public TowerDevice() - { - super(Material.wood); - this.setHardness(10.0F); - this.setResistance(35.0F); - this.setStepSound(Block.soundTypeWood); - this.setCreativeTab(AddToCreativeTab.tabMachines); - } - - public int tickRate() - { - return 15; - } - - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setBoolean("bUnbreakable", this.bUnbreakable); - } - - public void loadNBTData(final NBTTagCompound aNBT) { - this.bUnbreakable = aNBT.getBoolean("bUnbreakable"); - } - - @Override - public IIcon getIcon(final int side, final int meta) - { - return TEX_ANTIBUILDER; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister par1IconRegister) - { - TEX_ANTIBUILDER = par1IconRegister.registerIcon(CORE.MODID + ":" + "blockAntiGrief"); - } - - @Override - public void getSubBlocks(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) - { - par3List.add(new ItemStack(par1, 1, 9)); - } - - @Override - public boolean onBlockActivated(final World par1World, final int x, final int y, final int z, final EntityPlayer par5EntityPlayer, final int par6, final float par7, final float par8, final float par9) - { - final int meta = par1World.getBlockMetadata(x, y, z); - return false; - } - - @Override - public float getExplosionResistance(final Entity par1Entity, final World world, final int x, final int y, final int z, final double explosionX, final double explosionY, final double explosionZ) - { - final int meta = world.getBlockMetadata(x, y, z); - return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ); - } - - @Override - public float getBlockHardness(final World world, final int x, final int y, final int z) - { - final int meta = world.getBlockMetadata(x, y, z); - return super.getBlockHardness(world, x, y, z); - } - - public static boolean areNearbyLockBlocks(final World world, final int x, final int y, final int z) - { - boolean locked = false; - for (int dx = x - 2; dx <= (x + 2); dx++) { - for (int dy = y - 2; dy <= (y + 2); dy++) { - for (int dz = z - 2; dz <= (z + 2); dz++) { - if ((world.getBlock(dx, dy, dz) == blockGriefSaver) && (world.getBlockMetadata(dx, dy, dz) == 4)) { - locked = true; - } - } - } - } - return locked; - } - - public static void unlockBlock(final World par1World, final int x, final int y, final int z) - { - final Block thereBlockID = par1World.getBlock(x, y, z); - final int thereBlockMeta = par1World.getBlockMetadata(x, y, z); - if ((thereBlockID == blockGriefSaver) || (thereBlockMeta == 4)) - { - changeToBlockMeta(par1World, x, y, z, 5); - par1World.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.click", 0.3F, 0.6F); - } - } - - private static void changeToBlockMeta(final World par1World, final int x, final int y, final int z, final int meta) - { - final Block thereBlockID = par1World.getBlock(x, y, z); - if ((thereBlockID == blockGriefSaver)) - { - par1World.setBlock(x, y, z, thereBlockID, meta, 3); - par1World.markBlockRangeForRenderUpdate(x, y, z, x, y, z); - par1World.notifyBlocksOfNeighborChange(x, y, z, thereBlockID); - } - } - - @Override - public void onBlockAdded(final World par1World, final int x, final int y, final int z) - { - final int meta = par1World.getBlockMetadata(x, y, z); - if (!par1World.isRemote) { - - } - } - - @Override - public void onNeighborBlockChange(final World par1World, final int x, final int y, final int z, final Block myBlockID) - { - final int meta = par1World.getBlockMetadata(x, y, z); - if (!par1World.isRemote) - { - - } - } - - @Override - public void updateTick(final World par1World, final int x, final int y, final int z, final Random par5Random) - { - if (!par1World.isRemote) - { - final int meta = par1World.getBlockMetadata(x, y, z); - } - } - - private void letsBuild(final World par1World, final int x, final int y, final int z) - { - - } - - private boolean isInactiveTrapCharged(final World par1World, final int x, final int y, final int z) - { - return false; - } - - private boolean isReactorReady(final World world, final int x, final int y, final int z) - { - if ((world.getBlock(x, y + 1, z) != Blocks.redstone_block) || - (world.getBlock(x, y - 1, z) != Blocks.redstone_block) || - (world.getBlock(x + 1, y, z) != Blocks.redstone_block) || - (world.getBlock(x - 1, y, z) != Blocks.redstone_block) || - (world.getBlock(x, y, z + 1) != Blocks.redstone_block) || - (world.getBlock(x, y, z - 1) != Blocks.redstone_block)) { - return false; - } - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(final World par1World, final int x, final int y, final int z, final Random par5Random) - { - final int meta = par1World.getBlockMetadata(x, y, z); - if ((meta == 3) || (meta == 1) || (meta == 9)) { - for (int i = 0; i < 1; i++) { - this.sparkle(par1World, x, y, z, par5Random); - } - } - } - - public void sparkle(final World world, final int x, final int y, final int z, final Random rand) - { - final double offset = 0.0625D; - for (int side = 0; side < 6; side++) - { - double rx = x + rand.nextFloat(); - double ry = y + rand.nextFloat(); - double rz = z + rand.nextFloat(); - if ((side == 0) && (!world.getBlock(x, y + 1, z).isOpaqueCube())) { - ry = y + 1 + offset; - } - if ((side == 1) && (!world.getBlock(x, y - 1, z).isOpaqueCube())) { - ry = (y + 0) - offset; - } - if ((side == 2) && (!world.getBlock(x, y, z + 1).isOpaqueCube())) { - rz = z + 1 + offset; - } - if ((side == 3) && (!world.getBlock(x, y, z - 1).isOpaqueCube())) { - rz = (z + 0) - offset; - } - if ((side == 4) && (!world.getBlock(x + 1, y, z).isOpaqueCube())) { - rx = x + 1 + offset; - } - if ((side == 5) && (!world.getBlock(x - 1, y, z).isOpaqueCube())) { - rx = (x + 0) - offset; - } - if ((rx < x) || (rx > (x + 1)) || (ry < 0.0D) || (ry > (y + 1)) || (rz < z) || (rz > (z + 1))) { - world.spawnParticle("reddust", rx, ry, rz, 0.0D, 0.0D, 0.0D); - } - } - } - - public static void checkAndActivateVanishBlock(final World world, final int x, final int y, final int z) - { - final Block thereID = world.getBlock(x, y, z); - final int thereMeta = world.getBlockMetadata(x, y, z); - } - - public static void changeToActiveVanishBlock(final World par1World, final int x, final int y, final int z, final int meta) - { - changeToBlockMeta(par1World, x, y, z, meta); - par1World.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.pop", 0.3F, 0.6F); - - final Block thereBlockID = par1World.getBlock(x, y, z); - par1World.scheduleBlockUpdate(x, y, z, thereBlockID, getTickRateFor(thereBlockID, meta, par1World.rand)); - } - - private static int getTickRateFor(final Block thereBlockID, final int meta, final Random rand) - { - return 15; - } - - @Override - public int getLightValue(final IBlockAccess world, final int x, final int y, final int z) - { - final Block blockID = world.getBlock(x, y, z); - final int meta = world.getBlockMetadata(x, y, z); - if (blockID != this) { - return 0; - } - return 10; - } - - @Override - public boolean hasTileEntity(final int metadata) - { - return (metadata == 0); - } - - @Override - public TileEntity createTileEntity(final World world, final int metadata) - { - if (metadata == 0) { - Logger.INFO("I have been created. [Antigriefer]"+this.getLocalizedName()); - return new TileEntityReverter(); - } - return null; - } - - @Override - public Item getItemDropped(final int meta, final Random par2Random, final int par3) - { - switch (meta) - { - case 0: - return null; - } - return Item.getItemFromBlock(this); - } - - @Override - public int damageDropped(final int meta) - { - return meta; - } -} diff --git a/src/Java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java b/src/Java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java deleted file mode 100644 index 6af27639ae..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java +++ /dev/null @@ -1,63 +0,0 @@ -package gtPlusPlus.core.block.general.fluids; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidSludge extends BlockFluidClassic { - - @SideOnly(Side.CLIENT) - protected IIcon stillIcon; - @SideOnly(Side.CLIENT) - protected IIcon flowingIcon; - - public BlockFluidSludge(final Fluid fluid, final Material material) { - super(fluid, material); - this.setCreativeTab(AddToCreativeTab.tabMisc); - } - - @Override - public IIcon getIcon(final int side, final int meta) { - return ((side == 0) || (side == 1))? this.stillIcon : this.flowingIcon; - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(final IIconRegister register) { - this.stillIcon = register.registerIcon(CORE.MODID+":fluids/fluid.jackdaniels"); - this.flowingIcon = register.registerIcon(CORE.MODID+":fluids/fluid.jackdaniels"); - } - - @Override - public boolean canDisplace(final IBlockAccess world, final int x, final int y, final int z) { - if (world.getBlock(x, y, z).getMaterial().isLiquid()) { - return false; - } - return super.canDisplace(world, x, y, z); - } - - @Override - public boolean displaceIfPossible(final World world, final int x, final int y, final int z) { - if (world.getBlock(x, y, z).getMaterial().isLiquid()) { - return false; - } - return super.displaceIfPossible(world, x, y, z); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java deleted file mode 100644 index b84c96be99..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java +++ /dev/null @@ -1,370 +0,0 @@ -package gtPlusPlus.core.block.general.redstone; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; -import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler; -import gtPlusPlus.core.util.minecraft.InventoryUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public abstract class BlockGenericRedstone extends BlockContainer { - - - @SuppressWarnings("deprecation") - public BlockGenericRedstone(String aUnlocalizedSuffix, String aDisplayName) { - super(Material.redstoneLight); - this.setBlockName("blockGenericRedstone." + aUnlocalizedSuffix); - this.setHardness(3f); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockMeta.class, "blockGenericRedstone." + aUnlocalizedSuffix); - LanguageRegistry.addName(this, aDisplayName); - - } - - - private final HashMap> mTextures = new HashMap>(); - - /** - * A map of the textures used for this blocks. The key is the meta, then each internal map holds textures tied to each forge direction. Do not use unknown direction. - * @return - */ - public HashMap> getTextureArray() { - return mTextures; - } - - public abstract void generateTextureArray(final IIconRegister iicon); - - - @Override - @SideOnly(Side.CLIENT) - public final void registerBlockIcons(final IIconRegister iicon) { - generateTextureArray(iicon); - this.blockIcon = iicon.registerIcon("redstone_block"); - } - - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, - final int side, final float lx, final float ly, final float lz) { - - if (world.isRemote) { - return true; - } - - boolean mDidTool = false; - // Check For Tools - try { - final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); - final Item mHandItem = mHandStack.getItem(); - if (ItemUtils.isItemGregtechTool(mHandStack)) { - - Logger.INFO("Found Tool in players hand!"); - - final TileEntityRedstoneHandler tile = (TileEntityRedstoneHandler) world.getTileEntity(x, y, z); - if (tile != null) { - if (tile.isScrewdriverable()) { - if (ItemUtils.isToolScrewdriver(mHandStack)){ - mDidTool = tile.onScrewdriverRMB(); - PlayerUtils.messagePlayer(player, "Adjusted Light level by 0.0625f. "+tile.getLightBrightness()); - } - } - if (tile.isMalletable()) { - if (ItemUtils.isToolMallet(mHandStack)){ - mDidTool = tile.onMalletRMB(); - PlayerUtils.messagePlayer(player, "Light Mode active: "+mDidTool); - } - } - if (tile.isWrenchable()) { - if (ItemUtils.isToolWrench(mHandStack)){ - mDidTool = tile.onWrenchRMB(); - } - } - } - } - } - catch (final Throwable t) {} - if (mDidTool) { - return true; - } - - return false; - } - - - - @Override - public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { - - boolean mDidTool = false; - // Check For Tools - try { - final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(aWorld, aPlayer.getDisplayName()); - final Item mHandItem = mHandStack.getItem(); - if (mHandItem instanceof GT_MetaGenerated_Tool_01) { - - final TileEntityRedstoneHandler tile = (TileEntityRedstoneHandler) aWorld.getTileEntity(aX, aY, aZ); - if (tile != null) { - if (tile.isScrewdriverable()) { - if (ItemUtils.isToolScrewdriver(mHandStack)){ - mDidTool = tile.onScrewdriverLMB(); - } - } - if (tile.isMalletable()) { - if (ItemUtils.isToolMallet(mHandStack)){ - mDidTool = tile.onMalletLMB(); - } - } - if (tile.isWrenchable()) { - if (ItemUtils.isToolWrench(mHandStack)){ - mDidTool = tile.onWrenchLMB(); - } - } - } - } - } - catch (Throwable t) {} - - if (!mDidTool && !aPlayer.capabilities.isCreativeMode) { - super.onBlockClicked(aWorld, aX, aY, aZ, aPlayer); - } - else { - return; - } - } - - @Override - public abstract TileEntity createNewTileEntity(final World world, final int p_149915_2_); - - @Override - public void breakBlock(final World world, final int x, final int y, final int z, final Block block, - final int number) { - InventoryUtils.dropInventoryItems(world, x, y, z, block); - super.breakBlock(world, x, y, z, block, number); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, - final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityRedstoneHandler) world.getTileEntity(x, y, z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, - final int z) { - return false; - } - - @Override - public int getLightValue() { - return super.getLightValue(); - } - - @Override - public int onBlockPlaced(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, - float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_) { - // TODO Auto-generated method stub - return super.onBlockPlaced(p_149660_1_, p_149660_2_, p_149660_3_, p_149660_4_, p_149660_5_, p_149660_6_, - p_149660_7_, p_149660_8_, p_149660_9_); - } - - @Override - public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { - TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); - if (aThis != null) { - return aThis.isProvidingWeakPower(world, x, y, z, side); - } - return 0; - } - - @Override - public boolean canProvidePower() { - return false; - } - - @Override - public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { - TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); - if (aThis != null) { - return aThis.isProvidingStrongPower(world, x, y, z, side); - } - return 0; - } - - @Override - public boolean hasComparatorInputOverride() { - // TODO Auto-generated method stub - return super.hasComparatorInputOverride(); - } - - @Override - public int getComparatorInputOverride(World p_149736_1_, int p_149736_2_, int p_149736_3_, int p_149736_4_, - int p_149736_5_) { - // TODO Auto-generated method stub - return super.getComparatorInputOverride(p_149736_1_, p_149736_2_, p_149736_3_, p_149736_4_, p_149736_5_); - } - - @Override - public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { - TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); - if (aThis != null) { - return aThis.canConnectRedstone(world, x, y, z, side); - } - return false; - } - - @Override - public boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int side) { - TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); - if (aThis != null) { - return aThis.shouldCheckWeakPower(world, x, y, z, side); - } - return isNormalCube(); - } - - @Override - public boolean getWeakChanges(IBlockAccess world, int x, int y, int z) { - TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); - if (aThis != null) { - return aThis.getWeakChanges(world, x, y, z); - } - return false; - } - - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public abstract IIcon getIcon(final int side, final int meta); - - @Override - public int damageDropped(final int damage) { - return damage; - } - - @Override - public abstract void getSubBlocks(final Item item, final CreativeTabs tab, final List list); - - - /** - * Called whenever the block is added into the world. Args: world, x, y, z - */ - public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { - TileEntityRedstoneHandler aThis = getTileEntity(aWorld, aX, aY, aZ); - - if (!aWorld.isRemote) { - if (aThis.hasUpdatedRecently() && !aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { - aWorld.scheduleBlockUpdate(aX, aY, aZ, this, 4); - } else if (!aThis.hasUpdatedRecently() && aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { - aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 2); - } - } - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know which - * neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor - * Block - */ - public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block p_149695_5_) { - - TileEntityRedstoneHandler aThis = getTileEntity(aWorld, aX, aY, aZ); - - if (!aWorld.isRemote) { - if (aThis.hasUpdatedRecently() && !aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { - aWorld.scheduleBlockUpdate(aX, aY, aZ, this, 4); - } else if (!aThis.hasUpdatedRecently() && aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { - aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 2); - } - } - } - - /** - * Ticks the block if it's been scheduled - */ - public void updateTick(World aWorld, int aX, int aY, int aZ, Random p_149674_5_) { - TileEntityRedstoneHandler aTile = getTileEntity(aWorld, aX, aY, aZ); - // Client side handling - if (aTile != null) { - this.setLightLevel(aTile.getLightBrightness()); - } - // Only continue on server - if (aWorld.isRemote) { - return; - } - if (aTile != null) { - if (aTile.isGettingIndirectlyPowered()) { - } - } - } - - public TileEntityRedstoneHandler getTileEntity(IBlockAccess world, int aX, int aY, int aZ) { - TileEntity aTemp = world.getTileEntity(aX, aY, aZ); - if (aTemp != null) { - if (aTemp instanceof TileEntityRedstoneHandler) { - TileEntityRedstoneHandler g = (TileEntityRedstoneHandler) aTemp; - if (g != null) { - return g; - } - } - } - return null; - } - - - /** - * Gets an item for the block being called on. Args: world, x, y, z - */ - @SideOnly(Side.CLIENT) - @Override - public abstract Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_); - - /** - * Returns an item stack containing a single instance of the current block type. - * 'i' is the block's subtype/damage and is ignored for blocks which do not - * support subtypes. Blocks which cannot be harvested should return null. - */ - @Override - protected abstract ItemStack createStackedBlock(int p_149644_1_); - - @Override - public abstract ArrayList getDrops(final World world, final int x, final int y, final int z, final int metadata, final int fortune); - - @Override - public abstract Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_); - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java deleted file mode 100644 index 43247110f1..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java +++ /dev/null @@ -1,131 +0,0 @@ -package gtPlusPlus.core.block.general.redstone; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Random; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public class BlockGenericRedstoneDetector extends BlockGenericRedstone { - - public BlockGenericRedstoneDetector() { - super("detector", "Redstone Detector"); - setTickRandomly(true); - } - - @Override - public TileEntity createNewTileEntity(World world, int p_149915_2_) { - return new TileEntityRedstoneDetector(); - } - - public class TileEntityRedstoneDetector extends TileEntityRedstoneHandler { - public TileEntityRedstoneDetector() { - super(0); - } - - @Override - protected Class getTileEntityClass() { - return this.getClass(); - } - - @Override - protected String getTileEntityNameForRegistration() { - return "TileEntityRedstoneDetector"; - } - } - - @Override - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List aList) { - aList.add(ItemUtils.getSimpleStack(this)); - } - - - @Override - public void updateTick(World aWorld, int aX, int aY, int aZ, Random aRand) { - super.updateTick(aWorld, aX, aY, aZ, aRand); - } - - @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { - // TODO Auto-generated method stub - return ItemUtils.getSimpleStack(this).getItem(); - } - - @Override - public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { - // TODO Auto-generated method stub - return ItemUtils.getSimpleStack(this).getItem(); - } - - @Override - protected ItemStack createStackedBlock(int p_149644_1_) { - return ItemUtils.simpleMetaStack(this, p_149644_1_, 1); - } - - public void generateTextureArray(final IIconRegister iicon) { - HashMap> aTextures = new HashMap>(); - - - //New Block for Each Meta - int aMeta = 0; - { - HashMap aTempMap = new HashMap(); - aTempMap.put(ForgeDirection.UP, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.DOWN, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.NORTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.SOUTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.EAST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.WEST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTextures.put(aMeta++, aTempMap); - } - - } - - @Override - public IIcon getIcon(int side, int meta) { - HashMap aTemp = getTextureArray().get(meta); - if (aTemp != null) { - IIcon aSide = aTemp.get(ForgeDirection.getOrientation(side)); - if (aSide != null) { - return aSide; - } - else { - //Smart calculate missing sides - if (side <= 1) { - for (int ss = 0; ss < 2; ss++) { - aSide = aTemp.get(ForgeDirection.getOrientation(side)); - if (aSide != null) { - return aSide; - } - } - } - for (int ss = 2; ss < 6; ss++) { - aSide = aTemp.get(ForgeDirection.getOrientation(side)); - if (aSide != null) { - return aSide; - } - } - } - } - return blockIcon; - } - - @Override - public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { - ArrayList aDrops = new ArrayList(); - aDrops.add(ItemUtils.getSimpleStack(this)); - return aDrops; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java deleted file mode 100644 index df8a929302..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java +++ /dev/null @@ -1,5 +0,0 @@ -package gtPlusPlus.core.block.general.redstone; - -public class BlockGenericRedstoneEmitter { - -} diff --git a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java deleted file mode 100644 index 0f1f983cd0..0000000000 --- a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java +++ /dev/null @@ -1,201 +0,0 @@ -package gtPlusPlus.core.block.general.redstone; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.world.explosions.ExplosionHandler; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public class BlockGenericRedstoneTest extends BlockGenericRedstone { - - public BlockGenericRedstoneTest() { - super("test", "Redstone Test"); - setTickRandomly(true); - } - - @Override - public TileEntity createNewTileEntity(World world, int p_149915_2_) { - return new TileEntityRedstoneTest(); - } - - public class TileEntityRedstoneTest extends TileEntityRedstoneHandler { - public TileEntityRedstoneTest() { - super(2); - } - - @Override - public boolean isScrewdriverable() { - return true; - } - - @Override - public boolean onScrewdriverLMB() { - return super.onScrewdriverLMB(); - } - - @Override - public boolean onScrewdriverRMB() { - if (this.mLightValue + 0.0625f <= 1) { - this.mLightValue += 0.0625f; - } - else { - this.mLightValue = 0; - } - this.markForUpdate(); - return true; - } - - @Override - public boolean isMalletable() { - return true; - } - - @Override - public boolean onMalletLMB() { - return super.onMalletLMB(); - } - - @Override - public boolean onMalletRMB() { - this.mLightMode = Utils.invertBoolean(mLightMode); - this.markForUpdate(); - return mLightMode; - } - - @Override - public boolean isWrenchable() { - return true; - } - - @Override - public boolean onWrenchLMB() { - return super.onWrenchLMB(); - } - - @Override - public boolean onWrenchRMB() { - Logger.INFO("Found Wrench"); - ExplosionHandler explode = new ExplosionHandler(); - explode.createExplosion(this.worldObj, null, this.xCoord, this.yCoord, this.zCoord, 1f, false, true); - return true; - } - - @Override - protected Class getTileEntityClass() { - return this.getClass(); - } - - @Override - protected String getTileEntityNameForRegistration() { - return "TileEntityRedstoneTest"; - } - - @Override - public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { - return super.isProvidingWeakPower(world, x, y, z, side); - } - - @Override - public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { - return super.isProvidingStrongPower(world, x, y, z, side); - } - } - - @SuppressWarnings("unchecked") - @Override - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List aList) { - aList.add(ItemUtils.getSimpleStack(this)); - } - - - @Override - public void updateTick(World aWorld, int aX, int aY, int aZ, Random aRand) { - super.updateTick(aWorld, aX, aY, aZ, aRand); - } - - @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { - return ItemUtils.getSimpleStack(this).getItem(); - } - - @Override - public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { - return ItemUtils.getSimpleStack(this).getItem(); - } - - @Override - protected ItemStack createStackedBlock(int p_149644_1_) { - return ItemUtils.simpleMetaStack(this, p_149644_1_, 1); - } - - public void generateTextureArray(final IIconRegister iicon) { - HashMap> aTextures = new HashMap>(); - - - //New Block for Each Meta - int aMeta = 0; - { - HashMap aTempMap = new HashMap(); - aTempMap.put(ForgeDirection.UP, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.DOWN, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.NORTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.SOUTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.EAST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTempMap.put(ForgeDirection.WEST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); - aTextures.put(aMeta++, aTempMap); - } - - } - - @Override - public IIcon getIcon(int side, int meta) { - HashMap aTemp = getTextureArray().get(meta); - if (aTemp != null) { - IIcon aSide = aTemp.get(ForgeDirection.getOrientation(side)); - if (aSide != null) { - return aSide; - } - else { - //Smart calculate missing sides - if (side <= 1) { - for (int ss = 0; ss < 2; ss++) { - aSide = aTemp.get(ForgeDirection.getOrientation(side)); - if (aSide != null) { - return aSide; - } - } - } - for (int ss = 2; ss < 6; ss++) { - aSide = aTemp.get(ForgeDirection.getOrientation(side)); - if (aSide != null) { - return aSide; - } - } - } - } - return blockIcon; - } - - @Override - public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { - ArrayList aDrops = new ArrayList(); - aDrops.add(ItemUtils.getSimpleStack(this)); - return aDrops; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java b/src/Java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java deleted file mode 100644 index a4ed895b13..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import net.minecraft.block.material.Material; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.world.IBlockAccess; - -import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; -import gtPlusPlus.core.block.base.MetaBlock; -import gtPlusPlus.core.lib.CORE; - -public class BlockGtFrameBox extends MetaBlock { - - private int[] colours; - private int totalColours; - - public BlockGtFrameBox( - final String unlocalizedName, final Material material, - final BlockTypes blockTypeENUM, final boolean recolour, final int... colour) { - super(unlocalizedName, material, blockTypeENUM.getBlockSoundType()); - this.setBlockTextureName(CORE.MODID + ":" + "blockGtFrame"); - this.setHarvestLevel(blockTypeENUM.getHarvestTool(), 2); - if (recolour && ((colour != null) && (colour.length > 0))){ - this.colours = colour; - this.totalColours = this.colours.length; - } - } - - @Override - public int colorMultiplier(final IBlockAccess p_149720_1_, final int p_149720_2_, - final int p_149720_3_, final int p_149720_4_) { - for (final int i : this.colours){ - - } - return super.colorMultiplier(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/block/machine/CircuitProgrammer.java b/src/Java/gtPlusPlus/core/block/machine/CircuitProgrammer.java deleted file mode 100644 index 7d8b3eb708..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/CircuitProgrammer.java +++ /dev/null @@ -1,159 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.minecraft.CubicObject; -import gtPlusPlus.core.block.base.BasicTileBlockWithTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -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; - -public class CircuitProgrammer extends BasicTileBlockWithTooltip { - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 4; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public CircuitProgrammer(){ - super(Material.iron); - LanguageRegistry.addName(this, "Circuit Programmer"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - else { - - boolean mDidScrewDriver = false; - // Check For Screwdriver - try { - final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); - final Item mHandItem = mHandStack.getItem(); - if (((mHandItem instanceof GT_MetaGenerated_Tool_01) - && ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { - final TileEntityCircuitProgrammer tile = (TileEntityCircuitProgrammer) world.getTileEntity(x, y, z); - if (tile != null) { - mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); - } - } - } - catch (final Throwable t) {} - - if (!mDidScrewDriver) { - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityCircuitProgrammer)){ - player.openGui(GTplusplus.instance, GuiHandler.GUI8, world, x, y, z); - return true; - } - } - else { - return true; - } - - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityCircuitProgrammer(); - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityCircuitProgrammer) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public int getMetaCount() { - return 0; - } - - @Override - public String getUnlocalBlockName() { - return "blockCircuitProgrammer"; - } - - @Override - protected float initBlockHardness() { - return 5f; - } - - @Override - protected float initBlockResistance() { - return 1f; - } - - @Override - protected CreativeTabs initCreativeTab() { - return AddToCreativeTab.tabMachines; - } - - @Override - protected String getTileEntityName() { - return "Circuit Programmer"; - } - - @Override - public CubicObject[] getCustomTextureDirectoryObject() { - String[] aTexData = new String[] { - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_G", - CORE.MODID + ":" + "metro/" + "TEXTURE_TECH_PANEL_B", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I" - }; - CubicObject[] aTextureData = new CubicObject[] {new CubicObject(aTexData)}; - return aTextureData; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java b/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java deleted file mode 100644 index 15d330defc..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java +++ /dev/null @@ -1,223 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.client.renderer.RenderDecayChest; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; -import gtPlusPlus.core.util.minecraft.InventoryUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class DecayablesChest extends BlockContainer implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 5; - public final int field_149956_a = 0; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public DecayablesChest() - { - super(Material.iron); - this.setBlockName("blockDecayablesChest"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setHardness(5f); - this.setResistance(1f); - GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockDecayablesChest"); - LanguageRegistry.addName(this, "Lead Lined Box"); - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - - } - - /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. - */ - public boolean isOpaqueCube() - { - return false; - } - - /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) - */ - public boolean renderAsNormalBlock() - { - return false; - } - - /** - * The type of render function that is called for this block - */ - @SideOnly(Side.CLIENT) - public int getRenderType(){ - try { - if (RenderDecayChest.INSTANCE != null){ - return RenderDecayChest.INSTANCE.mRenderID; - } - return super.getRenderType(); - } - catch (NullPointerException n) { - return 0; - } - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, y, z - */ - public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) - { - if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this) - { - this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F); - } - else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this) - { - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F); - } - else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this) - { - this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - } - else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this) - { - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F); - } - else - { - this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - } - } - - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : this.textureFront); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_top"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_side"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_bottom"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityDecayablesChest)){ - player.openGui(GTplusplus.instance, GuiHandler.GUI13, world, x, y, z); - return true; - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityDecayablesChest(); - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { - InventoryUtils.dropInventoryItems(world, x, y, z, block); - super.breakBlock(world, x, y, z, block, number); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityDecayablesChest) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - /*@Override - public void breakBlock(World world, BlockPos pos, IBlockState blockstate) { - TileEntityFishTrap te = (TileEntityFishTrap) world.getTileEntity(pos); - InventoryHelper.dropInventoryItems(world, pos, te); - super.breakBlock(world, pos, blockstate); - } - - - @Override - public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityFishTrap) worldIn.getTileEntity(pos)).setCustomName(stack.getDisplayName()); - } - }*/ - - /** - * Update Chest Meta - Stub - * @param aWorld - * @param xPos - * @param yPos - * @param zPos - */ - @Deprecated - public void func_149954_e(World aWorld, int xPos, int yPos, int zPos) - { - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/EggBox.java b/src/Java/gtPlusPlus/core/block/machine/EggBox.java deleted file mode 100644 index 630c4b5bc2..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/EggBox.java +++ /dev/null @@ -1,175 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityEggBox; -import gtPlusPlus.core.util.minecraft.InventoryUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class EggBox extends BlockContainer implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 7; - public final int field_149956_a = 0; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public EggBox(){ - super(Material.wood); - this.setBlockName("blockEggBox"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setHardness(5f); - this.setResistance(1f); - GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockEggBox"); - LanguageRegistry.addName(this, "Egg Box"); - - } - - /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) - */ - public boolean renderAsNormalBlock() - { - return true; - } - - /** - * The type of render function that is called for this block - */ - @SideOnly(Side.CLIENT) - public int getRenderType(){ - return super.getRenderType(); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : this.textureFront; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_top"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_side"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_side"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityEggBox)){ - player.openGui(GTplusplus.instance, GuiHandler.GUI17, world, x, y, z); - return true; - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 0; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityEggBox(); - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { - InventoryUtils.dropInventoryItems(world, x, y, z, block); - super.breakBlock(world, x, y, z, block, number); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityEggBox) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - /*@Override - public void breakBlock(World world, BlockPos pos, IBlockState blockstate) { - TileEntityFishTrap te = (TileEntityFishTrap) world.getTileEntity(pos); - InventoryHelper.dropInventoryItems(world, pos, te); - super.breakBlock(world, pos, blockstate); - } - - - @Override - public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityFishTrap) worldIn.getTileEntity(pos)).setCustomName(stack.getDisplayName()); - } - }*/ - - /** - * Update Chest Meta - Stub - * @param aWorld - * @param xPos - * @param yPos - * @param zPos - */ - @Deprecated - public void func_149954_e(World aWorld, int xPos, int yPos, int zPos) - { - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/FishTrap.java b/src/Java/gtPlusPlus/core/block/machine/FishTrap.java deleted file mode 100644 index 037ec61ced..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/FishTrap.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; -import gtPlusPlus.core.util.minecraft.InventoryUtils; - -public class FishTrap extends BlockContainer implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 0; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public FishTrap() - { - super(Material.iron); - this.setBlockName("blockFishTrap"); - this.setHardness(5f); - this.setResistance(1f); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockFishTrap"); - LanguageRegistry.addName(this, "Fish Catcher"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityFishTrap)){ - player.openGui(GTplusplus.instance, 5, world, x, y, z); - return true; - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityFishTrap(); - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { - InventoryUtils.dropInventoryItems(world, x, y, z, block); - super.breakBlock(world, x, y, z, block, number); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityFishTrap) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - /*@Override - public void breakBlock(World world, BlockPos pos, IBlockState blockstate) { - TileEntityFishTrap te = (TileEntityFishTrap) world.getTileEntity(pos); - InventoryHelper.dropInventoryItems(world, pos, te); - super.breakBlock(world, pos, blockstate); - } - - - @Override - public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityFishTrap) worldIn.getTileEntity(pos)).setCustomName(stack.getDisplayName()); - } - }*/ - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/HeliumGenerator.java b/src/Java/gtPlusPlus/core/block/machine/HeliumGenerator.java deleted file mode 100644 index 5dc8604a93..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/HeliumGenerator.java +++ /dev/null @@ -1,95 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator; - -public class HeliumGenerator extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - - @SuppressWarnings("deprecation") - public HeliumGenerator() - { - super(Material.wood); - this.setBlockName("blockHeliumGenerator"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockHeliumGenerator"); - LanguageRegistry.addName(this, "Helium Generator"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityHeliumGenerator)){ //TODO - player.openGui(GTplusplus.instance, 1, world, x, y, z); //TODO - return true; - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityHeliumGenerator(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java deleted file mode 100644 index 6f60d39ce7..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java +++ /dev/null @@ -1,103 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; - -public class Machine_ModularityTable extends BlockContainer implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 1; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public Machine_ModularityTable() - { - super(Material.iron); - this.setBlockName("blockModularity"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockModularity"); - LanguageRegistry.addName(this, "Modularity Configurator"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_side"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_top"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_output"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_side"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz){ - if (world.isRemote) { - return true; - } - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityModularityTable)){ - player.openGui(GTplusplus.instance, 1, world, x, y, z); - Logger.INFO("Player opened GUI"); - return true; - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityModularityTable(); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java b/src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java deleted file mode 100644 index 11fa80f439..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_PestKiller.java +++ /dev/null @@ -1,137 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; -import gtPlusPlus.core.util.minecraft.InventoryUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class Machine_PestKiller extends BlockContainer implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 6; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public Machine_PestKiller() - { - super(Material.wood); - this.setBlockName("blockPestKiller"); - this.setHardness(5f); - this.setResistance(1f); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockPestKiller"); - LanguageRegistry.addName(this, "Pest Killer"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int aSide, final int p_149691_2_) - { - return aSide == 1 ? this.textureTop : (aSide == 0 ? this.textureBottom : this.textureFront); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_PESTKILLER_TOP"); - this.textureBottom = p_149651_1_.registerIcon("planks_acacia"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityPestKiller)){ - player.openGui(GTplusplus.instance, GuiHandler.GUI15, world, x, y, z); - return true; - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 0; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityPestKiller(); - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { - InventoryUtils.dropInventoryItems(world, x, y, z, block); - super.breakBlock(world, x, y, z, block, number); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityPestKiller) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_PooCollector.java b/src/Java/gtPlusPlus/core/block/machine/Machine_PooCollector.java deleted file mode 100644 index 945cf7b581..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_PooCollector.java +++ /dev/null @@ -1,182 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityAdvPooCollector; -import gtPlusPlus.core.tileentities.machines.TileEntityBaseFluidCollector; -import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class Machine_PooCollector extends BlockContainer { - - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureTop2; - @SideOnly(Side.CLIENT) - private IIcon textureSide; - @SideOnly(Side.CLIENT) - private IIcon textureSide2; - - public Machine_PooCollector() { - super(Material.iron); - this.setHardness(5f); - this.setResistance(1f); - this.setBlockName("blockPooCollector"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockMeta.class,"blockPooCollector"); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int aSide, final int aMeta) { - if (aMeta <= 7) { - blockIcon = textureSide; - return aSide <= 1 ? this.textureTop : this.textureSide; - } - else { - blockIcon = textureSide2; - return aSide <= 1 ? this.textureTop2 : this.textureSide2; - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_top"); - this.textureTop2 = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_adv_top"); - this.textureSide = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_sides"); - this.textureSide2 = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_adv_sides"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, - final int side, final float lx, final float ly, final float lz) { - if (world.isRemote) { - return true; - } else { - TileEntityBaseFluidCollector tank = (TileEntityBaseFluidCollector) world.getTileEntity(x, y, z); - if (tank != null) { - Item handItem; - try { - handItem = player.getHeldItem().getItem(); - } catch (Throwable t) { - handItem = null; - } - - //Fluid container code - /*if (handItem != null - && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer - || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) { - if (tank.tank.getFluid() == null) { - try { - if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())) { - ItemStack handItemStack = player.getHeldItem(); - IFluidContainerItem container = (IFluidContainerItem) handItem; - FluidStack containerFluid = container.getFluid(handItemStack); - container.drain(handItemStack, container.getFluid(handItemStack).amount, true); - tank.tank.setFluid(containerFluid); - } else { - ItemStack handItemStack = player.getHeldItem(); - FluidContainerRegistry.drainFluidContainer(handItemStack); - FluidStack containerFluid = FluidContainerRegistry.getFluidForFilledItem(handItemStack); - ItemStack emptyContainer = FluidContainerRegistry.drainFluidContainer(handItemStack); - player.setItemInUse(emptyContainer, 0); - - tank.tank.setFluid(containerFluid); - } - } catch (Throwable t) { - t.printStackTrace(); - } - } - - }*/ - - if (!tank.mInventory.isEmpty()) { - PlayerUtils.messagePlayer(player, "Inventory contains:"); - PlayerUtils.messagePlayer(player, ItemUtils.getArrayStackNames(tank.mInventory.getRealInventory())); - } - else { - PlayerUtils.messagePlayer(player, "No solids collected yet."); - } - if (tank.tank.getFluid() != null) { - PlayerUtils.messagePlayer(player, "Tank contains " + tank.tank.getFluidAmount() + "L of " - + tank.tank.getFluid().getLocalizedName()); - } - } - } - return true; - } - - @Override - public int getRenderBlockPass() { - return 0; - } - - @Override - public boolean isOpaqueCube() { - return super.isOpaqueCube(); - } - - @Override - public TileEntity createNewTileEntity(final World world, final int aMeta) { - return aMeta <= 7 ? new TileEntityPooCollector() : new TileEntityAdvPooCollector(); - } - - @Override - public void onBlockAdded(World world, int x, int y, int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public int getBlockColor() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int damageDropped(final int damage) { - return damage; - } - - @Override - public Item getItemDropped(final int meta, final Random rand, final int fortune) { - return Item.getItemFromBlock(this); - } - - @Override - public int getRenderColor(int aMeta) { - return super.getRenderColor(aMeta); - } - - @Override - public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { - aList.add(new ItemStack(aItem, 1, 0)); - aList.add(new ItemStack(aItem, 1, 8)); - } - -} diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java deleted file mode 100644 index fdb6b1a0a8..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java +++ /dev/null @@ -1,164 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.item.tool.ItemToolWrench; - -@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") -public class Machine_ProjectTable extends BlockContainer implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 3; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @SuppressWarnings("deprecation") - public Machine_ProjectTable() - { - super(Material.iron); - this.setBlockName("blockProjectBench"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockProjectBench"); - LanguageRegistry.addName(this, "Project Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - ItemStack heldItem = null; - if (world.isRemote){ - heldItem = PlayerUtils.getItemStackInPlayersHand(); - } - - boolean holdingWrench = false; - - if (heldItem != null){ - holdingWrench = isWrench(heldItem); - } - - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityProjectTable)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 0, world, x, y, z); - return true; - } - Logger.INFO("Holding a Wrench, doing wrench things instead."); - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityProjectTable(); - } - - public static boolean isWrench(final ItemStack item){ - if (item.getItem() instanceof ItemToolWrench){ - return true; - } - if (LoadedMods.BuildCraft){ - return checkBuildcraftWrench(item); - } - if (LoadedMods.EnderIO){ - return checkEnderIOWrench(item); - } - return false; - } - - @Optional.Method(modid = "EnderIO") - private static boolean checkEnderIOWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Optional.Method(modid = "Buildcraft") - private static boolean checkBuildcraftWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java b/src/Java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java deleted file mode 100644 index dc87b885b9..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java +++ /dev/null @@ -1,131 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.CubicObject; -import gtPlusPlus.core.block.base.BasicTileBlockWithTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockRoundRobinator; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class Machine_RoundRobinator extends BasicTileBlockWithTooltip { - - - public Machine_RoundRobinator(){ - super(Material.iron); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - else { - - boolean mDidScrewDriver = false; - // Check For Screwdriver - try { - final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); - if (ItemUtils.isToolScrewdriver(mHandStack)) { - final TileEntityRoundRobinator tile = (TileEntityRoundRobinator) world.getTileEntity(x, y, z); - if (tile != null) { - mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); - } - } - } - catch (final Throwable t) {} - - if (!mDidScrewDriver) { - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityRoundRobinator)){ - return ((TileEntityRoundRobinator) te).onRightClick((byte) side, player, x, y, z); - } - return false; - } - else { - return true; - } - } - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityRoundRobinator(); - } - - @Override - public int getMetaCount() { - return 5; - } - - @Override - public String getUnlocalBlockName() { - return "blockRoundRobinator"; - } - - @Override - protected float initBlockHardness() { - return 1; - } - - @Override - protected float initBlockResistance() { - return 1; - } - - @Override - protected CreativeTabs initCreativeTab() { - return AddToCreativeTab.tabMachines; - } - - @Override - public int getTooltipID() { - return -1; - } - - @Override - protected String getTileEntityName() { - return "Round Robinator"; - } - - @Override - public Class getItemBlockClass() { - return ItemBlockRoundRobinator.class; - } - - @Override - public CubicObject[] getCustomTextureDirectoryObject() { - AutoMap aTemp = new AutoMap(); - for (int i=0;i<5;i++) { - String[] aTexData = new String[] { - CORE.MODID + ":" + "TileEntities/RoundRobinator/Top_"+i, - CORE.MODID + ":" + "TileEntities/RoundRobinator/Top_"+i, - CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, - CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, - CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, - CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, - }; - aTemp.put(aTexData); - } - AutoMap> aTemp2 = new AutoMap>(); - for (String[] y : aTemp) { - aTemp2.put(new CubicObject(y)); - } - CubicObject[] aTextureData = new CubicObject[] {aTemp2.get(0), aTemp2.get(1), aTemp2.get(2), aTemp2.get(3), aTemp2.get(4)}; - return aTextureData; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java b/src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java deleted file mode 100644 index 021279f820..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java +++ /dev/null @@ -1,579 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.inventories.Inventory_SuperJukebox; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockJukebox; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemRecord; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class Machine_SuperJukebox extends BlockJukebox -{ - @SideOnly(Side.CLIENT) - private IIcon mIcon; - - public Machine_SuperJukebox(){ - this.setBlockName("blockSuperJukebox"); - this.setCreativeTab(CreativeTabs.tabRedstone); - setHardness(2.0F); - setResistance(10.0F); - setStepSound(soundTypePiston); - setBlockTextureName("jukebox"); - GameRegistry.registerBlock(this, "blockSuperJukebox"); - LanguageRegistry.addName(this, "Sir Mixalot [Jukebox]"); - } - - /** - * Gets the block's texture. Args: side, meta - */ - @SideOnly(Side.CLIENT) - public IIcon getIcon(int aSide, int aMeta) - { - return aSide == 1 ? this.mIcon : this.blockIcon; - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntitySuperJukebox)){ - player.openGui(GTplusplus.instance, GuiHandler.GUI14, world, x, y, z); - return true; - } - return false; - - - /* if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) - { - return false; - } - else - { - this.func_149925_e(aWorld, aX, aY, aZ); - return true; - }*/ - } - - /** - * Set the record in the {@link SuperJukebox} {@link TileEntity}. - */ - @Override - public final void func_149926_b(World aWorld, int aX, int aY, int aZ, ItemStack aStackToSet) { - setRecordInJukeBox(aWorld, aX, aY, aZ, aStackToSet); - } - - public void setRecordInJukeBox(World aWorld, int aX, int aY, int aZ, ItemStack aStackToSet) { - if (!aWorld.isRemote) { - TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, aY, aZ); - if (tileentityjukebox != null && aStackToSet.getItem() instanceof ItemRecord) { - tileentityjukebox.setCurrentRecord(aStackToSet.copy()); - //aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 1, 2); - } - } - } - - /** - * Function to handle playing of records. - */ - @Override - public final void func_149925_e(World aWorld, int aX, int aY, int aZ) { - playJukeboxRecord(aWorld, aX, aY, aZ); - } - - public void playJukeboxRecord(World aWorld, int aX, int aY, int aZ) { - if (!aWorld.isRemote) { - TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, - aY, aZ); - - if (tileentityjukebox != null) { - ItemStack itemstack = tileentityjukebox.func_145856_a(); - - if (itemstack != null) { - - - - aWorld.playAuxSFX(1005, aX, aY, aZ, Item.getIdFromItem(itemstack.getItem())); - //aWorld.playRecord((String) null, aX, aY, aZ); - //tileentityjukebox.func_145857_a((ItemStack) null); - //aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 0, 2); - /*float f = 0.7F; - double d0 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double d1 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.2D + 0.6D; - double d2 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - ItemStack itemstack1 = itemstack.copy(); - EntityItem entityitem = new EntityItem(aWorld, (double) aX + d0, - (double) aY + d1, (double) aZ + d2, itemstack1); - entityitem.delayBeforeCanPickup = 10; - aWorld.spawnEntityInWorld(entityitem);*/ - } - } - } - } - - @Override - public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) - { - this.func_149925_e(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_); - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - } - - /** - * Drops the block items with a specified chance of dropping the specified items - */ - @Override - public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) - { - if (!p_149690_1_.isRemote) - { - super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0); - } - } - - /** - * Returns a new instance of a block's tile entity class. Called on placing the block. - */ - @Override - public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) - { - return new TileEntitySuperJukebox(); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(this.getTextureName() + "_side"); - this.mIcon = p_149651_1_.registerIcon(this.getTextureName() + "_top"); - } - - public static class TileEntitySuperJukebox extends TileEntityJukebox implements ISidedInventory { - - /** The number of players currently using this chest */ - public int numPlayersUsing; - private ItemStack mCurrentlyPlayingStack; - private final Inventory_SuperJukebox inventoryContents; - private String customName; - - - /* - * Important Data - */ - - public int a_TEST_INT_VAR_1; - public int a_TEST_INT_VAR_2; - public int a_TEST_INT_VAR_3; - public int a_TEST_INT_VAR_4; - - public boolean mIsPlaying = false; - public boolean mIsLooping = false; - public boolean a_TEST_BOOL_VAR_3; - public boolean a_TEST_BOOL_VAR_4; - - - - public TileEntitySuperJukebox() { - this.inventoryContents = new Inventory_SuperJukebox(); - } - - @Override - public void readFromNBT(NBTTagCompound aNBT) { - super.readFromNBT(aNBT); - - if (aNBT.hasKey("RecordItem", 10)) { - this.func_145857_a(ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("RecordItem"))); - } else if (aNBT.getInteger("Record") > 0) { - this.func_145857_a(new ItemStack(Item.getItemById(aNBT.getInteger("Record")), 1, 0)); - } - - this.inventoryContents.readFromNBT(aNBT.getCompoundTag("ContentsChest")); - if (aNBT.hasKey("CustomName", 8)) { - this.setCustomName(aNBT.getString("CustomName")); - } - - mIsPlaying = aNBT.getBoolean("mIsPlaying"); - mIsLooping = aNBT.getBoolean("mIsLooping"); - - - } - - @Override - public void writeToNBT(NBTTagCompound aNBT) { - super.writeToNBT(aNBT); - - if (this.getCurrentRecord() != null) { - aNBT.setTag("RecordItem", this.func_145856_a().writeToNBT(new NBTTagCompound())); - aNBT.setInteger("Record", Item.getIdFromItem(this.func_145856_a().getItem())); - } - - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - aNBT.setTag("ContentsChest", chestData); - if (this.hasCustomInventoryName()) { - aNBT.setString("CustomName", this.getCustomName()); - } - - aNBT.setBoolean("mIsPlaying", mIsPlaying); - aNBT.setBoolean("mIsLooping", mIsLooping); - - } - - /** - * Called to get the internal stack - */ - @Override - public ItemStack func_145856_a() { - return this.mCurrentlyPlayingStack; - } - - /** - * Called to get the internal stack, wraps vanilla function - * {@link func_145856_a}. - */ - public ItemStack getCurrentRecord() { - return func_145856_a(); - } - - /** - * Called to set the internal stack - */ - @Override - public void func_145857_a(ItemStack p_145857_1_) { - this.mCurrentlyPlayingStack = p_145857_1_; - this.markDirty(); - } - - /** - * Called to set the internal stack, wraps vanilla function - * {@link func_145857_a}. - */ - public void setCurrentRecord(ItemStack aStack) { - func_145857_a(aStack); - this.markDirty(); - } - - public Inventory_SuperJukebox getInventory() { - return this.inventoryContents; - } - - - - - - public boolean playRecord(ItemStack aRecord) { - - - - return false; - } - - public boolean stopRecord() { - return openDiscDrive(); - } - - public void setLoopState(boolean isShufflingForever) { - - - - } - - - //Play button pressed - public boolean jukeboxLogicUpdate() { - - if (this.worldObj.isRemote) { - return true; - } - - Logger.INFO("a"); - if (this.mIsPlaying || this.mIsLooping) { - return selectRecordToPlayFromInventoryAndSetViaVanillaHandler(); - } - else { - return stopRecord(); - } - } - - - //Determine which record to play - public boolean selectRecordToPlayFromInventoryAndSetViaVanillaHandler() { - AutoMap mValidRecords = new AutoMap(); - for (ItemStack g : this.getInventory().getInventory()) { - if (g != null) { - if (g.getItem() instanceof ItemRecord) { - mValidRecords.put(g); - } - } - } - - Logger.INFO("b1"); - //Select First Record - ItemStack aRecordToPlay; - if (mValidRecords.size() == 0) { - Logger.INFO("bX"); - return false; - } - else { - aRecordToPlay = mValidRecords.get(!mIsLooping ? 0 : MathUtils.randInt(0, (mValidRecords.size()-1))); - } - Logger.INFO("b2 - "+aRecordToPlay.getDisplayName()); - - int aSlotCounter = 0; - for (ItemStack g : this.getInventory().getInventory()) { - if (g != null && aSlotCounter <= 17) { - Logger.INFO("b3 - "+g.getDisplayName()); - if (GT_Utility.areStacksEqual(g, aRecordToPlay, true)) { - IInventory aThisInv = this.getInventory(); - if (aThisInv.getStackInSlot(20) != null) { - openDiscDrive(); - } - - GT_Utility.moveStackFromSlotAToSlotB(aThisInv, aThisInv, aSlotCounter, 20, (byte) 1, (byte) 1, (byte) 1, (byte) 1); - setCurrentRecord(aThisInv.getStackInSlot(20)); - - World aWorld = this.worldObj; - int aX = this.xCoord; - int aY = this.yCoord; - int aZ = this.zCoord; - if (!aWorld.isRemote) { - aRecordToPlay = this.func_145856_a(); - if (aRecordToPlay != null) { - aWorld.playAuxSFX(1005, aX, aY, aZ, Item.getIdFromItem(aRecordToPlay.getItem())); - this.markDirty(); - return true; - } - } - - Logger.INFO("b++"); - this.markDirty(); - return false; - } - } - aSlotCounter++; - } - - - Logger.INFO("b4"); - this.markDirty(); - return false; - } - - - public boolean genericMethodThree(Object a1, Object a2, Object a3, Object a4) { - return false; - } - - - public void vanillaStopJukebox() { - World aWorld = this.worldObj; - int aX = this.xCoord; - int aY = this.yCoord; - int aZ = this.zCoord; - if (!aWorld.isRemote) { - TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, aY, aZ); - if (tileentityjukebox != null) { - ItemStack aRecordToPlay = tileentityjukebox.func_145856_a(); - if (aRecordToPlay != null) { - aWorld.playAuxSFX(1005, aX, aY, aZ, 0); - aWorld.playRecord((String) null, aX, aY, aZ); - tileentityjukebox.func_145857_a((ItemStack) null); - this.markDirty(); - } - } - } - } - - public boolean openDiscDrive() { - int aSlotCounter = 17; - - ItemStack g; - - for (int i = 17; i >= 0; i--) { - g = this.getInventory().getInventory()[i]; - if (g == null && aSlotCounter >= 0) { - IInventory aThisInv = this.getInventory(); - GT_Utility.moveStackFromSlotAToSlotB(aThisInv, aThisInv, 20, i, (byte) 1, (byte) 1, (byte) 1, (byte) 1); - vanillaStopJukebox(); - Logger.INFO("b++"); - this.markDirty(); - return true; - - } - } - - - /*for (ItemStack g : this.getInventory().getInventory()) { - if (g == null && aSlotCounter >= 0) { - IInventory aThisInv = this.getInventory(); - GT_Utility.moveStackFromSlotAToSlotB(aThisInv, aThisInv, 20, aSlotCounter, (byte) 1, (byte) 1, (byte) 1, (byte) 1); - vanillaStopJukebox(); - Logger.INFO("b++"); - return true; - - } - aSlotCounter--; - } */ - this.markDirty(); - return false; - } - - - - - - - - - - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, - 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory()-3; - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - if (this.numPlayersUsing < 0) { - this.numPlayersUsing = 0; - } - if (!this.worldObj.isRemote) { - this.numPlayersUsing++; - } - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, - this.numPlayersUsing); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - if (!this.worldObj.isRemote) { - this.numPlayersUsing--; - } - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, - this.numPlayersUsing); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - if (slot >= 18) { - return false; - } - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - private final static int[] SIDED_SLOTS = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return SIDED_SLOTS; - - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - if (p_102007_1_ >= 18) { - return false; - } - return this.getInventory().isItemValidForSlot(p_102007_1_, p_102007_2_); - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - if (p_102008_1_ >= 18) { - return false; - } - return this.getInventory().isItemValidForSlot(p_102008_1_, p_102008_2_); - } - - public String getCustomName() { - return this.customName; - } - - public void setCustomName(final String customName) { - this.customName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.SuperJukebox"; - } - - @Override - public boolean hasCustomInventoryName() { - return (this.customName != null) && !this.customName.equals(""); - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java deleted file mode 100644 index 5195e0f18c..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.base.BlockBaseNBT; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; - -public class Machine_TradeTable extends BlockBaseNBT implements ITileTooltip -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 2; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - public Machine_TradeTable(){ - super(Material.leaves, "blockTradeBench", "Trade-o-Mat"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_){ - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "workbench_top"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz){ - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityTradeTable)) - { - //Utils.LOG_INFO("Clicked on TE - ok"); - player.openGui(GTplusplus.instance, 6, world, x, y, z); - return true; - } - else { - Logger.INFO("Bad TE"); - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityTradeTable(); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java b/src/Java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java deleted file mode 100644 index e964a9da01..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java +++ /dev/null @@ -1,5 +0,0 @@ -package gtPlusPlus.core.block.machine; - -public class Machine_WireiusDeletus { //A Block that removes GT Cable and Wire from it's inventory. - -} diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java deleted file mode 100644 index 5c08612042..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.item.tool.ItemToolWrench; - -@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") -public class Machine_Workbench extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_Workbench() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGT"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGT"); - LanguageRegistry.addName(this, "Bronze Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_top_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - ItemStack heldItem = null; - if (world.isRemote){ - heldItem = PlayerUtils.getItemStackInPlayersHand(); - } - - boolean holdingWrench = false; - - if (heldItem != null){ - holdingWrench = isWrench(heldItem); - } - - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbench)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 3, world, x, y, z); - return true; - } - Logger.INFO("Holding a Wrench, doing wrench things instead."); - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbench(); - } - - public static boolean isWrench(final ItemStack item){ - if (item.getItem() instanceof ItemToolWrench){ - return true; - } - if (LoadedMods.BuildCraft){ - return checkBuildcraftWrench(item); - } - if (LoadedMods.EnderIO){ - return checkEnderIOWrench(item); - } - return false; - } - - @Optional.Method(modid = "EnderIO") - private static boolean checkEnderIOWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Optional.Method(modid = "Buildcraft") - private static boolean checkBuildcraftWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java b/src/Java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java deleted file mode 100644 index af2f9f82e0..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -public class Machine_WorkbenchAdvanced extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_WorkbenchAdvanced() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGTAdvanced"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGTAdvanced"); - LanguageRegistry.addName(this, "Advanced Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - /*final ItemStack heldItem = PlayerUtils.getItemStackInPlayersHand(player); - if (world.isRemote) { - return true; - } - boolean holdingWrench = false; - - if (heldItem != null){ - if (heldItem.getItem() instanceof ItemToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof IToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof ITool){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof GT_MetaGenerated_Tool){ - GT_MetaGenerated_Tool testTool = (GT_MetaGenerated_Tool) heldItem.getItem(); - if (testTool.canWrench(player, x, y, z)){ - holdingWrench = true; - } - } - else { - holdingWrench = false; - } - } - - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbenchAdvanced)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 4, world, x, y, z); - return true; - } - Utils.LOG_INFO("Holding a Wrench, doing wrench things instead."); - }*/ - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbenchAdvanced(128000, 2); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java b/src/Java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java deleted file mode 100644 index 36ea2af7cc..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java +++ /dev/null @@ -1,169 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.minecraft.CubicObject; -import gtPlusPlus.core.block.base.BasicTileBlockWithTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui2; -import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -public class VolumetricFlaskSetter extends BasicTileBlockWithTooltip { - - /** - * Determines which tooltip is displayed within the itemblock. - */ - private final int mTooltipID = 8; - - @Override - public int getTooltipID() { - return this.mTooltipID; - } - - @Override - public Class getItemBlockClass() { - return ItemBlockBasicTile.class; - } - - @SuppressWarnings("deprecation") - public VolumetricFlaskSetter(){ - super(Material.iron); - LanguageRegistry.addName(this, "Volumetric Flask Configurator"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - if (world.isRemote) { - return true; - } - else { - - boolean mDidScrewDriver = false; - // Check For Screwdriver - try { - final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); - final Item mHandItem = mHandStack.getItem(); - if (((mHandItem instanceof GT_MetaGenerated_Tool_01) - && ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { - final TileEntityVolumetricFlaskSetter tile = (TileEntityVolumetricFlaskSetter) world.getTileEntity(x, y, z); - if (tile != null) { - mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); - } - } - } - catch (final Throwable t) {} - - if (!mDidScrewDriver) { - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityVolumetricFlaskSetter)){ - player.openGui(GTplusplus.instance, GuiHandler.GUI18, world, x, y, z); - TileEntityVolumetricFlaskSetter aTile = (TileEntityVolumetricFlaskSetter) te; - //new Packet_VolumetricFlaskGui2(aTile, aTile.getCustomValue()); - return true; - } - } - else { - return true; - } - - } - return false; - } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityVolumetricFlaskSetter(); - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { - if (stack.hasDisplayName()) { - ((TileEntityVolumetricFlaskSetter) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public int getMetaCount() { - return 0; - } - - @Override - public String getUnlocalBlockName() { - return "blockVolumetricFlaskSetter"; - } - - @Override - protected float initBlockHardness() { - return 5f; - } - - @Override - protected float initBlockResistance() { - return 1f; - } - - @Override - protected CreativeTabs initCreativeTab() { - return AddToCreativeTab.tabMachines; - } - - @Override - protected String getTileEntityName() { - return "Volumetric Flask Configurator"; - } - - @Override - public CubicObject[] getCustomTextureDirectoryObject() { - String[] aTexData = new String[] { - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_A", - CORE.MODID + ":" + "metro/" + "TEXTURE_TECH_PANEL_C", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", - CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H" - }; - CubicObject[] aTextureData = new CubicObject[] {new CubicObject(aTexData)}; - return aTextureData; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java b/src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java deleted file mode 100644 index b8f9662ac7..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java +++ /dev/null @@ -1,159 +0,0 @@ -package gtPlusPlus.core.block.machine.bedrock; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.DamageSource; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; - -public class Mining_Head_Fake extends Block{ - - public Mining_Head_Fake(){ - super(Material.lava); - this.setBlockName(Utils.sanitizeString("blockMiningHeadFake")); - this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt"); - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setHardness(-1F); - this.setResistance(50000.0F); - this.setHarvestLevel("pickaxe", 10); - this.setStepSound(soundTypeMetal); - //LanguageRegistry.addName(this, "Wither Cage"); - GameRegistry.registerBlock(this, Utils.sanitizeString("blockMiningHeadFake")); - } - - public String GetProperName(){ - return "Hardened Mining Head"; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass(){ - return 1; - } - - @Override - public boolean isOpaqueCube(){ - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon){ - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt"); - } - - @Override - public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion){ - //prevent from being destroyed by wither and nukes. - } - - @Override - public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, - final int p_149723_3_, final int p_149723_4_, final Explosion p_149723_5_) { - - } - - @Override - public boolean canDropFromExplosion(final Explosion p_149659_1_) { - return false; - } - - @Override - public boolean canEntityDestroy(final IBlockAccess world, final int x, final int y, final int z, - final Entity entity) { - return false; - } - - - //Colour Handling - private static final int mWitherColour = Utils.rgbtoHexValue(175, 64, 32); - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - return mWitherColour; - } - - @Override - public int getRenderColor(final int aMeta) { - return mWitherColour; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public boolean isCollidable() { - return true; - } - - @Override - public void randomDisplayTick(World world, int posX, int posY, int posZ, - Random rand) { - generateVoidParticlesAroundBlockPos(new BlockPos(posX, posY, posZ, world), 2); - super.randomDisplayTick(world, posX, posY, posZ, rand); - } - - @Override - public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, - Entity ent) { - EntityUtils.doDamage(ent, DamageSource.outOfWorld, 20); - EntityUtils.setEntityOnFire(ent, 100); - super.onEntityCollidedWithBlock(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, ent); - } - - @Override - protected boolean canSilkHarvest() { - return false; - } - - @Override - public boolean canHarvestBlock(EntityPlayer player, int meta) { - return false; - } - - public static void generateVoidParticlesAroundBlockPos(BlockPos Pos, int range){ - for (BlockPos G : Pos.getSurroundingBlocks()) { - int i1 = G.xPos + MathUtils.randInt(0, range) - MathUtils.randInt(0, range); - int j1 = G.yPos + MathUtils.randInt(0, range) - MathUtils.randInt(0, range); - int k1 = G.zPos + MathUtils.randInt(0, range) - MathUtils.randInt(0, range); - - Block block = Pos.world.getBlock(i1, j1, k1); - - if (block.getMaterial() == Material.air){ - - //lava - if (Pos.yPos <= 7) { - Pos.world.spawnParticle("portal", (double)((float)i1 + CORE.RANDOM.nextFloat()), (double)((float)j1 + CORE.RANDOM.nextFloat()), (double)((float)k1 + CORE.RANDOM.nextFloat()), 0.0D, 0.0D, 0.0D); - Pos.world.spawnParticle("lava", (double)((float)i1 + CORE.RANDOM.nextFloat()), (double)((float)j1 + CORE.RANDOM.nextFloat()), (double)((float)k1 + CORE.RANDOM.nextFloat()), 0.0D, 0.0D, 0.0D); - } - else { - Pos.world.spawnParticle("portal", (double)((float)i1 + CORE.RANDOM.nextFloat()), (double)((float)j1 + CORE.RANDOM.nextFloat()), (double)((float)k1 + CORE.RANDOM.nextFloat()), 0.0D, 0.0D, 0.0D); - } - - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java b/src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java deleted file mode 100644 index bba185a0c1..0000000000 --- a/src/Java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java +++ /dev/null @@ -1,136 +0,0 @@ -package gtPlusPlus.core.block.machine.bedrock; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.DamageSource; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; - -public class Mining_Pipe_Fake extends Block{ - - public Mining_Pipe_Fake(){ - super(Material.cactus); - this.setBlockName(Utils.sanitizeString("blockMiningPipeFake")); - this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt"); - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setHardness(-1F); - this.setResistance(50000.0F); - this.setHarvestLevel("pickaxe", 8); - this.setStepSound(soundTypeMetal); - //LanguageRegistry.addName(this, "Wither Cage"); - GameRegistry.registerBlock(this, Utils.sanitizeString("blockMiningPipeFake")); - } - - public String GetProperName(){ - return "Hardened Mining Pipe"; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass(){ - return 1; - } - - @Override - public boolean isOpaqueCube(){ - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon){ - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt"); - } - - @Override - public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion){ - //prevent from being destroyed by wither and nukes. - } - - @Override - public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, - final int p_149723_3_, final int p_149723_4_, final Explosion p_149723_5_) { - - } - - @Override - public boolean canDropFromExplosion(final Explosion p_149659_1_) { - return false; - } - - @Override - public boolean canEntityDestroy(final IBlockAccess world, final int x, final int y, final int z, - final Entity entity) { - return false; - } - - - //Colour Handling - private static final int mWitherColour = Utils.rgbtoHexValue(32, 32, 32); - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - return mWitherColour; - } - - @Override - public int getRenderColor(final int aMeta) { - return mWitherColour; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public boolean isCollidable() { - return true; - } - - @Override - public void randomDisplayTick(World world, int posX, int posY, int posZ, - Random rand) { - Mining_Head_Fake.generateVoidParticlesAroundBlockPos(new BlockPos(posX, posY, posZ, world), 2); - super.randomDisplayTick(world, posX, posY, posZ, rand); - } - - @Override - public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity ent) { - if (MathUtils.randInt(0, 100) < 5) { - EntityUtils.doDamage(ent, DamageSource.outOfWorld, 1); - } - super.onEntityCollidedWithBlock(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, ent); - } - - @Override - protected boolean canSilkHarvest() { - return false; - } - - @Override - public boolean canHarvestBlock(EntityPlayer player, int meta) { - return false; - } - - - -} diff --git a/src/Java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java b/src/Java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java deleted file mode 100644 index ddfe9b8227..0000000000 --- a/src/Java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java +++ /dev/null @@ -1,217 +0,0 @@ -package gtPlusPlus.core.chunkloading; - -import com.google.common.collect.HashMultimap; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Log; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.IChunkLoader; -import gtPlusPlus.core.lib.CORE; - -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ListMultimap; -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommandSender; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTUtil; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeChunkManager; -import net.minecraftforge.common.ForgeChunkManager.Ticket; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.WorldEvent; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * - * This class handles re-initializing chunks after a server restart - * Credits to Repo-Alt for the original implementation. - * @author Repo-Alt, Alkalus - * - */ -public class GTPP_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback, ForgeChunkManager.PlayerOrderedLoadingCallback { - - - private Map registeredTickets = new HashMap<>(); - - private static GTPP_ChunkManager instance = new GTPP_ChunkManager(); - - public static boolean enableChunkloaders = true; - public static boolean alwaysReloadChunkloaders = false; - public static boolean debugChunkloaders = false; - - public static void init() { - if (enableChunkloaders) { - ForgeChunkManager.setForcedChunkLoadingCallback(GTplusplus.instance, instance); - } - } - - @Override - public void ticketsLoaded(List tickets, World world) {} - - // Determine if tickets should be kept. Based on if the ticket is a machine or working chunk ticket. - // Working chunk tickets are tossed and re-created when the machine re-activates. - // Machine tickets are kept only if the config alwaysReloadChunkloaders is true. Otherwise - // machine chunks are tossed and re-created only when the machine re-activates, similar to a Passive Anchor. - @Override - public List ticketsLoaded(List tickets, World world, int maxTicketCount) { - List validTickets = new ArrayList<>(); - if (alwaysReloadChunkloaders) { - for (Ticket ticket : tickets) { - int x = ticket.getModData().getInteger("OwnerX"); - int y = ticket.getModData().getInteger("OwnerY"); - int z = ticket.getModData().getInteger("OwnerZ"); - if (y > 0) { - TileEntity tile = world.getTileEntity(x, y, z); - if (tile != null && tile instanceof IGregTechTileEntity && ((IGregTechTileEntity)tile).isAllowedToWork()) { - ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(x >> 4, z >> 4)); - if (!registeredTickets.containsKey(tile)) { - registeredTickets.put(tile, ticket); - if (((IGregTechTileEntity)tile).getMetaTileEntity() instanceof IChunkLoader) { - ForgeChunkManager.forceChunk(ticket, ((IChunkLoader)((IGregTechTileEntity)tile).getMetaTileEntity()).getResidingChunk()); - } - validTickets.add(ticket); - } - } - } - } - } - return validTickets; - } - - // Determine if player tickets should be kept. This is where a ticket list per player would be created and maintained. When - // a player join event occurs, their name/UUID/whatevs is compared against tickets on this list and those tickets reactivated. - // Since that info would be maintained/dealt with on a per-player startup, the list returned back to Forge is empty. - @Override - public ListMultimap playerTicketsLoaded(ListMultimap tickets, World world) { - // Not currently used, so just return an empty list. - return ArrayListMultimap.create(); - } - - // Request a chunk to be loaded for this machine - // may pass null chunk to load just the machine itself, if "alwaysReloadChunkloaders" is enabled in config - static public boolean requestPlayerChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ, String player) { - if (!enableChunkloaders) { - return false; - } - if (!alwaysReloadChunkloaders && chunkXZ == null) { - return false; - } - if (debugChunkloaders && chunkXZ != null) { - GT_Log.out.println("GT_ChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); - } - if (instance.registeredTickets.containsKey(owner)) { - ForgeChunkManager.forceChunk(instance.registeredTickets.get(owner), chunkXZ); - } - else { - Ticket ticket = null; - if (player != "") { - ticket = ForgeChunkManager.requestPlayerTicket(GT_Mod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); - } - else { - ticket = ForgeChunkManager.requestTicket(GT_Mod.instance, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); - } - if (ticket == null) { - if (debugChunkloaders) { - GT_Log.out.println("GT_ChunkManager: ForgeChunkManager.requestTicket failed"); - } - return false; - } - if (debugChunkloaders) { - GT_Log.out.println("GT_ChunkManager: ticket issued for machine at: (" + owner.xCoord + ", " + owner.yCoord + ", " + owner.zCoord + ")" ); - } - NBTTagCompound tag = ticket.getModData(); - tag.setInteger("OwnerX", owner.xCoord); - tag.setInteger("OwnerY", owner.yCoord); - tag.setInteger("OwnerZ", owner.zCoord); - ForgeChunkManager.forceChunk(ticket, chunkXZ); - if (alwaysReloadChunkloaders) { - ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(owner.xCoord << 4, owner.zCoord << 4)); - } - instance.registeredTickets.put(owner, ticket); - } - return true; - } - - static public boolean requestChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ) { - return requestPlayerChunkLoad(owner, chunkXZ, ""); - } - - static public void releaseChunk(TileEntity owner, ChunkCoordIntPair chunkXZ) { - if (!enableChunkloaders) { - return; - } - Ticket ticket = instance.registeredTickets.get(owner); - if (ticket != null) { - if (debugChunkloaders) { - GT_Log.out.println("GT_ChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); - } - ForgeChunkManager.unforceChunk(ticket, chunkXZ); - } - } - - static public void releaseTicket(TileEntity owner) { - if (!enableChunkloaders) { - return; - } - Ticket ticket = instance.registeredTickets.get(owner); - if (ticket != null) { - if (debugChunkloaders) { - GT_Log.out.println("GT_ChunkManager: ticket released by machine at: (" + owner.xCoord + ", " + owner.yCoord + ", " + owner.zCoord + ")" ); - for (ChunkCoordIntPair chunk : ticket.getChunkList()) { - GT_Log.out.println("GT_ChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")"); - } - } - ForgeChunkManager.releaseTicket(ticket); - instance.registeredTickets.remove(owner); - } - } - - public static void printTickets() { - if (!debugChunkloaders) { - return; - } - GT_Log.out.println("GT_ChunkManager: Start forced chunks dump:"); - instance.registeredTickets.forEach((machine, ticket) -> { - GT_Log.out.print("GT_ChunkManager: Chunks forced by the machine at (" + machine.xCoord + ", " + machine.yCoord + ", " + machine.zCoord + ")"); - if (ticket.isPlayerTicket()) { - GT_Log.out.print(" Owner: " + ticket.getPlayerName()); - } - GT_Log.out.print(" :"); - for (ChunkCoordIntPair c : ticket.getChunkList()) { - GT_Log.out.print("("); - GT_Log.out.print(c.chunkXPos); - GT_Log.out.print(", "); - GT_Log.out.print(c.chunkZPos); - GT_Log.out.print("), "); - } - }); - GT_Log.out.println("GT_ChunkManager: End forced chunks dump:"); - } - public static class DebugCommand extends CommandBase { - @Override - public String getCommandName() { - return "gtpp:dump_chunks"; - } - @Override - public int getRequiredPermissionLevel() { - return 0; - } - @Override - public String getCommandUsage(ICommandSender sender) { - return "/" + getCommandName(); - } - @Override - public void processCommand(ICommandSender sender, String[] args) { - printTickets(); - } - } -} diff --git a/src/Java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java b/src/Java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java deleted file mode 100644 index 36d9fa670c..0000000000 --- a/src/Java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java +++ /dev/null @@ -1,63 +0,0 @@ -package gtPlusPlus.core.chunkloading; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.api.interfaces.IChunkLoader; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntityChunkLoader; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkCoordIntPair; - -public class StaticChunkFunctions { - - public static void saveNBTDataForTileEntity(IGregTechTileEntity aBaseMetaTileEntity, NBTTagCompound aNBT) { - IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); - aNBT.setBoolean("chunkLoadingEnabled", aTileEntity.getChunkLoadingActive()); - aNBT.setBoolean("isChunkloading", aTileEntity.getResidingChunk() != null); - if (aTileEntity.getResidingChunk() != null) { - aNBT.setInteger("loadedChunkXPos", aTileEntity.getResidingChunk().chunkXPos); - aNBT.setInteger("loadedChunkZPos", aTileEntity.getResidingChunk().chunkZPos); - } - } - - public static void loadNBTDataForTileEntity(IGregTechTileEntity aBaseMetaTileEntity, NBTTagCompound aNBT) { - IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); - if (aNBT.hasKey("chunkLoadingEnabled")) { - aTileEntity.setChunkLoadingActive(aNBT.getBoolean("chunkLoadingEnabled")); - } - if (aNBT.getBoolean("isChunkloading")) { - aTileEntity.setResidingChunk(new ChunkCoordIntPair(aNBT.getInteger("loadedChunkXPos"), aNBT.getInteger("loadedChunkZPos"))); - } - } - - public static void onRemoval(IGregTechTileEntity aBaseMetaTileEntity) { - IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); - if (aTileEntity.getChunkLoadingActive()) { - GTPP_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity); - } - } - - public static boolean onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); - if (aBaseMetaTileEntity.isServerSide() && aTileEntity.getResidingChunk() != null && !aTileEntity.getDoesWorkChunkNeedReload() && !aBaseMetaTileEntity.isAllowedToWork()) { - // if machine has stopped, stop chunkloading - GTPP_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity); - aTileEntity.setDoesWorkChunkNeedReload(true); - return false; - } - return true; - } - - public static void createInitialWorkingChunk(IGregTechTileEntity aBaseMetaTileEntity, int aChunkX, int aDrillZ) { - final int centerX = aChunkX >> 4; - final int centerZ = aDrillZ >> 4; - IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); - aTileEntity.addChunkToLoadedList(new ChunkCoordIntPair(centerX, centerZ)); - GTPP_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity.getMetaTileEntity(), aTileEntity.getResidingChunk()); - aTileEntity.setDoesWorkChunkNeedReload(false); - } - - private static final IChunkLoader getChunkLoader(IGregTechTileEntity aTile) { - return (IChunkLoader) ((IGregTechTileEntity)aTile).getMetaTileEntity(); - } - -} diff --git a/src/Java/gtPlusPlus/core/client/CustomTextureSet.java b/src/Java/gtPlusPlus/core/client/CustomTextureSet.java deleted file mode 100644 index 400503b2fa..0000000000 --- a/src/Java/gtPlusPlus/core/client/CustomTextureSet.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.client; - -import gregtech.api.enums.TextureSet; - -public class CustomTextureSet extends TextureSet { - - public static enum TextureSets { - - REFINED(), - GEM_A(), - ENRICHED(), - NUCLEAR; - - private final CustomTextureSet A; - - private TextureSets (){ - A = new CustomTextureSet(this.name().toUpperCase()); - } - public CustomTextureSet get() { - return A; - } - } - - public CustomTextureSet(String aSetName) { - super(aSetName); - } - -} diff --git a/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java b/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java deleted file mode 100644 index ac64dee26a..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelBatKing.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.core.client.model; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.entity.monster.EntityBatKing; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.util.MathHelper; - -@SideOnly(Side.CLIENT) -public class ModelBatKing extends ModelBase -{ - private ModelRenderer batHead; - /** The body box of the bat model. */ - private ModelRenderer batBody; - /** The inner right wing box of the bat model. */ - private ModelRenderer batRightWing; - /** The inner left wing box of the bat model. */ - private ModelRenderer batLeftWing; - /** The outer right wing box of the bat model. */ - private ModelRenderer batOuterRightWing; - /** The outer left wing box of the bat model. */ - private ModelRenderer batOuterLeftWing; - - public ModelBatKing() - { - this.textureWidth = 64; - this.textureHeight = 64; - - this.batHead = new ModelRenderer(this, 0, 0); - this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6); - ModelRenderer modelrenderer = new ModelRenderer(this, 24, 0); - modelrenderer.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1); - this.batHead.addChild(modelrenderer); - ModelRenderer modelrenderer1 = new ModelRenderer(this, 24, 0); - modelrenderer1.mirror = true; - modelrenderer1.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1); - this.batHead.addChild(modelrenderer1); - this.batBody = new ModelRenderer(this, 0, 16); - this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6); - this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1); - this.batRightWing = new ModelRenderer(this, 42, 0); - this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1); - this.batOuterRightWing = new ModelRenderer(this, 24, 16); - this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F); - this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1); - this.batLeftWing = new ModelRenderer(this, 42, 0); - this.batLeftWing.mirror = true; - this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1); - this.batOuterLeftWing = new ModelRenderer(this, 24, 16); - this.batOuterLeftWing.mirror = true; - this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F); - this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1); - this.batBody.addChild(this.batRightWing); - this.batBody.addChild(this.batLeftWing); - this.batRightWing.addChild(this.batOuterRightWing); - this.batLeftWing.addChild(this.batOuterLeftWing); - } - - /** - * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and - * it seems a good match for a bats size - */ - public int getBatSize() - { - return 72; - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - EntityBatKing entitybat = (EntityBatKing)p_78088_1_; - float f6; - - if (entitybat.getIsBatHanging()) - { - f6 = (180F / (float)Math.PI); - this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI); - this.batHead.rotateAngleY = (float)Math.PI - p_78088_5_ / (180F / (float)Math.PI); - this.batHead.rotateAngleZ = (float)Math.PI; - this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F); - this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F); - this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F); - this.batBody.rotateAngleX = (float)Math.PI; - this.batRightWing.rotateAngleX = -0.15707964F; - this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F); - this.batOuterRightWing.rotateAngleY = -1.7278761F; - this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX; - this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; - this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY; - } - else - { - f6 = (180F / (float)Math.PI); - this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI); - this.batHead.rotateAngleY = p_78088_5_ / (180F / (float)Math.PI); - this.batHead.rotateAngleZ = 0.0F; - this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(p_78088_4_ * 0.1F) * 0.15F; - this.batBody.rotateAngleY = 0.0F; - this.batRightWing.rotateAngleY = MathHelper.cos(p_78088_4_ * 1.3F) * (float)Math.PI * 0.25F; - this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; - this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F; - this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F; - } - - - GL11.glScalef(4, 4, 4); - this.batHead.render(p_78088_7_); - this.batBody.render(p_78088_7_); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java b/src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java deleted file mode 100644 index c116dcf115..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelDecayChest.java +++ /dev/null @@ -1,46 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -@SideOnly(Side.CLIENT) -public class ModelDecayChest extends ModelBase -{ - /** The chest lid in the chest's model. */ - public ModelRenderer chestLid = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); - /** The model of the bottom of the chest. */ - public ModelRenderer chestBelow; - /** The chest's knob in the chest model. */ - public ModelRenderer chestKnob; - - public ModelDecayChest() - { - this.chestLid.addBox(0.0F, -5.0F, -14.0F, 14, 5, 14, 0.0F); - this.chestLid.rotationPointX = 1.0F; - this.chestLid.rotationPointY = 7.0F; - this.chestLid.rotationPointZ = 15.0F; - this.chestKnob = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); - this.chestKnob.addBox(-1.0F, -2.0F, -15.0F, 2, 4, 1, 0.0F); - this.chestKnob.rotationPointX = 8.0F; - this.chestKnob.rotationPointY = 7.0F; - this.chestKnob.rotationPointZ = 15.0F; - this.chestBelow = (new ModelRenderer(this, 0, 19)).setTextureSize(64, 64); - this.chestBelow.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); - this.chestBelow.rotationPointX = 1.0F; - this.chestBelow.rotationPointY = 6.0F; - this.chestBelow.rotationPointZ = 1.0F; - } - - /** - * This method renders out all parts of the chest model. - */ - public void renderAll() - { - this.chestKnob.rotateAngleX = this.chestLid.rotateAngleX; - this.chestLid.render(0.0625F); - this.chestKnob.render(0.0625F); - this.chestBelow.render(0.0625F); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelEggBox.java b/src/Java/gtPlusPlus/core/client/model/ModelEggBox.java deleted file mode 100644 index 0aef4eb7b0..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelEggBox.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.core.client.model; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; -import gtPlusPlus.core.client.renderer.tabula.RenderTabulaBase; -import gtPlusPlus.core.tileentities.general.TileEntityEggBox; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -/** - * ModelEggBox - Alkalus - * Created using Tabula 4.1.1 - */ -public class ModelEggBox extends ModelTabulaBase { - - private final AutoMap> mParts = new AutoMap>(); - - private static RenderTabulaBase mRendererInstance; - - public ModelRenderer bottom; - //EggBox_full.png - - public ModelEggBox() { - super(64, 64); - this.textureWidth = 64; - this.textureHeight = 64; - - this.bottom = new ModelRenderer(this, 0, 19); - this.bottom.setRotationPoint(1.0F, 6.0F, 1.0F); - this.bottom.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); - mParts.add(new Pair(bottom, 0f)); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - //Logger.INFO("Rendering EggBox"); - this.bottom.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } - - @Override - protected AutoMap> getModelParts() { - AutoMap> aParts = new AutoMap>(); - aParts.add(new Pair(bottom, 0.0625F)); - return aParts; - //return mParts; - } - - public static RenderTabulaBase getRenderer() { - if (mRendererInstance == null) { - mRendererInstance = new RenderTabulaBase(new ModelEggBox(), "textures/blocks/TileEntities/EggBox_full.png", TileEntityEggBox.class); - } - return mRendererInstance; - } -} diff --git a/src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java b/src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java deleted file mode 100644 index f7fb92f550..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelGiantChicken.java +++ /dev/null @@ -1,112 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.model.ModelChicken; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; -import org.lwjgl.opengl.GL11; - -@SideOnly(Side.CLIENT) -public class ModelGiantChicken extends ModelChicken{ - - public ModelGiantChicken() - { - byte b0 = 16; - this.head = new ModelRenderer(this, 0, 0); - this.head.addBox(-2.0F, -6.0F, -2.0F, 4, 6, 3, 0.0F); - this.head.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); - this.bill = new ModelRenderer(this, 14, 0); - this.bill.addBox(-2.0F, -4.0F, -4.0F, 4, 2, 2, 0.0F); - this.bill.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); - this.chin = new ModelRenderer(this, 14, 4); - this.chin.addBox(-1.0F, -2.0F, -3.0F, 2, 2, 2, 0.0F); - this.chin.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); - this.body = new ModelRenderer(this, 0, 9); - this.body.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F); - this.body.setRotationPoint(0.0F, (float)b0, 0.0F); - this.rightLeg = new ModelRenderer(this, 26, 0); - this.rightLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); - this.rightLeg.setRotationPoint(-2.0F, (float)(3 + b0), 1.0F); - this.leftLeg = new ModelRenderer(this, 26, 0); - this.leftLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); - this.leftLeg.setRotationPoint(1.0F, (float)(3 + b0), 1.0F); - this.rightWing = new ModelRenderer(this, 24, 13); - this.rightWing.addBox(0.0F, 0.0F, -3.0F, 1, 4, 6); - this.rightWing.setRotationPoint(-4.0F, (float)(-3 + b0), 0.0F); - this.leftWing = new ModelRenderer(this, 24, 13); - this.leftWing.addBox(-1.0F, 0.0F, -3.0F, 1, 4, 6); - this.leftWing.setRotationPoint(4.0F, (float)(-3 + b0), 0.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - - if (this.isChild) - { - float f6 = 1.0F; - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0F, 0F); - this.head.render(p_78088_7_); - this.bill.render(p_78088_7_); - this.chin.render(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, 0F, 0.0F); - this.body.render(p_78088_7_); - this.rightLeg.render(p_78088_7_); - this.leftLeg.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - GL11.glPopMatrix(); - //super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); - } - else - { - float f6 = 2.0F; - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, -0.85F, 0F); - this.head.render(p_78088_7_); - this.bill.render(p_78088_7_); - this.chin.render(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, -0.75F, 0.0F); - this.body.render(p_78088_7_); - this.rightLeg.render(p_78088_7_); - this.leftLeg.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - GL11.glPopMatrix(); - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) - { - this.head.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - this.head.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.bill.rotateAngleX = this.head.rotateAngleX; - this.bill.rotateAngleY = this.head.rotateAngleY; - this.chin.rotateAngleX = this.head.rotateAngleX; - this.chin.rotateAngleY = this.head.rotateAngleY; - this.body.rotateAngleX = ((float)Math.PI / 2F); - this.rightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 1.4F * p_78087_2_; - this.leftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float)Math.PI) * 1.4F * p_78087_2_; - this.rightWing.rotateAngleZ = p_78087_3_; - this.leftWing.rotateAngleZ = -p_78087_3_; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java b/src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java deleted file mode 100644 index 455df761cb..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelSickBlaze.java +++ /dev/null @@ -1,93 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.model.ModelBlaze; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -@SideOnly(Side.CLIENT) -public class ModelSickBlaze extends ModelBlaze -{ - /** The sticks that fly around the Blaze. */ - private ModelRenderer[] blazeSticks = new ModelRenderer[24]; - private ModelRenderer blazeHead; - - public ModelSickBlaze() - { - for (int i = 0; i < this.blazeSticks.length; ++i) - { - this.blazeSticks[i] = new ModelRenderer(this, 0, 16); - this.blazeSticks[i].addBox(0.0F, 0.0F, 0.0F, 2, 8, 2); - } - - this.blazeHead = new ModelRenderer(this, 0, 0); - this.blazeHead.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8); - } - - @Override - public int func_78104_a() - { - return 8; - } - - /** - * Sets the models various rotation angles then renders the model. - */ - @Override - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - this.blazeHead.render(p_78088_7_); - - for (int i = 0; i < this.blazeSticks.length; ++i) - { - this.blazeSticks[i].render(p_78088_7_); - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - @Override - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) - { - float f6 = p_78087_3_ * (float)Math.PI * -0.1F; - int i; - - for (i = 0; i < 4; ++i) - { - this.blazeSticks[i].rotationPointY = -2.0F + MathHelper.cos((i * 2 + p_78087_3_) * 0.25F); - this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 9.0F; - this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 9.0F; - ++f6; - } - - f6 = ((float)Math.PI / 4F) + p_78087_3_ * (float)Math.PI * 0.03F; - - for (i = 4; i < 8; ++i) - { - this.blazeSticks[i].rotationPointY = 2.0F + MathHelper.cos((i * 2 + p_78087_3_) * 0.25F); - this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 7.0F; - this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 7.0F; - ++f6; - } - - f6 = 0.47123894F + p_78087_3_ * (float)Math.PI * -0.05F; - - for (i = 8; i < 12; ++i) - { - this.blazeSticks[i].rotationPointY = 11.0F + MathHelper.cos((i * 1.5F + p_78087_3_) * 0.5F); - this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 5.0F; - this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 5.0F; - ++f6; - } - - this.blazeHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.blazeHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java b/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java deleted file mode 100644 index aa23635b4d..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.core.client.model; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.model.ModelIronGolem; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityIronGolem; - -@SideOnly(Side.CLIENT) -public class ModelStaballoyConstruct extends ModelIronGolem -{ - - public ModelStaballoyConstruct() - { - this(0.0F); - } - - public ModelStaballoyConstruct(float p_i1161_1_) - { - this(p_i1161_1_, -7.0F); - } - - public ModelStaballoyConstruct(float p_i1162_1_, float p_i1162_2_) - { - short short1 = 128; - short short2 = 128; - this.ironGolemHead = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemHead.setRotationPoint(0.0F, 0.0F + p_i1162_2_, -2.0F); - this.ironGolemHead.setTextureOffset(0, 0).addBox(-4.0F, -12.0F, -5.5F, 8, 10, 8, p_i1162_1_); - this.ironGolemHead.setTextureOffset(24, 0).addBox(-1.0F, -5.0F, -7.5F, 2, 4, 2, p_i1162_1_); - this.ironGolemBody = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemBody.setRotationPoint(0.0F, 0.0F + p_i1162_2_, 0.0F); - this.ironGolemBody.setTextureOffset(0, 40).addBox(-9.0F, -2.0F, -6.0F, 18, 12, 11, p_i1162_1_); - this.ironGolemBody.setTextureOffset(0, 70).addBox(-4.5F, 10.0F, -3.0F, 9, 5, 6, p_i1162_1_ + 0.5F); - this.ironGolemRightArm = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemRightArm.setRotationPoint(0.0F, -7.0F, 0.0F); - this.ironGolemRightArm.setTextureOffset(60, 21).addBox(-13.0F, -2.5F, -3.0F, 4, 30, 6, p_i1162_1_); - this.ironGolemLeftArm = (new ModelRenderer(this)).setTextureSize(short1, short2); - this.ironGolemLeftArm.setRotationPoint(0.0F, -7.0F, 0.0F); - this.ironGolemLeftArm.setTextureOffset(60, 58).addBox(9.0F, -2.5F, -3.0F, 4, 30, 6, p_i1162_1_); - this.ironGolemLeftLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2); - this.ironGolemLeftLeg.setRotationPoint(-4.0F, 18.0F + p_i1162_2_, 0.0F); - this.ironGolemLeftLeg.setTextureOffset(37, 0).addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, p_i1162_1_); - this.ironGolemRightLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2); - this.ironGolemRightLeg.mirror = true; - this.ironGolemRightLeg.setTextureOffset(60, 0).setRotationPoint(5.0F, 18.0F + p_i1162_2_, 0.0F); - this.ironGolemRightLeg.addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, p_i1162_1_); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - @Override - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) - { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - this.ironGolemHead.render(p_78088_7_); - this.ironGolemBody.render(p_78088_7_); - this.ironGolemLeftLeg.render(p_78088_7_); - this.ironGolemRightLeg.render(p_78088_7_); - this.ironGolemRightArm.render(p_78088_7_); - this.ironGolemLeftArm.render(p_78088_7_); - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - @Override - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) - { - this.ironGolemHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); - this.ironGolemHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); - this.ironGolemLeftLeg.rotateAngleX = -1.5F * this.func_78172_a(p_78087_1_, 13.0F) * p_78087_2_; - this.ironGolemRightLeg.rotateAngleX = 1.5F * this.func_78172_a(p_78087_1_, 13.0F) * p_78087_2_; - this.ironGolemLeftLeg.rotateAngleY = 0.0F; - this.ironGolemRightLeg.rotateAngleY = 0.0F; - } - - /** - * Used for easily adding entity-dependent animations. The second and third float params here are the same second - * and third as in the setRotationAngles method. - */ - @Override - public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) - { - EntityIronGolem entityirongolem = (EntityIronGolem)p_78086_1_; - int i = entityirongolem.getAttackTimer(); - - if (i > 0) - { - this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F); - this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F); - } - else - { - int j = entityirongolem.getHoldRoseTick(); - - if (j > 0) - { - this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a(j, 70.0F); - this.ironGolemLeftArm.rotateAngleX = 0.0F; - } - else - { - this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_; - this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_; - } - } - } - - private float func_78172_a(float p_78172_1_, float p_78172_2_) - { - return (Math.abs(p_78172_1_ % p_78172_2_ - p_78172_2_ * 0.5F) - p_78172_2_ * 0.25F) / (p_78172_2_ * 0.25F); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java b/src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java deleted file mode 100644 index 3a0cbb636b..0000000000 --- a/src/Java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java +++ /dev/null @@ -1,38 +0,0 @@ -package gtPlusPlus.core.client.model.tabula; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -/** - * ModelEggBox - Alkalus - * Created using Tabula 4.1.1 - */ -public abstract class ModelTabulaBase extends ModelBase { - - - public ModelTabulaBase(int aTexWidth, int aTexHeight) { - this.textureWidth = aTexWidth; - this.textureHeight = aTexHeight; - } - - protected abstract AutoMap> getModelParts(); - - public void renderAll() { - for (Pair part : getModelParts()) { - //Logger.INFO("Rendering EggBox"); - part.getKey().render(part.getValue()); - } - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java b/src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java deleted file mode 100644 index f40357495a..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java +++ /dev/null @@ -1,85 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.client.IItemRenderer; - -import org.lwjgl.opengl.GL11; - - -/** - * Easy way of rendering an item which should look like a block. - * Borrowed. - * - * @author King Lemming - * - */ -public class CustomItemBlockRenderer implements IItemRenderer { - - public static CustomItemBlockRenderer instance = new CustomItemBlockRenderer(); - - @Override - public boolean handleRenderType(ItemStack item, ItemRenderType type) { - return true; - } - - @Override - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { - return true; - } - - @Override - public void renderItem(ItemRenderType type, ItemStack item, Object... data) { - - double offset = -0.5; - if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) { - offset = 0; - } else if (type == ItemRenderType.ENTITY) { - GL11.glScalef(0.5F, 0.5F, 0.5F); - } - renderItemAsBlock((RenderBlocks) data[0], item, offset, offset, offset); - } - - public static void renderItemAsBlock(RenderBlocks renderer, ItemStack item, double translateX, double translateY, double translateZ) { - - renderTextureAsBlock(renderer, item.getIconIndex(), translateX, translateY, translateZ); - } - - public static void renderTextureAsBlock(RenderBlocks renderer, IIcon texture, double translateX, double translateY, double translateZ) { - - Tessellator tessellator = Tessellator.instance; - Block block = Blocks.stone; - - if (texture == null) { - return; - } - renderer.setRenderBoundsFromBlock(block); - GL11.glTranslated(translateX, translateY, translateZ); - tessellator.startDrawingQuads(); - - tessellator.setNormal(0.0F, -1.0F, 0.0F); - renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(0.0F, 0.0F, -1.0F); - renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(-1.0F, 0.0F, 0.0F); - renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, texture); - - tessellator.draw(); - } - -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java b/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java deleted file mode 100644 index a0b34d3b0b..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java +++ /dev/null @@ -1,2083 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import gregtech.api.interfaces.ITexture; -import gtPlusPlus.api.interfaces.ITexturedBlock; -import gtPlusPlus.api.objects.Logger; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { - - public static CustomOreBlockRenderer INSTANCE; - public final int mRenderID; - - public CustomOreBlockRenderer() { - INSTANCE = this; - this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); - RenderingRegistry.registerBlockHandler(this); - Logger.INFO("Registered Custom Ore Block Renderer."); - } - - public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { - Block tTileEntity = aBlock; - if ((tTileEntity instanceof ITexturedBlock)) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedBlock) tTileEntity).getTexture((byte) 0), ((ITexturedBlock) tTileEntity).getTexture((byte) 1), ((ITexturedBlock) tTileEntity).getTexture((byte) 2), ((ITexturedBlock) tTileEntity).getTexture((byte) 3), ((ITexturedBlock) tTileEntity).getTexture((byte) 4), ((ITexturedBlock) tTileEntity).getTexture((byte) 5)}); - } - return false; - } - - public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - int l = aBlock.colorMultiplier(aWorld, aX, aY, aZ); - float RED = (float)(l >> 16 & 255) / 255.0F; - float GREEN = (float)(l >> 8 & 255) / 255.0F; - float BLUE = (float)(l & 255) / 255.0F; - - if (Minecraft.isAmbientOcclusionEnabled() && aBlock.getLightValue() == 0){ - if (RenderBlocks.getInstance().partialRenderBounds){ - return INSTANCE.renderStandardBlockWithAmbientOcclusionPartial(aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); - } - else { - return INSTANCE.renderStandardBlockWithAmbientOcclusion(aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); - } - } - else { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); - } - return true; - } - - public static void renderFaceYNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[0], true); - } - public static void renderFaceYPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[1], true); - } - public static void renderFaceZNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[2], true); - } - public static void renderFaceZPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[3], true); - } - public static void renderFaceXNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[4], true); - } - public static void renderFaceXPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[5], true); - } - - public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderYNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderYPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); - } - aRenderer.flipTexture = (!aFullBlock); - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderZNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderZPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); - } - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderXNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5))) { - return; - } - Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); - } - aRenderer.flipTexture = (!aFullBlock); - if (aIcon != null) { - for (int i = 0; i < aIcon.length; i++) { - if (aIcon[i] != null) { - aIcon[i].renderXPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 0), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 1), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 2), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 3), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 4), true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 5), true); - Tessellator.instance.draw(); - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - - public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { - blockAccess = aWorld; - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); - } - - public boolean shouldRender3DInInventory(int aModel) { - return true; - } - - public int getRenderId() { - return this.mRenderID; - } - - public void setRenderBounds(double p_147782_1_, double p_147782_3_, double p_147782_5_, double p_147782_7_, double p_147782_9_, double p_147782_11_) - { - if (!this.lockBlockBounds) - { - this.renderMinX = p_147782_1_; - this.renderMaxX = p_147782_7_; - this.renderMinY = p_147782_3_; - this.renderMaxY = p_147782_9_; - this.renderMinZ = p_147782_5_; - this.renderMaxZ = p_147782_11_; - this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D || this.renderMaxZ < 1.0D); - } - } - - /** - * Like setRenderBounds, but automatically pulling the bounds from the given Block. - */ - public void setRenderBoundsFromBlock(Block block) - { - if (!this.lockBlockBounds) - { - this.renderMinX = block.getBlockBoundsMinX(); - this.renderMaxX = block.getBlockBoundsMaxX(); - this.renderMinY = block.getBlockBoundsMinY(); - this.renderMaxY = block.getBlockBoundsMaxY(); - this.renderMinZ = block.getBlockBoundsMinZ(); - this.renderMaxZ = block.getBlockBoundsMaxZ(); - this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D || this.renderMaxZ < 1.0D); - } - } - - /** - * Vanilla Variables - */ - - /** The minimum X value for rendering (default 0.0). */ - public double renderMinX; - /** The maximum X value for rendering (default 1.0). */ - public double renderMaxX; - /** The minimum Y value for rendering (default 0.0). */ - public double renderMinY; - /** The maximum Y value for rendering (default 1.0). */ - public double renderMaxY; - /** The minimum Z value for rendering (default 0.0). */ - public double renderMinZ; - /** The maximum Z value for rendering (default 1.0). */ - public double renderMaxZ; - public boolean lockBlockBounds; - public boolean partialRenderBounds; - public final Minecraft minecraftRB = RenderBlocks.getInstance().minecraftRB; - public int uvRotateEast; - public int uvRotateWest; - public int uvRotateSouth; - public int uvRotateNorth; - public int uvRotateTop; - public int uvRotateBottom; - /** Whether ambient occlusion is enabled or not */ - public boolean enableAO; - /** Used as a scratch variable for ambient occlusion on the north/bottom/east corner. */ - public float aoLightValueScratchXYZNNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the north face. */ - public float aoLightValueScratchXYNN; - /** Used as a scratch variable for ambient occlusion on the north/bottom/west corner. */ - public float aoLightValueScratchXYZNNP; - /** Used as a scratch variable for ambient occlusion between the bottom face and the east face. */ - public float aoLightValueScratchYZNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the west face. */ - public float aoLightValueScratchYZNP; - /** Used as a scratch variable for ambient occlusion on the south/bottom/east corner. */ - public float aoLightValueScratchXYZPNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the south face. */ - public float aoLightValueScratchXYPN; - /** Used as a scratch variable for ambient occlusion on the south/bottom/west corner. */ - public float aoLightValueScratchXYZPNP; - /** Used as a scratch variable for ambient occlusion on the north/top/east corner. */ - public float aoLightValueScratchXYZNPN; - /** Used as a scratch variable for ambient occlusion between the top face and the north face. */ - public float aoLightValueScratchXYNP; - /** Used as a scratch variable for ambient occlusion on the north/top/west corner. */ - public float aoLightValueScratchXYZNPP; - /** Used as a scratch variable for ambient occlusion between the top face and the east face. */ - public float aoLightValueScratchYZPN; - /** Used as a scratch variable for ambient occlusion on the south/top/east corner. */ - public float aoLightValueScratchXYZPPN; - /** Used as a scratch variable for ambient occlusion between the top face and the south face. */ - public float aoLightValueScratchXYPP; - /** Used as a scratch variable for ambient occlusion between the top face and the west face. */ - public float aoLightValueScratchYZPP; - /** Used as a scratch variable for ambient occlusion on the south/top/west corner. */ - public float aoLightValueScratchXYZPPP; - /** Used as a scratch variable for ambient occlusion between the north face and the east face. */ - public float aoLightValueScratchXZNN; - /** Used as a scratch variable for ambient occlusion between the south face and the east face. */ - public float aoLightValueScratchXZPN; - /** Used as a scratch variable for ambient occlusion between the north face and the west face. */ - public float aoLightValueScratchXZNP; - /** Used as a scratch variable for ambient occlusion between the south face and the west face. */ - public float aoLightValueScratchXZPP; - /** Ambient occlusion brightness XYZNNN */ - public int aoBrightnessXYZNNN; - /** Ambient occlusion brightness XYNN */ - public int aoBrightnessXYNN; - /** Ambient occlusion brightness XYZNNP */ - public int aoBrightnessXYZNNP; - /** Ambient occlusion brightness YZNN */ - public int aoBrightnessYZNN; - /** Ambient occlusion brightness YZNP */ - public int aoBrightnessYZNP; - /** Ambient occlusion brightness XYZPNN */ - public int aoBrightnessXYZPNN; - /** Ambient occlusion brightness XYPN */ - public int aoBrightnessXYPN; - /** Ambient occlusion brightness XYZPNP */ - public int aoBrightnessXYZPNP; - /** Ambient occlusion brightness XYZNPN */ - public int aoBrightnessXYZNPN; - /** Ambient occlusion brightness XYNP */ - public int aoBrightnessXYNP; - /** Ambient occlusion brightness XYZNPP */ - public int aoBrightnessXYZNPP; - /** Ambient occlusion brightness YZPN */ - public int aoBrightnessYZPN; - /** Ambient occlusion brightness XYZPPN */ - public int aoBrightnessXYZPPN; - /** Ambient occlusion brightness XYPP */ - public int aoBrightnessXYPP; - /** Ambient occlusion brightness YZPP */ - public int aoBrightnessYZPP; - /** Ambient occlusion brightness XYZPPP */ - public int aoBrightnessXYZPPP; - /** Ambient occlusion brightness XZNN */ - public int aoBrightnessXZNN; - /** Ambient occlusion brightness XZPN */ - public int aoBrightnessXZPN; - /** Ambient occlusion brightness XZNP */ - public int aoBrightnessXZNP; - /** Ambient occlusion brightness XZPP */ - public int aoBrightnessXZPP; - /** Brightness top left */ - public int brightnessTopLeft; - /** Brightness bottom left */ - public int brightnessBottomLeft; - /** Brightness bottom right */ - public int brightnessBottomRight; - /** Brightness top right */ - public int brightnessTopRight; - /** Red color value for the top left corner */ - public float colorRedTopLeft; - /** Red color value for the bottom left corner */ - public float colorRedBottomLeft; - /** Red color value for the bottom right corner */ - public float colorRedBottomRight; - /** Red color value for the top right corner */ - public float colorRedTopRight; - /** Green color value for the top left corner */ - public float colorGreenTopLeft; - /** Green color value for the bottom left corner */ - public float colorGreenBottomLeft; - /** Green color value for the bottom right corner */ - public float colorGreenBottomRight; - /** Green color value for the top right corner */ - public float colorGreenTopRight; - /** Blue color value for the top left corner */ - public float colorBlueTopLeft; - /** Blue color value for the bottom left corner */ - public float colorBlueBottomLeft; - /** Blue color value for the bottom right corner */ - public float colorBlueBottomRight; - /** Blue color value for the top right corner */ - public float colorBlueTopRight; - /** If set to >=0, all block faces will be rendered using this texture index */ - public IIcon overrideBlockTexture; - /** - * Clear override block texture - */ - public void clearOverrideBlockTexture() - { - this.overrideBlockTexture = null; - } - - public boolean hasOverrideBlockTexture() - { - return this.overrideBlockTexture != null; - } - - public IIcon getBlockIcon(Block block, IBlockAccess access, int x, int y, int z, int side) - { - return this.getIconSafe(block.getIcon(access, x, y, z, side)); - } - - public IIcon getBlockIconFromSideAndMetadata(Block block, int side, int meta) - { - return this.getIconSafe(block.getIcon(side, meta)); - } - - public IIcon getBlockIconFromSide(Block block, int side) - { - return this.getIconSafe(block.getBlockTextureFromSide(side)); - } - - public IIcon getBlockIcon(Block block) - { - return this.getIconSafe(block.getBlockTextureFromSide(1)); - } - - public IIcon getIconSafe(IIcon iicon) - { - if (iicon == null) - { - iicon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); - } - - return (IIcon)iicon; - } - - IBlockAccess blockAccess = RenderBlocks.getInstance().blockAccess; - - public boolean renderStandardBlockWithAmbientOcclusion(IBlockAccess aWorld, RenderBlocks aRenderer, ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) - { - this.enableAO = true; - boolean flag = false; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - boolean flag1 = true; - int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(983055); - - if (this.getBlockIcon(block).getIconName().equals("grass_top")) - { - flag1 = false; - } - else if (this.hasOverrideBlockTexture()) - { - flag1 = false; - } - - boolean flag2; - boolean flag3; - boolean flag4; - boolean flag5; - int i1; - float f7; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) - { - if (this.renderMinY <= 0.0D) - { - --yPos; - } - - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMinY <= 0.0D) - { - ++yPos; - } - - i1 = l; - - if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) / 4.0F; - f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) / 4.0F; - f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) / 4.0F; - f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.5F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) - { - if (this.renderMaxY >= 1.0D) - { - ++yPos; - } - - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMaxY >= 1.0D) - { - --yPos; - } - - i1 = l; - - if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) / 4.0F; - f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) / 4.0F; - f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - IIcon iicon; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) - { - if (this.renderMinZ <= 0.0D) - { - --zPos; - } - - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMinZ <= 0.0D) - { - ++zPos; - } - - i1 = l; - - if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) / 4.0F; - f5 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) / 4.0F; - f6 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) - { - if (this.renderMaxZ >= 1.0D) - { - ++zPos; - } - - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMaxZ >= 1.0D) - { - --zPos; - } - - i1 = l; - - if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) / 4.0F; - f6 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) / 4.0F; - f5 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) / 4.0F; - f4 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) - { - if (this.renderMinX <= 0.0D) - { - --xPos; - } - - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMinX <= 0.0D) - { - ++xPos; - } - - i1 = l; - - if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) / 4.0F; - f3 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) / 4.0F; - f4 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) / 4.0F; - f5 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) - { - if (this.renderMaxX >= 1.0D) - { - ++xPos; - } - - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMaxX >= 1.0D) - { - --xPos; - } - - i1 = l; - - if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) / 4.0F; - f4 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) / 4.0F; - f5 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) / 4.0F; - f6 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - this.enableAO = false; - return flag; - } - - /** - * Renders non-full-cube block with ambient occusion. Args: block, x, y, z, red, green, blue (lighting) - */ - public boolean renderStandardBlockWithAmbientOcclusionPartial(IBlockAccess aWorld, RenderBlocks aRenderer, ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) - { - this.enableAO = true; - boolean flag = false; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - boolean flag1 = true; - int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(983055); - - if (this.getBlockIcon(block).getIconName().equals("grass_top")) - { - flag1 = false; - } - else if (this.hasOverrideBlockTexture()) - { - flag1 = false; - } - - boolean flag2; - boolean flag3; - boolean flag4; - boolean flag5; - int i1; - float f7; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) - { - if (this.renderMinY <= 0.0D) - { - --yPos; - } - - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMinY <= 0.0D) - { - ++yPos; - } - - i1 = l; - - if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) / 4.0F; - f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) / 4.0F; - f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) / 4.0F; - f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.5F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) - { - if (this.renderMaxY >= 1.0D) - { - ++yPos; - } - - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMaxY >= 1.0D) - { - --yPos; - } - - i1 = l; - - if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) / 4.0F; - f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) / 4.0F; - f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - float f8; - float f9; - float f10; - float f11; - int j1; - int k1; - int l1; - int i2; - IIcon iicon; - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) - { - if (this.renderMinZ <= 0.0D) - { - --zPos; - } - - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMinZ <= 0.0D) - { - ++zPos; - } - - i1 = l; - - if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; - f9 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) / 4.0F; - f10 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) / 4.0F; - f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) / 4.0F; - f3 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMinX) + (double)f9 * this.renderMaxY * this.renderMinX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMinX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - f4 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMaxY * this.renderMaxX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - f5 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMinY * this.renderMaxX + (double)f10 * (1.0D - this.renderMinY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - f6 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMinX) + (double)f9 * this.renderMinY * this.renderMinX + (double)f10 * (1.0D - this.renderMinY) * this.renderMinX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMaxY * (1.0D - this.renderMinX), this.renderMaxY * this.renderMinX, (1.0D - this.renderMaxY) * this.renderMinX, (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMaxY * (1.0D - this.renderMaxX), this.renderMaxY * this.renderMaxX, (1.0D - this.renderMaxY) * this.renderMaxX, (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMinY * (1.0D - this.renderMaxX), this.renderMinY * this.renderMaxX, (1.0D - this.renderMinY) * this.renderMaxX, (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMinY * (1.0D - this.renderMinX), this.renderMinY * this.renderMinX, (1.0D - this.renderMinY) * this.renderMinX, (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) - { - if (this.renderMaxZ >= 1.0D) - { - ++zPos; - } - - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMaxZ >= 1.0D) - { - --zPos; - } - - i1 = l; - - if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) / 4.0F; - f9 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) / 4.0F; - f10 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) / 4.0F; - f11 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) / 4.0F; - f3 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMinX) + (double)f9 * this.renderMaxY * this.renderMinX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMinX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - f4 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMinX) + (double)f9 * this.renderMinY * this.renderMinX + (double)f10 * (1.0D - this.renderMinY) * this.renderMinX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - f5 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMinY * this.renderMaxX + (double)f10 * (1.0D - this.renderMinY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - f6 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMaxY * this.renderMaxX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMaxY * (1.0D - this.renderMinX), (1.0D - this.renderMaxY) * (1.0D - this.renderMinX), (1.0D - this.renderMaxY) * this.renderMinX, this.renderMaxY * this.renderMinX); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMinY * (1.0D - this.renderMinX), (1.0D - this.renderMinY) * (1.0D - this.renderMinX), (1.0D - this.renderMinY) * this.renderMinX, this.renderMinY * this.renderMinX); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMinY * (1.0D - this.renderMaxX), (1.0D - this.renderMinY) * (1.0D - this.renderMaxX), (1.0D - this.renderMinY) * this.renderMaxX, this.renderMinY * this.renderMaxX); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMaxY * (1.0D - this.renderMaxX), (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX), (1.0D - this.renderMaxY) * this.renderMaxX, this.renderMaxY * this.renderMaxX); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) - { - if (this.renderMinX <= 0.0D) - { - --xPos; - } - - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); - - if (!flag4 && !flag3) - { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag5 && !flag3) - { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag4 && !flag2) - { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } - else - { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag5 && !flag2) - { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } - else - { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMinX <= 0.0D) - { - ++xPos; - } - - i1 = l; - - if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) / 4.0F; - f9 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) / 4.0F; - f10 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) / 4.0F; - f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) / 4.0F; - f3 = (float)((double)f9 * this.renderMaxY * this.renderMaxZ + (double)f10 * this.renderMaxY * (1.0D - this.renderMaxZ) + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) + (double)f8 * (1.0D - this.renderMaxY) * this.renderMaxZ); - f4 = (float)((double)f9 * this.renderMaxY * this.renderMinZ + (double)f10 * this.renderMaxY * (1.0D - this.renderMinZ) + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) + (double)f8 * (1.0D - this.renderMaxY) * this.renderMinZ); - f5 = (float)((double)f9 * this.renderMinY * this.renderMinZ + (double)f10 * this.renderMinY * (1.0D - this.renderMinZ) + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) + (double)f8 * (1.0D - this.renderMinY) * this.renderMinZ); - f6 = (float)((double)f9 * this.renderMinY * this.renderMaxZ + (double)f10 * this.renderMinY * (1.0D - this.renderMaxZ) + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) + (double)f8 * (1.0D - this.renderMinY) * this.renderMaxZ); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMaxY * this.renderMaxZ, this.renderMaxY * (1.0D - this.renderMaxZ), (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), (1.0D - this.renderMaxY) * this.renderMaxZ); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMaxY * this.renderMinZ, this.renderMaxY * (1.0D - this.renderMinZ), (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), (1.0D - this.renderMaxY) * this.renderMinZ); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMinY * this.renderMinZ, this.renderMinY * (1.0D - this.renderMinZ), (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), (1.0D - this.renderMinY) * this.renderMinZ); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMinY * this.renderMaxZ, this.renderMinY * (1.0D - this.renderMaxZ), (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), (1.0D - this.renderMinY) * this.renderMaxZ); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) - { - if (this.renderMaxX >= 1.0D) - { - ++xPos; - } - - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); - - if (!flag3 && !flag5) - { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag3 && !flag4) - { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag2 && !flag5) - { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } - else - { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag2 && !flag4) - { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } - else - { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMaxX >= 1.0D) - { - --xPos; - } - - i1 = l; - - if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos).isOpaqueCube()) - { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) / 4.0F; - f9 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) / 4.0F; - f10 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) / 4.0F; - f11 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) / 4.0F; - f3 = (float)((double)f8 * (1.0D - this.renderMinY) * this.renderMaxZ + (double)f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) + (double)f10 * this.renderMinY * (1.0D - this.renderMaxZ) + (double)f11 * this.renderMinY * this.renderMaxZ); - f4 = (float)((double)f8 * (1.0D - this.renderMinY) * this.renderMinZ + (double)f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) + (double)f10 * this.renderMinY * (1.0D - this.renderMinZ) + (double)f11 * this.renderMinY * this.renderMinZ); - f5 = (float)((double)f8 * (1.0D - this.renderMaxY) * this.renderMinZ + (double)f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) + (double)f10 * this.renderMaxY * (1.0D - this.renderMinZ) + (double)f11 * this.renderMaxY * this.renderMinZ); - f6 = (float)((double)f8 * (1.0D - this.renderMaxY) * this.renderMaxZ + (double)f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) + (double)f10 * this.renderMaxY * (1.0D - this.renderMaxZ) + (double)f11 * this.renderMaxY * this.renderMaxZ); - j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); - l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); - i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMinY) * this.renderMaxZ, (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), this.renderMinY * (1.0D - this.renderMaxZ), this.renderMinY * this.renderMaxZ); - this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMinY) * this.renderMinZ, (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), this.renderMinY * (1.0D - this.renderMinZ), this.renderMinY * this.renderMinZ); - this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMaxY) * this.renderMinZ, (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), this.renderMaxY * (1.0D - this.renderMinZ), this.renderMaxY * this.renderMinZ); - this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMaxY) * this.renderMaxZ, (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), this.renderMaxY * (1.0D - this.renderMaxZ), this.renderMaxY * this.renderMaxZ); - - if (flag1) - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; - } - else - { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) - { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - this.enableAO = false; - return flag; - } - -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java b/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java deleted file mode 100644 index 000badb80f..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.client.model.ModelBatKing; -import gtPlusPlus.core.entity.monster.EntityBatKing; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class RenderBatKing extends RenderLiving { - - private static final ResourceLocation batTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/batKing.png"); - - /** - * not actually sure this is size, is not used as of now, but the model would be - * recreated if the value changed and it seems a good match for a bats size - */ - private int renderedBatSize; - - public RenderBatKing() { - super(new ModelBatKing(), 0.7F); - this.renderedBatSize = (((ModelBatKing) this.mainModel).getBatSize()); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker function - * which does the actual work. In all probabilty, the class Render is generic - * (Render 1.0F) - { - f2 = 1.0F; - } - - f2 *= f2; - f2 *= f2; - final float f3 = 1.0F + (f2 * 0.3F); - GL11.glScalef(f3, f3, f3); - } - - f2 = (1.0F - (((entity.fuse - p_76986_9_) + 1.0F) / 100.0F)) * 0.8F; - this.bindEntityTexture(entity); - this.blockRenderer.renderBlockAsItem(ModBlocks.blockMiningExplosive, 0, entity.getBrightness(p_76986_9_)); - - if (((entity.fuse / 5) % 2) == 0) - { - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); - GL11.glColor4f(1.0F, 1.0F, 1.0F, f2); - this.blockRenderer.renderBlockAsItem(ModBlocks.blockMiningExplosive, 0, 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - } - - GL11.glPopMatrix(); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(final EntityPrimedMiningExplosive p_110775_1_){ - return TextureMap.locationBlocksTexture; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(final Entity p_110775_1_){ - Logger.WARNING("Rendering Mining Explosion. 4"); - return this.getEntityTexture((EntityPrimedMiningExplosive)p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render= 0; --i) { - adouble[i] = d3; - adouble1[i] = d4; - d3 += (double) (random.nextInt(11) - 5); - d4 += (double) (random.nextInt(11) - 5); - } - - for (int k1 = 0; k1 < 4; ++k1) { - Random random1 = new XSTR(p_76986_1_.boltVertex); - - for (int j = 0; j < 3; ++j) { - int k = 7; - int l = 0; - - if (j > 0) { - k = 7 - j; - } - - if (j > 0) { - l = k - 2; - } - - double d5 = adouble[k] - d3; - double d6 = adouble1[k] - d4; - - for (int i1 = k; i1 >= l; --i1) { - double d7 = d5; - double d8 = d6; - - if (j == 0) { - d5 += (double) (random1.nextInt(11) - 5); - d6 += (double) (random1.nextInt(11) - 5); - } - else { - d5 += (double) (random1.nextInt(31) - 15); - d6 += (double) (random1.nextInt(31) - 15); - } - - tessellator.startDrawing(5); - float f2 = 0.5F; - tessellator.setColorRGBA_F(0.9F * f2, 0.9F * f2, 1.0F * f2, 0.3F); - double d9 = 0.1D + (double) k1 * 0.2D; - - if (j == 0) { - d9 *= (double) i1 * 0.1D + 1.0D; - } - - double d10 = 0.1D + (double) k1 * 0.2D; - - if (j == 0) { - d10 *= (double) (i1 - 1) * 0.1D + 1.0D; - } - - for (int j1 = 0; j1 < 5; ++j1) { - double d11 = p_76986_2_ + 0.5D - d9; - double d12 = p_76986_6_ + 0.5D - d9; - - if (j1 == 1 || j1 == 2) { - d11 += d9 * 2.0D; - } - - if (j1 == 2 || j1 == 3) { - d12 += d9 * 2.0D; - } - - double d13 = p_76986_2_ + 0.5D - d10; - double d14 = p_76986_6_ + 0.5D - d10; - - if (j1 == 1 || j1 == 2) { - d13 += d10 * 2.0D; - } - - if (j1 == 2 || j1 == 3) { - d14 += d10 * 2.0D; - } - - tessellator.addVertex(d13 + d5, p_76986_4_ + (double) (i1 * 16), d14 + d6); - tessellator.addVertex(d11 + d7, p_76986_4_ + (double) ((i1 + 1) * 16), d12 + d8); - } - - tessellator.draw(); - } - } - } - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityTeslaTowerLightning p_110775_1_) { - return null; - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - Logger.INFO("Render Plasma. 5"); - return this.getEntityTexture((EntityTeslaTowerLightning) p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker - * function which does the actual work. In all probabilty, the class Render - * is generic (Render> 16 & 255) / 255.0F; - float f3 = (i >> 8 & 255) / 255.0F; - float f4 = (i & 255) / 255.0F; - GL11.glColor3f(f2, f3, f4); - GL11.glPushMatrix(); - this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay")); - GL11.glPopMatrix(); - GL11.glColor3f(1.0F, 1.0F, 1.0F); - } - - this.func_77026_a(tessellator, iicon); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return TextureMap.locationItemsTexture; - } - - private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) - { - float f = p_77026_2_.getMinU(); - float f1 = p_77026_2_.getMaxU(); - float f2 = p_77026_2_.getMinV(); - float f3 = p_77026_2_.getMaxV(); - float f4 = 1.0F; - float f5 = 0.5F; - float f6 = 0.25F; - GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - p_77026_1_.startDrawingQuads(); - p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); - p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); - p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); - p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); - p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); - p_77026_1_.draw(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java b/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java deleted file mode 100644 index e1e8360840..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java +++ /dev/null @@ -1,99 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.client.model.ModelSickBlaze; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.lib.CORE; - -@SideOnly(Side.CLIENT) -public class RenderSickBlaze extends RenderLiving -{ - private static final ResourceLocation blazeTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/sickBlaze.png"); - private int field_77068_a; - - public RenderSickBlaze() - { - super(new ModelSickBlaze(), 0.5F); - this.field_77068_a = ((ModelSickBlaze)this.mainModel).func_78104_a(); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render= 0.01D) { - float f3 = 13.0F; - float f4 = p_77043_1_.limbSwing - p_77043_1_.limbSwingAmount * (1.0F - p_77043_4_) + 6.0F; - float f5 = (Math.abs(f4 % f3 - f3 * 0.5F) - f3 * 0.25F) / (f3 * 0.25F); - GL11.glRotatef(6.5F * f5, 0.0F, 0.0F, 1.0F); - } - } - - protected void renderEquippedItems(EntityStaballoyConstruct p_77029_1_, float p_77029_2_) { - super.renderEquippedItems(p_77029_1_, p_77029_2_); - - if (p_77029_1_.getHoldRoseTick() != 0) { - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glPushMatrix(); - GL11.glRotatef(5.0F + 180.0F * this.staballoyGolemModel.ironGolemRightArm.rotateAngleX / (float) Math.PI, 1.0F, - 0.0F, 0.0F); - GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F); - GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); - float f1 = 0.8F; - GL11.glScalef(f1, -f1, f1); - int i = p_77029_1_.getBrightnessForRender(p_77029_2_); - int j = i % 65536; - int k = i / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.bindTexture(TextureMap.locationBlocksTexture); - this.field_147909_c.renderBlockAsItem(Blocks.red_flower, 0, 1.0F); - GL11.glPopMatrix(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - } - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker - * function which does the actual work. In all probabilty, the class Render - * is generic (Render 0) { - this.motionX *= 0.02D; - this.motionY *= 0.02D; - this.motionZ *= 0.02D; - this.setParticleTextureIndex(113); - } else { - this.setParticleTextureIndex(112); - } - this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.9800000190734863D; - this.motionY *= 0.9800000190734863D; - this.motionZ *= 0.9800000190734863D; - - if (this.particleMaxAge-- <= 0) { - this.setDead(); - } - if (this.onGround) { - this.setParticleTextureIndex(114); - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - if (this.particleGravity > 0) { - Material material = this.worldObj.getBlock(MathHelper.floor(this.posX), MathHelper.floor(this.posY), MathHelper.floor(this.posZ)).getMaterial(); - - if (material.isLiquid() || material.isSolid()) { - double d0 = MathHelper.floor(this.posY) - + 1 - - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor(this.posX), MathHelper.floor(this.posY), - MathHelper.floor(this.posZ))); - if (this.posY < d0) { - this.setDead(); - } - } - } else { - Material material = this.worldObj.getBlock(MathHelper.ceil(this.posX), MathHelper.ceil(this.posY), MathHelper.ceil(this.posZ)).getMaterial(); - - if (material.isLiquid() || material.isSolid()) { - double d0 = MathHelper.ceil(this.posY) - + 1 - - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.ceil(this.posX), MathHelper.ceil(this.posY), - MathHelper.ceil(this.posZ))); - if (this.posY > d0) { - this.setDead(); - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java b/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java deleted file mode 100644 index b4f64f9b35..0000000000 --- a/src/Java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java +++ /dev/null @@ -1,46 +0,0 @@ -package gtPlusPlus.core.client.renderer.tabula; - -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class RenderTabulaBase extends TileEntitySpecialRenderer { - - private final ModelTabulaBase mModel; - private final ResourceLocation mTexture; - private final Class mTileClass; - - public final int mRenderID; - public final RenderTabulaBase mInstance; - - public RenderTabulaBase(ModelTabulaBase aModel, String aTexturePath, Class aTileClass) { - mModel = aModel; - mTexture = new ResourceLocation(CORE.MODID, aTexturePath); - mTileClass = aTileClass; - this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); - mInstance = this; - } - - public void renderTileEntityAt(Object aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { - if (mTileClass.isInstance(aTile)) { - //Logger.INFO("Rendering EggBox"); - this.bindTexture(mTexture); - mModel.renderAll(); - } - } - - public void renderTileEntityAt(TileEntity aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { - if (mTileClass != null && aTile != null) { - if (mTileClass.isInstance(aTile)) { - this.renderTileEntityAt((Object) aTile, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_); - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/commands/CommandDebugChunks.java b/src/Java/gtPlusPlus/core/commands/CommandDebugChunks.java deleted file mode 100644 index 8e86bcdcd6..0000000000 --- a/src/Java/gtPlusPlus/core/commands/CommandDebugChunks.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.commands; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.preloader.ChunkDebugger; -import gtPlusPlus.preloader.asm.AsmConfig; - - -public class CommandDebugChunks implements ICommand -{ - private final List aliases; - - protected String fullEntityName; - protected Entity conjuredEntity; - - public CommandDebugChunks(){ - this.aliases = new ArrayList<>(); - aliases.add("debugchunks"); - aliases.add("DC"); - } - - @Override - public int compareTo(final Object o){ - return 0; - - } - - @Override - public String getCommandName(){ - return "DebugChunks"; - - } - - @Override - public String getCommandUsage(final ICommandSender var1){ - return "/DebugChunks"; - - } - - @Override - public List getCommandAliases(){ - return this.aliases; - - } - - @Override - public void processCommand(final ICommandSender S, final String[] argString){ - Logger.INFO("Debug Command"); - - final World W = S.getEntityWorld(); - final EntityPlayer P = CommandUtils.getPlayer(S); - - if (!AsmConfig.enableChunkDebugging) { - PlayerUtils.messagePlayer(P, "Chunk Debugging is disabled."); - return; - } - - - Map aTicketCounter = new LinkedHashMap(); - for (Pair f : ChunkDebugger.mChunkTicketsMap.values()) { - String aMod = f.getKey(); - String aDim = f.getValue(); - if (aMod != null) { - if (aTicketCounter.containsKey(aMod)) { - int aModTicketCount = aTicketCounter.get(aMod); - aModTicketCount++; - aTicketCounter.put(aMod, aModTicketCount); - } - else { - aTicketCounter.put(aMod, 1); - } - } - } - if (aTicketCounter.isEmpty()) { - PlayerUtils.messagePlayer(P, "No forced chunk tickets active."); - } - for (String x : aTicketCounter.keySet()) { - PlayerUtils.messagePlayer(P, x+" has "+aTicketCounter.get(x)+" tickets active."); - } - - - Map aChunkCounter = new LinkedHashMap(); - for (Pair f : ChunkDebugger.mChunksLoadedByModsMap.values()) { - String aMod = f.getKey(); - String aDim = f.getValue(); - if (aMod == null) { - aMod = "Bad ModId"; - } - - if (aMod != null) { - //PlayerUtils.messagePlayer(P, aMod+" has "+aDim+" active."); - if (aChunkCounter.containsKey(aMod)) { - int aModTicketCount = aChunkCounter.get(aMod); - aModTicketCount = aModTicketCount + 1; - aChunkCounter.put(aMod, aModTicketCount); - Logger.INFO("Counting +1 for "+aMod+", total of "+aModTicketCount); - } - else { - aChunkCounter.put(aMod, 1); - Logger.INFO("Counting +1 for "+aMod); - } - } - } - if (aChunkCounter.isEmpty()) { - PlayerUtils.messagePlayer(P, "No chunks force loaded."); - } - for (String x : aChunkCounter.keySet()) { - PlayerUtils.messagePlayer(P, x+" has "+aChunkCounter.get(x)+" chunks active."); - } - - } - - @Override - public boolean canCommandSenderUseCommand(final ICommandSender var1){ - final EntityPlayer P = CommandUtils.getPlayer(var1); - if (P == null){ - return false; - } - if (PlayerUtils.isPlayerOP(P)) { - return true; - } - return false; - } - - @Override - public List addTabCompletionOptions(final ICommandSender var1, final String[] var2){ - return new ArrayList<>(); - } - - @Override - public boolean isUsernameIndex(final String[] var1, final int var2){ - // TODO Auto-generated method stub - return false; - } - - public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java deleted file mode 100644 index 493b7d415d..0000000000 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ /dev/null @@ -1,270 +0,0 @@ -package gtPlusPlus.core.commands; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.preloader.asm.AsmConfig; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - - -public class CommandEnableDebugWhileRunning implements ICommand -{ - private final List aliases; - - public CommandEnableDebugWhileRunning(){ - this.aliases = new ArrayList<>(); - this.aliases.add("gtplusplus"); - } - - @Override - public int compareTo(final Object o){ - if (o instanceof Comparable) { - @SuppressWarnings("unchecked") - Comparable a = (Comparable) o; - if (a.equals(this)) { - return 0; - } - else { - return -1; - } - } - return -1; - } - - @Override - public String getCommandName(){ - return "gtpp"; - - } - - - // Use '/gtpp' along with 'logging' or 'debug' to toggle Debug mode and Logging. - // Using nothing after the command toggles both to their opposite states respectively. - @Override - public String getCommandUsage(final ICommandSender var1){ - return "/gtpp ?"; - } - - @Override - public List getCommandAliases(){ - return this.aliases; - } - - @Override - public void processCommand(final ICommandSender S, final String[] argString){ - int aMaxArgumentsAllowed = 2; - - if ((argString == null || argString.length == 0 || argString.length > aMaxArgumentsAllowed) || argString[0].toLowerCase().equals("?")) { - Logger.INFO("Listing commands and their uses."); - final EntityPlayer P = CommandUtils.getPlayer(S); - AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging); - PlayerUtils.messagePlayer(P, "The following are valid args for the '/gtpp' command:"); - PlayerUtils.messagePlayer(P, "? - This help command."); - PlayerUtils.messagePlayer(P, "logging - Toggles ALL GT++ logging for current session."); - PlayerUtils.messagePlayer(P, "hand - Lists information about held item."); - PlayerUtils.messagePlayer(P, "fuid xxx - Tries to find the fluid in the FluidRegistry."); - PlayerUtils.messagePlayer(P, "debug - Toggles GT++ Debug Mode. Only use when advised, may break everything. (OP)"); - } - else if (argString[0].toLowerCase().equals("debug")) { - Logger.INFO("Toggling Debug Mode."); - final EntityPlayer P = CommandUtils.getPlayer(S); - if (PlayerUtils.isPlayerOP(P)) { - CORE_Preloader.DEBUG_MODE = Utils.invertBoolean(CORE_Preloader.DEBUG_MODE); - PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE_Preloader.DEBUG_MODE); - } - } - else if (argString[0].toLowerCase().equals("logging")) { - Logger.INFO("Toggling Logging."); - final EntityPlayer P = CommandUtils.getPlayer(S); - AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging); - PlayerUtils.messagePlayer(P, "Toggled GT++ Logging - Enabled: "+(!AsmConfig.disableAllLogging)); - } - /* else if (argString[0].toLowerCase().equals("test")) { - ItemStack mSemiFluidgen = ItemUtils.simpleMetaStack("IC2:blockGenerator", 7, 1); - final EntityPlayer P = CommandUtils.getPlayer(S); - if(mSemiFluidgen != null) { - PlayerUtils.messagePlayer(P, ItemUtils.getItemName(mSemiFluidgen)); - } - }*/ - - else if (argString[0].toLowerCase().equals("inv")) { - final EntityPlayer P = CommandUtils.getPlayer(S); - if (P != null && !P.worldObj.isRemote) { - ItemStack[] aInv = P.inventory.mainInventory; - for (ItemStack aItem : aInv) { - if (aItem != null) { - String aModID = GameRegistry.findUniqueIdentifierFor(aItem.getItem()).modId; - String aRegistryName = GameRegistry.findUniqueIdentifierFor(aItem.getItem()).name; - Logger.INFO(aModID+":"+aRegistryName); - } - } - } - } - else if (argString[0].toLowerCase().equals("hand")) { - final EntityPlayer P = CommandUtils.getPlayer(S); - if (P != null) { - ItemStack aHeldItem = PlayerUtils.getItemStackInPlayersHand(P); - if (aHeldItem != null) { - String aItemDisplayName = ItemUtils.getItemName(aHeldItem); - String aItemUnlocalName = ItemUtils.getUnlocalizedItemName(aHeldItem); - String aNbtString = tryIterateNBTData(aHeldItem); - AutoMap aOreDictNames = new AutoMap(); - - int[] aOreIDs = OreDictionary.getOreIDs(aHeldItem); - for (int id : aOreIDs) { - String aOreNameFromID = OreDictionary.getOreName(id); - if (aOreNameFromID != null && aOreNameFromID.length() > 0 && !aOreNameFromID.equals("Unknown")) { - aOreDictNames.add(aOreNameFromID); - } - } - - String aOreDictData = ""; - if (!aOreDictNames.isEmpty()) { - for (String tag : aOreDictNames) { - aOreDictData += (tag+", "); - } - if (aOreDictData.endsWith(", ")) { - aOreDictData = aOreDictData.substring(0, aOreDictData.length()-2); - } - } - - AutoMap aFluidContainerData = new AutoMap(); - FluidStack aHeldItemFluid = FluidContainerRegistry.getFluidForFilledItem(aHeldItem); - if (aHeldItemFluid != null) { - aFluidContainerData.put("FluidStack Unlocal Name: "+aHeldItemFluid.getUnlocalizedName()); - aFluidContainerData.put("FluidStack Local Name: "+aHeldItemFluid.getLocalizedName()); - aFluidContainerData.put("Fluid Unlocal Name: "+aHeldItemFluid.getFluid().getUnlocalizedName()); - aFluidContainerData.put("Fluid Local Name: "+aHeldItemFluid.getFluid().getLocalizedName()); - aFluidContainerData.put("Fluid Name: "+aHeldItemFluid.getFluid().getName()); - } - - PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "); - if (aFluidContainerData.size() > 0) { - for (String s : aFluidContainerData) { - PlayerUtils.messagePlayer(P, ""+s); - } - } - if (!aOreDictNames.isEmpty()) { - PlayerUtils.messagePlayer(P, ""+aOreDictData); - } - if (aNbtString.length() > 0) { - PlayerUtils.messagePlayer(P, ""+aNbtString); - } - } - else { - PlayerUtils.messagePlayer(P, "No item held."); - } - } - } - else if (argString[0].toLowerCase().equals("fluid")) { - if (argString.length > 1 && argString[1] != null && argString[1].length() > 0) { - final EntityPlayer P = CommandUtils.getPlayer(S); - FluidStack aFluid = FluidUtils.getWildcardFluidStack(argString[1], 1); - if (P != null && aFluid != null) { - PlayerUtils.messagePlayer(P, "Found fluid stack: "+FluidRegistry.getFluidName(aFluid)); - } - else if (P != null && aFluid == null) { - PlayerUtils.messagePlayer(P, "Could not find any fluids."); - } - } - } - else if (argString[0].toLowerCase().equals("item")) { - if (argString.length > 1 && argString[1] != null && argString[1].length() > 0) { - final EntityPlayer P = CommandUtils.getPlayer(S); - ItemStack aTest = ItemUtils.getItemStackFromFQRN(argString[1], 1); - if (P != null && aTest != null) { - PlayerUtils.messagePlayer(P, "Found fluid stack: "+ItemUtils.getItemName(aTest)); - } - else if (P != null && aTest == null) { - PlayerUtils.messagePlayer(P, "Could not find valid item."); - } - } - } - else { - final EntityPlayer P = CommandUtils.getPlayer(S); - PlayerUtils.messagePlayer(P, "Invalid command, use '?' as an argument for help.'"); - } - - } - - @Override - public boolean canCommandSenderUseCommand(final ICommandSender var1){ - if (var1 == null || CommandUtils.getPlayer(var1) == null) { - return false; - } - return true; - } - - @Override - public List addTabCompletionOptions(final ICommandSender var1, final String[] var2){ - ArrayList aTabCompletes = new ArrayList(); - aTabCompletes.add("?"); - aTabCompletes.add("logging"); - aTabCompletes.add("debug"); - aTabCompletes.add("hand"); - aTabCompletes.add("fluid"); - return aTabCompletes; - } - - @Override - public boolean isUsernameIndex(final String[] var1, final int var2){ - // TODO Auto-generated method stub - return false; - } - - public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ - return true; - } - - public static String tryIterateNBTData(ItemStack aStack) { - try { - AutoMap aItemDataTags = new AutoMap(); - NBTTagCompound aNBT = NBTUtils.getNBT(aStack); - if (aNBT != null) { - if (!aNBT.hasNoTags()) { - Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); - if (mInternalMap != null) { - for (Map.Entry e : mInternalMap.entrySet()) { - aItemDataTags.add(e.getKey().toString()+":"+e.getValue()); - } - int a = 0; - String data = ""; - for (String tag : aItemDataTags) { - data += (tag+", "); - } - if (data.endsWith(", ")) { - data = data.substring(0, data.length()-2); - } - return data; - } else { - Logger.INFO("Data map reflected from NBTTagCompound was not valid."); - return "Bad NBT"; - } - } - } - } catch (Throwable t) {} - return ""; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/commands/CommandMath.java b/src/Java/gtPlusPlus/core/commands/CommandMath.java deleted file mode 100644 index 5ccfb3397f..0000000000 --- a/src/Java/gtPlusPlus/core/commands/CommandMath.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.core.commands; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.MiningUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.preloader.ChunkDebugger; - - -public class CommandMath implements ICommand -{ - private final List aliases; - - protected String fullEntityName; - protected Entity conjuredEntity; - - public CommandMath(){ - this.aliases = new ArrayList<>(); - //this.aliases.add("hometele"); - //this.aliases.add("warphome"); - } - - @Override - public int compareTo(final Object o){ - return 0; - - } - - @Override - public String getCommandName(){ - return "alkalus"; - - } - - @Override - public String getCommandUsage(final ICommandSender var1){ - return "/alkalus [Dev Command]"; - - } - - @Override - public List getCommandAliases(){ - return this.aliases; - - } - - @Override - public void processCommand(final ICommandSender S, final String[] argString){ - Logger.INFO("Debug Command"); - final World W = S.getEntityWorld(); - final EntityPlayer P = CommandUtils.getPlayer(S); - if (P.getDisplayName().equalsIgnoreCase("draknyte1")) { - Logger.INFO("[Bedrock Miner] OreType Scan"); - MiningUtils.iterateAllOreTypes(); - } - - } - - @Override - public boolean canCommandSenderUseCommand(final ICommandSender var1){ - final EntityPlayer P = CommandUtils.getPlayer(var1); - if (P == null){ - return false; - } - if (P.getDisplayName().toLowerCase().equals("draknyte1") || P.getCommandSenderName().toLowerCase().equals("draknyte1") || CORE.DEVENV) { - return true; - } - return false; - } - - @Override - public List addTabCompletionOptions(final ICommandSender var1, final String[] var2){ - return null; - } - - @Override - public boolean isUsernameIndex(final String[] var1, final int var2){ - // TODO Auto-generated method stub - return false; - } - - public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ - - - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/commands/CommandUtils.java b/src/Java/gtPlusPlus/core/commands/CommandUtils.java deleted file mode 100644 index 175925d40c..0000000000 --- a/src/Java/gtPlusPlus/core/commands/CommandUtils.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.commands; - -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; - -public class CommandUtils { - - public static EntityPlayer getPlayer(final ICommandSender icommandsender){ - EntityPlayer player; - - if(icommandsender instanceof EntityPlayer){ - player = (EntityPlayer)icommandsender; - return player; - } - else { - return null; - } - } - -} diff --git a/src/Java/gtPlusPlus/core/common/BasePlayer.java b/src/Java/gtPlusPlus/core/common/BasePlayer.java deleted file mode 100644 index 4686f34207..0000000000 --- a/src/Java/gtPlusPlus/core/common/BasePlayer.java +++ /dev/null @@ -1,212 +0,0 @@ -package gtPlusPlus.core.common; - -import api.player.client.ClientPlayerAPI; -import api.player.client.ClientPlayerBase; -import gtPlusPlus.core.handler.events.CustomMovementHandler; -import gtPlusPlus.core.handler.events.SneakManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.util.MovementInputFromOptions; - -public class BasePlayer extends ClientPlayerBase -{ - private final Minecraft mc = Minecraft.getMinecraft(); - private final CustomMovementHandler customMovementInput = new CustomMovementHandler(); - private final GameSettings settings = this.mc.gameSettings; - - public BasePlayer(final ClientPlayerAPI api) - { - super(api); - } - - /* - * EntityPlayerSP.onLivingUpdate() - Adapted to PlayerAPI - */ - @Override - public void onLivingUpdate() { - - super.onLivingUpdate(); - EntityPlayer aPlayer = this.player; - if (aPlayer != null) { - SneakManager aSneak = SneakManager.get(aPlayer); - if (!aSneak.isWearingRing()) { - return; - } - } - - if(this.player.sprintingTicksLeft > 0) - { - --this.player.sprintingTicksLeft; - if(this.player.sprintingTicksLeft == 0) - { - this.player.setSprinting(false); - } - } - - if(this.playerAPI.getSprintToggleTimerField() > 0) - { - this.playerAPI.setSprintToggleTimerField(this.playerAPI.getSprintToggleTimerField() - 1); - } - - if(this.mc.playerController.enableEverythingIsScrewedUpMode()) - { - this.player.posX = this.player.posZ = 0.5D; - this.player.posX = 0.0D; - this.player.posZ = 0.0D; - this.player.rotationYaw = this.player.ticksExisted / 12.0F; - this.player.rotationPitch = 10.0F; - this.player.posY = 68.5D; - } - else - { - - - - - final boolean isJumping = this.player.movementInput.jump; - - final float minSpeed = 0.8F; - final boolean isMovingForward = this.player.movementInput.moveForward >= minSpeed; - this.customMovementInput.update(this.mc, (MovementInputFromOptions)this.player.movementInput, this.player); - - - /* - * Begin ToggleSneak Changes - ToggleSprint - */ - SneakManager aSneak = SneakManager.get(this.player); - - final boolean isSprintDisabled = false; - final boolean canDoubleTap = aSneak.optionDoubleTap; - - - // Detect when ToggleSprint was disabled in the in-game options menu - if(aSneak.wasSprintDisabled) - { - this.player.setSprinting(false); - this.customMovementInput.UpdateSprint(false, false, aSneak); - aSneak.wasSprintDisabled = false; - } - - // Default Sprint routine converted to PlayerAPI, use if ToggleSprint is disabled - TODO - Disable sprinting as a whole - if(isSprintDisabled) - { - //Utils.LOG_INFO("Sprint pressed"); - if(aSneak.optionDoubleTap && this.player.onGround && !isMovingForward && (this.player.movementInput.moveForward >= minSpeed) && !this.player.isSprinting() && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness)) - { - if((this.playerAPI.getSprintToggleTimerField() <= 0) && !this.settings.keyBindSprint.getIsKeyPressed()) - { - this.playerAPI.setSprintToggleTimerField(7); - } - else - { - if (aSneak.Sprinting()){ - this.player.setSprinting(true); - this.customMovementInput.UpdateSprint(true, false, aSneak); - } - else { - this.player.setSprinting(false); - this.customMovementInput.UpdateSprint(false, false, aSneak); - } - } - } - - if(!this.player.isSprinting() && (this.player.movementInput.moveForward >= minSpeed) && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) && this.settings.keyBindSprint.getIsKeyPressed()) - { - if (aSneak.Sprinting()){ - this.player.setSprinting(true); - this.customMovementInput.UpdateSprint(true, false, aSneak); - } - else { - this.player.setSprinting(false); - this.customMovementInput.UpdateSprint(false, false, aSneak); - } - } - } - else - { - final boolean state = this.customMovementInput.sprint; - - // Only handle changes in state under the following conditions: - // On ground, not hungry, not eating/using item, not blind, and not Vanilla - // - // 5/6/14 - onGround check removed to match vanilla's 'start sprint while jumping' behavior. - //if(this.player.onGround && enoughHunger && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) && !this.customMovementInput.sprintHeldAndReleased) - - if(!this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) && !this.customMovementInput.sprintHeldAndReleased) - { - if((canDoubleTap && !this.player.isSprinting()) || !canDoubleTap) - { - if (aSneak.Sprinting()){ - this.player.setSprinting(state); - } else { - this.player.setSprinting(false); - } - } - } - - if(canDoubleTap && !state && this.player.onGround && !isMovingForward && (this.player.movementInput.moveForward >= minSpeed) && !this.player.isSprinting() && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness)) - { - if(this.playerAPI.getSprintToggleTimerField() == 0) - { - this.playerAPI.setSprintToggleTimerField(7); - } - else - { - if (aSneak.Sprinting()){ - this.player.setSprinting(true); - this.customMovementInput.UpdateSprint(true, true, aSneak); - this.playerAPI.setSprintToggleTimerField(0); - } - } - } - } - - // If sprinting, break the sprint in appropriate circumstances: - // Player stops moving forward, runs into something, or gets too hungry - if(this.player.isSprinting() && ((this.player.movementInput.moveForward < minSpeed) || this.player.isCollidedHorizontally)) - { - this.player.setSprinting(false); - - // Undo toggle if we resumed vanilla operation due to Hold&Release, DoubleTap, Fly, Ride - if ((this.customMovementInput.sprintHeldAndReleased == true) || isSprintDisabled || this.customMovementInput.sprintDoubleTapped || this.player.capabilities.isFlying || this.player.isRiding()) - { - this.customMovementInput.UpdateSprint(false, false, aSneak); - } - } - - /* - * End ToggleSneak Changes - ToggleSprint - */ - - // // - // // Debug Framework - Added 5/7/2014 - // // - // if (this.showDebug && this.settings.keyBindPickBlock.getIsKeyPressed() && !this.handledDebugPress) - // { - // this.player.addChatMessage(new ChatComponentText("+--------------------------------------+")); - // this.player.addChatMessage(new ChatComponentText("| ToggleSneak Debug Info |")); - // this.player.addChatMessage(new ChatComponentText("+--------------------------------------+")); - // this.player.addChatMessage(new ChatComponentText(" ")); - // this.player.addChatMessage(new ChatComponentText("isFlying - " + (this.player.capabilities.isFlying == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("isCreative - " + (this.player.capabilities.isCreativeMode == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("enableFlyBoost - " + (SneakManager.optionEnableFlyBoost == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("flyBoostAmount - " + SneakManager.optionFlyBoostAmount)); - // this.player.addChatMessage(new ChatComponentText(" ")); - // this.player.addChatMessage(new ChatComponentText("keybindSprint - " + (this.settings.keyBindSprint.getIsKeyPressed() == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("keybindSneak - " + (this.settings.keyBindSneak.getIsKeyPressed() == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText("keybindJump - " + (this.settings.keyBindJump.getIsKeyPressed() == true ? "True" : "False"))); - // this.player.addChatMessage(new ChatComponentText(" ")); - // this.player.addChatMessage(new ChatComponentText(" ")); - // - // this.handledDebugPress = true; - // } - // else if (this.showDebug && !this.settings.keyBindPickBlock.getIsKeyPressed() && this.handledDebugPress) - // { - // this.handledDebugPress = false; - // } - - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java deleted file mode 100644 index c038afce8f..0000000000 --- a/src/Java/gtPlusPlus/core/common/CommonProxy.java +++ /dev/null @@ -1,306 +0,0 @@ -package gtPlusPlus.core.common; - -import cpw.mods.fml.common.event.*; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.OrePrefixes; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.entity.InternalEntityRegistry; -import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; -import gtPlusPlus.core.fluids.FluidFactory; -import gtPlusPlus.core.handler.*; -import gtPlusPlus.core.handler.events.*; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.chemistry.GenericChem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.tileentities.ModTileEntities; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.debug.DEBUG_INIT; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.player.PlayerCache; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.eio.handler.HandlerTooltip_EIO; -import gtPlusPlus.xmod.galacticraft.handler.HandlerTooltip_GC; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityBlaze; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.client.IItemRenderer; - -public class CommonProxy { - - public CommonProxy() { - // Should Register Gregtech Materials I've Made - Utils.registerEvent(this); - if (!CORE.GTNH) { - Logger.INFO("We're using Gregtech " + Utils.getGregtechVersionAsString()); - } else { - Logger.INFO("We're using GTNH's Gregtech " + Utils.getGregtechVersionAsString()); - } - } - - public void preInit(final FMLPreInitializationEvent e) { - Logger.INFO("Doing some house cleaning."); - LoadedMods.checkLoaded(); - Logger.INFO("Making sure we're ready to party!"); - - if (!CORE_Preloader.DEBUG_MODE) { - Logger.WARNING("Development mode not enabled."); - } else if (CORE_Preloader.DEBUG_MODE) { - Logger.INFO("Development mode enabled."); - } else { - Logger.WARNING("Development mode not set."); - } - - AddToCreativeTab.initialiseTabs(); - EnumHelperHandler.init(); - - // Moved from Init after Debug Loading. - // 29/01/18 - Alkalus - // Moved earlier into PreInit, so that Items exist before they're called upon in - // recipes. - // 20/03/18 - Alkalus - ModItems.init(); - ModBlocks.init(); - CI.preInit(); - FluidFactory.preInit(); - COMPAT_IntermodStaging.preInit(e); - BookHandler.run(); - // Registration of entities and renderers - Logger.INFO("[Proxy] Calling Entity registrator."); - registerEntities(); - Logger.INFO("[Proxy] Calling Tile Entity registrator."); - registerTileEntities(); - - Logger.INFO("[Proxy] Calling Render registrator."); - registerRenderThings(); - - } - - public void init(final FMLInitializationEvent e) { - // Debug Loading - if (CORE_Preloader.DEBUG_MODE) { - DEBUG_INIT.registerHandlers(); - } - - registerCustomItemsForMaterials(); - ModBlocks.blockCustomMobSpawner = new BlockGenericSpawner(); - CI.init(); - FluidFactory.init(); - - /** - * Register the Event Handlers. - */ - - // Prevents my Safes being destroyed. - Utils.registerEvent(new PickaxeBlockBreakEventHandler()); - // Block Handler for all events. - Utils.registerEvent(new BlockEventHandler()); - Utils.registerEvent(new GeneralTooltipEventHandler()); - // Handles Tooltips for items giving custom multiblock behaviour - Utils.registerEvent(new SpecialBehaviourTooltipHandler()); - // Handles Custom tooltips for EIO. - Utils.registerEvent(new HandlerTooltip_EIO()); - // Handles Custom Tooltips for GC - Utils.registerEvent(new HandlerTooltip_GC()); - - if (CORE.DEVENV) { - Utils.registerEvent(new StopAnnoyingFuckingAchievements()); - } - - Utils.registerEvent(new EnderDragonDeathHandler()); - Utils.registerEvent(new EntityDeathHandler()); - - if (ConfigSwitches.disableZombieReinforcement) { - // Make Zombie reinforcements fuck off. - Utils.registerEvent(new ZombieBackupSpawnEventHandler()); - } - - /** - * End of Subscribe Event registration. - */ - - // Compat Handling - COMPAT_HANDLER.registerMyModsOreDictEntries(); - COMPAT_HANDLER.intermodOreDictionarySupport(); - COMPAT_IntermodStaging.init(e); - } - - public void postInit(final FMLPostInitializationEvent e) { - Logger.INFO("Cleaning up, doing postInit."); - PlayerCache.initCache(); - FluidFactory.postInit(); - - // Make Burnables burnable - if (!CORE.burnables.isEmpty()) { - BurnableFuelHandler fuelHandler = new BurnableFuelHandler(); - GameRegistry.registerFuelHandler(fuelHandler); - Logger.INFO("[Fuel Handler] Registering " + fuelHandler.getClass().getName()); - } - - // Compat Handling - Logger.INFO("Removing recipes from other mods."); - COMPAT_HANDLER.RemoveRecipesFromOtherMods(); - Logger.INFO("Initialising Handler, Then Adding Recipes"); - COMPAT_HANDLER.InitialiseHandlerThenAddRecipes(); - Logger.INFO("Loading Intermod staging."); - COMPAT_IntermodStaging.postInit(e); - Logger.INFO("Loading queued recipes."); - COMPAT_HANDLER.runQueuedRecipes(); - Logger.INFO("Registering custom mob drops."); - registerCustomMobDrops(); - - // Moved last in postInit(). - // 12/12/19 - Alkalus - // Moved last, to prevent recipes being generated post initialisation. - Logger.INFO("Loading Gregtech API recipes."); - COMPAT_HANDLER.startLoadingGregAPIBasedRecipes(); - } - - public void serverStarting(final FMLServerStartingEvent e) { - COMPAT_HANDLER.InitialiseLateHandlerThenAddRecipes(); - } - - public void onLoadComplete(FMLLoadCompleteEvent event) { - COMPAT_IntermodStaging.onLoadComplete(event); - COMPAT_HANDLER.onLoadComplete(event); - } - - public void registerNetworkStuff() { - GuiHandler.init(); - } - - public void registerEntities() { - InternalEntityRegistry.registerEntities(); - } - - public void registerTileEntities() { - ModTileEntities.init(); - } - - public void registerRenderThings() { - - } - - public int addArmor(final String armor) { - return 0; - } - - public void generateMysteriousParticles(final Entity entity) { - - } - - public void generateMobSpawners() { - // Try register some test spawners - Utils.createNewMobSpawner(0, EntityGiantChickenBase.class); - Utils.createNewMobSpawner(1, EntitySickBlaze.class); - Utils.createNewMobSpawner(2, EntityStaballoyConstruct.class); - } - - public void registerCustomItemsForMaterials() { - //Material.registerComponentForMaterial(GenericChem.CARBYNE, OrePrefixes.plate, GregtechItemList.Carbyne_Sheet_Finished.get(1)); - } - - public void registerCustomMobDrops() { - - //Zombie - EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemRope), 3, 100); - EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemFiber), 5, 250); - EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemSandstoneHammer), 1, 10); - EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemBomb), 2, 10); - EntityUtils.registerDropsForMob(EntityZombie.class, ALLOY.TUMBAGA.getTinyDust(1), 1, 10); - EntityUtils.registerDropsForMob(EntityZombie.class, ALLOY.POTIN.getTinyDust(1), 1, 10); - - //Blazes - if (ItemUtils.doesOreDictHaveEntryFor("dustPyrotheum")) { - EntityUtils.registerDropsForMob(EntityBlaze.class, ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), 1, 10); - EntityUtils.registerDropsForMob(EntityBlaze.class, ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), 1, 10); - } - - - //Special mobs Support - if (ReflectionUtils.doesClassExist("toast.specialMobs.entity.zombie.EntityBrutishZombie")) { - Class aBrutishZombie = ReflectionUtils.getClass("toast.specialMobs.entity.zombie.EntityBrutishZombie"); - ItemStack aFortune1 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); - ItemStack aFortune2 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); - ItemStack aFortune3 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); - EntityUtils.registerDropsForMob(aBrutishZombie, aFortune1, 1, 100); - EntityUtils.registerDropsForMob(aBrutishZombie, aFortune2, 1, 50); - EntityUtils.registerDropsForMob(aBrutishZombie, aFortune3, 1, 1); - EntityUtils.registerDropsForMob(aBrutishZombie, ItemUtils.getItemStackOfAmountFromOreDict("ingotRedAlloy", 1), 3, 200); - } - - //GalaxySpace Support - if (ReflectionUtils.doesClassExist("galaxyspace.SolarSystem.moons.europa.entities.EntityEvolvedColdBlaze")) { - Class aColdBlaze = ReflectionUtils.getClass("galaxyspace.SolarSystem.moons.europa.entities.EntityEvolvedColdBlaze"); - ItemStack aSmallBlizz, aTinyBlizz, aSmallCryo, aTinyCryo; - aSmallBlizz = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallBlizz", 1); - aTinyBlizz = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyBlizz", 1); - aSmallCryo = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallCryotheum", 1); - aTinyCryo = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCryotheum", 1); - EntityUtils.registerDropsForMob(aColdBlaze, ItemUtils.getItemStackOfAmountFromOreDict("stickBlizz", 1), 2, 500); - if (aSmallBlizz != null) { - EntityUtils.registerDropsForMob(aColdBlaze, aSmallBlizz, 2, 750); - } - if (aTinyBlizz != null) { - EntityUtils.registerDropsForMob(aColdBlaze, aTinyBlizz, 4, 1500); - } - if (aSmallCryo != null) { - EntityUtils.registerDropsForMob(aColdBlaze, aSmallCryo, 1, 50); - } - if (aTinyCryo != null) { - EntityUtils.registerDropsForMob(aColdBlaze, aTinyCryo, 2, 100); - } - } - - } - - protected final AutoMap> mItemRenderMappings = new AutoMap>(); - - - public static void registerItemRendererGlobal(Item aItem, IItemRenderer aRenderer) { - GTplusplus.proxy.registerItemRenderer(aItem, aRenderer); - } - - public void registerItemRenderer(Item aItem, IItemRenderer aRenderer) { - if (Utils.isServer()) { - return; - } - else { - mItemRenderMappings.add(new Pair(aItem, aRenderer)); - } - } - - public World getClientWorld() { - return null; - } - - /** - * Returns a side-appropriate EntityPlayer for use during message handling - */ - public EntityPlayer getPlayerEntity(MessageContext ctx) { - return ctx.getServerHandler().playerEntity; - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java deleted file mode 100644 index c9704603af..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.bauble.BatteryPackBaseBauble; -import gtPlusPlus.core.item.bauble.FireProtectionBauble; -import gtPlusPlus.core.item.bauble.MonsterKillerBaseBauble; -import gtPlusPlus.core.item.general.ItemCloakingDevice; -import gtPlusPlus.core.item.general.ItemHealingDevice; -import gtPlusPlus.core.item.general.ItemSlowBuildingRing; -import gtPlusPlus.core.lib.LoadedMods; -import net.minecraft.entity.monster.EntityBlaze; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntityGhast; -import net.minecraft.entity.monster.EntityMagmaCube; -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.monster.EntitySkeleton; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.entity.monster.EntityZombie; - -public class COMPAT_Baubles { - - public static void run(){ - if (LoadedMods.Baubles){ - baublesLoaded(); - } - else { - baublesNotLoaded(); - } - } - - public static void baublesLoaded(){ - Logger.INFO("Baubles Found - Loading Wearables."); - ModItems.itemPersonalCloakingDevice = new ItemCloakingDevice(0); - //itemPersonalCloakingDeviceCharged = new ItemCloakingDevice(0).set; - ModItems.itemPersonalHealingDevice = new ItemHealingDevice(); - ModItems.itemPersonalFireProofDevice = new FireProtectionBauble(); - - try { - ModItems.itemChargePack_Low_1 = new BatteryPackBaseBauble(1); - ModItems.itemChargePack_Low_2 = new BatteryPackBaseBauble(2); - ModItems.itemChargePack_Low_3 = new BatteryPackBaseBauble(3); - ModItems.itemChargePack_Low_4 = new BatteryPackBaseBauble(4); - ModItems.itemChargePack_Low_5 = new BatteryPackBaseBauble(5); - ModItems.itemChargePack_High_1 = new BatteryPackBaseBauble(6); - ModItems.itemChargePack_High_2 = new BatteryPackBaseBauble(7); - ModItems.itemChargePack_High_3 = new BatteryPackBaseBauble(8); - ModItems.itemChargePack_High_4 = new BatteryPackBaseBauble(9); - } - catch (Throwable t) { - t.printStackTrace(); - } - - ModItems.itemAmuletMonsterKiller_Zombie = new MonsterKillerBaseBauble(new Class[] {EntityZombie.class}, "Zombie", 3); - ModItems.itemAmuletMonsterKiller_Skeleton = new MonsterKillerBaseBauble(new Class[] {EntitySkeleton.class}, "Skeleton", 3); - ModItems.itemAmuletMonsterKiller_Spider = new MonsterKillerBaseBauble(new Class[] {EntitySpider.class}, "Spider", 3); - ModItems.itemAmuletMonsterKiller_Creeper = new MonsterKillerBaseBauble(new Class[] {EntityCreeper.class}, "Creeper", 4); - ModItems.itemAmuletMonsterKiller_Enderman = new MonsterKillerBaseBauble(new Class[] {EntityEnderman.class}, "Enderman", 4); - ModItems.itemAmuletMonsterKiller_Nether = new MonsterKillerBaseBauble(new Class[] {EntityPigZombie.class, EntityGhast.class, EntityMagmaCube.class, EntityBlaze.class}, "Hellish", 6); - - if (LoadedMods.PlayerAPI){ - ModItems.itemSlowBuildingRing = new ItemSlowBuildingRing(); - } - } - - public static void baublesNotLoaded(){ - Logger.INFO("Baubles Not Found - Skipping Resources."); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java deleted file mode 100644 index 3854f6612f..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.item.ModItems; - -public class COMPAT_BigReactors { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - GT_OreDictUnificator.registerOre("plateBlutonium", new ItemStack(ModItems.itemPlateBlutonium)); - GT_OreDictUnificator.registerOre("plateCyanite", new ItemStack(ModItems.itemPlateCyanite)); - GT_OreDictUnificator.registerOre("plateLudicrite", new ItemStack(ModItems.itemPlateLudicrite)); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java deleted file mode 100644 index cd5d36b653..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java +++ /dev/null @@ -1,172 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import static gtPlusPlus.core.handler.COMPAT_HANDLER.*; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.recipe.ShapedRecipeObject; -import gtPlusPlus.core.util.minecraft.ItemUtils; - - - -public class COMPAT_CompactWindmills { - - //Change IC2 Upgrades - public static ItemStack kineticWind = ItemUtils.simpleMetaStack("IC2:blockKineticGenerator", 0, 1); - public static ItemStack shaftIron = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 11, 1); - public static ItemStack cableCopper = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 1367, 1); - public static String plateRubber = "ore:plateRubber"; - - //Machine Casings - public static ItemStack elvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 0, 1); - public static ItemStack lvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 1, 1); - public static ItemStack mvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 2, 1); - public static ItemStack hvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 3, 1); - public static ItemStack evCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 4, 1); - public static ItemStack ivCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 5, 1); - - //GT Transformers - public static ItemStack elvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 20, 1); - public static ItemStack lvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 21, 1); - public static ItemStack mvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 22, 1); - public static ItemStack hvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 23, 1); - public static ItemStack evTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 24, 1); - - //Compact Windmills - public static ItemStack elvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 0, 1); - public static ItemStack lvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 1, 1); - public static ItemStack mvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 2, 1); - public static ItemStack hvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 3, 1); - public static ItemStack evWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 4, 1); - - //Compact Rotors - public static ItemStack rotor2 = ItemUtils.getItemStackFromFQRN("CompactWindmills:WOOL", 1); - public static ItemStack rotor1 = ItemUtils.getItemStackFromFQRN("CompactWindmills:WOOD", 1); - public static ItemStack rotor3 = ItemUtils.getItemStackFromFQRN("CompactWindmills:ALLOY", 1); - public static ItemStack rotor4 = ItemUtils.getItemStackFromFQRN("CompactWindmills:CARBON", 1); - public static ItemStack rotor5 = ItemUtils.getItemStackFromFQRN("CompactWindmills:IRIDIUM", 1); - - //IC2 Rotors - public static ItemStack rotorIC1 = ItemUtils.getItemStackFromFQRN("IC2:itemwoodrotor", 1); - public static ItemStack rotorIC2 = ItemUtils.getItemStackFromFQRN("IC2:itemironrotor", 1); - public static ItemStack rotorIC3 = ItemUtils.getItemStackFromFQRN("IC2:itemsteelrotor", 1); - public static ItemStack rotorIC4 = ItemUtils.getItemStackFromFQRN("IC2:itemwcarbonrotor", 1); - public static ItemStack rotorBlade1 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 7, 1); - public static ItemStack rotorBlade2 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 8, 1); - public static ItemStack rotorBlade3 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 10, 1); - public static ItemStack rotorBlade4 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 9, 1); - - //Plates - public static String plateTier1 = "ore:plateMagnalium"; - public static String plateTier2 = "ore:plateStainlessSteel"; - public static String plateTier3 = "ore:plateTitanium"; - public static String plateTier4 = "ore:plateTungstenSteel"; - public static String plateTier5 = "ore:plateNichrome"; - public static String plateCarbon = "ore:plateAlloyCarbon"; - public static String plateAlloy = "ore:plateAlloyAdvanced"; - - //Circuits - public static String circuitTier1 = "ore:circuitGood"; - public static String circuitTier2 = "ore:circuitAdvanced"; - public static String circuitTier3 = "ore:circuitData"; - public static String circuitTier4 = "ore:circuitElite"; - public static String circuitTier5 = "ore:circuitMaster"; - - //Wooden Rotor - public static ShapedRecipeObject Wooden_Rotor = new ShapedRecipeObject( - rotorBlade1, "ore:plateAnyIron", "ore:plateAnyIron", - "ore:screwAluminium", rotorIC1, "ore:screwAluminium", - rotorBlade1, "plateAnyIron", rotorBlade1, - rotor1); - //Alloy Rotor - public static ShapedRecipeObject Alloy_Rotor = new ShapedRecipeObject( - plateAlloy, plateAlloy, plateAlloy, - plateAlloy, rotorIC3, plateAlloy, - plateAlloy,plateAlloy, plateAlloy, - rotor3); - //Carbon Rotor - public static ShapedRecipeObject Carbon_Rotor = new ShapedRecipeObject( - plateCarbon, rotorBlade4, plateCarbon, - rotorBlade4, rotor3, rotorBlade4, - plateCarbon, rotorBlade4, plateCarbon, - rotor4); - - //Kinetic Wind Turbine - public static ShapedRecipeObject KWT = new ShapedRecipeObject( - plateCarbon, shaftIron, plateCarbon, - cableCopper, mvCasing, cableCopper, - plateRubber, plateCarbon, plateRubber, - kineticWind); - - //ELV Windmill - public static ShapedRecipeObject WM_ELV = new ShapedRecipeObject( - - circuitTier1, elvTransformer, circuitTier1, - plateTier1, lvCasing, plateTier1, - plateTier1, rotor1, plateTier1, - elvWindmill); - - - //LV Windmill - public static ShapedRecipeObject WM_LV = new ShapedRecipeObject( - circuitTier2, lvTransformer, circuitTier2, - plateTier2, mvCasing, plateTier2, - plateTier2, rotor2, plateTier2, - lvWindmill); - - //MV Windmill - public static ShapedRecipeObject WM_MV = new ShapedRecipeObject( - circuitTier3, mvTransformer, circuitTier3, - plateTier3, hvCasing, plateTier3, - plateTier3, rotor3, plateTier3, - mvWindmill); - - //HV Windmill - public static ShapedRecipeObject WM_HV = new ShapedRecipeObject( - circuitTier4, hvTransformer, circuitTier4, - plateTier4, evCasing, plateTier4, - plateTier4, rotor4, plateTier4, - hvWindmill); - - //EV Windmill - public static ShapedRecipeObject WM_EV = new ShapedRecipeObject( - circuitTier5, evTransformer, circuitTier5, - plateTier5, ivCasing, plateTier5, - plateTier5, rotor5, plateTier5, - evWindmill); - - public static void OreDict(){ - run(); - } - - private static final void run(){ - //RemoveRecipeQueue.add("CompactWindmills:WOOL"); - //RemoveRecipeQueue.add("CompactWindmills:WOOD"); - //RemoveRecipeQueue.add("CompactWindmills:ALLOY"); - //RemoveRecipeQueue.add("CompactWindmills:CARBON"); - //RemoveRecipeQueue.add("CompactWindmills:IRIDIUM"); - - //Remove Recipes - RemoveRecipeQueue.add(kineticWind); - RemoveRecipeQueue.add(elvWindmill); - RemoveRecipeQueue.add(lvWindmill); - RemoveRecipeQueue.add(mvWindmill); - RemoveRecipeQueue.add(hvWindmill); - RemoveRecipeQueue.add(evWindmill); - RemoveRecipeQueue.add(rotor1); - RemoveRecipeQueue.add(rotor3); - RemoveRecipeQueue.add(rotor4); - - //Add Recipes - AddRecipeQueue.add(Wooden_Rotor); - AddRecipeQueue.add(Alloy_Rotor); - AddRecipeQueue.add(Carbon_Rotor); - AddRecipeQueue.add(KWT); - AddRecipeQueue.add(WM_ELV); - AddRecipeQueue.add(WM_LV); - AddRecipeQueue.add(WM_MV); - AddRecipeQueue.add(WM_HV); - AddRecipeQueue.add(WM_EV); - - } -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java deleted file mode 100644 index 6598a7e21e..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class COMPAT_EnderIO { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - ItemUtils.getItemForOreDict("EnderIO:itemAlloy", "ingotVibrantAlloy", "Vibrant Alloy Ingot", 2); - GT_OreDictUnificator.registerOre("plateConductiveIron", new ItemStack(ModItems.itemPlateConductiveIron)); - GT_OreDictUnificator.registerOre("plateDarkSteel", new ItemStack(ModItems.itemPlateDarkSteel)); - GT_OreDictUnificator.registerOre("plateElectricalSteel", new ItemStack(ModItems.itemPlateElectricalSteel)); - GT_OreDictUnificator.registerOre("plateEnergeticAlloy", new ItemStack(ModItems.itemPlateEnergeticAlloy)); - GT_OreDictUnificator.registerOre("platePulsatingIron", new ItemStack(ModItems.itemPlatePulsatingIron)); - GT_OreDictUnificator.registerOre("plateRedstoneAlloy", new ItemStack(ModItems.itemPlateRedstoneAlloy)); - GT_OreDictUnificator.registerOre("plateSoularium", new ItemStack(ModItems.itemPlateSoularium)); - GT_OreDictUnificator.registerOre("plateVibrantAlloy", new ItemStack(ModItems.itemPlateVibrantAlloy)); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java deleted file mode 100644 index d5ee51f61a..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.recipe.RECIPES_Tools; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; - -public class COMPAT_ExtraUtils { - - public static void OreDict(){ - RECIPES_Tools.RECIPE_DivisionSigil = new ItemStack(ItemUtils.getItemFromFQRN("ExtraUtilities:divisionSigil")); - run(); - - } - - private static final void run(){ - ItemUtils.getItemForOreDict("ExtraUtilities:bedrockiumIngot", "ingotBedrockium", "Bedrockium Ingot", 0); - //GT_OreDictUnificator.registerOre("plateBedrockium", new ItemStack(ModItems.itemPlateBedrockium)); - - if (ConfigSwitches.enableAlternativeDivisionSigilRecipe){ - //Division Sigil - RecipeUtils.addShapedRecipe( - "plateNetherStar", "gemIridium", "plateNetherStar", - "plateIridium", RECIPES_Tools.craftingToolHardHammer, "plateIridium", - "plateNetherStar", "gemIridium", "plateNetherStar", - RECIPES_Tools.RECIPE_DivisionSigil); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java deleted file mode 100644 index 9e148f0102..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler; - -public class COMPAT_HarvestCraft { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - FishTrapHandler.pamsHarvestCraftCompat(); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java deleted file mode 100644 index e1ed2a666a..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java +++ /dev/null @@ -1,64 +0,0 @@ -package gtPlusPlus.core.common.compat; - - -import static gtPlusPlus.core.handler.COMPAT_HANDLER.RemoveRecipeQueue; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.recipe.ShapedRecipeObject; -import gtPlusPlus.core.util.minecraft.ItemUtils; - - -public class COMPAT_IC2 { - - private static ItemStack itemCropnalyzer = ItemUtils.simpleMetaStack("IC2:itemCropnalyzer", 0, 1); - private static ItemStack itemSolarHelmet = ItemUtils.simpleMetaStack("IC2:itemSolarHelmet", 0, 1); - - public static ShapedRecipeObject Cropnalyzer = new ShapedRecipeObject( - "ore:cableGt02Copper", "ore:cableGt02Copper", null, - "minecraft:redstone", "ore:blockGlass", "minecraft:redstone", - "minecraft:redstone", "ore:circuitBasic", "minecraft:redstone", - itemCropnalyzer); - public static ShapedRecipeObject SolarHelmet = new ShapedRecipeObject( - "ore:plateIron", "ore:plateIron", "ore:plateIron", - "ore:plateIron", "gregtech:gt.metaitem.01:32750", "ore:plateIron", - "ore:craftingWireCopper", "ore:craftingWireCopper", "ore:craftingWireCopper", - itemSolarHelmet); - - - - public static void OreDict(){ - //Get ItemStacks for results - /*itemCropnalyzer = UtilsItems.getItemStack("IC2:itemCropnalyzer", 1); - itemSolarHelmet = UtilsItems.getItemStack("IC2:itemSolarHelmet", 1); */ - run(); - } - - private static final void run(){ - - if (ConfigSwitches.disableIC2Recipes){ - - - - if (LoadedMods.Gregtech){ - //Fuck these right off. - RemoveRecipeQueue.add("IC2:itemCable"); - RemoveRecipeQueue.add("IC2:itemCable:1"); - RemoveRecipeQueue.add("IC2:itemCable:2"); - RemoveRecipeQueue.add("IC2:itemCable:3"); - RemoveRecipeQueue.add("IC2:itemCable:5"); - RemoveRecipeQueue.add("IC2:itemCable:6"); - RemoveRecipeQueue.add("IC2:itemCable:10"); - RemoveRecipeQueue.add("IC2:itemCable:13"); - //RemoveRecipeQueue.add(itemCropnalyzer); - //RemoveRecipeQueue.add(itemSolarHelmet); - - //AddRecipeQueue.add(Cropnalyzer); - //AddRecipeQueue.add(SolarHelmet); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java deleted file mode 100644 index b7da7c436e..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class COMPAT_MorePlanets { - - - public static void OreDict(){ - run(); - } - - private final static void run(){ - //Metals - ItemUtils.getItemForOreDict("MorePlanet:kapteyn-b_item", "ingotFrozenIron", "Frozen Iron Ingot", 0); - ItemUtils.getItemForOreDict("MorePlanet:kapteyn-b_item", "ingotAnyIron", "Frozen Iron Ingot", 0); - ItemUtils.getItemForOreDict("MorePlanet:polongnius_item", "ingotPalladium", "Palladium Ingot", 5); - ItemUtils.getItemForOreDict("MorePlanet:fronos_item", "ingotIridium", "Iridium Ingot", 3); - ItemUtils.getItemForOreDict("MorePlanet:nibiru_item", "ingotNorium", "Norium Ingot", 1); - ItemUtils.getItemForOreDict("MorePlanet:venus_item", "ingotLead", "Lead Ingot", 0); - ItemUtils.getItemForOreDict("MorePlanet:diona_item", "ingotQuontonium", "Quontonium Ingot", 0); - ItemUtils.getItemForOreDict("MorePlanet:diona_item", "ingotFronisium", "Fronisium Ingot", 1); - ItemUtils.getItemForOreDict("MorePlanet:sirius-b_item", "ingotSulfur", "Sulfur Ingot", 3); - ItemUtils.getItemForOreDict("MorePlanet:koentus_item", "ingotKoentusMeteoricIron", "Koentus Meteoric Iron Ingot", 4); - ItemUtils.getItemForOreDict("MorePlanet:mercury_item", "ingotMetallic", "Metallic Ingot", 2); - ItemUtils.getItemForOreDict("MorePlanet:polongnius_item", "ingotPolongiusMeteoricIron", "Polongius Meteoric Iron Ingot", 4); - ItemUtils.getItemForOreDict("MorePlanet:mercury_item", "ingotMeteoricSteel", "Meteoric Steel Ingot", 3); - ItemUtils.getItemForOreDict("MorePlanet:sirius-b_item", "dustSulfur", "Sulfur Dust", 2); - - //Gems - ItemUtils.getItemForOreDict("MorePlanet:fronos_item", "gemBlackDiamond", "Black Diamond Gem", 2); - ItemUtils.getItemForOreDict("MorePlanet:koentus_item", "gemWhiteCrystal", "White Crystal", 0); - ItemUtils.getItemForOreDict("MorePlanet:nibiru_item", "gemRedCrystal", "Red Crystal", 0); - ItemUtils.getItemForOreDict("MorePlanet:pluto_item", "gemXeonius", "Xeonius Gem", 0); - ItemUtils.getItemForOreDict("MorePlanet:kapteyn-b_item", "gemUranium", "Uranium Gem", 1); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java deleted file mode 100644 index 6381a6705e..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class COMPAT_OpenBlocks { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - - Item aGraveItem = ItemUtils.getItemFromFQRN("OpenBlocks:grave"); - if (aGraveItem == null) { - return; - } - Block aGraveBlock = Block.getBlockFromItem(aGraveItem); - if (aGraveBlock == null) { - return; - } - - Logger.INFO("[Hungry Node Blacklist] Setting the Hardness of the OpenBlocks Grave to 6."); - aGraveBlock.setHardness(6f); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java deleted file mode 100644 index 12b3a94083..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import api.player.client.ClientPlayerAPI; -import gtPlusPlus.core.common.BasePlayer; -import gtPlusPlus.core.handler.events.SneakManager; -import gtPlusPlus.core.util.Utils; - -public class COMPAT_PlayerAPI { - - public static class commonProxy{ - public static void initPre(){ - - } - - public static void Init(){ - - } - - public static void initPost(){ - - } - } - - public static class clientProxy{ - public static void initPre(){ - //Utils.registerEvent(SneakManager.instance); - } - - public static void Init(){ - ClientPlayerAPI.register("SneakManager", BasePlayer.class); - } - - public static void initPost(){ - - } - } - - public static class serverProxy{ - public static void initPre(){ - - } - - public static void Init(){ - - } - - public static void initPost(){ - - } - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java deleted file mode 100644 index 0f80dc8be4..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java +++ /dev/null @@ -1,19 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.item.ModItems; - -public class COMPAT_PneumaticCraft { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - GT_OreDictUnificator.registerOre("plateCompressedIron", new ItemStack(ModItems.itemPlateCompressedIron)); - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java deleted file mode 100644 index 37c87ad99d..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.item.ModItems; - -public class COMPAT_RFTools { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - GT_OreDictUnificator.registerOre("plateDimensionShard", new ItemStack(ModItems.itemPlateDimensionShard)); - - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java deleted file mode 100644 index f6c8e86808..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.core.common.compat; - -public class COMPAT_Railcraft { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - - - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java deleted file mode 100644 index 5f9976acb0..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.item.ModItems; - -public class COMPAT_SimplyJetpacks { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - GT_OreDictUnificator.registerOre("plateEnrichedSoularium", new ItemStack(ModItems.itemPlateEnrichedSoularium)); - - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java deleted file mode 100644 index b78c10c8ce..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class COMPAT_Thaumcraft { - - public static void OreDict(){ - - if (ConfigSwitches.enableThaumcraftShardUnification){ - run(); - } - } - - private static final void run(){ - - for(int i=0; i<=6; i++){ - //Utils.LOG_INFO(""+i); - ItemUtils.getItemForOreDict("Thaumcraft:ItemShard", "shardAny", "TC Shard "+i, i); - GT_OreDictUnificator.registerOre("shardAny", ItemUtils.getItemStackFromFQRN("Thaumcraft:ItemShard:"+i, 1)); - ItemUtils.getItemForOreDict("Thaumcraft:ItemShard", "gemInfusedAnything", "TC Shard "+i, i); - GT_OreDictUnificator.registerOre("gemInfusedAnything", ItemUtils.getItemStackFromFQRN("Thaumcraft:ItemShard:"+i, 1)); - //System.out.println("TC Shard registration count is: "+i); - } - - if (LoadedMods.ForbiddenMagic){ - for(int i=0; i<=6; i++){ - //Utils.LOG_INFO(""+i); - ItemUtils.getItemForOreDict("ForbiddenMagic:NetherShard", "shardAny", "FM Shard "+i, i); - GT_OreDictUnificator.registerOre("shardAny", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:NetherShard:"+i, 1)); - ItemUtils.getItemForOreDict("ForbiddenMagic:NetherShard", "gemInfusedAnything", "FM Shard "+i, i); - GT_OreDictUnificator.registerOre("gemInfusedAnything", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:NetherShard:"+i, 1)); - //System.out.println("TC Shard registration count is: "+i); - } - ItemUtils.getItemForOreDict("ForbiddenMagic:GluttonyShard", "shardAny", "FM Gluttony Shard", 0); - GT_OreDictUnificator.registerOre("shardAny", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:GluttonyShard", 1)); - ItemUtils.getItemForOreDict("ForbiddenMagic:GluttonyShard", "gemInfusedAnything", "FM Gluttony Shard", 0); - GT_OreDictUnificator.registerOre("gemInfusedAnything", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:GluttonyShard", 1)); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java deleted file mode 100644 index cde6e3ae98..0000000000 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.core.common.compat; - -import static gtPlusPlus.core.lib.LoadedMods.Witchery; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; - -public class COMPAT_Witchery { - - public static void OreDict(){ - run(); - } - - private static final void run(){ - //Koboldite - ItemStack aKobolditeDust = ItemUtils.getItemStackWithMeta(Witchery, "witchery:ingredient", "Koboldite Dust", 148, 1); - ItemStack aKobolditeNugget = ItemUtils.getItemStackWithMeta(Witchery, "witchery:ingredient", "Koboldite Nugget", 149, 1); - ItemStack aKobolditeIngot = ItemUtils.getItemStackWithMeta(Witchery, "witchery:ingredient", "Koboldite Ingot", 150, 1); - if (aKobolditeDust != null) GT_OreDictUnificator.registerOre("dust"+"Koboldite", aKobolditeDust); - if (aKobolditeNugget != null) GT_OreDictUnificator.registerOre("nugget"+"Koboldite", aKobolditeNugget); - if (aKobolditeIngot != null) GT_OreDictUnificator.registerOre("ingot"+"Koboldite", aKobolditeIngot); - } - -} diff --git a/src/Java/gtPlusPlus/core/config/ConfigHandler.java b/src/Java/gtPlusPlus/core/config/ConfigHandler.java deleted file mode 100644 index 61610a03e9..0000000000 --- a/src/Java/gtPlusPlus/core/config/ConfigHandler.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.core.config; - -import static gtPlusPlus.core.item.general.RF2EU_Battery.rfPerEU; -import static gtPlusPlus.core.lib.CORE.*; -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.*; -import static gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames; - -import java.io.File; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; - -import net.minecraftforge.common.config.Configuration; - -public class ConfigHandler { - - public static void handleConfigFile(final FMLPreInitializationEvent event) { - final Configuration config = new Configuration( - new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); - config.load(); - - // Debug - /* DEBUG = config.getBoolean("debugMode", "debug", false, - "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)");*/ - disableEnderIOIntegration = config.getBoolean("disableEnderIO", "debug", false, - "Disables EnderIO Integration."); - disableEnderIOIngotTooltips = config.getBoolean("disableEnderIOIngotTooltips", "debug", false, - "Disables EnderIO Ingot Tooltips. These apparently may cause issues for a very small number of users."); - MACHINE_INFO = config.getBoolean("enableMachineInfoLogging", "debug", false, - "Makes many machines display lots of debug logging."); - showHiddenNEIItems = config.getBoolean("showHiddenNEIItems", "debug", false, - "Makes all items hidden from NEI display."); - dumpItemAndBlockData = config.getBoolean("dumpItemAndBlockData", "debug", false, - "Dumps all GT++ and Toxic Everglade Data to en_US.lang in the config folder. This config option can be used by foreign players to generate blank .lang files, which they can populate with their language of choice."); - - - // Machines - enableThaumcraftShardUnification = config.getBoolean("enableThaumcraftShardUnification", "machines", false, - "Allows the use of TC shards across many recipes by oreDicting them into a common group."); - enableAlternativeBatteryAlloy = config.getBoolean("enableAlternativeBatteryAlloy", "machines", false, - "Adds a non-Antimony using Battery Alloy. Not Balanced at all.."); - disableIC2Recipes = config.getBoolean("disableIC2Recipes", "machines", false, - "Alkaluscraft Related - Removes IC2 Cables Except glass fibre. Few other Misc Tweaks."); - enableAlternativeDivisionSigilRecipe = config.getBoolean("enableAlternativeDivisionSigilRecipe", "machines", - false, "Utilizes Neutronium instead."); - boilerSteamPerSecond = config.getInt("boilerSteamPerSecond", "machines", 750, 0, 10000, "Sets the steam per second value in LV,MV,HV boilers (respectively 1x,2x,3x this number for the tiers)"); - - //requireControlCores - boolean temp = config.getBoolean("requireControlCores", "machines", true, "Multiblocks Require Control Cores"); - - - - //Circuits - enableCustomCircuits = config.getBoolean("enableCustomCircuits", "gregtech", false, - "Adds custom circuits to expand past the Master Tier. Only really recommended to enable if enableOldGTcircuits is enabled."); - enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, - "Restores circuits and their recipes from Pre-5.09.28 times."); - - // Tools - enableSkookumChoochers = config.getBoolean("enableSkookumChoochers", "gregtech", true, - "Adds Custom GT Tools, called Skookum Choochers, functioning as a hard hammer and a wrench."); - enableMultiSizeTools = config.getBoolean("enableMultiSizeTools", "gregtech", true, - "Adds Custom GT Shovels and Pickaxes which mine in a 3x3 style. One of each whill be generated for each Gregtech Material which has Dense Plates and Long Rods available."); - - // GT-Fixes - enableNitroFix = config.getBoolean("enableNitroFix", "gregtech", false, - "Restores the old Nitro-Diesel recipes."); - enableSulfuricAcidFix = config.getBoolean("enableSulfuricAcidFix", "gregtech", false, - "Adds GT6 recipes for Sulfuric Acid. Should remove all pre-existing recipes."); - enableAnimatedTurbines = config.getBoolean("enableAnimatedTurbines", "gregtech", true, - "Gives GT Gas/Steam turbines animated textures while running."); - turbineCutoffBase = config.getInt("turbineCutoffBase", "gregtech", 75000, 0, Integer.MAX_VALUE, "Rotors below this durability will be removed, prevents NEI clutter. Minimum Durability is N * x, where N is the new value set and x is the turbine size, where 1 is Tiny and 4 is Huge. Set to 0 to disable."); - - enableHarderRecipesForHighTierCasings = config.getBoolean("enableHarderRecipesForHighTierCasings", "gregtech", false, - "Makes LuV+ Casings and Hulls more difficult to craft."); - - // Pipes & Cables - enableCustom_Pipes = config.getBoolean("enableCustom_Pipes", "gregtech", true, - "Adds Custom GT Fluid Pipes."); - enableCustom_Cables = config.getBoolean("enableCustom_Cables", "gregtech", true, - "Adds Custom GT Cables."); - - // Block Drops - chanceToDropDrainedShard = config.getInt("chanceToDropDrainedShard", "blockdrops", 196, 0, - 10000, "Drained shards have a 1 in X chance to drop."); - chanceToDropFluoriteOre = config.getInt("chanceToDropFluoriteOre", "blockdrops", 32, 0, - 10000, "Fluorite Ore has a 1 in X chance to drop from Limestone and a 1 in X*20 from Sandstone.."); - - // Single machines - enableMachine_SolarGenerators = config.getBoolean("enableSolarGenerators", "gregtech", - false, "These may be overpowered, Consult a local electrician."); - enableMachine_ComponentAssemblers = config.getBoolean("enableComponentAssemblers", "gregtech", - true, "These construct machine components."); - enableMachine_Safes = config.getBoolean("enableMachineSafes", "gregtech", true, - "These protect your goodies/rare stuff."); - enableMachine_Dehydrators = config.getBoolean("enableMachineDehydrators", "gregtech", true, - "These dehydrate stuff."); - enableMachine_SteamConverter = config.getBoolean("enableMachineSteamConverter", "gregtech", - true, "Converts IC2 steam -> Railcraft steam."); - enableMachine_FluidTanks = config.getBoolean("enableMachineFluidTanks", "gregtech", true, - "Portable fluid tanks."); - enableMachine_RocketEngines = config.getBoolean("enableMachineRocketEngines", "gregtech", - true, "Diesel egines with different internals, they consume less fuel overall."); - enableMachine_GeothermalEngines = config.getBoolean("enableMachineGeothermalEngines", - "gregtech", true, "These may be overpowered, Consult a local geologist."); - enableMachine_WorldAccelerators = config.getBoolean("enableMachineWorldAccelerators", - "gregtech", true, "These allow boosting Block/TileEntity Tick times [OP]."); - enableMachine_Tesseracts = config.getBoolean("enableMachineTesseracts", - "gregtech", true, "Tesseracts for wireless item/fluid movement."); - enableMachine_SimpleWasher = config.getBoolean("enableMachineSimpleWasher", - "gregtech", true, "Very basic automated cauldron for dust washing."); - enableMachine_Pollution = config.getBoolean("enableMachinePollution", - "gregtech", true, "Pollution Detector & Scrubbers."); - enableMachine_RF_Convetor = config.getBoolean("enableMachineRFConvetor", "gregtech", - true, "Converts RF to GTEU. Requires COFH-Core to be installed."); - - - // Multi machines - enableMultiblock_AlloyBlastSmelter = config.getBoolean("enableMultiblockAlloyBlastSmelter", - "gregtech", true, - "Required to smelt most high tier materials from GT++. Also smelts everything else to molten metal."); - enableMultiblock_IndustrialCentrifuge = config - .getBoolean("enableMultiblockIndustrialCentrifuge", "gregtech", true, "Spin, Spin, Spiiiin."); - enableMultiblock_IndustrialCokeOven = config.getBoolean( - "enableMultiblockIndustrialCokeOven", "gregtech", true, - "Pyro Oven Alternative, older, more realistic, better."); - enableMultiblock_IndustrialElectrolyzer = config.getBoolean( - "enableMultiblockIndustrialElectrolyzer", "gregtech", true, - "Electrolyzes things with extra bling factor."); - enableMultiblock_IndustrialMacerationStack = config.getBoolean( - "enableMultiblockIndustrialMacerationStack", "gregtech", true, - "A hyper efficient maceration tower, nets more bonus outputs."); - enableMultiblock_IndustrialPlatePress = config.getBoolean( - "enableMultiblockIndustrialPlatePress", "gregtech", true, "Industrial bendering machine thingo."); - enableMultiblock_IndustrialWireMill = config.getBoolean( - "enableMultiblockIndustrialWireMill", "gregtech", true, "Produces fine wire and exotic cables."); - enableMultiblock_IronBlastFurnace = config.getBoolean("enableMultiblockIronBlastFurnace", - "gregtech", true, "Skip the Bronze age, very slowly."); - enableMultiblock_MatterFabricator = config.getBoolean("enableMultiblockMatterFabricator", - "gregtech", true, "?FAB?RIC?ATE MA?TT?ER."); - enableMultiblock_MultiTank = config.getBoolean("enableMultiblockMultiTank", "gregtech", - true, "Tall tanks, each layer adds extra fluid storage."); - enableMultiblock_PowerSubstation = config.getBoolean("enableMultiblockPowerSubstation", - "gregtech", true, "For managing large power grids."); - enableMultiblock_LiquidFluorideThoriumReactor = config.getBoolean( - "enableMultiblockLiquidFluorideThoriumReactor", "gregtech", true, "For supplying large power grids."); - enableMultiblock_NuclearFuelRefinery = config.getBoolean( - "enableMultiblock_NuclearFuelRefinery", "gregtech", true, - "Refines molten chemicals into nuclear fuels."); - enableMultiblock_IndustrialSifter = config.getBoolean("enableMultiblock_IndustrialSifter", - "gregtech", true, "Large scale sifting."); - enableMultiblock_LargeAutoCrafter = config.getBoolean("enableMultiblock_LargeAutoCrafter", - "gregtech", true, "Can Assemble, Disassemble and Craft Project data from Data Sticks."); - enableMultiblock_IndustrialThermalCentrifuge = config.getBoolean("enableMultiblock_IndustrialThermalCentrifuge", - "gregtech", true, "Your warm spin for the ore thing."); - enableMultiblock_IndustrialWashPlant = config.getBoolean("enableMultiblock_IndustrialWashPlant", - "gregtech", true, "Used to wash the dirt, riiiiight offff.."); - enableMultiblock_ThermalBoiler = config.getBoolean("enableMachineThermalBoiler", - "gregtech", true, "Thermal Boiler from GT4. Can Filter Lava for resources."); - enableMultiblock_IndustrialCuttingMachine = config.getBoolean("enableMultiblock_IndustrialCuttingMachine", - "gregtech", true, "Very fast and efficient Cutting Machine."); - enableMultiblock_IndustrialFishingPort = config.getBoolean("enableMultiblock_IndustrialFishingPort", - "gregtech", true, "Fish the seas, except on land."); - enableMultiblock_IndustrialExtrudingMachine = config.getBoolean("enableMultiblock_IndustrialExtrudingMachine", - "gregtech", true, "Very fast and efficient Extruding Machine."); - enableMultiblock_IndustrialMultiMachine = config.getBoolean("enableMultiblock_IndustrialMultiMachine", - "gregtech", true, "Can run recipes for 9 different types of machines."); - enableMultiblock_Cyclotron = config.getBoolean("enableMultiblock_Cyclotron", - "gregtech", true, "COMET - Scientific Cyclotron."); - - // Options - rfPerEU = config.getInt("rfUsedPerEUForUniversalBatteries", "configurables", 4, 1, 1000, - "How much RF is a single unit of EU worth? (Most mods use 4:1 ratio)"); - - // Features - enableCustomCapes = config.getBoolean("enableSupporterCape", "features", true, - "Enables Custom GT++ Cape."); - disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false, - "Disables Zombie Reinforcement on hard difficutly."); - enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); - - //Biomes - EVERGLADES_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension."); - EVERGLADESBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension."); - - //Blacklisted Accelerator TileEntities - BlacklistedTileEntiyClassNames = new String[] { "com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry" }; - BlacklistedTileEntiyClassNames = config.getStringList( - "BlacklistedTileEntiyClassNames", "gregtech", - BlacklistedTileEntiyClassNames, - "The Canonical Class-Names of TileEntities that should be ignored by the WorldAccelerator"); - - //Pollution - pollutionPerSecondMultiPackager = config.get("pollution", "pollutionPerSecondMultiPackager", pollutionPerSecondMultiPackager,"pollution rate in gibbl/s for the Amazon warehousing depot").getInt(pollutionPerSecondMultiPackager); - pollutionPerSecondMultiIndustrialAlloySmelter = config.get("pollution", "pollutionPerSecondMultiIndustrialAlloySmelter", pollutionPerSecondMultiIndustrialAlloySmelter,"pollution rate in gibbl/s for the Alloy blast smelter").getInt(pollutionPerSecondMultiIndustrialAlloySmelter); - pollutionPerSecondMultiIndustrialArcFurnace = config.get("pollution", "pollutionPerSecondMultiIndustrialArcFurnace", pollutionPerSecondMultiIndustrialArcFurnace,"pollution rate in gibbl/s for the High current arc furnace").getInt(pollutionPerSecondMultiIndustrialArcFurnace); - pollutionPerSecondMultiIndustrialCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialCentrifuge", pollutionPerSecondMultiIndustrialCentrifuge,"pollution rate in gibbl/s for the Industrial centrifuge").getInt(pollutionPerSecondMultiIndustrialCentrifuge); - pollutionPerSecondMultiIndustrialCokeOven = config.get("pollution", "pollutionPerSecondMultiIndustrialCokeOven", pollutionPerSecondMultiIndustrialCokeOven,"pollution rate in gibbl/s for the Industrial coke oven").getInt(pollutionPerSecondMultiIndustrialCokeOven); - pollutionPerSecondMultiIndustrialCuttingMachine = config.get("pollution", "pollutionPerSecondMultiIndustrialCuttingMachine", pollutionPerSecondMultiIndustrialCuttingMachine,"pollution rate in gibbl/s for the Cutting factory").getInt(pollutionPerSecondMultiIndustrialCuttingMachine); - pollutionPerSecondMultiIndustrialDehydrator = config.get("pollution", "pollutionPerSecondMultiIndustrialDehydrator", pollutionPerSecondMultiIndustrialDehydrator,"pollution rate in gibbl/s for the Utupu-Tanuri").getInt(pollutionPerSecondMultiIndustrialDehydrator); - pollutionPerSecondMultiIndustrialElectrolyzer = config.get("pollution", "pollutionPerSecondMultiIndustrialElectrolyzer", pollutionPerSecondMultiIndustrialElectrolyzer,"pollution rate in gibbl/s for the Industrial electrolyzer").getInt(pollutionPerSecondMultiIndustrialElectrolyzer); - pollutionPerSecondMultiIndustrialExtruder = config.get("pollution", "pollutionPerSecondMultiIndustrialExtruder", pollutionPerSecondMultiIndustrialExtruder,"pollution rate in gibbl/s for the Industrial extrusion machine").getInt(pollutionPerSecondMultiIndustrialExtruder); - pollutionPerSecondMultiIndustrialMacerator = config.get("pollution", "pollutionPerSecondMultiIndustrialMacerator", pollutionPerSecondMultiIndustrialMacerator,"pollution rate in gibbl/s for the Maceration stack").getInt(pollutionPerSecondMultiIndustrialMacerator); - pollutionPerSecondMultiIndustrialMixer = config.get("pollution", "pollutionPerSecondMultiIndustrialMixer", pollutionPerSecondMultiIndustrialMixer,"pollution rate in gibbl/s for the Industrial mixing machine").getInt(pollutionPerSecondMultiIndustrialMixer); - pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal", pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal,"pollution rate in gibbl/s for the Large processing factory in metal mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal); - pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid", pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid,"pollution rate in gibbl/s for the Large processing factory in fluid mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid); - pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc", pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc,"pollution rate in gibbl/s for the Large processing factory in misc mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc); - pollutionPerSecondMultiIndustrialPlatePress_ModeForming = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeForming", pollutionPerSecondMultiIndustrialPlatePress_ModeForming,"pollution rate in gibbl/s for the Industrial material press in forming mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeForming); - pollutionPerSecondMultiIndustrialPlatePress_ModeBending = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeBending", pollutionPerSecondMultiIndustrialPlatePress_ModeBending,"pollution rate in gibbl/s for the Industrial material press in bending mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeBending); - pollutionPerSecondMultiIndustrialSifter = config.get("pollution", "pollutionPerSecondMultiIndustrialSifter", pollutionPerSecondMultiIndustrialSifter,"pollution rate in gibbl/s for the Large Sifter").getInt(pollutionPerSecondMultiIndustrialSifter); - pollutionPerSecondMultiIndustrialThermalCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialThermalCentrifuge", pollutionPerSecondMultiIndustrialThermalCentrifuge,"pollution rate in gibbl/s for the Large thermal refinery").getInt(pollutionPerSecondMultiIndustrialThermalCentrifuge); - pollutionPerSecondMultiIndustrialVacuumFreezer = config.get("pollution", "pollutionPerSecondMultiIndustrialVacuumFreezer", pollutionPerSecondMultiIndustrialVacuumFreezer,"pollution rate in gibbl/s for the Cryogenic freezer").getInt(pollutionPerSecondMultiIndustrialVacuumFreezer); - pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath", pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath,"pollution rate in gibbl/s for the Ore washing plant in chemical bath mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath); - pollutionPerSecondMultiIndustrialWashPlant_ModeWasher = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeWasher", pollutionPerSecondMultiIndustrialWashPlant_ModeWasher,"pollution rate in gibbl/s for the Ore washing plant in ore washer mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeWasher); - pollutionPerSecondMultiIndustrialWireMill = config.get("pollution", "pollutionPerSecondMultiIndustrialWireMill", pollutionPerSecondMultiIndustrialWireMill,"pollution rate in gibbl/s for the Wire factory").getInt(pollutionPerSecondMultiIndustrialWireMill); - pollutionPerSecondMultiIsaMill = config.get("pollution", "pollutionPerSecondMultiIsaMill", pollutionPerSecondMultiIsaMill,"pollution rate in gibbl/s for the IsaMill grinding machine").getInt(pollutionPerSecondMultiIsaMill); - pollutionPerSecondMultiAdvDistillationTower_ModeDistillery = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDistillery", pollutionPerSecondMultiAdvDistillationTower_ModeDistillery,"pollution rate in gibbl/s for the Dangote distillus in distillery mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDistillery); - pollutionPerSecondMultiAdvDistillationTower_ModeDT = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDT", pollutionPerSecondMultiAdvDistillationTower_ModeDT,"pollution rate in gibbl/s for the Dangote distillus in distillation tower mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDT); - pollutionPerSecondMultiAdvEBF = config.get("pollution", "pollutionPerSecondMultiAdvEBF", pollutionPerSecondMultiAdvEBF,"pollution rate in gibbl/s for the Volcanus").getInt(pollutionPerSecondMultiAdvEBF); - pollutionPerSecondMultiAdvImplosion = config.get("pollution", "pollutionPerSecondMultiAdvImplosion", pollutionPerSecondMultiAdvImplosion,"pollution rate in gibbl/s for the Density^2").getInt(pollutionPerSecondMultiAdvImplosion); - pollutionPerSecondMultiABS = config.get("pollution", "pollutionPerSecondMultiABS", pollutionPerSecondMultiABS,"pollution rate in gibbl/s for the Alloy blast furnace").getInt(pollutionPerSecondMultiABS); - pollutionPerSecondMultiCyclotron = config.get("pollution", "pollutionPerSecondMultiCyclotron", pollutionPerSecondMultiCyclotron,"pollution rate in gibbl/s for the Cyclotron").getInt(pollutionPerSecondMultiCyclotron); - pollutionPerSecondMultiIndustrialFishingPond = config.get("pollution", "pollutionPerSecondMultiIndustrialFishingPond", pollutionPerSecondMultiIndustrialFishingPond,"pollution rate in gibbl/s for the Zuhai - fishing port").getInt(pollutionPerSecondMultiIndustrialFishingPond); - //pollutionPerSecondMultiLargeRocketEngine; - pollutionPerSecondMultiLargeSemiFluidGenerator = config.get("pollution", "pollutionPerSecondMultiLargeSemiFluidGenerator", pollutionPerSecondMultiLargeSemiFluidGenerator,"pollution rate in gibbl/s for the Large semifluid burner").getInt(pollutionPerSecondMultiLargeSemiFluidGenerator); - pollutionPerSecondMultiMassFabricator = config.get("pollution", "pollutionPerSecondMultiMassFabricator", pollutionPerSecondMultiMassFabricator,"pollution rate in gibbl/s for the Matter fabrication CPU").getInt(pollutionPerSecondMultiMassFabricator); - pollutionPerSecondMultiRefinery = config.get("pollution", "pollutionPerSecondMultiRefinery", pollutionPerSecondMultiRefinery,"pollution rate in gibbl/s for the Reactor fuel processing plant").getInt(pollutionPerSecondMultiRefinery); - //pollutionPerSecondMultiGeneratorArray; - pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm,"pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm); - pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell,"pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell); - pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter,"pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter); - pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler,"pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler); - pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond,"pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond); - basePollutionPerSecondSemiFluidGenerator = config.get("pollution", "basePollutionPerSecondSemiFluidGenerator", basePollutionPerSecondSemiFluidGenerator, "base pollution rate in gibbl/s for the single block semi fluid generators").getInt(basePollutionPerSecondSemiFluidGenerator); - pollutionReleasedByTierSemiFluidGenerator = config.get("pollution", "pollutionReleasedByTierSemiFluidGenerator", pollutionReleasedByTierSemiFluidGenerator, "coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)").getDoubleList(); - basePollutionPerSecondBoiler = config.get("pollution", "basePollutionPerSecondBoiler", basePollutionPerSecondBoiler,"base pollution rate in gibbl/s for the single block boilers").getInt(basePollutionPerSecondBoiler); - pollutionReleasedByTierBoiler = config.get("pollution", "pollutionReleasedByTierBoiler", pollutionReleasedByTierBoiler, "coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)").getDoubleList(); - baseMinPollutionPerSecondRocketFuelGenerator = config.get("pollution", "baseMinPollutionPerSecondRocketFuelGenerator", baseMinPollutionPerSecondRocketFuelGenerator, "minimum base pollution rate in gibbl/s for the single block rocket engines").getInt(baseMinPollutionPerSecondRocketFuelGenerator); - baseMaxPollutionPerSecondRocketFuelGenerator = config.get("pollution", "baseMaxPollutionPerSecondRocketFuelGenerator", baseMaxPollutionPerSecondRocketFuelGenerator, "maximum base pollution rate in gibbl/s for the single block rocket engines").getInt(baseMaxPollutionPerSecondRocketFuelGenerator); - pollutionReleasedByTierRocketFuelGenerator = config.get("pollution", "pollutionReleasedByTierRocketFuelGenerator", pollutionReleasedByTierRocketFuelGenerator, "coefficient applied to the base rate of the single block rocket engines based on its tier (first is tier 0 aka ULV)").getDoubleList(); - basePollutionPerSecondGeothermalGenerator = config.get("pollution", "basePollutionPerSecondGeothermalGenerator", basePollutionPerSecondGeothermalGenerator,"base pollution rate in gibbl/s for the geothermal engines").getInt(basePollutionPerSecondGeothermalGenerator); - pollutionReleasedByTierGeothermalGenerator = config.get("pollution", "pollutionReleasedByTierGeothermalGenerator", pollutionReleasedByTierGeothermalGenerator, "coefficient applied to the base rate of the single block geothermal engines based on its tier (first is tier 0 aka ULV)").getDoubleList(); - config.save(); - } - -} diff --git a/src/Java/gtPlusPlus/core/container/Container_BackpackBase.java b/src/Java/gtPlusPlus/core/container/Container_BackpackBase.java deleted file mode 100644 index ad76bebe81..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_BackpackBase.java +++ /dev/null @@ -1,208 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.inventories.BaseInventoryBackpack; -import gtPlusPlus.core.slots.SlotItemBackpackInv; - -public class Container_BackpackBase extends Container -{ - /** The Item Inventory for this Container, only needed if you want to reference isUseableByPlayer */ - public final BaseInventoryBackpack inventory; - - /** Using these will make transferStackInSlot easier to understand and implement - * INV_START is the index of the first slot in the Player's Inventory, so our - * BaseInventoryBackpack's number of slots (e.g. 5 slots is array indices 0-4, so start at 5) - * Notice how we don't have to remember how many slots we made? We can just use - * BaseInventoryBackpack.INV_SIZE and if we ever change it, the Container updates automatically. */ - private static final int INV_START = BaseInventoryBackpack.INV_SIZE, INV_END = INV_START+26, - HOTBAR_START = INV_END+1, HOTBAR_END = HOTBAR_START+8; - - // If you're planning to add armor slots, put those first like this: - // ARMOR_START = BaseInventoryBackpack.INV_SIZE, ARMOR_END = ARMOR_START+3, - // INV_START = ARMOR_END+1, and then carry on like above. - - public Container_BackpackBase(final EntityPlayer par1Player, final InventoryPlayer inventoryPlayer, final BaseInventoryBackpack inventoryItem) - { - this.inventory = inventoryItem; - - int i; - - // ITEM INVENTORY - you'll need to adjust the slot locations to match your texture file - // I have them set vertically in columns of 4 to the right of the player model - for (i = 0; i < BaseInventoryBackpack.INV_SIZE; ++i) - { - // You can make a custom Slot if you need different behavior, - // such as only certain item types can be put into this slot - // We made a custom slot to prevent our inventory-storing item - // from being stored within itself, but if you want to allow that and - // you followed my advice at the end of the above step, then you - // could get away with using the vanilla Slot class - this.addSlotToContainer(new SlotItemBackpackInv(this.inventory, i, 80 + (18 * (i/4)), 8 + (18*(i%4)))); - } - - // If you want, you can add ARMOR SLOTS here as well, but you need to - // make a public version of SlotArmor. I won't be doing that in this tutorial. - /* - for (i = 0; i < 4; ++i) - { - // These are the standard positions for survival inventory layout - this.addSlotToContainer(new SlotArmor(this.player, inventoryPlayer, inventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18, i)); - } - */ - - // PLAYER INVENTORY - uses default locations for standard inventory texture file - for (i = 0; i < 3; ++i) - { - for (int j = 0; j < 9; ++j) - { - this.addSlotToContainer(new Slot(inventoryPlayer, j + (i * 9) + 9, 8 + (j * 18), 84 + (i * 18))); - } - } - - // PLAYER ACTION BAR - uses default locations for standard action bar texture file - for (i = 0; i < 9; ++i) - { - this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + (i * 18), 142)); - } - } - - @Override - public boolean canInteractWith(final EntityPlayer entityplayer) - { - // be sure to return the inventory's isUseableByPlayer method - // if you defined special behavior there: - return this.inventory.isUseableByPlayer(entityplayer); - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. - */ - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int index) - { - ItemStack itemstack = null; - final Slot slot = (Slot) this.inventorySlots.get(index); - - if ((slot != null) && slot.getHasStack()) - { - final ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - // If item is in our custom Inventory or armor slot - if (index < INV_START) - { - // try to place in player inventory / action bar - if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END+1, true)) - { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - // Item is in inventory / hotbar, try to place in custom inventory or armor slots - else - { - /* - If your inventory only stores certain instances of Items, - you can implement shift-clicking to your inventory like this: - - // Check that the item is the right type - if (itemstack1.getItem() instanceof ItemCustom) - { - // Try to merge into your custom inventory slots - // We use 'BaseInventoryBackpack.INV_SIZE' instead of INV_START just in case - // you also add armor or other custom slots - if (!this.mergeItemStack(itemstack1, 0, BaseInventoryBackpack.INV_SIZE, false)) - { - return null; - } - } - // If you added armor slots, check them here as well: - // Item being shift-clicked is armor - try to put in armor slot - if (itemstack1.getItem() instanceof ItemArmor) - { - int type = ((ItemArmor) itemstack1.getItem()).armorType; - if (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START + type + 1, false)) - { - return null; - } - } - Otherwise, you have basically 2 choices: - 1. shift-clicking between player inventory and custom inventory - 2. shift-clicking between action bar and inventory - - Be sure to choose only ONE of the following implementations!!! - */ - /** - * Implementation number 1: Shift-click into your custom inventory - */ - if (index >= INV_START) - { - // place in custom inventory - if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) - { - return null; - } - } - - /** - * Implementation number 2: Shift-click items between action bar and inventory - */ - // item is in player's inventory, but not in action bar - if ((index >= INV_START) && (index < HOTBAR_START)) - { - // place in action bar - if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END+1, false)) - { - return null; - } - } - // item in action bar - place in player inventory - else if ((index >= HOTBAR_START) && (index < (HOTBAR_END+1))) - { - if (!this.mergeItemStack(itemstack1, INV_START, INV_END+1, false)) - { - return null; - } - } - } - - if (itemstack1.stackSize == 0) - { - slot.putStack((ItemStack) null); - } - else - { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) - { - return null; - } - - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } - - return itemstack; - } - - /** - * You should override this method to prevent the player from moving the stack that - * opened the inventory, otherwise if the player moves it, the inventory will not - * be able to save properly - */ - @Override - public ItemStack slotClick(final int slot, final int button, final int flag, final EntityPlayer player) { - // this will prevent the player from interacting with the item that opened the inventory: - if ((slot >= 0) && (this.getSlot(slot) != null) && (this.getSlot(slot).getStack() == player.getHeldItem())) { - return null; - } - return super.slotClick(slot, button, flag, player); - } -} diff --git a/src/Java/gtPlusPlus/core/container/Container_CircuitProgrammer.java b/src/Java/gtPlusPlus/core/container/Container_CircuitProgrammer.java deleted file mode 100644 index d8ce521fb5..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_CircuitProgrammer.java +++ /dev/null @@ -1,190 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.InventoryCircuitProgrammer; -import gtPlusPlus.core.slots.SlotIntegratedCircuit; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; - -public class Container_CircuitProgrammer extends Container { - - protected TileEntityCircuitProgrammer tile_entity; - public final InventoryCircuitProgrammer inventoryChest; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static final int SLOT_OUTPUT = 25; - - public static int StorageSlotNumber = 26; // Number of slots in storage area - public static int InventorySlotNumber = 36; // Inventory Slots (Inventory - // and Hotbar) - public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All - // slots - - public Container_CircuitProgrammer(final InventoryPlayer inventory, final TileEntityCircuitProgrammer te) { - this.tile_entity = te; - this.inventoryChest = te.getInventory(); - - int var6; - int var7; - this.worldObj = te.getWorldObj(); - this.posX = te.xCoord; - this.posY = te.yCoord; - this.posZ = te.zCoord; - Logger.INFO("1"); - - int o = 0; - - // Storage Side - /*for (var6 = 0; var6 < 3; var6++) { - for (var7 = 0; var7 < 5; var7++) { - this.addSlotToContainer(new SlotIntegratedCircuit(o, this.inventoryChest, o, 44 + (var7 * 18), 15 + (var6 * 18))); - o++; - } - }*/ - - - int xStart = 8; - int yStart = 5; - - try { - //0 - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart, yStart)); - //1-10 - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+18)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+18)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+18)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+18)); - //11-20 - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+18)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+18)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+36)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+36)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+36)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+36)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+36)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+36)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+54)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+54)); - //21-24 - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+54)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+54)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+54)); - this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+54)); - Logger.INFO("2"); - - //Add Output - this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_OUTPUT, xStart+(8*18), yStart+54)); - o++; - Logger.INFO("3"); - - - - // Player Inventory - for (var6 = 0; var6 < 3; ++var6) { - for (var7 = 0; var7 < 9; ++var7) { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - // Player Hotbar - for (var6 = 0; var6 < 9; ++var6) { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - - - Logger.INFO("4"); - } - catch (Throwable t) {} - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, - final EntityPlayer aPlayer) { - - if (!aPlayer.worldObj.isRemote) { - if ((aSlotIndex == 999) || (aSlotIndex == -999)) { - // Utils.LOG_WARNING("??? - "+aSlotIndex); - } - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) { - super.onContainerClosed(par1EntityPlayer); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockCircuitProgrammer) { - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { - ItemStack var3 = null; - final Slot var4 = (Slot) this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - /* - * if (par2 == 0) { if (!this.mergeItemStack(var5, - * InOutputSlotNumber, FullSlotNumber, true)) { return null; } - * - * var4.onSlotChange(var5, var3); } else if (par2 >= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - // Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_DecayablesChest.java b/src/Java/gtPlusPlus/core/container/Container_DecayablesChest.java deleted file mode 100644 index 5bc384cd29..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_DecayablesChest.java +++ /dev/null @@ -1,140 +0,0 @@ -package gtPlusPlus.core.container; - -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.Inventory_DecayablesChest; -import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class Container_DecayablesChest extends Container { - - protected TileEntityDecayablesChest tile_entity; - public final Inventory_DecayablesChest inventoryChest; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int StorageSlotNumber = 15; // Number of slots in storage area - public static int InventorySlotNumber = 36; // Inventory Slots (Inventory - // and Hotbar) - public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All - // slots - - private final int[] slotStorage = new int[15]; - - public Container_DecayablesChest(final InventoryPlayer inventory, final TileEntityDecayablesChest te) { - this.tile_entity = te; - this.inventoryChest = te.getInventory(); - te.openInventory(); - - int var6; - int var7; - this.worldObj = te.getWorldObj(); - this.posX = te.xCoord; - this.posY = te.yCoord; - this.posZ = te.zCoord; - - int o = 0; - - // Storage Side - for (var6 = 0; var6 < 3; var6++) { - for (var7 = 0; var7 < 5; var7++) { - this.slotStorage[o] = o; - this.addSlotToContainer(new Slot(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); - } - } - - // Player Inventory - for (var6 = 0; var6 < 3; ++var6) { - for (var7 = 0; var7 < 9; ++var7) { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - // Player Hotbar - for (var6 = 0; var6 < 9; ++var6) { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, - final EntityPlayer aPlayer) { - - if (!aPlayer.worldObj.isRemote) { - if ((aSlotIndex == 999) || (aSlotIndex == -999)) { - // Utils.LOG_WARNING("??? - "+aSlotIndex); - } - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) { - super.onContainerClosed(par1EntityPlayer); - tile_entity.closeInventory(); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockDecayablesChest) { - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { - ItemStack var3 = null; - final Slot var4 = (Slot) this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - /* - * if (par2 == 0) { if (!this.mergeItemStack(var5, - * InOutputSlotNumber, FullSlotNumber, true)) { return null; } - * - * var4.onSlotChange(var5, var3); } else if (par2 >= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - // Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_EggBox.java b/src/Java/gtPlusPlus/core/container/Container_EggBox.java deleted file mode 100644 index c4396cca6f..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_EggBox.java +++ /dev/null @@ -1,140 +0,0 @@ -package gtPlusPlus.core.container; - -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.Inventory_EggBox; -import gtPlusPlus.core.tileentities.general.TileEntityEggBox; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class Container_EggBox extends Container { - - protected TileEntityEggBox tile_entity; - public final Inventory_EggBox inventoryChest; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int StorageSlotNumber = 15; // Number of slots in storage area - public static int InventorySlotNumber = 36; // Inventory Slots (Inventory - // and Hotbar) - public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All - // slots - - private final int[] slotStorage = new int[15]; - - public Container_EggBox(final InventoryPlayer inventory, final TileEntityEggBox te) { - this.tile_entity = te; - this.inventoryChest = te.getInventory(); - te.openInventory(); - - int var6; - int var7; - this.worldObj = te.getWorldObj(); - this.posX = te.xCoord; - this.posY = te.yCoord; - this.posZ = te.zCoord; - - int o = 0; - - // Storage Side - for (var6 = 0; var6 < 3; var6++) { - for (var7 = 0; var7 < 5; var7++) { - this.slotStorage[o] = o; - this.addSlotToContainer(new Slot(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); - } - } - - // Player Inventory - for (var6 = 0; var6 < 3; ++var6) { - for (var7 = 0; var7 < 9; ++var7) { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - // Player Hotbar - for (var6 = 0; var6 < 9; ++var6) { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, - final EntityPlayer aPlayer) { - - if (!aPlayer.worldObj.isRemote) { - if ((aSlotIndex == 999) || (aSlotIndex == -999)) { - // Utils.LOG_WARNING("??? - "+aSlotIndex); - } - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) { - super.onContainerClosed(par1EntityPlayer); - tile_entity.closeInventory(); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockEggBox) { - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { - ItemStack var3 = null; - final Slot var4 = (Slot) this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - /* - * if (par2 == 0) { if (!this.mergeItemStack(var5, - * InOutputSlotNumber, FullSlotNumber, true)) { return null; } - * - * var4.onSlotChange(var5, var3); } else if (par2 >= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - // Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_FishTrap.java b/src/Java/gtPlusPlus/core/container/Container_FishTrap.java deleted file mode 100644 index a2f44441d9..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_FishTrap.java +++ /dev/null @@ -1,142 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.InventoryFishTrap; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; - -public class Container_FishTrap extends Container { - - protected TileEntityFishTrap tile_entity; - public final InventoryFishTrap inventoryChest; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int StorageSlotNumber = 15; // Number of slots in storage area - public static int InventorySlotNumber = 36; // Inventory Slots (Inventory - // and Hotbar) - public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All - // slots - - private final int[] slotStorage = new int[15]; - - public Container_FishTrap(final InventoryPlayer inventory, final TileEntityFishTrap te) { - this.tile_entity = te; - this.inventoryChest = te.getInventory(); - - te.openInventory(); - int var6; - int var7; - this.worldObj = te.getWorldObj(); - this.posX = te.xCoord; - this.posY = te.yCoord; - this.posZ = te.zCoord; - - int o = 0; - - // Storage Side - for (var6 = 0; var6 < 3; var6++) { - for (var7 = 0; var7 < 5; var7++) { - this.slotStorage[o] = o; - this.addSlotToContainer(new SlotNoInput(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); - } - } - - // Player Inventory - for (var6 = 0; var6 < 3; ++var6) { - for (var7 = 0; var7 < 9; ++var7) { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - // Player Hotbar - for (var6 = 0; var6 < 9; ++var6) { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, - final EntityPlayer aPlayer) { - - if (!aPlayer.worldObj.isRemote) { - if ((aSlotIndex == 999) || (aSlotIndex == -999)) { - // Utils.LOG_WARNING("??? - "+aSlotIndex); - } - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) { - super.onContainerClosed(par1EntityPlayer); - tile_entity.closeInventory(); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockFishTrap) { - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { - ItemStack var3 = null; - final Slot var4 = (Slot) this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - /* - * if (par2 == 0) { if (!this.mergeItemStack(var5, - * InOutputSlotNumber, FullSlotNumber, true)) { return null; } - * - * var4.onSlotChange(var5, var3); } else if (par2 >= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - // Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_Grindle.java b/src/Java/gtPlusPlus/core/container/Container_Grindle.java deleted file mode 100644 index 4ab79322c9..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_Grindle.java +++ /dev/null @@ -1,160 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.inventories.BaseInventoryGrindle; -import gtPlusPlus.core.slots.SlotDataStick; - -public class Container_Grindle extends Container { - /** - * The Item Inventory for this Container, only needed if you want to reference - * isUseableByPlayer - */ - public final BaseInventoryGrindle inventory; - - /** - * Using these will make transferStackInSlot easier to understand and implement - * INV_START is the index of the first slot in the Player's Inventory, so our - * BaseInventoryBackpack's number of slots (e.g. 5 slots is array indices 0-4, - * so start at 5) Notice how we don't have to remember how many slots we made? - * We can just use BaseInventoryBackpack.INV_SIZE and if we ever change it, the - * Container updates automatically. - */ - private static final int - INV_START = BaseInventoryGrindle.INV_SIZE, - INV_END = INV_START + 0, - HOTBAR_START = INV_END, - HOTBAR_END = HOTBAR_START + 8; - - public Container_Grindle(final EntityPlayer par1Player, final InventoryPlayer inventoryPlayer, - final BaseInventoryGrindle inventoryItem) { - this.inventory = inventoryItem; - - int i; - - // Actual Scan Slot - this.addSlotToContainer(new SlotDataStick(this.inventory, 0, 152, 5)); - - for (i = 1; i < BaseInventoryGrindle.INV_SIZE; ++i) { - this.addSlotToContainer(new SlotDataStick(this.inventory, i, 153, 30 + (18 * i))); - } - - // PLAYER ACTION BAR - uses default locations for standard action bar texture - // file - for (i = 0; i < 9; ++i) { - this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + (i * 18), 142)); - } - } - - @Override - public boolean canInteractWith(final EntityPlayer entityplayer) { - return this.inventory.isUseableByPlayer(entityplayer); - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you - * will crash when someone does that. - */ - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int index) { - ItemStack itemstack = null; - final Slot slot = (Slot) this.inventorySlots.get(index); - - if ((slot != null) && slot.getHasStack()) { - final ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - // If item is in our custom Inventory or armor slot - if (index < INV_START) { - // try to place in player inventory / action bar - if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END + 1, true)) { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - // Item is in inventory / hotbar, try to place in custom inventory or armor - // slots - else {/* - - * If your inventory only stores certain instances of Items, you can implement - * shift-clicking to your inventory like this: - * - * // Check that the item is the right type if (itemstack1.getItem() instanceof - * ItemCustom) { // Try to merge into your custom inventory slots // We use - * 'BaseInventoryBackpack.INV_SIZE' instead of INV_START just in case // you - * also add armor or other custom slots if (!this.mergeItemStack(itemstack1, 0, - * BaseInventoryBackpack.INV_SIZE, false)) { return null; } } // If you added - * armor slots, check them here as well: // Item being shift-clicked is armor - - * try to put in armor slot if (itemstack1.getItem() instanceof ItemArmor) { int - * type = ((ItemArmor) itemstack1.getItem()).armorType; if - * (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START + type + 1, - * false)) { return null; } } Otherwise, you have basically 2 choices: 1. - * shift-clicking between player inventory and custom inventory 2. - * shift-clicking between action bar and inventory - * - * Be sure to choose only ONE of the following implementations!!! - - *//** - * Implementation number 1: Shift-click into your custom inventory - *//* - if (index >= INV_START) { - // place in custom inventory - if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) { - return null; - } - } - - *//** - * Implementation number 2: Shift-click items between action bar and inventory - *//* - // item is in player's inventory, but not in action bar - if ((index >= INV_START) && (index < HOTBAR_START)) { - // place in action bar - if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END + 1, false)) { - return null; - } - } - // item in action bar - place in player inventory - else if ((index >= HOTBAR_START) && (index < (HOTBAR_END + 1))) { - if (!this.mergeItemStack(itemstack1, INV_START, INV_END + 1, false)) { - return null; - } - } - */} - - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } - - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } - - return itemstack; - } - - /** - * You should override this method to prevent the player from moving the stack - * that opened the inventory, otherwise if the player moves it, the inventory - * will not be able to save properly - */ - @Override - public ItemStack slotClick(final int slot, final int button, final int flag, final EntityPlayer player) { - // this will prevent the player from interacting with the item that opened the - // inventory: - if ((slot >= 0) && (this.getSlot(slot) != null) && (this.getSlot(slot).getStack() == player.getHeldItem())) { - return null; - } - return super.slotClick(slot, button, flag, player); - } -} diff --git a/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java b/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java deleted file mode 100644 index 39e07f2f0e..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java +++ /dev/null @@ -1,193 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.InventoryHeliumGenerator; -import gtPlusPlus.core.slots.SlotFuelRod; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator; - -public class Container_HeliumGenerator extends Container { - - protected TileEntityHeliumGenerator tile_entity; - public final InventoryHeliumGenerator inventoryChest; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - - public static int StorageSlotNumber = 19; //Number of slots in storage area - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; //All slots - - //0 Is output, 1-18 are input. - private final int[] slotStorage = new int[19]; - - public Container_HeliumGenerator(final InventoryPlayer inventory, final TileEntityHeliumGenerator te){ - this.tile_entity = te; - this.inventoryChest = te.getInventory(); - - int var6; - int var7; - this.worldObj = te.getWorldObj(); - this.posX = te.xCoord; - this.posY = te.yCoord; - this.posZ = te.zCoord; - - int o=0; - - //Output - this.addSlotToContainer(new SlotNoInput(this.inventoryChest, 0, 80, 53)); - this.slotStorage[o] = o; - o++; - - //Side A - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - Logger.INFO("Adding slots at var:"+(o)+" x:"+(8 + var7 * 18)+" y:"+(9 + var6 * 18)); - this.addSlotToContainer(new SlotFuelRod(this.inventoryChest, o, 8 + (var7 * 18), 18 + (var6 * 18))); - this.slotStorage[o] = o; - o++; - } - } - - //Side B - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - Logger.INFO("Adding slots at var:"+(o)+" x:"+(90+8+(var7 * 18))+" y:"+(9 + var6 * 18)); - this.addSlotToContainer(new SlotFuelRod(this.inventoryChest, o, 116 + (var7 * 18), 18 + (var6 * 18))); - this.slotStorage[o] = o; - o++; - } - } - - o=0; - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - - - - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer){ - super.onContainerClosed(par1EntityPlayer); - } - - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockHeliumGenerator){ - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { - ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) - { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - /*if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if (par2 >= InOutputSlotNumber && par2 < InventoryOutSlotNumber) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if (par2 >= InventoryOutSlotNumber && par2 < FullSlotNumber) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - }*/ - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java b/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java deleted file mode 100644 index e0fb51fe61..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java +++ /dev/null @@ -1,252 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.modulartable.InventoryModularMain; -import gtPlusPlus.core.inventories.modulartable.InventoryModularOutput; -import gtPlusPlus.core.slots.SlotModularBauble; -import gtPlusPlus.core.slots.SlotModularBaubleUpgrades; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; - -public class Container_ModularityTable extends Container { - - /** The crafting matrix inventory (3x3). */ - - protected TileEntityModularityTable tile_entity; - public final InventoryModularMain inventoryGrid; - public final InventoryModularOutput inventoryOutputs; - public int mRecipeTime; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - private final int[] slotOutputs = new int[3]; - private final int[] slotGrid = new int[9]; - - - public Container_ModularityTable(final InventoryPlayer inventory, final TileEntityModularityTable tile){ - this.tile_entity = tile; - this.inventoryGrid = tile.inventoryGrid; - this.inventoryOutputs = tile.inventoryOutputs; - this.tile_entity.setContainer(this); - this.mRecipeTime = this.tile_entity.getRecipeTime(); - Logger.INFO("Container: "+this.mRecipeTime); - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int nextFreeSlot = 0; - - - //Output slots - this.addSlotToContainer(new SlotModularBauble(this.inventoryOutputs, 0, 26+(18*6), 8)); - this.addSlotToContainer(new SlotModularBaubleUpgrades(this.inventoryOutputs, 1, 26+(18*5), 8)); - this.addSlotToContainer(new SlotNoInput(this.inventoryOutputs, 2, 26+(18*6), 44)); - - int o = 0; - - //Storage Side - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new SlotModularBaubleUpgrades(this.inventoryGrid, nextFreeSlot, 8+18 + (var7 * 18), 17 + (var6 * 18))); - this.slotGrid[o] = nextFreeSlot; - nextFreeSlot++; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - //this.onCraftMatrixChanged(this.craftMatrix); - - } - - /** - * Callback for when the crafting matrix is changed. - */ - /* public void onCraftMatrixChanged(IInventory p_75130_1_) - { - this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - }*/ - - /** - * Called when the container is closed. - */ - @Override - public void onContainerClosed(EntityPlayer p_75134_1_){ - super.onContainerClosed(p_75134_1_); - if (!this.worldObj.isRemote){ - /* for (int i = 0; i < 9; ++i){ - ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); - if (itemstack != null){ - p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); - } - }*/ - } - } - - public TileEntityModularityTable getTileentityViaContainer(){ - if (this.tile_entity != null){ - return this.tile_entity; - } - return null; - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == 0){ - Logger.INFO("Player Clicked on the bauble slot"); - //TODO - } - else if (aSlotIndex == 1){ - Logger.INFO("Player Clicked on the upgrade slot"); - //TODO - } - else if (aSlotIndex == 2){ - Logger.INFO("Player Clicked on the output slot"); - //TODO - } - else { - for (final int x : this.slotGrid){ - if (aSlotIndex == x){ - Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockModularTable){ - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { - - return null; - - /*ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) - { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3;*/ - } - - //Can merge Slot - /*public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_){ - return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); - }*/ - - /*public ItemStack getOutputContent(){ - ItemStack output = this.craftResult.getStackInSlot(0); - if (output != null){ - return output; - } - return null; - } - - public ItemStack[] getInputComponents(){ - ItemStack inputs[] = new ItemStack[9]; - for (int r=0;r= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - // Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java b/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java deleted file mode 100644 index 2cdf7ee783..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java +++ /dev/null @@ -1,242 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain; -import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput; -import gtPlusPlus.core.slots.SlotCraftingNoCollect; -import gtPlusPlus.core.slots.SlotDataStick; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; - -public class Container_ProjectTable extends Container { - - /** The crafting matrix inventory (3x3). */ - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public IInventory craftResult = new InventoryCraftResult(); - - protected TileEntityProjectTable tile_entity; - public final InventoryProjectMain inventoryGrid; - public final InventoryProjectOutput inventoryOutputs; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - private final int[] slotOutputs = new int[2]; - private final int[] slotGrid = new int[9]; - - - public Container_ProjectTable(final InventoryPlayer inventory, final TileEntityProjectTable tile){ - this.tile_entity = tile; - this.inventoryGrid = tile.inventoryGrid; - this.inventoryOutputs = tile.inventoryOutputs; - this.tile_entity.setContainer(this); - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int nextFreeSlot = 0; - - - //Output slots - this.addSlotToContainer(new SlotDataStick(this.inventoryOutputs, 0, 26+(18*6), 8)); - this.addSlotToContainer(new SlotNoInput(this.inventoryOutputs, 1, 26+(18*6), 44)); - - this.addSlotToContainer(new SlotCraftingNoCollect(inventory.player, this.craftMatrix, this.craftResult, 0, 26+(18*4), 25)); - - - int o = 0; - //Storage Side - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.craftMatrix, nextFreeSlot, 8+18 + (var7 * 18), 8 + (var6 * 18))); - this.slotGrid[o] = nextFreeSlot; - nextFreeSlot++; - o++; - } - } - - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - /** - * Callback for when the crafting matrix is changed. - */ - @Override - public void onCraftMatrixChanged(IInventory p_75130_1_) - { - this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - /** - * Called when the container is closed. - */ - @Override - public void onContainerClosed(EntityPlayer p_75134_1_){ - super.onContainerClosed(p_75134_1_); - if (!this.worldObj.isRemote){ - for (int i = 0; i < 9; ++i){ - ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); - if (itemstack != null){ - p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); - } - } - } - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == 0){ - Logger.INFO("Player Clicked on the Data Stick slot"); - //TODO - }if (aSlotIndex == 1){ - Logger.INFO("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotGrid){ - if (aSlotIndex == x){ - Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockProjectTable){ - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { - - return null; - - /*ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) - { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3;*/ - } - - //Can merge Slot - @Override - public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_){ - return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - public ItemStack getOutputContent(){ - ItemStack output = this.craftResult.getStackInSlot(0); - if (output != null){ - return output; - } - return null; - } - - public ItemStack[] getInputComponents(){ - ItemStack inputs[] = new ItemStack[9]; - for (int r=0;r= 3 && c < 6) { - continue; - } - this.addSlotToContainer(new SlotJukebox(this.inventoryChest, o++, xStart+(18*c), yStart)); - } - - //Row Two - for (int c = 0; c < 9; c++) { - if (c >= 3 && c < 6) { - continue; - } - this.addSlotToContainer(new SlotJukebox(this.inventoryChest, o++, xStart+(18*c), yStart+18)); - } - - //Row Two - for (int c = 0; c < 9; c++) { - if (c >= 3 && c < 6) { - continue; - } - this.addSlotToContainer(new SlotJukebox(this.inventoryChest, o++, xStart+(18*c), yStart+36)); - } - - - //Controls - int c = 4; - - //Two Control Buttons - this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_HOLO_PLAY, xStart+(18*c), 12)); - this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_HOLO_LOOP, xStart+(18*c), 12+(1*18))); - - //Active playing slot for visual - this.addSlotToContainer(new SlotJukebox(this.inventoryChest, SLOT_OUTPUT, xStart+(18*c), 18+(2*18), true)); - - - - - // Player Inventory - for (var6 = 0; var6 < 3; ++var6) { - for (var7 = 0; var7 < 9; ++var7) { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - // Player Hotbar - for (var6 = 0; var6 < 9; ++var6) { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - - Logger.INFO("3"); - - } - catch (Throwable t) { - t.printStackTrace(); - } - - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) { - super.onContainerClosed(par1EntityPlayer); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockCustomJukebox) { - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { - ItemStack var3 = null; - final Slot var4 = (Slot) this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - /* - * if (par2 == 0) { if (!this.mergeItemStack(var5, - * InOutputSlotNumber, FullSlotNumber, true)) { return null; } - * - * var4.onSlotChange(var5, var3); } else if (par2 >= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - // Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return super.func_94530_a(p_94530_1_, p_94530_2_); - } - - - - @Override - public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - if (tile_entity == null || tile_entity.getWorldObj().isRemote) return null; - switch (aSlotIndex) { - case SLOT_HOLO_PLAY: - if (tile_entity == null) return null; - tile_entity.mIsPlaying = !tile_entity.mIsPlaying; - Logger.INFO("Jukebox | Playing: "+tile_entity.mIsPlaying); - tile_entity.jukeboxLogicUpdate(); - return null; - case SLOT_HOLO_LOOP: - if (tile_entity == null) return null; - tile_entity.mIsLooping = !tile_entity.mIsLooping; - Logger.INFO("Jukebox | Looping: "+tile_entity.mIsLooping); - return null; - case 20: - return null; - default: - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - } - - public boolean isPlaying; - public boolean isLooping; - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (tile_entity == null || tile_entity.getWorldObj().isRemote) return; - - isPlaying = tile_entity.mIsPlaying; - isLooping = tile_entity.mIsLooping; - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 102, isPlaying ? 1 : 0); - var1.sendProgressBarUpdate(this, 103, isLooping ? 1 : 0); - } - } - - @Override - public void addCraftingToCrafters(ICrafting par1ICrafting) { - super.addCraftingToCrafters(par1ICrafting); - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 102: - isPlaying = (par2 != 0); - break; - case 103: - isLooping = (par2 != 0); - break; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_TradeTable.java b/src/Java/gtPlusPlus/core/container/Container_TradeTable.java deleted file mode 100644 index f812e384a7..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_TradeTable.java +++ /dev/null @@ -1,223 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.tradetable.InventoryTradeMain; -import gtPlusPlus.core.inventories.tradetable.InventoryTradeOutput; -import gtPlusPlus.core.slots.SlotGeneric; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; - -public class Container_TradeTable extends Container { - - protected TileEntityTradeTable tile_entity; - public final InventoryTradeMain inventoryChest; - public final InventoryTradeOutput inventoryOutputs; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - private final int[] slotOutputs = new int[2]; - private final int[] slotGrid = new int[9]; - - - public Container_TradeTable(final InventoryPlayer inventory, final TileEntityTradeTable te){ - - this.tile_entity = te; - this.inventoryChest = te.inventoryGrid; - this.inventoryOutputs = te.inventoryOutputs; - this.tile_entity.setContainer(this); - - if (te.isServerSide()) - Logger.INFO("Container - "+te.mOwnerName); - - int var6; - int var7; - this.worldObj = te.getWorldObj(); - this.posX = te.xCoord; - this.posY = te.yCoord; - this.posZ = te.zCoord; - - int nextFreeSlot = 0; - - - //Output slots - this.addSlotToContainer(new SlotGeneric(this.inventoryOutputs, 0, 26+(18*6), 8)); - this.addSlotToContainer(new SlotNoInput(this.inventoryOutputs, 1, 26+(18*6), 44)); - - //this.addSlotToContainer(new SlotCraftingNoCollect(inventory.player, this.craftMatrix, this.craftResult, 0, 26+(18*4), 25)); - - int o = 0; - //Storage Side - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, nextFreeSlot, 8+18 + (var7 * 18), 8 + (var6 * 18))); - this.slotGrid[o] = nextFreeSlot; - nextFreeSlot++; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - //this.onCraftMatrixChanged(this.craftMatrix); - } - - /** - * Called when the container is closed. - */ - @Override - public void onContainerClosed(EntityPlayer p_75134_1_){ - super.onContainerClosed(p_75134_1_); - if (!this.worldObj.isRemote){ - for (int i = 0; i < 9; ++i){ - ItemStack itemstack = this.inventoryChest.getStackInSlotOnClosing(i); - if (itemstack != null){ - p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); - } - } - } - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == 0){ - Logger.INFO("Player Clicked on the Data Stick slot"); - //TODO - }if (aSlotIndex == 1){ - Logger.INFO("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotGrid){ - if (aSlotIndex == x){ - Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ - if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockTradeTable){ - return false; - } - - return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; - } - - - @Override - public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) - { - - return null; - - /*ItemStack var3 = null; - final Slot var4 = (Slot)this.inventorySlots.get(par2); - - if ((var4 != null) && var4.getHasStack()) - { - final ItemStack var5 = var4.getStack(); - var3 = var5.copy(); - - if (par2 == 0) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) - { - return null; - } - - var4.onSlotChange(var5, var3); - } - else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3;*/ - } - - public ItemStack getOutputContent(){ - ItemStack output = this.inventoryOutputs.getStackInSlot(0); - if (output != null){ - return output; - } - return null; - } - - public ItemStack[] getInputComponents(){ - ItemStack inputs[] = new ItemStack[9]; - for (int r=0;r= - * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if - * (!this.mergeItemStack(var5, InventoryOutSlotNumber, - * FullSlotNumber, false)) { return null; } } else if (par2 >= - * InventoryOutSlotNumber && par2 < FullSlotNumber) { if - * (!this.mergeItemStack(var5, InOutputSlotNumber, - * InventoryOutSlotNumber, false)) { return null; } } else if - * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, - * false)) { return null; } - */ - - if (var5.stackSize == 0) { - var4.putStack((ItemStack) null); - } else { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if ((Utils.isClient()) || (this.mTileEntity == null)) { - return; - } - - mCustomValue = mTileEntity.getCustomValue(); - mTimer++; - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - if (mTimer % 20 == 10 || oCustomValue != mCustomValue) { - var1.sendProgressBarUpdate(this, 0, mCustomValue); - } - } - - oCustomValue = mCustomValue; - } - - @SideOnly(Side.CLIENT) - @Override - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 0: - mCustomValue = (short) par2; - break; - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_Workbench.java b/src/Java/gtPlusPlus/core/container/Container_Workbench.java deleted file mode 100644 index 55ef1a3d0c..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_Workbench.java +++ /dev/null @@ -1,413 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.InventoryWorkbenchChest; -import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; -import gtPlusPlus.core.inventories.InventoryWorkbenchTools; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_Workbench extends Container { - - protected TileEntityWorkbench tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchTools inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - //public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 0; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public void moveCraftingToChest(){ - //Check Chest Space - for (int i=0;i<9;i++){ - if (this.craftMatrix.getStackInSlot(i) != null){ - for (int r=0;r<16;r++){ - if ((this.inventoryChest.getStackInSlot(r) == null) || ((this.inventoryChest.getStackInSlot(r).getItem() == this.craftMatrix.getStackInSlot(i).getItem()) && ((64-this.craftMatrix.getStackInSlot(i).stackSize) <= (64-this.craftMatrix.getStackInSlot(i).stackSize)))){ - this.inventoryChest.setInventorySlotContents(r, this.craftMatrix.getStackInSlot(i)); - this.craftMatrix.setInventorySlotContents(i, null); - break; - } - } - } - } - //For Each Space or already existing itemstack, move one itemstack or fill current partial stack - //Remove old itemstack or partial stack from crafting grid - } - - public void moveChestToCrafting(){ - //Check Crafting items and slots - for (int i=0;i<9;i++){ - if ((this.craftMatrix.getStackInSlot(i) == null) || (this.craftMatrix.getStackInSlot(i).stackSize > 0)){ - for (int r=0;r<16;r++){ - if (this.inventoryChest.getStackInSlot(r) != null){ - this.craftMatrix.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(r)); - this.inventoryChest.setInventorySlotContents(r, null); - } - } - } - } - //For Each already existing itemstack, fill current partial stack - //Remove partial stack from chest area - } - - - public Container_Workbench(final InventoryPlayer inventory, final TileEntityWorkbench tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - //this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtTool(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18))); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java b/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java deleted file mode 100644 index dc499c570f..0000000000 --- a/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java +++ /dev/null @@ -1,377 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.*; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_WorkbenchAdvanced extends Container { - - protected TileEntityWorkbenchAdvanced tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchToolsElectric inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 9; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public Container_WorkbenchAdvanced(final InventoryPlayer inventory, final TileEntityWorkbenchAdvanced tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtToolElectric(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18), 3, false)); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/container/box/LunchBoxContainer.java b/src/Java/gtPlusPlus/core/container/box/LunchBoxContainer.java deleted file mode 100644 index 8e56c661f2..0000000000 --- a/src/Java/gtPlusPlus/core/container/box/LunchBoxContainer.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.core.container.box; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import gtPlusPlus.core.slots.SlotLunchBox; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; - -public class LunchBoxContainer extends ContainerBoxBase { - public LunchBoxContainer(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, CustomBoxInventory CustomBoxInventory) { - super(par1Player, inventoryPlayer, CustomBoxInventory, SlotLunchBox.class, gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS); - } -} diff --git a/src/Java/gtPlusPlus/core/container/box/MagicBagContainer.java b/src/Java/gtPlusPlus/core/container/box/MagicBagContainer.java deleted file mode 100644 index 7820d56814..0000000000 --- a/src/Java/gtPlusPlus/core/container/box/MagicBagContainer.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.core.container.box; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import gtPlusPlus.core.slots.SlotMagicToolBag; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; - -public class MagicBagContainer extends ContainerBoxBase { - public MagicBagContainer(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, CustomBoxInventory CustomBoxInventory) { - super(par1Player, inventoryPlayer, CustomBoxInventory, SlotMagicToolBag.class, gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS); - } -} diff --git a/src/Java/gtPlusPlus/core/container/box/ToolBoxContainer.java b/src/Java/gtPlusPlus/core/container/box/ToolBoxContainer.java deleted file mode 100644 index 49719aa9ba..0000000000 --- a/src/Java/gtPlusPlus/core/container/box/ToolBoxContainer.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.container.box; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox; -import gtPlusPlus.core.slots.SlotToolBox; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; - -public class ToolBoxContainer extends ContainerBoxBase { - public ToolBoxContainer(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, - CustomBoxInventory CustomBoxInventory) { - super(par1Player, inventoryPlayer, CustomBoxInventory, SlotToolBox.class, UniversalToolBox.SLOTS); - } -} diff --git a/src/Java/gtPlusPlus/core/creative/AddToCreativeTab.java b/src/Java/gtPlusPlus/core/creative/AddToCreativeTab.java deleted file mode 100644 index 218bef46bd..0000000000 --- a/src/Java/gtPlusPlus/core/creative/AddToCreativeTab.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.core.creative; - -import net.minecraft.creativetab.CreativeTabs; -import gregtech.api.util.GT_CreativeTab; -import gtPlusPlus.core.creative.tabs.*; -import gtPlusPlus.xmod.bop.creative.MiscUtilsBOPTab; - -public class AddToCreativeTab { - - public static CreativeTabs tabBlock; - public static CreativeTabs tabMisc; - public static CreativeTabs tabCombat; - public static CreativeTabs tabTools; - public static CreativeTabs tabMachines; - public static CreativeTabs tabOther; - public static CreativeTabs tabBOP; - - public static void initialiseTabs() { - //GT_CreativeTab - /*tabBlock = new MiscUtilCreativeTabBlock("MiscUtilBlockTab"); - tabMisc = new MiscUtilCreativeTabMisc("MiscUtilMiscTab"); - tabTools = new MiscUtilCreativeTabTools("MiscUtilToolsTab"); - tabMachines = new MiscUtilCreativeTabMachines("MiscUtilMachineTab"); - tabOther = new MiscUtilCreativeTabOther("MiscUtilOtherTab"); - tabBOP = new MiscUtilsBOPTab("MiscUtilBOP");*/ - - tabBlock = new GT_CreativeTab("GTPP_BLOCKS", "GT++ Blocks"); - tabMisc = new GT_CreativeTab("GTPP_MISC", "GT++ Misc"); - tabTools = new GT_CreativeTab("GTPP_TOOLS", "GT++ Tools"); - tabMachines = new GT_CreativeTab("GTPP_MACHINES", "GT++ Machines"); - tabOther = new GT_CreativeTab("GTPP_OTHER", "GT++ Other"); - tabBOP = new GT_CreativeTab("GTPP_OTHER_2", "GT++ Other II"); - - } -} diff --git a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java b/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java deleted file mode 100644 index 2851a514d0..0000000000 --- a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.core.creative.tabs; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.block.ModBlocks; - -public class MiscUtilCreativeTabBlock extends CreativeTabs { - - public MiscUtilCreativeTabBlock(final String lable) { - super(lable); - } - - @Override - public Item getTabIconItem() { - return Item.getItemFromBlock(Blocks.bedrock); - } - - @SideOnly(Side.CLIENT) - @Override - public int func_151243_f(){ - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java b/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java deleted file mode 100644 index 96c809c4da..0000000000 --- a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.core.creative.tabs; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; - -import gtPlusPlus.core.item.ModItems; - -public class MiscUtilCreativeTabMachines extends CreativeTabs { - - - public MiscUtilCreativeTabMachines(final String lable) { - super(lable); - } - - @Override - public Item getTabIconItem() { - return Items.netherbrick; - } - -} diff --git a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java b/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java deleted file mode 100644 index a67668bbf0..0000000000 --- a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.creative.tabs; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; - -import gtPlusPlus.core.item.ModItems; - -public class MiscUtilCreativeTabMisc extends CreativeTabs { - - public MiscUtilCreativeTabMisc(final String lable) { - super(lable); - } - - @Override - public Item getTabIconItem() { - return Items.painting; - } - -} diff --git a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java b/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java deleted file mode 100644 index afd89346c0..0000000000 --- a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.creative.tabs; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; - -import gtPlusPlus.core.item.ModItems; - -public class MiscUtilCreativeTabOther extends CreativeTabs { - - public MiscUtilCreativeTabOther(final String lable) { - super(lable); - } - - @Override - public Item getTabIconItem() { - return Items.repeater; - } - -} diff --git a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java b/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java deleted file mode 100644 index ab1ab069de..0000000000 --- a/src/Java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.creative.tabs; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Items; -import net.minecraft.item.Item; - -import gtPlusPlus.core.item.ModItems; - -public class MiscUtilCreativeTabTools extends CreativeTabs { - - public MiscUtilCreativeTabTools(final String lable) { - super(lable); - } - - @Override - public Item getTabIconItem() { - return Items.diamond_pickaxe; - } - -} diff --git a/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java b/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java deleted file mode 100644 index 9abd07392d..0000000000 --- a/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java +++ /dev/null @@ -1,216 +0,0 @@ -package gtPlusPlus.core.entity; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityTNTPrimed; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.world.explosions.ExplosionHandler; - -public class EntityPrimedMiningExplosive extends EntityTNTPrimed -{ - /** How long the fuse is */ - private EntityLivingBase tntPlacedBy; - - public EntityPrimedMiningExplosive(final World world){ - super(world); - this.fuse = 160; - this.preventEntitySpawning = true; - this.setSize(0.98F, 0.98F); - this.yOffset = this.height / 2.0F; - } - - public EntityPrimedMiningExplosive(final World world, final double x, final double y, final double z, final EntityLivingBase placingEntity) - { - this(world); - this.setPosition(x, y, z); - final float f = (float)(Math.random() * Math.PI * 2.0D); - this.motionX = -((float)Math.sin(f)) * 0.02F; - this.motionY = 0.20000000298023224D; - this.motionZ = -((float)Math.cos(f)) * 0.02F; - this.fuse = 160; - this.prevPosX = x; - this.prevPosY = y; - this.prevPosZ = z; - this.tntPlacedBy = placingEntity; - } - - @Override - protected void entityInit() {} - - /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops - */ - @Override - protected boolean canTriggerWalking() - { - return false; - } - - /** - * Returns true if other Entities should be prevented from moving through this Entity. - */ - @Override - public boolean canBeCollidedWith() - { - return !this.isDead; - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - this.motionY -= 0.03999999910593033D; - this.moveEntity(this.motionX, this.motionY, this.motionZ); - this.motionX *= 0.9800000190734863D; - this.motionY *= 0.9800000190734863D; - this.motionZ *= 0.9800000190734863D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - this.motionY *= -0.5D; - } - - if (this.fuse-- <= 0) - { - this.setDead(); - - if (!this.worldObj.isRemote) - { - this.explode(); - } - } - else - { - - int t = MathUtils.randInt(0, 15); - - if (t <= 2){ - int e = MathUtils.randInt(0, 3); - if (e <= 1){ - this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - else if (e == 2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - - } - } - else if (t <= 4){ - int e = MathUtils.randInt(0, 5); - if (e <= 1){ - this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - else if (e == 2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - - } - } - else if (t <= 6){ - int e = MathUtils.randInt(0, 4); - if (e <= 1){ - this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - else if (e == 2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - - } - } - else if (t <= 8){ - int e = MathUtils.randInt(0, 1); - if (e <= 1){ - this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - else if (e == 2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - - } - } - else if (t <= 10){ - int e = MathUtils.randInt(0, 6); - if (e <= 1){ - this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - else if (e >= 2){ - this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - - } - } - - } - } - - private void explode() - { - final float f = 100.0F; - - ExplosionHandler explode = new ExplosionHandler(); - explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, false, true); - - /*this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true); - this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); - this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); - this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); - this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true);*/ - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - protected void writeEntityToNBT(final NBTTagCompound tag) - { - tag.setByte("Fuse", (byte)this.fuse); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - protected void readEntityFromNBT(final NBTTagCompound tag) - { - this.fuse = tag.getByte("Fuse"); - } - - /** - * returns null or the entityliving it was placed or ignited by - */ - @Override - public EntityLivingBase getTntPlacedBy() - { - return this.tntPlacedBy; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/EntityTeleportFX.java b/src/Java/gtPlusPlus/core/entity/EntityTeleportFX.java deleted file mode 100644 index ea667b8667..0000000000 --- a/src/Java/gtPlusPlus/core/entity/EntityTeleportFX.java +++ /dev/null @@ -1,247 +0,0 @@ -package gtPlusPlus.core.entity; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -public class EntityTeleportFX extends Entity -{ - /** 'x' location the eye should float towards. */ - private double targetX; - /** 'y' location the eye should float towards. */ - private double targetY; - /** 'z' location the eye should float towards. */ - private double targetZ; - private int despawnTimer; - private boolean shatterOrDrop; - private static final String __OBFID = "CL_00001716"; - - public EntityTeleportFX(final World p_i1757_1_) - { - super(p_i1757_1_); - this.setSize(0.25F, 0.25F); - } - - @Override - protected void entityInit() {} - - /** - * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge - * length * 64 * renderDistanceWeight Args: distance - */ - @Override - @SideOnly(Side.CLIENT) - public boolean isInRangeToRenderDist(final double p_70112_1_) - { - double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D; - d1 *= 64.0D; - return p_70112_1_ < (d1 * d1); - } - - public EntityTeleportFX(final World p_i1758_1_, final double p_i1758_2_, final double p_i1758_4_, final double p_i1758_6_) - { - super(p_i1758_1_); - this.despawnTimer = 0; - this.setSize(0.25F, 0.25F); - this.setPosition(p_i1758_2_, p_i1758_4_, p_i1758_6_); - this.yOffset = 0.0F; - } - - /** - * The location the eye should float/move towards. Currently used for moving towards the nearest stronghold. Args: - * strongholdX, strongholdY, strongholdZ - */ - public void moveTowards(final double p_70220_1_, final int p_70220_3_, final double p_70220_4_) - { - final double d2 = p_70220_1_ - this.posX; - final double d3 = p_70220_4_ - this.posZ; - final float f = MathHelper.sqrt_double((d2 * d2) + (d3 * d3)); - - if (f > 12.0F) - { - this.targetX = this.posX + ((d2 / f) * 12.0D); - this.targetZ = this.posZ + ((d3 / f) * 12.0D); - this.targetY = this.posY + 8.0D; - } - else - { - this.targetX = p_70220_1_; - this.targetY = p_70220_3_; - this.targetZ = p_70220_4_; - } - - this.despawnTimer = 0; - this.shatterOrDrop = this.rand.nextInt(5) > 0; - } - - /** - * Sets the velocity to the args. Args: x, y, z - */ - @Override - @SideOnly(Side.CLIENT) - public void setVelocity(final double p_70016_1_, final double p_70016_3_, final double p_70016_5_) - { - this.motionX = p_70016_1_; - this.motionY = p_70016_3_; - this.motionZ = p_70016_5_; - - if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) - { - final float f = MathHelper.sqrt_double((p_70016_1_ * p_70016_1_) + (p_70016_5_ * p_70016_5_)); - this.prevRotationYaw = this.rotationYaw = (float)((Math.atan2(p_70016_1_, p_70016_5_) * 180.0D) / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)((Math.atan2(p_70016_3_, f) * 180.0D) / Math.PI); - } - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() - { - this.lastTickPosX = this.posX; - this.lastTickPosY = this.posY; - this.lastTickPosZ = this.posZ; - super.onUpdate(); - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - final float f = MathHelper.sqrt_double((this.motionX * this.motionX) + (this.motionZ * this.motionZ)); - this.rotationYaw = (float)((Math.atan2(this.motionX, this.motionZ) * 180.0D) / Math.PI); - - for (this.rotationPitch = (float)((Math.atan2(this.motionY, f) * 180.0D) / Math.PI); (this.rotationPitch - this.prevRotationPitch) < -180.0F; this.prevRotationPitch -= 360.0F) - { - ; - } - - while ((this.rotationPitch - this.prevRotationPitch) >= 180.0F) - { - this.prevRotationPitch += 360.0F; - } - - while ((this.rotationYaw - this.prevRotationYaw) < -180.0F) - { - this.prevRotationYaw -= 360.0F; - } - - while ((this.rotationYaw - this.prevRotationYaw) >= 180.0F) - { - this.prevRotationYaw += 360.0F; - } - - this.rotationPitch = this.prevRotationPitch + ((this.rotationPitch - this.prevRotationPitch) * 0.2F); - this.rotationYaw = this.prevRotationYaw + ((this.rotationYaw - this.prevRotationYaw) * 0.2F); - - if (!this.worldObj.isRemote) - { - final double d0 = this.targetX - this.posX; - final double d1 = this.targetZ - this.posZ; - final float f1 = (float)Math.sqrt((d0 * d0) + (d1 * d1)); - final float f2 = (float)Math.atan2(d1, d0); - double d2 = f + ((f1 - f) * 0.0025D); - - if (f1 < 1.0F) - { - d2 *= 0.8D; - this.motionY *= 0.8D; - } - - this.motionX = Math.cos(f2) * d2; - this.motionZ = Math.sin(f2) * d2; - - if (this.posY < this.targetY) - { - this.motionY += (1.0D - this.motionY) * 0.014999999664723873D; - } - else - { - this.motionY += (-1.0D - this.motionY) * 0.014999999664723873D; - } - } - - final float f3 = 0.25F; - - if (this.isInWater()) - { - for (int i = 0; i < 4; ++i) - { - this.worldObj.spawnParticle("bubble", this.posX - (this.motionX * f3), this.posY - (this.motionY * f3), this.posZ - (this.motionZ * f3), this.motionX, this.motionY, this.motionZ); - } - } - else - { - this.worldObj.spawnParticle("portal", ((this.posX - (this.motionX * f3)) + (this.rand.nextDouble() * 0.6D)) - 0.3D, this.posY - (this.motionY * f3) - 0.5D, ((this.posZ - (this.motionZ * f3)) + (this.rand.nextDouble() * 0.6D)) - 0.3D, this.motionX, this.motionY, this.motionZ); - } - - if (!this.worldObj.isRemote) - { - this.setPosition(this.posX, this.posY, this.posZ); - ++this.despawnTimer; - - if ((this.despawnTimer > 80) && !this.worldObj.isRemote) - { - this.setDead(); - - if (this.shatterOrDrop) - { - this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.ender_eye))); - } - else - { - this.worldObj.playAuxSFX(2003, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0); - } - } - } - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(final NBTTagCompound p_70014_1_) {} - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(final NBTTagCompound p_70037_1_) {} - - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - /** - * Gets how bright this entity is. - */ - @Override - public float getBrightness(final float p_70013_1_) - { - return 1.0F; - } - - @Override - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(final float p_70070_1_) - { - return 15728880; - } - - /** - * If returns false, the item will not inflict any damage against entities. - */ - @Override - public boolean canAttackWithItem() - { - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java b/src/Java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java deleted file mode 100644 index bf629bd147..0000000000 --- a/src/Java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java +++ /dev/null @@ -1,168 +0,0 @@ -package gtPlusPlus.core.entity; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.effect.EntityWeatherEffect; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MathHelper; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; - -import gtPlusPlus.api.damage.DamageTeslaTower; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.util.minecraft.EntityUtils; - -public class EntityTeslaTowerLightning extends EntityWeatherEffect -{ - /** Declares which state the lightning bolt is in. Whether it's in the air, hit the ground, etc. */ - private int lightningState; - /** A random long that is used to change the vertex of the lightning rendered in RenderLightningBolt */ - public long boltVertex; - /** Determines the time before the EntityLightningBolt is destroyed. It is a random integer decremented over time. */ - private int boltLivingTime; - - private final UUID boltID; - private final UUID boltOwnerID; - - private final Entity boltValidDamageTarget; - - - public EntityTeslaTowerLightning(World p_i1703_1_, double p_i1703_2_, double p_i1703_4_, double p_i1703_6_, Entity valid, UUID owner) - { - super(p_i1703_1_); - Logger.INFO("Plasma Bolt - Created."); - Random rand = new XSTR(p_i1703_1_.getSeed()); - this.setLocationAndAngles(p_i1703_2_, p_i1703_4_, p_i1703_6_, 0.0F, 0.0F); - this.lightningState = 2; - this.boltVertex = rand.nextLong(); - this.boltLivingTime = (1) + rand.nextInt(3) + 1; - this.boltValidDamageTarget = valid; - this.boltID = UUID.randomUUID(); - this.boltOwnerID = owner; - - //Puts fires out - if (!p_i1703_1_.isRemote && p_i1703_1_.getGameRules().getGameRuleBooleanValue("doFireTick") && (p_i1703_1_.difficultySetting == EnumDifficulty.NORMAL || p_i1703_1_.difficultySetting == EnumDifficulty.HARD) && p_i1703_1_.doChunksNearChunkExist(MathHelper.floor_double(p_i1703_2_), MathHelper.floor_double(p_i1703_4_), MathHelper.floor_double(p_i1703_6_), 10)) - { - Logger.INFO("Plasma Bolt - Putting out fires?."); - int i = MathHelper.floor_double(p_i1703_2_); - int j = MathHelper.floor_double(p_i1703_4_); - int k = MathHelper.floor_double(p_i1703_6_); - - if (p_i1703_1_.getBlock(i, j, k).getMaterial() == Material.fire) - { - p_i1703_1_.setBlock(i, j, k, Blocks.air); - } - - for (i = 0; i < 4; ++i) - { - j = MathHelper.floor_double(p_i1703_2_) + rand.nextInt(3) - 1; - k = MathHelper.floor_double(p_i1703_4_) + rand.nextInt(3) - 1; - int l = MathHelper.floor_double(p_i1703_6_) + rand.nextInt(3) - 1; - - if (p_i1703_1_.getBlock(j, k, l).getMaterial() == Material.fire) - { - p_i1703_1_.setBlock(j, k, l, Blocks.air); - } - } - } - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() - { - //Logger.INFO("Zap"); - super.onUpdate(); - Logger.INFO("Plasma Bolt - Tick."); - Random rand = new XSTR(this.worldObj.getSeed()); - - if (this.lightningState == 2) - { - Logger.INFO("Plasma Bolt - Playing Sound."); - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + rand.nextFloat() * 0.2F); - } - --this.lightningState; - - - if (this.lightningState >= 0) - { - Logger.INFO("Plasma Bolt - state >= 0."); - if (this.worldObj.isRemote) - { - Logger.INFO("Plasma Bolt - World is remote, resetting state to 2."); - this.worldObj.lastLightningBolt = 2; - } - else - { - Logger.INFO("Plasma Bolt - World is server side."); - double d0 = 3.0D; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getBoundingBox(this.posX - d0, this.posY - d0, this.posZ - d0, this.posX + d0, this.posY + 6.0D + d0, this.posZ + d0)); - - for (int l = 0; l < list.size(); ++l) - { - Entity entity = list.get(l); - if (this.boltValidDamageTarget.getUniqueID().equals(entity.getUniqueID())){ - if (!entity.getUniqueID().equals(boltOwnerID)){ - Logger.INFO("Plasma Bolt - Hurting Entity."); - Logger.INFO("Plasma Bolt - "+entity.getCommandSenderName()+"."); - //if (!net.minecraftforge.event.ForgeEventFactory.onEntityStruckByLightning(entity, this)) - EntityUtils.doFireDamage(entity, 5); - EntityUtils.doDamage(entity, new DamageTeslaTower(entity), 20); - } - } - } - - } - } - - if (this.lightningState < 0) - { - Logger.INFO("Plasma Bolt - state < 0."); - if (this.boltLivingTime == 0) - { - Logger.INFO("Plasma Bolt - setting dead."); - this.setDead(); - } - else if (this.lightningState < -rand.nextInt(10)) - { - Logger.INFO("Plasma Bolt - dunno."); - --this.boltLivingTime; - this.lightningState = 1; - this.boltVertex = rand.nextLong(); - //Puts fires out. - if (!this.worldObj.isRemote && this.worldObj.getGameRules().getGameRuleBooleanValue("doFireTick") && this.worldObj.doChunksNearChunkExist(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 10)) - { - Logger.INFO("Plasma Bolt - Putting fires out [2]."); - int i = MathHelper.floor_double(this.posX); - int j = MathHelper.floor_double(this.posY); - int k = MathHelper.floor_double(this.posZ); - - if (this.worldObj.getBlock(i, j, k).getMaterial() == Material.fire) - { - this.worldObj.setBlock(i, j, k, Blocks.air); - } - } - - } - } - } - - protected void entityInit() {} - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {} - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {} -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java deleted file mode 100644 index 6b88d5775c..0000000000 --- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java +++ /dev/null @@ -1,96 +0,0 @@ -package gtPlusPlus.core.entity; - -import cpw.mods.fml.common.registry.EntityRegistry; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.entity.type.EntityAustralianSpiderBase; -import gtPlusPlus.australia.entity.type.EntityBoar; -import gtPlusPlus.australia.entity.type.EntityDingo; -import gtPlusPlus.australia.entity.type.EntityOctopus; -import gtPlusPlus.core.entity.monster.EntityBatKing; -import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; -import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion; -import gtPlusPlus.core.entity.projectile.EntityLightningAttack; -import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; -import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; -import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; -import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg; -import gtPlusPlus.core.util.Utils; - -public class InternalEntityRegistry { - - static int mEntityID = 0; - - public static void registerEntities(){ - Logger.INFO("Registering GT++ Entities."); - - //EntityRegistry.registerGlobalEntityID(EntityPrimedMiningExplosive.class, "MiningCharge", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(125, 125, 125)); - EntityRegistry.registerModEntity(EntityPrimedMiningExplosive.class, "MiningCharge", mEntityID++, GTplusplus.instance, 64, 20, true); - - //EntityRegistry.registerGlobalEntityID(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(200, 0, 200), Utils.rgbtoHexValue(125, 125, 125)); - EntityRegistry.registerModEntity(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", mEntityID++, GTplusplus.instance, 64, 20, true); - - - //EntityRegistry.registerGlobalEntityID(EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(255, 255, 255)); - EntityRegistry.registerModEntity(EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric", mEntityID++, GTplusplus.instance, 64, 20, true); - - - //EntityRegistry.registerGlobalEntityID(EntityToxinballSmall.class, "toxinBall", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 25, 0), Utils.rgbtoHexValue(0, 125, 0)); - EntityRegistry.registerModEntity(EntityToxinballSmall.class, "toxinBall", mEntityID++, GTplusplus.instance, 64, 20, true); - - - //EntityRegistry.registerGlobalEntityID(EntityStaballoyConstruct.class, "constructStaballoy", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 75, 0), Utils.rgbtoHexValue(50, 220, 50)); - EntityRegistry.registerModEntity(EntityStaballoyConstruct.class, "constructStaballoy", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(0, "constructStaballoy", Utils.rgbtoHexValue(20, 200, 20), Utils.rgbtoHexValue(20, 20, 20)); - - //EntityRegistry.registerGlobalEntityID(EntitySickBlaze.class, "sickBlaze", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 75, 0), Utils.rgbtoHexValue(75, 175, 75)); - EntityRegistry.registerModEntity(EntitySickBlaze.class, "sickBlaze", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(1, "sickBlaze", Utils.rgbtoHexValue(40, 180, 40), Utils.rgbtoHexValue(75, 75, 75)); - - //EntityRegistry.registerGlobalEntityID(EntityTeslaTowerLightning.class, "plasmaBolt", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(125, 125, 125)); - EntityRegistry.registerModEntity(EntityTeslaTowerLightning.class, "plasmaBolt", mEntityID++, GTplusplus.instance, 64, 5, true); - - EntityRegistry.registerModEntity(EntityThrowableBomb.class, "EntityThrowableBomb", mEntityID++, GTplusplus.instance, 64, 10, true); - - EntityRegistry.registerModEntity(EntityLightningAttack.class, "EntityLightningAttack", mEntityID++, GTplusplus.instance, 64, 20, true); - - /** - * Globals, which generate spawn eggs. (Currently required for Giant chicken spawning) - */ - - EntityRegistry.registerModEntity(EntityGiantChickenBase.class, "bigChickenFriendly", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(2, "bigChickenFriendly", Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); - EntityRegistry.registerModEntity(EntityBatKing.class, "batKing", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(3, "batKing", Utils.rgbtoHexValue(175, 175, 0), Utils.rgbtoHexValue(0, 175, 175)); - //EntityRegistry.registerModEntity(EntityGiantChickenBase.class, "bigChickenFriendly", mEntityID++, GTplusplus.instance, 64, 20, true); - - - - - - //Australia - EntityRegistry.registerModEntity(EntityAustralianSpiderBase.class, "AusSpider", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(30, "AusSpider", Utils.rgbtoHexValue(125, 0, 125), Utils.rgbtoHexValue(175, 175, 175)); - EntityRegistry.registerModEntity(EntityBoar.class, "AusBoar", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(31, "AusBoar", Utils.rgbtoHexValue(75, 75, 0), Utils.rgbtoHexValue(175, 175, 75)); - EntityRegistry.registerModEntity(EntityDingo.class, "AusDingo", mEntityID++, GTplusplus.instance, 64, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(32, "AusDingo", Utils.rgbtoHexValue(175, 125, 0), Utils.rgbtoHexValue(175, 75, 175)); - EntityRegistry.registerModEntity(EntityOctopus.class, "AusOctopus", mEntityID++, GTplusplus.instance, 32, 20, true); - ItemCustomSpawnEgg.registerEntityForSpawnEgg(33, "AusOctopus", Utils.rgbtoHexValue(150, 50, 150), Utils.rgbtoHexValue(75, 175, 175)); - //EntityRegistry.registerGlobalEntityID(EntityAustralianSpiderBase.class, "AusSpider", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); - //EntityRegistry.registerGlobalEntityID(EntityBoar.class, "AusBoar", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); - //EntityRegistry.registerGlobalEntityID(EntityDingo.class, "AusDingo", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); - //EntityRegistry.registerGlobalEntityID(EntityOctopus.class, "AusOctopus", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); - - - - - - - - } - -} diff --git a/src/Java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java b/src/Java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java deleted file mode 100644 index 52d1d6100c..0000000000 --- a/src/Java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java +++ /dev/null @@ -1,406 +0,0 @@ -package gtPlusPlus.core.entity.ai.batking; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.entity.monster.EntityBatKing; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.pathfinding.PathEntity; -import net.minecraft.pathfinding.PathPoint; -import net.minecraft.util.MathHelper; - -public class EntityAIBatKingAttack extends EntityAIBase { - - private final Ranged mRangedAI; - private final Melee mMeleeAI; - private boolean mIsMelee = false; - - /** The Bat King in control of this AI. */ - private final EntityBatKing mAttackingEntity; - - /** The PathEntity of our entity. */ - private PathEntity mEntityPathEntity; - - /** The current target of Bat King in control of this AI. */ - private EntityLivingBase mEntityTarget; - - private final Class mClassTarget; - - public EntityAIBatKingAttack(EntityBatKing aAttacker, Class aClassTarget, - double aMovementSpeed, int someInt, int aMaxRangedAttackTime, float someFloat, boolean aLongMemory) { - mRangedAI = new Ranged(this, aMovementSpeed, someInt, 5, someFloat); - mMeleeAI = new Melee(this, aClassTarget, aMovementSpeed, aLongMemory); - mAttackingEntity = aAttacker; - mClassTarget = aClassTarget; - } - - @Override - public boolean shouldExecute() { - determineCombatStyle(); - EntityLivingBase entitylivingbase = this.mAttackingEntity.getAttackTarget(); - if (entitylivingbase == null) { - this.mEntityTarget = null; - return false; - } else if (!entitylivingbase.isEntityAlive()) { - return false; - } else if (this.mClassTarget != null && !this.mClassTarget.isAssignableFrom(entitylivingbase.getClass())) { - return false; - } else { - if (this.mIsMelee) { - return this.mMeleeAI.shouldExecute(); - } - else { - this.mEntityTarget = entitylivingbase; - this.mEntityPathEntity = this.mAttackingEntity.getNavigator().getPathToEntityLiving(entitylivingbase); - return mRangedAI != null && mMeleeAI != null && hasValidTarget(); - } - } - } - - public EntityBatKing getBatKing() { - return this.mAttackingEntity; - } - - public IRangedAttackMob getBatKingAsIRangedAttackMob() { - return this.mAttackingEntity; - } - - public boolean hasValidTarget() { - return this.mEntityTarget != null; - } - - public EntityLivingBase getTarget() { - return mEntityTarget; - } - - @Override - public boolean continueExecuting() { - determineCombatStyle(); - if (mIsMelee) { - return mMeleeAI.continueExecuting(); - } else { - return mRangedAI.continueExecuting(); - } - } - - @Override - public boolean isInterruptible() { - if (mIsMelee) { - - } else { - - } - return super.isInterruptible(); - } - - @Override - public void startExecuting() { - determineCombatStyle(); - if (mIsMelee) { - mMeleeAI.startExecuting(); - } else { - mRangedAI.startExecuting(); - } - } - - @Override - public void resetTask() { - determineCombatStyle(); - if (mIsMelee) { - mMeleeAI.resetTask(); - } else { - mRangedAI.resetTask(); - } - } - - @Override - public void updateTask() { - determineCombatStyle(); - if (mIsMelee) { - mMeleeAI.updateTask(); - } else { - mRangedAI.updateTask(); - } - } - - - private final void determineCombatStyle() { - boolean aisMeleeNow = this.mIsMelee; - if (this.mEntityTarget != null && EntityUtils.getDistance(getBatKing(), mEntityTarget) < 4) { - this.mIsMelee = true; - } - else { - this.mIsMelee = false; - } - if (aisMeleeNow != this.mIsMelee) { - Logger.INFO("Bat King changed combat style from "+(aisMeleeNow ? "Melee" : "Ranged")+" to "+(this.mIsMelee ? "Melee" : "Ranged")); - } - } - - private class Ranged { - - private final EntityAIBatKingAttack parentAI; - - /** - * A decrementing tick that spawns a ranged attack once this value reaches 0. It - * is then set back to the maxRangedAttackTime. - */ - private int rangedAttackTime; - private double entityMoveSpeed; - private int mCooldownTime; - private int field_96561_g; - /** - * The maximum time the AI has to wait before performing another ranged attack. - */ - private int maxRangedAttackTime; - private float field_96562_i; - private float field_82642_h; //Max range - - public Ranged(EntityAIBatKingAttack aParent, double aMovementSpeed, int someInt, - int aMaxRangedAttackTime, float someFloat) { - this.rangedAttackTime = -1; - this.parentAI = aParent; - this.entityMoveSpeed = aMovementSpeed; - this.field_96561_g = someInt; - this.maxRangedAttackTime = aMaxRangedAttackTime; - this.field_96562_i = someFloat; - this.field_82642_h = someFloat * someFloat * 8; - parentAI.setMutexBits(3); - - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() { - parentAI.getBatKing().getNavigator().setPath(parentAI.mEntityPathEntity, this.entityMoveSpeed); - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() { - return parentAI.shouldExecute() || !parentAI.getBatKing().getNavigator().noPath(); - } - - /** - * Resets the task - */ - public void resetTask() { - parentAI.mEntityTarget = null; - this.mCooldownTime = 0; - this.rangedAttackTime = -1; - } - - /** - * Updates the task - */ - public void updateTask() { - - if (MathUtils.randInt(0, 100) == 0) { - maxRangedAttackTime = MathUtils.balance(maxRangedAttackTime, 20, 40); - } - - double d0 = parentAI.getBatKing().getDistanceSq(parentAI.mEntityTarget.posX, parentAI.mEntityTarget.boundingBox.minY, - parentAI.mEntityTarget.posZ); - boolean flag = parentAI.getBatKing().getEntitySenses().canSee(parentAI.mEntityTarget); - - if (flag) { - ++this.mCooldownTime; - } else { - this.mCooldownTime = 0; - } - - if (d0 <= (double) this.field_82642_h && this.mCooldownTime >= 20) { - parentAI.getBatKing().getNavigator().clearPathEntity(); - } else { - if (parentAI.getBatKing().getNavigator().tryMoveToEntityLiving(parentAI.mEntityTarget, this.entityMoveSpeed)) { - Logger.INFO("Doing Ranged Ai Task."); - } - else { - Logger.INFO("Not Doing Ranged Ai Task."); - } - } - - parentAI.getBatKing().getLookHelper().setLookPositionWithEntity(parentAI.mEntityTarget, 30.0F, 30.0F); - float f; - Logger.INFO("Ranged AI - "+rangedAttackTime); - - if (--this.rangedAttackTime == 0) { - if (d0 > (double) this.field_82642_h || !flag) { - Logger.INFO("Stopping ranged attack. "+flag+"|"+(d0 > (double) this.field_82642_h)+"|"+d0+"|"+(double) this.field_82642_h); - return; - } - - f = MathHelper.sqrt_double(d0) / this.field_96562_i; - float f1 = f; - - if (f < 0.1F) { - f1 = 0.1F; - } - - if (f1 > 1.0F) { - f1 = 1.0F; - } - Logger.INFO("Trying to do a ranged attack."); - parentAI.getBatKingAsIRangedAttackMob().attackEntityWithRangedAttack(parentAI.mEntityTarget, f1); - this.rangedAttackTime = MathHelper.floor_float( - f * (float) (this.maxRangedAttackTime - this.field_96561_g) + (float) this.field_96561_g); - } else if (this.rangedAttackTime < 0) { - f = MathHelper.sqrt_double(d0) / this.field_96562_i; - this.rangedAttackTime = MathHelper.floor_float( - f * (float) (this.maxRangedAttackTime - this.field_96561_g) + (float) this.field_96561_g); - } - } - - } - - private class Melee { - - private final EntityAIBatKingAttack parentAI; - - /** - * An amount of decrementing ticks that allows the entity to attack once the - * tick reaches 0. - */ - int attackTick; - /** The speed with which the mob will approach the target */ - double speedTowardsTarget; - /** - * When true, the mob will continue chasing its target, even if it can't find a - * path to them right now. - */ - boolean longMemory; - Class classTarget; - private int field_75445_i; - private double field_151497_i; - private double field_151495_j; - private double field_151496_k; - - private int failedPathFindingPenalty; - - public Melee(EntityAIBatKingAttack aParent, Class aClassTarget, - double aMoveToTargetSpeed, boolean aLongMemory) { - this.parentAI = aParent; - this.classTarget = aClassTarget; - this.speedTowardsTarget = aMoveToTargetSpeed; - this.longMemory = aLongMemory; - parentAI.setMutexBits(3); - } - - /** - * Returns whether the EntityAIBase should begin execution. - */ - public boolean shouldExecute() { - if (!parentAI.hasValidTarget()) { - return false; - } - EntityLivingBase entitylivingbase = parentAI.getTarget(); - - if (entitylivingbase == null) { - return false; - } else if (!entitylivingbase.isEntityAlive()) { - return false; - } else if (this.classTarget != null && !this.classTarget.isAssignableFrom(entitylivingbase.getClass())) { - return false; - } else { - if (--this.field_75445_i <= 0) { - parentAI.mEntityPathEntity = parentAI.mAttackingEntity.getNavigator().getPathToEntityLiving(entitylivingbase); - this.field_75445_i = 4 + parentAI.mAttackingEntity.getRNG().nextInt(7); - return parentAI.mEntityPathEntity != null; - } else { - return true; - } - } - } - - /** - * Returns whether an in-progress EntityAIBase should continue executing - */ - public boolean continueExecuting() { - EntityLivingBase entitylivingbase = parentAI.mAttackingEntity.getAttackTarget(); - return entitylivingbase == null ? false - : (!entitylivingbase.isEntityAlive() ? false - : (!this.longMemory ? !parentAI.mAttackingEntity.getNavigator().noPath() - : parentAI.mAttackingEntity.isWithinHomeDistance(MathHelper.floor_double(entitylivingbase.posX), - MathHelper.floor_double(entitylivingbase.posY), - MathHelper.floor_double(entitylivingbase.posZ)))); - } - - /** - * Execute a one shot task or start executing a continuous task - */ - public void startExecuting() { - parentAI.mAttackingEntity.getNavigator().setPath(parentAI.mEntityPathEntity, this.speedTowardsTarget); - this.field_75445_i = 0; - } - - /** - * Resets the task - */ - public void resetTask() { - parentAI.mAttackingEntity.getNavigator().clearPathEntity(); - } - - /** - * Updates the task - */ - public void updateTask() { - EntityLivingBase entitylivingbase = parentAI.mAttackingEntity.getAttackTarget(); - parentAI.mAttackingEntity.getLookHelper().setLookPositionWithEntity(entitylivingbase, 30.0F, 30.0F); - double d0 = parentAI.mAttackingEntity.getDistanceSq(entitylivingbase.posX, entitylivingbase.boundingBox.minY, - entitylivingbase.posZ); - double d1 = (double) (parentAI.mAttackingEntity.width * 2.0F * parentAI.mAttackingEntity.width * 2.0F + entitylivingbase.width); - --this.field_75445_i; - - if ((this.longMemory || parentAI.mAttackingEntity.getEntitySenses().canSee(entitylivingbase)) && this.field_75445_i <= 0 - && (this.field_151497_i == 0.0D && this.field_151495_j == 0.0D && this.field_151496_k == 0.0D - || entitylivingbase.getDistanceSq(this.field_151497_i, this.field_151495_j, - this.field_151496_k) >= 1.0D - || parentAI.mAttackingEntity.getRNG().nextFloat() < 0.05F)) { - this.field_151497_i = entitylivingbase.posX; - this.field_151495_j = entitylivingbase.boundingBox.minY; - this.field_151496_k = entitylivingbase.posZ; - this.field_75445_i = failedPathFindingPenalty + 4 + parentAI.mAttackingEntity.getRNG().nextInt(7); - - if (parentAI.mAttackingEntity.getNavigator().getPath() != null) { - PathPoint finalPathPoint = parentAI.mAttackingEntity.getNavigator().getPath().getFinalPathPoint(); - if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, - finalPathPoint.yCoord, finalPathPoint.zCoord) < 1) { - failedPathFindingPenalty = 0; - } else { - failedPathFindingPenalty += 10; - } - } else { - failedPathFindingPenalty += 10; - } - - if (d0 > 1024.0D) { - this.field_75445_i += 10; - } else if (d0 > 256.0D) { - this.field_75445_i += 5; - } - - if (!parentAI.mAttackingEntity.getNavigator().tryMoveToEntityLiving(entitylivingbase, this.speedTowardsTarget)) { - this.field_75445_i += 15; - } - } - - this.attackTick = Math.max(this.attackTick - 1, 0); - - if (d0 <= d1 && this.attackTick <= 20) { - this.attackTick = 20; - - if (parentAI.mAttackingEntity.getHeldItem() != null) { - parentAI.mAttackingEntity.swingItem(); - } - - parentAI.mAttackingEntity.attackEntityAsMob(entitylivingbase); - } - } - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java b/src/Java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java deleted file mode 100644 index 8e0b1b48ce..0000000000 --- a/src/Java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java +++ /dev/null @@ -1,117 +0,0 @@ -package gtPlusPlus.core.entity.item; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; - -public class ItemEntityGiantEgg extends EntityItem { - - /** - * The maximum age of this Chicken Egg. The item will try hatch once this is reached. - */ - public int mEggAge = 10000; - public int mEggSize = -1; - - public ItemEntityGiantEgg(World aWorld) { - super(aWorld); - } - - public ItemEntityGiantEgg(World aWorld, double aX, double aY, double aZ) { - super(aWorld, aX, aY, aZ); - } - - public ItemEntityGiantEgg(World aWorld, double aX, double aY, double aZ, ItemStack aStack) { - super(aWorld, aX, aY, aZ, aStack); - } - - private boolean spawnGiantChicken() { - try { - EntityGiantChickenBase entitychicken = new EntityGiantChickenBase(this.worldObj); - entitychicken.setGrowingAge(-MathUtils.randInt(20000, 40000)); - entitychicken.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); - return this.worldObj.spawnEntityInWorld(entitychicken); - } - catch (Throwable t) { - return false; - } - } - - //These eggs also do not combine. - @Override - public boolean combineItems(EntityItem p_70289_1_) { - return false; - } - - @Override - public void writeEntityToNBT(NBTTagCompound aNBT) { - super.writeEntityToNBT(aNBT); - aNBT.setInteger("mEggAge", mEggAge); - aNBT.setInteger("mTicksExisted", this.age); - } - - @Override - public void readEntityFromNBT(NBTTagCompound aNBT) { - super.readEntityFromNBT(aNBT); - mEggAge = aNBT.getInteger("mEggAge"); - } - - //They're fireproof - @Override - public void setFire(int p_70015_1_) { - } - - @Override - public boolean isBurning() { - return false; - } - - @Override - public void onEntityUpdate() { - super.onEntityUpdate(); - Logger.INFO("1"); - //Large eggs don't despawn, because they will try hatch first. - if (this.lifespan != Integer.MAX_VALUE-1) { - this.lifespan = Integer.MAX_VALUE-1; - } - - if (this.getEntityItem() != null) { - ItemStack g = this.getEntityItem(); - NBTUtils.setInteger(g, "mTicksExisted", this.age); - NBTUtils.setInteger(g, "lifespan", this.lifespan); - NBTUtils.setBoolean(g, "playerHeld", false); - this.setEntityItemStack(g); - Logger.INFO("Writing age to NBT of stored stack item."); - } - else { - ItemStack g = ItemUtils.getSimpleStack(ModItems.itemBigEgg); - NBTUtils.setInteger(g, "mTicksExisted", this.age); - NBTUtils.setInteger(g, "lifespan", this.lifespan); - NBTUtils.setBoolean(g, "playerHeld", false); - this.setEntityItemStack(g); - Logger.INFO("Writing age to NBT of new stack item."); - - } - - if (this.age >= 1000) { - //Cache the value for efficiency - if (mEggSize == -1) - mEggSize = (this.getEntityItem() != null ? (this.getEntityItem().hasTagCompound() ? (this.getEntityItem().getTagCompound().hasKey("size") ? this.getEntityItem().getTagCompound().getInteger("size") : 1) : 1) : 1); - if (MathUtils.randInt(100*mEggSize, 1000) >= MathUtils.randInt(950, 1000)) { - //Spawn Chicken - if (spawnGiantChicken()) { - this.kill(); - } - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java b/src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java deleted file mode 100644 index 55e0f4c571..0000000000 --- a/src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java +++ /dev/null @@ -1,712 +0,0 @@ -package gtPlusPlus.core.entity.monster; - -import java.lang.reflect.Field; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.entity.ai.batking.EntityAIBatKingAttack; -import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.entity.IRangedAttackMob; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.EntityAIAttackOnCollide; -import net.minecraft.entity.ai.EntityAIHurtByTarget; -import net.minecraft.entity.ai.EntityAINearestAttackableTarget; -import net.minecraft.entity.ai.EntityAIWander; -import net.minecraft.entity.ai.RandomPositionGenerator; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.entity.projectile.EntityLargeFireball; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.World; - -public class EntityBatKing extends EntityMob implements IRangedAttackMob { - - public int courseChangeCooldown; - public double waypointX; - public double waypointY; - public double waypointZ; - private Entity targetedEntity; - private int aggroCooldown; - public int prevAttackCounter; - public int attackCounter; - private int explosionStrength = 1; - - private EntityAIBatKingAttack aiAttack = new EntityAIBatKingAttack(this, null, 1.0D, 20, 60, 15.0F, true); - private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, - false); - - public EntityBatKing(World p_i1680_1_) { - super(p_i1680_1_); - this.setSize(2.5F, 1.5F); - - this.setIsBatHanging(false); - this.isImmuneToFire = true; - this.experienceValue = 1000; - - this.tasks.addTask(3, this.aiAttack); - //this.tasks.addTask(4, this.aiAttackOnCollide); - //this.tasks.addTask(4, new EntityAIRestrictSun(this)); - //this.tasks.addTask(5, new EntityAIFleeSun(this, 1.0D)); - this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); - //this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); - //this.tasks.addTask(6, new EntityAILookIdle(this)); - - this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); - //this.targetTasks.addTask(2, this.aiAttack); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); - this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityBat.class, 0, false)); - - } - - protected void entityInit() { - super.entityInit(); - } - - /** - * Get this Entity's EnumCreatureAttribute - */ - public EnumCreatureAttribute getCreatureAttribute() { - return EnumCreatureAttribute.UNDEAD; - } - - /** - * Gets the pitch of living sounds in living entities. - */ - protected float getSoundPitch() { - return super.getSoundPitch() * 0.15F; - } - - /** - * Returns the sound this mob makes while it's alive. - */ - protected String getLivingSound() { - int aRand = MathUtils.randInt(0, 10); - if (aRand < 6) { - return null; - } else if (aRand <= 8) { - return "mob.bat.idle"; - } else { - 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.bat.death"; - } - - /** - * Returns true if this entity should push and be pushed by other entities when - * colliding. - */ - public boolean canBePushed() { - return true; - } - - protected void collideWithEntity(Entity aEntity) { - if (aEntity != null) { - if (aEntity instanceof EntityPlayer) { - EntityUtils.doDamage(aEntity, DamageSource.magic, (int) (((EntityPlayer) aEntity).getHealth() / 20)); - } - } - } - - protected void collideWithNearbyEntities() { - } - - protected void applyEntityAttributes() { - - this.getAttributeMap().registerAttribute(SharedMonsterAttributes.maxHealth); - this.getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage); - this.getAttributeMap().registerAttribute(SharedMonsterAttributes.knockbackResistance); - this.getAttributeMap().registerAttribute(SharedMonsterAttributes.movementSpeed); - this.getAttributeMap().registerAttribute(SharedMonsterAttributes.followRange); - - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(250.0D); - this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(6.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D); - this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(120.0D); - } - - public boolean getIsBatHanging() { - return false; - } - - public void setIsBatHanging(boolean p_82236_1_) { - generateParticles(this); - generateParticles(this); - generateParticles(this); - for (int i = 0; i < 32; ++i) { - // - String particleName = "lava"; - if (MathUtils.randInt(0, 3) <= 2) { - particleName = "crit"; - } - this.worldObj.spawnParticle(particleName, - this.posX + (this.rand.nextDouble() - 0.5D) * (double) this.width, - this.posY + this.rand.nextDouble() * (double) this.height, - this.posZ + (this.rand.nextDouble() - 0.5D) * (double) this.width, 0.0D, 0.0D, 0.0D); - } - - } - - /** - * Returns true if the newer Entity AI code should be run - */ - protected boolean isAIEnabled() { - return true; - } - - /** - * Called to update the entity's position/logic. - */ - public void onUpdate() { - super.onUpdate(); - generateParticles(this); - - if (!this.worldObj.isRemote && (this.targetedEntity == null || this.aggroCooldown-- <= 0)) { - this.targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 100.0D); - - if (this.targetedEntity != null) { - this.aggroCooldown = 30; - if (aiAttack.hasValidTarget()) { - this.setAttackTarget(aiAttack.getTarget()); - } - else { - Logger.INFO("No valid target."); - if (ReflectionUtils.doesFieldExist(aiAttack.getClass(), "mEntityTarget")) { - Logger.INFO("Found field."); - } - else { - Logger.INFO("Did not find field."); - } - Field target = ReflectionUtils.getField(EntityAIBatKingAttack.class, "mEntityTarget"); - if (target != null) { - ReflectionUtils.setField(aiAttack, target, this.targetedEntity); - Logger.INFO("Set target."); - } - else { - Logger.INFO("Could not set via reflection."); - } - - - } - } - else { - Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this, 32, 20); - if (vec3 != null) { - double xPosition = vec3.xCoord; - double yPosition = vec3.yCoord; - double zPosition = vec3.zCoord; - this.getNavigator().tryMoveToXYZ(xPosition, yPosition, zPosition, 3); - } - } - } - - } - - private static void generateParticles(EntityBatKing aKing) { - for (int i = 0; i < 20; ++i) { - // - if (MathUtils.randInt(0, 50) <= 1) { - String particleName = "smoke"; - if (MathUtils.randInt(0, 3) <= 2) { - particleName = "largesmoke"; - } - aKing.worldObj.spawnParticle(particleName, - aKing.posX + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, - aKing.posY + aKing.rand.nextDouble() * (double) aKing.height, - aKing.posZ + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, 0.0D, 0.0D, 0.0D); - } - if (MathUtils.randInt(0, 100) <= 1) { - String particleName = "smoke"; - int test2 = MathUtils.randInt(0, 3); - if (test2 == 2) { - particleName = "dripLava"; - } else if (test2 == 3) { - particleName = "portal"; - } - aKing.worldObj.spawnParticle(particleName, - aKing.posX + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, - aKing.posY + aKing.rand.nextDouble() * (double) aKing.height, - aKing.posZ + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, 0.0D, 0.0D, 0.0D); - } - } - } - - protected void updateAITasks() { - super.updateAITasks(); - } - - private boolean isFlying() { - if (this.onGround) { - return false; - } - return true; - } - - private boolean hasAir() { - BlockPos p = EntityUtils.findBlockPosUnderEntity(this); - int y = p.yPos; - int yOriginal = p.yPos; - - for (int u = 0; u<5;u++) { - if (u > 50 || y <= 0) { - break; - } - if (!this.worldObj.isAirBlock(p.xPos, y, p.zPos)) { - break; - } - y--; - } - if (yOriginal != y) { - for (int i = 0; i < y; y++) { - this.jump(); - } - return true; - } - return false; - } - - /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk - * on. used for spiders and wolves to prevent them from trampling crops - */ - protected boolean canTriggerWalking() { - return false; - } - - /** - * Return whether this entity should NOT trigger a pressure plate or a tripwire. - */ - public boolean doesEntityNotTriggerPressurePlate() { - return true; - } - - /** - * Called when the entity is attacked. - */ - public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { - if (this.isEntityInvulnerable()) { - return false; - } else { - if (!this.worldObj.isRemote && this.getIsBatHanging()) { - this.setIsBatHanging(false); - } - - return super.attackEntityFrom(p_70097_1_, p_70097_2_); - } - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound p_70037_1_) { - super.readEntityFromNBT(p_70037_1_); - if (p_70037_1_.hasKey("ExplosionPower", 99)) { - this.explosionStrength = p_70037_1_.getInteger("ExplosionPower"); - } - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound p_70014_1_) { - super.writeEntityToNBT(p_70014_1_); - p_70014_1_.setInteger("ExplosionPower", this.explosionStrength); - } - - /** - * Attack the specified entity using a ranged attack. - */ - @Override - public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { - Logger.INFO("Trying to do ranged attack 1 |"+(this.targetedEntity != null)+"|"); - - if (!this.isFlying() || !this.isAirBorne) { - //this.hasAir(); - /* - * for (int i=0;i<3;i++) { this.jump(); } - */ - } - - - double d4 = 64.0D; - if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4 * 8) { - Logger.INFO("Trying to do ranged attack 2"); - 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; - - ++this.attackCounter; - - if (this.canEntityBeSeen(this.targetedEntity)) { - Logger.INFO("Trying to do ranged attack 3a | "+attackCounter); - - - if (this.attackCounter >= 2) { - Logger.INFO("Trying to do ranged attack 3a1"); - - this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY, - (int) this.posZ, 0); - setIsBatHanging(true); - - EntityThrowableBomb entitylargefireball = new EntityThrowableBomb(this.worldObj, this/*d5, d6, d7*/); - //entitylargefireball.field_92057_e = this.explosionStrength; - //entitylargefireball.accelerationX *= 2; - //entitylargefireball.accelerationY *= 2; - //entitylargefireball.accelerationZ *= 2; - double d8 = 4.0D; - Vec3 vec3 = this.getLook(1.0F); - entitylargefireball.posX = this.posX + vec3.xCoord * d8; - entitylargefireball.posY = this.posY + (double) (this.height / 2.0F) + 0.5D; - entitylargefireball.posZ = this.posZ + vec3.zCoord * d8; - this.worldObj.spawnEntityInWorld(entitylargefireball); - - for (int u=0; u 0) { - Logger.INFO("Trying to do ranged attack 5a"); - --this.attackCounter; - EntityArrow entityarrow = new EntityArrow(this.worldObj, this, p_82196_1_, MathUtils.randFloat(1f, 3f), - (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); - int i = MathUtils.randInt(0, 4); - int j = MathUtils.randInt(0, 3); - int k = MathUtils.randInt(0, 3); - entityarrow.setDamage((double) (p_82196_2_ * 2.0F) + this.rand.nextGaussian() * 0.25D - + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); - - boolean boostAttack = MathUtils.randInt(0, 100) <= 21; - if (boostAttack) { - if (i > 0) { - entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D); - } - - if (j > 0) { - entityarrow.setKnockbackStrength(j); - } - if (k > 0) { - entityarrow.setFire(50 * k); - } - } - - this.playSound("mob.skeleton.say", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); - this.worldObj.spawnEntityInWorld(entityarrow); - Logger.INFO("Trying to do ranged attack 5a done"); - } - } - - - - - this.attackCounter = 0; - } - } else if (this.attackCounter > 0) { - Logger.INFO("Trying to do ranged attack 3b"); - --this.attackCounter; - } - } else { - Logger.INFO("Trying to do ranged attack 4a"); - this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(this.motionX, this.motionZ)) * 180.0F - / (float) Math.PI; - - if (this.attackCounter > 0) { - Logger.INFO("Trying to do ranged attack 5a"); - --this.attackCounter; - EntityArrow entityarrow = new EntityArrow(this.worldObj, this, p_82196_1_, 1.6F, - (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); - int i = MathUtils.randInt(0, 4); - int j = MathUtils.randInt(0, 3); - int k = MathUtils.randInt(0, 3); - entityarrow.setDamage((double) (p_82196_2_ * 2.0F) + this.rand.nextGaussian() * 0.25D - + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); - - boolean boostAttack = MathUtils.randInt(0, 100) <= 21; - if (boostAttack) { - if (i > 0) { - entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D); - } - - if (j > 0) { - entityarrow.setKnockbackStrength(j); - } - if (k > 0) { - entityarrow.setFire(50 * k); - } - } - - this.playSound("mob.skeleton.say", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); - this.worldObj.spawnEntityInWorld(entityarrow); - Logger.INFO("Trying to do ranged attack 5a done"); - } - - } - - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() { - return 10.0F; - } - - /** - * Checks if the entity's current position is a valid location to spawn this - * entity. - */ - public boolean getCanSpawnHere() { - return super.getCanSpawnHere() && this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL; - } - - /** - * Will return how many at most can spawn in a chunk at once. - */ - public int getMaxSpawnedInChunk() { - return 1; - } - - protected Item getDropItem() { - return Items.gunpowder; - } - - /** - * Drop 0-2 items of this living's type. @param par1 - Whether this entity has - * recently been hit by a player. @param par2 - Level of Looting used to kill - * this mob. - */ - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { - int j = this.rand.nextInt(2) + this.rand.nextInt(1 + p_70628_2_); - int k; - - for (k = 0; k < j; ++k) { - this.dropItem(Items.ghast_tear, 1); - } - - j = this.rand.nextInt(3) + this.rand.nextInt(1 + p_70628_2_); - - for (k = 0; k < j; ++k) { - this.dropItem(Items.gunpowder, 1); - } - } - - @Override - protected void updateEntityActionState() { - if (!this.worldObj.isRemote && this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL) { - this.setDead(); - } - - this.despawnEntity(); - 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; - this.waypointY = this.posY; - this.waypointZ = this.posZ; - } - } - - if (this.targetedEntity != null && this.targetedEntity.isDead) { - this.targetedEntity = null; - } - - if (this.targetedEntity == null || this.aggroCooldown-- <= 0) { - this.targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(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.canEntityBeSeen(this.targetedEntity)) { - if (this.attackCounter == 10) { - this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1007, (int) this.posX, (int) this.posY, - (int) this.posZ, 0); - } - - ++this.attackCounter; - - if (this.attackCounter == 20) { - this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY, - (int) this.posZ, 0); - EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.worldObj, this, d5, d6, d7); - entitylargefireball.field_92057_e = this.explosionStrength; - double d8 = 4.0D; - Vec3 vec3 = this.getLook(1.0F); - entitylargefireball.posX = this.posX + vec3.xCoord * d8; - entitylargefireball.posY = this.posY + (double) (this.height / 2.0F) + 0.5D; - entitylargefireball.posZ = this.posZ + vec3.zCoord * d8; - this.worldObj.spawnEntityInWorld(entitylargefireball); - this.attackCounter = -40; - } - } else if (this.attackCounter > 0) { - --this.attackCounter; - } - } else { - this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(this.motionX, this.motionZ)) * 180.0F - / (float) Math.PI; - - if (this.attackCounter > 0) { - --this.attackCounter; - } - } - - if (!this.worldObj.isRemote) { - byte b1 = this.dataWatcher.getWatchableObjectByte(16); - byte b0 = (byte) (this.attackCounter > 10 ? 1 : 0); - - if (b1 != b0) { - this.dataWatcher.updateObject(16, Byte.valueOf(b0)); - } - } - } - - /** - * True if the ghast has an unobstructed line of travel to the waypoint. - */ - private boolean isCourseTraversable(double p_70790_1_, double p_70790_3_, double p_70790_5_, double p_70790_7_) { - double d4 = (this.waypointX - this.posX) / p_70790_7_; - double d5 = (this.waypointY - this.posY) / p_70790_7_; - double d6 = (this.waypointZ - this.posZ) / p_70790_7_; - AxisAlignedBB axisalignedbb = this.boundingBox.copy(); - - for (int i = 1; (double) i < p_70790_7_; ++i) { - axisalignedbb.offset(d4, d5, d6); - - /* - * if (!this.worldObj.getCollidingBoundingBoxes(this, axisalignedbb).isEmpty()) - * { return false; } - */ - } - - return true; - } - - /** - * Called when the mob is falling. Calculates and applies fall damage. - */ - protected void fall(float p_70069_1_) { - } - - /** - * Takes in the distance the entity has fallen this tick and whether its on the - * ground to update the fall distance and deal fall damage if landing on the - * ground. Args: distanceFallenThisTick, onGround - */ - protected void updateFallState(double p_70064_1_, boolean p_70064_3_) { - } - - /** - * Moves the entity based on the specified heading. Args: strafe, forward - */ - public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) { - if (this.isInWater()) { - 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()) { - 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 { - float f2 = 0.91F; - - if (this.onGround) { - f2 = this.worldObj.getBlock(MathHelper.floor_double(this.posX), - MathHelper.floor_double(this.boundingBox.minY) - 1, - MathHelper.floor_double(this.posZ)).slipperiness * 0.91F; - } - - float f3 = 0.16277136F / (f2 * f2 * f2); - this.moveFlying(p_70612_1_, p_70612_2_, this.onGround ? 0.1F * f3 : 0.02F); - f2 = 0.91F; - - if (this.onGround) { - f2 = this.worldObj.getBlock(MathHelper.floor_double(this.posX), - MathHelper.floor_double(this.boundingBox.minY) - 1, - MathHelper.floor_double(this.posZ)).slipperiness * 0.91F; - } - - this.moveEntity(this.motionX, this.motionY, this.motionZ); - 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; - } - - /** - * returns true if this entity is by a ladder, false otherwise - */ - public boolean isOnLadder() { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java b/src/Java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java deleted file mode 100644 index 3a094e129b..0000000000 --- a/src/Java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java +++ /dev/null @@ -1,311 +0,0 @@ -package gtPlusPlus.core.entity.monster; - -import net.minecraft.entity.*; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.general.ItemGemShards; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraftforge.common.ForgeHooks; - -public class EntityGiantChickenBase extends EntityChicken { - - /** The time until the next egg is spawned. */ - public int timeUntilNextBigEgg; - - public EntityGiantChickenBase(World aWorld) - { - super(aWorld); - this.setSize(0.6F, 1.4F); //Double - this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; - this.timeUntilNextBigEgg = this.rand.nextInt(16000) + 4000; - this.tasks.addTask(0, new EntityAISwimming(this)); - this.tasks.addTask(1, new EntityAIPanic(this, 1.4D)); - this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); - this.tasks.addTask(3, new EntityAITempt(this, 1.0D, ModItems.itemGemShards, false)); - this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D)); - this.tasks.addTask(4, new EntityAIEatGrass(this)); - this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); - this.tasks.addTask(5, new EntityAILookIdle(this)); - this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - - } - - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35D); - } - - /** - * 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(); - this.field_70888_h = this.field_70886_e; - this.field_70884_g = this.destPos; - this.destPos = (float)((double)this.destPos + (double)(this.onGround ? -1 : 4) * 0.3D); - - if (this.destPos < 0.0F) - { - this.destPos = 0.0F; - } - - if (this.destPos > 1.0F) - { - this.destPos = 1.0F; - } - - if (!this.onGround && this.field_70889_i < 1.0F) - { - this.field_70889_i = 1.0F; - } - - this.field_70889_i = (float)((double)this.field_70889_i * 0.9D); - - if (!this.onGround && this.motionY < 0.0D) - { - this.motionY *= 0.6D; - } - - if (MathUtils.randInt(0, 10000) <= 5) { - jump(); - } - - this.field_70886_e += this.field_70889_i * 2.0F; - - if (!this.worldObj.isRemote && --this.timeUntilNextEgg <= 0) - { - this.playSound("mob.chicken.plop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); - this.dropItem(Items.egg, 1); - this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; - } - if (!this.worldObj.isRemote && !this.isChild() && --this.timeUntilNextEgg <= 0) - { - this.playSound("mob.chicken.plop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); - this.dropItem(ModItems.itemBigEgg, MathUtils.randInt(1, 4)); - this.timeUntilNextBigEgg = this.rand.nextInt(16000) + 4000; - } - } - - /** - * Called when the mob is falling. Calculates and applies fall damage. - */ - protected void fall(float p_70069_1_) { - - if (MathUtils.randInt(0, 10) <= 5) { - jump(); - } - - } - - protected Item getDropItem() - { - return ModItems.itemBigEgg; - } - - /** - * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param - * par2 - Level of Looting used to kill this mob. - */ - protected void dropFewItems(boolean recentHit, int lootLevel) - { - int j = this.rand.nextInt(3) + this.rand.nextInt(1 + lootLevel); - - for (int k = 0; k < j; ++k) - { - this.dropItem(Items.feather, 1); - } - - //Large Egg Chance - for (int k = 0; k < j*2; ++k) - { - this.dropItem(ModItems.itemBigEgg, MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2})); - } - - //Chicken Corpses Dropped - int mBodies = MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6}); - if (this.isBurning()) - { - this.dropItem(Items.cooked_chicken, mBodies); - } - else - { - this.dropItem(Items.chicken, mBodies); - } - } - - public EntityGiantChickenBase createChild(EntityAgeable p_90011_1_) - { - return new EntityGiantChickenBase(this.worldObj); - } - - /** - * 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 aStack) - { - return aStack != null && aStack.getItem() instanceof ItemGemShards; - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - public void readEntityFromNBT(NBTTagCompound aNBT) - { - super.readEntityFromNBT(aNBT); - timeUntilNextBigEgg = aNBT.getInteger("timeUntilNextBigEgg"); - } - - /** - * Get the experience points the entity currently has. - */ - protected int getExperiencePoints(EntityPlayer p_70693_1_) - { - return this.isChickenJockey() ? 20 : super.getExperiencePoints(p_70693_1_); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - public void writeEntityToNBT(NBTTagCompound aNBT) - { - super.writeEntityToNBT(aNBT); - aNBT.setInteger("timeUntilNextBigEgg", timeUntilNextBigEgg); - } - - /** - * Determines if an entity can be despawned, used on idle far away entities - */ - protected boolean canDespawn() - { - return this.isChickenJockey() && this.riddenByEntity == null; - } - - public void updateRiderPosition() - { - super.updateRiderPosition(); - float f = MathHelper.sin(this.renderYawOffset * (float)Math.PI / 180.0F); - float f1 = MathHelper.cos(this.renderYawOffset * (float)Math.PI / 180.0F); - float f2 = 0.1F; - float f3 = 0.0F; - this.riddenByEntity.setPosition(this.posX + (double)(f2 * f), this.posY + (double)(this.height * 0.5F) + this.riddenByEntity.getYOffset() + (double)f3, this.posZ - (double)(f2 * f1)); - - if (this.riddenByEntity instanceof EntityLivingBase) - { - ((EntityLivingBase)this.riddenByEntity).renderYawOffset = this.renderYawOffset; - } - } - - public boolean isChickenJockey() { - return func_152116_bZ(); - } - public void setIsChickenJockey(boolean isJockey) { - func_152117_i(isJockey); - } - - @Override - protected Entity findPlayerToAttack() { - // TODO Auto-generated method stub - return super.findPlayerToAttack(); - } - - @Override - public boolean interact(EntityPlayer p_70085_1_) { - // TODO Auto-generated method stub - return super.interact(p_70085_1_); - } - - @Override - public void setHomeArea(int p_110171_1_, int p_110171_2_, int p_110171_3_, int p_110171_4_) { - // TODO Auto-generated method stub - super.setHomeArea(p_110171_1_, p_110171_2_, p_110171_3_, p_110171_4_); - } - - @Override - public ChunkCoordinates getHomePosition() { - // TODO Auto-generated method stub - return super.getHomePosition(); - } - - @Override - public void detachHome() { - // TODO Auto-generated method stub - super.detachHome(); - } - - @Override - public boolean hasHome() { - // TODO Auto-generated method stub - return super.hasHome(); - } - - @Override - public void eatGrassBonus() { - if (this.isChild()) { - this.addGrowth(60); - } - } - - @Override - public float getRenderSizeModifier() { - return 1.0f; - } - - @Override - protected void jump() { - this.motionY = 0.68999998688697815D; - this.motionY += 0.068999998688697815D; - if (this.isPotionActive(Potion.jump)) - { - this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.5F); - } - - if (this.isSprinting()) - { - float f = this.rotationYaw * 0.017453292F; - this.motionX -= (double)(MathHelper.sin(f) * 0.2F); - this.motionZ += (double)(MathHelper.cos(f) * 0.2F); - } - - this.isAirBorne = true; - - if (MathUtils.randInt(0, 10) < 10) { - jump(); - } - - ForgeHooks.onLivingJump(this); - } - - @Override - public void onStruckByLightning(EntityLightningBolt p_70077_1_) { - this.spawnExplosionParticle(); - this.spawnExplosionParticle(); - this.spawnExplosionParticle(); - this.spawnExplosionParticle(); - this.spawnExplosionParticle(); - this.spawnExplosionParticle(); - this.spawnExplosionParticle(); - super.onStruckByLightning(p_70077_1_); - } - - @Override - public boolean shouldDismountInWater(Entity rider) { - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java b/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java deleted file mode 100644 index a530f294e1..0000000000 --- a/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java +++ /dev/null @@ -1,225 +0,0 @@ -package gtPlusPlus.core.entity.monster; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; - -public class EntitySickBlaze extends EntityMob { - /** Random offset used in floating behaviour */ - private float heightOffset = 0.5F; - /** ticks until heightOffset is randomized */ - private int heightOffsetUpdateTime; - private int field_70846_g; - private final int mDataWatcherID = 30; - - public EntitySickBlaze(World p_i1731_1_) { - super(p_i1731_1_); - this.isImmuneToFire = true; - this.experienceValue = 10; - } - - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.5D); - this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(6.0D); - } - - @Override - protected void entityInit() { - super.entityInit(); - this.dataWatcher.addObject(mDataWatcherID, new Byte((byte) 0)); - } - - /** - * Returns the sound this mob makes while it's alive. - */ - @Override - protected String getLivingSound() { - return "mob.blaze.breathe"; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - @Override - protected String getHurtSound() { - return "mob.blaze.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - @Override - protected String getDeathSound() { - return "mob.blaze.death"; - } - - @Override - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) { - return 15728880; - } - - /** - * Gets how bright this entity is. - */ - @Override - public float getBrightness(float p_70013_1_) { - return p_70013_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. - */ - @Override - public void onLivingUpdate() { - if (!this.worldObj.isRemote) { - if (this.isWet()) { - this.attackEntityFrom(DamageSource.drown, 1.0F); - } - - --this.heightOffsetUpdateTime; - - if (this.heightOffsetUpdateTime <= 0) { - this.heightOffsetUpdateTime = 100; - this.heightOffset = 0.5F + (float) this.rand.nextGaussian() * 3.0F; - } - - if (this.getEntityToAttack() != null && this.getEntityToAttack().posY - + this.getEntityToAttack().getEyeHeight() > this.posY + this.getEyeHeight() + this.heightOffset) { - this.motionY += (0.30000001192092896D - this.motionY) * 0.30000001192092896D; - } - } - - if (this.rand.nextInt(24) == 0) { - /*this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.fire", - 1.0F + this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F);*/ - } - - if (!this.onGround && this.motionY < 0.0D) { - this.motionY *= 0.6D; - } - - for (int i = 0; i < 2; ++i) { - this.worldObj.spawnParticle("crit", this.posX + (this.rand.nextDouble() - 0.5D) * this.width, - this.posY + this.rand.nextDouble() * this.height, - this.posZ + (this.rand.nextDouble() - 0.5D) * this.width, 0.0D, 0.0D, 0.0D); - } - - super.onLivingUpdate(); - } - - /** - * Basic mob attack. Default to touch of death in EntityCreature. Overridden - * by each mob to define their attack. - */ - @Override - protected void attackEntity(Entity entity, float p_70785_2_) { - if (this.attackTime <= 0 && p_70785_2_ < 2.0F && entity.boundingBox.maxY > this.boundingBox.minY - && entity.boundingBox.minY < this.boundingBox.maxY) { - this.attackTime = 20; - this.attackEntityAsMob(entity); - } - else if (p_70785_2_ < 30.0F) { - double d0 = entity.posX - this.posX; - double d1 = entity.boundingBox.minY + entity.height / 2.0F - (this.posY + this.height / 2.0F); - double d2 = entity.posZ - this.posZ; - - if (this.attackTime == 0) { - ++this.field_70846_g; - - if (this.field_70846_g == 1) { - this.attackTime = 60; - } - else if (this.field_70846_g <= 4) { - this.attackTime = 6; - } - else { - this.attackTime = 100; - this.field_70846_g = 0; - } - - if (this.field_70846_g > 1) { - float f1 = MathHelper.sqrt_float(p_70785_2_) * 0.5F; - this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) this.posX, (int) this.posY, - (int) this.posZ, 0); - - for (int i = 0; i < 1; ++i) { - EntityToxinballSmall entitysmalltoxinball = new EntityToxinballSmall(this.worldObj, this, - d0 + this.rand.nextGaussian() * f1, d1, d2 + this.rand.nextGaussian() * f1); - entitysmalltoxinball.posY = this.posY + this.height / 2.0F + 0.5D; - this.worldObj.spawnEntityInWorld(entitysmalltoxinball); - } - } - } - - this.rotationYaw = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - this.hasAttacked = true; - } - } - - /** - * Called when the mob is falling. Calculates and applies fall damage. - */ - @Override - protected void fall(float p_70069_1_) { - } - - @Override - protected Item getDropItem() { - return Items.slime_ball; - } - - /** - * Returns true if the entity is on fire. Used by render to add the fire - * effect on rendering. - */ - @Override - public boolean isBurning() { - return false; - } - - /** - * Drop 0-2 items of this living's type. @param par1 - Whether this entity - * has recently been hit by a player. @param par2 - Level of Looting used to - * kill this mob. - */ - @Override - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { - if (p_70628_1_) { - int j = this.rand.nextInt(2 + p_70628_2_); - - for (int k = 0; k < j; ++k) { - this.dropItem(getDropItem(), 1); - } - } - } - - /** - * Checks to make sure the light is not too bright where the mob is spawning - */ - @Override - protected boolean isValidLightLevel() { - return true; - } - - @Override - public int getMaxSpawnedInChunk() { - return 8; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java deleted file mode 100644 index f6f397f59e..0000000000 --- a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java +++ /dev/null @@ -1,553 +0,0 @@ -package gtPlusPlus.core.entity.monster; - -import java.lang.reflect.Field; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.core.world.explosions.ExplosionHandler; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.*; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.effect.EntityLightningBolt; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.monster.IMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.village.Village; -import net.minecraft.world.World; - -public class EntityStaballoyConstruct extends EntityIronGolem { - - /* - * Determines whether or not the entity is in a fluid at all. - */ - private boolean inFluid = false; - private boolean mReflectFirstUpdate = true; - private boolean isReadyToExplode = false; - private int fuse = 60; - private int attackTimer; - - public EntityStaballoyConstruct(World world) { - super(world); - this.experienceValue = 250; - this.setSize(1.4F, 2.9F); - this.getNavigator().setAvoidsWater(true); - this.getNavigator().setBreakDoors(true); - this.getNavigator().setCanSwim(false); - this.getNavigator().setAvoidSun(false); - this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true)); - this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F)); - //this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true)); - this.tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 1.0D)); - this.tasks.addTask(4, new EntityAIWander(this, 0.6D)); - this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); - this.tasks.addTask(6, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector)); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound p_70014_1_) { - super.writeEntityToNBT(p_70014_1_); - p_70014_1_.setBoolean("inFluid", this.inFluid); - p_70014_1_.setBoolean("isReadyToExplode", this.isReadyToExplode); - p_70014_1_.setInteger("fuse", this.fuse); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound p_70037_1_) { - super.readEntityFromNBT(p_70037_1_); - this.inFluid = p_70037_1_.getBoolean("inFluid"); - this.isReadyToExplode = p_70037_1_.getBoolean("isReadyToExplode"); - this.fuse = p_70037_1_.getInteger("fuse"); - } - - @Override - protected void entityInit() { - super.entityInit(); - this.dataWatcher.addObject(17, Byte.valueOf((byte) 0)); - } - - /** - * Returns true if the newer Entity AI code should be run - */ - @Override - public boolean isAIEnabled() { - return true; - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - @Override - protected void updateAITick() { - super.updateAITick(); - } - - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(500.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D); - } - - /** - * Decrements the entity's air supply when underwater - */ - @Override - protected int decreaseAirSupply(int p_70682_1_) { - return 0; - } - - @Override - protected void collideWithEntity(Entity p_82167_1_) { - if (p_82167_1_ instanceof IMob && this.getRNG().nextInt(20) == 0) { - this.setAttackTarget((EntityLivingBase) p_82167_1_); - } - - super.collideWithEntity(p_82167_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. - */ - @Override - public void onLivingUpdate() { - super.onLivingUpdate(); - - if (this.attackTimer > 0) { - --this.attackTimer; - } - - if (this.motionX * this.motionX + this.motionZ * this.motionZ > 2.500000277905201E-7D - && this.rand.nextInt(5) == 0) { - int i = MathHelper.floor_double(this.posX); - int j = MathHelper.floor_double(this.posY - 0.20000000298023224D - this.yOffset); - int k = MathHelper.floor_double(this.posZ); - Block block = this.worldObj.getBlock(i, j, k); - - - - if (block.getMaterial() != Material.air) { - this.worldObj.spawnParticle( - "blockcrack_" + Block.getIdFromBlock(block) + "_" + this.worldObj.getBlockMetadata(i, j, k), - this.posX + (this.rand.nextFloat() - 0.5D) * this.width, - this.boundingBox.minY + 0.1D, - this.posZ + (this.rand.nextFloat() - 0.5D) * this.width, - 4.0D * (this.rand.nextFloat() - 0.5D), 0.5D, - (this.rand.nextFloat() - 0.5D) * 4.0D); - } - } - } - - /** - * Returns true if this entity can attack entities of the specified class. - */ - @Override - public boolean canAttackClass(Class clazz) { - return clazz.equals(this.getClass()) ? false : true; - } - - @Override - public boolean attackEntityAsMob(Entity p_70652_1_) { - this.attackTimer = 10; - this.worldObj.setEntityState(this, (byte) 4); - boolean flag = p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), - 7 + this.rand.nextInt(15)); - - if (flag) { - p_70652_1_.motionY += 0.4000000059604645D; - } - - this.playSound("mob.irongolem.throw", 1.0F, 1.0F); - return flag; - } - - @Override - @SideOnly(Side.CLIENT) - public void handleHealthUpdate(byte p_70103_1_) { - if (p_70103_1_ == 4) { - this.attackTimer = 10; - this.playSound("mob.irongolem.throw", 1.0F, 1.0F); - } - else { - super.handleHealthUpdate(p_70103_1_); - } - } - - @Override - public Village getVillage() { - return null; - } - - @Override - @SideOnly(Side.CLIENT) - public int getAttackTimer() { - return this.attackTimer; - } - - /** - * Returns the sound this mob makes when it is hurt. - */ - @Override - protected String getHurtSound() { - return "mob.irongolem.hit"; - } - - /** - * Returns the sound this mob makes on death. - */ - @Override - protected String getDeathSound() { - return "mob.irongolem.death"; - } - - @Override - protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { - this.playSound("mob.irongolem.walk", 1.0F, 1.0F); - } - - /** - * Drop 0-2 items of this living's type. @param par1 - Whether this entity - * has recently been hit by a player. @param par2 - Level of Looting used to - * kill this mob. - */ - @Override - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { - int lootingChance = p_70628_2_+1; - int j = this.rand.nextInt(3); - int k; - - for (k = 0; k < j; ++k) { - this.entityDropItem(ItemUtils.getItemStackOfAmountFromOreDict("blockStaballoy", 1), 0f); - } - - k = 3 + this.rand.nextInt(3); - - for (int l = 0; l < k; ++l) { - this.entityDropItem(ItemUtils.getItemStackOfAmountFromOreDict("ingotStaballoy", lootingChance), 0f); - if (MathUtils.randInt(0, 2) == 0){ - this.entityDropItem(ItemUtils.getItemStackOfAmountFromOreDict("plateStaballoy", lootingChance), 0f); - } - } - } - - @Override - public boolean isPlayerCreated() { - return false; - } - - @Override - public void setPlayerCreated(boolean p_70849_1_) { - - } - - /** - * Called when the mob's health reaches 0. - */ - @Override - public void onDeath(DamageSource p_70645_1_) { - super.onDeath(p_70645_1_); - } - - @Override - protected String getLivingSound() { //TODO - return super.getLivingSound(); - } - - @Override - public int getTalkInterval() { - return 0; - } - - @Override - protected boolean canDespawn() { - return true; - } - - @Override - public void onEntityUpdate() { - //Set Fire Immunity - if (!this.isImmuneToFire){ - this.isImmuneToFire = true; - } - - if (!this.worldObj.isRemote) { - final float hp = getHealth(); - final float modifier = MathUtils.randInt(5,10)/100F; - final float amountToExplode = (hp*modifier); - - if (hp <= amountToExplode && !isReadyToExplode){ - if (this.ticksExisted >= 50) { - //Logger.INFO("Construct has low hp, trying to enable explosions. HP: "+this.getHealth()+", Max: "+this.getMaxHealth()+", Mod: "+modifier); - //Logger.INFO("Construct required HP to be <= "+amountToExplode); - float r = MathUtils.randFloat(0, 10); - if (r <= 0.1){ - this.isReadyToExplode = true; - //Logger.INFO("Construct can now explode."); - } - } - } - //Handle Exploding - else if (hp <= amountToExplode && isReadyToExplode){ - //Logger.INFO("Trying to explode. ["+this.fuse+"]"); - if (this.fuse-- <= 0){ - //Logger.INFO("Fuse has run out."); - this.setDead(); - if (!this.worldObj.isRemote) - { - this.explode(); - } - } - else { - //Logger.INFO("Ticking fuse and spawning particles."); - - int maxFuse = 60; - int fuseUsed = maxFuse-this.fuse; - float var2 = (float) (fuseUsed * 0.1); - - this.setSize(1.4F+(var2/2), 2.9F+(var2/2)); - - float r = MathUtils.randFloat(0, 1); - int r2 = MathUtils.randInt(5, 15); - for (int o=0;o 1.0F) - { - f = 1.0F; - } - - this.playSound(this.getSplashSound(), f, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.4F); - float f1 = MathHelper.floor_double(this.boundingBox.minY); - int i; - float f2; - float f3; - - for (i = 0; i < 1.0F + this.width * 20.0F; ++i) - { - f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; - f3 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; - this.worldObj.spawnParticle("bubble", this.posX + f2, f1 + 1.0F, this.posZ + f3, this.motionX, this.motionY - this.rand.nextFloat() * 0.2F, this.motionZ); - } - - for (i = 0; i < 1.0F + this.width * 20.0F; ++i) - { - f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; - f3 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; - this.worldObj.spawnParticle("splash", this.posX + f2, f1 + 1.0F, this.posZ + f3, this.motionX, this.motionY, this.motionZ); - } - } - this.fallDistance = 0.0F; - this.inFluid = true; - } - else - { - this.inFluid = false; - } - return this.inFluid; - } - - @Override - public void onChunkLoad() { - // TODO Auto-generated method stub - super.onChunkLoad(); - } - - @Override - public void onStruckByLightning(EntityLightningBolt p_70077_1_) { - this.isReadyToExplode = true; - this.fuse = 20; - } - - private void explode(){ - /* float f = 12.0F; - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true);*/ - - if (!this.worldObj.isRemote) { - final float f = 6.5F; - ExplosionHandler explode = new ExplosionHandler(); - explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, true, true); - - float r = MathUtils.randFloat(0, 1); - int r2 = MathUtils.randInt(20, 40); - for (int o=0;o 0) { - ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.poison.id, 20 * b0, 1)); - ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.confusion.id, 20 * b0, 1)); - ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.weakness.id, 20 * b0, 1)); - } - } - } - - this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 1.0F, false, - this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")); - this.setDead(); - } - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java deleted file mode 100644 index 7660dd1b75..0000000000 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java +++ /dev/null @@ -1,115 +0,0 @@ -package gtPlusPlus.core.entity.projectile; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Blocks; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; - -public class EntitySulfuricAcidPotion extends EntityThrowable { - - public EntitySulfuricAcidPotion(World world) { - super(world); - } - - public EntitySulfuricAcidPotion(World world, EntityLivingBase entity) { - super(world, entity); - } - - public EntitySulfuricAcidPotion(World world, double posX, double posY, double posZ) { - super(world, posX, posY, posZ); - } - - /** - * Called when this EntityThrowable hits a block or entity. - */ - @Override - protected void onImpact(MovingObjectPosition object) { - int xBlock = object.blockX; - int yBlock = object.blockY; - int zBlock = object.blockZ; - if (object.entityHit != null) { - byte b0 = 6; - if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ - object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - EntityUtils.setEntityOnFire(object.entityHit, 10); - object.entityHit.fireResistance = 0; - ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit)); - } - } - if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){ - ravage(new BlockPos(xBlock, yBlock, zBlock)); - } - - String mParticleType = "reddust"; - int e=0; - for (int i = 0; i < 24; ++i) { - if ((e = MathUtils.randInt(0, 5)) <= 1){ - if (e==0) - mParticleType = "largesmoke"; - if (e==1) - mParticleType = "flame"; - } - this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - } - - if (!this.worldObj.isRemote) { - this.setDead(); - } - } - - private boolean ravage(BlockPos blockpos){ - - int radius = 1; - - for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){ - for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){ - for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){ - - int mChance = MathUtils.randInt(1, 10); - if (mChance <= 3){ - Block mBlockhit = worldObj.getBlock(i, j, h); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - - //GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), mPol); - - if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){ - worldObj.setBlock(i, j+1, h, Blocks.fire); - worldObj.setBlock(i, j, h, Blocks.dirt); - } - else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){ - worldObj.setBlock(i, j, h, Blocks.fire); - } - else if (mBlockhit == Blocks.tallgrass){ - worldObj.setBlock(i, j, h, Blocks.fire); - if (worldObj.getBlock(i, j-1, h) == Blocks.grass){ - worldObj.setBlock(i, j-1, h, Blocks.dirt); - } - } - else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){ - worldObj.setBlock(i, j+1, h, Blocks.fire); - worldObj.setBlock(i, j, h, Blocks.dirt); - } - else if (mBlockhit == Blocks.air){ - worldObj.setBlock(i, j, h, Blocks.fire); - } - } - } - } - } - - - return true; - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java deleted file mode 100644 index 49daa459e0..0000000000 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java +++ /dev/null @@ -1,145 +0,0 @@ -package gtPlusPlus.core.entity.projectile; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Blocks; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; - -public class EntityThrowableBomb extends EntityThrowable { - - public EntityThrowableBomb(World world) { - super(world); - } - - public EntityThrowableBomb(World world, EntityLivingBase entity) { - super(world, entity); - } - - public EntityThrowableBomb(World world, double posX, double posY, double posZ) { - super(world, posX, posY, posZ); - } - - /** - * Called when this EntityThrowable hits a block or entity. - */ - @Override - protected void onImpact(MovingObjectPosition object) { - int xBlock = object.blockX; - int yBlock = object.blockY; - int zBlock = object.blockZ; - if (object.entityHit != null) { - byte b0 = 6; - if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ - object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 20); - EntityUtils.setEntityOnFire(object.entityHit, 20); - object.entityHit.fireResistance = 0; - ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit)); - } - } - if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){ - - ravage(new BlockPos(xBlock, yBlock, zBlock)); - for (BlockPos aSur : new BlockPos(xBlock, yBlock, zBlock).getSurroundingBlocks()) { - ravage(new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos)); - for (BlockPos aSur2 : new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos).getSurroundingBlocks()) { - //ravage(new BlockPos(aSur2.xPos, aSur2.yPos, aSur2.zPos)); - } - } - } - - String mParticleType = "reddust"; - int e=0; - for (int i = 0; i < 127; ++i) { - if ((e = MathUtils.randInt(0, 5)) <= 1){ - if (e==0) - mParticleType = "largesmoke"; - if (e==1) - mParticleType = "flame"; - } - this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - } - - if (!this.worldObj.isRemote) { - this.setDead(); - } - } - - private boolean ravage(BlockPos blockpos){ - - int radius = 5; - - for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){ - for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){ - for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){ - - int mChance = MathUtils.randInt(0, 100); - if (mChance <= 3){ - Block mBlockhit = worldObj.getBlock(i, j, h); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); - - PollutionUtils.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), 500); - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.01f, true); - if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){ - worldObj.setBlock(i, j+1, h, Blocks.fire); - worldObj.setBlock(i, j, h, Blocks.dirt); - } - else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){ - worldObj.setBlock(i, j, h, Blocks.fire); - } - else if (mBlockhit == Blocks.tallgrass){ - worldObj.setBlock(i, j, h, Blocks.fire); - if (worldObj.getBlock(i, j-1, h) == Blocks.grass){ - worldObj.setBlock(i, j-1, h, Blocks.dirt); - } - } - else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){ - worldObj.setBlock(i, j+1, h, Blocks.fire); - worldObj.setBlock(i, j, h, Blocks.dirt); - } - else if (mBlockhit == Blocks.air){ - worldObj.setBlock(i, j, h, Blocks.fire); - } - } - } - } - } - - - return true; - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java deleted file mode 100644 index 4fe72345b2..0000000000 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java +++ /dev/null @@ -1,327 +0,0 @@ -package gtPlusPlus.core.entity.projectile; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.*; -import net.minecraft.world.World; - -public abstract class EntityToxinball extends EntityFireball { - protected int entityX = -1; - protected int entityY = -1; - protected int entityZ = -1; - private Block block; - private boolean inGround; - private int ticksAlive; - private int ticksInAir; - - public EntityToxinball(World world) { - super(world); - this.setSize(1.0F, 1.0F); - } - - @Override - protected void entityInit() { - } - - /** - * Checks if the entity is in range to render by using the past in distance - * and comparing it to its average edge length * 64 * renderDistanceWeight - * Args: distance - */ - @Override - @SideOnly(Side.CLIENT) - public boolean isInRangeToRenderDist(double p_70112_1_) { - double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D; - d1 *= 64.0D; - return p_70112_1_ < d1 * d1; - } - - public EntityToxinball(World world, double x, double y, double z, double f1, double f2, double f3) { - super(world); - this.setSize(1.0F, 1.0F); - this.setLocationAndAngles(x, y, z, this.rotationYaw, this.rotationPitch); - this.setPosition(x, y, z); - double d6 = MathHelper - .sqrt_double(f1 * f1 + f2 * f2 + f3 * f3); - this.accelerationX = f1 / d6 * 0.1D; - this.accelerationY = f2 / d6 * 0.1D; - this.accelerationZ = f3 / d6 * 0.1D; - } - - public EntityToxinball(World world, EntityLivingBase entity, double x, double y, double z) { - super(world); - this.shootingEntity = entity; - this.setSize(1.0F, 1.0F); - this.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, - entity.rotationPitch); - this.setPosition(this.entityX, this.entityY, this.entityZ); - this.yOffset = 0.0F; - this.motionX = this.motionY = this.motionZ = 0.0D; - x += this.rand.nextGaussian() * 0.4D; - y += this.rand.nextGaussian() * 0.4D; - z += this.rand.nextGaussian() * 0.4D; - double d3 = MathHelper.sqrt_double(x * x + y * y + z * z); - this.accelerationX = x / d3 * 0.1D; - this.accelerationY = y / d3 * 0.1D; - this.accelerationZ = z / d3 * 0.1D; - } - - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() { - if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead - || !this.worldObj.blockExists(this.entityX, this.entityY, this.entityZ))) { - this.setDead(); - } - else { - super.onUpdate(); - this.setFire(1); - - if (this.inGround) { - if (this.worldObj.getBlock(this.entityX, this.entityY, - this.entityZ) == this.block) { - ++this.ticksAlive; - - if (this.ticksAlive == 600) { - this.setDead(); - } - - return; - } - - this.inGround = false; - this.motionX *= this.rand.nextFloat() * 0.2F; - this.motionY *= this.rand.nextFloat() * 0.2F; - this.motionZ *= this.rand.nextFloat() * 0.2F; - this.ticksAlive = 0; - this.ticksInAir = 0; - } - else { - ++this.ticksInAir; - } - - Vec3 vec3 = Vec3.createVectorHelper(this.entityX, this.entityY, this.entityZ); - Vec3 vec31 = Vec3.createVectorHelper(this.entityX + this.motionX, this.entityY + this.motionY, - this.entityZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); - vec3 = Vec3.createVectorHelper(this.entityX, this.entityY, this.entityZ); - vec31 = Vec3.createVectorHelper(this.entityX + this.motionX, this.entityY + this.motionY, - this.entityZ + this.motionZ); - - if (movingobjectposition != null) { - vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, - movingobjectposition.hitVec.zCoord); - } - - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, - this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; - - for (int i = 0; i < list.size(); ++i) { - Entity entity1 = (Entity) list.get(i); - - if (entity1.canBeCollidedWith() - && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { - float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); - MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); - - if (movingobjectposition1 != null) { - double d1 = vec3.distanceTo(movingobjectposition1.hitVec); - - if (d1 < d0 || d0 == 0.0D) { - entity = entity1; - d0 = d1; - } - } - } - } - - if (entity != null) { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null) { - this.onImpact(movingobjectposition); - } - - this.entityX += this.motionX; - this.entityY += this.motionY; - this.entityZ += this.motionZ; - float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.rotationYaw = (float) (Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) + 90.0F; - - for (this.rotationPitch = (float) (Math.atan2(f1, this.motionY) * 180.0D / Math.PI) - - 90.0F; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { - ; - } - - while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { - this.prevRotationPitch += 360.0F; - } - - while (this.rotationYaw - this.prevRotationYaw < -180.0F) { - this.prevRotationYaw -= 360.0F; - } - - while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { - this.prevRotationYaw += 360.0F; - } - - this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; - this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; - float f2 = this.getMotionFactor(); - - if (this.isInWater()) { - for (int j = 0; j < 4; ++j) { - float f3 = 0.25F; - this.worldObj.spawnParticle("bubble", this.entityX - this.motionX * f3, this.entityY - this.motionY * f3, - this.entityZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); - } - - f2 = 0.8F; - } - - this.motionX += this.accelerationX; - this.motionY += this.accelerationY; - this.motionZ += this.accelerationZ; - this.motionX *= f2; - this.motionY *= f2; - this.motionZ *= f2; - this.worldObj.spawnParticle("smoke", this.entityX, this.entityY + 0.5D, this.entityZ, 0.0D, 0.0D, 0.0D); - this.setPosition(this.entityX, this.entityY, this.entityZ); - } - } - - /** - * Return the motion factor for this projectile. The factor is multiplied by - * the original motion. - */ - @Override - protected float getMotionFactor() { - return 0.95F; - } - - /** - * Called when this EntityFireball hits a block or entity. - */ - @Override - protected abstract void onImpact(MovingObjectPosition p_70227_1_); - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound aTag) { - aTag.setShort("xTile", (short) this.entityX); - aTag.setShort("yTile", (short) this.entityY); - aTag.setShort("zTile", (short) this.entityZ); - aTag.setByte("inTile", (byte) Block.getIdFromBlock(this.block)); - aTag.setByte("inGround", (byte) (this.inGround ? 1 : 0)); - aTag.setTag("direction", - this.newDoubleNBTList(new double[] { this.motionX, this.motionY, this.motionZ })); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound aTag) { - this.entityX = aTag.getShort("xTile"); - this.entityY = aTag.getShort("yTile"); - this.entityZ = aTag.getShort("zTile"); - this.block = Block.getBlockById(aTag.getByte("inTile") & 255); - this.inGround = aTag.getByte("inGround") == 1; - - if (aTag.hasKey("direction", 9)) { - NBTTagList nbttaglist = aTag.getTagList("direction", 6); - this.motionX = nbttaglist.func_150309_d(0); - this.motionY = nbttaglist.func_150309_d(1); - this.motionZ = nbttaglist.func_150309_d(2); - } - else { - this.setDead(); - } - } - - /** - * Returns true if other Entities should be prevented from moving through - * this Entity. - */ - @Override - public boolean canBeCollidedWith() { - return true; - } - - @Override - public float getCollisionBorderSize() { - return 1.0F; - } - - /** - * Called when the entity is attacked. - */ - @Override - public boolean attackEntityFrom(DamageSource damage, float p_70097_2_) { - if (this.isEntityInvulnerable()) { - return false; - } - else { - this.setBeenAttacked(); - - if (damage.getEntity() != null) { - Vec3 vec3 = damage.getEntity().getLookVec(); - - if (vec3 != null) { - this.motionX = vec3.xCoord; - this.motionY = vec3.yCoord; - this.motionZ = vec3.zCoord; - this.accelerationX = this.motionX * 0.1D; - this.accelerationY = this.motionY * 0.1D; - this.accelerationZ = this.motionZ * 0.1D; - } - - if (damage.getEntity() instanceof EntityLivingBase) { - this.shootingEntity = (EntityLivingBase) damage.getEntity(); - } - - return true; - } - else { - return false; - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() { - return 0.0F; - } - - /** - * Gets how bright this entity is. - */ - @Override - public float getBrightness(float p_70013_1_) { - return 1.0F; - } - - @Override - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) { - return 15728880; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java deleted file mode 100644 index 78469c9dad..0000000000 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.core.entity.projectile; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Blocks; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -public class EntityToxinballSmall extends EntityToxinball { - - public EntityToxinballSmall(World p_i1770_1_) { - super(p_i1770_1_); - this.setSize(0.3125F, 0.3125F); - } - - public EntityToxinballSmall(World world, EntityLivingBase entity, double x, double y, double z) { - super(world, entity, x, y, z); - this.setSize(0.3125F, 0.3125F); - } - - public EntityToxinballSmall(World p_i1772_1_, double p_i1772_2_, double p_i1772_4_, double p_i1772_6_, double p_i1772_8_, double p_i1772_10_, double p_i1772_12_) { - super(p_i1772_1_, p_i1772_2_, p_i1772_4_, p_i1772_6_, p_i1772_8_, p_i1772_10_, p_i1772_12_); - this.setSize(0.3125F, 0.3125F); - } - - /** - * Called when this EntityFireball hits a block or entity. - */ - @Override - protected void onImpact(MovingObjectPosition MoP) { - if (!this.worldObj.isRemote) { - if (MoP.entityHit != null) { - if (!MoP.entityHit.isImmuneToFire() && MoP.entityHit - .attackEntityFrom(DamageSource.causeFireballDamage(this, this.shootingEntity), 5.0F)) { - MoP.entityHit.setFire(5); - } - } - else { - int i = MoP.blockX; - int j = MoP.blockY; - int k = MoP.blockZ; - - switch (MoP.sideHit) { - case 0: - --j; - break; - case 1: - ++j; - break; - case 2: - --k; - break; - case 3: - ++k; - break; - case 4: - --i; - break; - case 5: - ++i; - } - - if (this.worldObj.isAirBlock(i, j, k)) { - this.worldObj.setBlock(i, j, k, Blocks.fire); - } - } - - this.setDead(); - } - } - - /** - * Returns true if other Entities should be prevented from moving through - * this Entity. - */ - @Override - public boolean canBeCollidedWith() { - return false; - } - - /** - * Called when the entity is attacked. - */ - @Override - public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/fluids/BlockFluidBase.java b/src/Java/gtPlusPlus/core/fluids/BlockFluidBase.java deleted file mode 100644 index dc7c9c2e78..0000000000 --- a/src/Java/gtPlusPlus/core/fluids/BlockFluidBase.java +++ /dev/null @@ -1,104 +0,0 @@ -package gtPlusPlus.core.fluids; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.BlockFluidClassic; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidBase extends BlockFluidClassic { - - @SideOnly(Side.CLIENT) - protected static IIcon stillIcon; - @SideOnly(Side.CLIENT) - protected static IIcon flowingIcon; - - protected final short[] mRGB; - - - public BlockFluidBase(Fluid fluid, short[] aRGB) { - this(fluid, Material.water, aRGB); - } - - public BlockFluidBase(Fluid fluid, Material material, short[] aRGB) { - super(fluid, material); - mRGB = aRGB; - this.setHardness(100.0F); - this.setLightOpacity(3); - this.disableStats(); - } - - @Override - public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity ent) { - if (!(ent instanceof EntityLivingBase)) { - return; - } - /*EntityLivingBase player = (EntityLivingBase) ent; - int pot = world.rand.nextInt(Potion.potionTypes.length); - Potion.potionTypes[pot].performEffect(player, 40);*/ - } - - @Override - public IIcon getIcon(int side, int meta) { - return (side == 0 || side == 1) ? stillIcon : flowingIcon; - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister register) { - if (stillIcon == null) { - stillIcon = register.registerIcon(CORE.MODID+ ":" + "fluids/fluid.fluid.autogenerated.still"); - } - if (flowingIcon == null) { - flowingIcon = register.registerIcon(CORE.MODID+ ":" + "fluids/fluid.fluid.autogenerated.flowing"); - } - } - - @Override - public int getBlockColor() { - if (mRGB != null && mRGB.length >= 3) { - return Utils.rgbtoHexValue(mRGB[0], mRGB[1], mRGB[2]); - } - return super.getBlockColor(); - } - - @Override - public int getRenderColor(int aMeta) { - if (mRGB != null && mRGB.length >= 3) { - return Utils.rgbtoHexValue(mRGB[0], mRGB[1], mRGB[2]); - } - return super.getRenderColor(aMeta); - } - - @Override - public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour) { - // TODO Auto-generated method stub - return super.recolourBlock(world, x, y, z, side, colour); - } - - @Override - public boolean canDisplace(IBlockAccess world, int x, int y, int z) { - if (world.getBlock(x, y, z).getMaterial().isLiquid()) { - return false; - } - return super.canDisplace(world, x, y, z); - } - - @Override - public boolean displaceIfPossible(World world, int x, int y, int z) { - if (world.getBlock(x, y, z).getMaterial().isLiquid()) { - return false; - } - return super.displaceIfPossible(world, x, y, z); - } - -} diff --git a/src/Java/gtPlusPlus/core/fluids/FactoryFluid.java b/src/Java/gtPlusPlus/core/fluids/FactoryFluid.java deleted file mode 100644 index e3383aee91..0000000000 --- a/src/Java/gtPlusPlus/core/fluids/FactoryFluid.java +++ /dev/null @@ -1,49 +0,0 @@ -package gtPlusPlus.core.fluids; -import gregtech.api.GregTech_API; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.item.EnumRarity; -import net.minecraftforge.fluids.Fluid; - -public class FactoryFluid extends Fluid implements Runnable { - - private final String mTextureName; - private final short[] mRGBa; - - public FactoryFluid(String fluidName, final short[] aRGBa) { - this(fluidName, null, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, false, EnumRarity.common, aRGBa); - } - - public FactoryFluid(String fluidName, int luminosity, int density, int temp, int viscosity, final short[] aRGBa) { - this(fluidName, null, luminosity, density, temp, viscosity, (density == Short.MIN_VALUE || density >= 0 ? false : true), EnumRarity.common, aRGBa); - } - - public FactoryFluid(String fluidName, Block aBlock, int luminosity, int density, int temp, int viscosity, boolean gas, EnumRarity aRarity, final short[] aRGBa) { - super(fluidName); - this.mRGBa = aRGBa; - this.setBlock(aBlock); - if (luminosity != Short.MIN_VALUE) - this.setLuminosity(luminosity); - if (density != Short.MIN_VALUE) - this.setDensity(density); - if (temp != Short.MIN_VALUE) - this.setTemperature(temp); - if (viscosity != Short.MIN_VALUE) - this.setViscosity(viscosity); - this.setGaseous(gas); - this.setRarity(aRarity); - this.mTextureName = CORE.MODID+":fluids/fluid.fluid.autogenerated"; - GregTech_API.sGTBlockIconload.add(this); - } - - @Override - public int getColor() { - return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2])); - } - - @Override - public void run() { - this.setIcons(GregTech_API.sBlockIcons.registerIcon(this.mTextureName)); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/fluids/FluidFactory.java b/src/Java/gtPlusPlus/core/fluids/FluidFactory.java deleted file mode 100644 index d94fa35af7..0000000000 --- a/src/Java/gtPlusPlus/core/fluids/FluidFactory.java +++ /dev/null @@ -1,214 +0,0 @@ -package gtPlusPlus.core.fluids; - -import java.util.LinkedHashMap; -import java.util.Map; - -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.GTplusplus.INIT_PHASE; -import gtPlusPlus.api.objects.GregtechException; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.base.itemblock.FluidItemBlock; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -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.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; - -public class FluidFactory { - - public static final Map mNameToFluidMap = new LinkedHashMap(); - public static final Map mNameToBucketMap = new LinkedHashMap(); - public static final Map mNameToBlockMap = new LinkedHashMap(); - public static final Map mNameToMetaMap = new LinkedHashMap(); - - public static final Map mFluidToNameMap = new LinkedHashMap(); - public static final Map mFluidToBucketMap = new LinkedHashMap(); - public static final Map mFluidToBlockMap = new LinkedHashMap(); - public static final Map mFluidToMetaMap = new LinkedHashMap(); - - public static final Map mBucketToFluidMap = new LinkedHashMap(); - public static final Map mBucketToNameMap = new LinkedHashMap(); - public static final Map mBucketToBlockMap = new LinkedHashMap(); - public static final Map mBucketToMetaMap = new LinkedHashMap(); - - public static final Map mBlockToNameMap = new LinkedHashMap(); - public static final Map mBlockToFluidMap = new LinkedHashMap(); - public static final Map mBlockToBucketMap = new LinkedHashMap(); - public static final Map mBlockToMetaMap = new LinkedHashMap(); - - public static final Map mMetaToNameMap = new LinkedHashMap(); - public static final Map mMetaToFluidMap = new LinkedHashMap(); - public static final Map mMetaToBucketMap = new LinkedHashMap(); - public static final Map mMetaToBlockMap = new LinkedHashMap(); - - - //Special Colour Handling - public static final Map mMetaToColourMap = new LinkedHashMap(); - - - public static Item mGenericBucket; - private static FluidPackage mErrorFluid; - private static AutoMap mGeneratedFluids = new AutoMap(); - - public static void preInit() { - - } - - public static void init() { - mGenericBucket = new ItemGenericFluidBucket(Blocks.air); - GameRegistry.registerItem(mGenericBucket, "gtpp.bucket.generic"); - for (FluidPackage y : mGeneratedFluids) { - if (!y.valid()) { - continue; - } - GameRegistry.registerBlock(y.mBlock, FluidItemBlock.class, "gtpp_" + y.mName); - FluidContainerRegistry.registerFluidContainer(y.get(), y.mBucket, new ItemStack(Items.bucket)); - } - Utils.registerEvent(BucketHandler.INSTANCE); - } - - public static void postInit() { - - } - - /** - * Generates a 'Water' type fluid. - * @param aID - The Fluid ID (Must be unique) - * @param aUnlocalName - Unlocalized Fluid Name - * @param aRGB - a {@link Short[]} containing the RGB of the FluidPackage. - * @return - A fully constructed & registered {@linkplain FluidPackage} - */ - public static FluidPackage generate(int aID, String aUnlocalName, short[] aRGB) { - return generate(aID, aUnlocalName, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, aRGB); - } - - /** - * Generate a {@link FluidPackage} from the data provided. This FluidPackage is automatically registered and handled internally. - * Pass in {@link Short}.MIN_VALUE for any of the Fluid Fields (Besides ID, Name or RGB) and it will default to water values. - * @param aID - The Fluid ID (Must be unique) - * @param aUnlocalName - Unlocalized Fluid Name - * @param luminosity - How bright is the fluid. - * @param density - completely arbitrary; negative density indicates that the fluid is - * lighter than air. Default value is approximately the real-life density of water in kg/m^3. - * @param temp - completely arbitrary; higher temperature indicates that the fluid is - * hotter than air. Default value is approximately the real-life room temperature of water in degrees Kelvin - * @param viscosity - completely arbitrary; negative values are not - * permissible. Default value is approximately the real-life density of water in m/s^2 (x10^-3). * - * Higher viscosity means that a fluid flows more slowly, like molasses. - * Lower viscosity means that a fluid flows more quickly, like helium. - * @param aRGB - a {@link Short[]} containing the RGB of the FluidPackage. - * @return - A fully constructed & registered {@linkplain FluidPackage} - */ - public static FluidPackage generate(int aID, String aUnlocalName, int luminosity, int density, int temp, - int viscosity, short[] aRGB) { - - FluidPackage aFluidToGenerate = null; - - // Check Load Phase for some Safety, only allow this to be called in Pre-Init. - if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.PRE_INIT) { - try { - throw new GregtechException("Cannot generate Fluid Packages outside of Pre-Init!"); - } catch (GregtechException e) { - e.printStackTrace(); - CORE.crash("Cannot generate Fluid Packages outside of Pre-Init!"); - } - } - - Fluid aGenFluid = fluid(aUnlocalName, luminosity, density, temp, viscosity, aRGB); - Block aGenBlock = block(aGenFluid, aRGB); - ItemStack aGenBucket = bucket(aID); - - aFluidToGenerate = new FluidPackage(aID, aUnlocalName, aGenFluid, aGenBucket, aGenBlock); - - if (aFluidToGenerate != null && aFluidToGenerate.valid()) { - FluidRegistry.registerFluid(aFluidToGenerate.get()); - mGeneratedFluids.put(aFluidToGenerate); - } - else { - // Handle Bad generation - if (mErrorFluid == null) { - mErrorFluid = new FluidPackage(0, "", FluidUtils.getWater(1).getFluid(), ItemUtils.getSimpleStack(Items.water_bucket), Blocks.water); - } - return mErrorFluid; - } - - - return aFluidToGenerate; - } - - - - private static Fluid fluid(String aUnlocalName, int luminosity, int density, int temp, - int viscosity, short[] aRGB) { - return new FactoryFluid(aUnlocalName, luminosity, density, temp, viscosity, aRGB); - } - - private static ItemStack bucket(int aID) { - return ItemGenericFluidBucket.registerFluidForBucket(aID); - } - - private static Block block(Fluid aFluidForBlock, short[] aRGB) { - if (aFluidForBlock != null) { - FluidRegistry.registerFluid(aFluidForBlock); - return new BlockFluidBase(aFluidForBlock, aRGB); - } - return Blocks.dirt; - } - - /** - * Copyright © SpaceToad, 2011 http://www.mod-buildcraft.com BuildCraft is - * distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. - * Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - * - * Modified version of the BC BucketHandler, except using ItemStacks > Items - * (Why?) - * - * @author Alkalus - */ - - public static class BucketHandler { - - public static BucketHandler INSTANCE = new BucketHandler(); - - private BucketHandler() { - - } - - @SubscribeEvent - public void onBucketFill(FillBucketEvent event) { - ItemStack result = fillCustomBucket(event.world, event.target); - if (result == null) { - return; - } - event.result = result; - event.setResult(Result.ALLOW); - } - - private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { - Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); - ItemStack bucket = mBlockToBucketMap.get(block); - if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { - world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); - return ItemUtils.getSimpleStack(bucket, 1); - } else { - return null; - } - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/fluids/FluidPackage.java b/src/Java/gtPlusPlus/core/fluids/FluidPackage.java deleted file mode 100644 index 29f831776b..0000000000 --- a/src/Java/gtPlusPlus/core/fluids/FluidPackage.java +++ /dev/null @@ -1,83 +0,0 @@ -package gtPlusPlus.core.fluids; - -import static gtPlusPlus.core.fluids.FluidFactory.mBlockToBucketMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBlockToFluidMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBlockToMetaMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBlockToNameMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBucketToBlockMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBucketToFluidMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBucketToMetaMap; -import static gtPlusPlus.core.fluids.FluidFactory.mBucketToNameMap; -import static gtPlusPlus.core.fluids.FluidFactory.mFluidToBlockMap; -import static gtPlusPlus.core.fluids.FluidFactory.mFluidToBucketMap; -import static gtPlusPlus.core.fluids.FluidFactory.mFluidToMetaMap; -import static gtPlusPlus.core.fluids.FluidFactory.mFluidToNameMap; -import static gtPlusPlus.core.fluids.FluidFactory.mMetaToBlockMap; -import static gtPlusPlus.core.fluids.FluidFactory.mMetaToBucketMap; -import static gtPlusPlus.core.fluids.FluidFactory.mMetaToColourMap; -import static gtPlusPlus.core.fluids.FluidFactory.mMetaToFluidMap; -import static gtPlusPlus.core.fluids.FluidFactory.mMetaToNameMap; -import static gtPlusPlus.core.fluids.FluidFactory.mNameToBlockMap; -import static gtPlusPlus.core.fluids.FluidFactory.mNameToBucketMap; -import static gtPlusPlus.core.fluids.FluidFactory.mNameToFluidMap; -import static gtPlusPlus.core.fluids.FluidFactory.mNameToMetaMap; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; - -public class FluidPackage { - - - public final int mID; - public final String mName; - private final Fluid mFluid; - public final ItemStack mBucket; - public final Block mBlock; - - public FluidPackage(int aID, String aName, Fluid aFluid, ItemStack aBucket, Block aBlock) { - - mNameToFluidMap.put(aName, aFluid); - mNameToBucketMap.put(aName, aBucket); - mNameToBlockMap.put(aName, aBlock); - mNameToMetaMap.put(aName, aID); - - mFluidToNameMap.put(aFluid, aName); - mFluidToBucketMap.put(aFluid, aBucket); - mFluidToBlockMap.put(aFluid, aBlock); - mFluidToMetaMap.put(aFluid, aID); - - mBucketToFluidMap.put(aBucket, aFluid); - mBucketToNameMap.put(aBucket, aName); - mBucketToBlockMap.put(aBucket, aBlock); - mBucketToMetaMap.put(aBucket, aID); - - mBlockToNameMap.put(aBlock, aName); - mBlockToFluidMap.put(aBlock, aFluid); - mBlockToBucketMap.put(aBlock, aBucket); - mBlockToMetaMap.put(aBlock, aID); - - mMetaToNameMap.put(aID, aName); - mMetaToFluidMap.put(aID, aFluid); - mMetaToBucketMap.put(aID, aBucket); - mMetaToBlockMap.put(aID, aBlock); - - mMetaToColourMap.put(aID, aFluid.getColor()); - - mID = aID; - mName = aName; - mFluid = aFluid; - mBucket = aBucket; - mBlock = aBlock; - - } - - public Fluid get() { - return mFluid; - } - - public boolean valid() { - return mName != null && mName.length() > 0 && mFluid != null && mBucket != null && mBlock != null; - } - -} diff --git a/src/Java/gtPlusPlus/core/fluids/FluidRegistryHandler.java b/src/Java/gtPlusPlus/core/fluids/FluidRegistryHandler.java deleted file mode 100644 index bc4df596de..0000000000 --- a/src/Java/gtPlusPlus/core/fluids/FluidRegistryHandler.java +++ /dev/null @@ -1,53 +0,0 @@ -package gtPlusPlus.core.fluids; - -import static gtPlusPlus.core.block.ModBlocks.*; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.block.material.Material; - -import gtPlusPlus.core.block.general.fluids.BlockFluidSludge; -import gtPlusPlus.core.lib.CORE; -import net.minecraftforge.fluids.FluidRegistry; - -public class FluidRegistryHandler { - - //Fluids - /** - * - * Luminosity .setLuminosity(luminosity) - How much light does the fluid emit. Default: 0, Lava uses 15 - Density .setDensity(density) - How dense is the fluid, the only effect is whether or not a fluid replaces another fluid when they flow into each other. Default: 1000, the density of water at 4 degrees Celsius in kg/m³ - Temperature .setTemperature(temp) - How hot, or cold is the fluid. Has currently no effect. Default: 295, the "normal" room temperature in degrees Kelvin, this is approximately 72°F or 22°C. - Viscosity .setViscosity(viscosity) - How thick the fluid is. Determines how fast it flows. Default: 1000 for water, lava uses 6000 - Is Gaseous .setGaseous(boolean) - Indicates if the fluid is gaseous. Used for rendering. Default: false - * - */ - - public static void registerFluids(){ - run(); - } - - private static void run(){ - fluidSludge(); - } - - private static void fluidSludge(){ - //testFluid - fluidSludge.setLuminosity(8); - fluidSludge.setDensity(8196); - fluidSludge.setTemperature(295); - fluidSludge.setViscosity(3000); - fluidSludge.setGaseous(false); - fluidSludge.setUnlocalizedName("fluid.sludge"); - FluidRegistry.registerFluid(fluidSludge); - blockFluidSludge = new BlockFluidSludge(fluidSludge, Material.cactus).setBlockName("fluidBlockSludge"); - GameRegistry.registerBlock(blockFluidSludge, CORE.MODID + "_" + blockFluidSludge.getUnlocalizedName().substring(5)); - fluidSludge.setUnlocalizedName(blockFluidSludge.getUnlocalizedName()); - } - -} diff --git a/src/Java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java b/src/Java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java deleted file mode 100644 index 6354be632d..0000000000 --- a/src/Java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java +++ /dev/null @@ -1,319 +0,0 @@ -package gtPlusPlus.core.fluids; - -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import cpw.mods.fml.common.eventhandler.Event; -import gtPlusPlus.api.objects.GregtechException; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBucket; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.FillBucketEvent; - -public class ItemGenericFluidBucket extends ItemBucket { - - private static IIcon mBaseBucketTexture; - private static IIcon mOverlayBucketTexture; - private static AutoMap mInternalFluidCache = new AutoMap(); - - public ItemGenericFluidBucket(Block aFluid) { - super(aFluid); - this.setContainerItem(Items.bucket); - this.maxStackSize = 1; - mInternalFluidCache.put(aFluid); - } - - public static ItemStack registerFluidForBucket(int aID) { - - if (FluidFactory.mMetaToBucketMap.containsKey(aID)) { - try { - throw new GregtechException(""+aID+" is already registered! Unable to register fluid: "+FluidFactory.mMetaToFluidMap.get(aID).getLocalizedName()); - } catch (GregtechException e) { - e.printStackTrace(); - CORE.crash(""+aID+" is already registered! Unable to register fluid: "+FluidFactory.mMetaToFluidMap.get(aID).getLocalizedName()); - } - } - mInternalFluidCache.put(FluidFactory.mMetaToBlockMap.get(aID)); - return ItemUtils.simpleMetaStack(FluidFactory.mGenericBucket, aID, 1); - } - - Map mIconCache = new LinkedHashMap(); - - /** - * Called whenever this item is equipped and the right mouse button is pressed. - * Args: itemStack, world, entityPlayer - */ - public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - - Block isFull = FluidFactory.mMetaToBlockMap.get(aStack.getItemDamage()); - - boolean flag = isFull == Blocks.air; - MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(aWorld, aPlayer, flag); - - if (movingobjectposition == null || isFull == null) { - return aStack; - } else { - FillBucketEvent event = new FillBucketEvent(aPlayer, aStack, aWorld, movingobjectposition); - if (MinecraftForge.EVENT_BUS.post(event)) { - return aStack; - } - - if (event.getResult() == Event.Result.ALLOW) { - if (aPlayer.capabilities.isCreativeMode) { - return aStack; - } - - if (--aStack.stackSize <= 0) { - return event.result; - } - - if (!aPlayer.inventory.addItemStackToInventory(event.result)) { - aPlayer.dropPlayerItemWithRandomChoice(event.result, false); - } - - return aStack; - } - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!aWorld.canMineBlock(aPlayer, i, j, k)) { - return aStack; - } - - if (flag) { - if (!aPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, aStack)) { - return aStack; - } - - Material material = aWorld.getBlock(i, j, k).getMaterial(); - int l = aWorld.getBlockMetadata(i, j, k); - - if (material == Material.water && l == 0) { - aWorld.setBlockToAir(i, j, k); - return this.func_150910_a(aStack, aPlayer, Items.water_bucket); - } - - if (material == Material.lava && l == 0) { - aWorld.setBlockToAir(i, j, k); - return this.func_150910_a(aStack, aPlayer, Items.lava_bucket); - } - } else { - if (isFull == Blocks.air) { - return new ItemStack(Items.bucket); - } - - if (movingobjectposition.sideHit == 0) { - --j; - } - - if (movingobjectposition.sideHit == 1) { - ++j; - } - - if (movingobjectposition.sideHit == 2) { - --k; - } - - if (movingobjectposition.sideHit == 3) { - ++k; - } - - if (movingobjectposition.sideHit == 4) { - --i; - } - - if (movingobjectposition.sideHit == 5) { - ++i; - } - - if (!aPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, aStack)) { - return aStack; - } - - if (this.tryPlaceContainedLiquid(isFull, aWorld, i, j, k) && !aPlayer.capabilities.isCreativeMode) { - return new ItemStack(Items.bucket); - } - } - } - - return aStack; - } - } - - private ItemStack func_150910_a(ItemStack p_150910_1_, EntityPlayer p_150910_2_, Item p_150910_3_) { - if (p_150910_2_.capabilities.isCreativeMode) { - return p_150910_1_; - } else if (--p_150910_1_.stackSize <= 0) { - return new ItemStack(p_150910_3_); - } else { - if (!p_150910_2_.inventory.addItemStackToInventory(new ItemStack(p_150910_3_))) { - p_150910_2_.dropPlayerItemWithRandomChoice(new ItemStack(p_150910_3_, 1, 0), false); - } - - return p_150910_1_; - } - } - - /** - * Attempts to place the liquid contained inside the bucket. - */ - public boolean tryPlaceContainedLiquid(Block isFull, World aWorld, int aX, int aY, int aZ) { - if (isFull == Blocks.air) { - return false; - } else { - Material material = aWorld.getBlock(aX, aY, aZ).getMaterial(); - boolean flag = !material.isSolid(); - - if (!aWorld.isAirBlock(aX, aY, aZ) && !flag) { - return false; - } else { - - if (!aWorld.isRemote && flag && !material.isLiquid()) { - aWorld.func_147480_a(aX, aY, aZ, true); - } - - aWorld.setBlock(aX, aY, aZ, isFull, 0, 3); - - return true; - } - } - } - - @Override - public IIcon getIconFromDamage(int aMeta) { - IIcon aTemp = mIconCache.get(aMeta); - return aTemp != null ? aTemp : super.getIconFromDamage(aMeta); - } - - @Override - public boolean getHasSubtypes() { - return mInternalFluidCache.size() > 0; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - list.add(new ItemStack(item, 1, 0)); - for (Block f : mInternalFluidCache) { - Integer aMeta; - if (f != null) { - aMeta = FluidFactory.mBlockToMetaMap.get(f); - if (aMeta != null) { - list.add(new ItemStack(item, 1, aMeta)); - } - } - } - } - - @Override - public int getMaxDamage() { - return 512; - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { - // TODO Auto-generated method stub - super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - if (stack != null && renderPass == 1) { - return mOverlayBucketTexture; - } - else { - return mBaseBucketTexture; - } - /*IIcon aTemp = mIconCache.get(stack.getItemDamage()); - return aTemp != null ? aTemp : super.getIcon(stack, renderPass, player, usingItem, useRemaining);*/ - } - - @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - return false; - } - - @Override - public int getMaxDamage(ItemStack stack) { - return 512; - } - - @Override - public boolean isDamaged(ItemStack stack) { - return false; - } - - @Override - public int getItemEnchantability(ItemStack stack) { - return 0; - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - if (pass == 1) { - return mOverlayBucketTexture; - } - else { - return mBaseBucketTexture; - } - } - - @Override - public void registerIcons(final IIconRegister i) { - mBaseBucketTexture = i.registerIcon("bucket_empty"); - mOverlayBucketTexture = i.registerIcon(CORE.MODID+":bucket.generic.overlay"); - } - - @Override - public boolean tryPlaceContainedLiquid(World p_77875_1_, int p_77875_2_, int p_77875_3_, int p_77875_4_) { - return tryPlaceContainedLiquid(Blocks.air, p_77875_1_, p_77875_2_, p_77875_3_, p_77875_4_); - } - - @Override - public int getColorFromItemStack(ItemStack aStack, int aPass) { - if (aPass == 0) { - return super.getColorFromItemStack(aStack, aPass); - } - else { - return FluidFactory.mMetaToColourMap.get(aStack.getItemDamage()); - } - } - - @Override - public boolean requiresMultipleRenderPasses() { - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java b/src/Java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java deleted file mode 100644 index aa10363e7c..0000000000 --- a/src/Java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.gui; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.inventory.Container; - -public abstract class GUI_Base_Tile_Entity extends GuiContainer { - - public final Container mContainer; - - public GUI_Base_Tile_Entity(Container aContainer) { - super(aContainer); - mContainer = aContainer; - } - -} diff --git a/src/Java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java b/src/Java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java deleted file mode 100644 index 1212054f01..0000000000 --- a/src/Java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.core.gui.beta; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import gtPlusPlus.core.interfaces.IGuiManagerMiscUtils; - -public class Gui_ID_Registry -{ - private static final Map, MU_GuiId> classMap = new HashMap, MU_GuiId>(); - private static final Map idMap = new HashMap(); - private static int nextId = 0; - - static - { - //registerGuiHandlers(Gui_Types.Tile, Arrays.asList(new Class[] {TileAlveary.class})); - //registerGuiHandlers(MU_GuiType.Item, Arrays.asList(new Class[] { ItemBackpack.class, ItemBackpackNaturalist.class, ItemBeealyzer.class, ItemCatalogue.class, ItemFlutterlyzer.class, ItemHabitatLocator.class, ItemImprinter.class, ItemInfuser.class, ItemLetter.class, ItemSolderingIron.class, ItemTreealyzer.class })); - //registerGuiHandlers(MU_GuiType.Entity, Arrays.asList(new Class[] { EntityMinecartApiary.class, EntityMinecartBeehouse.class })); - } - - private static void registerGuiHandlers(final Gui_Types MU_GuiType, final List> guiHandlerClasses) - { - for (final Class tileGuiHandlerClass : guiHandlerClasses) - { - final MU_GuiId guiId = new MU_GuiId(nextId++, MU_GuiType, tileGuiHandlerClass); - classMap.put(tileGuiHandlerClass, guiId); - idMap.put(Integer.valueOf(guiId.getId()), guiId); - } - } - - public static MU_GuiId getGuiIdForGuiHandler(final IGuiManagerMiscUtils guiHandler) - { - final Class guiHandlerClass = guiHandler.getClass(); - MU_GuiId guiId = classMap.get(guiHandlerClass); - if (guiId == null) { - for (final Map.Entry, MU_GuiId> classGuiIdEntry : classMap.entrySet()) { - if (((Class)classGuiIdEntry.getKey()).isAssignableFrom(guiHandlerClass)) - { - guiId = classGuiIdEntry.getValue(); - break; - } - } - } - if (guiId == null) { - throw new IllegalStateException("No gui ID for gui handler: " + guiHandler); - } - return guiId; - } - - public static MU_GuiId getGuiId(final int id) - { - return idMap.get(Integer.valueOf(id)); - } - -} diff --git a/src/Java/gtPlusPlus/core/gui/beta/Gui_Types.java b/src/Java/gtPlusPlus/core/gui/beta/Gui_Types.java deleted file mode 100644 index 9348f40c9c..0000000000 --- a/src/Java/gtPlusPlus/core/gui/beta/Gui_Types.java +++ /dev/null @@ -1,8 +0,0 @@ -package gtPlusPlus.core.gui.beta; - -public enum Gui_Types -{ - Item, Tile, Entity; - - private Gui_Types() {} -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/beta/MU_GuiId.java b/src/Java/gtPlusPlus/core/gui/beta/MU_GuiId.java deleted file mode 100644 index 116ad48480..0000000000 --- a/src/Java/gtPlusPlus/core/gui/beta/MU_GuiId.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.core.gui.beta; -import gtPlusPlus.core.interfaces.IGuiManagerMiscUtils; - -public class MU_GuiId -{ - private final int id; - private final Gui_Types MU_GuiType; - private final Class guiHandlerClass; - - MU_GuiId(final int id, final Gui_Types MU_GuiType, final Class guiHandlerClass) - { - this.id = id; - this.MU_GuiType = MU_GuiType; - this.guiHandlerClass = guiHandlerClass; - } - - public Gui_Types getGuiType() - { - return this.MU_GuiType; - } - - public Class getGuiHandlerClass() - { - return this.guiHandlerClass; - } - - public int getId() - { - return this.id; - } -} - diff --git a/src/Java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java b/src/Java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java deleted file mode 100644 index 0ad4b9b51f..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java +++ /dev/null @@ -1,121 +0,0 @@ -package gtPlusPlus.core.gui.item; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_BackpackBase; -import gtPlusPlus.core.inventories.BaseInventoryBackpack; -import gtPlusPlus.core.lib.CORE; - -public class GuiBaseBackpack extends GuiContainer -{ - /** x and y size of the inventory window in pixels. Defined as float, passed as int - * These are used for drawing the player model. */ - private float xSize_lo; - private float ySize_lo; - - /** The FontRenderer used by GuiScreen */ - protected FontRenderer fontRenderer; - - /** ResourceLocation takes 2 parameters: ModId, path to texture at the location: - * "src/minecraft/assets/modid/" - * - * I have provided a sample texture file that works with this tutorial. Download it - * from Forge_Tutorials/textures/gui/ - */ - private static final ResourceLocation iconLocation = new ResourceLocation(CORE.MODID, "textures/gui/itemBackpack.png"); - - /** The inventory to render on screen */ - private final BaseInventoryBackpack inventory; - - public GuiBaseBackpack(final Container_BackpackBase containerItem) - { - super(containerItem); - this.inventory = containerItem.inventory; - } - - /** - * Draws the screen and all the components in it. - */ - @Override - public void drawScreen(final int par1, final int par2, final float par3) - { - super.drawScreen(par1, par2, par3); - this.xSize_lo = par1; - this.ySize_lo = par2; - } - - /** - * Draw the foreground layer for the GuiContainer (everything in front of the items) - */ - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) - { - final String s = this.inventory.hasCustomInventoryName() ? this.inventory.getInventoryName() : this.inventory.getInventoryName(); - //this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 0, 4210752); - //this.fontRenderer.drawString(I18n.translate("container.inventory"), 26, this.ySize - 96 + 4, 4210752); - } - - /** - * Draw the background layer for the GuiContainer (everything behind the items) - */ - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(iconLocation); - final int k = (this.width - this.xSize) / 2; - final int l = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); - final int i1; - drawPlayerModel(k + 51, l + 75, 30, k + 51 - this.xSize_lo, (l + 75) - 50 - this.ySize_lo, this.mc.thePlayer); - } - - /** - * This renders the player model in standard inventory position (in later versions of Minecraft / Forge, you can - * simply call GuiInventory.drawEntityOnScreen directly instead of copying this code) - */ - public static void drawPlayerModel(final int x, final int y, final int scale, final float yaw, final float pitch, final EntityLivingBase entity) { - GL11.glEnable(GL11.GL_COLOR_MATERIAL); - GL11.glPushMatrix(); - GL11.glTranslatef(x, y, 50.0F); - GL11.glScalef(-scale, scale, scale); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - final float f2 = entity.renderYawOffset; - final float f3 = entity.rotationYaw; - final float f4 = entity.rotationPitch; - final float f5 = entity.prevRotationYawHead; - final float f6 = entity.rotationYawHead; - GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); - RenderHelper.enableStandardItemLighting(); - GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-((float) Math.atan(pitch / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F); - entity.renderYawOffset = (float) Math.atan(yaw / 40.0F) * 20.0F; - entity.rotationYaw = (float) Math.atan(yaw / 40.0F) * 40.0F; - entity.rotationPitch = -((float) Math.atan(pitch / 40.0F)) * 20.0F; - entity.rotationYawHead = entity.rotationYaw; - entity.prevRotationYawHead = entity.rotationYaw; - GL11.glTranslatef(0.0F, entity.yOffset, 0.0F); - RenderManager.instance.playerViewY = 180.0F; - RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); - entity.renderYawOffset = f2; - entity.rotationYaw = f3; - entity.rotationPitch = f4; - entity.prevRotationYawHead = f5; - entity.rotationYawHead = f6; - GL11.glPopMatrix(); - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); - GL11.glDisable(GL11.GL_TEXTURE_2D); - OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - } -} diff --git a/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java b/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java deleted file mode 100644 index ed347e8d30..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java +++ /dev/null @@ -1,564 +0,0 @@ -package gtPlusPlus.core.gui.item; - -import java.util.LinkedHashSet; -import java.util.Set; - -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreenBook; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.container.Container_Grindle; -import gtPlusPlus.core.inventories.BaseInventoryGrindle; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class GuiBaseGrindle extends GuiContainer { - - /** The FontRenderer used by GuiScreen */ - protected FontRenderer fontRenderer; - - private GrindleGuiButton mButtonNextPage; - private GrindleGuiButton mButtonPreviousPage; - private String[][] mPageDataArray; - private short mCurrentPage = 0; - - private static final ResourceLocation iconLocation = new ResourceLocation(CORE.MODID, "textures/gui/itemGrindle.png"); - - /** The inventory to render on screen */ - private final BaseInventoryGrindle inventory; - - public GuiBaseGrindle(final Container_Grindle containerItem) { - super(containerItem); - this.inventory = containerItem.inventory; - } - - /** - * Draws the screen and all the components in it. - */ - @Override - public void drawScreen(final int par1, final int par2, final float par3) { - super.drawScreen(par1, par2, par3); - this.updateButtons(); - } - - /** - * Draw the foreground layer for the GuiContainer (everything in front of the - * items) - */ - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - - try { - - // Title - this.fontRendererObj.drawStringWithShadow(I18n.format("Gregtech Information Transponder", new Object[0]), 0, - -12, Utils.rgbtoHexValue(255, 255, 255)); - ItemStack aStack = this.inventory.getStackInSlot(0); - - if (aStack != null) { - - GrindleData aDataCurrent = new GrindleData(aStack); - - if (aDataCurrent.mValid) { - - // Debug NBT Information - //NBTUtils.tryIterateNBTData(aStack); - - this.fontRendererObj.drawString(I18n.format(aDataCurrent.mTitle), 10, 8, Utils.rgbtoHexValue(125, 255, 125)); - - int tTier = aDataCurrent.mExtraInformation; - if (tTier >= 0) { - //Draw the GUI - // List prospection - this.fontRendererObj.drawString(I18n.format(aDataCurrent.mTierDim+" | Page: "+this.mCurrentPage, new Object[0]), 10, 18, Utils.rgbtoHexValue(125, 255, 125)); - // Divider - this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 23, Utils.rgbtoHexValue(125, 125, 255)); - // Pos data - this.fontRendererObj.drawString(I18n.format(aDataCurrent.mPosInfo, new Object[0]), 10, 29, Utils.rgbtoHexValue(125, 125, 255)); - // Divider - this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 35, Utils.rgbtoHexValue(125, 125, 255)); - int aLastYUsed = 41; - - int posOuter = 0; - int posInner = 0; - - mPageDataArray = new String[MathUtils.roundToClosestInt(Math.ceil(aDataCurrent.mListData.size() / 9.00))][9]; - for (String e : aDataCurrent.mListData) { - if (e != null) { - mPageDataArray[posInner][posOuter] = e; - if (posOuter < 8) { - posOuter++; - } - else { - posOuter = 0; - posInner++; - } - } - else { - continue; - } - } - - String[] aCurrentPage = mPageDataArray[this.mCurrentPage]; - - if (aCurrentPage != null) { - //Logger.INFO("valid Current page " + this.mCurrentPage); - if (aCurrentPage.length > 0) { - for (int i=0;i 0) { - if (!aCP.toLowerCase().contains("empty") && !aCP.toLowerCase().contains("null")) { - this.fontRendererObj.drawString(I18n.format(aCP), 10, aLastYUsed, Utils.rgbtoHexValue(125, 255, 125)); - aLastYUsed += 9; - } - } - } - } - } - } - - - - - } - - //Non-Prospecting Data - else { - //Draw the GUI - // List prospection - this.fontRendererObj.drawString(I18n.format(aDataCurrent.mTierDim, new Object[0]), 10, 18, Utils.rgbtoHexValue(125, 255, 125)); - // Divider - this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 23, Utils.rgbtoHexValue(125, 125, 255)); - // Pos data - this.fontRendererObj.drawString(I18n.format(aDataCurrent.mPosInfo, new Object[0]), 10, 29, Utils.rgbtoHexValue(125, 125, 255)); - // Divider - this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 35, Utils.rgbtoHexValue(125, 125, 255)); - int aLastYUsed = 41; - /*for (int i=0;i= 0) { - if (this.mPageDataArray != null) { - if (this.mCurrentPage < (this.mPageDataArray.length - 1)) { - this.mButtonNextPage.visible = true; - } else { - this.mButtonNextPage.visible = false; - } - } else { - this.mButtonNextPage.visible = false; - } - } - if (this.mCurrentPage > 0) { - this.mButtonPreviousPage.visible = true; - } - else { - this.mButtonPreviousPage.visible = false; - } - } - - - /** - * Scrolling Related - */ - @Override - protected void actionPerformed(GuiButton aButton) { - if (aButton.enabled && aButton.visible) { - if (aButton.id == 1) { - if (this.mCurrentPage < this.mPageDataArray.length - 1) { - ++this.mCurrentPage; - } - } else if (aButton.id == 2) { - if (this.mCurrentPage > 0) { - --this.mCurrentPage; - } - } - this.updateButtons(); - } - } - - /** - * Handles mouse input. - */ - @Override - public void handleMouseInput() { - super.handleMouseInput(); - int i = Mouse.getEventDWheel(); - /* - * if (i != 0) { - * - * - * this.currentScroll = (float) ((double) this.currentScroll - (double) i / - * (double) j); - * - * if (this.currentScroll < 0.0F) { this.currentScroll = 0.0F; } - * - * if (this.currentScroll > 1.0F) { this.currentScroll = 1.0F; } - * - * this.scrollTo(this.currentScroll); } - */ - } - - /** - * Called when the mouse is moved or a mouse button is released. Signature: - * (mouseX, mouseY, which) which==-1 is mouseMove, which==0 or which==1 is - * mouseUp - */ - @Override - protected void mouseMovedOrUp(int p_146286_1_, int p_146286_2_, int p_146286_3_) { - /* - * if (p_146286_3_ == 0) { int l = p_146286_1_ - this.guiLeft; int i1 = - * p_146286_2_ - this.guiTop; CreativeTabs[] acreativetabs = - * CreativeTabs.creativeTabArray; int j1 = acreativetabs.length; - * - * for (int k1 = 0; k1 < j1; ++k1) { CreativeTabs creativetabs = - * acreativetabs[k1]; - * - * if (creativetabs != null && this.func_147049_a(creativetabs, l, i1)) { - * this.setCurrentCreativeTab(creativetabs); return; } } } - */ - - super.mouseMovedOrUp(p_146286_1_, p_146286_2_, p_146286_3_); - } - - /** - * Allows Mouseover Tooltips - */ - @Override - protected void renderToolTip(ItemStack aStack, int p_146285_2_, int p_146285_3_) { - super.renderToolTip(aStack, p_146285_2_, p_146285_3_); - } - - /** - * Custom Buttons - */ - - @SideOnly(Side.CLIENT) - static class GrindleGuiButton extends GuiButton { - - public static final ResourceLocation mBookTexture; - - static { - ResourceLocation r; - try { - r = (ResourceLocation) ReflectionUtils.getField(GuiScreenBook.class, "bookGuiTextures").get(null); - - } catch (IllegalArgumentException | IllegalAccessException e) { - r = new ResourceLocation("textures/gui/book.png"); - } - mBookTexture = r; - } - - private final boolean aPageForward; - - public GrindleGuiButton(int aID, int aX, int aY, boolean aForwards) { - this(aID, aX, aY, 20, 12, aForwards); - } - - public GrindleGuiButton(int aID, int aX, int aY, int aWidth, int aHeight, boolean aForwards) { - super(aID, aX, aY, aWidth, aHeight, ""); - this.aPageForward = aForwards; - } - - /** - * Draws this button to the screen. - */ - public void drawButton(Minecraft aGame, int aX, int aY) { - if (this.visible) { - boolean flag = aX >= this.xPosition && aY >= this.yPosition - && aX < this.xPosition + this.width && aY < this.yPosition + this.height; - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - aGame.getTextureManager().bindTexture(iconLocation); - int k = 0; - int l = 192; - - if (flag) { - k += 23; - } - - if (!this.aPageForward) { - l += 13; - } - - this.drawTexturedModalRect(this.xPosition, this.yPosition, k, l, 22, 12); - } - } - } - - - public static class GrindleData { - - public static enum GrindleMode { - PROSPECTING(0), - ELEMENT(1); - private final int aModeID; - private GrindleMode (final int aMode) - { - this.aModeID = aMode; - } - - public int getMode() { - return this.aModeID; - } - } - - final boolean mValid; - final ItemStack mStack; - final String mTitle, mPosInfo, mTierDim; - final AutoMap mListData; - final GrindleMode mMode; - final int mExtraInformation; - - - public GrindleData(ItemStack iStack) { - - if (iStack == null) { - mValid = false; - mStack = null; - mTitle = null; - mListData = null; - mMode = null; - mExtraInformation = 0; - this.mTierDim = ""; - this.mPosInfo = ""; - } else { - - this.mStack = iStack; - - int aType = -1; - boolean isProspecting = false; - - // If Input stack is a Data stick/Orb, set a valid type. - if (GT_Utility.areStacksEqual(iStack, CI.getDataStick(), true)) { - aType = 0; - } else if (GT_Utility.areStacksEqual(iStack, CI.getDataOrb(), true)) { - aType = 1; - } - - NBTTagCompound tNBT = iStack.getTagCompound(); - if (tNBT == null) { - tNBT = new NBTTagCompound(); - } - - mTitle = tNBT.hasKey("title") ? tNBT.getString("title") - : (aType == 0 ? "Empty Data Stick" : (aType == 1 ? "Empty Data Orb" : "Unknown Item")); - if (mTitle.toLowerCase().contains("raw prospection data")) { - isProspecting = true; - } - - byte tTier = -1; - if (isProspecting) { - if (!tNBT.hasKey("prospection_tier") && tNBT.hasKey("prospection")) { - tTier = 0; - } else if (tNBT.hasKey("prospection_tier") && !tNBT.hasKey("prospection")) { - tTier = tNBT.getByte("prospection_tier"); - } - } - - mExtraInformation = isProspecting ? tTier : -1; - - if (tTier >= 0) { - String xPos, yPos, zPos, aDim; - String aPositionString, aInfoString; - Set aOreTypes = new LinkedHashSet(); - Set aOilTypes = new LinkedHashSet(); - - // Set variables that are shared between prospection types. - if (tTier == 0) { - String tData = tNBT.getString("prospection"); - String[] tDataArray = tData.split(","); - xPos = tDataArray[0]; - yPos = tDataArray[1]; - zPos = tDataArray[2]; - aDim = tDataArray[3]; - aOilTypes.add("Oil Type: " + tDataArray[5]); - aOilTypes.add("--------------------"); - aOreTypes.add("Ore Types: "); - for (int i = 6; tDataArray.length > i; i++) { - aOreTypes.add("-" + tDataArray[i]); - } - } else { - String tPos = tNBT.getString("prospection_pos"); - String[] tPosData = tPos.split(" "); - xPos = tPosData[1]; - yPos = tPosData[3]; - zPos = tPosData[5]; - aDim = tPosData[7]; - // Oil - String tOil = tNBT.getString("prospection_oils"); - String[] tOilData = tOil.split("\\|"); - if (tOilData.length > 0) { - aOilTypes.add("Oil Types:"); - for (String s : tOilData) { - if (s != null) { - aOilTypes.add(s); - } - } - aOilTypes.add("--------------------"); - } - - // Near - String tOresNear = tNBT.getString("prospection_near"); - String[] tOresNearData = tOresNear.split("\\|"); - // Middle - String tOresMid = tNBT.getString("prospection_middle"); - String[] tOresMidData = tOresMid.split("\\|"); - // Far - String tOresFar = tNBT.getString("prospection_far"); - String[] tOresFarData = tOresFar.split("\\|"); - - if ((tOresNearData.length + tOresMidData.length + tOresFarData.length) > 0) { - aOreTypes.add("Ore Types:"); - if (tOresNearData.length > 0) { - for (String s : tOresNearData) { - if (s != null) { - aOreTypes.add("-" + s + " - Near"); - } - } - } - if (tOresMidData.length > 0) { - for (String s : tOresMidData) { - if (s != null) { - aOreTypes.add("-" + s + " - Mid"); - } - } - } - if (tOresFarData.length > 0) { - for (String s : tOresFarData) { - if (s != null) { - aOreTypes.add("-" + s + " - Far"); - } - } - } - } - } - - mListData = new AutoMap(); - if (aOilTypes.size() > 0) { - for (String aOils : aOilTypes) { - if (aOils != null && aOils.length() > 0) { - mListData.put(aOils); - } - } - } - - if (aOreTypes.size() > 0) { - for (String aOres : aOreTypes) { - if (aOres != null && aOres.length() > 0) { - mListData.put(aOres); - } - } - } - - // Set Types - mMode = GrindleMode.PROSPECTING; - this.mTierDim = (aInfoString = "Tier: " + tTier + " | Dim: " + aDim); - this.mPosInfo = (aPositionString = "X:" + xPos + ", Y:" + yPos + ", Z:" + zPos); - this.mValid = true; - } - - // Non-Prospectic Data - else { - mValid = true; - mListData = null; - mMode = GrindleMode.ELEMENT; - this.mTierDim = "PLACEHOLDER"; - this.mPosInfo = "PLACEHOLDER"; - } - - } - - } - - } - - -} diff --git a/src/Java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java b/src/Java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java deleted file mode 100644 index cf94fbbb84..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java +++ /dev/null @@ -1,490 +0,0 @@ -package gtPlusPlus.core.gui.item; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.lwjgl.input.Keyboard; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.network.PacketBuffer; -import net.minecraft.network.play.client.C17PacketCustomPayload; -import net.minecraft.util.ChatAllowedCharacters; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_Grindle; -import gtPlusPlus.core.inventories.BaseInventoryGrindle; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; - -@SideOnly(Side.CLIENT) -public class GuiScreenGrindle extends GuiContainer { - private static final Logger logger = LogManager.getLogger(); - private static final ResourceLocation bookGuiTextures = new ResourceLocation("textures/gui/book.png"); - /** The player editing the book */ - private final EntityPlayer editingPlayer; - private final ItemStack bookObj; - /** Whether the book is signed or can still be edited */ - private final boolean bookIsUnsigned; - private boolean field_146481_r; - private boolean field_146480_s; - /** Update ticks since the gui was opened */ - private int updateCount; - private final int bookImageWidth = 192; - private final int bookImageHeight = 192; - private int bookTotalPages = 1; - private int currPage; - private NBTTagList bookPages; - private String bookTitle = ""; - private GuiScreenGrindle.NextPageButton buttonNextPage; - private GuiScreenGrindle.NextPageButton buttonPreviousPage; - private GuiButton buttonDone; - /** The GuiButton to sign this book. */ - private GuiButton buttonSign; - private GuiButton buttonFinalize; - private GuiButton buttonCancel; - - // Texture - private static final ResourceLocation iconLocation = new ResourceLocation(CORE.MODID, - "textures/gui/itemGrindle.png"); - - /** The inventory to render on screen */ - private final BaseInventoryGrindle inventory; - - public GuiScreenGrindle(final Container_Grindle containerItem, final EntityPlayer player) { - super(containerItem); - this.inventory = containerItem.inventory; - this.editingPlayer = player; - this.bookObj = this.inventory.getStackInSlot(0); - this.bookIsUnsigned = (this.bookObj == null ? true : false); - - if (this.bookObj != null) { - if (this.bookObj.hasTagCompound()) { - final NBTTagCompound nbttagcompound = this.bookObj.getTagCompound(); - this.bookPages = nbttagcompound.getTagList("pages", 8); - - if (this.bookPages != null) { - this.bookPages = (NBTTagList) this.bookPages.copy(); - this.bookTotalPages = this.bookPages.tagCount(); - - if (this.bookTotalPages < 1) { - this.bookTotalPages = 1; - } - } - } - - - if ((this.bookPages == null) && this.bookIsUnsigned) { this.bookPages = - new NBTTagList(); this.bookPages.appendTag(new NBTTagString("")); - this.bookTotalPages = 1; } - - } - } - - /** - * Called from the main game loop to update the screen. - */ - @Override - public void updateScreen() { - super.updateScreen(); - ++this.updateCount; - } - - /** - * Adds the buttons (and other controls) to the screen in question. - */ - @Override - @SuppressWarnings("unchecked") - public void initGui() { - this.buttonList.clear(); - Keyboard.enableRepeatEvents(true); - - if (this.bookIsUnsigned) { - this.buttonList.add(this.buttonSign = new GuiButton(3, (this.width / 2) - 100, 4 + this.bookImageHeight, 98, - 20, I18n.format("book.signButton", new Object[0]))); - this.buttonList.add(this.buttonDone = new GuiButton(0, (this.width / 2) + 2, this.bookImageHeight-4, 98, - 20, I18n.format("gui.close", new Object[0]))); - this.buttonList.add(this.buttonFinalize = new GuiButton(5, (this.width / 2) - 100, 4 + this.bookImageHeight, - 98, 20, I18n.format("book.finalizeButton", new Object[0]))); - this.buttonList.add(this.buttonCancel = new GuiButton(4, (this.width / 2) + 2, 4 + this.bookImageHeight, 98, - 20, I18n.format("gui.cancel", new Object[0]))); - } - else { - this.buttonList.add(this.buttonDone = new GuiButton(0, (this.width / 2) - 100, this.bookImageHeight+100, - 200, 20, I18n.format("gui.done", new Object[0]))); - } - - final int i = (this.width - this.bookImageWidth) / 2; - final byte b0 = 2; - this.buttonList.add(this.buttonNextPage = new GuiScreenGrindle.NextPageButton(1, i + 120, b0 + 154, true)); - this.buttonList.add(this.buttonPreviousPage = new GuiScreenGrindle.NextPageButton(2, i + 38, b0 + 154, false)); - this.updateButtons(); - } - - /** - * Called when the screen is unloaded. Used to disable keyboard repeat - * events - */ - @Override - public void onGuiClosed() { - Keyboard.enableRepeatEvents(false); - } - - private void updateButtons() { - this.buttonNextPage.visible = !this.field_146480_s - && ((this.currPage < (this.bookTotalPages - 1)) || this.bookIsUnsigned); - this.buttonPreviousPage.visible = !this.field_146480_s && (this.currPage > 0); - this.buttonDone.visible = !this.bookIsUnsigned || !this.field_146480_s; - - if (this.bookIsUnsigned) { - this.buttonSign.visible = !this.field_146480_s; - this.buttonCancel.visible = this.field_146480_s; - this.buttonFinalize.visible = this.field_146480_s; - this.buttonFinalize.enabled = this.bookTitle.trim().length() > 0; - } - } - - private void sendBookToServer(final boolean p_146462_1_) { - if (this.bookIsUnsigned && this.field_146481_r) { - if (this.bookPages != null) { - String s; - - while (this.bookPages.tagCount() > 1) { - s = this.bookPages.getStringTagAt(this.bookPages.tagCount() - 1); - - if (s.length() != 0) { - break; - } - - this.bookPages.removeTag(this.bookPages.tagCount() - 1); - } - - if (this.bookObj.hasTagCompound()) { - final NBTTagCompound nbttagcompound = this.bookObj.getTagCompound(); - nbttagcompound.setTag("pages", this.bookPages); - } - else { - this.bookObj.setTagInfo("pages", this.bookPages); - } - - s = "MC|BEdit"; - - if (p_146462_1_) { - s = "MC|BSign"; - this.bookObj.setTagInfo("author", new NBTTagString(this.editingPlayer.getCommandSenderName())); - this.bookObj.setTagInfo("title", new NBTTagString(this.bookTitle.trim())); - this.bookObj.func_150996_a(ModItems.itemGrindleTablet); - } - - final ByteBuf bytebuf = Unpooled.buffer(); - - try { - (new PacketBuffer(bytebuf)).writeItemStackToBuffer(this.bookObj); - this.mc.getNetHandler().addToSendQueue(new C17PacketCustomPayload(s, bytebuf)); - } - catch (final Exception exception) { - logger.error("Couldn\'t send book info", exception); - } - finally { - bytebuf.release(); - } - } - } - } - - @Override - protected void actionPerformed(final GuiButton button) { - if (button.enabled) { - if (button.id == 0) { - this.mc.displayGuiScreen((GuiScreen) null); - this.sendBookToServer(false); - } - else if ((button.id == 3) && this.bookIsUnsigned) { - this.field_146480_s = true; - } - else if (button.id == 1) { - if (this.currPage < (this.bookTotalPages - 1)) { - ++this.currPage; - } - else if (this.bookIsUnsigned) { - this.addNewPage(); - - if (this.currPage < (this.bookTotalPages - 1)) { - ++this.currPage; - } - } - } - else if (button.id == 2) { - if (this.currPage > 0) { - --this.currPage; - } - } - else if ((button.id == 5) && this.field_146480_s) { - this.sendBookToServer(true); - this.mc.displayGuiScreen((GuiScreen) null); - } - else if ((button.id == 4) && this.field_146480_s) { - this.field_146480_s = false; - } - - this.updateButtons(); - } - } - - private void addNewPage() { - if ((this.bookPages != null) && (this.bookPages.tagCount() < 50)) { - this.bookPages.appendTag(new NBTTagString("")); - ++this.bookTotalPages; - this.field_146481_r = true; - } - } - - /** - * Fired when a key is typed. This is the equivalent of - * KeyListener.keyTyped(KeyEvent e). - */ - @Override - protected void keyTyped(final char p_73869_1_, final int p_73869_2_) { - super.keyTyped(p_73869_1_, p_73869_2_); - - if (this.bookIsUnsigned) { - if (this.field_146480_s) { - this.func_146460_c(p_73869_1_, p_73869_2_); - } - else { - this.keyTypedInBook(p_73869_1_, p_73869_2_); - } - } - } - - /** - * Processes keystrokes when editing the text of a book - */ - private void keyTypedInBook(final char p_146463_1_, final int p_146463_2_) { - switch (p_146463_1_) { - case 22: - this.func_146459_b(GuiScreen.getClipboardString()); - return; - default: - switch (p_146463_2_) { - case 14: - final String s = this.func_146456_p(); - - if (s.length() > 0) { - this.func_146457_a(s.substring(0, s.length() - 1)); - } - - return; - case 28: - case 156: - this.func_146459_b("\n"); - return; - default: - if (ChatAllowedCharacters.isAllowedCharacter(p_146463_1_)) { - this.func_146459_b(Character.toString(p_146463_1_)); - } - } - } - } - - private void func_146460_c(final char p_146460_1_, final int p_146460_2_) { - switch (p_146460_2_) { - case 14: - if (!this.bookTitle.isEmpty()) { - this.bookTitle = this.bookTitle.substring(0, this.bookTitle.length() - 1); - this.updateButtons(); - } - - return; - case 28: - case 156: - if (!this.bookTitle.isEmpty()) { - this.sendBookToServer(true); - this.mc.displayGuiScreen((GuiScreen) null); - } - - return; - default: - if ((this.bookTitle.length() < 16) && ChatAllowedCharacters.isAllowedCharacter(p_146460_1_)) { - this.bookTitle = this.bookTitle + Character.toString(p_146460_1_); - this.updateButtons(); - this.field_146481_r = true; - } - } - } - - private String func_146456_p() { - return (this.bookPages != null) && (this.currPage >= 0) && (this.currPage < this.bookPages.tagCount()) - ? this.bookPages.getStringTagAt(this.currPage) : ""; - } - - private void func_146457_a(final String p_146457_1_) { - if ((this.bookPages != null) && (this.currPage >= 0) && (this.currPage < this.bookPages.tagCount())) { - this.bookPages.func_150304_a(this.currPage, new NBTTagString(p_146457_1_)); - this.field_146481_r = true; - } - } - - private void func_146459_b(final String p_146459_1_) { - final String s1 = this.func_146456_p(); - final String s2 = s1 + p_146459_1_; - final int i = this.fontRendererObj.splitStringWidth(s2 + "" + EnumChatFormatting.BLACK + "_", 118); - - if ((i <= 118) && (s2.length() < 256)) { - this.func_146457_a(s2); - } - } - - /** - * Draws the screen and all the components in it. - */ - @Override - public void drawScreen(final int p_73863_1_, final int p_73863_2_, final float p_73863_3_) { - - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(iconLocation); - final int k = (this.width - this.xSize) / 2; - final int l2 = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(k, l2, 0, 0, this.xSize, this.ySize); - - //GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - //this.mc.getTextureManager().bindTexture(iconLocation); - //final int k = (this.width - this.bookImageWidth) / 2; - //this.drawTexturedModalRect(k, b0, 0, 0, this.bookImageWidth, - // this.bookImageHeight); - - String s; - String s1; - int l; - final byte b0 = 2; - - if (this.inventory.getStackInSlot(0) != null) { - this.fontRendererObj.drawString( - I18n.format("" + NBTUtils.getBookTitle(this.inventory.getStackInSlot(0)), new Object[0]), 10, 8, - Utils.rgbtoHexValue(125, 255, 125)); - } - - if (this.field_146480_s) { - s = this.bookTitle; - - if (this.bookIsUnsigned) { - if (((this.updateCount / 6) % 2) == 0) { - s = s + "" + EnumChatFormatting.BLACK + "_"; - } - else { - s = s + "" + EnumChatFormatting.GRAY + "_"; - } - } - - s1 = I18n.format("book.editTitle", new Object[0]); - l = this.fontRendererObj.getStringWidth(s1); - this.fontRendererObj.drawString(s1, k + 36 + ((116 - l) / 2), b0 + 16 + 16, 0); - final int i1 = this.fontRendererObj.getStringWidth(s); - this.fontRendererObj.drawString(s, k + 36 + ((116 - i1) / 2), b0 + 48, 0); - final String s2 = I18n.format("book.byAuthor", new Object[] { this.editingPlayer.getCommandSenderName() }); - final int j1 = this.fontRendererObj.getStringWidth(s2); - this.fontRendererObj.drawString(EnumChatFormatting.DARK_GRAY + s2, k + 36 + ((116 - j1) / 2), b0 + 48 + 10, - 0); - final String s3 = I18n.format("book.finalizeWarning", new Object[0]); - this.fontRendererObj.drawSplitString(s3, k + 36, b0 + 80, 116, 0); - } - else { - s = I18n.format("book.pageIndicator", - new Object[] { Integer.valueOf(this.currPage + 1), Integer.valueOf(this.bookTotalPages) }); - s1 = ""; - - if ((this.bookPages != null) && (this.currPage >= 0) && (this.currPage < this.bookPages.tagCount())) { - s1 = this.bookPages.getStringTagAt(this.currPage); - } - - if (this.bookIsUnsigned) { - if (this.fontRendererObj.getBidiFlag()) { - s1 = s1 + "_"; - } - else if (((this.updateCount / 6) % 2) == 0) { - s1 = s1 + "" + EnumChatFormatting.BLACK + "_"; - } - else { - s1 = s1 + "" + EnumChatFormatting.GRAY + "_"; - } - } - - l = this.fontRendererObj.getStringWidth(s); - this.fontRendererObj.drawString(s, ((k - l) + this.bookImageWidth) - 44, b0 + 16, 0); - //this.fontRendererObj.drawString(s, k+36, b0 + 16, 0); - this.fontRendererObj.drawSplitString(s1, k + 36, b0 + 16 + 16, 116, 0); - //this.fontRendererObj.drawSplitString(s1, k, b0 + 16 + 16, 116, 0); - } - - super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); - } - - @SideOnly(Side.CLIENT) - static class NextPageButton extends GuiButton { - private final boolean field_146151_o; - - public NextPageButton(final int p_i1079_1_, final int p_i1079_2_, final int p_i1079_3_, - final boolean p_i1079_4_) { - super(p_i1079_1_, p_i1079_2_, p_i1079_3_, 23, 13, ""); - this.field_146151_o = p_i1079_4_; - } - - /** - * Draws this button to the screen. - */ - @Override - public void drawButton(final Minecraft p_146112_1_, final int p_146112_2_, final int p_146112_3_) { - if (this.visible) { - final boolean flag = (p_146112_2_ >= this.xPosition) && (p_146112_3_ >= this.yPosition) - && (p_146112_2_ < (this.xPosition + this.width)) - && (p_146112_3_ < (this.yPosition + this.height)); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - p_146112_1_.getTextureManager().bindTexture(GuiScreenGrindle.bookGuiTextures); - int k = 0; - int l = 192; - - if (flag) { - k += 23; - } - - if (!this.field_146151_o) { - l += 13; - } - - this.drawTexturedModalRect(this.xPosition, this.yPosition, k, l, 23, 13); - } - } - } - - /** - * Draw the background layer for the GuiContainer (everything behind the - * items) - */ - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(iconLocation); - final int k = (this.width - this.xSize) / 2; - final int l = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); - final int i1; - // drawPlayerModel(k + 51, l + 75, 30, k + 51 - this.xSize_lo, (l + 75) - // - 50 - this.ySize_lo, this.mc.thePlayer); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java b/src/Java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java deleted file mode 100644 index 97ec58bfa4..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java +++ /dev/null @@ -1,116 +0,0 @@ -package gtPlusPlus.core.gui.item.box; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ResourceLocation; - -public class GuiBaseBox extends GuiContainer { - /** - * x and y size of the inventory window in pixels. Defined as float, passed as - * int These are used for drawing the player model. - */ - private float xSize_lo; - private float ySize_lo; - - /** - * ResourceLocation takes 2 parameters: ModId, path to texture at the location: - * "src/minecraft/assets/modid/" - * - * I have provided a sample texture file that works with this tutorial. Download - * it from Forge_Tutorials/textures/gui/ - */ - private final ResourceLocation iconLocation; - - /** The inventory to render on screen */ - private final CustomBoxInventory inventory; - - public GuiBaseBox(ContainerBoxBase containerItem, ResourceLocation aGuiTexture) { - super(containerItem); - this.inventory = containerItem.getInventoryObject(); - this.iconLocation = aGuiTexture; - } - - /** - * Draws the screen and all the components in it. - */ - public void drawScreen(int par1, int par2, float par3) { - super.drawScreen(par1, par2, par3); - this.xSize_lo = (float) par1; - this.ySize_lo = (float) par2; - } - - /** - * Draw the foreground layer for the GuiContainer (everything in front of the - * items) - */ - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - String s = this.inventory.hasCustomInventoryName() ? this.inventory.getInventoryName() - : I18n.format(this.inventory.getInventoryName()); - this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 0, 4210752); - this.fontRendererObj.drawString(I18n.format("container.inventory"), 26, this.ySize - 96 + 4, 4210752); - } - - /** - * Draw the background layer for the GuiContainer (everything behind the items) - */ - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(iconLocation); - int k = (this.width - this.xSize) / 2; - int l = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); - int i1; - drawPlayerModel(k + 51, l + 75, 30, (float) (k + 51) - this.xSize_lo, (float) (l + 75 - 50) - this.ySize_lo, - this.mc.thePlayer); - } - - /** - * This renders the player model in standard inventory position (in later - * versions of Minecraft / Forge, you can simply call - * GuiInventory.drawEntityOnScreen directly instead of copying this code) - */ - public static void drawPlayerModel(int x, int y, int scale, float yaw, float pitch, EntityLivingBase entity) { - GL11.glEnable(GL11.GL_COLOR_MATERIAL); - GL11.glPushMatrix(); - GL11.glTranslatef(x, y, 50.0F); - GL11.glScalef(-scale, scale, scale); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - float f2 = entity.renderYawOffset; - float f3 = entity.rotationYaw; - float f4 = entity.rotationPitch; - float f5 = entity.prevRotationYawHead; - float f6 = entity.rotationYawHead; - GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); - RenderHelper.enableStandardItemLighting(); - GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-((float) Math.atan(pitch / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F); - entity.renderYawOffset = (float) Math.atan(yaw / 40.0F) * 20.0F; - entity.rotationYaw = (float) Math.atan(yaw / 40.0F) * 40.0F; - entity.rotationPitch = -((float) Math.atan(pitch / 40.0F)) * 20.0F; - entity.rotationYawHead = entity.rotationYaw; - entity.prevRotationYawHead = entity.rotationYaw; - GL11.glTranslatef(0.0F, entity.yOffset, 0.0F); - RenderManager.instance.playerViewY = 180.0F; - RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); - entity.renderYawOffset = f2; - entity.rotationYaw = f3; - entity.rotationPitch = f4; - entity.prevRotationYawHead = f5; - entity.rotationYawHead = f6; - GL11.glPopMatrix(); - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); - GL11.glDisable(GL11.GL_TEXTURE_2D); - OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java b/src/Java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java deleted file mode 100644 index 28e3913ac8..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.gui.item.box; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.util.ResourceLocation; - -public class LunchBoxGui extends GuiBaseBox { - public LunchBoxGui(ContainerBoxBase containerItem) { - super(containerItem, new ResourceLocation(CORE.MODID, "textures/gui/schematic_rocket_GS1.png")); - } -} diff --git a/src/Java/gtPlusPlus/core/gui/item/box/MagicBagGui.java b/src/Java/gtPlusPlus/core/gui/item/box/MagicBagGui.java deleted file mode 100644 index 958cdd3c70..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/box/MagicBagGui.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.gui.item.box; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.util.ResourceLocation; - -public class MagicBagGui extends GuiBaseBox { - public MagicBagGui(ContainerBoxBase containerItem) { - super(containerItem, new ResourceLocation(CORE.MODID, "textures/gui/schematic_rocket_GS1.png")); - } -} diff --git a/src/Java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java b/src/Java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java deleted file mode 100644 index c440c017e9..0000000000 --- a/src/Java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.gui.item.box; - -import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.util.ResourceLocation; - -public class ToolBoxGui extends GuiBaseBox { - public ToolBoxGui(ContainerBoxBase containerItem) { - super(containerItem, new ResourceLocation(CORE.MODID, "textures/gui/schematic_rocket_GS1.png")); - } -} diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java deleted file mode 100644 index 2ab5b58aa7..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; -import gtPlusPlus.core.container.Container_CircuitProgrammer; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; - -@SideOnly(Side.CLIENT) -public class GUI_CircuitProgrammer extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/CircuitProgrammer.png"); - - public GUI_CircuitProgrammer(final InventoryPlayer player_inventory, final TileEntityCircuitProgrammer te){ - super(new Container_CircuitProgrammer(player_inventory, te)); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - super.drawGuiContainerForegroundLayer(i, j); - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - //This method is called when the Gui is first called! - @Override - public void initGui(){ - super.initGui(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java deleted file mode 100644 index 094629ae48..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_DecayablesChest; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; - -@SideOnly(Side.CLIENT) -public class GUI_DecayablesChest extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/FishTrap.png"); - - public GUI_DecayablesChest(final InventoryPlayer player_inventory, final TileEntityDecayablesChest te){ - super(new Container_DecayablesChest(player_inventory, te)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_EggBox.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_EggBox.java deleted file mode 100644 index 49d9890d3a..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_EggBox.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_EggBox; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityEggBox; - -@SideOnly(Side.CLIENT) -public class GUI_EggBox extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/FishTrap.png"); - - public GUI_EggBox(final InventoryPlayer player_inventory, final TileEntityEggBox te){ - super(new Container_EggBox(player_inventory, te)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - this.fontRendererObj.drawString(I18n.format("container.EggBox", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java deleted file mode 100644 index 3d3bad7ece..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_FishTrap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; - -@SideOnly(Side.CLIENT) -public class GUI_FishTrap extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/FishTrap.png"); - - public GUI_FishTrap(final InventoryPlayer player_inventory, final TileEntityFishTrap te){ - super(new Container_FishTrap(player_inventory, te)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java deleted file mode 100644 index 44d5c2ff9c..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_HeliumGenerator; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator; - -@SideOnly(Side.CLIENT) -public class GUI_HeliumGenerator extends GuiContainer { - - private static final ResourceLocation guiTexture = new ResourceLocation(CORE.MODID, "textures/gui/helium_collector_gui.png"); - - public GUI_HeliumGenerator(final InventoryPlayer player_inventory, final TileEntityHeliumGenerator te){ - super(new Container_HeliumGenerator(player_inventory, te)); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("", new Object[0]), 28, 6, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(guiTexture); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java deleted file mode 100644 index bbd4dd0ad8..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java +++ /dev/null @@ -1,83 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_ModularityTable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; - -@SideOnly(Side.CLIENT) -public class GUI_ModularityTable extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ModularityTable.png"); - private Container_ModularityTable mThisContainer; - private TileEntityModularityTable mThisTile; - private int mRecipeTime = -1; - - public GUI_ModularityTable(final InventoryPlayer player_inventory, final TileEntityModularityTable tile){ - super(new Container_ModularityTable(player_inventory, tile)); - this.mThisContainer = tile.getContainer(); - this.mThisTile = tile; - if (this.mThisTile.getRecipeTime() > -1){ - this.mRecipeTime = this.mThisTile.getRecipeTime(); - } - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - if (this.mThisTile.getRecipeTime() > -1){ - this.mRecipeTime = this.mThisTile.getRecipeTime(); - } - //Utils.LOG_INFO("Container: "+this.mRecipeTime); - this.fontRendererObj.drawString(I18n.format("Modularity Table", new Object[0]), 8, 6, 4210752); - if (mRecipeTime > -1){ - this.fontRendererObj.drawString(I18n.format("Time", new Object[0]), 84, 42, 4210752); - this.fontRendererObj.drawString(I18n.format("Remaining", new Object[0]), 84, 50, 4210752); - this.fontRendererObj.drawString(I18n.format(""+this.mRecipeTime+" Ticks", new Object[0]), 84, 58, 4210752); - } - this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui(){ - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - - @Override - protected void actionPerformed(final GuiButton B){ - - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java deleted file mode 100644 index 881c6c82a1..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java +++ /dev/null @@ -1,159 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import java.awt.Color; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.container.Container_PestKiller; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.IFluidTank; - -@SideOnly(Side.CLIENT) -public class GUI_PestKiller extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/PestKiller.png"); - private final TileEntityPestKiller mTileKiller; - - public GUI_PestKiller(final InventoryPlayer player_inventory, final TileEntityPestKiller te) { - super(new Container_PestKiller(player_inventory, te)); - mTileKiller = te; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j) { - if (mTileKiller != null) { - this.fontRendererObj.drawString(I18n.format(mTileKiller.getInventoryName(), new Object[0]), 4, 6, 4210752); - drawFluidTank(mTileKiller.getTank(), 134, 35); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j) { - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - // This method is called when the Gui is first called! - @Override - public void initGui() { - super.initGui(); - } - - private void drawFluidTank(IFluidTank tank, int x, int y) { - Color startGrad = new Color(50, 50, 50); - Color endGrad = new Color(20, 20, 20); - Container_PestKiller aCont = (Container_PestKiller) this.inventorySlots; - - double aPercentage = 0; - double aDivisor = (100/16); - int aFrameHeight = 16; - - boolean didRender = false; - if (aCont != null) { - TileEntityPestKiller aTile = mTileKiller; - if (aTile != null) { - FluidTank aTank = aTile.getTank(); - int aTier = aTile.getTier(); - drawGradientRect(x, y, x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); - if (aTier <= 0 || aTier > 2) { - if (aTank != null && aTank.getFluidAmount() > 0) { - aPercentage = MathUtils.findPercentage(aTank.getFluidAmount(), aTank.getCapacity()); - //Logger.INFO("Percent = "+aPercentage); - aFrameHeight = (int) (aPercentage / aDivisor); - //Logger.INFO("Frame Height = "+aFrameHeight); - } - this.fontRendererObj.drawString("Tier: 0", 4, 18, 4210752); - this.fontRendererObj.drawString("Range: 1x1", 4, 30, 4210752); - this.fontRendererObj.drawString("Poison: None", 4, 42, 4210752); - this.fontRendererObj.drawString("Amount: 0", 4, 64, 4210752); - didRender = true; - } - else if (aTier == 1) { - if (aTank != null && aTank.getFluidAmount() > 0) { - aPercentage = MathUtils.findPercentage(aTank.getFluidAmount(), aTank.getCapacity()); - //Logger.INFO("Percent = "+aPercentage); - aFrameHeight = (int) (aPercentage / aDivisor); - //Logger.INFO("Frame Height = "+aFrameHeight); - } - startGrad = new Color(240, 50, 240); - endGrad = new Color(130, 30, 130); - drawGradientRect(x, y+(16-aFrameHeight), x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); - this.fontRendererObj.drawString("Tier: 1", 4, 18, 4210752); - this.fontRendererObj.drawString("Range: 5x5", 4, 30, 4210752); - this.fontRendererObj.drawString("Poison: ", 4, 42, 4210752); - this.fontRendererObj.drawString(""+aTile.getTank().getFluid().getLocalizedName(), 4, 54, 4210752); - this.fontRendererObj.drawString("Amount: "+aTile.getTank().getFluidAmount(), 4, 64, 4210752); - didRender = true; - } - else if (aTier == 2) { - if (aTank != null && aTank.getFluidAmount() > 0) { - aPercentage = MathUtils.findPercentage(aTank.getFluidAmount(), aTank.getCapacity()); - //Logger.INFO("Percent = "+aPercentage); - aFrameHeight = (int) (aPercentage / aDivisor); - //Logger.INFO("Frame Height = "+aFrameHeight); - } - short[] aRGB = MISC_MATERIALS.HYDROGEN_CYANIDE.getRGB(); - startGrad = new Color(aRGB[0], aRGB[1], aRGB[2]); - endGrad = new Color(Math.max(aRGB[0], 0), Math.max(aRGB[1], 0), Math.max(aRGB[2], 0)); - drawGradientRect(x, y+(16-aFrameHeight), x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); - this.fontRendererObj.drawString("Tier: 2", 4, 18, 4210752); - this.fontRendererObj.drawString("Range: 9x9", 4, 30, 4210752); - this.fontRendererObj.drawString("Poison: ", 4, 42, 4210752); - this.fontRendererObj.drawString(""+aTile.getTank().getFluid().getLocalizedName(), 4, 54, 4210752); - this.fontRendererObj.drawString("Amount: "+aTile.getTank().getFluidAmount(), 4, 64, 4210752); - didRender = true; - } - } - } - if (!didRender) { - startGrad = new Color(255, 30, 120); - endGrad = new Color(255, 0, 50); - drawGradientRect(x, y, x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); - this.fontRendererObj.drawString("Tier: 0", 4, 18, 4210752); - } - - - - - - - /* - * FluidStack fluid = tank.getFluid(); TextureManager manager = - * mc.getTextureManager(); if (fluid != null) { - * manager.bindTexture(manager.getResourceLocation(0)); float amount = - * fluid.amount; float capacity = tank.getCapacity(); float scale = amount / - * capacity; int fluidTankHeight = 60; int fluidAmount = (int) (scale * - * fluidTankHeight); drawFluid(x, y + fluidTankHeight - fluidAmount, - * fluid.getFluid().getIcon(fluid), 16, fluidAmount); } - */ - } - - private void drawFluid(int x, int y, IIcon icon, int width, int height) { - int i = 0; - int j = 0; - int drawHeight = 0; - int drawWidth = 0; - for (i = 0; i < width; i += 16) { - for (j = 0; j < height; j += 16) { - drawWidth = Math.min(width - i, 16); - drawHeight = Math.min(height - j, 16); - drawTexturedModelRectFromIcon(x + i, y + j, icon, drawWidth, drawHeight); - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java deleted file mode 100644 index 4870269080..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_ProjectTable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; - -@SideOnly(Side.CLIENT) -public class GUI_ProjectTable extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ProjectTable.png"); - - public GUI_ProjectTable(final InventoryPlayer player_inventory, final TileEntityProjectTable tile){ - super(new Container_ProjectTable(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui(){ - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - - @Override - protected void actionPerformed(final GuiButton B){ - - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java deleted file mode 100644 index edb53e8ec0..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.container.Container_RoundRobinator; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class GUI_RoundRobinator extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/RoundRobinator.png"); - private TileEntityRoundRobinator mTile; - private Container_RoundRobinator mContainer; - private static final Method mDrawItemStack; - - static { - mDrawItemStack = ReflectionUtils.getMethod(GuiContainer.class, "drawItemStack", new Class[] {ItemStack.class, int.class, int.class, String.class}); - } - - public GUI_RoundRobinator(final InventoryPlayer player_inventory, final TileEntityRoundRobinator te){ - this(new Container_RoundRobinator(player_inventory, te)); - mTile = te; - } - - private GUI_RoundRobinator(final Container_RoundRobinator aContainer){ - super(aContainer); - mContainer = aContainer; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - super.drawGuiContainerForegroundLayer(i, j); - - int xStart = 134; - int yStart = 31; - mTile = this.mContainer.tile_entity; - - int tier = mContainer.mTier; - int aTickRate = mContainer.mTickRate; - - fontRendererObj.drawString("Round Robinator", 85, 4, Utils.rgbtoHexValue(50, 150, 50)); - fontRendererObj.drawString("Tier: "+tier, 85, 12, Utils.rgbtoHexValue(50, 150, 50)); - fontRendererObj.drawString("Rate: 1 Item/"+aTickRate+"t", 85, 20, Utils.rgbtoHexValue(50, 150, 50)); - - boolean[] aStates = new boolean[] {mContainer.mSide_1 == 0 ? false : true, mContainer.mSide_2 == 0 ? false : true, mContainer.mSide_3 == 0 ? false : true,mContainer.mSide_4 == 0 ? false : true}; - - fontRendererObj.drawString("West: "+(aStates[0] ? "Active" : "Disabled"), 5, 5, Utils.rgbtoHexValue(50, 50, 50)); - fontRendererObj.drawString("North: "+(aStates[1] ? "Active" : "Disabled"), 5, 15, Utils.rgbtoHexValue(50, 50, 50)); - fontRendererObj.drawString("South: "+(aStates[2] ? "Active" : "Disabled"), 5, 25, Utils.rgbtoHexValue(50, 50, 50)); - fontRendererObj.drawString("East: "+(aStates[3] ? "Active" : "Disabled"), 5, 35, Utils.rgbtoHexValue(50, 50, 50)); - fontRendererObj.drawString("Toggling South will visually", 5, 65, Utils.rgbtoHexValue(150, 50, 50)); - fontRendererObj.drawString("toggle East, This is a visual bug.", 5, 74, Utils.rgbtoHexValue(150, 50, 50)); - drawStatus(aStates[0], xStart, yStart); - drawStatus(aStates[1], xStart+18, yStart); - drawStatus(aStates[2], xStart, yStart+18); - drawStatus(aStates[3], xStart+18, yStart+18); - - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - - - - } - - private static ItemStack aGreenGlass; - private static ItemStack aRedGlass; - - private void drawStatus(boolean aStateActive, int x, int y) { - if (aGreenGlass == null) { - Item pane = ItemUtils.getSimpleStack(Blocks.stained_glass_pane).getItem(); - aGreenGlass = ItemUtils.simpleMetaStack(pane, 5, 1); - } - if (aRedGlass == null) { - Item pane = ItemUtils.getSimpleStack(Blocks.stained_glass_pane).getItem(); - aRedGlass = ItemUtils.simpleMetaStack(pane, 14, 1); - } - if (mDrawItemStack != null) { - try { - if (aStateActive) { - mDrawItemStack.invoke(this, new Object[]{aGreenGlass, x, y, ""}); - } - else { - mDrawItemStack.invoke(this, new Object[]{aRedGlass, x, y, ""}); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - } - - //This method is called when the Gui is first called! - @Override - public void initGui(){ - super.initGui(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java deleted file mode 100644 index 8a1f7c3fe9..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java +++ /dev/null @@ -1,229 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.lwjgl.Sys; - -import com.google.common.collect.Lists; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiOptionButton; -import net.minecraft.client.gui.GuiResourcePackAvailable; -import net.minecraft.client.gui.GuiResourcePackSelected; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; -import net.minecraft.client.resources.ResourcePackListEntry; -import net.minecraft.client.resources.ResourcePackListEntryFound; -import net.minecraft.client.resources.ResourcePackRepository; -import net.minecraft.client.resources.ResourcePackRepository.Entry; -import net.minecraft.util.Util; - -@SideOnly(Side.CLIENT) -public class GUI_ScrollTest extends GuiScreen -{ - private static final Logger logger = LogManager.getLogger(); - private GuiScreen aThisGUIScreen; - private List field_146966_g; - private List field_146969_h; - private GuiResourcePackAvailable MapOfFreeResourcePacks; - private GuiResourcePackSelected MapOfActiveResourcePacks; - private static final String __OBFID = "CL_00000820"; - - public GUI_ScrollTest(GuiScreen p_i45050_1_) - { - this.aThisGUIScreen = p_i45050_1_; - } - - /** - * Adds the buttons (and other controls) to the screen in question. - */ - @SuppressWarnings("unchecked") - public void initGui() - { - this.buttonList.add(new GuiOptionButton(2, this.width / 2 - 154, this.height - 48, I18n.format("resourcePack.openFolder", new Object[0]))); - this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 4, this.height - 48, I18n.format("gui.done", new Object[0]))); - this.field_146966_g = new ArrayList(); - this.field_146969_h = new ArrayList(); - ResourcePackRepository resourcepackrepository = this.mc.getResourcePackRepository(); - resourcepackrepository.updateRepositoryEntriesAll(); - ArrayList arraylist = Lists.newArrayList(resourcepackrepository.getRepositoryEntriesAll()); - arraylist.removeAll(resourcepackrepository.getRepositoryEntries()); - Iterator iterator = arraylist.iterator(); - ResourcePackRepository.Entry entry; - - while (iterator.hasNext()) - { - entry = (ResourcePackRepository.Entry)iterator.next(); - //this.field_146966_g.add(new ResourcePackListEntryFound(this, entry)); - } - - iterator = Lists.reverse(resourcepackrepository.getRepositoryEntries()).iterator(); - - while (iterator.hasNext()) - { - entry = (ResourcePackRepository.Entry)iterator.next(); - //this.field_146969_h.add(new ResourcePackListEntryFound(this, entry)); - } - - //this.field_146969_h.add(new ResourcePackListEntryDefault(this)); - this.MapOfFreeResourcePacks = new GuiResourcePackAvailable(this.mc, 200, this.height, this.field_146966_g); - this.MapOfFreeResourcePacks.setSlotXBoundsFromLeft(this.width / 2 - 4 - 200); - this.MapOfFreeResourcePacks.registerScrollButtons(7, 8); - this.MapOfActiveResourcePacks = new GuiResourcePackSelected(this.mc, 200, this.height, this.field_146969_h); - this.MapOfActiveResourcePacks.setSlotXBoundsFromLeft(this.width / 2 + 4); - this.MapOfActiveResourcePacks.registerScrollButtons(7, 8); - } - - public boolean func_146961_a(ResourcePackListEntry p_146961_1_) - { - return this.field_146969_h.contains(p_146961_1_); - } - - public List func_146962_b(ResourcePackListEntry p_146962_1_) - { - return this.func_146961_a(p_146962_1_) ? this.field_146969_h : this.field_146966_g; - } - - public List func_146964_g() - { - return this.field_146966_g; - } - - public List func_146963_h() - { - return this.field_146969_h; - } - - protected void actionPerformed(GuiButton p_146284_1_) - { - if (p_146284_1_.enabled) - { - if (p_146284_1_.id == 2) - { - File file1 = this.mc.getResourcePackRepository().getDirResourcepacks(); - String s = file1.getAbsolutePath(); - - if (Util.getOSType() == Util.EnumOS.OSX) - { - try - { - logger.info(s); - Runtime.getRuntime().exec(new String[] {"/usr/bin/open", s}); - return; - } - catch (IOException ioexception1) - { - logger.error("Couldn\'t open file", ioexception1); - } - } - else if (Util.getOSType() == Util.EnumOS.WINDOWS) - { - String s1 = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[] {s}); - - try - { - Runtime.getRuntime().exec(s1); - return; - } - catch (IOException ioexception) - { - logger.error("Couldn\'t open file", ioexception); - } - } - - boolean flag = false; - - try - { - Class oclass = ReflectionUtils.getClass("java.awt.Desktop"); - Object object = ReflectionUtils.getMethod(oclass, "getDesktop", new Class[0]).invoke((Object)null, new Object[0]); - ReflectionUtils.getMethod(oclass, "browse", new Class[] {URI.class}).invoke(object, new Object[] {file1.toURI()}); - } - catch (Throwable throwable) - { - logger.error("Couldn\'t open link", throwable); - flag = true; - } - - if (flag) - { - logger.info("Opening via system class!"); - Sys.openURL("file://" + s); - } - } - else if (p_146284_1_.id == 1) - { - ArrayList arraylist = Lists.newArrayList(); - Iterator iterator = this.field_146969_h.iterator(); - - while (iterator.hasNext()) - { - ResourcePackListEntry resourcepacklistentry = (ResourcePackListEntry)iterator.next(); - - if (resourcepacklistentry instanceof ResourcePackListEntryFound) - { - arraylist.add(((ResourcePackListEntryFound)resourcepacklistentry).func_148318_i()); - } - } - - Collections.reverse(arraylist); - this.mc.getResourcePackRepository().func_148527_a(arraylist); - this.mc.gameSettings.resourcePacks.clear(); - iterator = arraylist.iterator(); - - while (iterator.hasNext()) - { - ResourcePackRepository.Entry entry = (ResourcePackRepository.Entry)iterator.next(); - this.mc.gameSettings.resourcePacks.add(entry.getResourcePackName()); - } - - this.mc.gameSettings.saveOptions(); - this.mc.refreshResources(); - this.mc.displayGuiScreen(this.aThisGUIScreen); - } - } - } - - /** - * Called when the mouse is clicked. - */ - protected void mouseClicked(int p_73864_1_, int p_73864_2_, int p_73864_3_) - { - super.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); - this.MapOfFreeResourcePacks.func_148179_a(p_73864_1_, p_73864_2_, p_73864_3_); - this.MapOfActiveResourcePacks.func_148179_a(p_73864_1_, p_73864_2_, p_73864_3_); - } - - /** - * Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is - * mouseMove, which==0 or which==1 is mouseUp - */ - protected void mouseMovedOrUp(int p_146286_1_, int p_146286_2_, int p_146286_3_) - { - super.mouseMovedOrUp(p_146286_1_, p_146286_2_, p_146286_3_); - } - - /** - * Draws the screen and all the components in it. - */ - public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) - { - this.drawBackground(0); - this.MapOfFreeResourcePacks.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); - this.MapOfActiveResourcePacks.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); - this.drawCenteredString(this.fontRendererObj, I18n.format("resourcePack.title", new Object[0]), this.width / 2, 16, 16777215); - this.drawCenteredString(this.fontRendererObj, I18n.format("resourcePack.folderInfo", new Object[0]), this.width / 2 - 77, this.height - 26, 8421504); - super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java deleted file mode 100644 index d3d8f1e814..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java +++ /dev/null @@ -1,90 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import java.util.ArrayList; -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; -import gtPlusPlus.core.container.Container_SuperJukebox; -import gtPlusPlus.core.gui.GUI_Base_Tile_Entity; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.slots.SlotNoInput; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class GUI_SuperJukebox extends GUI_Base_Tile_Entity { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/SuperJukebox.png"); - private final Container_SuperJukebox mThisContainer; - - public GUI_SuperJukebox(final InventoryPlayer player_inventory, final TileEntitySuperJukebox te){ - super(new Container_SuperJukebox(player_inventory, te)); - mThisContainer = (Container_SuperJukebox) this.mContainer; - } - - //This method is called when the Gui is first called! - @Override - public void initGui(){ - super.initGui(); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - super.drawGuiContainerForegroundLayer(par1, par2); - - boolean a = mThisContainer.isPlaying; - boolean b = mThisContainer.isLooping; - - if (a && b) { - this.fontRendererObj.drawString("[X] [X]", 72, 74, 4210752); - } - else if (a && !b) { - this.fontRendererObj.drawString("[X] [ ]", 72, 74, 4210752); - } - else if (!a && b) { - this.fontRendererObj.drawString("[ ] [X]", 72, 74, 4210752); - } - else { - this.fontRendererObj.drawString("[ ] [ ]", 72, 74, 4210752); - } - - this.drawTooltip(par1, par2); - } - - private void drawTooltip(final int x2, final int y2) { - final int xStart = (this.width - this.xSize) / 2; - final int yStart = (this.height - this.ySize) / 2; - final int x3 = x2 - xStart; - final int y3 = y2 - yStart + 5; - final List list = new ArrayList(); - - if (y3 >= 17 && y3 <= 33) { - if (x3 >= 80 && x3 <= 96) { - list.add("Play"); - } - } - if (y3 >= 35 && y3 <= 53) { - if (x3 >= 80 && x3 <= 96) { - list.add("Loop"); - } - } - if (!list.isEmpty()) { - this.drawHoveringText(list, x3, y3, this.fontRendererObj); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java deleted file mode 100644 index 7c71f09302..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.container.Container_TradeTable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; - -@SideOnly(Side.CLIENT) -public class GUI_TradeTable extends GuiContainer { - - TileEntityTradeTable mThisTable; - String mOwnerName; - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ProjectTable.png"); - - public GUI_TradeTable(final InventoryPlayer player_inventory, final TileEntityTradeTable te, final String mOwnerName){ - super(new Container_TradeTable(player_inventory, te)); - if (te.isServerSide()){ - mThisTable = te; - this.mOwnerName = mOwnerName; - Logger.INFO("Set valid TE in GUI"); - } - } - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - this.fontRendererObj.drawString(I18n.format("Owner - "+this.mOwnerName, new Object[0]), 28, 66, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java deleted file mode 100644 index 0257e51d0c..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java +++ /dev/null @@ -1,183 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.input.Keyboard; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; -import gtPlusPlus.core.gui.widget.GuiValueField; -import gtPlusPlus.core.handler.PacketHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui; -import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class GUI_VolumetricFlaskSetter extends GuiContainer { - - private GuiTextField mText; - private boolean mIsOpen = false; - private TileEntityVolumetricFlaskSetter mTile; - private Container_VolumetricFlaskSetter mContainer; - private static final ResourceLocation mGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/VolumetricFlaskSetter.png"); - - public GUI_VolumetricFlaskSetter(Container_VolumetricFlaskSetter aContainer){ - super(aContainer); - mContainer = aContainer; - mTile = mContainer.mTileEntity; - } - - public void initGui(){ - super.initGui(); - Keyboard.enableRepeatEvents(true); - mIsOpen = true; - this.mText = new GuiValueField(this.fontRendererObj, 26, 31, this.width / 2 - 62, this.height/2-52, 106, 14); - mText.setMaxStringLength(5); - mText.setEnableBackgroundDrawing(true); - mText.setText("0"); - mText.setFocused(true); - } - - protected void keyTyped(char par1, int par2){ - if (mIsOpen) { - if (mText.isFocused()) { - if (par2 == Keyboard.KEY_RETURN) { - if (mText.isFocused()) { - mText.setFocused(false); - } - } - else if (par2 == Keyboard.KEY_BACK) { - String aCurrentText = getText(); - if (aCurrentText.length() > 0) { - this.mText.setText(aCurrentText.substring(0, aCurrentText.length() - 1)); - if (getText().length() <= 0) { - this.mText.setText("0"); - } - sendUpdateToServer(); - } - } - else { - if (isNumber(par1)) { - if (this.mText.getText().equals("0")) { - this.mText.setText(""+par1); - sendUpdateToServer(); - } - else { - this.mText.textboxKeyTyped(par1, par2); - sendUpdateToServer(); - } - } - else { - super.keyTyped(par1, par2); - } - } - } - else { - super.keyTyped(par1, par2); - } - } - } - - @Override - public void onGuiClosed() { - mIsOpen = false; - mText.setEnabled(false); - mText.setVisible(false); - super.onGuiClosed(); - Keyboard.enableRepeatEvents(false); - } - - public void updateScreen(){ - super.updateScreen(); - // Update Textbox to 0 if Empty - if (getText().length() <= 0) { - this.mText.setText("0"); - sendUpdateToServer(); - } - this.mText.updateCursorCounter(); - - // Check TextBox Value is correct - short aCustomValue = 0; - if (getText().length() > 0) { - try { - aCustomValue = Short.parseShort(getText()); - short aTileValue = ((Container_VolumetricFlaskSetter) mContainer).mCustomValue; - if (mContainer != null) { - if (aTileValue != aCustomValue){ - this.mText.setText(""+aTileValue); - } - } - } catch (NumberFormatException ex) { - - } - } - } - - public void drawScreen(int par1, int par2, float par3){ - this.drawDefaultBackground(); - super.drawScreen(par1, par2, par3); - - - } - - protected void mouseClicked(int x, int y, int btn) { - if (mIsOpen) { - super.mouseClicked(x, y, btn); - this.mText.mouseClicked(x, y, btn); - } - } - - - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - super.drawGuiContainerForegroundLayer(i, j); - this.mText.drawTextBox(); - this.fontRendererObj.drawString(I18n.format("container.VolumetricFlaskSetter", new Object[0]), 4, 3, 4210752); - int aYVal = 49; - this.fontRendererObj.drawString(I18n.format("0 = 16l", new Object[0]), 8, aYVal, 4210752); - this.fontRendererObj.drawString(I18n.format("4 = 576l", new Object[0]), 64, aYVal, 4210752); - this.fontRendererObj.drawString(I18n.format("1 = 36l", new Object[0]), 8, aYVal+=8, 4210752); - this.fontRendererObj.drawString(I18n.format("5 = 720l", new Object[0]), 64, aYVal, 4210752); - this.fontRendererObj.drawString(I18n.format("2 = 144l", new Object[0]), 8, aYVal+=8, 4210752); - this.fontRendererObj.drawString(I18n.format("6 = 864l", new Object[0]), 64, aYVal, 4210752); - this.fontRendererObj.drawString(I18n.format("3 = 432l", new Object[0]), 8, aYVal+=8, 4210752); - this.fontRendererObj.drawString(I18n.format("-> = Custom", new Object[0]), 59, aYVal, 4210752); - - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(mGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - public boolean isNumber(char c) { - return ((c >= 48 && c <= 57) || c == 45); - } - - protected String getText() { - return this.mText.getText(); - } - - protected void sendUpdateToServer() { - short aCustomValue = 0; - if (getText().length() > 0) { - try { - aCustomValue = Short.parseShort(getText()); - PacketHandler.sendToServer(new Packet_VolumetricFlaskGui(mTile, aCustomValue)); - } catch (NumberFormatException ex) { - - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java deleted file mode 100644 index 861c2ba6b6..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_Workbench.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_Workbench; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; - -@SideOnly(Side.CLIENT) -public class GUI_Workbench extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png"); - - public boolean moveItemsToChest = false; - public boolean moveItemsToCrafting = false; - - public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile){ - super(new Container_Workbench(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - - @Override - protected void actionPerformed(final GuiButton B) - { - //If the button id is different, or you have mrs buttons, create another if block for that too! - if(B.id == 1){ - System.out.println("Trying to empty crafting grid to the storage compartment."); - //moveItemsToChest = true; - ((Container_Workbench) this.inventorySlots).moveCraftingToChest(); - } - else if(B.id == 2){ - System.out.println("Trying to move items into the crafting grid."); - //moveItemsToCrafting = true; - ((Container_Workbench) this.inventorySlots).moveChestToCrafting(); - } - - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java deleted file mode 100644 index 20183eb0b0..0000000000 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_WorkbenchAdvanced; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -@SideOnly(Side.CLIENT) -public class GUI_WorkbenchAdvanced extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/AdvancedCraftingTable.png"); - - public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile){ - super(new Container_WorkbenchAdvanced(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/gui/widget/GuiValueField.java b/src/Java/gtPlusPlus/core/gui/widget/GuiValueField.java deleted file mode 100644 index ac4c1a8aee..0000000000 --- a/src/Java/gtPlusPlus/core/gui/widget/GuiValueField.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.core.gui.widget; - -import java.lang.reflect.Field; - -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.GuiTextField; - -public class GuiValueField extends GuiTextField { - - private final FontRenderer mFontRenderer; - private final int mScreenLocationX; - private final int mScreenLocationY; - - public GuiValueField(FontRenderer aFontRenderer, int aX, int aY, int aScreenLocationX, int aScreenLocationY, int aWidth, int aHeight) { - super(aFontRenderer, aX, aY, aWidth, aHeight); - mFontRenderer = aFontRenderer; - mScreenLocationX = aScreenLocationX; - mScreenLocationY = aScreenLocationY; - } - - public boolean canLoseFocus() { - Field canLoseFocus = ReflectionUtils.getField(GuiTextField.class, "canLoseFocus"); - if (canLoseFocus != null) { - return (boolean) ReflectionUtils.getFieldValue(canLoseFocus, this); - } - return true; - } - - public boolean isFocused() { - Field isFocused = ReflectionUtils.getField(GuiTextField.class, "isFocused"); - if (isFocused != null) { - return (boolean) ReflectionUtils.getFieldValue(isFocused, this); - } - return false; - } - - public boolean isBackgroundDrawingEnabled() { - Field enableBackgroundDrawing = ReflectionUtils.getField(GuiTextField.class, "enableBackgroundDrawing"); - if (enableBackgroundDrawing != null) { - return (boolean) ReflectionUtils.getFieldValue(enableBackgroundDrawing, this); - } - return true; - } - public int getLineScrollOffset() { - Field lineScrollOffset = ReflectionUtils.getField(GuiTextField.class, "lineScrollOffset"); - if (lineScrollOffset != null) { - return (int) ReflectionUtils.getFieldValue(lineScrollOffset, this); - } - return 0; - } - - /** - * Args: x, y, buttonClicked - */ - public void mouseClicked(int aX, int aY, int aButton){ - - boolean flag = aX >= this.mScreenLocationX && aX < this.mScreenLocationX + this.width && aY >= this.mScreenLocationY && aY < this.mScreenLocationY + this.height; - - //Logger.INFO("Clicked X:"+aX); - //Logger.INFO("Clicked Y:"+aY); - //Logger.INFO("ScreenPos X:"+mScreenLocationX); - //Logger.INFO("ScreenPos Y:"+mScreenLocationY); - //Logger.INFO("Render X:"+xPosition); - //Logger.INFO("Render Y:"+yPosition); - - if (canLoseFocus()) - { - this.setFocused(flag); - } - - if (isFocused() && aButton == 0) - { - int l = aX - this.mScreenLocationX; - - if (isBackgroundDrawingEnabled()) - { - l -= 4; - } - - String s = this.mFontRenderer.trimStringToWidth(this.getText().substring(getLineScrollOffset()), this.getWidth()); - this.setCursorPosition(this.mFontRenderer.trimStringToWidth(s, l).length() + getLineScrollOffset()); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/AchievementHandler.java b/src/Java/gtPlusPlus/core/handler/AchievementHandler.java deleted file mode 100644 index fa10f4def3..0000000000 --- a/src/Java/gtPlusPlus/core/handler/AchievementHandler.java +++ /dev/null @@ -1,421 +0,0 @@ -package gtPlusPlus.core.handler; - -import java.util.concurrent.ConcurrentHashMap; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Log; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.Achievement; -import net.minecraft.stats.StatBase; -import net.minecraftforge.common.AchievementPage; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.EntityItemPickupEvent; - -public class AchievementHandler { - - public ConcurrentHashMap achievementList = new ConcurrentHashMap(); - public ConcurrentHashMap issuedAchievements = new ConcurrentHashMap(); - - public int adjX = 5; - public int adjY = 9; - - private static final String aBaseAchievementName = "gtpp.start"; - - public AchievementHandler() { - - Logger.INFO("Initializing GT++ achievements"); - GT_Log.out.println("Initializing GT++ achievements"); - - //register first - this.registerAchievement(aBaseAchievementName, 0, 0, MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(MetaGeneratedGregtechTools.ANGLE_GRINDER, 1, Materials.Osmium, Materials.Osmium, null), "", true); - - //Useful Info - boolean cores = CORE.ConfigSwitches.requireControlCores; - if (cores || GregtechMeta_MultiBlockBase.DEBUG_DISABLE_CORES_TEMPORARILY) { - this.registerAchievement("hatch.control", -2, -2, GregtechItemList.Hatch_Control_Core.get(1), aBaseAchievementName, false); - } - this.registerAchievement("hatch.dynamo.buffered", 2, -2, GregtechItemList.Hatch_Buffer_Dynamo_IV.get(1), aBaseAchievementName, false); - //First multi anyone really needs - this.registerAchievement("multi.abs", -4, -2, GregtechItemList.Industrial_AlloyBlastSmelter.get(1), cores ? "hatch.control" : aBaseAchievementName, true); - - //Material Advancement - this.registerAchievement("dust.potin", 0, 2, ALLOY.POTIN.getDust(1), aBaseAchievementName, false); - this.registerAchievement("dust.eglin", 0, 4, ALLOY.EGLIN_STEEL.getDust(1), "dust.potin", false); - this.registerAchievement("dust.staballoy", 0, 6, ALLOY.STABALLOY.getDust(1), "dust.eglin", false); - this.registerAchievement("dust.quantum", 0, 8, ALLOY.QUANTUM.getDust(1), "dust.staballoy", true); - this.registerAchievement("dust.hypogen", 0, 10, ELEMENT.STANDALONE.HYPOGEN.getDust(1), "dust.quantum", true); - - - //Blocks - this.registerAchievement("block.fishtrap", -2, 2, ItemUtils.getSimpleStack(ModBlocks.blockFishTrap), "dust.potin", false); - this.registerAchievement("block.withercage", -2, 4, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard), "dust.eglin", false); - - - //Machines (-10/-8/-6) - this.registerAchievement("rtg", -16, -10, GregtechItemList.RTG.get(1), aBaseAchievementName, false); - this.registerAchievement("dehydrate", -15, -10, GregtechItemList.GT_Dehydrator_HV.get(1), aBaseAchievementName, false); - this.registerAchievement("semifluid", -14, -10, GregtechItemList.Generator_SemiFluid_HV.get(1), aBaseAchievementName, false); - this.registerAchievement("earlywasher", -13, -10, GregtechItemList.SimpleDustWasher_ULV.get(1), aBaseAchievementName, false); - this.registerAchievement("advancedsteam", -12, -10, GregtechItemList.Boiler_Advanced_MV.get(1), aBaseAchievementName, false); - if (PollutionUtils.isPollutionEnabled()) { - this.registerAchievement("pollutionremoval", -11, -10, GregtechItemList.Pollution_Cleaner_IV.get(1), aBaseAchievementName, false); - } - this.registerAchievement("hiampxform", -10, -10, GregtechItemList.Transformer_HA_HV_MV.get(1), aBaseAchievementName, false); - - - //Multis (-4/-2/0) - this.registerAchievement("multi.pss", -16, -7, GregtechItemList.PowerSubStation.get(1), "multi.abs", false); - this.registerAchievement("multi.cyclo", -15, -7, GregtechItemList.COMET_Cyclotron.get(1), "multi.abs", false); - this.registerAchievement("multi.sifter", -14, -7, GregtechItemList.Industrial_Sifter.get(1), "dust.eglin", false); - this.registerAchievement("multi.cokeoven", -13, -7, GregtechItemList.Industrial_CokeOven.get(1), "multi.abs", false); - this.registerAchievement("multi.boiler.thermal", -12, -7, GregtechItemList.GT4_Thermal_Boiler.get(1), "multi.abs", false); - this.registerAchievement("multi.zhuhai", -11, -7, GregtechItemList.Industrial_FishingPond.get(1), aBaseAchievementName, false); - //this.registerAchievement("rtg", -4, -4, GregtechItemList.RTG.get(1), aBaseAchievementName, false); - - //Casings - this.registerAchievement("casing.abs", 2, -10, GregtechItemList.Casing_Coil_BlastSmelter.get(1), aBaseAchievementName, false); - this.registerAchievement("casing.cyclotron.coil", 3, -10, GregtechItemList.Casing_Cyclotron_Coil.get(1), aBaseAchievementName, false); - this.registerAchievement("casing.multiuse", 4, -10, GregtechItemList.Casing_Multi_Use.get(1), aBaseAchievementName, false); - this.registerAchievement("casing.containment", 5, -10, GregtechItemList.Casing_Containment.get(1), aBaseAchievementName, false); - - - - - - - - - //Radioactive - this.registerAchievement("decay.neptunium238", 11, 8, ItemUtils.getSimpleStack(ModItems.dustNeptunium238), "multi.cyclo", false); - this.registerAchievement("decay.radium226", 12, 8, ItemUtils.getSimpleStack(ModItems.dustRadium226), "multi.cyclo", false); - this.registerAchievement("decay.molybdenum99", 13, 8, ItemUtils.getSimpleStack(ModItems.dustMolybdenum99), "multi.cyclo", false); - this.registerAchievement("decay.technetium99m", 14, 8, ItemUtils.getSimpleStack(ModItems.dustTechnetium99M), "multi.cyclo", false); - this.registerAchievement("decay.technetium99", 15, 8, ItemUtils.getSimpleStack(ModItems.dustTechnetium99), "multi.cyclo", false); - - - - - - - - - - - - - AchievementPage.registerAchievementPage( - new AchievementPage("GT++", (Achievement[]) ((Achievement[]) this.achievementList.values() - .toArray(new Achievement[this.achievementList.size()])))); - MinecraftForge.EVENT_BUS.register(this); - FMLCommonHandler.instance().bus().register(this); - - - } - - public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement, - boolean special) { - Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, requirement); - if (special) { - achievement.setSpecial(); - } - - achievement.registerStat(); - if (CORE.DEVENV) { - GT_Log.out.println("achievement." + textId + "="); - GT_Log.out.println("achievement." + textId + ".desc="); - } - - this.achievementList.put(textId, achievement); - return achievement; - } - - public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, String requirement, - boolean special) { - Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, - this.getAchievement(requirement)); - if (special) { - achievement.setSpecial(); - } - - achievement.registerStat(); - if (CORE.DEVENV) { - GT_Log.out.println("achievement." + textId + "="); - GT_Log.out.println("achievement." + textId + ".desc="); - } - - this.achievementList.put(textId, achievement); - return achievement; - } - - public void issueAchievement(EntityPlayer entityplayer, String textId) { - if (entityplayer != null) { - entityplayer.triggerAchievement((StatBase) this.achievementList.get(textId)); - } - } - - public Achievement getAchievement(String textId) { - return this.achievementList.containsKey(textId) ? (Achievement) this.achievementList.get(textId) : null; - } - - - /** - * A generic handler that will give an achievement for an item. - * Useful to only write this once, then call it from all handlers. - * @param aStack - The Itemstack to check for achievements. - * @param aPlayer - The player to unlock for. - */ - private void handleAchivement(ItemStack aStack, EntityPlayer aPlayer) { - - if (aPlayer != null && aStack != null) { - /* - * Copy this to all events because I am lazy - Alk 2019 - */ - - //Safe name - String aUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); - - - boolean isValid = false; - //Check if valid name // mod - String aModID = ItemUtils.getModId(aStack); - - if (aModID == null || aModID.length() <= 0 || aModID.isEmpty()) { - return; - } - - if (aModID != null && (ItemUtils.getModId(aStack).equals(CORE.MODID) || ItemUtils.getModId(aStack).equalsIgnoreCase("gregtech"))) { - isValid = true; - } - if (!isValid) { - return; - } - - //Should unlock base achievement from *ANY* GT++ item. (Too lazy to special case GT machineBlocks though) - if (ItemUtils.getModId(aStack).equals(CORE.MODID)) { - this.issueAchievement(aPlayer, aBaseAchievementName); - } - - if (aUnlocalName.contains("item.")) { - aUnlocalName = aUnlocalName.substring(5); - } - else if (aUnlocalName.contains("tile.")) { - aUnlocalName = aUnlocalName.substring(5); - } - - //Logger.INFO("Picked up "+aUnlocalName); - - - /** - * Misc Blocks - */ - - if (aUnlocalName.equals("blockFishTrap")) { - this.issueAchievement(aPlayer, "block.fishtrap"); - } - if (aUnlocalName.equals("blockBlackGate")) { - this.issueAchievement(aPlayer, "block.withercage"); - } - - - /** - * Decayables - */ - if (aUnlocalName.equals("dustNeptunium238")) { - this.issueAchievement(aPlayer, "decay.neptunium238"); - } - else if (aUnlocalName.equals("dustRadium226")) { - this.issueAchievement(aPlayer, "decay.radium226"); - } - else if (aUnlocalName.equals("dustMolybdenum99")) { - this.issueAchievement(aPlayer, "decay.molybdenum99"); - } - else if (aUnlocalName.equals("dustTechnetium99M")) { - this.issueAchievement(aPlayer, "decay.technetium99m"); - } - else if (aUnlocalName.equals("dustTechnetium99")) { - this.issueAchievement(aPlayer, "decay.technetium99"); - } - - /** - * Random Materials worthy of Achievements - */ - else if (aUnlocalName.equals("itemDustPotin")) { - this.issueAchievement(aPlayer, "dust.potin"); - } - else if (aUnlocalName.equals("itemDustEglinSteel")) { - this.issueAchievement(aPlayer, "dust.eglin"); - } - else if (aUnlocalName.equals("itemDustStaballoy")) { - this.issueAchievement(aPlayer, "dust.staballoy"); - } - else if (aUnlocalName.equals("itemDustQuantum")) { - this.issueAchievement(aPlayer, "dust.quantum"); - } - else if (aUnlocalName.equals("itemDustHypogen")) { - this.issueAchievement(aPlayer, "dust.hypogen"); - } - - - - /** - * Machines - */ - - else if (aUnlocalName.startsWith("gt.blockmachines.")) { - - //Readability - String aStartsWith = "gt.blockmachines."; - - /** - * Single Blocks - */ - - //RTG - if (aUnlocalName.startsWith(aStartsWith + "basicgenerator.rtg")) { - this.issueAchievement(aPlayer, "rtg"); - } - //Dehydrator - else if (aUnlocalName.startsWith(aStartsWith + "machine.dehydrator.tier.")) { - this.issueAchievement(aPlayer, "dehydrate"); - } - //SemiFluids - else if (aUnlocalName.startsWith(aStartsWith + "basicgenerator.semifluid.tier.")) { - this.issueAchievement(aPlayer, "semifluid"); - } - //Simple Washer - else if (aUnlocalName.startsWith(aStartsWith + "simplewasher.01.tier.")) { - this.issueAchievement(aPlayer, "earlywasher"); - } - //Advanced Boilers - else if (aUnlocalName.startsWith(aStartsWith + "electricboiler.")) { - this.issueAchievement(aPlayer, "advancedsteam"); - } - //Scrubers - else if (aUnlocalName.startsWith(aStartsWith + "pollutioncleaner.01.tier.")) { - this.issueAchievement(aPlayer, "pollutionremoval"); - } - //High-amp xformers - else if (aUnlocalName.startsWith(aStartsWith + "transformer.ha.tier.")) { - this.issueAchievement(aPlayer, "hiampxform"); - } - //Buffered Dynamos - else if (aUnlocalName.startsWith(aStartsWith + "hatch.dynamo.buffer.tier.")) { - this.issueAchievement(aPlayer, "hatch.dynamo.buffered"); - } - //Control Core Hatch - else if (aUnlocalName.startsWith(aStartsWith + "hatch.control.adv")) { - this.issueAchievement(aPlayer, "hatch.control"); - } - - - - /** - * Multis - */ - - //ABS - else if (aUnlocalName.equals(aStartsWith + "industrialsalloyamelter.controller.tier.single")) { - this.issueAchievement(aPlayer, "multi.abs"); - } - //PSS - else if (aUnlocalName.equals(aStartsWith + "substation.01.input.single")) { - this.issueAchievement(aPlayer, "multi.pss"); - } - //Cyclotron - else if (aUnlocalName.startsWith(aStartsWith + "cyclotron.tier.single")) { - this.issueAchievement(aPlayer, "multi.cyclo"); - } - //Sifter - else if (aUnlocalName.equals(aStartsWith + "industrialsifter.controller.tier.single")) { - this.issueAchievement(aPlayer, "multi.sifter"); - } - //Coke Oven - else if (aUnlocalName.equals(aStartsWith + "industrialcokeoven.controller.tier.single")) { - this.issueAchievement(aPlayer, "multi.cokeoven"); - } - //Thermal Boiler - else if (aUnlocalName.equals(aStartsWith + "gtplusplus.thermal.boiler")) { - this.issueAchievement(aPlayer, "multi.boiler.thermal"); - } - //Zhuhai - else if (aUnlocalName.equals(aStartsWith + "industrial.fishpond.controller.tier.single")) { - this.issueAchievement(aPlayer, "multi.zhuhai"); - } - - } - - /** - * Casings - */ - - else if (aUnlocalName.equals("gtplusplus.blockcasings.14")) { - this.issueAchievement(aPlayer, "casing.abs"); - } - - else if (aUnlocalName.equals("gtplusplus.blockcasings.2.9")) { - this.issueAchievement(aPlayer, "casing.cyclotron.coil"); - } - - else if (aUnlocalName.equals("gtplusplus.blockcasings.3.2")) { - this.issueAchievement(aPlayer, "casing.multiuse"); - } - else if (aUnlocalName.equals("gtplusplus.blockcasings.3.15")) { - this.issueAchievement(aPlayer, "casing.containment"); - } - } - } - - - - - /* - * Handle achievements for all vanilla types of obtianment. - */ - - - - @SubscribeEvent - public void onCrafting(ItemCraftedEvent event) { - EntityPlayer player = event.player; - ItemStack stack = event.crafting; - if (player != null && stack != null) { - handleAchivement(stack, player); - } - } - - @SubscribeEvent - public void onSmelting(ItemSmeltedEvent event) { - EntityPlayer player = event.player; - ItemStack stack = event.smelting; - if (player != null && stack != null) { - handleAchivement(stack, player); - } - } - - @SubscribeEvent - public void onItemPickup(EntityItemPickupEvent event) { - EntityPlayer player = event.entityPlayer; - ItemStack stack = event.item.getEntityItem(); - if (player != null && stack != null) { - handleAchivement(stack, player); - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/BookHandler.java b/src/Java/gtPlusPlus/core/handler/BookHandler.java deleted file mode 100644 index d85de925bf..0000000000 --- a/src/Java/gtPlusPlus/core/handler/BookHandler.java +++ /dev/null @@ -1,404 +0,0 @@ -package gtPlusPlus.core.handler; - -import java.util.HashMap; -import java.util.Map; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -public class BookHandler { - - public static int mBookKeeperCount = 0; - - public static Map mBookMap = new HashMap(); - - public static BookTemplate book_ThermalBoiler; - public static BookTemplate book_MultiPowerStation; - public static BookTemplate book_ModularBauble; - public static BookTemplate book_MultiMachineManual; - public static BookTemplate book_NuclearManual; - public static BookTemplate book_MultiChemicalPlant; - - public static void run(){ - - Logger.INFO("Writing books."); - - //Thermal Boiler - book_ThermalBoiler = writeBookTemplate( - "Manual_Thermal_Boiler", "Thermal Boiler Manual", "GregoriusT", - new String[] { - "This Book explains how to set up and run your Thermal Boiler. We are not responsible for any Damage done by this Book itself nor its content.", - "First you need to craft the following things for a Thermal Boiler to Function: The Main Boiler Block, 20 Thermal Containment Casings, two Input Hatches, two Output Hatches, a bunch of different Tools and a Maintenance Hatch.", - "To begin the building, lay out the first 3x3 layer of Machine Casings on the ground (with a Hatch in the Middle), then place the Boiler Block facing outward in the middle of one of the 3m wide Sides.", - "Now grab 3 other Hatches and place them on the remaining three 3m wide Sides also facing outwards. And now the four corners of the Machine need also a Machine Casing. There should only be a Hole left in the middle of the Cube.", - "So, now place a 3x3 of Machine Casings ontop, at the 3rd Layer with the last Hatch in the middle facing outwards as well.", - "When accessing the Boiler Block, it should now stop telling you, that the structure is incomplete (bottom Line of that Screen). Now go with a bunch of different Tools (Metal Hammer, Rubber Hammer, Screwdriver, Wrench, Soldering Iron and Crowbar)", - "to the Maintenance Hatch and access it. After that you grab the 6 Tools and rightclick the Slot with each of them in your Hand in the Maintenance GUI. Note that you need Soldering Tin/Lead in your Inventory to use the Soldering Iron.", - "The Main Block should now tell you that you need to use the Rubber Hammer on it to (re)activate the Machine. The Rubber Hammer can enable and disable Machines. The Machine disables itself after something important broke.", - "If you want to use Lava with this Device, then you should add a Lava Filter to extract additional Resources from the Lava. If the Filter breaks, the Machine won't explode like a Turbine would. If you use molten Salt, then you won't need a Filter.", - "You will get Obsidian when processing Lava, however if a Filter is used, you will get sometimes an Ingot instead of a Block of Obsidian. When using molten Salt, you will get the Salt back.", - "So, now for the Maintenance. After a few Hours of running nonstop, your Boiler will get small Problems, which don't prevent it from running, these Problems just decrease Efficiency. Every Problem listed on the Screen does -10% Efficiency.", - "To fix these Problems, just go to the Maintenance Hatch and click with the problem corresponding Tool on the Slot to repair. If all six possible runtime Problems happen, the Machine will auto-shutdown no matter what. No Explosion, it's just stopping.", - "The Thermal Boiler will produce 800 Liters of Steam per tick for about 5 or 6 Liters of Water per tick at reaching 100% Efficiency. In case of Lava it consumes 1666 Liters every Second.", - "A Thermal Boiler is worth about 33 small Thermal Generators, and as the Boilers get much less Efficient, when not having enough Fuel, you should consider making a large Nether Pump for Lava, or a good Nuclear Reactor for molten Salt.", - "Input and Output Slots are fully optional, you can place multiple ones of them or even none on the Machine. A Machine without Input couldn't process any Recipes, while a Machine without Output just voids all outputted Items and Liquids.", - "It might be useful to use the Screwdriver on the Output Hatches to determine what is outputted where." }); - - - - //Test Novel - book_MultiPowerStation = writeBookTemplate( - "Manual_Multi_PowerStation", - "Power Storage & You [Version 0.64]", - "Alkalus", - new String[] { - //Page 1 - "So, when it comes to power storage you relaly have three seperate options:\n"+ - " \n"+ - "Battery Buffers,\n"+ - "Energy Buffers,\n"+ - "The Power Sub-Station\n", - //Page 2 - "Battery Buffer\n" + - " \n" + - "Is rather portable. Allowing you to throw set one up and insert batteries where ever you may need."+"\n"+ - "They output 1A for each battery stored inside, upto a maximum of 16A.", - //Page 3 - "Energy Buffer\n" + - " \n" + - "Is a more optimal choice for storage in your base. Once placed down, they cannot be moved without losing all stored power."+"\n"+ - "Energy Buffers can output 4A from the output side, however accept 16A as input.", - //Page 4 - "The Power Sub-Station"+ - " \n"+ - "Is used for storing Insane amounts of power later game."+"\n"+ - "Consumes 2% of the average voltage of all energy type hatches every tick."+"\n", - //Page 5 - "Allows Insertation/Removal of power from the rear face of the controller, swap with a screwdriver."+"\n"+ - "Variable Height Structure, between 4-16Y. Inserted Redox Cells dictate max energy tier of structure."+"\n", - //Page 6 - "Redox Cells cannot be placed into the Top or Bottom layer and only take up 3xhx3 internally."+"\n"+ - "Different Tier cells CANNOT be mixed together."+"\n", - //Page 7 - "All Hatches Must be HV at a Minimum, this minimum tier is in place to stop people abusing ULV/LV hatches to lower the avg/t."+"\n"+ - "Currently the GUI will NOT display anything at all until the structure forms, this is a known bug."+"\n", - //Page 8 - "Valid Hatches:\n"+ - "Energy Hatch,\n"+ - "Dynamo Hatch,\n"+ - "Charging Bus,\n"+ - "Discharging Bus,\n"+ - "Dynamo Buffer,\n"+ - "Multi-Amp Dynamo Hatch.\n\n\n"+ - "Structure MUST contain at least one energy input and one energy output hatch." - }); - - //Test Novel - book_ModularBauble = writeBookTemplate( - "Manual_Modular_Bauble", "How to: Modular Baubles", "Alkalus", - new String[] { - "Concept: This idea came from wanting flexibility. \n" + - "First step, Build a Modularity table to begin customisation of your Bauble. \n" - + " After this has been constructed, you can now combine the upgrades listed within this book to improve the baubles level/100.", - "Defence:\n" - + "Can be upgraded by combining metal plates with the bauble. \n" - + " | +1 | Aluminium \n" - + " | +2 | Stainless Steel \n" - + " | +3 | Tungsten \n" - + " | +4 | Tungsten Steel \n" - + " | +5 | Naquadah \n", - "There was once a sad and lonely oak tree. \n", - "There was once a sad and lonely oak tree. \n", - "There was once a sad and lonely oak tree. \n"}); - - //Test Novel - //20/21/22 - book_MultiMachineManual = writeBookTemplate( - "Manual_Multi_Machine", "Multi-Machine Manual", "Alkalus", - new String[] { - "This Multiblock, depending upon the mode used, can function as a variety of different machines. The idea behind this, was that most of these machines are rather niche compared to any others, as such, not used often.", - "To build, you need to construct a hollow 3x3x3 structure made from Multi-Use casings, With a minimum of 6. Any Casing position can be substituted out with an Input Hatch/Bus, an Output Hatch/Bus, Muffler, Maint. Hatch or Energy Injector Hatch.", - "The Mode can be set by using a Screwdriver on the controller block. Each mode allows the use of Numbered Circuits, to allow a different machine 'type' for each input bus.", - "[Metal Work] Mode A - Allows the multiblock to function as a Compressor, a Lathe or an Electro-Magnet. To allow a hatch to run in Compressor mode, insert a No. 20 circuit. For Lathe, use No. 21 and for Electro-Magnet use No. 22.", - "[Fluid Work] Mode B - Allows the multiblock to function as a Fermenter, a Fluid Extractor or an Extractor. To allow a hatch to run in Fermenter mode, insert a No. 20 circuit. For Fluid Extractor, use No. 21 and for Extractor use No. 22.", - "[Misc. Work] Mode C - Allows the multiblock to function as a Laser Engraver, an Autoclave or a Fluid Solidifier. To allow a hatch to run in Laser Engraver mode, insert a No. 20 circuit. For Autoclave, use No. 21 and for Solidifier use No. 22.", - }); - - book_NuclearManual = writeBookTemplate( - "Manual_NuclearStuff_1", "Nuclear Chemistry [FFPP]", "Alkalus", - new String[] { - //Page 1 - "Fission Fuel Processing Plant\n" - + "Size: 3x9x3 [LxHxW]\n" - + "Controller: Center, Bottom\n" - + "4x Input Hatch\n" - + "2x Output Hatch\n" - + "1x Output Bus\n" - + "1x ZPM+ Muffler\n" - + "1x Maintenance Hatch\n" - + "1x Energy Hatch\n", - //Page 2 - "[1] 7x Hastelloy-X or I/O\n" - + "[2] 5x Incoloy-DS Fluid Containment\n" - + "[3] 4x Zeron-100 Shielding\n" - + "[4] 17x Hastelloy-N Sealant Case" - + "\n" - + "Multiblock Construction\n" - + "Convention is [LxHxW]\n" - + "\n", - //Page 3 - "Layer 1/2:\n" - + "[1][1][1]\n" - + "[1][1][1]\n" - + "[1][1][1]\n" - + "\n" - + "Layer 3/5/6\n" - + "[ ][4][ ]\n" - + "[4][2][4]\n" - + "[ ][4][ ]\n" - + "\n", - //Page 4 - "Layer 4\n" - + "[ ][3][ ]\n" - + "[3][2][3]\n" - + "[ ][3][ ]\n" - + "\n" - + "Layer 7/8/9\n" - + "[ ][ ][ ]\n" - + "[ ][3][ ]\n" - + "[ ][ ][ ]\n" - , - //Page 5 - "Fission Fuel\n"+ - "Processing Plant"+ - "----------------------\n"+ - "This structure is used to produce the Molten Salts required to run a Liquid Fluorine Thorium Reactor [LFTR]." - - }); - - - book_MultiChemicalPlant = writeBookTemplate( - "book_Multi_ChemicalPlant", "Chemical Plant Manual", "Alkalus", - new String[] { - - // Intro - "This book will explain how the Chemical Plant is constructed, which blocks are valid to upgrade it and also how the upgrades work.", - - // Info - "Solid Casings = Plant tier" + "\n" + - "Machine Casings = Hatch tier" + "\n" + - "Higher tier coils More Speed" + "\n" + - "T1 50% , T2 100% , T3 150%, etc" + "\n", - - "Higher tier pipe casings boost parallel"+ "\n" + - "and reduce catalyst consumption" + "\n" + - "+2 parallel per tier, 20% extra chance of"+ "\n" + - "not damaging catalyst per tier" + "\n", - - - // Machine Casings - "Valid Solid Machine Casings:" + "\n" + - "0 - Strong Bronze" + "\n" + - "1 - Solid Steel" + "\n" + - "2 - Sturdy Aluminium" + "\n" + - "3 - Clean Stainless Steel" + "\n" + - "4 - Stable Titanium" + "\n" + - "5 - Robust Tungstensteel" + "\n" + - "6 - Vigorous Laurenium" + "\n" + - "7 - Rugged Botmium", - - // Machine Casings - "Valid Tiered Machine Casings:" + "\n" + "\n" + - "1 - " + GT_Values.VN[0] + "\n" + - "2 - " + GT_Values.VN[1] + "\n" + - "3 - " + GT_Values.VN[2] + "\n" + - "4 - " + GT_Values.VN[3] + "\n" + - "5 - " + GT_Values.VN[4] + "\n" + - "6 - " + GT_Values.VN[5] + "\n" + - "7 - " + GT_Values.VN[6] + "\n" + - "8 - " + GT_Values.VN[7] + "\n" + - "9 - " + GT_Values.VN[8] + "\n" + - "10 - " + GT_Values.VN[9], - - // Pipe Casings - "Valid Pipe Casings:" + "\n" + "\n" + - "1 - Bronze" + "\n" + - "2 - Steel" + "\n" + - "3 - Titanium" + "\n" + - "4 - Tungstensteel", - - //Coils - "Valid Coils:" + "\n" + "\n" + - "1 - Cupronickel" + "\n" + - "2 - Kanthal" + "\n" + - "3 - Nichrome" + "\n" + - "4 - Tungstensteel" + "\n" + - "5 - HSS-G" + "\n" + - "6 - Naquadah" + "\n" + - "7 - Naquadah Alloy", - - // Requirements - "Multiblock Requirements:" + "\n" + "\n" + - "27x Coils" + "\n" + - "18x Pipe Casings" + "\n" + - "57x Tiered Machine Casings" + "\n" + - "80+ Solid Casings" + "\n" + - "1x Catalyst Housing (Catalysts cannot go inside an Input Bus)", - - // Construction Guide - "Construction Guide Pt1:" + "\n" + "\n" + - "Controller is placed on a middle casing in the bottom layer" + "\n" + - "Hatches can only be placed on the bottom layer edges", - - "Construction Guide Pt2:" + "\n" + "\n" + - "7x7x7 Hollow frame of solid casings" + "\n" + - "5x1x5 layer of solid casings (fills in top layer)" + "\n" + - "5x1x5 layer of machine casings (fills in bottom layer)", - - "Construction Guide Pt3:" + "\n" + - "In the central 3x5x3:" + "\n" + - "3x1x3 layer of Coils, surrounded by ring of Machine Casings" + "\n" + - "3x1x3 layer of Pipe Casings" + "\n" + - "3x1x3 layer of Coils" + "\n" + - "3x1x3 layer of Pipe Casings" + "\n" + - "3x1x3 layer of Coils, surrounded by ring of Machine Casings", - - // Construction Guide Info - "Information:" + "\n" + "\n" + - "A = Air" + "\n" + - "X = Solid Casing" + "\n" + - "M = Machine Casing" + "\n" + - "P = Pipe Casing" + "\n" + - "C = Coil Casing", - - "Layer 1:" + "\n" + "\n" + - "XXXXXXX" + "\n" + - "XMMMMMX" + "\n" + - "XMMMMMX" + "\n" + - "XMMMMMX" + "\n" + - "XMMMMMX" + "\n" + - "XMMMMMX" + "\n" + - "XXXXXXX", - - "Layer 2:" + "\n" + "\n" + - "XAAAAAX" + "\n" + - "AMMMMMA" + "\n" + - "AMCCCMA" + "\n" + - "AMCCCMA" + "\n" + - "AMCCCMA" + "\n" + - "AMMMMMA" + "\n" + - "XAAAAAX", - - "Layer 3:" + "\n" + "\n" + - "XAAAAAX" + "\n" + - "AAAAAAA" + "\n" + - "AAPPPAA" + "\n" + - "AAPPPAA" + "\n" + - "AAPPPAA" + "\n" + - "AAAAAAA" + "\n" + - "XAAAAAX", - - "Layer 4:" + "\n" + "\n" + - "XAAAAAX" + "\n" + - "AAAAAAA" + "\n" + - "AACCCAA" + "\n" + - "AACCCAA" + "\n" + - "AACCCAA" + "\n" + - "AAAAAAA" + "\n" + - "XAAAAAX", - - "Layer 5:" + "\n" + "\n" + - "XAAAAAX" + "\n" + - "AAAAAAA" + "\n" + - "AAPPPAA" + "\n" + - "AAPPPAA" + "\n" + - "AAPPPAA" + "\n" + - "AAAAAAA" + "\n" + - "XAAAAAX", - - "Layer 6:" + "\n" + "\n" + - "XAAAAAX" + "\n" + - "AMMMMMA" + "\n" + - "AMCCCMA" + "\n" + - "AMCCCMA" + "\n" + - "AMCCCMA" + "\n" + - "AMMMMMA" + "\n" + - "XAAAAAX", - - "Layer 7:" + "\n" + "\n" + - "XXXXXXX" + "\n" + - "XXXXXXX" + "\n" + - "XXXXXXX" + "\n" + - "XXXXXXX" + "\n" + - "XXXXXXX" + "\n" + - "XXXXXXX" + "\n" + - "XXXXXXX", - }); - - } - - - - - public static ItemStack ItemBookWritten_ThermalBoiler; - public static ItemStack ItemBookWritten_NuclearManual; - public static ItemStack ItemBookWritten_ModularBaubles; - public static ItemStack ItemBookWritten_MultiPowerStorage; - public static ItemStack ItemBookWritten_MultiMachineManual; - public static ItemStack ItemBookWritten_MultiChemicalPlant; - - public static void runLater(){ - ItemBookWritten_ThermalBoiler = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 0, 1); - ItemBookWritten_MultiPowerStorage = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 1, 1); - ItemBookWritten_ModularBaubles = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 2, 1); - ItemBookWritten_MultiMachineManual = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 3, 1); - ItemBookWritten_NuclearManual = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 4, 1); - ItemBookWritten_MultiChemicalPlant = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 5, 1); - - //Multiblock Manuals - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getSimpleStack(Items.lava_bucket)}, ItemBookWritten_ThermalBoiler); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict(CI.craftingToolWrench, 1)}, ItemBookWritten_MultiMachineManual); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Tin", 1)}, ItemBookWritten_MultiPowerStorage); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1)}, ItemBookWritten_NuclearManual); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Copper", 1)}, ItemBookWritten_MultiChemicalPlant); - - for (int i=0;i temp : CORE.burnables) { - int aStackID = Item.getIdFromItem(aStack.getItem()); - int burnID = Item.getIdFromItem(temp.getValue().getItem()); - if (aStackID == burnID){ - int burn = temp.getKey(); - ItemStack fuel = temp.getValue(); - ItemStack testItem = ItemUtils.getSimpleStack(fuel, aStack.stackSize); - - if (aStack.isItemEqual(testItem)){ - return burn; - } - } - } - - //If it's not my fuel, return 0. - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java deleted file mode 100644 index 53d63499a6..0000000000 --- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ /dev/null @@ -1,320 +0,0 @@ -package gtPlusPlus.core.handler; - -import static gtPlusPlus.core.lib.LoadedMods.Gregtech; - -import java.util.LinkedList; -import java.util.Queue; -import java.util.Set; - -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.common.compat.COMPAT_BigReactors; -import gtPlusPlus.core.common.compat.COMPAT_CompactWindmills; -import gtPlusPlus.core.common.compat.COMPAT_EnderIO; -import gtPlusPlus.core.common.compat.COMPAT_ExtraUtils; -import gtPlusPlus.core.common.compat.COMPAT_HarvestCraft; -import gtPlusPlus.core.common.compat.COMPAT_IC2; -import gtPlusPlus.core.common.compat.COMPAT_MorePlanets; -import gtPlusPlus.core.common.compat.COMPAT_OpenBlocks; -import gtPlusPlus.core.common.compat.COMPAT_PneumaticCraft; -import gtPlusPlus.core.common.compat.COMPAT_RFTools; -import gtPlusPlus.core.common.compat.COMPAT_Railcraft; -import gtPlusPlus.core.common.compat.COMPAT_SimplyJetpacks; -import gtPlusPlus.core.common.compat.COMPAT_Thaumcraft; -import gtPlusPlus.core.common.compat.COMPAT_Witchery; -import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler; -import gtPlusPlus.core.handler.Recipes.RegistrationHandler; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.recipe.RECIPES_Extruder; -import gtPlusPlus.core.recipe.RECIPES_GREGTECH; -import gtPlusPlus.core.recipe.RECIPES_LaserEngraver; -import gtPlusPlus.core.recipe.ShapedRecipeObject; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaGarbageCollector; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_FluidCanning; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling; -import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_GTNH; -import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_Nuclear; -import gtPlusPlus.xmod.gregtech.registration.gregtech.*; -import net.minecraft.item.ItemStack; - -public class COMPAT_HANDLER { - - public static Queue RemoveRecipeQueue = new LinkedList<>(); - public static Queue AddRecipeQueue = new LinkedList<>(); - public static Boolean areInitItemsLoaded = false; - - - public static void registerMyModsOreDictEntries(){ - - Logger.INFO("Registering Materials with OreDict."); - //In-house - - //tools - GT_OreDictUnificator.registerOre("craftingToolSandHammer", new ItemStack(ModItems.itemSandstoneHammer)); - - for(int i=1; i<=10; i++){ - GT_OreDictUnificator.registerOre("bufferCore_"+GT_Values.VN[i-1], new ItemStack(ItemUtils.getItemFromFQRN("miscutils:item.itemBufferCore"+i))); - } - } - - public static void registerGregtechMachines() { - if (Gregtech) { - - //Debug - GregtechItemList.Garbage_Collector_Debug_Machine.set( - new GregtechMetaGarbageCollector( - "garbagecollector.01.tier.single", - "JVM Garbage Collector", - "Useful for debugging or smoother performance on local servers").getStackForm(1L)); - - - //Free IDs - /* - --- - 859 - to - 868 - --- - 911 - to - 940 - */ - - new RECIPES_LaserEngraver(); - new RECIPES_Extruder(); - GregtechGeneratorsULV.run(); - GregtechEnergyBuffer.run(); - GregtechLFTR.run(); - GregtechSteamCondenser.run(); - GregtechSafeBlock.run(); - //GregtechSuperConductionPoint.run(); - GregtechIronBlastFurnace.run(); - GregtechIndustrialCentrifuge.run(); - GregtechIndustrialCokeOven.run(); - GregtechIndustrialPlatePress.run(); - GregtechRocketFuelGenerator.run(); - GregtechIndustrialElectrolyzer.run(); - GregtechIndustrialMacerator.run(); - GregtechIndustrialWiremill.run(); - GregtechIndustrialMassFabricator.run(); - GregtechIndustrialBlastSmelter.run(); - GregtechSolarGenerators.run(); - GregtechPowerSubStation.run(); - GregtechDehydrator.run(); - GregtechAdvancedBoilers.run(); - GregtechPollutionDevices.run(); - GregtechTieredFluidTanks.run(); - //GregtechIndustrialMultiTank.run(); - GregtechGeothermalThermalGenerator.run(); - Gregtech4Content.run(); - GregtechIndustrialFuelRefinery.run(); - GregtechTreeFarmerTE.run(); - GregtechIndustrialTreeFarm.run(); - GregtechIndustrialSifter.run(); - GregtechSimpleWasher.run(); - GregtechRTG.run(); - GregtechCyclotron.run(); - GregtechHiAmpTransformer.run(); - GregtechIndustrialThermalCentrifuge.run(); - GregtechIndustrialWashPlant.run(); - GregtechSemiFluidgenerators.run(); - GregtechAdvancedMixer.run(); - GregtechWirelessChargers.run(); - GregtechIndustrialGeneratorArray.run(); - GregtechIndustrialCuttingFactory.run(); - //GregtechMiniRaFusion.run(); - GregtechComponentAssembler.run(); - //GregtechTeslaTower.run(); - GregtechSuperChests.run(); - GregtechIndustrialFishPond.run(); - GregtechTieredChunkloaders.run(); - GregtechIndustrialExtruder.run(); - GregtechIndustrialMultiMachine.run(); - //GregtechBedrockPlatforms.run(); - GregtechBufferDynamos.run(); - GregtechAmazonWarehouse.run(); - GregtechFactoryGradeReplacementMultis.run(); - GregtechThaumcraftDevices.run(); - GregtechThreadedBuffers.run(); - GregtechIndustrialMixer.run(); - GregtechCustomHatches.run(); - //GregtechNaqReactor.run(); - GregtechIndustrialArcFurnace.run(); - //GregtechSolarTower.run(); - GregtechLargeTurbinesAndHeatExchanger.run(); - GregtechPowerBreakers.run(); - GregtechFluidReactor.run(); - GregtechAlgaeContent.run(); - GregtechIndustrialAlloySmelter.run(); - GregtechIsaMill.run(); - GregtechSteamMultis.run(); - //GregtechIndustrialElementDuplicator.run(); - - //New Horizons Content - NewHorizonsAccelerator.run(); - } - - } - - //InterMod - public static void intermodOreDictionarySupport(){ - - if (LoadedMods.Big_Reactors){ - COMPAT_BigReactors.OreDict(); - } - if (LoadedMods.EnderIO){ - COMPAT_EnderIO.OreDict(); - } - if (LoadedMods.MorePlanets){ - COMPAT_MorePlanets.OreDict(); - } - if (LoadedMods.OpenBlocks){ - COMPAT_OpenBlocks.OreDict(); - } - if (LoadedMods.Railcraft){ - COMPAT_Railcraft.OreDict(); - } - if (LoadedMods.Simply_Jetpacks){ - COMPAT_SimplyJetpacks.OreDict(); - } - if (LoadedMods.RFTools){ - COMPAT_RFTools.OreDict(); - } - if (LoadedMods.Thaumcraft){ - COMPAT_Thaumcraft.OreDict(); - } - if (LoadedMods.Extra_Utils){ - COMPAT_ExtraUtils.OreDict(); - } - if (LoadedMods.PneumaticCraft){ - COMPAT_PneumaticCraft.OreDict(); - } - if (LoadedMods.CompactWindmills){ - COMPAT_CompactWindmills.OreDict(); - } - if (LoadedMods.IndustrialCraft2){ - COMPAT_IC2.OreDict(); - } - if (LoadedMods.PamsHarvestcraft){ - COMPAT_HarvestCraft.OreDict(); - } - if (LoadedMods.Witchery) { - COMPAT_Witchery.OreDict(); - } - } - - public static void RemoveRecipesFromOtherMods(){ - //Removal of Recipes - for(final Object item : RemoveRecipeQueue){ - RecipeUtils.removeCraftingRecipe(item); - } - } - - public static void InitialiseHandlerThenAddRecipes(){ - RegistrationHandler.run(); - } - public static void InitialiseLateHandlerThenAddRecipes(){ - LateRegistrationHandler.run(); - } - - public static void startLoadingGregAPIBasedRecipes(){ - //Add hand-made recipes - RECIPES_GREGTECH.run(); - RecipeLoader_GTNH.generate(); - RecipeLoader_Nuclear.generate(); - //Add autogenerated Recipes from Item Components - for (Set> m : MaterialGenerator.mRecipeMapsToGenerate) { - for (RunnableWithInfo r : m) { - try { - r.run(); - Logger.INFO("[FIND] "+r.getInfoData().getLocalizedName()+" recipes generated."); - } - catch (Throwable t) { - t.printStackTrace(); - Logger.INFO("[ERROR] "+r.getInfoData().getLocalizedName()+" recipes failed to generated."); - } - } - } - RecipeGen_Recycling.executeGenerators(); - runQueuedMisc(); - - // Do Fluid Canning Last, because they're not executed on demand, but rather queued. - RecipeGen_FluidCanning.init(); - } - - - - public static void onLoadComplete(FMLLoadCompleteEvent event) { - runQueuedOnLoadComplete(event); - } - - public static final AutoMap> mRecipesToGenerate = new AutoMap>(); - public static final AutoMap> mGtRecipesToGenerate = new AutoMap>(); - - public static final AutoMap> mObjectsToRunInPostInit = new AutoMap>(); - public static final AutoMap mObjectsToRunInOnLoadComplete = new AutoMap(); - - public static void runQueuedRecipes() { - //Add autogenerated Recipes from Item Components - for (RunnableWithInfo m : mRecipesToGenerate) { - try { - m.run(); - } - catch (Throwable t) { - t.printStackTrace(); - Logger.INFO("[ERROR] "+m.getInfoData()+" recipe failed to generated."); - } - - } - for (RunnableWithInfo m : mGtRecipesToGenerate) { - try { - m.run(); - } - catch (Throwable t) { - t.printStackTrace(); - Logger.INFO("[ERROR] "+m.getInfoData()+" recipe failed to generated."); - } - - } - } - - public static void runQueuedMisc() { - for (RunnableWithInfo m : mObjectsToRunInPostInit) { - try { - m.run(); - } - catch (Throwable t) { - t.printStackTrace(); - Logger.INFO("[ERROR] "+m.getInfoData()); - } - - } - } - - /** - * Generally used to register GT recipe map changes after they've been populated. - */ - public static void runQueuedOnLoadComplete(FMLLoadCompleteEvent event) { - for (ItemPackage m : mObjectsToRunInOnLoadComplete) { - try { - m.onLoadComplete(event); - } - catch (Throwable t) { - t.printStackTrace(); - Logger.INFO("[ERROR] "+m.getInfoData()); - } - - } - } -} diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java deleted file mode 100644 index 9a1b551d30..0000000000 --- a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java +++ /dev/null @@ -1,91 +0,0 @@ -package gtPlusPlus.core.handler; - -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import gtPlusPlus.xmod.bartcrops.HANDLER_CropsPlusPlus; -import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; -import gtPlusPlus.xmod.computronics.HANDLER_Computronics; -import gtPlusPlus.xmod.forestry.HANDLER_FR; -import gtPlusPlus.xmod.galacticraft.HANDLER_GalactiCraft; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; -import gtPlusPlus.xmod.growthcraft.HANDLER_GC; -import gtPlusPlus.xmod.ic2.HANDLER_IC2; -import gtPlusPlus.xmod.ob.HANDLER_OpenBlocks; -import gtPlusPlus.xmod.railcraft.HANDLER_Railcraft; -import gtPlusPlus.xmod.reliquary.HANDLER_Reliquary; -import gtPlusPlus.xmod.sc2.HANDLER_SC2; -import gtPlusPlus.xmod.sol.HANDLER_SpiceOfLife; -import gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft; -import gtPlusPlus.xmod.thermalfoundation.HANDLER_TF; -import gtPlusPlus.xmod.tinkers.HANDLER_Tinkers; - -public class COMPAT_IntermodStaging { - - public static void preInit(FMLPreInitializationEvent preinit){ - HANDLER_GT.preInit(); - HANDLER_GC.preInit(); - HANDLER_TF.preInit(); - HANDLER_FR.preInit(); - HANDLER_IC2.preInit(); - HANDLER_Computronics.preInit(); - HANDLER_BiomesOPlenty.preInit(); - //HANDLER_Mekanism.preInit(); - HANDLER_Thaumcraft.preInit(); - HANDLER_Tinkers.preInit(); - HANDLER_SC2.preInit(); - HANDLER_GalactiCraft.preInit(); - HANDLER_CropsPlusPlus.preInit(preinit); - HANDLER_Railcraft.preInit(); - HANDLER_Reliquary.preInit(); - HANDLER_OpenBlocks.preInit(); - HANDLER_SpiceOfLife.preInit(); - } - - public static void init(FMLInitializationEvent init){ - HANDLER_GT.init(); - HANDLER_GC.init(); - HANDLER_TF.init(); - HANDLER_FR.Init(); - HANDLER_IC2.init(); - HANDLER_Computronics.init(); - HANDLER_BiomesOPlenty.init(); - //HANDLER_Mekanism.init(); - HANDLER_Thaumcraft.init(); - HANDLER_Tinkers.init(); - HANDLER_SC2.init(); - HANDLER_GalactiCraft.init(); - HANDLER_CropsPlusPlus.init(init); - HANDLER_Railcraft.init(); - HANDLER_Reliquary.init(); - HANDLER_OpenBlocks.init(); - HANDLER_SpiceOfLife.init(); - } - - public static void postInit(FMLPostInitializationEvent postinit){ - HANDLER_GT.postInit(); - HANDLER_GC.postInit(); - HANDLER_TF.postInit(); - HANDLER_FR.postInit(); - HANDLER_IC2.postInit(); - HANDLER_Computronics.postInit(); - HANDLER_BiomesOPlenty.postInit(); - //HANDLER_Mekanism.postInit(); - HANDLER_Thaumcraft.postInit(); - HANDLER_Tinkers.postInit(); - HANDLER_SC2.postInit(); - HANDLER_GalactiCraft.postInit(); - HANDLER_CropsPlusPlus.postInit(postinit); - HANDLER_Railcraft.postInit(); - HANDLER_Reliquary.postInit(); - HANDLER_OpenBlocks.postInit(); - HANDLER_SpiceOfLife.postInit(); - } - - public static void onLoadComplete(FMLLoadCompleteEvent event) { - HANDLER_GT.onLoadComplete(event); - } - - -} diff --git a/src/Java/gtPlusPlus/core/handler/CraftingManager.java b/src/Java/gtPlusPlus/core/handler/CraftingManager.java deleted file mode 100644 index 6fb580cc32..0000000000 --- a/src/Java/gtPlusPlus/core/handler/CraftingManager.java +++ /dev/null @@ -1,17 +0,0 @@ -package gtPlusPlus.core.handler; - -public class CraftingManager { - - public static void mainRegistry() { - addCraftingRecipies(); - addSmeltingRecipies(); - } - - public static void addCraftingRecipies() { - - } - - public static void addSmeltingRecipies() { - - } -} diff --git a/src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java b/src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java deleted file mode 100644 index d164efa3d7..0000000000 --- a/src/Java/gtPlusPlus/core/handler/EnumHelperHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.core.handler; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; -import gtPlusPlus.xmod.ic2.CustomInternalName; - -public class EnumHelperHandler { - - public static void init() { - - if (LoadedMods.IndustrialCraft2) { - CustomInternalName.init(); - } - - if (LoadedMods.Gregtech) { - HANDLER_GT.addNewOrePrefixes(); - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/GuiHandler.java b/src/Java/gtPlusPlus/core/handler/GuiHandler.java deleted file mode 100644 index 0567d6c5dd..0000000000 --- a/src/Java/gtPlusPlus/core/handler/GuiHandler.java +++ /dev/null @@ -1,231 +0,0 @@ -package gtPlusPlus.core.handler; - -import cpw.mods.fml.common.network.IGuiHandler; -import cpw.mods.fml.common.network.NetworkRegistry; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; -import gtPlusPlus.core.container.*; -import gtPlusPlus.core.container.box.LunchBoxContainer; -import gtPlusPlus.core.container.box.MagicBagContainer; -import gtPlusPlus.core.container.box.ToolBoxContainer; -import gtPlusPlus.core.gui.beta.Gui_ID_Registry; -import gtPlusPlus.core.gui.beta.MU_GuiId; -import gtPlusPlus.core.gui.item.GuiBaseBackpack; -import gtPlusPlus.core.gui.item.GuiBaseGrindle; -import gtPlusPlus.core.gui.item.box.LunchBoxGui; -import gtPlusPlus.core.gui.item.box.MagicBagGui; -import gtPlusPlus.core.gui.item.box.ToolBoxGui; -import gtPlusPlus.core.gui.machine.*; -import gtPlusPlus.core.interfaces.IGuiManager; -import gtPlusPlus.core.inventories.BaseInventoryBackpack; -import gtPlusPlus.core.inventories.BaseInventoryGrindle; -import gtPlusPlus.core.inventories.box.LunchBoxInventory; -import gtPlusPlus.core.inventories.box.MagicBagInventory; -import gtPlusPlus.core.inventories.box.ToolBoxInventory; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.tileentities.general.*; -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; -import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; -import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; -import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; -import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; - -public class GuiHandler implements IGuiHandler { - - public static final int GUI1 = 0; // Project Table - public static final int GUI2 = 1; // Helium Generator - public static final int GUI3 = 2; // BackpackHandler - public static final int GUI4 = 3; // Workbench - public static final int GUI5 = 4; // Workbench Adv - public static final int GUI6 = 5; // Fish trap - public static final int GUI7 = 6; // Trade table - public static final int GUI8 = 7; // Circuit Programmer - public static final int GUI9 = 8; // Grindle - public static final int GUI10 = 9; // Universal Toolbox - public static final int GUI11 = 10; // Auto Lunchbox - public static final int GUI12 = 11; // Bag for Magic Tools - public static final int GUI13 = 12; // Decayables Chest - public static final int GUI14 = 13; // Super Jukebox - public static final int GUI15 = 14; // Pest Killer - public static final int GUI16 = 15; // Round-Robinator - public static final int GUI17 = 16; // Egg Box - public static final int GUI18 = 17; // Volumetric Flask Setter - - public static void init() { - - Logger.INFO("Registering GUIs."); - NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new GuiHandler()); - // Register GuiHandler - // NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new - // GuiHandler()); - } - - @Override // ContainerModTileEntity - public Object getServerGuiElement(final int ID, final EntityPlayer player, final World world, final int x, - final int y, final int z) { - final TileEntity te = world.getTileEntity(x, y, z); - - if (te != null) { - if (ID == GUI1) { - return new Container_ProjectTable(player.inventory, (TileEntityProjectTable) te); - } else if (ID == GUI2) { - return new Container_ModularityTable(player.inventory, (TileEntityModularityTable) te); - } - } - - if (ID == GUI3) { - // Use the player's held item to create the inventory - return new Container_BackpackBase(player, player.inventory, - new BaseInventoryBackpack(player.getHeldItem())); - } - - if (te != null) { - if (ID == GUI4) { - return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); - } else if (ID == GUI5) { - Logger.INFO("sad"); - return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); - - } else if (ID == GUI6) { - return new Container_FishTrap(player.inventory, (TileEntityFishTrap) te); - } else if (ID == GUI7) { - return new Container_TradeTable(player.inventory, (TileEntityTradeTable) te); - } else if (ID == GUI8) { - return new Container_CircuitProgrammer(player.inventory, (TileEntityCircuitProgrammer) te); - } else if (ID == GUI13) { - return new Container_DecayablesChest(player.inventory, (TileEntityDecayablesChest) te); - } else if (ID == GUI14) { - return new Container_SuperJukebox(player.inventory, (TileEntitySuperJukebox) te); - } else if (ID == GUI15) { - return new Container_PestKiller(player.inventory, (TileEntityPestKiller) te); - } else if (ID == GUI16) { - return new Container_RoundRobinator(player.inventory, (TileEntityRoundRobinator) te); - } else if (ID == GUI17) { - return new Container_EggBox(player.inventory, (TileEntityEggBox) te); - } else if (ID == GUI18) { - return new Container_VolumetricFlaskSetter(player.inventory, (TileEntityVolumetricFlaskSetter) te); - } - } - - if (ID == GUI9) { - return new Container_Grindle(player, player.inventory, new BaseInventoryGrindle(player.getHeldItem())); - } - // Tool, lunch, magic - if (ID == GUI10) { - return new ToolBoxContainer(player, player.inventory, new ToolBoxInventory(player.getHeldItem())); - } - if (ID == GUI11) { - return new LunchBoxContainer(player, player.inventory, new LunchBoxInventory(player.getHeldItem())); - } - if (ID == GUI12) { - return new MagicBagContainer(player, player.inventory, new MagicBagInventory(player.getHeldItem())); - } - - return null; - } - - @Override // GuiModTileEntity - public Object getClientGuiElement(final int ID, final EntityPlayer player, final World world, final int x, - final int y, final int z) { - Logger.WARNING("getClientGuiElement Called by: " + player + ", in world: " + player.dimension + " at x:" + x - + ", y:" + y + ", z:" + z + "."); - final TileEntity te = world.getTileEntity(x, y, z); - if (te != null) { - if (ID == GUI1) { - return new GUI_ProjectTable(player.inventory, (TileEntityProjectTable) te); - } else if (ID == GUI2) { - return new GUI_ModularityTable(player.inventory, (TileEntityModularityTable) te); - } - } - - if (ID == GUI3) { - // We have to cast the new container as our custom class - // and pass in currently held item for the inventory - return new GuiBaseBackpack(new Container_BackpackBase(player, player.inventory, - new BaseInventoryBackpack(player.getHeldItem()))); - } - - if (te != null) { - if (ID == GUI4) { - return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); - } else if (ID == GUI5) { - Logger.INFO("sad"); - return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); - } else if (ID == GUI6) { - return new GUI_FishTrap(player.inventory, (TileEntityFishTrap) te); - } else if (ID == GUI7) { - return new GUI_TradeTable(player.inventory, (TileEntityTradeTable) te, - ((TileEntityBase) te).getOwner()); - } else if (ID == GUI8) { - return new GUI_CircuitProgrammer(player.inventory, (TileEntityCircuitProgrammer) te); - } else if (ID == GUI13) { - return new GUI_DecayablesChest(player.inventory, (TileEntityDecayablesChest) te); - } else if (ID == GUI14) { - return new GUI_SuperJukebox(player.inventory, (TileEntitySuperJukebox) te); - } else if (ID == GUI15) { - return new GUI_PestKiller(player.inventory, (TileEntityPestKiller) te); - } else if (ID == GUI16) { - return new GUI_RoundRobinator(player.inventory, (TileEntityRoundRobinator) te); - } else if (ID == GUI17) { - return new GUI_EggBox(player.inventory, (TileEntityEggBox) te); - } else if (ID == GUI18) { - return new GUI_VolumetricFlaskSetter(new Container_VolumetricFlaskSetter(player.inventory, (TileEntityVolumetricFlaskSetter) te)); - } - } - - if (ID == GUI9) { - return new GuiBaseGrindle( - new Container_Grindle(player, player.inventory, new BaseInventoryGrindle(player.getHeldItem()))); - } - - // Tool, lunch, magic - if (ID == GUI10) { - return new ToolBoxGui( - new ToolBoxContainer(player, player.inventory, new ToolBoxInventory(player.getHeldItem()))); - } - if (ID == GUI11) { - return new LunchBoxGui( - new LunchBoxContainer(player, player.inventory, new LunchBoxInventory(player.getHeldItem()))); - } - if (ID == GUI12) { - return new MagicBagGui( - new MagicBagContainer(player, player.inventory, new MagicBagInventory(player.getHeldItem()))); - } - - return null; - } - - // New Methods - public static void openGui(final EntityPlayer entityplayer, final IGuiManager guiHandler) { - openGui(entityplayer, guiHandler, (short) 0); - } - - public static void openGui(final EntityPlayer entityplayer, final IGuiManager guiHandler, final short data) { - final int guiData = encodeGuiData(guiHandler, data); - final ChunkCoordinates coordinates = guiHandler.getCoordinates(); - entityplayer.openGui(GTplusplus.instance, guiData, entityplayer.worldObj, coordinates.posX, coordinates.posY, - coordinates.posZ); - } - - private static int encodeGuiData(final IGuiManager guiHandler, final short data) { - final MU_GuiId guiId = Gui_ID_Registry.getGuiIdForGuiHandler(guiHandler); - return (data << 16) | guiId.getId(); - } - - private static MU_GuiId decodeGuiID(final int guiData) { - final int guiId = guiData & 0xFF; - return Gui_ID_Registry.getGuiId(guiId); - } - - private static short decodeGuiData(final int guiId) { - return (short) (guiId >> 16); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java b/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java deleted file mode 100644 index e20e13a337..0000000000 --- a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java +++ /dev/null @@ -1,66 +0,0 @@ -package gtPlusPlus.core.handler; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableOldGTcircuits; - -import java.lang.reflect.Field; -import java.util.HashSet; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.EmptyRecipeMap; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.RECIPES_Old_Circuits; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; - -public class OldCircuitHandler { - - public static void preInit(){ - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - removeCircuitRecipeMap(); //Bye shitty recipes. - } - } - - public static void init(){ - - } - - public static void postInit(){ - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - RECIPES_Old_Circuits.handleCircuits(); - new RECIPES_Old_Circuits(); - } - } - - public static boolean addCircuitItems() { - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - return MetaGeneratedGregtechItems.INSTANCE.registerOldCircuits(); - } - return false; - } - - private static boolean removeCircuitRecipeMap(){ - if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - try { - Logger.INFO("[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added."); - ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new EmptyRecipeMap(new HashSet(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); - Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"); - FieldUtils.removeFinalModifier(jaffar, true); - jaffar.set(null, new EmptyRecipeMap(new HashSet(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); - Logger.INFO("[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes."); - } - catch (Exception e) { - Logger.INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map."); - return false; - } - return true; - } - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/PacketHandler.java b/src/Java/gtPlusPlus/core/handler/PacketHandler.java deleted file mode 100644 index 382b82df29..0000000000 --- a/src/Java/gtPlusPlus/core/handler/PacketHandler.java +++ /dev/null @@ -1,91 +0,0 @@ -package gtPlusPlus.core.handler; - -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import cpw.mods.fml.relauncher.Side; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.network.handler.AbstractClientMessageHandler; -import gtPlusPlus.core.network.packet.AbstractPacket; -import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui; -import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui2; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; - -public class PacketHandler { - - private static byte packetId = 0; - - private static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(CORE.MODID); - - public static final void init() { - registerMessage(Packet_VolumetricFlaskGui.class, Packet_VolumetricFlaskGui.class); - registerMessage(Packet_VolumetricFlaskGui2.class, Packet_VolumetricFlaskGui2.class); - } - - /** - * Registers a message and message handler - */ - private static final void registerMessage(Class handlerClass, Class messageClass) { - Side side = AbstractClientMessageHandler.class.isAssignableFrom(handlerClass) ? Side.CLIENT : Side.SERVER; - registerMessage(handlerClass, messageClass, side); - } - - private static final void registerMessage(Class handlerClass, Class messageClass, Side side) { - INSTANCE.registerMessage(handlerClass, messageClass, packetId++, side); - if (AbstractPacket.class.isInstance(messageClass.getClass())) { - AbstractPacket aPacket = ReflectionUtils.createNewInstanceFromConstructor(ReflectionUtils.getConstructor(messageClass, new Class[] {}), new Object[] {}); - if (aPacket != null) { - Logger.INFO("Registered Packet: "+aPacket.getPacketName()); - } - } - } - - /** - * Send this message to the specified player. - * See {@link SimpleNetworkWrapper#sendTo(IMessage, EntityPlayerMP)} - */ - public static final void sendTo(IMessage message, EntityPlayerMP player) { - INSTANCE.sendTo(message, player); - } - - /** - * Send this message to everyone within a certain range of a point. - * See {@link SimpleNetworkWrapper#sendToDimension(IMessage, NetworkRegistry.TargetPoint)} - */ - public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { - INSTANCE.sendToAllAround(message, point); - } - - /** - * Sends a message to everyone within a certain range of the coordinates in the same dimension. - */ - public static final void sendToAllAround(IMessage message, int dimension, double x, double y, double z, double range) { - sendToAllAround(message, new NetworkRegistry.TargetPoint(dimension, x, y, z, range)); - } - - /** - * Sends a message to everyone within a certain range of the player provided. - */ - public static final void sendToAllAround(IMessage message, EntityPlayer player, double range) { - sendToAllAround(message, player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, range); - } - - /** - * Send this message to everyone within the supplied dimension. - * See {@link SimpleNetworkWrapper#sendToDimension(IMessage, int)} - */ - public static final void sendToDimension(IMessage message, int dimensionId) { - INSTANCE.sendToDimension(message, dimensionId); - } - - /** - * Send this message to the server. - * See {@link SimpleNetworkWrapper#sendToServer(IMessage)} - */ - public static final void sendToServer(IMessage message) { - INSTANCE.sendToServer(message); - } -} diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java b/src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java deleted file mode 100644 index 360b0440a2..0000000000 --- a/src/Java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.handler.Recipes; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; - -public class DecayableRecipe { - - public static final AutoMap mRecipes = new AutoMap(); - - - public final int mTime; - public final ItemStack mInput; - public final ItemStack mOutput; - - public DecayableRecipe(int time, ItemStack input, ItemStack output) { - mTime = time; - mInput = input; - mOutput = output; - mRecipes.put(this); - } - - @Override - public boolean equals(Object o) { - if (o instanceof DecayableRecipe) { - DecayableRecipe i = (DecayableRecipe) o; - if (i.mTime == this.mTime && GT_Utility.areStacksEqual(mInput, i.mInput) && GT_Utility.areStacksEqual(mOutput, i.mOutput)) { - return true; - } - } - return false; - } - - public boolean isValid() { - return (mTime > 0 && ItemUtils.checkForInvalidItems(mInput) && ItemUtils.checkForInvalidItems(mOutput)); - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java b/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java deleted file mode 100644 index 5bf6374725..0000000000 --- a/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.handler.Recipes; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.recipe.ShapedRecipeObject; - -public class LateRegistrationHandler { - - public static int recipesSuccess = 0; - public static int recipesFailed = 0; - - public static void run(){ - init(); - } - - private final static void init(){ - for(final ShapedRecipeObject item : COMPAT_HANDLER.AddRecipeQueue){ - item.buildRecipe(); - } - try { - Thread.sleep(10); - } catch (final InterruptedException e) { - Logger.INFO(e.toString()); - } - Logger.INFO("Late Recipes Loaded: "+recipesSuccess+" Failed: "+recipesFailed); - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java b/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java deleted file mode 100644 index 4192e71091..0000000000 --- a/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.core.handler.Recipes; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.recipe.*; - -public class RegistrationHandler { - - public static int recipesSuccess = 0; - public static int recipesFailed = 0; - - public static void run(){ - init(); - } - - private final static void init(){ - RECIPES_Tools.loadRecipes(); - RECIPES_General.loadRecipes(); - RECIPES_Machines.loadRecipes(); - RECIPES_Shapeless.loadRecipes(); - RECIPES_MachineComponents.loadRecipes(); - RECIPE_Batteries.loadRecipes(); - Logger.INFO("Loaded: "+recipesSuccess+" Failed: "+recipesFailed); - COMPAT_HANDLER.areInitItemsLoaded = true; - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java b/src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java deleted file mode 100644 index 8499f98525..0000000000 --- a/src/Java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java +++ /dev/null @@ -1,49 +0,0 @@ -package gtPlusPlus.core.handler; - -import java.lang.reflect.Field; - -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.stats.AchievementList; -import net.minecraftforge.event.entity.player.AchievementEvent; - -public class StopAnnoyingFuckingAchievements { - - /** - * Stops me getting fireworks every fucking time I open my inventory upon first loading a dev client. - * @param event - */ - @SubscribeEvent(priority=EventPriority.HIGHEST) - public void FUCK_OFF(AchievementEvent event) { - if (Utils.isClient()) { - doClientStuff(); - } - if (event.achievement.equals(AchievementList.openInventory)) { - event.setCanceled(true); - } - } - - @SideOnly(Side.CLIENT) - private final void doClientStuff() { - Class aMC = ReflectionUtils.getClass("net.minecraft.client.Minecraft"); - if (aMC != null) { - Field aInstanceMC = ReflectionUtils.getField(aMC, "theMinecraft"); - Object aMcObj = ReflectionUtils.getFieldValue(null, aInstanceMC); - Class aClazz2 = aMcObj.getClass(); - if (aClazz2 != null) { - Field aGameSettings = ReflectionUtils.getField(aClazz2, "gameSettings"); - Object aGameSettingsObj = ReflectionUtils.getFieldValue(aInstanceMC, aGameSettings); - Class aClazz3 = aGameSettingsObj.getClass(); - if (aClazz3 != null) { - Field ainvHint = ReflectionUtils.getField(aClazz3, "showInventoryAchievementHint"); - ReflectionUtils.setField(aGameSettingsObj, ainvHint, false); - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java deleted file mode 100644 index 03bb99bb2a..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java +++ /dev/null @@ -1,229 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropDrainedShard; -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropFluoriteOre; - -import java.util.ArrayList; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.oredict.OreDictionary; - -public class BlockEventHandler { - public static ArrayList oreLimestone; - public static ArrayList blockLimestone; - public static ItemStack fluoriteOre; - - public static void init() { - //Set Variables for Fluorite Block handling - Logger.INFO("Setting some Variables for the block break event handler."); - BlockEventHandler.oreLimestone = OreDictionary.getOres("oreLimestone"); - BlockEventHandler.blockLimestone = OreDictionary.getOres("limestone"); - BlockEventHandler.fluoriteOre = FLUORIDES.FLUORITE.getOre(1); - } - - @SubscribeEvent - public void onBlockLeftClicked(final PlayerInteractEvent event) { - /* - * if (event.action != PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) return; - * - * ItemStack heldItem = event.entityPlayer.getHeldItem(); Block block = - * event.world.getBlock(event.x, event.y, event.z); - * - * // If the block clicked was Stone, the player was holding an Iron Pickaxe and - * a random integer from 0 (inclusive) to 2 (exclusive) is 0 (50% chance) if - * (block == Blocks.stone && heldItem != null && heldItem.getItem() == - * Items.iron_pickaxe && random.nextInt(2) == 0) { ForgeDirection direction = - * ForgeDirection.getOrientation(event.face); // Convert the numeric face to a - * ForgeDirection int fireX = event.x + direction.offsetX, fireY = event.y + - * direction.offsetY, fireZ = event.z + direction.offsetZ; // Offset the block's - * coordinates according to the direction - * - * if (event.world.isAirBlock(fireX, fireY, fireZ)) { // If the block at the new - * coordinates is Air event.world.setBlock(fireX, fireY, fireZ, Blocks.fire); // - * Replace it with Fire event.useBlock = Event.Result.DENY; // Prevent the Fire - * from being extinguished (also prevents Block#onBlockClicked from being - * called) } } - */ - } - - @SubscribeEvent - public void onEntityDrop(final LivingDropsEvent event) { - /* - * if (event.entityLiving instanceof EntityPig && event.source instanceof - * EntityDamageSource) { // getEntity will return the Entity that caused the - * damage,even for indirect damage sources like arrows/fireballs // (where it - * will return the Entity that shot the projectile rather than the projectile - * itself) Entity sourceEntity = event.source.getEntity(); ItemStack heldItem = - * sourceEntity instanceof EntityLiving ? ((EntityLiving) - * sourceEntity).getHeldItem() : sourceEntity instanceof EntityPlayer ? - * ((EntityPlayer) sourceEntity).getHeldItem() : null; - * - * if (heldItem != null && heldItem.getItem() == Items.iron_pickaxe) { - * System.out.println("EntityPig drops event"); event.drops.clear(); - * event.entityLiving.dropItem(Items.diamond, 64); } } - */ - } - - @SubscribeEvent - public void onBlockBreak(final BlockEvent.BreakEvent event) { - - } - - - // Used to handle Thaumcraft Shards when TC is not installed. - @SubscribeEvent - public void harvestDrops(final BlockEvent.HarvestDropsEvent event) { - try { - - if (event != null && event.harvester != null && event.harvester.worldObj != null) { - if (!event.harvester.worldObj.isRemote) { - - EntityPlayer p = event.harvester; - - if (PlayerUtils.isRealPlayer(p)) { - // Spawns Fluorite from Lime Stone - if (chanceToDropFluoriteOre != 0) { - if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()) { - - ArrayList mBlockTypes = new ArrayList(); - if (!oreLimestone.isEmpty()) { - for (int i = 0; i < oreLimestone.size(); i++) { - if (ItemUtils.getModId(oreLimestone.get(i)) != null - && !ItemUtils.getModId(oreLimestone.get(i)).toLowerCase() - .contains("biomesoplenty")) { - if (!mBlockTypes - .contains(Block.getBlockFromItem(oreLimestone.get(i).getItem()))) { - mBlockTypes.add(Block.getBlockFromItem(oreLimestone.get(i).getItem())); - } - } - } - } - if (!blockLimestone.isEmpty()) { - for (int i = 0; i < blockLimestone.size(); i++) { - if (ItemUtils.getModId(blockLimestone.get(i)) != null - && !ItemUtils.getModId(blockLimestone.get(i)).toLowerCase() - .contains("biomesoplenty")) { - if (!mBlockTypes.contains( - Block.getBlockFromItem(blockLimestone.get(i).getItem()))) { - mBlockTypes - .add(Block.getBlockFromItem(blockLimestone.get(i).getItem())); - } - } - } - } - - Logger.WARNING("Found Limestone in OreDict."); - if (!mBlockTypes.isEmpty()) { - Logger.WARNING("1a | " + event.block.getUnlocalizedName()); - for (final Block temp : mBlockTypes) { - Logger.WARNING("2a - " + temp.getUnlocalizedName()); - if (event.block == temp) { - Logger.WARNING("3a - found " + temp.getUnlocalizedName()); - if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1) { - Logger.WARNING("4a"); - event.drops.clear(); - event.drops.add(fluoriteOre.copy()); - } - } - } - } - } - - if (event.block.getUnlocalizedName().toLowerCase().contains("limestone")) { - Logger.WARNING("1c"); - if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1) { - Logger.WARNING("2c"); - event.drops.clear(); - event.drops.add(fluoriteOre.copy()); - } - } - - if (event.block == Blocks.sandstone) { - if (MathUtils.randInt(1, chanceToDropFluoriteOre * 20) == 1) { - event.drops.clear(); - event.drops.add(fluoriteOre.copy()); - } - } - } - } - - // Do things that can occur for fake players and real players - - // Spawn Dull Shards (Can spawn from Tree Logs, Grass or Stone. Stone going to - // be the most common source.) - if (((event.block == Blocks.stone) || (event.block == Blocks.sandstone) - || (event.block == Blocks.log) || (event.block == Blocks.log2) - || (event.block == Blocks.grass)) && !LoadedMods.Thaumcraft - && (chanceToDropDrainedShard != 0)) { - // small chance for one to spawn per stone mined. 1 per 3 stacks~ - if (MathUtils.randInt(1, chanceToDropDrainedShard) == 1) { - // Let's sort out a lucky charm for the player. - final int FancyChance = MathUtils.randInt(1, 4); - if (MathUtils.randInt(1, 100) < 90) { - event.drops.add(new ItemStack(ModItems.shardDull)); - } - // Make a Fire Shard - else if (FancyChance == 1) { - event.drops.add(new ItemStack(ModItems.shardIgnis)); - } - // Make a Water Shard. - else if (FancyChance == 2) { - event.drops.add(new ItemStack(ModItems.shardAqua)); - } - // Make an Earth Shard. - else if (FancyChance == 3) { - event.drops.add(new ItemStack(ModItems.shardTerra)); - } - // Make an Air Shard. - else if (FancyChance == 4) { - event.drops.add(new ItemStack(ModItems.shardAer)); - } - } else { - Logger.WARNING("invalid chance"); - } - } - - } - } - } catch (Throwable r) { - Logger.INFO("Block Event Handler Failed. Please Report this to Alkalus."); - r.printStackTrace(); - } - } - - @SubscribeEvent - public void logsHarvest(final BlockEvent.HarvestDropsEvent event) { - /* - * if (event.block instanceof BlockLog) { // - * http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/ - * modification-development/2444501-harvestdropevent-changing-drops-of-vanilla- - * blocks - * - * // Utils.sendServerMessage("Logs! Harvester: %s Drops: %s", event.harvester - * != null ? event.harvester.getCommandSenderName() : "", - * event.drops.stream().map(ItemStack.toString()).collect(Collectors. - * joining(", "))); if (event.harvester != null) { ItemStack heldItem = - * event.harvester.getHeldItem(); if (heldItem == null || - * heldItem.getItem().getHarvestLevel(heldItem, "axe") < 1) { - * event.drops.clear(); - * Utils.sendServerMessage("Harvester had wrong tool, clearing drops"); } else { - * Utils.sendServerMessage("Harvester had correct tool, not clearing drops"); } - * } else { event.drops.clear(); - * Utils.sendServerMessage("No harvester, clearing drops"); } } - */ - } -} diff --git a/src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java b/src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java deleted file mode 100644 index b70e58d009..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/CustomMovementHandler.java +++ /dev/null @@ -1,163 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.util.MovementInputFromOptions; - -/* - * Replacement for MovementInputFromOptions - Built from the source of ToggleSneak 3.0.3 - */ - -public class CustomMovementHandler { - - public boolean isDisabled; - public boolean canDoubleTap; - - public boolean sprint = false; - public boolean sprintHeldAndReleased = false; - public boolean sprintDoubleTapped = false; - - private long lastPressed; - private long lastSprintPressed; - private boolean handledSneakPress; - private boolean handledSprintPress; - private boolean wasRiding; - - /* - * MovementInputFromOptions.updatePlayerMoveState() - */ - public void update(final Minecraft mc, final MovementInputFromOptions options, final EntityPlayerSP thisPlayer) - { - options.moveStrafe = 0.0F; - options.moveForward = 0.0F; - - final GameSettings settings = mc.gameSettings; - - if(settings.keyBindForward.getIsKeyPressed()) - { - ++options.moveForward; - } - - if(settings.keyBindBack.getIsKeyPressed()) - { - --options.moveForward; - } - - if(settings.keyBindLeft.getIsKeyPressed()) - { - ++options.moveStrafe; - } - - if(settings.keyBindRight.getIsKeyPressed()) - { - --options.moveStrafe; - } - - options.jump = settings.keyBindJump.getIsKeyPressed(); - - // - // Sneak Toggle - Essentially the same as old ToggleSneak - // - - // Check to see if Enabled - Added 6/17/14 to provide option to disable Sneak Toggle - final boolean isSneaking = SneakManager.get(thisPlayer).Sneaking(); - //Utils.LOG_INFO("Can sneak: "+isSneaking); - //Utils.LOG_INFO("Can sprint: "+SneakManager.Sprinting()); - if (isSneaking) - { - // Key Pressed - if (settings.keyBindSneak.getIsKeyPressed() && !this.handledSneakPress) - { - // Descend if we are flying, note if we were riding (so we can unsneak once dismounted) - if(thisPlayer.isRiding() || thisPlayer.capabilities.isFlying) - { - options.sneak = true; - this.wasRiding = thisPlayer.isRiding(); - } - else - { - options.sneak = !options.sneak; - } - - this.lastPressed = System.currentTimeMillis(); - this.handledSneakPress = true; - } - - // Key Released - if (!settings.keyBindSneak.getIsKeyPressed() && this.handledSneakPress) - { - // If we are flying or riding, stop sneaking after descent/dismount. - if(thisPlayer.capabilities.isFlying || this.wasRiding) - { - options.sneak = false; - this.wasRiding = false; - } - // If the key was held down for more than 300ms, stop sneaking upon release. - else if((System.currentTimeMillis() - this.lastPressed) > 300L) - { - options.sneak = false; - } - - this.handledSneakPress = false; - } - } - else - { - options.sneak = settings.keyBindSneak.getIsKeyPressed(); - } - - if(options.sneak || SneakManager.get(thisPlayer).Sneaking()) - { - options.moveStrafe = (float)(options.moveStrafe * 0.3D); - options.moveForward = (float)(options.moveForward * 0.3D); - } - - // - // Sprint Toggle - Updated 6/18/2014 - // - - // Establish conditions where we don't want to start a sprint - sneaking, riding, flying, hungry - final boolean enoughHunger = (thisPlayer.getFoodStats().getFoodLevel() > 6.0F) || thisPlayer.capabilities.isFlying; - final boolean canSprint = !options.sneak && !thisPlayer.isRiding() && !thisPlayer.capabilities.isFlying && enoughHunger; - - this.isDisabled = !SneakManager.get(thisPlayer).Sprinting(); - this.canDoubleTap = SneakManager.get(thisPlayer).optionDoubleTap; - - // Key Pressed - if((canSprint || this.isDisabled) && settings.keyBindSprint.getIsKeyPressed() && !this.handledSprintPress) - { - if(!this.isDisabled) - { - this.sprint = !this.sprint; - this.lastSprintPressed = System.currentTimeMillis(); - this.handledSprintPress = true; - this.sprintHeldAndReleased = false; - } - } - - // Key Released - if((canSprint || this.isDisabled) && !settings.keyBindSprint.getIsKeyPressed() && this.handledSprintPress) - { - // Was key held for longer than 300ms? If so, mark it so we can resume vanilla behavior - if((System.currentTimeMillis() - this.lastSprintPressed) > 300L) - { - this.sprintHeldAndReleased = true; - } - this.handledSprintPress = false; - } - - } - - public void UpdateSprint(final boolean newValue, final boolean doubleTapped, SneakManager aSneak){ - if (!aSneak.Sprinting()){ - this.sprint = false; - this.sprintDoubleTapped = doubleTapped; - } - else{ - this.sprint = newValue; - this.sprintDoubleTapped = doubleTapped; - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java b/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java deleted file mode 100644 index 884f14386d..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.boss.EntityDragon; -import net.minecraftforge.event.entity.living.LivingDropsEvent; - -public class EnderDragonDeathHandler { - - private static final String mDragonClassName = "chylex.hee.entity.boss.EntityBossDragon"; - private static final boolean mHEE; - private static final Class mHardcoreDragonClass; - - static { - mHEE = ReflectionUtils.doesClassExist(mDragonClassName); - mHardcoreDragonClass = (mHEE ? ReflectionUtils.getClass(mDragonClassName) : null); - } - - @SubscribeEvent - public void onEntityDrop(LivingDropsEvent event) { - - boolean aDidDrop = false; - int aCountTotal = 0; - - //HEE Dragon - if (mHEE) { - if (mHardcoreDragonClass != null) { - if (mHardcoreDragonClass.isInstance(event.entityLiving)) { - for (int y = 0; y < MathUtils.randInt(100, 250); y++) { - int aAmount = MathUtils.randInt(5, 25); - event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1)); - aDidDrop = true; - aCountTotal =+ aAmount; - } - } - } - } - //Vanilla Dragon or any other dragon that extends it - else { - if (event.entityLiving instanceof EntityDragon) { - for (int y = 0; y < MathUtils.randInt(25, 50); y++) { - int aAmount = MathUtils.randInt(1, 10); - event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1)); - aDidDrop = true; - aCountTotal =+ aAmount; - } - } - } - - if (aDidDrop) { - PlayerUtils.messageAllPlayers(aCountTotal+" Shards of Dragons Blood have crystalized into a metallic form."); - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java b/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java deleted file mode 100644 index 391672e028..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java +++ /dev/null @@ -1,124 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import java.util.HashMap; -import java.util.HashSet; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Triplet; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.event.entity.living.LivingDropsEvent; - -public class EntityDeathHandler { - - - private static final HashMap>> mMobDropMap = new HashMap>>(); - private static final HashSet mInternalClassKeyCache = new HashSet(); - - /** - * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. - * @param aMobClass - The Base Class you want to drop this item. - * @param aStack - The ItemStack, stack size is not respected. - * @param aMaxAmount - The maximum size of the ItemStack which drops. - * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok) - */ - public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) { - Triplet aData = new Triplet(aStack, aMaxAmount, aChance); - AutoMap> aDataMap = mMobDropMap.get(aMobClass); - if (aDataMap == null) { - aDataMap = new AutoMap>(); - } - aDataMap.put(aData); - mMobDropMap.put(aMobClass, aDataMap); - - Logger.INFO("[Loot] Registered "+aStack.getDisplayName()+" (1-"+aMaxAmount+") as a valid drop for "+aMobClass.getCanonicalName()); - - if (!mInternalClassKeyCache.contains(aMobClass)) { - mInternalClassKeyCache.add(aMobClass); - } - - } - - private static ItemStack processItemDropTriplet(Triplet aData) { - ItemStack aLoot = aData.getValue_1(); - int aMaxDrop = aData.getValue_2(); - int aChanceOutOf10000 = aData.getValue_3(); - if (MathUtils.randInt(0, 10000) <= aChanceOutOf10000) { - aLoot = ItemUtils.getSimpleStack(aLoot, MathUtils.randInt(1, aMaxDrop)); - if (ItemUtils.checkForInvalidItems(aLoot)) { - return aLoot; - } - } - return null; - } - - private static boolean processDropsForMob(EntityLivingBase entityLiving) { - AutoMap> aMobData = mMobDropMap.get(entityLiving.getClass()); - boolean aDidDrop = false; - if (aMobData != null) { - if (!aMobData.isEmpty()) { - ItemStack aPossibleDrop; - for (Triplet g : aMobData) { - aPossibleDrop = processItemDropTriplet(g); - if (aPossibleDrop != null) { - if (entityLiving.entityDropItem(aPossibleDrop, MathUtils.randFloat(0, 1)) != null) { - aDidDrop = true; - } - } - } - } - } - return aDidDrop; - } - - - - private static void dropMeatFromPlayer(EntityPlayer aPlayer) { - - // always drop some meat. - int aBigMeatStackSize1 = MathUtils.randInt(4, 8); - aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize1), MathUtils.randInt(0, 1)); - - // additional chances for more meat. - if (MathUtils.randInt(0, 10) < 7) { - int aBigMeatStackSize2 = MathUtils.randInt(4, 8); - aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize2), MathUtils.randInt(0, 1)); - } - if (MathUtils.randInt(0, 10) < 4) { - int aBigMeatStackSize3 = MathUtils.randInt(4, 8); - aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize3), MathUtils.randInt(0, 1)); - } - if (MathUtils.randInt(0, 10) < 2) { - int aBigMeatStackSize4 = MathUtils.randInt(4, 8); - aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize4), MathUtils.randInt(0, 1)); - } - - } - - @SubscribeEvent - public void onEntityDrop(LivingDropsEvent event) { - boolean aDidDrop = false; - if (event == null || event.entityLiving == null) { - return; - } - if (PlayerUtils.isRealPlayer(event.entityLiving)) { - EntityPlayer aPlayer = (EntityPlayer) event.entityLiving; - dropMeatFromPlayer(aPlayer); - } - else { - for (Class c : mInternalClassKeyCache) { - if (c.isInstance(event.entityLiving)) { - aDidDrop = processDropsForMob(event.entityLiving); - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java deleted file mode 100644 index fda7760607..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java +++ /dev/null @@ -1,107 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.enums.ItemList; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.GTplusplus.INIT_PHASE; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -public class GeneralTooltipEventHandler { - - ItemStack[] mGregtechTurbines = new ItemStack[6]; - String mTurbine; - String mExtra; - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event){ - - - if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED && GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.SERVER_START) { - return; - } - if (event.itemStack == null) { - return; - } - if (CORE.ConfigSwitches.chanceToDropFluoriteOre > 0) { - if (BlockEventHandler.blockLimestone != null && !BlockEventHandler.blockLimestone.isEmpty()) { - for (ItemStack h : BlockEventHandler.blockLimestone) { - if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) { - if (ItemUtils.getModId(h) != null && !ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) { - event.toolTip.add("May contain Fluorite Ore"); - } - } - } - } - if (BlockEventHandler.oreLimestone != null && !BlockEventHandler.oreLimestone.isEmpty()) { - for (ItemStack h : BlockEventHandler.oreLimestone) { - if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) { - if (ItemUtils.getModId(h) != null && !ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) { - event.toolTip.add("May contain Fluorite Ore"); - } - } - } - } - } - - //Material Collector Tooltips - if (ModBlocks.blockPooCollector != null && Block.getBlockFromItem(event.itemStack.getItem()) == ModBlocks.blockPooCollector) { - //Normal - if (event.itemStack.getItemDamage() == 0) { - event.toolTip.add("Used to collect animal waste"); - event.toolTip.add("Collects in a 5x4x5 area starting at Y+1"); - event.toolTip.add("Use Hoppers/Pipes to empty"); - event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"8000L"); - } - //Advanced - else { - event.toolTip.add("Used to collect waste (Works on more than animals)"); - event.toolTip.add("Significantly faster than the simple version"); - event.toolTip.add("Collects in a 5x4x5 area starting at Y+1"); - event.toolTip.add("Use Hoppers/Pipes to empty"); - event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"128000L"); - } - } - - - - if (CORE.ConfigSwitches.enableAnimatedTurbines) { - boolean shift = false; - try { - - if (KeyboardUtils.isShiftKeyDown()) { - shift = true; - mTurbine = "Animated Turbines can be disabled in the GT++ config"; - } - else { - mTurbine = EnumChatFormatting.ITALIC+""+EnumChatFormatting.RESET; - } - for (int t=0;t<6;t++) { - if (mGregtechTurbines[t] != null) { - if (ItemStack.areItemStacksEqual(event.itemStack, mGregtechTurbines[t])){ - event.toolTip.add(mTurbine); - if (shift) { - if (mExtra == null) { - mExtra = CORE.GT_Tooltip; - } - event.toolTip.add(mExtra); - } - } - } - else { - mGregtechTurbines[t] = (t == 0 ? ItemList.Generator_Steam_Turbine_LV.get(1) : (t == 1 ? ItemList.Generator_Steam_Turbine_MV.get(1) : (t == 2 ? ItemList.Generator_Steam_Turbine_HV.get(1) : (t == 3 ? ItemList.Generator_Gas_Turbine_LV.get(1) : (t == 4 ? ItemList.Generator_Gas_Turbine_MV.get(1) : (ItemList.Generator_Gas_Turbine_HV.get(1))))))); - } - } - } - catch (Throwable t) {} - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java deleted file mode 100644 index 1a8d87882e..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java +++ /dev/null @@ -1,128 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import java.util.Timer; -import java.util.TimerTask; -import java.util.UUID; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.proxy.ClientProxy; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.player.PlayerCache; - -public class LoginEventHandler { - - public String localPlayersName; - public UUID localPlayersUUID; - private EntityPlayer localPlayerRef; - - @SubscribeEvent - public void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent event) { - - this.localPlayerRef = event.player; - this.localPlayersName = event.player.getDisplayName(); - this.localPlayersUUID = event.player.getUniqueID(); - - //Set this for easier use elsewhere. - if (event.player.getEntityWorld().isRemote){ - ClientProxy.playerName = this.localPlayersName; - } - - try { - //new SegmentAnalytics(event.player); - } - catch (Throwable t){ - //SegmentAnalytics.LOG("Failed to create Analytics submission during log in process."); - } - - try { - - - if (this.localPlayerRef instanceof EntityPlayerMP){ - - //Populates player cache - if (!this.localPlayerRef.worldObj.isRemote){ - PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString()); - } - - - /*if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009") || localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){ - Utils.LOG_INFO("Spawning a new Santa Thread."); - Thread t = new Thread() { - UUID threadHandlerIDthing = localPlayersUUID; - @Override - public void run() { - while(true && Minecraft.getMinecraft().getIntegratedServer() != null) { - try { - if(localPlayerRef == null){ - localPlayerRef = Utils.getPlayerOnServerFromUUID(threadHandlerIDthing); - } - - - //ImQ009 is a legend. - if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009")){ - Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread."); - localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems.itemIngotRaisinBread, MathUtils.randInt(1, 5))); - } - - - if (localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){ - Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread."); - localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems.itemIngotRaisinBread, MathUtils.randInt(1, 5))); - } - Thread.sleep(1000*60*MathUtils.randInt(15, 90)); - } catch (InterruptedException ie) { - Utils.LOG_INFO("Santa Mode Disabled."); - } - } - - Utils.LOG_INFO("Thread Stopped. Handler Closed."); - - } - }; - //t.start(); - - - }*/ - - - } - } catch (final Throwable errr){ - Logger.INFO("Login Handler encountered an error."); - - } - } - - //Handles notifying the player about a version update. - public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) { - Timer timer; - timer = new Timer(); - timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000); - return timer; - } - - //Timer Task for notifying the player. - class NotifyPlayer extends TimerTask { - final EntityPlayer toMessage; - public NotifyPlayer(EntityPlayer localPlayer) { - toMessage = localPlayer; - } - - @Override - public void run() { - if (toMessage != null){ - if (toMessage instanceof EntityPlayerMP){ - PlayerUtils.messagePlayer(toMessage, "You're not using the latest recommended version of GT++, consider updating."); - } - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java b/src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java deleted file mode 100644 index 31600a36c3..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import static gtPlusPlus.core.item.base.dusts.BaseItemDustEx.mCachedPileLinkages; - -import org.apache.commons.lang3.StringUtils; - -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.event.FMLMissingMappingsEvent; -import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - -public class MissingMappingsEvent { - - @EventHandler - public void onMissingMapping(FMLMissingMappingsEvent event){ - for(MissingMapping mapping : event.get()) { - boolean bool1 = mapping.name.contains(CORE.MODID); - //Missing Blocks - if(mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.BLOCK && bool1) { - - //Example - //if(mapping.name.equals("PneumaticCraft:etchingAcid")) { - // mapping.remap(Fluids.etchingAcid.getBlock()); - //} - - - } - - //Missing Items - if(mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.ITEM && bool1) { - - //Example - //if(mapping.name.equals("PneumaticCraft:etchingAcidBucket")) { - // mapping.remap(Fluids.getBucket(Fluids.etchingAcid)); - //} - - if(mapping.name.contains("miscutils:itemDustTiny")) { - ItemStack stack = null; - String missingItemString = StringUtils.remove(mapping.name, "miscutils:itemDustTiny"); - missingItemString = StringUtils.prependIfMissing(missingItemString, "item.itemDust"); - if (mCachedPileLinkages.containsKey(missingItemString)) { - //stack = ItemUtils.getSimpleStack(Item.itemRegistry.) - Logger.REFLECTION("Mapping Event Found Missing Item in the Pile Linkage Cache."); - } - - //mapping.remap(stack.getItem()); - } - - } - } - } -} diff --git a/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java deleted file mode 100644 index 956d045b3e..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import java.util.List; -import java.util.UUID; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkPosition; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.event.world.BlockEvent.BreakEvent; -import net.minecraftforge.event.world.ExplosionEvent; - -public class PickaxeBlockBreakEventHandler { - @SubscribeEvent - public void onBreakBlock(final BreakEvent event) { - try{ - final TileEntity entity = event.world.getTileEntity(event.x, event.y, event.z); - if (entity != null){ - if (entity instanceof BaseMetaTileEntity) { - final EntityPlayer playerInternal = event.getPlayer(); - final IMetaTileEntity X = ((BaseMetaTileEntity)entity).getMetaTileEntity(); - if(X instanceof GregtechMetaSafeBlockBase) { - final UUID ownerUUID = ((GregtechMetaSafeBlockBase)X).ownerUUID; - final UUID accessorUUID = playerInternal.getUniqueID(); - if (((GregtechMetaSafeBlockBase)X).bUnbreakable){ - if (accessorUUID == ownerUUID){ - PlayerUtils.messagePlayer(playerInternal, "Since you own this block, it has been destroyed."); - } - else { - PlayerUtils.messagePlayer(playerInternal, "Since you do not own this block, it has not been destroyed."); - event.setCanceled(true); - } - } - } - } - - } - } - catch (final NullPointerException e) { - //System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: "+e.getCause()); - } - } - - @SubscribeEvent - public void onExplode(ExplosionEvent.Detonate event) { - try { - @SuppressWarnings("unchecked") - List pos = event.explosion.affectedBlockPositions; - for(int i = 0;i mPlayerCache = new ConcurrentHashMap(); - - private static void addPlayer(EntityPlayer aPlayer) { - String aKey = getKey(aPlayer); - if (!mPlayerCache.containsKey(aKey)) { - mPlayerCache.put(aKey, new SneakManager(aPlayer)); - } - } - - public static SneakManager get(EntityPlayer aPlayer) { - - String aKey = getKey(aPlayer); - if (!mPlayerCache.containsKey(aKey)) { - addPlayer(aPlayer); - } - return mPlayerCache.get(aKey); - } - - private static String getKey(EntityPlayer aPlayer) { - return ""+aPlayer.getGameProfile().getId().toString(); - } - - - public SneakManager instance; - public EntityPlayer owner; - public boolean canSprint = true; - public boolean isSneaking = true; - public boolean optionDoubleTap = true; - public boolean wasSprintDisabled = false; - public boolean mIsWearingRing = false; - - private State Sprinting = State.ON; - private State Crouching = State.OFF; - - public SneakManager(EntityPlayer aPlayer) { - owner = aPlayer; - } - - public boolean Sneaking(){ - return Crouching.getState(); - } - - public boolean Sprinting(){ - return Sprinting.getState(); - } - - public State getSneakingState(){ - return Crouching; - } - - public State getSprintingDisabledState(){ - return Sprinting; - } - - public void toggleSneaking(){ - toggleState(Crouching); - } - - public void toggleSprinting(){ - toggleState(Sprinting); - } - - private State toggleState(final State state){ - Logger.INFO("State Toggle"); - if (state == State.ON) { - return State.OFF; - } - return State.ON; - } - - private State setCrouchingStateON(){ - return Crouching = State.ON; - } - - private State setCrouchingStateOFF(){ - return Crouching = State.OFF; - } - - private State setSprintingStateON(){ - return Sprinting = State.ON; - } - - private State setSprintingStateOFF(){ - return Sprinting = State.OFF; - } - - public void putRingOn() { - mIsWearingRing = true; - setSprintingStateOFF(); - setCrouchingStateON(); - } - - public void takeRingOff() { - mIsWearingRing = false; - setSprintingStateON(); - setCrouchingStateOFF(); - } - - public boolean isWearingRing() { - return mIsWearingRing; - } - - public static enum State { - ON(true), - OFF(false); - - private final boolean STATE; - private State (final boolean State) - { - this.STATE = State; - } - - public boolean getState() { - return this.STATE; - } - - } - -} - diff --git a/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java b/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java deleted file mode 100644 index b653c6ffb6..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java +++ /dev/null @@ -1,138 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.BaseTileEntity; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock; - -public class UnbreakableBlockManager{ - - private static boolean hasRun = false; - - public final BaseMetaTileEntity getmTileEntity() { - return mTileEntity; - } - - - public final void setmTileEntity(final BaseMetaTileEntity mTileEntity/*, EntityPlayer aPlayer*/) { - UnbreakableBlockManager.mTileEntity = mTileEntity; - if (!hasRun){ - hasRun = true; - this.makeIndestructible(/*aPlayer*/); - } - else { - Logger.WARNING("Why do you run twice?"); - } - } - - - //BaseMetaTileEntity - //GregtechMetaSafeBlock - private static BaseMetaTileEntity mTileEntity = null; - - - private void makeIndestructible(/*EntityPlayer aPlayer*/){ - - - Logger.WARNING("Initializing the code to set this TE to -1 hardness and make it indestructible."); - final int X = mTileEntity.xCoord; //(GregtechMetaSafeBlock) this.mTileEntity.getXCoord(); - final int Y = mTileEntity.yCoord; - final int Z = mTileEntity.zCoord; - Logger.WARNING("Grabbing TileEntity @ [x,y,z] |"+X+"|"+Y+"|"+Z+"|"); - - try{ - final GregtechMetaSafeBlock MetaSafeBlock = ((GregtechMetaSafeBlock) UnbreakableBlockManager.mTileEntity.getMetaTileEntity()); - final TileEntity BaseMetaTileEntity = mTileEntity.getTileEntity(X, Y, Z); - //MetaSafeBlockBase. - final World TE_WORLD = MetaSafeBlock.getBaseMetaTileEntity().getWorld(); - Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - final TileEntity entity = BaseMetaTileEntity; - innerInvincible(MetaSafeBlock, entity, TE_WORLD, /*aPlayer,*/ X, Y, Z); - } - catch (final NullPointerException e) { - System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: "); - e.printStackTrace(); - } - } - - - private static void innerInvincible(final GregtechMetaSafeBlock MetaSafeBlock, final TileEntity entity, final World TE_WORLD, /*EntityPlayer aPlayer,*/ final int X, final int Y, final int Z){ - if (entity != null){ - Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - Logger.WARNING("Grabbed TE: "+entity.toString()); - - - - - if ((entity instanceof BaseTileEntity) && !(entity instanceof BaseMetaPipeEntity)){ - final IMetaTileEntity I = ((BaseMetaTileEntity)entity).getMetaTileEntity(); - Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - Logger.WARNING("I Details: "+I.getMetaName()+" | "+I.getTileEntityBaseType()+" | "+I.toString()); - - - - - - if (I instanceof GregtechMetaSafeBlock){ - Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - - final Block ThisBlock = I.getBaseMetaTileEntity().getBlock(X, Y, Z); - Logger.WARNING("Block Details: "+ThisBlock.toString()); - - - if (((GregtechMetaSafeBlock)I).bUnbreakable){ - ThisBlock.setHardness(Integer.MAX_VALUE); - //ThisBlock.setResistance(18000000.0F); - ThisBlock.setResistance(-1); - ThisBlock.setBlockUnbreakable(); - Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=true"); - MetaSafeBlock.bUnbreakable = true; - //entity.markDirty(); - Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - Logger.ERROR("New Indestructible Flag enabled."); - //GT_Utility.sendChatToPlayer(aPlayer, "Block is now unbreakable."); - } - - - - - else { - ThisBlock.setHardness(1); - ThisBlock.setResistance(1.0F); - Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=false"); - MetaSafeBlock.bUnbreakable = false; - //entity.markDirty(); - Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - Logger.ERROR("New Indestructible Flag disabled."); - //GT_Utility.sendChatToPlayer(aPlayer, "Block is now breakable."); - } - - //entity.markDirty(); - - Logger.WARNING("Block Hardness: "+ThisBlock.getBlockHardness(TE_WORLD, X, Y, Z)); - Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - hasRun = false; - - } - else { - Logger.WARNING("I is not an instanceof MetaSafeBlockBase"); - Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - } - } else { - Logger.WARNING("TE is not an instanceof BaseTileEntity or may be a pipe."); - Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - } - }else { - Logger.WARNING("Did not grab a TE instance to make a block instance from."); - Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java deleted file mode 100644 index 68df68aa2a..0000000000 --- a/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.core.handler.events; - -import java.lang.reflect.Field; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -import gtPlusPlus.api.objects.Logger; -import net.minecraftforge.event.entity.living.ZombieEvent; - -public class ZombieBackupSpawnEventHandler { - - /** - * - * Do we really need this pathetic mechanic to exist when it doesn't work properly at all? - * Or , well, maybe you enjoy Zombies spawning IN YOUR FUCKING FACE?! - * - */ - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onZombieReinforcement(final ZombieEvent.SummonAidEvent event) { - try { - try { - Field mChance = FieldUtils.getDeclaredField(this.getClass(), "summonChance", true); - FieldUtils.removeFinalModifier(mChance, true); - mChance.set(this, 0); - } - catch(Throwable t){} - if (event.attacker != null){ - //SegmentHelper.getInstance().trackUser(event.attacker.getUniqueID().toString(), "Zombie Backup"); - } - Logger.WARNING("[Zombie] ZombieEvent.SummonAidEvent."); - event.setResult(Result.DENY); - } - catch(Throwable t){} - } - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onZombieReinforcement(final ZombieEvent event) { - try { - Logger.WARNING("[Zombie] ZombieEvent."); - if (event.entity != null){ - Logger.WARNING("Event Entity: "+event.entity.getCommandSenderName()); - } - event.setResult(Result.DENY); - } - catch(Throwable t){ - - } - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/render/CapeHandler.java b/src/Java/gtPlusPlus/core/handler/render/CapeHandler.java deleted file mode 100644 index 491d9a2aba..0000000000 --- a/src/Java/gtPlusPlus/core/handler/render/CapeHandler.java +++ /dev/null @@ -1,122 +0,0 @@ -package gtPlusPlus.core.handler.render; - -import java.util.Collection; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.entity.AbstractClientPlayer; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.entity.RenderPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; -import net.minecraftforge.client.event.RenderPlayerEvent; - -public class CapeHandler extends RenderPlayer { - private final ResourceLocation[] mCapes = { - new ResourceLocation(CORE.MODID+":textures/TesterCape.png"), - new ResourceLocation(CORE.MODID+":textures/Draknyte1.png"), - new ResourceLocation("gregtech:textures/GregoriusCape.png") }; - private final Collection mCapeList; - - public CapeHandler(final Collection aCapeList) { - this.mCapeList = aCapeList; - this.setRenderManager(RenderManager.instance); - } - - public void receiveRenderSpecialsEvent(final RenderPlayerEvent.Specials.Pre aEvent) { - final AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer; - if (GT_Utility.getFullInvisibility(aPlayer)) { - aEvent.setCanceled(true); - return; - } - final float aPartialTicks = aEvent.partialRenderTick; - if (aPlayer.isInvisible()) { - return; - } - if (GT_Utility.getPotion(aPlayer, - Integer.valueOf(Potion.invisibility.id).intValue())) { - return; - } - try { - ResourceLocation tResource = null; - if (aPlayer.getDisplayName().equalsIgnoreCase("XW3B")) { - tResource = this.mCapes[0]; - } - if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) { - tResource = this.mCapes[0]; - } - if (aPlayer.getDisplayName().equalsIgnoreCase("Draknyte1")) { - tResource = this.mCapes[1]; - } - if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) { - tResource = this.mCapes[2]; - } - if ((tResource != null) && (!(aPlayer.getHideCape()))) { - this.bindTexture(tResource); - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0.0F, 0.125F); - final double d0 = (aPlayer.field_71091_bM - + ((aPlayer.field_71094_bP - aPlayer.field_71091_bM) - * aPartialTicks)) - - (aPlayer.prevPosX + ((aPlayer.posX - aPlayer.prevPosX) - * aPartialTicks)); - final double d1 = (aPlayer.field_71096_bN - + ((aPlayer.field_71095_bQ - aPlayer.field_71096_bN) - * aPartialTicks)) - - (aPlayer.prevPosY + ((aPlayer.posY - aPlayer.prevPosY) - * aPartialTicks)); - final double d2 = (aPlayer.field_71097_bO - + ((aPlayer.field_71085_bR - aPlayer.field_71097_bO) - * aPartialTicks)) - - (aPlayer.prevPosZ + ((aPlayer.posZ - aPlayer.prevPosZ) - * aPartialTicks)); - final float f6 = aPlayer.prevRenderYawOffset - + ((aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) - * aPartialTicks); - final double d3 = MathHelper.sin((f6 * CORE.PI) / 180.0F); - final double d4 = -MathHelper.cos((f6 * CORE.PI) / 180.0F); - float f7 = (float) d1 * 10.0F; - float f8 = (float) ((d0 * d3) + (d2 * d4)) * 100.0F; - final float f9 = (float) ((d0 * d4) - (d2 * d3)) * 100.0F; - if (f7 < -6.0F) { - f7 = -6.0F; - } - if (f7 > 32.0F) { - f7 = 32.0F; - } - if (f8 < 0.0F) { - f8 = 0.0F; - } - final float f10 = aPlayer.prevCameraYaw - + ((aPlayer.cameraYaw - aPlayer.prevCameraYaw) - * aPartialTicks); - f7 += MathHelper - .sin((aPlayer.prevDistanceWalkedModified + ((aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) - * aPartialTicks)) * 6.0F) - * 32.0F * f10; - if (aPlayer.isSneaking()) { - f7 += 25.0F; - } - GL11.glRotatef(6.0F + (f8 / 2.0F) + f7, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); - ((ModelBiped) this.mainModel).renderCloak(0.0625F); - GL11.glPopMatrix(); - } - } catch (final Throwable e) { - if (GT_Values.D1) { - e.printStackTrace(GT_Log.err); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/render/FirepitModel.java b/src/Java/gtPlusPlus/core/handler/render/FirepitModel.java deleted file mode 100644 index 029d961bff..0000000000 --- a/src/Java/gtPlusPlus/core/handler/render/FirepitModel.java +++ /dev/null @@ -1,121 +0,0 @@ -// Date: 20/12/2016 5:51:14 PM -// Template version 1.1 -// Java generated by Techne -// Keep in mind that you still need to fill in some blanks -// - ZeuX - -package gtPlusPlus.core.handler.render; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -import gtPlusPlus.core.lib.CORE; - -public class FirepitModel extends ModelBase -{ - //fields - ModelRenderer Side_A; - ModelRenderer Side_B; - ModelRenderer Side_C; - ModelRenderer Side_D; - ModelRenderer Log1; - ModelRenderer Log2; - ModelRenderer Log3; - ModelRenderer Log4; - - public FirepitModel() - { - this.textureWidth = 16; - this.textureHeight = 16; - - this.Side_A = new ModelRenderer(this, 0, 0); - this.Side_A.addBox(0F, 0F, 0F, 12, 6, 1); - this.Side_A.setRotationPoint(-6F, 18F, -6F); - this.Side_A.setTextureSize(16, 16); - this.Side_A.mirror = true; - setRotation(this.Side_A, -0.3148822F, 0F, 0F); - //Side_A.mirror = false; - - this.Side_B = new ModelRenderer(this, 0, 0); - this.Side_B.addBox(0F, 0F, 0F, 12, 6, 1); - this.Side_B.setRotationPoint(-6F, 18F, 6F); - this.Side_B.setTextureSize(16, 16); - this.Side_B.mirror = true; - setRotation(this.Side_B, -0.3148822F, (CORE.PI/2), 0F); - - this.Side_C = new ModelRenderer(this, 0, 0); - this.Side_C.addBox(0F, 0F, 0F, 12, 6, 1); - this.Side_C.setRotationPoint(6F, 18F, 6F); - this.Side_C.setTextureSize(16, 16); - this.Side_C.mirror = true; - setRotation(this.Side_C, -0.3148822F, CORE.PI, 0F); - //Side_C.mirror = false; - - this.Side_D = new ModelRenderer(this, 0, 0); - this.Side_D.addBox(0F, 0F, 0F, 12, 6, 1); - this.Side_D.setRotationPoint(6F, 18F, -6F); - this.Side_D.setTextureSize(16, 16); - this.Side_D.mirror = true; - setRotation(this.Side_D, -0.3148822F, 4.712389F, 0F); - - this.Log1 = new ModelRenderer(this, 0, 10); - this.Log1.addBox(0F, 0F, 0F, 14, 2, 2); - this.Log1.setRotationPoint(4F, 10F, -4F); - this.Log1.setTextureSize(16, 16); - this.Log1.mirror = true; - setRotation(this.Log1, 0F, 0F, (CORE.PI/2)); - - this.Log2 = new ModelRenderer(this, -2, 10); - this.Log2.addBox(0F, 0F, 0F, 14, 2, 2); - this.Log2.setRotationPoint(-4F, 10F, -4F); - this.Log2.setTextureSize(16, 16); - this.Log2.mirror = true; - setRotation(this.Log2, (CORE.PI/2), 0F, (CORE.PI/2)); - //Log2.mirror = false; - - this.Log3 = new ModelRenderer(this, 0, 10); - this.Log3.addBox(0F, 0F, 0F, 14, 2, 2); - this.Log3.setRotationPoint(-4F, 10F, 4F); - this.Log3.setTextureSize(16, 16); - this.Log3.mirror = true; - setRotation(this.Log3, CORE.PI, 0F, (CORE.PI/2)); - - this.Log4 = new ModelRenderer(this, -2, 10); - this.Log4.addBox(0F, 0F, 0F, 14, 2, 2); - this.Log4.setRotationPoint(4F, 10F, 4F); - this.Log4.setTextureSize(16, 16); - this.Log4.mirror = true; - setRotation(this.Log4, 4.712389F, 0F, (CORE.PI/2)); - //Log4.mirror = false; - } - - @Override - public void render(final Entity entity, final float f, final float f1, final float f2, final float f3, final float f4, final float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.Side_A.render(f5); - this.Side_B.render(f5); - this.Side_C.render(f5); - this.Side_D.render(f5); - this.Log1.render(f5); - this.Log2.render(f5); - this.Log3.render(f5); - this.Log4.render(f5); - } - - private static void setRotation(final ModelRenderer model, final float x, final float y, final float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void setRotationAngles(final float f, final float f1, final float f2, final float f3, final float f4, final float f5, final Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/src/Java/gtPlusPlus/core/handler/render/FirepitRender.java b/src/Java/gtPlusPlus/core/handler/render/FirepitRender.java deleted file mode 100644 index 7b8d23e25b..0000000000 --- a/src/Java/gtPlusPlus/core/handler/render/FirepitRender.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.core.handler.render; - -import org.lwjgl.opengl.GL11; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -public class FirepitRender extends TileEntitySpecialRenderer{ - ResourceLocation texture = new ResourceLocation("miscutils" + ":"+ "textures/blocks/FirePit/mossyFirepit.png"); - - private final FirepitModel model; - - public FirepitRender(){ - this.model = new FirepitModel(); - } - - private void adjustRotatePivotViaMeta(final World world, final int x, final int y, final int z) { - final int meta = world.getBlockMetadata(x, y, z); - GL11.glPushMatrix(); - GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F); - GL11.glPopMatrix(); - } - - @Override - public void renderTileEntityAt(final TileEntity entity, final double x, final double y, final double z, final float i) { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.1F, (float)y + 1.0F, (float)z + 0.5F); - GL11.glRotatef(180, 0F, 0F, 1F); - - this.bindTexture(this.texture); - GL11.glPushMatrix(); - this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); - GL11.glTranslatef(1.0f, 1.0f, 1.0f); - GL11.glPopMatrix(); - GL11.glPopMatrix(); - } - - //Set the lighting stuff, so it changes it's brightness properly. - private void adjustLightFixture(final World world, final int i, final int j, final int k, final Block block) { - final Tessellator tess = Tessellator.instance; - //float brightness = block.getBlockBrightness(world, i, j, k); - //As of MC 1.7+ block.getBlockBrightness() has become block.getLightValue(): - final float brightness = block.getLightValue(world, i, j, k); - final int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); - final int modulousModifier = skyLight % 65536; - final int divModifier = skyLight / 65536; - tess.setColorOpaque_F(brightness, brightness, brightness); - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, modulousModifier, divModifier); - } -} diff --git a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java b/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java deleted file mode 100644 index d6a73512e2..0000000000 --- a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java +++ /dev/null @@ -1,208 +0,0 @@ -package gtPlusPlus.core.handler.workbench; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraft.world.World; - -public class Workbench_CraftingHandler { - - private static final Workbench_CraftingHandler instance = new Workbench_CraftingHandler(); - private final List recipes = new ArrayList(); - - public static final Workbench_CraftingHandler getInstance() { - return instance; - } - public Workbench_CraftingHandler() { - - //just a example recipe so you know how to add them - this.addRecipe(new ItemStack(Blocks.iron_block), new Object[] - { - "###", - "###", - "###", - Character.valueOf('#'), Items.iron_ingot - }); - - //another example Recipe, but shapeless - this.addShapelessRecipe(new ItemStack(Items.cake),new Object[]{Items.stick}); - - - } - - void addRecipe(final ItemStack par1ItemStack, final Object par2ArrayOfObj[]) - { - String s = ""; - int i = 0; - int j = 0; - int k = 0; - - if (par2ArrayOfObj[i] instanceof String[]) - { - final String as[] = (String[])par2ArrayOfObj[i++]; - - for (int l = 0; l < as.length; l++) - { - final String s2 = as[l]; - k++; - j = s2.length(); - s = (new StringBuilder()).append(s).append(s2).toString(); - } - } - else - { - while (par2ArrayOfObj[i] instanceof String) - { - final String s1 = (String)par2ArrayOfObj[i++]; - k++; - j = s1.length(); - s = (new StringBuilder()).append(s).append(s1).toString(); - } - } - - final HashMap hashmap = new HashMap(); - - for (; i < par2ArrayOfObj.length; i += 2) - { - final Character character = (Character)par2ArrayOfObj[i]; - ItemStack itemstack = null; - - if (par2ArrayOfObj[i + 1] instanceof Item) - { - itemstack = new ItemStack((Item)par2ArrayOfObj[i + 1]); - } - else if (par2ArrayOfObj[i + 1] instanceof Block) - { - itemstack = new ItemStack((Block)par2ArrayOfObj[i + 1], 1, -1); - } - else if (par2ArrayOfObj[i + 1] instanceof ItemStack) - { - itemstack = (ItemStack)par2ArrayOfObj[i + 1]; - } - - hashmap.put(character, itemstack); - } - - final ItemStack aitemstack[] = new ItemStack[j * k]; - - for (int i1 = 0; i1 < (j * k); i1++) - { - final char c = s.charAt(i1); - - if (hashmap.containsKey(Character.valueOf(c))) - { - aitemstack[i1] = hashmap.get(Character.valueOf(c)).copy(); - } - else - { - aitemstack[i1] = null; - } - } - - this.recipes.add(new ShapedRecipes(j, k, aitemstack, par1ItemStack)); - } - - public void addShapelessRecipe(final ItemStack par1ItemStack, final Object par2ArrayOfObj[]) - { - final ArrayList arraylist = new ArrayList(); - final Object aobj[] = par2ArrayOfObj; - final int i = aobj.length; - - for (int j = 0; j < i; j++) - { - final Object obj = aobj[j]; - - if (obj instanceof ItemStack) - { - arraylist.add(((ItemStack)obj).copy()); - continue; - } - - if (obj instanceof Item) - { - arraylist.add(new ItemStack((Item)obj)); - continue; - } - - if (obj instanceof Block) - { - arraylist.add(new ItemStack((Block)obj)); - } - else - { - throw new RuntimeException("Invalid shapeless recipe!"); - } - } - - this.recipes.add(new ShapelessRecipes(par1ItemStack, arraylist)); - } - - public ItemStack findMatchingRecipe(final InventoryCrafting par1InventoryCrafting, final World par2World) - { - int i = 0; - for (int j = 0; j < par1InventoryCrafting.getSizeInventory(); j++) - { - final ItemStack itemstack2 = par1InventoryCrafting.getStackInSlot(j); - - if (itemstack2 == null) - { - continue; - } - - if (i == 0) - { - } - - if (i == 1) - { - } - - i++; - } - - //TODO - Update from itemIDs - /*if (i == 2 && itemstack.itemID == itemstack1.itemID && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && Item.itemsList[itemstack.itemID].isDamageable()) - { - Item item = Item.itemsList[itemstack.itemID]; - int l = item.getMaxDamage() - itemstack.getItemDamageForDisplay(); - int i1 = item.getMaxDamage() - itemstack1.getItemDamageForDisplay(); - int j1 = l + i1 + (item.getMaxDamage() * 10) / 100; - int k1 = item.getMaxDamage() - j1; - - if (k1 < 0) - { - k1 = 0; - } - - return new ItemStack(itemstack.itemID, 1, k1); - }*/ - - for (int k = 0; k < this.recipes.size(); k++) - { - final IRecipe irecipe = this.recipes.get(k); - - if (irecipe.matches(par1InventoryCrafting, par2World)) - { - return irecipe.getCraftingResult(par1InventoryCrafting); - } - } - - return null; - } - - - public List getRecipeList() - { - return this.recipes; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java b/src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java deleted file mode 100644 index 9d5f7d03ed..0000000000 --- a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.core.handler.workbench; - -import java.util.Comparator; - -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.item.crafting.ShapelessRecipes; - -public class Workbench_RecipeSorter implements Comparator -{ - final Workbench_CraftingHandler CraftingManagerCrafter; - - Workbench_RecipeSorter(final Workbench_CraftingHandler par1CraftingManager) - { - this.CraftingManagerCrafter = par1CraftingManager; - } - - public int compareRecipes(final IRecipe par1IRecipe, final IRecipe par2IRecipe) - { - if ((par1IRecipe instanceof ShapelessRecipes) && (par2IRecipe instanceof ShapedRecipes)) - { - return 1; - } - - if ((par2IRecipe instanceof ShapelessRecipes) && (par1IRecipe instanceof ShapedRecipes)) - { - return -1; - } - - if (par2IRecipe.getRecipeSize() < par1IRecipe.getRecipeSize()) - { - return -1; - } - - return par2IRecipe.getRecipeSize() <= par1IRecipe.getRecipeSize() ? 0 : 1; - } - - @Override - public int compare(final Object par1Obj, final Object par2Obj) - { - return this.compareRecipes((IRecipe)par1Obj, (IRecipe)par2Obj); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/interfaces/IGuiManager.java b/src/Java/gtPlusPlus/core/interfaces/IGuiManager.java deleted file mode 100644 index 1d0ad9ed87..0000000000 --- a/src/Java/gtPlusPlus/core/interfaces/IGuiManager.java +++ /dev/null @@ -1,16 +0,0 @@ -package gtPlusPlus.core.interfaces; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; - -public abstract interface IGuiManager extends IGuiManagerMiscUtils{ - - public abstract ChunkCoordinates getCoordinates(); - - public abstract World getWorld(); - - public abstract Object getGui(EntityPlayer paramEntityPlayer, int paramInt); - - public abstract Object getContainer(EntityPlayer paramEntityPlayer, int paramInt); -} diff --git a/src/Java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java b/src/Java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java deleted file mode 100644 index cf46c67a54..0000000000 --- a/src/Java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java +++ /dev/null @@ -1,3 +0,0 @@ -package gtPlusPlus.core.interfaces; - -public abstract interface IGuiManagerMiscUtils {} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/interfaces/IItemBlueprint.java b/src/Java/gtPlusPlus/core/interfaces/IItemBlueprint.java deleted file mode 100644 index 473aa827b6..0000000000 --- a/src/Java/gtPlusPlus/core/interfaces/IItemBlueprint.java +++ /dev/null @@ -1,48 +0,0 @@ -package gtPlusPlus.core.interfaces; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -public interface IItemBlueprint { - - /** - * The inventory size for the blueprint~ - */ - public int INV_SIZE = 9; - - /** - * Meta Compatible function to allow meta items to be blueprints - * @param stack yourMetaItem - * @return true if it is a Blueprint - */ - public boolean isBlueprint(ItemStack stack); - - /** - * Sets the blueprint for this itemstack. - * @param stack yourMetaItem - * @return true if blueprint is set successfully - */ - public boolean setBlueprint(ItemStack stack, IInventory craftingTable, ItemStack output); - - /** - * Sets the name of the recipe/blueprint - * @param String Blueprint Name - * @return N/A - */ - public void setBlueprintName(ItemStack stack, String name); - - /** - * Does this itemstack hold a blueprint? - * @param stack yourMetaItem - * @return true if is holding a Blueprint - */ - public boolean hasBlueprint(ItemStack stack); - - /** - * Gets the recipe held by the item - * @param stack yourMetaItem - * @return the blueprints contents - */ - public ItemStack[] getBlueprint(ItemStack stack); - -} diff --git a/src/Java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java b/src/Java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java deleted file mode 100644 index 256fedb13c..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java +++ /dev/null @@ -1,241 +0,0 @@ -package gtPlusPlus.core.inventories; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gtPlusPlus.core.item.base.BaseItemBackpack; -import net.minecraftforge.common.util.Constants; - -public class BaseInventoryBackpack implements IInventory{ - - private final String name = "Inventory Item"; - - /** Provides NBT Tag Compound to reference */ - private final ItemStack invItem; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 8; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private final ItemStack[] inventory = new ItemStack[INV_SIZE]; - - // declaration of variable: - protected String uniqueID; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public BaseInventoryBackpack(final ItemStack stack) - { - this.invItem = stack; - - /** initialize variable within the constructor: */ - this.uniqueID = ""; - - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - // no tag compound means the itemstack does not yet have a UUID, so assign one: - this.uniqueID = UUID.randomUUID().toString(); - } - - // Create a new NBT Tag Compound if one doesn't already exist, or you will crash - if (!stack.hasTagCompound()) { - stack.setTagCompound(new NBTTagCompound()); - } - // note that it's okay to use stack instead of invItem right there - // both reference the same memory location, so whatever you change using - // either reference will change in the other - - // Read the inventory contents from NBT - this.readFromNBT(stack.getTagCompound()); - } - @Override - public int getSizeInventory() - { - return this.inventory.length; - } - - @Override - public ItemStack getStackInSlot(final int slot) - { - return this.inventory[slot]; - } - - @Override - public ItemStack decrStackSize(final int slot, final int amount) - { - ItemStack stack = this.getStackInSlot(slot); - if(stack != null) - { - if(stack.stackSize > amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { - this.inventory[i] = null; - } - } - - // This line here does the work: - this.writeToNBT(this.invItem.getTagCompound()); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return !(itemstack.getItem() instanceof BaseItemBackpack); - } - - /** - * A custom method to read our inventory from an ItemStack's NBT compound - */ - public void readFromNBT(final NBTTagCompound compound) - { - // Gets the custom taglist we wrote to this compound, if any - // 1.7.2+ change to compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); - final NBTTagList items = compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); - - if ("".equals(this.uniqueID)) - { - // try to read unique ID from NBT - this.uniqueID = compound.getString("uniqueID"); - // if it's still "", assign a new one: - if ("".equals(this.uniqueID)) - { - this.uniqueID = UUID.randomUUID().toString(); - } - } - - for (int i = 0; i < items.tagCount(); ++i) - { - // 1.7.2+ change to items.getCompoundTagAt(i) - final NBTTagCompound item = items.getCompoundTagAt(i); - final int slot = item.getInteger("Slot"); - - // Just double-checking that the saved slot index is within our inventory array bounds - if ((slot >= 0) && (slot < this.getSizeInventory())) { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(item); - } - } - } - - /** - * A custom method to write our inventory to an ItemStack's NBT compound - */ - public void writeToNBT(final NBTTagCompound tagcompound) - { - // Create a new NBT Tag List to store itemstacks as NBT Tags - final NBTTagList items = new NBTTagList(); - - for (int i = 0; i < this.getSizeInventory(); ++i) - { - // Only write stacks that contain items - if (this.getStackInSlot(i) != null) - { - // Make a new NBT Tag Compound to write the itemstack and slot index to - final NBTTagCompound item = new NBTTagCompound(); - item.setInteger("Slot", i); - // Writes the itemstack in slot(i) to the Tag Compound we just made - this.getStackInSlot(i).writeToNBT(item); - - // add the tag compound to our tag list - items.appendTag(item); - } - } - tagcompound.setString("uniqueID", this.uniqueID); - // Add the TagList to the ItemStack's Tag Compound with the name "ItemInventory" - tagcompound.setTag("ItemInventory", items); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java b/src/Java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java deleted file mode 100644 index 823398bd57..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java +++ /dev/null @@ -1,224 +0,0 @@ -package gtPlusPlus.core.inventories; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gtPlusPlus.core.item.base.BaseItemBackpack; -import net.minecraftforge.common.util.Constants; - -public class BaseInventoryGrindle implements IInventory { - - private final String name = "Inventory Item"; - - /** Provides NBT Tag Compound to reference */ - private final ItemStack invItem; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 6; - - /** - * Inventory's size must be same as number of slots you add to the Container - * class - */ - private final ItemStack[] inventory = new ItemStack[INV_SIZE]; - - // declaration of variable: - protected String uniqueID; - - /** - * @param itemstack - * - the ItemStack to which this inventory belongs - */ - public BaseInventoryGrindle(final ItemStack stack) { - this.invItem = stack; - - /** initialize variable within the constructor: */ - this.uniqueID = ""; - - if (!stack.hasTagCompound()) { - stack.setTagCompound(new NBTTagCompound()); - // no tag compound means the itemstack does not yet have a UUID, so assign one: - this.uniqueID = UUID.randomUUID().toString(); - } - - // Create a new NBT Tag Compound if one doesn't already exist, or you will crash - if (!stack.hasTagCompound()) { - stack.setTagCompound(new NBTTagCompound()); - } - // note that it's okay to use stack instead of invItem right there - // both reference the same memory location, so whatever you change using - // either reference will change in the other - - // Read the inventory contents from NBT - this.readFromNBT(stack.getTagCompound()); - } - - @Override - public int getSizeInventory() { - return this.inventory.length; - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.inventory[slot]; - } - - @Override - public ItemStack decrStackSize(final int slot, final int amount) { - ItemStack stack = this.getStackInSlot(slot); - if (stack != null) { - if (stack.stackSize > amount) { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } else { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - /** - * This is the method that will handle saving the inventory contents, as it is - * called (or should be called!) anytime the inventory changes. Perfect. Much - * better than using onUpdate in an Item, as this will also let you change - * things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() { - for (int i = 0; i < this.getSizeInventory(); ++i) { - if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { - this.inventory[i] = null; - } - } - - // This line here does the work: - this.writeToNBT(this.invItem.getTagCompound()); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() { - } - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() { - } - - /** - * This method doesn't seem to do what it claims to do, as items can still be - * left-clicked and placed in the inventory even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return !(itemstack.getItem() instanceof BaseItemBackpack); - } - - /** - * A custom method to read our inventory from an ItemStack's NBT compound - */ - public void readFromNBT(final NBTTagCompound compound) { - // Gets the custom taglist we wrote to this compound, if any - // 1.7.2+ change to compound.getTagList("ItemInventory", - // Constants.NBT.TAG_COMPOUND); - final NBTTagList items = compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); - - if ("".equals(this.uniqueID)) { - // try to read unique ID from NBT - this.uniqueID = compound.getString("uniqueID"); - // if it's still "", assign a new one: - if ("".equals(this.uniqueID)) { - this.uniqueID = UUID.randomUUID().toString(); - } - } - - for (int i = 0; i < items.tagCount(); ++i) { - // 1.7.2+ change to items.getCompoundTagAt(i) - final NBTTagCompound item = items.getCompoundTagAt(i); - final int slot = item.getInteger("Slot"); - - // Just double-checking that the saved slot index is within our inventory array - // bounds - if ((slot >= 0) && (slot < this.getSizeInventory())) { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(item); - } - } - } - - /** - * A custom method to write our inventory to an ItemStack's NBT compound - */ - public void writeToNBT(final NBTTagCompound tagcompound) { - // Create a new NBT Tag List to store itemstacks as NBT Tags - final NBTTagList items = new NBTTagList(); - - for (int i = 0; i < this.getSizeInventory(); ++i) { - // Only write stacks that contain items - if (this.getStackInSlot(i) != null) { - // Make a new NBT Tag Compound to write the itemstack and slot index to - final NBTTagCompound item = new NBTTagCompound(); - item.setInteger("Slot", i); - // Writes the itemstack in slot(i) to the Tag Compound we just made - this.getStackInSlot(i).writeToNBT(item); - - // add the tag compound to our tag list - items.appendTag(item); - } - } - tagcompound.setString("uniqueID", this.uniqueID); - // Add the TagList to the ItemStack's Tag Compound with the name "ItemInventory" - tagcompound.setTag("ItemInventory", items); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java b/src/Java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java deleted file mode 100644 index da45b5a988..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java +++ /dev/null @@ -1,173 +0,0 @@ -package gtPlusPlus.core.inventories; - -import gtPlusPlus.core.slots.SlotIntegratedCircuit; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryCircuitProgrammer implements IInventory{ - - private final String name = "Circuit Programmer"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 26; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return SlotIntegratedCircuit.isItemValidForSlot(itemstack); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryFishTrap.java b/src/Java/gtPlusPlus/core/inventories/InventoryFishTrap.java deleted file mode 100644 index 429ff517c1..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryFishTrap.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryFishTrap implements IInventory{ - - private final String name = "Fishtrap"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 15; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java b/src/Java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java deleted file mode 100644 index 0288aa4d29..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryHeliumGenerator implements IInventory{ - - private final String name = "Helium"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 19; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryPestKiller.java b/src/Java/gtPlusPlus/core/inventories/InventoryPestKiller.java deleted file mode 100644 index 1c5d98f7d2..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryPestKiller.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryPestKiller implements IInventory{ - - private final String name = "Pest Killer"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 3; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java deleted file mode 100644 index 3ea5675ba2..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java +++ /dev/null @@ -1,188 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryWorkbenchChest implements IInventory{ - - private final String name = "Inventory Chest"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 16; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryWorkbenchChest() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java deleted file mode 100644 index f49540b5e2..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java +++ /dev/null @@ -1,201 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryWorkbenchCrafting implements IInventory{ - - private final String name = "Inventory Crafting"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 9; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - public final InventoryCrafting craftMatrix; - public final Container parentContainer; - - public InventoryCrafting getCrafting(){ - return this.craftMatrix; - } - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryWorkbenchCrafting(final Container containerR) - { - this.parentContainer = containerR; - this.craftMatrix = new InventoryCrafting(this.parentContainer, 3, 3); - } - - private ItemStack[] getArrayOfCraftingItems(){ - final ItemStack[] array = new ItemStack[9]; - for (int i=0; i= 0) && (slot < INV_SIZE)) - { - this.getInventory()[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.getInventory()[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { - this.getInventory()[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java deleted file mode 100644 index 432a425a9b..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java +++ /dev/null @@ -1,164 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -public class InventoryWorkbenchHoloCrafting implements IInventory{ - - private final String name = "Inventory Crafting"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 9; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private final ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryWorkbenchHoloCrafting() - { - - } - - /*public void readFromNBT(NBTTagCompound nbt) - { - NBTTagList list = nbt.getTagList("Items", 10); - inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0 && slot < INV_SIZE) - { - inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(NBTTagCompound nbt) - { - NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - this.markDirty(); - } - else - { - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - this.markDirty(); - } - - @Override - public String getInventoryName() - { - return this.name; - } - - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - @Override - public void openInventory() {} - - @Override - public void closeInventory() {} - - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java deleted file mode 100644 index 1966e8fdca..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java +++ /dev/null @@ -1,269 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gtPlusPlus.api.objects.Logger; - -public class InventoryWorkbenchHoloSlots implements IInventory{ - - private final String name = "Inventory Holo"; - - //Output Slot - public IInventory craftResult = new InventoryCraftResult(); - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 6; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryWorkbenchHoloSlots() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 1) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - return false; - } - - /** A list of one item containing the result of the crafting formula */ - private final ItemStack[] stackResult = new ItemStack[1]; - - /** - * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a - * new stack. - */ - /*@Override - public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) - { - ItemStack stack = getStackInSlot(0); - if (this.stackResult[0] != null) - { - ItemStack itemstack = this.stackResult[0]; - this.stackResult[0] = null; - return itemstack; - } - if(stack != null) - { - if(stack.stackSize > p_70298_2_) - { - stack = stack.splitStack(p_70298_2_); - // Don't forget this line or your inventory will not be saved! - markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - setInventorySlotContents(p_70298_1_, null); - } - } - return stack; - }*/ - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) - { - if (this.getStackInSlot(0) != null){ - Logger.INFO("getStackInSlot(0) contains "+this.getStackInSlot(0).getDisplayName()); - if (this.stackResult[0] == null){ - Logger.INFO("this.stackResult[0] == null"); - this.stackResult[0] = this.getStackInSlot(0); - } - else if (this.stackResult[0] != null){ - Logger.INFO("this.stackResult[0] != null"); - if (this.stackResult[0].getDisplayName().toLowerCase().equals(this.getStackInSlot(0).getDisplayName().toLowerCase())){ - Logger.INFO("Items are the same?"); - } - else { - Logger.INFO("Items are not the same."); - } - } - } - - if (this.stackResult[0] != null) - { - Logger.INFO("this.stackResult[0] != null - Really never should be though. - Returning "+this.stackResult[0].getDisplayName()); - final ItemStack itemstack = this.stackResult[0]; - this.stackResult[0] = null; - return itemstack; - } - return null; - } - - /** - * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - - * like when you close a workbench GUI. - */ - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) - { - if (this.stackResult[0] != null) - { - final ItemStack itemstack = this.stackResult[0]; - this.stackResult[0] = null; - return itemstack; - } - return null; - } - -} - - - -//Default Behaviour -/*@Override -public ItemStack decrStackSize(int slot, int amount) -{ - if(stack != null) - { - if(stack.stackSize > amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - setInventorySlotContents(slot, null); - } - } - return stack; -}*/ - -//Default Behaviour -/*@Override -public ItemStack getStackInSlotOnClosing(int slot) -{ - ItemStack stack = getStackInSlot(slot); - setInventorySlotContents(slot, null); - return stack; -}*/ - diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java deleted file mode 100644 index 6543f6e9ea..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java +++ /dev/null @@ -1,188 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gregtech.api.items.GT_MetaGenerated_Tool; - -public class InventoryWorkbenchTools implements IInventory{ - - private final String name = "Inventory Tools"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 5; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryWorkbenchTools() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - if (itemstack.getItem() instanceof GT_MetaGenerated_Tool){ - return true; - } - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java deleted file mode 100644 index 29bf306b08..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java +++ /dev/null @@ -1,193 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gregtech.api.items.GT_MetaGenerated_Tool; - -import gtPlusPlus.core.slots.SlotGtToolElectric; -import ic2.api.item.IElectricItem; - -public class InventoryWorkbenchToolsElectric implements IInventory{ - - private final String name = "Inventory Tools"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 5; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - private final Slot[] toolSlots = new SlotGtToolElectric[INV_SIZE]; //TODO - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryWorkbenchToolsElectric() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)){ - return true; - } - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java b/src/Java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java deleted file mode 100644 index 666f4aac53..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class Inventory_DecayablesChest implements IInventory{ - - private final String name = "DecayablesChest"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 15; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/Inventory_EggBox.java b/src/Java/gtPlusPlus/core/inventories/Inventory_EggBox.java deleted file mode 100644 index 334afc3300..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/Inventory_EggBox.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class Inventory_EggBox implements IInventory{ - - private final String name = "EggBox"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 15; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java b/src/Java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java deleted file mode 100644 index a47f250c39..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java +++ /dev/null @@ -1,172 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class Inventory_RoundRobinator implements IInventory{ - - private final String name = "Round Robinator"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 4; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java b/src/Java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java deleted file mode 100644 index 681c67a988..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java +++ /dev/null @@ -1,172 +0,0 @@ -package gtPlusPlus.core.inventories; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class Inventory_SuperJukebox implements IInventory{ - - private final String name = "Sir Mixalot"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 21; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 1; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java b/src/Java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java deleted file mode 100644 index e2dc91a413..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java +++ /dev/null @@ -1,173 +0,0 @@ -package gtPlusPlus.core.inventories; - -import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class Inventory_VolumetricFlaskSetter implements IInventory{ - - private final String name = "Volumetric Flask Setter"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 9; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - public void readFromNBT(final NBTTagCompound nbt){ - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)){ - //Utils.LOG_INFO("Trying to read NBT data from inventory."); - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt){ - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 16; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return VolumetricFlaskHelper.isVolumetricFlask(itemstack); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java b/src/Java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java deleted file mode 100644 index 03350a3c18..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.inventories.box; - -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import gtPlusPlus.core.slots.SlotLunchBox; -import net.minecraft.item.ItemStack; - -public class LunchBoxInventory extends CustomBoxInventory { - public LunchBoxInventory(ItemStack stack) { - super(stack, "Lunch Box", gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS); - } - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) { - return SlotLunchBox.isItemValid_STATIC(itemstack); - } -} diff --git a/src/Java/gtPlusPlus/core/inventories/box/MagicBagInventory.java b/src/Java/gtPlusPlus/core/inventories/box/MagicBagInventory.java deleted file mode 100644 index 56b1835113..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/box/MagicBagInventory.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.inventories.box; - -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import gtPlusPlus.core.slots.SlotMagicToolBag; -import net.minecraft.item.ItemStack; - -public class MagicBagInventory extends CustomBoxInventory { - public MagicBagInventory(ItemStack stack) { - super(stack, "Mystic Bag", gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS); - } - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) { - return SlotMagicToolBag.isItemValid_STATIC(itemstack); - } -} diff --git a/src/Java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java b/src/Java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java deleted file mode 100644 index 30893aeb4b..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java +++ /dev/null @@ -1,16 +0,0 @@ -package gtPlusPlus.core.inventories.box; - -import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; -import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox; -import gtPlusPlus.core.slots.SlotToolBox; -import net.minecraft.item.ItemStack; - -public class ToolBoxInventory extends CustomBoxInventory { - public ToolBoxInventory(ItemStack stack) { - super(stack, "Tool Box", UniversalToolBox.SLOTS); - } - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) { - return SlotToolBox.isItemValid_STATIC(itemstack); - } -} diff --git a/src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java b/src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java deleted file mode 100644 index 825a9a8851..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java +++ /dev/null @@ -1,202 +0,0 @@ -package gtPlusPlus.core.inventories.modulartable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; - -public class InventoryModularMain implements IInventory{ - - private final String name = "Inventory Grid"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 9; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryModularMain() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i= this.inventory.length){ - //Utils.LOG_INFO("Returning invalid slot item."); - return null; - } - return this.inventory[slot]; - } catch (Throwable t){ - t.printStackTrace(); - return null; - } - } - - @Override - public ItemStack decrStackSize(final int slot, final int amount) - { - ItemStack stack = this.getStackInSlot(slot); - if(stack != null) - { - if(stack.stackSize > amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - if (slot >= this.inventory.length){ - return; - } - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack){ - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return TileEntityModularityTable.isValidUpgrade(itemstack); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java b/src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java deleted file mode 100644 index d3c59ee2a4..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java +++ /dev/null @@ -1,192 +0,0 @@ -package gtPlusPlus.core.inventories.modulartable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; - -public class InventoryModularOutput implements IInventory { - - private final String name = "Inventory Output"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 3; - private int mRecpeTime = -1; - - /** - * Inventory's size must be same as number of slots you add to the Container - * class - */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - * - the ItemStack to which this inventory belongs - */ - public InventoryModularOutput() { - - } - - public void readFromNBT(final NBTTagCompound nbt) { - if (this.mRecpeTime > -1) { - nbt.setInteger("mRecipeTime", this.mRecpeTime); - } - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for (int i = 0; i < list.tagCount(); i++) { - final NBTTagCompound data = list.getCompoundTagAt(i); - final int slot = data.getInteger("Slot"); - if ((slot >= 0) && (slot < INV_SIZE)) { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) { - final NBTTagList list = new NBTTagList(); - if (nbt.hasKey("mRecipeTime")) { - this.mRecpeTime = nbt.getInteger("mRecipeTime"); - } - for (int i = 0; i < INV_SIZE; i++) { - final ItemStack stack = this.inventory[i]; - if (stack != null) { - final NBTTagCompound data = new NBTTagCompound(); - stack.writeToNBT(data); - data.setInteger("Slot", i); - list.appendTag(data); - } - } - nbt.setTag("Items", list); - } - - public int setRecipeTime(int mTime) { - return (this.mRecpeTime = mTime); - } - - public int getRecipeTime() { - return this.mRecpeTime; - } - - @Override - public int getSizeInventory() { - return this.inventory.length; - } - - public ItemStack[] getInventory() { - return this.inventory; - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.inventory[slot]; - } - - @Override - public ItemStack decrStackSize(final int slot, final int amount) { - ItemStack stack = this.getStackInSlot(slot); - if (stack != null) { - if (stack.stackSize > amount) { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } else { - // this method also calls markDirty, so we don't need to call it - // again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it - * is called (or should be called!) anytime the inventory changes. Perfect. - * Much better than using onUpdate in an Item, as this will also let you - * change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() { - for (int i = 0; i < this.getSizeInventory(); ++i) { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null) { - // Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" - // x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() { - } - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() { - } - - /** - * This method doesn't seem to do what it claims to do, as items can still - * be left-clicked and placed in the inventory even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - if (slot == 0){ - return TileEntityModularityTable.isValidUpgrade(itemstack); - } - return TileEntityModularityTable.isValidModularPiece(itemstack); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java b/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java deleted file mode 100644 index 2d91869027..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java +++ /dev/null @@ -1,201 +0,0 @@ -package gtPlusPlus.core.inventories.projecttable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryProjectMain implements IInventory{ - - private final String name = "Inventory Grid"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 9; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryProjectMain() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i= this.inventory.length){ - //Utils.LOG_INFO("Returning invalid slot item."); - return null; - } - return this.inventory[slot]; - } catch (Throwable t){ - t.printStackTrace(); - return null; - } - } - - @Override - public ItemStack decrStackSize(final int slot, final int amount) - { - ItemStack stack = this.getStackInSlot(slot); - if(stack != null) - { - if(stack.stackSize > amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - if (slot >= this.inventory.length){ - return; - } - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java b/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java deleted file mode 100644 index 41ddd06ef1..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java +++ /dev/null @@ -1,188 +0,0 @@ -package gtPlusPlus.core.inventories.projecttable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryProjectOutput implements IInventory{ - - private final String name = "Inventory Output"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 2; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryProjectOutput() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java b/src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java deleted file mode 100644 index aa7e8b1866..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java +++ /dev/null @@ -1,201 +0,0 @@ -package gtPlusPlus.core.inventories.tradetable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryTradeMain implements IInventory{ - - private final String name = "Inventory Grid"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 9; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryTradeMain() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i= this.inventory.length){ - //Utils.LOG_INFO("Returning invalid slot item."); - return null; - } - return this.inventory[slot]; - } catch (Throwable t){ - t.printStackTrace(); - return null; - } - } - - @Override - public ItemStack decrStackSize(final int slot, final int amount) - { - ItemStack stack = this.getStackInSlot(slot); - if(stack != null) - { - if(stack.stackSize > amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - if (slot >= this.inventory.length){ - return; - } - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java b/src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java deleted file mode 100644 index fb4329e11a..0000000000 --- a/src/Java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java +++ /dev/null @@ -1,188 +0,0 @@ -package gtPlusPlus.core.inventories.tradetable; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -public class InventoryTradeOutput implements IInventory{ - - private final String name = "Inventory Output"; - - /** Defining your inventory size this way is handy */ - public static final int INV_SIZE = 2; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory = new ItemStack[INV_SIZE]; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public InventoryTradeOutput() - { - - } - - public void readFromNBT(final NBTTagCompound nbt) - { - final NBTTagList list = nbt.getTagList("Items", 10); - this.inventory = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - } - - public void writeToNBT(final NBTTagCompound nbt) - { - final NBTTagList list = new NBTTagList(); - for(int i = 0;i amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - else - { - // this method also calls markDirty, so we don't need to call it again - this.setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) - { - final ItemStack stack = this.getStackInSlot(slot); - this.setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) - { - this.inventory[slot] = stack; - - if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) - { - stack.stackSize = this.getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - this.markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return this.name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return this.name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < this.getSizeInventory(); ++i) - { - final ItemStack temp = this.getStackInSlot(i); - if (temp != null){ - //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); - } - - if ((temp != null) && (temp.stackSize == 0)) { - this.inventory[i] = null; - } - } - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) - { - // Don't want to be able to store the inventory item within itself - // Bad things will happen, like losing your inventory - // Actually, this needs a custom Slot to work - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java deleted file mode 100644 index 4c6f0dc712..0000000000 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ /dev/null @@ -1,1229 +0,0 @@ -package gtPlusPlus.core.item; -import static gtPlusPlus.core.creative.AddToCreativeTab.tabMachines; -import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; -import static gtPlusPlus.core.lib.CORE.LOAD_ALL_CONTENT; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; -import gtPlusPlus.core.block.base.BlockBaseModular; -import gtPlusPlus.core.common.compat.COMPAT_Baubles; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.*; -import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; -import gtPlusPlus.core.item.base.dusts.BaseItemDust; -import gtPlusPlus.core.item.base.foil.BaseItemFoil; -import gtPlusPlus.core.item.base.foods.BaseItemFood; -import gtPlusPlus.core.item.base.foods.BaseItemHotFood; -import gtPlusPlus.core.item.base.gears.BaseItemSmallGear; -import gtPlusPlus.core.item.base.ingots.BaseItemIngot; -import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD; -import gtPlusPlus.core.item.base.misc.BaseItemMisc; -import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes; -import gtPlusPlus.core.item.base.plates.BaseItemPlate; -import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble; -import gtPlusPlus.core.item.bauble.*; -import gtPlusPlus.core.item.chemistry.*; -import gtPlusPlus.core.item.crafting.ItemDummyResearch; -import gtPlusPlus.core.item.effects.RarityUncommon; -import gtPlusPlus.core.item.food.BaseItemMetaFood; -import gtPlusPlus.core.item.general.*; -import gtPlusPlus.core.item.general.books.ItemBaseBook; -import gtPlusPlus.core.item.general.capture.ItemEntityCatcher; -import gtPlusPlus.core.item.general.chassis.ItemBoilerChassis; -import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoil; -import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoilWire; -import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg; -import gtPlusPlus.core.item.general.throwables.ItemHydrofluoricAcidPotion; -import gtPlusPlus.core.item.general.throwables.ItemSulfuricAcidPotion; -import gtPlusPlus.core.item.general.throwables.ItemThrowableBomb; -import gtPlusPlus.core.item.init.ItemsFoods; -import gtPlusPlus.core.item.materials.DustDecayable; -import gtPlusPlus.core.item.tool.misc.DebugScanner; -import gtPlusPlus.core.item.tool.misc.GregtechPump; -import gtPlusPlus.core.item.tool.misc.SandstoneHammer; -import gtPlusPlus.core.item.tool.misc.box.AutoLunchBox; -import gtPlusPlus.core.item.tool.misc.box.MagicToolBag; -import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox; -import gtPlusPlus.core.item.tool.staballoy.*; -import gtPlusPlus.core.item.wearable.WearableLoader; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.*; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.material.nuclear.NUCLIDE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.debug.DEBUG_INIT; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.everglades.GTplusplus_Everglades; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.cofh.HANDLER_COFH; -import gtPlusPlus.xmod.eio.material.MaterialEIO; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; -import net.minecraft.item.*; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -public final class ModItems { - - public static ToolMaterial STABALLOY = EnumHelper.addToolMaterial("Staballoy", 3, 2500, 7, 1.0F, 18); - - public static Item ZZZ_Empty; - public static Item AAA_Broken; - - - public static Item itemAlkalusDisk; - public static Item itemDebugShapeSpawner; - public static ItemCustomSpawnEgg itemCustomSpawnEgg; - - //EnderIO - public static Item itemPlateSoularium; - public static Item itemPlateRedstoneAlloy; - public static Item itemPlateElectricalSteel; - public static Item itemPlatePulsatingIron; - public static Item itemPlateEnergeticAlloy; - public static Item itemPlateVibrantAlloy; - public static Item itemPlateConductiveIron; - public static Item itemPlateDarkSteel; - public static Item itemDustSoularium; - public static Item itemDustRedstoneAlloy; - public static Item itemDustElectricalSteel; - public static Item itemDustPulsatingIron; - public static Item itemDustEnergeticAlloy; - public static Item itemDustVibrantAlloy; - public static Item itemDustConductiveIron; - //Big Reactors - public static Item itemPlateBlutonium; - public static Item itemPlateCyanite; - public static Item itemPlateLudicrite; - //Thaumcraft - public static Item itemPlateVoidMetal; - //Pneumaticraft - public static Item itemPlateCompressedIron; - //SimplyJetpacks - public static Item itemPlateEnrichedSoularium; - //rfTools - public static Item itemPlateDimensionShard; - //Staballoy - public static Item itemStaballoyPickaxe; - public static Item itemStaballoyAxe; - //Tools - public static Item itemSandstoneHammer; - //Machine Related - public static Item itemBufferCore0; - //Material related - public static Item itemStickyRubber; - public static Item itemIngotBatteryAlloy; - public static Item itemPlateBatteryAlloy; - public static Item itemHeliumBlob; - public static Item itemHydrogenBlob; - public static Item itemPLACEHOLDER_Circuit; - - public static Item FuelRod_Empty; - public static Item FuelRod_Thorium; - public static Item FuelRod_Uranium; - public static Item FuelRod_Plutonium; - - public static Item itemBedLocator_Base; - public static Item itemBaseItemWithCharge; - - public static Item itemIngotRaisinBread; - public static Item itemHotIngotRaisinBread; - - public static ItemFood itemFoodRaisinToast; - public static BaseItemHotFood itemHotFoodRaisinToast; - public static BaseItemFood itemFoodCurriedSausages; - public static BaseItemHotFood itemHotFoodCurriedSausages; - - public static Item RfEuBattery; - public static Item itemPersonalCloakingDevice; - public static Item itemPersonalCloakingDeviceCharged; - public static Item itemPersonalHealingDevice; - public static Item itemPersonalFireProofDevice; - public static Item itemSlowBuildingRing; - - public static MultiPickaxeBase MP_GTMATERIAL; - public static MultiSpadeBase MS_GTMATERIAL; - - public static ItemStack FluidCell; - - public static BaseItemBackpack backpack_Red; - public static BaseItemBackpack backpack_Green; - public static BaseItemBackpack backpack_Blue; - public static BaseItemBackpack backpack_Yellow; - public static BaseItemBackpack backpack_Purple; - public static BaseItemBackpack backpack_Cyan; - public static BaseItemBackpack backpack_Maroon; - public static BaseItemBackpack backpack_Olive; - public static BaseItemBackpack backpack_DarkGreen; - public static BaseItemBackpack backpack_DarkPurple; - public static BaseItemBackpack backpack_Teal; - public static BaseItemBackpack backpack_Navy; - public static BaseItemBackpack backpack_Silver; - public static BaseItemBackpack backpack_Gray; - public static BaseItemBackpack backpack_Black; - public static BaseItemBackpack backpack_White; - - public static ItemBlueprint itemBlueprintBase; - - public static Item dustLithiumCarbonate; - public static Item dustLithiumHydroxide; - public static Item dustLithiumPeroxide; - public static Item dustLithiumFluoride; - - public static Item dustUranium232; - public static Item dustUraniumTetraFluoride; - public static Item dustUraniumHexaFluoride; - - public static Item dustBerylliumFluoride; - - public static Item dustQuicklime; - public static Item dustCalciumHydroxide; - public static Item dustCalciumCarbonate; - public static Item dustLi2CO3CaOH2; - public static Item dustLi2BeF4; - - public static Item dustTumbagaMix; - - public static Item dustAer; - public static Item dustIgnis; - public static Item dustTerra; - public static Item dustAqua; - - public static BaseEuItem metaItem2; - - public static Item shardAer; - public static Item shardIgnis; - public static Item shardTerra; - public static Item shardAqua; - - //Tc Compat for energy crystal recipes - public static Item shardDull; - - //Lighter - public static Item itemBasicFireMaker; - - //Zirconium - public static Item itemZirconiumChlorideCinterPellet; - public static Item dustZrCl4; - public static Item dustCookedZrCl4; - public static Item dustZrF4; - - public static Item dustNaBF4NaF; - public static Item dustLiFBeF2ZrF4UF4; - public static Item dustLiFBeF2ZrF4U235; - public static Item dustLiFBeF2ThF4UF4; - - public static Item dustCalciumSulfate; - - public static Item dustFertUN18; - public static Item dustFertUN32; - - //public static Fluid fluidFLiBeSalt; - //public static Fluid fluidFLiBeSaltBurnt; - - public static Fluid fluidLftrCore1; - public static Fluid fluidLftrCore2; - public static Fluid fluidLftrCore3; - public static Fluid fluidLftrCore4; - public static Fluid fluidLftrBlanket1; - public static Fluid fluidLftrBlanket2; - public static Fluid fluidLftrBlanket3; - public static Fluid fluidNuclearWaste; - - - //Possibly missing base items that GT may be missing. - - public static Item itemSmallWroughtIronGear; - public static Item itemPlateRawMeat; - public static Item itemPlateClay; - public static Item itemPlateLithium; - public static Item itemPlateEuropium; - public static Item itemPlateVanadium; - public static Item itemDoublePlateClay; - public static Item itemDoublePlateEuropium; - public static Item itemFoilUranium235; - public static Item itemDustIndium; - public static BlockBaseModular blockRawMeat; - - public static Item itemBoilerChassis; - public static Item itemDehydratorCoilWire; - public static Item itemDehydratorCoil; - - public static Item itemLavaFilter; - public static Item itemAirFilter; - - public static Item itemCoalCoke; - public static Item itemCactusCharcoal; - public static Item itemSugarCharcoal; - public static Item itemCactusCoke; - public static Item itemSugarCoke; - - public static Item itemCircuitLFTR; - public static Item itemBasicTurbine; - - public static Item itemDebugAreaClear; - - public static Item itemGemShards; - public static Item itemHalfCompleteCasings; - - public static Item itemSulfuricPotion; - public static Item itemHydrofluoricPotion; - - public static Item itemModularBauble; - public static Item itemCustomBook; - - public static Item itemGrindleTablet; - public static Item itemRope; - public static Item itemFiber; - public static Item itemDragonJar; - - //Unstable Elements & Related Content - public static Item dustNeptunium238; - public static Item dustDecayedRadium226; - public static Item dustRadium226; - public static Item dustProtactinium233; - - public static ItemGiantEgg itemBigEgg; - - public static GregtechPump toolGregtechPump; - - public static ItemGenericToken itemGenericToken; - - public static Item itemControlCore; - - public static ItemStack itemHotTitaniumIngot; - - public static Fluid fluidZrF4; - - public static Item boxTools; - public static Item boxFood; - public static Item boxMagic; - - public static DustDecayable dustMolybdenum99; - public static DustDecayable dustTechnetium99; - public static DustDecayable dustTechnetium99M; - - public static IonParticles itemIonParticleBase; - public static StandardBaseParticles itemStandarParticleBase; - - public static BatteryPackBaseBauble itemChargePack_Low_1; - public static BatteryPackBaseBauble itemChargePack_Low_2; - public static BatteryPackBaseBauble itemChargePack_Low_3; - public static BatteryPackBaseBauble itemChargePack_Low_4; - public static BatteryPackBaseBauble itemChargePack_Low_5; - public static BatteryPackBaseBauble itemChargePack_High_1; - public static BatteryPackBaseBauble itemChargePack_High_2; - public static BatteryPackBaseBauble itemChargePack_High_3; - public static BatteryPackBaseBauble itemChargePack_High_4; - - public static DebugScanner itemDebugScanner; - - public static ItemDummyResearch itemDummyResearch; - - public static CoreItem itemBombCasing; - public static CoreItem itemBombUnf; - public static CoreItem itemDetCable; - public static ItemThrowableBomb itemBomb; - - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Zombie; - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Skeleton; - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Spider; - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Creeper; - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Enderman; - - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Nether; - public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Infernal; - - public static CoreItem itemExquisiteIndustrialDiamond; - - public static BaseItemMetaFood itemMetaFood; - - static { - Logger.INFO("Items!"); - //Default item used when recipes fail, handy for debugging. Let's make sure they exist when this class is called upon. - AAA_Broken = new BaseItemIngot_OLD("AAA_Broken", "Errors - Tell Alkalus", Utils.rgbtoHexValue(128, 128, 128), 0); - ZZZ_Empty = new ItemEmpty(); - } - - public static final void init(){ - - itemDebugScanner = new DebugScanner(); - - itemAlkalusDisk = new BaseItemDamageable("itemAlkalusDisk", AddToCreativeTab.tabMisc, 1, 0, "Unknown Use", EnumRarity.rare, EnumChatFormatting.AQUA, false, null); - itemBigEgg = new ItemGiantEgg(); - itemGenericToken = new ItemGenericToken(); - itemDummyResearch = new ItemDummyResearch(); - itemCustomSpawnEgg = new ItemCustomSpawnEgg(); - - //Debug Loading - if (CORE_Preloader.DEBUG_MODE){ - DEBUG_INIT.registerItems(); - } - - itemDebugAreaClear = new ItemAreaClear(); - - //Register meta item, because we need them for everything. - MetaGeneratedGregtechItems.INSTANCE.generateMetaItems(); - - //Some Simple forms of materials - itemStickyRubber = new Item().setUnlocalizedName("itemStickyRubber").setCreativeTab(tabMachines).setTextureName(CORE.MODID + ":itemStickyRubber"); - GameRegistry.registerItem(itemStickyRubber, "itemStickyRubber"); - GT_OreDictUnificator.registerOre("ingotRubber", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemStickyRubber", 1)); - - //Register Hydrogen Blobs first, so we can replace old helium blobs. - itemHydrogenBlob = new CoreItem("itemHydrogenBlob", "Mysterious Hydrogen Blob", tabMisc).setTextureName(CORE.MODID + ":itemHeliumBlob"); - //Register Old Helium Blob, this will be replaced when held by a player. - itemHeliumBlob = new CoreItem("itemHeliumBlob", tabMisc, ItemUtils.getSimpleStack(itemHydrogenBlob)).setTextureName(CORE.MODID + ":itemHydrogenBlob"); - - //Register this neato device, for making some fires. - itemBasicFireMaker = new ItemBasicFirestarter(); - - //Register Rope - itemFiber = new CoreItem("itemFiber", "Plant Fiber", tabMisc); - itemRope = new CoreItem("itemRope", "Rope", tabMisc); - - //Load Wearable Items - WearableLoader.run(); - - //Make some backpacks - //Primary colours - backpack_Red = new BaseItemBackpack("backpackRed", Utils.rgbtoHexValue(200, 0, 0)); - backpack_Green = new BaseItemBackpack("backpackGreen", Utils.rgbtoHexValue(0, 200, 0)); - backpack_Blue = new BaseItemBackpack("backpackBlue", Utils.rgbtoHexValue(0, 0, 200)); - //Secondary Colours - backpack_Yellow = new BaseItemBackpack("backpackYellow", Utils.rgbtoHexValue(200, 200, 0)); - backpack_Purple = new BaseItemBackpack("backpackPurple", Utils.rgbtoHexValue(200, 0, 200)); - backpack_Cyan = new BaseItemBackpack("backpackCyan", Utils.rgbtoHexValue(0, 200, 200)); - //Tertiary Colours - backpack_Maroon = new BaseItemBackpack("backpackMaroon", Utils.rgbtoHexValue(128, 0, 0)); - backpack_Olive = new BaseItemBackpack("backpackOlive", Utils.rgbtoHexValue(128, 128, 0)); - backpack_DarkGreen = new BaseItemBackpack("backpackDarkGreen", Utils.rgbtoHexValue(0, 128, 0)); - backpack_DarkPurple = new BaseItemBackpack("backpackDarkPurple", Utils.rgbtoHexValue(128, 0, 128)); - backpack_Teal = new BaseItemBackpack("backpackTeal", Utils.rgbtoHexValue(0, 128, 128)); - backpack_Navy = new BaseItemBackpack("backpackNavy", Utils.rgbtoHexValue(0, 0, 128)); - //Shades - backpack_Silver = new BaseItemBackpack("backpackSilver", Utils.rgbtoHexValue(192, 192, 192)); - backpack_Gray = new BaseItemBackpack("backpackGray", Utils.rgbtoHexValue(128, 128, 128)); - backpack_Black = new BaseItemBackpack("backpackBlack", Utils.rgbtoHexValue(20, 20, 20)); - backpack_White = new BaseItemBackpack("backpackWhite", Utils.rgbtoHexValue(240, 240, 240)); - - - //Load Custom Box/bags - boxTools = new UniversalToolBox("Tool Box"); - boxFood = new AutoLunchBox("Eatotron-9000"); - boxMagic = new MagicToolBag("Mystic Bag"); - - itemBlueprintBase = new ItemBlueprint("itemBlueprint"); - - itemGemShards = new ItemGemShards("itemGemShards", "Gem Shards", AddToCreativeTab.tabMisc, 32, 0, "They glitter in the light", EnumRarity.rare, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(182, 114, 18)).setTextureName(CORE.MODID + ":itemHeliumBlob"); - itemHalfCompleteCasings = new ItemHalfCompleteCasings("itemHalfCompleteCasings", AddToCreativeTab.tabMisc, 32, 0, "This isn't quite finished yet.", EnumRarity.common, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(255, 255, 255)).setTextureName("gregtech" + ":" + "gt.metaitem.01/" + "761"); - itemSulfuricPotion = new ItemSulfuricAcidPotion("itemSulfuricPotion", "Throwable Vial of Sulfuric Acid", "Burn your foes alive!").setTextureName(CORE.MODID + ":itemSulfuricAcidPotion"); - itemHydrofluoricPotion = new ItemHydrofluoricAcidPotion("itemHydrofluoricPotion", "Throwable Vial of Hydrofluoric Acid", "They won't see this coming, nor anything after!").setTextureName(CORE.MODID + ":itemPotion"); - //Start meta Item Generation - ItemsFoods.load(); - - - try{ - - /** - * Try generate dusts for missing rare earth materials if they don't exist - */ - - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1))){ - ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1))){ - ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1))){ - ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1))){ - ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGermanium", 1))){ - ItemUtils.generateSpecialUseDusts("Germanium", "Germanium", "Ge", ELEMENT.getInstance().GERMANIUM.getRgbAsHex()); - } - - - //Elements generate first so they can be used in compounds. - //Missing Elements - MaterialGenerator.generate(ELEMENT.getInstance().SELENIUM); //LFTR byproduct - MaterialGenerator.generate(ELEMENT.getInstance().BROMINE); - MaterialGenerator.generate(ELEMENT.getInstance().KRYPTON); //LFTR byproduct - MaterialGenerator.generate(ELEMENT.getInstance().STRONTIUM); - MaterialGenerator.generate(ELEMENT.getInstance().ZIRCONIUM); - MaterialGenerator.generate(ELEMENT.getInstance().RUTHENIUM); - MaterialGenerator.generate(ELEMENT.getInstance().IODINE); //LFTR byproduct - MaterialGenerator.generate(ELEMENT.getInstance().HAFNIUM); - MaterialGenerator.generate(ELEMENT.getInstance().DYSPROSIUM); - MaterialGenerator.generate(ELEMENT.getInstance().ERBIUM); - MaterialGenerator.generate(ELEMENT.getInstance().PRASEODYMIUM); - MaterialGenerator.generate(ELEMENT.getInstance().TELLURIUM); //LFTR byproduct - MaterialGenerator.generate(ELEMENT.getInstance().RHODIUM); - MaterialGenerator.generate(ELEMENT.getInstance().RHENIUM); - MaterialGenerator.generate(ELEMENT.getInstance().THALLIUM); - - //RADIOACTIVE ELEMENTS - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().TECHNETIUM, false); //LFTR byproduct - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().POLONIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().ASTATINE, false); - //MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().RADON, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().FRANCIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().RADIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PROMETHIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().ACTINIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PROTACTINIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().NEPTUNIUM, false); //LFTR byproduct - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().CURIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().BERKELIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().CALIFORNIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().EINSTEINIUM, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().FERMIUM, false); - - - //Nuclear Isotopes - - //Lithium-7 is used as a part of the molten lithium fluoride in molten salt reactors: liquid-fluoride nuclear reactors. - //The large neutron-absorption cross-section of lithium-6 (about 940 barns[5]) as compared with the very small - //neutron cross-section of lithium-7 (about 45 millibarns) makes high separation of lithium-7 from natural lithium a - //strong requirement for the possible use in lithium fluoride reactors. - MaterialGenerator.generate(ELEMENT.getInstance().LITHIUM7, false); - //Thorium-232 is the most stable isotope of Thorium, purified for nuclear fuel use in this case. - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().THORIUM232); - //Production of 233U (through the neutron irradiation of 232Th) invariably produces small amounts of 232U as an impurity - //because of parasitic (n,2n) reactions on uranium-233 itself, or on protactinium-233, or on thorium-232: - MaterialGenerator.generate(ELEMENT.getInstance().URANIUM232); - //Uranium-233 is a fissile isotope of uranium that is bred from thorium-232 as part of the thorium fuel cycle. - MaterialGenerator.generate(ELEMENT.getInstance().URANIUM233); - //Plutonium-238 is a very powerful alpha emitter. This makes the plutonium-238 isotope suitable for usage in radioisotope thermoelectric generators (RTGs) - //and radioisotope heater units - one gram of plutonium-238 generates approximately 0.5 W of thermal power. - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PLUTONIUM238, false); - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustPlutonium239", 1) == null || Utils.getGregtechVersionAsInt() < 50931) { - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PLUTONIUM239, false); - } - - //RTG Fuel Materials - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().STRONTIUM90, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().POLONIUM210, false); - MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().AMERICIUM241, false); - - - //Custom Materials that will have standalone refinery processes - MaterialGenerator.generate(ELEMENT.STANDALONE.ADVANCED_NITINOL, false); - MaterialGenerator.generate(ELEMENT.STANDALONE.ASTRAL_TITANIUM); - MaterialGenerator.generate(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialGenerator.generate(ELEMENT.STANDALONE.HYPOGEN); - MaterialGenerator.generate(ELEMENT.STANDALONE.CHRONOMATIC_GLASS); - - //Custom Materials that are from Runescape - MaterialGenerator.generate(ELEMENT.STANDALONE.BLACK_METAL); - MaterialGenerator.generate(ELEMENT.STANDALONE.WHITE_METAL); - MaterialGenerator.generate(ELEMENT.STANDALONE.GRANITE, false, false); - MaterialGenerator.generate(ELEMENT.STANDALONE.RUNITE, false); - MaterialGenerator.generate(ELEMENT.STANDALONE.DRAGON_METAL, false); - - MISC_MATERIALS.run(); - - - //Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - MaterialGenerator.generate(ALLOY.TUNGSTEN_CARBIDE); - } - MaterialGenerator.generate(ALLOY.SILICON_CARBIDE); - MaterialGenerator.generate(ALLOY.ZIRCONIUM_CARBIDE); - MaterialGenerator.generate(ALLOY.TANTALUM_CARBIDE); - MaterialGenerator.generate(ALLOY.NIOBIUM_CARBIDE); - MaterialGenerator.generate(ALLOY.TUNGSTEN_TITANIUM_CARBIDE); - - //LFTR Fuel components - //MaterialGenerator.generate(MISC_MATERIALS.HYDROXIDE); //LFTR fuel component - //MaterialGenerator.generate(MISC_MATERIALS.AMMONIA); //LFTR fuel component - //MaterialGenerator.generate(MISC_MATERIALS.AMMONIUM); //LFTR fuel component - MaterialGenerator.generateNuclearDusts(FLUORIDES.AMMONIUM_BIFLUORIDE); //LFTR fuel component - MaterialGenerator.generateNuclearDusts(FLUORIDES.BERYLLIUM_HYDROXIDE); //LFTR fuel component - MaterialGenerator.generateNuclearDusts(FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE); //LFTR fuel component - - //Generate Fluorides - MaterialGenerator.generateNuclearDusts(FLUORIDES.BERYLLIUM_FLUORIDE); - MaterialGenerator.generateNuclearDusts(FLUORIDES.LITHIUM_FLUORIDE); - MaterialGenerator.generateNuclearDusts(FLUORIDES.THORIUM_TETRAFLUORIDE); - MaterialGenerator.generateNuclearDusts(FLUORIDES.THORIUM_HEXAFLUORIDE); - MaterialGenerator.generateNuclearDusts(FLUORIDES.URANIUM_TETRAFLUORIDE, false); - MaterialGenerator.generateNuclearDusts(FLUORIDES.URANIUM_HEXAFLUORIDE, false); - MaterialGenerator.generateNuclearDusts(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE); - //LFTR Fluoride outputs - MaterialGenerator.generateNuclearDusts(FLUORIDES.NEPTUNIUM_HEXAFLUORIDE); - MaterialGenerator.generateNuclearDusts(FLUORIDES.TECHNETIUM_HEXAFLUORIDE); - MaterialGenerator.generateNuclearDusts(FLUORIDES.SELENIUM_HEXAFLUORIDE); - - //Generate Reactor Fuel Salts - MaterialGenerator.generateNuclearDusts(NUCLIDE.LiFBeF2ZrF4U235); - MaterialGenerator.generateNuclearDusts(NUCLIDE.LiFBeF2ZrF4UF4); - MaterialGenerator.generateNuclearDusts(NUCLIDE.LiFBeF2ThF4UF4); - //MaterialGenerator.generateNuclearMaterial(NUCLIDE.Li2BeF4, false); - - //Generate some Alloys - - //Misc Alloys - MaterialGenerator.generate(ALLOY.ENERGYCRYSTAL); - MaterialGenerator.generate(ALLOY.BLOODSTEEL); - - MaterialGenerator.generate(ALLOY.ZERON_100); - //Tumbaga was the name given by Spaniards to a non-specific alloy of gold and copper - MaterialGenerator.generate(ALLOY.TUMBAGA); - //Potin is traditionally an alloy of bronze, tin and lead, with varying quantities of each possible - MaterialGenerator.generate(ALLOY.POTIN); - - //Staballoy & Tantalloy - MaterialGenerator.generate(ALLOY.STABALLOY); - MaterialGenerator.generate(ALLOY.TANTALLOY_60); - MaterialGenerator.generate(ALLOY.TANTALLOY_61); - - //Inconel - MaterialGenerator.generate(ALLOY.INCONEL_625); - MaterialGenerator.generate(ALLOY.INCONEL_690); - MaterialGenerator.generate(ALLOY.INCONEL_792); - - - //Steels - MaterialGenerator.generateDusts(ALLOY.EGLIN_STEEL_BASE); - MaterialGenerator.generate(ALLOY.EGLIN_STEEL); - MaterialGenerator.generate(ALLOY.MARAGING250); - MaterialGenerator.generate(ALLOY.MARAGING300); - MaterialGenerator.generate(ALLOY.MARAGING350); - MaterialGenerator.generate(ALLOY.AQUATIC_STEEL); - - MaterialGenerator.generate(ALLOY.NITINOL_60,true,false); - - //Composite Alloys - MaterialGenerator.generate(ALLOY.STELLITE); - MaterialGenerator.generate(ALLOY.TALONITE); - - //Hastelloy - MaterialGenerator.generate(ALLOY.HASTELLOY_W); - MaterialGenerator.generate(ALLOY.HASTELLOY_X); - MaterialGenerator.generate(ALLOY.HASTELLOY_C276); - MaterialGenerator.generate(ALLOY.HASTELLOY_N); - - //Incoloy - MaterialGenerator.generate(ALLOY.INCOLOY_020); - MaterialGenerator.generate(ALLOY.INCOLOY_DS); - MaterialGenerator.generate(ALLOY.INCOLOY_MA956); - - //Leagrisium - MaterialGenerator.generate(ALLOY.LEAGRISIUM); - - //Super Conductor - MaterialGenerator.generate(ALLOY.HG1223, false, false); - - //Generate Fictional Materials - if (!CORE.GTNH) { - MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM, false); - MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM_REFINED, false); - } - MaterialGenerator.generate(ALLOY.TRINIUM_TITANIUM); - MaterialGenerator.generate(ALLOY.TRINIUM_NAQUADAH, false); - MaterialGenerator.generate(ALLOY.TRINIUM_NAQUADAH_CARBON); - MaterialGenerator.generate(ALLOY.TRINIUM_REINFORCED_STEEL); - - //Top Tier Alloys - MaterialGenerator.generate(ALLOY.HELICOPTER); - MaterialGenerator.generate(ALLOY.LAFIUM); - MaterialGenerator.generate(ALLOY.CINOBITE); - MaterialGenerator.generate(ALLOY.PIKYONIUM); - MaterialGenerator.generate(ALLOY.ABYSSAL); - MaterialGenerator.generate(ALLOY.LAURENIUM); - MaterialGenerator.generate(ALLOY.BOTMIUM); - MaterialGenerator.generate(ALLOY.HS188A); - - - MaterialGenerator.generate(ALLOY.TITANSTEEL); - MaterialGenerator.generate(ALLOY.ARCANITE); - MaterialGenerator.generate(ALLOY.OCTIRON); - - MaterialGenerator.generate(ALLOY.BABBIT_ALLOY, false); - MaterialGenerator.generate(ALLOY.BLACK_TITANIUM, false); - - // High Level Bioplastic - MaterialGenerator.generate(ELEMENT.STANDALONE.RHUGNOR, false, false); - - - - - - - - - //Must be the final Alloy to Generate - MaterialGenerator.generate(ALLOY.QUANTUM); - - //Ores - MaterialGenerator.generateOreMaterial(FLUORIDES.FLUORITE); - MaterialGenerator.generateOreMaterial(ALLOY.KOBOLDITE); - GTplusplus_Everglades.GenerateOreMaterials(); - - - } catch (final Throwable r){ - Logger.INFO("Failed to Generated a Material. "+r.getMessage()); - //Utils.LOG_INFO("Failed to Generated a Material. "+r.getCause().getMessage()); - //Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[0].getMethodName()); - //Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[1].getMethodName()); - r.printStackTrace(); - //System.exit(1); - } - - //TC Style Shards, for use in making energy crystal mix. - //A dull shard, able to be infused with an element. - shardDull = new BaseItemTCShard("Drained", Utils.rgbtoHexValue(75, 75, 75), "Can be infused to create a magical shard.", "Obtained from Mining Stone/SandStone, Chopping Logs or Shovelling Dirt."); - - //Generates four elemental shards when TC is not installed. - if (!LoadedMods.Thaumcraft){ - shardAer = new BaseItemTCShard("Aer", Utils.rgbtoHexValue(225, 225, 5)); - shardIgnis = new BaseItemTCShard("Ignis", Utils.rgbtoHexValue(255, 5, 5)); - shardTerra = new BaseItemTCShard("Terra", Utils.rgbtoHexValue(5, 255, 5)); - shardAqua = new BaseItemTCShard("Aqua", Utils.rgbtoHexValue(5, 5, 255)); - } - else { - shardAer = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Air Shard", 0, 1).getItem(); - shardIgnis = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Fire Shard", 1, 1).getItem(); - shardAqua = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Warer Shard", 2, 1).getItem(); - shardTerra = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Earth Shard", 3, 1).getItem(); - } - //Generates a set of four special dusts to be used in my recipes. - dustAer = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().AER, true)[0]; - dustIgnis = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().IGNIS, true)[0]; - dustTerra = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().TERRA, true)[0]; - dustAqua = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().AQUA, true)[0]; - - //Nuclear Fuel Dusts - dustLithiumCarbonate = ItemUtils.generateSpecialUseDusts("LithiumCarbonate", "Lithium Carbonate", "Li2CO3", Utils.rgbtoHexValue(240, 240, 240))[0]; //https://en.wikipedia.org/wiki/Lithium_carbonate - dustLithiumPeroxide = ItemUtils.generateSpecialUseDusts("LithiumPeroxide", "Lithium Peroxide", "Li2O2", Utils.rgbtoHexValue(250, 250, 250))[0]; //https://en.wikipedia.org/wiki/Lithium_peroxide - dustLithiumHydroxide = ItemUtils.generateSpecialUseDusts("LithiumHydroxide", "Lithium Hydroxide", "LiOH", Utils.rgbtoHexValue(250, 250, 250))[0]; //https://en.wikipedia.org/wiki/Lithium_hydroxide - - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1)) && !LoadedMods.IHL){ - dustQuicklime = ItemUtils.generateSpecialUseDusts("Quicklime", "Quicklime", "CaO", Utils.rgbtoHexValue(255, 255, 175))[0]; //https://en.wikipedia.org/wiki/Calcium_oxide - } - dustCalciumHydroxide = ItemUtils.generateSpecialUseDusts("CalciumHydroxide", "Hydrated Lime", "Ca(OH)2", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_hydroxide - dustCalciumCarbonate = ItemUtils.generateSpecialUseDusts("CalciumCarbonate", "Calcium Carbonate", "CaCO3", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_carbonate - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGypsum", 1) == null) || (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustCalciumSulfate", 1) == null)){ - dustCalciumSulfate = ItemUtils.generateSpecialUseDusts("Gypsum", "Calcium Sulfate (Gypsum)", "CaSO4", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_sulfate - GT_OreDictUnificator.registerOre("dustCalciumSulfate", ItemUtils.getSimpleStack(dustCalciumSulfate)); - } - else { - GT_OreDictUnificator.registerOre("dustCalciumSulfate", ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGypsum", 1)); - } - dustLi2CO3CaOH2 = ItemUtils.generateSpecialUseDusts("Li2CO3CaOH2", "Li2CO3 + Ca(OH)2 Compound", "Li2CO3CaOH2", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_carbonate - MaterialUtils.generateSpecialDustAndAssignToAMaterial(FLUORIDES.SODIUM_FLUORIDE, false); - //FLiBe Fuel Compounds - dustLi2BeF4 = ItemUtils.generateSpecialUseDusts("Li2BeF4", "Lithium Tetrafluoroberyllate Fuel Compound", "Li2BeF4", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/FLiBe - Material.registerComponentForMaterial(NUCLIDE.Li2BeF4, OrePrefixes.dust, ItemUtils.getSimpleStack(dustLi2BeF4)); - //fluidFLiBeSalt = ("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}, 0); - //fluidFLiBeSalt = FluidUtils.addGTFluidNoPrefix("Li2BeF4", "Lithium Tetrafluoroberyllate", new short[]{255, 255, 255, 100}, 0, 743, null, CI.emptyCells(1), 1000, true); - //fluidFLiBeSaltBurnt = FluidUtils.addGTFluidNoPrefix("Li2BeF2UF4", "Li2BeF2UF4", new short[]{50, 255, 50, 100}, 0, 743, null, CI.emptyCells(1), 1000, true); - - // LFTR Core Fluid Processing - //fluidLftrCore1 = FluidUtils.addGTFluidNoPrefix("LiBeF2UF4FP", "LiBeF2UF4FP", new short[]{110, 255, 110, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); - //fluidLftrCore2 = FluidUtils.addGTFluidNoPrefix("UF6F2FP", "UF6F2FP", new short[]{150, 255, 150, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); - //fluidLftrCore3 = FluidUtils.addGTFluidNoPrefix("LiFBeF2", "LiFBeF2", new short[]{100, 255, 50, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); - //fluidLftrCore4 = FluidUtils.addGTFluidNoPrefix("LiFBeF2UF4", "LiFBeF2UF4", new short[]{50, 255, 100, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); - // LFTR Blanket Fluid Processing - //fluidLftrBlanket1 = FluidUtils.addGTFluidNoPrefix("LiFThF4", "LiFThF4", new short[]{50, 150, 255, 50}, 0, 500, null, CI.emptyCells(1), 1000, true); - //fluidLftrBlanket2 = FluidUtils.addGTFluidNoPrefix("LiFBeF2ThF4", "LiFBeF2ThF4", new short[]{100, 150, 100, 100}, 0, 500, null, CI.emptyCells(1), 1000, true); - //fluidLftrBlanket3 = FluidUtils.addGTFluidNoPrefix("UF6F2", "UF6F2", new short[]{10, 150, 10, 100}, 0, 500, null, CI.emptyCells(1), 1000, true); - fluidNuclearWaste = FluidUtils.addGTFluidNoPrefix("nuclear.waste", "Nuclear Waste", new short[]{10, 250, 10, 100}, 0, 1000, null, CI.emptyCells(1), 1000, true); - - - //LFTR Control Circuit - itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Control Circuit", AddToCreativeTab.tabMisc, 1, 0, new String[] {"Keeps Multiblocks Stable"}, EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null); - - if (CORE.ConfigSwitches.enableMachine_Pollution) { - itemBasicTurbine = new ItemBasicScrubberTurbine(); - } - - //Zirconium - //Cinter Pellet. - itemZirconiumChlorideCinterPellet = new CoreItem("itemZirconiumPellet", "Zirconium Pellet ["+StringUtils.subscript("ZrCl4")+"]", tabMisc).setTextureName(CORE.MODID + ":itemShard"); - GT_OreDictUnificator.registerOre("pelletZirconium", new ItemStack(itemZirconiumChlorideCinterPellet)); - //Zirconium Chloride - dustZrCl4 = ItemUtils.generateSpecialUseDusts("ZrCl4", "ZrCl4", "ZrCl4", Utils.rgbtoHexValue(180, 180, 180))[0]; //http://www.iaea.org/inis/collection/NCLCollectionStore/_Public/39/036/39036750.pdf - dustCookedZrCl4 = ItemUtils.generateSpecialUseDusts("CookedZrCl4", "Cooked ZrCl4", "ZrCl4", Utils.rgbtoHexValue(180, 180, 180))[0]; //http://www.iaea.org/inis/collection/NCLCollectionStore/_Public/39/036/39036750.pdf - - //Zirconium Tetrafluoride - /*GT_OreDictUnificator.registerOre("cellZrF4", ItemUtils.getItemStackOfAmountFromOreDict("cellZirconiumTetrafluoride", 1)); - GT_OreDictUnificator.registerOre("dustZrF4", ItemUtils.getItemStackOfAmountFromOreDict("dustZirconiumTetrafluoride", 1));*/ - //GT_OreDictUnificator.registerOre("cellZrF4", ItemUtils.getItemStackOfAmountFromOreDict("cellZirconiumTetrafluoride", 1)); - //GT_OreDictUnificator.registerOre("dustZrF4", ItemUtils.getItemStackOfAmountFromOreDict("dustZirconiumTetrafluoride", 1)); - fluidZrF4 = FluidUtils.generateFluidNoPrefix("ZirconiumTetrafluoride", "Zirconium Tetrafluoride", 500, new short[]{170, 170, 140, 100}); //https://en.wikipedia.org/wiki/Zirconium_tetrafluoride - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.setFluid(fluidZrF4); - - //Coolant Salt - //NaBF4 - NaF - 621C - //dustNaBF4NaF = ItemUtils.generateSpecialUseDusts("NaBF4NaF", "NaBF4NaF", Utils.rgbtoHexValue(45, 45, 90))[0]; //https://en.wikipedia.org/wiki/Zirconium_tetrafluoride - - - //Load Tree Farmer - if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ //https://en.wikipedia.org/wiki/UAN - dustFertUN18 = ItemUtils.generateSpecialUseDusts("UN18Fertiliser", "UN-18 Fertiliser", Utils.rgbtoHexValue(60, 155, 60))[0]; - dustFertUN32 = ItemUtils.generateSpecialUseDusts("UN32Fertiliser", "UN-32 Fertiliser", Utils.rgbtoHexValue(55, 190, 55))[0]; - - ItemStack temp1 = null; - ItemStack temp2 = null; - - if (LoadedMods.IndustrialCraft2){ - temp1 = ItemUtils.getCorrectStacktype("IC2:itemFertilizer", 1); - } - if (LoadedMods.Forestry){ - temp2 = ItemUtils.getCorrectStacktype("Forestry:fertilizerCompound", 1); - } - if (temp1 != null){ - FluidUtils.generateFluidNonMolten("Fertiliser", "Fertiliser", 32, new short[]{45, 170, 45, 100}, temp1, temp2, true); - } - FluidUtils.generateFluidNonMolten("UN32Fertiliser", "UN-32 Fertiliser", 24, new short[]{55, 190, 55, 100}, null, null, true); - FluidUtils.generateFluidNonMolten("UN18Fertiliser", "UN-18 Fertiliser", 22, new short[]{60, 155, 60, 100}, null, null, true); - - /*GT_Values.RA.addMixerRecipe( - arg0, //Item In - arg1, - arg2, - arg3, - arg4, //Fluid in - arg5, //Fluid Out - arg6, //Item out - arg7, //Eu - arg8); //Time - */ - - } - - //Juice - FluidUtils.generateFluidNonMolten("RaisinJuice", "Raisin Juice", 2, new short[]{51, 0, 51, 100}, ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foodRaisins", 1), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("fruitRaisins", 1), 50, true); - - - //Test items - metaItem2 = new BaseEuItem(); - metaItem2.registerItem(0, EnumChatFormatting.BLACK+"Test Item 0", 0, 0, "I am 0."); - metaItem2.registerItem(1, EnumChatFormatting.GREEN+"Test Item 1", 1006346000, 1, "I Hold EU 1.", 500); - metaItem2.registerItem(2, EnumChatFormatting.GOLD+"Test Item 2", 1004630000, 2, "I Hold EU 2.", 8000); - metaItem2.registerItem(3, "Test Item 3", 1000765000, 4, "I Hold EU 3.", 32000); - metaItem2.registerItem(4, "Whirlygig", 1043644000, (short) 5, "Spin me right round.", EnumRarity.rare, EnumChatFormatting.DARK_GREEN, true); - metaItem2.registerItem(5, "Whirlygig 2", 2124867000, (short) 7, "Spin me right round.", EnumRarity.uncommon, EnumChatFormatting.RED, true); - - toolGregtechPump = new GregtechPump(); - toolGregtechPump.registerPumpType(0, "Simple Hand Pump", 0, 0); - toolGregtechPump.registerPumpType(1, "Advanced Hand Pump", 32000, 1); - toolGregtechPump.registerPumpType(2, "Super Hand Pump", 128000, 2); - toolGregtechPump.registerPumpType(3, "Ultimate Hand Pump", 512000, 3); - - //Create Multi-tools - //ItemsMultiTools.load(); - - //Xp Fluids - Dev - if (!FluidRegistry.isFluidRegistered("mobessence")){ - FluidUtils.generateFluidNoPrefix("mobessence", "mobessence", 0, new short[]{125, 175, 125, 100}); - } - if (!FluidRegistry.isFluidRegistered("xpjuice")){ - FluidUtils.generateFluidNoPrefix("xpjuice", "xpjuice", 0, new short[]{50, 150, 50, 100}); - } - - //Just an unusual plate needed for some black magic. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateClay", 1) == null){ - itemPlateClay = new BaseItemPlate(NONMATERIAL.CLAY); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){ - itemDoublePlateClay = new BaseItemPlateDouble(NONMATERIAL.CLAY); - } - - //Need this for Mutagenic Frames - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){ - itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235); - } - - //A small gear needed for wizardry. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){ - itemSmallWroughtIronGear = new BaseItemSmallGear(NONMATERIAL.WROUGHT_IRON); - } - //Krypton Processing - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1) == null){ - itemHotTitaniumIngot = ItemUtils.getSimpleStack(new BaseItemIngot(ELEMENT.getInstance().TITANIUM, ComponentTypes.HOTINGOT)); - } - else { - itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1); - } - - //Need this for Laurenium - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIndium", 1) == null){ - itemDustIndium = new BaseItemDust(ELEMENT.getInstance().INDIUM); - } - - //Industrial Diamonds - itemExquisiteIndustrialDiamond = new CoreItem("IndustrialDiamondExquisite", "High Quality Industrial Diamond", tabMisc); - ItemStack tempStack = itemExquisiteIndustrialDiamond.getStack(); - ItemUtils.addItemToOreDictionary(tempStack, "gemDiamond"); - ItemUtils.addItemToOreDictionary(tempStack, "craftingIndustrialDiamond"); - ItemUtils.addItemToOreDictionary(tempStack, "gemExquisiteDiamond"); - ItemUtils.addItemToOreDictionary(tempStack, "craftingExquisiteIndustrialDiamond"); - - //Custom GT++ Crafting Components - - //Springs - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL); - - //Small Springs - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM); - - //Fine Wire - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM); - - //Dense Plates - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE); - - - - - //Special Sillyness - if (true) { - - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateSodium", 1) == null){ - new BaseItemPlate(ELEMENT.getInstance().SODIUM); - } - - Material meatRaw = NONMATERIAL.MEAT; - // A plate of Meat. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateMeatRaw", 1) == null){ - itemPlateRawMeat = new BaseItemPlate(meatRaw); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(itemPlateRawMeat), 100); - } - // A Block of Meat. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("blockMeatRaw", 1) == null){ - blockRawMeat = new BlockBaseModular(meatRaw, BlockTypes.STANDARD); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(blockRawMeat), 900); - } - } - - - // A plate of Vanadium. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){ - itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM); - } - - //A plate of Lithium. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){ - itemPlateLithium = new BaseItemPlate(ELEMENT.getInstance().LITHIUM); - } - - //A plate of Europium. - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ - itemPlateEuropium = new BaseItemPlate(ELEMENT.getInstance().EUROPIUM); - } - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ - itemDoublePlateEuropium = new BaseItemPlateDouble(ELEMENT.getInstance().EUROPIUM); - } - - //Tumbaga Mix (For Simple Crafting) - dustTumbagaMix = ItemUtils.generateSpecialUseDusts("MixTumbaga", "Tumbaga Mix", "Au2Cu", Utils.rgbtoHexValue(255, 150, 80))[0]; - - /* - * Decayable Materials - */ - - dustNeptunium238 = new DustDecayable("dustNeptunium238", Utils.rgbtoHexValue(175, 240, 75), 50640, new String[] {""+StringUtils.superscript("238Np"), "Result: Plutonium 238 ("+StringUtils.superscript("238Pu")+")"}, ELEMENT.getInstance().PLUTONIUM238.getDust(1).getItem(), 5); - dustDecayedRadium226 = ItemUtils.generateSpecialUseDusts("DecayedRadium226", "Decayed Radium-226", "Contains Radon ("+StringUtils.superscript("222Rn")+")", ELEMENT.getInstance().RADIUM.getRgbAsHex())[0]; - dustRadium226 = new DustDecayable("dustRadium226", ELEMENT.getInstance().RADIUM.getRgbAsHex(), 90000, new String[] {""+StringUtils.superscript("226Ra"), "Result: Radon ("+StringUtils.superscript("222Rn")+")"}, ItemUtils.getSimpleStack(dustDecayedRadium226).getItem(), 5); - dustProtactinium233 = new DustDecayable("dustProtactinium233", ELEMENT.getInstance().PROTACTINIUM.getRgbAsHex(), 32000, new String[] {""+StringUtils.superscript("233Pa"), "Result: Uranium 233("+StringUtils.superscript("233U")+")"}, ELEMENT.getInstance().URANIUM233.getDust(1).getItem(), 6); - dustTechnetium99 = new DustDecayable("dustTechnetium99", ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(), 164500, new String[] {""+StringUtils.superscript("99Mo"), "Result: Ruthenium 99("+StringUtils.superscript("99Ru")+")"}, ELEMENT.getInstance().RUTHENIUM.getDust(1).getItem(), 4); - dustTechnetium99M = new DustDecayable("dustTechnetium99M", ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(), 8570, new String[] {""+StringUtils.superscript("99áµTc"), "Result: Technicium 99 ("+StringUtils.superscript("99Tc")+")"}, dustTechnetium99, 4); - dustMolybdenum99 = new DustDecayable("dustMolybdenum99", ELEMENT.getInstance().MOLYBDENUM.getRgbAsHex(), 16450, new String[] {""+StringUtils.superscript("99Mo"), "Result: Technicium 99áµ ("+StringUtils.superscript("99áµTc")+")"}, dustTechnetium99M, 4); - - itemIonParticleBase = new IonParticles(); - itemStandarParticleBase = new StandardBaseParticles(); - - if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { - Item a8kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_8k", "Large Volumetric Flask", 8000); - Item a64kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_32k", "Gigantic Volumetric Flask", 32000); - GregtechItemList.VOLUMETRIC_FLASK_8k.set(a8kFlask); - GregtechItemList.VOLUMETRIC_FLASK_32k.set(a64kFlask); - } - - itemBoilerChassis = new ItemBoilerChassis(); - itemDehydratorCoilWire = new ItemDehydratorCoilWire(); - itemDehydratorCoil = new ItemDehydratorCoil(); - - itemAirFilter = new ItemAirFilter(); - itemLavaFilter = new ItemLavaFilter(); - - itemGrindleTablet = new BaseItemGrindle(); - itemDragonJar = new ItemEntityCatcher(); - - itemControlCore = new ItemControlCore(); - - //Chemistry - new CoalTar(); - new RocketFuels(); - - //Nuclear Processing - new NuclearChem(); - - //Farm Animal Fun - new AgriculturalChem(); - - //General Chemistry - new GenericChem(); - - // Milled Ore Processing - new MilledOreProcessing(); - - //Bombs - itemBombCasing = new CoreItem("itemBombCasing", "Bomb Casing", tabMisc); - itemBombCasing.setTextureName(CORE.MODID + ":bomb_casing"); - itemBombUnf = new CoreItem("itemBombUnf", "Bomb (unf)", tabMisc); - itemBombUnf.setTextureName(CORE.MODID + ":bomb_casing"); - itemDetCable = new CoreItem("itemDetCable", "Det. Cable", tabMisc); - itemDetCable.setTextureName("string"); - itemBomb = new ItemThrowableBomb(); - - //Only used for debugging. - /*if (CORE.DEVENV) { - new ConnectedBlockFinder(); - }*/ - - //Misc Items - @SuppressWarnings("unused") - Item tI; - tI = new BaseItemMisc("Chilly", new short[]{0,64,196}, 32, MiscTypes.POTION, new String[]{"It's Blue"}); - tI = new BaseItemMisc("4000DC's", new short[]{180,100,30}, 1, MiscTypes.BIGKEY, new String[]{"It opens things."}); - tI = new BaseItemMisc("Dull", new short[]{64,64,64}, 64, MiscTypes.GEM, null); - tI = new BaseItemMisc("Forest", new short[]{130,164,96}, 64, MiscTypes.MUSHROOM, new String[]{"You Found this on the ground.", "Definitely not sure if it's worth eating."}); - - //Baubles - if (LoadedMods.Baubles){ - tI = new HealthBoostBauble(); - itemModularBauble = new ModularBauble(); - } - - //EnderIO Resources - if ((LoadedMods.EnderIO || LOAD_ALL_CONTENT)){ - Logger.INFO("EnderIO Found - Loading Resources."); - //Enderio Dusts - itemDustSoularium = ItemUtils.generateSpecialUseDusts("Soularium", "Soularium", MaterialEIO.SOULARIUM.vChemicalFormula, MaterialEIO.SOULARIUM.getRgbAsHex())[0]; - itemDustRedstoneAlloy = ItemUtils.generateSpecialUseDusts("RedstoneAlloy", "Redstone Alloy", MaterialEIO.REDSTONE_ALLOY.vChemicalFormula, MaterialEIO.REDSTONE_ALLOY.getRgbAsHex())[0]; - itemDustElectricalSteel = ItemUtils.generateSpecialUseDusts("ElectricalSteel", "Electrical Steel", MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula, MaterialEIO.ELECTRICAL_STEEL.getRgbAsHex())[0]; - itemDustPulsatingIron = ItemUtils.generateSpecialUseDusts("PulsatingIron", "Pulsating Iron", MaterialEIO.PULSATING_IRON.vChemicalFormula, MaterialEIO.PULSATING_IRON.getRgbAsHex())[0]; - itemDustEnergeticAlloy = ItemUtils.generateSpecialUseDusts("EnergeticAlloy", "Energetic Alloy", MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula, MaterialEIO.ENERGETIC_ALLOY.getRgbAsHex())[0]; - itemDustVibrantAlloy = ItemUtils.generateSpecialUseDusts("VibrantAlloy", "Vibrant Alloy", MaterialEIO.VIBRANT_ALLOY.vChemicalFormula, MaterialEIO.VIBRANT_ALLOY.getRgbAsHex())[0]; - itemDustConductiveIron = ItemUtils.generateSpecialUseDusts("ConductiveIron", "Conductive Iron", MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula, MaterialEIO.CONDUCTIVE_IRON.getRgbAsHex())[0]; - - //EnderIO Plates - itemPlateSoularium = ItemUtils.generateSpecialUsePlate("Soularium", "Soularium", MaterialEIO.SOULARIUM.vChemicalFormula, MaterialEIO.SOULARIUM.getRgbAsHex(), 0); - itemPlateRedstoneAlloy = ItemUtils.generateSpecialUsePlate("RedstoneAlloy", "Redstone Alloy", MaterialEIO.REDSTONE_ALLOY.vChemicalFormula, MaterialEIO.REDSTONE_ALLOY.getRgbAsHex(), 0); - itemPlateElectricalSteel = ItemUtils.generateSpecialUsePlate("ElectricalSteel", "Electrical Steel", MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula, MaterialEIO.ELECTRICAL_STEEL.getRgbAsHex(), 0); - itemPlatePulsatingIron = ItemUtils.generateSpecialUsePlate("PhasedIron", "Phased Iron", MaterialEIO.PULSATING_IRON.vChemicalFormula, MaterialEIO.PULSATING_IRON.getRgbAsHex(), 0); - itemPlateEnergeticAlloy = ItemUtils.generateSpecialUsePlate("EnergeticAlloy", "Energetic Alloy", MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula, MaterialEIO.ENERGETIC_ALLOY.getRgbAsHex(), 0); - itemPlateVibrantAlloy = ItemUtils.generateSpecialUsePlate("VibrantAlloy", "Vibrant Alloy", MaterialEIO.VIBRANT_ALLOY.vChemicalFormula, MaterialEIO.VIBRANT_ALLOY.getRgbAsHex(), 0); - itemPlateConductiveIron = ItemUtils.generateSpecialUsePlate("ConductiveIron", "Conductive Iron", MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula, MaterialEIO.CONDUCTIVE_IRON.getRgbAsHex(), 0); - - //Register dumb naming conventions - Who chose fucking phased Iron/Gold? - GT_OreDictUnificator.registerOre("dustPhasedGold", ItemUtils.getSimpleStack(itemDustVibrantAlloy)); - GT_OreDictUnificator.registerOre("platePhasedGold", ItemUtils.getSimpleStack(itemPlateVibrantAlloy)); - GT_OreDictUnificator.registerOre("dustPhasedIron", ItemUtils.getSimpleStack(itemDustPulsatingIron)); - GT_OreDictUnificator.registerOre("platePhasedIron", ItemUtils.getSimpleStack(itemPlatePulsatingIron)); - GT_OreDictUnificator.registerOre("blockVibrantAlloy", ItemUtils.getItemStackOfAmountFromOreDict("blockPhasedGold", 1)); - - CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getPlate(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(144), 16, 4*9); - CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getIngot(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(144), 16, 4*9); - CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getNugget(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(16), 16, 4); - CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getBlock(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(1294), 16, 4*9*9); - - } - else { - /*Logger.WARNING("EnderIO not Found - Generating our own Resources."); - MaterialGenerator.generate(MaterialEIO.CONDUCTIVE_IRON); - MaterialGenerator.generate(MaterialEIO.PULSATING_IRON); - MaterialGenerator.generate(MaterialEIO.REDSTONE_ALLOY); - MaterialGenerator.generate(MaterialEIO.SOULARIUM); - MaterialGenerator.generate(MaterialEIO.ELECTRICAL_STEEL); - MaterialGenerator.generate(MaterialEIO.ENERGETIC_ALLOY); - MaterialGenerator.generate(MaterialEIO.VIBRANT_ALLOY); */ - } - - //Big Reactors - if (LoadedMods.Big_Reactors|| LOAD_ALL_CONTENT){ - Logger.INFO("BigReactors Found - Loading Resources."); - //Item Init - itemPlateBlutonium = ItemUtils.generateSpecialUsePlate("Blutonium", "Blutonium", new short[]{0, 0, 255}, 0); - itemPlateCyanite = ItemUtils.generateSpecialUsePlate("Cyanite", "Cyanite", new short[]{0, 191, 255}, 0); - itemPlateLudicrite = ItemUtils.generateSpecialUsePlate("Ludicrite", "Ludicrite", new short[]{167, 5, 179}, 0); - } - else { - Logger.WARNING("BigReactors not Found - Skipping Resources."); - } - - //Thaumcraft - if ((LoadedMods.Thaumcraft|| LOAD_ALL_CONTENT) && !CORE.GTNH){ - Logger.INFO("Thaumcraft Found - Loading Resources."); - //Item Init - try { - ItemUtils.getItemForOreDict("Thaumcraft:ItemResource", "ingotVoidMetal", "Void Metal Ingot", 16); - itemPlateVoidMetal = ItemUtils.generateSpecialUsePlate("Void", "Void", new short[]{82, 17, 82}, 0); - GT_OreDictUnificator.registerOre("plateVoidMetal", new ItemStack(ModItems.itemPlateVoidMetal)); - } catch (final NullPointerException e){} - - } - else { - Logger.WARNING("Thaumcraft not Found - Skipping Resources."); - } - - //Pneumaticraft - if (LoadedMods.PneumaticCraft|| LOAD_ALL_CONTENT){ - Logger.INFO("PneumaticCraft Found - Loading Resources."); - //Item Init - itemPlateCompressedIron = ItemUtils.generateSpecialUsePlate("CompressedIron", "Compressed Iron", new short[]{128, 128, 128}, 0); - } - else { - Logger.WARNING("PneumaticCraft not Found - Skipping Resources."); - } - - //Simply Jetpacks - if (LoadedMods.Simply_Jetpacks|| LOAD_ALL_CONTENT){ - Logger.INFO("SimplyJetpacks Found - Loading Resources."); - //Item Init - itemPlateEnrichedSoularium = new RarityUncommon().setUnlocalizedName("itemPlateEnrichedSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium"); - //Registry - GameRegistry.registerItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium"); - } - else { - Logger.WARNING("SimplyJetpacks not Found - Skipping Resources."); - } - - //rfTools - if (LoadedMods.RFTools|| LOAD_ALL_CONTENT){ - Logger.INFO("rfTools Found - Loading Resources."); - //Item Init - itemPlateDimensionShard = ItemUtils.generateSpecialUsePlate("DimensionShard", "Dimensional Shard", new short[]{170, 230, 230}, 0); - } - else { - Logger.WARNING("rfTools not Found - Skipping Resources."); - } - - //IC2 Exp - if (LoadedMods.IndustrialCraft2|| LOAD_ALL_CONTENT){ - Logger.INFO("IndustrialCraft2 Found - Loading Resources."); - - //Baubles Mod Test - try { - final Class baublesTest = ReflectionUtils.getClass("baubles.api.IBauble"); - if (baublesTest != null){ - COMPAT_Baubles.run(); - } - else { - Logger.INFO("Baubles Not Found - Skipping Resources."); - } - } catch(final Throwable T){ - Logger.INFO("Baubles Not Found - Skipping Resources."); - } - } - else { - Logger.WARNING("IndustrialCraft2 not Found - Skipping Resources."); - } - - - //Special Item Handling Case - if (ConfigSwitches.enableAlternativeBatteryAlloy) { - //ModItems.itemIngotBatteryAlloy = new BaseItemIngot("itemIngotBatteryAlloy", "Battery Alloy", new short[]{35, 228, 141}, 0); TODO - ModItems.itemPlateBatteryAlloy = ItemUtils.generateSpecialUsePlate("BatteryAlloy", "Battery Alloy", new short[]{35, 228, 141}, 0); - - } - - - //UtilsItems.generateSpawnEgg("ic2", "boatcarbon", Utils.generateSingularRandomHexValue(), Utils.generateSingularRandomHexValue()); - - HANDLER_COFH.initItems(); - - /* - * Misc Items - */ - - //Staballoy Equipment - itemStaballoyPickaxe = new StaballoyPickaxe("itemStaballoyPickaxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools); - GameRegistry.registerItem(itemStaballoyPickaxe, itemStaballoyPickaxe.getUnlocalizedName()); - itemStaballoyAxe = new StaballoyAxe("itemStaballoyAxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools); - GameRegistry.registerItem(itemStaballoyAxe, itemStaballoyAxe.getUnlocalizedName()); - - //Sandstone Hammer - itemSandstoneHammer = new SandstoneHammer("itemSandstoneHammer").setCreativeTab(AddToCreativeTab.tabTools); - GameRegistry.registerItem(itemSandstoneHammer, itemSandstoneHammer.getUnlocalizedName()); - - //Buffer Cores! - Item itemBufferCore; - for(int i=1; i<=10; i++){ - //Utils.LOG_INFO(""+i); - itemBufferCore = new BufferCore("itemBufferCore", i).setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerItem(itemBufferCore, itemBufferCore.getUnlocalizedName()); - //System.out.println("Buffer Core registration count is: "+i); - } - - itemPLACEHOLDER_Circuit = new Item().setUnlocalizedName("itemPLACEHOLDER_Circuit").setTextureName(CORE.MODID + ":itemPLACEHOLDER_Circuit"); - GameRegistry.registerItem(itemPLACEHOLDER_Circuit, "itemPLACEHOLDER_Circuit"); - - //ItemBlockGtFrameBox = new ItemBlockGtFrameBox(ModBlocks.blockGtFrameSet1); - //GameRegistry.registerItem(ItemBlockGtFrameBox, "itemGtFrameBoxSet1"); - - itemCustomBook = new ItemBaseBook(); - registerCustomTokens(); - } - - public static void registerCustomTokens() { - itemGenericToken.register(0, "BitCoin", 16, "Can be used on the dark web"); - itemGenericToken.register(1, "Hand Pump Trade Token I", 1, "Craft into a Tier I Hand pump"); - itemGenericToken.register(2, "Hand Pump Trade Token II", 1, "Craft into a Tier II Hand pump"); - itemGenericToken.register(3, "Hand Pump Trade Token III", 1, "Craft into a Tier III Hand pump"); - itemGenericToken.register(4, "Hand Pump Trade Token IV", 1, "Craft into a Tier IV Hand pump"); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/BaseEuItem.java b/src/Java/gtPlusPlus/core/item/base/BaseEuItem.java deleted file mode 100644 index b4988136c0..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseEuItem.java +++ /dev/null @@ -1,582 +0,0 @@ -package gtPlusPlus.core.item.base; - -import static gregtech.api.enums.GT_Values.*; - -import java.util.*; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.SubTag; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.IItemBehaviour; -import gregtech.api.interfaces.IItemContainer; -import gregtech.api.objects.ItemData; -import gregtech.api.util.*; - -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import ic2.api.item.*; - -public class BaseEuItem extends Item implements ISpecialElectricItem, IElectricItemManager { - - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - private final HashMap>> mItemBehaviors = new HashMap<>(); - public final short mOffset, mItemAmount; - public final BitSet mEnabledItems; - public final BitSet mVisibleItems; - public final IIcon[][] mIconList; - /** The unlocalized name of this item. */ - private String unlocalizedName; - - private final ArrayList> rarity = new ArrayList<>(); - private final ArrayList> descColour = new ArrayList<>(); - private final ArrayList> itemName = new ArrayList<>(); - private final ArrayList> itemDescription = new ArrayList<>(); - private final ArrayList> hasEffect = new ArrayList<>(); - - public final HashMap mElectricStats = new HashMap<>(); - public final HashMap mBurnValues = new HashMap<>(); - - public BaseEuItem() { - this("MU-metaitem.02", AddToCreativeTab.tabOther, (short) 1000, (short) 31766); - } - - public BaseEuItem(final String unlocalizedName, final CreativeTabs creativeTab, final short aOffset, final short aItemAmount) { - this.mEnabledItems = new BitSet(aItemAmount); - this.mVisibleItems = new BitSet(aItemAmount); - this.mOffset = (short) Math.min(32766, aOffset); - this.mItemAmount = (short) Math.min(aItemAmount, 32766 - this.mOffset); - this.mIconList = new IIcon[aItemAmount][1]; - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(1); - GameRegistry.registerItem(this, unlocalizedName); - } - - - public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, final String description) { - this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, EnumChatFormatting.GRAY, false); - } - - public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, final String description, final int burnTime) { - this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, EnumChatFormatting.GRAY, false); - this.setBurnValue(id, burnTime); - } - - - public void registerItem(final int id, final String localizedName, final long euStorage, final short tier, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect) { - this.addItem(id, localizedName, EnumChatFormatting.YELLOW+"Electric", new Object[]{}); - this.setElectricStats(this.mOffset + id, euStorage, GT_Values.V[tier], tier, -3L, true); - this.rarity.add(new Pair<>(id, regRarity)); - this.itemName.add(new Pair<>(id, localizedName)); - this.itemDescription.add(new Pair<>(id, description)); - this.descColour.add(new Pair<>(id, colour)); - this.hasEffect.add(new Pair<>(id, Effect)); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - if (this.rarity.get(par1ItemStack.getItemDamage()-this.mOffset) != null) { - return this.rarity.get(par1ItemStack.getItemDamage()-this.mOffset).getValue(); - } - return EnumRarity.common; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - if (this.hasEffect.get(par1ItemStack.getItemDamage()-this.mOffset) != null) { - return this.hasEffect.get(par1ItemStack.getItemDamage()-this.mOffset).getValue(); - } - return false; - } - - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, final boolean aF3_H) { - //aList.add("Meta: "+(aStack.getItemDamage()-mOffset)); - if ((this.descColour.get(aStack.getItemDamage()-this.mOffset) != null) && (this.itemDescription.get(aStack.getItemDamage()-this.mOffset) != null)) { - aList.add(this.descColour.get(aStack.getItemDamage()-this.mOffset).getValue()+this.itemDescription.get(aStack.getItemDamage()-this.mOffset).getValue()); - } - final String tKey = this.getUnlocalizedName(aStack) + ".tooltip", tString = GT_LanguageManager.getTranslation(tKey); - if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) { - aList.add(tString); - } - final Long[] tStats = this.getElectricStats(aStack); - if (tStats != null) { - if (tStats[3] > 0) { - aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " + (tStats[2] >= 0 ? tStats[2] : 0) + EnumChatFormatting.GRAY); - } else { - final long tCharge = this.getRealCharge(aStack); - if ((tStats[3] == -2) && (tCharge <= 0)) { - aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY); - } else { - aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY); - } - } - } - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final IItemBehaviour tBehavior : tList) { - aList = tBehavior.getAdditionalToolTips(this, aList, aStack); - } - } - } - - - @Override - public final Item getChargedItem(final ItemStack itemStack) { - return this; - } - - @Override - public final Item getEmptyItem(final ItemStack itemStack) { - return this; - } - - @Override - public final double getMaxCharge(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - return Math.abs(tStats[0]); - } - - @Override - public final double getTransferLimit(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - return Math.max(tStats[1], tStats[3]); - } - - @Override - public final int getTier(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - return (int) (tStats == null ? Integer.MAX_VALUE : tStats[2]); - } - - @Override - public final double charge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aSimulate) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[2] > aTier) || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) || (aStack.stackSize != 1)) { - return 0; - } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); - if (!aSimulate) { - this.setCharge(aStack, tNewCharge); - } - return tNewCharge - tChargeBefore; - } - - @Override - public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[2] > aTier)) { - return 0; - } - if (aBatteryAlike && !this.canProvideEnergy(aStack)) { - return 0; - } - if (tStats[3] > 0) { - if ((aCharge < tStats[3]) || (aStack.stackSize < 1)) { - return 0; - } - if (!aSimulate) { - aStack.stackSize--; - } - return tStats[3]; - } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); - if (!aSimulate) { - this.setCharge(aStack, tNewCharge); - } - return tChargeBefore - tNewCharge; - } - - @Override - public final double getCharge(final ItemStack aStack) { - return this.getRealCharge(aStack); - } - - @Override - public final boolean canUse(final ItemStack aStack, final double aAmount) { - return this.getRealCharge(aStack) >= aAmount; - } - - @Override - public final boolean use(final ItemStack aStack, final double aAmount, final EntityLivingBase aPlayer) { - this.chargeFromArmor(aStack, aPlayer); - if ((aPlayer instanceof EntityPlayer) && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) { - return true; - } - final double tTransfer = this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); - if (tTransfer == aAmount) { - this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); - this.chargeFromArmor(aStack, aPlayer); - return true; - } - this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); - this.chargeFromArmor(aStack, aPlayer); - return false; - } - - @Override - public final boolean canProvideEnergy(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return false; - } - return (tStats[3] > 0) || ((aStack.stackSize == 1) && ((tStats[3] == -2) || (tStats[3] == -3))); - } - - @Override - public final void chargeFromArmor(final ItemStack aStack, final EntityLivingBase aPlayer) { - if ((aPlayer == null) || aPlayer.worldObj.isRemote) { - return; - } - for (int i = 1; i < 5; i++) { - final ItemStack tArmor = aPlayer.getEquipmentInSlot(i); - if (GT_ModHandler.isElectricItem(tArmor)) { - final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); - if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { - final double tCharge = ElectricItem.manager.discharge(tArmor, this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false); - if (tCharge > 0) { - this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); - if (aPlayer instanceof EntityPlayer) { - final Container tContainer = ((EntityPlayer) aPlayer).openContainer; - if (tContainer != null) { - tContainer.detectAndSendChanges(); - } - } - } - } - } - } - } - - public final long getRealCharge(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - if (tStats[3] > 0) { - return (int) (long) tStats[3]; - } - final NBTTagCompound tNBT = aStack.getTagCompound(); - return tNBT == null ? 0 : tNBT.getLong("GT.ItemCharge"); - } - - public final boolean setCharge(final ItemStack aStack, long aCharge) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[3] > 0)) { - return false; - } - NBTTagCompound tNBT = aStack.getTagCompound(); - if (tNBT == null) { - tNBT = new NBTTagCompound(); - } - tNBT.removeTag("GT.ItemCharge"); - aCharge = Math.min(tStats[0] < 0 ? Math.abs(tStats[0] / 2) : aCharge, Math.abs(tStats[0])); - if (aCharge > 0) { - aStack.setItemDamage(this.getChargedMetaData(aStack)); - tNBT.setLong("GT.ItemCharge", aCharge); - } else { - aStack.setItemDamage(this.getEmptyMetaData(aStack)); - } - if (tNBT.hasNoTags()) { - aStack.setTagCompound(null); - } else { - aStack.setTagCompound(tNBT); - } - this.isItemStackUsable(aStack); - return true; - } - - public short getChargedMetaData(final ItemStack aStack) { - return (short) aStack.getItemDamage(); - } - - public short getEmptyMetaData(final ItemStack aStack) { - return (short) aStack.getItemDamage(); - } - - - public boolean isItemStackUsable(final ItemStack aStack) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final IItemBehaviour tBehavior : tList) { - if (!tBehavior.isItemStackUsable(this, aStack)) { - return false; - } - } - } - return true; - } - - @Override - public final String getToolTip(final ItemStack aStack) { - return null; - } // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up at this Point - - @Override - public final IElectricItemManager getManager(final ItemStack aStack) { - return this; - } // We are our own Manager - - /** - * Sets the Furnace Burn Value for the Item. - * - * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aValue 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU) - * @return the Item itself for convenience in constructing. - */ - public final BaseEuItem setBurnValue(final int aMetaValue, final int aValue) { - if ((aMetaValue < 0) || (aValue < 0)) { - return this; - } - if (aValue == 0) { - this.mBurnValues.remove((short) aMetaValue); - } else { - this.mBurnValues.put((short) aMetaValue, aValue > Short.MAX_VALUE ? Short.MAX_VALUE : (short) aValue); - } - return this; - } - - /** - * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) - * @param aTransferLimit Transfer Limit. - * @param aTier The electric Tier. - * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). - * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) - * Use -2 if you want to make this Battery dischargeable. - * Use -3 if you want to make this Battery charge/discharge-able. - * @return the Item itself for convenience in constructing. - */ - public final BaseEuItem setElectricStats(final int aMetaValue, final long aMaxCharge, final long aTransferLimit, final long aTier, final long aSpecialData, final boolean aUseAnimations) { - if (aMetaValue < 0) { - return this; - } - if (aMaxCharge == 0) { - this.mElectricStats.remove((short) aMetaValue); - } else { - this.mElectricStats.put((short) aMetaValue, new Long[]{aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData}); - } - return this; - } - - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { - for (int i = 0, j = this.mEnabledItems.length(); i < j; i++) { - if (this.mVisibleItems.get(i) || (D1 && this.mEnabledItems.get(i))) { - final Long[] tStats = this.mElectricStats.get((short) (this.mOffset + i)); - if ((tStats != null) && (tStats[3] < 0)) { - final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); - this.setCharge(tStack, Math.abs(tStats[0])); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - if ((tStats == null) || (tStats[3] != -2)) { - final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public final void registerIcons(final IIconRegister aIconRegister) { - for (short i = 0, j = (short) this.mEnabledItems.length(); i < j; i++) { - if (this.mEnabledItems.get(i)) { - for (byte k = 1; k < this.mIconList[i].length; k++) { - this.mIconList[i][k] = aIconRegister.registerIcon(CORE.MODID+":" + (this.getUnlocalizedName() + "/" + i + "/" + k)); - } - this.mIconList[i][0] = aIconRegister.registerIcon(CORE.MODID+":" + (this.getUnlocalizedName() + "/" + i)); - } - } - } - - - @Override - public final IIcon getIconFromDamage(final int aMetaData) { - if (aMetaData < 0) { - return null; - } - return (aMetaData - this.mOffset) < this.mIconList.length ? this.mIconList[aMetaData - this.mOffset][0] : null; - } - - /** - * Sets the unlocalized name of this item to the string passed as the parameter" - */ - @Override - public Item setUnlocalizedName(final String p_77655_1_){ - this.unlocalizedName = p_77655_1_; - super.setUnlocalizedName(p_77655_1_); - return this; - } - - /** - * Returns the unlocalized name of this item. - */ - @Override - public String getUnlocalizedName() - { - return this.unlocalizedName; - } - - public final Long[] getElectricStats(final ItemStack aStack) { - return this.mElectricStats.get((short) aStack.getItemDamage()); - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { - return false; - } - - @Override - public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { - return false; - } - - - /** - * Adds a special Item Behaviour to the Item. - *

- * Note: the boolean Behaviours sometimes won't be executed if another boolean Behaviour returned true before. - * - * @param aMetaValue the Meta Value of the Item you want to add it to. [0 - 32765] - * @param aBehavior the Click Behavior you want to add. - * @return the Item itself for convenience in constructing. - */ - public final BaseEuItem addItemBehavior(final int aMetaValue, final IItemBehaviour aBehavior) { - if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { - return this; - } - ArrayList> tList = this.mItemBehaviors.get((short) aMetaValue); - if (tList == null) { - tList = new ArrayList<>(1); - this.mItemBehaviors.put((short) aMetaValue, tList); - } - tList.add(aBehavior); - return this; - } - - /** - * This adds a Custom Item to the ending Range. - * - * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset) - * @param aEnglish The Default Localized Name of the created Item - * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip - * @param aFoodBehavior The Food Value of this Item. Can be null aswell. Just a convenience thing. - * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things. - * @return An ItemStack containing the newly created Item. - */ - @SuppressWarnings("unchecked") - public final ItemStack addItem(final int aID, final String aEnglish, String aToolTip, final Object... aRandomData) { - if (aToolTip == null) { - aToolTip = ""; - } - if ((aID >= 0) && (aID < this.mItemAmount)) { - final ItemStack rStack = new ItemStack(this, 1, this.mOffset + aID); - this.mEnabledItems.set(aID); - this.mVisibleItems.set(aID); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip); - final List tAspects = new ArrayList<>(); - // Important Stuff to do first - for (final Object tRandomData : aRandomData) { - if (tRandomData instanceof SubTag) { - if (tRandomData == SubTag.INVISIBLE) { - this.mVisibleItems.set(aID, false); - continue; - } - if (tRandomData == SubTag.NO_UNIFICATION) { - GT_OreDictUnificator.addToBlacklist(rStack); - continue; - } - } - } - // now check for the rest - for (final Object tRandomData : aRandomData) { - if (tRandomData != null) { - boolean tUseOreDict = true; - if (tRandomData instanceof IItemBehaviour) { - this.addItemBehavior(this.mOffset + aID, (IItemBehaviour) tRandomData); - tUseOreDict = false; - } - if (tRandomData instanceof IItemContainer) { - ((IItemContainer) tRandomData).set(rStack); - tUseOreDict = false; - } - if (tRandomData instanceof SubTag) { - continue; - } - if (tRandomData instanceof TC_AspectStack) { - ((TC_AspectStack) tRandomData).addToAspectList(tAspects); - continue; - } - if (tRandomData instanceof ItemData) { - if (GT_Utility.isStringValid(tRandomData)) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - } else { - GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); - } - continue; - } - if (tUseOreDict) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - continue; - } - } - } - if (GregTech_API.sThaumcraftCompat != null) { - GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); - } - return rStack; - } - return null; - } - - @Override - public String getItemStackDisplayName(final ItemStack par1ItemStack) { - int keyValue = (par1ItemStack.getItemDamage() - this.mOffset); - if (keyValue < 0 || keyValue > 3) { - keyValue = 0; - } - return this.itemName.get(keyValue).getValue(); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java b/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java deleted file mode 100644 index 246620344a..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java +++ /dev/null @@ -1,92 +0,0 @@ -package gtPlusPlus.core.item.base; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemBackpack extends Item{ - - protected final int colourValue; - protected final String unlocalName; - - - public BaseItemBackpack(final String unlocalizedName, final int colour){ - this.unlocalName = unlocalizedName; - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + "itemBackpack"); - this.colourValue = colour; - GameRegistry.registerItem(this, unlocalizedName); - GT_OreDictUnificator.registerOre("storageBackpack", ItemUtils.getSimpleStack(this)); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabOther); - } - - // Without this method, your inventory will NOT work!!! - @Override - public int getMaxItemUseDuration(final ItemStack stack) { - return 1; // return any value greater than zero - } - - @Override - public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) - { - if (!world.isRemote) - { - // If player not sneaking, open the inventory gui - if (!player.isSneaking()) { - player.openGui(GTplusplus.instance, GuiHandler.GUI3, world, 0, 0, 0); - } - - // Otherwise, stealthily place some diamonds in there for a nice surprise next time you open it up :) - else { - // Utils.LOG_INFO("Player is Sneaking, giving them sneaky diamonds."); - // new BaseInventoryBackpack(player.getHeldItem()).setInventorySlotContents(0, new ItemStack(Items.diamond,4)); - } - } - - return itemstack; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.colourValue == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.colourValue; - - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - //Name Formatting. - String temp = this.unlocalName.replace("backpack", ""); - //Lets find the colour. - if (temp.toLowerCase().contains("dark")){ - temp = this.unlocalName.substring(12, this.unlocalName.length()); - temp = "Dark "+ temp; - } - return (temp+" Backpack"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(final IIconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon(CORE.MODID + ":" + "itemBackpack"); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemBrain.java b/src/Java/gtPlusPlus/core/item/base/BaseItemBrain.java deleted file mode 100644 index 73ed4afb42..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemBrain.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; - -/* - * - * - Key Point: You can access the NBT compound data from the Item class (in those methods that pass an ItemStack), but the NBT compound can only be set on an ItemStack. - - The steps to add NBT data to an ItemStack: - Create or otherwise get an ItemStack of the desired item - Create an NBTTagCompound and fill it with the appropriate data - Call ItemStack#setTagCompound() method to set it. - - * - */ - -public class BaseItemBrain extends Item{ - // This is an array of all the types I am going to be adding. - String[] brainTypes = { "dead", "preserved", "fresh", "tasty" }; - - // This method allows us to have different language translation keys for - // each item we add. - @Override - public String getUnlocalizedName(final ItemStack stack) - { - // This makes sure that the stack has a tag compound. This is how data - // is stored on items. - if (stack.hasTagCompound()) - { - // This is the object holding all of the item data. - final NBTTagCompound itemData = stack.getTagCompound(); - // This checks to see if the item has data stored under the - // brainType key. - if (itemData.hasKey("brainType")) - { - // This retrieves data from the brainType key and uses it in - // the return value - return "item." + itemData.getString("brainType"); - } - } - // This will be used if the item is obtained without nbt data on it. - return "item.nullBrain"; - } - - - // This is a fun method which allows us to run some code when our item is - // shown in a creative tab. I am going to use it to add all the brain - // types. - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(final Item item, final CreativeTabs tab, final List itemList) - { - // This creates a loop with a counter. It will go through once for - // every listing in brainTypes, and gives us a number associated - // with each listing. - for (int pos = 0; pos < this.brainTypes.length; pos++) - { - // This creates a new ItemStack instance. The item parameter - // supplied is this item. - final ItemStack brainStack = new ItemStack(item); - // By default, a new ItemStack does not have any nbt compound data. - // We need to give it some. - brainStack.setTagCompound(new NBTTagCompound()); - // Now we set the type of the item, brainType is the key, and - // brainTypes[pos] is grabbing a - // entry from the brainTypes array. - brainStack.getTagCompound().setString("brainType", - this.brainTypes[pos]); - // And this adds it to the itemList, which is a list of all items - // in the creative tab. - itemList.add(brainStack); - } - } - - // This code will allow us to tell the items apart in game. You can change - @SuppressWarnings({ "rawtypes", "unchecked" }) - // texture based on nbt data, but I won't be covering that. - @Override - @SideOnly(Side.CLIENT) - public void addInformation(final ItemStack stack, final EntityPlayer player, final List tooltip, final boolean isAdvanced){ - if ( stack.hasTagCompound() - && stack.getTagCompound().hasKey("brainType")) - { - // StatCollector is a class which allows us to handle string - // language translation. This requires that you fill out the - // translation in you language class. - tooltip.add(StatCollector.translateToLocal("tooltip.yourmod." - + stack.getTagCompound().getString("brainType") + ".desc")); - } - else // If the brain does not have valid tag data, a default message - { - tooltip.add(StatCollector.translateToLocal( - "tooltip.yourmod.nullbrain.desc")); - } - } -} - diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemBurnable.java b/src/Java/gtPlusPlus/core/item/base/BaseItemBurnable.java deleted file mode 100644 index a5db714822..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemBurnable.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.core.item.base; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemBurnable extends CoreItem { - - protected final int meta; - - public BaseItemBurnable(String unlocalizedName, String displayName, CreativeTabs creativeTab, - int stackSize, int maxDmg, String description, String oredictName, int burnTime, int meta) { - super(unlocalizedName, creativeTab, stackSize, maxDmg, description); - this.itemName = displayName; - this.meta = meta; - if (oredictName != null && !oredictName.equals("")){ - registerOrdictionary(oredictName); - } - registerFuel(burnTime); - - } - - public void registerFuel(int burn){ - CORE.burnables.add(new Pair(burn, ItemUtils.getSimpleStack(this, 1))); - } - - public final void registerOrdictionary(String name){ - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), name); - } - - @Override - public int getDamage(ItemStack stack) { - return this.meta; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemColourable.java b/src/Java/gtPlusPlus/core/item/base/BaseItemColourable.java deleted file mode 100644 index ca7041617d..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemColourable.java +++ /dev/null @@ -1,98 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.lib.CORE; - -public class BaseItemColourable extends Item -{ - - private final EnumRarity rarity; - private final EnumChatFormatting descColour; - private final String itemDescription; - protected String itemName; - private final boolean hasEffect; - public final int componentColour; - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return this.componentColour; - } - - //5 - /* - * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect - */ - public BaseItemColourable(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, int rgb) - { - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(stackSize); - this.setMaxDamage(maxDmg); - this.setHasSubtypes(true); - this.rarity = regRarity; - this.itemDescription = description; - this.descColour = colour; - this.hasEffect = Effect; - this.componentColour = rgb; - GameRegistry.registerItem(this, unlocalizedName); - } - - //6 - /* - * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect - */ - public BaseItemColourable(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, int rgb) - { - this.setUnlocalizedName(unlocalizedName); - this.itemName = displayName; - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(stackSize); - this.setMaxDamage(maxDmg); - this.rarity = regRarity; - this.itemDescription = description; - this.descColour = colour; - this.hasEffect = Effect; - this.componentColour = rgb; - GameRegistry.registerItem(this, unlocalizedName); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(this.descColour+this.itemDescription); - //super.addInformation(stack, aPlayer, list, bool); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return this.rarity; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return this.hasEffect; - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - if ((this.itemName == null) || this.itemName.equals("")) { - return super.getItemStackDisplayName(tItem); - } - return this.itemName; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java deleted file mode 100644 index 9ad8ea3feb..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ /dev/null @@ -1,566 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.TextureSet; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class BaseItemComponent extends Item{ - - private final static Class mTextureSetPreload; - - static { - mTextureSetPreload = TextureSet.class; - } - - public final Material componentMaterial; - public final String materialName; - public final String unlocalName; - public final ComponentTypes componentType; - public final int componentColour; - public Object extraData; - - protected IIcon base; - protected IIcon overlay; - - public BaseItemComponent(final Material material, final ComponentTypes componentType) { - this.componentMaterial = material; - this.unlocalName = "item"+componentType.COMPONENT_NAME+material.getUnlocalizedName(); - this.materialName = material.getLocalizedName(); - this.componentType = componentType; - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(64); - //this.setTextureName(this.getCorrectTextures()); - this.componentColour = material.getRgbAsHex(); - GameRegistry.registerItem(this, this.unlocalName); - - //if (componentType != ComponentTypes.DUST) - - GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); - if (LoadedMods.Thaumcraft) { - //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1); - if (componentMaterial.isRadioactive) { - //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel); - } - } - registerComponent(); - } - - //For Cell Generation - public BaseItemComponent(final String unlocalName, final String localName, final short[] RGBA) { - - // Handles .'s from fluid internal names. - String aFormattedNameForFluids; - if (unlocalName.contains(".")) { - aFormattedNameForFluids = StringUtils.splitAndUppercase(unlocalName, "."); - } - else { - aFormattedNameForFluids = unlocalName; - } - Material aTempMaterial = Material.mMaterialCache.get(localName.toLowerCase()); - Logger.INFO("Attempted to get "+localName+" cell material from cache. Valid? "+(aTempMaterial != null)); - this.componentMaterial = aTempMaterial; - this.unlocalName = "itemCell"+aFormattedNameForFluids; - this.materialName = localName; - this.componentType = ComponentTypes.CELL; - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(aFormattedNameForFluids); - this.setMaxStackSize(64); - this.componentColour = MathUtils.getRgbAsHex(RGBA); - this.extraData = RGBA; - - this.setTextureName(CORE.MODID + ":" + "item"+ComponentTypes.CELL.COMPONENT_NAME); - GameRegistry.registerItem(this, aFormattedNameForFluids); - GT_OreDictUnificator.registerOre(ComponentTypes.CELL.getOreDictName()+Utils.sanitizeStringKeepBrackets(localName), ItemUtils.getSimpleStack(this)); - registerComponent(); - } - - public boolean registerComponent() { - if (this.componentMaterial == null) { - return false; - } - //Register Component - Map aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName()); - if (aMap == null) { - aMap = new HashMap(); - } - String aKey = componentType.getGtOrePrefix().name(); - ItemStack x = aMap.get(aKey); - if (x == null) { - aMap.put(aKey, ItemUtils.getSimpleStack(this)); - Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); - Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); - return true; - } - else { - //Bad - Logger.MATERIALS("Tried to double register a material component. "); - return false; - } - } - - public String getCorrectTextures(){ - if (!CORE.ConfigSwitches.useGregtechTextures){ - return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME; - } - String metType = "9j4852jyo3rjmh3owlhw9oe"; - if (this.componentMaterial != null) { - TextureSet u = this.componentMaterial.getTextureSet(); - if (u != null) { - metType = u.mSetName; - } - } - metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType); - return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.getOreDictName(); - - - - //return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.COMPONENT_NAME.toLowerCase(); - } - - /*@Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - if (this.componentType == ComponentTypes.SMALLGEAR){ - return "Small " + this.materialName+" Gear"; - } - - if (this.componentMaterial != null) { - return (this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); - } - return this.materialName+" Cell"; - }*/ - - public final String getMaterialName() { - return this.materialName; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - try { - - - if (this.componentMaterial == null){ - if (this.materialName != null){ - //list.add(Utils.sanitizeStringKeepBrackets(materialName)); - } - } - - if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && (this.componentMaterial != null)){ - - - if (this.componentMaterial != null){ - if (!this.componentMaterial.vChemicalFormula.contains("?")) { - list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula)); - } - else if (this.componentMaterial.vChemicalFormula.contains("?")) { - String temp = componentMaterial.vChemicalFormula; - temp = temp.replace(" ", ""); - temp = temp.replace("-", ""); - temp = temp.replace("_", ""); - temp = temp.replace("!", ""); - temp = temp.replace("@", ""); - temp = temp.replace("#", ""); - temp = temp.replace(" ", ""); - list.add(temp); - } - - if (this.componentMaterial.isRadioactive){ - list.add(CORE.GT_Tooltip_Radioactive); - } - - if (this.componentType == ComponentTypes.INGOT || this.componentType == ComponentTypes.HOTINGOT){ - if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && this.unlocalName.toLowerCase().contains("hot")){ - list.add(EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.RED+"Very hot! "+EnumChatFormatting.GRAY+" Avoid direct handling.."); - } - } - } - else { - String aChemicalFormula = Material.sChemicalFormula.get(materialName.toLowerCase()); - if (aChemicalFormula != null && aChemicalFormula.length() > 0) { - list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula)); - } - } - - //Hidden Tooltip - if (KeyboardUtils.isCtrlKeyDown()) { - if (this.componentMaterial != null) { - String type = this.componentMaterial.getTextureSet().mSetName; - String output = type.substring(0, 1).toUpperCase() + type.substring(1); - list.add(EnumChatFormatting.GRAY+"Material Type: "+output+"."); - list.add(EnumChatFormatting.GRAY+"Material State: "+this.componentMaterial.getState().name()+"."); - list.add(EnumChatFormatting.GRAY+"Radioactivity Level: "+this.componentMaterial.vRadiationLevel+"."); - } - } - else { - list.add(EnumChatFormatting.DARK_GRAY+"Hold Ctrl to show additional info."); - } - - } - } - catch (Throwable t) {} - - super.addInformation(stack, aPlayer, list, bool); - } - - @SuppressWarnings("unchecked") - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (this.componentMaterial != null){ - if (entityHolding instanceof EntityPlayer){ - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.componentMaterial.vRadiationLevel, world, entityHolding); - } - } - } - - if (extraData != null) { - if (componentMaterial != null && componentMaterial.getRGBA()[3] > 1) { - if (((Map) extraData).get(9999) == null) { - ((Map) extraData).put(9999, new Short[] {0}); - } - Short aCurrentFrame = ((Map) extraData).get(9999)[0]; - short fC = (short) (aCurrentFrame >= Short.MAX_VALUE ? 0 : aCurrentFrame+1); - ((Map) extraData).put((int) 9999, new Short[] {(short) (fC), 0}); - ((Map) extraData).put((int) 9998, new Short[] {aCurrentFrame, 0}); - - } - } - } - - - /** - * - * Handle Custom Rendering - * - */ - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses(){ - return (CORE.ConfigSwitches.useGregtechTextures ? true : false); - } - - @SuppressWarnings("unchecked") - @Override - public int getColorFromItemStack(final ItemStack stack, final int renderPass) { - - - if (this.componentType == ComponentTypes.CELL || this.componentType == ComponentTypes.PLASMACELL) { - if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ - return Utils.rgbtoHexValue(255, 255, 255); - } - if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ - return Utils.rgbtoHexValue(255, 255, 255); - } - } - if (this.componentType == ComponentTypes.PLATEHEAVY) { - - } - - - - try { - if (this.componentMaterial == null) { - if (extraData != null) { - if (short.class.isInstance(extraData)){ - short[] abc = (short[]) extraData; - return Utils.rgbtoHexValue(abc[0], abc[1], abc[2]); - } - } - return this.componentColour; - } - - if (this.componentMaterial.getRGBA()[3] <= 1) { - return this.componentColour; - } - else { - - //Mild Glow Effect - if (this.componentMaterial.getRGBA()[3] == 2) { - if (extraData == null) { - extraData = new HashMap(); - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); - ((Map) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); - short[] er = this.componentMaterial.getRGBA(); - short value = 1; - Short[] ht = new Short[] {er[0], er[1], er[2]}; - for (int y = 0; y < 40; y++) { - if (y < 20) { - value = 1; - } - else { - value = -1; - } - short r = (short) (ht[0] + value); - short g = (short) (ht[1] + value); - short b = (short) (ht[2] + value); - Short[] qq = new Short[] {(short) Math.min(255, r), (short) Math.min(255, g), (short) Math.min(255, b)}; - ht = qq; - ((Map) extraData).put(y, qq); - } - } - if (extraData != null) { - - Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; - Short aSize = 40; - short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); - Short[] aCurrentFrameRGB = ((Map) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); - - - /*Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; - Short[] aCurrentFrameRGB = ((Map) extraData).get((int) aCurrentFrame); - short nextFrame = aCurrentFrame < 40 ? aCurrentFrame++ : 0; - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]);*/ - } - } - - //Rainbow Hue Cycle - else if (this.componentMaterial.getRGBA()[3] == 3) { - if (extraData == null) { - extraData = new HashMap(); - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); - ((Map) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); - int aSlot = 0; - - //Let's say you're starting with green: - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); - //Slowly start adding in some red to get to yellow: - ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); - //Then, take out the green to get to red: - ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); - //Now, add blue to get to purple: - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); - //Then, remove red to get to blue: - ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); - //Add the green back in to get to cyan: - ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); - //And finally remove the blue to get back to green: - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); - ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); - ((Map) extraData).put((int) Byte.MAX_VALUE, new Short[] {(short) (((Map) extraData).size()-1)}); - - - } - if (extraData != null) { - Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; - Short aSize = (short) (((Map) extraData).size() - 3); - short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); - Short[] aCurrentFrameRGB = ((Map) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); - } - } - } - - - } - catch (Throwable t) { - - } - return this.componentColour; - - - - - - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - if (CORE.ConfigSwitches.useGregtechTextures) { - if(pass == 0) { - return this.base; - } - return this.overlay; - } - return this.base; - } - - @Override - public void registerIcons(final IIconRegister i) { - - if (CORE.ConfigSwitches.useGregtechTextures){ - this.base = i.registerIcon(getCorrectTextures()); - this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY"); - } - else { - this.base = i.registerIcon(getCorrectTextures()); - //this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY"); - } - } - - - - - public static enum ComponentTypes { - DUST("Dust", " Dust", "dust", OrePrefixes.dust), - DUSTSMALL("DustSmall", " Dust", "dustSmall", OrePrefixes.dustSmall), - DUSTTINY("DustTiny", " Dust", "dustTiny", OrePrefixes.dustTiny), - INGOT("Ingot", " Ingot", "ingot", OrePrefixes.ingot), - HOTINGOT("HotIngot", " Hot Ingot", "ingotHot", OrePrefixes.ingotHot), - PLATE("Plate", " Plate", "plate", OrePrefixes.plate), - PLATEDOUBLE("PlateDouble", " Double Plate", "plateDouble", OrePrefixes.plateDouble), - ROD("Rod", " Rod", "stick", OrePrefixes.stick), - RODLONG("RodLong", " Long Rod", "stickLong", OrePrefixes.stickLong), - GEAR("Gear", " Gear", "gearGt", OrePrefixes.gearGt), - SMALLGEAR("SmallGear", " Gear", "gearGtSmall", OrePrefixes.gearGtSmall), //TODO - SCREW("Screw", " Screw", "screw", OrePrefixes.screw), - BOLT("Bolt", " Bolt", "bolt", OrePrefixes.bolt), - ROTOR("Rotor", " Rotor", "rotor", OrePrefixes.rotor), - RING("Ring", " Ring", "ring", OrePrefixes.ring), - FOIL("Foil", " Foil", "foil", OrePrefixes.foil), - PLASMACELL("CellPlasma", " Plasma Cell", "cellPlasma", OrePrefixes.cellPlasma), - CELL("Cell", " Cell", "cell", OrePrefixes.cell), - NUGGET("Nugget", " Nugget", "nugget", OrePrefixes.nugget), - PLATEHEAVY("HeavyPlate", "Heavy@Plate", "plateHeavy", OrePrefixes.plateDense), - SPRING("Spring", " Spring", "spring", OrePrefixes.spring), - SMALLSPRING("SmallSpring", "Small@Spring", "springSmall", OrePrefixes.springSmall), - FINEWIRE("FineWire", "Fine@Wire", "wireFine", OrePrefixes.wireFine),; - - private String COMPONENT_NAME; - private String DISPLAY_NAME; - private String OREDICT_NAME; - private OrePrefixes a_GT_EQUAL; - private ComponentTypes (final String LocalName, final String DisplayName, final String OreDictName, final OrePrefixes aPrefix){ - this.COMPONENT_NAME = LocalName; - this.DISPLAY_NAME = DisplayName; - this.OREDICT_NAME = OreDictName; - this.a_GT_EQUAL = aPrefix; - } - - public String getComponent(){ - return this.COMPONENT_NAME; - } - - public String getName(){ - return this.DISPLAY_NAME; - } - - public String getOreDictName(){ - return this.OREDICT_NAME; - } - - public OrePrefixes getGtOrePrefix() { - return this.a_GT_EQUAL; - } - - } - -} - - diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java b/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java deleted file mode 100644 index 4209ec0a59..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java +++ /dev/null @@ -1,201 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - -public class BaseItemDamageable extends Item { - - private final EnumRarity rarity; - private final String itemDescription; - protected String itemName; - private final boolean hasEffect; - - public BaseItemDamageable(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) - { - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(1); - this.setMaxDamage(251); - this.setNoRepair(); - this.rarity = regRarity; - this.itemDescription = description; - this.hasEffect = Effect; - GameRegistry.registerItem(this, unlocalizedName); - } - - public String getItemDescription(){ - return this.itemDescription; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - int dmg = (int) getItemDamage(stack); - if (dmg <= 3){ - list.add(EnumChatFormatting.GRAY+this.itemDescription); - } - if (dmg > 3 && dmg <= 25){ - list.add(EnumChatFormatting.GRAY+"You have discovered that smashing this against valuable stones has some function.."); - } - else if (dmg > 0){ - int maxDamage = 250; - list.add(EnumChatFormatting.GRAY+""+(maxDamage-getItemDamage(stack))+"/"+maxDamage+" gems remaining."); - } - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - int dmg = (int) getItemDamage(par1ItemStack); - if (dmg > 200){ - return EnumRarity.epic; - } - return this.rarity; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - int dmg = (int) getItemDamage(par1ItemStack); - if (dmg > 200){ - return true; - } - return this.hasEffect; - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - if ((this.itemName == null) || this.itemName.equals("")) { - return super.getItemStackDisplayName(tItem); - } - return this.itemName; - } - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Value", 0); - tagMain.setTag("Damage", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getItemDamage(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("Damage"); - if (aNBT != null) { - return aNBT.getLong("Value"); - } - } - else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setItemDamage(final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("Damage"); - if (aNBT != null) { - aNBT.setLong("Value", aDamage); - return true; - } - } - else { - createNBT(aStack); - } - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null){ - createNBT(stack); - } - double currentDamage = getItemDamage(stack); - double durabilitypercent = currentDamage / 100; - double inverse = (100-durabilitypercent); - return durabilitypercent; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - int dmg = (int) getItemDamage(stack); - if (dmg <= 20){ - return false; - } - else { - return true; - } - } - - public static ItemStack damageItem(ItemStack item){ - if (item != null){ - long currentUse = BaseItemDamageable.getItemDamage(item); - if (currentUse >= 0 && currentUse <= 250){ - BaseItemDamageable.setItemDamage(item, currentUse+1); - return item; - } - else { - return item; - } - } - return null; - } - - @Override - public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) { - Logger.INFO("Does Leave Table? "+stack.getDisplayName()); - return true; - } - - @Override - public boolean getShareTag() { - return true; - } - - @Override - public boolean hasContainerItem() { - return true; - } - - @Override - public boolean hasContainerItem(ItemStack stack) { - Logger.INFO("hasContainerItem? "+stack.getDisplayName()); - return true; - } - - @Override - public ItemStack getContainerItem(ItemStack itemStack) { - ItemStack stack = itemStack.copy(); - //stack.setItemDamage(stack.getItemDamage() + 1); - damageItem(stack); - stack.stackSize = 1; - return stack; - } - - @Override - public int getDamage(ItemStack stack) { - return (int) getItemDamage(stack); - } - -} - - - diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemGeneric.java b/src/Java/gtPlusPlus/core/item/base/BaseItemGeneric.java deleted file mode 100644 index 970d5ec0c8..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemGeneric.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.lib.CORE; - -public class BaseItemGeneric extends Item -{ - public BaseItemGeneric(final String unlocalizedName, final CreativeTabs c, final int stackSize, final int maxDmg) - { - this.setUnlocalizedName(CORE.MODID + "_" + unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(c); - this.setMaxStackSize(stackSize); - this.setMaxDamage(maxDmg); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - super.addInformation(stack, aPlayer, list, bool); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemLoot.java b/src/Java/gtPlusPlus/core/item/base/BaseItemLoot.java deleted file mode 100644 index 3d9ff9fa48..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemLoot.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.api.enums.Quality; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemLoot extends Item{ - - private final String materialName; - private final String unlocalName; - private final LootTypes lootTypes; - private Quality lootQuality; - private final Materials lootMaterial; - - public BaseItemLoot(final LootTypes lootType, final Materials material) { - this.lootTypes = lootType; - this.lootMaterial = material; - this.materialName = material.mDefaultLocalName; - this.unlocalName = "item"+lootType.LOOT_TYPE+this.materialName; - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(1); - this.setTextureName(CORE.MODID + ":" + "item"+lootType.LOOT_TYPE); - } - - public ItemStack generateLootStack(){ - this.lootQuality = Quality.getRandomQuality(); - return ItemUtils.getSimpleStack(this, 1); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (this.materialName+this.lootTypes.DISPLAY_SUFFIX); - } - - public final String getMaterialName() { - return this.materialName; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(this.lootQuality.getQuality()); - - /*if (componentMaterial.isRadioactive){ - list.add(CORE.GT_Tooltip_Radioactive); - }*/ - - super.addInformation(stack, aPlayer, list, bool); - } - - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - final short[] temp = this.lootMaterial.mRGBa; - return Utils.rgbtoHexValue(temp[0], temp[1], temp[2]); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - //EntityUtils.applyRadiationDamageToEntity(lootQuality.vRadioationLevel, world, entityHolding); - } - - - - - - - - - public static enum LootTypes { - Sword("Sword", " Longsword", "sword"), - Shortsword("Sword", " Short Blade", "blade"), - Helmet("Helmet", " Medium Helm", "helmet"), - Chestplate("Platebody", " Chestplate", "platebody"), - Leggings("Platelegs", " Platelegs", "platelegs"), - Boots("Boots", " Boots", "boots"); - private String LOOT_TYPE; - private String DISPLAY_SUFFIX; - private String OREDICT_NAME; - private LootTypes (final String LocalName, final String DisplayName, final String OreDictName){ - this.LOOT_TYPE = LocalName; - this.DISPLAY_SUFFIX = DisplayName; - this.OREDICT_NAME = OreDictName; - } - public String getLootType(){ - return this.LOOT_TYPE; - } - public String getName(){ - return this.DISPLAY_SUFFIX; - } - public String getOreDictName(){ - return this.OREDICT_NAME; - } - } - -} - - diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemTCShard.java b/src/Java/gtPlusPlus/core/item/base/BaseItemTCShard.java deleted file mode 100644 index 4f0db3e2ec..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemTCShard.java +++ /dev/null @@ -1,82 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemTCShard extends Item{ - - public final String unlocalName; - public final String displayName; - public final String descriptionString; - public final String descriptionString2; - public final int itemColour; - - public BaseItemTCShard(final String DisplayName, final int colour) { - this(DisplayName, colour, ""); - } - - public BaseItemTCShard(final String DisplayName, final int colour, final String Description) { - this(DisplayName, colour, "", Description); - } - - public BaseItemTCShard(final String DisplayName, final int colour, final String Description, final String Description2) { - this.unlocalName = "item"+Utils.sanitizeString(DisplayName); - this.displayName = DisplayName; - this.itemColour = colour; - this.descriptionString = Description; - this.descriptionString2 = Description2; - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(64); - this.setTextureName(CORE.MODID + ":" + "itemShard"); - GameRegistry.registerItem(this, this.unlocalName); - GT_OreDictUnificator.registerOre("shard"+DisplayName, ItemUtils.getSimpleStack(this)); - GT_OreDictUnificator.registerOre("gemInfused"+DisplayName, ItemUtils.getSimpleStack(this)); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (this.displayName+" Shard"); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if ((this.descriptionString != "") || !this.descriptionString.equals("")){ - list.add(EnumChatFormatting.GRAY+this.descriptionString); - } - if ((this.descriptionString2 != "") || !this.descriptionString2.equals("")){ - list.add(EnumChatFormatting.GRAY+this.descriptionString2); - } - } - - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return this.itemColour; - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - - } - - -} - - diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java b/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java deleted file mode 100644 index eb066024e0..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java +++ /dev/null @@ -1,341 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class BaseItemTickable extends CoreItem { - - public final String[] descriptionString; - public final int itemColour; - public final int maxTicks; - public final boolean twoRenderPasses; - public final boolean ticksInContainers; - - public IIcon[] mIcon = new IIcon[2]; - - public BaseItemTickable(boolean twoPass, final String unlocalName, final int colour, final int maxTicks) { - this(false, twoPass, unlocalName, colour, maxTicks, new String[] {}); - } - - public BaseItemTickable(boolean containerTick, boolean twoPass, final String unlocalName, final int colour, final int maxTicks) { - this(containerTick, twoPass, unlocalName, colour, maxTicks, new String[] {}); - } - - public BaseItemTickable(boolean containerTick, boolean twoPass, final String unlocalName, final int colour, final int maxTicks, final String[] Description) { - super(unlocalName, AddToCreativeTab.tabMisc, 1, 999999999, Description, EnumRarity.epic, EnumChatFormatting.DARK_RED, true, null); - this.itemColour = colour; - this.descriptionString = Description; - this.maxTicks = maxTicks; - this.twoRenderPasses = twoPass; - this.ticksInContainers = containerTick; - this.maxStackSize = 1; - //setGregtechItemList(); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (world == null || iStack == null) { - return; - } - if (world.isRemote) { - return; - } - - - boolean active = isTicking(world, iStack); - if (active) { - tickItemTag(world, iStack); - } - - } - - /*private final boolean setGregtechItemList() { - ItemList.Component_LavaFilter.set(this); - return ItemList.Component_LavaFilter.get(1) != null ? true : false; - }*/ - - /** - * - * Handle Custom Rendering - * - */ - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses(){ - return this.twoRenderPasses; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int renderPass) { - if (renderPass == 1 && this.twoRenderPasses){ - return Utils.rgbtoHexValue(255, 255, 255); - } - return this.itemColour; - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - if (this.twoRenderPasses) { - if(pass == 0) { - return this.mIcon[0]; - } - return this.mIcon[1]; - } - return this.mIcon[0]; - } - - @Override - public void registerIcons(final IIconRegister i) { - - if (this.twoRenderPasses){ - this.mIcon[0] = i.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName()); - this.mIcon[1] = i.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName() + "_OVERLAY"); - } - else { - this.mIcon[0] = i.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName()); - //this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY"); - } - } - - protected int getMaxTicks(ItemStack aStack) { - return maxTicks; - } - - protected boolean createNBT(World world, ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Tick", 0); - tagNBT.setLong("maxTick", getMaxTicks(rStack)); - tagNBT.setBoolean("isActive", true); - - //Try set world time - if (world != null) { - //tagNBT.setLong("CreationDate", world.getTotalWorldTime()); - } - - tagMain.setTag("TickableItem", tagNBT); - rStack.setTagCompound(tagMain); - Logger.INFO("Created Tickable NBT data."); - return true; - } - - public final long getTicks(World world, final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - return aNBT.getLong("Tick"); - } - } - else { - createNBT(world, aStack); - } - return 0L; - } - - public final boolean setTicks(World world, final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - aNBT.setLong("Tick", aDamage); - return true; - } - } - else { - createNBT(world, aStack); - } - return false; - } - - public final boolean isTicking(World world, final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - return aNBT.getBoolean("isActive"); - } - } - else { - return createNBT(world, aStack); - } - return true; - } - - public final boolean setTicking(World world, final ItemStack aStack, final boolean active) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - aNBT.setBoolean("isActive", active); - return true; - } - } - else { - createNBT(world, aStack); - } - return false; - } - - public final boolean getTicksInContainer(World world, final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - return aNBT.getBoolean("ticksInContainer"); - } - } - else { - createNBT(world, aStack); - } - return false; - } - - public final boolean setTicksInContainer(World world, final ItemStack aStack, final boolean active) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - aNBT.setBoolean("ticksInContainer", active); - return true; - } - } - else { - createNBT(world, aStack); - } - return false; - } - - public final long getDifferenceInWorldTimeToCreationTime(World world, final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - return (world.getTotalWorldTime() - aNBT.getLong("CreationDate")); - } - } - else { - createNBT(world, aStack); - } - return 0L; - } - - public final boolean setItemStackCreationTime(final ItemStack aStack, World world) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - aNBT.setLong("CreationDate", world.getTotalWorldTime()); - return true; - } - } - else { - createNBT(world, aStack); - } - return false; - } - - public final boolean tickItemTag(World world, ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - if (aNBT.hasKey("TickableItem")) { - aNBT = aNBT.getCompoundTag("TickableItem"); - //Done Ticking - if (getMaxTicks(aStack)-getTicks(world, aStack) <= 0) { - setTicking(world, aStack, false); - return false; - } - if (isTicking(world, aStack)) { - if (aNBT != null) { - aNBT.setLong("Tick", getTicks(world, aStack)+1); - return true; - } - else { - return false; - } - } - else { - return false; - } - } - } - return createNBT(world, aStack); - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null){ - //createNBT(null, stack); - return 0; - } - double currentDamage = getTicks(null, stack); - double durabilitypercent = currentDamage / getMaxTicks(stack); - return durabilitypercent; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings("rawtypes") List list, boolean bool) { - World world = player.getEntityWorld(); - if (this.descriptionString.length > 0) { - list.add(EnumChatFormatting.GRAY+this.descriptionString[0]); - } - long maxTicks = getMaxTicks(stack); - long ticks = 0; - if (stack.hasTagCompound()) { - ticks = getTicks(world, stack); - } - EnumChatFormatting durability = EnumChatFormatting.GRAY; - if (maxTicks-ticks > (maxTicks*0.8)){ - durability = EnumChatFormatting.GRAY; - } - else if (maxTicks-ticks > (maxTicks*0.6)){ - durability = EnumChatFormatting.GREEN; - } - else if (maxTicks-ticks > (maxTicks*0.4)){ - durability = EnumChatFormatting.YELLOW; - } - else if (maxTicks-ticks > (maxTicks*0.2)){ - durability = EnumChatFormatting.GOLD; - } - else if (maxTicks-ticks > 0){ - durability = EnumChatFormatting.RED; - } - list.add(durability+""+((maxTicks-ticks)/20)+EnumChatFormatting.GRAY+" seconds until decay"); - - if (this.descriptionString.length > 1) { - for (int h=1;h 0 ? this.theIcon : super.getIconFromDamageForRenderPass(parDamageVal, parRenderPass); - } - - public void setColors(final int parColorBase, final int parColorSpots){ - this.colorBase = parColorBase; - this.colorSpots = parColorSpots; - } - - public int getColorBase(){ - return this.colorBase; - } - - public int getColorSpots(){ - return this.colorSpots; - } - - public final void setEntityToSpawnName(final String parEntityToSpawnName){ - this.entityToSpawnName = parEntityToSpawnName; - this.entityToSpawnNameFull = this.entityMODID+"."+this.entityToSpawnName; - } - -} - diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java deleted file mode 100644 index 7ce96b2a88..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java +++ /dev/null @@ -1,237 +0,0 @@ -package gtPlusPlus.core.item.base; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -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.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class CoreItem extends Item -{ - - private final EnumRarity rarity; - private final EnumChatFormatting descColour; - private final String[] itemDescription; - protected String itemName; - private final boolean hasEffect; - - //Replace Item - What does this item turn into when held. - private final ItemStack turnsInto; - - //0 - /* - * Name, Tab - 64 Stack, 0 Dmg - */ - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab) - { - this(unlocalizedName, creativeTab, 64, 0); //Calls 3 - } - - //0 - /* - * Name, Tab - 64 Stack, 0 Dmg - */ - public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab) - { - this(unlocalizedName, creativeTab, 64, 0); //Calls 3 - this.itemName = displayName; - } - - //0.1 - /* - * Name, Tab - 64 Stack, 0 Dmg - */ - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final ItemStack OverrideItem) - { - this(unlocalizedName, creativeTab, 64, 0, new String[] {"This item will be replaced by another when held by a player, it is old and should not be used in recipes."}, EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5 - } - //0.1 - /* - * Name, Tab - 64 Stack, 0 Dmg - */ - public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final ItemStack OverrideItem) - { - this(unlocalizedName, creativeTab, 64, 0, new String[] {"This item will be replaced by another when held by a player, it is old and should not be used in recipes."}, EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5 - this.itemName = displayName; - } - - //1 - /* - * Name, Tab, Stack - 0 Dmg - */ - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize) - { - this(unlocalizedName, creativeTab, stackSize, 0); //Calls 3 - } - //2 - /* - * Name, Tab, Stack, Description - 0 Dmg - */ - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final String[] description) - { - this(unlocalizedName, creativeTab, stackSize, 0, description); //Calls 4 - } - //3 - /* - * Name, Tab, Stack, Dmg - Description - */ - public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, String string) { - this(unlocalizedName, creativeTab, stackSize, new String[] {string}); - } - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg) - { - this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {}); //Calls 4 - } - //4 //Not Rare + basic tooltip - /* - * Name, Tab, Stack, Dmg, Description - */ - public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, String string) { - this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {string}); - } - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description) - { - this(unlocalizedName, creativeTab, stackSize, maxDmg, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null); //Calls 4.5 - } - //4.5 - /* - * Name, Tab, Stack, Dmg, Description, Text Colour - Common - */ - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumChatFormatting colour) - { - this(unlocalizedName, creativeTab, stackSize, maxDmg, description, EnumRarity.common, colour, false, null); //Calls 5 - } - - //4.75 - /* - * Name, Tab, Stack, Dmg, Description, Rarity - Gray text - */ - public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, String string, EnumRarity uncommon) { - this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {string}, uncommon); - } - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity rarity) - { - this(unlocalizedName, creativeTab, stackSize, maxDmg, description, rarity, EnumChatFormatting.GRAY, false, null); //Calls 5 - } - - //5 - /* - * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect - */ - public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) - { - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(stackSize); - this.setMaxDamage(maxDmg); - this.rarity = regRarity; - this.itemDescription = description; - this.descColour = colour; - this.hasEffect = Effect; - this.turnsInto = OverrideItem; - GameRegistry.registerItem(this, unlocalizedName); - } - - //6 - /* - * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect - */ - public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) - { - this.setUnlocalizedName(unlocalizedName); - this.itemName = displayName; - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(stackSize); - this.setMaxDamage(maxDmg); - this.rarity = regRarity; - this.itemDescription = description; - this.descColour = colour; - this.hasEffect = Effect; - this.turnsInto = OverrideItem; - GameRegistry.registerItem(this, unlocalizedName); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.itemDescription.length > 0) { - for (int u=0;u= this.tickCounterMax){ - entityHolding.attackEntityFrom(DamageSource.onFire, 2); - this.tickCounter = 0; - } - } - } - super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java deleted file mode 100644 index 9022f864cb..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java +++ /dev/null @@ -1,145 +0,0 @@ -package gtPlusPlus.core.item.base.dusts; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemDust extends BaseItemComponent { - - private BaseItemComponent[] mSizedDusts = new BaseItemComponent[2]; - - public BaseItemDust(Material aMat) { - this(aMat, true); - } - - public BaseItemDust(Material aMat, boolean generateSmallDusts) { - super(aMat, ComponentTypes.DUST); - if (generateSmallDusts) { - mSizedDusts[0] = new BaseItemComponent(aMat, ComponentTypes.DUSTSMALL); - mSizedDusts[1] = new BaseItemComponent(aMat, ComponentTypes.DUSTTINY); - } - } - - public BaseItemDust(DustState aState, Material aMat) { - super(aMat, ComponentTypes.DUST); - if (aState.generatesSmallDust()) { - mSizedDusts[0] = new BaseItemComponent(aMat, ComponentTypes.DUSTSMALL); - } - if (aState.generatesTinyDust()) { - mSizedDusts[1] = new BaseItemComponent(aMat, ComponentTypes.DUSTTINY); - } - } - - private BaseItemDust(String unlocalizedName, String materialName, Material matInfo, int colour, String pileSize, int tier, boolean addRecipes) { - super(matInfo, ComponentTypes.DUST); - } - - public static class DustState { - static final int NORMAL = (1); - static final int SMALL = (10); - static final int TINY = (100); - final int MIXTURE; - final boolean[] doesThings = new boolean[3]; - - public DustState (boolean genDust, boolean genSmallDust, boolean genDustTiny){ - int aTotal = 0; - if (genDust) { - aTotal += NORMAL; - doesThings[0] = true; - } - else { - doesThings[0] = false; - } - if (genSmallDust) { - aTotal += SMALL; - doesThings[1] = true; - } - else { - doesThings[1] = false; - } - if (genDustTiny) { - aTotal += TINY; - doesThings[2] = true; - } - else { - doesThings[2] = false; - } - MIXTURE = aTotal; - } - - public boolean generatesDust() { - return doesThings[0]; - } - public boolean generatesSmallDust() { - return doesThings[1]; - } - public boolean generatesTinyDust() { - return doesThings[2]; - } - - private DustState(int amount) { - - if (amount == 1) { - doesThings[0] = true; - doesThings[1] = false; - doesThings[2] = false; - - } - else if (amount == 10) { - doesThings[0] = false; - doesThings[1] = true; - doesThings[2] = false; - } - else if (amount == 100) { - doesThings[0] = false; - doesThings[1] = false; - doesThings[2] = true; - - } - else if (amount == 11) { - doesThings[0] = true; - doesThings[1] = true; - doesThings[2] = false; - - } - else if (amount == 101) { - doesThings[0] = true; - doesThings[1] = false; - doesThings[2] = true; - - } - else if (amount == 110) { - doesThings[0] = false; - doesThings[1] = true; - doesThings[2] = true; - - } - else if (amount == 111) { - doesThings[0] = true; - doesThings[1] = true; - doesThings[2] = true; - } - else { - doesThings[0] = false; - doesThings[1] = false; - doesThings[2] = false; - } - MIXTURE = amount; - } - - public DustState get(int a) { - if (a == 1) { - return new DustState(NORMAL); - } - else if (a == 10) { - return new DustState(SMALL); - } - else if (a == 100) { - return new DustState(TINY); - } - else { - return new DustState(MIXTURE); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java deleted file mode 100644 index 8ee871e9c4..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.core.item.base.dusts; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.lib.CORE; - -public abstract class BaseItemDustAbstract extends Item{ - - protected int colour = 0; - protected String materialName; - protected String pileType; - - public BaseItemDustAbstract(final String unlocalizedName, final String materialName, final int colour, final String pileSize) { - this.setUnlocalizedName(unlocalizedName); - this.setMaxStackSize(64); - if (pileSize.equalsIgnoreCase("dust")){ - this.setTextureName(CORE.MODID + ":" + "dust"); - } - else{ - this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); - } - this.setMaxStackSize(64); - this.colour = colour; - this.materialName = materialName; - this.setUnlocalizedName(unlocalizedName); - GameRegistry.registerItem(this, unlocalizedName); - } - - @SuppressWarnings("rawtypes") - @Override - public abstract void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool); - - public abstract String getMaterialName(); - - @Override - public abstract int getColorFromItemStack(ItemStack stack, int hex); - -} diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java deleted file mode 100644 index 0757177e58..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java +++ /dev/null @@ -1,126 +0,0 @@ -package gtPlusPlus.core.item.base.dusts; - -import java.util.*; - -import org.apache.commons.lang3.StringUtils; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gregtech.api.enums.TextureSet; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemDustEx extends BaseItemComponent{ - - public static Map mCachedPileLinkages = new HashMap(); - - protected IIcon[] baseAr = new IIcon[3]; - protected IIcon[] overlayAr = new IIcon[3]; - public final static ComponentTypes[] componentTypeAr = new ComponentTypes[] {ComponentTypes.DUST, ComponentTypes.DUSTSMALL, ComponentTypes.DUSTTINY}; - - public BaseItemDustEx(final Material material) { - super(material, componentTypeAr[0]); - //OreDict this beauty - GT_OreDictUnificator.registerOre(componentTypeAr[0].getOreDictName()+material.getUnlocalizedName(), ItemUtils.simpleMetaStack(this, 0, 1)); - GT_OreDictUnificator.registerOre(componentTypeAr[1].getOreDictName()+material.getUnlocalizedName(), ItemUtils.simpleMetaStack(this, 0, 1)); - GT_OreDictUnificator.registerOre(componentTypeAr[2].getOreDictName()+material.getUnlocalizedName(), ItemUtils.simpleMetaStack(this, 0, 1)); - bakeRegistry(); - } - - private void bakeRegistry() { - String unlocalName = getUnlocalizedName(); - if (unlocalName.contains("item.")) { - unlocalName = StringUtils.remove(unlocalName, "item."); - } - if (unlocalName.contains("itemDust")) { - unlocalName = StringUtils.remove(unlocalName, "itemDust"); - } - mCachedPileLinkages.put(this.getUnlocalizedName(), "itemDust"+unlocalName); - mCachedPileLinkages.put(this.getUnlocalizedName(), "itemDustSmall"+unlocalName); - mCachedPileLinkages.put(this.getUnlocalizedName(), "itemDustTiny"+unlocalName); - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 3; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public IIcon getIconFromDamageForRenderPass(int meta, int pass) { - if (CORE.ConfigSwitches.useGregtechTextures) { - if (meta == 0) { - if (pass == 0) { - return this.baseAr[0]; - } - else { - return this.overlayAr[0]; - } - } - else if (meta == 1) { - if (pass == 0) { - return this.baseAr[1]; - } - else { - return this.overlayAr[1]; - } - } - else { - if (pass == 0) { - return this.baseAr[2]; - } - else { - return this.overlayAr[2]; - } - } - } - else { - return this.baseAr[meta]; - } - } - - @Override - public void registerIcons(final IIconRegister i) { - if (CORE.ConfigSwitches.useGregtechTextures){ - this.baseAr[0] = i.registerIcon(getCorrectTextures()); - this.overlayAr[0] = i.registerIcon(getCorrectTextures() + "_OVERLAY"); - this.baseAr[1] = i.registerIcon(getCorrectTextures()+"Small"); - this.overlayAr[1] = i.registerIcon(getCorrectTextures() + "Small_OVERLAY"); - this.baseAr[2] = i.registerIcon(getCorrectTextures()+"Tiny"); - this.overlayAr[2] = i.registerIcon(getCorrectTextures() + "Tiny_OVERLAY"); - } - else { - this.baseAr[0] = i.registerIcon(getCorrectTextures()); - this.baseAr[1] = i.registerIcon(getCorrectTextures()+"Small"); - this.baseAr[2] = i.registerIcon(getCorrectTextures()+"Tiny"); - } - } - - @Override - public String getCorrectTextures(){ - if (!CORE.ConfigSwitches.useGregtechTextures){ - return CORE.MODID + ":" + "item"+this.componentType.getComponent(); - } - String metType = "9j4852jyo3rjmh3owlhw9oe"; - if (this.componentMaterial != null) { - TextureSet u = this.componentMaterial.getTextureSet(); - if (u != null) { - metType = u.mSetName; - } - } - metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType); - return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.getOreDictName(); - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java deleted file mode 100644 index e4fa06c58e..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java +++ /dev/null @@ -1,162 +0,0 @@ -package gtPlusPlus.core.item.base.dusts; - -import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemDustUnique extends Item{ - - protected final int colour; - protected final int sRadiation; - protected final String materialName; - protected final String name; - protected final String chemicalNotation; - - public BaseItemDustUnique(final String unlocalizedName, final String materialName, final int colour, final String pileSize) { - this(unlocalizedName, materialName, "NullFormula", colour, pileSize); - } - - public BaseItemDustUnique(final String unlocalizedName, final String materialName, final String mChemicalFormula, final int colour, final String pileSize) { - this.setUnlocalizedName(unlocalizedName); - this.setMaxStackSize(64); - this.setTextureName(this.getCorrectTexture(pileSize)); - this.setCreativeTab(tabMisc); - this.colour = colour; - this.materialName = materialName; - if (mChemicalFormula == null || mChemicalFormula.equals("") || mChemicalFormula.equals("NullFormula")){ - this.chemicalNotation = StringUtils.subscript(materialName); - } - else { - this.chemicalNotation = StringUtils.subscript(mChemicalFormula); - } - this.sRadiation = ItemUtils.getRadioactivityLevel(materialName); - GameRegistry.registerItem(this, unlocalizedName); - - if (this.getUnlocalizedName().contains("DustTiny")){ - this.name = "Tiny Pile of "+this.materialName+ " Dust"; - } - else if (this.getUnlocalizedName().contains("DustSmall")){ - this.name = "Small Pile of "+this.materialName+ " Dust"; - } - else { - this.name = this.materialName+ " Dust"; - } - - String temp = ""; - Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName()); - if (this.getUnlocalizedName().contains("item.")){ - temp = this.getUnlocalizedName().replace("item.", ""); - Logger.WARNING("Generating OreDict Name: "+temp); - } - else { - temp = this.getUnlocalizedName(); - } - if (temp.contains("DustTiny")){ - temp = temp.replace("itemD", "d"); - Logger.WARNING("Generating OreDict Name: "+temp); - } - else if (temp.contains("DustSmall")){ - temp = temp.replace("itemD", "d"); - Logger.WARNING("Generating OreDict Name: "+temp); - } - else { - temp = temp.replace("itemD", "d"); - Logger.WARNING("Generating OreDict Name: "+temp); - } - if ((temp != null) && !temp.equals("")){ - GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); - } - registerComponent(); - } - - public boolean registerComponent() { - if (this.materialName == null) { - return false; - } - String aName = materialName; - //Register Component - Map aMap = Material.mComponentMap.get(aName); - if (aMap == null) { - aMap = new HashMap(); - } - String aKey = OrePrefixes.dust.name(); - ItemStack x = aMap.get(aKey); - if (x == null) { - aMap.put(aKey, ItemUtils.getSimpleStack(this)); - Logger.MATERIALS("Registering a material component. Item: ["+aName+"] Map: ["+aKey+"]"); - Material.mComponentMap.put(aName, aMap); - return true; - } - else { - //Bad - Logger.MATERIALS("Tried to double register a material component. "); - return false; - } - } - - @Override - public String getItemStackDisplayName(final ItemStack iStack) { - return this.name; - } - - private String getCorrectTexture(final String pileSize){ - if (!CORE.ConfigSwitches.useGregtechTextures){ - if ((pileSize.equals("dust")) || (pileSize.equals("Dust"))){ - this.setTextureName(CORE.MODID + ":" + "dust");} - else{ - this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); - } - } - if (pileSize.toLowerCase().contains("small")){ - return "gregtech" + ":" + "materialicons/SHINY/dustSmall"; - } - else if (pileSize.toLowerCase().contains("tiny")){ - return "gregtech" + ":" + "materialicons/SHINY/dustTiny"; - } - return "gregtech" + ":" + "materialicons/SHINY/dust"; - } - - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.sRadiation > 0){ - list.add(CORE.GT_Tooltip_Radioactive); - } - if (this.chemicalNotation.length() > 0 && !chemicalNotation.equals("") && !chemicalNotation.equals("NullFormula")){ - list.add(this.chemicalNotation); - } - super.addInformation(stack, aPlayer, list, bool); - } - - public final String getMaterialName() { - return StringUtils.subscript(this.materialName); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.colour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.colour; - - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java b/src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java deleted file mode 100644 index c6aff85da1..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.core.item.base.dusts.decimal; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; - -public class BaseItemCentidust extends Item{ - - final Material dustMaterial; - final String materialName; - final String unlocalName; - - public BaseItemCentidust(final Material material) { - this.dustMaterial = material; - this.unlocalName = "itemCentidust"+material.getUnlocalizedName(); - this.materialName = material.getLocalizedName(); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(10); - this.setTextureName(CORE.MODID + ":" + "itemCentidust"); //TODO - GameRegistry.registerItem(this, this.unlocalName); - //GT_OreDictUnificator.registerOre(unlocalName.replace("itemR", "r"), UtilsItems.getSimpleStack(this)); //TODO - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return (this.materialName+ " Centidust"); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("")){ - list.add(EnumChatFormatting.GRAY+"1% of a " + this.materialName + " dust pile."); - } - super.addInformation(stack, aPlayer, list, bool); - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return this.dustMaterial.getRgbAsHex(); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java b/src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java deleted file mode 100644 index 2d1b4a8d27..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.core.item.base.dusts.decimal; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; - -public class BaseItemDecidust extends Item{ - - final Material dustMaterial; - final String materialName; - final String unlocalName; - - public BaseItemDecidust(final Material material) { - this.dustMaterial = material; - this.unlocalName = "itemDecidust"+material.getUnlocalizedName(); - this.materialName = material.getLocalizedName(); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(10); - this.setTextureName(CORE.MODID + ":" + "itemDecidust"); //TODO - GameRegistry.registerItem(this, this.unlocalName); - //GT_OreDictUnificator.registerOre(unlocalName.replace("itemR", "r"), UtilsItems.getSimpleStack(this)); //TODO - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return (this.materialName+ " Decidust"); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("")){ - list.add(EnumChatFormatting.GRAY+"10% of a " + this.materialName + " dust pile."); - } - super.addInformation(stack, aPlayer, list, bool); - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return this.dustMaterial.getRgbAsHex(); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java b/src/Java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java deleted file mode 100644 index 3e2816bf52..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.base.foil; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemFoil extends BaseItemComponent{ - - public BaseItemFoil(final Material material) { - super(material, BaseItemComponent.ComponentTypes.FOIL); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemFood.java b/src/Java/gtPlusPlus/core/item/base/foods/BaseItemFood.java deleted file mode 100644 index 54aa90c03f..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemFood.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.core.item.base.foods; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class BaseItemFood extends ItemFood { - - private final PotionEffect[] effects; - protected String localName; - - public BaseItemFood(final String unlocalizedName, final String localizedName, final int healAmount, final float saturationModifier, final boolean wolvesFavorite, final PotionEffect... effects) { - super(healAmount, saturationModifier, wolvesFavorite); - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName.replace("Hot", "")); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.effects = effects; - this.localName = localizedName; - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - protected void onFoodEaten(final ItemStack stack, final World world, final EntityPlayer player) { - super.onFoodEaten(stack, world, player); - - for (int i = 0; i < this.effects.length; i ++) { - if (!world.isRemote && (this.effects[i] != null) && (this.effects[i].getPotionID() > 0)) { - player.addPotionEffect(new PotionEffect(this.effects[i].getPotionID(), - this.effects[i].getDuration(), this.effects[i].getAmplifier(), - this.effects[i].getIsAmbient() - ) - ); - } - } - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return ("A Serving of "+this.localName); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java b/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java deleted file mode 100644 index 528b9593e6..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.core.item.base.foods; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemHotFood extends BaseItemFood{ - - protected String materialName; - protected String unlocalName; - protected int cooldownTime; - protected Item output; - - public BaseItemHotFood(final String unlocalizedName, final int healAmount, final float healSaturation, final String foodName, final int timeToCoolInSeconds, final Item cooledFood) { - super(unlocalizedName, "Hot "+foodName, healAmount, healSaturation, false); - this.unlocalName = unlocalizedName; - this.cooldownTime = timeToCoolInSeconds * 20; - this.materialName = foodName; - this.output = cooledFood; - this.setMaxStackSize(1); - } - - @Override - public ItemStack onEaten(final ItemStack iStack, final World world, final EntityPlayer player) { - return super.onEaten(iStack, world, player); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - //Utils.LOG_INFO("Item Damage: "+iStack.getItemDamage()+" Max Damage: "+iStack.getMaxDamage()); - if (!world.isRemote){ - if(iStack.getItemDamage() == this.cooldownTime) { - if (entityHolding instanceof EntityPlayer){ - Logger.INFO("Foods Done."); - ((EntityPlayer) entityHolding).inventory.addItemStackToInventory(ItemUtils.getSimpleStack(this.output)); - ((EntityPlayer) entityHolding).inventory.consumeInventoryItem(this); - } - }else if(iStack.getItemDamage() < this.cooldownTime){ - iStack.setItemDamage(iStack.getItemDamage() + 1); - } - if(MathUtils.divideXintoY(iStack.getItemDamage(), 150)){ - entityHolding.attackEntityFrom(DamageSource.onFire, 1); - } - - - } - super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("")){ - list.add(EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.RED+"Very hot!"+EnumChatFormatting.GRAY+" Avoid direct handling.."); - list.add(EnumChatFormatting.GRAY+"This food has "+((this.cooldownTime-stack.getItemDamage())/20)+" seconds left, until it is cool."); - } - super.addInformation(stack, aPlayer, list, bool); - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return Utils.rgbtoHexValue(230, 96, 96); - - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/gears/BaseItemGear.java b/src/Java/gtPlusPlus/core/item/base/gears/BaseItemGear.java deleted file mode 100644 index b72ea5db15..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/gears/BaseItemGear.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.base.gears; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemGear extends BaseItemComponent{ - - public BaseItemGear(final Material material) { - super(material, BaseItemComponent.ComponentTypes.GEAR); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java b/src/Java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java deleted file mode 100644 index 5435c692c6..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.base.gears; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemSmallGear extends BaseItemComponent{ - - public BaseItemSmallGear(final Material material) { - super(material, BaseItemComponent.ComponentTypes.SMALLGEAR); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java deleted file mode 100644 index ea96e2914c..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.core.item.base.ingots; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemIngot extends BaseItemComponent{ - - protected final String materialName; - protected final String unlocalName; - - public BaseItemIngot(final Material material) { - this(material, ComponentTypes.INGOT); - } - - public BaseItemIngot(final Material material, final ComponentTypes type) { - super(material, type); - this.materialName = material.getLocalizedName(); - this.unlocalName = material.getUnlocalizedName(); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java deleted file mode 100644 index c19fecd924..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java +++ /dev/null @@ -1,110 +0,0 @@ -package gtPlusPlus.core.item.base.ingots; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemIngotHot extends BaseItemIngot{ - - private final ItemStack outputIngot; - private int tickCounter = 0; - private final int tickCounterMax = 200; - private final int mTier; - - private IIcon base; - private IIcon overlay; - - public BaseItemIngotHot(final Material material) { - super(material, ComponentTypes.HOTINGOT); - this.setTextureName(CORE.MODID + ":" + "itemIngotHot"); - this.outputIngot = material.getIngot(1); - this.mTier = material.vTier; - this.generateRecipe(); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return super.getItemStackDisplayName(p_77653_1_); - //return ("Hot "+this.materialName+ " Ingot"); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return Utils.rgbtoHexValue(225, 225, 225); - } - - private void generateRecipe(){ - Logger.WARNING("Adding Vacuum Freezer recipe for a Hot Ingot of "+this.materialName+"."); - CORE.RA.addVacuumFreezerRecipe(ItemUtils.getSimpleStack(this), this.outputIngot.copy(), (int) Math.max(this.componentMaterial.getMass() * 3L, 1L), this.componentMaterial.vVoltageMultiplier); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (this.componentMaterial != null){ - if (entityHolding != null && entityHolding instanceof EntityPlayer){ - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - EntityUtils.applyHeatDamageToEntity(1, world, entityHolding); - } - } - } - super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses(){ - if (CORE.ConfigSwitches.useGregtechTextures){ - return true; - } - else { - return false; - } - } - - @Override - public void registerIcons(final IIconRegister i) { - - if (CORE.ConfigSwitches.useGregtechTextures){ - this.base = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot"); - this.overlay = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot_OVERLAY"); - } - else { - this.base = i.registerIcon(CORE.MODID + ":" + "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()); - //this.overlay = i.registerIcon(CORE.MODID + ":" + "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()+"_Overlay"); - } - //this.overlay = cellMaterial.getFluid(1000).getFluid().get - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - if(pass == 0 && CORE.ConfigSwitches.useGregtechTextures) { - return this.base; - } - else if(pass == 1 && CORE.ConfigSwitches.useGregtechTextures) { - return this.overlay; - } - else { - return this.overlay; - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java deleted file mode 100644 index 6ad323333f..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.core.item.base.ingots; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.Entity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemIngot_OLD extends Item{ - - protected int colour; - protected String materialName; - protected String unlocalName; - - public BaseItemIngot_OLD(final String unlocalizedName, final String materialName, final int colour, final int sRadioactivity) { - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.unlocalName = unlocalizedName; - this.setMaxStackSize(64); - this.setTextureName(CORE.MODID + ":" + "itemIngot"); - this.colour = colour; - this.materialName = materialName; - this.sRadiation = sRadioactivity; - GameRegistry.registerItem(this, unlocalizedName); - String temp = ""; - if (this.unlocalName.contains("itemIngot")){ - temp = this.unlocalName.replace("itemI", "i"); - } - else if (this.unlocalName.contains("itemHotIngot")){ - temp = this.unlocalName.replace("itemHotIngot", "ingotHot"); - } - if ((temp != null) && !temp.equals("")){ - GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); - } - //this.generateCompressorRecipe(); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return (this.materialName+ " Ingot"); - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.colour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.colour; - - } - - private void generateCompressorRecipe(){ - if (this.unlocalName.contains("itemIngot")){ - final ItemStack tempStack = ItemUtils.getSimpleStack(this, 9); - ItemStack tempOutput = null; - String temp = this.getUnlocalizedName().replace("item.itemIngot", "block"); - Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName()); - if (this.getUnlocalizedName().contains("item.")){ - temp = this.getUnlocalizedName().replace("item.", ""); - Logger.WARNING("Generating OreDict Name: "+temp); - } - temp = temp.replace("itemIngot", "block"); - Logger.WARNING("Generating OreDict Name: "+temp); - if ((temp != null) && !temp.equals("")){ - tempOutput = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1); - if (tempOutput != null){ - GT_ModHandler.addCompressionRecipe(tempStack, tempOutput); - } - - } - } - else if (this.unlocalName.contains("itemHotIngot")){ - return; - } - - - } - - - protected final int sRadiation; - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java b/src/Java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java deleted file mode 100644 index 96b5425437..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.fluids.BlockFluidBase; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class FluidItemBlock extends ItemBlock{ - - protected final int blockColour; - final BlockFluidBase baseBlock; - String name; - - public FluidItemBlock(final Block block) { - super(block); - this.baseBlock = (BlockFluidBase) block; - this.blockColour = this.baseBlock.getRenderColor(1); - this.name = this.baseBlock.getLocalizedName().replace("tile", "").replace("fluid", "").replace("name", "").replace("block", "").replace(".", ""); - //GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), UtilsItems.getSimpleStack(this)); - } - - public int getRenderColor(final int aMeta) { - return this.blockColour; - } - - @Override - public String getItemStackDisplayName(final ItemStack iStack) { - /*if (this.thisFluid != null){ - this.name = "Molten "+this.thisFluid.getLocalizedName(); - return this.name; - }*/ - this.name = "Molten "+this.baseBlock.getLocalizedName().replace("tile", "").replace("fluid", "").replace("name", "").replace("block", "").replace(".", ""); - return this.name; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.blockColour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.blockColour; - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - /*list.add("Temperature: "+MathUtils.celsiusToKelvin(this.thisFluid.getMeltingPointC())+"K"); - if (this.sRadiation > 0){ - list.add(CORE.GT_Tooltip_Radioactive); - }*/ - super.addInformation(stack, aPlayer, list, bool); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java deleted file mode 100644 index 14344c1817..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.interfaces.ITileTooltip; - -public class ItemBlockBasicTile extends ItemBlock { - - private final int mID; - - public ItemBlockBasicTile(final Block block) { - super(block); - this.mID = ((ITileTooltip) block).getTooltipID(); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.mID == 0) { // Fish trap - list.add("This trap catches fish faster if surrounded by more water blocks"); - list.add("Can also be placed beside upto 4 other fish traps"); - list.add("Requires at least two faces touching water"); - list.add("1/1000 chance to produce triple loot."); - } - else if (this.mID == 1) { // Modularity - list.add("Used to construct modular armour & bauble upgrades.."); - } - else if (this.mID == 2) { // Trade - list.add("Allows for SMP trade-o-mat type trading."); - } - else if (this.mID == 3) { // Project - list.add("Scan any crafting recipe in this to mass fabricate them in the Autocrafter.."); - } - else if (this.mID == 4) { // Circuit Table - list.add("Easy Circuit Configuration"); - list.add("Change default setting with a Screwdriver"); - list.add("Default is used to select slot for auto-insertion"); - } - else if (this.mID == 5) { // Decayables Chest - list.add("Chest which holds radioactive materials"); - list.add("Items which decay will tick while inside"); - list.add("Place with right click"); - } - else if (this.mID == 6) { // Butterfly Killer - list.add("Kills Forestry Butterflies, Bats and other pests"); - list.add("Use either Formaldehyde or Hydrogen cyanide"); - list.add("Be weary of your neighbours"); - } - else if (this.mID == 7) { // Egg Box - list.add("A box for holding big eggs"); - } - else if (this.mID == 8){ // Volumetric Flask Setter - list.add("Easy Flask Configuration"); - list.add("Configure default input slot with a screwdriver"); - } - else if (this.mID == 9){ - - } - - else { - list.add("Bad Tooltip ID - " + mID); - } - super.addInformation(stack, aPlayer, list, bool); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java deleted file mode 100644 index 2aba494d6e..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -public class ItemBlockDoor extends ItemBlock { - @SideOnly(Side.CLIENT) - private IIcon field_150938_b; - - public ItemBlockDoor(Block p_i45328_1_) { - super(p_i45328_1_); - } - - /** - * Callback for item usage. If the item does something special on right - * clicking, he will have one of those. Return True if something happen and - * false if it don't. This is for ITEMS, not BLOCKS - */ - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, - int par5, int par6, int par7, float par8, float par9, float par10) { - if (par7 != 1) { - return false; - } else { - ++par5; - Block block; - - block = field_150939_a; - - if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) - && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)) { - if (!block.canPlaceBlockAt(par3World, par4, par5, par6)) { - return false; - } else { - int i1 = MathHelper.floor_double( - (double) ((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3; - byte b0 = 0; - byte b1 = 0; - - if (i1 == 0) { - b1 = 1; - } - - if (i1 == 1) { - b0 = -1; - } - - if (i1 == 2) { - b1 = -1; - } - - if (i1 == 3) { - b0 = 1; - } - - int i2 = (par3World.getBlock(par4 - b0, par5, par6 - b1).isNormalCube() ? 1 : 0) - + (par3World.getBlock(par4 - b0, par5 + 1, par6 - b1).isNormalCube() ? 1 : 0); - int j1 = (par3World.getBlock(par4 + b0, par5, par6 + b1).isNormalCube() ? 1 : 0) - + (par3World.getBlock(par4 + b0, par5 + 1, par6 + b1).isNormalCube() ? 1 : 0); - boolean flag = par3World.getBlock(par4 - b0, par5, par6 - b1) == block - || par3World.getBlock(par4 - b0, par5 + 1, par6 - b1) == block; - boolean flag1 = par3World.getBlock(par4 + b0, par5, par6 + b1) == block - || par3World.getBlock(par4 + b0, par5 + 1, par6 + b1) == block; - boolean flag2 = false; - - if (flag && !flag1) { - flag2 = true; - } else if (j1 > i2) { - flag2 = true; - } - - par3World.setBlock(par4, par5, par6, block, i1, 2); - par3World.setBlock(par4, par5 + 1, par6, block, 8 | (flag2 ? 1 : 0), 2); - par3World.notifyBlocksOfNeighborChange(par4, par5, par6, block); - par3World.notifyBlocksOfNeighborChange(par4, par5 + 1, par6, block); - - --par1ItemStack.stackSize; - return true; - } - } else { - return false; - } - } - } - - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { - p_77624_3_.add("This is a block, you can place it by right clicking"); - super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java deleted file mode 100644 index ac6740f268..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java +++ /dev/null @@ -1,41 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.block.general.BlockTankXpConverter; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class ItemBlockEntityBase extends ItemBlock { - - public ItemBlockEntityBase(final Block block) { - super(block); - this.setMaxDamage(0); - //this.setHasSubtypes(true); - this.setCreativeTab(AddToCreativeTab.tabMachines); - } - - @Override - public int getColorFromItemStack(final ItemStack p_82790_1_, final int p_82790_2_) { - return super.getColorFromItemStack(p_82790_1_, p_82790_2_); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (Block.getBlockFromItem(stack.getItem()) instanceof BlockTankXpConverter){ - /*list.add(EnumChatFormatting.GRAY+"Can convert Liquid Xp to Mob Essence and back."); - list.add(EnumChatFormatting.GRAY+"Right click with a Screwdriver to change mode."); - list.add(EnumChatFormatting.GRAY+"Shift+Right click to view tank information.");*/ - list.add(EnumChatFormatting.GRAY+"Currently disabled, Use a GT Brewery instead. (New Recipes Added!)"); - } - super.addInformation(stack, aPlayer, list, bool); - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java deleted file mode 100644 index 396689ef63..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java +++ /dev/null @@ -1,156 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.block.base.BlockBaseModular; -import gtPlusPlus.core.block.base.BlockBaseOre; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; - -public class ItemBlockGtBlock extends ItemBlock { - - protected final int blockColour; - private int sRadiation; - - private Material mMaterial; - - private final Block thisBlock; - private boolean isOre = false; - private boolean isModular = false; - - public ItemBlockGtBlock(final Block block) { - super(block); - this.thisBlock = block; - if (block instanceof BlockBaseOre) { - this.isOre = true; - } else if (block instanceof BlockBaseModular) { - this.isModular = true; - } - final BlockBaseModular baseBlock = (BlockBaseModular) block; - if (isModular) { - this.blockColour = baseBlock.getRenderColor(0); - } else if (isOre) { - this.blockColour = block.getBlockColor(); - } else { - this.blockColour = block.getBlockColor(); - } - - if (block instanceof BlockBaseModular){ - BlockBaseModular g = (BlockBaseModular) block; - this.mMaterial = g.getMaterialEx(); - } - else { - this.mMaterial = null; - } - - // GT_OreDictUnificator.registerOre("block"+block.getUnlocalizedName().replace("tile.block", - // "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block", - // "").replace("-", "").replace("_", "").replace(" ", ""), - // ItemUtils.getSimpleStack(this)); - } - - public int getRenderColor(final int aMeta) { - return this.blockColour; - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - if (this.mMaterial != null) { - list.add(this.mMaterial.vChemicalFormula); - } else { - - try { - BlockBaseModular g = (BlockBaseModular) thisBlock; - this.mMaterial = g.getMaterialEx(); - } - catch (Throwable t) { - - } - - - //list.add("Material is Null."); - } - - if (this.isOre) { - if (KeyboardUtils.isCtrlKeyDown()) { - Block b = Block.getBlockFromItem(stack.getItem()); - if (b != null) { - - String aTool = b.getHarvestTool(stack.getItemDamage()); - int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); - - if (this.mMaterial != null) { - list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); - list.add("Contains: "); - if (mMaterial.getComposites().isEmpty()) { - list.add("- " + mMaterial.getLocalizedName()); - } else { - for (MaterialStack m : mMaterial.getComposites()) { - list.add("- " + m.getStackMaterial().getLocalizedName() + " x" + m.getPartsPerOneHundred()); - } - } - } - } - } else { - list.add(EnumChatFormatting.DARK_GRAY + "Hold Ctrl to show additional info."); - } - } - else { - Block b = Block.getBlockFromItem(stack.getItem()); - if (b != null) { - String aTool = b.getHarvestTool(stack.getItemDamage()); - int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); - list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); - } - } - - if (this.mMaterial != null) { - if (this.mMaterial.vRadiationLevel > 0) { - list.add(CORE.GT_Tooltip_Radioactive); - } - } - - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, - final boolean p_77663_5_) { - - if (!isModular && !isOre) { - mMaterial = null; - } else { - if (this.mMaterial == null) { - Block b = Block.getBlockFromItem(iStack.getItem()); - if (isOre) { - mMaterial = ((BlockBaseOre) b).getMaterialEx(); - } else { - mMaterial = ((BlockBaseModular) b).getMaterialEx(); - } - if (mMaterial != null) { - this.sRadiation = mMaterial.vRadiationLevel; - } else { - this.sRadiation = 0; - } - } - if (this.sRadiation > 0) { - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); - } - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java deleted file mode 100644 index 0dd125bf7b..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java +++ /dev/null @@ -1,94 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import java.util.List; - -import gtPlusPlus.core.block.base.BlockBaseModular; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; - -public class ItemBlockGtFrameBox extends ItemBlock{ - - protected int blockColour; - private Material mMaterial; - private int sRadiation; - - public ItemBlockGtFrameBox(final Block block) { - super(block); - final BlockBaseModular baseBlock = (BlockBaseModular) block; - this.blockColour = baseBlock.getRenderColor(1); - - - - if (block instanceof BlockBaseModular){ - BlockBaseModular g = (BlockBaseModular) block; - this.mMaterial = g.getMaterialEx(); - sRadiation = mMaterial.vRadiationLevel; - } - else { - this.mMaterial = null; - sRadiation = 0; - } - - //GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), ItemUtils.getSimpleStack(this)); - } - - public int getRenderColor(final int aMeta) { - return this.blockColour; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.mMaterial != null) { - list.add(this.mMaterial.vChemicalFormula); - if (this.mMaterial.vRadiationLevel > 0) { - list.add(CORE.GT_Tooltip_Radioactive); - } - } else { - list.add("Material is Null."); - } - if (KeyboardUtils.isCtrlKeyDown()) { - Block b = Block.getBlockFromItem(stack.getItem()); - if (b != null) { - String aTool = b.getHarvestTool(stack.getItemDamage()); - int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); - list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); - if (this.mMaterial != null) { - list.add("Contains: "); - if (mMaterial.getComposites().isEmpty()) { - list.add("- " + mMaterial.getLocalizedName()); - } else { - for (MaterialStack m : mMaterial.getComposites()) { - list.add("- " + m.getStackMaterial().getLocalizedName() + " x" + m.getPartsPerOneHundred()); - } - } - } - } - } else { - list.add(EnumChatFormatting.DARK_GRAY + "Hold Ctrl to show additional info."); - } - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, - final boolean p_77663_5_) { - - if (this.sRadiation > 0) { - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java deleted file mode 100644 index b26ac67225..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java +++ /dev/null @@ -1,114 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlockWithMetadata; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -public class ItemBlockMeta extends ItemBlockWithMetadata -{ - private final Block mBlock; - private HashMap> aTooltips = new LinkedHashMap>(); - - public ItemBlockMeta(final Block aBlock) - { - super(aBlock, aBlock); - this.mBlock = aBlock; - this.setMaxDamage(0); - this.setHasSubtypes(true); - if (aBlock instanceof ITileTooltip) { - ITileTooltip aTooltip = (ITileTooltip) aBlock; - //aTooltips.put(aTooltip.getTooltipID(), aTooltip.getTooltipMap()); - } - } - - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - Block aThis = Block.getBlockFromItem(stack.getItem()); - if (aThis != null) { - if (!aTooltips.isEmpty()) { - AutoMap h = aTooltips.get(stack.getItemDamage()); - if (h != null && !h.isEmpty()) { - for (String s : h) { - list.add(s); - } - } - } - } - super.addInformation(stack, aPlayer, list, bool); - } - - /** - * Gets an icon index based on an item's damage value - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(final int p_77617_1_) - { - return this.mBlock.getIcon(2, p_77617_1_); - } - - /** - * Returns the metadata of the block which this Item (ItemBlock) can place - */ - @Override - public int getMetadata(final int p_77647_1_) - { - return p_77647_1_; - } - - @Override - public String getUnlocalizedName(final ItemStack stack) { - return this.getUnlocalizedName() + "." + stack.getItemDamage(); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { - return false; - } - - @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - return false; - } - - @Override - public int getDisplayDamage(ItemStack stack) { - return 0; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - return 0; - } - - @Override - public int getItemEnchantability(ItemStack stack) { - return 0; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java deleted file mode 100644 index 99367c5ef5..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java +++ /dev/null @@ -1,104 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class ItemBlockNBT extends ItemBlock { - - - protected final int mID; - - public ItemBlockNBT(final Block block) { - super(block); - this.mID = ((ITileTooltip) block).getTooltipID(); - } - - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - //if () - - - - if (this.mID == 0){ //blockDarkWorldPortalFrame - list.add("Assembled in the same shape as the Nether Portal."); - } - } - - - - @Override - public void onCreated(ItemStack item, World world, EntityPlayer player) { - addNBT(player, item); - super.onCreated(item, world, player); - } - - @Override - public void onUpdate(ItemStack item, World world, Entity entity, int p_77663_4_, boolean p_77663_5_) { - if (entity instanceof EntityPlayerMP) { - EntityPlayerMP mPlayer = (EntityPlayerMP) entity; - - NBTTagCompound rNBT = item.getTagCompound(); - rNBT = ((rNBT == null) ? new NBTTagCompound() : rNBT); - if (!rNBT.hasKey("mOwner")){ - addNBT(mPlayer, item); - } - } - super.onUpdate(item, world, entity, p_77663_4_, p_77663_5_); - } - - private void addNBT(EntityPlayer player, ItemStack item) { - NBTTagCompound rNBT = item.getTagCompound(); - rNBT = ((rNBT == null) ? new NBTTagCompound() : rNBT); - if (player != null) { - boolean mOP = PlayerUtils.isPlayerOP(player); - rNBT.setString("mOwner", player.getDisplayName()); - rNBT.setString("mUUID", ""+player.getUniqueID()); - rNBT.setBoolean("mOP", mOP); - } - else if (player == null) { - rNBT.setString("mOwner", "fakeplayer"); - rNBT.setString("mUUID", "00000000"); - rNBT.setBoolean("mOP", false); - } - GT_Utility.ItemNBT.setNBT(item, rNBT); - } - - @Override - public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { - if (!(aWorld.setBlock(aX, aY, aZ, this.field_150939_a, 0, 3))) { - return false; - } - if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { - this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); - this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, aMeta); - } - TileEntityBase tTileEntity = (TileEntityBase) aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null && aPlayer != null) { - if (tTileEntity.isServerSide()){ - Logger.INFO("Setting Tile Entity information"); - NBTTagCompound aNBT = GT_Utility.ItemNBT.getNBT(aStack); - tTileEntity.setOwnerInformation(aNBT.getString("mOwner"), aNBT.getString("mUUID"), aNBT.getBoolean("mOP")); - } - } - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java deleted file mode 100644 index e4079521d4..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java +++ /dev/null @@ -1,161 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.block.base.BlockBaseOre; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.everglades.gen.gt.WorldGen_GT_Ore_Layer; - -public class ItemBlockOre extends ItemBlock{ - - private final BlockBaseOre mThisOre; - private final Material mThisMaterial; - private final int mThisRadiation; - private final int mThisColour; - - public ItemBlockOre(final Block block) { - super(block); - if (block instanceof BlockBaseOre){ - this.mThisOre = (BlockBaseOre) block; - this.mThisMaterial = this.mThisOre.getMaterialEx(); - this.mThisRadiation = this.mThisMaterial.vRadiationLevel; - this.mThisColour = this.mThisMaterial.getRgbAsHex(); - } - else { - this.mThisOre = null; - this.mThisMaterial = null; - this.mThisRadiation = 0; - this.mThisColour = Utils.rgbtoHexValue(255, 255, 255); - } - } - - public int getRenderColor(final int aMeta) { - return this.mThisColour; - } - - private static Map> mMapOreBlockItemToDimName = new LinkedHashMap>(); - private static boolean mInitOres_Everglades = false; - private AutoMap mDimsForThisOre = new AutoMap(); - - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - if (!mInitOres_Everglades) { - for (WorldGen_GT_Ore_Layer f : gtPlusPlus.everglades.gen.gt.WorldGen_Ores.validOreveins.values()) { - Material[] m2 = new Material[] {f.mPrimary, f.mSecondary, f.mBetween, f.mSporadic}; - for (Material m1 : m2) { - AutoMap aMap = mMapOreBlockItemToDimName.get(m1.getUnlocalizedName().toLowerCase()); - if (aMap == null) { - aMap = new AutoMap(); - } - String aDimName = "Everglades"; - if (!aMap.containsValue(aDimName)) { - aMap.put(aDimName); - } - mMapOreBlockItemToDimName.put(m1.getUnlocalizedName().toLowerCase(), aMap); - } - } - mInitOres_Everglades = true; - } - - - if (this.mThisMaterial != null){ - list.add(this.mThisMaterial.vChemicalFormula); - } - - //Radioactive? - if (this.mThisRadiation > 0){ - list.add(CORE.GT_Tooltip_Radioactive); - } - - /** - * Tooltip Handler for Ores - */ - if (this.mThisMaterial == FLUORIDES.FLUORITE){ - list.add("Mined from Sandstone with a 1/"+(CORE.ConfigSwitches.chanceToDropFluoriteOre*20)+" chance, or Limestone with a 1/"+(CORE.ConfigSwitches.chanceToDropFluoriteOre)+" chance."); - } - - if (this.mThisMaterial != null) { - list.add("Ore contains: "); - if (mThisMaterial.getComposites().isEmpty()) { - list.add("- "+mThisMaterial.getLocalizedName()); - } - else { - for (MaterialStack m : mThisMaterial.getComposites()) { - list.add("- "+m.getStackMaterial().getLocalizedName()+" x"+m.getPartsPerOneHundred()); - } - } - } - - if (KeyboardUtils.isCtrlKeyDown()) { - - Block b = Block.getBlockFromItem(stack.getItem()); - if (b != null) { - String aTool = b.getHarvestTool(stack.getItemDamage()); - int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); - if (aMiningLevel1 != 0) { - list.add("Mining Level: "+Math.min(Math.max(aMiningLevel1, 0), 5)); - } - } - - if (mDimsForThisOre.isEmpty()) { - AutoMap A = mMapOreBlockItemToDimName.get(this.mThisMaterial.getUnlocalizedName().toLowerCase()); - if (A != null) { - mDimsForThisOre = A; - } - } - - list.add("Found: "); - if (!mDimsForThisOre.isEmpty()) { - for (String m : mDimsForThisOre) { - list.add("- "+m); - } - } - else { - list.add("- Unknown"); - } - - } - else { - list.add(EnumChatFormatting.DARK_GRAY+"Hold Ctrl to show additional info."); - } - - - - - - - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (this.mThisMaterial != null){ - if (this.mThisRadiation > 0){ - if (entityHolding instanceof EntityPlayer){ - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.mThisMaterial.vRadiationLevel, world, entityHolding); - } - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java deleted file mode 100644 index 7a4222ed0f..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java +++ /dev/null @@ -1,115 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlockWithMetadata; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -public class ItemBlockRoundRobinator extends ItemBlockWithMetadata -{ - private final Block mBlock; - - public ItemBlockRoundRobinator(final Block aBlock){ - super(aBlock, aBlock); - this.mBlock = aBlock; - } - - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add("Attempts to output items evenly on all four horizontal planes"); - if (stack.getItemDamage() == 0) { - list.add("1 Item per enabled side every 400 ticks"); - } - else if (stack.getItemDamage() == 1) { - list.add("1 Item per enabled side every 100 ticks"); - } - else if (stack.getItemDamage() == 2) { - list.add("1 Item per enabled side every 20 ticks"); - } - else if (stack.getItemDamage() == 3) { - list.add("1 Item per enabled side every 10 ticks"); - } - else if (stack.getItemDamage() == 4) { - list.add("1 Item per enabled side every tick"); - } - list.add("Top and bottom do not pull, so you must push items in"); - list.add("Sides can also be disabled with a screwdriver"); - list.add("Shift+RMB with empty hand to view inventory contents"); - super.addInformation(stack, aPlayer, list, bool); - } - - /** - * Gets an icon index based on an item's damage value - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(final int p_77617_1_) - { - return this.mBlock.getIcon(0, p_77617_1_); - } - - /** - * Returns the metadata of the block which this Item (ItemBlock) can place - */ - @Override - public int getMetadata(final int p_77647_1_) - { - return p_77647_1_; - } - - @Override - public String getUnlocalizedName(final ItemStack stack) { - return this.getUnlocalizedName() + "." + stack.getItemDamage(); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { - return false; - } - - @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - return false; - } - - @Override - public int getDisplayDamage(ItemStack stack) { - return 0; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - return 0; - } - - @Override - public int getItemEnchantability(ItemStack stack) { - return 0; - } - - @Override - public boolean getHasSubtypes() { - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java deleted file mode 100644 index 53c9cdb193..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.item.base.itemblock; - -import java.util.List; - -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; -import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -public class ItemBlockSpawner extends ItemBlockMeta{ - - private final Block mBlock; - - public ItemBlockSpawner(Block aBlock) { - super(aBlock); - mBlock = aBlock; - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aBool) { - if (mBlock != null) { - int x = this.getMetadata(aStack.getItemDamage()); - if (x >= 0) { - try { - EntityRegistration x1 = EntityRegistry.instance().lookupModSpawn(TileEntityGenericSpawner.mSpawners.get(x), false); - if (x1 != null) { - aList.add(EnumChatFormatting.RED+x1.getEntityName()); - } - } - catch (Throwable t) {} - } - } - super.addInformation(aStack, aPlayer, aList, aBool); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java deleted file mode 100644 index 25070ad817..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java +++ /dev/null @@ -1,174 +0,0 @@ -package gtPlusPlus.core.item.base.misc; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemMisc extends Item{ - - public final String displayName; - public final String unlocalName; - public final MiscTypes miscType; - public final Object componentColour; - public final String[] description; - - public BaseItemMisc( - final String displayName, - final short[] RGB, - final int maxStackSize, - final MiscTypes miscType, - String[] description) { - - //Set-up the Misc Generic Item - this.displayName = displayName; - String unlocalName = Utils.sanitizeString(displayName); - this.unlocalName = "item"+miscType.TYPE+unlocalName; - this.miscType = miscType; - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(maxStackSize); - //this.setTextureName(this.getCorrectTextures()); - if (RGB != null){ - this.componentColour = Utils.rgbtoHexValue(RGB[0], RGB[1], RGB[2]); - } - else { - this.componentColour = null; - } - this.description = description; - GameRegistry.registerItem(this, this.unlocalName); - GT_OreDictUnificator.registerOre(miscType.getOreDictPrefix()+unlocalName, ItemUtils.getSimpleStack(this)); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return this.displayName+miscType.DISPLAY_NAME_SUFFIX; - } - - private String getCorrectTextures(){ - return CORE.MODID + ":" + "item"+this.miscType.TYPE; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() { - return this.miscType == MiscTypes.DROP; - } - - @Override - public int getRenderPasses(int meta) { - return (this.miscType == MiscTypes.DROP) ? 2 : 1; - } - - @SideOnly(Side.CLIENT) - private IIcon secondIcon; - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { - if (this.miscType == MiscTypes.DROP && LoadedMods.Forestry){ - this.itemIcon = par1IconRegister.registerIcon("forestry:honeyDrop.0"); - this.secondIcon = par1IconRegister.registerIcon("forestry:honeyDrop.1"); - } - else { - this.itemIcon = par1IconRegister.registerIcon(getCorrectTextures()); - } - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return (pass == 0) ? itemIcon : secondIcon; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.description != null){ //Incase I don't add one - if (this.description.length > 0){ //Incase I somehow add a blank one - for (int x=0;x aColourMap = new LinkedHashMap (); - private final int aMaxCount; - - public BaseItemParticle(String aType, int aCount, EnumRarity aRarity) { - super("particle"+aType, aType, AddToCreativeTab.tabOther, 64, 0, new String[] {}, aRarity, EnumChatFormatting.DARK_AQUA, false, null); - this.setTextureName(CORE.MODID + ":" + "science/Atom"); - aMaxCount = aCount; - this.setHasSubtypes(true); - - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return aColourMap.get(stack.getItemDamage()); - } - - public int getColorFromParentClass(ItemStack stack, int aaa) { - return super.getColorFromItemStack(stack, aaa); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < aMaxCount; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - - @Override - public final String getItemStackDisplayName(final ItemStack tItem) { - String aReturnValue = super.getItemStackDisplayName(tItem); - String[] a2 = getAffixes(); - aReturnValue = (a2[0] + aReturnValue + a2[1]); - return aReturnValue; - } - - public abstract String[] getAffixes(); - -} diff --git a/src/Java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java b/src/Java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java deleted file mode 100644 index 1644856bf8..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.core.item.base.nugget; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemNugget extends BaseItemComponent{ - - public BaseItemNugget(final Material material) { - super(material, BaseItemComponent.ComponentTypes.NUGGET); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java deleted file mode 100644 index 73a13f568d..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import gtPlusPlus.core.material.Material; - -public class BaseItemCentrifugedCrushedOre extends BaseOreComponent{ - - public BaseItemCentrifugedCrushedOre(final Material material) { - super(material, BaseOreComponent.ComponentTypes.CRUSHEDCENTRIFUGED); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java deleted file mode 100644 index f2ca40334f..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import gtPlusPlus.core.material.Material; - -public class BaseItemCrushedOre extends BaseOreComponent{ - - public BaseItemCrushedOre(final Material material) { - super(material, BaseOreComponent.ComponentTypes.CRUSHED); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java deleted file mode 100644 index 45dc4f4402..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import gtPlusPlus.core.material.Material; - -public class BaseItemImpureDust extends BaseOreComponent{ - - public BaseItemImpureDust(final Material material) { - super(material, BaseOreComponent.ComponentTypes.DUSTIMPURE); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java deleted file mode 100644 index 4edf4ae75d..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import gregtech.api.enums.Materials; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import net.minecraft.item.Item; - -public class BaseItemMilledOre extends BaseOreComponent{ - - public BaseItemMilledOre(final Material material, int aMaterialEU) { - super(material, BaseOreComponent.ComponentTypes.MILLED); - CORE.RA.addMillingRecipe(material, aMaterialEU); - } - - public static Item generate(Materials aMat, int aMaterialEU) { - return generate(MaterialUtils.generateMaterialFromGtENUM(aMat), aMaterialEU); - } - - public static Item generate(Material aMat, int aMaterialEU) { - return new BaseItemMilledOre(aMat, aMaterialEU); - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java deleted file mode 100644 index 3f2a1c23e6..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import gtPlusPlus.core.material.Material; - -public class BaseItemPurifiedCrushedOre extends BaseOreComponent{ - - public BaseItemPurifiedCrushedOre(final Material material) { - super(material, BaseOreComponent.ComponentTypes.CRUSHEDPURIFIED); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java deleted file mode 100644 index 0c9816fb56..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import gtPlusPlus.core.material.Material; - -public class BaseItemPurifiedDust extends BaseOreComponent{ - - public BaseItemPurifiedDust(final Material material) { - super(material, BaseOreComponent.ComponentTypes.DUSTPURE); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java deleted file mode 100644 index 2cb23b3f97..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java +++ /dev/null @@ -1,279 +0,0 @@ -package gtPlusPlus.core.item.base.ore; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class BaseOreComponent extends Item{ - - @SideOnly(Side.CLIENT) - private IIcon base; - @SideOnly(Side.CLIENT) - private IIcon overlay; - - public final Material componentMaterial; - public final String materialName; - public final String unlocalName; - public final ComponentTypes componentType; - public final int componentColour; - public Object extraData; - - public BaseOreComponent(final Material material, final ComponentTypes componentType) { - this.componentMaterial = material; - this.unlocalName = componentType.COMPONENT_NAME+material.getUnlocalizedName(); - this.materialName = material.getLocalizedName(); - this.componentType = componentType; - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(this.unlocalName); - this.setMaxStackSize(64); - this.componentColour = material.getRgbAsHex(); - GameRegistry.registerItem(this, this.unlocalName); - registerComponent(); - GT_OreDictUnificator.registerOre(componentType.getComponent()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); - if (LoadedMods.Thaumcraft) { - //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1); - if (componentMaterial.isRadioactive) { - //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel); - } - } - - } - - public boolean registerComponent() { - Logger.MATERIALS("Attempting to register "+this.getUnlocalizedName()+"."); - if (this.componentMaterial == null) { - Logger.MATERIALS("Tried to register "+this.getUnlocalizedName()+" but the material was null."); - return false; - } - //Register Component - Map aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName()); - if (aMap == null) { - aMap = new HashMap(); - } - String aKey = "Invalid"; - if (componentType == ComponentTypes.CRUSHED) { - aKey = OrePrefixes.crushed.name(); - } - else if (componentType == ComponentTypes.CRUSHEDCENTRIFUGED) { - aKey = OrePrefixes.crushedCentrifuged.name(); - } - else if (componentType == ComponentTypes.CRUSHEDPURIFIED) { - aKey = OrePrefixes.crushedPurified.name(); - } - else if (componentType == ComponentTypes.DUST) { - aKey = OrePrefixes.dust.name(); - } - else if (componentType == ComponentTypes.DUSTIMPURE) { - aKey = OrePrefixes.dustImpure.name(); - } - else if (componentType == ComponentTypes.DUSTPURE) { - aKey = OrePrefixes.dustPure.name(); - } - else if (componentType == ComponentTypes.MILLED) { - aKey = CustomOrePrefix.milled.get().name(); - } - - ItemStack x = aMap.get(aKey); - if (x == null) { - aMap.put(aKey, ItemUtils.getSimpleStack(this)); - Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); - Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); - return true; - } - else { - //Bad - Logger.MATERIALS("Tried to double register a material component. "); - return false; - } - } - - /*@Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); - }*/ - - public final String getMaterialName() { - return this.materialName; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.materialName != null && !this.materialName.equals("")){ - if (this.componentMaterial != null){ - if (!this.componentMaterial.vChemicalFormula.contains("?")) { - list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula)); - } - else if (this.componentMaterial.vChemicalFormula.contains("?")) { - String temp = componentMaterial.vChemicalFormula; - temp = temp.replace(" ", ""); - temp = temp.replace("-", ""); - temp = temp.replace("_", ""); - temp = temp.replace("!", ""); - temp = temp.replace("@", ""); - temp = temp.replace("#", ""); - temp = temp.replace(" ", ""); - list.add(temp); - } - if (this.componentMaterial.isRadioactive){ - list.add(CORE.GT_Tooltip_Radioactive+" | Level: "+this.componentMaterial.vRadiationLevel); - } - } - else { - String aChemicalFormula = Material.sChemicalFormula.get(materialName.toLowerCase()); - if (aChemicalFormula != null && aChemicalFormula.length() > 0) { - list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula)); - } - } - } - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (this.componentMaterial != null){ - if (entityHolding instanceof EntityPlayer){ - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.componentMaterial.vRadiationLevel, world, entityHolding); - } - } - } - } - - - - /** - * Rendering Related - * @author Alkalus - * - */ - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses(){ - if (this.componentType.hasOverlay()){ - return true; - } - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(final IIconRegister par1IconRegister){ - if (this.componentType == ComponentTypes.MILLED) { - this.base = par1IconRegister.registerIcon(CORE.MODID + ":" + "processing/MilledOre/milled"); - if (this.componentType.hasOverlay()){ - this.overlay = par1IconRegister.registerIcon(CORE.MODID + ":" + "processing/MilledOre/milled_OVERLAY"); - } - } - else if (CORE.ConfigSwitches.useGregtechTextures){ - //Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"' as the layer 0 texture path."); - this.base = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME); - if (this.componentType.hasOverlay()){ - //Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"_OVERLAY"+"' as the layer 1 texture path."); - this.overlay = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"_OVERLAY"); - } - } - else { - this.base = par1IconRegister.registerIcon(CORE.MODID + ":" + "item"+this.componentType.getComponent()); - if (this.componentType.hasOverlay()){ - this.overlay = par1IconRegister.registerIcon(CORE.MODID + ":" + "item"+this.componentType.getComponent()+"_Overlay"); - } - } - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int renderPass) { - if (this.componentType == ComponentTypes.MILLED) { - if (renderPass == 1){ - return Utils.rgbtoHexValue(230, 230, 230); - } - return this.componentColour; - } - else { - if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ - return this.componentColour; - } - if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ - return Utils.rgbtoHexValue(230, 230, 230); - } - return this.componentColour; - } - } - - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - if(pass == 0) { - return this.base; - } - return this.overlay; - } - - - - - public static enum ComponentTypes { - DUST("dust", "", " Dust", true), - DUSTIMPURE("dustImpure", "Impure ", " Dust", true), - DUSTPURE("dustPure", "Purified ", " Dust", true), - CRUSHED("crushed", "Crushed ", " Ore", true), - CRUSHEDCENTRIFUGED("crushedCentrifuged", "Centrifuged Crushed "," Ore", true), - CRUSHEDPURIFIED("crushedPurified", "Purified Crushed ", " Ore", true), - MILLED("milled", "Milled ", " Ore", true); - - private String COMPONENT_NAME; - private String PREFIX; - private String DISPLAY_NAME; - private boolean HAS_OVERLAY; - private ComponentTypes (final String LocalName, final String prefix, final String DisplayName, final boolean overlay){ - this.COMPONENT_NAME = LocalName; - this.PREFIX = prefix; - this.DISPLAY_NAME = DisplayName; - this.HAS_OVERLAY = overlay; - // dust + Dirty, Impure, Pure, Refined - // crushed + centrifuged, purified - } - - public String getComponent(){ - return this.COMPONENT_NAME; - } - - public String getName(){ - return this.DISPLAY_NAME; - } - - public boolean hasOverlay(){ - return this.HAS_OVERLAY; - } - - public String getPrefix(){ - return this.PREFIX; - } - } - -} - - diff --git a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java b/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java deleted file mode 100644 index a810b22c70..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.core.item.base.plates; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.minecraft.MaterialUtils; - -public class BaseItemPlate extends BaseItemComponent{ - - public BaseItemPlate(final Material material) { - super(material, BaseItemComponent.ComponentTypes.PLATE); - } - - public BaseItemPlate(final String unlocalizedName, final String materialName, final MaterialState state, final short[] colour, final int tier, final int sRadioactivity) { - this(MaterialUtils.generateQuickMaterial(materialName, state, new short[]{colour[0], colour[1], colour[2], 0}, sRadioactivity)); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java b/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java deleted file mode 100644 index 31f86e8ffa..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.core.item.base.plates; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemPlateDouble extends BaseItemComponent{ - - public BaseItemPlateDouble(final Material material) { - super(material, BaseItemComponent.ComponentTypes.PLATEDOUBLE); - this.setMaxStackSize(32); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return ("Double "+this.materialName+ " Plate"); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java b/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java deleted file mode 100644 index c9072b0d82..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.core.item.base.plates; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; - -public class BaseItemPlateHeavy extends BaseItemComponent{ - - final static ComponentTypes HEAVY = ComponentTypes.PLATEHEAVY; - - public BaseItemPlateHeavy(final Material material) { - super(material, HEAVY); - } - - @Override - public String getCorrectTextures(){ - return CORE.MODID + ":" + "itemHeavyPlate"; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses(){ - return true; - } - - @Override - public void registerIcons(final IIconRegister i) { - this.base = i.registerIcon(CORE.MODID + ":" + "itemHeavyPlate"); - this.overlay = i.registerIcon(CORE.MODID + ":" + "itemHeavyPlate_Overlay"); - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - - if (pass == 0) { - return this.base; - } - else { - return this.overlay; - } - - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java b/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java deleted file mode 100644 index ec3f449b0a..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java +++ /dev/null @@ -1,95 +0,0 @@ -package gtPlusPlus.core.item.base.plates; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class BaseItemPlate_OLD extends Item{ - - protected final int colour; - protected final int sRadiation; - protected final String materialName; - protected final String unlocalName; - protected final String chemicalNotation; - - public BaseItemPlate_OLD(final String unlocalizedName, final String materialName, final int colour, final int sRadioactivity) { - this(unlocalizedName, materialName, "NullFormula", colour, sRadioactivity); - } - - public BaseItemPlate_OLD(final String unlocalizedName, final String materialName, final String mChemicalFormula, final int colour, final int sRadioactivity) { - this.setUnlocalizedName("itemPlate"+unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.unlocalName = "itemPlate"+unlocalizedName; - this.setMaxStackSize(64); - this.setTextureName(CORE.MODID + ":" + "itemPlate"); - this.setMaxStackSize(64); - this.colour = colour; - this.materialName = materialName; - if (mChemicalFormula.equals("") || mChemicalFormula.equals("NullFormula")){ - this.chemicalNotation = StringUtils.subscript(materialName); - } - else { - this.chemicalNotation = StringUtils.subscript(mChemicalFormula); - } - this.sRadiation = sRadioactivity; - GameRegistry.registerItem(this, "itemPlate"+unlocalizedName); - String temp; - if (this.unlocalName.toLowerCase().contains("itemplate")){ - temp = this.unlocalName.replace("itemP", "p"); - if ((temp != null) && !temp.equals("")){ - GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); - } - } - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return (this.materialName+ " plate"); - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.colour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.colour; - - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.sRadiation > 0){ - list.add(CORE.GT_Tooltip_Radioactive); - } - if (StringUtils.containsSuperOrSubScript(this.chemicalNotation)){ - list.add(this.chemicalNotation); - } - super.addInformation(stack, aPlayer, list, bool); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/rings/BaseItemRing.java b/src/Java/gtPlusPlus/core/item/base/rings/BaseItemRing.java deleted file mode 100644 index c83ae94af1..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/rings/BaseItemRing.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.core.item.base.rings; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemRing extends BaseItemComponent{ - - public BaseItemRing(final Material material) { - super(material, BaseItemComponent.ComponentTypes.RING); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java deleted file mode 100644 index f77f846d34..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.core.item.base.rods; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemRod extends BaseItemComponent{ - - public BaseItemRod(final Material material) { - super(material, BaseItemComponent.ComponentTypes.ROD); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java deleted file mode 100644 index 215012817d..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.core.item.base.rods; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; -import net.minecraft.item.ItemStack; - -public class BaseItemRodLong extends BaseItemComponent{ - - public BaseItemRodLong(final Material material) { - super(material, BaseItemComponent.ComponentTypes.RODLONG); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return ("Long "+this.materialName+ " Rod"); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java b/src/Java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java deleted file mode 100644 index 6960e89e89..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.base.rotors; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemRotor extends BaseItemComponent{ - - public BaseItemRotor(final Material material) { - super(material, BaseItemComponent.ComponentTypes.ROTOR); - } -} diff --git a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java deleted file mode 100644 index dbd817215a..0000000000 --- a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.core.item.base.screws; - -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.material.Material; - -public class BaseItemScrew extends BaseItemComponent{ - - public BaseItemScrew(final Material material) { - super(material, BaseItemComponent.ComponentTypes.SCREW); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/BaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/BaseBauble.java deleted file mode 100644 index fdd148b97b..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/BaseBauble.java +++ /dev/null @@ -1,190 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import com.google.common.collect.HashMultimap; -import com.google.common.collect.Multimap; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; - -import baubles.api.BaubleType; -import baubles.api.IBauble; -import baubles.common.container.InventoryBaubles; -import baubles.common.lib.PlayerHandler; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import net.minecraftforge.event.entity.living.LivingAttackEvent; - -@Optional.InterfaceList(value = { @Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), - @Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles") }) -public class BaseBauble extends Item implements IBauble { - - /** - * Implementation suggestions taken from Botania. - */ - - private BaubleType mThisBauble; - private final String mDisplayName; - private List damageNegations = new ArrayList(); - Multimap attributes = HashMultimap.create(); - - public BaseBauble(BaubleType type, String displayName) { - this.mThisBauble = type; - this.mDisplayName = displayName; - Utils.registerEvent(this); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName(Utils.sanitizeString(displayName.toLowerCase())); - GameRegistry.registerItem(this, getUnlocalizedName()); - } - - public BaseBauble(BaubleType type, String unlocalName, int register) { - this.mThisBauble = type; - this.mDisplayName = ""; - Utils.registerEvent(this); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabMisc); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - if (this.mDisplayName == null || this.mDisplayName.length() < 1) { - return super.getItemStackDisplayName(tItem).replaceAll(".name", ""); - } - return this.mDisplayName; - } - - @SubscribeEvent - public void onPlayerAttacked(LivingAttackEvent event) { - if (event.entityLiving instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) event.entityLiving; - if (getCorrectBauble(player) != null && damageNegations.contains(event.source.damageType)) - event.setCanceled(true); - } - } - - public boolean addDamageNegation(DamageSource damageSource) { - return addDamageNegation(damageSource, null); - } - - public boolean addDamageNegation(DamageSource damageSource, ItemStack aStack) { - return damageNegations.add(damageSource.damageType); - } - - public void clearDamageNegation() { - damageNegations.clear(); - } - - @Override - public boolean canEquip(ItemStack arg0, EntityLivingBase arg1) { - return EntityPlayer.class.isInstance(arg1) ? true : false; - } - - @Override - public boolean canUnequip(ItemStack arg0, EntityLivingBase arg1) { - return EntityPlayer.class.isInstance(arg1) ? true : false; - } - - @Override - public BaubleType getBaubleType(ItemStack arg0) { - return mThisBauble; - } - - public boolean SetBaubleType(BT arg0) { - return SetBaubleType(arg0.getType()); - } - - public boolean SetBaubleType(BaubleType arg0) { - BaubleType temp = this.mThisBauble; - this.mThisBauble = arg0; - if (this.mThisBauble != temp) { - return true; - } - return false; - } - - @Override - public void onEquipped(ItemStack stack, EntityLivingBase entity) { - if (entity != null && EntityPlayer.class.isInstance(entity)) { - onEquippedOrLoadedIntoWorld(stack, entity); - setPlayerHashcode(stack, entity.hashCode()); - } - } - - @Override - public void onWornTick(ItemStack stack, EntityLivingBase player) { - if (getPlayerHashcode(stack) != player.hashCode()) { - onEquippedOrLoadedIntoWorld(stack, player); - setPlayerHashcode(stack, player.hashCode()); - } - } - - public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) { - attributes.clear(); - fillModifiers(attributes, stack); - player.getAttributeMap().applyAttributeModifiers(attributes); - } - - @Override - public void onUnequipped(ItemStack stack, EntityLivingBase player) { - attributes.clear(); - fillModifiers(attributes, stack); - player.getAttributeMap().removeAttributeModifiers(attributes); - } - - void fillModifiers(Multimap attributes, ItemStack stack) { - - } - - public ItemStack getCorrectBauble(EntityPlayer player) { - InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player); - ItemStack stack1 = baubles.getStackInSlot(1); - ItemStack stack2 = baubles.getStackInSlot(2); - return isCorrectBauble(stack1) ? stack1 : isCorrectBauble(stack2) ? stack2 : null; - } - - private boolean isCorrectBauble(ItemStack stack) { - return stack != null && (stack.getItem() == this); - } - - @Override - public int getEntityLifespan(ItemStack itemStack, World world) { - return Integer.MAX_VALUE; - } - - public static UUID getBaubleUUID(ItemStack stack) { - long most = NBTUtils.getLong(stack, "baubleUUIDMost"); - if (most == 0) { - UUID uuid = UUID.randomUUID(); - NBTUtils.setLong(stack, "baubleUUIDMost", uuid.getMostSignificantBits()); - NBTUtils.setLong(stack, "baubleUUIDLeast", uuid.getLeastSignificantBits()); - return getBaubleUUID(stack); - } - - long least = NBTUtils.getLong(stack, "baubleUUIDLeast"); - return new UUID(most, least); - } - - public static int getPlayerHashcode(ItemStack stack) { - return NBTUtils.getInteger(stack, "mPlayerHashcode"); - } - - public static void setPlayerHashcode(ItemStack stack, int hash) { - NBTUtils.setInteger(stack, "mPlayerHashcode", hash); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java deleted file mode 100644 index 70de4603e7..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java +++ /dev/null @@ -1,259 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.util.List; - -import baubles.api.BaubleType; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -public class BatteryPackBaseBauble extends ElectricBaseBauble { - - - public BatteryPackBaseBauble(int tier) { - super(BaubleType.BELT, tier, GT_Values.V[tier] * 20 * 300, "GTPP.BattPack.0" + tier + ".name"); - String aUnlocalName = "GTPP.BattPack.0" + tier + ".name"; - this.setCreativeTab(AddToCreativeTab.tabMachines); - if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) { - GameRegistry.registerItem(this, aUnlocalName); - } - } - - @SideOnly(Side.CLIENT) - @Override - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - ItemStack charged; - if (this.getEmptyItem(itemStack) == this) { - charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - if (this.getChargedItem(itemStack) == this) { - charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, - final boolean p_77663_5_) { - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public boolean canProvideEnergy(final ItemStack itemStack) { - double aItemCharge = ElectricItem.manager.getCharge(itemStack); - return aItemCharge > 0; - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (EnumChatFormatting.BLUE + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) { - return true; - } - - public int secondsLeft(final ItemStack stack) { - double r = 0; - r = this.getCharge(stack) / (10000 * 20); - return (int) MathUtils.decimalRounding(r); - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(""); - String aString1 = StatCollector.translateToLocal("GTPP.battpack.tooltip.1"); - String aString2 = StatCollector.translateToLocal("GTPP.battpack.tooltip.2"); - String aString3 = StatCollector.translateToLocal("GTPP.battpack.tooltip.3"); - String aString4 = StatCollector.translateToLocal("GTPP.battpack.tooltip.4"); - - String aEU = StatCollector.translateToLocal("GTPP.info.eu"); - String aEUT = aEU+"/t"; - - list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN + aString2+" " + (int) getTransferLimit(stack) + aEUT +" "+ aString3 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN + aString4 + EnumChatFormatting.GRAY); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public String getToolTip(final ItemStack stack) { - return ElectricItem.manager.getToolTip(stack); - } - - @Override - public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override // TODO - public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { - - } - - @Override // TODO - public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { - - } - - @Override // TODO - public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayer) { - if (!aPlayer.worldObj.isRemote) { - - try { - - if (this.getCharge(aBaubleStack) >= getTransferLimit(aBaubleStack)) { - // Try Iterate Armour Slots of Player - if (aPlayer instanceof EntityPlayer) { - - // amour - for (final ItemStack aInvStack : ((EntityPlayer) aPlayer).inventory.armorInventory) { - if (aInvStack != null) { - if (aInvStack == aBaubleStack) { - continue; - } - if (ChargingHelper.isItemValid(aInvStack)) { - double aTransferRate = 0; - final IElectricItem electricItem = (IElectricItem) aInvStack.getItem(); - if (electricItem != null) { - aTransferRate = electricItem.getTransferLimit(aInvStack); - double aItemCharge = ElectricItem.manager.getCharge(aInvStack); - if (aItemCharge >= 0 && aItemCharge != electricItem.getMaxCharge(aInvStack)) { - if (aItemCharge <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { - if (ElectricItem.manager.getCharge(aBaubleStack) >= aTransferRate) { - if (ElectricItem.manager.getCharge(aInvStack) <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { - double d = ElectricItem.manager.charge(aInvStack, aTransferRate * 16, mTier, false, true); - if (d > 0) { - d = ElectricItem.manager.charge(aInvStack, aTransferRate * 16, mTier, false, false); - ElectricItem.manager.discharge(aBaubleStack, d, mTier, false, true, false); - //Logger.INFO("Charging " + aInvStack.getDisplayName() + " | " + d + " | "+electricItem.getMaxCharge(aInvStack)); - } - } - else { - //Logger.INFO("5"); - } - } - else { - //Logger.INFO("4"); - } - } - else { - //Logger.INFO("3"); - } - - } - else { - //Logger.INFO("1"); - } - } - - } - } - if (this.getCharge(aBaubleStack) > 0) { - continue; - } else { - break; - } - } - - // Hotbar Slots - int aSlotCounter = 0; - for (final ItemStack aInvStack : ((EntityPlayer) aPlayer).inventory.mainInventory) { - if (aSlotCounter > (InventoryPlayer.getHotbarSize() - 1)) { - break; - } - aSlotCounter++; - if (aInvStack != null) { - if (aInvStack == aBaubleStack) { - continue; - } - if (ChargingHelper.isItemValid(aInvStack)) { - double aTransferRate = 0; - final IElectricItem electricItem = (IElectricItem) aInvStack.getItem(); - if (electricItem != null) { - aTransferRate = electricItem.getTransferLimit(aInvStack); - double aItemCharge = ElectricItem.manager.getCharge(aInvStack); - if (aItemCharge >= 0 && aItemCharge != electricItem.getMaxCharge(aInvStack)) { - if (aItemCharge <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { - if (ElectricItem.manager.getCharge(aBaubleStack) >= aTransferRate) { - if (ElectricItem.manager.getCharge(aInvStack) <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { - double d = ElectricItem.manager.charge(aInvStack, aTransferRate, mTier, false, true); - if (d > 0) { - d = ElectricItem.manager.charge(aInvStack, aTransferRate, mTier, false, false); - ElectricItem.manager.discharge(aBaubleStack, d, mTier, false, true, false); - //Logger.INFO("Charging " + aInvStack.getDisplayName() + " | " + d + " | "+electricItem.getMaxCharge(aInvStack)); - } - } - else { - //Logger.INFO("5"); - } - } - else { - //Logger.INFO("4"); - } - } - else { - //Logger.INFO("3"); - } - - } - else { - //Logger.INFO("1"); - } - } - } - } - if (this.getCharge(aBaubleStack) > 0) { - continue; - } else { - break; - } - } - } - } - } - catch (Throwable t) { - - } - } - - - - - } - - @Override - public String getTextureNameForBauble() { - return "chargepack/"+mTier; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java deleted file mode 100644 index 4316f13401..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java +++ /dev/null @@ -1,197 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.util.List; - -import baubles.api.BaubleType; -import baubles.api.IBauble; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import ic2.api.item.IElectricItemManager; -import net.minecraft.creativetab.CreativeTabs; -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.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -@Optional.InterfaceList(value = { @Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), -@Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles") }) -public abstract class ElectricBaseBauble extends BaseBauble implements IElectricItem, IElectricItemManager, IBauble { - - public final int mTier; - private final double maxValueEU; - private final BaubleType mType; - - public ElectricBaseBauble(BaubleType aType, int aTier, double aMaxEU, String aUnlocalName) { - super(aType, aUnlocalName, 0); - mType = aType; - mTier = aTier; - maxValueEU = aMaxEU; - this.setUnlocalizedName(aUnlocalName); - this.setTextureName(CORE.MODID + ":" + getTextureNameForBauble()); - this.setMaxDamage(27); - this.setMaxStackSize(1); - this.setNoRepair(); - this.setCreativeTab(AddToCreativeTab.tabMachines); - if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) { - GameRegistry.registerItem(this, aUnlocalName); - } - } - - public abstract String getTextureNameForBauble(); - - @SuppressWarnings("unchecked") - @SideOnly(Side.CLIENT) - @Override - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - ItemStack charged; - if (this.getEmptyItem(itemStack) == this) { - charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - if (this.getChargedItem(itemStack) == this) { - charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, - final boolean p_77663_5_) { - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public boolean canProvideEnergy(final ItemStack itemStack) { - double aItemCharge = ElectricItem.manager.getCharge(itemStack); - return aItemCharge > 0; - } - - @Override - public final Item getChargedItem(final ItemStack itemStack) { - final ItemStack x = itemStack.copy(); - x.setItemDamage(27); - return x.getItem(); - } - - @Override - public final Item getEmptyItem(final ItemStack itemStack) { - final ItemStack x = itemStack.copy(); - x.setItemDamage(0); - return x.getItem(); - } - - @Override - public final double getMaxCharge(final ItemStack itemStack) { - return maxValueEU; - } - - @Override - public final int getTier(final ItemStack itemStack) { - return mTier; - } - - @Override - public final double getTransferLimit(final ItemStack itemStack) { - return GT_Values.V[mTier]; - } - - @Override - public final double getDurabilityForDisplay(final ItemStack stack) { - return 1.0D - (this.getCharge(stack) / this.getMaxCharge(stack)); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) { - return true; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(""); - String aEuInfo = StatCollector.translateToLocal("GTPP.info.euInfo"); - String aTier = StatCollector.translateToLocal("GTPP.machines.tier"); - String aInputLimit = StatCollector.translateToLocal("GTPP.info.inputLimit"); - String aCurrentPower = StatCollector.translateToLocal("GTPP.info.currentPower"); - String aEU = StatCollector.translateToLocal("GTPP.info.eu"); - String aEUT = aEU+"/t"; - - list.add(EnumChatFormatting.GOLD + aEuInfo + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GRAY + aTier+": [" + EnumChatFormatting.YELLOW + this.getTier(stack) - + EnumChatFormatting.GRAY + "] "+aInputLimit+": [" + EnumChatFormatting.YELLOW - + this.getTransferLimit(stack) + EnumChatFormatting.GRAY + aEUT+"]"); - list.add(EnumChatFormatting.GRAY + aCurrentPower +": [" + EnumChatFormatting.YELLOW + (long) this.getCharge(stack) - + EnumChatFormatting.GRAY + aEU +"] [" + EnumChatFormatting.YELLOW - + MathUtils.findPercentage(this.getCharge(stack), this.getMaxCharge(stack)) + EnumChatFormatting.GRAY - + "%]"); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public final double charge(final ItemStack stack, final double amount, final int tier, final boolean ignoreTransferLimit, - final boolean simulate) { - /*if (!simulate) { - ElectricItem.manager.charge(stack, amount, tier, true, simulate); - }*/ - - return ElectricItem.manager.charge(stack, amount, tier, true, simulate); - } - - @Override - public final double discharge(final ItemStack stack, final double amount, final int tier, - final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) { - /*if (!simulate) { - ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); - }*/ - - return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); - } - - @Override - public final double getCharge(final ItemStack stack) { - return ElectricItem.manager.getCharge(stack); - } - - @Override - public final boolean canUse(final ItemStack stack, final double amount) { - return ElectricItem.manager.canUse(stack, amount); - } - - @Override - public final boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) { - return ElectricItem.manager.use(stack, amount, entity); - } - - @Override - public final void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) { - ElectricItem.manager.chargeFromArmor(stack, entity); - } - - @Override - public String getToolTip(final ItemStack stack) { - //return ElectricItem.manager.getToolTip(stack); - return null; - } - - @Override - public final BaubleType getBaubleType(final ItemStack arg0) { - return mType; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java b/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java deleted file mode 100644 index 6a8751b682..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java +++ /dev/null @@ -1,137 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.UUID; - -import baubles.api.BaubleType; -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.DevHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -public class FireProtectionBauble extends BaseBauble { - - public static HashMap mDataMap = new HashMap(); - public static HashSet mPlayerMap = new HashSet(); - - private static Field isImmuneToFire; - - static { - isImmuneToFire = ReflectionUtils.getField(Entity.class, DevHelper.isObfuscatedEnvironment() ? "func_70045_F" : "isImmuneToFire"); - } - - public static boolean fireImmune(Entity aEntity) { - return aEntity.isImmuneToFire(); - } - - public static boolean setEntityImmuneToFire(Entity aEntity, boolean aImmune) { - try { - return ReflectionUtils.setField(aEntity, isImmuneToFire, aImmune); - } - catch (Throwable t) {} - return false; - } - - public FireProtectionBauble() { - super(BaubleType.RING, "GTPP.bauble.fireprotection.0" + ".name", 0); - String aUnlocalName = "GTPP.bauble.fireprotection.0" + ".name"; - this.setUnlocalizedName(aUnlocalName); - this.setTextureName(CORE.MODID + ":" + getTextureNameForBauble()); - this.setMaxDamage(100); - this.setMaxStackSize(1); - this.setNoRepair(); - this.setCreativeTab(AddToCreativeTab.tabMachines); - if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) { - GameRegistry.registerItem(this, aUnlocalName); - } - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, - final boolean p_77663_5_) { - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (EnumChatFormatting.DARK_RED + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) { - return false; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public void onEquipped(final ItemStack arg0, final EntityLivingBase aPlayer) { - if (!aPlayer.worldObj.isRemote) { - if (aPlayer instanceof EntityPlayer) { - EntityPlayer bPlayer = (EntityPlayer) aPlayer; - mPlayerMap.add(bPlayer.getUniqueID()); - } - } - } - - @Override - public void onUnequipped(final ItemStack arg0, final EntityLivingBase aPlayer) { - if (!aPlayer.worldObj.isRemote) { - if (aPlayer instanceof EntityPlayer) { - EntityPlayer bPlayer = (EntityPlayer) aPlayer; - if (bPlayer.isPotionActive(Potion.fireResistance)) { - bPlayer.removePotionEffect(Potion.fireResistance.id); - } - mPlayerMap.remove(bPlayer.getUniqueID()); - setEntityImmuneToFire(bPlayer, false); - } - } - } - - @Override - public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayer) { - if (!aPlayer.worldObj.isRemote) { - if (aPlayer instanceof EntityPlayer) { - EntityPlayer bPlayer = (EntityPlayer) aPlayer; - if (!fireImmune(bPlayer)) { - setEntityImmuneToFire(bPlayer, true); - } - if (!bPlayer.isPotionActive(Potion.fireResistance)) { - bPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 100, 4)); - } - } - } - } - - public String getTextureNameForBauble() { - return "baubles/itemFireProtectGlovesBetter"; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java b/src/Java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java deleted file mode 100644 index 49ce7ad715..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.util.List; - -import com.google.common.collect.Multimap; - -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumChatFormatting; - -import baubles.api.BaubleType; -import gtPlusPlus.core.lib.CORE; - -public class HealthBoostBauble extends BaseBauble{ - - - public HealthBoostBauble() { - super(BaubleType.AMULET, "The Key to the City"); - addDamageNegation(DamageSource.wither); - this.setTextureName(CORE.MODID + ":" + "itemKeyGold"); - } - - @Override - void fillModifiers(Multimap attributes, ItemStack stack) { - attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "Bauble modifier", 40, 0)); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - list.add(EnumChatFormatting.GRAY+"You feel like you're on top of the world."); - list.add(EnumChatFormatting.GRAY+"Wear it around your neck like an amulet."); - super.addInformation(stack, player, list, bool); - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java b/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java deleted file mode 100644 index a8d216e1bc..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java +++ /dev/null @@ -1,408 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.util.List; - -import org.lwjgl.input.Keyboard; - -import com.google.common.collect.Multimap; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -import baubles.api.BaubleType; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class ModularBauble extends BaseBauble { - - @SideOnly(Side.CLIENT) - private IIcon mTextureAmulet; - @SideOnly(Side.CLIENT) - private IIcon mTextureRing; - @SideOnly(Side.CLIENT) - private IIcon mTextureBelt; - private IIcon iconArray[] = new IIcon[3]; - @SideOnly(Side.CLIENT) - private IIcon mfallback; - - public ModularBauble() { - super(BaubleType.AMULET, "Modular Bauble"); - } - - @Override - void fillModifiers(Multimap attributes, ItemStack stack) { - - // Get Stats - int mStatlevel = 0; - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DAMAGE)) > 0) { - if (mStatlevel > 0 && mStatlevel < 20) { - attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 1, 0)); - } else if (mStatlevel > 20 && mStatlevel < 45) { - attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 2, 0)); - } else if (mStatlevel >= 45 && mStatlevel < 75) { - attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 4, 0)); - } else if (mStatlevel >= 75 && mStatlevel < 99) { - attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 8, 0)); - } else if (mStatlevel >= 100) { - attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 16, 0)); - } - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DEF)) > 0) { - if (mStatlevel > 0 && mStatlevel < 20) { - attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 1, 0)); - } else if (mStatlevel > 20 && mStatlevel < 45) { - attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 2, 0)); - } else if (mStatlevel > 45 && mStatlevel < 75) { - attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 3, 0)); - } else if (mStatlevel > 75 && mStatlevel < 99) { - attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 6, 0)); - } else if (mStatlevel >= 100) { - attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 10, 0)); - } - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) { - if (mStatlevel > 0 && mStatlevel <= 100) { - int bonus = mStatlevel / 5; - attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "HP" + mStatlevel, bonus * 2, 0)); - } - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) { - if (mStatlevel > 0 && mStatlevel < 20) { - attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 1, 0)); - } else if (mStatlevel > 20 && mStatlevel < 45) { - attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 2, 0)); - } else if (mStatlevel > 45 && mStatlevel < 75) { - attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 3, 0)); - } else if (mStatlevel > 75 && mStatlevel < 99) { - attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 4, 0)); - } else if (mStatlevel >= 100) { - attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), - new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 5, 0)); - } - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_MINING)) > 0) { - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HOLY)) > 0) { - } - - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - // Bauble Type - if (ModularArmourUtils.getBaubleType(stack) == BaubleType.AMULET) { - list.add(EnumChatFormatting.GRAY + "Current Form: " + EnumChatFormatting.RED + "Amulet" - + EnumChatFormatting.GRAY + "."); - list.add(EnumChatFormatting.GRAY + "You can change this into a Ring or a Belt."); - } else if (ModularArmourUtils.getBaubleType(stack) == BaubleType.RING) { - list.add(EnumChatFormatting.GRAY + "Current Form: " + EnumChatFormatting.RED + "Ring" - + EnumChatFormatting.GRAY + "."); - list.add(EnumChatFormatting.GRAY + "You can change this into an Amulet or a Belt."); - } else if (ModularArmourUtils.getBaubleType(stack) == BaubleType.BELT) { - list.add(EnumChatFormatting.GRAY + "Current Form: " + EnumChatFormatting.RED + "Belt" - + EnumChatFormatting.GRAY + "."); - list.add(EnumChatFormatting.GRAY + "You can change this into a Ring or an Amulet."); - } - - // Get Stats - int mStatlevel = 0; - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DAMAGE)) > 0) { - list.add(EnumChatFormatting.GRAY + "Damage Boost: " + EnumChatFormatting.DARK_RED + mStatlevel - + EnumChatFormatting.GRAY + "/100."); - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) { - list.add(EnumChatFormatting.GRAY + "Health Boost: " + EnumChatFormatting.RED + mStatlevel - + EnumChatFormatting.GRAY + "/100. Bonus " + (mStatlevel / 5) + " hearts."); - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) { - list.add(EnumChatFormatting.GRAY + "Speed Boost: " + EnumChatFormatting.WHITE + mStatlevel - + EnumChatFormatting.GRAY + "/100."); - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_MINING)) > 0) { - list.add(EnumChatFormatting.GRAY + "Mining Boost: " + EnumChatFormatting.DARK_GRAY + mStatlevel - + EnumChatFormatting.GRAY + "/100."); - } - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HOLY)) > 0) { - list.add(EnumChatFormatting.GRAY + "Holy Boost: " + EnumChatFormatting.GOLD + mStatlevel - + EnumChatFormatting.GRAY + "/100."); - } - - // Defence Boost - if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DEF)) > 0) { - list.add(EnumChatFormatting.GRAY + "Defence Boost: " + EnumChatFormatting.BLUE + mStatlevel - + EnumChatFormatting.GRAY + "/100."); - - if ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54))) { - - if (mStatlevel >= 1) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Cactus" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 10) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Falling Blocks" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 20) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Wall Suffocation" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 35) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Drowning" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 50) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Starvation" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 60) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Falling" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 75) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Lava" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 80) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Magic" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 95) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Wither" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 100) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Fire" - + EnumChatFormatting.GRAY + "."); - } - if (mStatlevel >= 100) { - list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Void" - + EnumChatFormatting.GRAY + "."); - } - - } - else { - list.add(EnumChatFormatting.GRAY + ""); - } - } - - if (NBTUtils.getBotanicaSoulboundOwner(stack) != null) { - if (!NBTUtils.getBotanicaSoulboundOwner(stack).equals("")) { - list.add(EnumChatFormatting.GRAY + "Owner: " + EnumChatFormatting.GREEN - + NBTUtils.getBotanicaSoulboundOwner(stack) + EnumChatFormatting.GRAY + "."); - } - } - super.addInformation(stack, player, list, bool); - } - - @Override - public boolean addDamageNegation(DamageSource damageSource, ItemStack aStack) { - - this.clearDamageNegation(); - int mStatlevel = 0; - if ((mStatlevel = ModularArmourUtils.getModifierLevel(aStack, Modifiers.BOOST_HOLY)) > 0) { - if (mStatlevel >= 1) { - addDamageNegation(DamageSource.cactus); - } - if (mStatlevel >= 10) { - addDamageNegation(DamageSource.fallingBlock); - } - if (mStatlevel >= 20) { - addDamageNegation(DamageSource.inWall); - } - if (mStatlevel >= 35) { - addDamageNegation(DamageSource.drown); - } - if (mStatlevel >= 50) { - addDamageNegation(DamageSource.starve); - } - if (mStatlevel >= 60) { - addDamageNegation(DamageSource.fall); - } - if (mStatlevel >= 75) { - addDamageNegation(DamageSource.lava); - } - if (mStatlevel >= 80) { - addDamageNegation(DamageSource.magic); - } - if (mStatlevel >= 95) { - addDamageNegation(DamageSource.wither); - } - if (mStatlevel >= 100) { - addDamageNegation(DamageSource.inFire); - } - if (mStatlevel >= 100) { - addDamageNegation(DamageSource.onFire); - } - if (mStatlevel >= 100) { - addDamageNegation(DamageSource.outOfWorld); - } - } - return super.addDamageNegation(damageSource, null); - } - - @Override - public boolean canEquip(ItemStack arg0, EntityLivingBase arg1) { - if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_AMULET.getID()) { - this.SetBaubleType(BT.TYPE_AMULET); - } else if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_RING.getID()) { - this.SetBaubleType(BT.TYPE_RING); - } else if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_BELT.getID()) { - this.SetBaubleType(BT.TYPE_BELT); - } else { - this.SetBaubleType(BT.TYPE_RING); - } - if (PlayerUtils.isPlayerOP((EntityPlayer) arg1)) { - return true; // Let OPs wear other peoples shit. - } - - String mOwner; - if (NBTUtils.getBotanicaSoulboundOwner(arg0) == null || NBTUtils.getBotanicaSoulboundOwner(arg0).equals("")) { - return true; - } else if ((mOwner = NBTUtils.getBotanicaSoulboundOwner(arg0)) != null) { - String mPlayerName = arg1.getCommandSenderName(); - if (mOwner.toLowerCase().equals(mPlayerName.toLowerCase())) { - return true; - } else { - return false; - } - } else { - return false; - } - } - - @Override - public BaubleType getBaubleType(ItemStack arg0) { - return ModularArmourUtils.getBaubleType(arg0); - } - - @Override - public void onEquipped(ItemStack stack, EntityLivingBase entity) { - if (entity instanceof EntityPlayer) { - if (NBTUtils.getBotanicaSoulboundOwner(stack) == null - || NBTUtils.getBotanicaSoulboundOwner(stack).equals("")) { - NBTUtils.setBotanicaSoulboundOwner(stack, entity.getCommandSenderName()); - } - } - super.onEquipped(stack, entity); - } - - /*@Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - if (usingItem == null) { - return mfallback; - } - try { - if (stack.getItemDamage() == 0) { - return mfallback = mTextureAmulet; - } - else if (stack.getItemDamage() == 1) { - return mfallback = mTextureRing; - } - else if (stack.getItemDamage() == 2) { - return mfallback = mTextureBelt; - } else { - return mfallback = mTextureRing; - } - } catch (Throwable t) { - return mfallback = mTextureRing; - } - }*/ - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - if (meta < this.iconArray.length && this.iconArray[meta] != null){ - return this.iconArray[meta]; - } - return this.mfallback; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 3; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister register) { - this.mfallback = register.registerIcon("miscutils" + ":" + "itemAmulet"); - // you cannot initialize iconArray when declared nor in the constructor, - // as it is client-side only, so do it here: - if (LoadedMods.Thaumcraft) { - iconArray[0] = register.registerIcon("thaumcraft" + ":" + "bauble_amulet"); - iconArray[1] = register.registerIcon("thaumcraft" + ":" + "bauble_ring"); - iconArray[2] = register.registerIcon("thaumcraft" + ":" + "bauble_belt"); - } else { - iconArray[0] = register.registerIcon("miscutils" + ":" + "itemAmulet"); - iconArray[1] = register.registerIcon("miscutils" + ":" + "itemRingWearable"); - iconArray[2] = register.registerIcon("miscutils" + ":" + "itemBelt"); - } - - mTextureAmulet = iconArray[0]; - mTextureRing = iconArray[1]; - mTextureBelt = iconArray[2]; - - } - - @Override - public void onWornTick(ItemStack stack, EntityLivingBase player) { - super.onWornTick(stack, player); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public Item setFull3D() { - // TODO Auto-generated method stub - return super.setFull3D(); - } - - @Override - public boolean isFull3D() { - return true; - } - - @Override - public boolean isRepairable() { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java deleted file mode 100644 index aab302688b..0000000000 --- a/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java +++ /dev/null @@ -1,175 +0,0 @@ -package gtPlusPlus.core.item.bauble; - -import java.util.List; - -import baubles.api.BaubleType; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.AABB; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import ic2.api.item.ElectricItem; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -public class MonsterKillerBaseBauble extends ElectricBaseBauble { - - private final Class[] mTargets; - - public MonsterKillerBaseBauble(Class[] aMonsterBaseClassArray, String aMonsterTypeName, int aPowerTier) { - super(BaubleType.AMULET, aPowerTier, GT_Values.V[aPowerTier] * 20 * 300, - "GTPP.MonsterKiller." + aMonsterTypeName + ".name"); - mTargets = aMonsterBaseClassArray; - } - - @SideOnly(Side.CLIENT) - @Override - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { - ItemStack itemStack = new ItemStack(this, 1); - ItemStack charged; - if (this.getEmptyItem(itemStack) == this) { - charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - if (this.getChargedItem(itemStack) == this) { - charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); - itemList.add(charged); - } - - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, - final boolean p_77663_5_) { - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public boolean canProvideEnergy(final ItemStack itemStack) { - double aItemCharge = ElectricItem.manager.getCharge(itemStack); - return aItemCharge > 0; - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (EnumChatFormatting.WHITE + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) { - return true; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(""); - String aString1 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.1"); - String aString2 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.2"); - String aString3 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.3"); - String aString4 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.4"); - String aEU = StatCollector.translateToLocal("GTPP.info.eu"); - String aEUT = aEU + "/t"; - - list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN + aString2 + " " + (int) getTransferLimit(stack) + aEUT + " " + aString3 - + EnumChatFormatting.GRAY); - list.add(""); - list.add("" + EnumChatFormatting.GREEN + aString4 + " " + EnumChatFormatting.GRAY); - for (Class cz : mTargets) { - list.add("- " + EnumChatFormatting.DARK_GREEN + cz.getSimpleName().replace("Entity", "") + EnumChatFormatting.GRAY); - } - - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { - - } - - @Override - public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { - - } - - @Override // TODO - public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayerEntity) { - if (aPlayerEntity == null) { - return; - } - EntityPlayer aPlayer = (EntityPlayer) aPlayerEntity; - if (!aPlayer.worldObj.isRemote) { - if (this.getCharge(aBaubleStack) >= getTransferLimit(aBaubleStack)) { - AABB aPlayerBox = new AABB(aPlayerEntity, 5, 5, 5); - if (this.mTargets != null && this.mTargets.length > 0) { - for (Class clazz : mTargets) { - AutoMap aEnts = EntityUtils.getEntitiesWithinBoundingBox(clazz, aPlayerBox); - if (aEnts.isEmpty()) { - continue; - } else { - EntityLiving aClosest = null; - double aEntityDistance = Short.MIN_VALUE; - for (Object ent : aEnts) { - if (!EntityLiving.class.isInstance(ent)) { - continue; - } else { - double aCurEntDis = EntityUtils.getDistance(aPlayerEntity, (Entity) ent); - if (aEntityDistance == Short.MIN_VALUE || aCurEntDis < aEntityDistance) { - aEntityDistance = aCurEntDis; - aClosest = (EntityLiving) ent; - } - } - } - if (aClosest != null) { - float aEntHealth = aClosest.getHealth(); - float aEntMaxHealth = aClosest.getMaxHealth(); - double aEntHealthPerc = MathUtils.findPercentage(aEntHealth, aEntMaxHealth); - long aEuUsage = (long) (aEntHealthPerc * 50 * aEntMaxHealth); - if (this.discharge(aBaubleStack, aEuUsage, mTier, true, false, false) > 0) { - aClosest.setDead(); - PlayerUtils.messagePlayer(aPlayer, "Removed 1x "+aClosest.getCommandSenderName()); - break; - } - } else { - continue; - } - } - } - } - } else { - return; - } - } - } - - @Override - public String getTextureNameForBauble() { - return "baubles/itemAmulet"; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java b/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java deleted file mode 100644 index 8e7a760195..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java +++ /dev/null @@ -1,614 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gtPlusPlus.api.helpers.MaterialHelper; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.plugin.agrichem.BioRecipes; -import gtPlusPlus.plugin.agrichem.item.algae.ItemAgrichemBase; -import gtPlusPlus.plugin.agrichem.item.algae.ItemAlgaeBase; -import gtPlusPlus.plugin.agrichem.item.algae.ItemBioChip; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -public class AgriculturalChem extends ItemPackage { - - private static boolean aBOP; - private static boolean aTiCon; - - private static AutoMap mBloodFluids = new AutoMap(); - - /** - * Fluids - */ - - // Poop Juice - public static Fluid PoopJuice; - // Manure Slurry - public static Fluid ManureSlurry; - // Fertile Manure Slurry - public static Fluid FertileManureSlurry; - // Blood - public static Fluid CustomBlood; - // Red Mud - public static Fluid RedMud; - /** - * Items - */ - - // Manure Byproducts - public static Item dustManureByproducts; - // Organic Fertilizer - public static Item dustOrganicFertilizer; - // Dirt - public static Item dustDirt; - - // Poop Juice - // vv - Centrifuge - // Manure Slurry && Manure Byproducts -> (Elements) Centrifuge to several tiny - // piles - // vv - Chem Reactor - Add Peat, Meat - // Organic Fertilizer - // vv - Dehydrate - // Fertilizer - - // Poop Juice - // vv - Mixer - Add Blood, Bone, Meat (1000L Poo, 200L Blood, x2 Bone, x3 Meat) - // Fertile Manure Slurry - // vv - Chem Reactor - Add Peat x1.5 - // Organic Fertilizer x3 - // vv - Dehydrate - // Fertilizer - - - - public static Item mAlgae; - public static Item mBioCircuit; - public static Item mAgrichemItem1; - - /* - * 0 - Algae Biomass - * 1 - Green Algae Biomass - * 2 - Brown Algae Biomass - * 3 - Golden-Brown Algae Biomass - * 4 - Red Algae Biomass - * 5 - Cellulose Fiber - * 6 - Golden-Brown Cellulose Fiber - * 7 - Red Cellulose Fiber - * 8 - Compost - * 9 - Wood Pellet - * 10 - Wood Brick - * 11 - Cellulose Pulp - * 12 - Raw Bio Resin - * 13 - Catalyst Carrier - * 14 - Green Metal Catalyst - * 15 - Alginic Acid - * 16 - Alumina - * 17 - Aluminium Pellet - * 18 - Sodium Aluminate - * 19 - Sodium Hydroxide // Exists in Newer GT - * 20 - Sodium Carbonate - * 21 - Lithium Chloride - * 22 - Pellet Mold - * 23 - Clean Aluminium Mix - * 24 - Pinecone - */ - - public static ItemStack mAlgaeBiosmass; - public static ItemStack mGreenAlgaeBiosmass; - public static ItemStack mBrownAlgaeBiosmass; - public static ItemStack mGoldenBrownAlgaeBiosmass; - public static ItemStack mRedAlgaeBiosmass; - public static ItemStack mCelluloseFiber; - public static ItemStack mGoldenBrownCelluloseFiber; - public static ItemStack mRedCelluloseFiber; - public static ItemStack mCompost; - public static ItemStack mWoodPellet; - public static ItemStack mWoodBrick; - public static ItemStack mCellulosePulp; - public static ItemStack mRawBioResin; - public static ItemStack mCatalystCarrier; - public static ItemStack mGreenCatalyst; - public static ItemStack mAlginicAcid; - public static ItemStack mAlumina; - public static ItemStack mAluminiumPellet; - public static ItemStack mSodiumAluminate; - public static ItemStack mSodiumHydroxide; - public static ItemStack mSodiumCarbonate; - public static ItemStack mLithiumChloride; - public static ItemStack mPelletMold; - public static ItemStack mCleanAluminiumMix; - public static ItemStack mPinecone; - public static ItemStack mCrushedPine; - - - @Override - public void items() { - // Nitrogen, Ammonium Nitrate, Phosphates, Calcium, Copper, Carbon - dustManureByproducts = ItemUtils.generateSpecialUseDusts("ManureByproducts", "Manure Byproduct", - "(N2H4O3)N2P2Ca3CuC8", Utils.rgbtoHexValue(110, 75, 25))[0]; - - // Basically Guano - dustOrganicFertilizer = ItemUtils.generateSpecialUseDusts("OrganicFertilizer", "Organic Fertilizer", - "Ca5(PO4)3(OH)", Utils.rgbtoHexValue(240, 240, 240))[0]; - - // Dirt Dust :) - dustDirt = ItemUtils.generateSpecialUseDusts("Dirt", "Dried Earth", Utils.rgbtoHexValue(65, 50, 15))[0]; - - mAlgae = new ItemAlgaeBase(); - mAgrichemItem1 = new ItemAgrichemBase(); - mBioCircuit = new ItemBioChip(); - GregtechItemList.Circuit_BioRecipeSelector.set(mBioCircuit); - - - - mAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 0, 1); - mGreenAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 1, 1); - mBrownAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 2, 1); - mGoldenBrownAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 3, 1); - mRedAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 4, 1); - mCelluloseFiber = ItemUtils.simpleMetaStack(mAgrichemItem1, 5, 1); - mGoldenBrownCelluloseFiber = ItemUtils.simpleMetaStack(mAgrichemItem1, 6, 1); - mRedCelluloseFiber = ItemUtils.simpleMetaStack(mAgrichemItem1, 7, 1); - mCompost = ItemUtils.simpleMetaStack(mAgrichemItem1, 8, 1); - mWoodPellet = ItemUtils.simpleMetaStack(mAgrichemItem1, 9, 1); - mWoodBrick = ItemUtils.simpleMetaStack(mAgrichemItem1, 10, 1); - mCellulosePulp = ItemUtils.simpleMetaStack(mAgrichemItem1, 11, 1); - mRawBioResin = ItemUtils.simpleMetaStack(mAgrichemItem1, 12, 1); - mCatalystCarrier = ItemUtils.simpleMetaStack(mAgrichemItem1, 13, 1); - mGreenCatalyst = ItemUtils.simpleMetaStack(mAgrichemItem1, 14, 1); - mAlginicAcid = ItemUtils.simpleMetaStack(mAgrichemItem1, 15, 1); - mAlumina = ItemUtils.simpleMetaStack(mAgrichemItem1, 16, 1); - mAluminiumPellet = ItemUtils.simpleMetaStack(mAgrichemItem1, 17, 1); - mSodiumAluminate = ItemUtils.simpleMetaStack(mAgrichemItem1, 18, 1); - - /** - * If It exists, don't add a new one. - */ - if (OreDictionary.doesOreNameExist("dustSodiumHydroxide_GT5U") || OreDictionary.doesOreNameExist("dustSodiumHydroxide")) { - List aTest = OreDictionary.getOres("dustSodiumHydroxide", false); - ItemStack aTestStack; - if (aTest.isEmpty()) { - aTest = OreDictionary.getOres("dustSodiumHydroxide_GT5U", false); - if (aTest.isEmpty()) { - aTestStack = ItemUtils.simpleMetaStack(mAgrichemItem1, 19, 1); - } - else { - aTestStack = aTest.get(0); - } - } - else { - aTestStack = aTest.get(0); - } - mSodiumHydroxide = aTestStack; - } - else { - mSodiumHydroxide = ItemUtils.simpleMetaStack(mAgrichemItem1, 19, 1); - } - mSodiumCarbonate = ItemUtils.simpleMetaStack(mAgrichemItem1, 20, 1); - mLithiumChloride = ItemUtils.simpleMetaStack(mAgrichemItem1, 21, 1); - mPelletMold = ItemUtils.simpleMetaStack(mAgrichemItem1, 22, 1); - mCleanAluminiumMix = ItemUtils.simpleMetaStack(mAgrichemItem1, 23, 1); - mPinecone = ItemUtils.simpleMetaStack(mAgrichemItem1, 24, 1); - mCrushedPine = ItemUtils.simpleMetaStack(mAgrichemItem1, 25, 1); - - ItemUtils.addItemToOreDictionary(mGreenAlgaeBiosmass, "biomassGreenAlgae"); - ItemUtils.addItemToOreDictionary(mBrownAlgaeBiosmass, "biomassBrownAlgae"); - ItemUtils.addItemToOreDictionary(mGoldenBrownAlgaeBiosmass, "biomassGoldenBrownAlgae"); - ItemUtils.addItemToOreDictionary(mRedAlgaeBiosmass, "biomassRedAlgae"); - - ItemUtils.addItemToOreDictionary(mCelluloseFiber, "fiberCellulose"); - ItemUtils.addItemToOreDictionary(mGoldenBrownCelluloseFiber, "fiberCellulose"); - ItemUtils.addItemToOreDictionary(mGoldenBrownCelluloseFiber, "fiberGoldenBrownCellulose"); - ItemUtils.addItemToOreDictionary(mRedCelluloseFiber, "fiberCellulose"); - ItemUtils.addItemToOreDictionary(mRedCelluloseFiber, "fiberRedCellulose"); - - ItemUtils.addItemToOreDictionary(mWoodPellet, "pelletWood"); - ItemUtils.addItemToOreDictionary(mWoodBrick, "brickWood"); - ItemUtils.addItemToOreDictionary(mCellulosePulp, "pulpCellulose"); - - ItemUtils.addItemToOreDictionary(mCatalystCarrier, "catalystEmpty"); - ItemUtils.addItemToOreDictionary(mGreenCatalyst, "catalystAluminiumSilver"); - ItemUtils.addItemToOreDictionary(mAlginicAcid, "dustAlginicAcid"); - ItemUtils.addItemToOreDictionary(mAlumina, "dustAlumina"); - ItemUtils.addItemToOreDictionary(mAluminiumPellet, "pelletAluminium"); - - ItemUtils.addItemToOreDictionary(mSodiumAluminate, "dustSodiumAluminate"); - ItemUtils.addItemToOreDictionary(mSodiumHydroxide, "dustSodiumHydroxide"); - ItemUtils.addItemToOreDictionary(mSodiumCarbonate, "dustSodiumCarbonate"); - ItemUtils.addItemToOreDictionary(mLithiumChloride, "dustLithiumChloride"); - ItemUtils.addItemToOreDictionary(mPinecone, "pinecone"); - ItemUtils.addItemToOreDictionary(mCrushedPine, "crushedPineMaterial"); - - //Handle GT NaOH dusts - List NaOHSmall = OreDictionary.getOres("dustSmallSodiumHydroxide_GT5U", false); - if (!NaOHSmall.isEmpty()) { - ItemUtils.addItemToOreDictionary(NaOHSmall.get(0), "dustSmallSodiumHydroxide"); - } - List NaOHTiny = OreDictionary.getOres("dustTinySodiumHydroxide_GT5U", false); - if (!NaOHTiny.isEmpty()) { - ItemUtils.addItemToOreDictionary(NaOHTiny.get(0), "dustTinySodiumHydroxide"); - } - - - } - - @Override - public void blocks() { - // None yet - } - - @Override - public void fluids() { - // Sewage - PoopJuice = FluidUtils.generateFluidNonMolten("raw.waste", "Raw Animal Waste", 32 + 175, - new short[] { 100, 70, 30, 100 }, null, null, 0, true); - - // Sewage - ManureSlurry = FluidUtils.generateFluidNonMolten("manure.slurry", "Manure Slurry", 39 + 175, - new short[] { 75, 45, 15, 100 }, null, null, 0, true); - - // Sewage - FertileManureSlurry = FluidUtils.generateFluidNonMolten("fertile.manure.slurry", "Fertile Manure Slurry", - 45 + 175, new short[] { 65, 50, 15, 100 }, null, null, 0, true); - - RedMud = FluidUtils.generateFluidNoPrefix("mud.red.slurry", "Red Mud Slurry", 32 + 175, new short[] { 180, 35, 25, 100 }, true); - - } - - - - public AgriculturalChem() { - super(); - - aBOP = LoadedMods.BiomesOPlenty; - aTiCon = LoadedMods.TiCon; - - Logger.INFO("Adding Agrochemical content"); - - FluidStack aBlood; - if (aBOP) { - aBlood = FluidUtils.getFluidStack("hell_blood", 100); - if (aBlood != null) { - Logger.INFO("Found Biome's o Plenty, enabled Blood support."); - CustomBlood = aBlood.getFluid(); - mBloodFluids.put(aBlood); - } - } - - if (aTiCon) { - aBlood = FluidUtils.getFluidStack("blood", 100); - if (aBlood != null) { - Logger.INFO("Found Tinker's Construct, enabled Blood support."); - CustomBlood = aBlood.getFluid(); - mBloodFluids.put(FluidUtils.getFluidStack("blood", 100)); - } - } - - // Handle Blood Internally, Create if required. - if (mBloodFluids.isEmpty() || CustomBlood == null) { - Logger.INFO( - "Did not find any existing Blood fluids. Trying to wildcard search the fluid registry, then generate our own if that fails."); - FluidStack aTempBlood = FluidUtils.getWildcardFluidStack("blood", 100); - if (aTempBlood != null) { - CustomBlood = aTempBlood.getFluid(); - } else { - aTempBlood = FluidUtils.getWildcardFluidStack("hell_blood", 100); - if (aTempBlood == null) { - CustomBlood = FluidUtils.generateFluidNoPrefix("blood", "Blood", 32 + 175, - new short[] { 175, 25, 25, 100 }, true); - } else { - CustomBlood = aTempBlood.getFluid(); - } - } - Logger.INFO("Using " + CustomBlood.getName()); - mBloodFluids.put(FluidUtils.getFluidStack(CustomBlood, 100)); - } - - } - - private final static AutoMap mMeats = new AutoMap(); - private final static AutoMap mFish = new AutoMap(); - private final static AutoMap mFruits = new AutoMap(); - private final static AutoMap mVege = new AutoMap(); - private final static AutoMap mNuts = new AutoMap(); - private final static AutoMap mSeeds = new AutoMap(); - private final static AutoMap mPeat = new AutoMap(); - private final static AutoMap mBones = new AutoMap(); - private final static AutoMap mBoneMeal = new AutoMap(); - - private final static AutoMap mList_Master_Meats = new AutoMap(); - private final static AutoMap mList_Master_FruitVege = new AutoMap(); - private final static AutoMap mList_Master_Seeds = new AutoMap(); - private final static AutoMap mList_Master_Bones = new AutoMap(); - - private static void processAllOreDict() { - processOreDict("listAllmeatraw", mMeats); - processOreDict("listAllfishraw", mFish); - processOreDict("listAllfruit", mFruits); - processOreDict("listAllVeggie", mVege); - processOreDict("listAllnut", mNuts); - processOreDict("listAllSeed", mSeeds); - processOreDict("brickPeat", mPeat); - processOreDict("bone", mBones); - processOreDict("dustBone", mBoneMeal); - // Just make a mega list, makes life easier. - if (!mMeats.isEmpty()) { - for (ItemStack g : mMeats) { - mList_Master_Meats.put(g); - } - } - if (!mFish.isEmpty()) { - for (ItemStack g : mFish) { - mList_Master_Meats.put(g); - } - } - if (!mFruits.isEmpty()) { - for (ItemStack g : mFruits) { - mList_Master_FruitVege.put(g); - } - } - if (!mVege.isEmpty()) { - for (ItemStack g : mVege) { - mList_Master_FruitVege.put(g); - } - } - if (!mNuts.isEmpty()) { - for (ItemStack g : mNuts) { - mList_Master_FruitVege.put(g); - } - } - if (!mSeeds.isEmpty()) { - for (ItemStack g : mSeeds) { - mList_Master_Seeds.put(g); - } - } - if (!mBoneMeal.isEmpty()) { - for (ItemStack g : mBoneMeal) { - mList_Master_Bones.put(g); - } - } - if (!mBones.isEmpty()) { - for (ItemStack g : mBones) { - mList_Master_Bones.put(g); - } - } - } - - private static void processOreDict(String aOreName, AutoMap aMap) { - ArrayList aTemp = OreDictionary.getOres(aOreName); - if (!aTemp.isEmpty()) { - for (ItemStack stack : aTemp) { - aMap.put(stack); - } - } - } - - private static void addBasicSlurryRecipes() { - - ItemStack aManureByprod1 = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); - ItemStack aManureByprod2 = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); - ItemStack aDirtDust = ItemUtils.getSimpleStack(dustDirt, 1); - - // Poop Juice to Basic Slurry - GT_Values.RA.addCentrifugeRecipe(CI.getNumberedCircuit(10), null, FluidUtils.getFluidStack(PoopJuice, 1000), // In - // Fluid - FluidUtils.getFluidStack(ManureSlurry, 250), // Out Fluid - aDirtDust, aDirtDust, aManureByprod1, aManureByprod1, aManureByprod1, aManureByprod1, - new int[] { 2000, 2000, 500, 500, 250, 250 }, // Chances - 10 * 20, // Time - 30); // EU - - // More Efficient way to get byproducts, less Slurry - GT_Values.RA.addCentrifugeRecipe(CI.getNumberedCircuit(20), null, FluidUtils.getFluidStack(PoopJuice, 1000), // In - // Fluid - FluidUtils.getFluidStack(ManureSlurry, 50), // Out Fluid - aDirtDust, aDirtDust, aManureByprod1, aManureByprod1, aManureByprod2, aManureByprod2, - new int[] { 4000, 3000, 1250, 1250, 675, 675 }, // Chances - 20 * 20, // Time - 60); // EU - - } - - private static void addAdvancedSlurryRecipes() { - - ItemStack aCircuit = CI.getNumberedCircuit(10); - ItemStack aBone; - ItemStack aMeat; - ItemStack aEmptyCells = CI.emptyCells(2); - ItemStack aInputCells = ItemUtils.getItemStackOfAmountFromOreDict("cellRawAnimalWaste", 2); - FluidStack aOutput = FluidUtils.getFluidStack(FertileManureSlurry, 1000); - - for (FluidStack aBloodStack : mBloodFluids) { - for (ItemStack aBoneStack : mList_Master_Bones) { - aBone = ItemUtils.getSimpleStack(aBoneStack, 2); - for (ItemStack aMeatStack : mList_Master_Meats) { - aMeat = ItemUtils.getSimpleStack(aMeatStack, 5); - // Poop Juice to Fertile Slurry - GT_Values.RA.addMixerRecipe(aCircuit, aBone, aMeat, aInputCells, aBloodStack, // Input Fluid - aOutput, // Output Fluid - aEmptyCells, // Output Item - 20 * 8, // Time? - 60 // Eu? - ); - } - } - } - } - - private static void addBasicOrganiseFertRecipes() { - FluidStack aInputFluid = FluidUtils.getFluidStack(ManureSlurry, 1000); - ItemStack aOutputDust = ItemUtils.getSimpleStack(dustOrganicFertilizer, 3); - ItemStack aPeat; - ItemStack aMeat; - for (ItemStack aPeatStack : mPeat) { - aPeat = ItemUtils.getSimpleStack(aPeatStack, 3); - for (ItemStack aMeatStack : mList_Master_Meats) { - aMeat = ItemUtils.getSimpleStack(aMeatStack, 5); - CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 20 * 20, 120); - } - - aPeat = ItemUtils.getSimpleStack(aPeatStack, 2); - for (ItemStack aMeatStack : mList_Master_FruitVege) { - aMeat = ItemUtils.getSimpleStack(aMeatStack, 9); - CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 10 * 20, 120); - } - } - } - - private static void addAdvancedOrganiseFertRecipes() { - FluidStack aInputFluid = FluidUtils.getFluidStack(FertileManureSlurry, 1000); - ItemStack aOutputDust = ItemUtils.getSimpleStack(dustOrganicFertilizer, 7); - ItemStack aPeat; - ItemStack aMeat; - for (ItemStack aPeatStack : mPeat) { - aPeat = ItemUtils.getSimpleStack(aPeatStack, 5); - for (ItemStack aMeatStack : mList_Master_Meats) { - aMeat = ItemUtils.getSimpleStack(aMeatStack, 7); - CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 10 * 20, 140); - } - aPeat = ItemUtils.getSimpleStack(aPeatStack, 3); - for (ItemStack aMeatStack : mList_Master_FruitVege) { - aMeat = ItemUtils.getSimpleStack(aMeatStack, 12); - CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 5 * 20, 140); - } - } - } - - public static ItemStack aFertForestry; - public static ItemStack aFertIC2; - - - private static void addMiscRecipes() { - - ItemStack aDustOrganicFert = ItemUtils.getSimpleStack(dustOrganicFertilizer, 1); - ItemStack aManureByprod = ItemUtils.getSimpleStack(dustManureByproducts, 1); - - // Dehydrate Organise Fert to Normal Fert. - - /** - * Forestry Support - */ - if (LoadedMods.Forestry) { - Field aItemField = ReflectionUtils.getField(ReflectionUtils.getClass("forestry.plugins.PluginCore"), "items"); - try { - Object aItemRegInstance = aItemField != null ? aItemField.get(aItemField) : null; - if (aItemRegInstance != null) { - Field aFertField = ReflectionUtils.getField(aItemRegInstance.getClass(), "fertilizerCompound"); - Object aItemInstance = aFertField.get(aItemRegInstance); - if (aItemInstance instanceof Item) { - aFertForestry = ItemUtils.getSimpleStack((Item) aItemInstance); - Item aForestryFert = (Item) aItemInstance; - CORE.RA.addDehydratorRecipe( - new ItemStack[] { CI.getNumberedCircuit(11), ItemUtils.getSimpleStack(aDustOrganicFert, 4) }, null, - null, new ItemStack[] { ItemUtils.getSimpleStack(aForestryFert, 3), aManureByprod, aManureByprod }, - new int[] { 10000, 2000, 2000 }, 20 * 20, 240); - } - } - } - catch (IllegalArgumentException | IllegalAccessException e) { - - } - } - - /** - * IC2 Support - */ - if (LoadedMods.IndustrialCraft2) { - aFertIC2 = ItemUtils.getItemStackFromFQRN("IC2:itemFertilizer", 1); - CORE.RA.addDehydratorRecipe( - new ItemStack[] { CI.getNumberedCircuit(12), ItemUtils.getSimpleStack(aDustOrganicFert, 4) }, null, - null, new ItemStack[] { ItemUtils.getItemStackFromFQRN("IC2:itemFertilizer", 3), aManureByprod, - aManureByprod }, - new int[] { 10000, 2000, 2000 }, 20 * 20, 240); - } - - // Dirt Production - CORE.RA.addCompressorRecipe(ItemUtils.getSimpleStack(dustDirt, 9), ItemUtils.getSimpleStack(Blocks.dirt), - 20 * 2, 8); - - // Centrifuge Byproducts - - // Ammonium Nitrate, Phosphates, Calcium, Copper, Carbon - GT_Values.RA.addCentrifugeRecipe(CI.getNumberedCircuit(20), ItemUtils.getSimpleStack(aManureByprod, 4), - FluidUtils.getFluidStack("sulfuricacid", 250), // In Fluid - FluidUtils.getFluidStack("sulfuricapatite", 50), // Out Fluid - MaterialHelper.getDustSmall(Materials.Phosphorus, 2), MaterialHelper.getDustSmall(Materials.Calcium, 2), - MaterialHelper.getDustTiny(Materials.Copper, 1), MaterialHelper.getDust(Materials.Carbon, 1), ItemUtils.getSimpleStack(dustDirt, 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAmmoniumNitrate", 1), - new int[] { 2500, 2500, 750, 1000, 5000, 250 }, // Chances - 20 * 20, // Time - 60); // EU - - // Add Fuel Usages - CORE.RA.addSemifluidFuel(FluidUtils.getFluidStack(PoopJuice, 1000), 12); - CORE.RA.addSemifluidFuel(FluidUtils.getFluidStack(ManureSlurry, 1000), 24); - CORE.RA.addSemifluidFuel(FluidUtils.getFluidStack(FertileManureSlurry, 1000), 32); - - // Red Slurry / Tailings Processing - GT_Values.RA.addCentrifugeRecipe( - CI.getNumberedBioCircuit(10), - GT_Values.NI, - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 1000), - FluidUtils.getWater(500), - ELEMENT.getInstance().IRON.getSmallDust(1), - ELEMENT.getInstance().COPPER.getSmallDust(1), - ELEMENT.getInstance().TIN.getSmallDust(1), - ELEMENT.getInstance().SULFUR.getSmallDust(1), - ELEMENT.getInstance().NICKEL.getTinyDust(1), - ELEMENT.getInstance().LEAD.getTinyDust(1), - new int[] { 3000, 3000, 2000, 2000, 1000, 1000 }, - 30 * 20, - 30); - - } - - @Override - public String errorMessage() { - return "Failed to generate recipes for AgroChem."; - } - - @Override - public boolean generateRecipes() { - if (mBloodFluids.isEmpty()) { - Logger.INFO("Could not find, nor create Blood fluid. Unable to add recipes."); - return false; - } - - // Organise OreDict - processAllOreDict(); - - // Slurry Production - addBasicSlurryRecipes(); - addAdvancedSlurryRecipes(); - - // Organic Fert. Production - addBasicOrganiseFertRecipes(); - addAdvancedOrganiseFertRecipes(); - - addMiscRecipes(); - - BioRecipes.init(); - - return true; - } -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java deleted file mode 100644 index ca9053dacb..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java +++ /dev/null @@ -1,378 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.AddGregtechRecipe; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class CoalTar extends ItemPackage { - - public static Fluid Coal_Gas; - public static Fluid Coal_Oil; - public static Fluid Ethylene; - public static Fluid Ethylbenzene; - public static Fluid Anthracene; - public static Fluid Toluene; - public static Fluid Coal_Tar; - public static Fluid Coal_Tar_Oil; - public static Fluid Sulfuric_Coal_Tar_Oil; - public static Fluid Naphthalene; - public static Fluid Phthalic_Acid; - - private static void recipeEthylBenzineFuelsIntoHeavyFuel() { - CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellFuel", 9), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), - null, - FluidUtils.getFluidStack("nitrofuel", 7500), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 11), - 100, - CORE.GTNH ? 1000 : 500); - CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellBioDiesel", 9), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), - null, - FluidUtils.getFluidStack("nitrofuel", 3000), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 11), - 300, - CORE.GTNH ? 1000 : 500); - } - - public static void recipeCreateEthylene(){ - - FluidStack bioEth1 = FluidUtils.getFluidStack("fluid.bioethanol", 2000); - FluidStack bioEth2 = FluidUtils.getFluidStack("bioethanol", 2000); - - if (bioEth1 != null){ - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(17), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1) - }, - bioEth1, - FluidUtils.getWater(1000), - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylene", 1) - }, - new int[] {10000}, - 120 * 20, - 80); - } - - if (bioEth2 != null){ - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(18), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1) - }, - bioEth2, - FluidUtils.getWater(1000), - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylene", 1) - }, - new int[] {10000}, - 120 * 20, - 80); - } - } - - public static void recipeCreateBenzene(){ - //Create Benzene - (Toluene + Hydrogen | 95% Benzene / 5% methane) - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellToluene", 10), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 10) - }, - null, - null, - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellMethane", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellBenzene", 19) - }, - new int[]{10000, 10000}, - 20*100, - 90); - } - - public static void recipeCreateEthylbenzene(){ - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylene", 2), - ItemUtils.getItemStackOfAmountFromOreDict("cellBenzene", 2), - null, - FluidUtils.getFluidStack("fluid.ethylbenzene", 4000), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 4), - 300); - } - - - public static void recipeCoalToCoalTar(){ - //Charcoal - AddGregtechRecipe.addCokeAndPyrolyseRecipes( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 32L), - 8, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDirt", 2), - FluidUtils.getFluidStack("fluid.coaltar", 800), - 15, - 120); - //Lignite - AddGregtechRecipe.addCokeAndPyrolyseRecipes( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 16L), - 8, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDarkAsh", 2), - FluidUtils.getFluidStack("fluid.coaltar", 800), - 45, - 60); - - //Coal - AddGregtechRecipe.addCokeAndPyrolyseRecipes( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 12L), - 8, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDarkAsh", 2), - FluidUtils.getFluidStack("fluid.coaltar", 2200), - 30, - 120); - - //Coke - AddGregtechRecipe.addCokeAndPyrolyseRecipes( - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 8), - 8, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallAsh", 3), - FluidUtils.getFluidStack("fluid.coaltar", 3400), - 15, - 240); - - } - - private static void recipeCoalTarToCoalTarOil() { - // v - Distill (60% Tar oil/15% Naphtha/20% Ethylbenzene/5% Anthracene) - //Create Coal Tar Oil - //FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, null); - GT_Values.RA.addDistilleryRecipe( - CI.getNumberedCircuit(1), //Circuit - FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput - FluidUtils.getFluidStack("fluid.coaltaroil", 600), //aOutput - 600, //aDuration - 64,//aEUt - false //Hidden? - ); - GT_Values.RA.addDistilleryRecipe( - CI.getNumberedCircuit(2), //Circuit - FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput - FluidUtils.getFluidStack("liquid_naphtha", 150), //aOutput - 300, //aDuration - 30,//aEUt - false //Hidden? - ); - GT_Values.RA.addDistilleryRecipe( - CI.getNumberedCircuit(3), //Circuit - FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput - FluidUtils.getFluidStack("fluid.ethylbenzene", 200), //aOutput - 450, //aDuration - 86,//aEUt - false //Hidden? - ); - GT_Values.RA.addDistilleryRecipe( - CI.getNumberedCircuit(4), //Circuit - FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput - FluidUtils.getFluidStack("fluid.anthracene", 50), //aOutput - 900, //aDuration - 30,//aEUt - false //Hidden? - ); - GT_Values.RA.addDistilleryRecipe( - CI.getNumberedCircuit(5), //Circuit - FluidUtils.getFluidStack("fluid.coaltar", 1500), //aInput - FluidUtils.getFluidStack("fluid.kerosene", 600), //aOutput - 300, //aDuration - 64,//aEUt - false //Hidden? - ); - - GT_Values.RA.addDistillationTowerRecipe( - FluidUtils.getFluidStack("fluid.coaltar", 1200), - new FluidStack[]{ - FluidUtils.getFluidStack("fluid.coaltaroil", 500), //aOutput - FluidUtils.getFluidStack("liquid_naphtha", 100), //aOutput - FluidUtils.getFluidStack("fluid.ethylbenzene", 150), //aOutput - FluidUtils.getFluidStack("fluid.anthracene", 50), //aOutput - FluidUtils.getFluidStack("fluid.kerosene", 400), //aOutput - }, - null, - 900, - 60); - - } - - private static void recipeCoalTarOilToSulfuricOilToNaphthalene() { - //SulfuricCoalTarOil - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellCoalTarOil", 8), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 8), - null, - null, - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricCoalTarOil", 16), - 20*16); - GT_Values.RA.addDistilleryRecipe( - CI.getNumberedCircuit(6), //Circuit - FluidUtils.getFluidStack("fluid.sulfuriccoaltaroil", 1000), //aInput - FluidUtils.getFluidStack("fluid.naphthalene", 1000), //aOutput - 1200, //aDuration - 30,//aEUt - false //Hidden? - ); - - } - - private static void recipeNaphthaleneToPhthalicAcid() { - //SulfuricCoalTarOil - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellNaphthalene", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 5), - null, - FluidUtils.getFluidStack("fluid.phthalicacid", 2500), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 2), - 20*16); - - } - - private static void recipePhthalicAcidToPhthalicAnhydride() { - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(15) - }, - FluidUtils.getFluidStack("fluid.phthalicacid", 144), - null, - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustPhthalicAnhydride", 1) - }, - new int[] {10000}, - 60 * 20, - 120); - } - - @Override - public String errorMessage() { - return "Bad Coal Science!"; - } - - @Override - public boolean generateRecipes() { - recipeCreateEthylene(); - recipeCreateBenzene(); - recipeCreateEthylbenzene(); - - recipeCoalToCoalTar(); - recipeCoalTarToCoalTarOil(); - recipeCoalTarOilToSulfuricOilToNaphthalene(); - recipeNaphthaleneToPhthalicAcid(); - recipePhthalicAcidToPhthalicAnhydride(); - - recipeEthylBenzineFuelsIntoHeavyFuel(); - - recipePhthalicAcidConversion(); - - //Burn the coal gas! - GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalGas", 1), null, 96, 1); - CORE.RA.addSemifluidFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricCoalTarOil", 1), 64); - CORE.RA.addSemifluidFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalTarOil", 1), 32); - CORE.RA.addSemifluidFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalTar", 1), 16); - - return true; - } - - private void recipePhthalicAcidConversion() { - FluidStack aMyAcid = FluidUtils.getFluidStack(Phthalic_Acid, 500); - FluidStack aGtAcid = FluidUtils.getFluidStack("phtalicacid", 500); - if (aMyAcid != null && aGtAcid != null) { - CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(8), aMyAcid, aGtAcid, null, 50, 16, false); - CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(9), aGtAcid, aMyAcid, null, 50, 16, false); - } - } - - @Override - public void items() { - //Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); - // v - Dehydrate at 180C+ - //Create Phthalic Anhydride - ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", "C6H4(CO)2O", Utils.rgbtoHexValue(175, 175, 175)); - - //Lithium Hydroperoxide - LiOH + H2O2 → LiOOH + 2 H2O - ItemUtils.generateSpecialUseDusts("LithiumHydroperoxide", "Lithium Hydroperoxide", "HLiO2", Utils.rgbtoHexValue(125, 125, 125)); - // v - Dehydrate - //Lithium Peroxide - 2 LiOOH → Li2O2 + H2O2 + 2 H2O - //Lithium_Peroxide = FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new short[]{135, 135, 135, 100}, null, null); - } - - @Override - public void blocks() { - - } - - @Override - public void fluids() { - - //Create Coal Gas - Coal_Gas = FluidUtils.generateFluidNonMolten("CoalGas", "Coal Gas", 500, new short[]{48, 48, 48, 100}, null, null); - //Ethanol - // v - Dehydrate cells to remove water - - - //Create Ethylene - if (!FluidUtils.doesFluidExist("ethylene")){ - Ethylene = FluidUtils.generateFluidNonMolten("ethylene", "Ethylene", -103, new short[]{255, 255, 255, 100}, null, null); - } - else { - Ethylene = FluidUtils.getWildcardFluidStack("ethylene", 1).getFluid(); - } - - //Create Ethylbenzene - Ethylbenzene is produced in on a large scale by combining benzene and ethylene in an acid-catalyzed chemical reaction - //Use Chemical Reactor - Ethylbenzene = FluidUtils.generateFluidNonMolten("Ethylbenzene", "Ethylbenzene", 136, new short[]{255, 255, 255, 100}, null, null); - //Create Anthracene - Anthracene = FluidUtils.generateFluidNonMolten("Anthracene", "Anthracene", 340, new short[]{255, 255, 255, 100}, null, null); - //Toluene - if (!FluidUtils.doesFluidExist("liquid_toluene")){ - Toluene = FluidUtils.generateFluidNonMolten("liquid_toluene", "Toluene", -95, new short[]{140, 70, 20, 100}, null, null); - } - else { - Toluene = FluidUtils.getWildcardFluidStack("liquid_toluene", 1).getFluid(); - } - - //Create Coal Tar - Coal_Tar = FluidUtils.generateFluidNonMolten("CoalTar", "Coal Tar", 450, new short[]{32, 32, 32, 100}, null, null); - // v - Distill (60% Tar oil/15% Naphtha/20% Ethylbenzene/5% Anthracene) - //Create Coal Tar Oil - Coal_Tar_Oil = FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, null); - // v - Wash With Sulfuric Acid - //Create Sulfuric Coal Tar Oil - Sulfuric_Coal_Tar_Oil = FluidUtils.generateFluidNonMolten("SulfuricCoalTarOil", "Sulfuric Coal Tar Oil", 240, new short[]{250, 170, 12, 100}, null, null); - // v - Distill (No loss, just time consuming) - //Create Naphthalene - Naphthalene = FluidUtils.generateFluidNonMolten("Naphthalene", "Naphthalene", 115, new short[]{210, 185, 135, 100}, null, null); - // v - Oxidize with mercury and nitric acid - //Create Phthalic Acid - Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); - // v - Dehydrate at 180C+ - //Create Phthalic Anhydride - //ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", "C6H4(CO)2O", Utils.rgbtoHexValue(175, 175, 175)); - - - - - } - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java deleted file mode 100644 index a42d179f65..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java +++ /dev/null @@ -1,1115 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; -import gtPlusPlus.core.item.circuit.ItemAdvancedChip; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.*; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.plugin.agrichem.BioRecipes; -import gtPlusPlus.plugin.agrichem.block.AgrichemFluids; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.*; - -public class GenericChem extends ItemPackage { - - /** - * Switches - */ - - private static boolean usingGregtechNitricOxide = false; - private static boolean usingGregtechNitrogenDioxide = false; - private static boolean usingGregtechHydricSulfur = false; - - /** - * Materials - */ - - //public static final Material BAKELITE = new Material("Bakelite", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{90, 140, 140}, 120, 240, 23, 24, true, null, 0);//Not a GT Inherited Material - //public static final Material NYLON = new Material("Nylon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{45, 45, 45}, 300, 600, 44, 48, true, null, 0);//Not a GT Inherited Material - //public static final Material CARBYNE = new Material("Carbyne", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{25, 25, 25}, 2500, 5000, 63, 52, true, null, 0);//Not a GT Inherited Material - - - //Refined PTFE - public static final Material TEFLON = new Material( - "Teflon", - MaterialState.SOLID, - TextureSet.SET_SHINY, - new short[] { 75, 45, 75 }, - 330, 640, - -1, -1, - false, - null, - 0, - new MaterialStack[] { - new MaterialStack(NONMATERIAL.PTFE, 75), - new MaterialStack(NONMATERIAL.PLASTIC, 15), - new MaterialStack(ELEMENT.getInstance().CARBON, 5), - new MaterialStack(ELEMENT.getInstance().SODIUM, 5) - }); - - /** - * Fluids - */ - - public static Fluid Benzene; - public static Fluid NitroBenzene; - public static Fluid Aniline; - public static Fluid Polyurethane; - public static Fluid Phenol; //https://en.wikipedia.org/wiki/Phenol#Uses - public static Fluid Cyclohexane; //https://en.wikipedia.org/wiki/Cyclohexane - public static Fluid Cyclohexanone; //https://en.wikipedia.org/wiki/Cyclohexanone - public static Fluid Cadaverine; //https://en.wikipedia.org/wiki/Cadaverine - public static Fluid Putrescine; //https://en.wikipedia.org/wiki/Putrescine - public static Fluid BoricAcid; - public static Fluid HydrochloricAcid; - - - public static Fluid Ethylanthraquinone2; - public static Fluid Ethylanthrahydroquinone2; - public static Fluid Hydrogen_Peroxide; - public static Fluid Lithium_Peroxide; - public static Fluid Nitric_Oxide; - public static Fluid Nitrogen_Dioxide; - public static Fluid Carbon_Disulfide; - public static Fluid Hydrogen_Sulfide; - - /** - * Items - */ - - // Phenol Byproducts - public Item PhenolicResins; //https://en.wikipedia.org/wiki/Phenol_formaldehyde_resin - public static ItemGenericChemBase mGenericChemItem1; - public static Item mAdvancedCircuit; - - private ItemStack mCatalystCarrier; - - public static ItemStack mRedCatalyst; - public static ItemStack mYellowCatalyst; - public static ItemStack mBlueCatalyst; - public static ItemStack mOrangeCatalyst; - public static ItemStack mPurpleCatalyst; - public static ItemStack mBrownCatalyst; - public static ItemStack mPinkCatalyst; - - public static ItemStack mMillingBallAlumina; - public static ItemStack mMillingBallSoapstone; - - public static ItemStack mSodiumEthoxide; - public static ItemStack mSodiumEthylXanthate; - public static ItemStack mPotassiumEthylXanthate; - public static ItemStack mPotassiumHydroxide; - - - - @Override - public void items() { - PhenolicResins = ItemUtils.generateSpecialUseDusts("phenolicresins", "Phenolic Resin", "HOC6H4CH2OH", Utils.rgbtoHexValue(80, 40, 40))[0]; - //MaterialGenerator.generate(BAKELITE, false); - //MaterialGenerator.generate(NYLON, false); - MaterialGenerator.generate(TEFLON, false); - - mGenericChemItem1 = new ItemGenericChemBase(); - mAdvancedCircuit = new ItemAdvancedChip(); - GregtechItemList.Circuit_T3RecipeSelector.set(mAdvancedCircuit); - - registerItemStacks(); - registerOreDict(); - - GregtechItemList.Milling_Ball_Alumina.set(mMillingBallAlumina); - GregtechItemList.Milling_Ball_Soapstone.set(mMillingBallSoapstone); - - } - - - public void registerItemStacks() { - - mCatalystCarrier = ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 13, 1); - - mRedCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 0, 1); - mYellowCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 1, 1); - mBlueCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 2, 1); - mOrangeCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 3, 1); - mPurpleCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 4, 1); - mBrownCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 5, 1); - mPinkCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 6, 1); - mMillingBallAlumina = ItemUtils.simpleMetaStack(mGenericChemItem1, 7, 1); - mMillingBallSoapstone = ItemUtils.simpleMetaStack(mGenericChemItem1, 8, 1); - mSodiumEthoxide = ItemUtils.simpleMetaStack(mGenericChemItem1, 9, 1); - mSodiumEthylXanthate = ItemUtils.simpleMetaStack(mGenericChemItem1, 10, 1); - mPotassiumEthylXanthate = ItemUtils.simpleMetaStack(mGenericChemItem1, 11, 1); - mPotassiumHydroxide = ItemUtils.simpleMetaStack(mGenericChemItem1, 12, 1); - - } - - public void registerOreDict() { - - ItemUtils.addItemToOreDictionary(mRedCatalyst, "catalystIronCopper"); - ItemUtils.addItemToOreDictionary(mYellowCatalyst, "catalystTungstenNickel"); - ItemUtils.addItemToOreDictionary(mBlueCatalyst, "catalystCobaltTitanium"); - ItemUtils.addItemToOreDictionary(mOrangeCatalyst, "catalystVanadiumPalladium"); - ItemUtils.addItemToOreDictionary(mPurpleCatalyst, "catalystIridiumRuthenium"); - ItemUtils.addItemToOreDictionary(mBrownCatalyst, "catalystNickelAluminium"); - ItemUtils.addItemToOreDictionary(mPinkCatalyst, "catalystPlatinumRhodium"); - ItemUtils.addItemToOreDictionary(mMillingBallAlumina, "millingballAlumina"); - ItemUtils.addItemToOreDictionary(mMillingBallSoapstone, "millingballSoapstone"); - ItemUtils.addItemToOreDictionary(mSodiumEthoxide, "dustSodiumEthoxide"); - ItemUtils.addItemToOreDictionary(mSodiumEthylXanthate, "dustSodiumEthylXanthate"); - ItemUtils.addItemToOreDictionary(mPotassiumEthylXanthate, "dustPotassiumEthylXanthate"); - ItemUtils.addItemToOreDictionary(mPotassiumHydroxide, "dustPotassiumHydroxide"); - - } - - @Override - public void blocks() {} - - @Override - public void fluids() { - - if (!FluidRegistry.isFluidRegistered("benzene")) { - Benzene = FluidUtils.generateFluidNoPrefix("benzene", "Benzene", 278, new short[] { 100, 70, 30, 100 }, true); - } - else { - Benzene = FluidRegistry.getFluid("benzene"); - } - - NitroBenzene = FluidUtils.generateFluidNoPrefix("nitrobenzene", "NitroBenzene", 278, new short[] { 70, 50, 40, 100 }, true); - - Aniline = FluidUtils.generateFluidNoPrefix("aniline", "Aniline", 266, new short[] { 100, 100, 30, 100 }, true); - - BoricAcid = FluidUtils.generateFluidNoPrefix("boricacid", "Boric Acid", 278, new short[] { 90, 30, 120, 100 }, true); - - Polyurethane = FluidUtils.generateFluidNoPrefix("polyurethane", "Polyurethane", 350, new short[] { 100, 70, 100, 100 }, true); - - if (!FluidRegistry.isFluidRegistered("phenol")) { - Phenol = FluidUtils.generateFluidNoPrefix("phenol", "Phenol", 313, new short[] { 100, 70, 30, 100 }, true); - } - else { - Phenol = FluidRegistry.getFluid("phenol"); - } - - // Use GT's if it exists, else make our own. - if (FluidRegistry.isFluidRegistered("hydrochloricacid_gt5u")) { - HydrochloricAcid = FluidRegistry.getFluid("hydrochloricacid_gt5u"); - } - else { - HydrochloricAcid = FluidUtils.generateFluidNoPrefix("hydrochloricacid", "Hydrochloric Acid", 285, new short[] { 183, 200, 196, 100 }, true); - } - - Cyclohexane = FluidUtils.generateFluidNoPrefix("cyclohexane", "Cyclohexane", 32 + 175, new short[] { 100, 70, 30, 100 }, true); - Cyclohexanone = FluidUtils.generateFluidNoPrefix("cyclohexanone", "Cyclohexanone", 32 + 175, new short[] { 100, 70, 30, 100 }, true); - - Cadaverine = FluidUtils.generateFluidNoPrefix("cadaverine", "Cadaverine", 32 + 175, new short[] { 100, 70, 30, 100 }, true); - Putrescine = FluidUtils.generateFluidNoPrefix("putrescine", "Putrescine", 32 + 175, new short[] { 100, 70, 30, 100 }, true); - - //Create 2-Ethylanthraquinone - //2-Ethylanthraquinone is prepared from the reaction of phthalic anhydride and ethylbenzene - Ethylanthraquinone2 = FluidUtils.generateFluidNonMolten("2Ethylanthraquinone", "2-Ethylanthraquinone", 415, new short[]{227, 255, 159, 100}, null, null); - //Create 2-Ethylanthrahydroquinone - //Palladium plate + Hydrogen(250) + 2-Ethylanthraquinone(500) = 600 Ethylanthrahydroquinone - Ethylanthrahydroquinone2 = FluidUtils.generateFluidNonMolten("2Ethylanthrahydroquinone", "2-Ethylanthrahydroquinone", 415, new short[]{207, 225, 129, 100}, null, null); - //Create Hydrogen Peroxide - //Compressed Air(1500) + Ethylanthrahydroquinone(500) + Anthracene(5) = 450 Ethylanthraquinone && 200 Peroxide - Hydrogen_Peroxide = FluidUtils.generateFluidNonMolten("HydrogenPeroxide", "Hydrogen Peroxide", 150, new short[]{210, 255, 255, 100}, null, null); - - if (FluidRegistry.isFluidRegistered("nitricoxide")) { - Nitric_Oxide = FluidRegistry.getFluid("nitricoxide"); - usingGregtechNitricOxide = true; - } - else { - Nitric_Oxide = FluidUtils.generateFluidNoPrefix("nitricoxide", "Nitric Oxide", 200, new short[] {125, 200, 240, 100}); - } - if (FluidRegistry.isFluidRegistered("nitrogendioxide")) { - Nitrogen_Dioxide = FluidRegistry.getFluid("nitrogendioxide"); - usingGregtechNitrogenDioxide = true; - } - else { - Nitrogen_Dioxide = FluidUtils.generateFluidNoPrefix("nitrogendioxide", "Nitrogen Dioxide", 200, new short[] {100, 175, 255, 100}); - } - - - - //Lithium Hydroperoxide - LiOH + H2O2 → LiOOH + 2 H2O - //ItemUtils.generateSpecialUseDusts("LithiumHydroperoxide", "Lithium Hydroperoxide", "HLiO2", Utils.rgbtoHexValue(125, 125, 125)); - // v - Dehydrate - //Lithium Peroxide - 2 LiOOH → Li2O2 + H2O2 + 2 H2O - Lithium_Peroxide = FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new short[]{135, 135, 135, 100}, null, null); - - Carbon_Disulfide = FluidUtils.generateFluidNoPrefix("CarbonDisulfide", "Carbon Disulfide", 350, new short[]{175, 175, 175, 100}); - - if (FluidRegistry.isFluidRegistered("fluid.liquid_hydricsulfur") || MaterialUtils.doesMaterialExist("HydricSulfide")) { - usingGregtechHydricSulfur = true; - Fluid aFluid = null; - if (ItemUtils.doesItemListEntryExist("sHydricSulfur")) { - ItemStack aListItem = ItemUtils.getValueOfItemList("sHydricSulfur", 1, (ItemList) null); - if (aListItem != null) { - FluidStack aFluidStack = FluidContainerRegistry.getFluidForFilledItem(aListItem); - if (aFluidStack != null) { - aFluid = aFluidStack.getFluid(); - } - - } - } - if (aFluid == null) { - aFluid = FluidUtils.getWildcardFluidStack("liquid_hydricsulfur", 1000).getFluid(); - } - Hydrogen_Sulfide = aFluid; - } - else { - Hydrogen_Sulfide = FluidUtils.generateFluidNoPrefix("HydrogenSulfide", "Hydrogen Sulfide", 446, new short[]{240, 130, 30, 100}); - } - - } - - @Override - public String errorMessage() { - return "Failed to generate recipes for GenericChem."; - } - - @Override - public boolean generateRecipes() { - - recipeAdvancedChip(); - recipeCatalystRed(); - recipeCatalystYellow(); - recipeCatalystBlue(); - recipeCatalystOrange(); - recipeCatalystPurple(); - recipeCatalystBrown(); - recipeCatalystPink(); - - recipeGrindingBallAlumina(); - recipeGrindingBallSoapstone(); - - recipeNitroBenzene(); - recipeAniline(); - recipeCadaverineAndPutrescine(); - recipeCyclohexane(); - recipeCyclohexanone(); - - recipe2Ethylanthraquinone(); - recipe2Ethylanthrahydroquinone(); - recipeHydrogenPeroxide(); - recipeLithiumHydroperoxide(); - recipeLithiumPeroxide(); - if (!usingGregtechNitricOxide) { - recipeNitricOxide(); - } - if (!usingGregtechNitrogenDioxide) { - recipeNitrogenDioxide(); - } - if (!usingGregtechHydricSulfur) { - recipeHydricSulfur(); - } - - // Add recipes if we are not using GT's fluid. - if (!FluidRegistry.isFluidRegistered("hydrochloricacid_gt5u")) { - recipeHydrochloricAcid(); - } - - recipeSodiumEthoxide(); - recipeCarbonDisulfide(); - recipeEthylXanthates(); - recipePotassiumHydroxide(); - - registerFuels(); - - return true; - } - - - private void recipeSodiumEthoxide() { - //2 C2H5OH + 2 Na → 2 C2H5ONa + H2 - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(16), - ELEMENT.getInstance().SODIUM.getDust(2) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mEthanol, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(mSodiumEthoxide, 2) - - }, - new FluidStack[] { - ELEMENT.getInstance().HYDROGEN.getFluidStack(2000) - }, - 20 *20, - 120, - 2); - } - - - private void recipePotassiumHydroxide() { - //Ca(OH)2 + K2CO3 → CaCO3 + 2 KOH - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(18), - ELEMENT.getInstance().POTASSIUM.getDust(4), - ELEMENT.getInstance().CARBON.getDust(2), - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 2), - }, - new FluidStack[] { - FluidUtils.getFluidStack("oxygen", 6000), - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 2), - ItemUtils.getSimpleStack(mPotassiumHydroxide, 4) - - }, - new FluidStack[] { - - }, - 20 *30, - 120, - 2); - - } - - - private void recipeEthylXanthates() { - - //Potassium ethyl xanthate - CH3CH2OH + CS2 + KOH → CH3CH2OCS2K + H2O - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(17), - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 2), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mEthanol, 1000), - FluidUtils.getFluidStack(Carbon_Disulfide, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(mPotassiumEthylXanthate, 1) - }, - new FluidStack[] { - FluidUtils.getWater(1000) - }, - 20 *60, - 120, - 4); - - //Sodium ethyl xanthate - CH3CH2ONa + CS2 → CH3CH2OCS2Na - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(17), - ItemUtils.getSimpleStack(mSodiumEthoxide, 1) - }, - new FluidStack[] { - FluidUtils.getFluidStack(Carbon_Disulfide, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(mSodiumEthylXanthate, 1) - }, - new FluidStack[] { - - }, - 20 *60, - 120, - 4); - - } - - - private void recipeHydricSulfur() { - - ItemStack aCellHydricSulfide = ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenSulfide", 1); - GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().SULFUR.getDust(1), GT_Utility.getIntegratedCircuit(1), ELEMENT.getInstance().HYDROGEN.getFluidStack(2000), FluidUtils.getFluidStack(Hydrogen_Sulfide, 3000), GT_Values.NI, 60, 8); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ELEMENT.getInstance().SULFUR.getDust(1), CI.emptyCells(3), ELEMENT.getInstance().HYDROGEN.getFluidStack(2000), GT_Values.NF, ItemUtils.getSimpleStack(aCellHydricSulfide, 3), GT_Values.NI, 60, 8); - - } - - - private void recipeCarbonDisulfide() { - - CORE.RA.addBlastRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 8), - ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 16) - }, - new FluidStack[] { - - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustDarkAsh", 1) - }, - new FluidStack[] { - FluidUtils.getFluidStack(Carbon_Disulfide, 4000) - }, - 20 *60 * 10, - 30, - 1500); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(20), - ItemUtils.getSimpleStack(mBrownCatalyst, 0), - ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 4) - }, - new FluidStack[] { - FluidUtils.getFluidStack(CoalTar.Coal_Gas, 1000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Carbon_Disulfide, 2000), - FluidUtils.getFluidStack(Hydrogen_Sulfide, 4000) - }, - 20 *60 * 5, - 30, - 2); - - - } - - - private static void registerFuels() { - - // Burnables - - // Gas Fuels - GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellNitroBenzene", 1), null, 1250, 1); - - } - - private void recipeGrindingBallAlumina() { - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - CI.getNumberedCircuit(10), - ItemUtils.getSimpleStack(AgriculturalChem.mAlumina, 64) - }, - FluidUtils.getFluidStack(GenericChem.Aniline, 4000), - ItemUtils.getSimpleStack(mMillingBallAlumina, 8), - 180 * 20, - 480); - } - private void recipeGrindingBallSoapstone() { - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - CI.getNumberedCircuit(10), - ItemUtils.getItemStackOfAmountFromOreDict("dustSoapstone", 32) - }, - FluidUtils.getFluidStack(AgrichemFluids.mLiquidResin, 2500), - ItemUtils.getSimpleStack(mMillingBallSoapstone, 8), - 120 * 20, - 480); - } - - private void recipeNitrogenDioxide() { - ItemStack aNitricOxideCell = ItemUtils.getItemStackOfAmountFromOreDict("cellNitricOxide", 1); - ItemStack aNitrogenDioxideCell = ItemUtils.getItemStackOfAmountFromOreDict("cellNitrogenDioxide", 1); - GT_Values.RA.addChemicalRecipe( ItemUtils.getSimpleStack(aNitricOxideCell, 2), GT_Utility.getIntegratedCircuit(1), ELEMENT.getInstance().OXYGEN.getFluidStack(1000), FluidUtils.getFluidStack(Nitrogen_Dioxide, 3000), CI.emptyCells(2), 160); - GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(1), GT_Utility.getIntegratedCircuit(1), FluidUtils.getFluidStack(Nitric_Oxide, 2000), FluidUtils.getFluidStack(Nitrogen_Dioxide, 3000), CI.emptyCells(1), 160); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ItemUtils.getSimpleStack(aNitricOxideCell, 2), CI.emptyCells(1), ELEMENT.getInstance().OXYGEN.getFluidStack(1000), GT_Values.NF, ItemUtils.getSimpleStack(aNitrogenDioxideCell, 3), GT_Values.NI, 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ELEMENT.getInstance().OXYGEN.getCell(1), CI.emptyCells(2), FluidUtils.getFluidStack(Nitric_Oxide, 2000), GT_Values.NF, ItemUtils.getSimpleStack(aNitrogenDioxideCell, 3), GT_Values.NI, 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ItemUtils.getSimpleStack(aNitricOxideCell, 2), ELEMENT.getInstance().OXYGEN.getCell(1), GT_Values.NF, GT_Values.NF, ItemUtils.getSimpleStack(aNitrogenDioxideCell, 3), GT_Values.NI, 160, 30); - } - - - private void recipeNitricOxide() { - ItemStack aWaterCell = ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 1); - ItemStack aNitricOxideCell = ItemUtils.getItemStackOfAmountFromOreDict("cellNitricOxide", 1); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(MISC_MATERIALS.AMMONIA.getCell(8), CI.emptyCells(1), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), ItemUtils.getSimpleStack(aWaterCell, 9), GT_Values.NI, 160, 30); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ELEMENT.getInstance().OXYGEN.getCell(5), CI.emptyCells(4), MISC_MATERIALS.AMMONIA.getFluidStack(8000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), ItemUtils.getSimpleStack(aWaterCell, 9), GT_Values.NI, 160, 30); - GT_Values.RA.addChemicalRecipe( MISC_MATERIALS.AMMONIA.getCell(8), GT_Utility.getIntegratedCircuit(11), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), FluidUtils.getWater(9000), ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(4), 160); - GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(5), GT_Utility.getIntegratedCircuit(11), MISC_MATERIALS.AMMONIA.getFluidStack(8000), FluidUtils.getWater(9000), ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(1), 160); - GT_Values.RA.addChemicalRecipe( MISC_MATERIALS.AMMONIA.getCell(8), GT_Utility.getIntegratedCircuit(2), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), CI.emptyCells(8), 320); - GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(5), GT_Utility.getIntegratedCircuit(2), MISC_MATERIALS.AMMONIA.getFluidStack(8000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), CI.emptyCells(5), 320); - GT_Values.RA.addChemicalRecipe( MISC_MATERIALS.AMMONIA.getCell(8), GT_Utility.getIntegratedCircuit(12), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), GT_Values.NF, ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(4), 160); - GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(5), GT_Utility.getIntegratedCircuit(12), MISC_MATERIALS.AMMONIA.getFluidStack(8000), GT_Values.NF, ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(1), 160); - GT_Values.RA.addChemicalRecipeForBasicMachineOnly(MISC_MATERIALS.AMMONIA.getCell(8), ELEMENT.getInstance().OXYGEN.getCell(5), GT_Values.NF, GT_Values.NF, ItemUtils.getSimpleStack(aNitricOxideCell, 4), ItemUtils.getSimpleStack(aWaterCell, 9), 160, 30); - GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{MISC_MATERIALS.AMMONIA.getFluidStack(8000), ELEMENT.getInstance().OXYGEN.getFluidStack(5000)}, new FluidStack[]{FluidUtils.getFluidStack(Nitric_Oxide, 4000), FluidUtils.getWater(9000)}, null, 160, 30); - } - - - private void recipeHydrochloricAcid() { - - ItemStack aAcidCell = ItemUtils.getItemStackOfAmountFromOreDict("cellHydrochloricAcid", 1); - - CORE.RA.addChemicalRecipe( - ELEMENT.getInstance().CHLORINE.getCell(1), - GT_Utility.getIntegratedCircuit(1), - ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), - FluidUtils.getFluidStack(HydrochloricAcid, 2000), - CI.emptyCells(1), - 60, - 8); - - CORE.RA.addChemicalRecipe( - ELEMENT.getInstance().HYDROGEN.getCell(1), - GT_Utility.getIntegratedCircuit(1), - ELEMENT.getInstance().CHLORINE.getFluidStack(1000), - FluidUtils.getFluidStack(HydrochloricAcid, 2000), - CI.emptyCells(1), - 60, - 8); - - GT_Values.RA.addElectrolyzerRecipe( - CI.emptyCells(1), - GT_Utility.getIntegratedCircuit(1), - FluidUtils.getFluidStack(HydrochloricAcid, 2000), - ELEMENT.getInstance().CHLORINE.getFluidStack(1000), - ELEMENT.getInstance().HYDROGEN.getCell(1), - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - null, - 720, - 30); - - GT_Values.RA.addElectrolyzerRecipe( - CI.emptyCells(1), - GT_Utility.getIntegratedCircuit(11), - FluidUtils.getFluidStack(HydrochloricAcid, 2000), - ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), - ELEMENT.getInstance().CHLORINE.getCell(1), - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - null, - 720, - 30); - - GT_Values.RA.addElectrolyzerRecipe( - ItemUtils.getSimpleStack(aAcidCell, 2), - GT_Values.NI, - GT_Values.NF, - GT_Values.NF, - ELEMENT.getInstance().HYDROGEN.getCell(1), - ELEMENT.getInstance().CHLORINE.getCell(1), - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - GT_Values.NI, - null, - 720, - 30); - } - - private void recipeCyclohexane() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierTwoChip(), - ItemUtils.getSimpleStack(mBrownCatalyst, 0) - }, - new FluidStack[] { - FluidUtils.getFluidStack(Benzene, 2000), - FluidUtils.getFluidStack("hydrogen", 10000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Cyclohexane, 1000), - }, - 20 * 120, - 120, - 2); - - } - - private void recipeCyclohexanone() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierTwoChip(), - ItemUtils.getSimpleStack(mBlueCatalyst, 0) - }, - new FluidStack[] { - FluidUtils.getFluidStack(Cyclohexane, 2000), - FluidUtils.getFluidStack("air", 10000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Cyclohexanone, 2000), - }, - 20 * 120, - 120, - 2); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierTwoChip(), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Phenol, 2000), - FluidUtils.getFluidStack("oxygen", 5000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Cyclohexanone, 2000), - }, - 20 * 120, - 120, - 2); - - - - - } - - private void recipeCatalystRed() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierOneChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().IRON.getDust(2), - ELEMENT.getInstance().COPPER.getDust(2), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mRedCatalyst, 10), - 20 * 20, - 30); - - } - - private void recipeCatalystYellow() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierThreeChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().TUNGSTEN.getDust(4), - ELEMENT.getInstance().NICKEL.getDust(4), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mYellowCatalyst, 10), - 60 * 20, - 2000); - - } - - private void recipeCatalystBlue() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierTwoChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().COBALT.getDust(3), - ELEMENT.getInstance().TITANIUM.getDust(3), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mBlueCatalyst, 10), - 40 * 20, - 500); - - } - - private void recipeCatalystOrange() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierTwoChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().VANADIUM.getDust(5), - ELEMENT.getInstance().PALLADIUM.getDust(5), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mOrangeCatalyst, 10), - 40 * 20, - 500); - - } - - private void recipeCatalystPurple() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierFourChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().IRIDIUM.getDust(6), - ELEMENT.getInstance().RUTHENIUM.getDust(6), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mPurpleCatalyst, 10), - 120 * 20, - 8000); - - } - - private void recipeCatalystBrown() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierOneChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().NICKEL.getDust(4), - ELEMENT.getInstance().ALUMINIUM.getDust(4), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mBrownCatalyst, 10), - 15 * 20, - 30); - - } - - private void recipeCatalystPink() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getTierThreeChip(), - CI.getEmptyCatalyst(10), - ELEMENT.getInstance().PLATINUM.getDust(4), - ELEMENT.getInstance().RHODIUM.getDust(4), - }, - GT_Values.NF, - ItemUtils.getSimpleStack(mPinkCatalyst, 10), - 30 * 20, - 2000); - - } - - private void recipeCadaverineAndPutrescine() { - - // Basic Recipe - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierOneChip(), - ItemUtils.getSimpleStack(Items.rotten_flesh, 64) - }, - new FluidStack[] { - FluidUtils.getHotWater(2000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Cadaverine, 250), - FluidUtils.getFluidStack(Putrescine, 250), - }, - 20 * 120, - 120, - 1); - - // Advanced Recipe - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierTwoChip(), - ItemUtils.getSimpleStack(Items.rotten_flesh, 128), - ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 8, 32) - }, - new FluidStack[] { - FluidUtils.getHotWater(3000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Cadaverine, 750), - FluidUtils.getFluidStack(Putrescine, 750), - }, - 20 * 120, - 240, - 2); - - } - - private void recipeAniline() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierThreeChip(), - ItemUtils.getSimpleStack(mBlueCatalyst, 0) - }, - new FluidStack[] { - FluidUtils.getFluidStack(NitroBenzene, 2000), - FluidUtils.getFluidStack("hydrogen", 10000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Aniline, 2000), - }, - 20 * 30, - 500, - 3); - - } - - private void recipeNitroBenzene() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getTierThreeChip(), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Benzene, 5000), - FluidUtils.getFluidStack("sulfuricacid", 3000), - FluidUtils.getFluidStack("nitricacid", 3000), - FluidUtils.getDistilledWater(10000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack("dilutedsulfuricacid", 3000), - FluidUtils.getFluidStack(NitroBenzene, 5000), - }, - 20 * 30, - 500, - 4); - - } - - private void recipe2Ethylanthraquinone() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(4), - ItemUtils.getItemStackOfAmountFromOreDict("dustPhthalicAnhydride", 4), - }, - new FluidStack[] { - FluidUtils.getFluidStack(CoalTar.Ethylbenzene, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Ethylanthraquinone2, 2000+(144*4)), - }, - 20 * 15, - 120, - 2); - - /*GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustPhthalicAnhydride", 4), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), - null, - FluidUtils.getFluidStack("fluid.2ethylanthraquinone", 2000+(144*4)), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 2), - 20*16);*/ - - } - - private void recipe2Ethylanthrahydroquinone() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(4), - ItemUtils.getSimpleStack(mOrangeCatalyst, 0), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Ethylanthraquinone2, 4000), - FluidUtils.getFluidStack("hydrogen", 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Ethylanthrahydroquinone2, 5000), - }, - 20 * 40, - 120, - 2); - - /*GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("platePalladium", 0), - ItemUtils.getItemStackOfAmountFromOreDict("cell2Ethylanthraquinone", 1), - FluidUtils.getFluidStack("hydrogen", 500), - FluidUtils.getFluidStack("fluid.2ethylanthrahydroquinone", 1200), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1), - 20*40);*/ - - } - - private void recipeLithiumPeroxide() { - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 2), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 3) - }, - null, - null, - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumPeroxide", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 2) - }, - new int[]{10000, 10000, 10000}, - 20*100, - 120); - } - - private void recipeLithiumHydroperoxide() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(4), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 7), - }, - new FluidStack[] { - FluidUtils.getFluidStack("fluid.hydrogenperoxide", 2000), - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 14), - }, - new FluidStack[] { - - }, - 20 * 30, - 240, - 1); - - - - /*CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 7), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 1), - 20, - FluidUtils.getFluidStack("fluid.cellhydrogenperoxide", 50), - null, - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 14), - CI.emptyCells(1), - 20*30, - 240); */ - } - - private void recipeHydrogenPeroxide() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(4), - }, - new FluidStack[] { - FluidUtils.getFluidStack("air", 15000), - FluidUtils.getFluidStack(Ethylanthrahydroquinone2, 5000), - FluidUtils.getFluidStack("fluid.anthracene", 50), - }, - new ItemStack[] { - }, - new FluidStack[] { - FluidUtils.getFluidStack(Ethylanthraquinone2, 4000), - FluidUtils.getFluidStack("fluid.hydrogenperoxide", 2000), - }, - 20 * 30, - 240, - 1); - - /* CORE.RA.addChemicalRecipe( - GT_ModHandler.getAirCell(15), - ItemUtils.getItemStackOfAmountFromOreDict("cell2Ethylanthrahydroquinone", 5), - 20, - FluidUtils.getFluidStack("fluid.anthracene", 50), - FluidUtils.getFluidStack("fluid.2ethylanthrahydroquinone", 4450), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 2), - CI.emptyCells(18), - 20*30, - 240);*/ - - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private static final ItemStack getTierOneChip() { - return CI.getNumberedAdvancedCircuit(4); - } - private static final ItemStack getTierTwoChip() { - return CI.getNumberedAdvancedCircuit(8); - } - private static final ItemStack getTierThreeChip() { - return CI.getNumberedAdvancedCircuit(12); - } - private static final ItemStack getTierFourChip() { - return CI.getNumberedAdvancedCircuit(16); - } - - private static void recipeAdvancedChip() { - GT_ModHandler.addShapelessCraftingRecipe( - GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 0L), 0, new Object[]{OrePrefixes.circuit.get(Materials.Advanced)}); - - long bits = 0; - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 1L, new Object[0]), bits, - new Object[]{"d ", " P ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 2L, new Object[0]), bits, - new Object[]{" d ", " P ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 3L, new Object[0]), bits, - new Object[]{" d", " P ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 4L, new Object[0]), bits, - new Object[]{" ", " Pd", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 5L, new Object[0]), bits, - new Object[]{" ", " P ", " d", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 6L, new Object[0]), bits, - new Object[]{" ", " P ", " d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 7L, new Object[0]), bits, - new Object[]{" ", " P ", "d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 8L, new Object[0]), bits, - new Object[]{" ", "dP ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 9L, new Object[0]), bits, - new Object[]{"P d", " ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 10L, new Object[0]), bits, - new Object[]{"P ", " d", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 11L, new Object[0]), bits, - new Object[]{"P ", " ", " d", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 12L, new Object[0]), bits, - new Object[]{"P ", " ", " d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 13L, new Object[0]), bits, - new Object[]{" P", " ", " d", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 14L, new Object[0]), bits, - new Object[]{" P", " ", " d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 15L, new Object[0]), bits, - new Object[]{" P", " ", "d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 16L, new Object[0]), bits, - new Object[]{" P", "d ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 17L, new Object[0]), bits, - new Object[]{" ", " ", "d P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 18L, new Object[0]), bits, - new Object[]{" ", "d ", " P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 19L, new Object[0]), bits, - new Object[]{"d ", " ", " P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 20L, new Object[0]), bits, - new Object[]{" d ", " ", " P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 21L, new Object[0]), bits, - new Object[]{"d ", " ", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 22L, new Object[0]), bits, - new Object[]{" d ", " ", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 23L, new Object[0]), bits, - new Object[]{" d", " ", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 24L, new Object[0]), bits, - new Object[]{" ", " d", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java b/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java deleted file mode 100644 index e08a509436..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java +++ /dev/null @@ -1,165 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import java.util.HashMap; -import java.util.List; - -import gregtech.api.enums.Materials; -import gtPlusPlus.core.item.base.misc.BaseItemParticle; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.util.Utils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -public class IonParticles extends BaseItemParticle { - - public static HashMap NameToMetaMap = new HashMap(); - public static HashMap MetaToNameMap = new HashMap(); - - - public IonParticles() { - super("Ion", ELEMENT.NAMES.length, EnumRarity.rare); - } - - public static IIcon[] overlays = new IIcon[ELEMENT.NAMES.length]; - public static IIcon baseTexture; - - static { - //Generate Ions - int key = 0; - for (String s : ELEMENT.NAMES) { - //Map names to Meta - NameToMetaMap.put(Utils.sanitizeString(s.toLowerCase()), key); - MetaToNameMap.put(key, Utils.sanitizeString(s.toLowerCase())); - Materials m = Materials.get(s); - int aColour = 0; - if (m == null) { - aColour = Utils.rgbtoHexValue(128, 128, 128); - } - else { - aColour = Utils.rgbtoHexValue(m.mRGBa[0], m.mRGBa[1], m.mRGBa[2]); - } - aColourMap.put(key++, aColour); - } - - } - - @Override - public String[] getAffixes() { - return new String[] {"", ""}; - } - - @Override - public String getUnlocalizedName() { - return ""; - } - - @Override - public String getUnlocalizedName(final ItemStack itemStack) { - return "item.particle.ion" + "." + ELEMENT.NAMES[itemStack.getItemDamage()]; - } - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Charge", 0); - tagMain.setTag("Ion", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getChargeState(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("Ion"); - if (aNBT != null) { - return aNBT.getLong("Charge"); - } - } - else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setChargeState(final ItemStack aStack, final long aCharge) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("Ion"); - if (aNBT != null) { - aNBT.setLong("Charge", aCharge); - return true; - } - } - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null){ - createNBT(stack); - } - double chargeState = getChargeState(stack); - return chargeState; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - long aCharge = getChargeState(stack); - String aState = EnumChatFormatting.YELLOW+"Unknown"+EnumChatFormatting.GRAY; - //State not set - if (aCharge == 0) { - list.add(EnumChatFormatting.GRAY+"A "+MetaToNameMap.get(stack.getItemDamage())+" Ion with an "+aState+" charge state"); - } - else { - if (aCharge > 0) { - aState = EnumChatFormatting.GREEN+"Positive"+EnumChatFormatting.GRAY; - } - else { - aState = EnumChatFormatting.RED+"Negative"+EnumChatFormatting.GRAY; - } - - list.add(EnumChatFormatting.GRAY+"A "+MetaToNameMap.get(stack.getItemDamage())+" Ion with a "+aState+" charge state of "+aCharge+""); - } - super.addInformation(stack, player, list, bool); - } - - @Override - public void registerIcons(IIconRegister reg) { - for (int i = 0; i < IonParticles.overlays.length; i++) { - IonParticles.overlays[i] = reg.registerIcon(CORE.MODID + ":" + "ion/"+i); - } - IonParticles.baseTexture = reg.registerIcon(CORE.MODID + ":" + "ion/IonBase"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return IonParticles.overlays[meta]; - } - - @Override - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - public IIcon getIconFromDamageForRenderPass(int aMeta, int aPass) { - if (aPass == 0) { - return IonParticles.baseTexture; - } - else { - return IonParticles.overlays[aMeta]; - } - } - - @Override - public int getRenderPasses(int metadata) { - return 2; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java b/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java deleted file mode 100644 index dfc85c533b..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java +++ /dev/null @@ -1,820 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import java.util.HashMap; - -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.api.objects.data.Quad; -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.item.base.ore.BaseItemMilledOre; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.NONMATERIAL; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.*; -import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class MilledOreProcessing extends ItemPackage { - - /** - * Fluids - */ - - public static Fluid SphaleriteFlotationFroth; - public static Fluid ChalcopyriteFlotationFroth; - public static Fluid NickelFlotationFroth; - public static Fluid PlatinumFlotationFroth; - public static Fluid PentlanditeFlotationFroth; - - public static Fluid RedstoneFlotationFroth; - public static Fluid SpessartineFlotationFroth; - public static Fluid GrossularFlotationFroth; - public static Fluid AlmandineFlotationFroth; - public static Fluid PyropeFlotationFroth; - public static Fluid MonaziteFlotationFroth; - - public static Fluid PineOil; - - - /** - * Items - */ - - // Zinc, Iron, Indium, Germanium - public static Item milledSphalerite; - - // Copper, Iron, Cadmium, Indium - public static Item milledChalcopyrite; - - // Nickel, Cobalt, Rhodium, Ruthenium - public static Item milledNickel; - - // Platinum, Rhodium, Selenium, Tellurium - public static Item milledPlatinum; - - // Iron, Nickel, Promethium, Hafnium - public static Item milledPentlandite; - - - - - // Redstone, Chrome, Firestone, Dysprosium - public static Item milledRedstone; - - // Manganese, Aluminium, Osmium, Strontium - public static Item milledSpessartine; - - // Calcium, Aluminium, Tungsten, Thallium - public static Item milledGrossular; - - // Aluminium, Magnesium, Yttrium, Ytterbium - public static Item milledAlmandine; - - // Magnesium, Manganese, Borax, Rhenium - public static Item milledPyrope; - - // Erbium, Lanthanum, Praseodymium, Europium - public static Item milledMonazite; - - - @Override - public void items() { - - milledSphalerite = BaseItemMilledOre.generate(Materials.Sphalerite, MaterialUtils.getVoltageForTier(6)); - milledChalcopyrite = BaseItemMilledOre.generate(Materials.Chalcopyrite, MaterialUtils.getVoltageForTier(5)); - milledNickel = BaseItemMilledOre.generate(Materials.Nickel, MaterialUtils.getVoltageForTier(5)); - milledPlatinum = BaseItemMilledOre.generate(Materials.Platinum, MaterialUtils.getVoltageForTier(6)); - milledPentlandite = BaseItemMilledOre.generate(Materials.Pentlandite, MaterialUtils.getVoltageForTier(6)); - - milledRedstone = BaseItemMilledOre.generate(Materials.Redstone, MaterialUtils.getVoltageForTier(5)); - milledSpessartine = BaseItemMilledOre.generate(Materials.Spessartine, MaterialUtils.getVoltageForTier(6)); - milledGrossular = BaseItemMilledOre.generate(Materials.Grossular, MaterialUtils.getVoltageForTier(6)); - milledAlmandine = BaseItemMilledOre.generate(Materials.Almandine, MaterialUtils.getVoltageForTier(6)); - milledPyrope = BaseItemMilledOre.generate(Materials.Pyrope, MaterialUtils.getVoltageForTier(4)); - milledMonazite = BaseItemMilledOre.generate(Materials.Monazite, MaterialUtils.getVoltageForTier(7)); - - } - - @Override - public void blocks() { - // None yet - } - - @Override - public void fluids() { - - short[] aZincFrothRGB = Materials.Sphalerite.mRGBa; - SphaleriteFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.zincflotation", "Sphalerite Froth", 32 + 175, new short[] { aZincFrothRGB[0], aZincFrothRGB[1], aZincFrothRGB[2], 100 }, true); - short[] aCopperFrothRGB = Materials.Chalcopyrite.mRGBa; - ChalcopyriteFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.copperflotation", "Chalcopyrite Froth", 32 + 175, new short[] { aCopperFrothRGB[0], aCopperFrothRGB[1], aCopperFrothRGB[2], 100 }, true); - short[] aNickelFrothRGB = Materials.Nickel.mRGBa; - NickelFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.nickelflotation", "Nickel Froth", 32 + 175, new short[] { aNickelFrothRGB[0], aNickelFrothRGB[1], aNickelFrothRGB[2], 100 }, true); - short[] aPlatinumFrothRGB = Materials.Platinum.mRGBa; - PlatinumFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.platinumflotation", "Platinum Froth", 32 + 175, new short[] { aPlatinumFrothRGB[0], aPlatinumFrothRGB[1], aPlatinumFrothRGB[2], 100 }, true); - short[] aPentlanditeFrothRGB = Materials.Pentlandite.mRGBa; - PentlanditeFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.pentlanditeflotation", "Pentlandite Froth", 32 + 175, new short[] { aPentlanditeFrothRGB[0], aPentlanditeFrothRGB[1], aPentlanditeFrothRGB[2], 100 }, true); - - short[] aRedstoneFrothRGB = Materials.Redstone.mRGBa; - RedstoneFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.redstoneflotation", "Redstone Froth", 32 + 175, new short[] { aRedstoneFrothRGB[0], aRedstoneFrothRGB[1], aRedstoneFrothRGB[2], 100 }, true); - short[] aSpessartineFrothRGB = Materials.Spessartine.mRGBa; - SpessartineFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.spessartineflotation", "Spessartine Froth", 32 + 175, new short[] { aSpessartineFrothRGB[0], aSpessartineFrothRGB[1], aSpessartineFrothRGB[2], 100 }, true); - short[] aGrossularFrothRGB = Materials.Grossular.mRGBa; - GrossularFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.grossularflotation", "Grossular Froth", 32 + 175, new short[] { aGrossularFrothRGB[0], aGrossularFrothRGB[1], aGrossularFrothRGB[2], 100 }, true); - short[] aAlmandineFrothRGB = Materials.Almandine.mRGBa; - AlmandineFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.almandineflotation", "Almandine Froth", 32 + 175, new short[] { aAlmandineFrothRGB[0], aAlmandineFrothRGB[1], aAlmandineFrothRGB[2], 100 }, true); - short[] aPyropeFrothRGB = Materials.Pyrope.mRGBa; - PyropeFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.pyropeflotation", "Pyrope Froth", 32 + 175, new short[] { aPyropeFrothRGB[0], aPyropeFrothRGB[1], aPyropeFrothRGB[2], 100 }, true); - short[] aMonaziteFrothRGB = Materials.Monazite.mRGBa; - MonaziteFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.Monaziteflotation", "Monazite Froth", 32 + 175, new short[] { aMonaziteFrothRGB[0], aMonaziteFrothRGB[1], aMonaziteFrothRGB[2], 100 }, true); - - - PineOil = FluidUtils.generateFluidNoPrefix("pineoil", "Pine Oil", 32 + 175, new short[] { 250, 200, 60, 100 }, true); - - } - - - - public MilledOreProcessing() { - super(); - Logger.INFO("Adding Ore Milling content"); - } - - private static void addMiscRecipes() { - - /* - * First 5 - */ - - //milledSphalerite - registerOreDataForMilledType( - SphaleriteFlotationFroth, - ELEMENT.getInstance().ZINC, 180, - ELEMENT.getInstance().IRON, 120, - ELEMENT.getInstance().INDIUM, 40, - ELEMENT.getInstance().GERMANIUM, 15 - ); - //milledChalcopyrite - registerOreDataForMilledType( - ChalcopyriteFlotationFroth, - ELEMENT.getInstance().COPPER, 180, - ELEMENT.getInstance().IRON, 120, - ELEMENT.getInstance().CADMIUM, 50, - ELEMENT.getInstance().INDIUM, 10 - ); - //milledNickel - registerOreDataForMilledType( - NickelFlotationFroth, - ELEMENT.getInstance().NICKEL, 150, - ELEMENT.getInstance().COBALT, 120, - ELEMENT.getInstance().RHODIUM, 32, - ELEMENT.getInstance().RUTHENIUM, 16 - ); - //milledPlatinum - registerOreDataForMilledType( - PlatinumFlotationFroth, - ELEMENT.getInstance().PLATINUM, 120, - ELEMENT.getInstance().RHODIUM, 60, - ELEMENT.getInstance().SELENIUM, 40, - ELEMENT.getInstance().TELLURIUM, 10 - ); - //milledPentlandite - registerOreDataForMilledType( - PentlanditeFlotationFroth, - ELEMENT.getInstance().IRON, 150, - ELEMENT.getInstance().NICKEL, 100, - ELEMENT.getInstance().PROMETHIUM, 20, - ELEMENT.getInstance().HAFNIUM, 10 - ); - - /* - * Second 5 - */ - //milledRedstone - registerOreDataForMilledType( - RedstoneFlotationFroth, - NONMATERIAL.REDSTONE, 300, - ELEMENT.getInstance().CHROMIUM, 60, - MaterialUtils.generateMaterialFromGtENUM(Materials.Firestone), 45, - ELEMENT.getInstance().DYSPROSIUM, 16 - ); - //milledSpessartine - registerOreDataForMilledType( - SpessartineFlotationFroth, - ELEMENT.getInstance().MANGANESE, 150, - ELEMENT.getInstance().ALUMINIUM, 90, - ELEMENT.getInstance().OSMIUM, 30, - ELEMENT.getInstance().STRONTIUM, 20 - ); - //milledGrossular - registerOreDataForMilledType( - GrossularFlotationFroth, - ELEMENT.getInstance().CALCIUM, 180, - ELEMENT.getInstance().ALUMINIUM, 110, - ELEMENT.getInstance().TUNGSTEN, 60, - ELEMENT.getInstance().THALLIUM, 15 - ); - //milledAlmandine - registerOreDataForMilledType( - AlmandineFlotationFroth, - ELEMENT.getInstance().ALUMINIUM, 150, - ELEMENT.getInstance().MAGNESIUM, 75, - ELEMENT.getInstance().YTTRIUM, 25, - ELEMENT.getInstance().YTTERBIUM, 15 - ); - //milledPyrope - registerOreDataForMilledType( - PyropeFlotationFroth, - ELEMENT.getInstance().MAGNESIUM, 110, - ELEMENT.getInstance().MANGANESE, 70, - MaterialUtils.generateMaterialFromGtENUM(Materials.Borax), 60, - ELEMENT.getInstance().RHENIUM, 20 - ); - //milledMonazite TODO - registerOreDataForMilledType( - MonaziteFlotationFroth, - ELEMENT.getInstance().ERBIUM, 96, - ELEMENT.getInstance().LANTHANUM, 96, - ELEMENT.getInstance().PRASEODYMIUM, 96, - ELEMENT.getInstance().EUROPIUM, 32 - ); - - - } - - @Override - public String errorMessage() { - return "Failed to generate recipes for OreMillingProc."; - } - - @Override - public boolean generateRecipes() { - addMiscRecipes(); - addPineOilExtraction(); - addFlotationRecipes1(); - addFlotationRecipes2(); - addVacuumFurnaceRecipes(); - return true; - } - - private void addVacuumFurnaceRecipes() { - int aCircuitID = 1; - - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(SphaleriteFlotationFroth, 4000) - }, - getOutputsFromMap(SphaleriteFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(6), - 5500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(ChalcopyriteFlotationFroth, 4000) - }, - getOutputsFromMap(ChalcopyriteFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(5), - 4500); - - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(NickelFlotationFroth, 4000) - }, - getOutputsFromMap(NickelFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(5), - 4500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(PlatinumFlotationFroth, 4000) - }, - getOutputsFromMap(PlatinumFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(6), - 5500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(PentlanditeFlotationFroth, 4000) - }, - getOutputsFromMap(PentlanditeFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(6), - 5500); - - - - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(RedstoneFlotationFroth, 4000) - }, - getOutputsFromMap(RedstoneFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(5), - 4500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(SpessartineFlotationFroth, 4000) - }, - getOutputsFromMap(SpessartineFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(6), - 5500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(GrossularFlotationFroth, 4000) - }, - getOutputsFromMap(GrossularFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(6), - 5500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(AlmandineFlotationFroth, 4000) - }, - getOutputsFromMap(AlmandineFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(6), - 5500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(PyropeFlotationFroth, 4000) - }, - getOutputsFromMap(PyropeFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(4), - 3500); - CORE.RA.addVacuumFurnaceRecipe( - new ItemStack[] { - CI.getNumberedCircuit(aCircuitID++) - }, - new FluidStack[] { - FluidUtils.getFluidStack(MonaziteFlotationFroth, 4000) - }, - getOutputsFromMap(MonaziteFlotationFroth), - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), - FluidUtils.getWater(2000) - }, - 20 * 120, - MaterialUtils.getVoltageForTier(7), - 7500); - - } - - private void addFlotationRecipes1() { - - // Sphalerite - CORE.RA.addFlotationRecipe( - Materials.Sphalerite, - ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 14000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(SphaleriteFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(6) - ); - - // Chalcopyrite - CORE.RA.addFlotationRecipe( - Materials.Chalcopyrite, - ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 12000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(ChalcopyriteFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(5) - ); - - // Nickel - CORE.RA.addFlotationRecipe( - Materials.Nickel, - ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 25000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(NickelFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(5) - ); - - // Platinum - CORE.RA.addFlotationRecipe( - Materials.Platinum, - ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 35000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(PlatinumFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(6) - ); - - - // Pentlandite - CORE.RA.addFlotationRecipe( - Materials.Pentlandite, - ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 14000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(PentlanditeFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(6) - ); - - } - - private void addFlotationRecipes2() { - - // Redstone - CORE.RA.addFlotationRecipe( - Materials.Redstone, - ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 13000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(RedstoneFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(5) - ); - - // Spessartine - CORE.RA.addFlotationRecipe( - Materials.Spessartine, - ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 35000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(SpessartineFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(6) - ); - - // Grossular - CORE.RA.addFlotationRecipe( - Materials.Grossular, - ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 28000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(GrossularFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(6) - ); - - // Almandine - CORE.RA.addFlotationRecipe( - Materials.Almandine, - ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 18000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(AlmandineFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(5) - ); - - // Pyrope - CORE.RA.addFlotationRecipe( - Materials.Pyrope, - ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 8000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(PyropeFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(4) - ); - - // Monazite - CORE.RA.addFlotationRecipe( - Materials.Monazite, - ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 30000), - }, - new FluidStack[] { - FluidUtils.getFluidStack(MonaziteFlotationFroth, 1000) - }, - 20 * 1200, - MaterialUtils.getVoltageForTier(6) - ); - - } - - private void addPineOilExtraction() { - AutoMap aLogs = new AutoMap(); - AutoMap aLeaves = new AutoMap(); - AutoMap aSaplings = new AutoMap(); - AutoMap aPinecones = new AutoMap(); - - ItemStack aCrushedPine = ItemUtils.getSimpleStack(AgriculturalChem.mCrushedPine, 1); - - aLogs.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.log_Pine)); - aLeaves.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.leaves_Pine)); - aSaplings.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine)); - aPinecones.add(ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, 1)); - - if (LoadedMods.BiomesOPlenty) { - aLogs.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.logs4, 0, 1)); - aLeaves.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.colorizedLeaves2, 1, 1)); - aSaplings.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.colorizedSaplings, 5, 1)); - aPinecones.add(ItemUtils.simpleMetaStack(HANDLER_BiomesOPlenty.mPineCone, 13, 1)); - } - if (LoadedMods.Forestry) { - ItemStack aForestryLog = ItemUtils.getItemStackFromFQRN("Forestry:logs", 1); - if (aForestryLog != null) { - aForestryLog.setItemDamage(20); // Set to Pine - aLogs.add(aForestryLog); - } - ItemStack aForestryLeaves = ItemUtils.getItemStackFromFQRN("Forestry:leaves", 1); - if (aForestryLeaves != null) { - NBTUtils.setString(aForestryLeaves, "species", "forestry.treePine"); // Set to Pine - aLeaves.add(aForestryLeaves); - } - } - - for (ItemStack aLog : aLogs) { - addRecipe(aLog, ItemUtils.getSimpleStack(aCrushedPine, 16), new int[] {10000, 7500, 5000, 2500}, 10, 120); - } - for (ItemStack aLeaf : aLeaves) { - addRecipe(aLeaf, ItemUtils.getSimpleStack(aCrushedPine, 2), new int[] {5000, 5000, 2500, 2500}, 10, 30); - } - for (ItemStack aSapling : aSaplings) { - addRecipe(aSapling, ItemUtils.getSimpleStack(aCrushedPine, 4), new int[] {7500, 7500, 2500, 2500}, 10, 60); - } - for (ItemStack aCone : aPinecones) { - addRecipe(aCone, ItemUtils.getSimpleStack(aCrushedPine, 1), new int[] {7500, 7500, 5000, 2500}, 10, 60); - } - - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(16), - ItemUtils.getSimpleStack(aCrushedPine, 64) - }, - new FluidStack[] { - FluidUtils.getSteam(5000), - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5) - }, - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 500) - }, - new int[] { - 2000, 2000, 2000, 2000 - }, - 20 * 60, - 120, - 3); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(18), - ItemUtils.getSimpleStack(aCrushedPine, 64) - }, - new FluidStack[] { - FluidUtils.getSuperHeatedSteam(5000), - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5) - }, - new FluidStack[] { - FluidUtils.getFluidStack(PineOil, 1500) - }, - new int[] { - 3000, 3000, 3000, 3000 - }, - 20 * 45, - 120, - 4); - - } - - public boolean addRecipe(ItemStack aInput, ItemStack aOutput1, int[] aChances, int aTime, int aEU) { - aOutput1 = GT_OreDictUnificator.get(true, aOutput1); - ItemStack aOutputs[] = new ItemStack[4]; - for (int i=0;i aCleanedItems = new AutoMap(); - for (ItemStack checkStack : input) { - if (ItemUtils.checkForInvalidItems(checkStack)) { - aCleanedItems.put(checkStack); - } - } - ItemStack[] aOutput = new ItemStack[aCleanedItems.size()]; - for (int i=0;i, Pair, Pair, Pair>> aMilledFluidMap = new HashMap, Pair, Pair, Pair>>(); - - public static void registerOreDataForMilledType(Fluid aMilledFluid, Materials aOutput1, int aPerc1, Materials aOutput2, int aPerc2, Materials aOutput3, int aPerc3, Materials aOutput4, int aPerc4) { - registerOreDataForMilledType(aMilledFluid, MaterialUtils.generateMaterialFromGtENUM(aOutput1), aPerc1, MaterialUtils.generateMaterialFromGtENUM(aOutput2), aPerc2, MaterialUtils.generateMaterialFromGtENUM(aOutput3), aPerc3, MaterialUtils.generateMaterialFromGtENUM(aOutput4), aPerc4); - } - - public static void registerOreDataForMilledType(Fluid aMilledFluid, Material aOutput1, int aPerc1, Material aOutput2, int aPerc2, Material aOutput3, int aPerc3, Material aOutput4, int aPerc4) { - - Pair aFluidOutput1 = new Pair(aOutput1, aPerc1); - Pair aFluidOutput2 = new Pair(aOutput2, aPerc2); - Pair aFluidOutput3 = new Pair(aOutput3, aPerc3); - Pair aFluidOutput4 = new Pair(aOutput4, aPerc4); - Quad, Pair, Pair, Pair> aDataQuad = new Quad, Pair, Pair, Pair>(aFluidOutput1, aFluidOutput2, aFluidOutput3, aFluidOutput4); - aMilledFluidMap.put(aMilledFluid.getUnlocalizedName(), aDataQuad); - - } - - private static ItemStack[] getOutputsFromMap(Fluid aFluid) { - String aKey = aFluid.getUnlocalizedName(); - return getArrayFromQuad(aMilledFluidMap.get(aKey)); - } - - private static ItemStack[] getArrayFromQuad(Quad, Pair, Pair, Pair> aData) { - AutoMap aOutputs = new AutoMap(); - for (Object aPair : aData.values()) { - if (aPair != null && Pair.class.isInstance(aPair)) { - Pair aObj = (Pair) aPair; - Material aMat = (Material) aObj.getKey(); - int aCount = (int) aObj.getValue(); - aOutputs.addAll(getItemStackFromPair(aMat, aCount)); - } - } - ItemStack[] aRealOutputArray = new ItemStack[aOutputs.size()]; - int aIndex = 0; - for (ItemStack aStack : aOutputs) { - aRealOutputArray[aIndex++] = aStack; - } - return aRealOutputArray; - } - - private static AutoMap getItemStackFromPair(Material aMat, Integer aCount) { - AutoMap aOutputs = new AutoMap(); - if (aCount > 64) { - AutoMap sizes = getStackSizes(aCount); - for (int aSplitSize : sizes) { - ItemStack aDustStack = aMat.getDust(aSplitSize); - aOutputs.put(aDustStack); - } - } - else { - ItemStack aDustStack = aMat.getDust(aCount); - aOutputs.put(aDustStack); - } - return aOutputs; - } - - private static AutoMap getStackSizes(int aBigSize){ - AutoMap aSizes = new AutoMap(); - if (aBigSize <= 64) { - aSizes.add(aBigSize); - } - else { - for (int i = aBigSize; i > 0; i -= 64) { - aSizes.add(i); - } - } - return aSizes; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/NuclearChem.java b/src/Java/gtPlusPlus/core/item/chemistry/NuclearChem.java deleted file mode 100644 index f112b0d2a5..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/NuclearChem.java +++ /dev/null @@ -1,116 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; -import gtPlusPlus.core.item.chemistry.general.ItemNuclearChemBase; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; - -public class NuclearChem extends ItemPackage { - - public static Fluid Burnt_LiFBeF2ThF4UF4; - public static Fluid Burnt_LiFBeF2ZrF4UF4; - public static Fluid Burnt_LiFBeF2ZrF4U235; - - - public static Fluid Impure_LiFBeF2; - - public static Fluid GeneticMutagen; - private static boolean generateMutagenRecipe = false; - - public static ItemNuclearChemBase mNuclearChemItem1; - - public static ItemStack mResidueUranium; - public static ItemStack mResiduePlutonium; - public static ItemStack mResidueFluorides; - public static ItemStack mResidueNobles; - - @Override - public void items() { - - mNuclearChemItem1 = new ItemNuclearChemBase(); - registerItemStacks(); - registerOreDict(); - } - - - public void registerItemStacks() { - - mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 0, 1); - mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 1, 1); - mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 2, 1); - mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 3, 1); - - } - - public void registerOreDict() { - - ItemUtils.addItemToOreDictionary(mResidueUranium, "dustResidueUranium"); - ItemUtils.addItemToOreDictionary(mResiduePlutonium, "dustResiduePlutonium"); - ItemUtils.addItemToOreDictionary(mResidueFluorides, "dustResidueFluoride"); - ItemUtils.addItemToOreDictionary(mResidueNobles, "dustResidueNoble"); - - } - - @Override - public void blocks() { - } - - @Override - public void fluids() { - //Create Used Nuclear Fuels - Burnt_LiFBeF2ThF4UF4 = FluidUtils.generateFluidNonMolten("BurntLiFBeF2ThF4UF4", "Burnt LiFBeF2ThF4UF4 Salt", 545, new short[]{48, 175, 48, 100}, null, null); - Burnt_LiFBeF2ZrF4UF4 = FluidUtils.generateFluidNonMolten("BurntLiFBeF2ZrF4UF4", "Burnt LiFBeF2ZrF4UF4 Salt", 520, new short[]{48, 168, 68, 100}, null, null); - Burnt_LiFBeF2ZrF4U235 = FluidUtils.generateFluidNonMolten("BurntLiFBeF2ZrF4U235", "Burnt LiFBeF2ZrF4U235 Salt", 533, new short[]{68, 185, 48, 100}, null, null); - Impure_LiFBeF2 = FluidUtils.generateFluidNonMolten("ImpureLiFBeF2", "Impure LiFBeF2 Salt", 533, new short[]{110, 75, 186, 100}, null, null); - if (FluidUtils.getFluidStack("fluid.Mutagen", 1) == null) { - GeneticMutagen = FluidUtils.generateFluidNonMolten("GeneticMutagen", "Genetic Mutagen", 12, new short[]{22, 148, 185, 100}, null, null); - generateMutagenRecipe = true; - } - else { - GeneticMutagen = FluidUtils.getFluidStack("fluid.Mutagen", 1).getFluid(); - } - } - - @Override - public String errorMessage() { - return "Bad Nuclear Chemistry Recipes."; - } - - @Override - public boolean generateRecipes() { - if (generateMutagenRecipe) { - chemReator_CreateMutagen(); - } - chemReactor_MutagenWithEggs(); - return true; - } - - private static void chemReator_CreateMutagen() { - CORE.RA.addChemicalRecipe( - CI.getNumberedCircuit(20), - ItemUtils.getSimpleStack(Items.nether_star, 2), - FluidUtils.getMobEssence(5000), - FluidUtils.getFluidStack(GeneticMutagen, 8000), - null, - 30*20, - 500); - } - - private static void chemReactor_MutagenWithEggs() { - CORE.RA.addChemicalRecipe( - CI.getNumberedCircuit(20), - ItemUtils.getSimpleStack(Items.egg, 2), - FluidUtils.getFluidStack(GeneticMutagen, 500), - null, - ItemUtils.getSimpleStack(ModItems.itemBigEgg, 2), - 300*20, - 500); - } -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/OilChem.java b/src/Java/gtPlusPlus/core/item/chemistry/OilChem.java deleted file mode 100644 index 4406995d27..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/OilChem.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import gtPlusPlus.api.objects.minecraft.ItemPackage; - -public class OilChem extends ItemPackage { - - /** - * Fluids - */ - - - /** - * Items - */ - - - - @Override - public void items() { - - } - - @Override - public void blocks() { - // None yet - } - - @Override - public void fluids() { - - } - - - - @Override - public String errorMessage() { - return "Failed to generate recipes for OilChem."; - } - - @Override - public boolean generateRecipes() { - - return true; - } -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java b/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java deleted file mode 100644 index b96e0c76ea..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java +++ /dev/null @@ -1,1071 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; - -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class RocketFuels extends ItemPackage { - - public static HashSet mValidRocketFuelNames = new HashSet(); - public static HashMap mValidRocketFuels = new HashMap(); - - public static Fluid Oil_Heavy; - public static Fluid Diesel; - public static Fluid Kerosene; - public static Fluid RP1; - public static Fluid Nitrogen_Tetroxide; - public static Fluid Hydrazine; - public static Fluid Monomethylhydrazine; - public static Fluid Unsymmetrical_Dimethylhydrazine; - public static Fluid Nitrous_Oxide; - public static Fluid Hydrated_Ammonium_Nitrate_Slurry; - public static Fluid Liquid_Oxygen; - public static Fluid Liquid_Hydrogen; - public static Fluid Formaldehyde; - - - //Rocket Fuel Mixes - public static Fluid Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide; - public static Fluid RP1_Plus_Liquid_Oxygen; - public static Fluid Dense_Hydrazine_Mix; - public static Fluid Monomethylhydrazine_Plus_Nitric_Acid; - - public static Item Ammonium_Nitrate_Dust; - public static Item Formaldehyde_Catalyst; - public static ItemStack Formaldehyde_Catalyst_Stack; - - public RocketFuels() { - super(true); - } - - public static void createKerosene(){ - - FluidStack fuelA = FluidUtils.getFluidStack("diesel", 3000); - FluidStack fuelB = FluidUtils.getFluidStack("fuel", 3000); - - if (fuelA != null){ - //GT_Values.RA.addDistilleryRecipe(23, fuelA, FluidUtils.getFluidStack(Kerosene, 50), 200, 64, false); - GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelA, FluidUtils.getFluidStack(Kerosene, 1800), 200, 64, false); - } - if (fuelA == null && fuelB != null){ - //GT_Values.RA.addDistilleryRecipe(23, fuelB, FluidUtils.getFluidStack(Kerosene, 50), 200, 64, false); - GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelB, FluidUtils.getFluidStack(Kerosene, 1800), 200, 64, false); - } - } - - public static void createRP1(){ - FluidStack fuelA = FluidUtils.getFluidStack(Kerosene, 1000); - if (fuelA != null){ - GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelA, FluidUtils.getFluidStack(RP1, 750), 20 * 40, 120, false); - } - } - - public static void createNitrogenTetroxide(){ - /*CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 4) - }, - FluidUtils.getFluidStack("nitricacid", 2000), - FluidUtils.getFluidStack(Nitrogen_Tetroxide, 450), - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 1) - }, - new int[]{100, 50}, - 20*16, - 500);*/ - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 12), - ItemUtils.getSimpleStack(GenericChem.mOrangeCatalyst, 0), - }, - new FluidStack[] { - FluidUtils.getFluidStack("nitricacid", 4000) - }, - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallAsh", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDarkAsh", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 1) - }, - new FluidStack[] { - FluidUtils.getFluidStack(Nitrogen_Tetroxide, 3000), - }, - new int[]{100, 100, 50, 50}, - 20 * 30, - MaterialUtils.getVoltageForTier(3), - 3); - - - } - - public static void createHydrazine(){ - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(21) - }, - new FluidStack[] { - FluidUtils.getFluidStack("fluid.hydrogenperoxide", 2000), - FluidUtils.getFluidStack("ammonia", 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Hydrazine, 4000), - - }, - 20 * 30, - MaterialUtils.getVoltageForTier(2), - 1); - - FluidStack aBartWorksHydrogenPeroxide = FluidUtils.getWildcardFluidStack("Hydrogen Peroxide", 2000); - if (aBartWorksHydrogenPeroxide != null) { - Logger.INFO("Found BW Hydrogen Peroxide, adding compat recipe."); - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(22) - }, - new FluidStack[] { - aBartWorksHydrogenPeroxide, - FluidUtils.getFluidStack("ammonia", 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Hydrazine, 4000), - - }, - 20 * 30, - MaterialUtils.getVoltageForTier(2), - 1); - } - - } - - - public static void createMonomethylhydrazine(){ - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(21), - ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 2) - }, - new FluidStack[] { - FluidUtils.getFluidStack("hydrogen", 2000), - FluidUtils.getFluidStack(Hydrazine, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Monomethylhydrazine, 4000), - - }, - 20 * 48, - 240, - 2); - - } - - private static void createLOX() { - GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidOxygen", 1), 20*16); - CORE.RA.addAdvancedFreezerRecipe(new ItemStack[] {}, new FluidStack[] {FluidUtils.getFluidStack("oxygen", 3000)}, new FluidStack[] {FluidUtils.getFluidStack(Liquid_Oxygen, 3000)}, new ItemStack[] {}, new int[] {}, 20*16, 240, 0); - } - - private static void createLOH() { - GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidHydrogen", 1), 20*16); - CORE.RA.addAdvancedFreezerRecipe(new ItemStack[] {}, new FluidStack[] {FluidUtils.getFluidStack("hydrogen", 300)}, new FluidStack[] {FluidUtils.getFluidStack(Liquid_Hydrogen, 300)}, new ItemStack[] {}, new int[] {}, 20*4, 540, 0); - } - - private static void createHydratedAmmoniumNitrateSlurry() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(21), - }, - new FluidStack[] { - FluidUtils.getFluidStack("ammonia", 4000), - FluidUtils.getFluidStack("nitricacid", 4000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Hydrated_Ammonium_Nitrate_Slurry, 8000), - - }, - 20 * 60, - 120, - 1); - - } - - private static void createAmmoniumNitrateDust() { - CORE.RA.addDehydratorRecipe( - new ItemStack[] {CI.getNumberedCircuit(8)}, - FluidUtils.getFluidStack(Hydrated_Ammonium_Nitrate_Slurry, 8*144), - FluidUtils.getWater(2000), - new ItemStack[] { - ItemUtils.getSimpleStack(Ammonium_Nitrate_Dust, 8) - }, - new int[] {10000}, - 90 * 20, - 480); - - } - - private static void createFormaldehyde() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(21), - ItemUtils.getSimpleStack(Formaldehyde_Catalyst, 0), - }, - new FluidStack[] { - FluidUtils.getFluidStack("oxygen", 16000), - FluidUtils.getFluidStack("methanol", 32000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Formaldehyde, 8000), - - }, - 20 * 90, - 120, - 1); - - } - - private static void createFormaldehydeCatalyst() { - GT_Values.RA.addMixerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 16), - ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 1), - CI.getNumberedCircuit(18), - null, - null, - null, - ItemUtils.getSimpleStack(Formaldehyde_Catalyst, 4), - 160, - 30); - - } - - private static void createUnsymmetricalDimethylhydrazine() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(21), - ItemUtils.getSimpleStack(Formaldehyde_Catalyst, 0), - }, - new FluidStack[] { - FluidUtils.getFluidStack("fluid.hydrazine", 2000), - FluidUtils.getFluidStack(Formaldehyde, 2000), - FluidUtils.getFluidStack("hydrogen", 4000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine, 2000), - FluidUtils.getWater(2000) - - }, - 20 * 60, - 120, - 3); - - } - - private static void addRocketFuelsToMap() { - HashMap mRocketFuels = new LinkedHashMap(); - mRocketFuels.put(0, new GTPP_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {FluidUtils.getFluidStack(RP1_Plus_Liquid_Oxygen, 1000)}, - new FluidStack[] {}, - 0, - 0, - 512)); //Fuel Value - - mRocketFuels.put(1, new GTPP_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {FluidUtils.getFluidStack(Dense_Hydrazine_Mix, 1000)}, - new FluidStack[] {}, - 0, - 0, - 1024)); //Fuel Value - - mRocketFuels.put(2, new GTPP_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {FluidUtils.getFluidStack(Monomethylhydrazine_Plus_Nitric_Acid, 1000)}, - new FluidStack[] {}, - 0, - 0, - 2048)); //Fuel Value - - mRocketFuels.put(3, new GTPP_Recipe( - true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide, 1000)}, - new FluidStack[] {}, - 0, - 0, - 4196)); //Fuel Value - - - //Add in default Diesel for the Buggy - mValidRocketFuels.put(-1, Diesel); - - mValidRocketFuelNames.add(FluidRegistry.getFluidName(Diesel)); - for (int mID : mRocketFuels.keySet()) { - GTPP_Recipe aFuelRecipe = mRocketFuels.get(mID); - if (aFuelRecipe != null) { - mValidRocketFuelNames.add(FluidRegistry.getFluidName(aFuelRecipe.mFluidInputs[0].getFluid())); - mValidRocketFuels.put(mID, aFuelRecipe.mFluidInputs[0].getFluid()); - GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels.add(aFuelRecipe); - } - } - - } - - - private static void createRocketFuels() { - - // RP1_Plus_Liquid_Oxygen - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(1), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Liquid_Oxygen, 2000), - FluidUtils.getFluidStack(RP1, 500), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(RP1_Plus_Liquid_Oxygen, 1500), - - }, - 20 * 15, - 240, - 3); - - - // Dense_Hydrazine_Mix - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(2), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Hydrazine, 4000), - FluidUtils.getFluidStack("methanol", 6000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Dense_Hydrazine_Mix, 10000), - - }, - 20 * 30, - 240, - 4); - - - // Monomethylhydrazine_Plus_Nitric_Acid - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(3), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Monomethylhydrazine, 2000), - FluidUtils.getFluidStack("nitricacid", 1000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Monomethylhydrazine_Plus_Nitric_Acid, 2000), - - }, - 20 * 45, - 480, - 5); - - - // Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedCircuit(4), - }, - new FluidStack[] { - FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine, 2000), - FluidUtils.getFluidStack(Nitrogen_Tetroxide, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide, 5000), - - }, - 20 * 60, - 480, - 6); - - } - - @Override - public String errorMessage() { - return "Bad Rocket Fuel Science!"; - } - - @Override - public boolean generateRecipes() { - createKerosene(); - createRP1(); - createNitrogenTetroxide(); - createHydrazine(); - createMonomethylhydrazine(); - - if (!CORE.GTNH) { - createLOX(); - } - createLOH(); - - - createHydratedAmmoniumNitrateSlurry(); - createAmmoniumNitrateDust(); - createFormaldehyde(); - createFormaldehydeCatalyst(); - createUnsymmetricalDimethylhydrazine(); - - createRocketFuels(); - addRocketFuelsToMap(); - - return true; - } - - @Override - public void items() { - Formaldehyde_Catalyst = ItemUtils.generateSpecialUseDusts("FormaldehydeCatalyst", "Formaldehyde Catalyst", "Fe16V1", Utils.rgbtoHexValue(25, 5, 25))[0]; - Formaldehyde_Catalyst_Stack = ItemUtils.getSimpleStack(Formaldehyde_Catalyst); - } - - @Override - public void blocks() { - } - - @Override - public void fluids() { - - //Register default fluids - Diesel = MaterialUtils.getMaterial("Fuel", "Diesel").getFluid(1).getFluid(); - - // 5.08 Compat - if (!FluidUtils.doesFluidExist("liquid_heavy_oil")){ - Oil_Heavy = FluidUtils.generateFluidNoPrefix("liquid_heavy_oil", "Heavy Oil", 200, new short[]{10, 10, 10, 100}); - } - else { - Oil_Heavy = MaterialUtils.getMaterial("OilHeavy", "Oil").getFluid(1).getFluid(); - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellOilHeavy", 1) == null){ - new BaseItemComponent("OilHeavy", "Heavy Oil", new short[] {10, 10, 10}); - } - } - - - //Create Kerosene - Kerosene = FluidUtils.generateFluidNonMolten("Kerosene", "Kerosene", 233, new short[]{150, 40, 150, 100}, null, null); - CoalTar.Coal_Oil = Kerosene; - - //RP! Focket Fuel - RP1 = FluidUtils.generateFluidNonMolten("RP1Fuel", "RP-1", 500, new short[]{210, 50, 50, 100}, null, null); - - //Create Nitrogen Tetroxide - Nitrogen_Tetroxide = FluidUtils.generateFluidNonMolten("NitrogenTetroxide", "Nitrogen Tetroxide", 261, new short[]{170, 170, 0, 100}, null, null); - - //Create Hydrazine - Hydrazine = FluidUtils.generateFluidNonMolten("Hydrazine", "Hydrazine", 2, new short[]{250, 250, 250, 100}, null, null); - - //Create Monomethylhydrazine - Monomethylhydrazine = FluidUtils.generateFluidNonMolten("Monomethylhydrazine", "Monomethylhydrazine", 221, new short[]{125, 125, 125, 100}, null, null); - - //Create Anthracene - Nitrous_Oxide = FluidUtils.generateFluidNonMolten("NitrousOxide", "Nitrous Oxide", 182, new short[]{255, 255, 255, 100}, null, null); - - //Nos - if (!FluidUtils.doesFluidExist("NitrousOxide")){ - Nitrous_Oxide = FluidUtils.generateFluidNoPrefix("NitrousOxide", "Nitrous Oxide", 182, new short[]{255, 255, 255, 100}); - } - else { - Nitrous_Oxide = FluidUtils.getWildcardFluidStack("NitrousOxide", 1).getFluid(); - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellNitrousOxide", 1) == null){ - new BaseItemComponent("NitrousOxide", "Nitrous Oxide", new short[] {10, 10, 175}); - } - } - - //Unsymmetrical_Dimethylhydrazine - if (FluidUtils.getFluidStack("1,1dimethylhydrazine", 1) == null){ - Unsymmetrical_Dimethylhydrazine = FluidUtils.generateFluidNonMolten("UnsymmetricalDimethylhydrazine", "Unsymmetrical Dimethylhydrazine", 216, new short[]{70, 210, 20, 100}, null, null); - } - else { - Unsymmetrical_Dimethylhydrazine = FluidUtils.getFluidStack("1,1dimethylhydrazine", 1000).getFluid(); - } - - //Create Hydrated_Ammonium_Nitrate_Slurry - Hydrated_Ammonium_Nitrate_Slurry = FluidUtils.generateFluidNonMolten("AmmoniumNitrateSlurry", "Hydrated Ammonium Nitrate Slurry", 450, new short[]{150, 75, 150, 100}, null, null); - - //Lithium Hydroperoxide - LiOH + H2O2 → LiOOH + 2 H2O - Ammonium_Nitrate_Dust = ItemUtils.generateSpecialUseDusts("AmmoniumNitrate", "Ammonium Nitrate", "N2H4O3", Utils.rgbtoHexValue(150, 75, 150))[0]; - - //Create Liquid_Oxygen - if (FluidUtils.getFluidStack("LiquidOxygen", 1) == null && FluidUtils.getFluidStack("liquidoxygen", 1) == null){ - Liquid_Oxygen = FluidUtils.generateFluidNonMolten("LiquidOxygen", "Liquid Oxygen", 54, new short[]{75, 75, 220, 100}, null, null); - } - else { - if (FluidUtils.getFluidStack("LiquidOxygen", 1) != null ) { - Liquid_Oxygen = FluidUtils.getFluidStack("LiquidOxygen", 1).getFluid(); - } - else { - Liquid_Oxygen = FluidUtils.getFluidStack("liquidoxygen", 1).getFluid(); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellLiquidOxygen", 1) == null){ - new BaseItemComponent("LiquidOxygen", "Liquid Oxygen", new short[] {10, 10, 175}); - } - } - - //Create Liquid_Hydrogen - if (FluidUtils.getFluidStack("LiquidHydrogen", 1) == null && FluidUtils.getFluidStack("liquidhydrogen", 1) == null){ - Liquid_Hydrogen = FluidUtils.generateFluidNonMolten("LiquidHydrogen", "Liquid Hydrogen", 14, new short[]{75, 75, 220, 100}, null, null); - } - else { - if (FluidUtils.getFluidStack("LiquidHydrogen", 1) != null ) { - Liquid_Hydrogen = FluidUtils.getFluidStack("LiquidHydrogen", 1).getFluid(); - } - else { - Liquid_Hydrogen = FluidUtils.getFluidStack("liquidhydrogen", 1).getFluid(); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellLiquidHydrogen", 1) == null){ - new BaseItemComponent("LiquidHydrogen", "Liquid Hydrogen", new short[] {10, 10, 175}); - } - } - - Formaldehyde = FluidUtils.generateFluidNonMolten("Formaldehyde", "Formaldehyde", 185, new short[]{150, 75, 150, 100}, null, null); - - Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide = FluidUtils.generateFluidNonMolten("RocketFuelMixA", "H8N4C2O4 Rocket Fuel", 216, new short[]{50, 220, 50, 100}, null, null); - RP1_Plus_Liquid_Oxygen = FluidUtils.generateFluidNonMolten("RocketFuelMixB", "Rp-1 Rocket Fuel", 250, new short[]{250, 50, 50, 100}, null, null); - Monomethylhydrazine_Plus_Nitric_Acid = FluidUtils.generateFluidNonMolten("RocketFuelMixC", "CN3H7O3 Rocket Fuel", 221, new short[]{125, 75, 180, 100}, null, null); - Dense_Hydrazine_Mix = FluidUtils.generateFluidNonMolten("RocketFuelMixD", "Dense Hydrazine Fuel Mixture", 275, new short[]{175, 80, 120, 100}, null, null); - - } - - @Override - public boolean onLoadComplete(FMLLoadCompleteEvent event) { - - Logger.INFO("Trying to remove GT recipes for '1,1dimethylhydrazine' && 'rocket_fuel' if they exist."); - /*if (FluidRegistry.isFluidRegistered("1,1dimethylhydrazine")) { - - // Try Remove recipes for GT/EIO Rocket Fuel Cells - if (FluidRegistry.isFluidRegistered("rocket_fuel")) { - - // Old Recipe - if (MaterialUtils.doesMaterialExist("NitrogenDioxide")) { - GT_Recipe aOldRecipe = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellNitrogenDioxide", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 3), - }, - new FluidStack[] { - FluidUtils.getFluidStack("air", 500) - }, - 388); - boolean aDidRemove = removeRecipe(aOldRecipe, GT_Recipe_Map.sChemicalRecipes); - Logger.INFO("Removed Old Recipe for Rocket Fuel: "+aDidRemove); - } - - // Simple Recipes - if (MaterialUtils.doesMaterialExist("Ammonia") && MaterialUtils.doesMaterialExist("Methanol")) { - - GT_Recipe aSimpleRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellAmmonia", 3), - ItemUtils.getItemStackOfAmountFromOreDict("cellMethanol", 4), - }, - new FluidStack[] { - FluidUtils.getFluidStack("chlorine", 1000) - }, - 480); - GT_Recipe aSimpleRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellChlorine", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellMethanol", 4), - }, - new FluidStack[] { - FluidUtils.getFluidStack("ammonia", 3000) - }, - 480); - GT_Recipe aSimpleRecipe3 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellAmmonia", 3), - ItemUtils.getItemStackOfAmountFromOreDict("cellChlorine", 1), - }, - new FluidStack[] { - FluidUtils.getFluidStack("methanol", 4000) - }, - 480); - - boolean aDidRemove1 = removeRecipe(aSimpleRecipe1, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove2 = removeRecipe(aSimpleRecipe2, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove3 = removeRecipe(aSimpleRecipe3, GT_Recipe_Map.sChemicalRecipes); - Logger.INFO("Removed Simple Recipe 1 for Rocket Fuel: "+aDidRemove1); - Logger.INFO("Removed Simple Recipe 2 for Rocket Fuel: "+aDidRemove2); - Logger.INFO("Removed Simple Recipe 3 for Rocket Fuel: "+aDidRemove3); - } - - - // Complex Recipes I - if (MaterialUtils.doesMaterialExist("Dimethylhydrazine") && MaterialUtils.doesMaterialExist("DinitrogenTetroxide")) { - - GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylhydrazine", 1), - }, - new FluidStack[] { - FluidUtils.getFluidStack("dinitrogentetroxide", 1000) - }, - 16); - GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDinitrogenTetroxide", 1), - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylhydrazine", 1000) - }, - 16); - - GT_Recipe aAdvRecipe3 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylhydrazine", 2), - }, - new FluidStack[] { - FluidUtils.getFluidStack("oxygen", 1000) - }, - 16); - GT_Recipe aAdvRecipe4 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylhydrazine", 2000) - }, - 16); - - boolean aDidRemove1 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sMixerRecipes); - boolean aDidRemove2 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sMixerRecipes); - boolean aDidRemove3 = removeRecipe(aAdvRecipe3, GT_Recipe_Map.sMixerRecipes); - boolean aDidRemove4 = removeRecipe(aAdvRecipe4, GT_Recipe_Map.sMixerRecipes); - Logger.INFO("Removed Complex Recipe 1 for Rocket Fuel: "+aDidRemove1); - Logger.INFO("Removed Complex Recipe 2 for Rocket Fuel: "+aDidRemove2); - Logger.INFO("Removed Complex Recipe 3 for Rocket Fuel: "+aDidRemove3); - Logger.INFO("Removed Complex Recipe 4 for Rocket Fuel: "+aDidRemove4); - } - } - - - // Complex Recipes II - if (MaterialUtils.doesMaterialExist("Dimethylhydrazine")) { - - GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylhydrazine", 2), - }, - new FluidStack[] { - FluidUtils.getFluidStack("oxygen", 1000) - }, - 16); - GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylhydrazine", 2000) - }, - 16); - - boolean aDidRemove1 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sMixerRecipes); - boolean aDidRemove2 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sMixerRecipes); - Logger.INFO("Removed Complex Recipe 5 for Rocket Fuel: "+aDidRemove1); - Logger.INFO("Removed Complex Recipe 6 for Rocket Fuel: "+aDidRemove2); - } - - if (MaterialUtils.doesMaterialExist("Chloramine") && MaterialUtils.doesMaterialExist("Dimethylamine")) { - GT_Recipe aSimpleRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 2), - GT_Utility.getIntegratedCircuit(1) - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylamine", 5000) - }, - 480); - GT_Recipe aSimpleRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 5), - GT_Utility.getIntegratedCircuit(1) - }, - new FluidStack[] { - FluidUtils.getFluidStack("chloramine", 2000) - }, - 16); - - - - GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 2), - CI.emptyCells(4) - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylamine", 5000) - }, - 480); - GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 5), - CI.emptyCells(1) - }, - new FluidStack[] { - FluidUtils.getFluidStack("chloramine", 2000) - }, - 16); - GT_Recipe aAdvRecipe3 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 2), - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 5), - }, - new FluidStack[] { - FluidUtils.getFluidStack("chloramine", 2000) - }, - 480); - - boolean aDidRemove1 = removeRecipe(aSimpleRecipe1, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove2 = removeRecipe(aSimpleRecipe2, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove3 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove4 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove5 = removeRecipe(aAdvRecipe3, GT_Recipe_Map.sChemicalRecipes); - Logger.INFO("Removed Complex Recipe 1 for 1,1dimethylhydrazine: "+aDidRemove1); - Logger.INFO("Removed Complex Recipe 2 for 1,1dimethylhydrazine: "+aDidRemove2); - Logger.INFO("Removed Complex Recipe 3 for 1,1dimethylhydrazine: "+aDidRemove3); - Logger.INFO("Removed Complex Recipe 4 for 1,1dimethylhydrazine: "+aDidRemove4); - Logger.INFO("Removed Complex Recipe 5 for 1,1dimethylhydrazine: "+aDidRemove5); - - } - - if (MaterialUtils.doesMaterialExist("Chloramine") && MaterialUtils.doesMaterialExist("Dimethylamine")) { - GT_Recipe aSimpleRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 1), - GT_Utility.getIntegratedCircuit(1) - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylamine", 1000) - }, - 480); - GT_Recipe aSimpleRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 1), - GT_Utility.getIntegratedCircuit(1) - }, - new FluidStack[] { - FluidUtils.getFluidStack("chloramine", 1000) - }, - 16); - - - - GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 1), - GT_Utility.getIntegratedCircuit(11) - }, - new FluidStack[] { - FluidUtils.getFluidStack("dimethylamine", 1000) - }, - 480); - GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 1), - GT_Utility.getIntegratedCircuit(11) - }, - new FluidStack[] { - FluidUtils.getFluidStack("chloramine", 1000) - }, - 16); - - boolean aDidRemove1 = removeRecipe(aSimpleRecipe1, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove2 = removeRecipe(aSimpleRecipe2, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove3 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sChemicalRecipes); - boolean aDidRemove4 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sChemicalRecipes); - Logger.INFO("Removed Complex Recipe 5 for 1,1dimethylhydrazine: "+aDidRemove1); - Logger.INFO("Removed Complex Recipe 6 for 1,1dimethylhydrazine: "+aDidRemove2); - Logger.INFO("Removed Complex Recipe 7 for 1,1dimethylhydrazine: "+aDidRemove3); - Logger.INFO("Removed Complex Recipe 8 for 1,1dimethylhydrazine: "+aDidRemove4); - - } - - if (MaterialUtils.doesMaterialExist("HypochlorousAcid") && MaterialUtils.doesMaterialExist("Ammonia") && MaterialUtils.doesMaterialExist("Methanol")) { - - GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(24), - }, - new FluidStack[] { - FluidUtils.getFluidStack("hypochlorousacid", 3000), - FluidUtils.getFluidStack("ammonia", 8000), - FluidUtils.getFluidStack("methanol", 12000) - }, - 480); - - GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( - new ItemStack[] { - GT_Utility.getIntegratedCircuit(24), - }, - new FluidStack[] { - FluidUtils.getFluidStack("hypochlorousacid", 1000), - FluidUtils.getFluidStack("ammonia", 1000), - FluidUtils.getFluidStack("methanol", 2000) - }, - 480); - - boolean aDidRemove1 = removeRecipe(aAdvRecipe1, StaticFields59.getLargeChemicalReactorRecipeMap()); - boolean aDidRemove2 = removeRecipe(aAdvRecipe2, StaticFields59.getLargeChemicalReactorRecipeMap()); - Logger.INFO("Removed Complex Recipe 9 for 1,1dimethylhydrazine: "+aDidRemove1); - Logger.INFO("Removed Complex Recipe 10 for 1,1dimethylhydrazine: "+aDidRemove2); - - - } - }*/ - - // Try Butcher recipes manually - - //1,1Dimethylhydrazine - if (FluidRegistry.isFluidRegistered("1,1dimethylhydrazine")) { - Logger.INFO("Making sure all Chemical Reactor recipes for 1,1dimethylhydrazine have been removed."); - AutoMap aToRemoveSingle = new AutoMap(); - ItemStack aUnsymCell = ItemUtils.getItemStackOfAmountFromOreDict("cell1,1Dimethylhydrazine", 1); - FluidStack aUnsymFluid = FluidUtils.getFluidStack("1,1dimethylhydrazine", 1); - recipe : for (GT_Recipe aRecipeSingleBlock : GT_Recipe_Map.sChemicalRecipes.mRecipeList) { - if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { - if (aRecipeSingleBlock.mOutputs != null && aRecipeSingleBlock.mOutputs.length > 0) { - for (ItemStack aOutputItem : aRecipeSingleBlock.mOutputs) { - ItemStack aTemp = aOutputItem.copy(); - aTemp.stackSize = 1; - if (GT_Utility.areStacksEqual(aTemp, aUnsymCell)) { - aToRemoveSingle.add(aRecipeSingleBlock); - continue recipe; - } - } - } - if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { - for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { - if (GT_Utility.areFluidsEqual(aOutput, aUnsymFluid)) { - aToRemoveSingle.add(aRecipeSingleBlock); - continue recipe; - } - } - } - } - } - // Handle Multi Also - AutoMap aToRemoveMulti = new AutoMap(); - recipe : for (GT_Recipe aRecipeSingleBlock : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { - if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { - if (aRecipeSingleBlock.mOutputs != null && aRecipeSingleBlock.mOutputs.length > 0) { - for (ItemStack aOutputItem : aRecipeSingleBlock.mOutputs) { - ItemStack aTemp = aOutputItem.copy(); - aTemp.stackSize = 1; - if (GT_Utility.areStacksEqual(aTemp, aUnsymCell)) { - aToRemoveMulti.add(aRecipeSingleBlock); - continue recipe; - } - } - } - if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { - for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { - if (GT_Utility.areFluidsEqual(aOutput, aUnsymFluid)) { - aToRemoveMulti.add(aRecipeSingleBlock); - continue recipe; - } - } - } - } - } - if (!aToRemoveSingle.isEmpty()) { - Logger.INFO("Found "+aToRemoveSingle.size()+" single block recipes, removing by force."); - for (GT_Recipe remove : aToRemoveSingle) { - GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(remove); - } - } - if (!aToRemoveMulti.isEmpty()) { - Logger.INFO("Found "+aToRemoveSingle.size()+" multiblock recipes, removing by force."); - for (GT_Recipe remove : aToRemoveMulti) { - StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList.remove(remove); - } - } - } - - - if (FluidRegistry.isFluidRegistered("rocket_fuel")) { - Logger.INFO("Making sure all Mixer recipes for rocket_fuel have been removed."); - AutoMap aToRemoveSingle = new AutoMap(); - FluidStack aRocketFluid = FluidUtils.getFluidStack("rocket_fuel", 1); - recipe : for (GT_Recipe aRecipeSingleBlock : GT_Recipe_Map.sMixerRecipes.mRecipeList) { - if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { - if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { - for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { - if (GT_Utility.areFluidsEqual(aOutput, aRocketFluid)) { - aToRemoveSingle.add(aRecipeSingleBlock); - continue recipe; - } - } - } - } - } - if (!aToRemoveSingle.isEmpty()) { - Logger.INFO("Found "+aToRemoveSingle.size()+" recipes, removing by force."); - for (GT_Recipe remove : aToRemoveSingle) { - GT_Recipe_Map.sMixerRecipes.mRecipeList.remove(remove); - } - aToRemoveSingle.clear(); - } - - Logger.INFO("Making sure all Chemical Reactor recipes for rocket_fuel have been removed."); - recipe : for (GT_Recipe aRecipeSingleBlock : GT_Recipe_Map.sChemicalRecipes.mRecipeList) { - if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { - if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { - for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { - if (GT_Utility.areFluidsEqual(aOutput, aRocketFluid)) { - aToRemoveSingle.add(aRecipeSingleBlock); - continue recipe; - } - } - } - } - } - // Handle Multi Also - AutoMap aToRemoveMulti = new AutoMap(); - recipe : for (GT_Recipe aRecipeSingleBlock : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { - if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { - if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { - for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { - if (GT_Utility.areFluidsEqual(aOutput, aRocketFluid)) { - aToRemoveMulti.add(aRecipeSingleBlock); - continue recipe; - } - } - } - } - } - if (!aToRemoveSingle.isEmpty()) { - Logger.INFO("Found "+aToRemoveSingle.size()+" single block recipes, removing by force."); - for (GT_Recipe remove : aToRemoveSingle) { - GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(remove); - } - } - if (!aToRemoveMulti.isEmpty()) { - Logger.INFO("Found "+aToRemoveSingle.size()+" multiblock recipes, removing by force."); - for (GT_Recipe remove : aToRemoveMulti) { - StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList.remove(remove); - } - } - - } - - - - Logger.INFO("Finished clean-up of GT Rocket Fuel Recipes."); - return true; - } - - private static GTPP_Recipe getHalfBakedRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, int aEU) { - return new GTPP_Recipe(false, aInputs, null, null, null, aFluidInputs, null, 0, aEU, 0); - - } - - public static boolean removeRecipe(GT_Recipe aRecipe, GT_Recipe_Map aMap) { - if (aMap != GT_Recipe_Map.sChemicalRecipes) { - GT_Recipe aFoundRecipe = aMap.findRecipe(null, false, true, aRecipe.mEUt, aRecipe.mFluidInputs, aRecipe.mInputs); - boolean aSingle = false; - if (aFoundRecipe != null) { - Logger.INFO("Found Single Block Recipe, removing."); - aSingle = aMap.mRecipeList.remove(aFoundRecipe); - Logger.INFO("Success? "+aSingle); - } - return aSingle; - } - else { - GT_Recipe aFoundRecipe = aMap.findRecipe(null, false, true, aRecipe.mEUt, aRecipe.mFluidInputs, aRecipe.mInputs); - GT_Recipe aFoundRecipe2 = StaticFields59.getLargeChemicalReactorRecipeMap().findRecipe(null, false, true, aRecipe.mEUt, aRecipe.mFluidInputs, aRecipe.mInputs); - boolean aSingle = false; - boolean aMulti = false; - if (aFoundRecipe != null) { - Logger.INFO("Found Single Block Recipe, removing."); - aSingle = GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(aFoundRecipe); - Logger.INFO("Success? "+aSingle); - } - if (aFoundRecipe2 != null) { - Logger.INFO("Found Multiblock Recipe, removing."); - aMulti = StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList.remove(aFoundRecipe2); - Logger.INFO("Success? "+aSingle); - } - return aSingle && aMulti; - } - } - - - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java b/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java deleted file mode 100644 index 10eaaf0da9..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java +++ /dev/null @@ -1,161 +0,0 @@ -package gtPlusPlus.core.item.chemistry; - -import java.util.HashMap; -import java.util.List; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.base.misc.BaseItemParticle; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Particle; -import gtPlusPlus.core.material.Particle.ElementaryGroup; -import gtPlusPlus.core.util.Utils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -public class StandardBaseParticles extends BaseItemParticle { - - public static HashMap NameToMetaMap = new HashMap(); - public static HashMap MetaToNameMap = new HashMap(); - - public StandardBaseParticles() { - super("Base", aTypes.length, EnumRarity.rare); - } - - private static final String[] aTypes = new String[] { "Graviton", "Up", "Down", "Charm", "Strange", "Top", - "Bottom", "Electron", "Electron Neutrino", "Muon", "Muon Neutrino", "Tau", "Tau Neutrino", "Gluon", - "Photon", "Z Boson", "W Boson", "Higgs Boson", "Proton", "Neutron", "Lambda", "Omega", "Pion", - "ETA Meson", "Unknown" }; - - public IIcon[] icons = new IIcon[aTypes.length]; - - static { - //Generate Ions - int key = 0; - - - for (String s : aTypes) { - //Map names to Meta - NameToMetaMap.put(Utils.sanitizeString(s.toLowerCase()), key); - MetaToNameMap.put(key, Utils.sanitizeString(s.toLowerCase())); - for (Particle o : Particle.aMap) { - int aColour = 0; - if (o.mParticleName.toLowerCase().equals(s.toLowerCase())) { - if (o.mParticleType == ElementaryGroup.BARYON) { - aColour = Utils.rgbtoHexValue(174, 226, 156); - aColourMap.put(key++, aColour); - } - else if (o.mParticleType == ElementaryGroup.BOSON) { - if (o == Particle.HIGGS_BOSON) { - aColour = Utils.rgbtoHexValue(226, 196, 104); - aColourMap.put(key++, aColour); - } - else { - aColour = Utils.rgbtoHexValue(226, 52, 66); - aColourMap.put(key++, aColour); - } - } - else if (o.mParticleType == ElementaryGroup.LEPTON) { - aColour = Utils.rgbtoHexValue(126, 226, 95); - aColourMap.put(key++, aColour); - } - else if (o.mParticleType == ElementaryGroup.MESON) { - aColour = Utils.rgbtoHexValue(90, 154, 226); - aColourMap.put(key++, aColour); - } - else { - aColour = Utils.rgbtoHexValue(188, 61, 226); - aColourMap.put(key++, aColour); - } - } - } - } - - } - - @Override - public String[] getAffixes() { - return new String[] {"", ""}; - } - - @Override - public String getUnlocalizedName() { - return ""; - } - - @Override - public String getUnlocalizedName(final ItemStack itemStack) { - return "item.particle.base" + "." + aTypes[itemStack.getItemDamage()]; - } - - public static Particle getParticle(ItemStack aStack) { - AutoMap g = Particle.aMap; - for (Particle p : g) { - String aPartName = Utils.sanitizeString(p.mParticleName.toLowerCase()); - String expectedPart = Utils.sanitizeString(aTypes[aStack.getItemDamage()].toLowerCase()); - if (aPartName.equals(expectedPart)) { - return p; - } - } - return Particle.UNKNOWN; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - //return Utils.rgbtoHexValue(200, 200, 200); - return super.getColorFromParentClass(stack, HEX_OxFFFFFF); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - Particle aCharge = getParticle(stack); - EnumChatFormatting aColour = EnumChatFormatting.GRAY; - String aState = aColour+"Unknown"+EnumChatFormatting.RESET; - if (aCharge != null) { - String aGroup = aCharge.mParticleType.name().toLowerCase(); - if (aGroup.toLowerCase().contains("quark")) { - aColour = EnumChatFormatting.LIGHT_PURPLE; - } - else if (aGroup.toLowerCase().contains("lepton")) { - aColour = EnumChatFormatting.GREEN; - } - else if (aCharge == Particle.HIGGS_BOSON) { - aColour = EnumChatFormatting.YELLOW; - } - else if (aGroup.toLowerCase().contains("boson")) { - aColour = EnumChatFormatting.RED; - } - else if (aGroup.toLowerCase().contains("baryon")) { - aColour = EnumChatFormatting.BLUE; - } - else if (aGroup.toLowerCase().contains("meson")) { - aColour = EnumChatFormatting.WHITE; - } - else { - aColour = EnumChatFormatting.GRAY; - } - String aFirstLet = aGroup.substring(0, 1).toUpperCase(); - aGroup = aGroup.replaceFirst(aGroup.substring(0, 1), aFirstLet); - aState = aColour+aGroup+EnumChatFormatting.RESET; - list.add(EnumChatFormatting.GRAY + "Type: "+aState); - } - super.addInformation(stack, player, list, bool); - } - - @Override - public void registerIcons(IIconRegister reg) { - for (int i = 0; i < this.icons.length; i++) { - this.icons[i] = reg.registerIcon(CORE.MODID + ":" + "particle/new/"+i); - } - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[meta]; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java b/src/Java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java deleted file mode 100644 index 9a00b49342..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java +++ /dev/null @@ -1,318 +0,0 @@ -package gtPlusPlus.core.item.chemistry.general; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.item.chemistry.GenericChem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class ItemGenericChemBase extends Item { - - final protected IIcon base[]; - - final private int aMetaSize = 13; - - /* - * 0 - Red Metal Catalyst //FeCu - * 1 - Yellow Metal Catalyst //WNi - * 2 - Blue Metal Catalyst //CoTi - * 3 - Orange Metal Catalyst //Vanadium Pd - * 4 - Purple Metal Catalyst //IrIdium Ruthenium - * 5 - Brown Metal Catalyst //NiAl - * 6 - Pink Metal Catalyst //PtRh - * 7 - Alumina Grinding Ball - * 8 - Soapstone Grinding Ball - * 9 - Sodium Ethoxide // 2 Sodium + 1 Ethanol | 2 C2H5OH + 2 Na → 2 C2H5ONa + H2 - * 10 - Sodium Ethyl Xanthate //CH3CH2ONa + CS2 → CH3CH2OCS2Na - * 11 - Potassium Ethyl Xanthate //CH3CH2OH + CS2 + KOH → CH3CH2OCS2K + H2O - * 12 - Potassium Hydroxide // KOH - */ - - public ItemGenericChemBase() { - this.setHasSubtypes(true); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - base = new IIcon[aMetaSize]; - this.setUnlocalizedName("BasicGenericChemItem"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - } - - @Override - public int getItemStackLimit(ItemStack stack) { - if (ItemUtils.isMillingBall(stack)) { - return 16; - } - return super.getItemStackLimit(stack); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return super.getItemStackDisplayName(aStack); - } - - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - return EnumRarity.common; - } - - @Override - public boolean requiresMultipleRenderPasses() { - return false; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - for (int i=0;i aDamageSegment * 3){ - durability = EnumChatFormatting.GREEN; - } - else if (aDam > aDamageSegment * 2){ - durability = EnumChatFormatting.YELLOW; - } - else if (aDam > aDamageSegment){ - durability = EnumChatFormatting.GOLD; - } - else if (aDam >= 0){ - durability = EnumChatFormatting.RED; - } - list.add(durability+""+(aDam)+EnumChatFormatting.GRAY+" / "+aMaxDamage); - } - super.addInformation(aStack, player, list, bool); - } - - @Override - public boolean showDurabilityBar(ItemStack aStack) { - if (ItemUtils.isMillingBall(aStack)) { - int aDam = getMillingBallDamage(aStack); - if (aDam > 0) { - return true; - } - } - else if (ItemUtils.isCatalyst(aStack)) { - int aDam = getCatalystDamage(aStack); - if (aDam > 0) { - return true; - } - } - return false; - } - - public static boolean createMillingBallNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Damage", 0); - tagNBT.setLong("MaxDamage", getMaxBallDurability(rStack)); - tagMain.setTag("MillingBall", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static int getMillingBallDamage(ItemStack aStack) { - if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { - createMillingBallNBT(aStack); - } - NBTTagCompound aNBT = aStack.getTagCompound(); - return aNBT.getCompoundTag("MillingBall").getInteger("Damage"); - } - - public static int getMillingBallMaxDamage(ItemStack aStack) { - if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { - createMillingBallNBT(aStack); - } - NBTTagCompound aNBT = aStack.getTagCompound(); - return aNBT.getCompoundTag("MillingBall").getInteger("MaxDamage"); - } - - public static void setMillingBallDamage(ItemStack aStack,int aAmount) { - NBTTagCompound aNBT = aStack.getTagCompound(); - aNBT = aNBT.getCompoundTag("MillingBall"); - aNBT.setInteger("Damage", aAmount); - } - - public static int getMaxBallDurability(ItemStack aStack) { - if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallAlumina, true)) { - return 100; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallSoapstone, true)) { - return 50; - } - return 0; - } - - public static boolean createCatalystNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Damage", 0); - tagNBT.setLong("MaxDamage", getMaxCatalystDurability(rStack)); - tagMain.setTag("catalyst", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static int getCatalystDamage(ItemStack aStack) { - if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { - createCatalystNBT(aStack); - } - NBTTagCompound aNBT = aStack.getTagCompound(); - return aNBT.getCompoundTag("catalyst").getInteger("Damage"); - } - - public static int getCatalystMaxDamage(ItemStack aStack) { - if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { - createCatalystNBT(aStack); - } - NBTTagCompound aNBT = aStack.getTagCompound(); - return aNBT.getCompoundTag("catalyst").getInteger("MaxDamage"); - } - - public static void setCatalystDamage(ItemStack aStack,int aAmount) { - NBTTagCompound aNBT = aStack.getTagCompound(); - aNBT = aNBT.getCompoundTag("catalyst"); - aNBT.setInteger("Damage", aAmount); - } - - public static int getMaxCatalystDurability(ItemStack aStack) { - return 50; - } -} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java b/src/Java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java deleted file mode 100644 index cfd3fd6259..0000000000 --- a/src/Java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.item.chemistry.general; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -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.world.World; - -public class ItemNuclearChemBase extends Item { - - final protected IIcon base[]; - - final private int aMetaSize = 4; - - /* - * 0 - Uranium Residue - * 1 - Plutonium Residue - * 2 - Fluoride Reside - * 3 - Noble Gas Residue - */ - - public ItemNuclearChemBase() { - this.setHasSubtypes(true); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - base = new IIcon[aMetaSize]; - this.setUnlocalizedName("BasicNuclearChemItem"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - } - - @Override - public int getItemStackLimit(ItemStack stack) { - return super.getItemStackLimit(stack); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return super.getItemStackDisplayName(aStack); - } - - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - return EnumRarity.common; - } - - @Override - public boolean requiresMultipleRenderPasses() { - return false; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - for (int i=0;i ALL_VARIANTS = new ArrayList<>(); - protected IIcon base; - - public ItemAdvancedChip() { - this.setHasSubtypes(true); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - this.setUnlocalizedName("T3RecipeSelector"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - ALL_VARIANTS.add(new ItemStack(this, 0, 0)); - for (int i = 1; i <= 24; i++) { - ItemStack aStack = new ItemStack(this, 0, i); - ALL_VARIANTS.add(aStack); - } - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return super.getItemStackDisplayName(aStack); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - try { - aList.add("Configuration == "+aStack.getItemDamage()); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.0").toString(), "Right click to reconfigure")); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.1").toString(), "Needs a screwdriver or circuit programming tool")); - } - catch (Throwable t) { - t.printStackTrace(); - } - super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); - } - - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - return EnumRarity.common; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - aList.add(ItemUtils.simpleMetaStack(aItem, 0, 1)); - } - - @Override - public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { - return false; - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - return false; - } - - @Override - public int getDisplayDamage(ItemStack stack) { - return stack.getItemDamage(); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public int getItemEnchantability(ItemStack stack) { - return 0; - } - - @Override - public void registerIcons(final IIconRegister u) { - this.base = u.registerIcon(CORE.MODID + ":" + "science/general/AdvancedCircuit"); - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - return this.base; - } - - @Override - public IIcon getIconFromDamage(int damage) { - return this.base; - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - return this.base; - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return this.base; - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return super.getUnlocalizedName(); - } - - @Override - public boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag) { - int meta = tag.hasKey("meta", Constants.NBT.TAG_BYTE) ? tag.getByte("meta") : -1; - if (meta < 0 || meta > 24) - return true; - - if (!player.capabilities.isCreativeMode) { - Pair> toolIndex = findConfiguratorInInv(player); - if (toolIndex == null) return true; - - ItemStack[] mainInventory = player.inventory.mainInventory; - mainInventory[toolIndex.getKey()] = toolIndex.getValue().apply(mainInventory[toolIndex.getKey()], player); - } - stack.setItemDamage(meta); - - return true; - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - // nothing on server side or fake player - if (player instanceof FakePlayer || !world.isRemote) return false; - // check if any screwdriver - ItemStack configuratorStack; - if (player.capabilities.isCreativeMode) { - configuratorStack = null; - } else { - Pair configurator = findConfiguratorInInv(player); - if (configurator == null) { - int count; - try { - count = Integer.parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); - } catch (NumberFormatException e) { - player.addChatComponentMessage(new ChatComponentText("Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + e.getMessage())); - count = 1; - } - player.addChatComponentMessage(new ChatComponentTranslation("GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); - return false; - } - configuratorStack = player.inventory.mainInventory[configurator.getKey()]; - } - openSelectorGui(configuratorStack, stack.getItemDamage()); - return true; - } - - private void openSelectorGui(ItemStack configurator, int meta) { - FMLCommonHandler.instance().showGuiScreen(new GT_GUIDialogSelectItem( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), - configurator, - null, - ItemAdvancedChip::onConfigured, - ALL_VARIANTS, - meta, - true - )); - } - - private static void onConfigured(ItemStack stack) { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("meta", (byte) stack.getItemDamage()); - GT_Values.NW.sendToServer(new GT_Packet_UpdateItem(tag)); - } - - private static Pair> findConfiguratorInInv(EntityPlayer player) { - ItemStack[] mainInventory = player.inventory.mainInventory; - for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { - ItemStack toolStack = mainInventory[j]; - - if (!GT_Utility.isStackValid(toolStack)) - continue; - - for (Map.Entry, BiFunction> p : GregTech_API.sCircuitProgrammerList.entrySet()) - if (p.getKey().test(toolStack)) - return Pair.of(j, p.getValue()); - } - return null; - } -} diff --git a/src/Java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/Java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java deleted file mode 100644 index d8ddb26675..0000000000 --- a/src/Java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ /dev/null @@ -1,114 +0,0 @@ -package gtPlusPlus.core.item.crafting; - -import java.util.LinkedHashMap; -import java.util.Map; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.general.ItemGenericToken; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -public class ItemDummyResearch extends ItemGenericToken { - - public static enum ASSEMBLY_LINE_RESEARCH { - - - RESEARCH_1_CONTAINMENT("Containment Fields", "Advanced scientific study"), - RESEARCH_2_BASIC_CHEM("Basic Chemistry", "Time to start at the beginning"), - RESEARCH_3_ADV_CHEM("Advanced Chemistry", "Best learn more than chemical equations"), - RESEARCH_4_BASIC_PHYSICS("Basic Physics", "Fundamental laws of motion"), - RESEARCH_5_ADV_PHYSICS("Advanced Physics", "Advanced knowledge!"), - RESEARCH_6_BASIC_METALLURGY("Basic Metallurgy", "Information about material smelting"), - RESEARCH_7_ADV_METALLURGY("Advanced Metallurgy", "Advanced Material Sciences!"), - RESEARCH_8_TURBINE_AUTOMATION("Turbine Automation", "You really don't want to share this with anyone!"), - RESEARCH_9_CLOAKING("Cloaking Technologies", "Sneaking around like a mouse"), - RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"); - - - - - - - - - - - - - - - - - - - private String mName; - private String mDesc; - - private ASSEMBLY_LINE_RESEARCH(String aName, String aDesc) { - mName = aName; - mDesc = aDesc; - ModItems.itemDummyResearch.register(mName, mDesc); - } - - } - - - - - - - - - - - private static Map mInternalNameToIdMap = new LinkedHashMap(); - - public static ItemStack getResearchStack(ASSEMBLY_LINE_RESEARCH aResearchName, int aStacksize) { - Integer aMeta = mInternalNameToIdMap.get(Utils.sanitizeString(aResearchName.mName)); - if (aMeta == null) { - aMeta = 0; - } - return ItemUtils.simpleMetaStack(ModItems.itemDummyResearch, aMeta, aStacksize); - } - - private int aID = 0; - public ItemDummyResearch() { - super("dummyResearch", "Research", new String[] {"This object requires some further study"}, "research"); - - - - } - - /** - * - * @param aResearchType - What is the research for? - * @param aDescriptThe - tooltip for this research - * @return - Did we register a custom research item? - */ - public boolean register(String aResearchType, String aDescript) { - int aNewID = aID++; - mInternalNameToIdMap.put(Utils.sanitizeString(aResearchType), aNewID); - return register(aNewID, "Research on "+aResearchType, 1, aDescript); - } - - @Override - public boolean register(int id, String aLocalName, int aMaxStack, String aDescript) { - return register(id, aLocalName, 1, new String[] {aDescript, EnumChatFormatting.DARK_GRAY+"Used to further your knowledge"}, EnumRarity.common, EnumChatFormatting.LIGHT_PURPLE); - } - - @Override - @SideOnly(Side.CLIENT) - public final void registerIcons(final IIconRegister aIconRegister) { - for (int i = 0, j = mLocalNames.size(); i < j; i++) { - mIcons.put(i, aIconRegister.registerIcon(CORE.MODID + ":" + "research" + "/" + "note")); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/effects/RarityEffect.java b/src/Java/gtPlusPlus/core/item/effects/RarityEffect.java deleted file mode 100644 index 7cfd64a2e7..0000000000 --- a/src/Java/gtPlusPlus/core/item/effects/RarityEffect.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.item.effects; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/* - * -This determines the name colour. EnumRarity can be: -EnumRarity.common - the standard white colour. -EnumRarity.uncommon - a yellow colour. -EnumRarity.rare - a light blue colour. This is used for enchanted items. -EnumRarity.epic - the purple colour used on the Golden Apple. -@SideOnly is an FML annotation. It marks the method below it for existing only on one side. Possible values are: -Side.CLIENT is probably the most common one. This marks the method as existing only on the client side. -Side.SERVER marks the method as existing only on the server side. - * - */ - -public class RarityEffect extends Item { - - public RarityEffect(final int par1){ - super(); - this.setCreativeTab(CreativeTabs.tabMaterials); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.common; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/effects/RarityEpic.java b/src/Java/gtPlusPlus/core/item/effects/RarityEpic.java deleted file mode 100644 index 74ee5ab12c..0000000000 --- a/src/Java/gtPlusPlus/core/item/effects/RarityEpic.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.item.effects; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class RarityEpic extends Item { - - public RarityEpic(final int par1){ - super(); - this.setCreativeTab(CreativeTabs.tabMaterials); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.epic; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/effects/RarityRare.java b/src/Java/gtPlusPlus/core/item/effects/RarityRare.java deleted file mode 100644 index 60d5a681b9..0000000000 --- a/src/Java/gtPlusPlus/core/item/effects/RarityRare.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.item.effects; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class RarityRare extends Item { - - public RarityRare(){ - super(); - this.setCreativeTab(CreativeTabs.tabMaterials); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.rare; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/effects/RarityUncommon.java b/src/Java/gtPlusPlus/core/item/effects/RarityUncommon.java deleted file mode 100644 index 1ce8eec5d8..0000000000 --- a/src/Java/gtPlusPlus/core/item/effects/RarityUncommon.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.core.item.effects; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class RarityUncommon extends Item { - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.uncommon; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/food/BaseItemMetaFood.java b/src/Java/gtPlusPlus/core/item/food/BaseItemMetaFood.java deleted file mode 100644 index 94d5a8e80f..0000000000 --- a/src/Java/gtPlusPlus/core/item/food/BaseItemMetaFood.java +++ /dev/null @@ -1,431 +0,0 @@ -package gtPlusPlus.core.item.food; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class BaseItemMetaFood extends ItemFood { - - private static final HashMap mIconMap = new HashMap(); - private static int mTotalMetaItems = 0; - - /* - * 0 - Raw Human Meat - * 1 - Cooked Human Meat - * 2 - Raw Horse Meat - * 3 - Cooked Horse Meat - * 4 - Raw Wolf Meat - * 5 - Cooked Wolf Meat - * 6 - Raw Ocelot Meat - * 7 - Cooked Ocelot Meat - * 8 - Blaze Flesh - */ - - //listAllmeatraw - //listAllmeatcooked - - public static void registerMetaFoods() { - registerNewMetaFood(0, "I wouldn't eat this unless I was starving", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessModerate(80), new EffectSlownessModerate(80)), getOreDictNamesAsArrayList("listAllmeatraw")); - registerNewMetaFood(1, "Doesn't look any better cooked", 4, 1, 64, getPotionEffectPackage(new EffectWeaknessBasic(50), new EffectSlownessBasic(50)), getOreDictNamesAsArrayList("listAllmeatcooked")); - registerNewMetaFood(2, "", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessBasic(30), new EffectSlownessBasic(30)), getOreDictNamesAsArrayList("listAllmeatraw")); - registerNewMetaFood(3, "", 4, 1, 64, getOreDictNamesAsArrayList("listAllmeatcooked")); - registerNewMetaFood(4, "", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessBasic(25), new EffectSlownessBasic(30)), getOreDictNamesAsArrayList("listAllmeatraw")); - registerNewMetaFood(5, "", 4, 1, 64, getOreDictNamesAsArrayList("listAllmeatcooked")); - registerNewMetaFood(6, "", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessBasic(30), new EffectSlownessBasic(25)), getOreDictNamesAsArrayList("listAllmeatraw")); - registerNewMetaFood(7, "", 4, 1, 64, getOreDictNamesAsArrayList("listAllmeatcooked")); - registerNewMetaFood(8, "Warm to the touch", EnumRarity.uncommon, 4, 1, 64, new AutoMap(), new setOnFire(), getOreDictNamesAsArrayList("listAllmeatcooked")); - } - - private static final HashMap mMaxStackSizeMap = new HashMap(); - private static final HashMap mTooltipMap = new HashMap(); - private static final HashMap mRarityMap = new HashMap(); - private static final HashMap mHealAmountMap = new HashMap(); - private static final HashMap mSaturationAmountMap = new HashMap(); - private static final HashMap> mPotionEffectsMap = new HashMap>(); - private static final HashMap mHasSpecialBehaviourMap = new HashMap(); - private static final HashMap mSpecialBehaviourMap = new HashMap(); - private static final HashMap> mOreDictNames = new HashMap>(); - - - public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize) { - registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, new AutoMap(), null, new ArrayList()); - } - - public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final ArrayList aOreDictNames) { - registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, new AutoMap(), null, aOreDictNames); - } - - - public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects) { - registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, new AutoMap(), null, new ArrayList()); - } - - public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects, final ArrayList aOreDictNames) { - registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, aPotionEffects, null, aOreDictNames); - } - - public static void registerNewMetaFood(final int aMetaID, String aTooltip, EnumRarity aRarity, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects, final SpecialFoodBehaviour aSpecialBehaviour) { - registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, aPotionEffects, null, new ArrayList()); - } - - public static void registerNewMetaFood(final int aMetaID, String aTooltip, EnumRarity aRarity, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects, final SpecialFoodBehaviour aSpecialBehaviour, final ArrayList aOreDictNames) { - mTotalMetaItems++; - mMaxStackSizeMap.put(aMetaID, aMaxStacksize); - mTooltipMap.put(aMetaID, aTooltip); - mRarityMap.put(aMetaID, aRarity); - mHealAmountMap.put(aMetaID, aHealAmount); - mSaturationAmountMap.put(aMetaID, aSaturationModifier); - mPotionEffectsMap.put(aMetaID, aPotionEffects); - mHasSpecialBehaviourMap.put(aMetaID, (aSpecialBehaviour != null)); - if (aSpecialBehaviour != null) { - mSpecialBehaviourMap.put(aMetaID, aSpecialBehaviour); - } - mOreDictNames.put(aMetaID, aOreDictNames); - } - - public static void registerFoodsToOreDict() { - for (int aMetaID=0; aMetaID < mTotalMetaItems; aMetaID++) { - ArrayList aOreDictNames = mOreDictNames.get(aMetaID); - if (aOreDictNames != null && !aOreDictNames.isEmpty()) { - ItemStack aFoodStack = ItemUtils.simpleMetaStack(ModItems.itemMetaFood, aMetaID, 1); - for (String aOreName : aOreDictNames) { - ItemUtils.addItemToOreDictionary(aFoodStack, aOreName); - } - } - } - } - - - public BaseItemMetaFood() { - super(0, 0, false); - this.setHasSubtypes(true); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - this.setUnlocalizedName("BasicMetaFood"); - this.setCreativeTab(AddToCreativeTab.tabMisc); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - BaseItemMetaFood.registerMetaFoods(); - } - - private static final int getMetaKey(ItemStack aStack) { - return aStack.getItemDamage(); - } - - // Heal Amount - public int func_150905_g(ItemStack aStack) { - return mHealAmountMap.get(getMetaKey(aStack)); - } - - // Saturation Amount - public float func_150906_h(ItemStack aStack) { - return mSaturationAmountMap.get(getMetaKey(aStack)); - } - - // Whether wolves like this food, sadly doesn't support meta items - public boolean isWolfsFavoriteMeat() { - return false; - } - - @Override - protected void onFoodEaten(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - //super.onFoodEaten(stack, world, player); - AutoMap aPotionEffects = mPotionEffectsMap.get(getMetaKey(aStack)); - if (!aWorld.isRemote && aPotionEffects != null && aPotionEffects.size() > 0) { - for (PotionEffectPackage aFoodEffect : aPotionEffects) { - if (MathUtils.randInt(0, 100) <= aFoodEffect.getChance() || aFoodEffect.getChance() == 100) { - PotionEffect aEffect = aFoodEffect.getEffect(); - if (aEffect != null && aEffect.getPotionID() > 0) { - aPlayer.addPotionEffect(new PotionEffect(aEffect.getPotionID(), aEffect.getDuration() * 20, aEffect.getAmplifier(), aEffect.getIsAmbient())); - } - } - } - } - - boolean aHasEpcialBehaviour = mHasSpecialBehaviourMap.get(getMetaKey(aStack)); - if (!aWorld.isRemote && aHasEpcialBehaviour) { - SpecialFoodBehaviour aBehaviour = mSpecialBehaviourMap.get(getMetaKey(aStack)); - if (aBehaviour != null) { - aBehaviour.doBehaviour(aPlayer); - } - } - } - - @Override - public ItemStack onEaten(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - return super.onEaten(aStack, aWorld, aPlayer); - } - - - @Override - public int getItemStackLimit(ItemStack aStack) { - return mMaxStackSizeMap.get(getMetaKey(aStack)); - } - - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return super.getItemStackDisplayName(aStack); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - try { - String aTooltip = mTooltipMap.get(getMetaKey(aStack)); - if (aTooltip != null && aTooltip.length() > 0) { - aList.add(aTooltip); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); - } - - @Override - public EnumRarity getRarity(ItemStack aStack) { - return mRarityMap.get(getMetaKey(aStack)); - } - - @Override - public boolean requiresMultipleRenderPasses() { - return false; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - for (int i=0;i getPotionEffectPackage(PotionEffectPackage... aEffects){ - AutoMap aPackage = new AutoMap(); - if (aEffects != null && aEffects.length > 0) { - for (PotionEffectPackage aEffect : aEffects) { - aPackage.put(aEffect); - } - } - return aPackage; - } - - private static ArrayList getOreDictNamesAsArrayList(String... aOreDictNames){ - ArrayList aPackage = new ArrayList(); - if (aOreDictNames != null && aOreDictNames.length > 0) { - for (String aEffect : aOreDictNames) { - aPackage.add(aEffect); - } - } - return aPackage; - } - - private static class EffectWeaknessBasic extends PotionEffectPackage { - - protected EffectWeaknessBasic(int aChance) { - super(new PotionEffect(Potion.weakness.getId(), 1, 20), aChance); - } - - } - - private static class EffectWeaknessModerate extends PotionEffectPackage { - - protected EffectWeaknessModerate(int aChance) { - super(new PotionEffect(Potion.weakness.getId(), 2, 40), aChance); - } - - } - - private static class EffectWeaknessSevere extends PotionEffectPackage { - - protected EffectWeaknessSevere(int aChance) { - super(new PotionEffect(Potion.weakness.getId(), 3, 60), aChance); - } - - } - - private static class EffectSlownessBasic extends PotionEffectPackage { - - protected EffectSlownessBasic(int aChance) { - super(new PotionEffect(Potion.moveSlowdown.getId(), 1, 20), aChance); - } - - } - - private static class EffectSlownessModerate extends PotionEffectPackage { - - protected EffectSlownessModerate(int aChance) { - super(new PotionEffect(Potion.moveSlowdown.getId(), 2, 40), aChance); - } - - } - - private static class EffectSlownessSevere extends PotionEffectPackage { - - protected EffectSlownessSevere(int aChance) { - super(new PotionEffect(Potion.moveSlowdown.getId(), 3, 60), aChance); - } - - } - - - - - private static abstract class SpecialFoodBehaviour { - - protected final int mChance; - - public SpecialFoodBehaviour(int aChance) { - mChance = aChance; - } - - public final void doBehaviour(EntityPlayer aPlayer) { - if (aPlayer != null && !aPlayer.worldObj.isRemote) { - if (MathUtils.randInt(0, 100) < mChance || mChance == 100) { - behaviour(aPlayer); - } - } - } - - protected abstract void behaviour(EntityPlayer aPlayer); - - } - - - private static class setOnFire extends SpecialFoodBehaviour { - - public setOnFire() { - super(100); - } - - @Override - public void behaviour(EntityPlayer aPlayer) { - EntityUtils.setEntityOnFire(aPlayer, 5); - } - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/BaseItemGrindle.java b/src/Java/gtPlusPlus/core/item/general/BaseItemGrindle.java deleted file mode 100644 index 0ff922d853..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/BaseItemGrindle.java +++ /dev/null @@ -1,84 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.GuiHandler; -import gtPlusPlus.core.lib.CORE; - -public class BaseItemGrindle extends Item { - - protected final String unlocalName; - - public BaseItemGrindle() { - this.unlocalName = "itemGrindleTablet"; - this.setUnlocalizedName("itemGrindleTablet"); - this.setTextureName(CORE.MODID + ":" + "itemTablet"); - GameRegistry.registerItem(this, "itemGrindleTablet"); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabOther); - } - - @Override - public int getMaxItemUseDuration(final ItemStack stack) { - return 1; - } - - @Override - public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) { - if (!world.isRemote) { - if (!player.isSneaking()) { - player.openGui(GTplusplus.instance, GuiHandler.GUI9, world, 0, 0, 0); - } - } - return itemstack; - } - - @Override - public String getItemStackDisplayName(final ItemStack aStack) { - String aName = super.getItemStackDisplayName(aStack); - if (aName.toLowerCase().contains(".name") || aName.toLowerCase().contains("git")) { - aName = "Grindle"; - } - return aName; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(final IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(CORE.MODID + ":" + "itemTablet"); - } - - @Override - public String getPotionEffect(ItemStack p_150896_1_) { - return super.getPotionEffect(p_150896_1_); - } - - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_); - aList.add("Used to read data from DataSticks & DataOrbs."); - } - - @Override - public EnumRarity getRarity(ItemStack i) { - return EnumRarity.uncommon; - } - - @Override - public boolean isRepairable() { - return false; - } -} diff --git a/src/Java/gtPlusPlus/core/item/general/BedLocator_Base.java b/src/Java/gtPlusPlus/core/item/general/BedLocator_Base.java deleted file mode 100644 index 5aa2e4ae9e..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/BedLocator_Base.java +++ /dev/null @@ -1,107 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class BedLocator_Base extends Item{ - - public int bed_X = 0; - public int bed_Y = 0; - public int bed_Z = 0; - - public BedLocator_Base(final String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabMachines); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - - int NBT_X = this.bed_X; - int NBT_Y = this.bed_Y; - int NBT_Z = this.bed_Z; - - - if (stack.stackTagCompound != null) { - NBT_X = stack.stackTagCompound.getInteger("pos_x"); - NBT_Y = stack.stackTagCompound.getInteger("pos_y"); - NBT_Z = stack.stackTagCompound.getInteger("pos_z"); - - final String tempX = String.valueOf(NBT_X); - final String tempY = String.valueOf(NBT_Y); - final String tempZ = String.valueOf(NBT_Z); - final String formattedX = EnumChatFormatting.DARK_RED+tempX+EnumChatFormatting.GRAY; - final String formattedY = EnumChatFormatting.RED+tempY+EnumChatFormatting.GRAY; - final String formattedZ = EnumChatFormatting.RED+tempZ+EnumChatFormatting.GRAY; - - list.add(EnumChatFormatting.GRAY+"X: "+formattedX+"."); - list.add(EnumChatFormatting.GRAY+"Y: "+formattedY+"."); - list.add(EnumChatFormatting.GRAY+"Z: "+formattedZ+"."); - super.addInformation(stack, aPlayer, list, bool); - } - } - - //Ticking and NBT Handling - /* Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and - * update it's contents. - * - * public int fuelRemaining = 0; - public int maximumFuel = 0; - public String fuelType = ""; - public float heat = 0; - public float maxHeat = 5000; - * - */ - @Override - public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) { - itemStack.stackTagCompound = new NBTTagCompound(); - this.bed_X = 0; - this.bed_Y = 0; - this.bed_Z = 0; - itemStack.stackTagCompound.setInteger("pos_x", this.bed_X); - itemStack.stackTagCompound.setInteger("pos_y", this.bed_Y); - itemStack.stackTagCompound.setInteger("pos_z", this.bed_Z); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4, final boolean par5) { - - - } - - @Override - public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer par3Entity) { - itemStack.stackTagCompound = new NBTTagCompound(); - if (par3Entity.getBedLocation() != null){ - this.bed_X = par3Entity.getBedLocation().posX; - this.bed_Y = par3Entity.getBedLocation().posY; - this.bed_Z = par3Entity.getBedLocation().posZ; - } - else { - this.bed_X = 0; - this.bed_Y = 0; - this.bed_Z = 0; - } - itemStack.stackTagCompound.setInteger("pos_x", this.bed_X); - itemStack.stackTagCompound.setInteger("pos_y", this.bed_Y); - itemStack.stackTagCompound.setInteger("pos_z", this.bed_Z); - return super.onItemRightClick(itemStack, world, par3Entity); - } - - - -} diff --git a/src/Java/gtPlusPlus/core/item/general/BufferCore.java b/src/Java/gtPlusPlus/core/item/general/BufferCore.java deleted file mode 100644 index 9b00d3d034..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/BufferCore.java +++ /dev/null @@ -1,72 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.item.base.BaseItemWithDamageValue; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; - -public class BufferCore extends BaseItemWithDamageValue{ - - public int coreTier = 0; - - public BufferCore(final String unlocalizedName, final int i) { - super(unlocalizedName+i); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(32); - this.coreTier = i; - } - - @Override - public String getItemStackDisplayName(final ItemStack stack) { - return super.getItemStackDisplayName(stack)/*+" ["+GT_Values.VN[this.coreTier-1]+"]."*/; - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() - { - return true; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GRAY+"A key crafting component for "+GT_Values.VN[this.coreTier-1]+" Applicances"); - } - - public final int getCoreTier() { - return this.coreTier; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - - int[] mTierTypes = new int[] { - Utils.rgbtoHexValue(200, 180, 180), - Utils.rgbtoHexValue(142, 153, 161), - Utils.rgbtoHexValue(230, 121, 75), - Utils.rgbtoHexValue(215, 156, 70), - Utils.rgbtoHexValue(97, 97, 96), //EV - Utils.rgbtoHexValue(202, 202, 201), - Utils.rgbtoHexValue(247, 159, 157), - Utils.rgbtoHexValue(181, 223, 223), - Utils.rgbtoHexValue(187, 219, 185), - }; - - if (this.coreTier == 10){ - return Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250)); - } - - return mTierTypes[this.coreTier-1]; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java b/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java deleted file mode 100644 index a354e63fe3..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java +++ /dev/null @@ -1,141 +0,0 @@ -package gtPlusPlus.core.item.general; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class ItemAirFilter extends Item { - - public IIcon[] icons = new IIcon[1]; - - public ItemAirFilter() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemAirFilter"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setMaxStackSize(1); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "itemAirFilter"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[0]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 2; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - - if (tItem == null) { - return "Air Filter"; - } - - String itemName = tItem == null ? "Air Filter" : super.getItemStackDisplayName(tItem); - String suffixName = ""; - if (tItem.getItemDamage() == 0){ - suffixName = " [Tier 1]"; - } - else if (tItem.getItemDamage() == 1){ - suffixName = " [Tier 2]"; - } - return (itemName+suffixName); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - int meta = stack.getItemDamage(); - if (meta == 1){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); - } - return HEX_OxFFFFFF; - } - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Damage", 0); - tagMain.setTag("AirFilter", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getFilterDamage(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("AirFilter"); - if (aNBT != null) { - return aNBT.getLong("Damage"); - } - } - else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("AirFilter"); - if (aNBT != null) { - aNBT.setLong("Damage", aDamage); - return true; - } - } - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null){ - createNBT(stack); - } - double currentDamage = getFilterDamage(stack); - double meta = stack.getItemDamage() == 0 ? 50 : 2500; - double durabilitypercent = currentDamage / meta; - return durabilitypercent; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - list.add(EnumChatFormatting.GRAY+"An Air filter for Atmospheric Reconditioning."); - int maxDamage = (stack.getItemDamage() == 0 ? 50 : 2500); - list.add(EnumChatFormatting.GRAY+""+(maxDamage-getFilterDamage(stack))+"/"+maxDamage+" uses left."); - super.addInformation(stack, player, list, bool); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java deleted file mode 100644 index 5be184b3db..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java +++ /dev/null @@ -1,202 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.common.blocks.GT_Block_Ores; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.block.base.BlockBaseOre; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; - -public class ItemAreaClear extends CoreItem { - - public IIcon[] mIcon = new IIcon[1]; - - public ItemAreaClear() { - super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A M C Y N A M E"}, EnumRarity.rare, - EnumChatFormatting.BOLD, false, null); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.mIcon[0] = reg.registerIcon(CORE.MODID + ":" + "itemLavaFilter"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.mIcon[0]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 2; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String itemName = "Debug Square"; - String suffixName = ""; - if (tItem.getItemDamage() == 0){ - suffixName = " [1]"; - } - else if (tItem.getItemDamage() == 1){ - suffixName = " [2]"; - } - return (itemName+suffixName); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - String mMode = (stack.getItemDamage() == 0 ? "Clear" : "Fill"); - list.add(EnumChatFormatting.GRAY+""+("Mode: "+mMode)); - super.addInformation(stack, player, list, bool); - } - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Mode", 0); - tagMain.setTag("GTPP_DEBUG", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getFilterDamage(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GTPP_DEBUG"); - if (aNBT != null) { - return aNBT.getLong("Mode"); - } - } - else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GTPP_DEBUG"); - if (aNBT != null) { - aNBT.setLong("Mode", aDamage); - return true; - } - } - return false; - } - - public boolean removeBlocks(World world, BlockPos pos){ - int x1 = pos.xPos; - int y1 = pos.yPos; - int z1 = pos.zPos; - - int x2 = (x1-24); - int y2 = (y1-10); - int z2 = (z1-24); - - removeBlockColumn(world, new BlockPos(x2, y2, z2, world)); - return true; - } - - public boolean removeBlockColumn(World world, BlockPos pos){ - for (int i=0; i<50; i++){ - removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos-10, pos.zPos+i, world)); - removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos+i, world)); - removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos+10, pos.zPos+i, world)); - } - return true; - } - - public boolean removeBlockRow(World world, BlockPos pos){ - for (int j=0; j<20; j++){ - for (int i=0; i<50; i++){ - - if (!(world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) instanceof BlockBaseOre) && - !(world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) instanceof IGregTechTileEntity) && - !(world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) instanceof GT_Block_Ores)){ - if (!world.isAirBlock(pos.xPos+i, pos.yPos+j, pos.zPos) && - world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ - int chance = MathUtils.randInt(0, 500); - if (chance <= 0){ - if (pos.yPos+j <= 50){ - world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.glowstone); - } - } - else { - if ((world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) == Blocks.glowstone && ((pos.yPos+j) > 50)) || world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.glowstone){ - world.setBlockToAir(pos.xPos+i, pos.yPos+j, pos.zPos); - } - } - } - } - } - } - return true; - } - - public boolean fillBlocks(World world, BlockPos pos){ - int x1 = pos.xPos; - int y1 = pos.yPos; - int z1 = pos.zPos; - - int x2 = (x1-10); - int y2 = (y1-1); - int z2 = (z1-10); - - fillBlockColumn(world, new BlockPos(x2, y2, z2, world)); - return true; - } - - public boolean fillBlockColumn(World world, BlockPos pos){ - for (int i=0; i<21; i++){ - fillBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos+i, world)); - } - return true; - } - - public boolean fillBlockRow(World world, BlockPos pos){ - for (int j=0; j<2; j++){ - for (int i=0; i<21; i++){ - if (world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ - world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.grass); - } - } - } - return true; - } - - @Override - public ItemStack onItemRightClick(ItemStack thisItem, World world, EntityPlayer parEntity) { - BlockPos groundBlock = EntityUtils.findBlockPosUnderEntity(parEntity); - if (thisItem.getItemDamage() == 0){ - removeBlocks(world, groundBlock); - } - else { - Logger.INFO("Filling."); - fillBlocks(world, groundBlock); - } - return super.onItemRightClick(thisItem, world, parEntity); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java b/src/Java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java deleted file mode 100644 index ca6c5e8c8c..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java +++ /dev/null @@ -1,85 +0,0 @@ -package gtPlusPlus.core.item.general; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.core.block.general.FirePit; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class ItemBasicFirestarter extends CoreItem { - - public ItemBasicFirestarter() { - super("itemSimpleFiremaker", AddToCreativeTab.tabTools, 1, 5, "Can probably make you a fire"); - this.setTextureName(CORE.MODID+":"+"itemFireStarter"); - } - - @Override - public boolean onItemUse( - final ItemStack thisItem, final EntityPlayer thisPlayer, final World thisWorld, - int blockX, int blockY, int blockZ, - final int p_77648_7_, final float p_77648_8_, final float p_77648_9_, final float p_77648_10_) { - if (p_77648_7_ == 0) { - --blockY; - } - if (p_77648_7_ == 1) { - ++blockY; - } - if (p_77648_7_ == 2) { - --blockZ; - } - if (p_77648_7_ == 3) { - ++blockZ; - } - if (p_77648_7_ == 4) { - --blockX; - } - if (p_77648_7_ == 5) { - ++blockX; - } - if (!thisPlayer.canPlayerEdit(blockX, blockY, blockZ, p_77648_7_, thisItem)) { - return false; - } - if (thisWorld.getBlock(blockX, blockY, blockZ) instanceof FirePit){ - thisWorld.setBlockMetadataWithNotify(blockX, blockY, blockZ, 2, 4); - PlayerUtils.messagePlayer(thisPlayer, "You light the fire pit. "); - } - if (thisWorld.isAirBlock(blockX, blockY, blockZ)) - { - final int random = MathUtils.randInt(0, 3); - //Explode, lol. - if (random == 0){ - PlayerUtils.messagePlayer(thisPlayer, "You somehow managed to set yourself on fire... "); - thisWorld.playSoundEffect(thisPlayer.posX + 0.5D, thisPlayer.posY + 0.5D, thisPlayer.posZ + 0.5D, "fire.ignite", 1.0F, (itemRand.nextFloat() * 0.4F) + 0.8F); - thisPlayer.setFire(4); - thisItem.damageItem(thisItem.getMaxDamage(), thisPlayer); - } - - //Create a fire - else if (random == 2){ - PlayerUtils.messagePlayer(thisPlayer, "You created a fire!"); - thisWorld.playSoundEffect(blockX + 0.5D, blockY + 0.5D, blockZ + 0.5D, "fire.ignite", 1.0F, (itemRand.nextFloat() * 0.4F) + 0.8F); - thisWorld.setBlock(blockX, blockY, blockZ, Blocks.fire); - } - - //Do nothing - else { - PlayerUtils.messagePlayer(thisPlayer, "Your attemp does nothing."); - thisItem.damageItem(1, thisPlayer); - return false; - } - } - thisItem.damageItem(1, thisPlayer); - return true; - } - - @Override - public String getItemStackDisplayName(final ItemStack thisItem) { - return "Basic Firemaker"; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java b/src/Java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java deleted file mode 100644 index bd8159eb01..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java +++ /dev/null @@ -1,147 +0,0 @@ -package gtPlusPlus.core.item.general; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class ItemBasicScrubberTurbine extends Item { - - public IIcon[] icons = new IIcon[1]; - - public ItemBasicScrubberTurbine() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemBasicTurbine"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setMaxStackSize(1); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "itemBasicTurbine"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[0]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 2; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - if (tItem == null) { - return "Basic Turbine"; - } - return super.getItemStackDisplayName(tItem); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - int meta = stack.getItemDamage(); - if (meta == 0){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200,200,200); - } - if (meta == 1){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(255,128,0); - } - return HEX_OxFFFFFF; - } - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Damage", 0); - tagMain.setTag("BasicTurbine", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getFilterDamage(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("BasicTurbine"); - if (aNBT != null) { - return aNBT.getLong("Damage"); - } - } - else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("BasicTurbine"); - if (aNBT != null) { - aNBT.setLong("Damage", aDamage); - return true; - } - } - return false; - } - - public int getMaxDurability(ItemStack aStack) { - if (aStack != null) { - int aMeta = aStack.getItemDamage(); - if (aMeta == 0) { - return 2500; - } - if (aMeta == 1) { - return 5000; - } - } - return 0; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null){ - createNBT(stack); - } - double currentDamage = getFilterDamage(stack); - double meta = getMaxDurability(stack); - double durabilitypercent = currentDamage / meta; - return durabilitypercent; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - list.add(EnumChatFormatting.GRAY+"An early tier Turbine for Atmospheric Reconditioning."); - int maxDamage = getMaxDurability(stack); - list.add(EnumChatFormatting.GRAY+""+(maxDamage-getFilterDamage(stack))+"/"+maxDamage+" uses left."); - super.addInformation(stack, player, list, bool); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java deleted file mode 100644 index eded4e2585..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java +++ /dev/null @@ -1,295 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class ItemBlueprint extends Item implements IItemBlueprint{ - - public ItemBlueprint(final String unlocalizedName) { - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabMachines); - //this.bpID = MathUtils.randInt(0, 1000); - GameRegistry.registerItem(this, unlocalizedName); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack itemStack, final EntityPlayer aPlayer, final List list, final boolean bool) { - //Create some NBT if it's not there, otherwise this does nothing. - if (!itemStack.hasTagCompound()){ - this.createNBT(itemStack); - } - //Set up some default variables. - int id = -1; - String name = ""; - boolean blueprint = false; - //Get proper display vars from NBT if it's there - if (itemStack.hasTagCompound()){ - //Utils.LOG_WARNING("Found TagCompound"); - id = (int) this.getNBT(itemStack, "mID"); - name = (String) this.getNBT(itemStack, "mName"); - blueprint = (boolean) this.getNBT(itemStack, "mBlueprint"); - } - //Write to tooltip list for each viable setting. - if (itemStack.hasTagCompound()) { - if (id != -1){ - list.add(EnumChatFormatting.GRAY+"Technical Document No. "+id); - } - if(blueprint){ - list.add(EnumChatFormatting.BLUE+"Currently holding a blueprint for "+name); - } - else { - list.add(EnumChatFormatting.RED+"Currently not holding a blueprint for anything."); - } - } - else { - list.add(EnumChatFormatting.RED+"Currently not holding a blueprint for anything."); - } - super.addInformation(itemStack, aPlayer, list, bool); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return "Blueprint [I am useless]"; - } - - @Override - public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) { - this.createNBT(itemStack); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4, final boolean par5) { - - } - - @Override - public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer par3Entity) { - //Let the player know what blueprint is held - if (itemStack.hasTagCompound()) { - PlayerUtils.messagePlayer(par3Entity, "This Blueprint holds NBT data. "+"|"+this.getNBT(itemStack, "mID")+"|"+this.getNBT(itemStack, "mBlueprint")+"|"+this.getNBT(itemStack, "mName")+"|"+ItemUtils.getArrayStackNames(this.readItemsFromNBT(itemStack))); - } - else { - this.createNBT(itemStack); - PlayerUtils.messagePlayer(par3Entity, "This is a placeholder. "+this.getNBT(itemStack, "mID")); - } - - - return super.onItemRightClick(itemStack, world, par3Entity); - } - - public ItemStack[] readItemsFromNBT(final ItemStack itemStack){ - ItemStack[] blueprint = new ItemStack[9]; - if (itemStack.hasTagCompound()){ - final NBTTagCompound nbt = itemStack.getTagCompound(); - final NBTTagList list = nbt.getTagList("Items", 10); - blueprint = new ItemStack[INV_SIZE]; - for(int i = 0;i= 0) && (slot < INV_SIZE)) - { - blueprint[slot] = ItemStack.loadItemStackFromNBT(data); - } - } - return blueprint; - } - return null; - } - - public ItemStack writeItemsToNBT(final ItemStack itemStack, final ItemStack[] craftingGrid){ - final ItemStack[] blueprint = craftingGrid; - if (itemStack.hasTagCompound()){ - final NBTTagCompound nbt = itemStack.getTagCompound(); - final NBTTagList list = new NBTTagList(); - for(int i = 0;i= 10000){ - arg1.addPotionEffect(new PotionEffect(Potion.invisibility.id, 10, 2)); - this.discharge(arg0, 10000, 5, true, true, false); - } - else { - if (arg1.isPotionActive((Potion.invisibility))){ - arg1.removePotionEffect(Potion.invisibility.id); - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java b/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java deleted file mode 100644 index b74b7972be..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemControlCore.java +++ /dev/null @@ -1,128 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.lib.CORE; - -public class ItemControlCore extends Item { - - public static IIcon[] icons = new IIcon[10]; - - public ItemControlCore() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemControlCore"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - //this.setCreativeTab(AddToCreativeTab.tabMisc); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - icons[0] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_0"); - icons[1] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_1"); - icons[2] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_2"); - icons[3] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_3"); - icons[4] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_4"); - icons[5] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_5"); - icons[6] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_6"); - icons[7] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_7"); - icons[8] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_8"); - icons[9] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_9"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[meta]; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 10; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GRAY+"Allows a Multiblock to function upto "+GT_Values.VN[stack.getItemDamage()]+""); - list.add(EnumChatFormatting.GRAY+"Required Tier is determined by the sum of the eu/t of all Energy Inputs"); - list.add(EnumChatFormatting.GRAY+"Lower tiers may be used to underclock, which is useful in some situations"); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - if (tItem == null) { - return "Control Core"; - } - String aReturnValue = super.getItemStackDisplayName(tItem); - if (tItem != null) { - try { - if (aReturnValue != null) { - if (aReturnValue.toLowerCase().contains(".name")) { - aReturnValue = "Control Core"; - } - else { - return aReturnValue; - } - } - } - catch (Throwable t) {} - } - if (aReturnValue == null || !aReturnValue.toLowerCase().contains("control core") || aReturnValue.length() <= 0) { - aReturnValue = "Error"; - } - String suffixName = ""; - if (tItem.getItemDamage() == 0){ - suffixName = " [ULV]"; - } - else if (tItem.getItemDamage() == 1){ - suffixName = " [LV]"; - } - else if (tItem.getItemDamage() == 2){ - suffixName = " [MV]"; - } - else if (tItem.getItemDamage() == 3){ - suffixName = " [HV]"; - } - else if (tItem.getItemDamage() == 4){ - suffixName = " [EV]"; - } - else if (tItem.getItemDamage() == 5){ - suffixName = " [IV]"; - } - else if (tItem.getItemDamage() == 6){ - suffixName = " [LuV]"; - } - else if (tItem.getItemDamage() == 7){ - suffixName = " [ZPM]"; - } - else if (tItem.getItemDamage() == 8){ - suffixName = " [UV]"; - } - else if (tItem.getItemDamage() == 9){ - suffixName = " [MAX]"; - } - return (aReturnValue+suffixName); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/ItemCreativeTab.java b/src/Java/gtPlusPlus/core/item/general/ItemCreativeTab.java deleted file mode 100644 index c1a2655a03..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemCreativeTab.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -public class ItemCreativeTab extends Item { - - public IIcon[] icons = new IIcon[10]; - - public ItemCreativeTab() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemCreativeTabs"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_0"); - this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_1"); - this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_2"); - this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_3"); - this.icons[4] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_4"); - this.icons[5] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_5"); - this.icons[6] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_6"); - this.icons[7] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_7"); - this.icons[8] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_8"); - this.icons[9] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_9"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[meta]; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 10; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemEmpty.java b/src/Java/gtPlusPlus/core/item/general/ItemEmpty.java deleted file mode 100644 index c832d28bbd..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemEmpty.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.core.item.general; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; - -public class ItemEmpty extends CoreItem{ - - public ItemEmpty() { - super("item.empty", AddToCreativeTab.tabMisc); - } - - @Override - public String getItemStackDisplayName(ItemStack tItem) { - return "Empty"; - } - - - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemGemShards.java b/src/Java/gtPlusPlus/core/item/general/ItemGemShards.java deleted file mode 100644 index 5181a32bc7..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemGemShards.java +++ /dev/null @@ -1,78 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.item.base.BaseItemColourable; -import gtPlusPlus.core.util.Utils; - -public class ItemGemShards extends BaseItemColourable{ - - public ItemGemShards(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, - String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { - super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); - } - - public ItemGemShards(String unlocalizedName, String displayName, CreativeTabs creativeTab, int stackSize, - int maxDmg, String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { - super(unlocalizedName, displayName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 4; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - //0 - Diamond - //1 - Emerald - //2 - Ruby - //3 - Sapphire - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String suffix = " Shards"; - String gemType = ""; - if (tItem.getItemDamage() == 0){ - gemType = "Diamond"; - } - else if (tItem.getItemDamage() == 1){ - gemType = "Emerald"; - } - else if (tItem.getItemDamage() == 2){ - gemType = "Ruby"; - } - else if (tItem.getItemDamage() == 3){ - gemType = "Sapphire"; - } - return (gemType+suffix); - - } - - @Override - public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { - if (this.getDamage(stack)==0){ - return Utils.rgbtoHexValue(150, 150, 220); - } - else if (this.getDamage(stack)==1){ - return Utils.rgbtoHexValue(75, 182, 75); - } - else if (this.getDamage(stack)==2){ - return Utils.rgbtoHexValue(182, 77, 77); - } - else { - return Utils.rgbtoHexValue(77, 75, 182); - } - } - - - - - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java b/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java deleted file mode 100644 index 21d2c6e120..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java +++ /dev/null @@ -1,182 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.HashMap; -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -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.EnumChatFormatting; -import net.minecraft.util.IIcon; - -public class ItemGenericToken extends CoreItem { - - public final HashMap mLocalNames; - public final HashMap mMaxStackSizes; - public final HashMap mDescriptionArrays; - public final HashMap mRarities; - public final HashMap mCustomNameColours; - public final HashMap mIcons; - private final String mTextureDir; - - public ItemGenericToken() { - this("itemGenericToken", "Token", new String[] { "Can be reclaimed in some way, shape or form" }, "token"); - } - - public ItemGenericToken(String aUnlocalName, String aInternalName, String[] aBaseTooltip, String aTextureDir) { - super(aUnlocalName, aInternalName, AddToCreativeTab.tabMisc, 64, 1000, aBaseTooltip, EnumRarity.common, EnumChatFormatting.RESET, false, null); - mLocalNames = new HashMap(); - mMaxStackSizes = new HashMap(); - mDescriptionArrays = new HashMap(); - mRarities = new HashMap(); - mCustomNameColours = new HashMap(); - mIcons = new HashMap(); - mTextureDir = aTextureDir; - } - - public boolean register(int id, String aLocalName, int aMaxStack, String aDescript) { - return register(id, aLocalName, aMaxStack, new String[] { aDescript }); - } - - public boolean register(int id, String aLocalName, int aMaxStack, String[] aDescript) { - return register(id, aLocalName, aMaxStack, aDescript, EnumRarity.common, EnumChatFormatting.RESET); - } - - public boolean register(int id, String aLocalName, int aMaxStack, String[] aDescript, EnumRarity aRarity, - EnumChatFormatting aCustomNameColour) { - int[][] sizes = new int[2][6]; - sizes[0][0] = mLocalNames.size(); - sizes[0][1] = mMaxStackSizes.size(); - sizes[0][2] = mDescriptionArrays.size(); - sizes[0][3] = mRarities.size(); - sizes[0][4] = mCustomNameColours.size(); - //sizes[0][5] = mIcons.size(); - mLocalNames.put(id, aLocalName); - mMaxStackSizes.put(id, aMaxStack); - mDescriptionArrays.put(id, aDescript); - mRarities.put(id, aRarity); - mCustomNameColours.put(id, aCustomNameColour); - sizes[1][0] = mLocalNames.size(); - sizes[1][1] = mMaxStackSizes.size(); - sizes[1][2] = mDescriptionArrays.size(); - sizes[1][3] = mRarities.size(); - sizes[1][4] = mCustomNameColours.size(); - //sizes[1][5] = mIcons.size(); - boolean b = sizes[0][0] > sizes[1][0] && sizes[0][1] > sizes[1][1] && sizes[0][2] > sizes[1][2] - && sizes[0][3] > sizes[1][3] && sizes[0][4] > sizes[1][4]; - return b; - } - - // Handle Sub items - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { - for (int i = 0, j = mIcons.size(); i < j; i++) { - final ItemStack tStack = new ItemStack(this, 1, i); - aList.add(tStack); - } - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { - super.addInformation(stack, aPlayer, list, bool); - for (String s : mDescriptionArrays.get(stack.getItemDamage())) { - list.add(s); - } - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - - String s = "" + mCustomNameColours.get(tItem.getItemDamage()); - String parent = super.getItemStackDisplayName(tItem); - if (mLocalNames.get(tItem.getItemDamage()).length() > 0 && parent.toLowerCase().contains(".name")) { - s = s + mLocalNames.get(tItem.getItemDamage()); - } else { - s = s + parent; - } - return s; - } - - @Override - public EnumRarity getRarity(ItemStack par1ItemStack) { - return mRarities.get(par1ItemStack.getItemDamage()); - } - - @Override - public boolean hasEffect(ItemStack par1ItemStack) { - return false; - } - - @Override - public int getMetadata(int p_77647_1_) { - return 0; - } - - @Override - public int getDisplayDamage(ItemStack stack) { - return 0; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - return 0D; - } - - @Override - public boolean isDamaged(ItemStack stack) { - return false; - } - - @Override - public int getItemStackLimit() { - return 64; - } - - @Override - public int getItemStackLimit(ItemStack aStack) { - if (aStack == null) { - return getItemStackLimit(); - } - else { - Integer aSize = mMaxStackSizes.get(aStack.getItemDamage()); - if (aSize != null) { - return aSize; - } - else { - return getItemStackLimit(); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(final IIconRegister aIconRegister) { - for (int i = 0, j = mLocalNames.size(); i < j; i++) { - mIcons.put(i, aIconRegister.registerIcon(CORE.MODID + ":" + mTextureDir + "/" + i)); - } - } - - @Override - public final IIcon getIconFromDamage(final int aMetaData) { - if (aMetaData < 0) { - return null; - } - return mIcons.get(aMetaData); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemGiantEgg.java b/src/Java/gtPlusPlus/core/item/general/ItemGiantEgg.java deleted file mode 100644 index b3338bb681..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemGiantEgg.java +++ /dev/null @@ -1,300 +0,0 @@ -package gtPlusPlus.core.item.general; - -import static gtPlusPlus.core.lib.CORE.RANDOM; - -import java.util.List; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.entity.item.ItemEntityGiantEgg; -import gtPlusPlus.core.item.base.BaseItemTickable; -import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -public class ItemGiantEgg extends BaseItemTickable { - - private static ItemStack turnsIntoItem; - private static ItemStack mCorrectEgg; - private static ItemStack mCorrectStemCells; - - public void registerFuel(int burn){ - CORE.burnables.add(new Pair(burn, ItemUtils.getSimpleStack(this, 1))); - } - - public final void registerOrdictionary(String name){ - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), name); - } - - public ItemGiantEgg() { - this(Utils.rgbtoHexValue(255, 255, 255), Short.MAX_VALUE * Byte.MAX_VALUE, new String[] {"I had best try disassemble this.. for science!"}); - } - - private ItemGiantEgg(int colour, int maxTicks, String[] desc1) { - super(true, false, "itemBigEgg", colour, maxTicks, desc1); - setTextureName(CORE.MODID + ":itemBigEgg"); - this.setMaxStackSize(1); - registerFuel(5000); - registerOrdictionary("fuelLargeChickenEgg"); - } - - public static void postInit(ItemGiantEgg aGiantEggItem) { - ItemGiantEgg.turnsIntoItem = getSpawnEggStack(); - //new DecayableRecipe(aGiantEggItem.maxTicks, getSimpleStack(aGiantEggItem), ItemUtils.getSimpleStack(ItemGiantEgg.turnsIntoItem, 1)); - } - - private static ItemStack getSpawnEggStack() { - //Set the correct egg for future hatches - if (mCorrectEgg == null) { - /*for (int g=0;g 28) { - ItemStack xl = ItemUtils.getValueOfItemList("Circuit_Chip_Stemcell", 1, ItemUtils.getSimpleStack(Items.egg, 2)); - if (xl != null) { - mCorrectStemCells = xl.copy(); - } - } - else { - mCorrectStemCells = ItemUtils.getSimpleStack(Items.egg, 2); - } - } - return mCorrectStemCells; - } - - protected int getMaxTicks(ItemStack aStack) { - if (aStack != null && aStack.hasTagCompound() && aStack.getTagCompound().hasKey("mEggAge")) { - return NBTUtils.getInteger(aStack, "mEggAge"); - } - return maxTicks; - } - - @Override - public void registerIcons(final IIconRegister i) { - this.mIcon[0] = i.registerIcon(CORE.MODID + ":" + "itemBigEgg"); - } - - - @Override - protected boolean createNBT(World world, ItemStack aStack){ - - if (aStack.getTagCompound() != null && aStack.getTagCompound().hasKey("size")) { - return false; - } - Logger.INFO("Egg: "+ReflectionUtils.getMethodName(1)); - Logger.INFO("Egg: "+ReflectionUtils.getMethodName(2)); - Logger.INFO("Egg: "+ReflectionUtils.getMethodName(3)); - Logger.INFO("Egg: "+ReflectionUtils.getMethodName(4)); - Logger.INFO("Egg: "+ReflectionUtils.getMethodName(5)); - Logger.INFO("Egg: "+ReflectionUtils.getMethodName(6)); - //Logger.INFO("Creating Egg NBT."); - boolean aSuper = super.createNBT(world, aStack); - int size = MathUtils.randInt(1, 8); - NBTUtils.setInteger(aStack, "size", size); - NBTUtils.setInteger(aStack, "mEggAge", ((MathUtils.randInt(8000, 16000)*size))); - ItemStack aStemCells = getStemCellStack(); - if (aStemCells != null) { - int mSize = NBTUtils.getInteger(aStack, "size"); - float mSizeMod = (MathUtils.randInt(-5, 5)/5); - mSize += mSizeMod; - mSize = Math.max(mSize, 1); - ItemStack eggYolks[] = new ItemStack[mSize]; - for (int u=0;u 0) { - NBTUtils.setInteger(aStack, "mExpected", mexpected); - NBTUtils.writeItemsToGtCraftingComponents(aStack, new ItemStack[]{ ItemUtils.getSimpleStack(aStemCells, mexpected)}, true); - } - } - return aSuper; - - } - - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (world == null || iStack == null) { - return; - } - if (world.isRemote) { - return; - } - if (iStack.getTagCompound() == null || !iStack.getTagCompound().hasKey("size")) { - this.createNBT(world, iStack); - Logger.INFO("Egg has no NBT, creating (onUpdate)"); - } - boolean a1, a2; - a1 = this.isTicking(world, iStack); - a2 = a1 ? tickItemTag(world, iStack) : false; - - //Logger.INFO("Is Ticking? "+a1); - //Logger.INFO("Did Tick? "+a2); - if (!a1 && !a2) { - if (entityHolding instanceof EntityPlayer){ - if (MathUtils.randInt(0, 1000) >= 990) { - if (NBTUtils.hasKey(iStack, "size")) { - if ((NBTUtils.getInteger(iStack, "size")+1) >= MathUtils.randInt(0, 9)) { - ItemStack replacement = ItemUtils.getSimpleStack(getHatchResult(), 1); - if (replacement == null) { - - } - //Logger.INFO("Replacing "+iStack.getDisplayName()+" with "+replacement.getDisplayName()+"."); - final ItemStack tempTransform = replacement.copy(); - if (iStack.stackSize > 1){ - int u = iStack.stackSize; - tempTransform.stackSize = u; - ((EntityPlayer) entityHolding).inventory.addItemStackToInventory((tempTransform)); - for (int l=0;l 0) { - list.add(EnumChatFormatting.GRAY+this.descriptionString[0]); - } - if (NBTUtils.hasKey(stack, "size")){ - size = NBTUtils.getInteger(stack, "size"); - if (size > 0 && NBTUtils.hasKey(stack, "TickableItem")){ - NBTTagCompound aNBT = stack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("TickableItem"); - if (aNBT != null) { - age = aNBT.getLong("Tick"); - } - } - } - if (NBTUtils.hasKey(stack, "mEggAge")){ - life = NBTUtils.getInteger(stack, "mEggAge"); - } - if (NBTUtils.hasKey(stack, "mExpected")){ - expected = NBTUtils.getInteger(stack, "mExpected"); - } - } - String aSize = size > 0 ? ""+size : "??"; - String aExpected = expected > 0 ? ""+expected : "??"; - String aAge = age > 0 ? ""+(age/20) : "??"; - String aLife = life > 0 ? ""+(life/20) : "??"; - list.add("Egg Size: "+aSize+" ounces"); - list.add("Expected Stem Cells: "+aExpected); - list.add("Age: "+aAge+"s"+" / "+aLife+"s"); - list.add("Larger eggs take longer to hatch,"); - list.add("but have a better chance of hatching."); - - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java b/src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java deleted file mode 100644 index ad9abc8ab2..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java +++ /dev/null @@ -1,63 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.item.base.BaseItemColourable; -import gtPlusPlus.core.util.Utils; - -public class ItemHalfCompleteCasings extends BaseItemColourable{ - - public ItemHalfCompleteCasings(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, - String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { - super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 4; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String prefix = super.getItemStackDisplayName(tItem); - String casingType = ""; - if (tItem.getItemDamage() == 0){ - casingType = " I"; - } - else if (tItem.getItemDamage() == 1){ - casingType = " II"; - } - else if (tItem.getItemDamage() == 2){ - casingType = " III"; - } - else if (tItem.getItemDamage() == 3){ - casingType = " IV"; - } - return (prefix+casingType); - } - - @Override - public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { - if (this.getDamage(stack)==0){ - return Utils.rgbtoHexValue(52, 52, 52); - } - else if (this.getDamage(stack)==1){ - return Utils.rgbtoHexValue(80, 90, 222); - } - else if (this.getDamage(stack)==2){ - return Utils.rgbtoHexValue(182, 77, 177); - } - else { - return Utils.rgbtoHexValue(77, 175, 182); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java b/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java deleted file mode 100644 index db06af8297..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java +++ /dev/null @@ -1,432 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import baubles.api.BaubleType; -import baubles.api.IBauble; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import ic2.api.item.IElectricItemManager; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -@Optional.InterfaceList(value = {@Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), @Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles")}) -public class ItemHealingDevice extends Item implements IElectricItem, IElectricItemManager, IBauble{ - - private final String unlocalizedName = "personalHealingDevice"; - private final ItemStack thisStack; - private final static int maxValueEU = 1000000000; - protected double chargeEU = 0; - - public ItemHealingDevice(){ - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setUnlocalizedName(this.unlocalizedName); - this.setMaxStackSize(1); - this.setTextureName(CORE.MODID + ":" + "personalCloakingDevice"); - this.thisStack = ItemUtils.getSimpleStack(this); - GameRegistry.registerItem(this, this.unlocalizedName); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, final boolean p_77663_5_) { - if (worldObj.isRemote) { - return; - } - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public boolean canProvideEnergy(final ItemStack itemStack) { - return false; - } - - @Override - public Item getChargedItem(final ItemStack itemStack) { - final ItemStack x = itemStack.copy(); - x.setItemDamage(maxValueEU); - return x.getItem(); - } - - @Override - public Item getEmptyItem(final ItemStack itemStack) { - final ItemStack x = itemStack.copy(); - x.setItemDamage(0); - return x.getItem(); - } - - @Override - public double getMaxCharge(final ItemStack itemStack) { - return maxValueEU; - } - - @Override - public int getTier(final ItemStack itemStack) { - return 5; - } - - @Override - public double getTransferLimit(final ItemStack itemStack) { - return 32784; - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return (EnumChatFormatting.BLUE+"Personal Healing NanoBooster"+EnumChatFormatting.RESET); - } - - @Override - public double getDurabilityForDisplay(final ItemStack stack) - { - //return 1.0D - getEnergyStored(stack) / this.capacity; - return 1.0D - (this.getCharge(stack) / this.getMaxCharge(stack)); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) - { - return true; - } - - public double secondsLeft(final ItemStack stack){ - - double r = 0; - r = this.getCharge(stack)/(1638400/4); - return (int) r; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - String aString1 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.1"); - String aString2 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.2"); - String aString3 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.3"); - String aString4 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.4"); - String aString5 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.5"); - String aStringTooltip = StatCollector.translateToLocal("GTPP.nanohealer.hidden"); - String aEuInfo = StatCollector.translateToLocal("GTPP.info.euInfo"); - String aTier = StatCollector.translateToLocal("GTPP.machines.tier"); - String aInputLimit = StatCollector.translateToLocal("GTPP.info.inputLimit"); - String aCurrentPower = StatCollector.translateToLocal("GTPP.info.currentPower"); - String aEU = StatCollector.translateToLocal("GTPP.info.eu"); - String aEUT = aEU+"/t"; - boolean isShowing = getShowMessages(stack); - - list.add(""); - - list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN + aString2 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN + aString3 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.RED + aString4 + EnumChatFormatting.GRAY); - - list.add(""); - - list.add(EnumChatFormatting.GOLD + aEuInfo + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GRAY + aTier+": [" + EnumChatFormatting.YELLOW + this.getTier(stack) - + EnumChatFormatting.GRAY + "] "+aInputLimit+": [" + EnumChatFormatting.YELLOW - + this.getTransferLimit(stack) + EnumChatFormatting.GRAY + aEUT+"]"); - list.add(EnumChatFormatting.GRAY + aCurrentPower +": [" + EnumChatFormatting.YELLOW + (long) this.getCharge(stack) - + EnumChatFormatting.GRAY + aEU +"] [" + EnumChatFormatting.YELLOW - + MathUtils.findPercentage(this.getCharge(stack), this.getMaxCharge(stack)) + EnumChatFormatting.GRAY - + "%]"); - list.add(EnumChatFormatting.GOLD + aString5 + EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GOLD + aStringTooltip + " " + (!isShowing ? EnumChatFormatting.DARK_GREEN : EnumChatFormatting.DARK_RED) + !isShowing + EnumChatFormatting.GRAY); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public double charge(final ItemStack stack, final double amount, final int tier, - final boolean ignoreTransferLimit, final boolean simulate) { - - if (!simulate) - { - ElectricItem.manager.charge(stack, amount, tier, true, simulate); - - } - return ElectricItem.manager.charge(stack, amount, tier, true, simulate); - } - - @Override - public double discharge(final ItemStack stack, final double amount, final int tier, - final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) { - if (!simulate) - { - ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); - } - - return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); - } - - @Override - public double getCharge(final ItemStack stack) { - return ElectricItem.manager.getCharge(stack); - } - - @Override - public boolean canUse(final ItemStack stack, final double amount) { - return ElectricItem.manager.canUse(stack, amount); - } - - @Override - public boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) { - return ElectricItem.manager.use(stack, amount, entity); - } - - @Override - public void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) { - ElectricItem.manager.chargeFromArmor(stack, entity); - } - - @Override - public String getToolTip(final ItemStack stack) { - return ElectricItem.manager.getToolTip(stack); - } - - @Override - public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public BaubleType getBaubleType(final ItemStack arg0) { - return BaubleType.AMULET; - } - - @Override //TODO - public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { - - } - - @Override //TODO - public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { - - } - - @Override //TODO - public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase arg1) { - if (arg1 != null && arg1.worldObj != null && !arg1.worldObj.isRemote){ - - //Try Charge First - - //Inv Slots - for (final ItemStack aInvStack : ((EntityPlayer) arg1).inventory.mainInventory) { - if (aInvStack == aBaubleStack) { - continue; - } - - if (this.getCharge(aBaubleStack) == this.getMaxCharge(aBaubleStack)) { - break; - } - - if (aInvStack != null) { - if (ChargingHelper.isItemValid(aInvStack)) { - - - double aTransferRate; - double aCurrentChargeForThisBauble; - int mTier; - final IElectricItem electricItem = (IElectricItem) aInvStack.getItem(); - - if (electricItem != null) { - - aTransferRate = electricItem.getTransferLimit(aInvStack); - mTier = electricItem.getTier(aInvStack); - aCurrentChargeForThisBauble = ElectricItem.manager.getCharge(aBaubleStack); - - if (aCurrentChargeForThisBauble < maxValueEU) { - if ((ElectricItem.manager.getCharge(aInvStack) >= aTransferRate)) { - if (electricItem.canProvideEnergy(aInvStack)) { - double d = ElectricItem.manager.discharge(aInvStack, aTransferRate, mTier, false, true, false); - //Logger.INFO("Charging from "+aInvStack.getDisplayName() +" | "+d); - ElectricItem.manager.charge(aBaubleStack, d, mTier, true, false); - } - } - } - } - } - } - if (this.getCharge(aBaubleStack) <= (this.getMaxCharge(aBaubleStack) - getTransferLimit(aBaubleStack))) { - continue; - } - else { - break; - } - } - - - //Try Heal - if (this.getCharge(aBaubleStack) > 0){ - - //health Check - float hp = 0; - if (arg1.getHealth() < arg1.getMaxHealth()){ - final float rx = arg1.getMaxHealth()-arg1.getHealth(); - Logger.INFO("rx:"+rx); - arg1.heal(rx*2); - hp = rx; - this.discharge(aBaubleStack, (1638400)*rx, 6, true, true, false); - } - - //Hunger Check - int hunger = 0; - if (arg1 instanceof EntityPlayerMP) { - EntityPlayerMP g = (EntityPlayerMP) arg1; - if (g != null) { - hunger = 20 - g.getFoodStats().getFoodLevel(); - g.getFoodStats().setFoodLevel(g.getFoodStats().getFoodLevel() + hunger); - this.discharge(aBaubleStack, (1638400) * hunger, 6, true, true, false); - } - } - - //Saturation Check - float saturation = 0; - if (arg1 instanceof EntityPlayerMP) { - EntityPlayerMP g = (EntityPlayerMP) arg1; - if (g != null) { - saturation = 5f - g.getFoodStats().getSaturationLevel(); - g.getFoodStats().setFoodSaturationLevel(g.getFoodStats().getSaturationLevel() + saturation); - this.discharge(aBaubleStack, (1638400) * saturation, 6, true, true, false); - } - } - - - saturation = (int) saturation; - - //Only show Messages if they're enabled. - if (getShowMessages(aBaubleStack)) { - if (hp > 0 || hunger > 0 || saturation > 0) - PlayerUtils.messagePlayer((EntityPlayer) arg1, - "Your NanoBooster Whirs! Leaving you feeling stronger."); - - if (hp > 0) - PlayerUtils.messagePlayer((EntityPlayer) arg1, "Healed " + hp + " hp."); - - if (hunger > 0) - PlayerUtils.messagePlayer((EntityPlayer) arg1, "Healed " + hunger + " hunger."); - - if (saturation > 0) - PlayerUtils.messagePlayer((EntityPlayer) arg1, "Satured Hunger by " + saturation + "."); - - if (hp > 0 || hunger > 0 || saturation > 0) - PlayerUtils.messagePlayer((EntityPlayer) arg1, - "You check it's remaining uses, it has " + (int) this.secondsLeft(aBaubleStack) + "."); - - } - - - - - } - } - } - - - - - - - - - - - - - - - - - - - - - - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - tagMain.setBoolean("ShowMSG", false); - rStack.setTagCompound(tagMain); - return true; - } - - public static final boolean getShowMessages(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT == null) { - if (!createNBT(aStack)) { - return false; - } - else { - aNBT = aStack.getTagCompound(); - } - } - return aNBT.getBoolean("ShowMSG"); - - } - - public static final boolean setShowMessages(final ItemStack aStack, final boolean aShow) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT == null) { - if (!createNBT(aStack)) { - return false; - } else { - aNBT = aStack.getTagCompound(); - } - } - aNBT.setBoolean("ShowMSG", aShow); - return true; - } - - @Override - public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, - int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { - // TODO Auto-generated method stub - return super.onItemUse(p_77648_1_, p_77648_2_, p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_8_, - p_77648_9_, p_77648_10_); - } - - @Override - public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - ItemStack superStack = super.onItemRightClick(aStack, aWorld, aPlayer); - boolean isShiftHeld = KeyboardUtils.isShiftKeyDown(); - if (isShiftHeld) { - boolean oldState = getShowMessages(superStack); - boolean newState = Utils.invertBoolean(oldState); - ItemHealingDevice.setShowMessages(superStack, newState); - PlayerUtils.messagePlayer(aPlayer, (!oldState ? "Showing info messages" : "Hiding info messages")); - } - return superStack; - } - - @Override - public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { - return true; - } - - - - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java b/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java deleted file mode 100644 index c34ad9e8d3..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java +++ /dev/null @@ -1,127 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -import gregtech.api.enums.ItemList; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; - -public class ItemLavaFilter extends CoreItem { - - public IIcon[] mIcon = new IIcon[1]; - - public ItemLavaFilter() { - super("itemLavaFilter", AddToCreativeTab.tabMachines, 1, 100, new String[] {"Lava Filter"}, EnumRarity.common, - EnumChatFormatting.BLACK, false, null); - setGregtechItemList(); - } - - private final boolean setGregtechItemList() { - ItemList.Component_LavaFilter.set(this); - return ItemList.Component_LavaFilter.get(1) != null ? true : false; - } - - @Override - public void registerIcons(IIconRegister reg) { - this.mIcon[0] = reg.registerIcon(CORE.MODID + ":" + "itemLavaFilter"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.mIcon[0]; - } - - @Override - public String getItemStackDisplayName(ItemStack tItem) { - return "Lava Filter"; - } - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Damage", 0); - tagMain.setTag("LavaFilter", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getFilterDamage(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("LavaFilter"); - if (aNBT != null) { - return aNBT.getLong("Damage"); - } - } - else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("LavaFilter"); - if (aNBT != null) { - aNBT.setLong("Damage", aDamage); - return true; - } - } - else { - createNBT(aStack); - } - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null){ - createNBT(stack); - } - double currentDamage = getFilterDamage(stack); - double durabilitypercent = currentDamage / 100; - return durabilitypercent; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - list.add(EnumChatFormatting.GRAY+"Filters Lava within a Thermal Boiler."); - EnumChatFormatting durability = EnumChatFormatting.GRAY; - if (100-getFilterDamage(stack) > 80){ - durability = EnumChatFormatting.GRAY; - } - else if (100-getFilterDamage(stack) > 60){ - durability = EnumChatFormatting.GREEN; - } - else if (100-getFilterDamage(stack) > 40){ - durability = EnumChatFormatting.YELLOW; - } - else if (100-getFilterDamage(stack) > 20){ - durability = EnumChatFormatting.GOLD; - } - else if (100-getFilterDamage(stack) > 0){ - durability = EnumChatFormatting.RED; - } - list.add(durability+""+(100-getFilterDamage(stack))+EnumChatFormatting.GRAY+" / "+100); - //super.addInformation(stack, player, list, bool); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java b/src/Java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java deleted file mode 100644 index fa008bf1a3..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java +++ /dev/null @@ -1,140 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import baubles.api.BaubleType; -import baubles.api.IBauble; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.events.CustomMovementHandler; -import gtPlusPlus.core.handler.events.SneakManager; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -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.EnumChatFormatting; -import net.minecraft.world.World; - -@Optional.InterfaceList(value = {@Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), @Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles")}) -public class ItemSlowBuildingRing extends Item implements IBauble{ - - private final String unlocalizedName = "SlowBuildingRing"; - CustomMovementHandler x; - - public ItemSlowBuildingRing(){ - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setUnlocalizedName(this.unlocalizedName); - this.setMaxStackSize(1); - this.setTextureName(CORE.MODID + ":" + "itemSlowBuildersRing"); - ItemUtils.getSimpleStack(this); - GameRegistry.registerItem(this, this.unlocalizedName); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, final boolean p_77663_5_) { - if (worldObj.isRemote) { - return; - } - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return (EnumChatFormatting.YELLOW+"Slow Building Ring"+EnumChatFormatting.GRAY); - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) - { - return false; - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(""); - list.add(EnumChatFormatting.GREEN+"Worn as a Ring within Baubles. Prevents you from sprinting."+EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN+"Movement speed reduced to crouch speed."+EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GREEN+"Press shift while worn to toggle crouch on/off."+EnumChatFormatting.GRAY); - list.add(""); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { - return true; - } - - @Override - public BaubleType getBaubleType(final ItemStack arg0) { - return BaubleType.RING; - } - - @Override //TODO - public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { - try { - EntityPlayer aPlayer; - if (arg1 instanceof EntityPlayer) { - aPlayer = (EntityPlayer) arg1; - SneakManager s = SneakManager.get(aPlayer); - s.putRingOn(); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - @Override //TODO - public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { - try { - EntityPlayer aPlayer; - if (arg1 instanceof EntityPlayer) { - aPlayer = (EntityPlayer) arg1; - SneakManager s = SneakManager.get(aPlayer); - s.takeRingOff(); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - @Override //TODO - public void onWornTick(final ItemStack arg0, final EntityLivingBase arg1) { - doEffect(arg1); - } - - private static void doEffect(final EntityLivingBase arg1){ - try { - // Get World - World aWorld = arg1.worldObj; - if (aWorld != null && !aWorld.isRemote) { - EntityPlayer aPlayer; - if (arg1 instanceof EntityPlayer) { - aPlayer = (EntityPlayer) arg1; - SneakManager s = SneakManager.get(aPlayer); - if (!aPlayer.isSneaking()){ - aPlayer.setSneaking(true); - } - if (aPlayer.isSprinting()) { - aPlayer.setSprinting(false); - } - } - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java b/src/Java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java deleted file mode 100644 index 9feea3c91a..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java +++ /dev/null @@ -1,211 +0,0 @@ -package gtPlusPlus.core.item.general; - -import cpw.mods.fml.common.eventhandler.Event; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.FillBucketEvent; - -public class NuclearFuelRodBase extends Item -{ - /** field for checking if the bucket has been filled. */ - private final Block isFull; - public NuclearFuelRodBase(final Block p_i45331_1_) - { - this.maxStackSize = 1; - this.isFull = p_i45331_1_; - this.setCreativeTab(CreativeTabs.tabMisc); - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - public ItemStack onItemRightClick(final ItemStack p_77659_1_, final World p_77659_2_, final EntityPlayer p_77659_3_) - { - final boolean flag = this.isFull == Blocks.air; - final MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(p_77659_2_, p_77659_3_, flag); - - if (movingobjectposition == null) - { - return p_77659_1_; - } - final FillBucketEvent event = new FillBucketEvent(p_77659_3_, p_77659_1_, p_77659_2_, movingobjectposition); - if (MinecraftForge.EVENT_BUS.post(event)) - { - return p_77659_1_; - } - - if (event.getResult() == Event.Result.ALLOW) - { - if (p_77659_3_.capabilities.isCreativeMode) - { - return p_77659_1_; - } - - if (--p_77659_1_.stackSize <= 0) - { - return event.result; - } - - if (!p_77659_3_.inventory.addItemStackToInventory(event.result)) - { - p_77659_3_.dropPlayerItemWithRandomChoice(event.result, false); - } - - return p_77659_1_; - } - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) - { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!p_77659_2_.canMineBlock(p_77659_3_, i, j, k)) - { - return p_77659_1_; - } - - if (flag) - { - if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) - { - return p_77659_1_; - } - - final Material material = p_77659_2_.getBlock(i, j, k).getMaterial(); - final int l = p_77659_2_.getBlockMetadata(i, j, k); - - if ((material == Material.water) && (l == 0)) - { - p_77659_2_.setBlockToAir(i, j, k); - return this.func_150910_a(p_77659_1_, p_77659_3_, Items.water_bucket); - } - - if ((material == Material.lava) && (l == 0)) - { - p_77659_2_.setBlockToAir(i, j, k); - return this.func_150910_a(p_77659_1_, p_77659_3_, Items.lava_bucket); - } - } - else - { - if (this.isFull == Blocks.air) - { - return new ItemStack(Items.bucket); - } - - if (movingobjectposition.sideHit == 0) - { - --j; - } - - if (movingobjectposition.sideHit == 1) - { - ++j; - } - - if (movingobjectposition.sideHit == 2) - { - --k; - } - - if (movingobjectposition.sideHit == 3) - { - ++k; - } - - if (movingobjectposition.sideHit == 4) - { - --i; - } - - if (movingobjectposition.sideHit == 5) - { - ++i; - } - - if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) - { - return p_77659_1_; - } - - if (this.tryPlaceContainedLiquid(p_77659_2_, i, j, k) && !p_77659_3_.capabilities.isCreativeMode) - { - return new ItemStack(Items.bucket); - } - } - } - - return p_77659_1_; - } - - private ItemStack func_150910_a(final ItemStack p_150910_1_, final EntityPlayer p_150910_2_, final Item p_150910_3_) - { - if (p_150910_2_.capabilities.isCreativeMode) - { - return p_150910_1_; - } - else if (--p_150910_1_.stackSize <= 0) - { - return new ItemStack(p_150910_3_); - } - else - { - if (!p_150910_2_.inventory.addItemStackToInventory(new ItemStack(p_150910_3_))) - { - p_150910_2_.dropPlayerItemWithRandomChoice(new ItemStack(p_150910_3_, 1, 0), false); - } - - return p_150910_1_; - } - } - - /** - * Attempts to place the liquid contained inside the bucket. - */ - public boolean tryPlaceContainedLiquid(final World p_77875_1_, final int p_77875_2_, final int p_77875_3_, final int p_77875_4_) - { - if (this.isFull == Blocks.air) - { - return false; - } - final Material material = p_77875_1_.getBlock(p_77875_2_, p_77875_3_, p_77875_4_).getMaterial(); - final boolean flag = !material.isSolid(); - - if (!p_77875_1_.isAirBlock(p_77875_2_, p_77875_3_, p_77875_4_) && !flag) - { - return false; - } - if (p_77875_1_.provider.isHellWorld && (this.isFull == Blocks.flowing_water)) - { - p_77875_1_.playSoundEffect(p_77875_2_ + 0.5F, p_77875_3_ + 0.5F, p_77875_4_ + 0.5F, "random.fizz", 0.5F, 2.6F + ((p_77875_1_.rand.nextFloat() - p_77875_1_.rand.nextFloat()) * 0.8F)); - - for (int l = 0; l < 8; ++l) - { - p_77875_1_.spawnParticle("largesmoke", p_77875_2_ + Math.random(), p_77875_3_ + Math.random(), p_77875_4_ + Math.random(), 0.0D, 0.0D, 0.0D); - } - } - else - { - if (!p_77875_1_.isRemote && flag && !material.isLiquid()) - { - p_77875_1_.func_147480_a(p_77875_2_, p_77875_3_, p_77875_4_, true); - } - - p_77875_1_.setBlock(p_77875_2_, p_77875_3_, p_77875_4_, this.isFull, 0, 3); - } - - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java b/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java deleted file mode 100644 index 5ff5b5a62b..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/RF2EU_Battery.java +++ /dev/null @@ -1,315 +0,0 @@ -package gtPlusPlus.core.item.general; - -import java.util.List; - -import cofh.api.energy.ItemEnergyContainer; -import cpw.mods.fml.common.IFuelHandler; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.Minecraft; -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.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import ic2.api.item.IElectricItemManager; - -public class RF2EU_Battery extends ItemEnergyContainer implements IElectricItem, IElectricItemManager, IFuelHandler{ - - public static double rfPerEU = 3.4; - private final String unlocalizedName = "rfEUBattery"; - private final ItemStack thisStack; - private final static int maxValueEU = 100000000; - private final static int maxValueRF = (int) (maxValueEU * rfPerEU); - protected double chargeEU = 0; - - public RF2EU_Battery(){ - super(maxValueRF); - GameRegistry.registerFuelHandler(this); - //this.setMaxDamage(Integer.MAX_VALUE); - //this.setDamage(UtilsItems.getSimpleStack(this), 0); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setUnlocalizedName(this.unlocalizedName); - this.setMaxStackSize(1); - this.setTextureName(CORE.MODID + ":" + "itemIngot"); - this.thisStack = ItemUtils.getSimpleStack(this); - GameRegistry.registerItem(this, this.unlocalizedName); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, final boolean p_77663_5_) { - this.getEnergyStored(itemStack); - if (worldObj.isRemote) { - return; - } - - if (player instanceof EntityPlayer){ - for (final ItemStack is : ((EntityPlayer) player).inventory.mainInventory) { - if (is == itemStack) { - continue; - } - if (is != null) { - if (is.getItem() instanceof IElectricItem) { - final IElectricItem electricItem = (IElectricItem) is.getItem(); - this.chargeEU = ElectricItem.manager.getCharge(is); - } - - } - } - } - - - super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); - } - - @Override - public boolean canProvideEnergy(final ItemStack itemStack) { - return true; - } - - @Override - public Item getChargedItem(final ItemStack itemStack) { - final ItemStack x = itemStack.copy(); - x.setItemDamage(maxValueEU); - return x.getItem(); - } - - @Override - public Item getEmptyItem(final ItemStack itemStack) { - final ItemStack x = itemStack.copy(); - x.setItemDamage(0); - return x.getItem(); - } - - @Override - public double getMaxCharge(final ItemStack itemStack) { - return maxValueEU; - } - - @Override - public int getTier(final ItemStack itemStack) { - return 3; - } - - @Override - public double getTransferLimit(final ItemStack itemStack) { - return 8196; - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - - return ("Universally Chargeable Battery"); - } - - @Override - public double getDurabilityForDisplay(final ItemStack stack) - { - //return 1.0D - getEnergyStored(stack) / this.capacity; - return MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack)); - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(final ItemStack par1ItemStack, final int par2) - { - final int i = 30; - - final float f13 = (((Minecraft.getSystemTime() % 6000L) / 3000.0F) * CORE.PI * 2.0F); - - final float t = 0.9F + (0.1F * MathHelper.cos(f13)); - - final double v = 1.0D - this.getDurabilityForDisplay(par1ItemStack); - - int r = i + (int)(v * (255 - i) * t); - if (r > 255) { - r = 255; - } - final int g = i + (int)(v * (64 - i) * t); - - return (r << 16) | (g << 8) | i; - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) - { - return false; - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.YELLOW+"IC2/EU Information"+EnumChatFormatting.GRAY); - list.add(EnumChatFormatting.GRAY+"Tier: ["+EnumChatFormatting.YELLOW+this.getTier(this.thisStack)+EnumChatFormatting.GRAY+"] Current Power: ["+EnumChatFormatting.YELLOW+(long) this.getCharge(stack)+EnumChatFormatting.GRAY+"/EU]"); - list.add(EnumChatFormatting.GRAY+"Transfer Limit: ["+EnumChatFormatting.YELLOW+this.getTransferLimit(this.thisStack)+ EnumChatFormatting.GRAY +"Eu/t]" +"Burn Time: ["+EnumChatFormatting.YELLOW+(this.getBurnTime(stack)/20)+EnumChatFormatting.GRAY+"s]"); - list.add(""); - list.add(EnumChatFormatting.RED+"RF Information"); - list.add(EnumChatFormatting.GRAY+"Extraction Rate: [" +EnumChatFormatting.RED+ this.maxExtract + EnumChatFormatting.GRAY + "Rf/t]" + " Insert Rate: [" +EnumChatFormatting.RED+ this.maxReceive+EnumChatFormatting.GRAY+"Rf/t]"); - list.add(EnumChatFormatting.GRAY+"Current Charge: ["+EnumChatFormatting.RED+this.getEnergyStored(stack) + EnumChatFormatting.GRAY + "Rf / " + this.getMaxEnergyStored(stack)+"Rf] "+EnumChatFormatting.RED+MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack))+EnumChatFormatting.GRAY+"%"); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public ItemStack getContainerItem(final ItemStack itemStack) - { - final ItemStack newItem = itemStack.copy(); - newItem.stackSize = 1; - this.extractEnergy(newItem, 150000, false); - return newItem; - } - - @Override - public boolean hasContainerItem(final ItemStack stack) - { - return true; - } - - @Override - public int getBurnTime(final ItemStack fuel) { - if ((fuel == null) || (fuel.getItem() != this)) { - return 0; - } - return this.extractEnergy(fuel, 150000, true) / 50 / 100; - } - - @Override - public double charge(final ItemStack stack, final double amount, final int tier, - final boolean ignoreTransferLimit, final boolean simulate) { - if (stack.stackTagCompound == null) { - stack.stackTagCompound = new NBTTagCompound(); - } - int energy = stack.stackTagCompound.getInteger("Energy"); - final int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, this.maxReceive)); - if (!simulate) - { - energy += energyReceived; - stack.stackTagCompound.setInteger("Energy", energy); - ElectricItem.manager.discharge(stack, ElectricItem.manager.getCharge(stack), 3, true, true, false); - ElectricItem.manager.charge(stack, energy/rfPerEU, 3, true, false); - - } - return ElectricItem.manager.charge(stack, amount, tier, ignoreTransferLimit, simulate); - } - - @Override - public double discharge(final ItemStack stack, final double amount, final int tier, - final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) { - if ((stack.stackTagCompound == null) || (!stack.stackTagCompound.hasKey("Energy"))) { - final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); - if ((euCharge != 0) && (euCharge >= 1)){ - return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); - } - return 0; - } - int energy = stack.stackTagCompound.getInteger("Energy"); - final int energyExtracted = Math.min(energy, Math.min(this.maxExtract, this.maxExtract)); - if (!simulate) - { - energy -= energyExtracted; - stack.stackTagCompound.setInteger("Energy", energy); - ElectricItem.manager.discharge(stack, ElectricItem.manager.getCharge(stack), 3, true, true, false); - ElectricItem.manager.charge(stack, energy/rfPerEU, 3, true, false); - } - - return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); - } - - @Override - public double getCharge(final ItemStack stack) { - return ElectricItem.manager.getCharge(stack); - } - - @Override - public boolean canUse(final ItemStack stack, final double amount) { - return ElectricItem.manager.canUse(stack, amount); - } - - @Override - public boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) { - return ElectricItem.manager.use(stack, amount, entity); - } - - @Override - public void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) { - ElectricItem.manager.chargeFromArmor(stack, entity); - } - - @Override - public String getToolTip(final ItemStack stack) { - return ElectricItem.manager.getToolTip(stack); - } - - @Override - public int receiveEnergy(final ItemStack container, final int maxReceive, final boolean simulate) - { - if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) { - final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); - if ((euCharge != 0) && (euCharge >= 1)){ - return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); - } - return 0; - } - int energy = container.stackTagCompound.getInteger("Energy"); - final int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, maxReceive)); - if (!simulate) - { - energy += energyReceived; - container.stackTagCompound.setInteger("Energy", energy); - ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false); - ElectricItem.manager.charge(container, energy/rfPerEU, 3, true, false); - - } - return energyReceived; - } - - @Override - public int extractEnergy(final ItemStack container, final int maxExtract, final boolean simulate) - { - if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) { - final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); - if ((euCharge != 0) && (euCharge >= 1)){ - return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); - } - return 0; - } - int energy = container.stackTagCompound.getInteger("Energy"); - final int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract)); - if (!simulate) - { - energy -= energyExtracted; - container.stackTagCompound.setInteger("Energy", energy); - ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false); - ElectricItem.manager.charge(container, energy/rfPerEU, 3, true, false); - } - return energyExtracted; - } - - @Override - public int getEnergyStored(final ItemStack container) - { - if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) { - final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); - if ((euCharge != 0) && (euCharge >= 1)){ - return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); - } - return 0; - } - final int energy = container.stackTagCompound.getInteger("Energy"); - ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false); - ElectricItem.manager.charge(container, energy/rfPerEU, 3, true, false); - return energy; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java b/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java deleted file mode 100644 index 9ac09b92e4..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java +++ /dev/null @@ -1,130 +0,0 @@ -package gtPlusPlus.core.item.general.books; - -import static gtPlusPlus.core.handler.BookHandler.mBookMap; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemWritableBook; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.handler.BookHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class ItemBaseBook extends ItemWritableBook{ - - public ItemBaseBook(){ - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setMaxStackSize(1); - this.setTextureName(CORE.MODID+":"+"itemBook"); - this.setUnlocalizedName("itembookgt"); - GameRegistry.registerItem(this, "bookGT"); - - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < BookHandler.mBookMap.size(); i ++) { - ItemStack bookstack = new ItemStack(item, 1, i); - - /*bookstack = Utils.getWrittenBook( - bookstack, - i, - mBookMap.get(i).mMapping, - mBookMap.get(i).mTitle, - mBookMap.get(i).mAuthor, - mBookMap.get(i).mPages);*/ - - NBTUtils.createIntegerTagCompound(bookstack, "stats", "mMeta", i); - list.add(bookstack); - } - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - if (NBTUtils.hasKey(tItem, "title")){ - return NBTUtils.getString(tItem, "title"); - } - else if (tItem.getItemDamage() > -1 && tItem.getItemDamage() <= mBookMap.size()){ - return EnumChatFormatting.ITALIC+""+mBookMap.get(tItem.getItemDamage()).mTitle; - } - //NBTUtils.tryIterateNBTData(tItem); - return "GT++ Storybook"; - } - - @Override - public void addInformation(ItemStack tItem, EntityPlayer player, List list, boolean bool) { - // TODO Auto-generated method stub - if (NBTUtils.hasKey(tItem, "author")){ - list.add(EnumChatFormatting.GRAY+"Author: "+NBTUtils.getString(tItem, "author")); - } - else if (mBookMap.get(tItem.getItemDamage()).mAuthor != null){ - list.add(EnumChatFormatting.WHITE+"Author: "+mBookMap.get(tItem.getItemDamage()).mAuthor); - } - if (NBTUtils.hasKey(tItem, "title")){ - list.add(EnumChatFormatting.GRAY+"Pages: "+NBTUtils.getString(tItem, "pages")); - } - else if (mBookMap.get(tItem.getItemDamage()).mPages != null){ - list.add(EnumChatFormatting.WHITE+"Pages: "+mBookMap.get(tItem.getItemDamage()).mPages.length); - } - //super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { - //player.displayGUIBook(item); - int i = item.getItemDamage(); - ItemStack bookstack = Utils.getWrittenBook( - null, - mBookMap.get(i).mMeta, - mBookMap.get(i).mMapping, - mBookMap.get(i).mTitle, - mBookMap.get(i).mAuthor, - mBookMap.get(i).mPages); - - if (player.worldObj.isRemote){ - try { - Class clazz = ReflectionUtils.getClass("net.minecraft.client.gui.GuiScreenBook"); - Constructor ctor = clazz.getConstructor(EntityPlayer.class, ItemStack.class, boolean.class); - Object object = ctor.newInstance(new Object[] { player, bookstack, false }); - Minecraft.getMinecraft().displayGuiScreen((GuiScreen) object); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - //Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(player, bookstack, false)); - } - return item; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java b/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java deleted file mode 100644 index a95fab4b6c..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java +++ /dev/null @@ -1,246 +0,0 @@ -package gtPlusPlus.core.item.general.capture; - -import java.util.List; -import java.util.UUID; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.*; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.api.interfaces.IEntityCatcher; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class ItemEntityCatcher extends Item implements IEntityCatcher { - - // PlayerInteractEvent.EntityInteract; - - - public ItemEntityCatcher() { - //Probably won't ever need this event handler. - //Utils.registerEvent(this); - this.setUnlocalizedName("itemDragonJar"); - this.setTextureName(CORE.MODID + ":" + getUnlocalizedName()); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setMaxStackSize(16); - this.setMaxDamage(0); - GameRegistry.registerItem(this, getUnlocalizedName()); - } - - @Override - public boolean hasEntity(ItemStack aStack) { - if (NBTUtils.hasKey(aStack, "mHasEntity")) { - return NBTUtils.getBoolean(aStack, "mHasEntity"); - } - return false; - } - - @Override - public Entity getStoredEntity(World aWorld, ItemStack aStack) { - if (aStack == null || !hasEntity(aStack)) { - Logger.INFO("Cannot get stored entity."); - return null; - } - - Entity mEntityToSpawn; - int mEntityID; - Logger.WARNING("getStoredEntity(1)"); - - mEntityID = NBTUtils.getInteger(aStack, "mEntityID"); - mEntityToSpawn = EntityList.createEntityByID(mEntityID, aWorld); - if (mEntityToSpawn != null) { - Logger.WARNING("getStoredEntity(2)"); - return mEntityToSpawn; - } - - Logger.INFO("Failed to get stored entity. - getStoredEntity()"); - return null; - } - - @Override - public boolean setStoredEntity(World aWorld, ItemStack aStack, Entity aEntity) { - if (aEntity == null) { - NBTUtils.setBoolean(aStack, "mHasEntity", false); - Logger.INFO("Bad Entity being stored."); - return false; - } - - Logger.WARNING("setStoredEntity(1)"); - - NBTTagCompound mEntityData; - Class mEntityClass; - String mClassName; - String mEntityName; - int mEntityID, mEntityHashcode; - UUID mUuidPersistent, mUuidUnique; - Logger.WARNING("setStoredEntity(2)"); - - mEntityData = aEntity.getEntityData(); - mEntityClass = aEntity.getClass(); - mClassName = mEntityClass.getName(); - mEntityName = aEntity.getCommandSenderName(); - // mEntityID = aEntity.getEntityId(); - mEntityID = EntityList.getEntityID(aEntity); - mEntityHashcode = aEntity.hashCode(); - mUuidPersistent = aEntity.getPersistentID(); - mUuidUnique = aEntity.getUniqueID(); - Logger.WARNING("setStoredEntity(3)"); - - NBTUtils.createTagCompound(aStack, "mEntityData", mEntityData); - NBTUtils.setString(aStack,"mEntityName", mEntityName); - NBTUtils.setInteger(aStack,"mEntityID", mEntityID); - NBTUtils.setString(aStack,"mClassName", mClassName); - NBTUtils.setString(aStack,"mUuidPersistent", mUuidPersistent.toString()); - NBTUtils.setString(aStack,"mUuidUnique", mUuidUnique.toString()); - NBTUtils.setInteger(aStack,"mEntityHashcode", mEntityHashcode); - NBTUtils.setBoolean(aStack,"mHasEntity", true); - Logger.WARNING("setStoredEntity(4)"); - return true; - } - - @SuppressWarnings("unchecked") - @Override - public Class getStoredEntityClass(ItemStack aStack) { - if (aStack == null || !hasEntity(aStack)) { - return null; - } - Class mEntityClass; - String mClassName; - mClassName = NBTUtils.getString(aStack, "mClassName"); - mEntityClass = (Class) ReflectionUtils.getClass(mClassName); - if (mEntityClass != null) { - return mEntityClass; - } - return null; - } - - @Override - public boolean spawnStoredEntity(World aWorld, ItemStack aStack, BlockPos aPos) { - if (aStack == null || !hasEntity(aStack)) { - Logger.INFO("Cannot release, either invalid Itemstack or no entity stored."); - return false; - } - - NBTTagCompound mEntityData = NBTUtils.getTagCompound(aStack, "mEntityData"); - - int mEntityID = NBTUtils.getInteger(aStack,"mEntityID"); - String mClassName = NBTUtils.getString(aStack,"mClassName"); - UUID mUuidPersistent = UUID.fromString(NBTUtils.getString(aStack,"mUuidPersistent")); - UUID mUuidUnique = UUID.fromString(NBTUtils.getString(aStack,"mUuidUnique")); - int mEntityHashcode = NBTUtils.getInteger(aStack,"mEntityHashcode"); - - EntityLiving mEntityToSpawn = (EntityLiving) getStoredEntity(aWorld, aStack); - Class mEntityClass = getStoredEntityClass(aStack); - - Logger.WARNING("spawnStoredEntity(1)"); - - if (mEntityToSpawn != null && mEntityClass != null) { - Logger.WARNING("spawnStoredEntity(2)"); - if (mEntityToSpawn.getEntityData() != mEntityData) { - Logger.WARNING("spawnStoredEntity(x)"); - NBTUtils.setEntityCustomData(mEntityToSpawn, mEntityData); - } - - mEntityToSpawn.setLocationAndAngles(aPos.xPos, aPos.yPos, aPos.zPos, aWorld.rand.nextFloat() * 360.0F, - 0.0F); - if (mEntityToSpawn != null) { - mEntityToSpawn.onSpawnWithEgg(null); - aWorld.spawnEntityInWorld(mEntityToSpawn); - Logger.WARNING("spawnStoredEntity(3)"); - } - if (mEntityToSpawn != null) { - mEntityToSpawn.playLivingSound(); - Logger.WARNING("spawnStoredEntity(4)"); - } - Logger.WARNING("spawnStoredEntity(5)"); - NBTUtils.setBoolean(aStack,"mHasEntity", false); - return true; - } - Logger.INFO("Failed to spawn stored entity. - spawnStoredEntity()"); - return false; - } - - @Override - public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - return super.onItemRightClick(aStack, aWorld, aPlayer); - } - - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { - if (hasEntity(p_77624_1_)){ - String mName = NBTUtils.getString(p_77624_1_,"mEntityName"); - if (mName != null && !mName.equals("")){ - p_77624_3_.add(EnumChatFormatting.GRAY+"Contains a "+mName+"."); - } - } - else { - p_77624_3_.add(EnumChatFormatting.GRAY+"Does not contain anything."); - } - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side, - float xOffset, float yOffset, float zOffset) { - if (Utils.isServer()) { - Logger.WARNING("Trying to release (1)"); - if (NBTUtils.hasKey(itemstack,"mHasEntity") - && NBTUtils.getBoolean(itemstack,"mHasEntity")) { - Logger.WARNING("Trying to release (2)"); - boolean mDidSpawn = spawnStoredEntity(world, itemstack, new BlockPos(x, y+1, z, world)); - - if (!mDidSpawn){ - PlayerUtils.messagePlayer(player, "You failed to release a "+NBTUtils.getString(itemstack,"mEntityName")+"."); - } - - return mDidSpawn; - - } - } - return super.onItemUse(itemstack, player, world, x, y, z, side, xOffset, yOffset, zOffset); - - } - - @Override - public boolean itemInteractionForEntity(ItemStack aStack, EntityPlayer aPlayer, EntityLivingBase aEntity) { - if (Utils.isServer()) { - Logger.WARNING("Trying to catch (1)"); - if (!hasEntity(aStack)) { - Logger.WARNING("Trying to catch (2)"); - boolean mStored = setStoredEntity(aPlayer.worldObj, aStack, aEntity); - if (mStored) { - Logger.WARNING("Trying to catch (3)"); - aEntity.setDead(); - PlayerUtils.messagePlayer(aPlayer, "You have captured a "+NBTUtils.getString(aStack,"mEntityName")+" in the Jar."); - //NBTUtils.tryIterateNBTData(aStack); - } - } - } - return super.itemInteractionForEntity(aStack, aPlayer, aEntity); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - if (hasEntity(aStack)){ - return "Captured Dragon Jar"; - } - return "Dragon Capture Jar"; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java b/src/Java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java deleted file mode 100644 index 86c52cc048..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.core.item.general.chassis; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class ItemBoilerChassis extends Item { - - public IIcon[] icons = new IIcon[1]; - - public ItemBoilerChassis() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemBoilerChassis"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "itemBoilerChassis"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[0]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 3; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String itemName = "Advanced Boiler Chassis"; - String suffixName = ""; - if (tItem.getItemDamage() == 0){ - suffixName = " [Tier 1]"; - } - else if (tItem.getItemDamage() == 1){ - suffixName = " [Tier 2]"; - } - else if (tItem.getItemDamage() == 2){ - suffixName = " [Tier 3]"; - } - return (itemName+suffixName); - - } - - @Override //TODO - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - int meta = stack.getItemDamage(); - if (meta == 0){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(10,110,30); - } - else if (meta == 1){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); - } - else if (meta == 2){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200,85,40); - } - else if (meta == 3){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(255,100,50); - } - return HEX_OxFFFFFF; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java b/src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java deleted file mode 100644 index be1fdfc491..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java +++ /dev/null @@ -1,93 +0,0 @@ -package gtPlusPlus.core.item.general.chassis; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class ItemDehydratorCoil extends Item { - - public IIcon[] icons = new IIcon[4]; - - public ItemDehydratorCoil() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemDehydratorCoil"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_0"); - this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_1"); - this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_2"); - this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_3"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[meta]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 4; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String itemName = "Dehydrator Coil"; - String suffixName = ""; - if (tItem.getItemDamage() == 0){ - suffixName = " [EV]"; - } - else if (tItem.getItemDamage() == 1){ - suffixName = " [IV]"; - } - else if (tItem.getItemDamage() == 2){ - suffixName = " [LuV]"; - } - else if (tItem.getItemDamage() == 3){ - suffixName = " [ZPM]"; - } - return (itemName+suffixName); - - } - - /*@Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - int meta = stack.getItemDamage(); - if (meta == 0){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(10,110,30); - } - else if (meta == 1){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); - } - else if (meta == 2){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200,85,40); - } - else if (meta == 3){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(255,150,50); - } - return HEX_OxFFFFFF; - }*/ - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java b/src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java deleted file mode 100644 index 99d4a139dd..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java +++ /dev/null @@ -1,93 +0,0 @@ -package gtPlusPlus.core.item.general.chassis; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class ItemDehydratorCoilWire extends Item { - - public IIcon[] icons = new IIcon[4]; - - public ItemDehydratorCoilWire() { - super(); - this.setHasSubtypes(true); - String unlocalizedName = "itemDehydratorCoilWire"; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - GameRegistry.registerItem(this, unlocalizedName); - } - - @Override - public void registerIcons(IIconRegister reg) { - this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_0"); - this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_1"); - this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_2"); - this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_3"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[meta]; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 4; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String itemName = "Coil Wire"; - String suffixName = ""; - if (tItem.getItemDamage() == 0){ - suffixName = " [EV]"; - } - else if (tItem.getItemDamage() == 1){ - suffixName = " [IV]"; - } - else if (tItem.getItemDamage() == 2){ - suffixName = " [LuV]"; - } - else if (tItem.getItemDamage() == 3){ - suffixName = " [ZPM]"; - } - return (itemName+suffixName); - - } - -/* @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - int meta = stack.getItemDamage(); - if (meta == 0){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(10,110,30); - } - else if (meta == 1){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); - } - else if (meta == 2){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200,85,40); - } - else if (meta == 3){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(255,150,50); - } - return HEX_OxFFFFFF; - }*/ - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java b/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java deleted file mode 100644 index 628fba9291..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java +++ /dev/null @@ -1,223 +0,0 @@ -package gtPlusPlus.core.item.general.fuelrods; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class FuelRod_Base extends Item{ - - public int fuelRemaining = 0; - public int maximumFuel = 0; - public String fuelType = ""; - public float heat = 0; - public float maxHeat = this.getMaxHeat(); - public FuelRod_Base(final String unlocalizedName, final String type, final int fuelLeft, final int maxFuel) { - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(1); - this.setMaxDamage(maxFuel); - this.maximumFuel = maxFuel; - this.fuelRemaining = fuelLeft; - this.fuelType = type; - this.setCreativeTab(AddToCreativeTab.tabMachines); - } - - private float getMaxHeat(){ - float tempvar; - if (this.fuelType == "Thorium"){ - tempvar = 2500; - } - - else if (this.fuelType == "Uranium"){ - tempvar = 5000; - } - - else if (this.fuelType == "Plutonium"){ - tempvar = 10000; - } - - else { - tempvar = 5000; - } - return tempvar; - - } - - private void updateVars(final ItemStack stack){ - if (stack.stackTagCompound != null) { - this.heat = stack.stackTagCompound.getFloat("heat"); - this.fuelRemaining = stack.stackTagCompound.getInteger("fuelRemaining"); - } - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - - Float NBT_Heat = this.heat; - Float NBT_MaxHeat = this.maxHeat; - int NBT_Fuel = this.fuelRemaining; - String NBT_Type= this.fuelType; - - if (stack.stackTagCompound != null) { - NBT_Heat = stack.stackTagCompound.getFloat("heat"); - NBT_MaxHeat = stack.stackTagCompound.getFloat("maxHeat"); - NBT_Fuel = stack.stackTagCompound.getInteger("fuelRemaining"); - NBT_Type = stack.stackTagCompound.getString("fuelType"); - } - - final String tempHeat = String.valueOf(NBT_Heat); - final String tempMaxHeat = String.valueOf(NBT_MaxHeat); - final String tempFuel = String.valueOf(NBT_Fuel); - final String formattedType = EnumChatFormatting.DARK_RED+NBT_Type+EnumChatFormatting.GRAY; - String formattedHeat = EnumChatFormatting.RED+tempHeat+EnumChatFormatting.GRAY; - final String formattedMaxHeat = EnumChatFormatting.RED+tempMaxHeat+EnumChatFormatting.GRAY; - String formattedFuelLeft = tempFuel+EnumChatFormatting.GRAY; - - final int tempMax = this.maximumFuel; - final float tempCurrentHeat = this.heat; - final int tempFuelLeft = this.fuelRemaining; - - //Fuel Usage Formatting - if (tempFuelLeft <= (this.maximumFuel/3)){ - formattedFuelLeft = EnumChatFormatting.RED+tempFuel+EnumChatFormatting.GRAY; - } - else if ((tempFuelLeft >= (this.maximumFuel/3)) && (tempFuelLeft <= ((this.maximumFuel/3)*2))){ - formattedFuelLeft = EnumChatFormatting.YELLOW+tempFuel+EnumChatFormatting.GRAY; - } - else if ((tempFuelLeft >= ((this.maximumFuel/3)*2)) && (tempFuelLeft <= this.maximumFuel)){ - formattedFuelLeft = EnumChatFormatting.GREEN+tempFuel+EnumChatFormatting.GRAY; - } - else { - formattedFuelLeft = EnumChatFormatting.GRAY+tempFuel+EnumChatFormatting.GRAY; - } - - //Heat Formatting - if ((tempCurrentHeat <= 200) && (tempCurrentHeat >= 0)){ - formattedHeat = EnumChatFormatting.GRAY+tempHeat+EnumChatFormatting.GRAY; - } - else if ((tempCurrentHeat <= (this.maxHeat/3)) && (tempCurrentHeat > 200)){ - formattedHeat = EnumChatFormatting.YELLOW+tempHeat+EnumChatFormatting.GRAY; - } - else if ((tempCurrentHeat >= (this.maxHeat/3)) && (tempMax < ((this.maxHeat/3)*2)) && (tempCurrentHeat != 0)){ - formattedHeat = EnumChatFormatting.GOLD+tempHeat+EnumChatFormatting.GRAY; - } - else if ((tempCurrentHeat >= ((this.maxHeat/3)*2)) && (tempMax <= this.maxHeat) && (tempCurrentHeat != 0)){ - formattedHeat = EnumChatFormatting.RED+tempHeat+EnumChatFormatting.GRAY; - } - else { - formattedHeat = EnumChatFormatting.BLUE+tempHeat+EnumChatFormatting.GRAY; - } - list.add(EnumChatFormatting.GRAY+"A "+formattedType+" Fuel Rod."); - list.add(EnumChatFormatting.GRAY+"Running at "+formattedHeat+"/"+formattedMaxHeat+" Kelvin."); - list.add(EnumChatFormatting.GRAY+"Fuel Remaining: "+formattedFuelLeft+"L."); - super.addInformation(stack, aPlayer, list, bool); - } - - public String getType(final ItemStack stack){ - if (stack.stackTagCompound != null){ - return stack.stackTagCompound.getString("fuelType"); - } - return this.fuelType; - } - - public int getFuelRemaining(final ItemStack stack){ - if (stack.stackTagCompound != null){ - return stack.stackTagCompound.getInteger("fuelRemaining"); - } - return 0; - } - - public int getMaxFuel(){ - return this.maximumFuel; - } - - public int getFuel(final ItemStack stack){ - if (stack != null){ - final int i = stack.getItemDamage(); - final int r = this.maximumFuel - i; - return r; - } - return 0; - } - - public boolean setFuelRemainingExplicitly(final int i){ - final int tempFuel = this.fuelRemaining; - this.fuelRemaining = i; - if (i != tempFuel){ - return true; - } - return false; - } - - public boolean addFuel(final int i){ - final int tempFuel = this.fuelRemaining; - this.fuelRemaining = tempFuel+i; - if (this.fuelRemaining != tempFuel){ - return true; - } - return false; - } - - public float getHeat(final ItemStack value){ - if (value.stackTagCompound != null){ - return value.stackTagCompound.getFloat("heat"); - } - return 0f; - } - - public boolean addHeat(final float i){ - final float tempFuel = this.heat; - this.heat = tempFuel+i; - if (this.heat != tempFuel){ - return true; - } - return false; - } - - - //Ticking and NBT Handling - /* Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and - * update it's contents. - * - * public int fuelRemaining = 0; - public int maximumFuel = 0; - public String fuelType = ""; - public float heat = 0; - public float maxHeat = 5000; - * - */ - @Override - public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) { - itemStack.stackTagCompound = new NBTTagCompound(); - itemStack.stackTagCompound.setInteger("fuelRemaining", this.getFuelRemaining(itemStack)); - itemStack.stackTagCompound.setInteger("maximumFuel", this.maximumFuel); - itemStack.stackTagCompound.setFloat("heat", this.getHeat(itemStack)); - itemStack.stackTagCompound.setFloat("maxHeat", this.getMaxHeat()); - itemStack.stackTagCompound.setString("fuelType", this.getType(itemStack)); - this.updateVars(itemStack); - } - - @Override - public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4, final boolean par5) { - itemStack.stackTagCompound = new NBTTagCompound(); - itemStack.stackTagCompound.setInteger("fuelRemaining", this.getFuelRemaining(itemStack)); - itemStack.stackTagCompound.setInteger("maximumFuel", this.maximumFuel); - itemStack.stackTagCompound.setFloat("heat", this.getHeat(itemStack)); - itemStack.stackTagCompound.setFloat("maxHeat", this.getMaxHeat()); - itemStack.stackTagCompound.setString("fuelType", this.getType(itemStack)); - this.updateVars(itemStack); - } - - - -} diff --git a/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java b/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java deleted file mode 100644 index dbf1209b50..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.core.item.general.fuelrods; - -public class FuelRod_Thorium extends FuelRod_Base{ - - public FuelRod_Thorium(final String unlocalizedName, final String type, final int fuelLeft, final int maxFuel) { - super(unlocalizedName, type, fuelLeft, maxFuel); - this.setMaxDamage(maxFuel); - this.maximumFuel = maxFuel; - this.fuelRemaining = fuelLeft; - this.fuelType = type; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java b/src/Java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java deleted file mode 100644 index 238e765384..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java +++ /dev/null @@ -1,84 +0,0 @@ -package gtPlusPlus.core.item.general.rfchargingpack; - -import java.util.List; - -import cofh.api.energy.ItemEnergyContainer; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.util.math.MathUtils; - -public class ChargingPackBase extends ItemEnergyContainer { - - protected final int mCapacityMax; - protected final byte mTier; - - public ChargingPackBase(byte tier) { - this(tier, (tier == 1 ? 4000000 : tier == 2 ? 8000000 : tier == 3 ? 16000000 : tier == 4 ? 32000000 : 64000000)); - } - - private ChargingPackBase(byte tier, int maxStorage) { - super(maxStorage); - mTier = tier; - mCapacityMax = maxStorage; - } - - public int getMaxEnergyInput(ItemStack container) - { - return this.maxReceive; - } - - public int getMaxEnergyExtracted(ItemStack container) - { - return this.maxExtract; - } - - @Override - public void onUpdate(ItemStack aStack, World aWorld, Entity aEnt, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(aStack, aWorld, aEnt, p_77663_4_, p_77663_5_); - - ItemEnergyContainer current = this; - int currentStored = 0; - if (current != null) { - currentStored = current.getEnergyStored(aStack); - } - if (currentStored > 0) { - if (aEnt instanceof EntityPlayer) { - if (((EntityPlayer) aEnt).inventory != null) { - for (ItemStack invStack : ((EntityPlayer) aEnt).inventory.mainInventory) { - if (invStack != null) { - if (invStack.getItem() instanceof ItemEnergyContainer) { - if (current != null) { - currentStored = current.getEnergyStored(aStack); - if (currentStored > 0) { - int mTransLimit; - int mMaxStorage; - int mCurrent; - mTransLimit = getMaxEnergyInput(invStack); - mMaxStorage = current.getMaxEnergyStored(invStack); - mCurrent = current.getEnergyStored(invStack); - if (mCurrent+mTransLimit <= mMaxStorage) { - current.extractEnergy(aStack, current.receiveEnergy(invStack, mTransLimit, false), false); - } - } - } - } - } - } - } - } - } - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) { - list.add(EnumChatFormatting.RED+"RF Information"); - list.add(EnumChatFormatting.GRAY+"Extraction Rate: [" +EnumChatFormatting.RED+ this.maxExtract + EnumChatFormatting.GRAY + "Rf/t]" + " Insert Rate: [" +EnumChatFormatting.RED+ this.maxReceive+EnumChatFormatting.GRAY+"Rf/t]"); - list.add(EnumChatFormatting.GRAY+"Current Charge: ["+EnumChatFormatting.RED+this.getEnergyStored(stack) + EnumChatFormatting.GRAY + "Rf / " + this.getMaxEnergyStored(stack)+"Rf] "+EnumChatFormatting.RED+MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack))+EnumChatFormatting.GRAY+"%"); - super.addInformation(stack, p_77624_2_, list, p_77624_4_); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java b/src/Java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java deleted file mode 100644 index 727b933fa7..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java +++ /dev/null @@ -1,285 +0,0 @@ -package gtPlusPlus.core.item.general.spawn; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockLiquid; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.*; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.*; -import net.minecraft.util.*; -import net.minecraft.world.World; - -public class ItemCustomSpawnEgg extends ItemMonsterPlacer { - - private static final HashMap mIconMap = new HashMap(); - private static int mTotalMetaItems = 0; - - private static final HashMap mMaxStackSizeMap = new HashMap(); - private static final HashMap mRarityMap = new HashMap(); - private static final HashMap> mOreDictNames = new HashMap>(); - - private static final HashMap mColourBaseMap = new HashMap(); - private static final HashMap mColourSpotsMap = new HashMap(); - private static final HashMap mEntityNameMap = new HashMap(); - private static final HashMap mEntityFullNameMap = new HashMap(); - - private static final HashMap mReverseEntityMap = new HashMap(); - - protected EntityLiving entityToSpawn = null; - - public static ItemStack getSpawnEggForEntityname(String aEntityName, int aSize) { - return ItemUtils.simpleMetaStack(ModItems.itemCustomSpawnEgg, mReverseEntityMap.get(aEntityName), aSize); - } - - public static void registerEntityForSpawnEgg(final int aMetaID, String parEntityToSpawnName, int aPrimaryColor, int aSecondaryColor) { - registerEntityForSpawnEgg(aMetaID, parEntityToSpawnName, aPrimaryColor, aSecondaryColor, EnumRarity.common, new ArrayList()); - } - - public static void registerEntityForSpawnEgg(final int aMetaID, String parEntityToSpawnName, int aPrimaryColor, int aSecondaryColor, EnumRarity aRarity, final ArrayList aOreDictNames) { - mTotalMetaItems++; - mMaxStackSizeMap.put(aMetaID, 64); - mRarityMap.put(aMetaID, aRarity); - mOreDictNames.put(aMetaID, aOreDictNames); - mColourBaseMap.put(aMetaID, aPrimaryColor); - mColourSpotsMap.put(aMetaID, aSecondaryColor); - mReverseEntityMap.put(parEntityToSpawnName, aMetaID); - setEntityToSpawnName(aMetaID, parEntityToSpawnName); - } - - public static void registerEggsToOreDict() { - for (int aMetaID = 0; aMetaID < mTotalMetaItems; aMetaID++) { - ArrayList aOreDictNames = mOreDictNames.get(aMetaID); - if (aOreDictNames != null && !aOreDictNames.isEmpty()) { - ItemStack aFoodStack = ItemUtils.simpleMetaStack(ModItems.itemCustomSpawnEgg, aMetaID, 1 - ); - for (String aOreName : aOreDictNames) { - ItemUtils.addItemToOreDictionary(aFoodStack, aOreName); - } - } - } - } - - public ItemCustomSpawnEgg() { - super(); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - this.setUnlocalizedName("BasicMetaSpawnEgg"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - } - - /** - * Callback for item usage. If the item does something special on right - * clicking, - * - * he will have one of those. Return True if something happen and false if - * it don't. This is for ITEMS, not BLOCKS - */ - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){ - if (par3World.isRemote) { - return true; - } - else { - Block block = par3World.getBlock(par4, par5, par6); - par4 += Facing.offsetsXForSide[par7]; - par5 += Facing.offsetsYForSide[par7]; - par6 += Facing.offsetsZForSide[par7]; - double d0 = 0.0D; - - if (par7 == 1 && block.getRenderType() == 11) { - d0 = 0.5D; - } - - Entity entity = spawnEntity(par1ItemStack, par3World, par4 + 0.5D, par5 + d0, par6 + 0.5D); - - if (entity != null) { - if (entity instanceof EntityLivingBase - && par1ItemStack.hasDisplayName()) { - ((EntityLiving) entity).setCustomNameTag( - par1ItemStack.getDisplayName() - ); - } - - if (!par2EntityPlayer.capabilities.isCreativeMode) { - --par1ItemStack.stackSize; - } - } - - return true; - } - } - - /** - * Called whenever this item is equipped and the right mouse button is - * pressed. - * - * Args: itemStack, world, entityPlayer - */ - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (par2World.isRemote) { - return par1ItemStack; - } - else { - MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); - - if (movingobjectposition == null) { - return par1ItemStack; - } - else { - if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { - int i = movingobjectposition.blockX; - int j = movingobjectposition.blockY; - int k = movingobjectposition.blockZ; - - if (!par2World.canMineBlock(par3EntityPlayer, i, j, k)) { - return par1ItemStack; - } - - if (!par3EntityPlayer.canPlayerEdit( - i, j, k, movingobjectposition - - .sideHit, par1ItemStack - )) { - return par1ItemStack; - } - - if (par2World.getBlock(i, j, k) instanceof BlockLiquid) { - Entity entity = spawnEntity(par1ItemStack, par2World, i, j, k); - - if (entity != null) { - if (entity instanceof EntityLivingBase - && par1ItemStack - - .hasDisplayName()) { - ((EntityLiving) entity).setCustomNameTag( - par1ItemStack - - .getDisplayName() - ); - } - - if (!par3EntityPlayer.capabilities.isCreativeMode) { - --par1ItemStack.stackSize; - } - } - } - } - - return par1ItemStack; - } - } - } - - /** - * Spawns the creature specified by the egg's type in the location specified - * by - * - * the last three parameters. Parameters: world, entityID, x, y, z. - * @param par1ItemStack - */ - public Entity spawnEntity(ItemStack par1ItemStack, World parWorld, double parX, double parY, double parZ) { - - if (!parWorld.isRemote) // never spawn entity on client side - { - int aDamage = par1ItemStack.getItemDamage(); - String entityToSpawnNameFull = mEntityFullNameMap.get(aDamage); - String entityToSpawnName = mEntityNameMap.get(aDamage); - //entityToSpawnNameFull = WildAnimals.MODID + "." + entityToSpawnName; - if (EntityList.stringToClassMapping.containsKey(entityToSpawnNameFull)) { - entityToSpawn = (EntityLiving) EntityList.createEntityByName(entityToSpawnNameFull, parWorld); - entityToSpawn.setLocationAndAngles(parX, parY, parZ, MathHelper.wrapAngleTo180_float(parWorld.rand.nextFloat() * 360.0F), 0.0F); - parWorld.spawnEntityInWorld(entityToSpawn); - entityToSpawn.onSpawnWithEgg((IEntityLivingData) null); - entityToSpawn.playLivingSound(); - } - else { - // DEBUG - System.out.println("Entity not found " + entityToSpawnName); - } - } - - return entityToSpawn; - } - - /** - * returns a list of items with the same ID, but different meta (eg: dye - * returns 16 items) - */ - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - for (int aMeta : mReverseEntityMap.values()) { - aList.add(ItemUtils.simpleMetaStack(aItem, aMeta, 1)); - } - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack par1ItemStack, int parColorType) { - int aID = par1ItemStack.getItemDamage(); - return (parColorType == 0) ? mColourBaseMap.get(aID) : mColourSpotsMap.get(aID); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - // Doing this override means that there is no localization for language - // unless you specifically check for localization here and convert - public String getItemStackDisplayName(ItemStack par1ItemStack) { - return "Spawn " + mEntityNameMap.get(par1ItemStack.getItemDamage()); - } - - - @Override - public void registerIcons(final IIconRegister u) { - mIconMap.put(0, u.registerIcon(CORE.MODID + ":" + "spawn_egg")); - mIconMap.put(1, u.registerIcon(CORE.MODID + ":" + "spawn_egg_overlay")); - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int renderPass) { - return mIconMap.get(renderPass); - } - - @Override - public IIcon getIconFromDamage(int damage) { - return getIconFromDamageForRenderPass(0, 0); - } - - @Override - public IIcon getIcon(ItemStack aStack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - return getIconFromDamageForRenderPass(0, renderPass); - } - - @Override - public IIcon getIcon(ItemStack aStack, int renderPass) { - return getIconFromDamageForRenderPass(0, renderPass); - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return super.getUnlocalizedName() + "." + stack.getItemDamage(); - } - - public static void setEntityToSpawnName(int aMetaID, String parEntityToSpawnName) { - mEntityNameMap.put(aMetaID, parEntityToSpawnName); - mEntityFullNameMap.put(aMetaID, CORE.MODID + "." + parEntityToSpawnName); - } -} diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java deleted file mode 100644 index 57cf8986fa..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.item.general.throwables; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion; -import gtPlusPlus.core.item.base.CoreItem; - -public class ItemHydrofluoricAcidPotion extends CoreItem { - - public ItemHydrofluoricAcidPotion(String unlocalizedName, String displayName, String description) { - super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, new String[] {description}, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); - } - - @Override - public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { - if (!player.capabilities.isCreativeMode) { - --item.stackSize; - } - world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) { - world.spawnEntityInWorld(new EntityHydrofluoricAcidPotion(world, player)); - } - return item; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java deleted file mode 100644 index 27b35e48d1..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.item.general.throwables; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; -import gtPlusPlus.core.item.base.CoreItem; - -public class ItemSulfuricAcidPotion extends CoreItem { - - public ItemSulfuricAcidPotion(String unlocalizedName, String displayName, String description) { - super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, new String[] {description}, EnumRarity.common, EnumChatFormatting.GRAY, false, null); - } - - @Override - public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { - if (!player.capabilities.isCreativeMode) { - --item.stackSize; - } - world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) { - world.spawnEntityInWorld(new EntitySulfuricAcidPotion(world, player)); - } - return item; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java deleted file mode 100644 index e8f76ce64c..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java +++ /dev/null @@ -1,124 +0,0 @@ -package gtPlusPlus.core.item.general.throwables; - -import java.util.List; - -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class ItemThrowableBomb extends CoreItem { - - private static AutoMap mLighters = new AutoMap(); - public static IIcon[] icons = new IIcon[10]; - - public ItemThrowableBomb() { - super("gtpp.throwable.bomb", "Bomb", AddToCreativeTab.tabMisc, 16, 0, new String[] {"Just like Bomberman", "Have a fire source in inventory to prime"}, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); - this.setHasSubtypes(true); - } - - @Override - public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { - - if (mLighters.isEmpty()) { - mLighters.put(ItemUtils.getSimpleStack(Items.flint_and_steel)); - mLighters.put(ItemList.Tool_Lighter_Invar_Full.get(1)); - mLighters.put(ItemList.Tool_Lighter_Invar_Used.get(1)); - mLighters.put(ItemList.Tool_Lighter_Platinum_Full.get(1)); - mLighters.put(ItemList.Tool_Lighter_Platinum_Used.get(1)); - mLighters.put(ItemUtils.getSimpleStack(ModItems.itemBasicFireMaker)); - } - - //Unlit - if (item.getItemDamage() == 0) { - boolean hasLighter = false; - for (ItemStack aPlaySlot : player.inventory.mainInventory) { - if (aPlaySlot != null) { - for (ItemStack aLighter : mLighters) { - if (GT_Utility.areStacksEqual(aPlaySlot, aLighter) || (aPlaySlot.getItem() instanceof MetaGeneratedGregtechTools && aPlaySlot.getItemDamage() == MetaGeneratedGregtechTools.ELECTRIC_LIGHTER)) { - hasLighter = true; - break; - } - } - } - } - if (hasLighter) { - item.setItemDamage(1); - } - } - //Lit - else if (item.getItemDamage() == 1) { - if (!player.capabilities.isCreativeMode) { - --item.stackSize; - } - world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); - if (!world.isRemote) { - world.spawnEntityInWorld(new EntityThrowableBomb(world, player)); - } - /*if (item.stackSize <= 0) { - item = null; - }*/ - } - return item; - } - - - - @Override - public void registerIcons(IIconRegister reg) { - icons[0] = reg.registerIcon(CORE.MODID + ":" + "bomb"); - icons[1] = reg.registerIcon(CORE.MODID + ":" + "bomb_lit"); - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[meta]; - } - - @SuppressWarnings({ "unchecked" }) - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 2; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { - String aLitStatus = "unlit"; - if (stack.getItemDamage() == 0) { - aLitStatus = EnumChatFormatting.BLUE+"Unlit"; - } - else if (stack.getItemDamage() == 1) { - aLitStatus = EnumChatFormatting.RED+"Lit"; - } - list.add(EnumChatFormatting.GOLD+"Fuse Status: "+aLitStatus); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public String getItemStackDisplayName(ItemStack p_77653_1_) { - // TODO Auto-generated method stub - return super.getItemStackDisplayName(p_77653_1_); - } - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/init/ItemsFoods.java b/src/Java/gtPlusPlus/core/item/init/ItemsFoods.java deleted file mode 100644 index e5c403c503..0000000000 --- a/src/Java/gtPlusPlus/core/item/init/ItemsFoods.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.core.item.init; - -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.base.foods.BaseItemFood; -import gtPlusPlus.core.item.base.foods.BaseItemHotFood; -import gtPlusPlus.core.item.food.BaseItemMetaFood; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraft.entity.monster.EntityBlaze; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.passive.EntityWolf; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -public class ItemsFoods { - - public static void load(){ - run(); - } - - private static void run(){ - - //Raisin Bread - ModItems.itemIngotRaisinBread = new BaseItemFood("itemIngotRaisinBread", "Raisin Bread", 3, 1.5f, false, new PotionEffect(Potion.weakness.id, 40, 1)).setAlwaysEdible(); - GT_OreDictUnificator.registerOre("foodRaisinBread", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemIngotRaisinBread", 1)); - //Hot Raisin Bread - ModItems.itemHotIngotRaisinBread = new BaseItemHotFood("itemHotIngotRaisinBread", 1, 0.5f, "Raisin Bread", 120, ModItems.itemIngotRaisinBread); - GT_OreDictUnificator.registerOre("foodHotRaisinBread", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemHotIngotRaisinBread", 1)); - - //Raisin Bread - ModItems.itemFoodRaisinToast = new BaseItemFood("itemFoodRaisinToast", "Raisin Toast", 1, 0.5f, false).setAlwaysEdible(); - GT_OreDictUnificator.registerOre("foodRaisinToast", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemFoodRaisinToast", 1)); - //Hot Raisin Bread - ModItems.itemHotFoodRaisinToast = new BaseItemHotFood("itemHotFoodRaisinToast", 1, 0.5f, "Raisin Toast", 20, ModItems.itemFoodRaisinToast); - GT_OreDictUnificator.registerOre("foodHotRaisinToast", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemHotFoodRaisinToast", 1)); - - //Raisin Bread - ModItems.itemFoodCurriedSausages = new BaseItemFood("itemFoodCurriedSausages", "Curried Sausages", 5, 2f, false); - GT_OreDictUnificator.registerOre("foodCurriedSausages", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemFoodCurriedSausages", 1)); - //Hot Raisin Bread - ModItems.itemHotFoodCurriedSausages = new BaseItemHotFood("itemHotFoodCurriedSausages", 1, 0.5f, "Curried Sausages", 240, ModItems.itemFoodCurriedSausages); - GT_OreDictUnificator.registerOre("foodHotCurriedSausages", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemHotFoodCurriedSausages", 1)); - - ModItems.itemMetaFood = new BaseItemMetaFood(); - BaseItemMetaFood.registerFoodsToOreDict(); - addCookingRecipes(); - addFoodDropsToMobs(); - - } - - private static ItemStack getMetaFoodStack(int aID) { - return ItemUtils.simpleMetaStack(ModItems.itemMetaFood, aID, 1); - } - - private static void addCookingRecipes() { - - RecipeUtils.addSmeltingRecipe(getMetaFoodStack(0), getMetaFoodStack(1), 0.4F); - RecipeUtils.addSmeltingRecipe(getMetaFoodStack(2), getMetaFoodStack(3), 0.35F); - RecipeUtils.addSmeltingRecipe(getMetaFoodStack(4), getMetaFoodStack(5), 0.35F); - RecipeUtils.addSmeltingRecipe(getMetaFoodStack(6), getMetaFoodStack(7), 0.35F); - - } - - private static void addFoodDropsToMobs() { - - EntityUtils.registerDropsForMob(EntityVillager.class, getMetaFoodStack(0), 2, 1500); - EntityUtils.registerDropsForMob(EntityHorse.class, getMetaFoodStack(2), 4, 4000); - EntityUtils.registerDropsForMob(EntityWolf.class, getMetaFoodStack(4), 2, 4000); - EntityUtils.registerDropsForMob(EntityOcelot.class, getMetaFoodStack(6), 2, 4000); - EntityUtils.registerDropsForMob(EntityBlaze.class, getMetaFoodStack(8), 1, 500); - - } - -} diff --git a/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java b/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java deleted file mode 100644 index 9f87408b56..0000000000 --- a/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java +++ /dev/null @@ -1,74 +0,0 @@ -package gtPlusPlus.core.item.init; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class ItemsMultiTools { - - public static void load(){ - run(); - } - - private static void run(){ - - //Load Multitools - final boolean gtStyleTools = LoadedMods.Gregtech; - if (CORE.ConfigSwitches.enableMultiSizeTools){ - - //GT Materials - final Materials[] rm = Materials.values(); - for (final Materials m : rm){ - toolFactoryGT(m, gtStyleTools); - } - - //GT++ Materials - toolFactory(ALLOY.HASTELLOY_C276); - toolFactory(ALLOY.HASTELLOY_N); - toolFactory(ALLOY.HASTELLOY_W); - toolFactory(ALLOY.HASTELLOY_X); - toolFactory(ALLOY.INCOLOY_020); - toolFactory(ALLOY.INCOLOY_DS); - toolFactory(ALLOY.INCOLOY_MA956); - toolFactory(ALLOY.INCONEL_625); - toolFactory(ALLOY.INCONEL_690); - toolFactory(ALLOY.INCONEL_792); - toolFactory(ALLOY.LEAGRISIUM); - toolFactory(ALLOY.TANTALLOY_60); - toolFactory(ALLOY.TANTALLOY_61); - toolFactory(ALLOY.STABALLOY); - toolFactory(ALLOY.QUANTUM); - //toolFactory(ALLOY.BEDROCKIUM); - toolFactory(ALLOY.POTIN); - toolFactory(ALLOY.TUMBAGA); - toolFactory(ALLOY.TALONITE); - toolFactory(ALLOY.STELLITE); - toolFactory(ALLOY.TUNGSTEN_CARBIDE); - toolFactory(ALLOY.TANTALUM_CARBIDE); - - - } - - } - - - private static boolean toolFactoryGT(final Materials m, final boolean b){ - ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(b, m); - ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(b, m); - return true; - } - - private static boolean toolFactory(final Material m){ - Logger.WARNING("Generating Multi-Tools for "+m.getLocalizedName()); - ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(m); - ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(m); - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java b/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java deleted file mode 100644 index d42ac85012..0000000000 --- a/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java +++ /dev/null @@ -1,97 +0,0 @@ -package gtPlusPlus.core.item.materials; - -import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.handler.Recipes.DecayableRecipe; -import gtPlusPlus.core.item.base.BaseItemTickable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class DustDecayable extends BaseItemTickable { - - private final Item turnsIntoItem; - private final int radLevel; - - public DustDecayable(String unlocal, int colour, int maxTicks, String[] desc1, Item turnsInto, int radLevel) { - super(true, true, unlocal, colour, (maxTicks/1), desc1); - this.turnsIntoItem = turnsInto; - this.radLevel = radLevel; - GT_OreDictUnificator.registerOre(unlocal, ItemUtils.getSimpleStack(this)); - new DecayableRecipe(maxTicks, getSimpleStack(this), getSimpleStack(turnsInto)); - } - - @Override - public void registerIcons(IIconRegister reg) { - String gt = "gregtech" + ":" + "materialicons/"+"NUCLEAR"+"/" + "dust"; - this.mIcon[0] = reg.registerIcon(gt); - String gt2 = "gregtech" + ":" + "materialicons/"+"NUCLEAR"+"/" + "dust" + "_OVERLAY"; - this.mIcon[1] = reg.registerIcon(gt2); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - super.addInformation(stack, player, list, bool); - if (this.radLevel > 0) { - list.add(CORE.GT_Tooltip_Radioactive); - } - } - - @Override - public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (world == null || iStack == null) { - return; - } - if (world.isRemote) { - return; - } - - if (entityHolding instanceof EntityPlayer){ - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.radLevel, world, entityHolding); - } - } - boolean a1, a2; - - a1 = this.isTicking(world, iStack); - a2 = tickItemTag(world, iStack); - - if (!a1 && !a2) { - if (entityHolding instanceof EntityPlayer){ - ItemStack replacement = ItemUtils.getSimpleStack(getDecayResult()); - //Logger.INFO("Replacing "+iStack.getDisplayName()+" with "+replacement.getDisplayName()+"."); - final ItemStack tempTransform = replacement; - if (iStack.stackSize > 1){ - int u = iStack.stackSize; - tempTransform.stackSize = u; - ((EntityPlayer) entityHolding).inventory.addItemStackToInventory((tempTransform)); - for (int l=0;l mTotalIndex = new HashSet(); - - Set mFirstSearch = new HashSet(); - Set mSearch_A = new HashSet(); - - Set mSearch_B = new HashSet(); - Set mSearch_C = new HashSet(); - Set mSearch_D = new HashSet(); - - mFirstSearch.add(mStartPoint); - mTotalIndex.add(mStartPoint); - - - - - for (BlockPos G : mSearch_D) { - if (!world.isAirBlock(G.xPos, G.yPos, G.zPos)) { - world.setBlock(G.xPos, G.yPos, G.zPos, Blocks.diamond_ore); - } - } - - - - return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ); - } - - public Set getValidNeighboursForSet(Set set){ - Set results = set; - for (BlockPos F : set) { - results.addAll(F.getValidNeighboursAndSelf()); - } - return results; - } - - public Set getExtraNeighboursForSet(Set set){ - Set results = set; - for (BlockPos F : set) { - results.addAll(F.getValidNeighboursAndSelf()); - } - return results; - } - - @Override - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { - // TODO Auto-generated method stub - return super.onItemRightClick(p_77659_1_, p_77659_2_, p_77659_3_); - } - - - - - - - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/DebugScanner.java b/src/Java/gtPlusPlus/core/item/tool/misc/DebugScanner.java deleted file mode 100644 index 0170df0dc7..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/DebugScanner.java +++ /dev/null @@ -1,104 +0,0 @@ -package gtPlusPlus.core.item.tool.misc; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class DebugScanner extends CoreItem { - - public DebugScanner() { - super("gtpp.debug.scanner", AddToCreativeTab.tabTools, 1, 0, - new String[] { - "Used to obtain information from GT/GT++ content", - "Right Click to use", - }, - EnumRarity.epic); - setTextureName(CORE.MODID + ":itemStickyRubber"); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int p_77648_4_, - int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { - // TODO Auto-generated method stub - return super.onItemUse(aStack, aPlayer, aWorld, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_8_, - p_77648_9_, p_77648_10_); - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { - // TODO Auto-generated method stub - return super.onItemRightClick(p_77659_1_, p_77659_2_, p_77659_3_); - } - - @Override - public float getDigSpeed(ItemStack itemstack, Block block, int metadata) { - return 0f; - } - - @Override - public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { - if (entity != null && player != null) { - PlayerUtils.messagePlayer(player, "Entity ID: "+entity.getEntityId()); - PlayerUtils.messagePlayer(player, "UUID: "+entity.getUniqueID()); - PlayerUtils.messagePlayer(player, "Invulnerable? "+entity.isEntityInvulnerable()); - PlayerUtils.messagePlayer(player, "Invisible? "+entity.isInvisible()); - PlayerUtils.messagePlayer(player, "Age: "+entity.ticksExisted); - - if (entity instanceof EntityLivingBase) { - EntityLivingBase g = (EntityLivingBase) entity; - PlayerUtils.messagePlayer(player, "Health: "+g.getHealth()+"/"+g.getMaxHealth()); - PlayerUtils.messagePlayer(player, "On ground? "+g.onGround); - PlayerUtils.messagePlayer(player, "Child? "+g.isChild()); - } - if (entity instanceof EntityLiving) { - EntityLiving g = (EntityLiving) entity; - PlayerUtils.messagePlayer(player, "Can Loot? "+g.canPickUpLoot()); - - } - if (entity instanceof EntityPlayer) { - EntityPlayer y = (EntityPlayer) entity; - PlayerUtils.messagePlayer(player, "Experience: "+y.experience); - PlayerUtils.messagePlayer(player, "Name: "+y.getCommandSenderName()); - } - - } - return true; - } - - @Override - public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { - return false; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return true; - } - - @Override - public int getHarvestLevel(ItemStack stack, String toolClass) { - return 0; - } - - - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java b/src/Java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java deleted file mode 100644 index 47856b44c0..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java +++ /dev/null @@ -1,74 +0,0 @@ -package gtPlusPlus.core.item.tool.misc; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class FakeGregtechTool extends CoreItem{ - - public final int componentColour; - public Object extraData; - - protected IIcon base[] = new IIcon[6]; - protected IIcon overlay[] = new IIcon[6]; - - public FakeGregtechTool() { - super("GregeriousT's Display Tool", AddToCreativeTab.tabTools, 1); - short[] tempCol = Materials.TungstenSteel.getRGBA(); - this.componentColour = Utils.rgbtoHexValue(tempCol[0], tempCol[1], tempCol[2]); - } - - @Override - public void registerIcons(final IIconRegister i) { - //ScrewDriver - this.base[0] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadScrewdriver"); - this.overlay[0] = i.registerIcon("gregtech" + ":" + "iconsets/" + "HANDLE_SCREWDRIVER"); - //Soldering iron - this.base[1] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadSoldering"); - this.overlay[1] = i.registerIcon("gregtech" + ":" + "iconsets/" + "HANDLE_SOLDERING"); - //Mallet - this.base[2] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "handleMallet"); - this.overlay[2] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadMallet"); - //Hammer - this.base[3] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "stick"); - this.overlay[3] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadHammer"); - //Wrench - this.base[4] = i.registerIcon("gregtech" + ":" + "iconsets/" + "WRENCH"); - this.overlay[4] = i.registerIcon("gregtech" + ":" + "iconsets/" + "WRENCH_OVERLAY"); - //Crowbar - this.base[5] = i.registerIcon("gregtech" + ":" + "iconsets/" + "CROWBAR"); - this.overlay[5] = i.registerIcon("gregtech" + ":" + "iconsets/" + "CROWBAR_OVERLAY"); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int renderPass) { - if (renderPass == 1){ - return Utils.rgbtoHexValue(230, 230, 230); - } - return this.componentColour; - } - - @Override - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 6; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java b/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java deleted file mode 100644 index e43dc8546b..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java +++ /dev/null @@ -1,1302 +0,0 @@ -package gtPlusPlus.core.item.tool.misc; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.ArrayList; -import java.util.BitSet; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.SubTag; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.IItemBehaviour; -import gregtech.api.interfaces.IItemContainer; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import ic2.api.item.IElectricItemManager; -import ic2.api.item.ISpecialElectricItem; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidContainerItem; -import net.minecraftforge.fluids.IFluidHandler; -import net.minecraftforge.fluids.IFluidTank; - -public class GregtechPump extends Item implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { - - /** - * Right Click Functions - */ - - @Override - public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int a4, - float p_77648_8_, float p_77648_9_, float p_77648_10_) { - if (aStack == null || aPlayer == null || aWorld == null || aWorld.isRemote) { - return false; - } - if (!aWorld.isRemote && tryDrainTile(aStack, aWorld, aPlayer, aX, aY, aZ)) { - return true; - } else { - //return super.onItemUse(aStack, aPlayer, aWorld, aX, aY, aZ, a4, p_77648_8_, p_77648_9_, p_77648_10_); - return false; - } - } - - @Override - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { - return p_77659_1_; - } - - /** - * GT Code - */ - - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - private final HashMap>> mItemBehaviors = new HashMap<>(); - public final short mOffset, mItemAmount; - public final BitSet mEnabledItems; - public final BitSet mVisibleItems; - /** The unlocalized name of this item. */ - private String unlocalizedName; - - private final HashMap mIconMap = new LinkedHashMap(); - private final HashMap rarity = new LinkedHashMap(); - private final HashMap descColour = new LinkedHashMap(); - private final HashMap itemName = new LinkedHashMap(); - private final HashMap itemDescription = new LinkedHashMap(); - private final HashMap hasEffect = new LinkedHashMap(); - - public final HashMap mElectricStats = new LinkedHashMap(); - public final HashMap mBurnValues = new LinkedHashMap(); - - public void registerPumpType(final int aID, final String aPumpName, final int aEuMax, final int aTier) { - ModItems.toolGregtechPump.registerItem(aID, // ID - aPumpName, // Name - aEuMax, // Eu Storage - (short) aTier, // Tier - "Can be used to remove fluids from GT machine input & output slots.", // Tooltip - aTier <= 0 ? EnumRarity.common : aTier == 1 ? EnumRarity.uncommon : aTier == 2 ? EnumRarity.rare : aTier == 3 ? EnumRarity.epic : EnumRarity.common, // Rarity - EnumChatFormatting.GRAY, // Desc colour - false // Effect? - ); - } - - public GregtechPump() { - this("MU-metatool.01", AddToCreativeTab.tabTools, (short) 1000, (short) 31766); - } - - public GregtechPump(final String unlocalizedName, final CreativeTabs creativeTab, final short aOffset, - final short aItemAmount) { - this.mEnabledItems = new BitSet(aItemAmount); - this.mVisibleItems = new BitSet(aItemAmount); - this.mOffset = (short) Math.min(32766, aOffset); - this.mItemAmount = (short) Math.min(aItemAmount, 32766 - this.mOffset); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(creativeTab); - this.setMaxStackSize(1); - if (GameRegistry.findItem(CORE.MODID, unlocalizedName) == null) { - GameRegistry.registerItem(this, unlocalizedName); - } - - } - - public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, - final String description) { - this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, - EnumChatFormatting.GRAY, false); - } - - public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, - final String description, final int burnTime) { - this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, - EnumChatFormatting.GRAY, false); - this.setBurnValue(id, burnTime); - } - - public void registerItem(final int id, final String localizedName, final long euStorage, final short tier, - final String description, final EnumRarity regRarity, final EnumChatFormatting colour, - final boolean Effect) { - this.addItem(id, localizedName, EnumChatFormatting.YELLOW + "Electric", new Object[] {}); - if (euStorage > 0 && tier > 0) - this.setElectricStats(this.mOffset + id, euStorage, GT_Values.V[tier], tier, -3L, true); - this.rarity.put(id, regRarity); - this.itemName.put(id, localizedName); - this.itemDescription.put(id, description); - this.descColour.put(id, colour); - this.hasEffect.put(id, Effect); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack) { - int h = getCorrectMetaForItemstack(par1ItemStack); - if (this.rarity.get(h) != null) { - return this.rarity.get(h); - } - return EnumRarity.common; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack) { - int h = getCorrectMetaForItemstack(par1ItemStack); - if (this.hasEffect.get(h) != null) { - return this.hasEffect.get(h); - } - return false; - } - - @SuppressWarnings({ "unchecked" }) - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, final boolean aF3_H) { - // aList.add("Meta: "+(aStack.getItemDamage()-mOffset)); - - int aOffsetMeta = getCorrectMetaForItemstack(aStack); - - if ((this.descColour.get(aOffsetMeta) != null) - && (this.itemDescription.get(aOffsetMeta) != null)) { - aList.add(this.descColour.get(aOffsetMeta) - + this.itemDescription.get(aOffsetMeta)); - } - - - if (aOffsetMeta <= 3) { - FluidStack f = getFluid(aStack); - aList.add("Cannot drain any other standard fluid container block"); - aList.add("Cannot be emptied via RMB, use inside a tank with GUI"); - aList.add(EnumChatFormatting.DARK_GRAY+"This is technically just a fancy fluid cell"); - aList.add(EnumChatFormatting.BLUE + (f != null ? f.getLocalizedName() : "No Fluids Contained")); - aList.add(EnumChatFormatting.BLUE + (f != null ? ""+f.amount : ""+0) + "L" + " / " + getCapacity(aStack) + "L"); - } - - final Long[] tStats = this.getElectricStats(aStack); - if (tStats != null) { - if (tStats[3] > 0) { - aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " - + (tStats[2] >= 0 ? tStats[2] : 0) + EnumChatFormatting.GRAY); - } else { - final long tCharge = this.getRealCharge(aStack); - if ((tStats[3] == -2) && (tCharge <= 0)) { - aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." - + EnumChatFormatting.GRAY); - } else { - aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " - + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " - + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] - + EnumChatFormatting.GRAY); - } - } - } - - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final IItemBehaviour tBehavior : tList) { - aList = tBehavior.getAdditionalToolTips(this, aList, aStack); - } - } - } - - @Override - public final Item getChargedItem(final ItemStack itemStack) { - return this; - } - - @Override - public final Item getEmptyItem(final ItemStack itemStack) { - return this; - } - - @Override - public final double getMaxCharge(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - return Math.abs(tStats[0]); - } - - @Override - public final double getTransferLimit(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - return Math.max(tStats[1], tStats[3]); - } - - @Override - public final int getTier(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - return (int) (tStats == null ? Integer.MAX_VALUE : tStats[2]); - } - - @Override - public final double charge(final ItemStack aStack, final double aCharge, final int aTier, - final boolean aIgnoreTransferLimit, final boolean aSimulate) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[2] > aTier) - || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) - || (aStack.stackSize != 1)) { - return 0; - } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE - ? Long.MAX_VALUE - : Math.min(Math.abs(tStats[0]), - tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); - if (!aSimulate) { - this.setCharge(aStack, tNewCharge); - } - return tNewCharge - tChargeBefore; - } - - @Override - public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, - final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[2] > aTier)) { - return 0; - } - if (aBatteryAlike && !this.canProvideEnergy(aStack)) { - return 0; - } - if (tStats[3] > 0) { - if ((aCharge < tStats[3]) || (aStack.stackSize < 1)) { - return 0; - } - if (!aSimulate) { - aStack.stackSize--; - } - return tStats[3]; - } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math.max(0, - tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); - if (!aSimulate) { - this.setCharge(aStack, tNewCharge); - } - return tChargeBefore - tNewCharge; - } - - @Override - public final double getCharge(final ItemStack aStack) { - return this.getRealCharge(aStack); - } - - @Override - public final boolean canUse(final ItemStack aStack, final double aAmount) { - return this.getRealCharge(aStack) >= aAmount; - } - - @Override - public final boolean use(final ItemStack aStack, final double aAmount, final EntityLivingBase aPlayer) { - this.chargeFromArmor(aStack, aPlayer); - if ((aPlayer instanceof EntityPlayer) && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) { - return true; - } - final double tTransfer = this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); - if (tTransfer == aAmount) { - this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); - this.chargeFromArmor(aStack, aPlayer); - return true; - } - this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); - this.chargeFromArmor(aStack, aPlayer); - return false; - } - - @Override - public final boolean canProvideEnergy(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return false; - } - return (tStats[3] > 0) || ((aStack.stackSize == 1) && ((tStats[3] == -2) || (tStats[3] == -3))); - } - - @Override - public final void chargeFromArmor(final ItemStack aStack, final EntityLivingBase aPlayer) { - if ((aPlayer == null) || aPlayer.worldObj.isRemote) { - return; - } - for (int i = 1; i < 5; i++) { - final ItemStack tArmor = aPlayer.getEquipmentInSlot(i); - if (GT_ModHandler.isElectricItem(tArmor)) { - final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); - if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { - final double tCharge = ElectricItem.manager.discharge(tArmor, - this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), - Integer.MAX_VALUE, true, true, false); - if (tCharge > 0) { - this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); - if (aPlayer instanceof EntityPlayer) { - final Container tContainer = ((EntityPlayer) aPlayer).openContainer; - if (tContainer != null) { - tContainer.detectAndSendChanges(); - } - } - } - } - } - } - } - - public final long getRealCharge(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - if (tStats[3] > 0) { - return (int) (long) tStats[3]; - } - final NBTTagCompound tNBT = aStack.getTagCompound(); - return tNBT == null ? 0 : tNBT.getLong("GT.ItemCharge"); - } - - public final boolean setCharge(final ItemStack aStack, long aCharge) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[3] > 0)) { - return false; - } - NBTTagCompound tNBT = aStack.getTagCompound(); - if (tNBT == null) { - tNBT = new NBTTagCompound(); - } - tNBT.removeTag("GT.ItemCharge"); - aCharge = Math.min(tStats[0] < 0 ? Math.abs(tStats[0] / 2) : aCharge, Math.abs(tStats[0])); - if (aCharge > 0) { - aStack.setItemDamage(this.getChargedMetaData(aStack)); - tNBT.setLong("GT.ItemCharge", aCharge); - } else { - aStack.setItemDamage(this.getEmptyMetaData(aStack)); - } - if (tNBT.hasNoTags()) { - aStack.setTagCompound(null); - } else { - aStack.setTagCompound(tNBT); - } - this.isItemStackUsable(aStack); - return true; - } - - public short getChargedMetaData(final ItemStack aStack) { - return (short) aStack.getItemDamage(); - } - - public short getEmptyMetaData(final ItemStack aStack) { - return (short) aStack.getItemDamage(); - } - - public boolean isItemStackUsable(final ItemStack aStack) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final IItemBehaviour tBehavior : tList) { - if (!tBehavior.isItemStackUsable(this, aStack)) { - return false; - } - } - } - return true; - } - - @Override - public final String getToolTip(final ItemStack aStack) { - return null; - } // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up - // at this Point - - @Override - public final IElectricItemManager getManager(final ItemStack aStack) { - return this; - } // We are our own Manager - - /** - * Sets the Furnace Burn Value for the Item. - * - * @param aMetaValue - * the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aValue - * 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU) - * @return the Item itself for convenience in constructing. - */ - public final GregtechPump setBurnValue(final int aMetaValue, final int aValue) { - if ((aMetaValue < 0) || (aValue < 0)) { - return this; - } - if (aValue == 0) { - this.mBurnValues.remove((short) aMetaValue); - } else { - this.mBurnValues.put((short) aMetaValue, aValue > Short.MAX_VALUE ? Short.MAX_VALUE : (short) aValue); - } - return this; - } - - /** - * @param aMetaValue - * the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aMaxCharge - * Maximum Charge. (if this is == 0 it will remove the Electric - * Behavior) - * @param aTransferLimit - * Transfer Limit. - * @param aTier - * The electric Tier. - * @param aSpecialData - * If this Item has a Fixed Charge, like a SingleUse Battery (if > - * 0). Use -1 if you want to make this Battery chargeable (the use - * and canUse Functions will still discharge if you just use this) - * Use -2 if you want to make this Battery dischargeable. Use -3 if - * you want to make this Battery charge/discharge-able. - * @return the Item itself for convenience in constructing. - */ - public final GregtechPump setElectricStats(final int aMetaValue, final long aMaxCharge, final long aTransferLimit, - final long aTier, final long aSpecialData, final boolean aUseAnimations) { - if (aMetaValue < 0) { - return this; - } - if (aMaxCharge == 0) { - this.mElectricStats.remove((short) aMetaValue); - } else { - this.mElectricStats.put((short) aMetaValue, - new Long[] { aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData }); - } - return this; - } - - @SuppressWarnings({ "unchecked" }) - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { - for (int i = 0, j = this.mEnabledItems.length(); i < j; i++) { - if (this.mVisibleItems.get(i) || (GT_Values.D1 && this.mEnabledItems.get(i))) { - final Long[] tStats = this.mElectricStats.get((short) (this.mOffset + i)); - if ((tStats != null) && (tStats[3] < 0)) { - final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); - this.setCharge(tStack, Math.abs(tStats[0])); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - if ((tStats == null) || (tStats[3] != -2)) { - final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public final void registerIcons(final IIconRegister aIconRegister) { - for (short i = 0, j = (short) this.mEnabledItems.length(); i < j; i++) { - if (this.mEnabledItems.get(i)) { - mIconMap.put((int) i, aIconRegister.registerIcon(CORE.MODID + ":" + (this.getUnlocalizedName() + "/" + i))); - } - } - } - - @Override - public final IIcon getIconFromDamage(final int aMetaData) { - if (aMetaData < 0) { - return null; - } - if (aMetaData < this.mOffset) { - return mIconMap.get(0); - } - else { - int newMeta = aMetaData - this.mOffset; - newMeta = (Math.max(0, Math.min(3, newMeta))); - return mIconMap.get(newMeta); - } - } - - /** - * Sets the unlocalized name of this item to the string passed as the parameter" - */ - @Override - public Item setUnlocalizedName(final String p_77655_1_) { - this.unlocalizedName = p_77655_1_; - super.setUnlocalizedName(p_77655_1_); - return this; - } - - /** - * Returns the unlocalized name of this item. - */ - @Override - public String getUnlocalizedName() { - return this.unlocalizedName; - } - - public final Long[] getElectricStats(final ItemStack aStack) { - return this.mElectricStats.get((short) aStack.getItemDamage()); - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { - return false; - } - - @Override - public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { - return false; - } - - /** - * Adds a special Item Behaviour to the Item. - *

- * Note: the boolean Behaviours sometimes won't be executed if another boolean - * Behaviour returned true before. - * - * @param aMetaValue - * the Meta Value of the Item you want to add it to. [0 - 32765] - * @param aBehavior - * the Click Behavior you want to add. - * @return the Item itself for convenience in constructing. - */ - public final GregtechPump addItemBehavior(final int aMetaValue, final IItemBehaviour aBehavior) { - if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { - return this; - } - ArrayList> tList = this.mItemBehaviors.get((short) aMetaValue); - if (tList == null) { - tList = new ArrayList<>(1); - this.mItemBehaviors.put((short) aMetaValue, tList); - } - tList.add(aBehavior); - return this; - } - - /** - * This adds a Custom Item to the ending Range. - * - * @param aID - * The Id of the assigned Item [0 - mItemAmount] (The MetaData gets - * auto-shifted by +mOffset) - * @param aEnglish - * The Default Localized Name of the created Item - * @param aToolTip - * The Default ToolTip of the created Item, you can also insert null - * for having no ToolTip - * @param aFoodBehavior - * The Food Value of this Item. Can be null aswell. Just a - * convenience thing. - * @param aRandomData - * The OreDict Names you want to give the Item. Also used for TC - * Aspects and some other things. - * @return An ItemStack containing the newly created Item. - */ - @SuppressWarnings("unchecked") - public final ItemStack addItem(final int aID, final String aEnglish, String aToolTip, final Object... aRandomData) { - if (aToolTip == null) { - aToolTip = ""; - } - if ((aID >= 0) && (aID < this.mItemAmount)) { - final ItemStack rStack = new ItemStack(this, 1, this.mOffset + aID); - this.mEnabledItems.set(aID); - this.mVisibleItems.set(aID); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip); - final List tAspects = new ArrayList<>(); - // Important Stuff to do first - for (final Object tRandomData : aRandomData) { - if (tRandomData instanceof SubTag) { - if (tRandomData == SubTag.INVISIBLE) { - this.mVisibleItems.set(aID, false); - continue; - } - if (tRandomData == SubTag.NO_UNIFICATION) { - GT_OreDictUnificator.addToBlacklist(rStack); - continue; - } - } - } - // now check for the rest - for (final Object tRandomData : aRandomData) { - if (tRandomData != null) { - boolean tUseOreDict = true; - if (tRandomData instanceof IItemBehaviour) { - this.addItemBehavior(this.mOffset + aID, (IItemBehaviour) tRandomData); - tUseOreDict = false; - } - if (tRandomData instanceof IItemContainer) { - ((IItemContainer) tRandomData).set(rStack); - tUseOreDict = false; - } - if (tRandomData instanceof SubTag) { - continue; - } - if (tRandomData instanceof TC_AspectStack) { - ((TC_AspectStack) tRandomData).addToAspectList(tAspects); - continue; - } - if (tRandomData instanceof ItemData) { - if (GT_Utility.isStringValid(tRandomData)) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - } else { - GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); - } - continue; - } - if (tUseOreDict) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - continue; - } - } - } - if (GregTech_API.sThaumcraftCompat != null) { - GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); - } - return rStack; - } - return null; - } - - @Override - public String getItemStackDisplayName(final ItemStack aStack) { - int keyValue = (getCorrectMetaForItemstack(aStack)); - if (keyValue < 0 || keyValue > 3) { - keyValue = 0; - } - return this.itemName.get(keyValue); - } - - /** - * Fluid Handling - */ - - /* - * IFluidContainer Functions - */ - - public void emptyStoredFluid(ItemStack aStack) { - if (aStack.hasTagCompound()) { - NBTTagCompound t = aStack.getTagCompound(); - if (t.hasKey("mInit")) { - t.removeTag("mInit"); - } - if (t.hasKey("mFluid")) { - t.removeTag("mFluid"); - } - if (t.hasKey("mFluidAmount")) { - t.removeTag("mFluidAmount"); - } - } - } - - public void storeFluid(ItemStack aStack, FluidStack aFluid) { - if (aFluid == null) { - return; - } else { - String fluidname = aFluid.getFluid().getName(); - int amount = aFluid.amount; - if (fluidname != null && fluidname.length() > 0 && amount > 0) { - NBTUtils.setString(aStack, "mFluid", fluidname); - NBTUtils.setInteger(aStack, "mFluidAmount", amount); - } - } - } - - @Override - public FluidStack getFluid(ItemStack container) { - if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { - initNBT(container); - } - if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { - String fluidname; - Integer amount = 0; - fluidname = NBTUtils.getString(container, "mFluid"); - amount = NBTUtils.getInteger(container, "mFluidAmount"); - if (fluidname != null && amount != null && amount > 0) { - return FluidUtils.getFluidStack(fluidname, amount); - } else { - return null; - } - } - return null; - } - - @Override - public int getCapacity(ItemStack container) { - if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { - initNBT(container); - } - if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { - return container.getTagCompound().getInteger("mCapacity"); - } - int aMeta = this.getCorrectMetaForItemstack(container); - int aCapacity = (aMeta == 0 ? 2000 : (aMeta == 1 ? 8000 : (aMeta == 2 ? 32000 : 128000))); - return aCapacity; - } - - public int fill(ItemStack container, FluidStack resource) { - return fill(container, resource, true); - } - - @Override - public int fill(ItemStack container, FluidStack resource, boolean doFill) { - if (!doFill || resource == null) { - return 0; - } - - if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { - initNBT(container); - } - if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { - String aStored; - int aStoredAmount = 0; - int aCapacity = getCapacity(container); - FluidStack aStoredFluid = getFluid(container); - if (aStoredFluid != null) { - aStored = aStoredFluid.getFluid().getName(); - aStoredAmount = aStoredFluid.amount; - if (aStoredAmount == aCapacity) { - return 0; - } - } - // Handle no stored fluid first - if (aStoredFluid == null) { - Logger.INFO("Pump is empty, filling with tank fluids."); - FluidStack toConsume; - int amountToConsume = 0; - if (resource.amount >= aCapacity) { - amountToConsume = aCapacity; - } else { - amountToConsume = resource.amount; - } - toConsume = FluidUtils.getFluidStack(resource, amountToConsume); - if (toConsume != null && amountToConsume > 0) { - storeFluid(container, toConsume); - return amountToConsume; - } - } else { - Logger.INFO("Pump is Partially full, filling with tank fluids."); - if (aStoredFluid.isFluidEqual(resource)) { - Logger.INFO("Found matching fluids."); - int aSpaceLeft = (aCapacity - aStoredAmount); - Logger.INFO( - "Capacity: " + aCapacity + " | Stored: " + aStoredAmount + " | Space left: " + aSpaceLeft); - FluidStack toConsume; - int amountToConsume = 0; - if (resource.amount >= aSpaceLeft) { - amountToConsume = aSpaceLeft; - Logger.INFO("More or equal fluid amount to pump container space."); - } else { - amountToConsume = resource.amount; - Logger.INFO("Less fluid than container space"); - } - Logger.INFO("Amount to consume: " + amountToConsume); - toConsume = FluidUtils.getFluidStack(resource, (aStoredAmount + amountToConsume)); - if (toConsume != null && amountToConsume > 0) { - Logger.INFO("Storing Fluid"); - storeFluid(container, toConsume); - return amountToConsume; - } else { - Logger.INFO("Not storing fluid"); - } - } else { - Logger.INFO("Fluids did not match."); - } - } - } - return 0; - } - - public FluidStack drain(ItemStack container, int drainAmt) { - return drain(container, drainAmt, true); - } - - @Override - public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) { - if (!doDrain || maxDrain == 0) { - return null; - } - if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { - initNBT(container); - } - if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { - - String aStored; - int aStoredAmount = 0; - FluidStack aStoredFluid = getFluid(container); - - if (aStoredFluid != null) { - aStored = aStoredFluid.getFluid().getName(); - aStoredAmount = aStoredFluid.amount; - } - // We cannot drain this if it's empty. - else if (aStoredFluid == null) { - return null; - } - - if (maxDrain >= aStoredAmount) { - emptyStoredFluid(container); - return aStoredFluid; - } else { - // Handle Partial removal - int amountRemaining = (aStoredAmount - maxDrain); - if (amountRemaining == 0) { - emptyStoredFluid(container); - } else { - FluidStack newAmount = FluidUtils.getFluidStack(aStoredFluid, amountRemaining); - FluidStack drained = FluidUtils.getFluidStack(aStoredFluid, maxDrain); - if (newAmount != null && drained != null) { - storeFluid(container, newAmount); - return drained; - } - } - } - } - return null; - } - - /* - * Handle ItemStack NBT - */ - - public void initNBT(ItemStack aStack) { - NBTTagCompound aNewNBT; - if (!aStack.hasTagCompound()) { - aNewNBT = new NBTTagCompound(); - } else { - aNewNBT = aStack.getTagCompound(); - } - - if (!aNewNBT.hasKey("mInit")) { - int aMeta = this.getCorrectMetaForItemstack(aStack); - aNewNBT.setInteger("mMeta", aMeta); - aNewNBT.setBoolean("mInit", true); - aNewNBT.setString("mFluid", "@@@@@"); - aNewNBT.setInteger("mFluidAmount", 0); - int aCapacity = (aMeta == 0 ? 2000 : (aMeta == 1 ? 8000 : (aMeta == 2 ? 32000 : 128000))); - aNewNBT.setInteger("mCapacity", aCapacity); - aStack.setTagCompound(aNewNBT); - } - } - - /** - * Tile Handling - */ - - /* - * Custom Fluid Handling for Tiles and GT Tiles. - */ - - public boolean tryDrainTile(ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ) { - try { - if (aWorld.isRemote || aStack == null) { - return false; - } else { - int aTier = (aStack.getItemDamage() - 1000); - int removal; - if (aTier == 0) { - removal = 0; - } else if (aTier == 1) { - removal = 32; - } else if (aTier == 2) { - removal = 128; - } else if (aTier == 3) { - removal = 512; - } else { - removal = 8; - } - if (!canUse(aStack, removal) && aTier > 0) { - PlayerUtils.messagePlayer(aPlayer, "Not enough power."); - Logger.INFO("No Power"); - return false; - } - - final Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) { - return false; - } - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity == null) { - return false; - } else { - double aCharge = this.getCharge(aStack); - boolean didDrain = false; - if (aTier > 0 && aCharge > 0) { - if (discharge(aStack, removal, aTier, true, true, false) > 0) { - didDrain = true; - } - } else if (aTier == 0) { - didDrain = true; - } else { - didDrain = false; - } - - if (didDrain) { - if ((tTileEntity instanceof IGregTechTileEntity)) { - return this.drainTankGT(tTileEntity, aStack, aWorld, aPlayer, aX, aY, aZ); - } - //Try support Standard Fluid Tanks too (May disable if dupes appear again) - else if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) { - //return this.drainIFluidTank(tTileEntity, aStack, aWorld, aPlayer, aX, aY, aZ); - return false; - } - } - } - } - } catch (Throwable t) { - } - return false; - } - - /* - * Vanilla IFluidTank - */ - - public boolean drainIFluidTank(TileEntity tTileEntity, ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, - int aY, int aZ) { - if (tTileEntity == null) { - Logger.INFO("Invalid Tile, somehow."); - return false; - } - if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) { - if (this.getFluid(aStack) == null || (this.getFluid(aStack) != null && this.getFluid(aStack).amount < this.getCapacity(aStack))) { - Logger.INFO("Trying to find Stored Fluid - Behaviour Class."); - FluidStack aStored = getStoredFluidOfVanillaTank(tTileEntity); - if (aStored != null) { - int mAmountInserted = fill(aStack, aStored); - FluidStack newStackRemainingInTank; - if (mAmountInserted > 0) { - if (mAmountInserted == aStored.amount) { - newStackRemainingInTank = null; - } else { - newStackRemainingInTank = FluidUtils.getFluidStack(aStored, (aStored.amount - mAmountInserted)); - } - boolean b = setStoredFluidOfVanillaTank(tTileEntity, newStackRemainingInTank); - Logger.INFO("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted); - Logger.INFO("Returning " + b + " - drainTankVanilla."); - if (b) { - PlayerUtils.messagePlayer(aPlayer, "Drained "+mAmountInserted+"L of "+aStored.getLocalizedName()+"."); - } - return b; - } - } else { - Logger.INFO("Found no valid Fluidstack - drainTankVanilla."); - } - } - else { - Logger.INFO("Pump is full."); - } - } - Logger.INFO("Could not drain vanilla tank."); - return false; - } - - /* - * GT Tanks - */ - - public boolean drainTankGT(TileEntity tTileEntity, ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, - int aY, int aZ) { - if (tTileEntity == null) { - return false; - } - if ((tTileEntity instanceof IGregTechTileEntity)) { - Logger.INFO("Right Clicking on GT Tile - drainTankGT."); - if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { - Logger.INFO("Returning False - Behaviour Class. Timer < 50"); - return false; - } else if ((!aWorld.isRemote) && (!((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer))) { - Logger.INFO("Returning True - drainTankGT. NotUsable()"); - return true; - } else { - if (this.getFluid(aStack) == null || (this.getFluid(aStack) != null && this.getFluid(aStack).amount < this.getCapacity(aStack))) { - Logger.INFO("Trying to find Stored Fluid - drainTankGT."); - FluidStack aStored = getStoredFluidOfGTMachine((IGregTechTileEntity) tTileEntity); - if (aStored != null) { - int mAmountInserted = fill(aStack, aStored); - FluidStack newStackRemainingInTank; - if (mAmountInserted > 0) { - if (mAmountInserted == aStored.amount) { - newStackRemainingInTank = null; - } else { - newStackRemainingInTank = FluidUtils.getFluidStack(aStored, (aStored.amount - mAmountInserted)); - } - boolean b = setStoredFluidOfGTMachine((IGregTechTileEntity) tTileEntity, newStackRemainingInTank); - Logger.INFO("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted); - Logger.INFO("Returning " + b + " - drainTankGT."); - if (b) { - PlayerUtils.messagePlayer(aPlayer, "Drained "+mAmountInserted+"L of "+aStored.getLocalizedName()+"."); - } - return b; - } - } else { - Logger.INFO("Found no valid Fluidstack - drainTankGT."); - } - } - else { - Logger.INFO("Pump is full."); - } - } - } - Logger.INFO("Could not drain GT tank."); - return false; - } - - /* - * Vanilla Tanks - */ - - public FluidStack getStoredFluidOfVanillaTank(TileEntity aTileEntity) { - if (aTileEntity == null) { - return null; - } else if ((aTileEntity instanceof IFluidTank || aTileEntity instanceof IFluidHandler)) { - if (aTileEntity instanceof IFluidTank) { - return getStoredFluidOfVanillaTank((IFluidTank) aTileEntity); - } else { - return getStoredFluidOfVanillaTank((IFluidHandler) aTileEntity); - } - } else { - return null; - } - } - - public FluidStack getStoredFluidOfVanillaTank(IFluidTank aTileEntity) { - FluidStack f = aTileEntity.getFluid(); - Logger.INFO("Returning Fluid stack from tile. Found: " - + (f != null ? f.getLocalizedName() + " - " + f.amount + "L" : "Nothing")); - return f; - } - - public FluidStack getStoredFluidOfVanillaTank(IFluidHandler aTileEntity) { - if (aTileEntity instanceof IFluidTank) { - return getStoredFluidOfVanillaTank((IFluidTank) aTileEntity); - } - FluidStack f; - AutoMap m = new AutoMap(); - for (int i = 0; i < 6; i++) { - m.put(aTileEntity.getTankInfo(ForgeDirection.getOrientation(i))); - } - if (m.get(0) != null && m.get(0)[0] != null && m.get(0)[0].fluid != null) { - return m.get(0)[0].fluid; - } else { - return null; - } - } - - public boolean setStoredFluidOfVanillaTank(TileEntity aTileEntity, FluidStack aSetFluid) { - Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]"); - - if (aTileEntity == null) { - return false; - } - else if ((aTileEntity instanceof IFluidTank || aTileEntity instanceof IFluidHandler)) { - if (aTileEntity instanceof IFluidTank) { - Logger.INFO("Tile Was instanceof IFluidTank."); - FluidStack f = ((IFluidTank) aTileEntity).getFluid(); - if (aSetFluid == null) { - aSetFluid = f; - aSetFluid.amount = f.amount; - } - int toDrain = (f.amount - aSetFluid.amount); - FluidStack newStack; - if (toDrain <= 0) { - newStack = f; - } else { - newStack = ((IFluidTank) aTileEntity).drain(toDrain, true); - } - - if (newStack.isFluidEqual(aSetFluid) && newStack.amount == aSetFluid.amount) { - Logger.INFO("Removed fluid from vanilla IFluidTank successfully."); - return true; - } else { - Logger.INFO("Failed trying to remove fluid from vanilla IFluidTank."); - return false; - } - } - else { - - //Rewrite Fluid handling for Vanilla type tanks - if (!IFluidHandler.class.isInstance(aTileEntity)) { - Logger.INFO("Tile Was not an instance of IFluidHandler."); - return false; - } - - - IFluidHandler aTank = (IFluidHandler) aTileEntity; - FluidStack aTankContents = null; - FluidTankInfo[] a1 = aTank.getTankInfo(ForgeDirection.UNKNOWN); - if (a1 != null) { - if (a1[0] != null) { - aTankContents = a1[0].fluid; - Logger.INFO("Found Fluid in Tank. "+aTankContents.getLocalizedName()+" - "+aTankContents.amount); - } - } - if (aSetFluid == null) { - Logger.INFO("Setting fluid to tank contents, as we're going to empty it totally."); - aSetFluid = aTankContents.copy(); - } - else { - Logger.INFO("Setting fluid to tank contents, as we're going to empty it totally."); - } - Logger.INFO("Tile Was instance of IFluidHandler. Trying to Drain "+aSetFluid.getLocalizedName()+" - "+aSetFluid.amount); - - if (a1 == null || aTankContents == null) { - Logger.INFO("Tank is empty."); - return false; - } - //Found some Fluid in the tank - else { - FluidStack aDrainedStack = aTank.drain(ForgeDirection.UNKNOWN, aSetFluid, true); - if (aDrainedStack.isFluidStackIdentical(aSetFluid)) { - Logger.INFO("Drained!"); - return true; - } - else { - Logger.INFO("Partially Drained! This is probably an error."); - return true; - } - } - } - } else { - Logger.INFO("Bad Tank Tile to drain."); - return false; - } - - } - - /* - * GT Tanks - */ - - public FluidStack getStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity) { - if (aTileEntity == null) { - return null; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - ; - if (aMetaTileEntity == null) { - return null; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) { - Logger.INFO("Tile Was Instanceof BasicTank."); - return getStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity); - } else { - return null; - } - } - - public FluidStack getStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity) { - FluidStack f = aTileEntity.mFluid; - - //Let's see if this machine has output fluid too - /* - * if (f == null) { - * Logger.INFO("Could not find any input fluid, checking output if possible."); - * if (aTileEntity instanceof GT_MetaTileEntity_BasicMachine) { - * GT_MetaTileEntity_BasicMachine g = (GT_MetaTileEntity_BasicMachine) - * aTileEntity; - * Logger.INFO("Tile is a Basic Machine of some sort - "+g.mNEIName); if (g != - * null) { f = g.mOutputFluid; if (f != null) { - * Logger.INFO("Found output fluid! "+f.getLocalizedName()); } else { - * Logger.INFO("Did not find anything!"); f = g.getFluid(); if (f != null) { - * Logger.INFO("Found fluid! "+f.getLocalizedName()); } else { - * Logger.INFO("Did not find anything!"); f = g.getFluid(); } } } } } - */ - - Logger.INFO("Returning Fluid stack from tile. Found: " - + (f != null ? f.getLocalizedName() + " - " + f.amount + "L" : "Nothing")); - return f; - } - - public boolean setStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity, FluidStack aSetFluid) { - Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]"); - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) { - Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [2]"); - return setStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity, aSetFluid); - } else { - return false; - } - } - - public boolean setStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity, FluidStack aSetFluid) { - try { - - //Try Handle Outputs First - /* - * if (aTileEntity.setDrainableStack(aSetFluid) != null) { return true; } - */ - - aTileEntity.mFluid = aSetFluid; - boolean b = aTileEntity.mFluid == aSetFluid; - Logger.INFO("Trying to set Tile's tank. - Behaviour Class. [3] " + b); - return b; - } catch (Throwable t) { - Logger.INFO("Trying to clear Tile's tank. FAILED - Behaviour Class. [x]"); - return false; - } - } - - - public int getCorrectMetaForItemstack(ItemStack aStack) { - if (aStack == null) { - return 0; - } - else { - if (aStack.getItemDamage() < this.mOffset) { - return 0; - } - else { - int newMeta = aStack.getItemDamage() - this.mOffset; - newMeta = (Math.max(0, Math.min(3, newMeta))); - return newMeta; - } - } - - - - - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java b/src/Java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java deleted file mode 100644 index 555fc0f23f..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.core.item.tool.misc; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.item.base.BaseItemWithDamageValue; -import gtPlusPlus.core.lib.CORE; - -public class SandstoneHammer extends BaseItemWithDamageValue{ - - /* (non-Javadoc) - * @see net.minecraft.item.Item#getColorFromItemStack(net.minecraft.item.ItemStack, int) - */ - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - //Figure Out Damage - - - return super.getColorFromItemStack(stack, HEX_OxFFFFFF); - } - - public SandstoneHammer(final String unlocalizedName) { - super(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(1); - this.setMaxDamage(2500); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GRAY+"Allows you to craft sand from cobble, or sandstone from sand."); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public boolean doesContainerItemLeaveCraftingGrid(final ItemStack itemStack) - { - return false; - } - - @Override - public boolean getShareTag() - { - return true; - } - - @Override - public boolean hasContainerItem(final ItemStack itemStack) - { - return true; - } - @Override - public ItemStack getContainerItem(final ItemStack itemStack) - { - itemStack.setItemDamage(itemStack.getItemDamage() + 8); - - return itemStack; - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.uncommon; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return false; - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java b/src/Java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java deleted file mode 100644 index baed16db03..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -public class AutoLunchBox extends BaseBoxItem { - - public final static int SLOTS = 9; - - public AutoLunchBox(String displayName) { - super(displayName, new String[] {"Stores 9 pieces of food", "Food will automatically be eaten from slot 1, through to "+gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS}, gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java b/src/Java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java deleted file mode 100644 index 10a3ae5804..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -public class BaseBoxItem extends CoreItem { - - private final int GUI; - - public BaseBoxItem(String displayName, String[] description, int GUI_ID) { - super("item." + Utils.sanitizeString(displayName), displayName, AddToCreativeTab.tabTools, 1, 0, - modifyDescriptionStringArray(description), EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); - GUI = GUI_ID; - } - - private static String[] modifyDescriptionStringArray(String[] array) { - String[] a = new String[array.length + 1]; - for (int b = 0; b < array.length; b++) { - a[b] = array[b]; - } - a[a.length - 1] = "Right Click to open"; - return a; - } - - // Without this method, your inventory will NOT work!!! - @Override - public int getMaxItemUseDuration(ItemStack stack) { - return 1; // return any value greater than zero - } - - @Override - public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { - if (!world.isRemote) { - // If player not sneaking, open the inventory gui - if (!player.isSneaking()) { - player.openGui(GTplusplus.instance, GUI, world, (int) player.posX, (int) player.posY, - (int) player.posZ); - } - } - return itemstack; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName().substring(5)); - } -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java b/src/Java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java deleted file mode 100644 index 035859c388..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java +++ /dev/null @@ -1,328 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import gregtech.api.enums.Materials; -import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerBoxBase extends Container { - - /* - * Finally, in your Container class, you will need to check if the currently - * opened inventory's uniqueID is equal to the itemstack's uniqueID in the - * method 'transferStackInSlot' as well as check if the itemstack is the - * currently equipped item in the method 'slotClick'. In both cases, you'll need - * to prevent the itemstack from being moved or it will cause bad things to - * happen. - */ - - /** - * Step 3: Create a custom Container for your Inventory - */ - - /* - * There's a LOT of code in this one, but read through all of the comments - * carefully and it should become clear what everything does. As a bonus, one of - * my previous tutorials is included within! - * "How to Properly Override Shift-Clicking" is here and better than ever! At - * least in my opinion. If you're like me, and you find no end of frustration - * trying to figure out which f-ing index you should use for which slots in your - * container when overriding transferStackInSlot, or if your following the - * original tutorial, then read on. - */ - - /** - * The Item Inventory for this Container, only needed if you want to reference - * isUseableByPlayer - */ - private final CustomBoxInventory inventory; - /** - * Using these will make transferStackInSlot easier to understand and implement - * INV_START is the index of the first slot in the Player's Inventory, so our - * CustomBoxInventory's number of slots (e.g. 5 slots is array indices 0-4, so - * start at 5) Notice how we don't have to remember how many slots we made? We - * can just use CustomBoxInventory.INV_SIZE and if we ever change it, the - * Container updates automatically. - */ - private final int INV_START, INV_END, HOTBAR_START, HOTBAR_END; - - // If you're planning to add armor slots, put those first like this: - // ARMOR_START = CustomBoxInventory.INV_SIZE, ARMOR_END = ARMOR_START+3, - // INV_START = ARMOR_END+1, and then carry on like above. - - private Slot generateSlot(final Constructor aClazz, final IInventory base, final int id, final int x, - final int y) { - Slot aSlot; - try { - aSlot = (Slot) aClazz.newInstance(base, id, x, y); - if (aSlot != null) { - return aSlot; - } - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - public ContainerBoxBase(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, - CustomBoxInventory CustomBoxInventory, Class aClazz, int aSlotCount) { - - INV_START = aSlotCount; - INV_END = INV_START + 26; - HOTBAR_START = INV_END + 1; - HOTBAR_END = HOTBAR_START + 8; - - this.inventory = CustomBoxInventory; - try { - - Constructor constructor; - constructor = aClazz.getConstructor(IInventory.class, int.class, int.class, int.class); - - int i; - - // ITEM INVENTORY - you'll need to adjust the slot locations to match your - // texture file - // I have them set vertically in columns of 4 to the right of the player model - for (i = 0; i < CustomBoxInventory.INV_SIZE; ++i) { - // You can make a custom Slot if you need different behavior, - // such as only certain item types can be put into this slot - // We made a custom slot to prevent our inventory-storing item - // from being stored within itself, but if you want to allow that and - // you followed my advice at the end of the above step, then you - // could get away with using the vanilla Slot class - this.addSlotToContainer(generateSlot(constructor, this.getInventoryObject(), i, - 80 + (18 * (int) (i / 4)), 8 + (18 * (i % 4)))); - } - - // If you want, you can add ARMOR SLOTS here as well, but you need to - // make a public version of SlotArmor. I won't be doing that in this tutorial. - /* - * for (i = 0; i < 4; ++i) { // These are the standard positions for survival - * inventory layout this.addSlotToContainer(new SlotArmor(this.player, - * inventoryPlayer, inventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18, - * i)); } - */ - - // PLAYER INVENTORY - uses default locations for standard inventory texture file - for (i = 0; i < 3; ++i) { - for (int j = 0; j < 9; ++j) { - this.addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - // PLAYER ACTION BAR - uses default locations for standard action bar texture - // file - for (i = 0; i < 9; ++i) { - this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); - } - - } catch (NoSuchMethodException | SecurityException e) { - e.printStackTrace(); - } - } - - @Override - public boolean canInteractWith(EntityPlayer entityplayer) { - // be sure to return the inventory's isUseableByPlayer method - // if you defined special behavior there: - return getInventoryObject().isUseableByPlayer(entityplayer); - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you - * will crash when someone does that. - */ - public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int index) { - ItemStack itemstack = null; - Slot slot = (Slot) this.inventorySlots.get(index); - - if (slot != null && slot.getHasStack()) { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - - // If item is in our custom Inventory or armor slot - if (index < INV_START) { - // try to place in player inventory / action bar - if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END + 1, true)) { - return null; - } - - slot.onSlotChange(itemstack1, itemstack); - } - // Item is in inventory / hotbar, try to place in custom inventory or armor - // slots - else { - /* - * If your inventory only stores certain instances of Items, you can implement - * shift-clicking to your inventory like this: - * - * // Check that the item is the right type if (itemstack1.getItem() instanceof - * ItemCustom) { // Try to merge into your custom inventory slots // We use - * 'CustomBoxInventory.INV_SIZE' instead of INV_START just in case // you also - * add armor or other custom slots if (!this.mergeItemStack(itemstack1, 0, - * CustomBoxInventory.INV_SIZE, false)) { return null; } } // If you added armor - * slots, check them here as well: // Item being shift-clicked is armor - try to - * put in armor slot if (itemstack1.getItem() instanceof ItemArmor) { int type = - * ((ItemArmor) itemstack1.getItem()).armorType; if - * (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START + type + 1, - * false)) { return null; } } Otherwise, you have basically 2 choices: 1. - * shift-clicking between player inventory and custom inventory 2. - * shift-clicking between action bar and inventory - * - * Be sure to choose only ONE of the following implementations!!! - */ - /** - * Implementation number 1: Shift-click into your custom inventory - */ - if (index >= INV_START) { - // place in custom inventory - if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) { - return null; - } - } - - /** - * Implementation number 2: Shift-click items between action bar and inventory - */ - // item is in player's inventory, but not in action bar - if (index >= INV_START && index < HOTBAR_START) { - // place in action bar - if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END + 1, false)) { - return null; - } - } - // item in action bar - place in player inventory - else if (index >= HOTBAR_START && index < HOTBAR_END + 1) { - if (!this.mergeItemStack(itemstack1, INV_START, INV_END + 1, false)) { - return null; - } - } - } - - if (itemstack1.stackSize == 0) { - slot.putStack((ItemStack) null); - } else { - slot.onSlotChanged(); - } - - if (itemstack1.stackSize == itemstack.stackSize) { - return null; - } - - slot.onPickupFromSlot(par1EntityPlayer, itemstack1); - } - - return itemstack; - } - - /** - * You should override this method to prevent the player from moving the stack - * that opened the inventory, otherwise if the player moves it, the inventory - * will not be able to save properly - */ - @Override - public ItemStack slotClick(int slot, int button, int flag, EntityPlayer player) { - // this will prevent the player from interacting with the item that opened the - // inventory: - if (slot >= 0 && getSlot(slot) != null && getSlot(slot).getStack() == player.getHeldItem()) { - return null; - } - return super.slotClick(slot, button, flag, player); - } - - /* - * Special note: If your custom inventory's stack limit is 1 and you allow - * shift-clicking itemstacks into it, you will need to override mergeStackInSlot - * to avoid losing all the items but one in a stack when you shift-click. - */ - /** - * Vanilla mergeItemStack method doesn't correctly handle inventories whose max - * stack size is 1 when you shift-click into the inventory. This is a modified - * method I wrote to handle such cases. Note you only need it if your slot / - * inventory's max stack size is 1 - */ - @Override - protected boolean mergeItemStack(ItemStack stack, int start, int end, boolean backwards) { - boolean flag1 = false; - int k = (backwards ? end - 1 : start); - Slot slot; - ItemStack itemstack1; - - if (stack.isStackable()) { - while (stack.stackSize > 0 && (!backwards && k < end || backwards && k >= start)) { - slot = (Slot) inventorySlots.get(k); - itemstack1 = slot.getStack(); - - if (!slot.isItemValid(stack)) { - k += (backwards ? -1 : 1); - continue; - } - - if (itemstack1 != null && itemstack1.getItem() == stack.getItem() - && (!stack.getHasSubtypes() || stack.getItemDamage() == itemstack1.getItemDamage()) - && ItemStack.areItemStackTagsEqual(stack, itemstack1)) { - int l = itemstack1.stackSize + stack.stackSize; - - if (l <= stack.getMaxStackSize() && l <= slot.getSlotStackLimit()) { - stack.stackSize = 0; - itemstack1.stackSize = l; - getInventoryObject().markDirty(); - flag1 = true; - } else if (itemstack1.stackSize < stack.getMaxStackSize() && l < slot.getSlotStackLimit()) { - stack.stackSize -= stack.getMaxStackSize() - itemstack1.stackSize; - itemstack1.stackSize = stack.getMaxStackSize(); - getInventoryObject().markDirty(); - flag1 = true; - } - } - - k += (backwards ? -1 : 1); - } - } - if (stack.stackSize > 0) { - k = (backwards ? end - 1 : start); - while (!backwards && k < end || backwards && k >= start) { - slot = (Slot) inventorySlots.get(k); - itemstack1 = slot.getStack(); - - if (!slot.isItemValid(stack)) { - k += (backwards ? -1 : 1); - continue; - } - - if (itemstack1 == null) { - int l = stack.stackSize; - if (l <= slot.getSlotStackLimit()) { - slot.putStack(stack.copy()); - stack.stackSize = 0; - getInventoryObject().markDirty(); - flag1 = true; - break; - } else { - putStackInSlot(k, - new ItemStack(stack.getItem(), slot.getSlotStackLimit(), stack.getItemDamage())); - stack.stackSize -= slot.getSlotStackLimit(); - getInventoryObject().markDirty(); - flag1 = true; - } - } - - k += (backwards ? -1 : 1); - } - } - - return flag1; - } - - public CustomBoxInventory getInventoryObject() { - return inventory; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java b/src/Java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java deleted file mode 100644 index 0737e463d8..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java +++ /dev/null @@ -1,243 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.common.util.Constants; - -public abstract class CustomBoxInventory implements IInventory { - - private final String name; - protected String uniqueID; - - /** Provides NBT Tag Compound to reference */ - private final ItemStack invItem; - - /** Defining your inventory size this way is handy */ - public final int INV_SIZE; - - /** Inventory's size must be same as number of slots you add to the Container class */ - private ItemStack[] inventory; - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public CustomBoxInventory(ItemStack stack, String name2){ - this(stack, name2, 8); - } - - /** - * @param itemstack - the ItemStack to which this inventory belongs - */ - public CustomBoxInventory(ItemStack stack, String name2, int slots) - { - invItem = stack; - name = name2; - INV_SIZE = slots; - inventory = new ItemStack[INV_SIZE]; - - /** initialize variable within the constructor: */ - uniqueID = ""; - - if (!stack.hasTagCompound()) - { - stack.setTagCompound(new NBTTagCompound()); - // no tag compound means the itemstack does not yet have a UUID, so assign one: - uniqueID = UUID.randomUUID().toString(); - } - - /** When reading from NBT: */ - if ("".equals(uniqueID)) - { - // try to read unique ID from NBT - uniqueID = stack.getTagCompound().getString("uniqueID"); - // if it's still "", assign a new one: - if ("".equals(uniqueID)) - { - uniqueID = UUID.randomUUID().toString(); - } - } - - /** Writing to NBT: */ - // just add this line: - stack.getTagCompound().setString("uniqueID", this.uniqueID); - - // note that it's okay to use stack instead of invItem right there - // both reference the same memory location, so whatever you change using - // either reference will change in the other - - // Read the inventory contents from NBT - readFromNBT(stack.getTagCompound()); - } - - @Override - public int getSizeInventory() - { - return inventory.length; - } - - @Override - public ItemStack getStackInSlot(int slot) - { - return inventory[slot]; - } - - @Override - public ItemStack decrStackSize(int slot, int amount) - { - ItemStack stack = getStackInSlot(slot); - if(stack != null) - { - if(stack.stackSize > amount) - { - stack = stack.splitStack(amount); - // Don't forget this line or your inventory will not be saved! - markDirty(); - } - else - { - // this method also calls onInventoryChanged, so we don't need to call it again - setInventorySlotContents(slot, null); - } - } - return stack; - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) - { - ItemStack stack = getStackInSlot(slot); - setInventorySlotContents(slot, null); - return stack; - } - - @Override - public void setInventorySlotContents(int slot, ItemStack stack) - { - inventory[slot] = stack; - - if (stack != null && stack.stackSize > getInventoryStackLimit()) - { - stack.stackSize = getInventoryStackLimit(); - } - - // Don't forget this line or your inventory will not be saved! - markDirty(); - } - - // 1.7.2+ renamed to getInventoryName - @Override - public String getInventoryName() - { - return name; - } - - // 1.7.2+ renamed to hasCustomInventoryName - @Override - public boolean hasCustomInventoryName() - { - return name.length() > 0; - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - /** - * This is the method that will handle saving the inventory contents, as it is called (or should be called!) - * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also - * let you change things in your inventory without ever opening a Gui, if you want. - */ - // 1.7.2+ renamed to markDirty - @Override - public void markDirty() - { - for (int i = 0; i < getSizeInventory(); ++i) - { - if (getStackInSlot(i) != null && getStackInSlot(i).stackSize == 0) { - inventory[i] = null; - } - } - - // This line here does the work: - writeToNBT(invItem.getTagCompound()); - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) - { - return true; - } - - // 1.7.2+ renamed to openInventory(EntityPlayer player) - @Override - public void openInventory() {} - - // 1.7.2+ renamed to closeInventory(EntityPlayer player) - @Override - public void closeInventory() {} - - /** - * This method doesn't seem to do what it claims to do, as - * items can still be left-clicked and placed in the inventory - * even when this returns false - */ - @Override - public abstract boolean isItemValidForSlot(int slot, ItemStack itemstack); - - /** - * A custom method to read our inventory from an ItemStack's NBT compound - */ - public void readFromNBT(NBTTagCompound compound) - { - // Gets the custom taglist we wrote to this compound, if any - // 1.7.2+ change to compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); - NBTTagList items = compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); - - for (int i = 0; i < items.tagCount(); ++i) - { - // 1.7.2+ change to items.getCompoundTagAt(i) - NBTTagCompound item = (NBTTagCompound) items.getCompoundTagAt(i); - int slot = item.getInteger("Slot"); - - // Just double-checking that the saved slot index is within our inventory array bounds - if (slot >= 0 && slot < getSizeInventory()) { - inventory[slot] = ItemStack.loadItemStackFromNBT(item); - } - } - } - - /** - * A custom method to write our inventory to an ItemStack's NBT compound - */ - public void writeToNBT(NBTTagCompound tagcompound) - { - // Create a new NBT Tag List to store itemstacks as NBT Tags - NBTTagList items = new NBTTagList(); - - for (int i = 0; i < getSizeInventory(); ++i) - { - // Only write stacks that contain items - if (getStackInSlot(i) != null) - { - // Make a new NBT Tag Compound to write the itemstack and slot index to - NBTTagCompound item = new NBTTagCompound(); - item.setInteger("Slot", i); - // Writes the itemstack in slot(i) to the Tag Compound we just made - getStackInSlot(i).writeToNBT(item); - - // add the tag compound to our tag list - items.appendTag(item); - } - } - // Add the TagList to the ItemStack's Tag Compound with the name "ItemInventory" - tagcompound.setTag("ItemInventory", items); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java b/src/Java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java deleted file mode 100644 index 65b884bd51..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -public class MagicToolBag extends BaseBoxItem { - - public final static int SLOTS = 24; - - public MagicToolBag(String displayName) { - super(displayName, new String[] {"Can store magic tools from TC, BM, etc", "Please ask for additional mod support on Github"}, gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java b/src/Java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java deleted file mode 100644 index 92b1382e01..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.core.item.tool.misc.box; - -import gtPlusPlus.core.handler.GuiHandler; - -public class UniversalToolBox extends BaseBoxItem { - - public final static int SLOTS = 16; - - public UniversalToolBox(String displayName) { - super(displayName, new String[] {"Can store tools from Gregtech, IC2, BC, Forestry", "Please ask for additional mod support on Github"}, GuiHandler.GUI10); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java deleted file mode 100644 index 2c2441064b..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java +++ /dev/null @@ -1,311 +0,0 @@ -package gtPlusPlus.core.item.tool.staballoy; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; - -public class MultiPickaxeBase extends StaballoyPickaxe{ - - /* (non-Javadoc) - * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) - */ - @Override - public double getDurabilityForDisplay(final ItemStack stack) { - if (super.getDurabilityForDisplay(stack) > 0){ - return super.getDurabilityForDisplay(stack);} - return 0; - } - - protected boolean canBreak = true; - protected final int colour; - protected final String materialName; - protected final String displayName; - public boolean isValid = true; - private final Pair enchantment; - - public MultiPickaxeBase(final String unlocalizedName, final ToolMaterial material, final long materialDurability, final int colour, final Object enchant) { - super(Utils.sanitizeString(unlocalizedName), material); - this.setUnlocalizedName(Utils.sanitizeString(unlocalizedName)); - //this.setTextureName(CORE.MODID + ":" + "itemPickaxe"); - this.setTextureName("minecraft"+":"+"iron_pickaxe"); - this.setMaxStackSize(1); - if ((materialDurability*3) <= Integer.MAX_VALUE){ - this.setMaxDamage((int) (materialDurability*3)); - } - else { - this.setMaxDamage(Integer.MAX_VALUE); - this.canBreak = false; - } - this.colour = colour; - this.materialName = material.name(); - this.displayName = unlocalizedName; - this.setCreativeTab(AddToCreativeTab.tabTools); - this.miningLevel = material.getHarvestLevel(); - - - - if (enchant != null){ - if (enchant instanceof Pair){ - this.enchantment = (Pair) enchant; - } - else { - this.enchantment = null; - } - } - else { - this.enchantment = null; - } - - try {this.isValid = this.addRecipe();} catch (final Throwable e){} - if ((colour != 0) && this.isValid && (materialDurability > 10000)){ - if (GameRegistry.findItem(CORE.MODID, Utils.sanitizeString(unlocalizedName)) == null){ - GameRegistry.registerItem(this, Utils.sanitizeString(unlocalizedName)); - } - } - - } - - /* - * - * - * - * Methods - * - * - * - */ - - private boolean addRecipe(){ - - final String cleanName = Utils.sanitizeString(this.materialName); - - final String plateDense = "plateDense"+cleanName; - final String plateDouble = "plateDouble"+cleanName; - final String rodLong = "stickLong"+cleanName; - final String toolHammer = "craftingToolHardHammer"; - final String toolWrench = "craftingToolWrench"; - final String toolFile = "craftingToolFile"; - final String toolScrewDriver = "craftingToolScrewdriver"; - - if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(rodLong, 1)){ - Logger.WARNING("stickLong of "+cleanName+" does not exist."); - return false; - } - if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDense, 1)){ - Logger.WARNING("plateDense of "+cleanName+" does not exist."); - if (null != ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDouble, 1)){ - Logger.WARNING("plateDouble of "+cleanName+" does exist. Using it instead."); - RecipeUtils.recipeBuilder( - plateDouble, plateDouble, plateDouble, - toolFile, rodLong, toolHammer, - toolWrench, rodLong, toolScrewDriver, - ItemUtils.getSimpleStack(this)); - - return true; - } - Logger.WARNING("plateDouble of "+cleanName+" does not exist."); - return false; - } - - RecipeUtils.recipeBuilder( - plateDense, plateDense, plateDense, - toolFile, rodLong, toolHammer, - toolWrench, rodLong, toolScrewDriver, - ItemUtils.getSimpleStack(this)); - - return true; - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public String getItemStackDisplayName(final ItemStack iStack) { - return this.displayName; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.colour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.colour; - - } - - private float calculateDurabilityLoss(final World world, final int X, final int Y, final int Z){ - float bDurabilityLoss = 0; - Boolean correctTool = false; - float bHardness = 0; - if (!world.isRemote){ - try { - final Block removalist = world.getBlock(X, Y, Z); - //Utils.LOG_WARNING(removalist.toString()); - - bHardness = removalist.getBlockHardness(world, X, Y, Z)*100; - Logger.INFO("Hardness: "+bHardness); - - bDurabilityLoss = 100; - //Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss); - - correctTool = this.canPickaxeBlock(removalist, world, new int[]{X,Y,Z}); - Logger.WARNING(""+correctTool); - - if (!correctTool){ - return 0; - } - - } catch (final NullPointerException e){ - - } - } - return bDurabilityLoss; - } - - //Should clear up blocks quicker if I chain it. - /*@Override - public void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){ - localWorld = world; - try { - Block block = world.getBlock(X, Y, Z); - float dur = calculateDurabilityLoss(world, X, Y, Z); - Utils.LOG_WARNING(block.toString()); - String removalTool = ""; - removalTool = block.getHarvestTool(1); - - if (removalTool.equals("pickaxe") || UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)){ - if (canPickaxeBlock(block, world, new int[]{X,Y,Z})){ - if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ - - if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){ - - block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); - world.setBlockToAir(X, Y, Z); - - } - else { - return; - } - - } - } - else { - Utils.LOG_WARNING("Incorrect Tool for mining this block."); - } - } - } catch (NullPointerException e){ - - } - }*/ - - @Override - public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer){ - if (this.canBreak){ - item.damageItem(damage, localPlayer); - } - } - - @Override - public void setItemDamage(final ItemStack item, final int damage){ - if (this.canBreak){ - item.setItemDamage(damage-1); - } - } - - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.uncommon; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return false; - } - - @Override - public void onCreated(final ItemStack mThisItem, final World mWorld, final EntityPlayer mPlayer) { - Enchantment enchant = null; - int enchantmentLevel = 0; - final Pair Y = this.enchantment; - if (Y != null){ - if (Y.getKey() != null){ - enchant = (Enchantment) this.enchantment.getKey(); - } - if (Y.getValue() != null){ - enchantmentLevel = ((Integer) this.enchantment.getValue()).intValue(); - } - } - final ItemStack itemToEnchant = mThisItem; - if ((enchant != null) && (enchantmentLevel != 0) && (enchantmentLevel >= 1)){ - itemToEnchant.addEnchantment(enchant, enchantmentLevel); - } - super.onCreated(itemToEnchant, mWorld, mPlayer); - } - - @Override - public void getSubItems(final Item mItem, final CreativeTabs mCreativeTab, final List mList) { - Enchantment enchant = null; - int enchantmentLevel = 0; - final Pair Y = this.enchantment; - if (Y != null){ - if (Y.getKey() != null){ - enchant = (Enchantment) this.enchantment.getKey(); - } - if (Y.getValue() != null){ - enchantmentLevel = ((Integer) this.enchantment.getValue()).intValue(); - } - } - - final Item thisItem = mItem; - final ItemStack itemToEnchant = ItemUtils.getSimpleStack(thisItem); - if ((enchant != null) && (enchantmentLevel != 0) && (enchantmentLevel >= 1)){ - itemToEnchant.addEnchantment(enchant, enchantmentLevel); - mList.add(itemToEnchant); - } - else { - mList.add(new ItemStack(thisItem, 1, 0)); - } - - } - - - /** - * - * Time to Override Minecraft stupid mechanics, allowing unbreakable stuff. - * - */ - - @Override - public boolean isDamageable(){ - if (this.getMaxDamage() > 0 && !this.hasSubtypes){ - if (this.canBreak){ - return true; - } - } - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java deleted file mode 100644 index d01b400fab..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java +++ /dev/null @@ -1,126 +0,0 @@ -package gtPlusPlus.core.item.tool.staballoy; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; - -public class MultiSpadeBase extends StaballoySpade{ - - /* (non-Javadoc) - * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) - */ - @Override - public double getDurabilityForDisplay(final ItemStack stack) { - if (super.getDurabilityForDisplay(stack) > 0){ - return super.getDurabilityForDisplay(stack);} - return 0; - } - - protected final int colour; - protected final String materialName; - protected final String displayName; - public boolean isValid = true; - - public MultiSpadeBase(final String unlocalizedName, final ToolMaterial material, final int materialDurability, final int colour) { - super(Utils.sanitizeString(unlocalizedName), material); - this.setUnlocalizedName(Utils.sanitizeString(unlocalizedName)); - //this.setTextureName(CORE.MODID + ":" + "itemShovel"); - this.setTextureName("minecraft"+":"+"iron_shovel"); - this.setMaxStackSize(1); - this.setMaxDamage(materialDurability*3); - this.colour = colour; - this.materialName = material.name(); - this.displayName = unlocalizedName; - this.setCreativeTab(AddToCreativeTab.tabTools); - try { - this.isValid = this.addRecipe(); - } - catch (final Throwable e){} - if ((colour != 0) && this.isValid){ - if (GameRegistry.findItem(CORE.MODID, Utils.sanitizeString(unlocalizedName)) == null) { - GameRegistry.registerItem(this, Utils.sanitizeString(unlocalizedName)); - } - } - } - - private boolean addRecipe(){ - final String cleanName = Utils.sanitizeString(this.materialName); - final String plateDense = "plateDense"+cleanName; - final String plateDouble = "plateDouble"+cleanName; - final String rodLong = "stickLong"+cleanName; - final String toolHammer = "craftingToolHardHammer"; - final String toolWrench = "craftingToolWrench"; - final String toolFile = "craftingToolFile"; - final String toolScrewDriver = "craftingToolScrewdriver"; - - if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(rodLong, 1)){ - return false; - } - if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDense, 1)){ - if (null != ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDouble, 1)){ - RecipeUtils.recipeBuilder( - toolFile, plateDouble, toolHammer, - null, rodLong, null, - toolWrench, rodLong, toolScrewDriver, - ItemUtils.getSimpleStack(this)); - - return true; - } - return false; - } - - RecipeUtils.recipeBuilder( - toolFile, plateDense, toolHammer, - null, rodLong, null, - toolWrench, rodLong, toolScrewDriver, - ItemUtils.getSimpleStack(this)); - - return true; - } - - public final String getMaterialName() { - return this.materialName; - } - - @Override - public String getItemStackDisplayName(final ItemStack iStack) { - return this.displayName; - /*String name; - if (getUnlocalizedName().toLowerCase().contains("wood")){ - name = "Wooden"; - } - else { - } - return "Big "+name+" Spade";*/ - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.colour == 0){ - return MathUtils.generateSingularRandomHexValue(); - } - return this.colour; - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.uncommon; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java deleted file mode 100644 index 153a417d7b..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java +++ /dev/null @@ -1,345 +0,0 @@ -package gtPlusPlus.core.item.tool.staballoy; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.*; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemAxe; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.lib.CORE; - -public class StaballoyAxe extends ItemAxe{ - public String mat; - - public StaballoyAxe(final String unlocalizedName, final ToolMaterial material) { - super(material); - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - } - - // EXPLODE TREE - byte[] tre= new byte[32000]; - byte unchecked=0; - byte needcheck=1; - byte ignore =2; - byte harvest =3; - - private boolean setcheck(final int x, final int y, final int z) { - if((x<0) || (x>19) || (z<0) || (z>19) || (y<0) || (y>79)) { - return false; - } - final int o=x+(z*20)+(y*400); - if (this.tre[o]==this.unchecked) { - this.tre[o]=this.needcheck; - } - return true; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GOLD+"Fells entire trees in a single swipe!.."); - list.add(EnumChatFormatting.GRAY+"Ask Alkalus for new trees to be supported."); - super.addInformation(stack, aPlayer, list, bool); - } - - public static boolean canIgnore(final Block bit){ - if (bit instanceof BlockAir) { - return true; - } - if (bit instanceof BlockGrass) { - return true; - } - if (bit instanceof BlockSand) { - return true; - } - if (bit instanceof BlockDirt) { - return true; - } - if (bit instanceof BlockCocoa) { - return true; - } - if (bit instanceof BlockVine) { - return true; - } - if (bit instanceof BlockMushroom) { - return true; - } - if (bit instanceof BlockSnow) { - return true; - } - if (bit instanceof BlockSnowBlock) { - return true; - } - if (bit instanceof BlockFlower) { - return true; - } - if (bit instanceof BlockTallGrass) { - return true; - } - if (bit instanceof BlockDoublePlant) { - return true; - } - - //LoonTools.log("Found uncuttable "+bit.getClass().getSimpleName()); - return false; - } - - private int check(final World par1World, final int x, final int y, final int z, final int xo, final int yo,final int zo) { - int f=0; - final int o=x+(z*20)+(y*400); - if (this.tre[o]==this.needcheck){ - this.tre[o]=this.ignore; - final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); - if ((bit instanceof BlockLog)||(bit instanceof BlockLeavesBase)||(bit instanceof BlockHugeMushroom) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ - f=1; - this.tre[o]=this.harvest; - //if (bit instanceof BlockLog){ - // LoonTools.log("^ Found log @ "+x+xo+" "+y+yo+" "+z+zo+" "); - //} - for(int xb=-1;xb<2;xb++) { - for(int yb=-1;yb<2;yb++) { - for(int zb=-1;zb<2;zb++) { - if (!this.setcheck(x+xb,y+yb,z+zb)) { - return 3; - } - } - } - } - }else{ - if (!canIgnore(bit)) { - return 2; - } - } - } - return f; - } - - public int checkTree(final World par1World,final int xo,final int yo,final int zo){ - boolean f; - for (f=true;f==true;){ - f=false; - for (int y=0;y<80;y++) { - for(int z=0;z<20;z++) { - for(int x=0;x<20;x++){ - final int r=this.check(par1World,x,y,z,xo,yo,zo); - if (r==3) { - return 3; - } - if (r==2) { - return 2; - } - if (r==1) { - f=true; - } - } - } - } - - for (int y=79;y>=0;y--) { - for(int z=19;z>=0;z--) { - for(int x=19;x>=0;x--){ - final int r=this.check(par1World,x,y,z,xo,yo,zo); - if (r==2) { - return 3; - } - //if (r==2) return 2; - if (r==1) { - f=true; - } - } - } - } - } - return 1; - } - - private int check2(final World par1World, final int x, final int y, final int z, final int xo, final int yo,final int zo) { - int f=0; - final int o=x+(z*20)+(y*400); - if (this.tre[o]==this.needcheck){ - this.tre[o]=this.ignore; - final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); - if (bit instanceof BlockLog){ - f=1; - this.tre[o]=this.harvest; - //if (bit instanceof BlockLog){ - // LoonTools.log("^ Found log @ "+x+xo+" "+y+yo+" "+z+zo+" "); - //} - for(int xb=-1;xb<2;xb++) { - for(int yb=-1;yb<2;yb++) { - for(int zb=-1;zb<2;zb++) { - if (!this.setcheck(x+xb,y+yb,z+zb)) { - return 3; - } - } - } - } - }else if (bit instanceof BlockLeavesBase){ - }else{ - if (!canIgnore(bit)) { - return 2; - } - } - } - return f; - } - - public int checkTree2(final World par1World,final int xo,final int yo,final int zo){ - boolean f; - for (f=true;f==true;){ - f=false; - for (int y=0;y<80;y++) { - for(int z=0;z<20;z++) { - for(int x=0;x<20;x++){ - final int r=this.check2(par1World,x,y,z,xo,yo,zo); - if (r==3) { - return 3; - } - if (r==2) { - return 2; - } - if (r==1) { - f=true; - } - } - } - } - - for (int y=79;y>=0;y--) { - for(int z=19;z>=0;z--) { - for(int x=19;x>=0;x--){ - final int r=this.check2(par1World,x,y,z,xo,yo,zo); - if (r==2) { - return 3; - } - //if (r==2) return 2; - if (r==1) { - f=true; - } - } - } - } - } - return 1; - } - - public void exploadTree(final World par1World,final int xo,final int yo,final int zo, final EntityPlayer plr){ - for (int y=0;y<80;y++) { - for(int z=0;z<20;z++) { - for(int x=0;x<20;x++){ - final int o=x+(z*20)+(y*400); - if (this.tre[o]==this.harvest){ - final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); - final int met = par1World.getBlockMetadata(x+xo, y+yo, z+zo); - - if ((bit instanceof BlockLog)||(bit instanceof BlockLeavesBase) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ - bit.harvestBlock(par1World, plr, x+xo, y+yo, z+zo,met); - par1World.setBlockToAir(x+xo, y+yo, z+zo); - } - } - } - } - } - } - - private static void breakMushroom(final World wld, final Block bit, final EntityPlayer plr, final boolean silk, final int x, final int y, final int z, final int met) { - if (silk){ - final ItemStack stk = null; //TODO - /*if (bit==Blocks.brown_mushroom_block) stk = new ItemStack(LoonToolItems.brown_mushroom_block,1,met); - else if (bit==Blocks.red_mushroom_block) stk = new ItemStack(LoonToolItems.red_mushroom_block,1,met); - else stk = new ItemStack(bit,1,met);*/ - final EntityItem entityitem = new EntityItem(wld, x+0.5, y+0.5, z+0.5, stk); - entityitem.delayBeforeCanPickup = 10; - wld.spawnEntityInWorld(entityitem); - }else{ - bit.harvestBlock(wld, plr, x, y, z, met); - } - wld.setBlockToAir(x, y, z); - } - - public void exploadMushroom(final World par1World,final int xo,final int yo,final int zo, final EntityPlayer plr, final boolean silk){ - for (int y=0;y<80;y++) { - for(int z=0;z<20;z++) { - for(int x=0;x<20;x++){ - final int o=x+(z*20)+(y*400); - if (this.tre[o]==this.harvest){ - final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); - final int met = par1World.getBlockMetadata(x+xo, y+yo, z+zo); - if (bit instanceof BlockHugeMushroom){ - breakMushroom(par1World, bit, plr, silk, x+xo, y+yo, z+zo,met); - }else{ - bit.harvestBlock(par1World, plr, x+xo, y+yo, z+zo,met); - par1World.setBlockToAir(x+xo, y+yo, z+zo); - } - } - } - } - } - } - - - @Override - public boolean onBlockDestroyed(final ItemStack itm, final World wld,final Block blk, final int x, final int y,final int z, final EntityLivingBase plr) { - if (!wld.isRemote){ - final Block bit = wld.getBlock(x, y, z); - final boolean silk=EnchantmentHelper.getSilkTouchModifier(plr); - if ((bit instanceof BlockHugeMushroom)){ - for (int n=0;n<32000;n++) { - this.tre[n]=this.unchecked; - } - final int met = wld.getBlockMetadata(x, y, z); - breakMushroom(wld, bit, (EntityPlayer) plr, silk, x, y, z,met); - wld.setBlockToAir(x,y,z); - this.tre[2210]=this.needcheck; - if (this.checkTree(wld,x-10,y-4,z-10)==1){ - this.exploadMushroom(wld,x-10,y-4,z-10,(EntityPlayer) plr,silk); - } - } - - if ((bit instanceof BlockLog) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ - //LoonTools.log("cutting tree @ "+x+" "+y+" "+z+" "); - for (int n=0;n<32000;n++) { - this.tre[n]=this.unchecked; - } - final int met = wld.getBlockMetadata(x, y, z); - bit.harvestBlock(wld, (EntityPlayer) plr, x, y, z,met); - wld.setBlockToAir(x,y,z); - this.tre[2210]=this.needcheck; - if (this.checkTree(wld,x-10,y-4,z-10)==1){ - this.exploadTree(wld,x-10,y-4,z-10,(EntityPlayer) plr); - }else{ - for (int n=0;n<32000;n++) { - this.tre[n]=this.unchecked; - } - this.tre[2210]=this.needcheck; - if (this.checkTree2(wld,x-10,y-4,z-10)==1){ - this.exploadTree(wld,x-10,y-4,z-10,(EntityPlayer) plr); - } - } - } - } - return super.onBlockDestroyed(itm, wld, blk, x, y, z, plr); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.rare; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java deleted file mode 100644 index 830c4994ba..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java +++ /dev/null @@ -1,462 +0,0 @@ -package gtPlusPlus.core.item.tool.staballoy; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemPickaxe; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.MiningUtils; - -public class StaballoyPickaxe extends ItemPickaxe{ - - /* (non-Javadoc) - * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) - */ - @Override - public double getDurabilityForDisplay(final ItemStack stack) { - return (double)stack.getItemDamageForDisplay() / (double)stack.getMaxDamage(); - } - - /** - * Creates an NBT tag for this item if it doesn't have one. - * This also set some default values. - * @param rStack - * @return - */ - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - - tagNBT.setBoolean("FACING_HORIZONTAL", true); - tagNBT.setString("FACING", "north"); - tagNBT.setString("lookingDirection", ""); - - tagMain.setTag("PickStats", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - /* - * Is the player facing horizontally? - */ - - public static final boolean isFacingHorizontal(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - return aNBT.getBoolean("FACING_HORIZONTAL"); - } - } - else { - createNBT(aStack); - } - return true; - } - - public static final boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - aNBT.setBoolean("FACING_HORIZONTAL", aFacingHorizontal); - return true; - } - } - return false; - } - - /* - * Handles the Direction the player is facing - */ - - public static final String getFacingDirection(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - return aNBT.getString("FACING"); - } - } - else { - createNBT(aStack); - } - return "north"; - } - - public static final boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - aNBT.setString("FACING", aFacingHorizontal); - return true; - } - } - return false; - } - - /* - * The Looking Direction handlers - */ - - public static final String getLookingDirection(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - return aNBT.getString("lookingDirection"); - } - } - else { - createNBT(aStack); - } - return ""; - } - - public static final boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - aNBT.setString("lookingDirection", aFacingHorizontal); - return true; - } - } - return false; - } - - protected int miningLevel; - - /* - * - * - * - * Methods - * - * - * - */ - - @Override - public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer aPlayer) { - return super.onItemRightClick(stack, world, aPlayer); - } - - - - @Override - public boolean onBlockDestroyed(final ItemStack stack, final World world, final Block block, final int X, final int Y, final int Z, final EntityLivingBase entity) { - if (!world.isRemote){ - if (entity instanceof EntityPlayer) { - this.GetDestroyOrientation((EntityPlayer) entity, block, getLookingDirection(stack), world, X, Y, Z, stack); - } - } - return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity); - } - - private float calculateDurabilityLoss(final World world, final int X, final int Y, final int Z){ - float bDurabilityLoss = 0; - Boolean correctTool = false; - float bHardness = 0; - if (!world.isRemote){ - try { - final Block removalist = world.getBlock(X, Y, Z); - //Utils.LOG_WARNING(removalist.toString()); - - bHardness = removalist.getBlockHardness(world, X, Y, Z); - Logger.WARNING("Hardness: "+bHardness); - - bDurabilityLoss = (bDurabilityLoss + bHardness); - //Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss); - - correctTool = this.canPickaxeBlock(removalist, world, new int[]{X,Y,Z}); - Logger.WARNING(""+correctTool); - - if (!correctTool){ - return 0; - } - - } catch (final NullPointerException e){ - - } - } - return 100; - } - - public Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld, final int[] xyz){ - String correctTool = ""; - if (!currentWorld.isRemote){ - try { - correctTool = currentBlock.getHarvestTool(0); - if (MiningUtils.getBlockType(currentBlock, currentWorld, xyz, this.miningLevel) || correctTool.equals("pickaxe") || correctTool.equals("null")){ - //Utils.LOG_WARNING(correctTool); - return true;} - } catch (final NullPointerException e){ - return false;} - } - return false; - } - - private void GetDestroyOrientation(EntityPlayer entity, final Block block, final String FACING, final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ - float DURABILITY_LOSS = 0; - if (!world.isRemote){ - - Logger.WARNING("hardness:"+block.getBlockHardness(world, X, Y, Z)); - if (FACING.equals("below") || FACING.equals("above")){ - DURABILITY_LOSS = 0; - for(int i = -1; i < 2; i++) { - for(int j = -1; j < 2; j++) { - final float dur = this.calculateDurabilityLoss(world, X + i, Y, Z + j); - DURABILITY_LOSS = (DURABILITY_LOSS + dur); - Logger.WARNING("Added Loss: "+dur); - this.removeBlockAndDropAsItem(world, X + i, Y, Z + j, heldItem); - } - } - } - - else if (FACING.equals("facingEast") || FACING.equals("facingWest")){ - DURABILITY_LOSS = 0; - for(int i = -1; i < 2; i++) { - for(int j = -1; j < 2; j++) { - final float dur = this.calculateDurabilityLoss(world, X, Y + i, Z + j); - DURABILITY_LOSS = (DURABILITY_LOSS + dur); - Logger.WARNING("Added Loss: "+dur); - this.removeBlockAndDropAsItem(world, X , Y + i, Z + j, heldItem); - } - } - } - - else if (FACING.equals("facingNorth") || FACING.equals("facingSouth")){ - DURABILITY_LOSS = 0; - for(int i = -1; i < 2; i++) { - for(int j = -1; j < 2; j++) { - final float dur = this.calculateDurabilityLoss(world, X + j, Y + i, Z); - DURABILITY_LOSS = (DURABILITY_LOSS + dur); - Logger.WARNING("Added Loss: "+dur); - this.removeBlockAndDropAsItem(world, X + j, Y + i, Z, heldItem); - } - } - } - - //int heldItemDurability = heldItem.getDamage(1); - Logger.WARNING("Total Loss: "+(int)DURABILITY_LOSS); - //heldItem.setDamage(heldStack, DURABILITY_LOSS); - //Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); - //Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack)); - Logger.WARNING("1x: "+(heldItem.getItemDamage())); - final int itemdmg = heldItem.getItemDamage(); - final int maxdmg = heldItem.getMaxDamage(); - final int dodmg = (int)DURABILITY_LOSS; - final int durNow = maxdmg-itemdmg; - final int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS); - - Logger.WARNING( - "Current Damage: " + itemdmg - + " Max Damage: " + maxdmg - + " Durability to be lost: " + dodmg - + " Current Durability: " + durNow - + " Remaining Durability: " + durLeft - ); - - - //Break Tool - if (((durNow-dodmg) <= (99)) && (itemdmg != 0)){ - //TODO break tool - Logger.WARNING("Breaking Tool"); - heldItem.stackSize = 0; - } - //Do Damage - else { - //setItemDamage(heldItem, durLeft); - Logger.WARNING(""+(durNow-durLeft)); - this.damageItem(heldItem, (durNow-durLeft)-1, entity); - } - - - /*if (heldItem.getItemDamage() <= ((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)){ - Utils.LOG_WARNING("2: "+DURABILITY_LOSS+" 3: "+((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)); - setItemDamage(heldItem, (int) (heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)); - } - else { - Utils.LOG_WARNING("3: "+( heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage()))); - setItemDamage(heldItem, heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())); - }*/ - //Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); - DURABILITY_LOSS = 0; - - } - } - - public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer){ - item.damageItem(damage, localPlayer); - } - - public void setItemDamage(final ItemStack item, final int damage){ - item.setItemDamage(damage-1); - } - - //Should clear up blocks quicker if I chain it. - public final void removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ - try { - final Block block = world.getBlock(X, Y, Z); - final float dur = this.calculateDurabilityLoss(world, X, Y, Z); - Logger.WARNING(block.toString()); - String removalTool = ""; - removalTool = block.getHarvestTool(1); - - Logger.WARNING("Removing.1 "+removalTool); - /*if ((removalTool.equalsIgnoreCase("pickaxe") || removalTool.equalsIgnoreCase("null") || removalTool == null)){ - Utils.LOG_WARNING("Removing.2"); - if (UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)) { - Utils.LOG_WARNING("Removing.3"); */ - if (this.canPickaxeBlock(block, world, new int[]{X,Y,Z})){ - Logger.WARNING("Removing.4"); - - if (block == Blocks.air){ - return; - } - - if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) >= 0) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ - - Logger.WARNING("Removing.5"); - if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){ - - if (X == 0 && Y == 0 && Z == 0){ - - } - else { - block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); - world.setBlockToAir(X, Y, Z); - } - - } - - } - /*} - - }*/ - } - else { - Logger.WARNING("Incorrect Tool for mining this block."); - } - } catch (final NullPointerException e){ - - } - } - - public boolean checkFacing(final ItemStack aStack, final EntityPlayer aPlayer, final World world){ - if (aPlayer != null){ - final int direction = MathHelper.floor_double((aPlayer.rotationYaw * 4F) / 360F + 0.5D) & 3; - //Utils.LOG_WARNING("Player - F: "+direction); - //Utils.LOG_WARNING("Player - getLookVec(): "+localPlayer.getLookVec().yCoord); - - /*if (localPlayer.getLookVec().yCoord > 0){ - localPlayer.getLookVec().yCoord; - }*/ - - final MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, aPlayer, false); - if (movingobjectposition != null){ - final int sideHit = movingobjectposition.sideHit; - String playerStandingPosition = ""; - if (movingobjectposition != null) { - //System.out.println("Side Hit: "+movingobjectposition.sideHit); - } - - if (sideHit == 0){ - playerStandingPosition = "above"; - setFacingHorizontal(aStack, false); - } - else if (sideHit == 1){ - playerStandingPosition = "below"; - setFacingHorizontal(aStack, false); - } - else if (sideHit == 2){ - playerStandingPosition = "facingSouth"; - setFacingHorizontal(aStack, true); - } - else if (sideHit == 3){ - playerStandingPosition = "facingNorth"; - setFacingHorizontal(aStack, true); - } - else if (sideHit == 4){ - playerStandingPosition = "facingEast"; - setFacingHorizontal(aStack, true); - } - else if (sideHit == 5){ - playerStandingPosition = "facingWest"; - setFacingHorizontal(aStack, true); - } - setLookingDirection(aStack, playerStandingPosition); - - if (direction == 0){ - setFacingDirection(aStack, "south"); - } - else if (direction == 1){ - setFacingDirection(aStack, "west"); - } - else if (direction == 2){ - setFacingDirection(aStack, "north"); - } - else if (direction == 3){ - setFacingDirection(aStack, "east"); - } - } - - - return true; - } - return false; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GRAY+"Mines a 3x3 at 100 durability per block mined."); - list.add(EnumChatFormatting.GRAY+"Durability: "+(stack.getMaxDamage()-stack.getItemDamage())+"/"+stack.getMaxDamage()); - //super.addInformation(stack, aPlayer, list, bool); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.rare; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } - - - @Override - public boolean onBlockStartBreak(final ItemStack itemstack, final int X, final int Y, final int Z, final EntityPlayer aPlayer) { - this.checkFacing(itemstack, aPlayer, aPlayer.getEntityWorld()); - return super.onBlockStartBreak(itemstack, X, Y, Z, aPlayer); - } - - public StaballoyPickaxe(final String unlocalizedName, final ToolMaterial material) { - super(material); - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(1); - this.setMaxDamage(3200); - this.miningLevel = 5; - } -} diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java deleted file mode 100644 index 6265c9f0a3..0000000000 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java +++ /dev/null @@ -1,411 +0,0 @@ -package gtPlusPlus.core.item.tool.staballoy; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemSpade; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.MiningUtils; - -public class StaballoySpade extends ItemSpade{ - - /* (non-Javadoc) - * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) - */ - @Override - public double getDurabilityForDisplay(final ItemStack stack) { - if (super.getDurabilityForDisplay(stack) > 0){ - return super.getDurabilityForDisplay(stack);} - return 0; - } - - - /** - * Creates an NBT tag for this item if it doesn't have one. - * This also set some default values. - * @param rStack - * @return - */ - - private static boolean createNBT(ItemStack rStack){ - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - - tagNBT.setBoolean("FACING_HORIZONTAL", true); - tagNBT.setString("FACING", "north"); - tagNBT.setString("lookingDirection", ""); - - tagMain.setTag("PickStats", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - /* - * Is the player facing horizontally? - */ - - public static final boolean isFacingHorizontal(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - return aNBT.getBoolean("FACING_HORIZONTAL"); - } - } - else { - createNBT(aStack); - } - return true; - } - - public static final boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - aNBT.setBoolean("FACING_HORIZONTAL", aFacingHorizontal); - return true; - } - } - return false; - } - - /* - * Handles the Direction the player is facing - */ - - public static final String getFacingDirection(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - return aNBT.getString("FACING"); - } - } - else { - createNBT(aStack); - } - return "north"; - } - - public static final boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - aNBT.setString("FACING", aFacingHorizontal); - return true; - } - } - return false; - } - - /* - * The Looking Direction handlers - */ - - public static final String getLookingDirection(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - return aNBT.getString("lookingDirection"); - } - } - else { - createNBT(aStack); - } - return ""; - } - - public static final boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("PickStats"); - if (aNBT != null) { - aNBT.setString("lookingDirection", aFacingHorizontal); - return true; - } - } - return false; - } - - private int miningLevel; - - /* - * - * - * - * Methods - * - * - * - */ - - @Override - public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer aPlayer) { - return super.onItemRightClick(stack, world, aPlayer); - } - - - - @Override - public boolean onBlockDestroyed(final ItemStack stack, final World world, final Block block, final int X, final int Y, final int Z, final EntityLivingBase entity) { - if (!world.isRemote){ - if (entity instanceof EntityPlayer) { - this.GetDestroyOrientation((EntityPlayer) entity, getLookingDirection(stack), world, X, Y, Z, stack); - } - } - return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity); - } - - public Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld, final int[] xyz){ - String correctTool = ""; - if (!currentWorld.isRemote){ - try { - correctTool = currentBlock.getHarvestTool(0); - //Utils.LOG_WARNING(correctTool); - - Logger.WARNING("Tool for Block: "+correctTool+" | Current block: "+currentBlock.getLocalizedName()); - if (MiningUtils.getBlockType(currentBlock, currentWorld, xyz, this.miningLevel) || correctTool.equals("shovel")){ - return true;} - } catch (final NullPointerException e){ - return false;} - } - return false; - } - - private void GetDestroyOrientation(EntityPlayer player, final String FACING, final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ - float DURABILITY_LOSS = 0; - if (!world.isRemote){ - - if (FACING.equals("below") || FACING.equals("above")){ - DURABILITY_LOSS = 0; - for(int i = -1; i < 2; i++) { - for(int j = -1; j < 2; j++) { - DURABILITY_LOSS = (DURABILITY_LOSS + this.removeBlockAndDropAsItem(world, X + i, Y, Z + j, heldItem)); - } - } - } - - else if (FACING.equals("facingEast") || FACING.equals("facingWest")){ - DURABILITY_LOSS = 0; - for(int i = -1; i < 2; i++) { - for(int j = -1; j < 2; j++) { - DURABILITY_LOSS = (DURABILITY_LOSS + this.removeBlockAndDropAsItem(world, X , Y + i, Z + j, heldItem)); - } - } - } - - else if (FACING.equals("facingNorth") || FACING.equals("facingSouth")){ - DURABILITY_LOSS = 0; - for(int i = -1; i < 2; i++) { - for(int j = -1; j < 2; j++) { - DURABILITY_LOSS = (DURABILITY_LOSS + this.removeBlockAndDropAsItem(world, X + j, Y + i, Z, heldItem)); - } - } - } - - //int heldItemDurability = heldItem.getDamage(1); - Logger.WARNING("Total Loss: "+(int)DURABILITY_LOSS); - //heldItem.setDamage(heldStack, DURABILITY_LOSS); - //Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); - //Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack)); - Logger.WARNING("1x: "+(heldItem.getItemDamage())); - final int itemdmg = heldItem.getItemDamage(); - final int maxdmg = heldItem.getMaxDamage(); - final int dodmg = (int)DURABILITY_LOSS; - final int durNow = maxdmg-itemdmg; - final int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS); - - Logger.WARNING( - "Current Damage: " + itemdmg - + " Max Damage: " + maxdmg - + " Durability to be lost: " + dodmg - + " Current Durability: " + durNow - + " Remaining Durability: " + durLeft - ); - - - //Break Tool - if (((durNow-dodmg) <= (900)) && (itemdmg != 0)){ - //TODO break tool - Logger.WARNING("Breaking Tool"); - heldItem.stackSize = 0; - } - //Do Damage - else { - //setItemDamage(heldItem, durLeft); - Logger.WARNING(""+(durNow-durLeft)); - this.damageItem(heldItem, (durNow-durLeft)-1, player); - } - DURABILITY_LOSS = 0; - - } - } - - public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer){ - item.damageItem(damage, localPlayer); - } - - public void setItemDamage(final ItemStack item, final int damage){ - item.setItemDamage(damage-1); - } - - //Should clear up blocks quicker if I chain it. - public int removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ - Logger.WARNING("Trying to drop/remove a block."); - try { - final Block block = world.getBlock(X, Y, Z); - Logger.WARNING(block.toString()); - String removalTool = ""; - removalTool = block.getHarvestTool(0); - if (removalTool != null){ - if (removalTool.equals("shovel")){ - if (this.canPickaxeBlock(block, world, new int[]{X,Y,Z})){ - if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ - - final int itemdmg = heldItem.getItemDamage(); - final int maxdmg = heldItem.getMaxDamage(); - final int dodmg = 100; - final int durNow = maxdmg-itemdmg; - final int durLeft = (maxdmg-itemdmg)-100; - - if (((durNow-dodmg) <= (900)) && (itemdmg != 0)){ - //Do Nothing, Tool is useless. - return 0; - } - block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); - world.setBlockToAir(X, Y, Z); - Logger.WARNING("Adding 100 damage to item."); - return 100; - } - Logger.WARNING("Incorrect Tool for mining this block. Wrong Block Water/lava/bedrock/blacklist"); - return 0; - } - Logger.WARNING("Incorrect Tool for mining this block. Cannot Shovel this block type."); - return 0; - } - Logger.WARNING("Incorrect Tool for mining this block. Blocks mining tool is now Shovel."); - return 0; - } - Logger.WARNING("Either the block was air or it declares an invalid mining tool."); - return 0; - } catch (final NullPointerException e){ - Logger.WARNING("Something Broke"); - e.printStackTrace(); - return 0; - } - } - - public boolean checkFacing(final ItemStack aStack, final EntityPlayer aPlayer, final World world){ - if (aPlayer != null){ - final int direction = MathHelper.floor_double((aPlayer.rotationYaw * 4F) / 360F + 0.5D) & 3; - //Utils.LOG_WARNING("Player - F: "+direction); - //Utils.LOG_WARNING("Player - getLookVec(): "+localPlayer.getLookVec().yCoord); - - /*if (localPlayer.getLookVec().yCoord > 0){ - localPlayer.getLookVec().yCoord; - }*/ - - final MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, aPlayer, false); - if (movingobjectposition != null){ - final int sideHit = movingobjectposition.sideHit; - String playerStandingPosition = ""; - if (movingobjectposition != null) { - //System.out.println("Side Hit: "+movingobjectposition.sideHit); - } - - if (sideHit == 0){ - playerStandingPosition = "above"; - setFacingHorizontal(aStack, false); - } - else if (sideHit == 1){ - playerStandingPosition = "below"; - setFacingHorizontal(aStack, false); - } - else if (sideHit == 2){ - playerStandingPosition = "facingSouth"; - setFacingHorizontal(aStack, true); - } - else if (sideHit == 3){ - playerStandingPosition = "facingNorth"; - setFacingHorizontal(aStack, true); - } - else if (sideHit == 4){ - playerStandingPosition = "facingEast"; - setFacingHorizontal(aStack, true); - } - else if (sideHit == 5){ - playerStandingPosition = "facingWest"; - setFacingHorizontal(aStack, true); - } - setLookingDirection(aStack, playerStandingPosition); - - if (direction == 0){ - setFacingDirection(aStack, "south"); - } - else if (direction == 1){ - setFacingDirection(aStack, "west"); - } - else if (direction == 2){ - setFacingDirection(aStack, "north"); - } - else if (direction == 3){ - setFacingDirection(aStack, "east"); - } - } - - - return true; - } - return false; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GOLD+"Spades a 3x3 area in the direction you are facing."); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return EnumRarity.rare; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - return true; - } - - - @Override - public boolean onBlockStartBreak(final ItemStack itemstack, final int X, final int Y, final int Z, final EntityPlayer aPlayer) { - this.checkFacing(itemstack, aPlayer, aPlayer.worldObj); - return super.onBlockStartBreak(itemstack, X, Y, Z, aPlayer); - } - public StaballoySpade(final String unlocalizedName, final ToolMaterial material) { - super(material); - this.setUnlocalizedName(unlocalizedName); - this.setTextureName(CORE.MODID + ":" + unlocalizedName); - this.setMaxStackSize(1); - this.setMaxDamage(3200); - } -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/WearableLoader.java b/src/Java/gtPlusPlus/core/item/wearable/WearableLoader.java deleted file mode 100644 index 6912b4e771..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/WearableLoader.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.item.wearable; - -import gtPlusPlus.core.item.wearable.armour.ArmourLoader; - -public class WearableLoader { - - public static void run() { - execute(); - } - - private static void execute() { - ArmourLoader.run(); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java b/src/Java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java deleted file mode 100644 index 6918f2b048..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java +++ /dev/null @@ -1,41 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.core.item.wearable.armour.tinfoil.ArmourTinFoilHat; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor.ArmorMaterial; - -import net.minecraftforge.common.util.EnumHelper; - -public class ArmourLoader { - - //Glass - public static Item ClearGlassChestplate; - public static Item ClearGlassBoots; - public static Item ClearGlassLeggings; - public static Item ClearGlassHelmet; - - //Tin Foil - public static Item TinFoilHat; - - public static ArmorMaterial ClearGlassArmour = EnumHelper.addArmorMaterial("ClearGlassArmor", 1, new int[] {1, 1, 1, 1}, 100); - public static ArmorMaterial TinFoilArmour = EnumHelper.addArmorMaterial("TINFOIL", 5, new int[]{1, 1, 1, 1}, 50); - - - public static void run() { - glassArmour(); - tinfoilArmour(); - } - - private static void glassArmour() { - //RenderingRegistry.addNewArmourRendererPrefix("ClearGlassArmor"); This needs to be client side only TODO - //ClearGlassHelmet = new ClearGlassArmor(2055, ClearGlassArmor, 5, 0).setUnlocalizedName("amethyst_helmet"); - } - - private static void tinfoilArmour() { - TinFoilHat = new ArmourTinFoilHat().setUnlocalizedName("itemHatTinFoil"); - GameRegistry.registerItem(TinFoilHat, "itemHatTinFoil", CORE.MODID); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java b/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java deleted file mode 100644 index 0c6a547d34..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.base; - -import gtPlusPlus.core.item.wearable.base.BaseItemWearable; - -public abstract class BaseArmour extends BaseItemWearable { - - public BaseArmour(ArmorMaterial material, int renderIndex, int armourType) { - super(material, renderIndex, armourType); - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java b/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java deleted file mode 100644 index 2ace8919d0..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.base; - -public abstract class BaseArmourBoots extends BaseArmour { - - public BaseArmourBoots(ArmorMaterial material, int renderIndex) { - super(material, renderIndex, 3); - // TODO Auto-generated constructor stub - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java b/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java deleted file mode 100644 index 16899c4229..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.base; - -public abstract class BaseArmourChest extends BaseArmour { - - public BaseArmourChest(ArmorMaterial material, int renderIndex) { - super(material, renderIndex, 1); - // TODO Auto-generated constructor stub - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java b/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java deleted file mode 100644 index c3676277eb..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.base; - -public abstract class BaseArmourHelm extends BaseArmour { - - public BaseArmourHelm(ArmorMaterial material, int renderIndex) { - super(material, renderIndex, 0); - // TODO Auto-generated constructor stub - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java b/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java deleted file mode 100644 index 9794a713ac..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.base; - -public abstract class BaseArmourLegs extends BaseArmour { - - public BaseArmourLegs(ArmorMaterial material, int renderIndex) { - super(material, renderIndex, 2); - // TODO Auto-generated constructor stub - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java b/src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java deleted file mode 100644 index 9fd7bf7020..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java +++ /dev/null @@ -1,117 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.hazmat; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.item.wearable.armour.ArmourLoader; -import gtPlusPlus.core.item.wearable.armour.base.BaseArmourHelm; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class ArmourHazmat extends BaseArmourHelm { - - public IIcon iconHelm; - - public ArmourHazmat() { - super(ArmourLoader.TinFoilArmour, 0); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ir) { - this.iconHelm = ir.registerIcon(CORE.MODID + ":itemHatTinFoil"); - } - - @Override - public int getRenderIndex() { - return 0; - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) { - return this.iconHelm; - } - - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return CORE.MODID + ":textures/models/TinFoil.png"; - } - - public EnumRarity getRarity(ItemStack itemstack) { - return EnumRarity.rare; - } - - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { - return false; - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - return super.getArmorDisplay(player, armor, slot); - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - - } - - @SuppressWarnings({ "unchecked" }) - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - aList.add("DoomSquirter's protection against cosmic radiation!"); - aList.add("General paranoia makes the wearer unable to collect xp"); - aList.add("Movement speed is also reduced, to keep you safe"); - aList.add("This hat may also have other strange powers"); - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, - int slot) { - return new ArmorProperties(0, 0, 0); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, - EntityLivingBase p_111207_3_) { - return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_); - } - - @Override - public void onUpdate(ItemStack aStack, World aWorld, Entity aEntity, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(aStack, aWorld, aEntity, p_77663_4_, p_77663_5_); - } - - @Override - public boolean onEntityItemUpdate(EntityItem entityItem) { - return super.onEntityItemUpdate(entityItem); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if (itemStack != null && player != null && world != null && !world.isRemote) { - if (player instanceof EntityPlayer) { - - } - } - super.onArmorTick(world, player, itemStack); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java b/src/Java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java deleted file mode 100644 index c1fe96efb5..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java +++ /dev/null @@ -1,183 +0,0 @@ -package gtPlusPlus.core.item.wearable.armour.tinfoil; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.wearable.armour.ArmourLoader; -import gtPlusPlus.core.item.wearable.armour.base.BaseArmourHelm; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityBoat; -import net.minecraft.entity.item.EntityEnderEye; -import net.minecraft.entity.item.EntityEnderPearl; -import net.minecraft.entity.item.EntityExpBottle; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityEgg; -import net.minecraft.entity.projectile.EntityFireball; -import net.minecraft.entity.projectile.EntitySnowball; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class ArmourTinFoilHat extends BaseArmourHelm { - - public IIcon iconHelm; - - public ArmourTinFoilHat() { - super(ArmourLoader.TinFoilArmour, 0); - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister ir) { - this.iconHelm = ir.registerIcon(CORE.MODID + ":itemHatTinFoil"); - } - - @Override - public int getRenderIndex() { - return 0; - } - - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int par1) { - return this.iconHelm; - } - - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - return CORE.MODID + ":textures/models/TinFoil.png"; - } - - public EnumRarity getRarity(ItemStack itemstack) { - return EnumRarity.uncommon; - } - - public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { - return false; - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - return super.getArmorDisplay(player, armor, slot); - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - aList.add("DoomSquirter's protection against cosmic radiation!"); - aList.add("General paranoia makes the wearer unable to collect xp"); - aList.add("Movement speed is also reduced, to keep you safe"); - aList.add("This hat may also have other strange powers"); - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, - int slot) { - return new ArmorProperties(0, 0, 0); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, - EntityLivingBase p_111207_3_) { - return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_); - } - - @Override - public void onUpdate(ItemStack aStack, World aWorld, Entity aEntity, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(aStack, aWorld, aEntity, p_77663_4_, p_77663_5_); - } - - @Override - public boolean onEntityItemUpdate(EntityItem entityItem) { - return super.onEntityItemUpdate(entityItem); - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { - if (itemStack != null && player != null && world != null && !world.isRemote) { - if (player instanceof EntityPlayer) { - - // Apply Slow - if (!GT_Utility.getPotion(player, Potion.moveSlowdown.id)) { - player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2, 1, true)); - } - - // Move Xp orbs away - try { - AxisAlignedBB box = player.boundingBox; - box.maxX = player.posX + 5; - box.maxY = player.posY + 5; - box.maxZ = player.posZ + 5; - box.minX = player.posX - 5; - box.minY = player.posY - 5; - box.minZ = player.posZ - 5; - @SuppressWarnings("unchecked") - List g = world.getEntitiesWithinAABBExcludingEntity(player, box); - if (g.size() > 0) { - for (Entity e : g) { - if (e != null) { - if ( - !EntityXPOrb.class.isInstance(e) && - !EntityBoat.class.isInstance(e) && - !EntitySnowball.class.isInstance(e) && - !EntityFireball.class.isInstance(e) && - !EntityEgg.class.isInstance(e) && - !EntityExpBottle.class.isInstance(e) && - !EntityEnderEye.class.isInstance(e) && - !EntityEnderPearl.class.isInstance(e) - ) { - continue; - } - else { - //Logger.INFO("Found "+e.getClass().getName()); - double distX = player.posX - e.posX; - double distZ = player.posZ - e.posZ; - double distY = e.posY + 1.5D - player.posY; - double dir = Math.atan2(distZ, distX); - double speed = 1F / e.getDistanceToEntity(player) * 0.5; - speed = -speed; - if (distY < 0) { - e.motionY += speed; - } - e.motionX = Math.cos(dir) * speed; - e.motionZ = Math.sin(dir) * speed; - } - - - } - } - } - } catch (Throwable t) { - } - } - } - - super.onArmorTick(world, player, itemStack); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java b/src/Java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java deleted file mode 100644 index f23079bc8b..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.core.item.wearable.base; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; - -import net.minecraftforge.common.ISpecialArmor; - -public abstract class BaseItemWearable extends ItemArmor implements ISpecialArmor { - - public BaseItemWearable(ArmorMaterial material, int renderIndex, int armourType) { - super(material, renderIndex, armourType); - } - - public abstract int getRenderIndex(); - - - - @Override - public abstract ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, - int slot); - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public abstract void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot); - - public void dyeArmour(ItemStack aArmour, int aColour) { - func_82813_b(aArmour, aColour); - } - - @Override - public void func_82813_b(ItemStack p_82813_1_, int p_82813_2_) { - NBTTagCompound nbttagcompound = p_82813_1_.getTagCompound(); - if (nbttagcompound == null) { - nbttagcompound = new NBTTagCompound(); - p_82813_1_.setTagCompound(nbttagcompound); - } - NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("display"); - if (!nbttagcompound.hasKey("display", 10)) { - nbttagcompound.setTag("display", nbttagcompound1); - } - nbttagcompound1.setInteger("color", p_82813_2_); - } - - @Override - public void removeColor(ItemStack p_82815_1_) { - NBTTagCompound nbttagcompound = p_82815_1_.getTagCompound(); - if (nbttagcompound != null) { - NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("display"); - if (nbttagcompound1.hasKey("color")) { - nbttagcompound1.removeTag("color"); - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java b/src/Java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java deleted file mode 100644 index 1f8009e54a..0000000000 --- a/src/Java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.core.item.wearable.hazmat; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.ic2.CustomInternalName; -import ic2.core.IC2; -import ic2.core.init.InternalName; -import ic2.core.item.armor.ItemArmorHazmat; -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; - -public class ItemArmorHazmatEx extends ItemArmorHazmat { - - public static void init() { - GregtechItemList.Armour_Hazmat_Advanced_Helmet.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatHelmetEx, 0))); - GregtechItemList.Armour_Hazmat_Advanced_Chest.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatChestEx, 1))); - GregtechItemList.Armour_Hazmat_Advanced_Legs.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatLegsEx, 2))); - GregtechItemList.Armour_Hazmat_Advanced_Boots.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatBootsEx, 3))); - } - - private ItemArmorHazmatEx(InternalName internalName, int type) { - super(internalName, type); - this.setMaxDamage(256); - } - - @Override - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - int suffix = this.armorType == 2 ? 2 : 1; - return IC2.textureDomain + ":textures/armor/" + "hazmatEx_" + suffix + ".png"; - } - -} diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java deleted file mode 100644 index dfd536d21c..0000000000 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ /dev/null @@ -1,363 +0,0 @@ -package gtPlusPlus.core.lib; - -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -import com.mojang.authlib.GameProfile; - -import cpw.mods.fml.common.FMLCommonHandler; -import gregtech.api.GregTech_API; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.common.util.FakePlayerFactory; - -public class CORE { - - //import cpw.mods.fml.common.Optional; - - //Analytics handler - //public static SegmentAnalytics mHelper; - - public static Map PlayerCache; - - //Math Related - public static final float PI = (float) Math.PI; - public static volatile Random RANDOM = new XSTR(); - - //Env. Variables - public static Configuration Config; - - public static boolean DEVENV = false; - public static boolean NBT_PERSISTENCY_PATCH_APPLIED = false; - //Only can be set in Dev, no config or setting elsewhere. - public static final boolean LOAD_ALL_CONTENT = false;; - - //Mod Variables - - public static final String name = "GT++"; - public static final String MODID = "miscutils"; - public static final String VERSION = "1.7.15-GTNH"; - - //Tweakables - public static int EVERGLADES_ID = 227; - public static int EVERGLADESBIOME_ID = 238; - public static int AUSTRALIA_ID = 228; - public static int AUSTRALIA_BIOME_DESERT_1_ID = 239; - public static int AUSTRALIA_BIOME_DESERT_2_ID = 240; - public static int AUSTRALIA_BIOME_DESERT_3_ID = 241; - public static int AUSTRALIA_BIOME_PLAINS_ID = 242; - public static int AUSTRALIA_BIOME_OUTBACK_ID = 243; - public static int AUSTRALIA_BIOME_OCEAN_ID = 244; - public static int AUSTRALIA_BIOME_FOREST_ID = 245; - - //GT Vars; - public static final int GREG_FIRST_ID = 760; - public static final boolean MAIN_GREGTECH_5U_EXPERIMENTAL_FORK = Meta_GT_Proxy.areWeUsingGregtech5uExperimental(); - public static final int GREGTECH_API_VERSION = GregTech_API.VERSION; - public static int turbineCutoffBase = 75000; - - //GT++ Fake Player Profile - public static final GameProfile gameProfile = new GameProfile(UUID.nameUUIDFromBytes("gtplusplus.core".getBytes()), "[GT++]"); - public static final WeakHashMap fakePlayerCache = new WeakHashMap(); - //Tooltips; - public static final String GT_Tooltip = "Added by: " + EnumChatFormatting.DARK_GREEN+"Alkalus "+EnumChatFormatting.GRAY+"- "+EnumChatFormatting.RED+"[GT++]"; - public static final String GT_Tooltip_Builder = "" + EnumChatFormatting.DARK_GREEN+"Alkalus "+EnumChatFormatting.GRAY+"- "+EnumChatFormatting.RED+"[GT++]"; - public static final String GT_Tooltip_Radioactive = EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.GREEN+"Radioactive! "+EnumChatFormatting.GOLD+" Avoid direct handling without hazmat protection."; - public static final String noItem = ""; - - //Because I want to be lazy Gregtech New Horizons Var. - public static boolean GTNH = false; - //Because I want to be lazy. Beyond Reality Classic Var. - public static boolean BRC = false; - - public static final String SEPERATOR = "/"; - - - /** - * Lists/Maps - */ - - //Burnables List - public static List> burnables = new ArrayList>(); - - - //TesseractMapss - public static final Map> sTesseractGeneratorOwnershipMap = new HashMap>(); - public static final Map> sTesseractTerminalOwnershipMap = new HashMap>(); - - //BookMap - public static final Map sBookList = new ConcurrentHashMap(); - - - - - /** - * Some Gregtech Material and Recipe Variables - */ - - @Deprecated - public static IGregtech_RecipeAdder sRecipeAdder; - public static IGregtech_RecipeAdder RA; - - public static final GT_Materials[] sMU_GeneratedMaterials = new GT_Materials[1000]; - - /** - * File Paths and Resource Paths - */ - - public static final String - TEX_DIR = "textures/", - TEX_DIR_GUI = TEX_DIR + "gui/", - TEX_DIR_ITEM = TEX_DIR + "items/", - TEX_DIR_BLOCK = TEX_DIR + "blocks/", - TEX_DIR_ENTITY = TEX_DIR + "entity/", - TEX_DIR_ASPECTS = TEX_DIR + "aspects/", - TEX_DIR_FLUIDS = TEX_DIR_BLOCK + "fluids/", - RES_PATH = MODID + ":" + TEX_DIR, - RES_PATH_GUI = MODID + ":" + TEX_DIR_GUI, - RES_PATH_ITEM = MODID + ":" + TEX_DIR_ITEM, - RES_PATH_BLOCK = MODID + ":" + TEX_DIR_BLOCK, - RES_PATH_ENTITY = MODID + ":" + TEX_DIR_ENTITY, - RES_PATH_ASPECTS = MODID + ":" + TEX_DIR_ASPECTS, - RES_PATH_FLUIDS = MODID + ":" + TEX_DIR_FLUIDS; - - - - - /** Used to create a {@link EntityPlayer} instance from {@link FakePlayerFactory}. - * If this instance already exists in the cache, we will return that instead. - * These instances are held via weak reference, if the world object is unloaded, they too will be removed. - * This is the suggested way to handle them, as suggested by Forge. - * - * @param world - The {@link World} object for which you want to check for in the cache. - * This object is used as a weak reference in a {@link WeakHashMap}. - * @return - An {@link EntityPlayerMP} instance, returned either from cache or created and cached prior to return. - */ - public static EntityPlayerMP getFakePlayer(World world) { - if (fakePlayerCache.get(world) == null) { - fakePlayerCache.put(world, FakePlayerFactory.get((WorldServer) world, CORE.gameProfile)); - } - return fakePlayerCache.get(world); - } - - - - - - - - - - - - - - - - - - /* - * Config Switch Class - */ - - public static class ConfigSwitches { - //Debug - public static boolean disableEnderIOIntegration = false; - public static boolean disableEnderIOIngotTooltips = false; - public static boolean MACHINE_INFO = true; - public static boolean showHiddenNEIItems = false; - public static boolean dumpItemAndBlockData = false; - - //Tools - public static boolean enableSkookumChoochers = true; - public static boolean enableMultiSizeTools = true; - - //Block Drops - public static int chanceToDropDrainedShard = 196; - public static int chanceToDropFluoriteOre = 32; - - //Machine Related - public static boolean enableAlternativeBatteryAlloy = false; - public static boolean enableThaumcraftShardUnification = false; - public static boolean disableIC2Recipes = false; - public static boolean enableAlternativeDivisionSigilRecipe = false; - public static int boilerSteamPerSecond = 750; - public static final boolean requireControlCores = false; - - //Feature Related - public static boolean enableCustomCapes = false; - public static boolean enableCustomCircuits = true; - public static boolean enableOldGTcircuits = false; - public static boolean disableZombieReinforcement = false; - public static int enableWatchdogBGM = CORE_Preloader.enableWatchdogBGM; - - //GT Fixes - public static boolean enableNitroFix = false; - public static boolean enableSulfuricAcidFix = false; - public static boolean enableAnimatedTurbines = true; - public static boolean enableHarderRecipesForHighTierCasings = true; - - //Single Block Machines - public static boolean enableMachine_SolarGenerators = false; - public static boolean enableMachine_Safes = true; - public static boolean enableMachine_Dehydrators = true; - public static boolean enableMachine_SteamConverter = true; - public static boolean enableMachine_FluidTanks = true; - public static boolean enableMachine_RocketEngines = true; - public static boolean enableMachine_GeothermalEngines = true; - public static boolean enableMachine_WorldAccelerators = true; - public static boolean enableMachine_Tesseracts = true; - public static boolean enableMachine_SimpleWasher = true; - public static boolean enableMachine_Pollution = true; - public static boolean enableMachine_ComponentAssemblers = false; - public static boolean enableCustom_Pipes = true; - public static boolean enableCustom_Cables = true; - public static boolean enableMachine_RF_Convetor = false; - - //Multiblocks - public static boolean enableMultiblock_AlloyBlastSmelter = true; - public static boolean enableMultiblock_IndustrialCentrifuge = true; - public static boolean enableMultiblock_IndustrialCokeOven = true; - public static boolean enableMultiblock_IndustrialElectrolyzer = true; - public static boolean enableMultiblock_IndustrialMacerationStack = true; - public static boolean enableMultiblock_IndustrialPlatePress = true; - public static boolean enableMultiblock_IndustrialWireMill = true; - public static boolean enableMultiblock_IronBlastFurnace = true; - public static boolean enableMultiblock_MatterFabricator = true; - public static boolean enableMultiblock_MultiTank = true; - public static boolean enableMultiblock_PowerSubstation = true; - public static boolean enableMultiblock_LiquidFluorideThoriumReactor = true; - public static boolean enableMultiblock_NuclearFuelRefinery = true; - public static boolean enableMultiblock_TreeFarmer = true; - public static boolean enableMultiblock_IndustrialSifter = true; - public static boolean enableMultiblock_IndustrialThermalCentrifuge = true; - public static boolean enableMultiblock_IndustrialWashPlant = true; - public static boolean enableMultiblock_LargeAutoCrafter = true; - public static boolean enableMultiblock_ThermalBoiler = true; - public static boolean enableMultiblock_IndustrialCuttingMachine = true; - public static boolean enableMultiblock_IndustrialFishingPort = true; - public static boolean enableMultiblock_IndustrialExtrudingMachine = true; - public static boolean enableMultiblock_IndustrialMultiMachine = true; - public static boolean enableMultiblock_Cyclotron = true; - - //Visuals - public static boolean enableTreeFarmerParticles = true; - public static boolean useGregtechTextures = true; - - //Pollution - public static int pollutionPerSecondMultiPackager = 40; - public static int pollutionPerSecondMultiIndustrialAlloySmelter = 300; - public static int pollutionPerSecondMultiIndustrialArcFurnace = 2400; - public static int pollutionPerSecondMultiIndustrialCentrifuge = 300; - public static int pollutionPerSecondMultiIndustrialCokeOven = 80; - public static int pollutionPerSecondMultiIndustrialCuttingMachine = 160; - public static int pollutionPerSecondMultiIndustrialDehydrator = 500; - public static int pollutionPerSecondMultiIndustrialElectrolyzer = 300; - public static int pollutionPerSecondMultiIndustrialExtruder = 1000; - public static int pollutionPerSecondMultiIndustrialMacerator = 400; - public static int pollutionPerSecondMultiIndustrialMixer = 800; - public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal = 400; - public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid = 400; - public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = 600; - public static int pollutionPerSecondMultiIndustrialPlatePress_ModeForming = 240; - public static int pollutionPerSecondMultiIndustrialPlatePress_ModeBending = 480; - public static int pollutionPerSecondMultiIndustrialSifter = 40; - public static int pollutionPerSecondMultiIndustrialThermalCentrifuge = 1000; - public static int pollutionPerSecondMultiIndustrialVacuumFreezer = 500; - public static int pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath = 400; - public static int pollutionPerSecondMultiIndustrialWashPlant_ModeWasher = 100; - public static int pollutionPerSecondMultiIndustrialWireMill = 100; - public static int pollutionPerSecondMultiIsaMill = 1280; - public static int pollutionPerSecondMultiAdvDistillationTower_ModeDistillery = 240; - public static int pollutionPerSecondMultiAdvDistillationTower_ModeDT = 480; - public static int pollutionPerSecondMultiAdvEBF = 500; - public static int pollutionPerSecondMultiAdvImplosion = 5000; - public static int pollutionPerSecondMultiABS = 200; - public static int pollutionPerSecondMultiCyclotron = 200; - public static int pollutionPerSecondMultiIndustrialFishingPond = 20; - public static int pollutionPerSecondMultiLargeRocketEngine; - public static int pollutionPerSecondMultiLargeSemiFluidGenerator = 1280; - public static int pollutionPerSecondMultiMassFabricator = 40; - public static int pollutionPerSecondMultiRefinery = 4000; - public static int pollutionPerSecondMultiGeneratorArray; - public static int pollutionPerSecondMultiTreeFarm = 100; - public static int pollutionPerSecondMultiFrothFlotationCell = 0; - public static int pollutionPerSecondMultiAutoCrafter = 500; - public static int pollutionPerSecondMultiThermalBoiler = 700; - public static int pollutionPerSecondMultiAlgaePond = 0; - //pollution single blocks - public static int basePollutionPerSecondSemiFluidGenerator = 40; - public static double[] pollutionReleasedByTierSemiFluidGenerator = new double[]{0,2.0,4.0,8.0}; - public static int basePollutionPerSecondBoiler = 35; - public static double[] pollutionReleasedByTierBoiler = new double[]{0,1.0,1.43, 1.86}; - public static int baseMinPollutionPerSecondRocketFuelGenerator = 250; - public static int baseMaxPollutionPerSecondRocketFuelGenerator = 2000; - public static double[] pollutionReleasedByTierRocketFuelGenerator = new double[]{0,0,0,0,1,2,3}; - public static int basePollutionPerSecondGeothermalGenerator = 100; - public static double[] pollutionReleasedByTierGeothermalGenerator = new double[]{0,0,0,0,1,1,1}; - - } - - public static class Everglades{ - public static final String MODID = "ToxicEverglades"; - public static final String NAME = "GT++ Toxic Everglades"; - public static final String VERSION = "0.1"; - } - - public static class Australia{ - public static final String MODID = "Australia"; - public static final String NAME = "GT++ Australia"; - public static final String VERSION = "0.1"; - } - - - public static final void crash() { - crash("Generic Crash"); - } - - public static final void crash(String aReason) { - Logger.INFO("=========================================================="); - Logger.INFO("[GT++ CRASH]"); - Logger.INFO("=========================================================="); - Logger.INFO("Oooops..."); - Logger.INFO("This should only happy in a development environment or when something really bad happens."); - Logger.INFO("Reason: "+aReason); - Logger.INFO("=========================================================="); - Logger.INFO("Called from: "+ReflectionUtils.getMethodName(1)); - Logger.INFO(ReflectionUtils.getMethodName(2)); - Logger.INFO(ReflectionUtils.getMethodName(3)); - Logger.INFO(ReflectionUtils.getMethodName(4)); - Logger.INFO(ReflectionUtils.getMethodName(5)); - Logger.INFO(ReflectionUtils.getMethodName(6)); - Logger.INFO(ReflectionUtils.getMethodName(7)); - Logger.INFO(ReflectionUtils.getMethodName(8)); - Logger.INFO(ReflectionUtils.getMethodName(9)); - Logger.INFO(ReflectionUtils.getMethodName(10)); - Logger.INFO(ReflectionUtils.getMethodName(11)); - Logger.INFO(ReflectionUtils.getMethodName(12)); - Logger.INFO(ReflectionUtils.getMethodName(13)); - Logger.INFO(ReflectionUtils.getMethodName(14)); - Logger.INFO(ReflectionUtils.getMethodName(15)); - FMLCommonHandler.instance().exitJava(0, true); - } - - public static final void gc() { - System.gc(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java deleted file mode 100644 index 1eb8351d65..0000000000 --- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java +++ /dev/null @@ -1,348 +0,0 @@ -package gtPlusPlus.core.lib; - -import static gtPlusPlus.core.lib.CORE.*; - -import java.util.HashMap; - -import cpw.mods.fml.common.Loader; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechTextures; -import gtPlusPlus.xmod.gregtech.recipes.GregtechRecipeAdder; - -public class LoadedMods { - - //Initialize Variables - public static boolean Gregtech = false; - public static boolean PlayerAPI = false; - public static boolean BuildCraft = false; - public static boolean EnderIO = false; - public static boolean Big_Reactors = false; - public static boolean IndustrialCraft2 = false; - public static boolean IndustrialCraft2Classic = false; - public static boolean Simply_Jetpacks = false; - public static boolean RFTools = false; - public static boolean Thaumcraft = false; - public static boolean Baubles = false; - public static boolean Extra_Utils = false; - public static boolean PneumaticCraft = false; - public static boolean MorePlanets = false; - public static boolean ForbiddenMagic = false; - public static boolean CompactWindmills = false; - public static boolean Railcraft = false; - public static boolean ImmersiveEngineering = false; - public static boolean Growthcraft = false; - public static boolean CoFHCore = false; - public static boolean Forestry = false; - public static boolean MagicBees = false; - public static boolean ExtraBees = false; - public static boolean Psychedelicraft = false; - public static boolean MiscUtils = true; //Dummy For MetaData Lookups in MT Wrapper - public static boolean ThermalFoundation = false; - public static boolean IHL = false; - public static boolean OpenComputers = false; //OpenComputers - public static boolean OpenBlocks = false; - public static boolean Computronics = false; //computronics - public static boolean DreamCraft = false; //GT: New Horizons - public static boolean BeyondRealityCore = false; //Beyond Reality - Probably Classic - public static boolean BiomesOPlenty = false; - public static boolean PamsHarvestcraft = false; - public static boolean GalacticraftCore = false; - public static boolean Mekanism = false; - public static boolean RedTech = false; //RedMage's Mod - public static boolean TecTech = false; //Technus' Mod - public static boolean KekzTech = false; //KekzDealers' Mod - public static boolean TiCon = false; - public static boolean StevesCarts = false; - public static boolean Witchery = false; - public static boolean Waila = false; - public static boolean CropsPlusPlus = false; //Barts Crop Mod - public static boolean Reliquary = false; - public static boolean SpiceOfLife = false; - - - - private static int totalMods; - @SuppressWarnings("deprecation") - public static void checkLoaded(){ - Logger.INFO("Looking for optional mod prereqs."); - if (isModLoaded("gregtech") ){ - Gregtech = true; - Logger.INFO("Components enabled for: Gregtech"); - if (Gregtech){ - try { - CORE.sRecipeAdder = CORE.RA = new GregtechRecipeAdder(); - Logger.INFO("Created Gregtech recipe handler."); - GregtechTextures.BlockIcons.VOID.name(); - GregtechTextures.ItemIcons.VOID.name(); - Logger.INFO("Created Gregtech texture handler."); - } catch (final NullPointerException e){ - Logger.INFO("Could NOT create a Gregtech recipe handler."); - } - } - - totalMods++; - } - if (isModLoaded("dreamcraft")){ - DreamCraft = true; - GTNH = true; - Logger.INFO("Components enabled for: DreamCraft"); - Logger.INFO("Components enabled for: GT: New Horizons"); - totalMods++; - } - if (isModLoaded("beyondrealitycore")){ - BeyondRealityCore = true; - BRC = true; - Logger.INFO("Components enabled for: Beyond Reality"); - totalMods++; - } - if (isModLoaded("PlayerAPI")){ - PlayerAPI = true; - Logger.INFO("Components enabled for: PlayerAPI"); - totalMods++; - } - if (isModLoaded("berriespp")) { - CropsPlusPlus = true; - Logger.INFO("Components enabled for: Crops++"); - totalMods++; - } - if (isModLoaded("xreliquary")) { - Reliquary = true; - Logger.INFO("Components enabled for: Reliquary"); - totalMods++; - } - if (isModLoaded("TConstruct")){ - TiCon = true; - Logger.INFO("Components enabled for: Tinkers Construct"); - totalMods++; - } - if (isModLoaded("BuildCraft")){ - BuildCraft = true; - Logger.INFO("Components enabled for: BuildCraft"); - totalMods++; - } - if ((isModLoaded("EnderIO")) && !ConfigSwitches.disableEnderIOIntegration){ - EnderIO = true; - Logger.INFO("Components enabled for: EnderIO"); - totalMods++; - } - if (isModLoaded("BigReactors")){ - Big_Reactors = true; - Logger.INFO("Components enabled for: Big Reactors"); - totalMods++; - } - if (isModLoaded("IC2")){ - IndustrialCraft2 = true; - Logger.INFO("Components enabled for: IndustrialCraft2"); - totalMods++; - } - if (isModLoaded("IC2-Classic-Spmod")){ - IndustrialCraft2Classic = true; - Logger.INFO("Components enabled for: IndustrialCraft2-Classic"); - totalMods++; - } - if (isModLoaded("simplyjetpacks")){ - Simply_Jetpacks = true; - Logger.INFO("Components enabled for: Simply Jetpacks"); - totalMods++; - } - if (isModLoaded("rftools")){ - RFTools = true; - Logger.INFO("Components enabled for: RFTools"); - totalMods++; - } - if (isModLoaded("StevesCarts")){ - StevesCarts = true; - Logger.INFO("Components enabled for: StevesCarts"); - totalMods++; - } - if (isModLoaded("OpenBlocks")){ - OpenBlocks = true; - Logger.INFO("Components enabled for: OpenBlocks"); - totalMods++; - } - if (isModLoaded("Thaumcraft")){ - Thaumcraft = true; - Logger.INFO("Components enabled for: Thaumcraft"); - totalMods++; - } - if (isModLoaded("BiomesOPlenty")){ - BiomesOPlenty = true; - Logger.INFO("Components enabled for: BiomesOPlenty"); - totalMods++; - } - if (isModLoaded("ExtraUtilities")){ - Extra_Utils = true; - Logger.INFO("Components enabled for: Extra_Utils"); - totalMods++; - } - if (isModLoaded("harvestcraft")){ - PamsHarvestcraft = true; - Logger.INFO("Components enabled for: PamsHarvestcraft"); - totalMods++; - } - if (isModLoaded("PneumaticCraft")){ - PneumaticCraft = true; - Logger.INFO("Components enabled for: PneumaticCraft"); - totalMods++; - } - if (isModLoaded("MorePlanet")){ - MorePlanets = true; - Logger.INFO("Components enabled for: MorePlanets"); - totalMods++; - } - if (isModLoaded("ForbiddenMagic")){ - ForbiddenMagic = true; - Logger.INFO("Components enabled for: ForbiddenMagic"); - totalMods++; - } - if (isModLoaded("CompactWindmills")){ - CompactWindmills = true; - Logger.INFO("Components enabled for: CompactWindmills"); - totalMods++; - } - if (isModLoaded("Railcraft")){ - Railcraft = true; - Logger.INFO("Components enabled for: Railcraft"); - totalMods++; - } - if (isModLoaded("Waila")){ - Waila = true; - Logger.INFO("Components enabled for: WAILA"); - totalMods++; - } - if (isModLoaded("SpiceOfLife")){ - SpiceOfLife = true; - Logger.INFO("Components enabled for: Spice Of Life"); - totalMods++; - } - if (isModLoaded("Mekanism")){ - Mekanism = true; - Logger.INFO("Components enabled for: Mekanism - This feature is not configurable and balances Mekanism to suit GT."); - totalMods++; - } - if (isModLoaded("Growthcraft")){ - Logger.INFO("Growthcraft Version: "+getModVersion("Growthcraft")); - if (getModVersion("Growthcraft").equals("1.7.10-2.3.1")){ - //Load Growthcraft Compat - Growthcraft = true; - Logger.INFO("Components enabled for: Growthcraft"); - totalMods++; - } - else { - Growthcraft = false; - Logger.INFO("Growthcraft found, but the version was too new. I will update GC support eventually."); - } - } - if (isModLoaded("CoFHCore")){ - CoFHCore = true; - Logger.INFO("Components enabled for: CoFHCore"); - totalMods++; - } - if (isModLoaded("Forestry")){ - Forestry = true; - Logger.INFO("Components enabled for: Forestry"); - totalMods++; - } - if (isModLoaded("MagicBees")){ - MagicBees = true; - Logger.INFO("Components enabled for: MagicBees"); - totalMods++; - } - if (isModLoaded("psychedelicraft")){ - Psychedelicraft = true; - Logger.INFO("Components enabled for: Psychedelicraft"); - totalMods++; - } - if (isModLoaded("ImmersiveEngineering")){ - ImmersiveEngineering = true; - Logger.INFO("Components enabled for: ImmersiveEngineering"); - totalMods++; - } - if (isModLoaded("ExtraBees")){ - ExtraBees = true; - Logger.INFO("Components enabled for: ExtraBees"); - totalMods++; - } - if (isModLoaded("ThermalFoundation") == false){ - ThermalFoundation = false; - Logger.INFO("Components enabled for: ThermalFoundation - This feature will disable itself if you add TF."); - totalMods++; - } - else if (isModLoaded("ThermalFoundation")){ - ThermalFoundation = true; - Logger.INFO("Components disabled for: ThermalFoundation - This feature will enable itself if you remove TF."); - //totalMods++; - } - if (isModLoaded("ihl")){ - IHL = true; - Logger.INFO("Components enabled for: IHL"); - totalMods++; - } - if (isModLoaded("Baubles")){ - Baubles = true; - Logger.INFO("Components enabled for: Baubles"); - totalMods++; - } - if (isModLoaded("GalacticraftCore")){ - GalacticraftCore = true; - Logger.INFO("Components enabled for: Galacticraft Core"); - totalMods++; - } - if (isModLoaded("OpenComputers")){ - OpenComputers = true; - Logger.INFO("Components enabled for: OpenComputers"); - totalMods++; - } - if (isModLoaded("computronics")){ - Computronics = true; - Logger.INFO("Components disabled for: Computronics - This feature will enable itself if you remove Computronics."); - totalMods++; - } - else { - Logger.INFO("Components enabled for: Computronics - This feature will disable itself if you add Computronics."); - } - if (isModLoaded("GTRedtech")){ - RedTech = true; - Logger.INFO("Components enabled for: GTRedtech"); - totalMods++; - } - if (isModLoaded("tectech")){ - TecTech = true; - Logger.INFO("Components enabled for: TecTech"); - totalMods++; - } - if (isModLoaded("kekztech")){ - KekzTech = true; - Logger.INFO("Components enabled for: KekzTech"); - totalMods++; - } - if (isModLoaded("witchery")){ - Witchery = true; - Logger.INFO("Components enabled for: Witchery"); - totalMods++; - } - - Logger.INFO("Content found for "+totalMods+" mods"); - - } - - public static String getModVersion(final String modName){ - final String ver = cpw.mods.fml.common.FMLCommonHandler.instance().findContainerFor(modName).getVersion(); - return ver; - } - - private static final HashMap mLoadedModCache = new HashMap(); - - public static boolean isModLoaded(String aModName) { - Boolean aResult = mLoadedModCache.get(aModName); - if (aResult == null) { - boolean aTemp = Loader.isModLoaded(aModName); - mLoadedModCache.put(aModName, aTemp); - aResult = aTemp; - } - return aResult; - } - -} diff --git a/src/Java/gtPlusPlus/core/lib/VanillaColours.java b/src/Java/gtPlusPlus/core/lib/VanillaColours.java deleted file mode 100644 index 9a7a82cb1f..0000000000 --- a/src/Java/gtPlusPlus/core/lib/VanillaColours.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.lib; - -import gtPlusPlus.core.util.Utils; - -public enum VanillaColours { - - BONE_MEAL(249, 255, 254), INK_BLACK(29, 29, 33), COCOA_BEANS(131, 84, 50), LAPIS_LAZULI(60, 68, 170), - DYE_WHITE(249, 255, 254), DYE_BLACK(29, 29, 33), DYE_RED(176, 46, 38), DYE_GREEN(94, 124, 22), - DYE_CYAN(22, 156, 156), DYE_PINK(243, 139, 170), DYE_LIME(128, 199, 31), DYE_YELLOW(254, 216, 61), - DYE_ORANGE(249, 128, 29), DYE_BROWN(131, 84, 50), DYE_LIGHT_BLUE(58, 179, 218), DYE_LIGHT_PURPLE(199, 78, 189), - DYE_LIGHT_GRAY(157, 157, 151), DYE_DARK_BLUE(60, 68, 170), DYE_DARK_PURPLE(137, 50, 184), DYE_DARK_GRAY(71, 79, 82); - - private final int r, g, b; - - private VanillaColours(int aR, int aG, int aB) { - r = aR; - g = aG; - b = aB; - } - - public short[] getAsShort() { - return new short[] { (short) r, (short) g, (short) b }; - } - - public int getAsInt() { - return Utils.rgbtoHexValue(r, g, b); - } -} diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java deleted file mode 100644 index fd7547970c..0000000000 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ /dev/null @@ -1,1009 +0,0 @@ -package gtPlusPlus.core.material; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.minecraft.MaterialUtils; - -public final class ALLOY { - - //Just some GT Alloys that I need within mine. - public static final Material BRONZE = MaterialUtils.generateMaterialFromGtENUM(Materials.Bronze); - public static final Material STEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.Steel); - public static final Material STEEL_BLACK = MaterialUtils.generateMaterialFromGtENUM(Materials.BlackSteel); - public static final Material INVAR = MaterialUtils.generateMaterialFromGtENUM(Materials.Invar); - public static final Material KANTHAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Kanthal); - public static final Material NICHROME = MaterialUtils.generateMaterialFromGtENUM(Materials.Nichrome); - public static final Material TUNGSTENSTEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.TungstenSteel); - public static final Material STAINLESS_STEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.StainlessSteel); - public static final Material OSMIRIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmiridium); - - public static final Material ENERGYCRYSTAL = new Material( - "Energy Crystal", //Material Name - MaterialState.SOLID, //State - new short[]{228, 255, 0, 0}, //Material Colour - 5660, //Melting Point in C - 7735, //Boiling Point in C - 150, //Protons - 80, //Neutrons - true, //Uses Blast furnace? - "⬟ ⯂ ⬢ ⬣ ⯃ ⯄", - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().AER, 5), - new MaterialStack(ELEMENT.getInstance().IGNIS, 5), - new MaterialStack(ELEMENT.getInstance().TERRA, 5), - new MaterialStack(ELEMENT.getInstance().AQUA, 5) - }); - - public static final Material BLOODSTEEL = new Material( - "Blood Steel", //Material Name - MaterialState.SOLID, //State - new short[]{142, 28, 0, 0}, //Material Colour - 2500, //Melting Point in C - 0, //Boiling Point in C - 100, //Protons - 100, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STEEL, 5), - new MaterialStack(ELEMENT.getInstance().IGNIS, 5) - }); - - public static final Material STABALLOY = new Material( - "Staballoy", //Material Name - MaterialState.SOLID, //State - new short[]{68, 75, 66, 0}, //Material Colour - 3450, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().URANIUM238, 9), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 1) - }); - - public static final Material TANTALLOY_60 = new Material( - "Tantalloy-60", //Material Name - MaterialState.SOLID, //State - new short[]{213, 231, 237, 0}, //Material Colour - 3025, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 4), - new MaterialStack(ELEMENT.getInstance().TANTALUM, 46) - }); - - public static final Material TANTALLOY_61 = new Material( - "Tantalloy-61", //Material Name - MaterialState.SOLID, //State - new short[]{193, 211, 217, 0}, //Material Colour - 3030, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.TANTALLOY_60, 2), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 8) - }); - - public static final Material TUMBAGA = new Material( - "Tumbaga", //Material Name - MaterialState.SOLID, //State - new short[]{255,178,15, 0}, //Material Colour - -1, - -1, - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().GOLD, 70), - new MaterialStack(ELEMENT.getInstance().COPPER, 30) - }); - - public static final Material POTIN = new Material( - "Potin", //Material Name - MaterialState.SOLID, //State - new short[]{201,151,129, 0}, //Material Colour - -1, - -1, - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().LEAD, 40), - new MaterialStack(ALLOY.BRONZE, 40), - new MaterialStack(ELEMENT.getInstance().TIN, 20) - }); - - /*public static final Material BEDROCKIUM = new Material( - "Bedrockium", //Material Name - new short[]{32, 32, 32, 0}, //Material Colour - 7735, //Melting Point in C - 0, //Boiling Point in C - 100, //Protons - 100, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - null);*/ - - public static final Material INCONEL_625 = new Material( - "Inconel-625", //Material Name - MaterialState.SOLID, //State - new short[]{128, 200, 128, 0}, //Material Colour - 2425, //Melting Point in C - 3758, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NICKEL, 3), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 7), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 10), - new MaterialStack(INVAR, 10), - new MaterialStack(NICHROME, 13) - }); - - public static final Material INCONEL_690 = new Material( - "Inconel-690", //Material Name - MaterialState.SOLID, //State - new short[]{118, 220, 138, 0}, //Material Colour - 3425, //Melting Point in C - 4895, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 5), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 10), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 10), - new MaterialStack(NICHROME, 15) - }); - - public static final Material INCONEL_792 = new Material( - "Inconel-792", //Material Name - MaterialState.SOLID, //State - new short[]{108, 240, 118, 0}, //Material Colour - 3425, //Melting Point in C - 6200, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NICKEL, 20), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 10), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 20), - new MaterialStack(NICHROME, 10) - }); - - public static final Material NITINOL_60 = new Material( - "Nitinol 60", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 5651, //Melting Point in C - 8975, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NICKEL, 40), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 60) - }); - - - public static final Material ZERON_100 = new Material( - "Zeron-100", //Material Name - MaterialState.SOLID, //State - new short[]{180, 180, 20, 0}, //Material Colour - 6100, - 9785, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 26), - new MaterialStack(ELEMENT.getInstance().NICKEL, 6), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 4), - new MaterialStack(ELEMENT.getInstance().COPPER, 20), - new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 4), - new MaterialStack(ALLOY.STEEL, 40) - }); - - public static final Material MARAGING250 = new Material( - "Maraging Steel 250", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 2413, //Melting Point in C - 4555, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STEEL, 64), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 4), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), - new MaterialStack(ELEMENT.getInstance().NICKEL, 16), - new MaterialStack(ELEMENT.getInstance().COBALT, 8), - }); - - public static final Material MARAGING300 = new Material( - "Maraging Steel 300", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 2413, //Melting Point in C - 4555, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STEEL, 64), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 4), - new MaterialStack(ELEMENT.getInstance().NICKEL, 16), - new MaterialStack(ELEMENT.getInstance().COBALT, 8), - }); - - public static final Material MARAGING350 = new Material( - "Maraging Steel 350", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 2413, //Melting Point in C - 4555, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STEEL, 64), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 4), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 4), - new MaterialStack(ELEMENT.getInstance().NICKEL, 16), - new MaterialStack(ELEMENT.getInstance().COBALT, 8), - }); - - public static final Material AQUATIC_STEEL = new Material( - "Watertight Steel", //Material Name - MaterialState.SOLID, //State - new short[] {120, 120, 180}, //Material Colour - 2673, //Melting Point in C - 4835, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STEEL, 60), - new MaterialStack(ELEMENT.getInstance().CARBON, 10), - new MaterialStack(ELEMENT.getInstance().MANGANESE, 5), - new MaterialStack(ELEMENT.getInstance().SILICON, 10), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 5), - new MaterialStack(ELEMENT.getInstance().SULFUR, 5), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 5) - }); - - public static final Material STELLITE = new Material( - "Stellite", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 4310, //Melting Point in C - 6250, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().COBALT, 35), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 35), - new MaterialStack(ELEMENT.getInstance().MANGANESE, 20), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 10) - }); - - public static final Material TALONITE = new Material( - "Talonite", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 3454, //Melting Point in C - 5500, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().COBALT, 40), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 30), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 20), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 10) - }); - - public static final Material HASTELLOY_W = new Material( - "Hastelloy-W", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 3350, //Melting Point in C - 5755, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 06), - new MaterialStack(ELEMENT.getInstance().COBALT, 2), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 24), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 6), - new MaterialStack(ELEMENT.getInstance().NICKEL, 62) - }); - - public static final Material HASTELLOY_X = new Material( - "Hastelloy-X", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 3350, //Melting Point in C - 5755, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 18), - new MaterialStack(ELEMENT.getInstance().MANGANESE, 2), - new MaterialStack(ELEMENT.getInstance().SILICON, 2), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 8), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 22), - new MaterialStack(ELEMENT.getInstance().NICKEL, 48) - }); - - public static final Material HASTELLOY_N = new Material( - "Hastelloy-N", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 4350, //Melting Point in C - 6875, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 8), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 16), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 8), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 8), - new MaterialStack(ELEMENT.getInstance().NICKEL, 60) - }); - - public static final Material HASTELLOY_C276 = new Material( - "Hastelloy-C276", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 4350, //Melting Point in C - 6520, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().COBALT, 2), - new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 16), - new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 2), - new MaterialStack(ELEMENT.getInstance().COPPER, 2), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 14), - new MaterialStack(ELEMENT.getInstance().NICKEL, 64) - }); - - public static final Material INCOLOY_020 = new Material( - "Incoloy-020", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 3425, //Melting Point in C - 5420, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 40), - new MaterialStack(ELEMENT.getInstance().COPPER, 4), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 20), - new MaterialStack(ELEMENT.getInstance().NICKEL, 36) - }); - - public static final Material INCOLOY_DS = new Material( - "Incoloy-DS", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 3425, //Melting Point in C - 5420, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 46), - new MaterialStack(ELEMENT.getInstance().COBALT, 18), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 18), - new MaterialStack(ELEMENT.getInstance().NICKEL, 18) - }); - - public static final Material INCOLOY_MA956 = new Material( - "Incoloy-MA956", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 4425, //Melting Point in C - 6875, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 64), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 12), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 20), - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 4) - }); - - public static final Material TUNGSTEN_CARBIDE = new Material( - "Tungsten Carbide", //Material Name - MaterialState.SOLID, //State - new short[]{44, 44, 44, 0}, //Material Colour - 3422, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - false, //Generate cells - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CARBON, 50), - new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 50) - }); - - public static final Material TUNGSTEN_TITANIUM_CARBIDE = new Material( - "Tungsten Titanium Carbide", //Material Name - MaterialState.SOLID, //State - null, - 4422, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(TUNGSTEN_CARBIDE, 70), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 30) - }); - - public static final Material SILICON_CARBIDE = new Material( - "Silicon Carbide", //Material Name - MaterialState.SOLID, //State - new short[]{40, 48, 36, 0}, //Material Colour - 1414, //Melting Point in C - -1, - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SILICON, 50), - new MaterialStack(ELEMENT.getInstance().CARBON, 50) - }); - - public static final Material TANTALUM_CARBIDE = new Material( - "Tantalum Carbide", //Material Name - MaterialState.SOLID, //State - new short[]{139, 136, 120, 0}, //Material Colour - 2980, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TANTALUM, 50), - new MaterialStack(ELEMENT.getInstance().CARBON, 50) - }); - - public static final Material ZIRCONIUM_CARBIDE = new Material( - "Zirconium Carbide", //Material Name - MaterialState.SOLID, //State - new short[]{222, 202, 180, 0}, //Material Colour - 1555, //Melting Point in C - -1, - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 50), - new MaterialStack(ELEMENT.getInstance().CARBON, 50) - }); - - public static final Material NIOBIUM_CARBIDE = new Material( - "Niobium Carbide", //Material Name - MaterialState.SOLID, //State - new short[]{205, 197, 191, 0}, //Material Colour - 2477, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 50), - new MaterialStack(ELEMENT.getInstance().CARBON, 50) - }); - - public static final Material ARCANITE = new Material( - "Arcanite", //Material Name - MaterialState.SOLID, //State - null, - 5666, //Melting Point in C - 9875, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().THORIUM232, 40), - new MaterialStack(ENERGYCRYSTAL, 40), - new MaterialStack(ELEMENT.getInstance().ORDO, 10), - new MaterialStack(ELEMENT.getInstance().PERDITIO, 10) - }); - - public static final Material LEAGRISIUM = new Material( - "Grisium", //Material Name - MaterialState.SOLID, //State - new short[]{53, 93, 106, 0}, //Material Colour - 3850, //Melting Point in C - 5550, //Boiling Point in C - 96, //Protons - 128, //Neutrons - true, //Uses Blast furnace? - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TITANIUM, 18), - new MaterialStack(ELEMENT.getInstance().CARBON, 18), - new MaterialStack(ELEMENT.getInstance().POTASSIUM, 18), - new MaterialStack(ELEMENT.getInstance().LITHIUM, 18), - new MaterialStack(ELEMENT.getInstance().SULFUR, 18), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 10) - }); //Material Stacks with Percentage of required elements. - - public static final Material EGLIN_STEEL_BASE = new Material( - "Eglin Steel Base Compound", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - - new MaterialStack(ELEMENT.getInstance().IRON, 12), - new MaterialStack(KANTHAL, 3), - new MaterialStack(INVAR, 15) - }); - - public static final Material EGLIN_STEEL = new Material( - "Eglin Steel", //Material Name - MaterialState.SOLID, //State - new short[]{139,69,19, 0}, //Material Colour - 1048, //Melting Point in C - 1973, //Boiling Point in C - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.EGLIN_STEEL_BASE, 10), - new MaterialStack(ELEMENT.getInstance().SULFUR, 1), - new MaterialStack(ELEMENT.getInstance().SILICON, 4), - new MaterialStack(ELEMENT.getInstance().CARBON, 1) - }); - - public static final Material HG1223 = new Material( - "HG-1223", //Material Name - MaterialState.LIQUID, //State - new short[]{39,85,159, 0}, //Material Colour - 6357, //Melting Point in C - 8563, //Boiling Point in C - -1, - -1, - false, //Uses Blast furnace? - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().MERCURY, 1), - new MaterialStack(ELEMENT.getInstance().BARIUM, 2), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), - new MaterialStack(ELEMENT.getInstance().COPPER, 3), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) - }); - - - public static final Material HS188A = new Material( - "HS188-A", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 4870, //Melting Point in C - 7550, //Boiling Point in C - -1, //Protons - -1, //Neutrons - true, //Uses Blast furnace? - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().COBALT, 20), - new MaterialStack(ELEMENT.getInstance().HAFNIUM, 20), - new MaterialStack(TALONITE, 16), - new MaterialStack(ELEMENT.getInstance().RHENIUM, 10), - new MaterialStack(NIOBIUM_CARBIDE, 10), - new MaterialStack(HASTELLOY_X, 8), - new MaterialStack(TUNGSTENSTEEL, 8), - new MaterialStack(ZIRCONIUM_CARBIDE, 8), - }); //Material Stacks with Percentage of required elements. - - /** - * Stargate Materials - #D2FFA9 210, 255, 170 - */ - - public static final Material TRINIUM_TITANIUM = new Material( - "Trinium Titanium Alloy", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 3750, //Melting Point in C - 7210, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 3), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 7) - }); - public static final Material TRINIUM_NAQUADAH = new Material( - "Trinium Naquadah Alloy", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 4200, //Melting Point in C - 7400, //Boiling Point in C - -1, - -1, - false, //Uses Blast furnace? - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 5), - new MaterialStack(ELEMENT.getInstance().NAQUADAH, 9) - }); - public static final Material TRINIUM_NAQUADAH_CARBON = new Material( - "Trinium Naquadah Carbonite", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 6500, //Melting Point in C - 9000, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - new MaterialStack[]{ - new MaterialStack(TRINIUM_NAQUADAH, 9), - new MaterialStack(ELEMENT.getInstance().CARBON, 1) - }); - - public static final Material TRINIUM_REINFORCED_STEEL = new Material( - "Arceus Alloy 2B", //Material Name - MaterialState.SOLID, //State - new short[]{205, 197, 23, 0}, //Material Colour - 7555, //Melting Point in C - 12350, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 30), - new MaterialStack(ALLOY.MARAGING350, 40), - new MaterialStack(ALLOY.TUNGSTENSTEEL, 20), - new MaterialStack(ALLOY.OSMIRIDIUM, 10), - new MaterialStack(ELEMENT.getInstance().STRONTIUM, 10) - }); - - - - /* - * Witchery Material - */ - - public static final Material KOBOLDITE = new Material( - "Koboldite", //Material Name - MaterialState.SOLID, //State - new short[]{80, 210, 255, 0}, //Material Colour - -1, //Melting Point in C - -1, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NICKEL, 35), - new MaterialStack(ELEMENT.getInstance().THAUMIUM, 30), - new MaterialStack(ELEMENT.getInstance().IRON, 35) - }); - - - /* - * Top Tier Alloys - */ - - public static final Material HELICOPTER = new Material( - "HeLiCoPtEr", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 5763, - 8192, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().HELIUM, 20), - new MaterialStack(ELEMENT.getInstance().LITHIUM, 20), - new MaterialStack(ELEMENT.getInstance().COBALT, 20), - new MaterialStack(ELEMENT.getInstance().PLATINUM, 20), - new MaterialStack(ELEMENT.getInstance().ERBIUM, 20) - }); - - //0lafe Compound - public static final Material LAFIUM = new Material( - "Lafium Compound", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 6350, //Melting Point in C - 9865, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.HASTELLOY_N, 8), - new MaterialStack(ELEMENT.getInstance().NAQUADAH, 4), - new MaterialStack(ELEMENT.getInstance().SAMARIUM, 2), - new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 4), - new MaterialStack(ELEMENT.getInstance().ARGON, 2), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 6), - new MaterialStack(ELEMENT.getInstance().NICKEL, 8), - new MaterialStack(ELEMENT.getInstance().CARBON, 2) - }); - - //Cinobi Alloy - public static final Material CINOBITE = new Material( - "Cinobite A243", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 7350, //Melting Point in C - 12565, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.ZERON_100, 16), - new MaterialStack(ELEMENT.getInstance().NAQUADRIA, 7), - new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 5), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 3), - new MaterialStack(ELEMENT.getInstance().MERCURY, 2), - new MaterialStack(ELEMENT.getInstance().TIN, 2), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), - new MaterialStack(ALLOY.OSMIRIDIUM, 6) - }); - - //Piky Alloy - public static final Material PIKYONIUM = new Material( - "Pikyonium 64B", //Material Name - MaterialState.SOLID, //State - new short[]{52, 103, 186, 0}, //Material Colour - 6850, //Melting Point in C - 11765, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.INCONEL_792, 16), - new MaterialStack(ALLOY.EGLIN_STEEL, 10), - new MaterialStack(ELEMENT.getInstance().NAQUADAH_ENRICHED, 8), - new MaterialStack(ELEMENT.getInstance().CERIUM, 6), - new MaterialStack(ELEMENT.getInstance().ANTIMONY, 4), - new MaterialStack(ELEMENT.getInstance().PLATINUM, 4), - new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), - new MaterialStack(ALLOY.TUNGSTENSTEEL, 8) - }); - - //Piky Alloy - public static final Material ABYSSAL = new Material( - "Abyssal Alloy", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 9650, //Melting Point in C - 13765, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STAINLESS_STEEL, 10), - new MaterialStack(ALLOY.TUNGSTEN_CARBIDE, 10), - new MaterialStack(ALLOY.NICHROME, 10), - new MaterialStack(ALLOY.BRONZE, 10), - new MaterialStack(ALLOY.INCOLOY_MA956, 10), - new MaterialStack(ELEMENT.getInstance().IODINE, 2), - new MaterialStack(ELEMENT.getInstance().RADON, 2), - new MaterialStack(ELEMENT.getInstance().GERMANIUM, 2), - }); - - //Alkalus Alloy - public static final Material LAURENIUM = new Material( - "Laurenium", //Material Name - MaterialState.SOLID, //State - new short[] {244, 168, 255, 0}, //Material Colour - 6825, //Melting Point in C - 11355, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.EGLIN_STEEL, 40), - new MaterialStack(ELEMENT.getInstance().INDIUM, 10), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 20), - new MaterialStack(ELEMENT.getInstance().DYSPROSIUM, 5), - new MaterialStack(ELEMENT.getInstance().RHENIUM, 5), - }); - - - //Bot Alloy - public static final Material BOTMIUM = new Material( - "Botmium", //Material Name - MaterialState.SOLID, //State - new short[] {80, 160, 80, 0}, //Material Colour - 8220, //Melting Point in C - 10540, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.NITINOL_60, 2), - new MaterialStack(ELEMENT.getInstance().OSMIUM, 12), - new MaterialStack(ELEMENT.getInstance().RUTHENIUM, 12), - new MaterialStack(ELEMENT.getInstance().THALLIUM, 6), - }); - - //Titansteel - public static final Material TITANSTEEL = new Material( - "Titansteel", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 8250, //Melting Point in C - 11765, //Boiling Point in C - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.TUNGSTEN_TITANIUM_CARBIDE, 3), - new MaterialStack(ELEMENT.getInstance().IGNIS, 1), - new MaterialStack(ELEMENT.getInstance().TERRA, 1), - new MaterialStack(ELEMENT.getInstance().PERDITIO, 1), - }); - - - public static final Material OCTIRON = new Material( - "Octiron", //Material Name - MaterialState.SOLID, //State - null, - 9120, //Melting Point in C - 14200, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ARCANITE, 30), - new MaterialStack(TITANSTEEL, 30), - new MaterialStack(ENERGYCRYSTAL, 5), - new MaterialStack(STEEL_BLACK, 10), - new MaterialStack(ELEMENT.getInstance().THAUMIUM, 25) - }); - - - - public static final Material BLACK_TITANIUM = new Material( - "Black Titanium", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - Materials.Titanium.mMeltingPoint*4, //Melting Point in C - Materials.Titanium.mMeltingPoint*16, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TITANIUM, 55), - new MaterialStack(ELEMENT.getInstance().LANTHANUM, 12), - new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 8), - new MaterialStack(ELEMENT.getInstance().COBALT, 6), - new MaterialStack(ELEMENT.getInstance().MANGANESE, 4), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 4), - new MaterialStack(ELEMENT.getInstance().PALLADIUM, 4), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), - new MaterialStack(ELEMENT.getInstance().ARGON, 5) - }); - - public static final Material BABBIT_ALLOY = new Material( - "Babbit Alloy", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 268, //Melting Point in C - 589, - -1, - -1, - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TIN, 10), - new MaterialStack(ELEMENT.getInstance().LEAD, 72), - new MaterialStack(ELEMENT.getInstance().ANTIMONY, 16), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 2) - }); - - - - - - - - - - - - - - - - //Quantum - public static final Material QUANTUM = new Material( - "Quantum", //Material Name - MaterialState.SOLID, //State - null, //Material Colour - 10500, //Melting Point in C - 25000, //Boiling Point in C - 150, //Protons - 200, //Neutrons - true, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STELLITE, 15), - new MaterialStack(ALLOY.ENERGYCRYSTAL, 5), - new MaterialStack(ALLOY.SILICON_CARBIDE, 5), - new MaterialStack(ELEMENT.getInstance().GALLIUM, 5), - new MaterialStack(ELEMENT.getInstance().AMERICIUM, 5), - new MaterialStack(ELEMENT.getInstance().PALLADIUM, 5), - new MaterialStack(ELEMENT.getInstance().BISMUTH, 5), - new MaterialStack(ELEMENT.getInstance().GERMANIUM, 5) - }); - - - -} diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java deleted file mode 100644 index 54af01ef6e..0000000000 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ /dev/null @@ -1,254 +0,0 @@ -package gtPlusPlus.core.material; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.TextureSet; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.client.CustomTextureSet.TextureSets; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; - -public final class ELEMENT { - - public static final String[] NAMES = new String[]{"Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium", "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttrium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium", "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium", "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum", "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium", "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium", "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Nihonium", "Flerovium", "Moscovium", "Livermorium", "Tennessine", "Oganesson"}; - - //First 50 Elements - public final Material HYDROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Hydrogen); - public final Material HELIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Helium); - public final Material LITHIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lithium); - public final Material BERYLLIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Beryllium); - public final Material BORON = MaterialUtils.generateMaterialFromGtENUM(Materials.Boron); - public final Material CARBON = MaterialUtils.generateMaterialFromGtENUM(Materials.Carbon); - public final Material NITROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Nitrogen); - public final Material OXYGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Oxygen); - public final Material FLUORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Fluorine); - public final Material NEON = new Material("Neon", MaterialState.PURE_GAS, new short[]{240, 180, 30}, -248, -246, 10, 10, false, "Ne", 0);//Not a GT Inherited Material - public final Material SODIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Sodium); - public final Material MAGNESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Magnesium); - public final Material ALUMINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Aluminium); - public final Material ALUMINIUMOXIDE = MaterialUtils.generateMaterialFromGtENUM(Materials.Aluminiumoxide); - public final Material SILICON = MaterialUtils.generateMaterialFromGtENUM(Materials.Silicon); - public final Material SILICONDIOXIDE = MaterialUtils.generateMaterialFromGtENUM(Materials.SiliconDioxide); - public final Material PHOSPHORUS = MaterialUtils.generateMaterialFromGtENUM(Materials.Phosphor); - public final Material SULFUR = MaterialUtils.generateMaterialFromGtENUM(Materials.Sulfur); - public final Material CHLORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chlorine); - public final Material ARGON = MaterialUtils.generateMaterialFromGtENUM(Materials.Argon); - public final Material POTASSIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Potassium); - public final Material CALCIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Calcium); - public final Material SCANDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Scandium); - public final Material TITANIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Titanium); - public final Material VANADIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Vanadium); - public final Material CHROMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Chrome); - public final Material MANGANESE = MaterialUtils.generateMaterialFromGtENUM(Materials.Manganese); - public final Material IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.Iron); - public final Material COBALT = MaterialUtils.generateMaterialFromGtENUM(Materials.Cobalt); - public final Material NICKEL = MaterialUtils.generateMaterialFromGtENUM(Materials.Nickel); - public final Material COPPER = MaterialUtils.generateMaterialFromGtENUM(Materials.Copper); - public final Material ZINC = MaterialUtils.generateMaterialFromGtENUM(Materials.Zinc); - public final Material GALLIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Gallium); - public final Material GERMANIUM = new Material("Germanium", MaterialState.SOLID, new short[]{200, 200, 200}, 937, 2830, 32, 41, false, "Ge", 0);//Not a GT Inherited Material - public final Material ARSENIC = MaterialUtils.generateMaterialFromGtENUM(Materials.Arsenic); - public final Material SELENIUM = new Material("Selenium", MaterialState.SOLID, new short[]{190, 190, 190}, 217, 685, 34, 45, false, "Se", 0);//Not a GT Inherited Material - public final Material BROMINE = new Material("Bromine", MaterialState.PURE_LIQUID, new short[]{200, 25, 25}, -7, 58, 35, 45, false, "Br", 0);//Not a GT Inherited Material - public final Material KRYPTON = new Material("Krypton", MaterialState.PURE_GAS, new short[]{5, 200, 220}, -157, -153, 36, 48, false, "Kr", 0);//Not a GT Inherited Material - public final Material RUBIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubidium); - public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium, new short[] {230, 210, 110}, TextureSet.SET_FLINT); - public final Material YTTRIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yttrium); - public final Material ZIRCONIUM = new Material("Zirconium", MaterialState.SOLID, new short[]{255, 250, 205}, 1855, 4377, 40, 51, false, "Zr", 0);//Not a GT Inherited Material - public final Material NIOBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Niobium); - public final Material MOLYBDENUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Molybdenum); - public final Material TECHNETIUM = new Material("Technetium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 220, 220}, 2200, 4877, 43, 55, false, "Tc", 2);//Not a GT Inherited Material - public final Material RUTHENIUM = new Material("Ruthenium", MaterialState.SOLID, new short[]{220, 220, 220}, 2250, 3900, 44, 57, false, "Ru", 0);//Not a GT Inherited Material - public final Material RHODIUM = new Material("Rhodium", MaterialState.SOLID, new short[]{220, 220, 220}, 1966, 3727, 45, 58, false, "Rh", 0);//Not a GT Inherited Material - public final Material PALLADIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Palladium); - public final Material SILVER = MaterialUtils.generateMaterialFromGtENUM(Materials.Silver); - public final Material CADMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Cadmium); - public final Material INDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Indium); - public final Material TIN = MaterialUtils.generateMaterialFromGtENUM(Materials.Tin); - public final Material ANTIMONY = MaterialUtils.generateMaterialFromGtENUM(Materials.Antimony); - public final Material TELLURIUM = new Material("Tellurium", MaterialState.SOLID, new short[]{210, 210, 210}, 449, 989, 52, 76, false, "Te", 0);//Not a GT Inherited Material - public final Material IODINE = new Material("Iodine", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{96, 96, 96}, 114, 184, 53, 74, false, "I", 0);//Not a GT Inherited Material - public final Material XENON = new Material("Xenon", MaterialState.PURE_GAS, new short[]{5, 105, 210}, -111, -108, 54, 77, false, "Xe", 0);//Not a GT Inherited Material - public final Material CAESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Caesium); - public final Material BARIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Barium); - public final Material LANTHANUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lanthanum); - public final Material CERIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Cerium); - public final Material PRASEODYMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Praseodymium); - public final Material NEODYMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Neodymium); - public final Material PROMETHIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Promethium); - public final Material SAMARIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Samarium); - public final Material EUROPIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Europium); - public final Material GADOLINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Gadolinium); - public final Material TERBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Terbium); - public final Material DYSPROSIUM = new Material("Dysprosium", MaterialState.SOLID, new short[]{180, 180, 180}, 1412, 2562, 66, 97, false, "Dy", 0);//Not a GT Inherited Material - public final Material HOLMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Holmium); - public final Material ERBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Erbium); - public final Material THULIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Thulium); - public final Material YTTERBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Ytterbium); - public final Material LUTETIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lutetium); - public final Material HAFNIUM = new Material("Hafnium", MaterialState.SOLID, new short[]{128, 128, 128}, 2150, 5400, 72, 106, false, "Hf", 0);//Not a GT Inherited Material - - //Second 50 elements - public final Material TANTALUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Tantalum); - public final Material TUNGSTEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Tungsten); - public final Material RHENIUM = new Material("Rhenium", MaterialState.SOLID, new short[]{150, 150, 150}, 3180, 3627, 75, 111, false, "Re", 0);//Not a GT Inherited Material - public final Material OSMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmium); - public final Material IRIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Iridium); - public final Material PLATINUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Platinum); - public final Material GOLD = MaterialUtils.generateMaterialFromGtENUM(Materials.Gold); - public final Material MERCURY = MaterialUtils.generateMaterialFromGtENUM(Materials.Mercury); //Mercury - public final Material THALLIUM = new Material("Thallium", MaterialState.SOLID, new short[]{175, 175, 175}, 304, 1457, 81, 123, false, "Tl", 0);//Not a GT Inherited Material - public final Material LEAD = MaterialUtils.generateMaterialFromGtENUM(Materials.Lead); - public final Material BISMUTH = MaterialUtils.generateMaterialFromGtENUM(Materials.Bismuth); - public final Material POLONIUM = new Material("Polonium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{180, 170, 180}, 254, 962, 84, 125, false, "Po", 1);//Not a GT Inherited Material - public final Material ASTATINE = new Material("Astatine", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{170, 180, 170}, 302, 337, 85, 125, false, "At", 1);//Not a GT Inherited Material - public final Material RADON = MaterialUtils.generateMaterialFromGtENUM(Materials.Radon); - public final Material FRANCIUM = new Material("Francium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{170, 160, 170}, 27, 677, 87, 136, false, "Fr", 1);//Not a GT Inherited Material - public final Material RADIUM = new Material("Radium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{165, 165, 165}, 700, 1737, 88, 138, false, "Ra", 1);//Not a GT Inherited Material - public final Material ACTINIUM = new Material("Actinium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{150, 165, 165}, 1050, 3200, 89, 138, false, "Ac", 1);//Not a GT Inherited Material - public final Material THORIUM = new Material("Thorium", MaterialState.SOLID, Materials.Thorium.mRGBa, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("Th"), 1); - public final Material PROTACTINIUM = new Material("Protactinium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{190, 150, 170}, 1568, 4027, 91, 140, false, "Pa", 1);//Not a GT Inherited Material - public final Material URANIUM238 = MaterialUtils.generateMaterialFromGtENUM(Materials.Uranium); - public final Material URANIUM235 = MaterialUtils.generateMaterialFromGtENUM(Materials.Uranium235); - public final Material NEPTUNIUM = new Material("Neptunium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{200, 220, 205}, 640, 3902, 93, 144, false, "Np", 2);//Not a GT Inherited Material - public final Material PLUTONIUM244 = MaterialUtils.generateMaterialFromGtENUM(Materials.Plutonium); - public final Material PLUTONIUM241 = MaterialUtils.generateMaterialFromGtENUM(Materials.Plutonium241); - public final Material AMERICIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Americium); //Americium - public final Material CURIUM = new Material("Curium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{175, 85, 110}, 1340, 3110, 96, 151, false, "Cm", 3);//Not a GT Inherited Material - public final Material BERKELIUM = new Material("Berkelium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{110, 250, 85}, 985, 710, 97, 150, false, "Bk", 4);//Not a GT Inherited Material - public final Material CALIFORNIUM = new Material("Californium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{85, 110, 205}, 899, 1472, 98, 153, false, "Cf", 4);//Not a GT Inherited Material - public final Material EINSTEINIUM = new Material("Einsteinium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{255, 85, 110}, 860, 3500, 99, 153, false, "Es", 5);//Not a GT Inherited Material //Boiling Point is made up - public final Material FERMIUM = new Material("Fermium", MaterialState.LIQUID, TextureSets.NUCLEAR.get(), new short[]{75, 90, 25}, 1527, 3850, 100, 157, false, "Fm", 5);//Not a GT Inherited Material //Boiling Point is made up - - //Misc - public final Material AER = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedAir, TextureSets.GEM_A.get()); - public final Material IGNIS = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedFire, TextureSets.GEM_A.get()); - public final Material TERRA = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedEarth, TextureSets.GEM_A.get()); - public final Material AQUA = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedWater, TextureSets.GEM_A.get()); - public final Material PERDITIO = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedEntropy, TextureSets.GEM_A.get()); - public final Material ORDO = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedOrder, TextureSets.GEM_A.get()); - - //Fictional - public final Material YELLORIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yellorium, new short[] {255, 242, 10}, TextureSets.NUCLEAR.get()); - public final Material NAQUADAH = MaterialUtils.generateMaterialFromGtENUM(Materials.Naquadah); - public final Material NAQUADAH_ENRICHED = MaterialUtils.generateMaterialFromGtENUM(Materials.NaquadahEnriched); - public final Material NAQUADRIA = MaterialUtils.generateMaterialFromGtENUM(Materials.Naquadria); - public final Material TRINIUM; - public final Material TRINIUM_REFINED; - //https://github.com/Blood-Asp/GT5-Unofficial/issues/609 - - - //Custom Isotopes - public final Material LITHIUM7 = new Material("Lithium 7", MaterialState.SOLID, TextureSet.SET_SHINY, Materials.Lithium.mRGBa, Materials.Lithium.mMeltingPoint, Materials.Lithium.mBlastFurnaceTemp, Materials.Lithium.getProtons(), Materials.Lithium.getNeutrons(), Materials.Lithium.mBlastFurnaceRequired, StringUtils.superscript("7Li"), 0, false);//Not a GT Inherited Material - public final Material URANIUM232 = new Material("Uranium 232", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{88, 220, 103, 0}, 1132, 4131, 92, 140, false, StringUtils.superscript("232U"), 4);//Not a GT Inherited Material - public final Material URANIUM233 = new Material("Uranium 233", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{73, 220, 83, 0}, 1132, 4131, 92, 141, false, StringUtils.superscript("233U"), 2);//Not a GT Inherited Material - public final Material THORIUM232 = new Material("Thorium 232", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{15, 60, 15, 0}, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("232Th"), 1, true);//Not a GT Inherited Material - public final Material PLUTONIUM239 = new Material("Plutonium-239", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Plutonium.mDurability, Materials.Plutonium.mRGBa, Materials.Plutonium.mMeltingPoint, Materials.Plutonium.mBlastFurnaceTemp, 94, 145, false, StringUtils.superscript("239Pu"), 4, true);//Not a GT Inherited Material - //RTG Fuels - public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2, false);//Not a GT Inherited Material - public final Material STRONTIUM90 = new Material("Strontium-90", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Strontium.mDurability, Materials.Strontium.mRGBa, Materials.Strontium.mMeltingPoint, Materials.Strontium.mBlastFurnaceTemp, 38, 52, false, StringUtils.superscript("90Sr"), 2, false);//Not a GT Inherited Material - public final Material POLONIUM210 = new Material("Polonium-210", MaterialState.SOLID, TextureSets.NUCLEAR.get(), POLONIUM.vDurability, POLONIUM.getRGBA(), POLONIUM.getMeltingPointK(), POLONIUM.getBoilingPointK(), 84, 126, false, StringUtils.superscript("210Po"), 2, false);//Not a GT Inherited Material - public final Material AMERICIUM241 = new Material("Americium-241", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Americium.mDurability, Materials.Americium.mRGBa, Materials.Americium.mMeltingPoint, Materials.Americium.mBlastFurnaceTemp, 95, 146, false, StringUtils.superscript("241Am"), 2, false);//Not a GT Inherited Material - - public final Material MAGIC = MaterialUtils.generateMaterialFromGtENUM(Materials.Magic, new short[] {10, 185, 140}); - public final Material THAUMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Thaumium); - - static { - Logger.MATERIALS("Initialising Base Elements."); - } - - private static final ELEMENT INSTANCE = new ELEMENT(); - - public ELEMENT(){ - //GTNH Trinium Handling - if (CORE.GTNH){ - //yay - Materials a1 = MaterialUtils.getMaterial("Trinium"); - Materials a2 = Materials.valueOf("Trinium"); - Materials a3 = Materials.get("Trinium"); - Materials a4; - if (a1 == null) { - Logger.INFO("[Material] First attempt to find Trinium failed, using backup method."); - if (a2 == null) { - Logger.INFO("[Material] Fallback attempt to find Trinium failed, using second fallback."); - if (a3 == null) { - Logger.INFO("[Material] Fallback attempt to find Trinium failed, dumping materials."); - for (Materials m : Materials.values()) { - Logger.INFO("[Material] Found "+MaterialUtils.getMaterialName(m)); - } - a4 = null; - } - else { - Logger.INFO("[Material] a3 Found "+MaterialUtils.getMaterialName(a3)); - a4 = a3; - } - } - else { - Logger.INFO("[Material] a2 Found "+MaterialUtils.getMaterialName(a2)); - a4 = a2; - } - TRINIUM = MaterialUtils.generateMaterialFromGtENUM(a4); - } - else { - Logger.INFO("[Material] a1 Found "+MaterialUtils.getMaterialName(a1)); - TRINIUM = MaterialUtils.generateMaterialFromGtENUM(a1); - } - - TRINIUM_REFINED = TRINIUM; - - } - else { - TRINIUM = new Material("Trinium", MaterialState.SOLID, TextureSet.SET_FINE, new short[]{70, 110, 30}, 604, 4057, 181, 133, false, "Ke", 0, false);//Not a GT Inherited Material - TRINIUM_REFINED = new Material("Refined Trinium", MaterialState.SOLID, TextureSets.REFINED.get(), new short[]{210, 255, 170}, 4304, 14057, 181, 133, false, "Ke", 0, new MaterialStack[]{new MaterialStack(TRINIUM, 1)});//Not a GT Inherited Material - } - } - - public static ELEMENT getInstance(){ - return INSTANCE; - } - - public static class STANDALONE { - - public static final Material CELESTIAL_TUNGSTEN = new Material("Celestial Tungsten", MaterialState.SOLID, TextureSets.REFINED.get(), new short[] {50, 50, 50, 2}, INSTANCE.TUNGSTEN.getMeltingPointC()+6500, INSTANCE.TUNGSTEN.getBoilingPointC()+7500, 160, 101, true, "✦◆✦", 0);//Not a GT Inherited Material - public static final Material ASTRAL_TITANIUM = new Material("Astral Titanium", MaterialState.SOLID, TextureSets.REFINED.get(), new short[] {220, 160, 240, 2}, INSTANCE.TITANIUM.getMeltingPointC()+7500, INSTANCE.TITANIUM.getBoilingPointC()+7500, 145, 133, true, "✧◇✧", 0);//Not a GT Inherited Material - public static final Material CHRONOMATIC_GLASS = new Material("Chromatic Glass", MaterialState.SOLID, new short[]{255, 255, 255, 3}, 9200, 17550, 40, 51, false, "⌘☯𓰠𓱠𓲠𓳠𓴠𓵠𓶠𓷠𓸠☯⌘ ", 0);//Not a GT Inherited Material - public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material - public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75, 2}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material - public static final Material RHUGNOR = new Material("Rhugnor", MaterialState.SOLID, TextureSets.ENRICHED.get(), new short[]{190, 0, 255, 0}, 8750, 14757, 184, 142, true, "Fs⚶", 0);//Not a GT Inherited Material //funeris - - - //Runescape materials - public static final Material BLACK_METAL = new Material("Black Metal", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0, new MaterialStack[]{new MaterialStack(getInstance().LEAD, 15), new MaterialStack(getInstance().MANGANESE, 25), new MaterialStack(getInstance().CARBON, 60)});//Not a GT Inherited Material - public static final Material WHITE_METAL = new Material("White Metal", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {255, 255, 255}, 4560, 7580, 35, 41, false, "҉", 0, new MaterialStack[]{new MaterialStack(getInstance().COPPER, 5), new MaterialStack(getInstance().ANTIMONY, 10), new MaterialStack(getInstance().PLATINUM, 10), new MaterialStack(getInstance().TIN, 75)});//Not a GT Inherited Material - - public static final Material GRANITE = new Material( - "Ancient Granite", - MaterialState.SOLID, - TextureSet.SET_SAND, - new short[] {107, 107, 107}, - 500, - 2000, - 16, - 12, - false, - "«»", - 0, - false, - new MaterialStack[]{ - new MaterialStack(getInstance().OXYGEN, 30), - new MaterialStack(getInstance().IRON, 20), - new MaterialStack(getInstance().SILICONDIOXIDE, 20), - new MaterialStack(getInstance().ALUMINIUMOXIDE, 10), - new MaterialStack(getInstance().POTASSIUM, 10), - new MaterialStack(getInstance().CALCIUM, 5), - new MaterialStack(getInstance().SODIUM, 5) - });//Not a GT Inherited Material - - public static final Material RUNITE = new Material("Runite", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {60, 200, 190}, 6750, 11550, 73, 87, true, "§", 0);//Not a GT Inherited Material - public static final Material DRAGON_METAL = new Material("Dragonblood", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20, 2}, 10160, 17850, 96, 105, true, "۞", 0);//Not a GT Inherited Material - - } - - -} diff --git a/src/Java/gtPlusPlus/core/material/Ion.java b/src/Java/gtPlusPlus/core/material/Ion.java deleted file mode 100644 index 2b5b113b92..0000000000 --- a/src/Java/gtPlusPlus/core/material/Ion.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.material; - -public class Ion { - - private final Material mElement; - private final boolean mContainsPositiveCharge; - private final int mTotalIonization; - - public Ion(Material aMat, int chargeAmount) { - mElement = aMat; - mContainsPositiveCharge = (chargeAmount >= 0); - mTotalIonization = chargeAmount; - } - - public synchronized final Material getElement() { - return mElement; - } - - public synchronized final boolean containsPositiveCharge() { - return mContainsPositiveCharge; - } - - public synchronized final int getTotalIonization() { - return mTotalIonization; - } - - public final boolean isNeutral() { - return mTotalIonization == 0; - } -} diff --git a/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java b/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java deleted file mode 100644 index aaee1cc790..0000000000 --- a/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java +++ /dev/null @@ -1,308 +0,0 @@ -package gtPlusPlus.core.material; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.TextureSet; -import gtPlusPlus.core.client.CustomTextureSet.TextureSets; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; - -public final class MISC_MATERIALS { - - /* - * Some of these materials purely exist as data objects, items will most likely be assigned seperately. - * Most are just compositions which will have dusts assigned to them. - */ - - public static void run() { - MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_OXIDE, false); - MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_HYDROXIDE, false); - WATER.registerComponentForMaterial(FluidUtils.getWater(1000)); - } - - public static final Material STRONTIUM_OXIDE = new Material( - "Strontium Oxide", - MaterialState.SOLID, - TextureSet.SET_METALLIC, - null, - -1, - -1, - -1, - -1, - false, - "SrO", - 0, - false, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) - }); - - public static final Material SELENIUM_DIOXIDE = new Material( - "Selenium Dioxide", - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SELENIUM, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 2) - }); - - public static final Material SELENIOUS_ACID = new Material( - "Selenious Acid", - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(SELENIUM_DIOXIDE, 1), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 8), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 4) - }); - - public static final Material HYDROGEN_CYANIDE = new Material( - "Hydrogen Cyanide", - MaterialState.PURE_GAS, //State - null, //Material Colour - 4, //Melting Point in C - 26, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1), - new MaterialStack(ELEMENT.getInstance().CARBON, 1), - new MaterialStack(ELEMENT.getInstance().NITROGEN, 1) - }); - - public static final Material CARBON_MONOXIDE = new Material( - "Carbon Monoxide", - MaterialState.PURE_GAS, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CARBON, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) - }); - - public static final Material CARBON_DIOXIDE = new Material( - "Carbon Dioxide", - MaterialState.PURE_GAS, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CARBON, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 2) - }); - - - /* - * Rare Earth Materials - */ - - public static final Material RARE_EARTH_LOW = new Material( - "Rare Earth (I)", //Material Name - MaterialState.ORE, //State - TextureSets.GEM_A.get(), //Texture Set - null, //Material Colour - 1200, - 2500, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ORES.GREENOCKITE, 1), - new MaterialStack(ORES.LANTHANITE_CE, 1), - new MaterialStack(ORES.AGARDITE_CD, 1), - new MaterialStack(ORES.XENOTIME, 1), - new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.NetherQuartz), 1), - new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Galena), 1), - new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Chalcopyrite), 1), - new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Cobaltite), 1), - new MaterialStack(ELEMENT.STANDALONE.GRANITE, 1) - }); - - public static final Material RARE_EARTH_MID = new Material( - "Rare Earth (II)", //Material Name - MaterialState.ORE, //State - TextureSets.ENRICHED.get(), //Texture Set - null, //Material Colour - 3500, - 5000, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ORES.LANTHANITE_ND, 1), - new MaterialStack(ORES.AGARDITE_ND, 1), - new MaterialStack(ORES.YTTRIAITE, 1), - new MaterialStack(ORES.CROCROITE, 1), - new MaterialStack(ORES.NICHROMITE, 1), - new MaterialStack(ORES.ZIRCON, 1), - new MaterialStack(ELEMENT.STANDALONE.GRANITE, 1), - new MaterialStack(ELEMENT.STANDALONE.BLACK_METAL, 1), - new MaterialStack(ELEMENT.STANDALONE.RUNITE, 1) - }); - - public static final Material RARE_EARTH_HIGH = new Material( - "Rare Earth (III)", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - null, //Material Colour - 5200, - 7500, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ORES.GADOLINITE_Y, 1), - new MaterialStack(ORES.LEPERSONNITE, 1), - new MaterialStack(ORES.FLORENCITE, 1), - new MaterialStack(ORES.FLUORCAPHITE, 1), - new MaterialStack(ORES.LAUTARITE, 1), - new MaterialStack(ORES.DEMICHELEITE_BR, 1), - new MaterialStack(ORES.ALBURNITE, 1), - new MaterialStack(ORES.KASHINITE, 1), - new MaterialStack(ORES.AGARDITE_LA, 1), - }); - - public static final Material WATER = new Material( - "Water", - MaterialState.PURE_LIQUID, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) - }); - - //OH - public static final Material HYDROXIDE = new Material( - "Hydroxide", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1) - }); - - //NH3 - public static final Material AMMONIA = new Material( - "Ammonia", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -77, //Melting Point in C - -33, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NITROGEN, 1), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 3) - }); - - //NH4 - public static final Material AMMONIUM = new Material( - "Ammonium", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NITROGEN, 1), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 4) - }); - - - public static final Material HYDROGEN_CHLORIDE = new Material( - "Hydrogen Chloride", - MaterialState.PURE_GAS, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1), - new MaterialStack(ELEMENT.getInstance().CHLORINE, 1), - }); - - - public static final Material SODIUM_CHLORIDE = new Material( - "Sodium Chloride", - MaterialState.PURE_GAS, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SODIUM, 1), - new MaterialStack(ELEMENT.getInstance().CHLORINE, 1), - }); - - - public static final Material SODIUM_HYDROXIDE = new Material( - "Sodium Hydroxide", - MaterialState.PURE_GAS, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SODIUM, 1), - new MaterialStack(HYDROXIDE, 1), - }); - - public static final Material SALT_WATER = new Material( - "Salt Water", - MaterialState.PURE_LIQUID, - new MaterialStack[]{ - new MaterialStack(WATER, 3), - new MaterialStack(SODIUM_CHLORIDE, 1), - }); - - public static final Material BRINE = new Material( - "Brine", - MaterialState.PURE_LIQUID, - new MaterialStack[]{ - new MaterialStack(SALT_WATER, 1), - new MaterialStack(SODIUM_CHLORIDE, 2), - }); - - public static final Material STRONTIUM_HYDROXIDE = new Material( - "Strontium Hydroxide", - MaterialState.SOLID, - TextureSet.SET_METALLIC, - null, - -1, - -1, - -1, - -1, - false, - "Sr(OH)2", - 0, - false, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1), - new MaterialStack(MISC_MATERIALS.HYDROXIDE, 2) - }); - - - -} diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java deleted file mode 100644 index 0e9eb9b376..0000000000 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ /dev/null @@ -1,1461 +0,0 @@ -package gtPlusPlus.core.material; - -import static gregtech.api.enums.GT_Values.M; -import static gtPlusPlus.core.util.math.MathUtils.safeCast_LongToInt; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.TextureSet; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; -import gtPlusPlus.core.item.base.cell.BaseItemCell; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; -import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class Material { - - public static final Set mMaterialMap = new HashSet(); - public static HashMap mMaterialCache = new HashMap(); - - public static final Map> mComponentMap = new HashMap>(); - - public static HashMap sChemicalFormula = new HashMap(); - - private String unlocalizedName; - private String localizedName; - - private MaterialState materialState; - private TextureSet textureSet; - - private Fluid mFluid; - private Fluid vPlasma; - - private boolean vGenerateCells; - - protected Object dataVar = MathUtils.generateSingularRandomHexValue(); - - private ArrayList vMaterialInput = new ArrayList<>(); - public long[] vSmallestRatio; - public short vComponentCount; - - private short[] RGBA; - - private boolean usesBlastFurnace; - public boolean isRadioactive; - public byte vRadiationLevel; - - private int meltingPointK; - private int boilingPointK; - private int meltingPointC; - private int boilingPointC; - private long vProtons; - private long vNeutrons; - private long vMass; - public int smallestStackSizeWhenProcessing; //Add a check for <=0 || > 64 - public int vTier; - public int vVoltageMultiplier; - public String vChemicalFormula; - public String vChemicalSymbol; - - public long vDurability; - public int vToolQuality; - public int vHarvestLevel; - - private TC_Aspect_Wrapper[] vAspects; - - public BaseTinkersMaterial vTiConHandler; - - - public static AutoMap invalidMaterials = new AutoMap(); - - - public Material(final String materialName, final MaterialState defaultState, final MaterialStack... inputs){ - this(materialName, defaultState, null, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, final short[] rgba, final MaterialStack... inputs){ - this(materialName, defaultState, null, 0, rgba, -1, -1, -1, -1, false, "", 0, false, false, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, final short[] rgba, int radiationLevel, MaterialStack... materialStacks) { - this(materialName, defaultState, null, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks); - } - - public Material(String materialName, MaterialState defaultState, short[] rgba, int j, int k, int l, int m, int radiationLevel, MaterialStack[] materialStacks){ - this(materialName, defaultState, null, 0, rgba, j, k, l, m, false, "", radiationLevel, false, materialStacks); - } - - public Material(String materialName, MaterialState defaultState, final TextureSet set, short[] rgba, int meltingPoint, int boilingPoint, int protons, int neutrons, int radiationLevel, MaterialStack[] materialStacks){ - this(materialName, defaultState, set, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, false, "", radiationLevel, false, materialStacks); - } - - public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final MaterialStack... inputs){ - this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, inputs); - } - - public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemSymbol, final MaterialStack... inputs){ - this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemSymbol, 0, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, boolean generateCells, final MaterialStack... inputs){ - this(materialName, defaultState, null, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, generateCells, true, inputs); - } - - public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final int radiationLevel, final MaterialStack... inputs){ - this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", radiationLevel, inputs); - } - - public Material(final String materialName, final MaterialState defaultState,final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final int radiationLevel, final MaterialStack... inputs){ - this(materialName, defaultState, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", radiationLevel, inputs); - } - - public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){ - this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, inputs); - } - - public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean addCells,final MaterialStack... inputs) { - this (materialName, defaultState, null, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, addCells, true, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, TextureSet textureSet,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){ - this (materialName, defaultState, textureSet, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, TextureSet textureSet,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean addCells,final MaterialStack... inputs) { - this (materialName, defaultState, textureSet, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, addCells, true, inputs); - } - - private Material(final String materialName, final MaterialState defaultState, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){ - this (materialName, defaultState, null, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean generateCells, final MaterialStack... inputs){ - this (materialName, defaultState, set, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); - } - - public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, String chemicalSymbol, final int radiationLevel, boolean generateCells, boolean generateFluid, final MaterialStack... inputs){ - - if (mMaterialMap.add(this)) { - - } - - if (defaultState == MaterialState.ORE) { - rgba = null; - } - - mComponentMap.put(unlocalizedName, new HashMap()); - - try { - this.unlocalizedName = Utils.sanitizeString(materialName); - this.localizedName = materialName; - mMaterialCache.put(getLocalizedName().toLowerCase(), this); - Logger.INFO("Stored "+getLocalizedName()+" to cache with key: "+getLocalizedName().toLowerCase()); - - this.materialState = defaultState; - - Logger.MATERIALS(this.getLocalizedName()+" is "+defaultState.name()+"."); - - this.vGenerateCells = generateCells; - - //Add Components to an array. - if (inputs == null){ - this.vMaterialInput = null; - } - else { - if (inputs.length != 0){ - for (int i=0; i < inputs.length; i++){ - if (inputs[i] != null){ - this.vMaterialInput.add(i, inputs[i]); - } - } - } - } - - //set RGB - - if (rgba == null) { - if (vMaterialInput.size() > 0) { - - try { - Short[] mMixedRGB = new Short[3]; - AutoMap mMaterialSet = MaterialUtils.getCompoundMaterialsRecursively(this); - for (int mnh = 0; mnh < 3; mnh++) { - AutoMap aDataSet = new AutoMap(); - Set set4 = new HashSet(); - for (Material u : mMaterialSet) { - //if (u.getState() == MaterialState.ORE || u.getState() == MaterialState.SOLID) - set4.add(u); - } - for(Material e : set4){ - aDataSet.put(e.getRGB()[mnh]); - } - - Short aAverage = MathUtils.getShortAverage(aDataSet); - if (aAverage > Short.MAX_VALUE || aAverage < Short.MIN_VALUE || aAverage < 0 || aAverage > 255) { - if (aAverage > 255) { - while (aAverage > 255) { - aAverage = (short) (aAverage/2); - } - } - aAverage = (short) Math.max(Math.min(aAverage, 255), 0); - } - mMixedRGB[mnh] = aAverage; - } - - if (mMixedRGB != null && mMixedRGB[0] != null && mMixedRGB[1] != null && mMixedRGB[2] != null) { - this.RGBA = new short[] {mMixedRGB[0], mMixedRGB[1], mMixedRGB[2], 0}; - } - else { - this.RGBA = Materials.Steel.mRGBa; - } - } - catch (Throwable t) { - t.printStackTrace(); - this.RGBA = Materials.Steel.mRGBa; - } - } - else { - //Boring Grey Material - - int aValueForGen = this.getUnlocalizedName().hashCode(); - int hashSize = MathUtils.howManyPlaces(aValueForGen); - - String a = String.valueOf(aValueForGen); - String b = ""; - - if (hashSize < 9) { - int aSecondHash = this.materialState.hashCode(); - int hashSize2 = MathUtils.howManyPlaces(aSecondHash); - if (hashSize2 + hashSize >= 9) { - b = String.valueOf(aValueForGen); - } - else { - String c = b; - while (MathUtils.howManyPlaces(hashSize + c.length()) < 9) { - c = c + c.hashCode(); - } - b = c; - } - } - - String valueR; - if (b != null) { - valueR = a+b; - } - else { - valueR = a; - } - short fc[] = new short[3]; - int aIndex = 0; - for (char gg : valueR.toCharArray()) { - short ui = Short.parseShort(""+gg); - if (ui > 255 || ui < 0) { - if (ui > 255) { - while (ui > 255) { - ui = (short) (ui / 2); - } - } - else { - ui = 0; - } - } - fc[aIndex++] = ui; - - } - this.RGBA = fc; - } - } - else { - this.RGBA = rgba; - } - - //Set Melting/Boiling point, if value is -1 calculate it from compound inputs. - if (meltingPoint != -1){ - this.meltingPointC = meltingPoint; - } - else { - this.meltingPointC = this.calculateMeltingPoint(); - } - if (boilingPoint != -1){ - if (boilingPoint != 0){ - this.boilingPointC = boilingPoint; - } - else { - this.boilingPointC = meltingPoint*4; - } - } - else { - this.boilingPointC = this.calculateBoilingPoint(); - } - - this.meltingPointK = (int) MathUtils.celsiusToKelvin(this.meltingPointC); - this.boilingPointK = (int) MathUtils.celsiusToKelvin(this.boilingPointC); - - //Set Proton/Neutron count, if value is -1 calculate it from compound inputs. - if (protons != -1){ - this.vProtons = protons; - } - else { - this.vProtons = this.calculateProtons(); - } - if (boilingPoint != -1){ - this.vNeutrons = neutrons; - } - else { - this.vNeutrons = this.calculateNeutrons(); - } - - - this.vAspects = null; - - - this.vMass = this.getMass(); - - //Sets tool Durability - if (durability != 0){ - this.vDurability = durability; - } - else { - long aTempDura = 0; - for (MaterialStack g : this.getComposites()) { - if (g != null) { - aTempDura += safeCast_LongToInt(g.getStackMaterial().getMass() * 2000); - } - } - this.vDurability = aTempDura > 0 ? aTempDura : (this.getComposites().isEmpty() ? 51200 : 32000 * this.getComposites().size()); - } - - if ((this.vDurability >= 0) && (this.vDurability < 64000)){ - this.vToolQuality = 1; - this.vHarvestLevel = 2; - } - else if ((this.vDurability >= 64000) && (this.vDurability < 128000)){ - this.vToolQuality = 2; - this.vHarvestLevel = 2; - } - else if ((this.vDurability >= 128000) && (this.vDurability < 256000)){ - this.vToolQuality = 3; - this.vHarvestLevel = 2; - } - else if ((this.vDurability >= 256000) && (this.vDurability < 512000)){ - this.vToolQuality = 3; - this.vHarvestLevel = 3; - } - else if ((this.vDurability >= 512000) && (this.vDurability <= Integer.MAX_VALUE)){ - this.vToolQuality = 4; - this.vHarvestLevel = 4; - } - else { - this.vToolQuality = 1; - this.vHarvestLevel = 1; - } - - //Sets the Rad level - if (radiationLevel > 0){ - Logger.MATERIALS(this.getLocalizedName()+" is radioactive. Level: "+radiationLevel+"."); - this.isRadioactive = true; - this.vRadiationLevel = (byte) radiationLevel; - } - else { - if (vMaterialInput.size() > 0) { - AutoMap aDataSet = new AutoMap(); - for (MaterialStack m : this.vMaterialInput) { - aDataSet.put(m.getStackMaterial().vRadiationLevel); - } - byte aAverage = MathUtils.getByteAverage(aDataSet); - if (aAverage > 0) { - Logger.MATERIALS(this.getLocalizedName()+" is radioactive due to trace elements. Level: "+aAverage+"."); - this.isRadioactive = true; - this.vRadiationLevel = (byte) aAverage; - } - else { - Logger.MATERIALS(this.getLocalizedName()+" is not radioactive."); - this.isRadioactive = false; - this.vRadiationLevel = 0; - } - } - else { - Logger.MATERIALS(this.getLocalizedName()+" is not radioactive."); - this.isRadioactive = false; - this.vRadiationLevel = 0; - } - } - - /*if (vMaterialInput.size() > 0) { - AutoMap aDataSet = new AutoMap(); - - int bonus = 0; - bonus += this.vMaterialInput.size(); - bonus += MathUtils.roundToClosestInt(meltingPointC/1000); - - - - aDataSet.put(bonus); - - for (MaterialStack m : this.vMaterialInput) { - aDataSet.put(m.getStackMaterial().vTier); - } - int aAverage = MathUtils.getIntAverage(aDataSet); - if (aAverage > Integer.MAX_VALUE || aAverage < Integer.MIN_VALUE) { - aAverage = 0; - } - if (aAverage > 0) { - this.vTier = Math.min(aAverage, 10); - } - else { - this.vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint)); - } - } - else { - this.vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint)); - }*/ - this.vTier = MaterialUtils.getTierOfMaterial(meltingPoint); - - - //Sets the materials 'tier'. Will probably replace this logic. - - this.usesBlastFurnace = blastFurnace; - this.vVoltageMultiplier = MaterialUtils.getVoltageForTier(vTier); - - this.vComponentCount = this.getComponentCount(inputs); - this.vSmallestRatio = this.getSmallestRatio(this.vMaterialInput); - int tempSmallestSize = 0; - - if (this.vSmallestRatio != null){ - for (int v=0;v= 98 || this.getComposites().size() > 1 || this.getMeltingPointC() >= 3600) { - this.vTiConHandler = new BaseTinkersMaterial(this); - } - } - - sChemicalFormula.put(materialName.toLowerCase(), this.vChemicalFormula); - Logger.MATERIALS("Creating a Material instance for "+materialName); - Logger.MATERIALS("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); - Logger.MATERIALS("Protons: "+this.vProtons); - Logger.MATERIALS("Neutrons: "+this.vNeutrons); - Logger.MATERIALS("Mass: "+this.vMass+"/units"); - Logger.MATERIALS("Melting Point: "+this.meltingPointC+"C."); - Logger.MATERIALS("Boiling Point: "+this.boilingPointC+"C."); - } - catch (Throwable t){ - Logger.MATERIALS("Stack Trace for "+materialName); - t.printStackTrace(); - } - } - - private static void checkForCellAndGenerate(Material material) { - if (!material.vGenerateCells) { - return; - } - String aName = Utils.sanitizeString(material.unlocalizedName); - String aName2 = Utils.sanitizeString(material.unlocalizedName.toLowerCase()); - String aName3 = (material.localizedName == null) ? aName : material.localizedName; - ItemStack aTestCell1 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aName, 1); - ItemStack aTestCell2 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aName2, 1); - ItemStack aTestCell3 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aName3, 1); - if (aTestCell1 == null && aTestCell2 == null && aTestCell3 == null) { - Logger.INFO("Generating cell for "+ material.localizedName); - new BaseItemCell(material); - } - else { - if (aTestCell1 != null) { - Logger.INFO("Registering existing cell for "+ material.localizedName+", "+aName); - material.registerComponentForMaterial(OrePrefixes.cell, aTestCell1); - } - else if (aTestCell2 != null) { - Logger.INFO("Registering existing cell for "+ material.localizedName+", "+aName2); - material.registerComponentForMaterial(OrePrefixes.cell, aTestCell2); - } - else if (aTestCell3 != null) { - Logger.INFO("Registering existing cell for "+ material.localizedName+", "+aName3); - material.registerComponentForMaterial(OrePrefixes.cell, aTestCell3); - } - } - } - - public final TextureSet getTextureSet() { - synchronized(this) { - return textureSet; - } - } - - - public TextureSet setTextureSet(TextureSet set) { - return setTextureSet(set, vTier); - } - - public TextureSet setTextureSet(TextureSet set, int aTier) { - if (set != null) { - Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+set.mSetName+". This textureSet was supplied."); - return set; - } - - int aGem = 0; - int aShiny = 0; - TextureSet aSet = null; - - //Check Mixture Contents - for (MaterialStack m : this.getComposites()) { - - //Gems - if (m.getStackMaterial() == ELEMENT.getInstance().AER) { - aGem++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().AQUA) { - aGem++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().IGNIS) { - aGem++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().TERRA) { - aGem++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().MAGIC) { - aGem++; - } - //Shiny Materials - if (m.getStackMaterial() == ELEMENT.getInstance().GOLD) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().SILVER) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().PLATINUM) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().AMERICIUM) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().TITANIUM) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().GERMANIUM) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().GALLIUM) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().MERCURY) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().MAGIC) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().SAMARIUM) { - aShiny++; - } - else if (m.getStackMaterial() == ELEMENT.getInstance().TANTALUM) { - aShiny++; - } - } - - if (aSet == null) { - if (aGem >= this.getComposites().size()/2) { - if (MathUtils.isNumberEven(aGem)) { - Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+TextureSet.SET_GEM_HORIZONTAL.mSetName+"."); - return TextureSet.SET_GEM_HORIZONTAL; - } - else { - Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+TextureSet.SET_GEM_VERTICAL.mSetName+"."); - return TextureSet.SET_GEM_VERTICAL; - } - } - } - - if (aSet == null) { - if (aShiny >= this.getComposites().size()/3) { - Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+TextureSet.SET_SHINY.mSetName+"."); - return TextureSet.SET_SHINY; - } - } - - // build hash table with count - AutoMap sets = new AutoMap(); - if (this.vMaterialInput != null) { - for (MaterialStack r : this.vMaterialInput) { - if (r.getStackMaterial().getTextureSet().mSetName.toLowerCase().contains("fluid")) { - sets.put(ELEMENT.getInstance().GOLD); - } - else { - sets.put(r.getStackMaterial()); - } - } - TextureSet mostUsedTypeTextureSet = MaterialUtils.getMostCommonTextureSet(new ArrayList(sets.values())); - if (mostUsedTypeTextureSet != null && mostUsedTypeTextureSet instanceof TextureSet) { - Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+mostUsedTypeTextureSet.mSetName+"."); - return mostUsedTypeTextureSet; - } - } - Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+Materials.Iron.mIconSet.mSetName+". [Fallback]"); - return Materials.Gold.mIconSet; - } - - public final String getLocalizedName(){ - if (this.localizedName != null) { - return this.localizedName; - } - return "ERROR BAD LOCALIZED NAME"; - } - - public final String getUnlocalizedName(){ - if (this.unlocalizedName != null) { - return this.unlocalizedName; - } - return "ERROR.BAD.UNLOCALIZED.NAME"; - } - - final public MaterialState getState(){ - return this.materialState; - } - - final public short[] getRGB(){ - if (this.RGBA != null) { - return this.RGBA; - } - return new short[] {255,0,0}; - } - - final public short[] getRGBA(){ - if (this.RGBA != null) { - if (this.RGBA.length == 4){ - return this.RGBA; - } - else { - return new short[]{this.RGBA[0], this.RGBA[1], this.RGBA[2], 0}; - } - } - return new short[] {255,0,0, 0}; - } - - final public int getRgbAsHex(){ - - final int returnValue = Utils.rgbtoHexValue(this.RGBA[0], this.RGBA[1], this.RGBA[2]); - if (returnValue == 0){ - return (int) this.dataVar; - } - return Utils.rgbtoHexValue(this.RGBA[0], this.RGBA[1], this.RGBA[2]); - } - - final public long getProtons() { - return this.vProtons; - } - - public final long getNeutrons() { - return this.vNeutrons; - } - - final public long getMass() { - return this.vProtons + this.vNeutrons; - } - - public final int getMeltingPointC() { - return this.meltingPointC; - } - - public final int getBoilingPointC() { - return this.boilingPointC; - } - - public final int getMeltingPointK() { - return this.meltingPointK; - } - - public final int getBoilingPointK() { - return this.boilingPointK; - } - - public final boolean requiresBlastFurnace(){ - return this.usesBlastFurnace; - } - - public final ItemStack getComponentByPrefix(OrePrefixes aPrefix, int stacksize) { - String aKey = aPrefix.name(); - Map g = mComponentMap.get(this.unlocalizedName); - if (g == null) { - Map aMap = new HashMap(); - mComponentMap.put(unlocalizedName, aMap); - g = aMap; - } - ItemStack i = g.get(aKey); - if (i != null) { - return ItemUtils.getSimpleStack(i, stacksize); - } - else { - // Try get a GT Material - Materials Erf = MaterialUtils.getMaterial(this.unlocalizedName); - if (Erf != null && !MaterialUtils.isNullGregtechMaterial(Erf)) { - ItemStack Erg = ItemUtils.getOrePrefixStack(aPrefix, Erf, stacksize); - if (Erg != null && ItemUtils.checkForInvalidItems(Erg)) { - Logger.MATERIALS("Found \"" + aKey + this.unlocalizedName + "\" using backup GT Materials option."); - g.put(aKey, Erg); - mComponentMap.put(unlocalizedName, g); - return Erg; - } - else { - // Try get a molten cell - if (aPrefix == OrePrefixes.cell) { - Erg = ItemUtils.getOrePrefixStack(OrePrefixes.cellMolten, Erf, stacksize); - if (Erg != null && ItemUtils.checkForInvalidItems(Erg)) { - Logger.MATERIALS("Found \"" + OrePrefixes.cellMolten.name() + this.unlocalizedName + "\" using backup GT Materials option."); - g.put(aKey, Erg); - mComponentMap.put(unlocalizedName, g); - return Erg; - } - } - } - } else { - ItemStack u = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(aKey + this.unlocalizedName, stacksize); - if (u != null) { - g.put(aKey, u); - mComponentMap.put(unlocalizedName, g); - return u; - } - } - //Logger.MATERIALS("Unabled to find \"" + aKey + this.unlocalizedName + "\""); - return ItemUtils.getErrorStack(stacksize, (aKey + this.unlocalizedName+" x"+stacksize)); - } - - } - - final public Block getBlock(){ - Block b = Block.getBlockFromItem(getBlock(1).getItem()); - if (b == null) { - Logger.INFO("[ERROR] Tried to get invalid block for "+this.getLocalizedName()+", returning debug block instead."); - } - return b != null ? b : Blocks.lit_furnace; - } - - public final ItemStack getBlock(final int stacksize){ - ItemStack i = getComponentByPrefix(OrePrefixes.block, stacksize); - return i != null ? i : ItemUtils.getItemStackOfAmountFromOreDictNoBroken("block"+this.unlocalizedName, stacksize); - } - - public final ItemStack getDust(final int stacksize){ - ItemStack i = getComponentByPrefix(OrePrefixes.dust, stacksize); - return i != null ? i : ItemUtils.getGregtechDust("dust"+this.unlocalizedName, stacksize); - } - - public final ItemStack getSmallDust(final int stacksize){ - return getComponentByPrefix(OrePrefixes.dustSmall, stacksize); - } - - public final ItemStack getTinyDust(final int stacksize){ - return getComponentByPrefix(OrePrefixes.dustTiny, stacksize); - } - - public final ItemStack getIngot(final int stacksize){ - return getComponentByPrefix(OrePrefixes.ingot, stacksize); - } - - public final ItemStack getHotIngot(final int stacksize){ - return getComponentByPrefix(OrePrefixes.ingotHot, stacksize); - } - - public final ItemStack getPlate(final int stacksize){ - return getComponentByPrefix(OrePrefixes.plate, stacksize); - } - - public final ItemStack getPlateDouble(final int stacksize){ - return getComponentByPrefix(OrePrefixes.plateDouble, stacksize); - } - - public final ItemStack getGear(final int stacksize){ - return getComponentByPrefix(OrePrefixes.gearGt, stacksize); - } - - public final ItemStack getRod(final int stacksize){ - return getComponentByPrefix(OrePrefixes.stick, stacksize); - } - - public final ItemStack getLongRod(final int stacksize){ - return getComponentByPrefix(OrePrefixes.stickLong, stacksize); - } - - public final ItemStack getBolt(final int stacksize){ - return getComponentByPrefix(OrePrefixes.bolt, stacksize); - } - - public final ItemStack getScrew(final int stacksize){ - return getComponentByPrefix(OrePrefixes.screw, stacksize); - } - - public final ItemStack getRing(final int stacksize){ - return getComponentByPrefix(OrePrefixes.ring, stacksize); - } - - public final ItemStack getRotor(final int stacksize){ - return getComponentByPrefix(OrePrefixes.rotor, stacksize); - } - - public final ItemStack getFrameBox(final int stacksize){ - return getComponentByPrefix(OrePrefixes.frameGt, stacksize); - } - - public final ItemStack getCell(final int stacksize){ - return getComponentByPrefix(OrePrefixes.cell, stacksize); - } - - public final ItemStack getPlasmaCell(final int stacksize){ - return getComponentByPrefix(OrePrefixes.cellPlasma, stacksize); - } - - public final ItemStack getNugget(final int stacksize){ - return getComponentByPrefix(OrePrefixes.nugget, stacksize); - } - - /** - * Ore Components - * @return - */ - - public final ItemStack getOre(final int stacksize){ - return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.getUnlocalizedName()), stacksize); - } - public final Block getOreBlock(final int stacksize){ - //Logger.DEBUG_MATERIALS("Trying to get ore block for "+this.getLocalizedName()+". Looking for '"+"ore"+Utils.sanitizeString(this.getUnlocalizedName())+"'."); - try{ - ItemStack a1 = getOre(1); - Item a2 = a1.getItem(); - Block a3 = Block.getBlockFromItem(a2); - if (a3 != null) { - return a3; - } - - Block x = Block.getBlockFromItem(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.unlocalizedName), stacksize).getItem()); - if (x != null){ - return x; - } - } - catch (Throwable t){ - //t.printStackTrace(); - } - //Logger.MATERIALS("Failed getting the Ore Block for "+this.getLocalizedName()+"."); - return Blocks.stone; - } - public final ItemStack getCrushed(final int stacksize){ - return getComponentByPrefix(OrePrefixes.crushed, stacksize); - } - public final ItemStack getCrushedPurified(final int stacksize){ - return getComponentByPrefix(OrePrefixes.crushedPurified, stacksize); - } - public final ItemStack getCrushedCentrifuged(final int stacksize){ - return getComponentByPrefix(OrePrefixes.crushedCentrifuged, stacksize); - } - public final ItemStack getDustPurified(final int stacksize){ - return getComponentByPrefix(OrePrefixes.dustPure, stacksize); - } - public final ItemStack getDustImpure(final int stacksize){ - return getComponentByPrefix(OrePrefixes.dustImpure, stacksize); - } - public final ItemStack getMilled(final int stacksize){ - return getComponentByPrefix(CustomOrePrefix.milled.get(), stacksize); - } - - public final boolean hasSolidForm() { - if (ItemUtils.checkForInvalidItems(new ItemStack[] {getDust(1), getBlock(1), getTinyDust(1), getSmallDust(1)})) { - return true; - } - return false; - } - - final public ItemStack[] getMaterialComposites(){ - if (this.vMaterialInput != null && !this.vMaterialInput.isEmpty()){ - final ItemStack[] temp = new ItemStack[this.vMaterialInput.size()]; - for (int i=0;i getComposites(){ - return this.vMaterialInput; - } - - final public int[] getMaterialCompositeStackSizes(){ - if (!this.vMaterialInput.isEmpty()){ - final int[] temp = new int[this.vMaterialInput.size()]; - for (int i=0;i tempInput){ - if (tempInput != null){ - if (!tempInput.isEmpty()){ - Logger.MATERIALS("length: "+tempInput.size()); - Logger.MATERIALS("(inputs != null): "+(tempInput != null)); - //Utils.LOG_MATERIALS("length: "+inputs.length); - final long[] tempRatio = new long[tempInput.size()]; - for (int x=0;x 0){ - String tempRatioStringThing1 = ""; - for (int r=0;r tempInput = this.vMaterialInput; - if (tempInput != null){ - if (!tempInput.isEmpty()){ - String dummyFormula = ""; - final long[] dummyFormulaArray = this.getSmallestRatio(tempInput); - if (dummyFormulaArray != null){ - if (dummyFormulaArray.length >= 1){ - for (int e=0;e 1){ - - if (aChemFormula.length() > 3){ - dummyFormula = dummyFormula + "(" + aChemFormula + ")" + dummyFormulaArray[e]; - } - else { - dummyFormula = dummyFormula + aChemFormula + dummyFormulaArray[e]; - } - } - else if (dummyFormulaArray[e] == 1){ - if (aChemFormula.length() > 3){ - dummyFormula = dummyFormula + "(" +aChemFormula + ")"; - } - else { - dummyFormula = dummyFormula +aChemFormula; - } - } - else { - dummyFormula = dummyFormula + "??"; - } - } else { - dummyFormula = dummyFormula + "??"; - } - } else { - dummyFormula = dummyFormula + "??"; - } - } - } - return StringUtils.subscript(dummyFormula); - //return dummyFormula; - } - Logger.MATERIALS("dummyFormulaArray <= 0"); - } - Logger.MATERIALS("dummyFormulaArray == null"); - } - Logger.MATERIALS("tempInput.length <= 0"); - } - Logger.MATERIALS("tempInput == null"); - return "??"; - - } - - public final boolean queueFluidGeneration() { - return isFluidQueued = true; - } - - public final static void generateQueuedFluids() { - for (Material m : mMaterialMap) { - if (m.isFluidQueued) { - } - } - } - - //If we need a fluid, let's just queue it for later. - public boolean isFluidQueued = false; - - public final Fluid generateFluid(){ - if (this.materialState == MaterialState.ORE){ - return null; - } - - Fluid aGTBaseFluid = null; - - // Clean up Internal Fluid Generation - final Materials n1 = MaterialUtils.getMaterial(this.getLocalizedName(), Utils.sanitizeString(this.getLocalizedName())); - final Materials n2 = MaterialUtils.getMaterial(this.getUnlocalizedName(), Utils.sanitizeString(this.getUnlocalizedName())); - - FluidStack f1 = FluidUtils.getWildcardFluidStack(n1, 1); - FluidStack f2 = FluidUtils.getWildcardFluidStack(n2, 1); - FluidStack f3 = FluidUtils.getWildcardFluidStack(Utils.sanitizeString(this.getUnlocalizedName(), new char[] {'-', '_'}), 1); - FluidStack f4 = FluidUtils.getWildcardFluidStack(Utils.sanitizeString(this.getLocalizedName(), new char[] {'-', '_'}), 1); - - if (f1 != null) { - aGTBaseFluid = f1.getFluid(); - } - else if (f2 != null) { - aGTBaseFluid = f2.getFluid(); - } - else if (f3 != null) { - aGTBaseFluid = f3.getFluid(); - } - else if (f4 != null) { - aGTBaseFluid = f4.getFluid(); - } - - - ItemStack aFullCell = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1); - ItemStack aFullCell2 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getLocalizedName(), 1); - ItemStack aFullCell3 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+Utils.sanitizeString(this.getUnlocalizedName(), new char[] {'-', '_'}), 1); - ItemStack aFullCell4 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+Utils.sanitizeString(this.getLocalizedName(), new char[] {'-', '_'}), 1); - - Logger.MATERIALS("Generating our own fluid."); - //Generate a Cell if we need to, but first validate all four searches are invalid - - if (!ItemUtils.checkForInvalidItems(new ItemStack[] {aFullCell, aFullCell2, aFullCell3, aFullCell4})){ - if (this.vGenerateCells){ - Item g = new BaseItemCell(this); - aFullCell = ItemUtils.getSimpleStack(g); - Logger.MATERIALS("Generated a cell for "+this.getUnlocalizedName()); - } - else { - Logger.MATERIALS("Did not generate a cell for "+this.getUnlocalizedName()); - } - } - else { - // One cell we searched for was valid, let's register it. - if (aFullCell != null) { - this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell); - } - else if (aFullCell2 != null) { - this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell2); - } - else if (aFullCell3 != null) { - this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell3); - } - else if (aFullCell4 != null) { - this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell4); - } - } - - // We found a GT fluid, let's use it. - // Good chance we registered the cell from this material too. - if (aGTBaseFluid != null) { - return aGTBaseFluid; - } - - // This fluid does not exist at all, time to generate it. - if (this.materialState == MaterialState.SOLID){ - return FluidUtils.addGTFluid( - this.getUnlocalizedName(), - "Molten "+this.getLocalizedName(), - this.RGBA, - 4, - this.getMeltingPointK(), - aFullCell, - ItemUtils.getEmptyCell(), - 1000, - this.vGenerateCells); - } - else if (this.materialState == MaterialState.LIQUID || this.materialState == MaterialState.PURE_LIQUID){ - return FluidUtils.addGTFluid( - this.getUnlocalizedName(), - this.getLocalizedName(), - this.RGBA, - 0, - this.getMeltingPointK(), - aFullCell, - ItemUtils.getEmptyCell(), - 1000, - this.vGenerateCells); - } - else if (this.materialState == MaterialState.GAS || this.materialState == MaterialState.PURE_GAS){ - return FluidUtils.generateGas(unlocalizedName, this.getLocalizedName(), getMeltingPointK(), getRGBA(), vGenerateCells); - /*return FluidUtils.addGTFluid( - this.getUnlocalizedName(), - this.getLocalizedName()+" Gas", - this.RGBA, - 2, - this.getMeltingPointK(), - aFullCell, - ItemUtils.getEmptyCell(), - 1000, - this.vGenerateCells);*/ - } - else { //Plasma - return this.generatePlasma(); - } - } - - public final Fluid generatePlasma(){ - if (this.materialState == MaterialState.ORE){ - return null; - } - final Materials isValid = tryFindGregtechMaterialEquivalent(); - - if (!this.vGenerateCells){ - return null; - } - if (isValid != null) { - for (Materials m : invalidMaterials.values()){ - if (isValid == m){ - return null; - } - } - if (isValid.mPlasma != null){ - Logger.MATERIALS("Using a pre-defined Plasma from GT."); - return isValid.mPlasma; - } - } - Logger.MATERIALS("Generating our own Plasma."); - return FluidUtils.addGTPlasma(this); - } - - - public Fluid getFluid() { - return mFluid; - } - - final public FluidStack getFluidStack(final int fluidAmount) { - if (this.mFluid == null){ - return null; - } - final FluidStack moltenFluid = new FluidStack(this.mFluid, fluidAmount); - return moltenFluid; - } - - final public boolean setFluid(Fluid aFluid) { - if (this.mFluid == null){ - this.mFluid = aFluid; - return true; - } - return false; - } - - - final public int calculateMeltingPoint(){ - try { - AutoMap aDataSet = new AutoMap(); - for (MaterialStack m : this.vMaterialInput) { - aDataSet.put(m.getStackMaterial().getMeltingPointC()); - } - long aAverage = MathUtils.getIntAverage(aDataSet); - return MathUtils.safeInt(aAverage); - } - catch (Throwable r){ - r.printStackTrace(); - return 500; - } - } - - final public int calculateBoilingPoint(){ - try { - - AutoMap aDataSet = new AutoMap(); - for (MaterialStack m : this.vMaterialInput) { - aDataSet.put(m.getStackMaterial().getBoilingPointC()); - } - long aAverage = MathUtils.getIntAverage(aDataSet); - return MathUtils.safeInt(aAverage); - } - catch (Throwable r){ - r.printStackTrace(); - return 2500; - } - } - - final public long calculateProtons(){ - try { - - AutoMap aDataSet = new AutoMap(); - for (MaterialStack m : this.vMaterialInput) { - aDataSet.put(m.getStackMaterial().getProtons()); - } - long aAverage = MathUtils.getLongAverage(aDataSet); - return MathUtils.safeInt(aAverage); - } - catch (Throwable r){ - r.printStackTrace(); - return 50; - } - } - - final public long calculateNeutrons(){ - try { - - AutoMap aDataSet = new AutoMap(); - for (MaterialStack m : this.vMaterialInput) { - aDataSet.put(m.getStackMaterial().getNeutrons()); - } - long aAverage = MathUtils.getLongAverage(aDataSet); - return MathUtils.safeInt(aAverage); - } - catch (Throwable r){ - r.printStackTrace(); - return 75; - } - } - - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (!Material.class.isInstance(obj)) { - return false; - } - Material aObj = (Material) obj; - if (aObj.unlocalizedName.equals(this.unlocalizedName)) { - if (aObj.localizedName.equals(this.localizedName)) { - return true; - } - } - return false; - } - - public boolean registerComponentForMaterial(FluidStack aStack) { - return registerComponentForMaterial(this, aStack); - } - - private static boolean registerComponentForMaterial(Material componentMaterial, FluidStack aStack) { - if (componentMaterial != null && aStack != null && componentMaterial.mFluid == null) { - componentMaterial.mFluid = aStack.getFluid(); - return true; - } - return false; - } - - public boolean registerComponentForMaterial(ComponentTypes aPrefix, ItemStack aStack) { - return registerComponentForMaterial(this, aPrefix.getGtOrePrefix(), aStack); - } - - public boolean registerComponentForMaterial(OrePrefixes aPrefix, ItemStack aStack) { - return registerComponentForMaterial(this, aPrefix, aStack); - } - - public static boolean registerComponentForMaterial(Material componentMaterial, ComponentTypes aPrefix, ItemStack aStack) { - return registerComponentForMaterial(componentMaterial, aPrefix.getGtOrePrefix(), aStack); - } - - public static boolean registerComponentForMaterial(Material componentMaterial, OrePrefixes aPrefix, ItemStack aStack) { - if (componentMaterial == null) { - return false; - } - //Register Component - Map aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName()); - if (aMap == null) { - aMap = new HashMap(); - } - String aKey = aPrefix.name(); - ItemStack x = aMap.get(aKey); - if (x == null) { - aMap.put(aKey, aStack); - Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); - Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); - return true; - } - else { - //Bad - Logger.MATERIALS("Tried to double register a material component. "); - return false; - } - } - - public Materials tryFindGregtechMaterialEquivalent() { - return tryFindGregtechMaterialEquivalent(this); - } - - - public static Materials tryFindGregtechMaterialEquivalent(Material aMaterial) { - String aMaterialName = aMaterial.getLocalizedName(); - Materials aGregtechMaterial = Materials.get(aMaterialName); - if (aGregtechMaterial == null || MaterialUtils.isNullGregtechMaterial(aGregtechMaterial)) { - aMaterialName = aMaterialName.replace(" ", "_"); - aGregtechMaterial = Materials.get(aMaterialName); - if (aGregtechMaterial == null || MaterialUtils.isNullGregtechMaterial(aGregtechMaterial)) { - aMaterialName = aMaterialName.replace(" ", ""); - aGregtechMaterial = Materials.get(aMaterialName); - if (aGregtechMaterial == null || MaterialUtils.isNullGregtechMaterial(aGregtechMaterial)) { - return null; - } - else { - return aGregtechMaterial; - } - } - else { - return aGregtechMaterial; - } - } - else { - return aGregtechMaterial; - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java deleted file mode 100644 index 8425ed89be..0000000000 --- a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java +++ /dev/null @@ -1,409 +0,0 @@ -package gtPlusPlus.core.material; - -import java.util.Set; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; -import gtPlusPlus.core.block.base.BlockBaseModular; -import gtPlusPlus.core.block.base.BlockBaseOre; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; -import gtPlusPlus.core.item.base.bolts.BaseItemBolt; -import gtPlusPlus.core.item.base.dusts.BaseItemDust; -import gtPlusPlus.core.item.base.dusts.BaseItemDust.DustState; -import gtPlusPlus.core.item.base.gears.BaseItemGear; -import gtPlusPlus.core.item.base.ingots.BaseItemIngot; -import gtPlusPlus.core.item.base.ingots.BaseItemIngotHot; -import gtPlusPlus.core.item.base.nugget.BaseItemNugget; -import gtPlusPlus.core.item.base.ore.BaseItemCentrifugedCrushedOre; -import gtPlusPlus.core.item.base.ore.BaseItemCrushedOre; -import gtPlusPlus.core.item.base.ore.BaseItemImpureDust; -import gtPlusPlus.core.item.base.ore.BaseItemPurifiedCrushedOre; -import gtPlusPlus.core.item.base.ore.BaseItemPurifiedDust; -import gtPlusPlus.core.item.base.plates.BaseItemPlate; -import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble; -import gtPlusPlus.core.item.base.rings.BaseItemRing; -import gtPlusPlus.core.item.base.rods.BaseItemRod; -import gtPlusPlus.core.item.base.rods.BaseItemRodLong; -import gtPlusPlus.core.item.base.rotors.BaseItemRotor; -import gtPlusPlus.core.item.base.screws.BaseItemScrew; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_AlloySmelter; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Assembler; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelter; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_DustGeneration; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Extruder; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_FluidCanning; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Fluids; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MaterialProcessing; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MetalRecipe; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Ore; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Plasma; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Plates; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling; -import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_ShapedCrafting; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class MaterialGenerator { - - public static final AutoMap>> mRecipeMapsToGenerate = new AutoMap>>(); - - @SuppressWarnings("unused") - private static volatile Item temp; - @SuppressWarnings("unused") - private static volatile Block tempBlock; - - - public static boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid) { - return addFluidExtractionRecipe(aEmpty, aRemains, aFluid, null, null); - } - - /** - * Called Reflectively from CORE.RA.addFluidExtractionRecipe - * @param aSpecial - * @return - */ - public static boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid, Integer aDuration, Integer aEU) { - RecipeGen_FluidCanning g = new RecipeGen_FluidCanning(true, aEmpty, aRemains, aFluid, aDuration, aEU); - if (g != null && g.valid()) { - //Logger.INFO("[FIND] Adding Extraction recipe for "+ItemUtils.getItemName(aEmpty)+", "+ItemUtils.getItemName(aRemains)+", "+ItemUtils.getFluidName(aFluid)); - return true; - } - Logger.INFO("[ERROR] FAILED adding Extraction recipe for "+ItemUtils.getItemName(aEmpty)+", "+ItemUtils.getItemName(aRemains)+", "+ItemUtils.getFluidName(aFluid)); - return false; - } - - - public static boolean addFluidCannerRecipe(ItemStack aEmpty, ItemStack aFullContainer, FluidStack aFluidIn, FluidStack rFluidOut) { - return addFluidCannerRecipe(aEmpty, aFullContainer, aFluidIn, rFluidOut, null, null); - } - /** - * Called Reflectively from CORE.RA.addFluidCannerRecipe - * @return - */ - public static boolean addFluidCannerRecipe(ItemStack aEmpty, ItemStack aFullContainer, FluidStack aFluidIn, FluidStack rFluidOut, Integer aTime, Integer aEu) { - /*GT_Recipe r = new Recipe_GT( - true, - new ItemStack[] {aEmpty}, - new ItemStack[] {aFullContainer}, - null, - new int[] {}, - new FluidStack[] {rFluidIn}, - new FluidStack[] {rFluidOut}, - 0, 0, 0);*/ - //new RecipeGen_FluidCanning(r, false); - RecipeGen_FluidCanning g = new RecipeGen_FluidCanning(false, aEmpty, aFullContainer, aFluidIn, null, null, 0); - if (g != null && g.valid()) { - return true; - } - return false; - } - - public static void generate(final Material matInfo){ - generate(matInfo, true); - } - - - public static void generate(final Material matInfo, final boolean generateEverything){ - generate(matInfo, generateEverything, true); - } - - public static boolean generate(final Material matInfo, final boolean generateEverything, final boolean generateBlastSmelterRecipes){ - try { - final String unlocalizedName = matInfo.getUnlocalizedName(); - final String materialName = matInfo.getLocalizedName(); - final short[] C = matInfo.getRGBA(); - final int Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); - final boolean hotIngot = matInfo.requiresBlastFurnace(); - int materialTier = matInfo.vTier; //TODO - - if ((materialTier > 10) || (materialTier <= 0)){ - materialTier = 2; - } - - int sRadiation = 0; - if (ItemUtils.isRadioactive(materialName) || (matInfo.vRadiationLevel != 0)){ - sRadiation = matInfo.vRadiationLevel; - } - - if (matInfo.getState() == MaterialState.SOLID){ - if (generateEverything == true){ - if (sRadiation >= 1){ - tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); - temp = new BaseItemIngot(matInfo); - - temp = new BaseItemDust(matInfo); - temp = new BaseItemNugget(matInfo); - temp = new BaseItemPlate(matInfo); - temp = new BaseItemRod(matInfo); - temp = new BaseItemRodLong(matInfo); - } - - else { - tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); - tempBlock = new BlockBaseModular(matInfo,BlockTypes.FRAME); - temp = new BaseItemIngot(matInfo); - if (hotIngot){ - temp = new BaseItemIngotHot(matInfo); - } - temp = new BaseItemDust(matInfo); - temp = new BaseItemNugget(matInfo); - temp = new BaseItemPlate(matInfo); - temp = new BaseItemPlateDouble(matInfo); - temp = new BaseItemBolt(matInfo); - temp = new BaseItemRod(matInfo); - temp = new BaseItemRodLong(matInfo); - temp = new BaseItemRing(matInfo); - temp = new BaseItemScrew(matInfo); - temp = new BaseItemRotor(matInfo); - temp = new BaseItemGear(matInfo); - } - } else { - tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); - - temp = new BaseItemIngot(matInfo); - temp = new BaseItemDust(matInfo); - temp = new BaseItemNugget(matInfo); - temp = new BaseItemPlate(matInfo); - temp = new BaseItemPlateDouble(matInfo); - } - } - else if (matInfo.getState() == MaterialState.LIQUID){ - if (generateEverything == true){ - tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); - } - temp = new BaseItemIngot(matInfo); - temp = new BaseItemDust(matInfo); - temp = new BaseItemNugget(matInfo); - temp = new BaseItemPlate(matInfo); - temp = new BaseItemPlateDouble(matInfo); - } - else if (matInfo.getState() == MaterialState.GAS){ - temp = new BaseItemDust(matInfo); - FluidUtils.generateGas(unlocalizedName, materialName, matInfo.getMeltingPointK(), C, true); - } - else if (matInfo.getState() == MaterialState.PURE_GAS){ - FluidUtils.generateGas(unlocalizedName, materialName, matInfo.getMeltingPointK(), C, true); - return true; - } - else if (matInfo.getState() == MaterialState.PURE_LIQUID){ - FluidUtils.generateFluidNoPrefix(unlocalizedName, materialName, matInfo.getMeltingPointK(), C); - return true; - } - else if (matInfo.getState() == MaterialState.ORE){ - - } - - //Add A jillion Recipes - old code - new RecipeGen_AlloySmelter(matInfo); - new RecipeGen_Assembler(matInfo); - if (generateBlastSmelterRecipes){ - new RecipeGen_BlastSmelter(matInfo); - } - new RecipeGen_MetalRecipe(matInfo); - new RecipeGen_Extruder(matInfo); - new RecipeGen_Fluids(matInfo); - new RecipeGen_Plates(matInfo); - new RecipeGen_ShapedCrafting(matInfo); - new RecipeGen_MaterialProcessing(matInfo); - - new RecipeGen_DustGeneration(matInfo); - new RecipeGen_Recycling(matInfo); - new RecipeGen_Plasma(matInfo); - - return true; - - } catch (final Throwable t) - - { - Logger.MATERIALS(""+matInfo.getLocalizedName()+" failed to generate."); - return false; - } - } - - public static void generateDusts(final Material matInfo){ - final String unlocalizedName = matInfo.getUnlocalizedName(); - final String materialName = matInfo.getLocalizedName(); - final short[] C = matInfo.getRGBA(); - final int Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); - int materialTier = matInfo.vTier; //TODO - - if ((materialTier > 10) || (materialTier <= 0)){ - materialTier = 2; - } - - int sRadiation = 0; - if (ItemUtils.isRadioactive(materialName) || (matInfo.vRadiationLevel != 0)){ - sRadiation = matInfo.vRadiationLevel; - } - - if (matInfo.getState() == MaterialState.SOLID){ - temp = new BaseItemDust(matInfo); - } - - //Add A jillion Recipes - old code - try { - RecipeGen_DustGeneration.addMixerRecipe_Standalone(matInfo); - new RecipeGen_Fluids(matInfo); - new RecipeGen_MaterialProcessing(matInfo); - } - catch (Throwable t) { - Logger.MATERIALS("Failed to generate some recipes for "+materialName); - Logger.ERROR("Failed to generate some recipes for "+materialName); - t.printStackTrace(); - } - //RecipeGen_Recycling.generateRecipes(matInfo); - } - - public static void generateNuclearMaterial(final Material matInfo){ - generateNuclearMaterial(matInfo, true); - } - - - public static void generateNuclearDusts(final Material matInfo){ - generateNuclearDusts(matInfo, true); - } - - public static void generateNuclearDusts(final Material matInfo, boolean generateDehydratorRecipe){ - generateNuclearMaterial(matInfo, false, true, false, false, true); - if (generateDehydratorRecipe && matInfo.getFluid() != null && matInfo.getDust(0) != null) { - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(20) - }, - matInfo.getFluidStack(144), - null, - new ItemStack[] { - matInfo.getDust(1), - }, - new int[] { 10000 }, - 10*(matInfo.vVoltageMultiplier/5), // Time in ticks - matInfo.vVoltageMultiplier); // EU - } - else { - Logger.INFO("Nuclear Dehydrator: Did not generate recipe for "+matInfo.getLocalizedName()+" | Null Fluid? "+(matInfo.getFluid() == null)+" | Null Dust? "+(matInfo.getDust(0) == null)); - } - } - - public static void generateNuclearMaterial(final Material matInfo, final boolean generatePlates){ - generateNuclearMaterial(matInfo, true, true, true, generatePlates, true); - } - - public static void generateNuclearMaterial(final Material matInfo, final boolean generateBlock, - final boolean generateDusts, final boolean generateIngot, final boolean generatePlates, final boolean disableOptionalRecipes){ - try { - - if (generateBlock) { - tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); - } - if (generateDusts) { - temp = new BaseItemDust(matInfo); - } - if (generateIngot) { - temp = new BaseItemIngot(matInfo); - temp = new BaseItemNugget(matInfo); - } - - if (generatePlates) { - temp = new BaseItemPlate(matInfo); - temp = new BaseItemPlateDouble(matInfo); - new RecipeGen_Plates(matInfo); - new RecipeGen_Extruder(matInfo); - new RecipeGen_Assembler(matInfo); - } - - if (!disableOptionalRecipes) { - new RecipeGen_ShapedCrafting(matInfo); - new RecipeGen_Fluids(matInfo); - new RecipeGen_MaterialProcessing(matInfo); - new RecipeGen_Recycling(matInfo); - } - - new RecipeGen_MetalRecipe(matInfo); - new RecipeGen_DustGeneration(matInfo, disableOptionalRecipes); - new RecipeGen_Plasma(matInfo); - - } catch (final Throwable t){ - Logger.MATERIALS(""+matInfo.getLocalizedName()+" failed to generate."); - } - } - - - public static void generateOreMaterial(final Material matInfo){ - generateOreMaterial(matInfo, true, true, true, matInfo.getRGBA()); - } - - @SuppressWarnings("unused") - public static void generateOreMaterial(final Material matInfo, boolean generateOre, boolean generateDust, boolean generateSmallTinyDusts, short[] customRGB){ - try { - - if (matInfo == null){ - Logger.DEBUG_MATERIALS("Invalid Material while constructing null material."); - return; - } - - final String unlocalizedName = matInfo.getUnlocalizedName(); - final String materialName = matInfo.getLocalizedName(); - final short[] C = customRGB; - final Integer Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); - - - if (Colour == null){ - Logger.DEBUG_MATERIALS("Invalid Material while constructing "+materialName+"."); - return; - } - - int sRadiation = 0; - if (matInfo.vRadiationLevel > 0){ - sRadiation = matInfo.vRadiationLevel; - } - - if (generateOre) { - tempBlock = new BlockBaseOre(matInfo, BlockTypes.ORE, Colour.intValue()); - } - - DustState aState = new DustState(generateDust, generateSmallTinyDusts, generateSmallTinyDusts); - - if (!aState.generatesDust()) { - if (aState.generatesSmallDust()) { - temp = new BaseItemComponent(matInfo, ComponentTypes.DUSTSMALL); - } - if (aState.generatesTinyDust()) { - temp = new BaseItemComponent(matInfo, ComponentTypes.DUSTTINY); - } - } - else { - temp = new BaseItemDust(aState, matInfo); - } - - temp = new BaseItemCrushedOre(matInfo); - temp = new BaseItemCentrifugedCrushedOre(matInfo); - temp = new BaseItemPurifiedCrushedOre(matInfo); - temp = new BaseItemImpureDust(matInfo); - temp = new BaseItemPurifiedDust(matInfo); - - Logger.MATERIALS("Generated all ore components for "+matInfo.getLocalizedName()+", now generating processing recipes."); - new RecipeGen_Ore(matInfo); - - } catch (final Throwable t){ - Logger.MATERIALS("[Error] "+(matInfo != null ? matInfo.getLocalizedName() : "Null Material")+" failed to generate."); - t.printStackTrace(); - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/material/MaterialStack.java b/src/Java/gtPlusPlus/core/material/MaterialStack.java deleted file mode 100644 index 63a9ccce9c..0000000000 --- a/src/Java/gtPlusPlus/core/material/MaterialStack.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.core.material; - -import java.math.BigDecimal; -import java.math.RoundingMode; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class MaterialStack { - - private final transient int[] vAmount; - private final Material stackMaterial; - private final double vPercentageToUse; - - public MaterialStack(final Material inputs, final double partOutOf100){ - this.stackMaterial = inputs; - //Logger.INFO("Tried getting MaterialStack for "+inputs.getLocalizedName()); - this.vPercentageToUse = partOutOf100; - this.vAmount = this.math(partOutOf100); - } - - private int[] math(final double val){ - double i; - //Cast to a BigDecimal to round it. - final BigDecimal bd = new BigDecimal(val).setScale(2, RoundingMode.HALF_EVEN); - i = bd.doubleValue(); - //Split the string into xx.xx - final String[] arr=String.valueOf(i).split("\\."); - final int[] intArr=new int[2]; - intArr[0]=Integer.parseInt(arr[0]); - intArr[1]=Integer.parseInt(arr[1]); - return intArr; - } - - public ItemStack getValidStack(){ - if (this.stackMaterial.getDust(1) == null){ - //if (this.stackMaterial.getCell(1) == null){ - return null; - //} - //return this.stackMaterial.getCell(this.vAmount[0]); - } - return this.stackMaterial.getDust(this.vAmount[0]); - } - - public ItemStack getDustStack(){ - return this.stackMaterial.getDust(this.vAmount[0]); - } - - public ItemStack getDustStack(final int amount){ - return this.stackMaterial.getDust(amount); - } - - public Material getStackMaterial(){ - if (this.stackMaterial == null){ - Logger.MATERIALS("Tried getStackMaterial, got an invalid material."); - Logger.MATERIALS(ReflectionUtils.getMethodName(0)); - Logger.MATERIALS(ReflectionUtils.getMethodName(1)); - Logger.MATERIALS(ReflectionUtils.getMethodName(2)); - Logger.MATERIALS(ReflectionUtils.getMethodName(3)); - return null; - } - return this.stackMaterial; - } - - public double getvPercentageToUse(){ - return this.vPercentageToUse; - } - - public long[] getSmallestStackSizes(){ - return this.stackMaterial.getSmallestRatio(this.stackMaterial.getComposites()); - } - - public int getPartsPerOneHundred(){ - if (this.vAmount != null){ - if ((this.vAmount[0] >= 1) && (this.vAmount[0] <= 100)){ - return this.vAmount[0]; - } - } - return 100; - } - public ItemStack getLeftOverStacksFromDecimalValue(){ - final int temp = this.vAmount[1]; - int getCount; - if ((temp >= 25) && (temp <=99)){ - getCount = temp/25; - return this.stackMaterial.getSmallDust(getCount); - } - else if ((temp >= 11) && (temp <= 24)){ - getCount = temp/11; - return this.stackMaterial.getTinyDust(getCount); - } - else { - return null; - } - } - - public ItemStack[] getValidItemStacks(){ - return ItemUtils.validItemsForOreDict(this.stackMaterial.getUnlocalizedName()); - } - - - - - - -} diff --git a/src/Java/gtPlusPlus/core/material/NONMATERIAL.java b/src/Java/gtPlusPlus/core/material/NONMATERIAL.java deleted file mode 100644 index 7ab72d50bc..0000000000 --- a/src/Java/gtPlusPlus/core/material/NONMATERIAL.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.core.material; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.TextureSet; -import gtPlusPlus.core.util.minecraft.MaterialUtils; - -public class NONMATERIAL { - - //Soul Sand - public static final Material SOULSAND = MaterialUtils.generateMaterialFromGtENUM(Materials.SoulSand); - - //Redstone - public static final Material REDSTONE = MaterialUtils.generateMaterialFromGtENUM(Materials.Redstone); - - //Glowstone Dust - public static final Material GLOWSTONE = MaterialUtils.generateMaterialFromGtENUM(Materials.Glowstone); - - //Enderpearl - public static final Material ENDERPEARL = MaterialUtils.generateMaterialFromGtENUM(Materials.EnderPearl); - - //Raw Flesh - public static final Material MEAT = MaterialUtils.generateMaterialFromGtENUM(Materials.MeatRaw); - - //Clay - public static final Material CLAY = MaterialUtils.generateMaterialFromGtENUM(Materials.Clay); - - //Wrought Iron - public static final Material WROUGHT_IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.WroughtIron); - - //PTFE - public static final Material PTFE = MaterialUtils.generateMaterialFromGtENUM(MaterialUtils.getMaterial("Polytetrafluoroethylene", "Plastic")); - - //Plastic - public static final Material PLASTIC = MaterialUtils.generateMaterialFromGtENUM(MaterialUtils.getMaterial("Plastic", "Rubber")); - - - static { - MEAT.setTextureSet(TextureSet.SET_ROUGH); - CLAY.setTextureSet(TextureSet.SET_ROUGH); - } - - - -} diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java deleted file mode 100644 index 0186c23a07..0000000000 --- a/src/Java/gtPlusPlus/core/material/ORES.java +++ /dev/null @@ -1,849 +0,0 @@ -package gtPlusPlus.core.material; - -import gregtech.api.enums.TextureSet; -import gtPlusPlus.core.client.CustomTextureSet.TextureSets; -import gtPlusPlus.core.material.state.MaterialState; - -public final class ORES { - - public static final Material AGARDITE_CD = new Material( - "Agardite (Cd)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{170, 188, 33, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (CdCa)Cu7(AsO2)4(O2H)5·3H2O - new MaterialStack(ELEMENT.getInstance().CADMIUM, 1), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().COPPER, 7), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 4), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 21), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 11) - }); - - public static final Material AGARDITE_LA = new Material( - "Agardite (La)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{206, 232, 9, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (LaCa)Cu5(AsO6)2(OH)4·3H2O - new MaterialStack(ELEMENT.getInstance().LANTHANUM, 1), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().COPPER, 5), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 19), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 10) - }); - - public static final Material AGARDITE_ND = new Material( - "Agardite (Nd)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{225, 244, 78, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (NdCa)Cu6(As3O3)2(O2H)6·3H2O - new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 1), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().COPPER, 6), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 6), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 21), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 12) - }); - - public static final Material AGARDITE_Y = new Material( - "Agardite (Y)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{210, 232, 44, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (YCa)Cu5(As2O4)3(OH)6·3H2O - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().COPPER, 5), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 6), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 21), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 12) - }); - - //Alburnite - //Ag8GeTe2S4 - public static final Material ALBURNITE = new Material( - "Alburnite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{16, 5, 105, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().GOLD, 8), - new MaterialStack(ELEMENT.getInstance().GERMANIUM, 1), - new MaterialStack(ELEMENT.getInstance().TELLURIUM, 2), - new MaterialStack(ELEMENT.getInstance().SULFUR, 4) - }); - - public static final Material CERITE = new Material( - "Cerite", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{68, 13, 0, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (Ce,La,Ca)9(Mg,Fe+3)(SiO4)6(SiO3OH)(OH)3 - new MaterialStack(ELEMENT.getInstance().CERIUM, 9), - new MaterialStack(ELEMENT.getInstance().LANTHANUM, 9), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 9), - new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 3), - new MaterialStack(ELEMENT.getInstance().IRON, 3), - new MaterialStack(ELEMENT.getInstance().SILICON, 7), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 20), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 4) - }); - - //Comancheite - //Hg55N24(NH2,OH)4(Cl,Br)34 - public static final Material COMANCHEITE = new Material( - "Comancheite", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{65, 205, 105, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().MERCURY, 54/4), - new MaterialStack(ELEMENT.getInstance().NITROGEN, 28/4), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 12/4), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 8/4), - new MaterialStack(ELEMENT.getInstance().CHLORINE, 34/4), - new MaterialStack(ELEMENT.getInstance().BROMINE, 34/4) - }); - - public static final Material CROCROITE = new Material( - "Crocoite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_GEM_VERTICAL, //Texture Set - new short[]{255, 143, 84, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().LEAD, 2), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), - new MaterialStack(ELEMENT.getInstance().CAESIUM, 1), - }); - - public static final Material CRYOLITE = new Material( - "Cryolite (F)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_SHINY, //Texture Set - new short[]{205, 205, 255, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().SODIUM, 3), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) - }); - - //Demicheleite-(Br) - // BiSBr - public static final Material DEMICHELEITE_BR = new Material( - "Demicheleite (Br)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_SHINY, //Texture Set - new short[]{165, 75, 75, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().BISMUTH, 13), - new MaterialStack(ELEMENT.getInstance().SULFUR, 11), - new MaterialStack(ELEMENT.getInstance().BROMINE, 1) - }); - - public static final Material FLORENCITE = new Material( - "Florencite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{249, 249, 124, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// SmAl3(PO4)2(OH)6 - new MaterialStack(ELEMENT.getInstance().SAMARIUM, 1), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 3), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 10), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 6) - }); - - public static final Material FLUORCAPHITE = new Material( - "Fluorcaphite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{255, 255, 30, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (Ca,Sr,Ce,Na)5(PO4)3F - new MaterialStack(ELEMENT.getInstance().CALCIUM, 5), - new MaterialStack(MISC_MATERIALS.STRONTIUM_OXIDE, 5), - new MaterialStack(ELEMENT.getInstance().CERIUM, 5), - new MaterialStack(ELEMENT.getInstance().SODIUM, 5), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 3), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 12), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 6), - }); - - //Gadolinite_Ce - public static final Material GADOLINITE_CE = new Material( - "Gadolinite (Ce)", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{15, 159, 59, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CERIUM, 4), - new MaterialStack(ELEMENT.getInstance().ERBIUM, 2), - new MaterialStack(ELEMENT.getInstance().LANTHANUM, 2), - new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 2), - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), - new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 1), - new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 2), - new MaterialStack(ELEMENT.getInstance().SILICON, 7), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 14), - }); - - //Gadolinite_Y - public static final Material GADOLINITE_Y = new Material( - "Gadolinite (Y)", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{35, 189, 99, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CERIUM, 2), - new MaterialStack(ELEMENT.getInstance().ERBIUM, 2), - new MaterialStack(ELEMENT.getInstance().LANTHANUM, 2), - new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 2), - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 4), - new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 2), - new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 3), - new MaterialStack(ELEMENT.getInstance().SILICON, 4), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 9), - }); - - public static final Material GEIKIELITE = new Material( - "Geikielite", //Material Name - MaterialState.ORE, //State - TextureSets.GEM_A.get(), //Texture Set - new short[]{187, 193, 204, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 1), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 3) - }); - - public static final Material GREENOCKITE = new Material( - "Greenockite", //Material Name - MaterialState.ORE, //State - TextureSets.GEM_A.get(), //Texture Set - new short[]{110, 193, 25, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CADMIUM, 2), - new MaterialStack(ELEMENT.getInstance().SULFUR, 2), - }); - - public static final Material HIBONITE = new Material( - "Hibonite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{58, 31, 0, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// ((Ca,Ce)(Al,Ti,Mg)12O19) - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().CERIUM, 1), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 12), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), - new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 12), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 19), - }); - - //Honeaite - //Au3TlTe2 - public static final Material HONEAITE = new Material( - "Honeaite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{165, 165, 5, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().GOLD, 3), - new MaterialStack(ELEMENT.getInstance().THALLIUM, 1), - new MaterialStack(ELEMENT.getInstance().TELLURIUM, 2) - }); - - //Irarsite - //(Ir,Ru,Rh,Pt)AsS - public static final Material IRARSITE = new Material( - "Irarsite", //Material Name - MaterialState.ORE, //State - TextureSets.ENRICHED.get(), //Texture Set - new short[]{125, 105, 105, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().IRIDIUM, 1), - new MaterialStack(ELEMENT.getInstance().RUTHENIUM, 1), - new MaterialStack(ELEMENT.getInstance().RHODIUM, 1), - new MaterialStack(ELEMENT.getInstance().PLATINUM, 1), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 1), - new MaterialStack(ELEMENT.getInstance().SULFUR, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) - }); - - //Kashinite - //(Ir,Rh)2S3 - public static final Material KASHINITE = new Material( - "Kashinite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_SHINY, //Texture Set - new short[]{75, 105, 75, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().IRIDIUM, 2), - new MaterialStack(ELEMENT.getInstance().RHODIUM, 2), - new MaterialStack(ELEMENT.getInstance().SULFUR, 3) - }); - - // Tl(Cl,Br) - public static final Material LAFOSSAITE = new Material( - "Lafossaite", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{165, 105, 205, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().CHLORINE, 1), - new MaterialStack(ELEMENT.getInstance().BROMINE, 1), - new MaterialStack(ELEMENT.getInstance().THALLIUM, 1) - }); - - public static final Material LANTHANITE_CE = new Material( - "Lanthanite (Ce)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{186, 113, 179, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (Ce)2(CO3)3·8(H2O) - new MaterialStack(ELEMENT.getInstance().CERIUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 3), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), - }); - - public static final Material LANTHANITE_LA = new Material( - "Lanthanite (La)", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{219, 160, 214, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (La)2(CO3)3·8(H2O) - new MaterialStack(ELEMENT.getInstance().LANTHANUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 3), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), - }); - - public static final Material LANTHANITE_ND = new Material( - "Lanthanite (Nd)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{153, 76, 145, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (Nd)2(CO3)3·8(H2O) - new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 3), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), - }); - - //Iodine Source - public static final Material LAUTARITE = new Material( - "Lautarite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{165, 105, 205, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().IODINE, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 6) - }); - - public static final Material LEPERSONNITE = new Material( - "Lepersonnite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_EMERALD, //Texture Set - new short[]{175, 175, 20, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 2), - new MaterialStack(ELEMENT.getInstance().DYSPROSIUM, 2), - new MaterialStack(ELEMENT.getInstance().URANIUM235, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN,32), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 24) - }); - - //Miessiite - //Pd11Te2Se2 - public static final Material MIESSIITE = new Material( - "Miessiite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{75, 75, 75, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().PALLADIUM, 11), - new MaterialStack(ELEMENT.getInstance().TELLURIUM, 2), - new MaterialStack(ELEMENT.getInstance().SELENIUM, 2) - }); - - public static final Material NICHROMITE = new Material( - "Nichromite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{22, 19, 19, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NICKEL, 1), - new MaterialStack(ELEMENT.getInstance().COBALT, 1), - new MaterialStack(ELEMENT.getInstance().IRON, 3), - new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 2), - new MaterialStack(ELEMENT.getInstance().CHROMIUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) - }); - - //Perroudite - //Hg5Ag4S5(I,Br)2Cl2 - public static final Material PERROUDITE = new Material( - "Perroudite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{77, 165, 174, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SULFUR, 5), - new MaterialStack(ELEMENT.getInstance().SILVER, 4), - new MaterialStack(ELEMENT.getInstance().IODINE, 2), - new MaterialStack(ELEMENT.getInstance().MERCURY, 5), - new MaterialStack(ELEMENT.getInstance().BROMINE, 2), - new MaterialStack(ELEMENT.getInstance().CHLORINE, 2) - }); - - public static final Material POLYCRASE = new Material( - "Polycrase", //Material Name - MaterialState.ORE, //State - TextureSet.SET_ROUGH, //Texture Set - new short[]{51, 0, 11, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().CERIUM, 1), - new MaterialStack(ELEMENT.getInstance().URANIUM235, 1), - new MaterialStack(ELEMENT.getInstance().THORIUM, 1), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), - new MaterialStack(ELEMENT.getInstance().TANTALUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 6) - }); - - //Radiobarite - //Radium, Barium, Barite? - public static final Material RADIOBARITE = new Material( - "Barite (Rd)", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FLINT, //Texture Set - new short[]{205, 205, 205, 0}, //Material Colour - -1, - -1, - -1, - -1, - 0, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().BARIUM, 32), - new MaterialStack(ELEMENT.getInstance().RADIUM, 1), - new MaterialStack(ELEMENT.getInstance().SULFUR, 16), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 15) - }); - - //Samarskite_Y - public static final Material SAMARSKITE_Y = new Material( - "Samarskite (Y)", //Material Name - MaterialState.ORE, //State - TextureSets.ENRICHED.get(), //Texture Set - new short[]{65, 163, 164, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), //Y not YT/YB - new MaterialStack(ELEMENT.getInstance().IRON, 10), - new MaterialStack(ELEMENT.getInstance().URANIUM235, 2), - new MaterialStack(ELEMENT.getInstance().THORIUM, 3), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), - new MaterialStack(ELEMENT.getInstance().TANTALUM, 3) - }); - - //Samarskite_YB - public static final Material SAMARSKITE_YB = new Material( - "Samarskite (Yb)", //Material Name - MaterialState.ORE, //State - TextureSets.ENRICHED.get(), //Texture Set - new short[]{95, 193, 194, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), //Y not YT/YB - new MaterialStack(ELEMENT.getInstance().IRON, 9), - new MaterialStack(ELEMENT.getInstance().URANIUM235, 3), - new MaterialStack(ELEMENT.getInstance().THORIUM, 2), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 3), - new MaterialStack(ELEMENT.getInstance().TANTALUM, 2) - }); - - public static final Material TITANITE = new Material( - "Titanite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{184, 198, 105, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), - new MaterialStack(ELEMENT.getInstance().SILICON, 2), - new MaterialStack(ELEMENT.getInstance().THORIUM, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 10) - }); - - public static final Material XENOTIME = new Material( - "Xenotime", //Material Name - MaterialState.ORE, //State - TextureSet.SET_OPAL, //Texture Set - new short[]{235, 89, 199, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), - new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), - new MaterialStack(ELEMENT.getInstance().ERBIUM, 2), - new MaterialStack(ELEMENT.getInstance().EUROPIUM, 1), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) - }); - - public static final Material YTTRIAITE = new Material( //TODO - "Yttriaite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_METALLIC, //Texture Set - new short[]{255, 143, 84, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), //Y not YT/YB - new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), - new MaterialStack(ELEMENT.getInstance().IRON, 4), - new MaterialStack(ELEMENT.getInstance().TIN, 1), - new MaterialStack(ELEMENT.getInstance().NITROGEN, 2) - }); - - public static final Material YTTRIALITE = new Material( - "Yttrialite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_RUBY, //Texture Set - new short[]{35, 189, 99, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), - new MaterialStack(ELEMENT.getInstance().THORIUM, 2), - new MaterialStack(ELEMENT.getInstance().SILICON, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 7), - }); - - public static final Material YTTROCERITE = new Material( - "Yttrocerite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_DIAMOND, //Texture Set - new short[]{35, 19, 199, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CERIUM, 1), - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 5), - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), - }); - - public static final Material ZIMBABWEITE = new Material( - "Zimbabweite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{193, 187, 131, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), - new MaterialStack(ELEMENT.getInstance().POTASSIUM, 2), - new MaterialStack(ELEMENT.getInstance().LEAD, 1), - new MaterialStack(ELEMENT.getInstance().ARSENIC, 4), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 4), - new MaterialStack(ELEMENT.getInstance().TANTALUM, 4), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 18) - }); - - public static final Material ZIRCON = new Material( - "Zircon", //Material Name - MaterialState.ORE, //State - TextureSets.GEM_A.get(), //Texture Set - new short[]{195, 19, 19, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), - new MaterialStack(ELEMENT.getInstance().SILICON, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 4), - }); - - public static final Material ZIRCONILITE = new Material( - "Zirconolite", //Material Name - MaterialState.ORE, //State - TextureSet.SET_FINE, //Texture Set - new short[]{45, 26, 0, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 2), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), - new MaterialStack(ELEMENT.getInstance().CERIUM, 1), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 14) - }); - - public static final Material ZIRCOPHYLLITE = new Material( - "Zircophyllite", //Material Name - MaterialState.ORE, //State - TextureSets.REFINED.get(), //Texture Set - new short[]{30, 0, 6, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().POTASSIUM, 3), - new MaterialStack(ELEMENT.getInstance().SODIUM, 3), - new MaterialStack(ELEMENT.getInstance().MANGANESE, 7), - new MaterialStack(ELEMENT.getInstance().IRON, 7), - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 2), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), - new MaterialStack(ELEMENT.getInstance().SILICON, 8), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 13), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 7), - }); - - - public static final Material ZIRKELITE = new Material( - "Zirkelite", //Material Name - MaterialState.ORE, //State - TextureSets.GEM_A.get(), //Texture Set - new short[]{229, 208, 48, 0}, //Material Colour - -1, - -1, - -1, - -1, - -1, //Radiation - new MaterialStack[]{// (Ca,Th,Ce)Zr(Ti,Nb)2O7 - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().THORIUM, 1), - new MaterialStack(ELEMENT.getInstance().CERIUM, 1), - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), - new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), - new MaterialStack(ELEMENT.getInstance().OXYGEN, 7) - }); - - public static final Material DEEP_EARTH_REACTOR_FUEL_DEPOSIT = new Material( - "Radioactive Mineral Mix", //Material Name - MaterialState.ORE, //State - TextureSets.NUCLEAR.get(), //Texture Set - null, //Material Colour - -1, - -1, - -1, - -1, - 4, //Radiation - new MaterialStack[]{// Na3AlF6 - new MaterialStack(ELEMENT.getInstance().RADON, 2), - new MaterialStack(ELEMENT.getInstance().RADIUM, 1), - new MaterialStack(ELEMENT.getInstance().URANIUM235, 1), - new MaterialStack(ELEMENT.getInstance().URANIUM238, 10), - new MaterialStack(ELEMENT.getInstance().THORIUM, 25), - new MaterialStack(ELEMENT.getInstance().THORIUM232, 4), - new MaterialStack(FLUORCAPHITE, 6), - new MaterialStack(SAMARSKITE_Y, 8), - new MaterialStack(TITANITE, 4) - }); - - - - - -} diff --git a/src/Java/gtPlusPlus/core/material/Particle.java b/src/Java/gtPlusPlus/core/material/Particle.java deleted file mode 100644 index e93129ec58..0000000000 --- a/src/Java/gtPlusPlus/core/material/Particle.java +++ /dev/null @@ -1,153 +0,0 @@ -package gtPlusPlus.core.material; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.chemistry.IonParticles; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; - -public class Particle { - - public static final Particle GRAVITON; - - public static final Particle UP; - public static final Particle DOWN; - public static final Particle CHARM; - public static final Particle STRANGE; - public static final Particle TOP; - public static final Particle BOTTOM; - - public static final Particle ELECTRON; - public static final Particle ELECTRON_NEUTRINO; - public static final Particle MUON; - public static final Particle MUON_NEUTRINO; - public static final Particle TAU; - public static final Particle TAU_NEUTRINO; - - public static final Particle GLUON; - public static final Particle PHOTON; - public static final Particle Z_BOSON; - public static final Particle W_BOSON; - public static final Particle HIGGS_BOSON; - - public static final Particle PROTON; - public static final Particle NEUTRON; - public static final Particle LAMBDA; - public static final Particle OMEGA; - - public static final Particle PION; - public static final Particle ETA_MESON; - - public static final Particle UNKNOWN; - - public static final AutoMap aMap = new AutoMap(); - - static { - - /* - * Standard Model of Physics - */ - - //I exist, because I must. - GRAVITON = new Particle(ElementaryGroup.BOSON, "Graviton"); - - //Quarks - UP = new Particle(ElementaryGroup.QUARK, "Up"); - DOWN = new Particle(ElementaryGroup.QUARK, "Down"); - CHARM = new Particle(ElementaryGroup.QUARK, "Charm"); - STRANGE = new Particle(ElementaryGroup.QUARK, "Strange"); - TOP = new Particle(ElementaryGroup.QUARK, "Top"); - BOTTOM = new Particle(ElementaryGroup.QUARK, "Bottom"); - - //Leptons - ELECTRON = new Particle(ElementaryGroup.LEPTON, "Electron"); - MUON = new Particle(ElementaryGroup.LEPTON, "Muon"); - TAU = new Particle(ElementaryGroup.LEPTON, "Tau"); - ELECTRON_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Electron Neutrino"); - MUON_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Muon Neutrino"); - TAU_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Tau Neutrino"); - - //Bosons - GLUON = new Particle(ElementaryGroup.BOSON, "Gluon"); - PHOTON = new Particle(ElementaryGroup.BOSON, "Photon"); - Z_BOSON = new Particle(ElementaryGroup.BOSON, "Z Boson"); - W_BOSON = new Particle(ElementaryGroup.BOSON, "W Boson"); - HIGGS_BOSON = new Particle(ElementaryGroup.BOSON, "Higgs Boson"); - - /* - * Composite Particles - */ - - //Baryons - PROTON = new Particle(ElementaryGroup.BARYON, "Proton", new Particle[] {UP, UP, DOWN}); - NEUTRON = new Particle(ElementaryGroup.BARYON, "Neutron", new Particle[] {UP, DOWN, DOWN}); - LAMBDA = new Particle(ElementaryGroup.BARYON, "Lambda", new Particle[] {UP, DOWN, STRANGE}); - OMEGA = new Particle(ElementaryGroup.BARYON, "Omega", new Particle[] {STRANGE, STRANGE, STRANGE}); - - //Mesons - PION = new Particle(ElementaryGroup.MESON, "Pion", new Particle[] {MUON, MUON_NEUTRINO}); - ETA_MESON = new Particle(ElementaryGroup.MESON, "ETA Meson", new Particle[] {PION, PION, PION}); - - - //Wildcard - UNKNOWN = new Particle(ElementaryGroup.UNKNOWN, "Unknown"); - - } - - public static enum ElementaryGroup { - QUARK, - LEPTON, - BOSON, - BARYON, - MESON, - UNKNOWN; - } - - public final ElementaryGroup mParticleType; - public final String mParticleName; - public final Particle[] mComposition; - - public Particle(ElementaryGroup aParticleType, String aParticleName) { - this(aParticleType, aParticleName, null); - } - - public Particle(ElementaryGroup aParticleType, String aParticleName, Particle[] aComposition) { - mParticleType = aParticleType; - mParticleName = aParticleName; - mComposition = aComposition == null ? new Particle[] {this} : aComposition; - aMap.put(this); - } - - - public static ItemStack getIon(String aElementName, int aCharge) { - for (String g : gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.keySet()) { - if (g.toLowerCase().equals(Utils.sanitizeString(aElementName.toLowerCase()))){ - Integer meta = gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.get(Utils.sanitizeString(aElementName.toLowerCase())); - if (meta == null) { - meta = 0; - } - ItemStack aIon = ItemUtils.simpleMetaStack(ModItems.itemIonParticleBase, meta, 1); - if (aCharge != 0) { - IonParticles.setChargeState(aIon, aCharge); - } - return aIon; - } - } - return null; - } - - public static ItemStack getBaseParticle(Particle aParticle) { - String aPartName = Utils.sanitizeString(aParticle.mParticleName.toLowerCase()); - for (String g : gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.keySet()) { - if (g.toLowerCase().equals(aPartName)){ - Integer meta = gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.get(aPartName); - if (meta == null) { - meta = 0; - } - return ItemUtils.simpleMetaStack(ModItems.itemStandarParticleBase, meta, 1); - } - } - return null; - } -} diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java deleted file mode 100644 index 20aebb80ed..0000000000 --- a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java +++ /dev/null @@ -1,79 +0,0 @@ -package gtPlusPlus.core.material.gregtech; - -public class CustomGTMaterials { - - //public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH, "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); - - /**int aMetaItemSubID, - * TextureSet aIconSet, - * float aToolSpeed, - * int aDurability, - * int aToolQuality, - * boolean aUnificatable, - * String aName, String aDefaultLocalName, - * String aConfigSection, - * boolean aCustomOre, - * String aCustomID) { - - **/ - - /*public static List Custom_GT_Materials = new ArrayList(); - - public static Materials Zirconium = materialBuilder_Element(1232, TextureSet.SET_METALLIC, 6.0F, 256, 2, 1|2|8|32|64|128, 200, 200, 200, 0, "Zirconium", "Zirconium", 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Zr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 3))); - public static Materials Geikielite = materialBuilder(1234, TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); - public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); - - public static final void run(){ - Utils.LOG_INFO("[Custom] Trying to initialise custom materials."); - } - - private final static boolean registerMaterial(Materials r){ - Custom_GT_Materials.add(r); - Utils.LOG_INFO("[Custom] Registered new Gregtech material - "+r.mName); - return true; - } - - public final static Materials materialBuilder(int ID, TextureSet texture, int[] rgb, String materialName, Dyes dyeColour, List composition){ - Materials newMat = new Materials( - ID, - texture, - 1.0F, - 0, - 2, - 1 |8 , - rgb[0], rgb[1], rgb[2], 0, - materialName, materialName, - 0, 0, -1, 0, false, false, 3, 1, 1, - dyeColour, - 1, - composition - ); - registerMaterial(newMat); - return newMat; - } - - public final static Materials materialBuilder_Element( - int ID, TextureSet texture, - float a, int b, int c, - int d, int r2, int g2, int b2, int a2, - String materialName, String e, - int f, int g, int h, int i, - boolean j, boolean k, - int l, int m, int n, - Dyes dyeColour, Element o, - List aspects){ - Materials newMat = new Materials( - ID, texture, - a, b, c, - d, r2, g2, b2, a2, - materialName, e, - f, g, h, i, j, k, l, m, n, - dyeColour, o, - aspects - ); - registerMaterial(newMat); - return newMat; - } -*/ - -} diff --git a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java deleted file mode 100644 index 5872587872..0000000000 --- a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java +++ /dev/null @@ -1,284 +0,0 @@ -package gtPlusPlus.core.material.nuclear; - -import gregtech.api.enums.Materials; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.state.MaterialState; - -public class FLUORIDES { - - public static final Material FLUORITE = new Material( - "Fluorite", //Material Name - MaterialState.ORE, //State - null, //Material Colour - Materials.Fluorine.mMeltingPoint, //Melting Point in C - Materials.Fluorine.mBlastFurnaceTemp, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - false, //Generate cells - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CALCIUM, 16), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 32), - new MaterialStack(ELEMENT.getInstance().IRON, 4), - new MaterialStack(ELEMENT.getInstance().CARBON, 2) - }); - - //ThF4 - public static final Material THORIUM_TETRAFLUORIDE = new Material( - "Thorium Tetrafluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().THORIUM232, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) - }); - - //ThF6 - public static final Material THORIUM_HEXAFLUORIDE = new Material( - "Thorium Hexafluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().THORIUM232, 1), - new MaterialStack(ELEMENT.getInstance().THORIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 12) - }); - - //UF4 - public static final Material URANIUM_TETRAFLUORIDE = new Material( - "Uranium Tetrafluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().URANIUM233, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) - }); - - //UF6 - public static final Material URANIUM_HEXAFLUORIDE = new Material( - "Uranium Hexafluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) - }); - - //ZrF4 - - public static final Material ZIRCONIUM_TETRAFLUORIDE = new Material( - "Zirconium Tetrafluoride", //Material Name - MaterialState.LIQUID, //State - null, //Texture Set (Autogenerated) - 0, - null, //Material Colour - -1, - -1, - -1, - -1, - false, - "ZrF4", - -1, - true, - false, - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) - }); - - - -/* public static final Material ZIRCONIUM_TETRAFLUORIDE = new Material( - "Zirconium Tetrafluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) - });*/ - - //BeF2 - public static final Material BERYLLIUM_FLUORIDE = new Material( - "Beryllium Fluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, - -1, - -1, - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) - }); - - //LiF - public static final Material LITHIUM_FLUORIDE = new Material( - "Lithium Fluoride", //Material Name - MaterialState.LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().LITHIUM7, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 1) - }); - - - //LFTR sub components - - //(NH4)HF2 - public static final Material AMMONIUM_BIFLUORIDE = new Material( - "Ammonium Bifluoride", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - 126, //Melting Point in C - 240, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(MISC_MATERIALS.AMMONIUM, 1), - new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) - }); - - //Be(OH)2 - public static final Material BERYLLIUM_HYDROXIDE = new Material( - "Beryllium Hydroxide", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 1), - new MaterialStack(MISC_MATERIALS.HYDROXIDE, 2) - }); - - // (NH4)2Be(OH)2 / (NH4)2BeF4 - public static final Material AMMONIUM_TETRAFLUOROBERYLLATE = new Material( - "Ammonium Tetrafluoroberyllate", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - 280, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(MISC_MATERIALS.AMMONIUM, 2), - new MaterialStack(FLUORIDES.BERYLLIUM_HYDROXIDE, 1) - }); - - - - //LFTR Output - public static final Material NEPTUNIUM_HEXAFLUORIDE = new Material( - "Neptunium Hexafluoride", //Material Name - MaterialState.GAS, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NEPTUNIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) - }); - - public static final Material TECHNETIUM_HEXAFLUORIDE = new Material( - "Technetium Hexafluoride", //Material Name - MaterialState.GAS, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().TECHNETIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) - }); - - public static final Material SELENIUM_HEXAFLUORIDE = new Material( - "Selenium Hexafluoride", //Material Name - MaterialState.GAS, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SELENIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) - }); - - public static final Material SODIUM_FLUORIDE = new Material( - "Sodium Fluoride", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SODIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 1) - }); - - private static final FLUORIDES INSTANCE = new FLUORIDES(); - public static FLUORIDES getInstance(){return INSTANCE;} - -} diff --git a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java deleted file mode 100644 index 9bc7459f0e..0000000000 --- a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java +++ /dev/null @@ -1,376 +0,0 @@ -package gtPlusPlus.core.material.nuclear; - -import gtPlusPlus.core.client.CustomTextureSet.TextureSets; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.data.StringUtils; - - -public final class NUCLIDE { - - public static final Material Li2BeF4 = new Material( - "Lithium Tetrafluoroberyllate", //Material Name - MaterialState.LIQUID, //State - TextureSets.NUCLEAR.get(), - null, //Material Colour - 566, //Melting Point in C - 870, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"Li2BeF4"), //Chemical Formula - 4, //Radioactivity Level - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 2), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1) - }); - - public static final Material LiFBeF2ThF4UF4 = new Material( - "LiFBeF2ThF4UF4", //Material Name - MaterialState.LIQUID, //State - TextureSets.NUCLEAR.get(), - null, //Material Colour - 566, //Melting Point in C - 870, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ThF4UF4"), //Chemical Formula - 5, //Radioactivity Level - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 65), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 28), - new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1) - }); - - public static final Material LiFBeF2ZrF4UF4 = new Material( - "LiFBeF2ZrF4UF4", //Material Name - MaterialState.LIQUID, //State - TextureSets.NUCLEAR.get(), - null, //Material Colour - 650, //Melting Point in C - 940, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ZrF4UF4"), //Chemical Formula - 5, //Radioactivity Level - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 65), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 28), - new MaterialStack(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE, 5), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 2) - }); - - public static final Material LiFBeF2ZrF4U235 = new Material( - "LiFBeF2ZrF4U235", //Material Name - MaterialState.LIQUID, //State - TextureSets.NUCLEAR.get(), - null, //Material Colour - 590, //Melting Point in C - 890, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ZrF4")+StringUtils.superscript("235U"), //Chemical Formula - 5, //Radioactivity Level - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 55), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 25), - new MaterialStack(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE, 6), - new MaterialStack(ELEMENT.getInstance().URANIUM235, 14) - }); - - // Misc - public static final Material BurntLftrFuel_MK1 = new Material( - "Burnt Reactor Fuel I", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiBeF2UF4FP"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().LITHIUM, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) - }); - - public static final Material BurntLftrFuel_MK2 = new Material( - "Burnt Reactor Fuel II", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiBeF2UF4FP"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().LITHIUM, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) - }); - - - - // LFTR Core Fluids - public static final Material LiFBeF2UF4FP = new Material( - "LiFBeF2UF4FP", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2UF4FP"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) - }); - - public static final Material Sparged_LiFBeF2UF4FP = new Material( - "Helium Sparged LiFBeF2UF4FP", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2UF4FP"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) - }); - - public static final Material UF6F2FP = new Material( - "UF6F2FP", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript("UF6F2FP"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.URANIUM_HEXAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 3), - new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 1) - }); - - public static final Material LiFBeF2 = new Material( - "LiFBeF2", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1) - }); - - public static final Material LiFBeF2UF4 = new Material( - "LiFBeF2UF4", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2UF4"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(LiFBeF2, 1), - new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1) - }); - - - - - - - // LFTR Blanket Fluids - - // Tier 1 Fuel blanket output - public static final Material LiFThF4 = new Material( - "LiFThF4", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFThF4"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) - }); - - // Tier 2 Fuel blanket output - public static final Material LiFBeF2ThF4 = new Material( - "LiFBeF2ThF4", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ThF4"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) - }); - - // Tier 1 Fuel blanket output - public static final Material Sparged_LiFThF4 = new Material( - "Fluorine Sparged LiFThF4", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFThF4"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) - }); - - // Tier 2 Fuel blanket output - public static final Material Sparged_LiFBeF2ThF4 = new Material( - "Fluorine Sparged LiFBeF2ThF4", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ThF4"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), - new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) - }); - - public static final Material UF6F2 = new Material( - "UF6F2", //Material Name - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, //Neutrons - false, //Uses Blast furnace? - StringUtils.subscript("UF6F2"), //Chemical Formula - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(FLUORIDES.URANIUM_HEXAFLUORIDE, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) - }); - - - - - - - - - - - - - // Secondary material is molten metal - public static final Material NAQ_FUEL_T1 = new Material( - "Naquadah Fuel", - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NAQUADAH, 2), - new MaterialStack(ELEMENT.getInstance().TANTALUM, 3) - }); - - // Secondary material is a plasma - public static final Material NAQ_FUEL_T2 = new Material( - "Enriched Naquadah Fuel", - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NAQUADAH_ENRICHED, 2), - new MaterialStack(ELEMENT.getInstance().TITANIUM, 3) - }); - - // Secondary material is a plasma - public static final Material NAQ_FUEL_T3 = new Material( - "Naquadria Fuel", - MaterialState.PURE_LIQUID, //State - null, //Material Colour - -1, //Melting Point in C - -1, //Boiling Point in C - -1, //Protons - -1, - false, //Uses Blast furnace? - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().NAQUADRIA, 2), - new MaterialStack(ELEMENT.getInstance().AMERICIUM, 3) - }); - - - - private static final NUCLIDE INSTANCE = new NUCLIDE(); - - public static NUCLIDE getInstance(){ - return INSTANCE; - } - -} diff --git a/src/Java/gtPlusPlus/core/material/state/MaterialState.java b/src/Java/gtPlusPlus/core/material/state/MaterialState.java deleted file mode 100644 index 460fe019dc..0000000000 --- a/src/Java/gtPlusPlus/core/material/state/MaterialState.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.core.material.state; - -public enum MaterialState { - SOLID(0), - LIQUID(1), - GAS(2), - PLASMA(3), - PURE_LIQUID(4), - ORE(5), - PURE_GAS(6); - private int STATE; - private MaterialState (final int State){ - this.STATE = State; - } - public int ID() { - return this.STATE; - } -} diff --git a/src/Java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java b/src/Java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java deleted file mode 100644 index b7ced2f7e9..0000000000 --- a/src/Java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.core.network.handler; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import net.minecraft.entity.player.EntityPlayer; - -public abstract class AbstractClientMessageHandler extends AbstractMessageHandler { - - public final IMessage handleServerMessage(EntityPlayer player, T message, MessageContext ctx) { - return null; - } - -} diff --git a/src/Java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java b/src/Java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java deleted file mode 100644 index ca350f220f..0000000000 --- a/src/Java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.network.handler; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import net.minecraft.entity.player.EntityPlayer; - -public abstract class AbstractMessageHandler implements IMessageHandler -{ - /** - * Handle a message received on the client side - * @return a message to send back to the Server, or null if no reply is necessary - */ - @SideOnly(Side.CLIENT) - public abstract IMessage handleClientMessage(EntityPlayer player, T message, MessageContext ctx); - - /** - * Handle a message received on the server side - * @return a message to send back to the Client, or null if no reply is necessary - */ - public abstract IMessage handleServerMessage(EntityPlayer player, T message, MessageContext ctx); - - @Override - public IMessage onMessage(T message, MessageContext ctx) { - if (ctx.side.isClient()) { - return handleClientMessage(GTplusplus.proxy.getPlayerEntity(ctx), message, ctx); - } else { - // server side proxy will return the server side EntityPlayer - return handleServerMessage(GTplusplus.proxy.getPlayerEntity(ctx), message, ctx); - } - } - - -} diff --git a/src/Java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java b/src/Java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java deleted file mode 100644 index d49e6cf350..0000000000 --- a/src/Java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.core.network.handler; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import net.minecraft.entity.player.EntityPlayer; - -public abstract class AbstractServerMessageHandler extends AbstractMessageHandler { - - public final IMessage handleClientMessage(EntityPlayer player, T message, MessageContext ctx) { - return null; - } - -} diff --git a/src/Java/gtPlusPlus/core/network/packet/AbstractPacket.java b/src/Java/gtPlusPlus/core/network/packet/AbstractPacket.java deleted file mode 100644 index d6368e3d9e..0000000000 --- a/src/Java/gtPlusPlus/core/network/packet/AbstractPacket.java +++ /dev/null @@ -1,9 +0,0 @@ -package gtPlusPlus.core.network.packet; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; - -public interface AbstractPacket extends IMessage { - - public abstract String getPacketName(); - -} diff --git a/src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java b/src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java deleted file mode 100644 index 609ea729b7..0000000000 --- a/src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java +++ /dev/null @@ -1,128 +0,0 @@ -package gtPlusPlus.core.network.packet; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.network.handler.AbstractServerMessageHandler; -import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class Packet_VolumetricFlaskGui extends AbstractServerMessageHandler implements AbstractPacket { - - private int x; - private int y; - private int z; - private int flaskValue; - - public Packet_VolumetricFlaskGui() { - - } - - public Packet_VolumetricFlaskGui(TileEntityVolumetricFlaskSetter tile, int aCustomValue) { - x = tile.xCoord; - y = tile.yCoord; - z = tile.zCoord; - flaskValue = aCustomValue; - Logger.INFO("Created Packet with values ("+x+", "+y+", "+z+" | "+flaskValue+")"); - } - - @Override - public void toBytes(ByteBuf buf) { - buf.writeInt(x); - buf.writeInt(y); - buf.writeInt(z); - buf.writeInt(flaskValue); - Logger.INFO("Writing to byte buffer."); - } - - @Override - public void fromBytes(ByteBuf buf) { - x = buf.readInt(); - y = buf.readInt(); - z = buf.readInt(); - flaskValue = buf.readInt(); - Logger.INFO("Reading from byte buffer."); - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getZ() { - return z; - } - - public void setZ(int z) { - this.z = z; - } - - public int getCustomValue() { - return flaskValue; - } - - public void setCustomValue(int aVal) { - this.flaskValue = aVal; - } - - protected TileEntityVolumetricFlaskSetter getTileEntity(Packet_VolumetricFlaskGui message, MessageContext ctx) { - Logger.INFO("Trying to get tile."); - World worldObj = getWorld(ctx); - if(worldObj == null) { - Logger.INFO("Bad world object."); - return null; - } - TileEntity te = worldObj.getTileEntity(message.getX(), message.getY(), message.getZ()); - if(te == null) { - Logger.INFO("Bad Tile."); - return null; - } - if(te instanceof TileEntityVolumetricFlaskSetter) { - Logger.INFO("Found Tile."); - return (TileEntityVolumetricFlaskSetter) te; - } - Logger.INFO("Error."); - return null; - } - - protected World getWorld(MessageContext ctx) { - if(ctx.side == Side.SERVER) { - return ctx.getServerHandler().playerEntity.worldObj; - } else { - return GTplusplus.proxy.getClientWorld(); - } - } - - @Override - public IMessage handleServerMessage(EntityPlayer player, Packet_VolumetricFlaskGui message, MessageContext ctx) { - TileEntityVolumetricFlaskSetter te = getTileEntity(message, ctx); - if(te != null) { - Logger.INFO("Setting value on tile. "+message.getCustomValue()); - te.setCustomValue(message.getCustomValue()); - //return new Packet_VolumetricFlaskGui2(te, message.getCustomValue()); - } - return null; - } - - @Override - public String getPacketName() { - return "Packet_VoluemtricFlaskSetter_ToServer"; - } - -} diff --git a/src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java b/src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java deleted file mode 100644 index bc6e6149d8..0000000000 --- a/src/Java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java +++ /dev/null @@ -1,127 +0,0 @@ -package gtPlusPlus.core.network.packet; - -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.network.handler.AbstractClientMessageHandler; -import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; -import io.netty.buffer.ByteBuf; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class Packet_VolumetricFlaskGui2 extends AbstractClientMessageHandler implements AbstractPacket { - - private int x; - private int y; - private int z; - private int flaskValue; - - public Packet_VolumetricFlaskGui2() { - - } - - public Packet_VolumetricFlaskGui2(TileEntityVolumetricFlaskSetter tile, int aCustomValue) { - x = tile.xCoord; - y = tile.yCoord; - z = tile.zCoord; - flaskValue = aCustomValue; - Logger.INFO("Created Packet with values ("+x+", "+y+", "+z+" | "+flaskValue+")"); - } - - @Override - public void toBytes(ByteBuf buf) { - buf.writeInt(x); - buf.writeInt(y); - buf.writeInt(z); - buf.writeInt(flaskValue); - Logger.INFO("Writing to byte buffer."); - } - - @Override - public void fromBytes(ByteBuf buf) { - x = buf.readInt(); - y = buf.readInt(); - z = buf.readInt(); - flaskValue = buf.readInt(); - Logger.INFO("Reading from byte buffer."); - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getZ() { - return z; - } - - public void setZ(int z) { - this.z = z; - } - - public int getCustomValue() { - return flaskValue; - } - - public void setCustomValue(int aVal) { - this.flaskValue = aVal; - } - - protected TileEntityVolumetricFlaskSetter getTileEntity(Packet_VolumetricFlaskGui2 message, MessageContext ctx) { - Logger.INFO("Trying to get tile."); - World worldObj = getWorld(ctx); - if(worldObj == null) { - Logger.INFO("Bad world object."); - return null; - } - TileEntity te = worldObj.getTileEntity(message.getX(), message.getY(), message.getZ()); - if(te == null) { - Logger.INFO("Bad Tile."); - return null; - } - if(te instanceof TileEntityVolumetricFlaskSetter) { - Logger.INFO("Found Tile."); - return (TileEntityVolumetricFlaskSetter) te; - } - Logger.INFO("Error."); - return null; - } - - protected World getWorld(MessageContext ctx) { - if(ctx.side == Side.SERVER) { - return ctx.getServerHandler().playerEntity.worldObj; - } else { - return GTplusplus.proxy.getClientWorld(); - } - } - - @Override - public String getPacketName() { - return "Packet_VoluemtricFlaskSetter_ToClient"; - } - - @Override - public IMessage handleClientMessage(EntityPlayer player, Packet_VolumetricFlaskGui2 message, MessageContext ctx) { - TileEntityVolumetricFlaskSetter te = getTileEntity(message, ctx); - if(te != null) { - Logger.INFO("Setting value on tile. "+message.getCustomValue()); - te.setCustomValue(message.getCustomValue()); - } - return null; - } - -} diff --git a/src/Java/gtPlusPlus/core/players/FakeFarmer.java b/src/Java/gtPlusPlus/core/players/FakeFarmer.java deleted file mode 100644 index ef9ee3c3e7..0000000000 --- a/src/Java/gtPlusPlus/core/players/FakeFarmer.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.core.players; - -import java.util.UUID; - -import com.mojang.authlib.GameProfile; - -import cpw.mods.fml.common.FMLCommonHandler; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.network.play.client.C15PacketClientSettings; -import net.minecraft.server.management.ItemInWorldManager; -import net.minecraft.stats.StatBase; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.DamageSource; -import net.minecraft.util.IChatComponent; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; - -public class FakeFarmer extends EntityPlayerMP { - private static final UUID uuid = UUID.fromString("c1ddfd7f-120a-4437-8b64-38660d3ec62d"); - - private static GameProfile FAKE_PROFILE = new GameProfile(uuid, "[GT_Farm_Manager]"); - - public FakeFarmer(final WorldServer world) { - super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, FAKE_PROFILE, new ItemInWorldManager(world)); - } - - @Override - public boolean canCommandSenderUseCommand(final int i, final String s) { - return false; - } - - @Override - public ChunkCoordinates getPlayerCoordinates() { - return new ChunkCoordinates(0, 0, 0); - } - - @Override - public void addChatComponentMessage(final IChatComponent chatmessagecomponent) { - } - - @Override - public void addChatMessage(final IChatComponent p_145747_1_) { - } - - @Override - public void addStat(final StatBase par1StatBase, final int par2) { - } - - @Override - public void openGui(final Object mod, final int modGuiId, final World world, final int x, final int y, final int z) { - } - - @Override - public boolean isEntityInvulnerable() { - return true; - } - - @Override - public boolean canAttackPlayer(final EntityPlayer player) { - return false; - } - - @Override - public void onDeath(final DamageSource source) { - } - - @Override - public void onUpdate() { - } - - @Override - public void travelToDimension(final int dim) { - } - - @Override - public void func_147100_a(final C15PacketClientSettings pkt) { - } - - @Override - public boolean canPlayerEdit(final int par1, final int par2, final int par3, final int par4, final ItemStack par5ItemStack) { - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java deleted file mode 100644 index 5a0c0f4ea3..0000000000 --- a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java +++ /dev/null @@ -1,271 +0,0 @@ -package gtPlusPlus.core.proxy; - -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.client.registry.ClientRegistry; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.event.*; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.network.simpleimpl.MessageContext; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.australia.entity.model.ModelBoar; -import gtPlusPlus.australia.entity.model.ModelDingo; -import gtPlusPlus.australia.entity.model.ModelOctopus; -import gtPlusPlus.australia.entity.render.*; -import gtPlusPlus.australia.entity.type.*; -import gtPlusPlus.core.client.model.ModelGiantChicken; -import gtPlusPlus.core.client.renderer.*; -import gtPlusPlus.core.common.CommonProxy; -import gtPlusPlus.core.common.compat.COMPAT_PlayerAPI; -import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; -import gtPlusPlus.core.entity.EntityTeslaTowerLightning; -import gtPlusPlus.core.entity.monster.*; -import gtPlusPlus.core.entity.projectile.*; -import gtPlusPlus.core.handler.render.FirepitRender; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; -import gtPlusPlus.core.tileentities.general.TileEntityFirepit; -import gtPlusPlus.core.util.minecraft.particles.EntityParticleFXMysterious; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.render.GTPP_CapeRenderer; -import gtPlusPlus.xmod.gregtech.common.render.GTPP_FlaskRenderer; -import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.entity.RenderFireball; -import net.minecraft.client.renderer.entity.RenderSnowball; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.world.World; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.MinecraftForgeClient; - -public class ClientProxy extends CommonProxy implements Runnable{ - - private final GTPP_CapeRenderer mCapeRenderer; - @SideOnly(Side.CLIENT) - public static boolean mFancyGraphics = false; - - public ClientProxy(){ - mCapeRenderer = new GTPP_CapeRenderer(); - //Get Graphics Mode. - mFancyGraphics = Minecraft.isFancyGraphicsEnabled(); - } - - @SubscribeEvent - public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) { - if (ConfigSwitches.enableCustomCapes){ - mCapeRenderer.receiveRenderSpecialsEvent(aEvent); - } - } - - @SideOnly(Side.CLIENT) - public static String playerName = ""; - - @Override - public void preInit(final FMLPreInitializationEvent e) { - super.preInit(e); - if (ConfigSwitches.enableCustomCapes){ - onPreLoad(); - } - //Do this weird things for textures. - GTplusplus.loadTextures(); - //We boot up the sneak manager. - if (LoadedMods.PlayerAPI){ - this.init_PlayerAPI_PRE(); - } - } - - @Override - public void init(final FMLInitializationEvent e) { - if (LoadedMods.PlayerAPI){ - this.init_PlayerAPI_INIT(); - } - - /** - * Custom Block Renderers - */ - new CustomOreBlockRenderer(); - new CustomItemBlockRenderer(); - new GTPP_Render_MachineBlock(); - - if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { - new GTPP_FlaskRenderer(); - } - - super.init(e); - } - - @Override - public void postInit(final FMLPostInitializationEvent e) { - super.postInit(e); - } - - @Override - public void registerRenderThings(){ - - // Standard GT++ - - /** - * Entities - */ - - RenderingRegistry.registerEntityRenderingHandler(EntityPrimedMiningExplosive.class, new RenderMiningExplosivesPrimed()); - RenderingRegistry.registerEntityRenderingHandler(EntitySickBlaze.class, new RenderSickBlaze()); - RenderingRegistry.registerEntityRenderingHandler(EntityStaballoyConstruct.class, new RenderStaballoyConstruct()); - RenderingRegistry.registerEntityRenderingHandler(EntityToxinballSmall.class, new RenderToxinball(1F)); - RenderingRegistry.registerEntityRenderingHandler(EntitySulfuricAcidPotion.class, new RenderSnowball(ModItems.itemSulfuricPotion)); - RenderingRegistry.registerEntityRenderingHandler(EntityHydrofluoricAcidPotion.class, new RenderSnowball(ModItems.itemHydrofluoricPotion)); - RenderingRegistry.registerEntityRenderingHandler(EntityTeslaTowerLightning.class, new RenderPlasmaBolt()); - RenderingRegistry.registerEntityRenderingHandler(EntityGiantChickenBase.class, new RenderGiantChicken(new ModelGiantChicken(), 1f)); - RenderingRegistry.registerEntityRenderingHandler(EntityBatKing.class, new RenderBatKing()); - RenderingRegistry.registerEntityRenderingHandler(EntityThrowableBomb.class, new RenderSnowball(ModItems.itemBomb, 1)); - RenderingRegistry.registerEntityRenderingHandler(EntityLightningAttack.class, new RenderFireball(1F)); - - /** - * Tiles - */ - - Logger.INFO("Registering Custom Renderer for the Fire Pit."); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFirepit.class, new FirepitRender()); - Logger.INFO("Registering Custom Renderer for the Lead Lined Chest."); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecayablesChest.class, new RenderDecayChest()); - Logger.INFO("Registering Custom Renderer for the Egg Box."); - //ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEggBox.class, ModelEggBox.getRenderer()); - - - //GT++ Australia - - /** - * Entities - */ - - RenderingRegistry.registerEntityRenderingHandler(EntityAustralianSpiderBase.class, new RenderAustralianSpider()); - RenderingRegistry.registerEntityRenderingHandler(EntityBoar.class, new RenderBoar(new ModelBoar(), new ModelBoar(0.5F), 0.7F)); - RenderingRegistry.registerEntityRenderingHandler(EntityDingo.class, new RenderDingo(new ModelDingo(), new ModelDingo(), 0.5F)); - RenderingRegistry.registerEntityRenderingHandler(EntityOctopus.class, new RenderOctopus(new ModelOctopus(), 0.7F)); - - - - - - - - /** - * Items - */ - for (Pair sItemRenderMappings : mItemRenderMappings) { - MinecraftForgeClient.registerItemRenderer(sItemRenderMappings.getKey(), sItemRenderMappings.getValue()); - } - - } - - @Override - public int addArmor(final String armor){ - return RenderingRegistry.addNewArmourRendererPrefix(armor); - } - - @Override - public void generateMysteriousParticles(final Entity theEntity) - { - final double motionX = theEntity.worldObj.rand.nextGaussian() * 0.02D; - final double motionY = theEntity.worldObj.rand.nextGaussian() * 0.02D; - final double motionZ = theEntity.worldObj.rand.nextGaussian() * 0.02D; - final EntityFX particleMysterious = new EntityParticleFXMysterious( - - theEntity.worldObj, - (theEntity.posX + (theEntity.worldObj.rand.nextFloat() * theEntity.width - - * 2.0F)) - theEntity.width, - theEntity.posY + 0.5D + (theEntity.worldObj.rand.nextFloat() - - * theEntity.height), - (theEntity.posZ + (theEntity.worldObj.rand.nextFloat() * theEntity.width - - * 2.0F)) - theEntity.width, - - motionX, - - motionY, - - motionZ); - Minecraft.getMinecraft().effectRenderer.addEffect(particleMysterious); - } - - @Override - public void serverStarting(final FMLServerStartingEvent e) - { - - } - - @Optional.Method(modid = "PlayerAPI") - private void init_PlayerAPI_PRE(){ - //Register player instance - COMPAT_PlayerAPI.clientProxy.initPre(); - } - - @Optional.Method(modid = "PlayerAPI") - private void init_PlayerAPI_INIT(){ - //Register player instance - COMPAT_PlayerAPI.clientProxy.Init(); - } - - - - public void onPreLoad() { - /*if (ConfigSwitches.enableCustomCapes){ - String arr$[] = { - "draknyte1", "fobius" - }; - int len$ = arr$.length; - for (int i$ = 0; i$ < len$; i$++) { - String tName = arr$[i$]; - mCapeList.add(tName.toLowerCase()); - } - (new Thread(this)).start(); - }*/ - } - - @Override - public void run() { - /*try { - if (ConfigSwitches.enableCustomCapes){ - Logger.INFO("GT++ Mod: Downloading Cape List."); - @SuppressWarnings("resource") - Scanner tScanner = new Scanner(new URL("https://github.com/draknyte1/GTplusplus/blob/master/SupporterList.txt").openStream()); - while (tScanner.hasNextLine()) { - String tName = tScanner.nextLine(); - if (!this.mCapeList.contains(tName.toLowerCase())) { - this.mCapeList.add(tName.toLowerCase()); - } - } - } - } catch (Throwable e) { - Logger.INFO("Failed to download GT++ cape list."); - }*/ - } - - @Override - public void onLoadComplete(FMLLoadCompleteEvent event) { - GTplusplus.tryPatchTurbineTextures(); - super.onLoadComplete(event); - } - - @Override - public World getClientWorld() { - return FMLClientHandler.instance().getClient().theWorld; - } - - @Override - public EntityPlayer getPlayerEntity(MessageContext ctx) { - return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : super.getPlayerEntity(ctx)); - } - -} diff --git a/src/Java/gtPlusPlus/core/proxy/ServerProxy.java b/src/Java/gtPlusPlus/core/proxy/ServerProxy.java deleted file mode 100644 index 8aeeb70191..0000000000 --- a/src/Java/gtPlusPlus/core/proxy/ServerProxy.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.proxy; - -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; - -import gtPlusPlus.core.common.CommonProxy; - -public class ServerProxy extends CommonProxy{ - - @Override - public void preInit(final FMLPreInitializationEvent e) { - // TODO Auto-generated method stub - super.preInit(e); - } - - @Override - public void init(final FMLInitializationEvent e) { - // TODO Auto-generated method stub - super.init(e); - } - - @Override - public void postInit(final FMLPostInitializationEvent e) { - // TODO Auto-generated method stub - super.postInit(e); - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java b/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java deleted file mode 100644 index b5fc9c3995..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Gregtech_Recipe_Adder { - - private static int euT; - private static int ticks; - private static ItemStack inputStack1; - private static ItemStack inputStack2; - private static ItemStack outputStack1; - private static ItemStack outputStack2; - - public static void addRecipe( - final Item maceratorInput, final int maceratorInputAmount1, - final Item maceratorOutput, final int maceratorOutputAmount1, - final Item compressorInput, final int compressorInputAmount1, - final Item compressorOutput, final int compressorOutputAmount1, - final Item blastFurnaceInput, final int blastFurnaceInputAmount1, - final Item blastFurnaceOutput, final int blastFurnaceOutputAmount1, - final Item blastFurnaceInput2, final int blastFurnaceInputAmount2, - final Item blastFurnaceOutput2, final int blastFurnaceOutputAmount2, - final Item smeltingInput, final int smeltingInputAmount1, - final Item smeltingOutput, final int smeltingOutputAmount1, - - final int euPerTick, final int timeInTicks, - final boolean addMaceratorRecipe, final boolean addCompressorRecipe, final boolean addBlastFurnaceRecipe, final int blastFurnaceTemp, final boolean addSmeltingRecipe, final boolean addMixerRecipe){ - euT = euPerTick; - ticks = timeInTicks; - - resetVars(); - if (addMaceratorRecipe){ - inputStack1 = ItemUtils.getSimpleStack(maceratorInput, maceratorInputAmount1); - outputStack1 = ItemUtils.getSimpleStack(maceratorOutput, maceratorOutputAmount1); - addMaceratorRecipe(inputStack1, outputStack1); - } - resetVars(); - if (addCompressorRecipe){ - inputStack1 = ItemUtils.getSimpleStack(compressorInput, compressorInputAmount1); - outputStack1 = ItemUtils.getSimpleStack(compressorOutput, compressorOutputAmount1); - addCompressorRecipe(inputStack1, outputStack1); - } - resetVars(); - if (addBlastFurnaceRecipe){ - inputStack1 = ItemUtils.getSimpleStack(blastFurnaceInput, blastFurnaceInputAmount1); - inputStack2 = ItemUtils.getSimpleStack(blastFurnaceInput2, blastFurnaceInputAmount2); - outputStack1 = ItemUtils.getSimpleStack(blastFurnaceOutput, blastFurnaceOutputAmount1); - outputStack2 = ItemUtils.getSimpleStack(blastFurnaceOutput2, blastFurnaceOutputAmount2); - addBlastFurnaceRecipe(inputStack1, inputStack2, outputStack1, outputStack2, blastFurnaceTemp); - } - resetVars(); - if (addSmeltingRecipe){ - inputStack1 = ItemUtils.getSimpleStack(smeltingInput, smeltingInputAmount1); - outputStack1 = ItemUtils.getSimpleStack(smeltingOutput, smeltingOutputAmount1); - addSmeltingRecipe(inputStack1, outputStack1); - } - resetVars(); - - } - - private static void resetVars(){ - inputStack1 = null; - inputStack2 = null; - outputStack1 = null; - outputStack2 = null; - } - - private static void addMaceratorRecipe(final ItemStack input1, final ItemStack output1){ - GT_ModHandler.addPulverisationRecipe(input1, output1); - } - - private static void addCompressorRecipe(final ItemStack input1, final ItemStack output1){ - GT_ModHandler.addCompressionRecipe(input1, output1); - } - - private static void addBlastFurnaceRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1, final ItemStack output2, final int tempRequired){ - Logger.INFO("Registering Blast Furnace Recipes."); - GT_Values.RA.addBlastRecipe( - input1, - input2, - GT_Values.NF, GT_Values.NF, - output1, - output2, - ticks, - euT, - tempRequired); - } - - private static void addSmeltingRecipe(final ItemStack input1, final ItemStack output1){ - GT_ModHandler.addSmeltingRecipe(input1, output1); - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java b/src/Java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java deleted file mode 100644 index 460b29e802..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java +++ /dev/null @@ -1,216 +0,0 @@ -package gtPlusPlus.core.recipe; - -import gregtech.api.enums.ItemList; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class LOADER_Machine_Components { - - public static void initialise(){ - - registerDefaultComponents(); - - if (!CORE.GTNH){ - if(CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - registerGTExperimentalComponents(); - } - else { - registerGTStandardComponents(); - } - } - else { - registerGTNHComponents(); - } - } - - private static void registerDefaultComponents(){ - //Machine Components - CI.electricMotor_LV = ItemList.Electric_Motor_LV.get(1); - CI.electricMotor_MV = ItemList.Electric_Motor_MV.get(1); - CI.electricMotor_HV = ItemList.Electric_Motor_HV.get(1); - CI.electricMotor_EV = ItemList.Electric_Motor_EV.get(1); - CI.electricMotor_IV = ItemList.Electric_Motor_IV.get(1); - CI.electricPump_LV = ItemList.Electric_Pump_LV.get(1); - CI.electricPump_MV = ItemList.Electric_Pump_MV.get(1); - CI.electricPump_HV = ItemList.Electric_Pump_HV.get(1); - CI.electricPump_EV = ItemList.Electric_Pump_EV.get(1); - CI.electricPump_IV = ItemList.Electric_Pump_IV.get(1); - CI.electricPiston_LV = ItemList.Electric_Piston_LV.get(1); - CI.electricPiston_MV = ItemList.Electric_Piston_MV.get(1); - CI.electricPiston_HV = ItemList.Electric_Piston_HV.get(1); - CI.electricPiston_EV = ItemList.Electric_Piston_EV.get(1); - CI.electricPiston_IV = ItemList.Electric_Piston_IV.get(1); - CI.robotArm_LV = ItemList.Robot_Arm_LV.get(1); - CI.robotArm_MV = ItemList.Robot_Arm_MV.get(1); - CI.robotArm_HV = ItemList.Robot_Arm_HV.get(1); - CI.robotArm_EV = ItemList.Robot_Arm_EV.get(1); - CI.robotArm_IV = ItemList.Robot_Arm_IV.get(1); - CI.conveyorModule_LV = ItemList.Conveyor_Module_LV.get(1); - CI.conveyorModule_MV = ItemList.Conveyor_Module_MV.get(1); - CI.conveyorModule_HV = ItemList.Conveyor_Module_HV.get(1); - CI.conveyorModule_EV = ItemList.Conveyor_Module_EV.get(1); - CI.conveyorModule_IV = ItemList.Conveyor_Module_IV.get(1); - CI.emitter_LV = ItemList.Emitter_LV.get(1); - CI.emitter_MV = ItemList.Emitter_MV.get(1); - CI.emitter_HV = ItemList.Emitter_HV.get(1); - CI.emitter_EV = ItemList.Emitter_EV.get(1); - CI.emitter_IV = ItemList.Emitter_IV.get(1); - CI.fieldGenerator_LV = ItemList.Field_Generator_LV.get(1); - CI.fieldGenerator_MV = ItemList.Field_Generator_MV.get(1); - CI.fieldGenerator_HV = ItemList.Field_Generator_HV.get(1); - CI.fieldGenerator_EV = ItemList.Field_Generator_EV.get(1); - CI.fieldGenerator_IV = ItemList.Field_Generator_IV.get(1); - CI.sensor_LV = ItemList.Sensor_LV.get(1); - CI.sensor_MV = ItemList.Sensor_MV.get(1); - CI.sensor_HV = ItemList.Sensor_HV.get(1); - CI.sensor_EV = ItemList.Sensor_EV.get(1); - CI.sensor_IV = ItemList.Sensor_IV.get(1); - } - - private static void registerGTExperimentalComponents(){ - //GT++ Machine Components - CI.electricMotor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32606, 1); - CI.electricMotor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32607, 1); - CI.electricMotor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32608, 1); - CI.electricPump_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32620, 1); - CI.electricPump_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32621, 1); - CI.electricPump_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32622, 1); - CI.electricPiston_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32645, 1); - CI.electricPiston_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32646, 1); - CI.electricPiston_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32647, 1); - CI.robotArm_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32655, 1); - CI.robotArm_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32656, 1); - CI.robotArm_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32657, 1); - CI.conveyorModule_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32636, 1); - CI.conveyorModule_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32637, 1); - CI.conveyorModule_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32638, 1); - CI.emitter_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32685, 1); - CI.emitter_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32686, 1); - CI.emitter_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32687, 1); - CI.fieldGenerator_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32675, 1); - CI.fieldGenerator_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32676, 1); - CI.fieldGenerator_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32677, 1); - CI.sensor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32695, 1); - CI.sensor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32696, 1); - CI.sensor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32697, 1); - - registerComponentsULV(); - registerComponentsMAX(); - } - - private static void registerGTStandardComponents(){ - CI.electricMotor_LuV = GregtechItemList.Electric_Motor_LuV.get(1); - CI.electricMotor_ZPM = GregtechItemList.Electric_Motor_ZPM.get(1); - CI.electricMotor_UV = GregtechItemList.Electric_Motor_UV.get(1); - CI.electricMotor_MAX = GregtechItemList.Electric_Motor_MAX.get(1); - CI.electricPump_LuV = GregtechItemList.Electric_Pump_LuV.get(1); - CI.electricPump_ZPM = GregtechItemList.Electric_Pump_ZPM.get(1); - CI.electricPump_UV = GregtechItemList.Electric_Pump_UV.get(1); - CI.electricPump_MAX = GregtechItemList.Electric_Pump_MAX.get(1); - CI.electricPiston_LuV = GregtechItemList.Electric_Piston_LuV.get(1); - CI.electricPiston_ZPM = GregtechItemList.Electric_Piston_ZPM.get(1); - CI.electricPiston_UV = GregtechItemList.Electric_Piston_UV.get(1); - CI.electricPiston_MAX = GregtechItemList.Electric_Piston_MAX.get(1); - CI.robotArm_LuV = GregtechItemList.Robot_Arm_LuV.get(1); - CI.robotArm_ZPM = GregtechItemList.Robot_Arm_ZPM.get(1); - CI.robotArm_UV = GregtechItemList.Robot_Arm_UV.get(1); - CI.robotArm_MAX = GregtechItemList.Robot_Arm_MAX.get(1); - CI.conveyorModule_LuV = GregtechItemList.Conveyor_Module_LuV.get(1); - CI.conveyorModule_ZPM = GregtechItemList.Conveyor_Module_ZPM.get(1); - CI.conveyorModule_UV = GregtechItemList.Conveyor_Module_UV.get(1); - CI.conveyorModule_MAX = GregtechItemList.Conveyor_Module_MAX.get(1); - CI.emitter_LuV = GregtechItemList.Emitter_LuV.get(1); - CI.emitter_ZPM = GregtechItemList.Emitter_ZPM.get(1); - CI.emitter_UV = GregtechItemList.Emitter_UV.get(1); - CI.emitter_MAX = GregtechItemList.Emitter_MAX.get(1); - CI.fieldGenerator_LuV = GregtechItemList.Field_Generator_LuV.get(1); - CI.fieldGenerator_ZPM = GregtechItemList.Field_Generator_ZPM.get(1); - CI.fieldGenerator_UV = GregtechItemList.Field_Generator_UV.get(1); - CI.fieldGenerator_MAX = GregtechItemList.Field_Generator_MAX.get(1); - CI.sensor_LuV = GregtechItemList.Sensor_LuV.get(1); - CI.sensor_ZPM = GregtechItemList.Sensor_ZPM.get(1); - CI.sensor_UV = GregtechItemList.Sensor_UV.get(1); - CI.sensor_MAX = GregtechItemList.Sensor_MAX.get(1); - - registerComponentsULV(); - } - - private static void registerGTNHComponents(){ - //Machine Components - CI.electricMotor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32606, 1); - CI.electricMotor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32607, 1); - CI.electricMotor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32608, 1); - - CI.electricPump_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32615, 1); - CI.electricPump_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32616, 1); - CI.electricPump_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32617, 1); - - CI.electricPiston_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32645, 1); - CI.electricPiston_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32646, 1); - CI.electricPiston_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32647, 1); - - CI.robotArm_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32655, 1); - CI.robotArm_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32656, 1); - CI.robotArm_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32657, 1); - - CI.conveyorModule_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32635, 1); - CI.conveyorModule_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32636, 1); - CI.conveyorModule_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32637, 1); - - CI.emitter_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32685, 1); - CI.emitter_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32686, 1); - CI.emitter_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32687, 1); - - CI.fieldGenerator_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32675, 1); - CI.fieldGenerator_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32676, 1); - CI.fieldGenerator_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32677, 1); - - CI.sensor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32695, 1); - CI.sensor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32696, 1); - CI.sensor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32697, 1); - - // Thanks 0lafe - CI.electricMotor_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32596, 1); - CI.electricPump_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32618, 1); - CI.electricPiston_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32648, 1); - CI.robotArm_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32658, 1); - CI.conveyorModule_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32638, 1); - CI.emitter_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32688, 1); - CI.fieldGenerator_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32678, 1); - CI.sensor_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32698, 1); - - registerComponentsULV(); - } - - private static boolean registerComponentsULV(){ - - CI.electricMotor_ULV = GregtechItemList.Electric_Motor_ULV.get(1); - CI.electricPump_ULV = GregtechItemList.Electric_Pump_ULV.get(1); - CI.electricPiston_ULV = GregtechItemList.Electric_Piston_ULV.get(1); - CI.robotArm_ULV = GregtechItemList.Robot_Arm_ULV.get(1); - CI.conveyorModule_ULV = GregtechItemList.Conveyor_Module_ULV.get(1); - CI.emitter_ULV = GregtechItemList.Emitter_ULV.get(1); - CI.fieldGenerator_ULV = GregtechItemList.Field_Generator_ULV.get(1); - CI.sensor_ULV = GregtechItemList.Sensor_ULV.get(1); - return true; - } - - private static boolean registerComponentsMAX() { - - // Max Tier Components Blood Never added... Useless, lol. - CI.electricMotor_MAX = GregtechItemList.Electric_Motor_MAX.get(1); - CI.electricPump_MAX = GregtechItemList.Electric_Pump_MAX.get(1); - CI.electricPiston_MAX = GregtechItemList.Electric_Piston_MAX.get(1); - CI.robotArm_MAX = GregtechItemList.Robot_Arm_MAX.get(1); - CI.conveyorModule_MAX = GregtechItemList.Conveyor_Module_MAX.get(1); - CI.emitter_MAX = GregtechItemList.Emitter_MAX.get(1); - CI.fieldGenerator_MAX = GregtechItemList.Field_Generator_MAX.get(1); - CI.sensor_MAX = GregtechItemList.Sensor_MAX.get(1); - - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Extruder.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Extruder.java deleted file mode 100644 index 455beb2fd0..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Extruder.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.*; -import gregtech.api.interfaces.IOreRecipeRegistrator; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class RECIPES_Extruder implements IOreRecipeRegistrator { - - public RECIPES_Extruder() { - OrePrefixes.ingot.add((IOreRecipeRegistrator) this); - OrePrefixes.dust.add((IOreRecipeRegistrator) this); - } - - public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - if (!CORE.GTNH && ((aMaterial == Materials.Glass || aMaterial == Materials.WroughtIron - || GT_OreDictUnificator.get(OrePrefixes.ingot, (Object) aMaterial, 1L) != null) - && !aMaterial.contains(SubTag.NO_SMELTING))) { - final long aMaterialMass = aMaterial.getMass(); - final int tAmount = (int) (aPrefix.mMaterialAmount / 3628800L); - if (tAmount > 0 && tAmount <= 64 && aPrefix.mMaterialAmount % 3628800L == 0L) { - int tVoltageMultiplier = (aMaterial.mBlastFurnaceTemp >= 2800) ? 64 : 16; - if (aMaterial.contains(SubTag.NO_SMASHING)) { - tVoltageMultiplier /= 4; - } else if (aPrefix.name().startsWith(OrePrefixes.dust.name())) { - return; - } - - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), - GregtechItemList.Shape_Extruder_SmallGear.get(0L, new Object[0]), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, (Object) aMaterial.mSmeltInto, (long) tAmount), - ((int) Math.max(aMaterialMass * 5L * tAmount, tAmount)/4), 8 * tVoltageMultiplier); - GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), - ItemList.Shape_Mold_Gear_Small.get(0L, new Object[0]), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, (Object) aMaterial.mSmeltInto, (long) tAmount), - ((int) Math.max(aMaterialMass * 10L * tAmount, tAmount)/4), 2 * tVoltageMultiplier); - - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java deleted file mode 100644 index 5156b938db..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ /dev/null @@ -1,2270 +0,0 @@ -package gtPlusPlus.core.recipe; - -import static gtPlusPlus.core.lib.CORE.GTNH; - -import java.util.ArrayList; - -import cpw.mods.fml.common.Loader; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.HotFuel; -import gregtech.api.util.ThermalFuel; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.item.chemistry.GenericChem; -import gtPlusPlus.core.item.chemistry.IonParticles; -import gtPlusPlus.core.item.chemistry.RocketFuels; -import gtPlusPlus.core.item.crafting.ItemDummyResearch; -import gtPlusPlus.core.item.crafting.ItemDummyResearch.ASSEMBLY_LINE_RESEARCH; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.core.material.Particle; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.EnchantingUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.reflect.AddGregtechRecipe; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -public class RECIPES_GREGTECH { - - public static void run() { - Logger.INFO("Loading Recipes through GregAPI for Industrial Multiblocks."); - execute(); - } - - private static void execute() { - cokeOvenRecipes(); - electrolyzerRecipes(); - assemblerRecipes(); - fluidcannerRecipes(); - distilleryRecipes(); - extractorRecipes(); - fluidExtractorRecipes(); - chemicalBathRecipes(); - chemicalReactorRecipes(); - dehydratorRecipes(); - blastFurnaceRecipes(); - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - largeChemReactorRecipes(); - fusionRecipes(); - } - - fissionFuelRecipes(); - autoclaveRecipes(); - compressorRecipes(); - mixerRecipes(); - macerationRecipes(); - centrifugeRecipes(); - benderRecipes(); - cyclotronRecipes(); - blastSmelterRecipes(); - //advancedMixerRecipes(); - sifterRecipes(); - electroMagneticSeperatorRecipes(); - extruderRecipes(); - cuttingSawRecipes(); - breweryRecipes(); - laserEngraverRecipes(); - assemblyLineRecipes(); - latheRecipes(); - vacuumFreezerRecipes(); - fluidheaterRecipes(); - chemplantRecipes(); - packagerRecipes(); - - - /** - * Special Recipe handlers - */ - RECIPES_SeleniumProcessing.init(); - RECIPES_RareEarthProcessing.init(); - - - - - - - addFuels(); - } - - - - private static void packagerRecipes() { - - - } - - private static void chemplantRecipes() { - - //This is subsequently absorbed in water to form nitric acid and nitric oxide. - //3 NO2 (g) + H2O (l) → 2 HNO3 (aq) + NO (g) (ΔH = −117 kJ/mol) - //The nitric oxide is cycled back for reoxidation. Alternatively, if the last step is carried out in air: - //4 NO2 (g) + O2 (g) + 2 H2O (l) → 4 HNO3 (aq) - - // Advanced method for Nitric Acid Production - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(17), - CI.getPinkCatalyst(0), - }, - new FluidStack[] { - FluidUtils.getFluidStack(GenericChem.Nitrogen_Dioxide, 4000), - FluidUtils.getAir(4000), - FluidUtils.getWater(2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack("nitricacid", 4000), - }, - 10 * 20, - 480, - 3); - - // Advanced recipe for Fluorine Production - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(17), - CI.getPurpleCatalyst(0), - ItemUtils.getSimpleStack(Blocks.sandstone, 64), - ItemUtils.getSimpleStack(Blocks.sandstone, 64) - }, - new FluidStack[] { - FluidUtils.getFluidStack("nitricacid", 4000), - FluidUtils.getAir(8000) - }, - new ItemStack[] { - FLUORIDES.FLUORITE.getOre(8), - FLUORIDES.FLUORITE.getOre(4), - FLUORIDES.FLUORITE.getOre(4), - FLUORIDES.FLUORITE.getOre(4), - }, - new FluidStack[] { - - }, - new int[] { - 0, 2500, 2000, 1500 - }, - 10 * 20, - 1024, - 5); - - // Advanced recipe for Fluorine Production - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(17), - CI.getPurpleCatalyst(0), - ItemUtils.getSimpleStack(Blocks.sand, 64), - ItemUtils.getSimpleStack(Blocks.sand, 64) - }, - new FluidStack[] { - FluidUtils.getFluidStack("nitricacid", 5000), - FluidUtils.getAir(12000) - }, - new ItemStack[] { - FLUORIDES.FLUORITE.getOre(4), - FLUORIDES.FLUORITE.getOre(2), - FLUORIDES.FLUORITE.getOre(2), - FLUORIDES.FLUORITE.getOre(2), - }, - new FluidStack[] { - - }, - new int[] { - 7500, 1500, 1000, 500 - }, - 10 * 20, - 1024, - 5); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(16), - CI.getPinkCatalyst(0), - }, - new FluidStack[] { - FluidUtils.getFluidStack(GenericChem.Nitrogen_Dioxide, 3000), - FluidUtils.getDistilledWater(5000) - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack("nitricacid", 2000), - FluidUtils.getFluidStack(GenericChem.Nitric_Oxide, 1500), - }, - 10 * 20, - 480, - 2); - - // Produce Boric Acid - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(21), - ItemUtils.getItemStackOfAmountFromOreDict("dustBorax", 4), - }, - new FluidStack[] { - FluidUtils.getFluidStack(GenericChem.HydrochloricAcid, 2000) - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustSalt", 5), - }, - new FluidStack[] { - FluidUtils.getFluidStack("boricacid", 2000), - FluidUtils.getWater(5000) - - }, - 20 * 30, - MaterialUtils.getVoltageForTier(3), - 3); - - // Produce Th232 - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(22), - ELEMENT.getInstance().THORIUM.getDust(16) - }, - new FluidStack[] { - FluidUtils.getDistilledWater(2000), - FluidUtils.getFluidStack("boricacid", 1500) - }, - new ItemStack[] { - ELEMENT.getInstance().THORIUM.getSmallDust(32), - ELEMENT.getInstance().THORIUM232.getDust(2), - ELEMENT.getInstance().THORIUM232.getSmallDust(2), - ELEMENT.getInstance().URANIUM232.getDust(1), - }, - new FluidStack[] { - - }, - new int[] { - 0, 0, 1000, 250 - }, - 20 * 300, - MaterialUtils.getVoltageForTier(4), - 4); - - // Modify Sapling into Pine Sapling - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(6), - ItemUtils.getSimpleStack(Blocks.sapling, 32) - }, - new FluidStack[] { - FluidUtils.getFluidStack("fluid.geneticmutagen", 2000), - FluidUtils.getDistilledWater(8000) - }, - new ItemStack[] { - ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine, 16) - }, - new FluidStack[] { - - }, - 120 * 20, - 64, - 2); - - - // Convert GT++ Plutonium239 into normal Plutonium - if (Materials.Plutonium.mDefaultLocalName.equals("Plutonium 239")) { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(16), - ELEMENT.getInstance().PLUTONIUM239.getDust(1) - }, - new FluidStack[] { - - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustPlutonium", 1) - }, - new FluidStack[] { - - }, - 5 * 20, - 1, - 2); - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(16), - ELEMENT.getInstance().PLUTONIUM239.getSmallDust(1) - }, - new FluidStack[] { - - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallPlutonium", 1) - }, - new FluidStack[] { - - }, - 5 * 20, - 1, - 2); - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(16), - ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1) - }, - new FluidStack[] { - - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyPlutonium", 1) - }, - new FluidStack[] { - - }, - 5 * 20, - 1, - 2); - } - - int aLaureniumTier = ALLOY.LAURENIUM.vTier; - // Adding Recipes for Casings - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(12), - CI.getTieredMachineCasing(aLaureniumTier-1), - ALLOY.LAURENIUM.getPlate(8), - CI.getGear(aLaureniumTier, 2) - }, - new FluidStack[] { - CI.getTieredFluid(aLaureniumTier, 2 * 144), - CI.getAlternativeTieredFluid(aLaureniumTier-1, 4 * 144), - CI.getTertiaryTieredFluid(aLaureniumTier-2, 6 * 144) - }, - new ItemStack[] { - GregtechItemList.Casing_Machine_Custom_3.get(1) - }, - new FluidStack[] { - - }, - 20 * 20, - MaterialUtils.getVoltageForTier(aLaureniumTier-2), - 5); - - int aBotmiumTier = ALLOY.BOTMIUM.vTier; - // Adding Recipes for Casings - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(12), - CI.getTieredMachineCasing(aBotmiumTier-1), - ALLOY.BOTMIUM.getPlate(8), - CI.getGear(aBotmiumTier, 2) - }, - new FluidStack[] { - CI.getTieredFluid(aBotmiumTier, 2 * 144), - CI.getAlternativeTieredFluid(aBotmiumTier-1, 4 * 144), - CI.getTertiaryTieredFluid(aBotmiumTier-2, 6 * 144) - }, - new ItemStack[] { - GregtechItemList.Casing_Machine_Custom_4.get(1) - }, - new FluidStack[] { - - }, - 20 * 20, - MaterialUtils.getVoltageForTier(aBotmiumTier-2), - 6); - - } - - private static void fluidheaterRecipes() { - GT_Values.RA.addFluidHeaterRecipe(CI.getNumberedCircuit(20), FluidUtils.getWater(1000), FluidUtils.getHotWater(1000), 30, 30); - - } - - private static void vacuumFreezerRecipes() { - GT_Values.RA.addVacuumFreezerRecipe(GregtechItemList.Bomb_Cast_Molten.get(1), GregtechItemList.Bomb_Cast_Set.get(1), 20 * 30); - } - - private static void latheRecipes() { - - GT_Values.RA.addLatheRecipe( - ALLOY.EGLIN_STEEL.getBlock(1), - GregtechItemList.Bomb_Cast_Mold.get(1), - null, - 20 * 60 * 15, - 120); - - GT_Values.RA.addLatheRecipe( - GregtechItemList.Bomb_Cast_Set.get(1), - GregtechItemList.Bomb_Cast_Broken.get(2), - ItemUtils.getSimpleStack(ModItems.itemBombCasing, 2), - 20 * 60 * 5, - 30); - - } - - private static void fusionRecipes() { - - /** - * Adds a Fusion reactor Recipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param aOutput = Output of the Fusion (can be null, and respects StackSize) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!) - * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) - */ - - //Hydrogen Plasma - /*CORE.RA.addFusionReactorRecipe( - Particle.getIon("Hydrogen", 0), - Particle.getIon("Hydrogen", 0), - Materials.Hydrogen.getPlasma(1), - 5000, - 16, - 4096, - 40000000);*/ - - - //Hypogen Creation - GT_Values.RA.addFusionReactorRecipe( - Materials.Neutronium.getMolten(128), - ALLOY.QUANTUM.getFluidStack(256), - ELEMENT.STANDALONE.HYPOGEN.getFluidStack(4), - 2048 * 4, - (int) MaterialUtils.getVoltageForTier(9), - 600000000 * 2); - - //Rhugnor - GT_Values.RA.addFusionReactorRecipe( - GenericChem.TEFLON.getFluidStack(64), - ALLOY.PIKYONIUM.getFluidStack(128), - ELEMENT.STANDALONE.RHUGNOR.getFluidStack(8), - 2048 * 4, - (int) MaterialUtils.getVoltageForTier(7), - 150000000 * 2); - - } - - private static void assemblyLineRecipes() { - - - - ItemStack[] aCoilWire = new ItemStack[] { - ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 0, GTNH ? 64 : 32), - ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 1, GTNH ? 64 : 32), - ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 2, GTNH ? 64 : 32), - ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 3, GTNH ? 64 : 32), - }; - - - - - //Containment Casings - CORE.RA.addAssemblylineRecipe( - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1), - 20 * 60 * 30, - new Object[] { - ItemList.Field_Generator_IV.get(GTNH ? 32 : 16), - ItemList.Electric_Motor_EV.get(GTNH ? 64 : 32), - ItemList.Energy_LapotronicOrb.get(GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.cableGt12, 7, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.wireGt16, 6, GTNH ? 64 : 32), - ItemUtils.getOrePrefixStack(OrePrefixes.plate, Materials.Naquadria, GTNH ? 64 : 16), - ELEMENT.getInstance().GADOLINIUM.getDust(GTNH ? 32 : 8), - ELEMENT.getInstance().SAMARIUM.getDust(GTNH ? 16 : 4), - ALLOY.ARCANITE.getGear(GTNH ? 8 : 2), - new Object[] {CI.getTieredCircuitOreDictName(5), 64}, - new Object[] {CI.getTieredCircuitOreDictName(6), 32}, - new Object[] {CI.getTieredCircuitOreDictName(7), 16}, - GregtechItemList.Laser_Lens_Special.get(1), - aCoilWire[3] - }, - new FluidStack[] { - ALLOY.NITINOL_60.getFluidStack(144 * 9 * (GTNH ? 4 : 2)), - ALLOY.ENERGYCRYSTAL.getFluidStack(144 * 9 * (GTNH ? 8 : 4)), - ALLOY.TUMBAGA.getFluidStack(144 * 9 * (GTNH ? 32 : 8)), - ALLOY.NICHROME.getFluidStack(144 * 1 * (GTNH ? 16 : 4)), - }, - ItemUtils.getSimpleStack(ModBlocks.blockCasings3Misc, 15, 32), - 20 * 60 * 10 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(6)); - - //Slow Fusion Controller - /*CORE.RA.addAssemblylineRecipe( - GregtechItemList.COMET_Cyclotron.get(1), - 20 * 60 * 30, - new ItemStack[] { - CI.getFieldGenerator(6, GTNH ? 32 : 8), - ItemList.Electric_Motor_EV.get(GTNH ? 32 : 8), - ItemList.Tool_Scanner.get(GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.cableGt12, 6, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.wireGt16, 5, GTNH ? 64 : 32), - CI.getTieredComponent(OrePrefixes.plate, 6, GTNH ? 64 : 32), - ELEMENT.getInstance().GADOLINIUM.getDust(GTNH ? 32 : 8), - ELEMENT.getInstance().SAMARIUM.getDust(GTNH ? 16 : 4), - ALLOY.INCOLOY_MA956.getGear(GTNH ? 8 : 2), - CI.getTieredComponent(OrePrefixes.circuit, 5, GTNH ? 64 : 32), - CI.getTieredComponent(OrePrefixes.circuit, 6, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.circuit, 7, GTNH ? 16 : 8) - }, - new FluidStack[] { - CI.getTieredFluid(6, 144 * 9 * (GTNH ? 8 : 4)), - CI.getTertiaryTieredFluid(6, 144 * 9 * (GTNH ? 8 : 4)), - CI.getAlternativeTieredFluid(6, 144 * 9 * (GTNH ? 8 : 4)), - CI.getTieredFluid(5, 144 * 9 * (GTNH ? 16 : 8)), - }, - GregtechItemList.Miniature_Fusion.get(1), - 20 * 60 * 5 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(7));*/ - - - //Plasma Tank - /*CORE.RA.addAssemblylineRecipe( - ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, 1), - 20 * 60 * 5, - new ItemStack[] { - CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.circuit, 5, GTNH ? 16 : 4), - CI.getTieredComponent(OrePrefixes.pipeHuge, 5, GTNH ? 16 : 4), - CI.getTieredComponent(OrePrefixes.cableGt08, 7, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.gearGt, 6, GTNH ? 8 : 4), - aCoilWire[2] - }, - new FluidStack[] { - CI.getTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), - CI.getTertiaryTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), - - }, - GregtechItemList.Plasma_Tank.get(1), - 20 * 60 * 1 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(5));*/ - - // Turbine Automation Port - CORE.RA.addAssemblylineRecipe( - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_8_TURBINE_AUTOMATION, 1), - 20 * 60 * 60 * 24, - new Object[] { - CI.getTieredMachineHull(8, 4), - CI.getConveyor(8, GTNH ? 24 : 12), - CI.getElectricMotor(7, GTNH ? 32 : 16), - CI.getElectricPiston(7, GTNH ? 16 : 4), - CI.getEnergyCore(6, GTNH ? 8 : 2), - CI.getPlate(8, GTNH ? 24 : 12), - CI.getTieredComponent(OrePrefixes.screw, 8, GTNH ? 48 : 24), - CI.getTieredComponent(OrePrefixes.bolt, 7, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.rod, 6, GTNH ? 12 : 6), - new Object[] {CI.getTieredCircuitOreDictName(7), 20}, - CI.getTieredComponent(OrePrefixes.rotor, 6, GTNH ? 16 : 8), - }, - new FluidStack[] { - CI.getTieredFluid(8, 144 * 32), - CI.getAlternativeTieredFluid(7, 144 * 16), - CI.getTertiaryTieredFluid(7, 144 * 16), - ALLOY.BABBIT_ALLOY.getFluidStack(128 * 144), - ALLOY.ZERON_100.getFluidStack(144 * 64) - - }, - GregtechItemList.Hatch_Input_TurbineHousing.get(4), - 20 * 60 * 60 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(8)); - - - /* - * Contianment casings - */ - - ItemStack[] aGemCasings = new ItemStack[] { - GregtechItemList.Battery_Casing_Gem_1.get(1), - GregtechItemList.Battery_Casing_Gem_2.get(1), - GregtechItemList.Battery_Casing_Gem_3.get(1), - GregtechItemList.Battery_Casing_Gem_4.get(1), - }; - ItemStack[] aResearch = new ItemStack[] { - Particle.getBaseParticle(Particle.UNKNOWN), - GregtechItemList.Battery_Casing_Gem_1.get(1), - GregtechItemList.Battery_Casing_Gem_2.get(1), - GregtechItemList.Battery_Casing_Gem_3.get(1), - }; - - int aCasingSlot = 0; - for (int j = 6; j < 10; j++) { - CORE.RA.addAssemblylineRecipe( - aResearch[aCasingSlot], - 20 * 60 * 60, - new ItemStack[] { - CI.getTieredComponent(OrePrefixes.plate, j-1,16), - CI.getTieredComponent(OrePrefixes.cableGt08, j+1,(GTNH ? 32 : 16)), - CI.getTieredComponent(OrePrefixes.gearGt, j-1, 4), - aCoilWire[aCasingSlot] - }, - new FluidStack[] { - CI.getTieredFluid(j, 144 *(GTNH ? 8 : 4)), - CI.getTertiaryTieredFluid(j-2, 144 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(j, 144 * (GTNH ? 16 : 12)), - - }, - aGemCasings[aCasingSlot++], - 20 * 60 * 1 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(j)); - } - - /* - * Gem Battery Recipes - */ - - ItemStack[] aGemBatteries = new ItemStack[] { - GregtechItemList.Battery_Gem_1.get(1), - GregtechItemList.Battery_Gem_2.get(1), - GregtechItemList.Battery_Gem_3.get(1), - GregtechItemList.Battery_Gem_4.get(1), - }; - - ItemStack[] aExoticInputs = new ItemStack[] { - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.ELECTRON), - Particle.getBaseParticle(Particle.CHARM), - Particle.getBaseParticle(Particle.GRAVITON) - }; - aCasingSlot = 0; - for (int j = 6; j < 10; j++) { - CORE.RA.addAssemblylineRecipe( - aExoticInputs[aCasingSlot], - 20 * 60 * 60 * 5, - new Object[] { - aGemCasings[aCasingSlot], - ItemUtils.getSimpleStack(aExoticInputs[aCasingSlot], 16), - CI.getTieredComponent(OrePrefixes.plate, j, 16), - new Object[] {CI.getTieredCircuitOreDictName(j), 8}, - CI.getTieredComponent(OrePrefixes.wireGt16, j+1, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.bolt, j, GTNH ? 8 : 4), - CI.getTieredComponent(OrePrefixes.screw, j-1, GTNH ? 8 : 4), - }, - new FluidStack[] { - CI.getTieredFluid(j, 144 * 1 * (GTNH ? 16 : 8)), - CI.getTertiaryTieredFluid(j-2, 144 * 2 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(j, 144 * (GTNH ? 16 : 8)), - CI.getTertiaryTieredFluid(j-1, 144 * (GTNH ? 16 : 8)), - }, - aGemBatteries[aCasingSlot++], - 20 * 60 * 1 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(j)); - } - - - if (LoadedMods.Baubles) { - //Nano Healer - CORE.RA.addAssemblylineRecipe( - ItemUtils.simpleMetaStack(Items.golden_apple, 1, 1), - 20 * 60 * 10, - new Object[] { - ItemUtils.getSimpleStack(aGemCasings[2], GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.plate, 8, GTNH ? 32 : 16), - new Object[] {CI.getTieredCircuitOreDictName(7), 16}, - CI.getTieredComponent(OrePrefixes.cableGt02, 7, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.gearGt, 6, GTNH ? 6 : 3), - CI.getTieredComponent(OrePrefixes.screw, 7, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.bolt, 5, GTNH ? 24 : 12), - CI.getTieredComponent(OrePrefixes.frameGt, 4, GTNH ? 12 : 6), - aCoilWire[3] - }, - new FluidStack[] { - CI.getTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), - CI.getTertiaryTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(6, 144 * 18 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), - - }, - ItemUtils.getItemStackFromFQRN("miscutils:personalHealingDevice", 1), - 20 * 60 * 30 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(7)); - - - - //Charge Pack LuV-UV - - ItemStack[] aChargeResearch = new ItemStack[] { - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore7", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore8", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore9", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore10", 1), - }; - - ItemStack[] aChargeOutputs = new ItemStack[] { - ItemUtils.getSimpleStack(ModItems.itemChargePack_High_1, 1), - ItemUtils.getSimpleStack(ModItems.itemChargePack_High_2, 1), - ItemUtils.getSimpleStack(ModItems.itemChargePack_High_3, 1), - ItemUtils.getSimpleStack(ModItems.itemChargePack_High_4, 1), - }; - - int aCurrSlot = 0; - for (int h = 6; h < 10; h++) { - CORE.RA.addAssemblylineRecipe( - aChargeResearch[aCurrSlot], - 20 * 60 * 10 * (aCurrSlot + 1), - new Object[] { - ItemUtils.getSimpleStack(aGemBatteries[aCurrSlot],2), - aCoilWire[aCurrSlot], - CI.getTieredComponent(OrePrefixes.plate, h, 8), - new Object[] {CI.getTieredCircuitOreDictName(h), 4}, - new Object[] {CI.getTieredCircuitOreDictName(h-1), 8}, - CI.getTieredComponent(OrePrefixes.cableGt12, h-1, 16), - CI.getTieredComponent(OrePrefixes.screw, h, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.bolt, h-2, GTNH ? 32 : 16), - CI.getFieldGenerator(h, 1), - }, - new FluidStack[] { - CI.getTieredFluid(h, 144 * 4 * (GTNH ? 8 : 4)), - CI.getTertiaryTieredFluid(h-1, 144 * 4 * (GTNH ? 8 : 4)), - CI.getAlternativeTieredFluid(h-1, 144 * 4 * (GTNH ? 8 : 4)), - CI.getAlternativeTieredFluid(h-2, 144 * 4 * (GTNH ? 8 : 4)), - }, - aChargeOutputs[aCurrSlot], - 20 * 60 * 30 * (GTNH ? 2 : 1) * (aCurrSlot+1), - (int) MaterialUtils.getVoltageForTier(h)); - aCurrSlot++; - } - - //Cloaking device - CORE.RA.addAssemblylineRecipe( - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_9_CLOAKING, 1), - 20 * 60 * 10, - new Object[] { - ItemUtils.getSimpleStack(aGemCasings[3], GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.plate, 8, GTNH ? 32 : 16), - new Object[] {CI.getTieredCircuitOreDictName(7), 16}, - CI.getTieredComponent(OrePrefixes.cableGt04, 8, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.gearGt, 7, GTNH ? 6 : 3), - CI.getTieredComponent(OrePrefixes.screw, 8, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.bolt, 7, GTNH ? 24 : 12), - CI.getTieredComponent(OrePrefixes.frameGt, 5, GTNH ? 12 : 6), - aCoilWire[3] - }, - new FluidStack[] { - CI.getTieredFluid(8, 144 * 18 * (GTNH ? 16 : 8)), - CI.getTertiaryTieredFluid(8, 144 * 18 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), - CI.getAlternativeTieredFluid(8, 144 * 18 * (GTNH ? 16 : 8)), - - }, - ItemUtils.getItemStackFromFQRN("miscutils:personalCloakingDevice", 1), - 20 * 60 * 30 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(8)); - } - - - - - - - - - - } - - private static void laserEngraverRecipes() { - - // Laser Sensors and Emitters together - GregtechItemList[] aTransParts = new GregtechItemList[] { - GregtechItemList.TransmissionComponent_ULV, - GregtechItemList.TransmissionComponent_LV, - GregtechItemList.TransmissionComponent_MV, - GregtechItemList.TransmissionComponent_HV, - GregtechItemList.TransmissionComponent_EV, - GregtechItemList.TransmissionComponent_IV, - GregtechItemList.TransmissionComponent_LuV, - GregtechItemList.TransmissionComponent_ZPM, - GregtechItemList.TransmissionComponent_UV, - GregtechItemList.TransmissionComponent_MAX, - }; - for (int i=0;i<10;i++) { - GT_Values.RA.addLaserEngraverRecipe( - CI.getEmitter(i, 2), - CI.getSensor(i, 2), - aTransParts[i].get(1), - 20 * 5, - MaterialUtils.getVoltageForTier(i)); - } - - - - GT_Values.RA.addLaserEngraverRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 6L), - GregtechItemList.Laser_Lens_Special.get(0), - ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1), - 20 * 60 * 3, - MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.vTier)); - - GT_Values.RA.addLaserEngraverRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 8L), - GregtechItemList.Laser_Lens_Special.get(0), - ELEMENT.STANDALONE.ASTRAL_TITANIUM.getDust(1), - 20 * 60 * 2, - MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ASTRAL_TITANIUM.vTier)); - - GT_Values.RA.addLaserEngraverRecipe( - ALLOY.NITINOL_60.getBlock(2), - GregtechItemList.Laser_Lens_Special.get(0), - ELEMENT.STANDALONE.ADVANCED_NITINOL.getBlock(1), - 20 * 60 * 1, - MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ADVANCED_NITINOL.vTier)); - - GT_Values.RA.addLaserEngraverRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 64L), - GregtechItemList.Laser_Lens_Special.get(0), - ELEMENT.STANDALONE.CHRONOMATIC_GLASS.getDust(1), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CHRONOMATIC_GLASS.vTier)); - - - GT_Values.RA.addLaserEngraverRecipe( - CI.getFieldGenerator(6, 1), - CI.getEmitter(7, 2), - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5)); - - // Distillus Upgrade Chip - GT_Values.RA.addLaserEngraverRecipe( - GregtechItemList.Laser_Lens_WoodsGlass.get(0), - ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, 20, 1), - GregtechItemList.Distillus_Upgrade_Chip.get(1), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5)); - - - - - } - - private static void breweryRecipes() { - CORE.RA.addBrewingRecipe(14, EnchantingUtils.getMobEssence(100), EnchantingUtils.getLiquidXP(1332), 100, 120, false); - CORE.RA.addBrewingRecipe(14, EnchantingUtils.getLiquidXP(1332), EnchantingUtils.getMobEssence(100), 100, 120, false); - CORE.RA.addBrewingRecipe(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest), FluidUtils.getFluidStack("water", 100), FluidUtils.getFluidStack("biomass", 100), 1200, 3, false); - CORE.RA.addBrewingRecipe(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest), FluidUtils.getFluidStack("honey", 100), FluidUtils.getFluidStack("biomass", 150), 1200, 3, false); - CORE.RA.addBrewingRecipe(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest), FluidUtils.getFluidStack("juice", 100), FluidUtils.getFluidStack("biomass", 150), 1200, 3, false); - } - - private static void cuttingSawRecipes() { - GT_Values.RA.addCutterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), //Input - ItemUtils.getItemStackOfAmountFromOreDict("plateMeatRaw", 9), //Output - null, - 16, //Time - 8); //EU - } - - private static void electrolyzerRecipes() { - GT_Values.RA.addElectrolyzerRecipe( - ItemUtils.getSimpleStack(ModItems.dustDecayedRadium226, 1), - null, - null, - FluidUtils.getFluidStack("radon", !GTNH ? 500 : 144), - null, - null, - null, - null, - null, - null, - new int[]{}, - 20*90, - 240); - } - - private static void extruderRecipes() { - // Osmium Credits - if (GT_Values.RA.addExtruderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockOsmium", 1), - ItemList.Shape_Mold_Credit.get(0), ItemList.Credit_Greg_Osmium.get(1), - (int) Math.max(Materials.Osmium.getMass() * 2L * 20, 1), 1024)) { - Logger.WARNING("Extruder Recipe: Osmium Credit - Success"); - } - else { - Logger.WARNING("Extruder Recipe: Osmium Credit - Failed"); - } - } - - private static void blastSmelterRecipes() { - - if (!GTNH) { - // Trinium - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(8), - ELEMENT.getInstance().BISMUTH.getDust(8), - ELEMENT.getInstance().IRON.getDust(64), - ELEMENT.getInstance().CARBON.getDust(16), - ELEMENT.getInstance().GOLD.getDust(16), - ELEMENT.getInstance().SILVER.getDust(16), - ELEMENT.getInstance().OSMIUM.getDust(4), - ELEMENT.getInstance().IRIDIUM.getDust(4), - ELEMENT.getInstance().CERIUM.getDust(8) - }, - FluidUtils.getFluidStack("molten.trinium", 136 * 144), 0, 20 * 3000, - 2040*4); - } - - //Eglin Steel - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(6), - ELEMENT.getInstance().IRON.getDust(4), - ALLOY.KANTHAL.getDust(1), - ALLOY.INVAR.getDust(5), - ELEMENT.getInstance().SULFUR.getDust(1), - ELEMENT.getInstance().CARBON.getDust(1), - ELEMENT.getInstance().SILICON.getDust(4) - }, - ALLOY.EGLIN_STEEL.getFluidStack(16 * 144), - 0, - 20 * 45, - 120); - - //HG1223 - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(5), - ELEMENT.getInstance().MERCURY.getCell(1), - ELEMENT.getInstance().BARIUM.getDust(2), - ELEMENT.getInstance().CALCIUM.getDust(2), - ELEMENT.getInstance().COPPER.getDust(3), - }, - ELEMENT.getInstance().OXYGEN.getFluidStack(8000), - ALLOY.HG1223.getFluidStack(16 * 144), - new ItemStack[] { - CI.emptyCells(1) - }, - new int[] {10000}, //Output Chance - 20 * 120, - 30720); - - //NITINOL_60 - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(2), - ELEMENT.getInstance().TITANIUM.getDust(3), - ELEMENT.getInstance().NICKEL.getDust(2) - }, - ALLOY.NITINOL_60.getFluidStack(5 * 144), - 0, - 20 * 75, - 7680); - - - - - - // Germanium Roasting - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(15), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedSphalerite", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(2000), - ELEMENT.getInstance().GERMANIUM.getFluidStack(288), - 0, - 20 * 300, - 4000); - - - // Ruthenium Roasting - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(19), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIridium", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(2000), - ELEMENT.getInstance().RUTHENIUM.getFluidStack(288), - 0, - 20 * 300, - 8000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(19), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedOsmium", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(2000), - ELEMENT.getInstance().RUTHENIUM.getFluidStack(288), - 0, - 20 * 300, - 8000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(19), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPlatinum", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(2000), - ELEMENT.getInstance().RUTHENIUM.getFluidStack(288), - 0, - 20 * 300, - 8000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(19), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCooperite", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(8000), - ELEMENT.getInstance().RUTHENIUM.getFluidStack(144), - 0, - 20 * 300, - 8000); - - // Rhenium Roasting - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(20), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedScheelite", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(10000), - ELEMENT.getInstance().RHENIUM.getFluidStack(144), - 0, - 20 * 300, - 4000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(20), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMolybdenite", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(7500), - ELEMENT.getInstance().RHENIUM.getFluidStack(144), - 0, - 20 * 300, - 4000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(20), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMolybdenum", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(5000), - ELEMENT.getInstance().RHENIUM.getFluidStack(288), - 0, - 20 * 300, - 4000); - - //Thallium Roasting - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(21), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIron", 12), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPyrite", 16), - ELEMENT.getInstance().CARBON.getDust(64), - }, - Materials.SulfuricAcid.getFluid(5000), - ELEMENT.getInstance().THALLIUM.getFluidStack(288+144), - 0, - 20 * 300, - 8000); - - - - //Strontium processing - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(21), - MISC_MATERIALS.STRONTIUM_OXIDE.getDust(8), - ELEMENT.getInstance().ALUMINIUM.getDust(8), - }, - null, - ELEMENT.getInstance().OXYGEN.getFluidStack(8000), - new ItemStack[] { - ELEMENT.getInstance().ALUMINIUM.getIngot(8), - ELEMENT.getInstance().STRONTIUM.getIngot(8) - }, - new int[] {10000, 10000}, //Output Chance - 20 * 120, - 480*4); - - - //Wood's Glass Laser Lens - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(5), - ItemList.Shape_Mold_Ball.get(0), - ELEMENT.getInstance().BARIUM.getDust(1), - ELEMENT.getInstance().SODIUM.getDust(1), - ELEMENT.getInstance().SILICON.getDust(2), - ELEMENT.getInstance().NICKEL.getDust(1), - ItemUtils.getItemStackOfAmountFromOreDict("dustGlass", 5) - }, - FluidUtils.getUUM(1000), - null, - new ItemStack[] { - GregtechItemList.Laser_Lens_WoodsGlass.get(1) - }, - new int[] {10000}, - 20 * 300, - (int) GT_Values.V[3]); - - - - } - - private static void fluidcannerRecipes() { - // Sulfuric Acid - CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), - ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), - null); - CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), - ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250)); - - - - // Hydrofluoric Acid - boolean addedGtExtraction = false; - // Try use Internal GT Fluid first - if (Utils.getGregtechVersionAsInt() >= 50929) { - // Hydrofluoric Acid - CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), - ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), - FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 250), null); - addedGtExtraction = CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), - ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 250)); - } - //Add a Fill recipe for GT++ Acid - CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), - ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), - FluidUtils.getFluidStack("hydrofluoricacid", 125), null); - //Add an empty recipe, but only if we didn't for the standard GT HF. Prevents Fluid transformation exploits. - if (!addedGtExtraction) { - CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 125)); - } - - //Gelid Cryotheum - CORE.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustCryotheum", 1), FluidUtils.getFluidStack("cryotheum", 250), 200, 240); - - //Ender Fluid - CORE.RA.addFluidExtractionRecipe(ItemUtils.getSimpleStack(Items.ender_pearl), FluidUtils.getFluidStack("ender", 250), 100, 30); - - //Blazing Pyrotheum - CORE.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), FluidUtils.getFluidStack("pyrotheum", 250), 200, 240); - - - } - - private static void cokeOvenRecipes() { - Logger.INFO("Loading Recipes for Industrial Coking Oven."); - // Wood to Charcoal - //Try use all woods found - ArrayList aLogData = OreDictionary.getOres("logWood"); - if (aLogData.isEmpty()) { - AddGregtechRecipe.addCokeAndPyrolyseRecipes(GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 20L), 20, - GT_ModHandler.getSteam(1000), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 24L), - FluidUtils.getFluidStack("fluid.coalgas", 1440), 60, 30); } - else { - for (ItemStack stack : aLogData) { - AddGregtechRecipe.addCokeAndPyrolyseRecipes(ItemUtils.getSimpleStack(stack, 20), 20, - GT_ModHandler.getSteam(1000), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 24L), - FluidUtils.getFluidStack("fluid.coalgas", 1440), 60, 30); - } - } - - // Coal to Coke - AddGregtechRecipe.addCokeAndPyrolyseRecipes(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16L), 22, - GT_ModHandler.getSteam(1000), ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 10), - FluidUtils.getFluidStack("fluid.coalgas", 2880), 30, 120); - - // Coke & Coal - CORE.RA.addCokeOvenRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 12L), - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 6), GT_ModHandler.getSteam(2000), - FluidUtils.getFluidStack("fluid.coalgas", 5040), - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 14), 60 * 20, 240); - - } - - private static void matterFabRecipes() { - Logger.INFO("Loading Recipes for Matter Fabricator."); - - try { - - CORE.RA.addMatterFabricatorRecipe(Materials.UUAmplifier.getFluid(1L), // Fluid - // Input - Materials.UUMatter.getFluid(1L), // Fluid Output - 800, // Time in ticks - 32); // EU - } - catch (final NullPointerException e) { - Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); - } - try { - - CORE.RA.addMatterFabricatorRecipe(null, // Fluid Input - Materials.UUMatter.getFluid(1L), // Fluid Output - 3200, // Time in ticks - 32); // EU - } - catch (final NullPointerException e) { - Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); - } - - } - - private static void dehydratorRecipes() { - Logger.INFO("Loading Recipes for Chemical Dehydrator."); - - - ItemStack cropGrape = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cropGrape", 1); - ItemStack foodRaisins = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foodRaisins", 1); - - if (cropGrape != null && foodRaisins != null) - CORE.RA.addDehydratorRecipe(new ItemStack[] { - CI.getNumberedBioCircuit(20), - cropGrape - }, // Item - null, // Fluid input (slot 1) - null, // Fluid output (slot 2) - new ItemStack[] { - foodRaisins - }, // Output - new int[] { 10000 }, - 10, // Time in ticks - 2); // EU - - - - // Process Waste Water - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(21) - }, - FluidUtils.getFluidStack("fluid.sludge", 1000), - FluidUtils.getFluidStack("nitricacid", 10), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyIron", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCopper", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyTin", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyNickel", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCobalt", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAluminium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinySilver", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyGold", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyIridium", 1) }, - new int[] { 10, 5, 5, 4, 4, 3, 2, 2, 1 }, - 2 * 20, - 500); // EU - - // CaF2 + H2SO4 → CaSO4(solid) + 2 HF - FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 16000); - if (aGregtechHydro == null) { - aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid", 16000); - } - - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(5), - ItemUtils.getItemStackOfAmountFromOreDict("dustFluorite", 37), - }, - FluidUtils.getFluidStack("sulfuricacid", 56 * 144), - aGregtechHydro, // Fluid output (slot 2) - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumSulfate", 30), - ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 2) - }, - new int[] { 10000, 100, 100, 300, 200 }, - 10 * 60 * 20, - 230); // EU - - - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(18), - CI.emptyCells(3) - }, - FluidUtils.getFluidStack("fluid.ethylbenzene", 1000), - null, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellStyrene", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2) - }, - new int[] {10000, 10000}, - 3 * 20, - 30); - - /* - * Try Add custom Recipe for drying leather - */ - if (LoadedMods.PamsHarvestcraft && Loader.isModLoaded("Backpack")) { - ItemStack aLeather1, aLeather2; - aLeather1 = ItemUtils.getCorrectStacktype("harvestcraft:hardenedleatherItem", 1); - aLeather2 = ItemUtils.getCorrectStacktype("Backpack:tannedLeather", 1); - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(18), - aLeather1 - }, - FluidUtils.getFluidStack("fluid.ethylbenzene", 1000), - null, - new ItemStack[] { - aLeather2 - }, - new int[] {10000}, - 5 * 20, - 180); - } - - } - - private static void largeChemReactorRecipes() { - //Styrene - CORE.RA.addMultiblockChemicalRecipe( - new ItemStack[]{CI.getNumberedCircuit(24)}, - new FluidStack[]{ - FluidUtils.getFluidStack("fluid.ethylbenzene", 1000) - }, - new FluidStack[]{ - MaterialUtils.getMaterial("Styrene").getFluid(1000), - Materials.Hydrogen.getGas(2000) - }, - null, - 30, - 30); - //Short-cut Styrene - CORE.RA.addMultiblockChemicalRecipe( - new ItemStack[]{CI.getNumberedCircuit(24)}, - new FluidStack[]{ - MaterialUtils.getMaterial("Ethylene").getGas(500), - MaterialUtils.getMaterial("Benzene").getFluid(500) - }, - new FluidStack[]{ - MaterialUtils.getMaterial("Styrene").getFluid(500), - Materials.Hydrogen.getGas(1000) - }, - null, - 240, - 120); - } - - private static void fissionFuelRecipes() { - try { - - } - catch (final NullPointerException e) { - Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); - } - } - - private static void assemblerRecipes() { - // ItemUtils.getSimpleStack(GregtechItemList.Casing_Vanadium_Redox.get(1) - addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateVanadium", 32), - ItemUtils.getItemStackOfAmountFromOreDict("frameGtVanadiumSteel", 8), - FluidUtils.getFluidStack("oxygen", 8000), - ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 0, 4), 16, 60); - addAR(ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 0, 2), - ItemUtils.getItemStackOfAmountFromOreDict("plateVanadiumGallium", 8), - FluidUtils.getFluidStack("molten.tantalum", 144 * 4), - ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 1, 8), 32, 120); - addAR(ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 1, 1), - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseLead", 4), FluidUtils.getFluidStack("oxygen", 16000), - ItemUtils.getSimpleStack(GregtechItemList.Casing_Vanadium_Redox.get(1), 1), 64, 240); - - //Tier 2-6 - ItemStack T1 = GregtechItemList.Casing_Vanadium_Redox.get(1); - ItemStack T2 = GregtechItemList.Casing_Vanadium_Redox_IV.get(1); - ItemStack T3 = GregtechItemList.Casing_Vanadium_Redox_LuV.get(1); - ItemStack T4 = GregtechItemList.Casing_Vanadium_Redox_ZPM.get(1); - ItemStack T5 = GregtechItemList.Casing_Vanadium_Redox_UV.get(1); - ItemStack T6 = GregtechItemList.Casing_Vanadium_Redox_MAX.get(1); - - addAR(T1, - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseTitanium", 4), - FluidUtils.getFluidStack("nitrogen", 16000), - T2, 120, 2000); - addAR(T2, - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseTungstenSteel", 4), - FluidUtils.getFluidStack("helium", 8000), - T3, 250, 8000); - addAR(T3, - ItemUtils.getItemStackOfAmountFromOreDict("plateAlloyIridium", 16), - FluidUtils.getFluidStack("argon", 4000), - T4, 500, 32000); - addAR(T4, - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseNaquadah", 4), - FluidUtils.getFluidStack("radon", 4000), - T5, 1000, 128000); - addAR(T5, - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseAmericium", 4), - FluidUtils.getFluidStack("krypton", 500), - T6, 2000, 512000); - - addAR(ItemUtils.getItemStackOfAmountFromOreDict( - "dustClay", 32), - GregtechItemList.Bomb_Cast_Mold.get(0), - FluidUtils.getWater(4000), - GregtechItemList.Bomb_Cast.get(4), - 30, 120); - addAR(ItemUtils.getSimpleStack(Items.redstone, 32), - ItemUtils.getSimpleStack(ModItems.itemRope, 16), - Materials.Glue.getFluid(500), - ItemUtils.getSimpleStack(ModItems.itemDetCable, 24), - 30, - 120); - - - - /*addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateIncoloy020", 16), - ItemUtils.getItemStackOfAmountFromOreDict("frameGtIncoloyMA956", 4), null, - GregtechItemList.Casing_Power_SubStation.get(4), 80, 120);*/ - - - - - - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - GregtechItemList.Casing_Multi_Use.get(1), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8), - CI.sensor_HV, - CI.emitter_HV, - CI.fieldGenerator_HV, - }, - null, - ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame), - 20*20, - 2048); - - - - - - - - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(ModItems.itemRope, 6)}, null, ItemUtils.getSimpleStack(ModBlocks.blockNet, 2), 1*20, 8); - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(CI.explosiveITNT, 2), ItemUtils.getSimpleStack(CI.explosiveTNT, 4), ELEMENT.getInstance().SULFUR.getDust(2), ELEMENT.getInstance().IRON.getFrameBox(1)}, null, ItemUtils.getSimpleStack(ModBlocks.blockMiningExplosive, 3), 5*20, 60); - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(Items.nether_star), ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 8), ItemUtils.getItemStackOfAmountFromOreDict("stickBlackSteel", 8)}, null, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard, 32), 30*20, 500); - - - ItemStack aFluidReg1 = ItemUtils.getValueOfItemList("FluidRegulator_LV", ItemList.Pump_LV).get(1); - ItemStack aFluidReg2 = ItemUtils.getValueOfItemList("FluidRegulator_MV", ItemList.Pump_MV).get(1); - ItemStack aFluidReg3 = ItemUtils.getValueOfItemList("FluidRegulator_HV", ItemList.Pump_HV).get(1); - ItemStack aFluidReg4 = ItemUtils.getValueOfItemList("FluidRegulator_EV", ItemList.Pump_EV).get(1); - - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - aFluidReg1, - CI.electricMotor_LV, - CI.getTieredComponent(OrePrefixes.bolt, 1, GTNH ? 8 : 4), - ItemUtils.getItemStackOfAmountFromOreDict("ringBrass", 1), - ItemUtils.getItemStackOfAmountFromOreDict("stickBrass", 1), - ItemUtils.getItemStackOfAmountFromOreDict("plateSteel", 2) - }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1), 10*20, 30); - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - aFluidReg2, - CI.electricMotor_MV, - CI.getTieredComponent(OrePrefixes.bolt, 2, GTNH ? 8 : 4), - ItemUtils.getItemStackOfAmountFromOreDict("ringInvar", 1), - ItemUtils.getItemStackOfAmountFromOreDict("stickInvar", 1), - ItemUtils.getItemStackOfAmountFromOreDict("plateAluminium", 2) - }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1), 10*20*2, 120); - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - aFluidReg3, - CI.electricMotor_HV, - CI.getTieredComponent(OrePrefixes.bolt, 3, GTNH ? 8 : 4), - ItemUtils.getItemStackOfAmountFromOreDict("ringChrome", 1), - ItemUtils.getItemStackOfAmountFromOreDict("stickChrome", 1), - ItemUtils.getItemStackOfAmountFromOreDict("plateStainlessSteel", 2) - }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), 10*20*3, 480); - - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - aFluidReg4, - CI.electricMotor_EV, - CI.getTieredComponent(OrePrefixes.bolt, 4, GTNH ? 8 : 4), - ItemUtils.getItemStackOfAmountFromOreDict("ringTitanium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("stickTitanium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 2) - }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), 10*20*4, 1960); - - GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1000, 1), 30, 30); - GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1001, 1), 120, 120); - GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1002, 1), 480, 480); - GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1003, 1), 1820, 1820); - - - - - - //Low tier Charge Packs - - final ItemStack[] aPackBatteries = new ItemStack[] { - ItemList.Battery_RE_LV_Lithium.get(4), - ItemList.Battery_RE_MV_Lithium.get(4), - ItemList.Battery_RE_HV_Lithium.get(4), - GregtechItemList.Battery_RE_EV_Lithium.get(4), - ItemList.Energy_LapotronicOrb.get(4), - }; - final ItemStack[] aPackPlates = new ItemStack[] { - CI.getPlate(1,8), - CI.getPlate(2,8), - CI.getPlate(3,8), - CI.getPlate(4,8), - CI.getPlate(5,8), - }; - final ItemStack[] aPackWire = new ItemStack[] { - CI.getTieredComponent(OrePrefixes.wireGt02, 1,6), - CI.getTieredComponent(OrePrefixes.wireGt04, 2,6), - CI.getTieredComponent(OrePrefixes.wireGt08, 3,6), - CI.getTieredComponent(OrePrefixes.wireGt12, 4,6), - CI.getTieredComponent(OrePrefixes.wireGt16, 5,6), - }; - final ItemStack[] aPackCircuit = new ItemStack[] { - CI.getTieredComponent(OrePrefixes.circuit, 1,4), - CI.getTieredComponent(OrePrefixes.circuit, 2,4), - CI.getTieredComponent(OrePrefixes.circuit, 3,4), - CI.getTieredComponent(OrePrefixes.circuit, 4,4), - CI.getTieredComponent(OrePrefixes.circuit, 5,4), - }; - final ItemStack[] aPackRing = new ItemStack[] { - CI.getTieredComponent(OrePrefixes.ring, 1,12), - CI.getTieredComponent(OrePrefixes.ring, 2,12), - CI.getTieredComponent(OrePrefixes.ring, 3,12), - CI.getTieredComponent(OrePrefixes.ring, 4,12), - CI.getTieredComponent(OrePrefixes.ring, 5,12), - }; - final ItemStack[] aPackOutput = new ItemStack[] { - ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_1), - ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_2), - ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_3), - ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_4), - ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_5) - }; - - for (int i = 1; i < 6; i++) { - - int aAS = i-1; - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - aPackPlates[aAS], - aPackRing[aAS], - aPackWire[aAS], - aPackCircuit[aAS], - aPackBatteries[aAS], - CI.getSensor(i, GTNH ? 4 : 2), - }, - CI.getTieredFluid(i, (144 * (GTNH ? 4 : 2))), - aPackOutput[aAS], - 30 * 20 * i, - (int) GT_Values.V[i]); - } - - - if (!GTNH) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32); - - } else { - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32); - } - } - - - if (LoadedMods.Baubles) { - - - - // Turbine Housing Research Page - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - ItemUtils.getGregtechCircuit(17), - ItemUtils.getItemStackOfAmountFromOreDict("plateRefinedTrinium", GTNH ? 64 : 32), - CI.getSensor(6, GTNH ? 6 : 3), - CI.getBolt(7, GTNH ? 64 : 32), - ItemUtils.getItemStackOfAmountFromOreDict("wireFinePlatinum", GTNH ? 64 : 32), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(7), GTNH ? 12 : 6) - }, - CI.getAlternativeTieredFluid(7, 144 * 32), - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_8_TURBINE_AUTOMATION, 1), - 20 * 60 * 5, - (int) GT_Values.V[6]); - - // Cloaking Device Research Page - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - ItemUtils.getGregtechCircuit(17), - ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR, 4), - CI.getFieldGenerator(6, GTNH ? 16 : 8), - ItemUtils.getItemStackOfAmountFromOreDict("wireFinePalladium", GTNH ? 32 : 16), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), GTNH ? 12 : 6) - }, - CI.getAlternativeTieredFluid(7, 144 * 32), - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_9_CLOAKING, 1), - 20 * 60 * 10, - (int) GT_Values.V[7]); - - - // Supreme Pizza Gloves - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - ItemUtils.getGregtechCircuit(19), - ItemUtils.getSimpleStack(ModItems.itemRope, GTNH ? 32 : 16), - ItemUtils.getItemStackOfAmountFromOreDict("gearGtSmallWroughtIron", GTNH ? 8 : 4), - ItemUtils.getItemStackOfAmountFromOreDict("wireFineCopper", GTNH ? 32 : 16), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(1), GTNH ? 2 : 1) - }, - FluidUtils.getFluidStack("molten.rubber", 2000), - ItemUtils.getSimpleStack(ModItems.itemPersonalFireProofDevice), - 20 * 60 * 5, - 30); - } - - - - - - } - - private static boolean addAR(final ItemStack inputA, final ItemStack inputB, final FluidStack inputFluidA, - final ItemStack outputA, final int seconds, final int voltage) { - // return GT_Values.RA.addAssemblerRecipe(inputA, inputB, outputA, - // seconds*20, voltage); - return GT_Values.RA.addAssemblerRecipe(inputA, inputB, inputFluidA, outputA, seconds * 20, voltage); - } - - private static void distilleryRecipes() { - Logger.INFO("Registering Distillery/Distillation Tower Recipes."); - GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), - FluidUtils.getFluidStack("air", 1000), FluidUtils.getFluidStack("helium", 1), 400, 30, false); - GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("air", 20000), - FluidUtils.getFluidStackArray("helium", 25), ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob, 1), - 200, 60); - - // Apatite Distillation - /* - * so if you dissolve aparite in sulphuric acid you'll get a mixture of - * SO2, H2O, HF and HCl - */ - final FluidStack[] apatiteOutput = { FluidUtils.getFluidStack("sulfurousacid", 3800), - FluidUtils.getFluidStack("hydrogenchloride", 1000), FluidUtils.getFluidStack("hydrofluoricacid", 400) }; - GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfuricapatite", 5200), apatiteOutput, null, - 45 * 20, 256); - - final FluidStack[] sulfurousacidOutput = { FluidUtils.getFluidStack("sulfurdioxide", 500), - FluidUtils.getFluidStack("water", 500) }; - GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfurousacid", 1000), sulfurousacidOutput, - null, 10 * 20, 60); - - final FluidStack[] sulfurdioxideOutput = { FluidUtils.getFluidStack("oxygen", 144 * 2) }; - GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfurdioxide", 144 * 3), sulfurdioxideOutput, - ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), 5 * 20, 30); - } - - private static void addFuels() { - Logger.INFO("Registering New Fuels."); - - if (!GTNH) { - GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketFire_water", 0, 1), null, 120, 0); - GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketRocket_fuel", 0, 1), null, 112, 0); - GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketHootch", 0, 1), null, 36, 0); - } - - HotFuel.addNewHotFuel(GT_ModHandler.getLava(83), GT_Values.NF, - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("nuggetCopper", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetTin", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetGold", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetSilver", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetTantalum", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTungstate", 1), - ItemUtils.getSimpleStack(Blocks.obsidian) }, - new int[] { 2000, 1000, 250, 250, 250, 250, 500 }, 0); - - HotFuel.addNewHotFuel(FluidUtils.getFluidStack("ic2pahoehoelava", 83), GT_Values.NF, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("nuggetBronze", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetElectrum", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetTantalum", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTungstate", 1), - ItemUtils.getSimpleStack(Blocks.obsidian) }, - new int[] { 750, 250, 250, 250, 1850 }, 0); - - /* - * HotFuel.addNewHotFuel( FluidUtils.getFluidStack("ic2hotcoolant", - * 100), GT_Values.NF, new ItemStack[]{}, new int[]{}, 0); - */ - - ThermalFuel.addSteamTurbineFuel(FluidUtils.getFluidStack("steam", 1024)); - - // CORE.RA.addFuel(UtilsItems.simpleMetaStack("EnderIO:bucketRocket_fuel", - // 0, 1), null, 112, 0); - GT_Values.RA.addFuel(ItemUtils.getSimpleStack(Items.lava_bucket), null, 32, 2); - GT_Values.RA.addFuel(ItemUtils.getIC2Cell(2), null, 32, 2); - GT_Values.RA.addFuel(ItemUtils.getIC2Cell(11), null, 24, 2); - // System.exit(1); - } - - private static void extractorRecipes() { - Logger.INFO("Registering Extractor Recipes."); - GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Sodium.get(1L, new Object[0]), - ItemList.Battery_Hull_HV.get(4L, new Object[0])); - GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Cadmium.get(1L, new Object[0]), - ItemList.Battery_Hull_HV.get(4L, new Object[0])); - GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Lithium.get(1L, new Object[0]), - ItemList.Battery_Hull_HV.get(4L, new Object[0])); - } - - private static void fluidExtractorRecipes() { - - } - - private static void chemicalBathRecipes() { - - GT_Values.RA.addChemicalBathRecipe( - FLUORIDES.FLUORITE.getCrushed(2), - FluidUtils.getFluidStack("hydrogen", 2000), - FLUORIDES.FLUORITE.getCrushedPurified(8), - FLUORIDES.FLUORITE.getDustImpure(4), - FLUORIDES.FLUORITE.getDustPurified(2), - new int[] { 10000, 5000, 1000 }, - 30 * 20, - 240); - - } - - private static void centrifugeRecipes() { - - } - - private static void mixerRecipes() { - - GT_Values.RA.addMixerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), - null, - null, - null, - FluidUtils.getFluidStack("oxygen", 2000), - FluidUtils.getFluidStack("sulfurdioxide", 3000), - null, - 600, - 60); - - } - - private static void chemicalReactorRecipes() { - - //Bombs - GT_Values.RA.addChemicalRecipe( - ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4), - ItemUtils.getSimpleStack(RocketFuels.Ammonium_Nitrate_Dust, 8), - Materials.Fuel.getFluid(1000), - null, - ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), - 300 * 20); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), - ItemUtils.getSimpleStack(ModItems.itemDetCable, 4), - FluidUtils.getFluidStack(RocketFuels.Kerosene, 100), - null, - ItemUtils.getSimpleStack(ModItems.itemBomb, 4), - 10 * 20); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 16), - null, - FluidUtils.getFluidStack("sulfuricacid", 144 * 32), - FluidUtils.getFluidStack("sulfuricapatite", 144 * 8), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 1), - 20 * 20); - - ItemStack temp_GT5u_SA = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellHydrofluoricAcid_GT5U", 5); - if (temp_GT5u_SA != null) { - //Refine GT HF into GT++ HF - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2), - temp_GT5u_SA, - null, // Fluid Input - FluidUtils.getFluidStack("hydrofluoricacid", 6000), // Fluid Output - CI.emptyCells(7), - 2 * 20); - } - - } - - private static void blastFurnaceRecipes() { - - //public boolean addBlastRecipe( - //ItemStack aInput1, ItemStack aInput2, - //FluidStack aFluidInput, FluidStack aFluidOutput, - //ItemStack aOutput1, ItemStack aOutput2, - //int aDuration, int aEUt, int aLevel) - - - //Synthetic Graphite - GT_Values.RA.addBlastRecipe( - CI.getNumberedCircuit(22), - ALLOY.SILICON_CARBIDE.getDust(16), - ELEMENT.getInstance().NITROGEN.getFluidStack(4000), - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustGraphite", 8), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSilicon", 8), - 60 * 20, - MaterialUtils.getVoltageForTier(GTNH ? 5 : 4), - 4500); - - //Bomb Casings - GT_Values.RA.addBlastRecipe( - GregtechItemList.Bomb_Cast.get(4), - ALLOY.STEEL.getDust(16), - ELEMENT.getInstance().OXYGEN.getFluidStack(2000), - GT_Values.NF, - GregtechItemList.Bomb_Cast_Molten.get(4), - null, - 4 * 60 * 20, - MaterialUtils.getVoltageForTier(GTNH ? 3 : 2), - 2800); - - //Krypton Processing - if (ModItems.itemHotTitaniumIngot != null) { - GT_Values.RA.addBlastRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("ingotTitanium", 1), - CI.getNumberedCircuit(16), - GT_Values.NF, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("ingotHotTitanium", 1), - null, - 10 * 20, - 500, - Materials.Titanium.mBlastFurnaceTemp); - } - - } - - private static void autoclaveRecipes() { - - } - - private static void benderRecipes() { - - if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation) { - GT_Values.RA.addBenderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("ingotVanadium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("plateVanadium", 1), 8, 16); - } - } - - private static void compressorRecipes() { - GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustSmallClay", 4), - ItemUtils.getItemStackOfAmountFromOreDict("plateClay", 1)); - GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustSmallMeatRaw", 4), - ItemUtils.getItemStackOfAmountFromOreDict("plateMeatRaw", 1)); - GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9), - ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1)); - - CORE.RA.addCompressorRecipe(ItemList.FusionComputer_UV.get(9), GregtechItemList.Compressed_Fusion_Reactor.get(1), (int) GT_Values.V[7], (int) GT_Values.V[8]); - } - - private static void macerationRecipes() { - - GT_ModHandler.addPulverisationRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9)); - - GT_ModHandler.addPulverisationRecipe(GregtechItemList.Bomb_Cast_Broken.get(1), - ItemUtils.getItemStackOfAmountFromOreDict("dustClay", 3)); - - if (ItemUtils.simpleMetaStack("chisel:limestone", 0, 1) != null) { - GT_ModHandler.addPulverisationRecipe(ItemUtils.getItemStackOfAmountFromOreDict("limestone", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCalcite", 4)); - } - - } - - private static void cyclotronRecipes() { - - // Polonium - CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.bismuth", 1), - new ItemStack[] { GregtechItemList.Pellet_RTG_PO210.get(1) }, null, new int[] { 100 }, 20 * 300 * 100, 2040 * 4, - 500 * 20); - - // Americium - CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.americium", 1), - new ItemStack[] { GregtechItemList.Pellet_RTG_AM241.get(4) }, null, new int[] { 2500 }, 20 * 300 * 100, 1020 * 4, - 500 * 20); //PO Special Value - - // Strontium u235 - CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium235", 10), - new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 570 }, 20 * 300 * 100, 1020 * 4, - 500 * 20); //PO Special Value - - // Strontium u233 - CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium233", 10), - new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 660 }, 20 * 300 * 100, 1020 * 4, - 500 * 20); //PO Special Value - - // Strontium pu239 - CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium239", 10), - new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 220 }, 20 * 300 * 100, 1020 * 4, - 500 * 20); //PO Special Value - - // Plutonium - CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium238", 1), - new ItemStack[] { GregtechItemList.Pellet_RTG_PU238.get(2) }, null, new int[] { 780 }, 20 * 300 * 100, 1020 * 4, - 500 * 20); //PO Special Value - - // Neptunium - CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400), - new ItemStack[] {ItemUtils.getSimpleStack(ModItems.dustNeptunium238)}, null, new int[] { 500 }, 20 * 5, 500 * 4, - 500 * 20); //PO Special Value - - - /** - * Particle Science - */ - - - // Quark Smash - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(3), - FluidUtils.getFluidStack("plasma.hydrogen", 100), - new ItemStack[] { - Particle.getBaseParticle(Particle.UP), - Particle.getBaseParticle(Particle.DOWN), - Particle.getBaseParticle(Particle.CHARM), - Particle.getBaseParticle(Particle.STRANGE), - Particle.getBaseParticle(Particle.TOP), - Particle.getBaseParticle(Particle.BOTTOM), - }, - null, - new int[] { 50, 50, 50, 50, 50, 50 }, - 20 * 300 * 9, - (int) MaterialUtils.getVoltageForTier(7), - 750 * 20); - - // Lepton Smash - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(6), - FluidUtils.getFluidStack("plasma.helium", 1500), - new ItemStack[] { - Particle.getBaseParticle(Particle.ELECTRON), - Particle.getBaseParticle(Particle.MUON), - Particle.getBaseParticle(Particle.TAU), - Particle.getBaseParticle(Particle.ELECTRON_NEUTRINO), - Particle.getBaseParticle(Particle.MUON_NEUTRINO), - Particle.getBaseParticle(Particle.TAU_NEUTRINO), - }, - null, - new int[] { 600, 40, 20, 15, 10, 5 }, - 20 * 300 * 8, - (int) MaterialUtils.getVoltageForTier(7), - 750 * 20); - - // Boson Smash - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(9), - FluidUtils.getFluidStack("plasma.helium", 1500), - new ItemStack[] { - Particle.getBaseParticle(Particle.GLUON), - Particle.getBaseParticle(Particle.PHOTON), - Particle.getBaseParticle(Particle.Z_BOSON), - Particle.getBaseParticle(Particle.W_BOSON), - Particle.getBaseParticle(Particle.HIGGS_BOSON), - }, - null, - new int[] { 160, 260, 150, 150, 1 }, - 20 * 300 * 6, - (int) MaterialUtils.getVoltageForTier(7), - 750 * 20); - - - // Mixed Smash 1 - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(12), - FluidUtils.getFluidStack("plasma.beryllium", 2500), - new ItemStack[] { - Particle.getBaseParticle(Particle.GRAVITON), - Particle.getBaseParticle(Particle.ETA_MESON), - Particle.getBaseParticle(Particle.PION), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.NEUTRON), - Particle.getBaseParticle(Particle.LAMBDA), - Particle.getBaseParticle(Particle.OMEGA), - Particle.getBaseParticle(Particle.HIGGS_BOSON), - }, - null, - new int[] { 10, 20, 20, 10, 10, 5, 5, 2 }, - 17 * 247 * 32, - (int) MaterialUtils.getVoltageForTier(8), - 750 * 20); - - // Graviton Smash - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(15), - FluidUtils.getFluidStack("plasma.hydrogen", GTNH ? 50 : 10), - new ItemStack[] { - Particle.getBaseParticle(Particle.GRAVITON), - Particle.getBaseParticle(Particle.UNKNOWN) - }, - null, - new int[] {15, 100}, - 20 * (GTNH ? 90 : 30), - (int) MaterialUtils.getVoltageForTier(6), - 1000 * 20); - - FluidStack aPlasma = Materials.Duranium.getMolten(GTNH ? 40 : 10); - FluidStack aPlasma_NULL = Materials._NULL.getPlasma(1); - - if (aPlasma == null || aPlasma.isFluidEqual(aPlasma_NULL)) { - aPlasma = Materials.Americium.getMolten(GTNH ? 20 : 5); - } - - // Quantum Anomaly - CORE.RA.addCyclotronRecipe( - new ItemStack[] { - CI.getNumberedCircuit(24), - Particle.getBaseParticle(Particle.UNKNOWN), - }, - aPlasma, - new ItemStack[] { - GregtechItemList.Laser_Lens_Special.get(1) - }, - null, - new int[] {100}, - 20 * (GTNH ? 300 : 60), - (int) MaterialUtils.getVoltageForTier(6), - 1000 * 20); - - /* - * Ions - */ - - int IonCount = 2; - int tenCountA = (GTNH ? 2 : 1); - int tenCountB = 0; - for (String y : IonParticles.MetaToNameMap.values()) { - if (y.toLowerCase().contains("hydrogen")) { - continue; - } - FluidStack aPlasma2 = FluidUtils.getFluidStack("plasma."+y.toLowerCase(), 2); - Materials aTestMat = MaterialUtils.getMaterial(y); - FluidStack aPlasma3 = aTestMat != null ? aTestMat.getPlasma(2) : aPlasma2; - - // Ionize Plasma - if ((aPlasma2 != null && !aPlasma2.isFluidEqual(aPlasma_NULL)) || (aPlasma3 != null && !aPlasma3.isFluidEqual(aPlasma_NULL))) { - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(1+(tenCountA-1)), - aPlasma2 != null ? aPlasma2 : aPlasma3, - new ItemStack[] { - Particle.getIon(y, 1), - Particle.getIon(y, 2), - Particle.getIon(y, 3), - Particle.getIon(y, -1), - Particle.getIon(y, -2), - Particle.getIon(y, -3), - Particle.getIon(y, 1), - Particle.getIon(y, 2), - Particle.getIon(y, -1), - }, - null, - new int[] { 275, 250, 225, 275, 250, 225, 275, 250, 275}, - 20 * 20 * (IonCount++) * tenCountA, - (int) MaterialUtils.getVoltageForTier(7), - 1500 * 20 * tenCountA); - } - else { - Logger.INFO("Plasma for "+y+" does not exist, please report this to Alkalus."); - } - - if (tenCountB == 12) { - tenCountB = 0; - tenCountA++; - } - else { - tenCountB++; - } - } - - // Generate Hydrogen Ion Recipe - CORE.RA.addCyclotronRecipe( - CI.getNumberedCircuit(24), - FluidUtils.getWildcardFluidStack("hydrogen", 1000), - new ItemStack[] { - Particle.getIon("Hydrogen", 1), - Particle.getIon("Hydrogen", 2), - Particle.getIon("Hydrogen", 3), - Particle.getIon("Hydrogen", 1), - Particle.getIon("Hydrogen", 2), - Particle.getIon("Hydrogen", 3), - Particle.getIon("Hydrogen", -1), - Particle.getIon("Hydrogen", -2), - Particle.getIon("Hydrogen", -3) - }, - null, - new int[] { 125, 125, 125, 125, 125, 125, 125, 125, 125 }, - 20 * 20, - (int) MaterialUtils.getVoltageForTier(6), - 15000); - - // Generate Hydrogen Plasma Recipe - CORE.RA.addCyclotronRecipe( - new ItemStack[] { - Particle.getIon("Hydrogen", 0), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1) - }, - null, - new ItemStack[] { - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.NEUTRON), - Particle.getBaseParticle(Particle.ELECTRON), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - CI.emptyCells(1) - }, - FluidUtils.getFluidStack("plasma.hydrogen", 1), - new int[] { 250, 250, 250, 500, 500, 500, 10000 }, - 20 * 60 * 2, - (int) MaterialUtils.getVoltageForTier(6), - 750 * 20); - - - // Generate Protons Easily - CORE.RA.addCyclotronRecipe( - new ItemStack[] { - CI.getNumberedCircuit(20), - Particle.getIon("Hydrogen", 0) - }, - FluidUtils.getWildcardFluidStack("hydrogen", 100), - new ItemStack[] { - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - }, - null, - new int[] { 750, 750, 750, 750, 750, 750, 750, 750, 750 }, - 20 * 20, - (int) MaterialUtils.getVoltageForTier(6), - 15000); - - CORE.RA.addCyclotronRecipe( - new ItemStack[] { - CI.getNumberedCircuit(22), - Particle.getBaseParticle(Particle.UNKNOWN), - }, - FluidUtils.getWildcardFluidStack("hydrogen", 100), - new ItemStack[] { - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - Particle.getBaseParticle(Particle.PROTON), - }, - null, - new int[] { 375, 375, 375, 375, 375, 375, 375, 375, 375 }, - 20 * 20, - (int) MaterialUtils.getVoltageForTier(6), - 15000); - - - //Create Strange Dust - CORE.RA.addCyclotronRecipe( - new ItemStack[] { - ELEMENT.getInstance().PLUTONIUM238.getDust(1), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), - }, - FluidUtils.getFluidStack(FluidUtils.getWildcardFluidStack("ender", 1000), 1000), - new ItemStack[] { - ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT.getDust(1) - }, - null, - new int[] { 2500 }, - 20 * 60 * 15, - (int) MaterialUtils.getVoltageForTier(7), - 15000); - - - - - - } - - private static void sifterRecipes() { - - } - - private static void electroMagneticSeperatorRecipes() { - - if (!GTNH) { - // Trinium - GT_Values.RA.addElectromagneticSeparatorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedNaquadah", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustNaquadah", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallNaquadahEnriched", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 }, - 20 * 20, 24); - - // Trinium - GT_Values.RA.addElectromagneticSeparatorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIridium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallOsmium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 }, - 20 * 20, 24); - - // Trinium - GT_Values.RA.addElectromagneticSeparatorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedWulfenite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustWulfenite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 3000, 3000 }, - 20 * 20, 24); - } - - } - - private static void advancedMixerRecipes() { - // HgBa2Ca2Cu3O8 - /*CORE.RA.addMixerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellMercury", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustBarium", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustCalcium", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 3), - FluidUtils.getFluidStack("oxygen", 8000), - null, CI.emptyCells(1), ALLOY.HG1223.getDust(16), null, null, - 30 * 20, 500); */ - - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java deleted file mode 100644 index 08d8dda039..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java +++ /dev/null @@ -1,509 +0,0 @@ -package gtPlusPlus.core.recipe; - -import static gtPlusPlus.core.lib.CORE.GTNH; -import static gtPlusPlus.core.recipe.common.CI.bitsd; -import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack; -import static gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits.generatePipeRecipes; -import static gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits.generateWireRecipes; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.*; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -public class RECIPES_General { - - static final ItemStack NULL = null; - static ItemStack RECIPE_Paper; - static ItemStack RECIPE_Dirt; - static ItemStack RECIPE_Snow; - static ItemStack RECIPE_Obsidian; - static String RECIPE_LapisDust = "dustLazurite"; - static ItemStack OUTPUT_Blueprint; - static ItemStack RECIPE_CraftingTable; - static String RECIPE_BronzePlate = "plateBronze"; - static ItemStack RECIPE_BasicCasingIC2; - static ItemStack OUTPUT_Workbench_Bronze; - static ItemStack RECIPE_HydrogenDust; - - public static void loadRecipes(){ - if (LoadedMods.Gregtech){ - RECIPE_Paper = ItemUtils.getSimpleStack(Items.paper); - RECIPE_Dirt = ItemUtils.getSimpleStack(Blocks.dirt); - RECIPE_Snow = ItemUtils.getSimpleStack(Blocks.snow); - RECIPE_Obsidian = ItemUtils.getSimpleStack(Blocks.obsidian); - RECIPE_CraftingTable = ItemUtils.getSimpleStack(Blocks.crafting_table); - RECIPE_HydrogenDust = ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob); - RECIPE_BasicCasingIC2 = ItemUtils.getItemStackFromFQRN("IC2:blockMachine", 1); - OUTPUT_Workbench_Bronze = ItemUtils.getSimpleStack(ModBlocks.blockWorkbench); - OUTPUT_Blueprint = ItemUtils.getSimpleStack(ModItems.itemBlueprintBase); - run(); - addCompressedObsidian(); - migratedRecipes(); - } - } - - private static void run() { - //Workbench Blueprint - /*RecipeUtils.addShapedRecipe( - RECIPE_Paper, RECIPE_LapisDust, NULL, - RECIPE_Paper, RECIPE_LapisDust, NULL, - RECIPE_LapisDust, RECIPE_LapisDust, NULL, - OUTPUT_Blueprint);*/ - - //Bronze Workbench - /*RecipeUtils.addShapedRecipe( - RECIPE_BronzePlate, RECIPE_CraftingTable, RECIPE_BronzePlate, - RECIPE_BronzePlate, RECIPE_BasicCasingIC2, RECIPE_BronzePlate, - RECIPE_BronzePlate, RECIPE_BronzePlate, RECIPE_BronzePlate, - OUTPUT_Workbench_Bronze);*/ - - //Generates recipes for the Dull shard when TC is not installed. - if (!LoadedMods.Thaumcraft) { - //Dull Shard to Aer - RecipeUtils.addShapedRecipe( - RECIPE_HydrogenDust, RECIPE_HydrogenDust, RECIPE_HydrogenDust, - RECIPE_HydrogenDust, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_HydrogenDust, - RECIPE_HydrogenDust, RECIPE_HydrogenDust, RECIPE_HydrogenDust, - ItemUtils.getSimpleStack(ModItems.shardAer)); - //Dull Shard to Ignis - RecipeUtils.addShapedRecipe( - RECIPE_Obsidian, RECIPE_Obsidian, RECIPE_Obsidian, - RECIPE_Obsidian, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_Obsidian, - RECIPE_Obsidian, RECIPE_Obsidian, RECIPE_Obsidian, - ItemUtils.getSimpleStack(ModItems.shardIgnis)); - //Dull Shard to Terra - RecipeUtils.addShapedRecipe( - RECIPE_Dirt, RECIPE_Dirt, RECIPE_Dirt, - RECIPE_Dirt, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_Dirt, - RECIPE_Dirt, RECIPE_Dirt, RECIPE_Dirt, - ItemUtils.getSimpleStack(ModItems.shardTerra)); - //Dull Shard to Aqua - RecipeUtils.addShapedRecipe( - RECIPE_LapisDust, RECIPE_LapisDust, RECIPE_LapisDust, - RECIPE_LapisDust, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_LapisDust, - RECIPE_LapisDust, RECIPE_LapisDust, RECIPE_LapisDust, - ItemUtils.getSimpleStack(ModItems.shardAqua)); - - GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardAer), ItemUtils.getSimpleStack(ModItems.dustAer, 2)); - GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardIgnis), ItemUtils.getSimpleStack(ModItems.dustIgnis, 2)); - GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardTerra), ItemUtils.getSimpleStack(ModItems.dustTerra, 2)); - GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardAqua), ItemUtils.getSimpleStack(ModItems.dustAqua, 2)); - - } - - //Rainforest oak Sapling - if (RecipeUtils.addShapedRecipe( - "stickWood", "stickWood", "stickWood", - "stickWood", "treeSapling", "stickWood", - "stickWood", "dustBone", "stickWood", - ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest))){ - Logger.INFO("Added a recipe for Rainforest oak Saplings."); - } - - //Iron bars - final ItemStack ironBars; - if (CORE.GTNH) { - ironBars = ItemUtils.getItemStackFromFQRN("dreamcraft:item.SteelBars", 1); - } else { - ironBars = ItemUtils.getItemStackFromFQRN("minecraft:iron_bars", 1); - } - - //Fish Trap - if (RecipeUtils.addShapedRecipe( - ironBars, ironBars, ironBars, - ironBars, "frameGtWroughtIron", ironBars, - ironBars, ironBars, ironBars, - ItemUtils.getSimpleStack(ModBlocks.blockFishTrap))){ - Logger.INFO("Added a recipe for the Fish Trap."); - } - - //Small Gear Extruder Shape - if (!CORE.GTNH) { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_SmallGear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Gear, Character.valueOf('X'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel)}); - - - String[] ironTypes = {"", "Wrought", "Pig", "Any"}; - for (int y=0;y= 2800) ? 64 : 16; - generatePipeRecipes(e.mDefaultLocalName, e.getMass(), tVoltageMultiplier); - } - - Materials[] h = new Materials[] { - Materials.Europium, - Materials.Tungsten, - Materials.DarkSteel, - Materials.Clay, - Materials.Lead, - - }; - - for (Materials e : h) { - if (e == Materials.DarkSteel) { - if (!LoadedMods.EnderIO) { - continue; - } - } - int tVoltageMultiplier = (e.mBlastFurnaceTemp >= 2800) ? 64 : 16; - generatePipeRecipes(e.mDefaultLocalName, e.getMass(), tVoltageMultiplier); - } - - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[4], "rotorGtStainlessSteel", CI.component_Plate[4], - CI.getTieredCircuitOreDictName(3), CI.machineHull_HV, CI.getTieredCircuitOreDictName(3), - CI.component_Plate[4], CI.electricPump_HV, CI.component_Plate[4], - GregtechItemList.Hatch_Air_Intake.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[6], ALLOY.MARAGING250.getGear(1), CI.component_Plate[6], - CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_AdvancedVacuum.get(1), - CI.getTieredCircuitOreDictName(4), CI.component_Plate[5], ItemList.Hatch_Input_IV.get(1), - CI.component_Plate[5], GregtechItemList.Hatch_Input_Cryotheum.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[5], ALLOY.MARAGING300.getGear(1), CI.component_Plate[5], - CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_Adv_BlastFurnace.get(1), - CI.getTieredCircuitOreDictName(4), CI.component_Plate[6], ItemList.Hatch_Input_IV.get(1), - CI.component_Plate[6], GregtechItemList.Hatch_Input_Pyrotheum.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[8], ALLOY.PIKYONIUM.getGear(1), CI.component_Plate[9], - CI.getTieredCircuitOreDictName(7), GregtechItemList.Casing_Naq_Reactor_A.get(1), - CI.getTieredCircuitOreDictName(7), CI.component_Plate[9], ItemList.Hatch_Input_ZPM.get(1), - CI.component_Plate[8], GregtechItemList.Hatch_Input_Naquadah.get(1L, new Object[0])); - - - if (PollutionUtils.isPollutionEnabled()) { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_LV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_MV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_HV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_HV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_HV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_EV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_EV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_EV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_IV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_IV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_IV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LuV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LuV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_LuV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_ZPM.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_ZPM.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_ZPM.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_UV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_UV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_UV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MAX.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MAX.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_MAX.get(1) }); - } - - - - - - - - - - - } - - - - - - - - - -} - - diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java deleted file mode 100644 index 76182e61d9..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java +++ /dev/null @@ -1,135 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.*; -import gregtech.api.interfaces.IOreRecipeRegistrator; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class RECIPES_LaserEngraver implements IOreRecipeRegistrator { - public RECIPES_LaserEngraver() { - OrePrefixes.crafting.add(this); - } - - @Override - public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { - if (aOreDictName.equals(OreDictNames.craftingLensBlue.toString())) { - - if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilYttriumBariumCuprate", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.YttriumBariumCuprate, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); - } - else { - Logger.INFO("foilYttriumBariumCuprate does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilVanadiumGallium", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.VanadiumGallium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); - } - else { - Logger.INFO("foilVanadiumGallium does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilNiobiumTitanium", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); - } - else { - Logger.INFO("foilNiobiumTitanium does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - } - - - } else if (aOreDictName.equals(OreDictNames.craftingLensYellow.toString())) { - if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilOsmium", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_LuV.get(1L, new Object[0]), 64, 1024); - } - else { - Logger.INFO("foilOsmium does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - } - - } else if (aOreDictName.equals(OreDictNames.craftingLensCyan.toString())) { - } else if (aOreDictName.equals(OreDictNames.craftingLensRed.toString())) { - } else if (aOreDictName.equals(OreDictNames.craftingLensGreen.toString())) { - if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilNaquadah", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadah, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(1L, new Object[0]), 64, 2000); - } - else { - Logger.INFO("foilNaquadah does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - } - } else if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) { - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lithium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getItemStackOfAmountFromOreDict("plateDoubleLithium7", 1), 4*60*20, 2000); - } - else { - Logger.INFO("plateLithium does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLithium", 1) != null){ - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 3L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 1), 2*60*20, 2000); - } - else { - Logger.INFO("dustLithium does not exist within Gregtech, please report this issue to Blood-asp on github."); - Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); - } - - } - - else if (aOreDictName.equals(OreDictNames.craftingLensLime.toString())) { - //Coil Wires - ItemStack coilWire1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire", "coilWire1", 0, 1); - ItemStack coilWire2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:1", "coilWire2", 1, 1); - ItemStack coilWire3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:2", "coilWire3", 2, 1); - ItemStack coilWire4 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:3", "coilWire4", 3, 1); - - //Simple Life - String wire = "wireGt02"; - - //Wires to Laser - ItemStack wireT1a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Aluminium", 1); - ItemStack wireT1b = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Nichrome", 1); - ItemStack wireT2a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Osmium", 1); - ItemStack wireT2b = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Platinum", 1); - ItemStack wireT3a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"VanadiumGallium", 1); - ItemStack wireT3b = ItemUtils.getItemStackOfAmountFromOreDict(wire+"YttriumBariumCuprate", 1); - ItemStack wireT3c = ItemUtils.getItemStackOfAmountFromOreDict(wire+"NiobiumTitanium", 1); - ItemStack wireT4a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Naquadah", 1); - - //T1 - GT_Values.RA.addLaserEngraverRecipe(wireT1a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire1, 10*20, 500); - GT_Values.RA.addLaserEngraverRecipe(wireT1b, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire1, 10*20, 500); - //T2 - GT_Values.RA.addLaserEngraverRecipe(wireT2a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire2, 20*20, 2000); - GT_Values.RA.addLaserEngraverRecipe(wireT2b, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire2, 20*20, 2000); - //T3 - GT_Values.RA.addLaserEngraverRecipe(wireT3a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire3, 30*20, 8000); - GT_Values.RA.addLaserEngraverRecipe(wireT3b, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire3, 30*20, 8000); - GT_Values.RA.addLaserEngraverRecipe(wireT3c, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire3, 30*20, 8000); - //T4 - GT_Values.RA.addLaserEngraverRecipe(wireT4a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire4, 40*20, 32000); - - - } - - else if (aOreDictName.equals(OreDictNames.craftingLensOrange.toString())) { - GT_Values.RA.addLaserEngraverRecipe(ItemUtils.getSimpleStack(ModItems.itemAlkalusDisk), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getSimpleStack(Dimension_Everglades.portalItem), 360*60*20, 4096); - } - - - - } -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java deleted file mode 100644 index 0d377f74de..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.core.recipe; - -public class RECIPES_MTWRAPPER { - - public static int MT_RECIPES_LOADED = 0; - public static int MT_RECIPES_FAILED = 0; - - public static void run(){ - - } - - public static void addShaped(final Object item_Output, - final Object item_1, final Object item_2, final Object item_3, - final Object item_4, final Object item_5, final Object item_6, - final Object item_7, final Object item_8, final Object item_9){ - - - } - - public static void addShapeless(){ - - } - - - -} - diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java deleted file mode 100644 index 71b4c4ef48..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java +++ /dev/null @@ -1,410 +0,0 @@ -package gtPlusPlus.core.recipe; - -import gregtech.api.enums.*; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class RECIPES_MachineComponents { - - //Wire - public static String wireTier0 = "wireGt01Lead"; - public static String wireTier1 = "wireGt01RedAlloy"; - public static String wireTier6 = "wireGt08NiobiumTitanium"; - public static String wireTier7 = "wireGt08Osmium"; - public static String wireTier8 = "wireGt08Naquadah"; - public static String wireTier9 = "wireGt08Superconductor"; - public static String wireTier10 = "wireGt16Superconductor"; - - //Cable - public static String cableTier0 = "cableGt01Lead"; - public static String cableTier1 = "cableGt01RedAlloy"; - public static String cableTier6 = "cableGt04Tungsten"; - public static String cableTier7 = "cableGt04NiobiumTitanium"; - public static String cableTier8 = "cableGt04Osmium"; - public static String cableTier9 = "cableGt04Naquadah"; - public static String cableTier10 = "wireGt08Superconductor"; - - //Plates - public static String plateTier0 = "plateWroughtIron"; - public static String plateTier7 = "plateChrome"; - public static String plateTier8 = "plateIridium"; - public static String plateTier9 = "plateOsmium"; - public static String plateTier10 = "plateNeutronium"; - - //rods - public static String rodTier0 = "stickWroughtIron"; - public static String rodTier1 = "stickPotin"; - public static String rodTier2 = "stickIronMagnetic"; - public static String rodTier7a = "stickChrome"; - public static String rodTier8a = "stickIridium"; - public static String rodTier9a = "stickOsmium"; - public static String rodTier10a = "stickNeutronium"; - public static String rodTier7b = "stickPlatinum"; - public static String rodTier8b = "stickChrome"; - public static String rodTier9b = "stickIridium"; - public static String rodTier10b = "stickOsmium"; - public static String rodTier7c = "stickTitanium"; - public static String rodTier8c = "stickTungstenSteel"; - public static String rodTier9c = "stickNaquadah"; - public static String rodTier10c = "stickOsmium"; - - //Screws - public static String screwTier0 = "screwPotin"; - public static String screwTier7 = "screwChrome"; - public static String screwTier8 = "screwIridium"; - public static String screwTier9 = "screwOsmium"; - public static String screwTier10 = "screwNeutronium"; - - //Rotors - public static String rotorTier0 = "rotorPotin"; - public static String rotorTier7 = "rotorChrome"; - public static String rotorTier8 = "rotorIridium"; - public static String rotorTier9 = "rotorOsmium"; - public static String rotorTier10 = "rotorNeutronium"; - - //Fluid Pipe - public static String pipeTier0 = "pipeSmallLead"; - public static String pipeTier7 = "pipeHugeSteel"; - public static String pipeTier8 = "pipeHugeStainlessSteel"; - public static String pipeTier9 = "pipeHugeTitanium"; - public static String pipeTier10 = "pipeHugeTungstenSteel"; - - //Rubber Ring/Plate - public static String itemRubberRing = "ringRubber"; - public static String plateRubber = "plateRubber"; - - //Circuits - public static String circuitTier0 = "circuitPrimitive"; - public static String circuitTier1 = "circuitBasic"; - public static String circuitTier6 = "circuitMaster"; - public static String circuitTier7 = "circuitUltimate"; - public static String circuitTier8 = "circuitSuperconductor"; - public static String circuitTier9 = "circuitInfinite"; - public static String circuitTier10 = "circuitQuantum"; - - //small gears - public static String smallGearTier0 = "gearGtSmallWroughtIron"; - public static String smallGearTier7 = "gearGtSmallChrome"; - public static String smallGearTier8 = "gearGtSmallIridium"; - public static String smallGearTier9 = "gearGtSmallOsmium"; - public static String smallGearTier10 = "gearGtSmallNeutronium"; - - public static final void loadRecipes(){ - Logger.INFO("Loading Recipes for the Various Circuits and Machine components."); - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - run(); - } - else { - onlyULVComponents(); - if (!CORE.GTNH) { - onlyMaxComponents(); - } - } - gregtechMachinePhase(); - } - - private static void run(){ - //Electric Motors - RecipeUtils.addShapedGregtechRecipe( - cableTier7, wireTier7, rodTier7a, - wireTier7, rodTier7b, wireTier7, - rodTier7a, wireTier7, cableTier7, - CI.electricMotor_LuV); - RecipeUtils.addShapedGregtechRecipe( - cableTier8, wireTier8, rodTier8a, - wireTier8, rodTier8b, wireTier8, - rodTier8a, wireTier8, cableTier8, - CI.electricMotor_ZPM); - RecipeUtils.addShapedGregtechRecipe( - cableTier9, wireTier9, rodTier9a, - wireTier9, rodTier9b, wireTier9, - rodTier9a, wireTier9, cableTier9, - CI.electricMotor_UV); - RecipeUtils.addShapedGregtechRecipe( - cableTier10, wireTier10, rodTier10a, - wireTier10, rodTier10b, wireTier10, - rodTier10a, wireTier10, cableTier10, - CI.electricMotor_MAX); - - //Electric Pump - RecipeUtils.addShapedGregtechRecipe( - cableTier7, rotorTier7, itemRubberRing, - CI.craftingToolScrewdriver, pipeTier7, CI.craftingToolWrench, - itemRubberRing, CI.electricMotor_LuV, cableTier7, - CI.electricPump_LuV); - RecipeUtils.addShapedGregtechRecipe( - cableTier8, rotorTier8, itemRubberRing, - CI.craftingToolScrewdriver, pipeTier8, CI.craftingToolWrench, - itemRubberRing, CI.electricMotor_ZPM, cableTier8, - CI.electricPump_ZPM); - RecipeUtils.addShapedGregtechRecipe( - cableTier9, rotorTier9, itemRubberRing, - CI.craftingToolScrewdriver, pipeTier9, CI.craftingToolWrench, - itemRubberRing, CI.electricMotor_UV, cableTier9, - CI.electricPump_UV); - RecipeUtils.addShapedGregtechRecipe( - cableTier10, rotorTier10, itemRubberRing, - CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, - itemRubberRing, CI.electricMotor_MAX, cableTier10, - CI.electricPump_MAX); - - //Electric Pump - RecipeUtils.addShapedGregtechRecipe( - plateTier7, plateTier7, plateTier7, - cableTier7, rodTier7a, rodTier7a, - cableTier7, CI.electricMotor_LuV, smallGearTier7, - CI.electricPiston_LuV); - RecipeUtils.addShapedGregtechRecipe( - plateTier8, plateTier8, plateTier8, - cableTier8, rodTier8a, rodTier8a, - cableTier8, CI.electricMotor_ZPM, smallGearTier8, - CI.electricPiston_ZPM); - RecipeUtils.addShapedGregtechRecipe( - plateTier9, plateTier9, plateTier9, - cableTier9, rodTier9a, rodTier9a, - cableTier9, CI.electricMotor_UV, smallGearTier9, - CI.electricPiston_UV); - RecipeUtils.addShapedGregtechRecipe( - plateTier10, plateTier10, plateTier10, - cableTier10, rodTier10a, rodTier10a, - cableTier10, CI.electricMotor_MAX, smallGearTier10, - CI.electricPiston_MAX); - - //Robot Arms - RecipeUtils.addShapedGregtechRecipe( - cableTier7, cableTier7, cableTier7, - CI.electricMotor_LuV, rodTier7a, CI.electricMotor_LuV, - CI.electricPiston_LuV, circuitTier7, rodTier7a, - CI.robotArm_LuV); - RecipeUtils.addShapedGregtechRecipe( - cableTier8, cableTier8, cableTier8, - CI.electricMotor_ZPM, rodTier8a, CI.electricMotor_ZPM, - CI.electricPiston_ZPM, circuitTier8, rodTier8a, - CI.robotArm_ZPM); - RecipeUtils.addShapedGregtechRecipe( - cableTier9, cableTier9, cableTier9, - CI.electricMotor_UV, rodTier9a, CI.electricMotor_UV, - CI.electricPiston_UV, circuitTier9, rodTier9a, - CI.robotArm_UV); - RecipeUtils.addShapedGregtechRecipe( - cableTier10, cableTier10, cableTier10, - CI.electricMotor_MAX, rodTier10a, CI.electricMotor_MAX, - CI.electricPiston_MAX, circuitTier10, rodTier10a, - CI.robotArm_MAX); - - //Conveyor Modules - RecipeUtils.addShapedGregtechRecipe( - plateRubber, plateRubber, plateRubber, - CI.electricMotor_LuV, cableTier7, CI.electricMotor_LuV, - plateRubber, plateRubber, plateRubber, - CI.conveyorModule_LuV); - RecipeUtils.addShapedGregtechRecipe( - plateRubber, plateRubber, plateRubber, - CI.electricMotor_ZPM, cableTier8, CI.electricMotor_ZPM, - plateRubber, plateRubber, plateRubber, - CI.conveyorModule_ZPM); - RecipeUtils.addShapedGregtechRecipe( - plateRubber, plateRubber, plateRubber, - CI.electricMotor_UV, cableTier9, CI.electricMotor_UV, - plateRubber, plateRubber, plateRubber, - CI.conveyorModule_UV); - RecipeUtils.addShapedGregtechRecipe( - plateRubber, plateRubber, plateRubber, - CI.electricMotor_MAX, cableTier10, CI.electricMotor_MAX, - plateRubber, plateRubber, plateRubber, - CI.conveyorModule_MAX); - - //Emitter Modules - RecipeUtils.addShapedGregtechRecipe( - rodTier7c, rodTier7c, circuitTier7, - cableTier7, circuitTier6, rodTier7c, - circuitTier7, cableTier7, rodTier7c, - CI.emitter_LuV); - RecipeUtils.addShapedGregtechRecipe( - rodTier8c, rodTier8c, circuitTier8, - cableTier8, circuitTier7, rodTier8c, - circuitTier8, cableTier8, rodTier8c, - CI.emitter_ZPM); - RecipeUtils.addShapedGregtechRecipe( - rodTier9c, rodTier9c, circuitTier9, - cableTier9, circuitTier8, rodTier9c, - circuitTier9, cableTier9, rodTier9c, - CI.emitter_UV); - RecipeUtils.addShapedGregtechRecipe( - rodTier10c, rodTier10c, circuitTier10, - cableTier10, circuitTier9, rodTier10c, - circuitTier10, cableTier10, rodTier10c, - CI.emitter_MAX); - - //Field Generator Modules - RecipeUtils.addShapedGregtechRecipe( - wireTier7, circuitTier7, wireTier7, - circuitTier7, circuitTier6, circuitTier7, - wireTier7, circuitTier7, wireTier7, - CI.fieldGenerator_LuV); - RecipeUtils.addShapedGregtechRecipe( - wireTier8, circuitTier8, wireTier8, - circuitTier8, circuitTier7, circuitTier8, - wireTier8, circuitTier8, wireTier8, - CI.fieldGenerator_ZPM); - RecipeUtils.addShapedGregtechRecipe( - wireTier9, circuitTier9, wireTier9, - circuitTier9, circuitTier8, circuitTier9, - wireTier9, circuitTier9, wireTier9, - CI.fieldGenerator_UV); - RecipeUtils.addShapedGregtechRecipe( - wireTier10, circuitTier10, wireTier10, - circuitTier10, circuitTier9, circuitTier10, - wireTier10, circuitTier10, wireTier10, - CI.fieldGenerator_MAX); - - //Sensor Modules - RecipeUtils.addShapedRecipe( - plateTier7, null, circuitTier6, - plateTier7, rodTier7c, null, - circuitTier7, plateTier7, plateTier7, - CI.sensor_LuV); - RecipeUtils.addShapedRecipe( - plateTier8, null, circuitTier7, - plateTier8, rodTier8c, null, - circuitTier8, plateTier8, plateTier8, - CI.sensor_ZPM); - RecipeUtils.addShapedRecipe( - plateTier9, null, circuitTier8, - plateTier9, rodTier9c, null, - circuitTier9, plateTier9, plateTier9, - CI.sensor_UV); - RecipeUtils.addShapedRecipe( - plateTier10, null, circuitTier9, - plateTier10, rodTier10c, null, - circuitTier10, plateTier10, plateTier10, - CI.sensor_MAX); - - onlyULVComponents(); - - Logger.INFO("Done loading recipes for the Various machine components."); - - } - - private static void onlyULVComponents(){ - RecipeUtils.addShapedGregtechRecipe( - cableTier1, wireTier0, rodTier0, - wireTier0, rodTier2, wireTier0, - rodTier0, wireTier0, cableTier1, - CI.electricMotor_ULV); - - RecipeUtils.addShapedGregtechRecipe( - cableTier0, rotorTier0, itemRubberRing, - CI.craftingToolScrewdriver, pipeTier0, CI.craftingToolWrench, - itemRubberRing, CI.electricMotor_ULV, cableTier0, - CI.electricPump_ULV); - - RecipeUtils.addShapedGregtechRecipe( - plateTier0, plateTier0, plateTier0, - cableTier0, rodTier1, rodTier1, - cableTier0, CI.electricMotor_ULV, smallGearTier0, - CI.electricPiston_ULV); - - RecipeUtils.addShapedGregtechRecipe( - cableTier0, cableTier0, cableTier0, - CI.electricMotor_ULV, rodTier1, CI.electricMotor_ULV, - CI.electricPiston_ULV, circuitTier0, rodTier1, - CI.robotArm_ULV); - - RecipeUtils.addShapedGregtechRecipe( - plateRubber, plateRubber, plateRubber, - CI.electricMotor_ULV, cableTier0, CI.electricMotor_ULV, - plateRubber, plateRubber, plateRubber, - CI.conveyorModule_ULV); - - RecipeUtils.addShapedGregtechRecipe( - rodTier2, rodTier2, circuitTier0, - cableTier0, circuitTier1, rodTier2, - circuitTier0, cableTier0, rodTier2, - CI.emitter_ULV); - - RecipeUtils.addShapedGregtechRecipe( - wireTier0, circuitTier0, wireTier0, - circuitTier0, circuitTier1, circuitTier0, - wireTier0, circuitTier0, wireTier0, - CI.fieldGenerator_ULV); - - RecipeUtils.addShapedRecipe( - plateTier0, null, circuitTier1, - plateTier0, rodTier2, null, - circuitTier0, plateTier0, plateTier0, - CI.sensor_ULV); - } - - private static void onlyMaxComponents(){ - RecipeUtils.addShapedGregtechRecipe( - cableTier10, wireTier10, rodTier10a, - wireTier10, rodTier10b, wireTier10, - rodTier10a, wireTier10, cableTier10, - CI.electricMotor_MAX); - RecipeUtils.addShapedGregtechRecipe( - cableTier10, rotorTier10, itemRubberRing, - CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, - itemRubberRing, CI.electricMotor_MAX, cableTier10, - CI.electricPump_MAX); - RecipeUtils.addShapedGregtechRecipe( - plateTier10, plateTier10, plateTier10, - cableTier10, rodTier10a, rodTier10a, - cableTier10, CI.electricMotor_MAX, smallGearTier10, - CI.electricPiston_MAX); - RecipeUtils.addShapedGregtechRecipe( - cableTier10, cableTier10, cableTier10, - CI.electricMotor_MAX, rodTier10a, CI.electricMotor_MAX, - CI.electricPiston_MAX, circuitTier10, rodTier10a, - CI.robotArm_MAX); - RecipeUtils.addShapedGregtechRecipe( - plateRubber, plateRubber, plateRubber, - CI.electricMotor_MAX, cableTier10, CI.electricMotor_MAX, - plateRubber, plateRubber, plateRubber, - CI.conveyorModule_MAX); - RecipeUtils.addShapedGregtechRecipe( - rodTier10c, rodTier10c, circuitTier10, - cableTier10, circuitTier9, rodTier10c, - circuitTier10, cableTier10, rodTier10c, - CI.emitter_MAX); - RecipeUtils.addShapedGregtechRecipe( - wireTier10, circuitTier10, wireTier10, - circuitTier10, circuitTier9, circuitTier10, - wireTier10, circuitTier10, wireTier10, - CI.fieldGenerator_MAX); - RecipeUtils.addShapedRecipe( - plateTier10, null, circuitTier9, - plateTier10, rodTier10c, null, - circuitTier10, plateTier10, plateTier10, - CI.sensor_MAX); - } - - private static void gregtechMachinePhase(){ - if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ - Logger.INFO("Adding Gregtech machine recipes for the circuits."); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_IV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_IV.get(1L, new Object[0]), 30, 240); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_LuV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_LuV.get(1L, new Object[0]), 60, 480); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 2L), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(4L, new Object[0]), GregtechItemList.Circuit_Board_ZPM.get(1L, new Object[0]), 90, 1000); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GregtechItemList.Circuit_Parts_Crystal_Chip_IV.get(3L, new Object[0]), GregtechItemList.Circuit_Parts_IV.get(1L, new Object[0]), 30, 480); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.get(3L, new Object[0]), GregtechItemList.Circuit_Parts_LuV.get(1L, new Object[0]), 60, 1000); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.get(3L, new Object[0]), GregtechItemList.Circuit_Parts_ZPM.get(1L, new Object[0]), 90, 2000); - GT_Values.RA.addForgeHammerRecipe(ItemList.Circuit_Master.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_Crystal_Chip_IV.get(5L, new Object[0]), 30, 256); - GT_Values.RA.addForgeHammerRecipe(GregtechItemList.Circuit_IV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.get(5L, new Object[0]), 60, 512); - GT_Values.RA.addForgeHammerRecipe(GregtechItemList.Circuit_LuV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.get(5L, new Object[0]), 120, 1024); - for (final Materials tMat : Materials.values()) { - if ((tMat.mStandardMoltenFluid != null) && (tMat.contains(SubTag.SOLDERING_MATERIAL))) { - final int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; - GT_Values.RA.addAssemblerRecipe(GregtechItemList.Circuit_Board_IV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_IV.get(1L, new Object[0]), tMat.getMolten((144L * tMultiplier) / 4L), GregtechItemList.Circuit_IV.get(1L, new Object[0]), 30, 480); - GT_Values.RA.addAssemblerRecipe(GregtechItemList.Circuit_Board_LuV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_LuV.get(1L, new Object[0]), tMat.getMolten((144L * tMultiplier) / 4L), GregtechItemList.Circuit_LuV.get(1L, new Object[0]), 60, 1000); - GT_Values.RA.addAssemblerRecipe(GregtechItemList.Circuit_Board_ZPM.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_ZPM.get(1L, new Object[0]), tMat.getMolten((144L * tMultiplier) / 4L), GregtechItemList.Circuit_ZPM.get(1L, new Object[0]), 90, 2000); - - } - } - } - } -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java deleted file mode 100644 index 14001d86bd..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ /dev/null @@ -1,2926 +0,0 @@ -package gtPlusPlus.core.recipe; - -import static gtPlusPlus.core.lib.CORE.GTNH; - -import cpw.mods.fml.common.Loader; -import gregtech.api.GregTech_API; -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.item.crafting.ItemDummyResearch; -import gtPlusPlus.core.item.crafting.ItemDummyResearch.ASSEMBLY_LINE_RESEARCH; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.*; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.covers.CoverManager; -import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; -import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RECIPES_Machines { - - //Outputs - //static ItemStack RECIPE_BufferCore_ULV = new ItemStack(GregtechEnergyBuffer.itemBufferCore); - public static ItemStack RECIPE_SteamCondenser; - public static ItemStack RECIPE_IronBlastFurnace; - public static ItemStack RECIPE_IronPlatedBricks; - public static ItemStack RECIPE_Buffer_ULV = GregtechItemList.Energy_Buffer_1by1_ULV.get(1); - public static ItemStack RECIPE_Buffer_LV = GregtechItemList.Energy_Buffer_1by1_LV.get(1); - public static ItemStack RECIPE_Buffer_MV = GregtechItemList.Energy_Buffer_1by1_MV.get(1); - public static ItemStack RECIPE_Buffer_HV = GregtechItemList.Energy_Buffer_1by1_HV.get(1); - public static ItemStack RECIPE_Buffer_EV = GregtechItemList.Energy_Buffer_1by1_EV.get(1); - public static ItemStack RECIPE_Buffer_IV = GregtechItemList.Energy_Buffer_1by1_IV.get(1); - public static ItemStack RECIPE_Buffer_LuV = GregtechItemList.Energy_Buffer_1by1_LuV.get(1); - public static ItemStack RECIPE_Buffer_ZPM = GregtechItemList.Energy_Buffer_1by1_ZPM.get(1); - public static ItemStack RECIPE_Buffer_UV = GregtechItemList.Energy_Buffer_1by1_UV.get(1); - public static ItemStack RECIPE_Buffer_MAX = GregtechItemList.Energy_Buffer_1by1_MAX.get(1); - //Industrial Centrifuge - public static ItemStack RECIPE_IndustrialCentrifugeController; - public static ItemStack RECIPE_IndustrialCentrifugeCasing; - //Industrial Coke Oven - public static ItemStack RECIPE_IndustrialCokeOvenController; - public static ItemStack RECIPE_IndustrialCokeOvenFrame; - public static ItemStack RECIPE_IndustrialCokeOvenCasingA; - public static ItemStack RECIPE_IndustrialCokeOvenCasingB; - //Industrial Electrolyzer - public static ItemStack RECIPE_IndustrialElectrolyzerController; - public static ItemStack RECIPE_IndustrialElectrolyzerFrame; - //Industrial Material Press - public static ItemStack RECIPE_IndustrialMaterialPressController; - public static ItemStack RECIPE_IndustrialMaterialPressFrame; - //Industrial Maceration Stack - public static ItemStack RECIPE_IndustrialMacerationStackController; - public static ItemStack RECIPE_IndustrialMacerationStackFrame; - //Industrial Wire Factory - public static ItemStack RECIPE_IndustrialWireFactoryController; - public static ItemStack RECIPE_IndustrialWireFactoryFrame; - //Industrial Multi Tank - public static ItemStack RECIPE_IndustrialMultiTankController; - public static ItemStack RECIPE_IndustrialMultiTankFrame; - //Industrial Matter Fabricator - public static ItemStack RECIPE_IndustrialMatterFabController; - public static ItemStack RECIPE_IndustrialMatterFabFrame; - public static ItemStack RECIPE_IndustrialMatterFabCoil; - //Industrial Blast Smelter - public static ItemStack RECIPE_IndustrialBlastSmelterController; - public static ItemStack RECIPE_IndustrialBlastSmelterFrame; - public static ItemStack RECIPE_IndustrialBlastSmelterCoil; - //Industrial Sieve - public static ItemStack RECIPE_IndustrialSieveController; - public static ItemStack RECIPE_IndustrialSieveFrame; - public static ItemStack RECIPE_IndustrialSieveGrate; - //Industrial Tree Farmer - public static ItemStack RECIPE_TreeFarmController; - public static ItemStack RECIPE_TreeFarmFrame; - //Tesseracts - public static ItemStack RECIPE_TesseractGenerator; - public static ItemStack RECIPE_TesseractTerminal; - //Thermal Boiler - public static ItemStack RECIPE_ThermalBoilerController; - public static ItemStack RECIPE_ThermalBoilerCasing; - - //Thorium Reactor - public static ItemStack RECIPE_LFTRController; - public static ItemStack RECIPE_LFTROuterCasing; - public static ItemStack RECIPE_LFTRInnerCasing; - - //Milling - public static ItemStack RECIPE_ISAMill_Controller; - public static ItemStack RECIPE_ISAMill_Gearbox; - public static ItemStack RECIPE_ISAMill_Casing; - public static ItemStack RECIPE_ISAMill_Hatch; - public static ItemStack RECIPE_Flotation_Controller; - public static ItemStack RECIPE_Flotation_Casing; - - //Cyclotron - public static ItemStack RECIPE_CyclotronController; - public static ItemStack RECIPE_CyclotronOuterCasing; - public static ItemStack RECIPE_CyclotronInnerCoil; - - - //Buffer Cores - public static ItemStack RECIPE_BufferCore_ULV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore1", 1); - public static ItemStack RECIPE_BufferCore_LV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore2", 1); - public static ItemStack RECIPE_BufferCore_MV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore3", 1); - public static ItemStack RECIPE_BufferCore_HV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore4", 1); - public static ItemStack RECIPE_BufferCore_EV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore5", 1); - public static ItemStack RECIPE_BufferCore_IV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore6", 1); - public static ItemStack RECIPE_BufferCore_LuV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore7", 1); - public static ItemStack RECIPE_BufferCore_ZPM = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore8", 1); - public static ItemStack RECIPE_BufferCore_UV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore9", 1); - public static ItemStack RECIPE_BufferCore_MAX = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore10", 1); - - - //Wire - public static String wireTier1 = "wireGt08Lead"; - public static String wireTier2 = "wireGt08Tin"; - public static String wireTier3 = "wireGt08Copper"; - public static String wireTier4 = "wireGt08Gold"; - public static String wireTier5 = "wireGt08Aluminium"; - public static String wireTier6 = "wireGt08Tungsten"; - public static String wireTier7 = "wireGt08Naquadah"; - public static String wireTier8 = "wireGt08Osmium"; - public static String wireTier9 = "wireGt08Superconductor"; - public static String wireTier10 = "wireGt16Superconductor"; - - //Wire - public static String cableTier1 = "cableGt04Lead"; - public static String cableTier2 = "cableGt04Tin"; - public static String cableTier3 = "cableGt04Copper"; - public static String cableTier4 = "cableGt04Gold"; - public static String cableTier5 = "cableGt04Aluminium"; - public static String cableTier6 = "cableGt04Tungsten"; - public static String cableTier7 = "cableGt04Naquadah"; - public static String cableTier8 = "cableGt04Osmium"; - public static String cableTier9 = "cableGt04NiobiumTitanium"; - public static String cableTier10 = "cableGt08NiobiumTitanium"; - - public static String pipeTier1 = "pipeHuge"+"Clay"; - public static String pipeTier2 = "pipeHuge"+"Potin"; - public static String pipeTier3 = "pipeHuge"+"Steel"; - public static String pipeTier4 = "pipeHuge"+"StainlessSteel"; - public static String pipeTier5 = "pipeHuge"+"TungstenSteel"; - public static String pipeTier6 = "pipeHuge"+"MaragingSteel300"; - public static String pipeTier7 = "pipeHuge"+"Tantalloy60"; - public static String pipeTier8 = "pipeHuge"+"Tantalloy61"; - public static String pipeTier9 = "pipeHuge"+"Inconel792"; - public static String pipeTier10 = "pipeHuge"+"HastelloyX"; - public static String pipeTier11 = "pipeHuge"+"Europium"; - - // EV/IV MACHINES - public static ItemStack EV_MACHINE_Electrolyzer; - public static ItemStack EV_MACHINE_Centrifuge; - public static ItemStack EV_MACHINE_BendingMachine; - public static ItemStack EV_MACHINE_Wiremill; - public static ItemStack HV_MACHINE_Macerator; - public static ItemStack EV_MACHINE_Macerator; - public static ItemStack EV_MACHINE_Cutter; - public static ItemStack EV_MACHINE_MassFabricator; - public static ItemStack EV_MACHINE_Extruder; - public static ItemStack EV_MACHINE_Sifter; - public static ItemStack EV_MACHINE_ThermalCentrifuge; - public static ItemStack EV_MACHINE_OreWasher; - public static ItemStack EV_MACHINE_AlloySmelter; - public static ItemStack EV_MACHINE_Mixer; - - - //Cables - public static String cableGt02Electrum = "cableGt02Electrum"; - - - //Plates - public static String plateElectricalSteel= "plateElectricalSteel"; - public static String plateEnergeticAlloy= "plateEnergeticAlloy"; - public static String plateCobalt = "plateCobalt"; - public static String plateBronze = "plateBronze"; - public static String plateSteel = "plateSteel"; - - //Pipes - public static String pipeLargeCopper="pipeLargeCopper"; - public static String pipeHugeSteel="pipeHugeSteel"; - public static String pipeHugeStainlessSteel="pipeHugeStainlessSteel"; - public static String pipeHugeTitanium="pipeHugeTitanium"; - - //Lava Boiler - public static ItemStack boiler_Coal; - public static ItemStack blockBricks = ItemUtils.getItemStackFromFQRN("minecraft:brick_block", 1); - - //Batteries - public static String batteryBasic = "batteryBasic"; - public static String batteryAdvanced = "batteryAdvanced"; - public static String batteryElite = "batteryElite"; - public static String batteryMaster = "batteryMaster"; - public static String batteryUltimate = "batteryUltimate"; - public static ItemStack IC2MFE; - public static ItemStack IC2MFSU; - - //Misc - public static ItemStack INPUT_RCCokeOvenBlock; - public static ItemStack INPUT_IECokeOvenBlock; - - //Output Determiner - public static int Casing_Amount; - - - - public static final void loadRecipes(){ - run(); - Logger.INFO("Loading Recipes for the Various machine blocks."); - } - - private static void run(){ - - //Determines Casing Recipe Output - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !GTNH){ - Casing_Amount=2; - } - else { - Casing_Amount=1; - } - - initModItems(); - tieredMachineHulls(); - controlCores(); - energyCores(); - wirelessChargers(); - largeArcFurnace(); - industrialVacuumFurnace(); - fakeMachineCasingCovers(); - ztonesCoverRecipes(); - overflowValveCovers(); - superBuses(); - roundRobinators(); - chunkloaders(); - distillus(); - algaeFarm(); - chemPlant(); - zyngen(); - milling(); - sparging(); - - } - - private static void zyngen() { - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(6), - CI.getTieredMachineHull(4), - ItemList.Machine_EV_AlloySmelter.get(1), - CI.getGear(3, 16), - CI.getBolt(3, 64), - CI.getPlate(4, 16) - }, - CI.getAlternativeTieredFluid(4, 144 * 8), - GregtechItemList.Industrial_AlloySmelter.get(1), - 20 * 30, - MaterialUtils.getVoltageForTier(4)); - - } - - private static void chemPlant() { - - - GT_ModHandler.addCraftingRecipe( - GregtechItemList.Casing_Machine_Custom_1.get(2L, new Object[0]), - CI.bits, - new Object[]{ - "PhP", - "PFP", - "PwP", - 'P', - OrePrefixes.plate.get(Materials.Bronze), - 'F', - OrePrefixes.frameGt.get(Materials.Bronze) - } - ); - - GT_ModHandler.addCraftingRecipe( - GregtechItemList.Casing_Machine_Custom_2.get(2L, new Object[0]), - CI.bits, - new Object[]{ - "PhP", - "PFP", - "PwP", - 'P', - OrePrefixes.plate.get(Materials.Aluminium), - 'F', - OrePrefixes.frameGt.get(Materials.Aluminium) - } - ); - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(19), - CI.getTieredGTPPMachineCasing(1, 6), - CI.getTieredComponentOfMaterial(Materials.Steel, OrePrefixes.gearGt, 6), - CI.getTieredComponentOfMaterial(Materials.Aluminium, OrePrefixes.plate, 32), - CI.getTieredComponentOfMaterial(Materials.CobaltBrass, OrePrefixes.dust, 16), - CI.getTieredComponent(OrePrefixes.frameGt, 2, 4), - }, - ALLOY.STEEL.getFluidStack(2 * (144 * 4)), - GregtechItemList.ChemicalPlant_Controller.get(1), - 120 * 20, - MaterialUtils.getVoltageForTier(2)); - - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(15), - CI.getTieredGTPPMachineCasing(1, 2), - ItemList.Hatch_Input_Bus_MV.get(1), - CI.getTieredComponentOfMaterial(Materials.Bronze, OrePrefixes.gearGt, 8), - CI.getTieredComponentOfMaterial(Materials.Lead, OrePrefixes.plate, 48), - CI.getTieredComponentOfMaterial(Materials.SolderingAlloy, OrePrefixes.wireFine, 16), - }, - ALLOY.BRONZE.getFluidStack(2 * (144 * 4)), - GregtechItemList.Bus_Catalysts.get(1), - 60 * 20, - MaterialUtils.getVoltageForTier(2)); - - } - - private static void algaeFarm() { - - // Give the shitty algae a use :) - CORE.RA.addDistilleryRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 32), - null, - null, - ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 4), - 20 * 15, - 16, - false); - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(21), - CI.getTieredGTPPMachineCasing(0, 4), - CI.getTieredComponentOfMaterial(Materials.Iron, OrePrefixes.rod, 12), - CI.getTieredComponentOfMaterial(Materials.Wood, OrePrefixes.plate, 32), - CI.getTieredComponentOfMaterial(Materials.Bronze, OrePrefixes.bolt, 16), - CI.getTieredComponentOfMaterial(Materials.Redstone, OrePrefixes.dust, 32), - }, - ALLOY.POTIN.getFluidStack(2 * (144 * 4)), - GregtechItemList.AlgaeFarm_Controller.get(1), - 60 * 20, - MaterialUtils.getVoltageForTier(1)); - - - } - - private static void distillus() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(19), - ItemList.Distillation_Tower.get(2), - GregtechItemList.GTPP_Casing_IV.get(16), - CI.getTieredComponent(OrePrefixes.circuit, 6, 8) - }, - new FluidStack[] { - ALLOY.AQUATIC_STEEL.getFluidStack(144 * 32), - ALLOY.BABBIT_ALLOY.getFluidStack(144 * 16), - ALLOY.BRONZE.getFluidStack(144 * 64), - ALLOY.KANTHAL.getFluidStack(144 * 16), - }, - new ItemStack[] { - GregtechItemList.Machine_Adv_DistillationTower.get(1) - }, - new FluidStack[] { - - }, - 20 * 600, - MaterialUtils.getVoltageForTier(6), - 5); - - } - - private static void chunkloaders() { - - ItemStack aOutputs[] = new ItemStack[] { - GregtechItemList.GT_Chunkloader_HV.get(1L), - GregtechItemList.GT_Chunkloader_IV.get(1L), - GregtechItemList.GT_Chunkloader_ZPM.get(1L), - }; - - int aIndex = 0; - - for (int i=3;i<8;i++) { - if (i == 4 || i == 6) { - continue; - } - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(21), - CI.getElectricPiston(i, 10), - CI.getFieldGenerator(i + 1, 6), - CI.getPlate(i, 16), - CI.getTransmissionComponent(i - 1, 8), - CI.getTieredComponent(OrePrefixes.cableGt08, i, 16) - }, - ALLOY.EGLIN_STEEL.getFluidStack(i * (144 * 4)), - aOutputs[aIndex++].copy(), - 300 * 20, - MaterialUtils.getVoltageForTier(i)); - } - - - } - - private static void overflowValveCovers() { - ItemStack aOutputs[] = new ItemStack[] { - GregtechItemList.Cover_Overflow_ULV.get(1L), - GregtechItemList.Cover_Overflow_LV.get(1L), - GregtechItemList.Cover_Overflow_MV.get(1L), - GregtechItemList.Cover_Overflow_HV.get(1L), - GregtechItemList.Cover_Overflow_EV.get(1L), - GregtechItemList.Cover_Overflow_IV.get(1L), - }; - - for (int i=0;i<6;i++) { - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(19), - CI.getElectricPump(i, 2), - CI.getElectricMotor(i, 2), - CI.getPlate(i, 4) - }, - FluidUtils.getWater((i+1) * 750), - aOutputs[i].copy(), - 20 * 20, - MaterialUtils.getVoltageForTier(i)); - } - - } - - private static void tieredMachineHulls() { - - GregtechItemList[] aHulls = new GregtechItemList[] { - GregtechItemList.GTPP_Casing_ULV, - GregtechItemList.GTPP_Casing_LV, - GregtechItemList.GTPP_Casing_MV, - GregtechItemList.GTPP_Casing_HV, - GregtechItemList.GTPP_Casing_EV, - GregtechItemList.GTPP_Casing_IV, - GregtechItemList.GTPP_Casing_LuV, - GregtechItemList.GTPP_Casing_ZPM, - GregtechItemList.GTPP_Casing_UV, - GregtechItemList.GTPP_Casing_MAX - }; - - for (int i=0;i<10;i++) { - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(20), - CI.getTieredMachineCasing(i), - CI.getPlate(i, 8), - CI.getGear(i, 2), - CI.getTieredComponent(OrePrefixes.cableGt02, i, 4), - CI.getTieredComponent(OrePrefixes.circuit, i, 2) - }, - CI.getAlternativeTieredFluid(i, 144 * (i+1) * 2), - aHulls[i].get(1), - 20 * 20, - MaterialUtils.getVoltageForTier(i)); - } - - } - - private static void initModItems(){ - if (LoadedMods.IndustrialCraft2){ - IC2MFE = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:blockElectric", "IC2_MFE", 1, 1); - IC2MFSU = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:blockElectric", "IC2_MFSU", 2, 1); - } - if (LoadedMods.Gregtech){ - - //Lava Boiler - boiler_Coal = ItemList.Machine_Bronze_Boiler.get(1); - - //IV MACHINES - if (!GTNH){ - EV_MACHINE_Electrolyzer = ItemList.Machine_EV_Electrolyzer.get(1); - EV_MACHINE_BendingMachine= ItemList.Machine_EV_Bender.get(1); - EV_MACHINE_Wiremill= ItemList.Machine_EV_Wiremill.get(1); - HV_MACHINE_Macerator= ItemList.Machine_HV_Macerator.get(1); - EV_MACHINE_Macerator= ItemList.Machine_EV_Macerator.get(1); - EV_MACHINE_MassFabricator= ItemList.Machine_EV_Massfab.get(1); - EV_MACHINE_Centrifuge= ItemList.Machine_EV_Centrifuge.get(1); - EV_MACHINE_Cutter = ItemList.Machine_EV_Cutter.get(1); - EV_MACHINE_Extruder = ItemList.Machine_EV_Extruder.get(1); - EV_MACHINE_Sifter = ItemList.Machine_HV_Sifter.get(1); - EV_MACHINE_ThermalCentrifuge = ItemList.Machine_EV_ThermalCentrifuge.get(1); - EV_MACHINE_OreWasher = ItemList.Machine_EV_OreWasher.get(1); - EV_MACHINE_AlloySmelter = ItemList.Machine_EV_AlloySmelter.get(1); - EV_MACHINE_Mixer = ItemList.Machine_EV_Mixer.get(1); - } - //Balanced opposites - else { - EV_MACHINE_Electrolyzer = ItemList.Machine_IV_Electrolyzer.get(1); - EV_MACHINE_BendingMachine= ItemList.Machine_IV_Bender.get(1); - EV_MACHINE_Wiremill= ItemList.Machine_IV_Wiremill.get(1); - HV_MACHINE_Macerator= ItemList.Machine_EV_Macerator.get(1); - EV_MACHINE_Macerator= ItemList.Machine_IV_Macerator.get(1); - EV_MACHINE_MassFabricator= CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? ItemUtils.getValueOfItemList("Machine_LuV_Massfab", ItemList.Machine_IV_Massfab).get(1) : ItemList.Machine_IV_Massfab.get(1); - EV_MACHINE_Centrifuge= ItemList.Machine_IV_Centrifuge.get(1); - EV_MACHINE_Cutter = ItemList.Machine_IV_Cutter.get(1); - EV_MACHINE_Extruder = ItemList.Machine_IV_Extruder.get(1); - EV_MACHINE_Sifter = ItemList.Machine_HV_Sifter.get(1); - EV_MACHINE_ThermalCentrifuge = ItemList.Machine_IV_ThermalCentrifuge.get(1); - EV_MACHINE_OreWasher = ItemList.Machine_IV_OreWasher.get(1); - EV_MACHINE_AlloySmelter = ItemList.Machine_IV_AlloySmelter.get(1); - EV_MACHINE_Mixer = ItemList.Machine_IV_Mixer.get(1); - } - - - - } - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven){ - if(LoadedMods.Railcraft){ - //Misc - INPUT_RCCokeOvenBlock = ItemUtils.getItemStackWithMeta(LoadedMods.Railcraft, "Railcraft:machine.alpha", "Coke_Oven_RC", 7, 1); - } - if(LoadedMods.ImmersiveEngineering){ - //Misc - INPUT_IECokeOvenBlock = ItemUtils.getItemStackWithMeta(LoadedMods.ImmersiveEngineering, "ImmersiveEngineering:stoneDecoration", "Coke_Oven_IE", 1, 1); - } - } - runModRecipes(); - } - - private static void runModRecipes(){ - if (LoadedMods.Gregtech){ - - //Computer Cube - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getSimpleStack(CI.getDataOrb(), 4 * (GTNH ? 2 : 1)), - ItemList.Cover_Screen.get(4), - CI.machineHull_IV, - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(7), 2) - }, - ELEMENT.getInstance().TANTALUM.getFluidStack(144 * 16), - GregtechItemList.Gregtech_Computer_Cube.get(1), - 60 * 20 * 3, - 8000); - - //Circuit programmer - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getSimpleStack(CI.robotArm_LV, 4 * (GTNH ? 2 : 1)), - ItemList.Cover_Controller.get(1, CI.electricMotor_MV), - CI.machineHull_MV, - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(1), 2), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(2), 2) - }, - ELEMENT.getInstance().IRON.getFluidStack(144 * 4), - ItemUtils.getSimpleStack(ModBlocks.blockCircuitProgrammer), - 60 * 10 * 1, - 30); - - //Lead Lined Chest - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.machineHull_LV, - ItemUtils.getItemStackOfAmountFromOreDict("plateRubber", 32), - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseLead", 9), - ItemUtils.getSimpleStack(Blocks.chest) - }, - ELEMENT.getInstance().LEAD.getFluidStack(144 * 16), - ItemUtils.getSimpleStack(ModBlocks.blockDecayablesChest), - 60 * 10 * 3, - 60); - - //RTG - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getItemStackWithMeta(true, "IC2:blockGenerator:6", "IC2-RTG", 6, 1), - ALLOY.NITINOL_60.getPlate(GTNH ? 32 : 8), - ALLOY.MARAGING350.getGear(GTNH ? 16 : 4), - ItemUtils.getSimpleStack(GTNH ? CI.fieldGenerator_IV : CI.fieldGenerator_EV, 8 ), - ItemUtils.getItemStackOfAmountFromOreDict("wireFinePlatinum", GTNH ? 64 : 32), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 7 : 6), GTNH ? 5 : 4) - }, - ALLOY.NIOBIUM_CARBIDE.getFluidStack(144 * 16), - GregtechItemList.RTG.get(1), - 60 * 20 * 10, - 8000); - - // Super Jukebox - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.machineHull_LV, - ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 4), - ItemUtils.getItemStackOfAmountFromOreDict("plateTumbaga", 8), - ItemUtils.getSimpleStack(Blocks.jukebox) - }, - ELEMENT.getInstance().COPPER.getFluidStack(144 * 2), - ItemUtils.getSimpleStack(ModBlocks.blockCustomJukebox), - 20 * 30, - 30); - - ItemStack aFluidRegulator1 = ItemUtils.getValueOfItemList("FluidRegulator_MV",GTNH ? 4 : 2, ItemList.Electric_Pump_HV); - ItemStack aFluidRegulator2 = ItemUtils.getValueOfItemList("FluidRegulator_IV", GTNH ? 4 : 2, ItemUtils.getValueOfItemList("Electric_Pump_LuV", GTNH ? 8 : 4, ItemList.Electric_Pump_IV)); - - //Poo Collector - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.machineHull_MV, - aFluidRegulator1, - CI.getTieredComponent(OrePrefixes.pipeMedium, 2, GTNH ? 4 : 2), - ALLOY.EGLIN_STEEL.getPlate(GTNH ? 8 : 4), - ALLOY.POTIN.getScrew(GTNH ? 12 : 6) - }, - ALLOY.TUMBAGA.getFluidStack(144 * 4), - ItemUtils.getSimpleStack(ModBlocks.blockPooCollector), - 20 * 60, - 30); - - //Adv. Poo Collector - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getTieredMachineHull(-1), - ItemUtils.getSimpleStack(ModBlocks.blockPooCollector), - aFluidRegulator2, - CI.getTieredComponent(OrePrefixes.pipeHuge, 6, GTNH ? 8 : 4), - CI.getTieredComponent(OrePrefixes.screw, 6, GTNH ? 32 : 16) - }, - CI.getAlternativeTieredFluid(5, 144 * 9), - ItemUtils.getSimpleStack(ModBlocks.blockPooCollector, 8, 1), - 20 * 60 * 5, - 500); - - - //Basic Steam Turbine - RecipeUtils.addShapedGregtechRecipe( - CI.getTieredComponent(OrePrefixes.pipeSmall, 0, 1), "circuitPrimitive", CI.getTieredComponent(OrePrefixes.pipeSmall, 0, 1), - ALLOY.TUMBAGA.getRotor(1), CI.machineCasing_ULV, ALLOY.TUMBAGA.getRotor(1), - CI.getElectricMotor(0, 1), "cableGt01RedAlloy", CI.getElectricMotor(0, 1), - GregtechItemList.Generator_Steam_Turbine_ULV.get(1)); - - //Basic Gas Turbine - RecipeUtils.addShapedGregtechRecipe( - "circuitPrimitive", ALLOY.TUMBAGA.getRotor(1), "circuitPrimitive", - ALLOY.TUMBAGA.getRotor(1), CI.machineCasing_ULV, ALLOY.TUMBAGA.getRotor(1), - CI.getElectricMotor(0, 1), "cableGt01RedAlloy", CI.getElectricMotor(0, 1), - GregtechItemList.Generator_Gas_Turbine_ULV.get(1)); - - //Basic Combustion Turbine - RecipeUtils.addShapedGregtechRecipe( - CI.getElectricPiston(0, 1), "circuitPrimitive", CI.getElectricPiston(0, 1), - CI.getElectricMotor(0, 1), CI.machineCasing_ULV, CI.getElectricMotor(0, 1), - ALLOY.TUMBAGA.getGear(1), "cableGt01RedAlloy", ALLOY.TUMBAGA.getGear(1), - GregtechItemList.Generator_Diesel_ULV.get(1)); - - - - //Steam Condenser - if (CORE.ConfigSwitches.enableMachine_SteamConverter ){ - RECIPE_SteamCondenser = GregtechItemList.Condensor_MAX.get(1); - RecipeUtils.addShapedGregtechRecipe( - pipeLargeCopper, pipeHugeSteel, pipeLargeCopper, - plateEnergeticAlloy, CI.electricPump_HV, plateEnergeticAlloy, - plateEnergeticAlloy, pipeLargeCopper, plateEnergeticAlloy, - RECIPE_SteamCondenser); - } - - ItemStack aBronzeBricks = ItemUtils.simpleMetaStack(GregTech_API.sBlockCasings1, 10, 1); - // Steam Macerator Multi - RecipeUtils.addShapedGregtechRecipe( - aBronzeBricks, ALLOY.TUMBAGA.getGear(1), aBronzeBricks, - aBronzeBricks, ALLOY.TUMBAGA.getFrameBox(1), aBronzeBricks, - aBronzeBricks, ALLOY.TUMBAGA.getGear(1), aBronzeBricks, - GregtechItemList.Controller_SteamMaceratorMulti.get(1)); - - // Steam Hatch - RecipeUtils.addShapedGregtechRecipe( - "plateBronze", "pipeMediumBronze", "plateBronze", - "plateBronze", GregtechItemList.GT_FluidTank_ULV.get(1), "plateBronze", - "plateBronze", "pipeMediumBronze", "plateBronze", - GregtechItemList.Hatch_Input_Steam.get(1)); - - // Steam Input Bus - RecipeUtils.addShapedGregtechRecipe( - "plateBronze", ALLOY.TUMBAGA.getPlate(1), "plateBronze", - "plateTin", ItemUtils.getSimpleStack(Blocks.hopper), "plateTin", - "plateBronze", ALLOY.TUMBAGA.getPlate(1), "plateBronze", - GregtechItemList.Hatch_Input_Bus_Steam.get(1)); - - // Steam Output Bus - RecipeUtils.addShapedGregtechRecipe( - "plateBronze", "plateTin", "plateBronze", - ALLOY.TUMBAGA.getPlate(1), ItemUtils.getSimpleStack(Blocks.hopper), ALLOY.TUMBAGA.getPlate(1), - "plateBronze", "plateTin", "plateBronze", - GregtechItemList.Hatch_Output_Bus_Steam.get(1)); - - - //RF Convertor - if (LoadedMods.CoFHCore && CORE.ConfigSwitches.enableMachine_RF_Convetor){ - RecipeUtils.addShapedGregtechRecipe( - CI.getPlate(4, 1), CI.getTieredCircuitOreDictName(5), CI.getPlate(4, 1), - CI.getTransmissionComponent(3, 1), CI.getTieredGTPPMachineCasing(4, 1), CI.getTransmissionComponent(3, 1), - CI.getPlate(4, 1), plateEnergeticAlloy, CI.getPlate(4, 1), - GregtechItemList.Energy_Buffer_RF_Convertor.get(1)); - } - - // Egg Box - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(8), - CI.getTieredMachineHull(3), - ItemUtils.getSimpleStack(Items.egg, 64), - ItemUtils.getSimpleStack(ModItems.itemRope, 32), - CI.getPlate(4, GTNH ? 16 : 8) - }, - FluidUtils.getFluidStack("mobessence", 4096), - ItemUtils.getSimpleStack(ModBlocks.blockEggBox, 1), - 20 * 60, - 480); - - //Flask Configurator - if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(8), - CI.getTieredMachineHull(2), - ItemUtils.getSimpleStack(ModBlocks.blockCircuitProgrammer), - VolumetricFlaskHelper.getVolumetricFlask(8), - CI.getTieredComponent(OrePrefixes.pipeSmall, 2, GTNH ? 4 : 2), - CI.getPlate(2, GTNH ? 8 : 4) - }, - CI.getAlternativeTieredFluid(1, 144 * 8), - ItemUtils.getSimpleStack(ModBlocks.blockVolumetricFlaskSetter, 1), - 20 * 60, - 120); - } - - - if (CORE.ConfigSwitches.enableMultiblock_IronBlastFurnace){ - - RECIPE_IronBlastFurnace = GregtechItemList.Machine_Iron_BlastFurnace.get(1); - RECIPE_IronPlatedBricks = GregtechItemList.Casing_IronPlatedBricks.get(Casing_Amount); - - //Iron BF - RecipeUtils.addShapedGregtechRecipe( - "plateDoubleAnyIron", "craftingFurnace", "plateDoubleAnyIron", - boiler_Coal, CI.machineCasing_ULV, boiler_Coal, - "plateDoubleAnyIron", "bucketLava", "plateDoubleAnyIron", - RECIPE_IronBlastFurnace); - //Iron plated Bricks - RecipeUtils.addShapedGregtechRecipe( - "plateAnyIron", RECIPES_Tools.craftingToolHardHammer, "plateAnyIron", - "plateAnyIron", blockBricks, "plateAnyIron", - "plateAnyIron", RECIPES_Tools.craftingToolWrench, "plateAnyIron", - RECIPE_IronPlatedBricks); - - //Add recycle recipes for the Iron Plated Bricks - //GT_ModHandler.addPulverisationRecipe(RECIPE_IronPlatedBricks, ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIron", 6), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustClay", 2), true); - CORE.RA.addPulverisationRecipe( - RECIPE_IronPlatedBricks, - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIron", 6), - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustClay", 2), - null); - GT_Values.RA.addArcFurnaceRecipe(RECIPE_IronPlatedBricks, new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotWroughtIron", 6), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustAsh", 2)}, new int[]{0}, 32*20, 32); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCentrifuge){ - //Industrial Centrifuge - RECIPE_IndustrialCentrifugeController = GregtechItemList.Industrial_Centrifuge.get(1); - RECIPE_IndustrialCentrifugeCasing = GregtechItemList.Casing_Centrifuge1.get(Casing_Amount); - - //Industrial Centrifuge - RecipeUtils.addShapedGregtechRecipe( - CI.circuitTier5, pipeHugeStainlessSteel, CI.circuitTier5, - CI.component_Plate[6], EV_MACHINE_Centrifuge, CI.component_Plate[6], - CI.component_Plate[8], CI.machineCasing_IV, CI.component_Plate[8], - RECIPE_IndustrialCentrifugeController); - //Centrifuge Casing - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[6], "stickTumbaga", CI.component_Plate[6], - CI.component_Plate[8], "stickTumbaga", CI.component_Plate[8], - CI.component_Plate[6], "stickTumbaga", CI.component_Plate[6], - RECIPE_IndustrialCentrifugeCasing); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven){ - //Industrial Coke Oven - RECIPE_IndustrialCokeOvenController = GregtechItemList.Industrial_CokeOven.get(1); - RECIPE_IndustrialCokeOvenFrame = GregtechItemList.Casing_CokeOven.get(Casing_Amount); - RECIPE_IndustrialCokeOvenCasingA = GregtechItemList.Casing_CokeOven_Coil1.get(Casing_Amount); - RECIPE_IndustrialCokeOvenCasingB = GregtechItemList.Casing_CokeOven_Coil2.get(Casing_Amount); - - if (LoadedMods.Railcraft){ - //Industrial Coke Oven - RecipeUtils.addShapedGregtechRecipe( - plateCobalt, CI.circuitTier4, plateCobalt, - CI.machineCasing_HV, INPUT_RCCokeOvenBlock, CI.machineCasing_HV, - plateCobalt, CI.circuitTier5, plateCobalt, - RECIPE_IndustrialCokeOvenController); - } - if (LoadedMods.ImmersiveEngineering){ - //Industrial Coke Oven - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[8], CI.circuitTier4, CI.component_Plate[8], - CI.machineCasing_HV, INPUT_IECokeOvenBlock, CI.machineCasing_HV, - CI.component_Plate[8], CI.circuitTier3, CI.component_Plate[8], - RECIPE_IndustrialCokeOvenController); - } - //Coke Oven Frame Casing - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[7], CI.component_Rod[7], CI.component_Plate[7], - CI.component_Rod[7], "frameGtTantalloy61", CI.component_Rod[7], - CI.component_Plate[7], CI.component_Rod[7], CI.component_Plate[7], - RECIPE_IndustrialCokeOvenFrame); - //Coke Oven Coil 1 - RecipeUtils.addShapedGregtechRecipe( - plateBronze, plateBronze, plateBronze, - "frameGtBronze", CI.gearboxCasing_Tier_1, "frameGtBronze", - plateBronze, plateBronze, plateBronze, - RECIPE_IndustrialCokeOvenCasingA); - //Coke Oven Coil 2 - RecipeUtils.addShapedGregtechRecipe( - plateSteel, plateSteel, plateSteel, - "frameGtSteel", CI.gearboxCasing_Tier_2, "frameGtSteel", - plateSteel, plateSteel, plateSteel, - RECIPE_IndustrialCokeOvenCasingB); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialElectrolyzer){ - //Industrial Electrolyzer - RECIPE_IndustrialElectrolyzerController = GregtechItemList.Industrial_Electrolyzer.get(1); - RECIPE_IndustrialElectrolyzerFrame = GregtechItemList.Casing_Electrolyzer.get(Casing_Amount); - - //Electrolyzer Frame Casing - RecipeUtils.addShapedGregtechRecipe( - "platePotin", "stickLongChrome", "platePotin", - "stickLongPotin", "frameGtPotin", "stickLongPotin", - "platePotin", "stickLongPotin", "platePotin", - RECIPE_IndustrialElectrolyzerFrame); - //Industrial Electrolyzer - RecipeUtils.addShapedGregtechRecipe( - "plateStellite", CI.circuitTier5, "plateStellite", - CI.machineCasing_EV, EV_MACHINE_Electrolyzer, CI.machineCasing_EV, - "plateStellite", "rotorStellite", "plateStellite", - RECIPE_IndustrialElectrolyzerController); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress){ - //Industrial Material Press - RECIPE_IndustrialMaterialPressController = GregtechItemList.Industrial_PlatePress.get(1); - RECIPE_IndustrialMaterialPressFrame = GregtechItemList.Casing_MaterialPress.get(Casing_Amount); - - //Material Press Frame Casing - RecipeUtils.addShapedGregtechRecipe( - "plateTitanium", "stickLongTumbaga", "plateTitanium", - "stickTantalloy60", "frameGtTumbaga", "stickTantalloy60", - "plateTitanium", "stickLongTumbaga", "plateTitanium", - RECIPE_IndustrialMaterialPressFrame); - //Industrial Material Press - RecipeUtils.addShapedGregtechRecipe( - "plateTitanium", CI.circuitTier5, "plateTitanium", - CI.machineCasing_EV, EV_MACHINE_BendingMachine, CI.machineCasing_EV, - "plateTitanium", CI.circuitTier5, "plateTitanium", - RECIPE_IndustrialMaterialPressController); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialMacerationStack){ - //Industrial Maceration Stack - RECIPE_IndustrialMacerationStackController = GregtechItemList.Industrial_MacerationStack.get(1); - RECIPE_IndustrialMacerationStackFrame = GregtechItemList.Casing_MacerationStack.get(Casing_Amount); - - //Maceration Frame Casing - RecipeUtils.addShapedGregtechRecipe( - "platePalladium", "platePalladium", "platePalladium", - "stickPlatinum", "frameGtInconel625", "stickPlatinum", - "platePalladium", "stickLongPalladium", "platePalladium", - RECIPE_IndustrialMacerationStackFrame); - //Industrial Maceration stack - RecipeUtils.addShapedGregtechRecipe( - "plateTungstenCarbide", EV_MACHINE_Macerator, "plateTungstenCarbide", - HV_MACHINE_Macerator, CI.circuitTier7, HV_MACHINE_Macerator, - "plateTungstenCarbide", CI.machineCasing_IV, "plateTungstenCarbide", - RECIPE_IndustrialMacerationStackController); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialWireMill){ - //Industrial Wire Factory - RECIPE_IndustrialWireFactoryController = GregtechItemList.Industrial_WireFactory.get(1); - RECIPE_IndustrialWireFactoryFrame = GregtechItemList.Casing_WireFactory.get(Casing_Amount); - - //Wire Factory Frame Casing - RecipeUtils.addShapedGregtechRecipe( - "plateBlueSteel", "stickBlueSteel", "plateBlueSteel", - "stickBlueSteel", "frameGtBlueSteel", "stickBlueSteel", - "plateBlueSteel", "stickBlueSteel", "plateBlueSteel", - RECIPE_IndustrialWireFactoryFrame); - //Industrial Wire Factory - RecipeUtils.addShapedGregtechRecipe( - "plateZeron100", CI.machineCasing_IV, "plateZeron100", - CI.circuitTier5, EV_MACHINE_Wiremill, CI.circuitTier5, - "plateZeron100", CI.machineCasing_IV, "plateZeron100", - RECIPE_IndustrialWireFactoryController); - } - - - - //Tiered Tanks - if (CORE.ConfigSwitches.enableMachine_FluidTanks){ - Logger.WARNING("Is New Horizons Loaded? "+GTNH); - if (!GTNH){ - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[1], CI.component_Plate[1], CI.component_Plate[1], - CI.component_Plate[1], pipeTier1, CI.component_Plate[1], - CI.component_Plate[1], GregtechItemList.Fluid_Cell_144L.get(1), CI.component_Plate[1], - GregtechItemList.GT_FluidTank_ULV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[2], CI.component_Plate[2], CI.component_Plate[2], - CI.component_Plate[2], pipeTier2, CI.component_Plate[2], - CI.component_Plate[2], CI.electricPump_LV, CI.component_Plate[2], - GregtechItemList.GT_FluidTank_LV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[3], CI.component_Plate[3], CI.component_Plate[3], - CI.component_Plate[3], pipeTier3, CI.component_Plate[3], - CI.component_Plate[3], CI.electricPump_MV, CI.component_Plate[3], - GregtechItemList.GT_FluidTank_MV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[4], CI.component_Plate[4], CI.component_Plate[4], - CI.component_Plate[4], pipeTier4, CI.component_Plate[4], - CI.component_Plate[4], CI.electricPump_HV, CI.component_Plate[4], - GregtechItemList.GT_FluidTank_HV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[5], CI.component_Plate[5], CI.component_Plate[5], - CI.component_Plate[5], pipeTier5, CI.component_Plate[5], - CI.component_Plate[5], CI.electricPump_EV, CI.component_Plate[5], - GregtechItemList.GT_FluidTank_EV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[6], CI.component_Plate[6], CI.component_Plate[6], - CI.component_Plate[6], pipeTier6, CI.component_Plate[6], - CI.component_Plate[6], CI.electricPump_IV, CI.component_Plate[6], - GregtechItemList.GT_FluidTank_IV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[7], CI.component_Plate[7], CI.component_Plate[7], - CI.component_Plate[7], pipeTier7, CI.component_Plate[7], - CI.component_Plate[7], CI.electricPump_LuV, CI.component_Plate[7], - GregtechItemList.GT_FluidTank_LuV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[8], CI.component_Plate[8], CI.component_Plate[8], - CI.component_Plate[8], pipeTier8, CI.component_Plate[8], - CI.component_Plate[8], CI.electricPump_ZPM, CI.component_Plate[8], - GregtechItemList.GT_FluidTank_ZPM.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[9], CI.component_Plate[9], CI.component_Plate[9], - CI.component_Plate[9], pipeTier9, CI.component_Plate[9], - CI.component_Plate[9], CI.electricPump_UV, CI.component_Plate[9], - GregtechItemList.GT_FluidTank_UV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[10], CI.component_Plate[10], CI.component_Plate[10], - CI.component_Plate[10], pipeTier10, CI.component_Plate[10], - CI.component_Plate[10], CI.electricPump_MAX, CI.component_Plate[10], - GregtechItemList.GT_FluidTank_MAX.get(1)); - } - else { - - CI.component_Plate[1] = "plateTin"; - pipeTier1 = "pipeLargeClay"; - CI.circuitTier1 = ItemList.Circuit_Primitive.get(1); - CI.component_Plate[2] = "plateCopper"; - pipeTier2 = "pipeHugeClay"; - CI.component_Plate[3] = "plateBronze"; - pipeTier3 = "pipeMediumBronze"; - CI.component_Plate[4] = "plateIron"; - pipeTier4 = "pipeMediumSteel"; - CI.component_Plate[5] = "plateSteel"; - CI.component_Plate[6] = "plateRedstone"; - CI.component_Plate[7] = "plateAluminium"; - CI.component_Plate[8] = "plateDarkSteel"; - ItemStack waterBucket = ItemUtils.getSimpleStack(Items.water_bucket); - - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[1], CI.component_Plate[5], CI.component_Plate[1], - CI.component_Plate[4], pipeTier1, CI.component_Plate[4], - CI.component_Plate[4], waterBucket, CI.component_Plate[4], - GregtechItemList.GT_FluidTank_ULV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[5], CI.component_Plate[4], CI.component_Plate[5], - CI.component_Plate[3], pipeTier2, CI.component_Plate[3], - CI.component_Plate[3], CI.electricPump_LV, CI.component_Plate[3], - GregtechItemList.GT_FluidTank_LV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[8], CI.component_Plate[3], CI.component_Plate[8], - CI.component_Plate[5], pipeTier3, CI.component_Plate[5], - CI.component_Plate[5], CI.electricPump_LV, CI.component_Plate[5], - GregtechItemList.GT_FluidTank_MV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.circuitTier1, CI.component_Plate[7], CI.circuitTier1, - CI.component_Plate[8], pipeTier4, CI.component_Plate[8], - CI.circuitTier1, CI.electricPump_MV, CI.circuitTier1, - GregtechItemList.GT_FluidTank_HV.get(1)); - } - } - - if (CORE.ConfigSwitches.enableMultiblock_MultiTank){ - //Industrial Multi Tank - //RECIPE_IndustrialMultiTankController = GregtechItemList.Industrial_MultiTank.get(1); - RECIPE_IndustrialMultiTankFrame = GregtechItemList.Casing_MultitankExterior.get(Casing_Amount); - - //Industrial Multi Tank Casing - RecipeUtils.addShapedGregtechRecipe( - "stickGrisium", "plateGrisium", "stickGrisium", - "plateGrisium", "frameGtGrisium", "plateGrisium", - "plateGrisium", "plateGrisium", "plateGrisium", - RECIPE_IndustrialMultiTankFrame); - //Industrial Multi Tank - RecipeUtils.addShapedGregtechRecipe( - "pipeHugeTantalloy60", "gearGrisium", "pipeHugeTantalloy60", - CI.circuitTier4, RECIPE_IndustrialMultiTankFrame, CI.circuitTier4, - "plateDoubleGrisium", "rotorGrisium", "plateDoubleGrisium", - RECIPE_IndustrialMultiTankController); - } - //TODO - - //Semi-Fluid Generators - ItemStack[][] aSemiFluidInputs = new ItemStack[3][6]; - aSemiFluidInputs[0] = new ItemStack[]{ - CI.getNumberedBioCircuit(14), - CI.getTieredMachineHull(1, 1), - CI.getElectricPiston(1, GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.circuit, 1, GTNH ? 4 : 2), - CI.getPlate(1, GTNH ? 8 : 4), - CI.getGear(1, GTNH ? 4 : 2) - }; - aSemiFluidInputs[1] = new ItemStack[]{ - CI.getNumberedCircuit(14), - CI.getTieredMachineHull(2, 1), - CI.getElectricPiston(2, GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.circuit, 2, GTNH ? 4 : 2), - CI.getPlate(2, GTNH ? 8 : 4), - CI.getGear(2, GTNH ? 4 : 2) - }; - aSemiFluidInputs[2] = new ItemStack[]{ - CI.getNumberedAdvancedCircuit(14), - CI.getTieredMachineHull(3, 1), - CI.getElectricPiston(3, GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.circuit, 3, GTNH ? 4 : 2), - CI.getPlate(3, GTNH ? 8 : 4), - CI.getGear(3, GTNH ? 4 : 2) - }; - FluidStack[] aSemiFluidFluidInputs = new FluidStack[] { - ALLOY.BRONZE.getFluidStack(144 * 8), - ALLOY.STEEL.getFluidStack(144 * 8), - ELEMENT.getInstance().ALUMINIUM.getFluidStack(144 * 8), - }; - - //ItemUtils.simpleMetaStack("IC2:blockGenerator:7", 7, 1); - ItemStack[] aSemifluids = new ItemStack[] {GregtechItemList.Generator_SemiFluid_LV.get(1), GregtechItemList.Generator_SemiFluid_MV.get(1), GregtechItemList.Generator_SemiFluid_HV.get(1)}; - for (int o=0;o<3;o++) { - CORE.RA.addSixSlotAssemblingRecipe( - aSemiFluidInputs[o], - aSemiFluidFluidInputs[o], - aSemifluids[o], - 20 * 30, - MaterialUtils.getVoltageForTier(o+1)); - } - - if (CORE.ConfigSwitches.enableMultiblock_AlloyBlastSmelter){ - //Industrial Blast Smelter - RECIPE_IndustrialBlastSmelterController = GregtechItemList.Industrial_AlloyBlastSmelter.get(1); - RECIPE_IndustrialBlastSmelterFrame = GregtechItemList.Casing_BlastSmelter.get(Casing_Amount); - RECIPE_IndustrialBlastSmelterCoil = GregtechItemList.Casing_Coil_BlastSmelter.get(Casing_Amount); - - //Blast Smelter - RecipeUtils.addShapedGregtechRecipe( - "plateZirconiumCarbide", CI.circuitTier4, "plateZirconiumCarbide", - cableTier4, EV_MACHINE_AlloySmelter, cableTier4, - "plateZirconiumCarbide", CI.circuitTier3, "plateZirconiumCarbide", - RECIPE_IndustrialBlastSmelterController); - //Blast Smelter Frame Casing - RecipeUtils.addShapedGregtechRecipe( - "plateZirconiumCarbide", CI.component_Rod[5], "plateZirconiumCarbide", - CI.component_Rod[5], "frameGtTumbaga", CI.component_Rod[5], - "plateZirconiumCarbide", CI.component_Rod[5], "plateZirconiumCarbide", - RECIPE_IndustrialBlastSmelterFrame); - //Blast Smelter Coil - RecipeUtils.addShapedGregtechRecipe( - "plateStaballoy", "plateStaballoy", "plateStaballoy", - "frameGtStaballoy", CI.gearboxCasing_Tier_3, "frameGtStaballoy", - "plateStaballoy", "plateStaballoy", "plateStaballoy", - RECIPE_IndustrialBlastSmelterCoil); - } - - if (CORE.ConfigSwitches.enableMultiblock_MatterFabricator){ - //Industrial Matter Fabricator - RECIPE_IndustrialMatterFabController = GregtechItemList.Industrial_MassFab.get(1); - RECIPE_IndustrialMatterFabFrame = GregtechItemList.Casing_MatterFab.get(Casing_Amount); - RECIPE_IndustrialMatterFabCoil = GregtechItemList.Casing_MatterGen.get(Casing_Amount); - - //Matter Fabricator CPU - RecipeUtils.addShapedGregtechRecipe( - CI.getDoublePlate(8, 1), CI.circuitTier5, CI.getPlate(8, 1), - cableTier8, CI.machineCasing_LuV, cableTier8, - CI.getPlate(8, 1), CI.circuitTier5, CI.getPlate(8, 1), - RECIPE_IndustrialMatterFabController); - //Matter Fabricator Frame Casing - RecipeUtils.addShapedGregtechRecipe( - "plateNiobiumCarbide", CI.component_Rod[8], "plateNiobiumCarbide", - CI.component_Rod[8], "frameGtInconel690", CI.component_Rod[8], - "plateNiobiumCarbide", CI.component_Rod[8], "plateNiobiumCarbide", - RECIPE_IndustrialMatterFabFrame); - //Matter Fabricator Coil - RecipeUtils.addShapedGregtechRecipe( - CI.getPlate(6, 1), CI.getPlate(7, 1), CI.getPlate(6, 1), - "frameGtStellite", CI.machineCasing_UV, "frameGtStellite", - CI.getPlate(6, 1), CI.getPlate(7, 1), CI.getPlate(6, 1), - RECIPE_IndustrialMatterFabCoil); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter){ - //Industrial Sieve - RECIPE_IndustrialSieveController = GregtechItemList.Industrial_Sifter.get(1); - RECIPE_IndustrialSieveFrame = GregtechItemList.Casing_Sifter.get(Casing_Amount); - RECIPE_IndustrialSieveGrate = GregtechItemList.Casing_SifterGrate.get(Casing_Amount); - - //Industrial Sieve - RecipeUtils.addShapedGregtechRecipe( - "plateEglinSteel", CI.circuitTier2, "plateEglinSteel", - cableTier3, EV_MACHINE_Sifter, cableTier3, - "plateEglinSteel", CI.circuitTier2, "plateEglinSteel", - RECIPE_IndustrialSieveController); - //Industrial Sieve Casing - RecipeUtils.addShapedGregtechRecipe( - "plateEglinSteel", "plateEglinSteel", "plateEglinSteel", - "plateEglinSteel", "frameGtTumbaga", "plateEglinSteel", - "plateEglinSteel", "plateEglinSteel", "plateEglinSteel", - RECIPE_IndustrialSieveFrame); - //Industrial Sieve Grate - RecipeUtils.addShapedGregtechRecipe( - "frameGtEglinSteel", "wireFineSteel", "frameGtEglinSteel", - "wireFineSteel", "wireFineSteel", "wireFineSteel", - "frameGtEglinSteel", "wireFineSteel", "frameGtEglinSteel", - RECIPE_IndustrialSieveGrate); - } - - if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ - //Industrial Tree Farmer - RECIPE_TreeFarmController = GregtechItemList.Industrial_TreeFarm.get(1); - RECIPE_TreeFarmFrame = GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.get(Casing_Amount); - //Industrial Tree Farm Controller - if (!GTNH) { - RecipeUtils.addShapedGregtechRecipe( - "plateEglinSteel", "rotorEglinSteel", "plateEglinSteel", - "cableGt02Steel", "pipeMediumSteel", "cableGt02Steel", - "plateEglinSteel", CI.machineCasing_MV, "plateEglinSteel", - RECIPE_TreeFarmController); - } - else { - RecipeUtils.addShapedGregtechRecipe( - "plateEglinSteel", "rotorEglinSteel", "plateEglinSteel", - "cableGt02Silver", "pipeMediumStainlessSteel", "cableGt02Silver", - "plateEglinSteel", CI.machineCasing_HV, "plateEglinSteel", - RECIPE_TreeFarmController); - } - //Industrial Tree Farm Frame - RecipeUtils.addShapedGregtechRecipe( - ItemUtils.getSimpleStack(Blocks.dirt), ItemUtils.getSimpleStack(Blocks.dirt), ItemUtils.getSimpleStack(Blocks.dirt), - "plankWood", "frameGtTumbaga", "plankWood", - "plankWood", "plankWood", "plankWood", - RECIPE_TreeFarmFrame); - } - - if (CORE.ConfigSwitches.enableMachine_Tesseracts){ - //Tesseracts - RECIPE_TesseractGenerator = GregtechItemList.GT4_Tesseract_Generator.get(1); - RECIPE_TesseractTerminal = GregtechItemList.GT4_Tesseract_Terminal.get(1); - //Tesseract Generator - RecipeUtils.addShapedGregtechRecipe( - "plateTitanium","circuitMaster","plateTitanium", - "circuitMaster",ItemUtils.getSimpleStack(Blocks.ender_chest),"circuitMaster", - "plateTitanium",GregtechItemList.Gregtech_Computer_Cube.get(1),"plateTitanium", - RECIPE_TesseractGenerator); - //Tesseract Terminal - RecipeUtils.addShapedGregtechRecipe( - "plateTitanium","circuitElite","plateTitanium", - "circuitElite",ItemUtils.getSimpleStack(Blocks.ender_chest),"circuitElite", - "plateTitanium",CI.machineHull_EV,"plateTitanium", - RECIPE_TesseractTerminal); - } - - if (CORE.ConfigSwitches.enableMachine_SimpleWasher){ - ItemStack plateWrought = ItemUtils.getItemStackOfAmountFromOreDict("plateWroughtIron", 1); - ItemStack washerPipe; - - - if (CORE.ConfigSwitches.enableCustom_Pipes){ - washerPipe = ItemUtils.getItemStackOfAmountFromOreDict("pipeLargeClay", 1); - RecipeUtils.addShapedGregtechRecipe( - plateWrought, CI.electricPump_LV, plateWrought, - plateWrought, washerPipe, plateWrought, - plateWrought, CI.machineCasing_ULV, plateWrought, - GregtechItemList.SimpleDustWasher_ULV.get(1)); - } - //Add Recipe - washerPipe = ItemUtils.getItemStackOfAmountFromOreDict("pipeLargeCopper", 1); - RecipeUtils.addShapedGregtechRecipe( - plateWrought, CI.electricPump_LV, plateWrought, - plateWrought, washerPipe, plateWrought, - plateWrought, CI.machineCasing_ULV, plateWrought, - GregtechItemList.SimpleDustWasher_ULV.get(1)); - - int aSimpleWasherTier = 2; - int aSlot = 0; - ItemStack[][] aInputsForSimpleWashers = new ItemStack[4][6]; - - aInputsForSimpleWashers[0] = new ItemStack[] { - CI.getTieredMachineHull(2), - CI.getTieredComponent(OrePrefixes.screw, 2, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.plate, 1, GTNH ? 8 : 4), - CI.getTieredComponent(OrePrefixes.rod, 2, GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.circuit, 2, GTNH ? 3 : 1), - - }; - aInputsForSimpleWashers[1] = new ItemStack[] { - CI.getTieredMachineHull(4), - CI.getTieredComponent(OrePrefixes.screw, 4, GTNH ? 24 : 12), - CI.getTieredComponent(OrePrefixes.plate, 3, GTNH ? 12 : 6), - CI.getTieredComponent(OrePrefixes.rod, 4, GTNH ? 6 : 3), - CI.getTieredComponent(OrePrefixes.circuit, 4, GTNH ? 4 : 2), - - }; - aInputsForSimpleWashers[2] = new ItemStack[] { - CI.getTieredMachineHull(6), - CI.getTieredComponent(OrePrefixes.screw, 6, GTNH ? 48 : 24), - CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 16 : 8), - CI.getTieredComponent(OrePrefixes.rod, 6, GTNH ? 8 : 4), - CI.getTieredComponent(OrePrefixes.circuit, 6, GTNH ? 6 : 3), - - }; - aInputsForSimpleWashers[3] = new ItemStack[] { - CI.getTieredMachineHull(8), - CI.getTieredComponent(OrePrefixes.screw, 8, GTNH ? 64 : 32), - CI.getTieredComponent(OrePrefixes.plate, 7, GTNH ? 32 : 16), - CI.getTieredComponent(OrePrefixes.rod, 8, GTNH ? 10 : 5), - CI.getTieredComponent(OrePrefixes.circuit, 8, GTNH ? 8 : 4), - - }; - - - - - - - ItemStack[] aSimpleWashers = new ItemStack[] {GregtechItemList.SimpleDustWasher_MV.get(1), GregtechItemList.SimpleDustWasher_EV.get(1), GregtechItemList.SimpleDustWasher_LuV.get(1), GregtechItemList.SimpleDustWasher_UV.get(1)}; - for (int i=0;i<4;i++) { - - CORE.RA.addSixSlotAssemblingRecipe( - aInputsForSimpleWashers[aSlot], - CI.getTieredFluid(aSimpleWasherTier, 144 * aSimpleWasherTier), - aSimpleWashers[aSlot], - 20 * 15 * aSimpleWasherTier, - (int) GT_Values.V[aSimpleWasherTier]); - - aSimpleWasherTier += 2; - aSlot++; - } - } - - if (CORE.ConfigSwitches.enableMachine_Pollution && PollutionUtils.isPollutionEnabled()){ - - RecipeUtils.addShapedGregtechRecipe( - "plateCarbon", "plateCarbon", "plateCarbon", - "dustCarbon", "dustCarbon", "dustCarbon", - "plateCarbon", "plateCarbon", "plateCarbon", - ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1)); - - RecipeUtils.addShapedGregtechRecipe( - "plateCarbon", "plateCarbon", "plateCarbon", - "cellLithiumPeroxide", "dustCarbon", "cellLithiumPeroxide", - "plateCarbon", "plateCarbon", "plateCarbon", - ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1)); - - //Pollution Detector - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[1], CI.sensor_MV, CI.component_Plate[1], - CI.component_Plate[2], CI.electricMotor_ULV, CI.component_Plate[2], - CI.getTieredCircuit(1), CI.machineHull_LV, CI.getTieredCircuit(0), - GregtechItemList.Pollution_Detector.get(1)); - - //ULV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[0], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[0], - CI.component_Plate[0], CI.electricMotor_ULV, CI.component_Plate[0], - CI.getTieredCircuit(0), CI.machineHull_ULV, CI.getTieredCircuit(0), - GregtechItemList.Pollution_Cleaner_ULV.get(1)); - //LV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[1], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[1], - CI.component_Plate[1], CI.electricMotor_LV, CI.component_Plate[1], - CI.getTieredCircuit(1), CI.machineHull_LV, CI.getTieredCircuit(1), - GregtechItemList.Pollution_Cleaner_LV.get(1)); - //MV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[2], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[2], - CI.component_Plate[2], CI.electricMotor_MV, CI.component_Plate[2], - CI.getTieredCircuit(2), CI.machineHull_MV, CI.getTieredCircuit(2), - GregtechItemList.Pollution_Cleaner_MV.get(1)); - //HV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[3], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[3], - CI.component_Plate[3], CI.electricMotor_HV, CI.component_Plate[3], - CI.getTieredCircuit(3), CI.machineHull_HV, CI.getTieredCircuit(3), - GregtechItemList.Pollution_Cleaner_HV.get(1)); - //EV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[4], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[4], - CI.component_Plate[4], CI.electricMotor_EV, CI.component_Plate[4], - CI.getTieredCircuit(4), CI.machineHull_EV, CI.getTieredCircuit(4), - GregtechItemList.Pollution_Cleaner_EV.get(1)); - //IV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[5], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[5], - CI.component_Plate[5], CI.electricMotor_IV, CI.component_Plate[5], - CI.getTieredCircuit(5), CI.machineHull_IV, CI.getTieredCircuit(5), - GregtechItemList.Pollution_Cleaner_IV.get(1)); - //LuV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[6], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[6], - CI.component_Plate[6], CI.electricMotor_LuV, CI.component_Plate[6], - CI.getTieredCircuit(6), CI.machineHull_LuV, CI.getTieredCircuit(6), - GregtechItemList.Pollution_Cleaner_LuV.get(1)); - //ZPM - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[7], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[7], - CI.component_Plate[7], CI.electricMotor_ZPM, CI.component_Plate[7], - CI.getTieredCircuit(7), CI.machineHull_ZPM, CI.getTieredCircuit(7), - GregtechItemList.Pollution_Cleaner_ZPM.get(1)); - //UV - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[8], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[8], - CI.component_Plate[8], CI.electricMotor_UV, CI.component_Plate[8], - CI.getTieredCircuit(8), CI.machineHull_UV, CI.getTieredCircuit(8), - GregtechItemList.Pollution_Cleaner_UV.get(1)); - //MAX - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[9], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[9], - CI.component_Plate[9], CI.electricMotor_MAX, CI.component_Plate[9], - CI.getTieredCircuit(9), CI.machineHull_MAX, CI.getTieredCircuit(9), - GregtechItemList.Pollution_Cleaner_MAX.get(1)); - - - } - - if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){ - RECIPE_ThermalBoilerController = GregtechItemList.GT4_Thermal_Boiler.get(1); - RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(GTNH ? 1 : 2); - ItemStack centrifugeHV = GTNH ? ItemList.Machine_IV_Centrifuge.get(1) : ItemList.Machine_EV_Centrifuge.get(1); - - RecipeUtils.addShapedGregtechRecipe( - "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", - "gearGtTitanium", CI.getTieredCircuitOreDictName(6), "gearGtTitanium", - "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", - RECIPE_ThermalBoilerController); - - RecipeUtils.addShapedGregtechRecipe( - "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", - "gearGtTungstenSteel", CI.getTieredCircuitOreDictName(5), "gearGtTungstenSteel", - "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", - RECIPE_ThermalBoilerController); - - RecipeUtils.addShapedGregtechRecipe( - ALLOY.MARAGING350.getPlate(1), "plateStainlessSteel", ALLOY.MARAGING350.getPlate(1), - "circuitAdvanced", CI.machineCasing_HV, "circuitAdvanced", - ALLOY.MARAGING350.getPlate(1), ALLOY.MARAGING350.getPlate(1), ALLOY.MARAGING350.getPlate(1), - RECIPE_ThermalBoilerCasing); - - //Lava Filter Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - CI.getNumberedCircuit(18), - ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", GTNH ? 64 : 32), - ItemUtils.getItemStackOfAmountFromOreDict("wireFineSteel", GTNH ? 64 : 32), - ItemUtils.getItemStackOfAmountFromOreDict("ringTumbaga", GTNH ? 32 : 16), - ItemUtils.getItemStackOfAmountFromOreDict("foilCopper", GTNH ? 8 : 4), - ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemPartCarbonMesh", "RawCarbonMesh", 0, 64), - - }, - CI.getTieredFluid(3, 144), - ItemUtils.getSimpleStack(ModItems.itemLavaFilter, GTNH ? 8 : 16), - 1600, - 240 - ); - } - - //Air Intake Hatch - ItemList FluidRegulator_IV = ItemUtils.getValueOfItemList("FluidRegulator_IV", ItemList.Pump_IV); - ItemStack aTieredFluidRegulator = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? FluidRegulator_IV.get(1) : ItemList.Pump_IV.get(1); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[6], ItemList.Casing_Grate.get(1), CI.component_Plate[6], - CI.component_Plate[6], aTieredFluidRegulator, CI.component_Plate[6], - CI.getTieredCircuit(4), ItemList.Hatch_Input_IV.get(1), CI.getTieredCircuit(4), - GregtechItemList.Hatch_Air_Intake.get(1)); - - if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ - - //Thorium Reactor - RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1); - RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(1); //Zeron - RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(1); //Hastelloy - - ItemStack controlCircuit = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); - if(!GTNH) { - RecipeUtils.addShapedGregtechRecipe( - controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, - "plateDoubleHastelloyN", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDoubleHastelloyN", - "plateThorium232", CI.machineHull_EV, "plateThorium232", - RECIPE_LFTRController); - } else { - RecipeUtils.addShapedGregtechRecipe( - controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, - "plateDoubleHastelloyN", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDoubleHastelloyN", - "plateThorium232", CI.machineHull_IV, "plateThorium232", - RECIPE_LFTRController); - } - RecipeUtils.addShapedGregtechRecipe( - "plateDoubleZeron100", CI.craftingToolScrewdriver, "plateDoubleZeron100", - "gearGtTalonite", CI.fieldGenerator_MV, "gearGtTalonite", - "plateDoubleZeron100", CI.craftingToolHammer_Hard, "plateDoubleZeron100", - RECIPE_LFTRInnerCasing); - - ItemStack IC2HeatPlate = ItemUtils.getItemStackFromFQRN("IC2:reactorPlatingHeat", 1); - RecipeUtils.addShapedGregtechRecipe( - "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", - IC2HeatPlate, "frameGtHastelloyC276", IC2HeatPlate, - "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", - RECIPE_LFTROuterCasing); - - //LFTR Control Circuit - ItemStack circuitT5 = ItemList.Circuit_Master.get(1); - GT_Values.RA.addAssemblerRecipe(circuitT5, CI.fieldGenerator_HV, controlCircuit, 240*20, 500); - - - //Fission Fuel Plant - RecipeUtils.addShapedGregtechRecipe( - CI.getTieredCircuitOreDictName(5), CI.craftingToolSolderingIron, CI.getTieredCircuitOreDictName(5), - "plateDenseTungstenSteel", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDenseTungstenSteel", - "gearGtStellite", CI.machineHull_IV, "gearGtStellite", - GregtechItemList.Industrial_FuelRefinery.get(1)); - - ItemStack mInnerTank; - - if (GTNH || !CORE.ConfigSwitches.enableMachine_FluidTanks){ - mInnerTank = ItemList.Quantum_Tank_LV.get(1); - } - else { - mInnerTank = GregtechItemList.GT_FluidTank_EV.get(1); - } - - //Incoloy Casing - RecipeUtils.addShapedGregtechRecipe( - "plateIncoloyDS", "pipeHugeStaballoy", "plateIncoloyDS", - "gearGtIncoloyDS", mInnerTank, "gearGtIncoloyDS", - "plateIncoloyDS", "pipeHugeStaballoy", "plateIncoloyDS", - GregtechItemList.Casing_Refinery_Internal.get(Casing_Amount)); - - //Hastelloy-N Sealant Casing - RecipeUtils.addShapedGregtechRecipe( - "plateIncoloyMA956", "plateHastelloyN", "plateIncoloyMA956", - "plateHastelloyN", "frameGtHastelloyC276", "plateHastelloyN", - "plateIncoloyMA956", "plateHastelloyN", "plateIncoloyMA956", - GregtechItemList.Casing_Refinery_External.get(Casing_Amount)); - - //Hastelloy-X Structural Casing - RecipeUtils.addShapedGregtechRecipe( - "ringInconel792", "gearGtHastelloyX", CI.component_Plate[5], - CI.craftingToolHammer_Hard, "frameGtHastelloyC276", CI.craftingToolWrench, - CI.component_Plate[5], CI.getTieredMachineCasing(4), "ringInconel792", - GregtechItemList.Casing_Refinery_Structural.get(Casing_Amount)); - - RecipeUtils.addShapedGregtechRecipe( - CI.getPlate(5, 1), ALLOY.HASTELLOY_X.getPlateDouble(1), CI.getPlate(5, 1), - CI.getPlate(5, 1), CI.getTieredMachineCasing(5), CI.getPlate(5, 1), - CI.getRobotArm(5, 1), ItemList.Casing_FrostProof.get(1), CI.getRobotArm(5, 1), - GregtechItemList.ColdTrap_IV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.getPlate(7, 1), ALLOY.HS188A.getPlateDouble(1), CI.getPlate(7, 1), - CI.getPlate(7, 1), GregtechItemList.ColdTrap_IV.get(1), CI.getPlate(7, 1), - CI.getRobotArm(7, 1), ItemList.Casing_FrostProof.get(1), CI.getRobotArm(7, 1), - GregtechItemList.ColdTrap_ZPM.get(1)); - - RecipeUtils.addShapedGregtechRecipe( - CI.getFieldGenerator(3, 1), CI.getRobotArm(5, 1), CI.getPlate(5, 1), - ALLOY.HASTELLOY_N.getPlateDouble(1), ItemList.Machine_IV_ChemicalReactor.get(1), ALLOY.HASTELLOY_N.getPlateDouble(1), - CI.getPlate(5, 1), ALLOY.HASTELLOY_N.getPlateDouble(1), CI.getFieldGenerator(3, 1), - GregtechItemList.ReactorProcessingUnit_IV.get(1)); - RecipeUtils.addShapedGregtechRecipe( - CI.getFieldGenerator(5, 1), CI.getRobotArm(7, 1), CI.getPlate(7, 1), - ALLOY.HS188A.getPlateDouble(1), GregtechItemList.ReactorProcessingUnit_IV.get(1), ALLOY.HS188A.getPlateDouble(1), - CI.getPlate(7, 1), ALLOY.HS188A.getPlateDouble(1), CI.getFieldGenerator(5, 1), - GregtechItemList.ReactorProcessingUnit_ZPM.get(1)); - - } - - //Shelves - RecipeUtils.addShapedGregtechRecipe( - "screwWood", "plateWood", "screwWood", - CI.craftingToolHammer_Hard, "frameGtWood", CI.craftingToolHammer_Soft, - "plateWood", "plateWood", "plateWood", - GregtechItemList.GT4_Shelf.get(2)); - - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf.get(1)}, GregtechItemList.GT4_Shelf_Compartment.get(1)); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_Compartment.get(1)}, GregtechItemList.GT4_Shelf_Desk.get(1)); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_Desk.get(1)}, GregtechItemList.GT4_Shelf_Iron.get(1)); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_Iron.get(1)}, GregtechItemList.GT4_Shelf_FileCabinet.get(1)); - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_FileCabinet.get(1)}, GregtechItemList.GT4_Shelf.get(1)); - - - //Cyclotron - if (CORE.ConfigSwitches.enableMultiblock_Cyclotron){ - RECIPE_CyclotronController = GregtechItemList.COMET_Cyclotron.get(1); - RECIPE_CyclotronOuterCasing = GregtechItemList.Casing_Cyclotron_External.get(Casing_Amount); - RECIPE_CyclotronInnerCoil = GregtechItemList.Casing_Cyclotron_Coil.get(1); - - //Outer Casing - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemList.Casing_FrostProof.get(1), - ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 0, GTNH ? 8 : 4), - ALLOY.INCOLOY_DS.getPlate(GTNH ? 16 : 8), - ALLOY.INCONEL_690.getScrew(GTNH ? 32 : 16), - ALLOY.EGLIN_STEEL.getLongRod(GTNH ? 16 : 4), - CI.getElectricPiston(3, GTNH ? 4 : 2) - }, - ALLOY.ZIRCONIUM_CARBIDE.getFluidStack(144 * 8), //Input Fluid - RECIPE_CyclotronOuterCasing, - 30 * 20 * 2, - MaterialUtils.getVoltageForTier(4)); - - - //Inner Coil - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemList.Casing_Coil_Nichrome.get(1), - ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 1, GTNH ? 32 : 8), - ALLOY.INCOLOY_MA956.getPlate(GTNH ? 16 : 8), - ALLOY.TANTALLOY_61.getBolt(GTNH ? 32 : 16), - ALLOY.INCOLOY_020.getScrew(GTNH ? 64 : 32), - CI.getFieldGenerator(4, GTNH ? 2 : 1) - }, - ALLOY.HG1223.getFluidStack(144 * 5), //Input Fluid - RECIPE_CyclotronInnerCoil, - 60 * 20 * 2, - MaterialUtils.getVoltageForTier(5)); - - - //Controller - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.machineHull_IV, - ItemUtils.getSimpleStack(RECIPE_CyclotronInnerCoil, GTNH ? 4 : 2), - ALLOY.INCOLOY_020.getPlate(GTNH ? 16 : 8), - ALLOY.TANTALLOY_61.getGear(GTNH ? 4 : 2), - ALLOY.INCOLOY_MA956.getScrew(GTNH ? 64 : 16), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 6 : 5), GTNH ? 8 : 16) - }, - ALLOY.INCOLOY_020.getFluidStack(144 * 9), //Input Fluid - RECIPE_CyclotronController, - 60 * 20 * 5, - MaterialUtils.getVoltageForTier(5)); - } - - // Mazut - GT_ModHandler.addCraftingRecipe( - GregtechItemList.Controller_LargeSemifluidGenerator.get(1L), - CI.bitsd, - new Object[]{ - "PCP", - "EME", - "GWG", - 'M', ItemList.Hull_EV, - 'P', ItemList.Electric_Piston_EV, - 'E', ItemList.Electric_Pump_EV, - 'C', OrePrefixes.circuit.get(Materials.Data), - 'W', OrePrefixes.cableGt08.get(Materials.Electrum), - 'G', ALLOY.INCONEL_792.getGear(1) - }); - - - if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation){ - RecipeUtils.addShapedRecipe( - "screwTitanium", "plateIncoloy020", "screwTitanium", - "plateIncoloy020", "frameGtIncoloyMA956", "plateIncoloy020", - "screwTitanium", "plateIncoloy020", "screwTitanium", - GregtechItemList.Casing_Power_SubStation.get(Casing_Amount)); - - ItemStack mBattery = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); - - RecipeUtils.addShapedRecipe( - "plateIncoloyMA956", mBattery, "plateIncoloyMA956", - GregtechItemList.Casing_Power_SubStation.get(1), GregtechItemList.Casing_Vanadium_Redox.get(1), GregtechItemList.Casing_Power_SubStation.get(1), - "plateIncoloy020", "plateIncoloyMA956", "plateIncoloy020", - GregtechItemList.PowerSubStation.get(1)); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialThermalCentrifuge){ - RecipeUtils.addShapedRecipe( - "plateRedSteel", CI.craftingToolHammer_Hard, "plateRedSteel", - "plateRedSteel", "frameGtBlackSteel", "plateRedSteel", - "plateRedSteel", CI.craftingToolWrench, "plateRedSteel", - GregtechItemList.Casing_ThermalCentrifuge.get(Casing_Amount)); - - RecipeUtils.addShapedRecipe( - "plateRedSteel","circuitData","plateRedSteel", - "stickTalonite",EV_MACHINE_ThermalCentrifuge,"stickTalonite", - "plateRedSteel","gearGtTalonite","plateRedSteel", - GregtechItemList.Industrial_ThermalCentrifuge.get(1)); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant){ - RecipeUtils.addShapedRecipe( - "plateGrisium", CI.craftingToolHammer_Hard, "plateGrisium", - "plateTalonite", "frameGtGrisium", "plateTalonite", - "plateGrisium", CI.craftingToolWrench, "plateGrisium", - GregtechItemList.Casing_WashPlant.get(Casing_Amount)); - - RecipeUtils.addShapedRecipe( - "plateGrisium",CI.electricPump_MV,"plateGrisium", - "plateTalonite",EV_MACHINE_OreWasher,"plateTalonite", - "plateGrisium","circuitData","plateGrisium", - GregtechItemList.Industrial_WashPlant.get(1)); - } - - if (CORE.ConfigSwitches.enableMultiblock_LargeAutoCrafter) { - - ItemStack aCoreBlock = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK - ? ItemUtils.getValueOfItemList("Block_IridiumTungstensteel", 1, ItemUtils.getItemStackOfAmountFromOreDict("blockOsmiridium", 1)) - : ItemUtils.getItemStackOfAmountFromOreDict("blockOsmiridium", 1); - - aCoreBlock.stackSize = GTNH ? 2 : 1; - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getSimpleStack(GregtechItemList.Casing_Multi_Use.get(1), GTNH ? 2 : 1), - aCoreBlock, - CI.getTieredComponent(OrePrefixes.circuit, GTNH ? 3 : 2, 16), - CI.getTieredComponent(OrePrefixes.screw, GTNH ? 6 : 5, 32), - CI.getTieredComponent(OrePrefixes.bolt, GTNH ? 6 : 5, 12), - CI.getTieredComponent(OrePrefixes.plate, GTNH ? 7 : 6, 8), }, - CI.getTertiaryTieredFluid(6, 144 * (GTNH ? 12 : 4)), - GregtechItemList.Casing_Autocrafter.get(Casing_Amount), 20 * 60 * 2, - MaterialUtils.getVoltageForTier(GTNH ? 6 : 5)); - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - GregtechItemList.Casing_Refinery_Structural.get(4), - ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR, GTNH ? 2 : 1), - CI.getTieredComponent(OrePrefixes.cableGt08, GTNH ? 7 : 6, GTNH ? 32 : 16), - CI.getTransmissionComponent(GTNH ? 6 : 5, 2), - GregtechItemList.Gregtech_Computer_Cube.get(1), - }, - CI.getTieredFluid(7, 144 * (GTNH ? 32 : 8)), GregtechItemList.GT4_Multi_Crafter.get(1), - 20 * 60 * 5, MaterialUtils.getVoltageForTier(GTNH ? 6 : 5)); - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getSimpleStack(GregtechItemList.Casing_Multi_Use.get(1), Casing_Amount), - CI.getEmitter(GTNH ? 5 : 4, GTNH ? 4 : 2), CI.getRobotArm(GTNH ? 5 : 4, GTNH ? 4 : 2), - CI.getTieredComponent(OrePrefixes.circuit, GTNH ? 3 : 2, 8), - CI.getTieredComponent(OrePrefixes.screw, GTNH ? 4 : 3, 8), - CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 16 : 4), }, - CI.getAlternativeTieredFluid(5, 144 * 4), ItemUtils.getSimpleStack(ModBlocks.blockProjectTable), - 20 * 30 * 3, MaterialUtils.getVoltageForTier(GTNH ? 5 : 4)); - - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCuttingMachine){ - ItemStack plate = ALLOY.MARAGING300.getPlate(1); - RecipeUtils.addShapedRecipe( - plate, CI.craftingToolHammer_Hard, plate, - "plateStellite", "frameGtTalonite", "plateStellite", - plate, CI.craftingToolWrench, plate, - GregtechItemList.Casing_CuttingFactoryFrame.get(Casing_Amount)); - - RecipeUtils.addShapedRecipe( - plate,CI.getTieredCircuit(3),plate, - "wireFinePlatinum", EV_MACHINE_Cutter, "wireFinePlatinum", - plate,CI.getTieredCircuit(4),plate, - GregtechItemList.Industrial_CuttingFactoryController.get(1)); - } - - //EV_MACHINE_Extruder - if (CORE.ConfigSwitches.enableMultiblock_IndustrialExtrudingMachine){ - ItemStack plate = ALLOY.INCONEL_690.getPlate(1); - RecipeUtils.addShapedRecipe( - plate, CI.craftingToolHammer_Hard, plate, - "plateTalonite", "frameGtStaballoy", "plateTalonite", - plate, CI.craftingToolWrench, plate, - GregtechItemList.Casing_Extruder.get(Casing_Amount)); - - RecipeUtils.addShapedRecipe( - plate,CI.getTieredCircuit(4),plate, - CI.electricPiston_EV, EV_MACHINE_Extruder, CI.electricPiston_EV, - plate,CI.getTieredCircuit(4),plate, - GregtechItemList.Industrial_Extruder.get(1)); - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialFishingPort){ - ItemStack plate = ALLOY.AQUATIC_STEEL.getPlate(1); - RecipeUtils.addShapedRecipe( - plate, CI.craftingToolHammer_Hard, plate, - "plateEglinSteel", "frameGtEglinSteel", "plateEglinSteel", - plate, CI.craftingToolWrench, plate, - GregtechItemList.Casing_FishPond.get(Casing_Amount)); - - RecipeUtils.addShapedRecipe( - plate,CI.getTieredCircuit(3),plate, - "wireFineElectrum", ItemUtils.getSimpleStack(ModBlocks.blockFishTrap), "wireFineElectrum", - plate,CI.getTieredCircuit(2),plate, - GregtechItemList.Industrial_FishingPond.get(1)); - } - - if (true) { - //Advanced Vacuum Freezer - ItemStack plate = ALLOY.HG1223.getPlateDouble(1); - ItemStack gear = ALLOY.INCOLOY_MA956.getGear(1); - ItemStack frame = ALLOY.LAFIUM.getFrameBox(1); - ItemStack cell1 = ItemList.Reactor_Coolant_He_6.get(1); - ItemStack cell2 = ItemList.Reactor_Coolant_NaK_6.get(1); - - RecipeUtils.addShapedRecipe( - plate, gear, plate, - cell1, frame, cell2, - plate, gear, plate, - GregtechItemList.Casing_AdvancedVacuum.get(Casing_Amount)); - RecipeUtils.addShapedRecipe( - gear,CI.getTieredCircuit(6),gear, - CI.electricPiston_IV, GregtechItemList.Casing_AdvancedVacuum.get(1), CI.electricPiston_IV, - plate, GregtechItemList.Gregtech_Computer_Cube.get(1), plate, - GregtechItemList.Industrial_Cryogenic_Freezer.get(1)); - - //Advanced Blast Furnace - plate = ALLOY.HASTELLOY_N.getPlateDouble(1); - gear = ALLOY.HASTELLOY_W.getGear(1); - frame = ALLOY.HASTELLOY_X.getFrameBox(1); - cell1 = ItemUtils.simpleMetaStack("IC2:reactorHeatSwitchDiamond:1", 1, 1); - cell2 = ItemUtils.simpleMetaStack("IC2:reactorVentGold:1", 1, 1); - ItemStack cell3 = ItemUtils.simpleMetaStack("IC2:reactorVentDiamond:1:1", 1, 1); - - RecipeUtils.addShapedRecipe( - plate, cell1, plate, - cell3, frame, cell2, - plate, gear, plate, - GregtechItemList.Casing_Adv_BlastFurnace.get(Casing_Amount)); - RecipeUtils.addShapedRecipe( - gear,CI.getTieredCircuit(6),gear, - CI.robotArm_IV, GregtechItemList.Casing_Adv_BlastFurnace.get(1), CI.robotArm_IV, - plate, GregtechItemList.Gregtech_Computer_Cube.get(1), plate, - GregtechItemList.Machine_Adv_BlastFurnace.get(1)); - - //Advanced Implosion Compressor - plate = ItemUtils.getItemStackOfAmountFromOreDict("plateAlloyIridium", 1); - gear = ALLOY.LEAGRISIUM.getGear(1); - frame = ALLOY.CINOBITE.getFrameBox(1); - cell1 = ItemUtils.simpleMetaStack("IC2:reactorHeatSwitchDiamond:1", 1, 1); - cell2 = ItemUtils.simpleMetaStack("IC2:reactorVentGold:1", 1, 1); - - RecipeUtils.addShapedRecipe( - gear,CI.getTieredCircuit(6),gear, - CI.fieldGenerator_IV, CI.machineHull_ZPM, CI.robotArm_IV, - plate, GregtechItemList.Gregtech_Computer_Cube.get(1), plate, - GregtechItemList.Machine_Adv_ImplosionCompressor.get(1)); - - - - //Supply Depot - plate = ALLOY.TUNGSTEN_CARBIDE.getPlateDouble(1); - gear = ALLOY.TRINIUM_TITANIUM.getRing(1); - frame = ALLOY.TUNGSTEN_CARBIDE.getFrameBox(1); - cell1 = CI.conveyorModule_EV; - cell2 = CI.electricMotor_IV; - ItemStack casingAmazon = GregtechItemList.Casing_AmazonWarehouse.get(1); - ItemStack aTieredUnboxinator = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? ItemUtils.getValueOfItemList("Machine_LuV_Unboxinator", 1, ItemList.Machine_IV_Unboxinator.get(1)) : ItemList.Machine_IV_Unboxinator.get(1); - - - RecipeUtils.addShapedRecipe( - plate, ItemUtils.getItemStackOfAmountFromOreDict("cableGt12VanadiumGallium", 1), plate, - cell1, frame, cell2, - plate, gear, plate, - GregtechItemList.Casing_AmazonWarehouse.get(Casing_Amount)); - RecipeUtils.addShapedRecipe( - casingAmazon, CI.getTieredCircuit(7), casingAmazon, - CI.robotArm_LuV, aTieredUnboxinator, CI.robotArm_LuV, - CI.conveyorModule_LuV, GregtechItemList.Gregtech_Computer_Cube.get(1), CI.conveyorModule_LuV, - GregtechItemList.Amazon_Warehouse_Controller.get(1)); - - - //Industrial Mixing Machine - RecipeUtils.addShapedRecipe( - "plateStaballoy",CI.getTieredCircuit(5),"plateStaballoy", - "plateZirconiumCarbide", EV_MACHINE_Mixer, "plateZirconiumCarbide", - "plateStaballoy",CI.getTieredCircuit(5),"plateStaballoy", - GregtechItemList.Industrial_Mixer.get(1)); - - } - - if (CORE.ConfigSwitches.enableMultiblock_IndustrialMultiMachine){ - ItemStack plate = ALLOY.STABALLOY.getPlate(1); - - - ItemStack o_Compressor; - ItemStack o_Lathe; - ItemStack o_Electromagnet; - ItemStack o_Fermenter; - ItemStack o_Distillery; - ItemStack o_Extractor; - if (GTNH) { - o_Compressor = ItemList.Machine_IV_Compressor.get(1); - o_Lathe = ItemList.Machine_IV_Lathe.get(1); - o_Electromagnet = ItemList.Machine_IV_Polarizer.get(1); - o_Fermenter = ItemList.Machine_IV_Fermenter.get(1); - o_Distillery = ItemList.Machine_IV_FluidExtractor.get(1); - o_Extractor = ItemList.Machine_IV_Extractor.get(1); - } - else { - o_Compressor = ItemList.Machine_EV_Compressor.get(1); - o_Lathe = ItemList.Machine_EV_Lathe.get(1); - o_Electromagnet = ItemList.Machine_EV_Polarizer.get(1); - o_Fermenter = ItemList.Machine_EV_Fermenter.get(1); - o_Distillery = ItemList.Machine_EV_FluidExtractor.get(1); - o_Extractor = ItemList.Machine_EV_Extractor.get(1); - } - RecipeUtils.addShapedRecipe( - plate, CI.craftingToolHammer_Hard, plate, - "plateStainlessSteel", "frameGtZirconiumCarbide", "plateStainlessSteel", - plate, CI.craftingToolWrench, plate, - GregtechItemList.Casing_Multi_Use.get(Casing_Amount)); - - RecipeUtils.addShapedRecipe( - o_Compressor, o_Lathe, o_Electromagnet, - plate, ItemUtils.getSimpleStack(ModBlocks.blockProjectTable), plate, - o_Fermenter, o_Distillery, o_Extractor, - GregtechItemList.Industrial_MultiMachine.get(1)); - } - - - - - /* - * 6/1/19 - Content additions - */ - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - - /* - * Fusion MK4 - */ - - //Fusion MK4 Controller - CORE.RA.addAssemblylineRecipe( - ItemList.FusionComputer_UV.get(1), - (int) GT_Values.V[5], - new Object[] { - new Object[] {CI.getTieredCircuitOreDictName(9), 4 * (GTNH ? 2 : 1)}, - new Object[] {CI.getTieredCircuitOreDictName(7), 32 * (GTNH ? 2 : 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("wireGt16Superconductor", 8 * (GTNH ? 4 : 2)), - ItemUtils.getItemStackOfAmountFromOreDict("plateDenseNeutronium", 2 * (GTNH ? 4 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.fieldGenerator_MAX : CI.fieldGenerator_ZPM), 5), - ItemList.Energy_LapotronicOrb2.get(1 * (GTNH ? 64 : 8)), - GTNH ? GregtechItemList.Compressed_Fusion_Reactor.get(1) : ItemList.FusionComputer_UV.get(1), - GregtechItemList.Casing_Fusion_Internal.get(1) - }, - new FluidStack[] { - ALLOY.PIKYONIUM.getFluidStack(32 * 144 * (GTNH ? 2 : 1)), - ALLOY.HG1223.getFluidStack(64 * 144) - }, - GregtechItemList.FusionComputer_UV2.get(1), - (int) GT_Values.V[6], - (int) GT_Values.V[8]); - - //Fusion MK4 Casing - CORE.RA.addAssemblylineRecipe( - ItemList.Casing_Fusion2.get(1), - (int) GT_Values.V[4], - new Object[] { - new Object[] {CI.getTieredCircuitOreDictName(5), 8 * (GTNH ? 2 : 1)}, - new Object[] {CI.getTieredCircuitOreDictName(4), 16 * (GTNH ? 2 : 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("blockTungstenCarbide", 4 * (GTNH ? 2 : 1)), - ItemUtils.getItemStackOfAmountFromOreDict("plateNeutronium", 2 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.electricMotor_MAX : CI.electricMotor_ZPM), 3 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.electricPiston_UV : CI.electricPiston_LuV), 4 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.machineHull_MAX : CI.machineHull_ZPM), 1 * (GTNH ? 2 : 1)), - ItemList.Casing_Fusion2.get(1) - }, - new FluidStack[] { - Materials.NaquadahAlloy.getMolten(576 * (GTNH ? 2 : 1)), - ALLOY.ZERON_100.getFluidStack(16 * 144) - }, - GregtechItemList.Casing_Fusion_External.get(1), - (int) GT_Values.V[5], - (int) GT_Values.V[7]); - - //Fusion MK4 Coil - CORE.RA.addAssemblylineRecipe( - ItemList.Casing_Fusion_Coil.get(1), - (int) GT_Values.V[4], - new Object[] { - new Object[] {CI.getTieredCircuitOreDictName(8), 4 * (GTNH ? 2 : 1)}, - new Object[] {CI.getTieredCircuitOreDictName(6), 8 * (GTNH ? 2 : 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("plateNeutronium", 2 * (GTNH ? 3 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.emitter_MAX : CI.emitter_ZPM), 2 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.sensor_MAX : CI.sensor_ZPM), 2 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.fieldGenerator_MAX : CI.fieldGenerator_LuV), 2 * (GTNH ? 2 : 1)), - new Object[] {CI.getTieredCircuitOreDictName(8), 8}, - ItemList.Energy_LapotronicOrb2.get(2 * (GTNH ? 16 : 1)), - ItemList.Casing_Fusion_Coil.get(1) - }, - new FluidStack[] { - ALLOY.CINOBITE.getFluidStack(16 * 144 * (GTNH ? 2 : 1)), - ALLOY.ABYSSAL.getFluidStack(64 * 144) - }, - GregtechItemList.Casing_Fusion_Internal.get(1), - (int) GT_Values.V[5], - (int) GT_Values.V[7]); - - - - - ItemStack aDrillController = ItemUtils.getValueOfItemList("OreDrill4", ItemList.Hull_UV).get(1); - - //Drilling Platform - /*CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - aDrillController, - ItemUtils.getItemStackOfAmountFromOreDict("frameGtTriniumNaquadahCarbonite", 3), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(9), 2 * (GTNH ? 4 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.conveyorModule_UV : CI.conveyorModule_ZPM), 2 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.electricPump_UV : CI.electricPump_ZPM), 4 * (GTNH ? 2 : 1)), - }, - ALLOY.LAFIUM.getFluid(144 * 8 * (GTNH ? 2 : 1)), - GregtechItemList.BedrockMiner_MKI.get(1), - (int) GT_Values.V[5], - (int) GT_Values.V[7]);*/ - - //Drilling Platform Casings - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("frameGtTriniumNaquadahCarbonite", 4), - ItemUtils.getItemStackOfAmountFromOreDict("plateDoubleTriniumTitaniumAlloy", 1 * (GTNH ? 2 : 1)), - ItemUtils.getItemStackOfAmountFromOreDict("gearGtPikyonium64B", 2 * (GTNH ? 2 : 1)), - ALLOY.TRINIUM_REINFORCED_STEEL.getPlateDouble(4 * (GTNH ? 2 : 1)), - ItemUtils.getSimpleStack((GTNH ? CI.machineHull_UV : CI.machineHull_LuV), 1 * (GTNH ? 2 : 1)), - }, - ALLOY.MARAGING350.getFluidStack(144 * 16 * (GTNH ? 2 : 1)), - GregtechItemList.Casing_BedrockMiner.get(1), - (int) GT_Values.V[4], - (int) GT_Values.V[6]); - - - - - - - - - - } - - - - - - - - - - - } - - int aCostMultiplier = GTNH ? 2 : 1; - - //Mystic Frame - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - GregtechItemList.Casing_Multi_Use.get(1), - ItemList.Field_Generator_MV.get(1, CI.circuitTier7), - ItemList.Field_Generator_HV.get(1, CI.circuitTier7), - ItemList.Emitter_HV.get(1, CI.circuitTier7), - ItemList.Sensor_HV.get(1, CI.circuitTier7), - CI.getTieredComponent(OrePrefixes.plate, 7, 8 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.wireGt08, 8, 4 * aCostMultiplier), - }, - CI.getTieredFluid(6, (144 * 8)), //Input Fluid - ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 2), - 45 * 20 * 1 * (6), - MaterialUtils.getVoltageForTier(6)); - - - //Player Doors - ItemStack[] aDoorInputs = new ItemStack[] { - ItemUtils.getSimpleStack(Blocks.log2), - ItemUtils.getSimpleStack(Blocks.iron_block), - ItemUtils.getSimpleStack(Blocks.glass), - ItemUtils.getSimpleStack(Blocks.packed_ice), - ItemUtils.getSimpleStack(Blocks.cactus), - }; - ItemStack[] aDoorOutputs = new ItemStack[] { - ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorWooden), - ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorIron), - ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Glass), - ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Ice), - ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Cactus), - }; - - for (int y = 0; y < aDoorInputs.length; y++) { - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getSimpleStack(Items.iron_door), - aDoorInputs[y], - ItemList.Sensor_LV.get(1, CI.circuitTier7), - CI.getTieredComponent(OrePrefixes.plate, 1, 2 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.wireGt02, 1, 2 * aCostMultiplier), - ItemUtils.getSimpleStack(Items.redstone, 16) - }, - CI.getTieredFluid(1, (144 * 2)), //Input Fluid - aDoorOutputs[y], - 100, - MaterialUtils.getVoltageForTier(1)); - } - - - - - - - Logger.INFO("Done loading recipes for the Various machine blocks."); - } - - - private static void controlCores() { - - Material[] aMat_A = new Material[] { - ALLOY.POTIN, - ALLOY.ZIRCONIUM_CARBIDE, - ALLOY.TANTALLOY_61, - ALLOY.INCONEL_792, - ALLOY.STABALLOY, - ALLOY.TALONITE, - ALLOY.HASTELLOY_N, - ALLOY.HG1223, - ALLOY.LAFIUM, - ALLOY.PIKYONIUM - }; - Material[] aMat_B = new Material[] { - ALLOY.TUMBAGA, - ALLOY.SILICON_CARBIDE, - ALLOY.EGLIN_STEEL, - ALLOY.NICHROME, - ALLOY.TUNGSTEN_CARBIDE, - ALLOY.STELLITE, - ALLOY.HASTELLOY_C276, - ALLOY.NITINOL_60, - ALLOY.ZERON_100, - ALLOY.CINOBITE - }; - - Item aBaseCore = ModItems.itemControlCore; - ItemStack[] aInputPrevTier = new ItemStack[] { - GTNH ? ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore3", 1) : ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore2", 1), - ItemUtils.simpleMetaStack(aBaseCore, 0, 1), - ItemUtils.simpleMetaStack(aBaseCore, 1, 1), - ItemUtils.simpleMetaStack(aBaseCore, 2, 1), - ItemUtils.simpleMetaStack(aBaseCore, 3, 1), - ItemUtils.simpleMetaStack(aBaseCore, 4, 1), - ItemUtils.simpleMetaStack(aBaseCore, 5, 1), - ItemUtils.simpleMetaStack(aBaseCore, 6, 1), - ItemUtils.simpleMetaStack(aBaseCore, 7, 1), - ItemUtils.simpleMetaStack(aBaseCore, 8, 1), - }; - ItemStack[] aOutput = new ItemStack[] { - ItemUtils.simpleMetaStack(aBaseCore, 0, 1), - ItemUtils.simpleMetaStack(aBaseCore, 1, 1), - ItemUtils.simpleMetaStack(aBaseCore, 2, 1), - ItemUtils.simpleMetaStack(aBaseCore, 3, 1), - ItemUtils.simpleMetaStack(aBaseCore, 4, 1), - ItemUtils.simpleMetaStack(aBaseCore, 5, 1), - ItemUtils.simpleMetaStack(aBaseCore, 6, 1), - ItemUtils.simpleMetaStack(aBaseCore, 7, 1), - ItemUtils.simpleMetaStack(aBaseCore, 8, 1), - ItemUtils.simpleMetaStack(aBaseCore, 9, 1), - - }; - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.machineHull_HV, - aOutput[1], - aMat_A[1].getGear(GTNH ? 4 : 2), - aMat_B[2].getPlateDouble(GTNH ? 16 : 8), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+(GTNH ? "2" : "1"), GTNH ? 4 : 2), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 3 : 2), GTNH ? 10 : 5) - }, - aMat_B[3].getFluidStack(144 * 8), //Input Fluid - GregtechItemList.Hatch_Control_Core.get(1), - 60 * 20 * 5, - MaterialUtils.getVoltageForTier(3)); - - - for (int i = 0; i < 10; i++) { - boolean aDub = false; - ItemStack aPlateStack = aMat_A[i].getPlateDouble((GTNH ? 16 : 8) * (aDub ? 2 : 1)); - ItemStack aGearStack = aMat_B[i].getGear(GTNH ? 4 : 2 * (aDub ? 2 : 1)); - ItemStack aRodStack = aMat_A[i].getLongRod(GTNH ? 16 : 8 * (aDub ? 2 : 1)); - ItemStack aScrewStack = aMat_B[i].getScrew(32 * (aDub ? 2 : 1)); - - if (!ItemUtils.checkForInvalidItems(aPlateStack)) { - aPlateStack = aMat_A[i].getPlate((GTNH ? 16 : 8) * (aDub ? 2 : 1) * 2); - if (!ItemUtils.checkForInvalidItems(aPlateStack)) { - aPlateStack = aMat_B[i].getPlateDouble((GTNH ? 16 : 8) * (aDub ? 2 : 1)); - if (!ItemUtils.checkForInvalidItems(aPlateStack)) { - aPlateStack = aMat_B[i].getPlate((GTNH ? 16 : 8) * (aDub ? 2 : 1) * 2); - } - } - } - if (!ItemUtils.checkForInvalidItems(aGearStack)) { - aGearStack = aMat_A[i].getGear(GTNH ? 8 : 4 * (aDub ? 2 : 1)); - } - if (!ItemUtils.checkForInvalidItems(aRodStack)) { - aRodStack = aMat_B[i].getLongRod(GTNH ? 32 : 16 * (aDub ? 2 : 1)); - } - if (!ItemUtils.checkForInvalidItems(aScrewStack)) { - aScrewStack = aMat_A[i].getScrew(32 * (aDub ? 2 : 1)); - } - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getEnergyCore(i, 4), - aPlateStack, - aGearStack, - aRodStack, - aScrewStack, - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName((int) (4+Math.ceil((double) i / (double) 2))), GTNH ? (i * 2 * 2) : (i * 2)) - }, - CI.getTieredFluid(i, 144 * 4 * (i+1)), //Input Fluid - aOutput[i], - 60 * 20 * 1 * (i+1), - MaterialUtils.getVoltageForTier(i)); - } - } - - private static void energyCores() { - - //Simpler Recipes for normal Players, Force assembly crafting in GTNH - if (!GTNH) { - //Buffer Core - /*RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[1], cableTier1, CI.component_Plate[1], - "circuitPrimitive", "plateStaballoy", "circuitPrimitive", - CI.component_Plate[1], cableTier1, CI.component_Plate[1], - RECIPE_BufferCore_ULV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[2], cableTier2, CI.component_Plate[2], - RECIPE_BufferCore_ULV, CI.machineHull_HV, RECIPE_BufferCore_ULV, - CI.component_Plate[2], cableTier2, CI.component_Plate[2], - RECIPE_BufferCore_LV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[3], cableTier3, CI.component_Plate[3], - RECIPE_BufferCore_LV, CI.circuitTier2, RECIPE_BufferCore_LV, - CI.component_Plate[3], cableTier3, CI.component_Plate[3], - RECIPE_BufferCore_MV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[4], cableTier4, CI.component_Plate[4], - RECIPE_BufferCore_MV, CI.circuitTier3, RECIPE_BufferCore_MV, - CI.component_Plate[4], cableTier4, CI.component_Plate[4], - RECIPE_BufferCore_HV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[5], cableTier5, CI.component_Plate[5], - RECIPE_BufferCore_HV, CI.circuitTier4, RECIPE_BufferCore_HV, - CI.component_Plate[5], cableTier5, CI.component_Plate[5], - RECIPE_BufferCore_EV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[6], cableTier6, CI.component_Plate[6], - RECIPE_BufferCore_EV, CI.circuitTier5, RECIPE_BufferCore_EV, - CI.component_Plate[6], cableTier6, CI.component_Plate[6], - RECIPE_BufferCore_IV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[7], cableTier7, CI.component_Plate[7], - RECIPE_BufferCore_IV, CI.circuitTier6, RECIPE_BufferCore_IV, - CI.component_Plate[7], cableTier7, CI.component_Plate[7], - RECIPE_BufferCore_LuV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[8], cableTier8, CI.component_Plate[8], - RECIPE_BufferCore_LuV, CI.circuitTier7, RECIPE_BufferCore_LuV, - CI.component_Plate[8], cableTier8, CI.component_Plate[8], - RECIPE_BufferCore_ZPM); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[9], cableTier9, CI.component_Plate[9], - RECIPE_BufferCore_ZPM, CI.circuitTier8, RECIPE_BufferCore_ZPM, - CI.component_Plate[9], cableTier9, CI.component_Plate[9], - RECIPE_BufferCore_UV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[10], cableTier10, CI.component_Plate[10], - RECIPE_BufferCore_UV, CI.circuitTier9, RECIPE_BufferCore_UV, - CI.component_Plate[10], cableTier10, CI.component_Plate[10], - RECIPE_BufferCore_MAX);*/ - - - /*RecipeUtils.addShapedGregtechRecipe( - wireTier1, RECIPE_BufferCore_ULV, wireTier1, - wireTier1, CI.machineCasing_ULV, wireTier1, - CI.circuitPrimitive, CI.circuitTier1, CI.circuitPrimitive, - RECIPE_Buffer_ULV); - RecipeUtils.addShapedGregtechRecipe( - wireTier2, RECIPE_BufferCore_LV, wireTier2, - wireTier2, CI.machineCasing_LV, wireTier2, - CI.circuitTier1, RECIPE_BufferCore_LV, CI.circuitTier1, - RECIPE_Buffer_LV); - RecipeUtils.addShapedGregtechRecipe( - wireTier3, RECIPE_BufferCore_MV, wireTier3, - wireTier3, CI.machineCasing_MV, wireTier3, - CI.circuitTier2, RECIPE_BufferCore_MV, CI.circuitTier2, - RECIPE_Buffer_MV); - RecipeUtils.addShapedGregtechRecipe( - wireTier4, RECIPE_BufferCore_HV, wireTier4, - wireTier4, CI.machineCasing_HV, wireTier4, - CI.circuitTier3, RECIPE_BufferCore_HV, CI.circuitTier3, - RECIPE_Buffer_HV); - RecipeUtils.addShapedGregtechRecipe( - wireTier5, RECIPE_BufferCore_EV, wireTier5, - wireTier5, CI.machineCasing_EV, wireTier5, - CI.circuitTier4, RECIPE_BufferCore_EV, CI.circuitTier4, - RECIPE_Buffer_EV); - RecipeUtils.addShapedGregtechRecipe( - wireTier6, RECIPE_BufferCore_IV, wireTier6, - wireTier6, CI.machineCasing_IV, wireTier6, - CI.circuitTier5, RECIPE_BufferCore_IV, CI.circuitTier5, - RECIPE_Buffer_IV); - RecipeUtils.addShapedGregtechRecipe( - wireTier7, RECIPE_BufferCore_LuV, wireTier7, - wireTier7, CI.machineCasing_LuV, wireTier7, - CI.circuitTier6, RECIPE_BufferCore_LuV, CI.circuitTier6, - RECIPE_Buffer_LuV); - RecipeUtils.addShapedGregtechRecipe( - wireTier8, RECIPE_BufferCore_ZPM, wireTier8, - wireTier8, CI.machineCasing_ZPM, wireTier8, - CI.circuitTier7, RECIPE_BufferCore_ZPM, CI.circuitTier7, - RECIPE_Buffer_ZPM); - RecipeUtils.addShapedGregtechRecipe( - wireTier9, RECIPE_BufferCore_UV, wireTier9, - wireTier9, CI.machineCasing_UV, wireTier9, - CI.circuitTier8, RECIPE_BufferCore_UV, CI.circuitTier8, - RECIPE_Buffer_UV); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[11], RECIPE_BufferCore_MAX, CI.component_Plate[11], - wireTier10, CI.machineCasing_MAX, wireTier10, - CI.circuitTier9, RECIPE_BufferCore_MAX, CI.circuitTier9, - RECIPE_Buffer_MAX);*/ - } - - - ItemStack[] aBufferOutput = new ItemStack[] { - RECIPE_Buffer_ULV, RECIPE_Buffer_LV, RECIPE_Buffer_MV, - RECIPE_Buffer_HV, RECIPE_Buffer_EV, RECIPE_Buffer_IV, - RECIPE_Buffer_LuV, RECIPE_Buffer_ZPM, RECIPE_Buffer_UV, RECIPE_Buffer_MAX }; - - - - ItemStack[] aOutput = new ItemStack[] { - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"1", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"2", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"3", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"4", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"5", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"6", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"7", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"8", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"9", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"10", 1) - }; - - int aCostMultiplier = GTNH ? 4 : 1; - - for (int i = 0; i < 10; i++) { - - ItemStack aPrevTier = (i == 0 ? CI.getTieredMachineHull(GTNH ? 2 : 1) : aOutput[i-1]); - aPrevTier.stackSize = GTNH ? 2 : 1; - int aTier = (i + 1); - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - aPrevTier, - CI.getTieredComponent(OrePrefixes.plate, aTier, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.cableGt04, i, 2 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.circuit, aTier, 2 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.screw, aTier, 6 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.bolt, i, 12 * (GTNH ? 2 : 1)), - }, - CI.getTieredFluid(i, (144 * 4 * aTier)), //Input Fluid - aOutput[i], - 45 * 10 * 1 * (aTier), - MaterialUtils.getVoltageForTier(i)); - - //Energy Buffer - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - ItemUtils.getSimpleStack(aOutput[i], 4), - CI.getTieredComponent(OrePrefixes.plate, aTier, 8 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.wireGt08, i, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.circuit, i, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.stickLong, aTier, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.gearGt, i, 5 * (GTNH ? 2 : 1)), - }, - CI.getTieredFluid(aTier, (144 * 16 * aTier)), //Input Fluid - aBufferOutput[i], - 45 * 20 * 1 * (aTier), - MaterialUtils.getVoltageForTier(i)); - - } - - - - - } - - private static void wirelessChargers() { - - ItemStack[] aChargers = new ItemStack[] { - null, - GregtechItemList.Charger_LV.get(1), - GregtechItemList.Charger_MV.get(1), - GregtechItemList.Charger_HV.get(1), - GregtechItemList.Charger_EV.get(1), - GregtechItemList.Charger_IV.get(1), - GregtechItemList.Charger_LuV.get(1), - GregtechItemList.Charger_ZPM.get(1), - GregtechItemList.Charger_UV.get(1), - GregtechItemList.Charger_MAX.get(1) - }; - - int aCostMultiplier = GTNH ? 2 : 1; - - for (int i = 0; i < 10; i++) { - if (i == 0) { - continue; - } - int aTier = (i + 1); - ItemStack[] aInputs = new ItemStack[] { - CI.getTieredMachineHull(i, 1 * aCostMultiplier), - CI.getTransmissionComponent(i, 2 * aCostMultiplier), - CI.getFieldGenerator(i, 1 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.plate, aTier, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.circuit, aTier, 2 * aCostMultiplier), - }; - CORE.RA.addSixSlotAssemblingRecipe( - aInputs, - CI.getAlternativeTieredFluid(i, (144 * 2 * aTier)), //Input Fluid - aChargers[i], - 45 * 10 * 1 * (aTier), - MaterialUtils.getVoltageForTier(i)); - - } - } - - private static void largeArcFurnace() { - int aCostMultiplier = GTNH ? 2 : 1; - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getTieredMachineHull(-1, 1 * aCostMultiplier), - CI.getTransmissionComponent(2, 2 * aCostMultiplier), - CI.getElectricPiston(4, 2 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.plate, 5, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.pipeSmall, 4, 1 * aCostMultiplier), - }, - CI.getAlternativeTieredFluid(5, (144 * 2 * 4)), //Input Fluid - GregtechItemList.Casing_Industrial_Arc_Furnace.get(Casing_Amount), - 20 * 10 * 1 * (6), - MaterialUtils.getVoltageForTier(5)); - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - GregtechItemList.Casing_Industrial_Arc_Furnace.get(Casing_Amount), - CI.getFieldGenerator(4, 2 * aCostMultiplier), - CI.getRobotArm(5, 4 * aCostMultiplier), - CI.getEnergyCore(4, 2 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.plate, 6, 8 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.circuit, 5, 8 * aCostMultiplier), - }, - CI.getAlternativeTieredFluid(6, (144 * 4 * 5)), //Input Fluid - GregtechItemList.Industrial_Arc_Furnace.get(1), - 60 * 20 * 8, - MaterialUtils.getVoltageForTier(6)); - } - - private static void industrialVacuumFurnace() { - int aCostMultiplier = GTNH ? 2 : 1; - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getTieredMachineHull(-1, 1 * aCostMultiplier), - CI.getHeatCoil(2), - CI.getElectricPiston(3, 2 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.plate, 6, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.gearGt, 6, 2 * aCostMultiplier), - }, - CI.getTertiaryTieredFluid(5, (144 * 2 * 4 * aCostMultiplier)), //Input Fluid - GregtechItemList.Casing_Vacuum_Furnace.get(Casing_Amount), - 20 * 10 * 6, - MaterialUtils.getVoltageForTier(6)); - - ; - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - GregtechItemList.Casing_Vacuum_Furnace.get(aCostMultiplier), - CI.getTieredComponent(OrePrefixes.wireGt16, 7, 4 * aCostMultiplier), - CI.getEnergyCore(6, 1 * aCostMultiplier), - CI.getRobotArm(4, 4 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.plate, 7, 8 * aCostMultiplier), - CI.getTieredComponent(OrePrefixes.circuit, 6, 8 * aCostMultiplier), - }, - CI.getTieredFluid(7, (144 * 4 * 5 * aCostMultiplier)), //Input Fluid - GregtechItemList.Controller_Vacuum_Furnace.get(1), - 60 * 20 * 12, - MaterialUtils.getVoltageForTier(7)); - } - - private static void milling() { - - - /*public static ItemStack RECIPE_ISAMill_Controller; - public static ItemStack RECIPE_ISAMill_Gearbox; - public static ItemStack RECIPE_ISAMill_Casing; - public static ItemStack RECIPE_ISAMill_Hatch; - public static ItemStack RECIPE_Flotation_Controller; - public static ItemStack RECIPE_Flotation_Casing;*/ - - // Isa Mill Controller - CORE.RA.addAssemblylineRecipe( - ItemList.Machine_IV_Macerator.get(1), - 20 * 60 * 20, - new Object[] { - GregtechItemList.Casing_IsaMill_Gearbox.get(4), - CI.getTieredGTPPMachineCasing(6, 4), - ItemList.Component_Grinder_Tungsten.get(16), - new Object[] {CI.getTieredCircuitOreDictName(6), 8}, - ALLOY.INCONEL_625.getGear(8), - ALLOY.INCONEL_625.getPlate(32), - ALLOY.ZERON_100.getPlateDouble(8), - ALLOY.ZERON_100.getPlateDouble(8), - ALLOY.ZERON_100.getScrew(64), - CI.getTieredComponentOfMaterial(Materials.NiobiumTitanium, OrePrefixes.wireFine, 32), - CI.getTieredComponentOfMaterial(Materials.NiobiumTitanium, OrePrefixes.wireFine, 32), - CI.getTieredComponentOfMaterial(Materials.Titanium, OrePrefixes.foil, 16), - CI.getTieredComponentOfMaterial(Materials.Titanium, OrePrefixes.foil, 16), - - }, - new FluidStack[] { - CI.getTieredFluid(6, 16 * 144), - CI.getAlternativeTieredFluid(6, 32 * 144), - CI.getTertiaryTieredFluid(6, 32 * 144) - }, - GregtechItemList.Controller_IsaMill.get(1), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(6)); - - // Isa Mill Gearbox - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(7), - ItemList.Casing_Gearbox_Titanium.get(2), - ALLOY.INCONEL_625.getGear(4), - CI.getTieredComponentOfMaterial(Materials.HSSE, OrePrefixes.gearGtSmall, 8), - ALLOY.INCONEL_625.getPlate(16), - ALLOY.ZERON_100.getBolt(16), - }, - ALLOY.TUNGSTENSTEEL.getFluidStack(8 * 144), - GregtechItemList.Casing_IsaMill_Gearbox.get(1), - 60 * 20 * 2, - MaterialUtils.getVoltageForTier(6)); - - // Isa Mill Casing - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(7), - CI.getTieredGTPPMachineCasing(5, 1), - ALLOY.INCONEL_625.getPlate(8), - ALLOY.ZERON_100.getRod(4), - CI.getTieredComponentOfMaterial(Materials.HSSG, OrePrefixes.gearGtSmall, 4), - ALLOY.ZERON_100.getScrew(8), - }, - ELEMENT.getInstance().TITANIUM.getFluidStack(4 * 144), - GregtechItemList.Casing_IsaMill_Casing.get(1), - 60 * 20 * 2, - MaterialUtils.getVoltageForTier(6)); - - // Isa Mill Pipe - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(7), - CI.getTieredGTPPMachineCasing(4, 2), - ALLOY.INCONEL_625.getPlateDouble(4), - ALLOY.INCOLOY_MA956.getRing(8), - CI.getTieredComponentOfMaterial(Materials.HSSE, OrePrefixes.plate, 8), - ALLOY.INCOLOY_MA956.getBolt(16), - }, - ELEMENT.getInstance().ALUMINIUM.getFluidStack(8 * 144), - GregtechItemList.Casing_IsaMill_Pipe.get(1), - 60 * 20 * 8, - MaterialUtils.getVoltageForTier(4)); - - // Flotation Cell Controller - CORE.RA.addAssemblylineRecipe( - ItemList.Distillation_Tower.get(1), - 20 * 60 * 20, - new Object[] { - GregtechItemList.Casing_Flotation_Cell.get(4), - CI.getTieredGTPPMachineCasing(5, 4), - ItemList.Machine_IV_Distillery.get(1), - new Object[] {CI.getTieredCircuitOreDictName(6), 8}, - ALLOY.STELLITE.getGear(8), - ALLOY.STELLITE.getPlate(32), - ALLOY.HASTELLOY_N.getPlateDouble(8), - ALLOY.HASTELLOY_N.getPlateDouble(8), - ALLOY.HASTELLOY_N.getScrew(64), - CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), - CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), - CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), - CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), - - }, - new FluidStack[] { - CI.getTieredFluid(5, 16 * 144), - CI.getAlternativeTieredFluid(4, 32 * 144), - CI.getTertiaryTieredFluid(4, 32 * 144) - }, - GregtechItemList.Controller_Flotation_Cell.get(1), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(6)); - - // Flotation Cell Casing - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(7), - CI.getTieredGTPPMachineCasing(4, 1), - ALLOY.AQUATIC_STEEL.getPlate(8), - ALLOY.STELLITE.getRing(8), - CI.getTieredComponentOfMaterial(Materials.HSSG, OrePrefixes.plateDouble, 4), - ALLOY.HASTELLOY_N.getScrew(8), - }, - ALLOY.STAINLESS_STEEL.getFluidStack(8 * 144), - GregtechItemList.Casing_Flotation_Cell.get(1), - 60 * 20 * 2, - MaterialUtils.getVoltageForTier(6)); - - // Milling Bus - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(7), - CI.getTieredGTPPMachineCasing(5, 1), - ItemList.Hatch_Input_Bus_EV.get(1), - CI.getTieredComponentOfMaterial(Materials.Titanium, OrePrefixes.gearGt, 8), - CI.getTieredComponentOfMaterial(Materials.TungstenSteel, OrePrefixes.plate, 32), - CI.getTieredComponentOfMaterial(Materials.SolderingAlloy, OrePrefixes.wireFine, 16), - }, - ELEMENT.getInstance().TUNGSTEN.getFluidStack(8 * 144), - GregtechItemList.Bus_Milling_Balls.get(1), - 60 * 20 * 4, - MaterialUtils.getVoltageForTier(5)); - - } - - private static void sparging() { - - // Sparge Tower Research - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(8), - ELEMENT.getInstance().HELIUM.getCell(8), - ELEMENT.getInstance().FLUORINE.getCell(8), - ALLOY.HS188A.getIngot(8), - ItemList.Distillation_Tower.get(1) - }, - null, - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_10_SPARGING, 1), - 60 * 20 * 5, - MaterialUtils.getVoltageForTier(5)); - - // Sparge Tower Controller - CORE.RA.addAssemblylineRecipe( - ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_10_SPARGING, 1), - 20 * 60 * 20, - new Object[] { - GregtechItemList.Casing_Sparge_Tower_Exterior.get(4), - CI.getTieredGTPPMachineCasing(4, 4), - ItemList.Machine_IV_Distillery.get(1), - new Object[] {CI.getTieredCircuitOreDictName(5), 8}, - ALLOY.HS188A.getGear(8), - ALLOY.HS188A.getPlate(32), - ALLOY.HASTELLOY_N.getPlateDouble(8), - ALLOY.HASTELLOY_N.getPlateDouble(8), - ALLOY.HASTELLOY_N.getScrew(64), - CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), - CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), - CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), - CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), - - }, - new FluidStack[] { - CI.getTieredFluid(4, 16 * 144), - CI.getAlternativeTieredFluid(3, 32 * 144), - CI.getTertiaryTieredFluid(3, 32 * 144) - }, - GregtechItemList.Controller_Sparge_Tower.get(1), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(6)); - - // Sparge Tower Casing - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(8), - CI.getTieredGTPPMachineCasing(3, 1), - ALLOY.HS188A.getPlate(8), - ALLOY.HASTELLOY_N.getRing(4), - CI.getTieredComponentOfMaterial(Materials.TungstenSteel, OrePrefixes.plateDouble, 4), - ALLOY.HASTELLOY_N.getScrew(4), - }, - ALLOY.STAINLESS_STEEL.getFluidStack(8 * 144), - GregtechItemList.Casing_Sparge_Tower_Exterior.get(1), - 60 * 20 * 2, - MaterialUtils.getVoltageForTier(5)); - } - - private static void fakeMachineCasingCovers() { - GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] { - GregtechItemList.FakeMachineCasingPlate_ULV, - GregtechItemList.FakeMachineCasingPlate_LV, - GregtechItemList.FakeMachineCasingPlate_MV, - GregtechItemList.FakeMachineCasingPlate_HV, - GregtechItemList.FakeMachineCasingPlate_EV, - GregtechItemList.FakeMachineCasingPlate_IV, - GregtechItemList.FakeMachineCasingPlate_LuV, - GregtechItemList.FakeMachineCasingPlate_ZPM, - GregtechItemList.FakeMachineCasingPlate_UV, - GregtechItemList.FakeMachineCasingPlate_MAX, - }; - int aMaxTier = GT_Values.VOLTAGE_NAMES.length; - if (!GTNH) { - aMaxTier = 10; - } - ItemStack aTier[] = new ItemStack[aMaxTier]; - for (int i=0;i= 30; - - setItemList(ItemList.Circuit_Primitive, GregtechItemList.Old_Circuit_Primitive); - setItemList(ItemList.Circuit_Basic, GregtechItemList.Old_Circuit_Basic); - setItemList(ItemList.Circuit_Good, GregtechItemList.Old_Circuit_Good); - setItemList(ItemList.Circuit_Advanced, GregtechItemList.Old_Circuit_Advanced); - //ItemList.Circuit_Data, GregtechItemList.Old_Circuit_Data); - setItemList(ItemList.Circuit_Elite, GregtechItemList.Old_Circuit_Elite); - setItemList(ItemList.Circuit_Master, GregtechItemList.Old_Circuit_Master); - setItemList(ItemList.Circuit_Ultimate, GregtechItemList.Old_Circuit_Ultimate); - - /** - * Try Set New circuits to have old replacements - */ - - //Basic - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Microprocessor"), GregtechItemList.Old_Circuit_Basic); //NEW - } - //Good - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Integrated_Good"), GregtechItemList.Old_Circuit_Good); //New - } - //Advanced - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Nanoprocessor"), GregtechItemList.Old_Circuit_Advanced); - } - //Data - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Quantumprocessor"), GregtechItemList.Old_Circuit_Data); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Nanocomputer"), GregtechItemList.Old_Circuit_Data); - } - //Elite - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Crystalprocessor"), GregtechItemList.Old_Circuit_Elite); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Quantumcomputer"), GregtechItemList.Old_Circuit_Elite); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Elitenanocomputer"), GregtechItemList.Old_Circuit_Elite); - } - //Master - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Neuroprocessor"), GregtechItemList.Old_Circuit_Master); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Masterquantumcomputer"), GregtechItemList.Old_Circuit_Master); - } - //Ultimate - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Wetwarecomputer"), GregtechItemList.Old_Circuit_Ultimate); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Ultimatecrystalcomputer"), GregtechItemList.Old_Circuit_Ultimate); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Quantummainframe"), GregtechItemList.Old_Circuit_Ultimate); - } - //Superconductor - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Wetwaresupercomputer"), GregtechItemList.Circuit_IV); - } - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Crystalmainframe"), GregtechItemList.Circuit_IV); - } - //Infinite - if (newVersion) { - setItemList(ItemList.valueOf("Circuit_Wetwaremainframe"), GregtechItemList.Circuit_LuV); - } - - //set data orbs and sticks to their new replacements - setItemList(ItemList.Tool_DataStick, GregtechItemList.Old_Tool_DataStick); - setItemList(ItemList.Tool_DataOrb, GregtechItemList.Old_Tool_DataOrb); - - setItemList(ItemList.Circuit_Board_Basic, GregtechItemList.Old_Circuit_Board_Basic); - setItemList(ItemList.Circuit_Board_Advanced, GregtechItemList.Old_Circuit_Board_Advanced); - setItemList(ItemList.Circuit_Board_Elite, GregtechItemList.Old_Circuit_Board_Elite); - setItemList(ItemList.Circuit_Parts_Advanced, GregtechItemList.Old_Circuit_Parts_Advanced); - setItemList(ItemList.Circuit_Parts_Wiring_Basic, GregtechItemList.Old_Circuit_Parts_Wiring_Basic); - setItemList(ItemList.Circuit_Parts_Wiring_Advanced, GregtechItemList.Old_Circuit_Parts_Wiring_Advanced); - setItemList(ItemList.Circuit_Parts_Wiring_Elite, GregtechItemList.Old_Circuit_Parts_Wiring_Elite); - setItemList(ItemList.Circuit_Parts_Crystal_Chip_Elite, GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite); - setItemList(ItemList.Circuit_Parts_Crystal_Chip_Master, GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master); - - return true; - } - - private static boolean generateTradeRecipes(){ - - //Data stick and Data orbs. - //GT Type to GT++ Type - RecipeUtils.recipeBuilder( - CI.craftingToolScrewdriver, null, null, - ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32708", 32708, 1), null, null, - null, null, null, - GregtechItemList.Old_Tool_DataStick.get(1)); - RecipeUtils.recipeBuilder( - CI.craftingToolScrewdriver, null, null, - ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32707", 32707, 1), null, null, - null, null, null, - GregtechItemList.Old_Tool_DataOrb.get(1)); - - //GT++ Type to GT Type - RecipeUtils.recipeBuilder( - CI.craftingToolScrewdriver, null, null, - GregtechItemList.Old_Tool_DataStick.get(1), null, null, - null, null, null, - ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32708", 32708, 1)); - RecipeUtils.recipeBuilder( - CI.craftingToolScrewdriver, null, null, - GregtechItemList.Old_Tool_DataOrb.get(1), null, null, - null, null, null, - ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32707", 32707, 1)); - - - - //Primitive - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32700", 32700, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitPrimitive", 1)); - - //Basic - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32701", 32701, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 1)); - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32078", 32078, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 1)); - - //Good - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32702", 32702, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 1)); - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32702", 32702, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 1)); - - //Advanced - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32703", 32703, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 1)); - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32703", 32703, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 1)); - - //Data - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32704", 32704, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 1)); - - //Elite - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32705", 32705, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 1)); - - //Master - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32706", 32706, 1)}, - ItemUtils.getItemStackOfAmountFromOreDict("circuitMaster", 1)); - - - - //Components - //Green Chip - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32713", 32713, 1)}, - GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.get(1)); - //Blue Chip - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32714", 32714, 1)}, - GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.get(1)); - - //Basic Board - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32710", 32710, 1)}, - GregtechItemList.Old_Circuit_Board_Basic.get(1)); - //Advanced Board - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32711", 32711, 1)}, - GregtechItemList.Old_Circuit_Board_Advanced.get(1)); - //Elite Board - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32712", 32712, 1)}, - GregtechItemList.Old_Circuit_Board_Elite.get(1)); - - - //remove a few recipes - /*GT_ModHandler.removeRecipeByOutput(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32070", 32070, 1)); - GT_ModHandler.removeRecipeByOutput(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32069", 32069, 1)); - if (LoadedMods.Extra_Utils){ - ItemStack EQU = ItemUtils.simpleMetaStack("ExtraUtilities:enderQuarryUpgrade", 0, 1); - if (EQU != null){ - GT_ModHandler.removeRecipeByOutput(EQU); - GT_Values.RA.addAssemblerRecipe( - ItemUtils.simpleMetaStack("ExtraUtilities:decorativeBlock1:12", 12, 1), - GregtechItemList.Old_Circuit_Master.get(1), - EQU, - 80*20, - 2); - } - } - if (LoadedMods.GalacticraftCore){ - ItemStack ACW = ItemUtils.simpleMetaStack("GalacticraftCore:item.basicItem:14", 14, 1); - if (ACW != null){ - GT_ModHandler.removeRecipeByOutput(ACW); - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", 1), - GregtechItemList.Old_Circuit_Board_Advanced.get(1), - ACW, - 160*20, - 4); - } - ItemStack ACW2 = ItemUtils.simpleMetaStack("GalacticraftCore:item.basicItem:13", 13, 1); - if (ACW2 != null){ - GT_ModHandler.removeRecipeByOutput(ACW2); - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", 1), - GregtechItemList.Old_Circuit_Board_Basic.get(1), - ACW2, - 80*20, - 2); - } - }*/ - - return true; - } - - private static boolean hideCircuitsNEI(){ - Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); - if (isNEILoaded && !CORE.ConfigSwitches.showHiddenNEIItems){ - Logger.INFO("[Old Feature - Circuits] Hiding .28+ circuits in NEI."); - String[] CircuitToHide = { - "Circuit_Board_Basic", - "Circuit_Board_Advanced", - "Circuit_Board_Elite", - "Circuit_Parts_Advanced", - "Circuit_Parts_Wiring_Basic", - "Circuit_Parts_Wiring_Advanced", - "Circuit_Parts_Wiring_Elite", - "Circuit_Parts_Crystal_Chip_Elite", - "Circuit_Parts_Crystal_Chip_Master", - "Circuit_Primitive", - "Circuit_Basic", - "Circuit_Integrated_Good", - "Circuit_Good", - "Circuit_Advanced", - "Circuit_Data", - "Circuit_Elite", - "Circuit_Master", - "Circuit_Ultimate", - "Circuit_Board_Coated", - "Circuit_Board_Phenolic", - "Circuit_Board_Epoxy", - "Circuit_Board_Fiberglass", - "Circuit_Board_Multifiberglass", - "Circuit_Board_Wetware", - "Circuit_Parts_Resistor", - "Circuit_Parts_ResistorSMD", - "Circuit_Parts_Glass_Tube", - "Circuit_Parts_Vacuum_Tube", - "Circuit_Parts_Coil", - "Circuit_Parts_Diode", - "Circuit_Parts_DiodeSMD", - "Circuit_Parts_Transistor", - "Circuit_Parts_TransistorSMD", - "Circuit_Parts_Capacitor", - "Circuit_Parts_CapacitorSMD", - "Circuit_Silicon_Ingot", - "Circuit_Silicon_Ingot2", - "Circuit_Silicon_Ingot3", - "Circuit_Silicon_Wafer", - "Circuit_Silicon_Wafer2", - "Circuit_Silicon_Wafer3", - "Circuit_Wafer_ILC", - "Circuit_Chip_ILC", - "Circuit_Wafer_Ram", - "Circuit_Chip_Ram", - "Circuit_Wafer_NAND", - "Circuit_Chip_NAND", - "Circuit_Wafer_NOR", - "Circuit_Chip_NOR", - "Circuit_Wafer_CPU", - "Circuit_Chip_CPU", - "Circuit_Wafer_SoC", - "Circuit_Chip_SoC", - "Circuit_Wafer_SoC2", - "Circuit_Chip_SoC2", - "Circuit_Wafer_PIC", - "Circuit_Chip_PIC", - "Circuit_Wafer_HPIC", - "Circuit_Chip_HPIC", - "Circuit_Wafer_NanoCPU", - "Circuit_Chip_NanoCPU", - "Circuit_Wafer_QuantumCPU", - "Circuit_Chip_QuantumCPU", - "Circuit_Chip_CrystalCPU", - "Circuit_Chip_CrystalSoC", - "Circuit_Chip_NeuroCPU", - "Circuit_Chip_Stemcell", - "Circuit_Processor", - "Circuit_Computer", - "Circuit_Nanoprocessor", - "Circuit_Nanocomputer", - "Circuit_Elitenanocomputer", - "Circuit_Quantumprocessor", - "Circuit_Quantumcomputer", - "Circuit_Masterquantumcomputer", - "Circuit_Quantummainframe", - "Circuit_Crystalprocessor", - "Circuit_Crystalcomputer", - "Circuit_Ultimatecrystalcomputer", - "Circuit_Crystalmainframe", - "Circuit_Neuroprocessor", - "Circuit_Wetwarecomputer", - "Circuit_Wetwaresupercomputer", - "Circuit_Wetwaremainframe", - "Circuit_Parts_RawCrystalChip", - //Circuits Additions in .30/.31 - "Circuit_Board_Plastic", - "Circuit_Parts_GlassFiber", - "Circuit_Parts_PetriDish", - "Circuit_Microprocessor" - }; - - for (String component : CircuitToHide){ - try { - ItemUtils.hideItemFromNEI(ItemUtils.getValueOfItemList(component, null).get(1L, new Object[0])); - } catch (IllegalArgumentException I){ - Logger.INFO("Could not find "+component+" in the Gregtech item list."); - Logger.INFO("This is NOT an error, simply a notification."); - } - } - } - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java deleted file mode 100644 index 97636e9e65..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java +++ /dev/null @@ -1,226 +0,0 @@ -package gtPlusPlus.core.recipe; - -import static gtPlusPlus.core.material.MISC_MATERIALS.BRINE; -import static gtPlusPlus.core.material.MISC_MATERIALS.HYDROGEN_CHLORIDE; -import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_HIGH; -import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_LOW; -import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_MID; -import static gtPlusPlus.core.material.MISC_MATERIALS.SALT_WATER; -import static gtPlusPlus.core.material.MISC_MATERIALS.SODIUM_CHLORIDE; -import static gtPlusPlus.core.material.MISC_MATERIALS.SODIUM_HYDROXIDE; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class RECIPES_RareEarthProcessing { - - private static ItemStack mDustSodiumHydroxide; - private static ItemStack mDustSalt; - private static FluidStack mSaltWater; - private static FluidStack mBrine; - private static FluidStack mHydrogenChloride; - - public static void init() { - - // Salt Check and Assignment - mDustSalt = ItemUtils.getItemStackOfAmountFromOreDict("dustSalt", 1); - if (mDustSalt == null) { - MaterialUtils.generateSpecialDustAndAssignToAMaterial(SODIUM_CHLORIDE, false); - mDustSalt = SODIUM_CHLORIDE.getDust(1); - } - else { - SODIUM_CHLORIDE.registerComponentForMaterial(OrePrefixes.dust, mDustSalt); - } - - // Salt water Check and Assignment - mSaltWater = FluidUtils.getFluidStack("saltwater", 1000); - if (mSaltWater == null) { - Fluid f = SALT_WATER.generateFluid(); - SALT_WATER.registerComponentForMaterial(FluidUtils.getFluidStack(f, 1000)); - mSaltWater = SALT_WATER.getFluidStack(1000); - } - else { - SALT_WATER.registerComponentForMaterial(FluidUtils.getFluidStack(mSaltWater, 1000)); - } - - // Brine Check and assignment - mBrine = FluidUtils.getFluidStack("brine", 1000); - if (mBrine == null) { - Fluid f = BRINE.generateFluid(); - BRINE.registerComponentForMaterial(FluidUtils.getFluidStack(f, 1000)); - mBrine = BRINE.getFluidStack(1000); - } - else { - BRINE.registerComponentForMaterial(FluidUtils.getFluidStack(mBrine, 1000)); - } - - // Check Sodium Hydroxide Exists, generate if not. - mDustSodiumHydroxide = ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1); - if (mDustSodiumHydroxide == null) { - mDustSodiumHydroxide = ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide_GT5U", 1); - if (mDustSodiumHydroxide == null) { - MaterialUtils.generateSpecialDustAndAssignToAMaterial(SODIUM_HYDROXIDE, false); - mDustSodiumHydroxide = SODIUM_HYDROXIDE.getDust(1); - } - else { - SODIUM_HYDROXIDE.registerComponentForMaterial(OrePrefixes.dust, mDustSodiumHydroxide); - } - } - else { - SODIUM_HYDROXIDE.registerComponentForMaterial(OrePrefixes.dust, mDustSodiumHydroxide); - } - - // Hydrogen Chloride Check and assignment - mHydrogenChloride = FluidUtils.getFluidStack("hydrogenchloride", 1000); - if (mHydrogenChloride == null) { - HYDROGEN_CHLORIDE.generateFluid(); - mHydrogenChloride = BRINE.getFluidStack(1000); - } - else { - HYDROGEN_CHLORIDE.registerComponentForMaterial(FluidUtils.getFluidStack(mHydrogenChloride, 1000)); - } - - - // Add Process for creating Brine - CORE.RA.addBrewingRecipe( - ItemUtils.getSimpleStack(mDustSalt, 16), - MISC_MATERIALS.SALT_WATER.getFluidStack(2000), - FluidUtils.getFluidStack(mBrine, 4000), - 20 * 20, - 120, - false); - - // Chloralkali process - GT_Values.RA.addElectrolyzerRecipe( - CI.getNumberedCircuit(16), - CI.emptyCells(4), - FluidUtils.getFluidStack(mBrine, 4000), - null, // Out - ItemUtils.getItemStackOfAmountFromOreDict("cellChlorine", 2), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2), - ItemUtils.getSimpleStack(mDustSodiumHydroxide, 2), - null, - null, - null, - new int[] {10000, 10000, 10000}, - 20 * 30, - (int) GT_Values.V[2]); - - // Generate Special Laser Recipe - CORE.RA.addUvLaserRecipe( - ELEMENT.getInstance().CHLORINE.getCell(2), - ELEMENT.getInstance().HYDROGEN.getCell(2), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 4), - 20 * 30, - 480); - - - // Set Material Tiers correctly - ORES.GREENOCKITE.vTier = 1; - RARE_EARTH_LOW.vTier = 1; - RARE_EARTH_MID.vTier = 3; - RARE_EARTH_HIGH.vTier = 5; - - // Set Material Voltages correctly - ORES.GREENOCKITE.vVoltageMultiplier = 30; - RARE_EARTH_LOW.vVoltageMultiplier = 30; - RARE_EARTH_MID.vVoltageMultiplier = 480; - RARE_EARTH_HIGH.vVoltageMultiplier = 7680; - - // Set Material Tooltips to be shorter - RARE_EARTH_LOW.vChemicalFormula = "??????"; - RARE_EARTH_MID.vChemicalFormula = "??????"; - RARE_EARTH_HIGH.vChemicalFormula = "??????"; - - // Set Material Tooltips to be shorter - RARE_EARTH_LOW.vChemicalSymbol = "??"; - RARE_EARTH_MID.vChemicalSymbol = "??"; - RARE_EARTH_HIGH.vChemicalSymbol = "??"; - - // Generate Ore Materials - MaterialGenerator.generateOreMaterial(RARE_EARTH_LOW); - MaterialGenerator.generateOreMaterial(RARE_EARTH_MID); - MaterialGenerator.generateOreMaterial(RARE_EARTH_HIGH); - - ItemStack aRareEarth = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RareEarth, 1L); - - Fluid aSulfuric = FluidUtils.getFluidStack("sulfuricacid", 1).getFluid(); - Fluid aHydrocholric = FluidUtils.getFluidStack("hydrogenchloride", 1).getFluid(); - Fluid aNitric = FluidUtils.getFluidStack("hydrofluoricacid", 1).getFluid(); - - - - // LV Rare Earth - GT_Values.RA.addChemicalBathRecipe( - ItemUtils.getSimpleStack(aRareEarth, 3), - FluidUtils.getFluidStack(aSulfuric, 1000), - RARE_EARTH_LOW.getCrushed(1), - RARE_EARTH_LOW.getCrushed(1), - RARE_EARTH_LOW.getCrushed(1), - new int[] {10000, 10000, 9000}, - 20 * 30, - (int) GT_Values.V[1]); - - // HV Rare Earth - GT_Values.RA.addChemicalBathRecipe( - ItemUtils.getSimpleStack(aRareEarth, 6), - FluidUtils.getFluidStack(aHydrocholric, 3000), - RARE_EARTH_MID.getCrushed(2), - RARE_EARTH_MID.getCrushed(2), - RARE_EARTH_MID.getCrushed(2), - new int[] {10000, 9000, 8000}, - 20 * 60, - (int) GT_Values.V[3]); - - // IV Rare Earth - GT_Values.RA.addChemicalBathRecipe( - ItemUtils.getSimpleStack(aRareEarth, 9), - FluidUtils.getFluidStack(aNitric, 6000), - RARE_EARTH_HIGH.getCrushed(3), - RARE_EARTH_HIGH.getCrushed(3), - RARE_EARTH_HIGH.getCrushed(3), - new int[] {9000, 8000, 7000}, - 20 * 90, - (int) GT_Values.V[5]); - - - } - - - public static void processCopperRecipes() { - - // Rare Earth Processing - /*GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1), - new ItemStack[] { - ELEMENT.getInstance().YTTRIUM.getSmallDust(1), - ELEMENT.getInstance().NEODYMIUM.getSmallDust(1), - ELEMENT.getInstance().LANTHANUM.getSmallDust(1), - ELEMENT.getInstance().CERIUM.getSmallDust(1), - ELEMENT.getInstance().CADMIUM.getSmallDust(1), - ELEMENT.getInstance().CAESIUM.getSmallDust(1), - ORES.SAMARSKITE_YB.getSmallDust(1), - ORES.FLORENCITE.getSmallDust(1), - ORES.FLUORCAPHITE.getSmallDust(1), - //ELEMENT.getInstance().YTTERBIUM.getTinyDust(1), - //ELEMENT.getInstance().SAMARIUM.getTinyDust(1), - //ELEMENT.getInstance().GADOLINIUM.getTinyDust(1) - }, - new int[] { 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000 }, 20 * 30, 500);*/ - - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java deleted file mode 100644 index 9a2ea8bad0..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java +++ /dev/null @@ -1,222 +0,0 @@ -package gtPlusPlus.core.recipe; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.reflect.AddGregtechRecipe; -import net.minecraft.item.ItemStack; - -public class RECIPES_SeleniumProcessing { - - public static void init() { - - //We need this - MaterialUtils.generateSpecialDustAndAssignToAMaterial(MISC_MATERIALS.SELENIUM_DIOXIDE, false); - - // Makes Selenium Dioxide - processCopperRecipes(); - - //Liquify the Dried Dioxide - AddGregtechRecipe.addCokeAndPyrolyseRecipes(MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), 13, FluidUtils.getSteam(500), null, MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(1000), 20, 1024); - - // Produce Selenious Acid - AddGregtechRecipe.addCokeAndPyrolyseRecipes(MISC_MATERIALS.SELENIUM_DIOXIDE.getCell(1), 14, FluidUtils.getHotWater(4000), CI.emptyCells(1), MISC_MATERIALS.SELENIOUS_ACID.getFluidStack(1000), 20, 2048); - - // Make Selenium - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(14), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 8), - ELEMENT.getInstance().CARBON.getDust(16), - }, - MISC_MATERIALS.SELENIOUS_ACID.getFluidStack(750), - ELEMENT.getInstance().SELENIUM.getFluidStack(144 * 1), - new ItemStack[] { - CI.emptyCells(8), - ELEMENT.getInstance().SELENIUM.getIngot(1), - ELEMENT.getInstance().SELENIUM.getIngot(1), - }, - new int[] {10000, 2000, 2000}, - 20 * 300, - 7200); - - - /*// Old recipes for Selenium Roasting - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(16), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPyrite", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(4000), - ELEMENT.getInstance().SELENIUM.getFluid(144), - 0, - 20 * 300, - 2000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(17), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedChalcopyrite", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(4000), - ELEMENT.getInstance().SELENIUM.getFluid(144), - 0, - 20 * 300, - 2000); - CORE.RA.addBlastSmelterRecipe( - new ItemStack[] { - ItemUtils.getGregtechCircuit(18), - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedGalena", 8), - ELEMENT.getInstance().CARBON.getDust(32), - }, - Materials.SulfuricAcid.getFluid(4000), - ELEMENT.getInstance().SELENIUM.getFluid(144), - 0, - 20 * 300, - 2000);*/ - } - - - public static void processCopperRecipes() { - - //Copper - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Copper, 1), // Item Input - }, - FluidUtils.getHotWater(1000), // Fluid - MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(20), // Fluid - new ItemStack[] { - ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Copper, 1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - }, // Output - new int[] { - 10000, - 100, - 100, - 500, - 500, - 500, - 1000, - 1000, - 1000 - }, - 40 * 20, // Time in ticks - 1024); // EU - - //Tetra - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Tetrahedrite, 1), // Item Input - }, - FluidUtils.getHotWater(1000), // Fluid - MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(10), // Fluid - new ItemStack[] { - ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Tetrahedrite, 1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - }, // Output - new int[] { - 10000, - 100, - 100, - 300, - 300, - 300, - 800, - 800, - 800 - }, - 40 * 20, // Time in ticks - 1024); // EU - - //Chalco - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1), // Item Input - }, - FluidUtils.getHotWater(1000), // Fluid - MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(10), // Fluid - new ItemStack[] { - ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Chalcopyrite, 1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - }, // Output - new int[] { - 10000, - 100, - 100, - 300, - 300, - 300, - 800, - 800, - 800 - }, - 40 * 20, // Time in ticks - 1024); // EU - - //Malachite - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - CI.getNumberedAdvancedCircuit(23), - ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Malachite, 1), // Item Input - }, - FluidUtils.getHotWater(1000), // Fluid - MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(10), // Fluid - new ItemStack[] { - ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Malachite, 1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), - }, // Output - new int[] { - 10000, - 100, - 100, - 300, - 300, - 300, - 800, - 800, - 800 - }, - 40 * 20, // Time in ticks - 1024); // EU - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java deleted file mode 100644 index 7ffdcf295b..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; - -public class RECIPES_Shapeless { - - static ItemStack dustStaballoy; - - //Circuits - static String circuitPrimitive = "circuitPrimitive"; - static String circuitBasic = "circuitBasic"; - static String circuitGood = "circuitGood"; - static String circuitAdvanced = "circuitAdvanced"; - static String circuitData = "circuitData"; - static String circuitElite = "circuitElite"; - static String circuitMaster = "circuitMaster"; - static String circuitUltimate = "circuitUltimate"; - static ItemStack gearboxCasing_Tier_1; - - public static final void loadRecipes(){ - //run(); - Logger.INFO("Loading Shapeless Recipes."); - } - - private static void run(){ - //Gregtech items - if (LoadedMods.Gregtech){ - - } - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Tools.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Tools.java deleted file mode 100644 index 42448e6b74..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Tools.java +++ /dev/null @@ -1,181 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraftforge.oredict.OreDictionary; - -public class RECIPES_Tools { - - //Outputs - public static ItemStack RECIPE_StaballoyPickaxe = new ItemStack(ModItems.itemStaballoyPickaxe); - public static ItemStack RECIPE_StaballoyAxe = new ItemStack(ModItems.itemStaballoyAxe); - public static ItemStack RECIPE_SandstoneHammer = new ItemStack(ModItems.itemSandstoneHammer); - //public static ItemStack RECIPE_StaballoyIngot = new ItemStack(ModItems.itemIngotStaballoy); - public static ItemStack RECIPE_SandStone = new ItemStack(Blocks.sandstone, 2); - public static ItemStack RECIPE_Sand = new ItemStack(Blocks.sand, 4); - public static ItemStack RECIPE_FireStarter = ItemUtils.getSimpleStack(ModItems.itemBasicFireMaker); - - public static ItemStack RECIPE_DivisionSigil; - - //MC Items - public static Item Apple = Items.apple; - - //MC Blocks - public static Block CobbleStone = Blocks.cobblestone; - public static Block Dirt = Blocks.dirt; - public static Block Sand = Blocks.sand; - public static Block Gravel = Blocks.gravel; - public static Block Sandstone = Blocks.sandstone; - - //null - public static String empty = " "; - - //Batteries - public static String batteryBasic = "batteryBasic"; - public static String batteryAdvanced = "batteryAdvanced"; - public static String batteryElite = "batteryElite"; - public static String batteryMaster = "batteryMaster"; - public static String batteryUltimate = "batteryUltimate"; - - //Circuits - public static String circuitPrimitive = "circuitPrimitive"; - public static String circuitBasic = "circuitBasic"; - public static String circuitGood = "circuitGood"; - public static String circuitAdvanced = "circuitAdvanced"; - public static String circuitElite = "circuitElite"; - public static String circuitMaster = "circuitMaster"; - public static String circuitUltimate = "circuitUltimate"; - - //Cables - public static String cableGt01Electrum = "cableGt01Electrum"; - public static String cableGt02Electrum = "cableGt02Electrum"; - public static String cableGt01RedstoneAlloy = "cableGt01RedstoneAlloy"; - public static String cableGt02RedstoneAlloy = "cableGt02RedstoneAlloy"; - public static String cableGt01Copper = "cableGt01Copper"; - public static String cableGt02Copper = "cableGt02Copper"; - public static String cableGt01AnnealedCopper = "cableGt01AnnealedCopper"; - public static String cableGt02AnnealedCopper = "cableGt02AnnealedCopper"; - - //Rods - public static String stickWood = "stickWood"; - public static String stickStaballoy= "stickStaballoy"; - public static String stickTitanium= "stickTitanium"; - public static String stickIron= "stickIron"; - public static String stickGold= "stickGold"; - public static String stickSilver= "stickSilver"; - public static String stickSteel= "stickSteel"; - public static String stickBronze= "stickBronze"; - public static String stickTungsten= "stickTungsten"; - public static String stickRedAlloy= "stickRedAlloy"; - public static String stickInvar= "stickInvar"; - public static String stickElectrum= "stickElectrum"; - public static String stickElectricalSteel= "stickElectricalSteel"; - - //Plates - public static String plateStaballoy= "plateStaballoy"; - public static String plateTitanium= "plateTitanium"; - public static String plateIron= "plateIron"; - public static String plateGold= "plateGold"; - public static String plateSilver= "plateSilver"; - public static String plateSteel= "plateSteel"; - public static String plateBronze= "plateBronze"; - public static String plateTungsten= "plateTungsten"; - public static String plateRedAlloy= "plateRedAlloy"; - public static String plateInvar= "plateInvar"; - public static String plateElectrum= "plateElectrum"; - public static String plateElectricalSteel= "plateElectricalSteel"; - - //Ingots - public static String ingotStaballoy= "ingotStaballoy"; - public static String ingotTitanium= "ingotTitanium"; - public static String ingotIron= "ingotIron"; - public static String ingotGold= "ingotGold"; - public static String ingotSilver= "ingotSilver"; - public static String ingotSteel= "ingotSteel"; - public static String ingotBronze= "ingotBronze"; - public static String ingotTungsten= "ingotTungsten"; - public static String ingotRedAlloy= "ingotRedAlloy"; - public static String ingotInvar= "ingotInvar"; - public static String ingotElectrum= "ingotElectrum"; - public static String ingotUranium= "ingotUranium"; - public static String ingotElectricalSteel= "ingotElectricalSteel"; - - //Crafting Tools - public static String craftingToolHardHammer = "craftingToolHardHammer"; - public static String craftingToolSoftHammer = "craftingToolSoftHammer"; - public static String craftingToolFile = "craftingToolFile"; - public static String craftingToolSaw = "craftingToolSaw"; - public static String craftingToolPickaxe = "craftingToolPickaxe"; - public static String craftingToolWrench = "craftingToolWrench"; - public static String craftingToolCrowbar = "craftingToolCrowbar"; - public static String craftingToolKnife = "craftingToolKnife"; - public static String craftingToolScrewdriver = "craftingToolScrewdriver"; - - public static ItemStack sandHammer = new ItemStack (ModItems.itemSandstoneHammer, 1, OreDictionary.WILDCARD_VALUE); - public static String craftingToolSandHammer = "craftingToolSandHammer"; - - public static ItemStack personalCloakingDevice = ItemUtils.getSimpleStack(ModItems.itemPersonalCloakingDevice); - public static String plateDoubleNiChrome = "plateDoubleNichrome"; - public static String plateIridiumAlloy = "plateAlloyIridium"; - - public static final void loadRecipes(){ - - - run(); - - } - - private static void run(){ - //Staballoy Pickaxe - RecipeUtils.addShapedRecipe( - plateStaballoy, plateStaballoy, ingotStaballoy, - craftingToolFile, stickTungsten, craftingToolHardHammer, - craftingToolWrench, stickTungsten, craftingToolHardHammer, - RECIPE_StaballoyPickaxe); - - //Staballoy Axe - RecipeUtils.addShapedRecipe( - plateStaballoy, ingotStaballoy, craftingToolHardHammer, - plateStaballoy, stickTungsten, craftingToolHardHammer, - craftingToolFile, stickTungsten, craftingToolWrench, - RECIPE_StaballoyAxe); - - //Cobble to Sand - RecipeUtils.addShapedRecipe( - CobbleStone, CobbleStone, CobbleStone, - CobbleStone, sandHammer, CobbleStone, - CobbleStone, CobbleStone, CobbleStone, - RECIPE_Sand); - - //Sand to Sandstone - RecipeUtils.addShapedRecipe( - Sand, Sand, Sand, - Sand, sandHammer, Sand, - Sand, Sand, Sand, - RECIPE_SandStone); - - //Sandstone Hammer - RecipeUtils.addShapedRecipe( - plateElectrum, ingotElectrum, plateElectrum, - craftingToolScrewdriver, stickBronze, craftingToolHardHammer, - null, stickSteel, null, - RECIPE_SandstoneHammer); - - //Basic Firemaker - RecipeUtils.addShapedRecipe( - "cropWheat", "cropWheat", "cropWheat", - ItemUtils.getSimpleStack(Items.string), stickWood, ItemUtils.getSimpleStack(Items.string), - "cropWheat", "cropWheat", "cropWheat", - RECIPE_FireStarter); - - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPE_Batteries.java b/src/Java/gtPlusPlus/core/recipe/RECIPE_Batteries.java deleted file mode 100644 index 5476ef0e8d..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/RECIPE_Batteries.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class RECIPE_Batteries { - - static ItemStack RECIPE_Battery_Sodium = GregtechItemList.Battery_RE_EV_Sodium.get(1); - static ItemStack RECIPE_Battery_Cadmium = GregtechItemList.Battery_RE_EV_Cadmium.get(1); - static ItemStack RECIPE_Battery_Lithium = GregtechItemList.Battery_RE_EV_Lithium.get(1); - static ItemStack GT_Battery_Sodium = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32539, 1); - static ItemStack GT_Battery_Cadmium = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32537, 1); - static ItemStack GT_Battery_Lithium = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32538, 1); - static ItemStack machineTransformer_EV; - - public static void loadRecipes(){ - - if (LoadedMods.Gregtech){ - machineTransformer_EV = ItemList.Transformer_EV_HV.get(1); - run(); - } - } - - private static void run(){ - - - RecipeUtils.addShapedGregtechRecipe( - GT_Battery_Sodium, RECIPES_Machines.cableTier4, GT_Battery_Sodium, - CI.circuitTier3, machineTransformer_EV, CI.circuitTier3, - GT_Battery_Sodium, RECIPES_Machines.cableTier4, GT_Battery_Sodium, - RECIPE_Battery_Sodium); - RecipeUtils.addShapedGregtechRecipe( - GT_Battery_Cadmium, RECIPES_Machines.cableTier4, GT_Battery_Cadmium, - CI.circuitTier3, machineTransformer_EV, CI.circuitTier3, - GT_Battery_Cadmium, RECIPES_Machines.cableTier4, GT_Battery_Cadmium, - RECIPE_Battery_Cadmium); - RecipeUtils.addShapedGregtechRecipe( - GT_Battery_Lithium, RECIPES_Machines.cableTier4, GT_Battery_Lithium, - CI.circuitTier3, machineTransformer_EV, CI.circuitTier3, - GT_Battery_Lithium, RECIPES_Machines.cableTier4, GT_Battery_Lithium, - RECIPE_Battery_Lithium); - - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java b/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java deleted file mode 100644 index 0d25d2bec9..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java +++ /dev/null @@ -1,43 +0,0 @@ -package gtPlusPlus.core.recipe; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.RecipeUtils; - -public class ShapedRecipeObject { - - public Object object_A; - public Object object_B; - public Object object_C; - public Object object_D; - public Object object_E; - public Object object_F; - public Object object_G; - public Object object_H; - public Object object_I; - public ItemStack object_OUTPUT; - - public ShapedRecipeObject( - final Object input_A,final Object input_B,final Object input_C, - final Object input_D,final Object input_E,final Object input_F, - final Object input_G,final Object input_H,final Object input_I, - final ItemStack input_Output){ - this.object_A = input_A; - this.object_B = input_B; - this.object_C = input_C; - this.object_D = input_D; - this.object_E = input_E; - this.object_F = input_F; - this.object_G = input_G; - this.object_H = input_H; - this.object_I = input_I; - this.object_OUTPUT = input_Output; - Logger.SPECIFIC_WARNING("ShapedRecipeObject", "New object created.", 36); - } - - public void buildRecipe(){ - RecipeUtils.recipeBuilder(this.object_A, this.object_B, this.object_C, this.object_D, this.object_E, this.object_F, this.object_G, this.object_H, this.object_I, this.object_OUTPUT); - } - -} diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java deleted file mode 100644 index 0a1b762a97..0000000000 --- a/src/Java/gtPlusPlus/core/recipe/common/CI.java +++ /dev/null @@ -1,1343 +0,0 @@ -package gtPlusPlus.core.recipe.common; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.item.chemistry.GenericChem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.recipe.LOADER_Machine_Components; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import ic2.core.Ic2Items; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class CI { - - //null - public static ItemStack _NULL = ItemUtils.getErrorStack(1); - - //bits - public static long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE - | GT_ModHandler.RecipeBits.BUFFERED; - public static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; - - //Circuits - public static Object circuitPrimitive; - public static Object circuitTier1; - public static Object circuitTier2; - public static Object circuitTier3; - public static Object circuitTier4; - public static Object circuitTier5; - public static Object circuitTier6; - public static Object circuitTier7; - public static Object circuitTier8; - public static Object circuitTier9; - - //Machine Components - public static ItemStack electricMotor_ULV; - public static ItemStack electricMotor_LV; - public static ItemStack electricMotor_MV; - public static ItemStack electricMotor_HV; - public static ItemStack electricMotor_EV; - public static ItemStack electricMotor_IV; - public static ItemStack electricMotor_LuV; - public static ItemStack electricMotor_ZPM; - public static ItemStack electricMotor_UV; - public static ItemStack electricMotor_MAX; - public static ItemStack electricPump_ULV; - public static ItemStack electricPump_LV; - public static ItemStack electricPump_MV; - public static ItemStack electricPump_HV; - public static ItemStack electricPump_EV; - public static ItemStack electricPump_IV; - public static ItemStack electricPump_LuV; - public static ItemStack electricPump_ZPM; - public static ItemStack electricPump_UV; - public static ItemStack electricPump_MAX; - public static ItemStack electricPiston_ULV; - public static ItemStack electricPiston_LV; - public static ItemStack electricPiston_MV; - public static ItemStack electricPiston_HV; - public static ItemStack electricPiston_EV; - public static ItemStack electricPiston_IV; - public static ItemStack electricPiston_LuV; - public static ItemStack electricPiston_ZPM; - public static ItemStack electricPiston_UV ; - public static ItemStack electricPiston_MAX; - public static ItemStack robotArm_ULV; - public static ItemStack robotArm_LV; - public static ItemStack robotArm_MV; - public static ItemStack robotArm_HV; - public static ItemStack robotArm_EV; - public static ItemStack robotArm_IV; - public static ItemStack robotArm_LuV; - public static ItemStack robotArm_ZPM; - public static ItemStack robotArm_UV; - public static ItemStack robotArm_MAX; - public static ItemStack conveyorModule_ULV; - public static ItemStack conveyorModule_LV; - public static ItemStack conveyorModule_MV; - public static ItemStack conveyorModule_HV; - public static ItemStack conveyorModule_EV; - public static ItemStack conveyorModule_IV; - public static ItemStack conveyorModule_LuV; - public static ItemStack conveyorModule_ZPM; - public static ItemStack conveyorModule_UV; - public static ItemStack conveyorModule_MAX; - public static ItemStack emitter_ULV; - public static ItemStack emitter_LV; - public static ItemStack emitter_MV; - public static ItemStack emitter_HV; - public static ItemStack emitter_EV; - public static ItemStack emitter_IV; - public static ItemStack emitter_LuV; - public static ItemStack emitter_ZPM; - public static ItemStack emitter_UV; - public static ItemStack emitter_MAX; - public static ItemStack fieldGenerator_ULV; - public static ItemStack fieldGenerator_LV; - public static ItemStack fieldGenerator_MV; - public static ItemStack fieldGenerator_HV; - public static ItemStack fieldGenerator_EV; - public static ItemStack fieldGenerator_IV; - public static ItemStack fieldGenerator_LuV; - public static ItemStack fieldGenerator_ZPM; - public static ItemStack fieldGenerator_UV; - public static ItemStack fieldGenerator_MAX; - public static ItemStack sensor_ULV; - public static ItemStack sensor_LV; - public static ItemStack sensor_MV; - public static ItemStack sensor_HV; - public static ItemStack sensor_EV; - public static ItemStack sensor_IV; - public static ItemStack sensor_LuV; - public static ItemStack sensor_ZPM; - public static ItemStack sensor_UV; - public static ItemStack sensor_MAX; - - //Machine Casings - public static ItemStack machineCasing_ULV; - public static ItemStack machineCasing_LV; - public static ItemStack machineCasing_MV; - public static ItemStack machineCasing_HV; - public static ItemStack machineCasing_EV; - public static ItemStack machineCasing_IV; - public static ItemStack machineCasing_LuV; - public static ItemStack machineCasing_ZPM; - public static ItemStack machineCasing_UV; - public static ItemStack machineCasing_MAX; - - //Machine Hulls - public static ItemStack machineHull_ULV; - public static ItemStack machineHull_LV; - public static ItemStack machineHull_MV; - public static ItemStack machineHull_HV; - public static ItemStack machineHull_EV; - public static ItemStack machineHull_IV; - public static ItemStack machineHull_LuV; - public static ItemStack machineHull_ZPM; - public static ItemStack machineHull_UV; - public static ItemStack machineHull_MAX; - - //Gearbox Casings - public static ItemStack gearboxCasing_Tier_1; - public static ItemStack gearboxCasing_Tier_2; - public static ItemStack gearboxCasing_Tier_3; - public static ItemStack gearboxCasing_Tier_4; - - public static String[] component_Plate; - public static String[] component_Rod; - public static String[] component_Ingot; - - //Crafting Tools - public static String craftingToolWrench = "craftingToolWrench"; - public static String craftingToolHammer_Hard = "craftingToolHardHammer"; - public static String craftingToolHammer_Soft = "craftingToolSoftHammer"; - public static String craftingToolScrewdriver = "craftingToolScrewdriver"; - public static String craftingToolFile = "craftingToolFile"; - public static String craftingToolMortar = "craftingToolMortar"; - public static String craftingToolKnife = "craftingToolKnife"; - public static String craftingToolCrowbar = "craftingToolCrowbar"; - public static String craftingToolSaw = "craftingToolSaw"; - public static String craftingToolWireCutter = "craftingToolWirecutter"; - public static String craftingToolSolderingIron = "craftingToolSolderingIron"; - - //Explosives - public static ItemStack explosivePowderKeg; - public static ItemStack explosiveTNT; - public static ItemStack explosiveITNT; - - public static void preInit(){ - - //Tiered Components - component_Plate = new String[]{ - getTieredComponent(OrePrefixes.plate, 0), - getTieredComponent(OrePrefixes.plate, 1), - getTieredComponent(OrePrefixes.plate, 2), - getTieredComponent(OrePrefixes.plate, 3), - getTieredComponent(OrePrefixes.plate, 4), - getTieredComponent(OrePrefixes.plate, 5), - getTieredComponent(OrePrefixes.plate, 6), - getTieredComponent(OrePrefixes.plate, 7), - getTieredComponent(OrePrefixes.plate, 8), - getTieredComponent(OrePrefixes.plate, 9), - getTieredComponent(OrePrefixes.plate, 10), - getTieredComponent(OrePrefixes.plate, 11) - }; - component_Rod = new String[]{ - getTieredComponent(OrePrefixes.stick, 0), - getTieredComponent(OrePrefixes.stick, 1), - getTieredComponent(OrePrefixes.stick, 2), - getTieredComponent(OrePrefixes.stick, 3), - getTieredComponent(OrePrefixes.stick, 4), - getTieredComponent(OrePrefixes.stick, 5), - getTieredComponent(OrePrefixes.stick, 6), - getTieredComponent(OrePrefixes.stick, 7), - getTieredComponent(OrePrefixes.stick, 8), - getTieredComponent(OrePrefixes.stick, 9), - getTieredComponent(OrePrefixes.stick, 10), - getTieredComponent(OrePrefixes.stick, 11) - }; - component_Ingot = new String[]{ - getTieredComponent(OrePrefixes.ingot, 0), - getTieredComponent(OrePrefixes.ingot, 1), - getTieredComponent(OrePrefixes.ingot, 2), - getTieredComponent(OrePrefixes.ingot, 3), - getTieredComponent(OrePrefixes.ingot, 4), - getTieredComponent(OrePrefixes.ingot, 5), - getTieredComponent(OrePrefixes.ingot, 6), - getTieredComponent(OrePrefixes.ingot, 7), - getTieredComponent(OrePrefixes.ingot, 8), - getTieredComponent(OrePrefixes.ingot, 9), - getTieredComponent(OrePrefixes.ingot, 10), - getTieredComponent(OrePrefixes.ingot, 11) - }; - - //Circuits - circuitPrimitive = getTieredCircuit(0); - circuitTier1 = getTieredCircuit(1); - circuitTier2 = getTieredCircuit(2); - circuitTier3 = getTieredCircuit(3); - circuitTier4 = getTieredCircuit(4); - circuitTier5 = getTieredCircuit(5); - circuitTier6 = getTieredCircuit(6); - circuitTier7 = getTieredCircuit(7); - circuitTier8 = getTieredCircuit(8); - circuitTier9 = getTieredCircuit(9); - - } - - public static Object getTieredCircuit(int tier){ - if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - if (tier == 0){ - return GregtechItemList.Old_Circuit_Primitive.get(1); - } - else if (tier == 1){ - return GregtechItemList.Old_Circuit_Basic.get(1); - } - else if (tier == 2){ - return GregtechItemList.Old_Circuit_Good.get(1); - } - else if (tier == 3){ - return GregtechItemList.Old_Circuit_Advanced.get(1); - } - else if (tier == 4){ - return GregtechItemList.Old_Circuit_Data.get(1); - } - else if (tier == 5){ - return GregtechItemList.Old_Circuit_Elite.get(1); - } - else if (tier == 6){ - return GregtechItemList.Old_Circuit_Master.get(1); - } - else if (tier == 7){ - return GregtechItemList.Old_Circuit_Ultimate.get(1); - } - else if (tier == 8){ - return GregtechItemList.Circuit_IV.get(1); - } - else if (tier == 9){ - return GregtechItemList.Circuit_LuV.get(1); - } - else if (tier == 10){ - return GregtechItemList.Circuit_ZPM.get(1); - } - } - else { - return getTieredCircuitOreDictName(tier); - } - return _NULL; - } - - public static ItemStack[] getAllCircuitsOfTier(int tier){ - return ItemUtils.getStackOfAllOreDictGroup(getTieredCircuitOreDictName(tier)); - } - - public static String getTieredCircuitOreDictName(int tier){ - if (tier == 0){ - return "circuitPrimitive"; - } - else if (tier == 1){ - return "circuitBasic"; - } - else if (tier == 2){ - return "circuitGood"; - } - else if (tier == 3){ - return "circuitAdvanced"; - } - else if (tier == 4){ - return "circuitData"; - } - else if (tier == 5){ - return "circuitElite"; - } - else if (tier == 6){ - return "circuitMaster"; - } - else if (tier == 7){ - return "circuitUltimate"; - } - else if (tier == 8){ - return "circuitSuperconductor"; - } - else if (tier == 9){ - return "circuitInfinite"; - } - else if (tier == 10){ - return "circuitQuantum"; - } - else { - return "circuitPrimitive"; - } - } - - public static ItemStack getNumberedCircuit(int Meta){ - return ItemUtils.getGregtechCircuit(Meta); - } - - private static Object getMaterialFromTier(int tier){ - if (tier == 0){ - return Materials.Wood; - } - else if (tier == 1){ - return Materials.Lead; - } - else if (tier == 2){ - return Materials.Bronze; - } - else if (tier == 3){ - return Materials.Steel; - } - else if (tier == 4){ - return ALLOY.EGLIN_STEEL; - } - else if (tier == 5){ - return Materials.Aluminium; - } - else if (tier == 6){ - return ALLOY.MARAGING250; - } - else if (tier == 7){ - return ALLOY.TANTALLOY_61; - } - else if (tier == 8){ - return ALLOY.INCONEL_792; - } - else if (tier == 9){ - return ALLOY.ZERON_100; - } - else if (tier == 10){ - return Materials.NaquadahEnriched; - } - else if (tier == 11){ - return Materials.Neutronium; - } - return Materials._NULL; - } - - @Deprecated - public static String getTieredComponent(OrePrefixes type, int tier){ - Object material = getMaterialFromTier(tier); - if (material != null){ - if (material instanceof Materials){ - //return (ItemStack) type.get(material); - String materialName = ((Materials) material).mDefaultLocalName; - Logger.INFO("Searching for a component named "+type.name()+materialName); - //return ItemUtils.getItemStackOfAmountFromOreDict(type.name()+materialName, 1); - return (type.name()+materialName); - } - else { - String materialName = (Utils.sanitizeString(((Material) material).getLocalizedName())); - Logger.INFO("Searching for a component named "+type.name()+materialName); - //return ItemUtils.getItemStackOfAmountFromOreDict(type.name()+materialName, 1); - return (type.name()+materialName); - } - } - Logger.INFO("[Components] Failed getting a tiered component. "+type.name()+" | "+tier); - return null; - } - - public static ItemStack getDataOrb(){ - if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - return GregtechItemList.Old_Tool_DataOrb.get(1); - } - else { - return ItemList.Tool_DataOrb.get(1); - } - } - - public static ItemStack getDataStick(){ - if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ - return GregtechItemList.Old_Tool_DataStick.get(1); - } - else { - return ItemList.Tool_DataStick.get(1); - } - } - - public static final ItemStack getTieredMachineHull(int tier){ - if (tier == 0){ - return machineHull_ULV; - } - else if (tier == 1){ - return machineHull_LV; - } - else if (tier == 2){ - return machineHull_MV; - } - else if (tier == 3){ - return machineHull_HV; - } - else if (tier == 4){ - return machineHull_EV; - } - else if (tier == 5){ - return machineHull_IV; - } - else if (tier == 6){ - return machineHull_LuV; - } - else if (tier == 7){ - return machineHull_ZPM; - } - else if (tier == 8){ - return machineHull_UV; - } - else if (tier == 9){ - return machineHull_MAX; - } - else { - return GregtechItemList.Casing_Multi_Use.get(1); - } - } - - public static final ItemStack getTieredMachineCasing(int tier){ - if (tier == 0){ - if (machineCasing_ULV == null) { - machineCasing_ULV = ItemList.Casing_ULV.get(1); - } - return machineCasing_ULV; - } - else if (tier == 1){ - return machineCasing_LV; - } - else if (tier == 2){ - return machineCasing_MV; - } - else if (tier == 3){ - return machineCasing_HV; - } - else if (tier == 4){ - return machineCasing_EV; - } - else if (tier == 5){ - return machineCasing_IV; - } - else if (tier == 6){ - return machineCasing_LuV; - } - else if (tier == 7){ - return machineCasing_ZPM; - } - else if (tier == 8){ - return machineCasing_UV; - } - else if (tier == 9){ - return machineCasing_MAX; - } - else { - return GregtechItemList.Casing_Multi_Use.get(1); - } - } - - public static void init() { - //Set Explosives - explosivePowderKeg = ItemUtils.getValueOfItemList("Block_Powderbarrel", 1, ItemUtils.getSimpleStack(Items.gunpowder, 16)); - explosiveTNT = ItemUtils.getSimpleStack(Blocks.tnt).copy(); - explosiveITNT = Ic2Items.industrialTnt.copy(); - - //Machine Casings - machineCasing_ULV = ItemList.Casing_ULV.get(1); - machineCasing_LV = ItemList.Casing_LV.get(1); - machineCasing_MV = ItemList.Casing_MV.get(1); - machineCasing_HV = ItemList.Casing_HV.get(1); - machineCasing_EV = ItemList.Casing_EV.get(1); - machineCasing_IV = ItemList.Casing_IV.get(1); - machineCasing_LuV = ItemList.Casing_LuV.get(1); - machineCasing_ZPM = ItemList.Casing_ZPM.get(1); - machineCasing_UV = ItemList.Casing_UV.get(1); - machineCasing_MAX = ItemList.Casing_MAX.get(1); - - //Machine Hulls - machineHull_ULV = ItemList.Hull_ULV.get(1); - machineHull_LV = ItemList.Hull_LV.get(1); - machineHull_MV = ItemList.Hull_MV.get(1); - machineHull_HV = ItemList.Hull_HV.get(1); - machineHull_EV = ItemList.Hull_EV.get(1); - machineHull_IV = ItemList.Hull_IV.get(1); - machineHull_LuV = ItemList.Hull_LuV.get(1); - machineHull_ZPM = ItemList.Hull_ZPM.get(1); - machineHull_UV = ItemList.Hull_UV.get(1); - machineHull_MAX = ItemList.Hull_MAX.get(1); - - //Gear box Casings - gearboxCasing_Tier_1 = ItemList.Casing_Gearbox_Bronze.get(1); - gearboxCasing_Tier_2 = ItemList.Casing_Gearbox_Steel.get(1); - gearboxCasing_Tier_3 = ItemList.Casing_Gearbox_Titanium.get(1); - gearboxCasing_Tier_4 = ItemList.Casing_Gearbox_TungstenSteel.get(1); - - //Machine Components - LOADER_Machine_Components.initialise(); - } - - public static ItemStack emptyCells(int i) { - return ItemUtils.getEmptyCell(i); - } - - private static final Material[] aMaterial_Main = new Material[] { - ALLOY.POTIN, - ALLOY.TUMBAGA, - ALLOY.EGLIN_STEEL, - ALLOY.INCONEL_792, - ALLOY.TUNGSTEN_TITANIUM_CARBIDE, - ALLOY.NITINOL_60, - ALLOY.ZERON_100, - ALLOY.PIKYONIUM, - ELEMENT.STANDALONE.ADVANCED_NITINOL, - ALLOY.ABYSSAL, - ALLOY.QUANTUM, - ELEMENT.STANDALONE.HYPOGEN - }; - - private static final Material[] aMaterial_Secondary = new Material[] { - ALLOY.STEEL, - ALLOY.SILICON_CARBIDE, - ALLOY.BABBIT_ALLOY, - ALLOY.INCONEL_690, - ALLOY.STELLITE, - ALLOY.ARCANITE, - ALLOY.LAFIUM, - ALLOY.CINOBITE, - ALLOY.TITANSTEEL, - ALLOY.OCTIRON, - ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN, - ELEMENT.STANDALONE.HYPOGEN - }; - - private static final Material[] aMaterial_Tertiary = new Material[] { - ELEMENT.getInstance().LEAD, - ELEMENT.getInstance().ALUMINIUM, - ELEMENT.STANDALONE.BLACK_METAL, - ELEMENT.getInstance().TUNGSTEN, - ALLOY.HASTELLOY_N, - ALLOY.ENERGYCRYSTAL, - ALLOY.TRINIUM_NAQUADAH_CARBON, - ALLOY.TRINIUM_REINFORCED_STEEL, //Arceus - ALLOY.TITANSTEEL, - ELEMENT.STANDALONE.ASTRAL_TITANIUM, - ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN, - ELEMENT.STANDALONE.HYPOGEN - }; - - private static final Materials[] aMaterial_Cables = new Materials[] { - !CORE.GTNH ? Materials.Lead : Materials.Tin, - Materials.Cobalt, - Materials.AnnealedCopper, - Materials.Gold, - Materials.Titanium, - Materials.Nichrome, - Materials.Platinum, - Materials.YttriumBariumCuprate, - Materials.Naquadah, - Materials.Duranium, - Materials.Superconductor, - }; - - private static final Materials[] aMaterial_Circuits = new Materials[] { - Materials.Primitive, - Materials.Basic, - Materials.Good, - Materials.Advanced, - Materials.Data, - Materials.Data, - Materials.Elite, - Materials.Master, - Materials.Ultimate, - Materials.Superconductor, - Materials.Infinite, - }; - - private static final Material[][] aMaster = new Material[][] {aMaterial_Main, aMaterial_Secondary, aMaterial_Tertiary}; - - - public static FluidStack getTieredFluid(int aTier, int aAmount) { - return getTieredFluid(aTier, aAmount, 0); - } - - public static FluidStack getAlternativeTieredFluid(int aTier, int aAmount) { - return getTieredFluid(aTier, aAmount, 1); - } - - public static FluidStack getTertiaryTieredFluid(int aTier, int aAmount) { - return getTieredFluid(aTier, aAmount, 2); - } - - public static FluidStack getTieredFluid(int aTier, int aAmount, int aType) { - // Weird Legacy handling - /*ItemStack aCell = getTieredComponent(OrePrefixes.liquid, aTier, 1); - FluidStack a = GT_Utility.getFluidForFilledItem(aCell, true); - if (a == null) { - a = aMaster[aType][aTier].getFluid(aAmount); - }*/ - - // Modern Handling - FluidStack a = aMaster[aType][aTier].getFluidStack(aAmount); - if (a == null) { - ItemStack aCell = getTieredComponent(OrePrefixes.liquid, aTier, 1); - if (aCell != null) { - a = GT_Utility.getFluidForFilledItem(aCell, true); - a.amount = aAmount; - } - } - return a; - } - - public static ItemStack getEnergyCore(int aTier, int aAmount) { - ItemStack[] aOutput = new ItemStack[] { - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"1", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"2", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"3", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"4", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"5", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"6", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"7", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"8", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"9", 1), - ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"10", 1) - }; - return ItemUtils.getSimpleStack(aOutput[MathUtils.balance(aTier, 0, 9)], aAmount); - } - - public static ItemStack getPlate(int aTier, int aAmount) { - return getTieredComponent(OrePrefixes.plate, aTier, aAmount); - } - - public static ItemStack getDoublePlate(int aTier, int aAmount) { - return getTieredComponent(OrePrefixes.plateDouble, aTier, aAmount); - } - - public static ItemStack getGear(int aTier, int aAmount) { - return getTieredComponent(OrePrefixes.gearGt, aTier, aAmount); - } - - public static ItemStack getIngot(int aTier, int aAmount) { - return getTieredComponent(OrePrefixes.ingot, aTier, aAmount); - } - - public static ItemStack getBolt(int aTier, int aAmount) { - return getTieredComponent(OrePrefixes.bolt, aTier, aAmount); - } - - public static ItemStack getTieredComponent(OrePrefixes aPrefix, int aTier, int aAmount) { - aTier = Math.max(0, aTier); - - Material m = null; - - if (aPrefix == OrePrefixes.liquid) { - int aMatID = (aTier == 0 || aTier == 2 || aTier == 5 || aTier == 8 ? 0 : (aTier == 1 || aTier == 3 || aTier == 6 || aTier == 9 ? 1 : 2)); - ItemStack aCell = aMaster[aMatID][aTier].getCell(aAmount); - return aCell; - } - - if (aPrefix == OrePrefixes.circuit) { - if (aTier == 4) { - return ItemUtils.getSimpleStack(CI.getDataStick(), aAmount); - } - else if (aTier == 5) { - return ItemUtils.getSimpleStack(CI.getDataOrb(), aAmount); - } - return ItemUtils.getOrePrefixStack(OrePrefixes.circuit, aMaterial_Circuits[aTier], aAmount); - } - - //Check for Cables first, catch SuperConductor case and swap to wire. - if (aPrefix == OrePrefixes.cableGt01 || aPrefix == OrePrefixes.cableGt02 || aPrefix == OrePrefixes.cableGt04 || aPrefix == OrePrefixes.cableGt08 || aPrefix == OrePrefixes.cableGt12) { - //Special Handler - if (aTier == 10) { - if (aPrefix == OrePrefixes.cableGt01) { - aPrefix = OrePrefixes.wireGt02; - } - else if (aPrefix == OrePrefixes.cableGt02) { - aPrefix = OrePrefixes.wireGt04; - } - else if (aPrefix == OrePrefixes.cableGt04) { - aPrefix = OrePrefixes.wireGt08; - } - else if (aPrefix == OrePrefixes.cableGt08) { - aPrefix = OrePrefixes.wireGt12; - } - else if (aPrefix == OrePrefixes.cableGt12) { - aPrefix = OrePrefixes.wireGt16; - } - } - else { - return ItemUtils.getOrePrefixStack(aPrefix, aMaterial_Cables[aTier], aAmount); - } - - - } - if (aPrefix == OrePrefixes.wireGt01 || aPrefix == OrePrefixes.wireGt02 || aPrefix == OrePrefixes.wireGt04 || aPrefix == OrePrefixes.wireGt08 || aPrefix == OrePrefixes.wireGt12 || aPrefix == OrePrefixes.wireGt16) { - return ItemUtils.getOrePrefixStack(aPrefix, aMaterial_Cables[aTier], aAmount); - } - - if (aPrefix == OrePrefixes.pipeTiny || aPrefix == OrePrefixes.pipeSmall || aPrefix == OrePrefixes.pipe || aPrefix == OrePrefixes.pipeMedium || aPrefix == OrePrefixes.pipeLarge || aPrefix == OrePrefixes.pipeHuge) { - - if (aPrefix == OrePrefixes.pipe) { - aPrefix = OrePrefixes.pipeMedium; - } - - if (aTier == 0) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.Lead, aAmount); - } - else if (aTier == 1) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.Steel, aAmount); - } - else if (aTier == 2) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.StainlessSteel, aAmount); - } - else if (aTier == 3) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.Tungsten, aAmount); - } - else if (aTier == 4) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.TungstenSteel, aAmount); - } - else if (aTier == 5) { - return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.MARAGING350, aAmount); - } - else if (aTier == 6) { - return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.STABALLOY, aAmount); - } - else if (aTier == 7) { - return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.HASTELLOY_X, aAmount); - } - else if (aTier == 8) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.Ultimate, aAmount); - } - else if (aTier == 9) { - return ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, aAmount); - } - else if (aTier == 10) { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.Europium, aAmount); - } - else { - return ItemUtils.getOrePrefixStack(aPrefix, Materials.Titanium, aAmount); - } - } - - if (aPrefix == OrePrefixes.rod) { - aPrefix = OrePrefixes.stick; - } - - if (aPrefix == OrePrefixes.gear || aPrefix == OrePrefixes.gearGt) { - m = aMaster[0][aTier]; - } - else if (aPrefix == OrePrefixes.rod || aPrefix == OrePrefixes.stick) { - m = aMaster[0][aTier]; - } - else if (aPrefix == OrePrefixes.stickLong) { - m = aMaster[1][aTier]; - } - else if (aPrefix == OrePrefixes.bolt) { - m = aMaster[2][aTier]; - } - else if (aPrefix == OrePrefixes.screw) { - m = aMaster[0][aTier]; - } - else if (aPrefix == OrePrefixes.rotor) { - m = aMaster[1][aTier]; - } - else if (aPrefix == OrePrefixes.frame || aPrefix == OrePrefixes.frameGt) { - m = aMaster[2][aTier]; - } - else if (aPrefix == OrePrefixes.ingot) { - m = aMaster[1][aTier]; - } - else if (aPrefix == OrePrefixes.plate) { - m = aMaster[0][aTier]; - } - else if (aPrefix == OrePrefixes.plateDouble) { - m = aMaster[0][aTier]; - } - else if (aPrefix == OrePrefixes.ring) { - m = aMaster[2][aTier]; - } - else if (aPrefix == OrePrefixes.cell) { - m = aMaster[1][aTier]; - } - else { - m = aMaterial_Main[aTier]; - } - - ItemStack aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); - - //If Invalid, Try First Material - if (!ItemUtils.checkForInvalidItems(aReturn)) { - m = aMaster[0][aTier]; - aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); - - //If Invalid, Try Second Material - if (!ItemUtils.checkForInvalidItems(aReturn)) { - m = aMaster[1][aTier]; - aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); - - //If Invalid, Try Third Material - if (!ItemUtils.checkForInvalidItems(aReturn)) { - m = aMaster[2][aTier]; - aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); - - //All Invalid? Ok, shit. - //Let's add a special error ingot. - if (!ItemUtils.checkForInvalidItems(aReturn)) { - aReturn = ItemUtils.getErrorStack(1, (aPrefix.toString()+m.getLocalizedName()+" x"+aAmount)); - } - } - } - } - - return aReturn; - - - } - - public static ItemStack getElectricMotor(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.electricMotor_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricMotor_MAX; - } - else { - aType = CI.electricMotor_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getElectricPiston(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.electricPiston_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPiston_MAX; - } - else { - aType = CI.electricPiston_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getElectricPump(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.electricPump_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.electricPump_MAX; - } - else { - aType = CI.electricPump_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getRobotArm(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.robotArm_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.robotArm_MAX; - } - else { - aType = CI.robotArm_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getConveyor(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.conveyorModule_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.conveyorModule_MAX; - } - else { - aType = CI.conveyorModule_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getEmitter(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.emitter_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.emitter_MAX; - } - else { - aType = CI.emitter_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getSensor(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.sensor_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.sensor_MAX; - } - else { - aType = CI.sensor_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getFieldGenerator(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.fieldGenerator_MAX; - } - else { - aType = CI.fieldGenerator_LV; - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - - - public static ItemStack getTieredMachineHull(int aTier, int aSize) { - ItemStack aType; - int aLazyTier = 0; - if (aTier == aLazyTier++) { - aType = CI.machineHull_ULV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_LV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_MV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_HV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_EV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_IV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_LuV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_ZPM; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_UV; - } - else if (aTier == aLazyTier++) { - aType = CI.machineHull_MAX; - } - else { - aType = GregtechItemList.Casing_Multi_Use.get(1, CI.machineHull_MV); - } - return ItemUtils.getSimpleStack(aType, aSize); - } - - public static ItemStack getHeatCoil(int i) { - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - if (i == 1) { - return ItemList.Casing_Coil_Kanthal.get(1); - } else if (i == 2) { - return ItemList.Casing_Coil_Nichrome.get(1); - } else { - return ItemList.Casing_Coil_Cupronickel.get(1); - } - } else { - if (!CORE.GTNH) { - if (i > 6) { - i = 6; - } - } else { - if (i > 8) { - i = 8; - } - } - return ItemUtils.simpleMetaStack(StaticFields59.getBlockCasings5(), i, 1); - } - - } - - public static ItemStack getNumberedBioCircuit(int i) { - return ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, i, 0); - } - - public static ItemStack getNumberedAdvancedCircuit(int i) { - return ItemUtils.simpleMetaStack(GenericChem.mAdvancedCircuit, i, 0); - } - - public static ItemStack getTieredGTPPMachineCasing(int aTier, int aAmount) { - GregtechItemList[] aHulls = new GregtechItemList[] { - GregtechItemList.GTPP_Casing_ULV, - GregtechItemList.GTPP_Casing_LV, - GregtechItemList.GTPP_Casing_MV, - GregtechItemList.GTPP_Casing_HV, - GregtechItemList.GTPP_Casing_EV, - GregtechItemList.GTPP_Casing_IV, - GregtechItemList.GTPP_Casing_LuV, - GregtechItemList.GTPP_Casing_ZPM, - GregtechItemList.GTPP_Casing_UV, - GregtechItemList.GTPP_Casing_MAX - }; - return aHulls[aTier].get(aAmount); - } - - public static ItemStack getTieredComponentOfMaterial(Materials aMaterial, OrePrefixes aPrefix, int aAmount) { - return ItemUtils.getOrePrefixStack(aPrefix, aMaterial, aAmount); - } - - public static ItemStack getTransmissionComponent(int aTier, int aAmount) { - GregtechItemList[] aTransParts = new GregtechItemList[] { - GregtechItemList.TransmissionComponent_ULV, - GregtechItemList.TransmissionComponent_LV, - GregtechItemList.TransmissionComponent_MV, - GregtechItemList.TransmissionComponent_HV, - GregtechItemList.TransmissionComponent_EV, - GregtechItemList.TransmissionComponent_IV, - GregtechItemList.TransmissionComponent_LuV, - GregtechItemList.TransmissionComponent_ZPM, - GregtechItemList.TransmissionComponent_UV, - GregtechItemList.TransmissionComponent_MAX, - }; - return aTransParts[aTier].get(aAmount); - } - - public static ItemStack getEmptyCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 13, aAmount); - } - - /** - * Aluminium + Silver Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getGreenCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 14, aAmount); - } - - /** - * Iron + Copper Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getRedCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 0, aAmount); - } - - /** - * Tungsten + Nickel Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getYellowCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 1, aAmount); - } - - /** - * Cobalt + Titanium Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getBlueCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 2, aAmount); - } - - /** - * Vanadium + Palladium Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getOrangeCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 3, aAmount); - } - - /** - * Iridium + Ruthenium Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getPurpleCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 4, aAmount); - } - - /** - * Aluminium + Nickel Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getBrownCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 5, aAmount); - } - - /** - * Platinum + Rhodium Catalyst - * @param aAmount - Stacksize - * @return - A Catalyst stack of given size - */ - public static ItemStack getPinkCatalyst(int aAmount) { - return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 6, aAmount); - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotAirFilter.java b/src/Java/gtPlusPlus/core/slots/SlotAirFilter.java deleted file mode 100644 index 92e9bebe21..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotAirFilter.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.slots; - -import gtPlusPlus.core.item.general.ItemAirFilter; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotAirFilter extends Slot { - - public SlotAirFilter(final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (itemstack == null) { - return false; - } - if (itemstack.getItem() instanceof ItemAirFilter){ - return true; - } - return false; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java deleted file mode 100644 index 532f2f0822..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.interfaces.IItemBlueprint; - -public class SlotBlueprint extends Slot { - - public SlotBlueprint(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (itemstack.getItem() instanceof IItemBlueprint) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid Blueprint."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid Blueprint."); - return false; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java b/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java deleted file mode 100644 index 94b0b9ecc7..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java +++ /dev/null @@ -1,77 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.OrePrefixes; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.items.GT_MetaGenerated_Item_02; - -public class SlotBuzzSaw extends Slot { - - public SAWTOOL currentTool = SAWTOOL.NONE; - - public SlotBuzzSaw(final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - boolean isValid = false; - - if (itemstack != null) { - if ((itemstack.getItem() instanceof GT_MetaGenerated_Item_02) - || (itemstack.getItem() instanceof GT_MetaGenerated_Tool)) { - // Buzzsaw Blade //TODO - /* - * if (OrePrefixes.toolHeadBuzzSaw.contains(itemstack)){ isValid - * = false; } - */ - if (OrePrefixes.craftingTool.contains(itemstack)) { - if (itemstack.getDisplayName().toLowerCase().contains("saw") - || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.10") - || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.110") - || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.112") - || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.114") - || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")) { - if (itemstack.getItemDamage() == 10) { - isValid = true; - this.currentTool = SAWTOOL.SAW; - } - else if (itemstack.getItemDamage() == 110) { - isValid = true; - this.currentTool = SAWTOOL.CHAINSAW; - } - else if (itemstack.getItemDamage() == 112) { - isValid = true; - this.currentTool = SAWTOOL.CHAINSAW; - } - else if (itemstack.getItemDamage() == 114) { - isValid = true; - this.currentTool = SAWTOOL.CHAINSAW; - } - else if (itemstack.getItemDamage() == 140) { - isValid = true; - this.currentTool = SAWTOOL.BUZZSAW; - } - return isValid; - } - } - } - } - this.currentTool = SAWTOOL.NONE; - return isValid; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - - public enum SAWTOOL { - NONE, SAW, BUZZSAW, CHAINSAW - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java b/src/Java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java deleted file mode 100644 index 1029d37a78..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.core.slots; - -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class SlotChemicalPlantInput extends Slot { - - public SlotChemicalPlantInput(final IInventory inventory, final int index, final int x, final int y) { - super(inventory, index, x, y); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValidForChemicalPlantSlot(itemstack); - } - - public static boolean isItemValidForChemicalPlantSlot(ItemStack aStack) { - boolean validItem = GTPP_Recipe_Map.sChemicalPlantRecipes.containsInput(aStack); - if (!validItem) { - for (GT_Recipe f : GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { - if (f.mFluidInputs.length > 0) { - for (FluidStack g : f.mFluidInputs) { - if (g != null) { - if (FluidContainerRegistry.containsFluid(aStack, g)) { - return true; - } - } - } - } - } - } - return validItem; - } - - @Override - public int getSlotStackLimit() { - return 64; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotCrafting.java b/src/Java/gtPlusPlus/core/slots/SlotCrafting.java deleted file mode 100644 index 42b7b585e2..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotCrafting.java +++ /dev/null @@ -1,151 +0,0 @@ -package gtPlusPlus.core.slots; - -import cpw.mods.fml.common.FMLCommonHandler; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.*; -import net.minecraft.stats.AchievementList; - -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; - -public class SlotCrafting extends Slot { - /** The craft matrix inventory linked to this result slot. */ - private final IInventory craftMatrix; - /** The player that is using the GUI where this slot resides. */ - private final EntityPlayer thePlayer; - /** - * The number of items that have been crafted so far. Gets passed to - * ItemStack.onCrafting before being reset. - */ - private int amountCrafted; - private static final String __OBFID = "CL_00001761"; - - public SlotCrafting(final EntityPlayer p_i1823_1_, final IInventory p_i1823_2_, final IInventory p_i1823_3_, - final int p_i1823_4_, final int p_i1823_5_, final int p_i1823_6_) { - super(p_i1823_3_, p_i1823_4_, p_i1823_5_, p_i1823_6_); - this.thePlayer = p_i1823_1_; - this.craftMatrix = p_i1823_2_; - } - - /** - * Check if the stack is a valid item for this slot. Always true beside for - * the armor slots. - */ - @Override - public boolean isItemValid(final ItemStack p_75214_1_) { - return false; - } - - /** - * Decrease the size of the stack in slot (first int arg) by the amount of - * the second int arg. Returns the new stack. - */ - @Override - public ItemStack decrStackSize(final int p_75209_1_) { - if (this.getHasStack()) { - this.amountCrafted += Math.min(p_75209_1_, this.getStack().stackSize); - } - - return super.decrStackSize(p_75209_1_); - } - - /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, - * not ore and wood. Typically increases an internal count then calls - * onCrafting(item). - */ - @Override - protected void onCrafting(final ItemStack p_75210_1_, final int p_75210_2_) { - this.amountCrafted += p_75210_2_; - this.onCrafting(p_75210_1_); - } - - /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, - * not ore and wood. - */ - @Override - protected void onCrafting(final ItemStack p_75208_1_) { - p_75208_1_.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); - this.amountCrafted = 0; - - if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) { - this.thePlayer.addStat(AchievementList.buildWorkBench, 1); - } - - if (p_75208_1_.getItem() instanceof ItemPickaxe) { - this.thePlayer.addStat(AchievementList.buildPickaxe, 1); - } - - if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.furnace)) { - this.thePlayer.addStat(AchievementList.buildFurnace, 1); - } - - if (p_75208_1_.getItem() instanceof ItemHoe) { - this.thePlayer.addStat(AchievementList.buildHoe, 1); - } - - if (p_75208_1_.getItem() == Items.bread) { - this.thePlayer.addStat(AchievementList.makeBread, 1); - } - - if (p_75208_1_.getItem() == Items.cake) { - this.thePlayer.addStat(AchievementList.bakeCake, 1); - } - - if ((p_75208_1_.getItem() instanceof ItemPickaxe) - && (((ItemPickaxe) p_75208_1_.getItem()).func_150913_i() != Item.ToolMaterial.WOOD)) { - this.thePlayer.addStat(AchievementList.buildBetterPickaxe, 1); - } - - if (p_75208_1_.getItem() instanceof ItemSword) { - this.thePlayer.addStat(AchievementList.buildSword, 1); - } - - if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) { - this.thePlayer.addStat(AchievementList.enchantments, 1); - } - - if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) { - this.thePlayer.addStat(AchievementList.bookcase, 1); - } - } - - @Override - public void onPickupFromSlot(final EntityPlayer p_82870_1_, final ItemStack p_82870_2_) { - FMLCommonHandler.instance().firePlayerCraftingEvent(p_82870_1_, p_82870_2_, this.craftMatrix); - this.onCrafting(p_82870_2_); - - for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { - final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); - - if (itemstack1 != null) { - this.craftMatrix.decrStackSize(i, 1); - - if (itemstack1.getItem().hasContainerItem(itemstack1)) { - final ItemStack itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); - - if ((itemstack2 != null) && itemstack2.isItemStackDamageable() - && (itemstack2.getItemDamage() > itemstack2.getMaxDamage())) { - MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this.thePlayer, itemstack2)); - continue; - } - - if (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1) - || !this.thePlayer.inventory.addItemStackToInventory(itemstack2)) { - if (this.craftMatrix.getStackInSlot(i) == null) { - this.craftMatrix.setInventorySlotContents(i, itemstack2); - } else { - this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java b/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java deleted file mode 100644 index 3608c3724c..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java +++ /dev/null @@ -1,147 +0,0 @@ -package gtPlusPlus.core.slots; - -import cpw.mods.fml.common.FMLCommonHandler; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.*; -import net.minecraft.stats.AchievementList; - -public class SlotCraftingNoCollect extends SlotCrafting { - /** The craft matrix inventory linked to this result slot. */ - private final IInventory craftMatrix; - /** The player that is using the GUI where this slot resides. */ - private EntityPlayer thePlayer; - /** - * The number of items that have been crafted so far. Gets passed to - * ItemStack.onCrafting before being reset. - */ - private int amountCrafted; - - public SlotCraftingNoCollect(EntityPlayer player, IInventory inventory, IInventory inventory2, int x, int y, - int z) { - super(player, inventory, inventory2, x, y, z); - this.thePlayer = player; - this.craftMatrix = inventory; - } - - /** - * Check if the stack is a valid item for this slot. Always true beside for - * the armor slots. - */ - @Override - public boolean isItemValid(ItemStack p_75214_1_) { - return false; - } - - /** - * Decrease the size of the stack in slot (first int arg) by the amount of - * the second int arg. Returns the new stack. - */ - @Override - public ItemStack decrStackSize(int amount) { - if (this.getHasStack()) { - this.amountCrafted += Math.min(amount, this.getStack().stackSize); - } - - return super.decrStackSize(amount); - } - - /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, - * not ore and wood. Typically increases an internal count then calls - * onCrafting(item). - */ - @Override - protected void onCrafting(ItemStack output, int amount) { - this.amountCrafted += amount; - this.onCrafting(output); - } - - /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, - * not ore and wood. - */ - @Override - protected void onCrafting(ItemStack output) { - output.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); - this.amountCrafted = 0; - - if (output.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) { - this.thePlayer.addStat(AchievementList.buildWorkBench, 1); - } - - if (output.getItem() instanceof ItemPickaxe) { - this.thePlayer.addStat(AchievementList.buildPickaxe, 1); - } - - if (output.getItem() == Item.getItemFromBlock(Blocks.furnace)) { - this.thePlayer.addStat(AchievementList.buildFurnace, 1); - } - - if (output.getItem() instanceof ItemHoe) { - this.thePlayer.addStat(AchievementList.buildHoe, 1); - } - - if (output.getItem() == Items.bread) { - this.thePlayer.addStat(AchievementList.makeBread, 1); - } - - if (output.getItem() == Items.cake) { - this.thePlayer.addStat(AchievementList.bakeCake, 1); - } - - if (output.getItem() instanceof ItemPickaxe - && ((ItemPickaxe) output.getItem()).func_150913_i() != Item.ToolMaterial.WOOD) { - this.thePlayer.addStat(AchievementList.buildBetterPickaxe, 1); - } - - if (output.getItem() instanceof ItemSword) { - this.thePlayer.addStat(AchievementList.buildSword, 1); - } - - if (output.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) { - this.thePlayer.addStat(AchievementList.enchantments, 1); - } - - if (output.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) { - this.thePlayer.addStat(AchievementList.bookcase, 1); - } - } - - @Override - public void onPickupFromSlot(EntityPlayer player, ItemStack output) { - FMLCommonHandler.instance().firePlayerCraftingEvent(player, output, craftMatrix); - this.onCrafting(output); - - /* - * for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { - * ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); - * - * if (itemstack1 != null) { this.craftMatrix.decrStackSize(i, 1); - * - * if (itemstack1.getItem().hasContainerItem(itemstack1)) { ItemStack - * itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); - * - * if (itemstack2 != null && itemstack2.isItemStackDamageable() && - * itemstack2.getItemDamage() > itemstack2.getMaxDamage()) { - * MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, - * itemstack2)); continue; } - * - * if - * (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1) - * || !this.thePlayer.inventory.addItemStackToInventory(itemstack2)) { - * if (this.craftMatrix.getStackInSlot(i) == null) { - * this.craftMatrix.setInventorySlotContents(i, itemstack2); } else { - * this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false); } } - * } } } - */ - } - - @Override - public boolean canTakeStack(EntityPlayer player) { - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/slots/SlotDataStick.java b/src/Java/gtPlusPlus/core/slots/SlotDataStick.java deleted file mode 100644 index ce97a2fdbf..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotDataStick.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.recipe.common.CI; - -public class SlotDataStick extends Slot { - - public SlotDataStick(final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - - } - - public static ItemStack[] mDataItems = new ItemStack[2]; - - @Override - public synchronized boolean isItemValid(final ItemStack itemstack) { - boolean isValid = false; - if (itemstack != null) { - if (mDataItems[0] == null) { - mDataItems[0] = CI.getDataStick(); - } - if (mDataItems[1] == null) { - mDataItems[1] = CI.getDataOrb(); - } - if (mDataItems[0] != null && mDataItems[1] != null) { - if (GT_Utility.areStacksEqual(itemstack, mDataItems[0], true) || GT_Utility.areStacksEqual(itemstack, mDataItems[1], true) ) { - isValid = true; - } - } - } - return isValid; - } - - @Override - public int getSlotStackLimit() { - return 1; - } -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotElectric.java b/src/Java/gtPlusPlus/core/slots/SlotElectric.java deleted file mode 100644 index a747432a74..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotElectric.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; - -import ic2.api.info.Info; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; - -public class SlotElectric extends Slot { - - public SlotElectric(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - } - - public SlotElectric(IGregTechTileEntity mTileEntity, int i, int j, int k) { - this(mTileEntity.getIInventory(mTileEntity.getXCoord(), mTileEntity.getYCoord(), mTileEntity.getZCoord()), i, j, k); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if ((accepts(itemstack)) || (itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) { - return true; - } - return false; - } - - public boolean accepts(final ItemStack stack) { - if (stack == null) { - return false; - } - return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) - || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D); - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotFrame.java b/src/Java/gtPlusPlus/core/slots/SlotFrame.java deleted file mode 100644 index 4168ded5bc..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotFrame.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import forestry.api.apiculture.IHiveFrame; - -public class SlotFrame extends Slot { - - public SlotFrame(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return itemstack.getItem() instanceof IHiveFrame; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotFuelRod.java b/src/Java/gtPlusPlus/core/slots/SlotFuelRod.java deleted file mode 100644 index b50b679665..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotFuelRod.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; - -import ic2.core.Ic2Items; - -public class SlotFuelRod extends Slot { - - public SlotFuelRod(final IInventory inventory, final int index, final int x, final int y) { - super(inventory, index, x, y); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - boolean returnValue = false; - // Uranium Rods - if (itemstack.getItem() == Ic2Items.reactorUraniumSimple.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorUraniumDual.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorUraniumQuad.getItem()) { - returnValue = true; - } - - // Mox Rods - if (itemstack.getItem() == Ic2Items.reactorMOXSimple.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorMOXDual.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorMOXQuad.getItem()) { - returnValue = true; - } - - // Thorium Rods - if (itemstack.getItem() == ItemList.ThoriumCell_1.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == ItemList.ThoriumCell_2.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == ItemList.ThoriumCell_4.getItem()) { - returnValue = true; - } - return returnValue; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotGeneric.java b/src/Java/gtPlusPlus/core/slots/SlotGeneric.java deleted file mode 100644 index 533539d914..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotGeneric.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotGeneric extends Slot { - - public SlotGeneric(final IInventory inventory, final int aSlotID, final int x, final int y) { - super(inventory, aSlotID, x, y); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return true; - } - - @Override - public int getSlotStackLimit() { - return 64; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotGtTool.java b/src/Java/gtPlusPlus/core/slots/SlotGtTool.java deleted file mode 100644 index 54e25362db..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotGtTool.java +++ /dev/null @@ -1,33 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.items.GT_MetaGenerated_Tool; - -import gtPlusPlus.api.objects.Logger; - -public class SlotGtTool extends Slot { - - public SlotGtTool(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); - return false; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java b/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java deleted file mode 100644 index c0e3340769..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java +++ /dev/null @@ -1,94 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -import gregtech.api.items.GT_MetaGenerated_Tool; - -import gtPlusPlus.api.objects.Logger; -import ic2.api.info.Info; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; - -public class SlotGtToolElectric extends SlotGtTool { - public int tier; - private ItemStack content; - - public SlotGtToolElectric(final IInventory base, final int x, final int y, final int z, final int tier, - final boolean allowRedstoneDust) { - super(base, x, y, z); - this.tier = tier; - this.allowRedstoneDust = allowRedstoneDust; - } - - public boolean accepts(final ItemStack stack) { - if (stack == null) { - return false; - } - if ((stack.getItem() == Items.redstone) && (!this.allowRedstoneDust)) { - return false; - } - return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) - || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), this.tier, true, true, true) > 0.0D); - } - - public double discharge(final double amount, final boolean ignoreLimit) { - if (amount <= 0.0D) { - throw new IllegalArgumentException("Amount must be > 0."); - } - final ItemStack stack = this.get(0); - if (stack == null) { - return 0.0D; - } - double realAmount = ElectricItem.manager.discharge(stack, amount, this.tier, ignoreLimit, true, false); - if (realAmount <= 0.0D) { - realAmount = Info.itemEnergy.getEnergyValue(stack); - if (realAmount <= 0.0D) { - return 0.0D; - } - stack.stackSize -= 1; - if (stack.stackSize <= 0) { - this.put(0, null); - } - } - return realAmount; - } - - public void setTier(final int tier1) { - this.tier = tier1; - } - - public boolean allowRedstoneDust = true; - - public ItemStack get() { - return this.get(0); - } - - public ItemStack get(final int index) { - return this.content; - } - - public void put(final ItemStack content) { - this.put(0, content); - } - - public void put(final int index, final ItemStack content) { - this.content = content; - this.onChanged(); - } - - public void onChanged() { - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java b/src/Java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java deleted file mode 100644 index 8c8a118abb..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java +++ /dev/null @@ -1,105 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.recipe.common.CI; - -public class SlotIntegratedCircuit extends Slot { - - public static Item mCircuitItem; - public static Item mCircuitItem2; - public static Item mCircuitItem3; - private final short mCircuitLock; - - public SlotIntegratedCircuit(final IInventory inventory, final int slot, final int x, final int y) { - this(Short.MAX_VALUE+1, inventory, slot, x, y); - } - - public SlotIntegratedCircuit(int mTypeLock, final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - if (mTypeLock > Short.MAX_VALUE || mTypeLock < Short.MIN_VALUE) { - mCircuitLock = -1; - } - else { - mCircuitLock = (short) mTypeLock; - } - } - - @Override - public synchronized boolean isItemValid(final ItemStack itemstack) { - return isItemValidForSlot(mCircuitLock, itemstack); - } - - public static synchronized boolean isItemValidForSlot(final ItemStack itemstack) { - return isItemValidForSlot(-1, itemstack); - } - - public static synchronized boolean isItemValidForSlot(int aLockedCircuitNumber, final ItemStack itemstack) { - boolean isValid = false; - if (mCircuitItem == null) { - mCircuitItem = CI.getNumberedCircuit(0).getItem(); - } - if (mCircuitItem2 == null) { - mCircuitItem2 = CI.getNumberedBioCircuit(0).getItem(); - } - if (mCircuitItem3 == null) { - mCircuitItem3 = CI.getNumberedAdvancedCircuit(0).getItem(); - } - if (mCircuitItem != null && mCircuitItem2 != null && mCircuitItem3 != null) { - if (itemstack != null) { - if (itemstack.getItem() == mCircuitItem || itemstack.getItem() == mCircuitItem2 || itemstack.getItem() == mCircuitItem3) { - if (aLockedCircuitNumber == -1) { - isValid = true; - } - else { - if (itemstack.getItemDamage() == aLockedCircuitNumber) { - isValid = true; - } - } - } - } - } - return isValid; - } - - /** - * Returns the circuit type. -1 is invalid, 0 is standard, 1 is GT++ bio. - * @param itemstack - the Circuit Stack. - * @return - */ - public static synchronized int isRegularProgrammableCircuit(final ItemStack itemstack) { - if (mCircuitItem == null) { - mCircuitItem = CI.getNumberedCircuit(0).getItem(); - } - if (mCircuitItem2 == null) { - mCircuitItem2 = CI.getNumberedBioCircuit(0).getItem(); - } - if (mCircuitItem3 == null) { - mCircuitItem3 = CI.getNumberedAdvancedCircuit(0).getItem(); - } - if (mCircuitItem != null && mCircuitItem2 != null && mCircuitItem3 != null) { - if (itemstack != null) { - if (itemstack.getItem() == mCircuitItem || itemstack.getItem() == mCircuitItem2 || itemstack.getItem() == mCircuitItem3) { - if (itemstack.getItem() == mCircuitItem) { - return 0; - } - else if (itemstack.getItem() == mCircuitItem2) { - return 1; - } - else if (itemstack.getItem() == mCircuitItem3) { - return 2; - } - } - } - } - return -1; - } - - @Override - public int getSlotStackLimit() { - return 64; - } -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotItemBackpackInv.java b/src/Java/gtPlusPlus/core/slots/SlotItemBackpackInv.java deleted file mode 100644 index 3aa551f966..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotItemBackpackInv.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.item.base.BaseItemBackpack; - -public class SlotItemBackpackInv extends Slot { - public SlotItemBackpackInv(final IInventory inv, final int index, final int xPos, final int yPos) { - super(inv, index, xPos, yPos); - } - - // This is the only method we need to override so that - // we can't place our inventory-storing Item within - // its own inventory (thus making it permanently inaccessible) - // as well as preventing abuse of storing backpacks within backpacks - /** - * Check if the stack is a valid item for this slot. - */ - @Override - public boolean isItemValid(final ItemStack itemstack) { - // Everything returns true except an instance of our Item - return !(itemstack.getItem() instanceof BaseItemBackpack); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/slots/SlotJukebox.java b/src/Java/gtPlusPlus/core/slots/SlotJukebox.java deleted file mode 100644 index 0f8af988a1..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotJukebox.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemRecord; -import net.minecraft.item.ItemStack; - -public class SlotJukebox extends SlotGeneric { - - private final boolean isDisplay; - - - public SlotJukebox(IInventory inventory, int x, int y, int z) { - this(inventory, x, y, z, false); - } - - public SlotJukebox(IInventory inventory, int x, int y, int z, boolean display) { - super(inventory, x, y, z); - isDisplay = display; - } - - @Override - public boolean isItemValid(ItemStack itemstack) { - return (itemstack != null && itemstack.getItem() instanceof ItemRecord); - } - - @Override - public int getSlotStackLimit() { - return 1; - } - - @Override - public boolean canTakeStack(EntityPlayer p_82869_1_) { - return !isDisplay; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotLockedInput.java b/src/Java/gtPlusPlus/core/slots/SlotLockedInput.java deleted file mode 100644 index c67f8acfeb..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotLockedInput.java +++ /dev/null @@ -1,57 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; - -public class SlotLockedInput extends Slot { - - private ItemStack mLockStack; - private final IGregTechTileEntity mEntity; - private boolean mChecked = false; - - public SlotLockedInput(final IGregTechTileEntity inventory, final int index, final int x, final int y, ItemStack lockStack) { - super(inventory, index, x, y); - mLockStack = lockStack; - mEntity = inventory; - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (mEntity == null) { - return false; - } - else { - if (!mChecked) { - try { - mLockStack = (ItemStack) ReflectionUtils.getField(this.mEntity.getMetaTileEntity().getClass(), "mItemStack").get(this.mEntity.getMetaTileEntity()); - } - catch (Throwable t) { - t.printStackTrace(); - mLockStack = null; - } - mChecked = true; - } - } - - if (mLockStack == null) { - return true; - } - else { - if (ItemStack.areItemStacksEqual(itemstack, mLockStack)) { - return true; - } - } - return false; - } - - @Override - public int getSlotStackLimit() { - return mLockStack == null ? 64 : mLockStack.getMaxStackSize(); - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotLunchBox.java b/src/Java/gtPlusPlus/core/slots/SlotLunchBox.java deleted file mode 100644 index bb82a28936..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotLunchBox.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.FoodUtils; - -public class SlotLunchBox extends SlotGtTool { - - public SlotLunchBox(final IInventory base, final int x, final int y, final int z) { - super(base, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValid_STATIC(itemstack); - } - - public static boolean isItemValid_STATIC(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid food."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid food."); - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotMagicToolBag.java b/src/Java/gtPlusPlus/core/slots/SlotMagicToolBag.java deleted file mode 100644 index d555f10a44..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotMagicToolBag.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.FoodUtils; - -public class SlotMagicToolBag extends SlotGtTool { - - public SlotMagicToolBag(final IInventory base, final int x, final int y, final int z) { - super(base, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValid_STATIC(itemstack); - } - - public static boolean isItemValid_STATIC(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid food."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid food."); - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotModularBauble.java b/src/Java/gtPlusPlus/core/slots/SlotModularBauble.java deleted file mode 100644 index 4aef5bc877..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotModularBauble.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.item.bauble.ModularBauble; - -public class SlotModularBauble extends Slot { - - public SlotModularBauble(final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - boolean isValid = false; - - if (itemstack != null) { - if (itemstack.getItem() instanceof ModularBauble) { - isValid = true; - } - } - return isValid; - } - - @Override - public int getSlotStackLimit() { - return 1; - } -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java b/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java deleted file mode 100644 index dae62f0415..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.core.slots; - -import static gtPlusPlus.core.tileentities.machines.TileEntityModularityTable.*; - -import java.util.Iterator; -import java.util.Map.Entry; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; - -public class SlotModularBaubleUpgrades extends Slot { - - public SlotModularBaubleUpgrades(final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - boolean isValid = false; - if (itemstack != null) { - Logger.INFO("trying to insert " + itemstack.getDisplayName()); - Logger.INFO("Valid Upgrade count: " + mValidUpgradeList.size()); - - Iterator> it = mValidUpgradeListFormChange.entrySet().iterator(); - while (it.hasNext()) { - Entry pair = it.next(); - if (pair.getKey().getItem() == itemstack.getItem() - && pair.getKey().getItemDamage() == itemstack.getItemDamage()) { - isValid = true; - } - } - - Iterator>> it2 = mValidUpgradeList.entrySet().iterator(); - while (it2.hasNext()) { - Entry> pair = it2.next(); - if (pair.getKey().getItem() == itemstack.getItem() - && pair.getKey().getItemDamage() == itemstack.getItemDamage()) { - isValid = true; - } - } - } - return isValid; - } - - @Override - public int getSlotStackLimit() { - return 64; - } -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotNoInput.java b/src/Java/gtPlusPlus/core/slots/SlotNoInput.java deleted file mode 100644 index 1a1cf62e2b..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotNoInput.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotNoInput extends Slot { - - public SlotNoInput(final IInventory inventory, final int index, final int x, final int y) { - super(inventory, index, x, y); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return false; - } - - @Override - public int getSlotStackLimit() { - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotNoInputLogging.java b/src/Java/gtPlusPlus/core/slots/SlotNoInputLogging.java deleted file mode 100644 index 762714ac94..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotNoInputLogging.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.core.slots; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -public class SlotNoInputLogging extends SlotNoInput { - - private final int aSlotIndex; - - public SlotNoInputLogging(final IInventory inventory, final int index, final int x, final int y) { - super(inventory, index, x, y); - aSlotIndex = index; - Logger.INFO("Slot "+index+" is doing logging"); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (ItemUtils.checkForInvalidItems(itemstack)) { - Logger.INFO("Tried Inserting "+ItemUtils.getItemName(itemstack)+" into slot "+aSlotIndex); - Block b = Block.getBlockFromItem(itemstack.getItem()); - Logger.INFO(""+itemstack.getUnlocalizedName()); - if (b != null) { - Logger.INFO(""+b.getLocalizedName()); - Logger.INFO(""+b.getUnlocalizedName()); - } - } - else { - Logger.INFO("Bad Itemstack"); - } - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotOutput.java b/src/Java/gtPlusPlus/core/slots/SlotOutput.java deleted file mode 100644 index f22e0645f5..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotOutput.java +++ /dev/null @@ -1,96 +0,0 @@ -package gtPlusPlus.core.slots; - -import cpw.mods.fml.common.FMLCommonHandler; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; - -public class SlotOutput extends SlotCrafting { - - private final IInventory craftMatrix; - private final EntityPlayer thePlayer; - private int amountCrafted; - - public SlotOutput(final EntityPlayer player, final InventoryCrafting craftingInventory, - final IInventory p_i45790_3_, final int slotIndex, final int xPosition, final int yPosition) { - super(player, craftingInventory, p_i45790_3_, slotIndex, xPosition, yPosition); - this.thePlayer = player; - this.craftMatrix = craftingInventory; - } - - /** - * Check if the stack is a valid item for this slot. Always true beside for - * the armor slots. - */ - @Override - public boolean isItemValid(final ItemStack par1ItemStack) { - return false; - } - - /** - * Decrease the size of the stack in slot (first int arg) by the amount of - * the second int arg. Returns the new stack. - */ - @Override - public ItemStack decrStackSize(final int par1) { - if (this.getHasStack()) { - this.amountCrafted += Math.min(par1, this.getStack().stackSize); - } - return super.decrStackSize(par1); - } - - /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, - * not ore and wood. Typically increases an internal count then calls - * onCrafting(item). - */ - @Override - protected void onCrafting(final ItemStack par1ItemStack, final int par2) { - this.amountCrafted += par2; - this.onCrafting(par1ItemStack); - } - - /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, - * not ore and wood. - */ - @Override - protected void onCrafting(final ItemStack stack) { - stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); - this.amountCrafted = 0; - } - - @Override - public void onPickupFromSlot(final EntityPlayer playerIn, final ItemStack stack) { - { - FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, this.craftMatrix); - this.onCrafting(stack); - for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { - final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); - if (itemstack1 != null) { - this.craftMatrix.decrStackSize(i, 1); - if (itemstack1.getItem().hasContainerItem(itemstack1)) { - ItemStack itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); - if (itemstack2.isItemStackDamageable() - && (itemstack2.getItemDamage() > itemstack2.getMaxDamage())) { - MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this.thePlayer, itemstack2)); - itemstack2 = null; - } - if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2)) { - if (this.craftMatrix.getStackInSlot(i) == null) { - this.craftMatrix.setInventorySlotContents(i, itemstack2); - } else { - this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false); - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/slots/SlotPollutionScrubber.java b/src/Java/gtPlusPlus/core/slots/SlotPollutionScrubber.java deleted file mode 100644 index 6dd3745d09..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotPollutionScrubber.java +++ /dev/null @@ -1,66 +0,0 @@ -package gtPlusPlus.core.slots; - -import java.util.HashMap; - -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.item.general.ItemAirFilter; -import gtPlusPlus.core.item.general.ItemBasicScrubberTurbine; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotPollutionScrubber extends Slot { - - private final int mType; - private final int mTier; - - private static HashMap mConveyorMap = new HashMap(); - - static { - for (int i=0; i<(CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? 9 : 5); i++) { - mConveyorMap.put(i, CI.getConveyor(i, 1)); - } - } - - public SlotPollutionScrubber(final int aType, final int aTier, final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - mType = aType; - mTier = aTier; - } - - @Override - public synchronized boolean isItemValid(final ItemStack itemstack) { - return isItemValidForSlot(this, itemstack); - } - - public static synchronized boolean isItemValidForSlot(final SlotPollutionScrubber aSlot, final ItemStack itemstack) { - if (aSlot.mType == 0) { - if (itemstack.getItem() instanceof ItemBasicScrubberTurbine) { - return true; - } - if (itemstack.getItem() instanceof GT_MetaGenerated_Tool && itemstack.getItemDamage() >= 170 && itemstack.getItemDamage() <= 179){ - return true; - } - } - else if (aSlot.mType == 1) { - if (itemstack.getItem() instanceof ItemAirFilter) { - return true; - } - } - else if (aSlot.mType == 2) { - ItemStack aConveyorStack = mConveyorMap.get(aSlot.mTier); - if (GT_Utility.areStacksEqual(itemstack, aConveyorStack, true)) { - return true; - } - } - return false; - } - - @Override - public int getSlotStackLimit() { - return 1; - } -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotRTG.java b/src/Java/gtPlusPlus/core/slots/SlotRTG.java deleted file mode 100644 index 181052cc57..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotRTG.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import ic2.core.Ic2Items; - -public class SlotRTG extends Slot { - - public SlotRTG(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return itemstack.getItem().getClass() == Ic2Items.RTGPellets.getItem().getClass(); - } - - @Override - public int getSlotStackLimit() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotToolBox.java b/src/Java/gtPlusPlus/core/slots/SlotToolBox.java deleted file mode 100644 index 87967b75b5..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotToolBox.java +++ /dev/null @@ -1,113 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemTool; -import gregtech.api.items.GT_MetaGenerated_Tool; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class SlotToolBox extends SlotGtTool { - - private static final AutoMap mSupportedCustomTools = new AutoMap(); - - static { - //Look for Supported custom tool types - Class temp; - - //IHL Pumps - temp = ReflectionUtils.getClass("ihl.handpump.IHLHandPump"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - //IC2 Electrics - temp = ReflectionUtils.getClass("ic2.api.item.IElectricItem"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - //IC2 Boxables - temp = ReflectionUtils.getClass(" ic2.api.item.IBoxable"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - //Tinkers Tools - temp = ReflectionUtils.getClass("tconstruct.library.tools.Weapon"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - //BattleGear Weapons - temp = ReflectionUtils.getClass("mods.battlegear2.api.weapons.IBattlegearWeapon"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - - //OpenMods - String[] OpenModsContent = new String[] {"openblocks.common.item.ItemDevNull", "openblocks.common.item.ItemHangGlider", "openblocks.common.item.ItemWrench", "openblocks.common.item.ItemSleepingBag"}; - for (String t : OpenModsContent) { - temp = ReflectionUtils.getClass(t); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - } - - //GC Wrench - temp = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.items.ItemUniversalWrench"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - //EIO - String[] EioContent = new String[] {"crazypants.enderio.api.tool.ITool", "crazypants.enderio.item.ItemMagnet", "crazypants.enderio.item.ItemConduitProbe"}; - for (String t : EioContent) { - temp = ReflectionUtils.getClass(t); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - } - - //Forestry - temp = ReflectionUtils.getClass("forestry.core.items.ItemForestryTool"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - } - - public SlotToolBox(final IInventory base, final int x, final int y, final int z) { - super(base, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValid_STATIC(itemstack); - } - - public static boolean isItemValid_STATIC(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof ItemTool)) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); - return true; - } - for (Class C : mSupportedCustomTools) { - if (C.isInstance(itemstack.getItem())) { - return true; - } - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/slots/SlotVolumetricFlask.java b/src/Java/gtPlusPlus/core/slots/SlotVolumetricFlask.java deleted file mode 100644 index b8955f6dc8..0000000000 --- a/src/Java/gtPlusPlus/core/slots/SlotVolumetricFlask.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.slots; - -import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class SlotVolumetricFlask extends Slot { - - public static Item mFlask; - - public SlotVolumetricFlask(final IInventory inventory, final int slot, final int x, final int y) { - super(inventory, slot, x, y); - } - - @Override - public synchronized boolean isItemValid(final ItemStack itemstack) { - return isItemValidForSlot(itemstack); - } - - public static synchronized boolean isItemValidForSlot(final ItemStack itemstack) { - return VolumetricFlaskHelper.isVolumetricFlask(itemstack); - } - - @Override - public int getSlotStackLimit() { - return 16; - } -} diff --git a/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java b/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java deleted file mode 100644 index 62b545c5c8..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java +++ /dev/null @@ -1,63 +0,0 @@ -package gtPlusPlus.core.tileentities; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.general.BlockSuperLight.TileEntitySuperLight; -import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.general.*; -import gtPlusPlus.core.tileentities.machines.TileEntityAdvPooCollector; -import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; -import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; -import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; -import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; -import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; -import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; -import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; - -public class ModTileEntities { - - public static void init() { - Logger.INFO("Registering Tile Entities."); - GameRegistry.registerTileEntity(TileEntityPooCollector.class, "TileEntityPooCollector"); - GameRegistry.registerTileEntity(TileEntityAdvPooCollector.class, "TileEntityAdvPooCollector"); - GameRegistry.registerTileEntity(TileEntityWorkbench.class, "TileWorkbench"); - GameRegistry.registerTileEntity(TileEntityWorkbenchAdvanced.class, "TileWorkbenchAdvanced"); - GameRegistry.registerTileEntity(TileEntityFishTrap.class, "TileFishTrap"); - GameRegistry.registerTileEntity(TileEntityFirepit.class, "TileFirePit"); - GameRegistry.registerTileEntity(TileEntityInfiniteFluid.class, "TileInfiniteFluid"); - GameRegistry.registerTileEntity(TileEntityProjectTable.class, "TileProjectTable"); - GameRegistry.registerTileEntity(TileEntityTradeTable.class, "TileTradeTable"); - GameRegistry.registerTileEntity(TileEntityModularityTable.class, "TileEntityModularityTable"); - GameRegistry.registerTileEntity(TileEntityXpConverter.class, "TileEntityXpConverter"); - GameRegistry.registerTileEntity(TileEntityGenericSpawner.class, "TileEntityGenericSpawner"); - GameRegistry.registerTileEntity(TileEntityCircuitProgrammer.class, "TileCircuitProgrammer"); - GameRegistry.registerTileEntity(TileEntityPlayerDoorBase.class, "TilePlayerDoorBase"); - GameRegistry.registerTileEntity(TileEntityDecayablesChest.class, "TileDecayablesChest"); - GameRegistry.registerTileEntity(TileEntitySuperJukebox.class, "TileEntitySuperJukebox"); - GameRegistry.registerTileEntity(TileEntitySuperLight.class, "TileEntitySuperLight"); - GameRegistry.registerTileEntity(TileEntityPestKiller.class, "TileEntityPestKiller"); - GameRegistry.registerTileEntity(TileEntityRoundRobinator.class, "TileEntityRoundRobinator"); - GameRegistry.registerTileEntity(TileEntityEggBox.class, "TileEggBox"); - - if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { - GameRegistry.registerTileEntity(TileEntityVolumetricFlaskSetter.class, "TileEntityVolumetricFlaskSetter"); - } - - //Mod TEs - if (LoadedMods.Thaumcraft){ - - } - blacklistTilesFromAcceleration(); - } - - private static void blacklistTilesFromAcceleration() { - Meta_GT_Proxy.setTileEntityClassAsBlacklistedInWorldAccelerator("gtPlusPlus.core.tileentities.general.TileEntityFishTrap"); - Meta_GT_Proxy.setTileEntityClassAsBlacklistedInWorldAccelerator("gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest"); - Meta_GT_Proxy.setTileEntityClassAsBlacklistedInWorldAccelerator("gtPlusPlus.core.tileentities.general.TileEggBox"); - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java b/src/Java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java deleted file mode 100644 index 839bcc353a..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.tileentities.base; - -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; - -public class TILE_ENTITY_BASE extends TileEntity { - - @Override - public void writeToNBT(final NBTTagCompound tag) { - super.writeToNBT(tag); - this.writeCustomNBT(tag); - } - - @Override - public void readFromNBT(final NBTTagCompound tag) { - super.readFromNBT(tag); - this.readCustomNBT(tag); - } - - public void writeCustomNBT(final NBTTagCompound tag) {} - public void readCustomNBT(final NBTTagCompound tag) {} - - @Override - public Packet getDescriptionPacket() { - final NBTTagCompound tag = new NBTTagCompound(); - this.writeCustomNBT(tag); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, -999, tag); - } - - @Override - public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity packet) { - super.onDataPacket(net, packet); - this.readCustomNBT(packet.func_148857_g()); - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/base/TileBasicTank.java b/src/Java/gtPlusPlus/core/tileentities/base/TileBasicTank.java deleted file mode 100644 index 671a49fca5..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/base/TileBasicTank.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.core.tileentities.base; - -import gtPlusPlus.api.objects.minecraft.BTF_FluidTank; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; -import net.minecraftforge.fluids.IFluidTank; - -public class TileBasicTank extends TileEntityBase implements IFluidHandler, IFluidTank { - - public final BTF_FluidTank mTank; - - public TileBasicTank(int aMaxSlots, int aFluidCapacity) { - super(aMaxSlots); - mTank = new BTF_FluidTank(aFluidCapacity); - } - - @Override - public boolean onPreTick(long aTick) { - - if (this.isServerSide()) { - if (mTank.isFluidChangingAllowed() && mTank.getFillableStack() != null - && mTank.getFillableStack().amount <= 0) { - mTank.setFillableStack((FluidStack) null); - } - } - - return super.onPreTick(aTick); - - } - - - private final boolean canFillEx(ForgeDirection aSide, Fluid aFluid) { - return this.fill(aSide, new FluidStack(aFluid, 1), false) == 1; - } - - - private final boolean canDrainEx(ForgeDirection aSide, Fluid aFluid) { - return this.drain(aSide, new FluidStack(aFluid, 1), false) != null; - } - - - private final FluidTankInfo[] getTankInfoEx(ForgeDirection aSide) { - return mTank.getCapacity() <= 0 ? new FluidTankInfo[0] - : new FluidTankInfo[]{mTank.getInfo()}; - } - - private final int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - return mTank.fill(aFluid, doFill); - } - - - private final int fillEx(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - return this.fill_default(aSide, aFluid, doFill); - } - - - private final FluidStack drainEx(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - return mTank.getFluid() != null && aFluid != null && mTank.getFluid().isFluidEqual(aFluid) - ? mTank.drain(aFluid.amount, doDrain) - : null; - } - - - private final FluidStack drainEx(ForgeDirection aSide, int maxDrain, boolean doDrain) { - return mTank.drain(maxDrain, doDrain); - } - - - public boolean isLiquidInput(byte aSide) { - return true; - } - - public boolean isLiquidOutput(byte aSide) { - return true; - } - - @Override - public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidInput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid == null ? null : aFluid.getFluid(), this)))) - return this.fillEx(aSide, aFluid, doFill); - return 0; - } - - @Override - public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), this.getFluid() == null ? null : this.getFluid().getFluid(), this)))) - return this.drainEx(aSide, maxDrain, doDrain); - return null; - } - - @Override - public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid == null ? null : aFluid.getFluid(), this)))) - return this.drainEx(aSide, aFluid, doDrain); - return null; - } - - @Override - public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidInput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid, this)))) - return this.canFillEx(aSide, aFluid); - return false; - } - - @Override - public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { - if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid, this)))) - return this.canDrainEx(aSide, aFluid); - return false; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - if (canAccessData() && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidInput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), null, this)) || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), null, this)))) - return this.getTankInfoEx(aSide); - return new FluidTankInfo[]{}; - } - - @Override - public FluidStack getFluid() { - return mTank.getFluid(); - } - - @Override - public int getFluidAmount() { - return mTank.getFluidAmount(); - } - - @Override - public FluidTankInfo getInfo() { - return mTank.getInfo(); - } - - @Override - public int fill(FluidStack resource, boolean doFill) { - return mTank.fill(resource, doFill); - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) { - return mTank.drain(maxDrain, doDrain); - } - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java deleted file mode 100644 index dba96c6ebc..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java +++ /dev/null @@ -1,1347 +0,0 @@ -package gtPlusPlus.core.tileentities.base; - -import java.util.UUID; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.IDescribable; -import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.net.GT_Packet_Block_Event; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -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.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidHandler; -import gtPlusPlus.api.interfaces.ILazyCoverable; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BTF_Inventory; -import gtPlusPlus.core.util.data.ArrayUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import ic2.api.Direction; - -public class TileEntityBase extends TileEntity implements ILazyCoverable, IGregTechDeviceInformation, IDescribable { - - private String customName; - public String mOwnerName = "null"; - public String mOwnerUUID = "null"; - private boolean mIsOwnerOP = false; - - public final BTF_Inventory mInventory; - - public TileEntityBase(int aCapacity) { - mInventory = new BTF_Inventory(aCapacity, this); - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt){ - super.writeToNBT(nbt); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - nbt.setBoolean("mIsOwnerOP", this.mIsOwnerOP); - nbt.setString("mOwnerName", this.mOwnerName); - nbt.setString("mOwnerUUID", this.mOwnerUUID); - } - - @Override - public void readFromNBT(final NBTTagCompound nbt){ - - super.readFromNBT(nbt); - - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - - this.mIsOwnerOP = nbt.getBoolean("mIsOwnerOP"); - this.mOwnerName = nbt.getString("mOwnerName"); - this.mOwnerUUID = nbt.getString("mOwnerUUID"); - } - - @Override - public void updateEntity() { - long aTick = System.currentTimeMillis(); - this.isDead = false; - if (!firstTicked) { - onFirstTick(); - } - try{ - if (this.isServerSide()){ - onPreTick(aTick); - } - } catch (Throwable t){ - Logger.ERROR("Tile Entity Encountered an error in it's pre-tick stage."); - t.printStackTrace(); - } - try{ - if (this.isServerSide()){ - onTick(aTick); - } - } catch (Throwable t){ - Logger.ERROR("Tile Entity Encountered an error in it's tick stage."); - t.printStackTrace(); - } - try{ - if (this.isServerSide()){ - onPostTick(aTick); - } - } catch (Throwable t){ - Logger.ERROR("Tile Entity Encountered an error in it's post-tick stage."); - t.printStackTrace(); - } - } - - public boolean onPreTick(long aTick) { - return true; - } - - public boolean onTick(long aTick){ - try{ - if (this.isServerSide()){ - processRecipe(); - } - } catch (Throwable t){ - Logger.ERROR("Tile Entity Encountered an error in it's processing of a recipe stage."); - t.printStackTrace(); - } - return true; - } - - public boolean onPostTick(long aTick){ - return true; - } - - public boolean processRecipe(){ - return true; - } - - @Override - public boolean canUpdate() { - return true; - } - - public String getOwner(){ - if (this.mOwnerName == null){ - return "null"; - } - return this.mOwnerName; - } - - public UUID getOwnerUUID(){ - return UUID.fromString(this.mOwnerUUID); - } - - public boolean isOwnerOP() { - return mIsOwnerOP; - } - - public void setOwnerInformation(String mName, String mUUID, boolean mOP){ - if (isServerSide()){ - if (this.mOwnerName == null || this.mOwnerUUID == null || this.mOwnerName.equals("null") || this.mOwnerUUID.equals("null")){ - this.mOwnerName = mName; - this.mOwnerUUID = mUUID; - this.mIsOwnerOP = mOP; - } - } - } - - public boolean isServerSide(){ - if (this.hasWorldObj()){ - if (!this.getWorldObj().isRemote){ - return true; - } - } - return false; - } - - public final boolean isClientSide() { - return this.worldObj.isRemote; - } - - public String getCustomName() { - return this.customName; - } - - public void setCustomName(String customName) { - this.customName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.tileentity.name"; - } - - @Override - public boolean hasCustomInventoryName() { - return this.customName != null && !this.customName.equals(""); - } - - @Override - public int getSizeInventory() { - return this.mInventory.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(int aIndex) { - return this.mInventory.getStackInSlot(aIndex); - } - - @Override - public ItemStack decrStackSize(int aIndex, int aAmount) { - if (canAccessData()) { - mInventoryChanged = true; - return mInventory.decrStackSize(aIndex, aAmount); - } - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(int p_70304_1_) { - return this.mInventory.getStackInSlotOnClosing(p_70304_1_); - } - - @Override - public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { - this.mInventory.setInventorySlotContents(p_70299_1_, p_70299_2_); - } - - @Override - public int getInventoryStackLimit() { - return this.mInventory.getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - return this.mInventory.isUseableByPlayer(p_70300_1_); - } - - @Override - public void openInventory() { - this.mInventory.openInventory(); - } - - @Override - public void closeInventory() { - this.mInventory.closeInventory(); - } - - /** - * Can put aStack into Slot - */ - @Override - public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { - return canAccessData() && mInventory.isItemValidForSlot(aIndex, aStack); - } - - /** - * returns all valid Inventory Slots, no matter which Side (Unless it's covered). - * The Side Stuff is done in the following two Functions. - */ - @Override - public int[] getAccessibleSlotsFromSide(int aSide) { - if (canAccessData() && (getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), -1, this) || getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), -1, this))) - return mInventory.getAccessibleSlotsFromSide(aSide); - return new int[0]; - } - - /** - * Can put aStack into Slot at Side - */ - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() && (mRunningThroughTick || !mInputDisabled) && getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), aIndex, this) && mInventory.canInsertItem(aIndex, aStack, aSide); - } - - /** - * Can pull aStack out of Slot from Side - */ - @Override - public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - return canAccessData() && (mRunningThroughTick || !mOutputDisabled) && getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), aIndex, this) && mInventory.canExtractItem(aIndex, aStack, aSide); - } - - - @Override - public boolean isValidSlot(int aIndex) { - return this.canAccessData() ? this.mInventory.isValidSlot(aIndex) : false; - } - - - - - private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[] { GregTech_API.sNoBehavior, - GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, - GregTech_API.sNoBehavior }; - protected TileEntityBase mMetaTileEntity; - protected long mStoredEnergy = 0; - protected int mAverageEUInputIndex = 0, mAverageEUOutputIndex = 0; - protected boolean mReleaseEnergy = false; - protected int[] mAverageEUInput = new int[11], mAverageEUOutput = new int[11]; - private boolean[] mActiveEUInputs = new boolean[] { false, false, false, false, false, false }, - mActiveEUOutputs = new boolean[] { false, false, false, false, false, false }; - private byte[] mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; - private int[] mCoverSides = new int[] { 0, 0, 0, 0, 0, 0 }, mCoverData = new int[] { 0, 0, 0, 0, 0, 0 }, - mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; - private boolean mHasEnoughEnergy = true; - protected boolean mRunningThroughTick = false; - protected boolean mInputDisabled = false; - protected boolean mOutputDisabled = false; - private boolean mMuffler = false; - private boolean mLockUpgrade = false; - private boolean mActive = false; - private boolean mRedstone = false; - private boolean mWorkUpdate = false; - private boolean mSteamConverter = false; - private boolean mInventoryChanged = false; - private boolean mWorks = true; - private boolean mNeedsUpdate = true; - private boolean mNeedsBlockUpdate = true; - private boolean mSendClientData = false; - private boolean oRedstone = false; - private boolean mEnergyStateReady = false; - private byte mColor = 0, oColor = 0, mStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, - oTexturePage = 0, oLightValueClient = -1, oLightValue = -1, mLightValue = 0, mOtherUpgrades = 0, - mFacing = 0, oFacing = 0, mWorkData = 0; - private int mDisplayErrorCode = 0, oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0, mLagWarningCount = 0; - private short mID = 0; - protected long mTickTimer = 0; - private long oOutput = 0; - private long mAcceptedAmperes = Long.MAX_VALUE; - - - /** - * Cover Support - */ - - public void issueClientUpdate() { - this.mSendClientData = true; - } - - protected final boolean canAccessData() { - return !isDead() && !this.isInvalid(); - } - - @Override - public void issueBlockUpdate() { - super.markDirty(); - } - - @Override - public void issueCoverUpdate(byte aSide) { - this.issueClientUpdate(); - } - - @Override - public void receiveCoverData(byte coverSide, int coverID, int coverData) { - if ((coverSide >= 0 && coverSide < 6) && (mCoverSides[coverSide] == coverID)) - setCoverDataAtSide(coverSide, coverData); - } - - @Override - public long getTimer() { - return this.mTickTimer; - } - - - - - - - - public long getOutputAmperage() { - return this.canAccessData() && this.mMetaTileEntity.isElectric() ? this.mMetaTileEntity.maxAmperesOut() : 0L; - } - - public long getOutputVoltage() { - return this.canAccessData() && this.mMetaTileEntity.isElectric() && this.mMetaTileEntity.isEnetOutput() - ? this.mMetaTileEntity.maxEUOutput() - : 0L; - } - - public long getInputAmperage() { - return this.canAccessData() && this.mMetaTileEntity.isElectric() ? this.mMetaTileEntity.maxAmperesIn() : 0L; - } - - public long getInputVoltage() { - return this.canAccessData() && this.mMetaTileEntity.isElectric() - ? this.mMetaTileEntity.maxEUInput() - : 2147483647L; - } - - @Override - public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { - return !this.canAccessData() ? false : (this.mHasEnoughEnergy = this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy)); - } - - @Override - public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { - if (!this.canAccessData()) { - return false; - } else if (this.getStoredEU() >= this.getEUCapacity() && !aIgnoreTooMuchEnergy) { - return false; - } else { - this.setStoredEU(this.mMetaTileEntity.getEUVar() + aEnergy); - return true; - } - } - - @Override - public boolean inputEnergyFrom(byte aSide) { - return aSide == 6 - ? true - : (!this.isServerSide() - ? this.isEnergyInputSide(aSide) - : aSide >= 0 && aSide < 6 && this.mActiveEUInputs[aSide] && !this.mReleaseEnergy); - } - - @Override - public boolean outputsEnergyTo(byte aSide) { - return aSide == 6 - ? true - : (!this.isServerSide() - ? this.isEnergyOutputSide(aSide) - : aSide >= 0 && aSide < 6 && this.mActiveEUOutputs[aSide] || this.mReleaseEnergy); - } - - private boolean isEnergyInputSide(byte aSide) { - if (aSide >= 0 && aSide < 6) { - if (!this.getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, this.getCoverIDAtSide(aSide), - this.getCoverDataAtSide(aSide), this)) { - return false; - } - - if (this.isInvalid() || this.mReleaseEnergy) { - return false; - } - - if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.mMetaTileEntity.isEnetInput()) { - return this.mMetaTileEntity.isInputFacing(aSide); - } - } - - return false; - } - - private boolean isEnergyOutputSide(byte aSide) { - if (aSide >= 0 && aSide < 6) { - if (!this.getCoverBehaviorAtSide(aSide).letsEnergyOut(aSide, this.getCoverIDAtSide(aSide), - this.getCoverDataAtSide(aSide), this)) { - return false; - } - - if (this.isInvalid() || this.mReleaseEnergy) { - return this.mReleaseEnergy; - } - - if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.mMetaTileEntity.isEnetOutput()) { - return this.mMetaTileEntity.isOutputFacing(aSide); - } - } - - return false; - } - - public boolean isOutputFacing(byte aSide) { - return false; - } - - public boolean isInputFacing(byte aSide) { - return false; - } - - private final TileEntity[] mBufferedTileEntities = new TileEntity[6]; - public boolean ignoreUnloadedChunks = true; - public boolean isDead = false; - - private final void clearNullMarkersFromTileEntityBuffer() { - for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { - if (this.mBufferedTileEntities[i] == this) { - this.mBufferedTileEntities[i] = null; - } - } - - } - - protected final void clearTileEntityBuffer() { - for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { - this.mBufferedTileEntities[i] = null; - } - - } - - public final World getWorld() { - return this.worldObj; - } - - public final int getXCoord() { - return this.xCoord; - } - - public final short getYCoord() { - return (short) this.yCoord; - } - - public final int getZCoord() { - return this.zCoord; - } - - public final int getOffsetX(byte aSide, int aMultiplier) { - return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier; - } - - public final short getOffsetY(byte aSide, int aMultiplier) { - return (short) (this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier); - } - - public final int getOffsetZ(byte aSide, int aMultiplier) { - return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier; - } - - public final boolean openGUI(EntityPlayer aPlayer) { - return this.openGUI(aPlayer, 0); - } - - public final boolean openGUI(EntityPlayer aPlayer, int aID) { - if (aPlayer == null) { - return false; - } else { - aPlayer.openGui(GT_Values.GT, aID, this.worldObj, this.xCoord, this.yCoord, this.zCoord); - return true; - } - } - - public final int getRandomNumber(int aRange) { - return this.worldObj.rand.nextInt(aRange); - } - - public final BiomeGenBase getBiome(int aX, int aZ) { - return this.worldObj.getBiomeGenForCoords(aX, aZ); - } - - public final BiomeGenBase getBiome() { - return this.getBiome(this.xCoord, this.zCoord); - } - - public final Block getBlockOffset(int aX, int aY, int aZ) { - return this.getBlock(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final Block getBlockAtSide(byte aSide) { - return this.getBlockAtSideAndDistance(aSide, 1); - } - - public final Block getBlockAtSideAndDistance(byte aSide, int aDistance) { - return this.getBlock(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final byte getMetaIDOffset(int aX, int aY, int aZ) { - return this.getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final byte getMetaIDAtSide(byte aSide) { - return this.getMetaIDAtSideAndDistance(aSide, 1); - } - - public final byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) { - return this.getMetaID(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final byte getLightLevelOffset(int aX, int aY, int aZ) { - return this.getLightLevel(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final byte getLightLevelAtSide(byte aSide) { - return this.getLightLevelAtSideAndDistance(aSide, 1); - } - - public final byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) { - return this.getLightLevel(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final boolean getOpacityOffset(int aX, int aY, int aZ) { - return this.getOpacity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final boolean getOpacityAtSide(byte aSide) { - return this.getOpacityAtSideAndDistance(aSide, 1); - } - - public final boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) { - return this.getOpacity(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final boolean getSkyOffset(int aX, int aY, int aZ) { - return this.getSky(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final boolean getSkyAtSide(byte aSide) { - return this.getSkyAtSideAndDistance(aSide, 1); - } - - public final boolean getSkyAtSideAndDistance(byte aSide, int aDistance) { - return this.getSky(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final boolean getAirOffset(int aX, int aY, int aZ) { - return this.getAir(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final boolean getAirAtSide(byte aSide) { - return this.getAirAtSideAndDistance(aSide, 1); - } - - public final boolean getAirAtSideAndDistance(byte aSide, int aDistance) { - return this.getAir(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final TileEntity getTileEntityOffset(int aX, int aY, int aZ) { - return this.getTileEntity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - public final TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) { - return aDistance == 1 - ? this.getTileEntityAtSide(aSide) - : this.getTileEntity(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - public final IInventory getIInventory(int aX, int aY, int aZ) { - TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; - } - - public final IInventory getIInventoryOffset(int aX, int aY, int aZ) { - TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); - return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; - } - - public final IInventory getIInventoryAtSide(byte aSide) { - TileEntity tTileEntity = this.getTileEntityAtSide(aSide); - return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; - } - - public final IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) { - TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); - return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; - } - - public final IFluidHandler getITankContainer(int aX, int aY, int aZ) { - TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; - } - - public final IFluidHandler getITankContainerOffset(int aX, int aY, int aZ) { - TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); - return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; - } - - public final IFluidHandler getITankContainerAtSide(byte aSide) { - TileEntity tTileEntity = this.getTileEntityAtSide(aSide); - return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; - } - - public final IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) { - TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); - return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; - } - - public final IGregTechTileEntity getIGregTechTileEntity(int aX, int aY, int aZ) { - TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; - } - - public final IGregTechTileEntity getIGregTechTileEntityOffset(int aX, int aY, int aZ) { - TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; - } - - public final IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) { - TileEntity tTileEntity = this.getTileEntityAtSide(aSide); - return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; - } - - public final IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) { - TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); - return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; - } - - public final Block getBlock(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? Blocks.air - : this.worldObj.getBlock(aX, aY, aZ); - } - - public final byte getMetaID(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? 0 - : (byte) this.worldObj.getBlockMetadata(aX, aY, aZ); - } - - public final byte getLightLevel(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? 0 - : (byte) ((int) (this.worldObj.getLightBrightness(aX, aY, aZ) * 15.0F)); - } - - public final boolean getSky(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? true - : this.worldObj.canBlockSeeTheSky(aX, aY, aZ); - } - - public final boolean getOpacity(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? false - : GT_Utility.isOpaqueBlock(this.worldObj, aX, aY, aZ); - } - - public final boolean getAir(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? true - : GT_Utility.isBlockAir(this.worldObj, aX, aY, aZ); - } - - public final TileEntity getTileEntity(int aX, int aY, int aZ) { - return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) - ? null - : this.worldObj.getTileEntity(aX, aY, aZ); - } - - public final TileEntity getTileEntityAtSide(byte aSide) { - if (aSide >= 0 && aSide < 6 && this.mBufferedTileEntities[aSide] != this) { - int tX = this.getOffsetX(aSide, 1); - short tY = this.getOffsetY(aSide, 1); - int tZ = this.getOffsetZ(aSide, 1); - if (this.crossedChunkBorder(tX, tZ)) { - this.mBufferedTileEntities[aSide] = null; - if (this.ignoreUnloadedChunks && !this.worldObj.blockExists(tX, tY, tZ)) { - return null; - } - } - - if (this.mBufferedTileEntities[aSide] == null) { - this.mBufferedTileEntities[aSide] = this.worldObj.getTileEntity(tX, tY, tZ); - if (this.mBufferedTileEntities[aSide] == null) { - this.mBufferedTileEntities[aSide] = this; - return null; - } else { - return this.mBufferedTileEntities[aSide]; - } - } else if (this.mBufferedTileEntities[aSide].isInvalid()) { - this.mBufferedTileEntities[aSide] = null; - return this.getTileEntityAtSide(aSide); - } else { - return this.mBufferedTileEntities[aSide].xCoord == tX && this.mBufferedTileEntities[aSide].yCoord == tY - && this.mBufferedTileEntities[aSide].zCoord == tZ ? this.mBufferedTileEntities[aSide] : null; - } - } else { - return null; - } - } - - public boolean isDead() { - return this.isDead || this.isInvalidTileEntity(); - } - - public void validate() { - this.clearNullMarkersFromTileEntityBuffer(); - super.validate(); - } - - public void invalidate() { - this.clearNullMarkersFromTileEntityBuffer(); - super.invalidate(); - } - - public void onChunkUnload() { - this.clearNullMarkersFromTileEntityBuffer(); - super.onChunkUnload(); - this.isDead = true; - } - - public final void onAdjacentBlockChange(int aX, int aY, int aZ) { - this.clearNullMarkersFromTileEntityBuffer(); - } - - public final void sendBlockEvent(byte aID, byte aValue) { - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, - new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue), this.xCoord, - this.zCoord); - } - - private boolean crossedChunkBorder(int aX, int aZ) { - return aX >> 4 != this.xCoord >> 4 || aZ >> 4 != this.zCoord >> 4; - } - - public final void setOnFire() { - GT_Utility.setCoordsOnFire(this.worldObj, this.xCoord, this.yCoord, this.zCoord, false); - } - - public final void setToFire() { - this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.fire); - } - - public String trans(String aKey, String aEnglish) { - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); - } - - @Override - public byte getInternalInputRedstoneSignal(byte aSide) { - return (byte) (getCoverBehaviorAtSide(aSide).getRedstoneInput(aSide, getInputRedstoneSignal(aSide), getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) & 15); - } - - @Override - public byte getInputRedstoneSignal(byte aSide) { - return (byte) (worldObj.getIndirectPowerLevelTo(getOffsetX(aSide, 1), getOffsetY(aSide, 1), getOffsetZ(aSide, 1), aSide) & 15); - } - - @Override - public byte getOutputRedstoneSignal(byte aSide) { - return getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) ? mSidedRedstone[aSide] : getGeneralRS(aSide); - } - - public boolean allowGeneralRedstoneOutput() { - return false; - } - - public byte getGeneralRS(byte aSide){ - return allowGeneralRedstoneOutput() ? mSidedRedstone[aSide] : 0; - } - - @Override - public void setInternalOutputRedstoneSignal(byte aSide, byte aStrength) { - if (!getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) - setOutputRedstoneSignal(aSide, aStrength); - } - - @Override - public void setOutputRedstoneSignal(byte aSide, byte aStrength) { - aStrength = (byte) Math.min(Math.max(0, aStrength), 15); - if (aSide >= 0 && aSide < 6 && mSidedRedstone[aSide] != aStrength) { - mSidedRedstone[aSide] = aStrength; - issueBlockUpdate(); - } - } - - @Override - public boolean hasInventoryBeenModified() { - return mInventoryChanged; - } - - @Override - public void setGenericRedstoneOutput(boolean aOnOff) { - mRedstone = aOnOff; - } - - @Override - public GT_CoverBehavior getCoverBehaviorAtSide(byte aSide) { - return aSide >= 0 && aSide < mCoverBehaviors.length ? mCoverBehaviors[aSide] : GregTech_API.sNoBehavior; - } - - @Override - public void setCoverIDAtSide(byte aSide, int aID) { - if (aSide >= 0 && aSide < 6) { - mCoverSides[aSide] = aID; - mCoverData[aSide] = 0; - mCoverBehaviors[aSide] = GregTech_API.getCoverBehavior(aID); - issueCoverUpdate(aSide); - issueBlockUpdate(); - } - } - - @Override - public void setCoverItemAtSide(byte aSide, ItemStack aCover) { - GregTech_API.getCoverBehavior(aCover).placeCover(aSide, aCover, this); - } - - @Override - public int getCoverIDAtSide(byte aSide) { - if (aSide >= 0 && aSide < 6) return mCoverSides[aSide]; - return 0; - } - - @Override - public ItemStack getCoverItemAtSide(byte aSide) { - return GT_Utility.intToStack(getCoverIDAtSide(aSide)); - } - - @Override - public boolean canPlaceCoverIDAtSide(byte aSide, int aID) { - return getCoverIDAtSide(aSide) == 0; - } - - @Override - public boolean canPlaceCoverItemAtSide(byte aSide, ItemStack aCover) { - return getCoverIDAtSide(aSide) == 0; - } - - @Override - public void setCoverDataAtSide(byte aSide, int aData) { - if (aSide >= 0 && aSide < 6) mCoverData[aSide] = aData; - } - - @Override - public int getCoverDataAtSide(byte aSide) { - if (aSide >= 0 && aSide < 6) return mCoverData[aSide]; - return 0; - } - - public byte getLightValue() { - return mLightValue; - } - - @Override - public void setLightValue(byte aLightValue) { - mLightValue = (byte) (aLightValue & 15); - } - - @Override - public long getAverageElectricInput() { - int rEU = 0; - for (int i = 0; i < mAverageEUInput.length; i++) { - if (i != mAverageEUInputIndex) - rEU += mAverageEUInput[i]; - } - return rEU / (mAverageEUInput.length - 1); - } - - @Override - public long getAverageElectricOutput() { - int rEU = 0; - for (int i = 0; i < mAverageEUOutput.length; i++) { - if (i != mAverageEUOutputIndex) - rEU += mAverageEUOutput[i]; - } - return rEU / (mAverageEUOutput.length - 1); - } - - public boolean hasSidedRedstoneOutputBehavior() { - return false; - } - - @Override - public boolean dropCover(byte aSide, byte aDroppedSide, boolean aForced) { - if (getCoverBehaviorAtSide(aSide).onCoverRemoval(aSide, getCoverIDAtSide(aSide), mCoverData[aSide], this, aForced) || aForced) { - ItemStack tStack = getCoverBehaviorAtSide(aSide).getDrop(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this); - if (tStack != null) { - tStack.setTagCompound(null); - EntityItem tEntity = new EntityItem(worldObj, getOffsetX(aDroppedSide, 1) + 0.5, getOffsetY(aDroppedSide, 1) + 0.5, getOffsetZ(aDroppedSide, 1) + 0.5, tStack); - tEntity.motionX = 0; - tEntity.motionY = 0; - tEntity.motionZ = 0; - worldObj.spawnEntityInWorld(tEntity); - } - setCoverIDAtSide(aSide, 0); - if (mMetaTileEntity.hasSidedRedstoneOutputBehavior()) { - setOutputRedstoneSignal(aSide, (byte) 0); - } else { - setOutputRedstoneSignal(aSide, (byte) 15); - } - return true; - } - return false; - } - - public String getOwnerName() { - if (GT_Utility.isStringInvalid(mOwnerName)) return "Player"; - return mOwnerName; - } - - public String setOwnerName(String aName) { - if (GT_Utility.isStringInvalid(aName)) return mOwnerName = "Player"; - return mOwnerName = aName; - } - - @Override - public byte getComparatorValue(byte aSide) { - return canAccessData() ? mMetaTileEntity.getComparatorValue(aSide) : 0; - } - - @Override - public byte getStrongOutputRedstoneSignal(byte aSide) { - return aSide >= 0 && aSide < 6 && (mStrongRedstone & (1 << aSide)) != 0 ? (byte) (mSidedRedstone[aSide] & 15) : 0; - } - - @Override - public void setStrongOutputRedstoneSignal(byte aSide, byte aStrength) { - mStrongRedstone |= (1 << aSide); - setOutputRedstoneSignal(aSide, aStrength); - } - - @Override - public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!canAccessData() || !mMetaTileEntity.isElectric() || !inputEnergyFrom(aSide) || aAmperage <= 0 || aVoltage <= 0 || getStoredEU() >= getEUCapacity() || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) - return 0; - if (aVoltage > getInputVoltage()) { - doExplosion(aVoltage); - return 0; - } - if (increaseStoredEnergyUnits(aVoltage * (aAmperage = Math.min(aAmperage, Math.min(mMetaTileEntity.maxAmperesIn() - mAcceptedAmperes, 1 + ((getEUCapacity() - getStoredEU()) / aVoltage)))), true)) { - mAverageEUInput[mAverageEUInputIndex] += aVoltage * aAmperage; - mAcceptedAmperes += aAmperage; - return aAmperage; - } - return 0; - } - - @Override - public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (!canAccessData() || !mMetaTileEntity.isElectric() || !outputsEnergyTo(aSide) || getStoredEU() - (aVoltage * aAmperage) < mMetaTileEntity.getMinimumStoredEU()) - return false; - if (decreaseStoredEU(aVoltage * aAmperage, false)) { - mAverageEUOutput[mAverageEUOutputIndex] += aVoltage * aAmperage; - return true; - } - return false; - } - - - public double getOutputEnergyUnitsPerTick() { - return oOutput; - } - - - public boolean isTeleporterCompatible(ForgeDirection aSide) { - return false; - } - - - public double demandedEnergyUnits() { - if (mReleaseEnergy || !canAccessData() || !mMetaTileEntity.isEnetInput()) return 0; - return getEUCapacity() - getStoredEU(); - } - - - public double injectEnergyUnits(ForgeDirection aDirection, double aAmount) { - return injectEnergyUnits((byte) aDirection.ordinal(), (int) aAmount, 1) > 0 ? 0 : aAmount; - } - - - public boolean acceptsEnergyFrom(TileEntity aEmitter, ForgeDirection aDirection) { - return inputEnergyFrom((byte) aDirection.ordinal()); - } - - - public boolean emitsEnergyTo(TileEntity aReceiver, ForgeDirection aDirection) { - return outputsEnergyTo((byte) aDirection.ordinal()); - } - - - public double getOfferedEnergy() { - return (canAccessData() && getStoredEU() - mMetaTileEntity.getMinimumStoredEU() >= oOutput) ? Math.max(0, oOutput) : 0; - } - - - public void drawEnergy(double amount) { - mAverageEUOutput[mAverageEUOutputIndex] += amount; - decreaseStoredEU((int) amount, true); - } - - - public int injectEnergy(ForgeDirection aForgeDirection, int aAmount) { - return injectEnergyUnits((byte) aForgeDirection.ordinal(), aAmount, 1) > 0 ? 0 : aAmount; - } - - - public int addEnergy(int aEnergy) { - if (!canAccessData()) return 0; - if (aEnergy > 0) - increaseStoredEnergyUnits(aEnergy, true); - else - decreaseStoredEU(-aEnergy, true); - return (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getEUVar()); - } - - - public boolean isAddedToEnergyNet() { - return false; - } - - - public int demandsEnergy() { - if (mReleaseEnergy || !canAccessData() || !mMetaTileEntity.isEnetInput()) return 0; - return getCapacity() - getStored(); - } - - - public int getCapacity() { - return (int) Math.min(Integer.MAX_VALUE, getEUCapacity()); - } - - - public int getStored() { - return (int) Math.min(Integer.MAX_VALUE, Math.min(getStoredEU(), getCapacity())); - } - - - public void setStored(int aEU) { - if (canAccessData()) setStoredEU(aEU); - } - - - public int getMaxSafeInput() { - return (int) Math.min(Integer.MAX_VALUE, getInputVoltage()); - } - - - public int getMaxEnergyOutput() { - if (mReleaseEnergy) return Integer.MAX_VALUE; - return getOutput(); - } - - - public int getOutput() { - return (int) Math.min(Integer.MAX_VALUE, oOutput); - } - - - public int injectEnergy(Direction aDirection, int aAmount) { - return injectEnergyUnits((byte) aDirection.toSideValue(), aAmount, 1) > 0 ? 0 : aAmount; - } - - public boolean acceptsEnergyFrom(TileEntity aReceiver, Direction aDirection) { - return inputEnergyFrom((byte) aDirection.toSideValue()); - } - - - public boolean emitsEnergyTo(TileEntity aReceiver, Direction aDirection) { - return outputsEnergyTo((byte) aDirection.toSideValue()); - } - - @Override - public boolean isInvalidTileEntity() { - return isInvalid(); - } - - @Override - public boolean addStackToSlot(int aIndex, ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return true; - if (aIndex < 0 || aIndex >= getSizeInventory()) return false; - ItemStack tStack = getStackInSlot(aIndex); - if (GT_Utility.isStackInvalid(tStack)) { - setInventorySlotContents(aIndex, aStack); - return true; - } - aStack = GT_OreDictUnificator.get(aStack); - if (GT_Utility.areStacksEqual(tStack, aStack) && tStack.stackSize + aStack.stackSize <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) { - tStack.stackSize += aStack.stackSize; - return true; - } - return false; - } - - @Override - public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) { - return addStackToSlot(aIndex, GT_Utility.copyAmount(aAmount, aStack)); - } - - @Override - public void markDirty() { - super.markDirty(); - mInventoryChanged = true; - } - - - - /** - * To Do - */ - - public boolean isElectric() { - return true; - } - - public boolean isEnetOutput() { - return false; - } - - public boolean isEnetInput() { - return false; - } - - public long maxEUStore() { - return 0L; - } - - public long maxEUInput() { - return 0L; - } - - public long maxEUOutput() { - return 0L; - } - - public long maxAmperesOut() { - return 1L; - } - - public long maxAmperesIn() { - return 1L; - } - - public void doEnergyExplosion() { - if (this.getUniversalEnergyCapacity() > 0L - && this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 5L) { - this.doExplosion(this.oOutput * (long) (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() - ? 4 - : (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 2L ? 2 : 1))); - GT_Mod arg9999 = GT_Mod.instance; - GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(this.mOwnerName), - "electricproblems"); - } - - } - - public void doExplosion(long aAmount) { - if (this.canAccessData()) { - if (GregTech_API.sMachineWireFire && this.mMetaTileEntity.isElectric()) { - try { - this.mReleaseEnergy = true; - Util.emitEnergyToNetwork(GT_Values.V[5], Math.max(1L, this.getStoredEU() / GT_Values.V[5]), this); - } catch (Exception arg4) { - } - } - this.mReleaseEnergy = false; - this.onExplosion(); - PollutionUtils.addPollution(this, 100000); - this.mMetaTileEntity.doExplosion(aAmount); - } - - } - - public void onExplosion() { - - } - - @Override - public String[] getDescription() { - return this.canAccessData() ? this.mMetaTileEntity.getDescription() : new String[0]; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public String[] getInfoData() { - return null; - } - - public long getEUVar() { - return this.mStoredEnergy; - } - - public void setEUVar(long aEnergy) { - this.mStoredEnergy = aEnergy; - } - - public long getStoredEU() { - return this.canAccessData() ? Math.min(this.mMetaTileEntity.getEUVar(), this.getEUCapacity()) : 0L; - } - - public long getEUCapacity() { - return this.canAccessData() ? this.mMetaTileEntity.maxEUStore() : 0L; - } - - public long getMinimumStoredEU() { - return 512L; - } - - public boolean setStoredEU(long aEnergy) { - if (!this.canAccessData()) { - return false; - } else { - if (aEnergy < 0L) { - aEnergy = 0L; - } - - this.mMetaTileEntity.setEUVar(aEnergy); - return true; - } - } - - public boolean decreaseStoredEU(long aEnergy, boolean aIgnoreTooLessEnergy) { - if (!this.canAccessData()) { - return false; - } else if (this.mMetaTileEntity.getEUVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { - return false; - } else { - this.setStoredEU(this.mMetaTileEntity.getEUVar() - aEnergy); - if (this.mMetaTileEntity.getEUVar() < 0L) { - this.setStoredEU(0L); - return false; - } else { - return true; - } - } - } - - //Required as of 5.09.32-pre5 - public boolean energyStateReady() { - return false; - } - - - private boolean firstTicked = false; - - public boolean onFirstTick() { - if (!firstTicked) { - firstTicked = true; - if (this.mInventory != null) { - this.mInventory.purgeNulls(); - return true; - } - } - return false; - } - - - /** - * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d - */ - public boolean inputEnergyFrom(byte arg0, boolean arg1) { - // TODO Auto-generated method stub - return false; - } - - - /** - * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d - */ - public boolean outputsEnergyTo(byte arg0, boolean arg1) { - // TODO Auto-generated method stub - return false; - } - - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java b/src/Java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java deleted file mode 100644 index fb599b0bae..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java +++ /dev/null @@ -1,1168 +0,0 @@ -/*package gtPlusPlus.core.tileentities.base; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.net.GT_Packet; -import gregtech.api.net.GT_Packet_Block_Event; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.interfaces.IGregtechPower; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import net.minecraftforge.common.util.ForgeDirection; - -public abstract class TilePoweredGT extends TileEntityBase implements IGregtechPower { - - public static AutoMap mPoweredEntities = new AutoMap(); - - //Base Tile Fields - public boolean ignoreUnloadedChunks; - public boolean isDead; - //Meta Tile Fields - private long mAcceptedAmperes; - - private boolean[] mActiveEUInputs; - private boolean[] mActiveEUOutputs; - protected int[] mAverageEUInput; - protected int mAverageEUInputIndex; - protected int[] mAverageEUOutput; - protected int mAverageEUOutputIndex; - private final TileEntity[] mBufferedTileEntities; - private byte mFacing = 0; - private boolean mHasEnoughEnergy; - private boolean mNeedsUpdate; - private boolean mNeedsBlockUpdate; - private boolean mRunningThroughTick; - private boolean mSendClientData; - protected boolean mReleaseEnergy; - private long mTickTimer; - protected long mStoredEnergy; - protected long mStoredSteam; - - public TilePoweredGT() { - super(); - this.mBufferedTileEntities = new TileEntity[6]; - this.ignoreUnloadedChunks = true; - this.isDead = false; - mPoweredEntities.put(this); - } - - @Override - public boolean acceptsRotationalEnergy(byte p0) { - return false; - } - - private boolean canAccessData() { - return this.isInvalid() ? false : true; - } - - private final void clearNullMarkersFromTileEntityBuffer() { - for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { - if (this.mBufferedTileEntities[i] == this) { - this.mBufferedTileEntities[i] = null; - } - } - } - - protected final void clearTileEntityBuffer() { - for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { - this.mBufferedTileEntities[i] = null; - } - } - - private boolean crossedChunkBorder(final int aX, final int aZ) { - return aX >> 4 != this.xCoord >> 4 || aZ >> 4 != this.zCoord >> 4; - } - - @Override - public boolean decreaseStoredEnergyUnits(final long aEnergy, final boolean aIgnoreTooLessEnergy) { - return this.canAccessData() && (this.mHasEnoughEnergy = (this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) - || this.decreaseStoredSteam(aEnergy, false) - || (aIgnoreTooLessEnergy && this.decreaseStoredSteam(aEnergy, true)))); - } - - public boolean decreaseStoredEU(final long aEnergy, final boolean aIgnoreTooLessEnergy) { - if (!this.canAccessData()) { - return false; - } - if (this.getEUVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { - return false; - } - this.setStoredEU(this.getEUVar() - aEnergy); - if (this.getEUVar() < 0L) { - this.setStoredEU(0L); - return false; - } - return true; - } - - public boolean decreaseStoredSteam(final long aEnergy, final boolean aIgnoreTooLessEnergy) { - if (!this.canAccessData()) { - return false; - } - if (this.getSteamVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { - return false; - } - this.setStoredSteam(this.getSteamVar() - aEnergy); - if (this.getSteamVar() < 0L) { - this.setStoredSteam(0L); - return false; - } - return true; - } - - public void doExplosion(final long aExplosionPower) { - final float tStrength = (aExplosionPower < GT_Values.V[0]) - ? 1.0f - : ((aExplosionPower < GT_Values.V[1]) - ? 2.0f - : ((aExplosionPower < GT_Values.V[2]) - ? 3.0f - : ((aExplosionPower < GT_Values.V[3]) - ? 4.0f - : ((aExplosionPower < GT_Values.V[4]) - ? 5.0f - : ((aExplosionPower < GT_Values.V[4] * 2L) - ? 6.0f - : ((aExplosionPower < GT_Values.V[5]) - ? 7.0f - : ((aExplosionPower < GT_Values.V[6]) - ? 8.0f - : ((aExplosionPower < GT_Values.V[7]) - ? 9.0f - : 10.0f)))))))); - final int tX = this.getXCoord(); - final int tY = this.getYCoord(); - final int tZ = this.getZCoord(); - final World tWorld = this.getWorld(); - GT_Utility.sendSoundToPlayers(tWorld, (String) GregTech_API.sSoundList.get(209), 1.0f, -1.0f, tX, tY, tZ); - tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions) { - tWorld.createExplosion((Entity) null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); - } - } - - public boolean drainEnergyUnits(final byte aSide, final long aVoltage, final long aAmperage) { - if (!this.canAccessData() || !this.isElectric() || !this.outputsEnergyTo(aSide) - || this.getStoredEU() - aVoltage * aAmperage < this.getMinimumStoredEU()) { - return false; - } - if (this.decreaseStoredEU(aVoltage * aAmperage, false)) { - final int[] mAverageEUOutput = this.mAverageEUOutput; - final int mAverageEUOutputIndex = this.mAverageEUOutputIndex; - mAverageEUOutput[mAverageEUOutputIndex] += (int) (aVoltage * aAmperage); - return true; - } - return false; - } - - @Override - public final boolean getAir(final int aX, final int aY, final int aZ) { - return (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) - || GT_Utility.isBlockAir(this.worldObj, aX, aY, aZ); - } - - @Override - public final boolean getAirAtSide(final byte aSide) { - return this.getAirAtSideAndDistance(aSide, 1); - } - - @Override - public final boolean getAirAtSideAndDistance(final byte aSide, final int aDistance) { - return this.getAir(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - @Override - public final boolean getAirOffset(final int aX, final int aY, final int aZ) { - return this.getAir(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - @Override - public long getAverageElectricInput() { - int rEU = 0; - for (int i = 0; i < this.mAverageEUInput.length; ++i) { - if (i != this.mAverageEUInputIndex) { - rEU += this.mAverageEUInput[i]; - } - } - return rEU / (this.mAverageEUInput.length - 1); - } - - public long getAverageElectricOutput() { - int rEU = 0; - for (int i = 0; i < this.mAverageEUOutput.length; ++i) { - if (i != this.mAverageEUOutputIndex) { - rEU += this.mAverageEUOutput[i]; - } - } - return rEU / (this.mAverageEUOutput.length - 1); - } - - @Override - public byte getBackFacing() { - return GT_Utility.getOppositeSide((int) this.mFacing); - } - - @Override - public final Block getBlock(final int aX, final int aY, final int aZ) { - if (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) { - return Blocks.air; - } - return this.worldObj.getBlock(aX, aY, aZ); - } - - - @Override - public final Block getBlockAtSide(final byte aSide) { - return this.getBlockAtSideAndDistance(aSide, 1); - } - - @Override - public final Block getBlockAtSideAndDistance(final byte aSide, final int aDistance) { - return this.getBlock(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - @Override - public final Block getBlockOffset(final int aX, final int aY, final int aZ) { - return this.getBlock(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - @Override - public String[] getDescription() { - // TODO Auto-generated method stub - return null; - } - - - - - - - - - @Override - public long getEUCapacity() { - if (this.canAccessData()) { - return this.maxEUStore(); - } - return 0L; - } - - public long getEUVar() { - return mStoredEnergy; - } - - @Override - public byte getFrontFacing() { - return this.mFacing; - } - - @Override - public final IGregTechTileEntity getIGregTechTileEntity(final int aX, final int aY, final int aZ) { - final TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - return (IGregTechTileEntity) tTileEntity; - } - return null; - } - - @Override - public final IGregTechTileEntity getIGregTechTileEntityAtSide(final byte aSide) { - final TileEntity tTileEntity = this.getTileEntityAtSide(aSide); - if (tTileEntity instanceof IGregTechTileEntity) { - return (IGregTechTileEntity) tTileEntity; - } - return null; - } - - @Override - public final IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(final byte aSide, final int aDistance) { - final TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); - if (tTileEntity instanceof IGregTechTileEntity) { - return (IGregTechTileEntity) tTileEntity; - } - return null; - } - - @Override - public final IGregTechTileEntity getIGregTechTileEntityOffset(final int aX, final int aY, final int aZ) { - final TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - return (IGregTechTileEntity) tTileEntity; - } - return null; - } - - @Override - public final IInventory getIInventory(final int aX, final int aY, final int aZ) { - final TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IInventory) { - return (IInventory) tTileEntity; - } - return null; - } - - @Override - public final IInventory getIInventoryAtSide(final byte aSide) { - final TileEntity tTileEntity = this.getTileEntityAtSide(aSide); - if (tTileEntity instanceof IInventory) { - return (IInventory) tTileEntity; - } - return null; - } - - @Override - public final IInventory getIInventoryAtSideAndDistance(final byte aSide, final int aDistance) { - final TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); - if (tTileEntity instanceof IInventory) { - return (IInventory) tTileEntity; - } - return null; - } - - @Override - public final IInventory getIInventoryOffset(final int aX, final int aY, final int aZ) { - final TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); - if (tTileEntity instanceof IInventory) { - return (IInventory) tTileEntity; - } - return null; - } - - @Override - public String[] getInfoData() { - // TODO Auto-generated method stub - return null; - } - - @Override - public long getInputAmperage() { - if (this.canAccessData() && this.isElectric()) { - return this.maxAmperesIn(); - } - return 0L; - } - - public long getInputTier() { - return GT_Utility.getTier(this.getInputVoltage()); - } - - @Override - public long getInputVoltage() { - if (this.canAccessData() && this.isElectric()) { - return this.maxEUInput(); - } - return 2147483647L; - } - - private long getMinimumStoredEU() { - return 0; - } - - @Override - public final int getOffsetX(final byte aSide, final int aMultiplier) { - return this.xCoord + ForgeDirection.getOrientation((int) aSide).offsetX * aMultiplier; - } - - public final short getOffsetY(final byte aSide, final int aMultiplier) { - return (short) (this.yCoord + ForgeDirection.getOrientation((int) aSide).offsetY * aMultiplier); - } - - public final int getOffsetZ(final byte aSide, final int aMultiplier) { - return this.zCoord + ForgeDirection.getOrientation((int) aSide).offsetZ * aMultiplier; - } - - @Override - public long getOutputAmperage() { - if (this.canAccessData() && this.isElectric()) { - return this.maxAmperesOut(); - } - return 0L; - } - - public long getOutputTier() { - return GT_Utility.getTier(this.getOutputVoltage()); - } - - @Override - public long getOutputVoltage() { - if (this.canAccessData() && this.isElectric() && this.isEnetOutput()) { - return this.maxEUOutput(); - } - return 0L; - } - - @Override - public int getRandomNumber(int p0) { - return CORE.RANDOM.nextInt(); - } - - @Override - public long getSteamCapacity() { - if (this.canAccessData()) { - return this.maxSteamStore(); - } - return 0L; - } - - public long getSteamVar() { - return mStoredSteam; - } - - @Override - public long getStoredEU() { - if (this.canAccessData()) { - return Math.min(this.getEUVar(), this.getEUCapacity()); - } - return 0L; - } - - - - - - - - - - @Override - public long getStoredSteam() { - if (this.canAccessData()) { - return Math.min(this.getSteamVar(), this.getSteamCapacity()); - } - return 0L; - } - - @Override - public final TileEntity getTileEntity(final int aX, final int aY, final int aZ) { - if (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) { - return null; - } - return this.worldObj.getTileEntity(aX, aY, aZ); - } - - public final TileEntity getTileEntityAtSide(final byte aSide) { - if (aSide < 0 || aSide >= 6 || this.mBufferedTileEntities[aSide] == this) { - return null; - } - final int tX = this.getOffsetX(aSide, 1); - final int tY = this.getOffsetY(aSide, 1); - final int tZ = this.getOffsetZ(aSide, 1); - if (this.crossedChunkBorder(tX, tZ)) { - this.mBufferedTileEntities[aSide] = null; - if (this.ignoreUnloadedChunks && !this.worldObj.blockExists(tX, tY, tZ)) { - return null; - } - } - if (this.mBufferedTileEntities[aSide] == null) { - this.mBufferedTileEntities[aSide] = this.worldObj.getTileEntity(tX, tY, tZ); - if (this.mBufferedTileEntities[aSide] == null) { - this.mBufferedTileEntities[aSide] = this; - return null; - } - return this.mBufferedTileEntities[aSide]; - } else { - if (this.mBufferedTileEntities[aSide].isInvalid()) { - this.mBufferedTileEntities[aSide] = null; - return this.getTileEntityAtSide(aSide); - } - if (this.mBufferedTileEntities[aSide].xCoord == tX && this.mBufferedTileEntities[aSide].yCoord == tY - && this.mBufferedTileEntities[aSide].zCoord == tZ) { - return this.mBufferedTileEntities[aSide]; - } - return null; - } - } - - @Override - public final TileEntity getTileEntityAtSideAndDistance(final byte aSide, final int aDistance) { - if (aDistance == 1) { - return this.getTileEntityAtSide(aSide); - } - return this.getTileEntity(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), - this.getOffsetZ(aSide, aDistance)); - } - - - - - - - - - - - @Override - public final TileEntity getTileEntityOffset(final int aX, final int aY, final int aZ) { - return this.getTileEntity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); - } - - @Override - public long getUniversalEnergyCapacity() { - return 0; - } - - @Override - public long getUniversalEnergyStored() { - return 0; - } - - @Override - public World getWorld() { - return this.getWorldObj(); - } - - - - - - - @Override - public int getXCoord() { - return this.xCoord; - } - - - - - - @Override - public short getYCoord() { - return (short) this.yCoord; - } - - @Override - public int getZCoord() { - return this.zCoord; - } - - public boolean hasEnoughEnergy() { - return (this.getStoredEU() > 0 ? (mHasEnoughEnergy = true) : (mHasEnoughEnergy = false)); - } - - - - - @Override - public boolean increaseStoredEnergyUnits(final long aEnergy, final boolean aIgnoreTooMuchEnergy) { - if (!this.canAccessData()) { - return false; - } - if (this.getStoredEU() < this.getEUCapacity() || aIgnoreTooMuchEnergy) { - this.setStoredEU(this.getEUVar() + aEnergy); - return true; - } - return false; - } - - @Override - public boolean increaseStoredSteam(final long aEnergy, final boolean aIgnoreTooMuchEnergy) { - if (!this.canAccessData()) { - return false; - } - if (this.getSteamVar() < this.getSteamCapacity() || aIgnoreTooMuchEnergy) { - this.setStoredSteam(this.getSteamVar() + aEnergy); - return true; - } - return false; - } - - public long injectEnergyUnits(final byte aSide, final long aVoltage, long aAmperage) { - if (!this.canAccessData() || !this.isElectric() || !this.inputEnergyFrom(aSide) - || aAmperage <= 0L || aVoltage <= 0L || this.getStoredEU() >= this.getEUCapacity() - || this.maxAmperesIn() <= this.mAcceptedAmperes) { - return 0L; - } - if (aVoltage > this.getInputVoltage()) { - this.doExplosion(aVoltage); - return 0L; - } - if (this.increaseStoredEnergyUnits(aVoltage - * (aAmperage = Math.min(aAmperage, Math.min(this.maxAmperesIn() - this.mAcceptedAmperes, - 1L + (this.getEUCapacity() - this.getStoredEU()) / aVoltage))), - true)) { - final int[] mAverageEUInput = this.mAverageEUInput; - final int mAverageEUInputIndex = this.mAverageEUInputIndex; - mAverageEUInput[mAverageEUInputIndex] += (int) (aVoltage * aAmperage); - this.mAcceptedAmperes += aAmperage; - return aAmperage; - } - return 0L; - } - - @Override - public boolean injectRotationalEnergy(byte p0, long p1, long p2) { - return false; - } - - @Override - public boolean inputEnergyFrom(final byte aSide) { - if (aSide == 6) { - return true; - } - if (this.isServerSide()) { - return aSide >= 0 && aSide < 6 && this.mActiveEUInputs[aSide] && !this.mReleaseEnergy; - } - return this.isEnergyInputSide(aSide); - } - - - public final boolean isClientSide() { - return this.worldObj.isRemote; - } - - @Override - public boolean isDead() { - return this.isDead; - } - - private boolean isElectric() { - return true; - } - - private boolean isEnergyInputSide(final byte aSide) { - if (aSide >= 0 && aSide < 6) { - if (this.isInvalid() || this.mReleaseEnergy) { - return false; - } - if (this.canAccessData() && this.isElectric() && this.isEnetInput()) { - return this.isInputFacing(aSide); - } - } - return false; - } - - private boolean isEnergyOutputSide(final byte aSide) { - if (aSide >= 0 && aSide < 6) { - if (this.isInvalid() || this.mReleaseEnergy) { - return this.mReleaseEnergy; - } - if (this.canAccessData() && this.isElectric() && this.isEnetOutput()) { - return this.isOutputFacing(aSide); - } - } - return false; - } - - public boolean isEnetInput() { - return false; - } - - public boolean isEnetOutput() { - return false; - } - - @Override - public boolean isGivingInformation() { - return this.canAccessData() && this.isGivingInformation(); - } - - public boolean isInputFacing(final byte aSide) { - return false; - } - - - - - @Override - public boolean isInvalidTileEntity() { - return isDead() ? true : false; - } - - public boolean isOutputFacing(final byte aSide) { - return false; - } - - public final boolean isServerSide() { - return !this.worldObj.isRemote; - } - - public boolean isUniversalEnergyStored(final long aEnergyAmount) { - return this.getUniversalEnergyStored() >= aEnergyAmount || (this.mHasEnoughEnergy = false); - } - - @Override - public boolean isValidFacing(final byte aSide) { - return this.canAccessData(); - } - - public long maxAmperesIn() { - return 1L; - } - - public long maxAmperesOut() { - return 1L; - } - - public long maxEUInput() { - return 0L; - } - - public long maxEUOutput() { - return 0L; - } - - public long maxEUStore() { - return 0L; - } - - public long maxSteamStore() { - return 256000L; - } - - public final void onAdjacentBlockChange(final int aX, final int aY, final int aZ) { - this.clearNullMarkersFromTileEntityBuffer(); - } - - @Override - public boolean outputsEnergyTo(final byte aSide) { - if (aSide == 6) { - return true; - } - if (this.isServerSide()) { - if (aSide < 0 || aSide >= 6 || !this.mActiveEUOutputs[aSide]) { - if (!this.mReleaseEnergy) { - return false; - } - } - return true; - } - return this.isEnergyOutputSide(aSide); - } - - public final void sendBlockEvent(final byte aID, final byte aValue) { - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, - (GT_Packet) new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue), - this.xCoord, this.zCoord); - } - - public void setEUVar(final long aEnergy) { - mStoredEnergy = aEnergy; - } - - @Override - public void setFrontFacing(byte aFacing) { - if (this.isValidFacing(aFacing)) { - this.mFacing = aFacing; - //this.onFacingChange(); - //this.onMachineBlockUpdate(); - } - } - - public void setSteamVar(final long aSteam) { - mStoredSteam = aSteam; - } - - public boolean setStoredEU(long aEnergy) { - if (!this.canAccessData()) { - return false; - } - if (aEnergy < 0L) { - aEnergy = 0L; - } - this.setEUVar(aEnergy); - return true; - } - - public boolean setStoredSteam(long aEnergy) { - if (!this.canAccessData()) { - return false; - } - if (aEnergy < 0L) { - aEnergy = 0L; - } - this.setSteamVar(aEnergy); - return true; - } - - @Override - public void writeToNBT(NBTTagCompound nbt) { - // TODO Auto-generated method stub - super.writeToNBT(nbt); - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - // TODO Auto-generated method stub - super.readFromNBT(nbt); - } - - - - - @Override - public boolean onPreTick(long aTick) { - return onPreTick(this, this.mTickTimer); - } - - @Override - public boolean onTick(long aTick) { - return onTick(this, this.mTickTimer); - } - - @Override - public boolean onPostTick(long aTick) { - return onPostTick(this, this.mTickTimer); - } - - @Override - public boolean onPreTick(TilePoweredGT tilePoweredGT, long mTickTimer2) { - return super.onPreTick(mTickTimer2); - } - - @Override - public boolean onTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2) { - return super.onTick(mTickTimer2); - } - - @Override - public boolean onPostTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2) { - return super.onPostTick(mTickTimer2); - } - - @Override - public void markDirty() { - super.markDirty(); - } - - @Override - public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { - // TODO Auto-generated method stub - return super.receiveClientEvent(p_145842_1_, p_145842_2_); - } - - @Override - public void onChunkUnload() { - this.clearNullMarkersFromTileEntityBuffer(); - super.onChunkUnload(); - this.isDead = true; - } - - - public void updateEntity() { - super.updateEntity(); - this.isDead = false; - - this.mRunningThroughTick = true; - long tTime = System.currentTimeMillis(); - int tCode = 0; - final boolean aSideServer = this.isServerSide(); - final boolean aSideClient = this.isClientSide(); - try { - for (tCode = 0; this.hasValidMetaTileEntity() && tCode >= 0; tCode = -1) { - Label_1743 : { - switch (tCode) { - case 0 : { - ++tCode; - if (this.mTickTimer++ != 0L) { - break Label_1743; - } - this.oX = this.xCoord; - this.oY = this.yCoord; - this.oZ = this.zCoord; - - this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, - (TileEntity) this); - this.onFirstTick(this); - if (!this.hasValidMetaTileEntity()) { - this.mRunningThroughTick = false; - return; - } - break Label_1743; - } - case 1 : { - ++tCode; - if (!aSideClient) { - break Label_1743; - } - if (this.mNeedsUpdate) { - this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); - this.mNeedsUpdate = false; - } - break Label_1743; - } - case 2 : - case 3 : - case 4 : - case 5 : - case 6 : - case 7 : { - if (aSideServer && this.mTickTimer > 10L) { - for (byte i = (byte) (tCode - 2); i < 6; ++i) { - - } - } - } - case 8 : { - tCode = 9; - if (aSideServer) { - if (++this.mAverageEUInputIndex >= this.mAverageEUInput.length) { - this.mAverageEUInputIndex = 0; - } - if (++this.mAverageEUOutputIndex >= this.mAverageEUOutput.length) { - this.mAverageEUOutputIndex = 0; - } - this.mAverageEUInput[this.mAverageEUInputIndex] = 0; - this.mAverageEUOutput[this.mAverageEUOutputIndex] = 0; - } - } - case 9 : { - ++tCode; - this.onPreTick(this, this.mTickTimer); - if (!this.hasValidMetaTileEntity()) { - this.mRunningThroughTick = false; - return; - } - } - case 10 : { - ++tCode; - if (!aSideServer) { - break Label_1743; - } - - if (this.xCoord != this.oX || this.yCoord != this.oY || this.zCoord != this.oZ) { - this.oX = this.xCoord; - this.oY = this.yCoord; - this.oZ = this.zCoord; - this.issueClientUpdate(); - this.clearTileEntityBuffer(); - } - if (this.mFacing != this.oFacing) { - this.oFacing = this.mFacing; - this.issueBlockUpdate(); - } - if (this.mTickTimer > 20L && this.isElectric()) { - this.mAcceptedAmperes = 0L; - if (this.getOutputVoltage() != this.oOutput) { - this.oOutput = this.getOutputVoltage(); - } - if (this.isEnetOutput() || this.isEnetInput()) { - for (byte i = 0; i < 6; ++i) { - boolean temp = this.isEnergyInputSide(i); - if (temp != this.mActiveEUInputs[i]) { - this.mActiveEUInputs[i] = temp; - } - temp = this.isEnergyOutputSide(i); - if (temp != this.mActiveEUOutputs[i]) { - this.mActiveEUOutputs[i] = temp; - } - } - } - if (this.isEnetOutput() && this.oOutput > 0L) { - final long tOutputVoltage = Math.max(this.oOutput, - this.oOutput + (1 << GT_Utility.getTier(this.oOutput))); - final long tUsableAmperage = Math.min(this.getOutputAmperage(), - (this.getStoredEU() - this.getMinimumStoredEU()) - / tOutputVoltage); - if (tUsableAmperage > 0L) { - final long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork( - this.oOutput, tUsableAmperage, (IEnergyConnected) this); - final int[] mAverageEUOutput = this.mAverageEUOutput; - final int mAverageEUOutputIndex = this.mAverageEUOutputIndex; - mAverageEUOutput[mAverageEUOutputIndex] += (int) tEU; - this.decreaseStoredEU(tEU, true); - } - } - if (this.getEUCapacity() > 0L) { - if (GregTech_API.sMachineFireExplosions && this.getRandomNumber(1000) == 0) { - final Block tBlock = this.getBlockAtSide((byte) this.getRandomNumber(6)); - if (tBlock instanceof BlockFire) { - this.doEnergyExplosion(); - } - } - if (!this.hasValidMetaTileEntity()) { - this.mRunningThroughTick = false; - return; - } - } - } - if (!this.hasValidMetaTileEntity()) { - this.mRunningThroughTick = false; - return; - } - break Label_1743; - } - case 13 : { - ++tCode; - this.updateStatus(); - if (!this.hasValidMetaTileEntity()) { - this.mRunningThroughTick = false; - return; - } - } - case 14 : { - ++tCode; - this.onPostTick((IGregTechTileEntity) this, this.mTickTimer); - if (!this.hasValidMetaTileEntity()) { - this.mRunningThroughTick = false; - return; - } - } - case 15 : { - ++tCode; - if (!aSideServer) { - break; - } - if (this.mTickTimer % 10L == 0L && this.mSendClientData) { - final IGT_NetworkHandler nw = GT_Values.NW; - final World worldObj = this.worldObj; - final int xCoord = this.xCoord; - final short n = (short) this.yCoord; - final int zCoord = this.zCoord; - final short mid = this.mID; - final int n2 = this.mCoverSides[0]; - final int n3 = this.mCoverSides[1]; - final int n4 = this.mCoverSides[2]; - final int n5 = this.mCoverSides[3]; - final int n6 = this.mCoverSides[4]; - final int n7 = this.mCoverSides[5]; - final byte oTextureData = (byte) ((this.mFacing & 0x7) | (this.mActive ? 8 : 0) - | (this.mRedstone ? 16 : 0) | (this.mLockUpgrade ? 32 : 0)); - this.oTextureData = oTextureData; - final byte oTexturePage = (byte) ((this.hasValidMetaTileEntity() - && this.mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) - ? ((GT_MetaTileEntity_Hatch) this.mMetaTileEntity).getTexturePage() - : 0); - this.oTexturePage = oTexturePage; - final byte oUpdateData = (byte) (this.hasValidMetaTileEntity() - ? this.mMetaTileEntity.getUpdateData() - : 0); - this.oUpdateData = oUpdateData; - final byte oRedstoneData = (byte) (((this.mSidedRedstone[0] > 0) ? 1 : 0) - | ((this.mSidedRedstone[1] > 0) ? 2 : 0) - | ((this.mSidedRedstone[2] > 0) ? 4 : 0) - | ((this.mSidedRedstone[3] > 0) ? 8 : 0) - | ((this.mSidedRedstone[4] > 0) ? 16 : 0) - | ((this.mSidedRedstone[5] > 0) ? 32 : 0)); - this.oRedstoneData = oRedstoneData; - final byte mColor = this.mColor; - this.oColor = mColor; - nw.sendPacketToAllPlayersInRange(worldObj, - (GT_Packet) new GT_Packet_TileEntity(xCoord, n, zCoord, mid, n2, n3, n4, n5, n6, - n7, oTextureData, oTexturePage, oUpdateData, oRedstoneData, mColor), - this.xCoord, this.zCoord); - this.mSendClientData = false; - } - if (this.mTickTimer > 10L) { - byte tData = (byte) ((this.mFacing & 0x7) | (this.mActive ? 8 : 0) - | (this.mRedstone ? 16 : 0) | (this.mLockUpgrade ? 32 : 0)); - if (tData != this.oTextureData) { - this.sendBlockEvent((byte) 0, this.oTextureData = tData); - } - tData = this.mMetaTileEntity.getUpdateData(); - if (tData != this.oUpdateData) { - this.sendBlockEvent((byte) 1, this.oUpdateData = tData); - } - if (this.mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { - tData = ((GT_MetaTileEntity_Hatch) this.mMetaTileEntity).getTexturePage(); - if (tData != this.oTexturePage) { - final byte b = 1; - final byte oTexturePage2 = tData; - this.oTexturePage = oTexturePage2; - this.sendBlockEvent(b, (byte) (oTexturePage2 | 0x80)); - } - } - if (this.mColor != this.oColor) { - this.sendBlockEvent((byte) 2, this.oColor = this.mColor); - } - tData = (byte) (((this.mSidedRedstone[0] > 0) ? 1 : 0) - | ((this.mSidedRedstone[1] > 0) ? 2 : 0) - | ((this.mSidedRedstone[2] > 0) ? 4 : 0) - | ((this.mSidedRedstone[3] > 0) ? 8 : 0) - | ((this.mSidedRedstone[4] > 0) ? 16 : 0) - | ((this.mSidedRedstone[5] > 0) ? 32 : 0)); - if (tData != this.oRedstoneData) { - this.sendBlockEvent((byte) 3, this.oRedstoneData = tData); - } - if (this.mLightValue != this.oLightValue) { - this.worldObj.setLightValue(EnumSkyBlock.Block, this.xCoord, this.yCoord, - this.zCoord, (int) this.mLightValue); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, - this.zCoord); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord + 1, this.yCoord, - this.zCoord); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord - 1, this.yCoord, - this.zCoord); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord + 1, - this.zCoord); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord - 1, - this.zCoord); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, - this.zCoord + 1); - this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, - this.zCoord - 1); - this.issueTextureUpdate(); - this.sendBlockEvent((byte) 7, this.oLightValue = this.mLightValue); - } - } - if (this.mNeedsBlockUpdate) { - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, - this.getBlockOffset(0, 0, 0)); - this.mNeedsBlockUpdate = false; - break; - } - break; - } - } - } - } - } catch (Throwable e) { - e.printStackTrace(GT_Log.err); - } - if (aSideServer && this.hasValidMetaTileEntity()) { - tTime = System.currentTimeMillis() - tTime; - if (this.mTimeStatistics.length > 0) { - this.mTimeStatistics[this.mTimeStatisticsIndex = (this.mTimeStatisticsIndex + 1) - % this.mTimeStatistics.length] = (int) tTime; - } - if (tTime > 0L && tTime > GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING && this.mTickTimer > 1000L - && this.getMetaTileEntity().doTickProfilingMessageDuringThisTick() - && this.mLagWarningCount++ < 10) { - System.out.println("WARNING: Possible Lag Source at [" + this.xCoord + ", " + this.yCoord + ", " - + this.zCoord + "] in Dimension " + this.worldObj.provider.dimensionId + " with " + tTime - + "ms caused by an instance of " + this.getMetaTileEntity().getClass()); - } - } - final boolean mWorkUpdate = false; - this.mRunningThroughTick = mWorkUpdate; - this.mInventoryChanged = mWorkUpdate; - this.mWorkUpdate = mWorkUpdate; - } - - private void onFirstTick(TilePoweredGT tilePoweredGT) { - // TODO Auto-generated method stub - - } - - private boolean hasValidMetaTileEntity() { - return Utils.invertBoolean(isDead()); - } - - public void issueBlockUpdate() { - this.mNeedsBlockUpdate = true; - } - - public void issueClientUpdate() { - this.mSendClientData = true; - } - - public Packet getDescriptionPacket() { - this.issueClientUpdate(); - return null; - } - -} -*/ \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java deleted file mode 100644 index 835d9da2cd..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java +++ /dev/null @@ -1,307 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -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; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.inventories.InventoryCircuitProgrammer; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.slots.SlotIntegratedCircuit; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class TileEntityCircuitProgrammer extends TileEntity implements ISidedInventory { - - private int tickCount = 0; - private final InventoryCircuitProgrammer inventoryContents; - private String customName; - public int locationX; - public int locationY; - public int locationZ; - private int aCurrentMode = 0; - - public TileEntityCircuitProgrammer() { - this.inventoryContents = new InventoryCircuitProgrammer(); - this.setTileLocation(); - } - - public boolean setTileLocation() { - if (this.hasWorldObj()) { - if (!this.getWorldObj().isRemote) { - this.locationX = this.xCoord; - this.locationY = this.yCoord; - this.locationZ = this.zCoord; - return true; - } - } - return false; - } - - //Rename to hasCircuitToConfigure - public final boolean hasCircuitToConfigure() { - for (ItemStack i : this.getInventory().getInventory()) { - if (i == null) { - continue; - } - else { - return true; - } - } - return false; - } - - public InventoryCircuitProgrammer getInventory() { - return this.inventoryContents; - } - - public boolean addOutput() { - ItemStack[] aInputs = this.getInventory().getInventory().clone(); - //Check if there is output in slot. - Boolean hasOutput = false; - if (aInputs[25] != null) { - hasOutput = true; - } - AutoMap aValidSlots = new AutoMap(); - int aSlotCount = 0; - for (ItemStack i : aInputs) { - if (i != null) { - aValidSlots.put(aSlotCount); - } - aSlotCount++; - } - for (int e : aValidSlots) { - boolean doAdd = false; - ItemStack g = this.getStackInSlot(e); - int aSize = 0; - ItemStack aInputStack = null; - int aTypeInSlot = SlotIntegratedCircuit.isRegularProgrammableCircuit(g); - if (aTypeInSlot >= 0 && g != null) { - // No Existing Output - if (!hasOutput) { - aSize = g.stackSize; - doAdd = true; - } - // Existing Output - else { - ItemStack f = this.getStackInSlot(25); - int aTypeInCheckedSlot = SlotIntegratedCircuit.isRegularProgrammableCircuit(f); - // Check that the Circuit in the Output slot is not null and the same type as the circuit input. - if (aTypeInCheckedSlot >= 0 && (aTypeInSlot == aTypeInCheckedSlot) && f != null) { - if (g.getItem() == f.getItem() && f.getItemDamage() == e) { - aSize = f.stackSize + g.stackSize; - if (aSize > 64) { - aInputStack = g.copy(); - aInputStack.stackSize = (aSize-64); - } - doAdd = true; - } - } - } - if (doAdd) { - // Check Circuit Type - ItemStack aOutput; - if (aTypeInSlot == 0) { - aOutput = CI.getNumberedCircuit(e); - } - else if (aTypeInSlot == 1) { - aOutput = CI.getNumberedBioCircuit(e); - } - else if (aTypeInSlot == 2) { - aOutput = CI.getNumberedAdvancedCircuit(e); - } - else { - aOutput = null; - } - - if (aOutput != null) { - aOutput.stackSize = aSize; - this.setInventorySlotContents(e, aInputStack); - this.setInventorySlotContents(25, aOutput); - return true; - } - } - } - continue; - } - return false; - } - - @Override - public void updateEntity() { - try{ - if (!this.worldObj.isRemote) { - if (tickCount % 10 == 0) { - if (hasCircuitToConfigure()) { - this.addOutput(); - this.markDirty(); - } - } - this.tickCount++; - } - } - catch (final Throwable t){} - } - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - super.writeToNBT(nbt); - // Utils.LOG_WARNING("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - nbt.setInteger("aCurrentMode", aCurrentMode); - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - super.readFromNBT(nbt); - // Utils.LOG_WARNING("Trying to read NBT data from TE."); - this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - aCurrentMode = nbt.getInteger("aCurrentMode"); - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return this.getInventory().getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - final int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r=0; r= 0 && p_102007_1_ <= 24; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return p_102008_1_ == 25; - } - - public String getCustomName() { - return this.customName; - } - - public void setCustomName(final String customName) { - this.customName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.circuitprogrammer"; - } - - @Override - public boolean hasCustomInventoryName() { - return (this.customName != null) && !this.customName.equals(""); - } - - @Override - public Packet getDescriptionPacket() { - final NBTTagCompound tag = new NBTTagCompound(); - this.writeToNBT(tag); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); - } - - @Override - public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity pkt) { - final NBTTagCompound tag = pkt.func_148857_g(); - this.readFromNBT(tag); - } - - public boolean onScrewdriverRightClick(byte side, EntityPlayer player, int x, int y, int z) { - try { - if (aCurrentMode == 24) { - aCurrentMode = 0; - } - else { - aCurrentMode++; - } - PlayerUtils.messagePlayer(player, "Now configuring units for type "+aCurrentMode+"."); - return true; - } - catch (Throwable t) { - return false; - } - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java deleted file mode 100644 index db93e9c4fc..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java +++ /dev/null @@ -1,359 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.inventories.Inventory_DecayablesChest; -import gtPlusPlus.core.item.materials.DustDecayable; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class TileEntityDecayablesChest extends TileEntity implements ISidedInventory { - - private final Inventory_DecayablesChest inventoryContents; - - /** Determines if the check for adjacent chests has taken place. */ - public boolean adjacentChestChecked; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityDecayablesChest adjacentChestZNeg; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityDecayablesChest adjacentChestXPos; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityDecayablesChest adjacentChestXNeg; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityDecayablesChest adjacentChestZPos; - /** The current angle of the lid (between 0 and 1) */ - public float lidAngle; - /** The angle of the lid last tick */ - public float prevLidAngle; - /** The number of players currently using this chest */ - public int numPlayersUsing; - - private String customName; - - private int cachedChestType; - private int tickCount = 0; - - public TileEntityDecayablesChest() { - this.inventoryContents = new Inventory_DecayablesChest(); - } - - public Inventory_DecayablesChest getInventory() { - return this.inventoryContents; - } - - @Override - public void updateEntity() { - - // Try do chesty stuff - try { - this.updateEntityChest(); - } catch (Throwable t) { - - } - - try { - if (!this.worldObj.isRemote) { - this.tickCount++; - if ((this.tickCount % 10) == 0) { - cachedChestType = 1; - } - - if ((this.tickCount % 20) == 0) { - for (ItemStack inv : this.getInventory().getInventory()) { - if (inv == null) { - continue; - } - if (inv.getItem() instanceof DustDecayable) { - DustDecayable D = (DustDecayable) inv.getItem(); - tryUpdateDecayable(D, inv, this.worldObj); - } - } - - } - updateSlots(); - } - } catch (final Throwable t) { - } - } - - public void tryUpdateDecayable(final DustDecayable b, ItemStack iStack, final World world) { - if (world == null || iStack == null) { - return; - } - if (world.isRemote) { - return; - } - - boolean a1, a2; - int u = 0; - a1 = b.isTicking(world, iStack); - a2 = false; - int SECONDS_TO_PROCESS = 1; - while (u < (20 * SECONDS_TO_PROCESS)) { - if (!a1) { - break; - } - a1 = b.isTicking(world, iStack); - a2 = b.tickItemTag(world, iStack); - u++; - } - Logger.MACHINE_INFO("| "+b.getUnlocalizedName()+" | "+a1+"/"+a2); - - if (!a1 && !a2) { - ItemStack replacement = ItemUtils.getSimpleStack(b.getDecayResult()); - replacement.stackSize = 1; - //iStack = replacement.copy(); - for (int fff = 0; fff < this.inventoryContents.getSizeInventory(); fff++) { - if (this.inventoryContents.getStackInSlot(fff) == iStack) { - this.inventoryContents.setInventorySlotContents(fff, replacement.copy()); - } - } - - updateSlots(); - this.inventoryContents. - markDirty(); - } - } - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - super.writeToNBT(nbt); - // Utils.LOG_WARNING("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - super.readFromNBT(nbt); - // Utils.LOG_WARNING("Trying to read NBT data from TE."); - this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return this.getInventory().getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - if (this.numPlayersUsing < 0) { - this.numPlayersUsing = 0; - } - if (!this.worldObj.isRemote) { - this.numPlayersUsing++; - cachedChestType = 1; - } - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - if (!this.worldObj.isRemote) { - this.numPlayersUsing--; - cachedChestType = 1; - } - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - final int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r = 0; r < this.getInventory().getSizeInventory(); r++) { - accessibleSides[r] = r; - } - return accessibleSides; - - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return this.getInventory().isItemValidForSlot(0, p_102007_2_); - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return this.getInventory().isItemValidForSlot(0, p_102008_2_); - } - - public String getCustomName() { - return this.customName; - } - - public void setCustomName(final String customName) { - this.customName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.DecayablesChest"; - } - - @Override - public boolean hasCustomInventoryName() { - return (this.customName != null) && !this.customName.equals(""); - } - - /** - * Causes the TileEntity to reset all it's cached values for it's container - * Block, metadata and in the case of chests, the adjacent chest check - */ - public void updateContainingBlockInfo() { - super.updateContainingBlockInfo(); - this.adjacentChestChecked = false; - } - - /** - * Performs the check for adjacent chests to determine if this chest is double - * or not. - */ - public void checkForAdjacentChests() { - if (!this.adjacentChestChecked) { - this.adjacentChestChecked = true; - this.adjacentChestZNeg = null; - this.adjacentChestXPos = null; - this.adjacentChestXNeg = null; - this.adjacentChestZPos = null; - } - } - - public void updateEntityChest() { - float f; - this.prevLidAngle = this.lidAngle; - f = 0.04F; - double d2; - if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F && this.adjacentChestZNeg == null - && this.adjacentChestXNeg == null) { - double d1 = (double) this.xCoord + 0.5D; - d2 = (double) this.zCoord + 0.5D; - this.worldObj.playSoundEffect(d1, (double) this.yCoord + 0.5D, d2, "random.chestopen", 0.5F, - this.worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - - if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F) { - float f1 = this.lidAngle; - if (this.numPlayersUsing > 0) { - //this.lidAngle += f; - this.lidAngle += (float) (f * (1 + 0.10 * 0.01)); - } else { - //this.lidAngle -= f; - this.lidAngle -= (float) (f * (1 + 0.10 * 0.01)); - } - if (this.lidAngle > 1.0F) { - this.lidAngle = 1.0F; - } - float f2 = 0.5F; - if (this.lidAngle < f2 && f1 >= f2 && this.adjacentChestZNeg == null && this.adjacentChestXNeg == null) { - d2 = (double) this.xCoord + 0.5D; - double d0 = (double) this.zCoord + 0.5D; - this.worldObj.playSoundEffect(d2, (double) this.yCoord + 0.5D, d0, "random.chestclosed", 0.5F, - this.worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - - if (this.lidAngle < 0.0F) { - this.lidAngle = 0.0F; - } - } - } - - /** - * Called when a client event is received with the event number and argument, - * see World.sendClientEvent - */ - public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { - if (p_145842_1_ == 1) - { - this.numPlayersUsing = p_145842_2_; - return true; - } - else - { - return super.receiveClientEvent(p_145842_1_, p_145842_2_); - } - } - - /** - * invalidates a tile entity - */ - public final void invalidate() { - super.invalidate(); - cachedChestType = 1; - this.updateContainingBlockInfo(); - this.checkForAdjacentChests(); - } - - private final int updateSlots() { - //Have slots changed? - if (cachedChestType == 0) { - return 0; - } - ItemUtils.organiseInventory(getInventory()); - cachedChestType = 0; - return cachedChestType; - - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java deleted file mode 100644 index 0c428537cb..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java +++ /dev/null @@ -1,359 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.inventories.Inventory_EggBox; -import gtPlusPlus.core.item.general.ItemGiantEgg; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class TileEntityEggBox extends TileEntity implements ISidedInventory { - - private final Inventory_EggBox inventoryContents; - - /** Determines if the check for adjacent chests has taken place. */ - public boolean adjacentChestChecked; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityEggBox adjacentChestZNeg; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityEggBox adjacentChestXPos; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityEggBox adjacentChestXNeg; - /** Contains the chest tile located adjacent to this one (if any) */ - public TileEntityEggBox adjacentChestZPos; - /** The current angle of the lid (between 0 and 1) */ - public float lidAngle; - /** The angle of the lid last tick */ - public float prevLidAngle; - /** The number of players currently using this chest */ - public int numPlayersUsing; - - private String customName; - - private int cachedChestType; - private int tickCount = 0; - - public TileEntityEggBox() { - this.inventoryContents = new Inventory_EggBox(); - } - - public Inventory_EggBox getInventory() { - return this.inventoryContents; - } - - @Override - public void updateEntity() { - - // Try do chesty stuff - try { - this.updateEntityChest(); - } catch (Throwable t) { - - } - - try { - if (!this.worldObj.isRemote) { - this.tickCount++; - if ((this.tickCount % 10) == 0) { - cachedChestType = 1; - } - - if ((this.tickCount % 20) == 0) { - for (ItemStack inv : this.getInventory().getInventory()) { - if (inv == null) { - continue; - } - if (inv.getItem() instanceof ItemGiantEgg) { - ItemGiantEgg D = (ItemGiantEgg) inv.getItem(); - tryUpdateDecayable(D, inv, this.worldObj); - } - } - - } - updateSlots(); - } - } catch (final Throwable t) { - } - } - - public void tryUpdateDecayable(final ItemGiantEgg d, ItemStack iStack, final World world) { - if (world == null || iStack == null) { - return; - } - if (world.isRemote) { - return; - } - - boolean a1, a2; - int u = 0; - a1 = d.isTicking(world, iStack); - a2 = false; - int SECONDS_TO_PROCESS = 1; - while (u < (20 * SECONDS_TO_PROCESS)) { - if (!a1) { - break; - } - a1 = d.isTicking(world, iStack); - a2 = d.tickItemTag(world, iStack); - u++; - } - Logger.MACHINE_INFO("| "+d.getUnlocalizedName()+" | "+a1+"/"+a2); - - if (!a1 && !a2) { - ItemStack replacement = ItemUtils.getSimpleStack(d.getHatchResult(), 1); - replacement.stackSize = 1; - //iStack = replacement.copy(); - for (int fff = 0; fff < this.inventoryContents.getSizeInventory(); fff++) { - if (this.inventoryContents.getStackInSlot(fff) == iStack) { - this.inventoryContents.setInventorySlotContents(fff, replacement.copy()); - } - } - - updateSlots(); - this.inventoryContents. - markDirty(); - } - } - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - super.writeToNBT(nbt); - // Utils.LOG_WARNING("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - super.readFromNBT(nbt); - // Utils.LOG_WARNING("Trying to read NBT data from TE."); - this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return this.getInventory().getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - if (this.numPlayersUsing < 0) { - this.numPlayersUsing = 0; - } - if (!this.worldObj.isRemote) { - this.numPlayersUsing++; - cachedChestType = 1; - } - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - if (!this.worldObj.isRemote) { - this.numPlayersUsing--; - cachedChestType = 1; - } - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - final int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r = 0; r < this.getInventory().getSizeInventory(); r++) { - accessibleSides[r] = r; - } - return accessibleSides; - - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return this.getInventory().isItemValidForSlot(0, p_102007_2_); - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return this.getInventory().isItemValidForSlot(0, p_102008_2_); - } - - public String getCustomName() { - return this.customName; - } - - public void setCustomName(final String customName) { - this.customName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.EggBox"; - } - - @Override - public boolean hasCustomInventoryName() { - return (this.customName != null) && !this.customName.equals(""); - } - - /** - * Causes the TileEntity to reset all it's cached values for it's container - * Block, metadata and in the case of chests, the adjacent chest check - */ - public void updateContainingBlockInfo() { - super.updateContainingBlockInfo(); - this.adjacentChestChecked = false; - } - - /** - * Performs the check for adjacent chests to determine if this chest is double - * or not. - */ - public void checkForAdjacentChests() { - if (!this.adjacentChestChecked) { - this.adjacentChestChecked = true; - this.adjacentChestZNeg = null; - this.adjacentChestXPos = null; - this.adjacentChestXNeg = null; - this.adjacentChestZPos = null; - } - } - - public void updateEntityChest() { - float f; - this.prevLidAngle = this.lidAngle; - f = 0.04F; - double d2; - if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F && this.adjacentChestZNeg == null - && this.adjacentChestXNeg == null) { - double d1 = (double) this.xCoord + 0.5D; - d2 = (double) this.zCoord + 0.5D; - this.worldObj.playSoundEffect(d1, (double) this.yCoord + 0.5D, d2, "random.chestopen", 0.5F, - this.worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - - if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F) { - float f1 = this.lidAngle; - if (this.numPlayersUsing > 0) { - //this.lidAngle += f; - this.lidAngle += (float) (f * (1 + 0.10 * 0.01)); - } else { - //this.lidAngle -= f; - this.lidAngle -= (float) (f * (1 + 0.10 * 0.01)); - } - if (this.lidAngle > 1.0F) { - this.lidAngle = 1.0F; - } - float f2 = 0.5F; - if (this.lidAngle < f2 && f1 >= f2 && this.adjacentChestZNeg == null && this.adjacentChestXNeg == null) { - d2 = (double) this.xCoord + 0.5D; - double d0 = (double) this.zCoord + 0.5D; - this.worldObj.playSoundEffect(d2, (double) this.yCoord + 0.5D, d0, "random.chestclosed", 0.5F, - this.worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - - if (this.lidAngle < 0.0F) { - this.lidAngle = 0.0F; - } - } - } - - /** - * Called when a client event is received with the event number and argument, - * see World.sendClientEvent - */ - public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { - if (p_145842_1_ == 1) - { - this.numPlayersUsing = p_145842_2_; - return true; - } - else - { - return super.receiveClientEvent(p_145842_1_, p_145842_2_); - } - } - - /** - * invalidates a tile entity - */ - public final void invalidate() { - super.invalidate(); - cachedChestType = 1; - this.updateContainingBlockInfo(); - this.checkForAdjacentChests(); - } - - private final int updateSlots() { - //Have slots changed? - if (cachedChestType == 0) { - return 0; - } - ItemUtils.organiseInventory(getInventory()); - cachedChestType = 0; - return cachedChestType; - - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java deleted file mode 100644 index 49fde8ee64..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import java.util.UUID; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -public class TileEntityFirepit extends TileEntity{ - - private UUID ownerUUID; - - public UUID getOwnerUUID() { - return this.ownerUUID; - } - - public void setOwnerUUID(final UUID ownerUUID) { - this.ownerUUID = ownerUUID; - this.markDirty(); - } - - @Override - public void writeToNBT(final NBTTagCompound tagCompound) { - super.writeToNBT(tagCompound); - - final UUID ownerUUID = this.getOwnerUUID(); - if (ownerUUID != null){ - tagCompound.setLong("OwnerUUIDMost", ownerUUID.getMostSignificantBits()); - tagCompound.setLong("OwnerUUIDLeast", ownerUUID.getLeastSignificantBits()); - } - } - - @Override - public void readFromNBT(final NBTTagCompound tagCompound) { - super.readFromNBT(tagCompound); - - this.setOwnerUUID(new UUID(tagCompound.getLong("OwnerUUIDMost"), tagCompound.getLong("OwnerUUIDLeast"))); - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java deleted file mode 100644 index beff269428..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java +++ /dev/null @@ -1,410 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.inventories.InventoryFishTrap; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraftforge.common.FishingHooks; - -public class TileEntityFishTrap extends TileEntity implements ISidedInventory { - - private int tickCount = 0; - private boolean isInWater = false; - private final InventoryFishTrap inventoryContents; - private String customName; - private int locationX; - private int locationY; - private int locationZ; - private int waterSides = 0; - private int baseTickRate = 600 * 5; - - public TileEntityFishTrap() { - this.inventoryContents = new InventoryFishTrap();// number of slots - - // without product - // slot - this.setTileLocation(); - } - - public boolean setTileLocation() { - if (this.hasWorldObj()) { - if (!this.getWorldObj().isRemote) { - this.locationX = this.xCoord; - this.locationY = this.yCoord; - this.locationZ = this.zCoord; - return true; - } - } - return false; - } - - public final boolean isSurroundedByWater() { - this.setTileLocation(); - final Block[] surroundingBlocks = new Block[6]; - if (this.hasWorldObj()) { - if (!this.getWorldObj().isRemote) { - surroundingBlocks[0] = this.worldObj.getBlock(this.locationX, this.locationY + 1, this.locationZ); // Above - surroundingBlocks[1] = this.worldObj.getBlock(this.locationX, this.locationY - 1, this.locationZ); // Below - surroundingBlocks[2] = this.worldObj.getBlock(this.locationX + 1, this.locationY, this.locationZ); - surroundingBlocks[3] = this.worldObj.getBlock(this.locationX - 1, this.locationY, this.locationZ); - surroundingBlocks[4] = this.worldObj.getBlock(this.locationX, this.locationY, this.locationZ + 1); - surroundingBlocks[5] = this.worldObj.getBlock(this.locationX, this.locationY, this.locationZ - 1); - int waterCount = 0; - int trapCount = 0; - for (final Block checkBlock : surroundingBlocks) { - if ((checkBlock == Blocks.water) || (checkBlock == Blocks.flowing_water) - || checkBlock.getUnlocalizedName().toLowerCase().contains("water") - || (checkBlock == ModBlocks.blockFishTrap)) { - if (checkBlock != ModBlocks.blockFishTrap) { - waterCount++; - } - else { - waterCount++; - trapCount++; - } - } - } - if ((waterCount >= 2) && (trapCount <= 4)) { - int aCheck = trapCount + waterCount; - this.waterSides = MathUtils.balance(aCheck, 0, 6); - Logger.MACHINE_INFO("Valid Trap. "+waterCount+" | "+(this.tickCount/20)+"/"+(this.baseTickRate/20)); - return true; - } - else if ((waterCount >= 2) && (trapCount > 4)) { - Logger.MACHINE_INFO("Too many fish traps surrounding this one."); - Logger.MACHINE_INFO("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY - + "] z[" + this.locationZ + "] (Ticking for loot every " + this.baseTickRate + " ticks)"); - } - } - } - // Utils.LOG_MACHINE_INFO("Error finding water"); - return false; - } - - public InventoryFishTrap getInventory() { - return this.inventoryContents; - } - - public boolean tryAddLoot() { - if (this.getInventory().getInventory() != null) { - int checkingSlot = 0; - ItemUtils.organiseInventory(getInventory()); - final ItemStack loot = this.generateLootForFishTrap().copy(); - try { - //Utils.LOG_MACHINE_INFO("Trying to add "+loot.getDisplayName()+" | "+loot.getItemDamage()); - for (final ItemStack contents : this.getInventory().getInventory()) { - - - if (GT_Utility.areStacksEqual(loot, contents)){ - if (contents.stackSize < contents.getMaxStackSize()) { - //Utils.LOG_MACHINE_INFO("3-Trying to add one more "+loot.getDisplayName()+"meta: "+loot.getItemDamage()+" to an existing stack of "+contents.getDisplayName()+" with a size of "+contents.stackSize); - contents.stackSize++; - this.markDirty(); - return true; - } - } - checkingSlot++; - } - checkingSlot = 0; - for (final ItemStack contents : this.getInventory().getInventory()) { - if (contents == null) { - //Utils.LOG_MACHINE_INFO("Adding Item To Empty Slot. "+(checkingSlot+1)); - this.getInventory().setInventorySlotContents(checkingSlot, loot); - this.markDirty(); - return true; - } - checkingSlot++; - } - } - catch (final NullPointerException n) { - } - } - this.markDirty(); - return false; - } - - private ItemStack generateLootForFishTrap() { - final int lootWeight = MathUtils.randInt(0, 100); - ItemStack loot; - if (lootWeight <= 5) { - loot = ItemUtils.getSimpleStack(Items.slime_ball); - } - else if (lootWeight <= 10) { - loot = ItemUtils.getSimpleStack(Items.bone); - } - else if (lootWeight <= 15) { - loot = ItemUtils.getSimpleStack(Blocks.sand); - } - else if (lootWeight <= 20) { - loot = ItemUtils.simpleMetaStack(Items.dye, 0, 1); - } - // Junk Loot - else if (lootWeight <= 23) { - if (LoadedMods.PamsHarvestcraft) { - loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(seaweed, 1); - } - else { - loot = ItemUtils.getSimpleStack(Blocks.dirt); - } - } - // Pam Fish - else if (lootWeight <= 99) { - final Random xstr = new Random(); - loot = FishingHooks.getRandomFishable(xstr, 100); - } - - else if (lootWeight == 100){ - final int rareLoot = MathUtils.randInt(1, 10); - if (rareLoot <= 4) { - loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetIron", 1); - if (loot == null){ - loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotIron", 1); - } - } - else if (rareLoot <= 7) { - loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetGold", 1); - if (loot == null){ - loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotGold", 1); - } - } - else if (rareLoot <= 9){ - loot = ItemUtils.getSimpleStack(Items.emerald); - } - else { - loot = ItemUtils.getSimpleStack(Items.diamond); - } - } - else { - loot = ItemUtils.getSimpleStack(Blocks.diamond_ore); - } - loot.stackSize=1; - Logger.MACHINE_INFO("Adding x"+loot.stackSize+" "+loot.getDisplayName()+"."); - return loot; - } - - @Override - public void updateEntity() { - try{ - if (!this.worldObj.isRemote) { - this.tickCount++; - //Logger.MACHINE_INFO("Ticking "+this.tickCount); - // Check if the Tile is within water once per second. - if ((this.tickCount % 20) == 0) { - this.isInWater = this.isSurroundedByWater(); - } - - if (this.isInWater) { - this.calculateTickrate(); - } - - // Try add some loot once every 30 seconds. - if (this.tickCount >= this.baseTickRate) { - if (this.isInWater) { - // Add loot - Logger.MACHINE_INFO("Adding Loot to the fishtrap at x["+this.locationX+"] y["+this.locationY+"] z["+this.locationZ+"] (Ticking for loot every "+this.baseTickRate+" ticks)"); - - int aExtraLootChance = MathUtils.randInt(1, 1000); - if (aExtraLootChance >= 999) { - this.tryAddLoot(); - this.tryAddLoot(); - this.tryAddLoot(); - } - else { - this.tryAddLoot(); - } - - this.markDirty(); - } - else { - Logger.MACHINE_INFO("Not in water."); - this.markDirty(); - } - this.tickCount = 0; - } - if (this.tickCount >= (this.baseTickRate + 500)) { - Logger.MACHINE_INFO("Resetting tick counter"); - this.tickCount = 0; - } - - } - } - catch (final Throwable t){} - } - - public void calculateTickrate() { - int water = this.waterSides; - //int variance = (int) ((MathUtils.randInt(-200, 200)/water)*0.5); - if (water <= 1) { - this.baseTickRate = 0; - } else if (water == 2) { - this.baseTickRate = 6800; - } else if (water == 3) { - this.baseTickRate = 5600; - } else if (water == 4) { - this.baseTickRate = 4400; - } else if (water == 5) { - this.baseTickRate = 3200; - } else { - this.baseTickRate = 1750; - } - if (water > 1) { - //this.baseTickRate += variance; - } - } - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - super.writeToNBT(nbt); - // Utils.LOG_MACHINE_INFO("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - super.readFromNBT(nbt); - // Utils.LOG_MACHINE_INFO("Trying to read NBT data from TE."); - this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - } - - final static String prefix = "food"; - final static String suffix = "raw"; - final static String seaweed = "cropSeaweed"; - final static String greenheartFish = "Greenheartfish"; - private static final String[] harvestcraftFish = { "Anchovy", "Bass", "Carp", "Catfish", "Charr", "Clam", "Crab", - "Crayfish", "Eel", "Frog", "Grouper", "Herring", "Jellyfish", "Mudfish", "Octopus", "Perch", "Scallop", - "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walleye" }; - - public static void pamsHarvestCraftCompat() { - for (int i = 0; i < harvestcraftFish.length; i++) { - - } - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return this.getInventory().getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - final int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r=0; r 990){ - loot = ItemUtils.getSimpleStack(Items.slime_ball); - } - return loot; - } - - @Override - public void updateEntity(){ - if (!this.worldObj.isRemote){ - - } - } - - public void calculateTickrate(){ - int calculateTickrate = 0; - this.baseTickRate = calculateTickrate; - } - - public boolean anyPlayerInRange(){ - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ - if(!nbt.hasKey(tag)){ - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt){ - super.writeToNBT(nbt); - //Utils.LOG_INFO("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - } - - @Override - public void readFromNBT(final NBTTagCompound nbt){ - super.readFromNBT(nbt); - //Utils.LOG_INFO("Trying to read NBT data from TE."); - this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java deleted file mode 100644 index 9ddf2065bc..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java +++ /dev/null @@ -1,139 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -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; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.*; - -public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler { - - public FluidTank tank = new FluidTank(Integer.MAX_VALUE); - private boolean needsUpdate = false; - private int updateTimer = 0; - - public TileEntityInfiniteFluid() { - } - - @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { - needsUpdate = true; - return this.tank.fill(resource, doFill); - } - - @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { - needsUpdate = true; - return this.tank.drain(resource.amount, doDrain); - } - - @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { - needsUpdate = true; - FluidStack fluid = this.tank.getFluid(); - // return this.tank.drain(maxDrain, doDrain); - if (fluid == null) { - return null; - } - - int drained = maxDrain; - if (fluid.amount < drained) { - drained = fluid.amount; - } - - FluidStack stack = new FluidStack(fluid, drained); - if (doDrain) { - fluid.amount -= drained; - if (fluid.amount <= 0) { - fluid = null; - } - - if (this != null) { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, this.getWorldObj(), this.xCoord, - this.yCoord, this.zCoord, this.tank, 0)); - } - } - return stack; - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) { - return true; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) { - return true; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) { - return new FluidTankInfo[] { this.tank.getInfo() }; - } - - public float getAdjustedVolume() { - needsUpdate = true; - float amount = tank.getFluidAmount(); - float capacity = tank.getCapacity(); - float volume = (amount / capacity) * 0.8F; - return volume; - } - - @Override - public void updateEntity() { - - if (this.tank.getFluid() != null){ - FluidStack bigStorage = this.tank.getFluid(); - bigStorage.amount = this.tank.getCapacity(); - this.tank.setFluid(bigStorage); - } - - if (needsUpdate) { - - if (this.tank.getFluid() != null){ - FluidStack bigStorage = this.tank.getFluid(); - bigStorage.amount = this.tank.getCapacity(); - this.tank.setFluid(bigStorage); - } - - if (updateTimer == 0) { - updateTimer = 10; // every 10 ticks it will send an update - } else { - --updateTimer; - if (updateTimer == 0) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - needsUpdate = false; - } - } - } - } - - @Override - public void readFromNBT(NBTTagCompound tag) { - tank.readFromNBT(tag); - super.readFromNBT(tag); - } - - @Override - public void writeToNBT(NBTTagCompound tag) { - tank.writeToNBT(tag); - super.writeToNBT(tag); - } - - @Override - public Packet getDescriptionPacket() { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - NBTTagCompound tag = pkt.func_148857_g(); - readFromNBT(tag); - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java deleted file mode 100644 index 48f05fe0fd..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java +++ /dev/null @@ -1,285 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import java.util.ArrayList; -import java.util.List; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockDoor; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -public class TileEntityPlayerDoorBase extends TileEntity { - - public boolean mIsOpen = false; - private short mMeta = 0; - private long mTickCounter = 0; - private final Block mBlockType; - private BlockPos mNeighbourDoor; - - public TileEntityPlayerDoorBase(Block aBlock, int meta) { - mBlockType = aBlock; - } - - @Override - public void readFromNBT(NBTTagCompound aNBT) { - super.readFromNBT(aNBT); - this.mIsOpen = aNBT.getBoolean("mIsOpen"); - } - - @Override - public void writeToNBT(NBTTagCompound aNBT) { - super.writeToNBT(aNBT); - aNBT.setBoolean("mIsOpen", mIsOpen); - } - - public int getNeighbourState() { - - if (mNeighbourDoor != null) { - World aWorld = this.worldObj; - if (aWorld != null) { - TileEntity t = aWorld.getTileEntity(mNeighbourDoor.xPos, mNeighbourDoor.yPos, mNeighbourDoor.zPos); - // Custom Door - if (t != null) { - if (t instanceof TileEntityPlayerDoorBase) { - TileEntityPlayerDoorBase d = (TileEntityPlayerDoorBase) t; - if (d.mIsOpen) { - return 100; - } else { - return -100; - } - } else - return -100; - } - // Vanilla Door - else { - Block aBlock = mNeighbourDoor.getBlockAtPos(); - BlockDoor aDoor = (aBlock instanceof BlockDoor ? (BlockDoor) aBlock : null); - if (aDoor != null) { - int i1 = aDoor.func_150012_g(mNeighbourDoor.world, mNeighbourDoor.xPos, mNeighbourDoor.yPos, - mNeighbourDoor.zPos); - if ((i1 & 4) != 0) { - return 100; - } else { - return -100; - } - } - } - } - } - return 0; - } - - AutoMap mNearbyEntityCache = new AutoMap(); - - @Override - public void updateEntity() { - - if (this.getWorldObj().isRemote) { - return; - } - - // Look For Neighbours - if (mTickCounter % 100 == 0 || mTickCounter == 0) { - World aWorld = this.getWorldObj(); - BlockPos aThisPos = new BlockPos(xCoord, yCoord, zCoord, aWorld); - BlockPos[] aNeighbors = new BlockPos[4]; - aNeighbors[0] = aThisPos.getXNeg(); - aNeighbors[1] = aThisPos.getXPos(); - aNeighbors[2] = aThisPos.getZNeg(); - aNeighbors[3] = aThisPos.getZPos(); - boolean aFoundDoor = false; - for (BlockPos b : aNeighbors) { - Block aBlock = aWorld.getBlock(b.xPos, b.yPos, b.zPos); - BlockDoor aDoor = (aBlock instanceof BlockDoor ? (BlockDoor) aBlock : null); - if (aDoor != null) { - mNeighbourDoor = b; - aFoundDoor = true; - if (mMeta == 0) { - TileEntity t = aWorld.getTileEntity(b.xPos, b.yPos, b.zPos); - if (t != null) { - if (t instanceof TileEntityPlayerDoorBase) { - TileEntityPlayerDoorBase d = (TileEntityPlayerDoorBase) t; - if (d.mMeta != 0) { - //Logger.INFO("Found Door with Mode set other than 0, assuming slave role."); - mMeta = -1; - } - else { - //Logger.INFO("Found door with no mode set, assuming we are master."); - mMeta = 1; - } - } - else { - //Logger.INFO("Custom door from another mod, assuming slave role."); - mMeta = -1; - } - } - else { - //Logger.INFO("No Tile Entity found, Door is probably vanilla, assuming slave role."); - mMeta = -1; - } - } - break; - } - } - if (mMeta < 1 && !aFoundDoor) { - //Logger.INFO("Found No Valid Doors around, setting this one to master mode."); - mMeta = 1; - } - } - - World aWorld = this.getWorldObj(); - Block aBlock = aWorld.getBlock(xCoord, yCoord, zCoord); - BlockPos aThisPos = new BlockPos(xCoord, yCoord, zCoord, this.worldObj); - - if (mTickCounter % 20 == 0) { - int x = 0, y = 0, z = 0; - x = this.xCoord; - y = this.yCoord; - z = this.zCoord; - //List aEntityList = aWorld.loadedEntityList; - List aEntityList = new ArrayList(); - Chunk aThisChunk = aWorld.getChunkFromBlockCoords(x, z); - for (List l : aThisChunk.entityLists) { - aEntityList.addAll(l); - } - for (Object o : aEntityList) { - if (o != null) { - if (o instanceof Entity) { - if (o instanceof EntityPlayer) { - continue; - } - else { - Entity e = (Entity) o; - BlockPos p = EntityUtils.findBlockPosUnderEntity(e); - if (p != null) { - int newY = p.yPos+1; - if (e.getDistance(xCoord, yCoord, zCoord) <= 2){ - mNearbyEntityCache.put(e); - } - else if (aThisPos.distanceFrom(p.xPos, newY, p.zPos) <= 2) { - mNearbyEntityCache.put(e); - } - } - } - } - } - } - } - - if (mTickCounter % 4 == 0) { - for (Entity y : mNearbyEntityCache) { - if (y.getDistance(xCoord, yCoord, zCoord) > 2){ - mNearbyEntityCache.remove(y); - } - } - - boolean foundMonster = mNearbyEntityCache.size() > 0; - int aNeighbourDoorState = 0; - if (mNeighbourDoor != null) { - aNeighbourDoorState = getNeighbourState(); - } - BlockDoor aDoor = (aBlock instanceof BlockDoor ? (BlockDoor) aBlock : null); - boolean aPlayers = checkForPlayers(this.getWorldObj()); - - if (aDoor != null) { - //If neighbour state != 0 and we are in slave mode - if (aNeighbourDoorState != 0 && mMeta == -1) { - if (aNeighbourDoorState == 100) { - if (!mIsOpen && !foundMonster) { - //Logger.INFO("Opening Door (Slave)"); - aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, true); - mIsOpen = true; - } - } else if (aNeighbourDoorState == -100 || foundMonster) { - if (mIsOpen) { - //Logger.INFO("Closing Door (Slave)"); - aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, false); - mIsOpen = false; - } - } - //We are master, proceed - } else { - //No redstone found, allow automatic handling - if (aDoor != null && !hasRedstone()) { - //Found a nearby player - if (aPlayers) { - //If we are closed and there are no monsters nearby, open - if (!mIsOpen && !foundMonster) { - //Logger.INFO("Opening Door (Mstr)"); - aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, true); - mIsOpen = true; - } else { - // Logger.INFO("Doing Nothing, Door is in correct state."); - } - //Did not find nearby player - } else { - //If we are open or there is a monster nearby, close. - if (mIsOpen || foundMonster) { - //Logger.INFO("Closing Door (Mstr)"); - aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, false); - mIsOpen = false; - } else { - // Logger.INFO("Doing Nothing, Door is in correct state."); - } - } - } - } - } - - } - super.updateEntity(); - mTickCounter++; - } - - @Override - public int getBlockMetadata() { - return this.mMeta; - } - - public boolean hasRedstone() { - World aWorld = this.worldObj; - if (aWorld != null && !aWorld.isRemote) { - return aWorld.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) - || aWorld.isBlockIndirectlyGettingPowered(xCoord, yCoord + 1, zCoord); - } - return false; - } - - @Override - public Block getBlockType() { - return mBlockType; - } - - @Override - public boolean canUpdate() { - return true; - } - - private boolean checkForPlayers(World aWorld) { - int x = 0, y = 0, z = 0; - x = this.xCoord; - y = this.yCoord; - z = this.zCoord; - EntityPlayer aPlayer = aWorld.getClosestPlayer(x, y, z, 3.5D); - if (aPlayer != null) { - return true; - } - return false; - } - - private short getClosedMeta() { - return 0; - } - - private short getOpenMeta() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java deleted file mode 100644 index 6e18834786..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java +++ /dev/null @@ -1,312 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.block.ModBlocks; - - - -public class TileEntityReverter extends TileEntity -{ - private static final int REVERT_CHANCE = 10; - public int radius = 16; - public int diameter = (8 * this.radius) + 4; - public double requiredPlayerRange = 64.0D; - public Random rand = new Random(); - private int tickCount; - private boolean slowScan; - private int ticksSinceChange; - private Block[] blockData; - private byte[] metaData; - - @Override - public boolean canUpdate(){ - return true; - } - - @Override - public void updateEntity() - { - if (this.anyPlayerInRange()) - { - this.tickCount += 1; - if (this.worldObj.isRemote) - { - final double var1 = this.xCoord + this.worldObj.rand.nextFloat(); - final double var3 = this.yCoord + this.worldObj.rand.nextFloat(); - final double var5 = this.zCoord + this.worldObj.rand.nextFloat(); - - this.worldObj.spawnParticle("enchantmenttable", var1, var3, var5, 0.0D, 0.0D, 0.0D); - if (this.rand.nextInt(5) == 0) - { - this.makeRandomOutline(); - this.makeRandomOutline(); - this.makeRandomOutline(); - } - } - else - { - if ((this.blockData == null) || (this.metaData == null)) - { - this.captureBlockData(); - this.slowScan = true; - } - if ((!this.slowScan) || ((this.tickCount % 20) == 0)) { - if (this.scanAndRevertChanges()) - { - this.slowScan = false; - this.ticksSinceChange = 0; - } - else - { - this.ticksSinceChange += 1; - if (this.ticksSinceChange > 20) { - this.slowScan = true; - } - } - } - } - } - else - { - this.blockData = null; - this.metaData = null; - - this.tickCount = 0; - } - } - - private void makeRandomOutline() - { - this.makeOutline(this.rand.nextInt(12)); - } - - private void makeOutline(final int outline) - { - double sx = this.xCoord; - double sy = this.yCoord; - double sz = this.zCoord; - - double dx = this.xCoord; - double dy = this.yCoord; - double dz = this.zCoord; - switch (outline) - { - case 0: - sx -= this.radius; - dx -= this.radius; - sz -= this.radius; - dz += this.radius + 1; - case 8: - sx -= this.radius; - dx += this.radius + 1; - sz -= this.radius; - dz -= this.radius; - break; - case 1: - case 9: - sx -= this.radius; - dx -= this.radius; - sz -= this.radius; - dz += this.radius + 1; - break; - case 2: - case 10: - sx -= this.radius; - dx += this.radius + 1; - sz += this.radius + 1; - dz += this.radius + 1; - break; - case 3: - case 11: - sx += this.radius + 1; - dx += this.radius + 1; - sz -= this.radius; - dz += this.radius + 1; - break; - case 4: - sx -= this.radius; - dx -= this.radius; - sz -= this.radius; - dz -= this.radius; - break; - case 5: - sx += this.radius + 1; - dx += this.radius + 1; - sz -= this.radius; - dz -= this.radius; - break; - case 6: - sx += this.radius + 1; - dx += this.radius + 1; - sz += this.radius + 1; - dz += this.radius + 1; - break; - case 7: - sx -= this.radius; - dx -= this.radius; - sz += this.radius + 1; - dz += this.radius + 1; - } - switch (outline) - { - case 0: - case 1: - case 2: - case 3: - sy += this.radius + 1; - dy += this.radius + 1; - break; - case 4: - case 5: - case 6: - case 7: - sy -= this.radius; - dy += this.radius + 1; - break; - case 8: - case 9: - case 10: - case 11: - sy -= this.radius; - dy -= this.radius; - } - if (this.rand.nextBoolean()) { - this.drawParticleLine(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, dx, dy, dz); - } else { - this.drawParticleLine(sx, sy, sz, this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D); - } - this.drawParticleLine(sx, sy, sz, dx, dy, dz); - } - - protected void drawParticleLine(final double srcX, final double srcY, final double srcZ, final double destX, final double destY, final double destZ) - { - final int particles = 16; - for (int i = 0; i < particles; i++) - { - final double trailFactor = i / (particles - 1.0D); - - final double tx = srcX + ((destX - srcX) * trailFactor) + (this.rand.nextFloat() * 0.005D); - final double ty = srcY + ((destY - srcY) * trailFactor) + (this.rand.nextFloat() * 0.005D); - final double tz = srcZ + ((destZ - srcZ) * trailFactor) + (this.rand.nextFloat() * 0.005D); - this.worldObj.spawnParticle("portal", tx, ty, tz, 0.0D, 0.0D, 0.0D); - } - } - - private boolean scanAndRevertChanges() - { - int index = 0; - boolean reverted = false; - for (int x = -this.radius; x <= this.radius; x++) { - for (int y = -this.radius; y <= this.radius; y++) { - for (int z = -this.radius; z <= this.radius; z++) - { - final Block blockID = this.worldObj.getBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z); - final byte meta = (byte)this.worldObj.getBlockMetadata(this.xCoord + x, this.yCoord + y, this.zCoord + z); - if (this.blockData[index] != blockID) { - if (this.revertBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z, blockID, meta, this.blockData[index], this.metaData[index])) - { - reverted = true; - } - else - { - this.blockData[index] = blockID; - this.metaData[index] = meta; - } - } - index++; - } - } - } - return reverted; - } - - private boolean revertBlock(final int x, final int y, final int z, final Block thereBlockID, final byte thereMeta, final Block replaceBlockID, byte replaceMeta) - { - /*if ((thereBlockID == Blocks.air) && (!replaceBlockID.getMaterial().blocksMovement())) - { - System.out.println("Not replacing block " + replaceBlockID + " because it doesn't block movement"); - - return false; - }*/ - if (this.isUnrevertable(thereBlockID, thereMeta, replaceBlockID, replaceMeta)) { - return false; - } - if (this.rand.nextInt(5) == 0) - { - if (replaceBlockID != Blocks.air) - { - //replaceBlockID = null; - replaceMeta = 4; - } - this.worldObj.setBlock(x, y, z, replaceBlockID, replaceMeta, 2); - if (thereBlockID == Blocks.air) - { - this.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(replaceBlockID) + (replaceMeta << 12)); - } - else if (replaceBlockID == Blocks.air) - { - this.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(thereBlockID) + (thereMeta << 12)); - thereBlockID.dropBlockAsItem(this.worldObj, x, y, z, thereMeta, 0); - } - } - return true; - } - - private boolean isUnrevertable(final Block thereBlockID, final byte thereMeta, final Block replaceBlockID, final byte replaceMeta) - { - if ((thereBlockID == ModBlocks.blockGriefSaver) || (replaceBlockID == ModBlocks.blockGriefSaver)) { - return true; - } - /*if (((thereBlockID == towerTranslucent) && (thereMeta != 4)) || ((replaceBlockID == towerTranslucent) && (replaceMeta != 4))) { - return true; - }*/ - if ((thereBlockID == Blocks.redstone_lamp) && (replaceBlockID == Blocks.lit_redstone_lamp)) { - return true; - } - if ((thereBlockID == Blocks.lit_redstone_lamp) && (replaceBlockID == Blocks.redstone_lamp)) { - return true; - } - /*if ((thereBlockID == Blocks.water) || (replaceBlockID == Blocks.flowing_water)) { - return true; - } - if ((thereBlockID == Blocks.flowing_water) || (replaceBlockID == Blocks.water)) { - return true; - }*/ - if (replaceBlockID == Blocks.tnt) { - return true; - } - return false; - } - - private void captureBlockData() - { - this.blockData = new Block[this.diameter * this.diameter * this.diameter]; - this.metaData = new byte[this.diameter * this.diameter * this.diameter]; - - int index = 0; - for (int x = -this.radius; x <= this.radius; x++) { - for (int y = -this.radius; y <= this.radius; y++) { - for (int z = -this.radius; z <= this.radius; z++) - { - final Block blockID = this.worldObj.getBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z); - final int meta = this.worldObj.getBlockMetadata(this.xCoord + x, this.yCoord + y, this.zCoord + z); - - this.blockData[index] = blockID; - this.metaData[index] = ((byte)meta); - - index++; - } - } - } - } - - public boolean anyPlayerInRange() - { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, this.requiredPlayerRange) != null; - } -} diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java deleted file mode 100644 index 5b837397b1..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java +++ /dev/null @@ -1,403 +0,0 @@ -package gtPlusPlus.core.tileentities.general; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; -import gtPlusPlus.core.inventories.Inventory_VolumetricFlaskSetter; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -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; -import net.minecraftforge.fluids.FluidStack; - -public class TileEntityVolumetricFlaskSetter extends TileEntity implements ISidedInventory { - - private int tickCount = 0; - private final Inventory_VolumetricFlaskSetter inventoryContents; - private String customName; - public int locationX; - public int locationY; - public int locationZ; - private int aCurrentMode = 0; - private short aCustomValue = 1000; - - public TileEntityVolumetricFlaskSetter() { - this.inventoryContents = new Inventory_VolumetricFlaskSetter(); - this.setTileLocation(); - } - - public short getCustomValue() { - //Logger.INFO("Value: "+this.aCustomValue); - return this.aCustomValue; - } - - public void setCustomValue(int aVal) { - Logger.INFO("Old Value: "+this.aCustomValue); - this.aCustomValue = (short) MathUtils.balance(aVal, 0, Short.MAX_VALUE); - Logger.INFO("New Value: "+this.aCustomValue); - markDirty(); - } - - public boolean setTileLocation() { - if (this.hasWorldObj()) { - if (!this.getWorldObj().isRemote) { - this.locationX = this.xCoord; - this.locationY = this.yCoord; - this.locationZ = this.zCoord; - return true; - } - } - return false; - } - - //Rename to hasCircuitToConfigure - public final boolean hasFlask() { - for (int i=0;i= 16) { - return false; - } - } - AutoMap aValidSlots = new AutoMap(); - int aSlotCount = 0; - for (ItemStack i : aInputs) { - if (i != null) { - aValidSlots.put(aSlotCount); - } - aSlotCount++; - } - for (int e : aValidSlots) { - - // Skip slot 7 (Custom) unless it has a value > 0 - if (e == 7 && getCustomValue() <= 0) { - Logger.INFO("Skipping Custom slot as value <= 0"); - continue; - } - if (e == Container_VolumetricFlaskSetter.SLOT_OUTPUT) { - continue; - } - - boolean doAdd = false; - ItemStack g = this.getStackInSlot(e); - FluidStack aInputFluidStack = VolumetricFlaskHelper.getFlaskFluid(g); - int aSize = 0; - ItemStack aInputStack = null; - int aTypeInSlot = getFlaskType(g); - if (aTypeInSlot > 0 && g != null) { - // No Existing Output - if (!hasOutput) { - aSize = g.stackSize; - doAdd = true; - } - // Existing Output - else { - ItemStack f = aInputs[Container_VolumetricFlaskSetter.SLOT_OUTPUT]; - FluidStack aFluidInCheckedSlot = VolumetricFlaskHelper.getFlaskFluid(f); - int aTypeInCheckedSlot = getFlaskType(f); - // Check that the Circuit in the Output slot is not null and the same type as the circuit input. - if (aTypeInCheckedSlot > 0 && (aTypeInSlot == aTypeInCheckedSlot) && f != null) { - if (g.getItem() == f.getItem() && VolumetricFlaskHelper.getFlaskCapacity(f) == getCapacityForSlot(e) && ((aInputFluidStack == null && aFluidInCheckedSlot == null) || aInputFluidStack.isFluidEqual(aFluidInCheckedSlot))) { - Logger.INFO("Input Slot Flask Contains: "+(aInputFluidStack != null ? aInputFluidStack.getLocalizedName() : "Empty")); - Logger.INFO("Output Slot Flask Contains: "+(aFluidInCheckedSlot != null ? aFluidInCheckedSlot.getLocalizedName() : "Empty")); - aSize = f.stackSize + g.stackSize; - if (aSize > 16) { - aInputStack = g.copy(); - aInputStack.stackSize = (aSize-16); - } - doAdd = true; - } - } - } - if (doAdd) { - // Check Circuit Type - ItemStack aOutput; - FluidStack aOutputFluid = null; - if (!VolumetricFlaskHelper.isFlaskEmpty(g)) { - aOutputFluid = aInputFluidStack.copy(); - } - if (aTypeInSlot == 1) { - aOutput = VolumetricFlaskHelper.getVolumetricFlask(1); - } - else if (aTypeInSlot == 2) { - aOutput = VolumetricFlaskHelper.getLargeVolumetricFlask(1); - } - else if (aTypeInSlot == 3) { - aOutput = VolumetricFlaskHelper.getGiganticVolumetricFlask(1); - } - else { - aOutput = null; - } - if (aOutput != null) { - aOutput.stackSize = aSize; - int aCapacity = getCapacityForSlot(e); - VolumetricFlaskHelper.setNewFlaskCapacity(aOutput, aCapacity); - if (aOutputFluid != null) { - if (aOutputFluid.amount > aCapacity) { - aOutputFluid.amount = aCapacity; - } - VolumetricFlaskHelper.setFluid(aOutput, aOutputFluid); - } - this.setInventorySlotContents(e, aInputStack); - this.setInventorySlotContents(Container_VolumetricFlaskSetter.SLOT_OUTPUT, aOutput); - return true; - } - } - } - continue; - } - return false; - } - - @Override - public void updateEntity() { - try{ - if (!this.worldObj.isRemote) { - if (tickCount % 10 == 0) { - if (hasFlask()) { - this.addOutput(); - this.markDirty(); - } - } - this.tickCount++; - } - } - catch (final Throwable t){} - } - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - super.writeToNBT(nbt); - // Utils.LOG_WARNING("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.inventoryContents.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - nbt.setShort("aCustomValue", aCustomValue); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - nbt.setInteger("aCurrentMode", aCurrentMode); - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - super.readFromNBT(nbt); - // Utils.LOG_WARNING("Trying to read NBT data from TE."); - this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.aCustomValue = nbt.getShort("aCustomValue"); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - aCurrentMode = nbt.getInteger("aCurrentMode"); - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return this.getInventory().getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - final int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r=0; r= 100) && (this.tankEssence.getFluidAmount() <= (this.tankEssence.getCapacity()-(100*EnchantingUtils.RATIO_MOB_ESSENCE_TO_LIQUID_XP)))){ - final FluidStack bigStorage = EnchantingUtils.getEssenceFromLiquidXp(100); - this.tankEssence.fill(bigStorage, true); - this.tankLiquidXp.drain(100, true); - return (this.tankEssence.getCapacity()-this.tankEssence.getFluidAmount()); - } - } - else { - final double rm = EnchantingUtils.RATIO_MOB_ESSENCE_TO_LIQUID_XP; - if ((this.tankEssence.getFluid() != null) && (this.tankEssence.getFluidAmount() >= rm) && (this.tankLiquidXp.getFluidAmount() <= (this.tankLiquidXp.getCapacity()-rm))){ - final FluidStack bigStorage = EnchantingUtils.getLiquidXP(1); - this.tankLiquidXp.fill(bigStorage, true); - this.tankEssence.drain((int) rm, true); - return (this.tankLiquidXp.getCapacity()-this.tankLiquidXp.getFluidAmount()); - } - } - return 0f; - } - - @Override - public void readFromNBT(final NBTTagCompound tag) { - this.tankEssence.readFromNBT(tag); - this.tankLiquidXp.readFromNBT(tag); - this.mConvertToEssence = tag.getBoolean("mConvertToEssence"); - super.readFromNBT(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound tag) { - this.tankEssence.writeToNBT(tag); - this.tankLiquidXp.writeToNBT(tag); - tag.setBoolean("mConvertToEssence", this.mConvertToEssence); - super.writeToNBT(tag); - } - - @Override - public Packet getDescriptionPacket() { - final NBTTagCompound tag = new NBTTagCompound(); - this.writeToNBT(tag); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); - } - - @Override - public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity pkt) { - final NBTTagCompound tag = pkt.func_148857_g(); - this.readFromNBT(tag); - } - - public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) { - if (this.isServerSide()){ - if (this.mConvertToEssence){ - PlayerUtils.messagePlayer(aPlayer, "Converting from Mob Essence to Liquid Xp."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Converting from Liquid Xp to Mob Essence."); - } - //Mode Change - this.changeMode(); - } - } - - public void onRightClick(final byte aSide, final EntityPlayer aPlayer, final int aX, final int aY, final int aZ) { - if ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54))) { - String mInput; - String mOutput; - - if (this.mConvertToEssence){ - mInput = "Liquid Xp"; - mOutput = "Mob Essence"; - } - else { - mInput = "Mob Essence"; - mOutput = "Liquid Xp"; - } - - PlayerUtils.messagePlayer(aPlayer, "Input: "+mInput+"."); - PlayerUtils.messagePlayer(aPlayer, "Output: "+mOutput+"."); - } - } - - @Override - public boolean onPreTick(long aTick) { - boolean aSuperResult = super.onPreTick(aTick); - long aTankSpaceLeft = 0; - double aAmount = 0; - int aRuns = 0; - if (this.mConvertToEssence) { - aTankSpaceLeft = (this.tankEssence.getCapacity()-this.tankEssence.getFluidAmount()); - aAmount = EnchantingUtils.getEssenceFromLiquidXp(100).amount; - } - else { - aTankSpaceLeft = (this.tankLiquidXp.getCapacity()-this.tankLiquidXp.getFluidAmount()); - aAmount = EnchantingUtils.RATIO_MOB_ESSENCE_TO_LIQUID_XP; - } - aRuns = (int) (aTankSpaceLeft / aAmount); - for (int i=0;i getTileEntityClass(); - - protected abstract String getTileEntityNameForRegistration(); - - public Block getBlock() { - return mTilePos != null ? mTilePos.getBlockAtPos() : Blocks.redstone_block; - } - - public final boolean isLight() { - return mLightMode; - } - - public final float getLightBrightness() { - if (!isLight()) { - return 0; - } - else { - return mLightValue; - } - } - - @Override - public void readFromNBT(NBTTagCompound aNBT) { - mStartTime = aNBT.getLong("mStartTime"); - mInvName = aNBT.getString("mInvName"); - mLightValue = aNBT.getFloat("mLightValue"); - mLightMode = aNBT.getBoolean("mLightMode"); - mRedstoneLevel = aNBT.getByte("mRedstoneLevel"); - super.readFromNBT(aNBT); - } - - @Override - public void writeToNBT(NBTTagCompound aNBT) { - aNBT.setInteger("mTileType", mTileType); - aNBT.setLong("mStartTime", mStartTime); - aNBT.setString("mInvName", mInvName); - aNBT.setFloat("mLightValue", getLightBrightness()); - aNBT.setBoolean("mLightMode", isLight()); - aNBT.setByte("mRedstoneLevel", mRedstoneLevel); - super.writeToNBT(aNBT); - } - - - private boolean mHasUpdatedRecently = false; - - private final boolean init() { - if (mTilePos == null) { - try { - mTilePos = new BlockPos(this); - } catch (Throwable t) { - return false; - } - } - if (mStartTime == null) { - try { - mStartTime = System.currentTimeMillis(); - } catch (Throwable t) { - return false; - } - } - return true; - } - private Long mLastUpdate; - private String mInvName = ""; - - @Override - public void updateEntity() { - //Handle init - if (!init()) { - return; - } - if (mRequiresUpdate || mLastUpdate == null) { - mRequiresUpdate = false; - mHasUpdatedRecently = true; - mLastUpdate = System.currentTimeMillis(); - if (mTilePos.world.getBlockLightValue(xCoord, yCoord, zCoord) != getLightBrightness()/0.0625f) { - mTilePos.getBlockAtPos().setLightLevel(getLightBrightness()/0.0625f); - mTilePos.world.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, (int) (getLightBrightness()/0.0625f)); - mTilePos.world.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord); - Logger.INFO("Updating Light"); - } - mTilePos.world.scheduleBlockUpdate(xCoord, yCoord, zCoord, mTilePos.getBlockAtPos(), 1); - markDirty(); - } - if (Utils.getMillisSince(mLastUpdate, System.currentTimeMillis()) >= 5000) { - if (mHasUpdatedRecently) { - mHasUpdatedRecently = false; - this.markForUpdate(); - } - } - - if (Utils.getMillisSince(mStartTime, System.currentTimeMillis()) % 50 == 0) { - - } - - - - super.updateEntity(); - } - - public final void markForUpdate() { - mRequiresUpdate = true; - } - - public final boolean hasUpdatedRecently() { - return mHasUpdatedRecently; - } - - @Override - public int getBlockMetadata() { - return super.getBlockMetadata(); - } - - @Override - public void markDirty() { - super.markDirty(); - } - - @Override - public boolean canUpdate() { - return true; - } - - public void setRedstoneState(boolean aRedstoneActive) { - - } - - public void setCurrentTextureArray(IIcon[] aTextures) { - - } - - /** - * Used to see if one of the blocks next to you or your block is getting power from a neighboring block. Used by - * items like TNT or Doors so they don't have redstone going straight into them. Args: x, y, z - */ - public boolean isGettingIndirectlyPowered() { - if (mTilePos == null) { - return false; - } - return mTilePos.world.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); - } - - public int getStrongestIndirectPower() { - if (mTilePos == null) { - return 0; - } - return mTilePos.world.getStrongestIndirectPower(xCoord, yCoord, zCoord); - } - - /** - * Gets the power level from a certain block face. Args: x, y, z, direction - */ - public int getIndirectPowerForSide(int aSide) { - if (mTilePos == null || aSide <0 || aSide > 5) { - return 0; - } - return mTilePos.world.getIndirectPowerLevelTo(xCoord, yCoord, zCoord, aSide); - } - - /** - * Returns the highest redstone signal strength powering the given block. Args: X, Y, Z. - */ - public int getBlockPowerInput() { - if (mTilePos == null) { - return 0; - } - return mTilePos.world.getBlockPowerInput(xCoord, yCoord, zCoord); - } - - /** - * Determine if this block can make a redstone connection on the side provided, - * Useful to control which sides are inputs and outputs for redstone wires. - * - * Side: - * -1: UP - * 0: NORTH - * 1: EAST - * 2: SOUTH - * 3: WEST - * - * @param world The current world - * @param x X Position - * @param y Y Position - * @param z Z Position - * @param side The side that is trying to make the connection - * @return True to make the connection - */ - public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { - if (mTilePos == null) { - return false; - } - return canAcceptRedstoneSignal() || canSupplyRedstoneSignal(); - } - - /** - * Called to determine whether to allow the a block to handle its own indirect power rather than using the default rules. - * @param world The world - * @param x The x position of this block instance - * @param y The y position of this block instance - * @param z The z position of this block instance - * @param side The INPUT side of the block to be powered - ie the opposite of this block's output side - * @return Whether Block#isProvidingWeakPower should be called when determining indirect power - */ - public boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int side) { - if (mTilePos == null) { - return false; - } - return getBlock().isNormalCube(); - } - - /** - * If this block should be notified of weak changes. - * Weak changes are changes 1 block away through a solid block. - * Similar to comparators. - * - * @param world The current world - * @param x X Position - * @param y Y position - * @param z Z position - * @param side The side to check - * @return true To be notified of changes - */ - public boolean getWeakChanges(IBlockAccess world, int x, int y, int z) { - if (mTilePos == null) { - return false; - } - return false; - } - - - /** - * Override this to change the level of redstone output. - * @return - */ - public int getRedstoneLevel() { - if (mTilePos == null || mRedstoneLevel == null) { - return 0; - } - else { - if (canSupplyRedstoneSignal()) { - if (this.hasUpdatedRecently()) { - int aInputPower = getInputPowerLevel(); - mRedstoneLevel = (byte) ((aInputPower >= 0 && aInputPower <= 127) ? aInputPower : 0); - } - return mRedstoneLevel; - } - } - return 0; - } - - - public boolean providesWeakPower() { - return isProvidingPower(); - } - - public boolean providesStrongPower() { - return isProvidingPower(); - } - - - /** - * Returns the amount of week power this block is providing to a side. - * @param world - * @param x - * @param y - * @param z - * @param side - * @return - */ - public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { - if (!providesWeakPower()) { - return 0; - } - return getOutputPowerLevel(); - } - /** - * Returns the amount of strong power this block is providing to a side. - * @param world - * @param x - * @param y - * @param z - * @param side - * @return - */ - public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { - if (!providesStrongPower()) { - return 0; - } - return getOutputPowerLevel(); - } - - - - - - - - /* - * Alk's Simplified Redstone Handling functions (Fuck redstone) - */ - - /** - * - * @return - Does this Block supply redstone signal at all? - */ - public final boolean isPowered() { - return canAcceptRedstoneSignal() && getInputPowerLevel() > 0; - } - - /** - * - * @return - Can this Block provide redstone signal at all? - */ - public final boolean isProvidingPower() { - return canSupplyRedstoneSignal() && getOutputPowerLevel() > 0; - } - - /** - * - * @return - (0-15) Redstone Output signal level - */ - public final int getOutputPowerLevel() { - return getRedstoneLevel(); - } - - /** - * - * @return (0-15) Redstone Input Signal level - */ - public final int getInputPowerLevel() { - return getBlockPowerInput(); - } - - /** - * - * @return - Does this Tile Entity support outputting redstone? - */ - public final boolean canSupplyRedstoneSignal() { - return mTileType == 1 || mTileType == 2; - } - - /** - * - * @return - Does this Tile Entity support inputting redstone? - */ - public final boolean canAcceptRedstoneSignal() { - return mTileType == 0 || mTileType == 2; - } - - - @Override - public boolean isScrewdriverable() { - return false; - } - - - @Override - public boolean onScrewdriverLMB() { - return false; - } - - - @Override - public boolean onScrewdriverRMB() { - return false; - } - - - @Override - public boolean isWrenchable() { - return false; - } - - - @Override - public boolean onWrenchLMB() { - return false; - } - - - @Override - public boolean onWrenchRMB() { - return false; - } - - - @Override - public boolean isMalletable() { - return false; - } - - - @Override - public boolean onMalletLMB() { - return false; - } - - - @Override - public boolean onMalletRMB() { - return false; - } - - - public void setCustomName(String displayName) { - this.mInvName = displayName; - } - - public String getCustomName() { - return this.mInvName; - } - - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.mInvName : "container.redstone.generic"; - } - - public boolean hasCustomInventoryName() { - return (this.mInvName != null) && !this.mInvName.equals(""); - } - - - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java deleted file mode 100644 index 6bb4c932dc..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java +++ /dev/null @@ -1,155 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.passive.EntityCow; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityMooshroom; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.passive.IAnimals; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; - -public class TileEntityAdvPooCollector extends TileEntityBaseFluidCollector { - - public TileEntityAdvPooCollector() { - super(18, 128000); - } - - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) { - return false; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) { - return true; - } - - public void onPreLogicTick() { - - } - - public boolean addDrop(V aPooMaker) { - int aChance = MathUtils.randInt(0, 50000); - if (aChance > 0) { - ItemStack aPoop; - if (aChance<= 200) { - aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); - } - else if (aChance <= 1000) { - aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); - } - else if (aChance <= 2000) { - aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); - } - else { - return false; - } - - //Add to inventory if not full, else espawn in world - if (!this.mInventory.addItemStack(aPoop)) { - EntityItem entity = new EntityItem(worldObj, xCoord, yCoord+1.5, zCoord, aPoop); - worldObj.spawnEntityInWorld(entity); - } - - } - - - return false; - } - - private static AutoMap aEntityToDrain = new AutoMap(); - - @Override - public AutoMap aThingsToLookFor() { - if (aEntityToDrain.isEmpty()) { - aEntityToDrain.add(EntityAnimal.class); - aEntityToDrain.add(IAnimals.class); - aEntityToDrain.add(EntityVillager.class); - aEntityToDrain.add(EntityPlayer.class); - } - return aEntityToDrain; - } - - @Override - public int onPostTick(V aPooMaker) { - if (this.tank.getFluidAmount() < this.tank.getCapacity()) { - int aPooAmount = 0; - // Vanilla Animals - if (aPooMaker instanceof EntityChicken) { - aPooAmount = MathUtils.randInt(1, 40); - } - else if (aPooMaker instanceof EntityHorse) { - aPooAmount = MathUtils.randInt(20, 40); - } - else if (aPooMaker instanceof EntityCow) { - aPooAmount = MathUtils.randInt(18, 45); - } - else if (aPooMaker instanceof EntityMooshroom) { - aPooAmount = 17; - } - else if (aPooMaker instanceof EntitySheep) { - aPooAmount = MathUtils.randInt(8, 30); - } - - else { - if (aPooMaker instanceof EntityAnimal || aPooMaker instanceof IAnimals) { - aPooAmount = MathUtils.randInt(5, 35); - } - else if (aPooMaker instanceof EntityVillager) { - aPooAmount = MathUtils.randInt(25, 30); - } - else if (aPooMaker instanceof EntityPlayer) { - aPooAmount = MathUtils.randInt(1, 3); - } - else { - aPooAmount = MathUtils.randInt(1, 10); - } - } - aPooAmount = Math.max(Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount), 1); - return Math.max(1, (aPooAmount * MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4}) / 10)); - } - else { - return 0; - } - } - - @Override - public Fluid fluidToProvide() { - return AgriculturalChem.PoopJuice; - } - - @Override - public ItemStack itemToSpawnInWorldIfTankIsFull() { - int a = MathUtils.randInt(0, 75); - ItemStack aItem = null; - if (a <= 30) { - aItem = ItemUtils.getSimpleStack(AgriculturalChem.dustDirt); - } - else if (a <= 40) { - aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); - } - else if (a <= 55) { - aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); - } - return aItem; - } - - public int getBaseTickRate() { - return MathUtils.randInt(50, 200); - } - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java deleted file mode 100644 index cdae4cf829..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java +++ /dev/null @@ -1,238 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BTF_FluidTank; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -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.util.AxisAlignedBB; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; - -public abstract class TileEntityBaseFluidCollector extends TileEntityBase implements IFluidHandler { - - public final FluidTank tank; - private boolean needsUpdate = false; - private int updateTimer = 0; - private long internalTickCounter = 0; - private BlockPos internalBlockLocation; - - public TileEntityBaseFluidCollector(int aInvSlotCount, int aTankCapcity) { - super(aInvSlotCount); - tank = new BTF_FluidTank(aTankCapcity); - } - - @Override - public final int fill(ForgeDirection from, FluidStack resource, boolean doFill) { - needsUpdate = true; - return this.tank.fill(resource, doFill); - } - - @Override - public final FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { - needsUpdate = true; - return this.tank.drain(resource.amount, doDrain); - } - - @Override - public final FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { - needsUpdate = true; - FluidStack fluid = this.tank.getFluid(); - // return this.tank.drain(maxDrain, doDrain); - if (fluid == null) { - return null; - } - - int drained = maxDrain; - if (fluid.amount < drained) { - drained = fluid.amount; - } - - FluidStack stack = new FluidStack(fluid, drained); - if (doDrain) { - fluid.amount -= drained; - if (fluid.amount <= 0) { - fluid = null; - } - - if (this != null) { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, this.getWorldObj(), this.xCoord, - this.yCoord, this.zCoord, this.tank, 0)); - } - } - return stack; - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) { - return false; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) { - return true; - } - - @Override - public final FluidTankInfo[] getTankInfo(ForgeDirection from) { - return new FluidTankInfo[] { this.tank.getInfo() }; - } - - @Override - public final void updateEntity() { - super.updateEntity(); - onPreLogicTick(); - logicTick(); - if (needsUpdate) { - if (updateTimer == 0) { - updateTimer = 10; // every 10 ticks it will send an update - } else { - --updateTimer; - if (updateTimer == 0) { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - needsUpdate = false; - } - } - } - } - - @Override - public void readFromNBT(NBTTagCompound tag) { - tank.readFromNBT(tag); - super.readFromNBT(tag); - } - - @Override - public void writeToNBT(NBTTagCompound tag) { - tank.writeToNBT(tag); - super.writeToNBT(tag); - } - - @Override - public final Packet getDescriptionPacket() { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); - } - - @Override - public final void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - NBTTagCompound tag = pkt.func_148857_g(); - readFromNBT(tag); - } - - public int getBaseTickRate() { - return MathUtils.randInt(200, 300); - } - - public abstract AutoMap aThingsToLookFor(); - - public abstract void onPreLogicTick(); - - public final void logicTick() { - - if (this.worldObj == null || this.worldObj.isRemote) { - return; - } - if (internalTickCounter % getBaseTickRate() == 0) { - if (internalBlockLocation == null) { - internalBlockLocation = new BlockPos(this); - } - BlockPos p = internalBlockLocation; - if (p != null) { - if (p.world != null) { - World w = this.worldObj; - if (w == null) { - return; - } - Chunk c = w.getChunkFromBlockCoords(p.xPos, p.zPos); - if (c != null) { - if (c.isChunkLoaded) { - int startX = p.xPos - 2; - int startY = p.yPos; - int startZ = p.zPos - 2; - int endX = p.xPos + 3; - int endY = p.yPos + 5; - int endZ = p.zPos + 3; - AxisAlignedBB box = AxisAlignedBB.getBoundingBox(startX, startY, startZ, endX, endY, endZ); - if (box != null) { - for (Class c2 : aThingsToLookFor()) { - tickEntityType(w, box, c2); - } - } else { - return; - } - } - } - } - } - - } - - internalTickCounter++; - } - - @SuppressWarnings("unchecked") - public final void tickEntityType(World w, AxisAlignedBB box, Class aClassToFind) { - List entities = w.getEntitiesWithinAABB(aClassToFind, box); - if (entities != null && !entities.isEmpty()) { - interactWithEntities(entities); - } - } - - public final void interactWithEntities(List entities) { - for (V aEntity : entities) { - addDrop(aEntity); - if (this.tank.getFluidAmount() < this.tank.getCapacity()) { - int aFluidAmount = onPostTick(aEntity); - aFluidAmount = Math.max(Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aFluidAmount), 1); - this.tank.fill(FluidUtils.getFluidStack(fluidToProvide(), aFluidAmount), true); - } - else { - ItemStack aDirtStack = ItemUtils.getSimpleStack(itemToSpawnInWorldIfTankIsFull(), 1); - if (!ItemUtils.checkForInvalidItems(aDirtStack)) { - return; - } - if (!this.mInventory.addItemStack(aDirtStack)) { - EntityItem entity = new EntityItem(worldObj, xCoord, yCoord+1.5, zCoord, aDirtStack); - worldObj.spawnEntityInWorld(entity); - } - } - } - } - - - /** - * Return the amount of fluid for this entity type - * @param aEntity - * @return - */ - public abstract int onPostTick(V aEntity); - - public abstract boolean addDrop(V aPooMaker); - - public abstract Fluid fluidToProvide(); - - public abstract ItemStack itemToSpawnInWorldIfTankIsFull(); - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java deleted file mode 100644 index 8ba43bb197..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java +++ /dev/null @@ -1,480 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.ItemList; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.container.Container_ModularityTable; -import gtPlusPlus.core.inventories.modulartable.InventoryModularMain; -import gtPlusPlus.core.inventories.modulartable.InventoryModularOutput; -import gtPlusPlus.core.item.bauble.ModularBauble; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; - -public class TileEntityModularityTable extends TileEntityBase implements ISidedInventory{ - - public InventoryModularMain inventoryGrid; - public InventoryModularOutput inventoryOutputs; - public InventoryModularOutput mTempRecipeStorage; - private Container_ModularityTable container; - private String customName; - private int mRecipeTimeRemaining = -1; - - public TileEntityModularityTable() { - super(16); - this.inventoryGrid = new InventoryModularMain(); - this.inventoryOutputs = new InventoryModularOutput(); - this.mTempRecipeStorage = new InventoryModularOutput(); - this.canUpdate(); - generateAllValidUpgrades(); - } - - public void setContainer(Container_ModularityTable container_ModularityTable) { - this.container = container_ModularityTable; - } - - public Container_ModularityTable getContainer() { - return this.container; - } - - public int getRecipeTime(){ - return this.mRecipeTimeRemaining; - } - - @Override - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - super.writeToNBT(nbt); - nbt.setInteger("mRecipeTime", this.mRecipeTimeRemaining); - this.inventoryOutputs.writeToNBT(this.getTag(nbt, "ContentsOutput")); - this.inventoryGrid.writeToNBT(this.getTag(nbt, "ContentsGrid")); - this.mTempRecipeStorage.writeToNBT(this.getTag(nbt, "ContentsRecipeTemp")); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - super.readFromNBT(nbt); - this.mRecipeTimeRemaining = nbt.getInteger("mRecipeTime"); - this.inventoryOutputs.readFromNBT(nbt.getCompoundTag("ContentsOutput")); - this.inventoryGrid.readFromNBT(nbt.getCompoundTag("ContentsGrid")); - this.mTempRecipeStorage.readFromNBT(nbt.getCompoundTag("ContentsRecipeTemp")); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - } - - protected ItemStack mOutputStack; //Upgraded Bauble - protected ItemStack mInputstackA; //Bauble - protected ItemStack mInputstackB; //Upgrade - - public ItemStack getPendingOutputItem(){ - this.mRecipeTimeRemaining--; - return this.mOutputStack; - } - - public ItemStack[] getCurrentInputItems(){ - if (this.mRecipeTimeRemaining < 0){ - return null; - } - else { - return new ItemStack[]{this.mInputstackA, this.mInputstackB}; - } - } - - public boolean setInputStacks(ItemStack tBauble, ItemStack tUpgrade){ - if (tBauble != null){ - this.mInputstackA = tBauble; - } - else { - this.mInputstackA = null; - } - if (tUpgrade != null){ - this.mInputstackB = tBauble; - } - else { - this.mInputstackB = null; - } - if (this.mInputstackA != null && this.mInputstackB != null){ - return true; - } - return false; - } - - public boolean setOutputStack(ItemStack mNewBauble){ - if (mNewBauble != null){ - this.mOutputStack = mNewBauble; - return true; - } - else { - this.mOutputStack = null; - return false; - } - } - - public boolean clearRecipeData(){ - this.mInputstackA = null; - this.mInputstackB = null; - this.mOutputStack = null; - return true; - } - - @Override - public boolean canUpdate() { - return true; - } - - public static Map> mValidUpgradeList = new HashMap>(); - public static Map mValidUpgradeListFormChange = new HashMap(); - - private static boolean generateAllValidUpgrades() { - - // Form Change - generateUpgradeFormData(ItemList.Sensor_MV.get(1), BT.TYPE_RING); - generateUpgradeFormData(ItemList.Electric_Piston_MV.get(1), BT.TYPE_BELT); - generateUpgradeFormData(ItemList.Emitter_MV.get(1), BT.TYPE_AMULET); - - // Damage Boost - generateUpgradeData(ItemList.Electric_Motor_LV.get(1), Modifiers.BOOST_DAMAGE, 1); - generateUpgradeData(ItemList.Electric_Motor_MV.get(1), Modifiers.BOOST_DAMAGE, 2); - generateUpgradeData(ItemList.Electric_Motor_HV.get(1), Modifiers.BOOST_DAMAGE, 3); - generateUpgradeData(ItemList.Electric_Motor_EV.get(1), Modifiers.BOOST_DAMAGE, 4); - generateUpgradeData(ItemList.Electric_Motor_IV.get(1), Modifiers.BOOST_DAMAGE, 5); - - // Defence Boost - generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateAluminium", 1), Modifiers.BOOST_DEF, 1); - generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateStainlessSteel", 1), Modifiers.BOOST_DEF, 2); - generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateTungsten", 1), Modifiers.BOOST_DEF, 3); - generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateTungstenSteel", 1), Modifiers.BOOST_DEF, 4); - generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateNaquadah", 1), Modifiers.BOOST_DEF, 5); - - // Hp Boost - generateUpgradeData(ItemUtils.simpleMetaStack(Items.golden_apple, 0, 1), Modifiers.BOOST_HP, 1); - generateUpgradeData(ItemUtils.simpleMetaStack(Items.golden_apple, 1, 1), Modifiers.BOOST_HP, 2); - generateUpgradeData(ItemUtils.simpleMetaStack(Items.nether_star, 0, 1), Modifiers.BOOST_HP, 3); - generateUpgradeData(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32725", 32725, 1), Modifiers.BOOST_HP, - 4); - generateUpgradeData(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32726", 32726, 1), Modifiers.BOOST_HP, - 5); - - return true; - } - - public static boolean generateUpgradeData(ItemStack tStack, Modifiers tMod, int tLevel) { - Pair tTemp = new Pair(tMod, tLevel); - if (mValidUpgradeList.put(tStack, tTemp) != null) { - return true; - } - return false; - } - - public static boolean generateUpgradeFormData(ItemStack tStack, BT tMod) { - if (mValidUpgradeListFormChange.put(tStack, tMod) != null) { - return true; - } - return false; - } - - public static boolean addUpgrade(ItemStack tStack, ItemStack tBauble) { - - try { - Iterator> it = mValidUpgradeListFormChange.entrySet().iterator(); - while (it.hasNext()) { - Entry pair = it.next(); - if (pair.getKey().getItem() == tStack.getItem() - && pair.getKey().getItemDamage() == tStack.getItemDamage()) { - ModularArmourUtils.setBaubleType(tBauble, pair.getValue()); - tBauble.setItemDamage(ModularArmourUtils.getBaubleTypeID(tBauble)); - return true; - } - } - } catch (Throwable t) { - - } - try { - Iterator>> it2 = mValidUpgradeList.entrySet().iterator(); - while (it2.hasNext()) { - Entry> pair = it2.next(); - if (pair.getKey().getItem() == tStack.getItem() - && pair.getKey().getItemDamage() == tStack.getItemDamage()) { - Pair newPair = pair.getValue(); - ModularArmourUtils.setModifierLevel(tBauble, newPair); - return true; - } - } - } catch (Throwable t) { - - } - return false; - } - - @Override - public int getSizeInventory() { - return 11; - } - - @Override - public ItemStack getStackInSlot(int slot) { - if (slot >= this.inventoryGrid.getSizeInventory()){ - return this.inventoryOutputs.getStackInSlot(slot-9); - } - else if (slot < this.inventoryGrid.getSizeInventory()){ - return this.inventoryGrid.getStackInSlot(slot); - } - else { - return null; - } - } - - @Override - public ItemStack decrStackSize(int slot, int count) { - if (slot < this.inventoryGrid.getSizeInventory()){ - return this.inventoryGrid.decrStackSize(slot, count); - } - else if (slot >= this.inventoryGrid.getSizeInventory()){ - return this.inventoryOutputs.decrStackSize(slot-9, count); - } - else { - return null; - } - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) { - return this.getStackInSlot(slot); - } - - @Override - public void setInventorySlotContents(int slot, ItemStack stack) { - if (slot >= this.inventoryGrid.getSizeInventory()){ - this.inventoryOutputs.setInventorySlotContents(slot-9, stack); - } - else if (slot < this.inventoryGrid.getSizeInventory()){ - this.inventoryGrid.setInventorySlotContents(slot, stack); - } - } - - @Override - public int getInventoryStackLimit() { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) { - return true; - } - - @Override - public void openInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.inventoryGrid.openInventory(); - this.inventoryOutputs.openInventory(); - } - - @Override - public void closeInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.inventoryGrid.openInventory(); - this.inventoryOutputs.openInventory(); - } - - @Override - public boolean isItemValidForSlot(int slot, ItemStack itemstack) { - if (slot >= this.inventoryGrid.getSizeInventory()){ - return this.inventoryOutputs.isItemValidForSlot(slot-9, itemstack); - } - else if (slot < this.inventoryGrid.getSizeInventory()){ - return this.inventoryGrid.isItemValidForSlot(slot, itemstack); - } - else { - return false; - } - } - - @Override - public int[] getAccessibleSlotsFromSide(int side) { - int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r=0; r= 9){ - return this.inventoryOutputs.isItemValidForSlot(slot-9, item); - } - else { - return this.inventoryGrid.isItemValidForSlot(slot, item); - } - } - - @Override - public boolean canExtractItem(int slot, ItemStack item, int side) { - Logger.INFO("Slot:"+slot+" | side? "+side); - if (slot == 11 || slot <= 8){ - return true; - } - return false; - } - - @Override - public String getCustomName() { - return this.customName; - } - - @Override - public void setCustomName(String customName) { - this.customName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.customName : "container.fishtrap"; - } - - @Override - public boolean hasCustomInventoryName() { - return this.customName != null && !this.customName.equals(""); - } - - @Override - public boolean onPreTick(long aTick) { - //Check for active recipe - if (this.mRecipeTimeRemaining > -1 || (this.mTempRecipeStorage != null) && (this.mTempRecipeStorage.getRecipeTime() > -1)){ - if ((this.mTempRecipeStorage != null) && this.mTempRecipeStorage.getRecipeTime() > -1){ - if (this.mRecipeTimeRemaining < this.mTempRecipeStorage.getRecipeTime()){ - this.mRecipeTimeRemaining = this.mTempRecipeStorage.getRecipeTime(); - this.markDirty(); - } - } - if (this.mInputstackA != null && this.mInputstackB != null && this.mOutputStack != null){ - this.mTempRecipeStorage.setInventorySlotContents(0, this.mInputstackA); - this.mTempRecipeStorage.setInventorySlotContents(1, this.mInputstackB); - this.mTempRecipeStorage.setInventorySlotContents(2, this.mOutputStack); - this.mTempRecipeStorage.setRecipeTime(this.mRecipeTimeRemaining); - this.markDirty(); - } - } - return true; - } - - @Override - public boolean onPostTick(long aTick) { - if (mRecipeTimeRemaining == 0){ - this.inventoryOutputs.setInventorySlotContents(2, this.getPendingOutputItem()); - clearRecipeData(); - this.mTempRecipeStorage.setRecipeTime(this.mRecipeTimeRemaining); - this.markDirty(); - } - else if (mRecipeTimeRemaining > 0){ - mRecipeTimeRemaining--; - this.mTempRecipeStorage.setRecipeTime(this.mRecipeTimeRemaining); - } - return true; - } - - @Override - public boolean processRecipe() { - boolean removeInputA = false; - boolean removeInputB = false; - // Data stick - ItemStack tBauble = this.inventoryOutputs.getStackInSlot(0); - ItemStack tUpgrade = this.inventoryOutputs.getStackInSlot(1); - if (tBauble != null && tUpgrade != null && this.container != null) { - if (tBauble.getItem() instanceof ModularBauble && this.mRecipeTimeRemaining == -1) { - if (tUpgrade != null && tBauble != null) { - removeInputA = true; - this.setInputStacks(tBauble, tUpgrade); - try { - removeInputB = addUpgrade(tUpgrade, tBauble); - if (!removeInputB) { - } - } catch (Throwable t) { - } - if (removeInputA && removeInputB) { - if (this.setOutputStack(tBauble)){ - if (this.inventoryOutputs.getStackInSlot(1).stackSize > 1) { - ItemStack mTempStack = this.inventoryOutputs.getStackInSlot(1); - mTempStack.stackSize--; - this.inventoryOutputs.setInventorySlotContents(1, mTempStack); - } else { - this.inventoryOutputs.setInventorySlotContents(1, null); - } - this.inventoryOutputs.setInventorySlotContents(0, null); - this.mRecipeTimeRemaining = 80; - this.markDirty(); - return true; - } - } - } - } - } - return false; - } - - public static boolean isValidModularPiece(final ItemStack itemstack){ - if (itemstack.getItem() instanceof ModularBauble){ - return true; - } - return false; - } - - public static boolean isValidUpgrade(final ItemStack itemstack) { - boolean isValid = false; - if (itemstack != null){ - Iterator> it = mValidUpgradeListFormChange.entrySet().iterator(); - while (it.hasNext()) { - Entry pair = it.next(); - if (pair.getKey().getItem() == itemstack.getItem() - && pair.getKey().getItemDamage() == itemstack.getItemDamage()){ - isValid = true; - } - } - Iterator>> it2 = mValidUpgradeList.entrySet().iterator(); - while (it2.hasNext()) { - Entry> pair = it2.next(); - if (pair.getKey().getItem() == itemstack.getItem() - && pair.getKey().getItemDamage() == itemstack.getItemDamage()){ - isValid = true; - } - } - } - return isValid; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java deleted file mode 100644 index 012c9f4ff5..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java +++ /dev/null @@ -1,506 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.ArrayList; -import java.util.List; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BTF_FluidTank; -import gtPlusPlus.core.inventories.InventoryPestKiller; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -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; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTank; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; -import net.minecraftforge.oredict.OreDictionary; - -public class TileEntityPestKiller extends TileEntity implements ISidedInventory, IFluidHandler { - - private final int mBaseTickRate = 20 * 30; - private final InventoryPestKiller mInventory; - private final FluidTank mTank; - private int mChunkX; - private int mChunkZ; - private boolean mSet = false; - - private int mTickCounter = 0; - private int mUpdateTick = 0; - private boolean mNeedsUpdate = false; - private String mCustomName; - - private static final AutoMap> mEntityMap = new AutoMap>(); - - static { - mEntityMap.put(EntityBat.class); - if (LoadedMods.Forestry) { - mEntityMap.put(ReflectionUtils.getClass("forestry.lepidopterology.entities.EntityButterfly")); - } - } - - public TileEntityPestKiller() { - this.mInventory = new InventoryPestKiller(); - mTank = new BTF_FluidTank(2000); - } - - public InventoryPestKiller getInventory() { - return this.mInventory; - } - - public FluidTank getTank() { - return mTank; - } - - private final void setup() { - World w = this.worldObj; - if (w != null) { - Chunk c = w.getChunkFromBlockCoords(this.xCoord, this.zCoord); - if (c != null) { - mChunkX = c.xPosition; - mChunkZ = c.zPosition; - mSet = true; - } - } - } - - @SuppressWarnings("rawtypes") - public boolean tryKillPests() { - int min = 0; - int max = 0; - switch (getTier()) { - case 1: - min = -2; - max = 3; - break; - case 2: - min = -4; - max = 5; - break; - default: - // code block - } - int aChunkCount = 0; - AutoMap entities = new AutoMap(); - if (min != 0 && max != 0) { - for (int x = min; x < max; x++) { - for (int z = min; z < max; z++) { - Chunk c = getChunkFromOffsetIfLoaded(x, z); - if (c != null) { - if (c.hasEntities) { - aChunkCount++; - List[] lists = c.entityLists; - for (List o : lists) { - for (Object e : o) { - if (e instanceof Entity) { - for (Class C : mEntityMap) { - if (e.getClass().equals(C) || C.isAssignableFrom(e.getClass())) { - entities.put((Entity) e); - } - } - } - } - } - } - } - } - } - } else { - Chunk c = getChunkFromOffsetIfLoaded(0, 0); - if (c != null) { - if (c.hasEntities) { - List[] lists = c.entityLists; - for (List o : lists) { - for (Object e : o) { - if (e instanceof Entity) { - for (Class C : mEntityMap) { - if (e.getClass().equals(C) || C.isAssignableFrom(e.getClass())) { - entities.put((Entity) e); - } - } - } - } - } - } - } - } - boolean killed = false; - if (!entities.isEmpty()) { - for (Entity e : entities) { - if (e != null) { - if (e.isEntityAlive()) { - if (this.mTank.getFluidAmount() >= 1 || getTier() == 0) { - if (getTier() > 0) { - int aChanceToUse = MathUtils.randInt(1, (100 * getTier())); - if (aChanceToUse == 1) { - this.mTank.drain(1, true); - } - } - e.performHurtAnimation(); - EntityUtils.doDamage(e, DamageSource.generic, Short.MAX_VALUE); - e.setDead(); - killed = true; - } - } - } - } - } - updateTileEntity(); - return killed; - } - - public Chunk getChunkFromOffsetIfLoaded(int x, int y) { - Chunk c = this.worldObj.getChunkFromChunkCoords(mChunkX + x, mChunkZ + y); - if (c.isChunkLoaded) { - return c; - } - return null; - } - - public int getTier() { - if (this.mTank != null) { - FluidStack f = mTank.getFluid(); - if (f != null) { - if (f.isFluidEqual(FluidUtils.getWildcardFluidStack("formaldehyde", 1))) { - return 1; - } else if (f.isFluidEqual(MISC_MATERIALS.HYDROGEN_CYANIDE.getFluidStack(1))) { - return 2; - } - } - } - return 0; - } - - @Override - public void updateEntity() { - if (worldObj.isRemote) { - return; - } - if (!mSet) { - setup(); - } - this.mTickCounter++; - if (this.mTank != null) { - if (this.hasFluidSpace()) { - handleInventory(); - } - } - if (this.mTickCounter % this.mBaseTickRate == 0) { - tryKillPests(); - } - updateTick(); - } - - public boolean anyPlayerInRange() { - return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { - if (!nbt.hasKey(tag)) { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) { - mTank.writeToNBT(nbt); - super.writeToNBT(nbt); - // Utils.LOG_MACHINE_INFO("Trying to write NBT data to TE."); - final NBTTagCompound chestData = new NBTTagCompound(); - this.mInventory.writeToNBT(chestData); - nbt.setTag("ContentsChest", chestData); - if (this.hasCustomInventoryName()) { - nbt.setString("CustomName", this.getCustomName()); - } - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) { - mTank.readFromNBT(nbt); - super.readFromNBT(nbt); - // Utils.LOG_MACHINE_INFO("Trying to read NBT data from TE."); - this.mInventory.readFromNBT(nbt.getCompoundTag("ContentsChest")); - if (nbt.hasKey("CustomName", 8)) { - this.setCustomName(nbt.getString("CustomName")); - } - } - - @Override - public int getSizeInventory() { - return this.getInventory().getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int slot) { - return this.getInventory().getStackInSlot(slot); - } - - @Override - public ItemStack decrStackSize(final int slot, final int count) { - return this.getInventory().decrStackSize(slot, count); - } - - @Override - public ItemStack getStackInSlotOnClosing(final int slot) { - return this.getInventory().getStackInSlotOnClosing(slot); - } - - @Override - public void setInventorySlotContents(final int slot, final ItemStack stack) { - this.getInventory().setInventorySlotContents(slot, stack); - } - - @Override - public int getInventoryStackLimit() { - return this.getInventory().getInventoryStackLimit(); - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer entityplayer) { - return this.getInventory().isUseableByPlayer(entityplayer); - } - - @Override - public void openInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().openInventory(); - } - - @Override - public void closeInventory() { - this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); - this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); - this.getInventory().closeInventory(); - } - - @Override - public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { - return this.getInventory().isItemValidForSlot(slot, itemstack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - final int[] accessibleSides = new int[this.getSizeInventory()]; - for (int r = 0; r < this.getInventory().getSizeInventory(); r++) { - accessibleSides[r] = r; - } - return accessibleSides; - - } - - @Override - public boolean canInsertItem(final int aSlot, final ItemStack aStack, final int p_102007_3_) { - if (this.getInventory().getInventory()[0] == null) { - return true; - } else if (GT_Utility.areStacksEqual(aStack, this.getInventory().getInventory()[0])) { - if (this.getInventory().getInventory()[0].stackSize < 64) { - int diff = 64 - this.getInventory().getInventory()[0].stackSize; - if (aStack.stackSize <= diff) { - return true; - } - } - } - return false; - } - - @Override - public boolean canExtractItem(final int aSlot, final ItemStack aStack, final int p_102008_3_) { - if (this.getInventory().getInventory()[1] == null) { - return false; - } else { - return true; - } - } - - public String getCustomName() { - return this.mCustomName; - } - - public void setCustomName(final String customName) { - this.mCustomName = customName; - } - - @Override - public String getInventoryName() { - return this.hasCustomInventoryName() ? this.mCustomName : "container.pestkiller"; - } - - @Override - public boolean hasCustomInventoryName() { - return (this.mCustomName != null) && !this.mCustomName.equals(""); - } - - @Override - public final int fill(ForgeDirection from, FluidStack resource, boolean doFill) { - updateTileEntity(); - return this.mTank.fill(resource, doFill); - } - - @Override - public final FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { - updateTileEntity(); - return this.mTank.drain(resource.amount, doDrain); - } - - @Override - public final FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { - FluidStack fluid = this.mTank.getFluid(); - // return this.tank.drain(maxDrain, doDrain); - if (fluid == null) { - return null; - } - - int drained = maxDrain; - if (fluid.amount < drained) { - drained = fluid.amount; - } - - FluidStack stack = new FluidStack(fluid, drained); - if (doDrain) { - fluid.amount -= drained; - if (fluid.amount <= 0) { - fluid = null; - } - - if (this != null) { - FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, this.getWorldObj(), this.xCoord, - this.yCoord, this.zCoord, this.mTank, 0)); - } - } - updateTileEntity(); - return stack; - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) { - return mTank.getFluid() == null || mTank.getFluid().getFluid().equals(fluid); - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) { - return false; - } - - @Override - public final FluidTankInfo[] getTankInfo(ForgeDirection from) { - return new FluidTankInfo[] { this.mTank.getInfo() }; - } - - @Override - public final Packet getDescriptionPacket() { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); - } - - @Override - public final void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { - NBTTagCompound tag = pkt.func_148857_g(); - readFromNBT(tag); - } - - - public boolean hasFluidSpace() { - if (this.mTank.getFluidAmount() <= 1000) { - return true; - } - return false; - } - - public boolean drainCell() { - boolean didFill = false; - ItemStack aInput = this.getStackInSlot(0); - if (aInput == null) { - return false; - } - aInput = aInput.copy(); - if (aInput != null && (this.getStackInSlot(1) == null || this.getStackInSlot(1).stackSize < 64)) { - ArrayList t1Cells = OreDictionary.getOres("cellFormaldehyde"); - ArrayList t2Cells = OreDictionary.getOres("cellHydrogenCyanide"); - didFill = addFluid(t1Cells, aInput, FluidUtils.getWildcardFluidStack("formaldehyde", 1000)); - if (!didFill) { - didFill = addFluid(t2Cells, aInput, MISC_MATERIALS.HYDROGEN_CYANIDE.getFluidStack(1000)); - } - } - - return didFill; - } - - public boolean handleInventory() { - if (this.getInventory() != null && drainCell()) { - this.decrStackSize(0, 1); - if (this.getStackInSlot(1) == null) { - this.setInventorySlotContents(1, CI.emptyCells(1)); - } else { - this.getStackInSlot(1).stackSize++; - } - this.updateTileEntity(); - return true; - } else { - return false; - } - } - - public boolean addFluid(ArrayList inputs, ItemStack aInput, FluidStack aFluidForInput) { - for (ItemStack a : inputs) { - if (GT_Utility.areStacksEqual(a, aInput)) { - if (mTank.getFluid() == null || mTank.getFluid() - .isFluidEqual(aFluidForInput)) { - boolean didFill = fill(ForgeDirection.UNKNOWN, aFluidForInput, true) > 0; - return didFill; - } - } else { - continue; - } - } - return false; - } - - public void updateTileEntity() { - this.getInventory().markDirty(); - this.markDirty(); - this.mNeedsUpdate = true; - } - - private final void updateTick() { - if (mNeedsUpdate) { - if (mUpdateTick == 0) { - mUpdateTick = 4; // every 4 ticks it will send an update - } else { - --mUpdateTick; - if (mUpdateTick == 0) { - markDirty(); - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - mNeedsUpdate = false; - } - } - } - } - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java deleted file mode 100644 index 25348a31f8..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java +++ /dev/null @@ -1,147 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.passive.EntityAnimal; -import net.minecraft.entity.passive.EntityChicken; -import net.minecraft.entity.passive.EntityCow; -import net.minecraft.entity.passive.EntityHorse; -import net.minecraft.entity.passive.EntityMooshroom; -import net.minecraft.entity.passive.EntitySheep; -import net.minecraft.entity.passive.IAnimals; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; - -public class TileEntityPooCollector extends TileEntityBaseFluidCollector { - - public TileEntityPooCollector() { - super(9, 8000); - } - - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) { - return false; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) { - return true; - } - - public void onPreLogicTick() { - - } - - public boolean addDrop(V aPooMaker) { - int aChance = MathUtils.randInt(0, 50000); - if (aChance > 0) { - ItemStack aPoop; - if (aChance<= 100) { - aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); - } - else if (aChance <= 500) { - aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); - } - else if (aChance <= 1250) { - aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); - } - else { - return false; - } - if (!ItemUtils.checkForInvalidItems(aPoop)) { - return false; - } - - //Add poop to world - //Logger.INFO("Adding animal waste for "+aPooMaker.getCommandSenderName()); - - //Add to inventory if not full, else espawn in world - if (!this.mInventory.addItemStack(aPoop)) { - EntityItem entity = new EntityItem(worldObj, xCoord, yCoord+1.5, zCoord, aPoop); - worldObj.spawnEntityInWorld(entity); - } - - } - - - return false; - } - - private static AutoMap aEntityToDrain = new AutoMap(); - - @Override - public AutoMap aThingsToLookFor() { - if (aEntityToDrain.isEmpty()) { - aEntityToDrain.add(EntityAnimal.class); - aEntityToDrain.add(IAnimals.class); - } - return aEntityToDrain; - } - - @Override - public int onPostTick(V aPooMaker) { - if (this.tank.getFluidAmount() < this.tank.getCapacity()) { - int aPooAmount = 0; - // Vanilla Animals - if (aPooMaker instanceof EntityChicken) { - aPooAmount = MathUtils.randInt(1, 40); - } - else if (aPooMaker instanceof EntityHorse) { - aPooAmount = MathUtils.randInt(20, 40); - } - else if (aPooMaker instanceof EntityCow) { - aPooAmount = MathUtils.randInt(18, 45); - } - else if (aPooMaker instanceof EntityMooshroom) { - aPooAmount = 17; - } - else if (aPooMaker instanceof EntitySheep) { - aPooAmount = MathUtils.randInt(8, 30); - } - - else { - if (aPooMaker instanceof EntityAnimal || aPooMaker instanceof IAnimals) { - aPooAmount = MathUtils.randInt(5, 35); - } - else { - aPooAmount = MathUtils.randInt(1, 10); - } - } - aPooAmount = Math.max((Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount)/10), 1); - return aPooAmount; - } - else { - return 0; - } - } - - @Override - public Fluid fluidToProvide() { - return AgriculturalChem.PoopJuice; - } - - @Override - public ItemStack itemToSpawnInWorldIfTankIsFull() { - int a = MathUtils.randInt(0, 100); - ItemStack aItem = null; - if (a <= 30) { - aItem = ItemUtils.getSimpleStack(AgriculturalChem.dustDirt); - } - else if (a <= 40) { - aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); - } - else if (a <= 55) { - aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); - } - return aItem; - } - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java deleted file mode 100644 index 8c87baf6a9..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java +++ /dev/null @@ -1,288 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -import gregtech.api.enums.ItemList; -import gregtech.common.items.GT_MetaGenerated_Item_01; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.container.Container_ProjectTable; -import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain; -import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput; -import gtPlusPlus.core.item.bauble.ModularBauble; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; -import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; - -public class TileEntityProjectTable extends TileEntity implements INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - public InventoryProjectMain inventoryGrid; - public InventoryProjectOutput inventoryOutputs; - - /** The crafting matrix inventory (3x3). */ - public InventoryCrafting craftMatrix; - public IInventory craftResult; - private Container_ProjectTable container; - - public TileEntityProjectTable(){ - this.inventoryGrid = new InventoryProjectMain();//number of slots - without product slot - this.inventoryOutputs = new InventoryProjectOutput();//number of slots - without product slot - this.canUpdate(); - } - - public void setContainer(Container_ProjectTable container){ - this.container = container; - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt){ - super.writeToNBT(nbt); - nbt.setShort("facing", this.facing); - this.inventoryGrid.writeToNBT(this.getTag(nbt, "ContentsGrid")); - this.inventoryOutputs.writeToNBT(this.getTag(nbt, "ContentsOutput")); - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt){ - super.readFromNBT(nbt); - this.prevFacing = (this.facing = nbt.getShort("facing")); - this.inventoryGrid.readFromNBT(nbt.getCompoundTag("ContentsGrid")); - this.inventoryOutputs.readFromNBT(nbt.getCompoundTag("ContentsOutput")); - } - - @Override - public List getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side){ - return false; - } - - private short facing = 0; - public short prevFacing = 0; - - @Override - public void setFacing(final short facing1){ - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing(){ - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer){ - return true; - } - - @Override - public float getWrenchDropRate(){ - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer){ - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - this.prevFacing = this.facing; - - } - - @Override - public void updateEntity() { - if (!this.worldObj.isRemote){ - //Data stick - ItemStack dataStick = this.inventoryOutputs.getStackInSlot(0); - if (dataStick != null && this.container != null && container.getOutputContent() != null){ - if ((dataStick.getItem() instanceof GT_MetaGenerated_Item_01 && dataStick.getItemDamage() == 32708) - || (dataStick == ItemList.Tool_DataStick.get(1)) - || (dataStick == GregtechItemList.Old_Tool_DataStick.get(1)) - || (dataStick.getItem() instanceof MetaGeneratedGregtechItems && dataStick.getItemDamage() == 32208)){ - - Logger.INFO("Found Data Stick and valid container."); - - - ItemStack outputComponent = container.getOutputContent(); - ItemStack[] craftInputComponent = container.getInputComponents(); - - - ItemStack newStick = NBTUtils.writeItemsToNBT(dataStick, new ItemStack[]{outputComponent}, "Output"); - newStick = NBTUtils.writeItemsToNBT(newStick, craftInputComponent); - NBTUtils.setBookTitle(newStick, "Encrypted Project Data"); - NBTUtils.setBoolean(newStick, "mEncrypted", true); - int slotm=0; - Logger.WARNING("Uploading to Data Stick."); - for (ItemStack is : NBTUtils.readItemsFromNBT(newStick)){ - if (is != null){ - Logger.WARNING("Uploaded "+is.getDisplayName()+" into memory slot "+slotm+"."); - } - else { - Logger.WARNING("Left memory slot "+slotm+" blank."); - } - slotm++; - } - Logger.WARNING("Encrypting Data Stick."); - this.inventoryOutputs.setInventorySlotContents(1, newStick); - this.inventoryOutputs.setInventorySlotContents(0, null); - } - } - - //Utils.LOG_INFO("Doing thing 1"); - if (dataStick != null) - if (dataStick.getItem() instanceof ModularBauble){ - Logger.INFO("Doing thing 2"); - ItemStack tBauble = dataStick; - dataStick = null; - this.inventoryOutputs.setInventorySlotContents(0, dataStick); - if (this.inventoryGrid != null){ - Logger.INFO("Doing things"); - ItemStack[] tStack = container.getInputComponents(); - if (tStack != null){ - //Utils.LOG_INFO(""+tStack.length); - if (tBauble != null){ - for (int i=0;i 2222) { - aData = 2222; - } - String s = String.valueOf(aData); - StringBuilder aDataString = new StringBuilder(s); - int aIndex = aSide - 2; - if (aActive) { - aDataString.setCharAt(aIndex, '1'); - } - else { - aDataString.setCharAt(aIndex, '2'); - } - aData = Integer.valueOf(aDataString.toString()); - this.markDirty(); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - public boolean getSideActive(int aSide) { - this.markDirty(); - try { - if (aSide < 2) { - return false; - } - else { - if (aData < 1111) { - aData = 1111; - } - else if (aData > 2222) { - aData = 2222; - } - String s = String.valueOf(aData); - int aIndex = aSide - 2; - char ch = s.charAt(aIndex); - if (ch == '1') { - return true; - } - else { - return false; - } - - } - } - catch (Throwable t) { - t.printStackTrace(); - return false; - } - } - - @Override - public double getXPos() { - return this.locationX; - } - - @Override - public double getYPos() { - return this.locationY; - } - - @Override - public double getZPos() { - return this.locationZ; - } - - - - - - - - - // TODO - - - - /* - * Hopper Code - */ - - - private ItemStack[] aHopperInventory = new ItemStack[5]; - - public int getSizeInventory() { - return this.aHopperInventory.length; - } - - public ItemStack getStackInSlot(int aSlot) { - return this.aHopperInventory[aSlot]; - } - - /** - * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a - * new stack. - */ - public ItemStack decrStackSize(int aSlot, int aMinimumSizeOfExistingStack) - { - if (this.aHopperInventory[aSlot] != null) - { - ItemStack itemstack; - - if (this.aHopperInventory[aSlot].stackSize <= aMinimumSizeOfExistingStack) - { - itemstack = this.aHopperInventory[aSlot]; - this.aHopperInventory[aSlot] = null; - return itemstack; - } - else - { - itemstack = this.aHopperInventory[aSlot].splitStack(aMinimumSizeOfExistingStack); - - if (this.aHopperInventory[aSlot].stackSize == 0) - { - this.aHopperInventory[aSlot] = null; - } - - return itemstack; - } - } - else - { - return null; - } - } - - /** - * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - - * like when you close a workbench GUI. - */ - public ItemStack getStackInSlotOnClosing(int aSlot) - { - if (this.aHopperInventory[aSlot] != null) - { - ItemStack itemstack = this.aHopperInventory[aSlot]; - this.aHopperInventory[aSlot] = null; - return itemstack; - } - else - { - return null; - } - } - - /** - * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). - */ - public void setInventorySlotContents(int aSlot, ItemStack aStack) - { - this.aHopperInventory[aSlot] = aStack; - - if (aStack != null && aStack.stackSize > this.getInventoryStackLimit()) - { - aStack.stackSize = this.getInventoryStackLimit(); - } - } - - public boolean tryProcessItems() { - if (this.worldObj != null && !this.worldObj.isRemote) { - boolean didSomething = false; - if (!this.isEmpty()) { - Logger.WARNING("Has Items, Trying to push to all active directions."); - didSomething = this.tryPushItemsIntoNeighbours(); - } - if (didSomething) { - this.markDirty(); - return true; - } - } - return false; - } - - /** - * Is Empty - * @return - */ - private boolean isEmpty() { - ItemStack[] aitemstack = this.aHopperInventory; - int i = aitemstack.length; - - for (int j = 0; j < i; ++j) { - ItemStack itemstack = aitemstack[j]; - - if (itemstack != null) { - return false; - } - } - - return true; - } - - private boolean tryPushItemsIntoNeighbours() { - - boolean aDidPush = false; - - for (int u = 2; u < 6; u++) { - if (!this.getSideActive(u)) { - Logger.WARNING("Not pushing on side "+u); - continue; - } - - Logger.WARNING("Pushing on side "+u); - IInventory iinventory = this.getInventoryFromFacing(u); - - if (iinventory == null) { - Logger.WARNING("No inventory found."); - continue; - } - else { - - int i = Facing.oppositeSide[u]; - Logger.WARNING("Using Opposite direction: "+i); - - if (this.isInventoryFull(iinventory, i)) { - Logger.WARNING("Target is full, skipping."); - continue; - } - else { - Logger.WARNING("Target has space, let's move a single item."); - for (int j = 0; j < this.getSizeInventory(); ++j) { - if (this.getStackInSlot(j) != null) { - ItemStack itemstack = this.getStackInSlot(j).copy(); - ItemStack itemstack1 = setStackInNeighbour(iinventory, this.decrStackSize(j, 1), i); - if (itemstack1 == null || itemstack1.stackSize == 0) { - iinventory.markDirty(); - aDidPush = true; - continue; - } - this.setInventorySlotContents(j, itemstack); - } - } - } - } - } - - return aDidPush; - } - - private boolean isInventoryFull(IInventory aInv, int aSide) { - if (aInv instanceof ISidedInventory && aSide > -1) { - ISidedInventory isidedinventory = (ISidedInventory)aInv; - int[] aint = isidedinventory.getAccessibleSlotsFromSide(aSide); - - for (int l = 0; l < aint.length; ++l) - { - ItemStack itemstack1 = isidedinventory.getStackInSlot(aint[l]); - - if (itemstack1 == null || itemstack1.stackSize != itemstack1.getMaxStackSize()) - { - return false; - } - } - } - else { - int j = aInv.getSizeInventory(); - - for (int k = 0; k < j; ++k) - { - ItemStack itemstack = aInv.getStackInSlot(k); - - if (itemstack == null || itemstack.stackSize != itemstack.getMaxStackSize()) - { - return false; - } - } - } - return true; - } - - public static ItemStack setStackInNeighbour(IInventory aNeighbour, ItemStack aStack, int aSide) { - if (aNeighbour instanceof ISidedInventory && aSide > -1) - { - ISidedInventory isidedinventory = (ISidedInventory)aNeighbour; - int[] aint = isidedinventory.getAccessibleSlotsFromSide(aSide); - - for (int l = 0; l < aint.length && aStack != null && aStack.stackSize > 0; ++l) - { - aStack = tryMoveStack(aNeighbour, aStack, aint[l], aSide); - } - } - else - { - int j = aNeighbour.getSizeInventory(); - - for (int k = 0; k < j && aStack != null && aStack.stackSize > 0; ++k) - { - aStack = tryMoveStack(aNeighbour, aStack, k, aSide); - } - } - - if (aStack != null && aStack.stackSize == 0) - { - aStack = null; - } - - return aStack; - } - - private static boolean canInsertItemIntoNeighbour(IInventory aNeighbour, ItemStack aStack, int aSlot, int aSide) { - return !aNeighbour.isItemValidForSlot(aSlot, aStack) ? false : !(aNeighbour instanceof ISidedInventory) || ((ISidedInventory)aNeighbour).canInsertItem(aSlot, aStack, aSide); - } - - private static ItemStack tryMoveStack(IInventory aNeighbour, ItemStack aStack, int aSlot, int aSide) { - ItemStack itemstack1 = aNeighbour.getStackInSlot(aSlot); - if (canInsertItemIntoNeighbour(aNeighbour, aStack, aSlot, aSide)) { - boolean aDidSomething = false; - if (itemstack1 == null) { - //Forge: BUGFIX: Again, make things respect max stack sizes. - int max = Math.min(aStack.getMaxStackSize(), aNeighbour.getInventoryStackLimit()); - if (max >= aStack.stackSize) { - aNeighbour.setInventorySlotContents(aSlot, aStack); - aStack = null; - } - else { - aNeighbour.setInventorySlotContents(aSlot, aStack.splitStack(max)); - } - aDidSomething = true; - } - else if (areItemStacksEqual(itemstack1, aStack)) { - //Forge: BUGFIX: Again, make things respect max stack sizes. - int max = Math.min(aStack.getMaxStackSize(), aNeighbour.getInventoryStackLimit()); - if (max > itemstack1.stackSize) { - int l = Math.min(aStack.stackSize, max - itemstack1.stackSize); - aStack.stackSize -= l; - itemstack1.stackSize += l; - aDidSomething = l > 0; - } - } - if (aDidSomething){ - aNeighbour.markDirty(); - } - } - return aStack; - } - - private IInventory getInventoryFromFacing(int aSide) - { - int i = aSide; - return tryFindInvetoryAtXYZ(this.getWorldObj(), (double)(this.xCoord + Facing.offsetsXForSide[i]), (double)(this.yCoord + Facing.offsetsYForSide[i]), (double)(this.zCoord + Facing.offsetsZForSide[i])); - } - - public static IInventory tryFindInvetoryAtXYZ(World aWorld, double aX, double aY, double aZ) - { - IInventory iinventory = null; - int sX = MathHelper.floor_double(aX); - int sY = MathHelper.floor_double(aY); - int sZ = MathHelper.floor_double(aZ); - TileEntity tileentity = aWorld.getTileEntity(sX, sY, sZ); - - if (tileentity != null && tileentity instanceof IInventory) - { - iinventory = (IInventory)tileentity; - - if (iinventory instanceof TileEntityChest) - { - Block block = aWorld.getBlock(sX, sY, sZ); - - if (block instanceof BlockChest) - { - iinventory = ((BlockChest)block).func_149951_m(aWorld, sX, sY, sZ); - } - } - } - - if (iinventory == null) - { - List list = aWorld.getEntitiesWithinAABBExcludingEntity((Entity)null, AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1.0D, aY + 1.0D, aZ + 1.0D), IEntitySelector.selectInventories); - - if (list != null && list.size() > 0) - { - iinventory = (IInventory)list.get(aWorld.rand.nextInt(list.size())); - } - } - - return iinventory; - } - - private static boolean areItemStacksEqual(ItemStack aStack, ItemStack aStack2) { - return aStack.getItem() != aStack2.getItem() ? false : (aStack.getItemDamage() != aStack2.getItemDamage() ? false : (aStack.stackSize > aStack.getMaxStackSize() ? false : ItemStack.areItemStackTagsEqual(aStack, aStack2))); - } - - public void readFromNBT2(NBTTagCompound p_145839_1_) { - super.readFromNBT(p_145839_1_); - NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); - this.aHopperInventory = new ItemStack[this.getSizeInventory()]; - for (int i = 0; i < nbttaglist.tagCount(); ++i) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte b0 = nbttagcompound1.getByte("Slot"); - if (b0 >= 0 && b0 < this.aHopperInventory.length) { - this.aHopperInventory[b0] = ItemStack.loadItemStackFromNBT( - nbttagcompound1 - ); - } - } - } - - public void writeToNBT2(NBTTagCompound aNBT) { - super.writeToNBT(aNBT); - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < this.aHopperInventory.length; ++i) { - if (this.aHopperInventory[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - this.aHopperInventory[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - aNBT.setTag("Items", nbttaglist); - } - - - - - - - -} diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java deleted file mode 100644 index ad7ec3d0b3..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java +++ /dev/null @@ -1,133 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gtPlusPlus.core.container.Container_TradeTable; -import gtPlusPlus.core.inventories.tradetable.InventoryTradeMain; -import gtPlusPlus.core.inventories.tradetable.InventoryTradeOutput; -import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.util.minecraft.NBTUtils; - -public class TileEntityTradeTable extends TileEntityBase { - - public InventoryTradeMain inventoryGrid; - public InventoryTradeOutput inventoryOutputs; - - private Container_TradeTable container; - - public TileEntityTradeTable(){ - super(2); - this.inventoryGrid = new InventoryTradeMain();//number of slots - without product slot - this.inventoryOutputs = new InventoryTradeOutput();//number of slots - without product slot - } - - public void setContainer(Container_TradeTable container_TradeTable){ - this.container = container_TradeTable; - } - - @Override - public void writeToNBT(final NBTTagCompound nbt){ - super.writeToNBT(nbt); - this.inventoryGrid.writeToNBT(this.getTag(nbt, "ContentsGrid")); - this.inventoryOutputs.writeToNBT(this.getTag(nbt, "ContentsOutput")); - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt){ - this.inventoryGrid.readFromNBT(nbt); - this.inventoryOutputs.readFromNBT(nbt); - super.readFromNBT(nbt); - } - - @Override - public void updateEntity() { - if (!this.worldObj.isRemote){ - ItemStack slot0; - try{ - - slot0 = this.inventoryOutputs.getStackInSlot(0); - if (slot0 != null && slot0.hasTagCompound()){ - NBTUtils.tryIterateNBTData(slot0); - this.inventoryOutputs.setInventorySlotContents(0, null); - this.inventoryOutputs.setInventorySlotContents(1, slot0); - } - - } - catch (Throwable t){ - t.printStackTrace(); - this.inventoryOutputs.setInventorySlotContents(0, null); - } - - } - super.updateEntity(); - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { - - } - - @Override - public int getInventoryStackLimit() { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void openInventory() { - - } - - @Override - public void closeInventory() { - - } - - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { - return false; - } - - @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java deleted file mode 100644 index a2db2326a9..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java +++ /dev/null @@ -1,172 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.inventories.InventoryWorkbenchChest; -import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; -import gtPlusPlus.core.inventories.InventoryWorkbenchTools; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; - -public class TileEntityWorkbench extends TileEntity implements INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. - - public InventoryWorkbenchChest inventoryChest; - public InventoryWorkbenchTools inventoryTool; - public InventoryWorkbenchHoloSlots inventoryHolo; - //public InventoryWorkbenchHoloCrafting inventoryCrafting; - - public IInventory inventoryCraftResult = new InventoryCraftResult(); - - public TileEntityWorkbench(){ - this.inventoryTool = new InventoryWorkbenchTools();//number of slots - without product slot - this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot - this.inventoryHolo = new InventoryWorkbenchHoloSlots(); - //this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); - this.canUpdate(); - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) - { - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) - { - super.writeToNBT(nbt); - - nbt.setShort("facing", this.facing); - - this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); - this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); - //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); - this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); - - // Write Crafting Matrix to NBT - final NBTTagList craftingTag = new NBTTagList(); - /*for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { - if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { - final NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); - craftingTag.appendTag(tagCompound); - } - }*/ - - nbt.setTag("CraftingMatrix", craftingTag); - // Write craftingResult to NBT - if (this.inventoryCraftResult.getStackInSlot(0) != null) { - nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); - } - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) - { - super.readFromNBT(nbt); - - this.prevFacing = (this.facing = nbt.getShort("facing")); - - this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); - //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); - this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); - - // Read in the Crafting Matrix from NBT - final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); - /*this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number - for (int i = 0; i < craftingTag.tagCount(); ++i) { - final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); - final byte slot = tagCompound.getByte("Slot"); - if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - }*/ - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public List getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - private short facing = 0; - public short prevFacing = 0; - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java deleted file mode 100644 index 264323388f..0000000000 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.inventories.*; -import ic2.api.energy.event.EnergyTileLoadEvent; -import ic2.api.energy.event.EnergyTileUnloadEvent; -import ic2.api.energy.tile.IEnergySink; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileEntityWorkbenchAdvanced extends TileEntity implements IEnergySink, INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. - - public InventoryWorkbenchChest inventoryChest; - public InventoryWorkbenchToolsElectric inventoryTool; - public InventoryWorkbenchHoloSlots inventoryHolo; - public InventoryWorkbenchHoloCrafting inventoryCrafting; - - public IInventory inventoryCraftResult = new InventoryCraftResult(); - - //Wrench Code - private short facing = 0; - public short prevFacing = 0; - - //E-Net Code - public double energy = 0.0D; - public int maxEnergy; - private boolean addedToEnergyNet = false; - private int tier; - private float guiChargeLevel; - - - public TileEntityWorkbenchAdvanced(final int maxenergy, final int tier1){ - this.inventoryTool = new InventoryWorkbenchToolsElectric();//number of slots - without product slot - this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot - this.inventoryHolo = new InventoryWorkbenchHoloSlots(); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); - this.canUpdate(); - - //Electric Stats - this.maxEnergy = maxenergy; - this.tier = tier1; - - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) - { - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) - { - super.writeToNBT(nbt); - nbt.setDouble("energy", this.energy); - nbt.setShort("facing", this.facing); - - this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); - this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); - //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); - this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); - - // Write Crafting Matrix to NBT - final NBTTagList craftingTag = new NBTTagList(); - for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { - if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { - final NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); - craftingTag.appendTag(tagCompound); - } - } - - nbt.setTag("CraftingMatrix", craftingTag); - // Write craftingResult to NBT - if (this.inventoryCraftResult.getStackInSlot(0) != null) { - nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); - } - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) - { - super.readFromNBT(nbt); - this.energy = nbt.getDouble("energy"); - - this.prevFacing = (this.facing = nbt.getShort("facing")); - - this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); - //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); - this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); - - // Read in the Crafting Matrix from NBT - final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number - for (int i = 0; i < craftingTag.tagCount(); ++i) { - final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); - final byte slot = tagCompound.getByte("Slot"); - if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - } - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public boolean acceptsEnergyFrom(final TileEntity emitter, final ForgeDirection direction) - { - return true; - } - - @Override - public double getDemandedEnergy() - { - return this.maxEnergy - this.energy; - } - - @Override - public int getSinkTier() - { - return this.tier; - } - - @Override - public double injectEnergy(final ForgeDirection directionFrom, final double amount, final double voltage) - { - if (this.energy >= this.maxEnergy) { - return amount; - } - this.energy += amount; - return 0.0D; - } - - public final float getChargeLevel() - { - return this.guiChargeLevel; - } - - public void setTier(final int tier1) - { - if (this.tier == tier1) { - return; - } - final boolean addedToENet = this.addedToEnergyNet; - if (addedToENet) - { - MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - this.addedToEnergyNet = false; - } - this.tier = tier1; - - for (int i=0; i getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java deleted file mode 100644 index 81b23e0b1c..0000000000 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ /dev/null @@ -1,946 +0,0 @@ -package gtPlusPlus.core.util; - -import java.awt.Color; -import java.awt.Graphics; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.ObjectOutput; -import java.io.ObjectOutputStream; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Timer; -import java.util.TimerTask; - -import javax.xml.bind.DatatypeConverter; - -import org.apache.commons.lang3.EnumUtils; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TC_Aspects; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.core.util.sys.SystemUtils; -import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; -import ic2.core.Ic2Items; -import ic2.core.init.InternalName; -import ic2.core.item.resources.ItemCell; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.IChatComponent; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -public class Utils { - - public static final int WILDCARD_VALUE = Short.MAX_VALUE; - - public static final boolean isServer() { - return FMLCommonHandler.instance().getEffectiveSide().isServer(); - } - - public static final boolean isClient() { - return FMLCommonHandler.instance().getEffectiveSide().isClient(); - } - - static class ShortTimerTask extends TimerTask { - @Override - public void run() { - Logger.WARNING("Timer expired."); - } - } - - public static TC_AspectStack getTcAspectStack(final TC_Aspects aspect, final long size) { - return getTcAspectStack(aspect.name(), (int) size); - } - - public static TC_AspectStack getTcAspectStack(final String aspect, final long size) { - return getTcAspectStack(aspect, (int) size); - } - - public static TC_AspectStack getTcAspectStack(final TC_Aspects aspect, final int size) { - return getTcAspectStack(aspect.name(), size); - } - - public static TC_AspectStack getTcAspectStack(final String aspect, final int size) { - - TC_AspectStack returnValue = null; - - if (aspect.toUpperCase().equals("COGNITIO")) { - // Adds in Compat for older GT Versions which Misspell aspects. - try { - if (EnumUtils.isValidEnum(TC_Aspects.class, "COGNITIO")) { - Logger.WARNING("TC Aspect found - " + aspect); - returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITIO"), size); - } else { - Logger.INFO("Fallback TC Aspect found - " + aspect - + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); - returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITO"), size); - } - } catch (final NoSuchFieldError r) { - Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); - } - } else if (aspect.toUpperCase().equals("EXANIMUS")) { - // Adds in Compat for older GT Versions which Misspell aspects. - try { - if (EnumUtils.isValidEnum(TC_Aspects.class, "EXANIMUS")) { - Logger.WARNING("TC Aspect found - " + aspect); - returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXANIMUS"), size); - } else { - Logger.INFO("Fallback TC Aspect found - " + aspect - + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); - returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXAMINIS"), size); - } - } catch (final NoSuchFieldError r) { - Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); - } - - } else if (aspect.toUpperCase().equals("PRAECANTATIO")) { - // Adds in Compat for older GT Versions which Misspell aspects. - try { - if (EnumUtils.isValidEnum(TC_Aspects.class, "PRAECANTATIO")) { - Logger.WARNING("TC Aspect found - " + aspect); - returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTATIO"), size); - } else { - Logger.INFO("Fallback TC Aspect found - " + aspect - + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); - returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTIO"), size); - } - } catch (final NoSuchFieldError r) { - Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); - } - } else { - Logger.WARNING("TC Aspect found - " + aspect); - returnValue = new TC_AspectStack(TC_Aspects.valueOf(aspect), size); - } - - return returnValue; - } - - public static boolean containsMatch(final boolean strict, final ItemStack[] inputs, final ItemStack... targets) { - for (final ItemStack input : inputs) { - for (final ItemStack target : targets) { - if (itemMatches(target, input, strict)) { - return true; - } - } - } - return false; - } - - public static boolean itemMatches(final ItemStack target, final ItemStack input, final boolean strict) { - if ((input == null) || (target == null)) { - return false; - } - return ((target.getItem() == input.getItem()) && (((target.getItemDamage() == WILDCARD_VALUE) && !strict) - || (target.getItemDamage() == input.getItemDamage()))); - } - - //Register an event to both busses. - public static void registerEvent(Object o){ - MinecraftForge.EVENT_BUS.register(o); - FMLCommonHandler.instance().bus().register(o); - } - - public static void paintBox(final Graphics g, final int MinA, final int MinB, final int MaxA, final int MaxB) { - g.drawRect(MinA, MinB, MaxA, MaxB); - } - - // Send a message to all players on the server - public static void sendServerMessage(final String translationKey) { - sendServerMessage(new ChatComponentText(translationKey)); - } - - // Send a message to all players on the server - public static void sendServerMessage(final IChatComponent chatComponent) { - MinecraftServer.getServer().getConfigurationManager().sendChatMsg(chatComponent); - } - - /** - * Returns if that Liquid is IC2Steam. - */ - public static boolean isIC2Steam(final FluidStack aFluid) { - if (aFluid == null) { - return false; - } - return aFluid.isFluidEqual(getIC2Steam(1)); - } - - /** - * Returns a Liquid Stack with given amount of IC2Steam. - */ - public static FluidStack getIC2Steam(final long aAmount) { - return FluidRegistry.getFluidStack("ic2steam", (int) aAmount); - } - - /* - * public static void recipeBuilderBlock(ItemStack slot_1, ItemStack slot_2, - * ItemStack slot_3, ItemStack slot_4, ItemStack slot_5, ItemStack slot_6, - * ItemStack slot_7, ItemStack slot_8, ItemStack slot_9, Block resultBlock){ - * GameRegistry.addRecipe(new ItemStack(resultBlock), new Object[] {"ABC", - * "DEF", "GHI", 'A',slot_1,'B',slot_2,'C',slot_3, - * 'D',slot_4,'E',slot_5,'F',slot_6, 'G',slot_7,'H',slot_8,'I',slot_9 }); } - */ - - public static String checkCorrectMiningToolForBlock(final Block currentBlock, final World currentWorld) { - String correctTool = ""; - if (!currentWorld.isRemote) { - try { - correctTool = currentBlock.getHarvestTool(0); - Logger.WARNING(correctTool); - - } catch (final NullPointerException e) { - - } - } - - return correctTool; - } - - /** - * - * @param colourStr - * e.g. "#FFFFFF" - * @return String - formatted "rgb(0,0,0)" - */ - public static String hex2RgbFormatted(final String hexString) { - final Color c = new Color(Integer.valueOf(hexString.substring(1, 3), 16), - Integer.valueOf(hexString.substring(3, 5), 16), Integer.valueOf(hexString.substring(5, 7), 16)); - - final StringBuffer sb = new StringBuffer(); - sb.append("rgb("); - sb.append(c.getRed()); - sb.append(","); - sb.append(c.getGreen()); - sb.append(","); - sb.append(c.getBlue()); - sb.append(")"); - return sb.toString(); - } - - /** - * - * @param colourStr - * e.g. "#FFFFFF" - * @return - */ - public static Color hex2Rgb(final String colorStr) { - return new Color(Integer.valueOf(colorStr.substring(1, 3), 16), Integer.valueOf(colorStr.substring(3, 5), 16), - Integer.valueOf(colorStr.substring(5, 7), 16)); - } - - /** - * - * @param colourInt - * e.g. 0XFFFFFF - * @return Colour - */ - public static Color hex2Rgb(final int colourInt) { - return Color.decode(String.valueOf(colourInt)); - } - - /** - * - * @param colourInt - * e.g. 0XFFFFFF - * @return short[] - */ - public static short[] hex2RgbShort(final int colourInt) { - final Color rgb = Color.decode(String.valueOf(colourInt)); - final short[] rgba = { (short) rgb.getRed(), (short) rgb.getGreen(), (short) rgb.getBlue(), - (short) rgb.getAlpha() }; - return rgba; - } - - public static Timer ShortTimer(final int seconds) { - Timer timer; - timer = new Timer(); - timer.schedule(new ShortTimerTask(), seconds * 1000); - return timer; - } - - public static String byteToHex(final byte b) { - final int i = b & 0xFF; - return Integer.toHexString(i); - } - - public static Object[] convertListToArray(final List sourceList) { - final Object[] targetArray = sourceList.toArray(new Object[sourceList.size()]); - return targetArray; - } - - public static List convertArrayToFixedSizeList(final Object[] sourceArray) { - final List targetList = Arrays.asList(sourceArray); - return targetList; - } - - public static List convertArrayToList(final Object[] sourceArray) { - final List targetList = new ArrayList<>(Arrays.asList(sourceArray)); - return targetList; - } - - public static List convertArrayListToList(final ArrayList sourceArray) { - final List targetList = new ArrayList(Arrays.asList(sourceArray)); - return targetList; - } - - public static void spawnCustomParticle(final Entity entity) { - GTplusplus.proxy.generateMysteriousParticles(entity); - } - - public static void spawnFX(final World world, final int x, final int y, final int z, final String particleName, - Object particleName2) { - if (!world.isRemote) { - if ((particleName2 == null) || particleName2.equals("")) { - particleName2 = particleName; - } - final int l = MathUtils.randInt(0, 4); - final double d0 = x + 0.5F; - final double d1 = y + 0.7F; - final double d2 = z + 0.5F; - final double d3 = 0.2199999988079071D; - final double d4 = 0.27000001072883606D; - - if (l == 1) { - world.spawnParticle(particleName, d0 - d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D); - } else if (l == 2) { - world.spawnParticle((String) particleName2, d0 + d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D); - } else if (l == 3) { - world.spawnParticle(particleName, d0, d1 + d3, d2 - d4, 0.0D, 0.0D, 0.0D); - } else if (l == 4) { - world.spawnParticle((String) particleName2, d0, d1 + d3, d2 + d4, 0.0D, 0.0D, 0.0D); - } else { - world.spawnParticle(particleName, d0, d1, d2, 0.0D, 0.0D, 0.0D); - if (particleName2 != null) { - world.spawnParticle((String) particleName2, d0, d1, d2, 0.0D, 0.0D, 0.0D); - } - } - } - } - - public static int rgbtoHexValue(final int r, final int g, final int b) { - if ((r > 255) || (g > 255) || (b > 255) || (r < 0) || (g < 0) || (b < 0)) { - return 0; - } - final Color c = new Color(r, g, b); - String temp = Integer.toHexString(c.getRGB() & 0xFFFFFF).toUpperCase(); - temp = Utils.appenedHexNotationToString(String.valueOf(temp)); - Logger.WARNING("Made " + temp + " - Hopefully it's not a mess."); - Logger.WARNING("It will decode into " + Integer.decode(temp) + "."); - return Integer.decode(temp); - } - - /* - * http://javadevnotes.com/java-left-pad-string-with-zeros-examples - */ - public static String padWithZerosLefts(final String originalString, final int length) { - final StringBuilder sb = new StringBuilder(); - while ((sb.length() + originalString.length()) < length) { - sb.append('0'); - } - sb.append(originalString); - final String paddedString = sb.toString(); - return paddedString; - } - - public static String padWithZerosRight(final int value, final int length) { - String originalString = String.valueOf(value); - final StringBuilder sb = new StringBuilder(); - while ((sb.length() + originalString.length()) < length) { - sb.append('0'); - } - //sb.append(originalString); - if (sb.length() > 0) - originalString = (originalString + sb.toString()); - final String paddedString = sb.toString(); - return originalString; - } - - /* - * Original Code by Chandana Napagoda - - * https://cnapagoda.blogspot.com.au/2011/03/java-hex-color-code-generator. - * html - */ - public static Map hexColourGenerator(final int colorCount) { - final int maxColorValue = 16777215; - // this is decimal value of the "FFFFFF" - final int devidedvalue = maxColorValue / colorCount; - int countValue = 0; - final HashMap hexColorMap = new HashMap<>(); - for (int a = 0; (a < colorCount) && (maxColorValue >= countValue); a++) { - if (a != 0) { - countValue += devidedvalue; - hexColorMap.put(a, Integer.toHexString(0x10000 | countValue).substring(1).toUpperCase()); - } else { - hexColorMap.put(a, Integer.toHexString(0x10000 | countValue).substring(1).toUpperCase()); - } - } - return hexColorMap; - } - - /* - * Original Code by Chandana Napagoda - - * https://cnapagoda.blogspot.com.au/2011/03/java-hex-color-code-generator. - * html - */ - public static Map hexColourGeneratorRandom(final int colorCount) { - final HashMap hexColorMap = new HashMap<>(); - for (int a = 0; a < colorCount; a++) { - String code = "" + (int) (Math.random() * 256); - code = code + code + code; - final int i = Integer.parseInt(code); - hexColorMap.put(a, Integer.toHexString(0x1000000 | i).substring(1).toUpperCase()); - Logger.WARNING("" + Integer.toHexString(0x1000000 | i).substring(1).toUpperCase()); - } - return hexColorMap; - } - - public static String appenedHexNotationToString(final Object hexAsStringOrInt) { - final String hexChar = "0x"; - String result; - if (hexAsStringOrInt.getClass() == String.class) { - - if (((String) hexAsStringOrInt).length() != 6) { - final String temp = padWithZerosLefts((String) hexAsStringOrInt, 6); - result = temp; - } - result = hexChar + hexAsStringOrInt; - return result; - } else if (hexAsStringOrInt.getClass() == Integer.class || hexAsStringOrInt.getClass() == int.class) { - String aa = String.valueOf(hexAsStringOrInt); - if (aa.length() != 6) { - final String temp = padWithZerosLefts(aa, 6); - result = temp; - } - else { - result = hexChar + String.valueOf(hexAsStringOrInt); - } - return result; - } else { - return null; - } - } - - public static Integer appenedHexNotationToInteger(final int hexAsStringOrInt) { - final String hexChar = "0x"; - String result; - Logger.WARNING(String.valueOf(hexAsStringOrInt)); - result = hexChar + String.valueOf(hexAsStringOrInt); - return Integer.getInteger(result); - } - - public static boolean doesEntryExistAlreadyInOreDictionary(final String OreDictName) { - if (OreDictionary.getOres(OreDictName).size() != 0) { - return true; - } - return false; - } - - public static boolean invertBoolean(final boolean booleans) { - if (booleans == true) { - return false; - } - return true; - } - - public static File getMcDir() { - if (Utils.isClient()) { - if (Minecraft.getMinecraft() != null) { - return Minecraft.getMinecraft().mcDataDir; - } - } - return new File("."); - } - - private static short cellID = 15; - - public static ItemStack createInternalNameAndFluidCell(final String s) { - Logger.WARNING("1"); - final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]); - Logger.WARNING("2 " + yourName.name()); - final ItemCell item = (ItemCell) Ic2Items.cell.getItem(); - Logger.WARNING("3 " + item.getUnlocalizedName()); - try { - Logger.WARNING("4"); - final Class clz = item.getClass(); - Logger.WARNING("5 " + clz.getSimpleName()); - final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class); - Logger.WARNING("6 " + methode.getName()); - methode.setAccessible(true); - Logger.WARNING("7 " + methode.isAccessible()); - final ItemStack temp = (ItemStack) methode.invoke(item, cellID++, yourName, new Block[0]); - Logger.WARNING("Successfully created " + temp.getDisplayName() + "s."); - FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 1000), temp.copy(), - Ic2Items.cell.copy()); - ItemUtils.addItemToOreDictionary(temp.copy(), "cell" + s); - return temp; - } catch (final Exception e) { - e.printStackTrace(); - } - return null; - } - - public static ItemStack createInternalNameAndFluidCellNoOreDict(final String s) { - Logger.WARNING("1"); - final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]); - Logger.WARNING("2 " + yourName.name()); - final ItemCell item = (ItemCell) Ic2Items.cell.getItem(); - Logger.WARNING("3 " + item.getUnlocalizedName()); - try { - Logger.WARNING("4"); - final Class clz = item.getClass(); - Logger.WARNING("5 " + clz.getSimpleName()); - final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class); - Logger.WARNING("6 " + methode.getName()); - methode.setAccessible(true); - Logger.WARNING("7 " + methode.isAccessible()); - final ItemStack temp = (ItemStack) methode.invoke(item, cellID++, yourName, new Block[0]); - Logger.WARNING("Successfully created " + temp.getDisplayName() + "s."); - FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 1000), temp.copy(), - Ic2Items.cell.copy()); - // ItemUtils.addItemToOreDictionary(temp.copy(), "cell"+s); - return temp; - } catch (final Exception e) { - e.printStackTrace(); - } - return null; - } - - public static String sanitizeString(final String input, final char[] aDontRemove) { - - String output; - AutoMap aToRemoveMap = new AutoMap(); - - aToRemoveMap.put(" "); - aToRemoveMap.put("-"); - aToRemoveMap.put("_"); - aToRemoveMap.put("~"); - aToRemoveMap.put("?"); - aToRemoveMap.put("!"); - aToRemoveMap.put("@"); - aToRemoveMap.put("#"); - aToRemoveMap.put("$"); - aToRemoveMap.put("%"); - aToRemoveMap.put("^"); - aToRemoveMap.put("&"); - aToRemoveMap.put("*"); - aToRemoveMap.put("("); - aToRemoveMap.put(")"); - aToRemoveMap.put("{"); - aToRemoveMap.put("}"); - aToRemoveMap.put("["); - aToRemoveMap.put("]"); - aToRemoveMap.put(" "); - - for (String s : aToRemoveMap) { - for (char e : aDontRemove) { - if (s.charAt(0) == e) { - aToRemoveMap.remove("s"); - } - } - } - output = input; - for (String A : aToRemoveMap) { - output = output.replace(A, ""); - } - return output; - - } - - public static String sanitizeString(final String input) { - String temp; - String output; - - temp = input.replace(" ", ""); - temp = temp.replace("-", ""); - temp = temp.replace("_", ""); - temp = temp.replace("?", ""); - temp = temp.replace("!", ""); - temp = temp.replace("@", ""); - temp = temp.replace("#", ""); - temp = temp.replace("(", ""); - temp = temp.replace(")", ""); - temp = temp.replace("{", ""); - temp = temp.replace("}", ""); - temp = temp.replace("[", ""); - temp = temp.replace("]", ""); - temp = temp.replace(" ", ""); - output = temp; - return output; - - } - - public static String sanitizeStringKeepBrackets(final String input) { - String temp; - String output; - - temp = input.replace(" ", ""); - temp = temp.replace("-", ""); - temp = temp.replace("_", ""); - temp = temp.replace("?", ""); - temp = temp.replace("!", ""); - temp = temp.replace("@", ""); - temp = temp.replace("#", ""); - temp = temp.replace(" ", ""); - output = temp; - return output; - - } - - public static String[] parseVersion(final String version) { - return parseVersion(version, "//."); - } - - public static String[] parseVersion(final String version, final String delimiter) { - final String[] versionArray = version.split(delimiter); - return versionArray; - } - - public static Versioning compareModVersion(final String currentVersion, final String expectedVersion) { - return compareModVersion(currentVersion, expectedVersion, "//."); - } - - public static Versioning compareModVersion(final String currentVersion, final String expectedVersion, - final String delimiter) { - final String[] a = parseVersion(currentVersion, delimiter); - final String[] b = parseVersion(expectedVersion, delimiter); - final int[] c = new int[a.length]; - final int[] d = new int[b.length]; - for (int r = 0; r < a.length; r++) { - c[r] = Integer.parseInt(a[r]); - } - for (int r = 0; r < b.length; r++) { - d[r] = Integer.parseInt(b[r]); - } - final Versioning[] e = new Versioning[MathUtils.returnLargestNumber(c.length, d.length)]; - for (int r = 0; r < e.length; r++) { - - if (c[r] > d[r]) { - e[r] = Versioning.NEWER; - } else if (c[r] < d[r]) { - e[r] = Versioning.OLDER; - } else if (c[r] == d[r]) { - e[r] = Versioning.EQUAL; - } - } - - for (int r = 0; r < e.length; r++) { - if (e[0] == Versioning.NEWER) { - return Versioning.NEWER; - } else if (e[0] == Versioning.OLDER) { - return Versioning.OLDER; - } else { - if (e[r] == Versioning.OLDER) { - - } - - return Versioning.NEWER; - } - } - - return null; - } - - public static ToolMaterial generateToolMaterialFromGT(final Materials gtMaterial) { - final String name = Utils.sanitizeString(gtMaterial.mDefaultLocalName); - final int harvestLevel = gtMaterial.mToolQuality; - final int durability = gtMaterial.mDurability; - final float damage = gtMaterial.mToolQuality; - final int efficiency = (int) gtMaterial.mToolSpeed; - final int enchantability = gtMaterial.mEnchantmentToolsLevel; - final ToolMaterial temp = EnumHelper.addToolMaterial(name, harvestLevel, durability, efficiency, damage, - enchantability); - return temp; - - } - - public static ToolMaterial generateToolMaterial(final Material material) { - final String name = material.getLocalizedName(); - final int harvestLevel = material.vHarvestLevel; - final int durability = (int) material.vDurability; - final float damage = material.vToolQuality; - final int efficiency = material.vToolQuality; - // int enchantability = material.mEnchantmentToolsLevel; - Logger.INFO("ToolMaterial stats for " + material.getLocalizedName() + " | harvestLevel:" + harvestLevel - + " | durability:" + durability + " | toolQuality:" + damage + " | toolSpeed:" + damage); - final ToolMaterial temp = EnumHelper.addToolMaterial(name, harvestLevel, durability, efficiency, damage, 0); - return temp; - - } - - public static enum Versioning { - EQUAL(0), NEWER(1), OLDER(-1); - private final int versioningInfo; - - private Versioning(final int versionStatus) { - this.versioningInfo = versionStatus; - } - - public int getTexture() { - return this.versioningInfo; - } - } - - - public static ItemStack getWrittenBook(final ItemStack aBook, final int aID, final String aMapping, final String aTitle, final String aAuthor, - final String[] aPages) { - if (GT_Utility.isStringInvalid(aMapping)) { - return null; - } - ItemStack rStack = CORE.sBookList.get(aMapping); - if (rStack != null) { - return GT_Utility.copyAmount(1L, new Object[] { rStack }); - } - if ((GT_Utility.isStringInvalid(aTitle)) || (GT_Utility.isStringInvalid(aAuthor)) || (aPages.length <= 0)) { - return null; - } - final int vMeta = aID; - rStack = (aBook == null ? new ItemStack(ModItems.itemCustomBook, 1, vMeta) : aBook); - final NBTTagCompound tNBT = new NBTTagCompound(); - tNBT.setString("title", GT_LanguageManager.addStringLocalization( - new StringBuilder().append("Book.").append(aTitle).append(".Name").toString(), aTitle)); - tNBT.setString("author", aAuthor); - final NBTTagList tNBTList = new NBTTagList(); - for (byte i = 0; i < aPages.length; i = (byte) (i + 1)) { - aPages[i] = GT_LanguageManager - .addStringLocalization(new StringBuilder().append("Book.").append(aTitle).append(".Page") - .append((i < 10) ? new StringBuilder().append("0").append(i).toString() : Byte.valueOf(i)) - .toString(), aPages[i]); - if (i < 48) { - if (aPages[i].length() < 256) { - tNBTList.appendTag(new NBTTagString(aPages[i])); - } - else { - Logger.INFO("WARNING: String for written Book too long! -> "+aPages[i]); - GT_Log.err.println(new StringBuilder().append("WARNING: String for written Book too long! -> ") - .append(aPages[i]).toString()); - } - } else { - Logger.INFO("WARNING: Too much Pages for written Book! -> "+aTitle); - GT_Log.err.println(new StringBuilder().append("WARNING: Too much Pages for written Book! -> ") - .append(aTitle).toString()); - break; - } - } - tNBTList.appendTag(new NBTTagString(new StringBuilder().append("Credits to ").append(aAuthor) - .append(" for writing this Book. This was Book Nr. ").append(aID) - .append(" at its creation. Gotta get 'em all!").toString())); - tNBT.setTag("pages", tNBTList); - rStack.setTagCompound(tNBT); - GT_Log.out.println(new StringBuilder().append("GT++_Mod: Added Book to Book++ List - Mapping: '") - .append(aMapping).append("' - Name: '").append(aTitle).append("' - Author: '").append(aAuthor) - .append("'").toString()); - NBTUtils.createIntegerTagCompound(rStack, "stats", "mMeta", vMeta); - CORE.sBookList.put(aMapping, rStack); - Logger.INFO("Creating book: " + aTitle + " by " + aAuthor + ". Using Meta " + vMeta + "."); - return GT_Utility.copy(new Object[] { rStack }); - } - - @SuppressWarnings({ "unused", "unchecked" }) - public static Pair getGregtechVersion(){ - Pair version; - if (GT_Mod.VERSION == 509){ - Class clazz; - try { - - if (LoadedMods.BeyondRealityCore) { - //Safely assume it's Beyond Reality running .28-pre (If it's not, tough shit really?) - return new Pair(9, 28); - } - - clazz = (Class) ReflectionUtils.getClass("gregtech.GT_Mod"); - Field mSubversion = ReflectionUtils.getField(clazz, "SUBVERSION"); - if (mSubversion != null){ - int mSub = 0; - mSub = mSubversion.getInt(clazz); - if (mSub != 0){ - version = new Pair(9, mSub); - return version; - } - } - } - catch (Throwable t){ - - } - } - //5.08.33 - else if (GT_Mod.VERSION == 508){ - version = new Pair(8, 33); - return version; - - } - //5.07.07 - else if (GT_Mod.VERSION == 507){ - version = new Pair(7, 7); - return version; - - } - //Returb Bad Value - version = new Pair(0, 0); - return version; - } - - public static int getGregtechVersionAsInt(){ - Pair ver = getGregtechVersion(); - return 50000+(ver.getKey()*100)+(ver.getValue()); - } - - public static String getGregtechVersionAsString(){ - Pair ver = getGregtechVersion(); - return "5."+ver.getKey()+"."+ver.getValue(); - } - - public static int getGregtechSubVersion(){ - Pair ver = getGregtechVersion(); - return ver.getValue(); - } - - public static SecureRandom generateSecureRandom(){ - SecureRandom secRan; - String secRanType; - - if (SystemUtils.isWindows()){ - secRanType = "Windows-PRNG"; - } - else { - secRanType = "NativePRNG"; - } - try { - secRan = SecureRandom.getInstance(secRanType); - // Default constructor would have returned insecure SHA1PRNG algorithm, so make an explicit call. - byte[] b = new byte[64] ; - secRan.nextBytes(b); - return secRan; - } - catch (NoSuchAlgorithmException e) { - return null; - } - } - - - public static String calculateChecksumMD5(Object bytes) { - byte[] result = new byte[] {}; - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutput out = null; - try { - out = new ObjectOutputStream(bos); - out.writeObject(bytes); - out.flush(); - result = bos.toByteArray(); - } - catch (IOException e) { - } finally { - try { - bos.close(); - } - catch (IOException e) {} - } - return calculateChecksumMD5(result); - } - - public static String calculateChecksumMD5(byte[] bytes) { - MessageDigest md; - try { - md = MessageDigest.getInstance("MD5"); - md.update(bytes); - byte[] digest = md.digest(); - String myHash = DatatypeConverter.printHexBinary(digest).toUpperCase(); - return myHash; - } - catch (NoSuchAlgorithmException e) { - return null; - } - } - - public static boolean createNewMobSpawner(int aID, Entity aEntity) { - if (aEntity instanceof Entity) { - Class c = aEntity.getClass(); - return createNewMobSpawner(aID, c); - } - return false; - } - - public static boolean createNewMobSpawner(int aID, Class aEntity) { - Logger.INFO("[Spawn] Generating new spawner for entity with class ("+aEntity.getSimpleName()+")."); - if (TileEntityGenericSpawner.registerNewMobSpawner(aID, (Class) aEntity)) { - EntityRegistration x = EntityRegistry.instance().lookupModSpawn((Class) aEntity, true); - if (x != null) { - Logger.INFO("[Spawn] Registration for "+x.getEntityName()+" successful"); - return true; - } - else { - Logger.INFO("[Spawn] Registration for "+aEntity.getSimpleName()+" successful"); - return true; - } - } - Logger.INFO("[Spawn] Mob Spawner creation for "+aEntity.getName()+" failed"); - return false; - } - - public static long getMillisSince(long aStartTime, long aCurrentTime) { - return (aCurrentTime - aStartTime); - } - - public static long getSecondsFromMillis(long aMillis) { - return (aMillis/1000); - } - - public static long getTicksFromSeconds(long aSeconds) { - return (aSeconds*20); - } - - public static byte getTier(long l) { - byte i = -1; - do { - ++i; - if (i >= GT_Values.V.length) { - return i; - } - } while (l > GT_Values.V[i]); - i = (byte) MathUtils.getValueWithinRange(i, 0, 15); - return i; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/data/AES.java b/src/Java/gtPlusPlus/core/util/data/AES.java deleted file mode 100644 index 1183cdd8e7..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/AES.java +++ /dev/null @@ -1 +0,0 @@ -\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u0020\u0067\u0074\u0050\u006c\u0075\u0073\u0050\u006c\u0075\u0073\u002e\u0063\u006f\u0072\u0065\u002e\u0075\u0074\u0069\u006c\u002e\u0064\u0061\u0074\u0061\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0069\u006f\u002e\u0055\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0045\u006e\u0063\u006f\u0064\u0069\u006e\u0067\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u006d\u0061\u0074\u0068\u002e\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u006e\u0069\u006f\u002e\u0063\u0068\u0061\u0072\u0073\u0065\u0074\u002e\u0053\u0074\u0061\u006e\u0064\u0061\u0072\u0064\u0043\u0068\u0061\u0072\u0073\u0065\u0074\u0073\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0073\u0065\u0063\u0075\u0072\u0069\u0074\u0079\u002e\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0073\u0065\u0063\u0075\u0072\u0069\u0074\u0079\u002e\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0041\u0072\u0072\u0061\u0079\u0073\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0042\u0061\u0073\u0065\u0036\u0034\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u0078\u002e\u0063\u0072\u0079\u0070\u0074\u006f\u002e\u0043\u0069\u0070\u0068\u0065\u0072\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u0078\u002e\u0063\u0072\u0079\u0070\u0074\u006f\u002e\u0073\u0070\u0065\u0063\u002e\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u003b\u000d\u000a\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0041\u0045\u0053\u0020\u007b\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u003b\u003b\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u003b\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u006b\u0065\u0079\u003b\u0009\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0041\u0045\u0053\u0028\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0074\u0068\u0069\u0073\u0028\u0022\u0044\u0061\u0072\u006b\u006e\u0065\u0073\u0073\u0020\u0049\u006e\u0020\u0054\u0068\u0065\u0069\u0072\u0020\u0048\u0065\u0061\u0072\u0074\u0073\u0022\u0029\u003b\u0009\u0009\u000d\u000a\u0009\u007d\u0009\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0041\u0045\u0053\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u0053\u0065\u0063\u0072\u0065\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0073\u0065\u0063\u0072\u0065\u0074\u0020\u003d\u0020\u0061\u0053\u0065\u0063\u0072\u0065\u0074\u003b\u000d\u000a\u0009\u0009\u006b\u0065\u0079\u0020\u003d\u0020\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0067\u0065\u0074\u0048\u0061\u0073\u0068\u0065\u0064\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0073\u0065\u0063\u0072\u0065\u0074\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0020\u003d\u0020\u0067\u0065\u006e\u0065\u0072\u0061\u0074\u0065\u004b\u0065\u0079\u0028\u006b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0067\u0065\u0074\u0048\u0061\u0073\u0068\u0065\u0064\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u0053\u0074\u0072\u0069\u006e\u0067\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0074\u006f\u0048\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0067\u0065\u0074\u0053\u0048\u0041\u0028\u0061\u0053\u0074\u0072\u0069\u006e\u0067\u0029\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0067\u0065\u0074\u0053\u0048\u0041\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0069\u006e\u0070\u0075\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0020\u006d\u0064\u003b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u006d\u0064\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0053\u0048\u0041\u002d\u0032\u0035\u0036\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006d\u0064\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u0069\u006e\u0070\u0075\u0074\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0053\u0074\u0061\u006e\u0064\u0061\u0072\u0064\u0043\u0068\u0061\u0072\u0073\u0065\u0074\u0073\u002e\u0055\u0054\u0046\u005f\u0038\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u007b\u007d\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0074\u006f\u0048\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0068\u0061\u0073\u0068\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u0020\u006e\u0075\u006d\u0062\u0065\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u0028\u0031\u002c\u0020\u0068\u0061\u0073\u0068\u0029\u003b\u000d\u000a\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0042\u0075\u0069\u006c\u0064\u0065\u0072\u0020\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0042\u0075\u0069\u006c\u0064\u0065\u0072\u0028\u006e\u0075\u006d\u0062\u0065\u0072\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0031\u0036\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u0077\u0068\u0069\u006c\u0065\u0020\u0028\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0028\u0029\u0020\u003c\u0020\u0033\u0032\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0069\u006e\u0073\u0065\u0072\u0074\u0028\u0030\u002c\u0020\u0027\u0030\u0027\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u004b\u0065\u0079\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u003b\u000d\u000a\u0009\u0009\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0020\u0073\u0068\u0061\u003b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0073\u0068\u0061\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0053\u0048\u0041\u002d\u0032\u0035\u0036\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0073\u0068\u0061\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u0061\u004b\u0065\u0079\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0053\u0074\u0061\u006e\u0064\u0061\u0072\u0064\u0043\u0068\u0061\u0072\u0073\u0065\u0074\u0073\u002e\u0055\u0054\u0046\u005f\u0038\u0029\u0029\u003b\u0020\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0031\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0065\u0031\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0009\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u0061\u004b\u0065\u0079\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0073\u0068\u0061\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0053\u0048\u0041\u002d\u0031\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u0073\u0068\u0061\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u006b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u0041\u0072\u0072\u0061\u0079\u0073\u002e\u0063\u006f\u0070\u0079\u004f\u0066\u0028\u006b\u0065\u0079\u002c\u0020\u0031\u0036\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u003b\u000d\u000a\u0009\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0055\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0045\u006e\u0063\u006f\u0064\u0069\u006e\u0067\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u007d\u0009\u0009\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u007b\u007d\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0020\u0067\u0065\u006e\u0065\u0072\u0061\u0074\u0065\u004b\u0065\u0079\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0061\u004b\u0065\u0079\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0028\u0061\u004b\u0065\u0079\u002c\u0020\u0022\u0041\u0045\u0053\u0022\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0065\u006e\u0063\u006f\u0064\u0065\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0074\u0072\u0054\u006f\u0045\u006e\u0063\u0072\u0079\u0070\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u0020\u003d\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0041\u0045\u0053\u002f\u0045\u0043\u0042\u002f\u0050\u004b\u0043\u0053\u0035\u0050\u0061\u0064\u0064\u0069\u006e\u0067\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0069\u006e\u0069\u0074\u0028\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0045\u004e\u0043\u0052\u0059\u0050\u0054\u005f\u004d\u004f\u0044\u0045\u002c\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0042\u0061\u0073\u0065\u0036\u0034\u002e\u0067\u0065\u0074\u0045\u006e\u0063\u006f\u0064\u0065\u0072\u0028\u0029\u002e\u0065\u006e\u0063\u006f\u0064\u0065\u0054\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0064\u006f\u0046\u0069\u006e\u0061\u006c\u0028\u0073\u0074\u0072\u0054\u006f\u0045\u006e\u0063\u0072\u0079\u0070\u0074\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0029\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0045\u0072\u0072\u006f\u0072\u0020\u0077\u0068\u0069\u006c\u0065\u0020\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006e\u0067\u003a\u0020\u0022\u0020\u002b\u0020\u0065\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0075\u006c\u006c\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0063\u006f\u0064\u0065\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0074\u0072\u0054\u006f\u0044\u0065\u0063\u0072\u0079\u0070\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u0020\u003d\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0041\u0045\u0053\u002f\u0045\u0043\u0042\u002f\u0050\u004b\u0043\u0053\u0035\u0050\u0041\u0044\u0044\u0049\u004e\u0047\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0069\u006e\u0069\u0074\u0028\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0044\u0045\u0043\u0052\u0059\u0050\u0054\u005f\u004d\u004f\u0044\u0045\u002c\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0064\u006f\u0046\u0069\u006e\u0061\u006c\u0028\u0042\u0061\u0073\u0065\u0036\u0034\u002e\u0067\u0065\u0074\u0044\u0065\u0063\u006f\u0064\u0065\u0072\u0028\u0029\u002e\u0064\u0065\u0063\u006f\u0064\u0065\u0028\u0073\u0074\u0072\u0054\u006f\u0044\u0065\u0063\u0072\u0079\u0070\u0074\u0029\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0075\u006c\u006c\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u007d \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java b/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java deleted file mode 100644 index 62f703f5f5..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java +++ /dev/null @@ -1,121 +0,0 @@ -package gtPlusPlus.core.util.data; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class ArrayUtils { - - public static V[] expandArray(final V[] someArray, final V newValueToAdd) { - V[] series = someArray; - series = addElement(series, newValueToAdd); - return series; - } - - private static V[] addElement(V[] series, final V newValueToAdd) { - series = Arrays.copyOf(series, series.length + 1); - series[series.length - 1] = newValueToAdd; - return series; - } - - public static V[] insertElementAtIndex(V[] aArray, int aIndex, V aObjectToInsert) { - V[] newArray = Arrays.copyOf(aArray, aArray.length + 1); - for (int i=0;i Object getMostCommonElement(List list) { - Optional r = list.stream().map(V::getTextureSet).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().max(Map.Entry.comparingByValue()).map(Map.Entry::getKey); - return r.get(); - }*/ - - - public static Object[] removeNulls(final Object[] v) { - List list = new ArrayList(Arrays.asList(v)); - list.removeAll(Collections.singleton((Object)null)); - return list.toArray(new Object[list.size()]); - } - - public static ItemStack[] removeNulls(final ItemStack[] v) { - List list = new ArrayList(Arrays.asList(v)); - list.removeAll(Collections.singleton((ItemStack)null)); - return list.toArray(new ItemStack[list.size()]); - } - - @SuppressWarnings("unchecked") - public static Set combineSetData(Set S, Set J) { - Set mData = new HashSet(); - T[] array1 = (T[]) S.toArray(); - Collections.addAll(mData, array1); - T[] array2 = (T[]) J.toArray(); - Collections.addAll(mData, array2); - return mData; - } - - public static AutoMap mergeTwoMaps(AutoMap a, AutoMap b) { - AutoMap c = new AutoMap(); - for (A g : a.values()) { - c.put(g); - } - for (A g : b.values()) { - c.put(g); - } - return c; - } - - public static T[][] rotateArrayClockwise(T[][] mat) { - Logger.INFO("Rotating Array 90' Clockwise"); - try { - final int M = mat.length; - final int N = mat[0].length; - Logger.INFO("Dimension X: "+M); - Logger.INFO("Dimension Z: "+N); - @SuppressWarnings("unchecked") - T[][] ret = (T[][]) new Object[N][M]; - for (int r = 0; r < M; r++) { - for (int c = 0; c < N; c++) { - ret[c][M-1-r] = mat[r][c]; - } - } - Logger.INFO("Returning Rotated Array"); - return ret; - } - catch (Throwable t) { - t.printStackTrace(); - return null; - } - } - - public static String toString(Object[] aArray, String string) { - return org.apache.commons.lang3.ArrayUtils.toString(aArray, string); - } - - public static String toString(Object[] aArray) { - return org.apache.commons.lang3.ArrayUtils.toString(aArray); - } - - public static Object[] getArrayFromArrayList(ArrayList aArrayList) { - Object[] aGenericArray = new Object[aArrayList.size()]; - int aIndex = 0; - for (T object : aArrayList) { - aGenericArray[aIndex++] = object; - } - return aGenericArray; - } - -} - diff --git a/src/Java/gtPlusPlus/core/util/data/EnumUtils.java b/src/Java/gtPlusPlus/core/util/data/EnumUtils.java deleted file mode 100644 index edcc071b54..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/EnumUtils.java +++ /dev/null @@ -1,51 +0,0 @@ -package gtPlusPlus.core.util.data; - -import com.google.common.base.Enums; -import com.google.common.base.Optional; - -public class EnumUtils { - - /** - * Returns the value of an Enum if it exists. - * If value is not found, case-insensitive search will occur. - * If value still not found, an IllegalArgumentException is thrown. - **/ - public static > T getValue(Class enumeration, String name) { - Optional j = Enums.getIfPresent(enumeration, name); - T VALUE; - if (j == null || !j.isPresent()) { - VALUE = valueOfIgnoreCase(enumeration, name); - } - else { - VALUE = j.get(); - } - return VALUE; - } - - /** - * Finds the value of the given enumeration by name, case-insensitive. - * Throws an IllegalArgumentException if no match is found. - **/ - private static > T valueOfIgnoreCase(Class enumeration, String name) { - - for (T enumValue : enumeration.getEnumConstants()) { - if (enumValue.name().equalsIgnoreCase(name)) { - return enumValue; - } - } - - throw new IllegalArgumentException(String.format( - "There is no value with name '%s' in Enum %s", - name, enumeration.getName() - )); - } - - public static Object getValue(Class class1, String materialName, boolean bool) { - if (Enum.class.isInstance(class1)){ - return getValue(class1, materialName); - } - return null; - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/data/FileUtils.java b/src/Java/gtPlusPlus/core/util/data/FileUtils.java deleted file mode 100644 index bec5e0eeff..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/FileUtils.java +++ /dev/null @@ -1,118 +0,0 @@ -package gtPlusPlus.core.util.data; - -import java.io.File; -import java.io.IOException; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.ArrayList; -import java.util.List; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.Utils; - -public class FileUtils { - - private static final Charset utf8 = StandardCharsets.UTF_8; - - public static boolean doesFileExist(File f) { - if (f != null && f.exists() && !f.isDirectory()) { - return true; - } - return false; - } - - public static File createFile(String path, String filename, String extension) { - File file = new File(Utils.getMcDir(), path + filename + extension); - return createFile(file); - } - - public static File createFile(File aFile) { - boolean blnCreated = false; - Logger.INFO("Trying to use path "+aFile.getPath()); - try { - Logger.INFO("Trying to use path "+aFile.getCanonicalPath()); - Logger.INFO("Trying to use absolute path "+aFile.getAbsolutePath()); - blnCreated = aFile.createNewFile(); - } catch (IOException ioe) { - Logger.INFO("Error while creating a new empty file :" + ioe); - return null; - } - return blnCreated ? aFile : null; - } - - public static File getFile(String filename, String extension) { - return getFile("", filename, extension); - } - - public static File getFile(String path, String filename, String extension) { - if (path == null || path.length() <= 0) { - path = ""; - } - else { - path = path + "/"; - } - if (filename == null || filename.length() <= 0) { - return null; - } - if (extension == null || extension.length() <= 0) { - extension = ".txt"; - } - else { - extension = "." + extension; - } - File file = new File(Utils.getMcDir(), path + filename + extension); - boolean doesExist = doesFileExist(file); - - if (doesExist) { - Logger.INFO("Found File: " + file.getAbsolutePath()); - return file; - } else { - Logger.INFO("Creating file, as it was not found."); - return createFile(path, filename, extension); - } - } - - public static boolean appendListToFile(File file, List content) { - try { - long oldSize; - long newSize; - if (doesFileExist(file)) { - Path p = Paths.get(file.getPath()); - if (p != null && Files.isWritable(p)) { - oldSize = Files.size(p); - try { - Files.write(p, content, utf8, StandardOpenOption.APPEND); - } catch (IOException e) { - e.printStackTrace(); - } - newSize = Files.size(p); - return newSize > oldSize; - } - } - } catch (IOException e) { - } - return false; - } - - /** - * Reads the contents of a file line by line to a List of Strings using the default encoding for the VM. - * The file is always closed. - * - * @param file the file to read, must not be {@code null} - * @return the list of Strings representing each line in the file, never {@code null} - * @throws IOException in case of an I/O error - * @since 1.3 - */ - public static List readLines(File file) { - try { - return org.apache.commons.io.FileUtils.readLines(file, utf8); - } - catch (IOException e) { - return new ArrayList(); - } - } -} diff --git a/src/Java/gtPlusPlus/core/util/data/LocaleUtils.java b/src/Java/gtPlusPlus/core/util/data/LocaleUtils.java deleted file mode 100644 index d1a35a661b..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/LocaleUtils.java +++ /dev/null @@ -1,90 +0,0 @@ -package gtPlusPlus.core.util.data; - -import java.io.*; - -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.registry.GameData; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class LocaleUtils { - - public static boolean generateFakeLocaleFile() { - for (ModContainer modcontainer : Loader.instance().getModList()){ - if (modcontainer.getModId().toLowerCase().equals("miscutils")) { - String S = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; - writeToFile(S); - dumpItemsAndBlocksForModContainer(modcontainer); - } - } - return true; - } - - public static boolean dumpItemsAndBlocksForModContainer(ModContainer mod) { - writeToFile("Dumping Items from "+mod.getModId()+"."); - for (Object C : GameData.getItemRegistry()) { - - try { - - if (C != null) { - if (C instanceof Item) { - Item R = (Item) C; - ItemStack IS = ItemUtils.getSimpleStack(R); - String modid = ItemUtils.getModId(IS); - if (modid.equals("miscutils") || modid.equals("ToxicEverglades")) { - String S = "["+modid+"] "+IS.getUnlocalizedName()+".name="; - writeToFile(S); - } - } - } - - } - catch (Throwable T) {} - - } - writeToFile("Dumping Blocks from "+mod.getModId()+"."); - for (Object B : GameData.getBlockRegistry()) { - - try { - - if (B != null) { - if (B instanceof Block) { - Block R = (Block) B; - ItemStack IS = ItemUtils.getSimpleStack(R); - String modid = ItemUtils.getModId(IS); - if (modid.equals("miscutils") || modid.equals("ToxicEverglades")) { - String S = "["+modid+"] "+IS.getUnlocalizedName()+".name="; - writeToFile(S); - } - } - } - - } - catch (Throwable T) {} - - } - - - return true; - } - - public static void writeToFile(String S) { - try { - File F = new File(Utils.getMcDir(), "config/GTplusplus/en_US.lang"); - BufferedWriter writer; - writer = new BufferedWriter(new FileWriter(F, true)); - writer.write(S); - writer.newLine(); - writer.close(); - } - catch (IOException e) {} - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/data/LoggingUtils.java b/src/Java/gtPlusPlus/core/util/data/LoggingUtils.java deleted file mode 100644 index 8415ab32fe..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/LoggingUtils.java +++ /dev/null @@ -1,49 +0,0 @@ -package gtPlusPlus.core.util.data; - -import java.io.*; -import java.util.Date; - -public class LoggingUtils { - - public static void profileLog(final Object o) { - try { - String content; - final File file = new File("GregtechTimingsTC.txt"); - // if file doesnt exists, then create it - if (!file.exists()) { - file.createNewFile(); - final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); - final BufferedWriter bw = new BufferedWriter(fw); - bw.write("============================================================"); - bw.write(System.lineSeparator()); - bw.close(); - } - if (o instanceof String) { - content = (String) o; - } else { - content = o.toString(); - } - final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); - final BufferedWriter bw = new BufferedWriter(fw); - bw.write(content); - bw.write(System.lineSeparator()); - bw.close(); - System.out.println("Data Logged."); - - } catch (final IOException e) { - System.out.println("Data logging failed."); - } - } - - public static boolean logCurrentSystemTime(final String message) { - final Date date = new Date(System.currentTimeMillis()); - try { - profileLog(message + " | " + date.toString()); - return true; - } catch (final Throwable r) { - return false; - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/util/data/StringUtils.java b/src/Java/gtPlusPlus/core/util/data/StringUtils.java deleted file mode 100644 index 2372d04c15..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/StringUtils.java +++ /dev/null @@ -1,219 +0,0 @@ -package gtPlusPlus.core.util.data; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.Utils; - -public class StringUtils { - - public static String superscript(String str) { - str = str.replaceAll("0", "\u2070"); - str = str.replaceAll("1", "\u00B9"); - str = str.replaceAll("2", "\u00B2"); - str = str.replaceAll("3", "\u00B3"); - str = str.replaceAll("4", "\u2074"); - str = str.replaceAll("5", "\u2075"); - str = str.replaceAll("6", "\u2076"); - str = str.replaceAll("7", "\u2077"); - str = str.replaceAll("8", "\u2078"); - str = str.replaceAll("9", "\u2079"); - return str; - } - - public static String subscript(String str) { - str = str.replaceAll("0", "\u2080"); - str = str.replaceAll("1", "\u2081"); - str = str.replaceAll("2", "\u2082"); - str = str.replaceAll("3", "\u2083"); - str = str.replaceAll("4", "\u2084"); - str = str.replaceAll("5", "\u2085"); - str = str.replaceAll("6", "\u2086"); - str = str.replaceAll("7", "\u2087"); - str = str.replaceAll("8", "\u2088"); - str = str.replaceAll("9", "\u2089"); - return str; - } - - public static boolean containsSuperOrSubScript(final String s){ - if (s.contains(StringUtils.superscript("0"))) { - return true; - } - else if (s.contains(StringUtils.superscript("1"))) { - return true; - } - else if (s.contains(StringUtils.superscript("2"))) { - return true; - } - else if (s.contains(StringUtils.superscript("3"))) { - return true; - } - else if (s.contains(StringUtils.superscript("4"))) { - return true; - } - else if (s.contains(StringUtils.superscript("5"))) { - return true; - } - else if (s.contains(StringUtils.superscript("6"))) { - return true; - } - else if (s.contains(StringUtils.superscript("7"))) { - return true; - } - else if (s.contains(StringUtils.superscript("8"))) { - return true; - } - else if (s.contains(StringUtils.superscript("9"))) { - return true; - } - if (s.contains(StringUtils.subscript("0"))) { - return true; - } - else if (s.contains(StringUtils.subscript("1"))) { - return true; - } - else if (s.contains(StringUtils.subscript("2"))) { - return true; - } - else if (s.contains(StringUtils.subscript("3"))) { - return true; - } - else if (s.contains(StringUtils.subscript("4"))) { - return true; - } - else if (s.contains(StringUtils.subscript("5"))) { - return true; - } - else if (s.contains(StringUtils.subscript("6"))) { - return true; - } - else if (s.contains(StringUtils.subscript("7"))) { - return true; - } - else if (s.contains(StringUtils.subscript("8"))) { - return true; - } - else if (s.contains(StringUtils.subscript("9"))) { - return true; - } - return false; - } - - //Can call this Enum for formatting. - public static enum TextUtils { - blue('1'), green('2'), teal('3'), maroon('4'), purple('5'), orange('6'), lightGray('7'), darkGray('8'), lightBlue( - '9'), black('0'), lime('a'), aqua('b'), red('c'), pink('d'), yellow('e'), white('f'); - - private char colourValue; - private TextUtils(final char value) { - this.colourValue = value; - } - public String colour() { - return getFormatter() + this.colourValue; - } - private String getFormatter() { - return "\u00A7"; // Returns §. - } - } - - public static String firstLetterCaps(String data) { - String firstLetter = data.substring(0,1).toUpperCase(); - String restLetters = data.substring(1).toLowerCase(); - return firstLetter + restLetters; - } - - public static String getDataStringFromArray(V[] parameterTypes) { - if (parameterTypes == null || parameterTypes.length == 0) { - return "empty/null"; - } - else { - String aData = ""; - for (V y : parameterTypes) { - if (y != null) { - aData += ", "+y.toString(); - } - } - return aData; - } - } - - - - /** - * Is this a special regex character for delimination? (.$|()[]{}^?*+\\) - * @param aChar - The char to test - * @return - Is this a special character? - */ - public static boolean isSpecialCharacter(char aChar) { - if (aChar == '"' || aChar == '.' || aChar == '$' || aChar == '|' || aChar == '(' || aChar == ')' || aChar == '[' - || aChar == ']' || aChar == '{' || aChar == '}' || aChar == '^' || aChar == '?' || aChar == '*' - || aChar == '+' || aChar == '\\') { - return true; - } - return false; - } - - public static boolean isEscaped(String aString) { - return aString.substring(0, 1).equals("\\"); - } - - public static String splitAndUppercase(String aInput, String aDelim) { - - if (!isEscaped(aDelim)) { - boolean isSpecial = false; - for (int o=0;o aTemp = new AutoMap(); - for (String s : aSplit) { - Logger.INFO("Found: "+s); - s = s.replace(".", ""); - s = Utils.sanitizeString(s); - s = firstLetterCaps(s); - Logger.INFO("Formatted & Captilized: "+s); - aTemp.put(s); - } - Logger.INFO("Rebuilding"); - String aReturn = ""; - for (String s : aTemp) { - aReturn += s; - Logger.INFO("Step: "+aReturn); - } - return aReturn; - } - } - - public static int characterCount(String aString, char aChar) { - return characterCount(aString, ""+aChar); - } - - public static int characterCount(String aString, String aChar) { - int aLength = aString.length(); - int aFound = 0; - if (aLength == 0 || !aString.contains(aChar)) { - return 0; - } - else { - for (int index = 0; index < aLength; index++) { - if (aString.substring(index, index+1).equals(aChar)) { - aFound++; - } - } - return aFound; - } - } -} diff --git a/src/Java/gtPlusPlus/core/util/data/UUIDUtils.java b/src/Java/gtPlusPlus/core/util/data/UUIDUtils.java deleted file mode 100644 index d6b32314b1..0000000000 --- a/src/Java/gtPlusPlus/core/util/data/UUIDUtils.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.core.util.data; - -import java.nio.ByteBuffer; -import java.util.UUID; - -public class UUIDUtils { - - //UUID Methods below created by https://gist.github.com/jeffjohnson9046 - //https://gist.github.com/jeffjohnson9046/c663dd22bbe6bb0b3f5e - - public static byte[] getBytesFromUUID(UUID uuid) { - ByteBuffer bb = ByteBuffer.wrap(new byte[16]); - bb.putLong(uuid.getMostSignificantBits()); - bb.putLong(uuid.getLeastSignificantBits()); - return bb.array(); - } - - public static UUID getUUIDFromBytes(byte[] bytes) { - ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); - Long high = byteBuffer.getLong(); - Long low = byteBuffer.getLong(); - return new UUID(high, low); - } - -} diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_INIT.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_INIT.java deleted file mode 100644 index f8fc15c778..0000000000 --- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_INIT.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.util.debug; - -import gtPlusPlus.preloader.CORE_Preloader; - -public class DEBUG_INIT { - - public static void registerBlocks(){ - //Debug Loading - if (CORE_Preloader.DEBUG_MODE){ - - } - } - - public static void registerItems(){ - /*ModItems.itemDebugShapeSpawner = new DEBUG_ITEM_ShapeSpawner("itemDebugShapeSpawner", AddToCreativeTab.tabMisc, 1, 500); - GameRegistry.registerItem(ModItems.itemDebugShapeSpawner, "itemDebugShapeSpawner"); - ModItems.itemBedLocator_Base = new BedLocator_Base("itemBedLocator_Base"); - GameRegistry.registerItem(ModItems.itemBedLocator_Base, "itemBedLocator_Base"); - ModItems.itemBaseItemWithCharge = new BaseItemWithCharge("itemBaseItemWithCharge", 0, 1000); - GameRegistry.registerItem(ModItems.itemBaseItemWithCharge, "itemBaseItemWithCharge");*/ - } - - public static void registerTEs(){ - - } - - public static void registerMisc(){ - - - - } - - public static void registerHandlers(){ - //MinecraftForge.EVENT_BUS.register(new DEBUG_ScreenOverlay()); - } - -} diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java deleted file mode 100644 index d1e65afe3e..0000000000 --- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.core.util.debug; - -import static net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK; - -import java.util.List; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.BaseItemGeneric; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; - -public class DEBUG_ITEM_ShapeSpawner extends BaseItemGeneric{ - - public DEBUG_ITEM_ShapeSpawner(String s, CreativeTabs c, int stackSize, int maxDmg) { - super(s, c, stackSize, maxDmg); - s = "itemDebugShapeSpawner"; - c = AddToCreativeTab.tabMisc; - stackSize = 1; - maxDmg = 500; - } - - @Override - public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer player){ - - if (!world.isRemote){ - Logger.INFO("Constructing the shape for the "+"VACUUM FREEZER"); - final Thread thread = new Thread(new DEBUG_TimerThread(world, player)); - thread.start(); - } - return stack; - } - - - - @SubscribeEvent - public void playerInteractEventHandler(final PlayerInteractEvent event) - { - if (event.isCanceled() || event.world.isRemote || (event.action != RIGHT_CLICK_BLOCK)) { - return; - } - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GOLD+"For Testing Gregtech Shapes!"); - super.addInformation(stack, aPlayer, list, bool); - } - -} diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java deleted file mode 100644 index 2e46b171f9..0000000000 --- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java +++ /dev/null @@ -1,918 +0,0 @@ -package gtPlusPlus.core.util.debug; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.ArrayList; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.gui.GT_Container_MultiMachine; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.GT_MetaGenerated_Tool_01; - -import net.minecraftforge.fluids.FluidStack; - -public abstract class DEBUG_MULTIBLOCK_ShapeSpawner extends MetaTileEntity { - - public static boolean disableMaintenance; - public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false; - public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0; - public ItemStack[] mOutputItems = null; - public FluidStack[] mOutputFluids = null; - public ArrayList mInputHatches = new ArrayList<>(); - public ArrayList mOutputHatches = new ArrayList<>(); - public ArrayList mInputBusses = new ArrayList<>(); - public ArrayList mOutputBusses = new ArrayList<>(); - public ArrayList mDynamoHatches = new ArrayList<>(); - public ArrayList mMufflerHatches = new ArrayList<>(); - public ArrayList mEnergyHatches = new ArrayList<>(); - public ArrayList mMaintenanceHatches = new ArrayList<>(); - - public DEBUG_MULTIBLOCK_ShapeSpawner(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional, 2); - DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); - } - - public DEBUG_MULTIBLOCK_ShapeSpawner(final String aName) { - super(aName, 2); - DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); - } - - public static boolean isValidMetaTileEntity(final MetaTileEntity aMetaTileEntity) { - return (aMetaTileEntity.getBaseMetaTileEntity() != null) && (aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity) && !aMetaTileEntity.getBaseMetaTileEntity().isDead(); - } - - @Override - public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex > 0; - } - - @Override - public int getProgresstime() { - return this.mProgresstime; - } - - @Override - public int maxProgresstime() { - return this.mMaxProgresstime; - } - - @Override - public int increaseProgress(final int aProgress) { - return aProgress; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mEUt", this.mEUt); - aNBT.setInteger("mProgresstime", this.mProgresstime); - aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime); - aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease); - aNBT.setInteger("mEfficiency", this.mEfficiency); - aNBT.setInteger("mPollution", this.mPollution); - aNBT.setInteger("mRuntime", this.mRuntime); - - if (this.mOutputItems != null) { - for (int i = 0; i < this.mOutputItems.length; i++) { - if (this.mOutputItems[i] != null) { - final NBTTagCompound tNBT = new NBTTagCompound(); - this.mOutputItems[i].writeToNBT(tNBT); - aNBT.setTag("mOutputItem" + i, tNBT); - } - } - } - if (this.mOutputFluids != null) { - for (int i = 0; i < this.mOutputFluids.length; i++) { - if (this.mOutputFluids[i] != null) { - final NBTTagCompound tNBT = new NBTTagCompound(); - this.mOutputFluids[i].writeToNBT(tNBT); - aNBT.setTag("mOutputFluids" + i, tNBT); - } - } - } - - aNBT.setBoolean("mWrench", this.mWrench); - aNBT.setBoolean("mScrewdriver", this.mScrewdriver); - aNBT.setBoolean("mSoftHammer", this.mSoftHammer); - aNBT.setBoolean("mHardHammer", this.mHardHammer); - aNBT.setBoolean("mSolderingTool", this.mSolderingTool); - aNBT.setBoolean("mCrowbar", this.mCrowbar); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mEUt = aNBT.getInteger("mEUt"); - this.mProgresstime = aNBT.getInteger("mProgresstime"); - this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); - if (this.mMaxProgresstime > 0) { - this.mRunningOnLoad = true; - } - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mEfficiency = aNBT.getInteger("mEfficiency"); - this.mPollution = aNBT.getInteger("mPollution"); - this.mRuntime = aNBT.getInteger("mRuntime"); - this.mOutputItems = new ItemStack[this.getAmountOfOutputs()]; - for (int i = 0; i < this.mOutputItems.length; i++) { - this.mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); - } - this.mOutputFluids = new FluidStack[this.getAmountOfOutputs()]; - for (int i = 0; i < this.mOutputFluids.length; i++) { - this.mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i); - } - this.mWrench = aNBT.getBoolean("mWrench"); - this.mScrewdriver = aNBT.getBoolean("mScrewdriver"); - this.mSoftHammer = aNBT.getBoolean("mSoftHammer"); - this.mHardHammer = aNBT.getBoolean("mHardHammer"); - this.mSolderingTool = aNBT.getBoolean("mSolderingTool"); - this.mCrowbar = aNBT.getBoolean("mCrowbar"); - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); - } - - @Override - public byte getTileEntityBaseType() { - return 2; - } - - @Override - public void onMachineBlockUpdate() { - this.mUpdate = 50; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mEfficiency < 0) { - this.mEfficiency = 0; - } - if ((--this.mUpdate == 0) || (--this.mStartUpCheck == 0)) { - this.mInputHatches.clear(); - this.mInputBusses.clear(); - this.mOutputHatches.clear(); - this.mOutputBusses.clear(); - this.mDynamoHatches.clear(); - this.mEnergyHatches.clear(); - this.mMufflerHatches.clear(); - this.mMaintenanceHatches.clear(); - this.mMachine = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]); - } - if (this.mStartUpCheck < 0) { - if (this.mMachine) { - for (final GT_MetaTileEntity_Hatch_Maintenance tHatch : this.mMaintenanceHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (!DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance) { - if (tHatch.mWrench) { - this.mWrench = true; - } - if (tHatch.mScrewdriver) { - this.mScrewdriver = true; - } - if (tHatch.mSoftHammer) { - this.mSoftHammer = true; - } - if (tHatch.mHardHammer) { - this.mHardHammer = true; - } - if (tHatch.mSolderingTool) { - this.mSolderingTool = true; - } - if (tHatch.mCrowbar) { - this.mCrowbar = true; - } - } else { - this.mWrench = true; - this.mScrewdriver = true; - this.mSoftHammer = true; - this.mHardHammer = true; - this.mSolderingTool = true; - this.mCrowbar = true; - } - - tHatch.mWrench = false; - tHatch.mScrewdriver = false; - tHatch.mSoftHammer = false; - tHatch.mHardHammer = false; - tHatch.mSolderingTool = false; - tHatch.mCrowbar = false; - } - } - if (this.getRepairStatus() > 0) { - if ((this.mMaxProgresstime > 0) && this.doRandomMaintenanceDamage()) { - if (this.onRunningTick(this.mInventory[1])) { - if (!this.polluteEnvironment(this.getPollutionPerTick(this.mInventory[1]))) { - this.stopMachine(); - } - if ((this.mMaxProgresstime > 0) && (++this.mProgresstime >= this.mMaxProgresstime)) { - if (this.mOutputItems != null) { - for (final ItemStack tStack : this.mOutputItems) { - if (tStack != null) { - try { - GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack); - } catch (final Exception e) { - } - this.addOutput(tStack); - } - } - } - if ((this.mOutputFluids != null) && (this.mOutputFluids.length == 1)) { - for (final FluidStack tStack : this.mOutputFluids) { - if (tStack != null) { - this.addOutput(tStack); - } - } - } else if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 1)) { - this.addFluidOutputs(this.mOutputFluids); - } - this.mEfficiency = Math.max(0, Math.min(this.mEfficiency + this.mEfficiencyIncrease, this.getMaxEfficiency(this.mInventory[1]) - ((this.getIdealStatus() - this.getRepairStatus()) * 1000))); - this.mOutputItems = null; - this.mProgresstime = 0; - this.mMaxProgresstime = 0; - this.mEfficiencyIncrease = 0; - if (aBaseMetaTileEntity.isAllowedToWork()) { - this.checkRecipe(this.mInventory[1]); - } - if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 0)) { - if (this.mOutputFluids.length > 1) { - GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); - } - } - } - } - } else { - if (((aTick % 100) == 0) || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { - - if (aBaseMetaTileEntity.isAllowedToWork()) { - this.checkRecipe(this.mInventory[1]); - } - if (this.mMaxProgresstime <= 0) { - this.mEfficiency = Math.max(0, this.mEfficiency - 1000); - } - } - } - } else { - this.stopMachine(); - } - } else { - this.stopMachine(); - } - } - aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (this.mWrench ? 0 : 1) | (this.mScrewdriver ? 0 : 2) | (this.mSoftHammer ? 0 : 4) | (this.mHardHammer ? 0 : 8) | (this.mSolderingTool ? 0 : 16) | (this.mCrowbar ? 0 : 32) | (this.mMachine ? 0 : 64)); - aBaseMetaTileEntity.setActive(this.mMaxProgresstime > 0); - } - } - - public boolean polluteEnvironment(final int aPollutionLevel) { - this.mPollution += aPollutionLevel; - for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (this.mPollution >= 10000) { - if (tHatch.polluteEnvironment()) { - this.mPollution -= 10000; - } - } else { - break; - } - } - } - return this.mPollution < 10000; - } - - /** - * Called every tick the Machine runs - */ - public boolean onRunningTick(final ItemStack aStack) { - if (this.mEUt > 0) { - this.addEnergyOutput(((long) this.mEUt * this.mEfficiency) / 10000); - return true; - } - if (this.mEUt < 0) { - if (!this.drainEnergyInput(((long) -this.mEUt * 10000) / Math.max(1000, this.mEfficiency))) { - this.stopMachine(); - return false; - } - } - return true; - } - - /** - * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example) - */ - public abstract boolean isCorrectMachinePart(ItemStack aStack); - - /** - * Checks the Recipe - */ - public abstract boolean checkRecipe(ItemStack aStack); - - /** - * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here. - */ - public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack); - - /** - * Gets the maximum Efficiency that spare Part can get (0 - 10000) - */ - public abstract int getMaxEfficiency(ItemStack aStack); - - /** - * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block) - */ - public abstract int getPollutionPerTick(ItemStack aStack); - - /** - * Gets the damage to the ItemStack, usually 0 or 1. - */ - public abstract int getDamageToComponent(ItemStack aStack); - - /** - * Gets the Amount of possibly outputted Items for loading the Output Stack Array from NBT. - * This should be the largest Amount that can ever happen legitimately. - */ - public abstract int getAmountOfOutputs(); - - /** - * If it explodes when the Component has to be replaced. - */ - public abstract boolean explodesOnComponentBreak(ItemStack aStack); - - public void stopMachine() { - this.mOutputItems = null; - this.mEUt = 0; - this.mEfficiency = 0; - this.mProgresstime = 0; - this.mMaxProgresstime = 0; - this.mEfficiencyIncrease = 0; - this.getBaseMetaTileEntity().disableWorking(); - } - - public int getRepairStatus() { - return (this.mWrench ? 1 : 0) + (this.mScrewdriver ? 1 : 0) + (this.mSoftHammer ? 1 : 0) + (this.mHardHammer ? 1 : 0) + (this.mSolderingTool ? 1 : 0) + (this.mCrowbar ? 1 : 0); - } - - public int getIdealStatus() { - return 6; - } - - public boolean doRandomMaintenanceDamage() { - if (!this.isCorrectMachinePart(this.mInventory[1]) || (this.getRepairStatus() == 0)) { - this.stopMachine(); - return false; - } - if (this.mRuntime++ > 1000) { - this.mRuntime = 0; - if (this.getBaseMetaTileEntity().getRandomNumber(6000) == 0) { - switch (this.getBaseMetaTileEntity().getRandomNumber(6)) { - case 0: - this.mWrench = false; - break; - case 1: - this.mScrewdriver = false; - break; - case 2: - this.mSoftHammer = false; - break; - case 3: - this.mHardHammer = false; - break; - case 4: - this.mSolderingTool = false; - break; - case 5: - this.mCrowbar = false; - break; - } - } - if ((this.mInventory[1] != null) && (this.getBaseMetaTileEntity().getRandomNumber(2) == 0) && !this.mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) { - if (this.mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { - final NBTTagCompound tNBT = this.mInventory[1].getTagCompound(); - if (tNBT != null) { - NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents"); - if (!tNBT.getBoolean("mDis")) { - tNBT2 = new NBTTagCompound(); - final Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[1]); - final ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1); - final int i = this.mInventory[1].getItemDamage(); - if (i == 170) { - ItemStack tStack = GT_Utility.copyAmount(1, tTurbine); - tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); - tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1); - tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); - } else if (i == 172) { - ItemStack tStack = GT_Utility.copyAmount(1, tTurbine); - tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound())); - tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1); - tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); - } else if (i == 174) { - ItemStack tStack = GT_Utility.copyAmount(2, tTurbine); - tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound())); - tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1); - tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); - } else if (i == 176) { - ItemStack tStack = GT_Utility.copyAmount(2, tTurbine); - tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound())); - tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound())); - tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1); - tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); - } - tNBT.setTag("GT.CraftingComponents", tNBT2); - tNBT.setBoolean("mDis", true); - this.mInventory[1].setTagCompound(tNBT); - - } - } - - ((GT_MetaGenerated_Tool) this.mInventory[1].getItem()).doDamage(this.mInventory[1], (long) Math.min(this.mEUt / 5, Math.pow(this.mEUt, 0.7))); - if (this.mInventory[1].stackSize == 0) { - this.mInventory[1] = null; - } - } - } - } - return true; - } - - public void explodeMultiblock() { - this.mInventory[1] = null; - for (final MetaTileEntity tTileEntity : this.mInputBusses) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mOutputBusses) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mInputHatches) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mOutputHatches) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mDynamoHatches) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mMufflerHatches) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mEnergyHatches) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - for (final MetaTileEntity tTileEntity : this.mMaintenanceHatches) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); - } - this.getBaseMetaTileEntity().doExplosion(V[8]); - } - - public boolean addEnergyOutput(final long aEU) { - if (aEU <= 0) { - return true; - } - for (final GT_MetaTileEntity_Hatch_Dynamo tHatch : this.mDynamoHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) { - return true; - } - } - } - return false; - } - - public long getMaxInputVoltage() { - long rVoltage = 0; - for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); - } - } - return rVoltage; - } - - public boolean drainEnergyInput(final long aEU) { - if (aEU <= 0) { - return true; - } - for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) { - return true; - } - } - } - return false; - } - - public boolean addOutput(final FluidStack aLiquid) { - if (aLiquid == null) { - return false; - } - final FluidStack tLiquid = aLiquid.copy(); - for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { - if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { - final int tAmount = tHatch.fill(tLiquid, false); - if (tAmount >= tLiquid.amount) { - return tHatch.fill(tLiquid, true) >= tLiquid.amount; - } else if (tAmount > 0) { - tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); - } - } - } - return false; - } - - private void addFluidOutputs(final FluidStack[] mOutputFluids2) { - for (int i = 0; i < mOutputFluids2.length; i++) { - if ((this.mOutputHatches.size() > i) && (this.mOutputHatches.get(i) != null) && (mOutputFluids2[i] != null) && isValidMetaTileEntity(this.mOutputHatches.get(i))) { - this.mOutputHatches.get(i).fill(mOutputFluids2[i], true); - } - } - - } - - public boolean depleteInput(final FluidStack aLiquid) { - if (aLiquid == null) { - return false; - } - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - FluidStack tLiquid = tHatch.getFluid(); - if ((tLiquid != null) && tLiquid.isFluidEqual(aLiquid)) { - tLiquid = tHatch.drain(aLiquid.amount, false); - if ((tLiquid != null) && (tLiquid.amount >= aLiquid.amount)) { - tLiquid = tHatch.drain(aLiquid.amount, true); - return (tLiquid != null) && (tLiquid.amount >= aLiquid.amount); - } - } - } - } - return false; - } - - public boolean addOutput(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) { - return false; - } - aStack = GT_Utility.copy(aStack); - // FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); - // if (aLiquid == null) { - for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) { - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getSizeInventory() - 1; i >= 0; i--) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, aStack)) { - return true; - } - } - } - } - for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { - if (isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, aStack)) { - return true; - } - } - } - // }else { - // for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - // if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) { - // int tAmount = tHatch.fill(aLiquid, false); - // if (tAmount >= aLiquid.amount) { - // return tHatch.fill(aLiquid, true) >= aLiquid.amount; - // } - // } - // } - // } - return false; - } - - public boolean depleteInput(final ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) { - return false; - } - final FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); - if (aLiquid != null) { - return this.depleteInput(aLiquid); - } - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { - tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); - return true; - } - } - } - } - for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { - tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); - return true; - } - } - } - } - } - return false; - } - - public ArrayList getStoredOutputs() { - final ArrayList rList = new ArrayList<>(); - for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { - if (isValidMetaTileEntity(tHatch)) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); - } - } - for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) { - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - return rList; - } - - public ArrayList getStoredFluids() { - final ArrayList rList = new ArrayList<>(); - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch) && (tHatch.getFillableStack() != null)) { - rList.add(tHatch.getFillableStack()); - } - } - return rList; - } - - public ArrayList getStoredInputs() { - final ArrayList rList = new ArrayList<>(); - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch) && (tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null)) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0)); - } - } - for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - } - return rList; - } - - public GT_Recipe_Map getRecipeMap() { - return null; - } - - public void updateSlots() { - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - if (isValidMetaTileEntity(tHatch)) { - tHatch.updateSlots(); - } - } - for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) { - if (isValidMetaTileEntity(tHatch)) { - tHatch.updateSlots(); - } - } - } - - public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { - return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { - return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { - return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); - } - return false; - } - - public boolean addMaintenanceToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); - } - return false; - } - - public boolean addEnergyInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); - } - return false; - } - - public boolean addDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity); - } - return false; - } - - public boolean addMufflerToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); - } - return false; - } - - public boolean addInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap(); - return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = this.getRecipeMap(); - return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); - } - return false; - } - - public boolean addOutputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); - } - return false; - } - - @Override - public String[] getInfoData() { - return new String[]{"Progress:", (this.mProgresstime / 20) + "secs", (this.mMaxProgresstime / 20) + "secs", "Efficiency:", (this.mEfficiency / 100.0F) + "%", "Problems:", "" + (this.getIdealStatus() - this.getRepairStatus())}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } -} diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java deleted file mode 100644 index 1c6a8e9278..0000000000 --- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.core.util.debug; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.item.Item; - -import net.minecraftforge.client.event.RenderGameOverlayEvent; - -public class DEBUG_ScreenOverlay extends Gui { - - int width, height; - Minecraft mc = Minecraft.getMinecraft(); - - @SubscribeEvent - public void eventHandler(final RenderGameOverlayEvent.Text event) - { - - //if (mc.thePlayer.getHeldItem().equals(ModItems.itemStaballoyPickaxe)){ - final ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); - final FontRenderer fontRender = this.mc.fontRenderer; - this.width = res.getScaledWidth(); - this.height = res.getScaledHeight(); - Minecraft.getMinecraft().entityRenderer.setupOverlayRendering(); - final String str = "Words"; - Item heldItem = null; - - try{heldItem = this.mc.thePlayer.getHeldItem().getItem(); - - if (heldItem != null){ - /*if (heldItem instanceof StaballoyPickaxe){ - - int dmg =((StaballoyPickaxe) heldItem).getDamage(((StaballoyPickaxe) heldItem).thisPickaxe); - - ((StaballoyPickaxe) heldItem).checkFacing(((StaballoyPickaxe) heldItem).localWorld); - str = "DAMAGE: "+ dmg +" | FACING: "+((StaballoyPickaxe) heldItem).FACING+" | FACING_HORIZONTAL: "+((StaballoyPickaxe) heldItem).FACING_HORIZONTAL+" | LOOKING DIRECTION: "+((StaballoyPickaxe) heldItem).lookingDirection; - - drawString(fontRender, str, (this.width - fontRender.getStringWidth(str)) / 2, this.height / 10, 0xFFAA00); - }*/ - } - }catch(final NullPointerException e){} - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java deleted file mode 100644 index 50d12871cb..0000000000 --- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java +++ /dev/null @@ -1,64 +0,0 @@ -package gtPlusPlus.core.util.debug; - -import java.util.concurrent.TimeUnit; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import net.minecraftforge.common.util.ForgeDirection; - -public class DEBUG_TimerThread implements Runnable { - - private final World world; - private final EntityPlayer player; - - - public DEBUG_TimerThread(final World WORLD, final EntityPlayer PLAYER) { - this.world = WORLD; - this.player = PLAYER; - } - - @Override - public void run(){ - int xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX; - int zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ; - - final int stepX = Minecraft.getMinecraft().objectMouseOver.blockX; - final int stepY = Minecraft.getMinecraft().objectMouseOver.blockY; - final int stepZ = Minecraft.getMinecraft().objectMouseOver.blockZ; - Logger.INFO("Clicked on a Block @ "+"[X:"+stepX+"][Y:"+stepY+"][Z:"+stepZ+"]"+" with xDir:"+xDir+" zDir:"+zDir); - this.world.setBlock(stepX, stepY, stepZ, Blocks.bedrock,0,3); - Logger.INFO("Makng it Bedrock for future investment."); - //for (int i = -1; i <= 1; i++) { - //stepX = stepX+i; - for (int i = stepX-1; i <= (stepX+1); i++){ - for (int j = stepZ-1; j <= (stepZ+1); j++){ - for (int h = stepY-1; h <= (stepY+1); h++){ - - xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX; - zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ; - - //for (int j = -1; j <= 1; j++) { - //stepZ = stepZ+j; - //for (int h = -1; h <= 1; h++) { - //stepY = stepY+h; - Logger.INFO("Placing Block @ "+"[X:"+i+"][Y:"+h+"][Z:"+j+"]"+" with xDir:"+xDir+" zDir:"+zDir); - if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { - this.world.setBlock(i, h, j, Blocks.stone,0,3); - } - else { - Logger.INFO("Not even sure what this is for, but I got here."); - } - try { - TimeUnit.MILLISECONDS.sleep(500); - } catch (final InterruptedException e1) { - e1.printStackTrace(); - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java b/src/Java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java deleted file mode 100644 index 7cb1054d53..0000000000 --- a/src/Java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java +++ /dev/null @@ -1,343 +0,0 @@ -package gtPlusPlus.core.util.debug; - -import java.nio.ByteBuffer; - -import org.lwjgl.BufferUtils; -import org.lwjgl.opengl.GL11; - - -/** - * User: The Grey Ghost - * Date: 9/02/14 - */ -public class UtilityGL11Debug -{ - public class GLproperty - { - public GLproperty(final int init_gLconstant, final String init_name, final String init_description, final String init_category, final String init_fetchCommand) { - this.gLconstant = init_gLconstant; - this.name = init_name; - this.description = init_description; - this.category = init_category; - this.fetchCommand = init_fetchCommand; - } - - public int gLconstant; - public String name; - public String description; - public String category; - public String fetchCommand; - } - - public static UtilityGL11Debug instance = new UtilityGL11Debug(); - - public GLproperty[] propertyList = - - { - new GLproperty(GL11.GL_CURRENT_COLOR, "GL_CURRENT_COLOR", "Current color", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_INDEX, "GL_CURRENT_INDEX", "Current color index", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_TEXTURE_COORDS, "GL_CURRENT_TEXTURE_COORDS", "Current texture coordinates", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_NORMAL, "GL_CURRENT_NORMAL", "Current normal", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_RASTER_POSITION, "GL_CURRENT_RASTER_POSITION", "Current raster position", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_RASTER_DISTANCE, "GL_CURRENT_RASTER_DISTANCE", "Current raster distance", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_RASTER_COLOR, "GL_CURRENT_RASTER_COLOR", "Color associated with raster position", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_RASTER_INDEX, "GL_CURRENT_RASTER_INDEX", "Color index associated with raster position", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_RASTER_TEXTURE_COORDS, "GL_CURRENT_RASTER_TEXTURE_COORDS", "Texture coordinates associated with raster position", "current", "glGetFloatv()"), - new GLproperty(GL11.GL_CURRENT_RASTER_POSITION_VALID, "GL_CURRENT_RASTER_POSITION_VALID", "Raster position valid bit", "current", "glGetBooleanv()"), - new GLproperty(GL11.GL_EDGE_FLAG, "GL_EDGE_FLAG", "Edge flag", "current", "glGetBooleanv()"), - new GLproperty(GL11.GL_VERTEX_ARRAY, "GL_VERTEX_ARRAY", "Vertex array enable", "vertex-array", "glIsEnabled()"), - new GLproperty(GL11.GL_VERTEX_ARRAY_SIZE, "GL_VERTEX_ARRAY_SIZE", "Coordinates per vertex", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_VERTEX_ARRAY_TYPE, "GL_VERTEX_ARRAY_TYPE", "Type of vertex coordinates", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_VERTEX_ARRAY_STRIDE, "GL_VERTEX_ARRAY_STRIDE", "Stride between vertices", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_VERTEX_ARRAY_POINTER, "GL_VERTEX_ARRAY_POINTER", "Pointer to the vertex array", "vertex-array", "glGetPointerv()"), - new GLproperty(GL11.GL_NORMAL_ARRAY, "GL_NORMAL_ARRAY", "Normal array enable", "vertex-array", "glIsEnabled()"), - new GLproperty(GL11.GL_NORMAL_ARRAY_TYPE, "GL_NORMAL_ARRAY_TYPE", "Type of normal coordinates", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_NORMAL_ARRAY_STRIDE, "GL_NORMAL_ARRAY_STRIDE", "Stride between normals", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_NORMAL_ARRAY_POINTER, "GL_NORMAL_ARRAY_POINTER", "Pointer to the normal array", "vertex-array", "glGetPointerv()"), - new GLproperty(GL11.GL_COLOR_ARRAY, "GL_COLOR_ARRAY", "RGBA color array enable", "vertex-array", "glIsEnabled()"), - new GLproperty(GL11.GL_COLOR_ARRAY_SIZE, "GL_COLOR_ARRAY_SIZE", "Colors per vertex", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_COLOR_ARRAY_TYPE, "GL_COLOR_ARRAY_TYPE", "Type of color components", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_COLOR_ARRAY_STRIDE, "GL_COLOR_ARRAY_STRIDE", "Stride between colors", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_COLOR_ARRAY_POINTER, "GL_COLOR_ARRAY_POINTER", "Pointer to the color array", "vertex-array", "glGetPointerv()"), - new GLproperty(GL11.GL_INDEX_ARRAY, "GL_INDEX_ARRAY", "Color-index array enable", "vertex-array", "glIsEnabled()"), - new GLproperty(GL11.GL_INDEX_ARRAY_TYPE, "GL_INDEX_ARRAY_TYPE", "Type of color indices", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_INDEX_ARRAY_STRIDE, "GL_INDEX_ARRAY_STRIDE", "Stride between color indices", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_INDEX_ARRAY_POINTER, "GL_INDEX_ARRAY_POINTER", "Pointer to the index array", "vertex-array", "glGetPointerv()"), - new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY, "GL_TEXTURE_COORD_ARRAY", "Texture coordinate array enable", "vertex-array", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_SIZE, "GL_TEXTURE_COORD_ARRAY_SIZE", "Texture coordinates per element", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_TYPE, "GL_TEXTURE_COORD_ARRAY_TYPE", "Type of texture coordinates", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_STRIDE, "GL_TEXTURE_COORD_ARRAY_STRIDE", "Stride between texture coordinates", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_POINTER, "GL_TEXTURE_COORD_ARRAY_POINTER", "Pointer to the texture coordinate array", "vertex-array", "glGetPointerv()"), - new GLproperty(GL11.GL_EDGE_FLAG_ARRAY, "GL_EDGE_FLAG_ARRAY", "Edge flag array enable", "vertex-array", "glIsEnabled()"), - new GLproperty(GL11.GL_EDGE_FLAG_ARRAY_STRIDE, "GL_EDGE_FLAG_ARRAY_STRIDE", "Stride between edge flags", "vertex-array", "glGetIntegerv()"), - new GLproperty(GL11.GL_EDGE_FLAG_ARRAY_POINTER, "GL_EDGE_FLAG_ARRAY_POINTER", "Pointer to the edge flag array", "vertex-array", "glGetPointerv()"), - new GLproperty(GL11.GL_MODELVIEW_MATRIX, "GL_MODELVIEW_MATRIX", "Modelview matrix stack", "matrix", "glGetFloatv()"), - new GLproperty(GL11.GL_PROJECTION_MATRIX, "GL_PROJECTION_MATRIX", "Projection matrix stack", "matrix", "glGetFloatv()"), - new GLproperty(GL11.GL_TEXTURE_MATRIX, "GL_TEXTURE_MATRIX", "Texture matrix stack", "matrix", "glGetFloatv()"), - new GLproperty(GL11.GL_VIEWPORT, "GL_VIEWPORT", "Viewport origin and extent", "viewport", "glGetIntegerv()"), - new GLproperty(GL11.GL_DEPTH_RANGE, "GL_DEPTH_RANGE", "Depth range near and far", "viewport", "glGetFloatv()"), - new GLproperty(GL11.GL_MODELVIEW_STACK_DEPTH, "GL_MODELVIEW_STACK_DEPTH", "Modelview matrix stack pointer", "matrix", "glGetIntegerv()"), - new GLproperty(GL11.GL_PROJECTION_STACK_DEPTH, "GL_PROJECTION_STACK_DEPTH", "Projection matrix stack pointer", "matrix", "glGetIntegerv()"), - new GLproperty(GL11.GL_TEXTURE_STACK_DEPTH, "GL_TEXTURE_STACK_DEPTH", "Texture matrix stack pointer", "matrix", "glGetIntegerv()"), - new GLproperty(GL11.GL_MATRIX_MODE, "GL_MATRIX_MODE", "Current matrix mode", "transform", "glGetIntegerv()"), - new GLproperty(GL11.GL_NORMALIZE, "GL_NORMALIZE", "Current normal normalization on/off", "transform/ enable", "glIsEnabled()"), - new GLproperty(GL11.GL_FOG_COLOR, "GL_FOG_COLOR", "Fog color", "fog", "glGetFloatv()"), - new GLproperty(GL11.GL_FOG_INDEX, "GL_FOG_INDEX", "Fog index", "fog", "glGetFloatv()"), - new GLproperty(GL11.GL_FOG_DENSITY, "GL_FOG_DENSITY", "Exponential fog density", "fog", "glGetFloatv()"), - new GLproperty(GL11.GL_FOG_START, "GL_FOG_START", "Linear fog start", "fog", "glGetFloatv()"), - new GLproperty(GL11.GL_FOG_END, "GL_FOG_END", "Linear fog end", "fog", "glGetFloatv()"), - new GLproperty(GL11.GL_FOG_MODE, "GL_FOG_MODE", "Fog mode", "fog", "glGetIntegerv()"), - new GLproperty(GL11.GL_FOG, "GL_FOG", "True if fog enabled", "fog/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_SHADE_MODEL, "GL_SHADE_MODEL", "glShadeModel() setting", "lighting", "glGetIntegerv()"), - new GLproperty(GL11.GL_LIGHTING, "GL_LIGHTING", "True if lighting is enabled", "lighting/e nable", "glIsEnabled()"), - new GLproperty(GL11.GL_COLOR_MATERIAL, "GL_COLOR_MATERIAL", "True if color tracking is enabled", "lighting", "glIsEnabled()"), - new GLproperty(GL11.GL_COLOR_MATERIAL_PARAMETER, "GL_COLOR_MATERIAL_PARAMETER", "Material properties tracking current color", "lighting", "glGetIntegerv()"), - new GLproperty(GL11.GL_COLOR_MATERIAL_FACE, "GL_COLOR_MATERIAL_FACE", "Face(s) affected by color tracking", "lighting", "glGetIntegerv()"), - new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient material color", "lighting", "glGetMaterialfv()"), - new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse material color", "lighting", "glGetMaterialfv()"), - new GLproperty(GL11.GL_SPECULAR, "GL_SPECULAR", "Specular material color", "lighting", "glGetMaterialfv()"), - new GLproperty(GL11.GL_EMISSION, "GL_EMISSION", "Emissive material color", "lighting", "glGetMaterialfv()"), - new GLproperty(GL11.GL_SHININESS, "GL_SHININESS", "Specular exponent of material", "lighting", "glGetMaterialfv()"), - new GLproperty(GL11.GL_LIGHT_MODEL_AMBIENT, "GL_LIGHT_MODEL_AMBIENT", "Ambient scene color", "lighting", "glGetFloatv()"), - new GLproperty(GL11.GL_LIGHT_MODEL_LOCAL_VIEWER, "GL_LIGHT_MODEL_LOCAL_VIEWER", "Viewer is local", "lighting", "glGetBooleanv()"), - new GLproperty(GL11.GL_LIGHT_MODEL_TWO_SIDE, "GL_LIGHT_MODEL_TWO_SIDE", "Use two-sided lighting", "lighting", "glGetBooleanv()"), - new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient intensity of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse intensity of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_SPECULAR, "GL_SPECULAR", "Specular intensity of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_POSITION, "GL_POSITION", "Position of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_CONSTANT_ATTENUATION, "GL_CONSTANT_ATTENUATION", "Constant attenuation factor", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_LINEAR_ATTENUATION, "GL_LINEAR_ATTENUATION", "Linear attenuation factor", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_QUADRATIC_ATTENUATION, "GL_QUADRATIC_ATTENUATION", "Quadratic attenuation factor", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_SPOT_DIRECTION, "GL_SPOT_DIRECTION", "Spotlight direction of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_SPOT_EXPONENT, "GL_SPOT_EXPONENT", "Spotlight exponent of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_SPOT_CUTOFF, "GL_SPOT_CUTOFF", "Spotlight angle of light i", "lighting", "glGetLightfv()"), - new GLproperty(GL11.GL_LIGHT0, "GL_LIGHT0", "True if light 0 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT1, "GL_LIGHT1", "True if light 1 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT2, "GL_LIGHT2", "True if light 2 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT3, "GL_LIGHT3", "True if light 3 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT4, "GL_LIGHT4", "True if light 4 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT5, "GL_LIGHT5", "True if light 5 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT6, "GL_LIGHT6", "True if light 6 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LIGHT7, "GL_LIGHT7", "True if light 7 enabled", "lighting/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_COLOR_INDEXES, "GL_COLOR_INDEXES", "ca, cd, and cs for color-index lighting", "lighting/e nable", "glGetMaterialfv()"), - new GLproperty(GL11.GL_POINT_SIZE, "GL_POINT_SIZE", "Point size", "point", "glGetFloatv()"), - new GLproperty(GL11.GL_POINT_SMOOTH, "GL_POINT_SMOOTH", "Point antialiasing on", "point/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LINE_WIDTH, "GL_LINE_WIDTH", "Line width", "line", "glGetFloatv()"), - new GLproperty(GL11.GL_LINE_SMOOTH, "GL_LINE_SMOOTH", "Line antialiasing on", "line/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LINE_STIPPLE_PATTERN, "GL_LINE_STIPPLE_PATTERN", "Line stipple", "line", "glGetIntegerv()"), - new GLproperty(GL11.GL_LINE_STIPPLE_REPEAT, "GL_LINE_STIPPLE_REPEAT", "Line stipple repeat", "line", "glGetIntegerv()"), - new GLproperty(GL11.GL_LINE_STIPPLE, "GL_LINE_STIPPLE", "Line stipple enable", "line/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_CULL_FACE, "GL_CULL_FACE", "Polygon culling enabled", "polygon/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_CULL_FACE_MODE, "GL_CULL_FACE_MODE", "Cull front-/back-facing polygons", "polygon", "glGetIntegerv()"), - new GLproperty(GL11.GL_FRONT_FACE, "GL_FRONT_FACE", "Polygon front-face CW/CCW indicator", "polygon", "glGetIntegerv()"), - new GLproperty(GL11.GL_POLYGON_SMOOTH, "GL_POLYGON_SMOOTH", "Polygon antialiasing on", "polygon/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_POLYGON_MODE, "GL_POLYGON_MODE", "Polygon rasterization mode (front and back)", "polygon", "glGetIntegerv()"), - new GLproperty(GL11.GL_POLYGON_OFFSET_FACTOR, "GL_POLYGON_OFFSET_FACTOR", "Polygon offset factor", "polygon", "glGetFloatv()"), - new GLproperty(GL11.GL_POLYGON_OFFSET_POINT, "GL_POLYGON_OFFSET_POINT", "Polygon offset enable for GL_POINT mode rasterization", "polygon/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_POLYGON_OFFSET_LINE, "GL_POLYGON_OFFSET_LINE", "Polygon offset enable for GL_LINE mode rasterization", "polygon/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_POLYGON_OFFSET_FILL, "GL_POLYGON_OFFSET_FILL", "Polygon offset enable for GL_FILL mode rasterization", "polygon/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_POLYGON_STIPPLE, "GL_POLYGON_STIPPLE", "Polygon stipple enable", "polygon/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_1D, "GL_TEXTURE_1D", "True if 1-D texturing enabled ", "texture/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_2D, "GL_TEXTURE_2D", "True if 2-D texturing enabled ", "texture/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_BINDING_1D, "GL_TEXTURE_BINDING_1D", "Texture object bound to GL_TEXTURE_1D", "texture", "glGetIntegerv()"), - new GLproperty(GL11.GL_TEXTURE_BINDING_2D, "GL_TEXTURE_BINDING_2D", "Texture object bound to GL_TEXTURE_2D", "texture", "glGetIntegerv()"), - new GLproperty(GL11.GL_TEXTURE, "GL_TEXTURE", "x-D texture image at level of detail i", "UNUSED", "glGetTexImage()"), - new GLproperty(GL11.GL_TEXTURE_WIDTH, "GL_TEXTURE_WIDTH", "x-D texture image i's width", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_HEIGHT, "GL_TEXTURE_HEIGHT", "x-D texture image i's height", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_BORDER, "GL_TEXTURE_BORDER", "x-D texture image i's border width", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_RED_SIZE, "GL_TEXTURE_RED_SIZE", "x-D texture image i's red resolution", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_GREEN_SIZE, "GL_TEXTURE_GREEN_SIZE", "x-D texture image i's green resolution", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_BLUE_SIZE, "GL_TEXTURE_BLUE_SIZE", "x-D texture image i's blue resolution", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_ALPHA_SIZE, "GL_TEXTURE_ALPHA_SIZE", "x-D texture image i's alpha resolution", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_LUMINANCE_SIZE, "GL_TEXTURE_LUMINANCE_SIZE", "x-D texture image i's luminance resolution", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_INTENSITY_SIZE, "GL_TEXTURE_INTENSITY_SIZE", "x-D texture image i's intensity resolution", "UNUSED", "glGetTexLevelParameter*()"), - new GLproperty(GL11.GL_TEXTURE_BORDER_COLOR, "GL_TEXTURE_BORDER_COLOR", "Texture border color", "texture", "glGetTexParameter*()"), - new GLproperty(GL11.GL_TEXTURE_MIN_FILTER, "GL_TEXTURE_MIN_FILTER", "Texture minification function", "texture", "glGetTexParameter*()"), - new GLproperty(GL11.GL_TEXTURE_MAG_FILTER, "GL_TEXTURE_MAG_FILTER", "Texture magnification function", "texture", "glGetTexParameter*()"), - new GLproperty(GL11.GL_TEXTURE_WRAP_S, "GL_TEXTURE_WRAP_S", "Texture wrap mode (x is S or T)", "texture", "glGetTexParameter*()"), - new GLproperty(GL11.GL_TEXTURE_WRAP_T, "GL_TEXTURE_WRAP_T", "Texture wrap mode (x is S or T)", "texture", "glGetTexParameter*()"), - new GLproperty(GL11.GL_TEXTURE_PRIORITY, "GL_TEXTURE_PRIORITY", "Texture object priority", "texture", "glGetTexParameter*()"), - new GLproperty(GL11.GL_TEXTURE_ENV_MODE, "GL_TEXTURE_ENV_MODE", "Texture application function", "texture", "glGetTexEnviv()"), - new GLproperty(GL11.GL_TEXTURE_ENV_COLOR, "GL_TEXTURE_ENV_COLOR", "Texture environment color", "texture", "glGetTexEnvfv()"), - new GLproperty(GL11.GL_TEXTURE_GEN_S, "GL_TEXTURE_GEN_S", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_GEN_T, "GL_TEXTURE_GEN_T", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_GEN_R, "GL_TEXTURE_GEN_R", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_TEXTURE_GEN_Q, "GL_TEXTURE_GEN_Q", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_EYE_PLANE, "GL_EYE_PLANE", "Texgen plane equation coefficients", "texture", "glGetTexGenfv()"), - new GLproperty(GL11.GL_OBJECT_PLANE, "GL_OBJECT_PLANE", "Texgen object linear coefficients", "texture", "glGetTexGenfv()"), - new GLproperty(GL11.GL_TEXTURE_GEN_MODE, "GL_TEXTURE_GEN_MODE", "Function used for texgen", "texture", "glGetTexGeniv()"), - new GLproperty(GL11.GL_SCISSOR_TEST, "GL_SCISSOR_TEST", "Scissoring enabled", "scissor/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_SCISSOR_BOX, "GL_SCISSOR_BOX", "Scissor box", "scissor", "glGetIntegerv()"), - new GLproperty(GL11.GL_ALPHA_TEST, "GL_ALPHA_TEST", "Alpha test enabled", "color-buffer/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_ALPHA_TEST_FUNC, "GL_ALPHA_TEST_FUNC", "Alpha test function", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_ALPHA_TEST_REF, "GL_ALPHA_TEST_REF", "Alpha test reference value", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_TEST, "GL_STENCIL_TEST", "Stenciling enabled", "stencil-buffer/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_STENCIL_FUNC, "GL_STENCIL_FUNC", "Stencil function", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_VALUE_MASK, "GL_STENCIL_VALUE_MASK", "Stencil mask", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_REF, "GL_STENCIL_REF", "Stencil reference value", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_FAIL, "GL_STENCIL_FAIL", "Stencil fail action", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_PASS_DEPTH_FAIL, "GL_STENCIL_PASS_DEPTH_FAIL", "Stencil depth buffer fail action", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_PASS_DEPTH_PASS, "GL_STENCIL_PASS_DEPTH_PASS", "Stencil depth buffer pass action", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_DEPTH_TEST, "GL_DEPTH_TEST", "Depth buffer enabled", "depth-buffer/ena ble", "glIsEnabled()"), - new GLproperty(GL11.GL_DEPTH_FUNC, "GL_DEPTH_FUNC", "Depth buffer test function", "depth-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_BLEND, "GL_BLEND", "Blending enabled", "color-buffer/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_BLEND_SRC, "GL_BLEND_SRC", "Blending source function", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_BLEND_DST, "GL_BLEND_DST", "Blending destination function", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_DITHER, "GL_DITHER", "Dithering enabled", "color-buffer/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_INDEX_LOGIC_OP, "GL_INDEX_LOGIC_OP", "Color index logical operation enabled", "color-buffer/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_COLOR_LOGIC_OP, "GL_COLOR_LOGIC_OP", "RGBA color logical operation enabled", "color-buffer/enable", "glIsEnabled()"), - new GLproperty(GL11.GL_LOGIC_OP_MODE, "GL_LOGIC_OP_MODE", "Logical operation function", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_DRAW_BUFFER, "GL_DRAW_BUFFER", "Buffers selected for drawing", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_INDEX_WRITEMASK, "GL_INDEX_WRITEMASK", "Color-index writemask", "color-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK", "Color write enables; R, G, B, or A", "color-buffer", "glGetBooleanv()"), - new GLproperty(GL11.GL_DEPTH_WRITEMASK, "GL_DEPTH_WRITEMASK", "Depth buffer enabled for writing", "depth-buffer", "glGetBooleanv()"), - new GLproperty(GL11.GL_STENCIL_WRITEMASK, "GL_STENCIL_WRITEMASK", "Stencil-buffer writemask", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_COLOR_CLEAR_VALUE, "GL_COLOR_CLEAR_VALUE", "Color-buffer clear value (RGBA mode)", "color-buffer", "glGetFloatv()"), - new GLproperty(GL11.GL_INDEX_CLEAR_VALUE, "GL_INDEX_CLEAR_VALUE", "Color-buffer clear value (color-index mode)", "color-buffer", "glGetFloatv()"), - new GLproperty(GL11.GL_DEPTH_CLEAR_VALUE, "GL_DEPTH_CLEAR_VALUE", "Depth-buffer clear value", "depth-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_CLEAR_VALUE, "GL_STENCIL_CLEAR_VALUE", "Stencil-buffer clear value", "stencil-buffer", "glGetIntegerv()"), - new GLproperty(GL11.GL_ACCUM_CLEAR_VALUE, "GL_ACCUM_CLEAR_VALUE", "Accumulation-buffer clear value", "accum-buffer", "glGetFloatv()"), - new GLproperty(GL11.GL_UNPACK_SWAP_BYTES, "GL_UNPACK_SWAP_BYTES", "Value of GL_UNPACK_SWAP_BYTES", "pixel-store", "glGetBooleanv()"), - new GLproperty(GL11.GL_UNPACK_LSB_FIRST, "GL_UNPACK_LSB_FIRST", "Value of GL_UNPACK_LSB_FIRST", "pixel-store", "glGetBooleanv()"), - new GLproperty(GL11.GL_UNPACK_ROW_LENGTH, "GL_UNPACK_ROW_LENGTH", "Value of GL_UNPACK_ROW_LENGTH", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_UNPACK_SKIP_ROWS, "GL_UNPACK_SKIP_ROWS", "Value of GL_UNPACK_SKIP_ROWS", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_UNPACK_SKIP_PIXELS, "GL_UNPACK_SKIP_PIXELS", "Value of GL_UNPACK_SKIP_PIXELS", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT", "Value of GL_UNPACK_ALIGNMENT", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_PACK_SWAP_BYTES, "GL_PACK_SWAP_BYTES", "Value of GL_PACK_SWAP_BYTES", "pixel-store", "glGetBooleanv()"), - new GLproperty(GL11.GL_PACK_LSB_FIRST, "GL_PACK_LSB_FIRST", "Value of GL_PACK_LSB_FIRST", "pixel-store", "glGetBooleanv()"), - new GLproperty(GL11.GL_PACK_ROW_LENGTH, "GL_PACK_ROW_LENGTH", "Value of GL_PACK_ROW_LENGTH", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_PACK_SKIP_ROWS, "GL_PACK_SKIP_ROWS", "Value of GL_PACK_SKIP_ROWS", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_PACK_SKIP_PIXELS, "GL_PACK_SKIP_PIXELS", "Value of GL_PACK_SKIP_PIXELS", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT", "Value of GL_PACK_ALIGNMENT", "pixel-store", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAP_COLOR, "GL_MAP_COLOR", "True if colors are mapped", "pixel", "glGetBooleanv()"), - new GLproperty(GL11.GL_MAP_STENCIL, "GL_MAP_STENCIL", "True if stencil values are mapped", "pixel", "glGetBooleanv()"), - new GLproperty(GL11.GL_INDEX_SHIFT, "GL_INDEX_SHIFT", "Value of GL_INDEX_SHIFT", "pixel", "glGetIntegerv()"), - new GLproperty(GL11.GL_INDEX_OFFSET, "GL_INDEX_OFFSET", "Value of GL_INDEX_OFFSET", "pixel", "glGetIntegerv()"), - new GLproperty(GL11.GL_ZOOM_X, "GL_ZOOM_X", "x zoom factor", "pixel", "glGetFloatv()"), - new GLproperty(GL11.GL_ZOOM_Y, "GL_ZOOM_Y", "y zoom factor", "pixel", "glGetFloatv()"), - new GLproperty(GL11.GL_READ_BUFFER, "GL_READ_BUFFER", "Read source buffer", "pixel", "glGetIntegerv()"), - new GLproperty(GL11.GL_ORDER, "GL_ORDER", "1D map order", "capability", "glGetMapiv()"), - new GLproperty(GL11.GL_ORDER, "GL_ORDER", "2D map orders", "capability", "glGetMapiv()"), - new GLproperty(GL11.GL_COEFF, "GL_COEFF", "1D control points", "capability", "glGetMapfv()"), - new GLproperty(GL11.GL_COEFF, "GL_COEFF", "2D control points", "capability", "glGetMapfv()"), - new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "1D domain endpoints", "capability", "glGetMapfv()"), - new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "2D domain endpoints", "capability", "glGetMapfv()"), - new GLproperty(GL11.GL_MAP1_GRID_DOMAIN, "GL_MAP1_GRID_DOMAIN", "1D grid endpoints", "eval", "glGetFloatv()"), - new GLproperty(GL11.GL_MAP2_GRID_DOMAIN, "GL_MAP2_GRID_DOMAIN", "2D grid endpoints", "eval", "glGetFloatv()"), - new GLproperty(GL11.GL_MAP1_GRID_SEGMENTS, "GL_MAP1_GRID_SEGMENTS", "1D grid divisions", "eval", "glGetFloatv()"), - new GLproperty(GL11.GL_MAP2_GRID_SEGMENTS, "GL_MAP2_GRID_SEGMENTS", "2D grid divisions", "eval", "glGetFloatv()"), - new GLproperty(GL11.GL_AUTO_NORMAL, "GL_AUTO_NORMAL", "True if automatic normal generation enabled", "eval", "glIsEnabled()"), - new GLproperty(GL11.GL_PERSPECTIVE_CORRECTION_HINT, "GL_PERSPECTIVE_CORRECTION_HINT", "Perspective correction hint", "hint", "glGetIntegerv()"), - new GLproperty(GL11.GL_POINT_SMOOTH_HINT, "GL_POINT_SMOOTH_HINT", "Point smooth hint", "hint", "glGetIntegerv()"), - new GLproperty(GL11.GL_LINE_SMOOTH_HINT, "GL_LINE_SMOOTH_HINT", "Line smooth hint", "hint", "glGetIntegerv()"), - new GLproperty(GL11.GL_POLYGON_SMOOTH_HINT, "GL_POLYGON_SMOOTH_HINT", "Polygon smooth hint", "hint", "glGetIntegerv()"), - new GLproperty(GL11.GL_FOG_HINT, "GL_FOG_HINT", "Fog hint", "hint", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_LIGHTS, "GL_MAX_LIGHTS", "Maximum number of lights", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_CLIP_PLANES, "GL_MAX_CLIP_PLANES", "Maximum number of user clipping planes", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_MODELVIEW_STACK_DEPTH, "GL_MAX_MODELVIEW_STACK_DEPTH", "Maximum modelview-matrix stack depth", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH", "Maximum projection-matrix stack depth", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_TEXTURE_STACK_DEPTH, "GL_MAX_TEXTURE_STACK_DEPTH", "Maximum depth of texture matrix stack", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_SUBPIXEL_BITS, "GL_SUBPIXEL_BITS", "Number of bits of subpixel precision in x and y", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_TEXTURE_SIZE, "GL_MAX_TEXTURE_SIZE", "See discussion in Texture Proxy in Chapter 9", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_PIXEL_MAP_TABLE, "GL_MAX_PIXEL_MAP_TABLE", "Maximum size of a glPixelMap() translation table", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_NAME_STACK_DEPTH, "GL_MAX_NAME_STACK_DEPTH", "Maximum selection-name stack depth", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_LIST_NESTING, "GL_MAX_LIST_NESTING", "Maximum display-list call nesting", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_EVAL_ORDER, "GL_MAX_EVAL_ORDER", "Maximum evaluator polynomial order", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_VIEWPORT_DIMS, "GL_MAX_VIEWPORT_DIMS", "Maximum viewport dimensions", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_ATTRIB_STACK_DEPTH, "GL_MAX_ATTRIB_STACK_DEPTH", "Maximum depth of the attribute stack", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH", "Maximum depth of the client attribute stack", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_AUX_BUFFERS, "GL_AUX_BUFFERS", "Number of auxiliary buffers", "capability", "glGetBooleanv()"), - new GLproperty(GL11.GL_RGBA_MODE, "GL_RGBA_MODE", "True if color buffers store RGBA", "capability", "glGetBooleanv()"), - new GLproperty(GL11.GL_INDEX_MODE, "GL_INDEX_MODE", "True if color buffers store indices", "capability", "glGetBooleanv()"), - new GLproperty(GL11.GL_DOUBLEBUFFER, "GL_DOUBLEBUFFER", "True if front and back buffers exist", "capability", "glGetBooleanv()"), - new GLproperty(GL11.GL_STEREO, "GL_STEREO", "True if left and right buffers exist", "capability", "glGetBooleanv()"), - new GLproperty(GL11.GL_POINT_SIZE_RANGE, "GL_POINT_SIZE_RANGE", "Range (low to high) of antialiased point sizes", "capability", "glGetFloatv()"), - new GLproperty(GL11.GL_POINT_SIZE_GRANULARITY, "GL_POINT_SIZE_GRANULARITY", "Antialiased point-size granularity", "capability", "glGetFloatv()"), - new GLproperty(GL11.GL_LINE_WIDTH_RANGE, "GL_LINE_WIDTH_RANGE", "Range (low to high) of antialiased line widths", "capability", "glGetFloatv()"), - new GLproperty(GL11.GL_LINE_WIDTH_GRANULARITY, "GL_LINE_WIDTH_GRANULARITY", "Antialiased line-width granularity", "capability", "glGetFloatv()"), - new GLproperty(GL11.GL_RED_BITS, "GL_RED_BITS", "Number of bits per red component in color buffers", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_GREEN_BITS, "GL_GREEN_BITS", "Number of bits per green component in color buffers", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_BLUE_BITS, "GL_BLUE_BITS", "Number of bits per blue component in color buffers", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_ALPHA_BITS, "GL_ALPHA_BITS", "Number of bits per alpha component in color buffers", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_INDEX_BITS, "GL_INDEX_BITS", "Number of bits per index in color buffers", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_DEPTH_BITS, "GL_DEPTH_BITS", "Number of depth-buffer bitplanes", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_STENCIL_BITS, "GL_STENCIL_BITS", "Number of stencil bitplanes", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_ACCUM_RED_BITS, "GL_ACCUM_RED_BITS", "Number of bits per red component in the accumulation buffer", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS", "Number of bits per green component in the accumulation buffer", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_ACCUM_BLUE_BITS, "GL_ACCUM_BLUE_BITS", "Number of bits per blue component in the accumulation buffer", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS", "Number of bits per alpha component in the accumulation buffer", "capability", "glGetIntegerv()"), - new GLproperty(GL11.GL_LIST_BASE, "GL_LIST_BASE", "Setting of glListBase()", "list", "glGetIntegerv()"), - new GLproperty(GL11.GL_LIST_INDEX, "GL_LIST_INDEX", "Number of display list under construction; 0 if none", "current", "glGetIntegerv()"), - new GLproperty(GL11.GL_LIST_MODE, "GL_LIST_MODE", "Mode of display list under construction; undefined if none", "current", "glGetIntegerv()"), - new GLproperty(GL11.GL_ATTRIB_STACK_DEPTH, "GL_ATTRIB_STACK_DEPTH", "Attribute stack pointer", "current", "glGetIntegerv()"), - new GLproperty(GL11.GL_CLIENT_ATTRIB_STACK_DEPTH, "GL_CLIENT_ATTRIB_STACK_DEPTH", "Client attribute stack pointer", "current", "glGetIntegerv()"), - new GLproperty(GL11.GL_NAME_STACK_DEPTH, "GL_NAME_STACK_DEPTH", "Name stack depth", "current", "glGetIntegerv()"), - new GLproperty(GL11.GL_RENDER_MODE, "GL_RENDER_MODE", "glRenderMode() setting", "current", "glGetIntegerv()"), - new GLproperty(GL11.GL_SELECTION_BUFFER_POINTER, "GL_SELECTION_BUFFER_POINTER", "Pointer to selection buffer", "select", "glGetPointerv()"), - new GLproperty(GL11.GL_SELECTION_BUFFER_SIZE, "GL_SELECTION_BUFFER_SIZE", "Size of selection buffer", "select", "glGetIntegerv()"), - new GLproperty(GL11.GL_FEEDBACK_BUFFER_POINTER, "GL_FEEDBACK_BUFFER_POINTER", "Pointer to feedback buffer", "feedback", "glGetPointerv()"), - new GLproperty(GL11.GL_FEEDBACK_BUFFER_SIZE, "GL_FEEDBACK_BUFFER_SIZE", "Size of feedback buffer", "feedback", "glGetIntegerv()"), - new GLproperty(GL11.GL_FEEDBACK_BUFFER_TYPE, "GL_FEEDBACK_BUFFER_TYPE", "Type of feedback buffer", "feedback", "glGetIntegerv()"), - }; - - public static void dumpOpenGLstate() - { - } - - public static void dumpAllIsEnabled() //Call This - { - for (int i = 0; i < instance.propertyList.length; ++i) - - { - if (instance.propertyList[i].fetchCommand == "glIsEnabled()") - - { - System.out.print(instance.propertyList[i].name + ":"); - System.out.print(GL11.glIsEnabled(instance.propertyList[i].gLconstant)); - System.out.println(" (" + instance.propertyList[i].description + ")"); - } - } - } - - public static void dumpAllType(final String type) - - { - for (int i = 0; i < instance.propertyList.length; ++i) - - { - if (instance.propertyList[i].category.equals(type)) - - { - System.out.print(instance.propertyList[i].name + ":"); - System.out.println(getPropertyAsString(i)); - System.out.println(" (" + instance.propertyList[i].description + ")"); - } - } - } - - private static String getPropertyAsString(final int propertyListIndex) - { - final int gLconstant = instance.propertyList[propertyListIndex].gLconstant; - if (instance.propertyList[propertyListIndex].fetchCommand.equals("glIsEnabled()")) { - return "" + GL11.glIsEnabled(gLconstant); - } - - if (instance.propertyList[propertyListIndex].fetchCommand == "glGetBooleanv()") - - { - final ByteBuffer params = BufferUtils.createByteBuffer(16); - - GL11.glGetBoolean(gLconstant, params); - String out = ""; - for (int i = 0; i < params.capacity(); ++i) - - { - out += (i == 0 ? "" : ", ") + params.get(i); - } - return out; - } - - return ""; - } -} - diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java deleted file mode 100644 index 7573e0d51c..0000000000 --- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java +++ /dev/null @@ -1,787 +0,0 @@ -package gtPlusPlus.core.util.math; - -import java.text.NumberFormat; -import java.util.Map; -import java.util.Random; - -import gregtech.api.enums.GT_Values; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -public class MathUtils { - - final static Random rand = CORE.RANDOM; - - /** Formats a number with group separator and at most 2 fraction digits. */ - private static final NumberFormat sNumberFormat = NumberFormat.getInstance(); - - static { - sNumberFormat.setMaximumFractionDigits(2); - } - - /** - * Returns a psuedo-random number between min and max, inclusive. - * The difference between min and max can be at most - * Integer.MAX_VALUE - 1. - * - * @param min Minimim value - * @param max Maximim value. Must be greater than min. - * @return Integer between min and max, inclusive. - * @see java.util.Random#nextInt(int) - */ - public static int randInt(final int min, final int max) { - // nextInt is normally exclusive of the top value, - // so add 1 to make it inclusive - return rand.nextInt((max - min) + 1) + min; - } - - public static double getChanceOfXOverYRuns(final double x, final double y){ - return (1-Math.pow((1-x), y)); - } - - - /** - * Returns a psuedo-random number between min and max, inclusive. - * The difference between min and max can be at most - * Long.MAX_VALUE - 1. - * - * @param min Minimim value - * @param max Maximim value. Must be greater than min. - * @return Long between min and max, inclusive. - * @see java.util.Random#nextLong(long) - */ - public static long randLong(final long min, final long max) { - // nextInt is normally exclusive of the top value, - // so add 1 to make it inclusive - return MathUtils.nextLong(rand,(max - min) + 1) + min; - } - private static long nextLong(final Random rng, final long n) { - // error checking and 2^x checking removed for simplicity. - long bits, val; - do { - bits = (rng.nextLong() << 1) >>> 1; - val = bits % n; - } while (((bits-val)+(n-1)) < 0L); - return val; - } - - - /** - * Returns a psuedo-random number between min and max, inclusive. - * The difference between min and max can be at most - * Double.MAX_VALUE - 1. - * - * @param min Minimim value - * @param max Maximim value. Must be greater than min. - * @return Double between min and max, inclusive. - * @see java.util.Random#nextDouble(double) - */ - public static double randDouble(final double min, final double max) { - // nextInt is normally exclusive of the top value, - // so add 1 to make it inclusive - return MathUtils.nextDouble(rand,(max - min) + 1) + min; - } - - private static double nextDouble(final Random rng, final double n) { - // error checking and 2^x checking removed for simplicity. - double bits, val; - do { - bits = (rng.nextLong() << 1) >>> 1; - val = bits % n; - } while (((bits-val)+(n-1)) < 0L); - return val; - } - - /** - * Returns a psuedo-random number between min and max, inclusive. - * The difference between min and max can be at most - * Float.MAX_VALUE - 1. - * - * @param min Minimim value - * @param max Maximim value. Must be greater than min. - * @return Float between min and max, inclusive. - * @see java.util.Random#nextFloat(float) - */ - public static float randFloat(final float min, final float max) { - // nextInt is normally exclusive of the top value, - // so add 1 to make it inclusive - return MathUtils.nextFloat(rand,(max - min) + 1) + min; - } - - private static float nextFloat(final Random rng, final float n) { - // error checking and 2^x checking removed for simplicity. - float bits, val; - do { - bits = (rng.nextLong() << 1) >>> 1; - val = bits % n; - } while (((bits-val)+(n-1)) < 0L); - return val; - } - - - /** - * Returns a percentage. - * The returned number is the % of X in Y. - * Supports Doubles. - * - * @param current Current value. - * @param max Maximim value. Must be greater than min. - * @return double between min and max, inclusive. - */ - public static double findPercentage(final double current, final double max){ - return Math.round(((current / max) * 100) * 100.00) / 100.00; - } - - public static int findPercentageOfInt(long input, float percentage){ - return (int)(input*(percentage/100.0f)); - } - - - //Smooth Rounding Function - /** - * Returns a double. - * The returned number is d rounded to the nearest d.01. - * Supports Doubles. - * - * @param current Current value. - * @return double Rounded value. - */ - public static double decimalRounding(final double d) { - return Math.round(d * 2) / 2.0; - } - - - //Smooth Rounding Function (Nearest 5) - /** - * Returns a double. - * The returned number is d rounded to the nearest d.5. - * Supports Doubles. - * - * @param current Current value. - * @return double Rounded value. - */ - public static double decimalRoundingToWholes(final double d) { - return 5*(Math.round(d/5)); - } - - //Smooth Rounding Function - /** - * Returns a integer. - * The returned number is d rounded to the nearest flat integer. - * Supports Doubles as input. - * - * @param current Current value. - * @return integer Rounded value. - */ - public static int roundToClosestInt(final double d) { - return (int) (Math.round(d * 2) / 2.0); - } - - public static int roundToClosestMultiple(final double number, final int multiple) { - int result = multiple; - if ((number % multiple) == 0) { - return (int) number; - } - // If not already multiple of given number - if ((number % multiple) != 0) { - final int division = (int) ((number / multiple) + 1); - result = division * multiple; - } - return result; - } - - - //Smooth Rounding Function - /** - * Returns a long. - * The returned number is d rounded to the nearest flat long. - * Supports Doubles as input. - * - * @param current Current value. - * @return long Rounded value. - */ - public static long roundToClosestLong(final double d) { - return (long) (Math.round(d * 2) / 2.0); - } - - - /** - * Returns a boolean. - * The returned boolean is wether or not X evenly fits in to Y. - * Supports ints. - * - * @param x Value A. - * @param y Value B. Must be greater than min. - * @return boolean Whether or not it divides evenly. - */ - public static boolean divideXintoY(final int x, final int y){ - if ((x % y) == 0) - { - return true; - } - return false; - } - - - /** - * Returns a boolean. - * The returned boolean is based on the odd/eveness of the input. - * Supports ints. - * - * @param x Value A. - * @return boolean Whether or not it divides evenly. - */ - public static boolean isNumberEven(final long x){ - if ((x % 2) == 0) - { - return true; - } - return false; - } - - - - /** - * Returns an int. - * The returned number is the value on i + 273.15F. - * Supports ints. - * - * @param i Temp in Celcius. - * @return int The celcius temp returned as Kelvin, rounded to the readest whole. - */ - public static float celsiusToKelvin(final int i){ - final double f = i + 273.15F; - return (int)decimalRoundingToWholes(f); - } - - - /** - * Returns a hexInteger. - * The returned number is the hex value of the input. - * Supports ints. - * - * @param input Current value. - * @return hexInteger. - */ - public static int getHexNumberFromInt(final int input){ - final String result = Integer.toHexString(input); - final int resultINT = Integer.getInteger(result); - return resultINT; - } - - - /** - * Returns a hexInteger. - * The returned value is between min and max. - * Supports ints. - * - * @param min Minimum value. - * @param max Maximium value. Must be greater than min. - * @return hexInteger between min and max, inclusive. - */ - public static int generateRandomHexValue(final int min, final int max){ - return getHexNumberFromInt(randInt(min, max)); - } - - - /** - * Returns a random hex value. - * The returned value is between 000000-ffffff. - * - * @return hexInteger between min and max, inclusive. - */ - public static int generateSingularRandomHexValue(){ - String temp; - final int randomInt = randInt(1, 5); - final Map colours = Utils.hexColourGeneratorRandom(5); - - if ((colours.get(randomInt) != null) && (colours.size() > 0)){ - temp = colours.get(randomInt); - } - else { - temp = "0F0F0F"; - } - - Logger.WARNING("Operating with "+temp); - temp = Utils.appenedHexNotationToString(String.valueOf(temp)); - Logger.WARNING("Made "+temp+" - Hopefully it's not a mess."); - Logger.WARNING("It will decode into "+Integer.decode(temp)+"."); - return Integer.decode(temp); - } - - public static long[] simplifyNumbersToSmallestForm(final long[] inputArray){ - final long GCD = gcd(inputArray); - final long[] outputArray = new long[inputArray.length]; - for (int i=0;i 0) { - return outputArray; - } - return new long[] {}; - } - - private static long gcd(long a, long b){ - while (b > 0) - { - final long temp = b; - b = a % b; // % is remainder - a = temp; - } - return a; - } - - private static long gcd(final long[] input){ - long result = input[0]; - for(int i = 1; i < input.length; i++) { - result = gcd(result, input[i]); - } - return result; - } - - final public static int getRgbAsHex(final short[] RGBA){ - final int returnValue = Utils.rgbtoHexValue(RGBA[0], RGBA[1], RGBA[2]); - return (returnValue == 0) ? 0 : returnValue; - } - - - public final static int returnLargestNumber(final int a, final int b){ - if (a > b){ - return a; - } - else if (a == b){ - return a; - } - else { - return b; - } - } - - public static byte safeByte(long number){ - return number>Byte.MAX_VALUE ? Byte.MAX_VALUE :(byte)number; - } - - public static short safeShort(long number){ - return number>Short.MAX_VALUE ? Short.MAX_VALUE :(short)number; - } - - public static int safeInt(long number, int margin){ - return number>Integer.MAX_VALUE-margin ? Integer.MAX_VALUE-margin :(int)number; - } - - public static int safeInt(long number){ - return number>GT_Values.V[GT_Values.V.length-1] ? safeInt(GT_Values.V[GT_Values.V.length-1],1) : number aDataSet) { - byte[] aNewSet = new byte[aDataSet.size()]; - for (int u=0;u aDataSet) { - short[] aNewSet = new short[aDataSet.size()]; - for (int u=0;u aDataSet) { - int[] aNewSet = new int[aDataSet.size()]; - for (int u=0;u aDataSet) { - float[] aNewSet = new float[aDataSet.size()]; - for (int u=0;u aDataSet) { - long[] aNewSet = new long[aDataSet.size()]; - for (int u=0;u aDataSet) { - double[] aNewSet = new double[aDataSet.size()]; - for (int u=0;u 0) { - return -aPositive; - } - else if (aPositive < 0) { - return +aPositive; - } - else { - return 0; - } - } - - public static V safeCast(Object aNumberType) { - long a1; - double a2; - a1 = Long.parseLong(aNumberType.toString()); - a2 = Double.parseDouble(aNumberType.toString()); - - if ((aNumberType.getClass() == byte.class) || (aNumberType instanceof Byte)){ - if (a1 >= Byte.MIN_VALUE && a1 <= Byte.MAX_VALUE) { - String s = ""+a1; - Byte s1 = Byte.valueOf(s); - return (V) s1; - } - } - else if ((aNumberType.getClass() == short.class) || (aNumberType instanceof Short)){ - if (a1 >= Short.MIN_VALUE && a1 <= Short.MAX_VALUE) { - String s = ""+a1; - Short s1 = Short.valueOf(s); - return (V) s1; - - } - } - else if ((aNumberType.getClass() == int.class) || (aNumberType instanceof Integer)){ - if (a1 >= Integer.MIN_VALUE && a1 <= Integer.MAX_VALUE) { - String s = ""+a1; - Integer s1 = Integer.valueOf(s); - return (V) s1; - - } - } - else if ((aNumberType.getClass() == long.class) || (aNumberType instanceof Long)){ - if (a1 >= Long.MIN_VALUE && a1 <= Long.MAX_VALUE) { - String s = ""+a1; - Long s1 = Long.valueOf(s); - return (V) s1; - } - } - else if ((aNumberType.getClass() == float.class) || (aNumberType instanceof Float)){ - if (a2 >= Float.MIN_VALUE && a2 <= Float.MAX_VALUE) { - String s = ""+a1; - Float s1 = Float.valueOf(s); - return (V) s1; - - } - } - else if ((aNumberType.getClass() == double.class) || (aNumberType instanceof Double)){ - if (a2 >= Double.MIN_VALUE && a2 <= Double.MAX_VALUE) { - String s = ""+a1; - Double s1 = Double.valueOf(s); - return (V) s1; - - } - } - - Integer o = 0; - return (V) o; - - } - - public static byte getSafeByte(Byte b) { - Byte a = safeCast(b); - return a.byteValue(); - } - - public static short getSafeShort(Short b) { - Short a = safeCast(b); - return a.shortValue(); - } - - public static int getSafeInt(Integer b) { - Integer a = safeCast(b); - return a.intValue(); - } - - public static long getSafeLong(Long b) { - Long a = safeCast(b); - return a.longValue(); - } - - public static float getSafeFloat(Float b) { - Float a = safeCast(b); - return a.floatValue(); - } - - public static double getSafeDouble(Double b) { - Double a = safeCast(b); - return a.doubleValue(); - } - - - public static long safeCast_IntToLong(int o) { - long i = o; - return i; - } - - public static int safeCast_LongToInt(long o) { - if (o > Integer.MAX_VALUE) { - return Integer.MAX_VALUE; - } - else { - int i = (int) o; - return i; - } - } - - public static short safeCast_IntToShort(int o) { - if (o > Short.MAX_VALUE) { - return Short.MAX_VALUE; - } - else { - short i = (short) o; - return i; - } - } - - public static int safeCast_ShortToInt(short o) { - int i = (int) o; - return i; - } - - public static byte safeCast_ShortToByte(short o) { - if (o > Byte.MAX_VALUE) { - return Byte.MAX_VALUE; - } - else { - byte i = (byte) o; - return i; - } - } - - public static short safeCast_ByteToshort(byte o) { - short i = (short) o; - return i; - } - - /** - * Balances a number within a range. - * @param aInput - The number to balance - * @param aMin - The minimum bounds - * @param aMax - The maximum bounds - * @return - An Integer which will be between the bounds, or a boundary value. - */ - public static int balance(int aInput, int aMin, int aMax) { - return Math.max(Math.min(aInput, aMax), aMin); - } - - /** - * Balances a number within a range. - * @param aInput - The number to balance - * @param aMin - The minimum bounds - * @param aMax - The maximum bounds - * @return - A Number which will be between the bounds, or a boundary value. - */ - public static Number balance(Number aInput, Number aMin, Number aMax) { - return max(min(aInput, aMax), aMin); - } - - /** - * Balances a number within a range. - * @param aInput - The number to balance - * @param aMin - The minimum bounds - * @param aMax - The maximum bounds - * @return - An Integer which will be between the bounds, or a boundary value. - */ - public static int balanceInt(Number aInput, Number aMin, Number aMax) { - return MathUtils.safeCast_LongToInt((long) balance(max(min(aInput, aMax), aMin), Integer.MIN_VALUE, Integer.MAX_VALUE)); - } - - /** - * Balances a number within a range. - * @param aInput - The number to balance - * @param aMin - The minimum bounds - * @param aMax - The maximum bounds - * @return - A Long which will be between the bounds, or a boundary value. - */ - public static long balanceLong(Number aInput, Number aMin, Number aMax) { - return (long) balance(max(min(aInput, aMax), aMin), Long.MIN_VALUE, Long.MAX_VALUE); - } - - public static int getValueWithinRange(int i, int aMin, int aMax) { - int aAmount = Math.max(Math.min(i, aMax), aMin); - return aAmount; - } - - public static Pair splitLongIntoIntegers(long aLong){ - int aIntMaxInLong = (int) Math.min(Integer.MAX_VALUE, Math.floor(aLong/Integer.MAX_VALUE)); - int aRemainder = (int) (aLong - (aIntMaxInLong * Integer.MAX_VALUE)); - return new Pair(aIntMaxInLong, aRemainder); - } - - - - - /** - * Returns the smaller of two {@code Number}s. That is, - * the result the argument closer to the value of - * {@link Long#MIN_VALUE}. If the arguments have the same - * value, the result is that same value. - * - * @param a an argument. - * @param b another argument. - * @return the smaller of {@code a} and {@code b}. - */ - public static Number min(Number a, Number b) { - return (a.longValue() <= b.longValue()) ? a : b; - } - - /** - * Returns the greater of two {@code Number}s. That is, the - * result is the argument closer to the value of - * {@link Long#MAX_VALUE}. If the arguments have the same value, - * the result is that same value. - * - * @param a an argument. - * @param b another argument. - * @return the larger of {@code a} and {@code b}. - */ - public static Number max(Number a, Number b) { - return (a.longValue() >= b.longValue()) ? a : b; - } - - public static String formatNumbers(long aNumber) { - return sNumberFormat.format(aNumber); - } - - public static String formatNumbers(double aNumber) { - return sNumberFormat.format(aNumber); - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ClientUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ClientUtils.java deleted file mode 100644 index 806f83d830..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/ClientUtils.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - -public class ClientUtils { - - static { - if (FMLCommonHandler.instance().getSide() == Side.SERVER) { - Logger.ERROR("Something tried to access the ClientUtils class from the Server Side."); - Logger.ERROR("Soft crashing to prevent data corruption."); - CORE.crash(); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java deleted file mode 100644 index 2f273d5f7f..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java +++ /dev/null @@ -1,102 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import gtPlusPlus.api.objects.Logger; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class EnchantingUtils { - - - public static final int XP_PER_BOTTLE = 8; - public static final int RATIO = 20; - public static final int LIQUID_PER_XP_BOTTLE = 160; - public static final double RATIO_MOB_ESSENCE_TO_LIQUID_XP = 13.32; - - public static int liquidToXpRatio(final int liquid) { - return liquid / RATIO; - } - - public static int xpToLiquidRatio(final int xp) { - return xp * RATIO; - } - - public static FluidStack getEssenceFromLiquidXp(final int xpAmount){ - if (xpAmount <= 0){ - return null; - } - return getMobEssence((int) (xpAmount*RATIO_MOB_ESSENCE_TO_LIQUID_XP)); - } - - public static FluidStack getLiquidXpFromEssence(final int essenceAmount){ - if (essenceAmount <= 0){ - return null; - } - return getLiquidXP((int) (essenceAmount/RATIO_MOB_ESSENCE_TO_LIQUID_XP)); - } - - public static int getLiquidForLevel(final int level) { - final int xp = getExperienceForLevel(level); - return xpToLiquidRatio(xp); - } - - public static int getLevelForLiquid(final int liquid) { - final int xp = liquidToXpRatio(liquid); - return getLevelForExperience(xp); - } - - public static int getExperienceForLevel(final int level) { - if (level == 0) { - return 0; - } - if ((level > 0) && (level < 16)) { - return level * 17; - } - if ((level > 15) && (level < 31)) { - return (int) (((1.5 * Math.pow(level, 2.0)) - (29.5 * level)) + 360.0); - } - return (int) (((3.5 * Math.pow(level, 2.0)) - (151.5 * level)) + 2220.0); - } - - public static int getXpToNextLevel(final int level) { - final int levelXP = getLevelForExperience(level); - final int nextXP = getExperienceForLevel(level + 1); - return nextXP - levelXP; - } - - public static int getLevelForExperience(final int experience) { - int i; - for (i = 0; getExperienceForLevel(i) <= experience; ++i) { - } - return i - 1; - } - - - - - - - - //Xp Fluids - public static FluidStack getMobEssence(final int amount){ - Logger.WARNING("Trying to get a fluid stack of Mob Essence."); - try { - return FluidRegistry.getFluidStack("mobessence", amount).copy(); - } - catch (final Throwable e){ - return null; - } - - } - - public static FluidStack getLiquidXP(final int amount){ - Logger.WARNING("Trying to get a fluid stack of Liquid XP."); - try { - return FluidRegistry.getFluidStack("xpjuice", amount).copy(); - } - catch (final Throwable e){ - return null; - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java deleted file mode 100644 index 8b02ea9c7c..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java +++ /dev/null @@ -1,134 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import gregtech.api.util.GT_ModHandler; -import ic2.api.item.IElectricItem; -import ic2.api.item.IElectricItemManager; -import ic2.api.item.ISpecialElectricItem; -import net.minecraft.item.ItemRedstone; -import net.minecraft.item.ItemStack; - -public class EnergyUtils { - - public static class EU { - - public static boolean isElectricItem(ItemStack aStack) { - if (aStack == null || aStack.getItem() == null || aStack.getItem() instanceof ItemRedstone) { - return false; - } - if (aStack.getItem() instanceof ISpecialElectricItem) { - return true; - } - else if (aStack.getItem() instanceof IElectricItem) { - return true; - } - else if (aStack.getItem() instanceof IElectricItemManager) { - return true; - } - else { - return GT_ModHandler.isElectricItem(aStack); - } - } - - public static boolean isChargerItem(ItemStack aStack) { - return GT_ModHandler.isChargerItem(aStack); - } - - public static boolean charge(ItemStack aStack, int aEnergyToInsert, int aTier) { - return 0 != GT_ModHandler.chargeElectricItem(aStack, aEnergyToInsert, aTier, true, false); - } - - public static boolean discharge(ItemStack aStack, int aEnergyToDrain, int aTier) { - if (isElectricItem(aStack)) { - int tTier = ((IElectricItem) aStack.getItem()).getTier(aStack); - int aDischargeValue = GT_ModHandler.dischargeElectricItem(aStack, aEnergyToDrain, tTier, true, false, false); - //Logger.INFO("Trying to drain "+aDischargeValue); - return aDischargeValue > 0; - } - else { - return false; - } - } - - public static long getMaxStorage(ItemStack aStack) { - if (isElectricItem(aStack)) { - if (aStack.getItem() instanceof ISpecialElectricItem) { - ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); - return (long) bStack.getMaxCharge(aStack); - } - if (aStack.getItem() instanceof IElectricItem) { - IElectricItem bStack = (IElectricItem) aStack.getItem(); - return (long) bStack.getMaxCharge(aStack); - } - if (aStack.getItem() instanceof IElectricItemManager) { - IElectricItemManager bStack = (IElectricItemManager) aStack.getItem(); - return (long) bStack.getCharge(aStack); - } - } - else { - return 0; - } - return 0; - } - - public static long getCharge(ItemStack aStack) { - if (isElectricItem(aStack)) { - if (aStack.getItem() instanceof ISpecialElectricItem) { - ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); - return (long) bStack.getManager(aStack).getCharge(aStack); - } - if (aStack.getItem() instanceof IElectricItemManager) { - IElectricItemManager bStack = (IElectricItemManager) aStack.getItem(); - return (long) bStack.getCharge(aStack); - } - } - else { - return 0; - } - return 0; - } - - public static boolean hasCharge(ItemStack aStack) { - if (isElectricItem(aStack)) { - if (aStack.getItem() instanceof ISpecialElectricItem) { - ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); - return bStack.canProvideEnergy(aStack); - } - if (aStack.getItem() instanceof IElectricItem) { - IElectricItem bStack = (IElectricItem) aStack.getItem(); - return bStack.canProvideEnergy(aStack); - } - if (aStack.getItem() instanceof IElectricItemManager) { - IElectricItemManager bStack = (IElectricItemManager) aStack.getItem(); - return bStack.getCharge(aStack) > 0; - } - } - else { - return false; - } - return false; - } - - public static int getTier(ItemStack aStack) { - if (isElectricItem(aStack)) { - if (aStack.getItem() instanceof ISpecialElectricItem) { - ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); - return bStack.getTier(aStack); - } - if (aStack.getItem() instanceof IElectricItem) { - IElectricItem bStack = (IElectricItem) aStack.getItem(); - return bStack.getTier(aStack); - } - } - else { - return 0; - } - return 0; - } - - } - - public static class RF { - - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java deleted file mode 100644 index fda7b0b738..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java +++ /dev/null @@ -1,290 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.List; -import java.util.Map; - -import cpw.mods.fml.common.registry.EntityRegistry; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.AABB; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.handler.events.EntityDeathHandler; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.IC2Potion; -import ic2.core.item.armor.ItemArmorHazmat; -import net.minecraft.block.Block; -import net.minecraft.entity.*; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -public class EntityUtils { - - public static void setEntityOnFire(final Entity aEntity, final int length){ - if (!isEntityImmuneToFire(aEntity)) { - aEntity.setFire(length); - } - } - - public static boolean isEntityOnFire(final Entity aEntity) { - Field aIsOnFire = ReflectionUtils.getField(Entity.class, "fire"); - if (aIsOnFire != null) { - int aFireTime = (int) ReflectionUtils.getFieldValue(aIsOnFire, aEntity); - return aFireTime > 0; - } - return false; - } - - public static boolean isEntityImmuneToFire(Entity aEntity) { - return aEntity.isImmuneToFire(); - } - - public static int getFacingDirection(final Entity entity){ - final int d = MathHelper.floor_double((entity.rotationYaw * 4.0F) / 360 + 0.50) & 3; - return d; - } - - @Deprecated - public static Block findBlockUnderEntityNonBoundingBox(final Entity parEntity){ - final int blockX = MathHelper.floor_double(parEntity.posX); - final int blockY = MathHelper.floor_double(parEntity.posY-0.2D - parEntity.yOffset); - final int blockZ = MathHelper.floor_double(parEntity.posZ); - return parEntity.worldObj.getBlock(blockX, blockY, blockZ); - } - - public static Block findBlockUnderEntity(final Entity parEntity){ - final int blockX = MathHelper.floor_double(parEntity.posX); - final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1; - final int blockZ = MathHelper.floor_double(parEntity.posZ); - return parEntity.worldObj.getBlock(blockX, blockY, blockZ); - } - - public static BlockPos findBlockPosUnderEntity(final Entity parEntity){ - final int blockX = MathHelper.floor_double(parEntity.posX); - final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1; - final int blockZ = MathHelper.floor_double(parEntity.posZ); - return new BlockPos(blockX, blockY, blockZ, parEntity.worldObj); - } - - public static BlockPos findBlockPosOfEntity(final Entity parEntity){ - final int blockX = MathHelper.floor_double(parEntity.posX); - final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY); - final int blockZ = MathHelper.floor_double(parEntity.posZ); - return new BlockPos(blockX, blockY, blockZ, parEntity.worldObj); - } - - //TODO - public static void registerEntityToBiomeSpawns(final Class classy, final EnumCreatureType EntityType, final BiomeGenBase baseBiomeGen){ - EntityRegistry.addSpawn(classy, 6, 1, 5, EntityType, baseBiomeGen); //change the values to vary the spawn rarity, biome, etc. - } - - public static boolean applyRadiationDamageToEntity(final int stackSize, final int radiationLevel, final World world, final Entity entityHolding){ - if (!world.isRemote){ - if ((radiationLevel > 0) && (entityHolding instanceof EntityLivingBase)) { - final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding; - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { - int duration; - if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){ - //Utils.LOG_INFO("t"); - duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration(); - } - else { - //Utils.LOG_INFO("f"); - duration = radiationLevel*30; - } - //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15); - applyRadioactivity(entityLiving, radiationLevel, stackSize); - } - } - } - return true; - } - return false; - } - - public static boolean isWearingFullFrostHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) - if (!HazmatUtils.providesProtetion_Frost(aEntity.getEquipmentInSlot(i))) { - return false; - } - return true; - } - - public static boolean isWearingFullHeatHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) - if (!HazmatUtils.providesProtetion_Fire(aEntity.getEquipmentInSlot(i))) { - return false; - } - return true; - } - - public static boolean isWearingFullBioHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) - if (!HazmatUtils.providesProtetion_Biohazard(aEntity.getEquipmentInSlot(i))) { - return false; - } - return true; - } - - public static boolean isWearingFullRadioHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) - if (!HazmatUtils.providesProtetion_Radiation(aEntity.getEquipmentInSlot(i))) { - return false; - } - return true; - } - - public static boolean isWearingFullElectroHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) - if (!HazmatUtils.providesProtetion_Electricity(aEntity.getEquipmentInSlot(i))) { - return false; - } - return true; - } - - public static boolean isWearingFullGasHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) - if (!HazmatUtils.providesProtetion_Gas(aEntity.getEquipmentInSlot(i))) { - return false; - } - return true; - } - - public static boolean applyRadioactivity(EntityLivingBase aEntity, int aLevel, int aAmountOfItems) { - if (aLevel > 0 && aEntity != null && aEntity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && aEntity.getCreatureAttribute() != EnumCreatureAttribute.ARTHROPOD && !ItemArmorHazmat.hasCompleteHazmat(aEntity)) { - PotionEffect tEffect = null; - aEntity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, aLevel * 140 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.moveSlowdown)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.digSlowdown)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.confusion.id, aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.confusion)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.weakness.id, aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.weakness)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(Potion.hunger.id, aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.hunger)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - aEntity.addPotionEffect(new PotionEffect(IC2Potion.radiation.id, aLevel * 180 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.potionTypes[24])) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); - return true; - } - return false; - } - - public static boolean applyHeatDamageToEntity(final int heatLevel, final World world, final Entity entityHolding){ - if (!world.isRemote){ - if ((heatLevel > 0) && (entityHolding instanceof EntityLivingBase)) { - final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding; - if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ - if (!GT_Utility.isWearingFullHeatHazmat(entityLiving)) { - return GT_Utility.applyHeatDamage(entityLiving, heatLevel); - } - } - } - } - return false; - } - - - /** - * Static Version of the method used in {@code doFireDamage(entity, int)} to save memory. - */ - private volatile static Method dealFireDamage = null; - - /** - * Reflective Call to do Fire Damage to an entity (Does not set entity on fire though) - */ - public synchronized static boolean doFireDamage(Entity entity, int amount){ - if (dealFireDamage == null){ - dealFireDamage = ReflectionUtils.getMethod(Entity.class, "dealFireDamage", int.class); - } - else { - try { - dealFireDamage.invoke(entity, amount); - } - catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - } - return false; - } - - public static void doDamage(Entity entity, DamageSource dmg, int i) { - entity.attackEntityFrom(dmg, i); - } - - public static boolean isTileEntityRegistered(Class aTileClass, String aTileName) { - Field aRegistry = ReflectionUtils.getField(ReflectionUtils.getClass("net.minecraft.tileentity.TileEntity"), "nameToClassMap"); - Field aRegistry2 = ReflectionUtils.getField(ReflectionUtils.getClass("net.minecraft.tileentity.TileEntity"), "classToNameMap"); - try { - Object o = aRegistry.get(null); - if (o != null) { - Map nameToClassMap = (Map) o; - if (!nameToClassMap.containsKey(aTileName)) { - o = aRegistry2.get(null); - if (o != null) { - Map classToNameMap = (Map) o; - if (!classToNameMap.containsKey(aTileClass)) { - return false; - } - else { - return true; - } - } - } - else { - return true; - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - } - return false; - } - - public static double getDistance(Entity p1, Entity p2) { - return Math.sqrt( Math.pow(p1.posX - p2.posX, 2) + Math.pow(p1.posY - p2.posY, 2) + Math.pow(p1.posZ - p2.posZ, 2)); - } - - public static AutoMap getEntitiesWithinBoundingBoxExcluding(Entity aExclusion, AABB aBoundingBox){ - if (aExclusion == null) { - return new AutoMap(); - } - else { - List aEntities = aBoundingBox.world().getEntitiesWithinAABBExcludingEntity(aExclusion, aBoundingBox.get()); - return new AutoMap(aEntities); - } - } - - public static AutoMap getEntitiesWithinBoundingBox(Class aEntityType, AABB aBoundingBox){ - if (aEntityType == null) { - return new AutoMap(); - } - else { - List aEntities = aBoundingBox.world().getEntitiesWithinAABB(aEntityType, aBoundingBox.get()); - return new AutoMap(aEntities); - } - } - - /** - * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. Simplified function with static Max drop size of 1. - * @param aMobClass - The Base Class you want to drop this item. - * @param aStack - The ItemStack, stack size is not respected. - * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok) - */ - public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aChance) { - registerDropsForMob(aMobClass, aStack, 1, aChance); - } - - /** - * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. - * @param aMobClass - The Base Class you want to drop this item. - * @param aStack - The ItemStack, stack size is not respected. - * @param aMaxAmount - The maximum size of the ItemStack which drops. - * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok) - */ - public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) { - EntityDeathHandler.registerDropsForMob(aMobClass, aStack, aMaxAmount, aChance); - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java deleted file mode 100644 index a6bd50ff17..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java +++ /dev/null @@ -1,641 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_LanguageManager; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.FluidGT6; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.item.base.cell.BaseItemPlasmaCell; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; - -public class FluidUtils { - - public static FluidStack getWater(final int amount){ - return FluidUtils.getFluidStack("water", amount); - } - - public static FluidStack getDistilledWater(final int amount){ - return FluidUtils.getFluidStack("ic2distilledwater", amount); - } - - public static FluidStack getHotWater(final int amount) { - return FluidUtils.getFluidStack("ic2hotwater", amount); - } - - public static FluidStack getLava(final int amount){ - return FluidUtils.getFluidStack("lava", amount); - } - - public static FluidStack getPahoehoeLava(final int amount){ - return FluidUtils.getFluidStack("ic2pahoehoelava", amount); - } - - public static FluidStack getMilk(final int amount){ - return FluidUtils.getFluidStack("milk", amount); - } - - public static FluidStack getColdCoolant(final int amount){ - return FluidUtils.getFluidStack("ic2coolant", amount); - } - - public static FluidStack getHotCoolant(final int amount){ - return FluidUtils.getFluidStack("ic2hotcoolant", amount); - } - - public static FluidStack getSteam(final int amount){ - return FluidUtils.getFluidStack("steam", amount); - } - - public static FluidStack getIC2Steam(final int amount){ - return FluidUtils.getFluidStack("ic2steam", amount); - } - - public static FluidStack getSuperHeatedSteam(final int amount){ - return FluidUtils.getFluidStack("ic2superheatedsteam", amount); - } - - @Deprecated - /** - * Do not use - Gives third tier steam - Not implemented - * @param amount - * @return - */ - public static FluidStack getHyperSteam(final int amount){ - return FluidUtils.getFluidStack("water", amount); - } - - public static FluidStack getUUA(final int amount){ - return FluidUtils.getFluidStack("uuamplifier", amount); - } - - public static FluidStack getUUM(final int amount){ - return FluidUtils.getFluidStack("ic2uumatter", amount); - } - - public static FluidStack getFluidStack(final String fluidName, final int amount){ - Logger.WARNING("Trying to get a fluid stack of "+fluidName); - try { - FluidStack x = FluidRegistry.getFluidStack(fluidName, amount); - return x != null ? x.copy() : null; - } - catch (final Throwable e){ - return null; - } - - } - - public static FluidStack getFluidStack(final FluidStack vmoltenFluid, final int fluidAmount) { - Logger.WARNING("Trying to get a fluid stack of "+vmoltenFluid.getFluid().getName()); - try { - FluidStack x = FluidRegistry.getFluidStack(vmoltenFluid.getFluid().getName(), fluidAmount); - return x != null ? x.copy() : null; - } - catch (final Throwable e){ - return null; - } - } - - public static FluidStack getFluidStack(final Fluid vFluid, final int fluidAmount) { - Logger.WARNING("Trying to get a fluid stack of "+vFluid.getName()); - try { - FluidStack x = FluidRegistry.getFluidStack(vFluid.getName(), fluidAmount); - return x != null ? x.copy() : null; - } - catch (final Throwable e){ - return null; - } - } - - public static FluidStack[] getFluidStackArray(final String fluidName, final int amount){ - Logger.WARNING("Trying to get a fluid stack of "+fluidName); - try { - final FluidStack[] singleFluid = {FluidRegistry.getFluidStack(fluidName, amount)}; - return singleFluid; - } - catch (final Throwable e){ - return null; - } - - } - - public static FluidStack[] getFluidStackArray(final FluidStack fluidName, final int amount){ - Logger.WARNING("Trying to get a fluid stack of "+fluidName); - try { - final FluidStack[] singleFluid = {FluidRegistry.getFluidStack(fluidName.getLocalizedName(), amount)}; - return singleFluid; - } - catch (final Throwable e){ - return null; - } - - } - - public static Fluid addGtFluid(final String aName, final String aLocalized, final GT_Materials aMaterial, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount) { - return addGtFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, true); - } - - - public static Fluid addGtFluid(final String aName, final String aLocalized, final GT_Materials aMaterial, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { - Fluid g = addGTFluid(aName, "fluid.autogenerated", aLocalized, aMaterial != null ? aMaterial.mRGBa : new short[]{255, 255, 255, 0}, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); - if (g != null) { - if (aMaterial != null) { - switch (aState) { - case 1: { - aMaterial.mFluid = (g); - break; - } - case 2: { - aMaterial.mGas = (g); - break; - } - case 3: { - aMaterial.mPlasma = (g); - break; - } - } - } - return g; - } - return null; - } - - public static Fluid addGTFluid(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { - return addGTFluid("molten."+aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); - } - - public static Fluid addGTFluidNonMolten(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { - return addGTFluid("fluid."+aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); - } - - public static Fluid addGTFluidNoPrefix(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { - return addGTFluid(aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); - } - //Gass - public static Fluid addGtGas(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { - return addGTFluid(aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); - } - - public static Fluid addGTPlasma(final Material aMaterial) { - if (aMaterial.getLocalizedName().toLowerCase().contains("clay") || (aMaterial.getComposites().size()>1) || aMaterial.getLocalizedName().toLowerCase().contains("wrought")){ - return null; - } - Logger.INFO("Generating a "+aMaterial.getLocalizedName()+" Plasma Cell"); - if (aMaterial.vComponentCount != 1){ - Logger.INFO("Compound made from: "); - for (final MaterialStack x : aMaterial.getComposites()){ - Logger.INFO(x.getStackMaterial().getLocalizedName()); - } - Logger.INFO("Material is a composite, not generating plasma."); - return null; - } - - ItemStack temp = null; - //Generate a Cell if we need to - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellPlasma"+aMaterial.getUnlocalizedName(), 1) == null){ - new BaseItemPlasmaCell(aMaterial); - temp = aMaterial.getPlasmaCell(1); - } - else { - temp = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellPlasma"+aMaterial.getUnlocalizedName(), 1); - } - if (temp != null){ - return addGTFluid( - "plasma." + Utils.sanitizeString(aMaterial.getLocalizedName().toLowerCase()), - "plasma.autogenerated", - aMaterial.getLocalizedName() + " Plasma", - aMaterial.getRGBA(), - 3, - 10000, - temp, - ItemUtils.getEmptyCell(), - 1000, - false); - } - return null; - } - - public static Fluid addGTFluid(String aName, final String aTexture, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateFilledCell) { - - String aNameOriginal = aName; - Logger.INFO("Generating Fluid for "+aName); - - aName = Utils.sanitizeString(aName.toLowerCase()); - - String aLocalName = (aLocalized == null) ? aName : aLocalized; - - Fluid rFluid; - Fluid gFluid = FluidRegistry.getFluid(aName); - FluidStack aCheck = FluidUtils.getWildcardFluidStack(aName.toLowerCase(), 1000); - boolean register = false; - if (aCheck != null) { - rFluid = aCheck.getFluid(); - } - else if (gFluid != null) { - rFluid = gFluid; - } - else { - rFluid = new FluidGT6(aName, aTexture, (aRGBa != null) ? aRGBa : Dyes._NULL.getRGBA()); - register = true; - - } - - if (register) { - GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalName); - if (FluidRegistry.registerFluid(rFluid)) { - switch (aState) { - case 0: { - rFluid.setGaseous(false); - rFluid.setViscosity(10000); - break; - } - case 1: - case 4: { - rFluid.setGaseous(false); - rFluid.setViscosity(1000); - break; - } - case 2: { - rFluid.setGaseous(true); - rFluid.setDensity(-100); - rFluid.setViscosity(200); - break; - } - case 3: { - rFluid.setGaseous(true); - rFluid.setDensity(-10000); - rFluid.setViscosity(10); - rFluid.setLuminosity(15); - break; - } - } - } - } - - - String aNameNonMolten = aLocalName.contains("Molten") ? aLocalName.replace("Molten", "") : aLocalName; - - if (aFullContainer == null) { - ItemStack oreStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aLocalName, 1); - aFullContainer = oreStack; - if (aFullContainer == null) { - oreStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aNameOriginal, 1); - aFullContainer = oreStack; - if (aFullContainer == null) { - oreStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aNameNonMolten, 1); - aFullContainer = oreStack; - if (aFullContainer != null) { - Logger.INFO("Found cell for "+aNameNonMolten); - } - } - else { - Logger.INFO("Found cell for "+aNameOriginal); - } - } - else { - Logger.INFO("Found cell for "+aLocalName); - } - } - - Item tempCell = null; - //Generate a Cell if we need to - if (aGenerateFilledCell && aFullContainer == null) { - String aMatName = aNameOriginal; - if (aMatName.contains("molten.")) { - aMatName = aMatName.replace("molten.", ""); - aMatName = aMatName.substring(0, 1).toUpperCase() + aMatName.substring(1); - } - if (aMatName.contains("fluid.")) { - aMatName = aMatName.replace("fluid.", ""); - aMatName = aMatName.substring(0, 1).toUpperCase() + aMatName.substring(1); - } - Logger.INFO("Generating cell for "+aMatName+", "+aLocalName); - tempCell = new BaseItemComponent(aMatName, aLocalName, aRGBa); - aFullContainer = ItemUtils.getSimpleStack(tempCell); - } - - if ((rFluid.getTemperature() == new Fluid("test").getTemperature()) || (rFluid.getTemperature() <= 0)) { - rFluid.setTemperature((int) (aTemperatureK)); - } - if ((aFullContainer != null) && (aEmptyContainer != null) && !FluidContainerRegistry.registerFluidContainer(new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer)) { - CORE.RA.addFluidCannerRecipe(CI.emptyCells(1), aFullContainer, new FluidStack(rFluid, aFluidAmount)); - } - else { - //Utils.LOG_INFO("Failed creating recipes to fill/empty cells of "+aName+"."); - } - return rFluid; - } - - public static boolean valid(final Object aStack) { - return (aStack != null) && (aStack instanceof ItemStack) && (((ItemStack)aStack).getItem() != null) && (((ItemStack)aStack).stackSize >= 0); - } - - public static boolean invalid(final Object aStack) { - return (aStack == null) || !(aStack instanceof ItemStack) || (((ItemStack)aStack).getItem() == null) || (((ItemStack)aStack).stackSize < 0); - } - - public static boolean equal(final ItemStack aStack1, final ItemStack aStack2) { - return equal(aStack1, aStack2, false); - } - - public static boolean equal(final ItemStack aStack1, final ItemStack aStack2, final boolean aIgnoreNBT) { - return (aStack1 != null) && (aStack2 != null) && equal_(aStack1, aStack2, aIgnoreNBT); - } - - public static boolean equal_(final ItemStack aStack1, final ItemStack aStack2, final boolean aIgnoreNBT) { - return (aStack1.getItem() == aStack2.getItem()) && (aIgnoreNBT || ((aStack1.getTagCompound() == null == (aStack2.getTagCompound() == null)) && ((aStack1.getTagCompound() == null) || aStack1.getTagCompound().equals(aStack2.getTagCompound())))) && ((meta(aStack1) == meta(aStack2)) || (meta(aStack1) == 32767) || (meta(aStack2) == 32767)); - } - - public static ItemStack copy(final Object... aStacks) { - for (final Object tStack : aStacks) { - if (valid(tStack)) { - return ((ItemStack)tStack).copy(); - } - } - return null; - } - - public static ItemStack copyMeta(final long aMetaData, final Object... aStacks) { - final ItemStack rStack = copy(aStacks); - if (invalid(rStack)) { - return null; - } - return meta(rStack, aMetaData); - } - - public static short meta(final ItemStack aStack) { - return (short)Items.feather.getDamage(aStack); - } - - public static ItemStack meta(final ItemStack aStack, final long aMeta) { - Items.feather.setDamage(aStack, (short)aMeta); - return aStack; - } - - public static ItemStack amount(final long aAmount, final Object... aStacks) { - final ItemStack rStack = copy(aStacks); - if (invalid(rStack)) { - return null; - } - rStack.stackSize = (int)aAmount; - return rStack; - } - - public static ItemStack container(final ItemStack aStack, final boolean aCheckIFluidContainerItems) { - if (invalid(aStack)) { - return null; - } - if (aStack.getItem().hasContainerItem(aStack)) { - return aStack.getItem().getContainerItem(aStack); - } - if (equal(aStack, ItemUtils.getEmptyCell(), true)) { - return null; - } - if (aCheckIFluidContainerItems && (aStack.getItem() instanceof IFluidContainerItem) && (((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0)) { - final ItemStack tStack = amount(1L, aStack); - ((IFluidContainerItem)aStack.getItem()).drain(tStack, Integer.MAX_VALUE, true); - if (!equal(aStack, tStack)) { - return tStack; - } - return null; - } - if (equal(aStack, ItemList.IC2_ForgeHammer.get(1)) || equal(aStack, ItemList.IC2_WireCutter.get(1))) { - return copyMeta(meta(aStack) + 1, aStack); - } - return null; - } - - public static ItemStack container(final ItemStack aStack, final boolean aCheckIFluidContainerItems, final int aStacksize) { - return amount(aStacksize, container(aStack, aCheckIFluidContainerItems)); - } - - public final static Fluid generateFluid(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, boolean aGenerateCell){ - FluidStack aFStack = (FluidUtils.getFluidStack("molten"+"."+unlocalizedName.toLowerCase(), 1)); - if (aFStack == null){ - Logger.WARNING("Generating our own fluid."); -/* ItemStack cell = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1); - if (cell == null){ - final Item temp = new BaseItemComponent(unlocalizedName, localizedName, RGBA); - cell = ItemUtils.getSimpleStack(temp); - }*/ - final Fluid gtFluid = FluidUtils.addGTFluid( - unlocalizedName, - "Molten "+localizedName, - RGBA, - 4, - MeltingPoint, - null, - ItemUtils.getEmptyCell(), - 1000, - aGenerateCell); - - return gtFluid; - } - else { - Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName+", ALREADY EXISTS"); - return aFStack.getFluid(); - } - } - - public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell){ - return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, null, null, 0, aGenerateCell); - } - - - public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2){ - return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, dustStack, dustStack2, 144, true); - } - - public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2, final boolean aGenerateCell){ - return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, dustStack, dustStack2, 144, aGenerateCell); - } - - public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, ItemStack dustStack, final ItemStack dustStack2, final int amountPerItem, final boolean aGenerateCell){ - if (dustStack == null){ - dustStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+Utils.sanitizeString(localizedName), 1); - } - FluidStack aFStack = (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1)); - if (aFStack == null){ - Logger.WARNING("Generating our own fluid."); - - final Fluid gtFluid = FluidUtils.addGTFluidNonMolten( - unlocalizedName, - localizedName, - RGBA, - 4, - MeltingPoint, - null, - ItemUtils.getEmptyCell(), - 1000, - aGenerateCell); - - if (dustStack != null){ - CORE.RA.addFluidExtractionRecipe( - dustStack, //Input 2 - FluidUtils.getFluidStack(gtFluid, amountPerItem), //Fluid Output - 1*20, //Duration - 16 //Eu Tick - ); - } - if (dustStack2 != null){ - CORE.RA.addFluidExtractionRecipe( - dustStack2, //Input 2 - FluidUtils.getFluidStack(gtFluid, amountPerItem), //Fluid Output - 1*20, //Duration - 16 //Eu Tick - ); - } - - return gtFluid; - } - else { - Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName+", ALREADY EXISTS"); - return aFStack.getFluid(); - } - } - - public final static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA){ - return generateFluidNoPrefix(unlocalizedName, localizedName, MeltingPoint, RGBA, true); - } - - public final static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell){ - Fluid gtFluid; - if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null){ - Logger.WARNING("Generating our own fluid."); - gtFluid = FluidUtils.addGTFluidNoPrefix( - unlocalizedName, - localizedName, - RGBA, - 4, - MeltingPoint, - null, - ItemUtils.getEmptyCell(), - 1000, - aGenerateCell); - } - else { - gtFluid = FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1).getFluid(); - } - //Generate a Cell if we need to -// if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){ -// new BaseItemCell(unlocalizedName, localizedName, RGBA, gtFluid); -// } - return gtFluid; - } - - public final static Fluid generateGas(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell){ - Fluid gtFluid; - if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null){ - Logger.WARNING("Generating our own gas."); - gtFluid = FluidUtils.addGtGas( - unlocalizedName, - localizedName, - RGBA, - 3, - MeltingPoint, - null, - ItemUtils.getEmptyCell(), - 1000, - aGenerateCell); - } - else { - gtFluid = FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1).getFluid(); - } - //Generate a Cell if we need to -/* if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){ - new BaseItemCell(unlocalizedName, localizedName, RGBA, gtFluid); - }*/ - return gtFluid; - } - - - - - public static FluidStack getMobEssence(final int amount){ - return EnchantingUtils.getMobEssence(amount); - } - - public static FluidStack getLiquidXP(final int amount){ - return EnchantingUtils.getLiquidXP(amount); - } - - public static boolean doesFluidExist(String aFluidName) { - FluidStack aFStack1 = (FluidUtils.getFluidStack("molten"+"."+aFluidName.toLowerCase(), 1)); - FluidStack aFStack2 = (FluidUtils.getFluidStack("fluid"+"."+aFluidName.toLowerCase(), 1)); - FluidStack aFStack3 = (FluidUtils.getFluidStack(aFluidName.toLowerCase(), 1)); - FluidStack aFStack4 = (FluidUtils.getFluidStack(aFluidName, 1)); - FluidStack aFStack5 = (FluidUtils.getFluidStack("liquid_"+aFluidName.toLowerCase(), 1)); - FluidStack aFStack6 = (FluidUtils.getFluidStack("liquid"+"."+aFluidName.toLowerCase(), 1)); - return aFStack1 != null || aFStack2 != null || aFStack3 != null || aFStack4 != null || aFStack5 != null || aFStack6 != null; - } - - public static FluidStack getWildcardFluidStack(String aFluidName, int amount) { - FluidStack aFStack1 = (FluidUtils.getFluidStack(aFluidName, amount)); - FluidStack aFStack2 = (FluidUtils.getFluidStack(aFluidName.toLowerCase(), amount)); - FluidStack aFStack3 = (FluidUtils.getFluidStack("molten"+"."+aFluidName.toLowerCase(), amount)); - FluidStack aFStack4 = (FluidUtils.getFluidStack("fluid"+"."+aFluidName.toLowerCase(), amount)); - FluidStack aFStack5 = (FluidUtils.getFluidStack("liquid_"+aFluidName.toLowerCase(), amount)); - FluidStack aFStack6 = (FluidUtils.getFluidStack("liquid"+"."+aFluidName.toLowerCase(), amount)); - if (aFStack1 != null) { - return aFStack1; - } - if (aFStack2 != null) { - return aFStack2; - } - if (aFStack3 != null) { - return aFStack3; - } - if (aFStack4 != null) { - return aFStack4; - } - if (aFStack5 != null) { - return aFStack5; - } - if (aFStack6 != null) { - return aFStack6; - } - return null; - } - - public static FluidStack getWildcardFluidStack(Materials aMaterial, int amount) { - FluidStack aFStack1 = aMaterial.getFluid(amount); - FluidStack aFStack2 = aMaterial.getGas(amount); - FluidStack aFStack3 = aMaterial.getMolten(amount); - FluidStack aFStack4 = aMaterial.getSolid(amount); - if (aFStack1 != null) { - return aFStack1; - } - else if (aFStack2 != null) { - return aFStack2; - } - else if (aFStack3 != null) { - return aFStack3; - } - else if (aFStack4 != null) { - return aFStack4; - } - else { - return null; - } - } - - public static FluidStack getAir(int aAmount) { - return FluidUtils.getFluidStack("air", aAmount); - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/FoodUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/FoodUtils.java deleted file mode 100644 index 9f5d4f36ca..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/FoodUtils.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.init.Items; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; - -public class FoodUtils { - - public static final Class IEdibleClass; - - static { - IEdibleClass = ReflectionUtils.getClass("squeek.applecore.api.food.IEdible"); - } - - public static boolean isFood(ItemStack food) { - - if (food == null) { - return false; - } - - Item item = food.getItem(); - - if(item == null) { - return false; - } - - EnumAction action = item.getItemUseAction(food); - - if(item instanceof ItemBlock || action == EnumAction.eat || action == EnumAction.drink) { - if(getUnmodifiedFoodValues(food) > 0) { - return true; - } - } - - return false; - } - - private static int getUnmodifiedFoodValues(ItemStack stack) { - - if (stack == null) { - return 0; - } - - Item item = stack.getItem(); - - if(item == null) { - return 0; - } - - if(IEdibleClass.isInstance(item) || item instanceof ItemFood || item == Items.cake) { - return 1; - } - - return 0; - } -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java deleted file mode 100644 index b322036ef7..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java +++ /dev/null @@ -1,604 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import static gregtech.api.GregTech_API.*; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.HashMap; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.objects.GT_HashSet; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.GTplusplus.INIT_PHASE; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.Ic2Items; -import ic2.core.item.armor.ItemArmorHazmat; -import ic2.core.item.armor.ItemArmorNanoSuit; -import ic2.core.item.armor.ItemArmorQuantumSuit; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -public class HazmatUtils { - - public static final GT_HashSet sHazmatList = new GT_HashSet(); - - private static final HashMap> mToolTips = new HashMap>(); - - private static boolean mInit = false; - private static HazmatUtils mInstance; - - @SuppressWarnings("rawtypes") - public static void init() { - if (mInit) { - return; - } - //doInit(); Disabled, hazmat moved to gt5u - } - public static void doInit() { - - mInstance = new HazmatUtils(); - - sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatHelmet, 1)); - sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatChestplate, 1)); - sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatLeggings, 1)); - sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatBoots, 1)); - - // Make Nano a hazmat suit - // Make Quantum a hazmat suit - - - if (LoadedMods.IndustrialCraft2 || LoadedMods.IndustrialCraft2Classic) { - AutoMap aVanillaIC2Armour = new AutoMap(); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoHelmet, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoBodyarmor, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoLeggings, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoBoots, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumHelmet, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumBodyarmor, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumLeggings, 1)); - aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumBoots, 1)); - for (ItemStack aItem : aVanillaIC2Armour) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered IC2 Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("EMT")) { - AutoMap aItemFields = new AutoMap(); - Class aItemsEMT = ReflectionUtils.getClass("emt.init.EMTItems"); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "nanoThaumicHelmet")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "nanoWing")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "nanoBootsTraveller")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumThaumicHelmet")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumWing")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumArmor")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumBootsTraveller")); - AutoMap aEMT = new AutoMap(); - for (Field aItemField : aItemFields) { - Item aItemObject = null; - if (aItemField != null) { - try { - aItemObject = (Item) aItemField.get(null); - } - catch (Exception t) { - t.printStackTrace(); - } - } - if (aItemObject != null) { - aEMT.add(ItemUtils.getSimpleStack(aItemObject)); - } - else { - Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsEMT.getName()); - } - } - Logger.INFO("[Hazmat] Registering "+aEMT.size()+" EMT Items as hazmat gear."); - for (ItemStack aItem : aEMT) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered EMT Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("DraconicEvolution")) { - AutoMap aItemFields = new AutoMap(); - Class aItemsDE = ReflectionUtils.getClass("com.brandon3055.draconicevolution.ModItems"); - - aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicHelm")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicChest")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicLeggs")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicBoots")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernHelm")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernChest")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernLeggs")); - aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernBoots")); - AutoMap aItemMap = new AutoMap(); - for (Field aItemField : aItemFields) { - Item aItemObject = null; - if (aItemField != null) { - try { - aItemObject = (Item) aItemField.get(null); - } - catch (Exception t) { - t.printStackTrace(); - } - } - if (aItemObject != null) { - aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); - } - else { - Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsDE.getName()); - } - } - Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Draconic Evolution Items as hazmat gear."); - for (ItemStack aItem : aItemMap) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered Draconic Evolution Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("TaintedMagic")) { - AutoMap aItemFields = new AutoMap(); - Class aItemsTaintedMagic = ReflectionUtils.getClass("taintedmagic.common.registry.ItemRegistry"); - - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressHelmet")); - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressChestplate")); - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressLeggings")); - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemVoidwalkerBoots")); - AutoMap aItemMap = new AutoMap(); - for (Field aItemField : aItemFields) { - Item aItemObject = null; - if (aItemField != null) { - try { - aItemObject = (Item) aItemField.get(null); - } - catch (Exception t) { - t.printStackTrace(); - } - } - if (aItemObject != null) { - aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); - } - else { - Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); - } - } - Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Tainted Magic Items as hazmat gear."); - for (ItemStack aItem : aItemMap) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered Tainted Magic Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("WitchingGadgets")) { - AutoMap aItemFields = new AutoMap(); - Class aItemsTaintedMagic = ReflectionUtils.getClass("witchinggadgets.common.WGContent"); - - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialHelm")); - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialChest")); - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialLegs")); - aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialBoots")); - AutoMap aItemMap = new AutoMap(); - for (Field aItemField : aItemFields) { - Item aItemObject = null; - if (aItemField != null) { - try { - aItemObject = (Item) aItemField.get(null); - } - catch (Exception t) { - t.printStackTrace(); - } - } - if (aItemObject != null) { - aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); - } - else { - Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); - } - } - Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Witching Gadgets Items as hazmat gear."); - for (ItemStack aItem : aItemMap) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered Witching Gadgets Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("ThaumicTinkerer")) { - /* - AutoMap aItems = new AutoMap(); - Class aMainTT = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); - Class aItemRegistryTT = ReflectionUtils.getClass("thaumic.tinkerer.common.registry.TTRegistry"); - Field aRegistryInstance = ReflectionUtils.getField(aMainTT, "registry"); - Object aRegistry = ReflectionUtils.getFieldValue(aRegistryInstance); - Method aFuckingStupidMethodHandlingMethod = ReflectionUtils.getMethod(aItemRegistryTT, "getFirstItemFromClass", new Class[] {Class.class}); - Item aIchorHelm = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemHelm")}); - Item aIchorChest = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemChest")}); - Item aIchorLegs = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemLegs")}); - Item aIchorBoots = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemBoots")}); - aItems.add(aIchorHelm); - aItems.add(aIchorChest); - aItems.add(aIchorLegs); - aItems.add(aIchorBoots); - AutoMap aItemMap = new AutoMap(); - int aIndex = 0; - for (Item aItem : aItems) { - Item aItemObject = null; - if (aItem != null) { - aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); - } - else { - Logger.INFO("[Hazmat] Could not get item "+aIndex+" from "+aItemRegistryTT.getName()); - } - aIndex++; - } - Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Thaumic Tinkerer Items as hazmat gear."); - for (ItemStack aItem : aItemMap) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered Thaumic Tinkerer Items as hazmat gear."); - */ - Logger.INFO("[Hazmat] Did not register Thaumic Tinkerer Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("GraviSuite")) { - AutoMap aItemFields = new AutoMap(); - Class aItemsGravisuite = ReflectionUtils.getClass("gravisuite.GraviSuite"); - aItemFields.add(ReflectionUtils.getField(aItemsGravisuite, "advNanoChestPlate")); - aItemFields.add(ReflectionUtils.getField(aItemsGravisuite, "graviChestPlate")); - AutoMap aGravisuite = new AutoMap(); - for (Field aItemField : aItemFields) { - Item aItemObject = (Item) ReflectionUtils.getFieldValue(aItemField); - if (aItemObject != null) { - aGravisuite.add(ItemUtils.getSimpleStack(aItemObject)); - } - } - Logger.INFO("[Hazmat] Registering "+aGravisuite.size()+" Gravisuit Items as hazmat gear."); - for (ItemStack aItem : aGravisuite) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered Gravisuit Items as hazmat gear."); - } - - if (LoadedMods.isModLoaded("AdvancedSolarPanel")) { - AutoMap aItemFields = new AutoMap(); - Class aItemsEMT = ReflectionUtils.getClass("advsolar.common.AdvancedSolarPanel"); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "advancedSolarHelmet")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "hybridSolarHelmet")); - aItemFields.add(ReflectionUtils.getField(aItemsEMT, "ultimateSolarHelmet")); - AutoMap aASP = new AutoMap(); - for (Field aItemField : aItemFields) { - Item aItemObject = (Item) ReflectionUtils.getFieldValue(aItemField); - if (aItemObject != null) { - aASP.add(ItemUtils.getSimpleStack(aItemObject)); - } - } - Logger.INFO("[Hazmat] Registering "+aASP.size()+" Adv. Solar Items as hazmat gear."); - for (ItemStack aItem : aASP) { - addProtection(aItem); - } - Logger.INFO("[Hazmat] Registered Adv. Solar Items as hazmat gear."); - } - - Utils.registerEvent(mInstance); - Logger.INFO("[Hazmat] Registered Tooltip handler for hazmat gear."); - mInit = true; - - } - - private final static String mToolTipText = "Provides protection from:"; - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event) { - //Logger.INFO("Ticking Hazmat handler"); - if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { - - if (event.itemStack == null || isVanillaHazmatPiece(event.itemStack)) { - //Logger.INFO("[Hazmat] Invalid Itemstack or vanilla hazmat"); - return; - } else { - ItemStack aStackTemp = event.itemStack; - GT_ItemStack aStack = new GT_ItemStack(aStackTemp); - if (isNanoArmourPiece(aStackTemp) || isQuantumArmourPiece(aStackTemp)) { - event.toolTip.add(EnumChatFormatting.DARK_PURPLE+"Provides full hazmat protection."); - } - else { - //Logger.INFO("[Hazmat] Finding Tooltip Data"); - String[] aTooltips = getTooltips(aStack); - if (aTooltips == null || aTooltips.length == 0) { - //Logger.INFO("[Hazmat] No Info!"); - return; - } else { - //Logger.INFO("[Hazmat] Found Tooltips!"); - if (providesProtection(aStackTemp)) { - event.toolTip.add(EnumChatFormatting.LIGHT_PURPLE+"Provides full hazmat protection."); - } else { - event.toolTip.add(mToolTipText); - for (String r : aTooltips) { - event.toolTip.add(" - " + r); - } - } - } - } - } - } - } - - /** - * Static function to replace - * {@link #ic2.core.item.armor.ItemArmorHazmat.hasCompleteHazmat(EntityLivingBase)}. - * Because IC2 doesn't let us register things ourself, anything registered via - * GT/GT++ will return true. - * - * @param living - Entity Wearing Armour - * @return - Does {@link EntityLivingBase} have a full hazmat suit on? - */ - public static boolean hasCompleteHazmat(EntityLivingBase living) { - // Entity is Null, cannot have Hazmat. - if (living == null || living.isDead) { - return false; - } else { - - // Map All Player Armour slots - AutoMap aEquipment = new AutoMap(); - for (int i = 1; i < 5; ++i) { - ItemStack stack = living.getEquipmentInSlot(i); - - // Item is Null, cannot have full suit - if (stack == null) { - return false; - } else { - aEquipment.put(stack); - } - } - - // Compare Equipment to all items mapped for full hazmat. - for (ItemStack aSlotStack : aEquipment) { - if (!isHazmatPiece(aSlotStack)) { - //Logger.INFO("Found item which is not hazmat. "+ItemUtils.getItemName(aSlotStack)); - return false; - } - } - - // We are in some kind of full hazmat, huzzah! - //Logger.INFO("Has full hazmat."); - return true; - } - } - - /** - * Is this item vanilla IC2 hazmat? - * - * @param aArmour - The Armour to provide protection. - * @return - */ - public static boolean isVanillaHazmatPiece(ItemStack aArmour) { - return aArmour != null ? aArmour.getItem() instanceof ItemArmorHazmat : false; - } - - /** - * Is this item vanilla IC2 Nanosuit? - * - * @param aArmour - The Armour to provide protection. - * @return - */ - public static boolean isNanoArmourPiece(ItemStack aArmour) { - return aArmour != null ? aArmour.getItem() instanceof ItemArmorNanoSuit : false; - } - - /** - * Is this item vanilla IC2 Quantum? - * - * @param aArmour - The Armour to provide protection. - * @return - */ - public static boolean isQuantumArmourPiece(ItemStack aArmour) { - return aArmour != null ? aArmour.getItem() instanceof ItemArmorQuantumSuit : false; - } - - /** - * Is this item a registered piece of full hazmat? (Provides all 6 protections) - * - * @param aStack - The Armour to provide protection. - * @return - */ - public static boolean isHazmatPiece(ItemStack aStack) { - return isVanillaHazmatPiece(aStack) || providesProtection(aStack); - } - - /** - * Registers the {@link ItemStack} to all types of protection. Provides full - * hazmat protection. Frost, Fire, Bio, Gas, Radioaton & Electricity. - * - * @param aStack - The Armour to provide protection. - * @return - Did we register this ItemStack properly? - */ - public static boolean addProtection(ItemStack aVanStack) { - if (!ItemUtils.checkForInvalidItems(aVanStack)) { - Logger.INFO("=================Bad Hazmat Addition======================"); - Logger.INFO("Called from: "+ReflectionUtils.getMethodName(0)); - Logger.INFO(ReflectionUtils.getMethodName(1)); - Logger.INFO(ReflectionUtils.getMethodName(2)); - Logger.INFO(ReflectionUtils.getMethodName(3)); - Logger.INFO(ReflectionUtils.getMethodName(4)); - Logger.INFO(ReflectionUtils.getMethodName(5)); - Logger.INFO(ReflectionUtils.getMethodName(6)); - Logger.INFO("=========================================================="); - return false; - } - Logger.INFO("[Hazmat] Registering " + ItemUtils.getItemName(aVanStack) + " for full Hazmat protection."); - GT_ItemStack aStack = getGtStackFromVanilla(aVanStack); - AutoMap aAdded = new AutoMap(); - aAdded.put(addProtection_Frost(aStack)); - aAdded.put(addProtection_Fire(aStack)); - aAdded.put(addProtection_Biohazard(aStack)); - aAdded.put(addProtection_Gas(aStack)); - aAdded.put(addProtection_Radiation(aStack)); - aAdded.put(addProtection_Electricty(aStack)); - for (boolean b : aAdded) { - if (!b) { - return false; - } - } - Logger.INFO("[Hazmat] Protection added for all 6 damage types, registering to master Hazmat list."); - sHazmatList.add(aStack); - return true; - } - - public static boolean addProtection_Frost(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.AQUA + "Frost"); - return addProtection_Generic(sFrostHazmatList, aStack); - } - - public static boolean addProtection_Fire(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.DARK_RED + "Heat"); - return addProtection_Generic(sHeatHazmatList, aStack); - } - - public static boolean addProtection_Biohazard(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.GREEN + "Biohazards"); - return addProtection_Generic(sBioHazmatList, aStack); - } - - public static boolean addProtection_Gas(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.WHITE + "Gas"); - return addProtection_Generic(sGasHazmatList, aStack); - } - - public static boolean addProtection_Radiation(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.DARK_GREEN + "Radiation"); - return addProtection_Generic(sRadioHazmatList, aStack); - } - - public static boolean addProtection_Electricty(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.YELLOW + "Electricity"); - return addProtection_Generic(sElectroHazmatList, aStack); - } - - private static boolean addProtection_Generic(GT_HashSet aSet, GT_ItemStack aStack) { - int aMapSize = aSet.size(); - aSet.add(aStack); - return aMapSize < aSet.size(); - } - - /** - * Does this item provide hazmat protection? (Protection against Frost, Heat, - * Bio, Gas, Rads, Elec) An item may return false even if it protects against - * all six damage types. This is because it's not actually registered as hazmat - * correct. - * - * @param aStack - The item to check for protection - * @return - */ - public static boolean providesProtection(ItemStack aStack) { - return providesProtetion_Generic(sHazmatList, aStack); - } - - public static boolean providesProtetion_Frost(ItemStack aStack) { - return providesProtetion_Generic(sFrostHazmatList, aStack); - } - - public static boolean providesProtetion_Fire(ItemStack aStack) { - return providesProtetion_Generic(sHeatHazmatList, aStack); - } - - public static boolean providesProtetion_Biohazard(ItemStack aStack) { - return providesProtetion_Generic(sBioHazmatList, aStack); - } - - public static boolean providesProtetion_Gas(ItemStack aStack) { - return providesProtetion_Generic(sGasHazmatList, aStack); - } - - public static boolean providesProtetion_Radiation(ItemStack aStack) { - return providesProtetion_Generic(sRadioHazmatList, aStack); - } - - public static boolean providesProtetion_Electricity(ItemStack aStack) { - return providesProtetion_Generic(sElectroHazmatList, aStack); - } - - private static boolean providesProtetion_Generic(GT_HashSet aSet, ItemStack aStack) { - if (isVanillaHazmatPiece(aStack)) { - return true; - } - for (GT_ItemStack o : aSet) { - if (o != null && o.mItem != null && aStack != null && aStack.getItem() != null) { - if (GT_Utility.areStacksEqual(o.toStack(), aStack, true)) { - return true; - } - if (o.isStackEqual(aStack)){ - return true; - } - if (o.mItem == aStack.getItem() && EnergyUtils.EU.isElectricItem(aStack)) { - return true; - } - } - } - return false; - } - - private static String[] getTooltips(GT_ItemStack aStack) { - String aKey = convertGtItemstackToStringDataIgnoreDamage(aStack); - AutoMap aTempTooltipData = mToolTips.get(aKey); - if (aTempTooltipData == null || aTempTooltipData.isEmpty()) { - //Logger.INFO("[Hazmat] Item was not mapped for TTs - "+aKey); - return new String[] {}; - } else { - //Logger.INFO("[Hazmat] Item was mapped for TTs"); - //Collections.sort(aTempTooltipData); - //Logger.INFO("[Hazmat] Sorted TTs"); - - String[] mBuiltOutput = new String[aTempTooltipData.size()]; - int aIndex = 0; - for (String i : aTempTooltipData) { - mBuiltOutput[aIndex++] = i; - } - - return mBuiltOutput; - } - } - - private static void registerTooltip(GT_ItemStack aStack, String aTooltip) { - String aKey = convertGtItemstackToStringDataIgnoreDamage(aStack); - Logger.INFO("[Hazmat] Mapping " + aTooltip + " for " + aKey); - AutoMap aTempTooltipData = mToolTips.get(aKey); - if (aTempTooltipData == null) { - Logger.INFO("No data mapped yet, creating."); - aTempTooltipData = new AutoMap(); - mToolTips.put(aKey, aTempTooltipData); - } - aTempTooltipData.add(aTooltip); - } - - public static ItemStack getStackFromGtStack(GT_ItemStack aGtStack) { - return ItemUtils.simpleMetaStack(aGtStack.mItem, aGtStack.mMetaData, aGtStack.mStackSize); - } - - public static GT_ItemStack getGtStackFromVanilla(ItemStack aStack) { - return new GT_ItemStack(aStack); - } - - private static String convertGtItemstackToStringData(GT_ItemStack aStack) { - if (aStack == null) { - return "NULL"; - } else { - return aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData + "." + aStack.mStackSize; - } - } - - private static String convertGtItemstackToStringDataIgnoreDamage(GT_ItemStack aStack) { - if (aStack == null) { - return "NULL"; - } else { - return aStack.mItem.getUnlocalizedName() + "." + aStack.mStackSize; - } - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/InventoryUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/InventoryUtils.java deleted file mode 100644 index fe67c88d69..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/InventoryUtils.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.Random; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class InventoryUtils { - - private final static Random mRandom = new Random(); - - public static void dropInventoryItems(World world, int x, int y, int z, Block block) { - TileEntity tileentity = world.getTileEntity(x, y, z); - - if (tileentity != null && tileentity instanceof IInventory && ((IInventory) tileentity).getSizeInventory() > 0) { - - IInventory aTileInv = (IInventory) tileentity; - int aMinSlot = 0; - int aMaxSlot = aTileInv.getSizeInventory()-1; - - for (int i1 = aMinSlot; i1 < aMaxSlot; ++i1) { - ItemStack itemstack = aTileInv.getStackInSlot(i1); - - if (itemstack != null) { - float f = mRandom.nextFloat() * 0.8F + 0.1F; - float f1 = mRandom.nextFloat() * 0.8F + 0.1F; - EntityItem entityitem; - - for (float f2 = mRandom.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem)) { - int j1 = mRandom.nextInt(21) + 10; - - if (j1 > itemstack.stackSize) { - j1 = itemstack.stackSize; - } - - itemstack.stackSize -= j1; - entityitem = new EntityItem(world, x + f, y + f1, z + f2, - new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); - float f3 = 0.05F; - entityitem.motionX = (float) mRandom.nextGaussian() * f3; - entityitem.motionY = (float) mRandom.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float) mRandom.nextGaussian() * f3; - - if (itemstack.hasTagCompound()) { - entityitem.getEntityItem() - .setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); - } - } - } - } - - world.func_147453_f(x, y, z, block); - } - - } - - public static void sortInventoryItems(MetaTileEntity aTile) { - sortInventoryItems(aTile.getBaseMetaTileEntity()); - } - - public static void sortInventoryItems(IGregTechTileEntity aBaseMetaTileEntity) { - IInventory mInv = aBaseMetaTileEntity.getIInventory(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()); - AutoMap aInvContents = new AutoMap(); - int aSize = mInv.getSizeInventory(); - for (int slot=0; slot Short.MAX_VALUE) { - meta = 0; - } - if (size < 0 || size > 64) { - size = 1; - } - //Logger.INFO("Found Metastack: " + item.getUnlocalizedName() + ":" + meta); - //Logger.INFO(""+ReflectionUtils.getMethodName(0)); - //Logger.INFO(""+ReflectionUtils.getMethodName(1)); - //Logger.INFO(""+ReflectionUtils.getMethodName(2)); - //Logger.INFO(""+ReflectionUtils.getMethodName(3)); - //Logger.INFO(""+ReflectionUtils.getMethodName(4)); - final ItemStack metaStack = new ItemStack(item, size, meta); - return metaStack; - } - - public static ItemStack simpleMetaStack(final Block block, final int meta, final int size) { - return simpleMetaStack(Item.getItemFromBlock(block), meta, size); - } - - public static ItemStack getCorrectStacktype(final String fqrn, final int stackSize) { - final String oreDict = "ore:"; - ItemStack temp; - if (fqrn.toLowerCase().contains(oreDict.toLowerCase())) { - final String sanitizedName = fqrn.replace(oreDict, ""); - temp = ItemUtils.getItemStackFromFQRN(sanitizedName, stackSize); - return temp; - } - final String[] fqrnSplit = fqrn.split(":"); - String temp1; - String temp2; - temp1 = fqrnSplit[1]; - if (fqrnSplit.length < 3) { - temp2 = "0"; - } else { - temp2 = fqrnSplit[2]; - } - temp = ItemUtils.getItemStackWithMeta(LoadedMods.MiscUtils, fqrn, temp1, Integer.parseInt(temp2), stackSize); - return temp; - } - - public static ItemStack getCorrectStacktype(final Object item_Input, final int stackSize) { - if (item_Input instanceof String) { - return getItemStackOfAmountFromOreDictNoBroken((String) item_Input, stackSize); - } else if (item_Input instanceof ItemStack) { - return (ItemStack) item_Input; - } - return null; - } - - public static Item getItemFromFQRN(final String fqrn) // fqrn = fully qualified resource name - { - final String[] fqrnSplit = fqrn.split(":"); - return GameRegistry.findItem(fqrnSplit[0], fqrnSplit[1]); - } - - public static ItemStack getItemStackFromFQRN(final String fqrn, final int Size) // fqrn = fully qualified resource name - { - Logger.INFO("Trying to split string '"+fqrn+"'."); - final String[] fqrnSplit = fqrn.split(":"); - if (fqrnSplit.length < 2) { - return null; - } - else { - if (fqrnSplit.length == 2) { - Logger.INFO("Mod: "+fqrnSplit[0]+", Item: "+fqrnSplit[1]); - return GameRegistry.findItemStack(fqrnSplit[0], fqrnSplit[1], Size); - } - else if (fqrnSplit.length == 3 && fqrnSplit[2] != null && fqrnSplit[2].length() > 0) { - Logger.INFO("Mod: "+fqrnSplit[0]+", Item: "+fqrnSplit[1]+", Meta: "+fqrnSplit[2]); - ItemStack aStack = GameRegistry.findItemStack(fqrnSplit[0], fqrnSplit[1], Size); - int aMeta = Integer.parseInt(fqrnSplit[2]); - if (aStack != null && (aMeta >= 0 && aMeta <= Short.MAX_VALUE)){ - return ItemUtils.simpleMetaStack(aStack, aMeta, Size); - } - else { - Logger.INFO("Could not find instance of Item: "+fqrnSplit[1]); - - } - } - - } - return null; - } - - public static void generateSpawnEgg(final String entityModID, final String parSpawnName, final int colourEgg, - final int colourOverlay) { - final Item itemSpawnEgg = new BasicSpawnEgg(entityModID, parSpawnName, colourEgg, colourOverlay) - .setUnlocalizedName("spawn_egg_" + parSpawnName.toLowerCase()) - .setTextureName(CORE.MODID + ":spawn_egg"); - GameRegistry.registerItem(itemSpawnEgg, "spawnEgg" + parSpawnName); - } - - public static ItemStack[] validItemsForOreDict(final String oredictName) { - final List validNames = MaterialUtils.oreDictValuesForEntry(oredictName); - final ItemStack[] inputs = new ItemStack[validNames.size()]; - for (int i = 0; i < validNames.size(); i++) { - inputs[i] = (ItemStack) validNames.get(i); - } - return inputs; - } - - public static ItemStack getItemStackOfAmountFromOreDict(String oredictName, final int amount) { - String mTemp = oredictName; - - if (oredictName.contains("-") || oredictName.contains("_")) { - mTemp = Utils.sanitizeString(mTemp, new char[] {'-', '_'}); - } - else { - mTemp = Utils.sanitizeString(mTemp); - } - - - - if (oredictName.contains("rod")) { - String s = "stick"+oredictName.substring(3); - oredictName = s; - } - - // Banned Materials and replacements for GT5.8 compat. - - if (oredictName.toLowerCase().contains("ingotclay")) { - return getSimpleStack(Items.clay_ball, amount); - } - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - if (oredictName.toLowerCase().contains("rutile")) { - mTemp = oredictName.replace("Rutile", "Titanium"); - } - if (oredictName.toLowerCase().contains("vanadiumsteel")) { - mTemp = oredictName.replace("VanadiumSteel", "StainlessSteel"); - } - } - final ArrayList oreDictList = OreDictionary.getOres(mTemp); - if (!oreDictList.isEmpty()) { - final ItemStack returnValue = oreDictList.get(0).copy(); - returnValue.stackSize = amount; - return returnValue; - } - Logger.INFO("Failed to find `" + oredictName + "` in OD."); - return getErrorStack(amount, oredictName+" x"+amount); - //return getItemStackOfAmountFromOreDictNoBroken(mTemp, amount); - } - - public static ItemStack getItemStackOfAmountFromOreDictNoBroken(String oredictName, final int amount) { - if (CORE_Preloader.DEBUG_MODE) { - Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(1)); - Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(2)); - Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(3)); - Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(4)); - Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(5)); - } - - try { - - if (oredictName.contains("-") || oredictName.contains("_")) { - oredictName = Utils.sanitizeString(oredictName, new char[] {'-', '_'}); - } - else { - oredictName = Utils.sanitizeString(oredictName); - } - - // Adds a check to grab dusts using GT methodology if possible. - ItemStack returnValue = null; - if (oredictName.toLowerCase().contains("dust")) { - final String MaterialName = oredictName.toLowerCase().replace("dust", ""); - final Materials m = Materials.get(MaterialName); - if (m != null && m != Materials._NULL) { - returnValue = getGregtechDust(m, amount); - if (checkForInvalidItems(returnValue)) { - return returnValue; - } - } - } - if (returnValue == null) { - returnValue = getItemStackOfAmountFromOreDict(oredictName, amount); - if (ItemUtils.checkForInvalidItems(returnValue)) { - return returnValue.copy(); - } - } - - Logger.RECIPE(oredictName + " was not valid."); - return null; - } catch (final Throwable t) { - return null; - } - } - - public static ItemStack getGregtechDust(final Materials material, final int amount) { - final ItemStack returnValue = GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L); - if (returnValue != null) { - if (ItemUtils.checkForInvalidItems(returnValue)) { - return returnValue.copy(); - } - } - Logger.WARNING(material + " was not valid."); - return null; - } - - // NullFormula - public static Item[] generateSpecialUseDusts(final String unlocalizedName, final String materialName, - final int Colour) { - return generateSpecialUseDusts(unlocalizedName, materialName, "NullFormula", Colour); - } - - public static Item[] generateSpecialUseDusts(final String unlocalizedName, final String materialName, - String mChemForm, final int Colour) { - final Item[] output = { - new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, mChemForm, Colour, "Dust"), - new BaseItemDustUnique("itemDustSmall" + unlocalizedName, materialName, mChemForm, Colour, "Small"), - new BaseItemDustUnique("itemDustTiny" + unlocalizedName, materialName, mChemForm, Colour, "Tiny") }; - - //Generate Shaped/Shapeless Recipes - - final ItemStack normalDust = ItemUtils.getSimpleStack(output[0]); - final ItemStack smallDust = ItemUtils.getSimpleStack(output[1]); - final ItemStack tinyDust = ItemUtils.getSimpleStack(output[2]); - - CORE.RA.addpackagerRecipe(ItemList.Schematic_Dust.get(0), smallDust, tinyDust, normalDust); - - if (ItemUtils.checkForInvalidItems(tinyDust) && ItemUtils.checkForInvalidItems(normalDust)) { - if (RecipeUtils.addShapedRecipe( - tinyDust, tinyDust, tinyDust, - tinyDust, tinyDust, tinyDust, - tinyDust, tinyDust, tinyDust, - normalDust)){ - Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+materialName+" - Success"); - } - else { - Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+materialName+" - Failed"); - } - - if (RecipeUtils.addShapedRecipe( - normalDust, null, null, - null, null, null, - null, null, null, - ItemUtils.getSimpleStack(tinyDust, 9))){ - Logger.WARNING("9 Tiny dust from 1 Recipe: "+materialName+" - Success"); - } - else { - Logger.WARNING("9 Tiny dust from 1 Recipe: "+materialName+" - Failed"); - } - } - - if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(normalDust)) { - if (RecipeUtils.addShapedRecipe( - smallDust, smallDust, null, - smallDust, smallDust, null, - null, null, null, - normalDust)){ - Logger.WARNING("4 Small dust to 1 Dust Recipe: "+materialName+" - Success"); - } - else { - Logger.WARNING("4 Small dust to 1 Dust Recipe: "+materialName+" - Failed"); - } - if (RecipeUtils.addShapedRecipe( - null, normalDust, null, - null, null, null, - null, null, null, - ItemUtils.getSimpleStack(smallDust, 4))){ - Logger.WARNING("4 Small dust from 1 Dust Recipe: "+materialName+" - Success"); - } - else { - Logger.WARNING("4 Small dust from 1 Dust Recipe: "+materialName+" - Failed"); - } - } - - return output; - } - - public static Item generateSpecialUsePlate(final String internalName, final String displayName, final short[] rgb, - final int radioactivity) { - return generateSpecialUsePlate(internalName, displayName, Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2]), - radioactivity); - } - - public static Item generateSpecialUsePlate(final String internalName, final String displayName, - final String mFormula, final short[] rgb, final int radioactivity) { - return generateSpecialUsePlate(internalName, displayName, mFormula, Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2]), - radioactivity); - } - - public static Item generateSpecialUsePlate(final String internalName, final String displayName, final int rgb, - final int radioactivity) { - return new BaseItemPlate_OLD(internalName, displayName, rgb, radioactivity); - } - - public static Item generateSpecialUsePlate(final String internalName, final String displayName, - final String mFormula, final int rgb, final int radioactivity) { - return new BaseItemPlate_OLD(internalName, displayName, mFormula, rgb, radioactivity); - } - - - public static Item[] generateSpecialUseDusts(final Material material, final boolean onlyLargeDust) { - return generateSpecialUseDusts(material, onlyLargeDust, false); - } - - public static Item[] generateSpecialUseDusts(final Material material, final boolean onlyLargeDust, final boolean disableExtraRecipes) { - final String materialName = material.getLocalizedName(); - final String unlocalizedName = Utils.sanitizeString(materialName); - final int Colour = material.getRgbAsHex(); - final String aChemForm = material.vChemicalFormula; - final boolean isChemFormvalid = (aChemForm != null && aChemForm.length() > 0); - Item[] output = null; - if (onlyLargeDust == false) { - output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Dust"), - new BaseItemDustUnique("itemDustSmall" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Small"), - new BaseItemDustUnique("itemDustTiny" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Tiny") }; - } else { - output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, Colour, "Dust") }; - } - - new RecipeGen_DustGeneration(material, disableExtraRecipes); - - return output; - } - - public static MultiPickaxeBase generateMultiPick(final boolean GT_Durability, final Materials material) { - final ToolMaterial customMaterial = Utils.generateToolMaterialFromGT(material); - final int enchantLevel = material.mEnchantmentToolsLevel; - final Object enchant = new Pair(material.mEnchantmentTools, enchantLevel); - return generateMultiPick(GT_Durability, customMaterial, material.mDefaultLocalName, material.mDurability, - material.mRGBa, enchant); - } - - public static MultiPickaxeBase generateMultiPick(final Material material) { - final ToolMaterial customMaterial = Utils.generateToolMaterial(material); - return generateMultiPick(true, customMaterial, material.getLocalizedName(), (int) material.vDurability, - material.getRGBA(), null); - } - - public static MultiPickaxeBase generateMultiPick(final boolean GT_Durability, final ToolMaterial customMaterial, - final String name, final int durability, final short[] rgba, final Object enchantment) { - Logger.WARNING("Generating a Multi-Pick out of " + name); - final short[] rgb = rgba; - int dur = customMaterial.getMaxUses(); - Logger.WARNING("Determined durability for " + name + " is " + dur); - if (GT_Durability) { - dur = durability * 100; - Logger.WARNING("Using gregtech durability value, " + name + " is now " + dur + "."); - } else if (dur <= 0) { - dur = durability; - Logger.WARNING("Determined durability too low, " + name + " is now " + dur - + " based on the GT material durability."); - } - if (dur <= 0) { - Logger.WARNING("Still too low, " + name + " will now go unused."); - return null; - } - - Object enchant; - if (enchantment != null) { - if (enchantment instanceof Pair) { - enchant = enchantment; - } - } else { - enchant = null; - } - - final MultiPickaxeBase MP_Redstone = new MultiPickaxeBase(name + " Multipick", (customMaterial), dur, - Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2]), enchantment); - - if (MP_Redstone.isValid) { - return MP_Redstone; - } - Logger.WARNING("Pickaxe was not valid."); - return null; - } - - public static MultiSpadeBase generateMultiShovel(final boolean GT_Durability, final Materials material) { - final ToolMaterial customMaterial = Utils.generateToolMaterialFromGT(material); - return generateMultiShovel(GT_Durability, customMaterial, material.mDefaultLocalName, material.mDurability, - material.mRGBa); - } - - public static MultiSpadeBase generateMultiShovel(final Material material) { - final ToolMaterial customMaterial = Utils.generateToolMaterial(material); - return generateMultiShovel(true, customMaterial, material.getLocalizedName(), (int) material.vDurability, - material.getRGBA()); - } - - public static MultiSpadeBase generateMultiShovel(final boolean GT_Durability, final ToolMaterial customMaterial, - final String name, final int durability, final short[] rgba) { - Logger.WARNING("Generating a Multi-Spade out of " + name); - final short[] rgb = rgba; - int dur = customMaterial.getMaxUses(); - Logger.WARNING("Determined durability for " + name + " is " + dur); - if (GT_Durability) { - dur = durability * 100; - Logger.WARNING("Using gregtech durability value, " + name + " is now " + dur + "."); - } else if (dur <= 0) { - dur = durability; - Logger.WARNING("Determined durability too low, " + name + " is now " + dur - + " based on the GT material durability."); - } - if (dur <= 0) { - Logger.WARNING("Still too low, " + name + " will now go unused."); - return null; - } - final MultiSpadeBase MP_Redstone = new MultiSpadeBase(name + " Multispade", (customMaterial), dur, - Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2])); - - if (MP_Redstone.isValid) { - return MP_Redstone; - } - return null; - } - - public static BaseItemDecidust generateDecidust(final Materials material) { - if (GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L) != null) { - final Material placeholder = MaterialUtils.generateMaterialFromGtENUM(material); - if (placeholder != null) { - generateDecidust(placeholder); - } - } - return null; - } - - public static BaseItemDecidust generateDecidust(final Material material) { - if ((material.getDust(1) != null) && MaterialUtils.hasValidRGBA(material.getRGBA())) { - final BaseItemDecidust Decidust = new BaseItemDecidust(material); - return Decidust; - } - return null; - } - - public static BaseItemCentidust generateCentidust(final Materials material) { - if (GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L) != null) { - final Material placeholder = MaterialUtils.generateMaterialFromGtENUM(material); - if (placeholder != null) { - generateCentidust(placeholder); - } - } - return null; - } - - public static BaseItemCentidust generateCentidust(final Material material) { - if ((material.getDust(1) != null) && MaterialUtils.hasValidRGBA(material.getRGBA())) { - final BaseItemCentidust Centidust = new BaseItemCentidust(material); - return Centidust; - } - return null; - } - - public static boolean isRadioactive(final String materialName) { - int sRadiation = 0; - if (materialName.toLowerCase().contains("uranium")) { - sRadiation = 2; - } else if (materialName.toLowerCase().contains("plutonium")) { - sRadiation = 4; - } else if (materialName.toLowerCase().contains("thorium")) { - sRadiation = 1; - } - if (sRadiation >= 1) { - return true; - } - return false; - } - - public static int getRadioactivityLevel(final String materialName) { - int sRadiation = 0; - if (materialName.toLowerCase().contains("uranium")) { - sRadiation = 2; - } else if (materialName.toLowerCase().contains("plutonium")) { - sRadiation = 4; - } else if (materialName.toLowerCase().contains("thorium")) { - sRadiation = 1; - } - return sRadiation; - } - - public static String getArrayStackNames(ArrayList aStack) { - Object aType = aStack.get(0); - if (aType instanceof FluidStack) { - FluidStack[] aItems = new FluidStack[aStack.size()]; - for (int i=0;i aStack) { - Object aType = aStack.get(0); - if (aType instanceof FluidStack) { - FluidStack[] aItems = new FluidStack[aStack.size()]; - for (int i=0;i 0 ? ", " : "") + alph.getDisplayName() + " x" + alph.stackSize; - aPos++; - } - } - return itemNames; - } - - public static String[] getArrayStackNamesAsArray(final ItemStack[] aStack) { - final String[] itemNames = aStack == null ? new String[] {} : new String[aStack.length]; - if (aStack != null){ - Logger.INFO(""+aStack.length); - } - - if (aStack == null || aStack.length < 1) { - return itemNames; - } - - int arpos = 0; - for (final ItemStack alph : aStack) { - if (alph == null) { - continue; - } - try { - itemNames[arpos] = alph.getDisplayName(); - arpos++; - } - catch (Throwable t) { - t.printStackTrace(); - } - } - return itemNames; - - } - - public static String getFluidArrayStackNames(final FluidStack[] aStack) { - String itemNames = "Fluid Array: "; - for (final FluidStack alph : aStack) { - final String temp = itemNames; - itemNames = temp + ", " + alph.getFluid().getName() + " x" + alph.amount; - } - return itemNames; - - } - - public static ItemStack getGregtechCircuit(final int Meta) { - return ItemUtils.getItemStackWithMeta(LoadedMods.Gregtech, "gregtech:gt.integrated_circuit", "Gregtech Circuit", - Meta, 0); - } - - public static ItemStack[] getBlockDrops(final ArrayList blockDrops) { - if (blockDrops == null) { - return null; - } - if (blockDrops.isEmpty()) { - return null; - } - final ItemStack[] outputs = new ItemStack[blockDrops.size()]; - short forCounter = 0; - for (final ItemStack I : blockDrops) { - outputs[forCounter++] = I; - } - return outputs; - } - - private static Map mModidCache = new HashMap(); - - private static String getModId(final Item item) { - if (mModidCache.containsKey(item)) { - return mModidCache.get(item); - } - String value = ""; - try { - final GameRegistry.UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor(item); - if (id != null) { - final String modname = (id.modId == null ? id.name : id.modId); - value = ((id == null) || id.modId.equals("")) ? "minecraft" : modname; - } - } catch (final Throwable t) { - try { - final UniqueIdentifier t2 = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(item)); - if (t2 != null) { - final String modname = (t2.modId == null ? t2.name : t2.modId); - value = ((t2 == null) || t2.modId.equals("")) ? "minecraft" : modname; - } - } catch (final Throwable t3) { - t3.printStackTrace(); - value = "bad modid"; - } - } - if (!mModidCache.containsKey(item)) { - return mModidCache.put(item, value); - } - return value; - } - - public static String getModId(final ItemStack key) { - return getModId(key.getItem()); - } - - // Take 2 - GT/GT++ Dusts - public static ItemStack getGregtechDust(final String oredictName, final int amount) { - final ArrayList oreDictList = OreDictionary.getOres(oredictName); - if (!oreDictList.isEmpty()) { - ItemStack returnvalue; - for (int xrc = 0; xrc < oreDictList.size(); xrc++) { - final String modid = getModId(oreDictList.get(xrc).getItem()); - if (modid != null && (modid.equals("gregtech") || modid.equals(CORE.MODID))) { - returnvalue = oreDictList.get(xrc).copy(); - returnvalue.stackSize = amount; - return returnvalue; - } - } - } - return getNonTinkersDust(oredictName, amount); - } - - // Anything But Tinkers Dust - public static ItemStack getNonTinkersDust(final String oredictName, final int amount) { - final ArrayList oreDictList = OreDictionary.getOres(oredictName); - if (!oreDictList.isEmpty()) { - ItemStack returnvalue; - for (int xrc = 0; xrc < oreDictList.size(); xrc++) { - final String modid = getModId(oreDictList.get(xrc).getItem()); - if (modid != null && !modid.equals("tconstruct")) { - returnvalue = oreDictList.get(xrc).copy(); - returnvalue.stackSize = amount; - return returnvalue; - } - } - } - // If only Tinkers dust exists, bow down and just use it. - return getItemStackOfAmountFromOreDictNoBroken(oredictName, amount); - } - - @Deprecated - public static ItemStack getGregtechOreStack(OrePrefixes mPrefix, Materials mMat, int mAmount) { - - ItemStack aTemp = getOrePrefixStack(mPrefix, mMat, mAmount); - if (aTemp != null) { - return aTemp; - } - - String mName = MaterialUtils.getMaterialName(mMat); - - String mItemName = mPrefix.name() + mName; - // Utils.LOG_INFO("[Component Maker] Trying to get "+mItemName+"."); - ItemStack gregstack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(mItemName, mAmount); - if (gregstack == null) { - // Utils.LOG_INFO("[Component Maker] Failed to get "+mItemName+"."); - return null; - } - // Utils.LOG_INFO("[Component Maker] Found "+mItemName+"."); - return (gregstack); - } - - public static ItemStack getOrePrefixStack(OrePrefixes mPrefix, Material mMat, int mAmount) { - - String mName = Utils.sanitizeString(mMat.getLocalizedName()); - - String mItemName = mPrefix.name() + mName; - ItemStack gregstack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(mItemName, mAmount); - if (gregstack == null) { - return null; - } - return (gregstack); - } - - public static ItemStack getOrePrefixStack(OrePrefixes mPrefix, Materials mMat, int mAmount) { - if (mPrefix == OrePrefixes.rod) { - mPrefix = OrePrefixes.stick; - } - ItemStack aGtStack = GT_OreDictUnificator.get(mPrefix, mMat, mAmount); - if (aGtStack == null) { - Logger.INFO( - "Failed to find `" + mPrefix + MaterialUtils.getMaterialName(mMat) + "` in OD. [Prefix Search]"); - return getErrorStack(mAmount, (mPrefix.toString()+MaterialUtils.getMaterialName(mMat)+" x"+mAmount)); - } else { - return aGtStack; - } - } - - public static ItemStack getErrorStack(int mAmount) { - return getErrorStack(mAmount, null); - } - - public static ItemStack getErrorStack(int mAmount, String aName) { - ItemStack g = getSimpleStack(ModItems.AAA_Broken, 1); - if (aName != null) { - //NBTUtils.setString(g, "Lore", EnumChatFormatting.RED+aName); - NBTUtils.setBookTitle(g, EnumChatFormatting.RED+aName); - //NBTUtils.setBookTitle(g, EnumChatFormatting.YELLOW+"Maybe Alkalus should know about this"); - } - return g; - } - - public static ItemStack[] getStackOfAllOreDictGroup(String oredictname) { - final ArrayList oreDictList = OreDictionary.getOres(oredictname); - if (!oreDictList.isEmpty()) { - final ItemStack[] returnValues = new ItemStack[oreDictList.size()]; - for (int i = 0; i < oreDictList.size(); i++) { - if (oreDictList.get(i) != null) { - returnValues[i] = oreDictList.get(i); - } - } - return returnValues.length > 0 ? returnValues : null; - } else { - return null; - } - } - - public static boolean registerFuel(ItemStack aBurnable, int burn) { - return CORE.burnables.add(new Pair(burn, aBurnable)); - } - - public static String getLocalizedNameOfBlock(BlockPos pos) { - Block block = pos.world.getBlock(pos.xPos, pos.yPos, pos.zPos); - int metaData = pos.world.getBlockMetadata(pos.xPos, pos.yPos, pos.zPos); - return LangUtils.getLocalizedNameOfBlock(block, metaData); - } - - public static boolean checkForInvalidItems(ItemStack mInput) { - return checkForInvalidItems(new ItemStack[] { mInput }); - } - - public static boolean checkForInvalidItems(ItemStack[] mInput) { - return checkForInvalidItems(mInput, new ItemStack[] {}); - } - - /** - * - * @param mInputs - * @return {@link Boolean} - True if {@link ItemStack}[] only contains valid - * items. - */ - public static boolean checkForInvalidItems(ItemStack[] mInputs, ItemStack[] mOutputs) { - if (mInputs == null || mOutputs == null) { - return false; - } - - if (mInputs.length > 0) { - for (ItemStack stack : mInputs) { - if (stack != null) { - if (stack.getItem() != null) { - if (stack.getItem() == ModItems.AAA_Broken - || stack.getItem().getClass() == ModItems.AAA_Broken.getClass()) { - return false; - } else if (stack.getItem() == ModItems.ZZZ_Empty - || stack.getItem().getClass() == ModItems.ZZZ_Empty.getClass()) { - return false; - } else { - continue; - } - } else { - continue; - } - } else { - return false; - } - } - } - if (mOutputs.length > 0) { - for (ItemStack stack : mOutputs) { - if (stack != null) { - if (stack.getItem() != null) { - if (stack.getItem() == ModItems.AAA_Broken - || stack.getItem().getClass() == ModItems.AAA_Broken.getClass()) { - return false; - } else if (stack.getItem() == ModItems.ZZZ_Empty - || stack.getItem().getClass() == ModItems.ZZZ_Empty.getClass()) { - return false; - } else { - continue; - } - } else { - continue; - } - } else { - return false; - } - } - } - - return true; - } - - - public static IInventory organiseInventory(IInventory aInputInventory) { - ItemStack[] p = new ItemStack[aInputInventory.getSizeInventory()]; - for (int o = 0; o < aInputInventory.getSizeInventory(); o++) { - p[o] = aInputInventory.getStackInSlot(o); - } - //ItemStack[] g = organiseInventory(p); - - IInventory aTemp = aInputInventory; - for (int i = 0; i < p.length; ++i) { - for (int j = i + 1; j < p.length; ++j) { - if (p[j] != null && (p[i] == null - || GT_Utility.areStacksEqual(p[i], p[j]))) { - GT_Utility.moveStackFromSlotAToSlotB(aTemp, aTemp, j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - } - - /* - for (int o = 0; o < aInputInventory.getSizeInventory(); o++) { - aTemp.setInventorySlotContents(o, g[o]); - }*/ - return aTemp; - } - - - public static ItemStack[] organiseInventory(ItemStack[] aInputs) { - - //Update Slots - int aInvSize = aInputs.length; - ItemStack[] newArray = new ItemStack[aInvSize]; - - - //Try merge stacks - for (int i = 0; i < aInvSize; i++) { - for (int i2 = 0; i2 < aInvSize; i2++) { - if (i != i2) { - ItemStack[] t1 = new ItemStack[] {aInputs[i], aInputs[i2]}; - if (t1[0] == null || t1[1] == null) { - continue; - } - else if (!GT_Utility.areStacksEqual(t1[0], t1[1])) { - continue; - } - //Try Merge - else { - - if (GT_Utility.areStacksEqual(t1[0], t1[1])) { - while ((t1[0].stackSize < 64 && t1[1].stackSize > 0)) { - t1[0].stackSize++; - t1[1].stackSize--; - if (t1[1].stackSize <= 0) { - t1[1] = null; - break; - } - if (t1[0].stackSize == 64) { - break; - } - } - newArray[i] = t1[1]; - newArray[i2] = t1[0]; - } - } - } - } - } - - ItemStack[] newArray2 = new ItemStack[aInvSize]; - - //Move nulls to end - int count2 = 0; - for (int i = 0; i < aInvSize; i++) - if (newArray[i] != null) - newArray2[count2++] = newArray[i]; - while (count2 < aInvSize) - newArray2[count2++] = null; - - return newArray2; - - - } - - public static String getFluidName(FluidStack aFluid) { - return aFluid != null ? aFluid.getFluid().getLocalizedName(aFluid) : "NULL"; - } - - public static String getFluidName(Fluid aFluid) { - return aFluid != null ? aFluid.getLocalizedName() : "NULL"; - } - - public static String getItemName(ItemStack aStack) { - if (aStack == null) { - return "ERROR - Empty Stack"; - } - String aDisplay = null; - try { - aDisplay = ("" + StatCollector - .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name")) - .trim(); - if (aStack.hasTagCompound()) { - if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) { - NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display"); - - if (nbttagcompound.hasKey("Name", 8)) { - aDisplay = nbttagcompound.getString("Name"); - } - } - } - } catch (Throwable t) { - - } - if (aDisplay == null || aDisplay.length() <= 0) { - aDisplay = aStack.getUnlocalizedName() + ":" + aStack.getItemDamage(); - } else { - aDisplay += " | Meta: " + aStack.getItemDamage(); - } - return aDisplay; - } - - public static String getUnlocalizedItemName(ItemStack aStack) { - if (aStack == null) { - return "ERROR.Empty.Stack"; - } - String aDisplay = null; - try { - aDisplay = (aStack.getUnlocalizedName()).trim(); - } - catch (Throwable t) { - aDisplay = aStack.getItem().getUnlocalizedName(); - } - if (aDisplay == null || aDisplay.length() <= 0) { - aDisplay = aStack.getItem().getUnlocalizedNameInefficiently(aStack); - } - return aDisplay; - } - - public static boolean isItemGregtechTool(ItemStack aStack) { - if (aStack == null) { - return false; - } - final Item mItem = aStack.getItem(); - final Item aSkookum = ItemUtils.getItemFromFQRN("miscutils:gt.plusplus.metatool.01"); - final Class aSkookClass = aSkookum.getClass(); - if (aSkookClass.isInstance(mItem) || mItem instanceof GT_MetaGenerated_Tool_01 || mItem instanceof MetaGeneratedGregtechTools || mItem instanceof Gregtech_MetaTool || mItem == aSkookum) { - return true; - } - return false; - } - - public static boolean isToolWrench(ItemStack aWrench) { - if (isItemGregtechTool(aWrench) && (aWrench.getItemDamage() == 16 || aWrench.getItemDamage() == 120 || aWrench.getItemDamage() == 122 || aWrench.getItemDamage() == 124 || aWrench.getItemDamage() == 7734)) { - return true; - } - return false; - } - - public static boolean isToolMallet(ItemStack aMallet) { - if (isItemGregtechTool(aMallet) && (aMallet.getItemDamage() == 14)) { - return true; - } - return false; - } - - public static boolean isToolScrewdriver(ItemStack aScrewdriver) { - if (isItemGregtechTool(aScrewdriver) && (aScrewdriver.getItemDamage() == 22 || aScrewdriver.getItemDamage() == 150)) { - return true; - } - return false; - } - - public static boolean isToolCrowbar(ItemStack aCrowbar) { - if (isItemGregtechTool(aCrowbar) && (aCrowbar.getItemDamage() == 20)) { - return true; - } - return false; - } - - public static boolean isToolWirecutters(ItemStack aWirecutters) { - if (isItemGregtechTool(aWirecutters) && (aWirecutters.getItemDamage() == 26)) { - return true; - } - return false; - } - - public static boolean isToolHammer(ItemStack aHammer) { - if (isItemGregtechTool(aHammer) && (aHammer.getItemDamage() == 12 || aHammer.getItemDamage() == 7734)) { - return true; - } - return false; - } - - public static boolean isToolSolderingIron(ItemStack aSoldering) { - if (isItemGregtechTool(aSoldering) && (aSoldering.getItemDamage() == 160)) { - return true; - } - return false; - } - - public static ItemStack[] cleanItemStackArray(ItemStack[] input) { - int aArraySize = input.length; - ItemStack[] aOutput = new ItemStack[aArraySize]; - AutoMap aCleanedItems = new AutoMap(); - for (ItemStack checkStack : input) { - if (ItemUtils.checkForInvalidItems(checkStack)) { - aCleanedItems.put(checkStack); - } - } - for (int i=0;i= 1 && cap >= aAmount) { - ItemStack aDepStack = aStack.copy(); - aDepStack.stackSize = (MathUtils.balance((aDepStack.stackSize - 1), 0, 64)); - if (aDepStack.stackSize > 0) { - return aDepStack; - } - } - return getNullStack(); - } - - public static boolean isControlCircuit(ItemStack aStack) { - if (aStack != null) { - Item aItem = aStack.getItem(); - if (aItem == CI.getNumberedBioCircuit(0).getItem() || aItem == CI.getNumberedCircuit(0).getItem() || aItem == CI.getNumberedAdvancedCircuit(0).getItem()) { - return true; - } - } - return false; - } - - public static boolean isCatalyst(ItemStack aStack) { - if (GT_Utility.areStacksEqual(aStack, RocketFuels.Formaldehyde_Catalyst_Stack, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mBlueCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mBrownCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mOrangeCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mPurpleCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mRedCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mYellowCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mPinkCatalyst, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, AgriculturalChem.mGreenCatalyst, true)) { - return true; - } - return false; - } - - public static boolean isMillingBall(ItemStack aStack) { - if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallAlumina, true)) { - return true; - } - if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallSoapstone, true)) { - return true; - } - return false; - } - - public static String getLocalizedNameOfBlock(Block aBlock, int aMeta) { - return LangUtils.getLocalizedNameOfBlock(aBlock, aMeta); - } - - - - public static boolean doesItemListEntryExist(String string) { - ItemList[] aListValues = ItemList.class.getEnumConstants(); - for (ItemList aItem : aListValues) { - if (aItem != null) { - if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { - return true; - } - } - } - return false; - } - - public static ItemList getValueOfItemList(String string, ItemList aOther) { - ItemList[] aListValues = ItemList.class.getEnumConstants(); - for (ItemList aItem : aListValues) { - if (aItem != null) { - if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { - return aItem; - } - } - } - Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); - if (aOther != null) { - Logger.INFO("Using fallback option instead - "+aOther.name()); - } - return aOther; - } - - public static ItemStack getValueOfItemList(String string, int aAmount, ItemList aOther) { - return getValueOfItemList(string, aOther).get(aAmount); - } - - public static ItemStack getValueOfItemList(String string, int aAmount, ItemStack aOther) { - ItemList[] aListValues = ItemList.class.getEnumConstants(); - for (ItemList aItem : aListValues) { - if (aItem != null) { - if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { - return aItem.get(aAmount); - } - } - } - Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); - if (aOther != null) { - Logger.INFO("Using fallback option instead - "+ItemUtils.getItemName(aOther)); - } - return aOther; - } - - public static boolean areItemsEqual(ItemStack aStack1, ItemStack aStack2) { - return areItemsEqual(aStack1, aStack2, true); - } - - public static boolean areItemsEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { - return GT_Utility.areStacksEqual(aStack1, aStack2, aIgnoreNBT); - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/LangUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/LangUtils.java deleted file mode 100644 index 0b24e962af..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/LangUtils.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import gregtech.api.util.GT_LanguageManager; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; - -public class LangUtils { - - - public static boolean rewriteEntryForLanguageRegistry(String aKey, String aNewValue){ - return rewriteEntryForLanguageRegistry("en_US", aKey, aNewValue); - } - - @SuppressWarnings("unchecked") - public static boolean rewriteEntryForLanguageRegistry(String aLang, String aKey, String aNewValue){ - LanguageRegistry aInstance = LanguageRegistry.instance(); - Field aModLanguageData = ReflectionUtils.getField(LanguageRegistry.class, "modLanguageData"); - if (aModLanguageData != null){ - Map aProps = new HashMap(); - Object aInstanceProps; - try { - aInstanceProps = aModLanguageData.get(aInstance); - if (aInstanceProps != null){ - aProps = (Map) aInstanceProps; - Properties aLangProps = aProps.get(aLang); - if (aLangProps != null){ - if (aLangProps.containsKey(aKey)) { - aLangProps.remove(aKey); - aLangProps.put(aKey, aNewValue); - } - else { - aLangProps.put(aKey, aNewValue); - } - aProps.remove(aLang); - aProps.put(aLang, aLangProps); - ReflectionUtils.setField(aInstance, aModLanguageData, aProps); - } - } - } - catch (IllegalArgumentException | IllegalAccessException e) { - - } - } - return false; - } - - public static String trans(String aNr, String aEnglish) { - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_GTPP_" + aNr, aEnglish, false); - } - - - - /** - * Quick Block Name Lookup that is friendly to servers and locale. - */ - private static final Map mLocaleCache = new HashMap(); - - public static String getLocalizedNameOfBlock(Block aBlock, int aMeta) { - if (aBlock != null) { - return getLocalizedNameOfItemStack(ItemUtils.simpleMetaStack(aBlock, aMeta, 1)); - } - return "Bad Block Name"; - } - - public static String getLocalizedNameOfItem(Item aItem, int aMeta) { - if (aItem != null) { - return getLocalizedNameOfItemStack(ItemUtils.simpleMetaStack(aItem, aMeta, 1)); - } - return "Bad Item Name"; - } - - public static String getLocalizedNameOfItemStack(ItemStack aStack) { - String aUnlocalized; - if (aStack != null) { - aUnlocalized = ItemUtils.getUnlocalizedItemName(aStack)+"."+aStack.getItemDamage()+".name"; - if (aUnlocalized == null || aUnlocalized.length() <= 0) { - return "Bad Locale Data"; - } - String mCacheKey = aUnlocalized; - if (mLocaleCache.containsKey(mCacheKey)) { - // Recache the key if it's invalid. - if (mLocaleCache.get(mCacheKey).toLowerCase().contains(".name") || mLocaleCache.get(mCacheKey).toLowerCase().contains("|")) { - mLocaleCache.remove(mCacheKey); - String mNew; - try { - mNew = ("" + StatCollector - .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name")) - .trim(); - if (aStack.hasTagCompound()) { - if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) { - NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display"); - - if (nbttagcompound.hasKey("Name", 8)) { - mNew = nbttagcompound.getString("Name"); - } - } - } - } catch (Throwable t) { - mNew = "ERROR - Empty Stack"; - } - Logger.INFO("Re-caching "+mNew+" into locale cache. Key: "+mCacheKey); - mLocaleCache.put(mCacheKey, mNew); - } - Logger.INFO("Returning Cached Value. Key: "+mCacheKey); - return mLocaleCache.get(mCacheKey); - } - else { - String unlocalizedName = aStack.getItem().getUnlocalizedName(aStack); - Logger.INFO("Cached New Value. UnlocalName: "+unlocalizedName); - String blockName = StatCollector.translateToLocal(unlocalizedName + ".name"); - Logger.INFO("Cached New Value. TranslatedName: "+unlocalizedName); - if (blockName.toLowerCase().contains(".name") || blockName.toLowerCase().contains("|")) { - try { - blockName = ("" + StatCollector - .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name")) - .trim(); - if (aStack.hasTagCompound()) { - if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) { - NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display"); - if (nbttagcompound.hasKey("Name", 8)) { - blockName = nbttagcompound.getString("Name"); - } - } - } - } catch (Throwable t) { - blockName = "ERROR - Empty Stack"; - } - } - mLocaleCache.put(mCacheKey, blockName); - Logger.INFO("Cached New Value. Key: "+mCacheKey); - return blockName; - } - - } - return "Bad ItemStack Name"; - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java deleted file mode 100644 index 0323bf0161..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java +++ /dev/null @@ -1,523 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Element; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.TextureSet; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.TypeCounter; -import gtPlusPlus.core.client.CustomTextureSet.TextureSets; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; -import gtPlusPlus.core.item.base.plates.BaseItemPlateHeavy; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.EnumUtils; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class MaterialUtils { - - public static short firstID = 791; - - @SuppressWarnings({ "rawtypes", "unused" }) - private static Class[][] commonTypes = -{{Materials.class, int.class, TextureSet.class, float.class, int.class, - int.class, int.class, int.class, int.class, int.class, int.class, - String.class, int.class, int.class, int.class, int.class, boolean.class, - boolean.class, int.class, int.class, int.class, Dyes.class, int.class, - List.class , List.class}}; - - public static List oreDictValuesForEntry(final String oredictName){ - List oredictItemNames; - if(OreDictionary.doesOreNameExist(oredictName)){ - final List oredictItems = OreDictionary.getOres(oredictName); - oredictItemNames = oredictItems; - return oredictItemNames; - } - return null; - } - - private static Map mGeneratedMaterialMap = new HashMap(); - - public static Material generateMaterialFromGtENUM(final Materials material){ - return generateMaterialFromGtENUM(material, null, null); - } - - public static Material generateMaterialFromGtENUM(final Materials material, TextureSet aCustomTextures){ - return generateMaterialFromGtENUM(material, null, aCustomTextures); - } - - public static Material generateMaterialFromGtENUM(final Materials material, short[] customRGB){ - return generateMaterialFromGtENUM(material, customRGB, null); - } - - public static Material generateMaterialFromGtENUM(final Materials material, short[] customRGB, TextureSet aCustomTextures){ - String aMaterialKey = getMaterialName(material).toLowerCase(); - if (mGeneratedMaterialMap.containsKey(aMaterialKey)) { - return mGeneratedMaterialMap.get(aMaterialKey); - } - - try { - @SuppressWarnings("deprecation") - String name = material.name(); - final short[] rgba = (customRGB == null ? material.mRGBa : customRGB); - final int melting = material.mMeltingPoint; - final int boiling = material.mBlastFurnaceTemp; - final long protons = material.getProtons(); - final long neutrons = material.getNeutrons(); - final boolean blastFurnace = material.mBlastFurnaceRequired; - Integer radioactivity = 0; - if (material.isRadioactive()){ - ItemStack aDustStack = ItemUtils.getOrePrefixStack(OrePrefixes.dust, material, 1); - radioactivity = aDustStack != null ? GT_Utility.getRadioactivityLevel(aDustStack) : 0; - if (radioactivity == 0) { - long aProtons = material.getProtons(); - radioactivity = (int) Math.min(Math.max((aProtons / 30), 1), 9); - } - } - Logger.MATERIALS("[Debug] Calculated Radiation level to be "+radioactivity.intValue()+"."); - TextureSet iconSet = null; - if (aCustomTextures == null) { - if (material.isRadioactive()) { - iconSet = TextureSets.NUCLEAR.get(); - } - else { - iconSet = material.mIconSet; - } - } - else { - iconSet = aCustomTextures; - } - if (iconSet == null || iconSet.mSetName.toLowerCase().contains("fluid")) { - iconSet = TextureSet.SET_METALLIC; - } - Logger.MATERIALS("[Debug] Calculated Texture Set to be "+iconSet.mSetName+"."); - - - final int durability = material.mDurability; - boolean mGenerateCell = false; - boolean mGenerateFluid = true; - MaterialState materialState; - String chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mChemicalFormula)); - final Element element = material.mElement; - - - //Weird Blacklist of Bad Chemical Strings - if (material.mElement == Element.Pb || material.mElement == Element.Na || material.mElement == Element.Ar){ - chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mElement.name())); - } - - //Determine default state - Logger.MATERIALS("[Debug] Setting State of GT generated material. "+material.mDefaultLocalName); - if (material.getMolten(1) != null || material.getSolid(1) != null){ - materialState = MaterialState.SOLID; - Logger.MATERIALS("[Debug] Molten or Solid was not null."); - if (material.getMolten(1) == null && material.getSolid(1) != null){ - Logger.MATERIALS("[Debug] Molten is Null, Solid is not. Enabling cell generation."); - mGenerateCell = true; - } - else if (material.getMolten(1) != null && material.getSolid(1) == null){ - Logger.MATERIALS("[Debug] Molten is not Null, Solid is null. Not enabling cell generation."); - //mGenerateCell = true; - } - Logger.MATERIALS("[Debug] State set as solid."); - } - else if (material.getFluid(1) != null){ - Logger.MATERIALS("[Debug] State set as liquid."); - materialState = MaterialState.LIQUID; - } - else if (material.getGas(1) != null){ - Logger.MATERIALS("[Debug] State set as gas."); - materialState = MaterialState.GAS; - }/* - else if (material.getPlasma(1) != null){ - Logger.MATERIALS("[Debug] State set as plasma."); - materialState = MaterialState.PLASMA; - }*/ - else { - Logger.MATERIALS("[Debug] State set as solid. This material has no alternative states, so for safety we wont generate anything."); - materialState = MaterialState.SOLID; - mGenerateFluid = false; - } - - - if (name.toLowerCase().contains("infused")){ - final String tempname = name.substring(7, name.length()); - name = "Infused " + tempname; - } - if (hasValidRGBA(rgba) || (element == Element.H) || ((material == Materials.InfusedAir) || (material == Materials.InfusedFire) || (material == Materials.InfusedEarth) || (material == Materials.InfusedWater))){ - //ModItems.itemBaseDecidust = UtilsItems.generateDecidust(material); - //ModItems.itemBaseCentidust = UtilsItems.generateCentidust(material); - Material M = new Material(name, materialState,iconSet, durability, rgba, melting, boiling, protons, neutrons, blastFurnace, chemicalFormula, radioactivity.intValue(), mGenerateCell, mGenerateFluid); - mGeneratedMaterialMap.put(aMaterialKey, M); - return M; - } - else { - Logger.DEBUG_MATERIALS("Failed to generate GT++ material instance for "+material.name() +" | Valid RGB? "+(hasValidRGBA(rgba))); - } - } - catch (Throwable t) { - Logger.DEBUG_MATERIALS("Failed to generate GT++ material instance for "+material.name()); - t.printStackTrace(); - } - return null; - - } - - public static Material generateQuickMaterial(final String materialName, final MaterialState defaultState, final short[] colour, final int sRadioactivity) { - String aMaterialKey = materialName.toLowerCase(); - if (mGeneratedMaterialMap.containsKey(aMaterialKey)) { - return mGeneratedMaterialMap.get(aMaterialKey); - } - - final Material temp = new Material( - materialName, - defaultState, - colour, - 1000, //melting - 3000, //boiling - 50, //Protons - 50, //Neutrons - false, - "", - sRadioactivity); - mGeneratedMaterialMap.put(aMaterialKey, temp); - return temp; - } - - public static boolean hasValidRGBA(final short[] rgba){ - if (rgba == null || rgba.length < 3 || rgba.length > 4){ - return false; - } - return true; - } - - public static int getTierOfMaterial(final double aMeltingPoint){ - - return aMeltingPoint < 1000 ? 0 : (MathUtils.roundToClosestInt(aMeltingPoint/1000f)); - - - /*if ((aMeltingPoint >= 0) && (aMeltingPoint <= 1000)){ - return 1; - } - else if((aMeltingPoint >= 1001) && (aMeltingPoint <= 2000)){ - return 2; - } - else if((aMeltingPoint >= 2001) && (aMeltingPoint <= 3000)){ - return 3; - } - else if((aMeltingPoint >= 3001) && (aMeltingPoint <= 4000)){ - return 4; - } - else if((aMeltingPoint >= 4001) && (aMeltingPoint <= 5000)){ - return 5; - } - else if((aMeltingPoint >= 5001) && (aMeltingPoint <= 6000)){ - return 6; - } - else if((aMeltingPoint >= 6001) && (aMeltingPoint <= 7000)){ - return 7; - } - else if((aMeltingPoint >= 7001) && (aMeltingPoint <= 8000)){ - return 8; - } - else if((aMeltingPoint >= 8001) && (aMeltingPoint <= 9000)){ - return 9; - } - else if((aMeltingPoint >= 9001) && (aMeltingPoint <= 9999)){ - return 10; - } - else { - return 0; - }*/ - } - - public static int getVoltageForTier(int aTier) { - //aTier += 1; - Probably some logic to this, idk. - - switch(aTier){ - case 0: - return 16; - case 1: - return 30; - case 2: - return 120; - case 3: - return 480; - case 4: - return 1920; - case 5: - return 7680; - case 6: - return 30720; - case 7: - return 122880; - case 8: - return 491520; - case 9: - return 1966080; - case 10: - return 7864320; - case 11: - return 31457280; - case 12: - return 125829120; - case 13: - return 503316480; - case 14: - return 2013265920; - default: - return Integer.MAX_VALUE; - } - - /*else { - int newTier = aTier - 1; - return (int) ((4*(Math.pow(4, newTier)))*7.5); - }*/ - } - - private static Materials getMaterialByName(String materialName) { - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - return (Materials) EnumUtils.getValue(gregtech.api.enums.Materials.class, materialName, false); - } - else { - for (Materials m : Materials.values()) { - if (MaterialUtils.getMaterialName(m).toLowerCase().equals(materialName.toLowerCase())) { - return m; - } - } - return null; - } - } - - @SuppressWarnings("deprecation") - public static String getMaterialName(Materials mat){ - - String mName = null; - - try { - mName = (String) ReflectionUtils.getField(Materials.class, "mDefaultLocalName").get(mat); - if (mName == null) { - mName = (String) ReflectionUtils.getField(Materials.class, "mName").get(mat); - } - } - catch (IllegalArgumentException | IllegalAccessException e) { - } - - - if (mName == null || mName.equals("")){ - mName = mat.name(); - } - return mName; - } - - public static TextureSet getMostCommonTextureSet(List list) { - TypeCounter aCounter = new TypeCounter(TextureSet.class); - for (Material m : list) { - TextureSet t = m.getTextureSet(); - if (t == null) { - t = Materials.Gold.mIconSet; - } - if (t != null) { - aCounter.add(t, t.mSetName); - } - } - return aCounter.getResults(); - /*Optional r = list.stream().map(Material::getTextureSet).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().max(Map.Entry.comparingByValue()).map(Map.Entry::getKey); - TextureSet o = (r != null && r.isPresent() && r.get() != null) ? r.get() : null; - return o;*/ - } - - - - public static Materials getMaterial(String aMaterialName, String aFallbackMaterialName) { - Materials g = getMaterial(aMaterialName); - if (g == null) { - g = getMaterial(aFallbackMaterialName); - } - if (g == null) { - Logger.INFO("Failed finding material '"+aMaterialName+"' & fallback '"+aFallbackMaterialName+"', returning _NULL."); - CORE.crash(); - //g = Materials._NULL; - } - return g; - } - - public static Materials getMaterial(String aMaterialName) { - Materials m = gtPlusPlus.xmod.gregtech.common.StaticFields59.getMaterial(aMaterialName); - if (m == null) { - m = getMaterialByName(aMaterialName); - } - if (m == null) { - Logger.INFO("Failed finding material '"+aMaterialName+"', returning _NULL."); - m = Materials._NULL; - } - return m; - } - - public static AutoMap getCompoundMaterialsRecursively(Material aMat){ - return getCompoundMaterialsRecursively_Speiger(aMat); - /* - AutoMap aDataSet = new AutoMap(); - final int HARD_LIMIT = 1000; - int mLoopCounter = 0; - if (aMat.getComposites().size() > 0) { - try { - List xList = Lists.newLinkedList(); - for (MaterialStack kj : aMat.getComposites()) { - xList.add(kj.getStackMaterial()); - } - if (xList.isEmpty()) { - aDataSet.put(aMat); - return aDataSet; - } - ListIterator listIterator = xList.listIterator(); - while(listIterator.hasNext()){ - Material e = listIterator.next(); - listIterator.remove(); - if (mLoopCounter > HARD_LIMIT) { - break; - } - - if (e.getComposites().isEmpty()) { - aDataSet.put(e); - } - else { - for (MaterialStack x : e.getComposites()) { - listIterator.add(x.getStackMaterial()); - } - } - mLoopCounter++; - - - }} - catch (Throwable t) { - aDataSet.put(aMat); - t.printStackTrace(); - } - } - if (aDataSet.isEmpty()) { - aDataSet.put(aMat); - return aDataSet; - } - return aDataSet; - */} - - public static AutoMap getCompoundMaterialsRecursively_Speiger(Material toSearch) { - AutoMap resultList = new AutoMap(); - if (toSearch.getComposites().isEmpty()) { - resultList.put(toSearch); - return resultList; - } - final int HARD_LIMIT = 1000; - - // Could be a Deque but i dont use the interface - // enough to use it as default. - LinkedList toCheck = new LinkedList(); - - toCheck.add(toSearch); - int processed = 0; - while (toCheck.size() > 0 && processed < HARD_LIMIT) { - Material current = toCheck.remove(); - if (current.getComposites().isEmpty()) { - resultList.put(current); - } else { - for (MaterialStack entry : current.getComposites()) { - toCheck.add(entry.getStackMaterial()); - } - } - processed++; - } - return resultList; - } - - public static void generateComponentAndAssignToAMaterial(ComponentTypes aType, Material aMaterial) { - generateComponentAndAssignToAMaterial(aType, aMaterial, true); - } - - public static void generateComponentAndAssignToAMaterial(ComponentTypes aType, Material aMaterial, boolean generateRecipes) { - Item aGC; - if (aType == ComponentTypes.PLATEHEAVY) { - aGC = new BaseItemPlateHeavy(aMaterial); - } - else { - aGC = new BaseItemComponent(aMaterial, aType); - } - if (aGC != null) { - String aFormattedLangName = aType.getName(); - - if (!aFormattedLangName.startsWith(" ")) { - if (aFormattedLangName.contains("@")) { - String[] aSplit = aFormattedLangName.split("@"); - aFormattedLangName = aSplit[0] + " " + aMaterial.getLocalizedName() + " " + aSplit[1]; - } - } - - if (aFormattedLangName.equals(aType.getName())) { - aFormattedLangName = aMaterial.getLocalizedName() + aFormattedLangName; - - } - - - - Logger.MATERIALS("[Lang] "+aGC.getUnlocalizedName()+".name="+aFormattedLangName); - aMaterial.registerComponentForMaterial(aType, ItemUtils.getSimpleStack(aGC)); - } - } - - - - - - - - - public static void generateSpecialDustAndAssignToAMaterial(Material aMaterial) { - generateSpecialDustAndAssignToAMaterial(aMaterial, true); - } - - public static void generateSpecialDustAndAssignToAMaterial(Material aMaterial, boolean generateMixerRecipes) { - Item[] aDusts = ItemUtils.generateSpecialUseDusts(aMaterial, false, Utils.invertBoolean(generateMixerRecipes)); - if (aDusts != null && aDusts.length > 0) { - aMaterial.registerComponentForMaterial(OrePrefixes.dust, ItemUtils.getSimpleStack(aDusts[0])); - aMaterial.registerComponentForMaterial(OrePrefixes.dustSmall, ItemUtils.getSimpleStack(aDusts[1])); - aMaterial.registerComponentForMaterial(OrePrefixes.dustTiny, ItemUtils.getSimpleStack(aDusts[2])); - } - - } - - public static boolean doesMaterialExist(String aMatName) { - for (Materials m : Materials.values()) { - if (m.name().toLowerCase().equals(aMatName.toLowerCase())) { - return true; - } - } - return false; - } - - public static boolean isNullGregtechMaterial(Materials aGregtechMaterial) { - if (aGregtechMaterial == Materials._NULL || aGregtechMaterial.equals(Materials._NULL) || aGregtechMaterial.name().equals(Materials._NULL.name())) { - return true; - } - return false; - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/MiningUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/MiningUtils.java deleted file mode 100644 index 080b5665a3..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/MiningUtils.java +++ /dev/null @@ -1,265 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.HashMap; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; - -import gregtech.common.GT_Worldgen_GT_Ore_Layer; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class MiningUtils { - - public static Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld){ - String correctTool = ""; - if (!currentWorld.isRemote){ - try { - correctTool = currentBlock.getHarvestTool(0); - //Utils.LOG_WARNING(correctTool); - if (correctTool.equals("pickaxe")){ - return true;} - } catch (final NullPointerException e){ - return false;} - } - return false; - } - - private static void removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z){ - try { - final Block block = world.getBlock(X, Y, Z); - if (canPickaxeBlock(block, world)){ - if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ - block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); - world.setBlockToAir(X, Y, Z); - - } - else { - Logger.WARNING("Incorrect Tool for mining this block."); - } - } - } catch (final NullPointerException e){ - - } - } - - public static boolean getBlockType(final Block block, final World world, final int[] xyz, final int miningLevel){ - final String LIQUID = "liquid"; - final String BLOCK = "block"; - final String ORE = "ore"; - final String AIR = "air"; - String blockClass = ""; - - if (world.isRemote){ - return false; - } - - if (block == Blocks.end_stone) { - return true; - } - if (block == Blocks.stone) { - return true; - } - if (block == Blocks.sandstone) { - return true; - } - if (block == Blocks.netherrack) { - return true; - } - if (block == Blocks.nether_brick) { - return true; - } - if (block == Blocks.nether_brick_stairs) { - return true; - } - if (block == Blocks.nether_brick_fence) { - return true; - } - if (block == Blocks.glowstone) { - return true; - } - - - - try { - blockClass = block.getClass().toString().toLowerCase(); - Logger.WARNING(blockClass); - if (blockClass.toLowerCase().contains(LIQUID)){ - Logger.WARNING(block.toString()+" is a Liquid."); - return false; - } - else if (blockClass.toLowerCase().contains(ORE)){ - Logger.WARNING(block.toString()+" is an Ore."); - return true; - } - else if (block.getHarvestLevel(world.getBlockMetadata(xyz[0], xyz[1], xyz[2])) >= miningLevel){ - Logger.WARNING(block.toString()+" is minable."); - return true; - } - else if (blockClass.toLowerCase().contains(AIR)){ - Logger.WARNING(block.toString()+" is Air."); - return false; - } - else if (blockClass.toLowerCase().contains(BLOCK)){ - Logger.WARNING(block.toString()+" is a block of some kind."); - return false; - } - else { - Logger.WARNING(block.toString()+" is mystery."); - return false; - } - } - catch(final NullPointerException e){ - return false; - } - } - - public static int mMoonID =-99; - public static int mMarsID = -99; - public static int mCometsID = -99; - public static AutoMap getOresForDim(int dim) { - if (dim == -1) { - return Ores_Nether; - } - else if (dim == 1) { - return Ores_End; - } - else if (dim == mMoonID) { - return Ores_Moon; - } - else if (dim == mMarsID) { - return Ores_Mars; - } - else if (dim == mCometsID) { - return Ores_Comets; - } - else { - return Ores_Overworld; - } - - } - - public static void iterateAllOreTypes() { - HashMap M = new HashMap(); - String aTextWorldGen = null; - if (MiningUtils.findAndMapOreTypesFromGT()) { - int mapKey = 0; - for (AutoMap g : MiningUtils.mOreMaps) { - for (GT_Worldgen_GT_Ore_Layer h : g) { - - try { - aTextWorldGen = (String) ReflectionUtils.getField(GT_Worldgen_GT_Ore_Layer.class, "aTextWorldgen").get(h); - } catch (IllegalArgumentException | IllegalAccessException e) { - aTextWorldGen = h.mWorldGenName; - } - - //if (M.containsKey(h.aTextWorldgen + h.mWorldGenName)) { - M.put(aTextWorldGen + h.mWorldGenName, mapKey); - Logger.INFO("Found Vein type: " + aTextWorldGen + h.mWorldGenName + " in map with key: "+mapKey); - //} - } - mapKey++; - } - } - } - - public static AutoMap[] mOreMaps = new AutoMap[7]; - private static AutoMap Ores_Overworld = new AutoMap(); - private static AutoMap Ores_Nether = new AutoMap(); - private static AutoMap Ores_End = new AutoMap(); - private static AutoMap Ores_Moon = new AutoMap(); - private static AutoMap Ores_Mars = new AutoMap(); - private static AutoMap Ores_Comets = new AutoMap(); - private static AutoMap Ores_Misc = new AutoMap(); - - public static boolean findAndMapOreTypesFromGT() { - //Gets Moon ID - - boolean aEndAsteroids; - try { - if (ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.util.ConfigManagerCore") != null && mMoonID == -99) { - mMoonID = ReflectionUtils.getField(ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.util.ConfigManagerCore"), "idDimensionMoon").getInt(null); - } - } - catch (IllegalArgumentException | IllegalAccessException e) {} - - //Gets Mars ID - try { - if (ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.mars.ConfigManagerMars") != null && mMarsID == -99) { - mMarsID = ReflectionUtils.getField(ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.mars.ConfigManagerMars"), "dimensionIDMars").getInt(null); - } - } - catch (IllegalArgumentException | IllegalAccessException e) {} - - //Get Comets ID - try { - if (ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.asteroids.ConfigManagerAsteroids") != null && mCometsID == -99) { - mCometsID = ReflectionUtils.getField(ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.asteroids.ConfigManagerAsteroids"), "dimensionIDAsteroids").getInt(null); - } - } - catch (IllegalArgumentException | IllegalAccessException e) {} - - //Clear Cache - Ores_Overworld.clear(); - Ores_Nether.clear(); - Ores_End.clear(); - Ores_Misc.clear(); - - for (GT_Worldgen_GT_Ore_Layer x : GT_Worldgen_GT_Ore_Layer.sList) { - if (x.mEnabled) { - - - try { - aEndAsteroids = ReflectionUtils.getField(GT_Worldgen_GT_Ore_Layer.class, "mEndAsteroid").getBoolean(x); - } - catch (IllegalArgumentException | IllegalAccessException e) { - aEndAsteroids = false; - } - - if (x.mOverworld) { - Ores_Overworld.put(x); - } - if (x.mNether) { - Ores_Nether.put(x); - } - if (x.mEnd || aEndAsteroids) { - Ores_End.put(x); - } - if (x.mOverworld || x.mNether || (x.mEnd || aEndAsteroids)) { - continue; - } - /*if (x.mMoon) { - Ores_Moon.put(x); - continue; - } - if (x.mMars) { - Ores_Mars.put(x); - continue; - } - if (x.mAsteroid) { - Ores_Comets.put(x); - continue; - }*/ - Ores_Misc.put(x); - continue; - } - else { - Ores_Comets.put(x); - } - } - - - mOreMaps[0] = Ores_Overworld; - mOreMaps[1] = Ores_Nether; - mOreMaps[2] = Ores_End; - mOreMaps[3] = Ores_Moon; - mOreMaps[4] = Ores_Mars; - mOreMaps[5] = Ores_Comets; - mOreMaps[6] = Ores_Misc; - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java deleted file mode 100644 index e3ffb5c410..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java +++ /dev/null @@ -1,161 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.util.GT_Utility; - -import baubles.api.BaubleType; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; - -public class ModularArmourUtils { - - public static ItemStack addComponent(ItemStack tArmour, ItemStack[] tComponents) { - if (tArmour != null) { - ItemStack rArmour = NBTUtils.writeItemsToGtCraftingComponents(tArmour, tComponents, true); - if (rArmour != null) { - - } - } - return null; - } - - public static enum Modifiers { - BOOST_HP("skill.hpboost"), BOOST_DEF("skill.defenceboost"), BOOST_SPEED("skill.speedboost"), BOOST_MINING( - "skill.miningboost"), BOOST_DAMAGE("skill.damageboost"), BOOST_HOLY("skill.holyboost"); - private String MODIFIER_NAME; - - private Modifiers(final String mModifier) { - this.MODIFIER_NAME = mModifier; - } - - public String getModifier() { - return this.MODIFIER_NAME; - } - - public boolean isValidLevel(int i) { - if (i >= 0 && i <= 100) { - return true; - } - return false; - } - } - - public static enum BT { - TYPE_AMULET(BaubleType.AMULET, 0), TYPE_RING(BaubleType.RING, 1), TYPE_BELT(BaubleType.BELT, 2); - private final BaubleType mType; - private final int mID; - private final String mBaubleType; - - private BT(final BaubleType tType, int tID) { - this.mType = tType; - this.mID = tID; - this.mBaubleType = tType.name().toLowerCase(); - } - - public BaubleType getType() { - return this.mType; - } - - public BT getThis() { - return this; - } - - public BaubleType getBaubleByID(int tID) { - if (tID == 0) { - return BaubleType.AMULET; - } else if (tID == 1) { - return BaubleType.RING; - } else if (tID == 2) { - return BaubleType.BELT; - } else { - return BaubleType.RING; - } - } - - public int getID() { - return this.mID; - } - - public String getTypeAsString() { - return this.mBaubleType; - } - } - - public static void setModifierLevel(ItemStack aStack, Pair mPair) { - setModifierLevel(aStack, mPair.getKey(), mPair.getValue().intValue()); - } - - public static void setModifierLevel(ItemStack aStack, Modifiers aMod, Integer aInt) { - setModifierLevel(aStack, aMod, aInt.intValue()); - } - - public static void setModifierLevel(ItemStack aStack, Modifiers aMod, int aInt) { - - int mCurrentLevel = getModifierLevel(aStack, aMod); - int mNewTotalLevel = mCurrentLevel + aInt; - - NBTTagCompound tNBT = NBTUtils.getNBT(aStack); - if (aMod.isValidLevel(mNewTotalLevel)) { - tNBT.setInteger(aMod.getModifier(), mNewTotalLevel); - GT_Utility.ItemNBT.setNBT(aStack, tNBT); - } else { - if (getModifierLevel(aStack, aMod) > 100) { - setModifierLevel(aStack, aMod, 100); - } - } - } - - public static int getModifierLevel(ItemStack aStack, Pair newPair) { - return getModifierLevel(aStack, newPair.getKey()); - } - - public static int getModifierLevel(ItemStack aStack, Modifiers aMod) { - NBTTagCompound tNBT = NBTUtils.getNBT(aStack); - return tNBT.getInteger(aMod.getModifier()); - } - - public static void setBaubleType(ItemStack aStack, BT aMod) { - Logger.INFO("Changing bauble type."); - NBTTagCompound tNBT = NBTUtils.getNBT(aStack); - if (aMod != null) { - tNBT.setInteger("mBaubleType", aMod.getID()); - GT_Utility.ItemNBT.setNBT(aStack, tNBT); - } - } - - public static int getBaubleTypeID(ItemStack aStack) { - NBTTagCompound tNBT = NBTUtils.getNBT(aStack); - return tNBT.getInteger("mBaubleType"); - } - - public static BaubleType getBaubleType(ItemStack aStack) { - NBTTagCompound tNBT = NBTUtils.getNBT(aStack); - return getBaubleByID(tNBT.getInteger("mBaubleType")); - } - - public static BaubleType getBaubleByID(int tID) { - if (tID == 0) { - return BaubleType.AMULET; - } else if (tID == 1) { - return BaubleType.RING; - } else if (tID == 2) { - return BaubleType.BELT; - } else { - return BaubleType.RING; - } - } - - public static ItemStack setDefaultStats(ItemStack aStack) { - ItemStack tempStack = aStack; - setModifierLevel(tempStack, Modifiers.BOOST_DAMAGE, 0); - setModifierLevel(tempStack, Modifiers.BOOST_DEF, 0); - setModifierLevel(tempStack, Modifiers.BOOST_HOLY, 0); - setModifierLevel(tempStack, Modifiers.BOOST_HP, 0); - setModifierLevel(tempStack, Modifiers.BOOST_MINING, 0); - setModifierLevel(tempStack, Modifiers.BOOST_SPEED, 0); - return tempStack; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java deleted file mode 100644 index 7ed4d887cc..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java +++ /dev/null @@ -1,580 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import static gtPlusPlus.core.item.ModItems.ZZZ_Empty; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.entity.Entity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class NBTUtils { - - public static NBTTagCompound getNBT(ItemStack aStack) { - NBTTagCompound rNBT = aStack.getTagCompound(); - return ((rNBT == null) ? new NBTTagCompound() : rNBT); - } - - public static void setBookTitle(ItemStack aStack, String aTitle) { - NBTTagCompound tNBT = getNBT(aStack); - tNBT.setString("title", aTitle); - GT_Utility.ItemNBT.setNBT(aStack, tNBT); - } - - public static String getBookTitle(ItemStack aStack) { - NBTTagCompound tNBT = getNBT(aStack); - return tNBT.getString("title"); - } - - public static ItemStack[] readItemsFromNBT(ItemStack itemstack) { - NBTTagCompound tNBT = getNBT(itemstack); - final NBTTagList list = tNBT.getTagList("Items", 10); - ItemStack inventory[] = new ItemStack[list.tagCount()]; - for (int i = 0; i < list.tagCount(); i++) { - final NBTTagCompound data = list.getCompoundTagAt(i); - final int slot = data.getInteger("Slot"); - if ((slot >= 0) && (slot < list.tagCount())) { - if (ItemStack.loadItemStackFromNBT(data) == ItemUtils.getSimpleStack(ZZZ_Empty)) { - inventory[slot] = null; - } else { - inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - - } - } - return inventory; - } - - public static ItemStack[] readItemsFromNBT(ItemStack itemstack, String customkey) { - NBTTagCompound tNBT = getNBT(itemstack); - final NBTTagList list = tNBT.getTagList(customkey, 10); - ItemStack inventory[] = new ItemStack[list.tagCount()]; - for (int i = 0; i < list.tagCount(); i++) { - final NBTTagCompound data = list.getCompoundTagAt(i); - final int slot = data.getInteger("Slot"); - if ((slot >= 0) && (slot < list.tagCount())) { - if (ItemStack.loadItemStackFromNBT(data) == ItemUtils.getSimpleStack(ZZZ_Empty)) { - inventory[slot] = null; - } else { - inventory[slot] = ItemStack.loadItemStackFromNBT(data); - } - - } - } - return inventory; - } - - public static ItemStack writeItemsToNBT(ItemStack itemstack, ItemStack[] stored) { - NBTTagCompound tNBT = getNBT(itemstack); - final NBTTagList list = new NBTTagList(); - for (int i = 0; i < stored.length; i++) { - final ItemStack stack = stored[i]; - if (stack != null) { - final NBTTagCompound data = new NBTTagCompound(); - stack.writeToNBT(data); - data.setInteger("Slot", i); - list.appendTag(data); - } else { - final NBTTagCompound data = new NBTTagCompound(); - ItemStack nullstack = ItemUtils.getSimpleStack(ZZZ_Empty); - nullstack.writeToNBT(data); - data.setInteger("Slot", i); - list.appendTag(data); - } - } - tNBT.setTag("Items", list); - itemstack.setTagCompound(tNBT); - return itemstack; - } - - public static ItemStack writeItemsToNBT(ItemStack itemstack, ItemStack[] stored, String customkey) { - NBTTagCompound tNBT = getNBT(itemstack); - final NBTTagList list = new NBTTagList(); - for (int i = 0; i < stored.length; i++) { - final ItemStack stack = stored[i]; - if (stack != null) { - final NBTTagCompound data = new NBTTagCompound(); - stack.writeToNBT(data); - data.setInteger("Slot", i); - list.appendTag(data); - } - } - tNBT.setTag(customkey, list); - itemstack.setTagCompound(tNBT); - return itemstack; - } - - public static ItemStack writeItemsToGtCraftingComponents(ItemStack rStack, ItemStack[] input, boolean copyTags) { - try { - ItemStack stored[] = new ItemStack[9]; - if (input.length != 9) { - for (int e=0;e mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); - if (mInternalMap != null) { - for (Map.Entry e : mInternalMap.entrySet()) { - Logger.INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue()); - } - return true; - } else { - Logger.INFO("Data map reflected from NBTTagCompound was not valid."); - return false; - } - } - } - } catch (Throwable t) {} - return false; - } - - // Botania soulbind handling - public static boolean setBotanicaSoulboundOwner(ItemStack aStack, String aName) { - final String TAG_SOULBIND = "soulbind"; - NBTTagCompound tNBT = getNBT(aStack); - tNBT.setString(TAG_SOULBIND, aName); - GT_Utility.ItemNBT.setNBT(aStack, tNBT); - if (NBTUtils.doesStringExist(aStack, TAG_SOULBIND)) { - return true; - } else { - return false; - } - } - - public static String getBotanicaSoulboundOwner(ItemStack aStack) { - final String TAG_SOULBIND = "soulbind"; - NBTTagCompound tNBT = getNBT(aStack); - return tNBT.getString(TAG_SOULBIND); - } - - public static boolean hasKey(ItemStack stack, String key) { - final NBTTagCompound itemData = getNBT(stack); - if (itemData.hasKey(key)) { - return true; - } - return false; - } - - public static boolean createIntegerTagCompound(ItemStack rStack, String tagName, String keyName, int keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setInteger(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static boolean createLongTagCompound(ItemStack rStack, String tagName, String keyName, long keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static boolean createStringTagCompound(ItemStack rStack, String tagName, String keyName, String keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setString(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static boolean createFloatTagCompound(ItemStack rStack, String tagName, String keyName, float keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setFloat(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static boolean createDoubleTagCompound(ItemStack rStack, String tagName, String keyName, double keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setDouble(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static boolean createBooleanTagCompound(ItemStack rStack, String tagName, String keyName, boolean keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setBoolean(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static boolean createTagCompound(ItemStack rStack, String tagName, NBTTagCompound keyValue) { - final NBTTagCompound tagMain = getNBT(rStack); - NBTTagCompound tagNBT = keyValue; - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static int getIntegerTagCompound(ItemStack aStack, String tagName, String keyName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT.getInteger(keyName); - } - } - return 0; - } - - public static long getLongTagCompound(ItemStack aStack, String tagName, String keyName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT.getLong(keyName); - } - } - return 0L; - } - - public static String getStringTagCompound(ItemStack aStack, String tagName, String keyName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT.getString(keyName); - } - } - return null; - } - - public static float getFloatTagCompound(ItemStack aStack, String tagName, String keyName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT.getFloat(keyName); - } - } - return 0; - } - - public static double getDoubleTagCompound(ItemStack aStack, String tagName, String keyName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT.getDouble(keyName); - } - } - return 0; - } - - public static boolean getBooleanTagCompound(ItemStack aStack, String tagName, String keyName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT.getBoolean(keyName); - } - } - return false; - } - - public static NBTTagCompound getTagCompound(ItemStack aStack, String tagName) { - NBTTagCompound aNBT = getNBT(aStack); - if (aNBT != null && hasKey(aStack, tagName)) { - aNBT = aNBT.getCompoundTag(tagName); - if (aNBT != null) { - return aNBT; - } - } - return null; - } - - public static boolean hasKeyInTagCompound(ItemStack stack, String tag, String key) { - NBTTagCompound aNBT = stack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag(tag); - if (aNBT.hasKey(key)) { - return true; - } - } - return false; - } - - public static Map getTagMap(NBTTagCompound aNBT) { - Map tagMap = new HashMap(); - if (!aNBT.hasNoTags()) { - Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); - if (mInternalMap != null && !mInternalMap.isEmpty()) { - tagMap.putAll(mInternalMap); - } - } - return tagMap; - } - - public static boolean isTagString(NBTTagCompound aNBT, String aTagName) { - Map aTagMap = getTagMap(aNBT); - if (aTagMap != null && !aTagMap.isEmpty()) { - for (Map.Entry e : aTagMap.entrySet()) { - if (e.getKey().equals(aTagName)) { - Object aValue = e.getValue(); - if (aValue instanceof String) { - return true; - } - } - } - } - return false; - } - - public static boolean isTagInteger(NBTTagCompound aNBT, String aTagName) { - Map aTagMap = getTagMap(aNBT); - if (aTagMap != null && !aTagMap.isEmpty()) { - for (Map.Entry e : aTagMap.entrySet()) { - if (e.getKey().equals(aTagName)) { - Object aValue = e.getValue(); - if (int.class.isInstance(aValue) || aValue instanceof Integer) { - return true; - } - } - } - } - return false; - } - - public static boolean isTagLong(NBTTagCompound aNBT, String aTagName) { - Map aTagMap = getTagMap(aNBT); - if (aTagMap != null && !aTagMap.isEmpty()) { - for (Map.Entry e : aTagMap.entrySet()) { - if (e.getKey().equals(aTagName)) { - Object aValue = e.getValue(); - if (long.class.isInstance(aValue) || aValue instanceof Long) { - return true; - } - } - } - } - return false; - } - - public static boolean isTagFloat(NBTTagCompound aNBT, String aTagName) { - Map aTagMap = getTagMap(aNBT); - if (aTagMap != null && !aTagMap.isEmpty()) { - for (Map.Entry e : aTagMap.entrySet()) { - if (e.getKey().equals(aTagName)) { - Object aValue = e.getValue(); - if (float.class.isInstance(aValue) || aValue instanceof Float) { - return true; - } - } - } - } - return false; - } - - public static boolean isTagDouble(NBTTagCompound aNBT, String aTagName) { - Map aTagMap = getTagMap(aNBT); - if (aTagMap != null && !aTagMap.isEmpty()) { - for (Map.Entry e : aTagMap.entrySet()) { - if (e.getKey().equals(aTagName)) { - Object aValue = e.getValue(); - if (double.class.isInstance(aValue) || aValue instanceof Double) { - return true; - } - } - } - } - return false; - } - - public static boolean isTagBoolean(NBTTagCompound aNBT, String aTagName) { - Map aTagMap = getTagMap(aNBT); - if (aTagMap != null && !aTagMap.isEmpty()) { - for (Map.Entry e : aTagMap.entrySet()) { - if (e.getKey().equals(aTagName)) { - Object aValue = e.getValue(); - if (boolean.class.isInstance(aValue) || aValue instanceof Boolean) { - return true; - } - } - } - } - return false; - } - - public static boolean tryCloneTagCompoundDataIntoSubTag(ItemStack aStack, NBTTagCompound aTagCompound) { - try { - NBTTagCompound aNBT = aTagCompound; - if (aNBT != null) { - if (!aNBT.hasNoTags()) { - Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); - if (mInternalMap != null) { - for (Map.Entry e : mInternalMap.entrySet()) { - Logger.INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue().toString()); - if (e.getValue().getClass() == String.class){ - createStringTagCompound(aStack, "mEntityTag", (String) e.getKey(), (String) e.getValue()); - } - else if (e.getValue().getClass() == Boolean.class || e.getValue().getClass() == boolean.class){ - createBooleanTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Boolean) e.getValue()); - } - else if (e.getValue().getClass() == Integer.class || e.getValue().getClass() == int.class){ - createIntegerTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Integer) e.getValue()); - } - else if (e.getValue().getClass() == Double.class || e.getValue().getClass() == double.class){ - createDoubleTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Double) e.getValue()); - } - else if (e.getValue().getClass() == Long.class || e.getValue().getClass() == long.class){ - createLongTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Long) e.getValue()); - } - else if (e.getValue().getClass() == Float.class || e.getValue().getClass() == float.class){ - createFloatTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Float) e.getValue()); - } - else { - - - } - - } - return true; - } - } - } - return false; - } catch (Throwable t) { - return false; - } - } - - public static NBTTagCompound getEntityCustomData(Entity aEntity){ - return ReflectionUtils.getField(aEntity, "customEntityData"); - } - - public static boolean setEntityCustomData(Entity aEntity, NBTTagCompound aTag){ - return ReflectionUtils.setField(aEntity, "customEntityData", aTag); - } - - public static boolean hasTagCompound(ItemStack aStack) { - return aStack.hasTagCompound(); - } - - public static void createEmptyTagCompound(ItemStack aStack) { - if (!hasTagCompound(aStack)) { - NBTTagCompound aTag = new NBTTagCompound(); - aStack.setTagCompound(aTag); - } - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/OreDictUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/OreDictUtils.java deleted file mode 100644 index 324d39b863..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/OreDictUtils.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class OreDictUtils { - - public static boolean containsValidEntries(String aOreName) { - boolean a = OreDictionary.doesOreNameExist(aOreName); - List b = OreDictionary.getOres(aOreName, false); - - if (!a) { - return false; - } - else { - if (b == null || b.isEmpty()) { - return false; - } - } - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java deleted file mode 100644 index 24ffa295b7..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java +++ /dev/null @@ -1,260 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.*; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import net.minecraftforge.common.util.FakePlayer; - -public class PlayerUtils { - - public static final Map mCachedFakePlayers = new WeakHashMap(); - private static final Class mThaumcraftFakePlayer; - - static { - if (ReflectionUtils.doesClassExist("thaumcraft.common.lib.FakeThaumcraftPlayer")) { - mThaumcraftFakePlayer = ReflectionUtils.getClass("thaumcraft.common.lib.FakeThaumcraftPlayer"); - } - else { - mThaumcraftFakePlayer = null; - } - } - - public static void messagePlayer(final EntityPlayer P, final String S){ - gregtech.api.util.GT_Utility.sendChatToPlayer(P, S); - } - - public static EntityPlayer getPlayer(final String name){ - try{ - final List i = new ArrayList<>(); - final Iterator iterator = MinecraftServer.getServer().getConfigurationManager().playerEntityList.iterator(); - while (iterator.hasNext()) { - i.add((iterator.next())); - } - for (final EntityPlayer temp : i) { - if (temp.getDisplayName().toLowerCase().equals(name.toLowerCase())){ - return temp; - } - } - } - catch(final Throwable e){} - return null; - } - - public static EntityPlayer getPlayerOnServerFromUUID(final UUID parUUID){ - if (parUUID == null) - { - return null; - } - final List allPlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList; - for (final EntityPlayerMP player : allPlayers) - { - if (player.getUniqueID().equals(parUUID)) - { - return player; - } - } - return null; - } - - //Not Clientside - public static EntityPlayer getPlayerInWorld(final World world, final String Name){ - final List i = world.playerEntities; - final Minecraft mc = Minecraft.getMinecraft(); - try{ - for (final EntityPlayer temp : i) { - if (temp.getDisplayName().toLowerCase().equals(Name.toLowerCase())){ - return temp; - } - } - } - catch(final NullPointerException e){} - return null; - } - - public static boolean isPlayerOP(final EntityPlayer player){ - if (player.canCommandSenderUseCommand(2, "")){ - return true; - } - return false; - } - - //Not Clientside - public static ItemStack getItemStackInPlayersHand(final World world, final String Name){ - final EntityPlayer thePlayer = getPlayer(Name); - ItemStack heldItem = null; - try{heldItem = thePlayer.getHeldItem(); - }catch(final NullPointerException e){return null;} - if (heldItem != null){ - return heldItem; - } - return null; - } - - @SideOnly(Side.CLIENT) - public static ItemStack getItemStackInPlayersHand(){ - final Minecraft mc = Minecraft.getMinecraft(); - ItemStack heldItem = null; - try{heldItem = mc.thePlayer.getHeldItem(); - }catch(final NullPointerException e){return null;} - if (heldItem != null){ - return heldItem; - } - return null; - } - - public static ItemStack getItemStackInPlayersHand(final EntityPlayer player){ - ItemStack heldItem = null; - try{ - heldItem = player.getHeldItem(); - } - catch(final NullPointerException e){ - e.printStackTrace(); - return null; - } - if (heldItem != null){ - return heldItem; - } - else { - if (Utils.isClient()) { - heldItem = player.getItemInUse(); - } - else { - heldItem = player.getCurrentEquippedItem(); - } - } - return heldItem; - } - - @SideOnly(Side.CLIENT) - public static Item getItemInPlayersHandClient(){ - final Minecraft mc = Minecraft.getMinecraft(); - Item heldItem = null; - - try{heldItem = mc.thePlayer.getHeldItem().getItem(); - }catch(final NullPointerException e){return null;} - - if (heldItem != null){ - return heldItem; - } - - return null; - } - - public static Item getItemInPlayersHand(final EntityPlayer player){ - Item heldItem = null; - try{ - heldItem = player.getHeldItem().getItem(); - }catch(final NullPointerException e){return null;} - - if (heldItem != null){ - return heldItem; - } - return null; - } - - public final static EntityPlayer getPlayerEntityByName(final String aPlayerName){ - final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName); - if (player != null){ - return player; - } - return null; - } - - public final static UUID getPlayersUUIDByName(final String aPlayerName){ - final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName); - if (player != null){ - return player.getUniqueID(); - } - return null; - } - - @SideOnly(Side.CLIENT) - public static final boolean isPlayerAlkalus(){ - if (Utils.isServer()){ - return false; - } - return isPlayerAlkalus(Minecraft.getMinecraft().thePlayer); - } - - public static final boolean isPlayerAlkalus(EntityPlayer player){ - if (player != null){ - if (player.getDisplayName().toLowerCase().equals("draknyte1") || player.getDisplayName().toLowerCase().equals("alkalus")){ - return true; - } - } - return false; - } - - public static void messageAllPlayers(String string) { - Utils.sendServerMessage(string); - } - - public static boolean isCreative(EntityPlayer aPlayer) { - return aPlayer.capabilities.isCreativeMode; - } - - public static boolean canTakeDamage(EntityPlayer aPlayer) { - return !aPlayer.capabilities.disableDamage; - } - - public static void cacheFakePlayer(EntityPlayer aPlayer) { - ChunkCoordinates aChunkLocation = aPlayer.getPlayerCoordinates(); - // Cache Fake Player - if (aPlayer instanceof FakePlayer || (mThaumcraftFakePlayer != null && mThaumcraftFakePlayer.isInstance(aPlayer)) - || (aPlayer.getCommandSenderName() == null - || aPlayer.getCommandSenderName().length() <= 0) - || (aPlayer.isEntityInvulnerable() && !aPlayer.canCommandSenderUseCommand(0, "") - && (aChunkLocation == null) || (aChunkLocation.posX == 0 && aChunkLocation.posY == 0 - && aChunkLocation.posZ == 0))) { - mCachedFakePlayers.put(aPlayer.getUniqueID().toString(), aPlayer); - } - } - - public static boolean isCachedFakePlayer(String aUUID) { - return mCachedFakePlayers.containsKey(aUUID); - } - - public static boolean isRealPlayer(EntityLivingBase aEntity) { - if (aEntity instanceof EntityPlayer) { - EntityPlayer p = (EntityPlayer) aEntity; - ChunkCoordinates aChunkLocation = p.getPlayerCoordinates(); - if (p instanceof FakePlayer) { - cacheFakePlayer(p); - return false; - } - if (mThaumcraftFakePlayer != null && mThaumcraftFakePlayer.isInstance(p) ) { - cacheFakePlayer(p); - return false; - } - if (p.getCommandSenderName() == null) { - cacheFakePlayer(p); - return false; - } - if (p.getCommandSenderName().length() <= 0) { - cacheFakePlayer(p); - return false; - } - if (p.isEntityInvulnerable() && !p.canCommandSenderUseCommand(0, "") && (aChunkLocation.posX == 0 && aChunkLocation.posY == 0 && aChunkLocation.posZ == 0)) { - cacheFakePlayer(p); - return false; - } - if (!isCachedFakePlayer(p.getUniqueID().toString())) { - return true; - } - } - return false; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java deleted file mode 100644 index da5bc071bc..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java +++ /dev/null @@ -1,803 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Materials; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.ShapedRecipe; -import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler; -import gtPlusPlus.core.handler.Recipes.RegistrationHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.data.ArrayUtils; -import net.minecraft.block.Block; -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.item.crafting.ShapelessRecipes; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; - -public class RecipeUtils { -public static int mInvalidID = 1; - public static boolean recipeBuilder(final Object slot_1, final Object slot_2, final Object slot_3, final Object slot_4, final Object slot_5, final Object slot_6, final Object slot_7, final Object slot_8, final Object slot_9, ItemStack resultItem){ - - //Old Debug Code, useful for finding recipes loading too early. - /*if (gtPlusPlus.GTplusplus.CURRENT_LOAD_PHASE != GTplusplus.INIT_PHASE.POST_INIT) { - Logger.RECIPE(ReflectionUtils.getMethodName(1)); - Logger.RECIPE(ReflectionUtils.getMethodName(2)); - Logger.RECIPE(ReflectionUtils.getMethodName(3)); - Logger.RECIPE(ReflectionUtils.getMethodName(4)); - Logger.RECIPE(ReflectionUtils.getMethodName(5)); - Logger.RECIPE(ReflectionUtils.getMethodName(6)); - Logger.RECIPE(ReflectionUtils.getMethodName(7)); - Logger.RECIPE(ReflectionUtils.getMethodName(8)); - Logger.RECIPE(ReflectionUtils.getMethodName(9)); - FMLCommonHandler.instance().exitJava(1, true); - }*/ - - if (resultItem == null){ - Logger.RECIPE("[Fix] Found a recipe with an invalid output, yet had a valid inputs. Using Dummy output so recipe can be found.."); - resultItem = ItemUtils.getItemStackOfAmountFromOreDict("givemeabrokenitem", 1); - resultItem.setItemDamage(mInvalidID++); - RegistrationHandler.recipesFailed++; - //return false; - } - else if ((slot_1 == null) && (slot_2 == null) && (slot_3 == null) && - (slot_4 == null) && (slot_5 == null) && (slot_6 == null) && - (slot_7 == null) && (slot_8 == null) && (slot_9 == null)){ - Logger.RECIPE("[Fix] Found a recipe with 0 inputs, yet had a valid output."); - Logger.RECIPE("[Fix] Error found while adding a recipe for: "+resultItem != null ? resultItem.getDisplayName() : "Bad Output Item"+" | Please report this issue on Github."); - RegistrationHandler.recipesFailed++; - return false; - } - - Object[] o = new Object[] {slot_1, slot_2, slot_3, slot_4, slot_5, slot_6, slot_7, slot_8, slot_9}; - - try { - int size = COMPAT_HANDLER.mRecipesToGenerate.size(); - COMPAT_HANDLER.mRecipesToGenerate.put(new InternalRecipeObject(o, resultItem, false)); - //Utils.LOG_WARNING("Success! Added a recipe for "+resultItem.getDisplayName()); - if (COMPAT_HANDLER.mRecipesToGenerate.size() > size) { - if (!COMPAT_HANDLER.areInitItemsLoaded){ - RegistrationHandler.recipesSuccess++; - } - else { - LateRegistrationHandler.recipesSuccess++; - } - return true; - } - return false; - } - catch(RuntimeException k){ - //k.getMessage(); - //k.getClass(); - //k.printStackTrace(); - //k.getLocalizedMessage(); - Logger.RECIPE("[Fix] Invalid Recipe detected for: "+resultItem != null ? resultItem.getUnlocalizedName() : "INVALID OUTPUT ITEM"); - if (!COMPAT_HANDLER.areInitItemsLoaded){ - RegistrationHandler.recipesFailed++; - } - else { - LateRegistrationHandler.recipesFailed++; - } - return false; - } - } - - public static void shapelessBuilder(final ItemStack Output, final Object slot_1, final Object slot_2, final Object slot_3, final Object slot_4, final Object slot_5, final Object slot_6, final Object slot_7, final Object slot_8, final Object slot_9){ - //Item output_ITEM = Output.getItem(); - - final ArrayList validSlots = new ArrayList<>(); - - Logger.WARNING("Trying to add a recipe for "+Output.toString()); - String a,b,c,d,e,f,g,h,i; - if (slot_1 == null){ a = " ";} else { a = "1";validSlots.add('1');validSlots.add(slot_1);} - Logger.WARNING(a); - if (slot_2 == null){ b = " ";} else { b = "2";validSlots.add('2');validSlots.add(slot_2);} - Logger.WARNING(b); - if (slot_3 == null){ c = " ";} else { c = "3";validSlots.add('3');validSlots.add(slot_3);} - Logger.WARNING(c); - if (slot_4 == null){ d = " ";} else { d = "4";validSlots.add('4');validSlots.add(slot_4);} - Logger.WARNING(d); - if (slot_5 == null){ e = " ";} else { e = "5";validSlots.add('5');validSlots.add(slot_5);} - Logger.WARNING(e); - if (slot_6 == null){ f = " ";} else { f = "6";validSlots.add('6');validSlots.add(slot_6);} - Logger.WARNING(f); - if (slot_7 == null){ g = " ";} else { g = "7";validSlots.add('7');validSlots.add(slot_7);} - Logger.WARNING(g); - if (slot_8 == null){ h = " ";} else { h = "8";validSlots.add('8');validSlots.add(slot_8);} - Logger.WARNING(h); - if (slot_9 == null){ i = " ";} else { i = "9";validSlots.add('9');validSlots.add(slot_9);} - Logger.WARNING(i); - - - Logger.ERROR("_______"); - Logger.ERROR("|"+a+"|"+b+"|"+c+"|"); - Logger.ERROR("_______"); - Logger.ERROR("|"+d+"|"+e+"|"+f+"|"); - Logger.ERROR("_______"); - Logger.ERROR("|"+g+"|"+h+"|"+i+"|"); - Logger.ERROR("_______"); - - validSlots.add(0, a); - validSlots.add(1, b); - validSlots.add(2, c); - validSlots.add(3, d); - validSlots.add(4, e); - validSlots.add(5, f); - validSlots.add(6, g); - validSlots.add(7, h); - validSlots.add(8, i); - - try { - //GameRegistry.addRecipe(new ShapelessOreRecipe(Output, outputAmount), (Object[]) validSlots.toArray()); - GameRegistry.addRecipe(new ShapelessOreRecipe(Output, validSlots.toArray())); - //GameRegistry.addShapelessRecipe(new ItemStack(output_ITEM, 1), new Object[] {slot_1, slot_2}); - Logger.RECIPE("Success! Added a recipe for "+Output.getDisplayName()); - RegistrationHandler.recipesSuccess++; - } - catch(final RuntimeException k){ - k.getMessage(); - k.getClass(); - k.printStackTrace(); - k.getLocalizedMessage(); - Logger.RECIPE("[Fix] Invalid Recipe detected for: "+Output.getUnlocalizedName()); - RegistrationHandler.recipesFailed++; - } - - - //GameRegistry.addShapelessRecipe(new ItemStack(output_ITEM, 1), new Object[] {slot_1, slot_2}); - } - - public static void recipeBuilder(final Object[] array, final ItemStack outPut) { - Logger.SPECIFIC_WARNING("object Array - recipeBuilder", "Attempting to build a recipe using an object array as an input, splitting it, then running the normal recipeBuilder() method.", 396); - Object a=null; - Object b=null; - Object c=null; - Object d=null; - Object e=null; - Object f=null; - Object g=null; - Object h=null; - Object i=null; - for(int z =0; z <= array.length; z++){ - array[z].toString(); - switch(z) - { - case 0: - a = array[z]; - break; - case 1: - b = array[z]; - break; - case 2: - c = array[z]; - break; - case 3: - d = array[z]; - break; - case 4: - e = array[z]; - break; - case 5: - f = array[z]; - break; - case 6: - g = array[z]; - break; - case 7: - h = array[z]; - break; - case 8: - i = array[z]; - break; - default: - break; - } - recipeBuilder(a, b, c, d, e, f, g, h, i, outPut); - } - } - - public static boolean removeCraftingRecipe(Object x){ - if (null == x){return false;} - if (x instanceof String){ - final Item R = ItemUtils.getItemFromFQRN((String) x); - if (R != null){ - x = R; - } - else { - return false; - } - } - if ((x instanceof Item) || (x instanceof ItemStack)){ - if (x instanceof Item){ - final ItemStack r = new ItemStack((Item) x); - Logger.RECIPE("Removing Recipe for "+r.getUnlocalizedName()); - } - else { - Logger.RECIPE("Removing Recipe for "+((ItemStack) x).getUnlocalizedName()); - } - if (x instanceof ItemStack){ - final Item r = ((ItemStack) x).getItem(); - if (null != r){ - x = r; - } - else { - Logger.RECIPE("Recipe removal failed - Tell Alkalus."); - return false; - } - } - if (RecipeUtils.attemptRecipeRemoval((Item) x)){ - Logger.RECIPE("Recipe removal successful"); - return true; - } - Logger.RECIPE("Recipe removal failed - Tell Alkalus."); - return false; - } - return false; - } - - private static boolean attemptRecipeRemoval(final Item I){ - Logger.RECIPE("Create list of recipes."); - final List recipes = CraftingManager.getInstance().getRecipeList(); - final Iterator items = recipes.iterator(); - Logger.RECIPE("Begin list iteration."); - while (items.hasNext()) { - final ItemStack is = items.next().getRecipeOutput(); - if ((is != null) && (is.getItem() == I)){ - items.remove(); - Logger.RECIPE("Remove a recipe with "+I.getUnlocalizedName()+" as output."); - continue; - } - } - Logger.RECIPE("All recipes should be gone?"); - if (!items.hasNext()){ - Logger.RECIPE("We iterated once, let's try again to double check."); - final Iterator items2 = recipes.iterator(); - while (items2.hasNext()) { - final ItemStack is = items2.next().getRecipeOutput(); - if ((is != null) && (is.getItem() == I)){ - items.remove(); - Logger.RECIPE("REMOVING MISSED RECIPE - RECHECK CONSTRUCTORS"); - return true; - } - } - Logger.RECIPE("Should be all gone now after double checking, so return true."); - return true; - } - Logger.RECIPE("Return false, because something went wrong."); - return false; - } - - - - public static boolean addShapedGregtechRecipeForTypes( - final Object InputItem1, final Object InputItem2, final Object InputItem3, - final Object InputItem4, final Object InputItem5, final Object InputItem6, - final Object InputItem7, final Object InputItem8, final Object InputItem9, - final ItemStack OutputItem){ - - int using = 0, recipeSlotCurrent = 0; - boolean[] hasMultiStack = new boolean[9]; - boolean inUse[] = {false, false, false}; - ItemStack array[][] = new ItemStack[3][9]; - - Object[] inputs = { - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9}; - - for (Object o : inputs){ - if (o.getClass().isArray()){ - if (inUse[using] == false){ - inUse[using] = true; - array[using] = (ItemStack[]) o; - hasMultiStack[recipeSlotCurrent] = true; - using++; - } - } - else { - hasMultiStack[recipeSlotCurrent] = false; - } - recipeSlotCurrent++; - } - - int using2 = 0; - for (boolean t : inUse){ - - if (t){ - if (array[using2] != null){ - //addShapedGregtechRecipe - } - } - using2++; - } - - - return false; - } - - - - public static boolean addShapedGregtechRecipe( - final Object InputItem1, final Object InputItem2, final Object InputItem3, - final Object InputItem4, final Object InputItem5, final Object InputItem6, - final Object InputItem7, final Object InputItem8, final Object InputItem9, - final ItemStack OutputItem){ - - Object[] o = { - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9 - }; - - - if (gtPlusPlus.GTplusplus.CURRENT_LOAD_PHASE != GTplusplus.INIT_PHASE.POST_INIT) { - CORE.crash("Load Phase "+gtPlusPlus.GTplusplus.CURRENT_LOAD_PHASE+" should be "+GTplusplus.INIT_PHASE.POST_INIT+". Unable to register recipe."); - } - - - int size = COMPAT_HANDLER.mGtRecipesToGenerate.size(); - COMPAT_HANDLER.mGtRecipesToGenerate.put(new InternalRecipeObject(o, OutputItem, true)); - - if (COMPAT_HANDLER.mGtRecipesToGenerate.size() > size) { - if (!COMPAT_HANDLER.areInitItemsLoaded){ - RegistrationHandler.recipesSuccess++; - } - else { - LateRegistrationHandler.recipesSuccess++; - } - return true; - } - return false; - - } - - public static boolean addShapedGregtechRecipe(final Object[] inputs, ItemStack output){ - - if (inputs.length != 9){ - Logger.RECIPE("[Fix] Input array for "+output.getDisplayName()+" does not equal 9. "+inputs.length+" is the actual size."); - RegistrationHandler.recipesFailed++; - return false; - } - - for (int x=0;x<9;x++){ - if (inputs[x] == null){ - inputs[x] = " "; - Logger.WARNING("Input slot "+x+" changed from NULL to a blank space."); - } - else if (!(inputs[x] instanceof ItemStack) && !(inputs[x] instanceof String) && !(inputs[x] instanceof Item)){ - if (output != null){ - Logger.RECIPE("[Fix] Invalid Item inserted into inputArray. Item:"+output.getDisplayName()+" has a bad recipe. Please report to Alkalus."); - RegistrationHandler.recipesFailed++; - return false; - } - else { - Logger.RECIPE("[Fix] Output is Null for a recipe. Report to Alkalus."); - output = ItemUtils.getItemStackOfAmountFromOreDict("sadibasdkjnad", 1); - RegistrationHandler.recipesFailed++; - } - } - } - - int size = COMPAT_HANDLER.mGtRecipesToGenerate.size(); - COMPAT_HANDLER.mGtRecipesToGenerate.put(new InternalRecipeObject(inputs, output, true)); - - if (COMPAT_HANDLER.mGtRecipesToGenerate.size() > size) { - if (!COMPAT_HANDLER.areInitItemsLoaded){ - RegistrationHandler.recipesSuccess++; - } - else { - LateRegistrationHandler.recipesSuccess++; - } - return true; - } - return false; - } - - public static boolean addShapelessGregtechRecipe( - final Object InputItem1, final Object InputItem2, final Object InputItem3, - final Object InputItem4, final Object InputItem5, final Object InputItem6, - final Object InputItem7, final Object InputItem8, final Object InputItem9, - final ItemStack OutputItem){ - - Object[] inputItems = { - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9 - }; - return addShapelessGregtechRecipe(inputItems, OutputItem); - } - - public static boolean addShapelessGregtechRecipe(final Object[] inputItems, final ItemStack OutputItem){ - //Catch Invalid Recipes - if (inputItems.length > 9 || inputItems.length < 1){ - if (OutputItem != null){ - Logger.RECIPE("[Fix] Invalid input array for shapeless recipe, which should output "+OutputItem.getDisplayName()); - } - return false; - } - //let gregtech handle shapeless recipes. - if (GT_ModHandler.addShapelessCraftingRecipe(OutputItem, inputItems)){ - return true; - } - return false; - } - - public static ItemStack getItemStackFromOreDict(final String oredictName){ - final ArrayList oreDictList = OreDictionary.getOres(oredictName); - return oreDictList.get(0); - } - - public static boolean buildShapelessRecipe(final ItemStack output, final Object[] input){ - return ShapelessUtils.addShapelessRecipe(output, input); - } - - public static boolean generateMortarRecipe(ItemStack aStack, ItemStack aOutput) { - return RecipeUtils.addShapedGregtechRecipe( - aStack, null, null, - CI.craftingToolMortar, null, null, - null, null, null, - aOutput); - } - - public static boolean doesGregtechRecipeHaveEqualCells(GT_Recipe x) { - if (x.mInputs.length == 0 && x.mOutputs.length == 0) { - return true; - } - - final int tInputAmount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(x.mInputs); - final int tOutputAmount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(x.mOutputs); - - if (tInputAmount < tOutputAmount) { - if (!Materials.Tin.contains(x.mInputs)) { - return false; - } - else { - return true; - } - } - else if (tInputAmount > tOutputAmount && !Materials.Tin.contains(x.mOutputs)) { - return false; - } - else { - return true; - } - } - - public static String[] getRecipeInfo(GT_Recipe m) { - if (m == null) { - return new String[] {}; - } - AutoMap result = new AutoMap(); - result.put(m.toString()); - result.put("Input "+ItemUtils.getArrayStackNames(m.mInputs)); - result.put("Output "+ItemUtils.getArrayStackNames(m.mOutputs)); - result.put("Input "+ItemUtils.getArrayStackNames(m.mFluidInputs)); - result.put("Output "+ItemUtils.getArrayStackNames(m.mFluidOutputs)); - result.put("Can be buffered? "+m.mCanBeBuffered); - result.put("Duration: "+m.mDuration); - result.put("EU/t: "+m.mEUt); - result.put("Is Hidden? "+m.mHidden); - result.put("Is Enabled? "+m.mEnabled); - result.put("Special Value: "+m.mSpecialValue); - result.put("====================================="); - String s[] = result.toArray(); - return s; - } - - - public static class InternalRecipeObject implements RunnableWithInfo { - final ItemStack mOutput; - final ShapedOreRecipe mRecipe; - public final boolean isValid; - - public InternalRecipeObject(Object[] aInputs, ItemStack aOutput, boolean gtRecipe) { - Logger.RECIPE("==================================="); - mOutput = aOutput != null ? aOutput.copy() : null; - Object[] aFiltered = new Object[9]; - int aValid = 0; - for (Object o : aInputs) { - if (o instanceof ItemStack) { - aFiltered[aValid++] = o; - } - else if (o instanceof Item) { - aFiltered[aValid++] = ItemUtils.getSimpleStack((Item) o); - } - else if (o instanceof Block) { - aFiltered[aValid++] = ItemUtils.getSimpleStack((Block) o); - } - else if (o instanceof String) { - aFiltered[aValid++] = o; - } - else if (o == null) { - aFiltered[aValid++] = null; - } - else { - Logger.RECIPE("Cleaned a "+o.getClass().getSimpleName()+" from recipe input."); - } - } - - int validCounter = 0, invalidCounter = 0; - for (Object p : aFiltered) { - if (p instanceof ItemStack) { - validCounter++; - } - else if (p instanceof Item) { - validCounter++; - } - else if (p instanceof Block) { - validCounter++; - } - else if (p instanceof String) { - validCounter++; - } - else if (p == null) { - validCounter++; - } - else { - invalidCounter++; - } - } - - Logger.RECIPE("Using "+validCounter+" valid inputs and "+invalidCounter+" invalid inputs."); - ShapedRecipe r = new ShapedRecipe(aFiltered, mOutput); - if (r != null && r.mRecipe != null) { - isValid = true; - } - else { - isValid = false; - } - mRecipe = r != null ? r.mRecipe : null; - } - - @Override - public void run() { - if (this.isValid) { - GameRegistry.addRecipe(mRecipe); - } - else { - Logger.RECIPE("[Fix] Invalid shapped recipe outputting "+mOutput != null ? mOutput.getDisplayName() : "Bad Output Item"); - } - } - - @Override - public String getInfoData() { - if (mOutput != null && mOutput instanceof ItemStack) { - return ((ItemStack) mOutput).getDisplayName(); - } - return ""; - } - - } - - - public static boolean removeGtRecipe(GT_Recipe aRecipeToRemove, GT_Recipe_Map aRecipeMap) { - if (aRecipeMap.mRecipeList.contains(aRecipeToRemove)) { - return aRecipeMap.mRecipeList.remove(aRecipeToRemove); - } - return false; - } - - public static boolean addGtRecipe(GT_Recipe aRecipeToAdd, GT_Recipe_Map aRecipeMap) { - if (!aRecipeMap.mRecipeList.contains(aRecipeToAdd)) { - return aRecipeMap.mRecipeList.add(aRecipeToAdd); - } - return false; - } - - public static boolean removeRecipeByOutput(ItemStack aOutput) { - return removeRecipeByOutput(aOutput, true, false, false); - } - - public static boolean removeRecipeByOutput(ItemStack aOutput, boolean aIgnoreNBT, - boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) { - if (aOutput == null) { - return false; - } else { - boolean rReturn = false; - ArrayList tList = (ArrayList) CraftingManager.getInstance().getRecipeList(); - aOutput = GT_OreDictUnificator.get(aOutput); - int tList_sS = tList.size(); - - for (int i = 0; i < tList_sS; ++i) { - IRecipe tRecipe = (IRecipe) tList.get(i); - if (!aNotRemoveShapelessRecipes - || !(tRecipe instanceof ShapelessRecipes) && !(tRecipe instanceof ShapelessOreRecipe)) { - if (aOnlyRemoveNativeHandlers) { - if (!gregtech.api.util.GT_ModHandler.sNativeRecipeClasses.contains(tRecipe.getClass().getName())) { - continue; - } - } else if (gregtech.api.util.GT_ModHandler.sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) { - continue; - } - - ItemStack tStack = tRecipe.getRecipeOutput(); - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) { - tList.remove(i--); - tList_sS = tList.size(); - rReturn = true; - } - } - } - - return rReturn; - } - } - - - public static void addSmeltingRecipe(ItemStack aStackInput, ItemStack aStackOutput) { - addSmeltingRecipe(aStackInput, aStackOutput, 0f); - } - - public static void addSmeltingRecipe(ItemStack aStackInput, ItemStack aStackOutput, float aXpGained) { - - GameRegistry.addSmelting(aStackInput, aStackOutput, aXpGained); - - } - - public static boolean addShapedRecipe( - Object Input_1, Object Input_2, Object Input_3, - Object Input_4, Object Input_5, Object Input_6, - Object Input_7, Object Input_8, Object Input_9, - ItemStack aOutputStack) { - return addShapedRecipe(new Object[] {Input_1, Input_2, Input_3, Input_4, Input_5, Input_6, Input_7, Input_8, Input_9}, aOutputStack); - } - - private static boolean addShapedRecipe(Object[] Inputs, ItemStack aOutputStack) { - Object[] Slots = new Object[9]; - - String aFullString = ""; - String aFullStringExpanded = "abcdefghi"; - - for (int i=0; i<9; i++) { - Object o = Inputs[i]; - - if (o instanceof ItemStack) { - Slots[i] = ItemUtils.getSimpleStack((ItemStack) o, 1); - aFullString += aFullStringExpanded.charAt(i); - } - else if (o instanceof Item) { - Slots[i] = ItemUtils.getSimpleStack((Item) o, 1); - aFullString += aFullStringExpanded.charAt(i); - } - else if (o instanceof Block) { - Slots[i] = ItemUtils.getSimpleStack((Block) o, 1); - aFullString += aFullStringExpanded.charAt(i); - } - else if (o instanceof String) { - Slots[i] = o; - aFullString += aFullStringExpanded.charAt(i); - } - else if (o instanceof ItemData) { - ItemData aData = (ItemData) o; - ItemStack aStackFromGT = ItemUtils.getOrePrefixStack(aData.mPrefix, aData.mMaterial.mMaterial, 1); - Slots[i] = aStackFromGT; - aFullString += aFullStringExpanded.charAt(i); - } - else if (o == null) { - Slots[i] = null; - aFullString += " "; - } - else { - Slots[i] = null; - Logger.INFO("Cleaned a "+o.getClass().getSimpleName()+" from recipe input."); - Logger.INFO("ERROR"); - CORE.crash("Bad Shaped Recipe."); - } - } - Logger.INFO("Using String: "+aFullString); - - String aRow1 = aFullString.substring(0, 3); - String aRow2 = aFullString.substring(3, 6); - String aRow3 = aFullString.substring(6, 9); - Logger.INFO(""+aRow1); - Logger.INFO(""+aRow2); - Logger.INFO(""+aRow3); - - String[] aStringData = new String[] {aRow1, aRow2, aRow3}; - Object[] aDataObject = new Object[19]; - aDataObject[0] = aStringData; - int aIndex = 0; - - - for (int u=1;u<20;u+=2) { - if (aIndex == 9) { - break; - } - if (aFullString.charAt(aIndex) != (' ')) { - aDataObject[u] = aFullString.charAt(aIndex); - aDataObject[u+1] = Slots[aIndex]; - Logger.INFO("("+aIndex+") "+aFullString.charAt(aIndex)+" | "+ (Slots[aIndex] instanceof ItemStack ? ItemUtils.getItemName((ItemStack) Slots[aIndex]) : Slots[aIndex] instanceof String ? (String) Slots[aIndex] : "Unknown")); - } - aIndex++; - } - - Logger.INFO("Data Size: "+aDataObject.length); - aDataObject = ArrayUtils.removeNulls(aDataObject); - Logger.INFO("Clean Size: "+aDataObject.length); - Logger.INFO("ArrayData: "+Arrays.toString(aDataObject)); - - ShapedOreRecipe aRecipe = new ShapedOreRecipe(aOutputStack, aDataObject); - - /*ShapedOreRecipe aRecipe = new ShapedOreRecipe(aOutputStack, - aStringData, - 'a', Slots[0], - 'b', Slots[1], - 'c', Slots[2], - 'd', Slots[3], - 'e', Slots[4], - 'f', Slots[5], - 'g', Slots[6], - 'h', Slots[7], - 'i', Slots[8]);*/ - - int size = COMPAT_HANDLER.mRecipesToGenerate.size(); - COMPAT_HANDLER.mRecipesToGenerate.put(new InternalRecipeObject2(aRecipe)); - if (COMPAT_HANDLER.mRecipesToGenerate.size() > size) { - if (!COMPAT_HANDLER.areInitItemsLoaded){ - RegistrationHandler.recipesSuccess++; - } - else { - LateRegistrationHandler.recipesSuccess++; - } - return true; - } - return false; - } - public static class InternalRecipeObject2 implements RunnableWithInfo { - - final ItemStack mOutput; - final ShapedOreRecipe mRecipe; - final boolean isValid; - - public InternalRecipeObject2(ShapedOreRecipe aRecipe) { - mRecipe = aRecipe; - mOutput = aRecipe.getRecipeOutput(); - if (mOutput != null) { - this.isValid = true; - } - else { - this.isValid = false; - } - } - - @Override - public void run() { - if (this.isValid) { - GameRegistry.addRecipe(mRecipe); - } - else { - Logger.INFO("[Fix] Invalid shapped recipe outputting "+mOutput != null ? mOutput.getDisplayName() : "Bad Output Item"); - } - } - - @Override - public String getInfoData() { - if (mOutput != null && mOutput instanceof ItemStack) { - return ((ItemStack) mOutput).getDisplayName(); - } - return ""; - } - - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java deleted file mode 100644 index 3caa9d4e4f..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.core.util.minecraft; - -import java.util.ArrayList; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.ShapelessRecipes; - -import gtPlusPlus.api.objects.Logger; - -public class ShapelessUtils { - - - public static boolean addShapelessRecipe(final ItemStack output, final Object ... params) - { - final ArrayList arraylist = new ArrayList<>(); - final Object[] aobject = params; - final int i = params.length; - - for (int j = 0; j < i; ++j) - { - final Object object1 = aobject[j]; - - if (object1 instanceof ItemStack) - { - arraylist.add(((ItemStack)object1).copy()); - } - else if (object1 instanceof Item) - { - arraylist.add(new ItemStack((Item)object1)); - } - else - { - if ((object1 == null)) - { - Logger.INFO(("Invalid shapeless input, ignoring!")); - } - else if (!(object1 instanceof Block) && (object1 != null)) - { - Logger.INFO(("Invalid shapeless recipe!")); - return false; - } - else { - arraylist.add(new ItemStack((Block)object1)); - } - } - } - CraftingManager.getInstance().getRecipeList().add(new ShapelessRecipes(output, arraylist)); - //CraftingManager.getInstance().addShapelessRecipe(output, arraylist); - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java deleted file mode 100644 index 2ae2a9f1de..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java +++ /dev/null @@ -1,305 +0,0 @@ -package gtPlusPlus.core.util.minecraft.gregtech; - -import static gtPlusPlus.core.lib.CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.GT_Mod; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; -import gregtech.common.GT_Proxy; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.base.cell.BaseItemCell; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.ItemStack; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.fluids.FluidStack; - -public class PollutionUtils { - - private static boolean mIsPollutionEnabled = true; - - private static Method mAddPollution; - private static Method mAddPollution2; - - private static Method mGetPollution; - private static Method mGetPollution2; - - public static AutoMap mPollutionFluidStacks = new AutoMap(); - - static { - if (MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { - mIsPollutionEnabled = mPollution(); - } else { - mIsPollutionEnabled = false; - } - } - - public static boolean isPollutionEnabled() { - return mIsPollutionEnabled; - } - - public static boolean mPollution() { - try { - GT_Proxy GT_Pollution = GT_Mod.gregtechproxy; - if (GT_Pollution != null) { - Field mPollution = ReflectionUtils.getField(GT_Pollution.getClass(), "mPollution"); - if (mPollution != null) { - return mPollution.getBoolean(GT_Pollution); - } - } - } catch (SecurityException | IllegalArgumentException | IllegalAccessException e) { - } - return false; - } - - public static boolean addPollution(IGregTechTileEntity te, int pollutionValue) { - if (mIsPollutionEnabled) - try { - if (te == null) { - return false; - } - if (mAddPollution != null) { - mAddPollution.invoke(null, te, pollutionValue); - } - Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); - if (GT_Pollution != null) { - Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "addPollution", IGregTechTileEntity.class, int.class); - if (addPollution != null) { - mAddPollution = addPollution; - addPollution.invoke(null, te, pollutionValue); - return true; - } - } - } catch (SecurityException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - } - return false; - } - - public static boolean addPollution(IHasWorldObjectAndCoords aTileOfSomeSort, int pollutionValue) { - if (mIsPollutionEnabled) - try { - if (aTileOfSomeSort == null) { - return false; - } - IHasWorldObjectAndCoords j = (IHasWorldObjectAndCoords) aTileOfSomeSort; - Chunk c = j.getWorld().getChunkFromBlockCoords(j.getXCoord(), j.getZCoord()); - return addPollution(c, pollutionValue); - } catch (SecurityException | IllegalArgumentException e) { - } - return false; - } - - public static boolean addPollution(Chunk aChunk, int pollutionValue) { - if (mIsPollutionEnabled) - try { - if (aChunk == null) { - return false; - } - if (mAddPollution2 != null) { - mAddPollution2.invoke(null, aChunk, pollutionValue); - return true; - } - Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); - if (GT_Pollution != null) { - Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "addPollution", Chunk.class, int.class); - if (addPollution != null) { - mAddPollution2 = addPollution; - mAddPollution2.invoke(null, aChunk, pollutionValue); - return true; - } - } - } catch (SecurityException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - } - return false; - } - - public static boolean removePollution(IGregTechTileEntity te, int pollutionValue) { - return addPollution(te, -pollutionValue); - } - - public static boolean removePollution(IHasWorldObjectAndCoords aTileOfSomeSort, int pollutionValue) { - return addPollution(aTileOfSomeSort, -pollutionValue); - } - - public static boolean removePollution(Chunk aChunk, int pollutionValue) { - return addPollution(aChunk, -pollutionValue); - } - - public static boolean nullifyPollution(IGregTechTileEntity te) { - if (te == null) { - return false; - } - return nullifyPollution((IHasWorldObjectAndCoords) te); - } - - public static boolean nullifyPollution(IHasWorldObjectAndCoords aTileOfSomeSort) { - if (aTileOfSomeSort == null) { - return false; - } - IHasWorldObjectAndCoords j = (IHasWorldObjectAndCoords) aTileOfSomeSort; - Chunk c = j.getWorld().getChunkFromBlockCoords(j.getXCoord(), j.getZCoord()); - return nullifyPollution(c); - } - - public static boolean nullifyPollution(Chunk aChunk) { - try { - if (aChunk == null) { - return false; - } - long getCurrentPollution = getPollution(aChunk); - if (getCurrentPollution <= 0) { - return false; - } - else { - if (mAddPollution2 != null) { - mAddPollution2.invoke(null, aChunk, -getCurrentPollution); - return true; - } - else { - Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); - if (GT_Pollution != null) { - Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "addPollution", Chunk.class, int.class); - if (addPollution != null) { - mAddPollution2 = addPollution; - mAddPollution2.invoke(null, aChunk, 0); - return true; - } - } - } - } - - } catch (SecurityException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - } - return false; - } - - public static int getPollution(IGregTechTileEntity te) { - if (MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) - try { - if (te == null) { - return 0; - } - if (mGetPollution != null) { - mGetPollution.invoke(null, te); - } - Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); - if (GT_Pollution != null) { - Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "getPollution", IGregTechTileEntity.class); - if (addPollution != null) { - mGetPollution = addPollution; - return (int) addPollution.invoke(null, te); - } - } - } catch (SecurityException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - } - return 0; - } - - public static int getPollution(Chunk te) { - if (MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) - try { - if (te == null) { - return 0; - } - if (mGetPollution2 != null) { - mGetPollution2.invoke(null, te); - } - Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); - if (GT_Pollution != null) { - Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "getPollution", Chunk.class); - if (addPollution != null) { - mGetPollution2 = addPollution; - return (int) addPollution.invoke(null, te); - } - } - } catch (SecurityException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - } - return 0; - } - - public static boolean setPollutionFluids() { - if (mPollutionFluidStacks.isEmpty()) { - FluidStack CD, CM, SD; - CD = FluidUtils.getFluidStack("carbondioxide", 1000); - CM = FluidUtils.getFluidStack("carbonmonoxide", 1000); - SD = FluidUtils.getFluidStack("sulfurdioxide", 1000); - if (PollutionUtils.mPollutionFluidStacks.size() == 0) { - if (CD != null) { - Logger.INFO("[PollutionCompat] Found carbon dioxide fluid, registering it."); - PollutionUtils.mPollutionFluidStacks.put(CD); - MISC_MATERIALS.CARBON_DIOXIDE.registerComponentForMaterial(CD); - ItemStack cellCD = ItemUtils.getItemStackOfAmountFromOreDict("cellCarbonDioxide", 1); - if (ItemUtils.checkForInvalidItems(cellCD)) { - Logger.INFO("[PollutionCompat] Found carbon dioxide cell, registering component."); - MISC_MATERIALS.CARBON_DIOXIDE.registerComponentForMaterial(OrePrefixes.cell, cellCD); - } - else { - Logger.INFO("[PollutionCompat] Did not find carbon dioxide cell, registering new component."); - new BaseItemCell(MISC_MATERIALS.CARBON_DIOXIDE); - } - } - else { - MaterialGenerator.generate(MISC_MATERIALS.CARBON_DIOXIDE, false, false); - } - - if (CM != null) { - Logger.INFO("[PollutionCompat] Found carbon monoxide fluid, registering it."); - PollutionUtils.mPollutionFluidStacks.put(CM); - MISC_MATERIALS.CARBON_MONOXIDE.registerComponentForMaterial(CM); - ItemStack cellCD = ItemUtils.getItemStackOfAmountFromOreDict("cellCarbonMonoxide", 1); - if (ItemUtils.checkForInvalidItems(cellCD)) { - Logger.INFO("[PollutionCompat] Found carbon monoxide cell, registering component."); - MISC_MATERIALS.CARBON_MONOXIDE.registerComponentForMaterial(OrePrefixes.cell, cellCD); - } - else { - Logger.INFO("[PollutionCompat] Did not find carbon monoxide cell, registering new component."); - new BaseItemCell(MISC_MATERIALS.CARBON_MONOXIDE); - } - } - else { - MaterialGenerator.generate(MISC_MATERIALS.CARBON_MONOXIDE, false, false); - } - - if (SD != null) { - Logger.INFO("[PollutionCompat] Found sulfur dioxide fluid, registering it."); - PollutionUtils.mPollutionFluidStacks.put(SD); - } - } - if (PollutionUtils.mPollutionFluidStacks.size() > 0) { - return true; - } - return false; - } - else { - if (mPollutionFluidStacks.size() != 3) { - Logger.INFO("Unable to detect all 3 pollution fluids. Found: "); - Logger.INFO(ArrayUtils.toString(mPollutionFluidStacks)); - return false; - } - else { - return true; - } - } - - - - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java deleted file mode 100644 index 44c0f66732..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java +++ /dev/null @@ -1,244 +0,0 @@ -package gtPlusPlus.core.util.minecraft.gregtech.material; - -public class MaterialBuilder { - /*public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; - - private int metaItemSubID; - private TextureSet iconSet; - private float toolSpeed = 1.0f; - private int durability = 0; - private int toolQuality = 0; - private int types = 0; - private int r = 255, g = 255, b = 255, a = 0; - private String name; - private String defaultLocalName; - private int fuelType = 0; - private int fuelPower = 0; - private int meltingPoint = 0; - private int blastFurnaceTemp = 0; - private boolean blastFurnaceRequired = false; - private boolean transparent = false; - private int oreValue = 1; - private int densityMultiplier = 1; - private int densityDivider = 1; - private Dyes color = Dyes._NULL; - private int extraData = 0; - private List materialList = new ArrayList(); - private List aspects = new ArrayList(); - private boolean canBeCracked = false; - private int liquidTemperature = 300; - private int gasTemperature = 300; - - public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String defaultLocalName) { - this.metaItemSubID = metaItemSubID; - this.iconSet = iconSet; - this.name = defaultLocalName.replace(" ", "").replace("-", ""); - this.defaultLocalName = defaultLocalName; - } - - public Materials constructMaterial() { - return new Materials( - metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r, g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp, - blastFurnaceRequired, transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects); - - } - - public MaterialBuilder setName(String name){ - this.name = name; - return this; - } - - public MaterialBuilder setTypes(int types){ - this.types = types; - return this; - } - - public MaterialBuilder addDustItems(){ - types = types | 1; - return this; - } - - public MaterialBuilder addMetalItems(){ - types = types | 2; - return this; - } - - public MaterialBuilder addGemItems(){ - types = types | 4; - return this; - } - - public MaterialBuilder addOreItems(){ - types = types | 8; - return this; - } - - public MaterialBuilder addCell(){ - types = types | 16; - return this; - } - - public MaterialBuilder addPlasma(){ - types = types | 32; - return this; - } - - public MaterialBuilder addToolHeadItems(){ - types = types | 64; - return this; - } - - public MaterialBuilder addGearItems(){ - types = types | 128; - return this; - } - - public MaterialBuilder addFluid(){ - return this; - } - - public MaterialBuilder addGas(){ - return this; - } - - - public MaterialBuilder setRGBA(int r, int g, int b, int a){ - this.r = r; - this.g = g; - this.b = b; - this.a = a; - return this; - } - - public MaterialBuilder setRGB(int r, int g, int b){ - this.r = r; - this.g = g; - this.b = b; - return this; - } - - public MaterialBuilder setTransparent(boolean transparent){ - this.transparent = transparent; - return this; - } - - public MaterialBuilder setColor(Dyes color){ - this.color = color; - return this; - } - - - public MaterialBuilder setToolSpeed(float toolSpeed) { - this.toolSpeed = toolSpeed; - return this; - } - - public MaterialBuilder setDurability(int durability) { - this.durability = durability; - return this; - } - - public MaterialBuilder setToolQuality(int toolQuality) { - this.toolQuality = toolQuality; - return this; - } - - - public MaterialBuilder setFuelType(int fuelType) { - this.fuelType = fuelType; - return this; - } - - public MaterialBuilder setFuelPower(int fuelPower) { - this.fuelPower = fuelPower; - return this; - } - - public MaterialBuilder setMeltingPoint(int meltingPoint) { - this.meltingPoint = meltingPoint; - return this; - } - - public MaterialBuilder setBlastFurnaceTemp(int blastFurnaceTemp) { - this.blastFurnaceTemp = blastFurnaceTemp; - return this; - } - - public MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { - this.blastFurnaceRequired = blastFurnaceRequired; - return this; - } - - public MaterialBuilder setOreValue(int oreValue) { - this.oreValue = oreValue; - return this; - } - - public MaterialBuilder setDensityMultiplier(int densityMultiplier) { - this.densityMultiplier = densityMultiplier; - return this; - } - - public MaterialBuilder setDensityDivider(int densityDivider) { - this.densityDivider = densityDivider; - return this; - } - - public MaterialBuilder setExtraData(int extraData) { - this.extraData = extraData; - return this; - } - - public MaterialBuilder addElectrolyzerRecipe(){ - extraData = extraData | 1; - return this; - } - - public MaterialBuilder addCentrifugeRecipe(){ - extraData = extraData | 2; - return this; - } - - public MaterialBuilder setMaterialList(List materialList) { - this.materialList = materialList; - return this; - } - - public MaterialBuilder setMaterialList(MaterialStack ... materials) { - this.materialList = Arrays.asList(materials); - return this; - } - - public MaterialBuilder setAspects(List aspects) { - this.aspects = aspects; - return this; - } - - public int getLiquidTemperature() { - return liquidTemperature; - } - - public MaterialBuilder setLiquidTemperature(int liquidTemperature) { - this.liquidTemperature = liquidTemperature; - return this; - } - - public int getGasTemperature() { - return gasTemperature; - } - - public MaterialBuilder setGasTemperature(int gasTemperature) { - this.gasTemperature = gasTemperature; - return this; - } - - public boolean canBeCracked() { - return canBeCracked; - } - - public MaterialBuilder setCanBeCracked(boolean canBeCracked) { - this.canBeCracked = canBeCracked; - return this; - } -*/ -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java deleted file mode 100644 index 635239bbfc..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java +++ /dev/null @@ -1,3 +0,0 @@ -package gtPlusPlus.core.util.minecraft.gregtech.recipehandlers; - -public final class GregtechRecipe {} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java b/src/Java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java deleted file mode 100644 index def836eac9..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.util.minecraft.network; - -import cpw.mods.fml.common.network.internal.FMLProxyPacket; -import io.netty.buffer.Unpooled; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import mods.railcraft.common.util.misc.Game; - -public abstract class CustomPacket { - public static final String CHANNEL_NAME = "GTPP"; - - public enum PacketType { - TILE_ENTITY, - } - - public FMLProxyPacket getPacket() { - ByteArrayOutputStream bytes = new ByteArrayOutputStream(); - DataOutputStream data = new DataOutputStream(bytes); - try { - data.writeByte(this.getID()); - this.writeData(data); - } catch (IOException var4) { - Game.logThrowable("Error constructing packet: {0}", var4, new Object[]{this.getClass()}); - } - return new FMLProxyPacket(Unpooled.wrappedBuffer(bytes.toByteArray()), "GTPP"); - } - - public abstract void writeData(DataOutputStream var1) throws IOException; - - public abstract void readData(DataInputStream var1) throws IOException; - - public abstract int getID(); - - public String toString() { - return this.getClass().getSimpleName(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java b/src/Java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java deleted file mode 100644 index edbc6aaf83..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.core.util.minecraft.network; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.world.WorldServer; - -public class PacketBuilder { - - private static PacketBuilder instance; - - public static PacketBuilder instance() { - if (instance == null) { - instance = new PacketBuilder(); - } - return instance; - } - - public void sendTileEntityPacket(IGregTechTileEntity tile) { - if (tile.getWorld() instanceof WorldServer) { - WorldServer world = (WorldServer) tile.getWorld(); - PacketTileEntity pkt = new PacketTileEntity(tile); - PacketDispatcher.sendToWatchers(pkt, world, tile.getXCoord(), tile.getZCoord()); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java b/src/Java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java deleted file mode 100644 index f61a6f2b6c..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.core.util.minecraft.network; - -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import cpw.mods.fml.relauncher.ReflectionHelper; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.preloader.DevHelper; - -import java.lang.reflect.Method; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.Packet; -import net.minecraft.server.management.PlayerManager; -import net.minecraft.world.WorldServer; - -@SuppressWarnings("unchecked") -public class PacketDispatcher { - private static final Class playerInstanceClass; - private static final Method getOrCreateChunkWatcher; - private static final Method sendToAllPlayersWatchingChunk; - - public static void sendToServer(CustomPacket packet) { - PacketHandler.INSTANCE.channel.sendToServer(packet.getPacket()); - } - - public static void sendToPlayer(CustomPacket packet, EntityPlayerMP player) { - PacketHandler.INSTANCE.channel.sendTo(packet.getPacket(), player); - } - - public static void sendToAll(CustomPacket packet) { - PacketHandler.INSTANCE.channel.sendToAll(packet.getPacket()); - } - - public static void sendToAllAround(CustomPacket packet, TargetPoint zone) { - PacketHandler.INSTANCE.channel.sendToAllAround(packet.getPacket(), zone); - } - - public static void sendToDimension(CustomPacket packet, int dimensionId) { - PacketHandler.INSTANCE.channel.sendToDimension(packet.getPacket(), dimensionId); - } - - public static void sendToWatchers(CustomPacket packet, WorldServer world, int worldX, int worldZ) { - try { - Object playerInstance = getOrCreateChunkWatcher.invoke(world.getPlayerManager(), worldX >> 4, worldZ >> 4, - false); - if (playerInstance != null) { - sendToAllPlayersWatchingChunk.invoke(playerInstance, packet.getPacket()); - } - - } catch (Exception var5) { - Logger.ERROR("Reflection Failure in PacketDispatcher.sendToWatchers() {0} {1}" + 20 + var5 + - new Object[]{getOrCreateChunkWatcher.getName() + sendToAllPlayersWatchingChunk.getName()}); - throw new RuntimeException(var5); - } - } - - static { - try { - playerInstanceClass = PlayerManager.class.getDeclaredClasses()[0]; - - Method a, b; - - try { - a = DevHelper.getForgeMethod(PlayerManager.class, "getOrCreateChunkWatcher", int.class, int.class, boolean.class); - } - catch (Throwable t) { - a = ReflectionHelper.findMethod(playerInstanceClass, (Object) null, - new String[]{"func_72690_a", "getOrCreateChunkWatcher"}, - new Class[]{Integer.TYPE, Integer.TYPE, Boolean.TYPE}); - } - try { - b = DevHelper.getForgeMethod(PlayerManager.class, "sendToAllPlayersWatchingChunk", Packet.class); - } - catch (Throwable t) { - b = ReflectionHelper.findMethod(playerInstanceClass, (Object) null, - new String[]{"func_151251_a", "sendToAllPlayersWatchingChunk"}, - new Class[]{Packet.class}); - } - - - getOrCreateChunkWatcher = a; - sendToAllPlayersWatchingChunk = b; - getOrCreateChunkWatcher.setAccessible(true); - sendToAllPlayersWatchingChunk.setAccessible(true); - } catch (Exception var1) { - Logger.ERROR("Reflection Failure in PacketDispatcher initalization {0} {1}" + var1); - throw new RuntimeException(var1); - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java b/src/Java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java deleted file mode 100644 index 158f9f9483..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.core.util.minecraft.network; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.network.FMLEventChannel; -import cpw.mods.fml.common.network.NetworkRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.network.CustomPacket.PacketType; -import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent; -import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent; -import java.io.ByteArrayInputStream; -import java.io.DataInputStream; -import java.io.IOException; -import java.util.Arrays; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.NetHandlerPlayServer; - -public class PacketHandler { - public static final PacketHandler INSTANCE = new PacketHandler(); - private static final PacketType[] packetTypes = PacketType.values(); - final FMLEventChannel channel; - - private PacketHandler() { - this.channel = NetworkRegistry.INSTANCE.newEventDrivenChannel("GTPP"); - this.channel.register(this); - } - - public static void init() { - } - - @SubscribeEvent - public void onPacket(ServerCustomPacketEvent event) { - byte[] data = new byte[event.packet.payload().readableBytes()]; - event.packet.payload().readBytes(data); - this.onPacketData(data, ((NetHandlerPlayServer) event.handler).playerEntity); - } - - @SubscribeEvent - public void onPacket(ClientCustomPacketEvent event) { - byte[] data = new byte[event.packet.payload().readableBytes()]; - event.packet.payload().readBytes(data); - this.onPacketData(data, (EntityPlayerMP) null); - } - - public void onPacketData(byte[] bData, EntityPlayerMP player) { - DataInputStream data = new DataInputStream(new ByteArrayInputStream(bData)); - - try { - byte packetID = data.readByte(); - if (packetID < 0) { - return; - } - PacketType type = packetTypes[packetID]; - Object pkt; - - switch(type.ordinal()) { - case 0: - pkt = new PacketTileEntity(); - break; - default: - return; - } - - if (pkt != null) { - ((CustomPacket)pkt).readData(data); - } - } catch (IOException var7) { - Logger.ERROR("Exception in PacketHandler.onPacketData: {0}"+ var7 + new Object[]{Arrays.toString(bData)}); - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java b/src/Java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java deleted file mode 100644 index d59bee3c27..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java +++ /dev/null @@ -1,79 +0,0 @@ -package gtPlusPlus.core.util.minecraft.network; - -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.api.interfaces.IGregtechPacketEntity; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import mods.railcraft.common.util.misc.Game; -import net.minecraft.client.Minecraft; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class PacketTileEntity extends CustomPacket { - private IGregTechTileEntity tile; - private IGregtechPacketEntity ptile; - - public PacketTileEntity() { - } - - public PacketTileEntity(IGregTechTileEntity tile) { - this.tile = tile; - if (tile instanceof IGregtechPacketEntity) { - ptile = (IGregtechPacketEntity) tile; - } - } - - public void writeData(DataOutputStream data) throws IOException { - if (ptile != null) { - data.writeInt(this.tile.getXCoord()); - data.writeInt(this.tile.getYCoord()); - data.writeInt(this.tile.getZCoord()); - data.writeShort(this.tile.getMetaTileID()); - this.ptile.writePacketData(data); - } - } - - @SideOnly(Side.CLIENT) - public void readData(DataInputStream data) throws IOException { - Minecraft mc = FMLClientHandler.instance().getClient(); - World world = mc != null ? mc.theWorld : null; - if (world != null) { - int x = data.readInt(); - int y = data.readInt(); - int z = data.readInt(); - short id = data.readShort(); - if (id >= 0 && y >= 0 && world.blockExists(x, y, z)) { - TileEntity te = world.getTileEntity(x, y, z); - if (te instanceof IGregTechTileEntity) { - this.tile = (IGregTechTileEntity) te; - if (this.tile.getMetaTileID() != id) { - this.tile = null; - } - } else { - this.tile = null; - } - if (this.tile != null) { - if (tile instanceof IGregtechPacketEntity) { - ptile = (IGregtechPacketEntity) tile; - try { - this.ptile.readPacketData(data); - } catch (IOException var10) { - throw var10; - } catch (RuntimeException var11) { - Game.logThrowable("Exception in PacketTileEntity.readData:", var11, new Object[0]); - } - } - } - } - } - } - - public int getID() { - return 0; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java b/src/Java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java deleted file mode 100644 index 9046a57120..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.core.util.minecraft.particles; - -import net.minecraft.block.Block; -import net.minecraft.world.World; - -import gtPlusPlus.xmod.forestry.HANDLER_FR; - -public class BlockBreakParticles { - - public BlockBreakParticles(final World world, final int x, final int y, final int z, final Block block){ - try { - HANDLER_FR.createBlockBreakParticles(world, x, y, z, block); - } catch (final Throwable T){ - - } - } - -} diff --git a/src/Java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java b/src/Java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java deleted file mode 100644 index d996cf705a..0000000000 --- a/src/Java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java +++ /dev/null @@ -1,17 +0,0 @@ -package gtPlusPlus.core.util.minecraft.particles; - -import net.minecraft.client.particle.EntityAuraFX; -import net.minecraft.world.World; - -public class EntityParticleFXMysterious extends EntityAuraFX -{ - public EntityParticleFXMysterious(final World parWorld, - final double parX, final double parY, final double parZ, - final double parMotionX, final double parMotionY, final double parMotionZ) - { - super(parWorld, parX, parY, parZ, parMotionX, parMotionY, parMotionZ); - this.setParticleTextureIndex(82); // same as happy villager - this.particleScale = 2.0F; - this.setRBGColorF(0x88, 0x00, 0x88); - } -} diff --git a/src/Java/gtPlusPlus/core/util/player/PlayerCache.java b/src/Java/gtPlusPlus/core/util/player/PlayerCache.java deleted file mode 100644 index 753124dcd7..0000000000 --- a/src/Java/gtPlusPlus/core/util/player/PlayerCache.java +++ /dev/null @@ -1,160 +0,0 @@ -package gtPlusPlus.core.util.player; - -import java.io.*; -import java.util.*; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.server.MinecraftServer; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - -public class PlayerCache { - - private static final File cache = new File("PlayerCache.dat"); - - public static final void initCache() { - if (CORE.PlayerCache == null){ - try { - - if (cache != null){ - CORE.PlayerCache = PlayerCache.readPropertiesFileAsMap(); - Logger.INFO("Loaded PlayerCache.dat"); - } - - - } catch (final Exception e) { - Logger.INFO("Failed to initialise PlayerCache.dat"); - PlayerCache.createPropertiesFile("PLAYER_", "DATA"); - //e.printStackTrace(); - } - } - } - - public static void createPropertiesFile(final String playerName, final String playerUUIDasString) { - try { - final Properties props = new Properties(); - props.setProperty(playerName+" ", playerUUIDasString); - final OutputStream out = new FileOutputStream(cache); - props.store(out, "Player Cache."); - Logger.INFO("PlayerCache.dat created for future use."); - out.close(); - } - catch (final Exception e ) { - e.printStackTrace(); - } - } - - public static void appendParamChanges(final String playerName, final String playerUUIDasString) { - final HashMap playerInfo = new HashMap<>(); - playerInfo.put(playerName, UUID.fromString(playerUUIDasString)); - - /*try { - Utils.LOG_INFO("Attempting to load "+cache.getName()); - properties.load(new FileInputStream(cache)); - if (properties == null || properties.equals(null)){ - Utils.LOG_INFO("Please wait."); - } - else { - Utils.LOG_INFO("Loaded PlayerCache.dat"); - properties.setProperty(playerName+"_", playerUUIDasString); - FileOutputStream fr=new FileOutputStream(cache); - properties.store(fr, "Player Cache."); - fr.close(); - } - - } */ - - try - { - final FileOutputStream fos = new FileOutputStream("PlayerCache.dat"); - final ObjectOutputStream oos = new ObjectOutputStream(fos); - oos.writeObject(playerInfo); - oos.close(); - fos.close(); - Logger.INFO("Serialized Player data saved in PlayerCache.dat"); - } - - catch (final IOException e) { - Logger.INFO("No PlayerCache file found, creating one."); - createPropertiesFile(playerName, playerUUIDasString); - } - } - - /** - * Reads a "properties" file, and returns it as a Map - * (a collection of key/value pairs). - * - * Credit due to Alvin Alexander - http://alvinalexander.com/java/java-properties-file-map-example?nocache=1#comment-8215 - * Changed slightly as the filename and delimiter are constant in my case. - * - * @param filename The properties filename to read. - * @param delimiter The string (or character) that separates the key - * from the value in the properties file. - * @return The Map that contains the key/value pairs. - * @throws Exception - */ - @Deprecated - public static Map readPropertiesFileAsMapOld() throws Exception { - final String delimiter = "="; - @SuppressWarnings({ "rawtypes", "unchecked" }) - final - Map map = new HashMap<>(); - final BufferedReader reader = new BufferedReader(new FileReader(cache)); - String line; - while ((line = reader.readLine()) != null) - { - if (line.trim().length()==0) { - continue; - } - if (line.charAt(0)=='#') { - continue; - } - // assumption here is that proper lines are like "String : http://xxx.yyy.zzz/foo/bar", - // and the ":" is the delimiter - final int delimPosition = line.indexOf(delimiter); - final String key = line.substring(0, delimPosition-1).trim(); - final String value = line.substring(delimPosition+1).trim(); - map.put(key, value); - } - reader.close(); - CORE.PlayerCache = map; - return map; - } - - public static HashMap readPropertiesFileAsMap() { - HashMap map = null; - try - { - final FileInputStream fis = new FileInputStream(cache); - final ObjectInputStream ois = new ObjectInputStream(fis); - map = (HashMap) ois.readObject(); - ois.close(); - fis.close(); - }catch(final IOException ioe) - { - ioe.printStackTrace(); - return null; - }catch(final ClassNotFoundException c) - { - Logger.INFO("Class not found"); - c.printStackTrace(); - return null; - } - Logger.WARNING("Deserialized PlayerCache.."); - return map; - } - - public static String lookupPlayerByUUID(final UUID UUID){ - if (UUID == null) { - return null; - } - final List allPlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList; - for (final EntityPlayerMP player : allPlayers) { - if (player.getUniqueID().equals(UUID)) { - return player.getDisplayName(); - } - } - return "Offline Player."; - } -} diff --git a/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java b/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java deleted file mode 100644 index fc8e84cb61..0000000000 --- a/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java +++ /dev/null @@ -1,291 +0,0 @@ -package gtPlusPlus.core.util.reflect; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.internal.IGT_RecipeAdder; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public final class AddGregtechRecipe { - - - public static boolean importPyroRecipe(GT_Recipe aRecipe) { - - int aModifiedTime = (int) (aRecipe.mDuration * 0.8); - - if (aRecipe.mInputs == null || aRecipe.mFluidInputs == null || aRecipe.mFluidOutputs == null || aRecipe.mOutputs == null) { - return false; - } - if (aRecipe.mInputs.length > 2 || aRecipe.mFluidInputs.length > 1 || aRecipe.mFluidOutputs.length > 1 || aRecipe.mOutputs.length > 9) { - return false; - } - else if (aRecipe.mInputs.length <= 0) { - return false; - } - - int aCircuitNumber = -1; - Item aCircuit = CI.getNumberedCircuit(1).getItem(); - boolean hasCircuit = false; - - for (ItemStack a : aRecipe.mInputs) { - if (a != null && a.getItem() == aCircuit) { - hasCircuit = true; - aCircuitNumber = a.getItemDamage(); - break; - } - } - - ItemStack aInputItem = null; - if (!hasCircuit || aCircuitNumber < 1) { - return false; - } - - for (ItemStack a : aRecipe.mInputs) { - if (a != null && a.getItem() != aCircuit) { - aInputItem = a; - break; - } - } - - return CORE.RA.addCokeOvenRecipe( - aCircuitNumber, - aInputItem, - aRecipe.mFluidInputs, - aRecipe.mFluidOutputs, - aRecipe.mOutputs, - aModifiedTime, - aRecipe.mEUt); - - } - - - public static boolean addCokeAndPyrolyseRecipes( - ItemStack input1, int circuitNumber, - FluidStack inputFluid1, - ItemStack output1, - FluidStack outputFluid1, - int timeInSeconds, - int euTick - ){ - //Seconds Conversion - int TIME = timeInSeconds*20; - int TIMEPYRO = TIME+(TIME/5); - CORE.RA.addCokeOvenRecipe( - input1, - ItemUtils.getGregtechCircuit(circuitNumber), - inputFluid1, - outputFluid1, - output1, - TIME, - euTick); - PyrolyseOven( - input1, - inputFluid1, - circuitNumber, - output1, - outputFluid1, - TIMEPYRO, - euTick); - - - return false; - } - - - - - public static boolean PyrolyseOven(final ItemStack p0, final FluidStack p1, final int p2, final ItemStack p3, - final FluidStack p4, final int p5, final int p6){ - - try { - IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; - if (IGT_RecipeAdder != null){ - Class classRA = IGT_RecipeAdder.getClass(); - Method addRecipe = classRA.getMethod("addPyrolyseRecipe", ItemStack.class, FluidStack.class, int.class, ItemStack.class, FluidStack.class, int.class, int.class); - if (addRecipe != null){ - return (boolean) addRecipe.invoke(IGT_RecipeAdder, p0, p1, p2, p3, p4, p5, p6); - } - } - } - catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - return false; - } - - - - public static boolean addAssemblylineRecipe( - ItemStack aResearchItem, - int aResearchTime, - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack aOutput, - int aDuration, int aEUt){ - /* - try { - IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; - if (IGT_RecipeAdder != null){ - Class classRA = IGT_RecipeAdder.getClass(); - - for(Method current : classRA.getDeclaredMethods()){ - //Utils.LOG_INFO("-----------------------------------------------"); - ////Utils.LOG_INFO("Found method: "+current.getName()); - //Utils.LOG_INFO("With Parameters: "); - //Utils.LOG_INFO("==============================================="); - for (Class P : current.getParameterTypes()){ - //Utils.LOG_INFO(""+P.getName()); - //Utils.LOG_INFO(""+P.getClass().getName()); - } - //Utils.LOG_INFO("==============================================="); - } - - try { - Method testRA = GT_Values.RA.getClass().getMethod("addAssemblylineRecipe", GT_Values.RA.getClass(), aResearchItem.getClass(), int.class, aInputs.getClass(), aFluidInputs.getClass(), aOutput.getClass(), int.class, int.class); - testRA.invoke(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); - } - catch (Throwable masndj){ - masndj.printStackTrace(); - } - - - Method addRecipe = classRA.getDeclaredMethod( - "addAssemblylineRecipe", - ItemStack.class, - int.class, - ItemStack.class, - FluidStack.class, - ItemStack.class, - int.class, - int.class); - if (addRecipe != null){ - return (boolean) addRecipe.invoke(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); - } - } - } - catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Utils.LOG_INFO("[Assembly Line] - Failed to add recipe, due to GT not being .09 branch. Research: "+aResearchItem.getDisplayName()+" | Result: "+aOutput.getDisplayName()); - e.printStackTrace(); - return false; - } - Utils.LOG_INFO("[Assembly Line] - Failed to add recipe. Research: "+aResearchItem.getDisplayName()+" | Result: "+aOutput.getDisplayName()); - */return false; - } - - public static boolean addCircuitAssemblerRecipe( - ItemStack[] aInputs, - FluidStack aFluidInput, - ItemStack aOutput, - int aDuration, - int aEUt) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - try { - IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; - if (IGT_RecipeAdder != null){ - Class classRA = IGT_RecipeAdder.getClass(); - Method addRecipe = classRA.getMethod( - "addCircuitAssemblerRecipe", - ItemStack.class, - FluidStack.class, - ItemStack.class, - int.class, - int.class); - if (addRecipe != null){ - if (aFluidInput.isFluidEqual(FluidUtils.getFluidStack("molten.tin", 1))){ - boolean[] didAdd = new boolean[3]; - FluidStack moltenMetal = FluidUtils.getFluidStack("molten.tin", 144); - //Tin - didAdd[0] = (boolean) addRecipe.invoke( - IGT_RecipeAdder, - aInputs, - moltenMetal, - aOutput, - aDuration, - aEUt); - moltenMetal = FluidUtils.getFluidStack("molten.lead", 144); - //Lead - didAdd[1] = (boolean) addRecipe.invoke( - IGT_RecipeAdder, - aInputs, - moltenMetal, - aOutput, - aDuration, - aEUt); - moltenMetal = FluidUtils.getFluidStack("molten.solderingalloy", 144/2); - //Soldering Alloy - didAdd[2] = (boolean) addRecipe.invoke( - IGT_RecipeAdder, - aInputs, - moltenMetal, - aOutput, - aDuration, - aEUt); - - if (didAdd[0] && didAdd[1] && didAdd[2]){ - return true; - } - else { - return false; - } - } - else { - return (boolean) addRecipe.invoke( - IGT_RecipeAdder, - aInputs, - aFluidInput, - aOutput, - aDuration, - aEUt); - } - } - } - } - catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - return false; - } - - - public static boolean addChemicalRecipeForBasicMachineOnly(final ItemStack p0, final ItemStack p1, final FluidStack p2, final FluidStack p3, final ItemStack p4, final ItemStack p5, final int p6, final int p7){ - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - try { - IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; - if (IGT_RecipeAdder != null){ - Class classRA = IGT_RecipeAdder.getClass(); - //final ItemStack p0, final ItemStack p1, final FluidStack p2, final FluidStack p3, final ItemStack p4, final ItemStack p5, final int p6, final int p7 - Method addRecipe = classRA.getMethod("addChemicalRecipeForBasicMachineOnly", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class, int.class); - if (addRecipe != null){ - return (boolean) addRecipe.invoke(IGT_RecipeAdder, p0, p1, p2, p3, p4, p5, p6, p7); - } - } - } - catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - - } - } - - return GT_Values.RA.addChemicalRecipe( - p0, - p1, - p2, - p3, - p4, - p6); - - } - - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java b/src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java deleted file mode 100644 index aaa9b2fae7..0000000000 --- a/src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.core.util.reflect; - -import java.lang.reflect.Field; - -import cpw.mods.fml.common.SidedProxy; - -public class ProxyFinder { - - public static Object getServerProxy(final Object modInstance) throws ReflectiveOperationException { - for(final Field field : modInstance.getClass().getDeclaredFields()) { - if(field.isAnnotationPresent(SidedProxy.class)) { - final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); - final Object fieldValue = field.get(modInstance); - try { - final Class serverSideClass = ReflectionUtils.getClass(sidedProxy.serverSide()); - if(serverSideClass.isAssignableFrom(fieldValue.getClass())) { - final Object serverProxy = serverSideClass.cast(fieldValue); - //do what you want with server proxy instance - return serverProxy; - } - - } catch (final NoClassDefFoundError err) { - //its client side - return null; - } - break; - } - } - return null; - } - - public static Object getClientProxy(final Object modInstance) throws ReflectiveOperationException { - for(final Field field : modInstance.getClass().getDeclaredFields()) { - if(field.isAnnotationPresent(SidedProxy.class)) { - final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); - final Object fieldValue = field.get(modInstance); - try { - final Class clientSideClass = ReflectionUtils.getClass(sidedProxy.clientSide()); - if(clientSideClass.isAssignableFrom(fieldValue.getClass())) { - final Object clientProxy = clientSideClass.cast(fieldValue); - //do what you want with client proxy instance - return clientProxy; - } - - } catch (final NoClassDefFoundError err) { - //its server side - return null; - } - break; - } - } - return null; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java deleted file mode 100644 index 1ef925f793..0000000000 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ /dev/null @@ -1,1090 +0,0 @@ -package gtPlusPlus.core.util.reflect; - -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.GenericDeclaration; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.lang.reflect.TypeVariable; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang3.ArrayUtils; - -import com.google.common.reflect.ClassPath; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; - -public class ReflectionUtils { - - public static Map> mCachedClasses = new LinkedHashMap>(); - public static Map mCachedMethods = new LinkedHashMap(); - public static Map mCachedFields = new LinkedHashMap(); - public static Map mCachedConstructors = new LinkedHashMap(); - - private static class CachedConstructor { - - private final Constructor METHOD; - - public CachedConstructor(Constructor aCons) { - METHOD = aCons; - } - - public Constructor get() { - return METHOD; - } - - } - - private static class CachedMethod { - - private final boolean STATIC; - private final Method METHOD; - - public CachedMethod(Method aMethod, boolean isStatic) { - METHOD = aMethod; - STATIC = isStatic; - } - - public Method get() { - return METHOD; - } - - public boolean type() { - return STATIC; - } - - } - - private static class CachedField { - - private final boolean STATIC; - private final Field FIELD; - - public CachedField(Field aField, boolean isStatic) { - FIELD = aField; - STATIC = isStatic; - } - - public Field get() { - return FIELD; - } - - public boolean type() { - return STATIC; - } - - } - - private static boolean cacheClass(Class aClass) { - if (aClass == null) { - return false; - } - Class y = mCachedClasses.get(aClass.getCanonicalName()); - if (y == null) { - mCachedClasses.put(aClass.getCanonicalName(), aClass); - return true; - } - return false; - } - - private static boolean cacheMethod(Class aClass, Method aMethod) { - if (aMethod == null) { - return false; - } - boolean isStatic = Modifier.isStatic(aMethod.getModifiers()); - CachedMethod y = mCachedMethods.get(aClass.getName()+"."+aMethod.getName()+"."+ArrayUtils.toString(aMethod.getParameterTypes())); - if (y == null) { - mCachedMethods.put(aClass.getName()+"."+aMethod.getName()+"."+ArrayUtils.toString(aMethod.getParameterTypes()), new CachedMethod(aMethod, isStatic)); - return true; - } - return false; - } - - private static boolean cacheField(Class aClass, Field aField) { - if (aField == null) { - return false; - } - boolean isStatic = Modifier.isStatic(aField.getModifiers()); - CachedField y = mCachedFields.get(aClass.getName()+"."+aField.getName()); - if (y == null) { - mCachedFields.put(aClass.getName()+"."+aField.getName(), new CachedField(aField, isStatic)); - return true; - } - return false; - } - - private static boolean cacheConstructor(Class aClass, Constructor aConstructor) { - if (aConstructor == null) { - return false; - } - CachedConstructor y = mCachedConstructors.get(aClass.getName()+"."+ArrayUtils.toString(aConstructor.getParameterTypes())); - if (y == null) { - mCachedConstructors.put(aClass.getName()+"."+ArrayUtils.toString(aConstructor.getParameterTypes()), new CachedConstructor(aConstructor)); - return true; - } - return false; - } - - - /** - * Returns a cached {@link Constructor} object. - * @param aClass - Class containing the Constructor. - * @param aTypes - Varags Class Types for objects constructor. - * @return - Valid, non-final, {@link Method} object, or {@link null}. - */ - public static Constructor getConstructor(Class aClass, Class... aTypes) { - if (aClass == null || aTypes == null) { - return null; - } - - String aMethodKey = ArrayUtils.toString(aTypes); - //Logger.REFLECTION("Looking up method in cache: "+(aClass.getName()+"."+aMethodName + "." + aMethodKey)); - CachedConstructor y = mCachedConstructors.get(aClass.getName() + "." + aMethodKey); - if (y == null) { - Constructor u = getConstructor_Internal(aClass, aTypes); - if (u != null) { - Logger.REFLECTION("Caching Constructor: "+aClass.getName() + "." + aMethodKey); - cacheConstructor(aClass, u); - return u; - } else { - return null; - } - } else { - return y.get(); - } - } - - - - - /** - * Returns a cached {@link Class} object. - * @param aClassCanonicalName - The canonical name of the underlying class. - * @return - Valid, {@link Class} object, or {@link null}. - */ - public static Class getClass(String aClassCanonicalName) { - if (aClassCanonicalName == null || aClassCanonicalName.length() <= 0) { - return null; - } - Class y = mCachedClasses.get(aClassCanonicalName); - if (y == null) { - y = getClass_Internal(aClassCanonicalName); - if (y != null) { - Logger.REFLECTION("Caching Class: "+aClassCanonicalName); - cacheClass(y); - } - } - return y; - } - - - - /** - * Returns a cached {@link Method} object. Wraps {@link #getMethod(Class, String, Class...)}. - * @param aObject - Object containing the Method. - * @param aMethodName - Method's name in {@link String} form. - * @param aTypes - Class Array of Types for {@link Method}'s constructor. - * @return - Valid, non-final, {@link Method} object, or {@link null}. - */ - public static Method getMethod(Object aObject, String aMethodName, Class[] aTypes) { - return getMethod(aObject.getClass(), aMethodName, aTypes); - } - - - /** - * Returns a cached {@link Method} object. - * @param aClass - Class containing the Method. - * @param aMethodName - Method's name in {@link String} form. - * @param aTypes - Varags Class Types for {@link Method}'s constructor. - * @return - Valid, non-final, {@link Method} object, or {@link null}. - */ - public static Method getMethod(Class aClass, String aMethodName, Class... aTypes) { - if (aClass == null || aMethodName == null || aMethodName.length() <= 0) { - return null; - } - String aMethodKey = ArrayUtils.toString(aTypes); - //Logger.REFLECTION("Looking up method in cache: "+(aClass.getName()+"."+aMethodName + "." + aMethodKey)); - CachedMethod y = mCachedMethods.get(aClass.getName()+"."+aMethodName + "." + aMethodKey); - if (y == null) { - Method u = getMethod_Internal(aClass, aMethodName, aTypes); - if (u != null) { - Logger.REFLECTION("Caching Method: "+aMethodName + "." + aMethodKey); - cacheMethod(aClass, u); - return u; - } else { - return null; - } - } else { - return y.get(); - } - } - - public static boolean isStaticMethod(Class aClass, String aMethodName, Class... aTypes) { - return isStaticMethod(ReflectionUtils.getMethod(aClass, aMethodName, aTypes)); - } - - public static boolean isStaticMethod(Method aMethod) { - if (aMethod != null && Modifier.isStatic(aMethod.getModifiers())) { - return true; - } - return false; - } - - - - /** - * Returns a cached {@link Field} object. - * @param aClass - Class containing the Method. - * @param aFieldName - Field name in {@link String} form. - * @return - Valid, non-final, {@link Field} object, or {@link null}. - */ - public static Field getField(final Class aClass, final String aFieldName) { - if (aClass == null || aFieldName == null || aFieldName.length() <= 0) { - return null; - } - CachedField y = mCachedFields.get(aClass.getName()+"."+aFieldName); - if (y == null) { - Field u; - try { - u = getField_Internal(aClass, aFieldName); - if (u != null) { - Logger.REFLECTION("Caching Field '"+aFieldName+"' from "+aClass.getName()); - cacheField(aClass, u); - return u; - } - } catch (NoSuchFieldException e) { - } - return null; - - } else { - return y.get(); - } - } - - /** - * Returns a cached {@link Field} object. - * @param aInstance - {@link Object} to get the field instance from. - * @param aFieldName - Field name in {@link String} form. - * @return - Valid, non-final, {@link Field} object, or {@link null}. - */ - public static T getField(final Object aInstance, final String aFieldName) { - try { - return (T) getField(aInstance.getClass(), aFieldName).get(aInstance); - } catch (IllegalArgumentException | IllegalAccessException e) { - return null; - } - } - - - - - /* - * Utility Functions - */ - - public static boolean doesClassExist(final String classname) { - return isClassPresent(classname); - } - - - /** - * Returns the class of the objects type parameter - * @param o - Object to examine paramters on - * @return - a Class or null - */ - public static Class getTypeOfGenericObject(Object o) { - Class aTypeParam = findSuperClassParameterType(o, o.getClass(), 0); - if (aTypeParam == null) { - aTypeParam = findSubClassParameterType(o, o.getClass(), 0); - } - return aTypeParam; - } - - public static void makeFieldAccessible(final Field field) { - if (!Modifier.isPublic(field.getModifiers()) || - !Modifier.isPublic(field.getDeclaringClass().getModifiers())) - { - field.setAccessible(true); - } - } - - public static void makeMethodAccessible(final Method field) { - if (!Modifier.isPublic(field.getModifiers()) || - !Modifier.isPublic(field.getDeclaringClass().getModifiers())) - { - field.setAccessible(true); - } - } - - /** - * Get the method name for a depth in call stack.
- * Utility function - * @param depth depth in the call stack (0 means current method, 1 means call method, ...) - * @return Method name - */ - public static String getMethodName(final int depth) { - final StackTraceElement[] ste = new Throwable().getStackTrace(); - //System. out.println(ste[ste.length-depth].getClassName()+"#"+ste[ste.length-depth].getMethodName()); - return ste[depth+1].getMethodName(); - } - - - /** - * - * @param aPackageName - The full {@link Package} name in {@link String} form. - * @return - {@link Boolean} object. True if loaded > 0 classes. - */ - public static boolean dynamicallyLoadClassesInPackage(String aPackageName) { - ClassLoader classLoader = ReflectionUtils.class.getClassLoader(); - int loaded = 0; - try { - ClassPath path = ClassPath.from(classLoader); - for (ClassPath.ClassInfo info : path.getTopLevelClassesRecursive(aPackageName)) { - Class clazz = Class.forName(info.getName(), true, classLoader); - if (clazz != null) { - loaded++; - Logger.INFO("Found "+clazz.getCanonicalName()+". ["+loaded+"]"); - } - } - } catch (ClassNotFoundException | IOException e) { - - } - - return loaded > 0; - } - - - - public static boolean setField(final Object object, final String fieldName, final Object fieldValue) { - Class clazz; - if (object instanceof Class) { - clazz = (Class) object; - } - else { - clazz = object.getClass(); - } - while (clazz != null) { - try { - final Field field = getField(clazz, fieldName); - if (field != null) { - setFieldValue_Internal(object, field, fieldValue); - return true; - } - } catch (final NoSuchFieldException e) { - Logger.REFLECTION("setField("+object.toString()+", "+fieldName+") failed."); - clazz = clazz.getSuperclass(); - } catch (final Exception e) { - Logger.REFLECTION("setField("+object.toString()+", "+fieldName+") failed."); - throw new IllegalStateException(e); - } - } - return false; - - - } - - public static boolean setField(final Object object, final Field field, final Object fieldValue) { - Class clazz; - if (object instanceof Class) { - clazz = (Class) object; - } - else { - clazz = object.getClass(); - } - while (clazz != null) { - try { - final Field field2 = getField(clazz, field.getName()); - if (field2 != null) { - setFieldValue_Internal(object, field, fieldValue); - return true; - } - } catch (final NoSuchFieldException e) { - Logger.REFLECTION("setField("+object.toString()+", "+field.getName()+") failed."); - clazz = clazz.getSuperclass(); - } catch (final Exception e) { - Logger.REFLECTION("setField("+object.toString()+", "+field.getName()+") failed."); - throw new IllegalStateException(e); - } - } - return false; - } - - - /** - * Allows to change the state of an immutable instance. Huh?!? - */ - public static void setFinalFieldValue(Class clazz, String fieldName, Object newValue) { - Field nameField = getField(clazz, fieldName); - try { - setFieldValue_Internal(clazz, nameField, newValue); - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - /** - * Allows to change the state of an immutable instance. Huh?!? - */ - public static void setFinalFieldValue(Class clazz, Field field, Object newValue) { - try { - setFieldValue_Internal(clazz, field, newValue); - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - @Deprecated - public static void setFinalStatic(Field field, Object newValue) throws Exception { - field.setAccessible(true); - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); - field.set(null, newValue); - } - - - public static void setByte(Object clazz, String fieldName, byte newValue) throws Exception { - Field nameField = getField(clazz.getClass(), fieldName); - nameField.setAccessible(true); - int modifiers = nameField.getModifiers(); - Field modifierField = nameField.getClass().getDeclaredField("modifiers"); - modifiers = modifiers & ~Modifier.FINAL; - modifierField.setAccessible(true); - modifierField.setInt(nameField, modifiers); - //Utils.LOG_INFO("O-"+(byte) nameField.get(clazz) + " | "+newValue); - nameField.setByte(clazz, newValue); - //Utils.LOG_INFO("N-"+(byte) nameField.get(clazz)); - - /*final Field fieldA = getField(clazz.getClass(), fieldName); - fieldA.setAccessible(true); - fieldA.setByte(clazz, newValue);*/ - - } - - public static boolean invoke(Object objectInstance, String methodName, Class[] parameters, Object[] values){ - if (objectInstance == null || methodName == null || parameters == null || values == null){ - return false; - } - Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass()); - Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+"."); - try { - Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters); - if (mInvokingMethod != null){ - return invoke(objectInstance, mInvokingMethod, values); - } - } - catch (NoSuchMethodException | SecurityException | IllegalArgumentException e) { - Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName()); - } - - Logger.REFLECTION("Invoke failed or did something wrong."); - return false; - } - - public static boolean invoke(Object objectInstance, Method method, Object[] values){ - if (method == null || values == null || (!ReflectionUtils.isStaticMethod(method) && objectInstance == null)){ - //Logger.REFLECTION("Null value when trying to Dynamically invoke "+methodName+" on an object of type: "+objectInstance.getClass().getName()); - return false; - } - String methodName = method.getName(); - String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); - Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); - try { - Method mInvokingMethod = method; - if (mInvokingMethod != null){ - Logger.REFLECTION(methodName+" was not null."); - if ((boolean) mInvokingMethod.invoke(objectInstance, values)){ - Logger.REFLECTION("Successfully invoked "+methodName+"."); - return true; - } - else { - Logger.REFLECTION("Invocation failed for "+methodName+"."); - } - } - } - catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); - } - Logger.REFLECTION("Invoke failed or did something wrong."); - return false; - } - - public static boolean invokeVoid(Object objectInstance, Method method, Object[] values){ - if (method == null || values == null || (!ReflectionUtils.isStaticMethod(method) && objectInstance == null)){ - //Logger.REFLECTION("Null value when trying to Dynamically invoke "+methodName+" on an object of type: "+objectInstance.getClass().getName()); - return false; - } - String methodName = method.getName(); - String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); - Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); - try { - Method mInvokingMethod = method; - if (mInvokingMethod != null){ - Logger.REFLECTION(methodName+" was not null."); - mInvokingMethod.invoke(objectInstance, values); - Logger.REFLECTION("Successfully invoked "+methodName+"."); - return true; - } - } - catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); - } - Logger.REFLECTION("Invoke failed or did something wrong."); - return false; - } - - public static boolean invokeVoid(Object objectInstance, String methodName, Class[] parameters, Object[] values){ - if (objectInstance == null || methodName == null || parameters == null || values == null){ - return false; - } - Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass()); - Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+"."); - try { - Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters); - if (mInvokingMethod != null){ - Logger.REFLECTION(methodName+" was not null."); - mInvokingMethod.invoke(objectInstance, values); - Logger.REFLECTION("Successfully invoked "+methodName+"."); - return true; - } - else { - Logger.REFLECTION(methodName+" is null."); - } - } - catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName()); - } - - Logger.REFLECTION("Invoke failed or did something wrong."); - return false; - } - - - public static Object invokeNonBool(Object objectInstance, Method method, Object[] values){ - if ((!ReflectionUtils.isStaticMethod(method) && objectInstance == null) || method == null || values == null){ - return false; - } - String methodName = method.getName(); - String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); - Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); - try { - return method.invoke(objectInstance, values); - } - catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); - } - - Logger.REFLECTION("Invoke failed or did something wrong."); - return null; - } - - public static Object invokeNonBool(Object objectInstance, String methodName, Class[] parameters, Object[] values){ - if (objectInstance == null || methodName == null || parameters == null || values == null){ - return false; - } - Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass()); - Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+"."); - try { - Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters); - if (mInvokingMethod != null){ - Logger.REFLECTION(methodName+" was not null."); - return mInvokingMethod.invoke(objectInstance, values); - } - else { - Logger.REFLECTION(methodName+" is null."); - } - } - catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName()); - } - - Logger.REFLECTION("Invoke failed or did something wrong."); - return null; - } - - - - - - - - - - - - - - - - - - - - - - /* - * Internal Magic that probably should not get exposed. - */ - - - - - - - - - - /* - * - * Below Code block is used for determining generic types associated with type - * - */ - - - //https://xebia.com/blog/acessing-generic-types-at-runtime-in-java/ - //https://www.javacodegeeks.com/2013/12/advanced-java-generics-retreiving-generic-type-arguments.html - public static Class findSuperClassParameterType(Object instance, Class classOfInterest, int parameterIndex) { - Class subClass = instance.getClass(); - while (classOfInterest != subClass.getSuperclass()) { - // instance.getClass() is no subclass of classOfInterest or instance is a direct instance of classOfInterest - subClass = subClass.getSuperclass(); - if (subClass == null) { - return null; - } - } - ParameterizedType parameterizedType = (ParameterizedType) subClass.getGenericSuperclass(); - Class aReturn; - aReturn = (Class) parameterizedType.getActualTypeArguments()[parameterIndex]; - return aReturn; - } - - public static Class findSubClassParameterType(Object instance, Class classOfInterest, int parameterIndex) { - Map typeMap = new HashMap(); - Class instanceClass = instance.getClass(); - while (classOfInterest != instanceClass.getSuperclass()) { - extractTypeArguments(typeMap, instanceClass); - instanceClass = instanceClass.getSuperclass(); - if (instanceClass == null) { - return null; - } - } - - ParameterizedType parameterizedType = (ParameterizedType) instanceClass.getGenericSuperclass(); - Type actualType = parameterizedType.getActualTypeArguments()[parameterIndex]; - if (typeMap.containsKey(actualType)) { - actualType = typeMap.get(actualType); - } - if (actualType instanceof Class) { - return (Class) actualType; - } else if (actualType instanceof TypeVariable) { - return browseNestedTypes(instance, (TypeVariable) actualType); - } else { - return null; - } - } - - private static void extractTypeArguments(Map typeMap, Class clazz) { - Type genericSuperclass = clazz.getGenericSuperclass(); - if (!(genericSuperclass instanceof ParameterizedType)) { - return; - } - - ParameterizedType parameterizedType = (ParameterizedType) genericSuperclass; - Type[] typeParameter = ((Class) parameterizedType.getRawType()).getTypeParameters(); - Type[] actualTypeArgument = parameterizedType.getActualTypeArguments(); - for (int i = 0; i < typeParameter.length; i++) { - if(typeMap.containsKey(actualTypeArgument[i])) { - actualTypeArgument[i] = typeMap.get(actualTypeArgument[i]); - } - typeMap.put(typeParameter[i], actualTypeArgument[i]); - } - } - - private static Class browseNestedTypes(Object instance, TypeVariable actualType) { - Class instanceClass = instance.getClass(); - List> nestedOuterTypes = new LinkedList>(); - for (Class enclosingClass = instanceClass - .getEnclosingClass(); enclosingClass != null; enclosingClass = enclosingClass.getEnclosingClass()) { - try { - Field this$0 = instanceClass.getDeclaredField("this$0"); - Object outerInstance = this$0.get(instance); - Class outerClass = outerInstance.getClass(); - nestedOuterTypes.add(outerClass); - Map outerTypeMap = new HashMap(); - extractTypeArguments(outerTypeMap, outerClass); - for (Map.Entry entry : outerTypeMap.entrySet()) { - if (!(entry.getKey() instanceof TypeVariable)) { - continue; - } - TypeVariable foundType = (TypeVariable) entry.getKey(); - if (foundType.getName().equals(actualType.getName()) - && isInnerClass(foundType.getGenericDeclaration(), actualType.getGenericDeclaration())) { - if (entry.getValue() instanceof Class) { - return (Class) entry.getValue(); - } - actualType = (TypeVariable) entry.getValue(); - } - } - } catch (NoSuchFieldException | IllegalAccessException e) { - - } - - } - return null; - } - - private static boolean isInnerClass(GenericDeclaration outerDeclaration, GenericDeclaration innerDeclaration) { - if (!(outerDeclaration instanceof Class) || !(innerDeclaration instanceof Class)) { - return false; - } - Class outerClass = (Class) outerDeclaration; - Class innerClass = (Class) innerDeclaration; - while ((innerClass = innerClass.getEnclosingClass()) != null) { - if (innerClass == outerClass) { - return true; - } - } - return false; - } - - - /* - * - * End of Generics Block - * - */ - - - - private static Field getField_Internal(final Class clazz, final String fieldName) throws NoSuchFieldException { - try { - Logger.REFLECTION("Field: Internal Lookup: "+fieldName); - Field k = clazz.getDeclaredField(fieldName); - makeFieldAccessible(k); - //Logger.REFLECTION("Got Field from Class. "+fieldName+" did exist within "+clazz.getCanonicalName()+"."); - return k; - } catch (final NoSuchFieldException e) { - Logger.REFLECTION("Field: Internal Lookup Failed: "+fieldName); - final Class superClass = clazz.getSuperclass(); - if (superClass == null) { - Logger.REFLECTION("Unable to find field '"+fieldName+"'"); - //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+"."); - throw e; - } - Logger.REFLECTION("Method: Recursion Lookup: "+fieldName+" - Checking in "+superClass.getName()); - //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class."); - return getField_Internal(superClass, fieldName); - } - } - - /** - * if (isPresent("com.optionaldependency.DependencyClass")) || - * This block will never execute when the dependency is not present. There is - * therefore no more risk of code throwing NoClassDefFoundException. - */ - private static boolean isClassPresent(final String className) { - try { - Class.forName(className); - return true; - } catch (final Throwable ex) { - // Class or one of its dependencies is not present... - return false; - } - } - - @Deprecated - public static Method getMethodViaReflection(final Class lookupClass, final String methodName, - final boolean invoke) throws Exception { - final Class lookup = lookupClass.getClass(); - final Method m = lookup.getDeclaredMethod(methodName); - m.setAccessible(true);// Abracadabra - if (invoke) { - m.invoke(lookup);// now its OK - } - return m; - } - - private static Method getMethod_Internal(Class aClass, String aMethodName, Class... aTypes) { - Method m = null; - try { - Logger.REFLECTION("Method: Internal Lookup: "+aMethodName); - m = aClass.getDeclaredMethod(aMethodName, aTypes); - if (m != null) { - m.setAccessible(true); - int modifiers = m.getModifiers(); - Field modifierField = m.getClass().getDeclaredField("modifiers"); - modifiers = modifiers & ~Modifier.FINAL; - modifierField.setAccessible(true); - modifierField.setInt(m, modifiers); - } - } - catch (Throwable t) { - Logger.REFLECTION("Method: Internal Lookup Failed: "+aMethodName); - try { - m = getMethodRecursively(aClass, aMethodName); - } catch (NoSuchMethodException e) { - Logger.REFLECTION("Unable to find method '"+aMethodName+"'"); - e.printStackTrace(); - dumpClassInfo(aClass); - } - } - return m; - } - - private static Constructor getConstructor_Internal(Class aClass, Class... aTypes) { - Constructor c = null; - try { - Logger.REFLECTION("Constructor: Internal Lookup: "+aClass.getName()); - c = aClass.getDeclaredConstructor(aTypes); - if (c != null) { - c.setAccessible(true); - int modifiers = c.getModifiers(); - Field modifierField = c.getClass().getDeclaredField("modifiers"); - modifiers = modifiers & ~Modifier.FINAL; - modifierField.setAccessible(true); - modifierField.setInt(c, modifiers); - } - } - catch (Throwable t) { - Logger.REFLECTION("Constructor: Internal Lookup Failed: "+aClass.getName()); - try { - c = getConstructorRecursively(aClass, aTypes); - } catch (Exception e) { - Logger.REFLECTION("Unable to find method '"+aClass.getName()+"'"); - e.printStackTrace(); - dumpClassInfo(aClass); - } - } - return c; - } - - private static Constructor getConstructorRecursively(Class aClass, Class... aTypes) throws Exception { - try { - Logger.REFLECTION("Constructor: Recursion Lookup: "+aClass.getName()); - Constructor c = aClass.getConstructor(aTypes); - if (c != null) { - c.setAccessible(true); - int modifiers = c.getModifiers(); - Field modifierField = c.getClass().getDeclaredField("modifiers"); - modifiers = modifiers & ~Modifier.FINAL; - modifierField.setAccessible(true); - modifierField.setInt(c, modifiers); - } - return c; - } catch (final NoSuchMethodException | IllegalArgumentException | IllegalAccessException e) { - final Class superClass = aClass.getSuperclass(); - if (superClass == null || superClass == Object.class) { - throw e; - } - return getConstructor_Internal(superClass, aTypes); - } - } - - private static Method getMethodRecursively(final Class clazz, final String aMethodName) throws NoSuchMethodException { - try { - Logger.REFLECTION("Method: Recursion Lookup: "+aMethodName); - Method k = clazz.getDeclaredMethod(aMethodName); - makeMethodAccessible(k); - return k; - } catch (final NoSuchMethodException e) { - final Class superClass = clazz.getSuperclass(); - if (superClass == null || superClass == Object.class) { - throw e; - } - return getMethod_Internal(superClass, aMethodName); - } - } - - private static void dumpClassInfo(Class aClass) { - Logger.INFO("We ran into an error processing reflection in "+aClass.getName()+", dumping all data for debugging."); - // Get the methods - Method[] methods = aClass.getDeclaredMethods(); - Field[] fields = aClass.getDeclaredFields(); - Constructor[] consts = aClass.getDeclaredConstructors(); - - Logger.INFO("Dumping all Methods."); - for (Method method : methods) { - System.out.println(method.getName()+" | "+StringUtils.getDataStringFromArray(method.getParameterTypes())); - } - Logger.INFO("Dumping all Fields."); - for (Field f : fields) { - System.out.println(f.getName()); - } - Logger.INFO("Dumping all Constructors."); - for (Constructor c : consts) { - System.out.println(c.getName()+" | "+c.getParameterCount()+" | "+StringUtils.getDataStringFromArray(c.getParameterTypes())); - } - } - - private static Class getNonPublicClass(final String className) { - Class c = null; - try { - c = Class.forName(className); - } catch (final ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - // full package name --------^^^^^^^^^^ - // or simpler without Class.forName: - // Class c = package1.A.class; - - if (null != c) { - // In our case we need to use - Constructor constructor = null; - try { - constructor = c.getDeclaredConstructor(); - } catch (NoSuchMethodException | SecurityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - // note: getConstructor() can return only public constructors - // so we needed to search for any Declared constructor - - // now we need to make this constructor accessible - if (null != constructor) { - constructor.setAccessible(true);// ABRACADABRA! - - try { - final Object o = constructor.newInstance(); - return (Class) o; - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - return null; - } - - private static Class getClass_Internal(String string) { - Class aClass = null; - if (ReflectionUtils.doesClassExist(string)) { - try { - aClass = Class.forName(string); - } - catch (ClassNotFoundException e) { - aClass = getNonPublicClass(string); - } - } - - if (aClass == null) { - String aClassName = ""; - Logger.REFLECTION("Splitting "+string+" to try look for hidden classes."); - String[] aData = string.split("\\."); - Logger.REFLECTION("Obtained "+aData.length+" pieces."); - for (int i=0;i<(aData.length-1);i++) { - aClassName += (i > 0) ? "."+aData[i] : ""+aData[i]; - Logger.REFLECTION("Building: "+aClassName); - } - if (aClassName != null && aClassName.length() > 0) { - Logger.REFLECTION("Trying to search '"+aClassName+"' for inner classes."); - Class clazz = ReflectionUtils.getClass(aClassName); - if (clazz != null) { - Class[] y = clazz.getDeclaredClasses(); - if (y == null || y.length <= 0) { - Logger.REFLECTION("No hidden inner classes found."); - return null; - } - else { - boolean found = false; - for (Class h : y) { - Logger.REFLECTION("Found hidden inner class: "+h.getCanonicalName()); - if (h.getSimpleName().toLowerCase().equals(aData[aData.length-1].toLowerCase())) { - Logger.REFLECTION("Found correct class. ["+aData[aData.length-1]+"] Caching at correct location: "+string); - Logger.REFLECTION("Found at location: "+h.getCanonicalName()); - ReflectionUtils.mCachedClasses.put(string, h); - aClass = h; - found = true; - break; - } - } - if (!found) { - return null; - } - } - } - else { - return null; - } - } - else { - return null; - } - } - return aClass; - } - - /** - * - * Set the value of a field reflectively. - */ - private static void setFieldValue_Internal(Object owner, Field field, Object value) throws Exception { - makeModifiable(field); - field.set(owner, value); - } - - /** - * Force the field to be modifiable and accessible. - */ - private static void makeModifiable(Field nameField) throws Exception { - nameField.setAccessible(true); - Field modifiers = getField(Field.class, "modifiers"); - modifiers.setAccessible(true); - modifiers.setInt(nameField, nameField.getModifiers() & ~Modifier.FINAL); - } - - - public static boolean doesFieldExist(String clazz, String string) { - return doesFieldExist(ReflectionUtils.getClass(clazz), string); - } - - public static boolean doesFieldExist(Class clazz, String string) { - if (clazz != null) { - if (ReflectionUtils.getField(clazz, string) != null) { - return true; - } - } - return false; - } - - public static Object getFieldValue(Field field) { - return getFieldValue(field, null); - } - - public static Object getFieldValue(Field field, Object instance) { - try { - return field.get(instance); - } catch (IllegalArgumentException | IllegalAccessException e) { - } - return null; - } - - public static T createNewInstanceFromConstructor(Constructor aConstructor, Object[] aArgs) { - T aInstance; - try { - aInstance = (T) aConstructor.newInstance(aArgs); - if (aInstance != null) { - return aInstance; - } - } - catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - -} diff --git a/src/Java/gtPlusPlus/core/util/sys/KeyboardUtils.java b/src/Java/gtPlusPlus/core/util/sys/KeyboardUtils.java deleted file mode 100644 index ea87677ee2..0000000000 --- a/src/Java/gtPlusPlus/core/util/sys/KeyboardUtils.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.util.sys; - -import org.lwjgl.input.Keyboard; - -import net.minecraft.client.Minecraft; - -public class KeyboardUtils { - - public static boolean isCtrlKeyDown(){ - try { - if (!Keyboard.isCreated()) { - return false; - } - // prioritize CONTROL, but allow OPTION as well on Mac (note: GuiScreen's isCtrlKeyDown only checks for the OPTION key on Mac) - boolean isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL); - if (!isCtrlKeyDown && Minecraft.isRunningOnMac) - isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LMETA) || Keyboard.isKeyDown(Keyboard.KEY_RMETA); - - return isCtrlKeyDown; - } - catch (Throwable t) { - return false; - } - } - - public static boolean isShiftKeyDown(){ - try { - if (!Keyboard.isCreated()) { - return false; - } - return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); - } - catch (Throwable t) { - return false; - } - - } - -} diff --git a/src/Java/gtPlusPlus/core/util/sys/Log.java b/src/Java/gtPlusPlus/core/util/sys/Log.java deleted file mode 100644 index fcd4f34c1b..0000000000 --- a/src/Java/gtPlusPlus/core/util/sys/Log.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.core.util.sys; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -public final class Log { - public static final Logger LOGGER = LogManager.getLogger("MiscUtils"); - - public static void warn(final String msg) { - LOGGER.warn(msg); - } - - public static void error(final String msg) { - LOGGER.error(msg); - } - - public static void info(final String msg) { - LOGGER.info(msg); - } - - public static void debug(final String msg) { - LOGGER.debug(msg); - } -} diff --git a/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java b/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java deleted file mode 100644 index 2788ba688e..0000000000 --- a/src/Java/gtPlusPlus/core/util/sys/SystemUtils.java +++ /dev/null @@ -1,90 +0,0 @@ -package gtPlusPlus.core.util.sys; - -public class SystemUtils { - - private static OS SystemType; - - public static OS getOS(){ - if (SystemType != null){ - return SystemType; - } - else { - SystemType = getOperatingSystem(); - return SystemType; - } - } - - /** - * Try invoke the runtime's Garbage Collector. - */ - public static void invokeGC() { - try { - Runtime r = Runtime.getRuntime(); - r.gc(); - } - catch (Throwable t) { - //Do nothing. - } - } - - public static boolean isWindows() { - return (getOSString().indexOf("win") >= 0); - } - - public static boolean isMac() { - return (getOSString().indexOf("mac") >= 0); - } - - public static boolean isUnix() { - return (getOSString().indexOf("nix") >= 0 || getOSString().indexOf("nux") >= 0 || getOSString().indexOf("aix") > 0 ); - } - - public static boolean isSolaris() { - return (getOSString().indexOf("sunos") >= 0); - } - - public static String getOSString(){ - try { - return System.getProperty("os.name").toLowerCase(); - } - catch (Throwable t){ - return "other"; - } - } - - public static OS getOperatingSystem(){ - if (isMac()){ - return OS.MAC; - } - else if (isWindows()){ - return OS.WINDOWS; - } - else if (isUnix()){ - return OS.UNIX; - } - else if (isSolaris()){ - return OS.SOLARIS; - } - else { - return OS.OTHER; - } - } - - public static enum OS { - MAC(1), - WINDOWS(2), - UNIX(3), - SOLARIS(4), - OTHER(0); - - private int mID; - private OS (final int ID){ - this.mID = ID; - } - - public int getID() { - return this.mID; - } - } - -} diff --git a/src/Java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java b/src/Java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java deleted file mode 100644 index 3778beacfb..0000000000 --- a/src/Java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.core.world.damage; - -import net.minecraft.entity.Entity; -import net.minecraft.util.EntityDamageSourceIndirect; - -public class BaseCustomDamageSource extends EntityDamageSourceIndirect { - - public BaseCustomDamageSource(String name, Entity transmitter, Entity indirectSource) { - super(name, transmitter, indirectSource); - this.setDifficultyScaled(); - } - - /** - * Return whether this damage source will have its damage amount scaled based on the current difficulty. - */ - public boolean isDifficultyScaled() - { - return true; - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/world/explosions/ExplosionHandler.java b/src/Java/gtPlusPlus/core/world/explosions/ExplosionHandler.java deleted file mode 100644 index 8d96aa2ff1..0000000000 --- a/src/Java/gtPlusPlus/core/world/explosions/ExplosionHandler.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.core.world.explosions; - -import net.minecraft.entity.Entity; -import net.minecraft.world.World; - -public class ExplosionHandler { - - /** - * Creates an explosion. Args: entity, x, y, z, strength - */ - public MiningExplosion createExplosion(final World world, final Entity entityObj, final double x, final double y, final double z, final float size, final boolean makesFlames, final boolean makesSmoke) - { - return this.newExplosion(world, entityObj, x, y, z, size, makesFlames, makesSmoke); - } - - /** - * returns a new explosion. - */ - public MiningExplosion newExplosion(final World world, final Entity entityObj, final double x, final double y, final double z, final float size, final boolean makesFlames, final boolean makesSmoke){ - final MiningExplosion explosion = new MiningExplosion(world, entityObj, x, y, z, size); - explosion.isFlaming = makesFlames; - explosion.isSmoking = makesSmoke; - if (net.minecraftforge.event.ForgeEventFactory.onExplosionStart(world, explosion)) { - return explosion; - } - explosion.doExplosionA(); - explosion.doExplosionB(true); - return explosion; - } - -} diff --git a/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java b/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java deleted file mode 100644 index 792e47085e..0000000000 --- a/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java +++ /dev/null @@ -1,275 +0,0 @@ -package gtPlusPlus.core.world.explosions; - -import java.util.*; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentProtection; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.util.*; -import net.minecraft.world.ChunkPosition; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; -import gtPlusPlus.core.util.math.MathUtils; - -public class MiningExplosion extends Explosion { - private final int field_77289_h = 16; - private final Random explosionRNG = new XSTR(); - private final World worldObj; - - private final Map field_77288_k = new HashMap<>(); - public MiningExplosion(final World worldObj, final Entity entityObj, final double x, final double y, final double z, final float size) - { - super(worldObj, entityObj, x, y, z, size); - this.worldObj = worldObj; - this.exploder = entityObj; - this.explosionSize = size; - this.explosionX = x; - this.explosionY = y; - this.explosionZ = z; - } - - /** - * Does the first part of the explosion (destroy blocks) - */ - @SuppressWarnings("unchecked") - @Override - public void doExplosionA() - { - final float f = this.explosionSize; - final HashSet hashset = new HashSet<>(); - int i; - int j; - int k; - double d5; - double d6; - double d7; - - for (i = 0; i < this.field_77289_h; ++i) - { - for (j = 0; j < this.field_77289_h; ++j) - { - for (k = 0; k < this.field_77289_h; ++k) - { - if ((i == 0) || (i == (this.field_77289_h - 1)) || (j == 0) || (j == (this.field_77289_h - 1)) || (k == 0) || (k == (this.field_77289_h - 1))) - { - double d0 = ((i / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; - double d1 = ((j / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; - double d2 = ((k / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; - final double d3 = Math.sqrt((d0 * d0) + (d1 * d1) + (d2 * d2)); - d0 /= d3; - d1 /= d3; - d2 /= d3; - float f1 = this.explosionSize * (0.7F + (this.worldObj.rand.nextFloat() * 0.6F)); - d5 = this.explosionX; - d6 = this.explosionY; - d7 = this.explosionZ; - - for (final float f2 = 0.3F; f1 > 0.0F; f1 -= f2 * 0.75F) - { - final int j1 = MathHelper.floor_double(d5); - final int k1 = MathHelper.floor_double(d6); - final int l1 = MathHelper.floor_double(d7); - final Block block = this.worldObj.getBlock(j1, k1, l1); - - if (block.getMaterial() != Material.air) - { - final float f3 = this.exploder != null ? this.exploder.func_145772_a(this, this.worldObj, j1, k1, l1, block) : block.getExplosionResistance(this.exploder, this.worldObj, j1, k1, l1, this.explosionX, this.explosionY, this.explosionZ); - f1 -= (f3 + 0.3F) * f2; - } - - if ((f1 > 0.0F) && ((this.exploder == null) || this.exploder.func_145774_a(this, this.worldObj, j1, k1, l1, block, f1))) - { - hashset.add(new ChunkPosition(j1, k1, l1)); - } - - d5 += d0 * f2; - d6 += d1 * f2; - d7 += d2 * f2; - } - } - } - } - } - - this.affectedBlockPositions.addAll(hashset); - this.explosionSize *= 2.0F; - i = MathHelper.floor_double(this.explosionX - this.explosionSize - 1.0D); - j = MathHelper.floor_double(this.explosionX + this.explosionSize + 1.0D); - k = MathHelper.floor_double(this.explosionY - this.explosionSize - 1.0D); - final int i2 = MathHelper.floor_double(this.explosionY + this.explosionSize + 1.0D); - final int l = MathHelper.floor_double(this.explosionZ - this.explosionSize - 1.0D); - final int j2 = MathHelper.floor_double(this.explosionZ + this.explosionSize + 1.0D); - final List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); - net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(this.worldObj, this, list, this.explosionSize); - final Vec3 vec3 = Vec3.createVectorHelper(this.explosionX, this.explosionY, this.explosionZ); - - for (int i1 = 0; i1 < list.size(); ++i1) - { - final Entity entity = list.get(i1); - final double d4 = entity.getDistance(this.explosionX, this.explosionY, this.explosionZ) / this.explosionSize; - - if (d4 <= 1.0D) - { - d5 = entity.posX - this.explosionX; - d6 = (entity.posY + entity.getEyeHeight()) - this.explosionY; - d7 = entity.posZ - this.explosionZ; - final double d9 = MathHelper.sqrt_double((d5 * d5) + (d6 * d6) + (d7 * d7)); - - if (d9 != 0.0D) - { - d5 /= d9; - d6 /= d9; - d7 /= d9; - final double d10 = this.worldObj.getBlockDensity(vec3, entity.boundingBox); - final double d11 = (1.0D - d4) * d10; - entity.attackEntityFrom(DamageSource.setExplosionSource(this), ((int)(((((d11 * d11) + d11) / 2.0D) * 8.0D * this.explosionSize) + 1.0D))); - final double d8 = EnchantmentProtection.func_92092_a(entity, d11); - entity.motionX += d5 * d8; - entity.motionY += d6 * d8; - entity.motionZ += d7 * d8; - - if (entity instanceof EntityPlayer) - { - this.field_77288_k.put(entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); - } - } - } - } - - this.explosionSize = f; - } - - /** - * Does the second part of the explosion (sound, particles, drop spawn) - */ - @Override - public void doExplosionB(final boolean p_77279_1_) - { - this.worldObj.playSoundEffect(this.explosionX, this.explosionY, this.explosionZ, "random.explode", 4.0F, (1.0F + ((this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F)) * 0.7F); - - if ((this.explosionSize >= 2.0F) && this.isSmoking) - { - this.worldObj.spawnParticle("hugeexplosion", this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("smoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("explode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - else - { - this.worldObj.spawnParticle("largeexplode", this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("smoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("explode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - } - - Iterator iterator; - ChunkPosition chunkposition; - int i; - int j; - int k; - Block block; - - if (this.isSmoking) - { - iterator = this.affectedBlockPositions.iterator(); - - while (iterator.hasNext()) - { - chunkposition = iterator.next(); - i = chunkposition.chunkPosX; - j = chunkposition.chunkPosY; - k = chunkposition.chunkPosZ; - block = this.worldObj.getBlock(i, j, k); - - if (p_77279_1_) - { - final double d0 = i + this.worldObj.rand.nextFloat(); - final double d1 = j + this.worldObj.rand.nextFloat(); - final double d2 = k + this.worldObj.rand.nextFloat(); - double d3 = d0 - this.explosionX; - double d4 = d1 - this.explosionY; - double d5 = d2 - this.explosionZ; - final double d6 = MathHelper.sqrt_double((d3 * d3) + (d4 * d4) + (d5 * d5)); - d3 /= d6; - d4 /= d6; - d5 /= d6; - double d7 = 0.5D / ((d6 / this.explosionSize) + 0.1D); - d7 *= (this.worldObj.rand.nextFloat() * this.worldObj.rand.nextFloat()) + 0.3F; - d3 *= d7; - d4 *= d7; - d5 *= d7; - this.worldObj.spawnParticle("explode", (d0 + (this.explosionX * 1.0D)) / 2.0D, (d1 + (this.explosionY * 1.0D)) / 2.0D, (d2 + (this.explosionZ * 1.0D)) / 2.0D, d3, d4, d5); - this.worldObj.spawnParticle("smoke", d0, d1, d2, d3, d4, d5); - this.worldObj.spawnParticle("smoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largesmoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("cloud", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("flame", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("explode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("largeexplode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - this.worldObj.spawnParticle("hugeexplosion", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); - - } - - if (block.getMaterial() != Material.air) - { - if (block.canDropFromExplosion(this)) - { - //world, x, y, z, world.getBlockMetadata(x, y, z), dropProb, 0 - block.dropBlockAsItemWithChance(this.worldObj, i, j, k, this.worldObj.getBlockMetadata(i, j, k), 1F, 0); - } - - block.onBlockExploded(this.worldObj, i, j, k, this); - } - } - } - - if (this.isFlaming) - { - iterator = this.affectedBlockPositions.iterator(); - - while (iterator.hasNext()) - { - chunkposition = iterator.next(); - i = chunkposition.chunkPosX; - j = chunkposition.chunkPosY; - k = chunkposition.chunkPosZ; - block = this.worldObj.getBlock(i, j, k); - final Block block1 = this.worldObj.getBlock(i, j - 1, k); - - if ((block.getMaterial() == Material.air) && block1.func_149730_j() && (this.explosionRNG.nextInt(3) == 0)) - { - this.worldObj.setBlock(i, j, k, Blocks.fire); - } - } - } - } - - @Override - public Map func_77277_b() - { - return this.field_77288_k; - } - - /** - * Returns either the entity that placed the explosive block, the entity that caused the explosion or null. - */ - @Override - public EntityLivingBase getExplosivePlacedBy() - { - return this.exploder == null ? null : (this.exploder instanceof EntityPrimedMiningExplosive ? ((EntityPrimedMiningExplosive)this.exploder).getTntPlacedBy() : (this.exploder instanceof EntityLivingBase ? (EntityLivingBase)this.exploder : null)); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java b/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java deleted file mode 100644 index 0709f0b1ff..0000000000 --- a/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java +++ /dev/null @@ -1,235 +0,0 @@ -package gtPlusPlus.everglades; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; - -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.event.FMLInitializationEvent; -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.registry.GameRegistry; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.Everglades; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.everglades.biome.Biome_Everglades; -import gtPlusPlus.everglades.block.DarkWorldContentLoader; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.everglades.gen.gt.WorldGen_GT_Base; -import gtPlusPlus.everglades.gen.gt.WorldGen_Ores; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; -import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.config.Configuration; - -@MCVersion(value = "1.7.10") -@Mod(modid = Everglades.MODID, name = Everglades.NAME, version = Everglades.VERSION, dependencies = "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") -public class GTplusplus_Everglades implements ActionListener { - - //Mod Instance - @Mod.Instance(Everglades.MODID) - public static GTplusplus_Everglades instance; - - // Dark World Handler - protected static volatile Biome_Everglades Everglades_Biome; - protected static volatile Dimension_Everglades Everglades_Dimension; - public static int globalEvergladesPortalSpawnTimer = 0; - - // Pre-Init - @Mod.EventHandler - public void preInit(final FMLPreInitializationEvent event) { - Logger.INFO("Loading " + Everglades.MODID + " V" + Everglades.VERSION); - - //Setup - setVars(event); - - setEvergladesBiome(new Biome_Everglades()); - Everglades_Dimension = new Dimension_Everglades(); - - // Load Dark World - getEvergladesBiome().instance = instance; - Everglades_Dimension.instance = instance; - getEvergladesBiome().preInit(event); - - //Load/Set Custom Ore Gen - HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); - - } - - @EventHandler - public void load(final FMLInitializationEvent e) { - Logger.INFO("Begin resource allocation for " + Everglades.MODID + " V" +Everglades.VERSION); - - //Load World and Biome - GameRegistry.registerWorldGenerator(new WorldGen_GT_Base(), Short.MAX_VALUE); - getEvergladesBiome().load(); - Everglades_Dimension.load(); - - } - - public static synchronized void GenerateOreMaterials() { - MaterialGenerator.generateOreMaterial(ORES.CROCROITE); - MaterialGenerator.generateOreMaterial(ORES.GEIKIELITE); - MaterialGenerator.generateOreMaterial(ORES.NICHROMITE); - MaterialGenerator.generateOreMaterial(ORES.TITANITE); - MaterialGenerator.generateOreMaterial(ORES.ZIMBABWEITE); - MaterialGenerator.generateOreMaterial(ORES.ZIRCONILITE); - MaterialGenerator.generateOreMaterial(ORES.GADOLINITE_CE); - MaterialGenerator.generateOreMaterial(ORES.GADOLINITE_Y); - MaterialGenerator.generateOreMaterial(ORES.LEPERSONNITE); - MaterialGenerator.generateOreMaterial(ORES.SAMARSKITE_Y); - MaterialGenerator.generateOreMaterial(ORES.SAMARSKITE_YB); - MaterialGenerator.generateOreMaterial(ORES.XENOTIME); - MaterialGenerator.generateOreMaterial(ORES.YTTRIAITE); - MaterialGenerator.generateOreMaterial(ORES.YTTRIALITE); - MaterialGenerator.generateOreMaterial(ORES.YTTROCERITE); - MaterialGenerator.generateOreMaterial(ORES.ZIRCON); - MaterialGenerator.generateOreMaterial(ORES.POLYCRASE); - MaterialGenerator.generateOreMaterial(ORES.ZIRCOPHYLLITE); - MaterialGenerator.generateOreMaterial(ORES.ZIRKELITE); - MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_LA); - MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_CE); - MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_ND); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_Y); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_CD); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_LA); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_ND); - MaterialGenerator.generateOreMaterial(ORES.HIBONITE); - MaterialGenerator.generateOreMaterial(ORES.CERITE); - MaterialGenerator.generateOreMaterial(ORES.FLUORCAPHITE); - MaterialGenerator.generateOreMaterial(ORES.FLORENCITE); - MaterialGenerator.generateOreMaterial(ORES.CRYOLITE); - - MaterialGenerator.generateOreMaterial(ORES.LAUTARITE); - MaterialGenerator.generateOreMaterial(ORES.LAFOSSAITE); - MaterialGenerator.generateOreMaterial(ORES.DEMICHELEITE_BR); - MaterialGenerator.generateOreMaterial(ORES.COMANCHEITE); - MaterialGenerator.generateOreMaterial(ORES.PERROUDITE); - MaterialGenerator.generateOreMaterial(ORES.HONEAITE); - MaterialGenerator.generateOreMaterial(ORES.ALBURNITE); - MaterialGenerator.generateOreMaterial(ORES.MIESSIITE); - MaterialGenerator.generateOreMaterial(ORES.KASHINITE); - MaterialGenerator.generateOreMaterial(ORES.IRARSITE); - MaterialGenerator.generateOreMaterial(ORES.GREENOCKITE); - MaterialGenerator.generateOreMaterial(ORES.RADIOBARITE); - MaterialGenerator.generateOreMaterial(ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT); - - //Custom Ores - if (LoadedMods.Big_Reactors) { - MaterialGenerator.generateOreMaterial(ELEMENT.getInstance().YELLORIUM, false, false, true, new short[] {255, 242, 10}); - } - - if (!CORE.GTNH) { - MaterialGenerator.generateOreMaterial( - ELEMENT.getInstance().TRINIUM, - true, - false, - false, - ELEMENT.getInstance().TRINIUM_REFINED.getRGBA()); - } - - - - /* - * OSRS Materials - */ - - MaterialGenerator.generateOreMaterial( - ELEMENT.STANDALONE.GRANITE, - true, - false, - false, - ELEMENT.STANDALONE.GRANITE.getRGBA()); - MaterialGenerator.generateOreMaterial( - ELEMENT.STANDALONE.RUNITE, - true, - false, - false, - ELEMENT.STANDALONE.RUNITE.getRGBA()); - - - - } - - protected synchronized void setVars(FMLPreInitializationEvent event){ - //Init WorldGen config. - HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); - - if (DimensionManager.isDimensionRegistered(Dimension_Everglades.DIMID)){ - Dimension_Everglades.DIMID = DimensionManager.getNextFreeDimId(); - } - - /* - * Set World Generation Values - */ - WorldGen_Ores.generateValidOreVeins(); - WorldGen_GT_Base.oreveinPercentage = 64; - WorldGen_GT_Base.oreveinAttempts = 16; - WorldGen_GT_Base.oreveinMaxPlacementAttempts = 4; - if (CORE_Preloader.DEBUG_MODE || CORE.DEVENV){ - WorldGen_GT_Base.debugWorldGen = true; - } - DarkWorldContentLoader.run(); - } - - @EventHandler - public void serverLoad(FMLServerStartingEvent event) { - getEvergladesBiome().serverLoad(event); - } - - /*@Override - public int getBurnTime(ItemStack fuel) { - if (DarkWorld_Biome.addFuel(fuel) != 0) - return DarkWorld_Biome.addFuel(fuel); - if (DarkWorld_Dimension.addFuel(fuel) != 0) - return DarkWorld_Dimension.addFuel(fuel); - return 0; - }*/ - - /*@Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - chunkX = chunkX * 16; - chunkZ = chunkZ * 16; - - if (world.provider.dimensionId == Dimension_DarkWorld.DIMID) { - DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ); - } - - //What does this even do? - if (world.provider.dimensionId == -1) { - DarkWorld_Biome.generateNether(world, random, chunkX, chunkZ); - } - if (world.provider.dimensionId == 0) { - DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ); - } - - }*/ - - @EventHandler - public static void postInit(final FMLPostInitializationEvent e) { - Logger.INFO("Finished loading Everglades plugin for GT++."); - } - - public static synchronized Biome_Everglades getEvergladesBiome() { - return Everglades_Biome; - } - - public static synchronized void setEvergladesBiome(Biome_Everglades darkWorld_Biome) { - Everglades_Biome = darkWorld_Biome; - } - - @Override - public void actionPerformed(ActionEvent arg0) { - // TODO Auto-generated method stub - - } - -} diff --git a/src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java b/src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java deleted file mode 100644 index 0f8acd75b4..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java +++ /dev/null @@ -1,351 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; -import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; - -import java.util.Random; - -import net.minecraft.block.BlockFlower; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.*; - -import gtPlusPlus.everglades.gen.WorldGenDeadLilly; -import gtPlusPlus.everglades.gen.WorldGenMinable_Custom; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.terraingen.DecorateBiomeEvent; -import net.minecraftforge.event.terraingen.OreGenEvent; -import net.minecraftforge.event.terraingen.TerrainGen; - -public class BiomeGenerator_Custom extends BiomeDecorator { - - public WorldGenerator fluoriteGen; - - public BiomeGenerator_Custom(){ - //Basic Blocks - this.sandGen = new WorldGenMinable_Custom(Blocks.sand, 12); - this.gravelAsSandGen = new WorldGenMinable_Custom(Blocks.gravel, 8); - this.dirtGen = new WorldGenMinable_Custom(Blocks.dirt, 32); - this.gravelGen = new WorldGenMinable_Custom(Blocks.gravel, 12); - - - //Oregen - this.coalGen = new WorldGenMinable_Custom(Blocks.coal_ore, 16); - this.ironGen = new WorldGenMinable_Custom(Blocks.iron_ore, 12); - this.goldGen = new WorldGenMinable_Custom(Blocks.gold_ore, 12); - this.redstoneGen = new WorldGenMinable_Custom(Blocks.redstone_ore, 10); - this.diamondGen = new WorldGenMinable_Custom(Blocks.diamond_ore, 12); - this.lapisGen = new WorldGenMinable_Custom(Blocks.lapis_ore, 8); - // this.fluoriteGen = new WorldGenMinable_Custom(ModBlocks.blockOreFluorite, 20); - - //Nature - this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); - this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); - this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); - this.bigMushroomGen = new WorldGenBigMushroom(); - this.reedGen = new WorldGenReed(); - this.cactusGen = new WorldGenCactus(); - this.waterlilyGen = new WorldGenDeadLilly(); - - this.flowersPerChunk = 1; - this.grassPerChunk = 5; - this.sandPerChunk = 3; - this.sandPerChunk2 = 5; - this.clayPerChunk = 7; - - this.generateLakes = true; - } - - @Override - public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_) - { - if (this.currentWorld != null) - { - throw new RuntimeException("Already decorating!!"); - } - else - { - this.currentWorld = p_150512_1_; - this.randomGenerator = p_150512_2_; - this.chunk_X = p_150512_4_; - this.chunk_Z = p_150512_5_; - this.genDecorations(p_150512_3_); - this.currentWorld = null; - this.randomGenerator = null; - } - } - - @Override - protected void genDecorations(BiomeGenBase p_150513_1_) - { - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - this.generateOres(); - int i; - int j; - int k; - - boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); - for (i = 0; doGen && i < this.sandPerChunk2; ++i) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); - for (i = 0; doGen && i < this.clayPerChunk; ++i) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); - for (i = 0; doGen && i < this.sandPerChunk; ++i) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - i = this.treesPerChunk; - - if (this.randomGenerator.nextInt(10) == 0) - { - ++i; - } - - int l; - int i1; - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); - for (j = 0; doGen && j < i; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); - worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); - - if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) - { - worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); - for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); - for (j = 0; doGen && j < this.flowersPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); - String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); - BlockFlower blockflower = BlockFlower.func_149857_e(s); - - if (blockflower.getMaterial() != Material.air) - { - this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); - this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); - for (j = 0; doGen && j < this.grassPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); - worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); - for (j = 0; doGen && j < this.deadBushPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); - for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - - for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) - { - ; - } - - this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); - for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) - { - if (this.randomGenerator.nextInt(4) == 0) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - if (this.randomGenerator.nextInt(8) == 0) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - if (doGen && this.randomGenerator.nextInt(4) == 0) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - if (doGen && this.randomGenerator.nextInt(8) == 0) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); - for (j = 0; doGen && j < this.reedsPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - for (j = 0; doGen && j < 10; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); - if (doGen && this.randomGenerator.nextInt(32) == 0) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); - for (j = 0; doGen && j < this.cactiPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); - if (doGen && this.generateLakes) - { - for (j = 0; j < 50; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - - for (j = 0; j < 20; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - } - - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } - - /** - * Standard ore generation helper. Generates most ores. - */ - @Override - protected void genStandardOre1(int p_76795_1_, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_) - { - for (int l = 0; l < p_76795_1_; ++l) - { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76795_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } - - /** - * Standard ore generation helper. Generates Lapis Lazuli. - */ - @Override - protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) - { - for (int l = 0; l < p_76793_1_; ++l) - { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) + (p_76793_3_ - p_76793_4_); - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } - - /** - * Generates ores in the current chunk - */ - @Override - protected void generateOres() - { - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) - this.genStandardOre1(20, this.dirtGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) - this.genStandardOre1(10, this.gravelGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) - this.genStandardOre1(20, this.coalGen, 0, 128); - if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) - this.genStandardOre1(20, this.ironGen, 0, 64); - if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) - this.genStandardOre1(2, this.goldGen, 0, 32); - if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) - this.genStandardOre1(8, this.redstoneGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) - this.genStandardOre1(1, this.diamondGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) - this.genStandardOre2(1, this.lapisGen, 16, 16); - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } - - private int nextInt(int i) { - if (i <= 1) - return 0; - return this.randomGenerator.nextInt(i); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java b/src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java deleted file mode 100644 index b31f6d034e..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import java.lang.reflect.Field; -import java.util.Random; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.entity.passive.EntitySquid; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_Everglades { - - public static BiomeGenEverglades biome = new BiomeGenEverglades(); - - public Object instance; - - public Biome_Everglades() { - } - - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DEAD); - BiomeManager.addSpawnBiome(biome); - } - - public void generateNether(World world, Random random, int chunkX, int chunkZ) { - } - - public void generateSurface(World world, Random random, int chunkX, int chunkZ) { - } - - public void registerRenderers() { - } - - public int addFuel(ItemStack fuel) { - return 0; - } - - public void serverLoad(FMLServerStartingEvent event) { - } - - public void preInit(FMLPreInitializationEvent event) { - } - - static class BiomeGenEverglades extends BiomeGenBase { - @SuppressWarnings("unchecked") - public BiomeGenEverglades() { - super(CORE.EVERGLADESBIOME_ID); - //this.setBiomeID(); - this.theBiomeDecorator = new BiomeGenerator_Custom(); - this.theBiomeDecorator.treesPerChunk = 10; - //Logger.INFO("Dark World Temperature Category: "+getTempCategory()); - this.setBiomeName("Toxic Everglades"); - this.topBlock = Dimension_Everglades.blockTopLayer; - this.fillerBlock = Dimension_Everglades.blockSecondLayer; - this.enableRain = true; - this.enableSnow = false; - this.rainfall = 0.7F; - this.setHeight(new BiomeGenBase.Height(0.3F, 0.5F)); - this.heightVariation = 0.4F; - this.waterColorMultiplier = 0x17290A; - this.rootHeight = -0.25f; //Ground level - - this.spawnableMonsterList.clear(); - this.spawnableCreatureList.clear(); - this.spawnableWaterCreatureList.clear(); - this.spawnableCaveCreatureList.clear(); - - //Enemies - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySickBlaze.class, 100, 2, 6)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 75, 4, 16)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityStaballoyConstruct.class, 20, 1, 2)); - - //Animals - this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 1, 1, 6)); - this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8)); - - } - - private synchronized boolean setBiomeID() { - try { - Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); - Field mClone = mInternalBiomeList; - BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); - BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; - for (int index=0;index EntityClass, int a, int b, int c){ - //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); - this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); - return true; - } - - } - -} diff --git a/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java b/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java deleted file mode 100644 index b69a8ea555..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.IntCache; - -public class GenLayerBiomes extends GenLayer { - - protected BiomeGenBase[] allowedBiomes = { Biome_Everglades.biome, }; - - public GenLayerBiomes(long seed) { - super(seed); - } - - public GenLayerBiomes(long seed, GenLayer genlayer) { - super(seed); - this.parent = genlayer; - } - - @Override - public int[] getInts(int x, int z, int width, int depth) { - int[] dest = IntCache.getIntCache(width * depth); - for (int dz = 0; dz < depth; dz++) { - for (int dx = 0; dx < width; dx++) { - this.initChunkSeed(dx + x, dz + z); - dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID; - } - } - return dest; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java b/src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java deleted file mode 100644 index 8034921dce..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import net.minecraft.world.WorldType; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.GenLayerVoronoiZoom; -import net.minecraft.world.gen.layer.GenLayerZoom; - -public class GenLayerEverglades extends GenLayer { - - public GenLayerEverglades(long seed) { - super(seed); - } - - public static GenLayer[] makeTheWorld(long seed, WorldType type) { - GenLayer biomes = new GenLayerBiomes(1L); - biomes = new GenLayerZoom(1000L, biomes); - biomes = new GenLayerZoom(1001L, biomes); - biomes = new GenLayerZoom(1002L, biomes); - biomes = new GenLayerZoom(1003L, biomes); - biomes = new GenLayerZoom(1004L, biomes); - biomes = new GenLayerZoom(1005L, biomes); - GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes); - biomes.initWorldGenSeed(seed); - genlayervoronoizoom.initWorldGenSeed(seed); - return new GenLayer[] { biomes, genlayervoronoizoom }; - } - - @Override - public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { - return new int[] {}; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java deleted file mode 100644 index f68c97b3c5..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.everglades.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; - -import net.minecraft.block.BlockGrass; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockDarkWorldGround extends BlockGrass implements ITileTooltip{ - - public BlockDarkWorldGround() { - this.setCreativeTab(AddToCreativeTab.tabBOP); - this.setBlockName("blockDarkWorldGround"); - this.setHardness(1.0F); - this.setBlockTextureName("minecraft" + ":" + "grass"); - LanguageRegistry.addName(this, "Unstable Earth"); - } - - @Override - public int getTooltipID() { - return 2; - } - -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java deleted file mode 100644 index a1fcc588b5..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java +++ /dev/null @@ -1,74 +0,0 @@ -package gtPlusPlus.everglades.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockDirt; -import net.minecraft.world.ColorizerGrass; -import net.minecraft.world.IBlockAccess; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockDarkWorldPollutedDirt extends BlockDirt implements ITileTooltip{ - - public BlockDarkWorldPollutedDirt() { - this.setCreativeTab(AddToCreativeTab.tabBOP); - this.setBlockName("blockDarkWorldGround2"); - this.setHardness(0.5F); - this.setBlockTextureName("minecraft" + ":" + "dirt"); - LanguageRegistry.addName(this, "Polluted Soil"); - } - - @Override - @SideOnly(Side.CLIENT) - public int getBlockColor() - { - double d0 = 0.5D; - double d1 = 1.0D; - return ColorizerGrass.getGrassColor(d0, d1); - } - - /** - * Returns the color this block should be rendered. Used by leaves. - */ - @Override - @SideOnly(Side.CLIENT) - public int getRenderColor(int p_149741_1_) - { - return this.getBlockColor(); - } - - /** - * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called - * when first determining what to render. - */ - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) - { - int l = 0; - int i1 = 0; - int j1 = 0; - - for (int k1 = -1; k1 <= 1; ++k1) - { - for (int l1 = -1; l1 <= 1; ++l1) - { - int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); - l += (i2 & 16711680) >> 16; - i1 += (i2 & 65280) >> 8; - j1 += i2 & 255; - } - } - - return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; - } - - @Override - public int getTooltipID() { - return 3; - } - -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java deleted file mode 100644 index 09dea46ab1..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.everglades.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip{ - - public BlockDarkWorldPortalFrame() { - super(Material.iron); - this.setCreativeTab(AddToCreativeTab.tabBOP); - this.setBlockName("blockDarkWorldPortalFrame"); - this.setHardness(3.0F); - this.setLightLevel(0.5F); - this.setBlockTextureName(CORE.MODID + ":" + "metro/TEXTURE_TECH_PANEL_A"); - LanguageRegistry.addName(this, "Containment Frame"); - - } - - @Override - public int getTooltipID() { - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java deleted file mode 100644 index 3c0445c86d..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.everglades.block; - -import net.minecraft.block.material.MapColor; -import net.minecraft.block.material.Material; -import net.minecraft.block.material.MaterialLiquid; - -import net.minecraftforge.fluids.Fluid; - -public class BlockDarkWorldSludgeFluid extends Fluid { - - - public static final Material SLUDGE = new MaterialLiquid(MapColor.dirtColor); - - protected static int mapColor = 0xFFFFFFFF; - protected static float overlayAlpha = 0.2F; - //protected static SoundEvent emptySound = SoundEvents.ITEM_BUCKET_EMPTY; - //protected static SoundEvent fillSound = SoundEvents.ITEM_BUCKET_FILL; - protected static Material material = SLUDGE; - - - public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour) { - this(fluidName, rgbColour, null); - } - - public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour, Float overlayAlpha) { - super(fluidName); - setColor(rgbColour); - if (overlayAlpha != null){ - setAlpha(overlayAlpha.floatValue()); - } - else { - setAlpha(0); - } - } - - @Override - public int getColor() - { - return mapColor; - } - - public BlockDarkWorldSludgeFluid setColor(int parColor) - { - mapColor = parColor; - return this; - } - - public float getAlpha() - { - return overlayAlpha; - } - - public BlockDarkWorldSludgeFluid setAlpha(float parOverlayAlpha) - { - overlayAlpha = parOverlayAlpha; - return this; - } - - /*public blockDarkWorldSludgeFluid setEmptySound(SoundEvent parSound) - { - emptySound = parSound; - return this; - } - - public SoundEvent getEmptySound() - { - return emptySound; - } - - @Override - public blockDarkWorldSludgeFluid setFillSound(SoundEvent parSound) - { - fillSound = parSound; - return this; - } - - @Override - public SoundEvent getFillSound() - { - return fillSound; - }*/ - - public BlockDarkWorldSludgeFluid setMaterial(Material parMaterial) - { - material = parMaterial; - return this; - } - - public Material getMaterial() - { - return material; - } - - /*@Override - public boolean doesVaporize(FluidStack fluidStack) - { - if (block == null) - return false; - return block.getDefaultState().getMaterial() == getMaterial(); - }*/ -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java b/src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java deleted file mode 100644 index e64968888d..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java +++ /dev/null @@ -1,403 +0,0 @@ -package gtPlusPlus.everglades.block; - -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockBreakable; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.everglades.world.TeleporterDimensionMod; - -public class BlockEvergladesPortal extends BlockBreakable implements ITileTooltip{ - IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null; - - public BlockEvergladesPortal() { - super("portal", Material.portal, false); - this.setTickRandomly(true); - this.setHardness(-1.0F); - this.setLightLevel(0.75F); - this.setCreativeTab(CreativeTabs.tabBlock); - this.setBlockName("blockDarkWorldPortal"); - - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIcon(int i, int par2) { - - if (i == 0) - return gor; - - else if (i == 1) - return dol; - - else if (i == 2) - return st1; - - else if (i == 3) - return st2; - - else if (i == 4) - return st4; - - else if (i == 5) - return st3; - - else - return gor; - - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister reg) { - this.gor = reg.registerIcon("portal"); - this.dol = reg.registerIcon("portal"); - this.st1 = reg.registerIcon("portal"); - this.st2 = reg.registerIcon("portal"); - this.st3 = reg.registerIcon("portal"); - this.st4 = reg.registerIcon("portal"); - } - - /** - * Ticks the block if it's been scheduled - */ - @Override - public void updateTick(World par1World, int x, int y, int z, Random par5Random) { - super.updateTick(par1World, x, y, z, par5Random); - - int blockCount = 0; - BlockPos portal = new BlockPos(x, y, z, par1World.provider.dimensionId); - - for (BlockPos side : portal.getSurroundingBlocks()) { - Block b = side.getBlockAtPos(); - if (b == Dimension_Everglades.blockPortalFrame || b == Dimension_Everglades.portalBlock) { - blockCount++; - } - } - if (blockCount < 4) { - par1World.setBlockToAir(x, y, z); - } - - } - - /** - * Returns a bounding box from the pool of bounding boxes (this means - * this box can change after the pool has been cleared to be reused) - */ - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { - return null; - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, - * y, z - */ - @Override - public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - float f; - float f1; - if (par1IBlockAccess.getBlock(par2 - 1, par3, par4) != this && par1IBlockAccess.getBlock(par2 + 1, par3, par4) != this) { - f = 0.125F; - f1 = 0.5F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); - } else { - f = 0.5F; - f1 = 0.125F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); - } - } - - /** - * Is this block (a) opaque and (B) a full 1m cube? This determines - * whether or not to render the shared face of two adjacent blocks and - * also whether the player can attach torches, redstone wire, etc to - * this block. - */ - @Override - public boolean isOpaqueCube() { - return false; - } - - /** - * If this block doesn't render as an ordinary block it will return - * False (examples: signs, buttons, stairs, etc) - */ - @Override - public boolean renderAsNormalBlock() { - return false; - } - - /** - * Checks to see if this location is valid to create a portal and will - * return True if it does. Args: world, x, y, z - */ - public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) { - byte b0 = 0; - byte b1 = 0; - if (par1World.getBlock(par2 - 1, par3, par4) == Dimension_Everglades.blockPortalFrame - || par1World.getBlock(par2 + 1, par3, par4) == Dimension_Everglades.blockPortalFrame) { - b0 = 1; - } - if (par1World.getBlock(par2, par3, par4 - 1) == Dimension_Everglades.blockPortalFrame - || par1World.getBlock(par2, par3, par4 + 1) == Dimension_Everglades.blockPortalFrame) { - b1 = 1; - } - if (b0 == b1) { - return false; - } else { - if (par1World.getBlock(par2 - b0, par3, par4 - b1) == Blocks.air) { - par2 -= b0; - par4 -= b1; - } - int l; - int i1; - for (l = -1; l <= 2; ++l) { - for (i1 = -1; i1 <= 3; ++i1) { - boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3; - if (l != -1 && l != 2 || i1 != -1 && i1 != 3) { - Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); - if (flag) { - if (j1 != Dimension_Everglades.blockPortalFrame) { - return false; - } - } - /* - * else if (j1 != 0 && j1 != - * Main.TutorialFire.blockID) { return false; } - */ - } - } - } - for (l = 0; l < 2; ++l) { - for (i1 = 0; i1 < 3; ++i1) { - par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, this, 0, 2); - } - } - return true; - } - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know - * which neighbor changed (coordinates passed are their own) Args: x, y, - * z, neighbor blockID - */ - public void onNeighborBlockChange(BlockPos pos) { - int x = pos.xPos, y = pos.yPos, z = pos.zPos; - Logger.INFO("Trigger"); - int blockCount = 0; - BlockPos portal = pos; - World par1World = portal.world; - for (BlockPos side : portal.getSurroundingBlocks()) { - Block b = side.getBlockAtPos(); - if (b == Dimension_Everglades.blockPortalFrame || b == Dimension_Everglades.portalBlock) { - blockCount++; - } - } - if (blockCount < 4) { - par1World.setBlockToAir(x, y, z); - par1World.scheduleBlockUpdate(x, y, z, portal.getBlockAtPos(), 0); - } - - - - byte b0 = 0; - byte b1 = 1; - if (par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this) { - b0 = 1; - b1 = 0; - } - int i1; - for (i1 = y; par1World.getBlock(x, i1 - 1, z) == this; --i1) { - ; - } - if (par1World.getBlock(x, i1 - 1, z) != Dimension_Everglades.blockPortalFrame) { - par1World.setBlockToAir(x, y, z); - } else { - int j1; - for (j1 = 1; j1 < 4 && par1World.getBlock(x, i1 + j1, z) == this; ++j1) { - ; - } - if (j1 == 3 && par1World.getBlock(x, i1 + j1, z) == Dimension_Everglades.blockPortalFrame) { - boolean flag = par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this; - boolean flag1 = par1World.getBlock(x, y, z - 1) == this || par1World.getBlock(x, y, z + 1) == this; - if (flag && flag1) { - par1World.setBlockToAir(x, y, z); - } else { - if ((par1World.getBlock(x + b0, y, z + b1) != Dimension_Everglades.blockPortalFrame || par1World - .getBlock(x - b0, y, z - b1) != this) - && (par1World.getBlock(x - b0, y, z - b1) != Dimension_Everglades.blockPortalFrame || par1World.getBlock(x + b0, y, - z + b1) != this)) { - par1World.setBlockToAir(x, y, z); - } - } - } else { - par1World.setBlockToAir(x, y, z); - } - } - } - - @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { - onNeighborBlockChange(new BlockPos(x, y, z, world.provider.dimensionId)); - super.onNeighborBlockChange(world, x, y, z, block); - } - - /*@Override - public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) { - onNeighborBlockChange(new BlockPos(x, y, z, world.)); - super.onNeighborChange(world, x, y, z, tileX, tileY, tileZ); - }*/ - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given - * coordinates. Args: blockAccess, x, y, z, side - */ - public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { - if (par1IBlockAccess.getBlock(par2, par3, par4) == this) { - return false; - } else { - boolean flag = par1IBlockAccess.getBlock(par2 - 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 - 2, par3, par4) != this; - boolean flag1 = par1IBlockAccess.getBlock(par2 + 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 + 2, par3, par4) != this; - boolean flag2 = par1IBlockAccess.getBlock(par2, par3, par4 - 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 - 2) != this; - boolean flag3 = par1IBlockAccess.getBlock(par2, par3, par4 + 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this; - boolean flag4 = flag || flag1; - boolean flag5 = flag2 || flag3; - return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3)); - } - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - @Override - public int quantityDropped(Random par1Random) { - return 0; - } - - /** - * Triggered whenever an entity collides with this block (enters into - * the block). Args: world, x, y, z, entity - */ - @Override - public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { - if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { - EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity; - if (thePlayer.timeUntilPortal > 0) { - thePlayer.timeUntilPortal = 100; - } else if (thePlayer.dimension != Dimension_Everglades.DIMID) { - thePlayer.timeUntilPortal = 100; - thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, Dimension_Everglades.DIMID, - new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(Dimension_Everglades.DIMID))); - } else { - thePlayer.timeUntilPortal = 100; - thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, - new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(0))); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha - */ - public int getRenderBlockPass() { - return 1; - } - - @Override - @SideOnly(Side.CLIENT) - /** - * A randomly called display update to be able to add particles or other items for display - */ - public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { - if (CORE.RANDOM.nextInt(100) == 0) { - par1World.playSound(par2 + 0.5D, par3 + 0.5D, par4 + 0.5D, "portal.portal", 0.5F, - CORE.RANDOM.nextFloat() * 0.4F + 0.8F, false); - } - for (int l = 0; l < 4; ++l) { - double d0 = par2 + CORE.RANDOM.nextFloat(); - double d1 = par3 + CORE.RANDOM.nextFloat(); - double d2 = par4 + CORE.RANDOM.nextFloat(); - double d3 = 0.0D; - double d4 = 0.0D; - double d5 = 0.0D; - int i1 = CORE.RANDOM.nextInt(2) * 2 - 1; - d3 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - d4 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - d5 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - if (par1World.getBlock(par2 - 1, par3, par4) != this && par1World.getBlock(par2 + 1, par3, par4) != this) { - d0 = par2 + 0.5D + 0.25D * i1; - d3 = CORE.RANDOM.nextFloat() * 2.0F * i1; - } else { - d2 = par4 + 0.5D + 0.25D * i1; - d5 = CORE.RANDOM.nextFloat() * 2.0F * i1; - } - par1World.spawnParticle("reddust", d0+0.1D, d1, d2, d3, d4, d5); - par1World.spawnParticle("smoke", d0, d1+0.1D, d2, 0, 0, 0); - - Random R = new Random(); - - if (R.nextInt(10) == 0){ - par1World.spawnParticle("largesmoke", d0, d1, d2, 0, 0+0.2D, 0); - } - else if (R.nextInt(5)==1){ - par1World.spawnParticle("flame", d0, d1, d2, 0, 0+0.1D, 0); - } - } - } - - @SideOnly(Side.CLIENT) - /** - * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) - */ - public int idPicked(World par1World, int par2, int par3, int par4) { - return 0; - } - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - return Utils.rgbtoHexValue(0, 255, 0); - } - - @Override - public int getRenderColor(final int aMeta) { - return Utils.rgbtoHexValue(0, 255, 0); - } - - @Override - public String getLocalizedName() { - return EnumChatFormatting.OBFUSCATED+super.getLocalizedName(); - } - - @Override - public int getTooltipID() { - return 1; - } -} - - diff --git a/src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java b/src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java deleted file mode 100644 index 9d0e425e3a..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.everglades.block; - -import static gtPlusPlus.everglades.dimension.Dimension_Everglades.*; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.init.Blocks; - -import gtPlusPlus.core.block.base.BlockBaseFluid; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.everglades.item.ItemBlockToxicEverglades; -import gtPlusPlus.everglades.item.ItemEvergladesPortalTrigger; -import net.minecraftforge.fluids.FluidRegistry; - -public class DarkWorldContentLoader { - - //Static Vars - public static BlockDarkWorldSludgeFluid SLUDGE; - - - public synchronized static void run() { - initMisc(); - initItems(); - initBlocks(); - } - - public synchronized static boolean initMisc(){ - - //Fluids - SLUDGE = (BlockDarkWorldSludgeFluid) new BlockDarkWorldSludgeFluid( - "sludge", - Utils.rgbtoHexValue(30, 130, 30)) - .setDensity(1800) - .setGaseous(false) - .setLuminosity(2) - .setViscosity(25000) - .setTemperature(300); - FluidRegistry.registerFluid(SLUDGE); - - return true; - } - - public synchronized static boolean initItems(){ - portalItem = (ItemEvergladesPortalTrigger) (new ItemEvergladesPortalTrigger().setUnlocalizedName("everglades.trigger")); - GameRegistry.registerItem(portalItem, "everglades.trigger"); - return true; - } - - public synchronized static boolean initBlocks(){ - - //Create Block Instances - blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, BlockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("fluidSludge"); - portalBlock = new BlockEvergladesPortal(); - blockTopLayer = new BlockDarkWorldGround(); - blockSecondLayer = new BlockDarkWorldPollutedDirt(); - blockPortalFrame = new BlockDarkWorldPortalFrame(); - - //Registry - GameRegistry.registerBlock(portalBlock, ItemBlockToxicEverglades.class, "dimensionDarkWorld_portal"); - GameRegistry.registerBlock(blockTopLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround"); - GameRegistry.registerBlock(blockSecondLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround2"); - GameRegistry.registerBlock(blockPortalFrame, ItemBlockToxicEverglades.class, "blockDarkWorldPortalFrame"); - - //Make Flammable - Blocks.fire.setFireInfo(blockTopLayer, 30, 20); - - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java b/src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java deleted file mode 100644 index 0ff265a4ae..0000000000 --- a/src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java +++ /dev/null @@ -1,510 +0,0 @@ -package gtPlusPlus.everglades.chunk; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockFalling; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.util.IProgressUpdate; -import net.minecraft.util.MathHelper; -import net.minecraft.world.*; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.*; -import net.minecraft.world.gen.feature.WorldGenLakes; -import net.minecraft.world.gen.structure.MapGenMineshaft; -import net.minecraft.world.gen.structure.MapGenScatteredFeature; -import net.minecraft.world.gen.structure.MapGenVillage; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.terraingen.ChunkProviderEvent; -import net.minecraftforge.event.terraingen.PopulateChunkEvent; -import net.minecraftforge.event.terraingen.TerrainGen; - -public class ChunkProviderModded implements IChunkProvider { - private Random rand; - private NoiseGeneratorOctaves field_147431_j; - private NoiseGeneratorOctaves field_147432_k; - private NoiseGeneratorOctaves field_147429_l; - private NoiseGeneratorPerlin field_147430_m; - /** - * A NoiseGeneratorOctaves used in generating terrain - */ - public NoiseGeneratorOctaves noiseGen5; - /** - * A NoiseGeneratorOctaves used in generating terrain - */ - public NoiseGeneratorOctaves noiseGen6; - public NoiseGeneratorOctaves mobSpawnerNoise; - /** - * Reference to the World object. - */ - private World worldObj; - private WorldType field_147435_p; - private final double[] field_147434_q; - private final float[] parabolicField; - private double[] stoneNoise = new double[256]; - private MapGenBase caveGenerator = new MapGenCaves(); - /** - * Holds Stronghold Generator - */ - // private MapGenStronghold strongholdGenerator = new - // MapGenStronghold(); - /** - * Holds Village Generator - */ - private MapGenVillage villageGenerator = new MapGenVillage(); - /** - * Holds Mineshaft Generator - */ - private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft(); - private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); - /** - * Holds ravine generator - */ - private MapGenBase ravineGenerator = new MapGenRavine(); - /** - * The biomes that are used to generate the chunk - */ - private BiomeGenBase[] biomesForGeneration; - double[] field_147427_d; - double[] field_147428_e; - double[] field_147425_f; - double[] field_147426_g; - int[][] field_73219_j = new int[32][32]; - { - caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); - /* - * strongholdGenerator = (MapGenStronghold) - * TerrainGen.getModdedMapGen(strongholdGenerator, - * net.minecraftforge.event.terraingen.InitMapGenEvent.EventType. - * STRONGHOLD); - */ - villageGenerator = (MapGenVillage) TerrainGen.getModdedMapGen(villageGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE); - mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT); - scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE); - ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE); - } - - public ChunkProviderModded(World par1World, long par2) { - this.worldObj = par1World; - this.field_147435_p = par1World.getWorldInfo().getTerrainType(); - this.rand = new Random(par2); - this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16); - this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16); - this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8); - this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4); - this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); - this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); - this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); - this.field_147434_q = new double[825]; - this.parabolicField = new float[25]; - - for (int j = -2; j <= 2; ++j) { - for (int k = -2; k <= 2; ++k) { - float f = 10.0F / MathHelper.sqrt_float(j * j + k * k + 0.2F); - this.parabolicField[j + 2 + (k + 2) * 5] = f; - } - } - - NoiseGenerator[] noiseGens = { field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, - noiseGen6, mobSpawnerNoise }; - noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens); - this.field_147431_j = (NoiseGeneratorOctaves) noiseGens[0]; - this.field_147432_k = (NoiseGeneratorOctaves) noiseGens[1]; - this.field_147429_l = (NoiseGeneratorOctaves) noiseGens[2]; - this.field_147430_m = (NoiseGeneratorPerlin) noiseGens[3]; - this.noiseGen5 = (NoiseGeneratorOctaves) noiseGens[4]; - this.noiseGen6 = (NoiseGeneratorOctaves) noiseGens[5]; - this.mobSpawnerNoise = (NoiseGeneratorOctaves) noiseGens[6]; - } - - public void func_147424_a(int p_147424_1_, int p_147424_2_, Block[] p_147424_3_) { - byte b0 = 63; - this.biomesForGeneration = this.worldObj.getWorldChunkManager() - .getBiomesForGeneration(this.biomesForGeneration, p_147424_1_ * 4 - 2, p_147424_2_ * 4 - 2, 10, 10); - this.func_147423_a(p_147424_1_ * 4, 0, p_147424_2_ * 4); - - for (int k = 0; k < 4; ++k) { - int l = k * 5; - int i1 = (k + 1) * 5; - - for (int j1 = 0; j1 < 4; ++j1) { - int k1 = (l + j1) * 33; - int l1 = (l + j1 + 1) * 33; - int i2 = (i1 + j1) * 33; - int j2 = (i1 + j1 + 1) * 33; - - for (int k2 = 0; k2 < 32; ++k2) { - double d0 = 0.125D; - double d1 = this.field_147434_q[k1 + k2]; - double d2 = this.field_147434_q[l1 + k2]; - double d3 = this.field_147434_q[i2 + k2]; - double d4 = this.field_147434_q[j2 + k2]; - double d5 = (this.field_147434_q[k1 + k2 + 1] - d1) * d0; - double d6 = (this.field_147434_q[l1 + k2 + 1] - d2) * d0; - double d7 = (this.field_147434_q[i2 + k2 + 1] - d3) * d0; - double d8 = (this.field_147434_q[j2 + k2 + 1] - d4) * d0; - - for (int l2 = 0; l2 < 8; ++l2) { - double d9 = 0.25D; - double d10 = d1; - double d11 = d2; - double d12 = (d3 - d1) * d9; - double d13 = (d4 - d2) * d9; - - for (int i3 = 0; i3 < 4; ++i3) { - int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2; - short short1 = 256; //TODO - wots dis do - j3 -= short1; - double d14 = 0.25D; - double d16 = (d11 - d10) * d14; - double d15 = d10 - d16; - - for (int k3 = 0; k3 < 4; ++k3) { - if ((d15 += d16) > 0.0D) { - p_147424_3_[j3 += short1] = Dimension_Everglades.blockMainFiller; - } - else if (k2 * 8 + l2 < b0) { - try { - p_147424_3_[j3 += short1] = Dimension_Everglades.blockFluidLakes; //River Fluid . - } - catch (Throwable t){ - p_147424_3_[j3 += short1] = Blocks.water; //River Fluid Fallback - } - } - else { - p_147424_3_[j3 += short1] = null; - } - } - - d10 += d12; - d11 += d13; - } - - d1 += d5; - d2 += d6; - d3 += d7; - d4 += d8; - } - } - } - } - } - - public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_) { - @SuppressWarnings("deprecation") - ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, - p_147422_2_, p_147422_3_, p_147422_5_); - MinecraftForge.EVENT_BUS.post(event); - if (event.getResult() == cpw.mods.fml.common.eventhandler.Event.Result.DENY) - return; - - double d0 = 0.03125D; - this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16, - 16, d0 * 2.0D, d0 * 2.0D, 1.0D); - - for (int k = 0; k < 16; ++k) { - for (int l = 0; l < 16; ++l) { - BiomeGenBase biomegenbase = p_147422_5_[l + k * 16]; - biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, - p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]); - } - } - } - - /** - * loads or generates the chunk at the chunk location specified - */ - @Override - public Chunk loadChunk(int par1, int par2) { - return this.provideChunk(par1, par2); - } - - /** - * Will return back a chunk, if it doesn't exist and its not a MP client - * it will generates all the blocks for the specified chunk from the map - * seed and chunk seed - */ - @Override - public Chunk provideChunk(int par1, int par2) { - this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L); - Block[] ablock = new Block[65536]; - byte[] abyte = new byte[65536]; - this.func_147424_a(par1, par2, ablock); - this.biomesForGeneration = this.worldObj.getWorldChunkManager() - .loadBlockGeneratorData(this.biomesForGeneration, par1 * 16, par2 * 16, 16, 16); - this.replaceBlocksForBiome(par1, par2, ablock, abyte, this.biomesForGeneration); - - Chunk chunk = new Chunk(this.worldObj, ablock, abyte, par1, par2); - byte[] abyte1 = chunk.getBiomeArray(); - - for (int k = 0; k < abyte1.length; ++k) { - abyte1[k] = (byte) this.biomesForGeneration[k].biomeID; - } - - chunk.generateSkylightMap(); - return chunk; - } - - private void func_147423_a(int p_147423_1_, int p_147423_2_, int p_147423_3_) { - this.field_147426_g = this.noiseGen6.generateNoiseOctaves(this.field_147426_g, p_147423_1_, p_147423_3_, 5, - 5, 200.0D, 200.0D, 0.5D); - this.field_147427_d = this.field_147429_l.generateNoiseOctaves(this.field_147427_d, p_147423_1_, - p_147423_2_, p_147423_3_, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D); - this.field_147428_e = this.field_147431_j.generateNoiseOctaves(this.field_147428_e, p_147423_1_, - p_147423_2_, p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); - this.field_147425_f = this.field_147432_k.generateNoiseOctaves(this.field_147425_f, p_147423_1_, - p_147423_2_, p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); - int l = 0; - int i1 = 0; - for (int j1 = 0; j1 < 5; ++j1) { - for (int k1 = 0; k1 < 5; ++k1) { - float f = 0.0F; - float f1 = 0.0F; - float f2 = 0.0F; - byte b0 = 2; - BiomeGenBase biomegenbase = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; - - for (int l1 = -b0; l1 <= b0; ++l1) { - for (int i2 = -b0; i2 <= b0; ++i2) { - BiomeGenBase biomegenbase1 = this.biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10]; - float f3 = biomegenbase1.rootHeight; - float f4 = biomegenbase1.heightVariation; - - if (this.field_147435_p == WorldType.AMPLIFIED && f3 > 0.0F) { - f3 = 1.0F + f3 * 2.0F; - f4 = 1.0F + f4 * 4.0F; - } - - float f5 = this.parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F); - - if (biomegenbase1.rootHeight > biomegenbase.rootHeight) { - f5 /= 2.0F; - } - - f += f4 * f5; - f1 += f3 * f5; - f2 += f5; - } - } - - f /= f2; - f1 /= f2; - f = f * 0.9F + 0.1F; - f1 = (f1 * 4.0F - 1.0F) / 8.0F; - double d13 = this.field_147426_g[i1] / 8000.0D; - - if (d13 < 0.0D) { - d13 = -d13 * 0.3D; - } - - d13 = d13 * 3.0D - 2.0D; - - if (d13 < 0.0D) { - d13 /= 2.0D; - - if (d13 < -1.0D) { - d13 = -1.0D; - } - - d13 /= 1.4D; - d13 /= 2.0D; - } - else { - if (d13 > 1.0D) { - d13 = 1.0D; - } - - d13 /= 8.0D; - } - - ++i1; - double d12 = f1; - double d14 = f; - d12 += d13 * 0.2D; - d12 = d12 * 8.5D / 8.0D; - double d5 = 8.5D + d12 * 4.0D; - - for (int j2 = 0; j2 < 33; ++j2) { - double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; - - if (d6 < 0.0D) { - d6 *= 4.0D; - } - - double d7 = this.field_147428_e[l] / 512.0D; - double d8 = this.field_147425_f[l] / 512.0D; - double d9 = (this.field_147427_d[l] / 10.0D + 1.0D) / 2.0D; - double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; - - if (j2 > 29) { - double d11 = (j2 - 29) / 3.0F; - d10 = d10 * (1.0D - d11) + -10.0D * d11; - } - - this.field_147434_q[l] = d10; - ++l; - } - } - } - } - - /** - * Checks to see if a chunk exists at x, y - */ - @Override - public boolean chunkExists(int par1, int par2) { - return true; - } - - /** - * Populates chunk with ores etc etc - */ - @Override - public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { - BlockFalling.fallInstantly = false; - int k = par2 * 16; - int l = par3 * 16; - BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); - this.rand.setSeed(this.worldObj.getSeed()); - long i1 = this.rand.nextLong() / 2L * 2L + 1L; - long j1 = this.rand.nextLong() / 2L * 2L + 1L; - this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed()); - boolean flag = false; - - MinecraftForge.EVENT_BUS - .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); - - int k1; - int l1; - int i2; - - if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag - && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, - flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE)) { - k1 = k + this.rand.nextInt(16) + 8; - l1 = this.rand.nextInt(256); - i2 = l + this.rand.nextInt(16) + 8; - try { - (new WorldGenLakes(Dimension_Everglades.blockFluidLakes)).generate(this.worldObj, this.rand, k1, l1, i2); - } catch (NullPointerException n){ - n.getStackTrace(); - (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); - Logger.INFO("Error while generating DarkWorld Lake."); - } - } - - if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, - net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA) && !flag - && this.rand.nextInt(8) == 0) { - k1 = k + this.rand.nextInt(16) + 8; - l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); - i2 = l + this.rand.nextInt(16) + 8; - - if (l1 < 63 || this.rand.nextInt(10) == 0) { //Changes 63 -> 128 - try{ - (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); - } catch (NullPointerException n){ - Logger.INFO("Error while generating DarkWorld Lake. [2]"); - } - } - } - biomegenbase.decorate(this.worldObj, this.rand, k, l); - SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); - k += 8; - l += 8; - - MinecraftForge.EVENT_BUS - .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); - - BlockFalling.fallInstantly = false; - } - - /** - * Two modes of operation: if passed true, save all Chunks in one go. If - * passed false, save up to two chunks. Return true if all chunks have - * been saved. - */ - @Override - public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate) { - return true; - } - - /** - * Save extra data not associated with any Chunk. Not saved during - * autosave, only during world unload. Currently unimplemented. - */ - @Override - public void saveExtraData() { - } - - /** - * Unloads chunks that are marked to be unloaded. This is not guaranteed - * to unload every such chunk. - */ - @Override - public boolean unloadQueuedChunks() { - return false; - } - - /** - * Returns if the IChunkProvider supports saving. - */ - @Override - public boolean canSave() { - return true; - } - - /** - * Converts the instance data to a readable string. - */ - @Override - public String makeString() { - return "RandomLevelSource"; - } - - /** - * Returns a list of creatures of the specified type that can spawn at - * the given location. - */ - @SuppressWarnings("rawtypes") - @Override - public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { - BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4); - return par1EnumCreatureType == EnumCreatureType.monster - && this.scatteredFeatureGenerator.func_143030_a(par2, par3, par4) - ? this.scatteredFeatureGenerator.getScatteredFeatureSpawnList() - : biomegenbase.getSpawnableList(par1EnumCreatureType); - } - - @Override - public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, int p_147416_5_) { - return - "Village".equals(p_147416_2_) && - this.villageGenerator != null ? - this.villageGenerator.func_151545_a(p_147416_1_, - p_147416_3_, p_147416_4_, p_147416_5_) : - null; - } - - @Override - public int getLoadedChunkCount() { - return 0; - } - - @Override - public void recreateStructures(int par1, int par2) { - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java b/src/Java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java deleted file mode 100644 index 33b36a9ae0..0000000000 --- a/src/Java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.everglades.dimension; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.everglades.block.BlockEvergladesPortal; -import gtPlusPlus.everglades.item.ItemEvergladesPortalTrigger; -import gtPlusPlus.everglades.world.WorldProviderMod; -import net.minecraftforge.common.DimensionManager; - -public class Dimension_Everglades { - - public Object instance; - public static int DIMID = CORE.EVERGLADES_ID; - public static BlockEvergladesPortal portalBlock; - public static ItemEvergladesPortalTrigger portalItem; - public static Block blockTopLayer; - public static Block blockSecondLayer; - public static Block blockMainFiller = Blocks.stone; - public static Block blockSecondaryFiller; - public static Block blockFluidLakes; - public static Block blockPortalFrame; - - public void load() { - DimensionManager.registerProviderType(DIMID, WorldProviderMod.class, false); - DimensionManager.registerDimension(DIMID, DIMID); - } - -} diff --git a/src/Java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java b/src/Java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java deleted file mode 100644 index 0314f71eec..0000000000 --- a/src/Java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.everglades.gen; - -import java.util.Random; - -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenWaterlily; - -public class WorldGenDeadLilly extends WorldGenWaterlily { - - @Override - public boolean generate(World world, Random rand, int x, int y, int z) - { - for (int l = 0; l < 10; ++l) - { - int i1 = x + rand.nextInt(8) - rand.nextInt(8); - int j1 = y + rand.nextInt(4) - rand.nextInt(4); - int k1 = z + rand.nextInt(8) - rand.nextInt(8); - - if (world.isAirBlock(i1, j1, k1) && Blocks.waterlily.canPlaceBlockAt(world, i1, j1, k1)) - { - world.setBlock(i1, j1, k1, Blocks.waterlily, 0, 2); - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java b/src/Java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java deleted file mode 100644 index 303f7353f0..0000000000 --- a/src/Java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java +++ /dev/null @@ -1,90 +0,0 @@ -package gtPlusPlus.everglades.gen; - -import static gtPlusPlus.core.lib.CORE.PI; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenMinable; - -import gtPlusPlus.api.objects.Logger; - -public class WorldGenMinable_Custom extends WorldGenMinable -{ - /** The block to generate. */ - private Block oreToGenerate; - /** The number of blocks to generate. */ - private int numberOfBlocks; - /** The block to replace. */ - private Block blockToReplace; - /** The meta of the block. */ - private int mineableBlockMeta; - - public WorldGenMinable_Custom(final Block block, final int count){ - super(block, count, Blocks.stone); - } - - public WorldGenMinable_Custom(final Block block, final int count, final Block target){ - super(block, count, target); - this.oreToGenerate = block; - this.numberOfBlocks = count; - this.blockToReplace = target; - } - - public WorldGenMinable_Custom(final Block block, final int meta, final int number, final Block target){ - this(block, number, target); - this.mineableBlockMeta = meta; - } - - @Override - public boolean generate(final World world, final Random rand, final int x, final int y, final int z) - { - final float f = rand.nextFloat() * PI; - final double d0 = x + 16 + ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F); - final double d1 = (x + 16) - ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F); - final double d2 = z + 16 + ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F); - final double d3 = (z + 16) - ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F); - final double d4 = (y + rand.nextInt(8)) - 1; - final double d5 = (y + rand.nextInt(8)) - 1; - - for (int l = 0; l <= this.numberOfBlocks; ++l) - { - final double d6 = d0 + (((d1 - d0) * l) / this.numberOfBlocks); - final double d7 = d4 + (((d5 - d4) * l) / this.numberOfBlocks); - final double d8 = d2 + (((d3 - d2) * l) / this.numberOfBlocks); - final double d9 = (rand.nextDouble() * this.numberOfBlocks) / 8.0D; - final double d10 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D; - final double d11 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D; - final int i1 = MathHelper.floor_double(d6 - (d10 / 2.0D)); - final int j1 = MathHelper.floor_double(d7 - (d11 / 2.0D)); - final int k1 = MathHelper.floor_double(d8 - (d10 / 2.0D)); - final int l1 = MathHelper.floor_double(d6 + (d10 / 2.0D)); - final int i2 = MathHelper.floor_double(d7 + (d11 / 2.0D)); - final int j2 = MathHelper.floor_double(d8 + (d10 / 2.0D)); - - for (int k2 = i1; k2 <= l1; ++k2){ - final double d12 = ((k2 + 0.5D) - d6) / (d10 / 2.0D); - if ((d12 * d12) < 1.0D){ - for (int l2 = j1; l2 <= i2; ++l2){ - final double d13 = ((l2 + 0.5D) - d7) / (d11 / 2.0D); - if (((d12 * d12) + (d13 * d13)) < 1.0D){ - for (int i3 = k1; i3 <= j2; ++i3){ - final double d14 = ((i3 + 0.5D) - d8) / (d10 / 2.0D); - if ((((d12 * d12) + (d13 * d13) + (d14 * d14)) < 1.0D) && world.getBlock(k2, l2, i3).isReplaceableOreGen(world, k2, l2, i3, this.blockToReplace)) - { - world.setBlock(k2, l2, i3, this.oreToGenerate, this.mineableBlockMeta, 3); - Logger.INFO("Generated a "+this.oreToGenerate.getLocalizedName()+" at x: "+k2+" | y: "+l2+" | z: "+i3); - } - } - } - } - } - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java b/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java deleted file mode 100644 index 2035cfe096..0000000000 --- a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java +++ /dev/null @@ -1,49 +0,0 @@ -package gtPlusPlus.everglades.gen.gt; - -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.ConcurrentHashMap; - -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -import gtPlusPlus.xmod.gregtech.HANDLER_GT; - -public abstract class WorldGen_GT { - public final String mWorldGenName; - public final boolean mEnabled; - private final Map mDimensionMap = new ConcurrentHashMap(); - - public WorldGen_GT(String aName, List aList, boolean aDefault) { - this.mWorldGenName = aName; - this.mEnabled = HANDLER_GT.sCustomWorldgenFile.get("worldgen", this.mWorldGenName, aDefault); - if (this.mEnabled) { - aList.add(this); - } - - } - - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return false; - } - - public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return false; - } - - public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { - String aDimName = aWorld.provider.getDimensionName(); - Boolean tAllowed = (Boolean) this.mDimensionMap.get(aDimName); - if (tAllowed == null) { - boolean tValue = HANDLER_GT.sCustomWorldgenFile.get("worldgen.dimensions." + this.mWorldGenName, aDimName, - aDimensionType == aAllowedDimensionType); - this.mDimensionMap.put(aDimName, Boolean.valueOf(tValue)); - return tValue; - } else { - return tAllowed.booleanValue(); - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java b/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java deleted file mode 100644 index f1d62cf58e..0000000000 --- a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java +++ /dev/null @@ -1,471 +0,0 @@ -package gtPlusPlus.everglades.gen.gt; - -import java.util.*; - -import cpw.mods.fml.common.IWorldGenerator; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.feature.WorldGenMinable; - -import gregtech.api.util.GT_Log; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; - -public class WorldGen_GT_Base implements IWorldGenerator { - - /** - * Class Variables - */ - - /** - * Control percentage of filled 3x3 chunks. Lower number means less oreveins - * spawn - */ - public static int oreveinPercentage; - /** - * Control number of attempts to find a valid orevein. Generally this - * maximum limit isn't hit, selecting a vein is cheap - */ - public static int oreveinAttempts; - /** - * Control number of attempts to place a valid orevein. If a vein wasn't - * placed due to height restrictions, completely in the water, etc, another - * attempt is tried. - */ - public static int oreveinMaxPlacementAttempts; - /** - * Debug parameter for world generation. Tracks chunks added/removed from - * run queue. - */ - public static boolean debugWorldGen = false; - /** - * Try re-implement Richard Hendrick's Chunk by Chunk Ore Generation from - * his GT5u fork. - */ - - public static List mList = new ArrayList(); - public static HashSet ProcChunks = new HashSet(); - // This is probably not going to work. Trying to create a fake orevein to - // put into hashtable when there will be no ores in a vein. - public static WorldGen_GT_Ore_Layer noOresInVein = new WorldGen_GT_Ore_Layer("vein0", 0, 255, 0, 0, - 0, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON); - - public static Hashtable validOreveins = new Hashtable( - 1024); - - public boolean mIsGenerating = false; - public static final Object listLock = new Object(); - // private static boolean gcAsteroids = true; - - public WorldGen_GT_Base() { - if (debugWorldGen) { - GT_Log.out.println("GTPP_Worldgenerator created"); - } - } - - @Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, - IChunkProvider chunkProvider) { - if (world.provider.dimensionId == Dimension_Everglades.DIMID) { - generateSafely(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); - } - } - - public synchronized void generateSafely(Random random, int chunkX, int chunkZ, World world, - IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - int xDim = Dimension_Everglades.DIMID; - switch (world.provider.dimensionId) { - case -1: // Nether - // generateNether(world, random, chunkX * 16, chunkZ * 16); - break; - case 0: // Overworld - // generateSurface(world, random, chunkX * 16, chunkZ * 16); - break; - case 1: // End - // generateEnd(world, random, chunkX * 16, chunkZ * 16); - break; - default: // Any other dimension - if (world.provider.dimensionId != xDim) { - break; - } - else { - generateEverglades(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); - break; - } - } - } - - private synchronized void generateEverglades(Random aRandom, int aX, int aZ, World aWorld, - IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - Logger.WORLD("Trying to Generate Dimension."); - synchronized (listLock) { - Logger.WORLD("Locked List addition."); - if (WorldGen_GT_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) + 1), aX, aZ, - Dimension_Everglades.DIMID, - aWorld, aChunkGenerator, aChunkProvider, - aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName))){ - Logger.WORLD("Locked List addition. Success."); - } - else { - Logger.WORLD("Locked List addition. Fail."); - } - if (debugWorldGen) - GT_Log.out.println("ADD WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId - + " chunk x:" + aX + " z:" + aZ + " SIZE: " + WorldGen_GT_Base.mList.size()); - } - - if (!this.mIsGenerating) { - Logger.WORLD("Is not generating."); - this.mIsGenerating = true; - Logger.WORLD("Setting Generation to true."); - int mList_sS = WorldGen_GT_Base.mList.size(); - mList_sS = Math.min(mList_sS, 3); // Run a maximum of 3 chunks at a - // time through worldgen. Extra - // chunks get done later. - for (int i = 0; i < mList_sS; i++) { - WorldGenContainer toRun = (WorldGenContainer) WorldGen_GT_Base.mList.get(0); - if (debugWorldGen) - GT_Log.out.println("RUN WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId - + " chunk x:" + toRun.mX + " z:" + toRun.mZ + " SIZE: " + WorldGen_GT_Base.mList.size() - + " i: " + i); - synchronized (listLock) { - Logger.WORLD("Locked List Removal."); - WorldGen_GT_Base.mList.remove(0); - } - toRun.run(); - } - this.mIsGenerating = false; - Logger.WORLD("Is Generating now set to false.."); - } - } - - public void generateOre(Block block, World world, Random random, int chunk_x, int chunk_z, int maxX, int maxZ, - int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block generateIn) { - int heightRange = maxY - minY; - WorldGenMinable worldgenminable = new WorldGenMinable(block, maxVeinSize, generateIn); - for (int k1 = 0; k1 < chancesToSpawn; ++k1) { - int xrand = random.nextInt(16); - int yrand = random.nextInt(heightRange) + minY; - int zrand = random.nextInt(16); - worldgenminable.generate(world, random, chunk_x + xrand, yrand, chunk_z + zrand); - } - } - - public static class WorldGenContainer implements Runnable { - public final Random mRandom; - public final int mX; - public final int mZ; - public final int mDimensionType; - public final World mWorld; - public final IChunkProvider mChunkGenerator; - public final IChunkProvider mChunkProvider; - public final String mBiome; - - // Local class to track which orevein seeds must be checked when doing - // chunkified worldgen - class NearbySeeds { - public int mX; - public int mZ; - - NearbySeeds(int x, int z) { - this.mX = x; - this.mZ = z; - } - }; - - public static ArrayList seedList = new ArrayList(); - - // aX and aZ are now the by-chunk X and Z for the chunk of interest - public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, - IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { - this.mRandom = aRandom; - this.mX = aX; - this.mZ = aZ; - this.mDimensionType = aDimensionType; - this.mWorld = aWorld; - this.mChunkGenerator = aChunkGenerator; - this.mChunkProvider = aChunkProvider; - this.mBiome = aBiome; - } - - public void worldGenFindVein(int oreseedX, int oreseedZ) { - // Explanation of oreveinseed implementation. - // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen - // passes, one with getSeed set to +1 the original world seed. This - // pushes that +1 off the low bits of oreseedZ, so that the hashes - // are far apart for the two passes. - // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the - // dimension in the top bits of the hash, to make sure to get unique - // hashes per dimension - // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in - // the bits 29-55. Cuts off the top few bits of the chunk so we have - // bits for dimension. - // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the - // bits 0-27. Cuts off the top few bits of the chunk so we have bits - // for dimension. - long oreveinSeed = (this.mWorld.getSeed() << 16) ^ ((this.mWorld.provider.dimensionId & 0xffL) << 56 - | ((oreseedX & 0x000000000fffffffL) << 28) | (oreseedZ & 0x000000000fffffffL)); // Use - // an - // RNG - // that - // is - // identical - // every - // time - // it - // is - // called - // for - // this - // oreseed. - XSTR oreveinRNG = new XSTR(oreveinSeed); - int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the - // dice, see - // if we get - // an - // orevein - // here at - // all - int noOrePlacedCount = 0; - String tDimensionName = ""; - if (debugWorldGen) { - tDimensionName = this.mWorld.provider.getDimensionName(); - } - - if (debugWorldGen){ - GT_Log.out.println(" Finding oreveins for oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" - + this.mZ + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " worldSeed=" - + this.mWorld.getSeed()); - } - - Logger.INFO("[World Generation Debug] !validOreveins.containsKey(oreveinSeed) | oreveinSeed: "+oreveinSeed); - // Search for a valid orevein for this dimension - if (!validOreveins.containsKey(oreveinSeed)) { - - - Logger.INFO("[World Generation Debug] oreveinPercentageRoll < oreveinPercentage? "+((oreveinPercentageRoll < oreveinPercentage))); - Logger.INFO("[World Generation Debug] WorldGen_GT_Ore_Layer.sWeight > 0? "+(WorldGen_GT_Ore_Layer.sWeight > 0)); - Logger.INFO("[World Generation Debug] WorldGen_GT_Ore_Layer.sList.size() > 0? "+(WorldGen_GT_Ore_Layer.sList.size() > 0)); - if ((oreveinPercentageRoll < oreveinPercentage) && (WorldGen_GT_Ore_Layer.sWeight > 0) - && (WorldGen_GT_Ore_Layer.sList.size() > 0)) { - int placementAttempts = 0; - boolean oreveinFound = false; - int i; - for (i = 0; (i < oreveinAttempts) && (!oreveinFound) - && (placementAttempts < oreveinMaxPlacementAttempts); i++) { - Logger.INFO("[World Generation Debug] i: "+i); - Logger.INFO("[World Generation Debug] placementAttempts: "+placementAttempts); - Logger.INFO("[World Generation Debug] oreveinAttempts: "+oreveinAttempts); - Logger.INFO("[World Generation Debug] (placementAttempts < oreveinMaxPlacementAttempts): "+(placementAttempts < oreveinMaxPlacementAttempts)); - Logger.INFO("[World Generation Debug] oreveinFound: "+oreveinFound); - int tRandomWeight = oreveinRNG.nextInt(WorldGen_GT_Ore_Layer.sWeight); - for (WorldGen_GT_Ore_Layer tWorldGen : WorldGen_GT_Ore_Layer.sList) { - Logger.INFO("[World Generation Debug] Iterating sList - Size: "+WorldGen_GT_Ore_Layer.sList.size()); - tRandomWeight -= (tWorldGen).mWeight; - if (tRandomWeight <= 0) { - try { - // Adjust the seed so that this layer has a - // series of unique random numbers. - // Otherwise multiple attempts at this same - // oreseed will get the same offset and X/Z - // values. If an orevein failed, any orevein - // with the - // same minimum heights would fail as well. - // This prevents that, giving each orevein a - // unique height each pass through here. - int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, - new XSTR(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))), this.mBiome, - this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, - oreseedZ * 16, this.mChunkGenerator, this.mChunkProvider); - switch (placementResult) { - case WorldGen_GT_Ore_Layer.ORE_PLACED: - if (debugWorldGen) - GT_Log.out.println(" Added oreveinSeed=" + oreveinSeed - + " tries at oremix=" + i + " placementAttempts=" - + placementAttempts + " dimensionName=" + tDimensionName); - validOreveins.put(oreveinSeed, tWorldGen); - oreveinFound = true; - Logger.INFO("[World Generation Debug] ORE_PLACED"); - break; - case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: - placementAttempts++; - Logger.INFO("[World Generation Debug] NO_ORE_IN_BOTTOM_LAYER | Attempts: "+placementAttempts); - // SHould do retry in this case - // until out of chances - break; - case WorldGen_GT_Ore_Layer.NO_OVERLAP: - // Orevein didn't reach this chunk, - // can't add it yet to the hash - Logger.INFO("[World Generation Debug] NO_OVERLAP"); - if (debugWorldGen) GT_Log.out.println( - " Added far oreveinSeed=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); - validOreveins.put(oreveinSeed, tWorldGen); - oreveinFound = true; - break; - case WorldGen_GT_Ore_Layer.NO_OVERLAP_AIR_BLOCK: - if (debugWorldGen) GT_Log.out.println( - " No overlap and air block in test spot=" + oreveinSeed + " " + - ( tWorldGen).mWorldGenName + - " tries at oremix=" + i + - " placementAttempts=" + placementAttempts + - " dimensionName=" + tDimensionName - ); - // SHould do retry in this case until out of chances - Logger.INFO("[World Generation Debug] NO_OVERLAP_AIR_BLOCK"); - placementAttempts++; - break; - } - break; // Try the next orevein - } - catch (Throwable e) { - if (debugWorldGen) - GT_Log.out.println("Exception occurred on oreVein" + tWorldGen + " oreveinSeed=" - + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + " oreseedX=" - + oreseedX + " oreseedZ=" + oreseedZ); - e.printStackTrace(GT_Log.err); - } - } - } - } - // Only add an empty orevein if are unable to place a vein - // at the oreseed chunk. - if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) { - if (debugWorldGen) - GT_Log.out.println(" Empty oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ - + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " tries at oremix=" + i - + " placementAttempts=" + placementAttempts + " dimensionName=" + tDimensionName); - validOreveins.put(oreveinSeed, noOresInVein); - } - } - else if (oreveinPercentageRoll >= oreveinPercentage) { - if (debugWorldGen) - GT_Log.out.println(" Skipped oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ - + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " RNG=" + oreveinPercentageRoll - + " %=" + oreveinPercentage + " dimensionName=" + tDimensionName); - validOreveins.put(oreveinSeed, noOresInVein); - } - } - else { - // oreseed is located in the previously processed table - if (debugWorldGen) - GT_Log.out.print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" - + validOreveins.size() + " "); - WorldGen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed); - oreveinRNG.setSeed(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))); // Reset - // RNG - // to - // only - // be - // based - // on - // oreseed - // X/Z - // and - // type - // of - // vein - int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, - this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, oreseedZ * 16, - this.mChunkGenerator, this.mChunkProvider); - switch (placementResult) { - case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: - if (debugWorldGen) - GT_Log.out.println(" No ore in bottom layer"); - break; - case WorldGen_GT_Ore_Layer.NO_OVERLAP: - if (debugWorldGen) - GT_Log.out.println(" No overlap"); - break; - } - } - } - - @Override - public void run() { - long startTime = System.nanoTime(); - int oreveinMaxSize; - - // Determine bounding box on how far out to check for oreveins - // affecting this chunk - // For now, manually reducing oreveinMaxSize when not in the - // Underdark for performance - if (this.mWorld.provider.getDimensionName().equals("Underdark")) { - oreveinMaxSize = 24; // Leave Deep Dark/Underdark max oregen at - // 32, instead of 64 - } - else { - oreveinMaxSize = 48; - } - - int wXbox = this.mX - (oreveinMaxSize / 16); - int eXbox = this.mX + (oreveinMaxSize / 16 + 1); // Need to add 1 - // since it is - // compared - // using a < - int nZbox = this.mZ - (oreveinMaxSize / 16); - int sZbox = this.mZ + (oreveinMaxSize / 16 + 1); - - // Search for orevein seeds and add to the list; - for (int x = wXbox; x < eXbox; x++) { - for (int z = nZbox; z < sZbox; z++) { - // Determine if this X/Z is an orevein seed - if (((Math.abs(x) % 3) == 1) && ((Math.abs(z) % 3) == 1)) { - if (debugWorldGen) - GT_Log.out.println("Adding seed x=" + x + " z=" + z); - seedList.add(new NearbySeeds(x, z)); - } - } - } - - // Now process each oreseed vs this requested chunk - for (; seedList.size() != 0; seedList.remove(0)) { - if (debugWorldGen) - GT_Log.out.println("Processing seed x=" + seedList.get(0).mX + " z=" + seedList.get(0).mZ); - worldGenFindVein(seedList.get(0).mX, seedList.get(0).mZ); - } - - long oregenTime = System.nanoTime(); - - // Do leftover worldgen for this chunk (GT_Stones and GT_small_ores) - try { - for (WorldGen_GT tWorldGen : HANDLER_GT.sWorldgenListEverglades) { - /* - * if (debugWorldGen) GT_Log.out.println( - * "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); - */ - tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX * 16, - this.mZ * 16, this.mChunkGenerator, this.mChunkProvider); - } - } - catch (Throwable e) { - e.printStackTrace(GT_Log.err); - } - - long leftOverTime = System.nanoTime(); - - Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ); - if (tChunk != null) { - tChunk.isModified = true; - } - long endTime = System.nanoTime(); - long duration = (endTime - startTime); - if (debugWorldGen) { - GT_Log.out.println(" Oregen took " + (oregenTime - startTime) + " Leftover gen took " - + (leftOverTime - oregenTime) + " Worldgen took " + duration + " nanoseconds"); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java b/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java deleted file mode 100644 index 140098ee06..0000000000 --- a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java +++ /dev/null @@ -1,514 +0,0 @@ -package gtPlusPlus.everglades.gen.gt; - -import static gtPlusPlus.everglades.gen.gt.WorldGen_GT_Base.debugWorldGen; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.*; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Log; -import gregtech.common.blocks.GT_Block_Ores; -import gregtech.common.blocks.GT_TileEntity_Ores; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; - -public class WorldGen_GT_Ore_Layer -extends WorldGen_GT { - public static ArrayList sList = new ArrayList(); - public static int sWeight = 0; - public final short mMinY; - public final short mMaxY; - public final short mWeight; - public final short mDensity; - public final short mSize; - public Block mPrimaryMeta; - public Block mSecondaryMeta; - public Block mBetweenMeta; - public Block mSporadicMeta; - public final Material mPrimary; - public final Material mSecondary; - public final Material mBetween; - public final Material mSporadic; - - public static boolean mUpdated = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; - public static final Block mStoneTypes; - - //public final String mBiome; - public final String mRestrictBiome; - public final boolean mOverworld; - public final boolean mNether; - public final boolean mEnd; - public static final int WRONG_BIOME=0; - public static final int WRONG_DIMENSION=1; - public static final int NO_ORE_IN_BOTTOM_LAYER=2; - public static final int NO_OVERLAP=3; - public static final int ORE_PLACED=4; - public static final int NO_OVERLAP_AIR_BLOCK=5; - - //public final boolean mMoon; - //public final boolean mMars; - //public final boolean mAsteroid; - public final String aTextWorldgen = "worldgen."; - - static { - if (mUpdated) { - Object tempBlock = null; - try { - Field temp = ReflectionUtils.getField(GregTech_API.class, "sBlockStones"); - tempBlock = temp.get(null); - } - catch (IllegalArgumentException | IllegalAccessException e) {} - mStoneTypes = (Block) tempBlock; - } - else { - mStoneTypes = null; - } - } - - - public WorldGen_GT_Ore_Layer(String aName, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { - this(aName, true, aMinY, aMaxY, aWeight, aDensity, aSize, false, false, false, false, false, false, aPrimary, aSecondary, aBetween, aSporadic); - } - - - public WorldGen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { - super(aName, sList, aDefault); - Logger.WORLD("Creating Ore Layer Object"); - this.mOverworld = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); - this.mNether = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); - this.mEnd = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); - //this.mMoon = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); - //this.mMars = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); - //this.mAsteroid = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); - this.mMinY = 5; - short mMaxY = 14; - if (mMaxY < (this.mMinY + 7)) { - GT_Log.out.println( - "Oremix " + this.mWorldGenName + - " has invalid Min/Max heights!" - ); - mMaxY = (short) (this.mMinY + 7); - } - this.mMaxY = mMaxY; - this.mWeight = ((short) HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); - this.mDensity = ((short) HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); - this.mSize = ((short) Math.max(1, HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); - this.mPrimary = aPrimary; - this.mSecondary = aSecondary; - this.mBetween = aBetween; - this.mSporadic = aSporadic; - this.mPrimaryMeta = aPrimary.getOreBlock(1); - this.mSecondaryMeta = aSecondary.getOreBlock(1); - this.mBetweenMeta = aBetween.getOreBlock(1); - this.mSporadicMeta = aSporadic.getOreBlock(1); - this.mRestrictBiome = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); - - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); - //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist"); - //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist"); - - if (this.mEnabled) { - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); - sWeight += this.mWeight; - } - } - - public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - - //Debug Handler - /** - * This handles Variables that are null during Init - */ - - if (this.mPrimaryMeta == Blocks.stone || this.mSecondaryMeta == Blocks.stone - || this.mBetweenMeta == Blocks.stone || this.mSporadicMeta == Blocks.stone){ - this.mPrimaryMeta = this.mPrimary.getOreBlock(1); - this.mSecondaryMeta = this.mSecondary.getOreBlock(1); - this.mBetweenMeta = this.mBetween.getOreBlock(1); - this.mSporadicMeta = this.mSporadic.getOreBlock(1); - Logger.WORLD("[Vein Generator] An Ore in a Vein had defaulted back to a default value, so they have now been reset to correct values."); - } - - if( mWorldGenName.equals("vein0") ) { - if (debugWorldGen) GT_Log.out.println( - " NoOresInVein-vein0" - ); - // This is a special empty orevein - Logger.WORLD("[World Generation Debug] Special Empty Vein placed."); - return ORE_PLACED; - } - if (aDimensionType != Dimension_Everglades.DIMID) { - /* // Debug code, but spams log - if (debugWorldGen) { - GT_Log.out.println( - "Wrong dimension" - ); - } - */ - Logger.WORLD("[World Generation Debug] Wrong dimension."); - return WRONG_DIMENSION; - } - if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { - return WRONG_BIOME; - } - int[] placeCount=new int[4]; - - int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5); - // Determine West/East ends of orevein - int wXVein = aSeedX - aRandom.nextInt(mSize); // West side - int eXVein = aSeedX + 16 + aRandom.nextInt(mSize); - // Limit Orevein to only blocks present in current chunk - int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade. - int eX = Math.min( eXVein, aChunkX + 2 + 16); - if (wX >= eX) { //No overlap between orevein and this chunk exists in X - Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); - if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_Everglades.blockSecondLayer) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_Everglades.blockMainFiller) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_Everglades.blockSecondaryFiller) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || - (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { - // Didn't reach, but could have placed. Save orevein for future use. - return NO_OVERLAP; - } else { - // Didn't reach, but couldn't place in test spot anywys, try for another orevein - return NO_OVERLAP_AIR_BLOCK; - } - } - // Determine North/Sound ends of orevein - int nZVein = aSeedZ - aRandom.nextInt(mSize); - int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize); - - int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade. - int sZ = Math.min(sZVein, aChunkZ + 2 + 16); - if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z - Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); - if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || - tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || - (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { - // Didn't reach, but could have placed. Save orevein for future use. - return NO_OVERLAP; - } else { - // Didn't reach, but couldn't place in test spot anywys, try for another orevein - return NO_OVERLAP_AIR_BLOCK; - } - - } - - if (debugWorldGen) { - String tDimensionName = aWorld.provider.getDimensionName(); - GT_Log.out.print( - "Trying Orevein:" + this.mWorldGenName + - " Dimension=" + tDimensionName + - " mX="+aChunkX/16+ - " mZ="+aChunkZ/16+ - " oreseedX="+ aSeedX/16 + - " oreseedZ="+ aSeedZ/16 + - " cY="+tMinY - ); - } - // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt(). - int localDensity = (Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))))); - - // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop - // Now we do bottom-level-first oregen, and work our way upwards. - int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure. - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - /*if ((placeCount[1]+placeCount[3])==0) { - if (debugWorldGen) GT_Log.out.println( - " No ore in bottom layer" - ); - return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer - }*/ - Logger.WORLD("[World Generation Debug] Trying to set Ores?"); - for (level = tMinY; level < (tMinY-1+3); level++) { - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { - placeCount[1]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - } - // Low Middle layer is between + sporadic - // level should be = tMinY-1+3 from end of for loop - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { - placeCount[2]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - // High Middle layer is between + primary + sporadic - level++; // Increment level to next layer - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { - placeCount[2]++; - } - } - else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { - placeCount[0]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - // Top two layers are primary + sporadic - level++; // Increment level to next layer - for( ; level < (tMinY + 6); level++){ // should do two layers - for (int tX = wX; tX < eX; tX++) { - int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); - for (int tZ = nZ; tZ < sZ; tZ++) { - int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); - if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { - if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { - placeCount[0]++; - } - } - else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate - if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) - placeCount[3]++; - } - } - } - } - if (debugWorldGen) { - String tDimensionName = aWorld.provider.getDimensionName(); - GT_Log.out.println( - "Generated Orevein:" + this.mWorldGenName + - " Dimension=" + tDimensionName + - " mX="+aChunkX/16+ - " mZ="+aChunkZ/16+ - " oreseedX="+ aSeedX/16 + - " oreseedZ="+ aSeedZ/16 + - " cY="+tMinY+ - " wXVein" + wXVein + - " eXVein" + eXVein + - " nZVein" + nZVein + - " sZVein" + sZVein + - " locDen=" + localDensity + - " Den=" + this.mDensity + - " Sec="+placeCount[1]+ - " Spo="+placeCount[3]+ - " Bet="+placeCount[2]+ - " Pri="+placeCount[0] - ); - } - // Something (at least the bottom layer must have 1 block) must have been placed, return true - return ORE_PLACED; - } - - private String fString = "unset", ore1String = "unset", ore2String = "unset", ore3String = "unset", ore4String = "unset"; - Map gtOreMap = new HashMap(); - - @SuppressWarnings("deprecation") - public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData, boolean isSmallOre, - boolean air) { - if (!air) { - aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); - } - - //Set GT ORE - if (aMetaData instanceof GT_Block_Ores){ - if (ore1String.equals("unset")) { - ore1String = Utils.sanitizeString(this.mPrimary.getLocalizedName().toLowerCase()); - } - if (ore2String.equals("unset")) { - ore2String = Utils.sanitizeString(this.mSecondaryMeta.getLocalizedName().toLowerCase()); - } - if (ore3String.equals("unset")) { - ore3String = Utils.sanitizeString(this.mBetweenMeta.getLocalizedName().toLowerCase()); - } - if (ore4String.equals("unset")) { - ore4String = Utils.sanitizeString(this.mSporadicMeta.getLocalizedName().toLowerCase()); - } - - if (this.mPrimaryMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore1String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - if (this.mSecondaryMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore2String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - if (this.mBetweenMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore3String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - if (this.mSporadicMeta == aMetaData){ - for (Materials f : Materials.values()){ - if (!gtOreMap.containsKey(f)) { - gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); - } - fString = gtOreMap.get(f); - if (fString.contains(ore4String)){ - int r = f.mMetaItemSubID; - if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ - Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - } - } - - } - - Block tBlock = aWorld.getBlock(aX, aY, aZ); - Block tOreBlock = aMetaData; - int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ); - String BlockName = tBlock.getUnlocalizedName(); - if ( - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sand) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) || - (mUpdated && tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, mStoneTypes)) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondLayer) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockMainFiller) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondaryFiller) || - tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sandstone)) { - - if (aWorld.setBlock(aX, aY, aZ, tOreBlock, 0, 3)){ - Logger.WORLD("[World Generation Debug] Set "+tOreBlock.getLocalizedName()+" at X: "+aX+" | Y: "+aY+" | Z: "+aZ); - return true; - } - } - return false; - } - - - private boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int mMetaItemSubID, boolean useless){ - - //Get Class and Methods - Method setOres = null; - boolean is08 = !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; - - //GT 5.08 - if (is08){ - try { - setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class); - } - catch (NoSuchMethodException | SecurityException e) { - - } - } - //GT 5.09 - else { - try { - setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class); - } - catch (NoSuchMethodException | SecurityException e) { - - } - } - - try { - if (is08 && setOres != null){ - setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID); - } - else if (!is08 && setOres != null){ - setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID, useless); - } - else { - return false; - }} - catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - - } - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java b/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java deleted file mode 100644 index 0715f86e01..0000000000 --- a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java +++ /dev/null @@ -1,97 +0,0 @@ -package gtPlusPlus.everglades.gen.gt; - -import java.util.Hashtable; - -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.core.material.nuclear.FLUORIDES; - -public class WorldGen_Ores { - - public static WorldGen_GT_Ore_Layer BaseVein = new WorldGen_GT_Ore_Layer("veinA", 20, 40, 1, 1, 128, - ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, - ELEMENT.getInstance().IRON); - - /** - * Custom ore Veins - */ - - public static WorldGen_GT_Ore_Layer Vein1 = new WorldGen_GT_Ore_Layer("vein1", 0, 60, 30, 2, 16, ORES.AGARDITE_CD, - ORES.AGARDITE_LA, ORES.DEMICHELEITE_BR, ORES.IRARSITE); - - public static WorldGen_GT_Ore_Layer Vein2 = new WorldGen_GT_Ore_Layer("vein2", 0, 60, 30, 2, 16, ORES.AGARDITE_ND, - ORES.AGARDITE_Y, ORES.KASHINITE, ORES.CERITE); - - public static WorldGen_GT_Ore_Layer Vein3 = new WorldGen_GT_Ore_Layer("vein3", 0, 60, 30, 3, 32, ORES.CERITE, - ORES.NICHROMITE, ORES.XENOTIME, ORES.HIBONITE); - - public static WorldGen_GT_Ore_Layer Vein4 = new WorldGen_GT_Ore_Layer("vein4", 0, 60, 40, 3, 32, ORES.GEIKIELITE, - ORES.CRYOLITE, ORES.GADOLINITE_CE, ORES.AGARDITE_ND); - - public static WorldGen_GT_Ore_Layer Vein5 = new WorldGen_GT_Ore_Layer("vein5", 30, 128, 20, 2, 48, ORES.HIBONITE, - ORES.YTTRIALITE, ORES.ZIRCONILITE, ORES.CERITE); - public static WorldGen_GT_Ore_Layer Vein6 = new WorldGen_GT_Ore_Layer("vein6", 0, 40, 20, 2, 48, ORES.XENOTIME, - ORES.ZIRKELITE, ORES.CROCROITE, ORES.IRARSITE); - public static WorldGen_GT_Ore_Layer Vein7 = new WorldGen_GT_Ore_Layer("vein7", 40, 128, 20, 2, 48, ORES.HONEAITE, - ORES.MIESSIITE, ORES.SAMARSKITE_Y, ORES.SAMARSKITE_YB); - public static WorldGen_GT_Ore_Layer Vein8 = new WorldGen_GT_Ore_Layer("vein8", 0, 40, 20, 2, 48, ORES.TITANITE, - ORES.ZIMBABWEITE, ORES.ZIRCON, ORES.FLORENCITE); - - public static WorldGen_GT_Ore_Layer Vein9 = new WorldGen_GT_Ore_Layer("vein9", 10, 30, 20, 1, 48, - ORES.LANTHANITE_CE, FLUORIDES.FLUORITE, ORES.LAFOSSAITE, ORES.FLORENCITE); - public static WorldGen_GT_Ore_Layer Vein10 = new WorldGen_GT_Ore_Layer("vein10", 20, 50, 20, 2, 32, ORES.GEIKIELITE, - ORES.YTTROCERITE, ORES.LANTHANITE_LA, ORES.RADIOBARITE); - public static WorldGen_GT_Ore_Layer Vein11 = new WorldGen_GT_Ore_Layer("vein11", 30, 70, 20, 1, 48, - FLUORIDES.FLUORITE, ORES.KASHINITE, ORES.ZIRCON, ORES.CRYOLITE); - public static WorldGen_GT_Ore_Layer Vein12 = new WorldGen_GT_Ore_Layer("vein12", 40, 80, 20, 3, 32, ORES.CERITE, - ORES.ALBURNITE, ORES.MIESSIITE, ORES.HIBONITE); - - /** - * Best Rarest Veins 2017 - */ - - public static WorldGen_GT_Ore_Layer Vein13 = new WorldGen_GT_Ore_Layer("vein13", 5, 15, 5, 1, 16, ORES.CRYOLITE, - ORES.RADIOBARITE, ORES.HONEAITE, ORES.FLORENCITE); - - public static WorldGen_GT_Ore_Layer Vein14 = new WorldGen_GT_Ore_Layer("vein14", 10, 20, 8, 2, 16, - ORES.DEMICHELEITE_BR, ORES.PERROUDITE, ORES.IRARSITE, ORES.RADIOBARITE); - - public static WorldGen_GT_Ore_Layer Vein15 = new WorldGen_GT_Ore_Layer("vein15", 5, 25, 5, 3, 24, ORES.FLUORCAPHITE, - ORES.LAFOSSAITE, ORES.GADOLINITE_CE, ORES.GADOLINITE_Y); - - public static WorldGen_GT_Ore_Layer Vein16 = new WorldGen_GT_Ore_Layer("vein16", 0, 25, 4, 2, 32, ORES.YTTROCERITE, - ORES.LEPERSONNITE, ORES.LAUTARITE, FLUORIDES.FLUORITE); - - public static WorldGen_GT_Ore_Layer Vein17 = new WorldGen_GT_Ore_Layer("vein17", 10, 35, 4, 1, 32, ORES.FLORENCITE, - ORES.LAUTARITE, ORES.SAMARSKITE_YB, ORES.POLYCRASE); - public static WorldGen_GT_Ore_Layer Vein18 = new WorldGen_GT_Ore_Layer("vein18", 15, 40, 4, 1, 48, - ORES.GADOLINITE_CE, ORES.GADOLINITE_Y, ORES.AGARDITE_LA, ORES.AGARDITE_CD); - - public static Hashtable validOreveins = new Hashtable( - 1024); - - static long ID = 0; - - public static void generateValidOreVeins() { - validOreveins.put(ID++, BaseVein); - validOreveins.put(ID++, Vein1); - validOreveins.put(ID++, Vein2); - validOreveins.put(ID++, Vein3); - validOreveins.put(ID++, Vein4); - validOreveins.put(ID++, Vein5); - validOreveins.put(ID++, Vein6); - validOreveins.put(ID++, Vein7); - validOreveins.put(ID++, Vein8); - validOreveins.put(ID++, Vein9); - validOreveins.put(ID++, Vein10); - validOreveins.put(ID++, Vein11); - validOreveins.put(ID++, Vein12); - validOreveins.put(ID++, Vein13); - validOreveins.put(ID++, Vein14); - validOreveins.put(ID++, Vein15); - validOreveins.put(ID++, Vein16); - validOreveins.put(ID++, Vein17); - validOreveins.put(ID++, Vein18); - } - -} diff --git a/src/Java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java b/src/Java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java deleted file mode 100644 index ce4182c598..0000000000 --- a/src/Java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.everglades.item; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.interfaces.ITileTooltip; - -public class ItemBlockToxicEverglades extends ItemBlock { - - protected final int mID; - - public ItemBlockToxicEverglades(final Block block) { - super(block); - this.mID = ((ITileTooltip) block).getTooltipID(); - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if (this.mID == 0){ //blockDarkWorldPortalFrame - list.add("Use this to access the Toxic Everglades."); - list.add("Assembled in the same shape as the Nether Portal."); - } - else if (this.mID == 1){ //blockDarkWorldPortal - list.add("Place this if you are lazy to create the portal structure, slacker."); - } - else if (this.mID == 2){ //blockDarkWorldGround - list.add("Will burn very quickly if it happens to catch fire."); - } - else if (this.mID == 3){ //blockDarkWorldPollutedDirt - list.add("Maybe you can do something with this?."); - if (stack.getItemDamage() > 0) { - list.add("This smells worse than a bean fart..."); - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java b/src/Java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java deleted file mode 100644 index 3119de19b9..0000000000 --- a/src/Java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.everglades.item; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; - -public class ItemEvergladesPortalTrigger extends Item { - public ItemEvergladesPortalTrigger() { - super(); - this.maxStackSize = 1; - setMaxDamage(64); - setCreativeTab(CreativeTabs.tabTools); - this.setTextureName(CORE.MODID + ":" + "itemAlkalusDisk"); - } - - @Override - public Item setMaxStackSize(int int1) { - return super.setMaxStackSize(1); - } - - @Override - public EnumRarity getRarity(ItemStack thisItem) { - return EnumRarity.epic; - } - - @Override - public boolean hasEffect(ItemStack par1ItemStack, int pass) { - return true; - } - - @Override - public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return EnumChatFormatting.GOLD+"Alkalus Disk ["+EnumChatFormatting.RED+"Activated"+EnumChatFormatting.GOLD+"]"; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - list.add(EnumChatFormatting.GREEN+"Shines the way, towards the far away Everglades."); - list.add(EnumChatFormatting.GREEN+"This item produces such a temperature, that you'd hate to use it incorrectly."); - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - return Utils.rgbtoHexValue(255, 128, 0); - } - - @Override - public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, - float par8, float par9, float par10) { - if (par7 == 0) { - par5--; - } - if (par7 == 1) { - par5++; - } - if (par7 == 2) { - par6--; - } - if (par7 == 3) { - par6++; - } - if (par7 == 4) { - par4--; - } - if (par7 == 5) { - par4++; - } - if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { - return false; - } - Block i1 = par3World.getBlock(par4, par5, par6); - if (i1 == Blocks.air) { - par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); - if (Dimension_Everglades.portalBlock.tryToCreatePortal(par3World, par4, par5, par6)){ - //Make a Portal - } - else { - if (!par3World.isRemote){ - par3World.setBlock(par4, par5, par6, ModBlocks.blockHellfire, 0, 3); - } - } - } - par1ItemStack.damageItem(1, par2EntityPlayer); - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/object/BoxedQuad.java b/src/Java/gtPlusPlus/everglades/object/BoxedQuad.java deleted file mode 100644 index d0fbc4247b..0000000000 --- a/src/Java/gtPlusPlus/everglades/object/BoxedQuad.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.everglades.object; - -import net.minecraft.block.Block; - -import gtPlusPlus.api.objects.data.Pair; - -public class BoxedQuad { - - private final Pair key; - private final Pair value; - private final Pair value2; - private final Pair value3; - private final Pair [] mInternalPairArray; - - - public BoxedQuad(final Pair key, final Pair value, final Pair value2, final Pair value3){ - this.key = key; - this.value = value; - this.value2 = value2; - this.value3 = value3; - mInternalPairArray = new Pair[]{key, value, value2, value3}; - } - - final public Pair getKey(){ - return this.key; - } - - final public Pair getValue_1(){ - return this.value; - } - - final public Pair getValue_2(){ - return this.value2; - } - - final public Pair getValue_3(){ - return this.value3; - } - - final synchronized Pair unbox(int pos){ - return this.mInternalPairArray[pos]; - } - - final synchronized Block getBlock(int pos){ - return this.mInternalPairArray[pos].getKey(); - } - - final synchronized int getMeta(int pos){ - return this.mInternalPairArray[pos].getValue(); - } - - - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/world/CustomWorldType.java b/src/Java/gtPlusPlus/everglades/world/CustomWorldType.java deleted file mode 100644 index 5a5344ca65..0000000000 --- a/src/Java/gtPlusPlus/everglades/world/CustomWorldType.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.everglades.world; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.minecraft.world.WorldType; - -public class CustomWorldType extends WorldType{ - - public CustomWorldType(String name) { - super(name); - } - - public CustomWorldType(int p_i1959_1_, String p_i1959_2_){ - this("test"); - try { - //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); - Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); - m.setAccessible(true); - m.invoke(this, p_i1959_1_, p_i1959_2_, 0); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public CustomWorldType(int p_i1960_1_, String p_i1960_2_, int p_i1960_3_){ - this("test2"); - try { - //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); - Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); - m.setAccessible(true); - m.invoke(this, p_i1960_1_, p_i1960_2_, p_i1960_3_); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - private WorldType getMC(){ - try { - Constructor c = WorldType.class.getDeclaredConstructor(); - c.setAccessible(true); // solution - return c.newInstance(); - - // production code should handle these exceptions more gracefully - } catch (InvocationTargetException x) { - x.printStackTrace(); - } catch (NoSuchMethodException x) { - x.printStackTrace(); - } catch (InstantiationException x) { - x.printStackTrace(); - } catch (IllegalAccessException x) { - x.printStackTrace(); - } - return null; - } -} - diff --git a/src/Java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java b/src/Java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java deleted file mode 100644 index 227d32502b..0000000000 --- a/src/Java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.everglades.world; - -import net.minecraft.util.ChunkCoordinates; - -public class EvergladesPortalPosition extends ChunkCoordinates { - public long field_85087_d; - final TeleporterDimensionMod field_85088_e; - - public EvergladesPortalPosition(TeleporterDimensionMod gladesTeleporter, int par2, int par3, int par4, long par5) { - super(par2, par3, par4); - this.field_85088_e = gladesTeleporter; - this.field_85087_d = par5; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java b/src/Java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java deleted file mode 100644 index e67a882638..0000000000 --- a/src/Java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java +++ /dev/null @@ -1,471 +0,0 @@ -package gtPlusPlus.everglades.world; - -import java.util.*; - -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.util.*; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.Teleporter; -import net.minecraft.world.WorldServer; - -import gtPlusPlus.everglades.dimension.Dimension_Everglades; - -public class TeleporterDimensionMod extends Teleporter { - - private final WorldServer worldServerInstance; - /** - * A private Random() function in Teleporter - */ - private final Random random; - /** - * Stores successful portal placement locations for rapid lookup. - */ - private final LongHashMap destinationCoordinateCache = new LongHashMap(); - /** - * A list of valid keys for the destinationCoordainteCache. These are - * based on the X & Z of the players initial location. - */ - @SuppressWarnings("rawtypes") - private final List destinationCoordinateKeys = new ArrayList(); - - public TeleporterDimensionMod(WorldServer par1WorldServer) { - super(par1WorldServer); - this.worldServerInstance = par1WorldServer; - this.random = new Random(par1WorldServer.getSeed()); - } - - /** - * Place an entity in a nearby portal, creating one if necessary. - */ - @Override - public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { - if (this.worldServerInstance.provider.dimensionId != 1) { - if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { - this.makePortal(par1Entity); - this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); - } - } - else { - int i = MathHelper.floor_double(par1Entity.posX); - int j = MathHelper.floor_double(par1Entity.posY) - 1; - int k = MathHelper.floor_double(par1Entity.posZ); - byte b0 = 1; - byte b1 = 0; - - for (int l = -2; l <= 2; ++l) { - for (int i1 = -2; i1 <= 2; ++i1) { - for (int j1 = -1; j1 < 3; ++j1) { - int k1 = i + i1 * b0 + l * b1; - int l1 = j + j1; - int i2 = k + i1 * b1 - l * b0; - boolean flag = j1 < 0; - this.worldServerInstance.setBlock(k1, l1, i2, flag ? Dimension_Everglades.blockPortalFrame : Blocks.air); - } - } - } - - par1Entity.setLocationAndAngles(i, j, k, par1Entity.rotationYaw, 0.0F); - par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; - } - } - - /** - * Place an entity in a nearby portal which already exists. - */ - @Override - public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { - short short1 = 128; - double d3 = -1.0D; - int i = 0; - int j = 0; - int k = 0; - int l = MathHelper.floor_double(par1Entity.posX); - int i1 = MathHelper.floor_double(par1Entity.posZ); - long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1); - boolean flag = true; - double d7; - int l3; - - if (this.destinationCoordinateCache.containsItem(j1)) { - Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache - .getValueByKey(j1); - d3 = 0.0D; - i = portalposition.posX; - j = portalposition.posY; - k = portalposition.posZ; - portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); - flag = false; - } - else { - for (l3 = l - short1; l3 <= l + short1; ++l3) { - double d4 = l3 + 0.5D - par1Entity.posX; - - for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) { - double d5 = l1 + 0.5D - par1Entity.posZ; - - for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) { - if (this.worldServerInstance.getBlock(l3, i2, l1) == Dimension_Everglades.portalBlock) { - while (this.worldServerInstance.getBlock(l3, i2 - 1, l1) == Dimension_Everglades.portalBlock) { - --i2; - } - - d7 = i2 + 0.5D - par1Entity.posY; - double d8 = d4 * d4 + d7 * d7 + d5 * d5; - - if (d3 < 0.0D || d8 < d3) { - d3 = d8; - i = l3; - j = i2; - k = l1; - } - } - } - } - } - } - - if (d3 >= 0.0D) { - if (flag) { - this.destinationCoordinateCache.add(j1, - new Teleporter.PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); - this.destinationCoordinateKeys.add(Long.valueOf(j1)); - } - - double d11 = i + 0.5D; - double d6 = j + 0.5D; - d7 = k + 0.5D; - int i4 = -1; - - if (this.worldServerInstance.getBlock(i - 1, j, k) == Dimension_Everglades.portalBlock) { - i4 = 2; - } - - if (this.worldServerInstance.getBlock(i + 1, j, k) == Dimension_Everglades.portalBlock) { - i4 = 0; - } - - if (this.worldServerInstance.getBlock(i, j, k - 1) == Dimension_Everglades.portalBlock) { - i4 = 3; - } - - if (this.worldServerInstance.getBlock(i, j, k + 1) == Dimension_Everglades.portalBlock) { - i4 = 1; - } - - int j2 = par1Entity.getTeleportDirection(); - - if (i4 > -1) { - int k2 = Direction.rotateLeft[i4]; - int l2 = Direction.offsetX[i4]; - int i3 = Direction.offsetZ[i4]; - int j3 = Direction.offsetX[k2]; - int k3 = Direction.offsetZ[k2]; - boolean flag1 = !this.worldServerInstance.isAirBlock(i + l2 + j3, j, k + i3 + k3) - || !this.worldServerInstance.isAirBlock(i + l2 + j3, j + 1, k + i3 + k3); - boolean flag2 = !this.worldServerInstance.isAirBlock(i + l2, j, k + i3) - || !this.worldServerInstance.isAirBlock(i + l2, j + 1, k + i3); - - if (flag1 && flag2) { - i4 = Direction.rotateOpposite[i4]; - k2 = Direction.rotateOpposite[k2]; - l2 = Direction.offsetX[i4]; - i3 = Direction.offsetZ[i4]; - j3 = Direction.offsetX[k2]; - k3 = Direction.offsetZ[k2]; - l3 = i - j3; - d11 -= j3; - int k1 = k - k3; - d7 -= k3; - flag1 = !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j, k1 + i3 + k3) - || !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j + 1, k1 + i3 + k3); - flag2 = !this.worldServerInstance.isAirBlock(l3 + l2, j, k1 + i3) - || !this.worldServerInstance.isAirBlock(l3 + l2, j + 1, k1 + i3); - } - - float f1 = 0.5F; - float f2 = 0.5F; - - if (!flag1 && flag2) { - f1 = 1.0F; - } - else if (flag1 && !flag2) { - f1 = 0.0F; - } - else if (flag1 && flag2) { - f2 = 0.0F; - } - - d11 += j3 * f1 + f2 * l2; - d7 += k3 * f1 + f2 * i3; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - - if (i4 == j2) { - f3 = 1.0F; - f4 = 1.0F; - } - else if (i4 == Direction.rotateOpposite[j2]) { - f3 = -1.0F; - f4 = -1.0F; - } - else if (i4 == Direction.rotateRight[j2]) { - f5 = 1.0F; - f6 = -1.0F; - } - else { - f5 = -1.0F; - f6 = 1.0F; - } - - double d9 = par1Entity.motionX; - double d10 = par1Entity.motionZ; - par1Entity.motionX = d9 * f3 + d10 * f6; - par1Entity.motionZ = d9 * f5 + d10 * f4; - par1Entity.rotationYaw = par8 - j2 * 90 + i4 * 90; - } - else { - par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; - } - - par1Entity.setLocationAndAngles(d11, d6, d7, par1Entity.rotationYaw, par1Entity.rotationPitch); - return true; - } - else { - return false; - } - } - - @Override - public boolean makePortal(Entity par1Entity) { - byte b0 = 16; - double d0 = -1.0D; - int i = MathHelper.floor_double(par1Entity.posX); - int j = MathHelper.floor_double(par1Entity.posY); - int k = MathHelper.floor_double(par1Entity.posZ); - int l = i; - int i1 = j; - int j1 = k; - int k1 = 0; - int l1 = this.random.nextInt(4); - int i2; - double d1; - double d2; - int k2; - int i3; - int k3; - int j3; - int i4; - int l3; - int k4; - int j4; - int i5; - int l4; - double d3; - double d4; - - for (i2 = i - b0; i2 <= i + b0; ++i2) { - d1 = i2 + 0.5D - par1Entity.posX; - - for (k2 = k - b0; k2 <= k + b0; ++k2) { - d2 = k2 + 0.5D - par1Entity.posZ; - label274: - - for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { - if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { - while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { - --i3; - } - - for (j3 = l1; j3 < l1 + 4; ++j3) { - k3 = j3 % 2; - l3 = 1 - k3; - - if (j3 % 4 >= 2) { - k3 = -k3; - l3 = -l3; - } - - for (i4 = 0; i4 < 3; ++i4) { - for (j4 = 0; j4 < 4; ++j4) { - for (k4 = -1; k4 < 4; ++k4) { - l4 = i2 + (j4 - 1) * k3 + i4 * l3; - i5 = i3 + k4; - int j5 = k2 + (j4 - 1) * l3 - i4 * k3; - - if (k4 < 0 - && !this.worldServerInstance.getBlock(l4, i5, j5).getMaterial() - .isSolid() - || k4 >= 0 && !this.worldServerInstance.isAirBlock(l4, i5, j5)) { - continue label274; - } - } - } - } - - d4 = i3 + 0.5D - par1Entity.posY; - d3 = d1 * d1 + d4 * d4 + d2 * d2; - - if (d0 < 0.0D || d3 < d0) { - d0 = d3; - l = i2; - i1 = i3; - j1 = k2; - k1 = j3 % 4; - } - } - } - } - } - } - - if (d0 < 0.0D) { - for (i2 = i - b0; i2 <= i + b0; ++i2) { - d1 = i2 + 0.5D - par1Entity.posX; - - for (k2 = k - b0; k2 <= k + b0; ++k2) { - d2 = k2 + 0.5D - par1Entity.posZ; - label222: - - for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { - if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { - while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { - --i3; - } - - for (j3 = l1; j3 < l1 + 2; ++j3) { - k3 = j3 % 2; - l3 = 1 - k3; - - for (i4 = 0; i4 < 4; ++i4) { - for (j4 = -1; j4 < 4; ++j4) { - k4 = i2 + (i4 - 1) * k3; - l4 = i3 + j4; - i5 = k2 + (i4 - 1) * l3; - - if (j4 < 0 - && !this.worldServerInstance.getBlock(k4, l4, i5).getMaterial() - .isSolid() - || j4 >= 0 && !this.worldServerInstance.isAirBlock(k4, l4, i5)) { - continue label222; - } - } - } - - d4 = i3 + 0.5D - par1Entity.posY; - d3 = d1 * d1 + d4 * d4 + d2 * d2; - - if (d0 < 0.0D || d3 < d0) { - d0 = d3; - l = i2; - i1 = i3; - j1 = k2; - k1 = j3 % 2; - } - } - } - } - } - } - } - - int k5 = l; - int j2 = i1; - k2 = j1; - int l5 = k1 % 2; - int l2 = 1 - l5; - - if (k1 % 4 >= 2) { - l5 = -l5; - l2 = -l2; - } - - boolean flag; - - if (d0 < 0.0D) { - if (i1 < 70) { - i1 = 70; - } - - if (i1 > this.worldServerInstance.getActualHeight() - 10) { - i1 = this.worldServerInstance.getActualHeight() - 10; - } - - j2 = i1; - - for (i3 = -1; i3 <= 1; ++i3) { - for (j3 = 1; j3 < 3; ++j3) { - for (k3 = -1; k3 < 3; ++k3) { - l3 = k5 + (j3 - 1) * l5 + i3 * l2; - i4 = j2 + k3; - j4 = k2 + (j3 - 1) * l2 - i3 * l5; - flag = k3 < 0; - this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Everglades.blockPortalFrame : Blocks.air); - } - } - } - } - - for (i3 = 0; i3 < 4; ++i3) { - for (j3 = 0; j3 < 4; ++j3) { - for (k3 = -1; k3 < 4; ++k3) { - l3 = k5 + (j3 - 1) * l5; - i4 = j2 + k3; - j4 = k2 + (j3 - 1) * l2; - flag = j3 == 0 || j3 == 3 || k3 == -1 || k3 == 3; - this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Everglades.blockPortalFrame : Dimension_Everglades.portalBlock, 0, 2); - } - } - - for (j3 = 0; j3 < 4; ++j3) { - for (k3 = -1; k3 < 4; ++k3) { - l3 = k5 + (j3 - 1) * l5; - i4 = j2 + k3; - j4 = k2 + (j3 - 1) * l2; - this.worldServerInstance.notifyBlocksOfNeighborChange(l3, i4, j4, - this.worldServerInstance.getBlock(l3, i4, j4)); - } - } - } - - return true; - } - - /** - * called periodically to remove out-of-date portal locations from the - * cache list. Argument par1 is a WorldServer.getTotalWorldTime() value. - */ - @Override - public void removeStalePortalLocations(long par1) { - if (par1 % 100L == 0L) { - @SuppressWarnings("rawtypes") - Iterator iterator = this.destinationCoordinateKeys.iterator(); - long j = par1 - 600L; - - while (iterator.hasNext()) { - Long olong = (Long) iterator.next(); - Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache - .getValueByKey(olong.longValue()); - - if (portalposition == null || portalposition.lastUpdateTime < j) { - iterator.remove(); - this.destinationCoordinateCache.remove(olong.longValue()); - } - } - } - } - - public class PortalPosition extends ChunkCoordinates { - /** - * The worldtime at which this PortalPosition was last verified - */ - public long lastUpdateTime; - - public PortalPosition(int par2, int par3, int par4, long par5) { - super(par2, par3, par4); - this.lastUpdateTime = par5; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java b/src/Java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java deleted file mode 100644 index fc1b2ac425..0000000000 --- a/src/Java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java +++ /dev/null @@ -1,263 +0,0 @@ -package gtPlusPlus.everglades.world; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.crash.CrashReport; -import net.minecraft.crash.CrashReportCategory; -import net.minecraft.util.ReportedException; -import net.minecraft.world.ChunkPosition; -import net.minecraft.world.World; -import net.minecraft.world.WorldType; -import net.minecraft.world.biome.BiomeCache; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.biome.WorldChunkManager; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.IntCache; - -import gtPlusPlus.everglades.biome.GenLayerEverglades; - -public class WorldChunkManagerCustom extends WorldChunkManager { - - private GenLayer genBiomes; - /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */ - private GenLayer biomeIndexLayer; - /** The BiomeCache object for this world. */ - private BiomeCache biomeCache; - /** A list of biomes that the player can spawn in. */ - private List biomesToSpawnIn; - - @SuppressWarnings({ "rawtypes" }) - public WorldChunkManagerCustom() { - this.biomeCache = new BiomeCache(this); - this.biomesToSpawnIn = new ArrayList(); - this.biomesToSpawnIn.addAll(allowedBiomes); // TODO - } - - public WorldChunkManagerCustom(long seed, WorldType worldType) { - this(); - // i changed this to my GenLayerDarkWorld - GenLayer[] agenlayer = GenLayerEverglades.makeTheWorld(seed, worldType); - - agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer); - this.genBiomes = agenlayer[0]; - this.biomeIndexLayer = agenlayer[1]; - - } - - public WorldChunkManagerCustom(World world) { - this(world.getSeed(), world.getWorldInfo().getTerrainType()); - - } - - /** - * Gets the list of valid biomes for the player to spawn in. - */ - @Override - public List getBiomesToSpawnIn() { - return this.biomesToSpawnIn; - } - - /** - * Returns a list of rainfall values for the specified blocks. Args: - * listToReuse, x, z, width, length. - */ - @Override - public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) { - IntCache.resetIntCache(); - - if (listToReuse == null || listToReuse.length < width * length) { - listToReuse = new float[width * length]; - } - - int[] aint = this.biomeIndexLayer.getInts(x, z, width, length); - - for (int i1 = 0; i1 < width * length; ++i1) { - try { - float f = BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F; - - if (f > 1.0F) { - f = 1.0F; - } - - listToReuse[i1] = f; - } - catch (Throwable throwable) { - CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); - CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock"); - crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1)); - crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length)); - crashreportcategory.addCrashSection("x", Integer.valueOf(x)); - crashreportcategory.addCrashSection("z", Integer.valueOf(z)); - crashreportcategory.addCrashSection("w", Integer.valueOf(width)); - crashreportcategory.addCrashSection("h", Integer.valueOf(length)); - throw new ReportedException(crashreport); - } - } - - return listToReuse; - } - - /** - * Return an adjusted version of a given temperature based on the y - * height - */ - @Override - @SideOnly(Side.CLIENT) - public float getTemperatureAtHeight(float par1, int par2) { - return par1; - } - - /** - * Returns an array of biomes for the location input. - */ - @Override - public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { - IntCache.resetIntCache(); - - if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { - par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; - } - - int[] aint = this.genBiomes.getInts(par2, par3, par4, par5); - - try { - for (int i = 0; i < par4 * par5; ++i) { - par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]); - } - - return par1ArrayOfBiomeGenBase; - } - catch (Throwable throwable) { - CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); - CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock"); - crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length)); - crashreportcategory.addCrashSection("x", Integer.valueOf(par2)); - crashreportcategory.addCrashSection("z", Integer.valueOf(par3)); - crashreportcategory.addCrashSection("w", Integer.valueOf(par4)); - crashreportcategory.addCrashSection("h", Integer.valueOf(par5)); - throw new ReportedException(crashreport); - } - } - - /** - * Returns biomes to use for the blocks and loads the other data like - * temperature and humidity onto the WorldChunkManager Args: - * oldBiomeList, x, z, width, depth - */ - @Override - public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth) { - return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true); - } - - /** - * Return a list of biomes for the specified blocks. Args: listToReuse, - * x, y, width, length, cacheFlag (if false, don't check biomeCache to - * avoid infinite loop in BiomeCacheBlock) - */ - @Override - public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag) { - IntCache.resetIntCache(); - - if (listToReuse == null || listToReuse.length < width * length) { - listToReuse = new BiomeGenBase[width * length]; - } - - if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (y & 15) == 0) { - BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y); - System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length); - return listToReuse; - } - else { - int[] aint = this.biomeIndexLayer.getInts(x, y, width, length); - - for (int i = 0; i < width * length; ++i) { - listToReuse[i] = BiomeGenBase.getBiome(aint[i]); - } - return listToReuse; - } - } - - /** - * checks given Chunk's Biomes against List of allowed ones - */ - @Override - @SuppressWarnings("rawtypes") - public boolean areBiomesViable(int x, int y, int z, List par4List) { - IntCache.resetIntCache(); - int l = x - z >> 2; - int i1 = y - z >> 2; - int j1 = x + z >> 2; - int k1 = y + z >> 2; - int l1 = j1 - l + 1; - int i2 = k1 - i1 + 1; - int[] aint = this.genBiomes.getInts(l, i1, l1, i2); - - try { - for (int j2 = 0; j2 < l1 * i2; ++j2) { - BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]); - - if (!par4List.contains(biomegenbase)) { - return false; - } - } - - return true; - } - catch (Throwable throwable) { - CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); - CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer"); - crashreportcategory.addCrashSection("Layer", this.genBiomes.toString()); - crashreportcategory.addCrashSection("x", Integer.valueOf(x)); - crashreportcategory.addCrashSection("z", Integer.valueOf(y)); - crashreportcategory.addCrashSection("radius", Integer.valueOf(z)); - crashreportcategory.addCrashSection("allowed", par4List); - throw new ReportedException(crashreport); - } - } - - /** - * Finds a valid position within a range, that is in one of the listed - * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive - * y positions. - */ - @Override - @SuppressWarnings("rawtypes") - public ChunkPosition findBiomePosition(int p_150795_1_, int p_150795_2_, int p_150795_3_, List p_150795_4_, Random p_150795_5_) { - IntCache.resetIntCache(); - int l = p_150795_1_ - p_150795_3_ >> 2; - int i1 = p_150795_2_ - p_150795_3_ >> 2; - int j1 = p_150795_1_ + p_150795_3_ >> 2; - int k1 = p_150795_2_ + p_150795_3_ >> 2; - int l1 = j1 - l + 1; - int i2 = k1 - i1 + 1; - int[] aint = this.genBiomes.getInts(l, i1, l1, i2); - ChunkPosition chunkposition = null; - int j2 = 0; - - for (int k2 = 0; k2 < l1 * i2; ++k2) { - int l2 = l + k2 % l1 << 2; - int i3 = i1 + k2 / l1 << 2; - BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]); - - if (p_150795_4_.contains(biomegenbase) && (chunkposition == null || p_150795_5_.nextInt(j2 + 1) == 0)) { - chunkposition = new ChunkPosition(l2, 0, i3); - ++j2; - } - } - - return chunkposition; - } - - /** - * Calls the WorldChunkManager's biomeCache.cleanupCache() - */ - @Override - public void cleanupCache() { - this.biomeCache.cleanupCache(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/world/WorldProviderMod.java b/src/Java/gtPlusPlus/everglades/world/WorldProviderMod.java deleted file mode 100644 index b5945bcd21..0000000000 --- a/src/Java/gtPlusPlus/everglades/world/WorldProviderMod.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.everglades.world; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.util.Vec3; -import net.minecraft.world.WorldProvider; -import net.minecraft.world.WorldType; -import net.minecraft.world.chunk.IChunkProvider; - -import gtPlusPlus.everglades.chunk.ChunkProviderModded; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; - -public class WorldProviderMod extends WorldProvider { - - @Override - public void registerWorldChunkManager() { - this.worldChunkMgr = new WorldChunkManagerCustom(this.worldObj.getSeed(), WorldType.AMPLIFIED); - this.isHellWorld = false; - this.hasNoSky = false; - this.dimensionId = Dimension_Everglades.DIMID; - } - - @Override - @SideOnly(Side.CLIENT) - public Vec3 getFogColor(float par1, float par2) { - return Vec3.createVectorHelper(0.01568627450980392D, 0.09019607843137255D, 0.0D); - } - - @Override - public IChunkProvider createChunkGenerator() { - return new ChunkProviderModded(this.worldObj, this.worldObj.getSeed() - 1278); - } - - @Override - public boolean isSurfaceWorld() { - return true; - } - - @Override - public boolean canCoordinateBeSpawn(int par1, int par2) { - return false; - } - - @Override - public boolean canRespawnHere() { - return true; - } - - @Override - public float getSunBrightness(float par1) { - return (par1*2F); - } - - @Override - public float getStarBrightness(float par1) { - return (par1*5F); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean doesXZShowFog(int par1, int par2) { - return true; - } - - @Override - public String getDimensionName() { - return "dimensionDarkWorld"; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java b/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java deleted file mode 100644 index ce2062d12c..0000000000 --- a/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java +++ /dev/null @@ -1,264 +0,0 @@ -package gtPlusPlus.nei; - -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.gui.machine.GUI_DecayablesChest; -import gtPlusPlus.core.handler.Recipes.DecayableRecipe; -import gtPlusPlus.core.item.base.dusts.BaseItemDustUnique; -import gtPlusPlus.core.item.materials.DustDecayable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.VanillaColours; -import gtPlusPlus.nei.handlers.NeiTextureHandler; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.client.resources.I18n; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -public class DecayableRecipeHandler extends TemplateRecipeHandler { - - public static final String mNEIName = "Decayables"; - - public String getRecipeName() { - return StatCollector.translateToLocal("GTPP.container.decaychest.name"); - } - - public String getGuiTexture() { - return CORE.MODID + ":textures/gui/nei/decayables.png"; - } - - public Class getGuiClass() { - return GUI_DecayablesChest.class; - } - - public String getOverlayIdentifier() { - return "GTPP_Decayables"; - } - - public int recipiesPerPage() { - return 1; - } - - public void loadTransferRects() { - this.transferRects.add(new RecipeTransferRect(new Rectangle(6, 3, 16, 16), "GTPP_Decayables", new Object[0])); - } - - public void loadCraftingRecipes(ItemStack result) { - if (result == null || (!DustDecayable.class.isInstance(result.getItem()) - && !BaseItemDustUnique.class.isInstance(result.getItem()))) { - return; - } - if (result != null) { - //Logger.INFO("Looking up crafting recipes for "+ItemUtils.getItemName(result)); - } - final List recipes = DecayableRecipe.mRecipes; - for (final DecayableRecipe recipe : recipes) { - if (recipe.isValid()) { - final ItemStack input = recipe.mInput.copy(); - final ItemStack output = recipe.mOutput.copy(); - if (!GT_Utility.areStacksEqual(result, output, true)) { - continue; - } - //Logger.INFO("Showing Usage result for "+ItemUtils.getItemName(result)); - final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime); - this.arecipes.add(rec); - sort(); - } - } - } - - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals(getOverlayIdentifier()) && this.getClass() == DecayableRecipeHandler.class) { - final List recipes = DecayableRecipe.mRecipes; - for (final DecayableRecipe recipe : recipes) { - if (recipe.isValid()) { - final ItemStack input = recipe.mInput.copy(); - final ItemStack output = recipe.mOutput.copy(); - final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime); - this.arecipes.add(rec); - sort(); - } - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - public void loadUsageRecipes(ItemStack ingredient) { - final List recipes = DecayableRecipe.mRecipes; - if (ingredient != null) { - //Logger.INFO("Looking up Usage results for "+ItemUtils.getItemName(ingredient)); - } - for (final DecayableRecipe recipe : recipes) { - if (recipe.isValid()) { - final ItemStack input = recipe.mInput.copy(); - final ItemStack output = recipe.mOutput.copy(); - if (!GT_Utility.areStacksEqual(ingredient, input, true)) { - continue; - } - //Logger.INFO("Showing up Usage results for "+ItemUtils.getItemName(ingredient)); - final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime); - //rec.setIngredientPermutation((Collection) rec.input, ingredient); - this.arecipes.add(rec); - sort(); - } - } - } - - private final void sort() { - List g = new ArrayList(); - for (CachedRecipe u : arecipes) { - g.add((DecayableRecipeNEI) u); - } - if (g != null && !g.isEmpty()) { - Collections.sort(g); - } - } - - public void drawExtras(int recipeIndex) { - DecayableRecipeNEI recipe = (DecayableRecipeNEI) this.arecipes.get(recipeIndex); - - //GuiDraw.drawStringC(I18n.format("GTPP.container.decaychest.result", new Object[]{}), 43, 10, 8421504, false); - - int cost = recipe.time; - if (cost > 0) { - - // NEI Strings - String s = I18n.format("GTPP.nei.info", new Object[] { cost }); - String s0 = I18n.format("GTPP.nei.timetaken", new Object[] { cost }); - - // Time Strings - String s1 = I18n.format("GTPP.time.ticks", new Object[] { cost }); - String s2 = I18n.format("GTPP.time.seconds", new Object[] { cost }); - String s3 = I18n.format("GTPP.time.minutes", new Object[] { cost }); - String s4 = I18n.format("GTPP.time.hours", new Object[] { cost }); - String s5 = I18n.format("GTPP.time.days", new Object[] { cost }); - String s6 = I18n.format("GTPP.time.months", new Object[] { cost }); - int y = 20; - - int secs = cost / 20; - int mins = secs / 60; - int hours = mins / 60; - int days = hours / 24; - int months = days / 30; - - String suffix; - int formattedTime; - if (cost <= 20) { - suffix = s1; - formattedTime = cost; - } else if (cost <= (20 * 60)) { - suffix = s2; - formattedTime = secs; - } else if (cost <= (20 * 60 * 60)) { - suffix = s3; - formattedTime = mins; - } else if (cost <= (20 * 60 * 60 * 24)) { - suffix = s4; - formattedTime = hours; - } else if (cost < (20 * 60 * 60 * 24 * 30)) { - suffix = s5; - formattedTime = days; - } else if (cost <= (20 * 60 * 60 * 24 * 30)) { - suffix = s6; - formattedTime = months; - } else { - suffix = s1; - formattedTime = cost; - } - - int x = 5; - GuiDraw.drawString(s, x, 25, VanillaColours.DYE_BLACK.getAsInt(), false); - GuiDraw.drawString(s0, x, 40, VanillaColours.DYE_BLACK.getAsInt(), false); - - GuiDraw.drawString(suffix, x + 16, y + 30, VanillaColours.DYE_BLACK.getAsInt(), false); - - //Values - GuiDraw.drawString(("" + formattedTime), x, y + 30, VanillaColours.DYE_GREEN.getAsInt(), false); - - if (hours > 1) { - int aLeftoverMinutes = (cost - (hours * (20 * 60 * 60))); - if (aLeftoverMinutes > 0) { - int secs2 = aLeftoverMinutes / 20; - int mins2 = secs2 / 60; - GuiDraw.drawString(s3, x + 16, y + 42, VanillaColours.DYE_BLACK.getAsInt(), false); - GuiDraw.drawString(("" + mins2), x, y + 42, VanillaColours.DYE_GREEN.getAsInt(), false); - - } - - } - - } - - NeiTextureHandler.RECIPE_BUTTON.renderIcon(6.0D, 3.0D, 16.0D, 16.0D, 0.0D, true); - } - - public class DecayableRecipeNEI extends TemplateRecipeHandler.CachedRecipe implements Comparable { - private PositionedStack input; - private PositionedStack output; - public int time; - - @Override - public PositionedStack getIngredient() { - return this.input; - } - - public PositionedStack getResult() { - return this.output; - } - - public DecayableRecipeNEI(final ItemStack input, final ItemStack result, final int time) { - super(); - this.input = new PositionedStack(input, 93, 24); - this.output = new PositionedStack(result, 142, 42); - this.time = time; - } - - @Override - public int compareTo(CachedRecipe o) { - boolean b = DecayableRecipeNEI.class.isInstance(o); - if (b) { - DecayableRecipeNEI p = (DecayableRecipeNEI) o; - if (p.time > this.time) { - return 1; - } else if (p.time == this.time) { - return 0; - } else { - return -1; - } - } - return 0; - } - - @Override - public boolean equals(Object obj) { - if (obj != null) { - if (DecayableRecipeNEI.class.isInstance(obj)) { - DecayableRecipeNEI p = (DecayableRecipeNEI) obj; - if (p != null) { - // Time check first to keep it simple and not unbox the Recipes. - if (p.time == this.time) { - ItemStack aInput = p.input.item; - ItemStack aOutput = p.output.item; - if (GT_Utility.areStacksEqual(aInput, this.input.item, true)) { - if (GT_Utility.areStacksEqual(aOutput, this.output.item, true)) { - return true; - } - } - } - } - - } - } - return false; - } - - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java deleted file mode 100644 index de2c29db9f..0000000000 --- a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java +++ /dev/null @@ -1,942 +0,0 @@ -package gtPlusPlus.nei; - -import java.awt.Point; -import java.awt.Rectangle; -import java.lang.ref.SoftReference; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.stream.Collectors; - -import org.lwjgl.opengl.GL11; - -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.PositionedStack; -import codechicken.nei.guihook.GuiContainerManager; -import codechicken.nei.guihook.IContainerInputHandler; -import codechicken.nei.guihook.IContainerTooltipHandler; -import codechicken.nei.recipe.GuiCraftingRecipe; -import codechicken.nei.recipe.GuiRecipe; -import codechicken.nei.recipe.GuiUsageRecipe; -import codechicken.nei.recipe.TemplateRecipeHandler; -import cpw.mods.fml.common.event.FMLInterModComms; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.gui.GT_GUIContainer_BasicMachine; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GTPP_NEI_DefaultHandler extends TemplateRecipeHandler { - - public static final int sOffsetX = 5; - public static final int sOffsetY = 11; - private SoftReference> mCachedRecipes = null; - - private static final HashMap> mInputSlotMap = new HashMap>(); - private static final HashMap> mOutputSlotMap = new HashMap>(); - - static { - GuiContainerManager.addInputHandler(new GT_RectHandler()); - GuiContainerManager.addTooltipHandler(new GT_RectHandler()); - int[] aSlotX = new int[] {12, 30, 48}; - int[] aSlotY = new int[] {5, 23, 41, 64}; - // Input slots - int aIndex = 0; - for (int y=0; y(aSlotX[x], aSlotY[y])); - } - } - // Output slots - aSlotX = new int[] {102, 120, 138}; - aIndex = 0; - for (int y=0; y(aSlotX[x], aSlotY[y])); - } - } - } - - protected final GT_Recipe_Map mRecipeMap; - - public GTPP_NEI_DefaultHandler(final GT_Recipe_Map tMap) { - this.mRecipeMap = tMap; - this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0])); - if (!NEI_GT_Config.sIsAdded) { - FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); - GuiCraftingRecipe.craftinghandlers.add(this); - GuiUsageRecipe.usagehandlers.add(this); - } - } - - public static void drawText(final int aX, final int aY, final String aString, final int aColor) { - Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GTPP_NEI_DefaultHandler(this.mRecipeMap); - } - - - public List getSortedRecipes() { - List result = new ArrayList<>(this.mRecipeMap.mRecipeList); - Collections.sort(result); - return result; - } - - public List getCache() { - List cache; - if (mCachedRecipes == null || (cache = mCachedRecipes.get()) == null) { - cache = mRecipeMap.mRecipeList.stream() // do not use parallel stream. This is already parallelized by NEI - .filter(r -> !r.mHidden) - .sorted() - .map(temp -> {return createCachedRecipe(temp);}) - .collect(Collectors.toList()); - // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model - // so we do not need any synchronization here - mCachedRecipes = new SoftReference<>(cache); - } - return cache; - } - - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new CachedDefaultRecipe(aRecipe); - } - - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals(getOverlayIdentifier())) { - arecipes.addAll(getCache()); - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - public void loadCraftingRecipes(ItemStack aResult) { - ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); - - ArrayList tResults = new ArrayList<>(); - tResults.add(aResult); - tResults.add(GT_OreDictUnificator.get(true, aResult)); - if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { - for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { - tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); - } - } - FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); - FluidStack tFluidStack; - if (tFluid != null) { - tFluidStack = tFluid; - tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); - } - else tFluidStack = GT_Utility.getFluidFromDisplayStack(aResult); - if (tFluidStack != null) { - tResults.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); - } - for (CachedDefaultRecipe recipe : getCache()) { - if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) - arecipes.add(recipe); - } - } - - public void loadUsageRecipes(ItemStack aInput) { - ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); - - ArrayList tInputs = new ArrayList<>(); - tInputs.add(aInput); - tInputs.add(GT_OreDictUnificator.get(false, aInput)); - if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { - for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { - tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); - } - } - FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); - FluidStack tFluidStack; - if (tFluid != null) { - tFluidStack = tFluid; - tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); - } - else tFluidStack = GT_Utility.getFluidFromDisplayStack(aInput); - if (tFluidStack != null) { - tInputs.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); - } - for (CachedDefaultRecipe recipe : getCache()) { - if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack))) - arecipes.add(recipe); - } - } - - @Override - public String getOverlayIdentifier() { - return this.mRecipeMap.mNEIName; - } - - @Override - public void drawBackground(final int recipe) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GuiDraw.changeTexture(this.getGuiTexture()); - GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78); - } - - @Override - public int recipiesPerPage() { - return 1; - } - - @Override - public String getRecipeName() { - return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); - } - - @Override - public String getGuiTexture() { - return this.mRecipeMap.mNEIGUIPath; - } - - @Override - public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { - final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); - if ((tObject instanceof CachedDefaultRecipe)) { - final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; - for (final PositionedStack tStack : tRecipe.mOutputs) { - if (aStack == tStack.item) { - if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { - break; - } - currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); - break; - } - } - for (final PositionedStack tStack : tRecipe.mInputs) { - if (aStack == tStack.item) { - if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || - (tStack.item.stackSize != 0)) { - break; - } - currenttip.add("Does not get consumed in the process"); - break; - } - } - } - return currenttip; - } - - @Override - public void drawExtras(final int aRecipeIndex) { - final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; - final long tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; - if (tEUt != 0) { - drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); - drawText(10, 83, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216); - if (this.mRecipeMap.mShowVoltageAmperageInNEI) { - drawText(10, 93, "Voltage: " + MathUtils.formatNumbers(tEUt / this.mRecipeMap.mAmperage) + " EU", -16777216); - drawText(10, 103, "Amperage: " + this.mRecipeMap.mAmperage, -16777216); - } else { - drawText(10, 93, "Voltage: unspecified", -16777216); - drawText(10, 103, "Amperage: unspecified", -16777216); - } - } - if (tDuration > 0) { - drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216); - } - if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, -16777216); - } - } - - public static class GT_RectHandler - implements IContainerInputHandler, IContainerTooltipHandler { - @Override - public boolean mouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { - if (this.canHandle(gui)) { - if (button == 0) { - return this.transferRect(gui, false); - } - if (button == 1) { - return this.transferRect(gui, true); - } - } - return false; - } - - @Override - public boolean lastKeyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { - return false; - } - - public boolean canHandle(final GuiContainer gui) { - return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI))); - } - - @Override - public List handleTooltip(final GuiContainer gui, final int mousex, final int mousey, final List currenttip) { - if ((this.canHandle(gui)) && (currenttip.isEmpty())) { - if ((gui instanceof GT_GUIContainer_BasicMachine) && new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { - currenttip.add("Recipes"); - } - } - return currenttip; - } - - private boolean transferRect(final GuiContainer gui, final boolean usage) { - if (gui instanceof GT_GUIContainer_BasicMachine) { - return (this.canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); - } - return false; - } - - @Override - public List handleItemDisplayName(final GuiContainer gui, final ItemStack itemstack, final List currenttip) { - return currenttip; - } - - @Override - public List handleItemTooltip(final GuiContainer gui, final ItemStack itemstack, final int mousex, final int mousey, final List currenttip) { - return currenttip; - } - - @Override - public boolean keyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { - return false; - } - - @Override - public void onKeyTyped(final GuiContainer gui, final char keyChar, final int keyID) { - } - - @Override - public void onMouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { - } - - @Override - public void onMouseUp(final GuiContainer gui, final int mousex, final int mousey, final int button) { - } - - @Override - public boolean mouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { - return false; - } - - @Override - public void onMouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { - } - - @Override - public void onMouseDragged(final GuiContainer gui, final int mousex, final int mousey, final int button, final long heldTime) { - } - } - - public class FixedPositionedStack - extends PositionedStack { - public final int mChance; - public boolean permutated = false; - - public FixedPositionedStack(final Object object, final int x, final int y) { - this(object, x, y, 0); - } - - public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) { - super(object, x, y, true); - this.mChance = aChance; - } - - @Override - public void generatePermutations() { - if (this.permutated) { - return; - } - final ArrayList tDisplayStacks = new ArrayList(); - for (final ItemStack tStack : this.items) { - if (GT_Utility.isStackValid(tStack)) { - if (tStack.getItemDamage() == 32767) { - final List permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); - if (!permutations.isEmpty()) { - ItemStack stack; - for (final Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { - stack = i$.next(); - } - } else { - final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize); - base.stackTagCompound = tStack.stackTagCompound; - tDisplayStacks.add(base); - } - } else { - tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); - } - } - } - this.items = (tDisplayStacks.toArray(new ItemStack[0])); - if (this.items.length == 0) { - this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; - } - this.permutated = true; - this.setPermutationToRender(0); - } - } - - public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe { - public final GT_Recipe mRecipe; - public final List mOutputs = new ArrayList(); - public final List mInputs = new ArrayList(); - - public CachedDefaultRecipe(final GT_Recipe aRecipe) { - super(); - this.mRecipe = aRecipe; - handleSlots(); - } - - public void handleSlots() { - int tStartIndex = 0; - switch (GTPP_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) { - case 0: - break; - case 1: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - break; - case 2: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - break; - case 3: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - break; - case 4: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - break; - case 5: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - break; - case 6: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - break; - case 7: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - } - tStartIndex++; - break; - case 8: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 32)); - } - tStartIndex++; - break; - default: - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 32)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 32)); - } - tStartIndex++; - } - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - tStartIndex = 0; - switch (GTPP_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount) { - case 0: - break; - case 1: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 2: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 3: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 4: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 5: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 6: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 7: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - case 8: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 32, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - break; - default: - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 32, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 32, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - } - - - if ((mRecipe.mFluidInputs.length > 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 48, 52)); - if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 52)); - } - } - if (mRecipe.mFluidOutputs.length > 1) { - if (mRecipe.mFluidOutputs[0] != null && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 120, 5)); - } - if (mRecipe.mFluidOutputs[1] != null && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 5)); - } - if (mRecipe.mFluidOutputs.length > 2 && mRecipe.mFluidOutputs[2] != null && (mRecipe.mFluidOutputs[2].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[2], true), 102, 23)); - } - if (mRecipe.mFluidOutputs.length > 3 && mRecipe.mFluidOutputs[3] != null && (mRecipe.mFluidOutputs[3].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[3], true), 120, 23)); - } - if (mRecipe.mFluidOutputs.length > 4 && mRecipe.mFluidOutputs[4] != null && (mRecipe.mFluidOutputs[4].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[4], true), 138, 23)); - } - } else if ((mRecipe.mFluidOutputs.length > 0) && (mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 52)); - } - } - - @Override - public List getIngredients() { - return this.getCycledIngredients(GTPP_NEI_DefaultHandler.this.cycleticks / 10, this.mInputs); - } - - @Override - public PositionedStack getResult() { - return null; - } - - @Override - public List getOtherStacks() { - return this.mOutputs; - } - } - - public class NoCellMultiDefaultRecipe extends CachedDefaultRecipe { - - public NoCellMultiDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - - } - - @Override - public void handleSlots() { - - int aInputItemsCount = this.mRecipe.mInputs.length; - int aInputFluidsCount = this.mRecipe.mFluidInputs.length; - int aOutputItemsCount = this.mRecipe.mOutputs.length; - int aOutputFluidsCount = this.mRecipe.mFluidOutputs.length; - int aInputSlotsUsed = 0; - int aOutputSlotsUsed = 0; - int aSlotToCheck = 0; - - // Special Slot - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - - /* - * Items - */ - - // Upto 9 Inputs Slots - if (aInputItemsCount > 0) { - if (aInputItemsCount > 9) { - aInputItemsCount = 9; - } - for (int i=0;i 0) { - if (aOutputItemsCount > 9) { - aOutputItemsCount = 9; - } - for (int i=0;i 0) { - for (int i=0;i 0) { - for (int i=0;i 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 30, 52)); - if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 48, 52)); - } - } - - if (mRecipe.mFluidOutputs.length > 0) { - if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 52)); - } - if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 120, 52)); - } - } - } - - } -} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java b/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java deleted file mode 100644 index 7ef76f68b2..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java +++ /dev/null @@ -1,195 +0,0 @@ -package gtPlusPlus.nei; - -import java.util.List; - -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.GuiRecipe; -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; - -public class GT_NEI_FluidReactor extends GTPP_NEI_DefaultHandler { - - public GT_NEI_FluidReactor() { - super(GTPP_Recipe_Map.sChemicalPlantRecipes); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_FluidReactor(); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new ChemPlantDefaultRecipe(aRecipe); - } - - @Override - public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { - final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); - if ((tObject instanceof ChemPlantDefaultRecipe)) { - final ChemPlantDefaultRecipe tRecipe = (ChemPlantDefaultRecipe) tObject; - for (final PositionedStack tStack : tRecipe.mOutputs) { - if (aStack == tStack.item) { - if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { - break; - } - currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); - break; - } - } - for (final PositionedStack tStack : tRecipe.mInputs) { - if (GT_Utility.areStacksEqual(aStack, tStack.item)) { - if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || - (tStack.item.stackSize != 0)) { - break; - } - if (ItemUtils.isCatalyst(aStack)) { - currenttip.add("Does not always get consumed in the process"); - currenttip.add("Higher tier pipe casings allow this item to last longer"); - } - else if (ItemUtils.isControlCircuit(aStack)) { - currenttip.add("Does not get consumed in the process"); - } - break; - } - } - } - return currenttip; - } - - @Override - public void drawExtras(final int aRecipeIndex) { - final long tEUt = ((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; - final int tDuration = ((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; - if (tEUt != 0) { - drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); - //drawText(10, 83, "Usage: " + tEUt + " EU/t", -16777216); - if (this.mRecipeMap.mShowVoltageAmperageInNEI) { - drawText(10, 83, "Voltage: " + MathUtils.formatNumbers((tEUt / this.mRecipeMap.mAmperage)) + " EU/t", -16777216); - drawText(10, 93, "Amperage: " + this.mRecipeMap.mAmperage, -16777216); - } else { - drawText(10, 93, "Voltage: unspecified", -16777216); - drawText(10, 103, "Amperage: unspecified", -16777216); - } - } - if (tDuration > 0) { - drawText(10, 103, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); - } - if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - int aTier = (((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue); - String aTierMaterial = " - "; - if (aTier <= 0) { - aTierMaterial += "Bronze"; - } - else if (aTier == 1) { - aTierMaterial += "Steel"; - } - else if (aTier == 2) { - aTierMaterial += "Aluminium"; - } - else if (aTier == 3) { - aTierMaterial += "Stainless Steel"; - } - else if (aTier == 4) { - aTierMaterial += "Titanium"; - } - else if (aTier == 5) { - aTierMaterial += "Tungsten Steel"; - } - else if (aTier == 6) { - aTierMaterial += "Laurenium"; - } - else if (aTier == 7) { - aTierMaterial += "Botmium"; - } - - drawText(10, 113, this.mRecipeMap.mNEISpecialValuePre + (((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + aTierMaterial, -16777216); - } - } - - public class ChemPlantDefaultRecipe extends CachedDefaultRecipe { - - public ChemPlantDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - } - - @Override - public void handleSlots() { - int tStartIndex = 0; - - // Four Input Slots - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 3, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 21, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 39, -4)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 57, -4)); - } - tStartIndex++; - - - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - tStartIndex = 0; - - //Four Output Slots - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - - - //New fluid display behaviour when 3 fluid inputs are detected. (Basically a mix of the code below for outputs an the code above for 9 input slots.) - if (mRecipe.mFluidInputs.length >= 1) { - if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 3, 31)); - } - if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 21, 31)); - } - if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 39, 31)); - } - if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 57, 31)); - } - } - - if (mRecipe.mFluidOutputs.length > 0) { - if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 138, 5)); - } - if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 23)); - } - } - - } - } -} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java b/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java deleted file mode 100644 index dd7338eccd..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java +++ /dev/null @@ -1,118 +0,0 @@ -package gtPlusPlus.nei; - -import org.lwjgl.opengl.GL11; - -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.math.MathUtils; - -public class GT_NEI_LFTR extends GTPP_NEI_DefaultHandler { - - public GT_NEI_LFTR() { - super(GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_LFTR(); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new LFTRDefaultRecipe(aRecipe); - } - - @Override - public void drawBackground(final int recipe) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GuiDraw.changeTexture(this.getGuiTexture()); - GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 89); - } - - @Override - public void drawExtras(final int aRecipeIndex) { - final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; - final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; - drawText(10, 83, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); - drawText(10, 93, this.mRecipeMap.mNEISpecialValuePre + MathUtils.formatNumbers((((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier)) + this.mRecipeMap.mNEISpecialValuePost, -16777216); - drawText(10, 103, "Dynamo: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); - drawText(10, 113, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt * 4)) + " EU", -16777216); - } - - public class LFTRDefaultRecipe extends CachedDefaultRecipe { - - public LFTRDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - } - - @Override - public void handleSlots() { - int tStartIndex = 0; - if (mRecipe.mFluidInputs.length > 0) { - if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 12, 5)); - } - if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 5)); - } - if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 48, 5)); - } - if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 12, 23)); - } - if ((mRecipe.mFluidInputs.length > 4) && (mRecipe.mFluidInputs[4] != null) && (mRecipe.mFluidInputs[4].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[4], true), 30, 23)); - } - if ((mRecipe.mFluidInputs.length > 5) && (mRecipe.mFluidInputs[5] != null) && (mRecipe.mFluidInputs[5].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[5], true), 48, 23)); - } - if ((mRecipe.mFluidInputs.length > 6) && (mRecipe.mFluidInputs[6] != null) && (mRecipe.mFluidInputs[6].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[6], true), 12, 41)); - } - if ((mRecipe.mFluidInputs.length > 7) && (mRecipe.mFluidInputs[7] != null) && (mRecipe.mFluidInputs[7].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[7], true), 30, 41)); - } - if ((mRecipe.mFluidInputs.length > 8) && (mRecipe.mFluidInputs[8] != null) && (mRecipe.mFluidInputs[8].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[8], true), 48, 41)); - } - } - - tStartIndex = 0; - if (mRecipe.mFluidOutputs.length > 0) { - if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 5, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 120, 5, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 2) && (mRecipe.mFluidOutputs[2] != null) && (mRecipe.mFluidOutputs[2].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[2], true), 138, 5, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 3) && (mRecipe.mFluidOutputs[3] != null) && (mRecipe.mFluidOutputs[3].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[3], true), 102, 23, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 4) && (mRecipe.mFluidOutputs[4] != null) && (mRecipe.mFluidOutputs[4].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[4], true), 120, 23, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 5) && (mRecipe.mFluidOutputs[5] != null) && (mRecipe.mFluidOutputs[5].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[5], true), 138, 23, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 6) && (mRecipe.mFluidOutputs[6] != null) && (mRecipe.mFluidOutputs[6].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[6], true), 102, 41, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 7) && (mRecipe.mFluidOutputs[7] != null) && (mRecipe.mFluidOutputs[7].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[7], true), 120, 41, mRecipe.getOutputChance(tStartIndex++))); - } - if ((mRecipe.mFluidOutputs.length > 8) && (mRecipe.mFluidOutputs[8] != null) && (mRecipe.mFluidOutputs[8].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[8], true), 138, 41, mRecipe.getOutputChance(tStartIndex++))); - } - } - - } - - } -} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java b/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java deleted file mode 100644 index c9f9f0722a..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java +++ /dev/null @@ -1,372 +0,0 @@ -package gtPlusPlus.nei; - -import java.awt.Rectangle; -import java.lang.ref.SoftReference; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.stream.Collectors; - -import org.lwjgl.opengl.GL11; - -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.GuiCraftingRecipe; -import codechicken.nei.recipe.GuiRecipe; -import codechicken.nei.recipe.GuiUsageRecipe; -import codechicken.nei.recipe.TemplateRecipeHandler; -import cpw.mods.fml.common.event.FMLInterModComms; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GasSpargingRecipe; -import gregtech.api.util.GasSpargingRecipeMap; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GT_NEI_LFTR_Sparging extends TemplateRecipeHandler { - - public static final String mNEIName = GasSpargingRecipeMap.mNEIDisplayName; - private SoftReference> mCachedRecipes = null; - - public GT_NEI_LFTR_Sparging() { - this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0])); - if (!NEI_GT_Config.sIsAdded) { - FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); - GuiCraftingRecipe.craftinghandlers.add(this); - GuiUsageRecipe.usagehandlers.add(this); - } - } - - public String getRecipeName() { - return mNEIName; - } - - public String getGuiTexture() { - return GasSpargingRecipeMap.mNEIGUIPath; - } - - public String getOverlayIdentifier() { - return gregtech.api.util.GasSpargingRecipeMap.mUnlocalizedName; - } - - public int recipiesPerPage() { - return 1; - } - - @Override - public void drawBackground(final int recipe) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GuiDraw.changeTexture(this.getGuiTexture()); - GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 68); - } - - public void loadTransferRects() { - this.transferRects.add(new RecipeTransferRect(new Rectangle(72, 14, 22, 16), getRecipeName(), new Object[0])); - } - - public List getCache() { - List cache; - if (mCachedRecipes == null || (cache = mCachedRecipes.get()) == null) { - cache = GasSpargingRecipeMap.mRecipes.stream() // do not use parallel stream. This is already parallelized by NEI - .sorted() - .map(temp -> {return createCachedRecipe(temp);}) - .collect(Collectors.toList()); - // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model - // so we do not need any synchronization here - mCachedRecipes = new SoftReference<>(cache); - } - return cache; - } - - public GasSpargingRecipeNEI createCachedRecipe(GasSpargingRecipe aRecipe) { - return new GasSpargingRecipeNEI(aRecipe); - } - - public void loadCraftingRecipes(String outputId, Object... results) { - if (outputId.equals(getOverlayIdentifier())) { - arecipes.addAll(getCache()); - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - public void loadCraftingRecipes(ItemStack aResult) { - ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); - - ArrayList tResults = new ArrayList<>(); - tResults.add(aResult); - tResults.add(GT_OreDictUnificator.get(true, aResult)); - if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { - for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { - tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); - } - } - FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); - FluidStack tFluidStack; - if (tFluid != null) { - tFluidStack = tFluid; - tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); - } - else tFluidStack = GT_Utility.getFluidFromDisplayStack(aResult); - if (tFluidStack != null) { - tResults.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); - } - for (GasSpargingRecipeNEI recipe : getCache()) { - if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) - arecipes.add(recipe); - } - } - - public void loadUsageRecipes(ItemStack aInput) { - ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); - - ArrayList tInputs = new ArrayList<>(); - tInputs.add(aInput); - tInputs.add(GT_OreDictUnificator.get(false, aInput)); - if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { - for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { - tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); - } - } - FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); - FluidStack tFluidStack; - if (tFluid != null) { - tFluidStack = tFluid; - tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); - } - else tFluidStack = GT_Utility.getFluidFromDisplayStack(aInput); - if (tFluidStack != null) { - tInputs.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); - } - for (GasSpargingRecipeNEI recipe : getCache()) { - if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack))) - arecipes.add(recipe); - } - } - - public void drawExtras(int aRecipeIndex) { - final long tEUt = ((GasSpargingRecipeNEI) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; - final long tDuration = ((GasSpargingRecipeNEI) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; - GT_NEI_LFTR.drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); - GT_NEI_LFTR.drawText(10, 83, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216); - GT_NEI_LFTR.drawText(10, 93, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216); - GT_NEI_LFTR.drawText(10, 103, "Gas not used to sparge is", -16777216); - GT_NEI_LFTR.drawText(10, 113, "returned alongside outputs.", -16777216); - } - - @Override - public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { - final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); - if ((tObject instanceof GasSpargingRecipeNEI)) { - final GasSpargingRecipeNEI tRecipe = (GasSpargingRecipeNEI) tObject; - ItemStack aSpargeInput = tRecipe.mOutputs.get(0).item; - ItemStack aSpentFuel = tRecipe.mOutputs.get(1).item; - for (final PositionedStack tStack : tRecipe.mOutputs) { - if (aStack == tStack.item) { - if (ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) { - if (GT_Utility.areStacksEqual(aStack, aSpentFuel, true)) { - break; - } - if (GT_Utility.areStacksEqual(aStack, aSpargeInput, true)) { - currenttip.add("The amount returned is the remainder after all other outputs."); - } - currenttip.add("Maximum Output: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "L"); - break; - } - break; - } - } - for (final PositionedStack tStack : tRecipe.mInputs) { - if (GT_Utility.areStacksEqual(aStack, tStack.item)) { - if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || - (tStack.item.stackSize != 0)) { - break; - } - if (ItemUtils.isControlCircuit(aStack)) { - currenttip.add("Does not get consumed in the process"); - } - break; - } - } - } - return currenttip; - } - - public class FixedPositionedStack - extends PositionedStack { - public final int mChance; - public boolean permutated = false; - - public FixedPositionedStack(final Object object, final int x, final int y) { - this(object, x, y, 0); - } - - public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) { - super(object, x, y, true); - this.mChance = aChance; - } - - @Override - public void generatePermutations() { - if (this.permutated) { - return; - } - final ArrayList tDisplayStacks = new ArrayList(); - for (final ItemStack tStack : this.items) { - if (GT_Utility.isStackValid(tStack)) { - if (tStack.getItemDamage() == 32767) { - final List permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); - if (!permutations.isEmpty()) { - ItemStack stack; - for (final Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { - stack = i$.next(); - } - } else { - final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize); - base.stackTagCompound = tStack.stackTagCompound; - tDisplayStacks.add(base); - } - } else { - tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); - } - } - } - this.items = (tDisplayStacks.toArray(new ItemStack[0])); - if (this.items.length == 0) { - this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; - } - this.permutated = true; - this.setPermutationToRender(0); - } - } - - public class GasSpargingRecipeNEI extends CachedRecipe implements Comparable { - - public final GasSpargingRecipe mRecipe; - public final List mOutputs = new ArrayList(); - public final List mInputs = new ArrayList(); - - public GasSpargingRecipeNEI(GasSpargingRecipe tRecipe) { - super(); - this.mRecipe = tRecipe; - int tStartIndex = 0; - if (tRecipe.mFluidInputs.length > 0) { - if ((tRecipe.mFluidInputs[0] != null) && (tRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[0], true), 30, 5)); - } - if ((tRecipe.mFluidInputs.length > 1) && (tRecipe.mFluidInputs[1] != null) && (tRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[1], true), 12, 5)); - } - if ((tRecipe.mFluidInputs.length > 2) && (tRecipe.mFluidInputs[2] != null) && (tRecipe.mFluidInputs[2].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[2], true), 48, 5)); - } - if ((tRecipe.mFluidInputs.length > 3) && (tRecipe.mFluidInputs[3] != null) && (tRecipe.mFluidInputs[3].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[3], true), 12, 23)); - } - if ((tRecipe.mFluidInputs.length > 4) && (tRecipe.mFluidInputs[4] != null) && (tRecipe.mFluidInputs[4].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[4], true), 30, 23)); - } - if ((tRecipe.mFluidInputs.length > 5) && (tRecipe.mFluidInputs[5] != null) && (tRecipe.mFluidInputs[5].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[5], true), 48, 23)); - } - if ((tRecipe.mFluidInputs.length > 6) && (tRecipe.mFluidInputs[6] != null) && (tRecipe.mFluidInputs[6].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[6], true), 12, 41)); - } - if ((tRecipe.mFluidInputs.length > 7) && (tRecipe.mFluidInputs[7] != null) && (tRecipe.mFluidInputs[7].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[7], true), 30, 41)); - } - if ((tRecipe.mFluidInputs.length > 8) && (tRecipe.mFluidInputs[8] != null) && (tRecipe.mFluidInputs[8].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[8], true), 48, 41)); - } - } - - tStartIndex = 0; - if (tRecipe.mFluidOutputs.length > 0) { - if ((tRecipe.mFluidOutputs[0] != null) && (tRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[0], false), 120, 5, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 1) && (tRecipe.mFluidOutputs[1] != null) && (tRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[1], true), 102, 5, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 2) && (tRecipe.mFluidOutputs[2] != null) && (tRecipe.mFluidOutputs[2].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[2], false), 138, 5, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 3) && (tRecipe.mFluidOutputs[3] != null) && (tRecipe.mFluidOutputs[3].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[3], false), 102, 23, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 4) && (tRecipe.mFluidOutputs[4] != null) && (tRecipe.mFluidOutputs[4].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[4], false), 120, 23, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 5) && (tRecipe.mFluidOutputs[5] != null) && (tRecipe.mFluidOutputs[5].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[5], false), 138, 23, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 6) && (tRecipe.mFluidOutputs[6] != null) && (tRecipe.mFluidOutputs[6].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[6], false), 102, 41, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 7) && (tRecipe.mFluidOutputs[7] != null) && (tRecipe.mFluidOutputs[7].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[7], false), 120, 41, tRecipe.getMaxOutput(tStartIndex++))); - } - if ((tRecipe.mFluidOutputs.length > 8) && (tRecipe.mFluidOutputs[8] != null) && (tRecipe.mFluidOutputs[8].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[8], false), 138, 41, tRecipe.getMaxOutput(tStartIndex++))); - } - } - } - - @Override - public int compareTo(CachedRecipe o) { - boolean b = GasSpargingRecipeNEI.class.isInstance(o); - if (b) { - GasSpargingRecipeNEI p = (GasSpargingRecipeNEI) o; - if (p.mOutputs.size() > this.mOutputs.size()) { - return 1; - } else if (p.mOutputs.size() == this.mOutputs.size()) { - return 0; - } else { - return -1; - } - } - return 0; - } - - @Override - public boolean equals(Object obj) { - if (obj != null) { - if (GasSpargingRecipeNEI.class.isInstance(obj)) { - GasSpargingRecipeNEI p = (GasSpargingRecipeNEI) obj; - if (p != null) { - if (GT_Utility.areStacksEqual(p.mInputs.get(0).item, this.mInputs.get(0).item, true)) { - if (p.mOutputs.size() == this.mOutputs.size()) { - return true; - } - } - } - } - } - return false; - } - - @Override - public List getIngredients() { - return this.getCycledIngredients(GT_NEI_LFTR_Sparging.this.cycleticks / 10, this.mInputs); - } - - @Override - public PositionedStack getResult() { - return null; - } - - @Override - public List getOtherStacks() { - return this.mOutputs; - } - - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_MillingMachine.java b/src/Java/gtPlusPlus/nei/GT_NEI_MillingMachine.java deleted file mode 100644 index 5d09b9003f..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_MillingMachine.java +++ /dev/null @@ -1,136 +0,0 @@ -package gtPlusPlus.nei; - -import java.util.List; - -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.GuiRecipe; -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; - -public class GT_NEI_MillingMachine extends GTPP_NEI_DefaultHandler { - - public GT_NEI_MillingMachine() { - super(GTPP_Recipe_Map.sOreMillRecipes); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_MillingMachine(); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new MillingDefaultRecipe(aRecipe); - } - - @Override - public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { - final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); - if ((tObject instanceof CachedDefaultRecipe)) { - final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; - for (final PositionedStack tStack : tRecipe.mOutputs) { - if (aStack == tStack.item) { - if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { - break; - } - currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); - break; - } - } - for (final PositionedStack tStack : tRecipe.mInputs) { - if (GT_Utility.areStacksEqual(aStack, tStack.item)) { - if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || - (tStack.item.stackSize != 0)) { - break; - } - if (ItemUtils.isMillingBall(aStack)) { - currenttip.add("Does not always get consumed in the process"); - } - else if (ItemUtils.isControlCircuit(aStack)) { - currenttip.add("Does not get consumed in the process"); - } - break; - } - } - } - return currenttip; - } - - public class MillingDefaultRecipe extends CachedDefaultRecipe { - - public MillingDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - } - - @Override - public void handleSlots() { - int tStartIndex = 0; - - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - } - tStartIndex++; - - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - tStartIndex = 0; - - //Four Output Slots - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - - - //New fluid display behaviour when 3 fluid inputs are detected. (Basically a mix of the code below for outputs an the code above for 9 input slots.) - if (mRecipe.mFluidInputs.length >= 1) { - if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 3, 31)); - } - if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 21, 31)); - } - if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 39, 31)); - } - if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 57, 31)); - } - } - - if (mRecipe.mFluidOutputs.length > 0) { - if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 138, 5)); - } - if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 23)); - } - } - } - } -} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java b/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java deleted file mode 100644 index f4f69589b6..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.nei; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import org.lwjgl.opengl.GL11; - -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.math.MathUtils; - -public class GT_NEI_MultiNoCell extends GTPP_NEI_DefaultHandler { - - public GT_NEI_MultiNoCell(GT_Recipe_Map aMap) { - super(aMap); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_MultiNoCell(mRecipeMap); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new NoCellMultiDefaultRecipe(aRecipe); - } - - @Override - public void drawBackground(final int recipe) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GuiDraw.changeTexture(this.getGuiTexture()); - GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 89); - } - - @Override - public String getGuiTexture() { - return RES_PATH_GUI + "basicmachines/FissionFuel.png"; - } - - @Override - public void drawExtras(final int aRecipeIndex) { - final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; - final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; - if (tEUt != 0) { - drawText(10, 90, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); - drawText(10, 100, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216); - } - if (tDuration > 0) { - drawText(10, 110, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); - } - if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - drawText(10, 120, this.mRecipeMap.mNEISpecialValuePre + MathUtils.formatNumbers((((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier)) + this.mRecipeMap.mNEISpecialValuePost, -16777216); - } - } - -} diff --git a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java deleted file mode 100644 index 0b3cf8e66e..0000000000 --- a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.nei; - -import codechicken.nei.api.API; -import codechicken.nei.api.IConfigureNEI; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map_Internal; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class NEI_GT_Config -implements IConfigureNEI { - - public static boolean sIsAdded = false; - - private static final AutoMap mUniqueRecipeMapHandling = new AutoMap(); - - @Override - public synchronized void loadConfig() { - - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sFissionFuelProcessing.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sChemicalPlantRecipes.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sOreMillRecipes.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sFlotationCellRecipes.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sVacuumFurnaceRecipes.mUnlocalizedName); - - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mUnlocalizedName); - - // Standard GT Recipe Maps - Logger.INFO("NEI Registration: "+GTPP_Recipe_Map_Internal.sMappingsEx.size()+" sMappingEx"); - for (final GT_Recipe_Map tMap : GTPP_Recipe_Map_Internal.sMappingsEx) { - if (tMap.mNEIAllowed) { - if (!mUniqueRecipeMapHandling.contains(tMap.mUnlocalizedName)) { - Logger.INFO("NEI Registration: Registering NEI handler for "+tMap.mNEIName); - new GTPP_NEI_DefaultHandler(tMap); - } - else { - Logger.INFO("NEI Registration: Not allowed to register NEI handler for "+tMap.mNEIName); - } - } - else { - Logger.INFO("NEI Registration: Skipping registration of NEI handler for "+tMap.mNEIName); - } - } - - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sChemicalPlantRecipes.mNEIName); - new GT_NEI_FluidReactor(); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sOreMillRecipes.mNEIName); - new GT_NEI_MillingMachine(); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sFlotationCellRecipes.mNEIName); - new GT_NEI_FlotationCell(); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mNEIName); - new GT_NEI_LFTR(); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sFissionFuelProcessing.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sFissionFuelProcessing); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sVacuumFurnaceRecipes.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sVacuumFurnaceRecipes); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sAdvFreezerRecipes_GT); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT); - Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mNEIName); - new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sAlloyBlastSmelterRecipes); - - Logger.INFO("NEI Registration: Registering NEI handler for "+DecayableRecipeHandler.mNEIName); - API.registerRecipeHandler(new DecayableRecipeHandler()); - API.registerUsageHandler(new DecayableRecipeHandler()); - - Logger.INFO("NEI Registration: Registering NEI handler for "+GT_NEI_LFTR_Sparging.mNEIName); - new GT_NEI_LFTR_Sparging(); - - // Hide Flasks - if (Utils.isClient()) { - codechicken.nei.api.API.addItemListEntry(GregtechItemList.VOLUMETRIC_FLASK_8k.get(1)); - codechicken.nei.api.API.addItemListEntry(GregtechItemList.VOLUMETRIC_FLASK_32k.get(1)); - } - sIsAdded = true; - } - - @Override - public String getName() { - return "GT++ NEI Plugin"; - } - - @Override - public String getVersion() { - return "(1.12)"; - } -} diff --git a/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java b/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java deleted file mode 100644 index 7bc2316a04..0000000000 --- a/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java +++ /dev/null @@ -1,51 +0,0 @@ -package gtPlusPlus.nei; - -import cpw.mods.fml.common.event.FMLInterModComms; -import net.minecraft.nbt.NBTTagCompound; - -public class NEI_IMC_Sender { - public static void IMCSender() { - setNBTInfoAndSendIt("gtpp.recipe.alloyblastsmelter", "gregtech:gt.blockmachines:810", 1); - setNBTInfoAndSendIt("gtpp.recipe.rocketenginefuel", "gregtech:gt.blockmachines:793"); - setNBTInfoAndSendIt("gtpp.recipe.cyclotron", "gregtech:gt.blockmachines:828"); - setNBTInfoAndSendIt("gtpp.recipe.chemicaldehydrator", "gregtech:gt.blockmachines:911", 1); - setNBTInfoAndSendIt("gtpp.recipe.slowfusionreactor", "gregtech:gt.blockmachines:31015"); - setNBTInfoAndSendIt("gtpp.recipe.RTGgenerators", "gregtech:gt.blockmachines:869"); - setNBTInfoAndSendIt("gtpp.recipe.cokeoven", "gregtech:gt.blockmachines:791"); - setNBTInfoAndSendIt("gtpp.recipe.semifluidgeneratorfuels", "gregtech:gt.blockmachines:837"); - setNBTInfoAndSendIt("gtpp.recipe.fishpond", "gregtech:gt.blockmachines:829", 1); - setNBTInfoAndSendIt("gtpp.recipe.multimixer", "gregtech:gt.blockmachines:811"); - setNBTInfoAndSendIt("gtpp.recipe.advanced.mixer", "gregtech:gt.blockmachines:811"); - setNBTInfoAndSendIt("gtpp.recipe.cryogenicfreezer", "gregtech:gt.blockmachines:910"); - setNBTInfoAndSendIt("gtpp.recipe.geothermalfuel", "gregtech:gt.blockmachines:830"); - setNBTInfoAndSendIt("gtpp.recipe.matterfab2", "gregtech:gt.blockmachines:799"); - setNBTInfoAndSendIt("gtpp.recipe.multicentrifuge", "gregtech:gt.blockmachines:790", 1); - setNBTInfoAndSendIt("gtpp.recipe.multielectro", "gregtech:gt.blockmachines:796", 1); - setNBTInfoAndSendIt("gtpp.recipe.simplewasher", "gregtech:gt.blockmachines:767"); - setNBTInfoAndSendIt("gtpp.recipe.vacfurnace", "gregtech:gt.blockmachines:995", 1); - setNBTInfoAndSendIt("gtpp.recipe.fissionfuel", "gregtech:gt.blockmachines:835", 1); - setNBTInfoAndSendIt("gtpp.recipe.lftr", "gregtech:gt.blockmachines:751", 1); - setNBTInfoAndSendIt("gtpp.recipe.lftr.sparging", "gregtech:gt.blockmachines:31035", 1); - setNBTInfoAndSendIt("gtpp.recipe.coldtrap", "gregtech:gt.blockmachines:31034"); - setNBTInfoAndSendIt("gtpp.recipe.reactorprocessingunit", "gregtech:gt.blockmachines:31032"); - } - - - private static void setNBTInfoAndSendIt(String aRecipeName, String aBlock) { - setNBTInfoAndSendIt(aRecipeName, aBlock, 2); - } - - private static void setNBTInfoAndSendIt(String aRecipeName, String aBlock, int aRecipesPerPage) { - NBTTagCompound aNBT = new NBTTagCompound(); - aNBT.setString("handler", aRecipeName); - aNBT.setString("modName", "GT++"); - aNBT.setString("modId", "miscutils"); - aNBT.setBoolean("modRequired", true); - aNBT.setString("itemName", aBlock); - aNBT.setInteger("yShift", 6); - aNBT.setInteger("handlerHeight", 135); - aNBT.setInteger("handlerWidth", 166); - aNBT.setInteger("maxRecipesPerPage", aRecipesPerPage); - FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT); - } -} diff --git a/src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java b/src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java deleted file mode 100644 index 30c159ca93..0000000000 --- a/src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java +++ /dev/null @@ -1,164 +0,0 @@ -package gtPlusPlus.nei.handlers; - -import gtPlusPlus.core.lib.CORE; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - - -/** - * Based on crazypants.enderio.gui.IconEIO - * - * @author Original EIO Author - * - * This is free and unencumbered software released into the public - * domain. - * - * Anyone is free to copy, modify, publish, use, compile, sell, or - * distribute this software, either in source code form or as a compiled - * binary, for any purpose, commercial or non-commercial, and by any - * means. - * - * In jurisdictions that recognize copyright laws, the author or authors - * of this software dedicate any and all copyright interest in the - * software to the public domain. We make this dedication for the - * benefit of the public at large and to the detriment of our heirs and - * successors. We intend this dedication to be an overt act of - * relinquishment in perpetuity of all present and future rights to this - * software under copyright law. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * For more information, please refer to - * - * https://github.com/SleepyTrousers/EnderIO/blob/release/1.7.10/2.2/src/main/java/crazypants/render/RenderUtil.java - * - */ -public final class NeiTextureHandler { - - public static final NeiTextureHandler RECIPE = new NeiTextureHandler(16, 132, 16, 16); - public static final NeiTextureHandler RECIPE_BUTTON = new NeiTextureHandler(128, 116, 24, 24); - - public final double minU; - public final double maxU; - public final double minV; - public final double maxV; - public final double width; - public final double height; - - public static final ResourceLocation TEXTURE = new ResourceLocation(CORE.MODID + ":textures/gui/nei/widgets.png"); - - public NeiTextureHandler(int x, int y) { - this(x, y, 16, 16); - } - - public NeiTextureHandler(int x, int y, int width, int height) { - this((double) width, (double) height, (double) ((float) (0.00390625D * (double) x)), - (double) ((float) (0.00390625D * (double) (x + width))), (double) ((float) (0.00390625D * (double) y)), - (double) ((float) (0.00390625D * (double) (y + height)))); - } - - public NeiTextureHandler(double width, double height, double minU, double maxU, double minV, double maxV) { - this.width = width; - this.height = height; - this.minU = minU; - this.maxU = maxU; - this.minV = minV; - this.maxV = maxV; - } - - public void renderIcon(double x, double y) { - this.renderIcon(x, y, this.width, this.height, 0.0D, false); - } - - public void renderIcon(double x, double y, boolean doDraw) { - this.renderIcon(x, y, this.width, this.height, 0.0D, doDraw); - } - - public void renderIcon(double x, double y, double width, double height, double zLevel, boolean doDraw) { - this.renderIcon(x, y, width, height, zLevel, doDraw, false); - } - - public void renderIcon(double x, double y, double width, double height, double zLevel, boolean doDraw, - boolean flipY) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - Tessellator tessellator = Tessellator.instance; - if (doDraw) { - bindTexture(TEXTURE); - tessellator.startDrawingQuads(); - } - - if (flipY) { - tessellator.addVertexWithUV(x, y + height, zLevel, this.minU, this.minV); - tessellator.addVertexWithUV(x + width, y + height, zLevel, this.maxU, this.minV); - tessellator.addVertexWithUV(x + width, y + 0.0D, zLevel, this.maxU, this.maxV); - tessellator.addVertexWithUV(x, y + 0.0D, zLevel, this.minU, this.maxV); - } else { - tessellator.addVertexWithUV(x, y + height, zLevel, this.minU, this.maxV); - tessellator.addVertexWithUV(x + width, y + height, zLevel, this.maxU, this.maxV); - tessellator.addVertexWithUV(x + width, y + 0.0D, zLevel, this.maxU, this.minV); - tessellator.addVertexWithUV(x, y + 0.0D, zLevel, this.minU, this.minV); - } - - if (doDraw) { - tessellator.draw(); - } - - } - - public static final ResourceLocation BLOCK_TEX; - public static final ResourceLocation ITEM_TEX; - public static final ResourceLocation GLINT_TEX; - public static int BRIGHTNESS_MAX; - - static { - BLOCK_TEX = TextureMap.locationBlocksTexture; - ITEM_TEX = TextureMap.locationItemsTexture; - GLINT_TEX = new ResourceLocation("textures/misc/enchanted_item_glint.png"); - BRIGHTNESS_MAX = 15728880; - } - - public static TextureManager engine() { - return Minecraft.getMinecraft().renderEngine; - } - - public static void bindItemTexture(ItemStack stack) { - engine().bindTexture(stack.getItemSpriteNumber() == 0 ? BLOCK_TEX : ITEM_TEX); - } - - public static void bindItemTexture() { - engine().bindTexture(ITEM_TEX); - } - - public static void bindBlockTexture() { - engine().bindTexture(BLOCK_TEX); - } - - public static void bindGlintTexture() { - engine().bindTexture(BLOCK_TEX); - } - - public static void bindTexture(String string) { - engine().bindTexture(new ResourceLocation(string)); - } - - public static void bindTexture(ResourceLocation tex) { - engine().bindTexture(tex); - } - - public static FontRenderer fontRenderer() { - return Minecraft.getMinecraft().fontRenderer; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java b/src/Java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java deleted file mode 100644 index c6e98581ff..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.plugin.agrichem; - -public enum AlgaeDefinition { - - /* - * In general, the productivity of freshwater algae is primarily limited by - * the availability of the nutrient phosphate (PO4-3), while that of - * marine algae is limited by nitrate (NO3-) or ammonium (NH4+). - * Some algal species, however, may have unusual nutrient requirements, - * and their productivity may be limited by certain micronutrients, - * such as silica, in the case of diatoms. - */ - - Euglenophyta("Euglenophyta", "Euglenoids", true, false, getRGB(147, 168, 50)), - Chrysophyta("Chrysophyta", "Golden-Brown Algae", true, true, getRGB(186, 146, 0)), - Pyrrophyta("Pyrrophyta", "Fire Algae", true, true, getRGB(250, 118, 2)), - Chlorophyta("Chlorophyta", "Green Algae", true, true, getRGB(99, 181, 62)), - Rhodophyta("Rhodophyta", "Red Algae", false, true, getRGB(153, 5, 22)), - Paeophyta("Paeophyta", "Brown Algae", false, true, getRGB(94, 78, 47)), - Xanthophyta("Xanthophyta", "Yellow-Green Algae", true, false, getRGB(118, 138, 16)); - - public final String mScientificName; - public final String mSimpleName; - public final boolean mSaltWater; - public final boolean mFreshWater; - public final int mColour; - - AlgaeDefinition(String aScientificName, String aSimpleName, boolean aFresh, boolean aSalt, int aColour) { - mScientificName = aScientificName; - mSimpleName = aSimpleName; - mFreshWater = aFresh; - mSaltWater = aSalt; - mColour = aColour; - } - - public static AlgaeDefinition getByIndex(int aIndex) { - switch(aIndex) { - default: - case 0: - return Euglenophyta; - case 1: - return Chrysophyta; - case 2: - return Pyrrophyta; - case 3: - return Chlorophyta; - case 4: - return Rhodophyta; - case 5: - return Paeophyta; - case 6: - return Xanthophyta; - } - } - - private final static int getRGB(int r, int g, int b) { - return AlgaeUtils.rgbtoHexValue(r, g, b); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java b/src/Java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java deleted file mode 100644 index 73ff23888c..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.plugin.agrichem; - -import gtPlusPlus.core.util.Utils; - -public class AlgaeUtils { - - public static int rgbtoHexValue(final int r, final int g, final int b) { - return Utils.rgbtoHexValue(r, g, b); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/BioRecipes.java b/src/Java/gtPlusPlus/plugin/agrichem/BioRecipes.java deleted file mode 100644 index edfd42b5ca..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/BioRecipes.java +++ /dev/null @@ -1,1425 +0,0 @@ -package gtPlusPlus.plugin.agrichem; - -import static gtPlusPlus.core.lib.CORE.GTNH; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.OreDictUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.plugin.agrichem.block.AgrichemFluids; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.railcraft.utils.RailcraftUtils; -import ic2.core.Ic2Items; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -public class BioRecipes { - - private static Item mFert; - private static Item mDustDirt; - - private static Fluid mSalineWater; - private static Fluid mDistilledWater; - private static Fluid mThermalWater; - private static Fluid mAir; - private static Fluid mSulfuricWasteWater; - private static Fluid mAmmonia; - private static Fluid mMethanol; - private static Fluid mAceticAcid; - private static Fluid mPropionicAcid; - private static Fluid mLiquidPlastic; - private static Fluid mFermentationBase; - private static Fluid mCarbonDioxide; - private static Fluid mCarbonMonoxide; - private static Fluid mEthylene; - public static Fluid mEthanol; - private static Fluid mChlorine; - private static Fluid mHydrogen; - private static Fluid mDilutedSulfuricAcid; - private static Fluid mSulfuricAcid; - private static Fluid mUrea; - private static Fluid mFormaldehyde; - private static Fluid mLiquidResin; - private static Fluid mMethane; - private static Fluid mBenzene; - private static Fluid mEthylbenzene; - private static Fluid mStyrene; - private static Fluid mButanol; - private static Fluid mAcetone; - - - private static final ItemStack getGreenAlgaeRecipeChip() { - return getBioChip(4); - } - private static final ItemStack getBrownAlgaeRecipeChip() { - return getBioChip(8); - } - private static final ItemStack getGoldenBrownAlgaeRecipeChip() { - return getBioChip(12); - } - private static final ItemStack getRedAlgaeRecipeChip() { - return getBioChip(16); - } - - private static final ItemStack getBioChip(int aID) { - return ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, aID, 0); - } - - public static void init() { - Logger.INFO("[Bio] Setting Variables"); - initRecipeVars(); - Logger.INFO("[Bio] Generating Biochip Recipes"); - recipeBioChip(); - Logger.INFO("[Bio] Generating Recipes"); - recipeAlgaeBiomass(); - Logger.INFO("[Bio] Finished with recipes"); - } - - private static final void initRecipeVars() { - mFert = AgriculturalChem.dustOrganicFertilizer; - mDustDirt = AgriculturalChem.dustDirt; - - // 5.08 Salt Water Solution ;) - if (!FluidUtils.doesFluidExist("saltwater")){ - mSalineWater = FluidUtils.generateFluidNoPrefix("saltwater", "Salt Water", 200, new short[]{10, 30, 220, 100}); - } - else { - Materials aSaltWater = MaterialUtils.getMaterial("saltwater"); - if (aSaltWater != null) { - FluidStack aWaterStack = aSaltWater.getFluid(1); - if (aWaterStack != null) { - mSalineWater = aSaltWater.getFluid(1).getFluid(); - } - } - if (mSalineWater == null) { - mSalineWater = FluidUtils.getWildcardFluidStack("saltwater", 1).getFluid(); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellSaltWater", 1) == null){ - new BaseItemComponent("saltwater", "Salt Water", new short[] {10, 30, 220}); - } - } - - mDistilledWater = FluidUtils.getDistilledWater(1).getFluid(); - mThermalWater = FluidUtils.getFluidStack("ic2hotwater", 1).getFluid(); - mAir = FluidUtils.getFluidStack("air", 1).getFluid(); - mSulfuricWasteWater = FluidUtils.getFluidStack("sulfuricapatite", 1).getFluid(); - mAmmonia = MISC_MATERIALS.AMMONIA.getFluidStack(1).getFluid(); - mEthylene = FluidUtils.getFluidStack("ethylene", 1).getFluid(); - mEthanol = FluidUtils.getFluidStack("bioethanol", 1).getFluid(); - mDilutedSulfuricAcid = FluidUtils.getFluidStack("dilutedsulfuricacid", 1).getFluid(); - mSulfuricAcid = FluidUtils.getFluidStack("sulfuricacid", 1).getFluid(); - mFormaldehyde = FluidUtils.getFluidStack("fluid.formaldehyde", 1).getFluid(); - mMethane = FluidUtils.getFluidStack("methane", 1).getFluid(); - mBenzene = FluidUtils.getFluidStack("benzene", 1).getFluid(); - mEthylbenzene = FluidUtils.getFluidStack("fluid.ethylbenzene", 1).getFluid(); - mStyrene = FluidUtils.getFluidStack("styrene", 1).getFluid(); - mMethanol = FluidUtils.getFluidStack("methanol", 1).getFluid(); - mLiquidPlastic = FluidUtils.getWildcardFluidStack("plastic", 1).getFluid(); - mCarbonDioxide = MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(1).getFluid(); - mCarbonMonoxide = MISC_MATERIALS.CARBON_MONOXIDE.getFluidStack(1).getFluid(); - mChlorine = FluidUtils.getFluidStack("chlorine", 1).getFluid(); - mHydrogen = FluidUtils.getFluidStack("hydrogen", 1).getFluid(); - mAceticAcid = AgrichemFluids.mAceticAcid; - mPropionicAcid = AgrichemFluids.mPropionicAcid; - mUrea = AgrichemFluids.mUrea; - mLiquidResin = AgrichemFluids.mLiquidResin; - mFermentationBase = AgrichemFluids.mFermentationBase; - mButanol = AgrichemFluids.mButanol; - mAcetone = AgrichemFluids.mAcetone; - } - - private static void recipeAlgaeBiomass() { - - // TODO - // Add in recipes to get initial Biomass - - recipeGreenAlgae(); - recipeBrownAlgae(); - recipeGoldenBrownAlgae(); - recipeRedAlgae(); - recipeWoodPellets(); - recipeWoodBricks(); - recipeCellulosePulp(); - recipeCatalystCarrier(); - recipeAluminiumSilverCatalyst(); - recipeAceticAcid(); - recipePropionicAcid(); - recipeFermentationBase(); - recipeEthanol(); - recipeCelluloseFibre(); - recipeGoldenBrownCelluloseFiber(); - recipeRedCelluloseFiber(); - recipeSodiumHydroxide(); - recipeSodiumCarbonate(); - recipePelletMold(); - recipeAluminiumPellet(); - recipeAlumina(); - recipeAluminium(); - recipeCalciumCarbonate(); - recipeLithiumChloride(); - recipeAlginicAcid(); - recipeSulfuricAcid(); - recipeUrea(); - recipeRawBioResin(); - recipeLiquidResin(); - recipeCompost(); - recipeMethane(); - recipeBenzene(); - recipeStyrene(); - registerFuels(); - } - - private static void registerFuels() { - - // Burnables - ItemUtils.registerFuel(ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), 800); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 1), 4800); - - // Gas Fuels - //GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalGas", 1), null, 96, 1); - - //Combustion Fuels - GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellButanol", 1), null, 1125, 0); - - } - private static void recipeGreenAlgae() { - // Compost - GT_ModHandler.addPulverisationRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 10), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); - - // Turn into Cellulose - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getGreenAlgaeRecipeChip(), - ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 30) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 5), - 30 * 30, - 16); - - - } - - private static void recipeBrownAlgae() { - // Compost - GT_ModHandler.addPulverisationRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 10), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); - - // Alginic acid - CORE.RA.addExtractorRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 10), - ItemUtils.getSimpleStack(AgriculturalChem.mAlginicAcid, 1), - 20 * 15, - 30); - - // Lithium Chloride - GT_Values.RA.addBlastRecipe( - getBrownAlgaeRecipeChip(), - ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 20), - GT_Values.NF, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mLithiumChloride, 1), - GT_Values.NI, - 120, - 120, - 1200); - - // Sodium Carbonate - CORE.RA.addChemicalRecipe( - getBrownAlgaeRecipeChip(), - ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 20), - FluidUtils.getDistilledWater(2000), - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), - 20 * 30, - 30); - - } - - private static void recipeGoldenBrownAlgae() { - // Compost - GT_ModHandler.addPulverisationRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 10), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); - - // Turn into Cellulose - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getGoldenBrownAlgaeRecipeChip(), - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 30) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 5), - 30 * 30, - 120); - - } - - private static void recipeRedAlgae() { - // Compost - GT_ModHandler.addPulverisationRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 10), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); - - // Turn into Cellulose - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getRedAlgaeRecipeChip(), - ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 30) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 5), - 30 * 30, - 240); - - } - - private static void recipeCelluloseFibre() { - - CORE.RA.addChemicalRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 20), - ItemUtils.getSimpleStack(AgriculturalChem.mAlginicAcid, 2), - GT_Values.NF, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 10), - 45 * 20, - 16); - - // Craft into Wood Pellets - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(2), - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 12) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 2), - 20 * 4, - 8); - - // Methanol Extraction - GT_Values.RA.addFluidExtractionRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 12), - GT_Values.NI, - FluidUtils.getFluidStack(mMethanol, 50), - 10000, - 20 * 30, - 30); - - // Compost - GT_ModHandler.addPulverisationRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 5), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); - - // Plastic - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(16), - ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 64), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mAceticAcid, 500), - FluidUtils.getFluidStack(BioRecipes.mPropionicAcid, 500), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mLiquidPlastic, (144)), - }, - 120 * 20, - 240, - 2); - - - } - - private static void recipeWoodPellets() { - // Shapeless Recipe - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1) - }, ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 2)); - - // Extruder Recipe - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 12), - ItemUtils.getSimpleStack(AgriculturalChem.mPelletMold, 0), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 3), - 20 * 10, - 16); - - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(2), - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 8) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 2), - 20 * 5, - 8); - - // CO2 - CORE.RA.addFluidExtractionRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), - FluidUtils.getFluidStack(mCarbonDioxide, 70), - 10*20, - 30); - - - // Add Charcoal Recipe - if (LoadedMods.Railcraft) { - RailcraftUtils.addCokeOvenRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 2), - true, - true, - ItemUtils.getItemStackOfAmountFromOreDict("gemCharcoal", 3), - GT_Values.NF, - 1200); - } - CORE.RA.addCokeOvenRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 2), - getBioChip(3), - null, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("gemCharcoal", 3), - 120, - 16); - - - } - - private static void recipeWoodBricks() { - - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(3), - ItemUtils.getOrePrefixStack(OrePrefixes.dust, Materials.Wood, 50) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 1), - 100 * 20, - 16); - } - - private static void recipeCellulosePulp() { - - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(2), - ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 4) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(Items.paper, 1), - 60 * 20, - 16); - } - - private static void recipeCatalystCarrier() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(20), - ItemUtils.getItemStackOfAmountFromOreDict("plateSteel", GTNH ? 8 : 4), - ItemUtils.getItemStackOfAmountFromOreDict("wireFineCopper", GTNH ? 4 : 2), - ItemUtils.getItemStackOfAmountFromOreDict("screwTin", GTNH ? 6 : 3) - }, - GT_Values.NF, - CI.getEmptyCatalyst(1), - 300 * 20, - 16); - } - - private static void recipeAluminiumSilverCatalyst() { - // Assembly Recipe - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(4), - CI.getEmptyCatalyst(10), - ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4), - ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 4) - }, - GT_Values.NF, - CI.getGreenCatalyst(10), - 20 * 20, - 30); - } - - private static void recipeAceticAcid() { - - /* GT_Values.RA.addMixerRecipe( - CI.getGreenCatalyst(10), - var2, - var3, var4, - var5, // Fluid in - var6, // Fluid out - var7, // Item Out - var8, // Time - var9); // Eu - */ - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getGreenCatalyst(0) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mMethanol, 700), - FluidUtils.getFluidStack(BioRecipes.mCarbonMonoxide, 300), - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), - }, - new ItemStack[] { - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mAceticAcid, 250), - }, - 120 * 20, - 60, - 1); - - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(14), - CI.emptyCells(1) - }, - FluidUtils.getFluidStack(mFermentationBase, 4000), - null, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellAceticAcid", 1) - }, - new int[] {10000, 10000}, - 60 * 20, - 16); - - - } - - - - public final static HashSet mFruits = new HashSet(); - public final static HashSet mVege = new HashSet(); - public final static HashSet mNuts = new HashSet(); - public final static HashSet mSeeds = new HashSet(); - - public final static AutoMap mList_Master_FruitVege = new AutoMap(); - public final static AutoMap mList_Master_Seeds = new AutoMap(); - - private static void processFermentationOreDict() { - processOreDictEntry("listAllfruit", mFruits); - processOreDictEntry("listAllFruit", mFruits); - processOreDictEntry("listAllveggie", mVege); - processOreDictEntry("listAllVeggie", mVege); - processOreDictEntry("listAllnut", mNuts); - processOreDictEntry("listAllNut", mNuts); - processOreDictEntry("listAllseed", mSeeds); - processOreDictEntry("listAllSeed", mSeeds); - - if (!mFruits.isEmpty()) { - for (GT_ItemStack g : mFruits) { - mList_Master_FruitVege.put(g.toStack()); - } - } - if (!mVege.isEmpty()) { - for (GT_ItemStack g : mVege) { - mList_Master_FruitVege.put(g.toStack()); - } - } - if (!mNuts.isEmpty()) { - for (GT_ItemStack g : mNuts) { - mList_Master_FruitVege.put(g.toStack()); - } - } - if (!mSeeds.isEmpty()) { - for (GT_ItemStack g : mSeeds) { - mList_Master_Seeds.put(g.toStack()); - } - } - } - - // Make Fermentation - private static void processOreDictEntry(String aOreName, HashSet mfruits2) { - ArrayList aTemp = OreDictionary.getOres(aOreName); - if (!aTemp.isEmpty()) { - for (ItemStack stack : aTemp) { - mfruits2.add(new GT_ItemStack(stack)); - } - } - } - - - private static void recipeFermentationBase() { - processFermentationOreDict(); - AutoMap aFruitVege = mList_Master_FruitVege; - AutoMap aSeeds = mList_Master_Seeds; - ArrayList aMap = OreDictionary.getOres("cropSugarbeet"); - for (ItemStack a : aFruitVege) { - if (aMap.contains(a)) { - continue; - } - if (ItemUtils.checkForInvalidItems(a)) { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(2), - ItemUtils.getSimpleStack(a, 10) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 200), - }, - 60 * 20, - 2, - 0); - } - - } - for (ItemStack a : aSeeds) { - if (ItemUtils.checkForInvalidItems(a)) { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(3), - ItemUtils.getSimpleStack(a, 20) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 50), - }, - 60 * 20, - 2, - 0); - } - } - - // Sugar Cane - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(4), - ItemUtils.getSimpleStack(Items.reeds, 16) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 75), - }, - 90 * 20, - 30, - 0); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(5), - ItemUtils.getSimpleStack(Items.reeds, 32), - ItemUtils.getSimpleStack(ModItems.dustCalciumCarbonate, 4) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mThermalWater, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 150), - }, - 120 * 20, - 30, - 0); - - // Sugar Beet - if (OreDictUtils.containsValidEntries("cropSugarbeet")) { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(4), - ItemUtils.getItemStackOfAmountFromOreDict("cropSugarbeet", 8), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 75), - }, - 60 * 20, - 30, - 0); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(5), - ItemUtils.getItemStackOfAmountFromOreDict("cropSugarbeet", 16), - ItemUtils.getSimpleStack(ModItems.dustCalciumCarbonate, 4) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mThermalWater, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 150), - }, - 90 * 20, - 30, - 0); - } - - // Produce Acetone, Butanol and Ethanol - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(5), - ItemUtils.getItemStackOfAmountFromOreDict("cellFermentationBase", 48), - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 16), - ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 16), - }, - new FluidStack[] { - - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellButanol", 6), - ItemUtils.getItemStackOfAmountFromOreDict("cellAcetone", 3), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthanol", 1), - CI.emptyCells(38) - }, - new FluidStack[] { - - }, - 450 * 20, - 32, - 1); - - - } - - private static void recipePropionicAcid() { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getGreenCatalyst(0) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mEthylene, 500), - FluidUtils.getFluidStack(BioRecipes.mCarbonMonoxide, 500), - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), - }, - new ItemStack[] { - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mPropionicAcid, 250), - }, - 20 * 20, - 60, - 1); - } - - private static void recipeEthanol() { - - CORE.RA.addDistilleryRecipe( - BioRecipes.getBioChip(2), - FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 1000), - FluidUtils.getFluidStack(BioRecipes.mEthanol, 100), - null, - 20 * 20, - 60, - false); - - } - - private static void recipeGoldenBrownCelluloseFiber() { - CORE.RA.addFluidExtractionRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 20), - FluidUtils.getFluidStack(BioRecipes.mAmmonia, 50), - 20 * 30, - 120); - } - - private static void recipeRedCelluloseFiber() { - CORE.RA.addExtractorRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 20), - ItemUtils.getSimpleStack(ModItems.dustCalciumCarbonate, 5), - 20 * 30, - 240); - } - - private static void recipeSodiumHydroxide() { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(4) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mSalineWater, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumHydroxide, 1) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mChlorine, 400), - FluidUtils.getFluidStack(BioRecipes.mHydrogen, 600), - }, - 300 * 20, - 120, - 1); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(5), - ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 5) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 5000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumHydroxide, 5) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mHydrogen, 5000), - }, - 60 * 20, - 60, - 1); - } - - private static void recipeSodiumCarbonate() { - - if (OreDictUtils.containsValidEntries("fuelCoke")) { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(18), - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 3), - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 3), - ItemUtils.getSimpleStack(AgriculturalChem.mAluminiumPellet, 6) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumAluminate, 18) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mHydrogen, 200), - FluidUtils.getFluidStack(BioRecipes.mCarbonDioxide, 1600), - }, - 120 * 20, - 120, - 1); - - } - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(18), - ItemUtils.getItemStackOfAmountFromOreDict("dustCoal", 6), - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 4), - ItemUtils.getSimpleStack(AgriculturalChem.mAluminiumPellet, 6) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumAluminate, 16) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mHydrogen, 100), - FluidUtils.getFluidStack(BioRecipes.mCarbonDioxide, 1750), - }, - 180 * 20, - 120, - 1); - - } - - private static void recipePelletMold() { - GregtechItemList.Pellet_Mold.set(ItemUtils.getSimpleStack(AgriculturalChem.mPelletMold, 1)); - GT_Values.RA.addLatheRecipe( - ALLOY.TUMBAGA.getBlock(1), - GregtechItemList.Pellet_Mold.get(1), - null, - 20 * 30 * 15, - 90); - } - - private static void recipeAluminiumPellet() { - - // Ore Names, no prefix - AutoMap aOreNames = new AutoMap(); - - aOreNames.put("Lazurite"); - aOreNames.put("Bauxite"); - aOreNames.put("Grossular"); - aOreNames.put("Pyrope"); - aOreNames.put("Sodalite"); - aOreNames.put("Spodumene"); - aOreNames.put("Ruby"); - aOreNames.put("Sapphire"); - aOreNames.put("GreenSapphire"); - - // Voltage - HashMap aOreData1 = new HashMap(); - // Input Count - HashMap aOreData2 = new HashMap(); - // Output Count - HashMap aOreData3 = new HashMap(); - - aOreData1.put("Lazurite", 120); - aOreData1.put("Bauxite", 90); - aOreData1.put("Grossular", 90); - aOreData1.put("Pyrope", 90); - aOreData1.put("Sodalite", 90); - aOreData1.put("Spodumene", 90); - aOreData1.put("Ruby", 60); - aOreData1.put("Sapphire", 30); - aOreData1.put("GreenSapphire", 30); - aOreData2.put("Lazurite", 14); - aOreData2.put("Bauxite", 39); - aOreData2.put("Grossular", 20); - aOreData2.put("Pyrope", 20); - aOreData2.put("Sodalite", 11); - aOreData2.put("Spodumene", 10); - aOreData2.put("Ruby", 6); - aOreData2.put("Sapphire", 5); - aOreData2.put("GreenSapphire", 5); - aOreData3.put("Lazurite", 3); - aOreData3.put("Bauxite", 16); - aOreData3.put("Grossular", 2); - aOreData3.put("Pyrope", 2); - aOreData3.put("Sodalite", 3); - aOreData3.put("Spodumene", 1); - aOreData3.put("Ruby", 2); - aOreData3.put("Sapphire", 2); - aOreData3.put("GreenSapphire", 2); - - // Assemble all valid crushed ore types for making pellet mix - HashMap aOreCache = new HashMap(); - for (String aOreName : aOreNames) { - String aTemp = aOreName; - aOreName = "crushedPurified" + aOreName; - if (ItemUtils.doesOreDictHaveEntryFor(aOreName)) { - aOreCache.put(aTemp, ItemUtils.getItemStackOfAmountFromOreDict(aOreName, 1)); - } - } - - for (String aOreName : aOreNames) { - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(14), - ItemUtils.getSimpleStack(aOreCache.get(aOreName), aOreData2.get(aOreName)) - }, - new FluidStack[] { - FluidUtils.getSteam(2000 * aOreData2.get(aOreName)) - }, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mCleanAluminiumMix, (int) (Math.ceil(aOreData3.get(aOreName) * 1.4))) - }, - new FluidStack[] { - FluidUtils.getFluidStack(AgriculturalChem.RedMud, 100 * (int) (Math.ceil(aOreData3.get(aOreName) * 1.4))) - }, - 20 * 60, - aOreData1.get(aOreName), - aOreName.equals("Bauxite") ? 2 : 1); - } - - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mCleanAluminiumMix, 3), - ItemUtils.getSimpleStack(AgriculturalChem.mPelletMold, 0), - ItemUtils.getSimpleStack(AgriculturalChem.mAluminiumPellet, 4), - 20 * 30, - 64); - - - } - - private static void recipeAlumina() { - GT_Values.RA.addBlastRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumAluminate, 24), - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumHydroxide, 3), - FluidUtils.getFluidStack(mCarbonDioxide, 6000), - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mAlumina, 24), - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 2), - 20 * 120, - 120, - 1200); - } - - private static void recipeAluminium() { - GT_Values.RA.addBlastRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mAlumina, 24), - ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 4), - GT_Values.NF, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 24), - null, - 20 * 120, - 120, - 1600); - } - - private static void recipeCalciumCarbonate() { - - } - - private static void recipeLithiumChloride() { - - if (OreDictUtils.containsValidEntries("dustRockSalt")) { - GT_Values.RA.addElectrolyzerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustRockSalt", 8), - ItemUtils.getSimpleStack(AgriculturalChem.mLithiumChloride, 10), - FluidUtils.getFluidStack(BioRecipes.mAir, 4000), - FluidUtils.getFluidStack(BioRecipes.mChlorine, 500), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLithium", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallPotassium", 5), - new int[] {7500, 8000, 8500, 9000, 7500, 8500}, - 60 * 30, - 60); - } - if (OreDictUtils.containsValidEntries("dustPotash")) { - GT_Values.RA.addElectrolyzerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustPotash", 10), - ItemUtils.getSimpleStack(AgriculturalChem.mLithiumChloride, 16), - FluidUtils.getFluidStack(BioRecipes.mThermalWater, 2000), - FluidUtils.getFluidStack(BioRecipes.mChlorine, 250), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLithium", 7), - ItemUtils.getItemStackOfAmountFromOreDict("dustAsh", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustAsh", 2), - new int[] {7500, 8000, 8500, 9000, 9000, 9000}, - 45 * 30, - 90); - } - - } - - private static void recipeAlginicAcid() { - - /*// Turn into Cellulose Pulp - CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - getBioChip(7), - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 20), - ItemUtils.getSimpleStack(AgriculturalChem.mAlginicAcid, 5) - }, - GT_Values.NF, - ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 20), - 90 * 20, - 16);*/ - } - - private static void recipeSulfuricAcid() { - - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(7), - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 10), - ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 30) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mSulfuricAcid, 50), - }, - 60 * 20, - 60, - 1); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(7), - ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 5), - ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 30) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mSulfuricAcid, 250), - }, - 60 * 20, - 120, - 2); - - } - - private static void recipeUrea() { - - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(9), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mAmmonia, 600), - FluidUtils.getFluidStack(BioRecipes.mCarbonDioxide, 400), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mUrea, 400), - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 600), - }, - 120 * 20, - 30, - 1); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(9), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mUrea, 200), - FluidUtils.getFluidStack(BioRecipes.mFormaldehyde, 200), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mLiquidResin, 200) - }, - 120 * 20, - 30, - 1); - } - - private static void recipeRawBioResin() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(3), - ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 10), - ItemUtils.getSimpleStack(Blocks.dirt, 20) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(AgriculturalChem.mRawBioResin, 1), - }, - new FluidStack[] { - - }, - 60 * 20, - 30, - 1); - } - - private static void recipeLiquidResin() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(3), - ItemUtils.getSimpleStack(AgriculturalChem.mRawBioResin, 1) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mEthanol, 200), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mLiquidResin, 50), - }, - 60 * 20, - 30, - 1); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(3), - ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 8) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mLiquidResin, 144), - }, - new ItemStack[] { - ItemUtils.getSimpleStack(Ic2Items.resin, 1) - }, - new FluidStack[] { - - }, - 120 * 20, - 30, - 1); - - - } - - private static void recipeCompost() { - ItemStack aFert; - if (LoadedMods.Forestry) { - aFert = ItemUtils.getSimpleStack(AgriculturalChem.aFertForestry, 2); - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(11), - ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 16), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 8) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mUrea, 500), - }, - new ItemStack[] { - aFert - }, - new FluidStack[] { - - }, - 120 * 20, - 60, - 1); - } - - aFert = ItemUtils.getSimpleStack(AgriculturalChem.aFertIC2, 2); - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(12), - ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 16), - ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 8) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mUrea, 500), - }, - new ItemStack[] { - aFert - }, - new FluidStack[] { - - }, - 120 * 20, - 60, - 1); - - } - - private static void recipeMethane() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(12), - ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 20) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 500), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mMethane, 20), - }, - 20 * 20, - 8, - 1); - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(13), - ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 64), - ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 48), - ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 32) - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mMethane, 2000), - }, - new ItemStack[] { - - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mEthylene, 1250), - }, - 60 * 20, - 60, - 1); - } - - private static void recipeBenzene() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(19), - CI.getGreenCatalyst(0), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mMethane, 1000), - }, - new ItemStack[] { - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mBenzene, 500), - }, - 8 * 20, - 120, - 2); - } - - private static void recipeStyrene() { - - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { - getBioChip(20), - CI.getGreenCatalyst(0), - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mEthylbenzene, 100), - }, - new ItemStack[] { - }, - new FluidStack[] { - FluidUtils.getFluidStack(BioRecipes.mStyrene, 25), - }, - 16 * 20, - 480, - 2); - } - - private static void recipeBioChip() { - GT_ModHandler.addShapelessCraftingRecipe( - GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 0L), 0, new Object[]{OrePrefixes.circuit.get(Materials.Primitive)}); - - long bits = 0; - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 1L, new Object[0]), bits, - new Object[]{"d ", " P ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 2L, new Object[0]), bits, - new Object[]{" d ", " P ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 3L, new Object[0]), bits, - new Object[]{" d", " P ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 4L, new Object[0]), bits, - new Object[]{" ", " Pd", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 5L, new Object[0]), bits, - new Object[]{" ", " P ", " d", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 6L, new Object[0]), bits, - new Object[]{" ", " P ", " d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 7L, new Object[0]), bits, - new Object[]{" ", " P ", "d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 8L, new Object[0]), bits, - new Object[]{" ", "dP ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 9L, new Object[0]), bits, - new Object[]{"P d", " ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 10L, new Object[0]), bits, - new Object[]{"P ", " d", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 11L, new Object[0]), bits, - new Object[]{"P ", " ", " d", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 12L, new Object[0]), bits, - new Object[]{"P ", " ", " d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 13L, new Object[0]), bits, - new Object[]{" P", " ", " d", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 14L, new Object[0]), bits, - new Object[]{" P", " ", " d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 15L, new Object[0]), bits, - new Object[]{" P", " ", "d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 16L, new Object[0]), bits, - new Object[]{" P", "d ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 17L, new Object[0]), bits, - new Object[]{" ", " ", "d P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 18L, new Object[0]), bits, - new Object[]{" ", "d ", " P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 19L, new Object[0]), bits, - new Object[]{"d ", " ", " P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 20L, new Object[0]), bits, - new Object[]{" d ", " ", " P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 21L, new Object[0]), bits, - new Object[]{"d ", " ", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 22L, new Object[0]), bits, - new Object[]{" d ", " ", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 23L, new Object[0]), bits, - new Object[]{" d", " ", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 24L, new Object[0]), bits, - new Object[]{" ", " d", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); - } - - public static boolean addCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) { - Method mAddRecipe = ReflectionUtils.getMethod(GT_ModHandler.class, "addCraftingRecipe", new Class[] { - ItemStack.class, Enchantment[].class, int[].class, - boolean.class, boolean.class, boolean.class, boolean.class, - boolean.class, boolean.class, boolean.class, boolean.class, - boolean.class, boolean.class, boolean.class, boolean.class, - boolean.class, Object[].class}); - boolean didInvoke = false; - if (mAddRecipe != null) { - try { - didInvoke = (boolean) mAddRecipe.invoke(null, aResult, - new Enchantment[] {}, - new int[] {}, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - aRecipe); - } - catch (IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - return didInvoke; - - - } - - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java b/src/Java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java deleted file mode 100644 index 4cf31e9335..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java +++ /dev/null @@ -1,70 +0,0 @@ -package gtPlusPlus.plugin.agrichem; - -import java.util.List; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.plugin.agrichem.block.AgrichemFluids; -import gtPlusPlus.plugin.agrichem.fluids.FluidLoader; -import gtPlusPlus.plugin.agrichem.item.algae.ItemAgrichemBase; -import gtPlusPlus.plugin.agrichem.item.algae.ItemAlgaeBase; -import gtPlusPlus.plugin.agrichem.item.algae.ItemBioChip; -import gtPlusPlus.plugin.manager.Core_Manager; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class Core_Agrichem implements IPlugin { - - final static Core_Agrichem mInstance; - - - static { - mInstance = new Core_Agrichem(); - Core_Manager.registerPlugin(mInstance); - mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); - } - - @Override - public boolean preInit() { - mInstance.log("Generating Fluids"); - FluidLoader.generate(); - AgrichemFluids.init(); - mInstance.log("Generating Items"); - return true; - } - - @Override - public boolean init() { - mInstance.log("Setting Items"); - return true; - } - - @Override - public boolean postInit() { - mInstance.log("Generating Recipes"); - return true; - } - - @Override - public boolean serverStart() { - return true; - } - - @Override - public boolean serverStop() { - return true; - } - - @Override - public String getPluginName() { - return "GT++ Agrichemistry Module"; - } - - @Override - public String getPluginAbbreviation() { - return "FARM"; - } - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/IAlgalItem.java b/src/Java/gtPlusPlus/plugin/agrichem/IAlgalItem.java deleted file mode 100644 index fada07d062..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/IAlgalItem.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.plugin.agrichem; - -import gtPlusPlus.plugin.agrichem.logic.AlgaeGeneticData; -import net.minecraft.item.ItemStack; - -public interface IAlgalItem { - - public abstract AlgaeDefinition getAlgaeType(ItemStack aStack); - - public abstract AlgaeGeneticData getSpeciesData(ItemStack aStack); - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java b/src/Java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java deleted file mode 100644 index 039dd702da..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.plugin.agrichem.block; - -import gtPlusPlus.core.util.minecraft.FluidUtils; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; - -public class AgrichemFluids { - - /* - * Saline Water - saltwater - * Sulfuric Waste Water - sulfuricapatite - * Methanol - methanol - * Hot Water - ic2hotwater - * Acetic Acid - * Propionic Acid - * Fermentation Base - * Ethylene - ethylene - * Ethanol - bioethanol - * Diluted SA - filutedsulfuricacid - * Sulfuric Acid - sulfuricacid - * Urea - * Formaldehyde - fluid.formaldehyde - * Liquid Resin - * Methane - methane - * Benzene - benzene - * Ethylbenzene - fluid.ethylbenzene - * Styrene - styrene - */ - - public static Fluid mAceticAcid; - public static Fluid mPropionicAcid; - public static Fluid mFermentationBase; - public static Fluid mUrea; - public static Fluid mLiquidResin; - public static Fluid mAcetone; - public static Fluid mButanol; - - - - public static void init() { - if (!FluidRegistry.isFluidRegistered("aceticacid")) { - mAceticAcid = FluidUtils.generateFluidNoPrefix("aceticacid", "Acetic Acid", 200, new short[] { 97, 168, 96, 100 }, true); - } - else { - mAceticAcid = FluidRegistry.getFluid("aceticacid"); - } - if (!FluidRegistry.isFluidRegistered("propionicacid")) { - mPropionicAcid = FluidUtils.generateFluidNoPrefix("propionicacid", "Propionic Acid", 200, new short[] { 198, 209, 148, 100 }, true); - } - else { - mPropionicAcid = FluidRegistry.getFluid("propionicacid"); - } - if (!FluidRegistry.isFluidRegistered("fermentation.base")) { - mFermentationBase = FluidUtils.generateFluidNoPrefix("fermentation.base", "Fermentation Base", 200, new short[] { 107, 100, 63, 100 }, true); - } - else { - mFermentationBase = FluidRegistry.getFluid("fermentation.base"); - } - if (!FluidRegistry.isFluidRegistered("ureamix")) { - mUrea = FluidUtils.generateFluidNoPrefix("ureamix", "Urea Mix", 200, new short[] { 71, 55, 12, 100 }, true); - } - else { - mUrea = FluidRegistry.getFluid("ureamix"); - } - if (!FluidRegistry.isFluidRegistered("liquidresin")) { - mLiquidResin = FluidUtils.generateFluidNoPrefix("liquidresin", "Liquid Resin", 200, new short[] { 59, 58, 56, 100 }, true); - } - else { - mLiquidResin = FluidRegistry.getFluid("liquidresin"); - } - - if (!FluidRegistry.isFluidRegistered("acetone")) { - mAcetone = FluidUtils.generateFluidNoPrefix("acetone", "Acetone", 200, new short[] { 59, 58, 56, 100 }, true); - } - else { - mAcetone = FluidRegistry.getFluid("acetone"); - } - if (!FluidRegistry.isFluidRegistered("butanol")) { - mButanol = FluidUtils.generateFluidNoPrefix("butanol", "Butanol", 200, new short[] { 159, 58, 56, 100 }, true); - } - else { - mButanol = FluidRegistry.getFluid("butanol"); - } - } - - - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java b/src/Java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java deleted file mode 100644 index a60a8c09de..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.plugin.agrichem.fluids; - -import gtPlusPlus.core.fluids.FluidFactory; - -public class FluidLoader { - - private static final int ID_DIRTY_WATER = 50; - private static final int ID_RAW_SEWERAGE = 51; - private static final int ID_GUANO = 52; - private static final int ID_POOPJUICE = 53; - - public static void generate() { - - FluidFactory.generate(ID_DIRTY_WATER, "dirtywater", new short[] {25, 25, 180}); - FluidFactory.generate(ID_RAW_SEWERAGE, "sewerage", new short[] {100, 45, 25}); - FluidFactory.generate(ID_GUANO, "guano", new short[] {175, 175, 180}); - FluidFactory.generate(ID_POOPJUICE, "poo", new short[] {75, 45, 10}); - - } - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java b/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java deleted file mode 100644 index abeebc054d..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java +++ /dev/null @@ -1,312 +0,0 @@ -package gtPlusPlus.plugin.agrichem.item.algae; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.OreDictUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -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.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.oredict.OreDictionary; - -public class ItemAgrichemBase extends Item { - - final protected IIcon base[]; - - /* - * 0 - Algae Biomass - * 1 - Green Algae Biomass - * 2 - Brown Algae Biomass - * 3 - Golden-Brown Algae Biomass - * 4 - Red Algae Biomass - * 5 - Cellulose Fiber - * 6 - Golden-Brown Cellulose Fiber - * 7 - Red Cellulose Fiber - * 8 - Compost - * 9 - Wood Pellet - * 10 - Wood Brick - * 11 - Cellulose Pulp - * 12 - Raw Bio Resin - * 13 - Catalyst Carrier - * 14 - Green Metal Catalyst - * 15 - Alginic Acid - * 16 - Alumina - * 17 - Aluminium Pellet - * 18 - Sodium Aluminate - * 19 - Sodium Hydroxide // Exists in Newer GT - * 20 - Sodium Carbonate - * 21 - Lithium Chloride - * 22 - Pellet Mold - * 23 - Clean Aluminium Mix - * 24 - Pinecone - * 25 - Crushed Pine - */ - - public ItemAgrichemBase() { - this.setHasSubtypes(true); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - base = new IIcon[26]; - this.setUnlocalizedName("BasicAgrichemItem"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return super.getItemStackDisplayName(aStack); - } - - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - return EnumRarity.common; - } - - @Override - public boolean requiresMultipleRenderPasses() { - return false; - } - - private static boolean mHasCheckedForSodiumHydroxide = false; - private static boolean mShowSodiumHydroxide = true; - - private static boolean checkSodiumHydroxide() { - if (mHasCheckedForSodiumHydroxide) { - return mShowSodiumHydroxide; - } - else { - if (OreDictUtils.containsValidEntries("dustSodiumHydroxide_GT5U") - || OreDictUtils.containsValidEntries("dustSodiumHydroxide")) { - List aTest = OreDictionary.getOres( - "dustSodiumHydroxide", false - ); - if (aTest.isEmpty()) { - aTest = OreDictionary.getOres( - "dustSodiumHydroxide_GT5U", false - ); - if (!aTest.isEmpty()) { - mShowSodiumHydroxide = false; - } - } - else { - mShowSodiumHydroxide = false; - } - } - } - mHasCheckedForSodiumHydroxide = true; - return mShowSodiumHydroxide; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - for (int i=0;i aDamageSegment * 3){ - durability = EnumChatFormatting.GREEN; - } - else if (aDam > aDamageSegment * 2){ - durability = EnumChatFormatting.YELLOW; - } - else if (aDam > aDamageSegment){ - durability = EnumChatFormatting.GOLD; - } - else if (aDam >= 0){ - durability = EnumChatFormatting.RED; - } - list.add(durability+""+(aDam)+EnumChatFormatting.GRAY+" / "+aMaxDamage); - } - super.addInformation(aStack, player, list, bool); - } - - @Override - public boolean showDurabilityBar(ItemStack aStack) { - if (ItemUtils.isCatalyst(aStack)) { - int aDam = getCatalystDamage(aStack); - return aDam > 0; - } - return false; - } - - public static boolean createCatalystNBT(ItemStack rStack){ - return ItemGenericChemBase.createCatalystNBT(rStack); - } - - public static int getCatalystDamage(ItemStack aStack) { - return ItemGenericChemBase.getCatalystDamage(aStack); - } - - public static int getCatalystMaxDamage(ItemStack aStack) { - return ItemGenericChemBase.getCatalystMaxDamage(aStack); - } - - public static void setCatalystDamage(ItemStack aStack,int aAmount) { - ItemGenericChemBase.setCatalystDamage(aStack, aAmount); - } - - public static int getMaxCatalystDurability(ItemStack aStack) { - return ItemGenericChemBase.getMaxCatalystDurability(aStack); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java b/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java deleted file mode 100644 index 6b31a42809..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java +++ /dev/null @@ -1,235 +0,0 @@ -package gtPlusPlus.plugin.agrichem.item.algae; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.plugin.agrichem.AlgaeDefinition; -import gtPlusPlus.plugin.agrichem.IAlgalItem; -import gtPlusPlus.plugin.agrichem.logic.AlgaeGeneticData; -import gtPlusPlus.plugin.agrichem.logic.AlgaeGrowthRequirement; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class ItemAlgaeBase extends Item implements IAlgalItem { - - protected IIcon base; - protected IIcon overlay; - - public ItemAlgaeBase() { - this.setHasSubtypes(true); - this.setMaxDamage(127); - this.setNoRepair(); - this.setMaxStackSize(32); - this.setUnlocalizedName("BasicAlgaeItem"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - if (!p_77663_1_.hasTagCompound() || p_77663_1_.getTagCompound().hasNoTags()) { - p_77663_1_ = initNBT(p_77663_1_); - } - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return EnumChatFormatting.UNDERLINE+super.getItemStackDisplayName(aStack); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - int aDam = aStack.getItemDamage(); - try { - aList.add(AlgaeDefinition.getByIndex(aDam).mSimpleName); - if (!aStack.hasTagCompound() || aStack.getTagCompound().hasNoTags()) { - aStack = initNBT(aStack); - } - else { - NBTTagCompound aNBT = aStack.getTagCompound(); - boolean mRequiresLight = aNBT.getBoolean("mRequiresLight"); - boolean mSaltWater = aNBT.getBoolean("mSaltWater"); - boolean mFreshWater = aNBT.getBoolean("mFreshWater"); - byte mTempTolerance = aNBT.getByte("mTempTolerance"); - float mFertility = aNBT.getFloat("mFertility"); - float mProductionSpeed = aNBT.getFloat("mProductionSpeed"); - byte mLifespan = aNBT.getByte("mLifespan"); - int mGeneration = aNBT.getInteger("mGeneration"); - - aList.add("Requires Light: "+mRequiresLight); - aList.add("Salt Water: "+mSaltWater); - aList.add("Fresh Water: "+mFreshWater); - aList.add("Temp Tolerance: "+mTempTolerance); - aList.add("Growth: "+mFertility); - aList.add("Production: "+mProductionSpeed); - aList.add("Lifespan in days: "+mLifespan); - aList.add("Generation: "+mGeneration); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); - } - - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - return EnumRarity.uncommon; - } - - @Override - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - for (int i=0;i 5) { - aGenes = new AlgaeGeneticData(); - aTag = aGenes.writeToNBT(); - } - else { - byte aTemp, aLifespan; - float aFert, aSpeed; - - int aDam = aStack.getItemDamage(); - aTemp = (byte) (aDam == 3 ? 0 : aDam == 4 ? 2 : 1); - aLifespan = (byte) (aDam == 3 ? 1 : aDam == 4 ? 3f : 2f); - aFert = (float) (aDam == 3 ? 2f : aDam == 4 ? 1f : 1.75f); - aSpeed = (float) (aDam == 3 ? 1f : aDam == 4 ? 1.5f : 2f); - - aGenes = new AlgaeGeneticData( - true, true, - AlgaeDefinition.getByIndex(aDam).mSaltWater, AlgaeDefinition.getByIndex(aDam).mFreshWater, - aTemp, - aFert, - aSpeed, - aLifespan, - 0, - new AutoMap()); - aTag = aGenes.writeToNBT(); - } - } - else { - aTag = aStack.getTagCompound(); - } - - - - - return new AlgaeGeneticData(aTag); - } - - - - -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java b/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java deleted file mode 100644 index f876839f5f..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java +++ /dev/null @@ -1,238 +0,0 @@ -package gtPlusPlus.plugin.agrichem.item.algae; - -import java.util.*; -import java.util.function.BiFunction; -import java.util.function.Predicate; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.gui.GT_GUIDialogSelectItem; -import gregtech.api.interfaces.INetworkUpdatableItem; -import gregtech.api.net.GT_Packet_UpdateItem; -import gregtech.api.objects.XSTR; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.*; -import net.minecraft.world.World; -import net.minecraftforge.common.util.Constants; -import net.minecraftforge.common.util.FakePlayer; -import org.apache.commons.lang3.tuple.Pair; - -public class ItemBioChip extends Item implements INetworkUpdatableItem { - private static final List ALL_VARIANTS = new ArrayList<>(); - - protected IIcon base; - - public ItemBioChip() { - this.setHasSubtypes(true); - this.setNoRepair(); - this.setMaxStackSize(64); - this.setMaxDamage(0); - this.setUnlocalizedName("BioRecipeSelector"); - GameRegistry.registerItem(this, this.getUnlocalizedName()); - ALL_VARIANTS.add(new ItemStack(this, 0, 0)); - for (int i = 1; i <= 24; i++) { - ItemStack aStack = new ItemStack(this, 0, i); - ALL_VARIANTS.add(aStack); - } - } - - @Override - public boolean isDamageable() { - return false; - } - - @Override - public boolean shouldRotateAroundWhenRendering() { - return super.shouldRotateAroundWhenRendering(); - } - - @Override - public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { - super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); - } - - @Override - public String getItemStackDisplayName(ItemStack aStack) { - return super.getItemStackDisplayName(aStack); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { - try { - aList.add("Configuration == "+aStack.getItemDamage()); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.0").toString(), "Right click to reconfigure")); - aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.1").toString(), "Needs a screwdriver or circuit programming tool")); - } - catch (Throwable t) { - t.printStackTrace(); - } - super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); - } - - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - return EnumRarity.common; - } - - @Override - public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { - aList.add(ItemUtils.simpleMetaStack(aItem, 0, 1)); - } - - @Override - public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { - return false; - } - - @Override - public boolean isRepairable() { - return false; - } - - @Override - public boolean isBookEnchantable(ItemStack stack, ItemStack book) { - return false; - } - - @Override - public int getDisplayDamage(ItemStack stack) { - return stack.getItemDamage(); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public int getItemEnchantability(ItemStack stack) { - return 0; - } - - @Override - public void registerIcons(final IIconRegister u) { - this.base = u.registerIcon(CORE.MODID + ":" + "bioscience/BioCircuit"); - } - - @Override - public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - return this.base; - } - - @Override - public IIcon getIconFromDamage(int damage) { - return this.base; - } - - @Override - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - return this.base; - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return this.base; - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return super.getUnlocalizedName(); - } - - @Override - public boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag) { - int meta = tag.hasKey("meta", Constants.NBT.TAG_BYTE) ? tag.getByte("meta") : -1; - if (meta < 0 || meta > 24) - return true; - - if (!player.capabilities.isCreativeMode) { - Pair> toolIndex = findConfiguratorInInv(player); - if (toolIndex == null) return true; - - ItemStack[] mainInventory = player.inventory.mainInventory; - mainInventory[toolIndex.getKey()] = toolIndex.getValue().apply(mainInventory[toolIndex.getKey()], player); - } - stack.setItemDamage(meta); - - return true; - } - - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { - // nothing on server side or fake player - if (player instanceof FakePlayer || !world.isRemote) return false; - // check if any screwdriver - ItemStack configuratorStack; - if (player.capabilities.isCreativeMode) { - configuratorStack = null; - } else { - Pair configurator = findConfiguratorInInv(player); - if (configurator == null) { - int count; - try { - count = Integer.parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); - } catch (NumberFormatException e) { - player.addChatComponentMessage(new ChatComponentText("Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + e.getMessage())); - count = 1; - } - player.addChatComponentMessage(new ChatComponentTranslation("GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); - return false; - } - configuratorStack = player.inventory.mainInventory[configurator.getKey()]; - } - openSelectorGui(configuratorStack, stack.getItemDamage()); - return true; - } - - private void openSelectorGui(ItemStack configurator, int meta) { - FMLCommonHandler.instance().showGuiScreen(new GT_GUIDialogSelectItem( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), - configurator, - null, - ItemBioChip::onConfigured, - ALL_VARIANTS, - meta, - true - )); - } - - private static void onConfigured(ItemStack stack) { - NBTTagCompound tag = new NBTTagCompound(); - tag.setByte("meta", (byte) stack.getItemDamage()); - GT_Values.NW.sendToServer(new GT_Packet_UpdateItem(tag)); - } - - private static Pair> findConfiguratorInInv(EntityPlayer player) { - ItemStack[] mainInventory = player.inventory.mainInventory; - for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { - ItemStack toolStack = mainInventory[j]; - - if (!GT_Utility.isStackValid(toolStack)) - continue; - - for (Map.Entry, BiFunction> p : GregTech_API.sCircuitProgrammerList.entrySet()) - if (p.getKey().test(toolStack)) - return Pair.of(j, p.getValue()); - } - return null; - } -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java b/src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java deleted file mode 100644 index dfe0f50b47..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java +++ /dev/null @@ -1,130 +0,0 @@ -package gtPlusPlus.plugin.agrichem.logic; - -import gtPlusPlus.api.objects.data.AutoMap; -import net.minecraft.nbt.NBTTagCompound; - -public class AlgaeGeneticData { - - private final int mLifespan; - - private final int mGeneration; - - private final boolean mIsDominant; - - private final boolean mRequiresLight; - - private final boolean mSaltWater; - - private final boolean mFreshWater; - - private final byte mTempTolerance; - - private final float mFertility; - - private final float mProductionSpeed; - - private final AutoMap mSpecialRequirements; - - - public AlgaeGeneticData() { - this(true, true, true, true, (byte) 0, 1f, 1f, (byte) 30, 0, new AutoMap()); - } - - public AlgaeGeneticData(boolean isDominant, boolean requiresLight, boolean isSalt, boolean isFresh, - byte aTempTolerance, float aFertility, float aSpeed, byte aLifespan, int aGeneration, AutoMap aRequirements) { - mIsDominant = isDominant; - mRequiresLight = requiresLight; - mSaltWater = isSalt; - mFreshWater = isFresh; - mTempTolerance = aTempTolerance; - mFertility = aFertility; - mProductionSpeed = aSpeed; - mLifespan = aLifespan; - mGeneration = aGeneration; - mSpecialRequirements = aRequirements; - } - - - public AlgaeGeneticData(NBTTagCompound aNBT) { - if (aNBT == null || aNBT.hasNoTags()) { - mIsDominant = true; - mRequiresLight = true; - mSaltWater = true; - mFreshWater = true; - mTempTolerance = 0; - mFertility = 1; - mProductionSpeed = 1; - mLifespan = 30; - mGeneration = 0; - } - else { - mIsDominant = aNBT.getBoolean("mIsDominant"); - mRequiresLight = aNBT.getBoolean("mRequiresLight"); - mSaltWater = aNBT.getBoolean("mSaltWater"); - mFreshWater = aNBT.getBoolean("mFreshWater"); - mTempTolerance = aNBT.getByte("mTempTolerance"); - mFertility = aNBT.getFloat("mFertility"); - mProductionSpeed = aNBT.getFloat("mProductionSpeed"); - mLifespan = aNBT.getByte("mLifespan"); - mGeneration = aNBT.getInteger("mGeneration"); - } - mSpecialRequirements = new AutoMap(); - } - - /** - * In MC Days - */ - public final int getLifespan() { - return this.mLifespan; - } - - public final boolean isDominant() { - return this.mIsDominant; - } - - public final boolean RequiresLight() { - return this.mRequiresLight; - } - - public final boolean isSaltWater() { - return this.mSaltWater; - } - - public final boolean isFreshWater() { - return this.mFreshWater; - } - - public final byte getTempTolerance() { - return this.mTempTolerance; - } - - public final float getFertility() { - return this.mFertility; - } - - public final float getProductionSpeed() { - return this.mProductionSpeed; - } - - public final int getGeneration() { - return this.mGeneration; - } - - public final AutoMap getSpecialRequirements() { - return this.mSpecialRequirements; - } - - public NBTTagCompound writeToNBT() { - NBTTagCompound aGenes = new NBTTagCompound(); - aGenes.setBoolean("mIsDominant", this.mIsDominant); - aGenes.setBoolean("mRequiresLight", this.mRequiresLight); - aGenes.setBoolean("mSaltWater", this.mSaltWater); - aGenes.setBoolean("mFreshWater", this.mFreshWater); - aGenes.setInteger("mLifespan", this.mLifespan); - aGenes.setInteger("mGeneration", this.mGeneration); - aGenes.setByte("mTempTolerance", this.mTempTolerance); - aGenes.setFloat("mFertility", this.mFertility); - aGenes.setFloat("mProductionSpeed", this.mProductionSpeed); - return aGenes; - } -} diff --git a/src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java b/src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java deleted file mode 100644 index 6bddc9d085..0000000000 --- a/src/Java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java +++ /dev/null @@ -1,5 +0,0 @@ -package gtPlusPlus.plugin.agrichem.logic; - -public class AlgaeGrowthRequirement { - -} diff --git a/src/Java/gtPlusPlus/plugin/fishing/Core_Fishing.java b/src/Java/gtPlusPlus/plugin/fishing/Core_Fishing.java deleted file mode 100644 index 48706bc986..0000000000 --- a/src/Java/gtPlusPlus/plugin/fishing/Core_Fishing.java +++ /dev/null @@ -1,54 +0,0 @@ -package gtPlusPlus.plugin.fishing; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.plugin.manager.Core_Manager; - -public class Core_Fishing implements IPlugin { - - final static Core_Fishing mInstance; - - static { - mInstance = new Core_Fishing(); - mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); - } - - Core_Fishing() { - Core_Manager.registerPlugin(this); - } - - @Override - public boolean preInit() { - return false; - } - - @Override - public boolean init() { - return false; - } - - @Override - public boolean postInit() { - return false; - } - - @Override - public boolean serverStart() { - return false; - } - - @Override - public boolean serverStop() { - return false; - } - - @Override - public String getPluginName() { - return "GT++ Fishing Module"; - } - - @Override - public String getPluginAbbreviation() { - return "Fish"; - } - -} diff --git a/src/Java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java b/src/Java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java deleted file mode 100644 index c11d4fa333..0000000000 --- a/src/Java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java +++ /dev/null @@ -1,12 +0,0 @@ -package gtPlusPlus.plugin.fishing.block; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -public class BlockFishEggs extends Block{ - - protected BlockFishEggs() { - super(Material.water); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/fishing/item/BaseFish.java b/src/Java/gtPlusPlus/plugin/fishing/item/BaseFish.java deleted file mode 100644 index d96d8d8cfd..0000000000 --- a/src/Java/gtPlusPlus/plugin/fishing/item/BaseFish.java +++ /dev/null @@ -1,119 +0,0 @@ -package gtPlusPlus.plugin.fishing.item; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.potion.PotionHelper; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.plugin.fishing.misc.BaseFishTypes; - -public class BaseFish extends ItemFood -{ - private final boolean isCooked; - - public BaseFish(boolean cooked) - { - super(0, 0.0F, false); - this.isCooked = cooked; - } - - public int func_150905_g(ItemStack p_150905_1_) - { - BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(p_150905_1_); - return this.isCooked && fishtype.isCooked() ? fishtype.func_150970_e() : fishtype.func_150975_c(); - } - - public float func_150906_h(ItemStack p_150906_1_) - { - BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(p_150906_1_); - return this.isCooked && fishtype.isCooked() ? fishtype.func_150977_f() : fishtype.func_150967_d(); - } - - /** - * Returns a string representing what this item does to a potion. - */ - public String getPotionEffect(ItemStack p_150896_1_) - { - return BaseFishTypes.getFishTypeFromStackDamage(p_150896_1_) == BaseFishTypes.PUFFERFISH ? PotionHelper.field_151423_m : null; - } - - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister p_94581_1_) - { - BaseFishTypes[] afishtype = BaseFishTypes.values(); - int i = afishtype.length; - - for (int j = 0; j < i; ++j) - { - BaseFishTypes fishtype = afishtype[j]; - fishtype.func_150968_a(p_94581_1_); - } - } - - protected void onFoodEaten(ItemStack fish, World world, EntityPlayer player) - { - BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(fish); - - if (fishtype == BaseFishTypes.PUFFERFISH) - { - player.addPotionEffect(new PotionEffect(Potion.poison.id, 1200, 3)); - player.addPotionEffect(new PotionEffect(Potion.hunger.id, 300, 2)); - player.addPotionEffect(new PotionEffect(Potion.confusion.id, 300, 1)); - } - - super.onFoodEaten(fish, world, player); - } - - /** - * Gets an icon index based on an item's damage value - */ - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int dmg) - { - BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromDamageValue(dmg); - return this.isCooked && fishtype.isCooked() ? fishtype.func_150979_h() : fishtype.func_150971_g(); - } - - /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) - */ - @SideOnly(Side.CLIENT) - public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) - { - BaseFishTypes[] afishtype = BaseFishTypes.values(); - int i = afishtype.length; - - for (int j = 0; j < i; ++j) - { - BaseFishTypes fishtype = afishtype[j]; - - if (!this.isCooked || fishtype.isCooked()) - { - p_150895_3_.add(new ItemStack(this, 1, fishtype.getFishID())); - } - } - } - - /** - * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have - * different names based on their damage or NBT. - */ - public String getUnlocalizedName(ItemStack p_77667_1_) - { - BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(p_77667_1_); - return this.getUnlocalizedName() + "." + fishtype.getFishName() + "." + (this.isCooked && fishtype.isCooked() ? "cooked" : "raw"); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java b/src/Java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java deleted file mode 100644 index ea8d04b5d3..0000000000 --- a/src/Java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java +++ /dev/null @@ -1,140 +0,0 @@ -package gtPlusPlus.plugin.fishing.misc; -import java.util.Map; - -import com.google.common.collect.Maps; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gtPlusPlus.plugin.fishing.item.BaseFish; - -public enum BaseFishTypes{ - - COD(0, "cod", 2, 0.1F, 5, 0.6F), - SALMON(1, "salmon", 2, 0.1F, 6, 0.8F), - CLOWNFISH(2, "clownfish", 1, 0.1F), - PUFFERFISH(3, "pufferfish", 1, 0.1F); - - - - - private static final Map mFishMap = Maps.newHashMap(); - private final int mID; - private final String mFishName; - @SideOnly(Side.CLIENT) - private IIcon iicon; - @SideOnly(Side.CLIENT) - private IIcon iicon2; - private final int field_150991_j; - private final float field_150992_k; - private final int field_150989_l; - private final float field_150990_m; - private boolean isCooked = false; - - private BaseFishTypes(int p_i45336_3_, String p_i45336_4_, int p_i45336_5_, float p_i45336_6_, int p_i45336_7_, float p_i45336_8_) - { - this.mID = p_i45336_3_; - this.mFishName = p_i45336_4_; - this.field_150991_j = p_i45336_5_; - this.field_150992_k = p_i45336_6_; - this.field_150989_l = p_i45336_7_; - this.field_150990_m = p_i45336_8_; - this.isCooked = true; - } - - private BaseFishTypes(int p_i45337_3_, String p_i45337_4_, int p_i45337_5_, float p_i45337_6_) - { - this.mID = p_i45337_3_; - this.mFishName = p_i45337_4_; - this.field_150991_j = p_i45337_5_; - this.field_150992_k = p_i45337_6_; - this.field_150989_l = 0; - this.field_150990_m = 0.0F; - this.isCooked = false; - } - - public int getFishID() - { - return this.mID; - } - - public String getFishName() - { - return this.mFishName; - } - - public int func_150975_c() - { - return this.field_150991_j; - } - - public float func_150967_d() - { - return this.field_150992_k; - } - - public int func_150970_e() - { - return this.field_150989_l; - } - - public float func_150977_f() - { - return this.field_150990_m; - } - - @SideOnly(Side.CLIENT) - public void func_150968_a(IIconRegister p_150968_1_) - { - this.iicon = p_150968_1_.registerIcon("fish_" + this.mFishName + "_raw"); - - if (this.isCooked) - { - this.iicon2 = p_150968_1_.registerIcon("fish_" + this.mFishName + "_cooked"); - } - } - - @SideOnly(Side.CLIENT) - public IIcon func_150971_g() - { - return this.iicon; - } - - @SideOnly(Side.CLIENT) - public IIcon func_150979_h() - { - return this.iicon2; - } - - public boolean isCooked() - { - return this.isCooked; - } - - public static BaseFishTypes getFishTypeFromDamageValue(int dmg) - { - BaseFishTypes fishtype = (BaseFishTypes)mFishMap.get(Integer.valueOf(dmg)); - return fishtype == null ? COD : fishtype; - } - - public static BaseFishTypes getFishTypeFromStackDamage(ItemStack fish) - { - return fish.getItem() instanceof BaseFish ? getFishTypeFromDamageValue(fish.getItemDamage()) : COD; - } - - static - { - BaseFishTypes[] var0 = values(); - int var1 = var0.length; - - for (int var2 = 0; var2 < var1; ++var2) - { - BaseFishTypes var3 = var0[var2]; - mFishMap.put(Integer.valueOf(var3.getFishID()), var3); - } - } - } \ No newline at end of file diff --git a/src/Java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java b/src/Java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java deleted file mode 100644 index d67ff24d7b..0000000000 --- a/src/Java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java +++ /dev/null @@ -1,7 +0,0 @@ -package gtPlusPlus.plugin.fixes.interfaces; - -public interface IBugFix { - - public boolean isFixValid(); - -} diff --git a/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java b/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java deleted file mode 100644 index 2bfd05e5be..0000000000 --- a/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java +++ /dev/null @@ -1,95 +0,0 @@ -package gtPlusPlus.plugin.fixes.vanilla; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.plugin.manager.Core_Manager; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -public class Core_VanillaFixes implements IPlugin { - - final static Core_VanillaFixes mInstance; - final static VanillaBedHeightFix mBedFixInstance; - final static VanillaBackgroundMusicFix mMusicFixInstance; - - static { - mInstance = new Core_VanillaFixes(); - mBedFixInstance = new VanillaBedHeightFix(mInstance); - mMusicFixInstance = new VanillaBackgroundMusicFix(mInstance); - mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); - } - - Core_VanillaFixes() { - Core_Manager.registerPlugin(this); - } - - @Override - public boolean preInit() { - return fixVanillaOD(); - } - - @Override - public boolean init() { - return true; - } - - @Override - public boolean postInit() { - return true; - } - - @Override - public boolean serverStart() { - mMusicFixInstance.manage(); - return true; - } - - @Override - public boolean serverStop() { - return true; - } - - @Override - public String getPluginName() { - return "GT++ Vanilla Fixes Module"; - } - - @Override - public String getPluginAbbreviation() { - return "VFIX"; - } - - private boolean fixVanillaOD() { - registerToOreDict(ItemUtils.getSimpleStack(Items.blaze_rod), "rodBlaze"); - registerToOreDict(ItemUtils.getSimpleStack(Items.nether_wart), "cropNetherWart"); - registerToOreDict(ItemUtils.getSimpleStack(Items.reeds), "sugarcane"); - registerToOreDict(ItemUtils.getSimpleStack(Items.paper), "paper"); - registerToOreDict(ItemUtils.getSimpleStack(Items.ender_pearl), "enderpearl"); - registerToOreDict(ItemUtils.getSimpleStack(Items.bone), "bone"); - registerToOreDict(ItemUtils.getSimpleStack(Items.gunpowder), "gunpowder"); - registerToOreDict(ItemUtils.getSimpleStack(Items.string), "string"); - registerToOreDict(ItemUtils.getSimpleStack(Items.nether_star), "netherStar"); - registerToOreDict(ItemUtils.getSimpleStack(Items.leather), "leather"); - registerToOreDict(ItemUtils.getSimpleStack(Items.feather), "feather"); - registerToOreDict(ItemUtils.getSimpleStack(Items.egg), "egg"); - registerToOreDict(ItemUtils.getSimpleStack(Blocks.end_stone), "endstone"); - registerToOreDict(ItemUtils.getSimpleStack(Blocks.vine), "vine"); - registerToOreDict(ItemUtils.getSimpleStack(Blocks.cactus), "blockCactus"); - registerToOreDict(ItemUtils.getSimpleStack(Blocks.grass), "grass"); - registerToOreDict(ItemUtils.getSimpleStack(Blocks.obsidian), "obsidian"); - registerToOreDict(ItemUtils.getSimpleStack(Blocks.crafting_table), "workbench"); - return true; - } - - private void registerToOreDict(ItemStack aStack, String aString) { - if (aStack.getItem() == Items.blaze_rod) { - mInstance.log("Registering "+aStack.getDisplayName()+" to OreDictionary under the tag '"+aString+"'."); - } - else { - mInstance.log("Registering "+aStack.getDisplayName()+" to OreDictionary under the tag '"+aString+"'. (Added to Forge in 1.8.9)"); - } - ItemUtils.addItemToOreDictionary(aStack, aString); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java b/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java deleted file mode 100644 index bfd73407f7..0000000000 --- a/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java +++ /dev/null @@ -1,63 +0,0 @@ -package gtPlusPlus.plugin.fixes.vanilla; - -import java.util.Timer; -import java.util.TimerTask; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.plugin.fixes.interfaces.IBugFix; -import gtPlusPlus.plugin.fixes.vanilla.music.MusicTocker; -import gtPlusPlus.preloader.CORE_Preloader; - -public class VanillaBackgroundMusicFix implements IBugFix { - - private final IPlugin mParent; - private final boolean enabled; - private MusicTocker mFixInstance; - - public VanillaBackgroundMusicFix(IPlugin minstance) { - mParent = minstance; - if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { - mParent.log("[BGM] Registering BGM delay Fix."); - enabled = true; - mFixInstance = new MusicTocker(mParent); - } else if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isServer()) { - mParent.log("[BGM] Tried registering BGM delay Fix on Server, disabling."); - enabled = false; - } else { - mParent.log("[BGM] Not registering BGM delay Fix."); - enabled = false; - } - } - - public boolean isFixValid() { - return enabled; - } - - public void manage() { - if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { - TimerTask task = new ManageTask(this.mFixInstance); - Timer timer = new Timer("BGM-WatchDog"); - long delay = 1000 * 60; - timer.scheduleAtFixedRate(task, delay, 5000); - } - } - - private static class ManageTask extends TimerTask { - private final MusicTocker A; - - public ManageTask(MusicTocker a) { - A = a; - } - - @Override - public void run() { - if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { - if (!A.mVanillaManager) { - A.run(); - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java b/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java deleted file mode 100644 index f33cc71fc6..0000000000 --- a/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java +++ /dev/null @@ -1,82 +0,0 @@ -package gtPlusPlus.plugin.fixes.vanilla; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.plugin.fixes.interfaces.IBugFix; -import gtPlusPlus.preloader.DevHelper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; - -public class VanillaBedHeightFix implements IBugFix { - - private final Method mSleepInBedAt; - private final IPlugin mParent; - - public VanillaBedHeightFix(IPlugin minstance) { - mParent = minstance; - if (DevHelper.isValidHelperObject()) { - Method m; - if (DevHelper.isObfuscatedEnvironment()) { - m = ReflectionUtils.getMethod(EntityPlayer.class, "func_71018_a", int.class, int.class, int.class); - } - else { - m = ReflectionUtils.getMethod(net.minecraft.entity.player.EntityPlayer.class, "sleepInBedAt", int.class, int.class, int.class); - } - if (m != null) { - mSleepInBedAt = m; - mParent.log("Registering Bed Height Fix."); - Utils.registerEvent(this); - } else { - mSleepInBedAt = null; - } - } else { - mSleepInBedAt = null; - } - } - - public boolean isFixValid() { - return mSleepInBedAt != null; - } - - /** - * Fix created by deNULL - - * https://github.com/deNULL/BugPatch/blob/master/src/main/java/ru/denull/BugPatch/mod/ClientEvents.java#L45 - * - * @param evt - * - The event where a player sleeps - */ - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void playerSleepInBed(PlayerSleepInBedEvent evt) { - Logger.WARNING("Sleep Event Detected. Player is sleeping at Y: " + evt.y); - if (evt.y <= 0 && isFixValid()) { - int correctY = 256 + evt.y; - if (correctY <= 0) { - Logger.WARNING( - "You're trying to sleep at y=" + evt.y + ", which is impossibly low. However, fixed y value is " - + correctY + ", which is still below 0. Falling back to default behavior."); - } else { - Logger.WARNING("You're trying to sleep at y=" + evt.y - + ". This is probably caused by overflow, stopping original event; retrying with y=" + correctY - + "."); - evt.result = EntityPlayer.EnumStatus.OTHER_PROBLEM; - try { - mSleepInBedAt.invoke(evt.entityPlayer, evt.x, correctY, evt.z); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.WARNING("Encountered an error trying to sleep."); - } - } - } else if (!isFixValid()) { - Logger.WARNING( - "Method sleepInBedAt was not found in EntityPlayer (wrong MC and/or Forge version?), unable to fix"); - } - } - -} diff --git a/src/Java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java b/src/Java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java deleted file mode 100644 index 452c902e05..0000000000 --- a/src/Java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java +++ /dev/null @@ -1,130 +0,0 @@ -package gtPlusPlus.plugin.fixes.vanilla.music; - -import java.lang.reflect.Field; -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.CORE_Preloader; -import net.minecraft.client.Minecraft; -import net.minecraft.client.audio.ISound; -import net.minecraft.client.audio.MusicTicker; -import net.minecraft.client.audio.PositionedSoundRecord; -import net.minecraft.util.MathHelper; - -@SideOnly(Side.CLIENT) -public class MusicTocker extends MusicTicker implements Runnable { - - private final Random mRandom = new XSTR(); - private final Minecraft mMinecraft; - private final IPlugin mPlugin; - private ISound mSound; - private int mTimeUntilNextTrack = 100; - - public boolean mVanillaManager = false; - - public MusicTocker(IPlugin aPlugin) { - super(Minecraft.getMinecraft()); - mPlugin = aPlugin; - mMinecraft = Minecraft.getMinecraft(); - mPlugin.log("[BGM] Created BGM Watchdog with a delay of "+getDelay()+" ticks."); - inject(); - } - - private static int getDelay() { - return CORE_Preloader.enableWatchdogBGM; - } - - private boolean inject() { - mPlugin.log("[BGM] Inject new Watchdog into Minecraft instance."); - ReflectionUtils.setField(Minecraft.getMinecraft(), "mcMusicTicker", this); - mPlugin.log("[BGM] Verifying..."); - Field f = ReflectionUtils.getField(Minecraft.class, "mcMusicTicker"); - try { - Object m = f.get(mMinecraft); - if (m != null) { - if (m instanceof MusicTocker || m.getClass().isAssignableFrom(getClass())) { - mPlugin.log("[BGM] Success."); - return true; - } - else if (m instanceof MusicTicker || m.getClass().isAssignableFrom(MusicTicker.class)) { - mPlugin.log("[BGM] Found Vanilla MusicTicker, but may be instance of MusicTocker."); - return true; - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - - mPlugin.log("[BGM] Failed."); - return false; - } - - private final void updateInternalNumber() { - if (ReflectionUtils.doesFieldExist(getClass(), "field_147676_d")) { - ReflectionUtils.setField(this, "field_147676_d", mTimeUntilNextTrack); - } - } - - private final void updateInternalSound(ISound aSound) { - if (ReflectionUtils.doesFieldExist(getClass(), "field_147678_c")) { - ReflectionUtils.setField(this, "field_147678_c", aSound); - } - } - - /** - * Updates the JList with a new model. - */ - @Override - public void update() { - run(); - mVanillaManager = true; - } - - @Override - public void run() { - MusicType musictype = this.mMinecraft.func_147109_W(); - - if (this.mSound != null) { - if (!musictype.getMusicTickerLocation().equals(this.mSound.getPositionedSoundLocation())) { - this.mMinecraft.getSoundHandler().stopSound(this.mSound); - this.mTimeUntilNextTrack = MathHelper.getRandomIntegerInRange(this.mRandom, 0, getDelay() / 2); - updateInternalNumber(); - Logger.INFO("[BGM] Adjusted BGM delay 1"); - } - if (!this.mMinecraft.getSoundHandler().isSoundPlaying(this.mSound)) { - this.mSound = null; - updateInternalSound(null); - this.mTimeUntilNextTrack = Math.min(MathHelper.getRandomIntegerInRange(this.mRandom, getDelay(), getDelay() * 2), this.mTimeUntilNextTrack); - updateInternalNumber(); - Logger.INFO("[BGM] Adjusted BGM delay 2"); - } - } - else if (this.mSound == null && this.mTimeUntilNextTrack-- <= 0) { - this.mSound = PositionedSoundRecord.func_147673_a(musictype.getMusicTickerLocation()); - updateInternalSound(mSound); - this.mMinecraft.getSoundHandler().playSound(this.mSound); - this.mTimeUntilNextTrack = getDelay(); - updateInternalNumber(); - Logger.INFO("[BGM] Adjusted BGM 3"); - } - - /* - * try { // Get Value stored in underlying object. Integer aRealDelay = - * (Integer) ReflectionUtils.getField(getClass(), "field_147676_d").get(this); - * - * if (aRealDelay == null) { return; } else { if (aRealDelay > getDelay() || - * aRealDelay <= 0) { this.mTimeUntilNextTrack = getDelay(); - * updateInternalNumber(); } else { this.mTimeUntilNextTrack -= 5 * 20; - * updateInternalNumber(); } aRealDelay = (Integer) - * ReflectionUtils.getField(getClass(), "field_147676_d").get(this); - * Logger.INFO("[BGM] Adjusted BGM - "+aRealDelay); } - * - * } catch (IllegalArgumentException | IllegalAccessException e) { } - */ - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/plugin/manager/Core_Manager.java b/src/Java/gtPlusPlus/plugin/manager/Core_Manager.java deleted file mode 100644 index 45e85d68ac..0000000000 --- a/src/Java/gtPlusPlus/plugin/manager/Core_Manager.java +++ /dev/null @@ -1,110 +0,0 @@ -package gtPlusPlus.plugin.manager; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class Core_Manager { - - public static AutoMap mPlugins = new AutoMap(); - - /** - * @param plugin - Dynamically registers the plugin for loading. - */ - public static void registerPlugin(IPlugin plugin) { - Logger.INFO("[Plugin] " + "Registered "+plugin.getPluginName()+"."); - mPlugins.put(plugin); - } - - /** - * Dynamically loads all class objects within the "gtPlusPlus.plugin" package. - */ - public static void veryEarlyInit() { - if (ReflectionUtils.dynamicallyLoadClassesInPackage("gtPlusPlus.plugin")) { - Logger.INFO("[Plugin] Plugin System loaded."); - } - } - - public static boolean preInit() { - try { - for (IPlugin h : mPlugins) { - if (h.preInit()) { - Logger.INFO("[Plugin] Completed Pre-Init Phase for "+h.getPluginName()+"."); - } - else { - Logger.INFO("[Plugin] Failed during Pre-Init Phase for "+h.getPluginName()+"."); - } - } - return true; - } - catch (Throwable t) {} - return false; - } - - public static boolean init() { - try { - for (IPlugin h : mPlugins) { - if (h.init()) { - Logger.INFO("[Plugin] Completed Init Phase for "+h.getPluginName()+"."); - } - else { - Logger.INFO("[Plugin] Failed during Init Phase for "+h.getPluginName()+"."); - } - } - return true; - } - catch (Throwable t) {} - return false; - } - - public static boolean postInit() { - try { - for (IPlugin h : mPlugins) { - if (h.postInit()) { - Logger.INFO("[Plugin] Completed Post-Init Phase for "+h.getPluginName()+"."); - } - else { - Logger.INFO("[Plugin] Failed during Post-Init Phase for "+h.getPluginName()+"."); - } - } - return true; - } - catch (Throwable t) {} - return false; - } - - public static boolean serverStart() { - try { - for (IPlugin h : mPlugins) { - if (h.serverStart()) { - Logger.INFO("[Plugin] Completed Server Start Phase for "+h.getPluginName()+"."); - } - else { - Logger.INFO("[Plugin] Failed during Server Start Phase for "+h.getPluginName()+"."); - } - } - return true; - } - catch (Throwable t) {} - return false; - } - - public static boolean serverStop() { - try { - for (IPlugin h : mPlugins) { - if (h.serverStop()) { - Logger.INFO("[Plugin] Completed Server Stop Phase for "+h.getPluginName()+"."); - } - else { - Logger.INFO("[Plugin] Failed during Server Stop Phase for "+h.getPluginName()+"."); - } - } - return true; - } - catch (Throwable t) {} - return false; - } - - -} diff --git a/src/Java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java b/src/Java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java deleted file mode 100644 index ed6762c69d..0000000000 --- a/src/Java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java +++ /dev/null @@ -1,314 +0,0 @@ -package gtPlusPlus.plugin.sulfurchem; - -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.plugin.manager.Core_Manager; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class Core_SulfuricChemistry implements IPlugin { - - final static Core_SulfuricChemistry mInstance; - private static boolean shouldLoad = false; - - private static AutoMap mRemovedRecipes1 = new AutoMap(); - private static AutoMap mRemovedRecipes2 = new AutoMap(); - - static { - mInstance = new Core_SulfuricChemistry(); - Core_Manager.registerPlugin(mInstance); - mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); - } - - @Override - public boolean preInit() { - if (/*CORE.ConfigSwitches.enableSulfuricAcidFix || *//*CORE.DEVENV*/false) { - shouldLoad = true; - } - if (shouldLoad) - return true; - return false; - } - - @Override - public boolean init() { - if (shouldLoad) - return true; - return false; - } - - @Override - public boolean postInit() { - if (shouldLoad) { - try { - int disabled = disableSulfurTrioxide(); - log("Disabled "+disabled+" Sulfur Trioxide Chemistry recipes."); - int disabled2 = disableSulfuricAcid(); - log("Disabled "+disabled2+" Sulfuric Acid Chemistry recipes."); - int addedNew = addRevisedGT6Recipes(); - log("Added "+addedNew+" new Sulfuric Chemistry recipes."); - - if (CORE.DEVENV || CORE_Preloader.DEBUG_MODE) { - for (int i=0;i<2;i++) { - for (GT_Recipe m : mRemovedRecipes1) { - String[] mInfo = RecipeUtils.getRecipeInfo(m); - log("Removed Recipe"); - for (int r=0;r 0 && addedNew > 0; - } - catch (Throwable t) { - t.printStackTrace(); - } - } - return false; - } - - @Override - public boolean serverStart() { - return false; - } - - @Override - public boolean serverStop() { - return false; - } - - @Override - public String getPluginName() { - return "GT++ Revised Sulfuric Chemistry Module"; - } - - public int addRevisedGT6Recipes() { - - String catalyst = "dustPlatinum"; - int mCountAdded = 0; - - /** - * Sulfur Trioxide Recipes - */ - //Air - if (CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), - ItemUtils.getItemStackOfAmountFromOreDict("cellAir", 1), - FluidUtils.getFluidStack("sulfurdioxide", 3000), - FluidUtils.getFluidStack("sulfurtrioxide", 4000), - CI.emptyCells(1), - null, - 16, - 16)) { - mCountAdded++; - } - if (CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurDioxide", 3), - FluidUtils.getFluidStack("air", 1000), - FluidUtils.getFluidStack("sulfurtrioxide", 4000), - CI.emptyCells(3), - null, - 16, - 16)) { - mCountAdded++; - } - //Oxygen - if (CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), - ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), - FluidUtils.getFluidStack("sulfurdioxide", 3000), - FluidUtils.getFluidStack("sulfurtrioxide", 4000), - CI.emptyCells(1), - null, - 16, - 16)) { - mCountAdded++; - } - if (CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurDioxide", 3), - FluidUtils.getFluidStack("oxygen", 1000), - FluidUtils.getFluidStack("sulfurtrioxide", 4000), - CI.emptyCells(3), - null, - 16, - 16)) { - mCountAdded++; - } - - /** - * Sulfuric Acid Recipes - */ - - if (CORE.RA.addChemicalRecipe( - CI.getNumberedCircuit(22), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurTrioxide", 1), - FluidUtils.getFluidStack("water", 750), - Materials.SulfuricAcid.getFluid(1750), - CI.emptyCells(1), - null, - 20, - 20)) { - mCountAdded++; - } - if (CORE.RA.addChemicalRecipe( - CI.getNumberedCircuit(22), - ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 3), - FluidUtils.getFluidStack("sulfurtrioxide", 4000), - Materials.SulfuricAcid.getFluid(7000), - CI.emptyCells(3), - null, - 20, - 20)) { - mCountAdded++; - } - - return mCountAdded; - } - - - public int disableSulfurTrioxide() { - int mDisabled = 0; - FluidStack mStack = FluidUtils.getFluidStack("sulfurtrioxide", 1); - //Single Block Recipes - recipe : for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList) { - for (ItemStack i : r.mOutputs) { - i.stackSize = 1; - if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurTrioxide", 1))) { - mRemovedRecipes1.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - for (FluidStack f : r.mFluidOutputs) { - f.amount = 1; - if (FluidStack.areFluidStackTagsEqual(f, mStack)) { - mRemovedRecipes1.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - } - - //Multi Block Recipes - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - recipe : for (GT_Recipe r : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { - for (ItemStack i : r.mOutputs) { - i.stackSize = 1; - if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurTrioxide", 1))) { - mRemovedRecipes1.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - for (FluidStack f : r.mFluidOutputs) { - f.amount = 1; - if (FluidStack.areFluidStackTagsEqual(f, mStack)) { - mRemovedRecipes1.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - } - } - - return mDisabled; - } - - public int disableSulfuricAcid() { - int mDisabled = 0; - FluidStack mStack = FluidUtils.getFluidStack("sulfuricacid", 1); - //Single Block Recipes - - recipe : for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList) { - for (ItemStack i : r.mOutputs) { - i.stackSize = 1; - if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 1))) { - mRemovedRecipes2.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - for (FluidStack f : r.mFluidOutputs) { - f.amount = 1; - if (FluidStack.areFluidStackTagsEqual(f, mStack)) { - mRemovedRecipes2.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - } - - //Multi Block Recipes - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - recipe : for (GT_Recipe r : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { - for (ItemStack i : r.mOutputs) { - i.stackSize = 1; - if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 1))) { - mRemovedRecipes2.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - for (FluidStack f : r.mFluidOutputs) { - f.amount = 1; - if (FluidStack.areFluidStackTagsEqual(f, mStack)) { - mRemovedRecipes2.put(r); - r.mEnabled = false; - r.mHidden = true; - mDisabled++; - continue recipe; - } - continue; - } - } - } - - return mDisabled; - } - - @Override - public String getPluginAbbreviation() { - return "RSCM"; - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java b/src/Java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java deleted file mode 100644 index 09e4c4865f..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java +++ /dev/null @@ -1,130 +0,0 @@ -package gtPlusPlus.plugin.villagers; - -import static gtPlusPlus.plugin.villagers.VillagerUtils.mVillagerMap; - -import java.util.HashMap; - -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.VillagerRegistry; -import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; -import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.plugin.manager.Core_Manager; -import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner; -import gtPlusPlus.plugin.villagers.entity.EntityBaseVillager; -import gtPlusPlus.plugin.villagers.entity.EntityNativeAustralian; -import gtPlusPlus.plugin.villagers.trade.TradeHandlerAboriginal; -import gtPlusPlus.plugin.villagers.trade.TradeHandlerBanker; -import gtPlusPlus.plugin.villagers.trade.TradeHandlerTechnician; -import gtPlusPlus.plugin.villagers.trade.TradeHandlerTrader; -import net.minecraft.util.ResourceLocation; - -public class Core_VillagerAdditions implements IPlugin { - - public final static Core_VillagerAdditions mInstance; - private static boolean shouldLoad = false; - - public static final HashMap mVillagerSkins = new HashMap(); - public static final AutoMap> mVillagerTrades = new AutoMap>(); - - static { - mInstance = new Core_VillagerAdditions(); - Core_Manager.registerPlugin(mInstance); - mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); - } - - @Override - public boolean preInit() { - if (/*CORE.ConfigSwitches.enableSulfuricAcidFix || */CORE.DEVENV) { - shouldLoad = true; - } - if (shouldLoad) { - //Register Custom Villager Entity - EntityRegistry.registerGlobalEntityID(EntityBaseVillager.class, "WiseVillager", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(180, 120, 120), Utils.rgbtoHexValue(0, 0, 0)); - EntityRegistry.registerGlobalEntityID(EntityNativeAustralian.class, "Aboriginal", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(50, 50, 50), Utils.rgbtoHexValue(25, 25, 25)); - VillagerUtils.registerNewVillager(0, "Banker", "Banker", "Banker", "banker", new TradeHandlerBanker()); - VillagerUtils.registerNewVillager(1, "Technician", "Technician", "Technician", "technician", new TradeHandlerTechnician()); - VillagerUtils.registerNewVillager(2, "Trader", "Trader", "Trader", "trader", new TradeHandlerTrader()); - VillagerUtils.registerNewVillager(3, "Aboriginal", "Aboriginal", "Aboriginal", "aboriginal", new TradeHandlerAboriginal()); - - if (mVillagerMap.size() > 0) { - for (VillagerObject g : mVillagerMap.values()) { - if (g != null && g.mID >= 0) { - VillagerRegistry.instance().registerVillagerId(7735+g.mID); - log("Registered a Custom Villager with ID of "+g.mID+"."); - //Utils.createNewMobSpawner(10+g.mID, EntityBaseVillager.class); - if (mVillagerSkins.get(g.mID) != null) { - VillagerRegistry.instance().registerVillagerSkin(7735+g.mID, mVillagerSkins.get(g.mID)); - log("Registered a Custom Skin for Villager with ID of "+g.mID+"."); - } - } - } - } - - //Register all Villager ID's and their Custom Trades. - if (mVillagerTrades.size() > 0) { - for (Pair g : mVillagerTrades) { - if (g != null && g.getKey() != null) { - if (g.getValue() != null) { - VillagerRegistry.instance().registerVillageTradeHandler(g.getKey(), g.getValue()); - log("Registered a Custom Trade for Villager with ID of "+g.getKey()+"."); - } - } - } - } - return true; - } - return false; - } - - @Override - public boolean init() { - if (shouldLoad) { - return true; - } - return false; - } - - @Override - public boolean postInit() { - if (shouldLoad) { - return true; - } - return false; - } - - @Override - public boolean serverStart() { - if (shouldLoad) { - return true; - } - return false; - } - - @Override - public boolean serverStop() { - if (shouldLoad) { - return true; - } - return false; - } - - @Override - public String getPluginName() { - return "GT++ Enhanced Villagers"; - } - - @Override - public String getPluginAbbreviation() { - return "Bank"; - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/NameLists.java b/src/Java/gtPlusPlus/plugin/villagers/NameLists.java deleted file mode 100644 index 227e786aa5..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/NameLists.java +++ /dev/null @@ -1,994 +0,0 @@ -package gtPlusPlus.plugin.villagers; - -import org.apache.commons.lang3.StringUtils; - -import gtPlusPlus.core.util.math.MathUtils; - -public class NameLists { - - public static final String[] mFirstNames; - public static final String[] mLastNames; - public static final String[] mScottishFirstNames; - - static { - mFirstNames = generateFirstNames(); - mLastNames = generateLastNames(); - mScottishFirstNames = generateScottishFirstNames(); - } - - - private static final String[] generateScottishFirstNames() { - return new String[] { "Aadam", "Aadit", "Aahron", "Aaran", "Aaren", - "Aarez", "Aarman", "Aaron", "Aaron-James", "Aarron", "Aaryan", "Aaryn", "Aayan", "Aazaan", "Abaan", "Abbas", - "Abdallah", "Abdalroof", "Abdihakim", "Abdirahman", "Abdisalam", "Abdul", "Abdul-Aziz", "Abdulbasir", - "Abdulkadir", "Abdulkarem", "Abdulkhader", "Abdullah", "Abdul-Majeed", "Abdulmalik", "Abdul-Rehman", - "Abdur", "Abdurraheem", "Abdur-Rahman", "Abdur-Rehmaan", "Abel", "Abhinav", "Abhisumant", "Abid", "Abir", - "Abraham", "Abu", "Abubakar", "Ace", "Adain", "Adam", "Adam-James", "Addison", "Addisson", "Adegbola", - "Adegbolahan", "Aden", "Adenn", "Adie", "Adil", "Aditya", "Adnan", "Adrian", "Adrien", "Aedan", "Aedin", - "Aedyn", "Aeron", "Afonso", "Ahmad", "Ahmed", "Ahmed-Aziz", "Ahoua", "Ahtasham", "Aiadan", "Aidan", "Aiden", - "Aiden-Jack", "Aiden-Vee", "Aidian", "Aidy", "Ailin", "Aiman", "Ainsley", "Ainslie", "Airen", "Airidas", - "Airlie", "AJ", "Ajay", "A-Jay", "Ajayraj", "Akan", "Akram", "Al", "Ala'", "Alan", "Alanas", "Alasdair", - "Alastair", "Alber", "Albert", "Albie", "Aldred", "Alec", "Aled", "Aleem", "Aleksandar", "Aleksander", - "Aleksandr", "Aleksandrs", "Alekzander", "Alessandro", "Alessio", "Alex", "Alexander", "Alexei", "Alexx", - "Alexzander", "Alf", "Alfee", "Alfie", "Alfred", "Alfy", "Alhaji", "Al-Hassan", "Ali", "Aliekber", "Alieu", - "Alihaider", "Alisdair", "Alishan", "Alistair", "Alistar", "Alister", "Aliyaan", "Allan", "Allan-Laiton", - "Allen", "Allesandro", "Allister", "Ally", "Alphonse", "Altyiab", "Alum", "Alvern", "Alvin", "Alyas", - "Amaan", "Aman", "Amani", "Ambanimoh", "Ameer", "Amgad", "Ami", "Amin", "Amir", "Ammaar", "Ammar", "Ammer", - "Amolpreet", "Amos", "Amrinder", "Amrit", "Amro", "Anay", "Andrea", "Andreas", "Andrei", "Andrejs", - "Andrew", "Andy", "Anees", "Anesu", "Angel", "Angelo", "Angus", "Anir", "Anis", "Anish", "Anmolpreet", - "Annan", "Anndra", "Anselm", "Anthony", "Anthony-John", "Antoine", "Anton", "Antoni", "Antonio", "Antony", - "Antonyo", "Anubhav", "Aodhan", "Aon", "Aonghus", "Apisai", "Arafat", "Aran", "Arandeep", "Arann", "Aray", - "Arayan", "Archibald", "Archie", "Arda", "Ardal", "Ardeshir", "Areeb", "Areez", "Aref", "Arfin", "Argyle", - "Argyll", "Ari", "Aria", "Arian", "Arihant", "Aristomenis", "Aristotelis", "Arjuna", "Arlo", "Armaan", - "Arman", "Armen", "Arnab", "Arnav", "Arnold", "Aron", "Aronas", "Arran", "Arrham", "Arron", "Arryn", - "Arsalan", "Artem", "Arthur", "Artur", "Arturo", "Arun", "Arunas", "Arved", "Arya", "Aryan", "Aryankhan", - "Aryian", "Aryn", "Asa", "Asfhan", "Ash", "Ashlee-jay", "Ashley", "Ashton", "Ashton-Lloyd", "Ashtyn", - "Ashwin", "Asif", "Asim", "Aslam", "Asrar", "Ata", "Atal", "Atapattu", "Ateeq", "Athol", "Athon", - "Athos-Carlos", "Atli", "Atom", "Attila", "Aulay", "Aun", "Austen", "Austin", "Avani", "Averon", "Avi", - "Avinash", "Avraham", "Awais", "Awwal", "Axel", "Ayaan", "Ayan", "Aydan", "Ayden", "Aydin", "Aydon", - "Ayman", "Ayomide", "Ayren", "Ayrton", "Aytug", "Ayub", "Ayyub", "Azaan", "Azedine", "Azeem", "Azim", - "Aziz", "Azlan", "Azzam", "Azzedine", "Babatunmise", "Babur", "Bader", "Badr", "Badsha", "Bailee", "Bailey", - "Bailie", "Bailley", "Baillie", "Baley", "Balian", "Banan", "Barath", "Barkley", "Barney", "Baron", - "Barrie", "Barry", "Bartlomiej", "Bartosz", "Basher", "Basile", "Baxter", "Baye", "Bayley", "Beau", "Beinn", - "Bekim", "Believe", "Ben", "Bendeguz", "Benedict", "Benjamin", "Benjamyn", "Benji", "Benn", "Bennett", - "Benny", "Benoit", "Bentley", "Berkay", "Bernard", "Bertie", "Bevin", "Bezalel", "Bhaaldeen", "Bharath", - "Bilal", "Bill", "Billy", "Binod", "Bjorn", "Blaike", "Blaine", "Blair", "Blaire", "Blake", "Blazej", - "Blazey", "Blessing", "Blue", "Blyth", "Bo", "Boab", "Bob", "Bobby", "Bobby-Lee", "Bodhan", "Boedyn", - "Bogdan", "Bohbi", "Bony", "Bowen", "Bowie", "Boyd", "Bracken", "Brad", "Bradan", "Braden", "Bradley", - "Bradlie", "Bradly", "Brady", "Bradyn", "Braeden", "Braiden", "Brajan", "Brandan", "Branden", "Brandon", - "Brandonlee", "Brandon-Lee", "Brandyn", "Brannan", "Brayden", "Braydon", "Braydyn", "Breandan", "Brehme", - "Brendan", "Brendon", "Brendyn", "Breogan", "Bret", "Brett", "Briaddon", "Brian", "Brodi", "Brodie", - "Brody", "Brogan", "Broghan", "Brooke", "Brooklin", "Brooklyn", "Bruce", "Bruin", "Bruno", "Brunon", - "Bryan", "Bryce", "Bryden", "Brydon", "Brydon-Craig", "Bryn", "Brynmor", "Bryson", "Buddy", "Bully", - "Burak", "Burhan", "Butali", "Butchi", "Byron", "Cabhan", "Cadan", "Cade", "Caden", "Cadon", "Cadyn", - "Caedan", "Caedyn", "Cael", "Caelan", "Caelen", "Caethan", "Cahl", "Cahlum", "Cai", "Caidan", "Caiden", - "Caiden-Paul", "Caidyn", "Caie", "Cailaen", "Cailean", "Caileb-John", "Cailin", "Cain", "Caine", "Cairn", - "Cal", "Calan", "Calder", "Cale", "Calean", "Caleb", "Calen", "Caley", "Calib", "Calin", "Callahan", - "Callan", "Callan-Adam", "Calley", "Callie", "Callin", "Callum", "Callun", "Callyn", "Calum", "Calum-James", - "Calvin", "Cambell", "Camerin", "Cameron", "Campbel", "Campbell", "Camron", "Caolain", "Caolan", "Carl", - "Carlo", "Carlos", "Carrich", "Carrick", "Carson", "Carter", "Carwyn", "Casey", "Casper", "Cassy", "Cathal", - "Cator", "Cavan", "Cayden", "Cayden-Robert", "Cayden-Tiamo", "Ceejay", "Ceilan", "Ceiran", "Ceirin", - "Ceiron", "Cejay", "Celik", "Cephas", "Cesar", "Cesare", "Chad", "Chaitanya", "Chang-Ha", "Charles", - "Charley", "Charlie", "Charly", "Chase", "Che", "Chester", "Chevy", "Chi", "Chibudom", "Chidera", "Chimsom", - "Chin", "Chintu", "Chiqal", "Chiron", "Chris", "Chris-Daniel", "Chrismedi", "Christian", "Christie", - "Christoph", "Christopher", "Christopher-Lee", "Christy", "Chu", "Chukwuemeka", "Cian", "Ciann", "Ciar", - "Ciaran", "Ciarian", "Cieran", "Cillian", "Cillin", "Cinar", "CJ", "C-Jay", "Clark", "Clarke", "Clayton", - "Clement", "Clifford", "Clyde", "Cobain", "Coban", "Coben", "Cobi", "Cobie", "Coby", "Codey", "Codi", - "Codie", "Cody", "Cody-Lee", "Coel", "Cohan", "Cohen", "Colby", "Cole", "Colin", "Coll", "Colm", "Colt", - "Colton", "Colum", "Colvin", "Comghan", "Conal", "Conall", "Conan", "Conar", "Conghaile", "Conlan", - "Conley", "Conli", "Conlin", "Conlly", "Conlon", "Conlyn", "Connal", "Connall", "Connan", "Connar", - "Connel", "Connell", "Conner", "Connolly", "Connor", "Connor-David", "Conor", "Conrad", "Cooper", - "Copeland", "Coray", "Corben", "Corbin", "Corey", "Corey-James", "Corey-Jay", "Cori", "Corie", "Corin", - "Cormac", "Cormack", "Cormak", "Corran", "Corrie", "Cory", "Cosmo", "Coupar", "Craig", "Craig-James", - "Crawford", "Creag", "Crispin", "Cristian", "Crombie", "Cruiz", "Cruz", "Cuillin", "Cullen", "Cullin", - "Curtis", "Cyrus", "Daanyaal", "Daegan", "Daegyu", "Dafydd", "Dagon", "Dailey", "Daimhin", "Daithi", - "Dakota", "Daksh", "Dale", "Dalong", "Dalton", "Damian", "Damien", "Damon", "Dan", "Danar", "Dane", - "Danial", "Daniel", "Daniele", "Daniel-James", "Daniels", "Daniil", "Danish", "Daniyal", "Danniel", "Danny", - "Dante", "Danyal", "Danyil", "Danys", "Daood", "Dara", "Darach", "Daragh", "Darcy", "D'arcy", "Dareh", - "Daren", "Darien", "Darius", "Darl", "Darn", "Darrach", "Darragh", "Darrel", "Darrell", "Darren", "Darrie", - "Darrius", "Darroch", "Darryl", "Darryn", "Darwyn", "Daryl", "Daryn", "Daud", "Daumantas", "Davi", "David", - "David-Jay", "David-Lee", "Davie", "Davis", "Davy", "Dawid", "Dawson", "Dawud", "Dawûd", "Dayem", "Daymian", - "Deacon", "Deagan", "Dean", "Deano", "Decklan", "Declain", "Declan", "Declyan", "Declyn", "Dedeniseoluwa", - "Deecan", "Deegan", "Deelan", "Deklain-Jaimes", "Del", "Demetrius", "Denis", "Deniss", "Dennan", "Dennin", - "Dennis", "Denny", "Dennys", "Denon", "Denton", "Denver", "Denzel", "Deon", "Derek", "Derick", "Derin", - "Dermot", "Derren", "Derrie", "Derrin", "Derron", "Derry", "Derryn", "Deryn", "Deshawn", "Desmond", "Dev", - "Devan", "Devin", "Devlin", "Devlyn", "Devon", "Devrin", "Devyn", "Dex", "Dexter", "Dhani", "Dharam", - "Dhavid", "Dhyia", "Diarmaid", "Diarmid", "Diarmuid", "Didier", "Diego", "Diesel", "Diesil", "Digby", - "Dilan", "Dilano", "Dillan", "Dillon", "Dilraj", "Dimitri", "Dinaras", "Dion", "Dissanayake", "Dmitri", - "Doire", "Dolan", "Domanic", "Domenico", "Domhnall", "Dominic", "Dominick", "Dominik", "Donald", "Donnacha", - "Donnie", "Dorian", "Dougal", "Douglas", "Dougray", "Drakeo", "Dre", "Dregan", "Drew", "Dugald", "Duncan", - "Duriel", "Dustin", "Dylan", "Dylan-Jack", "Dylan-James", "Dylan-John", "Dylan-Patrick", "Dylin", "Dyllan", - "Dyllan-James", "Dyllon", "Eadie", "Eagann", "Eamon", "Eamonn", "Eason", "Eassan", "Easton", "Ebow", "Ed", - "Eddie", "Eden", "Ediomi", "Edison", "Eduardo", "Eduards", "Edward", "Edwin", "Edwyn", "Eesa", "Efan", - "Efe", "Ege", "Ehsan", "Ehsen", "Eiddon", "Eidhan", "Eihli", "Eimantas", "Eisa", "Eli", "Elias", "Elijah", - "Eliot", "Elisau", "Eljay", "Eljon", "Elliot", "Elliott", "Ellis", "Ellisandro", "Elshan", "Elvin", "Elyan", - "Emanuel", "Emerson", "Emil", "Emile", "Emir", "Emlyn", "Emmanuel", "Emmet", "Eng", "Eniola", "Enis", - "Ennis", "Enrico", "Enrique", "Enzo", "Eoghain", "Eoghan", "Eoin", "Eonan", "Erdehan", "Eren", "Erencem", - "Eric", "Ericlee", "Erik", "Eriz", "Ernie-Jacks", "Eroni", "Eryk", "Eshan", "Essa", "Esteban", "Ethan", - "Etienne", "Etinosa", "Euan", "Eugene", "Evan", "Evann", "Ewan", "Ewen", "Ewing", "Exodi", "Ezekiel", - "Ezra", "Fabian", "Fahad", "Faheem", "Faisal", "Faizaan", "Famara", "Fares", "Farhaan", "Farhan", "Farren", - "Farzad", "Fauzaan", "Favour", "Fawaz", "Fawkes", "Faysal", "Fearghus", "Feden", "Felix", "Fergal", - "Fergie", "Fergus", "Ferre", "Fezaan", "Fiachra", "Fikret", "Filip", "Filippo", "Finan", "Findlay", - "Findlay-James", "Findlie", "Finlay", "Finley", "Finn", "Finnan", "Finnean", "Finnen", "Finnlay", "Finnley", - "Fintan", "Fionn", "Firaaz", "Fletcher", "Flint", "Florin", "Flyn", "Flynn", "Fodeba", "Folarinwa", - "Forbes", "Forgan", "Forrest", "Fox", "Francesco", "Francis", "Francisco", "Franciszek", "Franco", "Frank", - "Frankie", "Franklin", "Franko", "Fraser", "Frazer", "Fred", "Freddie", "Frederick", "Fruin", "Fyfe", "Fyn", - "Fynlay", "Fynn", "Gabriel", "Gallagher", "Gareth", "Garren", "Garrett", "Garry", "Gary", "Gavin", - "Gavin-Lee", "Gene", "Geoff", "Geoffrey", "Geomer", "Geordan", "Geordie", "George", "Georgia", "Georgy", - "Gerard", "Ghyll", "Giacomo", "Gian", "Giancarlo", "Gianluca", "Gianmarco", "Gideon", "Gil", "Gio", - "Girijan", "Girius", "Gjan", "Glascott", "Glen", "Glenn", "Gordon", "Grady", "Graeme", "Graham", "Grahame", - "Grant", "Grayson", "Greg", "Gregor", "Gregory", "Greig", "Griffin", "Griffyn", "Grzegorz", "Guang", - "Guerin", "Guillaume", "Gurardass", "Gurdeep", "Gursees", "Gurthar", "Gurveer", "Gurwinder", "Gus", - "Gustav", "Guthrie", "Guy", "Gytis", "Habeeb", "Hadji", "Hadyn", "Hagun", "Haiden", "Haider", "Hamad", - "Hamid", "Hamish", "Hamza", "Hamzah", "Han", "Hansen", "Hao", "Hareem", "Hari", "Harikrishna", "Haris", - "Harish", "Harjeevan", "Harjyot", "Harlee", "Harleigh", "Harley", "Harman", "Harnek", "Harold", "Haroon", - "Harper", "Harri", "Harrington", "Harris", "Harrison", "Harry", "Harvey", "Harvie", "Harvinder", "Hasan", - "Haseeb", "Hashem", "Hashim", "Hassan", "Hassanali", "Hately", "Havila", "Hayden", "Haydn", "Haydon", - "Haydyn", "Hcen", "Hector", "Heddle", "Heidar", "Heini", "Hendri", "Henri", "Henry", "Herbert", "Heyden", - "Hiro", "Hirvaansh", "Hishaam", "Hogan", "Honey", "Hong", "Hope", "Hopkin", "Hosea", "Howard", "Howie", - "Hristomir", "Hubert", "Hugh", "Hugo", "Humza", "Hunter", "Husnain", "Hussain", "Hussan", "Hussnain", - "Hussnan", "Hyden", "I", "Iagan", "Iain", "Ian", "Ibraheem", "Ibrahim", "Idahosa", "Idrees", "Idris", - "Iestyn", "Ieuan", "Igor", "Ihtisham", "Ijay", "Ikechukwu", "Ikemsinachukwu", "Ilyaas", "Ilyas", "Iman", - "Immanuel", "Inan", "Indy", "Ines", "Innes", "Ioannis", "Ireayomide", "Ireoluwa", "Irvin", "Irvine", "Isa", - "Isaa", "Isaac", "Isaiah", "Isak", "Isher", "Ishwar", "Isimeli", "Isira", "Ismaeel", "Ismail", "Israel", - "Issiaka", "Ivan", "Ivar", "Izaak", "J", "Jaay", "Jac", "Jace", "Jack", "Jacki", "Jackie", "Jack-James", - "Jackson", "Jacky", "Jacob", "Jacques", "Jad", "Jaden", "Jadon", "Jadyn", "Jae", "Jagat", "Jago", "Jaheim", - "Jahid", "Jahy", "Jai", "Jaida", "Jaiden", "Jaidyn", "Jaii", "Jaime", "Jai-Rajaram", "Jaise", "Jak", "Jake", - "Jakey", "Jakob", "Jaksyn", "Jakub", "Jamaal", "Jamal", "Jameel", "Jameil", "James", "James-Paul", "Jamey", - "Jamie", "Jan", "Jaosha", "Jardine", "Jared", "Jarell", "Jarl", "Jarno", "Jarred", "Jarvi", "Jasey-Jay", - "Jasim", "Jaskaran", "Jason", "Jasper", "Jaxon", "Jaxson", "Jay", "Jaydan", "Jayden", "Jayden-James", - "Jayden-Lee", "Jayden-Paul", "Jayden-Thomas", "Jaydn", "Jaydon", "Jaydyn", "Jayhan", "Jay-Jay", "Jayke", - "Jaymie", "Jayse", "Jayson", "Jaz", "Jazeb", "Jazib", "Jazz", "Jean", "Jean-Lewis", "Jean-Pierre", - "Jebadiah", "Jed", "Jedd", "Jedidiah", "Jeemie", "Jeevan", "Jeffrey", "Jensen", "Jenson", "Jensyn", - "Jeremy", "Jerome", "Jeronimo", "Jerrick", "Jerry", "Jesse", "Jesuseun", "Jeswin", "Jevan", "Jeyun", "Jez", - "Jia", "Jian", "Jiao", "Jimmy", "Jincheng", "JJ", "Joaquin", "Joash", "Jock", "Jody", "Joe", "Joeddy", - "Joel", "Joey", "Joey-Jack", "Johann", "Johannes", "Johansson", "John", "Johnathan", "Johndean", "Johnjay", - "John-Michael", "Johnnie", "Johnny", "Johnpaul", "John-Paul", "John-Scott", "Johnson", "Jole", "Jomuel", - "Jon", "Jonah", "Jonatan", "Jonathan", "Jonathon", "Jonny", "Jonothan", "Jon-Paul", "Jonson", "Joojo", - "Jordan", "Jordi", "Jordon", "Jordy", "Jordyn", "Jorge", "Joris", "Jorryn", "Josan", "Josef", "Joseph", - "Josese", "Josh", "Joshiah", "Joshua", "Josiah", "Joss", "Jostelle", "Joynul", "Juan", "Jubin", "Judah", - "Jude", "Jules", "Julian", "Julien", "Jun", "Junior", "Jura", "Justan", "Justin", "Justinas", "Kaan", - "Kabeer", "Kabir", "Kacey", "Kacper", "Kade", "Kaden", "Kadin", "Kadyn", "Kaeden", "Kael", "Kaelan", - "Kaelin", "Kaelum", "Kai", "Kaid", "Kaidan", "Kaiden", "Kaidinn", "Kaidyn", "Kaileb", "Kailin", "Kain", - "Kaine", "Kainin", "Kainui", "Kairn", "Kaison", "Kaiwen", "Kajally", "Kajetan", "Kalani", "Kale", "Kaleb", - "Kaleem", "Kal-el", "Kalen", "Kalin", "Kallan", "Kallin", "Kalum", "Kalvin", "Kalvyn", "Kameron", "Kames", - "Kamil", "Kamran", "Kamron", "Kane", "Karam", "Karamvir", "Karandeep", "Kareem", "Karim", "Karimas", "Karl", - "Karol", "Karson", "Karsyn", "Karthikeya", "Kasey", "Kash", "Kashif", "Kasim", "Kasper", "Kasra", "Kavin", - "Kayam", "Kaydan", "Kayden", "Kaydin", "Kaydn", "Kaydyn", "Kaydyne", "Kayleb", "Kaylem", "Kaylum", "Kayne", - "Kaywan", "Kealan", "Kealon", "Kean", "Keane", "Kearney", "Keatin", "Keaton", "Keavan", "Keayn", "Kedrick", - "Keegan", "Keelan", "Keelin", "Keeman", "Keenan", "Keenan-Lee", "Keeton", "Kehinde", "Keigan", "Keilan", - "Keir", "Keiran", "Keiren", "Keiron", "Keiryn", "Keison", "Keith", "Keivlin", "Kelam", "Kelan", "Kellan", - "Kellen", "Kelso", "Kelum", "Kelvan", "Kelvin", "Ken", "Kenan", "Kendall", "Kendyn", "Kenlin", "Kenneth", - "Kensey", "Kenton", "Kenyon", "Kenzeigh", "Kenzi", "Kenzie", "Kenzo", "Kenzy", "Keo", "Ker", "Kern", "Kerr", - "Kevan", "Kevin", "Kevyn", "Kez", "Khai", "Khalan", "Khaleel", "Khaya", "Khevien", "Khizar", "Khizer", - "Kia", "Kian", "Kian-James", "Kiaran", "Kiarash", "Kie", "Kiefer", "Kiegan", "Kienan", "Kier", "Kieran", - "Kieran-Scott", "Kieren", "Kierin", "Kiern", "Kieron", "Kieryn", "Kile", "Killian", "Kimi", "Kingston", - "Kinneil", "Kinnon", "Kinsey", "Kiran", "Kirk", "Kirwin", "Kit", "Kiya", "Kiyonari", "Kjae", "Klein", - "Klevis", "Kobe", "Kobi", "Koby", "Koddi", "Koden", "Kodi", "Kodie", "Kody", "Kofi", "Kogan", "Kohen", - "Kole", "Konan", "Konar", "Konnor", "Konrad", "Koray", "Korben", "Korbyn", "Korey", "Kori", "Korrin", - "Kory", "Koushik", "Kris", "Krish", "Krishan", "Kriss", "Kristian", "Kristin", "Kristofer", "Kristoffer", - "Kristopher", "Kruz", "Krzysiek", "Krzysztof", "Ksawery", "Ksawier", "Kuba", "Kurt", "Kurtis", "Kurtis-Jae", - "Kyaan", "Kyan", "Kyde", "Kyden", "Kye", "Kyel", "Kyhran", "Kyie", "Kylan", "Kylar", "Kyle", "Kyle-Derek", - "Kylian", "Kym", "Kynan", "Kyral", "Kyran", "Kyren", "Kyrillos", "Kyro", "Kyron", "Kyrran", "Lachlainn", - "Lachlan", "Lachlann", "Lael", "Lagan", "Laird", "Laison", "Lakshya", "Lance", "Lancelot", "Landon", "Lang", - "Lasse", "Latif", "Lauchlan", "Lauchlin", "Laughlan", "Lauren", "Laurence", "Laurie", "Lawlyn", "Lawrence", - "Lawrie", "Lawson", "Layne", "Layton", "Lee", "Leigh", "Leigham", "Leighton", "Leilan", "Leiten", "Leithen", - "Leland", "Lenin", "Lennan", "Lennen", "Lennex", "Lennon", "Lennox", "Lenny", "Leno", "Lenon", "Lenyn", - "Leo", "Leon", "Leonard", "Leonardas", "Leonardo", "Lepeng", "Leroy", "Leven", "Levi", "Levon", "Levy", - "Lewie", "Lewin", "Lewis", "Lex", "Leydon", "Leyland", "Leylann", "Leyton", "Liall", "Liam", "Liam-Stephen", - "Limo", "Lincoln", "Lincoln-John", "Lincon", "Linden", "Linton", "Lionel", "Lisandro", "Litrell", - "Liyonela-Elam", "LLeyton", "Lliam", "Lloyd", "Lloyde", "Loche", "Lochlan", "Lochlann", "Lochlan-Oliver", - "Lock", "Lockey", "Logan", "Logann", "Logan-Rhys", "Loghan", "Lokesh", "Loki", "Lomond", "Lorcan", "Lorenz", - "Lorenzo", "Lorne", "Loudon", "Loui", "Louie", "Louis", "Loukas", "Lovell", "Luc", "Luca", "Lucais", - "Lucas", "Lucca", "Lucian", "Luciano", "Lucien", "Lucus", "Luic", "Luis", "Luk", "Luka", "Lukas", "Lukasz", - "Luke", "Lukmaan", "Luqman", "Lyall", "Lyle", "Lyndsay", "Lysander", "Maanav", "Maaz", "Mac", "Macallum", - "Macaulay", "Macauley", "Macaully", "Machlan", "Maciej", "Mack", "Mackenzie", "Mackenzy", "Mackie", - "Macsen", "Macy", "Madaki", "Maddison", "Maddox", "Madison", "Madison-Jake", "Madox", "Mael", "Magnus", - "Mahan", "Mahdi", "Mahmoud", "Maias", "Maison", "Maisum", "Maitlind", "Majid", "Makensie", "Makenzie", - "Makin", "Maksim", "Maksymilian", "Malachai", "Malachi", "Malachy", "Malakai", "Malakhy", "Malcolm", - "Malik", "Malikye", "Malo", "Ma'moon", "Manas", "Maneet", "Manmohan", "Manolo", "Manson", "Mantej", - "Manuel", "Manus", "Marc", "Marc-Anthony", "Marcel", "Marcello", "Marcin", "Marco", "Marcos", "Marcous", - "Marcquis", "Marcus", "Mario", "Marios", "Marius", "Mark", "Marko", "Markus", "Marley", "Marlin", "Marlon", - "Maros", "Marshall", "Martin", "Marty", "Martyn", "Marvellous", "Marvin", "Marwan", "Maryk", "Marzuq", - "Mashhood", "Mason", "Mason-Jay", "Masood", "Masson", "Matas", "Matej", "Mateusz", "Mathew", "Mathias", - "Mathu", "Mathuyan", "Mati", "Matt", "Matteo", "Matthew", "Matthew-William", "Matthias", "Max", "Maxim", - "Maximilian", "Maximillian", "Maximus", "Maxwell", "Maxx", "Mayeul", "Mayson", "Mazin", "Mcbride", - "McCaulley", "McKade", "McKauley", "McKay", "McKenzie", "McLay", "Meftah", "Mehmet", "Mehraz", "Meko", - "Melville", "Meshach", "Meyzhward", "Micah", "Michael", "Michael-Alexander", "Michael-James", "Michal", - "Michat", "Micheal", "Michee", "Mickey", "Miguel", "Mika", "Mikael", "Mi'kael", "Mikee", "Mikey", "Mikhail", - "Mikolaj", "Miles", "Millar", "Miller", "Milo", "Milos", "Milosz", "Mir", "Mirza", "Mitch", "Mitchel", - "Mitchell", "Moad", "Moayd", "Mobeen", "Modoulamin", "Modu", "Mohamad", "Mohamed", "Mohammad", - "Mohammad-Bilal", "Mohammed", "Mohanad", "Mohd", "Momin", "Momooreoluwa", "Montague", "Montgomery", "Monty", - "Moore", "Moosa", "Moray", "Morgan", "Morgyn", "Morris", "Morton", "Moshy", "Motade", "Moyes", "Msughter", - "Mueez", "Muhamadjavad", "Muhammad", "Muhammed", "Muhsin", "Muir", "Munachi", "Muneeb", "Mungo", "Munir", - "Munmair", "Munro", "Murdo", "Murray", "Murrough", "Murry", "Musa", "Musse", "Mustafa", "Mustapha", - "Muzammil", "Muzzammil", "Mykie", "Myles", "Mylo", "Nabeel", "Nadeem", "Nader", "Nagib", "Naif", "Nairn", - "Narvic", "Nash", "Nasser", "Nassir", "Natan", "Nate", "Nathan", "Nathanael", "Nathanial", "Nathaniel", - "Nathan-Rae", "Nawfal", "Nayan", "Neco", "Neil", "Nelson", "Neo", "Neshawn", "Nevan", "Nevin", - "Ngonidzashe", "Nial", "Niall", "Nicholas", "Nick", "Nickhill", "Nicki", "Nickson", "Nicky", "Nico", - "Nicodemus", "Nicol", "Nicolae", "Nicolas", "Nidhish", "Nihaal", "Nihal", "Nikash", "Nikhil", "Niki", - "Nikita", "Nikodem", "Nikolai", "Nikos", "Nilav", "Niraj", "Niro", "Niven", "Noah", "Noel", "Nolan", "Noor", - "Norman", "Norrie", "Nuada", "Nyah", "Oakley", "Oban", "Obieluem", "Obosa", "Odhran", "Odin", "Odynn", - "Ogheneochuko", "Ogheneruno", "Ohran", "Oilibhear", "Oisin", "Ojima-Ojo", "Okeoghene", "Olaf", "Ola-Oluwa", - "Olaoluwapolorimi", "Ole", "Olie", "Oliver", "Olivier", "Oliwier", "Ollie", "Olurotimi", "Oluwadamilare", - "Oluwadamiloju", "Oluwafemi", "Oluwafikunayomi", "Oluwalayomi", "Oluwatobiloba", "Oluwatoni", "Omar", - "Omri", "Oran", "Orin", "Orlando", "Orley", "Orran", "Orrick", "Orrin", "Orson", "Oryn", "Oscar", - "Osesenagha", "Oskar", "Ossian", "Oswald", "Otto", "Owain", "Owais", "Owen", "Owyn", "Oz", "Ozzy", "Pablo", - "Pacey", "Padraig", "Paolo", "Pardeepraj", "Parkash", "Parker", "Pascoe", "Pasquale", "Patrick", - "Patrick-John", "Patrikas", "Patryk", "Paul", "Pavit", "Pawel", "Pawlo", "Pearce", "Pearse", "Pearsen", - "Pedram", "Pedro", "Peirce", "Peiyan", "Pele", "Peni", "Peregrine", "Peter", "Phani", "Philip", "Philippos", - "Phinehas", "Phoenix", "Phoevos", "Pierce", "Pierre-Antoine", "Pieter", "Pietro", "Piotr", "Porter", - "Prabhjoit", "Prabodhan", "Praise", "Pranav", "Pravin", "Precious", "Prentice", "Presley", "Preston", - "Preston-Jay", "Prinay", "Prince", "Prithvi", "Promise", "Puneetpaul", "Pushkar", "Qasim", "Qirui", - "Quinlan", "Quinn", "Radmiras", "Raees", "Raegan", "Rafael", "Rafal", "Rafferty", "Rafi", "Raheem", "Rahil", - "Rahim", "Rahman", "Raith", "Raithin", "Raja", "Rajab-Ali", "Rajan", "Ralfs", "Ralph", "Ramanas", "Ramit", - "Ramone", "Ramsay", "Ramsey", "Rana", "Ranolph", "Raphael", "Rasmus", "Rasul", "Raul", "Raunaq", "Ravin", - "Ray", "Rayaan", "Rayan", "Rayane", "Rayden", "Rayhan", "Raymond", "Rayne", "Rayyan", "Raza", "Reace", - "Reagan", "Reean", "Reece", "Reed", "Reegan", "Rees", "Reese", "Reeve", "Regan", "Regean", "Reggie", - "Rehaan", "Rehan", "Reice", "Reid", "Reigan", "Reilly", "Reily", "Reis", "Reiss", "Remigiusz", "Remo", - "Remy", "Ren", "Renars", "Reng", "Rennie", "Reno", "Reo", "Reuben", "Rexford", "Reynold", "Rhein", "Rheo", - "Rhett", "Rheyden", "Rhian", "Rhoan", "Rholmark", "Rhoridh", "Rhuairidh", "Rhuan", "Rhuaridh", "Rhudi", - "Rhy", "Rhyan", "Rhyley", "Rhyon", "Rhys", "Rhys-Bernard", "Rhyse", "Riach", "Rian", "Ricards", "Riccardo", - "Ricco", "Rice", "Richard", "Richey", "Richie", "Ricky", "Rico", "Ridley", "Ridwan", "Rihab", "Rihan", - "Rihards", "Rihonn", "Rikki", "Riley", "Rio", "Rioden", "Rishi", "Ritchie", "Rivan", "Riyadh", "Riyaj", - "Roan", "Roark", "Roary", "Rob", "Robbi", "Robbie", "Robbie-lee", "Robby", "Robert", "Robert-Gordon", - "Robertjohn", "Robi", "Robin", "Rocco", "Roddy", "Roderick", "Rodrigo", "Roen", "Rogan", "Roger", "Rohaan", - "Rohan", "Rohin", "Rohit", "Rokas", "Roman", "Ronald", "Ronan", "Ronan-Benedict", "Ronin", "Ronnie", - "Rooke", "Roray", "Rori", "Rorie", "Rory", "Roshan", "Ross", "Ross-Andrew", "Rossi", "Rowan", "Rowen", - "Roy", "Ruadhan", "Ruaidhri", "Ruairi", "Ruairidh", "Ruan", "Ruaraidh", "Ruari", "Ruaridh", "Ruben", - "Rubhan", "Rubin", "Rubyn", "Rudi", "Rudy", "Rufus", "Rui", "Ruo", "Rupert", "Ruslan", "Russel", "Russell", - "Ryaan", "Ryan", "Ryan-Lee", "Ryden", "Ryder", "Ryese", "Ryhs", "Rylan", "Rylay", "Rylee", "Ryleigh", - "Ryley", "Rylie", "Ryo", "Ryszard", "Saad", "Sabeen", "Sachkirat", "Saffi", "Saghun", "Sahaib", "Sahbian", - "Sahil", "Saif", "Saifaddine", "Saim", "Sajid", "Sajjad", "Salahudin", "Salman", "Salter", "Salvador", - "Sam", "Saman", "Samar", "Samarjit", "Samatar", "Sambrid", "Sameer", "Sami", "Samir", "Sami-Ullah", - "Samual", "Samuel", "Samuela", "Samy", "Sanaullah", "Sandro", "Sandy", "Sanfur", "Sanjay", "Santiago", - "Santino", "Satveer", "Saul", "Saunders", "Savin", "Sayad", "Sayeed", "Sayf", "Scot", "Scott", - "Scott-Alexander", "Seaan", "Seamas", "Seamus", "Sean", "Seane", "Sean-James", "Sean-Paul", "Sean-Ray", - "Seb", "Sebastian", "Sebastien", "Selasi", "Seonaidh", "Sephiroth", "Sergei", "Sergio", "Seth", "Sethu", - "Seumas", "Shaarvin", "Shadow", "Shae", "Shahmir", "Shai", "Shane", "Shannon", "Sharland", "Sharoz", - "Shaughn", "Shaun", "Shaunpaul", "Shaun-Paul", "Shaun-Thomas", "Shaurya", "Shaw", "Shawn", "Shawnpaul", - "Shay", "Shayaan", "Shayan", "Shaye", "Shayne", "Shazil", "Shea", "Sheafan", "Sheigh", "Shenuk", "Sher", - "Shergo", "Sheriff", "Sherwyn", "Shiloh", "Shiraz", "Shreeram", "Shreyas", "Shyam", "Siddhant", "Siddharth", - "Sidharth", "Sidney", "Siergiej", "Silas", "Simon", "Sinai", "Skye", "Sofian", "Sohaib", "Sohail", "Soham", - "Sohan", "Sol", "Solomon", "Sonneey", "Sonni", "Sonny", "Sorley", "Soul", "Spencer", "Spondon", "Stanislaw", - "Stanley", "Stefan", "Stefano", "Stefin", "Stephen", "Stephenjunior", "Steve", "Steven", "Steven-lee", - "Stevie", "Stewart", "Stewarty", "Strachan", "Struan", "Stuart", "Su", "Subhaan", "Sudais", "Suheyb", - "Suilven", "Sukhi", "Sukhpal", "Sukhvir", "Sulayman", "Sullivan", "Sultan", "Sung", "Sunny", "Suraj", - "Surien", "Sweyn", "Syed", "Sylvain", "Symon", "Szymon", "Tadd", "Taddy", "Tadhg", "Taegan", "Taegen", - "Tai", "Tait", "Taiwo", "Talha", "Taliesin", "Talon", "Talorcan", "Tamar", "Tamiem", "Tammam", "Tanay", - "Tane", "Tanner", "Tanvir", "Tanzeel", "Taonga", "Tarik", "Tariq-Jay", "Tate", "Taylan", "Taylar", "Tayler", - "Taylor", "Taylor-Jay", "Taylor-Lee", "Tayo", "Tayyab", "Tayye", "Tayyib", "Teagan", "Tee", "Teejay", - "Tee-jay", "Tegan", "Teighen", "Teiyib", "Te-Jay", "Temba", "Teo", "Teodor", "Teos", "Terry", "Teydren", - "Theo", "Theodore", "Thiago", "Thierry", "Thom", "Thomas", "Thomas-Jay", "Thomson", "Thorben", "Thorfinn", - "Thrinei", "Thumbiko", "Tiago", "Tian", "Tiarnan", "Tibet", "Tieran", "Tiernan", "Timothy", "Timucin", - "Tiree", "Tisloh", "Titi", "Titus", "Tiylar", "TJ", "Tjay", "T'jay", "T-Jay", "Tobey", "Tobi", "Tobias", - "Tobie", "Toby", "Todd", "Tokinaga", "Toluwalase", "Tom", "Tomas", "Tomasz", "Tommi-Lee", "Tommy", "Tomson", - "Tony", "Torin", "Torquil", "Torran", "Torrin", "Torsten", "Trafford", "Trai", "Travis", "Tre", "Trent", - "Trey", "Tristain", "Tristan", "Troy", "Tubagus", "Turki", "Turner", "Ty", "Ty-Alexander", "Tye", "Tyelor", - "Tylar", "Tyler", "Tyler-James", "Tyler-Jay", "Tyllor", "Tylor", "Tymom", "Tymon", "Tymoteusz", "Tyra", - "Tyree", "Tyrnan", "Tyrone", "Tyson", "Ubaid", "Ubayd", "Uchenna", "Uilleam", "Umair", "Umar", "Umer", - "Umut", "Urban", "Uri", "Usman", "Uzair", "Uzayr", "Valen", "Valentin", "Valentino", "Valery", "Valo", - "Vasyl", "Vedantsinh", "Veeran", "Victor", "Victory", "Vinay", "Vince", "Vincent", "Vincenzo", "Vinh", - "Vinnie", "Vithujan", "Vladimir", "Vladislav", "Vrishin", "Vuyolwethu", "Wabuya", "Wai", "Walid", "Wallace", - "Walter", "Waqaas", "Warkhas", "Warren", "Warrick", "Wasif", "Wayde", "Wayne", "Wei", "Wen", "Wesley", - "Wesley-Scott", "Wiktor", "Wilkie", "Will", "William", "William-John", "Willum", "Wilson", "Windsor", - "Wojciech", "Woyenbrakemi", "Wyatt", "Wylie", "Wynn", "Xabier", "Xander", "Xavier", "Xiao", "Xida", "Xin", - "Xue", "Yadgor", "Yago", "Yahya", "Yakup", "Yang", "Yanick", "Yann", "Yannick", "Yaseen", "Yasin", "Yasir", - "Yassin", "Yoji", "Yong", "Yoolgeun", "Yorgos", "Youcef", "Yousif", "Youssef", "Yu", "Yuanyu", "Yuri", - "Yusef", "Yusuf", "Yves", "Zaaine", "Zaak", "Zac", "Zach", "Zachariah", "Zacharias", "Zacharie", - "Zacharius", "Zachariya", "Zachary", "Zachary-Marc", "Zachery", "Zack", "Zackary", "Zaid", "Zain", "Zaine", - "Zaineddine", "Zainedin", "Zak", "Zakaria", "Zakariya", "Zakary", "Zaki", "Zakir", "Zakk", "Zamaar", - "Zander", "Zane", "Zarran", "Zayd", "Zayn", "Zayne", "Ze", "Zechariah", "Zeek", "Zeeshan", "Zeid", "Zein", - "Zen", "Zendel", "Zenith", "Zennon", "Zeph", "Zerah", "Zhen", "Zhi", "Zhong", "Zhuo", "Zi", "Zidane", - "Zijie", "Zinedine", "Zion", "Zishan", "Ziya", "Ziyaan", "Zohaib", "Zohair", "Zoubaeir", "Zubair", "Zubayr", - "Zuriel", "Jaime", "Jayden", "Josie", "Juliet", "Karys", "Kathleen", "Kendra", "Keri", "Keris", "Kirstin", - "Klaudia", "Luisa", "Lydia", "Maeve", "Marnie", "Miah", "Mirrin", "Nancy", "Nia", "Nikki", "Oliwia", - "Paris", "Piper", "Pippa", "Polly", "Rhona", "Safa", "Saira", "Sarah-Louise", "Shona", "Sorcha", "Stacey", - "Tessa", "Tiffany", "Verity", "Zarah", "Zoya", "Alexandria", "Alina", "Alison", "Angela", "Arianna", - "Chanel", "Chelsey", "Coral", "Corinne", "Danni", "Darci", "Dionne", "Eliza", "Elsie", "Fatima", "Freyja", - "Holli", "Jane", "Joanne", "Karina", "Katrina", "Kaylah", "Kaylee", "Lori", "Mila", "Nikita", "Penny", - "Sylvie", "Tammy", "Alexa", "Brooklyn", "Caragh", "Codie", "Constance", "Dana", "Demi-Lee", "Emilie", - "Esther", "Frankie", "Isabelle", "Jamie-Leigh", "Jessie", "Josephine", "Kady", "Kaila", "Kerri", "Kirstie", - "Lyla", "Macey", "Maisy", "Margaret", "Marie", "Maryam", "Mercedes", "Mischa", "Rosa", "Serena", "Sian", - "Tamzin", "Vanessa", "Violet", "Yasmine", "Aisha", "Aleisha", "Ana", "Daniella", "Elsa", "Jodi", "Karly", - "Leigha", "Lila", "Melanie", "Miriam", "Regan", "Sally", "Saskia", "Simone", "Tess", "Thea", "Zainab", - "Arwen", "Bonnie", "Eloise", "Emma-Louise", "Halle", "Hana", "Honey", "Jamie-Lee", "Karla", "Leia", "Leila", - "Madeline", "Neave", "Orlaith", "Rhea", "Sarah-Jane", "Tara", "Adele", "Alannah", "Alesha", "Annabelle", - "Ayla", "Becca", "Darcie", "Ebony", "Erica", "Georgie", "Hanna", "Julie", "Kadie", "Kelly", "Kiara", - "Lillie", "Mariam", "Mikayla", "Monica", "Roisin", "Savannah", "Sky", "Zahra", "Alanna", "Caoimhe", - "Chanelle", "Elisha", "Emilia", "Iris", "Kacie", "Lia", "Maja", "Mary", "Michelle", "Tyler", "Willow", - "Yasmin", "Becky", "Billie", "Clara", "Claudia", "Cody", "Elena", "Eryn", "Georgina", "Kayley", "Kimberley", - "Kira", "Laila", "Lauryn", "Murron", "Natalia", "Ruth", "Siobhan", "Tiana", "Bethan", "Brodie", "Cameron", - "Cassie", "Harriet", "Helen", "Kathryn", "Kyra", "Mairi", "Mckenzie", "Tilly", "Zuzanna", "April", - "Christina", "Claire", "Darcey", "Fern", "Fiona", "Joanna", "Lucia", "Charli", "Jamie", "Karis", - "Mackenzie", "Marissa", "Rihanna", "Teagan", "Tiegan", "Kaitlin", "Keeley", "Leigh", "Nadia", "Alix", - "Callie", "Carrie", "Eden", "Esme", "Hazel", "Miya", "Nieve", "Sadie", "Sasha", "Sinead", "Stella", - "Ashleigh", "Jade", "Jemma", "Michaela", "Alexis", "Aoife", "Francesca", "Lisa", "Matilda", "Annabel", - "Carmen", "Eleanor", "Faye", "Kaci", "Kasey", "Kerry", "Louisa", "Macy", "Mhairi", "Rebekah", "Teigan", - "Amie", "Brogan", "Catriona", "Scarlett", "Connie", "Katelyn", "Kenzie", "Lexi", "Nicola", "Sienna", "Abbi", - "Angel", "Martha", "Anya", "Toni", "Chantelle", "Gabriella", "Lexie", "Abbey", "Bailey", "Isobel", "Kelsie", - "Maia", "Nina", "Darcy", "Lacey", "Lana", "Sofia", "Stephanie", "Ellen", "Alicia", "Gabrielle", "Heidi", - "Jorja", "Kyla", "Rhiannon", "Tegan", "Maddison", "Madeleine", "Morven", "Rowan", "Lucie", "Milly", "Annie", - "Ashley", "Ellis", "Hope", "Mirren", "Rose", "Alexandra", "Jodie", "Kacey", "Phoebe", "Tia", "Ailsa", - "Alana", "Kirsten", "Charlie", "Katy", "Lilly", "Alyssa", "Maria", "Naomi", "Alisha", "Danielle", "Lola", - "Ciara", "Elle", "Faith", "Natasha", "Katherine", "Lois", "Mollie", "Carla", "Catherine", "Cerys", "Maisie", - "Victoria", "Amelie", "Demi", "Gracie", "Carys", "Isabella", "Leona", "Alex", "Hollie", "Sara", "Caitlyn", - "Kiera", "Lara", "Kate", "Louise", "Libby", "Rhianna", "Rosie", "Alice", "Julia", "Maya", "Natalie", - "Chelsea", "Layla", "Samantha", "Heather", "Kirsty", "Rachael", "Charley", "Imogen", "Elise", "Hayley", - "Kelsey", "Kara", "Orla", "Abi", "Gemma", "Laura", "Mya", "Bethany", "Jasmine", "Melissa", "Poppy", "Casey", - "Elizabeth", "Kaitlyn", "Carly", "Abby", "Neve", "Courtney", "Jennifer", "Sophia", "Shannon", "Georgia", - "Amber", "Robyn", "Beth", "Zara", "Amelia", "Taylor", "Daisy", "Paige", "Kayleigh", "Summer", "Madison", - "Jenna", "Morgan", "Evie", "Nicole", "Ella", "Cara", "Iona", "Eve", "Zoe", "Kayla", "Molly", "Abigail", - "Charlotte", "Millie", "Holly", "Leah", "Keira", "Lily", "Freya", "Caitlin", "Lauren", "Rachel", "Anna", - "Sarah", "Ruby", "Aimee", "Mia", "Skye", "Abbie", "Eva", "Eilidh", "Niamh", "Megan", "Brooke", "Isla", - "Rebecca", "Ava", "Grace", "Jessica", "Hannah", "Olivia", "Chloe", "Emily", "Amy", "Ellie", "Erin", "Katie", - "Lucy", "Emma", "Sophie" }; - } - - private static final String[] generateFirstNames() { - return new String[] { "AARON", "ABBIE", "ABBY", "ABEL", "ABIGAIL", "ABRAHAM", - "ADA", "ADAM", "ADAN", "ADDIE", "ADELA", "ADELAIDE", "ADELE", "ADELINE", "ADOLFO", "ADOLPH", "ADRIAN", - "ADRIANA", "ADRIENNE", "AGNES", "AGUSTIN", "AIDA", "AILEEN", "AIMEE", "AISHA", "AL", "ALAN", "ALANA", - "ALBA", "ALBERT", "ALBERTA", "ALBERTO", "ALEJANDRA", "ALEJANDRO", "ALEX", "ALEXANDER", "ALEXANDRA", - "ALEXANDRIA", "ALEXIS", "ALFONSO", "ALFRED", "ALFREDA", "ALFREDO", "ALI", "ALICE", "ALICIA", "ALINE", - "ALISA", "ALISHA", "ALISON", "ALISSA", "ALLAN", "ALLEN", "ALLENE", "ALLIE", "ALLISON", "ALLYSON", "ALMA", - "ALONZO", "ALPHONSO", "ALTA", "ALTHEA", "ALTON", "ALVARO", "ALVIN", "ALYCE", "ALYSON", "ALYSSA", "AMALIA", - "AMANDA", "AMBER", "AMELIA", "AMIE", "AMOS", "AMPARO", "AMY", "ANA", "ANASTASIA", "ANDRE", "ANDREA", - "ANDRES", "ANDREW", "ANDY", "ANGEL", "ANGELA", "ANGELIA", "ANGELICA", "ANGELINA", "ANGELINE", "ANGELIQUE", - "ANGELITA", "ANGELO", "ANGIE", "ANITA", "ANN", "ANNA", "ANNABELLE", "ANNE", "ANNETTE", "ANNIE", "ANNMARIE", - "ANTHONY", "ANTIONETTE", "ANTOINE", "ANTOINETTE", "ANTON", "ANTONIA", "ANTONIO", "ANTONY", "APRIL", - "ARACELI", "ARCHIE", "ARLENE", "ARLINE", "ARMAND", "ARMANDO", "ARNOLD", "ARRON", "ART", "ARTHUR", "ARTURO", - "ASHLEE", "ASHLEIGH", "ASHLEY", "AUBREY", "AUDRA", "AUDREY", "AUGUST", "AUGUSTA", "AURELIA", "AURELIO", - "AURORA", "AUSTIN", "AUTUMN", "AVA", "AVERY", "AVIS", "BARBARA", "BARBRA", "BARNEY", "BARRY", "BART", - "BASIL", "BEATRICE", "BEATRIZ", "BEAU", "BECKY", "BELINDA", "BEN", "BENITA", "BENITO", "BENJAMIN", - "BENNETT", "BENNIE", "BENNY", "BERNADETTE", "BERNADINE", "BERNARD", "BERNARDO", "BERNICE", "BERNIE", "BERT", - "BERTA", "BERTHA", "BERTIE", "BERYL", "BESSIE", "BETH", "BETHANY", "BETSY", "BETTE", "BETTIE", "BETTY", - "BETTYE", "BEULAH", "BEVERLEY", "BEVERLY", "BIANCA", "BILL", "BILLIE", "BILLY", "BLAINE", "BLAIR", "BLAKE", - "BLANCA", "BLANCHE", "BOB", "BOBBI", "BOBBIE", "BOBBY", "BONITA", "BONNIE", "BOOKER", "BOYD", "BRAD", - "BRADFORD", "BRADLEY", "BRADY", "BRAIN", "BRANDEN", "BRANDI", "BRANDIE", "BRANDON", "BRANDY", "BRENDA", - "BRENDAN", "BRENT", "BRET", "BRETT", "BRIAN", "BRIANA", "BRIANNA", "BRIDGET", "BRIDGETT", "BRIDGETTE", - "BRIGITTE", "BRITNEY", "BRITTANY", "BRITTNEY", "BROCK", "BROOKE", "BRUCE", "BRUNO", "BRYAN", "BRYANT", - "BRYCE", "BRYON", "BUDDY", "BUFORD", "BURTON", "BYRON", "CAITLIN", "CALEB", "CALLIE", "CALVIN", "CAMERON", - "CAMILLA", "CAMILLE", "CANDACE", "CANDICE", "CANDY", "CARA", "CAREY", "CARISSA", "CARL", "CARLA", "CARLENE", - "CARLO", "CARLOS", "CARLTON", "CARLY", "CARMELA", "CARMELLA", "CARMELO", "CARMEN", "CAROL", "CAROLE", - "CAROLINA", "CAROLINE", "CAROLYN", "CARRIE", "CARROLL", "CARSON", "CARTER", "CARY", "CARYN", "CASANDRA", - "CASEY", "CASSANDRA", "CASSIE", "CATALINA", "CATHERINE", "CATHLEEN", "CATHRYN", "CATHY", "CECELIA", "CECIL", - "CECILE", "CECILIA", "CEDRIC", "CELESTE", "CELIA", "CELINA", "CESAR", "CHAD", "CHANDRA", "CHARITY", - "CHARLENE", "CHARLES", "CHARLEY", "CHARLIE", "CHARLOTTE", "CHARMAINE", "CHASE", "CHASITY", "CHELSEA", - "CHELSEY", "CHERI", "CHERIE", "CHERRY", "CHERYL", "CHESTER", "CHRIS", "CHRISTA", "CHRISTI", "CHRISTIAN", - "CHRISTIE", "CHRISTINA", "CHRISTINE", "CHRISTOPHER", "CHRISTY", "CHRYSTAL", "CHUCK", "CINDY", "CLAIR", - "CLAIRE", "CLARA", "CLARE", "CLARENCE", "CLARICE", "CLARISSA", "CLARK", "CLAUDE", "CLAUDETTE", "CLAUDIA", - "CLAUDINE", "CLAY", "CLAYTON", "CLEMENT", "CLEO", "CLEVELAND", "CLIFF", "CLIFFORD", "CLIFTON", "CLINT", - "CLINTON", "CLYDE", "CODY", "COLBY", "COLE", "COLEEN", "COLETTE", "COLIN", "COLLEEN", "COLLIN", - "CONCEPCION", "CONCETTA", "CONNIE", "CONRAD", "CONSTANCE", "CONSUELO", "CORA", "COREY", "CORINA", "CORINE", - "CORINNE", "CORNELIA", "CORNELIUS", "CORNELL", "CORRINE", "CORTNEY", "CORY", "COURTNEY", "COY", "CRAIG", - "CRISTINA", "CRUZ", "CRYSTAL", "CURT", "CURTIS", "CYNTHIA", "DAISY", "DALE", "DALLAS", "DALTON", "DAMIAN", - "DAMIEN", "DAMON", "DAN", "DANA", "DANE", "DANIAL", "DANIEL", "DANIELLE", "DANNY", "DANTE", "DAPHNE", - "DARCY", "DAREN", "DARIN", "DARIUS", "DARLA", "DARLENE", "DARNELL", "DARREL", "DARRELL", "DARREN", "DARRIN", - "DARRYL", "DARWIN", "DARYL", "DAVE", "DAVID", "DAVIS", "DAWN", "DAYNA", "DEAN", "DEANA", "DEANN", "DEANNA", - "DEANNE", "DEBBIE", "DEBORA", "DEBORAH", "DEBRA", "DEE", "DEENA", "DEIDRA", "DEIDRE", "DEIRDRE", "DELBERT", - "DELIA", "DELLA", "DELMAR", "DELORES", "DELORIS", "DEMETRIUS", "DENA", "DENICE", "DENIS", "DENISE", - "DENNIS", "DENNY", "DENVER", "DEREK", "DERICK", "DERRICK", "DESIREE", "DESMOND", "DESSIE", "DEVIN", "DEVON", - "DEWAYNE", "DEWEY", "DEXTER", "DIANA", "DIANE", "DIANN", "DIANNA", "DIANNE", "DICK", "DIEGO", "DINA", - "DION", "DIONNE", "DIRK", "DIXIE", "DOLLIE", "DOLLY", "DOLORES", "DOMINGO", "DOMINIC", "DOMINICK", - "DOMINIQUE", "DON", "DONA", "DONALD", "DONNA", "DONNELL", "DONNIE", "DONNY", "DONOVAN", "DORA", "DOREEN", - "DORETHA", "DORIS", "DOROTHEA", "DOROTHY", "DORTHY", "DOUG", "DOUGLAS", "DOYLE", "DREW", "DUANE", "DUDLEY", - "DUSTIN", "DWAYNE", "DWIGHT", "DYLAN", "EARL", "EARLENE", "EARLINE", "EARNEST", "EARNESTINE", "EBONY", "ED", - "EDDIE", "EDDY", "EDGAR", "EDITH", "EDMOND", "EDMUND", "EDNA", "EDUARDO", "EDWARD", "EDWARDO", "EDWIN", - "EDWINA", "EDYTHE", "EFFIE", "EFRAIN", "EILEEN", "ELAINE", "ELBA", "ELBERT", "ELDA", "ELDON", "ELEANOR", - "ELENA", "ELI", "ELIAS", "ELIJAH", "ELINOR", "ELISA", "ELISABETH", "ELISE", "ELISHA", "ELIZA", "ELIZABETH", - "ELLA", "ELLEN", "ELLIOT", "ELLIOTT", "ELLIS", "ELMA", "ELMER", "ELNORA", "ELOISE", "ELSA", "ELSIE", - "ELTON", "ELVA", "ELVIA", "ELVIN", "ELVIRA", "ELVIS", "ELWOOD", "EMANUEL", "EMERSON", "EMERY", "EMIL", - "EMILIA", "EMILIE", "EMILIO", "EMILY", "EMMA", "EMMANUEL", "EMMETT", "EMORY", "ENID", "ENRIQUE", "ERIC", - "ERICA", "ERICK", "ERICKA", "ERIK", "ERIKA", "ERIN", "ERMA", "ERNA", "ERNEST", "ERNESTINE", "ERNESTO", - "ERNIE", "ERROL", "ERVIN", "ERWIN", "ESMERALDA", "ESPERANZA", "ESSIE", "ESTEBAN", "ESTELA", "ESTELLA", - "ESTELLE", "ESTER", "ESTHER", "ETHAN", "ETHEL", "ETTA", "EUGENE", "EUGENIA", "EULA", "EUNICE", "EVA", - "EVAN", "EVANGELINA", "EVANGELINE", "EVE", "EVELYN", "EVERETT", "FABIAN", "FAITH", "FANNIE", "FANNY", "FAY", - "FAYE", "FEDERICO", "FELECIA", "FELICIA", "FELIPE", "FELIX", "FERN", "FERNANDO", "FIDEL", "FLETCHER", - "FLORA", "FLORENCE", "FLORINE", "FLOSSIE", "FLOYD", "FORREST", "FRAN", "FRANCES", "FRANCESCA", "FRANCINE", - "FRANCIS", "FRANCISCA", "FRANCISCO", "FRANK", "FRANKIE", "FRANKLIN", "FRED", "FREDA", "FREDDIE", "FREDDY", - "FREDERIC", "FREDERICK", "FREDRICK", "FREIDA", "FRIEDA", "GABRIEL", "GABRIELA", "GABRIELLE", "GAIL", "GALE", - "GALEN", "GARLAND", "GARRETT", "GARRY", "GARY", "GAVIN", "GAY", "GAYLA", "GAYLE", "GENA", "GENARO", "GENE", - "GENEVA", "GENEVIEVE", "GEOFFREY", "GEORGE", "GEORGETTE", "GEORGIA", "GEORGINA", "GERALD", "GERALDINE", - "GERARD", "GERARDO", "GERI", "GERMAINE", "GERMAN", "GERRY", "GERTRUDE", "GILBERT", "GILBERTO", "GILDA", - "GINA", "GINGER", "GLADYS", "GLEN", "GLENDA", "GLENN", "GLENNA", "GLORIA", "GOLDIE", "GONZALO", "GORDON", - "GRACE", "GRACIE", "GRACIELA", "GRADY", "GRAHAM", "GRANT", "GREG", "GREGG", "GREGORIO", "GREGORY", "GRETA", - "GRETCHEN", "GROVER", "GUADALUPE", "GUILLERMO", "GUS", "GUSSIE", "GUSTAVO", "GUY", "GWEN", "GWENDOLYN", - "HAL", "HALEY", "HALLIE", "HANNAH", "HANS", "HARLAN", "HARLEY", "HAROLD", "HARRIET", "HARRIETT", "HARRIS", - "HARRISON", "HARRY", "HARVEY", "HATTIE", "HAZEL", "HEATH", "HEATHER", "HECTOR", "HEIDI", "HELEN", "HELENA", - "HELENE", "HELGA", "HENRIETTA", "HENRY", "HERBERT", "HERIBERTO", "HERMAN", "HERMINIA", "HESTER", "HILARY", - "HILDA", "HILLARY", "HIRAM", "HOLLIE", "HOLLIS", "HOLLY", "HOMER", "HOPE", "HORACE", "HOUSTON", "HOWARD", - "HUBERT", "HUGH", "HUGO", "HUMBERTO", "HUNG", "HUNTER", "IAN", "IDA", "IGNACIO", "ILA", "ILENE", "IMELDA", - "IMOGENE", "INA", "INES", "INEZ", "INGRID", "IRA", "IRENE", "IRIS", "IRMA", "IRVIN", "IRVING", "IRWIN", - "ISAAC", "ISABEL", "ISABELLA", "ISABELLE", "ISAIAH", "ISIDRO", "ISMAEL", "ISRAEL", "ISSAC", "IVA", "IVAN", - "IVY", "JACK", "JACKIE", "JACKLYN", "JACKSON", "JACLYN", "JACOB", "JACQUELINE", "JACQUELYN", "JACQUES", - "JADE", "JAIME", "JAKE", "JAMAL", "JAME", "JAMES", "JAMI", "JAMIE", "JAN", "JANA", "JANE", "JANELL", - "JANELLE", "JANET", "JANETTE", "JANICE", "JANIE", "JANINE", "JANIS", "JANNA", "JANNIE", "JARED", "JARROD", - "JARVIS", "JASMIN", "JASMINE", "JASON", "JASPER", "JAVIER", "JAY", "JAYNE", "JAYSON", "JEAN", "JEANETTE", - "JEANIE", "JEANINE", "JEANNE", "JEANNETTE", "JEANNIE", "JEANNINE", "JEFF", "JEFFERSON", "JEFFERY", - "JEFFREY", "JEFFRY", "JENIFER", "JENNA", "JENNIE", "JENNIFER", "JENNY", "JERALD", "JEREMIAH", "JEREMY", - "JERI", "JERMAINE", "JEROME", "JERRI", "JERRY", "JESS", "JESSE", "JESSICA", "JESSIE", "JESUS", "JEWEL", - "JEWELL", "JILL", "JILLIAN", "JIM", "JIMMIE", "JIMMY", "JO", "JOAN", "JOANN", "JOANNA", "JOANNE", "JOAQUIN", - "JOCELYN", "JODI", "JODIE", "JODY", "JOE", "JOEL", "JOESPH", "JOEY", "JOHANNA", "JOHN", "JOHNATHAN", - "JOHNATHON", "JOHNNIE", "JOHNNY", "JOLENE", "JON", "JONATHAN", "JONATHON", "JONI", "JORDAN", "JORGE", - "JOSE", "JOSEFA", "JOSEFINA", "JOSEPH", "JOSEPHINE", "JOSH", "JOSHUA", "JOSIE", "JOSUE", "JOY", "JOYCE", - "JUAN", "JUANA", "JUANITA", "JUDI", "JUDITH", "JUDY", "JULIA", "JULIAN", "JULIANA", "JULIANNE", "JULIE", - "JULIET", "JULIETTE", "JULIO", "JULIUS", "JUNE", "JUNIOR", "JUSTIN", "JUSTINA", "JUSTINE", "KAITLIN", - "KAITLYN", "KARA", "KAREN", "KARI", "KARIN", "KARINA", "KARL", "KARLA", "KARYN", "KASEY", "KATE", "KATELYN", - "KATHARINE", "KATHERINE", "KATHERYN", "KATHI", "KATHIE", "KATHLEEN", "KATHRINE", "KATHRYN", "KATHY", - "KATIE", "KATINA", "KATRINA", "KATY", "KAY", "KAYE", "KAYLA", "KEISHA", "KEITH", "KELLEY", "KELLI", - "KELLIE", "KELLY", "KELSEY", "KELVIN", "KEN", "KENDALL", "KENDRA", "KENDRICK", "KENNETH", "KENNY", "KENT", - "KENYA", "KERI", "KERMIT", "KERRI", "KERRY", "KEVIN", "KIM", "KIMBERLEE", "KIMBERLEY", "KIMBERLY", "KIRBY", - "KIRK", "KIRSTEN", "KITTY", "KRIS", "KRISTA", "KRISTEN", "KRISTI", "KRISTIE", "KRISTIN", "KRISTINA", - "KRISTINE", "KRISTOPHER", "KRISTY", "KRYSTAL", "KURT", "KURTIS", "KYLE", "LACEY", "LACY", "LADONNA", - "LAKEISHA", "LAKESHA", "LAKISHA", "LAMAR", "LAMONT", "LANA", "LANCE", "LANDON", "LANE", "LARA", "LARRY", - "LASHONDA", "LATANYA", "LATASHA", "LATISHA", "LATONYA", "LATOYA", "LAURA", "LAUREL", "LAUREN", "LAURENCE", - "LAURI", "LAURIE", "LAVERNE", "LAVONNE", "LAWANDA", "LAWRENCE", "LEA", "LEAH", "LEANN", "LEANNA", "LEANNE", - "LEE", "LEEANN", "LEIGH", "LEILA", "LELA", "LELAND", "LELIA", "LENA", "LENORA", "LENORE", "LEO", "LEOLA", - "LEON", "LEONA", "LEONARD", "LEONARDO", "LEONEL", "LEONOR", "LEROY", "LESA", "LESLEY", "LESLIE", "LESSIE", - "LESTER", "LETA", "LETHA", "LETICIA", "LETITIA", "LEVI", "LEWIS", "LIBBY", "LIDIA", "LILA", "LILIA", - "LILIAN", "LILIANA", "LILLIAN", "LILLIE", "LILLY", "LILY", "LINA", "LINCOLN", "LINDA", "LINDSAY", "LINDSEY", - "LINWOOD", "LIONEL", "LISA", "LIZ", "LIZA", "LIZZIE", "LLOYD", "LOGAN", "LOIS", "LOLA", "LOLITA", "LONNIE", - "LORA", "LORAINE", "LOREN", "LORENA", "LORENE", "LORENZO", "LORETTA", "LORI", "LORIE", "LORNA", "LORRAINE", - "LORRIE", "LOTTIE", "LOU", "LOUELLA", "LOUIE", "LOUIS", "LOUISA", "LOUISE", "LOURDES", "LOWELL", "LOYD", - "LUANN", "LUCAS", "LUCIA", "LUCILE", "LUCILLE", "LUCINDA", "LUCY", "LUELLA", "LUIS", "LUISA", "LUKE", - "LULA", "LUPE", "LUTHER", "LUZ", "LYDIA", "LYLE", "LYNDA", "LYNETTE", "LYNN", "LYNNE", "LYNNETTE", "MA", - "MABEL", "MABLE", "MACK", "MADELEINE", "MADELINE", "MADELYN", "MADGE", "MAE", "MAGDALENA", "MAGGIE", "MAI", - "MALCOLM", "MALINDA", "MALLORY", "MAMIE", "MANDY", "MANUEL", "MANUELA", "MARA", "MARC", "MARCEL", - "MARCELINO", "MARCELLA", "MARCI", "MARCIA", "MARCIE", "MARCO", "MARCOS", "MARCUS", "MARCY", "MARGARET", - "MARGARITA", "MARGERY", "MARGIE", "MARGO", "MARGOT", "MARGRET", "MARGUERITE", "MARI", "MARIA", "MARIAN", - "MARIANA", "MARIANNE", "MARIANO", "MARIBEL", "MARICELA", "MARIE", "MARIETTA", "MARILYN", "MARINA", "MARIO", - "MARION", "MARISA", "MARISOL", "MARISSA", "MARITZA", "MARJORIE", "MARK", "MARLA", "MARLENE", "MARLIN", - "MARLON", "MARQUITA", "MARSHA", "MARSHALL", "MARTA", "MARTHA", "MARTIN", "MARTINA", "MARTY", "MARVA", - "MARVIN", "MARY", "MARYANN", "MARYANNE", "MARYELLEN", "MARYLOU", "MASON", "MATHEW", "MATILDA", "MATT", - "MATTHEW", "MATTIE", "MAUDE", "MAURA", "MAUREEN", "MAURICE", "MAURICIO", "MAVIS", "MAX", "MAXINE", - "MAXWELL", "MAY", "MAYNARD", "MAYRA", "MEAGAN", "MEGAN", "MEGHAN", "MELANIE", "MELBA", "MELINDA", "MELISA", - "MELISSA", "MELLISA", "MELODY", "MELVA", "MELVIN", "MERCEDES", "MEREDITH", "MERLE", "MERLIN", "MERRILL", - "MIA", "MICAH", "MICHAEL", "MICHAELA", "MICHEAL", "MICHEL", "MICHELE", "MICHELL", "MICHELLE", "MICKEY", - "MIGUEL", "MIKE", "MILAGROS", "MILDRED", "MILES", "MILLARD", "MILLICENT", "MILLIE", "MILTON", "MINA", - "MINDY", "MINERVA", "MINNIE", "MIRANDA", "MIRIAM", "MISTY", "MITCHELL", "MITZI", "MOHAMMAD", "MOISES", - "MOLLIE", "MOLLY", "MONA", "MONICA", "MONIKA", "MONIQUE", "MONROE", "MONTE", "MONTY", "MORGAN", "MORRIS", - "MOSES", "MURIEL", "MURRAY", "MYRA", "MYRNA", "MYRON", "MYRTLE", "NADIA", "NADINE", "NAN", "NANCY", - "NANETTE", "NANNIE", "NAOMI", "NATALIA", "NATALIE", "NATASHA", "NATHAN", "NATHANIEL", "NEAL", "NED", "NEIL", - "NELDA", "NELL", "NELLIE", "NELLY", "NELSON", "NESTOR", "NETTIE", "NEVA", "NICHOLAS", "NICHOLE", "NICK", - "NICKOLAS", "NICOLAS", "NICOLE", "NIKKI", "NINA", "NITA", "NOAH", "NOE", "NOEL", "NOELLE", "NOEMI", "NOLA", - "NOLAN", "NONA", "NORA", "NORBERT", "NOREEN", "NORMA", "NORMAN", "NORRIS", "NUMBERS", "OCTAVIA", "OCTAVIO", - "ODELL", "ODESSA", "OFELIA", "OLA", "OLGA", "OLIVE", "OLIVER", "OLIVIA", "OLLIE", "OMAR", "OPAL", "OPHELIA", - "ORA", "ORLANDO", "ORVILLE", "OSCAR", "OTIS", "OTTO", "OWEN", "PABLO", "PAIGE", "PAM", "PAMALA", "PAMELA", - "PANSY", "PASQUALE", "PAT", "PATRICA", "PATRICE", "PATRICIA", "PATRICK", "PATSY", "PATTI", "PATTY", "PAUL", - "PAULA", "PAULETTE", "PAULINE", "PEARL", "PEARLIE", "PEDRO", "PEGGY", "PENELOPE", "PENNY", "PERCY", "PERRY", - "PETE", "PETER", "PETRA", "PHIL", "PHILIP", "PHILLIP", "PHOEBE", "PHYLLIS", "PIERRE", "POLLY", "PRESTON", - "PRISCILLA", "QUEEN", "QUENTIN", "QUINCY", "QUINTON", "RACHAEL", "RACHEL", "RACHELLE", "RAE", "RAFAEL", - "RALPH", "RAMIRO", "RAMON", "RAMONA", "RANDAL", "RANDALL", "RANDI", "RANDOLPH", "RANDY", "RAPHAEL", - "RAQUEL", "RAUL", "RAY", "RAYMOND", "RAYMUNDO", "REBA", "REBECCA", "REBEKAH", "REED", "REGGIE", "REGINA", - "REGINALD", "RENA", "RENAE", "RENE", "RENEE", "REUBEN", "REVA", "REX", "REYNA", "REYNALDO", "RHEA", "RHODA", - "RHONDA", "RICARDO", "RICHARD", "RICK", "RICKEY", "RICKIE", "RICKY", "RIGOBERTO", "RILEY", "RITA", "ROB", - "ROBBIE", "ROBBY", "ROBERT", "ROBERTA", "ROBERTO", "ROBIN", "ROBYN", "ROCCO", "ROCHELLE", "ROCIO", "ROCKY", - "ROD", "RODERICK", "RODGER", "RODNEY", "RODOLFO", "RODRIGO", "ROGELIO", "ROGER", "ROLAND", "ROLANDO", - "ROMAN", "ROMEO", "RON", "RONALD", "RONDA", "RONNIE", "ROOSEVELT", "RORY", "ROSA", "ROSALIA", "ROSALIE", - "ROSALIND", "ROSALINDA", "ROSALYN", "ROSANNA", "ROSANNE", "ROSARIO", "ROSCOE", "ROSE", "ROSEANN", "ROSELLA", - "ROSEMARIE", "ROSEMARY", "ROSETTA", "ROSIE", "ROSLYN", "ROSS", "ROWENA", "ROXANNE", "ROXIE", "ROY", "ROYCE", - "RUBEN", "RUBY", "RUDOLPH", "RUDY", "RUFUS", "RUSSEL", "RUSSELL", "RUSTY", "RUTH", "RUTHIE", "RYAN", - "SABRINA", "SADIE", "SALLIE", "SALLY", "SALVADOR", "SALVATORE", "SAM", "SAMANTHA", "SAMMIE", "SAMMY", - "SAMUEL", "SANDRA", "SANDY", "SANFORD", "SANTIAGO", "SANTOS", "SARA", "SARAH", "SASHA", "SAUL", "SAUNDRA", - "SAVANNAH", "SCOT", "SCOTT", "SCOTTY", "SEAN", "SEBASTIAN", "SELENA", "SELINA", "SELMA", "SERENA", "SERGIO", - "SETH", "SHANA", "SHANE", "SHANNA", "SHANNON", "SHARI", "SHARLENE", "SHARON", "SHARRON", "SHAUN", "SHAUNA", - "SHAWN", "SHAWNA", "SHEENA", "SHEILA", "SHELBY", "SHELDON", "SHELIA", "SHELLEY", "SHELLY", "SHELTON", - "SHEREE", "SHERI", "SHERMAN", "SHERRI", "SHERRIE", "SHERRY", "SHERYL", "SHIRLEY", "SIDNEY", "SIERRA", - "SILAS", "SILVIA", "SIMON", "SIMONE", "SOCORRO", "SOFIA", "SOLOMON", "SON", "SONDRA", "SONIA", "SONJA", - "SONNY", "SONYA", "SOPHIA", "SOPHIE", "SPENCER", "STACEY", "STACI", "STACIE", "STACY", "STAN", "STANLEY", - "STEFAN", "STEFANIE", "STELLA", "STEPHAN", "STEPHANIE", "STEPHEN", "STERLING", "STEVE", "STEVEN", "STEWART", - "STUART", "SUE", "SUMMER", "SUSAN", "SUSANA", "SUSANNA", "SUSANNE", "SUSIE", "SUZANNE", "SUZETTE", "SYBIL", - "SYDNEY", "SYLVESTER", "SYLVIA", "TABATHA", "TABITHA", "TAMARA", "TAMEKA", "TAMERA", "TAMI", "TAMIKA", - "TAMMI", "TAMMIE", "TAMMY", "TAMRA", "TANIA", "TANISHA", "TANYA", "TARA", "TASHA", "TAYLOR", "TED", "TEDDY", - "TERENCE", "TERESA", "TERI", "TERRA", "TERRANCE", "TERRELL", "TERRENCE", "TERRI", "TERRIE", "TERRY", - "TESSA", "THADDEUS", "THELMA", "THEODORE", "THERESA", "THERESE", "THERON", "THOMAS", "THURMAN", "TIA", - "TIFFANY", "TIM", "TIMMY", "TIMOTHY", "TINA", "TISHA", "TOBY", "TODD", "TOM", "TOMAS", "TOMMIE", "TOMMY", - "TONI", "TONIA", "TONY", "TONYA", "TORI", "TRACEY", "TRACI", "TRACIE", "TRACY", "TRAVIS", "TRENT", - "TRENTON", "TREVOR", "TRICIA", "TRINA", "TRISHA", "TRISTAN", "TROY", "TRUDY", "TRUMAN", "TWILA", "TY", - "TYLER", "TYRONE", "TYSON", "ULYSSES", "URSULA", "VALARIE", "VALERIA", "VALERIE", "VAN", "VANCE", "VANESSA", - "VAUGHN", "VELMA", "VERA", "VERN", "VERNA", "VERNON", "VERONICA", "VICENTE", "VICKI", "VICKIE", "VICKY", - "VICTOR", "VICTORIA", "VILMA", "VINCE", "VINCENT", "VIOLA", "VIOLET", "VIRGIE", "VIRGIL", "VIRGINIA", - "VITO", "VIVIAN", "VONDA", "WADE", "WALLACE", "WALTER", "WANDA", "WARD", "WARREN", "WAYNE", "WELDON", - "WENDELL", "WENDI", "WENDY", "WESLEY", "WHITNEY", "WILBERT", "WILBUR", "WILDA", "WILEY", "WILFORD", - "WILFRED", "WILFREDO", "WILL", "WILLA", "WILLARD", "WILLIAM", "WILLIAMS", "WILLIE", "WILLIS", "WILMA", - "WILMER", "WILSON", "WINFRED", "WINIFRED", "WINNIE", "WINSTON", "WM", "WOODROW", "XAVIER", "YESENIA", - "YOLANDA", "YOUNG", "YVETTE", "YVONNE", "ZACHARY", "ZACHERY", "ZELDA", "ZELMA" }; - } - - private static final String[] generateLastNames() { - return new String[] { "AARON", "ABBOTT", "ABEL", "ABELL", "ABERNATHY", "ABNER", - "ABNEY", "ABRAHAM", "ABRAMS", "ABREU", "ACEVEDO", "ACKER", "ACKERMAN", "ACKLEY", "ACOSTA", "ACUNA", "ADAIR", - "ADAM", "ADAME", "ADAMS", "ADAMSON", "ADCOCK", "ADDISON", "ADKINS", "ADLER", "AGEE", "AGNEW", "AGUAYO", - "AGUIAR", "AGUILAR", "AGUILERA", "AGUIRRE", "AHERN", "AHMAD", "AHMED", "AHRENS", "AIELLO", "AIKEN", - "AINSWORTH", "AKERS", "AKIN", "AKINS", "ALANIZ", "ALARCON", "ALBA", "ALBERS", "ALBERT", "ALBERTSON", - "ALBRECHT", "ALBRIGHT", "ALCALA", "ALCORN", "ALDERMAN", "ALDRICH", "ALDRIDGE", "ALEMAN", "ALEXANDER", - "ALFARO", "ALFONSO", "ALFORD", "ALFRED", "ALGER", "ALI", "ALICEA", "ALLAN", "ALLARD", "ALLEN", "ALLEY", - "ALLISON", "ALLMAN", "ALLRED", "ALMANZA", "ALMEIDA", "ALMOND", "ALONSO", "ALONZO", "ALSTON", "ALTMAN", - "ALVARADO", "ALVAREZ", "ALVES", "AMADOR", "AMARAL", "AMATO", "AMAYA", "AMBROSE", "AMES", "AMMONS", "AMOS", - "AMUNDSON", "ANAYA", "ANDERS", "ANDERSEN", "ANDERSON", "ANDRADE", "ANDRE", "ANDRES", "ANDREW", "ANDREWS", - "ANDRUS", "ANGEL", "ANGELO", "ANGLIN", "ANGULO", "ANTHONY", "ANTOINE", "ANTONIO", "APODACA", "APONTE", - "APPEL", "APPLE", "APPLEGATE", "APPLETON", "AQUINO", "ARAGON", "ARANDA", "ARAUJO", "ARCE", "ARCHER", - "ARCHIBALD", "ARCHIE", "ARCHULETA", "ARELLANO", "AREVALO", "ARIAS", "ARMENTA", "ARMIJO", "ARMSTEAD", - "ARMSTRONG", "ARNDT", "ARNETT", "ARNOLD", "ARREDONDO", "ARREOLA", "ARRIAGA", "ARRINGTON", "ARROYO", - "ARSENAULT", "ARTEAGA", "ARTHUR", "ARTIS", "ASBURY", "ASH", "ASHBY", "ASHCRAFT", "ASHE", "ASHER", "ASHFORD", - "ASHLEY", "ASHMORE", "ASHTON", "ASHWORTH", "ASKEW", "ATCHISON", "ATHERTON", "ATKINS", "ATKINSON", "ATWELL", - "ATWOOD", "AUGUST", "AUGUSTINE", "AULT", "AUSTIN", "AUTRY", "AVALOS", "AVERY", "AVILA", "AVILES", "AYALA", - "AYERS", "AYRES", "BABB", "BABCOCK", "BABIN", "BACA", "BACH", "BACHMAN", "BACK", "BACON", "BADER", "BADGER", - "BADILLO", "BAER", "BAEZ", "BAGGETT", "BAGLEY", "BAGWELL", "BAILEY", "BAIN", "BAINES", "BAIR", "BAIRD", - "BAKER", "BALDERAS", "BALDWIN", "BALES", "BALL", "BALLARD", "BANDA", "BANDY", "BANKS", "BANKSTON", - "BANNISTER", "BANUELOS", "BAPTISTE", "BARAJAS", "BARBA", "BARBEE", "BARBER", "BARBOSA", "BARBOUR", - "BARCLAY", "BARDEN", "BARELA", "BARFIELD", "BARGER", "BARHAM", "BARKER", "BARKLEY", "BARKSDALE", "BARLOW", - "BARNARD", "BARNES", "BARNETT", "BARNETTE", "BARNEY", "BARNHART", "BARNHILL", "BARON", "BARONE", "BARR", - "BARRAZA", "BARRERA", "BARRETO", "BARRETT", "BARRIENTOS", "BARRIOS", "BARRON", "BARROW", "BARROWS", "BARRY", - "BARTELS", "BARTH", "BARTHOLOMEW", "BARTLETT", "BARTLEY", "BARTON", "BASHAM", "BASKIN", "BASS", "BASSETT", - "BATCHELOR", "BATEMAN", "BATES", "BATISTA", "BATISTE", "BATSON", "BATTAGLIA", "BATTEN", "BATTLE", "BATTLES", - "BATTS", "BAUER", "BAUGH", "BAUGHMAN", "BAUM", "BAUMAN", "BAUMANN", "BAUMGARDNER", "BAUMGARTNER", - "BAUTISTA", "BAXLEY", "BAXTER", "BAYER", "BAYLOR", "BAYNE", "BAYS", "BEACH", "BEAL", "BEALE", "BEALL", - "BEALS", "BEAM", "BEAMON", "BEAN", "BEANE", "BEAR", "BEARD", "BEARDEN", "BEASLEY", "BEATTIE", "BEATTY", - "BEATY", "BEAUCHAMP", "BEAUDOIN", "BEAULIEU", "BEAUREGARD", "BEAVER", "BEAVERS", "BECERRA", "BECK", - "BECKER", "BECKETT", "BECKHAM", "BECKMAN", "BECKWITH", "BECNEL", "BEDARD", "BEDFORD", "BEEBE", "BEELER", - "BEERS", "BEESON", "BEGAY", "BEGLEY", "BEHRENS", "BELANGER", "BELCHER", "BELL", "BELLAMY", "BELLO", "BELT", - "BELTON", "BELTRAN", "BENAVIDES", "BENAVIDEZ", "BENDER", "BENEDICT", "BENEFIELD", "BENITEZ", "BENJAMIN", - "BENNER", "BENNETT", "BENOIT", "BENSON", "BENTLEY", "BENTON", "BERG", "BERGER", "BERGERON", "BERGMAN", - "BERGSTROM", "BERLIN", "BERMAN", "BERMUDEZ", "BERNAL", "BERNARD", "BERNHARDT", "BERNIER", "BERNSTEIN", - "BERRIOS", "BERRY", "BERRYMAN", "BERTRAM", "BERTRAND", "BERUBE", "BESS", "BEST", "BETANCOURT", "BETHEA", - "BETHEL", "BETTS", "BETZ", "BEVERLY", "BEVINS", "BEYER", "BIBLE", "BICKFORD", "BIDDLE", "BIGELOW", "BIGGS", - "BILLINGS", "BILLINGSLEY", "BILLIOT", "BILLS", "BILLUPS", "BILODEAU", "BINDER", "BINGHAM", "BINKLEY", - "BIRCH", "BIRD", "BISHOP", "BISSON", "BITTNER", "BIVENS", "BIVINS", "BLACK", "BLACKBURN", "BLACKMAN", - "BLACKMON", "BLACKWELL", "BLACKWOOD", "BLAINE", "BLAIR", "BLAIS", "BLAKE", "BLAKELY", "BLALOCK", - "BLANCHARD", "BLANCHETTE", "BLANCO", "BLAND", "BLANK", "BLANKENSHIP", "BLANTON", "BLAYLOCK", "BLEDSOE", - "BLEVINS", "BLISS", "BLOCK", "BLOCKER", "BLODGETT", "BLOOM", "BLOUNT", "BLUE", "BLUM", "BLUNT", "BLYTHE", - "BOATRIGHT", "BOATWRIGHT", "BOBBITT", "BOBO", "BOCK", "BOEHM", "BOETTCHER", "BOGAN", "BOGGS", "BOHANNON", - "BOHN", "BOISVERT", "BOLAND", "BOLDEN", "BOLDUC", "BOLEN", "BOLES", "BOLIN", "BOLING", "BOLLING", - "BOLLINGER", "BOLT", "BOLTON", "BOND", "BONDS", "BONE", "BONILLA", "BONNER", "BOOKER", "BOONE", "BOOTH", - "BOOTHE", "BORDELON", "BORDEN", "BORDERS", "BOREN", "BORGES", "BORREGO", "BOSS", "BOSTIC", "BOSTICK", - "BOSTON", "BOSWELL", "BOTTOMS", "BOUCHARD", "BOUCHER", "BOUDREAU", "BOUDREAUX", "BOUNDS", "BOURGEOIS", - "BOURNE", "BOURQUE", "BOWDEN", "BOWEN", "BOWENS", "BOWER", "BOWERS", "BOWIE", "BOWLES", "BOWLIN", "BOWLING", - "BOWMAN", "BOWSER", "BOX", "BOYCE", "BOYD", "BOYER", "BOYKIN", "BOYLE", "BOYLES", "BOYNTON", "BOZEMAN", - "BRACKEN", "BRACKETT", "BRADBURY", "BRADEN", "BRADFORD", "BRADLEY", "BRADSHAW", "BRADY", "BRAGG", "BRANCH", - "BRAND", "BRANDENBURG", "BRANDON", "BRANDT", "BRANHAM", "BRANNON", "BRANSON", "BRANT", "BRANTLEY", - "BRASWELL", "BRATCHER", "BRATTON", "BRAUN", "BRAVO", "BRAXTON", "BRAY", "BRAZIL", "BREAUX", "BREEDEN", - "BREEDLOVE", "BREEN", "BRENNAN", "BRENNER", "BRENT", "BREWER", "BREWSTER", "BRICE", "BRIDGES", "BRIGGS", - "BRIGHT", "BRILEY", "BRILL", "BRIM", "BRINK", "BRINKLEY", "BRINKMAN", "BRINSON", "BRIONES", "BRISCOE", - "BRISENO", "BRITO", "BRITT", "BRITTAIN", "BRITTON", "BROADNAX", "BROADWAY", "BROCK", "BROCKMAN", - "BRODERICK", "BRODY", "BROGAN", "BRONSON", "BROOKINS", "BROOKS", "BROOME", "BROTHERS", "BROUGHTON", - "BROUSSARD", "BROWDER", "BROWER", "BROWN", "BROWNE", "BROWNELL", "BROWNING", "BROWNLEE", "BROYLES", - "BRUBAKER", "BRUCE", "BRUMFIELD", "BRUNER", "BRUNNER", "BRUNO", "BRUNS", "BRUNSON", "BRUTON", "BRYAN", - "BRYANT", "BRYSON", "BUCHANAN", "BUCHER", "BUCK", "BUCKINGHAM", "BUCKLEY", "BUCKNER", "BUENO", "BUFFINGTON", - "BUFORD", "BUI", "BULL", "BULLARD", "BULLOCK", "BUMGARNER", "BUNCH", "BUNDY", "BUNKER", "BUNN", "BUNNELL", - "BUNTING", "BURCH", "BURCHETT", "BURCHFIELD", "BURDEN", "BURDETTE", "BURDICK", "BURGE", "BURGER", "BURGESS", - "BURGOS", "BURK", "BURKE", "BURKETT", "BURKHART", "BURKHOLDER", "BURKS", "BURLESON", "BURLEY", "BURNETT", - "BURNETTE", "BURNEY", "BURNHAM", "BURNS", "BURNSIDE", "BURR", "BURRELL", "BURRIS", "BURROUGHS", "BURROW", - "BURROWS", "BURT", "BURTON", "BUSBY", "BUSCH", "BUSH", "BUSS", "BUSSEY", "BUSTAMANTE", "BUSTOS", "BUTCHER", - "BUTLER", "BUTTERFIELD", "BUTTON", "BUTTS", "BUXTON", "BYARS", "BYERS", "BYNUM", "BYRD", "BYRNE", "BYRNES", - "CABALLERO", "CABAN", "CABLE", "CABRAL", "CABRERA", "CADE", "CADY", "CAGLE", "CAHILL", "CAIN", "CALABRESE", - "CALDERON", "CALDWELL", "CALHOUN", "CALKINS", "CALL", "CALLAGHAN", "CALLAHAN", "CALLAWAY", "CALLENDER", - "CALLOWAY", "CALVERT", "CALVIN", "CAMACHO", "CAMARILLO", "CAMBELL", "CAMERON", "CAMP", "CAMPBELL", "CAMPOS", - "CANADA", "CANADY", "CANALES", "CANDELARIA", "CANFIELD", "CANNON", "CANO", "CANTRELL", "CANTU", "CANTWELL", - "CANTY", "CAPPS", "CARABALLO", "CARAWAY", "CARBAJAL", "CARBONE", "CARD", "CARDEN", "CARDENAS", "CARDER", - "CARDONA", "CARDOZA", "CARDWELL", "CAREY", "CARL", "CARLIN", "CARLISLE", "CARLOS", "CARLSON", "CARLTON", - "CARMAN", "CARMICHAEL", "CARMONA", "CARNAHAN", "CARNES", "CARNEY", "CARO", "CARON", "CARPENTER", "CARR", - "CARRANZA", "CARRASCO", "CARRERA", "CARRICO", "CARRIER", "CARRILLO", "CARRINGTON", "CARRION", "CARROLL", - "CARSON", "CARSWELL", "CARTER", "CARTWRIGHT", "CARUSO", "CARVALHO", "CARVER", "CARY", "CASAS", "CASE", - "CASEY", "CASH", "CASILLAS", "CASKEY", "CASON", "CASPER", "CASS", "CASSELL", "CASSIDY", "CASTANEDA", - "CASTEEL", "CASTELLANO", "CASTELLANOS", "CASTILLO", "CASTLE", "CASTLEBERRY", "CASTRO", "CASWELL", - "CATALANO", "CATES", "CATHEY", "CATO", "CATRON", "CAUDILL", "CAUDLE", "CAUSEY", "CAVANAUGH", "CAVAZOS", - "CAVE", "CECIL", "CENTENO", "CERDA", "CERVANTES", "CHACON", "CHADWICK", "CHAFFIN", "CHALMERS", - "CHAMBERLAIN", "CHAMBERLIN", "CHAMBERS", "CHAMBLISS", "CHAMPAGNE", "CHAMPION", "CHAN", "CHANCE", "CHANDLER", - "CHANEY", "CHANG", "CHAPA", "CHAPIN", "CHAPMAN", "CHAPPELL", "CHARLES", "CHARLTON", "CHASE", "CHASTAIN", - "CHATMAN", "CHAU", "CHAVARRIA", "CHAVES", "CHAVEZ", "CHAVIS", "CHEATHAM", "CHEEK", "CHEN", "CHENEY", - "CHENG", "CHERRY", "CHESSER", "CHESTER", "CHESTNUT", "CHEUNG", "CHEW", "CHILD", "CHILDERS", "CHILDRESS", - "CHILDS", "CHILTON", "CHIN", "CHISHOLM", "CHISM", "CHISOLM", "CHITWOOD", "CHO", "CHOATE", "CHOI", "CHONG", - "CHOW", "CHRISTENSEN", "CHRISTENSON", "CHRISTIAN", "CHRISTIANSEN", "CHRISTIANSON", "CHRISTIE", "CHRISTMAN", - "CHRISTMAS", "CHRISTOPHER", "CHRISTY", "CHU", "CHUN", "CHUNG", "CHURCH", "CHURCHILL", "CINTRON", "CISNEROS", - "CLANCY", "CLANTON", "CLAPP", "CLARK", "CLARKE", "CLARKSON", "CLARY", "CLAUSEN", "CLAWSON", "CLAY", - "CLAYTON", "CLEARY", "CLEGG", "CLEM", "CLEMENS", "CLEMENT", "CLEMENTS", "CLEMMONS", "CLEMONS", "CLEVELAND", - "CLEVENGER", "CLICK", "CLIFFORD", "CLIFTON", "CLINE", "CLINTON", "CLOSE", "CLOUD", "CLOUGH", "CLOUTIER", - "COATES", "COATS", "COBB", "COBBS", "COBLE", "COBURN", "COCHRAN", "COCHRANE", "COCKRELL", "CODY", "COE", - "COFFEY", "COFFIN", "COFFMAN", "COGGINS", "COHEN", "COHN", "COKER", "COLBERT", "COLBURN", "COLBY", "COLE", - "COLEMAN", "COLES", "COLEY", "COLLADO", "COLLAZO", "COLLEY", "COLLIER", "COLLINS", "COLON", "COLSON", - "COLVIN", "COLWELL", "COMBS", "COMEAUX", "COMER", "COMPTON", "COMSTOCK", "CONAWAY", "CONCEPCION", "CONDON", - "CONE", "CONGER", "CONKLIN", "CONLEY", "CONN", "CONNELL", "CONNELLY", "CONNER", "CONNERS", "CONNOLLY", - "CONNOR", "CONNORS", "CONOVER", "CONRAD", "CONROY", "CONTE", "CONTI", "CONTRERAS", "CONWAY", "CONYERS", - "COOK", "COOKE", "COOKS", "COOKSEY", "COOLEY", "COOMBS", "COON", "COONEY", "COONS", "COOPER", "COPE", - "COPELAND", "COPLEY", "COPPOLA", "CORBETT", "CORBIN", "CORBITT", "CORCORAN", "CORDELL", "CORDERO", - "CORDOVA", "COREY", "CORLEY", "CORMIER", "CORNELIUS", "CORNELL", "CORNETT", "CORNISH", "CORNWELL", "CORONA", - "CORONADO", "CORRAL", "CORREA", "CORREIA", "CORRIGAN", "CORTES", "CORTEZ", "CORWIN", "COSBY", "COSGROVE", - "COSTA", "COSTELLO", "COTA", "COTE", "COTHRAN", "COTTER", "COTTON", "COTTRELL", "COUCH", "COUGHLIN", - "COULTER", "COUNCIL", "COUNTS", "COURTNEY", "COUSINS", "COUTURE", "COVERT", "COVEY", "COVINGTON", "COWAN", - "COWARD", "COWART", "COWELL", "COWLES", "COWLEY", "COX", "COY", "COYLE", "COYNE", "CRABTREE", "CRADDOCK", - "CRAFT", "CRAIG", "CRAIN", "CRAMER", "CRANDALL", "CRANE", "CRANFORD", "CRAVEN", "CRAWFORD", "CRAWLEY", - "CRAYTON", "CREAMER", "CREECH", "CREEL", "CREIGHTON", "CRENSHAW", "CRESPO", "CREWS", "CRIDER", "CRISP", - "CRIST", "CRISWELL", "CRITTENDEN", "CROCKER", "CROCKETT", "CROFT", "CROMER", "CROMWELL", "CRONIN", "CROOK", - "CROOKS", "CROSBY", "CROSS", "CROTEAU", "CROUCH", "CROUSE", "CROW", "CROWDER", "CROWE", "CROWELL", - "CROWLEY", "CRUM", "CRUMP", "CRUSE", "CRUTCHER", "CRUTCHFIELD", "CRUZ", "CUELLAR", "CUEVAS", "CULBERTSON", - "CULLEN", "CULP", "CULPEPPER", "CULVER", "CUMMINGS", "CUMMINS", "CUNNINGHAM", "CUPP", "CURLEY", "CURRAN", - "CURRIE", "CURRIER", "CURRY", "CURTIN", "CURTIS", "CUSHMAN", "CUSTER", "CUTLER", "CYR", "DABNEY", "DAHL", - "DAIGLE", "DAILEY", "DAILY", "DALE", "DALEY", "DALLAS", "DALTON", "DALY", "DAMICO", "DAMON", "DAMRON", - "DANCY", "DANG", "DANGELO", "DANIEL", "DANIELS", "DANIELSON", "DANNER", "DARBY", "DARDEN", "DARLING", - "DARNELL", "DASILVA", "DAUGHERTY", "DAUGHTRY", "DAVENPORT", "DAVID", "DAVIDSON", "DAVIES", "DAVILA", - "DAVIS", "DAVISON", "DAWKINS", "DAWSON", "DAY", "DAYTON", "DEAL", "DEAN", "DEATON", "DEBERRY", "DECKER", - "DEES", "DEHART", "DEJESUS", "DELACRUZ", "DELAGARZA", "DELANEY", "DELAROSA", "DELATORRE", "DELEON", - "DELGADILLO", "DELGADO", "DELL", "DELLINGER", "DELOACH", "DELONG", "DELOSSANTOS", "DELUCA", "DELVALLE", - "DEMARCO", "DEMERS", "DEMPSEY", "DENHAM", "DENNEY", "DENNING", "DENNIS", "DENNISON", "DENNY", "DENSON", - "DENT", "DENTON", "DEROSA", "DERR", "DERRICK", "DESANTIS", "DESIMONE", "DEVINE", "DEVITO", "DEVLIN", - "DEVORE", "DEVRIES", "DEW", "DEWEY", "DEWITT", "DEXTER", "DIAL", "DIAMOND", "DIAS", "DIAZ", "DICK", - "DICKENS", "DICKERSON", "DICKEY", "DICKINSON", "DICKSON", "DIEHL", "DIETRICH", "DIETZ", "DIGGS", "DILL", - "DILLARD", "DILLON", "DINKINS", "DION", "DIX", "DIXON", "DO", "DOAN", "DOBBINS", "DOBBS", "DOBSON", - "DOCKERY", "DODD", "DODDS", "DODGE", "DODSON", "DOE", "DOHERTY", "DOLAN", "DOLL", "DOLLAR", "DOMINGO", - "DOMINGUEZ", "DOMINQUEZ", "DONAHUE", "DONALD", "DONALDSON", "DONATO", "DONNELL", "DONNELLY", "DONOHUE", - "DONOVAN", "DOOLEY", "DOOLITTLE", "DORAN", "DORMAN", "DORN", "DORRIS", "DORSEY", "DORTCH", "DOSS", "DOTSON", - "DOTY", "DOUCETTE", "DOUGHERTY", "DOUGHTY", "DOUGLAS", "DOUGLASS", "DOVE", "DOVER", "DOW", "DOWD", "DOWDY", - "DOWELL", "DOWLING", "DOWNEY", "DOWNING", "DOWNS", "DOYLE", "DOZIER", "DRAKE", "DRAPER", "DRAYTON", "DREW", - "DRISCOLL", "DRIVER", "DRUMMOND", "DRURY", "DUARTE", "DUBE", "DUBOIS", "DUBOSE", "DUCKETT", "DUCKWORTH", - "DUDLEY", "DUFF", "DUFFY", "DUGAN", "DUGAS", "DUGGAN", "DUGGER", "DUKE", "DUKES", "DUMAS", "DUMONT", - "DUNAWAY", "DUNBAR", "DUNCAN", "DUNHAM", "DUNLAP", "DUNN", "DUNNE", "DUNNING", "DUONG", "DUPONT", "DUPRE", - "DUPREE", "DUPUIS", "DURAN", "DURAND", "DURANT", "DURBIN", "DURDEN", "DURHAM", "DURKIN", "DURR", "DUTTON", - "DUVAL", "DUVALL", "DWYER", "DYE", "DYER", "DYKES", "DYSON", "EAGLE", "EARL", "EARLE", "EARLEY", "EARLS", - "EARLY", "EARNEST", "EASLEY", "EASON", "EAST", "EASTER", "EASTERLING", "EASTMAN", "EASTON", "EATON", - "EAVES", "EBERT", "ECHEVARRIA", "ECHOLS", "ECKERT", "EDDY", "EDGAR", "EDGE", "EDMOND", "EDMONDS", - "EDMONDSON", "EDWARD", "EDWARDS", "EGAN", "EGGLESTON", "ELAM", "ELDER", "ELDRIDGE", "ELIAS", "ELIZONDO", - "ELKINS", "ELLER", "ELLINGTON", "ELLIOT", "ELLIOTT", "ELLIS", "ELLISON", "ELLSWORTH", "ELMORE", "ELROD", - "ELSTON", "ELY", "EMANUEL", "EMBRY", "EMERSON", "EMERY", "EMMONS", "ENG", "ENGEL", "ENGLAND", "ENGLE", - "ENGLISH", "ENNIS", "ENOS", "ENRIGHT", "ENRIQUEZ", "EPPERSON", "EPPS", "EPSTEIN", "ERDMANN", "ERICKSON", - "ERNST", "ERVIN", "ERWIN", "ESCALANTE", "ESCAMILLA", "ESCOBAR", "ESCOBEDO", "ESPARZA", "ESPINAL", "ESPINO", - "ESPINOSA", "ESPINOZA", "ESPOSITO", "ESQUIVEL", "ESTEP", "ESTES", "ESTRADA", "ESTRELLA", "ETHERIDGE", - "ETHRIDGE", "EUBANKS", "EVANS", "EVERETT", "EVERHART", "EVERS", "EVERSON", "EWING", "EZELL", "FABER", - "FABIAN", "FAGAN", "FAHEY", "FAIN", "FAIR", "FAIRBANKS", "FAIRCHILD", "FAIRLEY", "FAISON", "FAJARDO", - "FALCON", "FALK", "FALLON", "FALLS", "FANNING", "FARIAS", "FARLEY", "FARMER", "FARNSWORTH", "FARR", - "FARRAR", "FARRELL", "FARRINGTON", "FARRIS", "FARROW", "FAULK", "FAULKNER", "FAUST", "FAY", "FEENEY", - "FELDER", "FELDMAN", "FELICIANO", "FELIX", "FELLOWS", "FELTON", "FELTS", "FENNELL", "FENNER", "FENTON", - "FERGUSON", "FERNANDES", "FERNANDEZ", "FERRARA", "FERRARI", "FERRARO", "FERREIRA", "FERRELL", "FERRER", - "FERRIS", "FERRY", "FIELD", "FIELDER", "FIELDS", "FIERRO", "FIFE", "FIGUEROA", "FINCH", "FINCHER", - "FINDLEY", "FINE", "FINK", "FINLEY", "FINN", "FINNEGAN", "FINNEY", "FIORE", "FISCHER", "FISH", "FISHER", - "FISHMAN", "FISK", "FITCH", "FITE", "FITTS", "FITZGERALD", "FITZPATRICK", "FITZSIMMONS", "FLAGG", - "FLAHERTY", "FLANAGAN", "FLANDERS", "FLANIGAN", "FLANNERY", "FLECK", "FLEMING", "FLEMMING", "FLETCHER", - "FLINT", "FLOOD", "FLORA", "FLORENCE", "FLORES", "FLOREZ", "FLOURNOY", "FLOWERS", "FLOYD", "FLYNN", - "FOGARTY", "FOGG", "FOGLE", "FOLEY", "FOLSE", "FOLSOM", "FOLTZ", "FONG", "FONSECA", "FONTAINE", "FONTENOT", - "FOOTE", "FORBES", "FORD", "FOREMAN", "FOREST", "FORET", "FORMAN", "FORNEY", "FORREST", "FORRESTER", - "FORSTER", "FORSYTH", "FORSYTHE", "FORT", "FORTE", "FORTENBERRY", "FORTIER", "FORTIN", "FORTNER", "FORTUNE", - "FOSS", "FOSTER", "FOUNTAIN", "FOURNIER", "FOUST", "FOWLER", "FOX", "FOY", "FRALEY", "FRAME", "FRANCE", - "FRANCIS", "FRANCISCO", "FRANCO", "FRANCOIS", "FRANK", "FRANKLIN", "FRANKS", "FRANTZ", "FRANZ", "FRASER", - "FRASIER", "FRAZER", "FRAZIER", "FREDERICK", "FREDERICKS", "FREDRICK", "FREDRICKSON", "FREE", "FREED", - "FREEDMAN", "FREEMAN", "FREESE", "FREITAS", "FRENCH", "FREUND", "FREY", "FRIAS", "FRICK", "FRIEDMAN", - "FRIEND", "FRIERSON", "FRIES", "FRITZ", "FRIZZELL", "FROST", "FRY", "FRYE", "FRYER", "FUCHS", "FUENTES", - "FUGATE", "FULCHER", "FULLER", "FULLERTON", "FULMER", "FULTON", "FULTZ", "FUNDERBURK", "FUNK", "FUQUA", - "FURMAN", "FURR", "FUSCO", "GABLE", "GABRIEL", "GADDIS", "GADDY", "GAFFNEY", "GAGE", "GAGNE", "GAGNON", - "GAINES", "GAINEY", "GAITHER", "GALARZA", "GALBRAITH", "GALE", "GALINDO", "GALLAGHER", "GALLANT", - "GALLARDO", "GALLEGOS", "GALLO", "GALLOWAY", "GALVAN", "GALVEZ", "GALVIN", "GAMBLE", "GAMBOA", "GAMEZ", - "GANDY", "GANN", "GANNON", "GANT", "GANTT", "GARAY", "GARBER", "GARCIA", "GARDINER", "GARDNER", "GARLAND", - "GARMON", "GARNER", "GARNETT", "GARRETT", "GARRIS", "GARRISON", "GARVEY", "GARVIN", "GARY", "GARZA", - "GASKIN", "GASKINS", "GASS", "GASTON", "GATES", "GATEWOOD", "GATLIN", "GAULT", "GAUTHIER", "GAVIN", "GAY", - "GAYLORD", "GEARY", "GEE", "GEER", "GEIGER", "GENTILE", "GENTRY", "GEORGE", "GERALD", "GERARD", "GERBER", - "GERMAN", "GETZ", "GIBBONS", "GIBBS", "GIBSON", "GIFFORD", "GIL", "GILBERT", "GILBERTSON", "GILBREATH", - "GILCHRIST", "GILES", "GILL", "GILLEN", "GILLESPIE", "GILLETTE", "GILLEY", "GILLIAM", "GILLILAND", "GILLIS", - "GILMAN", "GILMER", "GILMORE", "GILSON", "GINN", "GIORDANO", "GIPSON", "GIRARD", "GIRON", "GIROUX", "GIST", - "GIVENS", "GLADDEN", "GLADNEY", "GLASER", "GLASGOW", "GLASS", "GLAZE", "GLEASON", "GLENN", "GLOVER", - "GLYNN", "GOAD", "GOBLE", "GODDARD", "GODFREY", "GODINEZ", "GODWIN", "GOEBEL", "GOETZ", "GOFF", "GOFORTH", - "GOINS", "GOLD", "GOLDBERG", "GOLDEN", "GOLDMAN", "GOLDSMITH", "GOLDSTEIN", "GOMES", "GOMEZ", "GONSALVES", - "GONZALES", "GONZALEZ", "GOOCH", "GOOD", "GOODE", "GOODEN", "GOODIN", "GOODING", "GOODMAN", "GOODRICH", - "GOODSON", "GOODWIN", "GOOLSBY", "GORDON", "GORE", "GORHAM", "GORMAN", "GOSS", "GOSSETT", "GOUGH", "GOULD", - "GOULET", "GRACE", "GRACIA", "GRADY", "GRAF", "GRAFF", "GRAGG", "GRAHAM", "GRANADOS", "GRANGER", "GRANT", - "GRANTHAM", "GRAVES", "GRAY", "GRAYSON", "GREATHOUSE", "GRECO", "GREEN", "GREENBERG", "GREENE", - "GREENFIELD", "GREENLEE", "GREENWOOD", "GREER", "GREGG", "GREGORY", "GREINER", "GRENIER", "GRESHAM", "GREY", - "GRICE", "GRIDER", "GRIER", "GRIFFIN", "GRIFFIS", "GRIFFITH", "GRIFFITHS", "GRIGGS", "GRIGSBY", "GRIMES", - "GRIMM", "GRISHAM", "GRISSOM", "GRISWOLD", "GROCE", "GROGAN", "GROOMS", "GROSS", "GROSSMAN", "GROVE", - "GROVER", "GROVES", "GRUBB", "GRUBBS", "GRUBER", "GUAJARDO", "GUENTHER", "GUERIN", "GUERRA", "GUERRERO", - "GUESS", "GUEST", "GUEVARA", "GUFFEY", "GUIDRY", "GUILLEN", "GUILLORY", "GUINN", "GULLEY", "GUNDERSON", - "GUNN", "GUNTER", "GUNTHER", "GURLEY", "GUSTAFSON", "GUTHRIE", "GUTIERREZ", "GUY", "GUYTON", "GUZMAN", "HA", - "HAAG", "HAAS", "HAASE", "HACKER", "HACKETT", "HACKNEY", "HADDEN", "HADLEY", "HAGAN", "HAGEN", "HAGER", - "HAGGARD", "HAGGERTY", "HAHN", "HAIGHT", "HAILEY", "HAINES", "HAIR", "HAIRSTON", "HALCOMB", "HALE", "HALES", - "HALEY", "HALL", "HALLER", "HALLMAN", "HALSEY", "HALSTEAD", "HALVERSON", "HAM", "HAMBLIN", "HAMBY", "HAMEL", - "HAMER", "HAMILTON", "HAMLIN", "HAMM", "HAMMER", "HAMMETT", "HAMMOND", "HAMMONDS", "HAMMONS", "HAMPTON", - "HAMRICK", "HAN", "HANCOCK", "HAND", "HANDLEY", "HANDY", "HANES", "HANEY", "HANKINS", "HANKS", "HANLEY", - "HANLON", "HANNA", "HANNAH", "HANNAN", "HANNON", "HANSEN", "HANSON", "HARBIN", "HARDAWAY", "HARDEE", - "HARDEN", "HARDER", "HARDESTY", "HARDIN", "HARDING", "HARDISON", "HARDMAN", "HARDWICK", "HARDY", "HARE", - "HARGIS", "HARGRAVE", "HARGROVE", "HARKINS", "HARLAN", "HARLEY", "HARLOW", "HARMAN", "HARMON", "HARMS", - "HARNESS", "HARP", "HARPER", "HARR", "HARRELL", "HARRINGTON", "HARRIS", "HARRISON", "HARRY", "HART", - "HARTER", "HARTLEY", "HARTMAN", "HARTMANN", "HARTWELL", "HARVEY", "HARWELL", "HARWOOD", "HASKELL", - "HASKINS", "HASS", "HASSELL", "HASTINGS", "HATCH", "HATCHER", "HATCHETT", "HATFIELD", "HATHAWAY", "HATLEY", - "HATTON", "HAUGEN", "HAUSER", "HAVENS", "HAWES", "HAWK", "HAWKINS", "HAWKS", "HAWLEY", "HAWTHORNE", "HAY", - "HAYDEN", "HAYES", "HAYNES", "HAYS", "HAYWARD", "HAYWOOD", "HAZEL", "HEAD", "HEADLEY", "HEADRICK", "HEALEY", - "HEALY", "HEARD", "HEARN", "HEATH", "HEATON", "HEBERT", "HECK", "HECKMAN", "HEDGES", "HEDRICK", "HEFFNER", - "HEFLIN", "HEFNER", "HEIM", "HEIN", "HEINRICH", "HEINZ", "HELD", "HELLER", "HELM", "HELMS", "HELTON", - "HEMBREE", "HEMPHILL", "HENDERSON", "HENDON", "HENDRICK", "HENDRICKS", "HENDRICKSON", "HENDRIX", "HENKE", - "HENLEY", "HENNESSEY", "HENNING", "HENRY", "HENSLEY", "HENSON", "HER", "HERBERT", "HEREDIA", "HERMAN", - "HERMANN", "HERNANDEZ", "HERNDON", "HERR", "HERRERA", "HERRICK", "HERRIN", "HERRING", "HERRINGTON", - "HERRMANN", "HERRON", "HERSHBERGER", "HERZOG", "HESS", "HESTER", "HEWITT", "HEYWARD", "HIATT", "HIBBARD", - "HICKEY", "HICKMAN", "HICKS", "HICKSON", "HIDALGO", "HIGDON", "HIGGINBOTHAM", "HIGGINS", "HIGGS", "HIGH", - "HIGHTOWER", "HILDEBRAND", "HILDRETH", "HILL", "HILLARD", "HILLER", "HILLIARD", "HILLMAN", "HILLS", - "HILTON", "HIMES", "HINDMAN", "HINDS", "HINES", "HINKLE", "HINOJOSA", "HINSON", "HINTON", "HIRSCH", - "HITCHCOCK", "HITE", "HITT", "HO", "HOANG", "HOBBS", "HOBSON", "HODGE", "HODGES", "HODGSON", "HOFF", - "HOFFMAN", "HOFFMANN", "HOGAN", "HOGG", "HOGUE", "HOKE", "HOLBROOK", "HOLCOMB", "HOLCOMBE", "HOLDEN", - "HOLDER", "HOLGUIN", "HOLIDAY", "HOLLAND", "HOLLENBECK", "HOLLEY", "HOLLIDAY", "HOLLINGSWORTH", "HOLLINS", - "HOLLIS", "HOLLOMAN", "HOLLOWAY", "HOLLY", "HOLM", "HOLMAN", "HOLMES", "HOLT", "HOLTON", "HOLTZ", "HOMAN", - "HOMER", "HONEYCUTT", "HONG", "HOOD", "HOOK", "HOOKER", "HOOKS", "HOOPER", "HOOVER", "HOPE", "HOPKINS", - "HOPPE", "HOPPER", "HOPSON", "HORAN", "HORN", "HORNE", "HORNER", "HORNSBY", "HOROWITZ", "HORSLEY", "HORTON", - "HORVATH", "HOSKINS", "HOSTETLER", "HOUCK", "HOUGH", "HOUGHTON", "HOULE", "HOUSE", "HOUSER", "HOUSTON", - "HOWARD", "HOWE", "HOWELL", "HOWERTON", "HOWES", "HOWLAND", "HOY", "HOYLE", "HOYT", "HSU", "HUANG", - "HUBBARD", "HUBER", "HUBERT", "HUDDLESTON", "HUDGENS", "HUDGINS", "HUDSON", "HUERTA", "HUEY", "HUFF", - "HUFFMAN", "HUGGINS", "HUGHES", "HUGHEY", "HULL", "HULSEY", "HUMES", "HUMMEL", "HUMPHREY", "HUMPHREYS", - "HUMPHRIES", "HUNDLEY", "HUNT", "HUNTER", "HUNTINGTON", "HUNTLEY", "HURD", "HURLEY", "HURST", "HURT", - "HURTADO", "HUSKEY", "HUSSEY", "HUSTON", "HUTCHENS", "HUTCHERSON", "HUTCHESON", "HUTCHINGS", "HUTCHINS", - "HUTCHINSON", "HUTCHISON", "HUTSON", "HUTTO", "HUTTON", "HUYNH", "HWANG", "HYATT", "HYDE", "HYLAND", - "HYLTON", "HYMAN", "HYNES", "IBARRA", "INGLE", "INGRAHAM", "INGRAM", "INMAN", "IRBY", "IRELAND", "IRISH", - "IRIZARRY", "IRONS", "IRVIN", "IRVINE", "IRVING", "IRWIN", "ISAAC", "ISAACS", "ISAACSON", "ISBELL", "ISOM", - "ISON", "ISRAEL", "IVERSON", "IVES", "IVEY", "IVORY", "IVY", "JACK", "JACKMAN", "JACKS", "JACKSON", "JACOB", - "JACOBS", "JACOBSEN", "JACOBSON", "JACOBY", "JACQUES", "JAEGER", "JAMES", "JAMESON", "JAMISON", "JANES", - "JANKOWSKI", "JANSEN", "JANSSEN", "JARAMILLO", "JARRELL", "JARRETT", "JARVIS", "JASPER", "JAY", "JAYNES", - "JEAN", "JEFFERIES", "JEFFERS", "JEFFERSON", "JEFFERY", "JEFFREY", "JEFFRIES", "JENKINS", "JENNINGS", - "JENSEN", "JENSON", "JERNIGAN", "JESSUP", "JETER", "JETT", "JEWELL", "JEWETT", "JIMENEZ", "JOBE", "JOE", - "JOHANSEN", "JOHN", "JOHNS", "JOHNSON", "JOHNSTON", "JOINER", "JOLLEY", "JOLLY", "JONES", "JORDAN", - "JORDON", "JORGENSEN", "JORGENSON", "JOSE", "JOSEPH", "JOY", "JOYCE", "JOYNER", "JUAREZ", "JUDD", "JUDE", - "JUDGE", "JUDKINS", "JULIAN", "JUNG", "JUSTICE", "JUSTUS", "KAHN", "KAISER", "KAMINSKI", "KANE", "KANG", - "KAPLAN", "KARR", "KASPER", "KATZ", "KAUFFMAN", "KAUFMAN", "KAY", "KAYE", "KEANE", "KEARNEY", "KEARNS", - "KEATING", "KEATON", "KECK", "KEE", "KEEFE", "KEEFER", "KEEGAN", "KEEL", "KEELER", "KEELING", "KEEN", - "KEENAN", "KEENE", "KEENER", "KEENEY", "KEETON", "KEITH", "KELLEHER", "KELLER", "KELLEY", "KELLOGG", - "KELLUM", "KELLY", "KELSEY", "KELSO", "KEMP", "KEMPER", "KENDALL", "KENDRICK", "KENNEDY", "KENNEY", "KENNY", - "KENT", "KENYON", "KERN", "KERNS", "KERR", "KESSLER", "KETCHUM", "KEY", "KEYES", "KEYS", "KEYSER", "KHAN", - "KIDD", "KIDWELL", "KIEFER", "KILGORE", "KILLIAN", "KILPATRICK", "KIM", "KIMBALL", "KIMBLE", "KIMBRELL", - "KIMBROUGH", "KIMMEL", "KINARD", "KINCAID", "KINDER", "KING", "KINGSLEY", "KINNEY", "KINSEY", "KIRBY", - "KIRCHNER", "KIRK", "KIRKLAND", "KIRKPATRICK", "KIRKWOOD", "KISER", "KISH", "KITCHEN", "KITCHENS", "KLEIN", - "KLINE", "KLINGER", "KNAPP", "KNIGHT", "KNOLL", "KNOTT", "KNOTTS", "KNOWLES", "KNOWLTON", "KNOX", "KNUDSEN", - "KNUDSON", "KNUTSON", "KOCH", "KOEHLER", "KOENIG", "KOHL", "KOHLER", "KOHN", "KOLB", "KONG", "KOONCE", - "KOONTZ", "KOPP", "KOVACH", "KOWALSKI", "KOZAK", "KOZLOWSKI", "KRAFT", "KRAMER", "KRAUS", "KRAUSE", - "KRAUSS", "KREBS", "KRIEGER", "KROLL", "KRUEGER", "KRUG", "KRUGER", "KRUSE", "KUHN", "KUNKEL", "KUNTZ", - "KUNZ", "KURTZ", "KUYKENDALL", "KYLE", "LABBE", "LABELLE", "LACEY", "LACHANCE", "LACKEY", "LACROIX", "LACY", - "LADD", "LADNER", "LAFFERTY", "LAFLAMME", "LAFLEUR", "LAI", "LAIRD", "LAKE", "LAM", "LAMAR", "LAMB", - "LAMBERT", "LAMM", "LANCASTER", "LANCE", "LAND", "LANDERS", "LANDIS", "LANDON", "LANDRUM", "LANDRY", "LANE", - "LANEY", "LANG", "LANGDON", "LANGE", "LANGER", "LANGFORD", "LANGLEY", "LANGLOIS", "LANGSTON", "LANHAM", - "LANIER", "LANKFORD", "LANNING", "LANTZ", "LAPLANTE", "LAPOINTE", "LAPORTE", "LARA", "LARGE", "LARKIN", - "LAROCHE", "LAROSE", "LARRY", "LARSEN", "LARSON", "LARUE", "LASH", "LASHLEY", "LASSITER", "LASTER", - "LATHAM", "LATIMER", "LATTIMORE", "LAU", "LAUER", "LAUGHLIN", "LAVENDER", "LAVIGNE", "LAVOIE", "LAW", - "LAWHORN", "LAWLER", "LAWLESS", "LAWRENCE", "LAWS", "LAWSON", "LAWTON", "LAY", "LAYMAN", "LAYNE", "LAYTON", - "LE", "LEA", "LEACH", "LEAHY", "LEAK", "LEAKE", "LEAL", "LEAR", "LEARY", "LEAVITT", "LEBLANC", "LEBRON", - "LECLAIR", "LEDBETTER", "LEDESMA", "LEDFORD", "LEDOUX", "LEE", "LEEPER", "LEES", "LEFEBVRE", "LEGER", - "LEGG", "LEGGETT", "LEHMAN", "LEHMANN", "LEIGH", "LEIGHTON", "LEMASTER", "LEMAY", "LEMIEUX", "LEMKE", - "LEMMON", "LEMON", "LEMONS", "LEMUS", "LENNON", "LENTZ", "LENZ", "LEON", "LEONARD", "LEONE", "LERMA", - "LERNER", "LEROY", "LESLIE", "LESSARD", "LESTER", "LEUNG", "LEVESQUE", "LEVI", "LEVIN", "LEVINE", "LEVY", - "LEW", "LEWANDOWSKI", "LEWIS", "LEYVA", "LI", "LIBBY", "LIDDELL", "LIEBERMAN", "LIGHT", "LIGHTFOOT", - "LIGHTNER", "LIGON", "LILES", "LILLEY", "LILLY", "LIM", "LIMA", "LIMON", "LIN", "LINARES", "LINCOLN", - "LIND", "LINDBERG", "LINDER", "LINDGREN", "LINDLEY", "LINDQUIST", "LINDSAY", "LINDSEY", "LINDSTROM", "LINK", - "LINKOUS", "LINN", "LINTON", "LINVILLE", "LIPSCOMB", "LIRA", "LISTER", "LITTLE", "LITTLEFIELD", - "LITTLEJOHN", "LITTLETON", "LIU", "LIVELY", "LIVINGSTON", "LLOYD", "LO", "LOCKE", "LOCKETT", "LOCKHART", - "LOCKLEAR", "LOCKWOOD", "LOERA", "LOFTIN", "LOFTIS", "LOFTON", "LOGAN", "LOGSDON", "LOGUE", "LOMAX", - "LOMBARD", "LOMBARDI", "LOMBARDO", "LONDON", "LONG", "LONGO", "LONGORIA", "LOOMIS", "LOONEY", "LOPER", - "LOPES", "LOPEZ", "LORD", "LORENZ", "LORENZO", "LOTT", "LOUIS", "LOVE", "LOVEJOY", "LOVELACE", "LOVELESS", - "LOVELL", "LOVETT", "LOVING", "LOW", "LOWE", "LOWELL", "LOWERY", "LOWMAN", "LOWRY", "LOY", "LOYA", "LOYD", - "LOZANO", "LU", "LUCAS", "LUCE", "LUCERO", "LUCIANO", "LUCKETT", "LUDWIG", "LUGO", "LUIS", "LUJAN", "LUKE", - "LUMPKIN", "LUNA", "LUND", "LUNDBERG", "LUNDY", "LUNSFORD", "LUONG", "LUSK", "LUSTER", "LUTHER", "LUTTRELL", - "LUTZ", "LY", "LYLE", "LYLES", "LYMAN", "LYNCH", "LYNN", "LYON", "LYONS", "LYTLE", "MA", "MAAS", "MABE", - "MABRY", "MACDONALD", "MACE", "MACHADO", "MACIAS", "MACK", "MACKAY", "MACKENZIE", "MACKEY", "MACKIE", - "MACKLIN", "MACLEAN", "MACLEOD", "MACON", "MADDEN", "MADDOX", "MADERA", "MADISON", "MADRID", "MADRIGAL", - "MADSEN", "MAES", "MAESTAS", "MAGANA", "MAGEE", "MAGGARD", "MAGNUSON", "MAGUIRE", "MAHAFFEY", "MAHAN", - "MAHER", "MAHON", "MAHONEY", "MAIER", "MAIN", "MAJOR", "MAJORS", "MAKI", "MALCOLM", "MALDONADO", "MALLEY", - "MALLORY", "MALLOY", "MALONE", "MALONEY", "MANCINI", "MANCUSO", "MANESS", "MANGUM", "MANLEY", "MANN", - "MANNING", "MANNS", "MANSFIELD", "MANSON", "MANUEL", "MANZO", "MAPLE", "MAPLES", "MARBLE", "MARCH", - "MARCHAND", "MARCOTTE", "MARCUM", "MARCUS", "MARES", "MARIN", "MARINO", "MARION", "MARK", "MARKHAM", - "MARKLEY", "MARKS", "MARLER", "MARLOW", "MARLOWE", "MARQUEZ", "MARQUIS", "MARR", "MARRERO", "MARROQUIN", - "MARSH", "MARSHALL", "MARTEL", "MARTELL", "MARTENS", "MARTIN", "MARTINDALE", "MARTINEZ", "MARTINO", - "MARTINS", "MARTINSON", "MARTZ", "MARVIN", "MARX", "MASON", "MASSEY", "MASSIE", "MAST", "MASTERS", - "MASTERSON", "MATA", "MATHENY", "MATHESON", "MATHEWS", "MATHIAS", "MATHIS", "MATLOCK", "MATNEY", "MATOS", - "MATSON", "MATTESON", "MATTHEW", "MATTHEWS", "MATTINGLY", "MATTISON", "MATTOS", "MATTOX", "MATTSON", - "MAULDIN", "MAUPIN", "MAURER", "MAURO", "MAXEY", "MAXFIELD", "MAXWELL", "MAY", "MAYBERRY", "MAYER", - "MAYERS", "MAYES", "MAYFIELD", "MAYHEW", "MAYNARD", "MAYO", "MAYS", "MAZZA", "MCADAMS", "MCAFEE", - "MCALISTER", "MCALLISTER", "MCARTHUR", "MCBEE", "MCBRIDE", "MCCABE", "MCCAFFREY", "MCCAIN", "MCCALL", - "MCCALLISTER", "MCCALLUM", "MCCANN", "MCCANTS", "MCCARTER", "MCCARTHY", "MCCARTNEY", "MCCARTY", "MCCASKILL", - "MCCAULEY", "MCCLAIN", "MCCLANAHAN", "MCCLARY", "MCCLEARY", "MCCLELLAN", "MCCLELLAND", "MCCLENDON", - "MCCLINTOCK", "MCCLINTON", "MCCLOSKEY", "MCCLOUD", "MCCLUNG", "MCCLURE", "MCCOLLUM", "MCCOMBS", "MCCONNELL", - "MCCOOL", "MCCORD", "MCCORKLE", "MCCORMACK", "MCCORMICK", "MCCOY", "MCCRACKEN", "MCCRARY", "MCCRAY", - "MCCREARY", "MCCUE", "MCCULLOCH", "MCCULLOUGH", "MCCUNE", "MCCURDY", "MCCURRY", "MCCUTCHEON", "MCDADE", - "MCDANIEL", "MCDANIELS", "MCDERMOTT", "MCDONALD", "MCDONNELL", "MCDONOUGH", "MCDOUGAL", "MCDOUGALL", - "MCDOWELL", "MCDUFFIE", "MCELROY", "MCEWEN", "MCFADDEN", "MCFALL", "MCFARLAND", "MCFARLANE", "MCGEE", - "MCGEHEE", "MCGHEE", "MCGILL", "MCGINNIS", "MCGOVERN", "MCGOWAN", "MCGRATH", "MCGRAW", "MCGREGOR", "MCGREW", - "MCGRIFF", "MCGUIRE", "MCHENRY", "MCHUGH", "MCINNIS", "MCINTIRE", "MCINTOSH", "MCINTYRE", "MCKAY", "MCKEE", - "MCKEEVER", "MCKENNA", "MCKENNEY", "MCKENZIE", "MCKEON", "MCKEOWN", "MCKINLEY", "MCKINNEY", "MCKINNON", - "MCKNIGHT", "MCLAIN", "MCLAUGHLIN", "MCLAURIN", "MCLEAN", "MCLEMORE", "MCLENDON", "MCLEOD", "MCMAHAN", - "MCMAHON", "MCMANUS", "MCMASTER", "MCMILLAN", "MCMILLEN", "MCMILLIAN", "MCMULLEN", "MCMURRAY", "MCNABB", - "MCNAIR", "MCNALLY", "MCNAMARA", "MCNEAL", "MCNEELY", "MCNEIL", "MCNEILL", "MCNULTY", "MCNUTT", "MCPHERSON", - "MCQUEEN", "MCRAE", "MCREYNOLDS", "MCSWAIN", "MCVAY", "MCVEY", "MCWHORTER", "MCWILLIAMS", "MEACHAM", "MEAD", - "MEADE", "MEADOR", "MEADOWS", "MEANS", "MEARS", "MEDEIROS", "MEDINA", "MEDLEY", "MEDLIN", "MEDLOCK", - "MEDRANO", "MEEHAN", "MEEK", "MEEKER", "MEEKS", "MEIER", "MEJIA", "MELANCON", "MELENDEZ", "MELLO", "MELTON", - "MELVIN", "MENA", "MENARD", "MENDENHALL", "MENDEZ", "MENDOZA", "MENENDEZ", "MERCADO", "MERCER", "MERCHANT", - "MERCIER", "MEREDITH", "MERRELL", "MERRICK", "MERRILL", "MERRIMAN", "MERRITT", "MESA", "MESSENGER", - "MESSER", "MESSINA", "METCALF", "METZ", "METZGER", "METZLER", "MEYER", "MEYERS", "MEZA", "MICHAEL", - "MICHAELS", "MICHAUD", "MICHEL", "MICKENS", "MIDDLETON", "MILAM", "MILBURN", "MILES", "MILLARD", "MILLER", - "MILLIGAN", "MILLIKEN", "MILLS", "MILNE", "MILNER", "MILTON", "MIMS", "MINER", "MINNICK", "MINOR", "MINTER", - "MINTON", "MINTZ", "MIRANDA", "MIRELES", "MITCHELL", "MIXON", "MIZE", "MOBLEY", "MOCK", "MOE", "MOELLER", - "MOEN", "MOFFETT", "MOFFITT", "MOHR", "MOJICA", "MOLINA", "MOLL", "MONACO", "MONAGHAN", "MONAHAN", "MONEY", - "MONIZ", "MONK", "MONROE", "MONSON", "MONTAGUE", "MONTALVO", "MONTANEZ", "MONTANO", "MONTEMAYOR", "MONTERO", - "MONTES", "MONTEZ", "MONTGOMERY", "MONTOYA", "MOODY", "MOON", "MOONEY", "MOORE", "MOORMAN", "MORA", - "MORALES", "MORAN", "MOREAU", "MOREHEAD", "MORELAND", "MORENO", "MOREY", "MORGAN", "MORIARTY", "MORIN", - "MORLEY", "MORRELL", "MORRILL", "MORRIS", "MORRISON", "MORRISSEY", "MORROW", "MORSE", "MORTENSEN", "MORTON", - "MOSBY", "MOSELEY", "MOSER", "MOSES", "MOSHER", "MOSIER", "MOSLEY", "MOSS", "MOTLEY", "MOTT", "MOULTON", - "MOULTRIE", "MOUNT", "MOWERY", "MOYA", "MOYE", "MOYER", "MUELLER", "MUHAMMAD", "MUIR", "MULKEY", "MULL", - "MULLEN", "MULLER", "MULLIGAN", "MULLIN", "MULLINS", "MULLIS", "MUNCY", "MUNDY", "MUNIZ", "MUNN", "MUNOZ", - "MUNSON", "MURDOCK", "MURILLO", "MURPHY", "MURRAY", "MURRELL", "MURRY", "MUSE", "MUSGROVE", "MUSSER", - "MYERS", "MYLES", "MYRICK", "NABORS", "NADEAU", "NAGEL", "NAGLE", "NAGY", "NAJERA", "NAKAMURA", "NALL", - "NANCE", "NAPIER", "NAQUIN", "NARANJO", "NARVAEZ", "NASH", "NATHAN", "NATION", "NAVA", "NAVARRETE", - "NAVARRO", "NAYLOR", "NEAL", "NEALY", "NEEDHAM", "NEEL", "NEELEY", "NEELY", "NEFF", "NEGRETE", "NEGRON", - "NEIL", "NEILL", "NELMS", "NELSON", "NESBITT", "NESMITH", "NESS", "NESTOR", "NETTLES", "NEUMAN", "NEUMANN", - "NEVAREZ", "NEVILLE", "NEW", "NEWBERRY", "NEWBY", "NEWCOMB", "NEWELL", "NEWKIRK", "NEWMAN", "NEWSOM", - "NEWSOME", "NEWTON", "NG", "NGO", "NGUYEN", "NICHOLAS", "NICHOLS", "NICHOLSON", "NICKEL", "NICKERSON", - "NIELSEN", "NIELSON", "NIETO", "NIEVES", "NILES", "NIX", "NIXON", "NOBLE", "NOBLES", "NOE", "NOEL", "NOLAN", - "NOLAND", "NOLEN", "NOLL", "NOONAN", "NORFLEET", "NORIEGA", "NORMAN", "NORRIS", "NORTH", "NORTON", - "NORWOOD", "NOVAK", "NOVOTNY", "NOWAK", "NOWLIN", "NOYES", "NUGENT", "NULL", "NUMBERS", "NUNES", "NUNEZ", - "NUNLEY", "NUNN", "NUTT", "NUTTER", "NYE", "OAKES", "OAKLEY", "OAKS", "OATES", "OBRIEN", "OBRYAN", "OCAMPO", - "OCASIO", "OCHOA", "OCHS", "OCONNELL", "OCONNER", "OCONNOR", "ODELL", "ODEN", "ODOM", "ODONNELL", "ODUM", - "OGDEN", "OGLE", "OGLESBY", "OH", "OHARA", "OJEDA", "OKEEFE", "OLDHAM", "OLDS", "OLEARY", "OLIPHANT", - "OLIVA", "OLIVARES", "OLIVAREZ", "OLIVAS", "OLIVE", "OLIVEIRA", "OLIVER", "OLIVO", "OLMSTEAD", "OLSEN", - "OLSON", "OLVERA", "OMALLEY", "ONEAL", "ONEIL", "ONEILL", "ONTIVEROS", "ORDONEZ", "OREILLY", "ORELLANA", - "ORLANDO", "ORNELAS", "OROSCO", "OROURKE", "OROZCO", "ORR", "ORTA", "ORTEGA", "ORTIZ", "OSBORN", "OSBORNE", - "OSBURN", "OSGOOD", "OSHEA", "OSORIO", "OSTEEN", "OSTRANDER", "OSULLIVAN", "OSWALD", "OSWALT", "OTERO", - "OTIS", "OTOOLE", "OTT", "OTTO", "OUELLETTE", "OUTLAW", "OVERBY", "OVERSTREET", "OVERTON", "OWEN", "OWENS", - "PACE", "PACHECO", "PACK", "PACKARD", "PACKER", "PADGETT", "PADILLA", "PAGAN", "PAGE", "PAIGE", "PAINE", - "PAINTER", "PAK", "PALACIOS", "PALMA", "PALMER", "PALUMBO", "PANNELL", "PANTOJA", "PAPE", "PAPPAS", - "PAQUETTE", "PARADIS", "PARDO", "PAREDES", "PARENT", "PARHAM", "PARIS", "PARISH", "PARK", "PARKER", - "PARKINSON", "PARKS", "PARNELL", "PARR", "PARRA", "PARRIS", "PARRISH", "PARROTT", "PARRY", "PARSON", - "PARSONS", "PARTIN", "PARTRIDGE", "PASSMORE", "PATE", "PATEL", "PATERSON", "PATINO", "PATRICK", "PATTEN", - "PATTERSON", "PATTON", "PAUL", "PAULEY", "PAULSEN", "PAULSON", "PAXTON", "PAYNE", "PAYTON", "PAZ", "PEACE", - "PEACHEY", "PEACOCK", "PEAK", "PEARCE", "PEARSON", "PEASE", "PECK", "PEDERSEN", "PEDERSON", "PEEBLES", - "PEEK", "PEEL", "PEELER", "PEEPLES", "PELLETIER", "PELTIER", "PEMBERTON", "PENA", "PENCE", "PENDER", - "PENDERGRASS", "PENDLETON", "PENN", "PENNELL", "PENNINGTON", "PENNY", "PEOPLES", "PEPPER", "PERALES", - "PERALTA", "PERDUE", "PEREA", "PEREIRA", "PEREZ", "PERKINS", "PERREAULT", "PERRIN", "PERRON", "PERRY", - "PERRYMAN", "PERSON", "PETER", "PETERMAN", "PETERS", "PETERSEN", "PETERSON", "PETIT", "PETRIE", "PETTIGREW", - "PETTIS", "PETTIT", "PETTWAY", "PETTY", "PEYTON", "PFEIFER", "PFEIFFER", "PHAM", "PHAN", "PHELAN", "PHELPS", - "PHIFER", "PHILLIPS", "PHIPPS", "PICARD", "PICKARD", "PICKENS", "PICKERING", "PICKETT", "PIERCE", "PIERRE", - "PIERSON", "PIKE", "PILCHER", "PIMENTEL", "PINA", "PINCKNEY", "PINEDA", "PINKERTON", "PINKSTON", "PINO", - "PINSON", "PINTO", "PIPER", "PIPKIN", "PIPPIN", "PITMAN", "PITRE", "PITT", "PITTMAN", "PITTS", "PLACE", - "PLANTE", "PLATT", "PLEASANT", "PLUMMER", "PLUNKETT", "POE", "POGUE", "POINDEXTER", "POINTER", "POIRIER", - "POLANCO", "POLAND", "POLING", "POLK", "POLLACK", "POLLARD", "POLLOCK", "POMEROY", "PONCE", "POND", - "PONDER", "POOL", "POOLE", "POORE", "POPE", "POPP", "PORTER", "PORTERFIELD", "PORTILLO", "POSEY", "POST", - "POSTON", "POTTER", "POTTS", "POULIN", "POUNDS", "POWELL", "POWER", "POWERS", "PRADO", "PRATER", "PRATHER", - "PRATT", "PRENTICE", "PRESCOTT", "PRESLEY", "PRESSLEY", "PRESTON", "PREWITT", "PRICE", "PRICHARD", "PRIDE", - "PRIDGEN", "PRIEST", "PRIETO", "PRINCE", "PRINGLE", "PRITCHARD", "PRITCHETT", "PROCTOR", "PROFFITT", - "PROSSER", "PROVOST", "PRUETT", "PRUITT", "PRYOR", "PUCKETT", "PUENTE", "PUGH", "PULIDO", "PULLEN", - "PULLEY", "PULLIAM", "PURCELL", "PURDY", "PURNELL", "PURVIS", "PUTMAN", "PUTNAM", "PYLE", "QUALLS", - "QUARLES", "QUEEN", "QUEZADA", "QUICK", "QUIGLEY", "QUILLEN", "QUINLAN", "QUINN", "QUINONES", "QUINONEZ", - "QUINTANA", "QUINTANILLA", "QUINTERO", "QUIROZ", "RADER", "RADFORD", "RAFFERTY", "RAGAN", "RAGLAND", - "RAGSDALE", "RAINES", "RAINEY", "RAINS", "RALEY", "RALPH", "RALSTON", "RAMEY", "RAMIREZ", "RAMON", "RAMOS", - "RAMSAY", "RAMSEY", "RAND", "RANDALL", "RANDLE", "RANDOLPH", "RANEY", "RANGEL", "RANKIN", "RANSOM", "RAPP", - "RASH", "RASMUSSEN", "RATCLIFF", "RATLIFF", "RAU", "RAUCH", "RAWLINGS", "RAWLINS", "RAWLS", "RAY", - "RAYBURN", "RAYFORD", "RAYMOND", "RAYNOR", "RAZO", "REA", "READ", "REAGAN", "REARDON", "REAVES", "RECTOR", - "REDD", "REDDEN", "REDDICK", "REDDING", "REDDY", "REDMAN", "REDMON", "REDMOND", "REECE", "REED", "REEDER", - "REEDY", "REES", "REESE", "REEVES", "REGALADO", "REGAN", "REGISTER", "REICH", "REICHERT", "REID", "REILLY", - "REINHARDT", "REINHART", "REIS", "REITER", "RENDON", "RENFRO", "RENNER", "RENO", "RENTERIA", "REUTER", - "REY", "REYES", "REYNA", "REYNOLDS", "REYNOSO", "RHEA", "RHOADES", "RHOADS", "RHODEN", "RHODES", "RICCI", - "RICE", "RICH", "RICHARD", "RICHARDS", "RICHARDSON", "RICHEY", "RICHIE", "RICHMOND", "RICHTER", "RICKARD", - "RICKER", "RICKETTS", "RICKMAN", "RICKS", "RICO", "RIDDELL", "RIDDICK", "RIDDLE", "RIDENOUR", "RIDER", - "RIDGEWAY", "RIDLEY", "RIFE", "RIGBY", "RIGGINS", "RIGGS", "RIGSBY", "RILEY", "RINALDI", "RINEHART", "RING", - "RIOS", "RIPLEY", "RITCHEY", "RITCHIE", "RITTER", "RIVAS", "RIVERA", "RIVERS", "RIZZO", "ROACH", "ROARK", - "ROBB", "ROBBINS", "ROBERGE", "ROBERSON", "ROBERT", "ROBERTS", "ROBERTSON", "ROBEY", "ROBINETTE", "ROBINS", - "ROBINSON", "ROBISON", "ROBLES", "ROBSON", "ROBY", "ROCHA", "ROCHE", "ROCK", "ROCKWELL", "RODEN", - "RODERICK", "RODGERS", "RODRIGUE", "RODRIGUES", "RODRIGUEZ", "RODRIQUEZ", "ROE", "ROGER", "ROGERS", "ROHR", - "ROJAS", "ROLAND", "ROLDAN", "ROLLER", "ROLLINS", "ROMAN", "ROMANO", "ROMEO", "ROMERO", "ROMO", "RONEY", - "ROONEY", "ROOT", "ROPER", "ROQUE", "ROSA", "ROSADO", "ROSALES", "ROSARIO", "ROSAS", "ROSE", "ROSEN", - "ROSENBAUM", "ROSENBERG", "ROSENTHAL", "ROSS", "ROSSER", "ROSSI", "ROTH", "ROUNDS", "ROUNDTREE", "ROUNTREE", - "ROUSE", "ROUSH", "ROUSSEAU", "ROUSSEL", "ROWAN", "ROWE", "ROWELL", "ROWLAND", "ROWLEY", "ROY", "ROYAL", - "ROYBAL", "ROYER", "ROYSTER", "RUBIN", "RUBIO", "RUBY", "RUCKER", "RUDD", "RUDOLPH", "RUFF", "RUFFIN", - "RUIZ", "RUNYAN", "RUNYON", "RUPERT", "RUPP", "RUSH", "RUSHING", "RUSS", "RUSSELL", "RUSSO", "RUST", "RUTH", - "RUTHERFORD", "RUTLEDGE", "RYAN", "RYDER", "SAAVEDRA", "SABO", "SACCO", "SADLER", "SAENZ", "SAGE", "SAGER", - "SALAS", "SALAZAR", "SALCEDO", "SALCIDO", "SALDANA", "SALDIVAR", "SALERNO", "SALES", "SALGADO", "SALINAS", - "SALISBURY", "SALLEE", "SALLEY", "SALMON", "SALTER", "SAM", "SAMMONS", "SAMPLE", "SAMPLES", "SAMPSON", - "SAMS", "SAMSON", "SAMUEL", "SAMUELS", "SANBORN", "SANCHES", "SANCHEZ", "SANDBERG", "SANDER", "SANDERS", - "SANDERSON", "SANDLIN", "SANDOVAL", "SANDS", "SANFORD", "SANTANA", "SANTIAGO", "SANTOS", "SAPP", "SARGENT", - "SASSER", "SATTERFIELD", "SAUCEDO", "SAUCIER", "SAUER", "SAULS", "SAUNDERS", "SAVAGE", "SAVOY", "SAWYER", - "SAWYERS", "SAXON", "SAXTON", "SAYERS", "SAYLOR", "SAYRE", "SCALES", "SCANLON", "SCARBOROUGH", "SCARBROUGH", - "SCHAEFER", "SCHAEFFER", "SCHAFER", "SCHAFFER", "SCHELL", "SCHERER", "SCHILLER", "SCHILLING", "SCHINDLER", - "SCHMID", "SCHMIDT", "SCHMITT", "SCHMITZ", "SCHNEIDER", "SCHOFIELD", "SCHOLL", "SCHOONOVER", "SCHOTT", - "SCHRADER", "SCHREIBER", "SCHREINER", "SCHROEDER", "SCHUBERT", "SCHULER", "SCHULTE", "SCHULTZ", "SCHULZ", - "SCHULZE", "SCHUMACHER", "SCHUSTER", "SCHWAB", "SCHWARTZ", "SCHWARZ", "SCHWEITZER", "SCOGGINS", "SCOTT", - "SCRIBNER", "SCROGGINS", "SCRUGGS", "SCULLY", "SEAL", "SEALS", "SEAMAN", "SEARCY", "SEARS", "SEATON", - "SEAY", "SEE", "SEELEY", "SEGURA", "SEIBERT", "SEIDEL", "SEIFERT", "SEILER", "SEITZ", "SELBY", "SELF", - "SELL", "SELLERS", "SELLS", "SENA", "SEPULVEDA", "SERNA", "SERRANO", "SESSIONS", "SETTLE", "SETTLES", - "SEVERSON", "SEWARD", "SEWELL", "SEXTON", "SEYMORE", "SEYMOUR", "SHACKELFORD", "SHADE", "SHAFER", "SHAFFER", - "SHAH", "SHANK", "SHANKS", "SHANNON", "SHAPIRO", "SHARKEY", "SHARP", "SHARPE", "SHAVER", "SHAW", "SHAY", - "SHEA", "SHEARER", "SHEEHAN", "SHEETS", "SHEFFIELD", "SHELBY", "SHELDON", "SHELL", "SHELLEY", "SHELLY", - "SHELTON", "SHEPARD", "SHEPHARD", "SHEPHERD", "SHEPPARD", "SHERIDAN", "SHERMAN", "SHERRILL", "SHERROD", - "SHERRY", "SHERWOOD", "SHIELDS", "SHIFFLETT", "SHIN", "SHINN", "SHIPLEY", "SHIPMAN", "SHIPP", "SHIRLEY", - "SHIVELY", "SHIVERS", "SHOCKLEY", "SHOEMAKER", "SHOOK", "SHORE", "SHORES", "SHORT", "SHORTER", "SHRADER", - "SHULER", "SHULL", "SHULTZ", "SHUMAKER", "SHUMAN", "SHUMATE", "SIBLEY", "SIDES", "SIEGEL", "SIERRA", - "SIGLER", "SIKES", "SILER", "SILLS", "SILVA", "SILVER", "SILVERMAN", "SILVERS", "SILVIA", "SIMMONS", - "SIMMS", "SIMON", "SIMONE", "SIMONS", "SIMONSON", "SIMPKINS", "SIMPSON", "SIMS", "SINCLAIR", "SINGER", - "SINGH", "SINGLETARY", "SINGLETON", "SIPES", "SISCO", "SISK", "SISSON", "SIZEMORE", "SKAGGS", "SKELTON", - "SKIDMORE", "SKINNER", "SKIPPER", "SLACK", "SLADE", "SLAGLE", "SLATER", "SLATON", "SLATTERY", "SLAUGHTER", - "SLAYTON", "SLEDGE", "SLOAN", "SLOCUM", "SLONE", "SMALL", "SMALLEY", "SMALLS", "SMALLWOOD", "SMART", - "SMILEY", "SMITH", "SMITHSON", "SMOOT", "SMOTHERS", "SMYTH", "SNEAD", "SNEED", "SNELL", "SNIDER", "SNIPES", - "SNODGRASS", "SNOW", "SNOWDEN", "SNYDER", "SOARES", "SOLANO", "SOLIS", "SOLIZ", "SOLOMON", "SOMERS", - "SOMERVILLE", "SOMMER", "SOMMERS", "SONG", "SORENSEN", "SORENSON", "SORIA", "SORIANO", "SORRELL", "SOSA", - "SOTELO", "SOTO", "SOUSA", "SOUTH", "SOUTHARD", "SOUTHERLAND", "SOUTHERN", "SOUZA", "SOWELL", "SOWERS", - "SPAIN", "SPALDING", "SPANGLER", "SPANN", "SPARKMAN", "SPARKS", "SPARROW", "SPAULDING", "SPEAR", "SPEARMAN", - "SPEARS", "SPEED", "SPEER", "SPEIGHT", "SPELLMAN", "SPENCE", "SPENCER", "SPERRY", "SPICER", "SPILLMAN", - "SPINKS", "SPIVEY", "SPOONER", "SPRADLIN", "SPRAGUE", "SPRIGGS", "SPRING", "SPRINGER", "SPROUSE", "SPRUILL", - "SPURGEON", "SPURLOCK", "SQUIRES", "STACEY", "STACK", "STACKHOUSE", "STACY", "STAFFORD", "STAGGS", "STAHL", - "STALEY", "STALLINGS", "STALLWORTH", "STAMM", "STAMPER", "STAMPS", "STANFIELD", "STANFORD", "STANLEY", - "STANTON", "STAPLES", "STAPLETON", "STARK", "STARKEY", "STARKS", "STARLING", "STARNES", "STARR", "STATEN", - "STATON", "STAUFFER", "STCLAIR", "STEADMAN", "STEARNS", "STEED", "STEEL", "STEELE", "STEEN", "STEFFEN", - "STEGALL", "STEIN", "STEINBERG", "STEINER", "STEPHEN", "STEPHENS", "STEPHENSON", "STEPP", "STERLING", - "STERN", "STEVENS", "STEVENSON", "STEWARD", "STEWART", "STIDHAM", "STILES", "STILL", "STILLMAN", - "STILLWELL", "STILTNER", "STINE", "STINNETT", "STINSON", "STITT", "STJOHN", "STOCK", "STOCKTON", "STODDARD", - "STOKER", "STOKES", "STOLL", "STONE", "STONER", "STOREY", "STORY", "STOTT", "STOUT", "STOVALL", "STOVER", - "STOWE", "STPIERRE", "STRAIN", "STRAND", "STRANGE", "STRATTON", "STRAUB", "STRAUSS", "STREET", "STREETER", - "STRICKLAND", "STRINGER", "STRONG", "STROTHER", "STROUD", "STROUP", "STRUNK", "STUART", "STUBBLEFIELD", - "STUBBS", "STUCKEY", "STULL", "STUMP", "STURDIVANT", "STURGEON", "STURGILL", "STURGIS", "STURM", "STYLES", - "SUAREZ", "SUGGS", "SULLIVAN", "SUMMERLIN", "SUMMERS", "SUMNER", "SUMPTER", "SUN", "SUTHERLAND", "SUTTER", - "SUTTON", "SWAFFORD", "SWAIN", "SWAN", "SWANK", "SWANN", "SWANSON", "SWARTZ", "SWEARINGEN", "SWEAT", - "SWEENEY", "SWEET", "SWENSON", "SWIFT", "SWISHER", "SWITZER", "SWOPE", "SYKES", "SYLVESTER", "TABER", - "TABOR", "TACKETT", "TAFT", "TAGGART", "TALBERT", "TALBOT", "TALBOTT", "TALLENT", "TALLEY", "TAM", "TAMAYO", - "TAN", "TANAKA", "TANG", "TANNER", "TAPIA", "TAPP", "TARVER", "TATE", "TATUM", "TAVARES", "TAYLOR", - "TEAGUE", "TEAL", "TEEL", "TEETER", "TEJADA", "TEJEDA", "TELLEZ", "TEMPLE", "TEMPLETON", "TENNANT", - "TENNEY", "TERRELL", "TERRILL", "TERRY", "THACKER", "THAMES", "THAO", "THARP", "THATCHER", "THAYER", - "THERIAULT", "THERIOT", "THIBODEAU", "THIBODEAUX", "THIEL", "THIGPEN", "THOMAS", "THOMASON", "THOMPSON", - "THOMSEN", "THOMSON", "THORN", "THORNBURG", "THORNE", "THORNHILL", "THORNTON", "THORP", "THORPE", "THORTON", - "THRASH", "THRASHER", "THURMAN", "THURSTON", "TIBBETTS", "TIBBS", "TICE", "TIDWELL", "TIERNEY", "TIJERINA", - "TILLER", "TILLERY", "TILLEY", "TILLMAN", "TILTON", "TIMM", "TIMMONS", "TINKER", "TINSLEY", "TIPTON", - "TIRADO", "TISDALE", "TITUS", "TOBIAS", "TOBIN", "TODD", "TOLBERT", "TOLEDO", "TOLER", "TOLIVER", - "TOLLIVER", "TOM", "TOMLIN", "TOMLINSON", "TOMPKINS", "TONEY", "TONG", "TORO", "TORRENCE", "TORRES", - "TORREZ", "TOTH", "TOTTEN", "TOVAR", "TOWNES", "TOWNS", "TOWNSEND", "TRACY", "TRAHAN", "TRAMMELL", "TRAN", - "TRAPP", "TRASK", "TRAVERS", "TRAVIS", "TRAYLOR", "TREADWAY", "TREADWELL", "TREJO", "TREMBLAY", "TRENT", - "TREVINO", "TRIBBLE", "TRICE", "TRIMBLE", "TRINIDAD", "TRIPLETT", "TRIPP", "TROTTER", "TROUT", "TROUTMAN", - "TROY", "TRUDEAU", "TRUE", "TRUITT", "TRUJILLO", "TRUONG", "TUBBS", "TUCK", "TUCKER", "TUGGLE", "TURK", - "TURLEY", "TURMAN", "TURNBULL", "TURNER", "TURNEY", "TURPIN", "TUTTLE", "TYLER", "TYNER", "TYREE", "TYSON", - "ULRICH", "UNDERHILL", "UNDERWOOD", "UNGER", "UPCHURCH", "UPSHAW", "UPTON", "URBAN", "URBINA", "URIBE", - "USHER", "UTLEY", "VAIL", "VALADEZ", "VALDES", "VALDEZ", "VALENCIA", "VALENTI", "VALENTIN", "VALENTINE", - "VALENZUELA", "VALERIO", "VALLE", "VALLEJO", "VALLES", "VAN", "VANBUREN", "VANCE", "VANDIVER", "VANDYKE", - "VANG", "VANHOOSE", "VANHORN", "VANMETER", "VANN", "VANOVER", "VANWINKLE", "VARELA", "VARGAS", "VARNER", - "VARNEY", "VASQUEZ", "VAUGHAN", "VAUGHN", "VAUGHT", "VAZQUEZ", "VEAL", "VEGA", "VELA", "VELASCO", - "VELASQUEZ", "VELAZQUEZ", "VELEZ", "VENABLE", "VENEGAS", "VENTURA", "VERA", "VERDIN", "VERGARA", "VERNON", - "VEST", "VETTER", "VICK", "VICKERS", "VICKERY", "VICTOR", "VIDAL", "VIEIRA", "VIERA", "VIGIL", "VILLA", - "VILLALOBOS", "VILLANUEVA", "VILLAREAL", "VILLARREAL", "VILLASENOR", "VILLEGAS", "VINCENT", "VINES", - "VINSON", "VITALE", "VO", "VOGEL", "VOGT", "VOSS", "VU", "VUE", "WADDELL", "WADE", "WADSWORTH", "WAGGONER", - "WAGNER", "WAGONER", "WAHL", "WAITE", "WAKEFIELD", "WALDEN", "WALDRON", "WALDROP", "WALKER", "WALL", - "WALLACE", "WALLEN", "WALLER", "WALLING", "WALLIS", "WALLS", "WALSH", "WALSTON", "WALTER", "WALTERS", - "WALTON", "WAMPLER", "WANG", "WARD", "WARDEN", "WARE", "WARFIELD", "WARNER", "WARREN", "WASHBURN", - "WASHINGTON", "WASSON", "WATERMAN", "WATERS", "WATKINS", "WATSON", "WATT", "WATTERS", "WATTS", "WAUGH", - "WAY", "WAYNE", "WEATHERFORD", "WEATHERLY", "WEATHERS", "WEAVER", "WEBB", "WEBBER", "WEBER", "WEBSTER", - "WEDDLE", "WEED", "WEEKS", "WEEMS", "WEINBERG", "WEINER", "WEINSTEIN", "WEIR", "WEIS", "WEISS", "WELCH", - "WELDON", "WELKER", "WELLER", "WELLMAN", "WELLS", "WELSH", "WENDT", "WENGER", "WENTWORTH", "WENTZ", - "WENZEL", "WERNER", "WERTZ", "WESLEY", "WEST", "WESTBROOK", "WESTER", "WESTFALL", "WESTMORELAND", "WESTON", - "WETZEL", "WHALEN", "WHALEY", "WHARTON", "WHATLEY", "WHEAT", "WHEATLEY", "WHEATON", "WHEELER", "WHELAN", - "WHIPPLE", "WHITAKER", "WHITCOMB", "WHITE", "WHITED", "WHITEHEAD", "WHITEHURST", "WHITEMAN", "WHITESIDE", - "WHITFIELD", "WHITING", "WHITLEY", "WHITLOCK", "WHITLOW", "WHITMAN", "WHITMIRE", "WHITMORE", "WHITNEY", - "WHITSON", "WHITT", "WHITTAKER", "WHITTEN", "WHITTINGTON", "WHITTLE", "WHITWORTH", "WHYTE", "WICK", - "WICKER", "WICKHAM", "WICKS", "WIESE", "WIGGINS", "WILBANKS", "WILBER", "WILBUR", "WILBURN", "WILCOX", - "WILD", "WILDE", "WILDER", "WILES", "WILEY", "WILHELM", "WILHITE", "WILKE", "WILKERSON", "WILKES", - "WILKINS", "WILKINSON", "WILKS", "WILL", "WILLARD", "WILLETT", "WILLEY", "WILLIAM", "WILLIAMS", - "WILLIAMSON", "WILLIFORD", "WILLINGHAM", "WILLIS", "WILLOUGHBY", "WILLS", "WILLSON", "WILMOTH", "WILSON", - "WILT", "WIMBERLY", "WINCHESTER", "WINDHAM", "WINFIELD", "WINFREY", "WING", "WINGATE", "WINGFIELD", - "WINKLER", "WINN", "WINSLOW", "WINSTEAD", "WINSTON", "WINTER", "WINTERS", "WIRTH", "WISE", "WISEMAN", - "WISNIEWSKI", "WITCHER", "WITHERS", "WITHERSPOON", "WITHROW", "WITT", "WITTE", "WOFFORD", "WOLF", "WOLFE", - "WOLFF", "WOLFORD", "WOMACK", "WONG", "WOO", "WOOD", "WOODALL", "WOODARD", "WOODBURY", "WOODCOCK", "WOODEN", - "WOODLEY", "WOODRUFF", "WOODS", "WOODSON", "WOODWARD", "WOODWORTH", "WOODY", "WOOLDRIDGE", "WOOLEY", - "WOOTEN", "WORD", "WORDEN", "WORKMAN", "WORLEY", "WORRELL", "WORSHAM", "WORTH", "WORTHAM", "WORTHINGTON", - "WORTHY", "WRAY", "WREN", "WRIGHT", "WU", "WYANT", "WYATT", "WYLIE", "WYMAN", "WYNN", "WYNNE", "XIONG", - "YAMAMOTO", "YANCEY", "YANEZ", "YANG", "YARBROUGH", "YATES", "YAZZIE", "YBARRA", "YEAGER", "YEE", "YI", - "YOCUM", "YODER", "YOO", "YOON", "YORK", "YOST", "YOUNG", "YOUNGBLOOD", "YOUNGER", "YOUNT", "YU", - "ZAMBRANO", "ZAMORA", "ZAPATA", "ZARAGOZA", "ZARATE", "ZAVALA", "ZEIGLER", "ZELLER", "ZEPEDA", "ZHANG", - "ZIEGLER", "ZIELINSKI", "ZIMMER", "ZIMMERMAN", "ZINK", "ZOOK", "ZUNIGA" }; - } - - public static String generateRandomName() { - String first, last; - - boolean isScottish = (MathUtils.randInt(0, 10) >= 9); - - if (isScottish) { - first = mScottishFirstNames[MathUtils.randInt(0, mScottishFirstNames.length - 1)].toLowerCase(); - } - else { - first = mFirstNames[MathUtils.randInt(0, mFirstNames.length - 1)].toLowerCase(); - } - - last = mLastNames[MathUtils.randInt(0, mLastNames.length - 1)].toLowerCase(); - if (first.equalsIgnoreCase(last)) { - while (first.equalsIgnoreCase(last)) - first = mFirstNames[MathUtils.randInt(0, mFirstNames.length - 1)].toLowerCase(); - } - first = StringUtils.capitalize(first); - last = StringUtils.capitalize(last); - return first + " " + last; - - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java b/src/Java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java deleted file mode 100644 index b515f0979e..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.plugin.villagers; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.plugin.villagers.entity.EntityBaseVillager; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.world.World; -import net.minecraftforge.event.entity.EntityJoinWorldEvent; - -public class VillagerEventHandler { - - private final static VillagerEventHandler mInstance; - - static { - mInstance = new VillagerEventHandler(); - Utils.registerEvent(mInstance); - } - - @SubscribeEvent - public void onEntityJoinWorld(EntityJoinWorldEvent event){ - - - /*try { - if (event.entity != null && event.entity instanceof EntityLivingBase && event.entity instanceof EntityVillager){ - EntityVillager entity = (EntityVillager) event.entity; - World world = entity.worldObj; - int profession = entity.getProfession(); - if (world != null && (profession >= 7735 && profession <= 7737)){ - EntityBaseVillager mNew = new EntityBaseVillager(world, profession); - mNew.copyLocationAndAnglesFrom(entity); - if (mNew != null) { - world.removeEntity(entity); - world.spawnEntityInWorld(mNew); - } - } - - } - } - catch (Throwable t) { - t.printStackTrace(); - return; - }*/ - - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/VillagerObject.java b/src/Java/gtPlusPlus/plugin/villagers/VillagerObject.java deleted file mode 100644 index a5587a1b52..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/VillagerObject.java +++ /dev/null @@ -1,40 +0,0 @@ -package gtPlusPlus.plugin.villagers; - -import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.util.ResourceLocation; - -public class VillagerObject { - - public final int mID; - public final String mName; - public final IVillageTradeHandler mCustomTrade; - - - public VillagerObject(int aID, String aName, Object aProfession, Object aCareer, Object aSkin, IVillageTradeHandler aCustomTrade) { - - mID = aID; - mName = aName; - mCustomTrade = aCustomTrade; - - //Register Custom Trade to Registry. - if (aCustomTrade != null) { - Core_VillagerAdditions.mVillagerTrades.put(new Pair(7735+aID, aCustomTrade)); - } - //Register Skin to Registry. - if (aSkin != null) { - - if (aSkin instanceof String) { - String s = (String) aSkin; - aSkin = new ResourceLocation(CORE.MODID+":"+"textures/entity/villager/"+s+".png"); - } - if (aSkin instanceof ResourceLocation) { - Core_VillagerAdditions.mVillagerSkins.put(aID, (ResourceLocation) aSkin); - } - - } - VillagerUtils.registerNewVillager(aID, this); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/VillagerUtils.java b/src/Java/gtPlusPlus/plugin/villagers/VillagerUtils.java deleted file mode 100644 index f252ad068d..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/VillagerUtils.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.plugin.villagers; - -import java.util.HashMap; - -import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; - -public class VillagerUtils { - - public static final HashMap mVillagerMap = new HashMap(); - - public static void registerNewVillager(int aID, String aName, Object aProfession, Object aCareer, Object aSkin, IVillageTradeHandler aCustomTrade) { - registerNewVillager(aID, new VillagerObject(aID, aName, aProfession, aCareer, aSkin, aCustomTrade)); - } - - public static void registerNewVillager(int aID, VillagerObject aVillager) { - mVillagerMap.put(aID, aVillager); - } - - - - - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java b/src/Java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java deleted file mode 100644 index 916f360012..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.plugin.villagers.block; - -import static gtPlusPlus.core.lib.CORE.RANDOM; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.item.base.itemblock.ItemBlockSpawner; -import gtPlusPlus.plugin.villagers.Core_VillagerAdditions; -import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; -import net.minecraft.block.BlockMobSpawner; -import net.minecraft.creativetab.CreativeTabs; -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; - -public class BlockGenericSpawner extends BlockMobSpawner { - - public BlockGenericSpawner() { - this.disableStats(); - this.setHardness(5.0F); - this.setStepSound(soundTypeMetal); - this.setBlockName("blockMobSpawnerEx"); - this.setBlockTextureName("mob_spawner"); - this.setResistance(2000.0F); - GameRegistry.registerBlock(this, ItemBlockSpawner.class, "blockMobSpawnerEx"); - Core_VillagerAdditions.mInstance.log("Registered Custom Spawner Block."); - } - - /** - * Returns a new instance of a block's tile entity class. Called on placing the block. - */ - @Override - public TileEntity createNewTileEntity(World world, int meta) - { - return new TileEntityGenericSpawner(meta); - } - - @Override - public int getExpDrop(IBlockAccess world, int metadata, int fortune){ - return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15); - } - - /** - * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) - */ - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) - { - for (int i = 0; i < Math.max(1,TileEntityGenericSpawner.mSpawners.size()); ++i) - { - p_149666_3_.add(new ItemStack(p_149666_1_, 1, i)); - } - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java deleted file mode 100644 index c29aadb16b..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java +++ /dev/null @@ -1,538 +0,0 @@ -package gtPlusPlus.plugin.villagers.entity; - -import java.lang.reflect.Field; -import java.util.Collections; -import java.util.Iterator; -import java.util.Random; - -import cpw.mods.fml.common.registry.VillagerRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.plugin.villagers.NameLists; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentData; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; -import net.minecraft.util.Tuple; -import net.minecraft.village.MerchantRecipe; -import net.minecraft.village.MerchantRecipeList; -import net.minecraft.village.Village; -import net.minecraft.world.World; - -public class EntityBaseVillager extends EntityVillager { - - // public static final VillagerProfession mProfession; - - /* - * - * Your problem is that you are extending EntityVillager, but buyingList and - * addDefaultEquipment are both PRIVATE members of EntityVillager - you cannot - * use or override them without Reflection or ASM. - * - * What you can do, however, is override getRecipes to return your own list, but - * because you override EntityVillager, your mob is still using the villager's - * buyingList (which is NULL) when useRecipe or any other villager method is - * called. You either have to override every method from EntityVillager which - * interacts with buyingList and make it use your own list, or you need to not - * extend EntityVillager and just implement IMerchant instead. - */ - - private final int mRoleID; - - public EntityBaseVillager(World aWorld){ - this(aWorld, 0); - } - - public EntityBaseVillager(World aWorld, int aID) { - super(aWorld, aID); - mRoleID = aID; - } - - @Override - public void writeEntityToNBT(NBTTagCompound aNBT) { - if (this.hasCustomNameTag()) { - if (!aNBT.hasKey("aCustomName")) { - aNBT.setString("aCustomName", this.getCommandSenderName()); - } - } - super.writeEntityToNBT(aNBT); - } - - @Override - public void readEntityFromNBT(NBTTagCompound aNBT) { - if (aNBT.hasKey("aCustomName")) { - if (!this.getCustomNameTag().equals(aNBT.getString("aCustomName"))) { - this.setCustomNameTag(aNBT.getString("aCustomName")); - } - } - super.readEntityFromNBT(aNBT); - } - - @Override - public void writeToNBT(NBTTagCompound aNBT) { - // TODO Auto-generated method stub - super.writeToNBT(aNBT); - } - - @Override - public void readFromNBT(NBTTagCompound aNBT) { - // TODO Auto-generated method stub - super.readFromNBT(aNBT); - } - - @Override - protected boolean canDespawn() { - return !this.hasCustomNameTag(); - } - - @Override - public void setProfession(int p_70938_1_) { - super.setProfession(p_70938_1_); - } - - @Override - public int getProfession() { - int prof = super.getProfession(); - //Logger.INFO(""+mRoleID); - return prof < 7735 ? 7738 : prof; - } - - @Override - public void useRecipe(MerchantRecipe p_70933_1_) { - super.useRecipe(p_70933_1_); - } - - @Override - public void setRecipes(MerchantRecipeList p_70930_1_) { - super.setRecipes(p_70930_1_); - } - - public boolean shouldAlwaysSprint() { - return false; - }; - - @Override - public void onLivingUpdate() { - - // Set Custom Name - if (!this.hasCustomNameTag()) { - this.setCustomNameTag(NameLists.generateRandomName()); - } - - super.onLivingUpdate(); - - // Make these guys always sprint - if (shouldAlwaysSprint()) { - if (!this.isSprinting()) { - this.setSprinting(true); - } - } - else { - if (this.isSprinting()) { - this.setSprinting(false); - } - } - - } - - @Override - public Entity getEntityToAttack() { - return super.getEntityToAttack(); - } - - @Override - public boolean getAlwaysRenderNameTag() { - return hasCustomNameTag(); - } - - @Override - public Random getRNG() { - return CORE.RANDOM; - } - - @Override - public void setSprinting(boolean bool) { - super.setSprinting(bool); - } - - /** - * Custom Shit - */ - - protected float getField_82191_bN() { - Field v82191 = ReflectionUtils.getField(getClass(), "field_82191_bN"); - try { - return v82191 != null ? v82191.getFloat(this) : 0f; - } catch (IllegalArgumentException | IllegalAccessException e) { - return 0f; - } - } - - protected void setField_82191_bN(float f) { - try { - ReflectionUtils.setField(this, "field_82191_bN", f); - } catch (IllegalArgumentException e) { - } - } - - protected boolean getNeedsInitilization() { - Field v82191 = ReflectionUtils.getField(EntityVillager.class, "needsInitilization"); - try { - return v82191 != null ? v82191.getBoolean(this) : false; - } catch (IllegalArgumentException | IllegalAccessException e) { - return false; - } - } - - protected void setNeedsInitilization(boolean f) { - try { - ReflectionUtils.setField(this, "needsInitilization", f); - } catch (IllegalArgumentException e) { - } - } - - protected MerchantRecipeList getBuyingList() { - Field v82191; - MerchantRecipeList o = null; - v82191 = ReflectionUtils.getField(getClass(), "buyingList"); - try { - if (v82191 != null) - o = (MerchantRecipeList) v82191.get(this); - Logger.WARNING("Is BuyingList Valid? " + (v82191 != null)); - return v82191 != null ? o : null; - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - return null; - } - - } - - protected void setBuyingList(MerchantRecipeList f) { - try { - Logger.WARNING("set BuyingList? "+(ReflectionUtils.setField(this, "buyingList", f))); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } - } - - protected Village getVillageObject() { - Field v82191 = ReflectionUtils.getField(getClass(), "villageObj"); - try { - return v82191 != null ? (Village) v82191.get(this) : null; - } catch (IllegalArgumentException | IllegalAccessException e) { - return null; - } - } - - protected String getLastBuyingPlayer() { - Field v82191 = ReflectionUtils.getField(getClass(), "lastBuyingPlayer"); - try { - return v82191 != null ? (String) v82191.get(this) : ""; - } catch (IllegalArgumentException | IllegalAccessException e) { - return ""; - } - } - - public MerchantRecipeList getRecipes(EntityPlayer p_70934_1_) { - if (getBuyingList() == null) { - this.addDefaultEquipmentAndRecipies(1); - } - return getBuyingList(); - } - - /** - * Adjusts the probability of obtaining a given recipe being offered by a - * villager - */ - private float adjustProbability(float p_82188_1_) { - float f1 = p_82188_1_ + getField_82191_bN(); - return f1 > 0.9F ? 0.9F - (f1 - 0.9F) : f1; - } - - /** - * based on the villagers profession add items, equipment, and recipies adds - * par1 random items to the list of things that the villager wants to buy. (at - * most 1 of each wanted type is added) - */ - private void addDefaultEquipmentAndRecipies(int p_70950_1_) { - if (this.getBuyingList() != null) { - setField_82191_bN(MathHelper.sqrt_float((float) this.getBuyingList().size()) * 0.2F); - } else { - setField_82191_bN(0.0F); - } - - MerchantRecipeList merchantrecipelist; - merchantrecipelist = new MerchantRecipeList(); - VillagerRegistry.manageVillagerTrades(merchantrecipelist, this, this.getProfession(), this.rand); - int k; - label50: - - switch (this.getProfession()) { - case 0: - addPurchaseRecipe(merchantrecipelist, Items.wheat, this.rand, this.adjustProbability(0.9F)); - addPurchaseRecipe(merchantrecipelist, Item.getItemFromBlock(Blocks.wool), this.rand, - this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.chicken, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.cooked_fished, this.rand, this.adjustProbability(0.4F)); - addEmeraldTrade(merchantrecipelist, Items.bread, this.rand, this.adjustProbability(0.9F)); - addEmeraldTrade(merchantrecipelist, Items.melon, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.apple, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cookie, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.shears, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.flint_and_steel, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cooked_chicken, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.arrow, this.rand, this.adjustProbability(0.5F)); - - if (this.rand.nextFloat() < this.adjustProbability(0.5F)) { - merchantrecipelist.add(new MerchantRecipe(new ItemStack(Blocks.gravel, 10), - new ItemStack(Items.emerald), new ItemStack(Items.flint, 4 + this.rand.nextInt(2), 0))); - } - - break; - case 1: - addPurchaseRecipe(merchantrecipelist, Items.paper, this.rand, this.adjustProbability(0.8F)); - addPurchaseRecipe(merchantrecipelist, Items.book, this.rand, this.adjustProbability(0.8F)); - addPurchaseRecipe(merchantrecipelist, Items.written_book, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.bookshelf), this.rand, - this.adjustProbability(0.8F)); - addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glass), this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.compass, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.clock, this.rand, this.adjustProbability(0.2F)); - - if (this.rand.nextFloat() < this.adjustProbability(0.07F)) { - Enchantment enchantment = Enchantment.enchantmentsBookList[this.rand - .nextInt(Enchantment.enchantmentsBookList.length)]; - int i1 = MathHelper.getRandomIntegerInRange(this.rand, enchantment.getMinLevel(), - enchantment.getMaxLevel()); - ItemStack itemstack = Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(enchantment, i1)); - k = 2 + this.rand.nextInt(5 + i1 * 10) + 3 * i1; - merchantrecipelist - .add(new MerchantRecipe(new ItemStack(Items.book), new ItemStack(Items.emerald, k), itemstack)); - } - - break; - case 2: - addEmeraldTrade(merchantrecipelist, Items.ender_eye, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.experience_bottle, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.redstone, this.rand, this.adjustProbability(0.4F)); - addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glowstone), this.rand, - this.adjustProbability(0.3F)); - Item[] aitem = new Item[] { Items.iron_sword, Items.diamond_sword, Items.iron_chestplate, - Items.diamond_chestplate, Items.iron_axe, Items.diamond_axe, Items.iron_pickaxe, - Items.diamond_pickaxe }; - Item[] aitem1 = aitem; - int j = aitem.length; - k = 0; - - while (true) { - if (k >= j) { - break label50; - } - - Item item = aitem1[k]; - - if (this.rand.nextFloat() < this.adjustProbability(0.05F)) { - merchantrecipelist.add(new MerchantRecipe(new ItemStack(item, 1, 0), - new ItemStack(Items.emerald, 2 + this.rand.nextInt(3), 0), - EnchantmentHelper.addRandomEnchantment(this.rand, new ItemStack(item, 1, 0), - 5 + this.rand.nextInt(15)))); - } - - ++k; - } - case 3: - addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); - addPurchaseRecipe(merchantrecipelist, Items.iron_ingot, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.diamond, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.iron_sword, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_sword, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.iron_axe, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_axe, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.iron_pickaxe, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_pickaxe, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.iron_shovel, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_shovel, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_hoe, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_hoe, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_boots, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_boots, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_helmet, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_helmet, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_chestplate, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_chestplate, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_leggings, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_leggings, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_boots, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_helmet, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_chestplate, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_leggings, this.rand, this.adjustProbability(0.1F)); - break; - case 4: - addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); - addPurchaseRecipe(merchantrecipelist, Items.porkchop, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.beef, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.saddle, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.leather_chestplate, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.leather_boots, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.leather_helmet, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.leather_leggings, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cooked_porkchop, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cooked_beef, this.rand, this.adjustProbability(0.3F)); - } - - if (merchantrecipelist.isEmpty()) { - addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, 1.0F); - } - - Collections.shuffle(merchantrecipelist); - - if (this.getBuyingList() == null) { - this.setBuyingList(new MerchantRecipeList()); - } - - for (int l = 0; l < p_70950_1_ && l < merchantrecipelist.size(); ++l) { - try { - this.getBuyingList().addToListWithCheck((MerchantRecipe) merchantrecipelist.get(l)); - } - catch (Throwable t) { - Logger.INFO("Villager with ID "+this.entityUniqueID.toString()+" at | X: "+this.posX+" Y: "+this.posY+" Z: "+this.posZ+" may have corrupt trades, it is advised to remove/kill it."); - } - } - - try { - if (this.getBuyingList() != null) { - for (Object g : this.getBuyingList()) { - if (g != null) { - if (g instanceof MerchantRecipe) { - MerchantRecipe m = (MerchantRecipe) g; - ItemStack selling = m.getItemToSell(); - ItemStack[] buying = new ItemStack[] {m.getItemToBuy(), m.getSecondItemToBuy() != null ? m.getSecondItemToBuy() : null}; - if (selling == null) { - Logger.WARNING("Villager is Selling an invalid item"); - } - else if (buying[0] == null && buying[1] == null) { - Logger.WARNING("Villager is buying two invalid items"); - } - else { - Logger.WARNING("Villager is Selling x"+selling.stackSize+selling.getDisplayName()+" for x"+buying[0].stackSize+" "+buying[0].getDisplayName()+buying[1] != null ? " and for x"+buying[1].stackSize+" "+buying[1].getDisplayName() : ""); - } - } - else - Logger.WARNING("Found: "+g.getClass().getName()); - } - } - } - else { - - } - } - catch (Throwable t) { - - } - - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - @Override - protected void updateAITick() { - if (!this.isTrading()) { - if (this.getNeedsInitilization()) { - if (this.getBuyingList().size() > 1) { - Iterator iterator = this.getBuyingList().iterator(); - - while (iterator.hasNext()) { - MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); - - if (merchantrecipe.isRecipeDisabled()) { - merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2); - } - } - } - - this.addDefaultEquipmentAndRecipies(1); - this.setNeedsInitilization(false); - - if (this.getVillageObject() != null && this.getLastBuyingPlayer() != null) { - this.worldObj.setEntityState(this, (byte) 14); - this.getVillageObject().setReputationForPlayer(this.getLastBuyingPlayer(), 1); - } - } - } - super.updateAITick(); - } - - public static void addEmeraldTrade(MerchantRecipeList aRecipeList, Item aItem, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - int i = getLootAmount_BlacksmithSellingList(aItem, aRand); - ItemStack itemstack; - ItemStack itemstack1; - - if (i < 0) { - itemstack = new ItemStack(Items.emerald, 1, 0); - itemstack1 = new ItemStack(aItem, -i, 0); - } else { - itemstack = new ItemStack(Items.emerald, i, 0); - itemstack1 = new ItemStack(aItem, 1, 0); - } - - aRecipeList.add(new MerchantRecipe(itemstack, itemstack1)); - } - } - - public static void addCustomTrade(MerchantRecipeList aRecipeList, ItemStack aItem1, ItemStack aItem2, ItemStack aItem3, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - aRecipeList.add(new MerchantRecipe(aItem1, aItem2, aItem3)); - } - } - - private static int getLootAmount_BlacksmithSellingList(Item aItem, Random aRand) { - Tuple tuple = (Tuple) blacksmithSellingList.get(aItem); - return tuple == null ? 1 - : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() - ? ((Integer) tuple.getFirst()).intValue() - : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( - ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); - } - - public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - aTradeList.add(new MerchantRecipe(getSimpleLootStack(aItem, aRand), Items.emerald)); - } - } - - private static ItemStack getSimpleLootStack(Item aItem, Random aRand) { - return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), 0); - } - - public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, int aMeta, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - aTradeList.add(new MerchantRecipe(getComplexLootStack(aItem, aMeta, aRand), Items.emerald)); - } - } - - private static ItemStack getComplexLootStack(Item aItem, int aMeta, Random aRand) { - return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), aMeta); - } - - private static int getLootAmount_VillagerSellingList(Item aItem, Random aRand) { - Tuple tuple = (Tuple) villagersSellingList.get(aItem); - return tuple == null ? 1 - : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() - ? ((Integer) tuple.getFirst()).intValue() - : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( - ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java deleted file mode 100644 index 4f9e2954a4..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java +++ /dev/null @@ -1,525 +0,0 @@ -package gtPlusPlus.plugin.villagers.entity; - -import java.lang.reflect.Field; -import java.util.Collections; -import java.util.Iterator; -import java.util.Random; - -import cpw.mods.fml.common.registry.VillagerRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.plugin.villagers.NameLists; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentData; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityAgeable; -import net.minecraft.entity.IEntityLivingData; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; -import net.minecraft.util.Tuple; -import net.minecraft.village.MerchantRecipe; -import net.minecraft.village.MerchantRecipeList; -import net.minecraft.village.Village; -import net.minecraft.world.World; - -public class EntityNativeAustralian extends EntityVillager { - - // public static final VillagerProfession mProfession; - - /* - * - * Your problem is that you are extending EntityVillager, but buyingList and - * addDefaultEquipment are both PRIVATE members of EntityVillager - you cannot - * use or override them without Reflection or ASM. - * - * What you can do, however, is override getRecipes to return your own list, but - * because you override EntityVillager, your mob is still using the villager's - * buyingList (which is NULL) when useRecipe or any other villager method is - * called. You either have to override every method from EntityVillager which - * interacts with buyingList and make it use your own list, or you need to not - * extend EntityVillager and just implement IMerchant instead. - */ - - private final int mRoleID; - - public EntityNativeAustralian(World aWorld) { - super(aWorld, 7738); - mRoleID = 7738; - } - - public EntityVillager createChild(EntityAgeable p_90011_1_){ - EntityNativeAustralian entityvillager = new EntityNativeAustralian(this.worldObj); - entityvillager.onSpawnWithEgg((IEntityLivingData)null); - return entityvillager; - } - - public boolean allowLeashing() - { - return true; - } - - @Override - public void writeEntityToNBT(NBTTagCompound aNBT) { - if (this.hasCustomNameTag()) { - if (!aNBT.hasKey("aCustomName")) { - aNBT.setString("aCustomName", this.getCommandSenderName()); - } - } - super.writeEntityToNBT(aNBT); - } - - @Override - public void readEntityFromNBT(NBTTagCompound aNBT) { - if (aNBT.hasKey("aCustomName")) { - if (!this.getCustomNameTag().equals(aNBT.getString("aCustomName"))) { - this.setCustomNameTag(aNBT.getString("aCustomName")); - } - } - super.readEntityFromNBT(aNBT); - } - - @Override - public void writeToNBT(NBTTagCompound aNBT) { - // TODO Auto-generated method stub - super.writeToNBT(aNBT); - } - - @Override - public void readFromNBT(NBTTagCompound aNBT) { - // TODO Auto-generated method stub - super.readFromNBT(aNBT); - } - - @Override - protected boolean canDespawn() { - return !false; - } - - @Override - public void setProfession(int p_70938_1_) { - super.setProfession(7738); - } - - @Override - public int getProfession() { - return mRoleID; - } - - @Override - public void useRecipe(MerchantRecipe p_70933_1_) { - super.useRecipe(p_70933_1_); - } - - @Override - public void setRecipes(MerchantRecipeList p_70930_1_) { - super.setRecipes(p_70930_1_); - } - - public boolean shouldAlwaysSprint() { - return false; - }; - - @Override - public void onLivingUpdate() { - super.onLivingUpdate(); - } - - @Override - public Entity getEntityToAttack() { - return super.getEntityToAttack(); - } - - @Override - public boolean getAlwaysRenderNameTag() { - return hasCustomNameTag(); - } - - @Override - public Random getRNG() { - return CORE.RANDOM; - } - - @Override - public void setSprinting(boolean bool) { - super.setSprinting(bool); - } - - /** - * Custom Shit - */ - - protected float getField_82191_bN() { - Field v82191 = ReflectionUtils.getField(getClass(), "field_82191_bN"); - try { - return v82191 != null ? v82191.getFloat(this) : 0f; - } catch (IllegalArgumentException | IllegalAccessException e) { - return 0f; - } - } - - protected void setField_82191_bN(float f) { - try { - ReflectionUtils.setField(this, "field_82191_bN", f); - } catch (IllegalArgumentException e) { - } - } - - protected boolean getNeedsInitilization() { - Field v82191 = ReflectionUtils.getField(EntityVillager.class, "needsInitilization"); - try { - return v82191 != null ? v82191.getBoolean(this) : false; - } catch (IllegalArgumentException | IllegalAccessException e) { - return false; - } - } - - protected void setNeedsInitilization(boolean f) { - try { - ReflectionUtils.setField(this, "needsInitilization", f); - } catch (IllegalArgumentException e) { - } - } - - protected MerchantRecipeList getBuyingList() { - Field v82191; - MerchantRecipeList o = null; - v82191 = ReflectionUtils.getField(getClass(), "buyingList"); - try { - if (v82191 != null) - o = (MerchantRecipeList) v82191.get(this); - Logger.WARNING("Is BuyingList Valid? " + (v82191 != null)); - return v82191 != null ? o : null; - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - return null; - } - } - - protected void setBuyingList(MerchantRecipeList f) { - try { - Logger.WARNING("set BuyingList? "+(ReflectionUtils.setField(this, "buyingList", f))); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } - } - - protected Village getVillageObject() { - Field v82191 = ReflectionUtils.getField(getClass(), "villageObj"); - try { - return v82191 != null ? (Village) v82191.get(this) : null; - } catch (IllegalArgumentException | IllegalAccessException e) { - return null; - } - } - - protected String getLastBuyingPlayer() { - Field v82191 = ReflectionUtils.getField(getClass(), "lastBuyingPlayer"); - try { - return v82191 != null ? (String) v82191.get(this) : ""; - } catch (IllegalArgumentException | IllegalAccessException e) { - return ""; - } - } - - public MerchantRecipeList getRecipes(EntityPlayer p_70934_1_) { - if (getBuyingList() == null) { - this.addDefaultEquipmentAndRecipies(1); - } - return getBuyingList(); - } - - /** - * Adjusts the probability of obtaining a given recipe being offered by a - * villager - */ - private float adjustProbability(float p_82188_1_) { - float f1 = p_82188_1_ + getField_82191_bN(); - return f1 > 0.9F ? 0.9F - (f1 - 0.9F) : f1; - } - - /** - * based on the villagers profession add items, equipment, and recipies adds - * par1 random items to the list of things that the villager wants to buy. (at - * most 1 of each wanted type is added) - */ - private void addDefaultEquipmentAndRecipies(int p_70950_1_) { - if (this.getBuyingList() != null) { - setField_82191_bN(MathHelper.sqrt_float((float) this.getBuyingList().size()) * 0.2F); - } else { - setField_82191_bN(0.0F); - } - - MerchantRecipeList merchantrecipelist; - merchantrecipelist = new MerchantRecipeList(); - VillagerRegistry.manageVillagerTrades(merchantrecipelist, this, this.getProfession(), this.rand); - int k; - label50: - - switch (this.getProfession()) { - case 0: - addPurchaseRecipe(merchantrecipelist, Items.wheat, this.rand, this.adjustProbability(0.9F)); - addPurchaseRecipe(merchantrecipelist, Item.getItemFromBlock(Blocks.wool), this.rand, - this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.chicken, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.cooked_fished, this.rand, this.adjustProbability(0.4F)); - addEmeraldTrade(merchantrecipelist, Items.bread, this.rand, this.adjustProbability(0.9F)); - addEmeraldTrade(merchantrecipelist, Items.melon, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.apple, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cookie, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.shears, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.flint_and_steel, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cooked_chicken, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.arrow, this.rand, this.adjustProbability(0.5F)); - - if (this.rand.nextFloat() < this.adjustProbability(0.5F)) { - merchantrecipelist.add(new MerchantRecipe(new ItemStack(Blocks.gravel, 10), - new ItemStack(Items.emerald), new ItemStack(Items.flint, 4 + this.rand.nextInt(2), 0))); - } - - break; - case 1: - addPurchaseRecipe(merchantrecipelist, Items.paper, this.rand, this.adjustProbability(0.8F)); - addPurchaseRecipe(merchantrecipelist, Items.book, this.rand, this.adjustProbability(0.8F)); - addPurchaseRecipe(merchantrecipelist, Items.written_book, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.bookshelf), this.rand, - this.adjustProbability(0.8F)); - addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glass), this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.compass, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.clock, this.rand, this.adjustProbability(0.2F)); - - if (this.rand.nextFloat() < this.adjustProbability(0.07F)) { - Enchantment enchantment = Enchantment.enchantmentsBookList[this.rand - .nextInt(Enchantment.enchantmentsBookList.length)]; - int i1 = MathHelper.getRandomIntegerInRange(this.rand, enchantment.getMinLevel(), - enchantment.getMaxLevel()); - ItemStack itemstack = Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(enchantment, i1)); - k = 2 + this.rand.nextInt(5 + i1 * 10) + 3 * i1; - merchantrecipelist - .add(new MerchantRecipe(new ItemStack(Items.book), new ItemStack(Items.emerald, k), itemstack)); - } - - break; - case 2: - addEmeraldTrade(merchantrecipelist, Items.ender_eye, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.experience_bottle, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.redstone, this.rand, this.adjustProbability(0.4F)); - addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glowstone), this.rand, - this.adjustProbability(0.3F)); - Item[] aitem = new Item[] { Items.iron_sword, Items.diamond_sword, Items.iron_chestplate, - Items.diamond_chestplate, Items.iron_axe, Items.diamond_axe, Items.iron_pickaxe, - Items.diamond_pickaxe }; - Item[] aitem1 = aitem; - int j = aitem.length; - k = 0; - - while (true) { - if (k >= j) { - break label50; - } - - Item item = aitem1[k]; - - if (this.rand.nextFloat() < this.adjustProbability(0.05F)) { - merchantrecipelist.add(new MerchantRecipe(new ItemStack(item, 1, 0), - new ItemStack(Items.emerald, 2 + this.rand.nextInt(3), 0), - EnchantmentHelper.addRandomEnchantment(this.rand, new ItemStack(item, 1, 0), - 5 + this.rand.nextInt(15)))); - } - - ++k; - } - case 3: - addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); - addPurchaseRecipe(merchantrecipelist, Items.iron_ingot, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.diamond, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.iron_sword, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_sword, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.iron_axe, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_axe, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.iron_pickaxe, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_pickaxe, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.iron_shovel, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_shovel, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_hoe, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_hoe, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_boots, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_boots, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_helmet, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_helmet, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_chestplate, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_chestplate, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.iron_leggings, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.diamond_leggings, this.rand, this.adjustProbability(0.2F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_boots, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_helmet, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_chestplate, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.chainmail_leggings, this.rand, this.adjustProbability(0.1F)); - break; - case 4: - addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); - addPurchaseRecipe(merchantrecipelist, Items.porkchop, this.rand, this.adjustProbability(0.5F)); - addPurchaseRecipe(merchantrecipelist, Items.beef, this.rand, this.adjustProbability(0.5F)); - addEmeraldTrade(merchantrecipelist, Items.saddle, this.rand, this.adjustProbability(0.1F)); - addEmeraldTrade(merchantrecipelist, Items.leather_chestplate, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.leather_boots, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.leather_helmet, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.leather_leggings, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cooked_porkchop, this.rand, this.adjustProbability(0.3F)); - addEmeraldTrade(merchantrecipelist, Items.cooked_beef, this.rand, this.adjustProbability(0.3F)); - } - - if (merchantrecipelist.isEmpty()) { - addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, 1.0F); - } - - Collections.shuffle(merchantrecipelist); - - if (this.getBuyingList() == null) { - this.setBuyingList(new MerchantRecipeList()); - } - - for (int l = 0; l < p_70950_1_ && l < merchantrecipelist.size(); ++l) { - try { - this.getBuyingList().addToListWithCheck((MerchantRecipe) merchantrecipelist.get(l)); - } - catch (Throwable t) { - Logger.INFO("Villager with ID "+this.entityUniqueID.toString()+" at | X: "+this.posX+" Y: "+this.posY+" Z: "+this.posZ+" may have corrupt trades, it is advised to remove/kill it."); - } - } - - try { - if (this.getBuyingList() != null) { - for (Object g : this.getBuyingList()) { - if (g != null) { - if (g instanceof MerchantRecipe) { - MerchantRecipe m = (MerchantRecipe) g; - ItemStack selling = m.getItemToSell(); - ItemStack[] buying = new ItemStack[] {m.getItemToBuy(), m.getSecondItemToBuy() != null ? m.getSecondItemToBuy() : null}; - if (selling == null) { - Logger.WARNING("Villager is Selling an invalid item"); - } - else if (buying[0] == null && buying[1] == null) { - Logger.WARNING("Villager is buying two invalid items"); - } - else { - Logger.WARNING("Villager is Selling x"+selling.stackSize+selling.getDisplayName()+" for x"+buying[0].stackSize+" "+buying[0].getDisplayName()+buying[1] != null ? " and for x"+buying[1].stackSize+" "+buying[1].getDisplayName() : ""); - } - } - else - Logger.WARNING("Found: "+g.getClass().getName()); - } - } - } - else { - - } - } - catch (Throwable t) { - - } - - } - - /** - * main AI tick function, replaces updateEntityActionState - */ - @Override - protected void updateAITick() { - if (!this.isTrading()) { - if (this.getNeedsInitilization()) { - if (this.getBuyingList().size() > 1) { - Iterator iterator = this.getBuyingList().iterator(); - - while (iterator.hasNext()) { - MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); - - if (merchantrecipe.isRecipeDisabled()) { - merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2); - } - } - } - - this.addDefaultEquipmentAndRecipies(1); - this.setNeedsInitilization(false); - - if (this.getVillageObject() != null && this.getLastBuyingPlayer() != null) { - this.worldObj.setEntityState(this, (byte) 14); - this.getVillageObject().setReputationForPlayer(this.getLastBuyingPlayer(), 1); - } - } - } - super.updateAITick(); - } - - public static void addEmeraldTrade(MerchantRecipeList aRecipeList, Item aItem, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - int i = getLootAmount_BlacksmithSellingList(aItem, aRand); - ItemStack itemstack; - ItemStack itemstack1; - - if (i < 0) { - itemstack = new ItemStack(Items.emerald, 1, 0); - itemstack1 = new ItemStack(aItem, -i, 0); - } else { - itemstack = new ItemStack(Items.emerald, i, 0); - itemstack1 = new ItemStack(aItem, 1, 0); - } - - aRecipeList.add(new MerchantRecipe(itemstack, itemstack1)); - } - } - - public static void addCustomTrade(MerchantRecipeList aRecipeList, ItemStack aItem1, ItemStack aItem2, ItemStack aItem3, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - aRecipeList.add(new MerchantRecipe(aItem1, aItem2, aItem3)); - } - } - - private static int getLootAmount_BlacksmithSellingList(Item aItem, Random aRand) { - Tuple tuple = (Tuple) blacksmithSellingList.get(aItem); - return tuple == null ? 1 - : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() - ? ((Integer) tuple.getFirst()).intValue() - : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( - ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); - } - - public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - aTradeList.add(new MerchantRecipe(getSimpleLootStack(aItem, aRand), Items.emerald)); - } - } - - private static ItemStack getSimpleLootStack(Item aItem, Random aRand) { - return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), 0); - } - - public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, int aMeta, Random aRand, float aChance) { - if (aRand.nextFloat() < aChance) { - aTradeList.add(new MerchantRecipe(getComplexLootStack(aItem, aMeta, aRand), Items.emerald)); - } - } - - private static ItemStack getComplexLootStack(Item aItem, int aMeta, Random aRand) { - return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), aMeta); - } - - private static int getLootAmount_VillagerSellingList(Item aItem, Random aRand) { - Tuple tuple = (Tuple) villagersSellingList.get(aItem); - return tuple == null ? 1 - : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() - ? ((Integer) tuple.getFirst()).intValue() - : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( - ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java b/src/Java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java deleted file mode 100644 index 61db98e803..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.plugin.villagers.entity.trade; - -import java.util.Random; - -import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.village.MerchantRecipeList; - -public abstract class BaseVillagerTrade implements IVillageTradeHandler { - - - /* - Recently in my mod I started working on a new villager and after doing so I could not figure out to assign new trades to this villager. - Registering the villager - VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());} - VillagerRegistry.instance().registerVillagerId(8); - VillagerRegistry.instance().registerVillagerSkin(8, new ResourceLocation("chow", "textures/dealer.png")); - VillagerRegistry.instance().getRegisteredVillagers(); - In my trade handler for vanilla villagers it goes off case 0 for instance being the farmer. I thought that it being case 8 would represent the id 8 for the custom villager but it still doesn't work. Could anyone help me out with this please? - * - * - First, you'll need to make a new class that extends IVillageTradeHandler. - In the constructor, add ItemStacks of the items you want it to trade to an ArrayList, - then in the manipulateTradesForVillager method, have it make sure the villager is yours by using villager.getProfession() - and your villager ID, then in a for loop use recipeList.addToListWithCheck to add new instances of MerchantRecipe to your villager's trade list. - Then, in your mod's main class, register the trade handler with VillageRegistry.instance().registerVillagerTradeHandler(villagerId, instanceOfTradeHandler); - */ - - @Override - public abstract void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random); - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java b/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java deleted file mode 100644 index 28416793f5..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java +++ /dev/null @@ -1,69 +0,0 @@ -package gtPlusPlus.plugin.villagers.tile; - -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; -import gtPlusPlus.core.block.ModBlocks; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.MobSpawnerBaseLogic; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class MobSpawnerCustomLogic extends MobSpawnerBaseLogic { - - private TileEntityGenericSpawner mTile; - - public MobSpawnerCustomLogic(TileEntityGenericSpawner tile) { - if (tile != null) { - mTile = tile; - } - - if (TileEntityGenericSpawner.mSpawners.get(mTile.getID()) != null) { - Class c = TileEntityGenericSpawner.mSpawners.get(mTile.getID()); - EntityRegistration x = EntityRegistry.instance().lookupModSpawn(c, false); - if (x != null) { - this.setEntityName(x.getEntityName()); - } - } - - } - - @Override - public void func_98267_a(int eventID) { - if (mTile != null) mTile.getWorldObj().addBlockEvent(mTile.xCoord, mTile.yCoord, mTile.zCoord, ModBlocks.blockCustomMobSpawner, eventID, 0); - } - - @Override - public World getSpawnerWorld() { - if (mTile != null) return mTile.getWorldObj(); - return null; - } - - @Override - public int getSpawnerX() { - if (mTile != null) return mTile.xCoord; - return 0; - } - - @Override - public int getSpawnerY() { - if (mTile != null) return mTile.yCoord; - return 0; - } - - @Override - public int getSpawnerZ() { - if (mTile != null) return mTile.zCoord; - return 0; - } - - @Override - public void setRandomEntity(MobSpawnerBaseLogic.WeightedRandomMinecart p_98277_1_) { - super.setRandomEntity(p_98277_1_); - if (mTile != null) { - if (this.getSpawnerWorld() != null) { - this.getSpawnerWorld().markBlockForUpdate(mTile.xCoord, mTile.yCoord, mTile.zCoord); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java b/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java deleted file mode 100644 index 45b8c9941b..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.plugin.villagers.tile; - -import java.util.HashMap; -import java.util.Map; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.MobSpawnerBaseLogic; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityMobSpawner; - -public class TileEntityGenericSpawner extends TileEntityMobSpawner { - - /* - * Static Variables - */ - - /** A HashMap storing string names of classes mapping to the actual java.lang.Class type. */ - private static Map nameToClassMap_Ex = new HashMap(); - /** A HashMap storing the classes and mapping to the string names (reverse of nameToClassMap). */ - private static Map classToNameMap_Ex = new HashMap(); - - /** - * The Mob Spawner Map - */ - public static HashMap> mSpawners = new HashMap>(); - - /** - * Registers a New Mob Spawner Type - * - * @param aID - * - the Spawner type ID - * @param aEntity - * - the Entity which you'd like to spawn - */ - public static boolean registerNewMobSpawner(int aID, Class aEntity) { - int registered = mSpawners.size(); - Logger.INFO("Currently "+registered+" spawners are registered."); - if (!mSpawners.containsKey(aID) && !mSpawners.containsValue(aEntity)) { - mSpawners.put(aID, aEntity); - } - return mSpawners.size() > registered; - } - - /* - * Instance Variables - */ - - /** - * The {@link Entity} type which spawns. - */ - protected int mID; - private final Class mSpawnType; - private MobSpawnerCustomLogic spawnerLogic; - - /* - * Constructors - */ - - /** - * Constructs a new Spawner, based on an existing type registered. - * - * @param aID - * - The ID in the {@link mSpawners} map. - */ - public TileEntityGenericSpawner(int aID) { - mID = aID; - if (mSpawners.get(aID) != null) { - mSpawnType = mSpawners.get(aID); - } else { - mSpawnType = null; - } - - // Last thing to Init - generateLogicObject(); - } - - /** - * Constructs a new Spawner, then registers it. - * - * @param aID - * - The ID to be used in the {@link mSpawners} map. - * @param aEntity - * - The {@link Entity} type which will be spawned. - */ - public TileEntityGenericSpawner(int aID, Entity aEntity) { - mID = aID; - if (aEntity != null) { - mSpawnType = aEntity.getClass(); - if (mSpawners.containsKey(aID)) { - registerNewMobSpawner(aID, mSpawnType); - } - } else { - mSpawnType = null; - } - - // Last thing to Init - generateLogicObject(); - } - - public final MobSpawnerCustomLogic getLogic() { - if (spawnerLogic == null || spawnerLogic.getSpawnerWorld() == null) { - generateLogicObject(); - } - return spawnerLogic; - } - - private final void generateLogicObject() { - spawnerLogic = new MobSpawnerCustomLogic(this); - } - - public int getID() { - return this.mID; - } - - @Override - public void readFromNBT(NBTTagCompound p_145839_1_) { - if (hasInternalFieldBeenSet()) { - this.getLogic().readFromNBT(p_145839_1_); - this.xCoord = p_145839_1_.getInteger("x"); - this.yCoord = p_145839_1_.getInteger("y"); - this.zCoord = p_145839_1_.getInteger("z"); - this.mID = p_145839_1_.getInteger("mID"); - } - } - - @Override - public void writeToNBT(NBTTagCompound p_145841_1_) { - if (hasInternalFieldBeenSet()) { - String s = (String) classToNameMap_Ex.get(this.getClass()); - if (s == null){ - for (Object g : classToNameMap_Ex.values()) { - if (g instanceof String) { - Logger.INFO("Found Translation for "+((Class) nameToClassMap_Ex.get(g)).getName()+": "+g); - } - } - - //throw new RuntimeException(this.getClass() + " is missing a mapping! This is a bug!"); - s = mSpawners.containsKey(this.mID) ? mSpawners.get(this.mID).getSimpleName() : "bad.class.name"; - p_145841_1_.setString("id", s); - Logger.WARNING(this.getClass() + " is missing a mapping! This is a bug! Used key: "+s); - p_145841_1_.setInteger("x", this.xCoord); - p_145841_1_.setInteger("y", this.yCoord); - p_145841_1_.setInteger("z", this.zCoord); - p_145841_1_.setInteger("mID", this.mID); - } - else { - Logger.INFO(this.getClass() + " is not missing a mapping! Used key: "+s); - p_145841_1_.setString("id", s); - p_145841_1_.setInteger("x", this.xCoord); - p_145841_1_.setInteger("y", this.yCoord); - p_145841_1_.setInteger("z", this.zCoord); - p_145841_1_.setInteger("mID", this.mID); - } - this.getLogic().writeToNBT(p_145841_1_); - } - } - - @Override - public void updateEntity() { - if (Utils.isServer()) { - mTicks++; - if (hasInternalFieldBeenSet()) { - this.getLogic().updateSpawner(); - } - } - } - - private boolean isReady = false; - private long mTicks = 0; - - private boolean hasInternalFieldBeenSet() { - if (isReady && mTicks % 200 != 0) { - return true; - } else { - - if (Utils.isServer()) { - try { - Map a1 = (Map) ReflectionUtils.getField(TileEntity.class, "nameToClassMap").get(this); - Map a2 = (Map) ReflectionUtils.getField(TileEntity.class, "classToNameMap").get(this); - if (a1 != null) { - if (nameToClassMap_Ex == null) { - nameToClassMap_Ex = a1; - } - if (nameToClassMap_Ex != null) { - if (nameToClassMap_Ex.size() != a1.size()) { - nameToClassMap_Ex = a1; - } - } - } - if (a2 != null) { - if (classToNameMap_Ex == null) { - classToNameMap_Ex = a2; - } - if (classToNameMap_Ex != null) { - if (classToNameMap_Ex.size() != a2.size()) { - classToNameMap_Ex = a2; - } - } - if (nameToClassMap_Ex != null && classToNameMap_Ex != null) { - //Logger.INFO("nameToClassMap_Ex has a size of "+nameToClassMap_Ex.size()+"."); - //Logger.INFO("a1 has a size of "+a1.size()+"."); - //Logger.INFO("classToNameMap_Ex has a size of "+classToNameMap_Ex.size()+"."); - //Logger.INFO("a2 has a size of "+a2.size()+"."); - isReady = true; - return true; - } - } - - /*Field mInternalLogicField = ReflectionUtils.getField(getClass(), "field_145882_a"); - if (mInternalLogicField != null) { - MobSpawnerBaseLogic a = (MobSpawnerBaseLogic) mInternalLogicField.get(this); - if (a != null) { - ReflectionUtils.setField(this, "field_145882_a", getLogic()); - if (a.equals(getLogic())) { - isReady = true; - return true; - } - } - }*/ - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - return false; - } - } - - /** - * Called when a client event is received with the event number and argument, - * see World.sendClientEvent - */ - @Override - public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { - return this.spawnerLogic.setDelayToMin(p_145842_1_) ? true : super.receiveClientEvent(p_145842_1_, p_145842_2_); - } - - @Override - public MobSpawnerBaseLogic func_145881_a() { - return this.spawnerLogic; - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java deleted file mode 100644 index 3baca10792..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java +++ /dev/null @@ -1,161 +0,0 @@ -package gtPlusPlus.plugin.villagers.trade; - -import static java.util.Collections.shuffle; - -import java.util.Collections; -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.village.MerchantRecipe; -import net.minecraft.village.MerchantRecipeList; - -public class TradeHandlerAboriginal extends TradeHandlerBase { - - private final static AutoMap mInputs = new AutoMap(); - private final static AutoMap mOutputs = new AutoMap(); - private static boolean initialised = false; - - public static void init() { - mOutputs.put(ItemUtils.getSimpleStack(Blocks.anvil, 1)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.bookshelf, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.cactus, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.dirt, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.cobblestone, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.mossy_cobblestone, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.pumpkin, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.hardened_clay, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.log, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.obsidian, 8)); - mOutputs.put(ItemUtils.getSimpleStack(Items.wheat, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.gravel, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Blocks.sand, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.apple, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.emerald, 1)); - mOutputs.put(ItemUtils.getSimpleStack(Items.diamond, 1)); - mOutputs.put(ItemUtils.getSimpleStack(Items.baked_potato, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.beef, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.bone, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.bread, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.carrot, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.potato, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.poisonous_potato, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.chicken, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.porkchop, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_beef, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_chicken, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_porkchop, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.fish, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_fished, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.feather, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.egg, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.gold_nugget, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.leather, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.melon_seeds, 0)); - mOutputs.put(ItemUtils.getSimpleStack(Items.reeds, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.wooden_door)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.log)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.log2)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.planks)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.sapling)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.sandstone)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.nether_brick)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.bookshelf)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.crafting_table)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.gravel)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.hardened_clay)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.cactus)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.quartz_block)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.stone)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.mossy_cobblestone)); - mInputs.put(ItemUtils.getSimpleStack(Items.apple, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.emerald, 1)); - mInputs.put(ItemUtils.getSimpleStack(Items.diamond, 1)); - mInputs.put(ItemUtils.getSimpleStack(Items.baked_potato, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.beef, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.bone, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.bread, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.carrot, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.potato, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.poisonous_potato, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.chicken, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.porkchop, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.cooked_beef, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.cooked_chicken, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.cooked_porkchop, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.fish, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.cooked_fished, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.feather, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.egg, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.gold_nugget, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.leather, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.melon_seeds, 0)); - mInputs.put(ItemUtils.getSimpleStack(Items.reeds, 0)); - initialised = true; - } - - - public TradeHandlerAboriginal() { - Logger.INFO("Created Trade Manager for 'Trader' villager profession type."); - } - - @SuppressWarnings("unchecked") - @Override - public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - if (!initialised) { - init(); - } - if (initialised) { - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); - shuffle(recipeList); - } - } - - private ItemStack getInput() { - ItemStack input = mInputs.get(MathUtils.randInt(0, mInputs.size()-1)); - int outputSize = (input.stackSize == 0 ? (Math.max(MathUtils.randInt(1, 64), MathUtils.randInt(1, 32))) : input.stackSize); - return ItemUtils.getSimpleStack(input, outputSize); - } - - final static int MID_BOUND = 24; - private ItemStack getOutput() { - ItemStack output = mOutputs.get(MathUtils.randInt(0, mOutputs.size()-1)); - int outputSize = (output.stackSize == 0 ? (Math.min(MathUtils.randInt(MathUtils.randInt(1, MID_BOUND), MathUtils.randInt(MID_BOUND, 32)), MathUtils.randInt(MathUtils.randInt(12, MID_BOUND), MathUtils.randInt(MID_BOUND, 48)))) : output.stackSize); - return ItemUtils.getSimpleStack(output, outputSize); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java deleted file mode 100644 index 215dc0683b..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.plugin.villagers.trade; - -import java.util.Collections; -import java.util.Random; - -import gtPlusPlus.core.recipe.common.CI; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.village.MerchantRecipe; -import net.minecraft.village.MerchantRecipeList; - -public class TradeHandlerBanker extends TradeHandlerBase { - - - @SuppressWarnings("unchecked") - @Override - public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - //if (villager.getProfession() == 7735) { - recipeList.add(new MerchantRecipe(CI.electricMotor_LV, CI.electricPiston_LV, CI.robotArm_LV)); - recipeList.add(new MerchantRecipe(CI.electricMotor_MV, CI.electricPiston_MV, CI.robotArm_MV)); - recipeList.add(new MerchantRecipe(CI.electricMotor_HV, CI.electricPiston_HV, CI.robotArm_HV)); - recipeList.add(new MerchantRecipe(CI.electricMotor_EV, CI.electricPiston_EV, CI.robotArm_EV)); - recipeList.add(new MerchantRecipe(CI.electricMotor_IV, CI.electricPiston_IV, CI.robotArm_IV)); - //Collections.shuffle(recipeList); - //} - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java deleted file mode 100644 index b726ebefff..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java +++ /dev/null @@ -1,25 +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 gtPlusPlus.plugin.villagers.trade; - -import java.util.Random; - -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.village.MerchantRecipeList; -import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; - -public abstract class TradeHandlerBase implements IVillageTradeHandler { - - @SuppressWarnings("unchecked") - @Override - public abstract void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random); - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java deleted file mode 100644 index 922316b136..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.plugin.villagers.trade; - -import java.util.Collections; -import java.util.Random; - -import gtPlusPlus.core.recipe.common.CI; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.village.MerchantRecipe; -import net.minecraft.village.MerchantRecipeList; - -public class TradeHandlerTechnician extends TradeHandlerBase { - - - @SuppressWarnings("unchecked") - @Override - public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - //if (villager.getProfession() == 7737) { - recipeList.add(new MerchantRecipe(CI.machineHull_LV, CI.electricMotor_LV, CI.machineHull_LV)); - recipeList.add(new MerchantRecipe(CI.machineHull_MV, CI.electricMotor_MV, CI.machineHull_MV)); - recipeList.add(new MerchantRecipe(CI.machineHull_HV, CI.electricMotor_HV, CI.machineHull_HV)); - recipeList.add(new MerchantRecipe(CI.machineHull_EV, CI.electricMotor_EV, CI.machineHull_EV)); - recipeList.add(new MerchantRecipe(CI.machineHull_IV, CI.electricMotor_IV, CI.machineHull_IV)); - //Collections.shuffle(recipeList); - //} - } - -} diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java deleted file mode 100644 index 0025c054bd..0000000000 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.plugin.villagers.trade; - -import java.util.Collections; -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.entity.passive.EntityVillager; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.village.MerchantRecipe; -import net.minecraft.village.MerchantRecipeList; - -public class TradeHandlerTrader extends TradeHandlerBase { - - public TradeHandlerTrader() { - Logger.INFO("Created Trade Manager for 'Trader' villager profession type."); - } - - @SuppressWarnings("unchecked") - @Override - public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - ItemStack Ore1 = null, Ore2 = null; - if (Ore1 == null) { - Ore1 = ELEMENT.getInstance().SILICON.getOre(1); - } - if (Ore2 == null) { - Ore2 = ELEMENT.getInstance().ALUMINIUM.getOre(1); - } - if (Ore1 == null) { - Ore1 = ELEMENT.getInstance().GOLD.getOre(1); - } - if (Ore2 == null) { - Ore2 = ELEMENT.getInstance().LEAD.getOre(1); - } - recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("logWood", 32), ELEMENT.getInstance().IRON.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 32), ELEMENT.getInstance().COPPER.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.obsidian, 6), ELEMENT.getInstance().TIN.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.glowstone, 32), Ore1)); - recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.piston, 32), Ore2)); - Collections.shuffle(recipeList); - } - -} diff --git a/src/Java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java b/src/Java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java deleted file mode 100644 index 3317ef6a11..0000000000 --- a/src/Java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.plugin.waila; - -import gtPlusPlus.api.interfaces.IPlugin; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.plugin.manager.Core_Manager; - -public class Core_WailaPlugin implements IPlugin { - - final static Core_WailaPlugin mInstance; - static boolean mActive = false; - - static { - mInstance = new Core_WailaPlugin(); - mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); - } - - Core_WailaPlugin() { - Core_Manager.registerPlugin(this); - } - - @Override - public boolean preInit() { - if (LoadedMods.Waila) { - mActive = true; - } - return mActive; - } - - @Override - public boolean init() { - return mActive; - } - - @Override - public boolean postInit() { - return mActive; - } - - @Override - public boolean serverStart() { - return mActive; - } - - @Override - public boolean serverStop() { - return mActive; - } - - @Override - public String getPluginName() { - return "GT++ WAILA module"; - } - - @Override - public String getPluginAbbreviation() { - return "Look"; - } - -} diff --git a/src/Java/gtPlusPlus/preloader/CORE_Preloader.java b/src/Java/gtPlusPlus/preloader/CORE_Preloader.java deleted file mode 100644 index 49209307f7..0000000000 --- a/src/Java/gtPlusPlus/preloader/CORE_Preloader.java +++ /dev/null @@ -1,33 +0,0 @@ -package gtPlusPlus.preloader; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import cpw.mods.fml.common.versioning.ArtifactVersion; - -public class CORE_Preloader { - - public static final String NAME = "GT++ Preloader"; - public static final String MODID = "GT++_Preloader"; - public static final String VERSION = "0.5-Beta"; - public static final List DEPENDENCIES; - public static final String JAVA_VERSION = System.getProperty("java.version"); - - public static File MC_DIR; - public static boolean DEV_ENVIRONMENT = false; - public static boolean DEBUG_MODE = false; - public static boolean enableOldGTcircuits = false; - public static int enableWatchdogBGM = 0; - - public static void setMinecraftDirectory(File aDir) { - MC_DIR = aDir; - } - - static { - ArrayList deps = new ArrayList(); - //deps.add("required-before:gregtech;"); - DEPENDENCIES = Collections.unmodifiableList(deps); - } -} diff --git a/src/Java/gtPlusPlus/preloader/ChunkDebugger.java b/src/Java/gtPlusPlus/preloader/ChunkDebugger.java deleted file mode 100644 index 06964d31fa..0000000000 --- a/src/Java/gtPlusPlus/preloader/ChunkDebugger.java +++ /dev/null @@ -1,54 +0,0 @@ -package gtPlusPlus.preloader; - -import java.util.LinkedHashMap; -import java.util.Map; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeChunkManager.Ticket; - -public class ChunkDebugger { - - - public static final Map> mChunkTicketsMap = new LinkedHashMap>(); - public static final Map> mChunksLoadedByModsMap = new LinkedHashMap>(); - - public static void storeTicketToCache(Ticket aTicket, World aWorld) { - mChunkTicketsMap.put(aTicket.hashCode(), new Pair(aTicket.getModId(), ""+aTicket.world.provider.dimensionId)); - Logger.REFLECTION("Ticket created by "+aTicket.getModId()+" for dimension "+aTicket.world.provider.dimensionId); - } - - public static void storeLoadChunkToCache(Ticket aTicket, ChunkCoordIntPair aChunk) { - mChunksLoadedByModsMap.put(aChunk.toString(), new Pair(aTicket.getModId(), aChunk.toString())); - Logger.REFLECTION("Chunk Loaded by "+aTicket.getModId()+" at position "+aChunk.toString()+" for dimension "+aTicket.world.provider.dimensionId); - } - - public static void removeTicketFromCache(Ticket aTicket) { - Pair aPair = mChunkTicketsMap.get(aTicket.hashCode()); - String aKey = aPair.getKey(); - if (aKey == null) { - aKey = "Invalid ModId"; - } - Logger.REFLECTION("Ticket released by "+aKey+" for dimension "+aTicket.world.provider.dimensionId); - mChunkTicketsMap.remove(aTicket.hashCode()); - } - - public static void removeLoadedChunkFromCache(ChunkCoordIntPair aChunk) { - if (aChunk == null || aChunk.toString() == null) { - return; - } - Pair aPair = mChunksLoadedByModsMap.get(aChunk.toString()); - if (aPair == null) { - return; - } - String aKey = aPair.getKey(); - String aValue = aPair.getValue(); - if (aKey != null && aValue != null) { - Logger.REFLECTION("Chunk Unloaded by "+aKey+" at position "+aChunk.toString()+""); - } - mChunksLoadedByModsMap.remove(aChunk.toString()); - } - -} diff --git a/src/Java/gtPlusPlus/preloader/CustomClassLoader.java b/src/Java/gtPlusPlus/preloader/CustomClassLoader.java deleted file mode 100644 index 56394c11f0..0000000000 --- a/src/Java/gtPlusPlus/preloader/CustomClassLoader.java +++ /dev/null @@ -1,57 +0,0 @@ -package gtPlusPlus.preloader; - -import java.security.AllPermission; -import java.security.CodeSource; -import java.security.Permissions; -import java.security.ProtectionDomain; -import java.security.cert.Certificate; -import java.util.HashMap; - -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.tree.ClassNode; - -public class CustomClassLoader extends ClassLoader { - - private HashMap classes = new HashMap(); - - @Override - - public Class loadClass(String name) throws ClassNotFoundException { - return findClass(name); - } - - @Override - - protected Class findClass(String name) throws ClassNotFoundException { - ClassNode node = classes.get(name.replace('.', '/')); - if (node != null) - return nodeToClass(node); - else - return super.findClass(name); - } - - public final void addNode(ClassNode node) { - classes.put(node.name, node); - } - - private final Class nodeToClass(ClassNode node) { - if (super.findLoadedClass(node.name) != null) - return findLoadedClass(node.name); - ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); - node.accept(cw); - byte[] b = cw.toByteArray(); - return defineClass(node.name.replace('/', '.'), b, 0, b.length, getDomain()); - } - - private final ProtectionDomain getDomain() { - CodeSource code = new CodeSource(null, (Certificate[]) null); - return new ProtectionDomain(code, getPermissions()); - } - - private final Permissions getPermissions() { - Permissions permissions = new Permissions(); - permissions.add(new AllPermission()); - return permissions; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/preloader/DevHelper.java b/src/Java/gtPlusPlus/preloader/DevHelper.java deleted file mode 100644 index 70a3c53073..0000000000 --- a/src/Java/gtPlusPlus/preloader/DevHelper.java +++ /dev/null @@ -1,7139 +0,0 @@ -package gtPlusPlus.preloader; - -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; - -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.api.objects.data.weakref.WeakAutoMap; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.launchwrapper.Launch; - -public class DevHelper { - - private static final DevHelper mInstance; - public static final boolean mIsValidHelper; - - static { - mInstance = new DevHelper(); - if (DevHelperInternals.init()) { - mIsValidHelper = true; - } - else { - mIsValidHelper = false; - } - } - - public DevHelper() { - - } - - - - public static boolean isObfuscatedEnvironment() { - // Are we in a 'decompiled' environment? - boolean deobfuscatedEnvironment = false; - byte[] bs; - try { - bs = Launch.classLoader.getClassBytes("net.minecraft.world.World"); - if (bs != null) { - deobfuscatedEnvironment = true; - } else { - deobfuscatedEnvironment = false; - } - } catch (IOException e) { - } - return !deobfuscatedEnvironment; - } - - @SuppressWarnings("rawtypes") - public static Method getForgeMethod(Class c, String s, Class... varags) { - String s1, s2; - Method a, b; - s1 = s; - s2 = getSRG(s); - try { - a = ReflectionUtils.getMethod(c, s1, varags); - if (a != null) { - return a; - } - else { - b = ReflectionUtils.getMethod(c, s2, varags); - if (b != null) { - return b; - } - } - } - catch (Exception e) {} - return null; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private static synchronized final DevHelper getInstance() { - return mInstance; - } - - public static synchronized final boolean isValidHelperObject() { - return mIsValidHelper; - } - - public static String getSRG(String mForgeName) { - String aSRG = DevHelperInternals.forgeToSrg.get(mForgeName); - return aSRG != null ? aSRG : "BAD_SRG_NAME"; - } - - public static String getForge(String mSrgName) { - String aForgeName = DevHelperInternals.srgToForge.get(mSrgName); - return aForgeName != null ? aForgeName : "BAD_FORGE_NAME"; - } - - public static String getMinecraftClassName(String adeObName, boolean obfuscated) { - if (obfuscated) { - return getObfuscated(adeObName); - } - return adeObName; - } - - public static String getObfuscated(String mDeob) { - String obfuscatedClassname = DevHelperInternals.deObToOb.get(mDeob); - obfuscatedClassname = obfuscatedClassname != null ? obfuscatedClassname : "BAD_OBFUSCATED_CLASS_NAME"; - if (obfuscatedClassname.equals("BAD_OBFUSCATED_CLASS_NAME")) { - Preloader_Logger.INFO("[Fix] Failed to Get Deobfuscated name for "+mDeob); - } - return obfuscatedClassname; - } - - public static String getDeobfuscated(String mOb) { - String deobfuscatedClassname = DevHelperInternals.obToDeOb.get(mOb); - return deobfuscatedClassname != null ? deobfuscatedClassname : "BAD_DEOBFUSCATED_CLASS_NAME"; - } - - public static class DevHelperInternals { - public static final Map srgToForge = new HashMap(); - public static final Map forgeToSrg = new HashMap(); - private static WeakAutoMap> mInitMap = new WeakAutoMap>(); - - //Obfuscation - public static final Map obToDeOb = new HashMap(); - public static final Map deObToOb = new HashMap(); - private static WeakAutoMap> mObInitMap = new WeakAutoMap>(); - - private static boolean init() { - init1(); - init2(); - init3(); - init4(); - if (mInitMap.size() > 0) { - for (Pair p : mInitMap) { - if (p != null) { - String srg = p.getKey(); - String forge = p.getValue(); - srgToForge.put(srg, forge); - forgeToSrg.put(forge, srg); - } - } - } - - if (mObInitMap.size() > 0) { - for (Pair p : mObInitMap) { - if (p != null) { - String ob = p.getKey(); - String deOb = p.getValue(); - obToDeOb.put(ob, deOb); - deObToOb.put(deOb, ob); - } - } - } - Preloader_Logger.INFO("[DevHelper] mInitMap size: "+mInitMap.size()); - Preloader_Logger.INFO("[DevHelper] mObInitMap size: "+mObInitMap.size()); - - Preloader_Logger.INFO("[DevHelper] srgToForge size: "+srgToForge.size()); - Preloader_Logger.INFO("[DevHelper] forgeToSrg size: "+forgeToSrg.size()); - Preloader_Logger.INFO("[DevHelper] obToDeOb size: "+obToDeOb.size()); - Preloader_Logger.INFO("[DevHelper] deObToOb size: "+deObToOb.size()); - - if (srgToForge.size() > 0 && forgeToSrg.size() > 0 && obToDeOb.size() > 0 && deObToOb.size() > 0) { - if (srgToForge.size() == forgeToSrg.size() && obToDeOb.size() == deObToOb.size()) { - return true; - } - else { - if (srgToForge.size() != forgeToSrg.size()) { - int aKey1 = 0; - int aKey2 = 0; - HashMap aMissingForgeNames = new HashMap(); - HashMap aMissingSrgNames = new HashMap(); - Preloader_Logger.INFO("Mismatch between mapped Forge and Srg names, finding missing values."); - if (srgToForge.size() > forgeToSrg.size()) { - Preloader_Logger.INFO("More SRG Keys detected."); - for (String aKey : srgToForge.keySet()) { - if (!forgeToSrg.containsValue(aKey)) { - aMissingSrgNames.put(aKey1++, aKey); - } - } - } - else if (srgToForge.size() < forgeToSrg.size()) { - Preloader_Logger.INFO("More Forge Keys detected."); - for (String aKey : forgeToSrg.keySet()) { - if (!srgToForge.containsValue(aKey)) { - aMissingForgeNames.put(aKey2++, aKey); - } - } - } - if (!aMissingForgeNames.isEmpty()) { - for (String missingVal : aMissingForgeNames.values()) { - //Preloader_Logger.WARNING("Missing Forge value: "+missingVal); - } - } - if (!aMissingSrgNames.isEmpty()) { - for (String missingVal : aMissingSrgNames.values()) { - //Preloader_Logger.WARNING("Missing SRG value: "+missingVal); - } - } - } - if (obToDeOb.size() != deObToOb.size()) { - int aKey1 = 0; - int aKey2 = 0; - HashMap aMissingObfNames = new HashMap(); - HashMap aMissingDeObfNames = new HashMap(); - Preloader_Logger.INFO("Mismatch between mapped Obfuscated and Deobfuscated names, finding missing values."); - if (obToDeOb.size() > deObToOb.size()) { - Preloader_Logger.INFO("More Obfuscated Keys detected."); - for (String aKey : obToDeOb.keySet()) { - if (!deObToOb.containsValue(aKey)) { - aMissingObfNames.put(aKey1++, aKey); - } - } - } - else if (obToDeOb.size() < deObToOb.size()) { - Preloader_Logger.INFO("More Deobfuscated Keys detected."); - for (String aKey : deObToOb.keySet()) { - if (!obToDeOb.containsValue(aKey)) { - aMissingDeObfNames.put(aKey2++, aKey); - } - } - } - if (!aMissingObfNames.isEmpty()) { - for (String missingVal : aMissingObfNames.values()) { - Preloader_Logger.WARNING("Missing Obfuscated value: "+missingVal); - } - } - if (!aMissingDeObfNames.isEmpty()) { - for (String missingVal : aMissingDeObfNames.values()) { - Preloader_Logger.WARNING("Missing Deobfuscated value: "+missingVal); - } - } - } - } - } - - // return true anyway as some keys will mismatch. - return true; - } - - private static void init1() { - mInitMap.put(new Pair("func_100011_g", "getIsPotionDurationMax")); - mInitMap.put(new Pair("func_100012_b", "setPotionDurationMax")); - mInitMap.put(new Pair("func_100015_a", "isKeyDown")); - mInitMap.put(new Pair("func_102007_a", "canInsertItem")); - mInitMap.put(new Pair("func_102008_b", "canExtractItem")); - mInitMap.put(new Pair("func_104002_bU", "isNoDespawnRequired")); - mInitMap.put(new Pair("func_104055_i", "setForceGamemode")); - mInitMap.put(new Pair("func_104056_am", "getForceGamemode")); - mInitMap.put(new Pair("func_104112_b", "saveExtraData")); - mInitMap.put(new Pair("func_104140_m", "saveChunkData")); - mInitMap.put(new Pair("func_110123_P", "onChunkLoad")); - mInitMap.put(new Pair("func_110124_au", "getUniqueID")); - mInitMap.put(new Pair("func_110125_a", "setParticleIcon")); - mInitMap.put(new Pair("func_110128_b", "onBroken")); - mInitMap.put(new Pair("func_110130_b", "getKnotForBlock")); - mInitMap.put(new Pair("func_110131_b", "removeFrameFromMap")); - mInitMap.put(new Pair("func_110138_aP", "getMaxHealth")); - mInitMap.put(new Pair("func_110139_bj", "getAbsorptionAmount")); - mInitMap.put(new Pair("func_110140_aT", "getAttributeMap")); - mInitMap.put(new Pair("func_110142_aN", "getCombatTracker")); - mInitMap.put(new Pair("func_110143_aJ", "getHealth")); - mInitMap.put(new Pair("func_110144_aD", "getLastAttacker")); - mInitMap.put(new Pair("func_110145_l", "dismountEntity")); - mInitMap.put(new Pair("func_110147_ax", "applyEntityAttributes")); - mInitMap.put(new Pair("func_110148_a", "getEntityAttribute")); - mInitMap.put(new Pair("func_110149_m", "setAbsorptionAmount")); - mInitMap.put(new Pair("func_110159_bB", "updateLeashedState")); - mInitMap.put(new Pair("func_110160_i", "clearLeashed")); - mInitMap.put(new Pair("func_110161_a", "onSpawnWithEgg")); - mInitMap.put(new Pair("func_110162_b", "setLeashedToEntity")); - mInitMap.put(new Pair("func_110163_bv", "enablePersistence")); - mInitMap.put(new Pair("func_110164_bC", "allowLeashing")); - mInitMap.put(new Pair("func_110165_bF", "recreateLeash")); - mInitMap.put(new Pair("func_110166_bE", "getLeashedToEntity")); - mInitMap.put(new Pair("func_110167_bD", "getLeashed")); - mInitMap.put(new Pair("func_110171_b", "setHomeArea")); - mInitMap.put(new Pair("func_110172_bL", "getHomePosition")); - mInitMap.put(new Pair("func_110173_bK", "isWithinHomeDistanceCurrentPosition")); - mInitMap.put(new Pair("func_110174_bM", "getMaximumHomeDistance")); - mInitMap.put(new Pair("func_110175_bO", "hasHome")); - mInitMap.put(new Pair("func_110176_b", "isWithinHomeDistance")); - mInitMap.put(new Pair("func_110177_bN", "detachHome")); - mInitMap.put(new Pair("func_110195_a", "addGrowth")); - mInitMap.put(new Pair("func_110198_t", "increaseTemper")); - mInitMap.put(new Pair("func_110199_f", "openGUI")); - mInitMap.put(new Pair("func_110200_cJ", "canMate")); - mInitMap.put(new Pair("func_110202_bQ", "getHorseVariant")); - mInitMap.put(new Pair("func_110204_cc", "isEatingHaystack")); - mInitMap.put(new Pair("func_110206_u", "setJumpPower")); - mInitMap.put(new Pair("func_110207_m", "setChested")); - mInitMap.put(new Pair("func_110208_b", "setHorseWatchableBoolean")); - mInitMap.put(new Pair("func_110209_cd", "isRearing")); - mInitMap.put(new Pair("func_110212_cp", "getVariantTexturePaths")); - mInitMap.put(new Pair("func_110214_p", "setHorseType")); - mInitMap.put(new Pair("func_110215_cj", "getHorseJumpStrength")); - mInitMap.put(new Pair("func_110216_r", "spawnHorseParticles")); - mInitMap.put(new Pair("func_110217_cl", "getAngrySoundName")); - mInitMap.put(new Pair("func_110218_cm", "getMaxTemper")); - mInitMap.put(new Pair("func_110219_q", "setRearing")); - mInitMap.put(new Pair("func_110220_cK", "makeHorseRear")); - mInitMap.put(new Pair("func_110221_n", "setHasReproduced")); - mInitMap.put(new Pair("func_110222_cv", "isSterile")); - mInitMap.put(new Pair("func_110223_p", "getRearingAmount")); - mInitMap.put(new Pair("func_110224_ci", "dropChests")); - mInitMap.put(new Pair("func_110227_p", "setEatingHaystack")); - mInitMap.put(new Pair("func_110228_bR", "isAdultHorse")); - mInitMap.put(new Pair("func_110229_cs", "canCarryChest")); - mInitMap.put(new Pair("func_110231_cz", "makeHorseRearWithSound")); - mInitMap.put(new Pair("func_110233_w", "getHorseWatchableBoolean")); - mInitMap.put(new Pair("func_110234_j", "setHorseTamed")); - mInitMap.put(new Pair("func_110235_q", "setHorseVariant")); - mInitMap.put(new Pair("func_110238_s", "setTemper")); - mInitMap.put(new Pair("func_110240_a", "dropItemsInChest")); - mInitMap.put(new Pair("func_110243_cf", "getHasReproduced")); - mInitMap.put(new Pair("func_110244_cA", "dropChestItems")); - mInitMap.put(new Pair("func_110246_bZ", "isHorseJumping")); - mInitMap.put(new Pair("func_110247_cG", "setHorseTexturePaths")); - mInitMap.put(new Pair("func_110248_bS", "isTame")); - mInitMap.put(new Pair("func_110249_cI", "openHorseMouth")); - mInitMap.put(new Pair("func_110250_a", "getClosestHorse")); - mInitMap.put(new Pair("func_110251_o", "setHorseSaddled")); - mInitMap.put(new Pair("func_110252_cg", "getTemper")); - mInitMap.put(new Pair("func_110254_bY", "getHorseSize")); - mInitMap.put(new Pair("func_110255_k", "setHorseJumping")); - mInitMap.put(new Pair("func_110256_cu", "isUndead")); - mInitMap.put(new Pair("func_110257_ck", "isHorseSaddled")); - mInitMap.put(new Pair("func_110258_o", "getGrassEatingAmount")); - mInitMap.put(new Pair("func_110259_cr", "canWearArmor")); - mInitMap.put(new Pair("func_110260_d", "getHorseArmorIndex")); - mInitMap.put(new Pair("func_110261_ca", "isChested")); - mInitMap.put(new Pair("func_110262_ch", "prepareChunkForSpawn")); - mInitMap.put(new Pair("func_110263_g", "setTamedBy")); - mInitMap.put(new Pair("func_110264_co", "getHorseTexture")); - mInitMap.put(new Pair("func_110265_bP", "getHorseType")); - mInitMap.put(new Pair("func_110297_a_", "verifySellingItem")); - mInitMap.put(new Pair("func_110298_a", "displayGUIHorse")); - mInitMap.put(new Pair("func_110303_q", "getLocationCape")); - mInitMap.put(new Pair("func_110304_a", "getDownloadImageSkin")); - mInitMap.put(new Pair("func_110306_p", "getLocationSkin")); - mInitMap.put(new Pair("func_110311_f", "getLocationSkin")); - mInitMap.put(new Pair("func_110317_t", "isRidingHorse")); - mInitMap.put(new Pair("func_110318_g", "sendHorseJump")); - mInitMap.put(new Pair("func_110319_bJ", "getHorseJumpPower")); - mInitMap.put(new Pair("func_110322_i", "sendHorseInteraction")); - mInitMap.put(new Pair("func_110326_a", "setRecordPlaying")); - mInitMap.put(new Pair("func_110327_a", "renderIcons")); - mInitMap.put(new Pair("func_110430_a", "setEntityActionState")); - mInitMap.put(new Pair("func_110432_I", "getSession")); - mInitMap.put(new Pair("func_110434_K", "getTextureManager")); - mInitMap.put(new Pair("func_110435_P", "addDefaultResourcePack")); - mInitMap.put(new Pair("func_110436_a", "refreshResources")); - mInitMap.put(new Pair("func_110437_J", "getProxy")); - mInitMap.put(new Pair("func_110438_M", "getResourcePackRepository")); - mInitMap.put(new Pair("func_110441_Q", "updateDisplayMode")); - mInitMap.put(new Pair("func_110442_L", "getResourceManager")); - mInitMap.put(new Pair("func_110454_ao", "getServerProxy")); - mInitMap.put(new Pair("func_110455_j", "getOpPermissionLevel")); - mInitMap.put(new Pair("func_110462_b", "getPackFormat")); - mInitMap.put(new Pair("func_110468_c", "getFrameIndex")); - mInitMap.put(new Pair("func_110469_d", "getFrameTime")); - mInitMap.put(new Pair("func_110470_b", "frameHasTime")); - mInitMap.put(new Pair("func_110471_a", "getFrameHeight")); - mInitMap.put(new Pair("func_110472_a", "getFrameTimeSingle")); - mInitMap.put(new Pair("func_110473_c", "getFrameCount")); - mInitMap.put(new Pair("func_110474_b", "getFrameWidth")); - mInitMap.put(new Pair("func_110479_a", "getTextureBlur")); - mInitMap.put(new Pair("func_110480_b", "getTextureClamp")); - mInitMap.put(new Pair("func_110483_a", "getSectionName")); - mInitMap.put(new Pair("func_110492_a", "parseAnimationFrame")); - mInitMap.put(new Pair("func_110495_a", "hasNoTime")); - mInitMap.put(new Pair("func_110496_c", "getFrameIndex")); - mInitMap.put(new Pair("func_110497_b", "getFrameTime")); - mInitMap.put(new Pair("func_110503_a", "parseMetadataSection")); - mInitMap.put(new Pair("func_110504_a", "registerMetadataSectionType")); - mInitMap.put(new Pair("func_110505_a", "getGson")); - mInitMap.put(new Pair("func_110514_c", "getResourcePack")); - mInitMap.put(new Pair("func_110515_d", "getResourcePackName")); - mInitMap.put(new Pair("func_110516_a", "updateResourcePack")); - mInitMap.put(new Pair("func_110517_b", "closeResourcePack")); - mInitMap.put(new Pair("func_110518_a", "bindTexturePackIcon")); - mInitMap.put(new Pair("func_110519_e", "getTexturePackDescription")); - mInitMap.put(new Pair("func_110526_a", "getMetadata")); - mInitMap.put(new Pair("func_110527_b", "getInputStream")); - mInitMap.put(new Pair("func_110528_c", "hasMetadata")); - mInitMap.put(new Pair("func_110536_a", "getResource")); - mInitMap.put(new Pair("func_110537_b", "getLocationMcmeta")); - mInitMap.put(new Pair("func_110538_a", "addResourcePack")); - mInitMap.put(new Pair("func_110541_a", "reloadResources")); - mInitMap.put(new Pair("func_110542_a", "registerReloadListener")); - mInitMap.put(new Pair("func_110543_a", "clearResources")); - mInitMap.put(new Pair("func_110544_b", "notifyReloadListeners")); - mInitMap.put(new Pair("func_110545_a", "reloadResourcePack")); - mInitMap.put(new Pair("func_110549_a", "onResourceManagerReload")); - mInitMap.put(new Pair("func_110550_d", "tick")); - mInitMap.put(new Pair("func_110551_a", "loadTexture")); - mInitMap.put(new Pair("func_110552_b", "getGlTextureId")); - mInitMap.put(new Pair("func_110564_a", "updateDynamicTexture")); - mInitMap.put(new Pair("func_110565_c", "getTextureData")); - mInitMap.put(new Pair("func_110569_e", "initMissingImage")); - mInitMap.put(new Pair("func_110571_b", "loadTextureAtlas")); - mInitMap.put(new Pair("func_110572_b", "getAtlasSprite")); - mInitMap.put(new Pair("func_110573_f", "registerIcons")); - mInitMap.put(new Pair("func_110577_a", "bindTexture")); - mInitMap.put(new Pair("func_110578_a", "getDynamicTextureLocation")); - mInitMap.put(new Pair("func_110579_a", "loadTexture")); - mInitMap.put(new Pair("func_110580_a", "loadTickableTexture")); - mInitMap.put(new Pair("func_110581_b", "getTexture")); - mInitMap.put(new Pair("func_110586_a", "getPackImage")); - mInitMap.put(new Pair("func_110587_b", "getResourceDomains")); - mInitMap.put(new Pair("func_110589_b", "resourceExists")); - mInitMap.put(new Pair("func_110590_a", "getInputStream")); - mInitMap.put(new Pair("func_110591_a", "getInputStreamByName")); - mInitMap.put(new Pair("func_110592_c", "locationToName")); - mInitMap.put(new Pair("func_110593_b", "hasResourceName")); - mInitMap.put(new Pair("func_110594_c", "logNameNotLowercase")); - mInitMap.put(new Pair("func_110595_a", "getRelativeName")); - mInitMap.put(new Pair("func_110596_a", "readMetadata")); - mInitMap.put(new Pair("func_110599_c", "getResourcePackZipFile")); - mInitMap.put(new Pair("func_110605_c", "getResourceStream")); - mInitMap.put(new Pair("func_110609_b", "getRepositoryEntriesAll")); - mInitMap.put(new Pair("func_110611_a", "updateRepositoryEntriesAll")); - mInitMap.put(new Pair("func_110612_e", "getDirResourcepacks")); - mInitMap.put(new Pair("func_110613_c", "getRepositoryEntries")); - mInitMap.put(new Pair("func_110614_g", "getResourcePackFiles")); - mInitMap.put(new Pair("func_110616_f", "fixDirResourcepacks")); - mInitMap.put(new Pair("func_110623_a", "getResourcePath")); - mInitMap.put(new Pair("func_110624_b", "getResourceDomain")); - mInitMap.put(new Pair("func_110646_a", "getTextWithoutFormattingCodes")); - mInitMap.put(new Pair("func_110647_a", "getOSType")); - mInitMap.put(new Pair("func_110661_a", "parseDouble")); - mInitMap.put(new Pair("func_110662_c", "parseBoolean")); - mInitMap.put(new Pair("func_110664_a", "parseDouble")); - mInitMap.put(new Pair("func_110665_a", "clamp_double")); - mInitMap.put(new Pair("func_110666_a", "clamp_coord")); - mInitMap.put(new Pair("func_110682_a", "setBoxRotation")); - mInitMap.put(new Pair("func_110683_a", "updateHorseRotation")); - mInitMap.put(new Pair("func_110738_j", "isRidingHorse")); - mInitMap.put(new Pair("func_110775_a", "getEntityTexture")); - mInitMap.put(new Pair("func_110776_a", "bindTexture")); - mInitMap.put(new Pair("func_110777_b", "bindEntityTexture")); - mInitMap.put(new Pair("func_110813_b", "canRenderName")); - mInitMap.put(new Pair("func_110934_a", "addSprite")); - mInitMap.put(new Pair("func_110935_a", "getCurrentWidth")); - mInitMap.put(new Pair("func_110936_b", "getCurrentHeight")); - mInitMap.put(new Pair("func_110966_b", "setIconWidth")); - mInitMap.put(new Pair("func_110967_i", "getOriginY")); - mInitMap.put(new Pair("func_110968_a", "setFramesTextureData")); - mInitMap.put(new Pair("func_110969_c", "setIconHeight")); - mInitMap.put(new Pair("func_110970_k", "getFrameCount")); - mInitMap.put(new Pair("func_110971_a", "initSprite")); - mInitMap.put(new Pair("func_110985_a", "updateAnaglyph")); - mInitMap.put(new Pair("func_110986_a", "readImageData")); - mInitMap.put(new Pair("func_110987_a", "uploadTextureImage")); - mInitMap.put(new Pair("func_110988_a", "uploadTexture")); - mInitMap.put(new Pair("func_110989_a", "uploadTextureImageAllocate")); - mInitMap.put(new Pair("func_110990_a", "copyToBuffer")); - mInitMap.put(new Pair("func_110991_a", "allocateTexture")); - mInitMap.put(new Pair("func_110993_a", "uploadTextureImageSubImpl")); - mInitMap.put(new Pair("func_110994_a", "copyToBufferPos")); - mInitMap.put(new Pair("func_110995_a", "uploadTextureImageSub")); - mInitMap.put(new Pair("func_110996_a", "glGenTextures")); - mInitMap.put(new Pair("func_110997_a", "setTextureClamped")); - mInitMap.put(new Pair("func_111108_a", "getAttributeUnlocalizedName")); - mInitMap.put(new Pair("func_111109_a", "clampValue")); - mInitMap.put(new Pair("func_111110_b", "getDefaultValue")); - mInitMap.put(new Pair("func_111111_c", "getShouldWatch")); - mInitMap.put(new Pair("func_111112_a", "setShouldWatch")); - mInitMap.put(new Pair("func_111116_f", "getDescription")); - mInitMap.put(new Pair("func_111117_a", "setDescription")); - mInitMap.put(new Pair("func_111121_a", "applyModifier")); - mInitMap.put(new Pair("func_111123_a", "getAttribute")); - mInitMap.put(new Pair("func_111124_b", "removeModifier")); - mInitMap.put(new Pair("func_111125_b", "getBaseValue")); - mInitMap.put(new Pair("func_111126_e", "getAttributeValue")); - mInitMap.put(new Pair("func_111127_a", "getModifier")); - mInitMap.put(new Pair("func_111128_a", "setBaseValue")); - mInitMap.put(new Pair("func_111129_g", "computeValue")); - mInitMap.put(new Pair("func_111130_a", "getModifiersByOperation")); - mInitMap.put(new Pair("func_111131_f", "flagForUpdate")); - mInitMap.put(new Pair("func_111145_d", "getWatchableObjectFloat")); - mInitMap.put(new Pair("func_111146_a", "getAllAttributes")); - mInitMap.put(new Pair("func_111147_b", "applyAttributeModifiers")); - mInitMap.put(new Pair("func_111148_a", "removeAttributeModifiers")); - mInitMap.put(new Pair("func_111149_a", "addAttributeInstance")); - mInitMap.put(new Pair("func_111150_b", "registerAttribute")); - mInitMap.put(new Pair("func_111151_a", "getAttributeInstance")); - mInitMap.put(new Pair("func_111152_a", "getAttributeInstanceByName")); - mInitMap.put(new Pair("func_111160_c", "getWatchedAttributes")); - mInitMap.put(new Pair("func_111161_b", "getAttributeInstanceSet")); - mInitMap.put(new Pair("func_111164_d", "getAmount")); - mInitMap.put(new Pair("func_111165_e", "isSaved")); - mInitMap.put(new Pair("func_111166_b", "getName")); - mInitMap.put(new Pair("func_111167_a", "getID")); - mInitMap.put(new Pair("func_111168_a", "setSaved")); - mInitMap.put(new Pair("func_111169_c", "getOperation")); - mInitMap.put(new Pair("func_111175_f", "getTargetDistance")); - mInitMap.put(new Pair("func_111184_a", "registerPotionAttributeModifier")); - mInitMap.put(new Pair("func_111185_a", "applyAttributesModifiersToEntity")); - mInitMap.put(new Pair("func_111187_a", "removeAttributesModifiersFromEntity")); - mInitMap.put(new Pair("func_111190_b", "sendMetadataToAllAssociatedPlayers")); - mInitMap.put(new Pair("func_111194_a", "processChunk")); - mInitMap.put(new Pair("func_111196_a", "increaseInhabitedTime")); - mInitMap.put(new Pair("func_111205_h", "getItemAttributeModifiers")); - mInitMap.put(new Pair("func_111206_d", "setTextureName")); - mInitMap.put(new Pair("func_111207_a", "itemInteractionForEntity")); - mInitMap.put(new Pair("func_111208_A", "getIconString")); - mInitMap.put(new Pair("func_111225_m", "getRelevantEnchantmentTypes")); - mInitMap.put(new Pair("func_111229_a", "setRelevantEnchantmentTypes")); - mInitMap.put(new Pair("func_111238_b", "canBeHovered")); - mInitMap.put(new Pair("func_111257_a", "writeBaseAttributeMapToNBT")); - mInitMap.put(new Pair("func_111258_a", "applyModifiersToAttributeInstance")); - mInitMap.put(new Pair("func_111259_a", "readAttributeModifierFromNBT")); - mInitMap.put(new Pair("func_111261_a", "writeAttributeInstanceToNBT")); - mInitMap.put(new Pair("func_111262_a", "writeAttributeModifierToNBT")); - mInitMap.put(new Pair("func_111269_d", "getPathSearchRange")); - mInitMap.put(new Pair("func_111270_a", "union")); - mInitMap.put(new Pair("func_111271_a", "getUnicodePageLocation")); - mInitMap.put(new Pair("func_111272_d", "readFontTexture")); - mInitMap.put(new Pair("func_111282_a", "interactWithEntity")); - mInitMap.put(new Pair("func_111283_C", "getAttributeModifiers")); - mInitMap.put(new Pair("func_111285_a", "getUsername")); - mInitMap.put(new Pair("func_111286_b", "getSessionID")); - mInitMap.put(new Pair("func_120011_ar", "setGuiEnabled")); - mInitMap.put(new Pair("func_120016_a", "createServerGui")); - mInitMap.put(new Pair("func_120018_d", "getLogComponent")); - mInitMap.put(new Pair("func_120019_b", "getStatsComponent")); - mInitMap.put(new Pair("func_120020_c", "getPlayerListComponent")); - mInitMap.put(new Pair("func_130001_d", "getCurrentMoonPhaseFactor")); - mInitMap.put(new Pair("func_130002_c", "interactFirst")); - mInitMap.put(new Pair("func_130010_a", "getOriginX")); - mInitMap.put(new Pair("func_130011_c", "setLastAttacker")); - mInitMap.put(new Pair("func_130014_f_", "getEntityWorld")); - mInitMap.put(new Pair("func_130071_aq", "getCurrentTimeMillis")); - mInitMap.put(new Pair("func_130072_d", "getAnimationFrame")); - mInitMap.put(new Pair("func_130073_e", "getFrameIndexSet")); - mInitMap.put(new Pair("func_130077_b", "getPackName")); - mInitMap.put(new Pair("func_130086_a", "getTextureType")); - mInitMap.put(new Pair("func_130087_a", "getResourceLocation")); - mInitMap.put(new Pair("func_130088_a", "loadTextureMap")); - mInitMap.put(new Pair("func_130098_m", "hasAnimationMetadata")); - mInitMap.put(new Pair("func_130099_d", "allocateFrameTextureData")); - mInitMap.put(new Pair("func_130102_n", "resetSprite")); - mInitMap.put(new Pair("func_130103_l", "clearFramesTextureData")); - mInitMap.put(new Pair("func_130105_g", "getMinecraftStartTimeMillis")); - mInitMap.put(new Pair("func_135016_M", "getLanguageManager")); - mInitMap.put(new Pair("func_135018_a", "getLanguages")); - mInitMap.put(new Pair("func_135021_a", "loadLocaleData")); - mInitMap.put(new Pair("func_135022_a", "loadLocaleDataFiles")); - mInitMap.put(new Pair("func_135023_a", "formatMessage")); - mInitMap.put(new Pair("func_135024_b", "checkUnicode")); - mInitMap.put(new Pair("func_135025_a", "isUnicode")); - mInitMap.put(new Pair("func_135026_c", "translateKeyPrivate")); - mInitMap.put(new Pair("func_135028_a", "loadLocaleData")); - mInitMap.put(new Pair("func_135034_a", "getLanguageCode")); - mInitMap.put(new Pair("func_135035_b", "isBidirectional")); - mInitMap.put(new Pair("func_135040_d", "getLanguages")); - mInitMap.put(new Pair("func_135041_c", "getCurrentLanguage")); - mInitMap.put(new Pair("func_135042_a", "isCurrentLocaleUnicode")); - mInitMap.put(new Pair("func_135043_a", "parseLanguageMetadata")); - mInitMap.put(new Pair("func_135044_b", "isCurrentLanguageBidirectional")); - mInitMap.put(new Pair("func_135045_a", "setCurrentLanguage")); - mInitMap.put(new Pair("func_135051_a", "setLocale")); - mInitMap.put(new Pair("func_135052_a", "format")); - mInitMap.put(new Pair("func_135055_a", "getResourceDomains")); - mInitMap.put(new Pair("func_135056_b", "getAllResources")); - mInitMap.put(new Pair("func_135058_a", "getPackMetadata")); - mInitMap.put(new Pair("func_135063_a", "replaceWith")); - mInitMap.put(new Pair("func_135064_c", "tryTranslateKey")); - mInitMap.put(new Pair("func_140005_i", "switchToRealms")); - mInitMap.put(new Pair("func_142008_O", "shouldSetPosAfterLoading")); - mInitMap.put(new Pair("func_142012_a", "isOnTeam")); - mInitMap.put(new Pair("func_142013_aG", "getLastAttackerTime")); - mInitMap.put(new Pair("func_142014_c", "isOnSameTeam")); - mInitMap.put(new Pair("func_142015_aE", "getRevengeTimer")); - mInitMap.put(new Pair("func_142020_c", "setClientBrand")); - mInitMap.put(new Pair("func_142021_k", "getClientBrand")); - mInitMap.put(new Pair("func_142049_d", "removeAllModifiers")); - mInitMap.put(new Pair("func_142053_d", "formatString")); - mInitMap.put(new Pair("func_142054_a", "isSameTeam")); - mInitMap.put(new Pair("func_143004_u", "markPlayerActive")); - mInitMap.put(new Pair("func_143006_e", "setPlayerIdleTimeout")); - mInitMap.put(new Pair("func_143007_ar", "getMaxPlayerIdleMinutes")); - mInitMap.put(new Pair("func_143011_b", "readStructureFromNBT")); - mInitMap.put(new Pair("func_143012_a", "writeStructureToNBT")); - mInitMap.put(new Pair("func_143016_a", "registerVillagePieces")); - mInitMap.put(new Pair("func_143025_a", "getStructureName")); - mInitMap.put(new Pair("func_143031_a", "registerStructureComponent")); - mInitMap.put(new Pair("func_143034_b", "registerStructure")); - mInitMap.put(new Pair("func_143045_a", "registerScatteredFeaturePieces")); - mInitMap.put(new Pair("func_143046_a", "registerStrongholdPieces")); - mInitMap.put(new Pair("func_143048_a", "registerStructurePieces")); - mInitMap.put(new Pair("func_143049_a", "registerNetherFortressPieces")); - mInitMap.put(new Pair("func_145747_a", "addChatMessage")); - mInitMap.put(new Pair("func_145748_c_", "getFormattedCommandSenderName")); - mInitMap.put(new Pair("func_145749_h", "getLastOutput")); - mInitMap.put(new Pair("func_145752_a", "setCommand")); - mInitMap.put(new Pair("func_145753_i", "getCustomName")); - mInitMap.put(new Pair("func_145758_a", "writeDataToNBT")); - mInitMap.put(new Pair("func_145759_b", "readDataFromNBT")); - mInitMap.put(new Pair("func_145760_g", "getSuccessCount")); - mInitMap.put(new Pair("func_145769_d", "setEntityId")); - mInitMap.put(new Pair("func_145770_h", "isInRangeToRender3d")); - mInitMap.put(new Pair("func_145771_j", "pushOutOfBlocks")); - mInitMap.put(new Pair("func_145772_a", "getExplosionResistance")); - mInitMap.put(new Pair("func_145773_az", "doesEntityNotTriggerPressurePlate")); - mInitMap.put(new Pair("func_145775_I", "doBlockCollisions")); - mInitMap.put(new Pair("func_145776_H", "getSwimSound")); - mInitMap.put(new Pair("func_145777_O", "getSplashSound")); - mInitMap.put(new Pair("func_145778_a", "dropItemWithOffset")); - mInitMap.put(new Pair("func_145779_a", "dropItem")); - mInitMap.put(new Pair("func_145780_a", "playStepSound")); - mInitMap.put(new Pair("func_145782_y", "getEntityId")); - mInitMap.put(new Pair("func_145797_a", "setOwner")); - mInitMap.put(new Pair("func_145798_i", "getOwner")); - mInitMap.put(new Pair("func_145799_b", "setThrower")); - mInitMap.put(new Pair("func_145800_j", "getThrower")); - mInitMap.put(new Pair("func_145805_f", "getBlock")); - mInitMap.put(new Pair("func_145806_a", "setHurtEntities")); - mInitMap.put(new Pair("func_145807_e", "getWorldObj")); - mInitMap.put(new Pair("func_145817_o", "getDefaultDisplayTile")); - mInitMap.put(new Pair("func_145818_k_", "isCustomInventoryName")); - mInitMap.put(new Pair("func_145820_n", "getDisplayTile")); - mInitMap.put(new Pair("func_145825_b", "getInventoryName")); - mInitMap.put(new Pair("func_145826_a", "addMapping")); - mInitMap.put(new Pair("func_145827_c", "createAndLoadEntity")); - mInitMap.put(new Pair("func_145828_a", "addInfoToCrashReport")); - mInitMap.put(new Pair("func_145829_t", "validate")); - mInitMap.put(new Pair("func_145830_o", "hasWorldObj")); - mInitMap.put(new Pair("func_145831_w", "getWorld")); - mInitMap.put(new Pair("func_145832_p", "getBlockMetadata")); - mInitMap.put(new Pair("func_145833_n", "getMaxRenderDistanceSquared")); - mInitMap.put(new Pair("func_145834_a", "setWorldObj")); - mInitMap.put(new Pair("func_145835_a", "getDistanceSq")); - mInitMap.put(new Pair("func_145836_u", "updateContainingBlockInfo")); - mInitMap.put(new Pair("func_145837_r", "isInvalid")); - mInitMap.put(new Pair("func_145838_q", "getBlockType")); - mInitMap.put(new Pair("func_145839_a", "readFromNBT")); - mInitMap.put(new Pair("func_145841_b", "writeToNBT")); - mInitMap.put(new Pair("func_145842_c", "receiveClientEvent")); - mInitMap.put(new Pair("func_145843_s", "invalidate")); - mInitMap.put(new Pair("func_145844_m", "getDescriptionPacket")); - mInitMap.put(new Pair("func_145845_h", "updateEntity")); - mInitMap.put(new Pair("func_145861_a", "getStoredBlockID")); - mInitMap.put(new Pair("func_145864_c", "getPistonOrientation")); - mInitMap.put(new Pair("func_145866_f", "clearPistonTileEntity")); - mInitMap.put(new Pair("func_145867_d", "shouldPistonHeadBeRendered")); - mInitMap.put(new Pair("func_145868_b", "isExtending")); - mInitMap.put(new Pair("func_145877_a", "changePitch")); - mInitMap.put(new Pair("func_145878_a", "triggerNote")); - mInitMap.put(new Pair("func_145888_j", "isOnTransferCooldown")); - mInitMap.put(new Pair("func_145896_c", "setTransferCooldown")); - mInitMap.put(new Pair("func_145903_a", "setSkullRotation")); - mInitMap.put(new Pair("func_145904_a", "getSkullType")); - mInitMap.put(new Pair("func_145906_b", "getSkullRotation")); - mInitMap.put(new Pair("func_145913_a", "setEditable")); - mInitMap.put(new Pair("func_145914_a", "getIsEditable")); - mInitMap.put(new Pair("func_145934_k", "canBrew")); - mInitMap.put(new Pair("func_145935_i", "getBrewTime")); - mInitMap.put(new Pair("func_145938_d", "setBrewTime")); - mInitMap.put(new Pair("func_145939_j", "getFilledSlots")); - mInitMap.put(new Pair("func_145940_l", "brewPotions")); - mInitMap.put(new Pair("func_145948_k", "canSmelt")); - mInitMap.put(new Pair("func_145949_j", "smeltItem")); - mInitMap.put(new Pair("func_145950_i", "isBurning")); - mInitMap.put(new Pair("func_145951_a", "setCustomInventoryName")); - mInitMap.put(new Pair("func_145952_a", "getItemBurnTime")); - mInitMap.put(new Pair("func_145953_d", "getCookProgressScaled")); - mInitMap.put(new Pair("func_145954_b", "isItemFuel")); - mInitMap.put(new Pair("func_145955_e", "getBurnTimeRemainingScaled")); - mInitMap.put(new Pair("func_145965_a", "getFlowerPotItem")); - mInitMap.put(new Pair("func_145966_b", "getFlowerPotData")); - mInitMap.put(new Pair("func_145976_a", "setCustomName")); - mInitMap.put(new Pair("func_145977_a", "isSameTypeChestAt")); - mInitMap.put(new Pair("func_145979_i", "checkForAdjacentChests")); - mInitMap.put(new Pair("func_145980_j", "getChestType")); - mInitMap.put(new Pair("func_145995_a", "setOutputSignal")); - mInitMap.put(new Pair("func_145996_a", "getOutputSignal")); - mInitMap.put(new Pair("func_145998_l", "getLevels")); - mInitMap.put(new Pair("func_146001_d", "setPrimaryEffect")); - mInitMap.put(new Pair("func_146002_i", "shouldBeamRender")); - mInitMap.put(new Pair("func_146004_e", "setSecondaryEffect")); - mInitMap.put(new Pair("func_146006_k", "getSecondaryEffect")); - mInitMap.put(new Pair("func_146007_j", "getPrimaryEffect")); - mInitMap.put(new Pair("func_146023_a", "getStrVsBlock")); - mInitMap.put(new Pair("func_146024_c", "getInventorySlotContainItemAndDamage")); - mInitMap.put(new Pair("func_146026_a", "consumeInventoryItem")); - mInitMap.put(new Pair("func_146027_a", "clearInventory")); - mInitMap.put(new Pair("func_146028_b", "hasItem")); - mInitMap.put(new Pair("func_146029_c", "getInventorySlotContainItem")); - mInitMap.put(new Pair("func_146030_a", "setCurrentItem")); - mInitMap.put(new Pair("func_146031_a", "setChestTileEntity")); - mInitMap.put(new Pair("func_146034_e", "handleHookRetraction")); - mInitMap.put(new Pair("func_146035_c", "handleHookCasting")); - mInitMap.put(new Pair("func_146068_u", "getDropItem")); - mInitMap.put(new Pair("func_146080_bZ", "getCarriedBlock")); - mInitMap.put(new Pair("func_146081_a", "setCarriedBlock")); - mInitMap.put(new Pair("func_146082_f", "setInLove")); - mInitMap.put(new Pair("func_146086_d", "setHorseArmorStack")); - mInitMap.put(new Pair("func_146094_a", "getUUID")); - mInitMap.put(new Pair("func_146096_a", "getBreakSpeed")); - mInitMap.put(new Pair("func_146099_a", "canHarvestBlock")); - mInitMap.put(new Pair("func_146100_a", "displayGUIEditSign")); - mInitMap.put(new Pair("func_146103_bH", "getGameProfile")); - mInitMap.put(new Pair("func_146105_b", "addChatComponentMessage")); - mInitMap.put(new Pair("func_146107_m", "getStatFileWriter")); - mInitMap.put(new Pair("func_146110_a", "drawModalRectWithCustomSizedTexture")); - mInitMap.put(new Pair("func_146111_b", "drawButtonForegroundLayer")); - mInitMap.put(new Pair("func_146112_a", "drawButton")); - mInitMap.put(new Pair("func_146113_a", "playPressSound")); - mInitMap.put(new Pair("func_146114_a", "getHoverState")); - mInitMap.put(new Pair("func_146115_a", "isMouseOver")); - mInitMap.put(new Pair("func_146116_c", "mousePressed")); - mInitMap.put(new Pair("func_146117_b", "getButtonWidth")); - mInitMap.put(new Pair("func_146118_a", "mouseReleased")); - mInitMap.put(new Pair("func_146119_b", "mouseDragged")); - mInitMap.put(new Pair("func_146136_c", "returnEnumOptions")); - mInitMap.put(new Pair("func_146158_b", "getChatGUI")); - mInitMap.put(new Pair("func_146159_a", "drawLabel")); - mInitMap.put(new Pair("func_146160_b", "drawLabelBackground")); - mInitMap.put(new Pair("func_146175_b", "deleteFromCursor")); - mInitMap.put(new Pair("func_146176_q", "getVisible")); - mInitMap.put(new Pair("func_146177_a", "deleteWords")); - mInitMap.put(new Pair("func_146178_a", "updateCursorCounter")); - mInitMap.put(new Pair("func_146179_b", "getText")); - mInitMap.put(new Pair("func_146180_a", "setText")); - mInitMap.put(new Pair("func_146181_i", "getEnableBackgroundDrawing")); - mInitMap.put(new Pair("func_146182_d", "moveCursorBy")); - mInitMap.put(new Pair("func_146183_a", "getNthWordFromPos")); - mInitMap.put(new Pair("func_146184_c", "setEnabled")); - mInitMap.put(new Pair("func_146185_a", "setEnableBackgroundDrawing")); - mInitMap.put(new Pair("func_146186_n", "getSelectionEnd")); - mInitMap.put(new Pair("func_146187_c", "getNthWordFromCursor")); - mInitMap.put(new Pair("func_146188_c", "drawCursorVertical")); - mInitMap.put(new Pair("func_146189_e", "setVisible")); - mInitMap.put(new Pair("func_146190_e", "setCursorPosition")); - mInitMap.put(new Pair("func_146191_b", "writeText")); - mInitMap.put(new Pair("func_146192_a", "mouseClicked")); - mInitMap.put(new Pair("func_146193_g", "setTextColor")); - mInitMap.put(new Pair("func_146194_f", "drawTextBox")); - mInitMap.put(new Pair("func_146195_b", "setFocused")); - mInitMap.put(new Pair("func_146196_d", "setCursorPositionZero")); - mInitMap.put(new Pair("func_146198_h", "getCursorPosition")); - mInitMap.put(new Pair("func_146199_i", "setSelectionPos")); - mInitMap.put(new Pair("func_146200_o", "getWidth")); - mInitMap.put(new Pair("func_146201_a", "textboxKeyTyped")); - mInitMap.put(new Pair("func_146202_e", "setCursorPositionEnd")); - mInitMap.put(new Pair("func_146203_f", "setMaxStringLength")); - mInitMap.put(new Pair("func_146204_h", "setDisabledTextColour")); - mInitMap.put(new Pair("func_146205_d", "setCanLoseFocus")); - mInitMap.put(new Pair("func_146206_l", "isFocused")); - mInitMap.put(new Pair("func_146207_c", "getSelectedText")); - mInitMap.put(new Pair("func_146208_g", "getMaxStringLength")); - mInitMap.put(new Pair("func_146227_a", "printChatMessage")); - mInitMap.put(new Pair("func_146228_f", "getChatWidth")); - mInitMap.put(new Pair("func_146229_b", "scroll")); - mInitMap.put(new Pair("func_146230_a", "drawChat")); - mInitMap.put(new Pair("func_146231_a", "clearChatMessages")); - mInitMap.put(new Pair("func_146232_i", "getLineCount")); - mInitMap.put(new Pair("func_146233_a", "calculateChatboxWidth")); - mInitMap.put(new Pair("func_146234_a", "printChatMessageWithOptionalDeletion")); - mInitMap.put(new Pair("func_146235_b", "formatColors")); - mInitMap.put(new Pair("func_146236_a", "getChatComponent")); - mInitMap.put(new Pair("func_146237_a", "setChatLine")); - mInitMap.put(new Pair("func_146238_c", "getSentMessages")); - mInitMap.put(new Pair("func_146239_a", "addToSentMessages")); - mInitMap.put(new Pair("func_146240_d", "resetScroll")); - mInitMap.put(new Pair("func_146241_e", "getChatOpen")); - mInitMap.put(new Pair("func_146242_c", "deleteChatLine")); - mInitMap.put(new Pair("func_146243_b", "calculateChatboxHeight")); - mInitMap.put(new Pair("func_146244_h", "getChatScale")); - mInitMap.put(new Pair("func_146245_b", "refreshChat")); - mInitMap.put(new Pair("func_146246_g", "getChatHeight")); - mInitMap.put(new Pair("func_146254_a", "updateAchievementWindow")); - mInitMap.put(new Pair("func_146255_b", "displayUnformattedAchievement")); - mInitMap.put(new Pair("func_146256_a", "displayAchievement")); - mInitMap.put(new Pair("func_146257_b", "clearAchievements")); - mInitMap.put(new Pair("func_146258_c", "updateAchievementWindowScale")); - mInitMap.put(new Pair("func_146269_k", "handleInput")); - mInitMap.put(new Pair("func_146270_b", "drawWorldBackground")); - mInitMap.put(new Pair("func_146271_m", "isCtrlKeyDown")); - mInitMap.put(new Pair("func_146272_n", "isShiftKeyDown")); - mInitMap.put(new Pair("func_146273_a", "mouseClickMove")); - mInitMap.put(new Pair("func_146274_d", "handleMouseInput")); - mInitMap.put(new Pair("func_146275_d", "setClipboardString")); - mInitMap.put(new Pair("func_146276_q_", "drawDefaultBackground")); - mInitMap.put(new Pair("func_146277_j", "getClipboardString")); - mInitMap.put(new Pair("func_146278_c", "drawBackground")); - mInitMap.put(new Pair("func_146279_a", "drawCreativeTabHoveringText")); - mInitMap.put(new Pair("func_146280_a", "setWorldAndResolution")); - mInitMap.put(new Pair("func_146281_b", "onGuiClosed")); - mInitMap.put(new Pair("func_146282_l", "handleKeyboardInput")); - mInitMap.put(new Pair("func_146283_a", "drawHoveringText")); - mInitMap.put(new Pair("func_146284_a", "actionPerformed")); - mInitMap.put(new Pair("func_146285_a", "renderToolTip")); - mInitMap.put(new Pair("func_146286_b", "mouseReleased")); - mInitMap.put(new Pair("func_146350_a", "setButtonDelay")); - mInitMap.put(new Pair("func_146358_g", "disableSecurityWarning")); - mInitMap.put(new Pair("func_146359_e", "copyLinkToClipboard")); - mInitMap.put(new Pair("func_146367_a", "connect")); - mInitMap.put(new Pair("func_146402_a", "getSentHistory")); - mInitMap.put(new Pair("func_146403_a", "submitChatMessage")); - mInitMap.put(new Pair("func_146404_p_", "autocompletePlayerNames")); - mInitMap.put(new Pair("func_146405_a", "sendAutocompleteRequest")); - mInitMap.put(new Pair("func_146406_a", "onAutocompleteResponse")); - mInitMap.put(new Pair("func_146407_a", "openLink")); - mInitMap.put(new Pair("func_146418_g", "wakeFromSleep")); - mInitMap.put(new Pair("func_146456_p", "pageGetCurrent")); - mInitMap.put(new Pair("func_146457_a", "pageSetCurrent")); - mInitMap.put(new Pair("func_146459_b", "pageInsertIntoCurrent")); - mInitMap.put(new Pair("func_146460_c", "keyTypedInTitle")); - mInitMap.put(new Pair("func_146461_i", "addmInitMap.put(newPage")); - mInitMap.put(new Pair("func_146462_a", "sendBookToServer")); - mInitMap.put(new Pair("func_146463_b", "keyTypedInBook")); - mInitMap.put(new Pair("func_146464_h", "updateButtons")); - mInitMap.put(new Pair("func_146504_a", "getSoundVolume")); - mInitMap.put(new Pair("func_146509_g", "doneLoading")); - mInitMap.put(new Pair("func_146521_a", "drawStatsScreen")); - mInitMap.put(new Pair("func_146527_c", "drawSprite")); - mInitMap.put(new Pair("func_146531_b", "drawButtonBackground")); - mInitMap.put(new Pair("func_146541_h", "createButtons")); - mInitMap.put(new Pair("func_146552_b", "drawAchievementScreen")); - mInitMap.put(new Pair("func_146553_h", "drawTitle")); - mInitMap.put(new Pair("func_146574_g", "sendRespawnPacket")); - mInitMap.put(new Pair("func_146575_b", "drawWinGameScreen")); - mInitMap.put(new Pair("func_146586_a", "setDomInitMap.put(neworking")); - mInitMap.put(new Pair("func_146789_i", "getOldServerPinger")); - mInitMap.put(new Pair("func_146790_a", "selectServer")); - mInitMap.put(new Pair("func_146791_a", "connectToServer")); - mInitMap.put(new Pair("func_146792_q", "refreshServerList")); - mInitMap.put(new Pair("func_146794_g", "createButtons")); - mInitMap.put(new Pair("func_146795_p", "getServerList")); - mInitMap.put(new Pair("func_146796_h", "connectToSelected")); - mInitMap.put(new Pair("func_146961_a", "hasResourcePackEntry")); - mInitMap.put(new Pair("func_146975_c", "getSlotAtPosition")); - mInitMap.put(new Pair("func_146976_a", "drawGuiContainerBackgroundLayer")); - mInitMap.put(new Pair("func_146977_a", "drawSlot")); - mInitMap.put(new Pair("func_146978_c", "isPointInRegion")); - mInitMap.put(new Pair("func_146979_b", "drawGuiContainerForegroundLayer")); - mInitMap.put(new Pair("func_146980_g", "updateDragSplitting")); - mInitMap.put(new Pair("func_146981_a", "isMouseOverSlot")); - mInitMap.put(new Pair("func_146982_a", "drawItemStack")); - mInitMap.put(new Pair("func_146983_a", "checkHotbarKeys")); - mInitMap.put(new Pair("func_146984_a", "handleMouseClick")); - mInitMap.put(new Pair("func_147035_g", "getMerchant")); - mInitMap.put(new Pair("func_147044_g", "drawActivePotionEffects")); - mInitMap.put(new Pair("func_147046_a", "drawEntityOnScreen")); - mInitMap.put(new Pair("func_147050_b", "setCurrentCreativeTab")); - mInitMap.put(new Pair("func_147052_b", "renderCreativeInventoryHoveringText")); - mInitMap.put(new Pair("func_147053_i", "updateCreativeSearch")); - mInitMap.put(new Pair("func_147055_p", "needsScrollBars")); - mInitMap.put(new Pair("func_147090_g", "renameItem")); - mInitMap.put(new Pair("func_147095_a", "requestTexturePackLoad")); - mInitMap.put(new Pair("func_147099_x", "getStatFile")); - mInitMap.put(new Pair("func_147104_D", "getCurrentServerData")); - mInitMap.put(new Pair("func_147106_B", "scheduleResourcesRefresh")); - mInitMap.put(new Pair("func_147107_h", "isFramerateLimitBelowMax")); - mInitMap.put(new Pair("func_147108_a", "displayGuiScreen")); - mInitMap.put(new Pair("func_147109_W", "getAmbientMusicType")); - mInitMap.put(new Pair("func_147110_a", "getFramebuffer")); - mInitMap.put(new Pair("func_147111_S", "isJava64bit")); - mInitMap.put(new Pair("func_147112_ai", "middleClickMouse")); - mInitMap.put(new Pair("func_147113_T", "isGamePaused")); - mInitMap.put(new Pair("func_147114_u", "getNetHandler")); - mInitMap.put(new Pair("func_147115_a", "sendClickBlockToController")); - mInitMap.put(new Pair("func_147116_af", "clickMouse")); - mInitMap.put(new Pair("func_147117_R", "getTextureMapBlocks")); - mInitMap.put(new Pair("func_147118_V", "getSoundHandler")); - mInitMap.put(new Pair("func_147119_ah", "updateFramebufferSize")); - mInitMap.put(new Pair("func_147120_f", "resetSize")); - mInitMap.put(new Pair("func_147121_ag", "rightClickMouse")); - mInitMap.put(new Pair("func_147122_X", "isJvm64bit")); - mInitMap.put(new Pair("func_147130_as", "getMinecraftSessionService")); - mInitMap.put(new Pair("func_147132_au", "refreshStatusNextTick")); - mInitMap.put(new Pair("func_147133_T", "getTexturePack")); - mInitMap.put(new Pair("func_147134_at", "getServerStatusResponse")); - mInitMap.put(new Pair("func_147135_j", "getDifficulty")); - mInitMap.put(new Pair("func_147136_ar", "isAnnouncingPlayerAchievements")); - mInitMap.put(new Pair("func_147137_ag", "getNetworkSystem")); - mInitMap.put(new Pair("func_147138_a", "addFaviconToStatusResponse")); - mInitMap.put(new Pair("func_147139_a", "setDifficultyForAllWorlds")); - mInitMap.put(new Pair("func_147149_a", "saveToFile")); - mInitMap.put(new Pair("func_147153_a", "addBlockInfo")); - mInitMap.put(new Pair("func_147155_a", "getCategoryName")); - mInitMap.put(new Pair("func_147156_b", "getCategoryId")); - mInitMap.put(new Pair("func_147176_a", "getChatComponentFromNthArg")); - mInitMap.put(new Pair("func_147177_a", "joinNiceString")); - mInitMap.put(new Pair("func_147178_a", "getChatComponentFromNthArg")); - mInitMap.put(new Pair("func_147179_f", "getItemByText")); - mInitMap.put(new Pair("func_147180_g", "getBlockByText")); - mInitMap.put(new Pair("func_147185_d", "addTeam")); - mInitMap.put(new Pair("func_147186_g", "listTeams")); - mInitMap.put(new Pair("func_147187_n", "resetPlayers")); - mInitMap.put(new Pair("func_147188_j", "emptyTeam")); - mInitMap.put(new Pair("func_147190_h", "joinTeam")); - mInitMap.put(new Pair("func_147191_h", "removeObjective")); - mInitMap.put(new Pair("func_147192_d", "getScoreboard")); - mInitMap.put(new Pair("func_147193_c", "addObjective")); - mInitMap.put(new Pair("func_147194_f", "removeTeam")); - mInitMap.put(new Pair("func_147195_l", "listPlayers")); - mInitMap.put(new Pair("func_147196_d", "listObjectives")); - mInitMap.put(new Pair("func_147197_m", "setPlayer")); - mInitMap.put(new Pair("func_147198_k", "setObjectiveDisplay")); - mInitMap.put(new Pair("func_147199_i", "leaveTeam")); - mInitMap.put(new Pair("func_147200_e", "setTeamOption")); - mInitMap.put(new Pair("func_147215_a", "addBlockDestroyEffects")); - mInitMap.put(new Pair("func_147223_a", "pingPendingNetworks")); - mInitMap.put(new Pair("func_147224_a", "ping")); - mInitMap.put(new Pair("func_147225_b", "tryCompatibilityPing")); - mInitMap.put(new Pair("func_147226_b", "clearPendingNetworks")); - mInitMap.put(new Pair("func_147231_a", "onDisconnect")); - mInitMap.put(new Pair("func_147232_a", "onConnectionStateTransition")); - mInitMap.put(new Pair("func_147233_a", "onNetworkTick")); - mInitMap.put(new Pair("func_147234_a", "handleBlockChange")); - mInitMap.put(new Pair("func_147235_a", "handleSpawnObject")); - mInitMap.put(new Pair("func_147236_a", "handleEntityStatus")); - mInitMap.put(new Pair("func_147237_a", "handleSpawnPlayer")); - mInitMap.put(new Pair("func_147238_a", "handleDestroyEntities")); - mInitMap.put(new Pair("func_147239_a", "handleConfirmTransaction")); - mInitMap.put(new Pair("func_147240_a", "handleCustomPayload")); - mInitMap.put(new Pair("func_147241_a", "handleWindowItems")); - mInitMap.put(new Pair("func_147242_a", "handleEntityEquipment")); - mInitMap.put(new Pair("func_147243_a", "handleEntityAttach")); - mInitMap.put(new Pair("func_147244_a", "handleEntityVelocity")); - mInitMap.put(new Pair("func_147245_a", "handleWindowProperty")); - mInitMap.put(new Pair("func_147246_a", "handleCollectItem")); - mInitMap.put(new Pair("func_147247_a", "handleTeams")); - mInitMap.put(new Pair("func_147248_a", "handleUpdateSign")); - mInitMap.put(new Pair("func_147249_a", "handleUpdateHealth")); - mInitMap.put(new Pair("func_147250_a", "handleUpdateScore")); - mInitMap.put(new Pair("func_147251_a", "handleChat")); - mInitMap.put(new Pair("func_147252_a", "handleChangeGameState")); - mInitMap.put(new Pair("func_147253_a", "handleDisconnect")); - mInitMap.put(new Pair("func_147254_a", "handleDisplayScoreboard")); - mInitMap.put(new Pair("func_147255_a", "handleSoundEffect")); - mInitMap.put(new Pair("func_147256_a", "handlePlayerListItem")); - mInitMap.put(new Pair("func_147257_a", "handleHeldItemChange")); - mInitMap.put(new Pair("func_147258_a", "handlePlayerPosLook")); - mInitMap.put(new Pair("func_147259_a", "handleEntityMovement")); - mInitMap.put(new Pair("func_147260_a", "handleEntityEffect")); - mInitMap.put(new Pair("func_147261_a", "handleBlockAction")); - mInitMap.put(new Pair("func_147262_a", "handleRemoveEntityEffect")); - mInitMap.put(new Pair("func_147263_a", "handleChunkData")); - mInitMap.put(new Pair("func_147264_a", "handleMaps")); - mInitMap.put(new Pair("func_147265_a", "handleOpenWindow")); - mInitMap.put(new Pair("func_147266_a", "handleSetSlot")); - mInitMap.put(new Pair("func_147267_a", "handleEntityHeadLook")); - mInitMap.put(new Pair("func_147268_a", "handleSignEditorOpen")); - mInitMap.put(new Pair("func_147269_a", "handleMapChunkBulk")); - mInitMap.put(new Pair("func_147270_a", "handlePlayerAbilities")); - mInitMap.put(new Pair("func_147271_a", "handleSpawnPosition")); - mInitMap.put(new Pair("func_147272_a", "handleKeepAlive")); - mInitMap.put(new Pair("func_147273_a", "handleUpdateTileEntity")); - mInitMap.put(new Pair("func_147274_a", "handleTabComplete")); - mInitMap.put(new Pair("func_147275_a", "handleEntityTeleport")); - mInitMap.put(new Pair("func_147276_a", "handleCloseWindow")); - mInitMap.put(new Pair("func_147277_a", "handleEffect")); - mInitMap.put(new Pair("func_147278_a", "handleUseBed")); - mInitMap.put(new Pair("func_147279_a", "handleAnimation")); - mInitMap.put(new Pair("func_147280_a", "handleRespawn")); - mInitMap.put(new Pair("func_147281_a", "handleSpawnMob")); - mInitMap.put(new Pair("func_147282_a", "handleJoinGame")); - mInitMap.put(new Pair("func_147283_a", "handleExplosion")); - mInitMap.put(new Pair("func_147284_a", "handleEntityMetadata")); - mInitMap.put(new Pair("func_147285_a", "handleTimeUpdate")); - mInitMap.put(new Pair("func_147286_a", "handleSpawnExperienceOrb")); - mInitMap.put(new Pair("func_147287_a", "handleMultiBlockChange")); - mInitMap.put(new Pair("func_147288_a", "handleSpawnPainting")); - mInitMap.put(new Pair("func_147289_a", "handleParticles")); - mInitMap.put(new Pair("func_147290_a", "handleEntityProperties")); - mInitMap.put(new Pair("func_147291_a", "handleScoreboardObjective")); - mInitMap.put(new Pair("func_147292_a", "handleSpawnGlobalEntity")); - mInitMap.put(new Pair("func_147293_a", "handleStatistics")); - mInitMap.put(new Pair("func_147294_a", "handleBlockBreakAnim")); - mInitMap.put(new Pair("func_147295_a", "handleSetExperience")); - mInitMap.put(new Pair("func_147296_c", "cleanup")); - mInitMap.put(new Pair("func_147297_a", "addToSendQueue")); - mInitMap.put(new Pair("func_147298_b", "getNetworkManager")); - mInitMap.put(new Pair("func_147311_a", "processPing")); - mInitMap.put(new Pair("func_147312_a", "processServerQuery")); - mInitMap.put(new Pair("func_147315_a", "processEncryptionResponse")); - mInitMap.put(new Pair("func_147316_a", "processLoginStart")); - mInitMap.put(new Pair("func_147322_a", "closeConnection")); - mInitMap.put(new Pair("func_147338_a", "processEnchantItem")); - mInitMap.put(new Pair("func_147339_a", "processConfirmTransaction")); - mInitMap.put(new Pair("func_147340_a", "processUseEntity")); - mInitMap.put(new Pair("func_147341_a", "processTabComplete")); - mInitMap.put(new Pair("func_147342_a", "processClientStatus")); - mInitMap.put(new Pair("func_147343_a", "processUpdateSign")); - mInitMap.put(new Pair("func_147344_a", "processCreativeInventoryAction")); - mInitMap.put(new Pair("func_147345_a", "processPlayerDigging")); - mInitMap.put(new Pair("func_147346_a", "processPlayerBlockPlacement")); - mInitMap.put(new Pair("func_147347_a", "processPlayer")); - mInitMap.put(new Pair("func_147348_a", "processPlayerAbilities")); - mInitMap.put(new Pair("func_147349_a", "processVanilla250Packet")); - mInitMap.put(new Pair("func_147350_a", "processAnimation")); - mInitMap.put(new Pair("func_147351_a", "processClickWindow")); - mInitMap.put(new Pair("func_147352_a", "processClientSettings")); - mInitMap.put(new Pair("func_147353_a", "processKeepAlive")); - mInitMap.put(new Pair("func_147354_a", "processChatMessage")); - mInitMap.put(new Pair("func_147355_a", "processHeldItemChange")); - mInitMap.put(new Pair("func_147356_a", "processCloseWindow")); - mInitMap.put(new Pair("func_147357_a", "processEntityAction")); - mInitMap.put(new Pair("func_147358_a", "processInput")); - mInitMap.put(new Pair("func_147359_a", "sendPacket")); - mInitMap.put(new Pair("func_147360_c", "kickPlayerFromServer")); - mInitMap.put(new Pair("func_147361_d", "handleSlashCommand")); - mInitMap.put(new Pair("func_147362_b", "getNetworkManager")); - mInitMap.put(new Pair("func_147363_d", "currentTimeMillis")); - mInitMap.put(new Pair("func_147364_a", "setPlayerLocation")); - mInitMap.put(new Pair("func_147383_a", "processHandshake")); - mInitMap.put(new Pair("func_147388_a", "handleDisconnect")); - mInitMap.put(new Pair("func_147389_a", "handleEncryptionRequest")); - mInitMap.put(new Pair("func_147390_a", "handleLoginSuccess")); - mInitMap.put(new Pair("func_147397_a", "handleServerInfo")); - mInitMap.put(new Pair("func_147398_a", "handlePong")); - mInitMap.put(new Pair("func_147407_a", "setBase64EncodedIconData")); - mInitMap.put(new Pair("func_147409_e", "getBase64EncodedIconData")); - mInitMap.put(new Pair("func_147416_a", "findClosestStructure")); - mInitMap.put(new Pair("func_147422_a", "replaceBlocksForBiome")); - mInitMap.put(new Pair("func_147437_c", "isAirBlock")); - mInitMap.put(new Pair("func_147438_o", "getTileEntity")); - mInitMap.put(new Pair("func_147439_a", "getBlock")); - mInitMap.put(new Pair("func_147440_b", "findClosestStructure")); - mInitMap.put(new Pair("func_147441_b", "notifyBlocksOfNeighborChange")); - mInitMap.put(new Pair("func_147442_i", "setThunderStrength")); - mInitMap.put(new Pair("func_147443_d", "destroyBlockInWorldPartially")); - mInitMap.put(new Pair("func_147444_c", "notifyBlockChange")); - mInitMap.put(new Pair("func_147445_c", "isBlockNormalCubeDefault")); - mInitMap.put(new Pair("func_147447_a", "rayTraceBlocks")); - mInitMap.put(new Pair("func_147449_b", "setBlock")); - mInitMap.put(new Pair("func_147451_t", "updateAllLightTypes")); - mInitMap.put(new Pair("func_147452_c", "addBlockEvent")); - mInitMap.put(new Pair("func_147453_f", "updateNeighborsAboutBlockChange")); - mInitMap.put(new Pair("func_147454_a", "scheduleBlockUpdateWithPriority")); - mInitMap.put(new Pair("func_147455_a", "setTileEntity")); - mInitMap.put(new Pair("func_147457_a", "markTileEntityForRemoval")); - mInitMap.put(new Pair("func_147458_c", "markBlockRangeForRenderUpdate")); - mInitMap.put(new Pair("func_147459_d", "notifyBlocksOfNeighborChange")); - mInitMap.put(new Pair("func_147460_e", "notifyBlockOfNeighborChange")); - mInitMap.put(new Pair("func_147462_b", "getTensionFactorForBlock")); - mInitMap.put(new Pair("func_147463_c", "updateLightByType")); - mInitMap.put(new Pair("func_147464_a", "scheduleBlockUpdate")); - mInitMap.put(new Pair("func_147465_d", "setBlock")); - mInitMap.put(new Pair("func_147466_a", "doesBlockHaveSolidTopSurface")); - mInitMap.put(new Pair("func_147468_f", "setBlockToAir")); - mInitMap.put(new Pair("func_147469_q", "isBlockFullCube")); - mInitMap.put(new Pair("func_147471_g", "markBlockForUpdate")); - mInitMap.put(new Pair("func_147472_a", "canPlaceEntityOnSide")); - mInitMap.put(new Pair("func_147474_b", "getTopBlock")); - mInitMap.put(new Pair("func_147475_p", "removeTileEntity")); - mInitMap.put(new Pair("func_147476_b", "markTileEntityChunkModified")); - mInitMap.put(new Pair("func_147477_a", "isBlockTickScheduledThisTick")); - mInitMap.put(new Pair("func_147478_e", "canSnowAt")); - mInitMap.put(new Pair("func_147479_m", "markBlockForRenderUpdate")); - mInitMap.put(new Pair("func_147480_a", "breakBlock")); - mInitMap.put(new Pair("func_147493_a", "createPlayer")); - mInitMap.put(new Pair("func_147496_a", "onWorldChange")); - mInitMap.put(new Pair("func_147499_a", "bindTexture")); - mInitMap.put(new Pair("func_147500_a", "renderTileEntityAt")); - mInitMap.put(new Pair("func_147542_a", "cacheActiveRenderInfo")); - mInitMap.put(new Pair("func_147544_a", "renderTileEntity")); - mInitMap.put(new Pair("func_147545_a", "hasSpecialRenderer")); - mInitMap.put(new Pair("func_147546_a", "getSpecialRendererByClass")); - mInitMap.put(new Pair("func_147547_b", "getSpecialRenderer")); - mInitMap.put(new Pair("func_147548_a", "getFontRenderer")); - mInitMap.put(new Pair("func_147549_a", "renderTileEntityAt")); - mInitMap.put(new Pair("func_147564_a", "getVertexState")); - mInitMap.put(new Pair("func_147565_a", "setVertexState")); - mInitMap.put(new Pair("func_147570_f", "getHasNormals")); - mInitMap.put(new Pair("func_147571_e", "getHasBrightness")); - mInitMap.put(new Pair("func_147572_a", "getRawBuffer")); - mInitMap.put(new Pair("func_147573_d", "getHasTexture")); - mInitMap.put(new Pair("func_147574_g", "getHasColor")); - mInitMap.put(new Pair("func_147575_c", "getVertexCount")); - mInitMap.put(new Pair("func_147576_b", "getRawBufferIndex")); - mInitMap.put(new Pair("func_147584_b", "onStaticEntitiesChanged")); - mInitMap.put(new Pair("func_147585_a", "markBlockRangeForRenderUpdate")); - mInitMap.put(new Pair("func_147586_a", "markBlockForUpdate")); - mInitMap.put(new Pair("func_147587_b", "destroyBlockPartially")); - mInitMap.put(new Pair("func_147588_b", "markBlockForRenderUpdate")); - mInitMap.put(new Pair("func_147589_a", "renderEntities")); - mInitMap.put(new Pair("func_147590_a", "drawOutlinedBoundingBox")); - mInitMap.put(new Pair("func_147591_f", "rebuildDisplayListEntities")); - mInitMap.put(new Pair("func_147604_a", "setFramebufferColor")); - mInitMap.put(new Pair("func_147605_b", "createFramebuffer")); - mInitMap.put(new Pair("func_147606_d", "unbindFramebufferTexture")); - mInitMap.put(new Pair("func_147607_a", "setFramebufferFilter")); - mInitMap.put(new Pair("func_147608_a", "deleteFramebuffer")); - mInitMap.put(new Pair("func_147609_e", "unbindFramebuffer")); - mInitMap.put(new Pair("func_147610_a", "bindFramebuffer")); - mInitMap.put(new Pair("func_147611_b", "checkFramebufferComplete")); - mInitMap.put(new Pair("func_147612_c", "bindFramebufferTexture")); - mInitMap.put(new Pair("func_147613_a", "createBindFramebuffer")); - mInitMap.put(new Pair("func_147614_f", "framebufferClear")); - mInitMap.put(new Pair("func_147615_c", "framebufferRender")); - mInitMap.put(new Pair("func_147631_c", "deleteGlTexture")); - mInitMap.put(new Pair("func_147632_b", "setAnisotropicFiltering")); - mInitMap.put(new Pair("func_147633_a", "setMipmapLevels")); - mInitMap.put(new Pair("func_147634_a", "completeResourceLocation")); - mInitMap.put(new Pair("func_147640_e", "checkTextureUploaded")); - mInitMap.put(new Pair("func_147641_a", "setBufferedImage")); - mInitMap.put(new Pair("func_147645_c", "deleteTexture")); - mInitMap.put(new Pair("func_147647_b", "bidiReorder")); - mInitMap.put(new Pair("func_147649_g", "getXPosF")); - mInitMap.put(new Pair("func_147650_b", "getSoundLocation")); - mInitMap.put(new Pair("func_147651_i", "getZPosF")); - mInitMap.put(new Pair("func_147652_d", "getRepeatDelay")); - mInitMap.put(new Pair("func_147653_e", "getVolume")); - mInitMap.put(new Pair("func_147654_h", "getYPosF")); - mInitMap.put(new Pair("func_147655_f", "getPitch")); - mInitMap.put(new Pair("func_147656_j", "getAttenuationType")); - mInitMap.put(new Pair("func_147657_c", "canRepeat")); - mInitMap.put(new Pair("func_147667_k", "isDonePlaying")); - mInitMap.put(new Pair("func_147673_a", "createPositionedSoundRecord")); - mInitMap.put(new Pair("func_147674_a", "createPositionedSoundRecord")); - mInitMap.put(new Pair("func_147675_a", "createRecordSoundAtPosition")); - mInitMap.put(new Pair("func_147680_a", "getSound")); - mInitMap.put(new Pair("func_147681_a", "playDelayedSound")); - mInitMap.put(new Pair("func_147682_a", "playSound")); - mInitMap.put(new Pair("func_147683_b", "stopSound")); - mInitMap.put(new Pair("func_147684_a", "setSoundLevel")); - mInitMap.put(new Pair("func_147685_d", "unloadSounds")); - mInitMap.put(new Pair("func_147686_a", "getRandomSoundFromCategories")); - mInitMap.put(new Pair("func_147687_e", "resumeSounds")); - mInitMap.put(new Pair("func_147689_b", "pauseSounds")); - mInitMap.put(new Pair("func_147690_c", "stopSounds")); - mInitMap.put(new Pair("func_147691_a", "setListener")); - mInitMap.put(new Pair("func_147692_c", "isSoundPlaying")); - mInitMap.put(new Pair("func_147693_a", "loadSoundResource")); - mInitMap.put(new Pair("func_147701_i", "getMapItemRenderer")); - mInitMap.put(new Pair("func_147702_a", "isShaderActive")); - mInitMap.put(new Pair("func_147703_b", "deactivateShader")); - mInitMap.put(new Pair("func_147704_a", "updateShaderGroupSize")); - mInitMap.put(new Pair("func_147705_c", "activateNextShader")); - mInitMap.put(new Pair("func_147706_e", "getShaderGroup")); - mInitMap.put(new Pair("func_147715_a", "renderChest")); - mInitMap.put(new Pair("func_147721_p", "renderBlockLiquid")); - mInitMap.put(new Pair("func_147722_a", "renderBlockStairs")); - mInitMap.put(new Pair("func_147723_f", "renderBlockTripWireSource")); - mInitMap.put(new Pair("func_147724_m", "renderBlockStem")); - mInitMap.put(new Pair("func_147725_a", "renderBlockAnvil")); - mInitMap.put(new Pair("func_147726_j", "renderBlockVine")); - mInitMap.put(new Pair("func_147727_a", "mixAoBrightness")); - mInitMap.put(new Pair("func_147728_a", "renderBlockAnvilOrient")); - mInitMap.put(new Pair("func_147729_a", "getLiquidHeight")); - mInitMap.put(new Pair("func_147730_a", "renderBlockStemSmall")); - mInitMap.put(new Pair("func_147731_b", "renderPistonBase")); - mInitMap.put(new Pair("func_147732_a", "renderBlockRedstoneDiodeMetadata")); - mInitMap.put(new Pair("func_147733_k", "renderBlockStainedGlassPane")); - mInitMap.put(new Pair("func_147734_d", "renderFaceZPos")); - mInitMap.put(new Pair("func_147735_a", "renderBlockFence")); - mInitMap.put(new Pair("func_147736_d", "renderStandardBlockWithColorMultiplier")); - mInitMap.put(new Pair("func_147737_a", "renderBlockAnvilRotate")); - mInitMap.put(new Pair("func_147738_c", "renderPistonRodEW")); - mInitMap.put(new Pair("func_147739_a", "renderItemIn3d")); - mInitMap.put(new Pair("func_147740_a", "renderBlockStemBig")); - mInitMap.put(new Pair("func_147741_a", "renderBlockBrewingStand")); - mInitMap.put(new Pair("func_147742_r", "renderBlockLog")); - mInitMap.put(new Pair("func_147743_a", "renderBlockEndPortalFrame")); - mInitMap.put(new Pair("func_147744_b", "hasOverrideBlockTexture")); - mInitMap.put(new Pair("func_147745_b", "getBlockIcon")); - mInitMap.put(new Pair("func_147746_l", "renderCrossedSquares")); - mInitMap.put(new Pair("func_147747_a", "renderTorchAtAngle")); - mInitMap.put(new Pair("func_147748_a", "renderBlockRedstoneDiode")); - mInitMap.put(new Pair("func_147749_a", "renderBlockSandFalling")); - mInitMap.put(new Pair("func_147750_a", "renderPistonExtensionAllFaces")); - mInitMap.put(new Pair("func_147751_a", "renderStandardBlockWithAmbientOcclusion")); - mInitMap.put(new Pair("func_147752_a", "renderBlockFlowerpot")); - mInitMap.put(new Pair("func_147753_b", "setRenderAllFaces")); - mInitMap.put(new Pair("func_147754_e", "renderBlockCactusImpl")); - mInitMap.put(new Pair("func_147755_t", "renderBlockCactus")); - mInitMap.put(new Pair("func_147756_g", "renderBlockTripWire")); - mInitMap.put(new Pair("func_147757_a", "setOverrideBlockTexture")); - mInitMap.put(new Pair("func_147758_b", "getIconSafe")); - mInitMap.put(new Pair("func_147759_a", "renderBlockRepeater")); - mInitMap.put(new Pair("func_147760_u", "renderBlockDoor")); - mInitMap.put(new Pair("func_147761_c", "renderFaceZNeg")); - mInitMap.put(new Pair("func_147762_c", "unlockBlockBounds")); - mInitMap.put(new Pair("func_147763_a", "renderPistonRodUD")); - mInitMap.put(new Pair("func_147764_f", "renderFaceXPos")); - mInitMap.put(new Pair("func_147765_a", "drawCrossedSquares")); - mInitMap.put(new Pair("func_147766_a", "renderBlockMinecartTrack")); - mInitMap.put(new Pair("func_147767_a", "renderBlockPane")); - mInitMap.put(new Pair("func_147768_a", "renderFaceYNeg")); - mInitMap.put(new Pair("func_147769_a", "renderBlockAllFaces")); - mInitMap.put(new Pair("func_147770_b", "overrideBlockBounds")); - mInitMap.put(new Pair("func_147771_a", "clearOverrideBlockTexture")); - mInitMap.put(new Pair("func_147772_a", "renderBlockCocoa")); - mInitMap.put(new Pair("func_147773_v", "renderBlockBed")); - mInitMap.put(new Pair("func_147774_a", "renderBlockDoublePlant")); - mInitMap.put(new Pair("func_147775_a", "setRenderBoundsFromBlock")); - mInitMap.put(new Pair("func_147776_a", "renderBlockFenceGate")); - mInitMap.put(new Pair("func_147777_a", "getBlockIconFromSide")); - mInitMap.put(new Pair("func_147778_a", "getAoBrightness")); - mInitMap.put(new Pair("func_147779_s", "renderBlockQuartz")); - mInitMap.put(new Pair("func_147780_a", "renderBlockAnvilMetadata")); - mInitMap.put(new Pair("func_147781_a", "renderBlockRedstoneComparator")); - mInitMap.put(new Pair("func_147782_a", "setRenderBounds")); - mInitMap.put(new Pair("func_147783_o", "renderBlockLilyPad")); - mInitMap.put(new Pair("func_147784_q", "renderStandardBlock")); - mInitMap.put(new Pair("func_147785_a", "renderBlockCauldron")); - mInitMap.put(new Pair("func_147786_a", "setRenderFromInside")); - mInitMap.put(new Pair("func_147787_a", "getBlockIconFromSideAndMetadata")); - mInitMap.put(new Pair("func_147788_h", "renderBlockRedstomInitMap.put(newire")); - mInitMap.put(new Pair("func_147789_b", "renderPistonRodSN")); - mInitMap.put(new Pair("func_147790_e", "renderBlockLever")); - mInitMap.put(new Pair("func_147791_c", "renderBlockTorch")); - mInitMap.put(new Pair("func_147792_a", "renderBlockUsingTexture")); - mInitMap.put(new Pair("func_147793_a", "getBlockIcon")); - mInitMap.put(new Pair("func_147794_i", "renderBlockLadder")); - mInitMap.put(new Pair("func_147795_a", "renderBlockCropsImpl")); - mInitMap.put(new Pair("func_147796_n", "renderBlockCrops")); - mInitMap.put(new Pair("func_147797_a", "renderBlockBeacon")); - mInitMap.put(new Pair("func_147798_e", "renderFaceXNeg")); - mInitMap.put(new Pair("func_147799_a", "renderBlockHopperMetadata")); - mInitMap.put(new Pair("func_147800_a", "renderBlockAsItem")); - mInitMap.put(new Pair("func_147801_a", "renderBlockFire")); - mInitMap.put(new Pair("func_147802_a", "renderBlockDragonEgg")); - mInitMap.put(new Pair("func_147803_a", "renderBlockHopper")); - mInitMap.put(new Pair("func_147804_d", "renderPistonBaseAllFaces")); - mInitMap.put(new Pair("func_147805_b", "renderBlockByRenderType")); - mInitMap.put(new Pair("func_147806_b", "renderFaceYPos")); - mInitMap.put(new Pair("func_147807_a", "renderBlockWall")); - mInitMap.put(new Pair("func_147808_b", "renderStandardBlockWithAmbientOcclusionPartial")); - mInitMap.put(new Pair("func_147809_c", "renderPistonExtension")); - mInitMap.put(new Pair("func_147889_b", "updateRendererSort")); - mInitMap.put(new Pair("func_147890_b", "preRenderBlocks")); - mInitMap.put(new Pair("func_147891_a", "postRenderBlocks")); - mInitMap.put(new Pair("func_147892_a", "updateRenderer")); - mInitMap.put(new Pair("func_147905_a", "isStaticEntity")); - mInitMap.put(new Pair("func_147906_a", "renderLivingLabel")); - mInitMap.put(new Pair("func_147936_a", "renderEntityStatic")); - mInitMap.put(new Pair("func_147937_a", "renderEntitySimple")); - mInitMap.put(new Pair("func_147938_a", "cacheActiveRenderInfo")); - mInitMap.put(new Pair("func_147939_a", "doRenderEntity")); - mInitMap.put(new Pair("func_147940_a", "renderEntityWithPosYaw")); - mInitMap.put(new Pair("func_147942_a", "deleteTexture")); - mInitMap.put(new Pair("func_147946_a", "allocateTextureImpl")); - mInitMap.put(new Pair("func_147947_a", "uploadTextureSub")); - mInitMap.put(new Pair("func_147948_a", "prepareAnisotropicData")); - mInitMap.put(new Pair("func_147949_a", "generateMipmapData")); - } - - private static void init2() { - mInitMap.put(new Pair("func_147951_b", "setTextureBlurred")); - mInitMap.put(new Pair("func_147955_a", "uploadTextureMipmap")); - mInitMap.put(new Pair("func_147960_a", "prepareAnisotropicFiltering")); - mInitMap.put(new Pair("func_147961_a", "fixTransparentPixels")); - mInitMap.put(new Pair("func_147962_a", "getFrameTextureData")); - mInitMap.put(new Pair("func_147963_d", "generateMipmaps")); - mInitMap.put(new Pair("func_147964_a", "loadSprite")); - mInitMap.put(new Pair("func_147965_a", "getFrameTextureData")); - mInitMap.put(new Pair("func_147969_b", "getMipmapDimension")); - mInitMap.put(new Pair("func_147984_b", "getShaderUniformOrDefault")); - mInitMap.put(new Pair("func_147985_d", "markDirty")); - mInitMap.put(new Pair("func_147986_h", "getProgram")); - mInitMap.put(new Pair("func_147987_b", "parseUniform")); - mInitMap.put(new Pair("func_147988_a", "deleteShader")); - mInitMap.put(new Pair("func_147989_e", "getVertexShaderLoader")); - mInitMap.put(new Pair("func_147990_i", "setupUniforms")); - mInitMap.put(new Pair("func_147991_a", "getShaderUniform")); - mInitMap.put(new Pair("func_147992_a", "addSamplerTexture")); - mInitMap.put(new Pair("func_147993_b", "endShader")); - mInitMap.put(new Pair("func_147994_f", "getFragmentShaderLoader")); - mInitMap.put(new Pair("func_147995_c", "useShader")); - mInitMap.put(new Pair("func_147996_a", "parseSampler")); - mInitMap.put(new Pair("func_148017_a", "getFramebuffer")); - mInitMap.put(new Pair("func_148018_a", "loadShaderGroup")); - mInitMap.put(new Pair("func_148020_a", "addFramebuffer")); - mInitMap.put(new Pair("func_148021_a", "deleteShaderGroup")); - mInitMap.put(new Pair("func_148022_b", "getShaderGroupName")); - mInitMap.put(new Pair("func_148023_a", "addShader")); - mInitMap.put(new Pair("func_148024_c", "resetProjectionMatrix")); - mInitMap.put(new Pair("func_148026_a", "createBindFramebuffers")); - mInitMap.put(new Pair("func_148027_a", "initTarget")); - mInitMap.put(new Pair("func_148028_c", "initUniform")); - mInitMap.put(new Pair("func_148040_d", "preLoadShader")); - mInitMap.put(new Pair("func_148041_a", "addAuxFramebuffer")); - mInitMap.put(new Pair("func_148042_a", "loadShader")); - mInitMap.put(new Pair("func_148043_c", "getShaderManager")); - mInitMap.put(new Pair("func_148044_b", "deleteShader")); - mInitMap.put(new Pair("func_148045_a", "setProjectionMatrix")); - mInitMap.put(new Pair("func_148054_b", "deleteShader")); - mInitMap.put(new Pair("func_148055_a", "getShaderFilename")); - mInitMap.put(new Pair("func_148056_a", "attachShader")); - mInitMap.put(new Pair("func_148057_a", "loadShader")); - mInitMap.put(new Pair("func_148062_a", "getShaderName")); - mInitMap.put(new Pair("func_148063_b", "getShaderExtension")); - mInitMap.put(new Pair("func_148064_d", "getLoadedShaders")); - mInitMap.put(new Pair("func_148065_c", "getShaderMode")); - mInitMap.put(new Pair("func_148074_b", "getStaticShaderLinkHelper")); - mInitMap.put(new Pair("func_148075_b", "linkProgram")); - mInitMap.put(new Pair("func_148076_a", "setmInitMap.put(newStaticShaderLinkHelper")); - mInitMap.put(new Pair("func_148077_a", "deleteShader")); - mInitMap.put(new Pair("func_148078_c", "createProgram")); - mInitMap.put(new Pair("func_148081_a", "set")); - mInitMap.put(new Pair("func_148082_k", "uploadFloatMatrix")); - mInitMap.put(new Pair("func_148083_a", "set")); - mInitMap.put(new Pair("func_148084_b", "setUniformLocation")); - mInitMap.put(new Pair("func_148085_a", "parseType")); - mInitMap.put(new Pair("func_148086_a", "getShaderName")); - mInitMap.put(new Pair("func_148087_a", "set")); - mInitMap.put(new Pair("func_148088_a", "set")); - mInitMap.put(new Pair("func_148089_j", "uploadFloat")); - mInitMap.put(new Pair("func_148090_a", "set")); - mInitMap.put(new Pair("func_148091_i", "uploadInt")); - mInitMap.put(new Pair("func_148093_b", "upload")); - mInitMap.put(new Pair("func_148094_a", "set")); - mInitMap.put(new Pair("func_148095_a", "set")); - mInitMap.put(new Pair("func_148096_h", "markDirty")); - mInitMap.put(new Pair("func_148097_a", "set")); - mInitMap.put(new Pair("func_148120_b", "drawSelectionBox")); - mInitMap.put(new Pair("func_148121_k", "bindAmountScrolled")); - mInitMap.put(new Pair("func_148122_a", "setDimensions")); - mInitMap.put(new Pair("func_148123_a", "drawBackground")); - mInitMap.put(new Pair("func_148124_c", "getSlotIndexFromScreenCoords")); - mInitMap.put(new Pair("func_148125_i", "getEnabled")); - mInitMap.put(new Pair("func_148126_a", "drawSlot")); - mInitMap.put(new Pair("func_148127_b", "getSize")); - mInitMap.put(new Pair("func_148128_a", "drawScreen")); - mInitMap.put(new Pair("func_148129_a", "drawListHeader")); - mInitMap.put(new Pair("func_148130_a", "setShowSelectionBox")); - mInitMap.put(new Pair("func_148131_a", "isSelected")); - mInitMap.put(new Pair("func_148133_a", "setHasListHeader")); - mInitMap.put(new Pair("func_148134_d", "registerScrollButtons")); - mInitMap.put(new Pair("func_148136_c", "overlayBackground")); - mInitMap.put(new Pair("func_148137_d", "getScrollBarX")); - mInitMap.put(new Pair("func_148138_e", "getContentHeight")); - mInitMap.put(new Pair("func_148139_c", "getListWidth")); - mInitMap.put(new Pair("func_148140_g", "setSlotXBoundsFromLeft")); - mInitMap.put(new Pair("func_148141_e", "isMouseYWithinSlotBounds")); - mInitMap.put(new Pair("func_148143_b", "setEnabled")); - mInitMap.put(new Pair("func_148144_a", "elementClicked")); - mInitMap.put(new Pair("func_148145_f", "scrollBy")); - mInitMap.put(new Pair("func_148146_j", "getSlotHeight")); - mInitMap.put(new Pair("func_148147_a", "actionPerformed")); - mInitMap.put(new Pair("func_148148_g", "getAmountScrolled")); - mInitMap.put(new Pair("func_148180_b", "getListEntry")); - mInitMap.put(new Pair("func_148201_l", "getList")); - mInitMap.put(new Pair("func_148202_k", "getListHeader")); - mInitMap.put(new Pair("func_148254_d", "getToken")); - mInitMap.put(new Pair("func_148255_b", "getPlayerID")); - mInitMap.put(new Pair("func_148256_e", "getProfile")); - mInitMap.put(new Pair("func_148259_a", "saveScreenshot")); - mInitMap.put(new Pair("func_148260_a", "saveScreenshot")); - mInitMap.put(new Pair("func_148262_d", "denormalizeValue")); - mInitMap.put(new Pair("func_148263_a", "setValueMax")); - mInitMap.put(new Pair("func_148264_f", "snapToStep")); - mInitMap.put(new Pair("func_148266_c", "normalizeValue")); - mInitMap.put(new Pair("func_148267_f", "getValueMax")); - mInitMap.put(new Pair("func_148268_e", "snapToStepClamp")); - mInitMap.put(new Pair("func_148277_b", "mouseReleased")); - mInitMap.put(new Pair("func_148278_a", "mousePressed")); - mInitMap.put(new Pair("func_148279_a", "drawEntry")); - mInitMap.put(new Pair("func_148289_a", "getLanServer")); - mInitMap.put(new Pair("func_148296_a", "getServerData")); - mInitMap.put(new Pair("func_148297_b", "prepareServerIcon")); - mInitMap.put(new Pair("func_148329_a", "scrollTo")); - mInitMap.put(new Pair("func_148334_a", "generatemInitMap.put(newRandomName")); - mInitMap.put(new Pair("func_148335_a", "reseedRandomGenerator")); - mInitMap.put(new Pair("func_148522_a", "onDownloadComplete")); - mInitMap.put(new Pair("func_148526_a", "obtainResourcePack")); - mInitMap.put(new Pair("func_148530_e", "getResourcePackInstance")); - mInitMap.put(new Pair("func_148535_c", "getListMipmaps")); - mInitMap.put(new Pair("func_148537_a", "sendPacketToAllPlayersInDimension")); - mInitMap.put(new Pair("func_148539_a", "sendChatMsg")); - mInitMap.put(new Pair("func_148540_a", "sendPacketToAllPlayers")); - mInitMap.put(new Pair("func_148541_a", "sendToAllNear")); - mInitMap.put(new Pair("func_148542_a", "allowUserToConnect")); - mInitMap.put(new Pair("func_148543_a", "sendToAllNearExcept")); - mInitMap.put(new Pair("func_148544_a", "sendChatMsgImpl")); - mInitMap.put(new Pair("func_148545_a", "createPlayerForUser")); - mInitMap.put(new Pair("func_148552_f", "isStreaming")); - mInitMap.put(new Pair("func_148553_a", "setSoundEntryVolume")); - mInitMap.put(new Pair("func_148554_a", "setSoundEntryWeight")); - mInitMap.put(new Pair("func_148555_d", "getSoundEntryWeight")); - mInitMap.put(new Pair("func_148556_a", "getSoundEntryName")); - mInitMap.put(new Pair("func_148557_a", "setStreaming")); - mInitMap.put(new Pair("func_148558_b", "getSoundEntryVolume")); - mInitMap.put(new Pair("func_148559_b", "setSoundEntryPitch")); - mInitMap.put(new Pair("func_148560_c", "getSoundEntryPitch")); - mInitMap.put(new Pair("func_148561_a", "setSoundEntryName")); - mInitMap.put(new Pair("func_148562_a", "setSoundEntryType")); - mInitMap.put(new Pair("func_148563_e", "getSoundEntryType")); - mInitMap.put(new Pair("func_148570_a", "getSoundList")); - mInitMap.put(new Pair("func_148571_a", "setSoundCategory")); - mInitMap.put(new Pair("func_148572_a", "setReplaceExisting")); - mInitMap.put(new Pair("func_148573_c", "getSoundCategory")); - mInitMap.put(new Pair("func_148574_b", "canReplaceExisting")); - mInitMap.put(new Pair("func_148580_a", "getType")); - mInitMap.put(new Pair("func_148586_a", "getTypeInt")); - mInitMap.put(new Pair("func_148594_a", "getNormalizedVolume")); - mInitMap.put(new Pair("func_148595_a", "getSoundCategoryVolume")); - mInitMap.put(new Pair("func_148596_a", "reloadSoundSystem")); - mInitMap.put(new Pair("func_148597_a", "isSoundPlaying")); - mInitMap.put(new Pair("func_148599_a", "playDelayedSound")); - mInitMap.put(new Pair("func_148601_a", "setSoundCategoryVolume")); - mInitMap.put(new Pair("func_148602_b", "stopSound")); - mInitMap.put(new Pair("func_148604_f", "resumeAllSounds")); - mInitMap.put(new Pair("func_148605_d", "updateAllSounds")); - mInitMap.put(new Pair("func_148606_a", "getNormalizedPitch")); - mInitMap.put(new Pair("func_148608_i", "loadSoundSystem")); - mInitMap.put(new Pair("func_148610_e", "pauseAllSounds")); - mInitMap.put(new Pair("func_148611_c", "playSound")); - mInitMap.put(new Pair("func_148612_a", "getURLForSoundResource")); - mInitMap.put(new Pair("func_148613_b", "unloadSoundSystem")); - mInitMap.put(new Pair("func_148614_c", "stopAllSounds")); - mInitMap.put(new Pair("func_148615_a", "setListener")); - mInitMap.put(new Pair("func_148633_c", "getMaxDelay")); - mInitMap.put(new Pair("func_148634_b", "getMinDelay")); - mInitMap.put(new Pair("func_148635_a", "getMusicTickerLocation")); - mInitMap.put(new Pair("func_148647_b", "setVolume")); - mInitMap.put(new Pair("func_148648_d", "isStreamingSound")); - mInitMap.put(new Pair("func_148649_c", "getVolume")); - mInitMap.put(new Pair("func_148650_b", "getPitch")); - mInitMap.put(new Pair("func_148651_a", "setPitch")); - mInitMap.put(new Pair("func_148652_a", "getSoundPoolEntryLocation")); - mInitMap.put(new Pair("func_148727_a", "addSoundToEventPool")); - mInitMap.put(new Pair("func_148728_d", "getSoundCategory")); - mInitMap.put(new Pair("func_148729_c", "getSoundEventLocation")); - mInitMap.put(new Pair("func_148740_a", "createUnderlyingMap")); - mInitMap.put(new Pair("func_148741_d", "containsKey")); - mInitMap.put(new Pair("func_148742_b", "getKeys")); - mInitMap.put(new Pair("func_148750_c", "getNameForObject")); - mInitMap.put(new Pair("func_148753_b", "containsId")); - mInitMap.put(new Pair("func_148754_a", "getObjectById")); - mInitMap.put(new Pair("func_148755_c", "ensureNamespaced")); - mInitMap.put(new Pair("func_148756_a", "addObject")); - mInitMap.put(new Pair("func_148757_b", "getIDForObject")); - mInitMap.put(new Pair("func_148762_a", "registerSound")); - mInitMap.put(new Pair("func_148763_c", "clearMap")); - mInitMap.put(new Pair("func_148821_a", "glBlendFunc")); - mInitMap.put(new Pair("func_148822_b", "isFramebufferEnabled")); - mInitMap.put(new Pair("func_148833_a", "processPacket")); - mInitMap.put(new Pair("func_148834_a", "readBlob")); - mInitMap.put(new Pair("func_148835_b", "serialize")); - mInitMap.put(new Pair("func_148836_a", "hasPriority")); - mInitMap.put(new Pair("func_148837_a", "readPacketData")); - mInitMap.put(new Pair("func_148838_a", "writeBlob")); - mInitMap.put(new Pair("func_148839_a", "generatePacket")); - mInitMap.put(new Pair("func_148840_b", "writePacketData")); - mInitMap.put(new Pair("func_148853_f", "getTileEntityType")); - mInitMap.put(new Pair("func_148854_e", "getZ")); - mInitMap.put(new Pair("func_148855_d", "getY")); - mInitMap.put(new Pair("func_148856_c", "getX")); - mInitMap.put(new Pair("func_148857_g", "getNbtCompound")); - mInitMap.put(new Pair("func_148864_h", "getData2")); - mInitMap.put(new Pair("func_148865_f", "getZ")); - mInitMap.put(new Pair("func_148866_e", "getY")); - mInitMap.put(new Pair("func_148867_d", "getX")); - mInitMap.put(new Pair("func_148868_c", "getBlockType")); - mInitMap.put(new Pair("func_148869_g", "getData1")); - mInitMap.put(new Pair("func_148916_d", "isChat")); - mInitMap.put(new Pair("func_149089_e", "getZ")); - mInitMap.put(new Pair("func_149090_d", "getY")); - mInitMap.put(new Pair("func_149091_a", "getPlayer")); - mInitMap.put(new Pair("func_149092_c", "getX")); - mInitMap.put(new Pair("func_149101_g", "getFlySpeed")); - mInitMap.put(new Pair("func_149102_b", "setFlying")); - mInitMap.put(new Pair("func_149103_f", "isCreativeMode")); - mInitMap.put(new Pair("func_149104_a", "setFlySpeed")); - mInitMap.put(new Pair("func_149105_e", "isAllowFlying")); - mInitMap.put(new Pair("func_149106_d", "isFlying")); - mInitMap.put(new Pair("func_149107_h", "getWalkSpeed")); - mInitMap.put(new Pair("func_149108_a", "setInvulnerable")); - mInitMap.put(new Pair("func_149109_c", "setAllowFlying")); - mInitMap.put(new Pair("func_149110_b", "setWalkSpeed")); - mInitMap.put(new Pair("func_149111_d", "setCreativeMode")); - mInitMap.put(new Pair("func_149112_c", "isInvulnerable")); - mInitMap.put(new Pair("func_149187_d", "getData")); - mInitMap.put(new Pair("func_149188_c", "getMapId")); - mInitMap.put(new Pair("func_149239_h", "getPosZ")); - mInitMap.put(new Pair("func_149240_f", "getPosX")); - mInitMap.put(new Pair("func_149241_e", "getSoundData")); - mInitMap.put(new Pair("func_149242_d", "getSoundType")); - mInitMap.put(new Pair("func_149243_g", "getPosY")); - mInitMap.put(new Pair("func_149244_c", "isSoundServerwide")); - mInitMap.put(new Pair("func_149289_c", "getClientTime")); - mInitMap.put(new Pair("func_149304_c", "getProfile")); - mInitMap.put(new Pair("func_149330_d", "getFoodLevel")); - mInitMap.put(new Pair("func_149331_e", "getSaturationLevel")); - mInitMap.put(new Pair("func_149332_c", "getHealth")); - mInitMap.put(new Pair("func_149419_c", "getMessage")); - mInitMap.put(new Pair("func_149421_d", "getType")); - mInitMap.put(new Pair("func_149435_c", "getStatus")); - mInitMap.put(new Pair("func_149439_c", "getMessage")); - mInitMap.put(new Pair("func_149460_c", "getKey")); - mInitMap.put(new Pair("func_149462_g", "getYaw")); - mInitMap.put(new Pair("func_149463_k", "getRotating")); - mInitMap.put(new Pair("func_149464_c", "getPositionX")); - mInitMap.put(new Pair("func_149467_d", "getPositionY")); - mInitMap.put(new Pair("func_149470_h", "getPitch")); - mInitMap.put(new Pair("func_149471_f", "getStance")); - mInitMap.put(new Pair("func_149472_e", "getPositionZ")); - mInitMap.put(new Pair("func_149482_g", "getFlySpeed")); - mInitMap.put(new Pair("func_149483_b", "setFlying")); - mInitMap.put(new Pair("func_149484_f", "isCreativeMode")); - mInitMap.put(new Pair("func_149485_a", "setFlySpeed")); - mInitMap.put(new Pair("func_149486_e", "isAllowFlying")); - mInitMap.put(new Pair("func_149488_d", "isFlying")); - mInitMap.put(new Pair("func_149489_h", "getWalkSpeed")); - mInitMap.put(new Pair("func_149490_a", "setInvulnerable")); - mInitMap.put(new Pair("func_149491_c", "setAllowFlying")); - mInitMap.put(new Pair("func_149492_b", "setWalkSpeed")); - mInitMap.put(new Pair("func_149493_d", "setCreativeMode")); - mInitMap.put(new Pair("func_149494_c", "isInvulnerable")); - mInitMap.put(new Pair("func_149501_f", "getDiggingBlockFace")); - mInitMap.put(new Pair("func_149502_e", "getDiggedBlockZ")); - mInitMap.put(new Pair("func_149503_d", "getDiggedBlockY")); - mInitMap.put(new Pair("func_149505_c", "getDiggedBlockX")); - mInitMap.put(new Pair("func_149506_g", "getDiggedBlockStatus")); - mInitMap.put(new Pair("func_149518_g", "getDifficulty")); - mInitMap.put(new Pair("func_149519_h", "isShowCape")); - mInitMap.put(new Pair("func_149520_f", "isColorsEnabled")); - mInitMap.put(new Pair("func_149521_d", "getView")); - mInitMap.put(new Pair("func_149523_e", "getChatVisibility")); - mInitMap.put(new Pair("func_149524_c", "getLang")); - mInitMap.put(new Pair("func_149532_c", "getId")); - mInitMap.put(new Pair("func_149533_d", "getUid")); - mInitMap.put(new Pair("func_149537_d", "getButton")); - mInitMap.put(new Pair("func_149539_c", "getId")); - mInitMap.put(new Pair("func_149542_h", "getMode")); - mInitMap.put(new Pair("func_149543_e", "getUsedButton")); - mInitMap.put(new Pair("func_149544_d", "getSlotId")); - mInitMap.put(new Pair("func_149546_g", "getClickedItem")); - mInitMap.put(new Pair("func_149547_f", "getActionNumber")); - mInitMap.put(new Pair("func_149548_c", "getWindowId")); - mInitMap.put(new Pair("func_149558_e", "getData")); - mInitMap.put(new Pair("func_149559_c", "getChannel")); - mInitMap.put(new Pair("func_149564_a", "getEntityFromWorld")); - mInitMap.put(new Pair("func_149565_c", "getAction")); - mInitMap.put(new Pair("func_149568_f", "getPlacedBlockDirection")); - mInitMap.put(new Pair("func_149569_i", "getPlacedBlockOffsetY")); - mInitMap.put(new Pair("func_149570_e", "getPlacedBlockZ")); - mInitMap.put(new Pair("func_149571_d", "getPlacedBlockY")); - mInitMap.put(new Pair("func_149573_h", "getPlacedBlockOffsetX")); - mInitMap.put(new Pair("func_149574_g", "getStack")); - mInitMap.put(new Pair("func_149575_j", "getPlacedBlockOffsetZ")); - mInitMap.put(new Pair("func_149576_c", "getPlacedBlockX")); - mInitMap.put(new Pair("func_149585_e", "getZ")); - mInitMap.put(new Pair("func_149586_d", "getY")); - mInitMap.put(new Pair("func_149588_c", "getX")); - mInitMap.put(new Pair("func_149589_f", "getLines")); - mInitMap.put(new Pair("func_149594_c", "getRequestedState")); - mInitMap.put(new Pair("func_149595_d", "getProtocolVersion")); - mInitMap.put(new Pair("func_149614_c", "getSlotId")); - mInitMap.put(new Pair("func_149616_d", "getForwardSpeed")); - mInitMap.put(new Pair("func_149617_f", "isSneaking")); - mInitMap.put(new Pair("func_149618_e", "isJumping")); - mInitMap.put(new Pair("func_149620_c", "getStrafeSpeed")); - mInitMap.put(new Pair("func_149625_d", "getStack")); - mInitMap.put(new Pair("func_149627_c", "getSlotId")); - mInitMap.put(new Pair("func_149633_g", "getSelectedBoundingBoxFromPool")); - mInitMap.put(new Pair("func_149634_a", "getBlockFromItem")); - mInitMap.put(new Pair("func_149635_D", "getBlockColor")); - mInitMap.put(new Pair("func_149636_a", "harvestBlock")); - mInitMap.put(new Pair("func_149637_q", "isBlockNormalCube")); - mInitMap.put(new Pair("func_149638_a", "getExplosionResistance")); - mInitMap.put(new Pair("func_149639_l", "fillWithRain")); - mInitMap.put(new Pair("func_149640_a", "modifyEntityVelocity")); - mInitMap.put(new Pair("func_149641_N", "getTextureName")); - mInitMap.put(new Pair("func_149642_a", "dropBlockAsItem")); - mInitMap.put(new Pair("func_149643_k", "getDamageValue")); - mInitMap.put(new Pair("func_149644_j", "createStackedBlock")); - mInitMap.put(new Pair("func_149645_b", "getRenderType")); - mInitMap.put(new Pair("func_149646_a", "shouldSideBeRendered")); - mInitMap.put(new Pair("func_149647_a", "setCreativeTab")); - mInitMap.put(new Pair("func_149648_K", "isFlowerPot")); - mInitMap.put(new Pair("func_149649_H", "disableStats")); - mInitMap.put(new Pair("func_149650_a", "getItemDropped")); - mInitMap.put(new Pair("func_149651_a", "registerIcons")); - mInitMap.put(new Pair("func_149652_G", "getEnableStats")); - mInitMap.put(new Pair("func_149653_t", "getTickRandomly")); - mInitMap.put(new Pair("func_149654_a", "isVecInsideYZBounds")); - mInitMap.put(new Pair("func_149655_b", "isPassable")); - mInitMap.put(new Pair("func_149656_h", "getMobilityFlag")); - mInitMap.put(new Pair("func_149657_c", "dropXpOnBlockBreak")); - mInitMap.put(new Pair("func_149658_d", "setTextureName")); - mInitMap.put(new Pair("func_149659_a", "canDropFromExplosion")); - mInitMap.put(new Pair("func_149660_a", "onBlockPlaced")); - mInitMap.put(new Pair("func_149661_c", "isVecInsideXYBounds")); - mInitMap.put(new Pair("func_149662_c", "isOpaqueCube")); - mInitMap.put(new Pair("func_149663_c", "setUnlocalizedName")); - mInitMap.put(new Pair("func_149664_b", "onBlockDestroyedByPlayer")); - mInitMap.put(new Pair("func_149665_z", "getBlockBoundsMinY")); - mInitMap.put(new Pair("func_149666_a", "getSubBlocks")); - mInitMap.put(new Pair("func_149667_c", "isAssociatedBlock")); - mInitMap.put(new Pair("func_149668_a", "getCollisionBoundingBoxFromPool")); - mInitMap.put(new Pair("func_149669_A", "getBlockBoundsMaxY")); - mInitMap.put(new Pair("func_149670_a", "onEntityCollidedWithBlock")); - mInitMap.put(new Pair("func_149671_p", "registerBlocks")); - mInitMap.put(new Pair("func_149672_a", "setStepSound")); - mInitMap.put(new Pair("func_149673_e", "getIcon")); - mInitMap.put(new Pair("func_149674_a", "updateTick")); - mInitMap.put(new Pair("func_149675_a", "setTickRandomly")); - mInitMap.put(new Pair("func_149676_a", "setBlockBounds")); - mInitMap.put(new Pair("func_149677_c", "getMixedBrightnessForBlock")); - mInitMap.put(new Pair("func_149678_a", "canStopRayTrace")); - mInitMap.put(new Pair("func_149679_a", "quantityDroppedWithBonus")); - mInitMap.put(new Pair("func_149680_a", "isEqualTo")); - mInitMap.put(new Pair("func_149681_a", "onBlockHarvested")); - mInitMap.put(new Pair("func_149682_b", "getIdFromBlock")); - mInitMap.put(new Pair("func_149683_g", "setBlockBoundsForItemRender")); - mInitMap.put(new Pair("func_149684_b", "getBlockFromName")); - mInitMap.put(new Pair("func_149685_I", "getAmbientOcclusionLightValue")); - mInitMap.put(new Pair("func_149686_d", "renderAsNormalBlock")); - mInitMap.put(new Pair("func_149687_b", "isVecInsideXZBounds")); - mInitMap.put(new Pair("func_149688_o", "getMaterial")); - mInitMap.put(new Pair("func_149689_a", "onBlockPlacedBy")); - mInitMap.put(new Pair("func_149690_a", "dropBlockAsItemWithChance")); - mInitMap.put(new Pair("func_149691_a", "getIcon")); - mInitMap.put(new Pair("func_149692_a", "damageDropped")); - mInitMap.put(new Pair("func_149693_C", "getBlockBoundsMaxZ")); - mInitMap.put(new Pair("func_149694_d", "getItem")); - mInitMap.put(new Pair("func_149695_a", "onNeighborBlockChange")); - mInitMap.put(new Pair("func_149696_a", "onBlockEventReceived")); - mInitMap.put(new Pair("func_149697_b", "dropBlockAsItem")); - mInitMap.put(new Pair("func_149698_L", "requiresUpdates")); - mInitMap.put(new Pair("func_149699_a", "onBlockClicked")); - mInitMap.put(new Pair("func_149700_E", "canSilkHarvest")); - mInitMap.put(new Pair("func_149701_w", "getRenderBlockPass")); - mInitMap.put(new Pair("func_149702_O", "getItemIconName")); - mInitMap.put(new Pair("func_149703_v", "isCollidable")); - mInitMap.put(new Pair("func_149704_x", "getBlockBoundsMinX")); - mInitMap.put(new Pair("func_149705_a", "canReplace")); - mInitMap.put(new Pair("func_149706_B", "getBlockBoundsMinZ")); - mInitMap.put(new Pair("func_149707_d", "canPlaceBlockOnSide")); - mInitMap.put(new Pair("func_149708_J", "getCreativeTabToDisplayOn")); - mInitMap.put(new Pair("func_149709_b", "isProvidingWeakPower")); - mInitMap.put(new Pair("func_149710_n", "getUseNeighborBrightness")); - mInitMap.put(new Pair("func_149711_c", "setHardness")); - mInitMap.put(new Pair("func_149712_f", "getBlockHardness")); - mInitMap.put(new Pair("func_149713_g", "setLightOpacity")); - mInitMap.put(new Pair("func_149714_e", "onPostBlockPlaced")); - mInitMap.put(new Pair("func_149715_a", "setLightLevel")); - mInitMap.put(new Pair("func_149716_u", "hasTileEntity")); - mInitMap.put(new Pair("func_149717_k", "getLightOpacity")); - mInitMap.put(new Pair("func_149718_j", "canBlockStay")); - mInitMap.put(new Pair("func_149719_a", "setBlockBoundsBasedOnState")); - mInitMap.put(new Pair("func_149720_d", "colorMultiplier")); - mInitMap.put(new Pair("func_149721_r", "isNormalCube")); - mInitMap.put(new Pair("func_149722_s", "setBlockUnbreakable")); - mInitMap.put(new Pair("func_149723_a", "onBlockDestroyedByExplosion")); - mInitMap.put(new Pair("func_149724_b", "onEntityWalking")); - mInitMap.put(new Pair("func_149725_f", "onBlockPreDestroy")); - mInitMap.put(new Pair("func_149726_b", "onBlockAdded")); - mInitMap.put(new Pair("func_149727_a", "onBlockActivated")); - mInitMap.put(new Pair("func_149728_f", "getMapColor")); - mInitMap.put(new Pair("func_149729_e", "getBlockById")); - mInitMap.put(new Pair("func_149730_j", "isFullBlock")); - mInitMap.put(new Pair("func_149731_a", "collisionRayTrace")); - mInitMap.put(new Pair("func_149732_F", "getLocalizedName")); - mInitMap.put(new Pair("func_149733_h", "getBlockTextureFromSide")); - mInitMap.put(new Pair("func_149734_b", "randomDisplayTick")); - mInitMap.put(new Pair("func_149735_b", "getItemIcon")); - mInitMap.put(new Pair("func_149736_g", "getComparatorInputOverride")); - mInitMap.put(new Pair("func_149737_a", "getPlayerRelativeBlockHardness")); - mInitMap.put(new Pair("func_149738_a", "tickRate")); - mInitMap.put(new Pair("func_149739_a", "getUnlocalizedName")); - mInitMap.put(new Pair("func_149740_M", "hasComparatorInputOverride")); - mInitMap.put(new Pair("func_149741_i", "getRenderColor")); - mInitMap.put(new Pair("func_149742_c", "canPlaceBlockAt")); - mInitMap.put(new Pair("func_149743_a", "addCollisionBoxesToList")); - mInitMap.put(new Pair("func_149744_f", "canProvidePower")); - mInitMap.put(new Pair("func_149745_a", "quantityDropped")); - mInitMap.put(new Pair("func_149746_a", "onFallenUpon")); - mInitMap.put(new Pair("func_149747_d", "isBlockSolid")); - mInitMap.put(new Pair("func_149748_c", "isProvidingStrongPower")); - mInitMap.put(new Pair("func_149749_a", "breakBlock")); - mInitMap.put(new Pair("func_149750_m", "getLightValue")); - mInitMap.put(new Pair("func_149751_l", "isTranslucent")); - mInitMap.put(new Pair("func_149752_b", "setResistance")); - mInitMap.put(new Pair("func_149753_y", "getBlockBoundsMaxX")); - mInitMap.put(new Pair("func_149798_e", "getEffectiveFlowDecay")); - mInitMap.put(new Pair("func_149800_f", "getFlowVector")); - mInitMap.put(new Pair("func_149801_b", "getLiquidHeightPercent")); - mInitMap.put(new Pair("func_149802_a", "getFlowDirection")); - mInitMap.put(new Pair("func_149803_e", "getLiquidIcon")); - mInitMap.put(new Pair("func_149817_o", "isFlammable")); - mInitMap.put(new Pair("func_149818_n", "setNotStationary")); - mInitMap.put(new Pair("func_149819_b", "invertMetadata")); - mInitMap.put(new Pair("func_149825_a", "isFence")); - mInitMap.put(new Pair("func_149826_e", "canConnectFenceTo")); - mInitMap.put(new Pair("func_149828_a", "playSoundWhenFallen")); - mInitMap.put(new Pair("func_149829_a", "onStartFalling")); - mInitMap.put(new Pair("func_149831_e", "canFallBelow")); - mInitMap.put(new Pair("func_149840_c", "getFireIcon")); - mInitMap.put(new Pair("func_149841_a", "tryCatchFire")); - mInitMap.put(new Pair("func_149844_e", "canBlockCatchFire")); - mInitMap.put(new Pair("func_149845_m", "getChanceOfNeighborsEncouragingFire")); - mInitMap.put(new Pair("func_149847_e", "canNeighborBurn")); - mInitMap.put(new Pair("func_149851_a", "canFertilize")); - mInitMap.put(new Pair("func_149852_a", "shouldFertilize")); - mInitMap.put(new Pair("func_149853_b", "fertilize")); - mInitMap.put(new Pair("func_149854_a", "canPlaceBlockOn")); - mInitMap.put(new Pair("func_149855_e", "checkAndDropBlock")); - mInitMap.put(new Pair("func_149863_m", "fertilize")); - mInitMap.put(new Pair("func_149865_P", "getCrop")); - mInitMap.put(new Pair("func_149866_i", "getSeed")); - mInitMap.put(new Pair("func_149872_i", "getStemIcon")); - mInitMap.put(new Pair("func_149873_e", "getState")); - mInitMap.put(new Pair("func_149874_m", "fertilizeStem")); - mInitMap.put(new Pair("func_149878_d", "growTree")); - mInitMap.put(new Pair("func_149879_c", "markOrGrowMarked")); - mInitMap.put(new Pair("func_149884_c", "fertilizeMushroom")); - mInitMap.put(new Pair("func_149895_l", "getDirection")); - mInitMap.put(new Pair("func_149896_b", "isFenceGateOpen")); - mInitMap.put(new Pair("func_149898_i", "getBlockUnpowered")); - mInitMap.put(new Pair("func_149900_a", "isGettingInput")); - mInitMap.put(new Pair("func_149903_h", "getInputStrength")); - mInitMap.put(new Pair("func_149906_e", "getBlockPowered")); - mInitMap.put(new Pair("func_149909_d", "isRedstoneRepeaterBlockID")); - mInitMap.put(new Pair("func_149915_a", "createmInitMap.put(newTileEntity")); - mInitMap.put(new Pair("func_149916_e", "getHopperIcon")); - mInitMap.put(new Pair("func_149917_c", "getActiveStateFromMetadata")); - mInitMap.put(new Pair("func_149918_b", "getDirectionFromMetadata")); - mInitMap.put(new Pair("func_149919_e", "updateBlockData")); - mInitMap.put(new Pair("func_149931_a", "updateFurnaceBlockState")); - mInitMap.put(new Pair("func_149937_b", "getFacingDirection")); - mInitMap.put(new Pair("func_149939_a", "getIPositionFromBlockSource")); - mInitMap.put(new Pair("func_149951_m", "getInventory")); - mInitMap.put(new Pair("func_149952_n", "isDoubleChest")); - mInitMap.put(new Pair("func_149953_o", "isOcelotSittingOnTop")); - mInitMap.put(new Pair("func_149954_e", "initMetadata")); - mInitMap.put(new Pair("func_149959_e", "getIconBrewingStandBase")); - mInitMap.put(new Pair("func_149962_a", "getTileEntity")); - mInitMap.put(new Pair("func_149965_a", "makeWither")); - mInitMap.put(new Pair("func_149970_j", "getOutputStrength")); - mInitMap.put(new Pair("func_149971_e", "getTileEntityComparator")); - mInitMap.put(new Pair("func_149975_b", "isBlockHeadOfBed")); - mInitMap.put(new Pair("func_149976_c", "isBedOccupied")); - mInitMap.put(new Pair("func_149977_a", "getSafeExitLocation")); - mInitMap.put(new Pair("func_149978_e", "setBedBounds")); - mInitMap.put(new Pair("func_149979_a", "setBedOccupied")); - mInitMap.put(new Pair("func_149988_b", "getCocoaIcon")); - mInitMap.put(new Pair("func_149990_e", "getIconSideOverlay")); - mInitMap.put(new Pair("func_150000_e", "tryToCreatePortal")); - mInitMap.put(new Pair("func_150002_b", "getFullSlabName")); - mInitMap.put(new Pair("func_150012_g", "getFullMetadata")); - mInitMap.put(new Pair("func_150020_b", "isEnderEyeInserted")); - mInitMap.put(new Pair("func_150021_e", "getIconEndPortalFrameEye")); - mInitMap.put(new Pair("func_150024_a", "setWaterLevel")); - mInitMap.put(new Pair("func_150025_c", "getRenderLiquidLevel")); - mInitMap.put(new Pair("func_150026_e", "getCauldronIcon")); - mInitMap.put(new Pair("func_150027_b", "getPowerFromMeta")); - mInitMap.put(new Pair("func_150042_a", "updateNeighbor")); - mInitMap.put(new Pair("func_150043_b", "setBlockBoundsFromMeta")); - mInitMap.put(new Pair("func_150044_m", "canStay")); - mInitMap.put(new Pair("func_150045_e", "findSolidSide")); - mInitMap.put(new Pair("func_150046_n", "activateButton")); - mInitMap.put(new Pair("func_150048_a", "onRedstoneSignal")); - mInitMap.put(new Pair("func_150049_b_", "isRailBlockAt")); - mInitMap.put(new Pair("func_150050_e", "isPowered")); - mInitMap.put(new Pair("func_150051_a", "isRailBlock")); - mInitMap.put(new Pair("func_150052_a", "refreshTrackShape")); - mInitMap.put(new Pair("func_150060_c", "getPowerFromMeta")); - mInitMap.put(new Pair("func_150061_a", "getSensitiveAABB")); - mInitMap.put(new Pair("func_150062_a", "setStateIfMobInteractsWithPlate")); - mInitMap.put(new Pair("func_150063_b", "setBlockBoundsFromMeta")); - mInitMap.put(new Pair("func_150064_a_", "updateNeighbors")); - mInitMap.put(new Pair("func_150065_e", "getPlateState")); - mInitMap.put(new Pair("func_150066_d", "getMetaFromPower")); - mInitMap.put(new Pair("func_150071_a", "determineOrientation")); - mInitMap.put(new Pair("func_150072_a", "isIndirectlyPowered")); - mInitMap.put(new Pair("func_150073_e", "getPistonExtensionTexture")); - mInitMap.put(new Pair("func_150074_e", "getPistonBaseIcon")); - mInitMap.put(new Pair("func_150075_c", "isExtended")); - mInitMap.put(new Pair("func_150076_b", "getPistonOrientation")); - mInitMap.put(new Pair("func_150077_h", "canExtend")); - mInitMap.put(new Pair("func_150078_e", "updatePistonState")); - mInitMap.put(new Pair("func_150079_i", "tryExtend")); - mInitMap.put(new Pair("func_150080_a", "canPushBlock")); - mInitMap.put(new Pair("func_150085_b", "getDirectionMeta")); - mInitMap.put(new Pair("func_150089_b", "setBlockBoundsFromMeta")); - mInitMap.put(new Pair("func_150091_e", "canConnectWallTo")); - mInitMap.put(new Pair("func_150098_a", "canPaneConnectToBlock")); - mInitMap.put(new Pair("func_150107_m", "canPlaceTorchOn")); - mInitMap.put(new Pair("func_150109_e", "dropTorchIfCantStay")); - mInitMap.put(new Pair("func_150118_d", "isTrapdoorOpen")); - mInitMap.put(new Pair("func_150119_a", "isValidSupportBlock")); - mInitMap.put(new Pair("func_150122_b", "setGraphicsLevel")); - mInitMap.put(new Pair("func_150126_e", "removeLeaves")); - mInitMap.put(new Pair("func_150147_e", "setBaseBounds")); - mInitMap.put(new Pair("func_150148_a", "isBlockStairs")); - mInitMap.put(new Pair("func_150161_d", "getTopIcon")); - mInitMap.put(new Pair("func_150163_b", "getSideIcon")); - mInitMap.put(new Pair("func_150173_e", "getRedstomInitMap.put(newireIcon")); - mInitMap.put(new Pair("func_150174_f", "isPowerProviderOrWire")); - mInitMap.put(new Pair("func_150206_m", "createDeepCopy")); - mInitMap.put(new Pair("func_150209_a", "setChatHoverEvent")); - mInitMap.put(new Pair("func_150210_i", "getChatHoverEvent")); - mInitMap.put(new Pair("func_150215_a", "getColor")); - mInitMap.put(new Pair("func_150217_b", "setItalic")); - mInitMap.put(new Pair("func_150218_j", "getFormattingCode")); - mInitMap.put(new Pair("func_150221_a", "setParentStyle")); - mInitMap.put(new Pair("func_150223_b", "getBold")); - mInitMap.put(new Pair("func_150224_n", "getParent")); - mInitMap.put(new Pair("func_150225_c", "setStrikethrough")); - mInitMap.put(new Pair("func_150227_a", "setBold")); - mInitMap.put(new Pair("func_150228_d", "setUnderlined")); - mInitMap.put(new Pair("func_150229_g", "isEmpty")); - mInitMap.put(new Pair("func_150232_l", "createShallowCopy")); - mInitMap.put(new Pair("func_150233_f", "getObfuscated")); - mInitMap.put(new Pair("func_150234_e", "getUnderlined")); - mInitMap.put(new Pair("func_150235_h", "getChatClickEvent")); - mInitMap.put(new Pair("func_150236_d", "getStrikethrough")); - mInitMap.put(new Pair("func_150237_e", "setObfuscated")); - mInitMap.put(new Pair("func_150238_a", "setColor")); - mInitMap.put(new Pair("func_150241_a", "setChatClickEvent")); - mInitMap.put(new Pair("func_150242_c", "getItalic")); - mInitMap.put(new Pair("func_150253_a", "getSiblings")); - mInitMap.put(new Pair("func_150254_d", "getFormattedText")); - mInitMap.put(new Pair("func_150255_a", "setChatStyle")); - mInitMap.put(new Pair("func_150256_b", "getChatStyle")); - mInitMap.put(new Pair("func_150257_a", "appendSibling")); - mInitMap.put(new Pair("func_150258_a", "appendText")); - mInitMap.put(new Pair("func_150259_f", "createCopy")); - mInitMap.put(new Pair("func_150260_c", "getUnformattedText")); - mInitMap.put(new Pair("func_150261_e", "getUnformattedTextForChat")); - mInitMap.put(new Pair("func_150262_a", "createDeepCopyIterator")); - mInitMap.put(new Pair("func_150265_g", "getChatComponentText_TextValue")); - mInitMap.put(new Pair("func_150268_i", "getKey")); - mInitMap.put(new Pair("func_150269_b", "initializeFromFormat")); - mInitMap.put(new Pair("func_150270_g", "ensureInitialized")); - mInitMap.put(new Pair("func_150271_j", "getFormatArgs")); - mInitMap.put(new Pair("func_150272_a", "getFormatArgumentAsComponent")); - mInitMap.put(new Pair("func_150284_a", "createmInitMap.put(newByType")); - mInitMap.put(new Pair("func_150285_a_", "getString")); - mInitMap.put(new Pair("func_150286_g", "getDouble")); - mInitMap.put(new Pair("func_150287_d", "getInt")); - mInitMap.put(new Pair("func_150288_h", "getFloat")); - mInitMap.put(new Pair("func_150289_e", "getShort")); - mInitMap.put(new Pair("func_150290_f", "getByte")); - mInitMap.put(new Pair("func_150291_c", "getLong")); - mInitMap.put(new Pair("func_150292_c", "getByteArray")); - mInitMap.put(new Pair("func_150295_c", "getTagList")); - mInitMap.put(new Pair("func_150296_c", "getKeySet")); - mInitMap.put(new Pair("func_150297_b", "hasKey")); - mInitMap.put(new Pair("func_150298_a", "writeEntry")); - mInitMap.put(new Pair("func_150299_b", "getTagId")); - mInitMap.put(new Pair("func_150302_c", "getIntArray")); - mInitMap.put(new Pair("func_150303_d", "getTagType")); - mInitMap.put(new Pair("func_150304_a", "setTag")); - mInitMap.put(new Pair("func_150305_b", "getCompoundTagAt")); - mInitMap.put(new Pair("func_150306_c", "getIntArrayAt")); - mInitMap.put(new Pair("func_150307_f", "getStringTagAt")); - mInitMap.put(new Pair("func_150308_e", "getFloatAt")); - mInitMap.put(new Pair("func_150309_d", "getDoubleAt")); - mInitMap.put(new Pair("func_150494_d", "getFrequency")); - mInitMap.put(new Pair("func_150495_a", "getDigResourcePath")); - mInitMap.put(new Pair("func_150496_b", "getPlaceSound")); - mInitMap.put(new Pair("func_150497_c", "getVolume")); - mInitMap.put(new Pair("func_150498_e", "getStepSound")); - mInitMap.put(new Pair("func_150503_a", "decipher")); - mInitMap.put(new Pair("func_150504_a", "cipher")); - mInitMap.put(new Pair("func_150510_c", "getLastUpdateTimeInMilliseconds")); - mInitMap.put(new Pair("func_150512_a", "decorateChunk")); - mInitMap.put(new Pair("func_150513_a", "genDecorations")); - mInitMap.put(new Pair("func_150516_a", "setBlockAndNotifyAdequately")); - mInitMap.put(new Pair("func_150558_b", "getBiomeGrassColor")); - mInitMap.put(new Pair("func_150560_b", "genBiomeTerrain")); - mInitMap.put(new Pair("func_150561_m", "getTempCategory")); - mInitMap.put(new Pair("func_150562_l", "getBiomeClass")); - mInitMap.put(new Pair("func_150564_a", "getFloatTemperature")); - mInitMap.put(new Pair("func_150565_n", "getBiomeGenArray")); - mInitMap.put(new Pair("func_150566_k", "createMutation")); - mInitMap.put(new Pair("func_150568_d", "getBiome")); - mInitMap.put(new Pair("func_150569_a", "isEqualTo")); - mInitMap.put(new Pair("func_150570_a", "setHeight")); - mInitMap.put(new Pair("func_150571_c", "getBiomeFoliageColor")); - mInitMap.put(new Pair("func_150573_a", "genTerrainBlocks")); - mInitMap.put(new Pair("func_150633_b", "mutateHills")); - mInitMap.put(new Pair("func_150646_a", "isRailBlockAt")); - mInitMap.put(new Pair("func_150650_a", "countAdjacentRails")); - mInitMap.put(new Pair("func_150663_a", "writeTag")); - mInitMap.put(new Pair("func_150668_b", "getValue")); - mInitMap.put(new Pair("func_150669_a", "getAction")); - mInitMap.put(new Pair("func_150672_a", "getValueByCanonicalName")); - mInitMap.put(new Pair("func_150673_b", "getCanonicalName")); - mInitMap.put(new Pair("func_150674_a", "shouldAllowInChat")); - mInitMap.put(new Pair("func_150684_a", "getValueByCanonicalName")); - mInitMap.put(new Pair("func_150685_b", "getCanonicalName")); - mInitMap.put(new Pair("func_150686_a", "shouldAllowInChat")); - mInitMap.put(new Pair("func_150695_a", "serializeChatStyle")); - mInitMap.put(new Pair("func_150696_a", "componentToJson")); - mInitMap.put(new Pair("func_150699_a", "jsonToComponent")); - mInitMap.put(new Pair("func_150701_a", "getAction")); - mInitMap.put(new Pair("func_150702_b", "getValue")); - mInitMap.put(new Pair("func_150706_a", "generateDispenserContents")); - mInitMap.put(new Pair("func_150707_a", "setEnchantable")); - mInitMap.put(new Pair("func_150708_a", "getItemStack")); - mInitMap.put(new Pair("func_150709_a", "setMaxDamagePercent")); - mInitMap.put(new Pair("func_150718_a", "closeChannel")); - mInitMap.put(new Pair("func_150719_a", "setNetHandler")); - mInitMap.put(new Pair("func_150721_g", "disableAutoRead")); - mInitMap.put(new Pair("func_150722_a", "provideLocalClient")); - mInitMap.put(new Pair("func_150723_a", "setConnectionState")); - mInitMap.put(new Pair("func_150724_d", "isChannelOpen")); - mInitMap.put(new Pair("func_150725_a", "scheduleOutboundPacket")); - mInitMap.put(new Pair("func_150726_a", "provideLanClient")); - mInitMap.put(new Pair("func_150727_a", "enableEncryption")); - mInitMap.put(new Pair("func_150729_e", "getNetHandler")); - mInitMap.put(new Pair("func_150730_f", "getExitMessage")); - mInitMap.put(new Pair("func_150731_c", "isLocalChannel")); - mInitMap.put(new Pair("func_150732_b", "dispatchPacket")); - mInitMap.put(new Pair("func_150733_h", "flushOutboundQueue")); - mInitMap.put(new Pair("func_150752_a", "getFromPacket")); - mInitMap.put(new Pair("func_150759_c", "getId")); - mInitMap.put(new Pair("func_150760_a", "getById")); - mInitMap.put(new Pair("func_150775_a", "attenuate")); - mInitMap.put(new Pair("func_150785_a", "writeStringToBuffer")); - mInitMap.put(new Pair("func_150786_a", "writeNBTTagCompoundToBuffer")); - mInitMap.put(new Pair("func_150787_b", "writeVarIntToBuffer")); - mInitMap.put(new Pair("func_150788_a", "writeItemStackToBuffer")); - mInitMap.put(new Pair("func_150789_c", "readStringFromBuffer")); - mInitMap.put(new Pair("func_150790_a", "getVarIntSize")); - mInitMap.put(new Pair("func_150791_c", "readItemStackFromBuffer")); - mInitMap.put(new Pair("func_150792_a", "readVarIntFromBuffer")); - mInitMap.put(new Pair("func_150793_b", "readNBTTagCompoundFromBuffer")); - mInitMap.put(new Pair("func_150795_a", "findBiomePosition")); - mInitMap.put(new Pair("func_150803_c", "recheckGaps")); - mInitMap.put(new Pair("func_150805_f", "removeTileEntity")); - mInitMap.put(new Pair("func_150806_e", "getBlockTileEntityInChunk")); - mInitMap.put(new Pair("func_150807_a", "setBlockIDWithMetadata")); - mInitMap.put(new Pair("func_150808_b", "getBlockLightOpacity")); - mInitMap.put(new Pair("func_150810_a", "getBlock")); - mInitMap.put(new Pair("func_150812_a", "setBlockTileEntityInChunk")); - mInitMap.put(new Pair("func_150813_a", "addTileEntity")); - mInitMap.put(new Pair("func_150818_a", "setExtBlockID")); - mInitMap.put(new Pair("func_150819_a", "getBlockByExtId")); - mInitMap.put(new Pair("func_150826_b", "translateToFallback")); - mInitMap.put(new Pair("func_150827_a", "getLastTranslationUpdateTimeInMilliseconds")); - mInitMap.put(new Pair("func_150835_j", "getBlockTileEntity")); - mInitMap.put(new Pair("func_150891_b", "getIdFromItem")); - mInitMap.put(new Pair("func_150892_m", "isPotionIngredient")); - mInitMap.put(new Pair("func_150893_a", "getStrVsBlock")); - mInitMap.put(new Pair("func_150894_a", "onBlockDestroyed")); - mInitMap.put(new Pair("func_150895_a", "getSubItems")); - mInitMap.put(new Pair("func_150896_i", "getPotionEffect")); - mInitMap.put(new Pair("func_150897_b", "canItemHarvestBlock")); - mInitMap.put(new Pair("func_150898_a", "getItemFromBlock")); - mInitMap.put(new Pair("func_150899_d", "getItemById")); - mInitMap.put(new Pair("func_150900_l", "registerItems")); - mInitMap.put(new Pair("func_150905_g", "getHealAmount")); - mInitMap.put(new Pair("func_150906_h", "getSaturationModifier")); - mInitMap.put(new Pair("func_150911_c", "createMapDataPacket")); - mInitMap.put(new Pair("func_150912_a", "loadMapData")); - mInitMap.put(new Pair("func_150913_i", "getToolMaterial")); - mInitMap.put(new Pair("func_150924_a", "placeDoorBlock")); - mInitMap.put(new Pair("func_150926_b", "getRecord")); - mInitMap.put(new Pair("func_150927_i", "getRecordNameLocal")); - mInitMap.put(new Pair("func_150930_a", "validBookPageTagContents")); - mInitMap.put(new Pair("func_150932_j", "getToolMaterialName")); - mInitMap.put(new Pair("func_150951_e", "getStatName")); - mInitMap.put(new Pair("func_150967_d", "getUncookedSaturationModifier")); - mInitMap.put(new Pair("func_150968_a", "registerIcon")); - mInitMap.put(new Pair("func_150970_e", "getCookedHealAmount")); - mInitMap.put(new Pair("func_150971_g", "getUncookedIcon")); - mInitMap.put(new Pair("func_150972_b", "getUnlocalizedNamePart")); - mInitMap.put(new Pair("func_150973_i", "getCookable")); - mInitMap.put(new Pair("func_150974_a", "getFishTypeForItemDamage")); - mInitMap.put(new Pair("func_150975_c", "getUncookedHealAmount")); - mInitMap.put(new Pair("func_150976_a", "getItemDamage")); - mInitMap.put(new Pair("func_150977_f", "getCookedSaturationModifier")); - mInitMap.put(new Pair("func_150978_a", "getFishTypeForItemStack")); - mInitMap.put(new Pair("func_150979_h", "getCookedIcon")); - mInitMap.put(new Pair("func_150995_f", "getBaseItemForRepair")); - mInitMap.put(new Pair("func_150996_a", "setItem")); - mInitMap.put(new Pair("func_150997_a", "getStrVsBlock")); - mInitMap.put(new Pair("func_150998_b", "canItemHarvestBlock")); - mInitMap.put(new Pair("func_150999_a", "onBlockDestroyed")); - mInitMap.put(new Pair("func_151001_c", "setStackDisplayName")); - mInitMap.put(new Pair("func_151003_a", "getSerializableElement")); - mInitMap.put(new Pair("func_151177_a", "getOneShotStat")); - mInitMap.put(new Pair("func_151187_b", "getJsonSerializableValue")); - mInitMap.put(new Pair("func_151188_a", "setIntegerValue")); - mInitMap.put(new Pair("func_151189_a", "getIntegerValue")); - mInitMap.put(new Pair("func_151190_a", "setJsonSerializableValue")); - mInitMap.put(new Pair("func_151200_h", "getJsonObjectStringFieldValue")); - mInitMap.put(new Pair("func_151201_f", "jsonObjectFieldTypeIsPrimitive")); - mInitMap.put(new Pair("func_151202_d", "jsonObjectFieldTypeIsArray")); - mInitMap.put(new Pair("func_151203_m", "getJsonObjectIntegerFieldValue")); - mInitMap.put(new Pair("func_151204_g", "jsonObjectHasNamedField")); - mInitMap.put(new Pair("func_151205_a", "jsonObjectFieldTypeIsString")); - mInitMap.put(new Pair("func_151206_a", "getJsonElementStringValue")); - mInitMap.put(new Pair("func_151207_m", "getJsonElementAsJsonArray")); - mInitMap.put(new Pair("func_151208_a", "getJsonObjectIntegerFieldValueOrDefault")); - mInitMap.put(new Pair("func_151209_a", "getJsonObjectBooleanFieldValueOrDefault")); - mInitMap.put(new Pair("func_151210_l", "getElementAsJsonObject")); - mInitMap.put(new Pair("func_151211_a", "jsonElementTypeIsString")); - mInitMap.put(new Pair("func_151212_i", "getJsonObjectBooleanFieldValue")); - mInitMap.put(new Pair("func_151213_a", "getJsonObjectJsonArrayFieldOrDefault")); - mInitMap.put(new Pair("func_151214_t", "getJsonObjectJsonArrayField")); - mInitMap.put(new Pair("func_151215_f", "getJsonElementIntegerValue")); - mInitMap.put(new Pair("func_151216_b", "getJsonElementBooleanValue")); - mInitMap.put(new Pair("func_151217_k", "getJsonObjectFloatFieldValue")); - mInitMap.put(new Pair("func_151218_a", "getJsonObjectFieldOrDefault")); - mInitMap.put(new Pair("func_151219_a", "getJsonObjectStringFieldValueOrDefault")); - mInitMap.put(new Pair("func_151220_d", "getJsonElementFloatValue")); - mInitMap.put(new Pair("func_151221_a", "getJsonObjectFloatFieldValueOrDefault")); - mInitMap.put(new Pair("func_151222_d", "getJsonElementTypeDescription")); - mInitMap.put(new Pair("func_151223_a", "downloadResourcePack")); - mInitMap.put(new Pair("func_151225_a", "post")); - mInitMap.put(new Pair("func_151226_a", "postMap")); - mInitMap.put(new Pair("func_151235_d", "isPowerOfTwo")); - mInitMap.put(new Pair("func_151236_b", "roundUpToPowerOfTwo")); - mInitMap.put(new Pair("func_151237_a", "clamp_double")); - mInitMap.put(new Pair("func_151238_b", "denormalizeClamp")); - mInitMap.put(new Pair("func_151239_c", "calculateLogBaseTwo")); - mInitMap.put(new Pair("func_151240_a", "randomFloatClamp")); - mInitMap.put(new Pair("func_151241_e", "calculateLogBaseTwoDeBruijn")); - mInitMap.put(new Pair("func_151243_f", "getIconItemDamage")); - mInitMap.put(new Pair("func_151244_d", "getIconItemStack")); - mInitMap.put(new Pair("func_151246_b", "isNullOrEmpty")); - mInitMap.put(new Pair("func_151247_a", "sendToAllTrackingEntity")); - mInitMap.put(new Pair("func_151250_a", "markBlockForUpdate")); - mInitMap.put(new Pair("func_151251_a", "sendToAllPlayersWatchingChunk")); - mInitMap.put(new Pair("func_151252_a", "sendTileToAllPlayersWatchingChunk")); - mInitMap.put(new Pair("func_151253_a", "flagChunkForUpdate")); - mInitMap.put(new Pair("func_151255_a", "getStringBuffer")); - mInitMap.put(new Pair("func_151256_a", "writeAndFlush")); - mInitMap.put(new Pair("func_151265_a", "addLanEndpoint")); - mInitMap.put(new Pair("func_151267_d", "getServer")); - mInitMap.put(new Pair("func_151268_b", "terminateEndpoints")); - mInitMap.put(new Pair("func_151269_c", "networkTick")); - mInitMap.put(new Pair("func_151270_a", "addLocalEndpoint")); - mInitMap.put(new Pair("func_151303_a", "getName")); - mInitMap.put(new Pair("func_151304_b", "getProtocol")); - mInitMap.put(new Pair("func_151315_a", "setServerDescription")); - mInitMap.put(new Pair("func_151316_d", "getFavicon")); - mInitMap.put(new Pair("func_151317_a", "getServerDescription")); - mInitMap.put(new Pair("func_151318_b", "getPlayerCountData")); - mInitMap.put(new Pair("func_151319_a", "setPlayerCountData")); - mInitMap.put(new Pair("func_151320_a", "setFavicon")); - mInitMap.put(new Pair("func_151321_a", "setProtocolVersionInfo")); - mInitMap.put(new Pair("func_151322_c", "getProtocolVersionInfo")); - mInitMap.put(new Pair("func_151330_a", "setPlayers")); - mInitMap.put(new Pair("func_151331_c", "getPlayers")); - mInitMap.put(new Pair("func_151332_a", "getMaxPlayers")); - mInitMap.put(new Pair("func_151333_b", "getOnlinePlayerCount")); - mInitMap.put(new Pair("func_151337_f", "getBlock")); - mInitMap.put(new Pair("func_151338_e", "getEventParameter")); - mInitMap.put(new Pair("func_151339_d", "getEventID")); - mInitMap.put(new Pair("func_151353_a", "registerDispenserBehaviors")); - mInitMap.put(new Pair("func_151354_b", "register")); - mInitMap.put(new Pair("func_151357_h", "showWorldInfoNotice")); - mInitMap.put(new Pair("func_151358_j", "setNotificationData")); - mInitMap.put(new Pair("func_151393_a", "addSmeltingRecipeForBlock")); - mInitMap.put(new Pair("func_151394_a", "addSmeltingRecipe")); - mInitMap.put(new Pair("func_151395_a", "getSmeltingResult")); - mInitMap.put(new Pair("func_151396_a", "addSmelting")); - mInitMap.put(new Pair("func_151398_b", "getSmeltingExperience")); - mInitMap.put(new Pair("func_151426_a", "getEnumChatVisibility")); - mInitMap.put(new Pair("func_151428_a", "getChatVisibility")); - mInitMap.put(new Pair("func_151429_b", "getResourceKey")); - mInitMap.put(new Pair("func_151438_a", "getSoundLevel")); - mInitMap.put(new Pair("func_151439_a", "setSoundLevel")); - mInitMap.put(new Pair("func_151440_a", "setOptionKeyBinding")); - mInitMap.put(new Pair("func_151460_a", "getBlockAtEntityViewpoint")); - mInitMap.put(new Pair("func_151461_a", "getChatComponent")); - mInitMap.put(new Pair("func_151462_b", "setKeyCode")); - mInitMap.put(new Pair("func_151463_i", "getKeyCode")); - mInitMap.put(new Pair("func_151464_g", "getKeyDescription")); - mInitMap.put(new Pair("func_151466_e", "getKeyCategory")); - mInitMap.put(new Pair("func_151467_c", "getKeybinds")); - mInitMap.put(new Pair("func_151468_f", "isPressed")); - mInitMap.put(new Pair("func_151469_h", "getKeyCodeDefault")); - mInitMap.put(new Pair("func_151470_d", "getIsKeyPressed")); - mInitMap.put(new Pair("func_151498_a", "isStairOrSlab")); - mInitMap.put(new Pair("func_151499_f", "getEatingGrassTimer")); - mInitMap.put(new Pair("func_151503_a", "getWoodenDoorBlock")); - mInitMap.put(new Pair("func_151507_a", "writeWatchedListToPacketBuffer")); - mInitMap.put(new Pair("func_151508_b", "readWatchedListFromPacketBuffer")); - mInitMap.put(new Pair("func_151510_a", "writeWatchableObjectToPacketBuffer")); - mInitMap.put(new Pair("func_151517_h", "isDamageAbsolute")); - mInitMap.put(new Pair("func_151518_m", "setDamageIsAbsolute")); - mInitMap.put(new Pair("func_151519_b", "getDeathMessage")); - mInitMap.put(new Pair("func_151523_a", "getDifficultyEnum")); - mInitMap.put(new Pair("func_151525_a", "getDifficultyId")); - mInitMap.put(new Pair("func_151526_b", "getDifficultyResourceKey")); - mInitMap.put(new Pair("func_151539_a", "generate")); - mInitMap.put(new Pair("func_151545_a", "getNearestInstance")); - mInitMap.put(new Pair("func_151548_a", "getBlockAtCurrentPosition")); - mInitMap.put(new Pair("func_151549_a", "fillWithBlocks")); - mInitMap.put(new Pair("func_151550_a", "placeBlockAtCurrentPosition")); - mInitMap.put(new Pair("func_151551_a", "randomlyFillWithBlocks")); - mInitMap.put(new Pair("func_151555_a", "getMetadataWithOffset")); - mInitMap.put(new Pair("func_151556_a", "fillWithMetadataBlocks")); - mInitMap.put(new Pair("func_151565_r", "getMaterialMapColor")); - mInitMap.put(new Pair("func_151616_a", "biomesEqualOrMesaPlateau")); - mInitMap.put(new Pair("func_151617_b", "selectModeOrRandom")); - mInitMap.put(new Pair("func_151618_b", "isBiomeOceanic")); - mInitMap.put(new Pair("func_151619_a", "selectRandom")); - mInitMap.put(new Pair("func_151624_d", "getIntsHeatIce")); - mInitMap.put(new Pair("func_151625_e", "getIntsSpecial")); - mInitMap.put(new Pair("func_151626_c", "getIntsCoolWarm")); - mInitMap.put(new Pair("func_151634_b", "canBiomesBeNeighbors")); - mInitMap.put(new Pair("func_151635_b", "replaceBiomeEdge")); - mInitMap.put(new Pair("func_151636_a", "replaceBiomeEdgeIfNecessary")); - mInitMap.put(new Pair("func_151644_a", "getMapColorForBlockColored")); - mInitMap.put(new Pair("func_151685_b", "getBaseItemForRepair")); - mInitMap.put(new Pair("func_151686_a", "addStats")); - mInitMap.put(new Pair("func_152121_a", "onSkinAvailable")); - mInitMap.put(new Pair("func_152122_n", "hasCape")); - mInitMap.put(new Pair("func_152123_o", "hasSkin")); - mInitMap.put(new Pair("func_152125_a", "drawScaledCustomSizeModalRect")); - mInitMap.put(new Pair("func_152126_a", "renderStreamIndicator")); - mInitMap.put(new Pair("func_152340_a", "readImageToBuffer")); - mInitMap.put(new Pair("func_152341_N", "getTwitchDetails")); - mInitMap.put(new Pair("func_152342_ad", "getSkinManager")); - mInitMap.put(new Pair("func_152343_a", "addScheduledTask")); - mInitMap.put(new Pair("func_152344_a", "addScheduledTask")); - mInitMap.put(new Pair("func_152345_ab", "isCallingFromMinecraftThread")); - mInitMap.put(new Pair("func_152346_Z", "getTwitchStream")); - mInitMap.put(new Pair("func_152347_ac", "getSessionService")); - mInitMap.put(new Pair("func_152348_aa", "dispatchKeypresses")); - mInitMap.put(new Pair("func_152349_b", "isUnicode")); - mInitMap.put(new Pair("func_152357_F", "getGameProfiles")); - mInitMap.put(new Pair("func_152358_ax", "getPlayerProfileCache")); - mInitMap.put(new Pair("func_152359_aw", "getGameProfileRepository")); - mInitMap.put(new Pair("func_152361_a", "setConfigManager")); - mInitMap.put(new Pair("func_152368_aE", "convertFiles")); - mInitMap.put(new Pair("func_152369_aG", "sleepFiveSeconds")); - mInitMap.put(new Pair("func_152372_a", "notifyOperators")); - mInitMap.put(new Pair("func_152373_a", "notifyOperators")); - mInitMap.put(new Pair("func_152374_a", "notifyOperators")); - mInitMap.put(new Pair("func_152378_a", "getPlayerEntityByUUID")); - mInitMap.put(new Pair("func_152379_p", "getRenderDistanceChunks")); - mInitMap.put(new Pair("func_152421_a", "setSessionType")); - mInitMap.put(new Pair("func_152428_f", "getSessionType")); - mInitMap.put(new Pair("func_152436_a", "render")); - mInitMap.put(new Pair("func_152437_a", "render")); - mInitMap.put(new Pair("func_152446_a", "read")); - mInitMap.put(new Pair("func_152447_a", "readType")); - mInitMap.put(new Pair("func_152448_b", "readKey")); - mInitMap.put(new Pair("func_152449_a", "readNBT")); - mInitMap.put(new Pair("func_152450_a", "addSpaceRead")); - mInitMap.put(new Pair("func_152457_a", "decompress")); - mInitMap.put(new Pair("func_152458_a", "readFromFile")); - mInitMap.put(new Pair("func_152459_a", "readGameProfileFromNBT")); - mInitMap.put(new Pair("func_152460_a", "writeGameProfileToNBT")); - mInitMap.put(new Pair("func_152493_a", "getTotalBytes")); - mInitMap.put(new Pair("func_152495_b", "getCount")); - mInitMap.put(new Pair("func_152506_a", "getOfflineProfile")); - mInitMap.put(new Pair("func_152583_a", "copyFrom")); - mInitMap.put(new Pair("func_152584_a", "setResourceMode")); - mInitMap.put(new Pair("func_152585_d", "isLanServer")); - mInitMap.put(new Pair("func_152586_b", "getResourceMode")); - mInitMap.put(new Pair("func_152589_a", "getMotd")); - mInitMap.put(new Pair("func_152596_g", "canSendCommands")); - mInitMap.put(new Pair("func_152597_c", "removePlayerFromWhitelist")); - mInitMap.put(new Pair("func_152598_l", "getWhitelistedPlayerNames")); - mInitMap.put(new Pair("func_152599_k", "getWhitelistedPlayers")); - mInitMap.put(new Pair("func_152600_g", "getAllProfiles")); - mInitMap.put(new Pair("func_152601_d", "addWhitelistedPlayer")); - mInitMap.put(new Pair("func_152602_a", "getPlayerStatsFile")); - mInitMap.put(new Pair("func_152603_m", "getOppedPlayers")); - mInitMap.put(new Pair("func_152605_a", "addOp")); - mInitMap.put(new Pair("func_152606_n", "getOppedPlayerNames")); - mInitMap.put(new Pair("func_152607_e", "canJoin")); - mInitMap.put(new Pair("func_152608_h", "getBannedPlayers")); - mInitMap.put(new Pair("func_152609_b", "getPlayerNamesString")); - mInitMap.put(new Pair("func_152610_b", "removeOp")); - mInitMap.put(new Pair("func_152611_a", "setViewDistance")); - mInitMap.put(new Pair("func_152612_a", "getPlayerByUsername")); - mInitMap.put(new Pair("func_152617_w", "saveUserBanList")); - mInitMap.put(new Pair("func_152618_v", "saveIpBanList")); - mInitMap.put(new Pair("func_152619_x", "loadIpBanList")); - mInitMap.put(new Pair("func_152620_y", "loadUserBansList")); - mInitMap.put(new Pair("func_152640_f", "getValue")); - mInitMap.put(new Pair("func_152641_a", "onSerialization")); - mInitMap.put(new Pair("func_152655_a", "getGameProfileForUsername")); - mInitMap.put(new Pair("func_152678_f", "writeChanges")); - mInitMap.put(new Pair("func_152679_g", "readSavedFile")); - mInitMap.put(new Pair("func_152680_h", "removeExpired")); - mInitMap.put(new Pair("func_152681_a", "getObjectKey")); - mInitMap.put(new Pair("func_152682_a", "createEntry")); - mInitMap.put(new Pair("func_152683_b", "getEntry")); - mInitMap.put(new Pair("func_152684_c", "removeEntry")); - mInitMap.put(new Pair("func_152685_a", "getKeys")); - mInitMap.put(new Pair("func_152686_a", "setLanServer")); - mInitMap.put(new Pair("func_152687_a", "addEntry")); - mInitMap.put(new Pair("func_152688_e", "getValues")); - mInitMap.put(new Pair("func_152689_b", "isLanServer")); - mInitMap.put(new Pair("func_152690_d", "hasEntries")); - mInitMap.put(new Pair("func_152691_c", "getSaveFile")); - mInitMap.put(new Pair("func_152692_d", "hasEntry")); - mInitMap.put(new Pair("func_152700_a", "getGameProfileFromName")); - mInitMap.put(new Pair("func_152701_b", "getProfileId")); - mInitMap.put(new Pair("func_152702_a", "isBanned")); - mInitMap.put(new Pair("func_152703_a", "isUsernameBanned")); - mInitMap.put(new Pair("func_152707_c", "addressToString")); - mInitMap.put(new Pair("func_152708_a", "isBanned")); - mInitMap.put(new Pair("func_152709_b", "getBanEntry")); - mInitMap.put(new Pair("func_152710_d", "convertWhitelist")); - mInitMap.put(new Pair("func_152711_b", "mkdir")); - mInitMap.put(new Pair("func_152712_b", "hasUnconvertableFiles")); - mInitMap.put(new Pair("func_152713_b", "parseDate")); - mInitMap.put(new Pair("func_152714_a", "tryConvert")); - mInitMap.put(new Pair("func_152715_c", "hasUnconvertablePlayerFiles")); - mInitMap.put(new Pair("func_152717_a", "lookupNames")); - mInitMap.put(new Pair("func_152718_c", "convertOplist")); - mInitMap.put(new Pair("func_152721_a", "readFile")); - mInitMap.put(new Pair("func_152722_b", "convertIpBanlist")); - mInitMap.put(new Pair("func_152723_a", "convertSaveFiles")); - mInitMap.put(new Pair("func_152724_a", "convertUserBanlist")); - mInitMap.put(new Pair("func_152725_d", "getPlayersDirectory")); - mInitMap.put(new Pair("func_152727_c", "backupConverted")); - mInitMap.put(new Pair("func_152750_a", "deserializeEntry")); - mInitMap.put(new Pair("func_152751_a", "serializeEntry")); - mInitMap.put(new Pair("func_152754_s", "getJsonObject")); - mInitMap.put(new Pair("func_152755_a", "get")); - mInitMap.put(new Pair("func_152764_a", "parsePass")); - mInitMap.put(new Pair("func_152765_a", "parseGroup")); - mInitMap.put(new Pair("func_152767_b", "addStatToSnooper")); - mInitMap.put(new Pair("func_152768_a", "addClientStat")); - mInitMap.put(new Pair("func_152788_a", "loadSkinFromCache")); - mInitMap.put(new Pair("func_152789_a", "loadSkin")); - mInitMap.put(new Pair("func_152792_a", "loadSkin")); - mInitMap.put(new Pair("func_152825_o", "isIngestTesting")); - mInitMap.put(new Pair("func_152839_p", "isBroadcastPaused")); - mInitMap.put(new Pair("func_152850_m", "isBroadcasting")); - mInitMap.put(new Pair("func_152856_w", "isReady")); - mInitMap.put(new Pair("func_152919_o", "isPaused")); - mInitMap.put(new Pair("func_152923_i", "shutdownStream")); - mInitMap.put(new Pair("func_153157_c", "glGetShaderi")); - mInitMap.put(new Pair("func_153158_d", "glGetShaderInfoLog")); - mInitMap.put(new Pair("func_153159_d", "glUniform4")); - mInitMap.put(new Pair("func_153160_c", "glUniformMatrix4")); - mInitMap.put(new Pair("func_153161_d", "glUseProgram")); - mInitMap.put(new Pair("func_153162_d", "glUniform4")); - mInitMap.put(new Pair("func_153163_f", "glUniform1i")); - mInitMap.put(new Pair("func_153164_b", "glGetAttribLocation")); - mInitMap.put(new Pair("func_153166_e", "glGetProgramInfoLog")); - mInitMap.put(new Pair("func_153168_a", "glUniform1")); - mInitMap.put(new Pair("func_153169_a", "glShaderSource")); - mInitMap.put(new Pair("func_153170_c", "glCompileShader")); - mInitMap.put(new Pair("func_153173_a", "glUniformMatrix2")); - mInitMap.put(new Pair("func_153175_a", "glGetProgrami")); - mInitMap.put(new Pair("func_153177_b", "glUniform2")); - mInitMap.put(new Pair("func_153178_b", "glAttachShader")); - mInitMap.put(new Pair("func_153179_f", "glLinkProgram")); - mInitMap.put(new Pair("func_153180_a", "glDeleteShader")); - mInitMap.put(new Pair("func_153181_a", "glUniform1")); - mInitMap.put(new Pair("func_153182_b", "glUniform2")); - } - - - private static void init3() { - mInitMap.put(new Pair("func_153183_d", "glCreateProgram")); - mInitMap.put(new Pair("func_153187_e", "glDeleteProgram")); - mInitMap.put(new Pair("func_153189_b", "glUniformMatrix3")); - mInitMap.put(new Pair("func_153191_c", "glUniform3")); - mInitMap.put(new Pair("func_153192_c", "glUniform3")); - mInitMap.put(new Pair("func_153194_a", "glGetUniformLocation")); - mInitMap.put(new Pair("func_153195_b", "glCreateShader")); - mInitMap.put(new Pair("func_154310_c", "getButtonHeight")); - mInitMap.put(new Pair("func_154311_a", "setText")); - mInitMap.put(new Pair("func_154313_b", "setEnabled")); - mInitMap.put(new Pair("func_154314_d", "getId")); - mInitMap.put(new Pair("func_154315_e", "getEnabled")); - mInitMap.put(new Pair("func_154316_f", "getPositionY")); - mInitMap.put(new Pair("func_154317_g", "getRealmsButton")); - mInitMap.put(new Pair("func_154331_x", "getLastActiveTime")); - mInitMap.put(new Pair("func_154346_a", "hasAcceptedEULA")); - mInitMap.put(new Pair("func_154347_a", "loadEULAFile")); - mInitMap.put(new Pair("func_154348_b", "createEULAFile")); - mInitMap.put(new Pair("func_155759_m", "setServerResourcePack")); - mInitMap.put(new Pair("func_70000_a", "addServerStatsToSnooper")); - mInitMap.put(new Pair("func_70001_b", "addServerTypeToSnooper")); - mInitMap.put(new Pair("func_70002_Q", "isSnooperEnabled")); - mInitMap.put(new Pair("func_70003_b", "canCommandSenderUseCommand")); - mInitMap.put(new Pair("func_70005_c_", "getCommandSenderName")); - mInitMap.put(new Pair("func_70007_b", "resetLog")); - mInitMap.put(new Pair("func_70008_c", "getLogContents")); - mInitMap.put(new Pair("func_70011_f", "getDistance")); - mInitMap.put(new Pair("func_70012_b", "setLocationAndAngles")); - mInitMap.put(new Pair("func_70013_c", "getBrightness")); - mInitMap.put(new Pair("func_70014_b", "writeEntityToNBT")); - mInitMap.put(new Pair("func_70015_d", "setFire")); - mInitMap.put(new Pair("func_70016_h", "setVelocity")); - mInitMap.put(new Pair("func_70018_K", "setBeenAttacked")); - mInitMap.put(new Pair("func_70019_c", "setEating")); - mInitMap.put(new Pair("func_70020_e", "readFromNBT")); - mInitMap.put(new Pair("func_70021_al", "getParts")); - mInitMap.put(new Pair("func_70022_Q", "getEntityString")); - mInitMap.put(new Pair("func_70024_g", "addVelocity")); - mInitMap.put(new Pair("func_70026_G", "isWet")); - mInitMap.put(new Pair("func_70027_ad", "isBurning")); - mInitMap.put(new Pair("func_70028_i", "isEntityEqual")); - mInitMap.put(new Pair("func_70029_a", "setWorld")); - mInitMap.put(new Pair("func_70030_z", "onEntityUpdate")); - mInitMap.put(new Pair("func_70031_b", "setSprinting")); - mInitMap.put(new Pair("func_70032_d", "getDistanceToEntity")); - mInitMap.put(new Pair("func_70033_W", "getYOffset")); - mInitMap.put(new Pair("func_70034_d", "setRotationYawHead")); - mInitMap.put(new Pair("func_70035_c", "getInventory")); - mInitMap.put(new Pair("func_70037_a", "readEntityFromNBT")); - mInitMap.put(new Pair("func_70038_c", "isOffsetPositionInLiquid")); - mInitMap.put(new Pair("func_70039_c", "writeToNBTOptional")); - mInitMap.put(new Pair("func_70040_Z", "getLookVec")); - mInitMap.put(new Pair("func_70041_e_", "canTriggerWalking")); - mInitMap.put(new Pair("func_70042_X", "getMountedYOffset")); - mInitMap.put(new Pair("func_70043_V", "updateRiderPosition")); - mInitMap.put(new Pair("func_70044_A", "setOnFireFromLava")); - mInitMap.put(new Pair("func_70045_F", "isImmuneToFire")); - mInitMap.put(new Pair("func_70046_E", "getBoundingBox")); - mInitMap.put(new Pair("func_70047_e", "getEyeHeight")); - mInitMap.put(new Pair("func_70049_a", "mInitMap.put(newFloatNBTList")); - mInitMap.put(new Pair("func_70050_g", "setAir")); - mInitMap.put(new Pair("func_70051_ag", "isSprinting")); - mInitMap.put(new Pair("func_70052_a", "setFlag")); - mInitMap.put(new Pair("func_70053_R", "getShadowSize")); - mInitMap.put(new Pair("func_70055_a", "isInsideOfMaterial")); - mInitMap.put(new Pair("func_70056_a", "setPositionAndRotation2")); - mInitMap.put(new Pair("func_70057_ab", "performHurtAnimation")); - mInitMap.put(new Pair("func_70058_J", "handleLavaMovement")); - mInitMap.put(new Pair("func_70060_a", "moveFlying")); - mInitMap.put(new Pair("func_70062_b", "setCurrentItemOrArmor")); - mInitMap.put(new Pair("func_70063_aa", "setInPortal")); - mInitMap.put(new Pair("func_70064_a", "updateFallState")); - mInitMap.put(new Pair("func_70065_x", "preparePlayerToSpawn")); - mInitMap.put(new Pair("func_70066_B", "extinguish")); - mInitMap.put(new Pair("func_70067_L", "canBeCollidedWith")); - mInitMap.put(new Pair("func_70068_e", "getDistanceSqToEntity")); - mInitMap.put(new Pair("func_70069_a", "fall")); - mInitMap.put(new Pair("func_70070_b", "getBrightnessForRender")); - mInitMap.put(new Pair("func_70071_h_", "onUpdate")); - mInitMap.put(new Pair("func_70072_I", "handleWaterMovement")); - mInitMap.put(new Pair("func_70074_a", "onKillEntity")); - mInitMap.put(new Pair("func_70075_an", "canAttackWithItem")); - mInitMap.put(new Pair("func_70076_C", "kill")); - mInitMap.put(new Pair("func_70077_a", "onStruckByLightning")); - mInitMap.put(new Pair("func_70078_a", "mountEntity")); - mInitMap.put(new Pair("func_70079_am", "getRotationYawHead")); - mInitMap.put(new Pair("func_70080_a", "setPositionAndRotation")); - mInitMap.put(new Pair("func_70081_e", "dealFireDamage")); - mInitMap.put(new Pair("func_70082_c", "setAngles")); - mInitMap.put(new Pair("func_70083_f", "getFlag")); - mInitMap.put(new Pair("func_70084_c", "addToPlayerScore")); - mInitMap.put(new Pair("func_70085_c", "interact")); - mInitMap.put(new Pair("func_70086_ai", "getAir")); - mInitMap.put(new Pair("func_70087_a", "mInitMap.put(newDoubleNBTList")); - mInitMap.put(new Pair("func_70088_a", "entityInit")); - mInitMap.put(new Pair("func_70089_S", "isEntityAlive")); - mInitMap.put(new Pair("func_70090_H", "isInWater")); - mInitMap.put(new Pair("func_70091_d", "moveEntity")); - mInitMap.put(new Pair("func_70092_e", "getDistanceSq")); - mInitMap.put(new Pair("func_70093_af", "isSneaking")); - mInitMap.put(new Pair("func_70094_T", "isEntityInsideOpaqueBlock")); - mInitMap.put(new Pair("func_70095_a", "setSneaking")); - mInitMap.put(new Pair("func_70096_w", "getDataWatcher")); - mInitMap.put(new Pair("func_70097_a", "attackEntityFrom")); - mInitMap.put(new Pair("func_70098_U", "updateRidden")); - mInitMap.put(new Pair("func_70099_a", "entityDropItem")); - mInitMap.put(new Pair("func_70100_b_", "onCollideWithPlayer")); - mInitMap.put(new Pair("func_70101_b", "setRotation")); - mInitMap.put(new Pair("func_70103_a", "handleHealthUpdate")); - mInitMap.put(new Pair("func_70104_M", "canBePushed")); - mInitMap.put(new Pair("func_70105_a", "setSize")); - mInitMap.put(new Pair("func_70106_y", "setDead")); - mInitMap.put(new Pair("func_70107_b", "setPosition")); - mInitMap.put(new Pair("func_70108_f", "applyEntityCollision")); - mInitMap.put(new Pair("func_70109_d", "writeToNBT")); - mInitMap.put(new Pair("func_70110_aj", "setInWeb")); - mInitMap.put(new Pair("func_70111_Y", "getCollisionBorderSize")); - mInitMap.put(new Pair("func_70112_a", "isInRangeToRenderDist")); - mInitMap.put(new Pair("func_70113_ah", "isEating")); - mInitMap.put(new Pair("func_70114_g", "getCollisionBox")); - mInitMap.put(new Pair("func_70115_ae", "isRiding")); - mInitMap.put(new Pair("func_70184_a", "onImpact")); - mInitMap.put(new Pair("func_70185_h", "getGravityVelocity")); - mInitMap.put(new Pair("func_70186_c", "setThrowableHeading")); - mInitMap.put(new Pair("func_70196_i", "getPotionDamage")); - mInitMap.put(new Pair("func_70220_a", "moveTowards")); - mInitMap.put(new Pair("func_70227_a", "onImpact")); - mInitMap.put(new Pair("func_70239_b", "setDamage")); - mInitMap.put(new Pair("func_70240_a", "setKnockbackStrength")); - mInitMap.put(new Pair("func_70241_g", "getIsCritical")); - mInitMap.put(new Pair("func_70242_d", "getDamage")); - mInitMap.put(new Pair("func_70243_d", "setIsCritical")); - mInitMap.put(new Pair("func_70265_b", "setTimeSinceHit")); - mInitMap.put(new Pair("func_70266_a", "setDamageTaken")); - mInitMap.put(new Pair("func_70267_i", "getForwardDirection")); - mInitMap.put(new Pair("func_70268_h", "getTimeSinceHit")); - mInitMap.put(new Pair("func_70269_c", "setForwardDirection")); - mInitMap.put(new Pair("func_70270_d", "setIsBoatEmpty")); - mInitMap.put(new Pair("func_70271_g", "getDamageTaken")); - mInitMap.put(new Pair("func_70288_d", "setAgeToCreativeDespawnTime")); - mInitMap.put(new Pair("func_70289_a", "combineItems")); - mInitMap.put(new Pair("func_70295_k_", "openChest")); - mInitMap.put(new Pair("func_70296_d", "markDirty")); - mInitMap.put(new Pair("func_70297_j_", "getInventoryStackLimit")); - mInitMap.put(new Pair("func_70298_a", "decrStackSize")); - mInitMap.put(new Pair("func_70299_a", "setInventorySlotContents")); - mInitMap.put(new Pair("func_70300_a", "isUseableByPlayer")); - mInitMap.put(new Pair("func_70301_a", "getStackInSlot")); - mInitMap.put(new Pair("func_70302_i_", "getSizeInventory")); - mInitMap.put(new Pair("func_70304_b", "getStackInSlotOnClosing")); - mInitMap.put(new Pair("func_70305_f", "closeChest")); - mInitMap.put(new Pair("func_70429_k", "decrementAnimations")); - mInitMap.put(new Pair("func_70430_l", "getTotalArmorValue")); - mInitMap.put(new Pair("func_70431_c", "hasItemStack")); - mInitMap.put(new Pair("func_70432_d", "storeItemStack")); - mInitMap.put(new Pair("func_70436_m", "dropAllItems")); - mInitMap.put(new Pair("func_70437_b", "setItemStack")); - mInitMap.put(new Pair("func_70440_f", "armorItemInSlot")); - mInitMap.put(new Pair("func_70441_a", "addItemStackToInventory")); - mInitMap.put(new Pair("func_70442_a", "writeToNBT")); - mInitMap.put(new Pair("func_70443_b", "readFromNBT")); - mInitMap.put(new Pair("func_70445_o", "getItemStack")); - mInitMap.put(new Pair("func_70447_i", "getFirstEmptyStack")); - mInitMap.put(new Pair("func_70448_g", "getCurrentItem")); - mInitMap.put(new Pair("func_70449_g", "damageArmor")); - mInitMap.put(new Pair("func_70451_h", "getHotbarSize")); - mInitMap.put(new Pair("func_70452_e", "storePartialItemStack")); - mInitMap.put(new Pair("func_70453_c", "changeCurrentItem")); - mInitMap.put(new Pair("func_70455_b", "copyInventory")); - mInitMap.put(new Pair("func_70463_b", "getStackInRowAndColumn")); - mInitMap.put(new Pair("func_70468_h", "getCurrentRecipe")); - mInitMap.put(new Pair("func_70469_d", "inventoryResetNeededOnSlotChange")); - mInitMap.put(new Pair("func_70470_g", "resetRecipeAndSlots")); - mInitMap.put(new Pair("func_70471_c", "setCurrentRecipeIndex")); - mInitMap.put(new Pair("func_70486_a", "loadInventoryFromNBT")); - mInitMap.put(new Pair("func_70487_g", "saveInventoryToNBT")); - mInitMap.put(new Pair("func_70491_i", "getDamage")); - mInitMap.put(new Pair("func_70492_c", "setDamage")); - mInitMap.put(new Pair("func_70493_k", "getRollingDirection")); - mInitMap.put(new Pair("func_70494_i", "setRollingDirection")); - mInitMap.put(new Pair("func_70496_j", "getRollingAmplitude")); - mInitMap.put(new Pair("func_70497_h", "setRollingAmplitude")); - mInitMap.put(new Pair("func_70515_d", "explode")); - mInitMap.put(new Pair("func_70518_d", "onValidSurface")); - mInitMap.put(new Pair("func_70526_d", "getXpValue")); - mInitMap.put(new Pair("func_70527_a", "getXPSplit")); - mInitMap.put(new Pair("func_70528_g", "getTextureByXP")); - mInitMap.put(new Pair("func_70534_d", "getRedColorF")); - mInitMap.put(new Pair("func_70535_g", "getBlueColorF")); - mInitMap.put(new Pair("func_70536_a", "setParticleTextureIndex")); - mInitMap.put(new Pair("func_70537_b", "getFXLayer")); - mInitMap.put(new Pair("func_70538_b", "setRBGColorF")); - mInitMap.put(new Pair("func_70539_a", "renderParticle")); - mInitMap.put(new Pair("func_70541_f", "multipleParticleScaleBy")); - mInitMap.put(new Pair("func_70542_f", "getGreenColorF")); - mInitMap.put(new Pair("func_70543_e", "multiplyVelocity")); - mInitMap.put(new Pair("func_70589_b", "setBaseSpellTextureIndex")); - mInitMap.put(new Pair("func_70596_a", "applyColourMultiplier")); - mInitMap.put(new Pair("func_70599_aP", "getSoundVolume")); - mInitMap.put(new Pair("func_70600_l", "dropRareDrop")); - mInitMap.put(new Pair("func_70601_bi", "getCanSpawnHere")); - mInitMap.put(new Pair("func_70603_bj", "getRenderSizeModifier")); - mInitMap.put(new Pair("func_70604_c", "setRevengeTarget")); - mInitMap.put(new Pair("func_70605_aq", "getMoveHelper")); - mInitMap.put(new Pair("func_70606_j", "setHealth")); - mInitMap.put(new Pair("func_70608_bn", "isPlayerSleeping")); - mInitMap.put(new Pair("func_70609_aI", "onDeathUpdate")); - mInitMap.put(new Pair("func_70610_aX", "isMovementBlocked")); - mInitMap.put(new Pair("func_70612_e", "moveEntityWithHeading")); - mInitMap.put(new Pair("func_70613_aW", "isServerWorld")); - mInitMap.put(new Pair("func_70614_a", "rayTrace")); - mInitMap.put(new Pair("func_70615_aA", "eatGrassBonus")); - mInitMap.put(new Pair("func_70617_f_", "isOnLadder")); - mInitMap.put(new Pair("func_70618_n", "removePotionEffectClient")); - mInitMap.put(new Pair("func_70619_bc", "updateAITasks")); - mInitMap.put(new Pair("func_70620_b", "getItemIcon")); - mInitMap.put(new Pair("func_70621_aR", "getHurtSound")); - mInitMap.put(new Pair("func_70623_bb", "despawnEntity")); - mInitMap.put(new Pair("func_70624_b", "setAttackTarget")); - mInitMap.put(new Pair("func_70625_a", "faceEntity")); - mInitMap.put(new Pair("func_70626_be", "updateEntityActionState")); - mInitMap.put(new Pair("func_70627_aG", "getTalkInterval")); - mInitMap.put(new Pair("func_70628_a", "dropFewItems")); - mInitMap.put(new Pair("func_70629_bd", "updateAITick")); - mInitMap.put(new Pair("func_70631_g_", "isChild")); - mInitMap.put(new Pair("func_70632_aY", "isBlocking")); - mInitMap.put(new Pair("func_70634_a", "setPositionAndUpdate")); - mInitMap.put(new Pair("func_70635_at", "getEntitySenses")); - mInitMap.put(new Pair("func_70636_d", "onLivingUpdate")); - mInitMap.put(new Pair("func_70637_d", "setJumping")); - mInitMap.put(new Pair("func_70638_az", "getAttackTarget")); - mInitMap.put(new Pair("func_70639_aQ", "getLivingSound")); - mInitMap.put(new Pair("func_70641_bl", "getMaxSpawnedInChunk")); - mInitMap.put(new Pair("func_70642_aH", "playLivingSound")); - mInitMap.put(new Pair("func_70643_av", "getAITarget")); - mInitMap.put(new Pair("func_70644_a", "isPotionActive")); - mInitMap.put(new Pair("func_70645_a", "onDeath")); - mInitMap.put(new Pair("func_70646_bf", "getVerticalFaceSpeed")); - mInitMap.put(new Pair("func_70647_i", "getSoundPitch")); - mInitMap.put(new Pair("func_70648_aU", "canBreatheUnderwater")); - mInitMap.put(new Pair("func_70650_aV", "isAIEnabled")); - mInitMap.put(new Pair("func_70651_bq", "getActivePotionEffects")); - mInitMap.put(new Pair("func_70652_k", "attackEntityAsMob")); - mInitMap.put(new Pair("func_70653_a", "knockBack")); - mInitMap.put(new Pair("func_70654_ax", "getAge")); - mInitMap.put(new Pair("func_70655_b", "applyArmorCalculations")); - mInitMap.put(new Pair("func_70656_aK", "spawnExplosionParticle")); - mInitMap.put(new Pair("func_70657_f", "setMoveForward")); - mInitMap.put(new Pair("func_70658_aO", "getTotalArmorValue")); - mInitMap.put(new Pair("func_70659_e", "setAIMoveSpeed")); - mInitMap.put(new Pair("func_70660_b", "getActivePotionEffect")); - mInitMap.put(new Pair("func_70661_as", "getNavigator")); - mInitMap.put(new Pair("func_70662_br", "isEntityUndead")); - mInitMap.put(new Pair("func_70663_b", "updateRotation")); - mInitMap.put(new Pair("func_70664_aZ", "jump")); - mInitMap.put(new Pair("func_70665_d", "damageEntity")); - mInitMap.put(new Pair("func_70666_h", "getPosition")); - mInitMap.put(new Pair("func_70668_bt", "getCreatureAttribute")); - mInitMap.put(new Pair("func_70669_a", "renderBrokenItemStack")); - mInitMap.put(new Pair("func_70670_a", "onmInitMap.put(newPotionEffect")); - mInitMap.put(new Pair("func_70671_ap", "getLookHelper")); - mInitMap.put(new Pair("func_70672_c", "applyPotionDamageCalculations")); - mInitMap.put(new Pair("func_70673_aS", "getDeathSound")); - mInitMap.put(new Pair("func_70674_bp", "clearActivePotions")); - mInitMap.put(new Pair("func_70675_k", "damageArmor")); - mInitMap.put(new Pair("func_70676_i", "getLook")); - mInitMap.put(new Pair("func_70678_g", "getSwingProgress")); - mInitMap.put(new Pair("func_70679_bo", "updatePotionEffects")); - mInitMap.put(new Pair("func_70681_au", "getRNG")); - mInitMap.put(new Pair("func_70682_h", "decreaseAirSupply")); - mInitMap.put(new Pair("func_70683_ar", "getJumpHelper")); - mInitMap.put(new Pair("func_70684_aJ", "isPlayer")); - mInitMap.put(new Pair("func_70685_l", "canEntityBeSeen")); - mInitMap.put(new Pair("func_70686_a", "canAttackClass")); - mInitMap.put(new Pair("func_70687_e", "isPotionApplicable")); - mInitMap.put(new Pair("func_70688_c", "onFinishedPotionEffect")); - mInitMap.put(new Pair("func_70689_ay", "getAIMoveSpeed")); - mInitMap.put(new Pair("func_70690_d", "addPotionEffect")); - mInitMap.put(new Pair("func_70691_i", "heal")); - mInitMap.put(new Pair("func_70692_ba", "canDespawn")); - mInitMap.put(new Pair("func_70693_a", "getExperiencePoints")); - mInitMap.put(new Pair("func_70694_bm", "getHeldItem")); - mInitMap.put(new Pair("func_70695_b", "onChangedPotionEffect")); - mInitMap.put(new Pair("func_70777_m", "getEntityToAttack")); - mInitMap.put(new Pair("func_70778_a", "setPathToEntity")); - mInitMap.put(new Pair("func_70779_j", "updateWanderPath")); - mInitMap.put(new Pair("func_70780_i", "isMovementCeased")); - mInitMap.put(new Pair("func_70781_l", "hasPath")); - mInitMap.put(new Pair("func_70782_k", "findPlayerToAttack")); - mInitMap.put(new Pair("func_70783_a", "getBlockPathWeight")); - mInitMap.put(new Pair("func_70784_b", "setTarget")); - mInitMap.put(new Pair("func_70785_a", "attackEntity")); - mInitMap.put(new Pair("func_70790_a", "isCourseTraversable")); - mInitMap.put(new Pair("func_70799_a", "setSlimeSize")); - mInitMap.put(new Pair("func_70800_m", "canDamagePlayer")); - mInitMap.put(new Pair("func_70801_i", "getSlimeParticle")); - mInitMap.put(new Pair("func_70802_j", "createInstance")); - mInitMap.put(new Pair("func_70803_o", "getJumpSound")); - mInitMap.put(new Pair("func_70804_p", "makesSoundOnLand")); - mInitMap.put(new Pair("func_70805_n", "getAttackStrength")); - mInitMap.put(new Pair("func_70806_k", "getJumpDelay")); - mInitMap.put(new Pair("func_70807_r", "makesSoundOnJump")); - mInitMap.put(new Pair("func_70808_l", "alterSquishAmount")); - mInitMap.put(new Pair("func_70809_q", "getSlimeSize")); - mInitMap.put(new Pair("func_70814_o", "isValidLightLevel")); - mInitMap.put(new Pair("func_70816_c", "teleportToEntity")); - mInitMap.put(new Pair("func_70817_b", "setCarryingData")); - mInitMap.put(new Pair("func_70819_e", "setScreaming")); - mInitMap.put(new Pair("func_70820_n", "teleportRandomly")); - mInitMap.put(new Pair("func_70821_d", "shouldAttackPlayer")); - mInitMap.put(new Pair("func_70823_r", "isScreaming")); - mInitMap.put(new Pair("func_70824_q", "getCarryingData")); - mInitMap.put(new Pair("func_70825_j", "teleportTo")); - mInitMap.put(new Pair("func_70829_a", "setCreeperState")); - mInitMap.put(new Pair("func_70830_n", "getPowered")); - mInitMap.put(new Pair("func_70831_j", "getCreeperFlashIntensity")); - mInitMap.put(new Pair("func_70832_p", "getCreeperState")); - mInitMap.put(new Pair("func_70835_c", "becomeAngryAt")); - mInitMap.put(new Pair("func_70839_e", "setBesideClimbableBlock")); - mInitMap.put(new Pair("func_70841_p", "isBesideClimbableBlock")); - mInitMap.put(new Pair("func_70849_f", "setPlayerCreated")); - mInitMap.put(new Pair("func_70850_q", "isPlayerCreated")); - mInitMap.put(new Pair("func_70851_e", "setHoldingRose")); - mInitMap.put(new Pair("func_70852_n", "getVillage")); - mInitMap.put(new Pair("func_70853_p", "getHoldRoseTick")); - mInitMap.put(new Pair("func_70854_o", "getAttackTimer")); - mInitMap.put(new Pair("func_70873_a", "setGrowingAge")); - mInitMap.put(new Pair("func_70874_b", "getGrowingAge")); - mInitMap.put(new Pair("func_70875_t", "resetInLove")); - mInitMap.put(new Pair("func_70876_c", "procreate")); - mInitMap.put(new Pair("func_70877_b", "isBreedingItem")); - mInitMap.put(new Pair("func_70878_b", "canMateWith")); - mInitMap.put(new Pair("func_70880_s", "isInLove")); - mInitMap.put(new Pair("func_70890_k", "getHeadRotationAngleX")); - mInitMap.put(new Pair("func_70891_b", "setFleeceColor")); - mInitMap.put(new Pair("func_70892_o", "getSheared")); - mInitMap.put(new Pair("func_70893_e", "setSheared")); - mInitMap.put(new Pair("func_70894_j", "getHeadRotationPointY")); - mInitMap.put(new Pair("func_70895_a", "getRandomFleeceColor")); - mInitMap.put(new Pair("func_70896_n", "getFleeceColor")); - mInitMap.put(new Pair("func_70900_e", "setSaddled")); - mInitMap.put(new Pair("func_70901_n", "getSaddled")); - mInitMap.put(new Pair("func_70902_q", "getOwner")); - mInitMap.put(new Pair("func_70903_f", "setTamed")); - mInitMap.put(new Pair("func_70904_g", "setSitting")); - mInitMap.put(new Pair("func_70906_o", "isSitting")); - mInitMap.put(new Pair("func_70907_r", "getAISit")); - mInitMap.put(new Pair("func_70908_e", "playTameEffect")); - mInitMap.put(new Pair("func_70909_n", "isTamed")); - mInitMap.put(new Pair("func_70912_b", "setTameSkin")); - mInitMap.put(new Pair("func_70913_u", "getTameSkin")); - mInitMap.put(new Pair("func_70915_j", "getShadingWhileWet")); - mInitMap.put(new Pair("func_70916_h", "setAngry")); - mInitMap.put(new Pair("func_70917_k", "getInterestedAngle")); - mInitMap.put(new Pair("func_70919_bu", "isAngry")); - mInitMap.put(new Pair("func_70920_v", "getTailRotation")); - mInitMap.put(new Pair("func_70921_u", "isWolfWet")); - mInitMap.put(new Pair("func_70923_f", "getShakeAngle")); - mInitMap.put(new Pair("func_70930_a", "setRecipes")); - mInitMap.put(new Pair("func_70931_l_", "getCustomer")); - mInitMap.put(new Pair("func_70932_a_", "setCustomer")); - mInitMap.put(new Pair("func_70933_a", "useRecipe")); - mInitMap.put(new Pair("func_70934_b", "getRecipes")); - mInitMap.put(new Pair("func_70938_b", "setProfession")); - mInitMap.put(new Pair("func_70939_f", "setPlaying")); - mInitMap.put(new Pair("func_70940_q", "isTrading")); - mInitMap.put(new Pair("func_70941_o", "isMating")); - mInitMap.put(new Pair("func_70942_a", "generateRandomParticles")); - mInitMap.put(new Pair("func_70945_p", "isPlaying")); - mInitMap.put(new Pair("func_70946_n", "getProfession")); - mInitMap.put(new Pair("func_70947_e", "setMating")); - mInitMap.put(new Pair("func_70950_c", "addDefaultEquipmentAndRecipies")); - mInitMap.put(new Pair("func_70965_a", "attackEntityFromPart")); - mInitMap.put(new Pair("func_70967_k", "setmInitMap.put(newTarget")); - mInitMap.put(new Pair("func_70969_j", "updateDragonEnderCrystal")); - mInitMap.put(new Pair("func_70970_a", "collideWithEntities")); - mInitMap.put(new Pair("func_70971_b", "attackEntitiesInList")); - mInitMap.put(new Pair("func_70972_a", "destroyBlocksInAABB")); - mInitMap.put(new Pair("func_70973_b", "simplifyAngle")); - mInitMap.put(new Pair("func_70974_a", "getMovementOffsets")); - mInitMap.put(new Pair("func_70975_a", "createEnderPortal")); - mInitMap.put(new Pair("func_70996_bM", "shouldHeal")); - mInitMap.put(new Pair("func_70997_bJ", "getBedLocation")); - mInitMap.put(new Pair("func_70998_m", "interactWith")); - mInitMap.put(new Pair("func_70999_a", "wakeUpPlayer")); - mInitMap.put(new Pair("func_71000_j", "addMovementStat")); - mInitMap.put(new Pair("func_71001_a", "onItemPickup")); - mInitMap.put(new Pair("func_71002_c", "displayGUIEnchantment")); - mInitMap.put(new Pair("func_71004_bE", "respawnPlayer")); - mInitMap.put(new Pair("func_71005_bN", "getInventoryEnderChest")); - mInitMap.put(new Pair("func_71007_a", "displayGUIChest")); - mInitMap.put(new Pair("func_71008_a", "setItemInUse")); - mInitMap.put(new Pair("func_71009_b", "onCriticalHit")); - mInitMap.put(new Pair("func_71010_c", "updateItemUse")); - mInitMap.put(new Pair("func_71011_bu", "getItemInUse")); - mInitMap.put(new Pair("func_71012_a", "joinEntityItemWithWorld")); - mInitMap.put(new Pair("func_71015_k", "addMountedMovementStat")); - mInitMap.put(new Pair("func_71016_p", "sendPlayerAbilities")); - mInitMap.put(new Pair("func_71018_a", "sleepInBedAt")); - mInitMap.put(new Pair("func_71019_a", "dropPlayerItemWithRandomChoice")); - mInitMap.put(new Pair("func_71020_j", "addExhaustion")); - mInitMap.put(new Pair("func_71023_q", "addExperience")); - mInitMap.put(new Pair("func_71024_bL", "getFoodStats")); - mInitMap.put(new Pair("func_71026_bH", "isPlayerFullyAsleep")); - mInitMap.put(new Pair("func_71027_c", "travelToDimension")); - mInitMap.put(new Pair("func_71028_bD", "destroyCurrentEquippedItem")); - mInitMap.put(new Pair("func_71029_a", "triggerAchievement")); - mInitMap.put(new Pair("func_71030_a", "displayGUIMerchant")); - mInitMap.put(new Pair("func_71033_a", "setGameType")); - mInitMap.put(new Pair("func_71034_by", "stopUsingItem")); - mInitMap.put(new Pair("func_71036_o", "onItemUseFinish")); - mInitMap.put(new Pair("func_71037_bA", "getScore")); - mInitMap.put(new Pair("func_71038_i", "swingItem")); - mInitMap.put(new Pair("func_71039_bw", "isUsingItem")); - mInitMap.put(new Pair("func_71040_bB", "dropOneItem")); - mInitMap.put(new Pair("func_71041_bz", "clearItemInUse")); - mInitMap.put(new Pair("func_71043_e", "canEat")); - mInitMap.put(new Pair("func_71044_o", "collideWithPlayer")); - mInitMap.put(new Pair("func_71045_bC", "getCurrentEquippedItem")); - mInitMap.put(new Pair("func_71047_c", "onEnchantmentCritical")); - mInitMap.put(new Pair("func_71048_c", "displayGUIBook")); - mInitMap.put(new Pair("func_71049_a", "clonePlayer")); - mInitMap.put(new Pair("func_71050_bK", "xpBarCap")); - mInitMap.put(new Pair("func_71051_bG", "getBedOrientationInDegrees")); - mInitMap.put(new Pair("func_71052_bv", "getItemInUseCount")); - mInitMap.put(new Pair("func_71053_j", "closeScreen")); - mInitMap.put(new Pair("func_71056_a", "verifyRespawnCoordinates")); - mInitMap.put(new Pair("func_71057_bx", "getItemInUseDuration")); - mInitMap.put(new Pair("func_71058_b", "displayGUIWorkbench")); - mInitMap.put(new Pair("func_71059_n", "attackTargetEntityWithCurrentItem")); - mInitMap.put(new Pair("func_71060_bI", "getSleepTimer")); - mInitMap.put(new Pair("func_71061_d_", "resetHeight")); - mInitMap.put(new Pair("func_71063_a", "setSpawnChunk")); - mInitMap.put(new Pair("func_71064_a", "addStat")); - mInitMap.put(new Pair("func_71065_l", "isInBed")); - mInitMap.put(new Pair("func_71110_a", "updateCraftingInventory")); - mInitMap.put(new Pair("func_71111_a", "sendSlotContents")); - mInitMap.put(new Pair("func_71112_a", "sendProgressBarUpdate")); - mInitMap.put(new Pair("func_71113_k", "updateHeldItem")); - mInitMap.put(new Pair("func_71114_r", "getPlayerIP")); - mInitMap.put(new Pair("func_71116_b", "addSelfToInternalCraftingInventory")); - mInitMap.put(new Pair("func_71117_bO", "getNextWindowId")); - mInitMap.put(new Pair("func_71118_n", "setPlayerHealthUpdated")); - mInitMap.put(new Pair("func_71120_a", "sendContainerToPlayer")); - mInitMap.put(new Pair("func_71121_q", "getServerForPlayer")); - mInitMap.put(new Pair("func_71122_b", "handleFalling")); - mInitMap.put(new Pair("func_71123_m", "mountEntityAndWakeUp")); - mInitMap.put(new Pair("func_71124_b", "getEquipmentInSlot")); - mInitMap.put(new Pair("func_71127_g", "onUpdateEntity")); - mInitMap.put(new Pair("func_71128_l", "closeContainer")); - mInitMap.put(new Pair("func_71150_b", "setPlayerSPHealth")); - mInitMap.put(new Pair("func_71151_f", "getFOVMultiplier")); - mInitMap.put(new Pair("func_71152_a", "setXPStats")); - mInitMap.put(new Pair("func_71153_f", "isBlockNormal")); - mInitMap.put(new Pair("func_71165_d", "sendChatMessage")); - mInitMap.put(new Pair("func_71166_b", "sendMotionUpdates")); - mInitMap.put(new Pair("func_71187_D", "getCommandManager")); - mInitMap.put(new Pair("func_71188_g", "setAllowPvp")); - mInitMap.put(new Pair("func_71189_e", "setHostname")); - mInitMap.put(new Pair("func_71190_q", "updateTimeLightAndEntities")); - mInitMap.put(new Pair("func_71191_d", "setBuildLimit")); - mInitMap.put(new Pair("func_71192_d", "setUserMessage")); - mInitMap.put(new Pair("func_71193_K", "allowSpawnMonsters")); - mInitMap.put(new Pair("func_71194_c", "canCreateBonusChest")); - mInitMap.put(new Pair("func_71195_b_", "getUserMessage")); - mInitMap.put(new Pair("func_71197_b", "startServer")); - mInitMap.put(new Pair("func_71198_k", "logDebug")); - mInitMap.put(new Pair("func_71199_h", "isHardcore")); - mInitMap.put(new Pair("func_71200_ad", "serverIsInRunLoop")); - mInitMap.put(new Pair("func_71201_j", "logSevere")); - mInitMap.put(new Pair("func_71203_ab", "getConfigurationManager")); - mInitMap.put(new Pair("func_71204_b", "setDemo")); - mInitMap.put(new Pair("func_71205_p", "setMOTD")); - mInitMap.put(new Pair("func_71206_a", "shareToLAN")); - mInitMap.put(new Pair("func_71207_Z", "getBuildLimit")); - mInitMap.put(new Pair("func_71208_b", "setServerPort")); - mInitMap.put(new Pair("func_71209_f", "getFile")); - mInitMap.put(new Pair("func_71211_k", "getServerHostname")); - mInitMap.put(new Pair("func_71213_z", "getAllUsernames")); - mInitMap.put(new Pair("func_71214_G", "getServerOwner")); - mInitMap.put(new Pair("func_71215_F", "getServerPort")); - mInitMap.put(new Pair("func_71216_a_", "outputPercentRemaining")); - mInitMap.put(new Pair("func_71217_p", "tick")); - mInitMap.put(new Pair("func_71218_a", "worldServerForDimension")); - mInitMap.put(new Pair("func_71219_W", "isPVPEnabled")); - mInitMap.put(new Pair("func_71220_V", "getCanSpawnNPCs")); - mInitMap.put(new Pair("func_71221_J", "getWorldName")); - mInitMap.put(new Pair("func_71222_d", "initialWorldChunkLoad")); - mInitMap.put(new Pair("func_71223_ag", "enableProfiling")); - mInitMap.put(new Pair("func_71224_l", "setServerOwner")); - mInitMap.put(new Pair("func_71225_e", "canStructuresSpawn")); - mInitMap.put(new Pair("func_71228_a", "finalTick")); - mInitMap.put(new Pair("func_71229_d", "setOnlineMode")); - mInitMap.put(new Pair("func_71230_b", "addServerInfoToCrashReport")); - mInitMap.put(new Pair("func_71231_X", "isFlightAllowed")); - mInitMap.put(new Pair("func_71233_x", "getCurrentPlayerCount")); - mInitMap.put(new Pair("func_71234_u", "getPort")); - mInitMap.put(new Pair("func_71235_a", "setGameType")); - mInitMap.put(new Pair("func_71236_h", "logWarning")); - mInitMap.put(new Pair("func_71237_c", "convertMapIfNeeded")); - mInitMap.put(new Pair("func_71238_n", "getDataDirectory")); - mInitMap.put(new Pair("func_71239_B", "isDebuggingEnabled")); - mInitMap.put(new Pair("func_71240_o", "systemExitNow")); - mInitMap.put(new Pair("func_71241_aa", "isServerStopped")); - mInitMap.put(new Pair("func_71242_L", "isDemo")); - mInitMap.put(new Pair("func_71243_i", "clearCurrentTask")); - mInitMap.put(new Pair("func_71244_g", "logInfo")); - mInitMap.put(new Pair("func_71245_h", "setAllowFlight")); - mInitMap.put(new Pair("func_71246_n", "setWorldName")); - mInitMap.put(new Pair("func_71247_a", "loadAllWorlds")); - mInitMap.put(new Pair("func_71248_a", "getPossibleCompletions")); - mInitMap.put(new Pair("func_71249_w", "getMinecraftVersion")); - mInitMap.put(new Pair("func_71250_E", "getKeyPair")); - mInitMap.put(new Pair("func_71251_e", "setCanSpawnAnimals")); - mInitMap.put(new Pair("func_71252_i", "handleRConCommand")); - mInitMap.put(new Pair("func_71253_a", "setKeyPair")); - mInitMap.put(new Pair("func_71254_M", "getActiveAnvilConverter")); - mInitMap.put(new Pair("func_71255_r", "getAllowNether")); - mInitMap.put(new Pair("func_71256_s", "startServerThread")); - mInitMap.put(new Pair("func_71257_f", "setCanSpawnNPCs")); - mInitMap.put(new Pair("func_71258_A", "getPlugins")); - mInitMap.put(new Pair("func_71259_af", "getTickCounter")); - mInitMap.put(new Pair("func_71260_j", "stopServer")); - mInitMap.put(new Pair("func_71261_m", "setFolderName")); - mInitMap.put(new Pair("func_71262_S", "isDedicatedServer")); - mInitMap.put(new Pair("func_71263_m", "initiateShutdown")); - mInitMap.put(new Pair("func_71264_H", "isSinglePlayer")); - mInitMap.put(new Pair("func_71265_f", "getGameType")); - mInitMap.put(new Pair("func_71266_T", "isServerInOnlineMode")); - mInitMap.put(new Pair("func_71267_a", "saveAllWorlds")); - mInitMap.put(new Pair("func_71268_U", "getCanSpawnAnimals")); - mInitMap.put(new Pair("func_71270_I", "getFolderName")); - mInitMap.put(new Pair("func_71272_O", "deleteWorldAndStopServer")); - mInitMap.put(new Pair("func_71273_Y", "getMOTD")); - mInitMap.put(new Pair("func_71274_v", "getMotd")); - mInitMap.put(new Pair("func_71275_y", "getMaxPlayers")); - mInitMap.put(new Pair("func_71276_C", "getServer")); - mInitMap.put(new Pair("func_71277_t", "getHostname")); - mInitMap.put(new Pair("func_71278_l", "isServerRunning")); - mInitMap.put(new Pair("func_71279_ae", "getGuiEnabled")); - mInitMap.put(new Pair("func_71326_a", "saveProperties")); - mInitMap.put(new Pair("func_71327_a", "getIntProperty")); - mInitMap.put(new Pair("func_71328_a", "setProperty")); - mInitMap.put(new Pair("func_71329_c", "getSettingsFilename")); - mInitMap.put(new Pair("func_71330_a", "getStringProperty")); - mInitMap.put(new Pair("func_71331_a", "addPendingCommand")); - mInitMap.put(new Pair("func_71332_a", "getBooleanProperty")); - mInitMap.put(new Pair("func_71333_ah", "executePendingCommands")); - mInitMap.put(new Pair("func_71344_c", "getPublic")); - mInitMap.put(new Pair("func_71351_a", "setServerData")); - mInitMap.put(new Pair("func_71352_k", "toggleFullscreen")); - mInitMap.put(new Pair("func_71353_a", "loadWorld")); - mInitMap.put(new Pair("func_71354_a", "setDimensionAndSpawnPlayer")); - mInitMap.put(new Pair("func_71355_q", "isDemo")); - mInitMap.put(new Pair("func_71356_B", "isSingleplayer")); - mInitMap.put(new Pair("func_71357_I", "loadScreen")); - mInitMap.put(new Pair("func_71359_d", "getSaveLoader")); - mInitMap.put(new Pair("func_71361_d", "checkGLError")); - mInitMap.put(new Pair("func_71363_D", "stopIntegratedServer")); - mInitMap.put(new Pair("func_71364_i", "setIngameNotInFocus")); - mInitMap.put(new Pair("func_71366_a", "displayDebugInfo")); - mInitMap.put(new Pair("func_71367_a", "setServer")); - mInitMap.put(new Pair("func_71369_N", "getGLMaximumTextureSize")); - mInitMap.put(new Pair("func_71370_a", "resize")); - mInitMap.put(new Pair("func_71371_a", "launchIntegratedServer")); - mInitMap.put(new Pair("func_71372_G", "isFullScreen")); - mInitMap.put(new Pair("func_71374_p", "debugInfoEntities")); - mInitMap.put(new Pair("func_71375_t", "isFancyGraphicsEnabled")); - mInitMap.put(new Pair("func_71377_b", "displayCrashReport")); - mInitMap.put(new Pair("func_71378_E", "getPlayerUsageSnooper")); - mInitMap.put(new Pair("func_71379_u", "isAmbientOcclusionEnabled")); - mInitMap.put(new Pair("func_71381_h", "setIngameFocus")); - mInitMap.put(new Pair("func_71382_s", "isGuiEnabled")); - mInitMap.put(new Pair("func_71383_b", "updateDebugProfilerName")); - mInitMap.put(new Pair("func_71384_a", "startGame")); - mInitMap.put(new Pair("func_71385_j", "displayInGameMenu")); - mInitMap.put(new Pair("func_71386_F", "getSystemTime")); - mInitMap.put(new Pair("func_71387_A", "isIntegratedServerRunning")); - mInitMap.put(new Pair("func_71388_o", "getWorldProviderName")); - mInitMap.put(new Pair("func_71389_H", "startTimerHackThread")); - mInitMap.put(new Pair("func_71392_a", "scaledTessellator")); - mInitMap.put(new Pair("func_71393_m", "debugInfoRenders")); - mInitMap.put(new Pair("func_71396_d", "addGraphicsAndWorldToCrashReport")); - mInitMap.put(new Pair("func_71398_f", "freeMemory")); - mInitMap.put(new Pair("func_71400_g", "shutdown")); - mInitMap.put(new Pair("func_71401_C", "getIntegratedServer")); - mInitMap.put(new Pair("func_71403_a", "loadWorld")); - mInitMap.put(new Pair("func_71404_a", "crashed")); - mInitMap.put(new Pair("func_71405_e", "shutdownMinecraftApplet")); - mInitMap.put(new Pair("func_71407_l", "runTick")); - mInitMap.put(new Pair("func_71408_n", "getEntityDebug")); - mInitMap.put(new Pair("func_71410_x", "getMinecraft")); - mInitMap.put(new Pair("func_71411_J", "runGameLoop")); - mInitMap.put(new Pair("func_71497_f", "getFile")); - mInitMap.put(new Pair("func_71498_d", "getCauseStackTraceOrString")); - mInitMap.put(new Pair("func_71499_a", "addCrashSectionThrowable")); - mInitMap.put(new Pair("func_71500_a", "addCrashSectionCallable")); - mInitMap.put(new Pair("func_71501_a", "getDescription")); - mInitMap.put(new Pair("func_71502_e", "getCompleteReport")); - mInitMap.put(new Pair("func_71503_h", "getWittyComment")); - mInitMap.put(new Pair("func_71504_g", "populateEnvironment")); - mInitMap.put(new Pair("func_71505_b", "getCrashCause")); - mInitMap.put(new Pair("func_71506_a", "getSectionsInStringBuilder")); - mInitMap.put(new Pair("func_71507_a", "addCrashSection")); - mInitMap.put(new Pair("func_71514_a", "getCommandAliases")); - mInitMap.put(new Pair("func_71515_b", "processCommand")); - mInitMap.put(new Pair("func_71516_a", "addTabCompletionOptions")); - mInitMap.put(new Pair("func_71517_b", "getCommandName")); - mInitMap.put(new Pair("func_71518_a", "getCommandUsage")); - mInitMap.put(new Pair("func_71519_b", "canCommandSenderUseCommand")); - mInitMap.put(new Pair("func_71521_c", "getCommandSenderAsPlayer")); - mInitMap.put(new Pair("func_71523_a", "doesStringStartWith")); - mInitMap.put(new Pair("func_71526_a", "parseInt")); - mInitMap.put(new Pair("func_71527_a", "joinNiceString")); - mInitMap.put(new Pair("func_71528_a", "parseIntWithMin")); - mInitMap.put(new Pair("func_71529_a", "setAdminCommander")); - mInitMap.put(new Pair("func_71530_a", "getListOfStringsMatchingLastWord")); - mInitMap.put(new Pair("func_71531_a", "getListOfStringsFromIterableMatchingLastWord")); - mInitMap.put(new Pair("func_71532_a", "parseIntBounded")); - mInitMap.put(new Pair("func_71534_d", "getSortedPossibleCommands")); - mInitMap.put(new Pair("func_71535_c", "getCommands")); - mInitMap.put(new Pair("func_71536_c", "getPlayers")); - mInitMap.put(new Pair("func_71538_c", "getListOfPlayerUsernames")); - mInitMap.put(new Pair("func_71539_b", "getGameModeFromCommand")); - mInitMap.put(new Pair("func_71541_a", "setGameType")); - mInitMap.put(new Pair("func_71542_c", "getAllUsernames")); - mInitMap.put(new Pair("func_71552_a", "setTime")); - mInitMap.put(new Pair("func_71553_b", "addTime")); - mInitMap.put(new Pair("func_71554_c", "toggleDownfall")); - mInitMap.put(new Pair("func_71555_a", "getCommands")); - mInitMap.put(new Pair("func_71556_a", "executeCommand")); - mInitMap.put(new Pair("func_71557_a", "getPossibleCommands")); - mInitMap.put(new Pair("func_71558_b", "getPossibleCommands")); - mInitMap.put(new Pair("func_71559_a", "dropFirstString")); - mInitMap.put(new Pair("func_71560_a", "registerCommand")); - mInitMap.put(new Pair("func_71565_a", "filterAllowedCharacters")); - mInitMap.put(new Pair("func_71566_a", "isAllowedCharacter")); - mInitMap.put(new Pair("func_71569_e", "getDistanceSquared")); - mInitMap.put(new Pair("func_71571_b", "set")); - mInitMap.put(new Pair("func_71575_a", "getCrashReport")); - mInitMap.put(new Pair("func_72314_b", "expand")); - mInitMap.put(new Pair("func_72315_c", "isVecInXZ")); - mInitMap.put(new Pair("func_72316_a", "calculateXOffset")); - mInitMap.put(new Pair("func_72317_d", "offset")); - mInitMap.put(new Pair("func_72318_a", "isVecInside")); - mInitMap.put(new Pair("func_72319_d", "isVecInXY")); - mInitMap.put(new Pair("func_72320_b", "getAverageEdgeLength")); - mInitMap.put(new Pair("func_72321_a", "addCoord")); - mInitMap.put(new Pair("func_72322_c", "calculateZOffset")); - mInitMap.put(new Pair("func_72323_b", "calculateYOffset")); - mInitMap.put(new Pair("func_72324_b", "setBounds")); - mInitMap.put(new Pair("func_72325_c", "getOffsetBoundingBox")); - mInitMap.put(new Pair("func_72326_a", "intersectsWith")); - mInitMap.put(new Pair("func_72327_a", "calculateIntercept")); - mInitMap.put(new Pair("func_72328_c", "setBB")); - mInitMap.put(new Pair("func_72329_c", "copy")); - mInitMap.put(new Pair("func_72330_a", "getBoundingBox")); - mInitMap.put(new Pair("func_72331_e", "contract")); - mInitMap.put(new Pair("func_72333_b", "isVecInYZ")); - mInitMap.put(new Pair("func_72352_l", "getMaxPlayers")); - mInitMap.put(new Pair("func_72354_b", "updateTimeAndWeatherForPlayer")); - mInitMap.put(new Pair("func_72355_a", "initializeConnectionToPlayer")); - mInitMap.put(new Pair("func_72356_a", "transferPlayerToDimension")); - mInitMap.put(new Pair("func_72358_d", "serverUpdateMountedMovingPlayer")); - mInitMap.put(new Pair("func_72362_j", "loadWhiteList")); - mInitMap.put(new Pair("func_72363_f", "getBannedIPs")); - mInitMap.put(new Pair("func_72364_a", "setPlayerManager")); - mInitMap.put(new Pair("func_72365_p", "getServerInstance")); - mInitMap.put(new Pair("func_72367_e", "playerLoggedOut")); - mInitMap.put(new Pair("func_72368_a", "recreatePlayerEntity")); - mInitMap.put(new Pair("func_72369_d", "getAllUsernames")); - mInitMap.put(new Pair("func_72371_a", "setWhiteListEnabled")); - mInitMap.put(new Pair("func_72372_a", "getEntityViewDistance")); - mInitMap.put(new Pair("func_72373_m", "getAvailablePlayerDat")); - mInitMap.put(new Pair("func_72374_b", "onTick")); - mInitMap.put(new Pair("func_72377_c", "playerLoggedIn")); - mInitMap.put(new Pair("func_72378_q", "getHostPlayerData")); - mInitMap.put(new Pair("func_72380_a", "readPlayerDataFromFile")); - mInitMap.put(new Pair("func_72382_j", "getPlayersMatchingAddress")); - mInitMap.put(new Pair("func_72383_n", "isWhiteListEnabled")); - mInitMap.put(new Pair("func_72385_f", "syncPlayerInventory")); - mInitMap.put(new Pair("func_72387_b", "setCommandsAllowedForAll")); - mInitMap.put(new Pair("func_72389_g", "saveAllPlayerData")); - mInitMap.put(new Pair("func_72391_b", "writePlayerData")); - mInitMap.put(new Pair("func_72392_r", "removeAllPlayers")); - mInitMap.put(new Pair("func_72394_k", "getCurrentPlayerCount")); - mInitMap.put(new Pair("func_72395_o", "getViewDistance")); - mInitMap.put(new Pair("func_72417_t", "loadOpsList")); - mInitMap.put(new Pair("func_72418_v", "readWhiteList")); - mInitMap.put(new Pair("func_72419_u", "saveOpsList")); - mInitMap.put(new Pair("func_72421_w", "saveWhiteList")); - mInitMap.put(new Pair("func_72429_b", "getIntermediateWithXValue")); - mInitMap.put(new Pair("func_72430_b", "dotProduct")); - mInitMap.put(new Pair("func_72431_c", "crossProduct")); - mInitMap.put(new Pair("func_72432_b", "normalize")); - mInitMap.put(new Pair("func_72433_c", "lengthVector")); - mInitMap.put(new Pair("func_72434_d", "getIntermediateWithZValue")); - mInitMap.put(new Pair("func_72435_c", "getIntermediateWithYValue")); - mInitMap.put(new Pair("func_72436_e", "squareDistanceTo")); - mInitMap.put(new Pair("func_72438_d", "distanceTo")); - mInitMap.put(new Pair("func_72439_b", "setComponents")); - mInitMap.put(new Pair("func_72440_a", "rotateAroundX")); - mInitMap.put(new Pair("func_72441_c", "addVector")); - mInitMap.put(new Pair("func_72442_b", "rotateAroundY")); - mInitMap.put(new Pair("func_72443_a", "createVectorHelper")); - mInitMap.put(new Pair("func_72444_a", "subtract")); - mInitMap.put(new Pair("func_72445_d", "squareDistanceTo")); - mInitMap.put(new Pair("func_72446_c", "rotateAroundZ")); - mInitMap.put(new Pair("func_72591_c", "getRequestId")); - mInitMap.put(new Pair("func_72592_a", "getRandomChallenge")); - mInitMap.put(new Pair("func_72593_a", "hasExpired")); - mInitMap.put(new Pair("func_72594_b", "getChallengeValue")); - mInitMap.put(new Pair("func_72601_a", "registerSocket")); - mInitMap.put(new Pair("func_72602_a", "startThread")); - mInitMap.put(new Pair("func_72603_d", "getNumberOfPlayers")); - mInitMap.put(new Pair("func_72604_a", "closeSocket")); - mInitMap.put(new Pair("func_72605_a", "closeServerSocket_do")); - mInitMap.put(new Pair("func_72606_c", "logWarning")); - mInitMap.put(new Pair("func_72607_a", "logDebug")); - mInitMap.put(new Pair("func_72608_b", "closeServerSocket")); - mInitMap.put(new Pair("func_72609_b", "logInfo")); - mInitMap.put(new Pair("func_72610_d", "logSevere")); - mInitMap.put(new Pair("func_72611_e", "closeAllSockets")); - mInitMap.put(new Pair("func_72612_a", "closeAllSockets_do")); - mInitMap.put(new Pair("func_72613_c", "isRunning")); - mInitMap.put(new Pair("func_72620_a", "sendResponsePacket")); - mInitMap.put(new Pair("func_72621_a", "parseIncomingPacket")); - mInitMap.put(new Pair("func_72622_d", "sendAuthChallenge")); - mInitMap.put(new Pair("func_72623_a", "stopWithException")); - mInitMap.put(new Pair("func_72624_b", "createQueryResponse")); - mInitMap.put(new Pair("func_72625_a", "getRequestID")); - mInitMap.put(new Pair("func_72626_g", "initQuerySystem")); - mInitMap.put(new Pair("func_72627_c", "verifyClientAuth")); - mInitMap.put(new Pair("func_72628_f", "cleanQueryClientsMap")); - mInitMap.put(new Pair("func_72645_g", "cleanClientThreadsMap")); - mInitMap.put(new Pair("func_72646_f", "initClientThreadList")); - mInitMap.put(new Pair("func_72653_g", "closeSocket")); - mInitMap.put(new Pair("func_72654_a", "sendResponse")); - mInitMap.put(new Pair("func_72655_a", "sendMultipacketResponse")); - mInitMap.put(new Pair("func_72656_f", "sendLoginFailedResponse")); - mInitMap.put(new Pair("func_72661_a", "getBytesAsString")); - mInitMap.put(new Pair("func_72662_b", "getRemainingBytesAsLEInt")); - mInitMap.put(new Pair("func_72663_a", "getByteAsHexString")); - mInitMap.put(new Pair("func_72664_c", "getBytesAsBEint")); - mInitMap.put(new Pair("func_72665_b", "getBytesAsLEInt")); - mInitMap.put(new Pair("func_72667_a", "writeInt")); - mInitMap.put(new Pair("func_72668_a", "writeShort")); - mInitMap.put(new Pair("func_72669_b", "reset")); - mInitMap.put(new Pair("func_72670_a", "writeByteArray")); - mInitMap.put(new Pair("func_72671_a", "writeString")); - mInitMap.put(new Pair("func_72672_a", "toByteArray")); - mInitMap.put(new Pair("func_72683_a", "addPlayer")); - mInitMap.put(new Pair("func_72684_a", "overlaps")); - mInitMap.put(new Pair("func_72685_d", "updateMountedMovingPlayer")); - mInitMap.put(new Pair("func_72686_a", "getFurthestViewableBlock")); - mInitMap.put(new Pair("func_72688_a", "getMinecraftServer")); - mInitMap.put(new Pair("func_72690_a", "getPlayerInstance")); - mInitMap.put(new Pair("func_72691_b", "filterChunkLoadQueue")); - mInitMap.put(new Pair("func_72693_b", "updatePlayerInstances")); - mInitMap.put(new Pair("func_72694_a", "isPlayerWatchingChunk")); - mInitMap.put(new Pair("func_72695_c", "removePlayer")); - mInitMap.put(new Pair("func_72702_a", "playRecord")); - mInitMap.put(new Pair("func_72703_a", "onEntityCreate")); - mInitMap.put(new Pair("func_72704_a", "playSound")); - mInitMap.put(new Pair("func_72706_a", "playAuxSFX")); - mInitMap.put(new Pair("func_72708_a", "spawnParticle")); - mInitMap.put(new Pair("func_72709_b", "onEntityDestroy")); - mInitMap.put(new Pair("func_72712_a", "loadRenderers")); - mInitMap.put(new Pair("func_72714_a", "renderSky")); - mInitMap.put(new Pair("func_72716_a", "updateRenderers")); - mInitMap.put(new Pair("func_72717_a", "drawBlockDamageTexture")); - mInitMap.put(new Pair("func_72718_b", "renderClouds")); - mInitMap.put(new Pair("func_72719_a", "sortAndRender")); - mInitMap.put(new Pair("func_72720_a", "checkOcclusionQueryResult")); - mInitMap.put(new Pair("func_72721_a", "hasCloudFog")); - mInitMap.put(new Pair("func_72722_c", "markRenderersFormInitMap.put(newPosition")); - mInitMap.put(new Pair("func_72723_d", "getDebugInfoEntities")); - mInitMap.put(new Pair("func_72724_a", "renderSortedRenderers")); - mInitMap.put(new Pair("func_72725_b", "markBlocksForUpdate")); - mInitMap.put(new Pair("func_72726_b", "doSpawnParticle")); - mInitMap.put(new Pair("func_72728_f", "deleteAllDisplayLists")); - mInitMap.put(new Pair("func_72729_a", "clipRenderersByFrustum")); - mInitMap.put(new Pair("func_72730_g", "renderStars")); - mInitMap.put(new Pair("func_72731_b", "drawSelectionBox")); - mInitMap.put(new Pair("func_72732_a", "setWorldAndLoadRenderers")); - mInitMap.put(new Pair("func_72733_a", "renderAllRenderLists")); - mInitMap.put(new Pair("func_72734_e", "updateClouds")); - mInitMap.put(new Pair("func_72735_c", "getDebugInfoRenders")); - mInitMap.put(new Pair("func_72736_c", "renderCloudsFancy")); - mInitMap.put(new Pair("func_72785_a", "addEntityToTracker")); - mInitMap.put(new Pair("func_72786_a", "trackEntity")); - mInitMap.put(new Pair("func_72787_a", "removePlayerFromTrackers")); - mInitMap.put(new Pair("func_72788_a", "updateTrackedEntities")); - mInitMap.put(new Pair("func_72790_b", "untrackEntity")); - mInitMap.put(new Pair("func_72791_a", "trackEntity")); - mInitMap.put(new Pair("func_72800_K", "getHeight")); - mInitMap.put(new Pair("func_72801_o", "getLightBrightness")); - mInitMap.put(new Pair("func_72802_i", "getLightBrightnessForSkyBlocks")); - mInitMap.put(new Pair("func_72805_g", "getBlockMetadata")); - mInitMap.put(new Pair("func_72806_N", "extendedLevelsInChunkCache")); - mInitMap.put(new Pair("func_72807_a", "getBiomeGenForCoords")); - mInitMap.put(new Pair("func_72810_a", "getSkyBlockTypeBrightness")); - mInitMap.put(new Pair("func_72812_b", "getSpecialBlockBrightness")); - mInitMap.put(new Pair("func_72819_i", "getWeightedThunderStrength")); - mInitMap.put(new Pair("func_72820_D", "getWorldTime")); - mInitMap.put(new Pair("func_72823_a", "setItemData")); - mInitMap.put(new Pair("func_72824_f", "getCloudColour")); - mInitMap.put(new Pair("func_72825_h", "getTopSolidOrLiquidBlock")); - mInitMap.put(new Pair("func_72826_c", "getCelestialAngle")); - mInitMap.put(new Pair("func_72827_u", "getProviderName")); - mInitMap.put(new Pair("func_72828_b", "unloadEntities")); - mInitMap.put(new Pair("func_72829_c", "checkBlockCollision")); - mInitMap.put(new Pair("func_72830_b", "isAABBInMaterial")); - mInitMap.put(new Pair("func_72833_a", "getSkyColor")); - mInitMap.put(new Pair("func_72834_c", "canBlockFreeze")); - mInitMap.put(new Pair("func_72835_b", "tick")); - mInitMap.put(new Pair("func_72838_d", "spawnEntityInWorld")); - mInitMap.put(new Pair("func_72839_b", "getEntitiesWithinAABBExcludingEntity")); - mInitMap.put(new Pair("func_72841_b", "getUniqueDataId")); - mInitMap.put(new Pair("func_72842_a", "getBlockDensity")); - mInitMap.put(new Pair("func_72843_D", "setRandomSeed")); - mInitMap.put(new Pair("func_72844_a", "getEntityPathToXYZ")); - mInitMap.put(new Pair("func_72846_b", "getClosestVulnerablePlayer")); - mInitMap.put(new Pair("func_72847_b", "onEntityRemoved")); - mInitMap.put(new Pair("func_72848_b", "removeWorldAccess")); - mInitMap.put(new Pair("func_72849_a", "getBlockLightValue_do")); - mInitMap.put(new Pair("func_72850_v", "isBlockFreezableNaturally")); - mInitMap.put(new Pair("func_72853_d", "getMoonPhase")); - mInitMap.put(new Pair("func_72854_c", "updateAllPlayersSleepingFlag")); - mInitMap.put(new Pair("func_72855_b", "checkNoEntityCollision")); - mInitMap.put(new Pair("func_72856_b", "getClosestVulnerablePlayerToEntity")); - mInitMap.put(new Pair("func_72857_a", "findNearestEntityWithinAABB")); - mInitMap.put(new Pair("func_72860_G", "getSaveHandler")); - mInitMap.put(new Pair("func_72861_E", "getSpawnPoint")); - mInitMap.put(new Pair("func_72863_F", "getChunkProvider")); - mInitMap.put(new Pair("func_72864_z", "isBlockIndirectlyGettingPowered")); - mInitMap.put(new Pair("func_72865_a", "getPathEntityToEntity")); - mInitMap.put(new Pair("func_72866_a", "updateEntityWithOptionalForce")); - mInitMap.put(new Pair("func_72867_j", "getRainStrength")); - mInitMap.put(new Pair("func_72868_a", "addLoadedEntities")); - mInitMap.put(new Pair("func_72869_a", "spawnParticle")); - mInitMap.put(new Pair("func_72870_g", "updateEntity")); - mInitMap.put(new Pair("func_72872_a", "getEntitiesWithinAABB")); - mInitMap.put(new Pair("func_72873_a", "doChunksNearChunkExist")); - mInitMap.put(new Pair("func_72874_g", "getPrecipitationHeight")); - mInitMap.put(new Pair("func_72875_a", "isMaterialInBB")); - mInitMap.put(new Pair("func_72876_a", "createExplosion")); - mInitMap.put(new Pair("func_72877_b", "setWorldTime")); - mInitMap.put(new Pair("func_72878_l", "getIndirectPowerLevelTo")); - mInitMap.put(new Pair("func_72879_k", "isBlockProvidingPowerTo")); - mInitMap.put(new Pair("func_72880_h", "getStarBrightness")); - mInitMap.put(new Pair("func_72882_A", "sendQuittingDisconnectingPacket")); - mInitMap.put(new Pair("func_72883_k", "getFullBlockLightValue")); - mInitMap.put(new Pair("func_72884_u", "isBlockFreezable")); - mInitMap.put(new Pair("func_72885_a", "mInitMap.put(newExplosion")); - mInitMap.put(new Pair("func_72886_a", "extinguishFire")); - mInitMap.put(new Pair("func_72889_a", "playAuxSFXAtEntity")); - mInitMap.put(new Pair("func_72890_a", "getClosestPlayerToEntity")); - mInitMap.put(new Pair("func_72891_a", "setAllowedSpawnTypes")); - mInitMap.put(new Pair("func_72894_k", "setRainStrength")); - mInitMap.put(new Pair("func_72896_J", "isRaining")); - mInitMap.put(new Pair("func_72897_h", "joinEntityInSurroundings")); - mInitMap.put(new Pair("func_72899_e", "blockExists")); - mInitMap.put(new Pair("func_72900_e", "removeEntity")); - mInitMap.put(new Pair("func_72901_a", "rayTraceBlocks")); - mInitMap.put(new Pair("func_72903_x", "setActivePlayerChunksAndCheckLight")); - mInitMap.put(new Pair("func_72904_c", "checkChunksExist")); - mInitMap.put(new Pair("func_72905_C", "getSeed")); - mInitMap.put(new Pair("func_72906_B", "checkSessionLock")); - mInitMap.put(new Pair("func_72907_a", "countEntities")); - mInitMap.put(new Pair("func_72908_a", "playSoundEffect")); - mInitMap.put(new Pair("func_72910_y", "getLoadedEntityList")); - mInitMap.put(new Pair("func_72911_I", "isThundering")); - mInitMap.put(new Pair("func_72912_H", "getWorldInfo")); - mInitMap.put(new Pair("func_72914_a", "addWorldInfoToCrashReport")); - mInitMap.put(new Pair("func_72915_b", "setLightValue")); - mInitMap.put(new Pair("func_72916_c", "chunkExists")); - mInitMap.put(new Pair("func_72917_a", "checkNoEntityCollision")); - mInitMap.put(new Pair("func_72918_a", "handleMaterialAcceleration")); - mInitMap.put(new Pair("func_72919_O", "getHorizon")); - mInitMap.put(new Pair("func_72920_a", "getPendingBlockUpdates")); - mInitMap.put(new Pair("func_72921_c", "setBlockMetadataWithNotify")); - mInitMap.put(new Pair("func_72923_a", "onEntityAdded")); - mInitMap.put(new Pair("func_72924_a", "getPlayerEntityByName")); - mInitMap.put(new Pair("func_72925_a", "getSkyBlockTypeBrightness")); - mInitMap.put(new Pair("func_72926_e", "playAuxSFX")); - mInitMap.put(new Pair("func_72929_e", "getCelestialAngleRadians")); - mInitMap.put(new Pair("func_72933_a", "rayTraceBlocks")); - mInitMap.put(new Pair("func_72934_a", "playRecord")); - mInitMap.put(new Pair("func_72935_r", "isDaytime")); - mInitMap.put(new Pair("func_72937_j", "canBlockSeeTheSky")); - mInitMap.put(new Pair("func_72938_d", "getChunkFromBlockCoords")); - mInitMap.put(new Pair("func_72939_s", "updateEntities")); - mInitMap.put(new Pair("func_72940_L", "getActualHeight")); - mInitMap.put(new Pair("func_72942_c", "addWeatherEffect")); - mInitMap.put(new Pair("func_72943_a", "loadItemData")); - mInitMap.put(new Pair("func_72945_a", "getCollidingBoundingBoxes")); - mInitMap.put(new Pair("func_72947_a", "calculateInitialWeather")); - mInitMap.put(new Pair("func_72948_g", "getFogColor")); - mInitMap.put(new Pair("func_72950_A", "setSpawnLocation")); - mInitMap.put(new Pair("func_72951_B", "isRainingAt")); - mInitMap.put(new Pair("func_72953_d", "isAnyLiquid")); - mInitMap.put(new Pair("func_72954_a", "addWorldAccess")); - mInitMap.put(new Pair("func_72955_a", "tickUpdates")); - mInitMap.put(new Pair("func_72956_a", "playSoundAtEntity")); - mInitMap.put(new Pair("func_72957_l", "getBlockLightValue")); - mInitMap.put(new Pair("func_72958_C", "isBlockHighHumidity")); - mInitMap.put(new Pair("func_72959_q", "getWorldChunkManager")); - mInitMap.put(new Pair("func_72960_a", "setEntityState")); - mInitMap.put(new Pair("func_72962_a", "canMineBlock")); - mInitMap.put(new Pair("func_72963_a", "initialize")); - mInitMap.put(new Pair("func_72964_e", "getChunkFromChunkCoords")); - mInitMap.put(new Pair("func_72966_v", "calculateInitialSkylight")); - mInitMap.put(new Pair("func_72967_a", "calculateSkylightSubtracted")); - mInitMap.put(new Pair("func_72970_h", "createChunkProvider")); - mInitMap.put(new Pair("func_72971_b", "getSunBrightness")); - mInitMap.put(new Pair("func_72972_b", "getSavedLightValue")); - mInitMap.put(new Pair("func_72973_f", "removePlayerEntityDangerously")); - mInitMap.put(new Pair("func_72974_f", "setSpawnLocation")); - mInitMap.put(new Pair("func_72975_g", "markBlocksDirtyVertical")); - mInitMap.put(new Pair("func_72976_f", "getHeightValue")); - mInitMap.put(new Pair("func_72977_a", "getClosestPlayer")); - mInitMap.put(new Pair("func_72979_l", "updateWeather")); - mInitMap.put(new Pair("func_72980_b", "playSound")); - mInitMap.put(new Pair("func_72981_t", "getDebugLoadedEntities")); - mInitMap.put(new Pair("func_73022_a", "removeAllEntities")); - mInitMap.put(new Pair("func_73025_a", "doPreChunk")); - mInitMap.put(new Pair("func_73027_a", "addEntityToWorld")); - mInitMap.put(new Pair("func_73028_b", "removeEntityFromWorld")); - mInitMap.put(new Pair("func_73029_E", "doVoidFogParticles")); - mInitMap.put(new Pair("func_73031_a", "invalidateBlockReceiveRegion")); - mInitMap.put(new Pair("func_73039_n", "getEntityTracker")); - mInitMap.put(new Pair("func_73040_p", "getPlayerManager")); - mInitMap.put(new Pair("func_73041_k", "flush")); - mInitMap.put(new Pair("func_73042_a", "saveLevel")); - mInitMap.put(new Pair("func_73044_a", "saveAllChunks")); - mInitMap.put(new Pair("func_73045_a", "getEntityByID")); - mInitMap.put(new Pair("func_73047_i", "createBonusChest")); - mInitMap.put(new Pair("func_73051_P", "resetRainAndThunder")); - mInitMap.put(new Pair("func_73052_b", "createSpawnPosition")); - mInitMap.put(new Pair("func_73053_d", "wakeAllPlayers")); - mInitMap.put(new Pair("func_73054_j", "getEntrancePortalLocation")); - mInitMap.put(new Pair("func_73056_e", "areAllPlayersAsleep")); - mInitMap.put(new Pair("func_73057_a", "spawnRandomCreature")); - mInitMap.put(new Pair("func_73073_c", "cancelDestroyingBlock")); - mInitMap.put(new Pair("func_73074_a", "onBlockClicked")); - mInitMap.put(new Pair("func_73075_a", "updateBlockRemoving")); - mInitMap.put(new Pair("func_73076_a", "setGameType")); - mInitMap.put(new Pair("func_73077_b", "initializeGameType")); - mInitMap.put(new Pair("func_73078_a", "activateBlockOrUseItem")); - mInitMap.put(new Pair("func_73079_d", "removeBlock")); - mInitMap.put(new Pair("func_73080_a", "setWorld")); - mInitMap.put(new Pair("func_73081_b", "getGameType")); - mInitMap.put(new Pair("func_73082_a", "blockRemoving")); - mInitMap.put(new Pair("func_73083_d", "isCreative")); - mInitMap.put(new Pair("func_73084_b", "tryHarvestBlock")); - mInitMap.put(new Pair("func_73085_a", "tryUseItem")); - mInitMap.put(new Pair("func_73101_e", "sendDemoReminder")); - mInitMap.put(new Pair("func_73106_e", "getPartialBlockDamage")); - mInitMap.put(new Pair("func_73107_a", "setPartialBlockDamage")); - mInitMap.put(new Pair("func_73108_d", "getPartialBlockZ")); - mInitMap.put(new Pair("func_73109_c", "getPartialBlockY")); - mInitMap.put(new Pair("func_73110_b", "getPartialBlockX")); - mInitMap.put(new Pair("func_73117_b", "updatePlayerEntity")); - mInitMap.put(new Pair("func_73118_a", "removeFromTrackedPlayers")); - mInitMap.put(new Pair("func_73119_a", "sendDestroyEntityPacketToTrackedPlayers")); - mInitMap.put(new Pair("func_73121_d", "isPlayerWatchingThisChunk")); - mInitMap.put(new Pair("func_73122_a", "updatePlayerList")); - mInitMap.put(new Pair("func_73123_c", "removeTrackedPlayerSymmetric")); - mInitMap.put(new Pair("func_73125_b", "updatePlayerEntities")); - mInitMap.put(new Pair("func_73148_d", "makeString")); - mInitMap.put(new Pair("func_73149_a", "chunkExists")); - mInitMap.put(new Pair("func_73151_a", "saveChunks")); - mInitMap.put(new Pair("func_73152_e", "getLoadedChunkCount")); - mInitMap.put(new Pair("func_73153_a", "populate")); - mInitMap.put(new Pair("func_73154_d", "provideChunk")); - mInitMap.put(new Pair("func_73155_a", "getPossibleCreatures")); - mInitMap.put(new Pair("func_73156_b", "unloadQueuedChunks")); - mInitMap.put(new Pair("func_73157_c", "canSave")); - mInitMap.put(new Pair("func_73158_c", "loadChunk")); - mInitMap.put(new Pair("func_73164_a", "initializeNoiseField")); - mInitMap.put(new Pair("func_73187_a", "initializeNoiseField")); - mInitMap.put(new Pair("func_73234_b", "unloadChunk")); - mInitMap.put(new Pair("func_73239_e", "loadChunkFromFile")); - mInitMap.put(new Pair("func_73240_a", "unloadAllChunks")); - mInitMap.put(new Pair("func_73241_b", "dropChunk")); - mInitMap.put(new Pair("func_73242_b", "saveChunkData")); - mInitMap.put(new Pair("func_73243_a", "saveChunkExtraData")); - mInitMap.put(new Pair("func_73252_b", "removePlayer")); - mInitMap.put(new Pair("func_73254_a", "onUpdate")); - mInitMap.put(new Pair("func_73255_a", "addPlayer")); - mInitMap.put(new Pair("func_73660_a", "update")); - mInitMap.put(new Pair("func_73665_c", "getPropertiesFile")); - mInitMap.put(new Pair("func_73666_a", "generatemInitMap.put(newProperties")); - mInitMap.put(new Pair("func_73667_a", "setProperty")); - mInitMap.put(new Pair("func_73668_b", "saveProperties")); - mInitMap.put(new Pair("func_73669_a", "getIntProperty")); - mInitMap.put(new Pair("func_73670_a", "getBooleanProperty")); - mInitMap.put(new Pair("func_73671_a", "getStringProperty")); - mInitMap.put(new Pair("func_73680_d", "getBanEndDate")); - mInitMap.put(new Pair("func_73682_e", "hasBanExpired")); - mInitMap.put(new Pair("func_73686_f", "getBanReason")); - mInitMap.put(new Pair("func_73718_a", "setLoadingProgress")); - mInitMap.put(new Pair("func_73719_c", "displayLoadingString")); - mInitMap.put(new Pair("func_73720_a", "displaySavingString")); - mInitMap.put(new Pair("func_73721_b", "resetProgressAndMessage")); - mInitMap.put(new Pair("func_73728_b", "drawVerticalLine")); - mInitMap.put(new Pair("func_73729_b", "drawTexturedModalRect")); - mInitMap.put(new Pair("func_73730_a", "drawHorizontalLine")); - mInitMap.put(new Pair("func_73731_b", "drawString")); - mInitMap.put(new Pair("func_73732_a", "drawCenteredString")); - mInitMap.put(new Pair("func_73733_a", "drawGradientRect")); - mInitMap.put(new Pair("func_73734_a", "drawRect")); - mInitMap.put(new Pair("func_73828_d", "renderBossHealth")); - mInitMap.put(new Pair("func_73829_a", "renderVignette")); - mInitMap.put(new Pair("func_73830_a", "renderGameOverlay")); - mInitMap.put(new Pair("func_73831_a", "updateTick")); - mInitMap.put(new Pair("func_73832_a", "renderInventorySlot")); - mInitMap.put(new Pair("func_73833_a", "setRecordPlayingMessage")); - mInitMap.put(new Pair("func_73834_c", "getUpdateCounter")); - mInitMap.put(new Pair("func_73836_a", "renderPumpkinBlur")); - mInitMap.put(new Pair("func_73863_a", "drawScreen")); - mInitMap.put(new Pair("func_73864_a", "mouseClicked")); - mInitMap.put(new Pair("func_73866_w_", "initGui")); - mInitMap.put(new Pair("func_73868_f", "doesGuiPauseGame")); - mInitMap.put(new Pair("func_73869_a", "keyTyped")); - mInitMap.put(new Pair("func_73876_c", "updateScreen")); - mInitMap.put(new Pair("func_73878_a", "confirmClicked")); - mInitMap.put(new Pair("func_73968_a", "rotateAndBlurSkybox")); - mInitMap.put(new Pair("func_73969_a", "addSingleplayerMultiplayerButtons")); - mInitMap.put(new Pair("func_73970_b", "drawPanorama")); - mInitMap.put(new Pair("func_73971_c", "renderSkybox")); - mInitMap.put(new Pair("func_73972_b", "addDemoButtons")); - mInitMap.put(new Pair("func_74275_a", "updateTimer")); - mInitMap.put(new Pair("func_74290_a", "getTimestampedPNGFileForDirectory")); - mInitMap.put(new Pair("func_74296_a", "getOptionFloatValue")); - mInitMap.put(new Pair("func_74297_c", "getKeyBinding")); - mInitMap.put(new Pair("func_74298_c", "getKeyDisplayString")); - mInitMap.put(new Pair("func_74299_a", "getTranslation")); - mInitMap.put(new Pair("func_74300_a", "loadOptions")); - mInitMap.put(new Pair("func_74303_b", "saveOptions")); - mInitMap.put(new Pair("func_74304_a", "setOptionFloatValue")); - mInitMap.put(new Pair("func_74305_a", "parseFloat")); - mInitMap.put(new Pair("func_74306_a", "setOptionValue")); - mInitMap.put(new Pair("func_74308_b", "getOptionOrdinalValue")); - mInitMap.put(new Pair("func_74309_c", "shouldRenderClouds")); - mInitMap.put(new Pair("func_74371_a", "checkARBOcclusion")); - mInitMap.put(new Pair("func_74372_a", "grabMouseCursor")); - mInitMap.put(new Pair("func_74373_b", "ungrabMouseCursor")); - mInitMap.put(new Pair("func_74374_c", "mouseXYChange")); - mInitMap.put(new Pair("func_74378_d", "getEnumString")); - mInitMap.put(new Pair("func_74379_a", "getEnumOptions")); - mInitMap.put(new Pair("func_74380_a", "getEnumFloat")); - mInitMap.put(new Pair("func_74381_c", "returnEnumOrdinal")); - mInitMap.put(new Pair("func_74382_b", "getEnumBoolean")); - mInitMap.put(new Pair("func_74428_b", "processReceivedPackets")); - mInitMap.put(new Pair("func_74430_c", "getRemoteAddress")); - mInitMap.put(new Pair("func_74505_d", "unpressKey")); - mInitMap.put(new Pair("func_74506_a", "unPressAllKeys")); - mInitMap.put(new Pair("func_74507_a", "onTick")); - mInitMap.put(new Pair("func_74508_b", "resetKeyBindingArrayAndHash")); - mInitMap.put(new Pair("func_74510_a", "setKeyBindState")); - mInitMap.put(new Pair("func_74517_a", "setColorBuffer")); - mInitMap.put(new Pair("func_74518_a", "disableStandardItemLighting")); - mInitMap.put(new Pair("func_74519_b", "enableStandardItemLighting")); - mInitMap.put(new Pair("func_74520_c", "enableGUIStandardItemLighting")); - mInitMap.put(new Pair("func_74521_a", "setColorBuffer")); - mInitMap.put(new Pair("func_74523_b", "deleteDisplayLists")); - mInitMap.put(new Pair("func_74524_c", "createDirectByteBuffer")); - mInitMap.put(new Pair("func_74525_a", "deleteTexturesAndDisplayLists")); - mInitMap.put(new Pair("func_74526_a", "generateDisplayLists")); - mInitMap.put(new Pair("func_74527_f", "createDirectIntBuffer")); - mInitMap.put(new Pair("func_74529_h", "createDirectFloatBuffer")); - mInitMap.put(new Pair("func_74535_a", "formatString")); - mInitMap.put(new Pair("func_74539_c", "getChatLineID")); - mInitMap.put(new Pair("func_74540_b", "getUpdatedCounter")); - mInitMap.put(new Pair("func_74583_a", "updateRenderInfo")); - mInitMap.put(new Pair("func_74585_b", "projectViewFromEntity")); - mInitMap.put(new Pair("func_74732_a", "getId")); - mInitMap.put(new Pair("func_74734_a", "write")); - mInitMap.put(new Pair("func_74737_b", "copy")); - mInitMap.put(new Pair("func_74742_a", "appendTag")); - mInitMap.put(new Pair("func_74744_a", "removeTag")); - mInitMap.put(new Pair("func_74745_c", "tagCount")); - mInitMap.put(new Pair("func_74757_a", "setBoolean")); - mInitMap.put(new Pair("func_74759_k", "getIntArray")); - mInitMap.put(new Pair("func_74760_g", "getFloat")); - mInitMap.put(new Pair("func_74762_e", "getInteger")); - mInitMap.put(new Pair("func_74763_f", "getLong")); - mInitMap.put(new Pair("func_74764_b", "hasKey")); - mInitMap.put(new Pair("func_74765_d", "getShort")); - mInitMap.put(new Pair("func_74767_n", "getBoolean")); - mInitMap.put(new Pair("func_74768_a", "setInteger")); - mInitMap.put(new Pair("func_74769_h", "getDouble")); - mInitMap.put(new Pair("func_74770_j", "getByteArray")); - mInitMap.put(new Pair("func_74771_c", "getByte")); - mInitMap.put(new Pair("func_74772_a", "setLong")); - mInitMap.put(new Pair("func_74773_a", "setByteArray")); - mInitMap.put(new Pair("func_74774_a", "setByte")); - mInitMap.put(new Pair("func_74775_l", "getCompoundTag")); - mInitMap.put(new Pair("func_74776_a", "setFloat")); - mInitMap.put(new Pair("func_74777_a", "setShort")); - mInitMap.put(new Pair("func_74778_a", "setString")); - mInitMap.put(new Pair("func_74779_i", "getString")); - mInitMap.put(new Pair("func_74780_a", "setDouble")); - mInitMap.put(new Pair("func_74781_a", "getTag")); - mInitMap.put(new Pair("func_74782_a", "setTag")); - mInitMap.put(new Pair("func_74783_a", "setIntArray")); - mInitMap.put(new Pair("func_74793_a", "safeWrite")); - mInitMap.put(new Pair("func_74794_a", "read")); - mInitMap.put(new Pair("func_74795_b", "write")); - mInitMap.put(new Pair("func_74796_a", "readCompressed")); - mInitMap.put(new Pair("func_74797_a", "read")); - mInitMap.put(new Pair("func_74798_a", "compress")); - mInitMap.put(new Pair("func_74799_a", "writeCompressed")); - mInitMap.put(new Pair("func_74800_a", "write")); - mInitMap.put(new Pair("func_74803_a", "translateKeyFormat")); - mInitMap.put(new Pair("func_74805_b", "translateKey")); - mInitMap.put(new Pair("func_74808_a", "getInstance")); - mInitMap.put(new Pair("func_74837_a", "translateToLocalFormatted")); - mInitMap.put(new Pair("func_74838_a", "translateToLocal")); - mInitMap.put(new Pair("func_74844_a", "getErrorOjbects")); - mInitMap.put(new Pair("func_74860_a", "isLiquidInStructureBoundingBox")); - mInitMap.put(new Pair("func_74861_a", "buildComponent")); - mInitMap.put(new Pair("func_74862_a", "getYWithOffset")); - mInitMap.put(new Pair("func_74865_a", "getXWithOffset")); - mInitMap.put(new Pair("func_74869_a", "generateStructureDispenserContents")); - mInitMap.put(new Pair("func_74871_b", "clearCurrentPositionBlocksUpwards")); - mInitMap.put(new Pair("func_74873_b", "getZWithOffset")); - mInitMap.put(new Pair("func_74874_b", "getBoundingBox")); - mInitMap.put(new Pair("func_74875_a", "addComponentParts")); - mInitMap.put(new Pair("func_74877_c", "getComponentType")); - mInitMap.put(new Pair("func_74878_a", "fillWithAir")); - mInitMap.put(new Pair("func_74879_a", "generateStructureChestContents")); - mInitMap.put(new Pair("func_74881_a", "placeDoorAtCurrentPosition")); - mInitMap.put(new Pair("func_74882_a", "fillWithRandomizedBlocks")); - mInitMap.put(new Pair("func_74883_a", "findIntersecting")); - mInitMap.put(new Pair("func_74888_b", "getVillagerType")); - mInitMap.put(new Pair("func_74889_b", "getAverageGroundLevel")); - mInitMap.put(new Pair("func_74891_a", "getNextComponentNN")); - mInitMap.put(new Pair("func_74893_a", "spawnVillagers")); - mInitMap.put(new Pair("func_74894_b", "getNextComponentPP")); - mInitMap.put(new Pair("func_74895_a", "canVillageGoDeeper")); - mInitMap.put(new Pair("func_74925_d", "getWorldChunkManager")); - mInitMap.put(new Pair("func_74950_a", "findValidPlacement")); - mInitMap.put(new Pair("func_74951_a", "findValidPlacement")); - mInitMap.put(new Pair("func_74954_a", "findValidPlacement")); - mInitMap.put(new Pair("func_74959_a", "getNextComponent")); - mInitMap.put(new Pair("func_74960_a", "getTotalWeight")); - mInitMap.put(new Pair("func_74961_b", "getNextComponentX")); - mInitMap.put(new Pair("func_74962_a", "getNextComponent")); - mInitMap.put(new Pair("func_74963_a", "getNextComponentNormal")); - mInitMap.put(new Pair("func_74964_a", "isAboveGround")); - mInitMap.put(new Pair("func_74965_c", "getNextComponentZ")); - mInitMap.put(new Pair("func_74966_a", "createValidComponent")); - mInitMap.put(new Pair("func_74973_a", "createValidComponent")); - mInitMap.put(new Pair("func_74974_a", "createValidComponent")); - mInitMap.put(new Pair("func_74975_a", "createValidComponent")); - mInitMap.put(new Pair("func_74977_a", "createValidComponent")); - mInitMap.put(new Pair("func_74978_a", "createValidComponent")); - mInitMap.put(new Pair("func_74979_a", "createValidComponent")); - mInitMap.put(new Pair("func_74980_a", "createValidComponent")); - mInitMap.put(new Pair("func_74981_a", "createValidComponent")); - mInitMap.put(new Pair("func_74982_a", "createValidComponent")); - mInitMap.put(new Pair("func_74983_a", "createValidComponent")); - mInitMap.put(new Pair("func_74984_a", "createValidComponent")); - mInitMap.put(new Pair("func_74985_a", "createValidComponent")); - mInitMap.put(new Pair("func_74986_a", "getNextComponentNormal")); - mInitMap.put(new Pair("func_74987_c", "getNextComponentZ")); - mInitMap.put(new Pair("func_74988_a", "getRandomDoor")); - mInitMap.put(new Pair("func_74989_b", "getNextComponentX")); - mInitMap.put(new Pair("func_74990_a", "placeDoor")); - mInitMap.put(new Pair("func_74991_a", "canStrongholdGoDeeper")); - mInitMap.put(new Pair("func_74994_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75000_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75004_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75006_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75010_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75012_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75016_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75018_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75022_a", "getStrongholdStairsComponent")); - mInitMap.put(new Pair("func_75028_a", "findValidPlacement")); - mInitMap.put(new Pair("func_75047_a", "canSpawnStructureAtCoords")); - mInitMap.put(new Pair("func_75048_a", "hasStructureAt")); - mInitMap.put(new Pair("func_75049_b", "getStructureStart")); - mInitMap.put(new Pair("func_75051_a", "generateStructuresInChunk")); - mInitMap.put(new Pair("func_75052_o_", "getCoordList")); - mInitMap.put(new Pair("func_75059_a", "getSpawnList")); - mInitMap.put(new Pair("func_75062_a", "selectBlocks")); - mInitMap.put(new Pair("func_75064_b", "getSelectedBlockMetaData")); - mInitMap.put(new Pair("func_75067_a", "markAvailableHeight")); - mInitMap.put(new Pair("func_75068_a", "generateStructure")); - mInitMap.put(new Pair("func_75069_d", "isSizeableStructure")); - mInitMap.put(new Pair("func_75070_a", "setRandomHeight")); - mInitMap.put(new Pair("func_75071_a", "getBoundingBox")); - mInitMap.put(new Pair("func_75072_c", "updateBoundingBox")); - mInitMap.put(new Pair("func_75073_b", "getComponents")); - mInitMap.put(new Pair("func_75077_d", "getNextVillageStructureComponent")); - mInitMap.put(new Pair("func_75080_e", "getNextComponentVillagePath")); - mInitMap.put(new Pair("func_75081_c", "getNextVillageComponent")); - mInitMap.put(new Pair("func_75084_a", "getStructureVillageWeightedPieceList")); - mInitMap.put(new Pair("func_75085_a", "canSpawnMoreVillagePiecesOfType")); - mInitMap.put(new Pair("func_75086_a", "canSpawnMoreVillagePieces")); - mInitMap.put(new Pair("func_75091_a", "writeCapabilitiesToNBT")); - mInitMap.put(new Pair("func_75092_a", "setFlySpeed")); - mInitMap.put(new Pair("func_75093_a", "getFlySpeed")); - mInitMap.put(new Pair("func_75094_b", "getWalkSpeed")); - mInitMap.put(new Pair("func_75095_b", "readCapabilitiesFromNBT")); - mInitMap.put(new Pair("func_75112_a", "readNBT")); - mInitMap.put(new Pair("func_75113_a", "addExhaustion")); - mInitMap.put(new Pair("func_75114_a", "setFoodLevel")); - mInitMap.put(new Pair("func_75115_e", "getSaturationLevel")); - mInitMap.put(new Pair("func_75116_a", "getFoodLevel")); - mInitMap.put(new Pair("func_75117_b", "writeNBT")); - mInitMap.put(new Pair("func_75118_a", "onUpdate")); - mInitMap.put(new Pair("func_75119_b", "setFoodSaturationLevel")); - mInitMap.put(new Pair("func_75120_b", "getPrevFoodLevel")); - mInitMap.put(new Pair("func_75121_c", "needFood")); - mInitMap.put(new Pair("func_75122_a", "addStats")); - mInitMap.put(new Pair("func_75128_a", "setCanCraft")); - mInitMap.put(new Pair("func_75129_b", "getCanCraft")); - mInitMap.put(new Pair("func_75130_a", "onCraftMatrixChanged")); - mInitMap.put(new Pair("func_75131_a", "putStacksInSlots")); - mInitMap.put(new Pair("func_75132_a", "onCraftGuiOpened")); - mInitMap.put(new Pair("func_75133_b", "retrySlotClick")); - mInitMap.put(new Pair("func_75134_a", "onContainerClosed")); - mInitMap.put(new Pair("func_75135_a", "mergeItemStack")); - mInitMap.put(new Pair("func_75136_a", "getNextTransactionID")); - mInitMap.put(new Pair("func_75137_b", "updateProgressBar")); - mInitMap.put(new Pair("func_75138_a", "getInventory")); - mInitMap.put(new Pair("func_75139_a", "getSlot")); - mInitMap.put(new Pair("func_75140_a", "enchantItem")); - mInitMap.put(new Pair("func_75141_a", "putStackInSlot")); - mInitMap.put(new Pair("func_75142_b", "detectAndSendChanges")); - mInitMap.put(new Pair("func_75144_a", "slotClick")); - mInitMap.put(new Pair("func_75145_c", "canInteractWith")); - mInitMap.put(new Pair("func_75146_a", "addSlotToContainer")); - mInitMap.put(new Pair("func_75147_a", "getSlotFromInventory")); - mInitMap.put(new Pair("func_75174_d", "getMerchantInventory")); - mInitMap.put(new Pair("func_75175_c", "setCurrentRecipeIndex")); - mInitMap.put(new Pair("func_75189_a", "canSpawnMoreStructuresOfType")); - mInitMap.put(new Pair("func_75190_a", "canSpawnMoreStructures")); - mInitMap.put(new Pair("func_75196_c", "getNextValidComponent")); - mInitMap.put(new Pair("func_75198_a", "prepareStructurePieces")); - mInitMap.put(new Pair("func_75200_a", "getStrongholdComponentFromWeightedPiece")); - mInitMap.put(new Pair("func_75201_b", "getNextComponent")); - mInitMap.put(new Pair("func_75202_c", "canAddStructurePieces")); - mInitMap.put(new Pair("func_75208_c", "onCrafting")); - mInitMap.put(new Pair("func_75209_a", "decrStackSize")); - mInitMap.put(new Pair("func_75210_a", "onCrafting")); - mInitMap.put(new Pair("func_75211_c", "getStack")); - mInitMap.put(new Pair("func_75212_b", "getBackgroundIconIndex")); - mInitMap.put(new Pair("func_75214_a", "isItemValid")); - mInitMap.put(new Pair("func_75215_d", "putStack")); - mInitMap.put(new Pair("func_75216_d", "getHasStack")); - mInitMap.put(new Pair("func_75217_a", "isHere")); - mInitMap.put(new Pair("func_75218_e", "onSlotChanged")); - mInitMap.put(new Pair("func_75219_a", "getSlotStackLimit")); - mInitMap.put(new Pair("func_75220_a", "onSlotChange")); - mInitMap.put(new Pair("func_75230_a", "doTrade")); - mInitMap.put(new Pair("func_75243_a_", "canHoldPotion")); - mInitMap.put(new Pair("func_75246_d", "updateTask")); - mInitMap.put(new Pair("func_75247_h", "getMutexBits")); - mInitMap.put(new Pair("func_75248_a", "setMutexBits")); - mInitMap.put(new Pair("func_75249_e", "startExecuting")); - mInitMap.put(new Pair("func_75250_a", "shouldExecute")); - mInitMap.put(new Pair("func_75251_c", "resetTask")); - mInitMap.put(new Pair("func_75252_g", "isInterruptible")); - mInitMap.put(new Pair("func_75253_b", "continueExecuting")); - mInitMap.put(new Pair("func_75270_a", "setSitting")); - mInitMap.put(new Pair("func_75277_f", "isRunning")); - mInitMap.put(new Pair("func_75295_a", "canEasilyReach")); - mInitMap.put(new Pair("func_75296_a", "isSuitableTarget")); - mInitMap.put(new Pair("func_75366_f", "findPossibleShelter")); - mInitMap.put(new Pair("func_75382_a", "hasPlayerGotBoneInHand")); - mInitMap.put(new Pair("func_75388_i", "spawnBaby")); - mInitMap.put(new Pair("func_75389_f", "getNearbyMate")); - mInitMap.put(new Pair("func_75446_f", "checkSufficientDoorsPresentFormInitMap.put(newVillager")); - mInitMap.put(new Pair("func_75447_i", "giveBirth")); - mInitMap.put(new Pair("func_75461_b", "findRandomTargetBlockAwayFrom")); - mInitMap.put(new Pair("func_75462_c", "findRandomTargetBlock")); - mInitMap.put(new Pair("func_75463_a", "findRandomTarget")); - mInitMap.put(new Pair("func_75464_a", "findRandomTargetBlockTowards")); - mInitMap.put(new Pair("func_75466_d", "resetDoorOpeningRestrictionCounter")); - mInitMap.put(new Pair("func_75467_a", "isInside")); - mInitMap.put(new Pair("func_75468_f", "getDoorOpeningRestrictionCounter")); - mInitMap.put(new Pair("func_75469_c", "getInsideDistanceSquare")); - mInitMap.put(new Pair("func_75470_e", "incrementDoorOpeningRestrictionCounter")); - mInitMap.put(new Pair("func_75471_a", "getInsidePosX")); - mInitMap.put(new Pair("func_75472_c", "getInsidePosZ")); - mInitMap.put(new Pair("func_75473_b", "getInsidePosY")); - mInitMap.put(new Pair("func_75474_b", "getDistanceSquared")); - mInitMap.put(new Pair("func_75483_a", "isSafeToStandAt")); - mInitMap.put(new Pair("func_75484_a", "setPath")); - mInitMap.put(new Pair("func_75485_k", "canNavigate")); - mInitMap.put(new Pair("func_75486_a", "getAvoidsWater")); - mInitMap.put(new Pair("func_75487_m", "removeSunnyPath")); - mInitMap.put(new Pair("func_75488_a", "getPathToXYZ")); - mInitMap.put(new Pair("func_75489_a", "setSpeed")); - mInitMap.put(new Pair("func_75490_c", "setEnterDoors")); - mInitMap.put(new Pair("func_75491_a", "setAvoidsWater")); - mInitMap.put(new Pair("func_75492_a", "tryMoveToXYZ")); - mInitMap.put(new Pair("func_75493_a", "isDirectPathBetweenPoints")); - mInitMap.put(new Pair("func_75494_a", "getPathToEntityLiving")); - mInitMap.put(new Pair("func_75495_e", "setCanSwim")); - mInitMap.put(new Pair("func_75496_b", "isPositionClear")); - mInitMap.put(new Pair("func_75497_a", "tryMoveToEntityLiving")); - mInitMap.put(new Pair("func_75498_b", "setBreakDoors")); - mInitMap.put(new Pair("func_75499_g", "clearPathEntity")); - mInitMap.put(new Pair("func_75500_f", "noPath")); - mInitMap.put(new Pair("func_75501_e", "onUpdateNavigation")); - mInitMap.put(new Pair("func_75502_i", "getEntityPosition")); - mInitMap.put(new Pair("func_75503_j", "getPathableYPos")); - mInitMap.put(new Pair("func_75504_d", "setAvoidSun")); - mInitMap.put(new Pair("func_75505_d", "getPath")); - mInitMap.put(new Pair("func_75506_l", "isInLiquid")); - mInitMap.put(new Pair("func_75507_c", "getCanBreakDoors")); - mInitMap.put(new Pair("func_75508_h", "pathFollow")); - mInitMap.put(new Pair("func_75522_a", "canSee")); - mInitMap.put(new Pair("func_75523_a", "clearSensingCache")); - mInitMap.put(new Pair("func_75528_a", "tick")); - mInitMap.put(new Pair("func_75530_c", "spawnZombie")); - mInitMap.put(new Pair("func_75540_b", "getVillageList")); - mInitMap.put(new Pair("func_75541_e", "isWoodenDoorAt")); - mInitMap.put(new Pair("func_75542_c", "addDoorTomInitMap.put(newListIfAppropriate")); - mInitMap.put(new Pair("func_75543_d", "dropOldestVillagerPosition")); - mInitMap.put(new Pair("func_75544_a", "tick")); - mInitMap.put(new Pair("func_75545_e", "addmInitMap.put(newDoorsToVillageOrCreateVillage")); - mInitMap.put(new Pair("func_75546_a", "addUnassignedWoodenDoorsAroundTomInitMap.put(newDoorsList")); - mInitMap.put(new Pair("func_75547_b", "getVillageDoorAt")); - mInitMap.put(new Pair("func_75548_d", "isVillagerPositionPresent")); - mInitMap.put(new Pair("func_75549_c", "removeAnnihilatedVillages")); - mInitMap.put(new Pair("func_75550_a", "findNearestVillage")); - mInitMap.put(new Pair("func_75551_a", "addVillagerPosition")); - mInitMap.put(new Pair("func_75557_k", "removeDeadAndOutOfRangeDoors")); - mInitMap.put(new Pair("func_75558_f", "getVillageDoorInfoList")); - mInitMap.put(new Pair("func_75559_a", "tryGetIronGolemSpawningLocation")); - mInitMap.put(new Pair("func_75560_a", "tick")); - mInitMap.put(new Pair("func_75561_d", "getTicksSinceLastDoorAdding")); - mInitMap.put(new Pair("func_75562_e", "getNumVillagers")); - mInitMap.put(new Pair("func_75563_b", "isValidIronGolemSpawningLocation")); - mInitMap.put(new Pair("func_75564_b", "findNearestDoor")); - mInitMap.put(new Pair("func_75565_j", "removeDeadAndOldAgressors")); - mInitMap.put(new Pair("func_75566_g", "isAnnihilated")); - mInitMap.put(new Pair("func_75567_c", "getNumVillageDoors")); - mInitMap.put(new Pair("func_75568_b", "getVillageRadius")); - mInitMap.put(new Pair("func_75569_c", "findNearestDoorUnrestricted")); - mInitMap.put(new Pair("func_75570_a", "isInRange")); - mInitMap.put(new Pair("func_75571_b", "findNearestVillageAggressor")); - mInitMap.put(new Pair("func_75572_i", "updateNumVillagers")); - mInitMap.put(new Pair("func_75573_l", "updateVillageRadiusAndCenter")); - mInitMap.put(new Pair("func_75574_f", "isBlockDoor")); - mInitMap.put(new Pair("func_75575_a", "addOrRemInitMap.put(newAgressor")); - mInitMap.put(new Pair("func_75576_a", "addVillageDoorInfo")); - mInitMap.put(new Pair("func_75577_a", "getCenter")); - mInitMap.put(new Pair("func_75578_e", "getVillageDoorAt")); - mInitMap.put(new Pair("func_75579_h", "updateNumIronGolems")); - mInitMap.put(new Pair("func_75598_a", "getCreatureClass")); - mInitMap.put(new Pair("func_75599_d", "getPeacefulCreature")); - mInitMap.put(new Pair("func_75600_c", "getCreatureMaterial")); - mInitMap.put(new Pair("func_75601_b", "getMaxNumberOfCreature")); - mInitMap.put(new Pair("func_75614_a", "addMapping")); - mInitMap.put(new Pair("func_75615_a", "createEntityFromNBT")); - mInitMap.put(new Pair("func_75616_a", "createEntityByID")); - mInitMap.put(new Pair("func_75617_a", "getStringFromID")); - mInitMap.put(new Pair("func_75618_a", "addMapping")); - mInitMap.put(new Pair("func_75619_a", "getEntityID")); - mInitMap.put(new Pair("func_75620_a", "createEntityByName")); - mInitMap.put(new Pair("func_75621_b", "getEntityString")); - mInitMap.put(new Pair("func_75630_a", "multiplyBy32AndRound")); - mInitMap.put(new Pair("func_75638_b", "getSpeed")); - mInitMap.put(new Pair("func_75639_a", "limitAngle")); - mInitMap.put(new Pair("func_75640_a", "isUpdating")); - mInitMap.put(new Pair("func_75641_c", "onUpdateMoveHelper")); - mInitMap.put(new Pair("func_75642_a", "setMoveTo")); - mInitMap.put(new Pair("func_75649_a", "onUpdateLook")); - mInitMap.put(new Pair("func_75650_a", "setLookPosition")); - mInitMap.put(new Pair("func_75651_a", "setLookPositionWithEntity")); - mInitMap.put(new Pair("func_75652_a", "updateRotation")); - mInitMap.put(new Pair("func_75660_a", "setJumping")); - mInitMap.put(new Pair("func_75661_b", "doJump")); - mInitMap.put(new Pair("func_75664_a", "updateRenderAngles")); - mInitMap.put(new Pair("func_75665_a", "computeAngleWithBound")); - mInitMap.put(new Pair("func_75669_b", "getObject")); - mInitMap.put(new Pair("func_75670_d", "isWatched")); - mInitMap.put(new Pair("func_75671_a", "setWatched")); - mInitMap.put(new Pair("func_75672_a", "getDataValueId")); - mInitMap.put(new Pair("func_75673_a", "setObject")); - mInitMap.put(new Pair("func_75674_c", "getObjectType")); - mInitMap.put(new Pair("func_75679_c", "getWatchableObjectInt")); - mInitMap.put(new Pair("func_75681_e", "getWatchableObjectString")); - mInitMap.put(new Pair("func_75682_a", "addObject")); - mInitMap.put(new Pair("func_75683_a", "getWatchableObjectByte")); - mInitMap.put(new Pair("func_75684_a", "hasObjectChanged")); - mInitMap.put(new Pair("func_75685_c", "getAllWatched")); - mInitMap.put(new Pair("func_75687_a", "updateWatchedObjectsFromList")); - mInitMap.put(new Pair("func_75688_b", "getChanged")); - mInitMap.put(new Pair("func_75691_i", "getWatchedObject")); - mInitMap.put(new Pair("func_75692_b", "updateObject")); - mInitMap.put(new Pair("func_75693_b", "getWatchableObjectShort")); - mInitMap.put(new Pair("func_75734_a", "waitForFinish")); - mInitMap.put(new Pair("func_75735_a", "queueIO")); - mInitMap.put(new Pair("func_75736_b", "processQueue")); - mInitMap.put(new Pair("func_75742_a", "loadData")); - mInitMap.put(new Pair("func_75743_a", "getUniqueDataId")); - mInitMap.put(new Pair("func_75744_a", "saveAllData")); - mInitMap.put(new Pair("func_75745_a", "setData")); - mInitMap.put(new Pair("func_75746_b", "loadIdCounts")); - mInitMap.put(new Pair("func_75747_a", "saveData")); - mInitMap.put(new Pair("func_75752_b", "readPlayerData")); - mInitMap.put(new Pair("func_75753_a", "writePlayerData")); - mInitMap.put(new Pair("func_75754_f", "getAvailablePlayerDat")); - mInitMap.put(new Pair("func_75755_a", "saveWorldInfoWithPlayer")); - mInitMap.put(new Pair("func_75756_e", "getPlayerNBTManager")); - mInitMap.put(new Pair("func_75757_d", "loadWorldInfo")); - mInitMap.put(new Pair("func_75758_b", "getMapFileFromName")); - mInitMap.put(new Pair("func_75759_a", "flush")); - mInitMap.put(new Pair("func_75760_g", "getWorldDirectoryName")); - mInitMap.put(new Pair("func_75761_a", "saveWorldInfo")); - mInitMap.put(new Pair("func_75762_c", "checkSessionLock")); - mInitMap.put(new Pair("func_75763_a", "getChunkLoader")); - mInitMap.put(new Pair("func_75765_b", "getWorldDirectory")); - mInitMap.put(new Pair("func_75766_h", "setSessionLock")); - mInitMap.put(new Pair("func_75773_a", "canContinue")); - mInitMap.put(new Pair("func_75774_a", "onUpdateTasks")); - mInitMap.put(new Pair("func_75775_b", "canUse")); - mInitMap.put(new Pair("func_75776_a", "addTask")); - mInitMap.put(new Pair("func_75777_a", "areTasksCompatible")); - mInitMap.put(new Pair("func_75783_h", "getCheatsEnabled")); - mInitMap.put(new Pair("func_75784_e", "getLastTimePlayed")); - mInitMap.put(new Pair("func_75785_d", "requiresConversion")); - mInitMap.put(new Pair("func_75786_a", "getFileName")); - mInitMap.put(new Pair("func_75788_b", "getDisplayName")); - mInitMap.put(new Pair("func_75789_g", "isHardcoreModeEnabled")); - mInitMap.put(new Pair("func_75790_f", "getEnumGameType")); - mInitMap.put(new Pair("func_75799_b", "getSaveList")); - mInitMap.put(new Pair("func_75800_d", "flushCache")); - mInitMap.put(new Pair("func_75801_b", "isOldMapFormat")); - mInitMap.put(new Pair("func_75802_e", "deleteWorldDirectory")); - mInitMap.put(new Pair("func_75803_c", "getWorldInfo")); - mInitMap.put(new Pair("func_75804_a", "getSaveLoader")); - mInitMap.put(new Pair("func_75805_a", "convertMapFormat")); - mInitMap.put(new Pair("func_75806_a", "renameWorld")); - mInitMap.put(new Pair("func_75807_a", "deleteFiles")); - mInitMap.put(new Pair("func_75809_f", "createFile")); - mInitMap.put(new Pair("func_75810_a", "addRegionFilesToCollection")); - mInitMap.put(new Pair("func_75811_a", "convertChunks")); - mInitMap.put(new Pair("func_75812_c", "getSaveVersion")); - mInitMap.put(new Pair("func_75813_a", "convertFile")); - mInitMap.put(new Pair("func_75814_c", "writeNextIO")); - mInitMap.put(new Pair("func_75815_a", "loadChunk")); - mInitMap.put(new Pair("func_75816_a", "saveChunk")); - mInitMap.put(new Pair("func_75817_a", "chunkTick")); - mInitMap.put(new Pair("func_75818_b", "saveExtraData")); - mInitMap.put(new Pair("func_75819_b", "saveExtraChunkData")); - mInitMap.put(new Pair("func_75820_a", "writeChunkToNBT")); - mInitMap.put(new Pair("func_75821_a", "writeChunkNBTTags")); - mInitMap.put(new Pair("func_75822_a", "checkedReadChunkFromNBT")); - mInitMap.put(new Pair("func_75823_a", "readChunkFromNBT")); - mInitMap.put(new Pair("func_75824_a", "addChunkToPending")); - mInitMap.put(new Pair("func_75829_a", "distanceTo")); - mInitMap.put(new Pair("func_75830_a", "makeHash")); - mInitMap.put(new Pair("func_75831_a", "isAssigned")); - mInitMap.put(new Pair("func_75832_b", "distanceToSquared")); - mInitMap.put(new Pair("func_75843_a", "format")); - mInitMap.put(new Pair("func_75844_c", "dequeue")); - mInitMap.put(new Pair("func_75845_e", "isPathEmpty")); - mInitMap.put(new Pair("func_75846_b", "sortForward")); - mInitMap.put(new Pair("func_75847_a", "sortBack")); - mInitMap.put(new Pair("func_75848_a", "clearPath")); - mInitMap.put(new Pair("func_75849_a", "addPoint")); - mInitMap.put(new Pair("func_75850_a", "changeDistance")); - mInitMap.put(new Pair("func_75853_a", "createEntityPath")); - mInitMap.put(new Pair("func_75854_a", "openPoint")); - mInitMap.put(new Pair("func_75855_a", "canEntityStandAt")); - mInitMap.put(new Pair("func_75856_a", "createEntityPathTo")); - mInitMap.put(new Pair("func_75857_a", "createEntityPathTo")); - mInitMap.put(new Pair("func_75858_a", "getSafePoint")); - mInitMap.put(new Pair("func_75859_a", "createEntityPathTo")); - mInitMap.put(new Pair("func_75860_b", "findPathOptions")); - mInitMap.put(new Pair("func_75861_a", "addToPath")); - mInitMap.put(new Pair("func_75870_c", "getFinalPathPoint")); - mInitMap.put(new Pair("func_75871_b", "setCurrentPathLength")); - mInitMap.put(new Pair("func_75872_c", "setCurrentPathIndex")); - mInitMap.put(new Pair("func_75873_e", "getCurrentPathIndex")); - mInitMap.put(new Pair("func_75874_d", "getCurrentPathLength")); - mInitMap.put(new Pair("func_75875_a", "incrementPathIndex")); - mInitMap.put(new Pair("func_75876_a", "isSamePath")); - mInitMap.put(new Pair("func_75877_a", "getPathPointFromIndex")); - mInitMap.put(new Pair("func_75878_a", "getPosition")); - mInitMap.put(new Pair("func_75879_b", "isFinished")); - mInitMap.put(new Pair("func_75880_b", "isDestinationSame")); - mInitMap.put(new Pair("func_75881_a", "getVectorFromIndex")); - mInitMap.put(new Pair("func_75885_a", "cipherOperation")); - mInitMap.put(new Pair("func_75886_a", "createTheCipherInstance")); - mInitMap.put(new Pair("func_75887_a", "decryptSharedKey")); - mInitMap.put(new Pair("func_75889_b", "decryptData")); - mInitMap.put(new Pair("func_75890_a", "createmInitMap.put(newSharedKey")); - mInitMap.put(new Pair("func_75891_b", "generateKeyPair")); - mInitMap.put(new Pair("func_75893_a", "digestOperation")); - mInitMap.put(new Pair("func_75894_a", "encryptData")); - mInitMap.put(new Pair("func_75895_a", "getServerIdHash")); - mInitMap.put(new Pair("func_75896_a", "decodePublicKey")); - mInitMap.put(new Pair("func_75901_a", "initializeAllBiomeGenerators")); - mInitMap.put(new Pair("func_75902_a", "nextInt")); - mInitMap.put(new Pair("func_75903_a", "initChunkSeed")); - mInitMap.put(new Pair("func_75904_a", "getInts")); - mInitMap.put(new Pair("func_75905_a", "initWorldGenSeed")); - mInitMap.put(new Pair("func_75915_a", "magnify")); - mInitMap.put(new Pair("func_75918_d", "initCraftableStats")); - mInitMap.put(new Pair("func_75924_a", "replaceAllSimilarBlocks")); - mInitMap.put(new Pair("func_75925_c", "initStats")); - mInitMap.put(new Pair("func_75966_h", "initIndependentStat")); - mInitMap.put(new Pair("func_75967_d", "isAchievement")); - mInitMap.put(new Pair("func_75971_g", "registerStat")); - mInitMap.put(new Pair("func_75984_f", "getSpecial")); - mInitMap.put(new Pair("func_75987_b", "setSpecial")); - mInitMap.put(new Pair("func_75988_a", "setStatStringFormatter")); - mInitMap.put(new Pair("func_75989_e", "getDescription")); - mInitMap.put(new Pair("func_75997_a", "init")); - mInitMap.put(new Pair("func_76030_b", "getValue")); - mInitMap.put(new Pair("func_76031_a", "getHash")); - mInitMap.put(new Pair("func_76036_e", "removeEntry")); - mInitMap.put(new Pair("func_76037_b", "containsItem")); - mInitMap.put(new Pair("func_76038_a", "addKey")); - mInitMap.put(new Pair("func_76040_a", "insert")); - mInitMap.put(new Pair("func_76041_a", "lookup")); - mInitMap.put(new Pair("func_76043_a", "getSlotIndex")); - mInitMap.put(new Pair("func_76044_g", "computeHash")); - mInitMap.put(new Pair("func_76045_c", "lookupEntry")); - mInitMap.put(new Pair("func_76046_c", "clearMap")); - mInitMap.put(new Pair("func_76047_h", "grow")); - mInitMap.put(new Pair("func_76048_a", "copyTo")); - mInitMap.put(new Pair("func_76049_d", "removeObject")); - mInitMap.put(new Pair("func_76056_b", "setSpawnY")); - mInitMap.put(new Pair("func_76057_l", "getLastTimePlayed")); - mInitMap.put(new Pair("func_76058_a", "setSpawnX")); - mInitMap.put(new Pair("func_76059_o", "isRaining")); - mInitMap.put(new Pair("func_76060_a", "setGameType")); - mInitMap.put(new Pair("func_76061_m", "isThundering")); - mInitMap.put(new Pair("func_76062_a", "setWorldName")); - mInitMap.put(new Pair("func_76063_b", "getSeed")); - mInitMap.put(new Pair("func_76064_a", "updateTagCompound")); - mInitMap.put(new Pair("func_76065_j", "getWorldName")); - mInitMap.put(new Pair("func_76066_a", "getNBTTagCompound")); - mInitMap.put(new Pair("func_76067_t", "getTerrainType")); - mInitMap.put(new Pair("func_76068_b", "setWorldTime")); - mInitMap.put(new Pair("func_76069_a", "setThundering")); - mInitMap.put(new Pair("func_76070_v", "isInitialized")); - mInitMap.put(new Pair("func_76071_n", "getThunderTime")); - mInitMap.put(new Pair("func_76072_h", "getPlayerNBTTagCompound")); - mInitMap.put(new Pair("func_76073_f", "getWorldTime")); - mInitMap.put(new Pair("func_76074_e", "getSpawnZ")); - mInitMap.put(new Pair("func_76075_d", "getSpawnY")); - mInitMap.put(new Pair("func_76076_i", "getDimension")); - mInitMap.put(new Pair("func_76077_q", "getGameType")); - mInitMap.put(new Pair("func_76078_e", "setSaveVersion")); - mInitMap.put(new Pair("func_76079_c", "getSpawnX")); - mInitMap.put(new Pair("func_76080_g", "setRainTime")); - mInitMap.put(new Pair("func_76081_a", "setSpawnPosition")); - mInitMap.put(new Pair("func_76082_a", "cloneNBTCompound")); - mInitMap.put(new Pair("func_76083_p", "getRainTime")); - mInitMap.put(new Pair("func_76084_b", "setRaining")); - mInitMap.put(new Pair("func_76085_a", "setTerrainType")); - mInitMap.put(new Pair("func_76086_u", "areCommandsAllowed")); - mInitMap.put(new Pair("func_76087_c", "setSpawnZ")); - mInitMap.put(new Pair("func_76088_k", "getSaveVersion")); - mInitMap.put(new Pair("func_76089_r", "isMapFeaturesEnabled")); - mInitMap.put(new Pair("func_76090_f", "setThunderTime")); - mInitMap.put(new Pair("func_76091_d", "setServerInitialized")); - mInitMap.put(new Pair("func_76092_g", "getSizeOnDisk")); - mInitMap.put(new Pair("func_76093_s", "isHardcoreModeEnabled")); - mInitMap.put(new Pair("func_76123_f", "ceiling_float_int")); - mInitMap.put(new Pair("func_76124_d", "floor_double_long")); - mInitMap.put(new Pair("func_76125_a", "clamp_int")); - mInitMap.put(new Pair("func_76126_a", "sin")); - mInitMap.put(new Pair("func_76127_a", "average")); - mInitMap.put(new Pair("func_76128_c", "floor_double")); - mInitMap.put(new Pair("func_76129_c", "sqrt_float")); - mInitMap.put(new Pair("func_76130_a", "abs_int")); - mInitMap.put(new Pair("func_76131_a", "clamp_float")); - mInitMap.put(new Pair("func_76132_a", "abs_max")); - mInitMap.put(new Pair("func_76133_a", "sqrt_double")); - mInitMap.put(new Pair("func_76134_b", "cos")); - mInitMap.put(new Pair("func_76135_e", "abs")); - mInitMap.put(new Pair("func_76136_a", "getRandomIntegerInRange")); - mInitMap.put(new Pair("func_76137_a", "bucketInt")); - mInitMap.put(new Pair("func_76138_g", "wrapAngleTo180_double")); - mInitMap.put(new Pair("func_76139_a", "stringNullOrLengthZero")); - mInitMap.put(new Pair("func_76140_b", "truncateDoubleToInt")); - mInitMap.put(new Pair("func_76141_d", "floor_float")); - mInitMap.put(new Pair("func_76142_g", "wrapAngleTo180_float")); - mInitMap.put(new Pair("func_76143_f", "ceiling_double_int")); - mInitMap.put(new Pair("func_76145_b", "getValue")); - mInitMap.put(new Pair("func_76146_a", "getKey")); - mInitMap.put(new Pair("func_76152_e", "removeKey")); - mInitMap.put(new Pair("func_76153_b", "resizeTable")); - mInitMap.put(new Pair("func_76154_a", "copyHashTableTo")); - mInitMap.put(new Pair("func_76155_g", "getHashedKey")); - mInitMap.put(new Pair("func_76156_a", "createKey")); - mInitMap.put(new Pair("func_76157_a", "hash")); - mInitMap.put(new Pair("func_76158_a", "getHashIndex")); - mInitMap.put(new Pair("func_76159_d", "remove")); - mInitMap.put(new Pair("func_76160_c", "getEntry")); - mInitMap.put(new Pair("func_76161_b", "containsItem")); - mInitMap.put(new Pair("func_76162_a", "getNumHashElements")); - mInitMap.put(new Pair("func_76163_a", "add")); - mInitMap.put(new Pair("func_76164_a", "getValueByKey")); - mInitMap.put(new Pair("func_76179_a", "buildPostString")); - mInitMap.put(new Pair("func_76181_a", "getSuitableLanPort")); - mInitMap.put(new Pair("func_76184_a", "readFromNBT")); - mInitMap.put(new Pair("func_76185_a", "markDirty")); - mInitMap.put(new Pair("func_76186_a", "setDirty")); - mInitMap.put(new Pair("func_76187_b", "writeToNBT")); - mInitMap.put(new Pair("func_76188_b", "isDirty")); - mInitMap.put(new Pair("func_76191_a", "updateVisiblePlayers")); - mInitMap.put(new Pair("func_76192_a", "updateMPMapData")); - mInitMap.put(new Pair("func_76193_a", "getUpdatePacketData")); - mInitMap.put(new Pair("func_76194_a", "setColumnDirty")); - mInitMap.put(new Pair("func_76204_a", "getPlayersOnMap")); - mInitMap.put(new Pair("func_76217_h", "getCanBurn")); - mInitMap.put(new Pair("func_76218_k", "isOpaque")); - mInitMap.put(new Pair("func_76219_n", "setNoPushMobility")); - mInitMap.put(new Pair("func_76220_a", "isSolid")); - mInitMap.put(new Pair("func_76221_f", "setRequiresTool")); - mInitMap.put(new Pair("func_76222_j", "isReplaceable")); - mInitMap.put(new Pair("func_76223_p", "setTranslucent")); - mInitMap.put(new Pair("func_76224_d", "isLiquid")); - mInitMap.put(new Pair("func_76225_o", "setImmovableMobility")); - mInitMap.put(new Pair("func_76226_g", "setBurning")); - mInitMap.put(new Pair("func_76227_m", "getMaterialMobility")); - mInitMap.put(new Pair("func_76228_b", "blocksLight")); - mInitMap.put(new Pair("func_76229_l", "isToolNotRequired")); - mInitMap.put(new Pair("func_76230_c", "blocksMovement")); - mInitMap.put(new Pair("func_76231_i", "setReplaceable")); - mInitMap.put(new Pair("func_76269_a", "getRandomItem")); - mInitMap.put(new Pair("func_76270_a", "getTotalWeight")); - mInitMap.put(new Pair("func_76271_a", "getRandomItem")); - mInitMap.put(new Pair("func_76272_a", "getTotalWeight")); - mInitMap.put(new Pair("func_76273_a", "getRandomItem")); - mInitMap.put(new Pair("func_76274_a", "getRandomItem")); - mInitMap.put(new Pair("func_76293_a", "generateChestContents")); - mInitMap.put(new Pair("func_76304_a", "generateNoiseOctaves")); - mInitMap.put(new Pair("func_76305_a", "generateNoiseOctaves")); - mInitMap.put(new Pair("func_76308_a", "populateNoiseArray")); - mInitMap.put(new Pair("func_76310_a", "grad")); - mInitMap.put(new Pair("func_76311_b", "lerp")); - mInitMap.put(new Pair("func_76316_a", "onInventoryChanged")); - mInitMap.put(new Pair("func_76317_a", "clearProfiling")); - mInitMap.put(new Pair("func_76318_c", "endStartSection")); - mInitMap.put(new Pair("func_76319_b", "endSection")); - mInitMap.put(new Pair("func_76320_a", "startSection")); - mInitMap.put(new Pair("func_76321_b", "getProfilingData")); - mInitMap.put(new Pair("func_76322_c", "getNameOfLastSection")); - mInitMap.put(new Pair("func_76333_a", "smooth")); - mInitMap.put(new Pair("func_76337_a", "ticksToElapsedTime")); - mInitMap.put(new Pair("func_76338_a", "stripControlCodes")); - mInitMap.put(new Pair("func_76340_b", "getSecond")); - mInitMap.put(new Pair("func_76341_a", "getFirst")); - mInitMap.put(new Pair("func_76345_d", "getHungerDamage")); - mInitMap.put(new Pair("func_76346_g", "getEntity")); - mInitMap.put(new Pair("func_76347_k", "isFireDamage")); - mInitMap.put(new Pair("func_76348_h", "setDamageBypassesArmor")); - mInitMap.put(new Pair("func_76349_b", "setProjectile")); - mInitMap.put(new Pair("func_76350_n", "isDifficultyScaled")); - mInitMap.put(new Pair("func_76351_m", "setDifficultyScaled")); - mInitMap.put(new Pair("func_76352_a", "isProjectile")); - mInitMap.put(new Pair("func_76353_a", "causeArrowDamage")); - mInitMap.put(new Pair("func_76354_b", "causeIndirectMagicDamage")); - mInitMap.put(new Pair("func_76355_l", "getDamageType")); - mInitMap.put(new Pair("func_76356_a", "causeThrownDamage")); - mInitMap.put(new Pair("func_76357_e", "canHarmInCreative")); - mInitMap.put(new Pair("func_76358_a", "causeMobDamage")); - mInitMap.put(new Pair("func_76359_i", "setDamageAllowedInCreativeMode")); - mInitMap.put(new Pair("func_76361_j", "setFireDamage")); - mInitMap.put(new Pair("func_76362_a", "causeFireballDamage")); - mInitMap.put(new Pair("func_76363_c", "isUnblockable")); - mInitMap.put(new Pair("func_76364_f", "getSourceOfDamage")); - mInitMap.put(new Pair("func_76365_a", "causePlayerDamage")); - mInitMap.put(new Pair("func_76388_g", "getEffectiveness")); - mInitMap.put(new Pair("func_76389_a", "getDurationString")); - mInitMap.put(new Pair("func_76390_b", "setPotionName")); - mInitMap.put(new Pair("func_76392_e", "getStatusIconIndex")); - mInitMap.put(new Pair("func_76393_a", "getName")); - mInitMap.put(new Pair("func_76394_a", "performEffect")); - mInitMap.put(new Pair("func_76395_i", "isUsable")); - mInitMap.put(new Pair("func_76396_c", "getId")); - mInitMap.put(new Pair("func_76397_a", "isReady")); - mInitMap.put(new Pair("func_76398_f", "isBadEffect")); - mInitMap.put(new Pair("func_76399_b", "setIconIndex")); - mInitMap.put(new Pair("func_76400_d", "hasStatusIcon")); - mInitMap.put(new Pair("func_76401_j", "getLiquidColor")); - mInitMap.put(new Pair("func_76402_a", "affectEntity")); - mInitMap.put(new Pair("func_76403_b", "isInstant")); - mInitMap.put(new Pair("func_76404_a", "setEffectiveness")); - mInitMap.put(new Pair("func_76445_a", "getIntCache")); - mInitMap.put(new Pair("func_76446_a", "resetIntCache")); - mInitMap.put(new Pair("func_76452_a", "combine")); - mInitMap.put(new Pair("func_76453_d", "getEffectName")); - mInitMap.put(new Pair("func_76454_e", "deincrementDuration")); - mInitMap.put(new Pair("func_76455_a", "onUpdate")); - mInitMap.put(new Pair("func_76456_a", "getPotionID")); - mInitMap.put(new Pair("func_76457_b", "performEffect")); - mInitMap.put(new Pair("func_76458_c", "getAmplifier")); - mInitMap.put(new Pair("func_76459_b", "getDuration")); - mInitMap.put(new Pair("func_76463_a", "startSnooper")); - mInitMap.put(new Pair("func_76465_c", "getCurrentStats")); - mInitMap.put(new Pair("func_76467_g", "addJvmArgsToSnooper")); - mInitMap.put(new Pair("func_76468_d", "isSnooperRunning")); - mInitMap.put(new Pair("func_76470_e", "stopSnooper")); - mInitMap.put(new Pair("func_76471_b", "addMemoryStatsToSnooper")); - mInitMap.put(new Pair("func_76484_a", "generate")); - mInitMap.put(new Pair("func_76487_a", "setScale")); - mInitMap.put(new Pair("func_76489_a", "generateLeafNodeList")); - mInitMap.put(new Pair("func_76490_a", "layerSize")); - mInitMap.put(new Pair("func_76491_a", "generateLeafNode")); - mInitMap.put(new Pair("func_76493_c", "leafNodeNeedsBase")); - mInitMap.put(new Pair("func_76494_d", "generateLeafNodeBases")); - mInitMap.put(new Pair("func_76495_b", "leafSize")); - mInitMap.put(new Pair("func_76496_a", "checkBlockLine")); - mInitMap.put(new Pair("func_76497_e", "validTreeLocation")); - mInitMap.put(new Pair("func_76498_b", "generateLeaves")); - mInitMap.put(new Pair("func_76499_c", "generateTrunk")); - mInitMap.put(new Pair("func_76529_b", "growVines")); - mInitMap.put(new Pair("func_76536_b", "generateVines")); - mInitMap.put(new Pair("func_76543_b", "pickMobSpawner")); - mInitMap.put(new Pair("func_76549_c", "getChunkInputStream")); - mInitMap.put(new Pair("func_76550_a", "createOrLoadRegionFile")); - mInitMap.put(new Pair("func_76551_a", "clearRegionFileReferences")); - mInitMap.put(new Pair("func_76552_d", "getChunkOutputStream")); - mInitMap.put(new Pair("func_76554_h", "getEntrancePortalLocation")); - mInitMap.put(new Pair("func_76555_c", "createChunkGenerator")); - mInitMap.put(new Pair("func_76556_a", "generateLightBrightnessTable")); - mInitMap.put(new Pair("func_76557_i", "getAverageGroundLevel")); - mInitMap.put(new Pair("func_76558_a", "registerWorld")); - mInitMap.put(new Pair("func_76559_b", "getMoonPhase")); - mInitMap.put(new Pair("func_76560_a", "calcSunriseSunsetColors")); - mInitMap.put(new Pair("func_76561_g", "isSkyColored")); - mInitMap.put(new Pair("func_76562_b", "getFogColor")); - mInitMap.put(new Pair("func_76563_a", "calculateCelestialAngle")); - mInitMap.put(new Pair("func_76564_j", "getWorldHasVoidParticles")); - mInitMap.put(new Pair("func_76565_k", "getVoidFogYFactor")); - mInitMap.put(new Pair("func_76566_a", "canCoordinateBeSpawn")); - mInitMap.put(new Pair("func_76567_e", "canRespawnHere")); - mInitMap.put(new Pair("func_76568_b", "doesXZShowFog")); - mInitMap.put(new Pair("func_76569_d", "isSurfaceWorld")); - mInitMap.put(new Pair("func_76570_a", "getProviderForDimension")); - mInitMap.put(new Pair("func_76571_f", "getCloudHeight")); - mInitMap.put(new Pair("func_76572_b", "registerWorldChunkManager")); - mInitMap.put(new Pair("func_76581_a", "set")); - mInitMap.put(new Pair("func_76582_a", "get")); - mInitMap.put(new Pair("func_76587_i", "getBlockStorageArray")); - mInitMap.put(new Pair("func_76588_a", "getEntitiesWithinAABBForEntity")); - mInitMap.put(new Pair("func_76589_b", "setBlockMetadata")); - mInitMap.put(new Pair("func_76590_a", "generateHeightMap")); - mInitMap.put(new Pair("func_76591_a", "getBiomeGenForWorldCoords")); - mInitMap.put(new Pair("func_76594_o", "enqueueRelightChecks")); - mInitMap.put(new Pair("func_76595_e", "propagateSkylightOcclusion")); - mInitMap.put(new Pair("func_76599_g", "checkSkylightNeighborHeight")); - mInitMap.put(new Pair("func_76600_a", "isAtLocation")); - mInitMap.put(new Pair("func_76601_a", "needsSaving")); - mInitMap.put(new Pair("func_76602_a", "setStorageArrays")); - mInitMap.put(new Pair("func_76603_b", "generateSkylightMap")); - mInitMap.put(new Pair("func_76605_m", "getBiomeArray")); - mInitMap.put(new Pair("func_76606_c", "getAreLevelsEmpty")); - mInitMap.put(new Pair("func_76607_a", "fillChunk")); - mInitMap.put(new Pair("func_76608_a", "removeEntityAtIndex")); - mInitMap.put(new Pair("func_76609_d", "updateSkylightNeighborHeight")); - mInitMap.put(new Pair("func_76611_b", "getHeightValue")); - mInitMap.put(new Pair("func_76612_a", "addEntity")); - mInitMap.put(new Pair("func_76613_n", "resetRelightChecks")); - mInitMap.put(new Pair("func_76614_a", "getSavedLightValue")); - mInitMap.put(new Pair("func_76615_h", "relightBlock")); - mInitMap.put(new Pair("func_76616_a", "setBiomeArray")); - mInitMap.put(new Pair("func_76617_a", "getRandomWithSeed")); - mInitMap.put(new Pair("func_76618_a", "getEntitiesOfTypeWithinAAAB")); - mInitMap.put(new Pair("func_76619_d", "canBlockSeeTheSky")); - mInitMap.put(new Pair("func_76621_g", "isEmpty")); - mInitMap.put(new Pair("func_76622_b", "removeEntity")); - mInitMap.put(new Pair("func_76623_d", "onChunkUnload")); - mInitMap.put(new Pair("func_76624_a", "populateChunk")); - mInitMap.put(new Pair("func_76625_h", "getTopFilledSegment")); - mInitMap.put(new Pair("func_76626_d", "getPrecipitationHeight")); - mInitMap.put(new Pair("func_76628_c", "getBlockMetadata")); - mInitMap.put(new Pair("func_76629_c", "getBlockLightValue")); - mInitMap.put(new Pair("func_76630_e", "setChunkModified")); - mInitMap.put(new Pair("func_76631_c", "onChunkLoad")); - mInitMap.put(new Pair("func_76632_l", "getChunkCoordIntPair")); - mInitMap.put(new Pair("func_76633_a", "setLightValue")); - mInitMap.put(new Pair("func_76654_b", "setExtBlockMetadata")); - mInitMap.put(new Pair("func_76657_c", "setExtSkylightValue")); - mInitMap.put(new Pair("func_76658_g", "getBlockLSBArray")); - mInitMap.put(new Pair("func_76659_c", "setBlocklightArray")); - mInitMap.put(new Pair("func_76660_i", "getBlockMSBArray")); - mInitMap.put(new Pair("func_76661_k", "getBlocklightArray")); - mInitMap.put(new Pair("func_76662_d", "getYLocation")); - mInitMap.put(new Pair("func_76663_a", "isEmpty")); - mInitMap.put(new Pair("func_76664_a", "setBlockLSBArray")); - mInitMap.put(new Pair("func_76665_b", "getExtBlockMetadata")); - mInitMap.put(new Pair("func_76666_d", "setSkylightArray")); - mInitMap.put(new Pair("func_76667_m", "createBlockMSBArray")); - mInitMap.put(new Pair("func_76668_b", "setBlockMetadataArray")); - mInitMap.put(new Pair("func_76669_j", "getMetadataArray")); - mInitMap.put(new Pair("func_76670_c", "getExtSkylightValue")); - mInitMap.put(new Pair("func_76671_l", "getSkylightArray")); - mInitMap.put(new Pair("func_76672_e", "removeInvalidBlocks")); - mInitMap.put(new Pair("func_76673_a", "setBlockMSBArray")); - mInitMap.put(new Pair("func_76674_d", "getExtBlocklightValue")); - mInitMap.put(new Pair("func_76675_b", "getNeedsRandomTick")); - mInitMap.put(new Pair("func_76676_h", "clearMSBArray")); - mInitMap.put(new Pair("func_76677_d", "setExtBlocklightValue")); - mInitMap.put(new Pair("func_76686_a", "get")); - mInitMap.put(new Pair("func_76690_a", "convertToAnvilFormat")); - mInitMap.put(new Pair("func_76691_a", "load")); - mInitMap.put(new Pair("func_76704_a", "getChunkDataInputStream")); - mInitMap.put(new Pair("func_76705_d", "outOfBounds")); - mInitMap.put(new Pair("func_76706_a", "write")); - mInitMap.put(new Pair("func_76707_e", "getOffset")); - mInitMap.put(new Pair("func_76708_c", "close")); - mInitMap.put(new Pair("func_76709_c", "isChunkSaved")); - mInitMap.put(new Pair("func_76710_b", "getChunkDataOutputStream")); - mInitMap.put(new Pair("func_76711_a", "setOffset")); - mInitMap.put(new Pair("func_76712_a", "write")); - mInitMap.put(new Pair("func_76713_b", "setChunkTimestamp")); - mInitMap.put(new Pair("func_76727_i", "getFloatRainfall")); - mInitMap.put(new Pair("func_76728_a", "decorate")); - mInitMap.put(new Pair("func_76729_a", "createBiomeDecorator")); - mInitMap.put(new Pair("func_76730_b", "getRandomWorldGenForGrass")); - mInitMap.put(new Pair("func_76731_a", "getSkyColorByTemp")); - mInitMap.put(new Pair("func_76732_a", "setTemperatureRainfall")); - mInitMap.put(new Pair("func_76735_a", "setBiomeName")); - mInitMap.put(new Pair("func_76736_e", "isHighHumidity")); - mInitMap.put(new Pair("func_76738_d", "canSpawnLightningBolt")); - mInitMap.put(new Pair("func_76739_b", "setColor")); - mInitMap.put(new Pair("func_76741_f", "getSpawningChance")); - mInitMap.put(new Pair("func_76742_b", "setEnableSnow")); - mInitMap.put(new Pair("func_76744_g", "getIntRainfall")); - mInitMap.put(new Pair("func_76745_m", "setDisableRain")); - mInitMap.put(new Pair("func_76746_c", "getEnableSnow")); - mInitMap.put(new Pair("func_76747_a", "getSpawnableList")); - mInitMap.put(new Pair("func_76793_b", "genStandardOre2")); - mInitMap.put(new Pair("func_76795_a", "genStandardOre1")); - mInitMap.put(new Pair("func_76797_b", "generateOres")); - mInitMap.put(new Pair("func_76837_b", "getBiomeGenAt")); - mInitMap.put(new Pair("func_76838_a", "cleanupCache")); - mInitMap.put(new Pair("func_76839_e", "getCachedBiomes")); - mInitMap.put(new Pair("func_76840_a", "getBiomeCacheBlock")); - mInitMap.put(new Pair("func_76885_a", "getBiomeGenAt")); - mInitMap.put(new Pair("func_76931_a", "getBiomeGenAt")); - mInitMap.put(new Pair("func_76932_a", "getBiomesToSpawnIn")); - mInitMap.put(new Pair("func_76933_b", "loadBlockGeneratorData")); - mInitMap.put(new Pair("func_76935_a", "getBiomeGenAt")); - mInitMap.put(new Pair("func_76936_a", "getRainfall")); - mInitMap.put(new Pair("func_76937_a", "getBiomesForGeneration")); - mInitMap.put(new Pair("func_76938_b", "cleanupCache")); - mInitMap.put(new Pair("func_76939_a", "getTemperatureAtHeight")); - mInitMap.put(new Pair("func_76940_a", "areBiomesViable")); - mInitMap.put(new Pair("func_76975_c", "renderShadow")); - mInitMap.put(new Pair("func_76976_a", "setRenderManager")); - mInitMap.put(new Pair("func_76977_a", "renderEntityOnFire")); - mInitMap.put(new Pair("func_76978_a", "renderOffsetAABB")); - mInitMap.put(new Pair("func_76979_b", "doRenderShadowAndFire")); - mInitMap.put(new Pair("func_76980_a", "renderAABB")); - mInitMap.put(new Pair("func_76982_b", "getWorldFromRenderManager")); - mInitMap.put(new Pair("func_76983_a", "getFontRendererFromRenderManager")); - mInitMap.put(new Pair("func_76986_a", "doRender")); - mInitMap.put(new Pair("func_77015_a", "renderItemIntoGUI")); - mInitMap.put(new Pair("func_77017_a", "renderQuad")); - mInitMap.put(new Pair("func_77018_a", "renderGlint")); - mInitMap.put(new Pair("func_77020_a", "renderDroppedItem")); - mInitMap.put(new Pair("func_77021_b", "renderItemOverlayIntoGUI")); - mInitMap.put(new Pair("func_77026_a", "renderEntity")); - mInitMap.put(new Pair("func_77029_c", "renderEquippedItems")); - mInitMap.put(new Pair("func_77030_a", "getColorMultiplier")); - mInitMap.put(new Pair("func_77032_a", "shouldRenderPass")); - mInitMap.put(new Pair("func_77033_b", "passSpecialRender")); - mInitMap.put(new Pair("func_77034_a", "interpolateRotation")); - mInitMap.put(new Pair("func_77035_b", "inheritRenderPass")); - mInitMap.put(new Pair("func_77036_a", "renderModel")); - mInitMap.put(new Pair("func_77037_a", "getDeathMaxRotation")); - mInitMap.put(new Pair("func_77039_a", "renderLivingAt")); - mInitMap.put(new Pair("func_77040_d", "getSwingProgress")); - mInitMap.put(new Pair("func_77041_b", "preRenderCallback")); - mInitMap.put(new Pair("func_77042_a", "setRenderPassModel")); - mInitMap.put(new Pair("func_77043_a", "rotateCorpse")); - mInitMap.put(new Pair("func_77044_a", "handleRotationFloat")); - mInitMap.put(new Pair("func_77124_a", "setCanBeCreated")); - mInitMap.put(new Pair("func_77125_e", "isVersioned")); - mInitMap.put(new Pair("func_77126_d", "getCanBeCreated")); - mInitMap.put(new Pair("func_77127_a", "getWorldTypeName")); - mInitMap.put(new Pair("func_77128_b", "getTranslateName")); - mInitMap.put(new Pair("func_77129_f", "setVersioned")); - mInitMap.put(new Pair("func_77130_a", "parseWorldType")); - mInitMap.put(new Pair("func_77131_c", "getGeneratorVersion")); - mInitMap.put(new Pair("func_77132_a", "getWorldTypeForGeneratorVersion")); - mInitMap.put(new Pair("func_77142_a", "getByName")); - mInitMap.put(new Pair("func_77144_e", "isSurvivalOrAdventure")); - mInitMap.put(new Pair("func_77145_d", "isCreative")); - mInitMap.put(new Pair("func_77146_a", "getByID")); - mInitMap.put(new Pair("func_77147_a", "configurePlayerCapabilities")); - mInitMap.put(new Pair("func_77148_a", "getID")); - mInitMap.put(new Pair("func_77149_b", "getName")); - mInitMap.put(new Pair("func_77158_f", "getHardcoreEnabled")); - mInitMap.put(new Pair("func_77159_a", "enableBonusChest")); - mInitMap.put(new Pair("func_77160_d", "getSeed")); - mInitMap.put(new Pair("func_77161_a", "getGameTypeById")); - mInitMap.put(new Pair("func_77162_e", "getGameType")); - mInitMap.put(new Pair("func_77163_i", "areCommandsAllowed")); - mInitMap.put(new Pair("func_77164_g", "isMapFeaturesEnabled")); - mInitMap.put(new Pair("func_77165_h", "getTerrainType")); - mInitMap.put(new Pair("func_77166_b", "enableCommands")); - mInitMap.put(new Pair("func_77167_c", "isBonusChestEnabled")); - mInitMap.put(new Pair("func_77176_a", "setScheduledTime")); - mInitMap.put(new Pair("func_77184_b", "placeInExistingPortal")); - mInitMap.put(new Pair("func_77185_a", "placeInPortal")); - mInitMap.put(new Pair("func_77190_a", "canCreatureTypeSpawnAtLocation")); - mInitMap.put(new Pair("func_77191_a", "performWorldGenSpawning")); - mInitMap.put(new Pair("func_77192_a", "findChunksForSpawning")); - mInitMap.put(new Pair("func_77201_a", "readRecipiesFromTags")); - mInitMap.put(new Pair("func_77202_a", "getRecipiesAsTags")); - mInitMap.put(new Pair("func_77203_a", "canRecipeBeUsed")); - mInitMap.put(new Pair("func_77205_a", "addToListWithCheck")); - mInitMap.put(new Pair("func_77272_a", "chunkXZ2Int")); - mInitMap.put(new Pair("func_77273_a", "getCenterXPos")); - mInitMap.put(new Pair("func_77274_b", "getCenterZPosition")); - mInitMap.put(new Pair("func_77278_a", "doExplosionA")); - mInitMap.put(new Pair("func_77279_a", "doExplosionB")); - mInitMap.put(new Pair("func_77316_c", "getTranslatedName")); - mInitMap.put(new Pair("func_77317_b", "getMaxEnchantability")); - mInitMap.put(new Pair("func_77318_a", "calcModifierDamage")); - mInitMap.put(new Pair("func_77319_d", "getMinLevel")); - mInitMap.put(new Pair("func_77320_a", "getName")); - mInitMap.put(new Pair("func_77321_a", "getMinEnchantability")); - mInitMap.put(new Pair("func_77322_b", "setName")); - mInitMap.put(new Pair("func_77324_c", "getWeight")); - mInitMap.put(new Pair("func_77325_b", "getMaxLevel")); - mInitMap.put(new Pair("func_77326_a", "canApplyTogether")); - mInitMap.put(new Pair("func_77390_a", "readFromTags")); - mInitMap.put(new Pair("func_77391_b", "hasSameItemsAs")); - mInitMap.put(new Pair("func_77393_a", "hasSameIDsAs")); - mInitMap.put(new Pair("func_77394_a", "getItemToBuy")); - mInitMap.put(new Pair("func_77395_g", "writeToTags")); - mInitMap.put(new Pair("func_77396_b", "getSecondItemToBuy")); - mInitMap.put(new Pair("func_77397_d", "getItemToSell")); - mInitMap.put(new Pair("func_77398_c", "hasSecondItemToBuy")); - mInitMap.put(new Pair("func_77399_f", "incrementToolUses")); - mInitMap.put(new Pair("func_77442_b", "canUnlockAchievement")); - mInitMap.put(new Pair("func_77443_a", "hasAchievementUnlocked")); - mInitMap.put(new Pair("func_77444_a", "writeStat")); - mInitMap.put(new Pair("func_77466_a", "getFoliageColorPine")); - mInitMap.put(new Pair("func_77467_a", "setFoliageBiomeColorizer")); - mInitMap.put(new Pair("func_77468_c", "getFoliageColorBasic")); - mInitMap.put(new Pair("func_77469_b", "getFoliageColorBirch")); - mInitMap.put(new Pair("func_77470_a", "getFoliageColor")); - mInitMap.put(new Pair("func_77472_b", "setClientActiveTexture")); - mInitMap.put(new Pair("func_77473_a", "setActiveTexture")); - mInitMap.put(new Pair("func_77474_a", "initializeTextures")); - mInitMap.put(new Pair("func_77475_a", "setLightmapTextureCoords")); - mInitMap.put(new Pair("func_77479_a", "setGrassBiomeColorizer")); - mInitMap.put(new Pair("func_77480_a", "getGrassColor")); - mInitMap.put(new Pair("func_77487_a", "getServerMotd")); - mInitMap.put(new Pair("func_77488_b", "getServerIpPort")); - mInitMap.put(new Pair("func_77489_c", "updateLastSeen")); - mInitMap.put(new Pair("func_77493_a", "calculateModifier")); - mInitMap.put(new Pair("func_77501_a", "getRespiration")); - mInitMap.put(new Pair("func_77502_d", "getSilkTouchModifier")); - mInitMap.put(new Pair("func_77504_a", "addRandomEnchantment")); - mInitMap.put(new Pair("func_77505_b", "mapEnchantmentData")); - mInitMap.put(new Pair("func_77506_a", "getEnchantmentLevel")); - mInitMap.put(new Pair("func_77507_b", "getKnockbackModifier")); - mInitMap.put(new Pair("func_77508_a", "getEnchantmentModifierDamage")); - mInitMap.put(new Pair("func_77509_b", "getEfficiencyModifier")); - mInitMap.put(new Pair("func_77510_g", "getAquaAffinityModifier")); - mInitMap.put(new Pair("func_77511_a", "getMaxEnchantmentLevel")); - mInitMap.put(new Pair("func_77512_a", "getEnchantmentModifierLiving")); - mInitMap.put(new Pair("func_77513_b", "buildEnchantmentList")); - mInitMap.put(new Pair("func_77514_a", "calcItemStackEnchantability")); - mInitMap.put(new Pair("func_77516_a", "applyEnchantmentModifierArray")); - mInitMap.put(new Pair("func_77517_e", "getFortuneModifier")); - mInitMap.put(new Pair("func_77518_a", "applyEnchantmentModifier")); - mInitMap.put(new Pair("func_77519_f", "getLootingModifier")); - mInitMap.put(new Pair("func_77523_b", "getAdFromPingResponse")); - mInitMap.put(new Pair("func_77524_a", "getMotdFromPingResponse")); - mInitMap.put(new Pair("func_77525_a", "getPingResponse")); - mInitMap.put(new Pair("func_77552_b", "setWasNotUpdated")); - mInitMap.put(new Pair("func_77553_a", "getWasUpdated")); - mInitMap.put(new Pair("func_77554_c", "getLanServers")); - mInitMap.put(new Pair("func_77557_a", "canEnchantItem")); - mInitMap.put(new Pair("func_77569_a", "matches")); - mInitMap.put(new Pair("func_77570_a", "getRecipeSize")); - mInitMap.put(new Pair("func_77571_b", "getRecipeOutput")); - mInitMap.put(new Pair("func_77572_b", "getCraftingResult")); - mInitMap.put(new Pair("func_77573_a", "checkMatch")); - mInitMap.put(new Pair("func_77583_a", "addRecipes")); - mInitMap.put(new Pair("func_77586_a", "addRecipes")); - mInitMap.put(new Pair("func_77589_a", "addRecipes")); - mInitMap.put(new Pair("func_77590_a", "addRecipes")); - mInitMap.put(new Pair("func_77592_b", "getRecipeList")); - mInitMap.put(new Pair("func_77594_a", "getInstance")); - mInitMap.put(new Pair("func_77596_b", "addShapelessRecipe")); - mInitMap.put(new Pair("func_77599_b", "getSmeltingList")); - mInitMap.put(new Pair("func_77602_a", "instance")); - mInitMap.put(new Pair("func_77607_a", "addRecipes")); - mInitMap.put(new Pair("func_77608_a", "addRecipes")); - mInitMap.put(new Pair("func_77609_a", "addRecipes")); - mInitMap.put(new Pair("func_77612_l", "getMaxDurability")); - mInitMap.put(new Pair("func_77613_e", "getRarity")); - mInitMap.put(new Pair("func_77614_k", "getHasSubtypes")); - mInitMap.put(new Pair("func_77615_a", "onPlayerStoppedUsing")); - mInitMap.put(new Pair("func_77616_k", "isItemTool")); - mInitMap.put(new Pair("func_77617_a", "getIconFromDamage")); - mInitMap.put(new Pair("func_77618_c", "getIconFromDamageForRenderPass")); - mInitMap.put(new Pair("func_77619_b", "getItemEnchantability")); - mInitMap.put(new Pair("func_77620_a", "getColorFromDamage")); - mInitMap.put(new Pair("func_77621_a", "getMovingObjectPositionFromPlayer")); - mInitMap.put(new Pair("func_77622_d", "onCreated")); - mInitMap.put(new Pair("func_77623_v", "requiresMultipleRenderPasses")); - mInitMap.put(new Pair("func_77624_a", "addInformation")); - mInitMap.put(new Pair("func_77625_d", "setMaxStackSize")); - mInitMap.put(new Pair("func_77626_a", "getMaxItemUseDuration")); - mInitMap.put(new Pair("func_77627_a", "setHasSubtypes")); - mInitMap.put(new Pair("func_77629_n_", "shouldRotateAroundWhenRendering")); - mInitMap.put(new Pair("func_77630_h", "doesContainerItemLeaveCraftingGrid")); - mInitMap.put(new Pair("func_77631_c", "setPotionEffect")); - mInitMap.put(new Pair("func_77634_r", "hasContainerItem")); - mInitMap.put(new Pair("func_77636_d", "hasEffect")); - mInitMap.put(new Pair("func_77637_a", "setCreativeTab")); - mInitMap.put(new Pair("func_77639_j", "getItemStackLimit")); - mInitMap.put(new Pair("func_77640_w", "getCreativeTab")); - mInitMap.put(new Pair("func_77642_a", "setContainerItem")); - mInitMap.put(new Pair("func_77643_m_", "isMap")); - mInitMap.put(new Pair("func_77644_a", "hitEntity")); - mInitMap.put(new Pair("func_77645_m", "isDamageable")); - mInitMap.put(new Pair("func_77647_b", "getMetadata")); - mInitMap.put(new Pair("func_77648_a", "onItemUse")); - mInitMap.put(new Pair("func_77650_f", "getIconIndex")); - mInitMap.put(new Pair("func_77651_p", "getShareTag")); - mInitMap.put(new Pair("func_77653_i", "getItemStackDisplayName")); - mInitMap.put(new Pair("func_77654_b", "onItemUseFinish")); - mInitMap.put(new Pair("func_77655_b", "setUnlocalizedName")); - mInitMap.put(new Pair("func_77656_e", "setMaxDurability")); - mInitMap.put(new Pair("func_77657_g", "getUnlocalizedNameInefficiently")); - mInitMap.put(new Pair("func_77658_a", "getUnlocalizedName")); - mInitMap.put(new Pair("func_77659_a", "onItemRightClick")); - mInitMap.put(new Pair("func_77661_b", "getItemUseAction")); - mInitMap.put(new Pair("func_77662_d", "isFull3D")); - mInitMap.put(new Pair("func_77663_a", "onUpdate")); - mInitMap.put(new Pair("func_77664_n", "setFull3D")); - mInitMap.put(new Pair("func_77667_c", "getUnlocalizedName")); - mInitMap.put(new Pair("func_77668_q", "getContainerItem")); - mInitMap.put(new Pair("func_77828_a", "validBookTagContents")); - mInitMap.put(new Pair("func_77831_g", "isSplash")); - mInitMap.put(new Pair("func_77832_l", "getEffects")); - mInitMap.put(new Pair("func_77833_h", "isEffectInstant")); - mInitMap.put(new Pair("func_77834_f", "getEffects")); - mInitMap.put(new Pair("func_77840_a", "spawnCreature")); - mInitMap.put(new Pair("func_77842_f", "getMaterialName")); - mInitMap.put(new Pair("func_77844_a", "setPotionEffect")); - mInitMap.put(new Pair("func_77845_h", "isWolfsFavoriteMeat")); - mInitMap.put(new Pair("func_77848_i", "setAlwaysEdible")); - mInitMap.put(new Pair("func_77849_c", "onFoodEaten")); - mInitMap.put(new Pair("func_77861_e", "getToolMaterialName")); - mInitMap.put(new Pair("func_77872_a", "updateMapData")); - mInitMap.put(new Pair("func_77873_a", "getMapData")); - mInitMap.put(new Pair("func_77875_a", "tryPlaceContainedLiquid")); - mInitMap.put(new Pair("func_77906_a", "brewBitOperations")); - mInitMap.put(new Pair("func_77907_h", "countSetFlags")); - mInitMap.put(new Pair("func_77910_c", "isFlagSet")); - mInitMap.put(new Pair("func_77911_a", "calcPotionLiquidColor")); - mInitMap.put(new Pair("func_77912_a", "parsePotionEffects")); - mInitMap.put(new Pair("func_77913_a", "applyIngredient")); - mInitMap.put(new Pair("func_77914_a", "checkFlag")); - mInitMap.put(new Pair("func_77916_d", "isFlagUnset")); - mInitMap.put(new Pair("func_77917_b", "getPotionEffects")); - mInitMap.put(new Pair("func_77942_o", "hasTagCompound")); - mInitMap.put(new Pair("func_77943_a", "tryPlaceItemIntoWorld")); - mInitMap.put(new Pair("func_77944_b", "copyItemStack")); - mInitMap.put(new Pair("func_77945_a", "updateAnimation")); - mInitMap.put(new Pair("func_77946_l", "copy")); - mInitMap.put(new Pair("func_77948_v", "isItemEnchanted")); - mInitMap.put(new Pair("func_77949_a", "loadItemStackFromNBT")); - mInitMap.put(new Pair("func_77950_b", "onItemUseFinish")); - mInitMap.put(new Pair("func_77951_h", "isItemDamaged")); - mInitMap.put(new Pair("func_77952_i", "getCurrentDurability")); - mInitMap.put(new Pair("func_77953_t", "getRarity")); - mInitMap.put(new Pair("func_77954_c", "getIconIndex")); - mInitMap.put(new Pair("func_77955_b", "writeToNBT")); - mInitMap.put(new Pair("func_77956_u", "isItemEnchantable")); - mInitMap.put(new Pair("func_77957_a", "useItemRightClick")); - mInitMap.put(new Pair("func_77958_k", "getMaxDurability")); - mInitMap.put(new Pair("func_77959_d", "isItemStackEqual")); - mInitMap.put(new Pair("func_77960_j", "getMetadata")); - mInitMap.put(new Pair("func_77961_a", "hitEntity")); - mInitMap.put(new Pair("func_77962_s", "hasEffect")); - mInitMap.put(new Pair("func_77963_c", "readFromNBT")); - mInitMap.put(new Pair("func_77964_b", "setMetadata")); - mInitMap.put(new Pair("func_77966_a", "addEnchantment")); - mInitMap.put(new Pair("func_77969_a", "isItemEqual")); - mInitMap.put(new Pair("func_77970_a", "areItemStackTagsEqual")); - mInitMap.put(new Pair("func_77972_a", "damageItem")); - mInitMap.put(new Pair("func_77973_b", "getItem")); - mInitMap.put(new Pair("func_77974_b", "onPlayerStoppedUsing")); - mInitMap.put(new Pair("func_77975_n", "getItemUseAction")); - mInitMap.put(new Pair("func_77976_d", "getMaxStackSize")); - mInitMap.put(new Pair("func_77977_a", "getUnlocalizedName")); - mInitMap.put(new Pair("func_77978_p", "getTagCompound")); - mInitMap.put(new Pair("func_77979_a", "splitStack")); - mInitMap.put(new Pair("func_77980_a", "onCrafting")); - mInitMap.put(new Pair("func_77981_g", "getHasSubtypes")); - mInitMap.put(new Pair("func_77982_d", "setTagCompound")); - mInitMap.put(new Pair("func_77983_a", "setTagInfo")); - mInitMap.put(new Pair("func_77984_f", "isItemStackDamageable")); - mInitMap.put(new Pair("func_77985_e", "isStackable")); - mInitMap.put(new Pair("func_77986_q", "getEnchantmentTagList")); - mInitMap.put(new Pair("func_77988_m", "getMaxItemUseDuration")); - mInitMap.put(new Pair("func_77989_b", "areItemStacksEqual")); - mInitMap.put(new Pair("func_77995_e", "getEnchantability")); - mInitMap.put(new Pair("func_77996_d", "getHarvestLevel")); - mInitMap.put(new Pair("func_77997_a", "getMaxUses")); - mInitMap.put(new Pair("func_77998_b", "getEfficiencyOnProperMaterial")); - mInitMap.put(new Pair("func_78000_c", "getDamageVsEntity")); - mInitMap.put(new Pair("func_78013_b", "getTabLabel")); - mInitMap.put(new Pair("func_78014_h", "setNoTitle")); - mInitMap.put(new Pair("func_78015_f", "getBackgroundImageName")); - mInitMap.put(new Pair("func_78016_d", "getTabIconItem")); - mInitMap.put(new Pair("func_78017_i", "shouldHidePlayerInventory")); - mInitMap.put(new Pair("func_78018_a", "displayAllReleventItems")); - mInitMap.put(new Pair("func_78019_g", "drawInForegroundOfTab")); - mInitMap.put(new Pair("func_78020_k", "getTabColumn")); - mInitMap.put(new Pair("func_78021_a", "getTabIndex")); - mInitMap.put(new Pair("func_78022_j", "setNoScrollbar")); - mInitMap.put(new Pair("func_78023_l", "isTabInFirstRow")); - mInitMap.put(new Pair("func_78024_c", "getTranslatedTabLabel")); - mInitMap.put(new Pair("func_78025_a", "setBackgroundImageName")); - mInitMap.put(new Pair("func_78044_b", "getDamageReductionAmount")); - mInitMap.put(new Pair("func_78045_a", "getEnchantability")); - mInitMap.put(new Pair("func_78046_a", "getDurability")); - mInitMap.put(new Pair("func_78084_a", "getTextureOffset")); - mInitMap.put(new Pair("func_78085_a", "setTextureOffset")); - mInitMap.put(new Pair("func_78086_a", "setLivingAnimations")); - mInitMap.put(new Pair("func_78087_a", "setRotationAngles")); - mInitMap.put(new Pair("func_78088_a", "render")); - mInitMap.put(new Pair("func_78110_b", "renderEars")); - mInitMap.put(new Pair("func_78111_c", "renderCloak")); - mInitMap.put(new Pair("func_78164_a", "renderSign")); - mInitMap.put(new Pair("func_78214_a", "updateRotations")); - mInitMap.put(new Pair("func_78231_a", "renderAll")); - mInitMap.put(new Pair("func_78235_a", "flipFace")); - mInitMap.put(new Pair("func_78236_a", "draw")); - mInitMap.put(new Pair("func_78240_a", "setTexturePosition")); - mInitMap.put(new Pair("func_78245_a", "render")); - mInitMap.put(new Pair("func_78255_a", "renderStringAtPos")); - mInitMap.put(new Pair("func_78256_a", "getStringWidth")); - mInitMap.put(new Pair("func_78257_a", "loadGlyphTexture")); - mInitMap.put(new Pair("func_78258_a", "renderString")); - mInitMap.put(new Pair("func_78259_e", "sizeStringToWidth")); - mInitMap.put(new Pair("func_78260_a", "getBidiFlag")); - mInitMap.put(new Pair("func_78261_a", "drawStringWithShadow")); - mInitMap.put(new Pair("func_78262_a", "trimStringToWidth")); - mInitMap.put(new Pair("func_78263_a", "getCharWidth")); - mInitMap.put(new Pair("func_78264_a", "setUnicodeFlag")); - mInitMap.put(new Pair("func_78265_b", "resetStyles")); - mInitMap.put(new Pair("func_78266_a", "renderDefaultChar")); - mInitMap.put(new Pair("func_78267_b", "splitStringWidth")); - mInitMap.put(new Pair("func_78268_b", "renderSplitString")); - mInitMap.put(new Pair("func_78269_a", "trimStringToWidth")); - mInitMap.put(new Pair("func_78270_c", "isFormatSpecial")); - mInitMap.put(new Pair("func_78271_c", "listFormattedStringToWidth")); - mInitMap.put(new Pair("func_78272_b", "isFormatColor")); - mInitMap.put(new Pair("func_78273_d", "trimStringmInitMap.put(newline")); - mInitMap.put(new Pair("func_78274_b", "renderStringAligned")); - mInitMap.put(new Pair("func_78275_b", "setBidiFlag")); - mInitMap.put(new Pair("func_78276_b", "drawString")); - mInitMap.put(new Pair("func_78277_a", "renderUnicodeChar")); - mInitMap.put(new Pair("func_78278_a", "renderCharAtPos")); - mInitMap.put(new Pair("func_78279_b", "drawSplitString")); - mInitMap.put(new Pair("func_78280_d", "wrapFormattedStringToWidth")); - mInitMap.put(new Pair("func_78282_e", "getFormatFromString")); - mInitMap.put(new Pair("func_78324_d", "getScaledHeight_double")); - mInitMap.put(new Pair("func_78325_e", "getScaleFactor")); - mInitMap.put(new Pair("func_78326_a", "getScaledWidth")); - mInitMap.put(new Pair("func_78327_c", "getScaledWidth_double")); - mInitMap.put(new Pair("func_78328_b", "getScaledHeight")); - mInitMap.put(new Pair("func_78369_a", "setColorRGBA_F")); - mInitMap.put(new Pair("func_78370_a", "setColorRGBA")); - mInitMap.put(new Pair("func_78371_b", "startDrawing")); - mInitMap.put(new Pair("func_78372_c", "addTranslation")); - mInitMap.put(new Pair("func_78373_b", "setTranslation")); - mInitMap.put(new Pair("func_78374_a", "addVertexWithUV")); - mInitMap.put(new Pair("func_78375_b", "setNormal")); - mInitMap.put(new Pair("func_78376_a", "setColorOpaque")); - mInitMap.put(new Pair("func_78377_a", "addVertex")); - mInitMap.put(new Pair("func_78378_d", "setColorOpaque_I")); - mInitMap.put(new Pair("func_78379_d", "reset")); - mInitMap.put(new Pair("func_78380_c", "setBrightness")); - mInitMap.put(new Pair("func_78381_a", "draw")); - mInitMap.put(new Pair("func_78382_b", "startDrawingQuads")); - mInitMap.put(new Pair("func_78383_c", "disableColor")); - mInitMap.put(new Pair("func_78384_a", "setColorRGBA_I")); - mInitMap.put(new Pair("func_78385_a", "setTextureUV")); - mInitMap.put(new Pair("func_78386_a", "setColorOpaque_F")); - mInitMap.put(new Pair("func_78418_a", "rendersChunk")); - mInitMap.put(new Pair("func_78419_a", "callLists")); - mInitMap.put(new Pair("func_78420_a", "addGLRenderList")); - mInitMap.put(new Pair("func_78421_b", "resetList")); - mInitMap.put(new Pair("func_78422_a", "setupRenderList")); - mInitMap.put(new Pair("func_78432_a", "parseUserSkin")); - mInitMap.put(new Pair("func_78433_b", "setAreaOpaque")); - mInitMap.put(new Pair("func_78434_a", "setAreaTransparent")); - mInitMap.put(new Pair("func_78435_c", "hasTransparency")); - mInitMap.put(new Pair("func_78439_a", "renderItemIn2D")); - mInitMap.put(new Pair("func_78440_a", "renderItemInFirstPerson")); - mInitMap.put(new Pair("func_78441_a", "updateEquippedItem")); - mInitMap.put(new Pair("func_78442_d", "renderFireInFirstPerson")); - mInitMap.put(new Pair("func_78443_a", "renderItem")); - mInitMap.put(new Pair("func_78444_b", "resetEquippedProgress")); - mInitMap.put(new Pair("func_78445_c", "resetEquippedProgress2")); - mInitMap.put(new Pair("func_78446_a", "renderInsideOfBlock")); - mInitMap.put(new Pair("func_78447_b", "renderOverlays")); - mInitMap.put(new Pair("func_78448_c", "renderWaterOverlayTexture")); - mInitMap.put(new Pair("func_78463_b", "enableLightmap")); - mInitMap.put(new Pair("func_78464_a", "updateRenderer")); - mInitMap.put(new Pair("func_78466_h", "updateFogColor")); - mInitMap.put(new Pair("func_78467_g", "orientCamera")); - mInitMap.put(new Pair("func_78468_a", "setupFog")); - mInitMap.put(new Pair("func_78469_a", "setFogColorBuffer")); - mInitMap.put(new Pair("func_78470_f", "updateTorchFlicker")); - mInitMap.put(new Pair("func_78471_a", "renderWorld")); - mInitMap.put(new Pair("func_78472_g", "updateLightmap")); - mInitMap.put(new Pair("func_78473_a", "getMouseOver")); - mInitMap.put(new Pair("func_78474_d", "renderRainSnow")); - mInitMap.put(new Pair("func_78475_f", "setupViewBobbing")); - mInitMap.put(new Pair("func_78476_b", "renderHand")); - mInitMap.put(new Pair("func_78477_e", "updateFovModifierHand")); - mInitMap.put(new Pair("func_78478_c", "setupOverlayRendering")); - mInitMap.put(new Pair("func_78479_a", "setupCameraTransform")); - mInitMap.put(new Pair("func_78480_b", "updateCameraAndRender")); - mInitMap.put(new Pair("func_78481_a", "getFOVModifier")); - mInitMap.put(new Pair("func_78482_e", "hurtCameraEffect")); - mInitMap.put(new Pair("func_78483_a", "disableLightmap")); - mInitMap.put(new Pair("func_78484_h", "addRainParticles")); - mInitMap.put(new Pair("func_78546_a", "isBoundingBoxInFrustum")); - mInitMap.put(new Pair("func_78547_a", "setPosition")); - mInitMap.put(new Pair("func_78548_b", "isBoxInFrustum")); - mInitMap.put(new Pair("func_78553_b", "isBoxInFrustum")); - mInitMap.put(new Pair("func_78558_a", "getInstance")); - mInitMap.put(new Pair("func_78559_a", "normalize")); - mInitMap.put(new Pair("func_78560_b", "init")); - mInitMap.put(new Pair("func_78713_a", "getEntityRenderObject")); - mInitMap.put(new Pair("func_78714_a", "getDistanceToCamera")); - mInitMap.put(new Pair("func_78715_a", "getEntityClassRenderObject")); - mInitMap.put(new Pair("func_78716_a", "getFontRenderer")); - mInitMap.put(new Pair("func_78717_a", "set")); - mInitMap.put(new Pair("func_78738_b", "createNextComponentRandom")); - mInitMap.put(new Pair("func_78743_b", "clickBlock")); - mInitMap.put(new Pair("func_78744_a", "clickBlockCreative")); - mInitMap.put(new Pair("func_78745_b", "flipPlayer")); - mInitMap.put(new Pair("func_78746_a", "setGameType")); - mInitMap.put(new Pair("func_78747_a", "enableEverythingIsScrewedUpMode")); - mInitMap.put(new Pair("func_78748_a", "setPlayerCapabilities")); - mInitMap.put(new Pair("func_78749_i", "extendedReach")); - mInitMap.put(new Pair("func_78750_j", "syncCurrentPlayItem")); - mInitMap.put(new Pair("func_78751_a", "onPlayerDestroyBlock")); - mInitMap.put(new Pair("func_78752_a", "sendPacketDropItem")); - mInitMap.put(new Pair("func_78753_a", "windowClick")); - mInitMap.put(new Pair("func_78755_b", "shouldDrawHUD")); - mInitMap.put(new Pair("func_78756_a", "sendEnchantPacket")); - mInitMap.put(new Pair("func_78757_d", "getBlockReachDistance")); - mInitMap.put(new Pair("func_78758_h", "isInCreativeMode")); - mInitMap.put(new Pair("func_78759_c", "onPlayerDamageBlock")); - mInitMap.put(new Pair("func_78760_a", "onPlayerRightClick")); - mInitMap.put(new Pair("func_78761_a", "sendSlotPacket")); - mInitMap.put(new Pair("func_78762_g", "isNotCreative")); - mInitMap.put(new Pair("func_78763_f", "gameIsSurvivalOrAdventure")); - mInitMap.put(new Pair("func_78764_a", "attackEntity")); - mInitMap.put(new Pair("func_78765_e", "updateController")); - mInitMap.put(new Pair("func_78766_c", "onStoppedUsingItem")); - mInitMap.put(new Pair("func_78767_c", "resetBlockRemoving")); - mInitMap.put(new Pair("func_78768_b", "interactWithEntitySendPacket")); - mInitMap.put(new Pair("func_78769_a", "sendUseItem")); - mInitMap.put(new Pair("func_78784_a", "setTextureOffset")); - mInitMap.put(new Pair("func_78785_a", "render")); - mInitMap.put(new Pair("func_78786_a", "addBox")); - mInitMap.put(new Pair("func_78787_b", "setTextureSize")); - mInitMap.put(new Pair("func_78788_d", "compileDisplayList")); - mInitMap.put(new Pair("func_78789_a", "addBox")); - mInitMap.put(new Pair("func_78790_a", "addBox")); - mInitMap.put(new Pair("func_78791_b", "renderWithRotation")); - mInitMap.put(new Pair("func_78792_a", "addChild")); - mInitMap.put(new Pair("func_78793_a", "setRotationPoint")); - mInitMap.put(new Pair("func_78794_c", "postRender")); - mInitMap.put(new Pair("func_78815_a", "getRandomComponent")); - mInitMap.put(new Pair("func_78817_b", "getNextMineShaftComponent")); - mInitMap.put(new Pair("func_78836_a", "getNBTCompound")); - mInitMap.put(new Pair("func_78837_a", "getServerDataFromNBTCompound")); - mInitMap.put(new Pair("func_78849_a", "addServerData")); - mInitMap.put(new Pair("func_78850_a", "getServerData")); - mInitMap.put(new Pair("func_78851_b", "removeServerData")); - mInitMap.put(new Pair("func_78853_a", "loadServerList")); - mInitMap.put(new Pair("func_78855_b", "saveServerList")); - mInitMap.put(new Pair("func_78856_c", "countServers")); - mInitMap.put(new Pair("func_78857_a", "swapServers")); - mInitMap.put(new Pair("func_78861_a", "getIP")); - mInitMap.put(new Pair("func_78862_a", "parseIntWithDefault")); - mInitMap.put(new Pair("func_78863_b", "getServerAddress")); - mInitMap.put(new Pair("func_78864_b", "getPort")); - mInitMap.put(new Pair("func_78867_a", "addBlockHitEffects")); - mInitMap.put(new Pair("func_78868_a", "updateEffects")); - mInitMap.put(new Pair("func_78869_b", "getStatistics")); - mInitMap.put(new Pair("func_78870_a", "clearEffects")); - mInitMap.put(new Pair("func_78872_b", "renderLitParticles")); - mInitMap.put(new Pair("func_78873_a", "addEffect")); - mInitMap.put(new Pair("func_78874_a", "renderParticles")); - mInitMap.put(new Pair("func_78879_f", "getCenterY")); - mInitMap.put(new Pair("func_78880_d", "getZSize")); - mInitMap.put(new Pair("func_78881_e", "getCenterX")); - mInitMap.put(new Pair("func_78882_c", "getYSize")); - mInitMap.put(new Pair("func_78883_b", "getXSize")); - mInitMap.put(new Pair("func_78884_a", "intersectsWith")); - mInitMap.put(new Pair("func_78885_a", "intersectsWith")); - mInitMap.put(new Pair("func_78886_a", "offset")); - mInitMap.put(new Pair("func_78887_a", "getmInitMap.put(newBoundingBox")); - mInitMap.put(new Pair("func_78888_b", "expandTo")); - mInitMap.put(new Pair("func_78889_a", "getComponentToAddBoundingBox")); - mInitMap.put(new Pair("func_78890_b", "isVecInside")); - mInitMap.put(new Pair("func_78891_g", "getCenterZ")); - mInitMap.put(new Pair("func_78898_a", "updatePlayerMoveState")); - mInitMap.put(new Pair("func_78904_d", "callOcclusionQueryList")); - mInitMap.put(new Pair("func_78905_g", "setupGLTranslation")); - mInitMap.put(new Pair("func_78906_e", "skipAllRenderPasses")); - mInitMap.put(new Pair("func_78908_a", "updateInFrustum")); - mInitMap.put(new Pair("func_78909_a", "getGLCallListForPass")); - mInitMap.put(new Pair("func_78910_b", "setDontDraw")); - mInitMap.put(new Pair("func_78911_c", "stopRendering")); - mInitMap.put(new Pair("func_78912_a", "distanceToEntitySquared")); - mInitMap.put(new Pair("func_78913_a", "setPosition")); - mInitMap.put(new Pair("func_78914_f", "markDirty")); - mInitMap.put(new Pair("func_80003_ah", "getPlayerUsageSnooper")); - mInitMap.put(new Pair("func_80006_f", "getUniqueID")); - mInitMap.put(new Pair("func_80007_l", "getDimensionName")); - mInitMap.put(new Pair("func_82114_b", "getCommandSenderPosition")); - mInitMap.put(new Pair("func_82141_a", "copyDataFrom")); - mInitMap.put(new Pair("func_82142_c", "setInvisible")); - mInitMap.put(new Pair("func_82143_as", "getMaxFallHeight")); - mInitMap.put(new Pair("func_82145_z", "getMaxInPortalTime")); - mInitMap.put(new Pair("func_82147_ab", "getPortalCooldown")); - mInitMap.put(new Pair("func_82148_at", "getTeleportDirection")); - mInitMap.put(new Pair("func_82149_j", "copyLocationAndAnglesFrom")); - mInitMap.put(new Pair("func_82150_aj", "isInvisible")); - mInitMap.put(new Pair("func_82159_b", "getArmorPosition")); - mInitMap.put(new Pair("func_82160_b", "dropEquipment")); - mInitMap.put(new Pair("func_82161_a", "getArmorItemForSlot")); - mInitMap.put(new Pair("func_82162_bC", "enchantEquipment")); - mInitMap.put(new Pair("func_82164_bB", "addRandomArmor")); - mInitMap.put(new Pair("func_82165_m", "isPotionActive")); - mInitMap.put(new Pair("func_82166_i", "getArmSwingAnimationEnd")); - mInitMap.put(new Pair("func_82167_n", "collideWithEntity")); - mInitMap.put(new Pair("func_82168_bl", "updateArmSwingProgress")); - mInitMap.put(new Pair("func_82169_q", "getCurrentArmor")); - mInitMap.put(new Pair("func_82170_o", "removePotionEffect")); - mInitMap.put(new Pair("func_82171_bF", "canBeSteered")); - mInitMap.put(new Pair("func_82183_n", "getAIControlledByPlayer")); - mInitMap.put(new Pair("func_82185_r", "setCollarColor")); - mInitMap.put(new Pair("func_82186_bH", "getCollarColor")); - mInitMap.put(new Pair("func_82187_q", "setLookingForHome")); - mInitMap.put(new Pair("func_82188_j", "adjustProbability")); - mInitMap.put(new Pair("func_82196_d", "attackEntityWithRangedAttack")); - mInitMap.put(new Pair("func_82197_f", "setAggressive")); - mInitMap.put(new Pair("func_82198_m", "getAggressive")); - mInitMap.put(new Pair("func_82201_a", "setSkeletonType")); - mInitMap.put(new Pair("func_82202_m", "getSkeletonType")); - mInitMap.put(new Pair("func_82203_t", "getWatchedTargetId")); - mInitMap.put(new Pair("func_82205_o", "isArmored")); - mInitMap.put(new Pair("func_82209_a", "launchWitherSkullToCoords")); - mInitMap.put(new Pair("func_82212_n", "getInvulTime")); - mInitMap.put(new Pair("func_82215_s", "setInvulTime")); - mInitMap.put(new Pair("func_82216_a", "launchWitherSkullToEntity")); - mInitMap.put(new Pair("func_82227_f", "setChild")); - mInitMap.put(new Pair("func_82228_a", "startConversion")); - mInitMap.put(new Pair("func_82229_g", "setVillager")); - mInitMap.put(new Pair("func_82230_o", "isConverting")); - mInitMap.put(new Pair("func_82231_m", "isVillager")); - mInitMap.put(new Pair("func_82232_p", "convertToVillager")); - mInitMap.put(new Pair("func_82233_q", "getConversionTimeBoost")); - mInitMap.put(new Pair("func_82235_h", "getIsBatHanging")); - mInitMap.put(new Pair("func_82236_f", "setIsBatHanging")); - mInitMap.put(new Pair("func_82238_cc", "getHideCape")); - mInitMap.put(new Pair("func_82239_b", "setHideCape")); - mInitMap.put(new Pair("func_82241_s", "getHideCape")); - mInitMap.put(new Pair("func_82242_a", "addExperienceLevel")); - mInitMap.put(new Pair("func_82243_bO", "getArmorVisibility")); - mInitMap.put(new Pair("func_82244_d", "displayGUIAnvil")); - mInitMap.put(new Pair("func_82245_bX", "isSpawnForced")); - mInitMap.put(new Pair("func_82246_f", "isCurrentToolAdventureModeExempt")); - mInitMap.put(new Pair("func_82247_a", "canPlayerEdit")); - mInitMap.put(new Pair("func_82328_a", "setDirection")); - mInitMap.put(new Pair("func_82329_d", "getWidthPixels")); - mInitMap.put(new Pair("func_82330_g", "getHeightPixels")); - mInitMap.put(new Pair("func_82333_j", "getRotation")); - mInitMap.put(new Pair("func_82334_a", "setDisplayedItem")); - mInitMap.put(new Pair("func_82335_i", "getDisplayedItem")); - mInitMap.put(new Pair("func_82336_g", "setItemRotation")); - mInitMap.put(new Pair("func_82338_g", "setAlphaF")); - mInitMap.put(new Pair("func_82340_a", "setPotionDamage")); - mInitMap.put(new Pair("func_82341_c", "getMotionFactor")); - mInitMap.put(new Pair("func_82342_d", "isInvulnerable")); - mInitMap.put(new Pair("func_82343_e", "setInvulnerable")); - mInitMap.put(new Pair("func_82356_Z", "isCommandBlockEnabled")); - mInitMap.put(new Pair("func_82357_ak", "getSpawnProtectionSize")); - mInitMap.put(new Pair("func_82358_a", "isUsernameIndex")); - mInitMap.put(new Pair("func_82359_c", "getPlayer")); - mInitMap.put(new Pair("func_82360_a", "getStringFromNthArg")); - mInitMap.put(new Pair("func_82362_a", "getRequiredPermissionLevel")); - mInitMap.put(new Pair("func_82363_b", "parseDouble")); - mInitMap.put(new Pair("func_82366_d", "getGameRules")); - mInitMap.put(new Pair("func_82370_a", "getUsernameIndex")); - mInitMap.put(new Pair("func_82371_e", "getDistanceSquaredToChunkCoordinates")); - mInitMap.put(new Pair("func_82372_a", "getMovementDirection")); - mInitMap.put(new Pair("func_82375_f", "getDefaultMinimumLevel")); - mInitMap.put(new Pair("func_82376_e", "getDefaultMaximumLevel")); - mInitMap.put(new Pair("func_82377_a", "matchesMultiplePlayers")); - mInitMap.put(new Pair("func_82378_b", "hasArguments")); - mInitMap.put(new Pair("func_82379_d", "getDefaultMaximumRange")); - mInitMap.put(new Pair("func_82380_c", "matchPlayers")); - mInitMap.put(new Pair("func_82381_h", "getArgumentMap")); - mInitMap.put(new Pair("func_82382_g", "getDefaultCount")); - mInitMap.put(new Pair("func_82383_a", "hasTheseArguments")); - mInitMap.put(new Pair("func_82384_c", "getDefaultMinimumRange")); - mInitMap.put(new Pair("func_82386_a", "matchOnePlayer")); - mInitMap.put(new Pair("func_82403_a", "renderFrameItemAsBlock")); - mInitMap.put(new Pair("func_82406_b", "renderItemAndEffectIntoGUI")); - mInitMap.put(new Pair("func_82441_a", "renderFirstPersonArm")); - mInitMap.put(new Pair("func_82448_a", "transferEntityToWorld")); - mInitMap.put(new Pair("func_82449_a", "findPlayers")); - mInitMap.put(new Pair("func_82482_a", "dispense")); - mInitMap.put(new Pair("func_82485_a", "playDispenseSound")); - mInitMap.put(new Pair("func_82486_a", "doDispense")); - mInitMap.put(new Pair("func_82487_b", "dispenseStack")); - mInitMap.put(new Pair("func_82489_a", "spawnDispenseParticles")); - mInitMap.put(new Pair("func_82499_a", "getProjectileEntity")); - mInitMap.put(new Pair("func_82565_a", "canEntityStandAt")); - mInitMap.put(new Pair("func_82571_y", "getGeneratorOptions")); - mInitMap.put(new Pair("func_82572_b", "incrementTotalWorldTime")); - mInitMap.put(new Pair("func_82573_f", "getWorldTotalTime")); - mInitMap.put(new Pair("func_82574_x", "getGameRulesInstance")); - mInitMap.put(new Pair("func_82580_o", "removeTag")); - mInitMap.put(new Pair("func_82581_a", "createCrashReport")); - mInitMap.put(new Pair("func_82582_d", "hasNoTags")); - mInitMap.put(new Pair("func_82594_a", "getObject")); - mInitMap.put(new Pair("func_82595_a", "putObject")); - mInitMap.put(new Pair("func_82599_e", "getFrontOffsetZ")); - mInitMap.put(new Pair("func_82600_a", "getFront")); - mInitMap.put(new Pair("func_82601_c", "getFrontOffsetX")); - mInitMap.put(new Pair("func_82615_a", "getX")); - mInitMap.put(new Pair("func_82616_c", "getZ")); - mInitMap.put(new Pair("func_82617_b", "getY")); - mInitMap.put(new Pair("func_82618_k", "getWorld")); - mInitMap.put(new Pair("func_82620_h", "getBlockMetadata")); - mInitMap.put(new Pair("func_82621_f", "getZInt")); - mInitMap.put(new Pair("func_82622_e", "getYInt")); - mInitMap.put(new Pair("func_82623_d", "getXInt")); - mInitMap.put(new Pair("func_82632_g", "boostSpeed")); - mInitMap.put(new Pair("func_82633_h", "isControlledByPlayer")); - mInitMap.put(new Pair("func_82634_f", "isSpeedBoosted")); - mInitMap.put(new Pair("func_82644_b", "getWorldFeatures")); - mInitMap.put(new Pair("func_82647_a", "setBiome")); - mInitMap.put(new Pair("func_82648_a", "getBiome")); - mInitMap.put(new Pair("func_82649_e", "getDefaultFlatGenerator")); - mInitMap.put(new Pair("func_82650_c", "getFlatLayers")); - mInitMap.put(new Pair("func_82651_a", "createFlatGeneratorFromString")); - mInitMap.put(new Pair("func_82656_d", "getMinY")); - mInitMap.put(new Pair("func_82657_a", "getLayerCount")); - mInitMap.put(new Pair("func_82658_c", "getFillBlockMeta")); - mInitMap.put(new Pair("func_82660_d", "setMinY")); - mInitMap.put(new Pair("func_82667_a", "getScatteredFeatureSpawnList")); - mInitMap.put(new Pair("func_82683_b", "setDefaultPlayerReputation")); - mInitMap.put(new Pair("func_82684_a", "getReputationForPlayer")); - mInitMap.put(new Pair("func_82686_i", "isMatingSeason")); - mInitMap.put(new Pair("func_82687_d", "isPlayerReputationTooLow")); - mInitMap.put(new Pair("func_82688_a", "setReputationForPlayer")); - mInitMap.put(new Pair("func_82689_b", "writeVillageDataToNBT")); - mInitMap.put(new Pair("func_82690_a", "readVillageDataFromNBT")); - mInitMap.put(new Pair("func_82692_h", "endMatingSeason")); - mInitMap.put(new Pair("func_82695_e", "recreateStructures")); - mInitMap.put(new Pair("func_82704_a", "isEntityApplicable")); - mInitMap.put(new Pair("func_82705_e", "getAnimal")); - mInitMap.put(new Pair("func_82708_h", "setObjectWatched")); - mInitMap.put(new Pair("func_82709_a", "addObjectByDataType")); - mInitMap.put(new Pair("func_82710_f", "getWatchableObjectItemStack")); - mInitMap.put(new Pair("func_82712_a", "parseDoubleWithDefault")); - mInitMap.put(new Pair("func_82713_a", "parseDoubleWithDefaultAndMax")); - mInitMap.put(new Pair("func_82714_a", "parseIntWithDefaultAndMax")); - mInitMap.put(new Pair("func_82715_a", "parseIntWithDefault")); - mInitMap.put(new Pair("func_82716_a", "getRandomDoubleInRange")); - mInitMap.put(new Pair("func_82719_a", "writeCustomPotionEffectToNBT")); - mInitMap.put(new Pair("func_82720_e", "getIsAmbient")); - mInitMap.put(new Pair("func_82721_a", "setSplashPotion")); - mInitMap.put(new Pair("func_82722_b", "readCustomPotionEffectFromNBT")); - mInitMap.put(new Pair("func_82725_o", "isMagicDamage")); - mInitMap.put(new Pair("func_82726_p", "setMagicDamage")); - mInitMap.put(new Pair("func_82733_a", "selectEntitiesWithinAABB")); - mInitMap.put(new Pair("func_82734_g", "getChunkHeightMapMinimum")); - mInitMap.put(new Pair("func_82736_K", "getGameRules")); - mInitMap.put(new Pair("func_82737_E", "getTotalWorldTime")); - mInitMap.put(new Pair("func_82739_e", "playBroadcastSound")); - mInitMap.put(new Pair("func_82742_i", "resetUpdateEntityTick")); - mInitMap.put(new Pair("func_82743_f", "getCreationCloudUpdateTick")); - mInitMap.put(new Pair("func_82744_b", "setCloudUpdateTick")); - mInitMap.put(new Pair("func_82746_a", "broadcastSound")); - mInitMap.put(new Pair("func_82747_f", "getWorldTypeID")); - mInitMap.put(new Pair("func_82750_a", "setWorldName")); - mInitMap.put(new Pair("func_82752_c", "isAdventure")); - mInitMap.put(new Pair("func_82753_a", "setPriority")); - mInitMap.put(new Pair("func_82756_a", "getGameRuleStringValue")); - mInitMap.put(new Pair("func_82757_a", "setValue")); - mInitMap.put(new Pair("func_82758_b", "getGameRuleBooleanValue")); - mInitMap.put(new Pair("func_82763_b", "getRules")); - mInitMap.put(new Pair("func_82764_b", "setOrCreateGameRule")); - mInitMap.put(new Pair("func_82765_e", "hasRule")); - mInitMap.put(new Pair("func_82766_b", "getGameRuleBooleanValue")); - mInitMap.put(new Pair("func_82767_a", "getGameRuleStringValue")); - mInitMap.put(new Pair("func_82768_a", "readGameRulesFromNBT")); - mInitMap.put(new Pair("func_82769_a", "addGameRule")); - mInitMap.put(new Pair("func_82770_a", "writeGameRulesToNBT")); - mInitMap.put(new Pair("func_82781_a", "getEnchantments")); - mInitMap.put(new Pair("func_82782_a", "setEnchantments")); - mInitMap.put(new Pair("func_82784_g", "isRecipeDisabled")); - mInitMap.put(new Pair("func_82787_a", "findMatchingRecipe")); - mInitMap.put(new Pair("func_82788_x", "canItemEditBlocks")); - mInitMap.put(new Pair("func_82789_a", "getIsRepairable")); - mInitMap.put(new Pair("func_82790_a", "getColorFromItemStack")); - mInitMap.put(new Pair("func_82810_a", "createHangingEntity")); - mInitMap.put(new Pair("func_82812_d", "getArmorMaterial")); - mInitMap.put(new Pair("func_82814_b", "getColor")); - mInitMap.put(new Pair("func_82815_c", "removeColor")); - mInitMap.put(new Pair("func_82816_b_", "hasColor")); - mInitMap.put(new Pair("func_82824_a", "setBossStatus")); - mInitMap.put(new Pair("func_82829_a", "renderCloudsCheck")); - mInitMap.put(new Pair("func_82830_a", "getNightVisionBrightness")); - mInitMap.put(new Pair("func_82833_r", "getDisplayName")); - mInitMap.put(new Pair("func_82835_x", "canEditBlocks")); - mInitMap.put(new Pair("func_82836_z", "getItemFrame")); - mInitMap.put(new Pair("func_82837_s", "hasDisplayName")); - mInitMap.put(new Pair("func_82838_A", "getRepairCost")); - mInitMap.put(new Pair("func_82839_y", "isOnItemFrame")); - mInitMap.put(new Pair("func_82840_a", "getTooltip")); - mInitMap.put(new Pair("func_82841_c", "setRepairCost")); - mInitMap.put(new Pair("func_82842_a", "setItemFrame")); - mInitMap.put(new Pair("func_82846_b", "transferStackInSlot")); - mInitMap.put(new Pair("func_82847_b", "removeCraftingFromCrafters")); - mInitMap.put(new Pair("func_82848_d", "updateRepairOutput")); - mInitMap.put(new Pair("func_82850_a", "updateItemName")); - mInitMap.put(new Pair("func_82869_a", "canTakeStack")); - mInitMap.put(new Pair("func_82870_a", "onPickupFromSlot")); - mInitMap.put(new Pair("func_82877_b", "setPlayerWalkSpeed")); - mInitMap.put(new Pair("func_82879_c", "sendSettingsToServer")); - mInitMap.put(new Pair("func_82883_a", "getUnicodeFlag")); - mInitMap.put(new Pair("func_82889_a", "getBatSize")); - mInitMap.put(new Pair("func_83015_S", "getCurrentDate")); - mInitMap.put(new Pair("func_85029_a", "addEntityCrashInfo")); - mInitMap.put(new Pair("func_85030_a", "playSound")); - mInitMap.put(new Pair("func_85031_j", "hitByEntity")); - mInitMap.put(new Pair("func_85032_ar", "isEntityInvulnerable")); - mInitMap.put(new Pair("func_85033_bc", "collideWithNearbyEntities")); - mInitMap.put(new Pair("func_85034_r", "setArrowCountInEntity")); - mInitMap.put(new Pair("func_85035_bI", "getArrowCountInEntity")); - mInitMap.put(new Pair("func_85036_m", "setCombatTask")); - mInitMap.put(new Pair("func_85039_t", "addScore")); - mInitMap.put(new Pair("func_85040_s", "setScore")); - mInitMap.put(new Pair("func_85052_h", "getThrower")); - mInitMap.put(new Pair("func_85054_d", "searchForOtherItemsNearby")); - mInitMap.put(new Pair("func_85055_a", "makeCrashReport")); - mInitMap.put(new Pair("func_85056_g", "getCategory")); - mInitMap.put(new Pair("func_85057_a", "makeCategoryDepth")); - mInitMap.put(new Pair("func_85058_a", "makeCategory")); - mInitMap.put(new Pair("func_85069_a", "firstTwoElementsOfStackTraceMatch")); - mInitMap.put(new Pair("func_85070_b", "trimStackTraceEntriesFromBottom")); - mInitMap.put(new Pair("func_85071_a", "getLocationInfo")); - mInitMap.put(new Pair("func_85072_a", "appendToStringBuilder")); - mInitMap.put(new Pair("func_85073_a", "getPrunedStackTrace")); - mInitMap.put(new Pair("func_85093_e", "renderArrowsStuckInEntity")); - mInitMap.put(new Pair("func_85094_b", "renderDebugBoundingBox")); - mInitMap.put(new Pair("func_85102_a", "playSoundToNearExcept")); - mInitMap.put(new Pair("func_85118_a", "addToCrashReport")); - mInitMap.put(new Pair("func_85144_b", "getCacheSizes")); - mInitMap.put(new Pair("func_85151_d", "getLowerChestInventory")); - mInitMap.put(new Pair("func_85156_a", "removeTask")); - mInitMap.put(new Pair("func_85157_q", "isAdventureModeExempt")); - mInitMap.put(new Pair("func_85158_p", "setAdventureModeExempt")); - mInitMap.put(new Pair("func_85173_a", "playSoundToNearExcept")); - mInitMap.put(new Pair("func_85176_s", "getDefaultTeleporter")); - mInitMap.put(new Pair("func_85181_a", "getRandomModelBox")); - mInitMap.put(new Pair("func_85182_a", "sameToolAndBlock")); - mInitMap.put(new Pair("func_85187_a", "drawString")); - mInitMap.put(new Pair("func_85188_a", "makePortal")); - mInitMap.put(new Pair("func_85189_a", "removeStalePortalLocations")); - mInitMap.put(new Pair("func_90010_a", "isPartOfLargeChest")); - mInitMap.put(new Pair("func_90011_a", "createChild")); - mInitMap.put(new Pair("func_90013_b", "getDyeFromFleeceColor")); - mInitMap.put(new Pair("func_90014_a", "getDyeBasedOnParents")); - mInitMap.put(new Pair("func_90019_g", "applyRenderColor")); - mInitMap.put(new Pair("func_90020_K", "getLimitFramerate")); - mInitMap.put(new Pair("func_90022_d", "getListOfPlayers")); - mInitMap.put(new Pair("func_90033_f", "canLoadWorld")); - mInitMap.put(new Pair("func_90035_a", "getClassFromID")); - mInitMap.put(new Pair("func_90036_a", "getFireAspectModifier")); - mInitMap.put(new Pair("func_90999_ad", "canRenderOnFire")); - mInitMap.put(new Pair("func_92015_f", "closeScreenNoPacket")); - mInitMap.put(new Pair("func_92034_a", "createParticle")); - mInitMap.put(new Pair("func_92035_a", "createBall")); - mInitMap.put(new Pair("func_92036_a", "createBurst")); - mInitMap.put(new Pair("func_92038_a", "createShaped")); - mInitMap.put(new Pair("func_92043_f", "setTwinkle")); - mInitMap.put(new Pair("func_92044_a", "setColour")); - mInitMap.put(new Pair("func_92045_e", "setTrail")); - mInitMap.put(new Pair("func_92046_g", "setFadeColour")); - mInitMap.put(new Pair("func_92058_a", "setEntityItemStack")); - mInitMap.put(new Pair("func_92059_d", "getEntityItem")); - mInitMap.put(new Pair("func_92085_d", "getIsBlank")); - mInitMap.put(new Pair("func_92087_a", "causeThornsDamage")); - mInitMap.put(new Pair("func_92088_a", "makeFireworks")); - mInitMap.put(new Pair("func_92089_a", "canApply")); - mInitMap.put(new Pair("func_92093_a", "getFireTimeForEntity")); - mInitMap.put(new Pair("func_92097_a", "negateDamage")); - mInitMap.put(new Pair("func_92103_a", "addRecipe")); - mInitMap.put(new Pair("func_92111_a", "getEnchantedItemStack")); - mInitMap.put(new Pair("func_92115_a", "addEnchantment")); - mInitMap.put(new Pair("func_92116_a", "addEnchantmentBooksToList")); - mInitMap.put(new Pair("func_94041_b", "isItemValidForSlot")); - mInitMap.put(new Pair("func_94053_h", "nextTextureIndexX")); - mInitMap.put(new Pair("func_94056_bM", "hasCustomNameTag")); - mInitMap.put(new Pair("func_94057_bL", "getCustomNameTag")); - mInitMap.put(new Pair("func_94058_c", "setCustomNameTag")); - mInitMap.put(new Pair("func_94059_bO", "getAlwaysRenderNameTagForRender")); - mInitMap.put(new Pair("func_94061_f", "setAlwaysRenderNameTag")); - mInitMap.put(new Pair("func_94062_bN", "getAlwaysRenderNameTag")); - mInitMap.put(new Pair("func_94065_a", "drawTexturedModelRectFromIcon")); - mInitMap.put(new Pair("func_94083_c", "getTntPlacedBy")); - mInitMap.put(new Pair("func_94085_r", "getDefaultDisplayTileOffset")); - mInitMap.put(new Pair("func_94086_l", "setDisplayTileOffset")); - mInitMap.put(new Pair("func_94087_l", "getMinecartType")); - mInitMap.put(new Pair("func_94090_a", "createMinecart")); - mInitMap.put(new Pair("func_94092_k", "setDisplayTileData")); - mInitMap.put(new Pair("func_94095_a", "killMinecart")); - mInitMap.put(new Pair("func_94096_e", "setHasDisplayTile")); - mInitMap.put(new Pair("func_94097_p", "getDefaultDisplayTileData")); - mInitMap.put(new Pair("func_94098_o", "getDisplayTileData")); - mInitMap.put(new Pair("func_94099_q", "getDisplayTileOffset")); - mInitMap.put(new Pair("func_94100_s", "hasDisplayTile")); - mInitMap.put(new Pair("func_94101_h", "applyDrag")); - mInitMap.put(new Pair("func_94103_c", "explodeCart")); - mInitMap.put(new Pair("func_94105_c", "ignite")); - mInitMap.put(new Pair("func_94107_f", "setMinecartPowered")); - mInitMap.put(new Pair("func_94108_c", "isMinecartPowered")); - mInitMap.put(new Pair("func_94128_d", "getSlotsForFace")); - mInitMap.put(new Pair("func_94140_a", "registerDestroyBlockIcons")); - mInitMap.put(new Pair("func_94143_a", "updateIcons")); - mInitMap.put(new Pair("func_94148_a", "renderItemOverlayIntoGUI")); - mInitMap.put(new Pair("func_94149_a", "renderIcon")); - mInitMap.put(new Pair("func_94178_a", "updateIcons")); - mInitMap.put(new Pair("func_94182_a", "addSlot")); - mInitMap.put(new Pair("func_94183_a", "getStitchHolder")); - mInitMap.put(new Pair("func_94184_a", "getAllStitchSlots")); - mInitMap.put(new Pair("func_94185_c", "getOriginY")); - mInitMap.put(new Pair("func_94186_b", "getOriginX")); - mInitMap.put(new Pair("func_94194_d", "rotate")); - mInitMap.put(new Pair("func_94195_e", "isRotated")); - mInitMap.put(new Pair("func_94196_a", "setmInitMap.put(newDimension")); - mInitMap.put(new Pair("func_94197_a", "getWidth")); - mInitMap.put(new Pair("func_94199_b", "getHeight")); - mInitMap.put(new Pair("func_94206_g", "getMinV")); - mInitMap.put(new Pair("func_94207_b", "getInterpolatedV")); - mInitMap.put(new Pair("func_94209_e", "getMinU")); - mInitMap.put(new Pair("func_94210_h", "getMaxV")); - mInitMap.put(new Pair("func_94211_a", "getIconWidth")); - mInitMap.put(new Pair("func_94212_f", "getMaxU")); - mInitMap.put(new Pair("func_94214_a", "getInterpolatedU")); - mInitMap.put(new Pair("func_94215_i", "getIconName")); - mInitMap.put(new Pair("func_94216_b", "getIconHeight")); - mInitMap.put(new Pair("func_94217_a", "copyFrom")); - mInitMap.put(new Pair("func_94219_l", "updateAnimation")); - mInitMap.put(new Pair("func_94241_a", "updateCompass")); - mInitMap.put(new Pair("func_94245_a", "registerIcon")); - mInitMap.put(new Pair("func_94248_c", "updateAnimations")); - mInitMap.put(new Pair("func_94277_a", "bindTexture")); - mInitMap.put(new Pair("func_94305_f", "doStitch")); - mInitMap.put(new Pair("func_94309_g", "getStichSlots")); - mInitMap.put(new Pair("func_94310_b", "allocateSlot")); - mInitMap.put(new Pair("func_94311_c", "expandAndAllocateSlot")); - mInitMap.put(new Pair("func_94520_b", "isKeyTranslated")); - mInitMap.put(new Pair("func_94522_b", "canTranslate")); - mInitMap.put(new Pair("func_94525_a", "computeStackSize")); - mInitMap.put(new Pair("func_94526_b", "calcRedstoneFromInventory")); - mInitMap.put(new Pair("func_94527_a", "canAddItemToSlot")); - mInitMap.put(new Pair("func_94528_d", "isValidDragMode")); - mInitMap.put(new Pair("func_94529_b", "extractDragMode")); - mInitMap.put(new Pair("func_94531_b", "canDragIntoSlot")); - mInitMap.put(new Pair("func_94532_c", "getDragEvent")); - mInitMap.put(new Pair("func_94533_d", "resetDrag")); - mInitMap.put(new Pair("func_94539_a", "setExplosionSource")); - mInitMap.put(new Pair("func_94540_d", "setExplosion")); - mInitMap.put(new Pair("func_94541_c", "isExplosion")); - mInitMap.put(new Pair("func_94560_a", "getDamageSrc")); - mInitMap.put(new Pair("func_94572_D", "getStrongestIndirectPower")); - mInitMap.put(new Pair("func_94574_k", "getIndirectPowerOutput")); - mInitMap.put(new Pair("func_94576_a", "getEntitiesWithinAABBExcludingEntity")); - mInitMap.put(new Pair("func_94577_B", "getBlockPowerInput")); - mInitMap.put(new Pair("func_94581_a", "registerIcons")); - mInitMap.put(new Pair("func_94599_c", "getItemIconForUseDuration")); - mInitMap.put(new Pair("func_94602_b", "getBackgroundIcon")); - mInitMap.put(new Pair("func_94608_d", "getItemSpriteNumber")); - mInitMap.put(new Pair("func_94613_c", "getExplosivePlacedBy")); - mInitMap.put(new Pair("func_94901_k", "getSpriteNumber")); - mInitMap.put(new Pair("func_96092_aw", "isPushedByWater")); - mInitMap.put(new Pair("func_96094_a", "setMinecartName")); - mInitMap.put(new Pair("func_96095_a", "onActivatorRailPass")); - mInitMap.put(new Pair("func_96096_ay", "isIgnited")); - mInitMap.put(new Pair("func_96107_aA", "getXPos")); - mInitMap.put(new Pair("func_96108_aC", "getZPos")); - mInitMap.put(new Pair("func_96109_aB", "getYPos")); - mInitMap.put(new Pair("func_96110_f", "setBlocked")); - mInitMap.put(new Pair("func_96111_ay", "getBlocked")); - mInitMap.put(new Pair("func_96120_a", "setEquipmentDropChance")); - mInitMap.put(new Pair("func_96122_a", "canAttackPlayer")); - mInitMap.put(new Pair("func_96123_co", "getWorldScoreboard")); - mInitMap.put(new Pair("func_96124_cp", "getTeam")); - mInitMap.put(new Pair("func_96125_a", "displayGUIHopperMinecart")); - mInitMap.put(new Pair("func_96136_a", "renderScoreboard")); - mInitMap.put(new Pair("func_96290_a", "isBlockProtected")); - mInitMap.put(new Pair("func_96296_a", "getValidValues")); - mInitMap.put(new Pair("func_96297_d", "getFriendlyName")); - mInitMap.put(new Pair("func_96298_a", "getFormattingCode")); - mInitMap.put(new Pair("func_96300_b", "getValueByName")); - mInitMap.put(new Pair("func_96301_b", "isFancyStyling")); - mInitMap.put(new Pair("func_96302_c", "isColor")); - mInitMap.put(new Pair("func_96332_d", "getPlayerName")); - mInitMap.put(new Pair("func_96333_a", "joinNiceStringFromCollection")); - mInitMap.put(new Pair("func_96441_U", "getScoreboard")); - mInitMap.put(new Pair("func_96443_a", "setWorldScoreboard")); - mInitMap.put(new Pair("func_96449_a", "renderOffsetLivingLabel")); - mInitMap.put(new Pair("func_96457_a", "matchesScoreboardCriteria")); - mInitMap.put(new Pair("func_96508_e", "getTeam")); - mInitMap.put(new Pair("func_96509_i", "getPlayersTeam")); - mInitMap.put(new Pair("func_96511_d", "removeTeam")); - mInitMap.put(new Pair("func_96512_b", "removePlayerFromTeam")); - mInitMap.put(new Pair("func_96514_c", "getScoreObjectives")); - mInitMap.put(new Pair("func_96517_b", "getObjectiveDisplaySlot")); - mInitMap.put(new Pair("func_96518_b", "getObjective")); - mInitMap.put(new Pair("func_96523_a", "broadcastTeamCreated")); - mInitMap.put(new Pair("func_96524_g", "removePlayerFromTeams")); - mInitMap.put(new Pair("func_96525_g", "getTeams")); - mInitMap.put(new Pair("func_96526_d", "getObjectiveNames")); - mInitMap.put(new Pair("func_96527_f", "createTeam")); - mInitMap.put(new Pair("func_96529_a", "getValueFromObjective")); - mInitMap.put(new Pair("func_96530_a", "setObjectiveInDisplaySlot")); - mInitMap.put(new Pair("func_96531_f", "getTeamNames")); - mInitMap.put(new Pair("func_96534_i", "getSortedScores")); - mInitMap.put(new Pair("func_96535_a", "addScoreObjective")); - mInitMap.put(new Pair("func_96537_j", "getObjectiveDisplaySlotNumber")); - mInitMap.put(new Pair("func_96538_b", "broadcastTeamRemoved")); - mInitMap.put(new Pair("func_96539_a", "getObjectiveInDisplaySlot")); - mInitMap.put(new Pair("func_96559_d", "getFrontOffsetY")); - mInitMap.put(new Pair("func_96631_a", "attemptDamageItem")); - mInitMap.put(new Pair("func_96636_a", "getName")); - mInitMap.put(new Pair("func_96637_b", "isReadOnly")); - mInitMap.put(new Pair("func_96646_b", "decreaseScore")); - mInitMap.put(new Pair("func_96647_c", "setScorePoints")); - mInitMap.put(new Pair("func_96649_a", "increseScore")); - mInitMap.put(new Pair("func_96650_f", "getScoreScoreboard")); - mInitMap.put(new Pair("func_96652_c", "getScorePoints")); - mInitMap.put(new Pair("func_96653_e", "getPlayerName")); - mInitMap.put(new Pair("func_96660_a", "setAllowFriendlyFire")); - mInitMap.put(new Pair("func_96661_b", "getRegisteredName")); - mInitMap.put(new Pair("func_96662_c", "setNameSuffix")); - mInitMap.put(new Pair("func_96663_f", "getColorSuffix")); - mInitMap.put(new Pair("func_96664_a", "setTeamName")); - mInitMap.put(new Pair("func_96665_g", "getAllowFriendlyFire")); - mInitMap.put(new Pair("func_96666_b", "setNamePrefix")); - mInitMap.put(new Pair("func_96667_a", "formatPlayerName")); - mInitMap.put(new Pair("func_96668_e", "getColorPrefix")); - mInitMap.put(new Pair("func_96670_d", "getMembershipCollection")); - mInitMap.put(new Pair("func_96678_d", "getDisplayName")); - mInitMap.put(new Pair("func_96679_b", "getName")); - mInitMap.put(new Pair("func_96680_c", "getCriteria")); - mInitMap.put(new Pair("func_96681_a", "setDisplayName")); - mInitMap.put(new Pair("func_96682_a", "getScoreboard")); - mInitMap.put(new Pair("func_98034_c", "isInvisibleToPlayer")); - mInitMap.put(new Pair("func_98035_c", "writeMountToNBT")); - mInitMap.put(new Pair("func_98042_n", "setTransferTicker")); - mInitMap.put(new Pair("func_98043_aE", "canTransfer")); - mInitMap.put(new Pair("func_98052_bS", "canPickUpLoot")); - mInitMap.put(new Pair("func_98053_h", "setCanPickUpLoot")); - mInitMap.put(new Pair("func_98054_a", "setScaleForAge")); - mInitMap.put(new Pair("func_98055_j", "setScale")); - mInitMap.put(new Pair("func_98150_a", "getAtlasSprite")); - mInitMap.put(new Pair("func_98152_d", "getAllUsernames")); - mInitMap.put(new Pair("func_98179_a", "computeLightValue")); - mInitMap.put(new Pair("func_98265_a", "spawnEntity")); - mInitMap.put(new Pair("func_98266_d", "getSpawnerZ")); - mInitMap.put(new Pair("func_98268_b", "setDelayToMin")); - mInitMap.put(new Pair("func_98269_i", "getRandomEntity")); - mInitMap.put(new Pair("func_98270_a", "readFromNBT")); - mInitMap.put(new Pair("func_98271_a", "getSpawnerWorld")); - mInitMap.put(new Pair("func_98272_a", "setEntityName")); - mInitMap.put(new Pair("func_98273_j", "resetTimer")); - mInitMap.put(new Pair("func_98274_c", "getSpawnerY")); - mInitMap.put(new Pair("func_98275_b", "getSpawnerX")); - mInitMap.put(new Pair("func_98276_e", "getEntityNameToSpawn")); - mInitMap.put(new Pair("func_98277_a", "setRandomEntity")); - mInitMap.put(new Pair("func_98278_g", "updateSpawner")); - mInitMap.put(new Pair("func_98279_f", "isActivated")); - mInitMap.put(new Pair("func_98280_b", "writeToNBT")); - mInitMap.put(new Pair("func_98281_h", "getEntityToRender")); - mInitMap.put(new Pair("func_98300_b", "setSeeFriendlyInvisiblesEnabled")); - mInitMap.put(new Pair("func_98306_d", "readGlyphSizes")); - mInitMap.put(new Pair("func_99999_d", "run")); - } - - public static void init4() { - mObInitMap.put(new Pair("aqc", "net/minecraft/world/chunk/storage/IChunkLoader")); - mObInitMap.put(new Pair("amd", "net/minecraft/block/BlockMycelium")); - mObInitMap.put(new Pair("aag", "net/minecraft/inventory/ContainerEnchantment")); - mObInitMap.put(new Pair("aie", "net/minecraft/world/biome/WorldChunkManagerHell")); - mObInitMap.put(new Pair("aub", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$DesertPyramid")); - mObInitMap.put(new Pair("bue", "net/minecraft/client/stream/ChatController")); - mObInitMap.put(new Pair("bqf", "net/minecraft/client/renderer/texture/TextureManager")); - mObInitMap.put(new Pair("bei", "net/minecraft/client/gui/achievement/GuiAchievements")); - mObInitMap.put(new Pair("bih", "net/minecraft/client/model/ModelSquid")); - mObInitMap.put(new Pair("bmg", "net/minecraft/client/shader/Framebuffer")); - mObInitMap.put(new Pair("na", "net/minecraft/client/network/NetHandlerHandshakeMemory")); - mObInitMap - .put(new Pair("jb", "net/minecraft/network/play/client/C02PacketUseEntity$Action")); - mObInitMap.put(new Pair("fc", "net/minecraft/util/MessageDeserializer2")); - mObInitMap.put(new Pair("bd", "net/minecraft/command/server/CommandPardonIp")); - mObInitMap.put(new Pair("amw", "net/minecraft/block/BlockPumpkin")); - mObInitMap.put(new Pair("aey", "net/minecraft/item/crafting/RecipeFireworks")); - mObInitMap.put(new Pair("aaz", "net/minecraft/inventory/ContainerDispenser")); - mObInitMap.put(new Pair("aix", "net/minecraft/world/biome/BiomeGenEnd")); - mObInitMap.put(new Pair("z", "net/minecraft/command/CommandHandler")); - mObInitMap.put(new Pair("bqy", "net/minecraft/client/resources/IResourceManager")); - mObInitMap.put(new Pair("nt", "net/minecraft/server/management/PlayerProfileCache$1")); - mObInitMap.put(new Pair("ju", "net/minecraft/network/login/server/S00PacketDisconnect")); - mObInitMap.put(new Pair("fv", "net/minecraft/network/play/INetHandlerPlayClient")); - mObInitMap.put(new Pair("abn", "net/minecraft/item/ItemSoup")); - mObInitMap.put(new Pair("afm", "net/minecraft/enchantment/EnchantmentArrowDamage")); - mObInitMap.put(new Pair("brm", "net/minecraft/client/resources/SkinManager$3")); - mObInitMap.put(new Pair("aqu", "net/minecraft/world/gen/ChunkProviderFlat")); - mObInitMap.put(new Pair("aut", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Prison")); - mObInitMap.put(new Pair("ays", "net/minecraft/world/storage/WorldInfo")); - mObInitMap.put(new Pair("bbq", "net/minecraft/util/MinecraftError")); - mObInitMap.put(new Pair("bfp", "net/minecraft/util/EnchantmentNameParts")); - mObInitMap.put( - new Pair("bjo", "net/minecraft/client/multiplayer/ServerData$ServerResourceMode")); - mObInitMap.put(new Pair("bnn", "net/minecraft/client/renderer/entity/RenderManager")); - mObInitMap.put(new Pair("ck", "net/minecraft/dispenser/IBlockSource")); - mObInitMap.put(new Pair("zp", "net/minecraft/entity/projectile/EntityWitherSkull")); - mObInitMap.put( - new Pair("vq", "net/minecraft/entity/ai/EntityAINearestAttackableTarget$Sorter")); - mObInitMap.put(new Pair("rr", "net/minecraft/potion/PotionAbsoption")); - mObInitMap.put(new Pair("ns", "net/minecraft/server/management/PlayerProfileCache")); - mObInitMap.put(new Pair("anj", "net/minecraft/block/BlockSapling")); - mObInitMap.put(new Pair("afl", "net/minecraft/item/crafting/RecipesWeapons")); - mObInitMap.put(new Pair("ajk", "net/minecraft/block/Block$2")); - mObInitMap.put(new Pair("avh", "net/minecraft/world/gen/structure/MapGenStructure$3")); - mObInitMap.put(new Pair("bce", "net/minecraft/client/gui/GuiLabel")); - mObInitMap.put(new Pair("bgd", "net/minecraft/client/gui/ServerListEntryNormal$1")); - mObInitMap.put(new Pair("brl", "net/minecraft/client/resources/SkinManager$2")); - mObInitMap.put(new Pair("we", "net/minecraft/entity/passive/EntityBat")); - mObInitMap.put(new Pair("og", "net/minecraft/server/management/PreYggdrasilConverter$7")); - mObInitMap.put(new Pair("kh", "net/minecraft/network/status/INetHandlerStatusServer")); - mObInitMap.put(new Pair("gi", "net/minecraft/network/play/server/S3APacketTabComplete")); - mObInitMap.put(new Pair("aca", "net/minecraft/creativetab/CreativeTabs$4")); - mObInitMap.put(new Pair("azz", "net/minecraft/scoreboard/Score")); - mObInitMap.put(new Pair("bgc", "net/minecraft/client/gui/ServerListEntryNormal")); - mObInitMap.put(new Pair("boa", "net/minecraft/client/renderer/entity/RenderItem$2")); - mObInitMap.put(new Pair("wx", "net/minecraft/entity/IEntityMultiPart")); - mObInitMap.put(new Pair("sy", "net/minecraft/entity/IEntityLivingData")); - mObInitMap.put(new Pair("oz", "net/minecraft/network/rcon/RConThreadClient")); - mObInitMap.put(new Pair("aoq", "net/minecraft/tileentity/TileEntityBeacon")); - mObInitMap.put(new Pair("akr", "net/minecraft/block/BlockDynamicLiquid")); - mObInitMap.put(new Pair("act", "net/minecraft/item/ItemFishFood")); - mObInitMap.put(new Pair("ags", "net/minecraft/block/BlockEventData")); - mObInitMap.put(new Pair("bss", "net/minecraft/client/audio/SoundListSerializer")); - mObInitMap.put(new Pair("bot", "net/minecraft/client/renderer/entity/RenderSlime")); - mObInitMap.put(new Pair("azy", "net/minecraft/scoreboard/ScorePlayerTeam")); - mObInitMap.put(new Pair("bcw", "net/minecraft/client/gui/GuiYesNo")); - mObInitMap.put(new Pair("bgv", "net/minecraft/client/main/Main$2")); - mObInitMap.put(new Pair("bku", "net/minecraft/client/particle/EntityReddustFX")); - mObInitMap.put(new Pair("pn", "net/minecraft/util/TupleIntJsonSerializable")); - mObInitMap.put(new Pair("lo", "net/minecraft/network/rcon/IServer")); - mObInitMap.put(new Pair("hp", "net/minecraft/network/play/server/S0APacketUseBed")); - mObInitMap.put(new Pair("dq", "net/minecraft/nbt/NBTTagList")); - mObInitMap.put(new Pair("adh", "net/minecraft/item/ItemMap")); - mObInitMap.put(new Pair("bph", "net/minecraft/client/shader/ShaderDefault")); - mObInitMap.put(new Pair("aso", "net/minecraft/world/gen/feature/WorldGenSwamp")); - mObInitMap.put(new Pair("aop", "net/minecraft/block/BlockCarpet")); - mObInitMap.put(new Pair("bdk", "net/minecraft/client/gui/GuiLanguage$List")); - mObInitMap.put(new Pair("bhj", "net/minecraft/client/model/ModelCreeper")); - mObInitMap.put(new Pair("bli", "net/minecraft/util/MovementInput")); - mObInitMap.put(new Pair("ee", "net/minecraft/nbt/JsonToNBT$List")); - mObInitMap.put(new Pair("af", "net/minecraft/command/server/CommandBanIp")); - mObInitMap.put(new Pair("xk", "net/minecraft/entity/item/EntityItem")); - mObInitMap.put(new Pair("tl", "net/minecraft/entity/ai/attributes/BaseAttributeMap")); - mObInitMap.put(new Pair("pm", "net/minecraft/stats/IStatType")); - mObInitMap - .put(new Pair("atc", "net/minecraft/world/gen/structure/StructureMineshaftStart")); - mObInitMap.put(new Pair("apd", "net/minecraft/tileentity/TileEntityEnchantmentTable")); - mObInitMap.put(new Pair("ale", "net/minecraft/block/BlockFurnace")); - mObInitMap.put(new Pair("adg", "net/minecraft/item/ItemLeaves")); - mObInitMap.put(new Pair("ahf", "net/minecraft/world/World$4")); - mObInitMap.put(new Pair("axb", "net/minecraft/world/gen/layer/GenLayerAddIsland")); - mObInitMap.put(new Pair("bpg", "net/minecraft/client/util/JsonBlendingMode")); - mObInitMap - .put(new Pair("net/minecraft/realms/RealmsMth", "net/minecraft/realms/RealmsMth")); - mObInitMap.put(new Pair("qa", "net/minecraft/util/IntHashMap$Entry")); - mObInitMap.put(new Pair("mb", "net/minecraft/server/gui/MinecraftServerGui$3")); - mObInitMap.put( - new Pair("ic", "net/minecraft/network/play/server/S3BPacketScoreboardObjective")); - mObInitMap.put(new Pair("ed", "net/minecraft/nbt/JsonToNBT$Compound")); - mObInitMap.put(new Pair("net/minecraft/realms/RendererUtility", - "net/minecraft/realms/RendererUtility")); - mObInitMap.put(new Pair("atv", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Stairs")); - mObInitMap.put(new Pair("apw", "net/minecraft/world/chunk/EmptyChunk")); - mObInitMap.put(new Pair("alx", "net/minecraft/block/BlockLog")); - mObInitMap.put(new Pair("adz", "net/minecraft/item/ItemSign")); - mObInitMap.put(new Pair("ahy", "net/minecraft/world/biome/BiomeCache")); - mObInitMap.put(new Pair("axu", "net/minecraft/world/gen/layer/GenLayerRiver")); - mObInitMap.put(new Pair("bpz", "net/minecraft/client/renderer/texture/TextureMap")); - mObInitMap.put(new Pair("yr", "net/minecraft/entity/monster/EntityZombie$1")); - mObInitMap.put(new Pair("us", "net/minecraft/entity/ai/EntityAIMoveThroughVillage")); - mObInitMap.put(new Pair("mu", "net/minecraft/world/WorldServer$1")); - mObInitMap.put( - new Pair("iv", "net/minecraft/network/play/client/C0FPacketConfirmTransaction")); - mObInitMap.put(new Pair("ew", "net/minecraft/network/NetworkStatistics$PacketStat")); - mObInitMap.put(new Pair("ax", "net/minecraft/command/server/CommandListBans")); - mObInitMap.put( - new Pair("net/minecraft/realms/ServerPing", "net/minecraft/realms/ServerPing")); - mObInitMap.put(new Pair("aqk", "net/minecraft/world/chunk/storage/AnvilChunkLoader")); - mObInitMap.put(new Pair("aml", "net/minecraft/block/BlockOldLeaf")); - mObInitMap.put(new Pair("aen", "net/minecraft/potion/PotionHelper")); - mObInitMap.put(new Pair("aao", "net/minecraft/inventory/ContainerHorseInventory$2")); - mObInitMap.put(new Pair("aim", "net/minecraft/world/biome/BiomeGenMushroomIsland")); - mObInitMap.put(new Pair("o", "net/minecraft/crash/CrashReportCategory$Entry")); - mObInitMap.put(new Pair("bum", "net/minecraft/client/stream/IStream")); - mObInitMap.put(new Pair("bqn", "net/minecraft/client/resources/AbstractResourcePack")); - mObInitMap.put(new Pair("bar", "net/minecraft/client/Minecraft$11")); - mObInitMap.put(new Pair("beq", "net/minecraft/client/gui/achievement/GuiStats$Stats")); - mObInitMap.put(new Pair("bip", "net/minecraft/client/model/ModelZombie")); - mObInitMap.put(new Pair("bmo", - "net/minecraft/client/renderer/tileentity/TileEntityEnderChestRenderer")); - mObInitMap.put(new Pair("ni", "net/minecraft/network/NetHandlerPlayServer$1")); - mObInitMap.put(new Pair("jj", "net/minecraft/network/play/client/C0BPacketEntityAction")); - mObInitMap.put(new Pair("fk", "net/minecraft/util/IChatComponent$Serializer")); - mObInitMap.put(new Pair("bl", "net/minecraft/command/ServerCommandManager")); - mObInitMap.put(new Pair("yq", "net/minecraft/entity/monster/EntityZombie")); - mObInitMap.put(new Pair("abc", "net/minecraft/item/ItemArmor$1")); - mObInitMap.put(new Pair("afb", "net/minecraft/item/crafting/RecipesMapCloning")); - mObInitMap.put(new Pair("brb", - "net/minecraft/client/resources/ResourcePackFileNotFoundException")); - mObInitMap.put(new Pair("aqj", "net/minecraft/world/chunk/storage/RegionFileCache")); - mObInitMap.put( - new Pair("aui", "net/minecraft/world/gen/structure/StructureStrongholdPieces")); - mObInitMap.put(new Pair("bbf", "net/minecraft/client/Minecraft$9")); - mObInitMap.put(new Pair("bfe", "net/minecraft/client/gui/GuiScreenBook")); - mObInitMap.put(new Pair("bjd", "net/minecraft/client/multiplayer/ChunkProviderClient")); - mObInitMap.put(new Pair("bnc", "net/minecraft/client/renderer/entity/RenderBat")); - mObInitMap.put(new Pair("ze", "net/minecraft/entity/projectile/EntityFireball")); - mObInitMap.put(new Pair("vf", "net/minecraft/entity/ai/EntityAIRestrictSun")); - mObInitMap.put(new Pair("rg", "net/minecraft/client/renderer/texture/IIconRegister")); - mObInitMap.put(new Pair("afa", "net/minecraft/item/crafting/FurnaceRecipes")); - mObInitMap.put(new Pair("bby", "net/minecraft/client/gui/MapItemRenderer$1")); - mObInitMap.put(new Pair("bfx", "net/minecraft/client/gui/inventory/GuiEditSign")); - mObInitMap.put(new Pair("bra", "net/minecraft/client/resources/IResourcePack")); - mObInitMap.put(new Pair("zx", "net/minecraft/inventory/ContainerBeacon")); - mObInitMap.put(new Pair("vy", "net/minecraft/village/VillageDoorInfo")); - mObInitMap.put(new Pair("arq", "net/minecraft/world/gen/feature/WorldGenFire")); - mObInitMap.put(new Pair("anr", "net/minecraft/block/BlockStainedGlassPane")); - mObInitMap.put(new Pair("abu", "net/minecraft/creativetab/CreativeTabs$1")); - mObInitMap.put(new Pair("aft", "net/minecraft/enchantment/Enchantment")); - mObInitMap.put(new Pair("ajs", "net/minecraft/block/BlockButton")); - mObInitMap.put(new Pair("avp", "net/minecraft/world/gen/structure/StructureVillagePieces")); - mObInitMap.put(new Pair("azo", "net/minecraft/world/storage/SaveHandlerMP")); - mObInitMap.put(new Pair("brt", - "net/minecraft/client/resources/data/BaseMetadataSectionSerializer")); - mObInitMap.put(new Pair("bfw", "net/minecraft/client/gui/GuiMerchant$MerchantButton")); - mObInitMap.put(new Pair("bjv", "net/minecraft/client/particle/EntityBubbleFX")); - mObInitMap.put(new Pair("bnu", "net/minecraft/client/renderer/entity/RenderGiantZombie")); - mObInitMap.put(new Pair("wm", "net/minecraft/entity/passive/EntityMooshroom")); - mObInitMap.put(new Pair("oo", "net/minecraft/server/management/UserList$Serializer")); - mObInitMap.put(new Pair("kp", "net/minecraft/init/Bootstrap$12")); - mObInitMap.put(new Pair("gq", "net/minecraft/network/play/server/S2FPacketSetSlot")); - mObInitMap.put(new Pair("cr", "net/minecraft/util/EnumFacing")); - mObInitMap.put(new Pair("aof", "net/minecraft/block/BlockTripWire")); - mObInitMap.put(new Pair("akg", "net/minecraft/block/BlockDaylightDetector")); - mObInitMap.put(new Pair("aci", "net/minecraft/item/ItemDoublePlant")); - mObInitMap.put(new Pair("agh", "net/minecraft/enchantment/EnchantmentOxygen")); - mObInitMap.put(new Pair("bsh", - "net/minecraft/client/resources/data/PackMetadataSectionSerializer")); - mObInitMap.put(new Pair("bcl", "net/minecraft/client/gui/GuiOptionsRowList$Row")); - mObInitMap.put(new Pair("bgk", "net/minecraft/client/gui/GuiResourcePackList")); - mObInitMap.put(new Pair("bkj", "net/minecraft/client/particle/EntityHugeExplodeFX")); - mObInitMap.put(new Pair("boi", "net/minecraft/client/renderer/entity/RenderMinecart")); - mObInitMap.put(new Pair("pc", "net/minecraft/stats/AchievementList")); - mObInitMap.put(new Pair("ld", "net/minecraft/client/util/JsonException$Entry")); - mObInitMap.put(new Pair("he", "net/minecraft/network/play/server/S34PacketMaps")); - mObInitMap.put(new Pair("df", "net/minecraft/nbt/NBTTagByteArray")); - mObInitMap.put(new Pair("asd", "net/minecraft/world/gen/feature/WorldGenDungeons")); - mObInitMap.put( - new Pair("awc", "net/minecraft/world/gen/structure/StructureVillagePieces$House3")); - mObInitMap.put(new Pair("dy", "net/minecraft/nbt/NBTBase")); - mObInitMap.put(new Pair("ta", "net/minecraft/entity/IEntityOwnable")); - mObInitMap.put(new Pair("pb", "net/minecraft/stats/Achievement")); - mObInitMap.put(new Pair("asw", "net/minecraft/world/gen/structure/MapGenMineshaft")); - mObInitMap.put(new Pair("aox", "net/minecraft/tileentity/TileEntityCommandBlock")); - mObInitMap.put(new Pair("aky", "net/minecraft/block/BlockFarmland")); - mObInitMap.put(new Pair("agz", "net/minecraft/world/GameRules$Value")); - mObInitMap.put(new Pair("awv", "net/minecraft/block/material/MapColor")); - mObInitMap.put(new Pair("bds", "net/minecraft/client/gui/GuiFlatPresets$ListSlot")); - mObInitMap.put(new Pair("bhr", "net/minecraft/client/model/ModelBase")); - mObInitMap.put(new Pair("bsz", "net/minecraft/server/integrated/IntegratedServer$2")); - mObInitMap.put(new Pair("xs", "net/minecraft/entity/item/EntityMinecartEmpty")); - mObInitMap.put(new Pair("tt", "net/minecraft/entity/ai/EntityJumpHelper")); - mObInitMap.put(new Pair("pu", "net/minecraft/util/JsonUtils")); - mObInitMap.put(new Pair("lv", "net/minecraft/server/dedicated/DedicatedServer$2")); - mObInitMap.put(new Pair("hw", "net/minecraft/network/play/server/S1CPacketEntityMetadata")); - mObInitMap.put(new Pair("dx", "net/minecraft/nbt/NBTTagString")); - mObInitMap.put(new Pair("atk", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor4")); - mObInitMap.put(new Pair("apl", "net/minecraft/tileentity/TileEntityNote")); - mObInitMap.put(new Pair("alm", "net/minecraft/block/BlockHay")); - mObInitMap.put(new Pair("ado", "net/minecraft/item/ItemPiston")); - mObInitMap.put(new Pair("ahn", "net/minecraft/world/EnumSkyBlock")); - mObInitMap.put(new Pair("axj", "net/minecraft/world/gen/layer/GenLayerFuzzyZoom")); - mObInitMap.put(new Pair("btn", - "net/minecraft/client/audio/SoundManager$SoundSystemStarterThread")); - mObInitMap.put(new Pair("bpo", "net/minecraft/client/shader/ShaderUniform")); - mObInitMap.put(new Pair("bhq", "net/minecraft/client/model/ModelMinecart")); - mObInitMap.put(new Pair("blp", "net/minecraft/client/renderer/RenderSorter")); - mObInitMap.put(new Pair("yg", "net/minecraft/entity/monster/EntityMob")); - mObInitMap.put(new Pair("uh", "net/minecraft/entity/ai/EntityAIFollowParent")); - mObInitMap.put(new Pair("qi", "net/minecraft/profiler/Profiler")); - mObInitMap.put(new Pair("mj", "net/minecraft/client/renderer/DestroyBlockProgress")); - mObInitMap.put(new Pair("ik", "net/minecraft/network/play/server/S18PacketEntityTeleport")); - mObInitMap.put(new Pair("el", "net/minecraft/network/NetworkManager$2")); - mObInitMap.put(new Pair("am", "net/minecraft/command/CommandEffect")); - mObInitMap.put(new Pair("ama", "net/minecraft/block/BlockMobSpawner")); - mObInitMap.put(new Pair("aec", "net/minecraft/item/ItemSnow")); - mObInitMap.put(new Pair("aad", "net/minecraft/inventory/ContainerChest")); - mObInitMap.put(new Pair("aib", "net/minecraft/world/biome/WorldChunkManager")); - mObInitMap.put(new Pair("d", "net/minecraft/crash/CrashReport$2")); - mObInitMap.put(new Pair("bub", - "net/minecraft/client/stream/BroadcastController$SwitchBroadcastState")); - mObInitMap.put(new Pair("bqc", "net/minecraft/client/renderer/texture/TextureMap$3")); - mObInitMap.put(new Pair("bag", "net/minecraft/scoreboard/ScoreHealthCriteria")); - mObInitMap.put(new Pair("bef", "net/minecraft/client/gui/GuiVideoSettings")); - mObInitMap.put(new Pair("bie", "net/minecraft/client/model/ModelSlime")); - mObInitMap.put(new Pair("bmd", "net/minecraft/client/renderer/RenderList")); - mObInitMap.put(new Pair("ba", "net/minecraft/command/server/CommandMessageRaw")); - mObInitMap.put(new Pair("aev", "net/minecraft/item/crafting/RecipesArmor")); - mObInitMap.put(new Pair("aaw", "net/minecraft/inventory/InventoryCraftResult")); - mObInitMap.put(new Pair("w", "net/minecraft/client/audio/SoundCategory")); - mObInitMap - .put(new Pair("bqv", "net/minecraft/client/resources/IReloadableResourceManager")); - mObInitMap.put(new Pair("baz", "net/minecraft/client/Minecraft$3")); - mObInitMap.put(new Pair("bey", "net/minecraft/client/gui/GuiRepair")); - mObInitMap.put(new Pair("bix", "net/minecraft/client/model/ModelRenderer")); - mObInitMap.put(new Pair("bmw", "net/minecraft/client/renderer/culling/ClippingHelperImpl")); - mObInitMap - .put(new Pair("fs", "net/minecraft/util/ChatComponentTranslationFormatException")); - mObInitMap.put(new Pair("bt", "net/minecraft/command/server/CommandStop")); - mObInitMap.put(new Pair("yy", "net/minecraft/entity/player/InventoryPlayer$1")); - mObInitMap.put(new Pair("uz", "net/minecraft/entity/ai/EntityAIPanic")); - mObInitMap.put(new Pair("aqr", "net/minecraft/world/WorldProviderEnd")); - mObInitMap.put(new Pair("ams", "net/minecraft/block/BlockCompressedPowered")); - mObInitMap.put(new Pair("aeu", "net/minecraft/item/crafting/RecipesArmorDyes")); - mObInitMap.put(new Pair("ait", "net/minecraft/world/biome/BiomeGenSavanna$Mutated")); - mObInitMap.put(new Pair("auq", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Library")); - mObInitMap.put(new Pair("ayp", "net/minecraft/world/storage/DerivedWorldInfo")); - mObInitMap.put(new Pair("bbn", "net/minecraft/client/settings/GameSettings$Options$1")); - mObInitMap.put(new Pair("bfm", - "net/minecraft/client/gui/inventory/GuiContainerCreative$ContainerCreative")); - mObInitMap.put(new Pair("but", "net/minecraft/realms/RealmsServerStatusPinger$1")); - mObInitMap.put(new Pair("bqu", "net/minecraft/client/resources/GrassColorReloadListener")); - mObInitMap.put(new Pair("zm", "net/minecraft/entity/item/EntityEnderPearl")); - mObInitMap.put(new Pair("vn", "net/minecraft/entity/ai/EntityAIHurtByTarget")); - mObInitMap.put(new Pair("ro", "net/minecraft/util/DamageSource")); - mObInitMap.put( - new Pair("np", "net/minecraft/server/network/NetHandlerLoginServer$LoginState")); - mObInitMap - .put(new Pair("jq", "net/minecraft/network/handshake/INetHandlerHandshakeServer")); - mObInitMap.put(new Pair("fr", "net/minecraft/util/ChatComponentTranslation")); - mObInitMap.put(new Pair("arf", "net/minecraft/world/gen/feature/WorldGenBlockBlob")); - mObInitMap.put(new Pair("ang", "net/minecraft/block/BlockRotatedPillar")); - mObInitMap.put(new Pair("abj", "net/minecraft/item/ItemBoat")); - mObInitMap.put(new Pair("afi", "net/minecraft/item/crafting/ShapelessRecipes")); - mObInitMap.put(new Pair("ajh", "net/minecraft/block/BlockBed")); - mObInitMap.put(new Pair("ave", "net/minecraft/world/gen/structure/MapGenStructure")); - mObInitMap.put(new Pair("azd", "net/minecraft/client/AnvilConverterException")); - mObInitMap - .put(new Pair("net/minecraft/client/main/Main", "net/minecraft/client/main/Main")); - mObInitMap.put(new Pair("bri", "net/minecraft/client/resources/SimpleResource")); - mObInitMap.put(new Pair("bfl", "net/minecraft/client/gui/inventory/GuiContainerCreative")); - mObInitMap.put(new Pair("bjk", "net/minecraft/client/entity/EntityClientPlayerMP")); - mObInitMap.put(new Pair("bnj", "net/minecraft/client/renderer/entity/RenderEntity")); - mObInitMap.put(new Pair("wb", "net/minecraft/village/VillageSiege")); - mObInitMap.put(new Pair("sc", "net/minecraft/entity/Entity$2")); - mObInitMap.put(new Pair("od", "net/minecraft/server/management/PreYggdrasilConverter$4")); - mObInitMap.put(new Pair("ke", "net/minecraft/network/ServerStatusResponse$Serializer")); - mObInitMap - .put(new Pair("gf", "net/minecraft/network/play/server/S35PacketUpdateTileEntity")); - mObInitMap.put(new Pair("cg", "net/minecraft/command/PlayerNotFoundException")); - mObInitMap.put(new Pair("ary", "net/minecraft/world/gen/feature/WorldGenGlowStone1")); - mObInitMap.put(new Pair("anz", "net/minecraft/block/BlockTallGrass")); - mObInitMap.put(new Pair("bca", "net/minecraft/client/gui/ScaledResolution")); - mObInitMap.put(new Pair("ow", "net/minecraft/network/rcon/RConThreadBase")); - mObInitMap.put(new Pair("kx", "net/minecraft/init/Bootstrap$6")); - mObInitMap.put( - new Pair("gy", "net/minecraft/network/play/server/S21PacketChunkData$Extracted")); - mObInitMap.put(new Pair("cz", "net/minecraft/util/IRegistry")); - mObInitMap.put(new Pair("acq", "net/minecraft/item/ItemFireball")); - mObInitMap.put(new Pair("agp", "net/minecraft/command/server/CommandBlockLogic")); - mObInitMap.put(new Pair("bsp", "net/minecraft/client/audio/SoundList")); - mObInitMap.put(new Pair("boq", "net/minecraft/client/renderer/entity/RenderSheep")); - mObInitMap.put(new Pair("arx", "net/minecraft/world/gen/feature/WorldGenLakes")); - mObInitMap.put(new Pair("avw", - "net/minecraft/world/gen/structure/StructureVillagePieces$House4Garden")); - mObInitMap.put(new Pair("azv", "net/minecraft/util/MovingObjectPosition$MovingObjectType")); - mObInitMap.put(new Pair("bct", "net/minecraft/client/gui/GuiChat")); - mObInitMap.put(new Pair("bgs", "net/minecraft/client/gui/stream/GuiTwitchUserMode")); - mObInitMap.put(new Pair("bkr", "net/minecraft/client/particle/EffectRenderer$4")); - mObInitMap.put(new Pair("dn", "net/minecraft/nbt/NBTTagIntArray")); - mObInitMap.put(new Pair("wt", "net/minecraft/entity/monster/EntityIronGolem")); - mObInitMap.put(new Pair("su", "net/minecraft/entity/EntityLeashKnot")); - mObInitMap.put(new Pair("asl", "net/minecraft/world/gen/feature/WorldGenSpikes")); - mObInitMap.put(new Pair("aom", "net/minecraft/block/BlockWood")); - mObInitMap.put(new Pair("akn", "net/minecraft/block/BlockDoor")); - mObInitMap.put(new Pair("ago", "net/minecraft/village/MerchantRecipeList")); - mObInitMap.put(new Pair("awk", "net/minecraft/world/gen/NoiseGeneratorOctaves")); - mObInitMap.put(new Pair("bdh", "net/minecraft/client/gui/GuiErrorScreen")); - mObInitMap.put(new Pair("bhg", "net/minecraft/client/model/ModelChest")); - mObInitMap.put(new Pair("bso", "net/minecraft/client/audio/PositionedSoundRecord")); - mObInitMap.put(new Pair("xh", "net/minecraft/entity/effect/EntityLightningBolt")); - mObInitMap.put(new Pair("ti", "net/minecraft/entity/ai/attributes/IAttributeInstance")); - mObInitMap.put(new Pair("pj", "net/minecraft/stats/StatBase$2")); - mObInitMap.put(new Pair("lk", "net/minecraft/server/MinecraftServer$4")); - mObInitMap.put(new Pair("apa", "net/minecraft/tileentity/TileEntityDaylightDetector")); - mObInitMap.put(new Pair("alb", "net/minecraft/block/BlockFire")); - mObInitMap.put(new Pair("add", "net/minecraft/item/ItemStack")); - mObInitMap.put(new Pair("ahc", "net/minecraft/world/World$1")); - mObInitMap.put(new Pair("btc", - "net/minecraft/client/network/LanServerDetector$ThreadLanServerFind")); - mObInitMap - .put(new Pair("bpd", "net/minecraft/client/renderer/tileentity/RenderWitherSkull")); - mObInitMap.put(new Pair("bhf", "net/minecraft/client/model/ModelBook")); - mObInitMap.put(new Pair("ble", "net/minecraft/client/particle/EntityFishWakeFX")); - mObInitMap.put(new Pair("ea", "net/minecraft/nbt/NBTException")); - mObInitMap.put(new Pair("ab", "net/minecraft/command/ICommandManager")); - mObInitMap.put(new Pair("adw", "net/minecraft/item/ItemSeeds")); - mObInitMap.put(new Pair("ahv", "net/minecraft/world/biome/BiomeGenBase$Height")); - mObInitMap.put(new Pair("btv", "net/minecraft/client/audio/SoundEventAccessor")); - mObInitMap.put(new Pair("bpw", "net/minecraft/client/renderer/texture/Stitcher$Holder")); - mObInitMap.put(new Pair("bdz", "net/minecraft/client/gui/GuiShareToLan")); - mObInitMap.put(new Pair("bhy", "net/minecraft/client/model/ModelSheep2")); - mObInitMap.put(new Pair("blx", "net/minecraft/client/renderer/IImageBuffer")); - mObInitMap.put( - new Pair("mr", "net/minecraft/server/management/PlayerManager$PlayerInstance")); - mObInitMap.put(new Pair("is", "net/minecraft/network/play/client/C16PacketClientStatus")); - mObInitMap.put(new Pair("et", "net/minecraft/network/PacketBuffer")); - mObInitMap.put(new Pair("au", "net/minecraft/command/CommandHelp")); - mObInitMap.put(new Pair("aek", "net/minecraft/item/ItemCloth")); - mObInitMap.put(new Pair("aal", "net/minecraft/inventory/ContainerHopper")); - mObInitMap.put(new Pair("l", "net/minecraft/crash/CrashReportCategory$1")); - mObInitMap.put( - new Pair("bqk", "net/minecraft/client/renderer/texture/ITickableTextureObject")); - mObInitMap.put(new Pair("atr", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Throne")); - mObInitMap.put(new Pair("aps", "net/minecraft/tileentity/TileEntityPiston")); - mObInitMap.put(new Pair("axq", "net/minecraft/world/gen/layer/GenLayerRareBiome")); - mObInitMap.put(new Pair("bao", "net/minecraft/client/Minecraft")); - mObInitMap.put(new Pair("ben", "net/minecraft/client/gui/achievement/GuiStats$StatsItem")); - mObInitMap.put(new Pair("bim", "net/minecraft/client/model/ModelWitch")); - mObInitMap.put(new Pair("bml", - "net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer")); - mObInitMap.put(new Pair("fh", "net/minecraft/event/ClickEvent")); - mObInitMap.put(new Pair("bi", "net/minecraft/command/server/CommandSaveOff")); - mObInitMap.put(new Pair("yn", "net/minecraft/entity/monster/EntitySpider")); - mObInitMap.put(new Pair("uo", "net/minecraft/entity/ai/EntityAILookAtTradePlayer")); - mObInitMap.put(new Pair("aqg", - "net/minecraft/world/chunk/storage/ChunkLoader$AnvilConverterData")); - mObInitMap.put(new Pair("amh", "net/minecraft/block/BlockNewLeaf")); - mObInitMap.put(new Pair("aii", "net/minecraft/world/biome/BiomeGenHell")); - mObInitMap.put(new Pair("auf", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$SwampHut")); - mObInitMap.put(new Pair("aye", "net/minecraft/pathfinding/PathPoint")); - mObInitMap.put(new Pair("bbc", "net/minecraft/client/Minecraft$6")); - mObInitMap - .put(new Pair("bfb", "net/minecraft/client/gui/inventory/GuiBeacon$ConfirmButton")); - mObInitMap.put(new Pair("bui", "net/minecraft/client/stream/IngestServerTester")); - mObInitMap.put(new Pair("bqj", "net/minecraft/client/renderer/texture/ITickable")); - mObInitMap - .put(new Pair("zb", "net/minecraft/entity/player/EntityPlayer$EnumChatVisibility")); - mObInitMap.put(new Pair("vc", "net/minecraft/entity/ai/EntityAIWander")); - mObInitMap.put(new Pair("rd", "net/minecraft/world/EnumDifficulty")); - mObInitMap.put(new Pair("ne", "net/minecraft/network/NetworkSystem$2")); - mObInitMap.put(new Pair("jf", - "net/minecraft/network/play/client/C03PacketPlayer$C06PacketPlayerPosLook")); - mObInitMap.put(new Pair("fg", "net/minecraft/util/ChatComponentStyle$2")); - mObInitMap.put(new Pair("aqz", "net/minecraft/world/gen/ChunkProviderGenerate")); - mObInitMap.put(new Pair("auy", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stairs")); - mObInitMap.put(new Pair("ayx", "net/minecraft/world/storage/WorldInfo$5")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsSliderButton", - "net/minecraft/realms/RealmsSliderButton")); - mObInitMap.put(new Pair("zu", "net/minecraft/inventory/ContainerRepair")); - mObInitMap.put(new Pair("vv", "net/minecraft/pathfinding/PathNavigate")); - mObInitMap.put(new Pair("rw", "net/minecraft/potion/PotionEffect")); - mObInitMap.put(new Pair("nx", "net/minecraft/server/management/BanList")); - mObInitMap.put(new Pair("jy", "net/minecraft/network/status/INetHandlerStatusClient")); - mObInitMap.put(new Pair("fz", "net/minecraft/network/play/server/S0FPacketSpawnMob")); - mObInitMap.put(new Pair("arn", "net/minecraft/world/gen/feature/WorldGenerator")); - mObInitMap.put(new Pair("ano", "net/minecraft/block/BlockSoulSand")); - mObInitMap.put(new Pair("abr", "net/minecraft/item/ItemColored")); - mObInitMap.put(new Pair("afq", "net/minecraft/enchantment/EnchantmentDamage")); - mObInitMap.put(new Pair("ajp", "net/minecraft/block/BlockBookshelf")); - mObInitMap.put(new Pair("brq", "net/minecraft/client/resources/Language")); - mObInitMap.put(new Pair("bbu", "net/minecraft/client/gui/FontRenderer")); - mObInitMap - .put(new Pair("bft", "net/minecraft/client/gui/inventory/GuiScreenHorseInventory")); - mObInitMap.put(new Pair("bjs", "net/minecraft/client/network/OldServerPinger$2")); - mObInitMap.put(new Pair("bnr", "net/minecraft/client/renderer/entity/RenderFireball")); - mObInitMap.put(new Pair("sk", "net/minecraft/command/IEntitySelector$1")); - mObInitMap.put(new Pair("ol", "net/minecraft/server/management/UserListEntry")); - mObInitMap.put(new Pair("km", "net/minecraft/init/Bootstrap$1")); - mObInitMap.put(new Pair("gn", "net/minecraft/network/play/server/S2DPacketOpenWindow")); - mObInitMap.put(new Pair("co", "net/minecraft/util/RegistryDefaulted")); - mObInitMap.put(new Pair("acf", "net/minecraft/creativetab/CreativeTabs$9")); - mObInitMap.put(new Pair("age", "net/minecraft/enchantment/EnchantmentFishingSpeed")); - mObInitMap.put( - new Pair("bse", "net/minecraft/client/resources/data/LanguageMetadataSection")); - mObInitMap.put(new Pair("arm", "net/minecraft/world/gen/feature/WorldGenDoublePlant")); - mObInitMap.put(new Pair("avl", - "net/minecraft/world/gen/structure/StructureComponent$BlockSelector")); - mObInitMap.put(new Pair("bci", "net/minecraft/client/gui/GuiListExtended$IGuiListEntry")); - mObInitMap.put( - new Pair("bgh", "net/minecraft/client/resources/ResourcePackListEntryDefault")); - mObInitMap.put(new Pair("bkg", "net/minecraft/client/particle/EntityFootStepFX")); - mObInitMap.put(new Pair("bof", "net/minecraft/client/renderer/entity/RenderLeashKnot")); - mObInitMap.put(new Pair("net/minecraft/server/MinecraftServer", - "net/minecraft/server/MinecraftServer")); - mObInitMap.put(new Pair("hb", "net/minecraft/network/play/server/S2APacketParticles")); - mObInitMap.put(new Pair("wi", "net/minecraft/entity/passive/EntityHorse")); - mObInitMap.put(new Pair("sj", "net/minecraft/command/IEntitySelector")); - mObInitMap.put(new Pair("asa", "net/minecraft/world/gen/feature/WorldGenMegaPineTree")); - mObInitMap.put(new Pair("aob", "net/minecraft/block/BlockTNT")); - mObInitMap.put(new Pair("akc", "net/minecraft/block/BlockRedstoneComparator")); - mObInitMap.put(new Pair("agd", "net/minecraft/enchantment/EnchantmentFireAspect")); - mObInitMap.put(new Pair("bsd", - "net/minecraft/client/resources/data/FontMetadataSectionSerializer")); - mObInitMap.put(new Pair("ha", "net/minecraft/network/play/server/S28PacketEffect")); - mObInitMap.put(new Pair("ast", "net/minecraft/world/gen/FlatLayerInfo")); - mObInitMap.put(new Pair("aou", "net/minecraft/tileentity/TileEntity$3")); - mObInitMap.put(new Pair("akv", "net/minecraft/block/BlockEnderChest")); - mObInitMap.put(new Pair("acx", "net/minecraft/item/ItemFood")); - mObInitMap.put(new Pair("agw", "net/minecraft/world/Explosion")); - mObInitMap.put(new Pair("aws", "net/minecraft/block/material/MaterialLiquid")); - mObInitMap.put(new Pair("bsw", "net/minecraft/server/integrated/IntegratedPlayerList")); - mObInitMap.put(new Pair("box", "net/minecraft/client/renderer/entity/RenderTntMinecart")); - mObInitMap.put(new Pair("bky", "net/minecraft/client/particle/EntitySplashFX")); - mObInitMap.put(new Pair("xp", "net/minecraft/entity/item/EntityMinecartContainer")); - mObInitMap.put(new Pair("tq", "net/minecraft/entity/ai/attributes/ServersideAttributeMap")); - mObInitMap.put(new Pair("pr", "net/minecraft/util/JsonSerializableSet")); - mObInitMap.put(new Pair("ls", "net/minecraft/server/dedicated/DedicatedPlayerList")); - mObInitMap.put(new Pair("ht", "net/minecraft/network/play/server/S19PacketEntityHeadLook")); - mObInitMap.put(new Pair("du", "net/minecraft/nbt/CompressedStreamTools")); - mObInitMap.put(new Pair("api", "net/minecraft/tileentity/TileEntityHopper")); - mObInitMap.put(new Pair("alj", "net/minecraft/block/BlockSlab")); - mObInitMap.put(new Pair("adl", "net/minecraft/item/ItemMultiTexture")); - mObInitMap.put(new Pair("ahk", "net/minecraft/world/WorldSettings$GameType")); - mObInitMap.put(new Pair("btk", "net/minecraft/client/audio/SoundManager$1")); - mObInitMap.put(new Pair("bpl", "net/minecraft/client/shader/ShaderLoader")); - mObInitMap.put(new Pair("bdo", "net/minecraft/client/gui/GuiMemoryErrorScreen")); - mObInitMap.put(new Pair("bhn", "net/minecraft/client/model/ModelLargeChest")); - mObInitMap.put(new Pair("blm", "net/minecraft/client/renderer/RenderBlocks")); - mObInitMap.put(new Pair("qf", "net/minecraft/util/EnumTypeAdapterFactory")); - mObInitMap.put(new Pair("mg", "net/minecraft/server/gui/StatsComponent$1")); - mObInitMap.put(new Pair("ih", "net/minecraft/network/play/server/S03PacketTimeUpdate")); - mObInitMap.put(new Pair("ei", "net/minecraft/network/NettyEncryptingEncoder")); - mObInitMap.put(new Pair("aj", "net/minecraft/command/server/CommandDeOp")); - mObInitMap.put(new Pair("aaa", "net/minecraft/inventory/ContainerBrewingStand$Ingredient")); - mObInitMap.put(new Pair("a", "net/minecraft/util/EnumChatFormatting")); - mObInitMap.put(new Pair("atg", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Crossing3")); - mObInitMap.put(new Pair("axf", "net/minecraft/world/gen/layer/GenLayerBiome")); - mObInitMap.put(new Pair("bad", "net/minecraft/scoreboard/ScoreboardSaveData")); - mObInitMap.put(new Pair("bec", "net/minecraft/client/gui/GuiScreenOptionsSounds")); - mObInitMap.put(new Pair("bib", "net/minecraft/client/model/ModelSkeletonHead")); - mObInitMap.put(new Pair("bma", "net/minecraft/client/renderer/RenderGlobal")); - mObInitMap.put(new Pair("yc", "net/minecraft/entity/monster/IMob$1")); - mObInitMap.put(new Pair("ud", "net/minecraft/entity/ai/EntityAIEatGrass")); - mObInitMap.put(new Pair("qe", "net/minecraft/util/LongHashMap$Entry")); - mObInitMap.put(new Pair("t", "net/minecraft/util/ChatAllowedCharacters")); - mObInitMap.put(new Pair("atz", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces")); - mObInitMap.put(new Pair("baw", "net/minecraft/client/Minecraft$16")); - mObInitMap.put(new Pair("bev", "net/minecraft/client/gui/GuiKeyBindingList$KeyEntry")); - mObInitMap.put(new Pair("yv", "net/minecraft/entity/passive/EntityVillager")); - mObInitMap.put(new Pair("uw", "net/minecraft/entity/ai/EntityAIOcelotSit")); - mObInitMap.put(new Pair("qx", "net/minecraft/util/WeightedRandomChestContent")); - mObInitMap.put(new Pair("my", "net/minecraft/entity/EntityTrackerEntry")); - mObInitMap.put(new Pair("iz", "net/minecraft/network/play/client/C17PacketCustomPayload")); - mObInitMap.put(new Pair("aqo", "net/minecraft/world/WorldProvider")); - mObInitMap.put(new Pair("amp", "net/minecraft/block/BlockPortal")); - mObInitMap.put(new Pair("aas", "net/minecraft/inventory/InventoryMerchant")); - mObInitMap.put(new Pair("aun", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Corridor")); - mObInitMap.put(new Pair("aym", "net/minecraft/world/chunk/storage/AnvilSaveHandler")); - mObInitMap.put(new Pair("buq", "net/minecraft/client/stream/TwitchStream$1$1")); - mObInitMap.put(new Pair("bqr", "net/minecraft/client/resources/FileResourcePack")); - mObInitMap.put(new Pair("bms", - "net/minecraft/client/renderer/tileentity/TileEntitySkullRenderer")); - mObInitMap.put(new Pair("zj", "net/minecraft/entity/projectile/EntitySnowball")); - mObInitMap.put(new Pair("vk", "net/minecraft/entity/ai/EntityAITempt")); - mObInitMap.put(new Pair("rl", "net/minecraft/inventory/ISidedInventory")); - mObInitMap.put(new Pair("nm", - "net/minecraft/server/network/NetHandlerHandshakeTCP$SwitchEnumConnectionState")); - mObInitMap.put(new Pair("jn", "net/minecraft/network/play/client/C12PacketUpdateSign")); - mObInitMap.put(new Pair("fo", "net/minecraft/util/ChatStyle$1")); - mObInitMap.put(new Pair("bp", "net/minecraft/command/CommandSetSpawnpoint")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsServerAddress", - "net/minecraft/realms/RealmsServerAddress")); - mObInitMap.put(new Pair("arc", "net/minecraft/world/gen/feature/WorldGenAbstractTree")); - mObInitMap.put(new Pair("and", "net/minecraft/block/BlockRedstoneTorch$Toggle")); - mObInitMap.put(new Pair("abg", "net/minecraft/item/ItemBed")); - mObInitMap.put(new Pair("aff", "net/minecraft/item/crafting/CraftingManager$1")); - mObInitMap.put(new Pair("aje", "net/minecraft/block/BlockRailBase")); - mObInitMap.put( - new Pair("brf", "net/minecraft/client/resources/ResourcePackRepository$Entry")); - mObInitMap.put(new Pair("bbj", "net/minecraft/client/settings/GameSettings")); - mObInitMap.put(new Pair("bfi", "net/minecraft/client/gui/inventory/GuiChest")); - mObInitMap.put(new Pair("bjh", "net/minecraft/client/multiplayer/WorldClient$2")); - mObInitMap.put(new Pair("bng", "net/minecraft/client/renderer/entity/RenderChicken")); - mObInitMap.put(new Pair("oa", "net/minecraft/server/management/PreYggdrasilConverter$1")); - mObInitMap.put(new Pair("kb", "net/minecraft/network/ServerStatusResponse")); - mObInitMap.put(new Pair("gc", "net/minecraft/network/play/server/S0BPacketAnimation")); - mObInitMap.put(new Pair("cd", "net/minecraft/command/CommandException")); - mObInitMap.put(new Pair("abz", "net/minecraft/creativetab/CreativeTabs$3")); - mObInitMap.put(new Pair("afy", "net/minecraft/enchantment/EnchantmentHelper$HurtIterator")); - mObInitMap.put(new Pair("bry", - "net/minecraft/client/resources/data/IMetadataSerializer$Registration")); - mObInitMap.put(new Pair("ava", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Straight")); - mObInitMap.put(new Pair("bnz", "net/minecraft/client/renderer/entity/RenderItem$1")); - mObInitMap - .put(new Pair("gv", "net/minecraft/network/play/server/S2BPacketChangeGameState")); - mObInitMap.put(new Pair("cw", "net/minecraft/util/RegistryNamespaced")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsScrolledSelectionList", - "net/minecraft/realms/RealmsScrolledSelectionList")); - mObInitMap.put(new Pair("aru", "net/minecraft/world/gen/feature/WorldGenBigMushroom")); - mObInitMap.put(new Pair("anv", "net/minecraft/block/BlockStone")); - mObInitMap - .put(new Pair("afx", "net/minecraft/enchantment/EnchantmentHelper$DamageIterator")); - mObInitMap.put(new Pair("ajw", "net/minecraft/block/BlockCauldron")); - mObInitMap.put( - new Pair("avt", "net/minecraft/world/gen/structure/StructureVillagePieces$Torch")); - mObInitMap.put(new Pair("azs", "net/minecraft/world/storage/IThreadedFileIO")); - mObInitMap.put(new Pair("bcq", "net/minecraft/client/gui/GuiScreenRealmsProxy")); - mObInitMap.put(new Pair("bgp", "net/minecraft/client/gui/stream/GuiStreamUnavailable")); - mObInitMap - .put(new Pair("brx", "net/minecraft/client/resources/data/IMetadataSerializer$1")); - mObInitMap.put(new Pair("wq", "net/minecraft/entity/passive/EntitySheep$1")); - mObInitMap.put(new Pair("sr", "net/minecraft/entity/EntityFlying")); - mObInitMap.put(new Pair("os", "net/minecraft/server/management/UserListWhitelistEntry")); - mObInitMap.put(new Pair("kt", "net/minecraft/init/Bootstrap$3")); - mObInitMap.put(new Pair("gu", "net/minecraft/network/play/server/S27PacketExplosion")); - mObInitMap.put(new Pair("asi", "net/minecraft/world/gen/feature/WorldGenCanopyTree")); - mObInitMap.put(new Pair("aoj", "net/minecraft/block/BlockLilyPad")); - mObInitMap.put(new Pair("akk", "net/minecraft/block/BlockDirectional")); - mObInitMap.put(new Pair("acm", "net/minecraft/item/ItemEnchantedBook")); - mObInitMap.put(new Pair("agl", "net/minecraft/enchantment/EnchantmentWaterWorker")); - mObInitMap.put(new Pair("bsl", "net/minecraft/client/audio/MovingSound")); - mObInitMap.put(new Pair("bom", "net/minecraft/client/renderer/entity/RenderOcelot")); - mObInitMap.put(new Pair("bgo", "net/minecraft/client/gui/stream/GuiStreamOptions")); - mObInitMap.put(new Pair("bkn", "net/minecraft/client/particle/EffectRenderer")); - mObInitMap.put( - new Pair("net/minecraft/realms/RealmsScreen", "net/minecraft/realms/RealmsScreen")); - mObInitMap.put(new Pair("xe", "net/minecraft/entity/projectile/EntityFishHook")); - mObInitMap.put(new Pair("tf", "net/minecraft/entity/DataWatcher$WatchableObject")); - mObInitMap.put(new Pair("pg", "net/minecraft/stats/StatisticsFile")); - mObInitMap.put(new Pair("lh", "net/minecraft/server/MinecraftServer$1")); - mObInitMap.put(new Pair("hi", - "net/minecraft/network/play/server/S14PacketEntity$S16PacketEntityLook")); - mObInitMap.put(new Pair("dj", "net/minecraft/nbt/NBTTagCompound$2")); - mObInitMap.put(new Pair("ada", "net/minecraft/item/ItemHoe")); - mObInitMap.put(new Pair("bpa", "net/minecraft/client/renderer/entity/RenderVillager")); - mObInitMap.put(new Pair("bdd", "net/minecraft/client/gui/GuiScreenDemo")); - mObInitMap.put(new Pair("bhc", "net/minecraft/client/model/ModelBat")); - mObInitMap.put(new Pair("blb", "net/minecraft/client/particle/EntityPickupFX")); - mObInitMap.put(new Pair("pz", "net/minecraft/util/IntHashMap")); - mObInitMap.put(new Pair("adt", "net/minecraft/item/ItemSaddle")); - mObInitMap.put(new Pair("ahs", "net/minecraft/world/NextTickListEntry")); - mObInitMap.put(new Pair("bts", "net/minecraft/client/audio/SoundHandler$SwitchType")); - mObInitMap.put(new Pair("bpt", "net/minecraft/client/renderer/texture/LayeredTexture")); - mObInitMap.put(new Pair("awz", "net/minecraft/world/gen/layer/GenLayerEdge$SwitchMode")); - mObInitMap.put(new Pair("bdw", "net/minecraft/client/gui/GuiScreen")); - mObInitMap.put(new Pair("bhv", "net/minecraft/client/model/TexturedQuad")); - mObInitMap.put(new Pair("blu", "net/minecraft/client/renderer/EntityRenderer$1")); - mObInitMap.put(new Pair("ip", "net/minecraft/network/play/client/C0APacketAnimation")); - mObInitMap.put(new Pair("eq", "net/minecraft/network/EnumConnectionState$4")); - mObInitMap.put(new Pair("ar", "net/minecraft/command/CommandGameMode")); - mObInitMap.put(new Pair("xw", "net/minecraft/entity/item/EntityTNTPrimed")); - mObInitMap.put(new Pair("tx", "net/minecraft/entity/ai/EntityAIAvoidEntity$1")); - mObInitMap.put(new Pair("i", "net/minecraft/crash/CrashReport$7")); - mObInitMap.put(new Pair("ato", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor5")); - mObInitMap.put(new Pair("app", "net/minecraft/block/BlockPistonBase")); - mObInitMap.put(new Pair("alq", "net/minecraft/block/BlockJukebox")); - mObInitMap.put(new Pair("ahr", "net/minecraft/world/ChunkCache")); - mObInitMap.put(new Pair("axn", "net/minecraft/world/gen/layer/GenLayer")); - mObInitMap.put(new Pair("bal", "net/minecraft/client/settings/KeyBinding")); - mObInitMap.put(new Pair("bek", "net/minecraft/client/gui/achievement/GuiStats$StatsBlock")); - mObInitMap.put(new Pair("bij", "net/minecraft/client/model/ModelIronGolem")); - mObInitMap.put(new Pair("btr", "net/minecraft/client/audio/SoundHandler$2")); - mObInitMap.put(new Pair("yk", "net/minecraft/entity/monster/EntitySilverfish")); - mObInitMap.put(new Pair("ul", "net/minecraft/entity/ai/EntityAIWatchClosest2")); - mObInitMap.put(new Pair("qm", "net/minecraft/util/MouseFilter")); - mObInitMap.put(new Pair("mn", "net/minecraft/entity/EntityTracker")); - mObInitMap.put(new Pair("io", "net/minecraft/network/play/INetHandlerPlayServer")); - mObInitMap.put(new Pair("aeg", "net/minecraft/item/ItemSlab")); - mObInitMap.put(new Pair("aah", "net/minecraft/inventory/ContainerEnchantment$1")); - mObInitMap.put(new Pair("aif", "net/minecraft/world/biome/BiomeGenForest")); - mObInitMap.put(new Pair("auc", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$JunglePyramid")); - mObInitMap.put(new Pair("ayb", "net/minecraft/world/gen/layer/GenLayerVoronoiZoom")); - mObInitMap - .put(new Pair("buf", "net/minecraft/client/stream/ChatController$SwitchChatState")); - mObInitMap.put(new Pair("bqg", "net/minecraft/client/renderer/texture/TextureManager$1")); - mObInitMap.put(new Pair("bii", "net/minecraft/client/model/PositionTextureVertex")); - mObInitMap.put(new Pair("bmh", "net/minecraft/client/renderer/Tessellator")); - mObInitMap.put(new Pair("ra", "net/minecraft/inventory/InventoryLargeChest")); - mObInitMap.put(new Pair("nb", - "net/minecraft/client/network/NetHandlerHandshakeMemory$SwitchEnumConnectionState")); - mObInitMap.put(new Pair("jc", "net/minecraft/network/play/client/C00PacketKeepAlive")); - mObInitMap.put(new Pair("fd", "net/minecraft/util/MessageSerializer2")); - mObInitMap.put(new Pair("be", "net/minecraft/command/server/CommandPardonPlayer")); - mObInitMap.put(new Pair("aqw", "net/minecraft/world/gen/MapGenCaves")); - mObInitMap.put(new Pair("amx", "net/minecraft/block/BlockQuartz")); - mObInitMap.put(new Pair("aez", "net/minecraft/item/crafting/RecipesFood")); - mObInitMap.put(new Pair("aiy", "net/minecraft/world/biome/BiomeEndDecorator")); - mObInitMap.put( - new Pair("bqz", "net/minecraft/client/resources/IResourceManagerReloadListener")); - mObInitMap.put(new Pair("rt", "net/minecraft/potion/PotionHealthBoost")); - mObInitMap.put(new Pair("nu", "net/minecraft/server/management/PlayerProfileCache$2")); - mObInitMap.put(new Pair("jv", "net/minecraft/network/login/INetHandlerLoginServer")); - mObInitMap.put(new Pair("fw", "net/minecraft/network/play/server/S0EPacketSpawnObject")); - mObInitMap.put(new Pair("bx", "net/minecraft/command/server/CommandTestForBlock")); - mObInitMap.put(new Pair("abo", "net/minecraft/item/ItemBucket")); - mObInitMap.put(new Pair("afn", "net/minecraft/enchantment/EnchantmentArrowFire")); - mObInitMap.put(new Pair("brn", "net/minecraft/client/resources/SkinManager$3$1")); - mObInitMap.put(new Pair("aqv", "net/minecraft/world/gen/ChunkProviderHell")); - mObInitMap.put(new Pair("auu", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$RightTurn")); - mObInitMap.put(new Pair("ayt", "net/minecraft/world/storage/WorldInfo$1")); - mObInitMap.put(new Pair("bbr", "net/minecraft/util/Timer")); - mObInitMap.put(new Pair("bfq", "net/minecraft/client/gui/GuiEnchantment")); - mObInitMap.put(new Pair("bjp", "net/minecraft/client/multiplayer/ServerList")); - mObInitMap.put(new Pair("bno", "net/minecraft/client/renderer/entity/Render")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsLevelSummary", - "net/minecraft/realms/RealmsLevelSummary")); - mObInitMap - .put(new Pair("gk", "net/minecraft/network/play/server/S22PacketMultiBlockChange")); - mObInitMap.put(new Pair("cl", "net/minecraft/block/BlockSourceImpl")); - mObInitMap.put(new Pair("vr", "net/minecraft/entity/ai/EntityAITargetNonTamed")); - mObInitMap.put(new Pair("rs", "net/minecraft/potion/PotionAttackDamage")); - mObInitMap.put(new Pair("arj", "net/minecraft/world/gen/feature/WorldGenClay")); - mObInitMap.put(new Pair("ank", "net/minecraft/block/BlockSign")); - mObInitMap.put(new Pair("ajl", "net/minecraft/block/Block$3")); - mObInitMap.put(new Pair("avi", "net/minecraft/world/gen/structure/MapGenStructureIO")); - mObInitMap.put(new Pair("bcf", "net/minecraft/client/gui/GuiButtonLanguage")); - mObInitMap.put(new Pair("bge", "net/minecraft/client/gui/ServerSelectionList")); - mObInitMap.put(new Pair("wf", "net/minecraft/entity/passive/EntityAnimal")); - mObInitMap.put(new Pair("sg", "net/minecraft/entity/EntityList")); - mObInitMap.put(new Pair("oh", - "net/minecraft/server/management/PreYggdrasilConverter$ConversionError")); - mObInitMap.put(new Pair("ki", "net/minecraft/network/status/client/C01PacketPing")); - mObInitMap.put(new Pair("gj", "net/minecraft/network/play/server/S02PacketChat")); - mObInitMap.put(new Pair("acb", "net/minecraft/creativetab/CreativeTabs$5")); - mObInitMap - .put(new Pair("aga", "net/minecraft/enchantment/EnchantmentHelper$ModifierLiving")); - mObInitMap.put( - new Pair("bsa", "net/minecraft/client/resources/data/AnimationMetadataSection")); - mObInitMap.put(new Pair("bkc", "net/minecraft/client/particle/EntityFireworkOverlayFX")); - mObInitMap.put(new Pair("bob", "net/minecraft/client/renderer/entity/RenderItem$3")); - mObInitMap.put(new Pair("wy", "net/minecraft/entity/boss/EntityDragonPart")); - mObInitMap.put(new Pair("sz", "net/minecraft/entity/EnumCreatureAttribute")); - mObInitMap.put(new Pair("asq", "net/minecraft/world/gen/feature/WorldGenTrees")); - mObInitMap.put(new Pair("aor", "net/minecraft/tileentity/TileEntity")); - mObInitMap.put(new Pair("aks", "net/minecraft/block/BlockEnchantmentTable")); - mObInitMap.put(new Pair("acu", "net/minecraft/item/ItemFishFood$FishType")); - mObInitMap.put(new Pair("agt", "net/minecraft/world/ChunkPosition")); - mObInitMap.put(new Pair("bst", "net/minecraft/client/audio/ISound")); - mObInitMap.put(new Pair("bou", "net/minecraft/client/renderer/entity/RenderSnowMan")); - mObInitMap.put(new Pair("bcx", "net/minecraft/client/multiplayer/GuiConnecting")); - mObInitMap.put(new Pair("bgw", "net/minecraft/client/main/Main$3")); - mObInitMap.put(new Pair("bkv", "net/minecraft/client/particle/EntitySmokeFX")); - mObInitMap.put( - new Pair("tn", "net/minecraft/entity/ai/attributes/ModifiableAttributeInstance")); - mObInitMap.put(new Pair("po", "net/minecraft/util/IJsonSerializable")); - mObInitMap.put(new Pair("lp", "net/minecraft/scoreboard/ServerScoreboard")); - mObInitMap - .put(new Pair("hq", "net/minecraft/network/play/server/S13PacketDestroyEntities")); - mObInitMap.put(new Pair("dr", "net/minecraft/nbt/NBTTagLong")); - mObInitMap.put(new Pair("adi", "net/minecraft/item/ItemBucketMilk")); - mObInitMap.put(new Pair("ahh", "net/minecraft/world/IWorldAccess")); - mObInitMap.put(new Pair("bth", "net/minecraft/client/audio/MusicTicker$MusicType")); - mObInitMap.put(new Pair("bpi", "net/minecraft/client/shader/ShaderManager")); - mObInitMap.put(new Pair("asp", "net/minecraft/world/gen/feature/WorldGenTallGrass")); - mObInitMap.put(new Pair("awo", "net/minecraft/world/gen/NoiseGeneratorSimplex")); - mObInitMap.put(new Pair("bhk", "net/minecraft/client/model/ModelEnderman")); - mObInitMap.put(new Pair("blj", "net/minecraft/util/MovementInputFromOptions")); - mObInitMap.put(new Pair("ie", "net/minecraft/network/play/server/S3CPacketUpdateScore")); - mObInitMap.put(new Pair("ef", "net/minecraft/nbt/JsonToNBT$Primitive")); - mObInitMap.put(new Pair("ag", "net/minecraft/command/server/CommandBanPlayer")); - mObInitMap.put(new Pair("xl", "net/minecraft/entity/item/EntityMinecart")); - mObInitMap.put(new Pair("atd", "net/minecraft/world/gen/structure/MapGenNetherBridge")); - mObInitMap.put(new Pair("ape", "net/minecraft/tileentity/TileEntityEnderChest")); - mObInitMap.put(new Pair("alf", "net/minecraft/block/BlockGlass")); - mObInitMap.put(new Pair("ahg", "net/minecraft/world/MinecraftException")); - mObInitMap.put(new Pair("axc", "net/minecraft/world/gen/layer/GenLayerAddMushroomIsland")); - mObInitMap.put(new Pair("baa", "net/minecraft/scoreboard/Score$1")); - mObInitMap.put(new Pair("net/minecraft/realms/DisconnectedOnlineScreen", - "net/minecraft/realms/DisconnectedOnlineScreen")); - mObInitMap.put(new Pair("btg", "net/minecraft/client/audio/MusicTicker")); - mObInitMap.put(new Pair("ua", "net/minecraft/entity/ai/EntityAIMate")); - mObInitMap.put(new Pair("mc", "net/minecraft/server/gui/MinecraftServerGui$4")); - mObInitMap.put(new Pair("id", "net/minecraft/network/play/server/S3EPacketTeams")); - mObInitMap.put(new Pair("q", "net/minecraft/util/Facing")); - mObInitMap.put(new Pair("atw", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Start")); - mObInitMap.put(new Pair("apx", "net/minecraft/world/chunk/Chunk")); - mObInitMap.put(new Pair("aly", "net/minecraft/block/BlockMelon")); - mObInitMap.put(new Pair("ahz", "net/minecraft/world/biome/BiomeCache$Block")); - mObInitMap.put(new Pair("axv", "net/minecraft/world/gen/layer/GenLayerRiverMix")); - mObInitMap.put(new Pair("btz", "net/minecraft/client/stream/Metadata")); - mObInitMap.put(new Pair("ys", "net/minecraft/entity/monster/EntityZombie$GroupData")); - mObInitMap.put(new Pair("ut", "net/minecraft/entity/ai/EntityAIMoveTowardsRestriction")); - mObInitMap.put(new Pair("qu", "net/minecraft/util/Tuple")); - mObInitMap.put(new Pair("mv", "net/minecraft/world/WorldServer$ServerBlockEventList")); - mObInitMap.put(new Pair("iw", "net/minecraft/network/play/client/C11PacketEnchantItem")); - mObInitMap.put(new Pair("ex", "net/minecraft/network/NetworkStatistics$Tracker")); - mObInitMap.put(new Pair("ay", "net/minecraft/command/server/CommandListPlayers")); - mObInitMap.put( - new Pair("aql", "net/minecraft/world/chunk/storage/AnvilChunkLoader$PendingChunk")); - mObInitMap.put(new Pair("amm", "net/minecraft/block/BlockOldLog")); - mObInitMap.put(new Pair("aap", "net/minecraft/inventory/ContainerPlayer")); - mObInitMap.put(new Pair("ain", "net/minecraft/world/biome/BiomeGenMutated")); - mObInitMap.put(new Pair("p", "net/minecraft/util/Direction")); - mObInitMap.put(new Pair("bun", "net/minecraft/client/stream/IStream$AuthFailureReason")); - mObInitMap.put(new Pair("bqo", "net/minecraft/client/resources/ResourceIndex")); - mObInitMap.put(new Pair("bas", "net/minecraft/client/Minecraft$12")); - mObInitMap.put(new Pair("ber", "net/minecraft/client/gui/IProgressMeter")); - mObInitMap.put(new Pair("biq", "net/minecraft/client/model/ModelDragon")); - mObInitMap.put(new Pair("bmp", - "net/minecraft/client/renderer/tileentity/TileEntityMobSpawnerRenderer")); - mObInitMap.put(new Pair("ri", "net/minecraft/profiler/PlayerUsageSnooper")); - mObInitMap.put(new Pair("nj", "net/minecraft/network/NetHandlerPlayServer$2")); - mObInitMap.put(new Pair("jk", "net/minecraft/network/play/client/C0CPacketInput")); - mObInitMap.put(new Pair("fl", "net/minecraft/event/HoverEvent")); - mObInitMap.put(new Pair("bm", "net/minecraft/command/server/CommandSetBlock")); - mObInitMap.put(new Pair("abd", "net/minecraft/item/ItemArmor$ArmorMaterial")); - mObInitMap.put(new Pair("afc", "net/minecraft/item/crafting/RecipesMapExtending")); - mObInitMap.put(new Pair("ajb", "net/minecraft/block/BlockAnvil")); - mObInitMap.put(new Pair("brc", "net/minecraft/client/resources/ResourcePackRepository")); - mObInitMap.put( - new Pair("auj", "net/minecraft/world/gen/structure/StructureStrongholdPieces$1")); - mObInitMap.put(new Pair("ayi", "net/minecraft/world/storage/MapData")); - mObInitMap.put(new Pair("bbg", "net/minecraft/util/MouseHelper")); - mObInitMap.put(new Pair("bff", "net/minecraft/client/gui/GuiScreenBook$NextPageButton")); - mObInitMap.put(new Pair("bje", "net/minecraft/client/multiplayer/PlayerControllerMP")); - mObInitMap.put(new Pair("bnd", "net/minecraft/client/renderer/entity/RenderBlaze")); - mObInitMap.put(new Pair("ca", "net/minecraft/command/CommandToggleDownfall")); - mObInitMap.put(new Pair("zf", "net/minecraft/entity/item/EntityFireworkRocket")); - mObInitMap.put(new Pair("vg", "net/minecraft/entity/ai/EntityAIRunAroundLikeCrazy")); - mObInitMap.put(new Pair("rh", "net/minecraft/inventory/InventoryBasic")); - mObInitMap.put(new Pair("aja", "net/minecraft/block/BlockAir")); - mObInitMap.put(new Pair("bbz", "net/minecraft/client/gui/MapItemRenderer$Instance")); - mObInitMap.put(new Pair("bfy", "net/minecraft/client/gui/inventory/GuiDispenser")); - mObInitMap.put(new Pair("bjx", "net/minecraft/client/particle/EntityCritFX")); - mObInitMap.put(new Pair("zy", "net/minecraft/inventory/ContainerBeacon$BeaconSlot")); - mObInitMap.put(new Pair("vz", "net/minecraft/village/Village")); - mObInitMap.put(new Pair("arr", "net/minecraft/world/gen/feature/WorldGenGlowStone2")); - mObInitMap.put(new Pair("ans", "net/minecraft/block/BlockStairs")); - mObInitMap.put(new Pair("abv", "net/minecraft/creativetab/CreativeTabs$10")); - mObInitMap.put(new Pair("afu", "net/minecraft/enchantment/EnumEnchantmentType")); - mObInitMap.put(new Pair("ajt", "net/minecraft/block/BlockCactus")); - mObInitMap.put( - new Pair("avq", "net/minecraft/world/gen/structure/StructureVillagePieces$House1")); - mObInitMap.put(new Pair("azp", "net/minecraft/world/storage/IPlayerFileData")); - mObInitMap.put(new Pair("bru", "net/minecraft/client/resources/data/IMetadataSection")); - mObInitMap.put(new Pair("bjw", "net/minecraft/client/particle/EntityCrit2FX")); - mObInitMap.put(new Pair("bnv", "net/minecraft/client/renderer/entity/RenderHorse")); - mObInitMap.put(new Pair("wn", "net/minecraft/entity/passive/EntityOcelot")); - mObInitMap.put(new Pair("op", "net/minecraft/server/management/UserListBans")); - mObInitMap.put(new Pair("kq", "net/minecraft/init/Bootstrap$13")); - mObInitMap.put(new Pair("gr", "net/minecraft/network/play/server/S3FPacketCustomPayload")); - mObInitMap.put(new Pair("cs", "net/minecraft/util/IObjectIntIterable")); - mObInitMap.put(new Pair("asf", "net/minecraft/world/gen/feature/WorldGenTaiga1")); - mObInitMap.put(new Pair("aog", "net/minecraft/block/BlockTripWireHook")); - mObInitMap.put(new Pair("akh", "net/minecraft/block/BlockDeadBush")); - mObInitMap.put(new Pair("acj", "net/minecraft/item/ItemDye")); - mObInitMap.put(new Pair("agi", "net/minecraft/enchantment/EnchantmentProtection")); - mObInitMap - .put(new Pair("bsi", "net/minecraft/client/resources/data/TextureMetadataSection")); - mObInitMap.put(new Pair("bcm", "net/minecraft/client/gui/GuiSlot")); - mObInitMap.put(new Pair("bgl", "net/minecraft/client/gui/GuiResourcePackSelected")); - mObInitMap.put(new Pair("bkk", "net/minecraft/client/particle/EntityLavaFX")); - mObInitMap.put( - new Pair("boj", "net/minecraft/client/renderer/entity/RenderMinecartMobSpawner")); - mObInitMap.put(new Pair("tc", "net/minecraft/entity/item/EntityPainting$EnumArt")); - mObInitMap.put(new Pair("pd", "net/minecraft/stats/IStatStringFormat")); - mObInitMap.put(new Pair("le", "net/minecraft/command/ServerCommand")); - mObInitMap.put(new Pair("hf", "net/minecraft/network/play/server/S14PacketEntity")); - mObInitMap.put(new Pair("dg", "net/minecraft/nbt/NBTTagByte")); - mObInitMap.put(new Pair("ase", "net/minecraft/world/gen/feature/WorldGenMinable")); - mObInitMap.put(new Pair("awd", - "net/minecraft/world/gen/structure/StructureVillagePieces$Village")); - mObInitMap.put(new Pair("bda", "net/minecraft/client/gui/GuiCreateFlatWorld$Details")); - mObInitMap.put(new Pair("hy", "net/minecraft/network/play/server/S12PacketEntityVelocity")); - mObInitMap.put(new Pair("dz", "net/minecraft/nbt/NBTBase$NBTPrimitive")); - mObInitMap.put(new Pair("xa", "net/minecraft/entity/boss/EntityDragon")); - mObInitMap.put(new Pair("tb", "net/minecraft/entity/item/EntityPainting")); - mObInitMap - .put(new Pair("asx", "net/minecraft/world/gen/structure/StructureMineshaftPieces")); - mObInitMap.put(new Pair("aoy", "net/minecraft/tileentity/TileEntityCommandBlock$1")); - mObInitMap.put(new Pair("akz", "net/minecraft/block/BlockFence")); - mObInitMap.put(new Pair("aww", "net/minecraft/block/material/MaterialPortal")); - mObInitMap.put(new Pair("bdt", "net/minecraft/client/gui/GuiScreenWorking")); - mObInitMap.put(new Pair("bhs", "net/minecraft/client/model/ModelHorse")); - mObInitMap.put(new Pair("xt", "net/minecraft/entity/ai/EntityMinecartMobSpawner")); - mObInitMap.put(new Pair("tu", "net/minecraft/entity/ai/EntityLookHelper")); - mObInitMap.put(new Pair("pv", "net/minecraft/util/HttpUtil")); - mObInitMap.put(new Pair("lw", "net/minecraft/server/dedicated/DedicatedServer$3")); - mObInitMap.put(new Pair("hx", "net/minecraft/network/play/server/S1BPacketEntityAttach")); - mObInitMap.put(new Pair("f", "net/minecraft/crash/CrashReport$4")); - mObInitMap.put(new Pair("atl", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Entrance")); - mObInitMap.put(new Pair("apm", "net/minecraft/tileentity/TileEntitySign")); - mObInitMap.put(new Pair("aln", "net/minecraft/block/BlockHopper")); - mObInitMap.put(new Pair("adp", "net/minecraft/item/ItemPotion")); - mObInitMap.put(new Pair("aho", "net/minecraft/world/SpawnerAnimals")); - mObInitMap.put(new Pair("bai", "net/minecraft/stats/ObjectiveStat")); - mObInitMap.put(new Pair("bto", "net/minecraft/client/audio/SoundEventAccessorComposite")); - mObInitMap.put(new Pair("bpp", "net/minecraft/client/renderer/texture/AbstractTexture")); - mObInitMap.put(new Pair("blq", "net/minecraft/client/renderer/EntitySorter")); - mObInitMap.put(new Pair("yh", "net/minecraft/entity/monster/EntityPigZombie")); - mObInitMap.put(new Pair("ui", "net/minecraft/entity/ai/EntityAIBase")); - mObInitMap.put(new Pair("qj", "net/minecraft/profiler/Profiler$Result")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsServerStatusPinger", - "net/minecraft/realms/RealmsServerStatusPinger")); - mObInitMap.put(new Pair("mk", "net/minecraft/world/demo/DemoWorldServer")); - mObInitMap - .put(new Pair("il", "net/minecraft/network/play/server/S20PacketEntityProperties")); - mObInitMap.put(new Pair("em", "net/minecraft/network/NetworkManager$3")); - mObInitMap.put(new Pair("an", "net/minecraft/command/server/CommandEmote")); - mObInitMap.put(new Pair("aqa", "net/minecraft/world/chunk/storage/NibbleArrayReader")); - mObInitMap.put(new Pair("amb", "net/minecraft/block/BlockSilverfish")); - mObInitMap.put(new Pair("aed", "net/minecraft/item/ItemSnowball")); - mObInitMap.put(new Pair("aae", "net/minecraft/inventory/InventoryCrafting")); - mObInitMap.put(new Pair("aic", "net/minecraft/world/biome/BiomeGenDesert")); - mObInitMap.put(new Pair("e", "net/minecraft/crash/CrashReport$3")); - mObInitMap.put( - new Pair("buc", "net/minecraft/client/stream/BroadcastController$BroadcastState")); - mObInitMap.put(new Pair("bqd", "net/minecraft/client/renderer/texture/TextureAtlasSprite")); - mObInitMap.put(new Pair("bah", "net/minecraft/scoreboard/IScoreObjectiveCriteria")); - mObInitMap.put(new Pair("beg", "net/minecraft/client/gui/GuiWinGame")); - mObInitMap.put(new Pair("bif", "net/minecraft/client/model/ModelSnowMan")); - mObInitMap.put(new Pair("bme", "net/minecraft/client/util/QuadComparator")); - mObInitMap.put(new Pair("fa", "net/minecraft/util/MessageSerializer")); - mObInitMap.put(new Pair("bb", "net/minecraft/command/server/CommandNetstat")); - mObInitMap.put(new Pair("aew", "net/minecraft/item/crafting/RecipeBookCloning")); - mObInitMap.put(new Pair("aax", "net/minecraft/inventory/SlotCrafting")); - mObInitMap.put(new Pair("aiv", "net/minecraft/world/biome/BiomeGenSwamp")); - mObInitMap.put(new Pair("x", "net/minecraft/command/IAdminCommand")); - mObInitMap.put(new Pair("bqw", "net/minecraft/client/resources/IResource")); - mObInitMap.put(new Pair("bez", "net/minecraft/client/gui/inventory/GuiBeacon")); - mObInitMap.put(new Pair("biy", "net/minecraft/client/model/TextureOffset")); - mObInitMap.put(new Pair("bmx", "net/minecraft/client/renderer/culling/Frustrum")); - mObInitMap.put(new Pair("js", "net/minecraft/network/login/server/S02PacketLoginSuccess")); - mObInitMap.put(new Pair("ft", "net/minecraft/network/Packet")); - mObInitMap.put(new Pair("bu", "net/minecraft/command/server/CommandSummon")); - mObInitMap.put(new Pair("yz", "net/minecraft/entity/player/EntityPlayer")); - mObInitMap.put(new Pair("aqs", "net/minecraft/world/gen/MapGenRavine")); - mObInitMap.put(new Pair("amt", "net/minecraft/block/BlockRailPowered")); - mObInitMap.put(new Pair("aiu", "net/minecraft/world/biome/BiomeGenStoneBeach")); - mObInitMap.put(new Pair("aur", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$PieceWeight")); - mObInitMap.put(new Pair("ayq", "net/minecraft/world/storage/SaveHandler")); - mObInitMap.put(new Pair("bbo", "net/minecraft/client/LoadingScreenRenderer")); - mObInitMap.put(new Pair("bfn", - "net/minecraft/client/gui/inventory/GuiContainerCreative$CreativeSlot")); - mObInitMap.put(new Pair("bjm", "net/minecraft/client/multiplayer/ServerAddress")); - mObInitMap.put(new Pair("buu", "net/minecraft/client/renderer/OpenGlHelper")); - mObInitMap.put(new Pair("zn", "net/minecraft/entity/item/EntityExpBottle")); - mObInitMap.put(new Pair("vo", "net/minecraft/entity/ai/EntityAINearestAttackableTarget")); - mObInitMap.put(new Pair("rp", "net/minecraft/util/EntityDamageSource")); - mObInitMap.put(new Pair("nq", "net/minecraft/server/network/NetHandlerStatusServer")); - mObInitMap.put(new Pair("jr", "net/minecraft/network/login/INetHandlerLoginClient")); - mObInitMap.put(new Pair("arg", "net/minecraft/world/gen/feature/WorldGeneratorBonusChest")); - mObInitMap.put(new Pair("anh", "net/minecraft/block/BlockSand")); - mObInitMap.put(new Pair("abk", "net/minecraft/item/ItemBook")); - mObInitMap.put(new Pair("afj", "net/minecraft/item/crafting/RecipesCrafting")); - mObInitMap.put(new Pair("aji", "net/minecraft/block/Block")); - mObInitMap.put(new Pair("avf", "net/minecraft/world/gen/structure/MapGenStructure$1")); - mObInitMap.put(new Pair("aze", "net/minecraft/world/storage/ISaveFormat")); - mObInitMap.put(new Pair("brj", "net/minecraft/client/resources/SkinManager")); - mObInitMap.put(new Pair("bjl", "net/minecraft/client/gui/GuiPlayerInfo")); - mObInitMap.put( - new Pair("bnk", "net/minecraft/client/renderer/tileentity/RenderEnderCrystal")); - mObInitMap.put(new Pair("wc", "net/minecraft/village/VillageCollection")); - mObInitMap.put(new Pair("sd", "net/minecraft/entity/Entity$SwitchEnumEntitySize")); - mObInitMap.put(new Pair("oe", "net/minecraft/server/management/PreYggdrasilConverter$5")); - mObInitMap.put(new Pair("kf", - "net/minecraft/network/ServerStatusResponse$MinecraftProtocolVersionIdentifier")); - mObInitMap.put(new Pair("gg", "net/minecraft/network/play/server/S24PacketBlockAction")); - mObInitMap.put(new Pair("ch", "net/minecraft/command/CommandNotFoundException")); - mObInitMap.put(new Pair("arz", "net/minecraft/world/gen/feature/WorldGenMegaJungle")); - mObInitMap.put(new Pair("bcb", "net/minecraft/client/gui/GuiButton")); - mObInitMap.put(new Pair("bga", "net/minecraft/client/gui/ServerListEntryLanScan")); - mObInitMap.put(new Pair("sw", "net/minecraft/entity/EntityLiving")); - mObInitMap.put(new Pair("ox", "net/minecraft/network/rcon/RConThreadQuery")); - mObInitMap.put(new Pair("ky", "net/minecraft/init/Bootstrap$7")); - mObInitMap.put(new Pair("gz", "net/minecraft/network/play/server/S26PacketMapChunkBulk")); - mObInitMap.put(new Pair("akp", "net/minecraft/block/BlockDragonEgg")); - mObInitMap.put(new Pair("acr", "net/minecraft/item/ItemFireworkCharge")); - mObInitMap.put(new Pair("agq", "net/minecraft/tileentity/MobSpawnerBaseLogic")); - mObInitMap.put(new Pair("bsq", "net/minecraft/client/audio/SoundList$SoundEntry")); - mObInitMap.put(new Pair("bor", "net/minecraft/client/renderer/entity/RenderSilverfish")); - mObInitMap.put(new Pair("avx", - "net/minecraft/world/gen/structure/StructureVillagePieces$WoodHut")); - mObInitMap.put(new Pair("azw", "net/minecraft/util/Vec3")); - mObInitMap.put(new Pair("bcu", "net/minecraft/client/gui/GuiConfirmOpenLink")); - mObInitMap.put(new Pair("bgt", "net/minecraft/client/main/Main$1")); - mObInitMap.put(new Pair("bks", "net/minecraft/client/particle/EntityCloudFX")); - mObInitMap.put(new Pair("wu", "net/minecraft/entity/passive/EntityWaterMob")); - mObInitMap.put(new Pair("sv", "net/minecraft/entity/EntityLivingBase")); - mObInitMap.put(new Pair("asm", "net/minecraft/world/gen/feature/WorldGenLiquids")); - mObInitMap.put(new Pair("aon", "net/minecraft/block/BlockButtonWood")); - mObInitMap.put(new Pair("ako", "net/minecraft/block/BlockDoublePlant")); - mObInitMap.put(new Pair("awl", "net/minecraft/world/gen/NoiseGeneratorPerlin")); - mObInitMap.put(new Pair("bdi", "net/minecraft/client/gui/GuiSleepMP")); - mObInitMap.put(new Pair("bhh", "net/minecraft/client/model/ModelChicken")); - mObInitMap.put(new Pair("blg", "net/minecraft/client/entity/AbstractClientPlayer")); - mObInitMap.put(new Pair("xi", "net/minecraft/entity/item/EntityBoat")); - mObInitMap.put(new Pair("tj", "net/minecraft/entity/ai/attributes/AttributeModifier")); - mObInitMap.put(new Pair("pk", "net/minecraft/stats/StatBase$3")); - mObInitMap.put(new Pair("ll", "net/minecraft/server/MinecraftServer$5")); - mObInitMap.put( - new Pair("ata", "net/minecraft/world/gen/structure/StructureMineshaftPieces$Room")); - mObInitMap.put(new Pair("apb", "net/minecraft/tileentity/TileEntityDispenser")); - mObInitMap.put(new Pair("alc", "net/minecraft/block/BlockFlower")); - mObInitMap.put(new Pair("ade", "net/minecraft/init/Items")); - mObInitMap.put(new Pair("ahd", "net/minecraft/world/World$2")); - mObInitMap.put( - new Pair("btd", "net/minecraft/client/network/LanServerDetector$LanServerList")); - mObInitMap.put(new Pair("bpe", "net/minecraft/client/renderer/entity/RenderWolf")); - mObInitMap.put(new Pair("blf", "net/minecraft/client/particle/EntityRainFX")); - mObInitMap.put(new Pair("ia", "net/minecraft/network/play/server/S1FPacketSetExperience")); - mObInitMap.put(new Pair("eb", "net/minecraft/nbt/JsonToNBT")); - mObInitMap.put(new Pair("ac", "net/minecraft/command/ICommandSender")); - mObInitMap.put(new Pair("att", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$PieceWeight")); - mObInitMap.put(new Pair("apu", "net/minecraft/world/chunk/IChunkProvider")); - mObInitMap.put(new Pair("alv", "net/minecraft/block/BlockLever")); - mObInitMap.put(new Pair("adx", "net/minecraft/item/ItemShears")); - mObInitMap.put(new Pair("ahw", "net/minecraft/world/biome/BiomeGenBase$TempCategory")); - mObInitMap.put(new Pair("btw", "net/minecraft/client/stream/MetadataAchievement")); - mObInitMap.put(new Pair("bpx", "net/minecraft/client/renderer/texture/Stitcher$Slot")); - mObInitMap.put(new Pair("bhz", "net/minecraft/client/model/ModelSign")); - mObInitMap.put(new Pair("bly", "net/minecraft/client/renderer/ItemRenderer")); - mObInitMap.put(new Pair("uq", "net/minecraft/entity/ai/EntityAIAttackOnCollide")); - mObInitMap.put(new Pair("ms", "net/minecraft/world/gen/ChunkProviderServer")); - mObInitMap.put(new Pair("it", - "net/minecraft/network/play/client/C16PacketClientStatus$EnumState")); - mObInitMap.put(new Pair("eu", "net/minecraft/network/NetworkStatistics")); - mObInitMap.put(new Pair("av", "net/minecraft/command/CommandServerKick")); - mObInitMap.put(new Pair("ael", "net/minecraft/item/ItemWritableBook")); - mObInitMap.put(new Pair("aam", "net/minecraft/inventory/ContainerHorseInventory")); - mObInitMap.put(new Pair("aik", "net/minecraft/world/biome/BiomeGenJungle")); - mObInitMap.put(new Pair("m", "net/minecraft/crash/CrashReportCategory$2")); - mObInitMap.put(new Pair("buk", - "net/minecraft/client/stream/IngestServerTester$IngestTestListener")); - mObInitMap.put(new Pair("bql", "net/minecraft/client/renderer/texture/TextureClock")); - mObInitMap.put(new Pair("ats", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Piece")); - mObInitMap.put(new Pair("axr", "net/minecraft/world/gen/layer/GenLayerHills")); - mObInitMap.put(new Pair("bap", "net/minecraft/client/Minecraft$1")); - mObInitMap - .put(new Pair("beo", "net/minecraft/client/gui/achievement/GuiStats$StatsItem$1")); - mObInitMap.put(new Pair("bin", "net/minecraft/client/model/ModelWither")); - mObInitMap.put(new Pair("bmm", - "net/minecraft/client/renderer/tileentity/TileEntityChestRenderer")); - mObInitMap - .put(new Pair("jh", "net/minecraft/network/play/client/C13PacketPlayerAbilities")); - mObInitMap.put(new Pair("fi", "net/minecraft/event/ClickEvent$Action")); - mObInitMap.put(new Pair("bj", "net/minecraft/command/server/CommandSaveOn")); - mObInitMap.put(new Pair("yo", "net/minecraft/entity/monster/EntitySpider$GroupData")); - mObInitMap.put(new Pair("up", "net/minecraft/entity/ai/EntityAIVillagerMate")); - mObInitMap.put(new Pair("aqh", "net/minecraft/world/chunk/storage/RegionFile")); - mObInitMap.put(new Pair("ami", "net/minecraft/block/BlockNewLog")); - mObInitMap.put(new Pair("aij", "net/minecraft/world/biome/BiomeGenSnow")); - mObInitMap.put(new Pair("aug", "net/minecraft/world/gen/structure/MapGenStronghold")); - mObInitMap.put(new Pair("ayf", "net/minecraft/pathfinding/PathEntity")); - mObInitMap.put(new Pair("bbd", "net/minecraft/client/Minecraft$7")); - mObInitMap.put(new Pair("bfc", "net/minecraft/client/gui/inventory/GuiBeacon$PowerButton")); - mObInitMap.put(new Pair("bjb", "net/minecraft/client/network/NetHandlerPlayClient")); - mObInitMap.put( - new Pair("buj", "net/minecraft/client/stream/IngestServerTester$SwitchStatType")); - mObInitMap.put(new Pair("zc", "net/minecraft/entity/projectile/EntityArrow")); - mObInitMap.put(new Pair("vd", "net/minecraft/entity/ai/EntityAIArrowAttack")); - mObInitMap.put(new Pair("re", "net/minecraft/client/renderer/IconFlipped")); - mObInitMap.put(new Pair("nf", "net/minecraft/network/NetworkSystem$3")); - mObInitMap.put(new Pair("jg", - "net/minecraft/network/play/client/C03PacketPlayer$C05PacketPlayerLook")); - mObInitMap.put(new Pair("auz", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stairs2")); - mObInitMap.put(new Pair("ayy", "net/minecraft/world/storage/WorldInfo$6")); - mObInitMap.put(new Pair("bja", "net/minecraft/client/network/NetHandlerLoginClient$1")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsSharedConstants", - "net/minecraft/realms/RealmsSharedConstants")); - mObInitMap.put(new Pair("zv", "net/minecraft/inventory/ContainerRepair$1")); - mObInitMap.put(new Pair("vw", "net/minecraft/entity/ai/EntitySenses")); - mObInitMap.put(new Pair("rx", "net/minecraft/entity/EntityAgeable")); - mObInitMap.put(new Pair("ny", "net/minecraft/server/management/IPBanEntry")); - mObInitMap.put(new Pair("jz", "net/minecraft/network/status/server/S01PacketPong")); - mObInitMap.put(new Pair("aro", "net/minecraft/world/gen/feature/WorldGenFlowers")); - mObInitMap.put(new Pair("anp", "net/minecraft/block/BlockSponge")); - mObInitMap.put(new Pair("abs", "net/minecraft/item/ItemMapBase")); - mObInitMap.put(new Pair("afr", "net/minecraft/enchantment/EnchantmentDurability")); - mObInitMap.put(new Pair("ajq", "net/minecraft/block/BlockBrewingStand")); - mObInitMap.put(new Pair("avn", "net/minecraft/world/gen/structure/MapGenVillage")); - mObInitMap.put(new Pair("brr", "net/minecraft/client/resources/LanguageManager")); - mObInitMap.put(new Pair("bbv", "net/minecraft/client/gui/GuiIngame")); - mObInitMap.put(new Pair("bfu", "net/minecraft/client/gui/inventory/GuiInventory")); - mObInitMap.put(new Pair("bjt", "net/minecraft/client/network/OldServerPinger$2$1")); - mObInitMap.put(new Pair("bns", "net/minecraft/client/renderer/entity/RenderFish")); - mObInitMap.put(new Pair("sl", "net/minecraft/command/IEntitySelector$2")); - mObInitMap.put(new Pair("om", "net/minecraft/server/management/UserList")); - mObInitMap.put(new Pair("kn", "net/minecraft/init/Bootstrap$10")); - mObInitMap.put(new Pair("go", "net/minecraft/network/play/server/S30PacketWindowItems")); - mObInitMap.put(new Pair("cp", "net/minecraft/dispenser/IBehaviorDispenseItem")); - mObInitMap.put(new Pair("ake", "net/minecraft/block/BlockWorkbench")); - mObInitMap.put(new Pair("acg", "net/minecraft/item/ItemTool")); - mObInitMap.put(new Pair("agf", "net/minecraft/enchantment/EnchantmentKnockback")); - mObInitMap.put(new Pair("bsf", - "net/minecraft/client/resources/data/LanguageMetadataSectionSerializer")); - mObInitMap.put(new Pair("avm", "net/minecraft/world/gen/structure/StructureStart")); - mObInitMap.put(new Pair("bcj", "net/minecraft/client/gui/GuiOptionButton")); - mObInitMap - .put(new Pair("bgi", "net/minecraft/client/resources/ResourcePackListEntryFound")); - mObInitMap.put(new Pair("bkh", "net/minecraft/client/particle/EntityHeartFX")); - mObInitMap.put(new Pair("bog", "net/minecraft/client/renderer/entity/RenderLightningBolt")); - mObInitMap.put(new Pair("lb", "net/minecraft/client/util/JsonException")); - mObInitMap.put(new Pair("hc", "net/minecraft/network/play/server/S29PacketSoundEffect")); - mObInitMap.put(new Pair("dd", "net/minecraft/util/StatCollector")); - mObInitMap.put(new Pair("wj", "net/minecraft/entity/passive/EntityHorse$1")); - mObInitMap.put(new Pair("asb", "net/minecraft/world/gen/feature/WorldGenHugeTrees")); - mObInitMap.put(new Pair("aoc", "net/minecraft/block/BlockTorch")); - mObInitMap.put( - new Pair("awa", "net/minecraft/world/gen/structure/StructureVillagePieces$Start")); - mObInitMap.put(new Pair("la", "net/minecraft/init/Bootstrap$9")); - mObInitMap.put(new Pair("aov", "net/minecraft/tileentity/TileEntityBrewingStand")); - mObInitMap.put(new Pair("akw", "net/minecraft/block/ITileEntityProvider")); - mObInitMap.put(new Pair("acy", "net/minecraft/item/ItemAppleGold")); - mObInitMap.put(new Pair("agx", "net/minecraft/world/ColorizerFoliage")); - mObInitMap.put(new Pair("awt", "net/minecraft/block/material/Material")); - mObInitMap.put(new Pair("bsx", "net/minecraft/server/integrated/IntegratedServer")); - mObInitMap.put(new Pair("boy", "net/minecraft/client/renderer/entity/RenderTNTPrimed")); - mObInitMap.put(new Pair("bkz", "net/minecraft/client/particle/EntitySuspendFX")); - mObInitMap.put(new Pair("xq", "net/minecraft/entity/item/EntityMinecartFurnace")); - mObInitMap.put(new Pair("tr", "net/minecraft/entity/EntityBodyHelper")); - mObInitMap.put(new Pair("lt", "net/minecraft/server/dedicated/DedicatedServer")); - mObInitMap.put(new Pair("hu", "net/minecraft/network/play/server/S09PacketHeldItemChange")); - mObInitMap.put(new Pair("dv", "net/minecraft/nbt/NBTUtil")); - mObInitMap.put(new Pair("ati", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Straight")); - mObInitMap.put(new Pair("apj", "net/minecraft/tileentity/TileEntityMobSpawner")); - mObInitMap.put(new Pair("alk", "net/minecraft/block/BlockBreakable")); - mObInitMap.put(new Pair("adm", "net/minecraft/item/ItemNameTag")); - mObInitMap.put(new Pair("ahl", "net/minecraft/world/IBlockAccess")); - mObInitMap.put(new Pair("btl", "net/minecraft/client/audio/SoundManager$2")); - mObInitMap.put(new Pair("bpm", "net/minecraft/client/shader/ShaderLoader$ShaderType")); - mObInitMap.put(new Pair("bdp", "net/minecraft/client/gui/GuiIngameMenu")); - mObInitMap.put(new Pair("bho", "net/minecraft/client/model/ModelMagmaCube")); - mObInitMap.put(new Pair("bln", "net/minecraft/entity/boss/BossStatus")); - mObInitMap.put(new Pair("uf", "net/minecraft/entity/ai/EntityAISwimming")); - mObInitMap.put(new Pair("qg", "net/minecraft/util/EnumTypeAdapterFactory$1")); - mObInitMap.put(new Pair("ii", "net/minecraft/network/play/server/S33PacketUpdateSign")); - mObInitMap.put(new Pair("ej", "net/minecraft/network/NetworkManager")); - mObInitMap.put(new Pair("ak", "net/minecraft/command/CommandDebug")); - mObInitMap.put(new Pair("aea", "net/minecraft/item/ItemSimpleFoiled")); - mObInitMap.put(new Pair("aab", "net/minecraft/inventory/ContainerBrewingStand$Potion")); - mObInitMap.put(new Pair("b", "net/minecraft/crash/CrashReport")); - mObInitMap.put(new Pair("bqa", "net/minecraft/client/renderer/texture/TextureMap$1")); - mObInitMap.put(new Pair("ath", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$End")); - mObInitMap.put(new Pair("bae", "net/minecraft/scoreboard/Team")); - mObInitMap.put(new Pair("bed", "net/minecraft/client/gui/GuiScreenOptionsSounds$Button")); - mObInitMap.put(new Pair("bic", "net/minecraft/client/model/ModelSkeleton")); - mObInitMap.put(new Pair("bmb", "net/minecraft/client/renderer/RenderGlobal$1")); - mObInitMap.put(new Pair("yd", "net/minecraft/entity/monster/EntityGhast")); - mObInitMap.put(new Pair("ue", "net/minecraft/entity/ai/EntityAIFleeSun")); - mObInitMap.put(new Pair("aau", "net/minecraft/inventory/SlotMerchantResult")); - mObInitMap.put(new Pair("u", "net/minecraft/util/Util")); - mObInitMap.put(new Pair("bax", "net/minecraft/client/Minecraft$SwitchMovingObjectType")); - mObInitMap.put(new Pair("bew", "net/minecraft/client/gui/GuiControls")); - mObInitMap.put(new Pair("yw", "net/minecraft/entity/player/PlayerCapabilities")); - mObInitMap.put(new Pair("ux", "net/minecraft/entity/ai/EntityAILookAtVillager")); - mObInitMap.put(new Pair("mz", "net/minecraft/network/PingResponseHandler")); - mObInitMap.put(new Pair("aqp", "net/minecraft/world/WorldProviderHell")); - mObInitMap.put(new Pair("amq", "net/minecraft/block/BlockPortal$Size")); - mObInitMap.put(new Pair("aat", "net/minecraft/inventory/ContainerMerchant")); - mObInitMap.put(new Pair("air", "net/minecraft/world/biome/BiomeGenRiver")); - mObInitMap.put(new Pair("auo", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Crossing")); - mObInitMap.put(new Pair("ayn", "net/minecraft/world/chunk/storage/AnvilSaveConverter")); - mObInitMap.put(new Pair("bbl", "net/minecraft/client/settings/GameSettings$SwitchOptions")); - mObInitMap.put(new Pair("bur", "net/minecraft/client/stream/NullStream")); - mObInitMap.put(new Pair("bqs", "net/minecraft/client/resources/FolderResourcePack")); - mObInitMap.put(new Pair("bmt", "net/minecraft/client/renderer/tileentity/RenderEndPortal")); - mObInitMap.put(new Pair("zk", "net/minecraft/entity/projectile/EntityThrowable")); - mObInitMap.put(new Pair("vl", "net/minecraft/entity/ai/EntityAITradePlayer")); - mObInitMap.put(new Pair("rm", "net/minecraft/util/CombatEntry")); - mObInitMap.put(new Pair("nn", "net/minecraft/server/network/NetHandlerLoginServer")); - mObInitMap.put( - new Pair("jo", "net/minecraft/network/play/client/C08PacketPlayerBlockPlacement")); - mObInitMap.put(new Pair("fp", "net/minecraft/util/ChatStyle$Serializer")); - mObInitMap.put(new Pair("bq", "net/minecraft/command/CommandShowSeed")); - mObInitMap.put(new Pair("ard", "net/minecraft/world/gen/feature/WorldGenBigTree")); - mObInitMap.put(new Pair("ane", "net/minecraft/block/BlockReed")); - mObInitMap.put(new Pair("abh", "net/minecraft/item/ItemBlock")); - mObInitMap.put(new Pair("afg", "net/minecraft/item/crafting/IRecipe")); - mObInitMap.put(new Pair("ajf", "net/minecraft/block/BlockRailBase$Rail")); - mObInitMap.put(new Pair("avc", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stronghold")); - mObInitMap.put( - new Pair("brg", "net/minecraft/client/resources/SimpleReloadableResourceManager")); - mObInitMap.put(new Pair("bbk", "net/minecraft/client/settings/GameSettings$1")); - mObInitMap.put(new Pair("bfj", "net/minecraft/client/gui/inventory/GuiCrafting")); - mObInitMap.put(new Pair("bji", "net/minecraft/client/multiplayer/WorldClient$3")); - mObInitMap.put(new Pair("bnh", "net/minecraft/client/renderer/entity/RenderCow")); - mObInitMap.put(new Pair("sa", "net/minecraft/entity/Entity")); - mObInitMap.put(new Pair("ob", "net/minecraft/server/management/PreYggdrasilConverter$2")); - mObInitMap - .put(new Pair("kc", "net/minecraft/network/ServerStatusResponse$PlayerCountData")); - mObInitMap.put(new Pair("gd", "net/minecraft/network/play/server/S37PacketStatistics")); - mObInitMap.put(new Pair("ce", "net/minecraft/command/NumberInvalidException")); - mObInitMap.put(new Pair("net/minecraft/realms/Realms", "net/minecraft/realms/Realms")); - mObInitMap.put(new Pair("ajy", "net/minecraft/block/BlockClay")); - mObInitMap.put(new Pair("afz", "net/minecraft/enchantment/EnchantmentHelper$IModifier")); - mObInitMap.put(new Pair("brz", "net/minecraft/client/resources/data/AnimationFrame")); - mObInitMap.put(new Pair("avb", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$StairsStraight")); - mObInitMap.put(new Pair("aza", "net/minecraft/world/storage/WorldInfo$8")); - mObInitMap.put(new Pair("kv", "net/minecraft/init/Bootstrap$5")); - mObInitMap.put(new Pair("gw", "net/minecraft/network/play/server/S00PacketKeepAlive")); - mObInitMap.put(new Pair("cx", "net/minecraft/dispenser/IPosition")); - mObInitMap.put(new Pair("arv", "net/minecraft/world/gen/feature/WorldGenIcePath")); - mObInitMap.put(new Pair("anw", "net/minecraft/block/BlockStoneBrick")); - mObInitMap.put(new Pair("ajx", "net/minecraft/block/BlockChest")); - mObInitMap.put(new Pair("avu", - "net/minecraft/world/gen/structure/StructureVillagePieces$PieceWeight")); - mObInitMap.put(new Pair("azt", "net/minecraft/util/AxisAlignedBB")); - mObInitMap.put(new Pair("bcr", "net/minecraft/client/gui/GuiSlotRealmsProxy")); - mObInitMap.put(new Pair("bgq", - "net/minecraft/client/gui/stream/GuiStreamUnavailable$SwitchReason")); - mObInitMap.put(new Pair("bkp", "net/minecraft/client/particle/EffectRenderer$2")); - mObInitMap.put(new Pair("wr", "net/minecraft/entity/monster/EntitySnowman")); - mObInitMap.put(new Pair("ss", "net/minecraft/entity/EntityHanging")); - mObInitMap.put(new Pair("ot", "net/minecraft/network/rcon/RConOutputStream")); - mObInitMap.put(new Pair("ku", "net/minecraft/init/Bootstrap$4")); - mObInitMap.put(new Pair("asj", "net/minecraft/world/gen/feature/WorldGenSand")); - mObInitMap.put(new Pair("aok", "net/minecraft/block/BlockWeb")); - mObInitMap.put(new Pair("akl", "net/minecraft/block/BlockDirt")); - mObInitMap.put(new Pair("acn", "net/minecraft/item/ItemEnderEye")); - mObInitMap.put(new Pair("agm", "net/minecraft/entity/IMerchant")); - mObInitMap.put(new Pair("bsm", "net/minecraft/client/audio/MovingSoundMinecart")); - mObInitMap.put(new Pair("bon", "net/minecraft/client/renderer/entity/RenderPainting")); - mObInitMap.put(new Pair("bko", "net/minecraft/client/particle/EffectRenderer$1")); - mObInitMap.put(new Pair("xf", "net/minecraft/util/WeightedRandomFishable")); - mObInitMap.put(new Pair("tg", "net/minecraft/entity/passive/EntityTameable")); - mObInitMap.put(new Pair("ph", "net/minecraft/stats/StatBase")); - mObInitMap.put(new Pair("li", "net/minecraft/server/MinecraftServer$2")); - mObInitMap.put(new Pair("hj", "net/minecraft/network/play/server/S36PacketSignEditorOpen")); - mObInitMap.put(new Pair("dk", "net/minecraft/nbt/NBTTagDouble")); - mObInitMap.put(new Pair("adb", "net/minecraft/item/Item")); - mObInitMap.put(new Pair("aha", "net/minecraft/world/ColorizerGrass")); - mObInitMap.put(new Pair("bta", "net/minecraft/client/network/LanServerDetector")); - mObInitMap.put(new Pair("bpb", "net/minecraft/client/renderer/entity/RenderWitch")); - mObInitMap.put(new Pair("bde", "net/minecraft/client/gui/GuiScreenServerList")); - mObInitMap.put(new Pair("bhd", "net/minecraft/client/model/ModelBlaze")); - mObInitMap.put(new Pair("blc", "net/minecraft/client/particle/EntityBlockDustFX")); - mObInitMap.put(new Pair("tz", "net/minecraft/entity/ai/EntityAIBreakDoor")); - mObInitMap.put(new Pair("als", "net/minecraft/block/BlockLadder")); - mObInitMap.put(new Pair("aht", "net/minecraft/world/biome/BiomeGenBeach")); - mObInitMap.put(new Pair("btt", "net/minecraft/client/audio/SoundRegistry")); - mObInitMap.put(new Pair("bpu", "net/minecraft/client/renderer/texture/SimpleTexture")); - mObInitMap.put(new Pair("bdx", "net/minecraft/client/gui/GuiSelectWorld")); - mObInitMap.put(new Pair("bhw", "net/minecraft/client/model/ModelQuadruped")); - mObInitMap.put(new Pair("blv", "net/minecraft/client/renderer/EntityRenderer$2")); - mObInitMap.put(new Pair("iq", "net/minecraft/network/play/client/C14PacketTabComplete")); - mObInitMap.put(new Pair("er", "net/minecraft/network/EnumConnectionState$3")); - mObInitMap.put(new Pair("as", "net/minecraft/command/CommandGameRule")); - mObInitMap.put(new Pair("xx", "net/minecraft/entity/monster/EntityBlaze")); - mObInitMap.put(new Pair("ty", "net/minecraft/entity/ai/EntityAIBeg")); - mObInitMap.put(new Pair("aaj", "net/minecraft/inventory/ContainerFurnace")); - mObInitMap.put(new Pair("j", "net/minecraft/crash/CrashReport$8")); - mObInitMap.put(new Pair("atp", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor2")); - mObInitMap.put(new Pair("apq", "net/minecraft/block/BlockPistonExtension")); - mObInitMap.put(new Pair("alr", "net/minecraft/block/BlockJukebox$TileEntityJukebox")); - mObInitMap.put(new Pair("axo", "net/minecraft/world/gen/layer/GenLayer$1")); - mObInitMap.put(new Pair("bam", "net/minecraft/client/renderer/RenderHelper")); - mObInitMap - .put(new Pair("bel", "net/minecraft/client/gui/achievement/GuiStats$StatsBlock$1")); - mObInitMap.put(new Pair("bik", "net/minecraft/client/model/ModelVillager")); - mObInitMap.put(new Pair("bmj", - "net/minecraft/client/renderer/tileentity/TileEntityBeaconRenderer")); - mObInitMap.put(new Pair("bg", "net/minecraft/command/server/CommandPublishLocalServer")); - mObInitMap.put(new Pair("yl", "net/minecraft/entity/monster/EntitySkeleton")); - mObInitMap.put(new Pair("um", "net/minecraft/entity/ai/EntityAILeapAtTarget")); - mObInitMap.put(new Pair("qn", "net/minecraft/util/StringUtils")); - mObInitMap.put(new Pair("mo", "net/minecraft/entity/EntityTracker$1")); - mObInitMap.put(new Pair("amf", "net/minecraft/block/BlockNetherWart")); - mObInitMap.put(new Pair("aeh", "net/minecraft/item/ItemSword")); - mObInitMap.put(new Pair("aai", "net/minecraft/inventory/ContainerEnchantment$2")); - mObInitMap.put(new Pair("aig", "net/minecraft/world/biome/BiomeGenForest$1")); - mObInitMap.put(new Pair("aud", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$JunglePyramid$Stones")); - mObInitMap.put(new Pair("ayc", "net/minecraft/world/gen/layer/GenLayerZoom")); - mObInitMap.put(new Pair("bba", "net/minecraft/client/Minecraft$4")); - mObInitMap.put(new Pair("bug", "net/minecraft/client/stream/ChatController$ChatState")); - mObInitMap.put(new Pair("bqh", "net/minecraft/client/renderer/texture/ITextureObject")); - mObInitMap.put(new Pair("bmi", "net/minecraft/client/shader/TesselatorVertexState")); - mObInitMap.put(new Pair("va", "net/minecraft/entity/ai/EntityAIPlay")); - mObInitMap.put(new Pair("rb", "net/minecraft/inventory/IInventory")); - mObInitMap.put(new Pair("nc", "net/minecraft/network/NetworkSystem")); - mObInitMap.put(new Pair("jd", "net/minecraft/network/play/client/C03PacketPlayer")); - mObInitMap.put(new Pair("fe", "net/minecraft/util/ChatComponentStyle")); - mObInitMap.put(new Pair("bf", "net/minecraft/command/CommandPlaySound")); - mObInitMap.put(new Pair("aqx", "net/minecraft/world/gen/MapGenBase")); - mObInitMap.put(new Pair("amy", "net/minecraft/block/BlockRail")); - mObInitMap.put(new Pair("aiz", "net/minecraft/world/gen/feature/WorldGenWaterlily")); - mObInitMap.put(new Pair("auw", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stones")); - mObInitMap.put(new Pair("vt", "net/minecraft/entity/ai/EntityAIOwnerHurtTarget")); - mObInitMap.put(new Pair("ru", "net/minecraft/potion/PotionHealth")); - mObInitMap.put( - new Pair("nv", "net/minecraft/server/management/PlayerProfileCache$ProfileEntry")); - mObInitMap.put(new Pair("jw", "net/minecraft/network/login/client/C00PacketLoginStart")); - mObInitMap.put( - new Pair("fx", "net/minecraft/network/play/server/S11PacketSpawnExperienceOrb")); - mObInitMap.put(new Pair("by", "net/minecraft/command/server/CommandTestFor")); - mObInitMap.put(new Pair("abp", "net/minecraft/item/ItemCarrotOnAStick")); - mObInitMap.put(new Pair("afo", "net/minecraft/enchantment/EnchantmentArrowInfinite")); - mObInitMap.put(new Pair("ajn", "net/minecraft/init/Blocks")); - mObInitMap.put(new Pair("bro", - "net/minecraft/client/resources/SkinManager$SkinAvailableCallback")); - mObInitMap.put(new Pair("auv", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$RoomCrossing")); - mObInitMap.put(new Pair("ayu", "net/minecraft/world/storage/WorldInfo$2")); - mObInitMap.put(new Pair("bbs", "net/minecraft/util/Session")); - mObInitMap.put(new Pair("bfr", "net/minecraft/client/gui/inventory/GuiFurnace")); - mObInitMap.put(new Pair("bjq", "net/minecraft/client/network/OldServerPinger")); - mObInitMap.put(new Pair("bnp", "net/minecraft/client/renderer/entity/RenderXPOrb")); - mObInitMap.put(new Pair("kk", "net/minecraft/dispenser/BehaviorProjectileDispense")); - mObInitMap.put( - new Pair("gl", "net/minecraft/network/play/server/S32PacketConfirmTransaction")); - mObInitMap.put(new Pair("cm", "net/minecraft/dispenser/BehaviorDefaultDispenseItem")); - mObInitMap.put(new Pair("zr", "net/minecraft/util/FoodStats")); - mObInitMap.put(new Pair("vs", "net/minecraft/entity/ai/EntityAIOwnerHurtByTarget")); - mObInitMap.put(new Pair("ark", "net/minecraft/world/gen/feature/WorldGenDeadBush")); - mObInitMap.put(new Pair("anl", "net/minecraft/block/BlockSkull")); - mObInitMap.put(new Pair("ajm", "net/minecraft/block/Block$SoundType")); - mObInitMap.put(new Pair("avj", "net/minecraft/world/gen/structure/MapGenStructureData")); - mObInitMap.put(new Pair("bgf", "net/minecraft/client/gui/GuiScreenResourcePacks")); - mObInitMap.put(new Pair("bke", "net/minecraft/client/particle/EntityFireworkStarterFX")); - mObInitMap.put(new Pair("wg", "net/minecraft/entity/passive/EntityChicken")); - mObInitMap.put(new Pair("sh", "net/minecraft/entity/EntityList$EntityEggInfo")); - mObInitMap - .put(new Pair("oi", "net/minecraft/server/management/ServerConfigurationManager")); - mObInitMap.put(new Pair("kj", "net/minecraft/network/status/client/C00PacketServerQuery")); - mObInitMap.put(new Pair("aka", "net/minecraft/block/BlockColored")); - mObInitMap.put(new Pair("acc", "net/minecraft/creativetab/CreativeTabs$6")); - mObInitMap - .put(new Pair("agb", "net/minecraft/enchantment/EnchantmentHelper$ModifierDamage")); - mObInitMap.put(new Pair("bsb", - "net/minecraft/client/resources/data/AnimationMetadataSectionSerializer")); - mObInitMap.put(new Pair("bkd", "net/minecraft/client/particle/EntityFireworkSparkFX")); - mObInitMap.put(new Pair("boc", "net/minecraft/client/renderer/entity/RenderItem$4")); - mObInitMap.put(new Pair("wz", "net/minecraft/entity/item/EntityEnderCrystal")); - mObInitMap.put(new Pair("asr", "net/minecraft/world/gen/feature/WorldGenVines")); - mObInitMap.put(new Pair("aos", "net/minecraft/tileentity/TileEntity$1")); - mObInitMap.put(new Pair("akt", "net/minecraft/block/BlockEndPortal")); - mObInitMap.put(new Pair("acv", "net/minecraft/item/ItemFishingRod")); - mObInitMap.put(new Pair("agu", "net/minecraft/world/ChunkCoordIntPair")); - mObInitMap.put(new Pair("awq", "net/minecraft/block/material/MaterialLogic")); - mObInitMap.put(new Pair("bsu", "net/minecraft/client/audio/ISound$AttenuationType")); - mObInitMap.put(new Pair("bov", "net/minecraft/client/renderer/entity/RenderSpider")); - mObInitMap.put(new Pair("bcy", "net/minecraft/client/multiplayer/GuiConnecting$1")); - mObInitMap.put(new Pair("bkw", "net/minecraft/client/particle/EntitySnowShovelFX")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsAnvilLevelStorageSource", - "net/minecraft/realms/RealmsAnvilLevelStorageSource")); - mObInitMap.put(new Pair("to", "net/minecraft/entity/ai/attributes/RangedAttribute")); - mObInitMap.put(new Pair("pp", "net/minecraft/stats/StatList")); - mObInitMap.put(new Pair("lq", "net/minecraft/server/dedicated/PropertyManager")); - mObInitMap.put( - new Pair("hr", "net/minecraft/network/play/server/S1EPacketRemoveEntityEffect")); - mObInitMap.put(new Pair("ds", "net/minecraft/nbt/NBTSizeTracker")); - mObInitMap.put(new Pair("alh", "net/minecraft/block/BlockGrass")); - mObInitMap.put(new Pair("adj", "net/minecraft/item/ItemMinecart")); - mObInitMap.put(new Pair("bti", "net/minecraft/client/audio/SoundPoolEntry")); - mObInitMap.put(new Pair("bpj", "net/minecraft/client/shader/ShaderGroup")); - mObInitMap.put(new Pair("awp", "net/minecraft/world/gen/NoiseGenerator")); - mObInitMap.put(new Pair("bdm", "net/minecraft/client/gui/GuiOptions")); - mObInitMap.put(new Pair("bhl", "net/minecraft/client/model/ModelGhast")); - mObInitMap.put(new Pair("blk", "net/minecraft/client/entity/EntityPlayerSP")); - mObInitMap.put(new Pair("me", "net/minecraft/server/gui/PlayerListComponent")); - mObInitMap.put(new Pair("eg", "net/minecraft/network/NettyEncryptionTranslator")); - mObInitMap.put(new Pair("ah", "net/minecraft/command/server/CommandBroadcast")); - mObInitMap.put(new Pair("xm", "net/minecraft/entity/item/EntityMinecartChest")); - mObInitMap.put( - new Pair("net/minecraft/realms/Tezzelator", "net/minecraft/realms/Tezzelator")); - mObInitMap - .put(new Pair("ate", "net/minecraft/world/gen/structure/MapGenNetherBridge$Start")); - mObInitMap.put(new Pair("apf", "net/minecraft/tileentity/TileEntityFlowerPot")); - mObInitMap.put(new Pair("alg", "net/minecraft/block/BlockGlowstone")); - mObInitMap.put(new Pair("axd", "net/minecraft/world/gen/layer/GenLayerAddSnow")); - mObInitMap.put(new Pair("bea", "net/minecraft/client/gui/GuiSnooper")); - mObInitMap.put(new Pair("ya", "net/minecraft/entity/monster/EntityEnderman")); - mObInitMap.put(new Pair("ub", "net/minecraft/entity/ai/EntityAIControlledByPlayer")); - mObInitMap.put(new Pair("qc", "net/minecraft/util/ThreadSafeBoundList")); - mObInitMap.put(new Pair("md", "net/minecraft/server/gui/MinecraftServerGui$5")); - mObInitMap.put(new Pair("r", "net/minecraft/util/ChunkCoordinates")); - mObInitMap.put(new Pair("atx", "net/minecraft/world/gen/structure/MapGenScatteredFeature")); - mObInitMap.put(new Pair("apy", "net/minecraft/world/chunk/Chunk$1")); - mObInitMap.put(new Pair("alz", "net/minecraft/block/BlockCompressed")); - mObInitMap.put(new Pair("axw", "net/minecraft/world/gen/layer/GenLayerShore")); - mObInitMap.put(new Pair("bau", "net/minecraft/client/Minecraft$14")); - mObInitMap.put(new Pair("yt", "net/minecraft/entity/NpcMerchant")); - mObInitMap.put(new Pair("uu", "net/minecraft/entity/ai/EntityAIMoveTowardsTarget")); - mObInitMap.put(new Pair("qv", "net/minecraft/util/WeightedRandom")); - mObInitMap.put(new Pair("mw", "net/minecraft/entity/player/EntityPlayerMP")); - mObInitMap.put(new Pair("ix", "net/minecraft/network/play/client/C0EPacketClickWindow")); - mObInitMap.put(new Pair("ey", "net/minecraft/network/NetworkStatistics$PacketStatData")); - mObInitMap.put(new Pair("az", "net/minecraft/command/server/CommandMessage")); - mObInitMap.put(new Pair("amn", "net/minecraft/block/BlockOre")); - mObInitMap.put(new Pair("aaq", "net/minecraft/inventory/ContainerPlayer$1")); - mObInitMap.put(new Pair("aio", "net/minecraft/world/biome/BiomeGenOcean")); - mObInitMap.put(new Pair("aul", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$SwitchDoor")); - mObInitMap.put(new Pair("buo", "net/minecraft/client/stream/TwitchStream")); - mObInitMap.put(new Pair("bqp", "net/minecraft/client/resources/DefaultResourcePack")); - mObInitMap.put(new Pair("bat", "net/minecraft/client/Minecraft$13")); - mObInitMap.put(new Pair("bes", "net/minecraft/client/gui/GuiKeyBindingList")); - mObInitMap.put(new Pair("bir", "net/minecraft/client/model/ModelEnderCrystal")); - mObInitMap.put(new Pair("bmq", - "net/minecraft/client/renderer/tileentity/TileEntityRendererPiston")); - mObInitMap.put(new Pair("vi", "net/minecraft/entity/ai/EntityAICreeperSwell")); - mObInitMap.put(new Pair("rj", "net/minecraft/profiler/PlayerUsageSnooper$1")); - mObInitMap - .put(new Pair("nk", "net/minecraft/network/NetHandlerPlayServer$SwitchEnumState")); - mObInitMap.put(new Pair("jl", "net/minecraft/network/play/client/C09PacketHeldItemChange")); - mObInitMap.put(new Pair("fm", "net/minecraft/event/HoverEvent$Action")); - mObInitMap.put(new Pair("bn", "net/minecraft/command/server/CommandSetDefaultSpawnpoint")); - mObInitMap.put(new Pair("abe", "net/minecraft/item/ItemBlockWithMetadata")); - mObInitMap.put(new Pair("afd", "net/minecraft/item/crafting/RecipesIngots")); - mObInitMap.put(new Pair("ajc", "net/minecraft/block/BlockContainer")); - mObInitMap.put(new Pair("brd", "net/minecraft/client/resources/ResourcePackRepository$1")); - mObInitMap.put( - new Pair("auk", "net/minecraft/world/gen/structure/StructureStrongholdPieces$2")); - mObInitMap.put(new Pair("ayj", "net/minecraft/world/storage/MapData$MapInfo")); - mObInitMap.put(new Pair("bbh", "net/minecraft/client/renderer/OpenGlCapsChecker")); - mObInitMap.put(new Pair("bfg", "net/minecraft/client/gui/inventory/GuiBrewingStand")); - mObInitMap.put(new Pair("bjf", "net/minecraft/client/multiplayer/WorldClient")); - mObInitMap.put(new Pair("bne", "net/minecraft/client/renderer/entity/RenderBoat")); - mObInitMap.put(new Pair("ga", "net/minecraft/network/play/server/S10PacketSpawnPainting")); - mObInitMap.put(new Pair("cb", "net/minecraft/command/CommandWeather")); - mObInitMap.put(new Pair("zg", "net/minecraft/entity/projectile/EntityLargeFireball")); - mObInitMap.put(new Pair("vh", "net/minecraft/entity/ai/EntityAISit")); - mObInitMap.put(new Pair("abx", "net/minecraft/creativetab/CreativeTabs$12")); - mObInitMap.put(new Pair("ana", "net/minecraft/block/BlockRedstoneWire")); - mObInitMap.put(new Pair("bfz", "net/minecraft/client/gui/GuiMultiplayer")); - mObInitMap.put(new Pair("bjy", "net/minecraft/client/particle/EntityDropParticleFX")); - mObInitMap.put(new Pair("zz", "net/minecraft/inventory/ContainerBrewingStand")); - mObInitMap.put(new Pair("ars", "net/minecraft/world/gen/feature/WorldGenHellLava")); - mObInitMap.put(new Pair("ant", "net/minecraft/block/BlockStaticLiquid")); - mObInitMap.put(new Pair("abw", "net/minecraft/creativetab/CreativeTabs$11")); - mObInitMap.put(new Pair("afv", "net/minecraft/enchantment/EnchantmentHelper")); - mObInitMap.put(new Pair("aju", "net/minecraft/block/BlockCake")); - mObInitMap.put( - new Pair("avr", "net/minecraft/world/gen/structure/StructureVillagePieces$Field1")); - mObInitMap.put(new Pair("azq", "net/minecraft/world/storage/MapStorage")); - mObInitMap.put(new Pair("bco", "net/minecraft/client/gui/GuiStreamIndicator")); - mObInitMap.put( - new Pair("brv", "net/minecraft/client/resources/data/IMetadataSectionSerializer")); - mObInitMap.put(new Pair("bnw", "net/minecraft/client/renderer/entity/RenderBiped")); - mObInitMap.put(new Pair("wo", "net/minecraft/entity/passive/EntityPig")); - mObInitMap.put(new Pair("sp", "net/minecraft/command/IEntitySelector$ArmoredMob")); - mObInitMap.put(new Pair("oq", "net/minecraft/server/management/UserListBansEntry")); - mObInitMap.put(new Pair("kr", "net/minecraft/init/Bootstrap$14")); - mObInitMap.put(new Pair("gs", "net/minecraft/network/play/server/S40PacketDisconnect")); - mObInitMap.put(new Pair("ct", "net/minecraft/util/ObjectIntIdentityMap")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsEditBox", - "net/minecraft/realms/RealmsEditBox")); - mObInitMap.put(new Pair("asg", "net/minecraft/world/gen/feature/WorldGenPumpkin")); - mObInitMap.put(new Pair("aoh", "net/minecraft/block/BlockVine")); - mObInitMap.put(new Pair("aki", "net/minecraft/block/BlockRailDetector")); - mObInitMap.put(new Pair("ack", "net/minecraft/item/ItemEgg")); - mObInitMap.put(new Pair("agj", "net/minecraft/enchantment/EnchantmentThorns")); - mObInitMap.put( - new Pair("awf", "net/minecraft/world/gen/structure/StructureVillagePieces$Well")); - mObInitMap.put(new Pair("bsj", - "net/minecraft/client/resources/data/TextureMetadataSectionSerializer")); - mObInitMap.put(new Pair("bok", "net/minecraft/client/renderer/entity/RenderLiving")); - mObInitMap.put(new Pair("bcn", "net/minecraft/client/gui/GuiOptionSlider")); - mObInitMap.put(new Pair("bgm", "net/minecraft/client/gui/stream/GuiIngestServers")); - mObInitMap.put(new Pair("bkl", "net/minecraft/client/particle/EntityNoteFX")); - mObInitMap.put(new Pair("xc", "net/minecraft/entity/boss/EntityWither")); - mObInitMap.put(new Pair("td", "net/minecraft/entity/EntityCreature")); - mObInitMap.put(new Pair("pe", "net/minecraft/stats/StatBasic")); - mObInitMap.put(new Pair("hg", - "net/minecraft/network/play/server/S14PacketEntity$S15PacketEntityRelMove")); - mObInitMap.put(new Pair("dh", "net/minecraft/nbt/NBTTagCompound")); - mObInitMap.put( - new Pair("awe", "net/minecraft/world/gen/structure/StructureVillagePieces$Road")); - mObInitMap.put(new Pair("bdb", "net/minecraft/client/gui/GuiCreateWorld")); - mObInitMap.put(new Pair("ly", "net/minecraft/server/gui/MinecraftServerGui")); - mObInitMap - .put(new Pair("hz", "net/minecraft/network/play/server/S04PacketEntityEquipment")); - mObInitMap.put(new Pair("asy", - "net/minecraft/world/gen/structure/StructureMineshaftPieces$Corridor")); - mObInitMap.put(new Pair("aoz", "net/minecraft/tileentity/TileEntityComparator")); - mObInitMap.put(new Pair("awx", "net/minecraft/world/gen/layer/GenLayerDeepOcean")); - mObInitMap.put(new Pair("bdu", "net/minecraft/client/gui/GuiDownloadTerrain")); - mObInitMap.put(new Pair("bht", "net/minecraft/client/model/ModelOcelot")); - mObInitMap.put(new Pair("bls", - "net/minecraft/client/renderer/tileentity/TileEntityRendererChestHelper")); - mObInitMap.put(new Pair("ap", "net/minecraft/command/CommandXP")); - mObInitMap.put(new Pair("xu", "net/minecraft/entity/ai/EntityMinecartMobSpawner$1")); - mObInitMap.put(new Pair("tv", "net/minecraft/entity/ai/EntityMoveHelper")); - mObInitMap.put(new Pair("pw", "net/minecraft/util/HttpUtil$1")); - mObInitMap.put(new Pair("lx", "net/minecraft/server/dedicated/DedicatedServer$4")); - mObInitMap.put(new Pair("g", "net/minecraft/crash/CrashReport$5")); - mObInitMap.put(new Pair("atm", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Crossing2")); - mObInitMap.put(new Pair("apn", "net/minecraft/tileentity/TileEntitySkull")); - mObInitMap.put(new Pair("alo", "net/minecraft/block/BlockHugeMushroom")); - mObInitMap.put(new Pair("adq", "net/minecraft/item/EnumRarity")); - mObInitMap.put(new Pair("ahp", "net/minecraft/world/Teleporter")); - mObInitMap.put(new Pair("axl", "net/minecraft/world/gen/layer/IntCache")); - mObInitMap.put(new Pair("baj", "net/minecraft/client/renderer/ActiveRenderInfo")); - mObInitMap.put(new Pair("btp", "net/minecraft/client/audio/SoundHandler")); - mObInitMap.put(new Pair("bpq", "net/minecraft/client/renderer/texture/DynamicTexture")); - mObInitMap.put(new Pair("blr", "net/minecraft/client/util/RenderDistanceSorter")); - mObInitMap.put(new Pair("yi", "net/minecraft/entity/IRangedAttackMob")); - mObInitMap.put(new Pair("uj", "net/minecraft/entity/ai/EntityAITasks")); - mObInitMap.put(new Pair("qk", "net/minecraft/util/IProgressUpdate")); - mObInitMap.put(new Pair("ml", "net/minecraft/world/demo/DemoWorldManager")); - mObInitMap.put(new Pair("im", - "net/minecraft/network/play/server/S20PacketEntityProperties$Snapshot")); - mObInitMap.put(new Pair("en", - "net/minecraft/network/NetworkManager$InboundHandlerTuplePacketListener")); - mObInitMap.put(new Pair("ao", "net/minecraft/command/CommandEnchant")); - mObInitMap.put(new Pair("amc", "net/minecraft/block/BlockMushroom")); - mObInitMap.put(new Pair("aee", "net/minecraft/item/ItemMonsterPlacer")); - mObInitMap.put(new Pair("aaf", "net/minecraft/inventory/ContainerWorkbench")); - mObInitMap.put(new Pair("aid", "net/minecraft/world/biome/BiomeGenHills")); - mObInitMap.put(new Pair("aua", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$1")); - mObInitMap.put(new Pair("bud", - "net/minecraft/client/stream/BroadcastController$BroadcastListener")); - mObInitMap - .put(new Pair("bqe", "net/minecraft/client/renderer/texture/TextureAtlasSprite$1")); - mObInitMap.put(new Pair("beh", "net/minecraft/client/gui/achievement/GuiAchievement")); - mObInitMap.put(new Pair("big", "net/minecraft/client/model/ModelSpider")); - mObInitMap.put(new Pair("ja", "net/minecraft/network/play/client/C02PacketUseEntity")); - mObInitMap.put(new Pair("fb", "net/minecraft/network/INetHandler")); - mObInitMap.put(new Pair("bc", "net/minecraft/command/server/CommandOp")); - mObInitMap.put(new Pair("amv", "net/minecraft/block/BlockPressurePlate$Sensitivity")); - mObInitMap.put(new Pair("aex", "net/minecraft/item/crafting/RecipesDyes")); - mObInitMap.put(new Pair("aay", "net/minecraft/inventory/Slot")); - mObInitMap.put(new Pair("aiw", "net/minecraft/world/biome/BiomeGenTaiga")); - mObInitMap.put(new Pair("y", "net/minecraft/command/CommandBase")); - mObInitMap.put(new Pair("bqx", "net/minecraft/util/ResourceLocation")); - mObInitMap.put(new Pair("biz", "net/minecraft/client/network/NetHandlerLoginClient")); - mObInitMap.put(new Pair("bmy", "net/minecraft/client/renderer/culling/ClippingHelper")); - mObInitMap.put( - new Pair("jt", "net/minecraft/network/login/server/S01PacketEncryptionRequest")); - mObInitMap.put(new Pair("fu", "net/minecraft/network/play/server/S08PacketPlayerPosLook")); - mObInitMap.put(new Pair("bv", "net/minecraft/command/server/CommandTeleport")); - mObInitMap.put(new Pair("net/minecraft/realms/RealmsConnect", - "net/minecraft/realms/RealmsConnect")); - mObInitMap.put(new Pair("abm", "net/minecraft/item/ItemBow")); - mObInitMap.put(new Pair("amu", "net/minecraft/block/BlockPressurePlate")); - mObInitMap.put(new Pair("aus", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$PortalRoom")); - mObInitMap.put(new Pair("ayr", "net/minecraft/world/storage/SaveFormatOld")); - mObInitMap.put(new Pair("bbp", "net/minecraft/util/ScreenShotHelper")); - mObInitMap.put(new Pair("bfo", "net/minecraft/client/renderer/InventoryEffectRenderer")); - mObInitMap.put(new Pair("bjn", "net/minecraft/client/multiplayer/ServerData")); - mObInitMap.put(new Pair("bnm", "net/minecraft/client/renderer/entity/RenderEnderman")); - mObInitMap.put(new Pair("zo", "net/minecraft/entity/projectile/EntityPotion")); - mObInitMap.put(new Pair("vp", "net/minecraft/entity/ai/EntityAINearestAttackableTarget$1")); - mObInitMap.put(new Pair("rq", "net/minecraft/util/EntityDamageSourceIndirect")); - mObInitMap.put(new Pair("nr", "net/minecraft/server/management/BanEntry")); - mObInitMap.put(new Pair("arh", "net/minecraft/world/gen/feature/WorldGenCactus")); - mObInitMap.put(new Pair("ani", "net/minecraft/block/BlockSandStone")); - mObInitMap.put(new Pair("abl", "net/minecraft/item/ItemGlassBottle")); - mObInitMap.put(new Pair("afk", "net/minecraft/item/crafting/RecipesTools")); - mObInitMap.put(new Pair("ajj", "net/minecraft/block/Block$1")); - mObInitMap.put(new Pair("avg", "net/minecraft/world/gen/structure/MapGenStructure$2")); - mObInitMap.put(new Pair("azf", "net/minecraft/world/storage/SaveFormatComparator")); - mObInitMap.put(new Pair("bcd", "net/minecraft/client/gui/GuiTextField")); - mObInitMap.put(new Pair("brk", "net/minecraft/client/resources/SkinManager$1")); - mObInitMap.put(new Pair("bnl", "net/minecraft/client/renderer/entity/RenderDragon")); - mObInitMap.put(new Pair("wd", "net/minecraft/entity/passive/EntityAmbientCreature")); - mObInitMap.put(new Pair("se", "net/minecraft/entity/Entity$EnumEntitySize")); - mObInitMap.put(new Pair("of", "net/minecraft/server/management/PreYggdrasilConverter$6")); - mObInitMap.put(new Pair("kg", - "net/minecraft/network/ServerStatusResponse$MinecraftProtocolVersionIdentifier$Serializer")); - mObInitMap.put(new Pair("gh", "net/minecraft/network/play/server/S23PacketBlockChange")); - mObInitMap.put(new Pair("ci", "net/minecraft/command/WrongUsageException")); - mObInitMap.put( - new Pair("avz", "net/minecraft/world/gen/structure/StructureVillagePieces$House2")); - mObInitMap.put( - new Pair("net/minecraft/realms/RealmsButton", "net/minecraft/realms/RealmsButton")); - mObInitMap.put(new Pair("bcc", "net/minecraft/client/gui/GuiNewChat")); - mObInitMap.put(new Pair("bgb", "net/minecraft/client/gui/ServerListEntryLanDetected")); - mObInitMap.put(new Pair("bka", "net/minecraft/client/particle/EntityExplodeFX")); - mObInitMap.put(new Pair("ww", "net/minecraft/entity/boss/IBossDisplayData")); - mObInitMap.put(new Pair("sx", "net/minecraft/entity/EnumCreatureType")); - mObInitMap.put(new Pair("oy", "net/minecraft/network/rcon/RConThreadQuery$Auth")); - mObInitMap.put(new Pair("kz", "net/minecraft/init/Bootstrap$8")); - mObInitMap.put(new Pair("akq", "net/minecraft/block/BlockDropper")); - mObInitMap.put(new Pair("acs", "net/minecraft/item/ItemFirework")); - mObInitMap.put(new Pair("agr", - "net/minecraft/tileentity/MobSpawnerBaseLogic$WeightedRandomMinecart")); - mObInitMap.put(new Pair("bsr", "net/minecraft/client/audio/SoundList$SoundEntry$Type")); - mObInitMap.put(new Pair("bos", "net/minecraft/client/renderer/entity/RenderSkeleton")); - mObInitMap.put( - new Pair("avy", "net/minecraft/world/gen/structure/StructureVillagePieces$Church")); - mObInitMap.put(new Pair("azx", "net/minecraft/scoreboard/ScoreObjective")); - mObInitMap.put(new Pair("bcv", "net/minecraft/client/gui/GuiYesNoCallback")); - mObInitMap.put(new Pair("bgu", "net/minecraft/client/main/Main$1$1")); - mObInitMap.put(new Pair("bkt", "net/minecraft/client/particle/EntityPortalFX")); - mObInitMap.put(new Pair("ln", "net/minecraft/server/management/PlayerPositionComparator")); - mObInitMap.put(new Pair("ho", "net/minecraft/network/play/server/S38PacketPlayerListItem")); - mObInitMap.put(new Pair("dp", "net/minecraft/nbt/NBTTagInt")); - mObInitMap.put(new Pair("wv", "net/minecraft/entity/passive/EntityWolf")); - mObInitMap.put(new Pair("asn", "net/minecraft/world/gen/feature/WorldGenTaiga2")); - mObInitMap.put(new Pair("aoo", "net/minecraft/block/BlockWoodSlab")); - mObInitMap.put(new Pair("bdj", "net/minecraft/client/gui/GuiLanguage")); - mObInitMap.put(new Pair("bhi", "net/minecraft/client/model/ModelCow")); - mObInitMap.put( - new Pair("blh", "net/minecraft/client/entity/AbstractClientPlayer$SwitchType")); - mObInitMap.put(new Pair("ae", "net/minecraft/command/server/CommandAchievement")); - mObInitMap.put(new Pair("xj", "net/minecraft/entity/item/EntityFallingBlock")); - mObInitMap.put(new Pair("tk", "net/minecraft/entity/ai/attributes/BaseAttribute")); - mObInitMap.put(new Pair("pl", "net/minecraft/stats/StatBase$4")); - mObInitMap.put(new Pair("lm", "net/minecraft/server/MinecraftServer$6")); - mObInitMap.put(new Pair("atb", - "net/minecraft/world/gen/structure/StructureMineshaftPieces$Stairs")); - mObInitMap.put(new Pair("apc", "net/minecraft/tileentity/TileEntityDropper")); - mObInitMap.put(new Pair("ald", "net/minecraft/block/BlockFlowerPot")); - mObInitMap.put(new Pair("adf", "net/minecraft/item/ItemLead")); - mObInitMap.put(new Pair("ahe", "net/minecraft/world/World$3")); - mObInitMap.put(new Pair("axa", "net/minecraft/world/gen/layer/GenLayerEdge$Mode")); - mObInitMap.put(new Pair("bte", "net/minecraft/client/multiplayer/ThreadLanServerPing")); - mObInitMap.put(new Pair("bpf", "net/minecraft/client/renderer/entity/RenderZombie")); - mObInitMap.put(new Pair("ma", "net/minecraft/server/gui/MinecraftServerGui$2")); - mObInitMap.put(new Pair("ib", "net/minecraft/network/play/server/S06PacketUpdateHealth")); - mObInitMap.put(new Pair("ec", "net/minecraft/nbt/JsonToNBT$Any")); - mObInitMap.put(new Pair("ad", "net/minecraft/command/PlayerSelector")); - mObInitMap.put(new Pair("atu", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Crossing")); - mObInitMap.put(new Pair("apv", "net/minecraft/world/chunk/NibbleArray")); - mObInitMap.put(new Pair("alw", "net/minecraft/block/BlockLiquid")); - mObInitMap.put(new Pair("ady", "net/minecraft/item/ItemSpade")); - mObInitMap.put(new Pair("ahx", "net/minecraft/world/biome/BiomeGenBase$SpawnListEntry")); - mObInitMap.put(new Pair("axt", "net/minecraft/world/gen/layer/GenLayerRiverInit")); - mObInitMap.put(new Pair("bpy", "net/minecraft/client/renderer/StitcherException")); - mObInitMap.put(new Pair("ur", "net/minecraft/entity/ai/EntityAIMoveIndoors")); - mObInitMap.put(new Pair("mt", "net/minecraft/world/WorldServer")); - mObInitMap.put(new Pair("iu", "net/minecraft/network/play/client/C15PacketClientSettings")); - mObInitMap.put(new Pair("ev", "net/minecraft/network/NetworkStatistics$1")); - mObInitMap.put(new Pair("aw", "net/minecraft/command/CommandKill")); - mObInitMap.put(new Pair("amk", "net/minecraft/block/BlockObsidian")); - mObInitMap.put(new Pair("aem", "net/minecraft/item/ItemEditableBook")); - mObInitMap.put(new Pair("aan", "net/minecraft/inventory/ContainerHorseInventory$1")); - mObInitMap.put(new Pair("ail", "net/minecraft/world/biome/BiomeGenMesa")); - mObInitMap.put(new Pair("n", "net/minecraft/crash/CrashReportCategory$3")); - mObInitMap.put( - new Pair("bul", "net/minecraft/client/stream/IngestServerTester$IngestTestState")); - mObInitMap.put(new Pair("bqm", "net/minecraft/client/renderer/texture/TextureCompass")); - mObInitMap.put(new Pair("axs", "net/minecraft/world/gen/layer/GenLayerRemoveTooMuchOcean")); - mObInitMap.put(new Pair("baq", "net/minecraft/client/Minecraft$10")); - mObInitMap.put( - new Pair("bep", "net/minecraft/client/gui/achievement/GuiStats$StatsMobsList")); - mObInitMap.put(new Pair("bio", "net/minecraft/client/model/ModelWolf")); - mObInitMap.put( - new Pair("bmn", "net/minecraft/client/renderer/entity/RenderEnchantmentTable")); - mObInitMap.put(new Pair("nh", "net/minecraft/network/NetHandlerPlayServer")); - mObInitMap.put(new Pair("ji", "net/minecraft/network/play/client/C07PacketPlayerDigging")); - mObInitMap.put(new Pair("fj", "net/minecraft/util/IChatComponent")); - mObInitMap.put(new Pair("bk", "net/minecraft/command/server/CommandScoreboard")); - mObInitMap.put(new Pair("yp", "net/minecraft/entity/monster/EntityWitch")); - mObInitMap.put(new Pair("abb", "net/minecraft/item/ItemArmor")); - mObInitMap.put(new Pair("aqi", "net/minecraft/world/chunk/storage/RegionFile$ChunkBuffer")); - mObInitMap.put(new Pair("amj", "net/minecraft/block/BlockNote")); - mObInitMap.put(new Pair("auh", "net/minecraft/world/gen/structure/MapGenStronghold$Start")); - mObInitMap.put(new Pair("ayg", "net/minecraft/pathfinding/PathFinder")); - mObInitMap.put(new Pair("bbe", "net/minecraft/client/Minecraft$8")); - mObInitMap.put(new Pair("bfd", "net/minecraft/client/gui/inventory/GuiBeacon$Button")); - mObInitMap.put(new Pair("bjc", "net/minecraft/client/network/NetHandlerPlayClient$1")); - mObInitMap.put(new Pair("bnb", "net/minecraft/client/renderer/entity/RenderArrow")); - mObInitMap.put(new Pair("zd", "net/minecraft/entity/item/EntityEnderEye")); - mObInitMap.put(new Pair("ve", "net/minecraft/entity/ai/EntityAIRestrictOpenDoor")); - mObInitMap.put(new Pair("rf", "net/minecraft/util/IIcon")); - mObInitMap.put(new Pair("ng", "net/minecraft/network/NetworkSystem$4")); - mObInitMap.put(new Pair("aba", "net/minecraft/item/ItemAnvilBlock")); - mObInitMap.put(new Pair("ayz", "net/minecraft/world/storage/WorldInfo$7")); - mObInitMap.put(new Pair("bbx", "net/minecraft/client/gui/MapItemRenderer")); - mObInitMap.put(new Pair("zw", "net/minecraft/inventory/ContainerRepair$2")); - mObInitMap.put(new Pair("vx", "net/minecraft/entity/ai/RandomPositionGenerator")); - mObInitMap.put(new Pair("ry", "net/minecraft/entity/passive/IAnimals")); - mObInitMap.put(new Pair("nz", "net/minecraft/server/management/PreYggdrasilConverter")); - mObInitMap.put(new Pair("arp", "net/minecraft/world/gen/feature/WorldGenShrub")); - mObInitMap.put(new Pair("anq", "net/minecraft/block/BlockStainedGlass")); - mObInitMap.put(new Pair("abt", "net/minecraft/creativetab/CreativeTabs")); - mObInitMap.put(new Pair("afs", "net/minecraft/enchantment/EnchantmentDigging")); - mObInitMap.put(new Pair("ajr", "net/minecraft/block/BlockBush")); - mObInitMap.put(new Pair("avo", "net/minecraft/world/gen/structure/MapGenVillage$Start")); - mObInitMap.put(new Pair("brs", "net/minecraft/client/resources/Locale")); - mObInitMap.put(new Pair("bbw", "net/minecraft/client/gui/Gui")); - mObInitMap.put(new Pair("bfv", "net/minecraft/client/gui/GuiMerchant")); - mObInitMap.put(new Pair("bju", "net/minecraft/client/particle/EntityBreakingFX")); - mObInitMap.put(new Pair("bnt", "net/minecraft/client/renderer/entity/RenderGhast")); - mObInitMap.put(new Pair("wl", "net/minecraft/entity/monster/EntityGolem")); - mObInitMap.put(new Pair("sm", "net/minecraft/command/IEntitySelector$3")); - mObInitMap.put(new Pair("on", "net/minecraft/server/management/UserList$1")); - mObInitMap.put(new Pair("ko", "net/minecraft/init/Bootstrap$11")); - mObInitMap.put(new Pair("gp", "net/minecraft/network/play/server/S31PacketWindowProperty")); - mObInitMap.put(new Pair("cq", "net/minecraft/dispenser/IBehaviorDispenseItem$1")); - mObInitMap.put(new Pair("aoe", "net/minecraft/block/BlockTrapDoor")); - mObInitMap.put(new Pair("akf", "net/minecraft/block/BlockCrops")); - mObInitMap.put(new Pair("ach", "net/minecraft/item/ItemDoor")); - mObInitMap.put(new Pair("agg", "net/minecraft/enchantment/EnchantmentLootBonus")); - mObInitMap.put(new Pair("bsg", "net/minecraft/client/resources/data/PackMetadataSection")); - mObInitMap.put(new Pair("bck", "net/minecraft/client/gui/GuiOptionsRowList")); - mObInitMap.put(new Pair("bgj", "net/minecraft/client/gui/GuiResourcePackAvailable")); - mObInitMap.put(new Pair("bki", "net/minecraft/client/particle/EntityLargeExplodeFX")); - mObInitMap - .put(new Pair("boh", "net/minecraft/client/renderer/entity/RendererLivingEntity")); - mObInitMap.put(new Pair("lc", "net/minecraft/client/util/JsonException$1")); - mObInitMap.put(new Pair("hd", "net/minecraft/network/play/server/S01PacketJoinGame")); - mObInitMap.put(new Pair("de", "net/minecraft/util/StringTranslate")); - mObInitMap.put(new Pair("wk", "net/minecraft/entity/passive/EntityHorse$GroupData")); - mObInitMap.put(new Pair("asc", "net/minecraft/world/gen/feature/WorldGenMelon")); - mObInitMap.put(new Pair("aod", "net/minecraft/block/BlockLeavesBase")); - mObInitMap.put( - new Pair("awb", "net/minecraft/world/gen/structure/StructureVillagePieces$Path")); - mObInitMap.put(new Pair("pa", "net/minecraft/network/rcon/RConThreadMain")); - mObInitMap.put(new Pair("asv", "net/minecraft/world/gen/structure/StructureBoundingBox")); - mObInitMap.put(new Pair("aow", "net/minecraft/tileentity/TileEntityChest")); - mObInitMap.put(new Pair("akx", "net/minecraft/block/BlockFalling")); - mObInitMap.put(new Pair("acz", "net/minecraft/item/ItemHangingEntity")); - mObInitMap.put(new Pair("agy", "net/minecraft/world/GameRules")); - mObInitMap.put(new Pair("awu", "net/minecraft/block/material/Material$1")); - mObInitMap.put(new Pair("bdr", "net/minecraft/client/gui/GuiFlatPresets$LayerItem")); - mObInitMap.put(new Pair("bsy", "net/minecraft/server/integrated/IntegratedServer$1")); - mObInitMap.put(new Pair("boz", "net/minecraft/client/renderer/entity/RenderIronGolem")); - mObInitMap.put(new Pair("xr", "net/minecraft/entity/item/EntityMinecartHopper")); - mObInitMap.put(new Pair("pt", "net/minecraft/util/CryptManager")); - mObInitMap.put(new Pair("lu", "net/minecraft/server/dedicated/DedicatedServer$1")); - mObInitMap.put( - new Pair("hv", "net/minecraft/network/play/server/S3DPacketDisplayScoreboard")); - mObInitMap.put(new Pair("dw", "net/minecraft/nbt/NBTTagShort")); - mObInitMap.put(new Pair("atj", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor3")); - mObInitMap.put(new Pair("apk", "net/minecraft/tileentity/TileEntityMobSpawner$1")); - mObInitMap.put(new Pair("all", "net/minecraft/block/BlockHardenedClay")); - mObInitMap.put(new Pair("adn", "net/minecraft/item/ItemPickaxe")); - mObInitMap.put(new Pair("ahm", "net/minecraft/world/WorldType")); - mObInitMap.put(new Pair("btm", "net/minecraft/client/audio/SoundManager$2$1")); - mObInitMap.put(new Pair("bpn", "net/minecraft/client/shader/ShaderLinkHelper")); - mObInitMap.put(new Pair("bdq", "net/minecraft/client/gui/GuiFlatPresets")); - mObInitMap.put(new Pair("bhp", "net/minecraft/client/model/ModelLeashKnot")); - mObInitMap.put(new Pair("blo", "net/minecraft/client/renderer/WorldRenderer")); - mObInitMap.put(new Pair("yf", "net/minecraft/entity/monster/EntityMagmaCube")); - mObInitMap.put(new Pair("ug", "net/minecraft/entity/ai/EntityAIFollowOwner")); - mObInitMap.put(new Pair("qh", "net/minecraft/util/MathHelper")); - mObInitMap.put(new Pair("ij", "net/minecraft/network/play/server/S0DPacketCollectItem")); - mObInitMap.put(new Pair("ek", "net/minecraft/network/NetworkManager$1")); - mObInitMap.put(new Pair("al", "net/minecraft/command/CommandDefaultGameMode")); - mObInitMap.put(new Pair("aeb", "net/minecraft/item/ItemSkull")); - mObInitMap.put(new Pair("aac", "net/minecraft/inventory/ICrafting")); - mObInitMap.put(new Pair("aia", "net/minecraft/world/biome/BiomeDecorator")); - mObInitMap.put(new Pair("c", "net/minecraft/crash/CrashReport$1")); - mObInitMap.put(new Pair("bua", "net/minecraft/client/stream/BroadcastController")); - mObInitMap.put(new Pair("bqb", "net/minecraft/client/renderer/texture/TextureMap$2")); - mObInitMap.put(new Pair("baf", "net/minecraft/scoreboard/ScoreDummyCriteria")); - mObInitMap.put(new Pair("bee", "net/minecraft/client/gui/GuiMainMenu")); - mObInitMap.put(new Pair("bmc", "net/minecraft/client/renderer/ImageBufferDownload")); - mObInitMap.put(new Pair("ye", "net/minecraft/entity/monster/EntityGiantZombie")); - mObInitMap.put(new Pair("aav", "net/minecraft/inventory/InventoryEnderChest")); - mObInitMap.put(new Pair("v", "net/minecraft/util/Util$EnumOS")); - mObInitMap.put(new Pair("bay", "net/minecraft/client/Minecraft$2")); - mObInitMap.put(new Pair("bex", "net/minecraft/client/gui/inventory/GuiContainer")); - mObInitMap.put(new Pair("bmv", "net/minecraft/client/renderer/culling/ICamera")); - mObInitMap.put(new Pair("bs", "net/minecraft/command/CommandSpreadPlayers$Position")); - mObInitMap.put(new Pair("yx", "net/minecraft/entity/player/InventoryPlayer")); - mObInitMap.put(new Pair("uy", "net/minecraft/entity/ai/EntityAIOpenDoor")); - mObInitMap.put(new Pair("aqq", "net/minecraft/world/WorldProviderSurface")); - mObInitMap.put(new Pair("amr", "net/minecraft/block/BlockPotato")); - mObInitMap.put(new Pair("ais", "net/minecraft/world/biome/BiomeGenSavanna")); - mObInitMap.put(new Pair("aup", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$LeftTurn")); - mObInitMap.put(new Pair("ayo", "net/minecraft/world/chunk/storage/AnvilSaveConverter$1")); - mObInitMap.put(new Pair("bbm", "net/minecraft/client/settings/GameSettings$Options")); - mObInitMap.put(new Pair("bus", "net/minecraft/realms/RealmsConnect$1")); - mObInitMap - .put(new Pair("bqt", "net/minecraft/client/resources/FoliageColorReloadListener")); - mObInitMap.put(new Pair("zl", "net/minecraft/entity/projectile/EntityEgg")); - mObInitMap.put(new Pair("vm", "net/minecraft/entity/ai/EntityAIDefendVillage")); - mObInitMap.put(new Pair("rn", "net/minecraft/util/CombatTracker")); - mObInitMap.put(new Pair("no", "net/minecraft/server/network/NetHandlerLoginServer$1")); - mObInitMap.put(new Pair("jp", "net/minecraft/network/handshake/client/C00Handshake")); - mObInitMap.put(new Pair("fq", "net/minecraft/util/ChatComponentText")); - mObInitMap.put(new Pair("br", "net/minecraft/command/CommandSpreadPlayers")); - mObInitMap.put(new Pair("are", "net/minecraft/world/gen/feature/WorldGenForest")); - mObInitMap.put(new Pair("anf", "net/minecraft/block/BlockRedstoneRepeater")); - mObInitMap.put(new Pair("abi", "net/minecraft/item/ItemReed")); - mObInitMap.put(new Pair("afh", "net/minecraft/item/crafting/ShapedRecipes")); - mObInitMap.put(new Pair("ajg", "net/minecraft/block/BlockBeacon")); - mObInitMap.put(new Pair("avd", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stronghold$Door")); - mObInitMap.put(new Pair("azc", "net/minecraft/world/storage/ISaveHandler")); - mObInitMap.put(new Pair("brh", - "net/minecraft/client/resources/SimpleReloadableResourceManager$1")); - mObInitMap.put(new Pair("bfk", "net/minecraft/client/gui/inventory/CreativeCrafting")); - mObInitMap.put(new Pair("bjj", "net/minecraft/client/multiplayer/WorldClient$4")); - mObInitMap.put(new Pair("bni", "net/minecraft/client/renderer/entity/RenderCreeper")); - mObInitMap.put(new Pair("wa", "net/minecraft/village/Village$VillageAgressor")); - mObInitMap.put(new Pair("sb", "net/minecraft/entity/Entity$1")); - mObInitMap.put(new Pair("oc", "net/minecraft/server/management/PreYggdrasilConverter$3")); - mObInitMap.put(new Pair("kd", - "net/minecraft/network/ServerStatusResponse$PlayerCountData$Serializer")); - mObInitMap.put(new Pair("ge", "net/minecraft/network/play/server/S25PacketBlockBreakAnim")); - mObInitMap.put(new Pair("cf", "net/minecraft/command/SyntaxErrorException")); - mObInitMap.put(new Pair("any", "net/minecraft/block/BlockStoneSlab")); - mObInitMap.put(new Pair("ajz", "net/minecraft/block/BlockCocoa")); - mObInitMap.put(new Pair("azb", "net/minecraft/world/storage/WorldInfo$9")); - mObInitMap.put(new Pair("ov", "net/minecraft/network/rcon/RConConsoleSource")); - mObInitMap.put(new Pair("kw", "net/minecraft/init/Bootstrap$5$1")); - mObInitMap.put(new Pair("gx", "net/minecraft/network/play/server/S21PacketChunkData")); - mObInitMap.put(new Pair("cy", "net/minecraft/dispenser/PositionImpl")); - mObInitMap.put(new Pair("acp", "net/minecraft/item/ItemExpBottle")); - mObInitMap.put(new Pair("bop", "net/minecraft/client/renderer/entity/RenderPlayer")); - mObInitMap.put(new Pair("arw", "net/minecraft/world/gen/feature/WorldGenIceSpike")); - mObInitMap.put(new Pair("anx", "net/minecraft/block/BlockButtonStone")); - mObInitMap.put( - new Pair("avv", "net/minecraft/world/gen/structure/StructureVillagePieces$Hall")); - mObInitMap.put(new Pair("azu", "net/minecraft/util/MovingObjectPosition")); - mObInitMap.put(new Pair("bcs", "net/minecraft/client/gui/ScreenChatOptions")); - mObInitMap.put( - new Pair("bgr", "net/minecraft/client/gui/stream/GuiStreamUnavailable$Reason")); - mObInitMap.put(new Pair("bkq", "net/minecraft/client/particle/EffectRenderer$3")); - mObInitMap.put(new Pair("dm", "net/minecraft/nbt/NBTTagFloat")); - mObInitMap.put(new Pair("ws", "net/minecraft/entity/passive/EntitySquid")); - mObInitMap.put(new Pair("st", "net/minecraft/entity/item/EntityItemFrame")); - mObInitMap.put(new Pair("ou", "net/minecraft/network/rcon/RConUtils")); - mObInitMap.put(new Pair("ask", "net/minecraft/world/gen/feature/WorldGenSavannaTree")); - mObInitMap.put(new Pair("aol", "net/minecraft/block/BlockPressurePlateWeighted")); - mObInitMap.put(new Pair("akm", "net/minecraft/block/BlockDispenser")); - mObInitMap.put(new Pair("aco", "net/minecraft/item/ItemEnderPearl")); - mObInitMap.put(new Pair("agn", "net/minecraft/village/MerchantRecipe")); - mObInitMap.put(new Pair("awj", "net/minecraft/world/gen/NoiseGeneratorImproved")); - mObInitMap.put(new Pair("bdg", "net/minecraft/client/gui/GuiScreenAddServer")); - mObInitMap.put(new Pair("bsn", "net/minecraft/client/audio/MovingSoundMinecartRiding")); - mObInitMap.put(new Pair("boo", "net/minecraft/client/renderer/entity/RenderPig")); - mObInitMap.put(new Pair("xg", "net/minecraft/entity/effect/EntityWeatherEffect")); - mObInitMap.put(new Pair("th", "net/minecraft/entity/ai/attributes/IAttribute")); - mObInitMap.put(new Pair("pi", "net/minecraft/stats/StatBase$1")); - mObInitMap.put(new Pair("lj", "net/minecraft/server/MinecraftServer$3")); - mObInitMap - .put(new Pair("hk", "net/minecraft/network/play/server/S39PacketPlayerAbilities")); - mObInitMap.put(new Pair("dl", "net/minecraft/nbt/NBTTagEnd")); - mObInitMap.put(new Pair("ala", "net/minecraft/block/BlockFenceGate")); - mObInitMap.put(new Pair("adc", "net/minecraft/item/Item$ToolMaterial")); - mObInitMap.put(new Pair("ahb", "net/minecraft/world/World")); - mObInitMap.put(new Pair("btb", "net/minecraft/client/network/LanServerDetector$LanServer")); - mObInitMap.put(new Pair("bpc", "net/minecraft/client/renderer/entity/RenderWither")); - mObInitMap.put(new Pair("bdf", "net/minecraft/client/gui/GuiDisconnected")); - mObInitMap.put(new Pair("bhe", "net/minecraft/client/model/ModelBoat")); - mObInitMap.put(new Pair("bld", "net/minecraft/client/particle/EntityDiggingFX")); - mObInitMap.put(new Pair("xz", "net/minecraft/entity/monster/EntityCreeper")); - mObInitMap.put(new Pair("aa", "net/minecraft/command/ICommand")); - mObInitMap.put(new Pair("alt", "net/minecraft/block/BlockLeaves")); - mObInitMap.put(new Pair("adv", "net/minecraft/item/ItemSeedFood")); - mObInitMap.put(new Pair("ahu", "net/minecraft/world/biome/BiomeGenBase")); - mObInitMap.put(new Pair("btu", "net/minecraft/client/audio/ISoundEventAccessor")); - mObInitMap.put(new Pair("bpv", "net/minecraft/client/renderer/texture/Stitcher")); - mObInitMap.put(new Pair("bdy", "net/minecraft/client/gui/GuiSelectWorld$List")); - mObInitMap.put(new Pair("bhx", "net/minecraft/client/model/ModelSheep1")); - mObInitMap.put(new Pair("blw", "net/minecraft/client/renderer/EntityRenderer$3")); - mObInitMap.put(new Pair("mq", "net/minecraft/server/management/PlayerManager")); - mObInitMap.put(new Pair("ir", "net/minecraft/network/play/client/C01PacketChatMessage")); - mObInitMap.put(new Pair("es", "net/minecraft/network/EnumConnectionState$1")); - mObInitMap.put(new Pair("at", "net/minecraft/command/CommandGive")); - mObInitMap.put(new Pair("xy", "net/minecraft/entity/monster/EntityCaveSpider")); - mObInitMap.put(new Pair("aej", "net/minecraft/item/ItemLilyPad")); - mObInitMap.put(new Pair("aak", "net/minecraft/inventory/SlotFurnace")); - mObInitMap.put(new Pair("k", "net/minecraft/crash/CrashReportCategory")); - mObInitMap.put(new Pair("atq", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$NetherStalkRoom")); - mObInitMap.put(new Pair("apr", "net/minecraft/block/BlockPistonMoving")); - mObInitMap.put(new Pair("axp", "net/minecraft/world/gen/layer/GenLayer$2")); - mObInitMap.put(new Pair("ban", "net/minecraft/client/renderer/GLAllocation")); - mObInitMap - .put(new Pair("bem", "net/minecraft/client/gui/achievement/GuiStats$StatsGeneral")); - mObInitMap.put(new Pair("bil", "net/minecraft/client/model/ModelZombieVillager")); - mObInitMap.put(new Pair("bmk", - "net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher")); - mObInitMap.put(new Pair("bh", "net/minecraft/command/server/CommandSaveAll")); - mObInitMap.put(new Pair("ym", "net/minecraft/entity/monster/EntitySlime")); - mObInitMap.put(new Pair("un", "net/minecraft/entity/ai/EntityAIWatchClosest")); - mObInitMap.put(new Pair("mp", "net/minecraft/world/WorldManager")); - mObInitMap.put(new Pair("aqf", "net/minecraft/world/chunk/storage/ChunkLoader")); - mObInitMap.put(new Pair("amg", "net/minecraft/block/BlockNetherrack")); - mObInitMap.put(new Pair("aei", "net/minecraft/item/EnumAction")); - mObInitMap.put(new Pair("aih", "net/minecraft/world/biome/BiomeGenForest$2")); - mObInitMap.put(new Pair("aue", - "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$Feature")); - mObInitMap.put(new Pair("ayd", "net/minecraft/pathfinding/Path")); - mObInitMap.put(new Pair("bbb", "net/minecraft/client/Minecraft$5")); - mObInitMap - .put(new Pair("bfa", "net/minecraft/client/gui/inventory/GuiBeacon$CancelButton")); - mObInitMap.put(new Pair("buh", "net/minecraft/client/stream/ChatController$ChatListener")); - mObInitMap.put(new Pair("bqi", "net/minecraft/client/renderer/texture/TextureUtil")); - mObInitMap.put(new Pair("za", "net/minecraft/entity/player/EntityPlayer$EnumStatus")); - mObInitMap.put(new Pair("vb", "net/minecraft/entity/ai/EntityAILookIdle")); - mObInitMap.put(new Pair("rc", "net/minecraft/inventory/IInvBasic")); - mObInitMap.put(new Pair("nd", "net/minecraft/network/NetworkSystem$1")); - mObInitMap.put(new Pair("je", - "net/minecraft/network/play/client/C03PacketPlayer$C04PacketPlayerPosition")); - mObInitMap.put(new Pair("ff", "net/minecraft/util/ChatComponentStyle$1")); - mObInitMap.put(new Pair("aqy", "net/minecraft/world/gen/MapGenCavesHell")); - mObInitMap.put(new Pair("amz", "net/minecraft/block/BlockRedstoneOre")); - mObInitMap.put(new Pair("ayw", "net/minecraft/world/storage/WorldInfo$4")); - mObInitMap.put(new Pair("zt", "net/minecraft/inventory/AnimalChest")); - mObInitMap.put(new Pair("vu", "net/minecraft/entity/ai/EntityAITarget")); - mObInitMap.put(new Pair("rv", "net/minecraft/potion/Potion")); - mObInitMap.put( - new Pair("nw", "net/minecraft/server/management/PlayerProfileCache$Serializer")); - mObInitMap.put( - new Pair("jx", "net/minecraft/network/login/client/C01PacketEncryptionResponse")); - mObInitMap.put( - new Pair("fy", "net/minecraft/network/play/server/S2CPacketSpawnGlobalEntity")); - mObInitMap.put(new Pair("bz", "net/minecraft/command/CommandTime")); - mObInitMap.put(new Pair("ann", "net/minecraft/block/BlockSnow")); - mObInitMap.put(new Pair("abq", "net/minecraft/item/ItemCoal")); - mObInitMap.put(new Pair("afp", "net/minecraft/enchantment/EnchantmentArrowKnockback")); - mObInitMap.put(new Pair("ajo", "net/minecraft/block/IGrowable")); - mObInitMap.put(new Pair("brp", "net/minecraft/client/resources/I18n")); - mObInitMap.put(new Pair("ayv", "net/minecraft/world/storage/WorldInfo$3")); - mObInitMap.put(new Pair("bbt", "net/minecraft/util/Session$Type")); - mObInitMap.put(new Pair("bfs", "net/minecraft/client/gui/GuiHopper")); - mObInitMap.put(new Pair("bjr", "net/minecraft/client/network/OldServerPinger$1")); - mObInitMap.put(new Pair("bnq", "net/minecraft/client/renderer/entity/RenderFallingBlock")); - mObInitMap.put(new Pair("ok", "net/minecraft/server/management/UserListOpsEntry")); - mObInitMap.put(new Pair("kl", "net/minecraft/init/Bootstrap")); - mObInitMap.put(new Pair("gm", "net/minecraft/network/play/server/S2EPacketCloseWindow")); - mObInitMap.put(new Pair("cn", "net/minecraft/util/RegistryNamespacedDefaultedByKey")); - mObInitMap.put(new Pair("zs", "net/minecraft/inventory/Container")); - mObInitMap.put(new Pair("ace", "net/minecraft/creativetab/CreativeTabs$8")); - mObInitMap.put(new Pair("arl", "net/minecraft/world/gen/feature/WorldGenDesertWells")); - mObInitMap.put(new Pair("anm", "net/minecraft/block/BlockSnowBlock")); - mObInitMap.put(new Pair("avk", "net/minecraft/world/gen/structure/StructureComponent")); - mObInitMap.put(new Pair("bch", "net/minecraft/client/gui/GuiListExtended")); - mObInitMap.put(new Pair("bgg", "net/minecraft/client/resources/ResourcePackListEntry")); - mObInitMap.put(new Pair("bkf", "net/minecraft/client/particle/EntityFlameFX")); - mObInitMap.put(new Pair("boe", "net/minecraft/client/renderer/entity/RenderMagmaCube")); - mObInitMap.put(new Pair("wh", "net/minecraft/entity/passive/EntityCow")); - mObInitMap.put(new Pair("oj", "net/minecraft/server/management/UserListOps")); - mObInitMap.put(new Pair("aoa", "net/minecraft/block/BlockPane")); - mObInitMap.put(new Pair("akb", "net/minecraft/block/BlockCommandBlock")); - mObInitMap.put(new Pair("acd", "net/minecraft/creativetab/CreativeTabs$7")); - mObInitMap.put(new Pair("agc", "net/minecraft/enchantment/EnchantmentData")); - mObInitMap.put(new Pair("bsc", "net/minecraft/client/resources/data/FontMetadataSection")); - mObInitMap.put(new Pair("bod", "net/minecraft/client/renderer/entity/RenderSnowball")); - mObInitMap.put( - new Pair("net/minecraft/realms/RealmsBridge", "net/minecraft/realms/RealmsBridge")); - mObInitMap.put(new Pair("da", "net/minecraft/util/RegistrySimple")); - mObInitMap.put(new Pair("ass", "net/minecraft/world/gen/FlatGeneratorInfo")); - mObInitMap.put(new Pair("aot", "net/minecraft/tileentity/TileEntity$2")); - mObInitMap.put(new Pair("aku", "net/minecraft/block/BlockEndPortalFrame")); - mObInitMap.put(new Pair("acw", "net/minecraft/item/ItemFlintAndSteel")); - mObInitMap.put(new Pair("awr", "net/minecraft/block/material/MaterialTransparent")); - mObInitMap.put(new Pair("bsv", "net/minecraft/client/audio/ITickableSound")); - mObInitMap.put(new Pair("bow", "net/minecraft/client/renderer/entity/RenderSquid")); - mObInitMap.put(new Pair("bcz", "net/minecraft/client/gui/GuiCreateFlatWorld")); - mObInitMap.put(new Pair("bkx", "net/minecraft/client/particle/EntitySpellParticleFX")); - mObInitMap.put(new Pair("xo", "net/minecraft/entity/EntityMinecartCommandBlock$1")); - mObInitMap.put(new Pair("pq", "net/minecraft/stats/StatFileWriter")); - mObInitMap.put(new Pair("lr", "net/minecraft/server/gui/IUpdatePlayerListBox")); - mObInitMap.put(new Pair("hs", "net/minecraft/network/play/server/S07PacketRespawn")); - mObInitMap.put(new Pair("dt", "net/minecraft/nbt/NBTSizeTracker$1")); - mObInitMap.put(new Pair("aph", "net/minecraft/tileentity/IHopper")); - mObInitMap.put(new Pair("ali", "net/minecraft/block/BlockGravel")); - mObInitMap.put(new Pair("adk", "net/minecraft/item/ItemMinecart$1")); - mObInitMap.put(new Pair("ahj", "net/minecraft/world/WorldSettings")); - mObInitMap.put(new Pair("btj", "net/minecraft/client/audio/SoundManager")); - mObInitMap.put(new Pair("bpk", "net/minecraft/client/shader/Shader")); - mObInitMap.put(new Pair("bdn", "net/minecraft/client/gui/GuiOptions$1")); - mObInitMap.put(new Pair("bhm", "net/minecraft/client/model/ModelBiped")); - mObInitMap.put(new Pair("bll", "net/minecraft/client/entity/EntityOtherPlayerMP")); - mObInitMap.put(new Pair("mf", "net/minecraft/server/gui/StatsComponent")); - mObInitMap.put(new Pair("ig", "net/minecraft/network/play/server/S05PacketSpawnPosition")); - mObInitMap.put(new Pair("eh", "net/minecraft/network/NettyEncryptingDecoder")); - mObInitMap.put(new Pair("ai", "net/minecraft/command/CommandClearInventory")); - mObInitMap.put(new Pair("xn", "net/minecraft/entity/EntityMinecartCommandBlock")); - mObInitMap.put( - new Pair("atf", "net/minecraft/world/gen/structure/StructureNetherBridgePieces")); - mObInitMap.put(new Pair("apg", "net/minecraft/tileentity/TileEntityFurnace")); - mObInitMap.put(new Pair("axe", "net/minecraft/world/gen/layer/GenLayerBiomeEdge")); - mObInitMap.put(new Pair("bac", "net/minecraft/scoreboard/Scoreboard")); - mObInitMap.put(new Pair("beb", "net/minecraft/client/gui/GuiSnooper$List")); - mObInitMap.put(new Pair("bia", "net/minecraft/client/model/ModelSilverfish")); - mObInitMap.put(new Pair("yb", "net/minecraft/entity/monster/IMob")); - mObInitMap.put(new Pair("uc", "net/minecraft/entity/ai/EntityAIDoorInteract")); - mObInitMap.put(new Pair("qd", "net/minecraft/util/LongHashMap")); - mObInitMap.put(new Pair("s", "net/minecraft/util/ReportedException")); - mObInitMap.put(new Pair("net/minecraft/client/ClientBrandRetriever", - "net/minecraft/client/ClientBrandRetriever")); - mObInitMap.put(new Pair("apz", "net/minecraft/world/chunk/storage/ExtendedBlockStorage")); - mObInitMap.put( - new Pair("aty", "net/minecraft/world/gen/structure/MapGenScatteredFeature$Start")); - mObInitMap.put(new Pair("axx", "net/minecraft/world/gen/layer/GenLayerSmooth")); - mObInitMap.put(new Pair("bav", "net/minecraft/client/Minecraft$15")); - mObInitMap.put(new Pair("beu", "net/minecraft/client/gui/GuiKeyBindingList$CategoryEntry")); - mObInitMap.put(new Pair("yu", "net/minecraft/entity/INpc")); - mObInitMap.put(new Pair("uv", "net/minecraft/entity/ai/EntityAIOcelotAttack")); - mObInitMap.put(new Pair("qw", "net/minecraft/util/WeightedRandom$Item")); - mObInitMap.put(new Pair("mx", "net/minecraft/server/management/ItemInWorldManager")); - mObInitMap.put(new Pair("iy", "net/minecraft/network/play/client/C0DPacketCloseWindow")); - mObInitMap.put(new Pair("ez", "net/minecraft/util/MessageDeserializer")); - mObInitMap.put(new Pair("amo", "net/minecraft/block/BlockPackedIce")); - mObInitMap.put(new Pair("aip", "net/minecraft/world/biome/BiomeGenPlains")); - mObInitMap.put(new Pair("aum", - "net/minecraft/world/gen/structure/StructureStrongholdPieces$ChestCorridor")); - mObInitMap.put(new Pair("ayl", "net/minecraft/world/WorldSavedData")); - mObInitMap.put(new Pair("bup", "net/minecraft/client/stream/TwitchStream$1")); - mObInitMap.put(new Pair("bqq", "net/minecraft/client/resources/FallbackResourceManager")); - mObInitMap.put(new Pair("bet", "net/minecraft/client/gui/GuiKeyBindingList$1")); - mObInitMap.put(new Pair("bis", "net/minecraft/client/model/ModelBox")); - mObInitMap.put( - new Pair("bmr", "net/minecraft/client/renderer/tileentity/TileEntitySignRenderer")); - mObInitMap.put(new Pair("zi", "net/minecraft/entity/projectile/EntitySmallFireball")); - mObInitMap.put(new Pair("vj", "net/minecraft/entity/ai/EntityAIFollowGolem")); - mObInitMap.put(new Pair("rk", "net/minecraft/profiler/IPlayerUsage")); - mObInitMap.put(new Pair("nl", "net/minecraft/server/network/NetHandlerHandshakeTCP")); - mObInitMap.put(new Pair("jm", - "net/minecraft/network/play/client/C10PacketCreativeInventoryAction")); - mObInitMap.put(new Pair("fn", "net/minecraft/util/ChatStyle")); - mObInitMap.put(new Pair("bo", "net/minecraft/command/CommandSetPlayerTimeout")); - mObInitMap.put(new Pair("anc", "net/minecraft/block/BlockRedstoneTorch")); - mObInitMap.put(new Pair("abf", "net/minecraft/item/ItemAxe")); - mObInitMap.put(new Pair("afe", "net/minecraft/item/crafting/CraftingManager")); - mObInitMap.put(new Pair("ajd", "net/minecraft/block/BlockBasePressurePlate")); - mObInitMap.put(new Pair("bre", "net/minecraft/client/resources/ResourcePackRepository$2")); - mObInitMap.put(new Pair("ayk", "net/minecraft/world/storage/MapData$MapCoord")); - mObInitMap.put(new Pair("bfh", "net/minecraft/client/gui/GuiCommandBlock")); - mObInitMap.put(new Pair("bjg", "net/minecraft/client/multiplayer/WorldClient$1")); - mObInitMap.put(new Pair("bnf", "net/minecraft/client/renderer/entity/RenderCaveSpider")); - mObInitMap.put(new Pair("ka", "net/minecraft/network/status/server/S00PacketServerInfo")); - mObInitMap.put(new Pair("gb", "net/minecraft/network/play/server/S0CPacketSpawnPlayer")); - mObInitMap.put(new Pair("cc", "net/minecraft/command/server/CommandWhitelist")); - mObInitMap.put(new Pair("zh", "net/minecraft/entity/IProjectile")); - mObInitMap.put(new Pair("aby", "net/minecraft/creativetab/CreativeTabs$2")); - mObInitMap.put(new Pair("ara", "net/minecraft/world/gen/ChunkProviderEnd")); - mObInitMap.put(new Pair("anb", "net/minecraft/block/BlockRedstoneLight")); - mObInitMap.put( - new Pair("bjz", "net/minecraft/client/particle/EntityEnchantmentTableParticleFX")); - mObInitMap.put(new Pair("bny", "net/minecraft/client/renderer/entity/RenderItem")); - mObInitMap.put(new Pair("cv", "net/minecraft/dispenser/ILocation")); - mObInitMap.put(new Pair("anu", "net/minecraft/block/BlockStem")); - mObInitMap.put(new Pair("afw", "net/minecraft/enchantment/EnchantmentHelper$1")); - mObInitMap.put(new Pair("ajv", "net/minecraft/block/BlockCarrot")); - mObInitMap.put( - new Pair("avs", "net/minecraft/world/gen/structure/StructureVillagePieces$Field2")); - mObInitMap.put(new Pair("azr", "net/minecraft/world/storage/ThreadedFileIOBase")); - mObInitMap.put(new Pair("bcp", "net/minecraft/client/gui/GuiButtonRealmsProxy")); - mObInitMap.put(new Pair("brw", "net/minecraft/client/resources/data/IMetadataSerializer")); - mObInitMap.put(new Pair("bnx", "net/minecraft/client/renderer/tileentity/RenderItemFrame")); - mObInitMap.put(new Pair("wp", "net/minecraft/entity/passive/EntitySheep")); - mObInitMap.put(new Pair("sq", "net/minecraft/entity/item/EntityXPOrb")); - mObInitMap.put(new Pair("or", "net/minecraft/server/management/UserListWhitelist")); - mObInitMap.put(new Pair("ks", "net/minecraft/init/Bootstrap$2")); - mObInitMap.put(new Pair("gt", "net/minecraft/network/play/server/S19PacketEntityStatus")); - mObInitMap.put(new Pair("cu", "net/minecraft/dispenser/ILocatableSource")); - mObInitMap.put(new Pair("ash", "net/minecraft/world/gen/feature/WorldGenReed")); - mObInitMap.put(new Pair("aoi", "net/minecraft/block/BlockWall")); - mObInitMap.put(new Pair("akj", "net/minecraft/block/BlockRedstoneDiode")); - mObInitMap.put(new Pair("acl", "net/minecraft/item/ItemEmptyMap")); - mObInitMap.put(new Pair("agk", "net/minecraft/enchantment/EnchantmentUntouching")); - mObInitMap.put(new Pair("bsk", "net/minecraft/client/audio/PositionedSound")); - mObInitMap.put(new Pair("bol", "net/minecraft/client/renderer/entity/RenderMooshroom")); - mObInitMap.put( - new Pair("bgn", "net/minecraft/client/gui/stream/GuiIngestServers$ServerList")); - mObInitMap.put(new Pair("bkm", "net/minecraft/client/particle/EntityFX")); - mObInitMap.put(new Pair("xd", "net/minecraft/entity/boss/EntityWither$1")); - mObInitMap.put(new Pair("te", "net/minecraft/entity/DataWatcher")); - mObInitMap.put(new Pair("pf", "net/minecraft/stats/StatCrafting")); - mObInitMap.put(new Pair("lg", "net/minecraft/server/ServerEula")); - mObInitMap.put(new Pair("hh", - "net/minecraft/network/play/server/S14PacketEntity$S17PacketEntityLookMove")); - mObInitMap.put(new Pair("di", "net/minecraft/nbt/NBTTagCompound$1")); - mObInitMap.put(new Pair("bdc", "net/minecraft/client/gui/GuiGameOver")); - mObInitMap.put(new Pair("bla", "net/minecraft/client/particle/EntityAuraFX")); - mObInitMap.put(new Pair("py", "net/minecraft/server/management/LowerStringMap")); - mObInitMap.put(new Pair("lz", "net/minecraft/server/gui/MinecraftServerGui$1")); - mObInitMap.put(new Pair("ads", "net/minecraft/item/ItemRedstone")); - mObInitMap.put(new Pair("bps", "net/minecraft/client/renderer/ThreadDownloadImageData$1")); - mObInitMap.put(new Pair("asz", - "net/minecraft/world/gen/structure/StructureMineshaftPieces$Cross")); - mObInitMap.put(new Pair("awy", "net/minecraft/world/gen/layer/GenLayerEdge")); - mObInitMap.put(new Pair("bdv", "net/minecraft/client/gui/GuiRenameWorld")); - mObInitMap.put(new Pair("bhu", "net/minecraft/client/model/ModelPig")); - mObInitMap.put(new Pair("blt", "net/minecraft/client/renderer/EntityRenderer")); - mObInitMap.put(new Pair("ep", "net/minecraft/network/EnumConnectionState$2")); - mObInitMap.put(new Pair("aq", "net/minecraft/command/CommandDifficulty")); - mObInitMap.put(new Pair("xv", "net/minecraft/entity/item/EntityMinecartTNT")); - mObInitMap.put(new Pair("tw", "net/minecraft/entity/ai/EntityAIAvoidEntity")); - mObInitMap.put(new Pair("px", "net/minecraft/util/HttpUtil$DownloadListener")); - mObInitMap.put(new Pair("h", "net/minecraft/crash/CrashReport$6")); - mObInitMap.put(new Pair("atn", - "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor")); - mObInitMap.put(new Pair("apo", "net/minecraft/tileentity/TileEntityEndPortal")); - mObInitMap.put(new Pair("alp", "net/minecraft/block/BlockIce")); - mObInitMap.put(new Pair("adr", "net/minecraft/item/ItemRecord")); - mObInitMap.put(new Pair("ahq", "net/minecraft/world/Teleporter$PortalPosition")); - mObInitMap.put(new Pair("axm", "net/minecraft/world/gen/layer/GenLayerIsland")); - mObInitMap.put(new Pair("bak", "net/minecraft/client/gui/ChatLine")); - mObInitMap.put(new Pair("bej", "net/minecraft/client/gui/achievement/GuiStats")); - mObInitMap.put(new Pair("btq", "net/minecraft/client/audio/SoundHandler$1")); - mObInitMap.put(new Pair("bpr", "net/minecraft/client/renderer/ThreadDownloadImageData")); - mObInitMap.put(new Pair("yj", "net/minecraft/entity/SharedMonsterAttributes")); - } - - } - -} diff --git a/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java b/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java deleted file mode 100644 index 8e7001903d..0000000000 --- a/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java +++ /dev/null @@ -1,173 +0,0 @@ -package gtPlusPlus.preloader; - -import org.apache.logging.log4j.Level; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; - -import net.minecraft.item.ItemStack; - -import gregtech.common.items.GT_MetaGenerated_Item_01; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class Preloader_GT_OreDict { - - public static boolean shouldPreventRegistration(final String string, final ItemStack bannedItem) { - - if (bannedItem == null) { - return false; - } - else if (!CORE_Preloader.enableOldGTcircuits && !LoadedMods.Mekanism){ - return false; - } - - try { - if (CORE_Preloader.enableOldGTcircuits){ - if ((bannedItem != null) && ItemUtils.getModId(bannedItem).toLowerCase().equals("gregtech")){ - final int damageValue = bannedItem.getItemDamage() - 32000; - if (bannedItem.getItem() instanceof GT_MetaGenerated_Item_01) { // 700-720 - if ((damageValue >= 700) && (damageValue <= 720)) { - return true; - } - } - else { - if (ReflectionUtils.doesClassExist("gregtech.common.items.GT_MetaGenerated_Item_03")) { // 6/11/12/14/16/20/30-57/69-73/79-96 - final Class MetaItem03 = ReflectionUtils.getClass("gregtech.common.items.GT_MetaGenerated_Item_03"); - if (isInstanceOf(MetaItem03, bannedItem.getItem())) { - if ((damageValue == 6) || (damageValue == 7) || (damageValue == 11) || (damageValue == 12) || (damageValue == 14) - || (damageValue == 16) || (damageValue == 20) || (damageValue == 21) || (damageValue == 22)) { - return true; - } - else if ((damageValue >= 30) && (damageValue <= 57)) { - return true; - } - else if ((damageValue >= 69) && (damageValue <= 73)) { - return true; - } - else if ((damageValue >= 78) && (damageValue <= 96)) { - return true; - } - } - } - } - } - } - - //Mekanism Support - Let's not make Mek Osmium useful in GT anymore. - if ((((bannedItem != null) && !LoadedMods.RedTech && (ItemUtils.getModId(bannedItem).toLowerCase().equals("mekanism"))) || (LoadedMods.Mekanism)) && !LoadedMods.RedTech){ - //Circuits - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemControlCircuit")) { - final Class MekCircuit = ReflectionUtils.getClass("mekanism.common.item.ItemControlCircuit"); - if (isInstanceOf(MekCircuit, bannedItem.getItem())) { - for (int r=0;r<4;r++){ - if (bannedItem.getItemDamage() == r){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - } - //Ingots - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemIngot")) { - final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemIngot"); - if (isInstanceOf(MekIngot, bannedItem.getItem())) { - if (bannedItem.getItemDamage() == 1){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - //Dirty Dust - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemDirtyDust")) { - final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemDirtyDust"); - if (isInstanceOf(MekIngot, bannedItem.getItem())) { - if (bannedItem.getItemDamage() == 2){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - //Dust - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemDust")) { - final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemDust"); - if (isInstanceOf(MekIngot, bannedItem.getItem())) { - if (bannedItem.getItemDamage() == 2){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - //Crystal - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemCrystal")) { - final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemCrystal"); - if (isInstanceOf(MekIngot, bannedItem.getItem())) { - if (bannedItem.getItemDamage() == 2){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - //Shard - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemShard")) { - final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemShard"); - if (isInstanceOf(MekIngot, bannedItem.getItem())) { - if (bannedItem.getItemDamage() == 2){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - //Clump - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemClump")) { - final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemClump"); - if (isInstanceOf(MekIngot, bannedItem.getItem())) { - if (bannedItem.getItemDamage() == 2){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - //Ores - if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemBlockOre")) { - final Class MekOre = ReflectionUtils.getClass("mekanism.common.item.ItemBlockOre"); - if (isInstanceOf(MekOre, bannedItem.getItem()) || (bannedItem == ItemUtils.simpleMetaStack("Mekanism:OreBlock", 0, 1))) { - if (bannedItem.getItemDamage() == 0){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); - return true; - } - } - } - } - - } catch (final Throwable e) { - if (CORE.ConfigSwitches.showHiddenNEIItems) { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "A mod tried to register an invalid item with the OreDictionary."); - if (bannedItem != null){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Please report this issue to the authors of %s", ItemUtils.getModId(bannedItem)); - try { - if (bannedItem.getItemDamage() <= Short.MAX_VALUE-1) { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Item was not null, but still invalidly registering: %s", bannedItem.getDisplayName() != null ? bannedItem.getDisplayName() : "INVALID ITEM FOUND"); - } - else { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Item was not null, but still invalidly registering: %s", "Found Wildcard item that is being registered too early."); - } - } - catch (Exception h) { - h.printStackTrace(); - } - } - } - //FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "%s", e.getMessage()); - } - return false; - } - - // Simplification of Life. - private static boolean isInstanceOf(final Class clazz, final Object obj) { - return clazz.isInstance(obj); - } - -} diff --git a/src/Java/gtPlusPlus/preloader/Preloader_Logger.java b/src/Java/gtPlusPlus/preloader/Preloader_Logger.java deleted file mode 100644 index 84f0fab012..0000000000 --- a/src/Java/gtPlusPlus/preloader/Preloader_Logger.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.preloader; - -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -public class Preloader_Logger { - - private Preloader_Logger() { - - } - - // Logging Functions - public static final Logger MODLOGGER = Preloader_Logger.makeLogger(); - - // Generate GT++ Logger - public static Logger makeLogger() { - final Logger gtPlusPlusLogger = LogManager.getLogger("GT++ ASM"); - return gtPlusPlusLogger; - } - - public static final org.apache.logging.log4j.Logger getLogger(){ - return MODLOGGER; - } - - // Non-Dev Comments - - public static void INFO(final String s, final String s2) { - INFO(s); - INFO(s2); - } - - public static void INFO(final String s) { - MODLOGGER.info(s); - } - - // Developer Comments - public static void WARNING(final String s) { - MODLOGGER.warn(s); - } - - // Errors - public static void ERROR(final String s) { - MODLOGGER.fatal(s); - } - - public static void LOG(String string, Level info, String string2) { - if (info.equals(Level.INFO)) { - INFO("["+string+"] "+string2); - } - if (info.equals(Level.WARN)) { - WARNING("["+string+"] "+string2); - } - if (info.equals(Level.ERROR)) { - ERROR("["+string+"] "+string2); - } - - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java b/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java deleted file mode 100644 index a5981b15d9..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/AsmConfig.java +++ /dev/null @@ -1,211 +0,0 @@ -package gtPlusPlus.preloader.asm; - -import cpw.mods.fml.common.FMLLog; -import gtPlusPlus.preloader.Preloader_Logger; - -import java.io.File; -import java.util.ArrayList; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.common.config.Property; -import org.apache.logging.log4j.Level; - -public class AsmConfig { - - public static boolean loaded; - public static Configuration config; - - public static boolean enableOreDictPatch; - public static boolean enableTiConFluidLighting; - public static boolean enableGtTooltipFix; - public static boolean enableGtNbtFix; - public static boolean enableGtCharcoalPitFix; - public static boolean enableChunkDebugging; - public static boolean enableCofhPatch; - public static boolean enableGcFuelChanges; - public static boolean enableRcFlowFix; - public static int maxRailcraftTankProcessVolume; - public static int maxRailcraftFluidLoaderFlow; - public static int maxRailcraftFluidUnloaderFlow; - public static boolean enableRcItemDupeFix; - public static boolean enableTcAspectSafety; - public static boolean enabledLwjglKeybindingFix; - public static boolean enabledFixEntitySetHealth; - public static boolean enableThaumicTinkererRepairFix; - - public static boolean disableAllLogging; - public static boolean debugMode; - - public AsmConfig(File file) { - if (!loaded) { - config = new Configuration(file); - syncConfig(true); - } - - } - - public static void syncConfig(boolean load) { - ArrayList propOrder = new ArrayList(); - ArrayList propOrderDebug = new ArrayList(); - - try { - if (!config.isChild && load) { - config.load(); - } - - Property prop; - - //Debug - prop = config.get("debug", "disableAllLogging", false); - prop.comment = "Disables ALL logging from GT++."; - prop.setLanguageKey("gtpp.disableAllLogging").setRequiresMcRestart(false); - disableAllLogging = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "debugMode", false); - prop.comment = "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)"; - prop.setLanguageKey("gtpp.debugMode").setRequiresMcRestart(false); - debugMode = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "enabledFixEntitySetHealth", false); - prop.comment = "Enable/Disable entity setHealth() fix."; - prop.setLanguageKey("gtpp.enabledFixEntitySetHealth").setRequiresMcRestart(true); - enabledFixEntitySetHealth = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "enableChunkDebugging", false); - prop.comment = "Enable/Disable Chunk Debugging Features, Must Be enabled on Client and Server."; - prop.setLanguageKey("gtpp.enableChunkDebugging").setRequiresMcRestart(true); - enableChunkDebugging = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "enableGtNbtFix", true); - prop.comment = "Enable/Disable GT NBT Persistency Fix"; - prop.setLanguageKey("gtpp.enableGtNbtFix").setRequiresMcRestart(true); - enableGtNbtFix = prop.getBoolean(true); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "enableCofhPatch", false); - prop.comment = "Enable/Disable COFH OreDictionaryArbiter Patch (Useful for Development)"; - prop.setLanguageKey("gtpp.enableCofhPatch").setRequiresMcRestart(true); - enableCofhPatch = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "enableOreDictPatch", false); - prop.comment = "Enable/Disable Forge OreDictionary Patch (Useful for Development)"; - prop.setLanguageKey("gtpp.enableOreDictPatch").setRequiresMcRestart(true); - enableOreDictPatch = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - prop = config.get("debug", "enableThaumicTinkererRepairFix", false); - prop.comment = "Enable/Disable Patch for Thaumic Repairer"; - prop.setLanguageKey("gtpp.enableThaumicTinkererRepairFix").setRequiresMcRestart(true); - enableThaumicTinkererRepairFix = prop.getBoolean(false); - propOrderDebug.add(prop.getName()); - - - - - - - //General Features - prop = config.get("general", "enableTiConFluidLighting", true); - prop.comment = "Enable/Disable Brightness Visuals for Tinkers Fluids, only required on the Client."; - prop.setLanguageKey("gtpp.enableTiConFluidLighting").setRequiresMcRestart(true); - enableTiConFluidLighting = prop.getBoolean(true); - propOrder.add(prop.getName()); - - prop = config.get("general", "enabledLwjglKeybindingFix", true); - prop.comment = "Prevents the game crashing from having invalid keybinds. https://github.com/alkcorp/GTplusplus/issues/544"; - prop.setLanguageKey("gtpp.enabledLwjglKeybindingFix").setRequiresMcRestart(true); - enabledLwjglKeybindingFix = prop.getBoolean(true); - propOrder.add(prop.getName()); - - prop = config.get("general", "enableGtTooltipFix", true); - prop.comment = "Enable/Disable Custom GT Tooltips"; - prop.setLanguageKey("gtpp.enableGtTooltipFix").setRequiresMcRestart(true); - enableGtTooltipFix = prop.getBoolean(true); - propOrder.add(prop.getName()); - - - - prop = config.get("general", "enableGtCharcoalPitFix", true); - prop.comment = "Makes the Charcoal Pile Igniter work better."; - prop.setLanguageKey("gtpp.enableGtCharcoalPitFix").setRequiresMcRestart(true); - enableGtCharcoalPitFix = prop.getBoolean(true); - propOrder.add(prop.getName()); - - prop = config.get("general", "enableGcFuelChanges", true); - prop.comment = "Enable/Disable changes to Galacticraft Rocket Fuels."; - prop.setLanguageKey("gtpp.enableGcFuelChanges").setRequiresMcRestart(true); - //Disabled because Broken - //enableGcFuelChanges = prop.getBoolean(true); - enableGcFuelChanges = false; - propOrder.add(prop.getName()); - - - //Railcraft Tank fix - prop = config.get("general", "enableRcFlowFix", true); - prop.comment = "Allows Custom max IO rates on RC tanks"; - prop.setLanguageKey("gtpp.enableRcFlowFix").setRequiresMcRestart(true); - enableRcFlowFix = prop.getBoolean(true); - propOrder.add(prop.getName()); - - prop = config.get("general", "maxRailcraftTankProcessVolume", 4000); - prop.comment = "Max IO for RC fluid tanks (Not Carts). 'enableRcFlowFix' Must be enabled."; - prop.setLanguageKey("gtpp.maxRailcraftTankProcessVolume").setRequiresMcRestart(true); - maxRailcraftTankProcessVolume = prop.getInt(4000); - propOrder.add(prop.getName()); - - // Railcraft Loader Max flowrate - prop = config.get("general", "maxRailcraftFluidLoaderFlow", 20); - prop.comment = "Max Output rate for RC Fluid Loaders"; - prop.setLanguageKey("gtpp.maxRailcraftFluidLoaderFlow").setRequiresMcRestart(true); - maxRailcraftFluidLoaderFlow = prop.getInt(20); - propOrder.add(prop.getName()); - - // Railcraft Unloader Max flowrate - prop = config.get("general", "maxRailcraftFluidUnloaderFlow", 80); - prop.comment = "Max Output rate for RC Fluid Unloaders"; - prop.setLanguageKey("gtpp.maxRailcraftFluidUnloaderFlow").setRequiresMcRestart(true); - maxRailcraftFluidUnloaderFlow = prop.getInt(80); - propOrder.add(prop.getName()); - - //Railcraft Dupe Fix - prop = config.get("general", "enableRcItemDupeFix", true); - prop.comment = "Fixes possible negative itemstacks"; - prop.setLanguageKey("gtpp.enableRcItemDupeFix").setRequiresMcRestart(true); - enableRcItemDupeFix = prop.getBoolean(true); - propOrder.add(prop.getName()); - - - //TC Aspect Safety - prop = config.get("general", "enableTcAspectSafety", true); - prop.comment = "Fixes small oversights in Thaumcraft 4."; - prop.setLanguageKey("gtpp.enableTcAspectSafety").setRequiresMcRestart(true); - enableTcAspectSafety = prop.getBoolean(true); - propOrder.add(prop.getName()); - - - config.setCategoryPropertyOrder("general", propOrder); - config.setCategoryPropertyOrder("debug", propOrderDebug); - if (config.hasChanged()) { - config.save(); - } - - Preloader_Logger.INFO("Chunk Debugging - Enabled: "+enableChunkDebugging); - Preloader_Logger.INFO("Gt Nbt Fix - Enabled: "+enableGtNbtFix); - Preloader_Logger.INFO("TiCon Fluid Lighting - Enabled: "+enableTiConFluidLighting); - Preloader_Logger.INFO("Gt Tooltip Fix - Enabled: "+enableGtTooltipFix); - Preloader_Logger.INFO("COFH Patch - Enabled: "+enableCofhPatch); - Preloader_Logger.INFO("Gc Fuel Changes Patch - Enabled: "+enableGcFuelChanges); - Preloader_Logger.INFO("Railcraft Fluid Flow Patch - Enabled: "+enableRcFlowFix); - Preloader_Logger.INFO("Thaumcraft Aspect Safety Patch - Enabled: "+enableTcAspectSafety); - Preloader_Logger.INFO("Fix bad usage of EntityLivingBase.setHealth Patch - Enabled: "+enabledFixEntitySetHealth); - - } catch (Exception var3) { - FMLLog.log(Level.ERROR, var3, "GT++ ASM had a problem loading it's config", new Object[0]); - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/preloader/asm/ClassesToTransform.java b/src/Java/gtPlusPlus/preloader/asm/ClassesToTransform.java deleted file mode 100644 index 1dcbff439f..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/ClassesToTransform.java +++ /dev/null @@ -1,74 +0,0 @@ -package gtPlusPlus.preloader.asm; - -public class ClassesToTransform { - - - public static final String LWJGL_KEYBOARD = "org.lwjgl.input.Keyboard"; - - - public static final String MINECRAFT_GAMESETTINGS = "net.minecraft.client.settings.GameSettings"; - public static final String MINECRAFT_GAMESETTINGS_OBF = "bbj"; - - - public static final String FORGE_CHUNK_MANAGER = "net.minecraftforge.common.ForgeChunkManager"; - public static final String FORGE_ORE_DICTIONARY = "net.minecraftforge.oredict.OreDictionary"; - - - public static final String COFH_ORE_DICTIONARY_ARBITER = "cofh.core.util.oredict.OreDictionaryArbiter"; - - - public static final String TINKERS_FLUID_BLOCK = "tconstruct.smeltery.blocks.TConstructFluid"; - - - public static final String RAILCRAFT_FLUID_HELPER = "mods.railcraft.common.fluids.FluidHelper"; - public static final String RAILCRAFT_TILE_FLUID_LOADER = "mods.railcraft.common.blocks.machine.gamma.TileFluidLoader"; - public static final String RAILCRAFT_INVENTORY_TOOLS = "mods.railcraft.common.util.inventory.InvTools"; - - - public static final String GALACTICRAFT_FLUID_UTILS = "micdoodle8.mods.galacticraft.core.util.FluidUtil"; - public static final String GALACTICRAFT_TILE_ENTITY_FUEL_LOADER = "micdoodle8.mods.galacticraft.core.tile.TileEntityFuelLoader"; - public static final String GALACTICRAFT_ENTITY_AUTO_ROCKET = "micdoodle8.mods.galacticraft.api.prefab.entity.EntityAutoRocket"; - - - public static final String GT_UTILITY = "gregtech.api.util.GT_Utility"; - public static final String GT_ACHIEVEMENTS = "gregtech.loaders.misc.GT_Achievements"; - public static final String GT_CLIENT_PROXY = "gregtech.common.GT_Client"; - public static final String GT_PACKET_TILE_ENTITY = "gregtech.api.net.GT_Packet_TileEntity"; - public static final String GT_BASE_META_TILE_ENTITY = "gregtech.api.metatileentity.BaseMetaTileEntity"; - public static final String GT_MTE_CHARCOAL_PIT = "gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Charcoal_Pit"; - public static final String GT_ITEM_MACHINES = "gregtech.common.blocks.GT_Item_Machines"; - public static final String GT_METAGENERATED_TOOL = "gregtech.api.items.GT_MetaGenerated_Tool"; - public static final String GT_BLOCK_MACHINES = "gregtech.common.blocks.GT_Block_Machines"; - public static final String GT_MTE_HATCH_ENERGY = "gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy"; - public static final String GT_METAPIPE_ITEM = "gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Item"; - public static final String GT_METAPIPE_FLUID = "gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid"; - public static final String GT_METAPIPE_FRAME = "gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Frame"; - - - public static final String GTPP_MTE_HATCH_RTG = "gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG"; - - - public static final String THAUMCRAFT_ITEM_WISP_ESSENCE = "thaumcraft.common.items.ItemWispEssence"; - public static final String THAUMCRAFT_CRAFTING_MANAGER = "thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"; - public static final String THAUMCRAFT_TILE_ALCHEMY_FURNACE = "thaumcraft.common.tiles.TileAlchemyFurnace"; - public static final String THAUMICTINKERER_TILE_REPAIRER = "thaumic.tinkerer.common.block.tile.TileRepairer"; - - public static final String IC2_ITEM_ARMOUR_HAZMAT = "ic2.core.item.armor.ItemArmorHazmat"; - public static final String IC2_BLOCK_BASE_TILE_ENTITY = "ic2.core.block.BlockTileEntity"; - public static final String IC2_BLOCK_MACHINE1 = "ic2.core.block.machine.BlockMachine"; - public static final String IC2_BLOCK_MACHINE2 = "ic2.core.block.machine.BlockMachine2"; - public static final String IC2_BLOCK_MACHINE3 = "ic2.core.block.machine.BlockMachine3"; - public static final String IC2_BLOCK_KINETIC_GENERATOR = "ic2.core.block.kineticgenerator.block.BlockKineticGenerator"; - public static final String IC2_BLOCK_HEAT_GENERATOR = "ic2.core.block.heatgenerator.block.BlockHeatGenerator"; - public static final String IC2_BLOCK_GENERATOR = "ic2.core.block.generator.block.BlockGenerator"; - public static final String IC2_BLOCK_REACTOR_ACCESS_HATCH = "ic2.core.block.reactor.block.BlockReactorAccessHatch"; - public static final String IC2_BLOCK_REACTOR_CHAMBER = "ic2.core.block.reactor.block.BlockReactorChamber"; - public static final String IC2_BLOCK_REACTOR_FLUID_PORT = "ic2.core.block.reactor.block.BlockReactorFluidPort"; - public static final String IC2_BLOCK_REACTOR_REDSTONE_PORT = "ic2.core.block.reactor.block.BlockReactorRedstonePort"; - public static final String IC2_BLOCK_REACTOR_VESSEL = "ic2.core.block.reactor.block.BlockReactorVessel"; - public static final String IC2_BLOCK_PERSONAL = "ic2.core.block.personal.BlockPersonal.class"; - public static final String IC2_BLOCK_CHARGEPAD = "ic2.core.block.wiring.BlockChargepad.class"; - public static final String IC2_BLOCK_ELECTRIC = "ic2.core.block.wiring.BlockElectric.class"; - public static final String IC2_BLOCK_LUMINATOR = "ic2.core.block.wiring.BlockLuminator.class"; - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java b/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java deleted file mode 100644 index 2a0082754a..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java +++ /dev/null @@ -1,95 +0,0 @@ -package gtPlusPlus.preloader.asm; - -import java.io.File; -import java.util.Arrays; - -import com.google.common.eventbus.EventBus; -import com.google.common.eventbus.Subscribe; - -import cpw.mods.fml.common.DummyModContainer; -import cpw.mods.fml.common.LoadController; -import cpw.mods.fml.common.ModMetadata; -import cpw.mods.fml.common.event.FMLConstructionEvent; -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.preloader.Preloader_Logger; -import net.minecraftforge.common.config.Configuration; - -public class Preloader_DummyContainer extends DummyModContainer { - - public Preloader_DummyContainer() { - super(new ModMetadata()); - ModMetadata meta = getMetadata(); - meta.modId = CORE_Preloader.MODID; - meta.name = CORE_Preloader.NAME; - meta.version = CORE_Preloader.VERSION; - meta.credits = "Roll Credits ..."; - meta.authorList = Arrays.asList("Alkalus"); - meta.description = ""; - meta.url = ""; - meta.updateUrl = ""; - meta.screenshots = new String[0]; - meta.logoFile = ""; - //meta.dependencies = (List) CORE_Preloader.DEPENDENCIES; - Preloader_Logger.INFO("Initializing DummyModContainer"); - - } - - @Override - public boolean registerBus(EventBus bus, LoadController controller) { - bus.register(this); - return true; - } - - @Subscribe - public void modConstruction(FMLConstructionEvent evt){ - Preloader_Logger.INFO("Constructing DummyModContainer"); - - } - - @Subscribe - public void preInit(FMLPreInitializationEvent event) { - Preloader_Logger.INFO("Loading " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION); - // Handle GT++ Config - handleConfigFile(event); - } - - @Subscribe - public void init(FMLInitializationEvent evt) { - Preloader_Logger.INFO("Begin resource allocation for " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION); - - } - - @Subscribe - public void postInit(FMLPostInitializationEvent evt) { - Preloader_Logger.INFO("Finished loading."); - } - - public static void handleConfigFile(final FMLPreInitializationEvent event) { - final Configuration config = new Configuration(new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); - config.load(); - - //BGM Watchdog - CORE_Preloader.enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); - - // Circuits - CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times."); - } - - public static boolean getConfig(){ - final Configuration config = new Configuration( new File(gtPlusPlus.preloader.CORE_Preloader.MC_DIR, "config/GTplusplus/GTplusplus.cfg")); - if (config != null){ - config.load(); - // Circuits - CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times."); - CORE_Preloader.enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); - - Preloader_Logger.INFO("Loaded the configuration file."); - return true; - } - Preloader_Logger.INFO("Failed loading the configuration file."); - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java b/src/Java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java deleted file mode 100644 index 22568e6de7..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java +++ /dev/null @@ -1,84 +0,0 @@ -package gtPlusPlus.preloader.asm; - -import java.io.File; -import java.text.NumberFormat; -import java.util.Locale; -import java.util.Map; - -import cpw.mods.fml.relauncher.IFMLLoadingPlugin; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.preloader.Preloader_Logger; -import gtPlusPlus.preloader.asm.transformers.Preloader_Transformer_Handler; -import net.minecraft.launchwrapper.Launch; - -@SortingIndex(10097) -@MCVersion(value = "1.7.10") -@IFMLLoadingPlugin.TransformerExclusions("gtPlusPlus.preloader") -@IFMLLoadingPlugin.Name(CORE_Preloader.NAME) -public class Preloader_FMLLoadingPlugin implements IFMLLoadingPlugin { - - //-Dfml.coreMods.load=gtPlusPlus.preloader.asm.Preloader_FMLLoadingPlugin - - static { - Preloader_Logger.INFO("Initializing IFMLLoadingPlugin"); - } - - @Override - public String getAccessTransformerClass() { - return null; - } - - @Override - public String[] getASMTransformerClass() { - //This will return the name of the class - return new String[]{ - Preloader_Transformer_Handler.class.getName() - }; - } - - @Override - public String getModContainerClass() { - //This is the name of our dummy container - return Preloader_DummyContainer.class.getName(); - } - - @Override - public String getSetupClass() { - //return Preloader_SetupClass.class.getName(); - return null; - } - - @Override - public void injectData(Map data) { - boolean isDeObf = (boolean) data.get("runtimeDeobfuscationEnabled"); - File mcDir = (File) data.get("mcLocation"); - //LaunchClassLoader classLoader = (LaunchClassLoader) data.get("classLoader"); - File coremodLocation = (File) data.get("coremodLocation"); - String deobfuscationFileName = (String) data.get("deobfuscationFileName"); - if (mcDir != null && mcDir.exists()) { - CORE_Preloader.setMinecraftDirectory(mcDir); - Preloader_Logger.INFO("Set McDir via Preloader_SetupClass"); - } - Preloader_Logger.INFO("runtimeDeobfuscationEnabled: "+isDeObf); - Preloader_Logger.INFO("deobfuscationFileName: "+deobfuscationFileName); - if (coremodLocation != null && coremodLocation.exists()) { - Preloader_Logger.INFO("coremodLocation: "+coremodLocation.getPath()); - } - else { - Preloader_Logger.INFO("coremodLocation: null"); - Preloader_Logger.ERROR("Unable to determine CoreMod location"); - } - CORE_Preloader.DEV_ENVIRONMENT = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); - CORE_Preloader.DEBUG_MODE = AsmConfig.debugMode; - Preloader_Logger.INFO("Running on "+gtPlusPlus.preloader.CORE_Preloader.JAVA_VERSION+" | Development Environment: "+CORE_Preloader.DEV_ENVIRONMENT); - Locale aDefaultLocale = Locale.getDefault(); - NumberFormat aFormat = NumberFormat.getInstance(); - Locale aDisplayLocale = (Locale) ReflectionUtils.getFieldValue(ReflectionUtils.getField(Locale.class, "defaultDisplayLocale")); - Locale aFormatLocale = (Locale) ReflectionUtils.getFieldValue(ReflectionUtils.getField(Locale.class, "defaultFormatLocale")); - Preloader_Logger.INFO("Locale: "+aDefaultLocale+" | Test: "+aFormat.format(1000000000)+" | Display: "+aDisplayLocale+" | Format: "+aFormatLocale); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java b/src/Java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java deleted file mode 100644 index a6d2b6c863..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.preloader.asm; - -import java.io.File; -import java.util.Map; - -import cpw.mods.fml.relauncher.IFMLCallHook; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.preloader.Preloader_Logger; - -public class Preloader_SetupClass implements IFMLCallHook { - - @Override - public Void call() throws Exception { - Preloader_Logger.INFO("Executing IFMLCallHook"); - return null; - } - - @Override - public void injectData(Map data) { - - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java b/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java deleted file mode 100644 index 664ffe7b2d..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.preloader.asm.helpers; - -import codechicken.nei.guihook.GuiContainerManager; -import codechicken.nei.guihook.IContainerInputHandler; -import net.minecraft.client.gui.inventory.GuiContainer; - -public class MethodHelper_CC { - - - public void mouseUp2(int mousex, int mousey, int button) { - MethodHelper_CC.mouseUp(mousex, mousey, button); - } - - public static void mouseUp(int mousex, int mousey, int button) { - GuiContainerManager aManager = codechicken.nei.guihook.GuiContainerManager.getManager(); - if (aManager != null) { - GuiContainer aWindow = aManager.window; - for (IContainerInputHandler inputhander : GuiContainerManager.inputHandlers) { - //Preloader_Logger.INFO("Found Handler: "+aWindow.getClass().getName() + " | "+inputhander.getClass().getName()); - } - for (IContainerInputHandler inputhander : GuiContainerManager.inputHandlers) { - //Preloader_Logger.INFO("Trying to handle events for "+aWindow.getClass().getName() + " | "+inputhander.getClass().getName()); - inputhander.onMouseUp(aWindow, mousex, mousey, button); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java b/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java deleted file mode 100644 index 8120df81fa..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.preloader.asm.helpers; - -import java.util.List; - -import gregtech.api.enums.Materials; -import gregtech.api.items.GT_MetaGenerated_Tool; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class MethodHelper_GT { - - public static final void getSubItems(GT_MetaGenerated_Tool aTool, Item var1, CreativeTabs aCreativeTab, List aList) { - for (int i = 0; i < 32766; i += 2) { - if (aTool.getToolStats(new ItemStack(aTool, 1, i)) != null) { - ItemStack tStack = new ItemStack(aTool, 1, i); - aTool.isItemStackUsable(tStack); - aList.add(tStack); - aList.add(aTool.getToolWithStats(i,1,Materials.TungstenSteel,Materials.TungstenSteel,null)); - aList.add(aTool.getToolWithStats(i,1,Materials.Neutronium,Materials.Neutronium,null)); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java deleted file mode 100644 index 8791d401c8..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java +++ /dev/null @@ -1,121 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.*; - -import gtPlusPlus.preloader.Preloader_Logger; - -public class ClassTransformer_CC_GuiContainerManager { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public ClassTransformer_CC_GuiContainerManager(byte[] basicClass) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - localClassVisitor aTempMethodRemover = new localClassVisitor(aTempWriter); - aTempReader.accept(aTempMethodRemover, 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } else { - isValid = false; - } - - Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Valid patch? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Attempting Method Injection."); - injectMethod("mouseUp"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - String aClassName = "codechicken/nei/guihook/GuiContainerManager"; - ClassWriter cw = getWriter(); - if (aMethodName.equals("mouseUp")) { - Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Injecting " + aMethodName + ", static replacement call to "+aClassName+"."); - mv = cw.visitMethod(ACC_PUBLIC, "mouseUp", "(III)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(12, l0); - mv.visitVarInsn(ILOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/helpers/MethodHelper_CC", "mouseUp", "(III)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(13, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "L+aClassName+;", null, l0, l2, 0); - mv.visitLocalVariable("mousex", "I", null, l0, l2, 1); - mv.visitLocalVariable("mousey", "I", null, l0, l2, 2); - mv.visitLocalVariable("button", "I", null, l0, l2, 3); - mv.visitMaxs(3, 4); - mv.visitEnd(); - didInject = true; - } - - Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - boolean obfuscated = false; - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - public boolean getObfuscatedRemoval() { - return obfuscated; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - - if (name.equals("mouseUp")) { - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - - if (methodVisitor == null) { - Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Found method " + name + ", removing."); - Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Descriptor: "+desc); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java deleted file mode 100644 index 6f08dc4ff5..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java +++ /dev/null @@ -1,185 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ACC_STATIC; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; -import static org.objectweb.asm.Opcodes.RETURN; - -import java.util.ArrayList; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import com.google.common.base.Strings; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; - -import cofh.core.util.oredict.OreDictionaryArbiter; -import cofh.lib.util.ItemWrapper; -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gnu.trove.map.TMap; -import gnu.trove.map.hash.THashMap; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.DevHelper; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class ClassTransformer_COFH_OreDictionaryArbiter { - - //The qualified name of the class we plan to transform. - private static final String className = "cofh.core.util.oredict.OreDictionaryArbiter"; - //cofh/core/util/oredict/OreDictionaryArbiter - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public ClassTransformer_COFH_OreDictionaryArbiter(byte[] basicClass) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - injectMethod("registerOreDictionaryEntry"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod(String aMethodName) { - - boolean isObfuscated; - try { - isObfuscated = Class.forName("net.minecraft.item.ItemStack") != null ? false : true; - } catch (ClassNotFoundException e) { - isObfuscated = true; - } - String aItemStack = isObfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; - MethodVisitor mv; - if (aMethodName.equals("registerOreDictionaryEntry")) { - FMLRelaunchLog.log("[GT++ ASM] COFH OreDictionaryArbiter Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+". ItemStack: "+aItemStack); - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "registerOreDictionaryEntry", "(L"+aItemStack+";Ljava/lang/String;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(61, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter$FixCOFH", "registerOreDictionaryEntry", "(L"+aItemStack+";Ljava/lang/String;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(62, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("arg", "L"+aItemStack+";", null, l0, l2, 0); - mv.visitLocalVariable("arg0", "Ljava/lang/String;", null, l0, l2, 1); - mv.visitMaxs(2, 2); - mv.visitEnd(); - } - FMLRelaunchLog.log("[GT++ ASM] COFH OreDictionaryArbiter Patch", Level.INFO, "Method injection complete."); - - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("registerOreDictionaryEntry")) { - FMLRelaunchLog.log("[GT++ ASM] COFH OreDictionaryArbiter Patch", Level.INFO, "Removing method "+name); - return null; - } - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - - - - - @SuppressWarnings("unchecked") - public static class FixCOFH{ - - private static BiMap oreIDs; - private static TMap> oreStacks; - private static TMap> stackIDs; - private static TMap> stackNames; - - static { - try { - oreIDs = (BiMap) ReflectionUtils.getField(OreDictionaryArbiter.class, "oreIDs").get(null); - oreStacks = (TMap>) ReflectionUtils.getField(OreDictionaryArbiter.class, "oreStacks").get(null); - stackIDs = (TMap>) ReflectionUtils.getField(OreDictionaryArbiter.class, "stackIDs").get(null); - stackNames = (TMap>) ReflectionUtils.getField(OreDictionaryArbiter.class, "stackNames").get(null); - } - catch (Throwable t) { - oreIDs = HashBiMap.create(); - oreStacks = new THashMap>(); - stackIDs = new THashMap>(); - stackNames = new THashMap>(); - } - } - - public static void registerOreDictionaryEntry(ItemStack arg, String arg0) { - try { - if (arg == null) { - return; - } - if (arg.getItem() != null && !Strings.isNullOrEmpty(arg0)) { - int arg1 = OreDictionary.getOreID(arg0); - oreIDs.put(arg0, Integer.valueOf(arg1)); - if (!oreStacks.containsKey(Integer.valueOf(arg1))) { - oreStacks.put(Integer.valueOf(arg1), new ArrayList()); - } - ((ArrayList) oreStacks.get(Integer.valueOf(arg1))).add(arg); - ItemWrapper arg2 = ItemWrapper.fromItemStack(arg); - if (!stackIDs.containsKey(arg2)) { - stackIDs.put(arg2, new ArrayList()); - stackNames.put(arg2, new ArrayList()); - } - ((ArrayList) stackIDs.get(arg2)).add(Integer.valueOf(arg1)); - ((ArrayList) stackNames.get(arg2)).add(arg0); - } - } - catch (Throwable t) { - return; - } - } - } - - - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java deleted file mode 100644 index 19648ae60c..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java +++ /dev/null @@ -1,684 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - -public class ClassTransformer_Forge_ChunkLoading { - - //The qualified name of the class we plan to transform. - private static final String className = "net.minecraftforge.common.ForgeChunkManager"; - //net/minecraftforge/common/ForgeChunkManager - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - String aChunkCoordIntPair; - String aItemStack; - String aWorld; - String aEntity; - - private static boolean doesMethodAlreadyExist = false; - - public ClassTransformer_Forge_ChunkLoading(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null && !doesMethodAlreadyExist) { - - aChunkCoordIntPair = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/ChunkCoordIntPair") : "net/minecraft/world/ChunkCoordIntPair"; - aWorld = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; - aEntity = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/Entity") : "net/minecraft/entity/Entity"; - - injectMethod("forceChunk"); - injectMethod("unforceChunk"); - injectMethod("requestTicket"); - injectMethod("releaseTicket"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod(String aMethodName) { - MethodVisitor mv; - FMLRelaunchLog.log("[GT++ ASM] Chunkloading Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); - if (aMethodName.equals("forceChunk")) { - - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "forceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(730, l0); - mv.visitVarInsn(ALOAD, 0); - Label l1 = new Label(); - mv.visitJumpInsn(IFNULL, l1); - mv.visitVarInsn(ALOAD, 1); - Label l2 = new Label(); - mv.visitJumpInsn(IFNONNULL, l2); - mv.visitLabel(l1); - mv.visitLineNumber(732, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - mv.visitLabel(l2); - mv.visitLineNumber(734, l2); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$500", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Lnet/minecraftforge/common/ForgeChunkManager$Type;", false); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager$Type", "ENTITY", "Lnet/minecraftforge/common/ForgeChunkManager$Type;"); - Label l3 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l3); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$600", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)L"+aEntity+";", false); - mv.visitJumpInsn(IFNONNULL, l3); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(736, l4); - mv.visitTypeInsn(NEW, "java/lang/RuntimeException"); - mv.visitInsn(DUP); - mv.visitLdcInsn("Attempted to use an entity ticket to force a chunk, without an entity"); - mv.visitMethodInsn(INVOKESPECIAL, "java/lang/RuntimeException", "", "(Ljava/lang/String;)V", false); - mv.visitInsn(ATHROW); - mv.visitLabel(l3); - mv.visitLineNumber(738, l3); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "isPlayerTicket", "()Z", false); - Label l5 = new Label(); - mv.visitJumpInsn(IFEQ, l5); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "playerTickets", "Lcom/google/common/collect/SetMultimap;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/SetMultimap", "containsValue", "(Ljava/lang/Object;)Z", true); - Label l6 = new Label(); - mv.visitJumpInsn(IFNE, l6); - Label l7 = new Label(); - mv.visitJumpInsn(GOTO, l7); - mv.visitLabel(l5); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "containsEntry", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); - mv.visitJumpInsn(IFNE, l6); - mv.visitLabel(l7); - mv.visitLineNumber(740, l7); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitLdcInsn("The mod %s attempted to force load a chunk with an invalid ticket. This is not permitted."); - mv.visitInsn(ICONST_1); - mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); - mv.visitInsn(AASTORE); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "severe", "(Ljava/lang/String;[Ljava/lang/Object;)V", false); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(741, l8); - mv.visitInsn(RETURN); - mv.visitLabel(l6); - mv.visitLineNumber(743, l6); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "add", "(Ljava/lang/Object;)Z", false); - mv.visitInsn(POP); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(744, l9); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "storeLoadChunkToCache", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(745, l10); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/MinecraftForge", "EVENT_BUS", "Lcpw/mods/fml/common/eventhandler/EventBus;"); - mv.visitTypeInsn(NEW, "net/minecraftforge/common/ForgeChunkManager$ForceChunkEvent"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/common/ForgeChunkManager$ForceChunkEvent", "", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/common/eventhandler/EventBus", "post", "(Lcpw/mods/fml/common/eventhandler/Event;)Z", false); - mv.visitInsn(POP); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(747, l11); - mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/ImmutableSetMultimap", "builder", "()Lcom/google/common/collect/ImmutableSetMultimap$Builder;", false); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSetMultimap$Builder", "putAll", "(Lcom/google/common/collect/Multimap;)Lcom/google/common/collect/ImmutableSetMultimap$Builder;", false); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSetMultimap$Builder", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSetMultimap$Builder;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSetMultimap$Builder", "build", "()Lcom/google/common/collect/ImmutableSetMultimap;", false); - mv.visitVarInsn(ASTORE, 2); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(748, l12); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitInsn(POP); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(749, l13); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$800", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)I", false); - Label l14 = new Label(); - mv.visitJumpInsn(IFLE, l14); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "size", "()I", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$800", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)I", false); - mv.visitJumpInsn(IF_ICMPLE, l14); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(751, l15); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "iterator", "()Ljava/util/Iterator;", false); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, ""+aChunkCoordIntPair+""); - mv.visitVarInsn(ASTORE, 3); - Label l16 = new Label(); - mv.visitLabel(l16); - mv.visitLineNumber(752, l16); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "unforceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); - mv.visitLabel(l14); - mv.visitLineNumber(754, l14); - mv.visitFrame(F_APPEND,1, new Object[] {"com/google/common/collect/ImmutableSetMultimap"}, 0, null); - mv.visitInsn(RETURN); - Label l17 = new Label(); - mv.visitLabel(l17); - mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l0, l17, 0); - mv.visitLocalVariable("chunk", "L"+aChunkCoordIntPair+";", null, l0, l17, 1); - mv.visitLocalVariable("newMap", "Lcom/google/common/collect/ImmutableSetMultimap;", "Lcom/google/common/collect/ImmutableSetMultimap;", l12, l17, 2); - mv.visitLocalVariable("removed", "L"+aChunkCoordIntPair+";", null, l16, l14, 3); - mv.visitMaxs(5, 4); - mv.visitEnd(); - - } - else if (aMethodName.equals("unforceChunk")) { - - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "unforceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(781, l0); - mv.visitVarInsn(ALOAD, 0); - Label l1 = new Label(); - mv.visitJumpInsn(IFNULL, l1); - mv.visitVarInsn(ALOAD, 1); - Label l2 = new Label(); - mv.visitJumpInsn(IFNONNULL, l2); - mv.visitLabel(l1); - mv.visitLineNumber(783, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - mv.visitLabel(l2); - mv.visitLineNumber(785, l2); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "remove", "(Ljava/lang/Object;)Z", false); - mv.visitInsn(POP); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(786, l3); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "removeLoadedChunkFromCache", "(L"+aChunkCoordIntPair+";)V", false); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(787, l4); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/MinecraftForge", "EVENT_BUS", "Lcpw/mods/fml/common/eventhandler/EventBus;"); - mv.visitTypeInsn(NEW, "net/minecraftforge/common/ForgeChunkManager$UnforceChunkEvent"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/common/ForgeChunkManager$UnforceChunkEvent", "", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/common/eventhandler/EventBus", "post", "(Lcpw/mods/fml/common/eventhandler/Event;)Z", false); - mv.visitInsn(POP); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(788, l5); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/LinkedHashMultimap", "create", "(Lcom/google/common/collect/Multimap;)Lcom/google/common/collect/LinkedHashMultimap;", false); - mv.visitVarInsn(ASTORE, 2); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(789, l6); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/LinkedHashMultimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", false); - mv.visitInsn(POP); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(790, l7); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/ImmutableSetMultimap", "copyOf", "(Lcom/google/common/collect/Multimap;)Lcom/google/common/collect/ImmutableSetMultimap;", false); - mv.visitVarInsn(ASTORE, 3); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(791, l8); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitInsn(POP); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(792, l9); - mv.visitInsn(RETURN); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l0, l10, 0); - mv.visitLocalVariable("chunk", "L"+aChunkCoordIntPair+";", null, l0, l10, 1); - mv.visitLocalVariable("copy", "Lcom/google/common/collect/LinkedHashMultimap;", "Lcom/google/common/collect/LinkedHashMultimap;", l6, l10, 2); - mv.visitLocalVariable("newMap", "Lcom/google/common/collect/ImmutableSetMultimap;", "Lcom/google/common/collect/ImmutableSetMultimap;", l8, l10, 3); - mv.visitMaxs(5, 4); - mv.visitEnd(); - - } - - else if (aMethodName.equals("requestTicket")) { - - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "requestTicket", "(Ljava/lang/Object;L"+aWorld+";Lnet/minecraftforge/common/ForgeChunkManager$Type;)Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(656, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "getContainer", "(Ljava/lang/Object;)Lcpw/mods/fml/common/ModContainer;", false); - mv.visitVarInsn(ASTORE, 3); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(657, l1); - mv.visitVarInsn(ALOAD, 3); - Label l2 = new Label(); - mv.visitJumpInsn(IFNONNULL, l2); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(659, l3); - mv.visitFieldInsn(GETSTATIC, "org/apache/logging/log4j/Level", "ERROR", "Lorg/apache/logging/log4j/Level;"); - mv.visitLdcInsn("Failed to locate the container for mod instance %s (%s : %x)"); - mv.visitInsn(ICONST_3); - mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(AASTORE); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_1); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getName", "()Ljava/lang/String;", false); - mv.visitInsn(AASTORE); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_2); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "identityHashCode", "(Ljava/lang/Object;)I", false); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); - mv.visitInsn(AASTORE); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "log", "(Lorg/apache/logging/log4j/Level;Ljava/lang/String;[Ljava/lang/Object;)V", false); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(660, l4); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l2); - mv.visitLineNumber(662, l2); - mv.visitFrame(F_APPEND,1, new Object[] {"cpw/mods/fml/common/ModContainer"}, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEINTERFACE, "cpw/mods/fml/common/ModContainer", "getModId", "()Ljava/lang/String;", true); - mv.visitVarInsn(ASTORE, 4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(663, l5); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "callbacks", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "containsKey", "(Ljava/lang/Object;)Z", true); - Label l6 = new Label(); - mv.visitJumpInsn(IFNE, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(665, l7); - mv.visitLdcInsn("The mod %s has attempted to request a ticket without a listener in place"); - mv.visitInsn(ICONST_1); - mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ALOAD, 4); - mv.visitInsn(AASTORE); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "severe", "(Ljava/lang/String;[Ljava/lang/Object;)V", false); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(666, l8); - mv.visitTypeInsn(NEW, "java/lang/RuntimeException"); - mv.visitInsn(DUP); - mv.visitLdcInsn("Invalid ticket request"); - mv.visitMethodInsn(INVOKESPECIAL, "java/lang/RuntimeException", "", "(Ljava/lang/String;)V", false); - mv.visitInsn(ATHROW); - mv.visitLabel(l6); - mv.visitLineNumber(669, l6); - mv.visitFrame(F_APPEND,1, new Object[] {"java/lang/String"}, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "getMaxTicketLengthFor", "(Ljava/lang/String;)I", false); - mv.visitVarInsn(ISTORE, 5); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(671, l9); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "get", "(Ljava/lang/Object;)Ljava/util/Collection;", true); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "size", "()I", true); - mv.visitVarInsn(ILOAD, 5); - Label l10 = new Label(); - mv.visitJumpInsn(IF_ICMPLT, l10); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(673, l11); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "warnedMods", "Ljava/util/Set;"); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "contains", "(Ljava/lang/Object;)Z", true); - Label l12 = new Label(); - mv.visitJumpInsn(IFNE, l12); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(675, l13); - mv.visitLdcInsn("The mod %s has attempted to allocate a chunkloading ticket beyond it's currently allocated maximum : %d"); - mv.visitInsn(ICONST_2); - mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ALOAD, 4); - mv.visitInsn(AASTORE); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_1); - mv.visitVarInsn(ILOAD, 5); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); - mv.visitInsn(AASTORE); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "info", "(Ljava/lang/String;[Ljava/lang/Object;)V", false); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(676, l14); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "warnedMods", "Ljava/util/Set;"); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "add", "(Ljava/lang/Object;)Z", true); - mv.visitInsn(POP); - mv.visitLabel(l12); - mv.visitLineNumber(678, l12); - mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l10); - mv.visitLineNumber(680, l10); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitTypeInsn(NEW, "net/minecraftforge/common/ForgeChunkManager$Ticket"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "", "(Ljava/lang/String;Lnet/minecraftforge/common/ForgeChunkManager$Type;L"+aWorld+";)V", false); - mv.visitVarInsn(ASTORE, 6); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(681, l15); - mv.visitVarInsn(ALOAD, 6); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "storeTicketToCache", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aWorld+";)V", false); - Label l16 = new Label(); - mv.visitLabel(l16); - mv.visitLineNumber(682, l16); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 6); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); - mv.visitInsn(POP); - Label l17 = new Label(); - mv.visitLabel(l17); - mv.visitLineNumber(683, l17); - mv.visitVarInsn(ALOAD, 6); - mv.visitInsn(ARETURN); - Label l18 = new Label(); - mv.visitLabel(l18); - mv.visitLocalVariable("mod", "Ljava/lang/Object;", null, l0, l18, 0); - mv.visitLocalVariable("world", "L"+aWorld+";", null, l0, l18, 1); - mv.visitLocalVariable("type", "Lnet/minecraftforge/common/ForgeChunkManager$Type;", null, l0, l18, 2); - mv.visitLocalVariable("container", "Lcpw/mods/fml/common/ModContainer;", null, l1, l18, 3); - mv.visitLocalVariable("modId", "Ljava/lang/String;", null, l5, l18, 4); - mv.visitLocalVariable("allowedCount", "I", null, l9, l18, 5); - mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l15, l18, 6); - mv.visitMaxs(6, 7); - mv.visitEnd(); - - } - - - else if (aMethodName.equals("releaseTicket")) { - - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "releaseTicket", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(693, l0); - mv.visitVarInsn(ALOAD, 0); - Label l1 = new Label(); - mv.visitJumpInsn(IFNONNULL, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(695, l2); - mv.visitInsn(RETURN); - mv.visitLabel(l1); - mv.visitLineNumber(697, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "isPlayerTicket", "()Z", false); - Label l3 = new Label(); - mv.visitJumpInsn(IFEQ, l3); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "playerTickets", "Lcom/google/common/collect/SetMultimap;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/SetMultimap", "containsValue", "(Ljava/lang/Object;)Z", true); - Label l4 = new Label(); - mv.visitJumpInsn(IFNE, l4); - Label l5 = new Label(); - mv.visitJumpInsn(GOTO, l5); - mv.visitLabel(l3); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "containsEntry", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); - mv.visitJumpInsn(IFNE, l4); - mv.visitLabel(l5); - mv.visitLineNumber(699, l5); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - mv.visitLabel(l4); - mv.visitLineNumber(701, l4); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(703, l7); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); - mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/ImmutableSet", "copyOf", "(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSet", "iterator", "()Ljava/util/Iterator;", false); - mv.visitVarInsn(ASTORE, 2); - Label l8 = new Label(); - mv.visitJumpInsn(GOTO, l8); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitFrame(F_FULL, 3, new Object[] {"net/minecraftforge/common/ForgeChunkManager$Ticket", TOP, "java/util/Iterator"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, ""+aChunkCoordIntPair+""); - mv.visitVarInsn(ASTORE, 1); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(705, l10); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "unforceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); - mv.visitLabel(l8); - mv.visitLineNumber(703, l8); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); - mv.visitJumpInsn(IFNE, l9); - mv.visitLabel(l6); - mv.visitLineNumber(708, l6); - mv.visitFrame(F_FULL, 1, new Object[] {"net/minecraftforge/common/ForgeChunkManager$Ticket"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "removeTicketFromCache", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)V", false); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(709, l11); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "isPlayerTicket", "()Z", false); - Label l12 = new Label(); - mv.visitJumpInsn(IFEQ, l12); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(711, l13); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "playerTickets", "Lcom/google/common/collect/SetMultimap;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$100", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/SetMultimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); - mv.visitInsn(POP); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(712, l14); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitLdcInsn("Forge"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); - mv.visitInsn(POP); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(713, l15); - Label l16 = new Label(); - mv.visitJumpInsn(GOTO, l16); - mv.visitLabel(l12); - mv.visitLineNumber(716, l12); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); - mv.visitInsn(POP); - mv.visitLabel(l16); - mv.visitLineNumber(718, l16); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - Label l17 = new Label(); - mv.visitLabel(l17); - mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l0, l17, 0); - mv.visitLocalVariable("chunk", "L"+aChunkCoordIntPair+";", null, l10, l8, 1); - mv.visitMaxs(3, 3); - mv.visitEnd(); - - } - - - FMLRelaunchLog.log("[GT++ ASM] Chunkloading Patch", Level.INFO, "Method injection complete."); - - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("forceChunk") || name.equals("unforceChunk") || name.equals("requestTicket") || name.equals("releaseTicket")) { - FMLRelaunchLog.log("[GT++ ASM] Chunkloading Patch", Level.INFO, "Found method "+name+", Patching."); - return null; - } - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java deleted file mode 100644 index d56b9de059..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java +++ /dev/null @@ -1,130 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.DamageSource; - -public class ClassTransformer_Forge_EntityLivingBase_SetHealth { - - private boolean isValid = false; - private ClassReader mReader = null; - private ClassWriter mWriter = null; - private boolean didPatch = false; - - public ClassTransformer_Forge_EntityLivingBase_SetHealth(String aClassName, byte[] basicClass) { - if (basicClass == null) { - return; - } - - ClassReader reader = new ClassReader(basicClass); - ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_MAXS); - ClassVisitor visitor = writer; - SetHealthVisitor aVisitor = new SetHealthVisitor(visitor); - visitor = aVisitor; - reader.accept(visitor, 0); - if (reader != null && writer != null) { - isValid = true; - } - else { - isValid = false; - } - mReader = reader; - mWriter = writer; - didPatch = aVisitor.didPatchInternal; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return mReader; - } - - public ClassWriter getWriter() { - return mWriter; - } - - - public static class SetHealthVisitor extends ClassVisitor { - private String clsName = null; - private boolean didPatchInternal = false; - private static final String callbackOwner = org.objectweb.asm.Type.getInternalName(SetHealthVisitor.class); - - private SetHealthVisitor(ClassVisitor cv) { - super(Opcodes.ASM5, cv); - } - - @Override - public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { - super.visit( - version, access, name, signature, superName, interfaces - ); - this.clsName = name; - } - - @Override - public MethodVisitor visitMethod( - int mAccess, final String mName, final String mDesc, String mSignature, String[] mExceptions) { - final boolean warn = !(clsName.equals( - "net/minecraft/entity/EntityLivingBase" - )); - - return new MethodVisitor(Opcodes.ASM5, super.visitMethod(mAccess, mName, mDesc, mSignature, mExceptions)) { - @Override - public void visitMethodInsn( - int opcode, String owner, String name, String desc, boolean isIntf - ) { - if (owner.equals( - "net/minecraft/entity/EntityLivingBase" - ) && name.equals("setHealth") && desc.equals("(F)V")) { - if (warn) { - FMLRelaunchLog.warning( - "=============================================================" - ); - FMLRelaunchLog.warning( - "MOD HAS DIRECT REFERENCE Entity.setHealth() THIS IS NOT ALLOWED!" - ); - FMLRelaunchLog.warning( - "Offendor: %s.%s%s", SetHealthVisitor.this.clsName, mName, mDesc - ); - FMLRelaunchLog.warning( - "Use EntityLiving.attackEntityFrom(DamageSource, damageDealt) instead" - ); - FMLRelaunchLog.warning( - "=============================================================" - ); - } - didPatchInternal = true; - //opcode = Opcodes.INVOKESTATIC; // Set it static - //owner = SetHealthVisitor.callbackOwner; - //name = "setHealthGeneric"; // Replace the method name - //desc = "(Lnet/minecraft/entity/EntityLivingBase;F)V"; // Replace the method desc - - } - super.visitMethodInsn(opcode, owner, name, desc, isIntf); - } - }; - } - - - private final static DamageSource mGenericDamageSource = new DamageSource("gtpp.generic"); - - public static void setHealthGeneric(EntityLivingBase aEntity, float aValue) { - aEntity.attackEntityFrom(mGenericDamageSource, aValue); - } - - } - - - public boolean didPatchClass() { - return didPatch; - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java deleted file mode 100644 index 1e58cbbe9b..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java +++ /dev/null @@ -1,527 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - - -public class ClassTransformer_GC_EntityAutoRocket { - - //The qualified name of the class we plan to transform. - private static final String className = "micdoodle8.mods.galacticraft.api.prefab.entity.EntityAutoRocket"; - //micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private final boolean isObfuscated; - - public ClassTransformer_GC_EntityAutoRocket(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - isObfuscated = obfuscated; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - injectMethod(); - } - else { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Failed to Inject new code."); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod() { - - String aEntityPlayer = isObfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayer") : "net/minecraft/entity/player/EntityPlayer"; - String aEntityPlayerMP = isObfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayerMP") : "net/minecraft/entity/player/EntityPlayerMP"; - String aWorld = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; - String aItemStack = isObfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; - String aEntity = isObfuscated ? DevHelper.getObfuscated("net/minecraft/entity/Entity") : "net/minecraft/entity/Entity"; - String aWorldClient = isObfuscated ? DevHelper.getObfuscated("net/minecraft/client/multiplayer/WorldClient") : "net/minecraft/client/multiplayer/WorldClient"; - String aDifficultyEnum = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/EnumDifficulty") : "net/minecraft/world/EnumDifficulty"; - String aWorldInfo = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/storage/WorldInfo") : "net/minecraft/world/storage/WorldInfo"; - String aItemInWorldManager = isObfuscated ? DevHelper.getObfuscated("net/minecraft/server/management/ItemInWorldManager") : "net/minecraft/server/management/ItemInWorldManager"; - String aWorldType = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/WorldType") : "net/minecraft/world/WorldType"; - String aGameType = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/WorldSettings$GameType") : "net/minecraft/world/WorldSettings$GameType"; - - if (isValidTransformer()) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Injecting decodePacketdata into "+className+"."); - MethodVisitor mv = getWriter().visitMethod(ACC_PUBLIC, "decodePacketdata", "(Lio/netty/buffer/ByteBuf;)V", null, null); - - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1027, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/api/prefab/entity/EntitySpaceshipBase", "decodePacketdata", "(Lio/netty/buffer/ByteBuf;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(1029, l1); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/galacticraft/util/GalacticUtils", "getValidFuelForTier", "(L"+aEntity+";)Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitVarInsn(ASTORE, 2); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(1030, l2); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitVarInsn(ISTORE, 3); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(1031, l3); - mv.visitVarInsn(ALOAD, 2); - Label l4 = new Label(); - mv.visitJumpInsn(IFNULL, l4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(1032, l5); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); - mv.visitVarInsn(ASTORE, 4); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(1033, l6); - mv.visitVarInsn(ALOAD, 4); - mv.visitJumpInsn(IFNULL, l4); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(1034, l7); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "setFluid", "(Lnet/minecraftforge/fluids/FluidStack;)V", false); - mv.visitLabel(l4); - mv.visitLineNumber(1038, l4); - mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraftforge/fluids/FluidStack", INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "landing", "Z"); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(1039, l8); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "destinationFrequency", "I"); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(1041, l9); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); - Label l10 = new Label(); - mv.visitJumpInsn(IFEQ, l10); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(1043, l11); - mv.visitVarInsn(ALOAD, 0); - mv.visitTypeInsn(NEW, "micdoodle8/mods/galacticraft/api/vector/BlockVec3"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/api/vector/BlockVec3", "", "(III)V", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "targetVec", "Lmicdoodle8/mods/galacticraft/api/vector/BlockVec3;"); - mv.visitLabel(l10); - mv.visitLineNumber(1046, l10); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); - mv.visitLdcInsn(new Double("8000.0")); - mv.visitInsn(DDIV); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "motionX", "D"); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(1047, l12); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); - mv.visitLdcInsn(new Double("8000.0")); - mv.visitInsn(DDIV); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "motionY", "D"); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(1048, l13); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); - mv.visitLdcInsn(new Double("8000.0")); - mv.visitInsn(DDIV); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "motionZ", "D"); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(1049, l14); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); - mv.visitLdcInsn(new Double("8000.0")); - mv.visitInsn(DDIV); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "lastMotionY", "D"); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(1050, l15); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); - mv.visitLdcInsn(new Double("8000.0")); - mv.visitInsn(DDIV); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "lastLastMotionY", "D"); - Label l16 = new Label(); - mv.visitLabel(l16); - mv.visitLineNumber(1052, l16); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "cargoItems", "[L"+aItemStack+";"); - Label l17 = new Label(); - mv.visitJumpInsn(IFNONNULL, l17); - Label l18 = new Label(); - mv.visitLabel(l18); - mv.visitLineNumber(1054, l18); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "getSizeInventory", "()I", false); - mv.visitTypeInsn(ANEWARRAY, aItemStack); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "cargoItems", "[L"+aItemStack+";"); - mv.visitLabel(l17); - mv.visitLineNumber(1057, l17); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "setWaitForPlayer", "(Z)V", false); - Label l19 = new Label(); - mv.visitLabel(l19); - mv.visitLineNumber(1059, l19); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/network/ByteBufUtils", "readUTF8String", "(Lio/netty/buffer/ByteBuf;)Ljava/lang/String;", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); - Label l20 = new Label(); - mv.visitLabel(l20); - mv.visitLineNumber(1060, l20); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); - mv.visitLdcInsn(""); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l21 = new Label(); - mv.visitJumpInsn(IFEQ, l21); - mv.visitInsn(ACONST_NULL); - Label l22 = new Label(); - mv.visitJumpInsn(GOTO, l22); - mv.visitLabel(l21); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket"}); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); - mv.visitLabel(l22); - mv.visitFrame(F_FULL, 4, new Object[] {"micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "io/netty/buffer/ByteBuf", "net/minecraftforge/fluids/FluidStack", INTEGER}, 2, new Object[] {"micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "java/lang/String"}); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); - Label l23 = new Label(); - mv.visitLabel(l23); - mv.visitLineNumber(1061, l23); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessageCooldown", "I"); - Label l24 = new Label(); - mv.visitLabel(l24); - mv.visitLineNumber(1062, l24); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "lastStatusMessageCooldown", "I"); - Label l25 = new Label(); - mv.visitLabel(l25); - mv.visitLineNumber(1063, l25); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusValid", "Z"); - Label l26 = new Label(); - mv.visitLabel(l26); - mv.visitLineNumber(1066, l26); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "worldObj", "L"+aWorld+";"); - mv.visitFieldInsn(GETFIELD, aWorld, "isRemote", "Z"); - Label l27 = new Label(); - mv.visitJumpInsn(IFEQ, l27); - Label l28 = new Label(); - mv.visitLabel(l28); - mv.visitLineNumber(1068, l28); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); - mv.visitVarInsn(ISTORE, 4); - Label l29 = new Label(); - mv.visitLabel(l29); - mv.visitLineNumber(1069, l29); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "riddenByEntity", "L"+aEntity+";"); - Label l30 = new Label(); - mv.visitJumpInsn(IFNONNULL, l30); - Label l31 = new Label(); - mv.visitLabel(l31); - mv.visitLineNumber(1071, l31); - mv.visitVarInsn(ILOAD, 4); - mv.visitInsn(ICONST_M1); - mv.visitJumpInsn(IF_ICMPLE, l27); - Label l32 = new Label(); - mv.visitLabel(l32); - mv.visitLineNumber(1073, l32); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/client/FMLClientHandler", "instance", "()Lcpw/mods/fml/client/FMLClientHandler;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/client/FMLClientHandler", "getWorldClient", "()L"+aWorldClient+";", false); - mv.visitVarInsn(ILOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldClient+"", "getEntityByID", "(I)L"+aEntity+";", false); - mv.visitVarInsn(ASTORE, 5); - Label l33 = new Label(); - mv.visitLabel(l33); - mv.visitLineNumber(1074, l33); - mv.visitVarInsn(ALOAD, 5); - mv.visitJumpInsn(IFNULL, l27); - Label l34 = new Label(); - mv.visitLabel(l34); - mv.visitLineNumber(1076, l34); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "dimension", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); - Label l35 = new Label(); - mv.visitJumpInsn(IF_ICMPEQ, l35); - Label l36 = new Label(); - mv.visitLabel(l36); - mv.visitLineNumber(1078, l36); - mv.visitVarInsn(ALOAD, 5); - mv.visitTypeInsn(INSTANCEOF, ""+aEntityPlayer+""); - mv.visitJumpInsn(IFEQ, l27); - Label l37 = new Label(); - mv.visitLabel(l37); - mv.visitLineNumber(1080, l37); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); - mv.visitFieldInsn(GETFIELD, aWorld, "difficultySetting", "L"+aDifficultyEnum+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aDifficultyEnum+"", "getDifficultyId", "()I", false); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, aWorld, "getWorldInfo", "()L"+aWorldInfo+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldInfo+"", "getTerrainType", "()L"+aWorldType+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, aWorldType, "getWorldTypeName", "()Ljava/lang/String;", false); - mv.visitVarInsn(ALOAD, 5); - mv.visitTypeInsn(CHECKCAST, ""+aEntityPlayerMP+""); - mv.visitFieldInsn(GETFIELD, ""+aEntityPlayerMP+"", "theItemInWorldManager", "L"+aItemInWorldManager+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemInWorldManager+"", "getGameType", "()L"+aGameType+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aGameType+"", "getID", "()I", false); - mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/WorldUtil", "forceRespawnClient", "(IILjava/lang/String;I)L"+aEntityPlayer+";", false); - mv.visitVarInsn(ASTORE, 5); - Label l38 = new Label(); - mv.visitLabel(l38); - mv.visitLineNumber(1081, l38); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); - Label l39 = new Label(); - mv.visitLabel(l39); - mv.visitLineNumber(1083, l39); - mv.visitJumpInsn(GOTO, l27); - mv.visitLabel(l35); - mv.visitLineNumber(1085, l35); - mv.visitFrame(F_APPEND,2, new Object[] {INTEGER, ""+aEntity+""}, 0, null); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); - Label l40 = new Label(); - mv.visitLabel(l40); - mv.visitLineNumber(1088, l40); - mv.visitJumpInsn(GOTO, l27); - mv.visitLabel(l30); - mv.visitLineNumber(1089, l30); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "riddenByEntity", "L"+aEntity+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "getEntityId", "()I", false); - mv.visitVarInsn(ILOAD, 4); - mv.visitJumpInsn(IF_ICMPEQ, l27); - Label l41 = new Label(); - mv.visitLabel(l41); - mv.visitLineNumber(1091, l41); - mv.visitVarInsn(ILOAD, 4); - mv.visitInsn(ICONST_M1); - Label l42 = new Label(); - mv.visitJumpInsn(IF_ICMPNE, l42); - Label l43 = new Label(); - mv.visitLabel(l43); - mv.visitLineNumber(1093, l43); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "riddenByEntity", "L"+aEntity+";"); - mv.visitInsn(ACONST_NULL); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); - Label l44 = new Label(); - mv.visitLabel(l44); - mv.visitLineNumber(1094, l44); - mv.visitJumpInsn(GOTO, l27); - mv.visitLabel(l42); - mv.visitLineNumber(1097, l42); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/client/FMLClientHandler", "instance", "()Lcpw/mods/fml/client/FMLClientHandler;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/client/FMLClientHandler", "getWorldClient", "()L"+aWorldClient+";", false); - mv.visitVarInsn(ILOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldClient+"", "getEntityByID", "(I)L"+aEntity+";", false); - mv.visitVarInsn(ASTORE, 5); - Label l45 = new Label(); - mv.visitLabel(l45); - mv.visitLineNumber(1098, l45); - mv.visitVarInsn(ALOAD, 5); - mv.visitJumpInsn(IFNULL, l27); - Label l46 = new Label(); - mv.visitLabel(l46); - mv.visitLineNumber(1100, l46); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "dimension", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); - Label l47 = new Label(); - mv.visitJumpInsn(IF_ICMPEQ, l47); - Label l48 = new Label(); - mv.visitLabel(l48); - mv.visitLineNumber(1102, l48); - mv.visitVarInsn(ALOAD, 5); - mv.visitTypeInsn(INSTANCEOF, ""+aEntityPlayer+""); - mv.visitJumpInsn(IFEQ, l27); - Label l49 = new Label(); - mv.visitLabel(l49); - mv.visitLineNumber(1104, l49); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); - mv.visitFieldInsn(GETFIELD, aWorld, "difficultySetting", "L"+aDifficultyEnum+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aDifficultyEnum+"", "getDifficultyId", "()I", false); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, aWorld, "getWorldInfo", "()L"+aWorldInfo+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldInfo+"", "getTerrainType", "()L"+aWorldType+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, aWorldType, "getWorldTypeName", "()Ljava/lang/String;", false); - mv.visitVarInsn(ALOAD, 5); - mv.visitTypeInsn(CHECKCAST, ""+aEntityPlayerMP+""); - mv.visitFieldInsn(GETFIELD, ""+aEntityPlayerMP+"", "theItemInWorldManager", "L"+aItemInWorldManager+";"); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemInWorldManager+"", "getGameType", "()L"+aGameType+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aGameType+"", "getID", "()I", false); - mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/WorldUtil", "forceRespawnClient", "(IILjava/lang/String;I)L"+aEntityPlayer+";", false); - mv.visitVarInsn(ASTORE, 5); - Label l50 = new Label(); - mv.visitLabel(l50); - mv.visitLineNumber(1105, l50); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); - Label l51 = new Label(); - mv.visitLabel(l51); - mv.visitLineNumber(1107, l51); - mv.visitJumpInsn(GOTO, l27); - mv.visitLabel(l47); - mv.visitLineNumber(1109, l47); - mv.visitFrame(F_APPEND,1, new Object[] {""+aEntity+""}, 0, null); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); - mv.visitLabel(l27); - mv.visitLineNumber(1114, l27); - mv.visitFrame(F_CHOP,2, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/network/ByteBufUtils", "readUTF8String", "(Lio/netty/buffer/ByteBuf;)Ljava/lang/String;", false); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusColour", "Ljava/lang/String;"); - Label l52 = new Label(); - mv.visitLabel(l52); - mv.visitLineNumber(1115, l52); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusColour", "Ljava/lang/String;"); - mv.visitLdcInsn(""); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l53 = new Label(); - mv.visitJumpInsn(IFEQ, l53); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ACONST_NULL); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusColour", "Ljava/lang/String;"); - mv.visitLabel(l53); - mv.visitLineNumber(1116, l53); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - Label l54 = new Label(); - mv.visitLabel(l54); - mv.visitLocalVariable("this", "Lmicdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket;", null, l0, l54, 0); - mv.visitLocalVariable("buffer", "Lio/netty/buffer/ByteBuf;", null, l0, l54, 1); - mv.visitLocalVariable("g", "Lnet/minecraftforge/fluids/FluidStack;", null, l2, l54, 2); - mv.visitLocalVariable("aBufferData", "I", null, l3, l54, 3); - mv.visitLocalVariable("s", "Lnet/minecraftforge/fluids/FluidStack;", null, l6, l4, 4); - mv.visitLocalVariable("shouldBeMountedId", "I", null, l29, l27, 4); - mv.visitLocalVariable("e", "L"+aEntity+";", null, l33, l40, 5); - mv.visitLocalVariable("e", "L"+aEntity+";", null, l45, l27, 5); - mv.visitMaxs(6, 6); - mv.visitEnd(); - - } - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Inspecting Class "+className); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("decodePacketdata")) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Removing method "+name); - return null; - } - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java deleted file mode 100644 index 13681e7e3a..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java +++ /dev/null @@ -1,242 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; - - -public class ClassTransformer_GC_FluidUtil { - - //The qualified name of the class we plan to transform. - private static final String className = "micdoodle8.mods.galacticraft.core.util.FluidUtil"; - //"micdoodle8/mods/galacticraft/core/util/FluidUtil - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public ClassTransformer_GC_FluidUtil(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - injectMethod("testFuel"); - injectMethod("fillWithGCFuel"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod(String aMethodName) { - MethodVisitor mv; - if (aMethodName.equals("testFuel")) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "testFuel", "(Ljava/lang/String;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(37, l0); - mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuelNames", "Ljava/util/HashSet;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashSet", "iterator", "()Ljava/util/Iterator;", false); - mv.visitVarInsn(ASTORE, 2); - Label l1 = new Label(); - mv.visitJumpInsn(GOTO, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitFrame(F_FULL, 3, new Object[] {"java/lang/String", TOP, "java/util/Iterator"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "java/lang/String"); - mv.visitVarInsn(ASTORE, 1); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(38, l3); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - mv.visitJumpInsn(IFEQ, l1); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(39, l4); - mv.visitInsn(ICONST_1); - mv.visitInsn(IRETURN); - mv.visitLabel(l1); - mv.visitLineNumber(37, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); - mv.visitJumpInsn(IFNE, l2); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(42, l5); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLocalVariable("name", "Ljava/lang/String;", null, l0, l6, 0); - mv.visitLocalVariable("aFuelname", "Ljava/lang/String;", null, l3, l1, 1); - mv.visitMaxs(2, 3); - mv.visitEnd(); - } - else if (aMethodName.equals("fillWithGCFuel")) { - mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "fillWithGCFuel", "(Lnet/minecraftforge/fluids/FluidTank;Lnet/minecraftforge/fluids/FluidStack;Z)I", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(46, l0); - mv.visitVarInsn(ALOAD, 1); - Label l1 = new Label(); - mv.visitJumpInsn(IFNULL, l1); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/fluids/FluidRegistry", "getFluidName", "(Lnet/minecraftforge/fluids/FluidStack;)Ljava/lang/String;", false); - mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/FluidUtil", "testFuel", "(Ljava/lang/String;)Z", false); - mv.visitJumpInsn(IFEQ, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(47, l2); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitVarInsn(ASTORE, 3); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(48, l3); - mv.visitVarInsn(ALOAD, 3); - Label l4 = new Label(); - mv.visitJumpInsn(IFNONNULL, l4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(49, l5); - mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuels", "Ljava/util/HashMap;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashMap", "values", "()Ljava/util/Collection;", false); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "iterator", "()Ljava/util/Iterator;", true); - mv.visitVarInsn(ASTORE, 5); - Label l6 = new Label(); - mv.visitJumpInsn(GOTO, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitFrame(F_FULL, 6, new Object[] {"net/minecraftforge/fluids/FluidTank", "net/minecraftforge/fluids/FluidStack", INTEGER, "net/minecraftforge/fluids/FluidStack", TOP, "java/util/Iterator"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "net/minecraftforge/fluids/Fluid"); - mv.visitVarInsn(ASTORE, 4); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(50, l8); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "getFluid", "()Lnet/minecraftforge/fluids/Fluid;", false); - mv.visitVarInsn(ALOAD, 4); - mv.visitJumpInsn(IF_ACMPNE, l6); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(51, l9); - mv.visitVarInsn(ALOAD, 0); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); - mv.visitInsn(IRETURN); - mv.visitLabel(l6); - mv.visitLineNumber(49, l6); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); - mv.visitJumpInsn(IFNE, l7); - mv.visitLabel(l4); - mv.visitLineNumber(55, l4); - mv.visitFrame(F_FULL, 4, new Object[] {"net/minecraftforge/fluids/FluidTank", "net/minecraftforge/fluids/FluidStack", INTEGER, "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 3); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); - mv.visitJumpInsn(IF_ICMPGE, l1); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(56, l10); - mv.visitVarInsn(ALOAD, 0); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 3); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); - mv.visitInsn(IRETURN); - mv.visitLabel(l1); - mv.visitLineNumber(59, l1); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLocalVariable("tank", "Lnet/minecraftforge/fluids/FluidTank;", null, l0, l11, 0); - mv.visitLocalVariable("liquid", "Lnet/minecraftforge/fluids/FluidStack;", null, l0, l11, 1); - mv.visitLocalVariable("doFill", "Z", null, l0, l11, 2); - mv.visitLocalVariable("liquidInTank", "Lnet/minecraftforge/fluids/FluidStack;", null, l3, l1, 3); - mv.visitLocalVariable("aFuelType", "Lnet/minecraftforge/fluids/Fluid;", null, l8, l6, 4); - mv.visitMaxs(5, 6); - mv.visitEnd(); - } - FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Method injection complete."); - - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("testFuel")) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Removing method "+name); - return null; - } - if (name.equals("fillWithGCFuel")) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Removing method "+name); - return null; - } - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java deleted file mode 100644 index 5ef5b75505..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java +++ /dev/null @@ -1,622 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - - -public class ClassTransformer_GC_FuelLoader { - - //The qualified name of the class we plan to transform. - private static final String className = "micdoodle8.mods.galacticraft.core.tile.TileEntityFuelLoader"; - //micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private final boolean isObfuscated; - - public ClassTransformer_GC_FuelLoader(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - isObfuscated = obfuscated; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - injectMethod(); - } - else { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Failed to Inject new code."); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod() { - String aWorld = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; - String aItemStack = isObfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; - String aTileEntity = isObfuscated ? DevHelper.getObfuscated("net/minecraft/tileentity/TileEntity") : "net/minecraft/tileentity/TileEntity"; - - if (isValidTransformer()) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Injecting updateEntity into "+className+"."); - MethodVisitor mv = getWriter().visitMethod(ACC_PUBLIC, "updateEntity", "()V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(60, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/core/energy/tile/TileBaseElectricBlockWithInventory", "updateEntity", "()V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(61, l1); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "worldObj", "L"+aWorld+";"); - mv.visitFieldInsn(GETFIELD, ""+aWorld+"", "isRemote", "Z"); - Label l2 = new Label(); - mv.visitJumpInsn(IFNE, l2); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(62, l3); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_0); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "loadedFuelLastTick", "Z"); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(63, l4); - mv.visitInsn(ACONST_NULL); - mv.visitVarInsn(ASTORE, 1); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(66, l5); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_1); - mv.visitInsn(AALOAD); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(67, l7); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_1); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/fluids/FluidContainerRegistry", "getFluidForFilledItem", "(L"+aItemStack+";)Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitVarInsn(ASTORE, 1); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(68, l8); - mv.visitVarInsn(ALOAD, 1); - mv.visitJumpInsn(IFNULL, l6); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(69, l9); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/fluids/FluidRegistry", "getFluidName", "(Lnet/minecraftforge/fluids/FluidStack;)Ljava/lang/String;", false); - mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/FluidUtil", "testFuel", "(Ljava/lang/String;)Z", false); - mv.visitVarInsn(ISTORE, 4); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(70, l10); - mv.visitVarInsn(ILOAD, 4); - mv.visitJumpInsn(IFEQ, l6); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - Label l11 = new Label(); - mv.visitJumpInsn(IFNULL, l11); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(71, l12); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitInsn(IADD); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); - mv.visitJumpInsn(IF_ICMPGT, l6); - mv.visitLabel(l11); - mv.visitLineNumber(73, l11); - mv.visitFrame(F_FULL, 5, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitVarInsn(ASTORE, 5); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(74, l13); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ISTORE, 6); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(75, l14); - mv.visitVarInsn(ALOAD, 5); - Label l15 = new Label(); - mv.visitJumpInsn(IFNONNULL, l15); - Label l16 = new Label(); - mv.visitLabel(l16); - mv.visitLineNumber(76, l16); - mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuels", "Ljava/util/HashMap;"); - Label l17 = new Label(); - mv.visitLabel(l17); - mv.visitLineNumber(77, l17); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashMap", "values", "()Ljava/util/Collection;", false); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "iterator", "()Ljava/util/Iterator;", true); - mv.visitVarInsn(ASTORE, 8); - Label l18 = new Label(); - mv.visitJumpInsn(GOTO, l18); - Label l19 = new Label(); - mv.visitLabel(l19); - mv.visitFrame(F_FULL, 9, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER, TOP, "java/util/Iterator"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 8); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "net/minecraftforge/fluids/Fluid"); - mv.visitVarInsn(ASTORE, 7); - Label l20 = new Label(); - mv.visitLabel(l20); - mv.visitLineNumber(78, l20); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "getFluid", "()Lnet/minecraftforge/fluids/Fluid;", false); - mv.visitVarInsn(ALOAD, 7); - mv.visitJumpInsn(IF_ACMPNE, l18); - Label l21 = new Label(); - mv.visitLabel(l21); - mv.visitLineNumber(79, l21); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 7); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); - Label l22 = new Label(); - mv.visitJumpInsn(IFLE, l22); - mv.visitInsn(ICONST_1); - Label l23 = new Label(); - mv.visitJumpInsn(GOTO, l23); - mv.visitLabel(l22); - mv.visitFrame(F_FULL, 9, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER, "net/minecraftforge/fluids/Fluid", "java/util/Iterator"}, 0, new Object[] {}); - mv.visitInsn(ICONST_0); - mv.visitLabel(l23); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {INTEGER}); - mv.visitVarInsn(ISTORE, 6); - mv.visitLabel(l18); - mv.visitLineNumber(76, l18); - mv.visitFrame(F_FULL, 9, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER, TOP, "java/util/Iterator"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 8); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); - mv.visitJumpInsn(IFNE, l19); - Label l24 = new Label(); - mv.visitLabel(l24); - mv.visitLineNumber(82, l24); - Label l25 = new Label(); - mv.visitJumpInsn(GOTO, l25); - mv.visitLabel(l15); - mv.visitLineNumber(84, l15); - mv.visitFrame(F_FULL, 7, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); - mv.visitJumpInsn(IF_ICMPGE, l25); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "isFluidEqual", "(Lnet/minecraftforge/fluids/FluidStack;)Z", false); - mv.visitJumpInsn(IFEQ, l25); - Label l26 = new Label(); - mv.visitLabel(l26); - mv.visitLineNumber(85, l26); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); - Label l27 = new Label(); - mv.visitJumpInsn(IFLE, l27); - mv.visitInsn(ICONST_1); - Label l28 = new Label(); - mv.visitJumpInsn(GOTO, l28); - mv.visitLabel(l27); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitLabel(l28); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {INTEGER}); - mv.visitVarInsn(ISTORE, 6); - mv.visitLabel(l25); - mv.visitLineNumber(88, l25); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ILOAD, 6); - mv.visitJumpInsn(IFEQ, l6); - Label l29 = new Label(); - mv.visitLabel(l29); - mv.visitLineNumber(89, l29); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_1); - mv.visitInsn(AALOAD); - mv.visitInsn(DUP); - mv.visitFieldInsn(GETFIELD, ""+aItemStack+"", "stackSize", "I"); - mv.visitInsn(ICONST_1); - mv.visitInsn(ISUB); - mv.visitFieldInsn(PUTFIELD, ""+aItemStack+"", "stackSize", "I"); - Label l30 = new Label(); - mv.visitLabel(l30); - mv.visitLineNumber(90, l30); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_1); - mv.visitInsn(AALOAD); - mv.visitFieldInsn(GETFIELD, ""+aItemStack+"", "stackSize", "I"); - mv.visitJumpInsn(IFNE, l6); - Label l31 = new Label(); - mv.visitLabel(l31); - mv.visitLineNumber(91, l31); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_1); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(AASTORE); - mv.visitLabel(l6); - mv.visitLineNumber(97, l6); - mv.visitFrame(F_FULL, 2, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "ticks", "I"); - mv.visitIntInsn(BIPUSH, 100); - mv.visitInsn(IREM); - Label l32 = new Label(); - mv.visitJumpInsn(IFNE, l32); - Label l33 = new Label(); - mv.visitLabel(l33); - mv.visitLineNumber(98, l33); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ACONST_NULL); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); - Label l34 = new Label(); - mv.visitLabel(l34); - mv.visitLineNumber(99, l34); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "VALID_DIRECTIONS", "[Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ASTORE, 4); - Label l35 = new Label(); - mv.visitLabel(l35); - mv.visitLineNumber(100, l35); - mv.visitVarInsn(ALOAD, 4); - mv.visitInsn(ARRAYLENGTH); - mv.visitVarInsn(ISTORE, 3); - Label l36 = new Label(); - mv.visitLabel(l36); - mv.visitLineNumber(102, l36); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ISTORE, 2); - Label l37 = new Label(); - mv.visitLabel(l37); - Label l38 = new Label(); - mv.visitJumpInsn(GOTO, l38); - Label l39 = new Label(); - mv.visitLabel(l39); - mv.visitLineNumber(103, l39); - mv.visitFrame(F_APPEND,3, new Object[] {INTEGER, INTEGER, "[Lnet/minecraftforge/common/util/ForgeDirection;"}, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ILOAD, 2); - mv.visitInsn(AALOAD); - mv.visitVarInsn(ASTORE, 5); - Label l40 = new Label(); - mv.visitLabel(l40); - mv.visitLineNumber(104, l40); - mv.visitTypeInsn(NEW, "micdoodle8/mods/galacticraft/api/vector/BlockVec3"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/api/vector/BlockVec3", "", "(L"+aTileEntity+";)V", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "worldObj", "L"+aWorld+";"); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/api/vector/BlockVec3", "getTileEntityOnSide", "(L"+aWorld+";Lnet/minecraftforge/common/util/ForgeDirection;)L"+aTileEntity+";", false); - mv.visitVarInsn(ASTORE, 6); - Label l41 = new Label(); - mv.visitLabel(l41); - mv.visitLineNumber(105, l41); - mv.visitVarInsn(ALOAD, 6); - mv.visitTypeInsn(INSTANCEOF, "micdoodle8/mods/galacticraft/core/tile/TileEntityMulti"); - Label l42 = new Label(); - mv.visitJumpInsn(IFEQ, l42); - Label l43 = new Label(); - mv.visitLabel(l43); - mv.visitLineNumber(106, l43); - mv.visitVarInsn(ALOAD, 6); - mv.visitTypeInsn(CHECKCAST, "micdoodle8/mods/galacticraft/core/tile/TileEntityMulti"); - mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/core/tile/TileEntityMulti", "getMainBlockTile", "()L"+aTileEntity+";", false); - mv.visitVarInsn(ASTORE, 7); - Label l44 = new Label(); - mv.visitLabel(l44); - mv.visitLineNumber(107, l44); - mv.visitVarInsn(ALOAD, 7); - mv.visitTypeInsn(INSTANCEOF, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); - Label l45 = new Label(); - mv.visitJumpInsn(IFEQ, l45); - Label l46 = new Label(); - mv.visitLabel(l46); - mv.visitLineNumber(108, l46); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 7); - mv.visitTypeInsn(CHECKCAST, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); - Label l47 = new Label(); - mv.visitLabel(l47); - mv.visitLineNumber(109, l47); - mv.visitJumpInsn(GOTO, l32); - mv.visitLabel(l42); - mv.visitLineNumber(111, l42); - mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraftforge/common/util/ForgeDirection", ""+aTileEntity+""}, 0, null); - mv.visitVarInsn(ALOAD, 6); - mv.visitTypeInsn(INSTANCEOF, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); - mv.visitJumpInsn(IFEQ, l45); - Label l48 = new Label(); - mv.visitLabel(l48); - mv.visitLineNumber(112, l48); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 6); - mv.visitTypeInsn(CHECKCAST, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); - Label l49 = new Label(); - mv.visitLabel(l49); - mv.visitLineNumber(113, l49); - mv.visitJumpInsn(GOTO, l32); - mv.visitLabel(l45); - mv.visitLineNumber(102, l45); - mv.visitFrame(F_CHOP,2, null, 0, null); - mv.visitIincInsn(2, 1); - mv.visitLabel(l38); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitJumpInsn(IF_ICMPLT, l39); - mv.visitLabel(l32); - mv.visitLineNumber(117, l32); - mv.visitFrame(F_CHOP,3, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitJumpInsn(IFNULL, l2); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitJumpInsn(IFNULL, l2); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitJumpInsn(IFLE, l2); - Label l50 = new Label(); - mv.visitLabel(l50); - mv.visitLineNumber(118, l50); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitVarInsn(ASTORE, 4); - Label l51 = new Label(); - mv.visitLabel(l51); - mv.visitLineNumber(119, l51); - mv.visitVarInsn(ALOAD, 4); - Label l52 = new Label(); - mv.visitJumpInsn(IFNONNULL, l52); - Label l53 = new Label(); - mv.visitLabel(l53); - mv.visitLineNumber(120, l53); - mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuels", "Ljava/util/HashMap;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashMap", "values", "()Ljava/util/Collection;", false); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "iterator", "()Ljava/util/Iterator;", true); - mv.visitVarInsn(ASTORE, 6); - Label l54 = new Label(); - mv.visitJumpInsn(GOTO, l54); - Label l55 = new Label(); - mv.visitLabel(l55); - mv.visitFrame(F_FULL, 7, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, "net/minecraftforge/fluids/FluidStack", TOP, "java/util/Iterator"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 6); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); - mv.visitTypeInsn(CHECKCAST, "net/minecraftforge/fluids/Fluid"); - mv.visitVarInsn(ASTORE, 5); - Label l56 = new Label(); - mv.visitLabel(l56); - mv.visitLineNumber(121, l56); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "getFluid", "()Lnet/minecraftforge/fluids/Fluid;", false); - mv.visitVarInsn(ALOAD, 5); - mv.visitJumpInsn(IF_ACMPNE, l54); - Label l57 = new Label(); - mv.visitLabel(l57); - mv.visitLineNumber(122, l57); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 5); - mv.visitInsn(ICONST_2); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); - mv.visitVarInsn(ASTORE, 1); - mv.visitLabel(l54); - mv.visitLineNumber(120, l54); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 6); - mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); - mv.visitJumpInsn(IFNE, l55); - mv.visitLabel(l52); - mv.visitLineNumber(126, l52); - mv.visitFrame(F_FULL, 5, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); - Label l58 = new Label(); - mv.visitJumpInsn(IF_ICMPGE, l58); - Label l59 = new Label(); - mv.visitLabel(l59); - mv.visitLineNumber(127, l59); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 4); - mv.visitInsn(ICONST_2); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); - mv.visitVarInsn(ASTORE, 1); - mv.visitLabel(l58); - mv.visitLineNumber(130, l58); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitJumpInsn(IFNULL, l2); - Label l60 = new Label(); - mv.visitLabel(l60); - mv.visitLineNumber(131, l60); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); - mv.visitJumpInsn(IFNULL, l2); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "hasEnoughEnergyToRun", "Z"); - mv.visitJumpInsn(IFEQ, l2); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "disabled", "Z"); - mv.visitJumpInsn(IFNE, l2); - Label l61 = new Label(); - mv.visitLabel(l61); - mv.visitLineNumber(132, l61); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/galacticraft/util/GalacticUtils", "getRocketTier", "(Ljava/lang/Object;)I", false); - mv.visitVarInsn(ISTORE, 5); - Label l62 = new Label(); - mv.visitLabel(l62); - mv.visitLineNumber(133, l62); - mv.visitVarInsn(ILOAD, 5); - mv.visitJumpInsn(IFLE, l2); - Label l63 = new Label(); - mv.visitLabel(l63); - mv.visitLineNumber(134, l63); - mv.visitVarInsn(ILOAD, 5); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/galacticraft/util/GalacticUtils", "isFuelValidForTier", "(ILnet/minecraftforge/fluids/FluidStack;)Z", false); - mv.visitJumpInsn(IFEQ, l2); - Label l64 = new Label(); - mv.visitLabel(l64); - mv.visitLineNumber(135, l64); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEINTERFACE, "micdoodle8/mods/galacticraft/api/entity/IFuelable", "addFuel", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", true); - mv.visitVarInsn(ISTORE, 3); - Label l65 = new Label(); - mv.visitLabel(l65); - mv.visitLineNumber(136, l65); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 3); - Label l66 = new Label(); - mv.visitJumpInsn(IFLE, l66); - mv.visitInsn(ICONST_1); - Label l67 = new Label(); - mv.visitJumpInsn(GOTO, l67); - mv.visitLabel(l66); - mv.visitFrame(F_FULL, 6, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER}, 1, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader"}); - mv.visitInsn(ICONST_0); - mv.visitLabel(l67); - mv.visitFrame(F_FULL, 6, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER}, 2, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", INTEGER}); - mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "loadedFuelLastTick", "Z"); - Label l68 = new Label(); - mv.visitLabel(l68); - mv.visitLineNumber(137, l68); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); - mv.visitVarInsn(ILOAD, 3); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "drain", "(IZ)Lnet/minecraftforge/fluids/FluidStack;", false); - mv.visitInsn(POP); - mv.visitLabel(l2); - mv.visitLineNumber(144, l2); - mv.visitFrame(F_FULL, 1, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader"}, 0, new Object[] {}); - mv.visitInsn(RETURN); - Label l69 = new Label(); - mv.visitLabel(l69); - mv.visitLocalVariable("this", "Lmicdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader;", null, l0, l69, 0); - mv.visitLocalVariable("liquid", "Lnet/minecraftforge/fluids/FluidStack;", null, l5, l2, 1); - mv.visitLocalVariable("amount", "I", null, l37, l32, 2); - mv.visitLocalVariable("filled", "I", null, l36, l32, 3); - mv.visitLocalVariable("filled", "I", null, l65, l2, 3); - mv.visitLocalVariable("isFuel", "Z", null, l10, l6, 4); - mv.visitLocalVariable("liquidInTank", "Lnet/minecraftforge/fluids/FluidStack;", null, l13, l6, 5); - mv.visitLocalVariable("didFill", "Z", null, l14, l6, 6); - mv.visitLocalVariable("aFuelType", "Lnet/minecraftforge/fluids/Fluid;", null, l20, l18, 7); - mv.visitLocalVariable("var8", "[Lnet/minecraftforge/common/util/ForgeDirection;", null, l35, l32, 4); - mv.visitLocalVariable("dir", "Lnet/minecraftforge/common/util/ForgeDirection;", null, l40, l45, 5); - mv.visitLocalVariable("pad", "L"+aTileEntity+";", null, l41, l45, 6); - mv.visitLocalVariable("mainTile", "L"+aTileEntity+";", null, l44, l42, 7); - mv.visitLocalVariable("liquidInTank", "Lnet/minecraftforge/fluids/FluidStack;", null, l51, l2, 4); - mv.visitLocalVariable("aFuelType", "Lnet/minecraftforge/fluids/Fluid;", null, l56, l54, 5); - mv.visitLocalVariable("aTier", "I", null, l62, l2, 5); - mv.visitMaxs(5, 9); - mv.visitEnd(); - } - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Inspecting Class "+className); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("updateEntity")) { - FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Removing method "+name); - return null; - } - - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java deleted file mode 100644 index 2b9729a8a3..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java +++ /dev/null @@ -1,1896 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import net.minecraftforge.common.MinecraftForge; - -public class ClassTransformer_GT_Achievements { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private static boolean mDidRemoveAssLineRecipeAdder = false; - - public ClassTransformer_GT_Achievements(byte[] basicClass) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - - aTempReader.accept(new MethodAdaptor(aTempWriter), 0); - - if (mDidRemoveAssLineRecipeAdder) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patching GT .09"); - injectMethod(aTempWriter); - patchOnItemPickup09(aTempWriter); - } - else { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patching GT .08"); - patchOnItemPickup08(aTempWriter); - } - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Valid? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "registerAssAchievement" + "."); - - /** - * Inject new, safer code - */ - - - /*mv = cw.visitMethod(ACC_PUBLIC, "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", null, null); - mv.visitCode(); - Label l0 = new Label(); - Label l1 = new Label(); - Label l2 = new Label(); - mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(291, l3); - mv.visitVarInsn(ALOAD, 1); - Label l4 = new Label(); - mv.visitJumpInsn(IFNONNULL, l4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(292, l5); - mv.visitLdcInsn("Someone tried to register an achievement for an invalid recipe. Please report this to Alkalus."); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/api/objects/Logger", "INFO", "(Ljava/lang/String;)V", false); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(293, l6); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l4); - mv.visitLineNumber(295, l4); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); - Label l7 = new Label(); - mv.visitJumpInsn(IFNONNULL, l7); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(296, l8); - mv.visitLdcInsn("Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/api/objects/Logger", "INFO", "(Ljava/lang/String;)V", false); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(297, l9); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l7); - mv.visitLineNumber(299, l7); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); - mv.visitVarInsn(ASTORE, 3); - mv.visitLabel(l0); - mv.visitLineNumber(301, l0); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitVarInsn(ASTORE, 2); - mv.visitLabel(l1); - mv.visitLineNumber(302, l1); - Label l10 = new Label(); - mv.visitJumpInsn(GOTO, l10); - mv.visitLabel(l2); - mv.visitLineNumber(303, l2); - mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/loaders/misc/GT_Achievements", "gregtech/api/util/GT_Recipe", TOP, "net/minecraft/item/ItemStack"}, 1, new Object[] {"java/lang/Throwable"}); - mv.visitVarInsn(ASTORE, 4); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(304, l11); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/ItemUtils", "getUnlocalizedItemName", "(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;", false); - mv.visitVarInsn(ASTORE, 2); - mv.visitLabel(l10); - mv.visitLineNumber(306, l10); - mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/loaders/misc/GT_Achievements", "gregtech/api/util/GT_Recipe", "java/lang/String", "net/minecraft/item/ItemStack"}, 0, new Object[] {}); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/loaders/misc/GT_Achievements", "achievementList", "Ljava/util/concurrent/ConcurrentHashMap;"); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/concurrent/ConcurrentHashMap", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false); - Label l12 = new Label(); - mv.visitJumpInsn(IFNONNULL, l12); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(307, l13); - mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - mv.visitInsn(ICONST_1); - mv.visitInsn(IADD); - mv.visitFieldInsn(PUTSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(308, l14); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitIntInsn(BIPUSH, 11); - mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - mv.visitInsn(ICONST_5); - mv.visitInsn(IREM); - mv.visitInsn(IADD); - mv.visitInsn(INEG); - mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - mv.visitInsn(ICONST_5); - mv.visitInsn(IDIV); - mv.visitIntInsn(BIPUSH, 8); - mv.visitInsn(ISUB); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); - mv.visitFieldInsn(GETSTATIC, "net/minecraft/stats/AchievementList", "openInventory", "Lnet/minecraft/stats/Achievement;"); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "registerAchievement", "(Ljava/lang/String;IILnet/minecraft/item/ItemStack;Lnet/minecraft/stats/Achievement;Z)Lnet/minecraft/stats/Achievement;", false); - mv.visitInsn(ARETURN); - mv.visitLabel(l12); - mv.visitLineNumber(310, l12); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l3, l15, 0); - mv.visitLocalVariable("recipe", "Lgregtech/api/util/GT_Recipe;", null, l3, l15, 1); - mv.visitLocalVariable("aSafeUnlocalName", "Ljava/lang/String;", null, l1, l2, 2); - mv.visitLocalVariable("aSafeUnlocalName", "Ljava/lang/String;", null, l10, l15, 2); - mv.visitLocalVariable("aStack", "Lnet/minecraft/item/ItemStack;", null, l0, l15, 3); - mv.visitLocalVariable("t", "Ljava/lang/Throwable;", null, l11, l10, 4); - mv.visitMaxs(7, 5); - mv.visitEnd();*/ - - //Lets just static call my replacement function - mv = cw.visitMethod(ACC_PUBLIC, "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(291, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/gregtech/loaders/misc/AssLineAchievements", "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l1, 0); - mv.visitLocalVariable("recipe", "Lgregtech/api/util/GT_Recipe;", null, l0, l1, 1); - mv.visitMaxs(1, 2); - mv.visitEnd(); - - didInject = true; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - - - public boolean patchOnItemPickup08(ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "onItemPickup" + "."); - - AnnotationVisitor av0; - mv = cw.visitMethod(ACC_PUBLIC, "onItemPickup", "(Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;)V", null, null); - av0 = mv.visitAnnotation("Lcpw/mods/fml/common/eventhandler/SubscribeEvent;", true); - av0.visitEnd(); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(418, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "entityPlayer", "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitVarInsn(ASTORE, 2); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(419, l1); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "item", "Lnet/minecraft/entity/item/EntityItem;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/item/EntityItem", "getEntityItem", "()Lnet/minecraft/item/ItemStack;", false); - mv.visitVarInsn(ASTORE, 3); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(420, l2); - mv.visitVarInsn(ALOAD, 2); - Label l3 = new Label(); - mv.visitJumpInsn(IFNULL, l3); - mv.visitVarInsn(ALOAD, 3); - Label l4 = new Label(); - mv.visitJumpInsn(IFNONNULL, l4); - mv.visitLabel(l3); - mv.visitLineNumber(421, l3); - mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraft/entity/player/EntityPlayer", "net/minecraft/item/ItemStack"}, 0, null); - mv.visitInsn(RETURN); - mv.visitLabel(l4); - mv.visitLineNumber(424, l4); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gregtech/api/util/GT_OreDictUnificator", "getItemData", "(Lnet/minecraft/item/ItemStack;)Lgregtech/api/objects/ItemData;", false); - mv.visitVarInsn(ASTORE, 4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(425, l5); - mv.visitVarInsn(ALOAD, 4); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(426, l7); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "dust", "Lgregtech/api/enums/OrePrefixes;"); - Label l8 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l8); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(427, l9); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Lutetium", "Lgregtech/api/enums/Materials;"); - Label l10 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l10); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(428, l11); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("newmetal"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l10); - mv.visitLineNumber(430, l10); - mv.visitFrame(F_APPEND,1, new Object[] {"gregtech/api/objects/ItemData"}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("cleandust"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(431, l12); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l8); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "ore", "Lgregtech/api/enums/OrePrefixes;"); - Label l13 = new Label(); - mv.visitJumpInsn(IF_ACMPEQ, l13); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreBlackgranite", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IF_ACMPEQ, l13); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreEndstone", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IF_ACMPEQ, l13); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(432, l14); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreNetherrack", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IF_ACMPEQ, l13); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreRedgranite", "Lgregtech/api/enums/OrePrefixes;"); - Label l15 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l15); - mv.visitLabel(l13); - mv.visitLineNumber(433, l13); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ISTORE, 5); - Label l16 = new Label(); - mv.visitLabel(l16); - Label l17 = new Label(); - mv.visitJumpInsn(GOTO, l17); - Label l18 = new Label(); - mv.visitLabel(l18); - mv.visitLineNumber(434, l18); - mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitVarInsn(ILOAD, 5); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/enums/Materials", "name", "()Ljava/lang/String;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l19 = new Label(); - mv.visitLabel(l19); - mv.visitLineNumber(435, l19); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitVarInsn(ILOAD, 5); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "AnyIron", "Lgregtech/api/enums/Materials;"); - Label l20 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l20); - Label l21 = new Label(); - mv.visitLabel(l21); - mv.visitLineNumber(436, l21); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("iron"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l20); - mv.visitLineNumber(433, l20); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitIincInsn(5, 1); - mv.visitLabel(l17); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ILOAD, 5); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "size", "()I", false); - mv.visitJumpInsn(IF_ICMPLT, l18); - Label l22 = new Label(); - mv.visitLabel(l22); - mv.visitLineNumber(439, l22); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l15); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushed", "Lgregtech/api/enums/OrePrefixes;"); - Label l23 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l23); - Label l24 = new Label(); - mv.visitLabel(l24); - mv.visitLineNumber(440, l24); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("crushed"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l25 = new Label(); - mv.visitLabel(l25); - mv.visitLineNumber(441, l25); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l23); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedPurified", "Lgregtech/api/enums/OrePrefixes;"); - Label l26 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l26); - Label l27 = new Label(); - mv.visitLabel(l27); - mv.visitLineNumber(442, l27); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("washing"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l28 = new Label(); - mv.visitLabel(l28); - mv.visitLineNumber(443, l28); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l26); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedCentrifuged", "Lgregtech/api/enums/OrePrefixes;"); - Label l29 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l29); - Label l30 = new Label(); - mv.visitLabel(l30); - mv.visitLineNumber(444, l30); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("spinit"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l31 = new Label(); - mv.visitLabel(l31); - mv.visitLineNumber(445, l31); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l29); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Steel", "Lgregtech/api/enums/Materials;"); - Label l32 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l32); - Label l33 = new Label(); - mv.visitLabel(l33); - mv.visitLineNumber(446, l33); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "ingot", "Lgregtech/api/enums/OrePrefixes;"); - Label l34 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l34); - mv.visitVarInsn(ALOAD, 3); - mv.visitFieldInsn(GETFIELD, "net/minecraft/item/ItemStack", "stackSize", "I"); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getMaxStackSize", "()I", false); - mv.visitJumpInsn(IF_ICMPNE, l34); - Label l35 = new Label(); - mv.visitLabel(l35); - mv.visitLineNumber(447, l35); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("steel"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l36 = new Label(); - mv.visitLabel(l36); - mv.visitLineNumber(448, l36); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l34); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "nugget", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IF_ACMPNE, l6); - mv.visitLdcInsn("Thaumcraft"); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/Loader", "isModLoaded", "(Ljava/lang/String;)Z", false); - mv.visitJumpInsn(IFEQ, l6); - Label l37 = new Label(); - mv.visitLabel(l37); - mv.visitLineNumber(449, l37); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/player/EntityPlayer", "getDisplayName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("GT_IRON_TO_STEEL"); - mv.visitMethodInsn(INVOKESTATIC, "thaumcraft/api/ThaumcraftApiHelper", "isResearchComplete", "(Ljava/lang/String;Ljava/lang/String;)Z", false); - mv.visitJumpInsn(IFEQ, l6); - Label l38 = new Label(); - mv.visitLabel(l38); - mv.visitLineNumber(450, l38); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("steel"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l39 = new Label(); - mv.visitLabel(l39); - mv.visitLineNumber(453, l39); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l32); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "circuit", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IF_ACMPNE, l6); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Advanced", "Lgregtech/api/enums/Materials;"); - mv.visitJumpInsn(IF_ACMPNE, l6); - Label l40 = new Label(); - mv.visitLabel(l40); - mv.visitLineNumber(454, l40); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("stepforward"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l6); - mv.visitLineNumber(457, l6); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem."); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "startsWith", "(Ljava/lang/String;)Z", false); - Label l41 = new Label(); - mv.visitJumpInsn(IFEQ, l41); - Label l42 = new Label(); - mv.visitLabel(l42); - mv.visitLineNumber(458, l42); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32500"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l43 = new Label(); - mv.visitJumpInsn(IFEQ, l43); - Label l44 = new Label(); - mv.visitLabel(l44); - mv.visitLineNumber(459, l44); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestlead"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l45 = new Label(); - mv.visitLabel(l45); - mv.visitLineNumber(460, l45); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l43); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32501"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l46 = new Label(); - mv.visitJumpInsn(IFEQ, l46); - Label l47 = new Label(); - mv.visitLabel(l47); - mv.visitLineNumber(461, l47); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestsilver"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l48 = new Label(); - mv.visitLabel(l48); - mv.visitLineNumber(462, l48); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l46); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32503"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l49 = new Label(); - mv.visitJumpInsn(IFEQ, l49); - Label l50 = new Label(); - mv.visitLabel(l50); - mv.visitLineNumber(463, l50); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestiron"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l51 = new Label(); - mv.visitLabel(l51); - mv.visitLineNumber(464, l51); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l49); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32504"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l52 = new Label(); - mv.visitJumpInsn(IFEQ, l52); - Label l53 = new Label(); - mv.visitLabel(l53); - mv.visitLineNumber(465, l53); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestgold"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l54 = new Label(); - mv.visitLabel(l54); - mv.visitLineNumber(466, l54); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l52); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32530"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l55 = new Label(); - mv.visitJumpInsn(IFEQ, l55); - Label l56 = new Label(); - mv.visitLabel(l56); - mv.visitLineNumber(467, l56); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestcopper"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l57 = new Label(); - mv.visitLabel(l57); - mv.visitLineNumber(468, l57); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l55); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32540"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l58 = new Label(); - mv.visitJumpInsn(IFEQ, l58); - Label l59 = new Label(); - mv.visitLabel(l59); - mv.visitLineNumber(469, l59); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havesttin"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l60 = new Label(); - mv.visitLabel(l60); - mv.visitLineNumber(470, l60); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l58); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32510"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l61 = new Label(); - mv.visitJumpInsn(IFEQ, l61); - Label l62 = new Label(); - mv.visitLabel(l62); - mv.visitLineNumber(471, l62); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestoil"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l63 = new Label(); - mv.visitLabel(l63); - mv.visitLineNumber(472, l63); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l61); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32511"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l64 = new Label(); - mv.visitJumpInsn(IFEQ, l64); - Label l65 = new Label(); - mv.visitLabel(l65); - mv.visitLineNumber(473, l65); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestemeralds"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l66 = new Label(); - mv.visitLabel(l66); - mv.visitLineNumber(474, l66); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l64); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32706"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l67 = new Label(); - mv.visitJumpInsn(IFEQ, l67); - Label l68 = new Label(); - mv.visitLabel(l68); - mv.visitLineNumber(475, l68); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("energyflow"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l69 = new Label(); - mv.visitLabel(l69); - mv.visitLineNumber(476, l69); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l67); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32702"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l70 = new Label(); - mv.visitJumpInsn(IFEQ, l70); - Label l71 = new Label(); - mv.visitLabel(l71); - mv.visitLineNumber(477, l71); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("bettercircuits"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l72 = new Label(); - mv.visitLabel(l72); - mv.visitLineNumber(478, l72); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l70); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32707"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l73 = new Label(); - mv.visitJumpInsn(IFEQ, l73); - Label l74 = new Label(); - mv.visitLabel(l74); - mv.visitLineNumber(479, l74); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("datasaving"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l75 = new Label(); - mv.visitLabel(l75); - mv.visitLineNumber(480, l75); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l73); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32597"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l76 = new Label(); - mv.visitJumpInsn(IFEQ, l76); - Label l77 = new Label(); - mv.visitLabel(l77); - mv.visitLineNumber(481, l77); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("orbs"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l78 = new Label(); - mv.visitLabel(l78); - mv.visitLineNumber(482, l78); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l76); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32599"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l79 = new Label(); - mv.visitJumpInsn(IFEQ, l79); - Label l80 = new Label(); - mv.visitLabel(l80); - mv.visitLineNumber(483, l80); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("thatspower"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l81 = new Label(); - mv.visitLabel(l81); - mv.visitLineNumber(484, l81); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l79); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32598"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l82 = new Label(); - mv.visitJumpInsn(IFEQ, l82); - Label l83 = new Label(); - mv.visitLabel(l83); - mv.visitLineNumber(485, l83); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("luck"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l84 = new Label(); - mv.visitLabel(l84); - mv.visitLineNumber(486, l84); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l82); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32749"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l85 = new Label(); - mv.visitJumpInsn(IFEQ, l85); - Label l86 = new Label(); - mv.visitLabel(l86); - mv.visitLineNumber(487, l86); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("closeit"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l87 = new Label(); - mv.visitLabel(l87); - mv.visitLineNumber(488, l87); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l85); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32730"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l88 = new Label(); - mv.visitJumpInsn(IFEQ, l88); - Label l89 = new Label(); - mv.visitLabel(l89); - mv.visitLineNumber(489, l89); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("manipulation"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l90 = new Label(); - mv.visitLabel(l90); - mv.visitLineNumber(490, l90); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l88); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32729"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l91 = new Label(); - mv.visitJumpInsn(IFEQ, l91); - Label l92 = new Label(); - mv.visitLabel(l92); - mv.visitLineNumber(491, l92); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("filterregulate"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l93 = new Label(); - mv.visitLabel(l93); - mv.visitLineNumber(492, l93); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l91); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32605"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l94 = new Label(); - mv.visitJumpInsn(IFEQ, l94); - Label l95 = new Label(); - mv.visitLabel(l95); - mv.visitLineNumber(493, l95); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("whatnow"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l96 = new Label(); - mv.visitLabel(l96); - mv.visitLineNumber(494, l96); - mv.visitJumpInsn(GOTO, l41); - mv.visitLabel(l94); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.Thoriumcell"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - mv.visitJumpInsn(IFEQ, l41); - Label l97 = new Label(); - mv.visitLabel(l97); - mv.visitLineNumber(495, l97); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("newfuel"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l41); - mv.visitLineNumber(498, l41); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - Label l98 = new Label(); - mv.visitLabel(l98); - mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l98, 0); - mv.visitLocalVariable("event", "Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;", null, l0, l98, 1); - mv.visitLocalVariable("player", "Lnet/minecraft/entity/player/EntityPlayer;", null, l1, l98, 2); - mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l2, l98, 3); - mv.visitLocalVariable("data", "Lgregtech/api/objects/ItemData;", null, l5, l98, 4); - mv.visitLocalVariable("i", "I", null, l16, l22, 5); - mv.visitMaxs(4, 6); - mv.visitEnd(); - - - didInject = true; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - - public boolean patchOnItemPickup09(ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "onItemPickup" + "."); - - /** - * Inject new, safer code - */ - AnnotationVisitor av0; - mv = cw.visitMethod(ACC_PUBLIC, "onItemPickup", "(Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;)V", null, null); - av0 = mv.visitAnnotation("Lcpw/mods/fml/common/eventhandler/SubscribeEvent;", true); - av0.visitEnd(); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(546, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "entityPlayer", "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitVarInsn(ASTORE, 2); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(547, l1); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "item", "Lnet/minecraft/entity/item/EntityItem;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/item/EntityItem", "getEntityItem", "()Lnet/minecraft/item/ItemStack;", false); - mv.visitVarInsn(ASTORE, 3); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(548, l2); - mv.visitVarInsn(ALOAD, 2); - Label l3 = new Label(); - mv.visitJumpInsn(IFNULL, l3); - mv.visitVarInsn(ALOAD, 3); - Label l4 = new Label(); - mv.visitJumpInsn(IFNONNULL, l4); - mv.visitLabel(l3); - mv.visitLineNumber(549, l3); - mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraft/entity/player/EntityPlayer", "net/minecraft/item/ItemStack"}, 0, null); - mv.visitInsn(RETURN); - mv.visitLabel(l4); - mv.visitLineNumber(551, l4); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gregtech/api/util/GT_OreDictUnificator", "getItemData", "(Lnet/minecraft/item/ItemStack;)Lgregtech/api/objects/ItemData;", false); - mv.visitVarInsn(ASTORE, 4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(552, l5); - mv.visitVarInsn(ALOAD, 4); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IFNULL, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(553, l7); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "dust", "Lgregtech/api/enums/OrePrefixes;"); - Label l8 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l8); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(554, l9); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Lutetium", "Lgregtech/api/enums/Materials;"); - Label l10 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l10); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(555, l11); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("newmetal"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l10); - mv.visitLineNumber(557, l10); - mv.visitFrame(F_APPEND,1, new Object[] {"gregtech/api/objects/ItemData"}, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Gunpowder", "Lgregtech/api/enums/Materials;"); - mv.visitJumpInsn(IF_ACMPEQ, l6); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(558, l12); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("cleandust"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(560, l13); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l8); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/enums/OrePrefixes", "name", "()Ljava/lang/String;", false); - mv.visitLdcInsn("ore"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "startsWith", "(Ljava/lang/String;)Z", false); - Label l14 = new Label(); - mv.visitJumpInsn(IFEQ, l14); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(561, l15); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "size", "()I", false); - mv.visitVarInsn(ISTORE, 5); - Label l16 = new Label(); - mv.visitLabel(l16); - mv.visitLineNumber(562, l16); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ISTORE, 6); - Label l17 = new Label(); - mv.visitLabel(l17); - Label l18 = new Label(); - mv.visitJumpInsn(GOTO, l18); - Label l19 = new Label(); - mv.visitLabel(l19); - mv.visitLineNumber(563, l19); - mv.visitFrame(F_APPEND,2, new Object[] {INTEGER, INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitVarInsn(ILOAD, 6); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/enums/Materials", "mName", "Ljava/lang/String;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l20 = new Label(); - mv.visitLabel(l20); - mv.visitLineNumber(564, l20); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitVarInsn(ILOAD, 6); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Iron", "Lgregtech/api/enums/Materials;"); - Label l21 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l21); - Label l22 = new Label(); - mv.visitLabel(l22); - mv.visitLineNumber(565, l22); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("iron"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l21); - mv.visitLineNumber(567, l21); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitVarInsn(ILOAD, 6); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Copper", "Lgregtech/api/enums/Materials;"); - Label l23 = new Label(); - mv.visitJumpInsn(IF_ACMPEQ, l23); - mv.visitVarInsn(ALOAD, 4); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); - mv.visitVarInsn(ILOAD, 6); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Tin", "Lgregtech/api/enums/Materials;"); - Label l24 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l24); - mv.visitLabel(l23); - mv.visitLineNumber(568, l23); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "entityPlayer", "Lnet/minecraft/entity/player/EntityPlayer;"); - mv.visitLdcInsn("mineOre"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l24); - mv.visitLineNumber(562, l24); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitIincInsn(6, 1); - mv.visitLabel(l18); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ILOAD, 6); - mv.visitVarInsn(ILOAD, 5); - mv.visitJumpInsn(IF_ICMPLT, l19); - Label l25 = new Label(); - mv.visitLabel(l25); - mv.visitLineNumber(572, l25); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l14); - mv.visitFrame(F_CHOP,2, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushed", "Lgregtech/api/enums/OrePrefixes;"); - Label l26 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l26); - Label l27 = new Label(); - mv.visitLabel(l27); - mv.visitLineNumber(573, l27); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("crushed"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l28 = new Label(); - mv.visitLabel(l28); - mv.visitLineNumber(574, l28); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l26); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedPurified", "Lgregtech/api/enums/OrePrefixes;"); - Label l29 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l29); - Label l30 = new Label(); - mv.visitLabel(l30); - mv.visitLineNumber(575, l30); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("washing"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l31 = new Label(); - mv.visitLabel(l31); - mv.visitLineNumber(576, l31); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l29); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedCentrifuged", "Lgregtech/api/enums/OrePrefixes;"); - Label l32 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l32); - Label l33 = new Label(); - mv.visitLabel(l33); - mv.visitLineNumber(577, l33); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("spinit"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l34 = new Label(); - mv.visitLabel(l34); - mv.visitLineNumber(578, l34); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l32); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Steel", "Lgregtech/api/enums/Materials;"); - mv.visitJumpInsn(IF_ACMPNE, l6); - Label l35 = new Label(); - mv.visitLabel(l35); - mv.visitLineNumber(579, l35); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "ingot", "Lgregtech/api/enums/OrePrefixes;"); - Label l36 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l36); - mv.visitVarInsn(ALOAD, 3); - mv.visitFieldInsn(GETFIELD, "net/minecraft/item/ItemStack", "stackSize", "I"); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getMaxStackSize", "()I", false); - mv.visitJumpInsn(IF_ICMPNE, l36); - Label l37 = new Label(); - mv.visitLabel(l37); - mv.visitLineNumber(580, l37); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("steel"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l38 = new Label(); - mv.visitLabel(l38); - mv.visitLineNumber(581, l38); - mv.visitJumpInsn(GOTO, l6); - mv.visitLabel(l36); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "nugget", "Lgregtech/api/enums/OrePrefixes;"); - mv.visitJumpInsn(IF_ACMPNE, l6); - mv.visitLdcInsn("Thaumcraft"); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/Loader", "isModLoaded", "(Ljava/lang/String;)Z", false); - mv.visitJumpInsn(IFEQ, l6); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/player/EntityPlayer", "getDisplayName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("GT_IRON_TO_STEEL"); - mv.visitMethodInsn(INVOKESTATIC, "thaumcraft/api/ThaumcraftApiHelper", "isResearchComplete", "(Ljava/lang/String;Ljava/lang/String;)Z", false); - mv.visitJumpInsn(IFEQ, l6); - Label l39 = new Label(); - mv.visitLabel(l39); - mv.visitLineNumber(582, l39); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("steel"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l6); - mv.visitLineNumber(589, l6); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem."); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "startsWith", "(Ljava/lang/String;)Z", false); - Label l40 = new Label(); - mv.visitJumpInsn(IFEQ, l40); - Label l41 = new Label(); - mv.visitLabel(l41); - mv.visitLineNumber(590, l41); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32500"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l42 = new Label(); - mv.visitJumpInsn(IFEQ, l42); - Label l43 = new Label(); - mv.visitLabel(l43); - mv.visitLineNumber(591, l43); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestlead"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l44 = new Label(); - mv.visitLabel(l44); - mv.visitLineNumber(592, l44); - Label l45 = new Label(); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l42); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32501"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l46 = new Label(); - mv.visitJumpInsn(IFEQ, l46); - Label l47 = new Label(); - mv.visitLabel(l47); - mv.visitLineNumber(593, l47); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestsilver"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l48 = new Label(); - mv.visitLabel(l48); - mv.visitLineNumber(594, l48); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l46); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32503"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l49 = new Label(); - mv.visitJumpInsn(IFEQ, l49); - Label l50 = new Label(); - mv.visitLabel(l50); - mv.visitLineNumber(595, l50); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestiron"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l51 = new Label(); - mv.visitLabel(l51); - mv.visitLineNumber(596, l51); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l49); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32504"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l52 = new Label(); - mv.visitJumpInsn(IFEQ, l52); - Label l53 = new Label(); - mv.visitLabel(l53); - mv.visitLineNumber(597, l53); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestgold"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l54 = new Label(); - mv.visitLabel(l54); - mv.visitLineNumber(598, l54); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l52); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32530"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l55 = new Label(); - mv.visitJumpInsn(IFEQ, l55); - Label l56 = new Label(); - mv.visitLabel(l56); - mv.visitLineNumber(599, l56); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestcopper"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l57 = new Label(); - mv.visitLabel(l57); - mv.visitLineNumber(600, l57); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l55); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32540"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l58 = new Label(); - mv.visitJumpInsn(IFEQ, l58); - Label l59 = new Label(); - mv.visitLabel(l59); - mv.visitLineNumber(601, l59); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havesttin"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l60 = new Label(); - mv.visitLabel(l60); - mv.visitLineNumber(602, l60); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l58); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32510"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l61 = new Label(); - mv.visitJumpInsn(IFEQ, l61); - Label l62 = new Label(); - mv.visitLabel(l62); - mv.visitLineNumber(603, l62); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestoil"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l63 = new Label(); - mv.visitLabel(l63); - mv.visitLineNumber(604, l63); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l61); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.02.32511"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l64 = new Label(); - mv.visitJumpInsn(IFEQ, l64); - Label l65 = new Label(); - mv.visitLabel(l65); - mv.visitLineNumber(605, l65); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("havestemeralds"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l66 = new Label(); - mv.visitLabel(l66); - mv.visitLineNumber(606, l66); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l64); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32082"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l67 = new Label(); - mv.visitJumpInsn(IFEQ, l67); - Label l68 = new Label(); - mv.visitLabel(l68); - mv.visitLineNumber(607, l68); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("energyflow"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l69 = new Label(); - mv.visitLabel(l69); - mv.visitLineNumber(608, l69); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l67); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32702"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l70 = new Label(); - mv.visitJumpInsn(IFEQ, l70); - Label l71 = new Label(); - mv.visitLabel(l71); - mv.visitLineNumber(609, l71); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("bettercircuits"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l72 = new Label(); - mv.visitLabel(l72); - mv.visitLineNumber(610, l72); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l70); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32707"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l73 = new Label(); - mv.visitJumpInsn(IFEQ, l73); - Label l74 = new Label(); - mv.visitLabel(l74); - mv.visitLineNumber(611, l74); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("datasaving"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l75 = new Label(); - mv.visitLabel(l75); - mv.visitLineNumber(612, l75); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l73); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32597"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l76 = new Label(); - mv.visitJumpInsn(IFEQ, l76); - Label l77 = new Label(); - mv.visitLabel(l77); - mv.visitLineNumber(613, l77); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("orbs"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l78 = new Label(); - mv.visitLabel(l78); - mv.visitLineNumber(614, l78); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l76); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32599"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l79 = new Label(); - mv.visitJumpInsn(IFEQ, l79); - Label l80 = new Label(); - mv.visitLabel(l80); - mv.visitLineNumber(615, l80); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("thatspower"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l81 = new Label(); - mv.visitLabel(l81); - mv.visitLineNumber(616, l81); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l79); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32598"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l82 = new Label(); - mv.visitJumpInsn(IFEQ, l82); - Label l83 = new Label(); - mv.visitLabel(l83); - mv.visitLineNumber(617, l83); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("luck"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l84 = new Label(); - mv.visitLabel(l84); - mv.visitLineNumber(618, l84); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l82); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32749"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l85 = new Label(); - mv.visitJumpInsn(IFEQ, l85); - Label l86 = new Label(); - mv.visitLabel(l86); - mv.visitLineNumber(619, l86); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("closeit"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l87 = new Label(); - mv.visitLabel(l87); - mv.visitLineNumber(620, l87); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l85); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32730"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l88 = new Label(); - mv.visitJumpInsn(IFEQ, l88); - Label l89 = new Label(); - mv.visitLabel(l89); - mv.visitLineNumber(621, l89); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("manipulation"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l90 = new Label(); - mv.visitLabel(l90); - mv.visitLineNumber(622, l90); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l88); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32729"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l91 = new Label(); - mv.visitJumpInsn(IFEQ, l91); - Label l92 = new Label(); - mv.visitLabel(l92); - mv.visitLineNumber(623, l92); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("filterregulate"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l93 = new Label(); - mv.visitLabel(l93); - mv.visitLineNumber(624, l93); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l91); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32605"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l94 = new Label(); - mv.visitJumpInsn(IFEQ, l94); - Label l95 = new Label(); - mv.visitLabel(l95); - mv.visitLineNumber(625, l95); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("whatnow"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l96 = new Label(); - mv.visitLabel(l96); - mv.visitLineNumber(626, l96); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l94); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32736"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l97 = new Label(); - mv.visitJumpInsn(IFEQ, l97); - Label l98 = new Label(); - mv.visitLabel(l98); - mv.visitLineNumber(627, l98); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("zpmage"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l99 = new Label(); - mv.visitLabel(l99); - mv.visitLineNumber(628, l99); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l97); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32737"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l100 = new Label(); - mv.visitJumpInsn(IFEQ, l100); - Label l101 = new Label(); - mv.visitLabel(l101); - mv.visitLineNumber(629, l101); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("uvage"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l102 = new Label(); - mv.visitLabel(l102); - mv.visitLineNumber(630, l102); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l100); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32030"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l103 = new Label(); - mv.visitJumpInsn(IFEQ, l103); - Label l104 = new Label(); - mv.visitLabel(l104); - mv.visitLineNumber(631, l104); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtmonosilicon"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l105 = new Label(); - mv.visitLabel(l105); - mv.visitLineNumber(632, l105); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l103); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32036"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l106 = new Label(); - mv.visitJumpInsn(IFEQ, l106); - Label l107 = new Label(); - mv.visitLabel(l107); - mv.visitLineNumber(633, l107); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtlogicwafer"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l108 = new Label(); - mv.visitLabel(l108); - mv.visitLineNumber(634, l108); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l106); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32701"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l109 = new Label(); - mv.visitJumpInsn(IFEQ, l109); - Label l110 = new Label(); - mv.visitLabel(l110); - mv.visitLineNumber(635, l110); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtlogiccircuit"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l111 = new Label(); - mv.visitLabel(l111); - mv.visitLineNumber(636, l111); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l109); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32085"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l112 = new Label(); - mv.visitJumpInsn(IFEQ, l112); - Label l113 = new Label(); - mv.visitLabel(l113); - mv.visitLineNumber(637, l113); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtquantumprocessor"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l114 = new Label(); - mv.visitLabel(l114); - mv.visitLineNumber(638, l114); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l112); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32089"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l115 = new Label(); - mv.visitJumpInsn(IFEQ, l115); - Label l116 = new Label(); - mv.visitLabel(l116); - mv.visitLineNumber(639, l116); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtcrystalprocessor"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l117 = new Label(); - mv.visitLabel(l117); - mv.visitLineNumber(640, l117); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l115); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32092"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l118 = new Label(); - mv.visitJumpInsn(IFEQ, l118); - Label l119 = new Label(); - mv.visitLabel(l119); - mv.visitLineNumber(641, l119); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtwetware"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l120 = new Label(); - mv.visitLabel(l120); - mv.visitLineNumber(642, l120); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l118); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.03.32095"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l121 = new Label(); - mv.visitJumpInsn(IFEQ, l121); - Label l122 = new Label(); - mv.visitLabel(l122); - mv.visitLineNumber(643, l122); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("gtwetmain"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l123 = new Label(); - mv.visitLabel(l123); - mv.visitLineNumber(644, l123); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l121); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32736"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l124 = new Label(); - mv.visitJumpInsn(IFEQ, l124); - Label l125 = new Label(); - mv.visitLabel(l125); - mv.visitLineNumber(645, l125); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("zpmage"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l126 = new Label(); - mv.visitLabel(l126); - mv.visitLineNumber(646, l126); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l124); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.metaitem.01.32737"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - mv.visitJumpInsn(IFEQ, l45); - Label l127 = new Label(); - mv.visitLabel(l127); - mv.visitLineNumber(647, l127); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("uvage"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l128 = new Label(); - mv.visitLabel(l128); - mv.visitLineNumber(649, l128); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l40); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("gt.Thoriumcell"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - Label l129 = new Label(); - mv.visitJumpInsn(IFEQ, l129); - Label l130 = new Label(); - mv.visitLabel(l130); - mv.visitLineNumber(650, l130); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("newfuel"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l131 = new Label(); - mv.visitLabel(l131); - mv.visitLineNumber(651, l131); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l129); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumBodyarmor", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - Label l132 = new Label(); - mv.visitJumpInsn(IF_ACMPEQ, l132); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumBoots", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - mv.visitJumpInsn(IF_ACMPEQ, l132); - Label l133 = new Label(); - mv.visitLabel(l133); - mv.visitLineNumber(652, l133); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumHelmet", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - mv.visitJumpInsn(IF_ACMPEQ, l132); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumLeggings", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); - Label l134 = new Label(); - mv.visitJumpInsn(IF_ACMPNE, l134); - mv.visitLabel(l132); - mv.visitLineNumber(653, l132); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("buildQArmor"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - Label l135 = new Label(); - mv.visitLabel(l135); - mv.visitLineNumber(654, l135); - mv.visitJumpInsn(GOTO, l45); - mv.visitLabel(l134); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); - mv.visitLdcInsn("ic2.itemPartCircuitAdv"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); - mv.visitJumpInsn(IFEQ, l45); - Label l136 = new Label(); - mv.visitLabel(l136); - mv.visitLineNumber(655, l136); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitLdcInsn("stepforward"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); - mv.visitLabel(l45); - mv.visitLineNumber(657, l45); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - Label l137 = new Label(); - mv.visitLabel(l137); - mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l137, 0); - mv.visitLocalVariable("event", "Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;", null, l0, l137, 1); - mv.visitLocalVariable("player", "Lnet/minecraft/entity/player/EntityPlayer;", null, l1, l137, 2); - mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l2, l137, 3); - mv.visitLocalVariable("data", "Lgregtech/api/objects/ItemData;", null, l5, l137, 4); - mv.visitLocalVariable("data_getAllMaterialStacks_sS", "I", null, l16, l25, 5); - mv.visitLocalVariable("i", "I", null, l17, l25, 6); - mv.visitMaxs(4, 7); - mv.visitEnd(); - - didInject = true; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - - - - - - - - public class MethodAdaptor extends ClassVisitor { - - public MethodAdaptor(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (name.equals("registerAssAchievement") || name.equals("onItemPickup")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, - "Found method " + name + ", removing."); - methodVisitor = null; - if (name.equals("registerAssAchievement")) { - mDidRemoveAssLineRecipeAdder = true; - } - } else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java deleted file mode 100644 index fb297ed76e..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java +++ /dev/null @@ -1,218 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - -public class ClassTransformer_GT_Achievements_CrashFix { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private final boolean mObfuscated; - private static boolean mDidRemoveAssLineRecipeAdder = false; - - public ClassTransformer_GT_Achievements_CrashFix(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - mObfuscated = obfuscated; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - - aTempReader.accept(new MethodAdaptor(aTempWriter), 0); - - if (mDidRemoveAssLineRecipeAdder) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patching GT .09"); - injectMethod(aTempWriter); - } - else { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patch not required, skipping."); - } - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Valid? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "registerAssAchievement" + ". Obfuscated? "+mObfuscated); - - /** - * Inject new, safer code - */ - - mv = cw.visitMethod(ACC_PUBLIC, "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(293, l0); - mv.visitVarInsn(ALOAD, 1); - Label l1 = new Label(); - mv.visitJumpInsn(IFNONNULL, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(294, l2); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitLdcInsn("GTPP_MOD: Someone tried to register an achievement for an invalid recipe. Please report this to Alkalus."); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(295, l3); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l1); - mv.visitLineNumber(297, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); - Label l4 = new Label(); - mv.visitJumpInsn(IFNONNULL, l4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(298, l5); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitLdcInsn("GTPP_MOD: Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(299, l6); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l4); - mv.visitLineNumber(301, l4); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); - mv.visitVarInsn(ASTORE, 3); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(302, l7); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/ItemUtils", "getUnlocalizedItemName", "(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;", false); - mv.visitVarInsn(ASTORE, 2); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(304, l8); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/loaders/misc/GT_Achievements", "achievementList", "Ljava/util/concurrent/ConcurrentHashMap;"); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/concurrent/ConcurrentHashMap", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false); - Label l9 = new Label(); - mv.visitJumpInsn(IFNONNULL, l9); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(305, l10); - mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - mv.visitInsn(ICONST_1); - mv.visitInsn(IADD); - mv.visitFieldInsn(PUTSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(306, l11); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 2); - mv.visitIntInsn(BIPUSH, 11); - mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - mv.visitInsn(ICONST_5); - mv.visitInsn(IREM); - mv.visitInsn(IADD); - mv.visitInsn(INEG); - mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); - mv.visitInsn(ICONST_5); - mv.visitInsn(IDIV); - mv.visitIntInsn(BIPUSH, 8); - mv.visitInsn(ISUB); - mv.visitVarInsn(ALOAD, 1); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); - mv.visitLdcInsn("NO_REQUIREMENT"); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "registerAchievement", "(Ljava/lang/String;IILnet/minecraft/item/ItemStack;Ljava/lang/String;Z)Lnet/minecraft/stats/Achievement;", false); - mv.visitVarInsn(ASTORE, 4); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(307, l12); - Label l13 = new Label(); - mv.visitJumpInsn(GOTO, l13); - mv.visitLabel(l9); - mv.visitLineNumber(309, l9); - mv.visitFrame(F_APPEND,2, new Object[] {"java/lang/String", "net/minecraft/item/ItemStack"}, 0, null); - mv.visitInsn(ACONST_NULL); - mv.visitVarInsn(ASTORE, 4); - mv.visitLabel(l13); - mv.visitLineNumber(311, l13); - mv.visitFrame(F_APPEND,1, new Object[] {"net/minecraft/stats/Achievement"}, 0, null); - mv.visitVarInsn(ALOAD, 4); - mv.visitInsn(ARETURN); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l14, 0); - mv.visitLocalVariable("recipe", "Lgregtech/api/util/GT_Recipe;", null, l0, l14, 1); - mv.visitLocalVariable("aSafeUnlocalName", "Ljava/lang/String;", null, l8, l14, 2); - mv.visitLocalVariable("aStack", "Lnet/minecraft/item/ItemStack;", null, l7, l14, 3); - mv.visitLocalVariable("aYouDidSomethingInGT", "Lnet/minecraft/stats/Achievement;", null, l12, l9, 4); - mv.visitLocalVariable("aYouDidSomethingInGT", "Lnet/minecraft/stats/Achievement;", null, l13, l14, 4); - mv.visitMaxs(7, 5); - mv.visitEnd(); - - didInject = true; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - - - public class MethodAdaptor extends ClassVisitor { - - public MethodAdaptor(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (name.equals("registerAssAchievement")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Found method " + name + ", removing."); - methodVisitor = null; - mDidRemoveAssLineRecipeAdder = true; - } else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java deleted file mode 100644 index da5859eb55..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java +++ /dev/null @@ -1,158 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; - -public class ClassTransformer_GT_BaseMetaTileEntity { - - //The qualified name of the class we plan to transform. - //gregtech/common/blocks/GT_Block_Machines - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - - public ClassTransformer_GT_BaseMetaTileEntity(byte[] basicClass) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Attempting to make setMetaTileEntity(IMetaTileEntity) safer."); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Valid patch? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - - - if (reader != null && writer != null) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Attempting Method Injection."); - injectMethod("setMetaTileEntity"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Injecting "+aMethodName+"."); - if (aMethodName.equals("setMetaTileEntity")) { - - mv = getWriter().visitMethod(ACC_PUBLIC, "setMetaTileEntity", "(Lgregtech/api/interfaces/metatileentity/IMetaTileEntity;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - Label l1 = new Label(); - Label l2 = new Label(); - mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); - mv.visitLabel(l0); - mv.visitLineNumber(1568, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/metatileentity/MetaTileEntity"); - mv.visitFieldInsn(PUTFIELD, "gregtech/api/metatileentity/BaseMetaTileEntity", "mMetaTileEntity", "Lgregtech/api/metatileentity/MetaTileEntity;"); - mv.visitLabel(l1); - mv.visitLineNumber(1569, l1); - Label l3 = new Label(); - mv.visitJumpInsn(GOTO, l3); - mv.visitLabel(l2); - mv.visitLineNumber(1570, l2); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"}); - mv.visitVarInsn(ASTORE, 2); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(1571, l4); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitLdcInsn("[BMTE] Bad Tile Entity set in world, your game would have crashed if not for me!"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(1572, l5); - mv.visitVarInsn(ALOAD, 1); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(1573, l7); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); - mv.visitInsn(DUP); - mv.visitLdcInsn("Tile was of type: "); - mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "", "(Ljava/lang/String;)V", false); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEINTERFACE, "gregtech/api/interfaces/metatileentity/IMetaTileEntity", "getInventoryName", "()Ljava/lang/String;", true); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - mv.visitLabel(l6); - mv.visitLineNumber(1574, l6); - mv.visitFrame(F_APPEND,1, new Object[] {"java/lang/Throwable"}, 0, null); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace", "()V", false); - mv.visitLabel(l3); - mv.visitLineNumber(1576, l3); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitInsn(RETURN); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/BaseMetaTileEntity;", null, l0, l8, 0); - mv.visitLocalVariable("aMetaTileEntity", "Lgregtech/api/interfaces/metatileentity/IMetaTileEntity;", null, l0, l8, 1); - mv.visitLocalVariable("t", "Ljava/lang/Throwable;", null, l4, l3, 2); - mv.visitMaxs(4, 3); - mv.visitEnd(); - - didInject = true; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (name.equals("setMetaTileEntity")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Found method "+name+", removing."); - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java deleted file mode 100644 index dce1fa15d2..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java +++ /dev/null @@ -1,286 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ARETURN; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.GETFIELD; -import static org.objectweb.asm.Opcodes.ILOAD; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; -import static org.objectweb.asm.Opcodes.IRETURN; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.SubTag; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class ClassTransformer_GT_BlockMachines_MetaPipeEntity { - - //The qualified name of the class we plan to transform. - //gregtech/common/blocks/GT_Block_Machines - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - /** - * Utility Functions - */ - - public static String getHarvestTool(int aMeta) { - //FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting to call getHarvestTool. Meta: "+aMeta); - if (aMeta >= 8 && aMeta <= 11) { - return "cutter"; - } - return "wrench"; - } - - /* - * Used to patch the method in Fluid pipes, Frame Boxes and Item Pipes - */ - /** - * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. - *

- * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle - * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle - *

- * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle - * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle - *

- * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle - * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle - *

- * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle - * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle - *

- * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle - * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle - *

- * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle - * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle - *

- * == Reserved For Alkalus (Was previously used to allow axes on wooden blocks, but that's fucking stupid.) - *

- * 12 = BaseCustomPower_MTE, Wrench lvl 0 to dismantle - * 13 = BaseCustomTileEntity, Wrench lvl 1 to dismantle - *

- * 14 = BaseCustomTileEntity, Wrench lvl 2 to dismantle - * 15 = BaseCustomTileEntity, Wrench lvl 3 to dismantle - */ - public static byte getTileEntityBaseType(Materials mMaterial) { - byte mMetaID; - //Modified code that should never return 12-15 for Wooden items. - //mMetaID = (byte) (mMaterial == null ? 4 : (byte) (4) + Math.max(0, Math.min(3, mMaterial.mToolQuality))); - //Original Code for debug purposes - mMetaID = mMaterial == null ? 4 : (byte) ((mMaterial.contains(SubTag.WOOD) ? 4 : 4) + Math.max(0, Math.min(3, mMaterial.mToolQuality))); - //FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting to call getTileEntityBaseType. Using Meta: "+mMetaID); - return mMetaID; - } - - - - /** - * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. - *

- * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle - * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle - *

- * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle - * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle - *

- * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle - * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle - *

- * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle - * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle - *

- * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle - * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle - *

- * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle - * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle - *

- * == Reserved For Alkalus (Was previously used to allow axes on wooden blocks, but that's fucking stupid.) - *

- * 12 = BaseCustomPower_MTE, Wrench lvl 2 to dismantle - * 13 = BaseCustomTileEntity, Wrench lvl 2 to dismantle - *

- * 14 = BaseCustomTileEntity, Wrench lvl 3 to dismantle - * 15 = BaseCustomTileEntity, Wrench lvl 3 to dismantle - */ - public static TileEntity createTileEntity(World aWorld, int aMeta) { - //Logger.INFO("Creating Tile Entity with Meta of "+aMeta); - if (aMeta < 4) { - return GregTech_API.constructBaseMetaTileEntity(); - } else if (aMeta < 12) { - return new BaseMetaPipeEntity(); - } else { - //Because Wooden pipes/frames may exist in world, we try cast to the GT++ tile first, if tht fails, we cast a pipe.. - try { - return Meta_GT_Proxy.constructCustomGregtechMetaTileEntityByMeta(aMeta); - } - catch (Throwable c) { - //Returns a pipe entity, once this returns, it should correct itself and no longer error in future. - return new BaseMetaPipeEntity(); - } - } - } - - public static TileEntity createTileEntity_Original(World aWorld, int aMeta) { - // Logger.INFO("Creating Tile Entity with Meta of "+aMeta); - if (aMeta < 4) { - return GregTech_API.constructBaseMetaTileEntity(); - } else { - return new BaseMetaPipeEntity(); - } - } - - int mMode; - - public ClassTransformer_GT_BlockMachines_MetaPipeEntity(byte[] basicClass, int aMode) { - mMode = aMode; - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting to patch in mode "+aMode+"."); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter, mMode), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Valid patch? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - - - if (reader != null && writer != null) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting Method Injection."); - if (aMode == 0) { - injectMethod("getHarvestTool"); - injectMethod("createTileEntity"); - } - else { - injectMethod("getTileEntityBaseType"); - } - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Injecting "+aMethodName+"."); - if (aMethodName.equals("getHarvestTool")) { - mv = getWriter().visitMethod(ACC_PUBLIC, "getHarvestTool", "(I)Ljava/lang/String;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(63, l0); - mv.visitVarInsn(ILOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity", "getHarvestTool", "(I)Ljava/lang/String;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l1, 0); - mv.visitLocalVariable("aMeta", "I", null, l0, l1, 1); - mv.visitMaxs(1, 2); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals("createTileEntity")) { - mv = getWriter().visitMethod(ACC_PUBLIC, "createTileEntity", "(Lnet/minecraft/world/World;I)Lnet/minecraft/tileentity/TileEntity;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(442, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity", "createTileEntity", "(Lnet/minecraft/world/World;I)Lnet/minecraft/tileentity/TileEntity;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l1, 0); - mv.visitLocalVariable("aWorld", "Lnet/minecraft/world/World;", null, l0, l1, 1); - mv.visitLocalVariable("aMeta", "I", null, l0, l1, 2); - mv.visitMaxs(2, 3); - mv.visitEnd(); - didInject = true; - - } - else if (aMethodName.equals("getTileEntityBaseType")) { - - String aClassName = mMode == 1 ? "gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item" : mMode == 2 ? "gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame" : "gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid"; - mv = getWriter().visitMethod(ACC_PUBLIC, "getTileEntityBaseType", "()B", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(37, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, ""+aClassName+"", "mMaterial", "Lgregtech/api/enums/Materials;"); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity", "getTileEntityBaseType", "(Lgregtech/api/enums/Materials;)B", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "L"+aClassName+";", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - private final int mMode; - - public localClassVisitor(ClassVisitor cv, int aMode) { - super(ASM5, cv); - mMode = aMode; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if ((mMode == 0 && (name.equals("createTileEntity") || name.equals("getHarvestTool"))) || (mMode > 0 && name.equals("getTileEntityBaseType"))) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Found method "+name+", removing."); - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java deleted file mode 100644 index 349bdc3e88..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java +++ /dev/null @@ -1,193 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.preloader.DevHelper; -import gtPlusPlus.preloader.asm.AsmConfig; - -public class ClassTransformer_GT_BlockMachines_NBT { - - //The qualified name of the class we plan to transform. - private static final String className = "gregtech.common.blocks.GT_Block_Machines"; - //gregtech/common/blocks/GT_Block_Machines - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - String aEntityPlayer; - String aEntityPlayerMP; - String aWorld; - - public static boolean isNbtPersistencyPatchAlreadyApplied = false; - - public ClassTransformer_GT_BlockMachines_NBT(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Attempting to patch "+className+"."); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Valid patch? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - - CORE.NBT_PERSISTENCY_PATCH_APPLIED = isNbtPersistencyPatchAlreadyApplied; - - if (reader != null && writer != null && !isNbtPersistencyPatchAlreadyApplied && AsmConfig.enableGtNbtFix) { - aEntityPlayer = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayer") : "net/minecraft/entity/player/EntityPlayer"; - aEntityPlayerMP = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayerMP") : "net/minecraft/entity/player/EntityPlayerMP"; - aWorld = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Attempting Method Injection."); - if (injectMethod("removedByPlayer") && injectMethod("harvestBlock")) { - CORE.NBT_PERSISTENCY_PATCH_APPLIED = true; - } - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); - if (aMethodName.equals("removedByPlayer")) { - - mv = getWriter().visitMethod(ACC_PUBLIC, "removedByPlayer", "(L"+aWorld+";L"+aEntityPlayer+";IIIZ)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(535, l0); - mv.visitVarInsn(ILOAD, 6); - Label l1 = new Label(); - mv.visitJumpInsn(IFEQ, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(536, l2); - mv.visitInsn(ICONST_1); - mv.visitInsn(IRETURN); - mv.visitLabel(l1); - mv.visitLineNumber(538, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ILOAD, 4); - mv.visitVarInsn(ILOAD, 5); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/items/GT_Generic_Block", "removedByPlayer", "(L"+aWorld+";L"+aEntityPlayer+";IIIZ)Z", false); - mv.visitInsn(IRETURN); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l3, 0); - mv.visitLocalVariable("aWorld", "L"+aWorld+";", null, l0, l3, 1); - mv.visitLocalVariable("aPlayer", "L"+aEntityPlayer+";", null, l0, l3, 2); - mv.visitLocalVariable("aX", "I", null, l0, l3, 3); - mv.visitLocalVariable("aY", "I", null, l0, l3, 4); - mv.visitLocalVariable("aZ", "I", null, l0, l3, 5); - mv.visitLocalVariable("aWillHarvest", "Z", null, l0, l3, 6); - mv.visitMaxs(7, 7); - mv.visitEnd(); - didInject = true; - - } - else if (aMethodName.equals("harvestBlock")) { - - mv = getWriter().visitMethod(ACC_PUBLIC, "harvestBlock", "(L"+aWorld+";L"+aEntityPlayer+";IIII)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(544, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ILOAD, 4); - mv.visitVarInsn(ILOAD, 5); - mv.visitVarInsn(ILOAD, 6); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/items/GT_Generic_Block", "harvestBlock", "(L"+aWorld+";L"+aEntityPlayer+";IIII)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(545, l1); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ILOAD, 4); - mv.visitVarInsn(ILOAD, 5); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorld+"", "setBlockToAir", "(III)Z", false); - mv.visitInsn(POP); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(546, l2); - mv.visitInsn(RETURN); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l3, 0); - mv.visitLocalVariable("aWorld", "L"+aWorld+";", null, l0, l3, 1); - mv.visitLocalVariable("aPlayer", "L"+aEntityPlayer+";", null, l0, l3, 2); - mv.visitLocalVariable("aX", "I", null, l0, l3, 3); - mv.visitLocalVariable("aY", "I", null, l0, l3, 4); - mv.visitLocalVariable("aZ", "I", null, l0, l3, 5); - mv.visitLocalVariable("aMeta", "I", null, l0, l3, 6); - mv.visitMaxs(7, 7); - mv.visitEnd(); - didInject = true; - - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("removedByPlayer")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Found method "+name+", skipping patch."); - isNbtPersistencyPatchAlreadyApplied = true; - } - if (name.equals("harvestBlock")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Found method "+name+", skipping patch."); - isNbtPersistencyPatchAlreadyApplied = true; - } - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java deleted file mode 100644 index 1e54bd3632..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java +++ /dev/null @@ -1,184 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.util.ArrayList; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class ClassTransformer_GT_CharcoalPit { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public static boolean isWoodLog(Block log) { - return isWoodLog(log, Short.MAX_VALUE); - } - - public static boolean isWoodLog(Block log, int meta) { - ItemStack aLogStack = ItemUtils.getSimpleStack(log, meta, 1); - ArrayList aData = OrePrefixes.log.mPrefixedItems; - for (ItemStack aStack : aData) { - if (GT_Utility.areStacksEqual(aStack, aLogStack)) { - return true; - } - } - aData.clear(); - aData = OreDictionary.getOres("logWood"); - for (ItemStack aStack : aData) { - if (GT_Utility.areStacksEqual(aStack, aLogStack)) { - return true; - } - } - return false; - } - - public ClassTransformer_GT_CharcoalPit(byte[] basicClass, boolean obfuscated) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - boolean aBadTime = false; - if (ReflectionUtils.doesClassExist("aji")) { - obfuscated = true; - } - else { - if (ReflectionUtils.doesClassExist("net.minecraft.block.Block")) { - obfuscated = false; - } - else { - // Bad... Like.. very bad.. - FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Unable to find Block.class/aji.class, this is BAD. Not Patching."); - } - } - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - if (!aBadTime) { - aTempReader.accept(new CustomClassVisitor(aTempWriter), 0); - injectMethod("isWoodLog", obfuscated, aTempWriter); - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } else { - isValid = false; - } - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Valid? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName, boolean obfuscated, ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Injecting " + aMethodName + "."); - - String aBlockClassName = "net/minecraft/block/Block"; - if (obfuscated) { - aBlockClassName = "aji"; - } - if (aMethodName.equals("isWoodLog")) { - - // Inject original Method with only block arg. - mv = cw.visitMethod(ACC_PUBLIC, "isWoodLog", "(L"+aBlockClassName+";)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(197, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit", "isWoodLog", "(L"+aBlockClassName+";)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "Lgregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit;", null, l0, l1, 0); - mv.visitLocalVariable("log", "L"+aBlockClassName+";", null, l0, l1, 1); - mv.visitMaxs(1, 2); - mv.visitEnd(); - - - // Inject better Method with block & meta arg. - mv = cw.visitMethod(ACC_PUBLIC, "isWoodLog", "(L"+aBlockClassName+";I)Z", null, null); - mv.visitCode(); - Label label0 = new Label(); - mv.visitLabel(label0); - mv.visitLineNumber(201, label0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit", "isWoodLog", "(L"+aBlockClassName+";I)Z", false); - mv.visitInsn(IRETURN); - Label label1 = new Label(); - mv.visitLabel(label1); - mv.visitLocalVariable("this", "Lgregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit;", null, label0, label1, 0); - mv.visitLocalVariable("log", "L"+aBlockClassName+";", null, label0, label1, 1); - mv.visitLocalVariable("meta", "I", null, label0, label1, 2); - mv.visitMaxs(2, 3); - mv.visitEnd(); - - didInject = true; - - } - FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Method injection complete."); - return didInject; - } - - public class CustomClassVisitor extends ClassVisitor { - - public CustomClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - private final String[] aMethodsToStrip = new String[] { "isWoodLog" }; - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - found = true; - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } else { - methodVisitor = null; - } - if (found) { - FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Found method " + name + ", removing."); - } - return methodVisitor; - } - - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java deleted file mode 100644 index e2d34c38e7..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java +++ /dev/null @@ -1,410 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.INVOKESPECIAL; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; -import static org.objectweb.asm.Opcodes.RETURN; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.UUID; -import java.util.jar.JarEntry; -import java.util.jar.JarInputStream; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Maps; -import com.google.common.reflect.ClassPath; -import com.google.common.reflect.ClassPath.ClassInfo; - -import cpw.mods.fml.common.gameevent.TickEvent.Phase; -import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent; -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_PlayedSound; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.loaders.misc.AssLineAchievements; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.StatFileWriter; - -public class ClassTransformer_GT_Client { - - private final boolean valid; - private final ClassReader read; - private final ClassWriter write; - private boolean mModern = true; - private boolean mObfuscated = true; - private byte[] mTooledClass; - - public ClassTransformer_GT_Client(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - mObfuscated = obfuscated; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - - /** - * Let's just read the GT archive for some info - */ - //mModern = findAssemblyLineClass(); - //FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Found Assembly Line? "+mModern+"."); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Fixing Issues in vanilla GT."); - if (mModern) { - aTempReader.accept(new MethodAdaptor2(aTempWriter), 0); - //FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Patching Client handling of Assembly Line recipe visibility for GT 5.09"); - //injectMethod(aTempWriter, "onPlayerTickEventClient"); - injectMethod(aTempWriter, "onPostLoad"); - if (aTempReader != null && aTempWriter != null) { - valid = true; - mTooledClass = aTempWriter.toByteArray(); - } - else { - valid = false; - } - } - else { - mTooledClass = basicClass; - valid = true; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Valid? "+valid+"."); - read = aTempReader; - write = aTempWriter; - } - - public boolean isValidTransformer() { - return valid; - } - - public ClassReader getReader() { - return read; - } - - public ClassWriter getWriter() { - return write; - } - - public boolean findAssemblyLineClass() { - ClassLoader cl = getClass().getClassLoader(); - try { - Set classesInPackage = ClassPath.from(cl).getTopLevelClassesRecursive("gregtech"); - if (classesInPackage != null && classesInPackage.size() > 0) { - for (ClassInfo x : classesInPackage) { - if (x.getResourceName().contains("GT_MetaTileEntity_AssemblyLine")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, - "Patchable class | " + x.getResourceName()); - return true; - } - } - } - } catch (IOException e) { - } - - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Failed to find Gregtech classes using prefered method, using backup."); - - cl = ClassLoader.getSystemClassLoader(); - ImmutableMap g = getClassPathEntries(cl); - File aGregtech = null; - if (g.size() > 0) { - for (int i = 0; i < g.size(); i++) { - String aName; - try { - File aF = g.keySet().asList().get(i); - aName = aF.getName(); - if (aName != null && aName.length() > 0) { - if (aName.toLowerCase().contains("gregtech")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Patchable class | "+aName); - aGregtech = aF; - } - } - } - catch (Throwable t) {} - } - } - - if (aGregtech != null) { - File file = aGregtech; - FileInputStream fis; - JarInputStream jis; - try { - fis = new FileInputStream(file); - jis = new JarInputStream(fis); - System.out.println(jis.markSupported()); - JarEntry je; - while((je=jis.getNextJarEntry())!=null){ - if (je.getName().contains("GT_MetaTileEntity_AssemblyLine")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Patchable class | "+je.getName()); - jis.close(); - return true; - } - } - if (jis != null) { - jis.close(); - } - return true; - } catch (IOException e1) { - } - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Failed to find Gregtech classes using backup method, probably using GT 5.08"); - - return false; - } - - static ImmutableMap getClassPathEntries(ClassLoader classloader) { - LinkedHashMap entries = Maps.newLinkedHashMap(); - // Search parent first, since it's the order ClassLoader#loadClass() uses. - ClassLoader parent = classloader.getParent(); - if (parent != null) { - entries.putAll(getClassPathEntries(parent)); - } - if (classloader instanceof URLClassLoader) { - URLClassLoader urlClassLoader = (URLClassLoader) classloader; - for (URL entry : urlClassLoader.getURLs()) { - if (entry.getProtocol().equals("file")) { - File file = new File(entry.getFile()); - if (!entries.containsKey(file)) { - entries.put(file, classloader); - } - } - } - } - return ImmutableMap.copyOf(entries); - } - - public boolean injectMethod(ClassWriter cw, String string) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Injecting " + string + ". Obfuscated? "+mObfuscated); - - if (string.equals("onPlayerTickEventClient")) { - /** - * Inject new, safer code - */ - AnnotationVisitor av0; - /** - * Static invocation of custom handler instead - */ - mv = cw.visitMethod(ACC_PUBLIC, "onPlayerTickEventClient", "(Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;)V", null, null); - av0 = mv.visitAnnotation("Lcpw/mods/fml/common/eventhandler/SubscribeEvent;", true); - av0.visitEnd(); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(371, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client", "onPlayerTickEventClient", "(Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(372, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "Lgregtech/common/GT_Client;", null, l0, l2, 0); - mv.visitLocalVariable("aEvent", "Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;", null, l0, l2, 1); - mv.visitMaxs(1, 2); - mv.visitEnd(); - didInject = true; - } - else if (string.equals("onPostLoad")) { - mv = cw.visitMethod(ACC_PUBLIC, "onPostLoad", "()V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(315, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/common/GT_Proxy", "onPostLoad", "()V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(316, l1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client", "onPostLoad", "()V", false); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(317, l2); - mv.visitInsn(RETURN); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLocalVariable("this", "Lgregtech/common/GT_Client;", null, l0, l3, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - - - - - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Method injection complete."); - return didInject; - - } - - public class MethodAdaptor2 extends ClassVisitor { - - public MethodAdaptor2(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (/*name.equals("onPlayerTickEventClient") || */name.equals("onPostLoad")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, - "Found method " + name + ", removing."); - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - - public byte[] getByteArray() { - if (mTooledClass != null) { - return mTooledClass; - } - return getWriter().toByteArray(); - } - - - private static final Map aTimeMap = new HashMap(); - - - public static void onPlayerTickEventClient(PlayerTickEvent aEvent) { - if (aEvent.side.isClient() && aEvent.phase == Phase.END && !aEvent.player.isDead) { - long aTime = 0; - if (aTimeMap.get(aEvent.player.getUniqueID()) == null) { - aTimeMap.put(aEvent.player.getUniqueID(), 0l); - } - else { - aTime = aTimeMap.get(aEvent.player.getUniqueID()) + 1; - aTimeMap.put(aEvent.player.getUniqueID(), aTime); - } - if (aTime >= 100L) { - aTimeMap.put(aEvent.player.getUniqueID(), 0l); - /** - * Remove original handling - */ - if (StaticFields59.mAssLineVisualMapNEI != null) { - StatFileWriter tList = Minecraft.getMinecraft().thePlayer.getStatFileWriter(); - GT_Recipe_Map aAssLineNei; - try { - aAssLineNei = (GT_Recipe_Map) StaticFields59.mAssLineVisualMapNEI.get(null); - for (GT_Recipe aFakeAssLineRecipe : aAssLineNei.mRecipeList) { - String aSafeUnlocalName; - if (aFakeAssLineRecipe.getOutput(0) == null) { - Logger.INFO( - "Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); - continue; - } - ItemStack aStack = aFakeAssLineRecipe.getOutput(0); - try { - aSafeUnlocalName = aStack.getUnlocalizedName(); - } catch (Throwable t) { - aSafeUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); - } - boolean aHidden = true; - try { - aHidden = tList.hasAchievementUnlocked(AssLineAchievements.getAchievement(aSafeUnlocalName)); - Logger.INFO("Found achievement for "+aSafeUnlocalName); - } - catch (NullPointerException rrr) { - aHidden = true; - //Logger.INFO("Exception handling achievement for "+aSafeUnlocalName); - //rrr.printStackTrace(); - } - aFakeAssLineRecipe.mHidden = !aHidden; - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - } - - Iterator tKey; - ArrayList arg5 = new ArrayList(); - tKey = GT_Utility.sPlayedSoundMap.entrySet().iterator(); - - while (tKey.hasNext()) { - Entry arg7 = (Entry) tKey.next(); - if (((Integer) arg7.getValue()).intValue() < 0) { - arg5.add(arg7.getKey()); - } else { - arg7.setValue(Integer.valueOf(((Integer) arg7.getValue()).intValue() - 1)); - } - } - - Iterator arg8 = arg5.iterator(); - - while (arg8.hasNext()) { - GT_PlayedSound arg6 = (GT_PlayedSound) arg8.next(); - GT_Utility.sPlayedSoundMap.remove(arg6); - } - - if (!GregTech_API.mServerStarted) { - GregTech_API.mServerStarted = true; - } - } - } - - - - - /** - * GT_Client's onPostLoad - */ - - public static void onPostLoad() { - try { - for (int i = 0; i < GregTech_API.METATILEENTITIES.length; i++) { - try { - if (GregTech_API.METATILEENTITIES[i] != null) { - GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip((EntityPlayer) null, true); - } - } - catch (Throwable t) { - GT_Log.err.println("Error in MetaTileEntity with ID of "+i); - t.printStackTrace(GT_Log.err); - } - } - } catch (Throwable var2) { - var2.printStackTrace(); - } - } - - - - - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java deleted file mode 100644 index 83560eb6c3..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java +++ /dev/null @@ -1,317 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.*; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.asm.ClassesToTransform; - -public class ClassTransformer_GT_EnergyHatchPatch { - - private static final String aRtgInputFormatted = ClassesToTransform.GTPP_MTE_HATCH_RTG.replace(".", "/"); - private static final String aEnergyFormatted = ClassesToTransform.GT_MTE_HATCH_ENERGY.replace(".", "/"); - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - - public ClassTransformer_GT_EnergyHatchPatch(byte[] basicClass, String aClassName) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Attempting to add slots capabilities to GT Energy Hatches."); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Patching "+aClassName+"."); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter, aClassName), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Valid patch? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - - - if (reader != null && writer != null) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Attempting Method Injection."); - injectMethod(aClassName); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - - public boolean injectMethod(String aClassName) { - - boolean didInject = false; - MethodVisitor mv; - ClassWriter cw = getWriter(); - int aConID = 1; - - //GT_MetaTileEntity_Hatch_Energy - //Constructor - if (aClassName.equals(ClassesToTransform.GT_MTE_HATCH_ENERGY)){ - - - //Constructor 1 - { - mv = cw.visitMethod(ACC_PUBLIC, "", "(ILjava/lang/String;Ljava/lang/String;II[Ljava/lang/String;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(26, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 3); - mv.visitVarInsn(ILOAD, 4); - mv.visitVarInsn(ILOAD, 5); - mv.visitVarInsn(ALOAD, 6); - mv.visitInsn(ICONST_0); - mv.visitTypeInsn(ANEWARRAY, "gregtech/api/interfaces/ITexture"); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch", "", "(ILjava/lang/String;Ljava/lang/String;II[Ljava/lang/String;[Lgregtech/api/interfaces/ITexture;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(27, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy;", null, l0, l2, 0); - mv.visitLocalVariable("aID", "I", null, l0, l2, 1); - mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 2); - mv.visitLocalVariable("aNameRegional", "Ljava/lang/String;", null, l0, l2, 3); - mv.visitLocalVariable("aTier", "I", null, l0, l2, 4); - mv.visitLocalVariable("aSlots", "I", null, l0, l2, 5); - mv.visitLocalVariable("aDesc", "[Ljava/lang/String;", null, l0, l2, 6); - mv.visitMaxs(8, 7); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); - } - - //Constructor 2 - { - mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(30, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch", "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(31, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy;", null, l0, l2, 0); - mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); - mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); - mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); - mv.visitLocalVariable("aDescription", "Ljava/lang/String;", null, l0, l2, 4); - mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); - mv.visitMaxs(6, 6); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); - } - - //Third constructor with String[] for GT 5.09 - { - mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(34, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch", "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(35, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy;", null, l0, l2, 0); - mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); - mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); - mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); - mv.visitLocalVariable("aDescription", "[Ljava/lang/String;", null, l0, l2, 4); - mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); - mv.visitMaxs(6, 6); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); - } - didInject = true; - } - - //GT_MetaTileEntity_Hatch_Energy_RTG - //Constructor - if (aClassName.equals(ClassesToTransform.GTPP_MTE_HATCH_RTG)){ - - { - mv = cw.visitMethod(ACC_PUBLIC, "", "(ILjava/lang/String;Ljava/lang/String;II)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(38, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 3); - mv.visitVarInsn(ILOAD, 4); - mv.visitVarInsn(ILOAD, 5); - mv.visitInsn(ICONST_2); - mv.visitTypeInsn(ANEWARRAY, "java/lang/String"); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_0); - mv.visitLdcInsn("Energy Injector for Multiblocks"); - mv.visitInsn(AASTORE); - mv.visitInsn(DUP); - mv.visitInsn(ICONST_1); - mv.visitLdcInsn("Accepts RTG pellets for Fuel"); - mv.visitInsn(AASTORE); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy", "", "(ILjava/lang/String;Ljava/lang/String;II[Ljava/lang/String;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(39, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "LgtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG;", null, l0, l2, 0); - mv.visitLocalVariable("aID", "I", null, l0, l2, 1); - mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 2); - mv.visitLocalVariable("aNameRegional", "Ljava/lang/String;", null, l0, l2, 3); - mv.visitLocalVariable("aTier", "I", null, l0, l2, 4); - mv.visitLocalVariable("aSlots", "I", null, l0, l2, 5); - mv.visitMaxs(10, 6); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); - } - { - mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(42, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy", "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(43, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "LgtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG;", null, l0, l2, 0); - mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); - mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); - mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); - mv.visitLocalVariable("aDescription", "Ljava/lang/String;", null, l0, l2, 4); - mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); - mv.visitMaxs(6, 6); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); - } - { - mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(46, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 4); - mv.visitVarInsn(ALOAD, 5); - mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy", "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(47, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "LgtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG;", null, l0, l2, 0); - mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); - mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); - mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); - mv.visitLocalVariable("aDescription", "[Ljava/lang/String;", null, l0, l2, 4); - mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); - mv.visitMaxs(6, 6); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); - } - - - didInject = true; - } - - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Method injection complete. Successful? "+didInject); - return didInject; - - } - - public final class localClassVisitor extends ClassVisitor { - - private final String mClassName; - - public localClassVisitor(ClassVisitor cv, String aClassName) { - super(ASM5, cv); - mClassName = aClassName; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor = null; - if ((mClassName.equals(ClassesToTransform.GTPP_MTE_HATCH_RTG)) && access == ACC_PUBLIC && name.equals("") && (desc.equals("(Ljava/lang/String;ILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V") || desc.equals("(Ljava/lang/String;I[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V"))) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Found Constructor, "+"'"+access+"', "+"'"+name+"', "+"'"+desc+"', "+"'"+signature+"'"); - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - if (methodVisitor == null) { - if (mClassName.equals(ClassesToTransform.GT_MTE_HATCH_ENERGY)){ - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Removed method from "+mClassName); - } - else { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Removed Constructor with descriptor '"+desc+"' from "+mClassName); - } - } - return methodVisitor; - } - } - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java deleted file mode 100644 index 4b2a10df07..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java +++ /dev/null @@ -1,139 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - -public class ClassTransformer_GT_ItemMachines_Tooltip { - - //The qualified name of the class we plan to transform. - private static final String className = "gregtech.common.blocks.GT_Item_Machines"; - //gregtech/common/blocks/GT_Item_Machines - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - String aEntityPlayer; - String aItemStack; - String aWorld; - - private static boolean doesMethodAlreadyExist = false; - - public ClassTransformer_GT_ItemMachines_Tooltip(byte[] basicClass, boolean obfuscated) { - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null && !doesMethodAlreadyExist) { - aEntityPlayer = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayer") : "net/minecraft/entity/player/EntityPlayer"; - aItemStack = obfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; - aWorld = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; - - injectMethod("addInformation"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod(String aMethodName) { - MethodVisitor mv; - FMLRelaunchLog.log("[GT++ ASM] Gregtech Tooltip Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); - if (aMethodName.equals("addInformation")) { - - mv = getWriter().visitMethod(ACC_PUBLIC, "addInformation", "(L"+aItemStack+";L"+aEntityPlayer+";Ljava/util/List;Z)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - Label l1 = new Label(); - Label l2 = new Label(); - mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); - mv.visitLabel(l0); - mv.visitLineNumber(120, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 3); - mv.visitVarInsn(ILOAD, 4); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy", "conStructGtTileBlockTooltip", "(L"+aItemStack+";L"+aEntityPlayer+";Ljava/util/List;Z)V", false); - mv.visitLabel(l1); - mv.visitLineNumber(121, l1); - Label l3 = new Label(); - mv.visitJumpInsn(GOTO, l3); - mv.visitLabel(l2); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"}); - mv.visitVarInsn(ASTORE, 5); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(122, l4); - mv.visitVarInsn(ALOAD, 5); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace", "(Ljava/io/PrintStream;)V", false); - mv.visitLabel(l3); - mv.visitLineNumber(124, l3); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Item_Machines;", null, l0, l5, 0); - mv.visitLocalVariable("aStack", "L"+aItemStack+";", null, l0, l5, 1); - mv.visitLocalVariable("aPlayer", "L"+aEntityPlayer+";", null, l0, l5, 2); - mv.visitLocalVariable("aList", "Ljava/util/List;", null, l0, l5, 3); - mv.visitLocalVariable("par4", "Z", null, l0, l5, 4); - mv.visitLocalVariable("e", "Ljava/lang/Throwable;", null, l4, l3, 5); - mv.visitMaxs(4, 6); - mv.visitEnd(); -} - FMLRelaunchLog.log("[GT++ ASM] Gregtech Tooltip Patch", Level.INFO, "Method injection complete."); - - } - - public static final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - if (name.equals("addInformation")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech Tooltip Patch", Level.INFO, "Found method "+name+", Patching."); - return null; - } - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java deleted file mode 100644 index b6cd9c8d67..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java +++ /dev/null @@ -1,116 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_FINAL; -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; -import static org.objectweb.asm.Opcodes.RETURN; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import gtPlusPlus.preloader.Preloader_Logger; - -public class ClassTransformer_GT_MetaGenerated_Tool { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public ClassTransformer_GT_MetaGenerated_Tool(byte[] basicClass) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new LocalClassVisitor(aTempWriter), 0); - boolean completed = injectMethod("getSubItems", aTempWriter); - if (aTempReader != null && aTempWriter != null && completed) { - isValid = true; - } else { - isValid = false; - } - Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Valid? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName, ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Injecting " + aMethodName + "."); - if (aMethodName.equals("getSubItems")) { - { - mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "getSubItems", "(Lnet/minecraft/item/Item;Lnet/minecraft/creativetab/CreativeTabs;Ljava/util/List;)V", null, null); - { - AnnotationVisitor av0 = mv.visitAnnotation("Lcpw/mods/fml/relauncher/SideOnly;", true); - av0.visitEnum("value", "Lcpw/mods/fml/relauncher/Side;", "CLIENT"); - av0.visitEnd(); - } - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(321, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/helpers/MethodHelper_GT", "getSubItems", "(Lgregtech/api/items/GT_MetaGenerated_Tool;Lnet/minecraft/item/Item;Lnet/minecraft/creativetab/CreativeTabs;Ljava/util/List;)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(322, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "Lgregtech/api/items/GT_MetaGenerated_Tool;", null, l0, l2, 0); - mv.visitLocalVariable("var1", "Lnet/minecraft/item/Item;", null, l0, l2, 1); - mv.visitLocalVariable("aCreativeTab", "Lnet/minecraft/creativetab/CreativeTabs;", null, l0, l2, 2); - mv.visitLocalVariable("aList", "Ljava/util/List;", null, l0, l2, 3); - mv.visitMaxs(4, 4); - mv.visitEnd(); - didInject = true; - } - - } - Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class LocalClassVisitor extends ClassVisitor { - - public LocalClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (name.equals("getSubItems") && desc.equals("(Lnet/minecraft/item/Item;Lnet/minecraft/creativetab/CreativeTabs;Ljava/util/List;)V")) { - methodVisitor = null; - Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Found method "+name+", removing."); - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java deleted file mode 100644 index 1f281ce492..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java +++ /dev/null @@ -1,319 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; - -public class ClassTransformer_GT_Packet_TileEntity { - - //The qualified name of the class we plan to transform. - //gregtech/common/blocks/GT_Block_Machines - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - - public ClassTransformer_GT_Packet_TileEntity(byte[] basicClass, boolean obfuscated) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Attempting to make GT Packets safer."); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Valid patch? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - - - if (reader != null && writer != null) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Attempting Method Injection."); - injectMethod("process", obfuscated); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName, boolean obfuscated) { - MethodVisitor mv; - boolean didInject = false; - String aGetTile = obfuscated ? "func_147438_o" : "getTileEntity"; - - FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Injecting "+aMethodName+"."); - if (aMethodName.equals("process")) { - mv = getWriter().visitMethod(ACC_PUBLIC, "process", "(Lnet/minecraft/world/IBlockAccess;)V", null, null); - mv.visitCode(); - Label l0 = new Label(); - Label l1 = new Label(); - Label l2 = new Label(); - mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(93, l3); - mv.visitVarInsn(ALOAD, 1); - Label l4 = new Label(); - mv.visitJumpInsn(IFNULL, l4); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(94, l5); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mX", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mY", "S"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mZ", "I"); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/world/IBlockAccess", ""+aGetTile+"", "(III)Lnet/minecraft/tileentity/TileEntity;", true); - mv.visitVarInsn(ASTORE, 2); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(95, l6); - mv.visitVarInsn(ALOAD, 2); - mv.visitJumpInsn(IFNULL, l4); - mv.visitLabel(l0); - mv.visitLineNumber(97, l0); - mv.visitVarInsn(ALOAD, 2); - mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaTileEntity"); - Label l7 = new Label(); - mv.visitJumpInsn(IFEQ, l7); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(98, l8); - mv.visitVarInsn(ALOAD, 2); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/metatileentity/BaseMetaTileEntity"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mID", "S"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC0", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC1", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC2", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC3", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC4", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC5", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mTexture", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mTexturePage", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mUpdate", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mRedstone", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mColor", "B"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/metatileentity/BaseMetaTileEntity", "receiveMetaTileEntityData", "(SIIIIIIBBBBB)V", false); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(99, l9); - mv.visitJumpInsn(GOTO, l4); - mv.visitLabel(l7); - mv.visitLineNumber(101, l7); - mv.visitFrame(F_APPEND,1, new Object[] {"net/minecraft/tileentity/TileEntity"}, 0, null); - mv.visitVarInsn(ALOAD, 2); - mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaPipeEntity"); - mv.visitJumpInsn(IFEQ, l4); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(102, l10); - mv.visitVarInsn(ALOAD, 2); - mv.visitTypeInsn(CHECKCAST, "gregtech/api/metatileentity/BaseMetaPipeEntity"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mID", "S"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC0", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC1", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC2", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC3", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC4", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC5", "I"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mTexture", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mUpdate", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mRedstone", "B"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mColor", "B"); - mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/metatileentity/BaseMetaPipeEntity", "receiveMetaTileEntityData", "(SIIIIIIBBBB)V", false); - mv.visitLabel(l1); - mv.visitLineNumber(104, l1); - mv.visitJumpInsn(GOTO, l4); - mv.visitLabel(l2); - mv.visitLineNumber(105, l2); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"}); - mv.visitVarInsn(ASTORE, 3); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(106, l11); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); - mv.visitInsn(DUP); - mv.visitLdcInsn("[GTPTE] Bad Tile Entity set in world, your game would have crashed if not for me! Was Null? "); - mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "", "(Ljava/lang/String;)V", false); - mv.visitVarInsn(ALOAD, 2); - Label l12 = new Label(); - mv.visitJumpInsn(IFNONNULL, l12); - mv.visitInsn(ICONST_1); - Label l13 = new Label(); - mv.visitJumpInsn(GOTO, l13); - mv.visitLabel(l12); - mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/api/net/GT_Packet_TileEntity", "net/minecraft/world/IBlockAccess", "net/minecraft/tileentity/TileEntity", "java/lang/Throwable"}, 2, new Object[] {"java/io/PrintStream", "java/lang/StringBuilder"}); - mv.visitInsn(ICONST_0); - mv.visitLabel(l13); - mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/api/net/GT_Packet_TileEntity", "net/minecraft/world/IBlockAccess", "net/minecraft/tileentity/TileEntity", "java/lang/Throwable"}, 3, new Object[] {"java/io/PrintStream", "java/lang/StringBuilder", INTEGER}); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Z)Ljava/lang/StringBuilder;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(107, l14); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); - mv.visitInsn(DUP); - mv.visitLdcInsn("Tile location ["); - mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "", "(Ljava/lang/String;)V", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mX", "I"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(I)Ljava/lang/StringBuilder;", false); - mv.visitLdcInsn("]["); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mY", "S"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(I)Ljava/lang/StringBuilder;", false); - mv.visitLdcInsn("]["); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mZ", "I"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(I)Ljava/lang/StringBuilder;", false); - mv.visitLdcInsn("]"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(108, l15); - mv.visitVarInsn(ALOAD, 2); - Label l16 = new Label(); - mv.visitJumpInsn(IFNULL, l16); - Label l17 = new Label(); - mv.visitLabel(l17); - mv.visitLineNumber(109, l17); - mv.visitVarInsn(ALOAD, 2); - mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaPipeEntity"); - Label l18 = new Label(); - mv.visitJumpInsn(IFEQ, l18); - Label l19 = new Label(); - mv.visitLabel(l19); - mv.visitLineNumber(110, l19); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitLdcInsn("Type: Pipe"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l20 = new Label(); - mv.visitLabel(l20); - mv.visitLineNumber(111, l20); - mv.visitJumpInsn(GOTO, l16); - mv.visitLabel(l18); - mv.visitLineNumber(112, l18); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 2); - mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaTileEntity"); - Label l21 = new Label(); - mv.visitJumpInsn(IFEQ, l21); - Label l22 = new Label(); - mv.visitLabel(l22); - mv.visitLineNumber(113, l22); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitLdcInsn("Type: Machine"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - Label l23 = new Label(); - mv.visitLabel(l23); - mv.visitLineNumber(114, l23); - mv.visitJumpInsn(GOTO, l16); - mv.visitLabel(l21); - mv.visitLineNumber(116, l21); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); - mv.visitLdcInsn("Type: Non-GT (Could be GT++/TT/BW)"); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); - mv.visitLabel(l16); - mv.visitLineNumber(119, l16); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 3); - mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace", "()V", false); - mv.visitLabel(l4); - mv.visitLineNumber(123, l4); - mv.visitFrame(F_CHOP,2, null, 0, null); - mv.visitInsn(RETURN); - Label l24 = new Label(); - mv.visitLabel(l24); - mv.visitLocalVariable("this", "Lgregtech/api/net/GT_Packet_TileEntity;", null, l3, l24, 0); - mv.visitLocalVariable("aWorld", "Lnet/minecraft/world/IBlockAccess;", null, l3, l24, 1); - mv.visitLocalVariable("tTileEntity", "Lnet/minecraft/tileentity/TileEntity;", null, l6, l4, 2); - mv.visitLocalVariable("t", "Ljava/lang/Throwable;", null, l11, l4, 3); - mv.visitMaxs(13, 4); - mv.visitEnd(); - - - didInject = true; - } - FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - public localClassVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (name.equals("process")) { - FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Found method "+name+", removing."); - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java deleted file mode 100644 index fa711e5693..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java +++ /dev/null @@ -1,283 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.preloader.Preloader_Logger; -import ic2.core.IC2Potion; -import ic2.core.item.armor.ItemArmorHazmat; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureAttribute; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -public class ClassTransformer_GT_Utility { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private final String className; - - - - public ClassTransformer_GT_Utility(byte[] basicClass, String aClassName) { - - className = aClassName; - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter, className), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } else { - isValid = false; - } - - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Valid patch? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Attempting Method Injection."); - injectMethod("getTier"); - injectMethod("applyRadioactivity"); - injectMethod("isWearingFullFrostHazmat"); - injectMethod("isWearingFullHeatHazmat"); - injectMethod("isWearingFullBioHazmat"); - injectMethod("isWearingFullRadioHazmat"); - injectMethod("isWearingFullElectroHazmat"); - injectMethod("isWearingFullGasHazmat"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - ClassWriter cw = getWriter(); - String aClassNameFormatted = Utils.class.getName().replace(".", "/"); - - if (aMethodName.equals("isWearingFullFrostHazmat")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullFrostHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1273, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullFrostHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("isWearingFullHeatHazmat")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullHeatHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1277, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullHeatHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("isWearingFullBioHazmat")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullBioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1281, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullBioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("isWearingFullRadioHazmat")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullRadioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1285, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullRadioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("isWearingFullElectroHazmat")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullElectroHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1289, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullElectroHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("isWearingFullGasHazmat")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullGasHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1293, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullGasHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("getTier")) { - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + ", static replacement call to "+aClassNameFormatted+"."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "getTier", "(J)B", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(23, l0); - mv.visitVarInsn(LLOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, aClassNameFormatted, "getTier", "(J)B", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("l", "J", null, l0, l1, 0); - mv.visitMaxs(2, 2); - mv.visitEnd(); - didInject = true; - } - - if (aMethodName.equals("applyRadioactivity")){ - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "applyRadioactivity", "(Lnet/minecraft/entity/EntityLivingBase;II)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(1342, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "applyRadioactivity", "(Lnet/minecraft/entity/EntityLivingBase;II)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); - mv.visitLocalVariable("aLevel", "I", null, l0, l1, 1); - mv.visitLocalVariable("aAmountOfItems", "I", null, l0, l1, 2); - mv.visitMaxs(3, 3); - mv.visitEnd(); - didInject = true; - } - - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - String aClassName; - - public localClassVisitor(ClassVisitor cv, String aName) { - super(ASM5, cv); - aClassName = aName; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - - if (name.equals("getTier")) { - methodVisitor = null; - } - else if (name.equals("applyRadioactivity")){ - methodVisitor = null; - } - else if (name.equals("isWearingFullFrostHazmat")){ - methodVisitor = null; - } - else if (name.equals("isWearingFullHeatHazmat")){ - methodVisitor = null; - } - else if (name.equals("isWearingFullBioHazmat")){ - methodVisitor = null; - } - else if (name.equals("isWearingFullRadioHazmat")){ - methodVisitor = null; - } - else if (name.equals("isWearingFullElectroHazmat")){ - methodVisitor = null; - } - else if (name.equals("isWearingFullGasHazmat")){ - methodVisitor = null; - } - else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - - if (methodVisitor == null) { - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Found method " + name + ", removing."); - Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Descriptor: "+desc); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java deleted file mode 100644 index 6aad6831cb..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java +++ /dev/null @@ -1,214 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.util.Random; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import net.minecraft.block.Block; -import net.minecraft.item.Item; - -public class ClassTransformer_IC2_GetHarvestTool { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private final String className; - - private final String aName_getItemDropped; - private final String aName_damageDropped; - - public static String getHarvestTool(int aMeta) { - return "wrench"; - } - - public static Item getItemDropped(Block aBlock, int meta, Random random, int fortune) { - return Item.getItemFromBlock(aBlock); - } - - public static int damageDropped(int aMeta) { - return aMeta; - } - - public ClassTransformer_IC2_GetHarvestTool(byte[] basicClass, boolean obfuscated, String aClassName) { - className = aClassName; - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aName_getItemDropped = obfuscated ? "func_149650_a" : "getItemDropped"; - aName_damageDropped = obfuscated ? "func_149692_a" : "damageDropped"; - - FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, - "Attempting to patch in mode " + className + ". Obfuscated? "+obfuscated); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter, className), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } else { - isValid = false; - } - - FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Valid patch? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Attempting Method Injection."); - injectMethod("getHarvestTool"); - if (aClassName.equals("ic2.core.block.machine.BlockMachine2") - || aClassName.equals("ic2.core.block.machine.BlockMachine3") - || aClassName.equals("ic2.core.block.wiring.BlockElectric")) { - injectMethod(aName_getItemDropped); - injectMethod(aName_damageDropped); - } - else if (aClassName.equals("ic2.core.block.generator.block.BlockGenerator") - || aClassName.equals("ic2.core.block.machine.BlockMachine")) { - injectMethod(aName_damageDropped); - } - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - String aFormattedClassName = className.replace('.', '/'); - ClassWriter cw = getWriter(); - - - FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Injecting " + aMethodName + "."); - if (aMethodName.equals("getHarvestTool")) { - mv = getWriter().visitMethod(ACC_PUBLIC, "getHarvestTool", "(I)Ljava/lang/String;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(63, l0); - mv.visitVarInsn(ILOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, - "gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool", "getHarvestTool", - "(I)Ljava/lang/String;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "L" + aFormattedClassName + ";", null, l0, l1, 0); - mv.visitLocalVariable("aMeta", "I", null, l0, l1, 1); - mv.visitMaxs(1, 2); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals(aName_getItemDropped)) { - mv = cw.visitMethod(ACC_PUBLIC, aName_getItemDropped, "(ILjava/util/Random;I)Lnet/minecraft/item/Item;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(44, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool", "getItemDropped", "(Lnet/minecraft/block/Block;ILjava/util/Random;I)Lnet/minecraft/item/Item;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "L"+aFormattedClassName+";", null, l0, l1, 0); - mv.visitLocalVariable("meta", "I", null, l0, l1, 1); - mv.visitLocalVariable("random", "Ljava/util/Random;", null, l0, l1, 2); - mv.visitLocalVariable("fortune", "I", null, l0, l1, 3); - mv.visitMaxs(4, 4); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals(aName_damageDropped)) { - mv = cw.visitMethod(ACC_PUBLIC, aName_damageDropped, "(I)I", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(48, l0); - mv.visitVarInsn(ILOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool", "damageDropped", "(I)I", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "L"+aFormattedClassName+";", null, l0, l1, 0); - mv.visitLocalVariable("meta", "I", null, l0, l1, 1); - mv.visitMaxs(1, 2); - mv.visitEnd(); - didInject = true; - } - FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - String aClassName; - - public localClassVisitor(ClassVisitor cv, String aName) { - super(ASM5, cv); - aClassName = aName; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - if (aClassName.equals("ic2.core.block.machine.BlockMachine2") - || aClassName.equals("ic2.core.block.machine.BlockMachine3") - || aClassName.equals("ic2.core.block.wiring.BlockElectric")) { - if (name.equals(aName_getItemDropped)) { - methodVisitor = null; - } else if (name.equals(aName_damageDropped)) { - methodVisitor = null; - } else if (name.equals("getHarvestTool")) { - methodVisitor = null; - } else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - } - else if (aClassName.equals("ic2.core.block.generator.block.BlockGenerator") - || aClassName.equals("ic2.core.block.machine.BlockMachine")) { - if (name.equals(aName_damageDropped)) { - methodVisitor = null; - } else if (name.equals("getHarvestTool")) { - methodVisitor = null; - } else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - } - else { - if (name.equals("getHarvestTool")) { - methodVisitor = null; - } else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - } - if (methodVisitor == null) { - FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java deleted file mode 100644 index 10f04e7a48..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java +++ /dev/null @@ -1,147 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.*; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.core.util.minecraft.HazmatUtils; -import net.minecraft.entity.EntityLivingBase; - -public class ClassTransformer_IC2_Hazmat { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private final String className; - - public static boolean hasCompleteHazmat(EntityLivingBase living) { - return HazmatUtils.hasCompleteHazmat(living); - } - - public ClassTransformer_IC2_Hazmat(byte[] basicClass, String aClassName) { - className = aClassName; - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Attempting to patch in mode " + className + "."); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitor(aTempWriter, className), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } else { - isValid = false; - } - - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Valid patch? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Attempting Method Injection."); - injectMethod("hasCompleteHazmat"); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName) { - MethodVisitor mv; - boolean didInject = false; - ClassWriter cw = getWriter(); - - boolean isObf; - try { - isObf = Class.forName("net.minecraft.entity.EntityLivingBase") == null; - } catch (ClassNotFoundException e) { - isObf = true; - } - String aEntityLivingBase = "net/minecraft/entity/EntityLivingBase"; - if (isObf) { - aEntityLivingBase = "sv"; - } - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Method Handler: "+aEntityLivingBase); - - - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Injecting " + aMethodName + "."); - if (aMethodName.equals("hasCompleteHazmat")) { - - //Bad Local Variable - https://pastebin.com/TUCfdHqS - /*mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(23, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/HazmatUtils", "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("this", "Lic2/core/item/armor/ItemArmorHazmat;", null, l0, l1, 0); - mv.visitLocalVariable("living", "L"+aEntityLivingBase+";", null, l0, l1, 1); - mv.visitMaxs(1, 2); - mv.visitEnd();*/ - - - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(24, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/HazmatUtils", "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", false); - mv.visitInsn(IRETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("living", "L"+aEntityLivingBase+";", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Method injection complete."); - return didInject; - } - - public final class localClassVisitor extends ClassVisitor { - - String aClassName; - - public localClassVisitor(ClassVisitor cv, String aName) { - super(ASM5, cv); - aClassName = aName; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - - if (name.equals("hasCompleteHazmat")) { - methodVisitor = null; - } else { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - - if (methodVisitor == null) { - FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java deleted file mode 100644 index 3ec4426ec1..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java +++ /dev/null @@ -1,278 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ACC_STATIC; -import static org.objectweb.asm.Opcodes.ACC_SYNCHRONIZED; -import static org.objectweb.asm.Opcodes.ARETURN; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.ILOAD; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; - -import java.lang.reflect.Field; -import java.util.HashMap; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.Minecraft; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.client.settings.KeyBinding; - -public class ClassTransformer_LWJGL_Keyboard { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - private static final HashMap mBadKeyCache = new HashMap(); - - /** - * Gets a key's name - * - * @param key The key - * @return a String with the key's human readable name in it or null if the key - * is unnamed - */ - public static synchronized String getKeyName(int key) { - if (init()) { - String[] aTemp = getKeyName(); - if (key < aTemp.length && key >= 0) { - return aTemp[key]; - } - } - String aCachedValue = mBadKeyCache.get("key-"+key); - if (aCachedValue == null) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Unable to map key code "+key+" to LWJGL keymap."); - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Caching key value to be empty."); - //mBadKeyCache.put("key-"+key, getKeyName()[0x00]); - aCachedValue = "FIX!"; - mBadKeyCache.put("key-"+key, aCachedValue); - trySetClientKey(key); - } - return aCachedValue; // Return nothing - } - - public static void trySetClientKey(int aKey) { - if (Utils.isClient() && ReflectionUtils.doesClassExist("net.minecraft.client.Minecraft")) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Trying to set key value to be empty."); - GameSettings options = Minecraft.getMinecraft().gameSettings; - KeyBinding[] akeybinding = Minecraft.getMinecraft().gameSettings.keyBindings; - int i = akeybinding.length; - for (int j = 0; j < i; ++j) { - KeyBinding keybinding = akeybinding[j]; - if (keybinding != null && keybinding.getKeyCode() == aKey) { - options.setOptionKeyBinding(keybinding, 0); - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Set keybind "+aKey+" to 0."); - break; - } - } - } - } - - @SuppressWarnings("rawtypes") - private static Class mKeyboard; - private static Field mKeyName; - - @SuppressWarnings("rawtypes") - private static boolean init() { - if (mKeyName != null) { - return true; - } - Class aKeyboard = ReflectionUtils.getClass("org.lwjgl.input.Keyboard"); - if (aKeyboard != null) { - mKeyboard = aKeyboard; - Field aKeyName = ReflectionUtils.getField(mKeyboard, "keyName"); - if (aKeyName != null) { - mKeyName = aKeyName; - } - } - return mKeyName != null; - } - - private static String[] getKeyName() { - if (init()) { - try { - Object o = mKeyName.get(null); - if (o instanceof String[]) { - String[] y = (String[]) o; - return y; - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - return new String[] {}; - } - - public ClassTransformer_LWJGL_Keyboard(byte[] basicClass, boolean isClientSettings) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - if (!isClientSettings) { - //gtPlusPlus.preloader.keyboard.BetterKeyboard.init(); - aTempReader.accept(new PatchLWJGL(aTempWriter), 0); - injectLWJGLPatch(aTempWriter); - } - else { - //gtPlusPlus.preloader.keyboard.BetterKeyboard.init(); - aTempReader.accept(new PatchClientSettings(aTempWriter), 0); - injectClientSettingPatch(aTempWriter); - } - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Valid? " + isValid + "."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - private boolean isClientSettingsObfuscated = false; - - - public boolean injectLWJGLPatch(ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, - "Injecting " + "getKeyName" + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC + ACC_SYNCHRONIZED, "getKeyName", "(I)Ljava/lang/String;", null, - null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(49, l0); - mv.visitVarInsn(ILOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard", - "getKeyName", "(I)Ljava/lang/String;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("key", "I", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Method injection complete."); - return didInject; - } - - - public boolean injectClientSettingPatch(ClassWriter cw) { - MethodVisitor mv; - boolean didInject = false; - String aMethodName = this.isClientSettingsObfuscated ? "func_74298_c" : "getKeyDisplayString"; - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Injecting " + aMethodName + "."); - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, aMethodName, "(I)Ljava/lang/String;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(130, l0); - mv.visitVarInsn(ILOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/keyboard/BetterKeyboard", "getKeyDisplayString", "(I)Ljava/lang/String;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("p_74298_0_", "I", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Method injection complete."); - return didInject; - } - - - - public class PatchClientSettings extends ClassVisitor { - - public PatchClientSettings(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - private final String[] aMethodsToStrip = new String[] { "func_74298_c", "getKeyDisplayString" }; - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - if (name.equals(aMethodsToStrip[0])) { - isClientSettingsObfuscated = true; - } - else { - isClientSettingsObfuscated = false; - } - found = true; - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } else { - methodVisitor = null; - } - if (found) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Found method " + name + ", removing."); - } - return methodVisitor; - } - - } - - public class PatchLWJGL extends ClassVisitor { - - public PatchLWJGL(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - private final String[] aMethodsToStrip = new String[] { "getKeyName" }; - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - found = true; - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } else { - methodVisitor = null; - } - if (found) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java deleted file mode 100644 index bf71582ae7..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java +++ /dev/null @@ -1,117 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_FINAL; -import static org.objectweb.asm.Opcodes.ACC_PRIVATE; -import static org.objectweb.asm.Opcodes.ACC_STATIC; -import static org.objectweb.asm.Opcodes.ASM5; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.FieldVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.asm.AsmConfig; - -public class ClassTransformer_Railcraft_FluidCartHandling { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - //mods.railcraft.common.blocks.machine.gamma.TileFluidLoader - //mods.railcraft.common.blocks.machine.gamma.TileFluidLoader.TRANSFER_RATE - - //mods.railcraft.common.blocks.machine.gamma.TileFluidUnloader - //mods.railcraft.common.blocks.machine.gamma.TileFluidUnloader.TRANSFER_RATE - - public static final int TileFluidLoader_RATE = 20; - public static final int TileFluidUnloader_RATE = 80; - - private static final int TYPE_LOADER = 0; - private static final int TYPE_UNLOADER = 1; - - public ClassTransformer_Railcraft_FluidCartHandling(byte[] basicClass, boolean obfuscated, String aClassName) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - boolean aLoader = aClassName.equals("mods.railcraft.common.blocks.machine.gamma.TileFluidLoader"); - - FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Attempting to patch field TRANSFER_RATE in "+aClassName+", default value is "+(aLoader ? 20 : 80)); - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - - if (aLoader) { - aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); - addField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, "TRANSFER_RATE", aTempWriter, TYPE_LOADER); - } - else { - aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); - addField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, "TRANSFER_RATE", aTempWriter, TYPE_UNLOADER); - } - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Valid? "+isValid+"."); - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean addField(int access, String fieldName, ClassWriter cv, int aType) { - int aValue = (aType == TYPE_LOADER ? AsmConfig.maxRailcraftFluidLoaderFlow : AsmConfig.maxRailcraftFluidUnloaderFlow); - FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Injecting " + fieldName + " with new value: "+aValue); - FieldVisitor fv = cv.visitField(access, fieldName, "I", null, new Integer(aValue)); - if (fv != null) { - fv.visitEnd(); - return true; - } - return false; - } - - - - - public class AddFieldAdapter extends ClassVisitor { - - public AddFieldAdapter(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - @Override - public FieldVisitor visitField( - int access, String name, String desc, String signature, Object value) { - if (name.equals("TRANSFER_RATE") && desc.equals("I")) { - FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Removing "+"TRANSFER_RATE"+"."); - return null; - } - else { - FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Found Field "+name+" | "+desc); - } - return cv.visitField(access, name, desc, signature, value); - } - - } - - - - - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java deleted file mode 100644 index 1249df0777..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java +++ /dev/null @@ -1,695 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.lang.reflect.Method; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.FieldVisitor; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.asm.AsmConfig; -import net.minecraft.inventory.IInventory; - -public class ClassTransformer_Railcraft_FluidHelper { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public static int PROCESS_VOLUME; - - public ClassTransformer_Railcraft_FluidHelper(byte[] basicClass, boolean obfuscated2) { - - PROCESS_VOLUME = AsmConfig.maxRailcraftTankProcessVolume; - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Attempting to patch field PROCESS_VOLUME in mods.railcraft.common.fluids.FluidHelper with new value: "+PROCESS_VOLUME); - - boolean obfuscated = false; - boolean a1 = false; - boolean a2 = false; - - //Find Non-Obf method - try { - Method aGetStackInSlot = IInventory.class.getDeclaredMethod("getStackInSlot", int.class); - if (aGetStackInSlot != null) { - a1 = true; - } - } catch (NoSuchMethodException | SecurityException e) {} - - //Find Obf method - try { - Method aGetStackInSlotObf = IInventory.class.getDeclaredMethod("func_70301_a", int.class); - if (aGetStackInSlotObf != null) { - a2 = true; - } - } catch (NoSuchMethodException | SecurityException e) {} - - - if (a1) { - obfuscated = false; - } - else if (a2) { - obfuscated = true; - } - else { - //Fallback - obfuscated = false; - } - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Are we patching obfuscated methods? "+obfuscated); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); - - addField(ACC_PUBLIC + ACC_FINAL + ACC_STATIC, "PROCESS_VOLUME", aTempWriter); - injectMethod("fillContainers", aTempWriter, obfuscated); - injectMethod("drainContainers", aTempWriter, obfuscated); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Valid? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean addField(int access, String fieldName, ClassWriter cv) { - FMLRelaunchLog.log( - "[GT++ ASM] Railcraft PROCESS_VOLUME Patch", - Level.INFO, - "Injecting " + fieldName + " with new value."); - FieldVisitor fv = cv.visitField(access, fieldName, "I", null, PROCESS_VOLUME); - if (fv != null) { - fv.visitEnd(); - return true; - } - return false; - } - - public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Injecting " + aMethodName + "."); - - if (aMethodName.equals("fillContainers") && !obfuscated) { - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "fillContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;IILnet/minecraftforge/fluids/Fluid;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(126, l0); - mv.visitVarInsn(ALOAD, 4); - Label l1 = new Label(); - mv.visitJumpInsn(IFNONNULL, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(127, l2); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - mv.visitLabel(l1); - mv.visitLineNumber(128, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 5); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(129, l3); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 6); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(130, l4); - mv.visitVarInsn(ALOAD, 5); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 4); - mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); - mv.visitVarInsn(ASTORE, 7); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(131, l5); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 6); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); - mv.visitJumpInsn(IFEQ, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(132, l7); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); - mv.visitVarInsn(ASTORE, 8); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(133, l8); - mv.visitVarInsn(ALOAD, 8); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 8); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitJumpInsn(IF_ICMPNE, l6); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(134, l9); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 8); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); - mv.visitVarInsn(ASTORE, 7); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(135, l10); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - Label l11 = new Label(); - mv.visitJumpInsn(IFNULL, l11); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitVarInsn(ALOAD, 8); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitJumpInsn(IF_ICMPNE, l11); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(136, l12); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); - mv.visitInsn(POP); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(137, l13); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); - mv.visitLabel(l11); - mv.visitLineNumber(139, l11); - mv.visitFrame(F_FULL, 9, new Object[] {"net/minecraftforge/fluids/IFluidHandler", "net/minecraft/inventory/IInventory", INTEGER, INTEGER, "net/minecraftforge/fluids/Fluid", "net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); - mv.visitInsn(ICONST_1); - mv.visitInsn(IRETURN); - mv.visitLabel(l6); - mv.visitLineNumber(142, l6); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLocalVariable("drain", "Lnet/minecraftforge/fluids/FluidStack;", null, l8, l6, 8); - mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l14, 0); - mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l14, 1); - mv.visitLocalVariable("inputSlot", "I", null, l0, l14, 2); - mv.visitLocalVariable("outputSlot", "I", null, l0, l14, 3); - mv.visitLocalVariable("fluidToFill", "Lnet/minecraftforge/fluids/Fluid;", null, l0, l14, 4); - mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l3, l14, 5); - mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l4, l14, 6); - mv.visitLocalVariable("fill", "Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", null, l5, l14, 7); - mv.visitMaxs(5, 9); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals("fillContainers") && obfuscated) { - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "fillContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;IILnet/minecraftforge/fluids/Fluid;)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(126, l0); - mv.visitVarInsn(ALOAD, 4); - Label l1 = new Label(); - mv.visitJumpInsn(IFNONNULL, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(127, l2); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - mv.visitLabel(l1); - mv.visitLineNumber(128, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 5); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(129, l3); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 6); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(130, l4); - mv.visitVarInsn(ALOAD, 5); - mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); - mv.visitInsn(DUP); - mv.visitVarInsn(ALOAD, 4); - mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); - mv.visitVarInsn(ASTORE, 7); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(131, l5); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 6); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); - mv.visitJumpInsn(IFEQ, l6); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(132, l7); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); - mv.visitVarInsn(ASTORE, 8); - Label l8 = new Label(); - mv.visitLabel(l8); - mv.visitLineNumber(133, l8); - mv.visitVarInsn(ALOAD, 8); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 8); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitJumpInsn(IF_ICMPNE, l6); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(134, l9); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 8); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); - mv.visitVarInsn(ASTORE, 7); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(135, l10); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - Label l11 = new Label(); - mv.visitJumpInsn(IFNULL, l11); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitVarInsn(ALOAD, 8); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitJumpInsn(IF_ICMPNE, l11); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(136, l12); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); - mv.visitInsn(POP); - Label l13 = new Label(); - mv.visitLabel(l13); - mv.visitLineNumber(137, l13); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 7); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); - mv.visitLabel(l11); - mv.visitLineNumber(139, l11); - mv.visitFrame(F_FULL, 9, new Object[] {"net/minecraftforge/fluids/IFluidHandler", "net/minecraft/inventory/IInventory", INTEGER, INTEGER, "net/minecraftforge/fluids/Fluid", "net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); - mv.visitInsn(ICONST_1); - mv.visitInsn(IRETURN); - mv.visitLabel(l6); - mv.visitLineNumber(142, l6); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLocalVariable("drain", "Lnet/minecraftforge/fluids/FluidStack;", null, l8, l6, 8); - mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l14, 0); - mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l14, 1); - mv.visitLocalVariable("inputSlot", "I", null, l0, l14, 2); - mv.visitLocalVariable("outputSlot", "I", null, l0, l14, 3); - mv.visitLocalVariable("fluidToFill", "Lnet/minecraftforge/fluids/Fluid;", null, l0, l14, 4); - mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l3, l14, 5); - mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l4, l14, 6); - mv.visitLocalVariable("fill", "Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", null, l5, l14, 7); - mv.visitMaxs(5, 9); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals("drainContainers") && !obfuscated) { - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "drainContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;II)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(146, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 4); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(147, l1); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 5); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(148, l2); - mv.visitVarInsn(ALOAD, 4); - Label l3 = new Label(); - mv.visitJumpInsn(IFNULL, l3); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(149, l4); - mv.visitVarInsn(ALOAD, 4); - mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "drainContainer", "(Lnet/minecraft/item/ItemStack;I)Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", false); - mv.visitVarInsn(ASTORE, 6); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(150, l5); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitJumpInsn(IFNULL, l3); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); - mv.visitJumpInsn(IFEQ, l3); - mv.visitLabel(l6); - mv.visitLineNumber(151, l6); - mv.visitFrame(F_APPEND,3, new Object[] {"net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn"}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); - mv.visitVarInsn(ISTORE, 7); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(152, l7); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); - Label l8 = new Label(); - mv.visitJumpInsn(IFEQ, l8); - mv.visitVarInsn(ILOAD, 7); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - Label l9 = new Label(); - mv.visitJumpInsn(IF_ICMPEQ, l9); - mv.visitLabel(l8); - mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); - mv.visitJumpInsn(IFNE, l3); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitJumpInsn(IFLE, l3); - mv.visitLabel(l9); - mv.visitLineNumber(153, l9); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); - mv.visitInsn(POP); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(154, l10); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(155, l11); - mv.visitInsn(ICONST_1); - mv.visitInsn(IRETURN); - mv.visitLabel(l3); - mv.visitLineNumber(159, l3); - mv.visitFrame(F_CHOP,2, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLocalVariable("used", "I", null, l7, l3, 7); - mv.visitLocalVariable("drain", "Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", null, l5, l3, 6); - mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l12, 0); - mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l12, 1); - mv.visitLocalVariable("inputSlot", "I", null, l0, l12, 2); - mv.visitLocalVariable("outputSlot", "I", null, l0, l12, 3); - mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l1, l12, 4); - mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l2, l12, 5); - mv.visitMaxs(4, 8); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals("drainContainers") && obfuscated) { - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "drainContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;II)Z", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(146, l0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 4); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(147, l1); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 3); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); - mv.visitVarInsn(ASTORE, 5); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(148, l2); - mv.visitVarInsn(ALOAD, 4); - Label l3 = new Label(); - mv.visitJumpInsn(IFNULL, l3); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(149, l4); - mv.visitVarInsn(ALOAD, 4); - mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "drainContainer", "(Lnet/minecraft/item/ItemStack;I)Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", false); - mv.visitVarInsn(ASTORE, 6); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(150, l5); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitJumpInsn(IFNULL, l3); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); - Label l6 = new Label(); - mv.visitJumpInsn(IFNULL, l6); - mv.visitVarInsn(ALOAD, 5); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); - mv.visitJumpInsn(IFEQ, l3); - mv.visitLabel(l6); - mv.visitLineNumber(151, l6); - mv.visitFrame(F_APPEND,3, new Object[] {"net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn"}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); - mv.visitVarInsn(ISTORE, 7); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(152, l7); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); - Label l8 = new Label(); - mv.visitJumpInsn(IFEQ, l8); - mv.visitVarInsn(ILOAD, 7); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - Label l9 = new Label(); - mv.visitJumpInsn(IF_ICMPEQ, l9); - mv.visitLabel(l8); - mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); - mv.visitJumpInsn(IFNE, l3); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); - mv.visitJumpInsn(IFLE, l3); - mv.visitLabel(l9); - mv.visitLineNumber(153, l9); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); - mv.visitInsn(ICONST_1); - mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); - mv.visitInsn(POP); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(154, l10); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ALOAD, 6); - mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); - mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(155, l11); - mv.visitInsn(ICONST_1); - mv.visitInsn(IRETURN); - mv.visitLabel(l3); - mv.visitLineNumber(159, l3); - mv.visitFrame(F_CHOP,2, null, 0, null); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLocalVariable("used", "I", null, l7, l3, 7); - mv.visitLocalVariable("drain", "Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", null, l5, l3, 6); - mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l12, 0); - mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l12, 1); - mv.visitLocalVariable("inputSlot", "I", null, l0, l12, 2); - mv.visitLocalVariable("outputSlot", "I", null, l0, l12, 3); - mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l1, l12, 4); - mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l2, l12, 5); - mv.visitMaxs(4, 8); - mv.visitEnd(); - didInject = true; - } - - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); - return didInject; - } - - - - - - - - - - public class AddFieldAdapter extends ClassVisitor { - - public AddFieldAdapter(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - @Override - public FieldVisitor visitField( - int access, String name, String desc, String signature, Object value) { - if (name.equals("PROCESS_VOLUME") && desc.equals("I")) { - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Removing "+"PROCESS_VOLUME"+"."); - return null; - } - return cv.visitField(access, name, desc, signature, value); - } - - - private final String[] aMethodsToStrip = new String[] {"fillContainers", "drainContainers"}; - - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - found = true; - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - else { - methodVisitor = null; - } - - if (found) { - FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - - - } - - - - - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java deleted file mode 100644 index 75896c1c0f..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java +++ /dev/null @@ -1,235 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ACC_STATIC; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ARETURN; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; - -import java.lang.reflect.Method; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gregtech.api.enums.GT_Values; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; - -public class ClassTransformer_Railcraft_InvTools { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - private boolean obfuscated = true; - - - public static ItemStack depleteItem(ItemStack stack) { - if (stack == null) { - return GT_Values.NI; - } else { - if (stack.stackSize == 0) { - return GT_Values.NI; - } - else if (stack.stackSize == 1) { - ItemStack container = stack.getItem().getContainerItem(stack); - if (container != null) { - return container; - } else { - return GT_Values.NI; - } - } - else { - return ItemUtils.depleteStack(stack); - } - } - } - - public ClassTransformer_Railcraft_InvTools(byte[] basicClass, boolean obfuscated2) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - boolean devEnv = false; - boolean a1 = false; - boolean a2 = false; - - //Find Non-Obf method - try { - Method aGetStackInSlot = IInventory.class.getDeclaredMethod("getStackInSlot", int.class); - if (aGetStackInSlot != null) { - a1 = true; - } - } catch (NoSuchMethodException | SecurityException e) {} - - //Find Obf method - try { - Method aGetStackInSlotObf = IInventory.class.getDeclaredMethod("func_70301_a", int.class); - if (aGetStackInSlotObf != null) { - a2 = true; - } - } catch (NoSuchMethodException | SecurityException e) {} - - - if (a1) { - devEnv = false; - } - else if (a2) { - devEnv = true; - } - else { - //Fallback - devEnv = false; - } - - if (obfuscated && devEnv) { - - } - else { - - - } - - - - FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Are we patching obfuscated method? "+obfuscated); - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); - - injectMethod("depleteItem", aTempWriter, obfuscated); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - - FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Valid? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Injecting " + aMethodName + "."); - if (aMethodName.equals("depleteItem") && !obfuscated) { - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "depleteItem", "(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(36, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools", "depleteItem", "(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals("depleteItem") && obfuscated) { - mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "depleteItem", "(Ladd;)Ladd;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(36, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools", "depleteItem", "(Ladd;)Ladd;", false); - mv.visitInsn(ARETURN); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLocalVariable("stack", "Ladd;", null, l0, l1, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - } - FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); - return didInject; - } - - - - - - - - - - public class AddFieldAdapter extends ClassVisitor { - - public AddFieldAdapter(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - private final String[] aMethodsToStrip = new String[] {"depleteItem"}; - - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - found = true; - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - else { - if (desc.equals("(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;")) { - obfuscated = false; - } - else if (desc.equals("(Ladd;)Ladd;")) { - obfuscated = true; - } - else { - obfuscated = false; - } - FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, - "Method desc " + desc + ", using "+(obfuscated ? "obfuscated method handler" : "deobfuscated method handler")); - methodVisitor = null; - } - - if (found) { - FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - - - } - - - - - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java deleted file mode 100644 index 8f65709478..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java +++ /dev/null @@ -1,278 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.AALOAD; -import static org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static org.objectweb.asm.Opcodes.ACONST_NULL; -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ARETURN; -import static org.objectweb.asm.Opcodes.ARRAYLENGTH; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.ASTORE; -import static org.objectweb.asm.Opcodes.DUP; -import static org.objectweb.asm.Opcodes.F_APPEND; -import static org.objectweb.asm.Opcodes.F_CHOP; -import static org.objectweb.asm.Opcodes.F_SAME; -import static org.objectweb.asm.Opcodes.F_SAME1; -import static org.objectweb.asm.Opcodes.GETSTATIC; -import static org.objectweb.asm.Opcodes.GOTO; -import static org.objectweb.asm.Opcodes.I2L; -import static org.objectweb.asm.Opcodes.ICONST_0; -import static org.objectweb.asm.Opcodes.IFEQ; -import static org.objectweb.asm.Opcodes.IFLE; -import static org.objectweb.asm.Opcodes.IFNONNULL; -import static org.objectweb.asm.Opcodes.IFNULL; -import static org.objectweb.asm.Opcodes.ILOAD; -import static org.objectweb.asm.Opcodes.INVOKESPECIAL; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; -import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL; -import static org.objectweb.asm.Opcodes.IRETURN; -import static org.objectweb.asm.Opcodes.ISTORE; -import static org.objectweb.asm.Opcodes.L2I; -import static org.objectweb.asm.Opcodes.LDIV; -import static org.objectweb.asm.Opcodes.LREM; -import static org.objectweb.asm.Opcodes.NEW; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - -public class ClassTransformer_TC_ItemWispEssence { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - public ClassTransformer_TC_ItemWispEssence(byte[] basicClass, boolean obfuscated2) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - boolean obfuscated = obfuscated2; - FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Are we patching obfuscated methods? "+obfuscated); - String aGetColour = obfuscated ? DevHelper.getSRG("getColorFromItemStack") : "getColorFromItemStack"; - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new AddAdapter(aTempWriter, new String[] {"getAspects", aGetColour}), 0); - injectMethod("getAspects", aTempWriter, obfuscated); - injectMethod(aGetColour, aTempWriter, obfuscated); - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Valid? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { - MethodVisitor mv; - boolean didInject = false; - FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Injecting " + aMethodName + "."); - - String aGetColour = obfuscated ? "func_82790_a" : "getColorFromItemStack"; - String aHasTagCompound = obfuscated ? "func_77942_o" : "hasTagCompound"; - String aGetTagCompound = obfuscated ? "func_77978_p" : "getTagCompound"; - - if (aMethodName.equals("getAspects")) { - mv = cw.visitMethod(ACC_PUBLIC, "getAspects", "(Lnet/minecraft/item/ItemStack;)Lthaumcraft/api/aspects/AspectList;", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(141, l0); - mv.visitVarInsn(ALOAD, 1); - Label l1 = new Label(); - mv.visitJumpInsn(IFNONNULL, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(142, l2); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - mv.visitLabel(l1); - mv.visitLineNumber(144, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", aHasTagCompound, "()Z", false); - Label l3 = new Label(); - mv.visitJumpInsn(IFEQ, l3); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(145, l4); - mv.visitTypeInsn(NEW, "thaumcraft/api/aspects/AspectList"); - mv.visitInsn(DUP); - mv.visitMethodInsn(INVOKESPECIAL, "thaumcraft/api/aspects/AspectList", "", "()V", false); - mv.visitVarInsn(ASTORE, 2); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(146, l5); - mv.visitVarInsn(ALOAD, 2); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", aGetTagCompound, "()Lnet/minecraft/nbt/NBTTagCompound;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/AspectList", "readFromNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V", false); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(147, l6); - mv.visitVarInsn(ALOAD, 2); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/AspectList", "size", "()I", false); - Label l7 = new Label(); - mv.visitJumpInsn(IFLE, l7); - mv.visitVarInsn(ALOAD, 2); - Label l8 = new Label(); - mv.visitJumpInsn(GOTO, l8); - mv.visitLabel(l7); - mv.visitFrame(F_APPEND,1, new Object[] {"thaumcraft/api/aspects/AspectList"}, 0, null); - mv.visitInsn(ACONST_NULL); - mv.visitLabel(l8); - mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"thaumcraft/api/aspects/AspectList"}); - mv.visitInsn(ARETURN); - mv.visitLabel(l3); - mv.visitLineNumber(149, l3); - mv.visitFrame(F_CHOP,1, null, 0, null); - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLocalVariable("this", "LgtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence;", null, l0, l9, 0); - mv.visitLocalVariable("itemstack", "Lnet/minecraft/item/ItemStack;", null, l0, l9, 1); - mv.visitLocalVariable("aspects", "Lthaumcraft/api/aspects/AspectList;", null, l5, l3, 2); - mv.visitMaxs(2, 3); - mv.visitEnd(); - didInject = true; - } - else if (aMethodName.equals(aGetColour)) { - - //thaumcraft/common/items/ItemWispEssence - mv = cw.visitMethod(ACC_PUBLIC, aGetColour, "(Lnet/minecraft/item/ItemStack;I)I", null, null); - AnnotationVisitor av0; - { - av0 = mv.visitAnnotation("Lcpw/mods/fml/relauncher/SideOnly;", true); - av0.visitEnum("value", "Lcpw/mods/fml/relauncher/Side;", "CLIENT"); - av0.visitEnd(); - } - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(197, l0); - mv.visitVarInsn(ALOAD, 1); - Label l1 = new Label(); - mv.visitJumpInsn(IFNONNULL, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(198, l2); - mv.visitInsn(ICONST_0); - mv.visitInsn(IRETURN); - mv.visitLabel(l1); - mv.visitLineNumber(200, l1); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/items/ItemWispEssence", "getAspects", "(Lnet/minecraft/item/ItemStack;)Lthaumcraft/api/aspects/AspectList;", false); - Label l3 = new Label(); - mv.visitJumpInsn(IFNULL, l3); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(201, l4); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/items/ItemWispEssence", "getAspects", "(Lnet/minecraft/item/ItemStack;)Lthaumcraft/api/aspects/AspectList;", false); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/AspectList", "getAspects", "()[Lthaumcraft/api/aspects/Aspect;", false); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/Aspect", "getColor", "()I", false); - mv.visitInsn(IRETURN); - mv.visitLabel(l3); - mv.visitLineNumber(203, l3); - mv.visitFrame(F_SAME, 0, null, 0, null); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "currentTimeMillis", "()J", false); - mv.visitLdcInsn(new Long(500L)); - mv.visitInsn(LDIV); - mv.visitFieldInsn(GETSTATIC, "thaumcraft/common/items/ItemWispEssence", "displayAspects", "[Lthaumcraft/api/aspects/Aspect;"); - mv.visitInsn(ARRAYLENGTH); - mv.visitInsn(I2L); - mv.visitInsn(LREM); - mv.visitInsn(L2I); - mv.visitVarInsn(ISTORE, 3); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(204, l5); - mv.visitFieldInsn(GETSTATIC, "thaumcraft/common/items/ItemWispEssence", "displayAspects", "[Lthaumcraft/api/aspects/Aspect;"); - mv.visitVarInsn(ILOAD, 3); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/Aspect", "getColor", "()I", false); - mv.visitInsn(IRETURN); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLocalVariable("this", "Lthaumcraft/common/items/ItemWispEssence;", null, l0, l6, 0); - mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l0, l6, 1); - mv.visitLocalVariable("par2", "I", null, l0, l6, 2); - mv.visitLocalVariable("idx", "I", null, l5, l6, 3); - mv.visitMaxs(4, 4); - mv.visitEnd(); - didInject = true; - } - - FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); - return didInject; - } - - public class AddAdapter extends ClassVisitor { - - public AddAdapter(ClassVisitor cv, String[] aMethods) { - super(ASM5, cv); - this.cv = cv; - this.aMethodsToStrip = aMethods; - } - - private final String[] aMethodsToStrip; - - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - found = true; - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - else { - methodVisitor = null; - } - - if (found) { - FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - - } - - - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java deleted file mode 100644 index 05b8054ff8..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java +++ /dev/null @@ -1,611 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.*; - -import cpw.mods.fml.common.Loader; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.Preloader_Logger; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -public class ClassTransformer_TT_ThaumicRestorer { - - private final boolean isValid; - private final ClassReader reader; - private final ClassWriter writer; - - private static boolean mInit = false; - - private static Class mTileRepairerClass; - private static Class mTTConfigHandler; - private static Class mTinkersConstructCompat; - private static Class mThaumicTinkerer; - private static Class mTCProxy; - - private static Method mIsTcTool; - private static Method mGetTcDamage; - private static Method mFixTcDamage; - private static Method mSparkle; - private static Method mDrawEssentia; - - private static Field mRepairTiconTools; - private static Field mTicksExisted; - private static Field mInventory; - private static Field mTookLastTick; - private static Field mDamageLastTick; - private static Field mProxyTC; - - private static boolean repairTConTools = false; - - // thaumic.tinkerer.common.block.tile.TileRepairer - - private static final boolean isTConstructTool(ItemStack aStack) { - return ReflectionUtils.invoke(null, mIsTcTool, new Object[] {aStack}); - } - private static final int getDamage(ItemStack aStack) { - return (int) ReflectionUtils.invokeNonBool(null, mGetTcDamage, new Object[] {aStack}); - } - private static final boolean fixDamage(ItemStack aStack, int aAmount) { - return ReflectionUtils.invoke(null, mFixTcDamage, new Object[] {aStack, aAmount}); - } - private static final int drawEssentia(TileEntity aTile) { - return (int) ReflectionUtils.invokeNonBool(aTile, mDrawEssentia, new Object[] {}); - } - private static final void sparkle(float a, float b, float c, int d) { - ReflectionUtils.invokeVoid(ReflectionUtils.getFieldValue(mProxyTC), mSparkle, new Object[] {a, b, c, d}); - } - - public static void updateEntity(TileEntity aTile) { - if (!mInit) { - // Set the classes we need - mTileRepairerClass = ReflectionUtils.getClass("thaumic.tinkerer.common.block.tile.TileRepairer"); - mTTConfigHandler = ReflectionUtils.getClass("thaumic.tinkerer.common.core.handler.ConfigHandler"); - mTinkersConstructCompat = ReflectionUtils.getClass("thaumic.tinkerer.common.compat.TinkersConstructCompat"); - mThaumicTinkerer = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); - mTCProxy = ReflectionUtils.getClass("thaumcraft.common.CommonProxy"); - // Set the methods we need - mIsTcTool = ReflectionUtils.getMethod(mTinkersConstructCompat, "isTConstructTool", new Class[] {ItemStack.class}); - mGetTcDamage = ReflectionUtils.getMethod(mTinkersConstructCompat, "getDamage", new Class[] {ItemStack.class}); - mFixTcDamage = ReflectionUtils.getMethod(mTinkersConstructCompat, "fixDamage", new Class[] {ItemStack.class, int.class}); - mSparkle = ReflectionUtils.getMethod(mTCProxy, "sparkle", new Class[] {float.class, float.class, float.class, int.class}); - mDrawEssentia = ReflectionUtils.getMethod(mTileRepairerClass, "drawEssentia", new Class[] {}); - // Set the fields we need - mRepairTiconTools = ReflectionUtils.getField(mTTConfigHandler, "repairTConTools"); - mTicksExisted = ReflectionUtils.getField(mTileRepairerClass, "ticksExisted"); - mInventory = ReflectionUtils.getField(mTileRepairerClass, "inventorySlots"); - mTookLastTick = ReflectionUtils.getField(mTileRepairerClass, "tookLastTick"); - mDamageLastTick = ReflectionUtils.getField(mTileRepairerClass, "dmgLastTick"); - mProxyTC = ReflectionUtils.getField(mThaumicTinkerer, "tcProxy"); - repairTConTools = (boolean) ReflectionUtils.getFieldValue(mRepairTiconTools); - mInit = true; - } - if (mInit) { - if (mTileRepairerClass.isInstance(aTile)) { - int ticksExisted = (int) ReflectionUtils.getFieldValue(mTicksExisted, aTile); - ItemStack[] inventorySlots = (ItemStack[]) ReflectionUtils.getFieldValue(mInventory, aTile); - boolean tookLastTick = (boolean) ReflectionUtils.getFieldValue(mTookLastTick, aTile); - int dmgLastTick = (int) ReflectionUtils.getFieldValue(mDamageLastTick, aTile); - ticksExisted++; - ReflectionUtils.setField(aTile, mTicksExisted, ticksExisted); - boolean aDidRun = false; - if (ticksExisted % 10 == 0) { - if (Loader.isModLoaded("TConstruct") && repairTConTools && inventorySlots[0] != null && isTConstructTool(inventorySlots[0])) { - final int dmg = getDamage(inventorySlots[0]); - if (dmg > 0) { - final int essentia = drawEssentia(aTile); - fixDamage(inventorySlots[0], essentia); - aTile.markDirty(); - if (dmgLastTick != 0 && dmgLastTick != dmg) { - sparkle((float)(aTile.xCoord + 0.25 + Math.random() / 2.0), (float)(aTile.yCoord + 1 + Math.random() / 2.0), (float)(aTile.zCoord + 0.25 + Math.random() / 2.0), 0); - tookLastTick = true; - } - else { - tookLastTick = false; - } - } - else { - tookLastTick = false; - } - dmgLastTick = ((inventorySlots[0] == null) ? 0 : getDamage(inventorySlots[0])); - aDidRun = true; - } - if (inventorySlots[0] != null && inventorySlots[0].getItemDamage() > 0 && inventorySlots[0].getItem().isRepairable()) { - final int essentia2 = drawEssentia(aTile); - final int dmg2 = inventorySlots[0].getItemDamage(); - inventorySlots[0].setItemDamage(Math.max(0, dmg2 - essentia2)); - aTile.markDirty(); - if (dmgLastTick != 0 && dmgLastTick != dmg2) { - sparkle((float)(aTile.xCoord + 0.25 + Math.random() / 2.0), (float)(aTile.yCoord + 1 + Math.random() / 2.0), (float)(aTile.zCoord + 0.25 + Math.random() / 2.0), 0); - tookLastTick = true; - } - else { - tookLastTick = false; - } - } - else { - tookLastTick = false; - } - dmgLastTick = ((inventorySlots[0] == null) ? 0 : inventorySlots[0].getItemDamage()); - aDidRun = true; - } - if (aDidRun) { - ReflectionUtils.setField(aTile, mInventory, inventorySlots); - ReflectionUtils.setField(aTile, mTookLastTick, tookLastTick); - ReflectionUtils.setField(aTile, mDamageLastTick, dmgLastTick); - } - } - } - } - - public ClassTransformer_TT_ThaumicRestorer(byte[] basicClass) { - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - boolean obfuscated = false; - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - AddAdapter aMethodStripper = new AddAdapter(aTempWriter); - aTempReader.accept(aMethodStripper, 0); - obfuscated = aMethodStripper.isObfuscated; - String aUpdateEntity = obfuscated ? "func_145845_h" : "updateEntity"; - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Patching: "+aUpdateEntity+", Are we patching obfuscated methods? "+obfuscated); - //injectMethod(aUpdateEntity, aTempWriter, obfuscated); - injectMethodNew(aTempWriter, obfuscated); - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Valid? "+isValid+"."); - reader = aTempReader; - writer = aTempWriter; - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public boolean injectMethodNew(ClassWriter cw, boolean obfuscated) { - MethodVisitor mv; - boolean didInject = false; - String aUpdateEntity = obfuscated ? "func_145845_h" : "updateEntity"; - String aTileEntity = obfuscated ? "aor" : "net/minecraft/tileentity/TileEntity"; - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Injecting " + aUpdateEntity + "."); - mv = cw.visitMethod(ACC_PUBLIC, aUpdateEntity, "()V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(60, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer", "updateEntity", "(L"+aTileEntity+";)V", false); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(61, l1); - mv.visitInsn(RETURN); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLocalVariable("this", "Lthaumic/tinkerer/common/block/tile/TileRepairer;", null, l0, l2, 0); - mv.visitMaxs(1, 1); - mv.visitEnd(); - didInject = true; - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); - return didInject; - } - - public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { - MethodVisitor mv; - boolean didInject = false; - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Injecting " + aMethodName + "."); - - String aItemStack = obfuscated ? "add" : "net/minecraft/item/ItemStack"; - String aItem = obfuscated ? "adb" : "net/minecraft/item/Item"; - String aGetItemDamage = obfuscated ? "func_150976_a" : "getItemDamage"; - String aGetItem = obfuscated ? "func_77973_b" : "getItem"; - String aSetItemDamage = obfuscated ? "func_77964_b" : "setItemDamage"; - String aIsRepairable = obfuscated ? "func_82789_a" : "isRepairable"; - - mv = cw.visitMethod(ACC_PUBLIC, aMethodName, "()V", null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(59, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(DUP); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "ticksExisted", "I"); - mv.visitInsn(ICONST_1); - mv.visitInsn(IADD); - mv.visitInsn(DUP_X1); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "ticksExisted", "I"); - mv.visitIntInsn(BIPUSH, 10); - mv.visitInsn(IREM); - Label l1 = new Label(); - mv.visitJumpInsn(IFNE, l1); - Label l2 = new Label(); - mv.visitLabel(l2); - mv.visitLineNumber(60, l2); - mv.visitLdcInsn("TConstruct"); - mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/Loader", "isModLoaded", "(Ljava/lang/String;)Z", false); - Label l3 = new Label(); - mv.visitJumpInsn(IFEQ, l3); - mv.visitFieldInsn(GETSTATIC, "thaumic/tinkerer/common/core/handler/ConfigHandler", "repairTConTools", "Z"); - mv.visitJumpInsn(IFEQ, l3); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLineNumber(61, l4); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitJumpInsn(IFNULL, l3); - Label l5 = new Label(); - mv.visitLabel(l5); - mv.visitLineNumber(62, l5); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "isTConstructTool", "(L"+aItemStack+";)Z", false); - mv.visitJumpInsn(IFEQ, l3); - Label l6 = new Label(); - mv.visitLabel(l6); - mv.visitLineNumber(63, l6); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "getDamage", "(L"+aItemStack+";)I", false); - mv.visitVarInsn(ISTORE, 1); - Label l7 = new Label(); - mv.visitLabel(l7); - mv.visitLineNumber(64, l7); - mv.visitVarInsn(ILOAD, 1); - Label l8 = new Label(); - mv.visitJumpInsn(IFLE, l8); - Label l9 = new Label(); - mv.visitLabel(l9); - mv.visitLineNumber(65, l9); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "drawEssentia", "()I", false); - mv.visitVarInsn(ISTORE, 2); - Label l10 = new Label(); - mv.visitLabel(l10); - mv.visitLineNumber(66, l10); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitVarInsn(ILOAD, 2); - mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "fixDamage", "(L"+aItemStack+";I)Z", false); - mv.visitInsn(POP); - Label l11 = new Label(); - mv.visitLabel(l11); - mv.visitLineNumber(67, l11); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "markDirty", "()V", false); - Label l12 = new Label(); - mv.visitLabel(l12); - mv.visitLineNumber(68, l12); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); - Label l13 = new Label(); - mv.visitJumpInsn(IFEQ, l13); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); - mv.visitVarInsn(ILOAD, 1); - mv.visitJumpInsn(IF_ICMPEQ, l13); - Label l14 = new Label(); - mv.visitLabel(l14); - mv.visitLineNumber(69, l14); - mv.visitFieldInsn(GETSTATIC, "thaumic/tinkerer/common/ThaumicTinkerer", "tcProxy", "Lthaumcraft/common/CommonProxy;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "xCoord", "I"); - mv.visitInsn(I2D); - mv.visitLdcInsn(new Double("0.25")); - mv.visitInsn(DADD); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); - mv.visitLdcInsn(new Double("2.0")); - mv.visitInsn(DDIV); - mv.visitInsn(DADD); - mv.visitInsn(D2F); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "yCoord", "I"); - mv.visitInsn(ICONST_1); - mv.visitInsn(IADD); - mv.visitInsn(I2D); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); - mv.visitLdcInsn(new Double("2.0")); - mv.visitInsn(DDIV); - mv.visitInsn(DADD); - mv.visitInsn(D2F); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "zCoord", "I"); - mv.visitInsn(I2D); - mv.visitLdcInsn(new Double("0.25")); - mv.visitInsn(DADD); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); - mv.visitLdcInsn(new Double("2.0")); - mv.visitInsn(DDIV); - mv.visitInsn(DADD); - mv.visitInsn(D2F); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/CommonProxy", "sparkle", "(FFFI)V", false); - Label l15 = new Label(); - mv.visitLabel(l15); - mv.visitLineNumber(70, l15); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_1); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); - Label l16 = new Label(); - mv.visitLabel(l16); - mv.visitLineNumber(71, l16); - Label l17 = new Label(); - mv.visitJumpInsn(GOTO, l17); - mv.visitLabel(l13); - mv.visitFrame(Opcodes.F_APPEND,2, new Object[] {Opcodes.INTEGER, Opcodes.INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_0); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); - Label l18 = new Label(); - mv.visitLabel(l18); - mv.visitLineNumber(72, l18); - mv.visitJumpInsn(GOTO, l17); - mv.visitLabel(l8); - mv.visitFrame(Opcodes.F_CHOP,1, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_0); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); - mv.visitLabel(l17); - mv.visitLineNumber(73, l17); - mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - Label l19 = new Label(); - mv.visitJumpInsn(IFNONNULL, l19); - mv.visitInsn(ICONST_0); - Label l20 = new Label(); - mv.visitJumpInsn(GOTO, l20); - mv.visitLabel(l19); - mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer"}); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "getDamage", "(L"+aItemStack+";)I", false); - mv.visitLabel(l20); - mv.visitFrame(Opcodes.F_FULL, 2, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer", Opcodes.INTEGER}, 2, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer", Opcodes.INTEGER}); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); - Label l21 = new Label(); - mv.visitLabel(l21); - mv.visitLineNumber(74, l21); - mv.visitInsn(RETURN); - mv.visitLabel(l3); - mv.visitLineNumber(78, l3); - mv.visitFrame(Opcodes.F_CHOP,1, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - Label l22 = new Label(); - mv.visitJumpInsn(IFNULL, l22); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItemDamage+"", "()I", false); - mv.visitJumpInsn(IFLE, l22); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItem+"", "()L"+aItem+";", false); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItem+"", ""+aIsRepairable+"", "()Z", false); - mv.visitJumpInsn(IFEQ, l22); - Label l23 = new Label(); - mv.visitLabel(l23); - mv.visitLineNumber(79, l23); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "drawEssentia", "()I", false); - mv.visitVarInsn(ISTORE, 1); - Label l24 = new Label(); - mv.visitLabel(l24); - mv.visitLineNumber(80, l24); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItemDamage+"", "()I", false); - mv.visitVarInsn(ISTORE, 2); - Label l25 = new Label(); - mv.visitLabel(l25); - mv.visitLineNumber(81, l25); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitInsn(ICONST_0); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 1); - mv.visitInsn(ISUB); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "max", "(II)I", false); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aSetItemDamage+"", "(I)V", false); - Label l26 = new Label(); - mv.visitLabel(l26); - mv.visitLineNumber(82, l26); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "markDirty", "()V", false); - Label l27 = new Label(); - mv.visitLabel(l27); - mv.visitLineNumber(84, l27); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); - Label l28 = new Label(); - mv.visitJumpInsn(IFEQ, l28); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); - mv.visitVarInsn(ILOAD, 2); - mv.visitJumpInsn(IF_ICMPEQ, l28); - Label l29 = new Label(); - mv.visitLabel(l29); - mv.visitLineNumber(85, l29); - mv.visitFieldInsn(GETSTATIC, "thaumic/tinkerer/common/ThaumicTinkerer", "tcProxy", "Lthaumcraft/common/CommonProxy;"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "xCoord", "I"); - mv.visitInsn(I2D); - mv.visitLdcInsn(new Double("0.25")); - mv.visitInsn(DADD); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); - mv.visitLdcInsn(new Double("2.0")); - mv.visitInsn(DDIV); - mv.visitInsn(DADD); - mv.visitInsn(D2F); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "yCoord", "I"); - mv.visitInsn(ICONST_1); - mv.visitInsn(IADD); - mv.visitInsn(I2D); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); - mv.visitLdcInsn(new Double("2.0")); - mv.visitInsn(DDIV); - mv.visitInsn(DADD); - mv.visitInsn(D2F); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "zCoord", "I"); - mv.visitInsn(I2D); - mv.visitLdcInsn(new Double("0.25")); - mv.visitInsn(DADD); - mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); - mv.visitLdcInsn(new Double("2.0")); - mv.visitInsn(DDIV); - mv.visitInsn(DADD); - mv.visitInsn(D2F); - mv.visitInsn(ICONST_0); - mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/CommonProxy", "sparkle", "(FFFI)V", false); - Label l30 = new Label(); - mv.visitLabel(l30); - mv.visitLineNumber(86, l30); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_1); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); - Label l31 = new Label(); - mv.visitLabel(l31); - mv.visitLineNumber(87, l31); - Label l32 = new Label(); - mv.visitJumpInsn(GOTO, l32); - mv.visitLabel(l28); - mv.visitFrame(Opcodes.F_APPEND,2, new Object[] {Opcodes.INTEGER, Opcodes.INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_0); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); - Label l33 = new Label(); - mv.visitLabel(l33); - mv.visitLineNumber(88, l33); - mv.visitJumpInsn(GOTO, l32); - mv.visitLabel(l22); - mv.visitFrame(Opcodes.F_CHOP,2, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(ICONST_0); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); - mv.visitLabel(l32); - mv.visitLineNumber(90, l32); - mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - Label l34 = new Label(); - mv.visitJumpInsn(IFNONNULL, l34); - mv.visitInsn(ICONST_0); - Label l35 = new Label(); - mv.visitJumpInsn(GOTO, l35); - mv.visitLabel(l34); - mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer"}); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); - mv.visitInsn(ICONST_0); - mv.visitInsn(AALOAD); - mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItemDamage+"", "()I", false); - mv.visitLabel(l35); - mv.visitFrame(Opcodes.F_FULL, 1, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer"}, 2, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer", Opcodes.INTEGER}); - mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); - mv.visitLabel(l1); - mv.visitLineNumber(92, l1); - mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null); - mv.visitInsn(RETURN); - Label l36 = new Label(); - mv.visitLabel(l36); - mv.visitLocalVariable("this", "Lthaumic/tinkerer/common/block/tile/TileRepairer;", null, l0, l36, 0); - mv.visitLocalVariable("dmg", "I", null, l7, l3, 1); - mv.visitLocalVariable("essentia", "I", null, l10, l18, 2); - mv.visitLocalVariable("essentia", "I", null, l24, l33, 1); - mv.visitLocalVariable("dmg", "I", null, l25, l33, 2); - mv.visitMaxs(9, 3); - mv.visitEnd(); - didInject = true; - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); - return didInject; - } - - public class AddAdapter extends ClassVisitor { - - public AddAdapter(ClassVisitor cv) { - super(ASM5, cv); - this.cv = cv; - } - - private final String[] aMethodsToStrip = new String[] {"updateEntity", "func_145845_h"}; - public boolean isObfuscated = false; - - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - - MethodVisitor methodVisitor; - boolean found = false; - - for (String s : aMethodsToStrip) { - if (name.equals(s)) { - found = true; - if (s.equals(aMethodsToStrip[1])) { - isObfuscated = true; - } - break; - } - } - if (!found) { - methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - } - else { - methodVisitor = null; - } - - if (found) { - Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, - "Found method " + name + ", removing."); - } - return methodVisitor; - } - - } - - - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java b/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java deleted file mode 100644 index 083041050d..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java +++ /dev/null @@ -1,164 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.*; - -import java.io.IOException; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.preloader.DevHelper; - - -public class ClassTransformer_TiConFluids { - - - //Leftover Code, in case I ever want to inject interfaces. - //private static final String cloneableInterface = "java/lang/Cloneable"; - - //The qualified name of the class we plan to transform. - private static final String className = "tconstruct.smeltery.blocks.TConstructFluid"; - - private final boolean isValid; - private final boolean isObfuscated; - private final String methodName; - private final ClassReader reader; - private final ClassWriter writer; - - public ClassTransformer_TiConFluids(String aMethodName, boolean obfuscated, byte[] basicClass) { - isObfuscated = obfuscated; - - methodName = obfuscated ? DevHelper.getSRG(aMethodName) : aMethodName; - - ClassReader aTempReader = null; - ClassWriter aTempWriter = null; - - aTempReader = new ClassReader(basicClass); - aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); - aTempReader.accept(new localClassVisitir(aTempWriter, isObfuscated), 0); - - if (aTempReader != null && aTempWriter != null) { - isValid = true; - } - else { - isValid = false; - } - reader = aTempReader; - writer = aTempWriter; - - if (reader != null && writer != null) { - injectMethod(); - } - - } - - public boolean isValidTransformer() { - return isValid; - } - - public ClassReader getReader() { - return reader; - } - - public ClassWriter getWriter() { - return writer; - } - - public void injectMethod() { - if (isValidTransformer()) { - FMLRelaunchLog.log("[GT++ ASM] Bright Fluids", Level.INFO, "Injecting "+methodName+" into "+className+". ["+(isObfuscated ? "Obfuscated" : "Unobfuscated")+"]"); - //Account for Obfuscated constructor args. - String IBlockAccessName = isObfuscated ? "ahl" : "net/minecraft/world/IBlockAccess"; - String aConstructorTypes = "(L"+IBlockAccessName+";III)I"; - - MethodVisitor mv = getWriter().visitMethod(ACC_PUBLIC, methodName, aConstructorTypes, null, null); - mv.visitCode(); - Label l0 = new Label(); - mv.visitLabel(l0); - mv.visitLineNumber(17, l0); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, "tconstruct/smeltery/blocks/TConstructFluid", "maxScaledLight", "I"); - mv.visitVarInsn(ISTORE, 5); - Label l1 = new Label(); - mv.visitLabel(l1); - mv.visitLineNumber(18, l1); - mv.visitVarInsn(ILOAD, 5); - Label l2 = new Label(); - mv.visitJumpInsn(IFLE, l2); - Label l3 = new Label(); - mv.visitLabel(l3); - mv.visitLineNumber(19, l3); - mv.visitVarInsn(ILOAD, 5); - mv.visitInsn(IRETURN); - mv.visitLabel(l2); - mv.visitLineNumber(21, l2); - mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitVarInsn(ILOAD, 2); - mv.visitVarInsn(ILOAD, 3); - mv.visitVarInsn(ILOAD, 4); - //net.minecraftforge.fluids.BlockFluidClassic.getLightValue(IBlockAccess, int, int, int) - mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/BlockFluidClassic", methodName, aConstructorTypes, false); - mv.visitInsn(IRETURN); - Label l4 = new Label(); - mv.visitLabel(l4); - mv.visitLocalVariable("this", "Ltconstruct/smeltery/blocks/TConstructFluid;", null, l0, l4, 0); - mv.visitLocalVariable("world", "L"+IBlockAccessName+";", null, l0, l4, 1); - mv.visitLocalVariable("x", "I", null, l0, l4, 2); - mv.visitLocalVariable("y", "I", null, l0, l4, 3); - mv.visitLocalVariable("z", "I", null, l0, l4, 4); - mv.visitLocalVariable("maxLight", "I", null, l1, l4, 5); - mv.visitMaxs(5, 6); - mv.visitEnd(); - FMLRelaunchLog.log("[GT++ ASM] Bright Fluids", Level.INFO, "Method injection complete."); - - } - } - - public final class localClassVisitir extends ClassVisitor { - - private final boolean mIsObfuscated; - - public localClassVisitir(ClassVisitor cv, boolean obfuscated) { - super(ASM5, cv); - mIsObfuscated = obfuscated; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - String IBlockAccessName = isObfuscated ? "ahl" : "net/minecraft/world/IBlockAccess"; - String aConstructorTypes = "(L"+IBlockAccessName+";III)I"; - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - if(name.equals(methodName) && desc.equals(aConstructorTypes)) { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Found target method. ["+mIsObfuscated+"]"); - return new localMethodVisitor(methodVisitor, mIsObfuscated); - } - return methodVisitor; - } - - } - - private final class localMethodVisitor extends MethodVisitor { - - private final boolean mObfuscated; - - public localMethodVisitor(MethodVisitor mv, boolean obfuscated) { - super(ASM5, mv); - this.mObfuscated = obfuscated; - } - - @Override - public void visitCode() { - - } - - } - - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java deleted file mode 100644 index 05a476c1c8..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java +++ /dev/null @@ -1,79 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import static org.objectweb.asm.Opcodes.ALOAD; -import static org.objectweb.asm.Opcodes.ASM5; -import static org.objectweb.asm.Opcodes.IFEQ; -import static org.objectweb.asm.Opcodes.INVOKESTATIC; -import static org.objectweb.asm.Opcodes.RETURN; - -import org.apache.logging.log4j.Level; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; - -public class Preloader_ClassTransformer { - - public static final class OreDictionaryVisitor extends ClassVisitor { - - public OreDictionaryVisitor(ClassVisitor cv) { - super(ASM5, cv); - } - - @Override - public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); - if(name.equals("registerOreImpl") && desc.equals("(Ljava/lang/String;Lnet/minecraft/item/ItemStack;)V")) { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Found target method. [Unobfuscated]"); - return new RegisterOreImplVisitor(methodVisitor, false); - } - else if(name.equals("registerOreImpl") && desc.equals("(Ljava/lang/String;Ladd;)V")) { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Found target method. [Obfuscated]"); - return new RegisterOreImplVisitor(methodVisitor, true); - } - return methodVisitor; - } - - } - - private static final class RegisterOreImplVisitor extends MethodVisitor { - - private final boolean mObfuscated; - - public RegisterOreImplVisitor(MethodVisitor mv, boolean obfuscated) { - super(ASM5, mv); - this.mObfuscated = obfuscated; - } - - @Override - public void visitCode() { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Fixing Forge's poor attempt at an oreDictionary."); - super.visitCode(); - super.visitVarInsn(ALOAD, 0); - super.visitVarInsn(ALOAD, 1); - if (!mObfuscated){ - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Injecting target method. [Unobfuscated]"); - super.visitMethodInsn(INVOKESTATIC, - "gtPlusPlus/preloader/Preloader_GT_OreDict", - "shouldPreventRegistration", - "(Ljava/lang/String;Lnet/minecraft/item/ItemStack;)Z", - false); - } - else { - FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Injecting target method. [Obfuscated]"); - super.visitMethodInsn(INVOKESTATIC, - "gtPlusPlus/preloader/Preloader_GT_OreDict", - "shouldPreventRegistration", - "(Ljava/lang/String;Ladd;)Z", - false); - } - Label endLabel = new Label(); - super.visitJumpInsn(IFEQ, endLabel); - super.visitInsn(RETURN); - super.visitLabel(endLabel); - } - - } - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java deleted file mode 100644 index 443337bd35..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java +++ /dev/null @@ -1,16 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -public class Preloader_ClassTransformer2 { - - /** - * - * So what I'd try is something like patch a new field into BaseMetaTileEntity to hold the ItemNBT, - * then patch GT_Block_Machines.breakBlock to store the ItemNBT into that field by calling setItemNBT, - * and then patch BaseMetaTileEntity.getDrops to retrieve that field instead of calling setItemNBT - * But there's probably a simpler solution if all you want to do is fix this - * for your super tanks rather than for all GT machines - * (which would only include saving the output count for chest buffers and item distributors...) - * - */ - -} diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java deleted file mode 100644 index 5cb2eef066..0000000000 --- a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java +++ /dev/null @@ -1,286 +0,0 @@ -package gtPlusPlus.preloader.asm.transformers; - -import cpw.mods.fml.relauncher.CoreModManager; -import cpw.mods.fml.relauncher.ReflectionHelper; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.preloader.DevHelper; -import gtPlusPlus.preloader.Preloader_Logger; -import gtPlusPlus.preloader.asm.AsmConfig; -import gtPlusPlus.preloader.asm.transformers.Preloader_ClassTransformer.OreDictionaryVisitor; -import net.minecraft.launchwrapper.IClassTransformer; -import net.minecraft.launchwrapper.Launch; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassWriter; - -import java.io.File; -import java.io.IOException; - -import static gtPlusPlus.preloader.asm.ClassesToTransform.*; - -public class Preloader_Transformer_Handler implements IClassTransformer { - - public static final AsmConfig mConfig; - public static final AutoMap IC2_WRENCH_PATCH_CLASS_NAMES = new AutoMap(); - - static { - mConfig = new AsmConfig(new File("config/GTplusplus/asm.cfg")); - Preloader_Logger.INFO("Config Location: "+AsmConfig.config.getConfigFile().getAbsolutePath()); - Preloader_Logger.INFO("Is DevHelper Valid? "+DevHelper.mIsValidHelper); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_BASE_TILE_ENTITY); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_MACHINE1); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_MACHINE2); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_MACHINE3); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_KINETIC_GENERATOR); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_HEAT_GENERATOR); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_GENERATOR); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_ACCESS_HATCH); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_CHAMBER); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_FLUID_PORT); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_REDSTONE_PORT); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_VESSEL); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_PERSONAL); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_CHARGEPAD); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_ELECTRIC); - IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_LUMINATOR); - } - - private static Boolean mObf = null; - - public boolean checkObfuscated() { - if (mObf != null) { - return mObf; - } - boolean obfuscated = false; - try { - obfuscated = !(boolean) ReflectionHelper.findField(CoreModManager.class, "deobfuscatedEnvironment").get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - byte[] bs; - try { - bs = Launch.classLoader.getClassBytes("net.minecraft.world.World"); - if (bs != null) { - obfuscated = false; - } else { - obfuscated = true; - } - } catch (IOException e1) { - e1.printStackTrace(); - obfuscated = false; - } - } - mObf = obfuscated; - return obfuscated; - } - - public byte[] transform(String name, String transformedName, byte[] basicClass) { - /* - * Here we patch all instances of entity.setHealth and replace them with a static function. - * Only EntityLivingBase is left untouched, as nothing else truly needs to be calling this method and avoiding forge hooks. - * May exclude all vanilla/forge class if this causes issues though. - */ - /* PatchForge : if (AsmConfig.enabledFixEntitySetHealth && !transformedName.contains("gtPlusPlus.preloader")) { - - //Skip Vanilla/Forge Classes - if (transformedName.contains("net.minecraft.") || transformedName.contains("cpw.")) { - //break PatchForge; - } - - ClassTransformer_Forge_EntityLivingBase_SetHealth aForgeHealthFix = new ClassTransformer_Forge_EntityLivingBase_SetHealth(transformedName, basicClass); - if (aForgeHealthFix.isValidTransformer() && aForgeHealthFix.didPatchClass()) { - Preloader_Logger.INFO("Fix EntityLivingBase.setHealth misuse", "Transforming "+transformedName); - basicClass = aForgeHealthFix.getWriter().toByteArray(); - } - }*/ - - // Is this environment obfuscated? (Extra checks just in case some weird shit happens during the check) - final boolean obfuscated = checkObfuscated(); - - // Fix LWJGL index array out of bounds on keybinding IDs - if ((transformedName.equals(LWJGL_KEYBOARD) || transformedName.equals(MINECRAFT_GAMESETTINGS_OBF) || transformedName.equals(MINECRAFT_GAMESETTINGS)) && AsmConfig.enabledLwjglKeybindingFix) { - boolean isClientSettingsClass = false; - if (!transformedName.equals("org.lwjgl.input.Keyboard")) { - isClientSettingsClass = true; - } - Preloader_Logger.INFO("LWJGL Keybinding index out of bounds fix", "Transforming "+transformedName); - return new ClassTransformer_LWJGL_Keyboard(basicClass, isClientSettingsClass).getWriter().toByteArray(); - } - - //Enable mapping of Tickets and loaded chunks. - Forge - if (transformedName.equals(FORGE_CHUNK_MANAGER) && AsmConfig.enableChunkDebugging) { - Preloader_Logger.INFO("Chunkloading Patch", "Transforming "+transformedName); - return new ClassTransformer_Forge_ChunkLoading(basicClass, false).getWriter().toByteArray(); - } - - // Fix the OreDictionary - Forge - if (transformedName.equals(FORGE_ORE_DICTIONARY) && AsmConfig.enableOreDictPatch) { - Preloader_Logger.INFO("OreDictTransformer", "Transforming "+transformedName); - ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES); - new ClassReader(basicClass).accept(new OreDictionaryVisitor(classWriter), 0); - return classWriter.toByteArray(); - } - - // Log Handling of CodeChicken - if (transformedName.equals("codechicken.nei.guihook.GuiContainerManager")) { - //Preloader_Logger.INFO("CodeChicken GuiContainerManager Patch", "Transforming "+transformedName); - //return new ClassTransformer_CC_GuiContainerManager(basicClass).getWriter().toByteArray(); - } - // Fix the OreDictionary COFH - if (transformedName.equals(COFH_ORE_DICTIONARY_ARBITER) && (AsmConfig.enableCofhPatch || !obfuscated)) { - Preloader_Logger.INFO("COFH", "Transforming "+transformedName); - return new ClassTransformer_COFH_OreDictionaryArbiter(basicClass).getWriter().toByteArray(); - } - - // Fix Tinkers Fluids - if (transformedName.equals(TINKERS_FLUID_BLOCK) && AsmConfig.enableTiConFluidLighting) { - Preloader_Logger.INFO("Bright Fluids", "Transforming "+transformedName); - return new ClassTransformer_TiConFluids("getLightValue", obfuscated, basicClass).getWriter().toByteArray(); - } - - //Fix RC stuff - //Patching PROCESS_VOLUME to allow more transfer limits - if (transformedName.equals(RAILCRAFT_FLUID_HELPER) && (AsmConfig.enableRcFlowFix && AsmConfig.maxRailcraftTankProcessVolume != 4000)) { - Preloader_Logger.INFO("Railcraft PROCESS_VOLUME Patch", "Transforming "+transformedName); - return new ClassTransformer_Railcraft_FluidHelper(basicClass, obfuscated).getWriter().toByteArray(); - } - //Patching TRANSFER_RATE in Fluid Loaders/Unloaders - if ((transformedName.equals(RAILCRAFT_TILE_FLUID_LOADER) && AsmConfig.maxRailcraftFluidLoaderFlow != 20) || (transformedName.equals("mods.railcraft.common.blocks.machine.gamma.TileFluidUnloader") && AsmConfig.maxRailcraftFluidUnloaderFlow != 80)) { - Preloader_Logger.INFO("Railcraft TRANSFER_RATE Patch", "Transforming "+transformedName); - return new ClassTransformer_Railcraft_FluidCartHandling(basicClass, obfuscated, transformedName).getWriter().toByteArray(); - } - //Fix Weird glitch involving negative itemstacks. - if (transformedName.equals(RAILCRAFT_INVENTORY_TOOLS) && AsmConfig.enableRcItemDupeFix) { - Preloader_Logger.INFO("Railcraft negative ItemStack Fix", "Transforming "+transformedName); - return new ClassTransformer_Railcraft_InvTools(basicClass, obfuscated).getWriter().toByteArray(); - } - - //Fix GC stuff - if (AsmConfig.enableGcFuelChanges) { - if (transformedName.equals(GALACTICRAFT_FLUID_UTILS)) { - Preloader_Logger.INFO("Galacticraft FluidUtils Patch", "Transforming "+transformedName); - return new ClassTransformer_GC_FluidUtil(basicClass, false).getWriter().toByteArray(); - } - if (transformedName.equals(GALACTICRAFT_TILE_ENTITY_FUEL_LOADER)) { - Preloader_Logger.INFO("Galacticraft Fuel_Loader Patch", "Transforming "+transformedName); - return new ClassTransformer_GC_FuelLoader(basicClass, false).getWriter().toByteArray(); - } - if (transformedName.equals(GALACTICRAFT_ENTITY_AUTO_ROCKET)) { - Preloader_Logger.INFO("Galacticraft EntityAutoRocket Patch", "Transforming "+transformedName); - return new ClassTransformer_GC_EntityAutoRocket(basicClass, false).getWriter().toByteArray(); - } - } - - - /** - * Gregtech ASM Patches - */ - -// if (transformedName.equals(GT_UTILITY)) { -// Preloader_Logger.INFO("Gregtech Utilities Patch", "Transforming "+transformedName); -// return new ClassTransformer_GT_Utility(basicClass, transformedName).getWriter().toByteArray(); -// } - //Inject Custom constructors for RTG Hatches - if (transformedName.equals(GT_MTE_HATCH_ENERGY) || transformedName.equals(GTPP_MTE_HATCH_RTG)) { - Preloader_Logger.INFO("Gregtech RTG Patch", "Transforming " + transformedName); - return new ClassTransformer_GT_EnergyHatchPatch(basicClass, transformedName).getWriter().toByteArray(); - } - //Try patch achievements - if (transformedName.equals(GT_ACHIEVEMENTS)) { - Preloader_Logger.INFO("Gregtech Achievements Patch", "Transforming " + transformedName); - return new ClassTransformer_GT_Achievements_CrashFix(basicClass, obfuscated).getWriter().toByteArray(); - } - - //Fix bad handling of a loop left from original decompilation - //Also Fix Achievements, although currently disabled. - if (transformedName.equals(GT_CLIENT_PROXY)) { - Preloader_Logger.INFO("Gregtech Client Proxy Patch", "Transforming " + transformedName); - return new ClassTransformer_GT_Client(basicClass, obfuscated).getByteArray(); - } - - //Make GT packets safer, fill them with debug info. - if (transformedName.equals(GT_PACKET_TILE_ENTITY)) { - Preloader_Logger.INFO("Gregtech GT_Packet_TileEntity Patch", "Transforming "+transformedName); - return new ClassTransformer_GT_Packet_TileEntity(basicClass, obfuscated).getWriter().toByteArray(); - } - //Make the setting of GT Tiles safer, so as not to crash the client. - if (transformedName.equals(GT_BASE_META_TILE_ENTITY)) { - Preloader_Logger.INFO("Gregtech setMetaTileEntity Patch", "Transforming "+transformedName); - return new ClassTransformer_GT_BaseMetaTileEntity(basicClass).getWriter().toByteArray(); - } - //Add extra tools if we're in a dev environment. - if (transformedName.equals(GT_METAGENERATED_TOOL) && CORE_Preloader.DEV_ENVIRONMENT) { - Preloader_Logger.INFO("Gregtech Additional Tools Patch", "Transforming "+transformedName); - return new ClassTransformer_GT_MetaGenerated_Tool(basicClass).getWriter().toByteArray(); - } - //Fix log handling on the charcoal pit - if (transformedName.equals(GT_MTE_CHARCOAL_PIT) && AsmConfig.enableGtCharcoalPitFix) { - Preloader_Logger.INFO("GT Charcoal Pit Fix", "Transforming "+transformedName); - return new ClassTransformer_GT_CharcoalPit(basicClass, obfuscated).getWriter().toByteArray(); - } - - - - - //Patching Meta Tile Tooltips - if (transformedName.equals(GT_ITEM_MACHINES) && AsmConfig.enableGtTooltipFix) { - //Preloader_Logger.INFO("Gregtech Tooltip Patch", "Transforming "+transformedName); - //return new ClassTransformer_GT_ItemMachines_Tooltip(basicClass, false).getWriter().toByteArray(); - } - - - if (transformedName.equals(GT_BLOCK_MACHINES)) { - //Fix GT NBT Persistency issue - Preloader_Logger.INFO("Gregtech NBT Persistency Patch", "Transforming "+transformedName); - byte[] g = new ClassTransformer_GT_BlockMachines_NBT(basicClass, false).getWriter().toByteArray(); - Preloader_Logger.INFO("Gregtech getTileEntityBaseType Patch", "Transforming "+transformedName); - return new ClassTransformer_GT_BlockMachines_MetaPipeEntity(g, 0).getWriter().toByteArray(); - } - if (transformedName.equals(GT_METAPIPE_ITEM) || transformedName.equals(GT_METAPIPE_FRAME) || transformedName.equals(GT_METAPIPE_FLUID)) { - Preloader_Logger.INFO("Gregtech getTileEntityBaseType Patch", "Transforming "+transformedName); - int mode = 0; - if (transformedName.equals(GT_METAPIPE_ITEM)) { - mode = 1; - } - else if (transformedName.equals(GT_METAPIPE_FRAME)) { - mode = 2; - } - else { - mode = 3; - } - return new ClassTransformer_GT_BlockMachines_MetaPipeEntity(basicClass, mode).getWriter().toByteArray(); - } - - - //Fix IC2 Wrench Harvesting - for (String y : IC2_WRENCH_PATCH_CLASS_NAMES) { - if (transformedName.equals(y)) { - Preloader_Logger.INFO("IC2 getHarvestTool Patch", "Transforming "+transformedName); - return new ClassTransformer_IC2_GetHarvestTool(basicClass, obfuscated, transformedName).getWriter().toByteArray(); - } - } - - //This is breaking IC2 Hazmat, moved to hodgepodge -// if (transformedName.equals(IC2_ITEM_ARMOUR_HAZMAT)) { -// Preloader_Logger.INFO("IC2 Hazmat Patch", "Transforming "+transformedName); -// return new ClassTransformer_IC2_Hazmat(basicClass, transformedName).getWriter().toByteArray(); -// } - - //Fix Thaumcraft Shit - //Patching ItemWispEssence to allow invalid item handling - if (transformedName.equals(THAUMCRAFT_ITEM_WISP_ESSENCE) && AsmConfig.enableTcAspectSafety) { - Preloader_Logger.INFO("Thaumcraft WispEssence_Patch", "Transforming "+transformedName); - return new ClassTransformer_TC_ItemWispEssence(basicClass, obfuscated).getWriter().toByteArray(); - } - //Fix Thaumic Tinkerer Shit - if (transformedName.equals(THAUMICTINKERER_TILE_REPAIRER) && AsmConfig.enableThaumicTinkererRepairFix) { - //Preloader_Logger.INFO("Thaumic Tinkerer RepairItem Patch", "Transforming "+transformedName); - //return new ClassTransformer_TT_ThaumicRestorer(basicClass).getWriter().toByteArray(); - } - - - return basicClass; - } - - - -} diff --git a/src/Java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java b/src/Java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java deleted file mode 100644 index e25c06653c..0000000000 --- a/src/Java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package gtPlusPlus.preloader.keyboard; - -import java.lang.reflect.Field; -import java.nio.ByteBuffer; -import java.util.HashMap; -import java.util.Map; - -import org.apache.logging.log4j.Level; -import org.lwjgl.BufferUtils; -import org.lwjgl.input.Keyboard; - -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.asm.transformers.ClassTransformer_LWJGL_Keyboard; -import net.minecraft.client.resources.I18n; - -/** - *
- * A raw Keyboard interface. This can be used to poll the current state of the - * keys, or read all the keyboard presses / releases since the last read. - * - * @author cix_foo - * @author elias_naur - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class BetterKeyboard { - - public static final int KEYBOARD_SIZE = Short.MAX_VALUE; - - private static boolean init = false; - - public static void init() { - if (!init) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Trying to patch out LWJGL internal arrays with larger ones."); - Field aKeyNameSize = ReflectionUtils.getField(Keyboard.class, "keyName"); - Field aKeyMapSize = ReflectionUtils.getField(Keyboard.class, "keyMap"); - Field aKeyDownBuffer = ReflectionUtils.getField(Keyboard.class, "keyDownBuffer"); - String[] aOldKeyNameArray = (String[]) ReflectionUtils.getFieldValue(aKeyNameSize); - if (aOldKeyNameArray != null && aOldKeyNameArray.length < Short.MAX_VALUE) { - String[] aNewKeyNameArray = new String[Short.MAX_VALUE]; - for (int i=0;i aOldKeyMapArray = (Map) ReflectionUtils.getFieldValue(aKeyMapSize); - if (aOldKeyNameArray != null && aOldKeyMapArray.size() < Short.MAX_VALUE) { - Map aNewKeyMapArray = new HashMap(Short.MAX_VALUE); - aNewKeyMapArray.putAll(aOldKeyMapArray); - try { - ReflectionUtils.setFinalFieldValue(Keyboard.class, aKeyMapSize.getName(), aNewKeyMapArray); - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Patched Field: "+aKeyMapSize.getName()); - } - catch (Throwable t) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Failed Patching Field: "+aKeyDownBuffer.getName()); - } - } - ByteBuffer aOldByteBuffer = (ByteBuffer) ReflectionUtils.getFieldValue(aKeyDownBuffer); - if (aOldByteBuffer != null && aOldByteBuffer.capacity() == Keyboard.KEYBOARD_SIZE) { - ByteBuffer aNewByteBuffer = BufferUtils.createByteBuffer(Short.MAX_VALUE); - try { - ReflectionUtils.setFinalFieldValue(Keyboard.class, aKeyDownBuffer.getName(), aNewByteBuffer); - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Patched Field: "+aKeyDownBuffer.getName()); - } - catch (Throwable t) { - FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Failed Patching Field: "+aKeyDownBuffer.getName()); - } - } - init = true; - } - } - - - /** - * Gets a key's name - * @param key The key - * @return a String with the key's human readable name in it or null if the key is unnamed - */ - public static synchronized String getKeyName(int key) { - return ClassTransformer_LWJGL_Keyboard.getKeyName(key); - } - - - - - /** - * Represents a key or mouse button as a string. Args: key - */ - public static String getKeyDisplayString(int aKeyValue) { - return aKeyValue < 0 ? I18n.format("key.mouseButton", new Object[] {Integer.valueOf(aKeyValue + 101)}): getKeyName(aKeyValue); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java b/src/Java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java deleted file mode 100644 index ce7d919431..0000000000 --- a/src/Java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.bartcrops; - -import cpw.mods.fml.common.event.FMLInitializationEvent; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; - -public class HANDLER_CropsPlusPlus { - - public static void preInit(FMLPreInitializationEvent preinit) { - LoaderOfTheCrops.load(preinit); - } - - public static void init(FMLInitializationEvent init) { - //registerItems(); - } - - public static void postInit(FMLPostInitializationEvent postinit) { - LoaderOfTheCrops.register(); - LoaderOfTheCrops.registerBaseSeed(); - } -} diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java b/src/Java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java deleted file mode 100644 index 48813310d2..0000000000 --- a/src/Java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.xmod.bartcrops; - -import java.util.ArrayList; -import java.util.List; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.bartcrops.crops.Crop_Hemp; -import ic2.api.crops.CropCard; -import ic2.api.crops.Crops; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** - * Mostly borrowed from the Crops++ Crop Loader. - * @author Alkalus - */ - -public class LoaderOfTheCrops { - - private static List mHasCropObj = new ArrayList(); - private CropCard mCropObj; - private ItemStack mBaseSeed; - private static List mCropList = cropLoader(); - - public LoaderOfTheCrops(CropCard cropObj) { - this.mCropObj = cropObj; - } - - public LoaderOfTheCrops(CropCard cropObj, ItemStack baseseed) { - this.mCropObj = cropObj; - this.mBaseSeed = baseseed; - } - - public static CropCard cropUnpackerCC(LoaderOfTheCrops inp) { - return inp.mCropObj; - } - - private static ItemStack cropUnpackerCG(LoaderOfTheCrops inp) { - return inp.mBaseSeed; - } - - private static LoaderOfTheCrops cropHelper(CropCard cropObj) { - return new LoaderOfTheCrops(cropObj, ItemUtils.getItemStackOfAmountFromOreDict("crop" + cropObj.name(), 0)); - } - - public static final List cropLoader() { - List p = new ArrayList(); - - p.add(new LoaderOfTheCrops(new Crop_Hemp(), new ItemStack(Item.getItemById(111), 3))); - - return p; - } - - private static final List cropObjs() { - List p = new ArrayList(); - - for (int i = 0; i < mCropList.size(); ++i) { - p.add(cropUnpackerCC((LoaderOfTheCrops) mCropList.get(i))); - } - - return p; - } - - private static final List setBaseSeed() { - List p = new ArrayList(); - - for (int i = 0; i < mCropList.size(); ++i) { - p.add(cropUnpackerCG((LoaderOfTheCrops) mCropList.get(i))); - } - - return p; - } - - private static final List setnames() { - List s = new ArrayList(); - - for (int i = 0; i < mCropList.size(); ++i) { - s.add(((CropCard) cropObjs().get(i)).name()); - } - - return s; - } - - public static void load(FMLPreInitializationEvent preinit) { - for (int i = 0; i < mCropList.size(); ++i) { - mHasCropObj.add(true); - } - } - - public static void register() { - for (int i = 0; i < mCropList.size(); ++i) { - if ((Boolean) mHasCropObj.get(i) && cropObjs().get(i) != null) { - Crops.instance.registerCrop((CropCard) cropObjs().get(i)); - } - } - } - - public static void registerBaseSeed() { - List baseseed = new ArrayList(setBaseSeed()); - - for (int i = 0; i < mCropList.size(); ++i) { - if (baseseed.get(i) != null && cropObjs().get(i) != null) { - Crops.instance.registerBaseSeed((ItemStack) baseseed.get(i), (CropCard) cropObjs().get(i), 1, 1, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java b/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java deleted file mode 100644 index f62b429acb..0000000000 --- a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.xmod.bartcrops.abstracts; - -import gtPlusPlus.preloader.CORE_Preloader; -import ic2.api.crops.ICropTile; - -public abstract class BaseAestheticCrop extends BaseHarvestableCrop { - - public int tier() { - return 1; - } - - public int stat(int n) { - switch (n) { - case 0 : - return 0; - case 1 : - return 0; - case 2 : - return 0; - case 3 : - return 4; - case 4 : - return 0; - default : - return 0; - } - } - - public int growthDuration(ICropTile crop) { - return CORE_Preloader.DEBUG_MODE ? 1 : 225; - } - - public byte getSizeAfterHarvest(ICropTile crop) { - return 1; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java b/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java deleted file mode 100644 index ca2a044564..0000000000 --- a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.xmod.bartcrops.abstracts; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import ic2.api.crops.CropCard; -import ic2.api.crops.ICropTile; -import java.util.ArrayList; -import java.util.List; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import speiger.src.crops.api.ICropCardInfo; - -public abstract class BaseCrop extends CropCard implements ICropCardInfo { - @SideOnly(Side.CLIENT) - public void registerSprites(IIconRegister iconRegister) { - this.textures = new IIcon[this.maxSize()]; - - for (int i = 1; i <= this.textures.length; ++i) { - this.textures[i - 1] = iconRegister.registerIcon(CORE.MODID+":crop/blockCrop." + this.name() + "." + i); - } - - } - - public float dropGainChance() { - return (float) (Math.pow(0.95D, (double) ((float) this.tier())) * (double) 1f); - } - - public boolean canCross(ICropTile crop) { - return crop.getSize() == this.maxSize(); - } - - public int getrootslength(ICropTile crop) { - return 3; - } - - public String discoveredBy() { - return "Alkalus"; - } - - public String owner() { - return "Gtplusplus"; - } - - public List getCropInformation() { - List ret = new ArrayList(); - ret.add(this.attributes().toString()); - return ret; - } - - public ItemStack getDisplayItem(CropCard card) { - return ItemUtils.getItemStackOfAmountFromOreDict("crop" + this.name(), 0); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java b/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java deleted file mode 100644 index e877233c67..0000000000 --- a/src/Java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java +++ /dev/null @@ -1,69 +0,0 @@ -package gtPlusPlus.xmod.bartcrops.abstracts; - -import gtPlusPlus.preloader.CORE_Preloader; -import ic2.api.crops.ICropTile; - -public abstract class BaseHarvestableCrop extends BaseCrop { - - public int tier() { - return 2; - } - - public int stat(int n) { - switch (n) { - case 0 : - return 0; - case 1 : - return 4; - case 2 : - return 0; - case 3 : - return 4; - case 4 : - return 0; - default : - return 0; - } - } - - public boolean canGrow(ICropTile crop) { - return crop.getSize() < 3; - } - - public int getOptimalHavestSize(ICropTile crop) { - return 3; - } - - public boolean canBeHarvested(ICropTile crop) { - return crop.getSize() == 3; - } - - public int weightInfluences(ICropTile crop, float humidity, float nutrients, float air) { - return (int) ((double) humidity * 1.2D + (double) nutrients * 0.9D + (double) air * 0.9D); - } - - public int growthDuration(ICropTile crop) { - short r; - if (CORE_Preloader.DEBUG_MODE) { - r = 1; - } else if (crop.getSize() == 2) { - r = 200; - } else { - r = 700; - } - - return r; - } - - public byte getSizeAfterHarvest(ICropTile crop) { - return 2; - } - - public int maxSize() { - return 3; - } - - public String discoveredBy() { - return "Alkalus"; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java b/src/Java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java deleted file mode 100644 index 95e2766aae..0000000000 --- a/src/Java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.xmod.bartcrops.crops; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.bartcrops.abstracts.BaseAestheticCrop; -import ic2.api.crops.ICropTile; -import net.minecraft.item.ItemStack; - -public class Crop_Hemp extends BaseAestheticCrop { - - public int tier() { - return 2; - } - - public String name() { - return "Hemp"; - } - - public String discoveredBy() { - return "Alkalus"; - } - - public int growthDuration(ICropTile crop) { - int ret = 550; - - /*if (crop.isBlockBelow(Blocks.dirt) || crop.isBlockBelow(Blocks.flowing_water)) { - ret = 225; - }*/ - - if (CORE_Preloader.DEBUG_MODE) { - ret = 1; - } - - return ret; - } - - public String[] attributes() { - return new String[]{"Green", "Soil", "Orange"}; - } - - public ItemStack getGain(ICropTile crop) { - - ItemStack ret = this.getDisplayItem(); - if (MathUtils.randInt(0, 10) > 8) { - ret = ItemUtils.getSimpleStack(ModItems.itemRope, MathUtils.randInt(1, 3)); - } - - return ret; - } - - public ItemStack getDisplayItem() { - return ItemUtils.getSimpleStack(ModItems.itemRope, 0); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java b/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java deleted file mode 100644 index 95067300c8..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java +++ /dev/null @@ -1,181 +0,0 @@ -package gtPlusPlus.xmod.bop; - -import java.lang.reflect.Field; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class HANDLER_BiomesOPlenty { - - - public static Item mPineCone; - - public static Block logs1; - public static Block logs2; - public static Block logs3; - public static Block logs4; - - public static Block leaves1; - public static Block leaves2; - public static Block leaves3; - public static Block leaves4; - - public static Block colorizedLeaves1; - public static Block colorizedLeaves2; - - public static Block saplings; - public static Block colorizedSaplings; - - public static void preInit(){ - BOP_Block_Registrator.run(); - if (LoadedMods.BiomesOPlenty){ - setFields(); - registerPineconeToOreDict(); - } - - } - - public static void init(){ - if (LoadedMods.BiomesOPlenty){ - - } - } - - public static void postInit(){ - BOP_Block_Registrator.recipes(); - if (LoadedMods.BiomesOPlenty){ - - } - } - - private static void registerPineconeToOreDict() { - if (mPineCone != null) { - ItemStack aPinecone = ItemUtils.simpleMetaStack(mPineCone, 13, 1); - if (aPinecone != null) { - ItemUtils.addItemToOreDictionary(aPinecone, "pinecone"); - } - } - } - - public static ItemStack getStack(Block aBlock, int aMeta, int aSize) { - return ItemUtils.simpleMetaStack(aBlock, aMeta, aSize); - } - - - - //BOPCBlocks.logs4 - 0 - //BOPCBlocks.colorizedLeaves2 - 1 - - private static void setFields() { - Field aBopMiscItem = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCItems"), "misc"); - - Field aBopBlock1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs1"); - Field aBopBlock2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs2"); - Field aBopBlock3 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs3"); - Field aBopBlock4 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs4"); - - Field aBopLeaves1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves1"); - Field aBopLeaves2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves2"); - Field aBopLeaves3 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves3"); - Field aBopLeaves4 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves4"); - - Field aBopColouredLeaves1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedLeaves1"); - Field aBopColouredLeaves2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedLeaves2"); - - Field aBopSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "saplings"); - Field aBopColouredSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedSaplings"); - - if (aBopMiscItem != null) { - Item aMiscItem = (Item) ReflectionUtils.getFieldValue(aBopMiscItem); - if (aMiscItem != null) { - mPineCone = aMiscItem; - } - } - - - if (aBopBlock1 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock1); - if (aBlock != null) { - logs1 = aBlock; - } - } - if (aBopBlock2 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock2); - if (aBlock != null) { - logs2 = aBlock; - } - } - if (aBopBlock3 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock3); - if (aBlock != null) { - logs3 = aBlock; - } - } - if (aBopBlock4 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock4); - if (aBlock != null) { - logs4 = aBlock; - } - } - - - if (aBopLeaves1 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves1); - if (aBlock != null) { - leaves1 = aBlock; - } - } - if (aBopLeaves2 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves2); - if (aBlock != null) { - leaves2 = aBlock; - } - } - if (aBopLeaves3 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves3); - if (aBlock != null) { - leaves3 = aBlock; - } - } - if (aBopLeaves4 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves4); - if (aBlock != null) { - leaves4 = aBlock; - } - } - - - if (aBopColouredLeaves1 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves1); - if (aBlock != null) { - colorizedLeaves1 = aBlock; - } - } - if (aBopColouredLeaves2 != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves2); - if (aBlock != null) { - colorizedLeaves2 = aBlock; - } - } - - - if (aBopSapling != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopSapling); - if (aBlock != null) { - saplings = aBlock; - } - } - if (aBopColouredSapling != null) { - Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredSapling); - if (aBlock != null) { - colorizedSaplings = aBlock; - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java b/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java deleted file mode 100644 index 3716359d7a..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java +++ /dev/null @@ -1,198 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.helpers.MaterialHelper; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.bop.blocks.pine.LeavesPineTree; -import gtPlusPlus.xmod.bop.blocks.pine.LogPineTree; -import gtPlusPlus.xmod.bop.blocks.pine.SaplingPineTree; -import gtPlusPlus.xmod.bop.blocks.rainforest.LeavesRainforestTree; -import gtPlusPlus.xmod.bop.blocks.rainforest.LogRainforestTree; -import gtPlusPlus.xmod.bop.blocks.rainforest.SaplingRainforestTree; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class BOP_Block_Registrator { - - public static Block log_Rainforest; - public static Block leaves_Rainforest; - public static Block sapling_Rainforest; - public static Block log_Pine; - public static Block leaves_Pine; - public static Block sapling_Pine; - - //Runs Each tree Type separately - public static final void run(){ - registerTree_Rainforest(); - registerTree_Pine(); - } - - - private static final boolean registerTree_Rainforest(){ - log_Rainforest = new LogRainforestTree(); - leaves_Rainforest = new LeavesRainforestTree(); - sapling_Rainforest = new SaplingRainforestTree(); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Rainforest), "logWood", true); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Rainforest), "treeLeaves", true); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Rainforest), "treeSapling", true); - return true; - } - - private static final boolean registerTree_Pine(){ - log_Pine = new LogPineTree(); - leaves_Pine = new LeavesPineTree(); - sapling_Pine = new SaplingPineTree(); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Pine), "logWood", true); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Pine), "treeLeaves", true); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Pine), "treeSapling", true); - return true; - } - - public static final void recipes() { - // Rainforest Oak - addLogRecipes(ItemUtils.getSimpleStack(log_Rainforest)); - addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Rainforest)); - // Pine - addLogRecipes(ItemUtils.getSimpleStack(log_Pine)); - addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Pine)); - - } - - public static final void addLogRecipes(final ItemStack aStack) { - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {aStack}, ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 4)); - RecipeUtils.recipeBuilder( - CI.craftingToolSaw, null, null, - aStack, null, null, - null, null, null, - ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), 4)); - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "sLf", 'L', GT_Utility.copyAmount(1L, aStack) }); - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 160, 8); - - if (!CORE.GTNH) { - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L, new Object[0]), 16, 8); - GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L, new Object[0]), 64, 16); - GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16); - } - - final short aMeta = (short)aStack.getItemDamage(); - if (aMeta == 32767) { - if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); - } - } - for (int i = 0; i < 32767; ++i) { - if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { - GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); - } - } - final ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i)); - if (tStack == null) { - if (i >= 16) { - break; - } - } - else { - final ItemStack tPlanks = GT_Utility.copy(tStack); - tPlanks.stackSize = tPlanks.stackSize * 3 / 2; - GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); - GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack.stackSize) : ((long)(tStack.stackSize * 5 / 4)), tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); - GT_ModHandler.addSawmillRecipe(new ItemStack(aStack.getItem(), 1, i), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); - GT_ModHandler.removeRecipe(new ItemStack(aStack.getItem(), 1, i)); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack.stackSize) : ((long)(tStack.stackSize * 5 / 4)), tStack), new Object[] { "s", "L", 'L', new ItemStack(aStack.getItem(), 1, i) }); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), new Object[] { new ItemStack(aStack.getItem(), 1, i) }); - } - } - } - else { - if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); - } - } - final ItemStack tStack2 = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1L, aStack)); - if (tStack2 != null) { - final ItemStack tPlanks2 = GT_Utility.copy(tStack2); - tPlanks2.stackSize = tPlanks2.stackSize * 3 / 2; - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); - GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack2.stackSize) : ((long)(tStack2.stackSize * 5 / 4)), tStack2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); - GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), tPlanks2, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); - GT_ModHandler.removeRecipe(GT_Utility.copyAmount(1L, aStack)); - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack2.stackSize) : ((long)(tStack2.stackSize * 5 / 4)), tStack2), new Object[] { "s", "L", 'L', GT_Utility.copyAmount(1L, aStack) }); - GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack2.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack2), new Object[] { GT_Utility.copyAmount(1L, aStack) }); - } - } - if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { - GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); - } - } - } - - public static void addSaplingRecipes(final ItemStack aStack) { - GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), null, 0, false); - GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.IC2_Plantball.get(1L, new Object[0])); - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), 16, 8); - } - - public static void addPyrolyeOvenRecipes(final ItemStack logStack) { - - Materials aOilHeavy = MaterialUtils.getMaterial("OilHeavy"); - Materials aCharcoalByproducts = MaterialUtils.getMaterial("CharcoalByproducts"); - Materials aWoodGas = MaterialUtils.getMaterial("WoodGas"); - Materials aWoodVinegar = MaterialUtils.getMaterial("WoodVinegar"); - Materials aWoodTar = MaterialUtils.getMaterial("WoodTar"); - - - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 1, MaterialHelper.getGems(Materials.Charcoal, 20), Materials.Creosote.getFluid(4000L), 640, 64); - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 2, MaterialHelper.getGems(Materials.Charcoal, 20), Materials.Creosote.getFluid(4000L), 320, 96); - - if (aOilHeavy != null) { - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, MaterialHelper.getDust(Materials.Ash, 4), aOilHeavy.getFluid(200L), 320, 192); - - } - if (aCharcoalByproducts != null) { - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, MaterialHelper.getGems(Materials.Charcoal, 20), aCharcoalByproducts.getGas(4000L), 640, 64); - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 4, MaterialHelper.getGems(Materials.Charcoal, 20), aCharcoalByproducts.getGas(4000L), 320, 96); - - } - if (aWoodGas != null) { - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 5, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodGas.getGas(1500L), 640, 64); - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 6, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodGas.getGas(1500L), 320, 96); - - } - if (aWoodVinegar != null) { - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 7, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodVinegar.getFluid(3000L), 640, 64); - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 8, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodVinegar.getFluid(3000L), 320, 96); - - } - if (aWoodTar != null) { - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 9, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodTar.getFluid(1500L), 640, 64); - CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 10, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodTar.getFluid(1500L), 320, 96); - - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java deleted file mode 100644 index 5c86c45591..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.base; - -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockLeaves; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class LeavesBase extends BlockLeaves { - - protected IIcon[][] leafTextures = new IIcon[2][]; - protected String[][] leafType = new String[][] {{}, {}}; - protected String[] treeType = new String[] {}; - protected ItemStack[] bonusDrops; - - @SuppressWarnings("deprecation") - public LeavesBase(String blockNameLocalized, String blockNameUnlocalized, ItemStack[] bonusDrops){ - this.bonusDrops = bonusDrops; - String blockName = "block"+Utils.sanitizeString(blockNameLocalized)+"Leaves"; - GameRegistry.registerBlock(this, ItemBlock.class, blockName); - this.setBlockName(blockName); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "treeLeaves", true); - this.setCreativeTab(AddToCreativeTab.tabBOP); - LanguageRegistry.addName(this, blockNameLocalized+" Leaves"); - Blocks.fire.setFireInfo(this, 80, 150); - } - - private final void setVanillaVariable(Object toSet, Object value){ - toSet = value; - } - - @Override - public int quantityDropped(Random p_149745_1_){ - return p_149745_1_.nextInt(20) == 0 ? 1 : 0; - } - - - @Override//Drops when Leaf is broken - protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){ - Logger.INFO("Dropping Bonus Drops"); - for (int i = 0; i < this.bonusDrops.length; ++i){ - if (this.bonusDrops[i] != null && world.rand.nextInt(randomChance) == 0){ - this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(this.bonusDrops[i], 1)); - } - } - } - - /** - * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) - */ - @SuppressWarnings("unchecked") - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs tab, @SuppressWarnings("rawtypes") List metaList){ - for (int i = 0; i < this.treeType.length; ++i){ - metaList.add(new ItemStack(item, 1, i)); - } - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int p_149691_1_, int metaID){ - return (metaID & 3) == 1 ? this.leafTextures[this.field_150127_b][1] : this.leafTextures[this.field_150127_b][0]; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iIcon){ - for (int i = 0; i < leafType.length; ++i){ - this.leafTextures[i] = new IIcon[leafType[i].length]; - for (int j = 0; j < leafType[i].length; ++j){ - this.leafTextures[i][j] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "leaves/" + "leaves_" + leafType[i][j]); - } - } - setVanillaVariable(this.field_150129_M, this.leafTextures); - } - - @Override - public String[] func_150125_e() - { - return treeType; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java deleted file mode 100644 index 8e8ca0ed0a..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.base; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockLog; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public abstract class LogBase extends BlockLog -{ - public String[] treeType = new String[] {}; - protected IIcon[] textureSide; - protected IIcon[] textureTop; - - @SuppressWarnings("deprecation") - public LogBase(String blockNameLocalized, String blockNameUnlocalized, String[] treeTypes){ - this.treeType = treeTypes; - String blockName = "block"+Utils.sanitizeString(blockNameLocalized)+"Log"; - GameRegistry.registerBlock(this, ItemBlock.class, blockName); - this.setBlockName(blockName); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "log"+Utils.sanitizeString(blockNameLocalized), true); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "logWood", true); - this.setCreativeTab(AddToCreativeTab.tabBOP); - LanguageRegistry.addName(this, blockNameLocalized); - Blocks.fire.setFireInfo(this, 20, 100); - } - - private final void setVanillaVariable(Object toSet, Object value){ - toSet = value; - } - - /** - * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) - */ - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs tab, List metaList){ - for (int i = 0; i < this.textureSide.length; ++i){ - metaList.add(new ItemStack(item, 1, i)); - } - } - - @Override - @SideOnly(Side.CLIENT) - protected IIcon getTopIcon(int meta){ - return this.textureTop[meta % this.textureTop.length]; - } - - @Override - @SideOnly(Side.CLIENT) - protected IIcon getSideIcon(int metaID){ - return this.textureSide[metaID % this.textureSide.length]; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iIcon) - { - this.textureSide = new IIcon[treeType.length]; - this.textureTop = new IIcon[treeType.length]; - - for (int i = 0; i < this.textureSide.length; ++i){ - this.textureSide[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i]); - this.textureTop[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i] + "_top"); - } - - setVanillaVariable(this.field_150167_a, this.textureSide); - setVanillaVariable(this.field_150166_b, this.textureTop); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java deleted file mode 100644 index c039e1ebac..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java +++ /dev/null @@ -1,198 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.base; - -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenBigTree; -import net.minecraft.world.gen.feature.WorldGenTrees; -import net.minecraft.world.gen.feature.WorldGenerator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class SaplingBase extends BlockSapling -{ - protected String[] saplingTypes = new String[] {}; - protected IIcon[] saplingTextures = new IIcon[] {}; - - //Sapling types - field_149882_a - //Iicons - field_149881_b - - protected SaplingBase(String blockNameLocalized, String blockNameUnlocalized, String[] saplingTypes){ - float f = 0.4F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f); - this.saplingTypes = saplingTypes; - this.saplingTextures = new IIcon[saplingTypes.length]; - String blockName = "block"+Utils.sanitizeString(blockNameLocalized); - GameRegistry.registerBlock(this, ItemBlock.class, blockName); - this.setBlockName(blockName); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "treeSapling", true); - this.setCreativeTab(AddToCreativeTab.tabBOP); - LanguageRegistry.addName(this, blockNameLocalized); - } - - private final void setVanillaVariable(Object toSet, Object value){ - toSet = value; - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int someInt, int meta){ - /* p_149691_2_ &= 7; - return saplingTextures[MathHelper.clamp_int(p_149691_2_, 0, 5)];*/ - //return this.saplingTextures[meta % this.saplingTextures.length]; - try { - return this.saplingTextures[meta]; - }catch(Throwable T){ - Logger.WARNING("Invalid Sapling meta is "+meta); - return this.saplingTextures[0]; - } - } - - /** - * Ticks the block if it's been scheduled - */ - @Override - public void updateTick(World world, int x, int y, int z, Random rand){ - if (!world.isRemote){ - super.updateTick(world, x, y, z, rand); - if (world.getBlockLightValue(x, y + 1, z) >= 9 && rand.nextInt(7) == 0){ - Logger.WARNING("Update Tick"); - this.updateMeta(world, x, y, z, rand); - } - else { - Logger.WARNING("Tried to Tick."); - } - } - } - - //Dunno - Think it is doGrow || doGrowthTick - @Override - public void func_149853_b(World world, Random rand, int x, int y, int z){ - Logger.WARNING("Please find what calls me - func_149853_b"); - this.updateMeta(world, x, y, z, rand); - } - - public void updateMeta(World world, int x, int y, int z, Random rand){ - func_149879_c(world, x, y, z, rand); - } - - @Override - public void func_149879_c(World world, int x, int y, int z, Random rand){ - Logger.WARNING("func_149879_c - 1"); - int l = world.getBlockMetadata(x, y, z); - - if ((l & 8) == 0){ - Logger.WARNING("func_149879_c - 2"); - world.setBlockMetadataWithNotify(x, y, z, l | 8, 4); - } - else{ - Logger.WARNING("func_149879_c - 3"); - this.func_149878_d(world, x, y, z, rand); - } - } - - @Override - public void func_149878_d(World world, int x, int y, int z, Random rand){ - Logger.WARNING("func_149878_d - 1"); - if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; - int l = world.getBlockMetadata(x, y, z) & 7; - Object object = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true); - int i1 = 0; - int j1 = 0; - boolean flag = false; - - switch (l) - { - case 0: - default: - Logger.WARNING("Case 0 - Grow Tree"); - break; - - } - - Block block = Blocks.air; - - if (flag) - { - world.setBlock(x + i1, y, z + j1, block, 0, 4); - world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); - world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); - world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); - } - else - { - world.setBlock(x, y, z, block, 0, 4); - } - - if (!((WorldGenerator)object).generate(world, rand, x + i1, y, z + j1)) - { - if (flag) - { - world.setBlock(x + i1, y, z + j1, this, l, 4); - world.setBlock(x + i1 + 1, y, z + j1, this, l, 4); - world.setBlock(x + i1, y, z + j1 + 1, this, l, 4); - world.setBlock(x + i1 + 1, y, z + j1 + 1, this, l, 4); - } - else - { - world.setBlock(x, y, z, this, l, 4); - } - } - } - - @Override - public boolean func_149880_a(World world, int p_149880_2_, int p_149880_3_, int p_149880_4_, int p_149880_5_){ - return world.getBlock(p_149880_2_, p_149880_3_, p_149880_4_) == this && (world.getBlockMetadata(p_149880_2_, p_149880_3_, p_149880_4_) & 7) == p_149880_5_; - } - - /** - * Determines the damage on the item the block drops. Used in cloth and wood. - */ - @Override - public int damageDropped(int meta){ - return MathHelper.clamp_int(meta & 7, 0, 5); - } - - /** - * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) - */ - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item item, CreativeTabs tab, List metaList){ - for (int i = 0; i < this.saplingTextures.length; ++i){ - metaList.add(new ItemStack(item, 1, i)); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iIcon){ - for (int i = 0; i < saplingTextures.length; ++i){ - saplingTextures[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "saplings/" + "sapling_" + saplingTypes[i]); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java deleted file mode 100644 index c942db14cf..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.pine; - -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import gtPlusPlus.xmod.bop.blocks.base.LeavesBase; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class LeavesPineTree extends LeavesBase { - - public LeavesPineTree(){ - super("Pine", "pine", new ItemStack[]{}); - this.treeType = new String[] {"pine"}; - this.leafType = new String[][] {{"pine"},{"pine_opaque"}}; - } - - @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_){ - return Item.getItemFromBlock(BOP_Block_Registrator.sapling_Pine); - } - - @Override//Drops when Leaf is broken - protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){ - Logger.INFO("Dropping Bonus Drops"); - if (MathUtils.randInt(0, 10) >= 9) { - this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, MathUtils.randInt(1, 4))); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java deleted file mode 100644 index dee5bf02fd..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.pine; - -import gtPlusPlus.xmod.bop.blocks.base.LogBase; - -public class LogPineTree extends LogBase { - - public LogPineTree(){ - super("Pine Log", "pine", new String[]{"pine"}); - this.treeType = new String[] {"pine"}; - } - - /*@Override - @SideOnly(Side.CLIENT) - protected IIcon getSideIcon(int metaID){ - return this.textureSide[metaID % this.textureSide.length]; - } - - @Override - @SideOnly(Side.CLIENT) - protected IIcon getTopIcon(int metaID){ - return this.textureTop[metaID % this.textureTop.length]; - }*/ - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java deleted file mode 100644 index 0ee04de899..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.pine; - -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.bop.blocks.base.SaplingBase; -import gtPlusPlus.xmod.bop.world.features.trees.WorldGenPineTree; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenBigTree; -import net.minecraft.world.gen.feature.WorldGenTrees; -import net.minecraft.world.gen.feature.WorldGenerator; - -public class SaplingPineTree extends SaplingBase { - - public SaplingPineTree(){ - super("Pine Sapling", "pine", new String[]{"pine"}); - } - - @Override - public void func_149878_d(World world, int x, int y, int z, Random rand){ - Logger.WARNING("func_149878_d - 1"); - if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; - rand.nextInt(10); - new WorldGenBigTree(true); - new WorldGenTrees(true); - int i1 = 0; - int j1 = 0; - boolean flag = false; - - Block block = Blocks.air; - - if (flag) - { - world.setBlock(x + i1, y, z + j1, block, 0, 4); - world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); - world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); - world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); - } - else - { - world.setBlock(x, y, z, block, 0, 4); - } - Object obj = new WorldGenPineTree(); - if (obj != null) { - world.setBlockToAir(x, y, z); - if (!((WorldGenerator) obj).generate(world, CORE.RANDOM, x, y, z)) { - world.setBlock(x, y, z, this, 0, 2); - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java deleted file mode 100644 index 39e434243a..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.rainforest; - -import java.util.Random; - -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import gtPlusPlus.xmod.bop.blocks.base.LeavesBase; - -public class LeavesRainforestTree extends LeavesBase { - - public LeavesRainforestTree(){ - super("Rainforest Oak", "rainforestoak", new ItemStack[]{ItemUtils.getSimpleStack(Items.apple)}); - this.treeType = new String[] {"rainforest"}; - this.leafType = new String[][] {{"rainforest"},{"rainforest_opaque"}}; - } - - @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_){ - return Item.getItemFromBlock(BOP_Block_Registrator.sapling_Rainforest); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java deleted file mode 100644 index 6d30caafb7..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.rainforest; - -import gtPlusPlus.xmod.bop.blocks.base.LogBase; - -public class LogRainforestTree extends LogBase { - - public LogRainforestTree(){ - super("Rainforest Oak", "rainforestoak", new String[]{"rainforest"}); - this.treeType = new String[] {"rainforest"}; - } - - /*@Override - @SideOnly(Side.CLIENT) - protected IIcon getSideIcon(int metaID){ - return this.textureSide[metaID % this.textureSide.length]; - } - - @Override - @SideOnly(Side.CLIENT) - protected IIcon getTopIcon(int metaID){ - return this.textureTop[metaID % this.textureTop.length]; - }*/ - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java deleted file mode 100644 index 73b916d383..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java +++ /dev/null @@ -1,66 +0,0 @@ -package gtPlusPlus.xmod.bop.blocks.rainforest; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenBigTree; -import net.minecraft.world.gen.feature.WorldGenTrees; -import net.minecraft.world.gen.feature.WorldGenerator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import gtPlusPlus.xmod.bop.blocks.base.SaplingBase; -import gtPlusPlus.xmod.bop.world.features.trees.WorldGenRainForestTree_Ex; - -public class SaplingRainforestTree extends SaplingBase { - - public SaplingRainforestTree(){ - super("Rainforest Oak Sapling", "rainforestoak", new String[]{"rainforest"}); - } - - @Override - public void func_149878_d(World world, int x, int y, int z, Random rand){ - Logger.WARNING("func_149878_d - 1"); - if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; - int l = world.getBlockMetadata(x, y, z) & 7; - rand.nextInt(10); - new WorldGenBigTree(true); - new WorldGenTrees(true); - int i1 = 0; - int j1 = 0; - boolean flag = false; - - Block block = Blocks.air; - - if (flag) - { - world.setBlock(x + i1, y, z + j1, block, 0, 4); - world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); - world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); - world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); - } - else - { - world.setBlock(x, y, z, block, 0, 4); - } - Object o = new WorldGenRainForestTree_Ex(BOP_Block_Registrator.log_Rainforest, BOP_Block_Registrator.leaves_Rainforest, 0, 0, true, 50, 75); - - if (!((WorldGenerator)o).generate(world, rand, x + i1, y, z + j1)) - { - if (flag) - { - world.setBlock(x + i1, y, z + j1, this, l, 4); - world.setBlock(x + i1 + 1, y, z + j1, this, l, 4); - world.setBlock(x + i1, y, z + j1 + 1, this, l, 4); - world.setBlock(x + i1 + 1, y, z + j1 + 1, this, l, 4); - } - else - { - world.setBlock(x, y, z, this, l, 4); - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java b/src/Java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java deleted file mode 100644 index d33b19aaf9..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.xmod.bop.creative; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; - -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; - -public class MiscUtilsBOPTab extends CreativeTabs { - - public MiscUtilsBOPTab(final String lable) { - super(lable); - } - - @Override - public Item getTabIconItem() { - return ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest).getItem(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java deleted file mode 100644 index 831108ec99..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java +++ /dev/null @@ -1,171 +0,0 @@ -package gtPlusPlus.xmod.bop.world.features.trees; - -import java.util.Random; - -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraftforge.common.util.ForgeDirection; - -public class WorldGenPineTree extends WorldGenAbstractTree{ - - public WorldGenPineTree() { - super(true); - } - - @Override - public boolean generate(World world, Random random, int x, int y, int z) { - while (world.isAirBlock(x, y, z) && y > 2) { - --y; - } - - Block aSoilBlock = world.getBlock(x, y, z); - - if (!canBlockSustainSapling(world, aSoilBlock, x, y, z)) { - return false; - } else { - int height; - int branches; - for (height = -2; height <= 2; ++height) { - for (branches = -2; branches <= 2; ++branches) { - if (world.isAirBlock(x + height, y - 1, z + branches) - && world.isAirBlock(x + height, y - 2, z + branches) - && !world.isAirBlock(x + height, y, z + branches)) { - return false; - } - } - } - - height = 2 + MathUtils.randInt(8, 16); - branches = 2 + MathUtils.randInt(6, 18); - int h = 1; - aSoilBlock.onPlantGrow(world, x, y - 1, z, x, y, z); - - int c; - int r = MathUtils.randInt(1, 3); - for (c = 0; c < height; ++c) { - this.buildBlock(world, x, y + h, z, BOP_Block_Registrator.log_Pine, 0); - h++; - if (c >= r && c % 2 == 0) { - this.generateBranch(world, random, x, y + h, z, c); - } - } - - this.generateTop(world, x, y + h, z); - return true; - } - } - - public void generateTop(World world, int x, int y, int z) { - for (int i = -1; i < 2; ++i) { - for (int j = -1; j < 2; ++j) { - this.buildBlock(world, x + i, y, z + j, BOP_Block_Registrator.leaves_Pine, 0); - } - } - - this.buildBlock(world, x, y, z, BOP_Block_Registrator.log_Pine, 0); - this.buildBlock(world, x + 1, y + 1, z, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x, y + 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x, y + 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x - 1, y + 1, z, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x, y + 2, z, BOP_Block_Registrator.leaves_Pine, 0); - } - - public void generateBranch(World world, Random rand, int x, int y, int z, int n) { - int var99999; - int var99998; - for (var99999 = -1; var99999 < 2; ++var99999) { - for (var99998 = -1; var99998 < 2; ++var99998) { - this.buildBlock(world, x + var99999, y, z + var99998, BOP_Block_Registrator.leaves_Pine, 0); - } - } - - var99999 = rand.nextInt(2); - var99998 = rand.nextInt(2); - int var99997 = rand.nextInt(2); - int var99996 = rand.nextInt(2); - if (n % 2 == 0) { - if (var99998 == 0) { - this.buildBlock(world, x + 1, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x + 2, y - 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0); - if (var99999 == 0) { - this.buildBlock(world, x + 2, y - 2, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } else { - this.buildBlock(world, x + 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } else { - this.buildBlock(world, x + 1, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x + 2, y, z - 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x + 2, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } - - if (var99997 == 0) { - this.buildBlock(world, x - 2, y - 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x - 1, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - if (var99996 == 0) { - this.buildBlock(world, x - 2, y - 2, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } else { - this.buildBlock(world, x - 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } else { - this.buildBlock(world, x - 2, y, z + 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x - 1, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x - 2, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } else { - if (var99998 == 0) { - this.buildBlock(world, x + 2, y - 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x + 1, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - if (var99999 == 0) { - this.buildBlock(world, x + 2, y - 2, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } else { - this.buildBlock(world, x + 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } else { - this.buildBlock(world, x + 2, y, z + 1, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x + 1, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - if (var99999 == 0) { - this.buildBlock(world, x + 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } else { - this.buildBlock(world, x + 2, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } - - if (var99997 == 0) { - this.buildBlock(world, x - 1, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x - 2, y - 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0); - if (var99996 == 0) { - this.buildBlock(world, x - 2, y - 2, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } else { - this.buildBlock(world, x - 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } else { - this.buildBlock(world, x - 1, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - this.buildBlock(world, x - 2, y, z - 1, BOP_Block_Registrator.leaves_Pine, 0); - if (var99996 == 0) { - this.buildBlock(world, x - 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } else { - this.buildBlock(world, x - 2, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); - } - } - } - - this.buildBlock(world, x, y, z, BOP_Block_Registrator.log_Pine, 0); - this.buildBlock(world, x, y + 1, z, BOP_Block_Registrator.log_Pine, 0); - } - - public void buildBlock(World world, int x, int y, int z, Block block, int meta) { - if (world.isAirBlock(x, y, z) || world.getBlock(x, y, z).isLeaves(world, x, y, z)) { - world.setBlock(x, y, z, block, meta, 2); - } - } - - public boolean canBlockSustainSapling(World world, Block block, int x, int y, int z) { - return block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (BlockSapling)Blocks.sapling); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java deleted file mode 100644 index fa29f99655..0000000000 --- a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java +++ /dev/null @@ -1,246 +0,0 @@ -package gtPlusPlus.xmod.bop.world.features.trees; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; - -import gtPlusPlus.api.objects.Logger; -import net.minecraftforge.common.util.ForgeDirection; - -public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ - - private final int minTreeHeight; - private final int randomTreeHeight; - private final Block wood; - private final Block leaves; - private final int woodMeta; - private final int leavesMeta; - - // return random.nextInt(5) == 0 ? new WorldGenTrees(false, 4 + random.nextInt(7), 3, 3, true) : new WorldGenRainforestTree1(BOPCBlocks.logs4, BOPCBlocks.colorizedLeaves2, 3, 2, false, 8, 8); - - public WorldGenRainForestTree_Ex(Block wood, Block leaves, int woodMeta, int leavesMeta, boolean doBlockNotify, int minTreeHeight, int randomTreeHeight) { - super(doBlockNotify); - this.wood = wood; - this.leaves = leaves; - this.woodMeta = woodMeta; - this.leavesMeta = leavesMeta; - this.minTreeHeight = minTreeHeight; - this.randomTreeHeight = randomTreeHeight; - } - - @Override - public boolean generate(World world, Random random, int x, int y, int z) - { - int treeHeight = random.nextInt(this.randomTreeHeight) + this.minTreeHeight; - boolean flag = true; - if ((y >= 1) && (y + treeHeight + 1 <= 256)) - { - for (int i1 = y; i1 <= y + 1 + treeHeight; i1++) - { - byte b0 = 1; - if (i1 == y) { - b0 = 0; - } - if (i1 >= y + 1 + treeHeight - 2) { - b0 = 2; - } - for (int j1 = x - b0; (j1 <= x + b0) && (flag); j1++) { - for (int k1 = z - b0; (k1 <= z + b0) && (flag); k1++) { - if ((i1 >= 0) && (i1 < 256)) - { - Block block = world.getBlock(j1, i1, k1); - if (!isReplaceable(world, j1, i1, k1)) { - flag = false; - } - } - else - { - flag = false; - } - } - } - } - if (!flag) { - return false; - } - Block block2 = world.getBlock(x, y - 1, z); - - boolean isSoil = block2.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, (BlockSapling)Blocks.sapling); - if ((isSoil) && (y < 256 - treeHeight - 1)) - { - block2.onPlantGrow(world, x, y - 1, z, x, y, z); - byte b0 = 3; - byte b1 = 0; - Logger.WARNING("Sapling located at X:"+x+" | Y:"+y+" | Z:"+z); - for (int k1 = y - b0 + treeHeight; k1 <= y + treeHeight; k1++) - { - Logger.WARNING("[1]| k1 = "+k1+" | y = "+y+" | b0 = "+b0+" | l = "+treeHeight+" | "); - int i3 = k1 - (y + treeHeight); - int l1 = b1 + 1 - i3; - for (int i2 = x - l1; i2 <= x + l1; i2++){ - int j2 = i2 - x; - Logger.WARNING("[2]| i2 = "+i2+" | x = "+x+" | l1 = "+l1+" | j2 = "+j2+" | "); - for (int k2 = z - l1; k2 <= z + l1; k2++){ - int l2 = k2 - z; - Logger.WARNING("[3]| k2 = "+k2+" | z = "+z+" | l1 = "+l1+" | l2 = "+l2+" | "); - if ((Math.abs(j2) != l1) || (Math.abs(l2) != l1) || ((random.nextInt(2) != 0) && (i3 != 0))) - { - Block block1 = world.getBlock(i2, k1, k2); - if ((block1.isAir(world, i2, k1, k2)) || (block1.isLeaves(world, i2, k1, k2))) { - Logger.WARNING("Setting something as leaves?"); - setBlockAndNotifyAdequately(world, i2, k1, k2, this.leaves, this.leavesMeta); - } - } - } - } - } - for (int k1 = 0; k1 < treeHeight; k1++) - { - Logger.WARNING("Building tree - Layer "+k1+" | Max height is "+treeHeight); - Block block = world.getBlock(x, y + k1, z); - if ((block.isAir(world, x, y + k1, z)) || (block.isLeaves(world, x, y + k1, z))){ - setBlockAndNotifyAdequately(world, x, y + k1, z, this.wood, this.woodMeta); - - //Trying this to make trunk - setBlockAndNotifyAdequately(world, x, y + k1, z+1, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + k1, z-1, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x+1, y + k1, z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x-1, y + k1, z, this.wood, this.woodMeta); - - - if (k1 >= 5){ - if (k1 % 5 == 0){ - //Bottom layer - Block block5 = world.getBlock(x, y + k1, z); - for (int xDir = -5; xDir <= 5; xDir++){ - for (int zDir = -5; zDir <= 5; zDir++){ - if (canRemoveLeafBlockLayer2(-5, 5, xDir, -5, 5, zDir)){ - Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+" z="+zDir); - } - else { - Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+" z="+zDir); - block5 = world.getBlock(x+xDir, y+k1, z+zDir); - if (block5.isAir(world, x+xDir, y+k1, x+zDir)){ - setBlockAndNotifyAdequately(world, x+xDir, y + k1, z+zDir, this.leaves, this.leavesMeta); - } - } - } - } - //Next Layer - for (int xDir = -4; xDir <= 4; xDir++){ - for (int zDir = -4; zDir <= 4; zDir++){ - if (canRemoveLeafBlockLayer2(-4, 4, xDir, -4, 4, zDir)){ - Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+1+" z="+zDir); - } - else { - Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y + k1 + 1+" z="+zDir); - block5 = world.getBlock(x+xDir, y+k1 + 1, z+zDir); - if (block5.isAir(world, x+xDir, y+k1 + 1, x+zDir)){ - setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 1, z+zDir, this.leaves, this.leavesMeta); - } - } - } - } - - //Third Layer - for (int xDir = -3; xDir <= 3; xDir++){ - for (int zDir = -3; zDir <= 3; zDir++){ - if (canRemoveLeafBlockLayer2(-3, 3, xDir, -3, 3, zDir)){ - Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); - } - else { - Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); - block5 = world.getBlock(x+xDir, y+k1+2, z+zDir); - if (block5.isAir(world, x+xDir, y+k1+2, x+zDir)){ - setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 2, z+zDir, this.leaves, this.leavesMeta); - } - } - } - } - - //Fourth Layer - for (int xDir = -2; xDir <= 2; xDir++){ - for (int zDir = -2; zDir <= 2; zDir++){ - if (canRemoveLeafBlockLayer2(-2, 2, xDir, -2, 2, zDir)){ - Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); - } - else { - Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); - block5 = world.getBlock(x+xDir, y+k1+3, z+zDir); - if (block5.isAir(world, x+xDir, y+k1+3, x+zDir)){ - setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 3, z+zDir, this.leaves, this.leavesMeta); - } - } - } - } - } - else { - - } - } - - setBlockAndNotifyAdequately(world, x - 3, y + (treeHeight - 3), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x + 3, y + (treeHeight - 3), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z - 3, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z + 3, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x - 2, y + (treeHeight - 4), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x + 2, y + (treeHeight - 4), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 4), z - 2, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 4), z + 2, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x - 2, y + (treeHeight - 5), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x + 2, y + (treeHeight - 5), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 5), z - 2, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 5), z + 2, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x - 1, y + (treeHeight - 6), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x + 1, y + (treeHeight - 6), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 6), z - 1, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 6), z + 1, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z, this.leaves, this.leavesMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 2), z, this.leaves, this.leavesMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 1), z, this.leaves, this.leavesMeta); - setBlockAndNotifyAdequately(world, x, y + treeHeight, z, this.leaves, this.leavesMeta); - func_150515_a(world, x, y + (treeHeight - 4), z, Blocks.air); - func_150515_a(world, x, y + (treeHeight - 5), z, Blocks.air); - setBlockAndNotifyAdequately(world, x - 1, y + (treeHeight - 3), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x + 1, y + (treeHeight - 3), z, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z - 1, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z + 1, this.wood, this.woodMeta); - setBlockAndNotifyAdequately(world, x, y + (treeHeight - 2), z, this.wood, this.woodMeta); - } - } - return true; - } - return false; - } - return false; - } - - private boolean canRemoveLeafBlockLayer2(int xDirMin, int xDirMax, int xDir, int zDirMin, int zDirMax, int zDir){ - if (xDir == xDirMin || xDir == xDirMin +1 || xDir == xDirMax || xDir == xDirMax - 1){ - if (zDir == zDirMin || zDir == zDirMin + 1 || zDir == zDirMax || zDir == zDirMax - 1){ - if (xDir == xDirMin + 1 && zDir == zDirMin + 1){ - return false; - } - else if (xDir == xDirMin + 1 && zDir == zDirMax - 1){ - return false; - } - else if (xDir == xDirMax - 1 && zDir == zDirMin + 1){ - return false; - } - else if (xDir == xDirMax - 1 && zDir == zDirMax - 1){ - return false; - } - return true; - } - return false; - } - else { - return false; - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java b/src/Java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java deleted file mode 100644 index 7bce4ab173..0000000000 --- a/src/Java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.xmod.cofh; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.general.RF2EU_Battery; -import gtPlusPlus.core.lib.LoadedMods; - -public class HANDLER_COFH { - - public static void initItems() { - if (LoadedMods.CoFHCore && (LoadedMods.IndustrialCraft2 || LoadedMods.IndustrialCraft2Classic)) { - ModItems.RfEuBattery = new RF2EU_Battery(); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java b/src/Java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java deleted file mode 100644 index 9647465711..0000000000 --- a/src/Java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.xmod.computronics; - -import gregtech.GT_Mod; -import gregtech.api.enums.*; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.core.lib.LoadedMods; - -public class HANDLER_Computronics { - - public static void preInit(){ - if (LoadedMods.Computronics){ - - } - - } - - public static void init(){ - if (LoadedMods.Computronics){ - - } - else { - GT_Mod.gregtechproxy.addFluid("Argon", "Argon", Materials.Argon, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), 1000); - GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L), Materials.Air.getGas(1000L), Materials.Nitrogen.getGas(780L), 1600, 32, false); - GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.Air.getGas(1000L), Materials.Oxygen.getGas(210L), 1600, 128, false); - GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 3L), Materials.Air.getGas(1000L), Materials.Argon.getGas(5L), 6000, 512, false); - GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Air, 1L), null, null, Materials.Air.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), null, null, null, null, null, null, 800, 30); - } - } - - public static void postInit(){ - if (LoadedMods.Computronics){ - - } - - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java deleted file mode 100644 index 5b3210d58a..0000000000 --- a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java +++ /dev/null @@ -1,87 +0,0 @@ -package gtPlusPlus.xmod.eio.handler; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.disableEnderIOIngotTooltips; - -import java.lang.reflect.Field; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import gregtech.api.enums.Materials; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.eio.material.MaterialEIO; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -public class HandlerTooltip_EIO { - - private static Item mIngot; - Class oMainClass; - Class oIngotClass; - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event){ - //Is EIO loaded? - if (!disableEnderIOIngotTooltips && LoadedMods.EnderIO){ - - //Is the EIO Ingot Item null? - //If it is, reflect in. - if (mIngot == null){ - try { - oMainClass = ReflectionUtils.getClass("crazypants.enderio.EnderIO"); - oIngotClass = ReflectionUtils.getClass("crazypants.enderio.material.ItemAlloy"); - if (oMainClass != null && oIngotClass != null){ - Field oAlloyField = ReflectionUtils.getField(oMainClass, "itemAlloy"); - Object oAlloy = oAlloyField.get(oMainClass); - if (oAlloy != null){ - if (oIngotClass.isInstance(oAlloy) || Item.class.isInstance(oAlloy)){ - mIngot = (Item) oAlloy; - } - } - } - } - catch (Throwable e) { - } - } - - if (mIngot != null){ - //If the Item is an instance of ItemAlloy.class then proceed - if (event.itemStack.getItem() == mIngot || oIngotClass.isInstance(event.itemStack.getItem()) || event.itemStack.getUnlocalizedName().toLowerCase().contains("item.itemAlloy")){ - - //If stacks match, add a tooltip. - if (mIngot != null){ - if (event.itemStack.getItem() == mIngot){ - if (event.itemStack.getItemDamage() == 0){ - event.toolTip.add(MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 1){ - event.toolTip.add(MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 2){ - event.toolTip.add(MaterialEIO.VIBRANT_ALLOY.vChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 3){ - event.toolTip.add(MaterialEIO.REDSTONE_ALLOY.vChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 4){ - event.toolTip.add(MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 5){ - event.toolTip.add(MaterialEIO.PULSATING_IRON.vChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 6){ - event.toolTip.add(Materials.DarkSteel.mChemicalFormula); - } - else if (event.itemStack.getItemDamage() == 7){ - event.toolTip.add(MaterialEIO.SOULARIUM.vChemicalFormula); - } - } - } - } - } - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java b/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java deleted file mode 100644 index a5c87342e7..0000000000 --- a/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java +++ /dev/null @@ -1,121 +0,0 @@ -package gtPlusPlus.xmod.eio.material; - -import gtPlusPlus.core.material.*; -import gtPlusPlus.core.material.state.MaterialState; - -public class MaterialEIO { - - public static final Material SOULARIUM = new Material( - "Soularium", //Material Name - MaterialState.SOLID, //State - new short[]{95,90,54, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - false, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().GOLD, 1), - new MaterialStack(NONMATERIAL.SOULSAND, 1) - }); - - public static final Material CONDUCTIVE_IRON = new Material( - "Conductive Iron", //Material Name - MaterialState.SOLID, //State - new short[]{164,109,100, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - false, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 1), - new MaterialStack(NONMATERIAL.REDSTONE, 1) - }); - - public static final Material PULSATING_IRON = new Material( - "Pulsating Iron", //Material Name - MaterialState.SOLID, //State - new short[]{50,91,21, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - false, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().IRON, 1), - new MaterialStack(NONMATERIAL.ENDERPEARL, 1) - }); - - public static final Material ELECTRICAL_STEEL = new Material( - "Electrical Steel", //Material Name - MaterialState.SOLID, //State - new short[]{194,194,194, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - true, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ALLOY.STEEL, 3), - new MaterialStack(ELEMENT.getInstance().SILICON, 1) - }); - - public static final Material ENERGETIC_ALLOY = new Material( - "Energetic Alloy", //Material Name - MaterialState.SOLID, //State - new short[]{252,151,45, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - true, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().GOLD, 1), - new MaterialStack(NONMATERIAL.REDSTONE, 1), - new MaterialStack(NONMATERIAL.GLOWSTONE, 1) - }); - - public static final Material VIBRANT_ALLOY = new Material( - "Vibrant Alloy", //Material Name - MaterialState.SOLID, //State - new short[]{204,242,142, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - true, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ENERGETIC_ALLOY, 1), - new MaterialStack(NONMATERIAL.ENDERPEARL, 1) - }); - - public static final Material REDSTONE_ALLOY = new Material( - "Redstone Alloy", //Material Name - MaterialState.SOLID, //State - new short[]{178,34,34, 0}, //Material Colour - 10, //Melting Point in C - 10, - 10, - 10, - false, //Uses Blast furnace? - false, //Generates a cell - //Material Stacks with Percentage of required elements. - new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().SILICON, 1), - new MaterialStack(NONMATERIAL.REDSTONE, 1) - }); - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java deleted file mode 100644 index 05d00b06d9..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.xmod.forestry; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import cpw.mods.fml.common.Optional; - -import net.minecraft.block.Block; -import net.minecraft.world.World; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry; -import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes; - -public class HANDLER_FR { - - public static void preInit(){ - if (LoadedMods.Forestry){ - FR_ItemRegistry.Register(); - } - } - - public static void Init(){ - if (LoadedMods.Forestry){ - //new GTPP_Bees(); TODO- Will Investigate this properly later. - } - } - - public static void postInit(){ - if (LoadedMods.Forestry){ - FR_Gregtech_Recipes.registerItems(); - } - } - - public static boolean createBlockBreakParticles(final World world, final int x, final int y, final int z, final Block block){ - if (LoadedMods.Forestry){ - createBlockBreakParticles_INTERNAL(world, x, y, z, block); - } - return false; - } - - @Optional.Method(modid = "Forestry") - private static void createBlockBreakParticles_INTERNAL(final World world, final int x, final int y, final int z, final Block block){ - if (LoadedMods.Forestry){ - Class oClass; - try { - oClass = ReflectionUtils.getClass("forestry.core.proxy.ProxyCommon"); - Object oProxy = ReflectionUtils.getField(oClass, "common"); - if (oProxy != null && oClass.isInstance(oProxy)){ - Method mParticles = ReflectionUtils.getMethod(oClass, "addBlockDestroyEffects", World.class, int.class, int.class, int.class, Block.class, int.class); - mParticles.invoke(oProxy, world, x, y, z, block, 0); - } - } - catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java deleted file mode 100644 index 77ee15c5d5..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java +++ /dev/null @@ -1,24 +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 gtPlusPlus.xmod.forestry.bees.blocks; - -import forestry.apiculture.blocks.BlockApicultureType; -import forestry.core.blocks.BlockBase; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockDenseBeeHouse extends BlockBase { - public BlockDenseBeeHouse() { - super(); - setCreativeTab(AddToCreativeTab.tabBOP); - setHarvestLevel("axe", 0); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java b/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java deleted file mode 100644 index fa36732cb6..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.blocks; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import forestry.core.utils.StringUtil; -import forestry.plugins.PluginManager; -import net.minecraftforge.oredict.OreDictionary; - -public abstract class FR_BlockRegistry { - protected static T registerBlock(T block, Class itemClass, String name) { - if (PluginManager.getStage() != PluginManager.Stage.SETUP) { - throw new RuntimeException("Tried to register Block outside of Setup"); - } - block.setBlockName("for." + name); - GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block)); - return block; - } - - protected static void registerOreDictWildcard(String oreDictName, Block block) { - OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, 32767)); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java deleted file mode 100644 index b4d6e4c2fc..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java +++ /dev/null @@ -1,119 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.custom; - -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_LanguageManager; - -import gtPlusPlus.core.util.Utils; - -public enum CustomCombs { - //Custom Bees - - //Rubbers & Silicons - SILICON("silicon", true, Materials.Silicon, 100), - RUBBER("rubber", true, Materials.Rubber, 100), - PLASTIC("polyethylene", true, Materials.Plastic, 75), - PTFE("polytetrafluoroethylene", true, GTPP_Bees.PTFE, 50), - PBS("styrene-butadiene", true, GTPP_Bees.PBS, 25), - - //Fuels - BIOMASS("biomass", true, Materials.Biomass, 100), - ETHANOL("ethanol", true, Materials.Ethanol, 75), - DIESEL("diesel", true, Materials.Fuel, 50), - NITRO("nitro", true, Materials.NitroFuel, 25), - HOOTCH("hootch", true, Materials.Silicon, 50), - ROCKETFUEL("rocket", true, Materials.Silicon, 25), - - - //Materials which are hard, if not impossible to obtain. - FLUORINE("fluorine", true, Materials.Fluorine, 25), - COKE("coke", true, Materials._NULL, 50), - FORCE("force", true, Materials.Force, 50), - NIKOLITE("nikolite", true, Materials.Nikolite, 75), - MITHRIL("mithril", true, Materials.Mithril, 10), - ADAMANTIUM("adamantium", true, Materials.Adamantium, 5), - - //Trash - SALT("salt", true, Materials.Salt, 75), - SAND("sand", true, Materials.Sand, 100), - - ; - - private static int[][] colours = new int[][]{ - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //SILICON - {Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)}, //RUBBER - {Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)}, //PLASTIC - {Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)}, //PTFE - {Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)}, //PBS - //Unused - {Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)}, //Biofuel - {Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)}, //Ethanol - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(30, 230, 230), Utils.rgbtoHexValue(10, 150, 150)}, // Fluorine - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)}, // Force - {Utils.rgbtoHexValue(60, 180, 200), Utils.rgbtoHexValue(40, 150, 170)}, // Nikolite - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // - {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, - {0x666666, 0x525252}, - {0x2E8F5B, 0xDCC289}, - {0x4C4C4C, 0x333333}, - {0x808080, 0x999999}, - {0x57CFFB, 0xBBEEFF}, - {0x7D0F0F, 0xD11919}, - {0x1947D1, 0x476CDA}, - {0xE6005C, 0xCC0052}, - {0x0033CC, 0x00248F}, - {0xCCFFFF, 0xA3CCCC}, - {0x248F24, 0xCCFFCC}, - {0x248F24, 0x2EB82E}, - {0xD4D4D4, 0x58300B}, - {0xFF6600, 0xE65C00}, - {0xD4D4D4, 0xDDDDDD}, - {0x666699, 0xA3A3CC}, - {0xDA9147, 0xDE9C59}, - {0x808080, 0x999999}, - {0x8585AD, 0x9D9DBD}, - {0xF0DEF0, 0xF2E1F2}, - {0xC2C2D6, 0xCECEDE}, - {0xE6B800, 0xCFA600}, - {0x008AB8, 0xD6D6FF}, - {0xD5D5D5, 0xAAAAAA}, - {0xCC99FF, 0xDBB8FF}, - {0xEBA1EB, 0xF2C3F2}, - {0x62626D, 0x161620}, - {0xE6E6E6, 0xFFFFCC}, - {0xDADADA, 0xD1D1E0}, - {0x19AF19, 0x169E16}, - {0x335C33, 0x6B8F00}, - {0x003300, 0x002400}, - }; - public boolean showInList; - public Materials material; - public int chance; - private String name; - private CustomCombs(String pName, boolean show, Materials material, int chance) { - this.name = pName; - this.material = material; - this.chance = chance; - this.showInList = show; - } - - public void setHidden() { - this.showInList = false; - } - - public String getName() { -// return "gt.comb."+this.name; - return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); - } - - public int[] getColours() { - return colours[this.ordinal()]; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java deleted file mode 100644 index b36508f6aa..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java +++ /dev/null @@ -1,876 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.custom; - -import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.Locale; - -import org.apache.commons.lang3.reflect.FieldUtils; -import org.apache.commons.lang3.text.WordUtils; - -import net.minecraft.item.ItemStack; - -import forestry.api.apiculture.*; -import forestry.api.core.EnumHumidity; -import forestry.api.core.EnumTemperature; -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import forestry.apiculture.genetics.*; -import forestry.core.genetics.alleles.AlleleHelper; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraftforge.common.BiomeDictionary.Type; - -public enum GTPP_Bee_Definition implements IBeeDefinition { - - - SILICON(GTPP_Branch_Definition.ORGANIC, "Silicon", true, Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getSlagComb(), 0.10f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILICON), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10); - } - }, - - RUBBER(GTPP_Branch_Definition.ORGANIC, "Rubber", true, Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getSlagComb(), 0.10f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBBER), 0.30f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10); - } - }, - - PLASTIC(GTPP_Branch_Definition.ORGANIC, "Plastic", true, Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getStoneComb(), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PLASTIC), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(RUBBER.species, getGregtechBeeType("OIL"), 10); - } - }, - - PTFE(GTPP_Branch_Definition.ORGANIC, "Ptfe", true, Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getStoneComb(), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PTFE), 0.10f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(RUBBER.species, PLASTIC.species, 10); - } - }, - - PBS(GTPP_Branch_Definition.ORGANIC, "Pbs", true, Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getStoneComb(), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PBS), 0.10f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(PTFE.species, PLASTIC.species, 10); - } - }, - - - - - /** - * Fuels - */ - - BIOMASS(GTPP_Branch_Definition.ORGANIC, "Biomass", true, Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.BIOMASS), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Rural"), 10); - tMutation.restrictBiomeType(Type.FOREST); - } - }, - - ETHANOL(GTPP_Branch_Definition.ORGANIC, "Ethanol", true, Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ETHANOL), 0.20f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(BIOMASS.species, getSpecies("Farmerly"), 5); - tMutation.restrictBiomeType(Type.FOREST); - } - }, - - - - - - - - - - - - - - - - - - - - - - /** - * Materials - */ - - - FLUORINE(GTPP_Branch_Definition.ORGANIC, "Fluorine", true, Utils.rgbtoHexValue(30, 230, 230), Utils.rgbtoHexValue(10, 150, 150)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getStoneComb(), 0.40f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FLUORINE), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.COLD); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("LAPIS"), getGregtechBeeType("SAPPHIRE"), 5); - tMutation.restrictBiomeType(Type.COLD); - } - }, - - //Coke - - - - //Force - FORCE(GTPP_Branch_Definition.METAL, "Force", true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getStoneComb(), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.25f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FORCE), 0.25f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SALT), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.HOT); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("STEEL"), getGregtechBeeType("GOLD"), 10); - tMutation.restrictBiomeType(Type.HOT); - } - }, - - //Nikolite - NIKOLITE(GTPP_Branch_Definition.METAL, "Nikolite", true, Utils.rgbtoHexValue(60, 180, 200), Utils.rgbtoHexValue(40, 150, 170)) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(getStoneComb(), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NIKOLITE), 0.05f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.HOT); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("ALUMINIUM"), getGregtechBeeType("SILVER"), 8); - tMutation.restrictBiomeType(Type.HOT); - } - }, - - - - - - - - /* - - - CLAY(GTPP_Branch_Definition.ORGANIC, "Clay", true, 0x19d0ec, 0xffdc16) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); - beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f); - beeSpecies.setHumidity(EnumHumidity.DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.MEADOWS.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Diligent"), 20); - } - }, - SLIMEBALL(GTPP_Branch_Definition.ORGANIC, "SlimeBall", true, 0x4E9E55, 0x00FF15) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STICKY), 0.30f); - beeSpecies.setHumidity(EnumHumidity.DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.MARSHY.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Marshy"), CLAY.species, 15); - } - }, - PEAT(GTPP_Branch_Definition.ORGANIC, "Peat", true, 0x906237, 0x58300B) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f); - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.RURAL.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Rural"), CLAY.species, 20); - } - }, - STICKYRESIN(GTPP_Branch_Definition.ORGANIC, "StickyResin", true, 0x2E8F5B, 0xDCC289) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); - beeSpecies.addProduct(ItemList.IC2_Resin.get(1, new Object[0]), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.MEADOWS.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(SLIMEBALL.species, PEAT.species, 25); - } - }, - COAL(GTPP_Branch_Definition.ORGANIC, "Coal", true, 0x666666, 0x525252) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COAL), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.AUSTERE.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), PEAT.species, 18); - } - }, - OIL(GTPP_Branch_Definition.ORGANIC, "Oil", true, 0x4C4C4C, 0x333333) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OIL), 0.15f); - beeSpecies.setHumidity(EnumHumidity.DAMP); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - beeSpecies.setNocturnal(); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.MEADOWS.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(COAL.species, STICKYRESIN.species, 8); - } - }, - REDSTONE(GTPP_Branch_Definition.GEM, "Redstone", true, 0x7D0F0F, 0xD11919) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.REDSTONE), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Demonic"), 20); - } - }, - LAPIS(GTPP_Branch_Definition.GEM, "Lapis", true, 0x1947D1, 0x476CDA) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LAPIS), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Demonic"), getSpecies("Imperial"), 20); - } - }, - CERTUS(GTPP_Branch_Definition.GEM, "CertusQuartz", true, 0x57CFFB, 0xBBEEFF) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.CERTUS), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Hermitic"), LAPIS.species, 20); - } - }, - RUBY(GTPP_Branch_Definition.GEM, "Ruby", true, 0xE6005C, 0xCC0052) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBY), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, DIAMOND.species, 10); - } - }, - SAPPHIRE(GTPP_Branch_Definition.GEM, "Sapphire", true, 0x0033CC, 0x00248F) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAPPHIRE), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(CERTUS.species, LAPIS.species, 10); - } - }, - DIAMOND(GTPP_Branch_Definition.GEM, "Diamond", true, 0xCCFFFF, 0xA3CCCC) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.DIAMOND), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(CERTUS.species, COAL.species, 6); - } - }, - OLIVINE(GTPP_Branch_Definition.GEM, "Olivine", true, 0x248F24, 0xCCFFCC) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OLIVINE), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(CERTUS.species, getSpecies("Ended"), 10); - } - }, - EMERALD(GTPP_Branch_Definition.GEM, "Emerald", true, 0x248F24, 0x2EB82E) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.EMERALD), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.COLD); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(OLIVINE.species, DIAMOND.species, 8); - } - }, - COPPER(GTPP_Branch_Definition.METAL, "Copper", true, 0xFF6600, 0xE65C00) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COPPER), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(getSpecies("Majestic"), CLAY.species, 25); - } - }, - TIN(GTPP_Branch_Definition.METAL, "Tin", true, 0xD4D4D4, 0xDDDDDD) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TIN), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(CLAY.species, getSpecies("Diligent"), 25); - } - }, - LEAD(GTPP_Branch_Definition.METAL, "Lead", true, 0x666699, 0xA3A3CC) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LEAD), 0.15f); - beeSpecies.setHumidity(EnumHumidity.DAMP); - beeSpecies.setTemperature(EnumTemperature.WARM); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(COAL.species, COPPER.species, 25); - } - }, - IRON(GTPP_Branch_Definition.METAL, "Iron", true, 0xDA9147, 0xDE9C59) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.IRON), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(TIN.species, COPPER.species, 25); - } - }, - STEEL(GTPP_Branch_Definition.METAL, "Steel", true, 0x808080, 0x999999) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STEEL), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(IRON.species, COAL.species, 20); - } - }, - NICKEL(GTPP_Branch_Definition.METAL, "Nickel", true, 0x8585AD, 0x8585AD) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NICKEL), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(IRON.species, COPPER.species, 25); - } - }, - ZINC(GTPP_Branch_Definition.METAL, "Zinc", true, 0xF0DEF0, 0xF2E1F2) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ZINC), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(IRON.species, TIN.species, 20); - } - }, - SILVER(GTPP_Branch_Definition.METAL, "Silver", true, 0xC2C2D6, 0xCECEDE) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILVER), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(LEAD.species, TIN.species, 20); - } - }, - GOLD(GTPP_Branch_Definition.METAL, "Gold", true, 0xEBC633, 0xEDCC47) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.GOLD), 0.15f); - beeSpecies.setHumidity(EnumHumidity.NORMAL); - beeSpecies.setTemperature(EnumTemperature.NORMAL); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(LEAD.species, COPPER.species, 20); - } - }, - ALUMINIUM(GTPP_Branch_Definition.RAREMETAL, "Aluminium", true, 0xB8B8FF, 0xD6D6FF) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ALUMINIUM), 0.15f); - beeSpecies.setHumidity(EnumHumidity.ARID); - beeSpecies.setTemperature(EnumTemperature.HOT); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(NICKEL.species, ZINC.species, 18); - } - }, - TITANIUM(GTPP_Branch_Definition.RAREMETAL, "Titanium", true, 0xCC99FF, 0xDBB8FF) { - @Override - protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); - beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TITANIUM), 0.15f); - beeSpecies.setHumidity(EnumHumidity.ARID); - beeSpecies.setTemperature(EnumTemperature.HOT); - } - - @Override - protected void setAlleles(IAllele[] template) { - template = BeeDefinition.COMMON.getTemplate(); - } - - @Override - protected void registerMutations() { - IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, ALUMINIUM.species, 5); - } - }*/ - - ; - - - private final GTPP_Branch_Definition branch; - private final IAlleleBeeSpeciesCustom species; - - private IAllele[] template; - private IBeeGenome genome; - - GTPP_Bee_Definition(GTPP_Branch_Definition branch, String binomial, boolean dominant, int primary, int secondary) { - String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH); - String species = "species" + WordUtils.capitalize(lowercaseName); - - String uid = "forestry." + species; - String description = "for.description." + species; - String name = "for.bees.species." + lowercaseName; - - this.branch = branch; - this.species = BeeManager.beeFactory.createSpecies(uid, dominant, "Sengir", name, description, branch.getBranch(), binomial, primary, secondary); - } - - public static void initBees() { - for (GTPP_Bee_Definition bee : values()) { - bee.init(); - } - for (GTPP_Bee_Definition bee : values()) { - bee.registerMutations(); - } - } - - private static IAlleleBeeSpecies getSpecies(String name) { - return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString()); - } - - protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies); - - protected abstract void setAlleles(IAllele[] template); - - protected abstract void registerMutations(); - - private void init() { - setSpeciesProperties(species); - - template = branch.getTemplate(); - AlleleHelper.instance.set(template, EnumBeeChromosome.SPECIES, species); - setAlleles(template); - - genome = BeeManager.beeRoot.templateAsGenome(template); - - BeeManager.beeRoot.registerTemplate(template); - } - - protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) { - IAllele[] template = getTemplate(); - Logger.DEBUG_BEES("parent1: "+(parent1 != null)); - Logger.DEBUG_BEES("parent2: "+(parent2 != null)); - Logger.DEBUG_BEES("chance: "+(chance)); - Logger.DEBUG_BEES("template: "+(template != null)); - return BeeManager.beeMutationFactory.createMutation(parent1, parent2, template, chance); - } - - @Override - public final IAllele[] getTemplate() { - return Arrays.copyOf(template, template.length); - } - - @Override - public final IBeeGenome getGenome() { - return genome; - } - - @Override - public final IBee getIndividual() { - return new Bee(genome); - } - - @Override - public final ItemStack getMemberStack(EnumBeeType beeType) { - IBee bee = getIndividual(); - return BeeManager.beeRoot.getMemberStack(bee, beeType.ordinal()); - } - - public final IBeeDefinition getRainResist() { - return new BeeVariation.RainResist(this); - } - - private static ItemStack getSlagComb(){ - return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Slag, 1)); - } - private static ItemStack getStoneComb(){ - return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Stone, 1)); - } - - private static ItemStack issStackValid(ItemStack result){ - if (result == null){ - return ItemUtils.getErrorStack(1); - } - return result; - } - - public static IAlleleBeeSpecies getGregtechBeeType(String name){ - Class gtBees; - try { - Class gtBeeTypes = Class.forName("gregtech.loaders.misc.GT_BeeDefinition"); - Enum gtBeeEnumObject = Enum.valueOf(gtBeeTypes, name); - Field gtBeesField = FieldUtils.getDeclaredField(gtBeeTypes, "species", true); - gtBeesField.setAccessible(true); - ReflectionUtils.makeFieldAccessible(gtBeesField); - Object beeType = gtBeesField.get(gtBeeEnumObject); - return (IAlleleBeeSpecies) beeType; - } - catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - } - return null; - } -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java deleted file mode 100644 index 49b8da0d1b..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java +++ /dev/null @@ -1,195 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.custom; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import cpw.mods.fml.common.Loader; -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IAllele; -import gregtech.GT_Mod; -import gregtech.api.enums.Materials; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD; -import gtPlusPlus.core.item.base.misc.BaseItemMisc; -import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GTPP_Bees { - - //Custom Comb Drop Base Items - public static Item dropForceGem; - public static Item dropBiomassBlob; - public static Item dropEthanolBlob; - public static Item dropNikoliteDust; - public static Item dropFluorineBlob; - - //Base Comb Item - public static ItemCustomComb combs; - - //Combs obtained via reflection - public static ItemStack Comb_Slag; - public static ItemStack Comb_Stone; - - //Materials obtained via reflection - public static Materials PTFE; - public static Materials PBS; - - //public static GTPP_Branch_Definition definition; - - - public GTPP_Bees() { - if (Loader.isModLoaded("Forestry") /*&& tryGetBeesBoolean()*/) { - - for (IAllele o : AlleleManager.alleleRegistry.getRegisteredAlleles().values()){ - //Utils.LOG_DEBUG_BEES(" =================================================="); - //Utils.LOG_DEBUG_BEES(" Name: "+o.getName()); - //Utils.LOG_DEBUG_BEES(" Name: "+o.getUnlocalizedName()); - //Utils.LOG_DEBUG_BEES(" getUID: "+o.getUID()); - //Utils.LOG_DEBUG_BEES(" isDominant: "+o.isDominant()); - } - - //Set Materials and Comb stacks from GT via Reflection - setMaterials(); - setCustomItems(); - - try { - combs = new ItemCustomComb(); - combs.initCombsRecipes(); - GTPP_Bee_Definition.initBees(); - } - catch (Throwable t){ - Logger.BEES("Failed to load bees, probably due to an ancient forestry version"); - t.printStackTrace(); - } - } - } - - private void setCustomItems() { - dropForceGem = new BaseItemMisc("Force", new short[]{250, 250, 20}, 64, MiscTypes.GEM, null); - //mGregMatLoader.enableMaterial(Materials.Force); - //MaterialUtils.tryEnableMaterial(Materials.Force); - //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force); - //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force); - dropBiomassBlob = new BaseItemMisc("Biomass", new short[]{33, 225, 24}, 64, MiscTypes.DROP, null); - dropEthanolBlob = new BaseItemMisc("Ethanol", new short[]{255, 128, 0}, 64, MiscTypes.DROP, null); - - //Nikolite may not exist, so lets make it. - dropNikoliteDust = ItemUtils.generateSpecialUseDusts("Nikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200))[2]; - //mGregMatLoader.enableMaterial(Materials.BlueAlloy); - //mGregMatLoader.enableMaterial(Materials.Nikolite); - //MaterialUtils.tryEnableMaterial(Materials.Nikolite); - //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite); - //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite); - //MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite); - //MaterialUtils.tryEnableMaterial(Materials.BlueAlloy); - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotNikolite", 1) == null){ - new BaseItemIngot_OLD("itemIngotNikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200), 0); - } - - dropFluorineBlob = new BaseItemMisc("Fluorine", new short[]{30, 230, 230}, 64, MiscTypes.DROP, null); - addRecipes(); - } - - private void addRecipes(){ - addExtractorRecipe(ItemUtils.getSimpleStack(dropBiomassBlob), FluidUtils.getFluidStack("biomass", 30)); - addExtractorRecipe(ItemUtils.getSimpleStack(dropEthanolBlob), FluidUtils.getFluidStack("ethanol", 6)); - addExtractorRecipe(ItemUtils.getSimpleStack(dropFluorineBlob), FluidUtils.getFluidStack("fluorine", 4)); - } - - private void addExtractorRecipe(ItemStack input, FluidStack output){ - CORE.RA.addFluidExtractionRecipe( - input, - output, - 30, - 8); - } - - - private static boolean tryGetBeesBoolean(){ - try { - Class mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy"); - Field mNerf = FieldUtils.getDeclaredField(mProxy, "mGTBees", true); - boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy); - return returnValue; - } - catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) { - return false; - } - } - - private void setMaterials(){ - try { - - Class gtBees = Class.forName("gregtech.loaders.misc.GT_Bees"); - Class gtCombItemClass = Class.forName("gregtech.common.items.ItemComb"); - Class gtCombEnumClass = Class.forName("gregtech.common.items.CombType"); - Field gtCombs = FieldUtils.getDeclaredField(gtBees, "combs", true); - gtCombs.setAccessible(true); - ReflectionUtils.makeFieldAccessible(gtCombs); - Enum gtCombTypeSlag = Enum.valueOf(gtCombEnumClass, "SLAG"); - Enum gtCombTypeStone = Enum.valueOf(gtCombEnumClass, "STONE"); - Object oCombObject = gtCombs.get(null); - - Logger.DEBUG_BEES("Field getModifiers: "+gtCombs.getModifiers()); - Logger.DEBUG_BEES("Field toGenericString: "+gtCombs.toGenericString()); - Logger.DEBUG_BEES("Field getClass: "+gtCombs.getClass()); - Logger.DEBUG_BEES("Field isEnumConstant: "+gtCombs.isEnumConstant()); - Logger.DEBUG_BEES("Field isSynthetic: "+gtCombs.isSynthetic()); - Logger.DEBUG_BEES("Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null)); - Logger.DEBUG_BEES("Field isAccessible: "+gtCombs.isAccessible()); - - - Logger.BEES("gtBees: "+(gtBees != null)); - Logger.BEES("gtCombItemClass: "+(gtCombItemClass != null)); - Logger.BEES("gtCombEnumClass: "+(gtCombEnumClass != null)); - Logger.BEES("gtCombs: "+(gtCombs != null)); - Logger.BEES("gtCombTypeSlag: "+(gtCombTypeSlag != null)); - Logger.BEES("gtCombTypeStone: "+(gtCombTypeStone != null)); - Logger.BEES("oCombObject: "+(oCombObject != null)); - - - //if (gtCombItemClass.isInstance(oCombObject)){ - Method getStackForType; - getStackForType = gtCombItemClass.getDeclaredMethod("getStackForType", gtCombEnumClass); - - if (getStackForType != null) { - Logger.BEES("Found Method: getStackForType"); - } - if (Comb_Slag == null){ - Comb_Slag = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeSlag); - } - if (Comb_Stone == null){ - Comb_Stone = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeStone); - } - /*} - else { - Utils.LOG_BEES("oCombObject was not an instance of gregtech.common.items.ItemComb"); - }*/ - - } - catch (NullPointerException | ClassNotFoundException | IllegalArgumentException | IllegalAccessException | NoSuchMethodException | SecurityException | InvocationTargetException e){ - Logger.BEES("Bad Reflection. setMaterials()"); - } - - PTFE = trySetValue("Polytetrafluoroethylene"); - PBS = trySetValue("StyreneButadieneRubber"); - } - - private Materials trySetValue(String material){ - Materials mTemp = Materials.valueOf(material); - if (mTemp != null){ - return mTemp; - } - return Materials._NULL; - } -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java deleted file mode 100644 index f59f0c537f..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.custom; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IClassification; -import gtPlusPlus.api.objects.Logger; - -public enum GTPP_Branch_Definition { - - ORGANIC("ORGANIC"), - GEM("GEM"), - METAL("METAL"), - RAREMETAL("RAREMETAL"), - RADIOACTIVE("RADIOACTIVE"); - - final String mFieldName; - final Enum mActualValues; - GTPP_Branch_Definition(String mValue){ - this.mFieldName = mValue; - this.mActualValues = setEnumVar(mValue); - } - - public final IAllele[] getTemplate() { - Class gtBranchDefClass; - try { - gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition"); - Enum enumA = mActualValues; - Method methodMyMethod = gtBranchDefClass.getMethod("getTemplate"); - - Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); - Logger.INFO("[Bees] enumA: "+(enumA != null)); - Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); - - return (IAllele[]) methodMyMethod.invoke(enumA); - } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.INFO("[Bees] Bad Reflection. getTemplate()"); - e.printStackTrace(); - //gregtech.loaders.misc.GT_BranchDefinition.getTemplate() - return null; - } - } - - public final IClassification getBranch() { - Class gtBranchDefClass; - try { - gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition"); - Enum enum_MY_SAMPLE_ENUM = mActualValues; - Method methodMyMethod = gtBranchDefClass.getMethod("getBranch"); - - - Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); - Logger.INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null)); - Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); - - return (IClassification) methodMyMethod.invoke(enum_MY_SAMPLE_ENUM); - } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.INFO("[Bees] Bad Reflection. getBranch()"); - e.printStackTrace(); - return null; - } - } - - private Enum setEnumVar(String value){ - try { - Class gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition"); - Enum branchDef = Enum.valueOf(gtBranchDefClass, value); - return branchDef; - } - catch (ClassNotFoundException e){ - return null; - } - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java deleted file mode 100644 index 813ebcbe25..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java +++ /dev/null @@ -1,181 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.custom; - -import java.lang.reflect.Field; -import java.util.List; - -import org.apache.commons.lang3.reflect.FieldUtils; - - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gregtech.GT_Mod; -import gregtech.api.enums.*; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import forestry.api.core.Tabs; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class ItemCustomComb extends Item { - @SideOnly(Side.CLIENT) - private IIcon secondIcon; - - public ItemCustomComb() { - super(); - this.setCreativeTab(Tabs.tabApiculture); - this.setHasSubtypes(true); - this.setUnlocalizedName("gtpp.comb"); - GameRegistry.registerItem(this, "gtpp.comb", CORE.MODID); - } - - public ItemStack getStackForType(CustomCombs type) { - return new ItemStack(this, 1, type.ordinal()); - } - - public ItemStack getStackForType(CustomCombs type, int count) { - return new ItemStack(this, count, type.ordinal()); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tabs, List list) { - for (CustomCombs type : CustomCombs.values()) { - if (type.showInList) { - list.add(this.getStackForType(type)); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public boolean requiresMultipleRenderPasses() { - return true; - } - - @Override - public int getRenderPasses(int meta) { - return 2; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister par1IconRegister) { - this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0"); - this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1"); - } - - @Override - public IIcon getIcon(ItemStack stack, int pass) { - return (pass == 0) ? itemIcon : secondIcon; - } - - @Override - @SideOnly(Side.CLIENT) - public int getColorFromItemStack(ItemStack stack, int pass) { - int meta = Math.max(0, Math.min(CustomCombs.values().length - 1, stack.getItemDamage())); - int colour = CustomCombs.values()[meta].getColours()[0]; - - if (pass >= 1) { - colour = CustomCombs.values()[meta].getColours()[1]; - } - - return colour; - } - - @Override - public String getItemStackDisplayName(ItemStack stack) { - return CustomCombs.values()[stack.getItemDamage()].getName(); - } - - public void initCombsRecipes() { - ItemStack tComb; - - tComb = getStackForType(CustomCombs.SILICON); - addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silicon, 1), 30); - //addProcess(tComb, Materials.Silver, 100); - //addProcess(tComb, Materials.Galena, 100); - - //Rubbers - tComb = getStackForType(CustomCombs.RUBBER); - addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rubber, 1), 30); - tComb = getStackForType(CustomCombs.PLASTIC); - addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), 20); - tComb = getStackForType(CustomCombs.PTFE); - addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PTFE, 1), 10); - tComb = getStackForType(CustomCombs.PBS); - addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PBS, 1), 5); - - - //Fuels - tComb = getStackForType(CustomCombs.BIOMASS); - addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropBiomassBlob), 5); - tComb = getStackForType(CustomCombs.PBS); - addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropEthanolBlob), 5); - - //Misc Materials - tComb = getStackForType(CustomCombs.FORCE); - addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropForceGem), 5); - tComb = getStackForType(CustomCombs.FLUORINE); - addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropFluorineBlob), 5); - tComb = getStackForType(CustomCombs.NIKOLITE); - addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropNikoliteDust), 5); - - } - public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); - //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); - } - - public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000, chance2 * 100 }, 128, 5); - //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f)); - } - - public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2, ItemStack aOutput3, int chance3){ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, aOutput3, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000, chance2 * 100, chance3*100 }, 128, 5); - //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f,aOutput3,chance3*0.01f)); - } - - public void addProcess(ItemStack tComb, Materials aMaterial, int chance){ - if(tryGetNerfBoolean()){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tComb), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); - //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); - } - } - - public void addProcess(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ - if(tryGetNerfBoolean()){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), Materials.Water.getFluid(1000), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 96); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tComb), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 1), 10000, (int) (aOutMaterial.getMass() * 128), 384); - }else{ - GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); - //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); - } - } - - private static boolean tryGetNerfBoolean(){ - try { - Class mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy"); - Field mNerf = FieldUtils.getDeclaredField(mProxy, "mNerfedCombs", true); - boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy); - return returnValue; - } - catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) { - return false; - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java deleted file mode 100644 index 4aa9de8220..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java +++ /dev/null @@ -1,43 +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 gtPlusPlus.xmod.forestry.bees.gui; - -import net.minecraft.entity.player.InventoryPlayer; - -import forestry.apiculture.gui.ContainerBeeHelper; -import forestry.apiculture.gui.IContainerBeeHousing; -import forestry.apiculture.tiles.TileBeeHousingBase; -import forestry.core.gui.ContainerTile; -import forestry.core.network.IForestryPacketClient; -import forestry.core.network.packets.PacketGuiUpdate; - -public class ContainerBeeHouse extends ContainerTile implements IContainerBeeHousing { - - public ContainerBeeHouse(InventoryPlayer player, TileBeeHousingBase tile, boolean hasFrames) { - super(tile, player, 8, 108); - ContainerBeeHelper.addSlots(this, tile, hasFrames); - } - - private int beeProgress = 0; - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - - int beeProgress = tile.getBeekeepingLogic().getBeeProgressPercent(); - if (this.beeProgress != beeProgress) { - this.beeProgress = beeProgress; - IForestryPacketClient packet = new PacketGuiUpdate(tile); - sendPacketToCrafters(packet); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java deleted file mode 100644 index 89a2f121d9..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java +++ /dev/null @@ -1,53 +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 gtPlusPlus.xmod.forestry.bees.gui; - -import net.minecraft.inventory.Container; - -import forestry.apiculture.gui.IContainerBeeHousing; -import forestry.apiculture.gui.IGuiBeeHousingInventory; -import forestry.core.config.Constants; -import forestry.core.gui.GuiForestryTitled; -import forestry.core.render.EnumTankLevel; - -public class GuiBeeHouse extends GuiForestryTitled { - - public enum Icon { - APIARY("/apiary.png"), - BEE_HOUSE("/alveary.png"); - - private final String path; - - Icon(String path) { - this.path = path; - } - } - - public GuiBeeHouse(IGuiBeeHousingInventory tile, C container, Icon icon) { - super(Constants.TEXTURE_PATH_GUI + icon.path, container, tile); - ySize = 190; - } - - @Override - protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) { - super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY); - - drawHealthMeter(guiLeft + 20, guiTop + 37, inventory.getHealthScaled(46), EnumTankLevel.rateTankLevel(inventory.getHealthScaled(100))); - } - - private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) { - int i = 176 + rated.getLevelScaled(16); - int k = 0; - - this.drawTexturedModalRect(x, y + 46 - height, i, k + 46 - height, 4, height); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java deleted file mode 100644 index 47c380fdfe..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java +++ /dev/null @@ -1,94 +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 gtPlusPlus.xmod.forestry.bees.inventory; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import forestry.api.apiculture.*; -import forestry.apiculture.InventoryBeeHousing; -import forestry.apiculture.inventory.IApiaryInventory; -import forestry.core.access.IAccessHandler; -import forestry.core.utils.SlotUtil; - -public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApiaryInventory { - public static final int SLOT_FRAMES_1 = 9; - public static final int SLOT_FRAMES_COUNT = 3; - - public InventoryDenseBeeHouse(IAccessHandler accessHandler) { - super(12, accessHandler); - } - - @Override - public boolean canSlotAccept(int slotIndex, ItemStack itemStack) { - if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) { - return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null); - } - - return super.canSlotAccept(slotIndex, itemStack); - } - - // override for pipe automation - @Override - public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) { - if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) { - return false; - } - return super.isItemValidForSlot(slotIndex, itemStack); - } - - public Collection getFrames() { - Collection hiveFrames = new ArrayList<>(SLOT_FRAMES_COUNT); - - for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) { - ItemStack stackInSlot = getStackInSlot(i); - if (stackInSlot == null) { - continue; - } - - Item itemInSlot = stackInSlot.getItem(); - if (itemInSlot instanceof IHiveFrame) { - hiveFrames.add((IHiveFrame) itemInSlot); - } - } - - return hiveFrames; - } - - @Override - public void wearOutFrames(IBeeHousing beeHousing, int amount) { - IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld()); - int wear = Math.round(amount * beekeepingMode.getWearModifier()); - - for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) { - ItemStack hiveFrameStack = getStackInSlot(i); - if (hiveFrameStack == null) { - continue; - } - - Item hiveFrameItem = hiveFrameStack.getItem(); - if (!(hiveFrameItem instanceof IHiveFrame)) { - continue; - } - - IHiveFrame hiveFrame = (IHiveFrame) hiveFrameItem; - - ItemStack queenStack = getQueen(); - IBee queen = BeeManager.beeRoot.getMember(queenStack); - ItemStack usedFrame = hiveFrame.frameUsed(beeHousing, hiveFrameStack, queen, wear); - - setInventorySlotContents(i, usedFrame); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java b/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java deleted file mode 100644 index 7d9a9e231b..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java +++ /dev/null @@ -1,5 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.items; - -public class FR_CustomBee { - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java b/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java deleted file mode 100644 index e1d37ab463..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java +++ /dev/null @@ -1,107 +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 gtPlusPlus.xmod.forestry.bees.items; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomChestContent; - -import forestry.core.utils.StringUtil; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import net.minecraftforge.common.ChestGenHooks; - -public class FR_ItemRegistry { - - - //----- Apiary Frames ---------------------- - //public static FR_ItemHiveFrame frameUntreated; - //public static FR_ItemHiveFrame frameImpregnated; - //public static FR_ItemHiveFrame frameProven; - - //Magic Bee Frame Items - public static MB_ItemFrame hiveFrameAccelerated; - public static MB_ItemFrame hiveFrameVoid; - public static MB_ItemFrame hiveFrameMutagenic; - public static MB_ItemFrame hiveFrameBusy; - - //Extra Bee Frame Items - public static MB_ItemFrame hiveFrameCocoa; - public static MB_ItemFrame hiveFrameCaged; - public static MB_ItemFrame hiveFrameSoul; - public static MB_ItemFrame hiveFrameClay; - public static MB_ItemFrame hiveFrameNova; - - // Frame Items added by bartimaeusnek - public static MB_ItemFrame hiveFrameDecay; - public static MB_ItemFrame hiveFrameSlow; - public static MB_ItemFrame hiveFrameStalilize; - public static MB_ItemFrame hiveFrameArborist; - - @Optional.Method(modid = "Forestry") - public static void Register() { - - //Forestry Frames - //frameUntreated = registerItem(new FR_ItemHiveFrame(80, 0.9f), "frameUntreated"); - //frameImpregnated = registerItem(new FR_ItemHiveFrame(240, 0.4f), "frameImpregnated"); - //frameProven = registerItem(new FR_ItemHiveFrame(720, 0.3f), "frameProven"); - - //Magic Bee like Frames - - if (!CORE.GTNH) { - hiveFrameVoid = new MB_ItemFrame(MB_FrameType.VOID, EnumRarity.rare, "Makes your bee die in the blink of an eye."); - } - else { - hiveFrameVoid = new MB_ItemFrame(MB_FrameType.USELESS, EnumRarity.common, "No more cheaty frames for GTNH players."); - } - - hiveFrameAccelerated = new MB_ItemFrame(MB_FrameType.ACCELERATED, "Longevity for bees isn't very common, especially if they're working harder."); - hiveFrameMutagenic = new MB_ItemFrame(MB_FrameType.MUTAGENIC, EnumRarity.epic, "Evolution of the fittest, finest and fastest."); - hiveFrameBusy = new MB_ItemFrame(MB_FrameType.BUSY, "Your bee will work harder and longer than you expected."); - ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14)); - ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 3, 18)); - ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14)); - ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 9)); - ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 1, 9)); - ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12)); - ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 8)); - ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12)); - - //Extra Bee like Frames - if (!LoadedMods.ExtraBees){ - hiveFrameCocoa = new MB_ItemFrame(MB_FrameType.COCOA, EnumRarity.common, ""); - hiveFrameCaged = new MB_ItemFrame(MB_FrameType.CAGE, EnumRarity.common, ""); - hiveFrameSoul = new MB_ItemFrame(MB_FrameType.SOUL, EnumRarity.common, ""); - hiveFrameClay = new MB_ItemFrame(MB_FrameType.CLAY, EnumRarity.common, ""); - hiveFrameNova = new MB_ItemFrame(MB_FrameType.NOVA, EnumRarity.epic, "A Creative Only Frame."); - } - - // Frame Items added by bartimaeusnek - hiveFrameDecay = new MB_ItemFrame(MB_FrameType.DECAYING, EnumRarity.uncommon, "Who really needs stable genetics?"); - hiveFrameSlow = new MB_ItemFrame(MB_FrameType.SLOWING, EnumRarity.common, "The journey is its own reward."); - hiveFrameStalilize = new MB_ItemFrame(MB_FrameType.STABILIZING, EnumRarity.rare, "If you wish your bees to keep their form."); - hiveFrameArborist = new MB_ItemFrame(MB_FrameType.ARBORISTS, EnumRarity.common, "Who need Bees when you can have Trees?"); - ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameArborist), 1, 4, 24)); - ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameSlow), 1, 4, 24)); - } - - protected static T registerItem(final T item, final String name) { - item.setUnlocalizedName(name); - GameRegistry.registerItem(item, StringUtil.cleanItemName(item)); - return item; - } - -} - - diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java b/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java deleted file mode 100644 index e075bf1eda..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.items; - -import net.minecraft.util.StatCollector; - -public class FR_StringUtil -{ - public static String getLocalizedString(final String key) - { - if(StatCollector.canTranslate(key)) - { - return StatCollector.translateToLocal(key); - } - return StatCollector.translateToFallback(key); - } - - public static String getLocalizedString(final String key, final Object... objects) - { - if(StatCollector.canTranslate(key)) - { - return String.format(StatCollector.translateToLocal(key), objects); - } - return String.format(StatCollector.translateToFallback(key), objects); - } -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java b/src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java deleted file mode 100644 index 1016021e44..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java +++ /dev/null @@ -1,126 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.items; - -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeModifier; - -public enum MB_FrameType implements IBeeModifier -{ - //ExtraBees Clone Frames - //Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f) - COCOA("Chocolate", 240, 1.0f, 1.0f, 0.50f, 1.50f, 1f), - CAGE("Restraint", 240, 0.5f, 1.0f, 0.75f, 0.75f, 1f), - SOUL("Soul", 80, 1.0f, 1.5f, 0.75f, 0.25f, 1f), - CLAY("Healing", 240, 1.0f, 0.5f, 1.50f, 0.75f, 1f), - NOVA("Nova", 240, 1.0f, 100.0f, 0.0001f, 1.00f, 1f), - - - //Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f) - ACCELERATED("Accelerated", 175, 1f, 1.2f, 0.9f, 1.8f, 1f), - VOID("Void", 20, 1f, 1f, 0.0001f, 10f, 1f), - MUTAGENIC("Mutagenic", 3, 1f, 5f, 0.0001f, 10f, 1f), - BUSY("Busy", 2000, 1f, 0f, 3f, 4f, 1f), - USELESS("Useless", 100, 1f, 0f, 1f, 1f, 1f), - - // Frame Items added by bartimaeusnek - DECAYING("Decaying", 240, 1f, 1f, 1f, 1f, 10f), //enhanches decay to 10x - SLOWING("Slowing", 175, 1f, 0.5f, 2f, 0.5f, 1f), //reduces mutation, production rate and enhanches lifespan - STABILIZING("Stabilizing", 60, 1f, 0.1f, 1f, 0.1f, 0.5f), //reduces mutation, production and decay - ARBORISTS("Arborists", 240, 3f, 0f, 3f, 0f, 1f); //3x territory and lifespan, sets mutation and production to zero - - private final String frameName; - public final int maxDamage; - - private final float territoryMod; - private final float mutationMod; - private final float lifespanMod; - private final float productionMod; - private final float floweringMod; - private final float geneticDecayMod; - private final boolean isSealed; - private final boolean isLit; - private final boolean isSunlit; - private final boolean isHellish; - - MB_FrameType(final String name, final int damage, final float territory, final float mutation, final float lifespan, final float production, final float geneticDecay) { - this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false); - } - - MB_FrameType(final String name, final int damage, - final float territory, final float mutation, final float lifespan, final float production, final float flowering, final float geneticDecay, - final boolean sealed, final boolean lit, final boolean sunlit, final boolean hellish) - { - this.frameName = name; - this.maxDamage = damage; - - this.territoryMod = territory; - this.mutationMod = mutation; - this.lifespanMod = lifespan; - this.productionMod = production; - this.floweringMod = flowering; - this.geneticDecayMod = geneticDecay; - this.isSealed = sealed; - this.isLit = lit; - this.isSunlit = sunlit; - this.isHellish = hellish; - } - - public String getName() - { - return this.frameName; - } - - public String getLocalizedName() - { - return FR_StringUtil.getLocalizedString("frame." + this.frameName); - } - - @Override - public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) { - return this.territoryMod; - } - - @Override - public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { - return this.mutationMod; - } - - @Override - public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { - return this.lifespanMod; - } - - @Override - public float getProductionModifier(final IBeeGenome genome, final float currentModifier) { - return this.productionMod; - } - - @Override - public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) { - return this.floweringMod; - } - - @Override - public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) { - return this.geneticDecayMod; - } - - @Override - public boolean isSealed() { - return this.isSealed; - } - - @Override - public boolean isSelfLighted() { - return this.isLit; - } - - @Override - public boolean isSunlightSimulated() { - return this.isSunlit; - } - - @Override - public boolean isHellish() { - return this.isHellish; - } -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java b/src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java deleted file mode 100644 index 65b6977b8a..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java +++ /dev/null @@ -1,143 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.items; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import forestry.api.apiculture.*; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class MB_ItemFrame extends Item implements IHiveFrame -{ - private final MB_FrameType type; - private EnumRarity rarity_value = EnumRarity.uncommon; - private final String toolTip; - - public MB_ItemFrame(final MB_FrameType frameType, final String description) - { - this(frameType, EnumRarity.uncommon, description); - } - - public MB_ItemFrame(final MB_FrameType frameType, final EnumRarity rarity, final String description) - { - super(); - this.type = frameType; - this.setMaxDamage(this.type.maxDamage); - this.setMaxStackSize(1); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setUnlocalizedName("frame" + frameType.getName()); - this.rarity_value = rarity; - this.toolTip = description; - GameRegistry.registerItem(this, "frame" + frameType.getName()); - } - - @Override - public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { - if ((this.toolTip != "") || !this.toolTip.equals("")){ - list.add(EnumChatFormatting.GRAY+this.toolTip); - } - super.addInformation(stack, aPlayer, list, bool); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(final IIconRegister par1IconRegister) - { - this.itemIcon = par1IconRegister.registerIcon(CORE.MODID + ":frame" + this.type.getName()); - } - - // --------- IHiveFrame functions ----------------------------------------- - - @Override - public ItemStack frameUsed(final IBeeHousing housing, ItemStack frame, final IBee queen, final int wear) { - frame.setItemDamage(frame.getItemDamage() + wear); - - if (frame.getItemDamage() >= frame.getMaxDamage()) { - // Break the frame. - frame = null; - } - - return frame; - } - - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack par1ItemStack){ - return this.rarity_value; - } - - @Override - public boolean hasEffect(final ItemStack par1ItemStack){ - if ((this.rarity_value == EnumRarity.uncommon) || (this.rarity_value == EnumRarity.common)){ - return false; - } - return true; - } - - @Override - public IBeeModifier getBeeModifier() { - return this.type; - } - - @Override - public boolean isBookEnchantable(final ItemStack itemstack1, final ItemStack itemstack2) { - return false; - } - - @Override - public boolean isRepairable() { - return false; - } - - public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) { - return this.type.getTerritoryModifier(genome, currentModifier); - } - - public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { - return this.type.getMutationModifier(genome, mate, currentModifier); - } - - public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { - return this.type.getLifespanModifier(genome, mate, currentModifier); - } - - public float getProductionModifier(final IBeeGenome genome, final float currentModifier) { - return this.type.getProductionModifier(genome, currentModifier); - } - - public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) { - return this.type.getFloweringModifier(genome, currentModifier); - } - - public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) { - return this.type.getGeneticDecay(genome, currentModifier); - } - - public boolean isSealed() { - return this.type.isSealed(); - } - - public boolean isSelfLighted() { - return this.type.isSelfLighted(); - } - - public boolean isSunlightSimulated() { - return this.type.isSunlightSimulated(); - } - - public boolean isHellish(){ - return this.type.isHellish(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java b/src/Java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java deleted file mode 100644 index ddc401f752..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java +++ /dev/null @@ -1,129 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.recipe; - -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry; - -public class FR_Gregtech_Recipes { - - private static String rod_Electrum = "stickElectrum"; - private static String rod_LongElectrum = "stickLongElectrum"; - private static String foil_Electrum = "foilElectrum"; - private static String rod_Uranium = "stickUranium"; - private static String rod_LongUranium = "stickLongUranium"; - private static String foil_Uranium235 = "foilUranium235"; - private static ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated); - private static ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic); - private static ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid); - private static ItemStack hiveFrameBusy = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameBusy); - - private static ItemStack hiveFrameCocoa = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCocoa); - private static ItemStack hiveFrameCaged = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCaged); - private static ItemStack hiveFrameSoul = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSoul); - private static ItemStack hiveFrameClay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameClay); - private static ItemStack hiveFrameNova = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameNova); - - private static ItemStack hiveFrameImpregnated = ItemUtils.getItemStackFromFQRN("Forestry:frameImpregnated", 1); - private static ItemStack blockSoulSand = new ItemStack(Blocks.soul_sand, 1); - private static ItemStack blockIronBars = new ItemStack (Blocks.iron_bars, 1); - private static ItemStack itemClayDust = new ItemStack(Items.clay_ball, 1); - private static ItemStack itemCocoaBeans = new ItemStack(Items.dye, 1, 3); - - private static ItemStack hiveFrameDecay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameDecay); - private static ItemStack hiveFrameSlow = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSlow); - private static ItemStack hiveFrameStalilize = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameStalilize); - private static ItemStack hiveFrameArborist = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameArborist); - - public static void registerItems(){ - //Magic Bee Like Frames - RecipeUtils.addShapedGregtechRecipe( - rod_LongElectrum, rod_Electrum, rod_LongElectrum, - rod_LongElectrum, foil_Electrum, rod_LongElectrum, - rod_Electrum, rod_Electrum, rod_Electrum, - hiveFrameAccelerated); - - RecipeUtils.addShapedGregtechRecipe( - rod_LongUranium, rod_Uranium, rod_LongUranium, - rod_LongUranium, foil_Uranium235, rod_LongUranium, - rod_Uranium, rod_Uranium, rod_Uranium, - hiveFrameMutagenic); - if (!CORE.GTNH) { - RecipeUtils.addShapedGregtechRecipe( - "stickLongThaumium", "stickThaumium", "stickLongThaumium", - "stickLongThaumium", ItemUtils.getSimpleStack(Items.ender_pearl), "stickLongThaumium", - "stickThaumium", "stickThaumium", "stickThaumium", - hiveFrameVoid); - } - else { - if (LoadedMods.MagicBees) { - RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {hiveFrameVoid}, ItemUtils.getCorrectStacktype("MagicBees:frameOblivion", 1)); - } - } - RecipeUtils.addShapedGregtechRecipe( - "stickLongBlueSteel", "stickBlueSteel", "stickLongBlueSteel", - "stickLongBlueSteel", ItemUtils.getSimpleStack(Items.nether_star), "stickLongBlueSteel", - "stickBlueSteel", "stickBlueSteel", "stickBlueSteel", - hiveFrameBusy); - - if (!LoadedMods.ExtraBees){ - //Extra Bee Like Frames - RecipeUtils.addShapedRecipe( - null, itemCocoaBeans, null, - itemCocoaBeans, hiveFrameImpregnated, itemCocoaBeans, - null, itemCocoaBeans, null, - hiveFrameCocoa); - - RecipeUtils.addShapedRecipe( - hiveFrameImpregnated, blockIronBars, null, - null, null, null, - null, null, null, - hiveFrameCaged); - - RecipeUtils.addShapedRecipe( - hiveFrameImpregnated, blockSoulSand, null, - null, null, null, - null, null, null, - hiveFrameSoul); - - RecipeUtils.addShapedRecipe( - null, itemClayDust, null, - itemClayDust, hiveFrameImpregnated, itemClayDust, - null, itemClayDust, null, - hiveFrameClay); - } - - // Frame Items added by bartimaeusnek - RecipeUtils.addShapedGregtechRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1), - ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),foil_Electrum,ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1), - ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1), - hiveFrameSlow); - - RecipeUtils.addShapedGregtechRecipe( - "stickLongWroughtIron","stickWroughtIron","stickLongWroughtIron", - "stickLongWroughtIron","foilZinc","stickLongWroughtIron", - "stickWroughtIron","stickWroughtIron","stickWroughtIron", - hiveFrameDecay); - - RecipeUtils.addShapedGregtechRecipe( - "stickLongOsmiridium","stickOsmiridium","stickLongOsmiridium", - "stickLongOsmiridium","foilOsmiridium","stickLongOsmiridium", - "stickOsmiridium","stickOsmiridium","stickOsmiridium", - hiveFrameStalilize); - - RecipeUtils.addShapedGregtechRecipe( - "stickLongWoodSealed","stickWoodSealed","stickLongWoodSealed", - "stickLongWoodSealed",Items.paper,"stickLongWoodSealed", - "stickWoodSealed","stickWoodSealed","stickWoodSealed", - hiveFrameArborist); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java deleted file mode 100644 index 9b3424ef08..0000000000 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java +++ /dev/null @@ -1,92 +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 gtPlusPlus.xmod.forestry.bees.tileentities; - -import java.util.*; - -import cpw.mods.fml.common.Optional; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; - -import buildcraft.api.statements.ITriggerExternal; -import forestry.api.apiculture.*; -import forestry.apiculture.ApiaryBeeListener; -import forestry.apiculture.ApiaryBeeModifier; -import forestry.apiculture.IApiary; -import forestry.apiculture.inventory.IApiaryInventory; -import forestry.apiculture.inventory.InventoryApiary; -import forestry.apiculture.tiles.TileBeeHousingBase; -import forestry.apiculture.trigger.ApicultureTriggers; -import gtPlusPlus.xmod.forestry.bees.gui.ContainerBeeHouse; -import gtPlusPlus.xmod.forestry.bees.gui.GuiBeeHouse; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileDenseBeeHouse extends TileBeeHousingBase implements IApiary { - private final IBeeModifier beeModifier = new ApiaryBeeModifier(); - private final IBeeListener beeListener = new ApiaryBeeListener(this); - private final InventoryApiary inventory = new InventoryApiary(getAccessHandler()); - - public TileDenseBeeHouse() { - super("apiary2"); - setInternalInventory(inventory); - } - - @Override - public IBeeHousingInventory getBeeInventory() { - return inventory; - } - - @Override - public IApiaryInventory getApiaryInventory() { - return inventory; - } - - @Override - public Collection getBeeModifiers() { - List beeModifiers = new ArrayList<>(); - - beeModifiers.add(beeModifier); - - for (IHiveFrame frame : inventory.getFrames()) { - beeModifiers.add(frame.getBeeModifier()); - } - - return beeModifiers; - } - - @Override - public Iterable getBeeListeners() { - return Collections.singleton(beeListener); - } - - /* ITRIGGERPROVIDER */ - @Optional.Method(modid = "BuildCraftAPI|statements") - @Override - public Collection getExternalTriggers(ForgeDirection side, TileEntity tile) { - LinkedList res = new LinkedList<>(); - res.add(ApicultureTriggers.missingQueen); - res.add(ApicultureTriggers.missingDrone); - res.add(ApicultureTriggers.noFrames); - return res; - } - - @Override - public Object getGui(EntityPlayer player, int data) { - ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true); - return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY); - } - - @Override - public Object getContainer(EntityPlayer player, int data) { - return new ContainerBeeHouse(player.inventory, this, true); - } -} diff --git a/src/Java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java b/src/Java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java deleted file mode 100644 index d5c7a7e4e5..0000000000 --- a/src/Java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java +++ /dev/null @@ -1,34 +0,0 @@ -package gtPlusPlus.xmod.galacticraft; - -import gtPlusPlus.core.lib.LoadedMods; - -public class HANDLER_GalactiCraft { - - //private static final HashMap mSystemsCache = new HashMap(); - - public static void preInit(){ - if (LoadedMods.GalacticraftCore){ - //mSystemsCache.put("HD10180", new SystemHD10180()); - /*for (BaseSolarSystem solar : mSystemsCache.values()) { - Logger.SPACE("Running 'pre-init' for "+solar.mSystemName); - solar.preInit(); - }*/ - } - } - - public static void init(){ - if (LoadedMods.GalacticraftCore){ - /*for (BaseSolarSystem solar : mSystemsCache.values()) { - Logger.SPACE("Running 'init' for "+solar.mSystemName); - solar.init(); - }*/ - } - } - - public static void postInit(){ - if (LoadedMods.GalacticraftCore){ - - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java b/src/Java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java deleted file mode 100644 index 3b59b58cab..0000000000 --- a/src/Java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java +++ /dev/null @@ -1,83 +0,0 @@ -package gtPlusPlus.xmod.galacticraft.handler; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.LinkedHashMap; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import gtPlusPlus.core.item.chemistry.RocketFuels; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.preloader.asm.AsmConfig; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import net.minecraftforge.fluids.Fluid; - -public class HandlerTooltip_GC { - - private static Item mItemBlock; - private static Block mBlock; - private static Class oMainClass; - private static Class oFuelLoaderClass; - private static HashMap mFuelNames; - - static { - mFuelNames = new LinkedHashMap(); - } - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event) { - if (LoadedMods.GalacticraftCore && AsmConfig.enableGcFuelChanges) { - - if (mBlock == null) { - try { - Class GCBlocks = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.blocks.GCBlocks"); - if (GCBlocks != null) { - oMainClass = GCBlocks; - - Class GCFuelLoader = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.blocks.BlockFuelLoader"); - - if (GCFuelLoader != null) { - oFuelLoaderClass = GCFuelLoader; - } - - Field aField = ReflectionUtils.getField(oMainClass, "fuelLoader"); - if (aField != null) { - Block aBlock = (Block) aField.get(null); - if (aBlock != null) { - mBlock = aBlock; - mItemBlock = Item.getItemFromBlock(mBlock); - } - } - } - } catch (Throwable t) { - } - } - if (mFuelNames == null) { - mFuelNames = new LinkedHashMap(); - } - - if (mFuelNames.isEmpty()) { - for (int aMapKey : RocketFuels.mValidRocketFuels.keySet()) { - Fluid aFuel = RocketFuels.mValidRocketFuels.get(aMapKey); - if (aFuel != null) { - mFuelNames.put(aMapKey, aFuel.getLocalizedName()); - } - } - } - if (mItemBlock != null && !mFuelNames.isEmpty()) { - Item aTempItem = event.itemStack.getItem(); - Block aTempBlock = Block.getBlockFromItem(aTempItem); - if (aTempItem == mItemBlock || oFuelLoaderClass.isInstance(aTempBlock) || event.itemStack.getUnlocalizedName().toLowerCase().contains("fuelloader")) { - for (int aMapKey : mFuelNames.keySet()) { - String aFuel = mFuelNames.get(aMapKey); - if (aFuel != null) { - event.toolTip.add("Tier "+(aMapKey+1)+": "+aFuel); - } - } - } - } - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java b/src/Java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java deleted file mode 100644 index f237aed335..0000000000 --- a/src/Java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java +++ /dev/null @@ -1,169 +0,0 @@ -package gtPlusPlus.xmod.galacticraft.util; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import gregtech.api.enums.Materials; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.chemistry.RocketFuels; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.Entity; -import net.minecraftforge.fluids.FluidStack; - -public class GalacticUtils { - - static final private Class aTieredRocket; - static final private Class aLandingPad; - static final private Class aBuggyPad; - static final private Class aIDockable; - static final private Class aIFuelable; - static final private Method getRocketTier; - static final private Method getRocket; - static final private Method getBuggy; - - static { - Class a1, a2, a3, a4, a5; - Method m1, m2, m3; - try { - a1 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.api.prefab.entity.EntityTieredRocket"); - a2 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.tile.TileEntityLandingPad"); - a3 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.tile.TileEntityBuggyFueler"); - a4 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.api.entity.IDockable"); - a5 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.api.entity.IFuelable"); - m1 = ReflectionUtils.getMethod(a1, "getRocketTier"); - m2 = ReflectionUtils.getMethod(a2, "getDockedEntity"); - m3 = ReflectionUtils.getMethod(a3, "getDockedEntity"); - } - catch (Throwable t) { - a1 = null; - a2 = null; - a3 = null; - a4 = null; - a5 = null; - m1 = null; - m2 = null; - m3 = null; - } - aTieredRocket = a1; - aLandingPad = a2; - aBuggyPad = a3; - aIDockable = a4; - aIFuelable = a5; - getRocketTier = m1; - getRocket = m2; - getBuggy = m3; - if (a1 != null && a2 != null && a3 != null && a4 != null && a5 != null && m1 != null && m2 != null && m3 != null) { - Logger.SPACE("Successfully relfected into 5 classes and 3 methods."); - } - else { - Logger.SPACE("Failed to relfect into Galacticraft classes and methods."); - if (a1 == null) { - Logger.SPACE("micdoodle8.mods.galacticraft.api.prefab.entity.EntityTieredRocket was null.."); - } - if (a2 == null) { - Logger.SPACE("micdoodle8.mods.galacticraft.core.tile.TileEntityLandingPad was null.."); - } - if (a3 == null) { - Logger.SPACE("micdoodle8.mods.galacticraft.core.tile.TileEntityBuggyFueler was null.."); - } - if (a4 == null) { - Logger.SPACE("micdoodle8.mods.galacticraft.api.entity.IDockable was null.."); - } - if (a5 == null) { - Logger.SPACE("micdoodle8.mods.galacticraft.api.entity.IFuelable was null.."); - } - if (m1 == null) { - Logger.SPACE("getRocketTier was null.."); - } - if (m2 == null) { - Logger.SPACE("getDockedEntity was null.."); - } - if (m3 == null) { - Logger.SPACE("getDockedEntity(buggy) was null.."); - } - } - } - - - public static int getRocketTier(Entity aEntity) { - if (aTieredRocket.isInstance(aEntity)) { - if (getRocketTier != null) { - try { - return (int) getRocketTier.invoke(aEntity, new Object[] {}); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - } - return -1; - } - - public static int getRocketTier(Object aEntity) { - if (aIFuelable.isInstance(aEntity)) { - if (aLandingPad.isInstance(aEntity)) { - Object rocket; - try { - rocket = getRocket.invoke(aLandingPad, new Object[] {}); - if (aIDockable.isInstance(rocket) && rocket != null) { - return getRocketTier((Entity) rocket); - } - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - else if (aBuggyPad.isInstance(aEntity)) { - Object buggy; - try { - buggy = getBuggy.invoke(aBuggyPad, new Object[] {}); - if (aIDockable.isInstance(buggy) && buggy != null) { - return 0; - } - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - } - return -1; - } - - public static boolean isFuelValidForTier(int aTier, FluidStack aFuel) { - FluidStack aValidForThisTier = getValidFuelForTier(aTier); - if (aFuel.isFluidEqual(aValidForThisTier)) { - return true; - } - return false; - } - - - - public static FluidStack getValidFuelForTier(Entity aEntity) { - if (aTieredRocket.isInstance(aEntity)) { - return getValidFuelForTier(getRocketTier(aEntity)); - } - else { - Logger.SPACE("Failed to get valid rocket fuel for "+aEntity.getClass().getCanonicalName()); - return getValidFuelForTier(0); - } - } - - public static FluidStack getValidFuelForTier(int aTier) { - if (aTier > 0 && aTier <= 2) { - return FluidUtils.getFluidStack(RocketFuels.RP1_Plus_Liquid_Oxygen, 1000); - } - else if (aTier >= 3 && aTier <= 5) { - return FluidUtils.getFluidStack(RocketFuels.Dense_Hydrazine_Mix, 1000); - } - else if (aTier >= 6 && aTier <= 7) { - return FluidUtils.getFluidStack(RocketFuels.Monomethylhydrazine_Plus_Nitric_Acid, 1000); - } - else if (aTier >= 8 && aTier <= 10) { - return FluidUtils.getFluidStack(RocketFuels.Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide, 1000); - } - else { - if (aTier == 0) { - return Materials.Fuel.getFluid(1000); - } - return null; - } - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java deleted file mode 100644 index a375f77cda..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ /dev/null @@ -1,612 +0,0 @@ -package gtPlusPlus.xmod.gregtech; - -import static gtPlusPlus.core.recipe.common.CI.bits; -import static gtPlusPlus.core.util.minecraft.MaterialUtils.getMaterialName; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import cpw.mods.fml.common.event.FMLLoadCompleteEvent; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_ModHandler.RecipeBits; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.helpers.GregtechPlusPlus_API.Multiblock_API; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.api.objects.minecraft.multi.NoEUBonusMultiBehaviour; -import gtPlusPlus.api.objects.minecraft.multi.NoOutputBonusMultiBehaviour; -import gtPlusPlus.api.objects.minecraft.multi.NoSpeedBonusMultiBehaviour; -import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia; -import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.handler.OldCircuitHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.core.util.reflect.AddGregtechRecipe; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.everglades.gen.gt.WorldGen_GT; -import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; -import gtPlusPlus.xmod.gregtech.api.world.GTPP_Worldgen; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import gtPlusPlus.xmod.gregtech.loaders.Gregtech_Blocks; -import gtPlusPlus.xmod.gregtech.loaders.ProcessingAngleGrinder; -import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricButcherKnife; -import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricLighter; -import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricSnips; -import gtPlusPlus.xmod.gregtech.loaders.ProcessingToolHeadChoocher; -import gtPlusPlus.xmod.gregtech.loaders.misc.AddCustomMachineToPA; -import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_AlgaeFarm; -import gtPlusPlus.xmod.gregtech.recipes.RecipesToRemove; -import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits; -import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechNitroDieselFix; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class HANDLER_GT { - - public static GT_Config mMaterialProperties = null; - - public static GTPP_Config sCustomWorldgenFile = null; - public static final List sWorldgenListEverglades = new ArrayList(); - public static final List sWorldgenListAustralia = new ArrayList(); - public static final List sCustomWorldgenList = new ArrayList(); - public static GT_MetaGenerated_Tool sMetaGeneratedToolInstance; - - public static void preInit(){ - - if (mMaterialProperties != null){ - GT_Materials.init(mMaterialProperties); - } - - if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ - OldCircuitHandler.preInit(); - } - - GregtechFluidHandler.run(); - } - - public static void init(){ - - //Load General Blocks and set up some Basic Meta Tile Entity states - Gregtech_Blocks.run(); - - //Add Custom Pipes, Wires and Cables. - GregtechConduits.run(); - - //Register Tile Entities - COMPAT_HANDLER.registerGregtechMachines(); - - - //Only loads if the config option is true (default: true) - if (CORE.ConfigSwitches.enableSkookumChoochers){ - sMetaGeneratedToolInstance= MetaGeneratedGregtechTools.getInstance(); - } - - if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ - OldCircuitHandler.init(); - } - - //Generates recipes for all gregtech smelting and alloy smelting combinations. - //RecipeGen_BlastSmelterGT.generateRecipes(); - //new RecipeGen_BlastSmelterGT_Ex(); - - } - - public static void postInit(){ - - //Only loads if the config option is true (default: true) - if (CORE.ConfigSwitches.enableSkookumChoochers){ - new ProcessingToolHeadChoocher().run(); - } - new ProcessingAngleGrinder().run(); - new ProcessingElectricSnips().run(); - new ProcessingElectricButcherKnife().run(); - new ProcessingElectricLighter().run(); - - if (CORE.ConfigSwitches.enableNitroFix){ - GregtechNitroDieselFix.run(); - } - - if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ - OldCircuitHandler.postInit(); - } - - // Register custom singles to the PA - AddCustomMachineToPA.register(); - - - // Register the No-Bonus Special Behaviour. - Multiblock_API.registerSpecialMultiBehaviour(new NoOutputBonusMultiBehaviour()); - Multiblock_API.registerSpecialMultiBehaviour(new NoSpeedBonusMultiBehaviour()); - Multiblock_API.registerSpecialMultiBehaviour(new NoEUBonusMultiBehaviour()); - - //Register some custom recipe maps for any enabled multiblocks. - //MultiblockRecipeMapHandler.run(); - - if (GregtechItemList.Circuit_BioRecipeSelector.hasBeenSet()) { - for (int i = 1; i <= 24; i++) { - GregTech_API.registerConfigurationCircuit(CI.getNumberedBioCircuit(i), 0); - } - } - - if (GregtechItemList.Circuit_T3RecipeSelector.hasBeenSet()) { - for (int i = 1; i <= 24; i++) { - GregTech_API.registerConfigurationCircuit(CI.getNumberedAdvancedCircuit(i), 3); - } - } - } - - public static void onLoadComplete(FMLLoadCompleteEvent event) { - removeCrudeTurbineRotors(); - //cleanAssemblyLineRecipeMap(); - if (ConfigSwitches.enableHarderRecipesForHighTierCasings) { - removeOldHighTierCasingRecipes(); - } - RecipesToRemove.go(); - convertPyroToCokeOven(); - Meta_GT_Proxy.fixIC2FluidNames(); - RecipeLoader_AlgaeFarm.generateRecipes(); - } - - public static void addNewOrePrefixes() { - for (CustomOrePrefix aPrefixTest : CustomOrePrefix.values()) { - Logger.INFO("Adding "+aPrefixTest.name()+" to OrePrefixes Enum."); - Logger.INFO("Injecting: "+aPrefixTest.addToEnum()); - } - } - - private static void convertPyroToCokeOven() { - if (ReflectionUtils.doesFieldExist(GT_Recipe.GT_Recipe_Map.class, "sPyrolyseRecipes")) { - int aCount = 0; - GT_Recipe_Map aMap = StaticFields59.getPyrolyseRecipeMap(); - if (aMap != null) { - for (GT_Recipe g : aMap.mRecipeList) { - if (AddGregtechRecipe.importPyroRecipe(g)) { - aCount++; - } - } - Logger.INFO("Converted "+aCount+" Pyrolyse recipes into Industrial Coke Oven recipes."); - } - } - } - - private static GT_Recipe replaceItemInRecipeWithAnother(GT_Recipe aRecipe, ItemStack aExisting, ItemStack aNewItem) { - ItemStack[] aInputItemsCopy = aRecipe.mInputs; - String aOutputName = ItemUtils.getItemName(aRecipe.mOutputs[0]); - boolean aDidChange = false; - Logger.INFO("Attempting to Modify Recipe for "+aOutputName); - for (int i=0;i> aDataToModify = new AutoMap>(); - - - Outer :for (final GT_Recipe r : GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList) { - - if (r != null && r.mOutputs != null && r.mOutputs.length > 0) { - - GT_Recipe aOldRecipeCopy = r; - GT_Recipe aNewRecipe = r.copy(); - - //Casings - Inner : for (ItemStack aCasingObject : aCasings) { - if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasingObject)) { - String aOutputName = ItemUtils.getItemName(aOldRecipeCopy.mOutputs[0]); - Logger.INFO("Attempting to Modify Assembly Recipe for "+aOutputName); - //Replace Chrome - if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_LUV)) { - aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 1), ELEMENT.getInstance().SELENIUM.getPlate(1)); - aDataToModify.put(new Pair(r, aNewRecipe)); - aUpdateCount++; - continue Outer; - } - //Replace Iridium - else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_ZPM)) { - aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateIridium", 1), CI.getPlate(aTier_ZPM, 1)); - aDataToModify.put(new Pair(r, aNewRecipe)); - aUpdateCount++; - continue Outer; - } - //Replace Osmium - else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_UV)) { - aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateOsmium", 1), CI.getPlate(aTier_UV, 1)); - aDataToModify.put(new Pair(r, aNewRecipe)); - aUpdateCount++; - continue Outer; - } - //else if (aOldRecipeCopy.mOutputs[0] == aCasing_LUV) { - // aOldRecipeCopy = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 8), CI.getPlate(aTier_MAX, 8)); - // updateRecipeMap(aOldRecipeCopy, aNewRecipe, GT_Recipe.GT_Recipe_Map.sAssemblerRecipes); - //} - else { - continue Inner; - } - } - } - - //Hulls - Inner : for (ItemStack aHullObject : aHulls) { - if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHullObject)) { - String aOutputName = ItemUtils.getItemName(aOldRecipeCopy.mOutputs[0]); - Logger.INFO("Attempting to Modify Assembly Recipe for "+aOutputName); - //Replace Chrome - if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_LUV)) { - aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 1), ELEMENT.getInstance().SELENIUM.getPlate(1)); - aDataToModify.put(new Pair(r, aNewRecipe)); - aUpdateCount++; - continue Outer; - } - //Replace Iridium - else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_ZPM)) { - aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateIridium", 1), CI.getPlate(aTier_ZPM, 1)); - aDataToModify.put(new Pair(r, aNewRecipe)); - aUpdateCount++; - continue Outer; - } - //Replace Osmium - else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_UV)) { - aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateOsmium", 1), CI.getPlate(aTier_UV, 1)); - aDataToModify.put(new Pair(r, aNewRecipe)); - aUpdateCount++; - continue Outer; - } - //else if (aOldRecipeCopy.mOutputs[0] == aHull_LUV) { - // aOldRecipeCopy = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 8), CI.getPlate(aTier_MAX, 8)); - // updateRecipeMap(aOldRecipeCopy, aNewRecipe, GT_Recipe.GT_Recipe_Map.sAssemblerRecipes); - //} - else { - continue Inner; - } - } - } - } - } - - Logger.INFO("There is "+aUpdateCount+" recipes flagged for update."); - - if (aUpdateCount > 0) { - for (Pair g : aDataToModify) { - updateRecipeMap(g.getKey(), g.getValue(), GT_Recipe.GT_Recipe_Map.sAssemblerRecipes); - } - Logger.INFO("Modified "+aUpdateCount+" recipes."); - } - - - - Logger.INFO("Adding new Shaped recipes for Casings."); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_LuV.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', ELEMENT.getInstance().SELENIUM.getPlate(1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_ZPM.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', CI.getPlate(aTier_ZPM, 1)}); - GT_ModHandler.addCraftingRecipe(ItemList.Casing_UV.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', CI.getPlate(aTier_UV, 1)}); - //GT_ModHandler.addCraftingRecipe(ItemList.Casing_MAX.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', OrePrefixes.plate.get(Materials.Neutronium)}); - - if (!aHardCasings) { - Logger.INFO("Adding new easy Shaped recipes for Hulls."); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_LuV, 'C', - OrePrefixes.cableGt01.get(Materials.VanadiumGallium)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, - new Object[]{"CMC", 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_UV, 'C', - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy)}); - /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_MAX, 'C', - OrePrefixes.wireGt01.get(Materials.Superconductor)});*/ - } - else { - - - Materials aPolytetrafluoroethylene = MaterialUtils.getMaterial("Polytetrafluoroethylene", "Plastic"); - - Logger.INFO("Adding new hard Shaped recipes for Hulls."); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, - new Object[]{"PHP", "CMC", 'M', ItemList.Casing_LuV, 'C', - OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'H', - ELEMENT.getInstance().SELENIUM.getPlate(1), 'P', OrePrefixes.plate.get(Materials.Plastic)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, - new Object[]{"PHP", "CMC", 'M', ItemList.Casing_ZPM, 'C', - OrePrefixes.cableGt01.get(Materials.Naquadah), 'H', - CI.getPlate(aTier_ZPM, 1), 'P', - OrePrefixes.plate.get(aPolytetrafluoroethylene)}); - GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, - new Object[]{"PHP", "CMC", 'M', ItemList.Casing_UV, 'C', - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), 'H', - CI.getPlate(aTier_UV, 1), 'P', - OrePrefixes.plate.get(aPolytetrafluoroethylene)}); - /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1), - RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, - new Object[]{"PHP", "CMC", 'M', ItemList.Casing_MAX, 'C', - OrePrefixes.wireGt01.get(Materials.Superconductor), 'H', - OrePrefixes.plate.get(Materials.Neutronium), 'P', - OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)});*/ - } - - - - //Casings - - /*GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L), - ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), - ItemList.Casing_LuV.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L), - ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), - ItemList.Casing_ZPM.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), - ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), - ItemList.Casing_UV.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), - ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), - ItemList.Casing_MAX.get(1), 50, 16); */ - - - - //Hulls - - //Hard Hulls - /*GT_Values.RA.addAssemblerRecipe( - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), - ItemList.Casing_LuV.get(1), Materials.Plastic.getMolten(288L), - ItemList.Hull_LuV.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), - ItemList.Casing_ZPM.get(1), Materials.Polytetrafluoroethylene.getMolten(288L), - ItemList.Hull_ZPM.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), - ItemList.Casing_UV.get(1), Materials.Polytetrafluoroethylene.getMolten(288L), - ItemList.Hull_UV.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe( - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L), - ItemList.Casing_MAX.get(1), Materials.Polytetrafluoroethylene.getMolten(288L), - ItemList.Hull_MAX.get(1), 50, 16);*/ - - //Easy Hulls - /*GT_Values.RA.addAssemblerRecipe( - GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), - ItemList.Casing_LuV.get(1), ItemList.Hull_LuV.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), - ItemList.Casing_ZPM.get(1), ItemList.Hull_ZPM.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), - ItemList.Casing_UV.get(1), ItemList.Hull_UV.get(1), 50, 16); - GT_Values.RA.addAssemblerRecipe( - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L), - ItemList.Casing_MAX.get(1), ItemList.Hull_MAX.get(1), 50, 16);*/ - } - - private static int removeCrudeTurbineRotors() { - int aRemoved = 0; - int CUT = CORE.turbineCutoffBase; - Item aU; - Collection aAssRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList; - //170, 172, 174, 176 - if (aAssRecipes.size() > 0 && (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH)) { - recipe: for (GT_Recipe aG : aAssRecipes) { - if (aG.mOutputs != null && aG.mOutputs.length > 0) { - outputs: for (ItemStack aI : aG.mOutputs) { - if (aI == null) { - continue; - } - aU = aI.getItem(); - if (aU == null) { - continue; - } - if (aU instanceof GT_MetaGenerated_Tool_01) { - int aMeta = aI.getItemDamage(); - //Logger.INFO("Found assembler recipe outputting a GT Tool with a meta value of "+aMeta); - if (aMeta >= 170 && aMeta <= 176) { - //Found a Turbine - int aCutoff = aMeta == 170 ? CUT : (aMeta == 172 ? CUT*2 : (aMeta == 174 ? CUT*3 : CUT*4)); - String aType = aMeta == 170 ? "Small " : (aMeta == 172 ? "" : (aMeta == 174 ? "Large " : "Huge ")); - Materials aMainMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(aI); - Materials aSecondaryMaterial = GT_MetaGenerated_Tool.getSecondaryMaterial(aI); - long rotorDurabilityMax = GT_MetaGenerated_Tool.getToolMaxDamage(aI); - //Logger.INFO("Found "+aType+"Turbine made out of "+getMaterialName(aMainMaterial)+", using "+getMaterialName(aSecondaryMaterial)); - if (rotorDurabilityMax < aCutoff) { - Logger.WARNING("[Turbine Cleanup] "+getMaterialName(aMainMaterial)+" "+aType+"Turbines have "+rotorDurabilityMax+", which is below the cutoff durability of "+aCutoff+", disabling."); - aG.mEnabled = false; - aG.mHidden = true; - aG.mCanBeBuffered = false; - aRemoved++; - } - else { - break outputs; - } - - } - else { - continue outputs; - } - } - else { - continue outputs; - } - } - } - else { - continue recipe; - } - } - } - - Logger.INFO("Removed "+aRemoved+" useless Turbines."); - - return aRemoved; - } - - /** - * Should clean out any invalid Assembly Line recipes, if the map actually exists. - * Prevents NPE's being thrown by GT's AL handler. (Fucking Annoying) - * @return - Amount of Recipes removed, which were invalid in some way. - */ - private static int cleanAssemblyLineRecipeMap() { - GT_Recipe_Map g = StaticFields59.sAssemblylineVisualRecipes; - if (g == null) { - return 0; - } - else { - AutoMap aNewMap = new AutoMap(); - AutoMap aBadRecipeTempMap = new AutoMap(); - for (GT_Recipe r : g.mRecipeList) { - if (r != null) { - if (r.mOutputs == null || r.mOutputs.length == 0 || r.mOutputs[0] == null) { - aBadRecipeTempMap.put(r.copy()); - continue; - } - else { - aNewMap.put(r.copy()); - } - } - } - if (aNewMap.size() > 0) { - g.mRecipeList.clear(); - for (GT_Recipe i : aNewMap) { - g.add(i); - } - } - if (aBadRecipeTempMap.size() > 0) { - Logger.INFO("Found "+aBadRecipeTempMap.size()+" bad Assembly Line Recipes, attempting to dump all data about them."); - Logger.INFO("This data should be given to the mod author for the recipe in question."); - for (GT_Recipe i : aBadRecipeTempMap) { - if (i == null) { - Logger.INFO("Found NULL recipe. Impossible to determine who added this one. Please Report to Alkalus on Github."); - } - else { - if (i.mOutputs == null || i.mOutputs.length == 0 || i.mOutputs[0] == null) { - Logger.INFO("Found recipe with NULL output array, this will cause some issues. Attempting to determine other info about recipe."); - if (i.mInputs != null && i.mInputs.length > 0) { - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(i.mInputs)); - } - else { - Logger.INFO("Recipe had no valid inputs."); - } - Logger.INFO("Time: "+i.mDuration); - Logger.INFO("EU/T: "+i.mEUt); - Logger.INFO("Special: "+i.mSpecialValue); - } - else { - Logger.INFO("Found bad recipe, Attempting to determine other info."); - if (i.mInputs != null && i.mInputs.length > 0) { - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(i.mInputs)); - } - else { - Logger.INFO("Recipe had no valid inputs."); - } - if (i.mOutputs != null && i.mOutputs.length > 0) { - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(i.mOutputs)); - } - else { - Logger.INFO("Recipe had no valid outputs."); - } - Logger.INFO("Time: "+i.mDuration); - Logger.INFO("EU/T: "+i.mEUt); - Logger.INFO("Special: "+i.mSpecialValue); - } - } - } - } - else { - Logger.INFO("No bad Assembly Line recipes found, this is great news!"); - } - return aBadRecipeTempMap.size(); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java b/src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java deleted file mode 100644 index 4ec4589c03..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.energy; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** - * Provides the ability to store energy on the implementing item. - * - * The item should have a maximum damage of 13. - */ -public interface IC2ElectricItem { - /** - * Determine if the item can be used in a machine or as an armor part to supply energy. - * - * @return Whether the item can supply energy - */ - boolean canProvideEnergy(ItemStack itemStack); - - /** - * Get the item ID to use for a charge energy greater than 0. - * - * @return Item ID to use - */ - Item getChargedItem(ItemStack itemStack); - - /** - * Get the item ID to use for a charge energy of 0. - * - * @return Item ID to use - */ - Item getEmptyItem(ItemStack itemStack); - - /** - * Get the item's maximum charge energy in EU. - * - * @return Maximum charge energy - */ - double getMaxCharge(ItemStack itemStack); - - /** - * Get the item's tier, lower tiers can't send energy to higher ones. - * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. - * - * @return Item's tier - */ - int getTier(ItemStack itemStack); - - /** - * Get the item's transfer limit in EU per transfer operation. - * - * @return Transfer limit - */ - double getTransferLimit(ItemStack itemStack); -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java b/src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java deleted file mode 100644 index 8bf42578cc..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java +++ /dev/null @@ -1,95 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.energy; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * This interface specifies a manager to handle the various tasks for electric items. - * - * The default implementation does the following: - * - store and retrieve the charge - * - handle charging, taking amount, tier, transfer limit, canProvideEnergy and simulate into account - * - replace item IDs if appropriate (getChargedItemId() and getEmptyItemId()) - * - update and manage the damage value for the visual charge indicator - * - * @note If you're implementing your own variant (ISpecialElectricItem), you can delegate to the - * default implementations through ElectricItem.rawManager. The default implementation is designed - * to minimize its dependency on its own constraints/structure and delegates most work back to the - * more atomic features in the gateway manager. - */ -public interface IC2ElectricItemManager { - /** - * Charge an item with a specified amount of energy. - * - * @param itemStack electric item's stack - * @param amount amount of energy to charge in EU - * @param tier tier of the charging device, has to be at least as high as the item to charge - * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param simulate don't actually change the item, just determine the return value - * @return Energy transferred into the electric item - */ - double charge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean simulate); - - /** - * Discharge an item by a specified amount of energy - * - * @param itemStack electric item's stack - * @param amount amount of energy to discharge in EU - * @param tier tier of the discharging device, has to be at least as high as the item to discharge - * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param externally use the supplied item externally, i.e. to power something else as if it was a battery - * @param simulate don't actually discharge the item, just determine the return value - * @return Energy retrieved from the electric item - */ - double discharge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean externally, boolean simulate); - - /** - * Determine the charge level for the specified item. - * - * @param itemStack ItemStack containing the electric item - * @return charge level in EU - */ - double getCharge(ItemStack stack); - - /** - * Determine if the specified electric item has at least a specific amount of EU. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * BatPacks are not taken into account. - * - * @param itemStack electric item's stack - * @param amount minimum amount of energy required - * @return true if there's enough energy - */ - boolean canUse(ItemStack stack, double amount); - - /** - * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * - * @param itemStack electric item's stack - * @param amount amount of energy to discharge in EU - * @param entity entity holding the item - * @return true if the operation succeeded - */ - boolean use(ItemStack stack, double amount, EntityLivingBase entity); - - /** - * Charge an item from the BatPack a player is wearing. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * use() already contains this functionality. - * - * @param itemStack electric item's stack - * @param entity entity holding the item - */ - void chargeFromArmor(ItemStack stack, EntityLivingBase entity); - - /** - * Get the tool tip to display for electric items. - * - * @param itemStack ItemStack to determine the tooltip for - * @return tool tip string or null for none - */ - String getToolTip(ItemStack stack); - - // TODO: add tier getter -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java deleted file mode 100644 index 554983c41c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.core.lib.CORE; - -public class CustomGtTextures { - public enum ItemIcons implements IIconContainer, Runnable { - VOID, // The Empty Texture - RENDERING_ERROR, - PUMP, - SKOOKUMCHOOCHER; - - public static final ITexture[] ERROR_RENDERING = new ITexture[]{new GT_RenderedTexture(RENDERING_ERROR)}; - - protected IIcon mIcon, mOverlay; - - private ItemIcons() { - GregTech_API.sGTItemIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return this.mOverlay; - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + "iconsets/" + this); - this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + "iconsets/" + this + "_OVERLAY"); - } - - public static class CustomIcon implements IIconContainer, Runnable { - protected IIcon mIcon, mOverlay; - protected String mIconName; - - public CustomIcon(final String aIconName) { - this.mIconName = aIconName; - GregTech_API.sGTItemIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return this.mOverlay; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + this.mIconName); - this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + this.mIconName + "_OVERLAY"); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java deleted file mode 100644 index 9647b00578..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java +++ /dev/null @@ -1,112 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -import static gregtech.api.enums.GT_Values.B; - -import gregtech.api.enums.OrePrefixes; -import net.minecraftforge.common.util.EnumHelper; - -public enum CustomOrePrefix { - - milled("Milled Ores", "Milled ", " Ore", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1); - - private final String mRegularLocalName; - private final String mLocalizedMaterialPre; - private final String mLocalizedMaterialPost; - private final boolean mIsUnificatable; - private final boolean mIsMaterialBased; - private final boolean mIsSelfReferencing; - private final boolean mIsContainer; - private final boolean mDontUnificateActively; - private final boolean mIsUsedForBlocks; - private final boolean mAllowNormalRecycling; - private final boolean mGenerateDefaultItem; - private final boolean mIsEnchantable; - private final boolean mIsUsedForOreProcessing; - private final int mMaterialGenerationBits; - private final long mMaterialAmount; - private final int mDefaultStackSize; - private final int mTextureindex; - - private OrePrefixes mSelfReference; - - private CustomOrePrefix( - String aRegularLocalName, - String aLocalizedMaterialPre, - String aLocalizedMaterialPost, - boolean aIsUnificatable, - boolean aIsMaterialBased, - boolean aIsSelfReferencing, - boolean aIsContainer, - boolean aDontUnificateActively, - boolean aIsUsedForBlocks, - boolean aAllowNormalRecycling, - boolean aGenerateDefaultItem, - boolean aIsEnchantable, - boolean aIsUsedForOreProcessing, - int aMaterialGenerationBits, - long aMaterialAmount, - int aDefaultStackSize, - int aTextureindex) { - - mRegularLocalName = aRegularLocalName; - mLocalizedMaterialPre = aLocalizedMaterialPre; - mLocalizedMaterialPost = aLocalizedMaterialPost; - mIsUnificatable = aIsUnificatable; - mIsMaterialBased = aIsMaterialBased; - mIsSelfReferencing = aIsSelfReferencing; - mIsContainer = aIsContainer; - mDontUnificateActively = aDontUnificateActively; - mIsUsedForBlocks = aIsUsedForBlocks; - mAllowNormalRecycling = aAllowNormalRecycling; - mGenerateDefaultItem = aGenerateDefaultItem; - mIsEnchantable = aIsEnchantable; - mIsUsedForOreProcessing = aIsUsedForOreProcessing; - mMaterialGenerationBits = aMaterialGenerationBits; - mMaterialAmount = aMaterialAmount; - mDefaultStackSize = aDefaultStackSize; - mTextureindex = aTextureindex; - - } - - public final boolean addToEnum() { - - mSelfReference = EnumHelper.addEnum(OrePrefixes.class, this.name(), - new Class[] { - String.class, - String.class, String.class, boolean.class, - boolean.class, boolean.class, boolean.class, - boolean.class, boolean.class, boolean.class, - boolean.class, boolean.class, boolean.class, - int.class, long.class, int.class, int.class - }, - new Object[] { - mRegularLocalName, - mLocalizedMaterialPre, - mLocalizedMaterialPost, - mIsUnificatable, - mIsMaterialBased, - mIsSelfReferencing, - mIsContainer, - mDontUnificateActively, - mIsUsedForBlocks, - mAllowNormalRecycling, - mGenerateDefaultItem, - mIsEnchantable, - mIsUsedForOreProcessing, - mMaterialGenerationBits, - mMaterialAmount, - mDefaultStackSize, - mTextureindex}); - - return mSelfReference != null; - } - - public static final boolean checkEntryWasAdded(CustomOrePrefix aCustomPrefixObject) { - return aCustomPrefixObject.mSelfReference != null; - } - - public OrePrefixes get() { - return mSelfReference; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java deleted file mode 100644 index 8c814489f2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ /dev/null @@ -1,903 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -import static gregtech.api.enums.GT_Values.W; - -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.xmod.gregtech.api.interfaces.GregtechItemContainer; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** - * Class containing all non-OreDict Items of GregTech. - */ -public enum GregtechItemList implements GregtechItemContainer { - - /** - * Items - */ - - // Advanced Hazmat Suit - Armour_Hazmat_Advanced_Helmet, - Armour_Hazmat_Advanced_Chest, - Armour_Hazmat_Advanced_Legs, - Armour_Hazmat_Advanced_Boots, - - //Gregtech Machine Parts - Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV, Electric_Motor_MAX, - Electric_Pump_LuV, Electric_Pump_ZPM, Electric_Pump_UV, Electric_Pump_MAX, - Conveyor_Module_LuV, Conveyor_Module_ZPM, Conveyor_Module_UV, Conveyor_Module_MAX, - Electric_Piston_LuV, Electric_Piston_ZPM, Electric_Piston_UV, Electric_Piston_MAX, - Robot_Arm_LuV, Robot_Arm_ZPM, Robot_Arm_UV, Robot_Arm_MAX, - Field_Generator_LuV, Field_Generator_ZPM, Field_Generator_UV, Field_Generator_MAX, - Emitter_LuV, Emitter_ZPM, Emitter_UV, Emitter_MAX, - Sensor_LuV, Sensor_ZPM, Sensor_UV, Sensor_MAX, - - //ULV Components - Electric_Motor_ULV, - Electric_Pump_ULV, - Conveyor_Module_ULV, - Electric_Piston_ULV, - Robot_Arm_ULV, - Field_Generator_ULV, - Emitter_ULV, - Sensor_ULV, - - // Mixed Components - TransmissionComponent_ULV, TransmissionComponent_LV, - TransmissionComponent_MV, TransmissionComponent_HV, - TransmissionComponent_EV, TransmissionComponent_IV, - TransmissionComponent_LuV, TransmissionComponent_ZPM, - TransmissionComponent_UV, TransmissionComponent_MAX, - - //Recipe Circuit - Circuit_BioRecipeSelector, - Circuit_T3RecipeSelector, - - //Circuits - Old_Circuit_Primitive, Old_Circuit_Basic, Old_Circuit_Good, - Old_Circuit_Advanced, Old_Circuit_Data, Old_Circuit_Elite, - Old_Circuit_Master, Old_Tool_DataOrb, Old_Circuit_Ultimate, Old_Tool_DataStick, - Circuit_IV, Circuit_LuV, Circuit_ZPM, - - //Circuit Parts - Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM, - Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM, - Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM, - Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM, - - //Old Style Circuits - Old_Circuit_Board_Basic, Old_Circuit_Board_Advanced, Old_Circuit_Board_Elite, - Old_Circuit_Parts_Crystal_Chip_Elite, Old_Circuit_Parts_Crystal_Chip_Master, Old_Circuit_Parts_Advanced, - Old_Circuit_Parts_Wiring_Basic, Old_Circuit_Parts_Wiring_Advanced, Old_Circuit_Parts_Wiring_Elite, - Old_Empty_Board_Basic, Old_Empty_Board_Elite, - - //Batteries - Battery_RE_EV_Sodium, - Battery_RE_EV_Cadmium, - Battery_RE_EV_Lithium, - - //Shapes for Extruder - Shape_Extruder_WindmillShaft, - Shape_Extruder_SmallGear, - - //Cooked Raisin Toast for ImQ009 - Food_Baked_Raisin_Bread, - - - //Fluid Cells to regulate flows. - Fluid_Cell_1L, Fluid_Cell_16L, - Fluid_Cell_36L, Fluid_Cell_144L, - - //Debug - TESTITEM, - - // Larger Volumetric Flasks - VOLUMETRIC_FLASK_8k, - VOLUMETRIC_FLASK_32k, - - //RTG Fuels - Pellet_RTG_PU238, Pellet_RTG_SR90, - Pellet_RTG_PO210, Pellet_RTG_AM241, - - //Computer Cube - Gregtech_Computer_Cube, - - //Casings for batteries - Battery_Casing_Gem_1, Battery_Casing_Gem_2, - Battery_Casing_Gem_3, Battery_Casing_Gem_4, - - //Custom Batteries - Battery_Gem_1, Battery_Gem_2, - Battery_Gem_3, Battery_Gem_4, - - //Compressed Fusion MK3 - Compressed_Fusion_Reactor, - - //Carbon Materials - NanoTube_Base_Substrate, - NanoTube_Finished, - Carbyne_Tube_Finished, - Carbyne_Sheet_Finished, - - //End Game Laser Engraver Lens - Laser_Lens_WoodsGlass, - Laser_Lens_Special, - - //Bombs - Bomb_Cast, Bomb_Cast_Molten, - Bomb_Cast_Set, Bomb_Cast_Broken, - Bomb_Cast_Mold, - - // Pellet Mold - Pellet_Mold, - - //Charged Items for Tree Farms - Farm_Processor_EV, - Farm_Processor_IV, - Farm_Processor_LuV, - Farm_Processor_ZPM, - Farm_Processor_UV, - - // Upgrade chip for Distillus - Distillus_Upgrade_Chip, - - - // Chips used to nerf my multis via custom behavioural attachments - Chip_MultiNerf_NoOutputBonus, - Chip_MultiNerf_NoSpeedBonus, - Chip_MultiNerf_NoEuBonus, - - // Milling Balls - Milling_Ball_Alumina, - Milling_Ball_Soapstone, - - - //---------------------------------------------------------------------------- - - - - /** - * MultiBlocks - */ - - - // Tier GT++ Casings - GTPP_Casing_ULV, GTPP_Casing_LV, - GTPP_Casing_MV, GTPP_Casing_HV, - GTPP_Casing_EV, GTPP_Casing_IV, - GTPP_Casing_LuV, GTPP_Casing_ZPM, - GTPP_Casing_UV, GTPP_Casing_MAX, - - //IronBlastFurnace Machine_Bronze_BlastFurnace - Machine_Iron_BlastFurnace, - Casing_IronPlatedBricks, - - //Large Centrifuge - Industrial_Centrifuge, - Casing_Centrifuge1, - - // Large Alloy Smelter - Industrial_AlloySmelter, - - //Coke Oven - Industrial_CokeOven, - Casing_CokeOven, - Casing_CokeOven_Coil1, - Casing_CokeOven_Coil2, - - //Bending Maching // Plate Press // Press - Industrial_PlatePress, - Casing_MaterialPress, - - //Matter Fab - Industrial_MassFab, - Casing_MatterGen, - Casing_MatterFab, - - //ABS - Industrial_AlloyBlastSmelter, - Casing_Coil_BlastSmelter, - Casing_BlastSmelter, - - //Industrial Electrolyzer - Industrial_Electrolyzer, - Casing_Electrolyzer, - - //Industrial Maceration Stack - Industrial_MacerationStack, - Casing_MacerationStack, - - //Industrial Wire Factory - Industrial_WireFactory, - Casing_WireFactory, - - //Power sub-station for mass storage. 3 hatches for input and output, whatever voltages you desire. - PowerSubStation, - Casing_Vanadium_Redox, - Casing_Vanadium_Redox_IV, - Casing_Vanadium_Redox_LuV, - Casing_Vanadium_Redox_ZPM, - Casing_Vanadium_Redox_UV, - Casing_Vanadium_Redox_MAX, - Casing_Power_SubStation, - - - //LFTR - ThoriumReactor, - Casing_Reactor_I, - Casing_Reactor_II, - - //Multitank - /*Industrial_MultiTank,*/ - Industrial_MultiTankDense, - Casing_MultitankExterior, - - - //Fission Fuel Refinery - Industrial_FuelRefinery, - Casing_Refinery_External, - Casing_Refinery_Structural, - Casing_Refinery_Internal, - - - //Industrial Sifter - Industrial_Sifter, - Casing_Sifter, - Casing_SifterGrate, - - - //Large Thermal Centrifuge - Industrial_ThermalCentrifuge, - Casing_ThermalCentrifuge, - - - //Cyclotron - COMET_Cyclotron, - Casing_Cyclotron_Coil, - Casing_Cyclotron_External, - - //Thermal Boiler - GT4_Thermal_Boiler, - Casing_ThermalContainment, - - - //Tree Farm - Industrial_TreeFarm, - TreeFarmer_Structural, - Casing_PLACEHOLDER_TreeFarmer, - - - //Fish Pond - Industrial_FishingPond, - Casing_FishPond, - - //Algae - AlgaeFarm_Controller, - - //Chemical Plant - ChemicalPlant_Controller, - - //GT4 autoCrafter - GT4_Multi_Crafter, - Casing_Autocrafter, - - - //industrial Ore-Washer - Industrial_WashPlant, - Casing_WashPlant, - - - //Generator Array - Generator_Array_Controller, - - - //Cutting Factory Controller - Industrial_CuttingFactoryController, - Casing_CuttingFactoryFrame, - - - //Tesla Tower - /*TelsaTower,*/ - Casing_TeslaTower, - - - //Large Extruder - Industrial_Extruder, - Casing_Extruder, - - - //Multi-Machine - Industrial_MultiMachine, - Casing_Multi_Use, - - - //Bedrock Mining Platforms - /*BedrockMiner_MKI, */ - /*BedrockMiner_MKII, */ - /*BedrockMiner_MKIII, */ - Casing_BedrockMiner, - - - //Large Packager - Amazon_Warehouse_Controller, - Casing_AmazonWarehouse, - - - //Advanced GT vanilla Multis - Machine_Adv_BlastFurnace, - Casing_Adv_BlastFurnace, - Machine_Adv_ImplosionCompressor, - Machine_Adv_DistillationTower, - - //Advanced Assembly Line - /*Machine_Adv_AssemblyLine,*/ - - //Advanced Vacuum Freezer - Industrial_Cryogenic_Freezer, - Casing_AdvancedVacuum, - - - //FusionTek MK IV - FusionComputer_UV2, - Casing_Fusion_External, - Casing_Fusion_Internal, - - - //large mixer - Industrial_Mixer, - - - //Naq Reactor - Casing_Naq_Reactor_A, - Casing_Naq_Reactor_B, - Casing_Naq_Reactor_C, - /*Controller_Naq_Reactor, */ - Casing_Containment, - - //Arc Furnace - Industrial_Arc_Furnace, - Casing_Industrial_Arc_Furnace, - - //Solar Tower - /*Industrial_Solar_Tower,*/ - Casing_SolarTower_Structural, - Casing_SolarTower_SaltContainment, - Casing_SolarTower_HeatContainment, - - //Larger Turbines - /*Large_Steam_Turbine, Large_HPSteam_Turbine, */ - Casing_Turbine_Shaft, - Casing_Turbine_LP, Casing_Turbine_HP, - Casing_Turbine_Gas, Casing_Turbine_Plasma, - - // Large Engine - Casing_Reinforced_Engine_Casing, - - //Large Vacuum Furnace - Casing_Vacuum_Furnace, - Controller_Vacuum_Furnace, - - // Large Rocket Engine - Casing_RocketEngine, - Controller_RocketEngine, - - // Large Semi-Fluid - Controller_LargeSemifluidGenerator, - - // IsaMill - Controller_IsaMill, - Casing_IsaMill_Casing, - Casing_IsaMill_Gearbox, - Casing_IsaMill_Pipe, - - // Flotation Cell - Controller_Flotation_Cell, - Casing_Flotation_Cell, - - // Sparge Tower - Controller_Sparge_Tower, - Casing_Sparge_Tower_Exterior, - Casing_Sparge_Tower_Interior, - - // Elemental Duplicator - Controller_ElementalDuplicator, - Casing_ElementalDuplicator, - - // Big Steam Macerator - Controller_SteamMaceratorMulti, - - // Custom Machine Casings - Casing_Machine_Custom_1, - Casing_Machine_Custom_2, - Casing_Machine_Custom_3, - Casing_Machine_Custom_4, - Casing_Machine_Custom_5, - Casing_Machine_Custom_6, - - - //---------------------------------------------------------------------------- - - /** - * Custom hatches/Busses - */ - - //Buffer Dynamos - Hatch_Buffer_Dynamo_ULV, Hatch_Buffer_Dynamo_LV, Hatch_Buffer_Dynamo_MV, Hatch_Buffer_Dynamo_HV, Hatch_Buffer_Dynamo_EV, - Hatch_Buffer_Dynamo_IV, Hatch_Buffer_Dynamo_LuV, Hatch_Buffer_Dynamo_ZPM, Hatch_Buffer_Dynamo_UV, Hatch_Buffer_Dynamo_MAX, - - //Air Intake hatch - Hatch_Air_Intake, - - //XL Turbine Rotor Hatch - /*Hatch_Turbine_Rotor,*/ - - //Standard Turbine Rotor Hatch - Hatch_Input_TurbineHousing, - - //Control Core - Hatch_Control_Core, - - // Milling Ball Bus - Bus_Milling_Balls, - - // Catalyst Bus - Bus_Catalysts, - - //Custom Fluid Hatches - Hatch_Input_Cryotheum, - Hatch_Input_Pyrotheum, - Hatch_Input_Naquadah, - Hatch_Input_Steam, - - //Steam Multi Buses - Hatch_Input_Bus_Steam, - Hatch_Output_Bus_Steam, - - //Elemental Duplicator Data Orb Bus - Hatch_Input_Elemental_Duplicator, - - //RTG Hatch - Hatch_RTG_LV, - Hatch_RTG_MV, - Hatch_RTG_HV, - - //Battery hatches for PSS - Hatch_Input_Battery_MV, - Hatch_Input_Battery_EV, - Hatch_Output_Battery_MV, - Hatch_Output_Battery_EV, - - //Advanced Mufflers - Hatch_Muffler_Adv_LV, Hatch_Muffler_Adv_MV, Hatch_Muffler_Adv_HV, - Hatch_Muffler_Adv_EV, Hatch_Muffler_Adv_IV, Hatch_Muffler_Adv_LuV, - Hatch_Muffler_Adv_ZPM, Hatch_Muffler_Adv_UV, Hatch_Muffler_Adv_MAX, - - //Super Input Busses - Hatch_SuperBus_Input_ULV, Hatch_SuperBus_Input_LV, Hatch_SuperBus_Input_MV, - Hatch_SuperBus_Input_HV, Hatch_SuperBus_Input_EV, Hatch_SuperBus_Input_IV, - Hatch_SuperBus_Input_LuV, Hatch_SuperBus_Input_ZPM, Hatch_SuperBus_Input_UV, - Hatch_SuperBus_Input_MAX, - - //Super Output Busses - Hatch_SuperBus_Output_ULV, Hatch_SuperBus_Output_LV, Hatch_SuperBus_Output_MV, - Hatch_SuperBus_Output_HV, Hatch_SuperBus_Output_EV, Hatch_SuperBus_Output_IV, - Hatch_SuperBus_Output_LuV, Hatch_SuperBus_Output_ZPM, Hatch_SuperBus_Output_UV, - Hatch_SuperBus_Output_MAX, - - - - - //---------------------------------------------------------------------------- - - - - - - /** - * Single Block Tile Entities - */ - - //ULV Generators - Generator_Diesel_ULV, Generator_Gas_Turbine_ULV, Generator_Steam_Turbine_ULV, - - //Crate Box - CrateStorage, - - //Auto TC Research Creator - Thaumcraft_Researcher, - - //Threaded Buffers - Automation_Threaded_SuperBuffer_ULV, Automation_Threaded_SuperBuffer_LV, Automation_Threaded_SuperBuffer_MV, Automation_Threaded_SuperBuffer_HV, Automation_Threaded_SuperBuffer_EV, - Automation_Threaded_SuperBuffer_IV, Automation_Threaded_SuperBuffer_LuV, Automation_Threaded_SuperBuffer_ZPM, Automation_Threaded_SuperBuffer_UV, Automation_Threaded_SuperBuffer_MAX, - - //infinite Items - Infinite_Item_Chest, - - - //Gt4 Workbenches - GT4_Workbench_Bronze, - GT4_Workbench_Advanced, - - - //Geothermal Engines - Geothermal_Engine_EV, - Geothermal_Engine_IV, - Geothermal_Engine_LuV, - - - //Tesseracts - GT4_Tesseract_Generator, - GT4_Tesseract_Terminal, - - - //Advanced Boilers - Boiler_Advanced_LV, - Boiler_Advanced_MV, - Boiler_Advanced_HV, - - - //Fancy Pollution Devices - Pollution_Detector, - Pollution_Cleaner_ULV, Pollution_Cleaner_LV, - Pollution_Cleaner_MV, Pollution_Cleaner_HV, - Pollution_Cleaner_EV, Pollution_Cleaner_IV, - Pollution_Cleaner_LuV, Pollution_Cleaner_ZPM, - Pollution_Cleaner_UV, Pollution_Cleaner_MAX, - - - //Debug machine - Pollution_Creator, - Garbage_Collector_Debug_Machine, - - - //Basically is an automatic Cauldron - SimpleDustWasher_ULV, - SimpleDustWasher_MV, - SimpleDustWasher_EV, - SimpleDustWasher_LuV, - SimpleDustWasher_UV, - - //Solar Tower Reflector - /*Solar_Tower_Reflector,*/ - - //Super Tier Chests - Super_Chest_LV, Super_Chest_MV, Super_Chest_HV, Super_Chest_EV, Super_Chest_IV, - - //Chunkloader - GT_Chunkloader_HV, GT_Chunkloader_ZPM, GT_Chunkloader_IV, - - - //Wireless Chargers - Charger_LV, Charger_MV, Charger_HV, - Charger_EV, Charger_IV, Charger_LuV, - Charger_ZPM, Charger_UV, Charger_MAX, - - - //Tiny Fusion - /*Miniature_Fusion, */ - - - //Component Makers - Machine_LV_Component_Maker, - Machine_MV_Component_Maker, - Machine_HV_Component_Maker, - Machine_EV_Component_Maker, - Machine_IV_Component_Maker, - Machine_LuV_Component_Maker, - Machine_ZPM_Component_Maker, - Machine_UV_Component_Maker, - - // Reactor Processing Unit - ReactorProcessingUnit_IV, - ReactorProcessingUnit_ZPM, - - // Cold Trap - ColdTrap_IV, - ColdTrap_ZPM, - - //Breakers - BreakerBox_ULV, BreakerBox_LV, BreakerBox_MV, - BreakerBox_HV, BreakerBox_EV, BreakerBox_IV, - BreakerBox_LuV, BreakerBox_ZPM, BreakerBox_UV, - BreakerBox_MAX, - - - //Solar Generators - GT_Solar_ULV, GT_Solar_LV, GT_Solar_MV, - GT_Solar_HV, GT_Solar_EV, GT_Solar_IV, - GT_Solar_LuV, GT_Solar_ZPM, GT_Solar_UV, GT_Solar_MAX, - - - //512v Creative Buffer - Energy_Buffer_CREATIVE, - //Variable voltage RF convertor - Energy_Buffer_RF_Convertor, - //Energy Buffers - Energy_Buffer_1by1_ULV, Energy_Buffer_1by1_LV, - Energy_Buffer_1by1_MV, Energy_Buffer_1by1_HV, - Energy_Buffer_1by1_EV, Energy_Buffer_1by1_IV, - Energy_Buffer_1by1_LuV, Energy_Buffer_1by1_ZPM, - Energy_Buffer_1by1_UV, Energy_Buffer_1by1_MAX, - - - //Cobble Generators - Cobble_Generator_ULV, Cobble_Generator_LV, - Cobble_Generator_MV, Cobble_Generator_HV, - Cobble_Generator_EV, Cobble_Generator_IV, - Cobble_Generator_LuV, Cobble_Generator_ZPM, - Cobble_Generator_UV, Cobble_Generator_MAX, - - - //The max Steam condenser - Condensor_MAX, - - - //Player owned Safes - GT_Safe_ULV, GT_Safe_LV, - GT_Safe_MV, GT_Safe_HV, - GT_Safe_EV, GT_Safe_IV, - GT_Safe_LuV, GT_Safe_ZPM, - GT_Safe_UV, GT_Safe_MAX, - - - //Rocket Engines - Rocket_Engine_EV, - Rocket_Engine_IV, - Rocket_Engine_LuV, - - - //GT4 Shelves - GT4_Shelf, GT4_Shelf_Iron, - GT4_Shelf_FileCabinet, GT4_Shelf_Desk, - GT4_Shelf_Compartment, GT4_Shelf_Large, - - - //Hi Amp Transformers - Transformer_HA_LV_ULV, Transformer_HA_MV_LV, Transformer_HA_HV_MV, - Transformer_HA_EV_HV, Transformer_HA_IV_EV, Transformer_HA_LuV_IV, - Transformer_HA_ZPM_LuV, Transformer_HA_UV_ZPM, Transformer_HA_MAX_UV, - - - //Semi-Fluid generators - Generator_SemiFluid_LV, - Generator_SemiFluid_MV, - Generator_SemiFluid_HV, - - - //Advanced Mixer 4x4 - Machine_Advanced_LV_Mixer, Machine_Advanced_MV_Mixer, Machine_Advanced_HV_Mixer, - Machine_Advanced_EV_Mixer, Machine_Advanced_IV_Mixer, Machine_Advanced_LuV_Mixer, - Machine_Advanced_ZPM_Mixer, Machine_Advanced_UV_Mixer, - - - //Block that enables uplink to a superconductor network - SuperConductorInputNode, - - //Heat Pipes - HeatPipe_Tier_1, - HeatPipe_Tier_2, - HeatPipe_Tier_3, - - - //Chemical Dehydrators for nuclear fuels - GT_Dehydrator_MV, GT_Dehydrator_HV, - GT_Dehydrator_EV, GT_Dehydrator_IV, - GT_Dehydrator_LuV, GT_Dehydrator_ZPM, - - - //Fluid Storage Tanks - GT_FluidTank_ULV, GT_FluidTank_LV, - GT_FluidTank_MV, GT_FluidTank_HV, - GT_FluidTank_EV, GT_FluidTank_IV, - GT_FluidTank_LuV, GT_FluidTank_ZPM, - GT_FluidTank_UV, GT_FluidTank_MAX, - - //Tick Accelerators from GTNH - AcceleratorLV, AcceleratorMV, - AcceleratorHV, AcceleratorEV, - AcceleratorIV, AcceleratorLuV, - AcceleratorZPM, AcceleratorUV, - - //GT RTG - RTG, - - //Plasma Tank - /*Plasma_Tank,*/ - - - //---------------------------------------------------------------------------- - - - /** - * Covers - */ - - //Fluid Void Covers - Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV, - - //Item Void Covers - Cover_Overflow_Item_ULV, Cover_Overflow_Item_LV, Cover_Overflow_Item_MV, Cover_Overflow_Item_HV, Cover_Overflow_Item_EV, Cover_Overflow_Item_IV, - - //Fake Hull Covers - FakeMachineCasingPlate_ULV, FakeMachineCasingPlate_LV, - FakeMachineCasingPlate_MV, FakeMachineCasingPlate_HV, - FakeMachineCasingPlate_EV, FakeMachineCasingPlate_IV, - FakeMachineCasingPlate_LuV, FakeMachineCasingPlate_ZPM, - FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX, - - - - - //---------------------------------------------------------------------------- - - ; - - public static final GregtechItemList[] - DYE_ONLY_ITEMS = { - Energy_Buffer_1by1_EV, Energy_Buffer_1by1_EV }; - private ItemStack mStack; - private boolean mHasNotBeenSet = true; - - - @Override - public GregtechItemList set(final Item aItem) { - this.mHasNotBeenSet = false; - if (aItem == null) { - return this; - } - final ItemStack aStack = new ItemStack(aItem, 1, 0); - this.mStack = GT_Utility.copyAmount(1, aStack); - return this; - } - - @Override - public GregtechItemList set(final ItemStack aStack) { - this.mHasNotBeenSet = false; - this.mStack = GT_Utility.copyAmount(1, aStack); - return this; - } - - @Override - public Item getItem() { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(this.mStack)) { - return null; - } - return this.mStack.getItem(); - } - - @Override - public Block getBlock() { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - return getBlockFromStack(this.getItem()); - } - - @Override - public final boolean hasBeenSet() { - return !this.mHasNotBeenSet; - } - - @Override - public boolean isStackEqual(final Object aStack) { - return this.isStackEqual(aStack, false, false); - } - - @Override - public boolean isStackEqual(final Object aStack, final boolean aWildcard, final boolean aIgnoreNBT) { - if (GT_Utility.isStackInvalid(aStack)) { - return false; - } - return GT_Utility.areUnificationsEqual((ItemStack)aStack, aWildcard?this.getWildcard(1):this.get(1), aIgnoreNBT); - } - - public static Block getBlockFromStack(Object aStack) { - if (GT_Utility.isStackInvalid(aStack)) - return Blocks.air; - return Block.getBlockFromItem(((ItemStack) aStack).getItem()); - } - - @Override - public ItemStack get(final long aAmount, final Object... aReplacements) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(this.mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(this.mStack)); - } - - @Override - public ItemStack getWildcard(final long aAmount, final Object... aReplacements) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(this.mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(this.mStack)); - } - - @Override - public ItemStack getUndamaged(final long aAmount, final Object... aReplacements) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(this.mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(this.mStack)); - } - - @Override - public ItemStack getAlmostBroken(final long aAmount, final Object... aReplacements) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(this.mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage()-1, GT_OreDictUnificator.get(this.mStack)); - } - - @Override - public ItemStack getWithName(final long aAmount, final String aDisplayName, final Object... aReplacements) { - final ItemStack rStack = this.get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) { - return null; - } - rStack.setStackDisplayName(aDisplayName); - return GT_Utility.copyAmount(aAmount, rStack); - } - - @Override - public ItemStack getWithCharge(final long aAmount, final int aEnergy, final Object... aReplacements) { - final ItemStack rStack = this.get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) { - return null; - } - GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); - return GT_Utility.copyAmount(aAmount, rStack); - } - - @Override - public ItemStack getWithDamage(final long aAmount, final long aMetaValue, final Object... aReplacements) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(this.mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(this.mStack)); - } - - @Override - public GregtechItemList registerOre(final Object... aOreNames) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - for (final Object tOreName : aOreNames) { - GT_OreDictUnificator.registerOre(tOreName, this.get(1)); - } - return this; - } - - @Override - public GregtechItemList registerWildcardAsOre(final Object... aOreNames) { - if (this.mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); - } - for (final Object tOreName : aOreNames) { - GT_OreDictUnificator.registerOre(tOreName, this.getWildcard(1)); - } - return this; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java deleted file mode 100644 index 7ef6b5701e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -/* Electric Components. - * - * usual Materials for this are: - * Primitive (Tier 1) - * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery - * Good (Tier 3) - * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery - * Data (Tier 5) : Data Storage Circuit - * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit - * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal - * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb - * Infinite (Cheaty) - * -Circuits - Circuit_Primitive, Circuit_Basic, Circuit_Good, Circuit_Advanced, - Circuit_Data, Circuit_Elite, Circuit_Master, Tool_DataOrb, Circuit_Ultimate, Tool_DataStick, - Circuit_IV, Circuit_LuV, Circuit_ZPM, -Circuit Parts - Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM, - Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM, - Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM, - Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM; - */ -public enum GregtechOreDictNames { - buffer_core, itemGregConduit, Circuit_IV, Circuit_LuV, Circuit_ZPM, - Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM, - Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM, - Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM, - Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM; - - public String unlocalisedName; - - private void ModObject() { - this.unlocalisedName = this.name(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java deleted file mode 100644 index b17b4a26ff..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java +++ /dev/null @@ -1,941 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -import static gregtech.api.enums.GT_Values.*; -import static gtPlusPlus.core.util.Utils.getTcAspectStack; - -import java.util.*; - -import gregtech.api.enums.*; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.*; -import gregtech.api.objects.GT_FluidStack; -import gregtech.api.objects.MaterialStack; -import gregtech.api.util.*; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; -import gtPlusPlus.xmod.gregtech.api.objects.GregtechItemData; -import gtPlusPlus.xmod.gregtech.api.objects.GregtechMaterialStack; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public enum GregtechOrePrefixes { - /* Electric Components. - * - * usual Materials for this are: - * Primitive (Tier 1) - * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery - * Good (Tier 3) - * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery - * Data (Tier 5) : Data Storage Circuit - * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit - * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal - * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb - * Infinite (Cheaty) - */ - ingotHot("Hot Ingots", "Hot ", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. - ingot("Ingots", "", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, 11), // A regular Ingot. Introduced by Eloraam - dustTiny("Tiny Dusts", "Tiny Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. - dustSmall("Small Dusts", "Small Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. - dustImpure("Impure Dusts", "Impure Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary Material - dustRefined("Refined Dusts", "Refined Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 2), - dustPure("Purified Dusts", "Purified Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 4), - dust("Dusts", "", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. - nugget("Nuggets", "", " Nugget", true, true, false, false, false, false, false, true, false, false, B[1], M / 9, 64, 9), // A Nugget. Introduced by Eloraam - plate("Plates", "", " Plate", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia - block("Storage Blocks", "Block of ", "", true, true, false, false, false, true, true, false, false, false, 0, M * 9, 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar - gem("Gemstones", "", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 1, 64, 8), // A regular Gem worth one Dust. Introduced by Eloraam - gemChipped("Chipped Gemstones", "Chipped ", "", true, true, true, false, false, false, true, true, false, false, B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft - gemFlawed("Flawed Gemstones", "Flawed ", "", true, true, true, false, false, false, true, true, false, false, B[2], M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft - gemFlawless("Flawless Gemstones", "Flawless ", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft - gemExquisite("Exquisite Gemstones", "Exquisite ", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft - stick("Sticks/Rods", "", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam - type2("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, -1), - - toolSkookumChoocher("Skookum Choocher", "", " Skookum Choocher", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. - toolAngleGrinder("Angle Grinder", "", "Angle Grinder", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. - toolElectricSnips("Electric Snips", "", "Electric Snips", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. - toolElectricLighter("Electric Lighter", "", "Electric Lighter", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. - toolElectricButcherKnife("Electric Butcher Knife", "", "Electric Butcher Knife", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. - - - - batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia - circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia - chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Buildcraft - computer("Computers", "", "", true, true, false, false, true, false, false, false, false, false, 0, -1, 64, -1),; // A whole Computer. "computerMaster" = ComputerCube - - public static volatile int VERSION = 508; - - static { - - ingotHot.mHeatDamage = 3.0F; - - } - - public final ArrayList mPrefixedItems = new ArrayList<>(); - public final short mTextureIndex; - public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost; - public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; - public final List mAspects = new ArrayList<>(); - public final Collection mFamiliarPrefixes = new HashSet<>(); - /** - * Used to determine the amount of Material this Prefix contains. - * Multiply or Divide GregTech_API.MATERIAL_UNIT to get the Amounts in comparision to one Ingot. - * 0 = Null - * Negative = Undefined Amount - */ - public final long mMaterialAmount; - private final Collection mNotGeneratedItems = new HashSet<>(), mIgnoredMaterials = new HashSet<>(), mGeneratedItems = new HashSet<>(); - private final ArrayList mOreProcessing = new ArrayList<>(); - private final ArrayList mOreProcessingFake = new ArrayList<>(); - public ItemStack mContainerItem = null; - public ICondition mCondition = null; - public byte mDefaultStackSize = 64; - public GregtechMaterialStack mSecondaryMaterial = null; - public GregtechOrePrefixes mPrefixInto = this; - public float mHeatDamage = 0.0F; // Negative for Frost Damage - /** - * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check. - */ - public int mMaterialGenerationBits = 0; - private GregtechOrePrefixes(final String aRegularLocalName, final String aLocalizedMaterialPre, final String aLocalizedMaterialPost, final boolean aIsUnificatable, final boolean aIsMaterialBased, final boolean aIsSelfReferencing, final boolean aIsContainer, final boolean aDontUnificateActively, final boolean aIsUsedForBlocks, final boolean aAllowNormalRecycling, final boolean aGenerateDefaultItem, final boolean aIsEnchantable, final boolean aIsUsedForOreProcessing, final int aMaterialGenerationBits, final long aMaterialAmount, final int aDefaultStackSize, final int aTextureindex) { - this.mIsUnificatable = aIsUnificatable; - this.mIsMaterialBased = aIsMaterialBased; - this.mIsSelfReferencing = aIsSelfReferencing; - this.mIsContainer = aIsContainer; - this.mDontUnificateActively = aDontUnificateActively; - this.mIsUsedForBlocks = aIsUsedForBlocks; - this.mAllowNormalRecycling = aAllowNormalRecycling; - this.mGenerateDefaultItem = aGenerateDefaultItem; - this.mIsEnchantable = aIsEnchantable; - this.mIsUsedForOreProcessing = aIsUsedForOreProcessing; - this.mMaterialGenerationBits = aMaterialGenerationBits; - this.mMaterialAmount = aMaterialAmount; - this.mRegularLocalName = aRegularLocalName; - this.mLocalizedMaterialPre = aLocalizedMaterialPre; - this.mLocalizedMaterialPost = aLocalizedMaterialPost; - this.mDefaultStackSize = (byte) aDefaultStackSize; - this.mTextureIndex = (short) aTextureindex; - - - //TODO - Utilise some form of way to check if it's gt 5.9 if so, use string switch. - if (this.name().startsWith("ore")) { - getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("wire") || this.name().startsWith("cable")) { - getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("dust")) { - getTcAspectStack(TC_Aspects.PERDITIO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("crushed")) { - getTcAspectStack(TC_Aspects.PERFODIO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("ingot") || this.name().startsWith("nugget")) { - getTcAspectStack(TC_Aspects.METALLUM.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("armor")) { - getTcAspectStack(TC_Aspects.TUTAMEN.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("stone")) { - getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("pipe")) { - getTcAspectStack(TC_Aspects.ITER.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("gear")) { - getTcAspectStack(TC_Aspects.MOTUS.name(), 1).addToAspectList(this.mAspects); - getTcAspectStack(TC_Aspects.MACHINA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("frame") || this.name().startsWith("plate")) { - getTcAspectStack(TC_Aspects.FABRICO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("tool")) { - getTcAspectStack(TC_Aspects.INSTRUMENTUM.name(), 2).addToAspectList(this.mAspects); - } else if (this.name().startsWith("gem") || this.name().startsWith("crystal") || this.name().startsWith("lens")) { - getTcAspectStack(TC_Aspects.VITREUS.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("crate")) { - getTcAspectStack(TC_Aspects.ITER.name(), 2).addToAspectList(this.mAspects); - } else if (this.name().startsWith("circuit")) { - getTcAspectStack("COGNITIO", 1); - } else if (this.name().startsWith("computer")) { - getTcAspectStack("COGNITIO", 4).addToAspectList(this.mAspects); - } else if (this.name().startsWith("battery")) { - getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); - } - } - - public static GregtechOrePrefixes getOrePrefix(final String aOre) { - for (final GregtechOrePrefixes tPrefix : values()) { - if (aOre.startsWith(tPrefix.toString())) { - return tPrefix; - } - } - return null; - } - - public static String stripPrefix(final String aOre) { - for (final GregtechOrePrefixes tPrefix : values()) { - if (aOre.startsWith(tPrefix.toString())) { - return aOre.replaceFirst(tPrefix.toString(), ""); - } - } - return aOre; - } - - public static String replacePrefix(final String aOre, final GregtechOrePrefixes aPrefix) { - for (final GregtechOrePrefixes tPrefix : values()) { - if (aOre.startsWith(tPrefix.toString())) { - return aOre.replaceFirst(tPrefix.toString(), aPrefix.toString()); - } - } - return ""; - } - - public static GregtechOrePrefixes getPrefix(final String aPrefixName) { - return getPrefix(aPrefixName, null); - } - - public static GregtechOrePrefixes getPrefix(final String aPrefixName, final GregtechOrePrefixes aReplacement) { - final Object tObject = GT_Utility.getFieldContent(GregtechOrePrefixes.class, aPrefixName, false, false); - if ((tObject != null) && (tObject instanceof GregtechOrePrefixes)) { - return (GregtechOrePrefixes) tObject; - } - return aReplacement; - } - - public static Materials getMaterial(final String aOre) { - return Materials.get(stripPrefix(aOre)); - } - - public static Materials getMaterial(final String aOre, final GregtechOrePrefixes aPrefix) { - return Materials.get(aOre.replaceFirst(aPrefix.toString(), "")); - } - - public static Materials getRealMaterial(final String aOre, final GregtechOrePrefixes aPrefix) { - return Materials.getRealMaterial(aOre.replaceFirst(aPrefix.toString(), "")); - } - - public static boolean isInstanceOf(final String aName, final GregtechOrePrefixes aPrefix) { - return aName == null ? false : aName.startsWith(aPrefix.toString()); - } - - public boolean add(final ItemStack aStack) { - if (aStack == null) { - return false; - } - if (!this.contains(aStack)) { - this.mPrefixedItems.add(aStack); - } - while (this.mPrefixedItems.contains(null)) { - this.mPrefixedItems.remove(null); - } - return true; - } - - - public boolean contains(final ItemStack aStack) { - if (aStack == null) { - return false; - } - for (final ItemStack tStack : this.mPrefixedItems) { - if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) { - return true; - } - } - return false; - } - - public boolean doGenerateItem(final Materials aMaterial) { - return (aMaterial != null) && (aMaterial != Materials._NULL) && (((aMaterial.mTypes & this.mMaterialGenerationBits) != 0) || this.mGeneratedItems.contains(aMaterial)) && !this.mNotGeneratedItems.contains(aMaterial) && ((this.mCondition == null) || this.mCondition.isTrue(aMaterial)); - } - - public boolean ignoreMaterials(final Materials... aMaterials) { - for (final Materials tMaterial : aMaterials) { - if (tMaterial != null) { - this.mIgnoredMaterials.add(tMaterial); - } - } - return true; - } - - public boolean addFamiliarPrefix(final GregtechOrePrefixes aPrefix) { - if ((aPrefix == null) || this.mFamiliarPrefixes.contains(aPrefix) || (aPrefix == this)) { - return false; - } - return this.mFamiliarPrefixes.add(aPrefix); - } - - public boolean add(final Interface_OreRecipeRegistrator aRegistrator) { - if (aRegistrator == null) { - return false; - } - return this.mOreProcessing.add(aRegistrator); - } - - public void processOre(final GT_Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { - if ((aMaterial != null) && ((aMaterial != GT_Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) && GT_Utility.isStackValid(aStack)) { - for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessing) { - if (D2) { - GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + this.name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator)); - } - tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); - } - } - } - - //TODO - public void processOre(final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { - if ((aMaterial != null) && ((aMaterial != Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) && GT_Utility.isStackValid(aStack)) { - for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessingFake) { - if (D2) { - GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + this.name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator)); - } - tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); - } - } - } - - public Object get(final Object aMaterial) { - if (aMaterial instanceof GT_Materials) { - return new GregtechItemData(this, (GT_Materials) aMaterial); - } - return this.name() + aMaterial; - } - - public String getDefaultLocalNameForItem(final Materials aMaterial) { - - - // Use Standard Localization - return this.mLocalizedMaterialPre + aMaterial.mDefaultLocalName + this.mLocalizedMaterialPost; - } - - public enum GT_Materials implements IColorModulationContainer, ISubTagContainer { - - - - /** - * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen. - *

- * Mainly for preventing NullPointer Exceptions and providing Default Values. - * - * Unknown Material Components. Dead End Section. - * - * Alkalus Range 730-799 & 970-998 - * (aMetaItemSubID, TextureSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, R, G, B, Alpha, aLocalName, - * aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor - * this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true); - * - */ - _NULL(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "NULL", 0, 0, 0, 0, false, false, 1, 1, 1, Dyes._NULL, Element._NULL, Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS.name(), 1))), - - - //Lapis(526, TextureSet.SET_LAPIS, 1.0F, 0, 1, 1 | 4 | 8, 70, 70, 220, 0, "Lapis", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue, 2, Arrays.asList(new MaterialStack(Materials.Lazurite, 12), new MaterialStack(Materials.Sodalite, 2), new MaterialStack(Materials.Pyrite, 1), new MaterialStack(Materials.Calcite, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.SENSUS, 1))), - Pyrotheum(20, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 255, 128, 0, 0, "Pyrotheum", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeYellow, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1)), Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.IGNIS, 1))), - Cryotheum(21, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 102, 178, 255, 0, "Cryotheum", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Blizz, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Snow, 1), new MaterialStack(Materials.Niter, 1)), Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.GELUM, 1))), - Ender(22, TextureSet.SET_FLUID, 1.0F, 0, 2, 1, 255, 255, 255, 0, "Ender", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen), - - /** - * Circuitry, Batteries and other Technical things - */ - Symbiotic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "IV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 4), getTcAspectStack(TC_Aspects.MACHINA, 4))), - Neutronic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "LuV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 6), getTcAspectStack(TC_Aspects.MACHINA, 6))), - Quantum(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "ZPM Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8), getTcAspectStack(TC_Aspects.MACHINA, 8))), - - Superconductor(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 190, 240, 190, 0, "Superconductor", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8))), - - Staballoy(30, TextureSet.SET_ROUGH, 10.0F, 5120, 4, 1 | 2 | 16 | 32 | 64 | 128, 68, 75, 66, 0, "Staballoy", 0, 0, 1500, 2800, true, false, 1, 3, 1, Dyes.dyeGreen, 2, Arrays.asList(new MaterialStack(Materials.Titanium, 1), new MaterialStack(Materials.Uranium, 9)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - Bedrockium(31, TextureSet.SET_FINE, 8.0F, 8196, 3, 1 | 2 | 16 | 32 | 64 | 128, 39, 39, 39, 0, "Bedrockium", 0, 0, -1, 0, false, false, 1, 5, 1, Dyes.dyeLightGray, 2, Arrays.asList(new MaterialStack(Materials.Carbon, 63), new MaterialStack(Materials.Carbon, 56)), Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS, 8), getTcAspectStack(TC_Aspects.TUTAMEN, 3))), - BloodSteel(32, TextureSet.SET_METALLIC, 11.0F, 768, 4, 1 | 2 | 16 | 32 | 64 | 128, 142, 28, 0, 0, "Blood Steel", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Steel, 3)), Arrays.asList(getTcAspectStack(TC_Aspects.VICTUS, 8), getTcAspectStack(TC_Aspects.IGNIS, 3))), - Void(33, TextureSet.SET_METALLIC, 6.0F, 1280, 3, 1 | 2 | 16 | 32 | 64 | 128, 82, 17, 82, 0, "Void Metal", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack, Arrays.asList(getTcAspectStack("PRAECANTATIO", 5), getTcAspectStack(TC_Aspects.VACUOS, 7))), - ConductiveIron(34, TextureSet.SET_METALLIC, 5.0F, 256, 2, 1 | 2, 164, 109, 100, 0, "Conductive Iron", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Iron, 6), new MaterialStack(Materials.Redstone, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 2), getTcAspectStack(TC_Aspects.METALLUM, 2))), - ElectricalSteel(35, TextureSet.SET_METALLIC, 7.0F, 768, 3, 1 | 2 | 64 | 128, 194, 194, 194, 0, "Electrical Steel", 0, 0, 1811, 1000, true, false, 3, 1, 1, Dyes.dyeLightGray, 2, Arrays.asList(new MaterialStack(Materials.Iron, 3), new MaterialStack(Materials.Coal, 2), new MaterialStack(Materials.Silicon, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.MAGNETO, 2), getTcAspectStack(TC_Aspects.ELECTRUM, 5))), - EnergeticAlloy(36, TextureSet.SET_SHINY, 5.0F, 512, 3, 1 | 2 | 64 | 128, 252, 152, 45, 0, "Energetic Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange, 2, Arrays.asList(new MaterialStack(Materials.Gold, 3), new MaterialStack(Materials.Glowstone, 2), new MaterialStack(Materials.Redstone, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 4), getTcAspectStack(TC_Aspects.LUX, 3))), - VibrantAlloy(37, TextureSet.SET_SHINY, 7.0F, 1280, 4, 1 | 2 | 64 | 128, 204, 242, 142, 0, "Vibrant Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLime, 2, Arrays.asList(new MaterialStack(Materials.EnergeticAlloy, 1), new MaterialStack(Materials.EnderPearl, 3)), Arrays.asList(getTcAspectStack(TC_Aspects.MACHINA, 5), getTcAspectStack(TC_Aspects.TELUM, 4))), - PulsatingIron(38, TextureSet.SET_SHINY, 5.0F, 256, 2, 1 | 2 | 64 | 128, 50, 91, 21, 0, "Pulsating Iron", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen, 2, Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.EnderPearl, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.ALIENIS, 3), getTcAspectStack(TC_Aspects.METALLUM, 3))), - /* TODO*/ RedstoneAlloy(39, TextureSet.SET_METALLIC, 1.0F, 256, 2, 1|2|16|32|64, 178,34,34, 0, "Redstone Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.Redstone, 4))), - - //Needs more Use, I think. - Tantalloy60(40, TextureSet.SET_DULL, 8.0F, 5120, 3, 1 | 2 | 16 | 32 | 64 | 128, 68, 75, 166, 0, "Tantalloy-60", 0, 0, 3035, 2200, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - Tantalloy61(41, TextureSet.SET_DULL, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 122, 135, 196, 0, "Tantalloy-61", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - - Potin(42, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 201,151,129, 0, "Potin", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - Inconel792(43, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 108, 240, 118, 0, "Inconel-792", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - Inconel690(44, TextureSet.SET_DULL, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 118, 220, 138, 0, "Inconel-690", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - MaragingSteel300(45, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 150, 150, 150, 0, "Maraging Steel 300", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - MaragingSteel350(46, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 160, 160, 160, 0, "Maraging Steel 350", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - HastelloyX(47, TextureSet.SET_SHINY, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 255, 193, 37, 0, "Hastelloy-X", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - - TriniumNaquadahCarbonite(48, TextureSet.SET_SHINY, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 255, 233, 0, 0, "Trinium Naquadah Carbonite", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), - - - //Radioactive Materials - HydrofluoricAcid(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 200, 200, 200, 0, "Hydrofluoric Acid", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - UraniumHexaFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 73, 220, 83, 0, "Uranium Hexafluoride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - UraniumTetraFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 73, 220, 83, 0, "Uranium Tetrafluoride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - ThoriumTetraFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 15, 120, 15, 0, "Thorium Tetrafluoride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeGreen, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - - SulfurousAcid(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 110, 220, 30, 0, "Sulfurous Acid", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - SulfurDioxide(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 150, 200, 50, 0, "Sulfur Dioxide", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - HydrogenChloride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 150, 240, 90, 0, "Hydrogen Chloride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - SulfuricApatite(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Sulfuric Apatite Solution", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - - SulfuricLithium(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Sulfuric Lithium Solution", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - LithiumHydroxide(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Lithium Hydroxide", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), - - ; - - - - - /** - * List of all Materials. - */ - public static final Collection VALUES = new HashSet<>(Arrays.asList(values())); - - - static { - /*Primitive.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Basic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Good.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Advanced.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Data.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Elite.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Master.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Ultimate.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Superconductor.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Infinite.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);*/ - Symbiotic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Neutronic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - Quantum.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); - } - - - /** - * This Array can be changed dynamically by a Tick Handler in order to get a glowing Effect on all GT Meta Items out of this Material. - */ - public final short[] mRGBa = new short[]{255, 255, 255, 0}, mMoltenRGBa = new short[]{255, 255, 255, 0}; - public final TextureSet mIconSet; - public final int mMetaItemSubID; - public final boolean mUnificatable; - public final GT_Materials mMaterialInto; - public final List mMaterialList = new ArrayList<>(); - public final List mOreByProducts = new ArrayList<>(), mOreReRegistrations = new ArrayList<>(); - public final List mAspects = new ArrayList<>(); - private final ArrayList mMaterialItems = new ArrayList<>(); - private final Collection mSubTags = new HashSet<>(); - public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null; - public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0; - public boolean mBlastFurnaceRequired = false; - public float mToolSpeed = 1.0F, mHeatDamage = 0.0F; - public String mChemicalFormula = "?", mDefaultLocalName = "null"; - public Dyes mColor = Dyes._NULL; - public short mMeltingPoint = 0, mBlastFurnaceTemp = 0; - public int mTypes = 0, mDurability = 16, mFuelPower = 0, mFuelType = 0, mExtraData = 0, mOreValue = 0, mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1; - public long mDensity = M; - public Element mElement = null; - public GT_Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, mArcSmeltInto = this, mHandleMaterial = this; - public byte mToolQuality = 0; - public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null; - /** - * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, what means 144 is one Material Unit worth - */ - public Fluid mStandardMoltenFluid = null; - - private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final boolean aUnificatable) { - this.mUnificatable = aUnificatable; - this.mMaterialInto = this; - this.mMetaItemSubID = aMetaItemSubID; - this.mToolQuality = (byte) aToolQuality; - this.mDurability = aToolDurability; - this.mToolSpeed = aToolSpeed; - this.mIconSet = aIconSet; - if (aMetaItemSubID >= 0) { - if (CORE.sMU_GeneratedMaterials[aMetaItemSubID] == null) { - CORE.sMU_GeneratedMaterials[aMetaItemSubID] = this; - } else { - throw new IllegalArgumentException("The Index " + aMetaItemSubID + " is already used!"); - } - } - } - - private GT_Materials(final GT_Materials aMaterialInto, final boolean aReRegisterIntoThis) { - this.mUnificatable = false; - this.mDefaultLocalName = aMaterialInto.mDefaultLocalName; - this.mMaterialInto = aMaterialInto.mMaterialInto; - if (aReRegisterIntoThis) { - this.mMaterialInto.mOreReRegistrations.add(this); - } - this.mChemicalFormula = aMaterialInto.mChemicalFormula; - this.mMetaItemSubID = -1; - this.mIconSet = TextureSet.SET_NONE; - } - - /** - * @param aMetaItemSubID the Sub-ID used in my own MetaItems. Range 0-1000. -1 for no Material - * @param aTypes which kind of Items should be generated. Bitmask as follows: - * 1 = Dusts of all kinds. - * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific things. - * 4 = Dusts, Gems, Plates, Lenses (if transparent). - * 8 = Dusts, Impure Dusts, crushed Ores, purified Ores, centrifuged Ores etc. - * 16 = Cells - * 32 = Plasma Cells - * 64 = Tool Heads - * 128 = Gears - * @param aR, aG, aB Color of the Material 0-255 each. - * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible. - * @param aLocalName The Name used as Default for localization. - * @param aFuelType Type of Generator to get Energy from this Material. - * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for Gems. - * @param aAmplificationValue Amount of UUM amplifier gotten from this. - * @param aUUMEnergy Amount of EU needed to shape the UUM into this Material. - * @param aMeltingPoint Used to determine the smelting Costs in Furnii. - * @param aBlastFurnaceTemp Used to determine the needed Heat capactiy Costs in Blast Furnii. - * @param aBlastFurnaceRequired If this requires a Blast Furnace. - * @param aColor Vanilla MC Wool Color which comes the closest to this. - */ - private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true); - this.mDefaultLocalName = aLocalName; - this.mMeltingPoint = (short) aMeltingPoint; - this.mBlastFurnaceTemp = (short) aBlastFurnaceTemp; - this.mBlastFurnaceRequired = aBlastFurnaceRequired; - if (aTransparent) { - this.add(SubTag.TRANSPARENT); - } - this.mFuelPower = aFuelPower; - this.mFuelType = aFuelType; - this.mOreValue = aOreValue; - this.mDensity = (M * aDensityMultiplier) / aDensityDivider; - this.mColor = aColor == null ? Dyes._NULL : aColor; - if (this.mColor != null) { - this.add(SubTag.HAS_COLOR); - } - this.mRGBa[0] = this.mMoltenRGBa[0] = (short) aR; - this.mRGBa[1] = this.mMoltenRGBa[1] = (short) aG; - this.mRGBa[2] = this.mMoltenRGBa[2] = (short) aB; - this.mRGBa[3] = this.mMoltenRGBa[3] = (short) aA; - this.mTypes = aTypes; - if ((this.mTypes & 2) != 0) { - this.add(SubTag.SMELTING_TO_FLUID); - } - } - - private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final List aAspects) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); - this.mAspects.addAll(aAspects); - } - - /** - * @param aElement The Element Enum represented by this Material - */ - private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final Element aElement, final List aAspects) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); - this.mElement = aElement; - //mElement.mLinkedMaterials.add(this); - if (aElement == Element._NULL) { - this.mChemicalFormula = "Empty"; - } else { - this.mChemicalFormula = aElement.toString(); - this.mChemicalFormula = this.mChemicalFormula.replaceAll("_", "-"); - } - this.mAspects.addAll(aAspects); - } - - private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final int aExtraData, final List aMaterialList) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aExtraData, aMaterialList, null); - } - - private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final int aExtraData, final List aMaterialList, final List aAspects) { - this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); - this.mExtraData = aExtraData; - this.mMaterialList.addAll(aMaterialList); - this.mChemicalFormula = ""; - for (final MaterialStack tMaterial : this.mMaterialList) { - this.mChemicalFormula += tMaterial.toString(); - } - this.mChemicalFormula = this.mChemicalFormula.replaceAll("_", "-"); - - int tAmountOfComponents = 0, tMeltingPoint = 0; - for (final MaterialStack tMaterial : this.mMaterialList) { - tAmountOfComponents += tMaterial.mAmount; - if (tMaterial.mMaterial.mMeltingPoint > 0) { - tMeltingPoint += tMaterial.mMaterial.mMeltingPoint * tMaterial.mAmount; - } - if (aAspects == null) { - for (final TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) { - tAspect.addToAspectList(this.mAspects); - } - } - } - - if (this.mMeltingPoint < 0) { - this.mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents); - } - - tAmountOfComponents *= aDensityMultiplier; - tAmountOfComponents /= aDensityDivider; - if (aAspects == null) { - for (final TC_AspectStack tAspect : this.mAspects) { - tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents)); - } - } else { - this.mAspects.addAll(aAspects); - } - } - - public static GT_Materials get(final String aMaterialName) { - final Object tObject = GT_Utility.getFieldContent(GT_Materials.class, aMaterialName, false, false); - if ((tObject != null) && (tObject instanceof GT_Materials)) { - return (GT_Materials) tObject; - } - return _NULL; - } - - public static GT_Materials getRealMaterial(final String aMaterialName) { - return get(aMaterialName).mMaterialInto; - } - - /** - * Called in preInit with the Config to set Values. - * - * @param aConfiguration - */ - public static void init(final GT_Config aConfiguration) { - for (final GT_Materials tMaterial : VALUES) { - final String tString = tMaterial.toString().toLowerCase(); - tMaterial.mHeatDamage = (float) aConfiguration.get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage); - if (tMaterial.mBlastFurnaceRequired) { - tMaterial.mBlastFurnaceRequired = aConfiguration.get(ConfigCategories.Materials.blastfurnacerequirements, tString, true); - } - if (tMaterial.mBlastFurnaceRequired && aConfiguration.get(ConfigCategories.Materials.blastinductionsmelter, tString, tMaterial.mBlastFurnaceTemp < 1500)){} - //GT_ModHandler.ThermalExpansion.addSmelterBlastOre(tMaterial); - //tMaterial.mHandleMaterial = (tMaterial == Desh ? tMaterial.mHandleMaterial : tMaterial == Diamond || tMaterial == Thaumium ? Wood : tMaterial.contains(SubTag.BURNING) ? Blaze : tMaterial.contains(SubTag.MAGICAL) && tMaterial.contains(SubTag.CRYSTAL) && Loader.isModLoaded(MOD_ID_TC) ? Thaumium : tMaterial.getMass() > Element.Tc.getMass() * 2 ? TungstenSteel : tMaterial.getMass() > Element.Tc.getMass() ? Steel : Wood); - } - } - - public boolean isRadioactive() { - if (this.mElement != null) { - return this.mElement.mHalfLifeSeconds >= 0; - } - for (final MaterialStack tMaterial : this.mMaterialList) { - if (tMaterial.mMaterial.isRadioactive()) { - return true; - } - } - return false; - } - - public long getProtons() { - if (this.mElement != null) { - return this.mElement.getProtons(); - } - if (this.mMaterialList.size() <= 0) { - return Element.Tc.getProtons(); - } - long rAmount = 0, tAmount = 0; - for (final MaterialStack tMaterial : this.mMaterialList) { - tAmount += tMaterial.mAmount; - rAmount += tMaterial.mAmount * tMaterial.mMaterial.getProtons(); - } - return (this.getDensity() * rAmount) / (tAmount * M); - } - - public long getNeutrons() { - if (this.mElement != null) { - return this.mElement.getNeutrons(); - } - if (this.mMaterialList.size() <= 0) { - return Element.Tc.getNeutrons(); - } - long rAmount = 0, tAmount = 0; - for (final MaterialStack tMaterial : this.mMaterialList) { - tAmount += tMaterial.mAmount; - rAmount += tMaterial.mAmount * tMaterial.mMaterial.getNeutrons(); - } - return (this.getDensity() * rAmount) / (tAmount * M); - } - - public long getMass() { - if (this.mElement != null) { - return this.mElement.getMass(); - } - if (this.mMaterialList.size() <= 0) { - return Element.Tc.getMass(); - } - long rAmount = 0, tAmount = 0; - for (final MaterialStack tMaterial : this.mMaterialList) { - tAmount += tMaterial.mAmount; - rAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass(); - } - return (this.getDensity() * rAmount) / (tAmount * M); - } - - public long getDensity() { - return this.mDensity; - } - - public String getToolTip() { - return this.getToolTip(1, false); - } - - public String getToolTip(final boolean aShowQuestionMarks) { - return this.getToolTip(1, aShowQuestionMarks); - } - - public String getToolTip(final long aMultiplier) { - return this.getToolTip(aMultiplier, false); - } - - public String getToolTip(final long aMultiplier, final boolean aShowQuestionMarks) { - if (!aShowQuestionMarks && this.mChemicalFormula.equals("?")) { - return ""; - } - if ((aMultiplier >= (M * 2)) && !this.mMaterialList.isEmpty()) { - return (((this.mElement != null) || ((this.mMaterialList.size() < 2) && (this.mMaterialList.get(0).mAmount == 1))) ? this.mChemicalFormula : "(" + this.mChemicalFormula + ")") + aMultiplier; - } - return this.mChemicalFormula; - } - - /** - * Adds an ItemStack to this Material. - */ - public GT_Materials add(final ItemStack aStack) { - if ((aStack != null) && !this.contains(aStack)) { - this.mMaterialItems.add(aStack); - } - return this; - } - - /** - * This is used to determine if any of the ItemStacks belongs to this Material. - */ - public boolean contains(final ItemStack... aStacks) { - if ((aStacks == null) || (aStacks.length <= 0)) { - return false; - } - for (final ItemStack tStack : this.mMaterialItems) { - for (final ItemStack aStack : aStacks) { - if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) { - return true; - } - } - } - return false; - } - - /** - * This is used to determine if an ItemStack belongs to this Material. - */ - public boolean remove(final ItemStack aStack) { - if (aStack == null) { - return false; - } - boolean temp = false; - for (int i = 0; i < this.mMaterialItems.size(); i++) { - if (GT_Utility.areStacksEqual(aStack, this.mMaterialItems.get(i))) { - this.mMaterialItems.remove(i--); - temp = true; - } - } - return temp; - } - - /** - * Adds a SubTag to this Material - */ - @Override - public ISubTagContainer add(final SubTag... aTags) { - if (aTags != null) { - for (final SubTag aTag : aTags) { - if ((aTag != null) && !this.contains(aTag)) { - aTag.addContainerToList(this); - this.mSubTags.add(aTag); - } - } - } - return this; - } - - /** - * If this Material has this exact SubTag - */ - @Override - public boolean contains(final SubTag aTag) { - return this.mSubTags.contains(aTag); - } - - /** - * Removes a SubTag from this Material - */ - @Override - public boolean remove(final SubTag aTag) { - return this.mSubTags.remove(aTag); - } - - /** - * Sets the Heat Damage for this Material (negative = frost) - */ - public GT_Materials setHeatDamage(final float aHeatDamage) { - this.mHeatDamage = aHeatDamage; - return this; - } - - /** - * Adds a Material to the List of Byproducts when grinding this Ore. - * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. - */ - public GT_Materials addOreByProduct(final GT_Materials aMaterial) { - if (!this.mOreByProducts.contains(aMaterial.mMaterialInto)) { - this.mOreByProducts.add(aMaterial.mMaterialInto); - } - return this; - } - - /** - * Adds multiple Materials to the List of Byproducts when grinding this Ore. - * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. - */ - public GT_Materials addOreByProducts(final GT_Materials... aMaterials) { - for (final GT_Materials tMaterial : aMaterials) { - if (tMaterial != null) { - this.addOreByProduct(tMaterial); - } - } - return this; - } - - /** - * If this Ore gives multiple drops of its Main Material. - * Lapis Ore for example gives about 6 drops. - */ - public GT_Materials setOreMultiplier(final int aOreMultiplier) { - if (aOreMultiplier > 0) { - this.mOreMultiplier = aOreMultiplier; - } - return this; - } - - /** - * If this Ore gives multiple drops of its Byproduct Material. - */ - public GT_Materials setByProductMultiplier(final int aByProductMultiplier) { - if (aByProductMultiplier > 0) { - this.mByProductMultiplier = aByProductMultiplier; - } - return this; - } - - /** - * If this Ore gives multiple drops of its Main Material. - * Lapis Ore for example gives about 6 drops. - */ - public GT_Materials setSmeltingMultiplier(final int aSmeltingMultiplier) { - if (aSmeltingMultiplier > 0) { - this.mSmeltingMultiplier = aSmeltingMultiplier; - } - return this; - } - - /** - * This Ore should be smolten directly into an Ingot of this Material instead of an Ingot of itself. - */ - public GT_Materials setDirectSmelting(final GT_Materials aMaterial) { - if (aMaterial != null) { - this.mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting; - } - return this; - } - - /** - * This Material should be the Main Material this Ore gets ground into. - * Example, Chromite giving Chrome or Tungstate giving Tungsten. - */ - public GT_Materials setOreReplacement(final GT_Materials aMaterial) { - if (aMaterial != null) { - this.mOreReplacement = aMaterial.mMaterialInto.mOreReplacement; - } - return this; - } - - /** - * This Material smelts always into an instance of aMaterial. Used for Magnets. - */ - public GT_Materials setSmeltingInto(final GT_Materials aMaterial) { - if (aMaterial != null) { - this.mSmeltInto = aMaterial.mMaterialInto.mSmeltInto; - } - return this; - } - - /** - * This Material arc smelts always into an instance of aMaterial. Used for Wrought Iron. - */ - public GT_Materials setArcSmeltingInto(final GT_Materials aMaterial) { - if (aMaterial != null) { - this.mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto; - } - return this; - } - - /** - * This Material macerates always into an instance of aMaterial. - */ - public GT_Materials setMaceratingInto(final GT_Materials aMaterial) { - if (aMaterial != null) { - this.mMacerateInto = aMaterial.mMaterialInto.mMacerateInto; - } - return this; - } - - public GT_Materials setEnchantmentForTools(final Enchantment aEnchantment, final int aEnchantmentLevel) { - this.mEnchantmentTools = aEnchantment; - this.mEnchantmentToolsLevel = (byte) aEnchantmentLevel; - return this; - } - - public GT_Materials setEnchantmentForArmors(final Enchantment aEnchantment, final int aEnchantmentLevel) { - this.mEnchantmentArmors = aEnchantment; - this.mEnchantmentArmorsLevel = (byte) aEnchantmentLevel; - return this; - } - - public FluidStack getSolid(final long aAmount) { - if (this.mSolid == null) { - return null; - } - return new GT_FluidStack(this.mSolid, (int) aAmount); - } - - public FluidStack getFluid(final long aAmount) { - if (this.mFluid == null) { - return null; - } - return new GT_FluidStack(this.mFluid, (int) aAmount); - } - - public FluidStack getGas(final long aAmount) { - if (this.mGas == null) { - return null; - } - return new GT_FluidStack(this.mGas, (int) aAmount); - } - - public FluidStack getPlasma(final long aAmount) { - if (this.mPlasma == null) { - return null; - } - return new GT_FluidStack(this.mPlasma, (int) aAmount); - } - - public FluidStack getMolten(final long aAmount) { - if (this.mStandardMoltenFluid == null) { - return null; - } - return new GT_FluidStack(this.mStandardMoltenFluid, (int) aAmount); - } - - @Override - public short[] getRGBA() { - return this.mRGBa; - } - - public static volatile int VERSION = 508; - - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java deleted file mode 100644 index 26ee2bd401..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java +++ /dev/null @@ -1,144 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; - -public class GregtechTextureSet { - public static final GregtechTextureSet - SET_NONE = new GregtechTextureSet("NONE"), SET_DULL = new GregtechTextureSet("DULL"), SET_RUBY = new GregtechTextureSet("RUBY"), SET_OPAL = new GregtechTextureSet("OPAL"), SET_LEAF = new GregtechTextureSet("LEAF"), SET_WOOD = new GregtechTextureSet("WOOD"), SET_SAND = new GregtechTextureSet("SAND"), SET_FINE = new GregtechTextureSet("FINE"), SET_FIERY = new GregtechTextureSet("FIERY"), SET_FLUID = new GregtechTextureSet("FLUID"), SET_ROUGH = new GregtechTextureSet("ROUGH"), SET_PAPER = new GregtechTextureSet("PAPER"), SET_GLASS = new GregtechTextureSet("GLASS"), SET_FLINT = new GregtechTextureSet("FLINT"), SET_LAPIS = new GregtechTextureSet("LAPIS"), SET_SHINY = new GregtechTextureSet("SHINY"), SET_SHARDS = new GregtechTextureSet("SHARDS"), SET_POWDER = new GregtechTextureSet("POWDER"), SET_QUARTZ = new GregtechTextureSet("QUARTZ"), SET_EMERALD = new GregtechTextureSet("EMERALD"), SET_DIAMOND = new GregtechTextureSet("DIAMOND"), SET_LIGNITE = new GregtechTextureSet("LIGNITE"), SET_MAGNETIC = new GregtechTextureSet("MAGNETIC"), SET_METALLIC = new GregtechTextureSet("METALLIC"), SET_NETHERSTAR = new GregtechTextureSet("NETHERSTAR"), SET_GEM_VERTICAL = new GregtechTextureSet("GEM_VERTICAL"), SET_GEM_HORIZONTAL = new GregtechTextureSet("GEM_HORIZONTAL"); - - public final IIconContainer[] mTextures = new IIconContainer[128]; - public final String mSetName; - - public GregtechTextureSet(final String aSetName) { - this.mSetName = aSetName; - this.mTextures[0] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/turbineBlade"); - this.mTextures[1] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/toolHeadSkookumChoocher"); - this.mTextures[2] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[3] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[4] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[5] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[6] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[7] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[8] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[9] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[10] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[11] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[12] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[13] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[14] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[15] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[16] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[17] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[18] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[19] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[20] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[21] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[22] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[23] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[24] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[25] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[26] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[27] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[28] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[29] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[30] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[31] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[32] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[33] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[34] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[35] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[36] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[37] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[38] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[39] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[40] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[41] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[42] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[43] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[44] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[45] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[46] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[47] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[48] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[49] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[50] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[51] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[52] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[53] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[54] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[55] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[56] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[57] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[58] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[59] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[60] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[61] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[62] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[63] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[64] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[65] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[66] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[67] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[68] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[69] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[70] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[71] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[72] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[73] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[74] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[75] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[76] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[77] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[78] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[79] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[80] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[81] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[82] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[83] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[84] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[85] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[86] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[87] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[88] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[89] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[90] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[91] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[92] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[93] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[94] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[95] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[96] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[97] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[98] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[99] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[100] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[101] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[102] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[103] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[104] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[105] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[106] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[107] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[108] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[109] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[110] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[111] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[112] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[113] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[114] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[115] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[116] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[117] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[118] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[119] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[120] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[121] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[122] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[123] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[124] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[125] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[126] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - this.mTextures[127] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java deleted file mode 100644 index 5b1a34590f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java +++ /dev/null @@ -1,203 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_IconContainer; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_Texture; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; - -public class GregtechTextures { - public enum BlockIcons implements Interface_IconContainer, Runnable { - - VOID, - - LARGECENTRIFUGE1, LARGECENTRIFUGE2, LARGECENTRIFUGE3, - LARGECENTRIFUGE4, LARGECENTRIFUGE5, LARGECENTRIFUGE6, - LARGECENTRIFUGE7, LARGECENTRIFUGE8, LARGECENTRIFUGE9, - LARGECENTRIFUGE_ACTIVE1, LARGECENTRIFUGE_ACTIVE2, LARGECENTRIFUGE_ACTIVE3, - LARGECENTRIFUGE_ACTIVE4, LARGECENTRIFUGE_ACTIVE5, LARGECENTRIFUGE_ACTIVE6, - LARGECENTRIFUGE_ACTIVE7, LARGECENTRIFUGE_ACTIVE8, LARGECENTRIFUGE_ACTIVE9; - - public static final Interface_IconContainer[] - - CENTRIFUGE = new Interface_IconContainer[]{ - LARGECENTRIFUGE1, - LARGECENTRIFUGE2, - LARGECENTRIFUGE3, - LARGECENTRIFUGE4, - LARGECENTRIFUGE5, - LARGECENTRIFUGE6, - LARGECENTRIFUGE7, - LARGECENTRIFUGE8, - LARGECENTRIFUGE9 - }, - CENTRIFUGE_ACTIVE = new Interface_IconContainer[]{ - LARGECENTRIFUGE_ACTIVE1, - LARGECENTRIFUGE_ACTIVE2, - LARGECENTRIFUGE_ACTIVE3, - LARGECENTRIFUGE_ACTIVE4, - LARGECENTRIFUGE_ACTIVE5, - LARGECENTRIFUGE_ACTIVE6, - LARGECENTRIFUGE_ACTIVE7, - LARGECENTRIFUGE_ACTIVE8, - LARGECENTRIFUGE_ACTIVE9 - }; - - public static Interface_Texture[] - GT_CASING_BLOCKS = new Interface_Texture[64]; - - protected IIcon mIcon; - - private BlockIcons() { - Meta_GT_Proxy.GT_BlockIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public void run() { - this.mIcon = Meta_GT_Proxy.sBlockIcons.registerIcon(CORE.MODID + ":" + "iconsets/" + this); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - - public static class CustomIcon implements Interface_IconContainer, Runnable { - protected IIcon mIcon; - protected String mIconName; - - public CustomIcon(final String aIconName) { - this.mIconName = aIconName; - Meta_GT_Proxy.GT_BlockIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public void run() { - this.mIcon = Meta_GT_Proxy.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - } - } - - - public enum ItemIcons implements Interface_IconContainer, Runnable { - VOID, // The Empty Texture - RENDERING_ERROR, //The Purple/Black Texture - SKOOKUMCHOOCHER, //The Skookum Tool Texture - PUMP, // The Hand Pump Texture - TURBINE_SMALL, TURBINE_LARGE, TURBINE_HUGE; - - /* public static final Interface_IconContainer[] - DURABILITY_BAR = new Interface_IconContainer[]{ - DURABILITY_BAR_0, - DURABILITY_BAR_1, - DURABILITY_BAR_2, - DURABILITY_BAR_3, - DURABILITY_BAR_4, - DURABILITY_BAR_5, - DURABILITY_BAR_6, - DURABILITY_BAR_7, - DURABILITY_BAR_8, - }, - ENERGY_BAR = new Interface_IconContainer[]{ - ENERGY_BAR_0, - ENERGY_BAR_1, - ENERGY_BAR_2, - ENERGY_BAR_3, - ENERGY_BAR_4, - ENERGY_BAR_5, - ENERGY_BAR_6, - ENERGY_BAR_7, - ENERGY_BAR_8, - };*/ - - //public static final Interface_Texture[] ERROR_RENDERING = new Interface_Texture[]{new GregtechRenderedTexture(RENDERING_ERROR)}; - - protected IIcon mIcon, mOverlay; - - private ItemIcons() { - Meta_GT_Proxy.GT_ItemIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return this.mOverlay; - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; - } - - @Override - public void run() { - this.mIcon = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + "iconsets/" + this); - this.mOverlay = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + "iconsets/" + this + "_OVERLAY"); - } - - public static class CustomIcon implements Interface_IconContainer, Runnable { - protected IIcon mIcon, mOverlay; - protected String mIconName; - - public CustomIcon(final String aIconName) { - this.mIconName = aIconName; - Meta_GT_Proxy.GT_ItemIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return this.mOverlay; - } - - @Override - public void run() { - this.mIcon = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + this.mIconName); - this.mOverlay = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + this.mIconName + "_OVERLAY"); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; - } - } - } - -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java deleted file mode 100644 index 105023065c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java +++ /dev/null @@ -1,7 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.enums; - -public enum GregtechToolDictNames { - - craftingToolSkookumChoocher, craftingToolHandPump, craftingToolAngleGrinder, craftingToolElectricSnips, craftingToolElectricLighter, craftingToolElectricButcherKnife; - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java deleted file mode 100644 index 04d8d91201..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java +++ /dev/null @@ -1,93 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_Base; - -public class CONTAINER_AdvancedBoiler - extends GT_ContainerMetaTile_Machine { - public int mWaterAmount = 0; - public int mSteamAmount = 0; - public int mProcessingEnergy = 0; - public int mTemperature = 2; - - public CONTAINER_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); - addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); - addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); - addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } - - @Override - public int getSlotCount() { - return 4; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - - int steamCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getSteamCapacity(); - int waterCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getCapacity(); - this.mTemperature = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mTemperature; - this.mProcessingEnergy = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - this.mSteamAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam.amount); - this.mWaterAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid.amount); - - this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); - this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (steamCapacity - 100))); - this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / (waterCapacity - 100))); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mTemperature); - var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); - var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); - var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100: - this.mTemperature = par2; - break; - case 101: - this.mProcessingEnergy = par2; - break; - case 102: - this.mSteamAmount = par2; - break; - case 103: - this.mWaterAmount = par2; - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java deleted file mode 100644 index 6d0eb6b14c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.InventoryPlayer; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The Container I use for all my Basic Machines - */ -public class CONTAINER_Cyclotron extends GT_ContainerMetaTile_Machine { - - public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - //this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); - } - - @Override - public int getSlotCount() { - return 0; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java deleted file mode 100644 index a4508781aa..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_Container_BasicTank; -import gregtech.api.gui.GT_Slot_Output; -import gregtech.api.gui.GT_Slot_Render; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The Container I use for all my Basic Tanks - */ -public class CONTAINER_DeluxeTank extends GT_Container_BasicTank { - - public CONTAINER_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 41, 42)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 3, 59, 42)); - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (this.mTileEntity.isClientSide() || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - if (((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) { - this.mContent = ((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount; - } else { - this.mContent = 0; - } - final Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - final ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mContent & 65535); - var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(final int par1, final int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100: - this.mContent = (this.mContent & -65536) | par2; - break; - case 101: - this.mContent = (this.mContent & 65535) | (par2 << 16); - break; - } - } - - @Override - public int getSlotCount() { - return 2; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java deleted file mode 100644 index 17226a399e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java +++ /dev/null @@ -1,51 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.slots.SlotAirFilter; -import net.minecraft.entity.player.InventoryPlayer; - - -public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine { - - public long maxEU = 0; - public long storedEU = 0; - - public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new SlotAirFilter(this.mTileEntity, 0, 80, 35)); - } - - @Override - public int getSlotCount() { - return 1; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } - - @Override - public void updateProgressBar(final int id, final int value) { - super.updateProgressBar(id, value); - switch (id) { - default: - break; - } - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java deleted file mode 100644 index df8df2f775..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The Container I use for all my Basic Machines - */ -public class CONTAINER_IndustrialCentrifuge extends GT_ContainerMetaTile_Machine { - - public CONTAINER_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); - } - - @Override - public int getSlotCount() { - return 1; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java deleted file mode 100644 index 78150aedbe..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.gui.GT_Slot_Output; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class CONTAINER_IronBlastFurnace extends GT_ContainerMetaTile_Machine { - public CONTAINER_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16)); - this.addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25)); - } - - @Override - public int getSlotCount() { - return 4; - } - - @Override - public int getShiftClickSlotCount() { - return 2; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java deleted file mode 100644 index 808eb90728..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_MassFabricator; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The Container I use for all my Basic Machines - */ -public class CONTAINER_MatterFab extends GT_ContainerMetaTile_Machine { - - public int mUUA_USED = ((GregtechMetaTileEntity_MassFabricator)this.mTileEntity.getMetaTileEntity()).getAmplifierUsed(); - public int mUUM_MADE = ((GregtechMetaTileEntity_MassFabricator)this.mTileEntity.getMetaTileEntity()).getMatterProduced(); - - public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - //addSlotToContainer(new SlotNoInput(mTileEntity, 1, 152, 5)); - } - - @Override - public int getSlotCount() { - return 0; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java deleted file mode 100644 index 6a3322ab2e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java +++ /dev/null @@ -1,244 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import gregtech.api.gui.GT_Container; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_LanguageManager; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; - -import java.util.Iterator; - -public class CONTAINER_MetaTileMachineLong extends GT_Container { - - public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mSteam = 0, mSteamStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; - private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oSteam = 0, oSteamStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0; - - public long pEnergy, pStorage; - private long nEnergy, nStorage; - - public short pIntMaxCountCurrent, pIntMaxCountMax; - private short nIntMaxCountCurrent, nIntMaxCountMax; - - public CONTAINER_MetaTileMachineLong(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - - mTileEntity = aTileEntity; - - if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { - addSlots(aInventoryPlayer); - if (doesBindPlayerInventory()) bindPlayerInventory(aInventoryPlayer); - detectAndSendChanges(); - } else { - aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; - } - } - public CONTAINER_MetaTileMachineLong(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory) { - super(aInventoryPlayer, aTileEntity); - mTileEntity = aTileEntity; - - if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { - addSlots(aInventoryPlayer); - if (doesBindPlayerInventory() && doesBindInventory) bindPlayerInventory(aInventoryPlayer); - detectAndSendChanges(); - } else { - aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; - } - } - - private Pair getPowerStored(){ - final long mStoredPower = this.pEnergy; - long mMaxInts = (mStoredPower/Integer.MAX_VALUE); - long mLeftOver = (mStoredPower % Integer.MAX_VALUE); - if (mMaxInts < 0 || mMaxInts >= /*4294967298L*/ Integer.MAX_VALUE) { - return new Pair(-1, 0); - } - if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) { - mLeftOver = 0; - } - Pair power = new Pair((int) mMaxInts, (int) mLeftOver); - return power; - } - - private Pair getMaxPowerStored(){ - final long mMaxStoredPower = this.pStorage; - long mMaxInts = (mMaxStoredPower/Integer.MAX_VALUE); - long mLeftOver = (mMaxStoredPower % Integer.MAX_VALUE); - if (mMaxInts < 0 || mMaxInts >= /*4294967298L*/ Integer.MAX_VALUE) { - return new Pair(-1, 0); - } - if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) { - mLeftOver = 0; - } - Pair power = new Pair((int) mMaxInts, (int) mLeftOver); - return power; - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; - pStorage = Math.min(Long.MAX_VALUE, mTileEntity.getEUCapacity()); - pEnergy = Math.min(Long.MAX_VALUE, mTileEntity.getStoredEU()); - mSteamStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity()); - mSteam = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam()); - mOutput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage()); - mInput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage()); - mDisplayErrorCode = mTileEntity.getErrorDisplayID(); - mProgressTime = mTileEntity.getProgress(); - mMaxProgressTime = mTileEntity.getMaxProgress(); - mActive = mTileEntity.isActive() ? 1 : 0; - mTimer++; - - Pair powerPacket = getPowerStored(); - Pair maxPowerPacket = getMaxPowerStored(); - - int mPacketsToSend = powerPacket.getKey(); - int mLeftOverPowerStored = powerPacket.getValue(); - - int mMaxStorageA = maxPowerPacket.getKey(); - int mMaxStorageB = maxPowerPacket.getValue(); - - //Someone has a VERY FULL power supply. - if (mPacketsToSend == -1) { - Logger.INFO("TOO MUCH MATH - USE BIGINTEGER - GAME BREAKING BUG MAY OCCUR"); - return; - } - - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - if (mTimer % 500 == 10 || nEnergy != pEnergy) { - var1.sendProgressBarUpdate(this, 0, mLeftOverPowerStored & 65535); - var1.sendProgressBarUpdate(this, 1, mLeftOverPowerStored >>> 16); - var1.sendProgressBarUpdate(this, 7730, mPacketsToSend); - } - if (mTimer % 500 == 10 || nStorage != pStorage) { - var1.sendProgressBarUpdate(this, 2, mMaxStorageB & 65535); - var1.sendProgressBarUpdate(this, 3, mMaxStorageB >>> 16); - var1.sendProgressBarUpdate(this, 7731, mMaxStorageA); - } - if (mTimer % 500 == 10 || oOutput != mOutput) { - var1.sendProgressBarUpdate(this, 4, mOutput); - } - if (mTimer % 500 == 10 || oInput != mInput) { - var1.sendProgressBarUpdate(this, 5, mInput); - } - if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) { - var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode); - } - if (mTimer % 500 == 10 || oProgressTime != mProgressTime) { - var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535); - var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16); - } - if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) { - var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535); - var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16); - } - if (mTimer % 500 == 10 || oID != mID) { - var1.sendProgressBarUpdate(this, 15, mID); - } - if (mTimer % 500 == 10 || oActive != mActive) { - var1.sendProgressBarUpdate(this, 16, mActive); - } - if (mTimer % 500 == 10 || oSteam != mSteam) { - var1.sendProgressBarUpdate(this, 17, mSteam & 65535); - var1.sendProgressBarUpdate(this, 18, mSteam >>> 16); - } - if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) { - var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535); - var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16); - } - } - - oID = mID; - oSteam = mSteam; - oInput = mInput; - oActive = mActive; - oOutput = mOutput; - nEnergy = pEnergy; - nStorage = pStorage; - oSteamStorage = mSteamStorage; - oProgressTime = mProgressTime; - oMaxProgressTime = mMaxProgressTime; - oDisplayErrorCode = mDisplayErrorCode; - } - - @SideOnly(Side.CLIENT) - @Override - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - /*case 7730: - pIntMaxCountCurrent = par2;*/ - case 0: - pEnergy = pEnergy & -65536 | par2; - break; - case 1: - pEnergy = pEnergy & 65535 | par2 << 16; - break; - case 2: - pStorage = pStorage & -65536 | par2; - break; - case 3: - pStorage = pStorage & 65535 | par2 << 16; - break; - case 4: - mOutput = par2; - break; - case 5: - mInput = par2; - break; - case 6: - mDisplayErrorCode = par2; - break; - case 11: - mProgressTime = mProgressTime & -65536 | par2; - break; - case 12: - mProgressTime = mProgressTime & 65535 | par2 << 16; - break; - case 13: - mMaxProgressTime = mMaxProgressTime & -65536 | par2; - break; - case 14: - mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16; - break; - case 15: - mID = par2; - break; - case 16: - mActive = par2; - break; - case 17: - mSteam = mSteam & -65536 | par2; - break; - case 18: - mSteam = mSteam & 65535 | par2 << 16; - break; - case 19: - mSteamStorage = mSteamStorage & -65536 | par2; - break; - case 20: - mSteamStorage = mSteamStorage & 65535 | par2 << 16; - break; - } - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - return mTileEntity.isUseableByPlayer(player); - } - - public String trans(String aKey, String aEnglish){ - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java deleted file mode 100644 index 88b9661c95..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java +++ /dev/null @@ -1,283 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.ICrafting; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The Container I use for all my Basic Machines - */ -public class CONTAINER_MultiMachine extends GT_ContainerMetaTile_Machine { - - public String[] mTileDescription; - private String[] oTileDescription; - - private GregtechMeta_MultiBlockBase mMCTEI; - private boolean mControllerSet = false; - - - public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - public static void setControllerInstance(CONTAINER_MultiMachine aContainer, IGregTechTileEntity aTile) { - if (aTile == null) { - return; - } - final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return; - } - if (aMetaTileEntity instanceof GregtechMeta_MultiBlockBase) { - aContainer.mMCTEI = (GregtechMeta_MultiBlockBase) aMetaTileEntity; - } - } - - public int aTotalTickTime = 0; - public int aMaxParallel = 0; - public int aPollutionTick = 0; - public int aMaxInputVoltage = 0; - public int aInputTier = 0; - public int aOutputTier = 0; - public int aRecipeDuration = 0; - public int aRecipeEU = 0; - public int aRecipeSpecial = 0; - public int aPollutionReduction = 0; - public int aStoredEnergy = 0; - public int aMaxEnergy = 0; - public int aEfficiency = 0; - - private int oTotalTickTime = 0; - private int oMaxParallel = 0; - private int oPollutionTick = 0; - private int oMaxInputVoltage = 0; - private int oInputTier = 0; - private int oOutputTier = 0; - private int oRecipeDuration = 0; - private int oRecipeEU = 0; - private int oRecipeSpecial = 0; - private int oPollutionReduction = 0; - private int oStoredEnergy = 0; - private int oMaxEnergy = 0; - private int oEfficiency = 0; - - private static Field timer; - //private static Field crafters; - - @Override - public final void detectAndSendChanges() { - super.detectAndSendChanges(); - if (this.mTileEntity.isClientSide() || this.mTileEntity.getMetaTileEntity() == null) { - return; - } - if (!mControllerSet) { - setControllerInstance(this, this.mTileEntity); - } - mControllerSet = (mMCTEI != null); - if (timer == null) { - timer = ReflectionUtils.getField(getClass(), "mTimer"); - } - if (crafters == null) { - //crafters = ReflectionUtils.getField(getClass(), "crafters"); - } - if (timer != null && crafters != null && mControllerSet) { - //Logger.INFO("Trying to update clientside GUI data"); - try { - //Logger.INFO("0"); - int aTimer = (int) ReflectionUtils.getFieldValue(timer, this); - - //List crafters1List = (List) crafters1; - List crafters2 = new ArrayList(); - //Logger.INFO("1"); - for (Object o : crafters) { - if (o instanceof ICrafting) { - crafters2.add((ICrafting) o); - } - } - //Logger.INFO("2"); - if (!crafters2.isEmpty()) { - //Logger.INFO("3"); - handleInitialFieldSetting(); - - try { - //Logger.INFO("4"); - for (final ICrafting var3 : crafters2) { - handleCraftingEvent(aTimer, var3); - } - //Logger.INFO("5"); - handleInternalFieldSetting(); - //Logger.INFO("6"); - } catch (Throwable t) { - - } - } - } catch (Throwable t) { - t.printStackTrace(); - } - } - else { - Logger.INFO("Failed."); - } - } - - public void handleInitialFieldSetting() { - this.aTotalTickTime = MathUtils.balance((int) mMCTEI.getTotalRuntimeInTicks(), Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aMaxParallel = mMCTEI.getMaxParallelRecipes(); - this.aPollutionTick = mMCTEI.getPollutionPerTick(null); - this.aMaxInputVoltage = MathUtils.balance((int) mMCTEI.getMaxInputVoltage(), Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aInputTier = MathUtils.balance((int) mMCTEI.getInputTier(), Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aOutputTier = MathUtils.balance((int) mMCTEI.getOutputTier(), Integer.MIN_VALUE, Integer.MAX_VALUE); - if (mMCTEI.mLastRecipe != null) { - GT_Recipe aRecipe = mMCTEI.mLastRecipe; - this.aRecipeDuration = MathUtils.balance(aRecipe.mDuration, Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aRecipeEU = MathUtils.balance(aRecipe.mEUt, Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aRecipeSpecial = MathUtils.balance(aRecipe.mSpecialValue, Integer.MIN_VALUE, Integer.MAX_VALUE); - } - this.aPollutionReduction = mMCTEI.getPollutionReductionForAllMufflers(); - - this.aStoredEnergy = MathUtils.balance((int) mMCTEI.getStoredEnergyInAllEnergyHatches(), Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aMaxEnergy = MathUtils.balance((int) mMCTEI.getMaxEnergyStorageOfAllEnergyHatches(), Integer.MIN_VALUE, Integer.MAX_VALUE); - this.aEfficiency = MathUtils.balance(mMCTEI.mEfficiency, Integer.MIN_VALUE, Integer.MAX_VALUE); - } - - public void handleCraftingEvent(int aTimer, ICrafting aCrafter) { - int aID = 750; - if (aTimer % 500 == 10 || this.oTotalTickTime != this.aTotalTickTime) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aTotalTickTime); - } - if (aTimer % 500 == 10 || this.oMaxParallel != this.aMaxParallel) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxParallel); - } - if (aTimer % 500 == 10 || this.oPollutionTick != this.aPollutionTick) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aPollutionTick); - } - if (aTimer % 500 == 10 || this.oMaxInputVoltage != this.aMaxInputVoltage) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxInputVoltage); - } - if (aTimer % 500 == 10 || this.oInputTier != this.aInputTier) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aInputTier); - } - if (aTimer % 500 == 10 || this.oOutputTier != this.aOutputTier) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aOutputTier); - } - if (aTimer % 500 == 10 || this.oRecipeDuration != this.aRecipeDuration) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeDuration); - } - if (aTimer % 500 == 10 || this.oRecipeEU != this.aRecipeEU) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeEU); - } - if (aTimer % 500 == 10 || this.oRecipeSpecial != this.aRecipeSpecial) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeSpecial); - } - if (aTimer % 500 == 10 || this.oPollutionReduction != this.aPollutionReduction) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aPollutionReduction); - } - if (aTimer % 500 == 10 || this.oStoredEnergy != this.aStoredEnergy) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aStoredEnergy); - } - if (aTimer % 500 == 10 || this.oMaxEnergy != this.aMaxEnergy) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxEnergy); - } - if (aTimer % 500 == 10 || this.oEfficiency != this.aEfficiency) { - aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aEfficiency); - } - } - - public void handleInternalFieldSetting() { - this.oTotalTickTime = this.aTotalTickTime; - this.oMaxParallel = this.aMaxParallel; - this.oPollutionTick = this.aPollutionTick; - this.oMaxInputVoltage = this.aMaxInputVoltage; - this.oInputTier = this.aInputTier; - this.oOutputTier = this.aOutputTier; - this.oRecipeDuration = this.aRecipeDuration; - this.oRecipeEU = this.aRecipeEU; - this.oRecipeSpecial = this.aRecipeSpecial; - this.oPollutionReduction = this.aPollutionReduction; - this.oStoredEnergy = this.aStoredEnergy; - this.oMaxEnergy = this.aMaxEnergy; - this.oEfficiency = this.aEfficiency; - } - - @SideOnly(Side.CLIENT) - @Override - public void updateProgressBar(final int par1, final int par2) { - super.updateProgressBar(par1, par2); - int shiftedSwitch = par1 - 750; - switch (shiftedSwitch) { - case 0: { - this.aTotalTickTime = par2; - break; - } - case 1: { - this.aMaxParallel = par2; - break; - } - case 2: { - this.aPollutionTick = par2; - break; - } - case 3: { - this.aMaxInputVoltage = par2; - break; - } - case 4: { - this.aInputTier = par2; - break; - } - case 5: { - this.aOutputTier = par2; - break; - } - case 6: { - this.aRecipeDuration = par2; - break; - } - case 7: { - this.aRecipeEU = par2; - break; - } - case 8: { - this.aRecipeSpecial = par2; - break; - } - case 9: { - this.aPollutionReduction = par2; - break; - } - case 10: { - this.aStoredEnergy = par2; - break; - } - case 11: { - this.aMaxEnergy = par2; - break; - } - case 12: { - this.aEfficiency = par2; - break; - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java deleted file mode 100644 index 2d63a13d60..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -public class CONTAINER_MultiMachine_NoPlayerInventory extends CONTAINER_MultiMachine { - - public CONTAINER_MultiMachine_NoPlayerInventory(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_MultiMachine_NoPlayerInventory(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - public boolean doesBindPlayerInventory() { - return false; - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) { - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java deleted file mode 100644 index 937513751b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java +++ /dev/null @@ -1,41 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_Container_MultiMachine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.slots.SlotNoInput; - -import net.minecraft.entity.player.InventoryPlayer; - -public class CONTAINER_PowerSubStation extends GT_Container_MultiMachine { - - public CONTAINER_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, - final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot((IInventory) this.mTileEntity, 1, 155, 5)); - this.addSlotToContainer(new SlotNoInput((IInventory) this.mTileEntity, 2, 155, 23)); - - for (int i = 0; i < 9; ++i) { - this.addSlotToContainer(new Slot((IInventory) aInventoryPlayer, i, 8 + i * 18, 167)); - } - - } - - public int getSlotCount() { - return 10; - } - - public int getShiftClickSlotCount() { - return 1; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java deleted file mode 100644 index 9a84ba66ab..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java +++ /dev/null @@ -1,124 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.gui.GT_Slot_Holo; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.util.player.PlayerCache; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock; - -public class CONTAINER_SafeBlock -extends GT_ContainerMetaTile_Machine { - public CONTAINER_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - //public String UUID = ((BaseMetaTileEntity)mTileEntity).getMetaTileEntity().getBaseMetaTileEntity().getOwnerName(); - public UUID ownerUUID = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).ownerUUID; - public String tempPlayer = PlayerCache.lookupPlayerByUUID(this.ownerUUID); - public boolean blockStatus = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable; - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - for (int y = 0; y < 3; y++) { - for (int x = 0; x < 9; x++) { - this.addSlotToContainer(new Slot(this.mTileEntity, x + (y * 9), 8 + (x * 18), 5 + (y * 18))); - } - } - this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1)); - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) { - final int runs = 0; - if (aSlotIndex < 27) { - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - final Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); - if (tSlot != null) { - if (this.mTileEntity.getMetaTileEntity() == null) { - return null; - } - if (aSlotIndex == 27) { - - - /*((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput); - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput) { - if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bOutput != false)) { - - Utils.LOG_INFO(String.valueOf(Sys.is64Bit())); - Utils.messagePlayer(aPlayer, "Salmon"); - } - - GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); - } else { - GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); - } - return null;*/ - - - } - if (aSlotIndex == 28) {} - /* ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free"); - } else { - GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); - } - return null; - }*/ - if (aSlotIndex == 29) /*{ - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) { - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) { - makeIndestructible(aPlayer); - } - else { - - } - } else { - makeIndestructible(aPlayer); - } - return null; - }*/ - - { - ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable); - this.blockStatus = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable; - this.ownerUUID = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).ownerUUID; - //Utils.messagePlayer(aPlayer, "Is the safe locked? "+String.valueOf(((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable).toUpperCase()); - /*if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable != false)) { - UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); - Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer); - } - else { - UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); - Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer); - }*/ - return null; - } - - - } - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public int getSlotCount() { - return 27; - } - - @Override - public int getShiftClickSlotCount() { - return 27; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java deleted file mode 100644 index a3f58836e3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java +++ /dev/null @@ -1,85 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntitySolarGenerator; - -public class CONTAINER_SolarGenerator -extends GT_ContainerMetaTile_Machine { - public int mWaterAmount = 0; - public int mSteamAmount = 0; - public int mProcessingEnergy = 0; - public int mTemperature = 2; - public CONTAINER_SolarGenerator(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - //addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); - //addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); - //addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); - //addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } - - @Override - public int getSlotCount() { - return 0; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - this.mTemperature = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mSolarCharge; - this.mProcessingEnergy = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - - this.mTemperature = Math.min(54, Math.max(0, (this.mTemperature * 54) / (((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); - this.mEnergy = (int) Math.min(Integer.MAX_VALUE, this.mTileEntity.getStoredEU()); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, (this.mProcessingEnergy * 14) / 1000)); - - final Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - final ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mTemperature); - var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); - var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); - var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(final int par1, final int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100: - this.mTemperature = par2; - break; - case 101: - this.mProcessingEnergy = par2; - break; - case 102: - this.mSteamAmount = par2; - break; - case 103: - this.mWaterAmount = par2; - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java deleted file mode 100644 index 6fcd53b139..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java +++ /dev/null @@ -1,99 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase; - -public class CONTAINER_SteamCondenser extends GT_ContainerMetaTile_Machine -{ - public CONTAINER_SteamCondenser(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) - { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) - { - this.addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); - this.addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); - this.addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } - - @Override - public int getSlotCount() - { - return 4; - } - - @Override - public int getShiftClickSlotCount() - { - return 1; - } - - public int mWaterAmount = 0; - public int mSteamAmount = 0; - public int mProcessingEnergy = 0; - public int mTemperature = 2; - public long mTickingTime = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).RI; - - @Override - public void detectAndSendChanges() - { - super.detectAndSendChanges(); - if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - int steamCapacity = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).getSteamCapacity(); - int waterCapacity = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).getCapacity(); - this.mTemperature = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mTemperature; - this.mProcessingEnergy = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - this.mSteamAmount = (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mSteam.amount); - this.mWaterAmount = (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mFluid.amount); - this.mTickingTime = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).RI; - - this.mTemperature = Math.min(54, Math.max(0, (this.mTemperature * 54) / (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); - this.mSteamAmount = Math.min(54, Math.max(0, (this.mSteamAmount * 54) / (steamCapacity - 100))); - this.mWaterAmount = Math.min(54, Math.max(0, (this.mWaterAmount * 54) / (waterCapacity - 100))); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, (this.mProcessingEnergy * 14) / 1000)); - - final Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) - { - final ICrafting var1 = (ICrafting)var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mTemperature); - var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); - var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); - var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(final int par1, final int par2) - { - super.updateProgressBar(par1, par2); - switch (par1) - { - case 100: - this.mTemperature = par2; break; - case 101: - this.mProcessingEnergy = par2; break; - case 102: - this.mSteamAmount = par2; break; - case 103: - this.mWaterAmount = par2; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java deleted file mode 100644 index dcab57c380..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java +++ /dev/null @@ -1,78 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.gui.GT_Slot_Output; -import gregtech.api.gui.GT_Slot_Render; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.slots.SlotLockedInput; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.item.ItemStack; - -public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine { - - public int mContent = 0; - private ItemStack mLockedSlotStack = null; - - public CONTAINER_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public void addSlots(InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new SlotLockedInput(this.mTileEntity, 0, 80, 17, mLockedSlotStack)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42)); - } - - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { - if (this.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_TieredChest) { - this.mContent = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemCount; - mLockedSlotStack = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemStack; - } - if (this.mTileEntity.getMetaTileEntity() instanceof GT4Entity_Shelf_Large) { - this.mContent = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemCount; - mLockedSlotStack = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemStack; - } - else { - this.mContent = 0; - } - - Iterator var2 = this.crafters.iterator(); - - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mContent & 65535); - var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); - } - } - } - - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100 : - this.mContent = this.mContent & -65536 | par2; - break; - case 101 : - this.mContent = this.mContent & 65535 | par2 << 16; - } - - } - - public int getSlotCount() { - return 2; - } - - public int getShiftClickSlotCount() { - return 1; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java deleted file mode 100644 index bf4dffb904..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java +++ /dev/null @@ -1,71 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.api.gui; - -import java.util.List; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.slots.SlotBuzzSaw; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityTreeFarm; - -public class CONTAINER_TreeFarmer extends GT_ContainerMetaTile_Machine { - - public long maxEU = 0; - public long storedEU = 0; - - public CONTAINER_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new SlotBuzzSaw(this.mTileEntity, 1, 80, 17)); - } - - @Override - public int getSlotCount() { - return 1; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } - - @Override - public void updateProgressBar(final int id, final int value) { - super.updateProgressBar(id, value); - switch (id) { - case 100: - this.maxEU = value; - return; - case 101: - this.storedEU = value; - break; - default: - break; - } - } - - @SuppressWarnings("unchecked") - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - for(final ICrafting crafting : (List)this.crafters) { - crafting.sendProgressBarUpdate(this, 100, (int) ((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).maxEUStore()); - crafting.sendProgressBarUpdate(this, 101, (int) ((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).getEUVar()); - if (((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).isCorrectMachinePart(this.mTileEntity.getStackInSlot(1))){ - this.mTileEntity.markDirty(); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java deleted file mode 100644 index d532a98030..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class GUI_AdvancedBoiler - extends GT_GUIContainerMetaTile_Machine { - public GUI_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName) { - super(new CONTAINER_AdvancedBoiler(aInventoryPlayer, aTileEntity), "miscutils:textures/gui/" + aTextureName); - } - - @Override - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString("Advanced Boiler", 8, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (this.width - this.xSize) / 2; - int y = (this.height - this.ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if (this.mContainer != null) { - int tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mSteamAmount; - if (tScale > 0) { - drawTexturedModalRect(x + 70, y + 25 + 54 - tScale, 194, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mWaterAmount; - if (tScale > 0) { - drawTexturedModalRect(x + 83, y + 25 + 54 - tScale, 204, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mTemperature; - if (tScale > 0) { - drawTexturedModalRect(x + 96, y + 25 + 54 - tScale, 214, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mProcessingEnergy; - if (tScale > 0) { - drawTexturedModalRect(x + 117, y + 44 + 14 - tScale, 177, 14 - tScale, 15, tScale + 1); - } - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java deleted file mode 100644 index 0be44fa616..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.gui.GT_Container_MultiMachine; -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.InventoryPlayer; - -public class GUI_Cyclotron extends GT_GUIContainerMetaTile_Machine -{ - public final String mNEI; - public final String mName; - - public GUI_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aNEI) { - super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), "gregtech:textures/gui/multimachines/" + "FusionComputer.png"); - this.mName = aName; - this.mNEI = aNEI; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 8, -10, 16448255); - if (this.mContainer != null) { - if ((((GT_Container_MultiMachine)this.mContainer).mDisplayErrorCode & 0x40) != 0x0) { - this.fontRendererObj.drawString("Incomplete Structure.", 10, 8, 16448255); - } - if (((GT_Container_MultiMachine)this.mContainer).mDisplayErrorCode == 0) { - if (((GT_Container_MultiMachine)this.mContainer).mActive == 0) { - this.fontRendererObj.drawString("Hit with Soft Hammer to (re-)start the Machine if it doesn't start.", -70, 170, 16448255); - } - else { - this.fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255); - } - } - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java deleted file mode 100644 index c6d8d4ef7e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.StatCollector; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class GUI_DeluxeTank extends GT_GUIContainerMetaTile_Machine { - - private final String mName; - - public GUI_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName) { - super(new CONTAINER_DeluxeTank(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "BasicTank.png"); - this.mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, (this.ySize - 96) + 2, 4210752); - this.fontRendererObj.drawString(this.mName, 8, 6, 4210752); - if (this.mContainer != null) { - this.fontRendererObj.drawString("Fuel | A | B |", 10, 20, 16448255); - //fontRendererObj.drawString(GT_Utility.parseNumberToString(((CONTAINER_DeluxeTank) mContainer).mContent), 10, 30, 16448255); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java deleted file mode 100644 index 4b998f6487..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java +++ /dev/null @@ -1,46 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.entity.player.InventoryPlayer; - -public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine { - - String mName = ""; - long maxPower = 0; - long storedPower = 0; - - public GUI_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { - super(new CONTAINER_Hatch_Muffler_Advanced(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); - this.mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 8, 8, 16448255); - /* - * ReflectionUtils.setField(this.fontRendererObj, "underlineStyle", true); - * ReflectionUtils.setField(this.fontRendererObj, "italicStyle", true); - * ReflectionUtils.setField(this.fontRendererObj, "boldStyle", true); boolean - * isBold = ReflectionUtils.getField(this.fontRendererObj, "boldStyle"); - * this.fontRendererObj.drawString("Insert Air Filters - Bold: "+isBold, 8, 18, - * 16448255); - */ - if (this.mContainer != null) { - //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; - //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; - //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java deleted file mode 100644 index 2e1f76f362..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java +++ /dev/null @@ -1,73 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.lib.CORE; - - -public class GUI_IndustrialCentrifuge extends GT_GUIContainerMetaTile_Machine { - - String mName = ""; - private short counter = 0; - - public GUI_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { - super(new CONTAINER_IndustrialCentrifuge(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); - this.mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 10, 8, 16448255); - if (this.counter >= 100){ - this.counter = 0; - } - else { - this.counter++; - } - if (this.mContainer != null) { - if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 1) != 0) { - this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); - } - if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 2) != 0) { - this.fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); - } - if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 4) != 0) { - this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); - } - if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 8) != 0) { - this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); - } - if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 32) != 0) { - this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); - } - if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 64) != 0) { - this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); - } - - if (((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode == 0) { - if (((CONTAINER_IndustrialCentrifuge) this.mContainer).mActive == 0) { - this.fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); - this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); - this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); - } else { - this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); - /*if (CORE.DEBUG){ - fontRendererObj.drawString("Debug Counter: "+counter, 10, 56, 16448255); - }*/ - } - } - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java deleted file mode 100644 index b44ad916b7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.lib.CORE; - -public class GUI_IronBlastFurnace -extends GT_GUIContainerMetaTile_Machine { - public GUI_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(new CONTAINER_IronBlastFurnace(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI+"IronBlastFurnace.png"); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString("Iron Blast Furnace", 8, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if ((this.mContainer != null) && - (this.mContainer.mProgressTime > 0)) { - this.drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, 1 + ((this.mContainer.mProgressTime * 20) / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime)))), 11); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java deleted file mode 100644 index 95bde9fd9f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.lib.CORE; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The GUI-Container I use for all my Basic Machines - *

- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class - */ -public class GUI_MatterFab extends GT_GUIContainerMetaTile_Machine { - - String mName = ""; - int uuaUsed = 0; - int uumMade = 0; - - public GUI_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { - super(new CONTAINER_MatterFab(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); - this.mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 10, 8, 16448255); - - - - if (this.mContainer != null) { - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 1) != 0) { - this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 2) != 0) { - this.fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 4) != 0) { - this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 8) != 0) { - this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 16) != 0) { - this.fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 32) != 0) { - this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); - } - if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 64) != 0) { - this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); - } - - if (((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode == 0) { - if (((CONTAINER_MatterFab) this.mContainer).mActive == 0) { - this.fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); - this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); - this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); - } else { - this.uuaUsed = ((CONTAINER_MatterFab) this.mContainer).mUUA_USED; - this.uumMade = ((CONTAINER_MatterFab) this.mContainer).mUUM_MADE; - this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); - this.fontRendererObj.drawString("UU-Amplifier Used: "+this.uuaUsed, 10, 24, 16448255); - this.fontRendererObj.drawString("UU-Matter Fabricated: "+this.uumMade, 10, 32, 16448255); - } - } - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java deleted file mode 100644 index c78e7789b8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java +++ /dev/null @@ -1,296 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The GUI-Container I use for all my Basic Machines - *

- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class - */ -public class GUI_MultiMachine extends GT_GUIContainerMetaTile_Machine { - - private final static Materials GOOD; - private final static Materials BAD; - private final String mName; - - private final static ConcurrentHashMap mToolStacks = new ConcurrentHashMap(); - - //net.minecraft.client.gui.inventory.GuiContainer.drawItemStack(ItemStack, int, int, String) - private final static Method mDrawItemStack; - - static { - GOOD = Materials.Uranium; - BAD = Materials.Plutonium; - - //net.minecraft.client.gui.inventory.GuiContainer.drawItemStack(ItemStack, int, int, String) - mDrawItemStack = ReflectionUtils.getMethod(GuiContainer.class, "drawItemStack", new Class[] {ItemStack.class, int.class, int.class, String.class}); - } - - public GUI_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { - super(new CONTAINER_MultiMachine_NoPlayerInventory(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); - this.mName = aName != null ? aName : ""; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - if (this.mContainer != null) { - drawGuiInfoTextLayer(par1, par2); - drawGuiRepairStatusLayer(par1, par2); - } - } - - - protected void drawGuiInfoTextLayer(final float par1, final int par2) { - - if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 64) != 0) { - this.fontRendererObj.drawString(mName, 6, 7, 16448255); // Move down 8px - this.fontRendererObj.drawString("Incomplete Structure.", 6, 15, 16448255); // Move down 8px - } - else { - int aTotalTickTime = ((CONTAINER_MultiMachine) this.mContainer).aTotalTickTime; - int aMaxParallel = ((CONTAINER_MultiMachine) this.mContainer).aMaxParallel; - int aPollutionTick = ((CONTAINER_MultiMachine) this.mContainer).aPollutionTick; - int aMaxInputVoltage = ((CONTAINER_MultiMachine) this.mContainer).aMaxInputVoltage; - int aInputTier = ((CONTAINER_MultiMachine) this.mContainer).aInputTier; - int aOutputTier = ((CONTAINER_MultiMachine) this.mContainer).aOutputTier; - int aRecipeDuration = ((CONTAINER_MultiMachine) this.mContainer).aRecipeDuration; - int aRecipeEU = ((CONTAINER_MultiMachine) this.mContainer).aRecipeEU; - int aRecipeSpecial = ((CONTAINER_MultiMachine) this.mContainer).aRecipeSpecial; - int aEfficiency = ((CONTAINER_MultiMachine) this.mContainer).aEfficiency; - - int aPollutionReduction = ((CONTAINER_MultiMachine) this.mContainer).aPollutionReduction; - - - long aStoredEnergy = ((CONTAINER_MultiMachine) this.mContainer).aStoredEnergy; - long aMaxEnergy = ((CONTAINER_MultiMachine) this.mContainer).aMaxEnergy; - - /* - * Logic Block - */ - - long seconds = (aTotalTickTime/20); - int weeks = (int) (TimeUnit.SECONDS.toDays(seconds) / 7); - int days = (int) (TimeUnit.SECONDS.toDays(seconds) - 7 * weeks); - long hours = TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days) - TimeUnit.DAYS.toHours(7*weeks); - long minutes = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60); - long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) *60); - - ArrayList mInfo = new ArrayList(); - - String EU = StatCollector.translateToLocal("GTPP.info.eu"); - - //GTPP.machines.tier - - mInfo.add(mName); - - if (aInputTier > 0) { - mInfo.add(StatCollector.translateToLocal("GTPP.machines.input")+" "+StatCollector.translateToLocal("GTPP.machines.tier")+": "+ EnumChatFormatting.GREEN +GT_Values.VOLTAGE_NAMES[aInputTier]); - } - if (aOutputTier > 0) { - mInfo.add(StatCollector.translateToLocal("GTPP.machines.output")+" "+StatCollector.translateToLocal("GTPP.machines.tier")+": "+ EnumChatFormatting.GREEN +GT_Values.VOLTAGE_NAMES[aOutputTier]); - } - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.progress")+": "+ - EnumChatFormatting.GREEN + Integer.toString(((CONTAINER_MultiMachine) this.mContainer).mProgressTime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(((CONTAINER_MultiMachine) this.mContainer).mMaxProgressTime/20) + EnumChatFormatting.RESET +" s"); - - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.energy")+": "+ - EnumChatFormatting.GREEN + Long.toString(aStoredEnergy) + EnumChatFormatting.RESET +" "+EU+" / "+ - EnumChatFormatting.YELLOW + Long.toString(aMaxEnergy) + EnumChatFormatting.RESET +" "+EU+""); - - if (aRecipeEU != 0 && aRecipeDuration > 0) { - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage")+": "+ - EnumChatFormatting.RED + Integer.toString(-aRecipeEU) + EnumChatFormatting.RESET + " "+EU+"/t"); - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.duration")+": "+ - EnumChatFormatting.RED + Integer.toString(aRecipeDuration) + EnumChatFormatting.RESET + " ticks"); - if (aRecipeSpecial > 0) { - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.specialvalue")+": "+ - EnumChatFormatting.RED + Integer.toString(aRecipeEU) + EnumChatFormatting.RESET + ""); - } - } - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.mei")+": "+ - EnumChatFormatting.YELLOW+Long.toString(aMaxInputVoltage)+EnumChatFormatting.RESET+ " "+EU+"/t"+EnumChatFormatting.RESET); - - mInfo.add(StatCollector.translateToLocal(StatCollector.translateToLocal("GTPP.machines.tier")+": "+ - EnumChatFormatting.YELLOW+GT_Values.VN[GT_Utility.getTier(aMaxInputVoltage)]+ EnumChatFormatting.RESET)); - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.efficiency")+": "+ EnumChatFormatting.YELLOW+Float.toString(aEfficiency / 100.0F)+EnumChatFormatting.RESET + " %"); - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollution")+": "+ EnumChatFormatting.RED + (aPollutionTick*20)+ EnumChatFormatting.RESET+"/sec"); - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced")+": "+ EnumChatFormatting.GREEN + aPollutionReduction + EnumChatFormatting.RESET+" %"); - - mInfo.add(StatCollector.translateToLocal("GTPP.CC.parallel")+": "+EnumChatFormatting.GREEN+(aMaxParallel)+EnumChatFormatting.RESET); - - mInfo.add("Total Time Since Built: "); - mInfo.add("" + EnumChatFormatting.DARK_GREEN + Integer.toString(weeks)+EnumChatFormatting.RESET+" Weeks,"); - mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Integer.toString(days) +EnumChatFormatting.RESET+ " Days,"); - mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Long.toString(hours) +EnumChatFormatting.RESET+ " Hours,"); - mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Long.toString(minutes) +EnumChatFormatting.RESET+ " Minutes,"); - mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Long.toString(second) +EnumChatFormatting.RESET+ " Seconds"); - - - - // Machine Name - //fontRendererObj.drawString(this.mName, 6, 7, 16448255); - - for (int i=0;i 177) { - this.fontRendererObj.drawString(this.trans("144", "Missing Turbine Rotor"), 10, - ((GT_Container_MultiMachine) this.mContainer).mActive == 0 ? 40 : 24, 16448255); - } - } - } - } - - } - - public String trans(String aKey, String aEnglish) { - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); - } - - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (this.width - this.xSize) / 2; - int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java deleted file mode 100644 index 65ba8610dd..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java +++ /dev/null @@ -1,175 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.IIcon; - -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; - -public class GUI_PowerSubStation extends GT_GUIContainerMetaTile_Machine { - public String mNEI; - String mName; - boolean[] mRepairStatus = new boolean[6]; - private static IIcon[] mGregToolIcons = new IIcon[6]; - - public GUI_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aNEI) { - super(new CONTAINER_PowerSubStation(aInventoryPlayer, aTileEntity, false), CORE.RES_PATH_GUI + "PowerSubStation.png"); - this.mName = aName; - this.mNEI = aNEI; - /** The X size of the inventory window in pixels. */ - this.xSize = 196; - /** The Y size of the inventory window in pixels. */ - this.ySize = 191; - for (IIcon g : mGregToolIcons) { - if (g == null) { - getToolTextures(); - } - } - } - - private static final boolean getToolTextures() { - mGregToolIcons[0] = Textures.ItemIcons.WRENCH.getIcon(); - mGregToolIcons[1] = Textures.ItemIcons.HANDLE_SCREWDRIVER.getIcon(); - mGregToolIcons[2] = Textures.ItemIcons.MORTAR.getIcon(); - mGregToolIcons[3] = Textures.ItemIcons.JACKHAMMER.getIcon(); - mGregToolIcons[4] = Textures.ItemIcons.HANDLE_SOLDERING.getIcon(); - mGregToolIcons[5] = Textures.ItemIcons.CROWBAR.getIcon(); - return true; - } - - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 8, -10, 16448255); - if (this.mContainer != null) { - - this.fontRendererObj.drawString("Error Code: "+((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode, 10, 142, 16448255); - - this.fontRendererObj.drawString("In", 178, 10, 16448255); - this.fontRendererObj.drawString("Out", 176, 28, 16448255); - - if (((this.mContainer).mDisplayErrorCode & 1) != 0) { - this.fontRendererObj.drawString("Pipe is loose.", 10, 8, 16448255); - mRepairStatus[0] = false; - } - else { - mRepairStatus[0] = true; - } - if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 2) != 0) { - this.fontRendererObj.drawString("Screws are missing.", 10, 16, 16448255); - mRepairStatus[1] = false; - } - else { - mRepairStatus[1] = true; - } - if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 4) != 0) { - this.fontRendererObj.drawString("Something is stuck.", 10, 24, 16448255); - mRepairStatus[2] = false; - } - else { - mRepairStatus[2] = true; - } - if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 8) != 0) { - this.fontRendererObj.drawString("Platings are dented.", 10, 32, 16448255); - mRepairStatus[3] = false; - } - else { - mRepairStatus[3] = true; - } - if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 16) != 0) { - this.fontRendererObj.drawString("Circuitry burned out.", 10, 40, 16448255); - mRepairStatus[4] = false; - } - else { - mRepairStatus[4] = true; - } - if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 32) != 0) { - this.fontRendererObj.drawString("That doesn't belong there.", 10, 48, 16448255); - mRepairStatus[5] = false; - } - else { - mRepairStatus[5] = true; - } - if (((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode == 0) { - if (((CONTAINER_PowerSubStation) this.mContainer).mActive == 0) { - this.fontRendererObj.drawString( - "Hit with Soft Hammer to (re-)start the Machine if it doesn't start.", -70, 8, 16448255); - } else { - this.fontRendererObj.drawString("Running perfectly.", 10, 8, 16448255); - } - } - if (this.mContainer.mEnergy > 160000000 && this.mContainer.mEnergy < 160010000) { - this.fontRendererObj.drawString("160,000,000 EU", 50, 155, 16711680); - } else if (this.mContainer.mEnergy > 320000000 && this.mContainer.mEnergy < 320010000) { - this.fontRendererObj.drawString("320,000,000 EU", 50, 155, 16711680); - } else if (this.mContainer.mEnergy > 640000000 && this.mContainer.mEnergy < 640010000) { - this.fontRendererObj.drawString("640,000,000 EU", 50, 155, 16711680); - } else { - this.fontRendererObj.drawString(GT_Utility.formatNumbers((long) this.mContainer.mEnergy) + " EU", - 50, 155, 16711680); - } - } - } - - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - /** The X size of the inventory window in pixels. */ - if (this.xSize != 196) - this.xSize = 196; - /** The Y size of the inventory window in pixels. */ - if (this.ySize != 191) - this.ySize = 191; - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if (this.mContainer != null) { - final double tScale = this.mContainer.mEnergy / this.mContainer.mStorage; - this.drawTexturedModalRect(x + 5, y + 156, 0, 251, Math.min(147, (int) (tScale * 148.0)), 5); - - - //A1 - this.drawTexturedModalRect(x + 154, y + 76, 238, (!mRepairStatus[0] ? 0 : 18), 18, 18); - //A2 - this.drawTexturedModalRect(x + 154 + 20, y + 76, 238, (!mRepairStatus[1] ? 0 : 18), 18, 18); - //B1 - this.drawTexturedModalRect(x + 154, y + 76 + 18, 238, (!mRepairStatus[2] ? 0 : 18), 18, 18); - //B2 - this.drawTexturedModalRect(x + 154 + 20, y + 76 + 18, 238, (!mRepairStatus[3] ? 0 : 18), 18, 18); - //C1 - this.drawTexturedModalRect(x + 154, y + 76 + 36, 238, (!mRepairStatus[4] ? 0 : 18), 18, 18); - //C2 - this.drawTexturedModalRect(x + 154 + 20, y + 76 + 36, 238, (!mRepairStatus[5] ? 0 : 18), 18, 18); - - - if (mGregToolIcons[0] != null) { - //this.drawTexturedModelRectFromIcon(x + 154, y + 76, mGregToolIcons[0], 18, 18); - } - if (mGregToolIcons[1] != null) { - //this.drawTexturedModelRectFromIcon(x + 154 + 20, y + 76, mGregToolIcons[1], 18, 18); - } - if (mGregToolIcons[2] != null) { - //this.drawTexturedModelRectFromIcon(x + 154, y + 76 + 18, mGregToolIcons[2], 9, 9); - } - if (mGregToolIcons[3] != null) { - //this.drawTexturedModelRectFromIcon(x + 154 + 20, y + 76 + 18, mGregToolIcons[3], 9, 9); - } - if (mGregToolIcons[4] != null) { - //this.drawTexturedModelRectFromIcon(x + 154, y + 76 + 36, mGregToolIcons[4], 9, 9); - } - if (mGregToolIcons[5] != null) { - //this.drawTexturedModelRectFromIcon(x + 154 + 20, y + 76 + 36, mGregToolIcons[5], 9, 9); - } - - /*//Maint Done - this.drawTexturedModalRect(x + 154, y + 76, 238, 0, 18, 18); - //Maint Required - this.drawTexturedModalRect(x + 154 + 20, y + 76, 238, 18, 18, 18);*/ - - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java deleted file mode 100644 index c18d58b4b6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java +++ /dev/null @@ -1,51 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.lib.CORE; - -public class GUI_SafeBlock -extends GT_GUIContainerMetaTile_Machine { - public GUI_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(new CONTAINER_SafeBlock(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "SafeBlock.png"); - } - - //String UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID.toString(); - boolean blockStatus = ((CONTAINER_SafeBlock)this.mContainer).blockStatus; - //String tempPlayer; - - private void updateVars(){ - //UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID; - this.blockStatus = ((CONTAINER_SafeBlock)this.mContainer).blockStatus; - // tempPlayer = PlayerCache.lookupPlayerByUUID(UUID); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) - { - this.updateVars(); - //this.fontRendererObj.drawString("Owner: "+ tempPlayer, 64, 72, 4210752); - //this.fontRendererObj.drawString(": "+ UUID.toLowerCase(), 44, 82, 4210752); - this.fontRendererObj.drawString("Safe Status", 76, 61, 4210752); - if (this.blockStatus){ - this.fontRendererObj.drawString("Locked", 88, 73, 4210752); - } - else { - this.fontRendererObj.drawString("Unlocked", 82, 73, 4210752); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - /*String UUID = ((CONTAINER_SafeBlock)this.mContainer).UUID; - this.fontRendererObj.drawString("Owner UUID: "+ UUID, 8, 12, 4210752);*/ - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java deleted file mode 100644 index f0b3a0c879..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class GUI_SolarGenerator -extends GT_GUIContainerMetaTile_Machine { - public GUI_SolarGenerator(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aTextureName) { - super(new CONTAINER_SolarGenerator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aTextureName); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString("Solar Generator", 8, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if (this.mContainer != null) { - int tScale = ((CONTAINER_SolarGenerator) this.mContainer).mProcessingEnergy; - if (tScale > 0) { - this.drawTexturedModalRect(x + 70, (y + 25 + 54) - tScale, 194, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_SolarGenerator) this.mContainer).mEnergy; - if (tScale > 0) { - this.drawTexturedModalRect(x + 83, (y + 25 + 54) - tScale, 204, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_SolarGenerator) this.mContainer).mTemperature; - if (tScale > 0) { - this.drawTexturedModalRect(x + 96, (y + 25 + 54) - tScale, 214, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_SolarGenerator) this.mContainer).mProcessingEnergy; - if (tScale > 0) { - this.drawTexturedModalRect(x + 117, (y + 44 + 14) - tScale, 177, 14 - tScale, 15, tScale + 1); - } - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java deleted file mode 100644 index 88a3e00bb5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.preloader.CORE_Preloader; -import net.minecraft.entity.player.InventoryPlayer; - -public class GUI_SteamCondenser extends GT_GUIContainerMetaTile_Machine -{ - long tickTime = 0; - - public GUI_SteamCondenser(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aTextureName) - { - super(new CONTAINER_SteamCondenser(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + aTextureName); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) - { - this.fontRendererObj.drawString("Condenser", 8, 4, 4210752); - if (CORE_Preloader.DEBUG_MODE){ - this.tickTime = ((CONTAINER_SteamCondenser)this.mContainer).mTickingTime; - this.fontRendererObj.drawString("Tick Time: "+this.tickTime, 8, 12, 4210752); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) - { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if (this.mContainer != null) - { - - int tScale = ((CONTAINER_SteamCondenser)this.mContainer).mSteamAmount; - if (tScale > 0) { - this.drawTexturedModalRect(x + 70, (y + 25 + 54) - tScale, 194, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_SteamCondenser)this.mContainer).mWaterAmount; - if (tScale > 0) { - this.drawTexturedModalRect(x + 83, (y + 25 + 54) - tScale, 204, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_SteamCondenser)this.mContainer).mTemperature; - if (tScale > 0) { - this.drawTexturedModalRect(x + 96, (y + 25 + 54) - tScale, 214, 54 - tScale, 10, tScale); - } - tScale = ((CONTAINER_SteamCondenser)this.mContainer).mProcessingEnergy; - if (tScale > 0) { - this.drawTexturedModalRect(x + 115, y + 44 + 2/* - tScale*/, 177, 14 - tScale, 15, 1+tScale); - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java deleted file mode 100644 index d324c50dd0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java +++ /dev/null @@ -1,38 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.StatCollector; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; - -public class GUI_SuperChest extends GT_GUIContainerMetaTile_Machine { - private final String mName; - - public GUI_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, - String aName) { - super(new CONTAINER_SuperChest(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png"); - this.mName = aName; - } - - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, - 4210752); - this.fontRendererObj.drawString(this.mName, 8, 6, 4210752); - if (this.mContainer != null) { - this.fontRendererObj.drawString("Item Amount", 10, 20, 16448255); - this.fontRendererObj.drawString( - GT_Utility.parseNumberToString(((CONTAINER_SuperChest) this.mContainer).mContent), 10, 30, - 16448255); - } - - } - - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (this.width - this.xSize) / 2; - int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java deleted file mode 100644 index b236b0ff32..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java +++ /dev/null @@ -1,46 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.api.gui; - - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.lib.CORE; - -public class GUI_TreeFarmer extends GT_GUIContainerMetaTile_Machine { - - String mName = ""; - long maxPower = 0; - long storedPower = 0; - - public GUI_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { - super(new CONTAINER_TreeFarmer(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); - this.mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 64, 6, 16448255); - if (this.mContainer != null) { - this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; - this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; - if (((CONTAINER_TreeFarmer) this.mContainer).mDisplayErrorCode == 0) { - this.fontRendererObj.drawString("Current Power: "+this.storedPower+"EU", 8, 52, 16448255); - this.fontRendererObj.drawString("Max Power: "+this.maxPower+"EU", 8, 60, 16448255); - this.fontRendererObj.drawString("Current operations left: "+(this.storedPower/32), 8, 68, 16448255); - } - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; - this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java deleted file mode 100644 index 79d1033bd0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java +++ /dev/null @@ -1,105 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.basic; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.gui.*; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.slots.SlotPollutionScrubber; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * The Container I use for all my Basic Machines - */ -public class CONTAINER_PollutionCleaner extends GT_Container_BasicTank { - - public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false; - public int mReduction = 0; - - public CONTAINER_PollutionCleaner(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - - int tStartIndex = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).getInputSlot(); - int aTier = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mTier; - - - //Add 2 Item Slots - addSlotToContainer(new SlotPollutionScrubber(0, aTier, mTileEntity, tStartIndex++, 53, 25)); - addSlotToContainer(new SlotPollutionScrubber(1, aTier, mTileEntity, tStartIndex++, 107, 25)); - // Upgrade Slot - addSlotToContainer(new SlotPollutionScrubber(2, aTier, mTileEntity, tStartIndex++, 125, 63)); - - } - - @Override - public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - Logger.INFO("Clicked on slot "+aSlotIndex); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; - - mReduction = ((GregtechMetaAtmosphericReconditioner) mTileEntity.getMetaTileEntity()).mPollutionReduction; - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 105, mReduction); - } - } - - @Override - public void addCraftingToCrafters(ICrafting par1ICrafting) { - super.addCraftingToCrafters(par1ICrafting); - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 105: - mReduction = (par2); - break; - } - } - - @Override - public int getSlotStartIndex() { - return 0; - } - - @Override - public int getShiftClickStartIndex() { - return 0; - } - - @Override - public int getSlotCount() { - return getShiftClickSlotCount(); - } - - @Override - public int getShiftClickSlotCount() { - return 3; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java deleted file mode 100644 index 7a9417eeb6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java +++ /dev/null @@ -1,65 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.basic; - -import java.util.ArrayList; -import java.util.List; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.entity.player.InventoryPlayer; - -public class GUI_PollutionCleaner extends GT_GUIContainerMetaTile_Machine { - public final String mName; - public final String mNEI; - public final byte mProgressBarDirection; - public final byte mProgressBarAmount; - public int mReduction; - - public GUI_PollutionCleaner(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, - final String aName, final String aTextureFile) { - this(aInventoryPlayer, aTileEntity, aName, aTextureFile, "PollutionCleaner",(byte) 0, (byte) 1); - } - - public GUI_PollutionCleaner(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, - final String aName, final String aTextureFile, final String aNEI, final byte aProgressBarDirection, - final byte aProgressBarAmount) { - super(new CONTAINER_PollutionCleaner(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "PollutionCleaner.png"); - this.mProgressBarDirection = aProgressBarDirection; - this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); - this.mName = aName; - this.mNEI = aNEI; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { - this.fontRendererObj.drawString(this.mName, 8, 4, 4210752); - this.drawTooltip(par1, par2); - } - - private void drawTooltip(final int x2, final int y2) { - final int xStart = (this.width - this.xSize) / 2; - final int yStart = (this.height - this.ySize) / 2; - final int x3 = x2 - xStart; - final int y3 = y2 - yStart + 5; - final List list = new ArrayList(); - if (y3 >= 67 && y3 <= 84) { - if (x3 >= 77 && x3 <= 95) { - //Do Dumb shit - CONTAINER_PollutionCleaner aContainerCast = (CONTAINER_PollutionCleaner) this.mContainer; - mReduction = aContainerCast.mReduction; - list.add("Reduction: "+mReduction); - } - } - if (!list.isEmpty()) { - this.drawHoveringText(list, x3, y3, this.fontRendererObj); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java deleted file mode 100644 index cdca065e60..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java +++ /dev/null @@ -1,184 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.fluidreactor; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_Container_BasicMachine; -import gregtech.api.gui.GT_Slot_Render; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.slots.SlotChemicalPlantInput; -import gtPlusPlus.core.slots.SlotNoInput; -import gtPlusPlus.core.slots.SlotNoInputLogging; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ChemicalReactor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.item.ItemStack; - -public class Container_FluidReactor extends GT_Container_BasicMachine { - - public boolean mFluidTransfer_1 = false; - public boolean mFluidTransfer_2 = false; - public boolean oFluidTransfer_1 = false; - public boolean oFluidTransfer_2 = false; - - public Container_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - - // Gui Buttons - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 0, 8, 63)); // Fluid 1 - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 1, 44, 63)); - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 2, 26, 63)); // Fluid 2 - - int tStartIndex = 3; - // Input Slots - this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 8, 7)); - this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 26, 7)); - this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 44, 7)); - this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 62, 7)); - - // Output Slots - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 107, 16)); - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 125, 16)); - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 107, 34)); - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 125, 34)); - - // Cell Collector Slot - this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 116, 63)); - - - // Inputs Fluids - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 8, 42)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 26, 42)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 44, 42)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 62, 42)); - - // Output Fluids - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 143, 16)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 143, 34)); - - - - - } - - public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - if (aSlotIndex == 0 || aSlotIndex == 2) { - if (this.mTileEntity != null && this.mTileEntity.isServerSide()) { - try { - final IMetaTileEntity aMetaTileEntity = this.mTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return null; - } - if (aMetaTileEntity instanceof GregtechMetaTileEntity_ChemicalReactor) { - //Set Tile - if (aSlotIndex == 0) { - ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_1 = !((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_1; - } - else if (aSlotIndex == 2) { - ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_2 = !((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_2; - } - return null; - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - } - //Logger.INFO("Clicked slot "+aSlotIndex); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (this.mTileEntity != null && this.mTileEntity.isServerSide()) { - try { - Iterator var2 = this.crafters.iterator(); - final IMetaTileEntity aMetaTileEntity = this.mTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - Logger.INFO("bad"); - return; - } - if (aMetaTileEntity instanceof GregtechMetaTileEntity_ChemicalReactor) { - //Read from Tile - this.mFluidTransfer_1 = ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_1; - this.mFluidTransfer_2 = ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_2; - int mTimer; - mTimer = (int) ReflectionUtils.getField(this.getClass(), "mTimer").get(this); - while (true) { - ICrafting var1; - do { - if (!var2.hasNext()) { - this.oFluidTransfer_1 = this.mFluidTransfer_1; - this.oFluidTransfer_2 = this.mFluidTransfer_2; - return; - } - var1 = (ICrafting) var2.next(); - if (mTimer % 500 == 10 || this.oFluidTransfer_1 != this.mFluidTransfer_1) { - var1.sendProgressBarUpdate(this, -50, this.mFluidTransfer_1 ? 1 : 0); - } - if (mTimer % 500 == 10 || this.oFluidTransfer_2 != this.mFluidTransfer_2) { - var1.sendProgressBarUpdate(this, -51, this.mFluidTransfer_2 ? 1 : 0); - } - } while (mTimer % 500 != 10); - } - } - else { - Logger.INFO("bad cast"); - } - } - catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - } - } - - } - - public void addCraftingToCrafters(ICrafting par1ICrafting) { - super.addCraftingToCrafters(par1ICrafting); - } - - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - if (par1 > 0) { - super.updateProgressBar(par1, par2); - } - else { - switch (par1) { - case -50 : - this.mFluidTransfer_1 = par2 != 0; - break; - case -51 : - this.mFluidTransfer_2 = par2 != 0; - break; - default : - break; - } - } - } - - public int getSlotStartIndex() { - return 3; - } - - public int getShiftClickStartIndex() { - return 3; - } - - public int getSlotCount() { - return this.getShiftClickSlotCount() + 5 + 2; - } - - public int getShiftClickSlotCount() { - return 4; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java deleted file mode 100644 index 1be79b40cc..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java +++ /dev/null @@ -1,122 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.fluidreactor; - -import gregtech.api.gui.GT_Container_BasicMachine; -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.lib.CORE; - -import java.util.ArrayList; -import java.util.List; -import net.minecraft.entity.player.InventoryPlayer; - -public class GUI_FluidReactor extends GT_GUIContainerMetaTile_Machine { - public final String mName; - public final String mNEI; - public final byte mProgressBarDirection; - public final byte mProgressBarAmount; - - public GUI_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile, String aNEI) { - this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte) 0, (byte) 1); - } - - public GUI_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, - String aTextureFile, String aNEI, byte aProgressBarDirection, byte aProgressBarAmount) { - super(new Container_FluidReactor(aInventoryPlayer, aTileEntity), CORE.MODID+":textures/gui/FluidReactor.png"); - this.mProgressBarDirection = aProgressBarDirection; - this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); - this.mName = aName; - this.mNEI = aNEI; - } - - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(this.mName, 82, 5, 4210752); - this.drawTooltip(par1, par2); - } - - private void drawTooltip(int x2, int y2) { - int xStart = (this.width - this.xSize) / 2; - int yStart = (this.height - this.ySize) / 2; - int x = x2 - xStart; - int y = y2 - yStart + 5; - List list = new ArrayList(); - if (y >= 67 && y <= 84) { - if (x >= 7 && x <= 24) { - list.add("Fluid 1 Auto-Output"); - } - if (x >= 25 && x <= 42) { - list.add("Fluid 2 Auto-Output"); - } - if (x >= 43 && x <= 61) { - list.add("Item Auto-Output"); - } - } - - if (!list.isEmpty()) { - this.drawHoveringText(list, x, y, this.fontRendererObj); - } - - } - - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (this.width - this.xSize) / 2; - int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - if (this.mContainer != null) { - if (((Container_FluidReactor) this.mContainer).mFluidTransfer_1) { - this.drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); - } - if (((Container_FluidReactor) this.mContainer).mFluidTransfer_2) { - this.drawTexturedModalRect(x + 25, y + 62, 194, 18, 18, 18); - } - if (((GT_Container_BasicMachine) this.mContainer).mItemTransfer) { - this.drawTexturedModalRect(x + 43, y + 62, 176, 36, 18, 18); - } - - if (((GT_Container_BasicMachine) this.mContainer).mStuttering) { - this.drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18); - } - - if (this.mContainer.mMaxProgressTime > 0) { - int tSize = this.mProgressBarDirection < 2 ? 20 : 18; - int tProgress = Math - .max(1, Math - .min(tSize * this.mProgressBarAmount, - (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime - * tSize * this.mProgressBarAmount / this.mContainer.mMaxProgressTime)) - % (tSize + 1); - switch (this.mProgressBarDirection) { - case 0 : - this.drawTexturedModalRect(x + 82, y + 24, 176, 0, tProgress, 18); - break; - case 1 : - this.drawTexturedModalRect(x + 82 + 20 - tProgress, y + 24, 196 - tProgress, 0, tProgress, 18); - break; - case 2 : - this.drawTexturedModalRect(x + 82, y + 24, 176, 0, 20, tProgress); - break; - case 3 : - this.drawTexturedModalRect(x + 82, y + 24 + 18 - tProgress, 176, 18 - tProgress, 20, tProgress); - break; - case 4 : - tProgress = 20 - tProgress; - this.drawTexturedModalRect(x + 82, y + 24, 176, 0, tProgress, 18); - break; - case 5 : - tProgress = 20 - tProgress; - this.drawTexturedModalRect(x + 82 + 20 - tProgress, y + 24, 196 - tProgress, 0, tProgress, 18); - break; - case 6 : - tProgress = 18 - tProgress; - this.drawTexturedModalRect(x + 82, y + 24, 176, 0, 20, tProgress); - break; - case 7 : - tProgress = 18 - tProgress; - this.drawTexturedModalRect(x + 82, y + 24 + 18 - tProgress, 176, 18 - tProgress, 20, tProgress); - } - } - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java deleted file mode 100644 index e6203823b6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import gregtech.api.gui.GT_Container_1by1; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class CONTAINER_1by1_Turbine extends GT_Container_1by1 { - - public CONTAINER_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new SlotTurbine(mTileEntity, 0, 80, 35)); - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } - - @Override - public boolean canDragIntoSlot(Slot par1Slot) { - return false; - } - - public class SlotTurbine extends Slot { - public SlotTurbine(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - } - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) { - if (itemstack.getItemDamage() >= 170 && itemstack.getItemDamage() <= 176) { - return true; - } - } - return false; - } - @Override - public int getSlotStackLimit() { - return 1; - } - @Override - public boolean canTakeStack(EntityPlayer p_82869_1_) { - return false; - } - @Override - public void putStack(ItemStack p_75215_1_) { - // TODO Auto-generated method stub - super.putStack(p_75215_1_); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java deleted file mode 100644 index 1d396811c1..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class CONTAINER_2by2 extends GT_ContainerMetaTile_Machine { - - public CONTAINER_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 0, 71, 26)); - addSlotToContainer(new Slot(mTileEntity, 1, 89, 26)); - addSlotToContainer(new Slot(mTileEntity, 2, 71, 44)); - addSlotToContainer(new Slot(mTileEntity, 3, 89, 44)); - } - - @Override - public int getSlotCount() { - return 4; - } - - @Override - public int getShiftClickSlotCount() { - return 4; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java deleted file mode 100644 index 8efe60a06e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java +++ /dev/null @@ -1,44 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class CONTAINER_4by4 extends GT_ContainerMetaTile_Machine { - - public CONTAINER_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 0, 53, 8)); - addSlotToContainer(new Slot(mTileEntity, 1, 71, 8)); - addSlotToContainer(new Slot(mTileEntity, 2, 89, 8)); - addSlotToContainer(new Slot(mTileEntity, 3, 107, 8)); - addSlotToContainer(new Slot(mTileEntity, 4, 53, 26)); - addSlotToContainer(new Slot(mTileEntity, 5, 71, 26)); - addSlotToContainer(new Slot(mTileEntity, 6, 89, 26)); - addSlotToContainer(new Slot(mTileEntity, 7, 107, 26)); - addSlotToContainer(new Slot(mTileEntity, 8, 53, 44)); - addSlotToContainer(new Slot(mTileEntity, 9, 71, 44)); - addSlotToContainer(new Slot(mTileEntity, 10, 89, 44)); - addSlotToContainer(new Slot(mTileEntity, 11, 107, 44)); - addSlotToContainer(new Slot(mTileEntity, 12, 53, 62)); - addSlotToContainer(new Slot(mTileEntity, 13, 71, 62)); - addSlotToContainer(new Slot(mTileEntity, 14, 89, 62)); - addSlotToContainer(new Slot(mTileEntity, 15, 107, 62)); - } - - @Override - public int getSlotCount() { - return 16; - } - - @Override - public int getShiftClickSlotCount() { - return 16; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java deleted file mode 100644 index 9596d41387..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java +++ /dev/null @@ -1,282 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_Container; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_LanguageManager; -import gtPlusPlus.core.slots.SlotNoInput; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class CONTAINER_HatchNbtConsumable extends GT_Container { - - public final int mInputslotCount; - private final int mTotalSlotCount; - - public CONTAINER_HatchNbtConsumable(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aInputslotCount) { - super(aInventoryPlayer, aTileEntity); - mInputslotCount = aInputslotCount; - mTotalSlotCount = aInputslotCount*2; - mTileEntity = aTileEntity; - if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { - addSlots(aInventoryPlayer); - if (doesBindPlayerInventory()) { - bindPlayerInventory(aInventoryPlayer); - } - detectAndSendChanges(); - } else { - aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; - } - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - if (mTotalSlotCount == 8) { - final int aSlotYStart = 26; - final int aSlotYFinish = aSlotYStart + (18*2); - final int aSlotXStart1 = 26; - final int aSlotXFinish1 = aSlotXStart1 + (18*2); - final int aSlotXStart2 = 116; - final int aSlotXFinish2 = aSlotXStart2 + (18*2); - int aSlotID = 0; - for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { - for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) { - addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y)); - } - } - for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { - for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) { - addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y)); - } - } - } - else if (mTotalSlotCount == 18) { - int aSlotYStart = 20; - int aSlotYFinish = aSlotYStart + (18*3); - int aSlotXStart1 = 26; - int aSlotXFinish1 = aSlotXStart1 + (18*3); - int aSlotXStart2 = 98; - int aSlotXFinish2 = aSlotXStart2 + (18*3); - int aSlotID = 0; - for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { - for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) { - addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y)); - } - } - for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { - for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) { - addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y)); - } - } - } - else if (mTotalSlotCount == 32) { - int aSlotYStart = 8; - int aSlotYFinish = aSlotYStart + (18*4); - int aSlotXStart1 = 8; - int aSlotXFinish1 = aSlotXStart1 + (18*4); - int aSlotXStart2 = 97; - int aSlotXFinish2 = aSlotXStart2 + (18*4); - int aSlotID = 0; - for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { - for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) { - addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y)); - } - } - for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { - for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) { - addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y)); - } - } - } - } - - @Override - public int getSlotCount() { - return mTotalSlotCount; - } - - @Override - public int getShiftClickSlotCount() { - return mInputslotCount; - } - - /* - * Uselss stuff copied from GT - */ - - - public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; - private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0; - - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; - mStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getEUCapacity()); - mEnergy = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU()); - mSteamStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity()); - mSteam = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam()); - mOutput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage()); - mInput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage()); - mDisplayErrorCode = mTileEntity.getErrorDisplayID(); - mProgressTime = mTileEntity.getProgress(); - mMaxProgressTime = mTileEntity.getMaxProgress(); - mActive = mTileEntity.isActive() ? 1 : 0; - mTimer++; - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - if (mTimer % 500 == 10 || oEnergy != mEnergy) { - var1.sendProgressBarUpdate(this, 0, mEnergy & 65535); - var1.sendProgressBarUpdate(this, 1, mEnergy >>> 16); - } - if (mTimer % 500 == 10 || oStorage != mStorage) { - var1.sendProgressBarUpdate(this, 2, mStorage & 65535); - var1.sendProgressBarUpdate(this, 3, mStorage >>> 16); - } - if (mTimer % 500 == 10 || oOutput != mOutput) { - var1.sendProgressBarUpdate(this, 4, mOutput); - } - if (mTimer % 500 == 10 || oInput != mInput) { - var1.sendProgressBarUpdate(this, 5, mInput); - } - if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) { - var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode); - } - if (mTimer % 500 == 10 || oProgressTime != mProgressTime) { - var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535); - var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16); - } - if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) { - var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535); - var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16); - } - if (mTimer % 500 == 10 || oID != mID) { - var1.sendProgressBarUpdate(this, 15, mID); - } - if (mTimer % 500 == 10 || oActive != mActive) { - var1.sendProgressBarUpdate(this, 16, mActive); - } - if (mTimer % 500 == 10 || oSteam != mSteam) { - var1.sendProgressBarUpdate(this, 17, mSteam & 65535); - var1.sendProgressBarUpdate(this, 18, mSteam >>> 16); - } - if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) { - var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535); - var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16); - } - } - - oID = mID; - oSteam = mSteam; - oInput = mInput; - oActive = mActive; - oOutput = mOutput; - oEnergy = mEnergy; - oStorage = mStorage; - oSteamStorage = mSteamStorage; - oProgressTime = mProgressTime; - oMaxProgressTime = mMaxProgressTime; - oDisplayErrorCode = mDisplayErrorCode; - } - - @SideOnly(Side.CLIENT) - @Override - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 0: - mEnergy = mEnergy & -65536 | par2; - break; - case 1: - mEnergy = mEnergy & 65535 | par2 << 16; - break; - case 2: - mStorage = mStorage & -65536 | par2; - break; - case 3: - mStorage = mStorage & 65535 | par2 << 16; - break; - case 4: - mOutput = par2; - break; - case 5: - mInput = par2; - break; - case 6: - mDisplayErrorCode = par2; - break; - case 11: - mProgressTime = mProgressTime & -65536 | par2; - break; - case 12: - mProgressTime = mProgressTime & 65535 | par2 << 16; - break; - case 13: - mMaxProgressTime = mMaxProgressTime & -65536 | par2; - break; - case 14: - mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16; - break; - case 15: - mID = par2; - break; - case 16: - mActive = par2; - break; - case 17: - mSteam = mSteam & -65536 | par2; - break; - case 18: - mSteam = mSteam & 65535 | par2 << 16; - break; - case 19: - mSteamStorage = mSteamStorage & -65536 | par2; - break; - case 20: - mSteamStorage = mSteamStorage & 65535 | par2 << 16; - break; - } - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - return mTileEntity.isUseableByPlayer(player); - } - - public String trans(String aKey, String aEnglish){ - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); - } - - private static class ViewingSlot extends SlotNoInput { - - public ViewingSlot(IInventory inventory, int index, int x, int y) { - super(inventory, index, x, y); - } - - @Override - public boolean isItemValid(ItemStack itemstack) { - return false; - } - - @Override - public int getSlotStackLimit() { - return 1; - } - - @Override - public boolean canTakeStack(EntityPlayer p_82869_1_) { - return true; - } - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java deleted file mode 100644 index 5623f0e224..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.InventoryPlayer; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; - -public class GUI_1by1_Turbine extends GT_GUIContainerMetaTile_Machine { - - private final String mName; - - public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "1by1.png"); - mName = aName; - } - - public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { - super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "1by1.png"); - mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRendererObj.drawString(mName, 8, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java deleted file mode 100644 index b427a632f7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class GUI_2by2 extends GT_GUIContainerMetaTile_Machine { - - private final String mName; - - public GUI_2by2(CONTAINER_2by2 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(containerType, RES_PATH_GUI + "2by2.png"); - mName = aName; - } - - public GUI_2by2(CONTAINER_2by2 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { - super(containerType, RES_PATH_GUI + aBackground + "2by2.png"); - mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRendererObj.drawString(mName, 8, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java deleted file mode 100644 index aced4342b3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -public class GUI_4by4 extends GT_GUIContainerMetaTile_Machine { - - private final String mName; - - public GUI_4by4(CONTAINER_4by4 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(containerType, RES_PATH_GUI + "4by4.png"); - mName = aName; - } - - public GUI_4by4(CONTAINER_4by4 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { - super(containerType, RES_PATH_GUI + aBackground + "4by4.png"); - mName = aName; - } - - @Override - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRendererObj.drawString(mName, 8, 4, 4210752); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java deleted file mode 100644 index dd19571646..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import gregtech.api.gui.GT_GUIContainer; - -public class GUI_HatchNbtConsumable extends GT_GUIContainer { - - private final String mName; - private final int mTotalSlotCount; - public final CONTAINER_HatchNbtConsumable mContainer; - - public GUI_HatchNbtConsumable(CONTAINER_HatchNbtConsumable aContainer, String aName) { - super(aContainer, RES_PATH_GUI + getTextureForGUI(aContainer.mInputslotCount*2)+".png"); - mContainer = aContainer; - mName = aName; - mTotalSlotCount = aContainer.mInputslotCount*2; - } - - private static final String getTextureForGUI(int aTotalSlotCOunt) { - if (aTotalSlotCOunt == 18) { - return "HatchNbtConsumable_3By3"; - } - else if (aTotalSlotCOunt == 32) { - return "HatchNbtConsumable_4By4"; - } - else { - return "HatchNbtConsumable_2By2"; - } - } - - @Override - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - if (mTotalSlotCount == 18) { - fontRendererObj.drawString(mName, 8, 4, 4210752); - fontRendererObj.drawString("Stock", 25, 14, 4210752); - fontRendererObj.drawString("Active", 115, 14, 4210752); - } - else if (mTotalSlotCount == 32) { - //fontRendererObj.drawString("Slots: "+mTotalSlotCount, 8, 4, 4210752); - //fontRendererObj.drawString(mName, 8, 4, 4210752); - //fontRendererObj.drawString("Stock", 25, 16, 4210752); - //fontRendererObj.drawString("Active", 115, 16, 4210752); - } - else { - fontRendererObj.drawString(mName, 8, 4, 4210752); - fontRendererObj.drawString("Stock", 25, 16, 4210752); - fontRendererObj.drawString("Active", 115, 16, 4210752); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java deleted file mode 100644 index 00d022c481..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.slots.SlotElectric; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_2by2; - -public class CONTAINER_Electric_2by2 extends CONTAINER_2by2{ - - public CONTAINER_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new SlotElectric(mTileEntity, 0, 71, 26)); - addSlotToContainer(new SlotElectric(mTileEntity, 1, 89, 26)); - addSlotToContainer(new SlotElectric(mTileEntity, 2, 71, 44)); - addSlotToContainer(new SlotElectric(mTileEntity, 3, 89, 44)); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java deleted file mode 100644 index 1f833eb3cb..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.slots.SlotElectric; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_4by4; - -public class CONTAINER_Electric_4by4 extends CONTAINER_4by4{ - - public CONTAINER_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new SlotElectric(mTileEntity, 0, 53, 8)); - addSlotToContainer(new SlotElectric(mTileEntity, 1, 71, 8)); - addSlotToContainer(new SlotElectric(mTileEntity, 2, 89, 8)); - addSlotToContainer(new SlotElectric(mTileEntity, 3, 107, 8)); - addSlotToContainer(new SlotElectric(mTileEntity, 4, 53, 26)); - addSlotToContainer(new SlotElectric(mTileEntity, 5, 71, 26)); - addSlotToContainer(new SlotElectric(mTileEntity, 6, 89, 26)); - addSlotToContainer(new SlotElectric(mTileEntity, 7, 107, 26)); - addSlotToContainer(new SlotElectric(mTileEntity, 8, 53, 44)); - addSlotToContainer(new SlotElectric(mTileEntity, 9, 71, 44)); - addSlotToContainer(new SlotElectric(mTileEntity, 10, 89, 44)); - addSlotToContainer(new SlotElectric(mTileEntity, 11, 107, 44)); - addSlotToContainer(new SlotElectric(mTileEntity, 12, 53, 62)); - addSlotToContainer(new SlotElectric(mTileEntity, 13, 71, 62)); - addSlotToContainer(new SlotElectric(mTileEntity, 14, 89, 62)); - addSlotToContainer(new SlotElectric(mTileEntity, 15, 107, 62)); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java deleted file mode 100644 index 9be7104bbc..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_2by2; - -public class GUI_Electric_2by2 extends GUI_2by2{ - - public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName); - } - - public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { - super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, RES_PATH_GUI + aBackground + "2by2.png"); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java deleted file mode 100644 index ed3fce5e2c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; - -import static gregtech.api.enums.GT_Values.RES_PATH_GUI; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_4by4; - -public class GUI_Electric_4by4 extends GUI_4by4{ - - public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName); - } - - public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { - super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, RES_PATH_GUI + aBackground + "4by4.png"); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java deleted file mode 100644 index 9a58e74ec4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java +++ /dev/null @@ -1,69 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.power; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.gui.GT_Slot_Output; -import gregtech.api.gui.GT_Slot_Render; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_BasicTank; - -import java.util.Iterator; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - -public class CONTAINER_BasicTank extends GT_ContainerMetaTile_Machine { - public int mContent = 0; - - public CONTAINER_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - public void addSlots(InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42)); - } - - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { - if (((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) { - this.mContent = ((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount; - } else { - this.mContent = 0; - } - - Iterator var2 = this.crafters.iterator(); - - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mContent & 'ï¿¿'); - var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); - } - - } - } - - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100 : - this.mContent = this.mContent & -65536 | par2; - break; - case 101 : - this.mContent = this.mContent & 'ï¿¿' | par2 << 16; - } - - } - - public int getSlotCount() { - return 2; - } - - public int getShiftClickSlotCount() { - return 1; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java deleted file mode 100644 index a03aac346b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui.power; - -import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.StatCollector; - -public class GUI_BasicTank extends GT_GUIContainerMetaTile_Machine { - private final String mName; - - public GUI_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(new CONTAINER_BasicTank(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png"); - this.mName = aName; - } - - protected void drawGuiContainerForegroundLayer(int par1, int par2) { - this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, - 4210752); - this.fontRendererObj.drawString(this.mName, 8, 6, 4210752); - if (this.mContainer != null) { - this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255); - this.fontRendererObj.drawString( - GT_Utility.parseNumberToString(((CONTAINER_BasicTank) this.mContainer).mContent), 10, 30, - 16448255); - } - - } - - protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { - super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (this.width - this.xSize) / 2; - int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java deleted file mode 100644 index 3c29b34e27..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public interface GregtechItemContainer { - public Item getItem(); - public Block getBlock(); - public boolean isStackEqual(Object aStack); - public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT); - public ItemStack get(long aAmount, Object... aReplacements); - public ItemStack getWildcard(long aAmount, Object... aReplacements); - public ItemStack getUndamaged(long aAmount, Object... aReplacements); - public ItemStack getAlmostBroken(long aAmount, Object... aReplacements); - public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements); - public GregtechItemContainer set(Item aItem); - public GregtechItemContainer set(ItemStack aStack); - public GregtechItemContainer registerOre(Object... aOreNames); - public GregtechItemContainer registerWildcardAsOre(Object... aOreNames); - public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements); - public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); - public boolean hasBeenSet(); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java deleted file mode 100644 index 824bb258d8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces; - -import ic2.api.energy.tile.IHeatSource; -import net.minecraftforge.common.util.ForgeDirection; - -public interface IHeatEntity extends IHeatSource, IHeatSink { - - public int getHeatBuffer(); - - public void setHeatBuffer(int HeatBuffer); - - public void addtoHeatBuffer(int heat); - - public int getTransmitHeat(); - - public int fillHeatBuffer(int maxAmount); - - public int getMaxHeatEmittedPerTick(); - - public void updateHeatEntity(); - - public int maxrequestHeatTick(ForgeDirection directionFrom); - - public int requestHeat(ForgeDirection directionFrom, int requestheat); - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java deleted file mode 100644 index 80adcf0d51..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java +++ /dev/null @@ -1,13 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IHeatSink { - - - int maxHeatInPerTick(ForgeDirection var1); - - int addHeat(ForgeDirection var1, int var2); - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java deleted file mode 100644 index 770f249648..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces; - -import java.util.ArrayList; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import net.minecraft.tileentity.TileEntity; - -public interface IMetaTileEntityHeatPipe extends IMetaTileEntity { - - - long transferHeat(byte var1, long var2, long var4, ArrayList var6); - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java deleted file mode 100644 index 6bf048320f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java +++ /dev/null @@ -1,343 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.material.Material; -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public interface IGregtech_RecipeAdder { - /** - * Adds a Coke Oven Recipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInputb = second Input (can be null, and respects StackSize) - * @param aFluidOutput = Output of the Creosote (not null, and respects StackSize) - * @param aFluidInput = fluid Input (can be null, and respects StackSize) - * @param aOutput = Output of the Coal/coke (can be null, and respects StackSize) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - //public boolean addCokeOvenRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue); - public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); - - - public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt); - - - public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt); - - - public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType); - - - /** - * Adds a Matter Fabricator Recipe - * - * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize) - * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addMatterFabricatorRecipe(FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt); - - /** - * Adds a Matter Fabricator Recipe - * - * @param aItemInput = ItemStack Input, can be null I assume. - * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) - * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addMatterFabricatorRecipe(ItemStack aItemInput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt); - - - - - /** - * Adds a Recipe for the Dehydrator. (up to 9 Outputs) - * - * @param aInput = Input itemstack (not null, and respects StackSize) - * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) - * @param aOutputItems = Itemstack[] (not null, and respects StackSize) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - - //public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt); - /*public boolean addDehydratorRecipe(FluidStack aFluid, FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);*/ - /*public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt); - public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt);*/ - - /** - * Adds a Recipe for the Dehydrator. (up to 9 Outputs) - * - * @param aInput = ItemStack[] (not null, and respects StackSize) - * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) - * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize) - * @param aOutputItems = ItemStack[] (not null, and respects StackSize) - * @param aChances = Output Change (can be == 0) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addDehydratorRecipe(ItemStack[] aInput, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt); - - - /** - * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) - * - * @param aInput = ItemStack[] (not null, and respects StackSize) - * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) - * @param aChances = Output Chance (can be == 0) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU per tick needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aOutput, int aChance, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) - * - * @param aInput = ItemStack[] (not null, and respects StackSize) - * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) - * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) - * @param aChances = Output Chance (can be == 0) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU per tick needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) - * - * @param aInput = ItemStack[] (not null, and respects StackSize) - * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) - * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) - * @param aOutputStack = Item Output (Can be null) - * @param aChances = Output Chance (can be == 0) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU per tick needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt); - - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt, int aSpecialValue); - - /** - * Adds a Recipe for the LFTRr. (up to 9 Inputs) - * - * @param aInput = ItemStack[] (not null, and respects StackSize) - * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) - * @param aFluidOutput = Output of the Molten Salts (not null, and respects StackSize) - * @param aOutputStack = Item Output (Can be null) - * @param aChances = Output Chance (can be == 0) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU per tick needed for heating up (must be >= 0) - * @param aSpecialValue = Power produced in EU/t per dynamo - * @return true if the Recipe got added, otherwise false. - */ - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue); - - - public boolean addLFTRRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); - public boolean addLFTRRecipe(ItemStack aInput1, FluidStack aInput2, ItemStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt); - public boolean addLFTRRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt); - - - /** - * Adds a custom Semifluid fuel for the GT++ SemiFluid Generators. - * @param aFuelItem - A Fluidstack to be consumed. - * @param aFuelValue - Fuel value in thousands (1 = 1000) - * @return - Was the Fuel added? - */ - public boolean addSemifluidFuel(FluidStack aFuelItem, int aFuelValue); - - /** - * Adds a custom Semifluid fuel for the GT++ SemiFluid Generators. - * @param aFuelItem - A Fluidstack to be consumed. - * @param aFuelValue - Fuel value in thousands (1 = 1000) - * @return - Was the Fuel added? - */ - public boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue); - - public boolean addFissionFuel( - FluidStack aInput1, FluidStack aInput2, FluidStack aInput3, - FluidStack aInput4, FluidStack aInput5, FluidStack aInput6, - FluidStack aInput7, FluidStack aInput8, FluidStack aInput9, - FluidStack aOutput1, FluidStack aOutput2, - int aDuration, int aEUt); - - public boolean addFissionFuel( - boolean aOptimise, - FluidStack aInput1, FluidStack aInput2, FluidStack aInput3, - FluidStack aInput4, FluidStack aInput5, FluidStack aInput6, - FluidStack aInput7, FluidStack aInput8, FluidStack aInput9, - FluidStack aOutput1, FluidStack aOutput2, - int aDuration, int aEUt); - - public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, - FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue); - - boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput, FluidStack aFluidOutput, - int[] aChances, int aDuration, int aEUt, int aSpecialValue); - - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); - - - /** - * Adds a Recipe for the Machine Component Assembler. (up to 6 Inputs) - * - * @param aInputs = ItemStack[] (not null, and respects StackSize) - * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) - * @param aOutput1 = Output ItemStack (not null, and respects StackSize) - * @param aDuration = Duration (must be >= 0) - * @param aEUt = EU per tick needed for heating up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); - - public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); - - public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); - - public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); - - - public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2); - public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2); - - public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt); - /** - * Adds an Assemblyline Recipe - * - * @param aInputs must be != null, 4-16 inputs - * @param aFluidInputs 0-4 fluids - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Assemblyline Recipe - * - * @param aInputs elements should be: ItemStack for single item; - * ItemStack[] for multiple equivalent items; - * {OreDict, amount} for oredict. - */ - boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); - - - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu); - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu); - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack object, int time); - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, int aCircuit, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time, int eu); - - public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu); - - public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); - - public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); - - public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); - - public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput); - - public boolean addFluidExtractionRecipe(ItemStack input, FluidStack output, int aTime, int aEu); - - public boolean addFluidExtractionRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidOut, int aTime, int aEu); - - public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn); - - public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, FluidStack rFluidOut); - - public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, FluidStack rFluidOut, int aTime, int aEu); - - /** - * Adds a Fusion reactor Recipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param plasma = Output of the Fusion (can be null, and respects StackSize) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aEu = The EU generated per Tick (can even be negative!) - * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) - */ - public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aFusionDurationInTicks, int aEu, int aSpecial); - /** - * Adds a Fusion reactor Recipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param plasma = Output of the Fusion (can be null, and respects StackSize) - * @param aOutputChance = chance to output plasma (can be 0) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aEu = The EU generated per Tick (can even be negative!) - * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) - */ - public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial); - /** - * Adds a Fusion reactor Recipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param plasma = Output of the Fusion (can be null, and respects StackSize) - * @param aOutputChance = chance to output plasma (can be 0) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aEu = The EU generated per Tick (can even be negative!) - * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) - */ - public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial); - - - public boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, - ItemStack aOutput2, int aDuration, int aEUt, int aLevel); - - public boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel); - - public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu); - public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu); - - public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier); - public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier); - - public boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aHeat); - - public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt); - - public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden); - - public boolean addPulverisationRecipe(final ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, final ItemStack aOutput3); - - public boolean addMillingRecipe(Materials aMat, int aEU); - public boolean addMillingRecipe(Material aMat, int aEU); - - public boolean addFlotationRecipe(Materials aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU); - public boolean addFlotationRecipe(Material aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU); - - public boolean addpackagerRecipe(ItemStack aRecipeType, ItemStack aInput1, ItemStack aInput2, ItemStack aOutputStack1); - - public boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage); - - public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); - - public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); - - public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); - - public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU); - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java deleted file mode 100644 index b6c36483af..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -public interface Interface_IconContainer { - /** - * @return A regular Icon. - */ - public IIcon getIcon(); - - /** - * @return Icon of the Overlay (or null if there is no Icon) - */ - public IIcon getOverlayIcon(); - - /** - * @return the Default Texture File for this Icon. - */ - public ResourceLocation getTextureFile(); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java deleted file mode 100644 index e874258a7a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import java.util.List; - -import net.minecraft.dispenser.IBlockSource; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.enums.SubTag; - -import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_Base; - -public interface Interface_ItemBehaviour { - public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); - - public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); - - public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); - - public ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); - - public List getAdditionalToolTips(E aItem, List aList, ItemStack aStack); - - public void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand); - - public boolean isItemStackUsable(E aItem, ItemStack aStack); - - public boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack); - - public ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack); - - public boolean hasProjectile(Gregtech_MetaItem_Base aItem, SubTag aProjectileType, ItemStack aStack); - - public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); - - public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java deleted file mode 100644 index c997f14c9e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; - -public interface Interface_OreRecipeRegistrator { - /** - * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. - * - * @param aPrefix always != null - * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! - * @param aStack always != null - */ - public void registerOre(GregtechOrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); - - public void registerOre(GregtechOrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack copyAmount); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java deleted file mode 100644 index 6037424d1f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java +++ /dev/null @@ -1,18 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.OrePrefixes; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; - -public interface Interface_OreRecipeRegistrator_GT { - /** - * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. - * - * @param aPrefix always != null - * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! - * @param aStack always != null - */ - public void registerOre(OrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java deleted file mode 100644 index 74c996d116..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; - -public interface Interface_Texture { - public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public boolean isValidTexture(); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java deleted file mode 100644 index ca167e4c7f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java +++ /dev/null @@ -1,193 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.interfaces.internal; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; - -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.IToolStats; -import gregtech.api.items.GT_MetaGenerated_Tool; - -import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool; -import net.minecraftforge.event.world.BlockEvent; - -/** - * The Stats for GT Tools. Not including any Material Modifiers. - *

- * And this is supposed to not have any ItemStack Parameters as these are generic Stats. - */ -public interface Interface_ToolStats extends IToolStats{ - /** - * Called when aPlayer crafts this Tool - */ - @Override - public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer); - - /** - * Called when this gets added to a Tool Item - */ - public void onStatsAddedToTool(Gregtech_MetaTool gregtech_MetaTool, int aID); - - /** - * @return Damage the Tool receives when breaking a Block. 100 is one Damage Point (or 100 EU). - */ - @Override - public int getToolDamagePerBlockBreak(); - - /** - * @return Damage the Tool receives when converting the drops of a Block. 100 is one Damage Point (or 100 EU). - */ - @Override - public int getToolDamagePerDropConversion(); - - /** - * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal. - */ - @Override - public int getToolDamagePerContainerCraft(); - - /** - * @return Damage the Tool receives when being used as Weapon, 200 is the normal Value, 100 for actual Weapons. - */ - @Override - public int getToolDamagePerEntityAttack(); - - /** - * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible. - */ - @Override - public int getBaseQuality(); - - /** - * @return The Damage Bonus for this Type of Tool against Mobs. 1.0F is normal punch. - */ - @Override - public float getBaseDamage(); - - /** - * @return This gets the Hurt Resistance time for Entities getting hit. (always does 1 as minimum) - */ - @Override - public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity); - - /** - * @return This is a multiplier for the Tool Speed. 1.0F = no special Speed. - */ - @Override - public float getSpeedMultiplier(); - - /** - * @return This is a multiplier for the Tool Speed. 1.0F = no special Durability. - */ - @Override - public float getMaxDurabilityMultiplier(); - - @Override - public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity); - - @Override - public String getMiningSound(); - - @Override - public String getCraftingSound(); - - @Override - public String getEntityHitSound(); - - @Override - public String getBreakingSound(); - - @Override - public Enchantment[] getEnchantments(ItemStack aStack); - - @Override - public int[] getEnchantmentLevels(ItemStack aStack); - - /** - * @return If this Tool can be used for blocking Damage like a Sword. - */ - @Override - public boolean canBlock(); - - /** - * @return If this Tool can be used as an RC Crowbar. - */ - @Override - public boolean isCrowbar(); - - /** - * @return If this Tool can be used as an BC Wrench. - */ - public boolean isWrench(); - - /** - * @return If this Tool can be used as Weapon i.e. if that is the main purpose. - */ - @Override - public boolean isWeapon(); - - /** - * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something - */ - @Override - public boolean isRangedWeapon(); - - /** - * @return If this Tool can be used as Weapon i.e. if that is the main purpose. - */ - @Override - public boolean isMiningTool(); - - /** - * aBlock.getHarvestTool(aMetaData) can return the following Values for example. - * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" - * - * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check. - */ - @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData); - - /** - * This lets you modify the Drop List, when this type of Tool has been used. - * - * @return the Amount of modified Items. - */ - @Override - public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); - - /** - * @return Returns a broken Version of the Item. - */ - @Override - public ItemStack getBrokenItem(ItemStack aStack); - - /** - * @return the Damage actually done to the Mob. - */ - @Override - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); - - /** - * @return the Damage actually done to the Mob. - */ - @Override - public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); - - @Override - public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack); - - @Override - public short[] getRGBa(boolean aIsToolHead, ItemStack aStack); - - /** - * Called when this gets added to a Tool Item - */ - @Override - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java deleted file mode 100644 index 43998577c9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java +++ /dev/null @@ -1,192 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockDispenser; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.dispenser.*; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gregtech.api.enums.SubTag; -import gregtech.api.interfaces.IProjectileItem; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; - -/** - * Extended by most Items, also used as a fallback Item, to prevent the accidental deletion when Errors occur. - */ -public class Gregtech_Generic_Item extends Item implements IProjectileItem { - private final String mName, mTooltip; - protected IIcon mIcon; - - public Gregtech_Generic_Item(final String aUnlocalized, final String aEnglish, final String aEnglishTooltip) { - this(aUnlocalized, aEnglish, aEnglishTooltip, true); - } - - public Gregtech_Generic_Item(final String aUnlocalized, final String aEnglish, final String aEnglishTooltip, final boolean aWriteToolTipIntoLangFile) { - super(); - this.mName = aUnlocalized; - GT_LanguageManager.addStringLocalization(this.mName + ".name", aEnglish); - if (GT_Utility.isStringValid(aEnglishTooltip)) { - GT_LanguageManager.addStringLocalization(this.mTooltip = this.mName + ".tooltip_main", aEnglishTooltip, aWriteToolTipIntoLangFile); - } else { - this.mTooltip = null; - } - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerItem(this, this.mName, CORE.MODID); - BlockDispenser.dispenseBehaviorRegistry.putObject(this, new GT_Item_Dispense()); - } - - @Override - public final Item setUnlocalizedName(final String aName) { - return this; - } - - @Override - public final String getUnlocalizedName() { - return this.mName; - } - - @Override - public String getUnlocalizedName(final ItemStack aStack) { - return this.getHasSubtypes() ? this.mName + "." + this.getDamage(aStack) : this.mName; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(final IIconRegister aIconRegister) { - this.mIcon = aIconRegister.registerIcon(CORE.MODID+":"+this.mName); - } - - @Override - public boolean doesSneakBypassUse(final World aWorld, final int aX, final int aY, final int aZ, final EntityPlayer aPlayer) { - return true; - } - - @Override - public IIcon getIconFromDamage(final int par1) { - return this.mIcon; - } - - public int getTier(final ItemStack aStack) { - return 0; - } - - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { - if ((this.getMaxDamage() > 0) && !this.getHasSubtypes()) { - aList.add((aStack.getMaxDamage() - this.getDamage(aStack)) + " / " + aStack.getMaxDamage()); - } - if (this.mTooltip != null) { - aList.add(GT_LanguageManager.getTranslation(this.mTooltip)); - } - if (GT_ModHandler.isElectricItem(aStack)) { - aList.add("Tier: " + this.getTier(aStack)); - } - this.addAdditionalToolTips(aList, aStack); - } - - protected void addAdditionalToolTips(final List aList, final ItemStack aStack) { - // - } - - @Override - public void onCreated(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - this.isItemStackUsable(aStack); - } - - public boolean isItemStackUsable(final ItemStack aStack) { - return true; - } - - public ItemStack onDispense(final IBlockSource aSource, final ItemStack aStack) { - final EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); - final IPosition iposition = BlockDispenser.func_149939_a(aSource); - final ItemStack itemstack1 = aStack.splitStack(1); - BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition); - return aStack; - } - - @Override - public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final double aX, final double aY, final double aZ) { - return null; - } - - @Override - public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final EntityLivingBase aEntity, final float aSpeed) { - return null; - } - - @Override - public boolean hasProjectile(final SubTag aProjectileType, final ItemStack aStack) { - return false; - } - - @Override - public ItemStack getContainerItem(final ItemStack aStack) { - return null; - } - - @Override - public boolean hasContainerItem(final ItemStack aStack) { - return this.getContainerItem(aStack) != null; - } - - public static class GT_Item_Dispense extends BehaviorProjectileDispense { - @Override - public ItemStack dispenseStack(final IBlockSource aSource, final ItemStack aStack) { - return ((Gregtech_Generic_Item) aStack.getItem()).onDispense(aSource, aStack); - } - - @Override - protected IProjectile getProjectileEntity(final World aWorld, final IPosition aPosition) { - return null; - } - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("LuV")){ - HEX_OxFFFFFF = 0xffffcc; - } - else if (stack.getDisplayName().contains("ZPM")){ - HEX_OxFFFFFF = 0xace600; - } - else if (stack.getDisplayName().contains("UV")){ - HEX_OxFFFFFF = 0xffff00; - } - else if (stack.getDisplayName().contains("MAX")){ - HEX_OxFFFFFF = 0xff0000; - } - else if (stack.getDisplayName().contains("Sodium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); - } - else if (stack.getDisplayName().contains("Cadmium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); - } - else if (stack.getDisplayName().contains("Lithium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); - } - else { - HEX_OxFFFFFF = 0xffffff; - } - return HEX_OxFFFFFF; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java deleted file mode 100644 index 12b90c9a6c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java +++ /dev/null @@ -1,345 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items; - -import static gregtech.api.enums.GT_Values.D1; - -import java.util.*; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.SubTag; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.IFoodStat; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.IItemContainer; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ItemBehaviour; - -public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { - /** - * All instances of this Item Class are listed here. - * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. - *

- * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. - */ - public static final HashMap sInstances = new HashMap<>(); - - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - - public final short mOffset, mItemAmount; - public final BitSet mEnabledItems; - public final BitSet mVisibleItems; - public final IIcon[][] mIconList; - - public final HashMap mFoodStats = new HashMap<>(); - public final HashMap mElectricStats = new HashMap<>(); - public final HashMap mFluidContainerStats = new HashMap<>(); - public final HashMap mBurnValues = new HashMap<>(); - - /** - * Creates the Item using these Parameters. - * - * @param aUnlocalized The Unlocalized Name of this Item. - */ - public Gregtech_MetaItem(final String aUnlocalized, final short aOffset, final short aItemAmount) { - super(aUnlocalized); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setHasSubtypes(true); - this.setMaxDamage(0); - this.mEnabledItems = new BitSet(aItemAmount); - this.mVisibleItems = new BitSet(aItemAmount); - - this.mOffset = (short) Math.min(32766, aOffset); - this.mItemAmount = (short) Math.min(aItemAmount, 32766 - this.mOffset); - this.mIconList = new IIcon[aItemAmount][1]; - - sInstances.put(this.getUnlocalizedName(), this); - } - - /** - * This adds a Custom Item to the ending Range. - * - * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset) - * @param aEnglish The Default Localized Name of the created Item - * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip - * @param aFoodBehavior The Food Value of this Item. Can be null aswell. Just a convenience thing. - * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things. - * @return An ItemStack containing the newly created Item. - */ - public final ItemStack addItem(final int aID, final String aEnglish, String aToolTip, final Object... aRandomData) { - if (aToolTip == null) { - aToolTip = ""; - } - if ((aID >= 0) && (aID < this.mItemAmount)) { - final ItemStack rStack = new ItemStack(this, 1, this.mOffset + aID); - this.mEnabledItems.set(aID); - this.mVisibleItems.set(aID); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip); - final List tAspects = new ArrayList<>(); - // Important Stuff to do first - for (final Object tRandomData : aRandomData) { - if (tRandomData instanceof SubTag) { - if (tRandomData == SubTag.INVISIBLE) { - this.mVisibleItems.set(aID, false); - continue; - } - if (tRandomData == SubTag.NO_UNIFICATION) { - GT_OreDictUnificator.addToBlacklist(rStack); - continue; - } - } - } - // now check for the rest - for (final Object tRandomData : aRandomData) { - if (tRandomData != null) { - boolean tUseOreDict = true; - - if (tRandomData instanceof Interface_ItemBehaviour) { - this.addItemBehavior(this.mOffset + aID, (Interface_ItemBehaviour) tRandomData); - tUseOreDict = false; - } - if (tRandomData instanceof IItemContainer) { - ((IItemContainer) tRandomData).set(rStack); - tUseOreDict = false; - } - if (tRandomData instanceof SubTag) { - continue; - } - if (tRandomData instanceof TC_AspectStack) { - ((TC_AspectStack) tRandomData).addToAspectList(tAspects); - continue; - } - if (tRandomData instanceof ItemData) { - if (GT_Utility.isStringValid(tRandomData)) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - } else { - GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); - } - continue; - } - if (tUseOreDict) { - GT_OreDictUnificator.registerOre(tRandomData, rStack); - continue; - } - } - } - if (GregTech_API.sThaumcraftCompat != null) { - GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); - } - return rStack; - } - return null; - } - - /** - * Sets the Furnace Burn Value for the Item. - * - * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aValue 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU) - * @return the Item itself for convenience in constructing. - */ - public final Gregtech_MetaItem setBurnValue(final int aMetaValue, final int aValue) { - if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length())) || (aValue < 0)) { - return this; - } - if (aValue == 0) { - this.mBurnValues.remove((short) aMetaValue); - } else { - this.mBurnValues.put((short) aMetaValue, aValue > Short.MAX_VALUE ? Short.MAX_VALUE : (short) aValue); - } - return this; - } - - /** - * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) - * @param aTransferLimit Transfer Limit. - * @param aTier The electric Tier. - * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). - * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) - * Use -2 if you want to make this Battery dischargeable. - * Use -3 if you want to make this Battery charge/discharge-able. - * @return the Item itself for convenience in constructing. - */ - public final Gregtech_MetaItem setElectricStats(final int aMetaValue, final long aMaxCharge, final long aTransferLimit, final long aTier, final long aSpecialData, final boolean aUseAnimations) { - if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length()))) { - return this; - } - if (aMaxCharge == 0) { - this.mElectricStats.remove((short) aMetaValue); - } else { - this.mElectricStats.put((short) aMetaValue, new Long[]{aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData}); - if ((aMetaValue >= this.mOffset) && aUseAnimations) { - this.mIconList[aMetaValue - this.mOffset] = Arrays.copyOf(this.mIconList[aMetaValue - this.mOffset], Math.max(9, this.mIconList[aMetaValue - this.mOffset].length)); - } - } - return this; - } - - /** - * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] - * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) - * @param aTransferLimit Transfer Limit. - * @param aTier The electric Tier. - * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). - * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) - * Use -2 if you want to make this Battery dischargeable. - * Use -3 if you want to make this Battery charge/discharge-able. - * @return the Item itself for convenience in constructing. - */ - public final Gregtech_MetaItem setFluidContainerStats(final int aMetaValue, final long aCapacity, final long aStacksize) { - if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length()))) { - return this; - } - if (aCapacity < 0) { - this.mElectricStats.remove((short) aMetaValue); - } else { - this.mFluidContainerStats.put((short) aMetaValue, new Long[]{aCapacity, Math.max(1, aStacksize)}); - } - return this; - } - - /** - * @return if this MetaGenerated Item should use my Default Renderer System. - */ - public boolean useStandardMetaItemRenderer() { - return true; - } - - /** - * @return the Color Modulation the Material is going to be rendered with. - */ - public short[] getRGBa(final ItemStack aStack) { - return Materials._NULL.getRGBA(); - } - - /** - * @return the Icon the Material is going to be rendered with. - */ - public IIconContainer getIconContainer(final int aMetaData) { - return null; - } - - /* ---------- INTERNAL OVERRIDES ---------- */ - - @Override - public ItemStack onItemRightClick(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - return super.onItemRightClick(aStack, aWorld, aPlayer); - } - - @Override - public int getMaxItemUseDuration(final ItemStack aStack) { - return this.mFoodStats.get((short) this.getDamage(aStack)) == null ? 0 : 32; - } - - @Override - public EnumAction getItemUseAction(final ItemStack aStack) { - return EnumAction.none; - } - - @Override - public final ItemStack onEaten(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - final IFoodStat tStat = this.mFoodStats.get((short) this.getDamage(aStack)); - if (tStat != null) { - - } - return aStack; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { - for (int i = 0, j = this.mEnabledItems.length(); i < j; i++) { - if (this.mVisibleItems.get(i) || (D1 && this.mEnabledItems.get(i))) { - final Long[] tStats = this.mElectricStats.get((short) (this.mOffset + i)); - if ((tStats != null) && (tStats[3] < 0)) { - final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); - this.setCharge(tStack, Math.abs(tStats[0])); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - if ((tStats == null) || (tStats[3] != -2)) { - final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - } - } - } - - @Override - @SideOnly(Side.CLIENT) - public final void registerIcons(final IIconRegister aIconRegister) { - for (short i = 0, j = (short) this.mEnabledItems.length(); i < j; i++) { - if (this.mEnabledItems.get(i)) { - for (byte k = 1; k < this.mIconList[i].length; k++) { - this.mIconList[i][k] = aIconRegister.registerIcon(CORE.MODID+":"+this.getUnlocalizedName() + "/" + i + "/" + k); - } - this.mIconList[i][0] = aIconRegister.registerIcon(CORE.MODID+":"+this.getUnlocalizedName() + "/" + i); - } - } - } - - @Override - public final Long[] getElectricStats(final ItemStack aStack) { - return this.mElectricStats.get((short) aStack.getItemDamage()); - } - - @Override - public final Long[] getFluidContainerStats(final ItemStack aStack) { - return this.mFluidContainerStats.get((short) aStack.getItemDamage()); - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { - return false; - } - - @Override - public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { - return false; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("LuV")){ - HEX_OxFFFFFF = 0xffffcc; - } - else if (stack.getDisplayName().contains("ZPM")){ - HEX_OxFFFFFF = 0xace600; - } - else if (stack.getDisplayName().contains("UV")){ - HEX_OxFFFFFF = 0xffff00; - } - else if (stack.getDisplayName().contains("MAX")){ - HEX_OxFFFFFF = 0xff0000; - } - else { - HEX_OxFFFFFF = 0xffffff; - } - return HEX_OxFFFFFF; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java deleted file mode 100644 index ec1c90186a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java +++ /dev/null @@ -1,675 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items; - -import static gregtech.api.enums.GT_Values.*; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import net.minecraft.dispenser.IBlockSource; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.inventory.Container; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gregtech.api.enums.SubTag; -import gregtech.api.util.*; - -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ItemBehaviour; -import ic2.api.item.*; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; - -public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - private final HashMap>> mItemBehaviors = new HashMap<>(); - - /** - * Creates the Item using these Parameters. - * - * @param aUnlocalized The Unlocalized Name of this Item. - * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated. - */ - public Gregtech_MetaItem_Base(final String aUnlocalized) { - super(aUnlocalized, "Generated Item", null, false); - this.setHasSubtypes(true); - this.setMaxDamage(0); - } - - /** - * Adds a special Item Behaviour to the Item. - *

- * Note: the boolean Behaviours sometimes won't be executed if another boolean Behaviour returned true before. - * - * @param aMetaValue the Meta Value of the Item you want to add it to. [0 - 32765] - * @param aBehavior the Click Behavior you want to add. - * @return the Item itself for convenience in constructing. - */ - public final Gregtech_MetaItem_Base addItemBehavior(final int aMetaValue, final Interface_ItemBehaviour aBehavior) { - if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { - return this; - } - ArrayList> tList = this.mItemBehaviors.get((short) aMetaValue); - if (tList == null) { - tList = new ArrayList<>(1); - this.mItemBehaviors.put((short) aMetaValue, tList); - } - tList.add(aBehavior); - return this; - } - - public abstract Long[] getElectricStats(ItemStack aStack); - - public abstract Long[] getFluidContainerStats(ItemStack aStack); - - @Override - public boolean hasProjectile(final SubTag aProjectileType, final ItemStack aStack) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - if (tBehavior.hasProjectile(this, aProjectileType, aStack)) { - return true; - } - } - } - return super.hasProjectile(aProjectileType, aStack); - } - - @Override - public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final double aX, final double aY, final double aZ) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - final EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ); - if (rArrow != null) { - return rArrow; - } - } - } - return super.getProjectile(aProjectileType, aStack, aWorld, aX, aY, aZ); - } - - @Override - public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final EntityLivingBase aEntity, final float aSpeed) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - final EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); - if (rArrow != null) { - return rArrow; - } - } - } - return super.getProjectile(aProjectileType, aStack, aWorld, aEntity, aSpeed); - } - - @Override - public ItemStack onDispense(final IBlockSource aSource, final ItemStack aStack) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - if (tBehavior.canDispense(this, aSource, aStack)) { - return tBehavior.onDispense(this, aSource, aStack); - } - } - } - return super.onDispense(aSource, aStack); - } - - @Override - public boolean isItemStackUsable(final ItemStack aStack) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - if (!tBehavior.isItemStackUsable(this, aStack)) { - return false; - } - } - } - return super.isItemStackUsable(aStack); - } - - @Override - public boolean onLeftClickEntity(final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { - this.use(aStack, 0, aPlayer); - this.isItemStackUsable(aStack); - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - try { - if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) { - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - } - return true; - } - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - return false; - } - } catch (final Throwable e) { - if (D1) { - e.printStackTrace(GT_Log.err); - } - } - } - } - return false; - } - - @Override - public boolean onItemUse(final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - this.use(aStack, 0, aPlayer); - this.isItemStackUsable(aStack); - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - try { - if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - } - return true; - } - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - return false; - } - } catch (final Throwable e) { - if (D1) { - e.printStackTrace(GT_Log.err); - } - } - } - } - return false; - } - - @Override - public boolean onItemUseFirst(final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - this.use(aStack, 0, aPlayer); - this.isItemStackUsable(aStack); - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - try { - if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - } - return true; - } - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - return false; - } - } catch (final Throwable e) { - if (D1) { - e.printStackTrace(GT_Log.err); - } - } - } - } - return false; - } - - @Override - public ItemStack onItemRightClick(ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - this.use(aStack, 0, aPlayer); - this.isItemStackUsable(aStack); - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - try { - aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer); - } catch (final Throwable e) { - if (D1) { - e.printStackTrace(GT_Log.err); - } - } - } - } - return aStack; - } - - @Override - public final void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, final boolean aF3_H) { - final String tKey = this.getUnlocalizedName(aStack) + ".tooltip", tString = GT_LanguageManager.getTranslation(tKey); - if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) { - aList.add(tString); - } - - Long[] - tStats = this.getElectricStats(aStack); - if (tStats != null) { - if (tStats[3] > 0) { - aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " + (tStats[2] >= 0 ? tStats[2] : 0) + EnumChatFormatting.GRAY); - } else { - final long tCharge = this.getRealCharge(aStack); - if ((tStats[3] == -2) && (tCharge <= 0)) { - aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY); - } else { - aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY); - } - } - } - - tStats = this.getFluidContainerStats(aStack); - if ((tStats != null) && (tStats[0] > 0)) { - final FluidStack tFluid = this.getFluidContent(aStack); - aList.add(EnumChatFormatting.BLUE + ((tFluid == null ? "No Fluids Contained" : GT_Utility.getFluidName(tFluid, true))) + EnumChatFormatting.GRAY); - aList.add(EnumChatFormatting.BLUE + ((tFluid == null ? 0 : tFluid.amount) + "L / " + tStats[0] + "L") + EnumChatFormatting.GRAY); - } - - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - aList = tBehavior.getAdditionalToolTips(this, aList, aStack); - } - } - - this.addAdditionalToolTips(aList, aStack); - } - - @Override - public void onUpdate(final ItemStack aStack, final World aWorld, final Entity aPlayer, final int aTimer, final boolean aIsInHand) { - final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); - if (tList != null) { - for (final Interface_ItemBehaviour tBehavior : tList) { - tBehavior.onUpdate(this, aStack, aWorld, aPlayer, aTimer, aIsInHand); - } - } - } - - @Override - public final boolean canProvideEnergy(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return false; - } - return (tStats[3] > 0) || ((aStack.stackSize == 1) && ((tStats[3] == -2) || (tStats[3] == -3))); - } - - @Override - public final double getMaxCharge(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - return Math.abs(tStats[0]); - } - - @Override - public final double getTransferLimit(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - return Math.max(tStats[1], tStats[3]); - } - - @Override - public final double charge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aSimulate) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[2] > aTier) || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) || (aStack.stackSize != 1)) { - return 0; - } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); - if (!aSimulate) { - this.setCharge(aStack, tNewCharge); - } - return tNewCharge - tChargeBefore; - } - - @Override - public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[2] > aTier)) { - return 0; - } - if (aBatteryAlike && !this.canProvideEnergy(aStack)) { - return 0; - } - if (tStats[3] > 0) { - if ((aCharge < tStats[3]) || (aStack.stackSize < 1)) { - return 0; - } - if (!aSimulate) { - aStack.stackSize--; - } - return tStats[3]; - } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); - if (!aSimulate) { - this.setCharge(aStack, tNewCharge); - } - return tChargeBefore - tNewCharge; - } - - @Override - public final double getCharge(final ItemStack aStack) { - return this.getRealCharge(aStack); - } - - @Override - public final boolean canUse(final ItemStack aStack, final double aAmount) { - return this.getRealCharge(aStack) >= aAmount; - } - - @Override - public final boolean use(final ItemStack aStack, final double aAmount, final EntityLivingBase aPlayer) { - this.chargeFromArmor(aStack, aPlayer); - if ((aPlayer instanceof EntityPlayer) && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) { - return true; - } - final double tTransfer = this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); - if (tTransfer == aAmount) { - this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); - this.chargeFromArmor(aStack, aPlayer); - return true; - } - this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); - this.chargeFromArmor(aStack, aPlayer); - return false; - } - - @Override - public final void chargeFromArmor(final ItemStack aStack, final EntityLivingBase aPlayer) { - if ((aPlayer == null) || aPlayer.worldObj.isRemote) { - return; - } - for (int i = 1; i < 5; i++) { - final ItemStack tArmor = aPlayer.getEquipmentInSlot(i); - if (GT_ModHandler.isElectricItem(tArmor)) { - final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); - if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { - final double tCharge = ElectricItem.manager.discharge(tArmor, this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false); - if (tCharge > 0) { - this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); - if (aPlayer instanceof EntityPlayer) { - final Container tContainer = ((EntityPlayer) aPlayer).openContainer; - if (tContainer != null) { - tContainer.detectAndSendChanges(); - } - } - } - } - } - } - } - - public final long getRealCharge(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - if (tStats == null) { - return 0; - } - if (tStats[3] > 0) { - return (int) (long) tStats[3]; - } - final NBTTagCompound tNBT = aStack.getTagCompound(); - return tNBT == null ? 0 : tNBT.getLong("GT.ItemCharge"); - } - - public final boolean setCharge(final ItemStack aStack, long aCharge) { - final Long[] tStats = this.getElectricStats(aStack); - if ((tStats == null) || (tStats[3] > 0)) { - return false; - } - NBTTagCompound tNBT = aStack.getTagCompound(); - if (tNBT == null) { - tNBT = new NBTTagCompound(); - } - tNBT.removeTag("GT.ItemCharge"); - aCharge = Math.min(tStats[0] < 0 ? Math.abs(tStats[0] / 2) : aCharge, Math.abs(tStats[0])); - if (aCharge > 0) { - aStack.setItemDamage(this.getChargedMetaData(aStack)); - tNBT.setLong("GT.ItemCharge", aCharge); - } else { - aStack.setItemDamage(this.getEmptyMetaData(aStack)); - } - if (tNBT.hasNoTags()) { - aStack.setTagCompound(null); - } else { - aStack.setTagCompound(tNBT); - } - this.isItemStackUsable(aStack); - return true; - } - - public short getChargedMetaData(final ItemStack aStack) { - return (short) aStack.getItemDamage(); - } - - public short getEmptyMetaData(final ItemStack aStack) { - return (short) aStack.getItemDamage(); - } - - @Override - public FluidStack getFluid(final ItemStack aStack) { - return this.getFluidContent(aStack); - } - - @Override - public int getCapacity(final ItemStack aStack) { - final Long[] tStats = this.getFluidContainerStats(aStack); - return tStats == null ? 0 : (int) Math.max(0, tStats[0]); - } - - @Override - public int fill(final ItemStack aStack, final FluidStack aFluid, final boolean doFill) { - if ((aStack == null) || (aStack.stackSize != 1)) { - return 0; - } - - final ItemStack tStack = GT_Utility.fillFluidContainer(aFluid, aStack, false, false); - if (tStack != null) { - aStack.setItemDamage(tStack.getItemDamage()); - aStack.func_150996_a(tStack.getItem()); - return GT_Utility.getFluidForFilledItem(tStack, false).amount; - } - - final Long[] tStats = this.getFluidContainerStats(aStack); - if ((tStats == null) || (tStats[0] <= 0) || (aFluid == null) || (aFluid.getFluid().getID() <= 0) || (aFluid.amount <= 0)) { - return 0; - } - - FluidStack tFluid = this.getFluidContent(aStack); - - if ((tFluid == null) || (tFluid.getFluid().getID() <= 0)) { - if (aFluid.amount <= tStats[0]) { - if (doFill) { - this.setFluidContent(aStack, aFluid); - } - return aFluid.amount; - } - if (doFill) { - tFluid = aFluid.copy(); - tFluid.amount = (int) (long) tStats[0]; - this.setFluidContent(aStack, tFluid); - } - return (int) (long) tStats[0]; - } - - if (!tFluid.isFluidEqual(aFluid)) { - return 0; - } - - final int space = (int) (long) tStats[0] - tFluid.amount; - if (aFluid.amount <= space) { - if (doFill) { - tFluid.amount += aFluid.amount; - this.setFluidContent(aStack, tFluid); - } - return aFluid.amount; - } - if (doFill) { - tFluid.amount = (int) (long) tStats[0]; - this.setFluidContent(aStack, tFluid); - } - return space; - } - - @Override - public FluidStack drain(final ItemStack aStack, final int maxDrain, final boolean doDrain) { - if ((aStack == null) || (aStack.stackSize != 1)) { - return null; - } - - FluidStack tFluid = GT_Utility.getFluidForFilledItem(aStack, false); - if ((tFluid != null) && (maxDrain >= tFluid.amount)) { - final ItemStack tStack = GT_Utility.getContainerItem(aStack, false); - if (tStack == null) { - aStack.stackSize = 0; - return tFluid; - } - aStack.setItemDamage(tStack.getItemDamage()); - aStack.func_150996_a(tStack.getItem()); - return tFluid; - } - - final Long[] tStats = this.getFluidContainerStats(aStack); - if ((tStats == null) || (tStats[0] <= 0)) { - return null; - } - - tFluid = this.getFluidContent(aStack); - if (tFluid == null) { - return null; - } - - int used = maxDrain; - if (tFluid.amount < used) { - used = tFluid.amount; - } - if (doDrain) { - tFluid.amount -= used; - this.setFluidContent(aStack, tFluid); - } - - final FluidStack drained = tFluid.copy(); - drained.amount = used; - return drained; - } - - public FluidStack getFluidContent(final ItemStack aStack) { - final Long[] tStats = this.getFluidContainerStats(aStack); - if ((tStats == null) || (tStats[0] <= 0)) { - return GT_Utility.getFluidForFilledItem(aStack, false); - } - final NBTTagCompound tNBT = aStack.getTagCompound(); - return tNBT == null ? null : FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("GT.FluidContent")); - } - - public void setFluidContent(final ItemStack aStack, final FluidStack aFluid) { - NBTTagCompound tNBT = aStack.getTagCompound(); - if (tNBT == null) { - tNBT = new NBTTagCompound(); - } else { - tNBT.removeTag("GT.FluidContent"); - } - if ((aFluid != null) && (aFluid.amount > 0)) { - tNBT.setTag("GT.FluidContent", aFluid.writeToNBT(new NBTTagCompound())); - } - if (tNBT.hasNoTags()) { - aStack.setTagCompound(null); - } else { - aStack.setTagCompound(tNBT); - } - this.isItemStackUsable(aStack); - } - - @Override - public int getItemStackLimit(final ItemStack aStack) { - Long[] tStats = this.getElectricStats(aStack); - if ((tStats != null) && ((tStats[3] == -1) || (tStats[3] == -3)) && (this.getRealCharge(aStack) > 0)) { - return 1; - } - tStats = this.getFluidContainerStats(aStack); - if (tStats != null) { - return (int) (long) tStats[1]; - } - return 64; - } - - @Override - public final Item getChargedItem(final ItemStack itemStack) { - return this; - } - - @Override - public final Item getEmptyItem(final ItemStack itemStack) { - return this; - } - - @Override - public final int getTier(final ItemStack aStack) { - final Long[] tStats = this.getElectricStats(aStack); - return (int) (tStats == null ? Integer.MAX_VALUE : tStats[2]); - } - - @Override - public final String getToolTip(final ItemStack aStack) { - return null; - } // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up at this Point - - @Override - public final IElectricItemManager getManager(final ItemStack aStack) { - return this; - } // We are our own Manager - - @Override - public final boolean getShareTag() { - return true; - } // just to be sure. - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { - return false; - } - - @Override - public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { - return false; - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("LuV")){ - HEX_OxFFFFFF = 0xffffcc; - } - else if (stack.getDisplayName().contains("ZPM")){ - HEX_OxFFFFFF = 0xace600; - } - else if (stack.getDisplayName().contains("UV")){ - HEX_OxFFFFFF = 0xffff00; - } - else if (stack.getDisplayName().contains("MAX")){ - HEX_OxFFFFFF = 0xff0000; - } - else if (stack.getDisplayName().contains("Sodium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); - } - else if (stack.getDisplayName().contains("Cadmium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); - } - else if (stack.getDisplayName().contains("Lithium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); - } - else { - HEX_OxFFFFFF = 0xffffff; - } - return HEX_OxFFFFFF; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java deleted file mode 100644 index a5430846a9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java +++ /dev/null @@ -1,243 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items; - -import java.util.Arrays; -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; - -/** - * @author Gregorius Techneticies - *

- * One Item for everything! - *

- * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar. - * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material. - *

- * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData. - *

- * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item. - */ -public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { - - protected final OrePrefixes[] mGeneratedPrefixList; - - /** - * Creates the Item using these Parameters. - * - * @param aUnlocalized The Unlocalized Name of this Item. - * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated. - */ - public Gregtech_MetaItem_X32(final String aUnlocalized, final OrePrefixes... aGeneratedPrefixList) { - super(aUnlocalized, (short) 32000, (short) 766); - this.mGeneratedPrefixList = Arrays.copyOf(aGeneratedPrefixList, 32); - - for (int i = 0; i < 32000; i++) { - final OrePrefixes tPrefix = this.mGeneratedPrefixList[i / 1000]; - if (tPrefix == null) { - continue; - } - final Materials tMaterial = GregTech_API.sGeneratedMaterials[i % 1000]; - if (tMaterial == null) { - continue; - } - if (this.doesMaterialAllowGeneration(tPrefix, tMaterial)) { - final ItemStack tStack = new ItemStack(this, 1, i); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", this.getDefaultLocalization(tPrefix, tMaterial, i)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / GT_Values.M)); - if (tPrefix.mIsUnificatable) { - GT_OreDictUnificator.set(tPrefix, tMaterial, tStack); - } else { - GT_OreDictUnificator.registerOre(tPrefix.get(tMaterial), tStack); - } - if (((tPrefix == OrePrefixes.stick) || (tPrefix == OrePrefixes.wireFine)) && ((tMaterial == Materials.Lead) || (tMaterial == Materials.Tin) || (tMaterial == Materials.SolderingAlloy))) { - GregTech_API.sSolderingMetalList.add(tStack); - } - } - } - } - - /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ - - /** - * @return the Color Modulation the Material is going to be rendered with. - */ - @Override - public short[] getRGBa(final ItemStack aStack) { - final Materials tMaterial = GregTech_API.sGeneratedMaterials[this.getDamage(aStack) % 1000]; - return tMaterial == null ? Materials._NULL.mRGBa : tMaterial.mRGBa; - } - - /** - * @param aPrefix this can be null, you have to return false in that case - * @param aMaterial this can be null, you have to return false in that case - * @return if this Item should be generated and visible. - */ - public boolean doesMaterialAllowGeneration(final OrePrefixes aPrefix, final Materials aMaterial) { - // You have to check for at least these Conditions in every Case! So add a super Call like the following for this before executing your Code: - // if (!super.doesMaterialAllowGeneration(aPrefix, aMaterial)) return false; - return (aPrefix != null) && (aMaterial != null) && aPrefix.doGenerateItem(aMaterial); - } - - /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ - - /** - * @param aPrefix the OreDict Prefix - * @param aMaterial the Material - * @param aMetaData a Index from [0 - 31999] - * @return the Localized Name when default LangFiles are used. - */ - public String getDefaultLocalization(final OrePrefixes aPrefix, final Materials aMaterial, final int aMetaData) { - return aPrefix.getDefaultLocalNameForItem(aMaterial); - } - - /** - * @param aMetaData a Index from [0 - 31999] - * @param aMaterial the Material - * @return an Icon Container for the Item Display. - */ - public final IIconContainer getIconContainer(final int aMetaData, final Materials aMaterial) { - return (this.mGeneratedPrefixList[aMetaData / 1000] != null) && (this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0) ? aMaterial.mIconSet.mTextures[this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] : null; - } - - /** - * @param aPrefix always != null - * @param aMaterial always != null - * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny Dusts or Crushed Ores as well. - * @return if this Item should be visible in NEI or Creative - */ - public boolean doesShowInCreative(final OrePrefixes aPrefix, final Materials aMaterial, final boolean aDoShowAllItems) { - return true; - } - - /* ---------- INTERNAL OVERRIDES ---------- */ - - @Override - public ItemStack getContainerItem(final ItemStack aStack) { - final int aDamage = aStack.getItemDamage(); - if ((aDamage < 32000) && (aDamage >= 0)) { - final Materials aMaterial = GregTech_API.sGeneratedMaterials[aDamage % 1000]; - if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) { - final OrePrefixes aPrefix = this.mGeneratedPrefixList[aDamage / 1000]; - if (aPrefix != null) { - return GT_Utility.copyAmount(1, aPrefix.mContainerItem); - } - } - } - return null; - } - - @Override - public final IIconContainer getIconContainer(final int aMetaData) { - return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null : this.getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]); - } - - @Override - @SideOnly(Side.CLIENT) - public final void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { - for (int i = 0; i < 32000; i++) { - if (this.doesMaterialAllowGeneration(this.mGeneratedPrefixList[i / 1000], GregTech_API.sGeneratedMaterials[i % 1000]) && this.doesShowInCreative(this.mGeneratedPrefixList[i / 1000], GregTech_API.sGeneratedMaterials[i % 1000], GregTech_API.sDoShowAllItemsInCreative)) { - final ItemStack tStack = new ItemStack(this, 1, i); - this.isItemStackUsable(tStack); - aList.add(tStack); - } - } - super.getSubItems(var1, aCreativeTab, aList); - } - - @Override - public final IIcon getIconFromDamage(final int aMetaData) { - if (aMetaData < 0) { - return null; - } - if (aMetaData < 32000) { - final Materials tMaterial = GregTech_API.sGeneratedMaterials[aMetaData % 1000]; - if (tMaterial == null) { - return null; - } - final IIconContainer tIcon = this.getIconContainer(aMetaData, tMaterial); - if (tIcon != null) { - return tIcon.getIcon(); - } - return null; - } - return (aMetaData - 32000) < this.mIconList.length ? this.mIconList[aMetaData - 32000][0] : null; - } - - @Override - public int getItemStackLimit(final ItemStack aStack) { - final int tDamage = this.getDamage(aStack); - if ((tDamage < 32000) && (this.mGeneratedPrefixList[tDamage / 1000] != null)) { - return Math.min(super.getItemStackLimit(aStack), this.mGeneratedPrefixList[tDamage / 1000].mDefaultStackSize); - } - return super.getItemStackLimit(aStack); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - - int aMeta = stack.getItemDamage(); - if (stack.getDisplayName().contains("Sodium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(90, 90, 255); - } - else if (stack.getDisplayName().contains("Cadmium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(150, 150, 80); - } - else if (stack.getDisplayName().contains("Lithium")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); - } - else if (stack.getDisplayName().contains("Wrought")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); - } - else if (stack.getDisplayName().contains("Bronze")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 128, 0); - } - else if (stack.getDisplayName().contains("Brass")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 180, 0); - } - else if (stack.getDisplayName().contains("Invar")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(180, 180, 120); - } - else { - if (aMeta > 50 && aMeta != 150) { - HEX_OxFFFFFF = 0xffffff; - } - else if (stack.getDisplayName().contains("ULV")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); - } - else if (stack.getDisplayName().contains("LuV")){ - HEX_OxFFFFFF = 0xffffcc; - } - else if (stack.getDisplayName().contains("ZPM")){ - HEX_OxFFFFFF = 0xffe600; - } - else if (stack.getDisplayName().contains("UV")){ - HEX_OxFFFFFF = 0xffb300; - } - else if (stack.getDisplayName().contains("MAX")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250)); - } - else { - HEX_OxFFFFFF = 0xffffff; - } - } - return HEX_OxFFFFFF; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java deleted file mode 100644 index ae84afb056..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java +++ /dev/null @@ -1,503 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import cpw.mods.fml.common.Optional; - -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.item.EntityMinecart; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.stats.AchievementList; -import net.minecraft.stats.StatList; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.Materials; -import gregtech.api.interfaces.IDamagableItem; -import gregtech.api.interfaces.IToolStats; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -import buildcraft.api.tools.IToolWrench; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; -import mods.railcraft.api.core.items.IToolCrowbar; -import net.minecraftforge.event.world.BlockEvent; - -/** - * This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench: - * GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(16, 1, Materials.Bismuth, Materials.Bismuth, null); - */ -@Optional.InterfaceList({@Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = "Forestry"), - @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "Railcraft"), - @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"), - @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO")}) -public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements IDamagableItem, IToolCrowbar, IToolWrench { - /** - * All instances of this Item Class are listed here. - * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. - *

- * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. - */ - public static final HashMap sInstances = new HashMap<>(); - - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - - public final HashMap mToolStats = new HashMap<>(); - - /** - * Creates the Item using these Parameters. - * - * @param aUnlocalized The Unlocalized Name of this Item. - */ - public Gregtech_MetaTool(final String aUnlocalized) { - super(aUnlocalized); - GT_ModHandler.registerBoxableItemToToolBox(this); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setMaxStackSize(1); - sInstances.put(this.getUnlocalizedName(), this); - } - - /** - * Called by the Block Harvesting Event within the GT_Proxy - */ - @Override - public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { - final IToolStats tStats = this.getToolStats(aStack); - if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { - this.doDamage(aStack, tStats.convertBlockDrops(aDrops, aStack, aPlayer, aBlock, aX, aY, aZ, aMetaData, aFortune, aSilkTouch, aEvent) * tStats.getToolDamagePerDropConversion()); - } - } - - @Override - public boolean onLeftClickEntity(final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats == null) || !this.isItemStackUsable(aStack)) { - return true; - } - GT_Utility.doSoundAtClient(tStats.getEntityHitSound(), 1, 1.0F); - if (super.onLeftClickEntity(aStack, aPlayer, aEntity)) { - return true; - } - if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) { - final float tMagicDamage = tStats.getMagicDamageAgainstEntity(aEntity instanceof EntityLivingBase ? EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) : 0.0F, aEntity, aStack, aPlayer); - float tDamage = tStats.getNormalDamageAgainstEntity((float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + this.getToolCombatDamage(aStack), aEntity, aStack, aPlayer); - if ((tDamage + tMagicDamage) > 0.0F) { - final boolean tCriticalHit = (aPlayer.fallDistance > 0.0F) && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) && (aPlayer.ridingEntity == null) && (aEntity instanceof EntityLivingBase); - if (tCriticalHit && (tDamage > 0.0F)) { - tDamage *= 1.5F; - } - tDamage += tMagicDamage; - if (aEntity.attackEntityFrom(tStats.getDamageSource(aPlayer, aEntity), tDamage)) { - if (aEntity instanceof EntityLivingBase) { - aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4); - } - final int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + (aEntity instanceof EntityLivingBase ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) : 0); - if (tKnockcack > 0) { - aEntity.addVelocity(-MathHelper.sin((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F, 0.1D, MathHelper.cos((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F); - aPlayer.motionX *= 0.6D; - aPlayer.motionZ *= 0.6D; - aPlayer.setSprinting(false); - } - if (tCriticalHit) { - aPlayer.onCriticalHit(aEntity); - } - if (tMagicDamage > 0.0F) { - aPlayer.onEnchantmentCritical(aEntity); - } - if (tDamage >= 18.0F) { - aPlayer.triggerAchievement(AchievementList.overkill); - } - aPlayer.setLastAttacker(aEntity); - if (aEntity instanceof EntityLivingBase) { - EnchantmentHelper.func_151384_a((EntityLivingBase) aEntity, aPlayer); - } - EnchantmentHelper.func_151385_b(aPlayer, aEntity); - if (aEntity instanceof EntityLivingBase) { - aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F)); - } - aEntity.hurtResistantTime = Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); - aPlayer.addExhaustion(0.3F); - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - } - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - } - return true; - } - - @Override - public ItemStack onItemRightClick(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats != null) && tStats.canBlock()) { - aPlayer.setItemInUse(aStack, 72000); - } - return super.onItemRightClick(aStack, aWorld, aPlayer); - } - - - @SuppressWarnings("unchecked") - public void addAdditionalToolTips(final List aList, final ItemStack aStack) { - final long tMaxDamage = getToolMaxDamage(aStack); - final Materials tMaterial = getPrimaryMaterial(aStack); - final IToolStats tStats = this.getToolStats(aStack); - final int tOffset = this.getElectricStats(aStack) != null ? 2 : 1; - if (tStats != null) { - final String name = aStack.getUnlocalizedName(); - if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") || name.equals("gt.metatool.01.174") || name.equals("gt.metatool.01.176")) { - aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); - aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficency: " + EnumChatFormatting.BLUE + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Steam flow: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "L/sec"); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 25) + EnumChatFormatting.GRAY + "EU/t"); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "EU/t"); - - } else { - aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); - aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Attack Damage: " + EnumChatFormatting.BLUE + this.getToolCombatDamage(aStack) + EnumChatFormatting.GRAY); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Mining Speed: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + EnumChatFormatting.GRAY); - } - } - } - - @SuppressWarnings("unchecked") - public void addAdditionalToolTips(final List aList, final ItemStack aStack, final EntityPlayer aPlayer) { - final long tMaxDamage = getToolMaxDamage(aStack); - final Materials tMaterial = getPrimaryMaterial(aStack); - final IToolStats tStats = this.getToolStats(aStack); - final int tOffset = this.getElectricStats(aStack) != null ? 2 : 1; - if (tStats != null) { - final String name = aStack.getUnlocalizedName(); - if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") || name.equals("gt.metatool.01.174") || name.equals("gt.metatool.01.176")) { - aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); - aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficency: " + EnumChatFormatting.BLUE + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Steam flow: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "L/sec"); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 50) + EnumChatFormatting.GRAY + "EU/t"); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "EU/t"); - - } else { - aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); - aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Attack Damage: " + EnumChatFormatting.BLUE + this.getToolCombatDamage(aStack) + EnumChatFormatting.GRAY); - aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Mining Speed: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + EnumChatFormatting.GRAY); - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if ((aNBT != null) && aNBT.hasKey("Heat")){ - int tHeat = aNBT.getInteger("Heat"); - final long tWorldTime = aPlayer.getEntityWorld().getWorldTime(); - if(aNBT.hasKey("HeatTime")){ - final long tHeatTime = aNBT.getLong("HeatTime"); - if(tWorldTime>(tHeatTime+10)){ - tHeat = (int) (tHeat - ((tWorldTime-tHeatTime)/10)); - if((tHeat<300)&&(tHeat>-10000)) { - tHeat=300; - } - } - aNBT.setLong("HeatTime", tWorldTime); - if(tHeat>-10000) { - aNBT.setInteger("Heat", tHeat); - } - } - - aList.add(tOffset + 3, EnumChatFormatting.RED + "Heat: " + aNBT.getInteger("Heat")+" K" + EnumChatFormatting.GRAY); - } - } - } - } - } - - @Override - public Long[] getFluidContainerStats(final ItemStack aStack) { - return null; - } - - @Override - public Long[] getElectricStats(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if ((aNBT != null) && aNBT.getBoolean("Electric")) { - return new Long[]{aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData")}; - } - } - return new Long[] {}; - } - - @Override - public float getToolCombatDamage(final ItemStack aStack) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats == null) { - return 0; - } - return tStats.getBaseDamage() + getPrimaryMaterial(aStack).mToolQuality; - } - - @Override - public float getDigSpeed(final ItemStack aStack, final Block aBlock, final int aMetaData) { - if (!this.isItemStackUsable(aStack)) { - return 0.0F; - } - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats == null) || (Math.max(0, this.getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))) { - return 0.0F; - } - return tStats.isMinableBlock(aBlock, (byte) aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; - } - - @Override - public boolean onBlockDestroyed(final ItemStack aStack, final World aWorld, final Block aBlock, final int aX, final int aY, final int aZ, final EntityLivingBase aPlayer) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - if (tStats == null) { - return false; - } - GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F); - this.doDamage(aStack, (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); - return this.getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F; - } - - private ItemStack getContainerItem(ItemStack aStack, final boolean playSound) { - if (!this.isItemStackUsable(aStack)) { - return null; - } - aStack = GT_Utility.copyAmount(1, aStack); - final IToolStats tStats = this.getToolStats(aStack); - if (tStats == null) { - return null; - } - this.doDamage(aStack, tStats.getToolDamagePerContainerCraft()); - aStack = aStack.stackSize > 0 ? aStack : null; - if (playSound) { - //String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound(); - //GT_Utility.doSoundAtClient(sound, 1, 1.0F); - } - return aStack; - } - - @Override - public Interface_ToolStats getToolStats(final ItemStack aStack) { - this.isItemStackUsable(aStack); - return this.getToolStatsInternal(aStack); - } - - private Interface_ToolStats getToolStatsInternal(final ItemStack aStack) { - return (Interface_ToolStats) (aStack == null ? null : this.mToolStats.get((short) aStack.getItemDamage())); - } - - @Override - public boolean canWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isCrowbar(); - } - - @Override - public void onWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats != null) { - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - - @Override - public boolean canWrench(final EntityPlayer player, final int x, final int y, final int z) { - //System.out.println("canWrench"); - if(player==null) { - return false; - } - if(player.getCurrentEquippedItem()==null) { - return false; - } - if (!this.isItemStackUsable(player.getCurrentEquippedItem())) { - return false; - } - final Interface_ToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); - return (tStats != null) && tStats.isWrench(); - } - - @Override - public void wrenchUsed(final EntityPlayer player, final int x, final int y, final int z) { - if(player==null) { - return; - } - if(player.getCurrentEquippedItem()==null) { - return; - } - final IToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); - if (tStats != null) { - this.doDamage(player.getCurrentEquippedItem(), tStats.getToolDamagePerEntityAttack()); - } - } - - @Override - public boolean canLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isCrowbar(); - } - - @Override - public void onLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats != null) { - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - - @Override - public boolean canBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isCrowbar(); - } - - @Override - public void onBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats != null) { - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - - @Override - public void onCreated(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats != null) && (aPlayer != null)) { - tStats.onToolCrafted(aStack, aPlayer); - } - super.onCreated(aStack, aWorld, aPlayer); - } - - @Override - public boolean isFull3D() { - return true; - } - - @Override - public boolean isItemStackUsable(final ItemStack aStack) { - final IToolStats tStats = this.getToolStatsInternal(aStack); - if (((aStack.getItemDamage() % 2) == 1) || (tStats == null)) { - final NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT.removeTag("ench"); - } - return false; - } - final Materials aMaterial = getPrimaryMaterial(aStack); - final HashMap tMap = new HashMap<>(), tResult = new HashMap<>(); - if (aMaterial.mEnchantmentTools != null) { - tMap.put(aMaterial.mEnchantmentTools.effectId, (int) aMaterial.mEnchantmentToolsLevel); - if (aMaterial.mEnchantmentTools == Enchantment.fortune) { - tMap.put(Enchantment.looting.effectId, (int) aMaterial.mEnchantmentToolsLevel); - } - if (aMaterial.mEnchantmentTools == Enchantment.knockback) { - tMap.put(Enchantment.power.effectId, (int) aMaterial.mEnchantmentToolsLevel); - } - if (aMaterial.mEnchantmentTools == Enchantment.fireAspect) { - tMap.put(Enchantment.flame.effectId, (int) aMaterial.mEnchantmentToolsLevel); - } - } - final Enchantment[] tEnchants = tStats.getEnchantments(aStack); - final int[] tLevels = tStats.getEnchantmentLevels(aStack); - for (int i = 0; i < tEnchants.length; i++) { - if (tLevels[i] > 0) { - final Integer tLevel = tMap.get(tEnchants[i].effectId); - tMap.put(tEnchants[i].effectId, tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); - } - } - for (final Entry tEntry : tMap.entrySet()) { - if ((tEntry.getKey() == 33) || ((tEntry.getKey() == 20) && (tEntry.getValue() > 2)) || (tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId)) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } else { - switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { - case weapon: - if (tStats.isWeapon()) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } - break; - case all: - tResult.put(tEntry.getKey(), tEntry.getValue()); - break; - case armor: - case armor_feet: - case armor_head: - case armor_legs: - case armor_torso: - break; - case bow: - if (tStats.isRangedWeapon()) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } - break; - case breakable: - break; - case fishing_rod: - break; - case digger: - if (tStats.isMiningTool()) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } - break; - } - } - } - EnchantmentHelper.setEnchantments(tResult, aStack); - return true; - } - - @Override - public short getChargedMetaData(final ItemStack aStack) { - return (short) (aStack.getItemDamage() - (aStack.getItemDamage() % 2)); - } - - @Override - public short getEmptyMetaData(final ItemStack aStack) { - final NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT.removeTag("ench"); - } - return (short) ((aStack.getItemDamage() + 1) - (aStack.getItemDamage() % 2)); - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { - return false; - } - - @Override - public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java deleted file mode 100644 index 6f4202fdd8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java +++ /dev/null @@ -1,546 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items.tools; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.item.EntityMinecart; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.stats.AchievementList; -import net.minecraft.stats.StatList; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TC_Aspects.TC_AspectStack; -import gregtech.api.interfaces.IToolStats; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.*; - -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; -import net.minecraftforge.event.world.BlockEvent; - -/** - * This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench: - * GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(16, 1, Materials.Bismuth, Materials.Bismuth, null); - */ -public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool { - /** - * All instances of this Item Class are listed here. - * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. - *

- * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. - */ - public static final HashMap sInstances = new HashMap<>(); - - /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ - - public final HashMap mToolStats = new HashMap<>(); - - /** - * Creates the Item using these Parameters. - * - * @param aUnlocalized The Unlocalized Name of this Item. - */ - public GT_MetaGenTool(final String aUnlocalized) { - super(aUnlocalized); - GT_ModHandler.registerBoxableItemToToolBox(this); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - this.setMaxStackSize(1); - sInstances.put(this.getUnlocalizedName(), this); - } - - /* ---------- FOR ADDING CUSTOM ITEMS INTO THE REMAINING 766 RANGE ---------- */ - - public static final Materials getPrimaryMaterialEx(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if (aNBT != null) { - return Materials.getRealMaterial(aNBT.getString("PrimaryMaterial")); - } - } - return Materials._NULL; - } - - public static final Materials getSecondaryMaterialEx(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if (aNBT != null) { - return Materials.getRealMaterial(aNBT.getString("SecondaryMaterial")); - } - } - return Materials._NULL; - } - - /** - * This adds a Custom Item to the ending Range. - * - * @param aID The Id of the assigned Tool Class [0 - 32765] (only even Numbers allowed! Uneven ID's are empty electric Items) - * @param aEnglish The Default Localized Name of the created Item - * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip - * @param aToolStats The Food Value of this Item. Can be null as well. - * @param aOreDictNamesAndAspects The OreDict Names you want to give the Item. Also used to assign Thaumcraft Aspects. - * @return An ItemStack containing the newly created Item, but without specific Stats. - */ - public final ItemStack addToolEx(final int aID, final String aEnglish, String aToolTip, final IToolStats aToolStats, final Object... aOreDictNamesAndAspects) { - if (aToolTip == null) { - aToolTip = ""; - } - if ((aID >= 0) && (aID < 32766) && ((aID % 2) == 0)) { - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + aID + ".name", aEnglish); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + aID + ".tooltip", aToolTip); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + (aID + 1) + ".name", aEnglish + " (Empty)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + (aID + 1) + ".tooltip", "You need to recharge it"); - this.mToolStats.put((short) aID, aToolStats); - this.mToolStats.put((short) (aID + 1), aToolStats); - aToolStats.onStatsAddedToTool(this, aID); - final ItemStack rStack = new ItemStack(this, 1, aID); - final List tAspects = new ArrayList<>(); - for (final Object tOreDictNameOrAspect : aOreDictNamesAndAspects) { - if (tOreDictNameOrAspect instanceof TC_AspectStack) { - ((TC_AspectStack) tOreDictNameOrAspect).addToAspectList(tAspects); - } else { - GT_OreDictUnificator.registerOre(tOreDictNameOrAspect, rStack); - } - } - if (GregTech_API.sThaumcraftCompat != null) { - GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); - } - return rStack; - } - return null; - } - - /** - * This Function gets an ItemStack Version of this Tool - * - * @param aToolID the ID of the Tool Class - * @param aAmount Amount of Items (well normally you only need 1) - * @param aPrimaryMaterial Primary Material of this Tool - * @param aSecondaryMaterial Secondary (Rod/Handle) Material of this Tool - * @param aElectricArray The Electric Stats of this Tool (or null if not electric) - */ - public final ItemStack getToolWithStatsEx(final int aToolID, final int aAmount, final Materials aPrimaryMaterial, final Materials aSecondaryMaterial, final long[] aElectricArray) { - final ItemStack rStack = new ItemStack(this, aAmount, aToolID); - final IToolStats tToolStats = this.getToolStats(rStack); - if (tToolStats != null) { - final NBTTagCompound tMainNBT = new NBTTagCompound(), tToolNBT = new NBTTagCompound(); - if (aPrimaryMaterial != null) { - tToolNBT.setString("PrimaryMaterial", aPrimaryMaterial.toString()); - tToolNBT.setLong("MaxDamage", 100L * (long) (aPrimaryMaterial.mDurability * tToolStats.getMaxDurabilityMultiplier())); - } - if (aSecondaryMaterial != null) { - tToolNBT.setString("SecondaryMaterial", aSecondaryMaterial.toString()); - } - - if (aElectricArray != null) { - tToolNBT.setBoolean("Electric", true); - tToolNBT.setLong("MaxCharge", aElectricArray[0]); - tToolNBT.setLong("Voltage", aElectricArray[1]); - tToolNBT.setLong("Tier", aElectricArray[2]); - tToolNBT.setLong("SpecialData", aElectricArray[3]); - } - - tMainNBT.setTag("GT.ToolStats", tToolNBT); - rStack.setTagCompound(tMainNBT); - } - this.isItemStackUsable(rStack); - return rStack; - } - - /** - * Called by the Block Harvesting Event within the GT_Proxy - */ - @Override - public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { - final IToolStats tStats = this.getToolStats(aStack); - if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { - this.doDamage(aStack, tStats.convertBlockDrops(aDrops, aStack, aPlayer, aBlock, aX, aY, aZ, aMetaData, aFortune, aSilkTouch, aEvent) * tStats.getToolDamagePerDropConversion()); - } - } - - @Override - public boolean onLeftClickEntity(final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats == null) || !this.isItemStackUsable(aStack)) { - return true; - } - GT_Utility.doSoundAtClient(tStats.getEntityHitSound(), 1, 1.0F); - if (super.onLeftClickEntity(aStack, aPlayer, aEntity)) { - return true; - } - if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) { - final float tMagicDamage = tStats.getMagicDamageAgainstEntity(aEntity instanceof EntityLivingBase ? EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) : 0.0F, aEntity, aStack, aPlayer); - float tDamage = tStats.getNormalDamageAgainstEntity((float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + this.getToolCombatDamage(aStack), aEntity, aStack, aPlayer); - if ((tDamage + tMagicDamage) > 0.0F) { - final boolean tCriticalHit = (aPlayer.fallDistance > 0.0F) && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) && (aPlayer.ridingEntity == null) && (aEntity instanceof EntityLivingBase); - if (tCriticalHit && (tDamage > 0.0F)) { - tDamage *= 1.5F; - } - tDamage += tMagicDamage; - if (aEntity.attackEntityFrom(tStats.getDamageSource(aPlayer, aEntity), tDamage)) { - if (aEntity instanceof EntityLivingBase) { - aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4); - } - final int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + (aEntity instanceof EntityLivingBase ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) : 0); - if (tKnockcack > 0) { - aEntity.addVelocity(-MathHelper.sin((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F, 0.1D, MathHelper.cos((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F); - aPlayer.motionX *= 0.6D; - aPlayer.motionZ *= 0.6D; - aPlayer.setSprinting(false); - } - if (tCriticalHit) { - aPlayer.onCriticalHit(aEntity); - } - if (tMagicDamage > 0.0F) { - aPlayer.onEnchantmentCritical(aEntity); - } - if (tDamage >= 18.0F) { - aPlayer.triggerAchievement(AchievementList.overkill); - } - aPlayer.setLastAttacker(aEntity); - if (aEntity instanceof EntityLivingBase) { - EnchantmentHelper.func_151384_a((EntityLivingBase) aEntity, aPlayer); - } - EnchantmentHelper.func_151385_b(aPlayer, aEntity); - if (aEntity instanceof EntityLivingBase) { - aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F)); - } - aEntity.hurtResistantTime = Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); - aPlayer.addExhaustion(0.3F); - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - } - if (aStack.stackSize <= 0) { - aPlayer.destroyCurrentEquippedItem(); - } - return true; - } - - @Override - public ItemStack onItemRightClick(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats != null) && tStats.canBlock()) { - aPlayer.setItemInUse(aStack, 72000); - } - return super.onItemRightClick(aStack, aWorld, aPlayer); - } - - - @Override - public Long[] getFluidContainerStats(final ItemStack aStack) { - return null; - } - - @Override - public Long[] getElectricStats(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if ((aNBT != null) && aNBT.getBoolean("Electric")) { - return new Long[]{aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData")}; - } - } - return null; - } - - @Override - public float getToolCombatDamage(final ItemStack aStack) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats == null) { - return 0; - } - return tStats.getBaseDamage() + getPrimaryMaterial(aStack).mToolQuality; - } - - @Override - public float getDigSpeed(final ItemStack aStack, final Block aBlock, final int aMetaData) { - if (!this.isItemStackUsable(aStack)) { - return 0.0F; - } - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats == null) || (Math.max(0, this.getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))) { - return 0.0F; - } - return tStats.isMinableBlock(aBlock, (byte) aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; - } - - @Override - public boolean onBlockDestroyed(final ItemStack aStack, final World aWorld, final Block aBlock, final int aX, final int aY, final int aZ, final EntityLivingBase aPlayer) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - if (tStats == null) { - return false; - } - GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F); - this.doDamage(aStack, (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); - return this.getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F; - } - - private ItemStack getContainerItem(ItemStack aStack, final boolean playSound) { - if (!this.isItemStackUsable(aStack)) { - return null; - } - aStack = GT_Utility.copyAmount(1, aStack); - final IToolStats tStats = this.getToolStats(aStack); - if (tStats == null) { - return null; - } - this.doDamage(aStack, tStats.getToolDamagePerContainerCraft()); - aStack = aStack.stackSize > 0 ? aStack : null; - if (playSound) { - //String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound(); - //GT_Utility.doSoundAtClient(sound, 1, 1.0F); - } - return aStack; - } - - @Override - public Interface_ToolStats getToolStats(final ItemStack aStack) { - this.isItemStackUsable(aStack); - return this.getToolStatsInternal(aStack); - } - - private Interface_ToolStats getToolStatsInternal(final ItemStack aStack) { - return (Interface_ToolStats) (aStack == null ? null : this.mToolStats.get((short) aStack.getItemDamage())); - } - - @Override - public float getSaplingModifier(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer, final int aX, final int aY, final int aZ) { - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isGrafter() ? Math.min(100.0F, (1 + this.getHarvestLevel(aStack, "")) * 20.0F) : 0.0F; - } - - @Override - public boolean canWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isCrowbar(); - } - - @Override - public void onWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats != null) { - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - - public boolean canWrench(final EntityPlayer player, final int x, final int y, final int z) { - System.out.println("canWrench"); - if(player==null) { - return false; - } - if(player.getCurrentEquippedItem()==null) { - return false; - } - if (!this.isItemStackUsable(player.getCurrentEquippedItem())) { - return false; - } - final Interface_ToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); - return (tStats != null) && tStats.isWrench(); - } - - public void wrenchUsed(final EntityPlayer player, final int x, final int y, final int z) { - if(player==null) { - return; - } - if(player.getCurrentEquippedItem()==null) { - return; - } - final IToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); - if (tStats != null) { - this.doDamage(player.getCurrentEquippedItem(), tStats.getToolDamagePerEntityAttack()); - } - } - - public boolean canUse(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){ - return this.canWrench(player, x, y, z); - } - - public void used(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){ - this.wrenchUsed(player, x, y, z); - } - - public boolean shouldHideFacades(final ItemStack stack, final EntityPlayer player) { - if(player==null) { - return false; - } - if(player.getCurrentEquippedItem()==null) { - return false; - } - if (!this.isItemStackUsable(player.getCurrentEquippedItem())) { - return false; - } - final Interface_ToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); - return tStats.isWrench(); - } - - @Override - public boolean canLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isCrowbar(); - } - - @Override - public void onLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats != null) { - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - - @Override - public boolean canBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - if (!this.isItemStackUsable(aStack)) { - return false; - } - final IToolStats tStats = this.getToolStats(aStack); - return (tStats != null) && tStats.isCrowbar(); - } - - @Override - public void onBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { - final IToolStats tStats = this.getToolStats(aStack); - if (tStats != null) { - this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); - } - } - - @Override - public void onCreated(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - final IToolStats tStats = this.getToolStats(aStack); - if ((tStats != null) && (aPlayer != null)) { - tStats.onToolCrafted(aStack, aPlayer); - } - super.onCreated(aStack, aWorld, aPlayer); - } - - @Override - public boolean isFull3D() { - return true; - } - - @Override - public boolean isItemStackUsable(final ItemStack aStack) { - final IToolStats tStats = this.getToolStatsInternal(aStack); - if (((aStack.getItemDamage() % 2) == 1) || (tStats == null)) { - final NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT.removeTag("ench"); - } - return false; - } - final Materials aMaterial = getPrimaryMaterial(aStack); - final HashMap tMap = new HashMap<>(), tResult = new HashMap<>(); - if (aMaterial.mEnchantmentTools != null) { - tMap.put(aMaterial.mEnchantmentTools.effectId, (int) aMaterial.mEnchantmentToolsLevel); - if (aMaterial.mEnchantmentTools == Enchantment.fortune) { - tMap.put(Enchantment.looting.effectId, (int) aMaterial.mEnchantmentToolsLevel); - } - if (aMaterial.mEnchantmentTools == Enchantment.knockback) { - tMap.put(Enchantment.power.effectId, (int) aMaterial.mEnchantmentToolsLevel); - } - if (aMaterial.mEnchantmentTools == Enchantment.fireAspect) { - tMap.put(Enchantment.flame.effectId, (int) aMaterial.mEnchantmentToolsLevel); - } - } - final Enchantment[] tEnchants = tStats.getEnchantments(aStack); - final int[] tLevels = tStats.getEnchantmentLevels(aStack); - for (int i = 0; i < tEnchants.length; i++) { - if (tLevels[i] > 0) { - final Integer tLevel = tMap.get(tEnchants[i].effectId); - tMap.put(tEnchants[i].effectId, tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); - } - } - for (final Entry tEntry : tMap.entrySet()) { - if ((tEntry.getKey() == 33) || ((tEntry.getKey() == 20) && (tEntry.getValue() > 2)) || (tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId)) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } else { - switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { - case weapon: - if (tStats.isWeapon()) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } - break; - case all: - tResult.put(tEntry.getKey(), tEntry.getValue()); - break; - case armor: - case armor_feet: - case armor_head: - case armor_legs: - case armor_torso: - break; - case bow: - if (tStats.isRangedWeapon()) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } - break; - case breakable: - break; - case fishing_rod: - break; - case digger: - if (tStats.isMiningTool()) { - tResult.put(tEntry.getKey(), tEntry.getValue()); - } - break; - } - } - } - EnchantmentHelper.setEnchantments(tResult, aStack); - return true; - } - - @Override - public short getChargedMetaData(final ItemStack aStack) { - return (short) (aStack.getItemDamage() - (aStack.getItemDamage() % 2)); - } - - @Override - public short getEmptyMetaData(final ItemStack aStack) { - final NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT.removeTag("ench"); - } - return (short) ((aStack.getItemDamage() + 1) - (aStack.getItemDamage() % 2)); - } - - @Override - public int getItemEnchantability() { - return 0; - } - - @Override - public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { - return false; - } - - @Override - public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java deleted file mode 100644 index cefd72332b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java +++ /dev/null @@ -1,85 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items.types; - -import java.util.List; - -import net.minecraft.block.BlockDispenser; -import net.minecraft.dispenser.BehaviorDefaultDispenseItem; -import net.minecraft.dispenser.IBlockSource; -import net.minecraft.dispenser.IPosition; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -import gregtech.api.enums.SubTag; - -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ItemBehaviour; -import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_Base; - -public class ToolType_Base implements Interface_ItemBehaviour { - @Override - public boolean onLeftClickEntity(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { - return false; - } - - @Override - public boolean onItemUse(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - return false; - } - - @Override - public boolean onItemUseFirst(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - return false; - } - - @Override - public ItemStack onItemRightClick(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { - return aStack; - } - - @Override - public List getAdditionalToolTips(final Gregtech_MetaItem_Base aItem, final List aList, final ItemStack aStack) { - return aList; - } - - @Override - public void onUpdate(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final World aWorld, final Entity aPlayer, final int aTimer, final boolean aIsInHand) { - } - - @Override - public boolean isItemStackUsable(final Gregtech_MetaItem_Base aItem, final ItemStack aStack) { - return true; - } - - @Override - public boolean canDispense(final Gregtech_MetaItem_Base aItem, final IBlockSource aSource, final ItemStack aStack) { - return false; - } - - @Override - public ItemStack onDispense(final Gregtech_MetaItem_Base aItem, final IBlockSource aSource, final ItemStack aStack) { - final EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); - final IPosition iposition = BlockDispenser.func_149939_a(aSource); - final ItemStack itemstack1 = aStack.splitStack(1); - BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition); - return aStack; - } - - @Override - public boolean hasProjectile(final Gregtech_MetaItem_Base aItem, final SubTag aProjectileType, final ItemStack aStack) { - return false; - } - - @Override - public EntityArrow getProjectile(final Gregtech_MetaItem_Base aItem, final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final double aX, final double aY, final double aZ) { - return null; - } - - @Override - public EntityArrow getProjectile(final Gregtech_MetaItem_Base aItem, final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final EntityLivingBase aEntity, final float aSpeed) { - return null; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java deleted file mode 100644 index d4f5a87006..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java +++ /dev/null @@ -1,125 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items.types; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.ItemData; -import gregtech.api.util.*; -import gregtech.common.blocks.GT_Block_Ores; -import gregtech.common.blocks.GT_TileEntity_Ores; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidBlock; - -public class ToolType_HardHammer -extends ToolType_Base { - private final int mVanillaCosts; - private final int mEUCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting"); - - public ToolType_HardHammer(final int aVanillaCosts, final int aEUCosts) { - this.mVanillaCosts = aVanillaCosts; - this.mEUCosts = aEUCosts; - } - - public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - if (aWorld.isRemote) { - return false; - } - final Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) { - return false; - } - final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); - - - ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { - GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); - return true; - } - if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone))) { - if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); - int tX = aX; - int tY = aY; - int tZ = aZ; - int tMetaID = 0; - final int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0; - - int i = 0; - for (final int j = 6 + tQuality; i < j; i++) { - tX -= ForgeDirection.getOrientation(aSide).offsetX; - tY -= ForgeDirection.getOrientation(aSide).offsetY; - tZ -= ForgeDirection.getOrientation(aSide).offsetZ; - - final Block tBlock = aWorld.getBlock(tX, tY, tZ); - if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) { - GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Rock."); - break; - } - if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) { - GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Rock."); - break; - } - if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) { - GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Rock."); - break; - } - if (tBlock != aBlock) { - if (i >= 4) { - break; - } - GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Rock."); - break; - } - } - final Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide); - i = 0; - for (final int j = 9 + (2 * tQuality); i < j; i++) { - tX = (aX - 4 - tQuality) + tRandom.nextInt(j); - tY = (aY - 4 - tQuality) + tRandom.nextInt(j); - tZ = (aZ - 4 - tQuality) + tRandom.nextInt(j); - final Block tBlock = aWorld.getBlock(tX, tY, tZ); - if ((tBlock instanceof GT_Block_Ores)) { - final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); - if ((tTileEntity instanceof GT_TileEntity_Ores)) { - final Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; - if ((tMaterial != null) && (tMaterial != Materials._NULL)) { - GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore."); - return true; - } - } - } else { - tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); - tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { - GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); - return true; - } - } - } - GT_Utility.sendChatToPlayer(aPlayer, "No Ores found."); - } - return true; - } - return false; - } - - public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { - aList.add(this.mTooltip); - return aList; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java deleted file mode 100644 index f62d9e5cfa..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items.types; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -import ic2.api.tile.IWrenchable; -import net.minecraftforge.common.util.ForgeDirection; - -public class ToolType_Pump -extends ToolType_Base { - private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.pump", "Sucks in Machine Input Fluid tank contents on Rightclick"); - - public ToolType_Pump(final int aCosts) { - this.mCosts = aCosts; - } - - public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - if (aWorld.isRemote) { - return false; - } - final Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) { - return false; - } - final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); - final byte aTargetSide = GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ); - final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - /*try { - if ((aTileEntity != null) && ((aTileEntity instanceof IWrenchable))) { - if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - ((IWrenchable) aTileEntity).setFacing(aTargetSide); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if (((IWrenchable) aTileEntity).wrenchCanRemove(aPlayer)) { - final int tDamage = ((IWrenchable) aTileEntity).getWrenchDropRate() < 1.0F ? 10 : 3; - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, tDamage * this.mCosts))) { - ItemStack tOutput = ((IWrenchable) aTileEntity).getWrenchDrop(aPlayer); - for (final ItemStack tStack : aBlock.getDrops(aWorld, aX, aY, aZ, aMeta, 0)) { - if (tOutput == null) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); - } else { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); - tOutput = null; - } - } - aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - return true; - } - } catch (final Throwable e) { - } - if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.crafting_table) || (aBlock == Blocks.bookshelf)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); - aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if (aMeta == aTargetSide) { - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.hopper)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); - aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - } else { - if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { - if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.trapped_chest)) { - if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if (aBlock == Blocks.hopper) { - if ((aTargetSide != 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - } - if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)).contains(ForgeDirection.getOrientation(aTargetSide))) && - ((aPlayer.capabilities.isCreativeMode) || (!GT_ModHandler.isElectricItem(aStack)) || (GT_ModHandler.canUseElectricItem(aStack, this.mCosts))) && - (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) { - if (!aPlayer.capabilities.isCreativeMode) { - ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); - } - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - }*/ - return false; - } - - public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { - aList.add(this.mTooltip); - return aList; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java deleted file mode 100644 index d0ef6a535c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.items.types; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -import ic2.api.tile.IWrenchable; -import net.minecraftforge.common.util.ForgeDirection; - -public class ToolType_Wrench -extends ToolType_Base { - private final int mCosts; - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick"); - - public ToolType_Wrench(final int aCosts) { - this.mCosts = aCosts; - } - - public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - if (aWorld.isRemote) { - return false; - } - final Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) { - return false; - } - final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); - final byte aTargetSide = GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ); - final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - try { - if ((aTileEntity != null) && ((aTileEntity instanceof IWrenchable))) { - if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - ((IWrenchable) aTileEntity).setFacing(aTargetSide); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if (((IWrenchable) aTileEntity).wrenchCanRemove(aPlayer)) { - final int tDamage = ((IWrenchable) aTileEntity).getWrenchDropRate() < 1.0F ? 10 : 3; - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, tDamage * this.mCosts))) { - ItemStack tOutput = ((IWrenchable) aTileEntity).getWrenchDrop(aPlayer); - for (final ItemStack tStack : aBlock.getDrops(aWorld, aX, aY, aZ, aMeta, 0)) { - if (tOutput == null) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); - } else { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); - tOutput = null; - } - } - aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - return true; - } - } catch (final Throwable e) { - } - if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.crafting_table) || (aBlock == Blocks.bookshelf)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); - aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if (aMeta == aTargetSide) { - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.hopper)) { - if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { - aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); - aWorld.setBlockToAir(aX, aY, aZ); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - } else { - if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { - if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.trapped_chest)) { - if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - if (aBlock == Blocks.hopper) { - if ((aTargetSide != 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { - aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return true; - } - } - if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)).contains(ForgeDirection.getOrientation(aTargetSide))) && - ((aPlayer.capabilities.isCreativeMode) || (!GT_ModHandler.isElectricItem(aStack)) || (GT_ModHandler.canUseElectricItem(aStack, this.mCosts))) && - (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) { - if (!aPlayer.capabilities.isCreativeMode) { - ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); - } - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); - } - return false; - } - - public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { - aList.add(this.mTooltip); - return aList; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java deleted file mode 100644 index 6967c8eb33..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java +++ /dev/null @@ -1,197 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Random; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import ic2.api.Direction; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class BaseCustomTileEntity extends BaseMetaTileEntity { - - protected NBTTagCompound mRecipeStuff2; - private static final Field ENTITY_ITEM_HEALTH_FIELD_2; - - static { - Field f = null; - try { - f = EntityItem.class.getDeclaredField("field_70291_e"); - f.setAccessible(true); - } catch (Exception var4) { - try { - f = EntityItem.class.getDeclaredField("health"); - f.setAccessible(true); - } catch (Exception var3) { - var4.printStackTrace(); - var3.printStackTrace(); - } - } - - ENTITY_ITEM_HEALTH_FIELD_2 = f; - } - - public BaseCustomTileEntity() { - super(); - Logger.MACHINE_INFO("Created new BaseCustomTileEntity"); - } - - public void writeToNBT(NBTTagCompound aNBT) { - try { - super.writeToNBT(aNBT); - } catch (Throwable arg7) { - GT_Log.err.println( - "Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould\'ve been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!"); - arg7.printStackTrace(GT_Log.err); - } - - try { - if (!aNBT.hasKey("ModVersion")) - aNBT.setString("ModVersion", CORE.VERSION); - } catch (Throwable arg6) { - GT_Log.err.println( - "Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould\'ve been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!"); - arg6.printStackTrace(GT_Log.err); - } - } - - public void doEnergyExplosion() { - if (this.getUniversalEnergyCapacity() > 0L - && this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 5L) { - this.doExplosion( - this.getOutput() * (long) (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() ? 4 - : (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 2L ? 2 : 1))); - GT_Mod arg9999 = GT_Mod.instance; - GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(this.getOwnerName()), - "electricproblems"); - } - - } - - public void doExplosion(long aAmount) { - if (this.canAccessData()) { - if (GregTech_API.sMachineWireFire && this.mMetaTileEntity.isElectric()) { - try { - this.mReleaseEnergy = true; - Util.emitEnergyToNetwork(GT_Values.V[5], Math.max(1L, this.getStoredEU() / GT_Values.V[5]), this); - } catch (Exception arg4) { - ; - } - } - - this.mReleaseEnergy = false; - this.mMetaTileEntity.onExplosion(); - int i; - - boolean aExplosionDropItem = false; - Object aProxyField = StaticFields59.getFieldFromGregtechProxy(false, "mExplosionItemDrop"); - if (boolean.class.isInstance(aProxyField) || Boolean.class.isInstance(aProxyField)) { - aExplosionDropItem = (boolean) aProxyField; - } - - if (aExplosionDropItem) { - for (i = 0; i < this.getSizeInventory(); ++i) { - ItemStack tItem = this.getStackInSlot(i); - if (tItem != null && tItem.stackSize > 0 && this.isValidSlot(i)) { - this.dropItems(tItem); - this.setInventorySlotContents(i, (ItemStack) null); - } - } - } - - if (this.mRecipeStuff2 != null) { - for (i = 0; i < 9; ++i) { - this.dropItems(GT_Utility.loadItem(this.mRecipeStuff2, "Ingredient." + i)); - } - } - - PollutionUtils.addPollution(this, 100000); - this.mMetaTileEntity.doExplosion(aAmount); - } - - } - - - public void dropItems(ItemStack tItem) { - if (tItem != null) { - Random tRandom = new Random(); - EntityItem tItemEntity = new EntityItem(this.worldObj, - (double) ((float) this.xCoord + tRandom.nextFloat() * 0.8F + 0.1F), - (double) ((float) this.yCoord + tRandom.nextFloat() * 0.8F + 0.1F), - (double) ((float) this.zCoord + tRandom.nextFloat() * 0.8F + 0.1F), - new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); - if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); - } - - tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; - tItemEntity.motionY = tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D; - tItemEntity.motionZ = tRandom.nextGaussian() * 0.0500000007450581D; - tItemEntity.hurtResistantTime = 999999; - tItemEntity.lifespan = 60000; - - try { - if (ENTITY_ITEM_HEALTH_FIELD_2 != null) { - ENTITY_ITEM_HEALTH_FIELD_2.setInt(tItemEntity, 99999999); - } - } catch (Exception var5) { - ; - } - - this.worldObj.spawnEntityInWorld(tItemEntity); - tItem.stackSize = 0; - } - } - - public ArrayList getDrops() { - ArrayList aDrops = new ArrayList(); - ItemStack rStack = new ItemStack(GregTech_API.sBlockMachines, 1, this.getMetaTileID()); - // Currently not using my custom block. - // ItemStack rStack = new ItemStack(Meta_GT_Proxy.sBlockMachines, 1, - // this.getMetaTileID()); - boolean fail = true; - - ArrayList aSuperDrops = super.getDrops(); - if (aSuperDrops != null && !aSuperDrops.isEmpty()) { - ItemStack aSuperStack = super.getDrops().get(0); - if (aSuperStack != null && aSuperStack.hasTagCompound()) { - NBTTagCompound aSuperNBT = aSuperStack.getTagCompound(); - if (aSuperNBT != null && !aSuperNBT.hasNoTags()) { - NBTTagCompound tNBT = (NBTTagCompound) aSuperNBT.copy(); - if (tNBT != null && !tNBT.hasNoTags()) { - if (this.hasValidMetaTileEntity()) { - this.mMetaTileEntity.setItemNBT(tNBT); - rStack.setTagCompound(tNBT); - fail = false; - aDrops.add(rStack); - } - } - } - - } - } - if (fail) { - aDrops.add(rStack); - } - return aDrops; - } - - public boolean isTeleporterCompatible(Direction aSide) { - return this.canAccessData() && this.mMetaTileEntity.isTeleporterCompatible(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java deleted file mode 100644 index a4440114e8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java +++ /dev/null @@ -1,280 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.metatileentity.BaseCustomTileEntity; -import ic2.api.Direction; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public class BaseCustomPower_MTE extends BaseCustomTileEntity { - - public BaseCustomPower_MTE() { - super(); - Logger.MACHINE_INFO("Created new BaseCustomPower_MTE"); - } - - public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - if (mMetaTileEntity == null) { - Logger.MACHINE_INFO("Bad Tile"); - } - if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.inputEnergyFrom(aSide) && aAmperage > 0L - && aVoltage > 0L && this.getStoredEU() < this.getEUCapacity() - && this.mMetaTileEntity.maxAmperesIn() >= this.getInputAmperage()) { - Logger.MACHINE_INFO("Injecting Energy Units"); - return super.injectEnergyUnits(aSide, aVoltage, aAmperage); - } else { - Logger.MACHINE_INFO("canAccessData(): "+canAccessData()); - Logger.MACHINE_INFO("isElectric(): "+this.mMetaTileEntity.isElectric()); - Logger.MACHINE_INFO("InputEnergyFromSide("+aSide+"): "+this.inputEnergyFrom(aSide)); - Logger.MACHINE_INFO("aAmperage: "+aAmperage); - Logger.MACHINE_INFO("aVoltage: "+aVoltage); - Logger.MACHINE_INFO("this.getStoredEU() < this.getEUCapacity(): "+(this.getStoredEU() < this.getEUCapacity())); - Logger.MACHINE_INFO("this.mMetaTileEntity.maxAmperesIn() >= this.mAcceptedAmperes: "+(this.mMetaTileEntity.maxAmperesIn() >= this.getInputAmperage())); - Logger.MACHINE_INFO("this.mMetaTileEntity.maxAmperesIn(): "+(this.mMetaTileEntity.maxAmperesIn())); - Logger.MACHINE_INFO("this.mAcceptedAmperes: "+(this.getInputAmperage())); - return 0L; - } - } - - public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { - Logger.MACHINE_INFO("Draining Energy Units 4"); - if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.outputsEnergyTo(aSide) - && this.getStoredEU() - aVoltage * aAmperage >= this.mMetaTileEntity.getMinimumStoredEU()) { - if (this.decreaseStoredEU(aVoltage * aAmperage, false)) { - this.mAverageEUOutput[this.mAverageEUOutputIndex] = (int) ((long) this.mAverageEUOutput[this.mAverageEUOutputIndex] - + aVoltage * aAmperage); - return true; - } else { - return false; - } - } else { - return false; - } - } - - @Override - public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { - Logger.MACHINE_INFO("Draining Energy Units 3"); - // TODO Auto-generated method stub - return super.decreaseStoredEnergyUnits(aEnergy, aIgnoreTooLessEnergy); - } - - @Override - public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { - // TODO Auto-generated method stub - return super.increaseStoredEnergyUnits(aEnergy, aIgnoreTooMuchEnergy); - } - - @Override - public boolean inputEnergyFrom(byte aSide) { - // TODO Auto-generated method stub - return super.inputEnergyFrom(aSide); - } - - @Override - public boolean outputsEnergyTo(byte aSide) { - Logger.MACHINE_INFO("Draining Energy Units 2"); - // TODO Auto-generated method stub - return super.outputsEnergyTo(aSide); - } - - @Override - public long getOutputAmperage() { - // TODO Auto-generated method stub - return super.getOutputAmperage(); - } - - @Override - public long getOutputVoltage() { - // TODO Auto-generated method stub - return super.getOutputVoltage(); - } - - @Override - public long getInputAmperage() { - // TODO Auto-generated method stub - return super.getInputAmperage(); - } - - @Override - public long getInputVoltage() { - // TODO Auto-generated method stub - return super.getInputVoltage(); - } - - @Override - public long getUniversalEnergyStored() { - // TODO Auto-generated method stub - return super.getUniversalEnergyStored(); - } - - @Override - public long getUniversalEnergyCapacity() { - // TODO Auto-generated method stub - return super.getUniversalEnergyCapacity(); - } - - @Override - public long getStoredEU() { - // TODO Auto-generated method stub - return super.getStoredEU(); - } - - @Override - public long getEUCapacity() { - // TODO Auto-generated method stub - return super.getEUCapacity(); - } - - @Override - public boolean setStoredEU(long aEnergy) { - // TODO Auto-generated method stub - return super.setStoredEU(aEnergy); - } - - @Override - public boolean decreaseStoredEU(long aEnergy, boolean aIgnoreTooLessEnergy) { - Logger.MACHINE_INFO("Draining Energy Units 1"); - // TODO Auto-generated method stub - return super.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy); - } - - @Override - public boolean decreaseStoredSteam(long aEnergy, boolean aIgnoreTooLessEnergy) { - // TODO Auto-generated method stub - return super.decreaseStoredSteam(aEnergy, aIgnoreTooLessEnergy); - } - - @Override - public void doEnergyExplosion() { - // TODO Auto-generated method stub - super.doEnergyExplosion(); - } - - @Override - public void doExplosion(long aAmount) { - // TODO Auto-generated method stub - super.doExplosion(aAmount); - } - - @Override - public byte getLightValue() { - // TODO Auto-generated method stub - return super.getLightValue(); - } - - @Override - public long getAverageElectricInput() { - // TODO Auto-generated method stub - return super.getAverageElectricInput(); - } - - @Override - public long getAverageElectricOutput() { - // TODO Auto-generated method stub - return super.getAverageElectricOutput(); - } - - @Override - public double getOutputEnergyUnitsPerTick() { - // TODO Auto-generated method stub - return super.getOutputEnergyUnitsPerTick(); - } - - @Override - public double demandedEnergyUnits() { - // TODO Auto-generated method stub - return super.demandedEnergyUnits(); - } - - @Override - public double injectEnergyUnits(ForgeDirection aDirection, double aAmount) { - // TODO Auto-generated method stub - return super.injectEnergyUnits(aDirection, aAmount); - } - - @Override - public boolean acceptsEnergyFrom(TileEntity aEmitter, ForgeDirection aDirection) { - // TODO Auto-generated method stub - return super.acceptsEnergyFrom(aEmitter, aDirection); - } - - @Override - public boolean emitsEnergyTo(TileEntity aReceiver, ForgeDirection aDirection) { - // TODO Auto-generated method stub - return super.emitsEnergyTo(aReceiver, aDirection); - } - - @Override - public double getOfferedEnergy() { - // TODO Auto-generated method stub - return super.getOfferedEnergy(); - } - - @Override - public void drawEnergy(double amount) { - // TODO Auto-generated method stub - super.drawEnergy(amount); - } - - @Override - public int injectEnergy(ForgeDirection aForgeDirection, int aAmount) { - // TODO Auto-generated method stub - return super.injectEnergy(aForgeDirection, aAmount); - } - - @Override - public int addEnergy(int aEnergy) { - // TODO Auto-generated method stub - return super.addEnergy(aEnergy); - } - - @Override - public boolean isAddedToEnergyNet() { - // TODO Auto-generated method stub - return super.isAddedToEnergyNet(); - } - - @Override - public int demandsEnergy() { - // TODO Auto-generated method stub - return super.demandsEnergy(); - } - - @Override - public int getMaxSafeInput() { - // TODO Auto-generated method stub - return super.getMaxSafeInput(); - } - - @Override - public int getMaxEnergyOutput() { - // TODO Auto-generated method stub - return super.getMaxEnergyOutput(); - } - - @Override - public int injectEnergy(Direction aDirection, int aAmount) { - // TODO Auto-generated method stub - return super.injectEnergy(aDirection, aAmount); - } - - @Override - public boolean acceptsEnergyFrom(TileEntity aReceiver, Direction aDirection) { - // TODO Auto-generated method stub - return super.acceptsEnergyFrom(aReceiver, aDirection); - } - - @Override - public boolean emitsEnergyTo(TileEntity aReceiver, Direction aDirection) { - // TODO Auto-generated method stub - return super.emitsEnergyTo(aReceiver, aDirection); - } - - @Override - public boolean isUniversalEnergyStored(long aEnergyAmount) { - // TODO Auto-generated method stub - return super.isUniversalEnergyStored(aEnergyAmount); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java deleted file mode 100644 index e1b329c07f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java +++ /dev/null @@ -1,313 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import java.util.Collection; -import java.util.Iterator; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank { - public GTPP_MTE_BasicLosslessGenerator(int aID, String aName, String aNameRegional, int aTier, String aDescription, - ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); - } - - public GTPP_MTE_BasicLosslessGenerator(int aID, String aName, String aNameRegional, int aTier, - String[] aDescription, ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); - } - - public GTPP_MTE_BasicLosslessGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } - - public GTPP_MTE_BasicLosslessGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } - - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[10][17][]; - - for (byte i = -1; i < 16; ++i) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - - return rTextures; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing - ? 0 - : (aSide == GT_Utility.getOppositeSide(aFacing) - ? 1 - : (aSide == 0 ? 2 : (aSide == 1 ? 3 : 4))))][aColorIndex + 1]; - } - - public String[] getDescription() { - String[] desc = new String[this.mDescriptionArray.length + 1]; - System.arraycopy(this.mDescriptionArray, 0, desc, 0, this.mDescriptionArray.length); - desc[this.mDescriptionArray.length] = "Fuel Efficiency: " + this.getEfficiency() + "%"; - return desc; - } - - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - Logger.WARNING("Right Clicked"); - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } else { - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - } - - public ITexture[] getFront(byte aColor) { - return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBack(byte aColor) { - return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBottom(byte aColor) { - return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getTop(byte aColor) { - return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getSides(byte aColor) { - return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getFrontActive(byte aColor) { - return this.getFront(aColor); - } - - public ITexture[] getBackActive(byte aColor) { - return this.getBack(aColor); - } - - public ITexture[] getBottomActive(byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(byte aColor) { - return this.getSides(aColor); - } - - public boolean isFacingValid(byte aSide) { - return aSide > 1; - } - - public boolean isSimpleMachine() { - return false; - } - - public boolean isValidSlot(int aIndex) { - return aIndex < 2; - } - - public boolean isEnetOutput() { - return true; - } - - public boolean isOutputFacing(byte aSide) { - return true; - } - - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - public long maxEUOutput() { - return this.getBaseMetaTileEntity().isAllowedToWork() ? GT_Values.V[this.mTier] : 0L; - } - - public long maxEUStore() { - return Math.max(this.getEUVar(), GT_Values.V[this.mTier] * 40L + this.getMinimumStoredEU()); - } - - public boolean doesFillContainers() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - public boolean doesEmptyContainers() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - public boolean canTankBeFilled() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - public boolean canTankBeEmptied() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - public boolean displaysItemStack() { - return true; - } - - public boolean displaysStackSize() { - return false; - } - - public boolean isFluidInputAllowed(FluidStack aFluid) { - int aVal = this.getFuelValue(aFluid); - Logger.WARNING("Fuel Value: "+aVal); - return aVal > 0; - } - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) { - int tFuelValue; - if (this.mFluid == null) { - if (aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() + this.getMinimumStoredEU()) { - this.mInventory[this.getStackDisplaySlot()] = null; - } else { - if (this.mInventory[this.getStackDisplaySlot()] == null) { - this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); - } - - this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " - + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); - } - } else { - tFuelValue = this.getFuelValue(this.mFluid); - int tConsumed = this.consumedFluidPerOperation(this.mFluid); - if (tFuelValue > 0 && tConsumed > 0 && this.mFluid.amount > tConsumed) { - long tFluidAmountToUse = Math.min((long) (this.mFluid.amount / tConsumed), - (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); - if (tFluidAmountToUse > 0L && aBaseMetaTileEntity - .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); - this.mFluid.amount = (int) ((long) this.mFluid.amount - tFluidAmountToUse * (long) tConsumed); - } - } - } - - if (this.mInventory[this.getInputSlot()] != null - && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L - + this.getMinimumStoredEU() - && GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null) { - tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); - if (tFuelValue > 0) { - ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); - } - } - } - } - - if (aBaseMetaTileEntity.isServerSide()) { - Logger.WARNING("Ticking Servside"); - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity - .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU()); - } - - } - - public abstract int getPollution(); - - public abstract GT_Recipe_Map getRecipes(); - - public abstract int getEfficiency(); - - public int consumedFluidPerOperation(FluidStack aLiquid) { - return 1; - } - - public int getFuelValue(FluidStack aLiquid) { - if (aLiquid != null && this.getRecipes() != null) { - Collection tRecipeList = this.getRecipes().mRecipeList; - if (tRecipeList != null) { - Logger.WARNING("Fuels: "+tRecipeList.size()); - Iterator var4 = tRecipeList.iterator(); - - while (var4.hasNext()) { - GT_Recipe tFuel = (GT_Recipe) var4.next(); - FluidStack tLiquid; - if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null - && aLiquid.isFluidEqual(tLiquid)) { - Logger.WARNING("Fuel Ok"); - return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency() - * (long) this.consumedFluidPerOperation(tLiquid) / 100L); - } - if ((tLiquid = tFuel.getRepresentativeFluidInput(0)) != null - && aLiquid.isFluidEqual(tLiquid)) { - Logger.WARNING("Fuel Ok"); - return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency() - * (long) this.consumedFluidPerOperation(tLiquid) / 100L); - } - } - } - - return 0; - } else { - return 0; - } - } - - public int getFuelValue(ItemStack aStack) { - if (!GT_Utility.isStackInvalid(aStack) && this.getRecipes() != null) { - Logger.WARNING("Fuel Item OK"); - GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, - (FluidStack[]) null, new ItemStack[]{aStack}); - return tFuel != null ? (int) ((long) tFuel.mSpecialValue * 1000L * (long) this.getEfficiency() / 100L) : 0; - } else { - return 0; - } - } - - public ItemStack getEmptyContainer(ItemStack aStack) { - if (!GT_Utility.isStackInvalid(aStack) && this.getRecipes() != null) { - GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, - (FluidStack[]) null, new ItemStack[]{aStack}); - return tFuel != null - ? GT_Utility.copy(new Object[]{tFuel.getOutput(0)}) - : GT_Utility.getContainerItem(aStack, true); - } else { - return null; - } - } - - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && (this.getFuelValue(aStack) > 0 - || this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0); - } - - public int getCapacity() { - return 16000; - } - - public int getTankPressure() { - return -100; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java deleted file mode 100644 index 2eb1d36791..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java +++ /dev/null @@ -1,860 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_Container_BasicMachine; -import gregtech.api.gui.GT_GUIContainer_BasicMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.random.XSTR; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -import java.util.Arrays; - -import static gregtech.api.enums.GT_Values.V; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * This is the main construct for my Basic Machines such as the Automatic Extractor - * Extend this class to make a simple Machine - */ -public abstract class GTPP_MTE_BasicMachine extends GTPP_MTE_BasicTank { - /** - * return values for checkRecipe() - */ - protected static final int - DID_NOT_FIND_RECIPE = 0, - FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, - FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; - public static final int OTHER_SLOT_COUNT = 4; - public final ItemStack[] mOutputItems; - public final int mInputSlotCount, mAmperage; - public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false; - public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; - public FluidStack mOutputFluid; - public String mGUIName = "", mNEIName = ""; - public GT_MetaTileEntity_MultiBlockBase mCleanroom; - /** - * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered - */ - protected GT_Recipe mLastRecipe = null; - private FluidStack mFluidOut; - - /** - * @param aOverlays 0 = SideFacingActive - * 1 = SideFacingInactive - * 2 = FrontFacingActive - * 3 = FrontFacingInactive - * 4 = TopFacingActive - * 5 = TopFacingInactive - * 6 = BottomFacingActive - * 7 = BottomFacingInactive - * ----- Not all Array Elements have to be initialised, you can also just use 8 Parameters for the Default Pipe Texture Overlays ----- - * 8 = BottomFacingPipeActive - * 9 = BottomFacingPipeInactive - * 10 = TopFacingPipeActive - * 11 = TopFacingPipeInactive - * 12 = SideFacingPipeActive - * 13 = SideFacingPipeInactive - */ - public GTPP_MTE_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { - super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); - mInputSlotCount = Math.max(0, aInputSlotCount); - mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; - mAmperage = aAmperage; - mGUIName = aGUIName; - mNEIName = aNEIName; - } - - public GTPP_MTE_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String[] aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { - super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); - mInputSlotCount = Math.max(0, aInputSlotCount); - mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; - mAmperage = aAmperage; - mGUIName = aGUIName; - mNEIName = aNEIName; - } - - public GTPP_MTE_BasicMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { - super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); - mInputSlotCount = Math.max(0, aInputSlotCount); - mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; - mAmperage = aAmperage; - mGUIName = aGUIName; - mNEIName = aNEIName; - } - - public GTPP_MTE_BasicMachine(String aName, int aTier, int aAmperage, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { - super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); - mInputSlotCount = Math.max(0, aInputSlotCount); - mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; - mAmperage = aAmperage; - mGUIName = aGUIName; - mNEIName = aNEIName; - } - - protected boolean isValidMainFacing(byte aSide) { - return aSide > 1; - } - - public boolean setMainFacing(byte aSide){ - if (!isValidMainFacing(aSide)) return false; - mMainFacing = aSide; - if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ - getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aSide)); - } - onFacingChange(); - onMachineBlockUpdate(); - return true; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[14][17][]; - aTextures = Arrays.copyOf(aTextures, 14); - - for (int i = 0; i < aTextures.length; i++) - if (aTextures[i] != null) for (byte c = -1; c < 16; c++) { - if (rTextures[i][c + 1] == null) - rTextures[i][c + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; - } - - for (byte c = -1; c < 16; c++) { - if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); - if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); - if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); - if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); - if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); - if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); - if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); - if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); - if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); - if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); - if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); - if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); - if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); - if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[mMainFacing < 2 ? aSide == aFacing ? aActive ? 2 : 3 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1 : aSide == mMainFacing ? aActive ? 2 : 3 : (showPipeFacing() && aSide == aFacing) ? aSide == 0 ? aActive ? 8 : 9 : aSide == 1 ? aActive ? 10 : 11 : aActive ? 12 : 13 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1][aColorIndex + 1]; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public boolean isElectric() { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return mMainFacing > 1 || aFacing > 1; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isInputFacing(byte aSide) { - return aSide != mMainFacing; - } - - @Override - public boolean isOutputFacing(byte aSide) { - return false; - } - - @Override - public boolean isTeleporterCompatible() { - return false; - } - - @Override - public boolean isLiquidInput(byte aSide) { - return aSide != mMainFacing && (mAllowInputFromOutputSide || aSide != getBaseMetaTileEntity().getFrontFacing()); - } - - @Override - public boolean isLiquidOutput(byte aSide) { - return aSide != mMainFacing; - } - - @Override - public long getMinimumStoredEU() { - return V[mTier] * 16; - } - - @Override - public long maxEUStore() { - return V[mTier] * 64; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public long maxSteamStore() { - return maxEUStore(); - } - - @Override - public long maxAmperesIn() { - return (mEUt * 2) / V[mTier] + 1; - } - - @Override - public int getInputSlot() { - return OTHER_SLOT_COUNT; - } - - @Override - public int getOutputSlot() { - return OTHER_SLOT_COUNT + mInputSlotCount; - } - - @Override - public int getStackDisplaySlot() { - return 2; - } - - @Override - public int rechargerSlotStartIndex() { - return 1; - } - - @Override - public int dechargerSlotStartIndex() { - return 1; - } - - @Override - public int rechargerSlotCount() { - return mCharge ? 1 : 0; - } - - @Override - public int dechargerSlotCount() { - return mDecharge ? 1 : 0; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public int getProgresstime() { - return mProgresstime; - } - - @Override - public int maxProgresstime() { - return mMaxProgresstime; - } - - @Override - public int increaseProgress(int aProgress) { - mProgresstime += aProgress; - return mMaxProgresstime - mProgresstime; - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return getFillableStack() != null || (getRecipeList() != null && getRecipeList().containsInput(aFluid)); - } - - @Override - public boolean isFluidChangingAllowed() { - return true; - } - - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean canTankBeFilled() { - return true; - } - - @Override - public boolean canTankBeEmptied() { - return true; - } - - @Override - public boolean displaysItemStack() { - return true; - } - - @Override - public boolean displaysStackSize() { - return true; - } - - @Override - public FluidStack getDisplayedFluid() { - return displaysOutputFluid() ? getDrainableStack() : null; - } - - @Override - public FluidStack getDrainableStack() { - return mFluidOut; - } - - @Override - public FluidStack setDrainableStack(FluidStack aFluid) { - mFluidOut = aFluid; - return mFluidOut; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_BasicMachine(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); - } - - @Override - public void initDefaultModes(NBTTagCompound aNBT) { - mMainFacing = -1; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mFluidTransfer", mFluidTransfer); - aNBT.setBoolean("mItemTransfer", mItemTransfer); - aNBT.setBoolean("mHasBeenUpdated", mHasBeenUpdated); - aNBT.setBoolean("mAllowInputFromOutputSide", mAllowInputFromOutputSide); - aNBT.setInteger("mEUt", mEUt); - aNBT.setInteger("mMainFacing", mMainFacing); - aNBT.setInteger("mProgresstime", mProgresstime); - aNBT.setInteger("mMaxProgresstime", mMaxProgresstime); - if (mOutputFluid != null) aNBT.setTag("mOutputFluid", mOutputFluid.writeToNBT(new NBTTagCompound())); - if (mFluidOut != null) aNBT.setTag("mFluidOut", mFluidOut.writeToNBT(new NBTTagCompound())); - - for (int i = 0; i < mOutputItems.length; i++) - if (mOutputItems[i] != null) - aNBT.setTag("mOutputItem" + i, mOutputItems[i].writeToNBT(new NBTTagCompound())); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mFluidTransfer = aNBT.getBoolean("mFluidTransfer"); - mItemTransfer = aNBT.getBoolean("mItemTransfer"); - mHasBeenUpdated = aNBT.getBoolean("mHasBeenUpdated"); - mAllowInputFromOutputSide = aNBT.getBoolean("mAllowInputFromOutputSide"); - mEUt = aNBT.getInteger("mEUt"); - mMainFacing = aNBT.getInteger("mMainFacing"); - mProgresstime = aNBT.getInteger("mProgresstime"); - mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); - mOutputFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid")); - mFluidOut = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluidOut")); - - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - if (aBaseMetaTileEntity.isServerSide()) { - mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3; - mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3; - - doDisplayThings(); - - boolean tSucceeded = false; - - if (mMaxProgresstime > 0 && (mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) { - aBaseMetaTileEntity.setActive(true); - if (mProgresstime < 0 || drainEnergyForProcess(mEUt)) { - if (++mProgresstime >= mMaxProgresstime) { - for (int i = 0; i < mOutputItems.length; i++) - for (int j = 0; j < mOutputItems.length; j++) - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) - break; - if (mOutputFluid != null) - if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy()); - else if (mOutputFluid.isFluidEqual(getDrainableStack())) - getDrainableStack().amount += mOutputFluid.amount; - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; - mOutputFluid = null; - mEUt = 0; - mProgresstime = 0; - mMaxProgresstime = 0; - mStuttering = false; - tSucceeded = true; - endProcess(); - } - if (mProgresstime > 5) mStuttering = false; - XSTR aXSTR = new XSTR(); - //Dumb April Fools Shit - // if(GT_Mod.gregtechproxy.mAprilFool && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); - } else { - if (!mStuttering) { - stutterProcess(); - if (canHaveInsufficientEnergy()) mProgresstime = -100; - mStuttering = true; - } - } - } else { - aBaseMetaTileEntity.setActive(false); - } - - boolean tRemovedOutputFluid = false; - - if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { - IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); - if (tTank != null) { - FluidStack tDrained = drain(1000, false); - if (tDrained != null) { - int tFilledAmount = tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); - if (tFilledAmount > 0) - tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), drain(tFilledAmount, true), true); - } - } - if (getDrainableStack() == null) tRemovedOutputFluid = true; - } - - if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) { - TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); - for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { - tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); - } - } - - if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; - else mOutputBlocked++; - - if (allowToCheckRecipe()) { - if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { - if (checkRecipe() == 2) { - if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null; - for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - for (int i = 0; i < mOutputItems.length; i++) { - mOutputItems[i] = GT_Utility.copy(mOutputItems[i]); - if (mOutputItems[i] != null && mOutputItems[i].stackSize > 64) - mOutputItems[i].stackSize = 64; - mOutputItems[i] = GT_OreDictUnificator.get(true, mOutputItems[i]); - } - if (mFluid != null && mFluid.amount <= 0) mFluid = null; - mMaxProgresstime = Math.max(1, mMaxProgresstime); - if (GT_Utility.isDebugItem(mInventory[dechargerSlotStartIndex()])) { - mEUt = mMaxProgresstime = 1; - } - startProcess(); - } else { - mMaxProgresstime = 0; - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; - mOutputFluid = null; - } - } - } else { - if (!mStuttering) { - stutterProcess(); - mStuttering = true; - } - } - } - } - - protected void doDisplayThings() { - if (mMainFacing < 2 && getBaseMetaTileEntity().getFrontFacing() > 1) { - mMainFacing = getBaseMetaTileEntity().getFrontFacing(); - } - if (mMainFacing >= 2 && !mHasBeenUpdated) { - mHasBeenUpdated = true; - getBaseMetaTileEntity().setFrontFacing(getBaseMetaTileEntity().getBackFacing()); - } - - if (displaysInputFluid()) { - int tDisplayStackSlot = OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; - if (getFillableStack() == null) { - if (ItemList.Display_Fluid.isStackEqual(mInventory[tDisplayStackSlot], true, true)) - mInventory[tDisplayStackSlot] = null; - } else { - mInventory[tDisplayStackSlot] = GT_Utility.getFluidDisplayStack(getFillableStack(), displaysStackSize()); - } - } - } - - protected boolean hasEnoughEnergyToCheckRecipe() { - return getBaseMetaTileEntity().isUniversalEnergyStored(getMinimumStoredEU() / 2); - } - - protected boolean drainEnergyForProcess(long aEUt) { - return getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEUt, false); - } - - protected void calculateOverclockedNess(GT_Recipe aRecipe) { - calculateOverclockedNess(aRecipe.mEUt, aRecipe.mDuration); - } - - protected void calculateOverclockedNess(int aEUt, int aDuration) { - if (aEUt <= 16) { - mEUt = aEUt * (1 << (mTier - 1)) * (1 << (mTier - 1)); - mMaxProgresstime = aDuration / (1 << (mTier - 1)); - } else { - mEUt = aEUt; - mMaxProgresstime = aDuration; - while (mEUt <= V[mTier - 1] * mAmperage) { - mEUt *= 4; - mMaxProgresstime /= 2; - } - } - } - - protected ItemStack getSpecialSlot() { - return mInventory[3]; - } - - protected ItemStack getOutputAt(int aIndex) { - return mInventory[getOutputSlot() + aIndex]; - } - - protected ItemStack[] getAllOutputs() { - ItemStack[] rOutputs = new ItemStack[mOutputItems.length]; - for (int i = 0; i < mOutputItems.length; i++) rOutputs[i] = getOutputAt(i); - return rOutputs; - } - - protected boolean canOutput(GT_Recipe aRecipe) { - return aRecipe != null && (aRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs)); - } - - protected boolean canOutput(ItemStack... aOutputs) { - if (aOutputs == null) return true; - ItemStack[] tOutputSlots = getAllOutputs(); - for (int i = 0; i < tOutputSlots.length && i < aOutputs.length; i++) - if (tOutputSlots[i] != null && aOutputs[i] != null && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) { - mOutputBlocked++; - return false; - } - return true; - } - - protected boolean canOutput(FluidStack aOutput) { - return getDrainableStack() == null || aOutput == null || (getDrainableStack().isFluidEqual(aOutput) && (getDrainableStack().amount <= 0 || getDrainableStack().amount + aOutput.amount <= getCapacity())); - } - - protected ItemStack getInputAt(int aIndex) { - return mInventory[getInputSlot() + aIndex]; - } - - protected ItemStack[] getAllInputs() { - ItemStack[] rInputs = new ItemStack[mInputSlotCount]; - for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i); - return rInputs; - } - - protected boolean isOutputEmpty() { - boolean rIsEmpty = true; - for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) rIsEmpty = false; - return rIsEmpty; - } - - protected boolean displaysInputFluid() { - return true; - } - - protected boolean displaysOutputFluid() { - return true; - } - - @Override - public void onValueUpdate(byte aValue) { - mMainFacing = aValue; - } - - @Override - public byte getUpdateData() { - return (byte) mMainFacing; - } - - @Override - public void doSound(byte aIndex, double aX, double aY, double aZ) { - super.doSound(aIndex, aX, aY, aZ); - if (aIndex == 8) GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(210), 100, 1.0F, aX, aY, aZ); - } - - public boolean doesAutoOutput() { - return mItemTransfer; - } - - public boolean doesAutoOutputFluids() { - return mFluidTransfer; - } - - public boolean allowToCheckRecipe() { - return true; - } - - public boolean showPipeFacing() { - return true; - } - - /** - * Called whenever the Machine successfully started a Process, useful for Sound Effects - */ - public void startProcess() { - // - } - - /** - * Called whenever the Machine successfully finished a Process, useful for Sound Effects - */ - public void endProcess() { - // - } - - /** - * Called whenever the Machine aborted a Process, useful for Sound Effects - */ - public void abortProcess() { - // - } - - /** - * Called whenever the Machine aborted a Process but still works on it, useful for Sound Effects - */ - public void stutterProcess() { - if (useStandardStutterSound()) sendSound((byte) 8); - } - - /** - * If this Machine can have the Insufficient Energy Line Problem - */ - public boolean canHaveInsufficientEnergy() { - return true; - } - - public boolean useStandardStutterSound() { - return true; - } - - @Override - public String[] getInfoData() { - return new String[]{ - mNEIName, - "Progress:", (mProgresstime / 20) + " secs", - (mMaxProgresstime / 20) + " secs", - "Stored Energy:", - getBaseMetaTileEntity().getStoredEU() + "EU", - getBaseMetaTileEntity().getEUCapacity() + "EU"}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) { - mAllowInputFromOutputSide = !mAllowInputFromOutputSide; - GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? "Input from Output Side allowed" : "Input from Output Side forbidden"); - } - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { - return (aSide != mMainFacing || GregTech_API.getCoverBehavior(aCoverID.toStack()).isGUIClickable(aSide, GT_Utility.stackToInt(aCoverID.toStack()), 0, getBaseMetaTileEntity())); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide != mMainFacing && aIndex >= getOutputSlot() && aIndex < getOutputSlot() + mOutputItems.length; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (aSide == mMainFacing || aIndex < getInputSlot() || aIndex >= getInputSlot() + mInputSlotCount || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) - return false; - for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i])) return i == aIndex; - return true; - } - - /** - * @return the Recipe List which is used for this Machine, this is a useful Default Handler - */ - public GT_Recipe_Map getRecipeList() { - return null; - } - - /** - * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a special case - *

- * I thought about Enum too, but Enum doesn't add support for people adding other return Systems. - *

- * Funny how Eclipse marks the word Enum as not correctly spelled. - * - * @return see constants above - */ - public int checkRecipe() { - return checkRecipe(false); - } - - public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId){ - return //TODO check or get a better solution - DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") || - DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); - } - - - /** - * - * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... - * @return - */ - public int checkRecipe(boolean skipOC){ - GT_Recipe_Map tMap = getRecipeList(); - if (tMap == null) return DID_NOT_FIND_RECIPE; - GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); - if (tRecipe == null) return DID_NOT_FIND_RECIPE; - - if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; - if (!canOutput(tRecipe)) { - mOutputBlocked++; - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - } - if (tRecipe.mSpecialValue == -200 && (mCleanroom == null || mCleanroom.mEfficiency == 0)) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - for (int i = 0; i < mOutputItems.length; i++) - if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) - mOutputItems[i] = tRecipe.getOutput(i); - if (tRecipe.mSpecialValue == -200) - for (int i = 0; i < mOutputItems.length; i++) - if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) - mOutputItems[i] = null; - mOutputFluid = tRecipe.getFluidOutput(0); - calculateOverclockedNess(tRecipe); - return FOUND_AND_SUCCESSFULLY_USED_RECIPE; - } - - public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java deleted file mode 100644 index 9c6840e33c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java +++ /dev/null @@ -1,266 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; - -import gregtech.api.enums.ItemList; -import gregtech.api.gui.GT_Container_BasicTank; -import gregtech.api.gui.GT_GUIContainer_BasicTank; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.xmod.gregtech.api.gui.power.CONTAINER_BasicTank; -import gtPlusPlus.xmod.gregtech.api.gui.power.GUI_BasicTank; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually - */ -public abstract class GTPP_MTE_BasicTank extends GTPP_MTE_TieredMachineBlock { - - public FluidStack mFluid; - - /** - * @param aInvSlotCount should be 3 - */ - public GTPP_MTE_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); - } - - public GTPP_MTE_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); - } - - public GTPP_MTE_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - public GTPP_MTE_BasicTank(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(int aIndex) { - return aIndex != getStackDisplaySlot(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); - } - - public abstract boolean doesFillContainers(); - - public abstract boolean doesEmptyContainers(); - - public abstract boolean canTankBeFilled(); - - public abstract boolean canTankBeEmptied(); - - public abstract boolean displaysItemStack(); - - public abstract boolean displaysStackSize(); - - public int getInputSlot() { - return 0; - } - - public int getOutputSlot() { - return 1; - } - - public int getStackDisplaySlot() { - return 2; - } - - public boolean isFluidInputAllowed(FluidStack aFluid) { - return true; - } - - public boolean isFluidChangingAllowed() { - return true; - } - - public FluidStack getFillableStack() { - return mFluid; - } - - public FluidStack setFillableStack(FluidStack aFluid) { - mFluid = aFluid; - return mFluid; - } - - public FluidStack getDrainableStack() { - return mFluid; - } - - public FluidStack setDrainableStack(FluidStack aFluid) { - mFluid = aFluid; - return mFluid; - } - - public FluidStack getDisplayedFluid() { - return getDrainableStack(); - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_BasicTank(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (isFluidChangingAllowed() && getFillableStack() != null && getFillableStack().amount <= 0) - setFillableStack(null); - - if (displaysItemStack() && getStackDisplaySlot() >= 0 && getStackDisplaySlot() < mInventory.length) { - if (getDisplayedFluid() == null) { - if (ItemList.Display_Fluid.isStackEqual(mInventory[getStackDisplaySlot()], true, true)) - mInventory[getStackDisplaySlot()] = null; - } else { - mInventory[getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(getDisplayedFluid(), displaysStackSize()); - } - } - - if (doesEmptyContainers()) { - FluidStack tFluid = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true); - if (tFluid != null && isFluidInputAllowed(tFluid)) { - if (getFillableStack() == null) { - if (isFluidInputAllowed(tFluid) && tFluid.amount <= getCapacity()) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { - setFillableStack(tFluid.copy()); - this.onEmptyingContainerWhenEmpty(); - aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - } - } - } else { - if (tFluid.isFluidEqual(getFillableStack()) && tFluid.amount + getFillableStack().amount <= getCapacity()) { - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { - getFillableStack().amount += tFluid.amount; - aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - } - } - } - } - } - - if (doesFillContainers()) { - ItemStack tOutput = GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true); - if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) { - FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); - aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - if (tFluid != null) getDrainableStack().amount -= tFluid.amount; - if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) setDrainableStack(null); - } - } - } - } - - @Override - public FluidStack getFluid() { - return getDrainableStack(); - } - - @Override - public int getFluidAmount() { - return getDrainableStack() != null ? getDrainableStack().amount : 0; - } - - @Override - public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) - return 0; - - if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) { - if (aFluid.amount <= getCapacity()) { - if (doFill) { - setFillableStack(aFluid.copy()); - getBaseMetaTileEntity().markDirty(); - } - return aFluid.amount; - } - if (doFill) { - setFillableStack(aFluid.copy()); - getFillableStack().amount = getCapacity(); - getBaseMetaTileEntity().markDirty(); - } - return getCapacity(); - } - - if (!getFillableStack().isFluidEqual(aFluid)) - return 0; - - int space = getCapacity() - getFillableStack().amount; - if (aFluid.amount <= space) { - if (doFill) { - getFillableStack().amount += aFluid.amount; - getBaseMetaTileEntity().markDirty(); - } - return aFluid.amount; - } - if (doFill) - getFillableStack().amount = getCapacity(); - return space; - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) { - if (getDrainableStack() == null || !canTankBeEmptied()) return null; - if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) { - setDrainableStack(null); - getBaseMetaTileEntity().markDirty(); - return null; - } - - int used = maxDrain; - if (getDrainableStack().amount < used) - used = getDrainableStack().amount; - - if (doDrain) { - getDrainableStack().amount -= used; - getBaseMetaTileEntity().markDirty(); - } - - FluidStack drained = getDrainableStack().copy(); - drained.amount = used; - - if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) { - setDrainableStack(null); - getBaseMetaTileEntity().markDirty(); - } - - return drained; - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == getOutputSlot(); - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == getInputSlot(); - } - - protected void onEmptyingContainerWhenEmpty(){ - //Do nothing - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java deleted file mode 100644 index 785c4698db..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; - -import static gregtech.api.enums.GT_Values.GT; - -import gregtech.api.interfaces.ITexture; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; - -public abstract class GTPP_MTE_TieredMachineBlock extends MetaTileEntityCustomPower { - /** - * Value between [0 - 9] to describe the Tier of this Machine. - */ - public final byte mTier; - - @Deprecated - public final String mDescription; - - /** - * A simple Description. - */ - public final String[] mDescriptionArray; - - /** - * Contains all Textures used by this Block. - */ - public final ITexture[][][] mTextures; - - public GTPP_MTE_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { - super(aID, aName, aNameRegional, aInvSlotCount); - mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; - mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; - // must always be the last call! - if (GT.isClientSide()) mTextures = getTextureSet(aTextures); - else mTextures = null; - } - - public GTPP_MTE_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { - super(aID, aName, aNameRegional, aInvSlotCount); - mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescriptionArray = aDescription == null ? new String[0] : aDescription; - mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; - - // must always be the last call! - if (GT.isClientSide()) mTextures = getTextureSet(aTextures); - else mTextures = null; - } - - public GTPP_MTE_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { - super(aName, aInvSlotCount); - mTier = (byte) aTier; - mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; - mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; - mTextures = aTextures; - } - - public GTPP_MTE_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aInvSlotCount); - mTier = (byte) aTier; - mDescriptionArray = aDescription == null ? new String[0] : aDescription; - mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; - mTextures = aTextures; - } - - @Override - public byte getTileEntityBaseType() { - return 12; - } - - @Override - public long getInputTier() { - return mTier; - } - - @Override - public long getOutputTier() { - return mTier; - } - - @Override - public String[] getDescription() { - - AutoMap aTooltip = new AutoMap(); - String []s1 = null; - s1 = new String[aTooltip.size()]; - int u = 0; - for (String s : aTooltip) { - s1[u] = s; - } - return s1; - } - - /** - * Used Client Side to get a Texture Set for this Block. - * Called after setting the Tier and the Description so that those two are accessible. - * - * @param aTextures is the optional Array you can give to the Constructor. - */ - public abstract ITexture[][][] getTextureSet(ITexture[] aTextures); -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java deleted file mode 100644 index 8b7ccc202a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java +++ /dev/null @@ -1,91 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.CustomMetaTileBase; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; - -public abstract class MetaTileEntityCustomPower extends CustomMetaTileBase { - - public MetaTileEntityCustomPower(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { - super(aID, aBasicName, aRegionalName, aInvSlotCount); - this.setBaseMetaTileEntity(Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); - } - - public MetaTileEntityCustomPower(String aStack, int aInvSlotCount) { - super(aStack, aInvSlotCount); - } - - public long getMinimumStoredEU() { - return 0L; - } - - public void doExplosion(long aExplosionPower) { - - if (MathUtils.randInt(1, 10) > 0) { - //Logger.INFO("Machine tried to explode, let's stop that. xo"); - return; - } - - float tStrength = aExplosionPower < GT_Values.V[0] - ? 1.0F - : (aExplosionPower < GT_Values.V[1] - ? 2.0F - : (aExplosionPower < GT_Values.V[2] - ? 3.0F - : (aExplosionPower < GT_Values.V[3] - ? 4.0F - : (aExplosionPower < GT_Values.V[4] - ? 5.0F - : (aExplosionPower < GT_Values.V[4] * 2L - ? 6.0F - : (aExplosionPower < GT_Values.V[5] - ? 7.0F - : (aExplosionPower < GT_Values.V[6] - ? 8.0F - : (aExplosionPower < GT_Values.V[7] - ? 9.0F - : 10.0F)))))))); - int tX = this.getBaseMetaTileEntity().getXCoord(); - short tY = this.getBaseMetaTileEntity().getYCoord(); - int tZ = this.getBaseMetaTileEntity().getZCoord(); - World tWorld = this.getBaseMetaTileEntity().getWorld(); - GT_Utility.sendSoundToPlayers(tWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(209)), 1.0F, -1.0F, - tX, tY, tZ); - tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions) { - tWorld.createExplosion((Entity) null, (double) tX + 0.5D, (double) tY + 0.5D, (double) tZ + 0.5D, tStrength, - true); - } - - } - - @Override - public void onExplosion() { - - if (MathUtils.randInt(1, 10) > 0) { - //Logger.INFO("Machine tried to explode, let's stop that. xo"); - return; - } - // TODO Auto-generated method stub - super.onExplosion(); - } - - @Override - public boolean isElectric() { - return true; - } - - @Override - public long getEUVar() { - // TODO Auto-generated method stub - return super.getEUVar(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java deleted file mode 100644 index e6bf4b8486..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java +++ /dev/null @@ -1,283 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.gui.GT_Container_4by4; -import gregtech.api.gui.GT_GUIContainer_4by4; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_TieredMachineBlock; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock { - - public boolean mCharge = false; - public boolean mDecharge = false; - public int mBatteryCount = 0; - public int mChargeableCount = 0; - private long count = 0L; - private long mStored = 0L; - private long mMax = 0L; - - public GT_MetaTileEntity_BasicBreaker(int aID, String aName, String aNameRegional, int aTier, - String aDescription, int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription, new ITexture[0]); - } - - public GT_MetaTileEntity_BasicBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - public GT_MetaTileEntity_BasicBreaker(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures, int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - public String[] getDescription() { - String []s1 = super.getDescription(); - s1 = new String[0]; - return s1; - } - - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[2][17][]; - - for (byte i = -1; i < 16; ++i) { - rTextures[0][i + 1] = new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], - this.mInventory.length > 4 - ? BlockIcons.OVERLAYS_ENERGY_IN_MULTI[Math.min(12, mTier)] - : BlockIcons.OVERLAYS_ENERGY_IN[Math.min(12, mTier)]}; - - rTextures[1][i + 1] = new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], - this.mInventory.length > 4 - ? BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] - : BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; - } - - return rTextures; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { - return this.mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1]; - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicBreaker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, - this.mInventory.length); - } - - public boolean isSimpleMachine() { - return false; - } - - public boolean isElectric() { - return true; - } - - public boolean isValidSlot(int aIndex) { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return true; - } - - public boolean isEnetInput() { - return true; - } - - public boolean isEnetOutput() { - return true; - } - - public boolean isInputFacing(byte aSide) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - public boolean isOutputFacing(byte aSide) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing(); - } - - public boolean isTeleporterCompatible() { - return false; - } - - public long getMinimumStoredEU() { - return GT_Values.V[this.mTier] * 16L * 16; - } - - public long maxEUStore() { - return GT_Values.V[this.mTier] * 64L * 16; - } - - public long maxEUInput() { - return GT_Values.V[this.mTier] * 16; - } - - public long maxEUOutput() { - return GT_Values.V[this.mTier]; - } - - public long maxAmperesIn() { - return (long) (1); - } - - public long maxAmperesOut() { - return (long) 16; - } - - public int rechargerSlotStartIndex() { - return 0; - } - - public int dechargerSlotStartIndex() { - return 0; - } - - public int rechargerSlotCount() { - return 0; - } - - public int dechargerSlotCount() { - return 0; - } - - public int getProgresstime() { - return (int) this.getBaseMetaTileEntity().getUniversalEnergyStored(); - } - - public int maxProgresstime() { - return (int) this.getBaseMetaTileEntity().getUniversalEnergyCapacity(); - } - - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - public void saveNBTData(NBTTagCompound aNBT) { - } - - public void loadNBTData(NBTTagCompound aNBT) { - } - - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } else { - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - } - - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity); - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); - } - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { - /*this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mBatteryCount = 0; - this.mChargeableCount = 0; - ItemStack[] arg3 = this.mInventory; - int arg4 = arg3.length; - - for (int arg5 = 0; arg5 < arg4; ++arg5) { - ItemStack tStack = arg3[arg5]; - if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { - if (GT_ModHandler.isChargerItem(tStack)) { - ++this.mBatteryCount; - } - - ++this.mChargeableCount; - } - }*/ - } - - } - - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return true; - } - - public int getInventoryStackLimit() { - return 1; - } - - public long[] getStoredEnergy() { - boolean scaleOverflow = false; - boolean storedOverflow = false; - long tScale = this.getBaseMetaTileEntity().getEUCapacity(); - long tStored = this.getBaseMetaTileEntity().getStoredEU(); - long tStep = 0L; - if (this.mInventory != null) { - ItemStack[] arg8 = this.mInventory; - int arg9 = arg8.length; - - for (int arg10 = 0; arg10 < arg9; ++arg10) { - ItemStack aStack = arg8[arg10]; - if (GT_ModHandler.isElectricItem(aStack)) { - if (aStack.getItem() instanceof GT_MetaBase_Item) { - Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack); - if (stats != null) { - if (stats[0].longValue() > 4611686018427387903L) { - scaleOverflow = true; - } - - tScale += stats[0].longValue(); - tStep = ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack); - if (tStep > 4611686018427387903L) { - storedOverflow = true; - } - - tStored += tStep; - } - } else if (aStack.getItem() instanceof IElectricItem) { - tStored += (long) ElectricItem.manager.getCharge(aStack); - tScale += (long) ((IElectricItem) aStack.getItem()).getMaxCharge(aStack); - } - } - } - } - - if (scaleOverflow) { - tScale = Long.MAX_VALUE; - } - - if (storedOverflow) { - tStored = Long.MAX_VALUE; - } - - return new long[]{tStored, tScale}; - } - - public String[] getInfoData() { - return new String[]{}; - } - - public boolean isGivingInformation() { - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java deleted file mode 100644 index 18665538d0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java +++ /dev/null @@ -1,38 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; - -public class GT_MetaTileEntity_BasicMachine_GTPP_Recipe extends GT_MetaTileEntity_BasicMachine_GT_Recipe { - - public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(int aID, String aName, String aNameRegional, int aTier, - String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, - int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, - boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) { - super(aID, aName, aNameRegional, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity, - aGUIParameterA, aGUIParameterB, aGUIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect, - aOverlays, aRecipe); - } - - public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String aDescription, - GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, - int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, - String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { - super(aName, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity, aAmperage, aGUIParameterA, - aGUIParameterB, aTextures, aGUIName, aNEIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect); - } - - public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String[] aDescription, - GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, - int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, - String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { - super(aName, aTier, aDescription[0], aRecipes, aInputSlots, aOutputSlots, aTankCapacity, aAmperage, aGUIParameterA, - aGUIParameterB, aTextures, aGUIName, aNEIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect); - } - - - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java deleted file mode 100644 index aebf188fc0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java +++ /dev/null @@ -1,163 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; - -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons.CustomIcon; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.core.lib.CORE; - -@SuppressWarnings("deprecation") -public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine_GT_Recipe { - - private static final CustomIcon[] sDehydratorOverlays = new CustomIcon[10]; - static { - sDehydratorOverlays[0] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT"); - sDehydratorOverlays[2] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM"); - sDehydratorOverlays[3] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE"); - sDehydratorOverlays[4] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT"); - sDehydratorOverlays[5] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE"); - sDehydratorOverlays[7] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM_ACTIVE"); - sDehydratorOverlays[8] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE_ACTIVE"); - sDehydratorOverlays[9] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT_ACTIVE"); - //3 8 - } - - private GT_Recipe_Map xRecipes; - private int xTankCapacity; - - public GT_MetaTileEntity_Dehydrator(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aTankCapacity) { - super(aID, aName, aNameRegional, aTier, aDescription, GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, aTankCapacity, 2, 5, "Dehydrator.png", "UNBOXINATOR", false, false, 0, "", null); - xRecipes = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes; - xTankCapacity = aTankCapacity; - } - - public GT_MetaTileEntity_Dehydrator(String aName, int aTier, String[] aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aTankCapacity, int aAmperage, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, aDescription, aRecipes, 2, 9, aTankCapacity, aAmperage, 2, 5, aTextures, aGUIName, aNEIName, "", false, false, 0); - - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Dehydrator(this.mName, this.mTier, this.mDescriptionArray, this.xRecipes, this.xTankCapacity, this.mAmperage, this.mTextures, this.mGUIName, this.mNEIName); - } - - @Override - public String[] getDescription() { - String[] S = super.getDescription(); - final String[] desc = new String[S.length + 1]; - System.arraycopy(S, 0, desc, 0, S.length); - desc[S.length] = CORE.GT_Tooltip; - return desc; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[15][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = getSideFacingActive(i); - rTextures[1][i + 1] = getSideFacingInactive(i); - rTextures[2][i + 1] = getFrontFacingActive(i); - rTextures[3][i + 1] = getFrontFacingInactive(i); - rTextures[4][i + 1] = getTopFacingActive(i); - rTextures[5][i + 1] = getTopFacingInactive(i); - rTextures[6][i + 1] = getBottomFacingActive(i); - rTextures[7][i + 1] = getBottomFacingInactive(i); - rTextures[8][i + 1] = getBottomFacingPipeActive(i); - rTextures[9][i + 1] = getBottomFacingPipeInactive(i); - rTextures[10][i + 1] = getTopFacingPipeActive(i); - rTextures[11][i + 1] = getTopFacingPipeInactive(i); - rTextures[12][i + 1] = getSideFacingPipeActive(i); - rTextures[13][i + 1] = getSideFacingPipeInactive(i); - } - return rTextures; - } - - - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return super.getTexture(aBaseMetaTileEntity, aSide, aFacing, aColorIndex, aActive, aRedstone); - //return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - @Override - public ITexture[] getFrontFacingInactive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[0])}; - } - - @Override - public ITexture[] getBottomFacingInactive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2])}; - } - - @Override - public ITexture[] getTopFacingInactive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3])}; - } - - @Override - public ITexture[] getSideFacingInactive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4])}; - } - - @Override - public ITexture[] getFrontFacingActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5])}; - } - - @Override - public ITexture[] getBottomFacingActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7])}; - } - - @Override - public ITexture[] getTopFacingActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8])}; - } - - @Override - public ITexture[] getSideFacingActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9])}; - } - - @Override - public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; - } - - @Override - public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; - } - - @Override - public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; - } - - @Override - public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; - } - - @Override - public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; - } - - @Override - public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java deleted file mode 100644 index 79238240d2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java +++ /dev/null @@ -1,862 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.Arrays; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_Container_BasicMachine; -import gregtech.api.gui.GT_GUIContainer_BasicMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * This is the main construct for my Basic Machines such as the Automatic Extractor - * Extend this class to make a simple Machine - */ -public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_DeluxeTank { - /** - * return values for checkRecipe() - */ - protected static final int - DID_NOT_FIND_RECIPE = 0, - FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, - FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; - public static final int OTHER_SLOT_COUNT = 4; - public final ItemStack[] mOutputItems; - public final int mInputSlotCount, mAmperage; - public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false; - public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; - public FluidStack mOutputFluid; - public String mGUIName = "", mNEIName = ""; - /** - * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered - */ - protected GT_Recipe mLastRecipe = null; - private FluidStack mFluidOut; - - /** - * @param aOverlays 0 = SideFacingActive - * 1 = SideFacingInactive - * 2 = FrontFacingActive - * 3 = FrontFacingInactive - * 4 = TopFacingActive - * 5 = TopFacingInactive - * 6 = BottomFacingActive - * 7 = BottomFacingInactive - * ----- Not all Array Elements have to be initialised, you can also just use 8 Parameters for the Default Pipe Texture Overlays ----- - * 8 = BottomFacingPipeActive - * 9 = BottomFacingPipeInactive - * 10 = TopFacingPipeActive - * 11 = TopFacingPipeInactive - * 12 = SideFacingPipeActive - * 13 = SideFacingPipeInactive - */ - public GT_MetaTileEntity_DeluxeMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { - super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); - mInputSlotCount = Math.max(0, aInputSlotCount); - mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; - mAmperage = aAmperage; - mGUIName = aGUIName; - mNEIName = aNEIName; - } - - public GT_MetaTileEntity_DeluxeMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { - super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); - mInputSlotCount = Math.max(0, aInputSlotCount); - mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; - mAmperage = aAmperage; - mGUIName = aGUIName; - mNEIName = aNEIName; - } - - public boolean setMainFacing(byte aDirection){ - mMainFacing = aDirection; - if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ - getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aDirection)); - } - onFacingChange(); - onMachineBlockUpdate(); - return true; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[14][17][]; - aTextures = Arrays.copyOf(aTextures, 14); - - for (int i = 0; i < aTextures.length; i++) - if (aTextures[i] != null) for (byte c = -1; c < 16; c++) { - if (rTextures[i][c + 1] == null) - rTextures[i][c + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; - } - - for (byte c = -1; c < 16; c++) { - if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); - if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); - if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); - if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); - if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); - if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); - if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); - if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); - if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); - if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); - if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); - if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); - if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); - if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[mMainFacing < 2 ? aSide == aFacing ? aActive ? 2 : 3 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1 : aSide == mMainFacing ? aActive ? 2 : 3 : (showPipeFacing() && aSide == aFacing) ? aSide == 0 ? aActive ? 8 : 9 : aSide == 1 ? aActive ? 10 : 11 : aActive ? 12 : 13 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1][aColorIndex + 1]; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public boolean isElectric() { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return mMainFacing > 1 || aFacing > 1; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isInputFacing(byte aSide) { - return aSide != mMainFacing; - } - - @Override - public boolean isOutputFacing(byte aSide) { - return false; - } - - @Override - public boolean isTeleporterCompatible() { - return false; - } - - @Override - public boolean isLiquidInput(byte aSide) { - return aSide != mMainFacing && (mAllowInputFromOutputSide || aSide != getBaseMetaTileEntity().getFrontFacing()); - } - - @Override - public boolean isLiquidOutput(byte aSide) { - return aSide != mMainFacing; - } - - @Override - public long getMinimumStoredEU() { - return V[mTier] * 16; - } - - @Override - public long maxEUStore() { - return V[mTier] * 64; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public long maxSteamStore() { - return maxEUStore(); - } - - @Override - public long maxAmperesIn() { - return (mEUt * 2) / V[mTier] + 1; - } - - @Override - public int getInputSlot() { - return OTHER_SLOT_COUNT; - } - - @Override - public int getOutputSlot() { - return OTHER_SLOT_COUNT + mInputSlotCount; - } - - @Override - public int getStackDisplaySlot() { - return 2; - } - - @Override - public int rechargerSlotStartIndex() { - return 1; - } - - @Override - public int dechargerSlotStartIndex() { - return 1; - } - - @Override - public int rechargerSlotCount() { - return mCharge ? 1 : 0; - } - - @Override - public int dechargerSlotCount() { - return mDecharge ? 1 : 0; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public int getProgresstime() { - return mProgresstime; - } - - @Override - public int maxProgresstime() { - return mMaxProgresstime; - } - - @Override - public int increaseProgress(int aProgress) { - mProgresstime += aProgress; - return mMaxProgresstime - mProgresstime; - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return getFillableStack() != null || (getRecipeList() != null && getRecipeList().containsInput(aFluid)); - } - - @Override - public boolean isFluidChangingAllowed() { - return true; - } - - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean canTankBeFilled() { - return true; - } - - @Override - public boolean canTankBeEmptied() { - return true; - } - - @Override - public boolean displaysItemStack() { - return true; - } - - @Override - public boolean displaysStackSize() { - return true; - } - - @Override - public FluidStack getDisplayedFluid() { - return displaysOutputFluid() ? getDrainableStack() : null; - } - - @Override - public FluidStack getDrainableStack() { - return mFluidOut; - } - - @Override - public FluidStack setDrainableStack(FluidStack aFluid) { - mFluidOut = aFluid; - return mFluidOut; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - if(!false) { - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - for(byte i=0;i < 6; i++){ - if(aBaseMetaTileEntity.getAirAtSide(i)){ - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - } - GT_Utility.sendChatToPlayer(aPlayer,"No free Side!"); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_BasicMachine(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); - } - - @Override - public void initDefaultModes(NBTTagCompound aNBT) { - mMainFacing = -1; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mFluidTransfer", mFluidTransfer); - aNBT.setBoolean("mItemTransfer", mItemTransfer); - aNBT.setBoolean("mHasBeenUpdated", mHasBeenUpdated); - aNBT.setBoolean("mAllowInputFromOutputSide", mAllowInputFromOutputSide); - aNBT.setInteger("mEUt", mEUt); - aNBT.setInteger("mMainFacing", mMainFacing); - aNBT.setInteger("mProgresstime", mProgresstime); - aNBT.setInteger("mMaxProgresstime", mMaxProgresstime); - if (mOutputFluid != null) aNBT.setTag("mOutputFluid", mOutputFluid.writeToNBT(new NBTTagCompound())); - if (mFluidOut != null) aNBT.setTag("mFluidOut", mFluidOut.writeToNBT(new NBTTagCompound())); - - for (int i = 0; i < mOutputItems.length; i++) - if (mOutputItems[i] != null) - aNBT.setTag("mOutputItem" + i, mOutputItems[i].writeToNBT(new NBTTagCompound())); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mFluidTransfer = aNBT.getBoolean("mFluidTransfer"); - mItemTransfer = aNBT.getBoolean("mItemTransfer"); - mHasBeenUpdated = aNBT.getBoolean("mHasBeenUpdated"); - mAllowInputFromOutputSide = aNBT.getBoolean("mAllowInputFromOutputSide"); - mEUt = aNBT.getInteger("mEUt"); - mMainFacing = aNBT.getInteger("mMainFacing"); - mProgresstime = aNBT.getInteger("mProgresstime"); - mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); - mOutputFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid")); - mFluidOut = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluidOut")); - - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - if (aBaseMetaTileEntity.isServerSide()) { - - //Utils.LOG_WARNING("Ticking Tank."); - mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3; - mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3; - - doDisplayThings(); - - boolean tSucceeded = false; - - if (mMaxProgresstime > 0 && (mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) { - aBaseMetaTileEntity.setActive(true); - if (mProgresstime < 0 || drainEnergyForProcess(mEUt)) { - if (++mProgresstime >= mMaxProgresstime) { - for (int i = 0; i < mOutputItems.length; i++) - for (int j = 0; j < mOutputItems.length; j++) - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) - break; - if (mOutputFluid != null) - if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy()); - else if (mOutputFluid.isFluidEqual(getDrainableStack())) - getDrainableStack().amount += mOutputFluid.amount; - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; - mOutputFluid = null; - mEUt = 0; - mProgresstime = 0; - mMaxProgresstime = 0; - mStuttering = false; - tSucceeded = true; - endProcess(); - } - if (mProgresstime > 5) mStuttering = false; - XSTR aXSTR = new XSTR(); - if(false && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); - } else { - if (!mStuttering) { - stutterProcess(); - if (canHaveInsufficientEnergy()) mProgresstime = -100; - mStuttering = true; - } - } - } else { - aBaseMetaTileEntity.setActive(false); - } - - boolean tRemovedOutputFluid = false; - Logger.WARNING("R0"); - - if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { - IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); - if (tTank != null) { - FluidStack tDrained = drain(1000, false); - if (tDrained != null) { - int tFilledAmount = tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); - if (tFilledAmount > 0) - tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), drain(tFilledAmount, true), true); - } - } - if (getDrainableStack() == null) tRemovedOutputFluid = true; - } - - if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) { - TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); - for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { - tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); - } - } - - if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; - else mOutputBlocked++; - Logger.WARNING("R1"); - if (allowToCheckRecipe()) { - Logger.WARNING("R2--------------------------------------------------"); - Logger.WARNING("R2: (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe())"); - Logger.WARNING("R2--------------------------------------------------"); - Logger.WARNING("R2-mMaxProgresstime: "+mMaxProgresstime); - Logger.WARNING("R2-isAllowedToWork(): "+aBaseMetaTileEntity.isAllowedToWork()); - Logger.WARNING("R2--------------------------------------------------"); - Logger.WARNING("R2-tRemovedOutputFluid: "+tRemovedOutputFluid); - Logger.WARNING("R2-tSucceeded: "+tSucceeded); - Logger.WARNING("R2-hasInventoryBeenModified(): "+aBaseMetaTileEntity.hasInventoryBeenModified()); - Logger.WARNING("R2-(aTick % 600 == 0): "+(aTick % 600 == 0)); - Logger.WARNING("R2-hasWorkJustBeenEnabled(): "+aBaseMetaTileEntity.hasWorkJustBeenEnabled()); - Logger.WARNING("R2--------------------------------------------------"); - Logger.WARNING("R2-hasEnoughEnergyToCheckRecipe(): "+hasEnoughEnergyToCheckRecipe()); - Logger.WARNING("R2--------------------------------------------------"); - if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { - Logger.WARNING("R3"); - if (checkRecipe() == 2) { - if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null; - Logger.WARNING("R4"); - for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - for (int i = 0; i < mOutputItems.length; i++) { - mOutputItems[i] = GT_Utility.copy(mOutputItems[i]); - if (mOutputItems[i] != null && mOutputItems[i].stackSize > 64) - mOutputItems[i].stackSize = 64; - mOutputItems[i] = GT_OreDictUnificator.get(true, mOutputItems[i]); - } - if (mFluid != null && mFluid.amount <= 0) mFluid = null; - mMaxProgresstime = Math.max(1, mMaxProgresstime); - if (GT_Utility.isDebugItem(mInventory[dechargerSlotStartIndex()])) { - mEUt = mMaxProgresstime = 1; - } - startProcess(); - } else { - mMaxProgresstime = 0; - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; - mOutputFluid = null; - } - } - } else { - if (!mStuttering) { - stutterProcess(); - mStuttering = true; - } - } - } - } - - protected void doDisplayThings() { - if (mMainFacing < 2 && getBaseMetaTileEntity().getFrontFacing() > 1) { - mMainFacing = getBaseMetaTileEntity().getFrontFacing(); - } - if (mMainFacing >= 2 && !mHasBeenUpdated) { - mHasBeenUpdated = true; - //getBaseMetaTileEntity().setFrontFacing(getBaseMetaTileEntity().getBackFacing()); - } - - if (displaysInputFluid()) { - int tDisplayStackSlot = OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; - if (getFillableStack() == null) { - if (ItemList.Display_Fluid.isStackEqual(mInventory[tDisplayStackSlot], true, true)) - mInventory[tDisplayStackSlot] = null; - } else { - mInventory[tDisplayStackSlot] = GT_Utility.getFluidDisplayStack(getFillableStack(), displaysStackSize()); - } - } - } - - protected boolean hasEnoughEnergyToCheckRecipe() { - return getBaseMetaTileEntity().isUniversalEnergyStored(getMinimumStoredEU() / 2); - } - - protected boolean drainEnergyForProcess(long aEUt) { - return getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEUt, false); - } - - protected void calculateOverclockedNess(GT_Recipe aRecipe) { - calculateOverclockedNess(aRecipe.mEUt, aRecipe.mDuration); - } - - protected void calculateOverclockedNess(int aEUt, int aDuration) { - if (aEUt <= 16) { - mEUt = aEUt * (1 << (mTier - 1)) * (1 << (mTier - 1)); - mMaxProgresstime = aDuration / (1 << (mTier - 1)); - } else { - mEUt = aEUt; - mMaxProgresstime = aDuration; - while (mEUt <= V[mTier - 1] * mAmperage) { - mEUt *= 4; - mMaxProgresstime /= 2; - } - } - } - - protected ItemStack getSpecialSlot() { - return mInventory[3]; - } - - protected ItemStack getOutputAt(int aIndex) { - return mInventory[getOutputSlot() + aIndex]; - } - - protected ItemStack[] getAllOutputs() { - ItemStack[] rOutputs = new ItemStack[mOutputItems.length]; - for (int i = 0; i < mOutputItems.length; i++) rOutputs[i] = getOutputAt(i); - return rOutputs; - } - - protected boolean canOutput(GT_Recipe aRecipe) { - return aRecipe != null && (aRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs)); - } - - protected boolean canOutput(ItemStack... aOutputs) { - if (aOutputs == null) return true; - ItemStack[] tOutputSlots = getAllOutputs(); - for (int i = 0; i < tOutputSlots.length && i < aOutputs.length; i++) - if (tOutputSlots[i] != null && aOutputs[i] != null && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) { - mOutputBlocked++; - return false; - } - return true; - } - - protected boolean canOutput(FluidStack aOutput) { - return getDrainableStack() == null || aOutput == null || (getDrainableStack().isFluidEqual(aOutput) && (getDrainableStack().amount <= 0 || getDrainableStack().amount + aOutput.amount <= getCapacity())); - } - - protected ItemStack getInputAt(int aIndex) { - return mInventory[getInputSlot() + aIndex]; - } - - protected ItemStack[] getAllInputs() { - ItemStack[] rInputs = new ItemStack[mInputSlotCount]; - for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i); - return rInputs; - } - - protected boolean isOutputEmpty() { - boolean rIsEmpty = true; - for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) rIsEmpty = false; - return rIsEmpty; - } - - protected boolean displaysInputFluid() { - return true; - } - - protected boolean displaysOutputFluid() { - return true; - } - - @Override - public void onValueUpdate(byte aValue) { - mMainFacing = aValue; - } - - @Override - public byte getUpdateData() { - return (byte) mMainFacing; - } - - @Override - public void doSound(byte aIndex, double aX, double aY, double aZ) { - super.doSound(aIndex, aX, aY, aZ); - if (aIndex == 8) GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(210), 100, 1.0F, aX, aY, aZ); - } - - public boolean doesAutoOutput() { - return mItemTransfer; - } - - public boolean doesAutoOutputFluids() { - return mFluidTransfer; - } - - public boolean allowToCheckRecipe() { - return true; - } - - public boolean showPipeFacing() { - return true; - } - - /** - * Called whenever the Machine successfully started a Process, useful for Sound Effects - */ - public void startProcess() { - // - } - - /** - * Called whenever the Machine successfully finished a Process, useful for Sound Effects - */ - public void endProcess() { - // - } - - /** - * Called whenever the Machine aborted a Process, useful for Sound Effects - */ - public void abortProcess() { - // - } - - /** - * Called whenever the Machine aborted a Process but still works on it, useful for Sound Effects - */ - public void stutterProcess() { - if (useStandardStutterSound()) sendSound((byte) 8); - } - - /** - * If this Machine can have the Insufficient Energy Line Problem - */ - public boolean canHaveInsufficientEnergy() { - return true; - } - - public boolean useStandardStutterSound() { - return true; - } - - @Override - public String[] getInfoData() { - return new String[]{ - mNEIName, - "Progress:", (mProgresstime / 20) + " secs", - (mMaxProgresstime / 20) + " secs", - "Stored Energy:", - getBaseMetaTileEntity().getStoredEU() + "EU", - getBaseMetaTileEntity().getEUCapacity() + "EU"}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) { - mAllowInputFromOutputSide = !mAllowInputFromOutputSide; - GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? ("Input from Output Side allowed") : ("Input from Output Side forbidden")); - } - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { - return (aSide != mMainFacing || GregTech_API.getCoverBehavior(aCoverID.toStack()).isGUIClickable(aSide, GT_Utility.stackToInt(aCoverID.toStack()), 0, getBaseMetaTileEntity())); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide != mMainFacing && aIndex >= getOutputSlot() && aIndex < getOutputSlot() + mOutputItems.length; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (aSide == mMainFacing || aIndex < getInputSlot() || aIndex >= getInputSlot() + mInputSlotCount || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) - return false; - for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i])) return i == aIndex; - return true; - } - - /** - * @return the Recipe List which is used for this Machine, this is a useful Default Handler - */ - public GT_Recipe_Map getRecipeList() { - return null; - } - - /** - * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a special case - *

- * I thought about Enum too, but Enum doesn't add support for people adding other return Systems. - *

- * Funny how Eclipse marks the word Enum as not correctly spelled. - * - * @return see constants above - */ - public int checkRecipe() { - return checkRecipe(false); - } - - public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId){ - return //TODO check or get a better solution - DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") || - DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") || - DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); - } - - - /** - * - * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... - * @return - */ - public int checkRecipe(boolean skipOC){ - GT_Recipe_Map tMap = getRecipeList(); - if (tMap == null) return DID_NOT_FIND_RECIPE; - GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); - if (tRecipe == null) return DID_NOT_FIND_RECIPE; - - if (false && tRecipe.mSpecialValue == -100 && - !isValidForLowGravity(tRecipe,getBaseMetaTileEntity().getWorld().provider.dimensionId)) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; - if (!canOutput(tRecipe)) { - mOutputBlocked++; - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - } - if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - for (int i = 0; i < mOutputItems.length; i++) - if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) - mOutputItems[i] = tRecipe.getOutput(i); - mOutputFluid = tRecipe.getFluidOutput(0); - calculateOverclockedNess(tRecipe); - return FOUND_AND_SUCCESSFULLY_USED_RECIPE; - } - - public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; - } - - public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java deleted file mode 100644 index 1e367d4f15..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java +++ /dev/null @@ -1,345 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.ItemList; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_DeluxeTank; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_DeluxeTank; -import net.minecraftforge.fluids.FluidStack; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - *

- * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually - */ -public abstract class GT_MetaTileEntity_DeluxeTank extends GT_MetaTileEntity_BasicTank { - - public FluidStack mFluid2; - - /** - * @param aInvSlotCount should be 3 - */ - public GT_MetaTileEntity_DeluxeTank(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); - } - - public GT_MetaTileEntity_DeluxeTank(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex != this.getStackDisplaySlot(); - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - if (this.mFluid != null) { - aNBT.setTag("mFluid", this.mFluid.writeToNBT(new NBTTagCompound())); - } - if (this.mFluid2 != null) { - aNBT.setTag("mFluid2", this.mFluid2.writeToNBT(new NBTTagCompound())); - } - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); - this.mFluid2 = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid2")); - } - - @Override - public abstract boolean doesFillContainers(); - - @Override - public abstract boolean doesEmptyContainers(); - - @Override - public abstract boolean canTankBeFilled(); - - @Override - public abstract boolean canTankBeEmptied(); - - @Override - public abstract boolean displaysItemStack(); - - @Override - public abstract boolean displaysStackSize(); - - @Override - public int getInputSlot() { - return 0; - } - - @Override - public int getOutputSlot() { - return 1; - } - - @Override - public int getStackDisplaySlot() { - return 2; - } - - public int getStackDisplaySlot2() { - return 3; - } - - @Override - public boolean isFluidInputAllowed(final FluidStack aFluid) { - return true; - } - - @Override - public boolean isFluidChangingAllowed() { - return true; - } - - @Override - public FluidStack getFillableStack() { - return this.getFillableStackEx(1); - } - - public FluidStack getFillableStackEx(final int stackID) { - if (stackID <= 1){ - return this.mFluid; - } - return this.mFluid2; - } - - @Override - public FluidStack setFillableStack(final FluidStack aFluid) { - this.mFluid = aFluid; - return this.mFluid; - } - - public FluidStack setFillableStack2(final FluidStack aFluid) { - this.mFluid2 = aFluid; - return this.mFluid2; - } - - @Override - public FluidStack getDrainableStack() { - return this.getDrainableStackEx(1); - } - - public FluidStack getDrainableStackEx(final int stackID) { - if (stackID <= 1){ - return this.mFluid; - } - return this.mFluid2; - } - - @Override - public FluidStack setDrainableStack(final FluidStack aFluid) { - this.mFluid = aFluid; - return this.mFluid; - } - - @Override - public FluidStack getDisplayedFluid() { - return this.getDrainableStack(); - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_DeluxeTank(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_DeluxeTank(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); - } - - @Override - public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (this.isFluidChangingAllowed() && (this.getFillableStack() != null) && (this.getFillableStack().amount <= 0)) { - this.setFillableStack(null); - } - - if (this.displaysItemStack() && (this.getStackDisplaySlot() >= 0) && (this.getStackDisplaySlot() < this.mInventory.length)) { - if (this.getDisplayedFluid() == null) { - if (ItemList.Display_Fluid.isStackEqual(this.mInventory[this.getStackDisplaySlot()], true, true)) { - this.mInventory[this.getStackDisplaySlot()] = null; - } - } else { - this.mInventory[this.getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(this.getDisplayedFluid(), this.displaysStackSize()); - } - } - - if (this.displaysItemStack() && (this.getStackDisplaySlot2() >= 0) && (this.getStackDisplaySlot2() < this.mInventory.length)) { - if (this.getDrainableStackEx(2) == null) { - if (ItemList.Display_Fluid.isStackEqual(this.mInventory[this.getStackDisplaySlot2()], true, true)) { - this.mInventory[this.getStackDisplaySlot2()] = null; - } - } else { - this.mInventory[this.getStackDisplaySlot2()] = GT_Utility.getFluidDisplayStack(this.getDrainableStackEx(2), this.displaysStackSize()); - } - } - - if (this.doesEmptyContainers()) { - final FluidStack tFluid = GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true); - if ((tFluid != null) && this.isFluidInputAllowed(tFluid)) { - - if (tFluid.isFluidEqual(this.getDrainableStackEx(1)) || (this.getDrainableStackEx(1) == null)){ - if (this.getFillableStackEx(1) == null) { - if (this.isFluidInputAllowed(tFluid) && (tFluid.amount <= this.getCapacity())) { - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { - this.setFillableStack(tFluid.copy()); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - } - } - } else { - if (tFluid.isFluidEqual(this.getFillableStack()) && ((tFluid.amount + this.getFillableStack().amount) <= this.getCapacity())) { - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { - this.getFillableStack().amount += tFluid.amount; - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - } - } - } - } - else if (tFluid.isFluidEqual(this.getDrainableStackEx(2)) || (this.getDrainableStackEx(2) == null)){ - if (this.getFillableStackEx(2) == null) { - if (this.isFluidInputAllowed(tFluid) && (tFluid.amount <= this.getCapacity())) { - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { - this.setFillableStack2(tFluid.copy()); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - } - } - } else { - if (tFluid.isFluidEqual(this.getFillableStackEx(2)) && ((tFluid.amount + this.getFillableStackEx(2).amount) <= this.getCapacity())) { - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { - this.getFillableStackEx(2).amount += tFluid.amount; - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - } - } - } - } - else { - Logger.INFO("Something broke when trying to empty cells between two fluid tank areas."); - } - } - } - - if (this.doesFillContainers()) { - final ItemStack tOutput = GT_Utility.fillFluidContainer(this.getDrainableStack(), this.mInventory[this.getInputSlot()], false, true); - if ((tOutput != null) && aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tOutput, 1)) { - final FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - if (tFluid != null) { - this.getDrainableStack().amount -= tFluid.amount; - } - if ((this.getDrainableStack().amount <= 0) && this.isFluidChangingAllowed()) { - this.setDrainableStack(null); - } - } - } - } - } - - @Override - public FluidStack getFluid() { - return this.getDrainableStack(); - } - - @Override - public int getFluidAmount() { - return this.getDrainableStack() != null ? this.getDrainableStack().amount : 0; - } - - @Override - public int fill(final FluidStack aFluid, final boolean doFill) { - if ((aFluid == null) || (aFluid.getFluid().getID() <= 0) || (aFluid.amount <= 0) || !this.canTankBeFilled() || !this.isFluidInputAllowed(aFluid)) { - return 0; - } - - if ((this.getFillableStack() == null) || (this.getFillableStack().getFluid().getID() <= 0)) { - if (aFluid.amount <= this.getCapacity()) { - if (doFill) { - this.setFillableStack(aFluid.copy()); - this.getBaseMetaTileEntity().markDirty(); - } - return aFluid.amount; - } - if (doFill) { - this.setFillableStack(aFluid.copy()); - this.getFillableStack().amount = this.getCapacity(); - this.getBaseMetaTileEntity().markDirty(); - } - return this.getCapacity(); - } - - if (!this.getFillableStack().isFluidEqual(aFluid)) { - return 0; - } - - final int space = this.getCapacity() - this.getFillableStack().amount; - if (aFluid.amount <= space) { - if (doFill) { - this.getFillableStack().amount += aFluid.amount; - this.getBaseMetaTileEntity().markDirty(); - } - return aFluid.amount; - } - if (doFill) { - this.getFillableStack().amount = this.getCapacity(); - } - return space; - } - - @Override - public FluidStack drain(final int maxDrain, final boolean doDrain) { - if ((this.getDrainableStack() == null) || !this.canTankBeEmptied()) { - return null; - } - if ((this.getDrainableStack().amount <= 0) && this.isFluidChangingAllowed()) { - this.setDrainableStack(null); - this.getBaseMetaTileEntity().markDirty(); - return null; - } - - int used = maxDrain; - if (this.getDrainableStack().amount < used) { - used = this.getDrainableStack().amount; - } - - if (doDrain) { - this.getDrainableStack().amount -= used; - this.getBaseMetaTileEntity().markDirty(); - } - - final FluidStack drained = this.getDrainableStack().copy(); - drained.amount = used; - - if ((this.getDrainableStack().amount <= 0) && this.isFluidChangingAllowed()) { - this.setDrainableStack(null); - this.getBaseMetaTileEntity().markDirty(); - } - - return drained; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return aIndex == this.getOutputSlot(); - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return aIndex == this.getInputSlot(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java deleted file mode 100644 index e6fd5dc797..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java +++ /dev/null @@ -1,290 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraft.world.World; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import java.lang.reflect.Field; - -import net.minecraft.entity.player.EntityPlayer; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; - -public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_Input { - private static XSTR floatGen; - - public GT_MetaTileEntity_Hatch_AirIntake(final int aID, final String aName, final String aNameRegional, - final int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - /*public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - }*/ - - private static String[] S; - private static Field F; - - public synchronized String[] getDescription() { - try { - if (F == null || S == null) { - Field t = ReflectionUtils.getField(this.getClass(), "mDescriptionArray"); - if (t != null) { - F = t; - } - else { - F = ReflectionUtils.getField(this.getClass(), "mDescription"); - } - if (S == null && F != null) { - Object o = F.get(this); - if (o instanceof String[]) { - S = (String[]) o; - } - else if (o instanceof String) { - S = new String[] {(String) o}; - } - } - - } - } - catch (Throwable t) { - - } - if (S != null) { - final String[] desc = new String[S.length + 4]; - System.arraycopy(S, 0, desc, 0, S.length); - desc[S.length] = "DO NOT OBSTRUCT THE INPUT!"; - desc[S.length + 1] = "Draws in Air from the surrounding environment"; - desc[S.length + 2] = "Creates 1000L of Air every 4 ticks"; - desc[S.length + 3] = CORE.GT_Tooltip; - return desc; - } - else { - return new String[] {"DO NOT OBSTRUCT THE INPUT!", "Draws in Air from the surrounding environment", "Creates 1000L of Air every 4 ticks", CORE.GT_Tooltip}; - } - - - } - - public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; - } - - public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; - } - - public boolean isSimpleMachine() { - return true; - } - - public boolean isFacingValid(final byte aFacing) { - return true; - } - - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - public boolean isValidSlot(final int aIndex) { - return false; - } - - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_AirIntake(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return false; - } - - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return false; - } - - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (this.getBaseMetaTileEntity().isActive() && addAirToHatch(aTick)) { - if (aTick % 8 == 0) { - if (aBaseMetaTileEntity.isClientSide()) { - this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "cloud"); - } - } - } - } - - public void pollutionParticles(final World aWorld, final String name) { - - final float ran1 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); - float ran2 = 0.0f; - float ran3 = 0.0f; - ran2 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); - ran3 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); - - final IGregTechTileEntity aMuffler = this.getBaseMetaTileEntity(); - final ForgeDirection aDir = ForgeDirection.getOrientation((int) aMuffler.getFrontFacing()); - final float xPos = aDir.offsetX * 0.76f + aMuffler.getXCoord() + 0.25f; - float yPos = aDir.offsetY * 0.76f + aMuffler.getYCoord() + 0.65f; - final float zPos = aDir.offsetZ * 0.76f + aMuffler.getZCoord() + 0.25f; - float ySpd = aDir.offsetY * 0.1f + 0.2f + 0.1f * GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); - float xSpd; - float zSpd; - if (aDir.offsetY == -1) { - //Logger.INFO("Y = -1"); - final float temp = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 2.0f * CORE.PI; - xSpd = (float) Math.sin(temp) * 0.1f; - zSpd = (float) Math.cos(temp) * 0.1f; - ySpd = -ySpd; - yPos = yPos - 0.8f; - } else { - xSpd = aDir.offsetX * (0.1f + 0.2f * GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat()); - zSpd = aDir.offsetZ * (0.1f + 0.2f * GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat()); - - xSpd = -xSpd; - zSpd = -zSpd; - - - } - - aWorld.spawnParticle(name, (double) (xPos + ran1 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), (double) xSpd, - (double) -ySpd, (double) zSpd); - aWorld.spawnParticle(name, (double) (xPos + ran2 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), (double) xSpd, - (double) -ySpd, (double) zSpd); - aWorld.spawnParticle(name, (double) (xPos + ran3 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), (double) xSpd, - (double) -ySpd, (double) zSpd); - } - - static { - GT_MetaTileEntity_Hatch_AirIntake.floatGen = new XSTR(); - } - - public int getTankPressure() { - return 100; - } - - public int getCapacity() { - return 128000; - } - - @Override - public boolean canTankBeEmptied() { - return true; - } - - private static Fluid AIR; - - public boolean isAirInHatch() { - if (this.mFluid != null) { - if (AIR == null) { - AIR = FluidUtils.getAir(1).getFluid(); - } - if (AIR == this.mFluid.getFluid()) { - return true; - } - else return false; - } - return true; - } - - public boolean addAirToHatch(long aTick) { - if (!this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing())) { - return false; - } - boolean a1 = canTankBeFilled(); - if (aTick % 4 != 0 && a1) { - return true; - } - else if (aTick % 4 != 0 && !a1) { - return false; - } - else { - if (!isAirInHatch()) { - return false; - } - if (this.mFluid != null && a1) { - this.mFluid.amount += 1000; - return true; - } - else if (this.mFluid != null && !a1) { - return false; - } - else { - if (this.mFluid == null) { - this.mFluid = FluidUtils.getFluidStack("air", 1000); - return true; - } - else { - //Not sure how any other fluid got in here - return false; - } - } - } - } - - @Override - public boolean canTankBeFilled() { - if (this.mFluid == null || (this.mFluid != null && ((this.mFluid.amount+1000) <= this.getCapacity()))) { - return true; - } - return false; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public int fill(FluidStack aFluid, boolean doFill) { - return 0; - } - - @Override - public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - return false; - } - - @Override - public int fill(ForgeDirection arg0, FluidStack arg1, boolean arg2) { - return 0; - } - - @Override - public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java deleted file mode 100644 index 5347b2e4f7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java +++ /dev/null @@ -1,148 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.gui.*; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.item.general.ItemControlCore; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -public class GT_MetaTileEntity_Hatch_ControlCore extends GT_MetaTileEntity_Hatch { - - public GT_Recipe_Map mRecipeMap = null; - - public BlockPos mControllerLocation; - - public GT_MetaTileEntity_Hatch_ControlCore(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Core determines maximum tier machine will operate at"); - } - - public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription[0], aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - CORE.GT_Tooltip}; - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_ControlCore(mName, mTier, StaticFields59.getDescriptionArray(this), mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, "Control Core Module"); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - } - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < mInventory.length; i++) - for (int j = i + 1; j < mInventory.length; j++) - if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() && (aStack != null && aStack.getItem() instanceof ItemControlCore); - } - - public boolean setOwner(TileEntity aTileEntity) { - if (mControllerLocation != null) { - return false; - } - else { - mControllerLocation = new BlockPos(aTileEntity); - return true; - } - } - - public boolean setOwner(IGregTechTileEntity aTileEntity) { - if (mControllerLocation != null) { - return false; - } - else { - mControllerLocation = new BlockPos(aTileEntity); - return true; - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java deleted file mode 100644 index 39f477b173..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java +++ /dev/null @@ -1,84 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.ITexture; - -public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatch_Dynamo { - public GT_MetaTileEntity_Hatch_DynamoBuffer(final int aID, final String aName, final String aNameRegional, - final int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_Hatch_DynamoBuffer(final String aName, final int aTier, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - /*public GT_MetaTileEntity_Hatch_DynamoBuffer(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - }*/ - - public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TexturesGtBlock.OVERLAYS_ENERGY_OUT_MULTI_BUFFER[this.mTier]}; - } - - public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, TexturesGtBlock.OVERLAYS_ENERGY_OUT_MULTI_BUFFER[this.mTier]}; - } - - @Override - public long getMinimumStoredEU() { - return 0L; - } - - @Override - public long maxEUStore() { - return 512L + GT_Values.V[this.mTier + 1] * 2048L; - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (MetaTileEntity) new GT_MetaTileEntity_Hatch_DynamoBuffer(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public String[] getDescription() { - String[] g; - if (CORE.GTNH || (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechVersionAsInt() >= 50932)) { - g = new String[]{ - "Dynamo with internal storage and additional Amp capacity", - "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input", - CORE.GT_Tooltip}; - - } - else { - g = new String[]{ - "Dynamo with internal storage and additional Amp capacity", - "Stores "+maxEUStore()+"EU", - "Amperage In: 4", - "Amperage Out: 4", - "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input", - "Large Turbines only supply 1A to this, other Multiblocks can inject more amps", - CORE.GT_Tooltip}; - } - return g; - } - - @Override - public long maxAmperesIn() { - return 4; - } - - @Override - public long maxAmperesOut() { - return 4; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java deleted file mode 100644 index a892346463..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java +++ /dev/null @@ -1,149 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import java.util.ArrayList; - -import gregtech.api.gui.GT_Container_4by4; -import gregtech.api.gui.GT_GUIContainer_4by4; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileEntity_Hatch { - public GT_Recipe_Map mRecipeMap = null; - - public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 16, new String[]{ - "Holds Data Orbs for the Elemental Duplicator", - CORE.GT_Tooltip - }); - } - - public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 16, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 16, aDescription, aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Cyber_Interface)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Cyber_Interface)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(mName, mTier, mDescriptionArray, mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Orb Repository"); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - } - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < mInventory.length; i++) { - if (mInventory[i] != null && mInventory[i].stackSize <= 0) { - mInventory[i] = null; - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - - } - - public String trans(String aKey, String aEnglish) { - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return true; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); - } - - public ArrayList getInventory(){ - ArrayList aContents = new ArrayList(); - for (int i=0;i mFuelInstanceMap = new HashMap(); - private static final HashMap mFuelValueMap = new HashMap(); - private static final HashMap mFuelTypeMap = new HashMap(); - private static final HashMap mFuelTypeMapReverse = new HashMap(); - - public static boolean registerPelletForHatch(ItemStack aStack, long aFuelValue) { - if (!ItemUtils.checkForInvalidItems(aStack)) { - return false; - } - ItemStack aTemp = aStack.copy(); - aTemp.stackSize = 1; - Dat aDat = new Dat(aTemp); - String aKey = aDat.mUniqueDataTag; - mFuelInstanceMap.put(aKey, aTemp); - mFuelValueMap.put(aKey, aFuelValue); - mFuelTypeMap.put(aKey, aDat.getKey()); - mFuelTypeMapReverse.put(aDat.getKey(), aKey); - Logger.INFO("RTG Hatch: Registered Fuel Pellet: "+ItemUtils.getItemName(aTemp)+", Fuel Value: "+aFuelValue+", Key: "+aKey+", Key2: "+aDat.getKey()); - return true; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - InventoryUtils.sortInventoryItems(this); - } - if (aTimer % 100 == 0 && aBaseMetaTileEntity.isServerSide()) { - if (hasPellet(this)) { - Logger.INFO("Has Pellet"); - tryConsumePellet(this); - } - } - } - - private static void tryConsumePellet(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { - ItemStack aPellet = getPelletToConsume(aTile); - if (aPellet != null) { - Logger.INFO("Found Pellet"); - long aFuel = getFuelValueOfPellet(aPellet); - if (aFuel > 0) { - Logger.INFO("Has Fuel Value: "+aFuel); - if (hasSpaceForEnergy(aTile, aFuel)) { - Logger.INFO("Can buffer"); - aPellet.stackSize = 0; - Logger.INFO("Stack set to 0"); - aPellet = null; - Logger.INFO("null stack"); - addEnergyToInternalStorage(aTile, aFuel); - Logger.INFO("Consumed"); - } - } - } - aTile.updateSlots(); - Logger.INFO("updating slots"); - } - - private static void addEnergyToInternalStorage(GT_MetaTileEntity_Hatch_Energy_RTG aTile, long aFuel) { - aTile.getBaseMetaTileEntity().increaseStoredEnergyUnits(aFuel, true); - } - - public static boolean hasSpaceForEnergy(GT_MetaTileEntity_Hatch_Energy_RTG aTile, long aAmount) { - long aMax = aTile.maxEUStore(); - long aCurrent = aTile.getEUVar(); - if ((aMax - aCurrent) >= aAmount) { - return true; - } - return false; - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) { - if (mInventory[i] != null && mInventory[i].stackSize <= 0) { - mInventory[i] = null; - } - } - InventoryUtils.sortInventoryItems(this); - } - - public static boolean hasPellet(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { - for (ItemStack o : aTile.mInventory) { - if (o != null ) { - for (ItemStack i : mFuelInstanceMap.values()) { - if (ItemUtils.areItemsEqual(o, i)) { - return true; - } - } - } - } - return false; - } - - public static String getPelletType(ItemStack o) { - if (o == null) { - return "error"; - } - Dat aDat = new Dat(o); - return mFuelTypeMapReverse.get(aDat.getKey()); - } - - public static long getFuelValueOfPellet(ItemStack aPellet) { - String aType = getPelletType(aPellet); - if (mFuelValueMap.containsKey(aType)) { - return mFuelValueMap.get(aType); - } - return 0; - } - - public static ItemStack getPelletToConsume(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { - for (ItemStack o : aTile.mInventory) { - if (o != null ) { - for (ItemStack i : mFuelInstanceMap.values()) { - if (ItemUtils.areItemsEqual(o, i)) { - return o; - } - } - } - } - return null; - } - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java deleted file mode 100644 index 57f8b722c3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java +++ /dev/null @@ -1,258 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import static gregtech.api.enums.GT_Values.V; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Hatch_InputBattery -extends -GT_MetaTileEntity_Hatch { - public final GT_Recipe_Map mRecipeMap = null; - - public GT_MetaTileEntity_Hatch_InputBattery(int aID, String aName, - String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Chargeable Item Bus for Multiblocks"); - } - - public GT_MetaTileEntity_Hatch_InputBattery(String aName, int aTier, - String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, - aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 4 : 16, - aDescription, aTextures); - } - - @Override - public String[] getDescription() { - int mSlots = 0; - if (this.mTier == 2) { - mSlots = 4; - } - else if (this.mTier == 4) { - mSlots = 16; - } - else { - mSlots = 16; - } - return new String[]{ - this.mDescription, - "Capacity: " + mSlots + " slots", - CORE.GT_Tooltip}; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isInputFacing(byte aSide) { - return aSide == getBaseMetaTileEntity().getFrontFacing(); - } - - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public long maxEUStore() { - return 512 + V[mTier + 1] * 16; - } - - @Override - public long maxAmperesIn() { - return 4; - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_InputBattery(mName, mTier, - mDescription, mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, - EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - switch (mTier) { - case 2 : - return new CONTAINER_Electric_2by2(aPlayerInventory, - aBaseMetaTileEntity); - case 4 : - return new CONTAINER_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity); - default : - return new CONTAINER_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity); - } - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - switch (mTier) { - case 2 : - return new GUI_Electric_2by2(aPlayerInventory, - aBaseMetaTileEntity, "Charging Bus"); - case 4 : - return new GUI_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity, "Charging Bus"); - default : - return new GUI_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity, "Charging Bus"); - } - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() - && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - } - if (aBaseMetaTileEntity.isServerSide()){ - if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) { - MetaTileEntity mMetaTileEntity = (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity(); - if (mMetaTileEntity.rechargerSlotCount() > 0 && aBaseMetaTileEntity.getStoredEU() > 0) { - for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { - if (aBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { - for (int u=0;u<10;u++){ - aBaseMetaTileEntity.decreaseStoredEnergyUnits(GT_ModHandler.chargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[this.mTier] * 15, aBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, GT_Values.V[u]), false, false), true); - if (mMetaTileEntity.mInventory[i].stackSize <= 0){ - mMetaTileEntity.mInventory[i] = null; - } - } - } - } - } - else { - //Utils.LOG_INFO("reCharger Slot Count = "+mMetaTileEntity.rechargerSlotCount()); - //Utils.LOG_INFO("getStoredEU = "+aBaseMetaTileEntity.getStoredEU()); - //Utils.LOG_INFO("getEUVar = "+mMetaTileEntity.getEUVar()); - } - } - } - super.onPostTick(aBaseMetaTileEntity, aTimer); - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) - mInventory[i] = null; - fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < mInventory.length; i++) - for (int j = i + 1; j < mInventory.length; j++) - if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual( - mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, - i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, - int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, - int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); - } - - @Override - public int rechargerSlotStartIndex() { - return 0; - } - - @Override - public int rechargerSlotCount() { - switch (mTier) { - case 2 : - return 4; - case 4 : - return 16; - default : - return 16; - } - } - - @Override - public int dechargerSlotStartIndex() { - return 0; - } - - @Override - public int dechargerSlotCount() { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java deleted file mode 100644 index ba4e394114..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ /dev/null @@ -1,329 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Config; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.general.ItemAirFilter; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_Hatch_Muffler_Advanced; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_Hatch_Muffler_Advanced; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch_Muffler { - - protected int SLOT_FILTER = 0; - - @Override - public void onConfigLoad(GT_Config aConfig) { - super.onConfigLoad(aConfig); - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { - try { - Integer a1 = (int) StaticFields59.getFieldFromGregtechProxy("mPollutionSmogLimit"); - if (a1 != null && a1 > 0) { - mPollutionSmogLimit = a1; - } - } - catch (Throwable t) { - mPollutionSmogLimit = 500000; - } - } - } - - private int mPollutionSmogLimit = 500000; - - public GT_MetaTileEntity_Hatch_Muffler_Adv(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); - } - - public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); - } - - public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription[0], aTextures); - ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); - } - - public String[] getDescription() { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - String[] mDescArray = StaticFields59.getDescriptionArray(this); - String[] desc = new String[mDescArray.length + 7]; - System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length); - desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; - desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face"; - desc[mDescArray.length + 2] = "Requires Air Filters"; - desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-"+GT_Values.VN[9]; - desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) + "%"; - desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) + "% of CO2/CO/SO2"; - desc[mDescArray.length + 6] = CORE.GT_Tooltip; - return desc; - } - else { - return new String[] {}; - } - } - - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; - } - - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; - } - - public boolean isValidSlot(int aIndex) { - return aIndex == SLOT_FILTER; - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Muffler_Adv(this.mName, this.mTier, StaticFields59.getDescriptionArray(this), this.mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, - EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - - - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity); - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity, "Advanced Muffler", "machine_Charger.png"); - } - - private boolean airCheck() { - if ( - this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) && - this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1) && - this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 2) - ) { - return true; - } - return false; - } - - public boolean polluteEnvironment() { - if (airCheck() && damageAirFilter()) { - int aEmission = this.calculatePollutionReduction(10000); - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), aEmission); - //Logger.INFO("Outputting "+aEmission+"gbl"); - return true; - } else { - //Logger.INFO("Failed to output pollution"); - return false; - } - } - - - public int calculatePollutionReductionForTooltip(int aPollution) { - return (int) (aPollution * Math.pow(0.64D, (double) (this.mTier - 1))); - } - - public int calculatePollutionReduction(int aPollution) { - double aVal1 = aPollution * Math.pow(0.64D, (double) (this.mTier - 1)); - int aVal2 = (int) aVal1; - if (!hasValidFilter()) { - aVal2 = (int) ((double) aPollution * Math.pow(0.7D, (double) (this.mTier - 1)));; - } - return aVal2; - } - - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (aIndex == this.SLOT_FILTER) { - if (isAirFilter(aStack)) { - return true; - } - } - return false; - } - - private ItemStack getInventoryStack() { - if (this.mInventory != null && this.mInventory.length > 0) { - if (this.mInventory.length-1 >= this.SLOT_FILTER) { - return this.mInventory[this.SLOT_FILTER]; - } - } - return null; - } - - private void breakAirFilter() { - if (this.mInventory != null && this.mInventory.length > 0) { - if (this.mInventory.length-1 >= this.SLOT_FILTER) { - Logger.INFO("Breaking Filter"); - this.mInventory[this.SLOT_FILTER] = null; - } - } - } - - public boolean hasValidFilter() { - return isAirFilter(getInventoryStack()); - } - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - - //Logger.INFO("A1"); - - super.onPostTick(aBaseMetaTileEntity, aTick); - - //Logger.INFO("A2"); - - String aParticleName; - if ((aTick % 2) == 0){ - aParticleName = "cloud"; - } - else { - aParticleName = "smoke"; - } - - //Logger.INFO("A3"); - - if (aBaseMetaTileEntity.isClientSide()) { - //Logger.INFO("B1"); - if (this.getBaseMetaTileEntity().isActive()) { - //Logger.INFO("C1"); - this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); - } - //return; - } - else { - //Logger.INFO("B2"); - if (this.getInventoryStack() == null) { - //Logger.INFO("D1"); - //Logger.INFO("Empty - "+this.mInventory.length); - } - else { - //Logger.INFO("D2"); - } - } - //Logger.INFO("A4"); - - - - } - - public boolean isAirFilter(ItemStack filter){ - if (filter == null) { - return false; - } - if (filter.getItem() instanceof ItemAirFilter){ - - if (this.mTier < 5) { - return true; - } - else { - if (filter.getItemDamage() == 1) { - return true; - } - } - } - return false; - } - - public boolean damageAirFilter(){ - ItemStack filter = getInventoryStack(); - if (filter == null) { - return false; - } - - if (isAirFilter(filter)){ - long currentUse = ItemAirFilter.getFilterDamage(filter); - Logger.INFO("Filter Damage: "+currentUse); - //Remove broken Filter - if ((filter.getItemDamage() == 0 && currentUse >= 50-1) || (filter.getItemDamage() == 1 && currentUse >= 2500-1)){ - breakAirFilter(); - return true; - } - else { - //Do Damage - ItemAirFilter.setFilterDamage(filter, currentUse+1); - Logger.INFO("Filter Damage now: "+currentUse); - return true; - } - } - return false; - } - - public void pollutionParticles(World aWorld, String name) { - float ran1 = CORE.RANDOM.nextFloat(); - float ran2 = 0.0F; - float ran3 = 0.0F; - boolean chk1 = ran1 * 100.0F < (float) this.calculatePollutionReduction(100); - boolean chk2; - boolean chk3; - int aPollutionAmount = PollutionUtils.getPollution(getBaseMetaTileEntity()); - if (aPollutionAmount >= mPollutionSmogLimit) { - ran2 = CORE.RANDOM.nextFloat(); - ran3 = CORE.RANDOM.nextFloat(); - chk2 = ran2 * 100.0F < (float) this.calculatePollutionReduction(100); - chk3 = ran3 * 100.0F < (float) this.calculatePollutionReduction(100); - if (!chk1 && !chk2 && !chk3) { - return; - } - } else { - if (!chk1) { - return; - } - - chk3 = false; - chk2 = false; - } - - IGregTechTileEntity aMuffler = this.getBaseMetaTileEntity(); - ForgeDirection aDir = ForgeDirection.getOrientation(aMuffler.getFrontFacing()); - float xPos = (float) aDir.offsetX * 0.76F + (float) aMuffler.getXCoord() + 0.25F; - float yPos = (float) aDir.offsetY * 0.76F + (float) aMuffler.getYCoord() + 0.25F; - float zPos = (float) aDir.offsetZ * 0.76F + (float) aMuffler.getZCoord() + 0.25F; - float ySpd = (float) aDir.offsetY * 0.1F + 0.2F + 0.1F * CORE.RANDOM.nextFloat(); - float xSpd; - float zSpd; - if (aDir.offsetY == -1) { - float temp = CORE.RANDOM.nextFloat() * 2.0F * CORE.PI; - xSpd = (float) Math.sin((double) temp) * 0.1F; - zSpd = (float) Math.cos((double) temp) * 0.1F; - } else { - xSpd = (float) aDir.offsetX * (0.1F + 0.2F * CORE.RANDOM.nextFloat()); - zSpd = (float) aDir.offsetZ * (0.1F + 0.2F * CORE.RANDOM.nextFloat()); - } - - if (chk1) { - aWorld.spawnParticle(name, (double) (xPos + ran1 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); - } - - if (chk2) { - aWorld.spawnParticle(name, (double) (xPos + ran2 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); - } - - if (chk3) { - aWorld.spawnParticle(name, (double) (xPos + ran3 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); - } - - } - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java deleted file mode 100644 index d0f1d8e03f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java +++ /dev/null @@ -1,208 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import java.lang.reflect.Field; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidStack; - -public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_Input { - - public final FluidStack[] mFluidsToUse = new FluidStack[3]; - public final int mFluidCapacity; - - public GT_MetaTileEntity_Hatch_Naquadah(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional, 6); - mFluidCapacity = 32000; - initHatch(); - } - - public GT_MetaTileEntity_Hatch_Naquadah(final String aName, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, 6, aDescription, aTextures); - mFluidCapacity = 32000; - initHatch(); - } - - public GT_MetaTileEntity_Hatch_Naquadah(final String aName, final String[] aDescription, - final ITexture[][][] aTextures) { - super(aName, 6, aDescription[0], aTextures); - mFluidCapacity = 32000; - initHatch(); - } - - private void initHatch() { - if (mFluidsToUse[0] == null) { - mFluidsToUse[0] = Materials.Naquadah.getMolten(1); - } - if (mFluidsToUse[1] == null) { - mFluidsToUse[1] = Materials.NaquadahEnriched.getMolten(1); - } - if (mFluidsToUse[2] == null) { - mFluidsToUse[2] = Materials.Naquadria.getMolten(1); - } - } - - public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; - } - - public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; - } - - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { - for (FluidStack f : mFluidsToUse) { - if (f != null) { - if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f.getFluid()) { - return true; - } - } - } - } - return false; - } - - public boolean isFluidInputAllowed(final FluidStack aFluid) { - for (FluidStack f : mFluidsToUse) { - if (f != null) { - if (aFluid.getFluid() == f.getFluid()) { - return true; - } - } - } - return false; - } - - public int getCapacity() { - return this.mFluidCapacity; - } - - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Naquadah(this.mName, this.mDescription, this.mTextures); - } - - @Override - public String[] getDescription() { - if (aDescCache[0] == null || aDescCache[0].contains(".name") || aDescCache[0].contains("fluid.")) { - aDescCache[0] = formatFluidString(this.mFluidsToUse[0]); - } - if (aDescCache[1] == null || aDescCache[1].contains(".name") || aDescCache[1].contains("fluid.")) { - aDescCache[1] = formatFluidString(this.mFluidsToUse[1]); - } - if (aDescCache[2] == null || aDescCache[2].contains(".name") || aDescCache[2].contains("fluid.")) { - aDescCache[2] = formatFluidString(this.mFluidsToUse[2]); - } - String aNaq = aDescCache[0]; - String aEnrNaq = aDescCache[1]; - String aNaquad = aDescCache[2]; - String[] s2 = new String[]{ - "Fluid Input for Multiblocks", - "Capacity: " + getCapacity()+"L", - "Accepted Fluid: " + aNaq, - "Accepted Fluid: " + aEnrNaq, - "Accepted Fluid: " + aNaquad, - CORE.GT_Tooltip - }; - return s2; - } - - private static String[] aDescCache = new String[3]; - private String formatFluidString(FluidStack f) { - FluidStack mLockedStack = f; - Integer mLockedTemp = 0;; - String mTempMod = ""+EnumChatFormatting.RESET; - mLockedTemp = mLockedStack.getFluid().getTemperature(); - if (mLockedTemp != null) { - if (mLockedTemp <= -3000) { - mTempMod = ""+EnumChatFormatting.DARK_PURPLE; - } - else if (mLockedTemp >= -2999 && mLockedTemp <= -500) { - mTempMod = ""+EnumChatFormatting.DARK_BLUE; - } - else if (mLockedTemp >= -499 && mLockedTemp <= -50) { - mTempMod = ""+EnumChatFormatting.BLUE; - } - else if (mLockedTemp >= 30 && mLockedTemp <= 300) { - mTempMod = ""+EnumChatFormatting.AQUA; - } - else if (mLockedTemp >= 301 && mLockedTemp <= 800) { - mTempMod = ""+EnumChatFormatting.YELLOW; - } - else if (mLockedTemp >= 801 && mLockedTemp <= 1500) { - mTempMod = ""+EnumChatFormatting.GOLD; - } - else if (mLockedTemp >= 1501) { - mTempMod = ""+EnumChatFormatting.RED; - } - } - return mTempMod + mLockedStack.getLocalizedName(); - } - - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - // TODO Auto-generated method stub - return super.getTextureSet(aTextures); - } - - private Field F1, F2; - - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - byte a1 = 0, a2 = 0; - try { - if (F1 == null) { - F1 = ReflectionUtils.getField(getClass(), "actualTexture"); - } - if (F2 == null) { - F2 = ReflectionUtils.getField(getClass(), "mTexturePage"); - } - - if (F1 != null) { - a1 = F1.getByte(this); - } - if (F2 != null) { - a2 = F2.getByte(this); - } - } - catch (IllegalArgumentException | IllegalAccessException n) {} - - int textureIndex = a1 | a2 << 7; - byte texturePointer = (byte) (a1 & 127); - - - - if (aSide == 1 || aSide == 0) { - ITexture g = textureIndex > 0 ? StaticFields59.getCasingTexturePages(a2, texturePointer) : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; - - return new ITexture[] {g, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; - } - - return aSide != aFacing ? - (textureIndex > 0 ? new ITexture[] { StaticFields59.getCasingTexturePages(a2, texturePointer) } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) - : (textureIndex > 0 ? (aActive ? this.getTexturesActive(StaticFields59.getCasingTexturePages(a2, texturePointer)) : this.getTexturesInactive(StaticFields59.getCasingTexturePages(a2, texturePointer))) - : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java deleted file mode 100644 index ba97cc38eb..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java +++ /dev/null @@ -1,236 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import static gregtech.api.enums.GT_Values.V; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Hatch_OutputBattery -extends -GT_MetaTileEntity_Hatch { - public GT_MetaTileEntity_Hatch_OutputBattery(int aID, String aName, - String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier), - "Dischargeable Item Bus for Multiblocks"); - } - - public GT_MetaTileEntity_Hatch_OutputBattery(String aName, int aTier, - String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, - aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, - aDescription, aTextures); - } - - - @Override - public String[] getDescription() { - int mSlots = 0; - if (this.mTier == 2) { - mSlots = 4; - } - else if (this.mTier == 4) { - mSlots = 16; - } - else { - mSlots = 16; - } - return new String[]{ - this.mDescription, - "Capacity: " + mSlots + " slots", - CORE.GT_Tooltip}; - } - - @Override - public boolean isEnetOutput() { - return true; - } - - @Override - public boolean isOutputFacing(byte aSide) { - return aSide == getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public long maxEUOutput() { - return V[mTier]; - } - - @Override - public long maxEUStore() { - return 512 + V[mTier + 1] * 8; - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_OutputBattery(mName, mTier, - mDescription, mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, - EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - switch (mTier) { - case 2 : - return new CONTAINER_Electric_2by2(aPlayerInventory, - aBaseMetaTileEntity); - case 4 : - return new CONTAINER_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity); - default : - return new CONTAINER_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity); - } - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, - IGregTechTileEntity aBaseMetaTileEntity) { - switch (mTier) { - case 2 : - return new GUI_Electric_2by2(aPlayerInventory, - aBaseMetaTileEntity, "Discharging Bus"); - case 4 : - return new GUI_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity, "Discharging Bus"); - default : - return new GUI_Electric_4by4(aPlayerInventory, - aBaseMetaTileEntity, "Discharging Bus"); - } - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, - int aIndex, byte aSide, ItemStack aStack) { - return aSide == aBaseMetaTileEntity.getFrontFacing(); - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, - int aIndex, byte aSide, ItemStack aStack) { - return aSide == aBaseMetaTileEntity.getFrontFacing(); - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) - mInventory[i] = null; - fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < mInventory.length; i++) - for (int j = i + 1; j < mInventory.length; j++) - if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual( - mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, - i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - - @Override - public int rechargerSlotStartIndex() { - return 0; - } - - @Override - public int rechargerSlotCount() { - return 0; - } - - @Override - public int dechargerSlotStartIndex() { - return 0; - } - - @Override - public int dechargerSlotCount() { - return mTier == 2 ? 4 : 16; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() - && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - } - - if (aBaseMetaTileEntity.isServerSide()){ - if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) { - MetaTileEntity mMetaTileEntity = (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity(); - if (mMetaTileEntity.dechargerSlotCount() > 0 && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { - for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { - if (mMetaTileEntity.mInventory[i] != null && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[mTier] * 15, aBaseMetaTileEntity.getEUCapacity() - aBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true); - if (mMetaTileEntity.mInventory[i].stackSize <= 0) - mMetaTileEntity.mInventory[i] = null; - } - } - } - } - } - super.onPostTick(aBaseMetaTileEntity, aTimer); - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java deleted file mode 100644 index 1251c42ae3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java +++ /dev/null @@ -1,219 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import java.lang.reflect.Field; - -import com.google.common.collect.BiMap; - -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class GT_MetaTileEntity_Hatch_Plasma extends GT_MetaTileEntity_Hatch_Output { - - public final AutoMap mFluidsToUse = new AutoMap(); - public final int mFluidCapacity; - private int mTotalPlasmaSupported = -1; - - public GT_MetaTileEntity_Hatch_Plasma(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional, 6); - mFluidCapacity = 256000; - initHatch(); - } - - public GT_MetaTileEntity_Hatch_Plasma(final String aName, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, 6, aDescription, aTextures); - mFluidCapacity = 256000; - initHatch(); - } - - public GT_MetaTileEntity_Hatch_Plasma(final String aName, final String[] aDescription, - final ITexture[][][] aTextures) { - super(aName, 6, aDescription[0], aTextures); - mFluidCapacity = 256000; - initHatch(); - } - - private void initHatch() { - - //Get all Plasmas, but the easiest way to do this is to just ask the Fluid Registry what exists and filter through them lazily. - Field fluidNameCache; - - fluidNameCache = ReflectionUtils.getField(FluidRegistry.class, "fluidNames"); - - AutoMap mValidPlasmaNameCache = new AutoMap(); - if (fluidNameCache != null) { - try { - Object fluidNames = fluidNameCache.get(null); - if (fluidNames != null) { - try { - @SuppressWarnings("unchecked") - BiMap fluidNamesMap = (BiMap) fluidNames; - if (fluidNamesMap != null) { - for (String g : fluidNamesMap.values()) { - if (g.toLowerCase().contains("plasma")) { - mValidPlasmaNameCache.put(g); - } - } - } - } catch (ClassCastException e) { - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - - AutoMap mPlasmaCache = new AutoMap(); - if (!mValidPlasmaNameCache.isEmpty()) { - for (String y : mValidPlasmaNameCache) { - Fluid t = FluidRegistry.getFluid(y); - if (t != null) { - if (t.getTemperature() > 1000) { - mPlasmaCache.put(t); - } - } - } - } - - if (!mPlasmaCache.isEmpty()) { - for (Fluid w : mPlasmaCache) { - mFluidsToUse.put(w); - } - } - - - - - - } - - public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture }; - } - - public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture }; - } - - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { - for (Fluid f : mFluidsToUse) { - if (f != null) { - if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f) { - return true; - } - } - } - } - return false; - } - - public boolean isFluidInputAllowed(final FluidStack aFluid) { - for (Fluid f : mFluidsToUse) { - if (f != null) { - if (aFluid.getFluid() == f) { - return true; - } - } - } - return false; - } - - public int getCapacity() { - return this.mFluidCapacity; - } - - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Plasma(this.mName, this.mDescription, this.mTextures); - } - - @Override - public String[] getDescription() { - - if (mTotalPlasmaSupported < 0) { - if (mFluidsToUse.isEmpty()) { - mTotalPlasmaSupported = 0; - } - else { - mTotalPlasmaSupported = mFluidsToUse.size(); - } - } - - String aX = EnumChatFormatting.GRAY+""; - String a1 = EnumChatFormatting.GOLD+"Refined containment"+aX; - String a2 = EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.DARK_AQUA+getCapacity()+"L"+aX; - String a3 = EnumChatFormatting.GOLD+"Supports "+EnumChatFormatting.DARK_RED+mTotalPlasmaSupported+EnumChatFormatting.GOLD+" types of plasma"+aX; - - - - String[] s2 = new String[]{ - a1, a2, a3, CORE.GT_Tooltip - }; - return s2; - } - - @Override - public boolean doesFillContainers() { - return true; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - // TODO Auto-generated method stub - return super.getTextureSet(aTextures); - } - - private Field F1, F2; - - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - byte a1 = 0, a2 = 0; - try { - if (F1 == null) { - F1 = ReflectionUtils.getField(getClass(), "actualTexture"); - } - if (F2 == null) { - F2 = ReflectionUtils.getField(getClass(), "mTexturePage"); - } - - if (F1 != null) { - a1 = F1.getByte(this); - } - if (F2 != null) { - a2 = F2.getByte(this); - } - } - catch (IllegalArgumentException | IllegalAccessException n) {} - - int textureIndex = a1 | a2 << 7; - byte texturePointer = (byte) (a1 & 127); - - - - if (aSide == 1 || aSide == 0) { - ITexture g = textureIndex > 0 ? StaticFields59.getCasingTexturePages(a2, texturePointer) : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; - - return new ITexture[] {g}; - } - - return aSide != aFacing ? - (textureIndex > 0 ? new ITexture[] { StaticFields59.getCasingTexturePages(a2, texturePointer) } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) - : (textureIndex > 0 ? (aActive ? this.getTexturesActive(StaticFields59.getCasingTexturePages(a2, texturePointer)) : this.getTexturesInactive(StaticFields59.getCasingTexturePages(a2, texturePointer))) - : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java deleted file mode 100644 index f1dd131a67..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java +++ /dev/null @@ -1,234 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_Container_2by2; -import gregtech.api.gui.GT_GUIContainer_2by2; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.core.lib.CORE; -import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Hatch { - public GT_Recipe_Map mRecipeMap = null; - public boolean disableSort; - - public GT_MetaTileEntity_Hatch_Steam_BusInput(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier), new String[]{ - "Item Input for Steam Multiblocks", - "Shift + right click with screwdriver to toggle automatic item shuffling", - "Capacity: 4 stacks", - "Does not work with non-steam multiblocks", - CORE.GT_Tooltip}); - } - - public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 4, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 4, aDescription, aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Steam_BusInput(mName, mTier, mDescriptionArray, mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Steam Input Bus"); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - } - } - - public void updateSlots() { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; - fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - if (disableSort) { - for (int i = 0; i < mInventory.length; i++) - if (mInventory[i] != null && mInventory[i].stackSize <= 0) - mInventory[i] = null; - } else { - for (int i = 0; i < mInventory.length; i++) - for (int j = i + 1; j < mInventory.length; j++) - if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) - GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("disableSort", disableSort); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - disableSort = aNBT.getBoolean("disableSort"); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aPlayer.isSneaking()) { - disableSort = !disableSort; - GT_Utility.sendChatToPlayer(aPlayer, trans("200", "Automatic Item Shuffling: " + (disableSort ? "Disabled" : "Enabled"))); - } - } - - public String trans(String aKey, String aEnglish) { - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); - } - - - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[14][17][]; - for (byte c = -1; c < 16; c++) { - if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); - if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); - if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); - if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); - if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); - if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); - if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); - if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); - if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); - if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); - if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); - if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); - if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); - if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); - } - return rTextures; - } - - public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; - } - - public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; - } - - public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; - } - - public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; - } - - public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java deleted file mode 100644 index 2fb3fea084..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java +++ /dev/null @@ -1,175 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_Container_2by2; -import gregtech.api.gui.GT_GUIContainer_2by2; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_Hatch { - public GT_MetaTileEntity_Hatch_Steam_BusOutput(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 4, new String[]{"Item Output for Steam Multiblocks", - "Capacity: 4 stacks", - "Does not work with non-steam multiblocks", - CORE.GT_Tooltip}); - } - - public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 4, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 4, aDescription, aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return true; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Steam_BusOutput(mName, mTier, mDescriptionArray, mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Steam Output Bus"); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == aBaseMetaTileEntity.getFrontFacing(); - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[14][17][]; - for (byte c = -1; c < 16; c++) { - if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); - if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); - if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); - if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); - if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); - if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); - if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); - if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); - if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); - if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); - if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); - if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); - if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); - if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); - } - return rTextures; - } - - - - public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; - } - - public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; - } - - public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; - } - - public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; - } - - public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; - } - - public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - - public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java deleted file mode 100644 index a9cd179214..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java +++ /dev/null @@ -1,316 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_1by1_Turbine; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_1by1_Turbine; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GregtechMetaTileEntity_LargerTurbineBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { - - public boolean mHasController = false; - public boolean mUsingAnimation = true; - private String mControllerLocation; - - public GT_MetaTileEntity_Hatch_Turbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 16, "Turbine Rotor holder for XL Turbines"); - } - - public GT_MetaTileEntity_Hatch_Turbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 1, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_Turbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 1, aDescription[0], aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, getFrontFacingTurbineTexture()}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, getFrontFacingTurbineTexture()}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean isValidSlot(int aIndex) { - return false; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Turbine(mName, mTier, StaticFields59.getDescriptionArray(this), mTextures); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - //aBaseMetaTileEntity.openGUI(aPlayer); - PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Using Animations? "+usingAnimations()); - PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Has Controller? "+this.mHasController); - if (mHasController) { - PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Controller Location: "+BlockPos.generateBlockPos(mControllerLocation).getLocationString()); - PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Controller Active? "+this.isControllerActive()); - } - PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Is Active? "+this.getBaseMetaTileEntity().isActive()); - return true; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - switch (mTier) { - default: - return new CONTAINER_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity); - } - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - switch (mTier) { - default: - return new GUI_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity, "Turbine Rotor Hatch"); - } - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mHasController", mHasController); - aNBT.setBoolean("mUsingAnimation", mUsingAnimation); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mHasController = aNBT.getBoolean("mHasController"); - mUsingAnimation = aNBT.getBoolean("mUsingAnimation"); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - this.mUsingAnimation = Utils.invertBoolean(mUsingAnimation); - if (this.mUsingAnimation) { - PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); - } - PlayerUtils.messagePlayer(aPlayer, "Has Controller: "+this.mHasController); - if (mHasController) { - PlayerUtils.messagePlayer(aPlayer, "Controller Location: "+this.mControllerLocation); - } - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (this.mHasController) { - if (aTick % 20 == 0) { - if (isControllerActive()) { - this.getBaseMetaTileEntity().setActive(true); - } - else { - this.getBaseMetaTileEntity().setActive(false); - } - } - } - else if (!this.mHasController && this.mControllerLocation != null) { - //Weird Invalid State - if (setController(BlockPos.generateBlockPos(mControllerLocation))) { - //Valid - } - } - else { - //No Controller - } - } - - public boolean isControllerActive() { - GregtechMetaTileEntity_LargerTurbineBase x = getController(); - if (x != null) { - Logger.INFO("Checking Status of Controller."); - return x.isMachineRunning(); - } - Logger.INFO("Status of Controller failed, controller is null."); - return false; - } - - public GregtechMetaTileEntity_LargerTurbineBase getController() { - if (this.mHasController && this.mControllerLocation != null && this.mControllerLocation.length() > 0) { - BlockPos p = BlockPos.generateBlockPos(mControllerLocation); - if (p != null) { - //Logger.INFO(p.getLocationString()); - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(p.xPos, p.yPos, - p.zPos); - if (tTileEntity != null && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_LargerTurbineBase) { - return (GregtechMetaTileEntity_LargerTurbineBase) tTileEntity.getMetaTileEntity(); - } - else { - if (tTileEntity == null) { - Logger.INFO("Controller MTE is null, somehow?"); - } - else { - Logger.INFO("Controller is a different MTE to expected"); - } - } - } - } - //Logger.INFO("Failed to Get Controller."); - return null; - } - - public boolean canSetNewController() { - if ((mControllerLocation != null && mControllerLocation.length() > 0) || this.mHasController) { - return false; - } - return true; - } - - public boolean setController(BlockPos aPos) { - clearController(); - if (canSetNewController()) { - mControllerLocation = aPos.getUniqueIdentifier(); - mHasController = true; - Logger.INFO("Successfully injected controller into this Turbine Assembly Hatch."); - } - return mHasController; - } - - public void clearController() { - this.mControllerLocation = null; - this.mHasController = false; - } - - public boolean usingAnimations() { - return mUsingAnimation; - } - - private ITexture getFrontFacingTurbineTexture() { - if (!mHasController) { - return this.getBaseMetaTileEntity().isActive() ? new GT_RenderedTexture(LargeTurbineTextureHandler.frontFaceHPActive_4) : new GT_RenderedTexture(LargeTurbineTextureHandler.frontFace_4 ); - } - else { - if (usingAnimations()) { - if (isControllerActive()) { - return getController().frontFaceActive; - } - } - return getController().frontFace; - } - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { - return false; - } - - @Override - public int[] getAccessibleSlotsFromSide(int aSide) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return false; - } - - @Override - public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { - // TODO Auto-generated method stub - return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { - //Do Super - boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - // Do Things - if (this.getBaseMetaTileEntity().isServerSide()) { - ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if (tCurrentItem != null) { - if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) { - if (mControllerLocation != null && mControllerLocation.length() > 0) { - if (setController(BlockPos.generateBlockPos(mControllerLocation))) { - if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { - String tChat = "Trying to Reset linked Controller"; - IGregTechTileEntity g = this.getBaseMetaTileEntity(); - GT_Utility.sendChatToPlayer(aPlayer, tChat); - GT_Utility.sendSoundToPlayers(g.getWorld(), GregTech_API.sSoundList.get(101), 1.0F, -1, - g.getXCoord(), g.getYCoord(), g.getZCoord()); - } - } - } - } - } - } - return aSuper; - } - - public void setActive(boolean b) { - this.getBaseMetaTileEntity().setActive(b); - } - - - - - -}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java deleted file mode 100644 index 0b84f676f4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java +++ /dev/null @@ -1,220 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_1by1_Turbine; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_1by1_Turbine; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_Hatch_InputBus { - - public GT_MetaTileEntity_Hatch_TurbineProvider(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_Hatch_TurbineProvider(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - public GT_MetaTileEntity_Hatch_TurbineProvider(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription[0], aTextures); - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_TurbineProvider(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity); - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity, "Turbine Housing"); - } - - @Override - public String[] getDescription() { - return new String[]{ - "An automation port for Large Turbines", - "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine", - "You may adjust this with a screwdriver", - "Hold shift to adjust in finer amounts", - "Hold control to adjust direction", - "Left Click with Screwdriver to reset", - "This module assumes the entire turbine is in the same Chunk", - CORE.GT_Tooltip}; - } - - - private GT_MetaTileEntity_LargeTurbine mParent = null; - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - super.onPostTick(aBaseMetaTileEntity, aTimer); - if (aTimer % mRefreshTime == 0 && this.getBaseMetaTileEntity().isServerSide()) { - tryRefillTurbine(); - } - } - - private final void tryFindParentTurbine() { - Logger.INFO("This turbine housing has no parent, searching world."); - IGregTechTileEntity T = this.getBaseMetaTileEntity(); - World W = T.getWorld(); - Chunk C = W.getChunkFromBlockCoords(T.getXCoord(), T.getZCoord()); - for (Object o : C.chunkTileEntityMap.values()) { - if (o instanceof IGregTechTileEntity) { - IGregTechTileEntity G = (IGregTechTileEntity) o; - final IMetaTileEntity aMetaTileEntity = G.getMetaTileEntity(); - if (aMetaTileEntity == null) { - continue; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_LargeTurbine) { - GT_MetaTileEntity_LargeTurbine aTurb = (GT_MetaTileEntity_LargeTurbine) aMetaTileEntity; - for (GT_MetaTileEntity_Hatch_InputBus ee : aTurb.mInputBusses) { - if (ee.equals(this)) { - mParent = aTurb; - Logger.INFO("Found a Parent to attach to this housing."); - return; - } - } - } - } - } - } - - private final void tryRefillTurbine() { - if (mParent == null) { - tryFindParentTurbine(); - } - if (mParent != null && mParent.mInventory[1] == null) { - for (ItemStack aStack : this.mInventory) { - if (isItemStackTurbine(aStack)) { - setGUIItemStack(aStack); - } - } - } - } - - protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) { - boolean result = false; - if (mParent.mInventory[1] == null) { - mParent.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null; - mParent.depleteInput(aNewGuiSlotContents); - mParent.updateSlots(); - this.updateSlots(); - result = true; - } - return result; - } - - public boolean isItemStackTurbine(ItemStack aStack) { - if (aStack.getItem() instanceof GT_MetaGenerated_Tool) { - if (aStack.getItemDamage() >= 170 && aStack.getItemDamage() <= 176) { - return true; - } - } - return false; - } - - public boolean isItemStackScrewdriver(ItemStack aStack) { - if (aStack.getItem() instanceof GT_MetaGenerated_Tool) { - if (aStack.getItemDamage() == 22 || aStack.getItemDamage() == 150) { - return true; - } - } - return false; - } - - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return isItemStackTurbine(aStack); - } - - private int mRefreshTime = 1200; - private boolean mDescending = true; - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setInteger("mRefreshTime", mRefreshTime); - aNBT.setBoolean("mDescending", mDescending); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mRefreshTime = aNBT.getInteger("mRefreshTime"); - mDescending = aNBT.getBoolean("mDescending"); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aPlayer != null) { - if (KeyboardUtils.isCtrlKeyDown()) { - mDescending = Utils.invertBoolean(mDescending); - PlayerUtils.messagePlayer(aPlayer, "Direction: "+(mDescending ? "DOWN" : "UP")); - } - else { - int aAmount = 0; - if (KeyboardUtils.isShiftKeyDown()) { - aAmount = 10; - } - else { - aAmount = 100; - } - if (mDescending) { - mRefreshTime -= aAmount; - if (mRefreshTime < 0) { - mRefreshTime = 1200; - } - } - else { - mRefreshTime += aAmount; - if (mRefreshTime > 1200) { - mRefreshTime = 0; - } - } - PlayerUtils.messagePlayer(aPlayer, "Set check time to be every "+mRefreshTime+" ticks."); - } - } - } - - @Override - public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - boolean aDidScrewdriver = false; - if (aPlayer != null) { - if (aPlayer.getHeldItem() != null) { - if (isItemStackScrewdriver(aPlayer.getHeldItem())) { - aDidScrewdriver = true; - mRefreshTime = 1200; - PlayerUtils.messagePlayer(aPlayer, "Reset check time to "+mRefreshTime+" ticks."); - } - } - } - if (!aDidScrewdriver) { - super.onLeftclick(aBaseMetaTileEntity, aPlayer); - } - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java deleted file mode 100644 index b27cb95ca4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java +++ /dev/null @@ -1,230 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.extensions.ArrayExt; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_InputBus { - public GT_MetaTileEntity_SuperBus_Input(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, getSlots(aTier)); - } - - public GT_MetaTileEntity_SuperBus_Input(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, getSlots(aTier), aDescription, aTextures); - } - - /** - * Returns a factor of 16 based on tier. - * - * @param aTier The tier of this bus. - * @return (1 + aTier) * 16 - */ - public static int getSlots(int aTier) { - return (1 + aTier) * 16; - } - - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE_IN)}; - } - - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE_IN)}; - } - - public boolean isSimpleMachine() { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return true; - } - - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - public boolean isValidSlot(int aIndex) { - return true; - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SuperBus_Input(this.mName, this.mTier, ArrayExt.of(this.mDescription), this.mTextures); - } - - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - this.fillStacksIntoFirstSlots(); - } - - } - - public void updateSlots() { - for (int i = 0; i < this.mInventory.length; ++i) { - if (this.mInventory[i] != null && this.mInventory[i].stackSize <= 0) { - this.mInventory[i] = null; - } - } - - this.fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < this.mInventory.length; ++i) { - for (int j = i + 1; j < this.mInventory.length; ++j) { - if (this.mInventory[j] != null && (this.mInventory[i] == null - || GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB((IInventory) this.getBaseMetaTileEntity(), (IInventory) this.getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - } - - } - - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing(); - } - - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing() - && (this.mRecipeMap == null || this.mRecipeMap.containsInput(aStack)); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override - public String[] getDescription() { - String[] aDesc = new String[] { - "Item Input for Multiblocks", - "This bus has no GUI, but can have items extracted", - ""+getSlots(this.mTier)+" Slots", - CORE.GT_Tooltip - }; - return aDesc; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { - return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - } - - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } else { - //Logger.INFO("Trying to display Super Input Bus contents."); - displayBusContents(aPlayer); - return true; - } - } - - public void displayBusContents(EntityPlayer aPlayer) { - String STRIP = "Item Array: "; - String aNameString = ItemUtils.getArrayStackNames(getRealInventory()); - aNameString = aNameString.replace(STRIP, ""); - - String[] aNames; - if (aNameString.length() < 1) { - aNames = null; - } - else { - aNames = aNameString.split(","); - } - - if (aNames == null || aNames.length <= 0) { - PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) is Empty. Total Slots: "+getSlots(this.mTier)); - return; - } - - PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) contains: ["+getRealInventory().length+"]"); - - if (aNames.length <= 12) { - for (String s : aNames) { - if (s.startsWith(" ")) { - s = s.substring(1); - } - //Logger.INFO("Trying to display Super Input Bus contents. "+s); - PlayerUtils.messagePlayer(aPlayer, s); - } - } - else { - - String superString = ""; - - for (String s : aNames) { - if (s.startsWith(" ")) { - s = s.substring(1); - } - superString += (s+", "); - } - PlayerUtils.messagePlayer(aPlayer, superString); - } - - - } - - @Override - public int getMaxItemCount() { - // TODO Auto-generated method stub - return super.getMaxItemCount(); - } - - @Override - public int getSizeInventory() { - // TODO Auto-generated method stub - return super.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(int aIndex) { - // TODO Auto-generated method stub - return super.getStackInSlot(aIndex); - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - // TODO Auto-generated method stub - return super.canInsertItem(aIndex, aStack, aSide); - } - - @Override - public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - // TODO Auto-generated method stub - return super.canExtractItem(aIndex, aStack, aSide); - } - - @Override - public ItemStack[] getRealInventory() { - // TODO Auto-generated method stub - return super.getRealInventory(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java deleted file mode 100644 index 37aa57298a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java +++ /dev/null @@ -1,180 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.extensions.ArrayExt; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_OutputBus { - - public GT_MetaTileEntity_SuperBus_Output(int id, String name, String nameRegional, int tier) { - super(id, name, nameRegional, tier, getSlots(tier)); - } - - public GT_MetaTileEntity_SuperBus_Output(String name, int tier, String[] description, ITexture[][][] textures) { - super(name, tier, getSlots(tier), description, textures); - } - - /** - * Returns a factor of 16 based on tier. - * - * @param aTier The tier of this bus. - * @return (1 + aTier) * 16 - */ - public static int getSlots(int aTier) { - return (1 + aTier) * 16; - } - - public boolean isValidSlot(int aIndex) { - return true; - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SuperBus_Output(this.mName, this.mTier, ArrayExt.of(this.mDescription), this.mTextures); - } - - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - this.fillStacksIntoFirstSlots(); - } - super.onPostTick(aBaseMetaTileEntity, aTimer); - } - - public void updateSlots() { - for (int i = 0; i < this.mInventory.length; ++i) { - if (this.mInventory[i] != null && this.mInventory[i].stackSize <= 0) { - this.mInventory[i] = null; - } - } - this.fillStacksIntoFirstSlots(); - } - - protected void fillStacksIntoFirstSlots() { - for (int i = 0; i < this.mInventory.length; ++i) { - for (int j = i + 1; j < this.mInventory.length; ++j) { - if (this.mInventory[j] != null && (this.mInventory[i] == null - || GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB((IInventory) this.getBaseMetaTileEntity(), (IInventory) this.getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override - public String[] getDescription() { - String[] aDesc = new String[] { - "Item Output for Multiblocks", - "This bus has no GUI", - ""+getSlots(this.mTier)+" Slots", - CORE.GT_Tooltip - }; - return aDesc; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { - return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - } - - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } else { - displayBusContents(aPlayer); - return true; - } - } - - public void displayBusContents(EntityPlayer aPlayer) { - String STRIP = "Item Array: "; - String aNameString = ItemUtils.getArrayStackNames(getRealInventory()); - aNameString = aNameString.replace(STRIP, ""); - - String[] aNames; - if (aNameString.length() < 1) { - aNames = null; - } - else { - aNames = aNameString.split(","); - } - - if (aNames == null || aNames.length <= 0) { - PlayerUtils.messagePlayer(aPlayer, "This Super Bus (O) is Empty. Total Slots: "+getSlots(this.mTier)); - return; - } - - PlayerUtils.messagePlayer(aPlayer, "This Super Bus (O) contains:"); - for (String s : aNames) { - if (s.startsWith(" ")) { - s = s.substring(1); - } - //Logger.INFO("Trying to display Super Output Bus contents. "+s); - PlayerUtils.messagePlayer(aPlayer, s); - } - } - - @Override - public int getMaxItemCount() { - // TODO Auto-generated method stub - return super.getMaxItemCount(); - } - - @Override - public int getSizeInventory() { - // TODO Auto-generated method stub - return super.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(int aIndex) { - // TODO Auto-generated method stub - return super.getStackInSlot(aIndex); - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - // TODO Auto-generated method stub - return super.canInsertItem(aIndex, aStack, aSide); - } - - @Override - public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - // TODO Auto-generated method stub - return super.canExtractItem(aIndex, aStack, aSide); - } - - @Override - public ItemStack[] getRealInventory() { - // TODO Auto-generated method stub - return super.getRealInventory(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java deleted file mode 100644 index f6e778f989..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java +++ /dev/null @@ -1,119 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; -import gregtech.api.render.TextureFactory; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.util.EnumChatFormatting; - -public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid { - - - public static final boolean mGt6Pipe; - - static { - mGt6Pipe = StaticFields59.mGT6StylePipes; - } - - public final GT_Materials mMaterial; - private boolean mCheckConnections; - - - public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, GT_Materials aMaterial, - int aCapacity, int aHeatResistance, boolean aGasProof) { - this(aID, aName, aNameRegional, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); - } - - public GregtechMetaPipeEntityFluid(final String aName, final float aThickNess, final GT_Materials aMaterial, final int aCapacity, final int aHeatResistance, final boolean aGasProof) { - this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); - } - - public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, GT_Materials aMaterial, - int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { - super(aID, aName, aNameRegional, aThickNess, null, aCapacity, aHeatResistance, aGasProof); - this.mLastReceivedFrom = 0; - this.oLastReceivedFrom = 0; - this.mCheckConnections = !mGt6Pipe; - this.mMaterial = aMaterial; - } - - - - public GregtechMetaPipeEntityFluid(String aName, float aThickNess, GT_Materials aMaterial, int aCapacity, - int aHeatResistance, boolean aGasProof, int aFluidTypes) { - super(aName, aThickNess, null, aCapacity, aHeatResistance, aGasProof); - this.mLastReceivedFrom = 0; - this.oLastReceivedFrom = 0; - this.mCheckConnections = !mGt6Pipe; - this.mMaterial = aMaterial; - } - - - @Override - public byte getTileEntityBaseType() { - return this.mMaterial == null ? 4 : (byte) ((this.mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, this.mMaterial.mToolQuality))); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaPipeEntityFluid(this.mName, this.mThickNess, this.mMaterial, this.mCapacity, this.mHeatResistance, this.mGasProof); - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - float tThickNess = getThickNess(); - if (mDisableInput == 0) - return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - byte tMask = 0; - byte[][] sRestrictionArray = { - {2, 3, 5, 4}, - {2, 3, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 4, 5}, - {1, 0, 2, 3}, - {1, 0, 2, 3} - }; - if (aSide >= 0 && aSide < 6) { - for (byte i = 0; i < 4; i++) if (isInputDisabledAtSide(sRestrictionArray[aSide][i])) tMask |= 1 << i; - //Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate - if (aSide == 5 || aSide == 2) - if (tMask > 3 && tMask < 12) - tMask = (byte) (tMask ^ 12); - } - return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)}; - } - - protected static ITexture getBaseTexture(float aThickNess, int aPipeAmount, GT_Materials aMaterial, byte aColorIndex) { - if (aPipeAmount >= 9) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aPipeAmount >= 4) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.124F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.374F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.499F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.749F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - if (aThickNess < 0.874F) - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); - } - - @Override - public String[] getDescription() { - return new String[]{ - EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, - EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY, - EnumChatFormatting.DARK_GREEN + "Gas Proof: " + (this.mGasProof) + EnumChatFormatting.GRAY, - //CORE.GT_Tooltip - }; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java deleted file mode 100644 index 98722a2b96..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java +++ /dev/null @@ -1,165 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import static gregtech.api.enums.GT_Values.VN; -import static gtPlusPlus.core.lib.CORE.GTNH; - -import net.minecraft.util.EnumChatFormatting; - -import gregtech.api.enums.*; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; - -public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implements IMetaTileEntityCable { - private static Textures.BlockIcons INSULATION_MEDIUM_PLUS; - static{ - if(GTNH) { - try { - INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GT_Utility.getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS").get(null); - } catch (IllegalAccessException | NullPointerException e) { - throw new Error(e); - } - } - } - - private short[] vRGB = null; - - public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { - super(aID, aName, aNameRegional, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); - this.vRGB = aRGB==null || aRGB.length!=4?Materials.Iron.mRGBa:aRGB; - } - - public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { - super(aName, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); - this.vRGB = aRGB==null || aRGB.length!=4?Materials.Iron.mRGBa:aRGB; - } - - public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { - this(aID, aName, aNameRegional, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock,aRGB); - } - - public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { - this(aName, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock,aRGB); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaPipeEntity_Cable(this.mName, this.mThickNess, this.mMaterial, this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock, this.vRGB); - } - - @Override - public String[] getDescription() { - return new String[]{ - "Max Voltage: %%%" + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY, - "Max Amperage: %%%" + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY, - "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + "%%% EU-Volt", - //CORE.GT_Tooltip - }; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - return GTNH? - getTextureGTNH(aBaseMetaTileEntity,aSide,aConnections,aColorIndex,aConnected,aRedstone): - getTexturePure(aBaseMetaTileEntity,aSide,aConnections,aColorIndex,aConnected,aRedstone); - } - - private ITexture[] getTextureGTNH(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, - byte aColorIndex, boolean aConnected, boolean aRedstone) { - - Materials wireMaterial=mMaterial; - if (wireMaterial == null){ - wireMaterial = Materials.Iron; - } - - if (!mInsulated) - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, vRGB) )}; - if (aConnected) { - float tThickNess = getThickNess(); - if (tThickNess < 0.124F) - return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.374F)//0.375 x1 - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.499F)//0.500 x2 - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.624F)//0.625 x4 - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.749F)//0.750 x8 - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.874F)//0.825 x12 - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - } - return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - } - - private ITexture[] getTexturePure(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, - byte aColorIndex, boolean aConnected, boolean aRedstone) { - - //if (this.vRGB == null || this.vRGB.length < 3 || this.vRGB.length > 4){ - // this.vRGB = new short[]{200, 0, 200, 0}; - //} - //if (this.vRGB.length != 4){ - // short[] tempRGB = this.vRGB; - // this.vRGB = new short[]{tempRGB[0], tempRGB[1], tempRGB[2], 0}; - //} - // - //Materials wireMaterial = this.mMaterial; - // - //if (wireMaterial == null){ - // wireMaterial = Materials.Iron; - //} - - //With the code in constructors it should work - Materials wireMaterial=mMaterial; - if (wireMaterial == null){ - wireMaterial = Materials.Iron; - } - - if (!(this.mInsulated)) - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], - Dyes.getModulation(aColorIndex, this.vRGB)) }; - if (aConnected) { - float tThickNess = getThickNess(); - if (tThickNess < 0.124F) - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.374F) - return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.499F) - return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.624F) - return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.749F) - return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.874F) - return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java deleted file mode 100644 index d05a254bf7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; - -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaTreeFarmerBase; - -public class GregtechMetaTreeFarmerStructural -extends GregtechMetaTreeFarmerBase { - - @Override - public String[] getDescription() { - return new String[] {this.mDescription}; - } - - public GregtechMetaTreeFarmerStructural(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "Structural Blocks for the Tree Farmer."); - } - - public GregtechMetaTreeFarmerStructural(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); - } - - public GregtechMetaTreeFarmerStructural(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTreeFarmerStructural(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); - } - - @Override - public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.VOID); - } - - @Override - public boolean isValidSlot(final int aIndex) { - return false; - } - - @Override - public void saveNBTData(final NBTTagCompound paramNBTTagCompound) { - } - - @Override - public void loadNBTData(final NBTTagCompound paramNBTTagCompound) { - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java deleted file mode 100644 index 422837fa46..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; - -import java.util.Locale; - -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_LanguageManager; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import net.minecraft.item.ItemStack; - -public abstract class CustomMetaTileBase extends MetaTileEntity { - - public CustomMetaTileBase(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { - super(aID, aBasicName, aRegionalName, aInvSlotCount); - GT_LanguageManager.addStringLocalization("gtpp.blockmachines." + aBasicName.replaceAll(" ", "_").toLowerCase(Locale.ENGLISH) + ".name", aRegionalName); - this.setBaseMetaTileEntity(Meta_GT_Proxy.constructBaseMetaTileEntity()); - this.getBaseMetaTileEntity().setMetaTileID((short) aID); - } - - public CustomMetaTileBase(String aName, int aInvSlotCount) { - super(aName, aInvSlotCount); - } - - public ItemStack getStackForm(long aAmount) { - return new ItemStack(Meta_GT_Proxy.sBlockMachines, (int) aAmount, this.getBaseMetaTileEntity().getMetaTileID()); - } - - public String getLocalName() { - return GT_LanguageManager.getTranslation("gtpp.blockmachines." + this.mName + ".name"); - } - - /** - * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. - *

- * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantlee - * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle - * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle - * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle - * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle - * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle - * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle - * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle - * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle - * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle - * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle - * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle - * - * == Reserved for Alk now - * - * 12 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle - * 13 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle - * 14 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle - * 15 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle - */ - @Override - public byte getTileEntityBaseType() { - return 12; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java deleted file mode 100644 index 124f8695f5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java +++ /dev/null @@ -1,131 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; - -public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_Hatch_Input { - - public final Fluid mLockedFluid; - public final int mFluidCapacity; - - public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional, 6); - this.mRecipeMap = null; - this.mLockedFluid = aFluid; - this.mFluidCapacity = aAmount; - } - - public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, 6, aDescription, aTextures); - this.mRecipeMap = null; - this.mLockedFluid = aFluid; - this.mFluidCapacity = aAmount; - } - - public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, final String[] aDescription, final ITexture[][][] aTextures) { - super(aName, 6, aDescription[0], aTextures); - this.mRecipeMap = null; - this.mLockedFluid = aFluid; - this.mFluidCapacity = aAmount; - } - - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { - if (this.mRecipeMap == null) - return true; - FluidStack fs = GT_Utility.getFluidForFilledItem(aStack, true); - if (fs != null && fs.getFluid() == this.mLockedFluid) - return true; - } - return false; - } - - public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_PUMP)}; - } - - public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_PUMP)}; - } - - public int getCapacity() { - return this.mFluidCapacity; - } - - protected FluidStack mLockedStack = null; - protected Integer mLockedTemp = null; - protected String mTempMod = null; - - @Override - public String[] getDescription() { - if (mLockedStack == null) { - mLockedStack = FluidUtils.getFluidStack(mLockedFluid, 1); - } - int aFluidTemp = 0; - boolean isSteam = false; - if (mLockedFluid != null) { - aFluidTemp = mLockedFluid.getTemperature(); - mTempMod = mLockedFluid.getName(); - } - if (mTempMod.toLowerCase().equals("steam")) { - isSteam = true; - } - - - EnumChatFormatting aColour = EnumChatFormatting.BLUE; - if (aFluidTemp <= -3000) { - aColour = EnumChatFormatting.DARK_PURPLE; - } - else if (aFluidTemp >= -2999 && aFluidTemp <= -500) { - aColour = EnumChatFormatting.DARK_BLUE; - } - else if (aFluidTemp >= -499 && aFluidTemp <= -50) { - aColour = EnumChatFormatting.BLUE; - } - else if (aFluidTemp >= 30 && aFluidTemp <= 300) { - aColour = EnumChatFormatting.AQUA; - } - else if (aFluidTemp >= 301 && aFluidTemp <= 800) { - aColour = EnumChatFormatting.YELLOW; - } - else if (aFluidTemp >= 801 && aFluidTemp <= 1500) { - aColour = EnumChatFormatting.GOLD; - } - else if (aFluidTemp >= 1501) { - aColour = EnumChatFormatting.RED; - } - String aFluidName = "Accepted Fluid: " + aColour + (mLockedStack != null ? mLockedStack.getLocalizedName() : "Empty") + EnumChatFormatting.RESET; - String[] s2 = new String[]{ - "Fluid Input for "+(isSteam ? "Steam " : "")+"Multiblocks", - "Capacity: " + getCapacity()+"L", - aFluidName, - CORE.GT_Tooltip - }; - return s2; - } - - public boolean isFluidInputAllowed(final FluidStack aFluid) { - return aFluid.getFluid() == this.mLockedFluid; - } - - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (MetaTileEntity) new GT_MetaTileEntity_Hatch_CustomFluidBase(this.mLockedFluid, this.mFluidCapacity, this.mName, this.mDescription, this.mTextures); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java deleted file mode 100644 index 4dd5bf25d6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java +++ /dev/null @@ -1,468 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; - -import static gregtech.api.enums.GT_Values.VN; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; - -import cofh.api.energy.IEnergyReceiver; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.TextureSet; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; -import gregtech.api.interfaces.tileentity.IColoredTileEntity; -import gregtech.api.interfaces.tileentity.IEnergyConnected; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Proxy; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import ic2.api.energy.tile.IEnergySink; -import net.minecraftforge.common.util.ForgeDirection; - -public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements IMetaTileEntityCable { - public final float mThickNess; - public final GT_Materials mMaterial; - public final long mCableLossPerMeter, mAmperage, mVoltage; - public final boolean mInsulated, mCanShock; - public long mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredVoltageLast20 = 0; - public long mRestRF; - public short mOverheat; - public final int mWireHeatingTicks; - - public GregtechMetaPipeEntityBase_Cable(final int aID, final String aName, final String aNameRegional, - final float aThickNess, final GT_Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, - final long aVoltage, final boolean aInsulated, final boolean aCanShock) { - super(aID, aName, aNameRegional, 0); - this.mThickNess = aThickNess; - this.mMaterial = aMaterial; - this.mAmperage = aAmperage; - this.mVoltage = aVoltage; - this.mInsulated = aInsulated; - this.mCanShock = aCanShock; - this.mCableLossPerMeter = aCableLossPerMeter; - this.mWireHeatingTicks = this.getGT5Var(); - } - - public GregtechMetaPipeEntityBase_Cable(final String aName, final float aThickNess, final GT_Materials aMaterial, - final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, - final boolean aCanShock) { - super(aName, 0); - this.mThickNess = aThickNess; - this.mMaterial = aMaterial; - this.mAmperage = aAmperage; - this.mVoltage = aVoltage; - this.mInsulated = aInsulated; - this.mCanShock = aCanShock; - this.mCableLossPerMeter = aCableLossPerMeter; - this.mWireHeatingTicks = this.getGT5Var(); - } - - private int getGT5Var() { - final Class clazz = GT_Mod.gregtechproxy.getClass(); - final String lookingForValue = "mWireHeatingTicks"; - int temp = 4; - Field field; - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - try { - field = clazz.getClass().getField(lookingForValue); - final Class clazzType = field.getType(); - if (clazzType.toString().equals("int")) { - temp = (field.getInt(clazz)); - } else { - temp = 4; - } - } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - // Utils.LOG_INFO("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - // - PLEASE REPORT THIS."); - Logger.WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); - Logger.ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); - temp = 4; - } - } - return temp; - } - - @Override - public byte getTileEntityBaseType() { - return (byte) (this.mInsulated ? 9 : 8); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaPipeEntityBase_Cable(this.mName, this.mThickNess, this.mMaterial, - this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, - final byte aConnections, final byte aColorIndex, final boolean aConnected, final boolean aRedstone) { - if (!this.mInsulated) { - return new ITexture[] { new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - this.mMaterial.mRGBa) }; - } - if (aConnected) { - final float tThickNess = this.getThickNess(); - if (tThickNess < 0.37F) { - return new ITexture[] { - new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - this.mMaterial.mRGBa), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - if (tThickNess < 0.49F) { - return new ITexture[] { - new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - this.mMaterial.mRGBa), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - if (tThickNess < 0.74F) { - return new ITexture[] { - new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - this.mMaterial.mRGBa), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - if (tThickNess < 0.99F) { - return new ITexture[] { - new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - this.mMaterial.mRGBa), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - return new ITexture[] { - new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - this.mMaterial.mRGBa), - new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - - @Override - public void onEntityCollidedWithBlock(final World aWorld, final int aX, final int aY, final int aZ, - final Entity aEntity) { - if (this.mCanShock && ((((BaseMetaPipeEntity) this.getBaseMetaTileEntity()).mConnections & -128) == 0) - && (aEntity instanceof EntityLivingBase)) { - GT_Utility.applyElectricityDamage((EntityLivingBase) aEntity, this.mTransferredVoltageLast20, - this.mTransferredAmperageLast20); - } - } - - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(final World aWorld, final int aX, final int aY, final int aZ) { - if (!this.mCanShock) { - return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - return AxisAlignedBB.getBoundingBox(aX + 0.125D, aY + 0.125D, aZ + 0.125D, aX + 0.875D, aY + 0.875D, - aZ + 0.875D); - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return true; - } - - @Override - public final boolean renderInside(final byte aSide) { - return false; - } - - @Override - public int getProgresstime() { - return (int) this.mTransferredAmperage * 64; - } - - @Override - public int maxProgresstime() { - return (int) this.mAmperage * 64; - } - - @Override - public long injectEnergyUnits(final byte aSide, final long aVoltage, final long aAmperage) { - if (!this.getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, - this.getBaseMetaTileEntity().getCoverIDAtSide(aSide), - this.getBaseMetaTileEntity().getCoverDataAtSide(aSide), this.getBaseMetaTileEntity())) { - return 0; - } - return this.transferElectricity(aSide, aVoltage, aAmperage, - new ArrayList<>(Arrays.asList((TileEntity) this.getBaseMetaTileEntity()))); - } - - - /** - * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d - */ - public long transferElectricity(byte arg0, long arg1, long arg2, HashSet arg3) { - ArrayList aTiles = new ArrayList(); - for (TileEntity y : arg3) { - aTiles.add(y); - } - return transferElectricity(arg0, arg1, arg2, aTiles); - } - - @Override - public long transferElectricity(final byte aSide, long aVoltage, final long aAmperage, - final ArrayList aAlreadyPassedTileEntityList) { - long rUsedAmperes = 0; - aVoltage -= this.mCableLossPerMeter; - if (aVoltage > 0) { - for (byte i = 0; (i < 6) && (aAmperage > rUsedAmperes); i++) { - if ((i != aSide) && ((this.mConnections & (1 << i)) != 0) - && this.getBaseMetaTileEntity().getCoverBehaviorAtSide(i).letsEnergyOut(i, - this.getBaseMetaTileEntity().getCoverIDAtSide(i), - this.getBaseMetaTileEntity().getCoverDataAtSide(i), this.getBaseMetaTileEntity())) { - final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(i); - if (!aAlreadyPassedTileEntityList.contains(tTileEntity)) { - aAlreadyPassedTileEntityList.add(tTileEntity); - if (tTileEntity instanceof IEnergyConnected) { - if (this.getBaseMetaTileEntity().getColorization() >= 0) { - final byte tColor = ((IEnergyConnected) tTileEntity).getColorization(); - if ((tColor >= 0) && (tColor != this.getBaseMetaTileEntity().getColorization())) { - continue; - } - } - if ((tTileEntity instanceof IGregTechTileEntity) - && (((IGregTechTileEntity) tTileEntity) - .getMetaTileEntity() instanceof IMetaTileEntityCable) - && ((IGregTechTileEntity) tTileEntity) - .getCoverBehaviorAtSide(GT_Utility.getOppositeSide(i)) - .letsEnergyIn(GT_Utility.getOppositeSide(i), - ((IGregTechTileEntity) tTileEntity) - .getCoverIDAtSide(GT_Utility.getOppositeSide(i)), - ((IGregTechTileEntity) tTileEntity) - .getCoverDataAtSide(GT_Utility.getOppositeSide(i)), - ((IGregTechTileEntity) tTileEntity))) { - if (((IGregTechTileEntity) tTileEntity).getTimer() > 50) { - rUsedAmperes += ((IMetaTileEntityCable) ((IGregTechTileEntity) tTileEntity) - .getMetaTileEntity()).transferElectricity(GT_Utility.getOppositeSide(i), - aVoltage, aAmperage - rUsedAmperes, aAlreadyPassedTileEntityList); - } - } else { - rUsedAmperes += ((IEnergyConnected) tTileEntity).injectEnergyUnits( - GT_Utility.getOppositeSide(i), aVoltage, aAmperage - rUsedAmperes); - } - // } else if (tTileEntity instanceof IEnergySink) { - // ForgeDirection tDirection = - // ForgeDirection.getOrientation(i).getOpposite(); - // if - // (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)getBaseMetaTileEntity(), - // tDirection)) { - // if - // (((IEnergySink)tTileEntity).demandedEnergyUnits() - // > 0 && - // ((IEnergySink)tTileEntity).injectEnergyUnits(tDirection, - // aVoltage) < aVoltage) rUsedAmperes++; - // } - } else if (tTileEntity instanceof IEnergySink) { - final ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite(); - if (((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) this.getBaseMetaTileEntity(), - tDirection)) { - if ((((IEnergySink) tTileEntity).getDemandedEnergy() > 0) - && (((IEnergySink) tTileEntity).injectEnergy(tDirection, aVoltage, - aVoltage) < aVoltage)) { - rUsedAmperes++; - } - } - } else if (GregTech_API.mOutputRF && (tTileEntity instanceof IEnergyReceiver)) { - final ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite(); - final int rfOut = (int) ((aVoltage * GregTech_API.mEUtoRF) / 100); - if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) == rfOut) { - ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, false); - rUsedAmperes++; - } else if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) > 0) { - if (this.mRestRF == 0) { - final int RFtrans = ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, - false); - rUsedAmperes++; - this.mRestRF = rfOut - RFtrans; - } else { - final int RFtrans = ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, - (int) this.mRestRF, false); - this.mRestRF = this.mRestRF - RFtrans; - } - } - if (GregTech_API.mRFExplosions && (((IEnergyReceiver) tTileEntity) - .getMaxEnergyStored(tDirection) < (rfOut * 600))) { - if (rfOut > ((32 * GregTech_API.mEUtoRF) / 100)) { - this.doExplosion(rfOut); - } - } - } - } - } - } - } - - this.mTransferredAmperage += rUsedAmperes; - this.mTransferredVoltageLast20 = Math.max(this.mTransferredVoltageLast20, aVoltage); - this.mTransferredAmperageLast20 = Math.max(this.mTransferredAmperageLast20, this.mTransferredAmperage); - - if ((aVoltage > this.mVoltage) || (this.mTransferredAmperage > this.mAmperage)) { - // GT 5.09 - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - if (this.mOverheat > (this.mWireHeatingTicks * 100)) { - this.getBaseMetaTileEntity().setToFire(); - } else { - this.mOverheat += 100; - } - return aAmperage; - } - // GT 5.08 - else { - this.getBaseMetaTileEntity().setToFire(); - return aAmperage; - } - } - - return rUsedAmperes; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - this.mTransferredAmperage = 0; - if (this.mOverheat > 0) { - this.mOverheat--; - } - - if ((aTick % 20) == 0) { - this.mTransferredVoltageLast20 = 0; - this.mTransferredAmperageLast20 = 0; - this.mConnections = 0; - for (byte i = 0, j = 0; i < 6; i++) { - j = GT_Utility.getOppositeSide(i); - if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, - aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), - aBaseMetaTileEntity) - || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyIn(i, - aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), - aBaseMetaTileEntity) - || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyOut(i, - aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), - aBaseMetaTileEntity)) { - final TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i); - if (tTileEntity instanceof IColoredTileEntity) { - if (aBaseMetaTileEntity.getColorization() >= 0) { - final byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); - if ((tColor >= 0) && (tColor != aBaseMetaTileEntity.getColorization())) { - continue; - } - } - } - if ((tTileEntity instanceof IEnergyConnected) - && (((IEnergyConnected) tTileEntity).inputEnergyFrom(j) - || ((IEnergyConnected) tTileEntity).outputsEnergyTo(j))) { - this.mConnections |= (1 << i); - continue; - } - if ((tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity) - .getMetaTileEntity() instanceof IMetaTileEntityCable)) { - if (((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).alwaysLookConnected(j, - ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), - ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), - ((IGregTechTileEntity) tTileEntity)) - || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).letsEnergyIn(j, - ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), - ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), - ((IGregTechTileEntity) tTileEntity)) - || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).letsEnergyOut(j, - ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), - ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), - ((IGregTechTileEntity) tTileEntity))) { - this.mConnections |= (1 << i); - continue; - } - } - if ((tTileEntity instanceof IEnergySink) && ((IEnergySink) tTileEntity).acceptsEnergyFrom( - (TileEntity) aBaseMetaTileEntity, ForgeDirection.getOrientation(j))) { - this.mConnections |= (1 << i); - continue; - } - if (GregTech_API.mOutputRF && (tTileEntity instanceof IEnergyReceiver) - && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { - this.mConnections |= (1 << i); - continue; - } - /* - * if (tTileEntity instanceof IEnergyEmitter && - * ((IEnergyEmitter)tTileEntity).emitsEnergyTo(( - * TileEntity)aBaseMetaTileEntity, - * ForgeDirection.getOrientation(j))) { mConnections |= - * (1< as it should have been -// so any method in GregtechMetaTileEntity_IndustrialDehydrator would see generic field declared in GregtechMeta_MultiBlockBase without generic parameter - -public abstract class GregtechMeta_MultiBlockBase> extends GT_MetaTileEntity_EnhancedMultiBlockBase { - - public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; - - static { - - Method a08 = findRecipe08 = ReflectionUtils.getMethod(GT_Recipe_Map.class, "findRecipe", IHasWorldObjectAndCoords.class, GT_Recipe.class, boolean.class, long.class, FluidStack[].class, ItemStack.class, ItemStack[].class); - Method a09 = findRecipe09 = ReflectionUtils.getMethod(GT_Recipe_Map.class, "findRecipe", IHasWorldObjectAndCoords.class, GT_Recipe.class, boolean.class, boolean.class, long.class, FluidStack[].class, ItemStack.class, ItemStack[].class); - Logger.MACHINE_INFO("Found .08 findRecipe method? "+(a08 != null)); - Logger.MACHINE_INFO("Found .09 findRecipe method? "+(a09 != null)); - - try { - calculatePollutionReduction = GT_MetaTileEntity_Hatch_Muffler.class.getDeclaredMethod("calculatePollutionReduction", int.class); - } - catch (NoSuchMethodException | SecurityException e) {} - - } - - //Find Recipe Methods - private static final Method findRecipe08; - private static final Method findRecipe09; - - public GT_Recipe mLastRecipe; - private MultiblockRequirements mRequirements; - private boolean mInternalCircuit = false; - protected long mTotalRunTime = 0; - protected boolean mVoidExcess = false; - - public ArrayList mControlCoreBus = new ArrayList(); - public ArrayList mAirIntakes = new ArrayList(); - public ArrayList mChargeHatches = new ArrayList(); - public ArrayList mDischargeHatches = new ArrayList(); - public ArrayList mAllEnergyHatches = new ArrayList(); - public ArrayList mAllDynamoHatches = new ArrayList(); - - // Custom Behaviour Map - private static final HashMap mCustomBehviours = new HashMap(); - - - public GregtechMeta_MultiBlockBase(final int aID, final String aName, - final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMeta_MultiBlockBase(final String aName) { - super(aName); - } - - public static boolean isValidMetaTileEntity( - final MetaTileEntity aMetaTileEntity) { - return (aMetaTileEntity.getBaseMetaTileEntity() != null) - && (aMetaTileEntity.getBaseMetaTileEntity() - .getMetaTileEntity() == aMetaTileEntity) - && !aMetaTileEntity.getBaseMetaTileEntity().isDead(); - } - - public abstract boolean hasSlotInGUI(); - - public long getTotalRuntimeInTicks() { - return this.mTotalRunTime; - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - if (hasSlotInGUI()) { - return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); - } - else { - String aCustomGUI = getCustomGUIResourceName(); - if (aCustomGUI == null) { - return new CONTAINER_MultiMachine_NoPlayerInventory(aPlayerInventory, aBaseMetaTileEntity); - } - else { - return new CONTAINER_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); - } - } - } - - public abstract String getCustomGUIResourceName(); - - public boolean requiresVanillaGtGUI() { - return false; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - String aCustomGUI = getCustomGUIResourceName(); - aCustomGUI = aCustomGUI != null ? aCustomGUI : hasSlotInGUI() ? "MultiblockDisplay" : "MultiblockDisplay_Generic"; - aCustomGUI = aCustomGUI + ".png"; - if (hasSlotInGUI()) { - if (!requiresVanillaGtGUI()) { - return new GUI_Multi_Basic_Slotted(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); - } - else { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); - } - } - else { - if (getCustomGUIResourceName() == null && !hasSlotInGUI()) { - return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); - } - else { - return new GUI_MultiMachine_Default(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); - } - } - } - - public abstract String getMachineType(); - - public String getMachineTooltip() { - return "Machine Type: " + EnumChatFormatting.YELLOW + getMachineType() + EnumChatFormatting.RESET; - } - - public String[] getExtraInfoData() { - return new String[0]; - }; - - @Override - public final String[] getInfoData() { - ArrayList mInfo = new ArrayList(); - if (!this.getMetaName().equals("")) { - mInfo.add(this.getMetaName()); - } - - String[] extra = getExtraInfoData(); - - if (extra == null) { - extra = new String[0]; - } - if (extra.length > 0) { - for (String s : extra) { - mInfo.add(s); - } - } - - long seconds = (this.mTotalRunTime/20); - int weeks = (int) (TimeUnit.SECONDS.toDays(seconds) / 7); - int days = (int) (TimeUnit.SECONDS.toDays(seconds) - 7 * weeks); - long hours = TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days) - TimeUnit.DAYS.toHours(7*weeks); - long minutes = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60); - long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) *60); - - int mPollutionReduction = getPollutionReductionForAllMufflers(); - long storedEnergy = getStoredEnergyInAllEnergyHatches(); - long maxEnergy = getMaxEnergyStorageOfAllEnergyHatches(); - int tTier = this.getControlCoreTier(); - mInfo.add(getMachineTooltip()); - - - - //Lets borrow the GTNH handling - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.progress")+": "+ - EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ - EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s"); - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.energy")+": "+ - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU"); - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage")+": "+ - EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t"); - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.mei")+": "+ - EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t(*2A) "+StatCollector.translateToLocal("GTPP.machines.tier")+": "+ - EnumChatFormatting.YELLOW+GT_Values.VN[GT_Utility.getTier(getMaxInputVoltage())]+ EnumChatFormatting.RESET); - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.problems")+": "+ - EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+ - " "+StatCollector.translateToLocal("GTPP.multiblock.efficiency")+": "+ - EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %"); - - - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollution")+": "+ EnumChatFormatting.RED + this.getPollutionPerTick(null)*20+ EnumChatFormatting.RESET+"/sec"); - mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced")+": "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"); - - - mInfo.add(StatCollector.translateToLocal("GTPP.CC.machinetier")+": "+ - EnumChatFormatting.GREEN+tTier+EnumChatFormatting.RESET); - - mInfo.add(StatCollector.translateToLocal("GTPP.CC.discount")+": "+ - EnumChatFormatting.GREEN+(getEuDiscountForParallelism())+EnumChatFormatting.RESET + "%"); - - mInfo.add(StatCollector.translateToLocal("GTPP.CC.parallel")+": "+EnumChatFormatting.GREEN+(getMaxParallelRecipes())+EnumChatFormatting.RESET); - - - mInfo.add("Total Time Since Built: " + EnumChatFormatting.DARK_GREEN + Integer.toString(weeks)+EnumChatFormatting.RESET+" Weeks, " + EnumChatFormatting.DARK_GREEN+ Integer.toString(days) +EnumChatFormatting.RESET+ " Days, "); - mInfo.add(EnumChatFormatting.DARK_GREEN + Long.toString(hours) +EnumChatFormatting.RESET + " Hours, " + EnumChatFormatting.DARK_GREEN+ Long.toString(minutes) +EnumChatFormatting.RESET+ " Minutes, " + EnumChatFormatting.DARK_GREEN+ Long.toString(second) +EnumChatFormatting.RESET+ " Seconds."); - mInfo.add("Total Time in ticks: " + EnumChatFormatting.DARK_GREEN + Long.toString(this.mTotalRunTime)); - - - String[] mInfo2 = new String[mInfo.size()]; - mInfo.toArray(mInfo2); - return mInfo2; - - - - } - - public int getPollutionReductionForAllMufflers() { - int mPollutionReduction=0; - for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(calculatePollutionReductionForHatch(tHatch, 100),mPollutionReduction); - } - } - return mPollutionReduction; - } - - public long getStoredEnergyInAllEnergyHatches() { - long storedEnergy=0; - for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - } - } - return storedEnergy; - } - - public long getMaxEnergyStorageOfAllEnergyHatches() { - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); - } - } - return maxEnergy; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - private String[] aCachedToolTip; - - /*private final String aRequiresMuffler = "1x Muffler Hatch"; - private final String aRequiresCoreModule = "1x Core Module"; - private final String aRequiresMaint = "1x Maintanence Hatch";*/ - - public final static String TAG_HIDE_HATCHES = "TAG_HIDE_HATCHES"; - public final static String TAG_HIDE_MAINT = "TAG_HIDE_MAINT"; - public final static String TAG_HIDE_POLLUTION = "TAG_HIDE_POLLUTION"; - public final static String TAG_HIDE_MACHINE_TYPE = "TAG_HIDE_MACHINE_TYPE"; - - public synchronized final MultiblockRequirements getRequirements() { - return mRequirements; - } - - //public abstract MultiblockRequirements setRequirements(); - - public synchronized final void setRequirementsInternal() { - //this.mRequirements = setRequirements(); - this.mRequirements = null; - } - - public int getAmountOfOutputs() { - return 1; - } - - public abstract int getMaxParallelRecipes(); - public abstract int getEuDiscountForParallelism(); - - @Override - public boolean isCorrectMachinePart(final ItemStack paramItemStack) { - return true; - } - - @Override - public int getDamageToComponent(final ItemStack paramItemStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack p0) { - return false; - } - - @Override - public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1) { - GT_Utility.doSoundAtClient(getSound(), 10, 1.0F, aX, aY, aZ); - } - } - - public void startProcess() { - if(GT_Utility.isStringValid(getSound())) this.sendLoopStart((byte) 1); - } - - public String getSound() { return ""; } - - - public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes) { - return canBufferOutputs(aRecipe, aParallelRecipes, true); - } - - public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes, boolean aAllow16SlotWithoutCheck) { - if (mVoidExcess) return aParallelRecipes; - log("Determining if we have space to buffer outputs. Parallel: "+aParallelRecipes); - - // Null recipe or a recipe with lots of outputs? - // E.G. Gendustry custom comb with a billion centrifuge outputs? - // Do it anyway, provided the multi allows it. Default behaviour is aAllow16SlotWithoutCheck = true. - if (aRecipe == null || aRecipe.mOutputs.length > 16) { - if (aRecipe == null) { - return 0; - } - else if (aRecipe.mOutputs.length > 16) { - if (aAllow16SlotWithoutCheck) { - return aParallelRecipes; - } - else { - // Do nothing, we want to check this recipe properly. - } - } - } - - // Do we even need to check for item outputs? - boolean aDoesOutputItems = aRecipe.mOutputs.length > 0; - // Do we even need to check for fluid outputs? - boolean aDoesOutputFluids = aRecipe.mFluidOutputs.length > 0; - - - - /* ======================================== - * Item Management - * ======================================== - */ - - if (aDoesOutputItems) { - log("We have items to output."); - - // How many slots are free across all the output buses? - int aInputBusSlotsFree = 0; - - /* - * Create Variables for Item Output - */ - - AutoMap> aItemMap = new AutoMap>(); - AutoMap aOutputs = new AutoMap(aRecipe.mOutputs); - - for (final GT_MetaTileEntity_Hatch_OutputBus tBus : this.mOutputBusses) { - if (!isValidMetaTileEntity(tBus)) { - continue; - } - final IInventory tBusInv = tBus.getBaseMetaTileEntity(); - for (int i = 0; i < tBusInv.getSizeInventory(); i++) { - if (tBus.getStackInSlot(i) == null) { - aInputBusSlotsFree++; - } - else { - ItemStack aT = tBus.getStackInSlot(i); - int aSize = aT.stackSize; - aT = aT.copy(); - aT.stackSize = 0; - aItemMap.put(new FlexiblePair(aT, aSize)); - } - } - } - - // Count the slots we need, later we can check if any are able to merge with existing stacks - int aRecipeSlotsRequired = 0; - - // A map to hold the items we will be 'inputting' into the output buses. These itemstacks are actually the recipe outputs. - ConcurrentSet> aInputMap = new ConcurrentHashSet>(); - - // Iterate over the outputs, calculating require stack spacing they will require. - for (int i=0;i 64) { - int aSlotsNeedsForThisStack = (int) Math.ceil((double) ((float) aStackSize / 64f)); - // Should round up and add as many stacks as required nicely. - aRecipeSlotsRequired += aSlotsNeedsForThisStack; - for (int o=0;o 64 ? 64 : aStackSize; - aY = aY.copy(); - aY.stackSize = 0; - aInputMap.add(new FlexiblePair(aY, aStackToRemove)); - } - } - else { - // Only requires one slot - aRecipeSlotsRequired++; - aY = aY.copy(); - aY.stackSize = 0; - aInputMap.add(new FlexiblePair(aY, aStackSize)); - } - } - } - - // We have items to add to the output buses. See if any are not full stacks and see if we can make them full. - if (aInputMap.size() > 0) { - // Iterate over the current stored items in the Output busses, if any match and are not full, we can try account for merging. - busItems: for (FlexiblePair y : aItemMap) { - // Iterate over the 'inputs', we can safely remove these as we go. - outputItems: for (FlexiblePair u : aInputMap) { - // Create local vars for readability. - ItemStack aOutputBusStack = y.getKey(); - ItemStack aOutputStack = u.getKey(); - // Stacks match, including NBT. - if (GT_Utility.areStacksEqual(aOutputBusStack, aOutputStack, false)) { - // Stack Matches, but it's full, continue. - if (aOutputBusStack.stackSize >= 64) { - // This stack is full, no point checking it. - continue busItems; - } - else { - // We can merge these two stacks without any hassle. - if ((aOutputBusStack.stackSize + aOutputStack.stackSize) <= 64) { - // Update the stack size in the bus storage map. - y.setValue(aOutputBusStack.stackSize + aOutputStack.stackSize); - // Remove the 'input' stack from the recipe outputs, so we don't try count it again. - aInputMap.remove(u); - continue outputItems; - } - // Stack merging is too much, so we fill this stack, leave the remainder. - else { - int aRemainder = (aOutputBusStack.stackSize + aOutputStack.stackSize) - 64; - // Update the stack size in the bus storage map. - y.setValue(64); - // Create a new object to iterate over later, with the remainder data; - FlexiblePair t = new FlexiblePair(u.getKey(), aRemainder); - // Remove the 'input' stack from the recipe outputs, so we don't try count it again. - aInputMap.remove(u); - // Add the remainder stack. - aInputMap.add(t); - continue outputItems; - } - } - } - else { - continue outputItems; - } - } - } - } - - // We have stacks that did not merge, do we have space for them? - if (aInputMap.size() > 0) { - if (aInputMap.size() > aInputBusSlotsFree) { - aParallelRecipes = (int) Math.floor((double) aInputBusSlotsFree/aInputMap.size() * aParallelRecipes); - // We do not have enough free slots in total to accommodate the remaining managed stacks. - log(" Free: "+aInputBusSlotsFree+", Required: "+aInputMap.size()); - if(aParallelRecipes == 0) { - log("Failed to find enough space for all item outputs."); - return 0; - } - - } - } - - /* - * End Item Management - */ - - } - - - - - - /* ======================================== - * Fluid Management - * ======================================== - */ - - - - if (aDoesOutputFluids) { - log("We have Fluids to output."); - // How many slots are free across all the output buses? - int aFluidHatches = 0; - int aEmptyFluidHatches = 0; - int aFullFluidHatches = 0; - // Create Map for Fluid Output - ArrayList> aOutputHatches = new ArrayList>(); - for (final GT_MetaTileEntity_Hatch_Output tBus : this.mOutputHatches) { - if (!isValidMetaTileEntity(tBus)) { - continue; - } - aFluidHatches++; - // Map the Hatch with the space left for easy checking later. - if (tBus.getFluid() == null) { - aOutputHatches.add(new Triplet(tBus, null, tBus.getCapacity())); - } - else { - int aSpaceLeft = tBus.getCapacity() - tBus.getFluidAmount(); - aOutputHatches.add(new Triplet(tBus, tBus.getFluid(), aSpaceLeft)); - } - } - // Create a map of all the fluids we would like to output, we can iterate over this and see how many we can merge into existing hatch stacks. - ArrayList aOutputFluids = new ArrayList(); - // Ugly ass boxing - aOutputFluids.addAll(new AutoMap(aRecipe.mFluidOutputs)); - // Iterate the Hatches, updating their 'stored' data. - //for (Triplet aHatchData : aOutputHatches) { - for (int i = 0;i aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); - //aOutputHatches.add(aNewHatchData); - break; - } - // We can fill this hatch perfectly (rare case), may as well add it directly to the full list. - else if (aSpaceLeftInHatch == aFluidToPutIntoHatch) { - // Copy Old Stack - FluidStack aNewHatchStack = aHatchStack.copy(); - // Add in amount from output stack - aNewHatchStack.amount += aFluidToPutIntoHatch; - // Remove fluid from output list, merge success - aOutputFluids.remove(aOutputFluids.get(j)); - j--; - // Remove hatch from hatch list, data is now invalid. - aOutputHatches.remove(aOutputHatches.get(i)); - i--; - // Re-add hatch to hatch list, with new data. - Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); - aOutputHatches.add(aNewHatchData); - break; - } - // We have more space than we need to merge, so we remove the stack from the output list and update the hatch list. - else { - // Copy Old Stack - FluidStack aNewHatchStack = aHatchStack.copy(); - // Add in amount from output stack - aNewHatchStack.amount += aFluidToPutIntoHatch; - // Remove fluid from output list, merge success - aOutputFluids.remove(aOutputFluids.get(j)); - j--; - // Remove hatch from hatch list, data is now invalid. - aOutputHatches.remove(aOutputHatches.get(i)); - i--; - // Re-add hatch to hatch list, with new data. - Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); - aOutputHatches.add(aNewHatchData); - // Check next fluid - continue; - } - - } - else { - continue; - } - } - } - } - - for (Triplet aFreeHatchCheck : aOutputHatches) { - // Free Hatch - if (aFreeHatchCheck.getValue_2() == null || aFreeHatchCheck.getValue_3() == 0 || aFreeHatchCheck.getValue_1().getFluid() == null) { - aEmptyFluidHatches++; - } - } - - // We have Fluid Stacks we did not merge. Do we have space? - log("fluids to output "+aOutputFluids.size()+" empty hatches "+aEmptyFluidHatches); - if (aOutputFluids.size() > 0) { - // Not enough space to add fluids. - if (aOutputFluids.size() > aEmptyFluidHatches) { - aParallelRecipes = (int) Math.floor((double) aEmptyFluidHatches/aOutputFluids.size() * aParallelRecipes); - log("Failed to find enough space for all fluid outputs. Free: "+aEmptyFluidHatches+", Required: "+aOutputFluids.size()); - return 0; - - } - } - - /* - * End Fluid Management - */ - } - - return aParallelRecipes; - } - - /** - * A Static {@link Method} object which holds the current status of logging. - */ - public static Method aLogger = null; - - public void log(String s) { - if (!AsmConfig.disableAllLogging) { - if (CORE_Preloader.DEBUG_MODE) { - Logger.INFO(s); - } else { - Logger.MACHINE_INFO(s); - } - } - } - - public boolean checkRecipeGeneric() { - return checkRecipeGeneric(1, 100, 0); - } - - public boolean checkRecipeGeneric(int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent) { - return checkRecipeGeneric(aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, 10000); - } - - public boolean checkRecipeGeneric(int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { - ArrayList tItems = getStoredInputs(); - ArrayList tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll); - } - - public boolean checkRecipeGeneric(GT_Recipe aRecipe, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { - if (aRecipe == null) { - return false; - } - ArrayList tItems = getStoredInputs(); - ArrayList tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, isPerfectOC); - } - - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll) { - return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, false); - } - - public boolean checkRecipeGeneric(GT_Recipe aRecipe, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll) { - if (aRecipe == null) { - return false; - } - ArrayList tItems = getStoredInputs(); - ArrayList tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, false); - } - - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { - return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, isPerfectOC); - } - - - /* - * public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] - * aFluidInputs, int aMaxParallelRecipes, int aEUPercent, int - * aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { // Based on - * the Processing Array. A bit overkill, but very flexible. - * - * - * if (this.doesMachineBoostOutput()) { log("Boosting."); return - * checkRecipeBoostedOutputs(aItemInputs, aFluidInputs, aMaxParallelRecipes, - * aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe); } - * - * - * //Control Core to control the Multiblocks behaviour. int aControlCoreTier = - * getControlCoreTier(); - * - * //If no core, return false; if (aControlCoreTier > 0) { - * log("Control core found."); } - * - * - * // Reset outputs and progress stats this.mEUt = 0; this.mMaxProgresstime = 0; - * this.mOutputItems = new ItemStack[]{}; this.mOutputFluids = new - * FluidStack[]{}; - * - * long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, - * GT_Utility.getTier(tVoltage)); log("Running checkRecipeGeneric(0)"); - * - * //Check to see if Voltage Tier > Control Core Tier if (tTier > - * aControlCoreTier) { - * log("Control core found is lower tier than power tier. OK"); tTier = (byte) - * aControlCoreTier; } - * - * tTier = (byte) MathUtils.getValueWithinRange(tTier, 0, 9); - * - * GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe( - * getBaseMetaTileEntity(), mLastRecipe, false, - * gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - * - * log("Running checkRecipeGeneric(1)"); // Remember last recipe - an - * optimization for findRecipe() this.mLastRecipe = tRecipe; - * - * if (tRecipe == null) { log("BAD RETURN - 1"); return false; } - * - * if (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) { - * log("BAD RETURN - 2"); return false; } - * - * // EU discount float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; float - * tTotalEUt = 0.0f; - * - * int parallelRecipes = 0; - * - * log("parallelRecipes: "+parallelRecipes); - * log("aMaxParallelRecipes: "+aMaxParallelRecipes); - * log("tTotalEUt: "+tTotalEUt); log("tVoltage: "+tVoltage); - * log("tRecipeEUt: "+tRecipeEUt); log("EU1: "+tRecipeEUt); // Count - * recipes to do in parallel, consuming input items and fluids and considering - * input voltage limits for (; parallelRecipes < aMaxParallelRecipes && - * tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { if - * (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - * log("Broke at "+parallelRecipes+"."); break; } - * log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); tTotalEUt - * += tRecipeEUt; log("EU2: "+tTotalEUt); } - * - * if (parallelRecipes == 0) { log("BAD RETURN - 3"); return false; } - * - * log("EU3: "+tTotalEUt); - * - * // -- Try not to fail after this point - inputs have already been consumed! - * -- - * - * - * // Convert speed bonus to duration multiplier // e.g. 100% speed bonus = 200% - * speed = 100%/200% = 50% recipe duration. aSpeedBonusPercent = Math.max(-99, - * aSpeedBonusPercent); float tTimeFactor = 100.0f / (100.0f + - * aSpeedBonusPercent); this.mMaxProgresstime = (int)(tRecipe.mDuration * - * tTimeFactor * 10000); - * - * int aTempEu = (int) Math.floor(tTotalEUt); log("EU4: "+aTempEu); - * this.mEUt = (int) aTempEu; - * - * - * this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - * this.mEfficiencyIncrease = 10000; - * - * // Overclock if (this.mEUt <= 16) { this.mEUt = (this.mEUt * (1 << tTier - 1) - * * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << - * tTier - 1)); } else { while (this.mEUt <= - * gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.mEUt *= 4; - * this.mMaxProgresstime /= 2; } } - * - * if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } - * - * this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - * - * // Collect fluid outputs FluidStack[] tOutputFluids = new - * FluidStack[tRecipe.mFluidOutputs.length]; for (int h = 0; h < - * tRecipe.mFluidOutputs.length; h++) { if (tRecipe.getFluidOutput(h) != null) { - * tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); tOutputFluids[h].amount - * *= parallelRecipes; } } - * - * // Collect output item types ItemStack[] tOutputItems = new - * ItemStack[tRecipe.mOutputs.length]; for (int h = 0; h < - * tRecipe.mOutputs.length; h++) { if (tRecipe.getOutput(h) != null) { - * tOutputItems[h] = tRecipe.getOutput(h).copy(); tOutputItems[h].stackSize = 0; - * } } - * - * // Set output item stack sizes (taking output chance into account) for (int f - * = 0; f < tOutputItems.length; f++) { if (tRecipe.mOutputs[f] != null && - * tOutputItems[f] != null) { for (int g = 0; g < parallelRecipes; g++) { if - * (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < - * tRecipe.getOutputChance(f)) tOutputItems[f].stackSize += - * tRecipe.mOutputs[f].stackSize; } } } - * - * tOutputItems = removeNulls(tOutputItems); - * - * // Sanitize item stack size, splitting any stacks greater than max stack size - * List splitStacks = new ArrayList(); for (ItemStack - * tItem : tOutputItems) { while (tItem.getMaxStackSize() < tItem.stackSize) { - * ItemStack tmp = tItem.copy(); tmp.stackSize = tmp.getMaxStackSize(); - * tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - * splitStacks.add(tmp); } } - * - * if (splitStacks.size() > 0) { ItemStack[] tmp = new - * ItemStack[splitStacks.size()]; tmp = splitStacks.toArray(tmp); tOutputItems = - * ArrayUtils.addAll(tOutputItems, tmp); } - * - * // Strip empty stacks List tSList = new ArrayList(); - * for (ItemStack tS : tOutputItems) { if (tS.stackSize > 0) tSList.add(tS); } - * tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - * - * // Commit outputs this.mOutputItems = tOutputItems; this.mOutputFluids = - * tOutputFluids; updateSlots(); - * - * // Play sounds (GT++ addition - GT multiblocks play no sounds) - * startProcess(); - * - * log("GOOD RETURN - 1"); return true; } - */ - - public long getMaxInputEnergy() { - long rEnergy = 0; - if (mEnergyHatches.size() < 2) // so it only takes 1 amp is only 1 hatch is present so it works like most gt multies - return mEnergyHatches.get(0).getBaseMetaTileEntity().getInputVoltage(); - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) - if (isValidMetaTileEntity(tHatch)) rEnergy += tHatch.getBaseMetaTileEntity().getInputVoltage() * tHatch.getBaseMetaTileEntity().getInputAmperage(); - return rEnergy; - } - - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isPerpectOC) { - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - log("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = findRecipe( - getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - log("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - - /* - * Check for Special Behaviours - */ - - // First populate the map if we need to. - if (mCustomBehviours.isEmpty()) { - mCustomBehviours.putAll(Multiblock_API.getSpecialBehaviourItemMap()); - } - - // We have a special slot object in the recipe - if (tRecipe.mSpecialItems != null) { - // The special slot is an item - if (tRecipe.mSpecialItems instanceof ItemStack) { - // Make an Itemstack instance of this. - ItemStack aSpecialStack = (ItemStack) tRecipe.mSpecialItems; - // Check if this item is in an input bus. - boolean aDidFindMatch = false; - for (ItemStack aInputItemsToCheck : aItemInputs) { - // If we find a matching stack, continue. - if (GT_Utility.areStacksEqual(aSpecialStack, aInputItemsToCheck, false)) { - // Iterate all special behaviour items, to see if we need to utilise one. - aDidFindMatch = true; - break; - } - } - // Try prevent needless iteration loops if we don't have the required inputs at all. - if (aDidFindMatch) { - // Iterate all special behaviour items, to see if we need to utilise one. - for (SpecialMultiBehaviour aBehaviours : mCustomBehviours.values()) { - // Found a match, let's adjust this recipe now. - if (aBehaviours.isTriggerItem(aSpecialStack)) { - // Adjust this recipe to suit special item - aMaxParallelRecipes = aBehaviours.getMaxParallelRecipes(); - aEUPercent = aBehaviours.getEUPercent(); - aSpeedBonusPercent = aBehaviours.getSpeedBonusPercent(); - aOutputChanceRoll = aBehaviours.getOutputChanceRoll(); - break; - } - } - } - } - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - log("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+aMaxParallelRecipes); - log("tTotalEUt: "+tTotalEUt); - log("tVoltage: "+tVoltage); - log("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - if (isPerpectOC) this.mMaxProgresstime /= 4; - else this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("GOOD RETURN - 1"); - return true; - } - - - - - - /* - * Here we handle recipe boosting, which grants additional output %'s to recipes that do not have 100%. - */ - - private boolean mHasBoostedCurrentRecipe = false; - private GT_Recipe mBoostedRecipe = null; - private ItemStack[] mInputVerificationForBoosting = null; - - /** - * Does this machine boost it's output? - * @return - if true, gives additional % to output chances. - */ - protected boolean doesMachineBoostOutput() { - return false; - } - - - - private int boostOutput(int aAmount) { - if (aAmount <= 0) { - return 10000; - } - if (aAmount <= 250) { - aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); - } - else if (aAmount <= 500) { - aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); - } - else if (aAmount <= 750) { - aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); - } - else if (aAmount <= 1000) { - aAmount = (aAmount*2); - } - else if (aAmount <= 1500) { - aAmount = (aAmount*2); - } - else if (aAmount <= 2000) { - aAmount = (int) (aAmount*1.5); - } - else if (aAmount <= 3000) { - aAmount = (int) (aAmount*1.5); - } - else if (aAmount <= 4000) { - aAmount = (int) (aAmount*1.2); - } - else if (aAmount <= 5000) { - aAmount = (int) (aAmount*1.2); - } - else if (aAmount <= 7000) { - aAmount = (int) (aAmount*1.2); - } - else if (aAmount <= 9000) { - aAmount = (int) (aAmount*1.1); - } - return Math.min(10000, aAmount); - } - - public GT_Recipe generateAdditionalOutputForRecipe(GT_Recipe aRecipe) { - AutoMap aNewChances = new AutoMap(); - for (int chance : aRecipe.mChances) { - aNewChances.put(boostOutput(chance)); - } - GT_Recipe aClone = aRecipe.copy(); - int[] aTemp = new int[aNewChances.size()]; - int slot = 0; - for (int g : aNewChances) { - aTemp[slot] = g; - slot++; - } - aClone.mChances = aTemp; - return aClone; - } - - - /** - * Processes recipes but provides a bonus to the output % of items if they are < 100%. - * - * @param aItemInputs - * @param aFluidInputs - * @param aMaxParallelRecipes - * @param aEUPercent - * @param aSpeedBonusPercent - * @param aOutputChanceRoll - * @param aRecipe - * @return - */ - public boolean checkRecipeBoostedOutputs( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - log("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe( - getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - log("Running checkRecipeGeneric(1)"); - - //First we check whether or not we have an input cached for boosting. - //If not, we set it to the current recipe. - //If we do, we compare it against the current recipe, if thy are the same, we try return a boosted recipe, if not, we boost a new recipe. - boolean isRecipeInputTheSame = false; - - //No cached recipe inputs, assume first run. - if (mInputVerificationForBoosting == null) { - mInputVerificationForBoosting = tRecipe.mInputs; - isRecipeInputTheSame = true; - } - //If the inputs match, we are good. - else { - if (tRecipe.mInputs == mInputVerificationForBoosting) { - isRecipeInputTheSame = true; - } - else { - isRecipeInputTheSame = false; - } - } - - //Inputs are the same, let's see if there's a boosted version. - if (isRecipeInputTheSame) { - //Yes, let's just set that as the recipe - if (mHasBoostedCurrentRecipe && mBoostedRecipe != null) { - tRecipe = mBoostedRecipe; - } - //We have yet to generate a new boosted recipe - else { - GT_Recipe aBoostedRecipe = this.generateAdditionalOutputForRecipe(tRecipe); - if (aBoostedRecipe != null) { - mBoostedRecipe = aBoostedRecipe; - mHasBoostedCurrentRecipe = true; - tRecipe = mBoostedRecipe; - } - //Bad boost - else { - mBoostedRecipe = null; - mHasBoostedCurrentRecipe = false; - } - } - } - //We have changed inputs, so we should generate a new boosted recipe - else { - GT_Recipe aBoostedRecipe = this.generateAdditionalOutputForRecipe(tRecipe); - if (aBoostedRecipe != null) { - mBoostedRecipe = aBoostedRecipe; - mHasBoostedCurrentRecipe = true; - tRecipe = mBoostedRecipe; - } - //Bad boost - else { - mBoostedRecipe = null; - mHasBoostedCurrentRecipe = false; - } - } - - //Bad modify, let's just use the original recipe. - if (!mHasBoostedCurrentRecipe || mBoostedRecipe == null) { - tRecipe = aRecipe != null ? aRecipe : findRecipe( - getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - } - - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - log("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+aMaxParallelRecipes); - log("tTotalEUt: "+tTotalEUt); - log("tVoltage: "+tVoltage); - log("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("GOOD RETURN - 1"); - return true; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - public boolean isMachineRunning() { - boolean aRunning = this.getBaseMetaTileEntity().isActive(); - log("Queried Multiblock is currently running: "+aRunning); - return aRunning; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, - final long aTick) { - - //Time Counter - if (aBaseMetaTileEntity.isServerSide()){ - this.mTotalRunTime++; - } - - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate == 1 || this.mStartUpCheck == 1) { - this.mChargeHatches.clear(); - this.mDischargeHatches.clear(); - this.mControlCoreBus.clear(); - this.mAirIntakes.clear(); - this.mTecTechEnergyHatches.clear(); - this.mTecTechDynamoHatches.clear(); - this.mAllEnergyHatches.clear(); - this.mAllDynamoHatches.clear(); - } - } - - - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void explodeMultiblock() { - MetaTileEntity tTileEntity; - for (final Iterator localIterator = this.mChargeHatches - .iterator(); localIterator.hasNext(); tTileEntity - .getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { - tTileEntity = localIterator.next(); - } - tTileEntity = null; - for (final Iterator localIterator = this.mDischargeHatches - .iterator(); localIterator.hasNext(); tTileEntity - .getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { - tTileEntity = localIterator.next(); - } - tTileEntity = null; - for (final Iterator localIterator = this.mTecTechDynamoHatches - .iterator(); localIterator.hasNext(); tTileEntity - .getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { - tTileEntity = localIterator.next(); - } - tTileEntity = null; - for (final Iterator localIterator = this.mTecTechEnergyHatches - .iterator(); localIterator.hasNext(); tTileEntity - .getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { - tTileEntity = localIterator.next(); - } - - - - super.explodeMultiblock(); - } - - protected int getGUICircuit(ItemStack[] t) { - Item g = CI.getNumberedCircuit(0).getItem(); - ItemStack guiSlot = this.mInventory[1]; - int mMode = -1; - if (guiSlot != null && guiSlot.getItem() == g) { - this.mInternalCircuit = true; - return guiSlot.getItemDamage(); - } - else { - this.mInternalCircuit = false; - } - - if (!this.mInternalCircuit) { - for (ItemStack j : t) { - if (j.getItem() == g) { - mMode = j.getItemDamage(); - break; - } - } - } - return mMode; - } - - protected ItemStack getGUIItemStack() { - ItemStack guiSlot = this.mInventory[1]; - return guiSlot; - } - - protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) { - boolean result = false; - if (this.mInventory[1] == null) { - this.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null; - this.depleteInput(aNewGuiSlotContents); - this.updateSlots(); - result = true; - } - return result; - } - - protected boolean clearGUIItemSlot() { - return setGUIItemStack(null); - } - - - public ItemStack findItemInInventory(Item aSearchStack) { - return findItemInInventory(aSearchStack, 0); - } - - public ItemStack findItemInInventory(Item aSearchStack, int aMeta) { - return findItemInInventory(ItemUtils.simpleMetaStack(aSearchStack, aMeta, 1)); - } - - public ItemStack findItemInInventory(ItemStack aSearchStack) { - if (aSearchStack != null && this.mInputBusses.size() > 0) { - for (GT_MetaTileEntity_Hatch_InputBus bus : this.mInputBusses) { - if (bus != null) { - for (ItemStack uStack : bus.mInventory) { - if (uStack != null) { - if (aSearchStack.getClass().isInstance(uStack.getItem())) { - return uStack; - } - } - } - } - } - } - return null; - } - - @Override - public void updateSlots() { - for (final GT_MetaTileEntity_Hatch_InputBattery tHatch : this.mChargeHatches) { - if (isValidMetaTileEntity(tHatch)) { - tHatch.updateSlots(); - } - } - for (final GT_MetaTileEntity_Hatch_OutputBattery tHatch : this.mDischargeHatches) { - if (isValidMetaTileEntity(tHatch)) { - tHatch.updateSlots(); - } - } - super.updateSlots(); - } - - public boolean isToolCreative(ItemStack mStack){ - Materials t1 = GT_MetaGenerated_Tool.getPrimaryMaterial(mStack); - Materials t2 = GT_MetaGenerated_Tool.getSecondaryMaterial(mStack); - if (t1 == Materials._NULL && t2 == Materials._NULL){ - return true; - } - return false; - } - - /** - * Causes a Random Maint. Issue. - * @return {@link boolean} - Returns whether or not an issue was caused, should always be true. - */ - public boolean causeMaintenanceIssue() { - boolean b = false; - switch (this.getBaseMetaTileEntity().getRandomNumber(6)) { - case 0 : { - this.mWrench = false; - b = true; - break; - } - case 1 : { - this.mScrewdriver = false; - b = true; - break; - } - case 2 : { - this.mSoftHammer = false; - b = true; - break; - } - case 3 : { - this.mHardHammer = false; - b = true; - break; - } - case 4 : { - this.mSolderingTool = false; - b = true; - break; - } - case 5 : { - this.mCrowbar = false; - b = true; - break; - } - } - return b; - } - - public void fixAllMaintenanceIssue() { - this.mCrowbar = true; - this.mWrench = true; - this.mHardHammer = true; - this.mSoftHammer = true; - this.mSolderingTool = true; - this.mScrewdriver = true; - } - - public boolean checkHatch() { - return mMaintenanceHatches.size() <= 1 && !mMufflerHatches.isEmpty(); - } - - public boolean addToMachineListInternal(ArrayList aList, final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - return addToMachineListInternal(aList, getMetaTileEntity(aTileEntity), aBaseCasingIndex); - } - - public boolean addToMachineListInternal(ArrayList aList, final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - - //Check type - /* - * Class aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if - * (!aHatchType.isInstance(aTileEntity)) { return false; } - */ - - // Try setRecipeMap - - if (aTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - ((GT_MetaTileEntity_Hatch_Input) aTileEntity).mRecipeMap = getRecipeMap(); - } - if (aTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap(); - } - - if (aList.isEmpty()) { - if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { - if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { - log("Adding " + aTileEntity.getInventoryName() + " at " + new BlockPos(aTileEntity.getBaseMetaTileEntity()).getLocationString()); - } - updateTexture(aTileEntity, aBaseCasingIndex); - return aList.add((E) aTileEntity); - } - } else { - IGregTechTileEntity aCur = aTileEntity.getBaseMetaTileEntity(); - BlockPos aCurPos = new BlockPos(aCur); - boolean aExists = false; - for (E m : aList) { - IGregTechTileEntity b = ((IMetaTileEntity) m).getBaseMetaTileEntity(); - if (b != null) { - BlockPos aPos = new BlockPos(b); - if (aPos != null) { - if (aCurPos.equals(aPos)) { - if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { - log("Found Duplicate "+b.getInventoryName()+" at " + aPos.getLocationString()); - } - return false; - } - } - } - } - if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { - if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { - log("Adding " + aCur.getInventoryName() + " at " + aCurPos.getLocationString()); - } - updateTexture(aTileEntity, aBaseCasingIndex); - return aList.add((E) aTileEntity); - } - } - return false; - } - - public int getControlCoreTier() { - - //Always return best tier if config is off. - /*boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores; - if (!aCoresConfig) { - return 10; - }*/ - - if (mControlCoreBus.isEmpty()) { - log("No Control Core Modules Found."); - return 0; - } - GT_MetaTileEntity_Hatch_ControlCore i = getControlCoreBus(); - if (i != null) { - ItemStack x = i.mInventory[0]; - if (x != null) { - return x.getItemDamage(); - } - } - log("Control Core Module was null."); - return 0; - } - - public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() { - if (this.mControlCoreBus == null || this.mControlCoreBus.isEmpty()) { - return null; - } - GT_MetaTileEntity_Hatch_ControlCore x = this.mControlCoreBus.get(0); - if (x != null) { - log("getControlCore(ok)"); - return x; - } - log("getControlCore(bad)"); - return null; - } - - //mControlCoreBus - public boolean addControlCoreToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (!mControlCoreBus.isEmpty()) { - log("Tried to add a secondary control core module."); - return false; - } - GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) getMetaTileEntity(aTileEntity); - if (Module != null) { - if (Module.setOwner(aTileEntity)) { - log("Adding control core module."); - return addToMachineListInternal(mControlCoreBus, Module, aBaseCasingIndex); - } - } - return false; - } - - private IMetaTileEntity getMetaTileEntity(final IGregTechTileEntity aTileEntity) { - if (aTileEntity == null) { - return null; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - return aMetaTileEntity; - } - - - @Override - public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - return addToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex); - } - - public boolean addToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) { - if (aMetaTileEntity == null) { - return false; - } - - //Use this to determine the correct value, then update the hatch texture after. - boolean aDidAdd = false; - - //Handle Custom Hatches - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ControlCore) { - log("Found GT_MetaTileEntity_Hatch_ControlCore"); - if (!mControlCoreBus.isEmpty()) { - log("Tried to add a secondary control core module."); - return false; - } - aDidAdd = addToMachineListInternal(this.mControlCoreBus, aMetaTileEntity, aBaseCasingIndex); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBattery) { - log("Found GT_MetaTileEntity_Hatch_InputBattery"); - aDidAdd = addToMachineListInternal(mChargeHatches, aMetaTileEntity, aBaseCasingIndex); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBattery) { - log("Found GT_MetaTileEntity_Hatch_OutputBattery"); - aDidAdd = addToMachineListInternal(mDischargeHatches, aMetaTileEntity, aBaseCasingIndex); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) { - aDidAdd = addToMachineListInternal(mAirIntakes, aMetaTileEntity, aBaseCasingIndex); - } - - //Handle TT Multi-A Energy Hatches - else if (LoadedMods.TecTech && isThisHatchMultiEnergy(aMetaTileEntity)) { - log("Found isThisHatchMultiEnergy"); - aDidAdd = addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex); - updateMasterEnergyHatchList(aMetaTileEntity); - } - - //Handle TT Multi-A Dynamos - else if (LoadedMods.TecTech && isThisHatchMultiDynamo(aMetaTileEntity)) { - log("Found isThisHatchMultiDynamo"); - aDidAdd = addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex); - updateMasterDynamoHatchList(aMetaTileEntity); - } - - //Handle Fluid Hatches using seperate logic - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) - aDidAdd = addToMachineListInternal(mInputHatches, aMetaTileEntity, aBaseCasingIndex); - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) - aDidAdd = addToMachineListInternal(mOutputHatches, aMetaTileEntity, aBaseCasingIndex); - - //Process Remaining hatches using Vanilla GT Logic - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) - aDidAdd = addToMachineListInternal(mInputBusses, aMetaTileEntity, aBaseCasingIndex); - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) - aDidAdd = addToMachineListInternal(mOutputBusses, aMetaTileEntity, aBaseCasingIndex); - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { - aDidAdd = addToMachineListInternal(mEnergyHatches, aMetaTileEntity, aBaseCasingIndex); - updateMasterEnergyHatchList(aMetaTileEntity); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { - aDidAdd = addToMachineListInternal(mDynamoHatches, aMetaTileEntity, aBaseCasingIndex); - updateMasterDynamoHatchList(aMetaTileEntity); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) - aDidAdd = addToMachineListInternal(mMaintenanceHatches, aMetaTileEntity, aBaseCasingIndex); - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) - aDidAdd = addToMachineListInternal(mMufflerHatches, aMetaTileEntity, aBaseCasingIndex); - - //return super.addToMachineList(aTileEntity, aBaseCasingIndex); - return aDidAdd; - } - - - - @Override - public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - @Override - public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - @Override - public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - @Override - public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - public boolean addAirIntakeToMachineList(final IGregTechTileEntity aMetaTileEntity, final int aBaseCasingIndex) { - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - public boolean addFluidInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - return addFluidInputToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex); - } - - public boolean addFluidInputToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) { - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - public boolean clearRecipeMapForAllInputHatches() { - return resetRecipeMapForAllInputHatches(null); - } - - public boolean resetRecipeMapForAllInputHatches() { - return resetRecipeMapForAllInputHatches(this.getRecipeMap()); - } - - public boolean resetRecipeMapForAllInputHatches(GT_Recipe_Map aMap) { - int cleared = 0; - for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { - if (resetRecipeMapForHatch(g, aMap)) { - cleared++; - } - } - for (GT_MetaTileEntity_Hatch_InputBus g : this.mInputBusses) { - if (resetRecipeMapForHatch(g, aMap)) { - cleared++; - } - } - return cleared > 0; - } - public boolean resetRecipeMapForHatch(IGregTechTileEntity aTileEntity, GT_Recipe_Map aMap) { - try { - final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - return resetRecipeMapForHatch((GT_MetaTileEntity_Hatch)aMetaTileEntity, aMap); - } - else { - return false; - } - } - catch (Throwable t) { - return false; - } - } - - public boolean resetRecipeMapForHatch(GT_MetaTileEntity_Hatch aTileEntity, GT_Recipe_Map aMap) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity; - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input){ - ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = null; - ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = aMap; - if (aMap != null && aMap.mNEIName != null) { - log("Remapped Input Hatch to "+aMap.mNEIName+"."); - } - else { - log("Cleared Input Hatch."); - } - } - else { - ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = null; - ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = aMap; - if (aMap != null && aMap.mNEIName != null) { - log("Remapped Input Bus to "+aMap.mNEIName+"."); - } - else { - log("Cleared Input Bus."); - } - } - return true; - } - else { - return false; - } - } - - @Override - public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - clearRecipeMapForAllInputHatches(); - onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); - resetRecipeMapForAllInputHatches(); - } - - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - - } - - - - - - /** - * Enable Texture Casing Support if found in GT 5.09 - */ - - public boolean updateTexture(final IGregTechTileEntity aTileEntity, int aCasingID){ - return updateTexture(getMetaTileEntity(aTileEntity), aCasingID); - } - - /** - * Enable Texture Casing Support if found in GT 5.09 - */ - - @SuppressWarnings("deprecation") - public boolean updateTexture(final IMetaTileEntity aTileEntity, int aCasingID){ - try { //gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch.updateTexture(int) - - final IMetaTileEntity aMetaTileEntity = aTileEntity; - if (aMetaTileEntity == null) { - return false; - } - Method mProper = ReflectionUtils.getMethod(GT_MetaTileEntity_Hatch.class, "updateTexture", int.class); - if (mProper != null){ - if (GT_MetaTileEntity_Hatch.class.isInstance(aMetaTileEntity)){ - mProper.setAccessible(true); - mProper.invoke(aMetaTileEntity, aCasingID); - log("Good Method Call for updateTexture."); - return true; - } - } - else { - log("Bad Method Call for updateTexture."); - if (GT_MetaTileEntity_Hatch.class.isInstance(aMetaTileEntity)){ - if (aCasingID <= Byte.MAX_VALUE) { - ((GT_MetaTileEntity_Hatch) aTileEntity).mMachineBlock = (byte) aCasingID; - log("Good Method Call for updateTexture. Used fallback method of setting mMachineBlock as casing id was <= 128."); - return true; - } - else { - log("updateTexture returning false. 1.2"); - } - } - else { - log("updateTexture returning false. 1.3"); - } - } - log("updateTexture returning false. 1"); - return false; - } - catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - log("updateTexture returning false."); - log("updateTexture returning false. 2"); - e.printStackTrace(); - return false; - } - - } - - - - - - - - - - /** - * TecTech Support - */ - - - /** - * This is the array Used to Store the Tectech Multi-Amp Dynamo hatches. - */ - - public ArrayList mTecTechDynamoHatches = new ArrayList(); - - /** - * This is the array Used to Store the Tectech Multi-Amp Energy hatches. - */ - - public ArrayList mTecTechEnergyHatches = new ArrayList(); - - /** - * TecTech Multi-Amp Dynamo Support - * @param aTileEntity - The Dynamo Hatch - * @param aBaseCasingIndex - Casing Texture - * @return - */ - - public boolean addMultiAmpDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){ - final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity == null) { - return false; - } - if (isThisHatchMultiDynamo(aTileEntity)) { - return addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - public boolean isThisHatchMultiDynamo(IGregTechTileEntity aTileEntity){ - return isThisHatchMultiDynamo(getMetaTileEntity(aTileEntity)); - } - - public boolean isThisHatchMultiDynamo(IMetaTileEntity aMetaTileEntity){ - Class mDynamoClass; - mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti"); - if (mDynamoClass != null){ - if (mDynamoClass.isInstance(aMetaTileEntity)){ - return true; - } - } - return false; - } - - @Override - public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || isThisHatchMultiDynamo(aMetaTileEntity)) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - private boolean updateMasterDynamoHatchList(IMetaTileEntity aMetaTileEntity) { - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { - GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity; - return mAllDynamoHatches.add(aHatch); - } - return false; - } - - - /** - * TecTech Multi-Amp Energy Hatch Support - * @param aTileEntity - The Energy Hatch - * @param aBaseCasingIndex - Casing Texture - * @return - */ - - public boolean addMultiAmpEnergyToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){ - final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity == null) { - return false; - } - if (isThisHatchMultiEnergy(aMetaTileEntity)) { - return addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - public boolean isThisHatchMultiEnergy(IGregTechTileEntity aTileEntity){ - return isThisHatchMultiEnergy(getMetaTileEntity(aTileEntity)); - } - - public boolean isThisHatchMultiEnergy(IMetaTileEntity aMetaTileEntity){ - Class mDynamoClass; - mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti"); - if (mDynamoClass != null){ - if (mDynamoClass.isInstance(aMetaTileEntity)){ - return true; - } - } - return false; - } - - @Override - public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy || isThisHatchMultiEnergy(aMetaTileEntity)) { - return addToMachineList(aMetaTileEntity, aBaseCasingIndex); - } - return false; - } - - private boolean updateMasterEnergyHatchList(IMetaTileEntity aMetaTileEntity) { - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { - GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity; - return mAllEnergyHatches.add(aHatch); - } - return false; - } - - - /** - * Pollution Management - */ - - private static Method calculatePollutionReduction = null; - public int calculatePollutionReductionForHatch(GT_MetaTileEntity_Hatch_Muffler i , int g) { - if (calculatePollutionReduction != null) { - try { - return (int) calculatePollutionReduction.invoke(i, g); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - - } - } - return 0; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setLong("mTotalRunTime", this.mTotalRunTime); - aNBT.setBoolean("mVoidExcess", this.mVoidExcess); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - this.mTotalRunTime = aNBT.getLong("mTotalRunTime"); - this.mVoidExcess = aNBT.getBoolean("mVoidExcess"); - super.loadNBTData(aNBT); - } - - - - - - - - - - - - - - /** - * Custom Find Recipe with Debugging - */ - - - public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final boolean aNotUnificated, - final boolean aDontCheckStackSizes, final long aVoltage, final FluidStack[] aFluids, - final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, null, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, - (ItemStack) null, aInputs); - } - - public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final boolean aNotUnificated, - final long aVoltage, final FluidStack[] aFluids, final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, (ItemStack) null, aInputs); - } - - public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, - final boolean aNotUnificated, final boolean aDontCheckStackSizes, final long aVoltage, - final FluidStack[] aFluids, final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, - (ItemStack) null, aInputs); - } - - public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, - final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, - final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, (ItemStack) null, aInputs); - } - - public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, - final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, - final ItemStack aSpecialSlot, final ItemStack... aInputs) { - return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, true, aVoltage, aFluids, aSpecialSlot, - aInputs); - } - - public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, - final boolean aNotUnificated, final boolean aDontCheckStackSizes, final long aVoltage, - final FluidStack[] aFluids, final ItemStack aSpecialSlot, ItemStack... aInputs) { - if (this.getRecipeMap().mRecipeList.isEmpty()) { - log("No Recipes in Map to search through."); - return null; - } - GT_Recipe mRecipeResult = null; - try { - if (GregTech_API.sPostloadFinished) { - if (this.getRecipeMap().mMinimalInputFluids > 0) { - if (aFluids == null) { - log("aFluids == null && minFluids > 0"); - return null; - } - int tAmount = 0; - for (final FluidStack aFluid : aFluids) { - if (aFluid != null) { - ++tAmount; - } - } - if (tAmount < this.getRecipeMap().mMinimalInputFluids) { - log("Not enough fluids?"); - return null; - } - } - if (this.getRecipeMap().mMinimalInputItems > 0) { - if (aInputs == null) { - log("No inputs and minItems > 0"); - return null; - } - int tAmount = 0; - for (final ItemStack aInput : aInputs) { - if (aInput != null) { - ++tAmount; - } - } - if (tAmount < this.getRecipeMap().mMinimalInputItems) { - log("Not enough items?"); - return null; - } - } - } - else { - log("Game Not Loaded properly for recipe lookup."); - } - if (aNotUnificated) { - aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); - } - if (aRecipe != null && !aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered - && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { - mRecipeResult = (aRecipe.mEnabled/* && aVoltage * this.getRecipeMap().mAmperage >= aRecipe.mEUt*/) ? aRecipe : null; - log("x) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); - if (mRecipeResult != null) { - return mRecipeResult; - } - } - if (mRecipeResult == null && this.getRecipeMap().mUsualInputCount >= 0 && aInputs != null && aInputs.length > 0) { - for (final ItemStack tStack : aInputs) { - if (tStack != null) { - Collection tRecipes = this.getRecipeMap().mRecipeItemMap.get(new GT_ItemStack(tStack)); - if (tRecipes != null) { - for (final GT_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { - mRecipeResult = (tRecipe.mEnabled/* && aVoltage * this.getRecipeMap().mAmperage >= tRecipe.mEUt*/) - ? tRecipe - : null; - log("1) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); - //return mRecipeResult; - } - } - } - - //TODO - Investigate if this requires to be in it's own block - tRecipes = this.getRecipeMap().mRecipeItemMap - .get(new GT_ItemStack(GT_Utility.copyMetaData(32767L, new Object[]{tStack}))); - if (tRecipes != null) { - for (final GT_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe - && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { - mRecipeResult = (tRecipe.mEnabled /*&& aVoltage * this.getRecipeMap().mAmperage >= tRecipe.mEUt*/) - ? tRecipe - : null; - log("2) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); - //return mRecipeResult; - } - } - } - } - } - } - if (mRecipeResult == null && this.getRecipeMap().mMinimalInputItems == 0 && aFluids != null && aFluids.length > 0) { - for (final FluidStack aFluid2 : aFluids) { - if (aFluid2 != null) { - final Collection tRecipes = this.getRecipeMap().mRecipeFluidMap.get(aFluid2.getFluid()); - if (tRecipes != null) { - for (final GT_Recipe tRecipe : tRecipes) { - if (!tRecipe.mFakeRecipe - && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { - mRecipeResult = (tRecipe.mEnabled/* && aVoltage * this.getRecipeMap().mAmperage >= tRecipe.mEUt*/) - ? tRecipe - : null; - log("3) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); - //return mRecipeResult; - } - } - } - } - } - } - } - catch (Throwable t) { - log("Invalid recipe lookup."); - } - - - if (mRecipeResult == null) { - log("Invalid recipe, Fallback lookup. "+this.getRecipeMap().mRecipeList.size()+" | "+this.getRecipeMap().mNEIName); - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - try { - return (GT_Recipe) findRecipe08.invoke(getRecipeMap(), aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - return null; - } - } - else { - try { - return (GT_Recipe) findRecipe09.invoke(getRecipeMap(), aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, aSpecialSlot, aInputs); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - return null; - } - } - } - else { - return mRecipeResult; - } - - - - - } - - - - - /** - * Custom Tool Handling - */ - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { - // Do Things - if (this.getBaseMetaTileEntity().isServerSide()) { - //Logger.INFO("Right Clicked Controller."); - ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if (tCurrentItem != null) { - //Logger.INFO("Holding Item."); - if (tCurrentItem.getItem() instanceof GT_MetaGenerated_Tool) { - //Logger.INFO("Is GT_MetaGenerated_Tool."); - int[] aOreID = OreDictionary.getOreIDs(tCurrentItem); - for (int id : aOreID) { - // Plunger - if (OreDictionary.getOreName(id).equals("craftingToolPlunger")) { - //Logger.INFO("Is Plunger."); - return onPlungerRightClick(aPlayer, aSide, aX, aY, aZ); - } - } - } - } - } - //Do Super - boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - return aSuper; - } - - public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { - int aHatchIndex = 0; - PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatches.size()+" output hatches."); - for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { - if (hatch.mFluid != null) { - PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+"."); - hatch.mFluid = null; - } - aHatchIndex++; - } - return aHatchIndex > 0; - } - - @Override - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - boolean tSuper = super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); - if (aPlayer.isSneaking()) - return tSuper; - mVoidExcess = !mVoidExcess; - aPlayer.addChatMessage(new ChatComponentTranslation(mVoidExcess ? "interaction.voidexcess.enabled" : "interaction.voidexcess.disabled")); - return true; - } - - public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, - Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) { - boolean isHatch = false; - if (aBaseMetaTileEntity != null) { - - // Unsure why this check exists? - /*if (aCasingID < 64) { - aCasingID = TAE.GTPP_INDEX(aCasingID); - }*/ - - isHatch = this.addToMachineList(aBaseMetaTileEntity, aCasingID); - if (isHatch) { - return true; - } - else { - int aMetaTileID = aBaseMetaTileEntity.getMetaTileID(); - //Found a controller - if (aMetaTileID >= 750 && aMetaTileID < 1000 && aFoundBlock == GregTech_API.sBlockMachines) { - return true; - } - //Vanilla Hatches/Busses - else if (aMetaTileID >= 10 && aMetaTileID <= 99 && aFoundBlock == GregTech_API.sBlockMachines) { - return true; - } - //Adv Mufflers - else if (aMetaTileID >= 30001 && aMetaTileID <= 30009 && aFoundBlock == GregTech_API.sBlockMachines) { - return true; - } - //Control Core, Super IO - else if (aMetaTileID >= 30020 && aMetaTileID <= 30040 && aFoundBlock == GregTech_API.sBlockMachines) { - return true; - } - //Auto maint - else if (aMetaTileID == 111 && aFoundBlock == GregTech_API.sBlockMachines) { - return true; - } - //Data Ports - else if ((aMetaTileID == 131 || aMetaTileID == 132) && aFoundBlock == GregTech_API.sBlockMachines) { - return true; - } - else { - log("Found meta Tile: "+aMetaTileID); - } - } - } - if (!isHatch) { - if (aFoundBlock == aExpectedBlock && aFoundMeta == aExpectedMeta) { - return true; - } - else if (aFoundBlock != aExpectedBlock) { - if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { - log("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta); - //log("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString())); - } - return false; - } - else if (aFoundMeta != aExpectedMeta) { - log("A2"); - return false; - } - - } - log("A3"); - return false; - } - - @Override - public boolean depleteInput(final FluidStack aLiquid) { - if (aLiquid == null) { - return false; - } - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - tHatch.mRecipeMap = this.getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - FluidStack tLiquid = tHatch.getFluid(); - if (tLiquid == null || !tLiquid.isFluidEqual(aLiquid) || tLiquid.amount < aLiquid.amount) { - continue; - } - tLiquid = tHatch.drain(aLiquid.amount, false); - if (tLiquid != null && tLiquid.amount >= aLiquid.amount) { - tLiquid = tHatch.drain(aLiquid.amount, true); - return tLiquid != null && tLiquid.amount >= aLiquid.amount; - } - continue; - } - } - return false; - } - - @Override - public void onServerStart() { - super.onServerStart(); - tryTickWaitTimerDown(); - } - - @Override - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - super.onFirstTick(aBaseMetaTileEntity); - tryTickWaitTimerDown(); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - tryTickWaitTimerDown(); - } - - @Override - public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - super.onCreated(aStack, aWorld, aPlayer); - tryTickWaitTimerDown(); - } - - private final void tryTickWaitTimerDown() { - /*if (mStartUpCheck > 10) { - mStartUpCheck = 10; - }*/ - } - - //Only support to use meta to tier - public static IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheFuckingMeta, Function aGetTheFuckingMeta, int maxMeta) { - return addTieredBlock(aBlock, (t, i) -> { - aSetTheFuckingMeta.accept(t, i); - return true; - }, aGetTheFuckingMeta, 0, maxMeta - ); - } - - public static IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheFuckingMeta, Function aGetTheFuckingMeta, int minMeta, int maxMeta) { - return addTieredBlock(aBlock, (t, i) -> { - aSetTheFuckingMeta.accept(t, i); - return true; - }, aGetTheFuckingMeta, minMeta, maxMeta - ); - } - - public static IStructureElement addTieredBlock(Block aBlock, BiPredicate aSetTheFuckingMeta, Function aGetTheFuckingMeta, int minMeta, int maxMeta) { - - return new IStructureElement() { - @Override - public boolean check(T t, World world, int x, int y, int z) { - Block tBlock = world.getBlock(x, y, z); - if (aBlock == tBlock) { - Integer currentMeta = aGetTheFuckingMeta.apply(t); - int newMeta = tBlock.getDamageValue(world, x, y, z) + 1; - if (newMeta > maxMeta || newMeta < minMeta + 1) return false; - if (currentMeta == 0) { - return aSetTheFuckingMeta.test(t, newMeta); - } else { - return currentMeta == newMeta; - } - } - return false; - } - - @Override - public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { - StructureLibAPI.hintParticle(world, x, y, z, aBlock, getMeta(trigger)); - return true; - } - - @Override - public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { - return world.setBlock(x, y, z, aBlock, getMeta(trigger), 3); - } - - private int getMeta(ItemStack trigger) { - int meta = trigger.stackSize; - if (meta <= 0) meta = minMeta; - if (meta + minMeta >= maxMeta) meta = maxMeta - 1 - minMeta; - return meta + minMeta; - } - }; - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java deleted file mode 100644 index 21b0efff99..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java +++ /dev/null @@ -1,796 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; - -import static gregtech.api.enums.GT_Values.V; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.*; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public abstract class GregtechMeta_SteamMultiBase extends GregtechMeta_MultiBlockBase { - - public ArrayList mSteamInputs = new ArrayList(); - public ArrayList mSteamOutputs = new ArrayList(); - public ArrayList mSteamInputFluids = new ArrayList(); - - public GregtechMeta_SteamMultiBase(String aName) { - super(aName); - } - - public GregtechMeta_SteamMultiBase(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), aActive ? getFrontOverlayActive() : getFrontOverlay()}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; - } - - protected abstract GT_RenderedTexture getFrontOverlay(); - - protected abstract GT_RenderedTexture getFrontOverlayActive(); - - private int getCasingTextureIndex() { - return 10; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public boolean checkRecipe(ItemStack arg0) { - - - log("Running checkRecipeGeneric(0)"); - ArrayList tItems = getStoredInputs(); - ArrayList tFluids = getStoredFluids(); - GT_Recipe_Map tMap = this.getRecipeMap(); - if (tMap == null) { - return false; - } - ItemStack[] aItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] aFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[1], null, null, aItemInputs); - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - int aEUPercent = 100; - int aSpeedBonusPercent = 0; - int aOutputChanceRoll = 10000; - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - - log("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - - int aMaxParallelRecipes = canBufferOutputs(tRecipe.mOutputs, tRecipe.mFluidOutputs, this.getMaxParallelRecipes()); - if (aMaxParallelRecipes == 0) { - log("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+aMaxParallelRecipes); - log("tTotalEUt: "+tTotalEUt); - log("tRecipeEUt: "+tRecipeEUt); - - - - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (32 - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor * 1.5f); - - this.mEUt = (int)Math.ceil(tTotalEUt*1.33f); - - //this.mEUt = (3 * tRecipe.mEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = getOutputFluids(tRecipe, parallelRecipes); - - // Collect output item types - ItemStack[] tOutputItems = getOutputItems(tRecipe); - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("GOOD RETURN - 1"); - return true; - - } - - public ArrayList getAllSteamStacks(){ - ArrayList aFluids = new ArrayList(); - FluidStack aSteam = FluidUtils.getSteam(1); - for (FluidStack aFluid : this.getStoredFluids()) { - if (aFluid.isFluidEqual(aSteam)) { - aFluids.add(aFluid); - } - } - return aFluids; - } - - public int getTotalSteamStored() { - int aSteam = 0; - for (FluidStack aFluid : getAllSteamStacks()) { - aSteam += aFluid.amount; - } - return aSteam; - } - - public boolean tryConsumeSteam(int aAmount) { - if (getTotalSteamStored() <= 0) { - return false; - } - else { - return this.depleteInput(FluidUtils.getSteam(aAmount)); - } - } - - @Override - public int getMaxEfficiency(ItemStack arg0) { - return 0; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate == 1 || this.mStartUpCheck == 1) { - this.mSteamInputs.clear(); - this.mSteamOutputs.clear(); - this.mSteamInputFluids.clear(); - } - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - /** - * Called every tick the Machine runs - */ - public boolean onRunningTick(ItemStack aStack) { - fixAllMaintenanceIssue(); - if (mEUt < 0) { - long aSteamVal = (((long) -mEUt * 10000) / Math.max(1000, mEfficiency)); - //Logger.INFO("Trying to drain "+aSteamVal+" steam per tick."); - if (!tryConsumeSteam((int) aSteamVal)) { - stopMachine(); - return false; - } - } - return true; - } - - @Override - public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - - //Use this to determine the correct value, then update the hatch texture after. - boolean aDidAdd = false; - - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase) { - aDidAdd = addToMachineListInternal(mSteamInputFluids, aMetaTileEntity, aBaseCasingIndex); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput) { - ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap(); - aDidAdd = addToMachineListInternal(mSteamInputs, aMetaTileEntity, aBaseCasingIndex); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput) { - aDidAdd = addToMachineListInternal(mSteamOutputs, aMetaTileEntity, aBaseCasingIndex); - } - - return aDidAdd; - } - - - - - @Override - public void stopMachine() { - super.stopMachine(); - } - - public FluidStack[] getOutputFluids(GT_Recipe aRecipe, int parallelRecipes) { - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[aRecipe.mFluidOutputs.length]; - for (int h = 0; h < aRecipe.mFluidOutputs.length; h++) { - if (aRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = aRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - return tOutputFluids; - } - - public ItemStack[] getOutputItems(GT_Recipe aRecipe) { - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[aRecipe.mOutputs.length]; - for (int h = 0; h < aRecipe.mOutputs.length; h++) { - if (aRecipe.getOutput(h) != null) { - tOutputItems[h] = aRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - return tOutputItems; - } - - public int getOutputCount(ItemStack[] aOutputs) { - return aOutputs.length; - } - public int getOutputFluidCount(FluidStack[] aOutputs) { - return aOutputs.length; - } - - public int canBufferOutputs(final ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aParallelRecipes) { - - log("Determining if we have space to buffer outputs. Parallel: "+aParallelRecipes); - - // Null recipe or a recipe with lots of outputs? - // E.G. Gendustry custom comb with a billion centrifuge outputs? - // Do it anyway, provided the multi allows it. Default behaviour is aAllow16SlotWithoutCheck = true. - if (aOutputs == null && aFluidOutputs == null) { - return 0; - } - - // Do we even need to check for item outputs? - boolean aDoesOutputItems = aOutputs != null ? aOutputs.length > 0 : false; - // Do we even need to check for fluid outputs? - boolean aDoesOutputFluids = aFluidOutputs != null ? aFluidOutputs.length > 0 : false; - - if (!aDoesOutputItems && !aDoesOutputFluids) { - return 0; - } - - /* ======================================== - * Item Management - * ======================================== - */ - - if (aDoesOutputItems) { - log("We have items to output."); - - // How many slots are free across all the output buses? - int aInputBusSlotsFree = 0; - - /* - * Create Variables for Item Output - */ - - AutoMap> aItemMap = new AutoMap>(); - AutoMap aItemOutputs = new AutoMap(aOutputs); - - for (final GT_MetaTileEntity_Hatch_Steam_BusOutput tBus : this.mSteamOutputs) { - if (!isValidMetaTileEntity(tBus)) { - continue; - } - final IInventory tBusInv = tBus.getBaseMetaTileEntity(); - for (int i = 0; i < tBusInv.getSizeInventory(); i++) { - if (tBus.getStackInSlot(i) == null) { - aInputBusSlotsFree++; - } - else { - ItemStack aT = tBus.getStackInSlot(i); - int aSize = aT.stackSize; - aT = aT.copy(); - aT.stackSize = 0; - aItemMap.put(new FlexiblePair(aT, aSize)); - } - } - } - - // Count the slots we need, later we can check if any are able to merge with existing stacks - int aRecipeSlotsRequired = 0; - - // A map to hold the items we will be 'inputting' into the output buses. These itemstacks are actually the recipe outputs. - ConcurrentSet> aInputMap = new ConcurrentHashSet>(); - - // Iterate over the outputs, calculating require stack spacing they will require. - for (int i=0;i 64) { - int aSlotsNeedsForThisStack = (int) Math.ceil((double) ((float) aStackSize / 64f)); - // Should round up and add as many stacks as required nicely. - aRecipeSlotsRequired += aSlotsNeedsForThisStack; - for (int o=0;o 64 ? 64 : aStackSize; - aY = aY.copy(); - aY.stackSize = 0; - aInputMap.add(new FlexiblePair(aY, aStackToRemove)); - } - } - else { - // Only requires one slot - aRecipeSlotsRequired++; - aY = aY.copy(); - aY.stackSize = 0; - aInputMap.add(new FlexiblePair(aY, aStackSize)); - } - } - } - - // We have items to add to the output buses. See if any are not full stacks and see if we can make them full. - if (aInputMap.size() > 0) { - // Iterate over the current stored items in the Output busses, if any match and are not full, we can try account for merging. - busItems: for (FlexiblePair y : aItemMap) { - // Iterate over the 'inputs', we can safely remove these as we go. - outputItems: for (FlexiblePair u : aInputMap) { - // Create local vars for readability. - ItemStack aOutputBusStack = y.getKey(); - ItemStack aOutputStack = u.getKey(); - // Stacks match, including NBT. - if (GT_Utility.areStacksEqual(aOutputBusStack, aOutputStack, false)) { - // Stack Matches, but it's full, continue. - if (aOutputBusStack.stackSize >= 64) { - // This stack is full, no point checking it. - continue busItems; - } - else { - // We can merge these two stacks without any hassle. - if ((aOutputBusStack.stackSize + aOutputStack.stackSize) <= 64) { - // Update the stack size in the bus storage map. - y.setValue(aOutputBusStack.stackSize + aOutputStack.stackSize); - // Remove the 'input' stack from the recipe outputs, so we don't try count it again. - aInputMap.remove(u); - continue outputItems; - } - // Stack merging is too much, so we fill this stack, leave the remainder. - else { - int aRemainder = (aOutputBusStack.stackSize + aOutputStack.stackSize) - 64; - // Update the stack size in the bus storage map. - y.setValue(64); - // Create a new object to iterate over later, with the remainder data; - FlexiblePair t = new FlexiblePair(u.getKey(), aRemainder); - // Remove the 'input' stack from the recipe outputs, so we don't try count it again. - aInputMap.remove(u); - // Add the remainder stack. - aInputMap.add(t); - continue outputItems; - } - } - } - else { - continue outputItems; - } - } - } - } - - // We have stacks that did not merge, do we have space for them? - if (aInputMap.size() > 0) { - if (aInputMap.size() > aInputBusSlotsFree) { - aParallelRecipes = (int) Math.floor((double) aInputBusSlotsFree/aInputMap.size() * aParallelRecipes); - // We do not have enough free slots in total to accommodate the remaining managed stacks. - log(" Free: "+aInputBusSlotsFree+", Required: "+aInputMap.size()); - if(aParallelRecipes == 0) { - log("Failed to find enough space for all item outputs."); - return 0; - } - - } - } - - /* - * End Item Management - */ - - } - - - - - - /* ======================================== - * Fluid Management - * ======================================== - */ - - - - if (aDoesOutputFluids) { - log("We have Fluids to output."); - // How many slots are free across all the output buses? - int aFluidHatches = 0; - int aEmptyFluidHatches = 0; - int aFullFluidHatches = 0; - // Create Map for Fluid Output - ArrayList> aOutputHatches = new ArrayList>(); - for (final GT_MetaTileEntity_Hatch_Output tBus : this.mOutputHatches) { - if (!isValidMetaTileEntity(tBus)) { - continue; - } - aFluidHatches++; - // Map the Hatch with the space left for easy checking later. - if (tBus.getFluid() == null) { - aOutputHatches.add(new Triplet(tBus, null, tBus.getCapacity())); - } - else { - int aSpaceLeft = tBus.getCapacity() - tBus.getFluidAmount(); - aOutputHatches.add(new Triplet(tBus, tBus.getFluid(), aSpaceLeft)); - } - } - // Create a map of all the fluids we would like to output, we can iterate over this and see how many we can merge into existing hatch stacks. - ArrayList aOutputFluids = new ArrayList(); - // Ugly ass boxing - aOutputFluids.addAll(new AutoMap(aFluidOutputs)); - // Iterate the Hatches, updating their 'stored' data. - //for (Triplet aHatchData : aOutputHatches) { - for (int i = 0;i aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); - //aOutputHatches.add(aNewHatchData); - break; - } - // We can fill this hatch perfectly (rare case), may as well add it directly to the full list. - else if (aSpaceLeftInHatch == aFluidToPutIntoHatch) { - // Copy Old Stack - FluidStack aNewHatchStack = aHatchStack.copy(); - // Add in amount from output stack - aNewHatchStack.amount += aFluidToPutIntoHatch; - // Remove fluid from output list, merge success - aOutputFluids.remove(aOutputFluids.get(j)); - j--; - // Remove hatch from hatch list, data is now invalid. - aOutputHatches.remove(aOutputHatches.get(i)); - i--; - // Re-add hatch to hatch list, with new data. - Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); - aOutputHatches.add(aNewHatchData); - break; - } - // We have more space than we need to merge, so we remove the stack from the output list and update the hatch list. - else { - // Copy Old Stack - FluidStack aNewHatchStack = aHatchStack.copy(); - // Add in amount from output stack - aNewHatchStack.amount += aFluidToPutIntoHatch; - // Remove fluid from output list, merge success - aOutputFluids.remove(aOutputFluids.get(j)); - j--; - // Remove hatch from hatch list, data is now invalid. - aOutputHatches.remove(aOutputHatches.get(i)); - i--; - // Re-add hatch to hatch list, with new data. - Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); - aOutputHatches.add(aNewHatchData); - // Check next fluid - continue; - } - - } - else { - continue; - } - } - } - } - - for (Triplet aFreeHatchCheck : aOutputHatches) { - // Free Hatch - if (aFreeHatchCheck.getValue_2() == null || aFreeHatchCheck.getValue_3() == 0 || aFreeHatchCheck.getValue_1().getFluid() == null) { - aEmptyFluidHatches++; - } - } - - // We have Fluid Stacks we did not merge. Do we have space? - log("fluids to output "+aOutputFluids.size()+" empty hatches "+aEmptyFluidHatches); - if (aOutputFluids.size() > 0) { - // Not enough space to add fluids. - if (aOutputFluids.size() > aEmptyFluidHatches) { - aParallelRecipes = (int) Math.floor((double) aEmptyFluidHatches/aOutputFluids.size() * aParallelRecipes); - log("Failed to find enough space for all fluid outputs. Free: "+aEmptyFluidHatches+", Required: "+aOutputFluids.size()); - return 0; - - } - } - - /* - * End Fluid Management - */ - } - - return aParallelRecipes; - } - - - /* - * Handle I/O with custom hatches - */ - - @Override - public boolean depleteInput(FluidStack aLiquid) { - if (aLiquid == null) return false; - for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - FluidStack tLiquid = tHatch.getFluid(); - if (tLiquid != null && tLiquid.isFluidEqual(aLiquid)) { - tLiquid = tHatch.drain(aLiquid.amount, false); - if (tLiquid != null && tLiquid.amount >= aLiquid.amount) { - tLiquid = tHatch.drain(aLiquid.amount, true); - return tLiquid != null && tLiquid.amount >= aLiquid.amount; - } - } - } - } - return false; - } - - @Override - public boolean depleteInput(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return false; - FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); - if (aLiquid != null) return depleteInput(aLiquid); - for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { - tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); - return true; - } - } - } - } - for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : mSteamInputs) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { - tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); - return true; - } - } - } - } - } - return false; - } - - @Override - public ArrayList getStoredFluids() { - ArrayList rList = new ArrayList(); - for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { - rList.add(tHatch.getFillableStack()); - } - } - return rList; - } - - @Override - public ArrayList getStoredInputs() { - ArrayList rList = new ArrayList(); - for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : mSteamInputs) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - } - return rList; - } - - @Override - public boolean addOutput(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return false; - aStack = GT_Utility.copy(aStack); - boolean outputSuccess = true; - while (outputSuccess && aStack.stackSize > 0) { - outputSuccess = false; - ItemStack single = aStack.splitStack(1); - for (GT_MetaTileEntity_Hatch_Steam_BusOutput tHatch : mSteamOutputs) { - if (!outputSuccess && isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getSizeInventory() - 1; i >= 0 && !outputSuccess; i--) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, single)) outputSuccess = true; - } - } - } - for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - if (!outputSuccess && isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, single)) outputSuccess = true; - } - } - } - return outputSuccess; - } - - @Override - public ArrayList getStoredOutputs() { - ArrayList rList = new ArrayList(); - for (GT_MetaTileEntity_Hatch_Steam_BusOutput tHatch : mSteamOutputs) { - if (isValidMetaTileEntity(tHatch)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - return rList; - } - - @Override - public void updateSlots() { - for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) - if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots(); - for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : mSteamInputs) - if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots(); - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java deleted file mode 100644 index 287d2105ac..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java +++ /dev/null @@ -1,428 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.Collection; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; -import net.minecraftforge.fluids.FluidStack; - -public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_DeluxeTank { - - private boolean useFuel = false; - - public GregtechDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, 4, aDescription, aTextures); - } - - public GregtechDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, 4, aDescription, aTextures); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, "Fuel Efficiency: " + this.getEfficiency() + "%"}; - } - - - /* @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - }*/ - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()){ - Logger.WARNING("Entity is Client side, simply returning true"); - return true; - } - Logger.WARNING("Entity is not Client side, opening entity Container and by extension, it's GUI, then returning true"); - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getFrontActive(final byte aColor) { - return this.getFront(aColor); - } - - public ITexture[] getBackActive(final byte aColor) { - return this.getBack(aColor); - } - - public ITexture[] getBottomActive(final byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(final byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(final byte aColor) { - return this.getSides(aColor); - } - - @Override - public boolean isFacingValid(final byte aSide) { - return aSide > 1; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex < 2; - } - - @Override - public boolean isEnetOutput() { - return true; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return true; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public long maxEUOutput() { - return this.getBaseMetaTileEntity().isAllowedToWork() ? V[this.mTier] : 0; - } - - @Override - public long maxEUStore() { - return Math.max(this.getEUVar(), (V[this.mTier] * 115) + this.getMinimumStoredEU()); - } - - @Override - public boolean doesFillContainers() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - @Override - public boolean doesEmptyContainers() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - @Override - public boolean canTankBeFilled() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - @Override - public boolean canTankBeEmptied() { - return this.getBaseMetaTileEntity().isAllowedToWork(); - } - - @Override - public boolean displaysItemStack() { - return true; - } - - @Override - public boolean displaysStackSize() { - return false; - } - - @Override - public boolean isFluidInputAllowed(final FluidStack aFluid) { - return this.getFuelValue(aFluid) > 0; - } - - @Override - public long getMinimumStoredEU() { - return 512; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && ((aTick % 10) == 0)) { - if (this.mFluid == null) { - if (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + this.getMinimumStoredEU())) { - this.mInventory[this.getStackDisplaySlot()] = null; - } else { - if (this.mInventory[this.getStackDisplaySlot()] == null) { - this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); - } - this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); - } - } else { - if ((this.mFluid != null) && (this.mFluid2 != null)){ - final int tFuelValue = this.getFuelValue(this.mFluid), tConsumed = this.consumedFluidPerOperation(this.mFluid); - final int tFuelValue2 = this.getFuelValue(this.mFluid2), tConsumed2 = this.consumedFluidPerOperation(this.mFluid2); - if (((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount > tConsumed))/* && (tFuelValue2 > 0 && tConsumed2 > 0 && mFluid2.amount > tConsumed2)*/) { - - Logger.WARNING("tFuelValue: "+tFuelValue); - Logger.WARNING("tConsumed: "+tConsumed); - Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); - Logger.WARNING("mFluid.amount: "+this.mFluid.amount); - Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); - - Logger.WARNING("========================================================="); - - Logger.WARNING("tFuelValue2: "+tFuelValue2); - Logger.WARNING("tConsumed2: "+tConsumed2); - Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); - Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount); - Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); - long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); - long tFluidAmountToUse2 = Math.min(this.mFluid2.amount / tConsumed2, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2); - - if (tFluidAmountToUse <= 0){ - /*if ((mFluid.amount / tConsumed) == getCapacity()){ - tFluidAmountToUse = 1; - }*/ - - if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){ - tFluidAmountToUse = 1; - Logger.WARNING("========================================================="); - Logger.WARNING("tFluidAmountToUse - Updated: "+tFluidAmountToUse); - Logger.WARNING("========================================================="); - } - } - - if (tFluidAmountToUse2 <= 0){ - /*if ((mFluid2.amount / tConsumed) == getCapacity()){ - tFluidAmountToUse2 = 1; - }*/ - if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){ - tFluidAmountToUse2 = 1; - Logger.WARNING("========================================================="); - Logger.WARNING("tFluidAmountToUse2 - Updated: "+tFluidAmountToUse2); - Logger.WARNING("========================================================="); - } - } - - Logger.WARNING("========================================================="); - Logger.WARNING("tFluidAmountToUse: "+tFluidAmountToUse); - Logger.WARNING("========================================================="); - - /*Utils.LOG_WARNING("mFluid.amount / tConsumed: "+("fluidAmount:"+mFluid.amount)+(" tConsumed:"+tConsumed)+" | "+(mFluid.amount / tConsumed)); - Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU())); - Utils.LOG_WARNING("maxEUOutput(): "+maxEUOutput()); - Utils.LOG_WARNING("maxEUOutput() * 20: "+(maxEUOutput() * 30)); - Utils.LOG_WARNING("getMinimumStoredEU(): "+(getMinimumStoredEU())); - Utils.LOG_WARNING("aBaseMetaTileEntity.getUniversalEnergyStored(): "+(aBaseMetaTileEntity.getUniversalEnergyStored())); - Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()))); - Utils.LOG_WARNING("tFuelValue: "+(tFuelValue)); - Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue)); - */ - - Logger.WARNING("========================================================="); - Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); - Logger.WARNING("========================================================="); - - /*Utils.LOG_WARNING("mFluid2.amount / tConsumed2: "+("fluidAmount2:"+mFluid2.amount)+(" tConsumed2:"+tConsumed2)+" | "+(mFluid2.amount / tConsumed2)); - Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU())); - Utils.LOG_WARNING("maxEUOutput(): "+maxEUOutput()); - Utils.LOG_WARNING("maxEUOutput() * 20: "+(maxEUOutput() * 30)); - Utils.LOG_WARNING("getMinimumStoredEU(): "+(getMinimumStoredEU())); - Utils.LOG_WARNING("aBaseMetaTileEntity.getUniversalEnergyStored(): "+(aBaseMetaTileEntity.getUniversalEnergyStored())); - Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()))); - Utils.LOG_WARNING("tFuelValue2: "+(tFuelValue2)); - Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2)); - */ - if (((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) && ((tFluidAmountToUse2 > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse2 * tFuelValue2, true))){ - - Logger.WARNING("tFuelValue: "+tFuelValue); - Logger.WARNING("tConsumed: "+tConsumed); - Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); - Logger.WARNING("mFluid.amount: "+this.mFluid.amount); - Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); - - Logger.WARNING("========================================================="); - - Logger.WARNING("tFuelValue2: "+tFuelValue2); - Logger.WARNING("tConsumed2: "+tConsumed2); - Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); - Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount); - Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); - - if (this.useFuel){ - this.mFluid.amount -= tFluidAmountToUse * tConsumed; - this.mFluid2.amount -= tFluidAmountToUse2 * tConsumed2; - this.useFuel = false; - } - else { - this.useFuel = true; - } - - } - else { - Logger.WARNING("========================================================="); - Logger.WARNING("Either tFluidAmountToUse1 <= 0, power cannot be increased of tFluidAmountToUse2 <= 0"); - Logger.WARNING("tFluidAmountToUse1: "+tFluidAmountToUse); - Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); - } - } - else { - /*Utils.LOG_WARNING("(tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) && (tFuelValue2 > 0 && tConsumed2 > 0 && mFluid2.amount > tConsumed2)"); - Utils.LOG_WARNING("tFuelValue: "+tFuelValue); - Utils.LOG_WARNING("tConsumed: "+tConsumed); - Utils.LOG_WARNING("mFluid.amount: "+mFluid.amount); - Utils.LOG_WARNING("mFluid.amount > tConsumed: "+(mFluid.amount > tConsumed)); - - Utils.LOG_WARNING("========================================================="); - - Utils.LOG_WARNING("tFuelValue2: "+tFuelValue2); - Utils.LOG_WARNING("tConsumed2: "+tConsumed2); - Utils.LOG_WARNING("mFluid2.amount: "+mFluid2.amount); - Utils.LOG_WARNING("mFluid2.amount > tConsumed2: "+(mFluid2.amount > tConsumed2)); */ - } - } - else { - Logger.WARNING("One mFluid is null"); - if (this.mFluid != null) { - Logger.WARNING("mFluid1 is not null"); - } - if (this.mFluid2 != null) { - Logger.WARNING("mFluid2 is not null"); - } - } - } - if ((this.mInventory[this.getInputSlot()] != null) && (aBaseMetaTileEntity.getUniversalEnergyStored() < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())) && (GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null)) { - final int tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); - if (tFuelValue > 0) { - final ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - } - } - } - } - - if (aBaseMetaTileEntity.isServerSide()) { - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); - } - } - - public abstract GT_Recipe_Map getRecipes(); - - public abstract int getEfficiency(); - - public int consumedFluidPerOperation(final FluidStack aLiquid) { - return 1; - } - - public int getFuelValue(final FluidStack aLiquid) { - if ((aLiquid == null) || (this.getRecipes() == null)) { - return 0; - } - FluidStack tLiquid; - final Collection tRecipeList = this.getRecipes().mRecipeList; - if (tRecipeList != null) { - for (final GT_Recipe tFuel : tRecipeList) { - if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null) { - if (aLiquid.isFluidEqual(tLiquid)) { - return (int) (((long) tFuel.mSpecialValue * this.getEfficiency() * this.consumedFluidPerOperation(tLiquid)) / 100); - } - } - } - } - return 0; - } - - public int getFuelValue(final ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { - return 0; - } - final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); - if (tFuel != null) { - return (int) ((tFuel.mSpecialValue * 1000L * this.getEfficiency()) / 100); - } - return 0; - } - - public ItemStack getEmptyContainer(final ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { - return null; - } - final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); - if (tFuel != null) { - return GT_Utility.copy(tFuel.getOutput(0)); - } - return GT_Utility.getContainerItem(aStack, true); - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && ((this.getFuelValue(aStack) > 0) || (this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0)); - } - - @Override - public int getCapacity() { - return 32000; - } - - @Override - public int getTankPressure() { - return -100; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java deleted file mode 100644 index 99ad81a4a9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java +++ /dev/null @@ -1,382 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; - -public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank -{ - public int mTemperature = 20; - public int mProcessingEnergy = 0; - public int mLossTimer = 0; - public FluidStack mSteam = null; - public boolean mHadNoWater = false; - public long RI = MathUtils.randLong(5L, 30L); - - public GregtechMetaBoilerBase(final int aID, final String aName, final String aNameRegional, final String aDescription, final ITexture... aTextures) - { - super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); - } - - public GregtechMetaBoilerBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) - { - super(aName, aTier, 4, aDescription, aTextures); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) - { - ITexture[] tmp = this.mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte)(aActive ? 4 : 3)) : aSide][aColorIndex + 1]; - //mTextures[(aSide==aFacing?(aActive?4:3):aSide==GT_Utility.getOppositeSide(aFacing)?2:aSide==0?0:aSide==1?1:2)][aColorIndex+1]; - if((aSide!=aFacing)&&(tmp.length==2)){ - tmp = new ITexture[]{tmp[0]}; - } - return tmp; - } - - @Override - public boolean isElectric() - { - return false; - } - - @Override - public boolean isPneumatic() - { - return false; - } - - @Override - public boolean isSteampowered() - { - return false; - } - - @Override - public boolean isSimpleMachine() - { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) - { - return aFacing > 1; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) - { - return true; - } - - @Override - public boolean isValidSlot(final int aIndex) - { - return true; - } - - @Override - public int getProgresstime() - { - return this.mTemperature; - } - - @Override - public int maxProgresstime() - { - return 500; - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) - { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - if (aPlayer != null) { - if (GT_Utility.areStacksEqual(aPlayer.getCurrentEquippedItem(), new ItemStack(Items.water_bucket, 1))) - { - this.fill(Materials.Water.getFluid(1000 * aPlayer.getCurrentEquippedItem().stackSize), true); - aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket); - } - else - { - aBaseMetaTileEntity.openGUI(aPlayer); - } - } - return true; - } - - @Override - public boolean doesFillContainers() - { - return true; - } - - @Override - public boolean doesEmptyContainers() - { - return true; - } - - @Override - public boolean canTankBeFilled() - { - return true; - } - - @Override - public boolean canTankBeEmptied() - { - return true; - } - - @Override - public boolean displaysItemStack() - { - return false; - } - - @Override - public boolean displaysStackSize() - { - return false; - } - - @Override - public boolean isFluidInputAllowed(final FluidStack aFluid) - { - return GT_ModHandler.isWater(aFluid); - } - - @Override - public FluidStack getDrainableStack() - { - return this.mSteam; - } - - @Override - public FluidStack setDrainableStack(final FluidStack aFluid) - { - this.mSteam = aFluid; - return this.mSteam; - } - - @Override - public boolean isDrainableStackSeparate() { - return true; - } - - @Override - public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCover) - { - return GregTech_API.getCoverBehavior(aCover.toStack()).isSimpleCover(); - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) - { - super.saveNBTData(aNBT); - aNBT.setInteger("mLossTimer", this.mLossTimer); - aNBT.setInteger("mTemperature", this.mTemperature); - aNBT.setInteger("mProcessingEnergy", this.mProcessingEnergy); - if (this.mSteam != null) { - try - { - aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound())); - } - catch (final Throwable e) {} - } - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) - { - super.loadNBTData(aNBT); - this.mLossTimer = aNBT.getInteger("mLossTimer"); - this.mTemperature = aNBT.getInteger("mTemperature"); - this.mProcessingEnergy = aNBT.getInteger("mProcessingEnergy"); - this.mSteam = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mSteam")); - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) - { - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) - { - if (this.mTemperature <= 20) - { - this.mTemperature = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 40) - { - this.mTemperature -= 1; - this.mLossTimer = 0; - } - for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) { - if (i != aBaseMetaTileEntity.getFrontFacing()) - { - final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) - { - final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) - { - final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - } - if ((aTick % 10L) == 0L) { - if (this.mTemperature > 100) - { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) - { - this.mHadNoWater = true; - } - else - { - if (this.mHadNoWater) - { - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= 1; - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(150L); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += 150; - } else { - this.mSteam = GT_ModHandler.getSteam(150L); - } - } - } - else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > getSteamCapacity())) - { - this.sendSound((byte)1); - this.mSteam.amount = getSteamCapacity() * 3 / 4; - } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && - (this.mInventory[2] != null)) { - if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal)))) - { - this.mProcessingEnergy += 160; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } - } - else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) - { - this.mProcessingEnergy += 160; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); - } - } - else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke")) - { - this.mProcessingEnergy += 640; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(2) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); - } - } - else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) - { - this.mProcessingEnergy += 40; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(8) == 0) { - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } - } - } - if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) - { - this.mProcessingEnergy -= 2; - this.mTemperature += 1; - } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); - } - } - - @Override - // Since this type of machine can have different water and steam capacities, we need to override getTankInfo() to - // support returning those different capacities. - public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - return new FluidTankInfo[]{ - new FluidTankInfo(this.mFluid, getCapacity()), - new FluidTankInfo(this.mSteam, getSteamCapacity()) - }; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) - { - return (aIndex == 1) || (aIndex == 3); - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) - { - return aIndex == 2; - } - - @Override - public void doSound(final byte aIndex, final double aX, final double aY, final double aZ) - { - if (aIndex == 1) - { - GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(4)), 2, 1.0F, aX, aY, aZ); - for (int l = 0; l < 8; l++) { - this.getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", (aX - 0.5D) + Math.random(), aY, (aZ - 0.5D) + Math.random(), 0.0D, 0.0D, 0.0D); - } - } - } - - @Override - public int getCapacity() - { - return 16000; - } - - // This type of machine can have different water and steam capacities. - public int getSteamCapacity() - { - return 32000; - } - - @Override - public int getTankPressure() - { - return 100; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java deleted file mode 100644 index e692530963..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java +++ /dev/null @@ -1,215 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; - -import static gregtech.api.enums.GT_Values.V; - -import net.minecraft.entity.player.EntityPlayer; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.util.GT_Utility; - -public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_BasicTank { - - public int mEfficiency; - public int mProcessingEnergy = 0; - public int mSolarCharge = 20; - public int mLossTimer = 0; - public static int sEnergyPerTick = 16; - - public GregtechMetaSolarGenerator(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); - } - - public GregtechMetaSolarGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, "Efficiency: " + this.getEfficiency() + "%"}; - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getFrontActive(final byte aColor) { - return this.getFront(aColor); - } - - public ITexture[] getBackActive(final byte aColor) { - return this.getBack(aColor); - } - - public ITexture[] getBottomActive(final byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(final byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(final byte aColor) { - return this.getSides(aColor); - } - - @Override - public boolean isFacingValid(final byte aSide) { - return aSide > 1; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex < 2; - } - - @Override - public boolean isEnetOutput() { - return true; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return true; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public long maxEUOutput() { - return this.getBaseMetaTileEntity().isAllowedToWork() ? V[this.mTier] : 0; - } - - @Override - public long maxEUStore() { - return Math.max(this.getEUVar(), (V[this.mTier] * 40) + this.getMinimumStoredEU()); - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick > 20L) - && (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) { - - if (this.mSolarCharge <= 20) { - this.mSolarCharge = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 45) { - this.mSolarCharge -= 1; - this.mLossTimer = 0; - } - - if ((aTick % 25L) == 0L) { - if (this.mSolarCharge > 100) { - if ((this.mProcessingEnergy > 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering() && (aBaseMetaTileEntity.getUniversalEnergyStored() < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())))) { - this.getBaseMetaTileEntity().increaseStoredEnergyUnits((sEnergyPerTick * this.getEfficiency()) / 10, false); - } - } - } - - if ((this.mSolarCharge < 500) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) { - this.mProcessingEnergy -= 1; - this.mSolarCharge += 1; - } - - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { - final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); - this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; - } - - if (aBaseMetaTileEntity.isServerSide()){ - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); - } - } - } - - public abstract int getEfficiency(); - - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean canTankBeFilled() { - return false; - } - - @Override - public boolean canTankBeEmptied() { - return false; - } - - @Override - public boolean displaysItemStack() { - return false; - } - - @Override - public boolean displaysStackSize() { - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java deleted file mode 100644 index f9105dceb1..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java +++ /dev/null @@ -1,372 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.Collection; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_BasicTank { - - private boolean useFuel = false; - protected int pollMin, pollMax; - - public GregtechRocketFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) { - super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); - int pollMin = (int)(CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); - int pollMax = (int)(CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); - } - - public GregtechRocketFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - int pollMin = (int)(CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); - int pollMax = (int)(CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - @Override - public String[] getDescription() { - String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second"; - return new String[]{ - this.mDescription, - "Fuel Efficiency: " + this.getEfficiency() + "%", - aPollution, - CORE.GT_Tooltip}; - } - - - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; - } - - public ITexture[] getFrontActive(final byte aColor) { - return this.getFront(aColor); - } - - public ITexture[] getBackActive(final byte aColor) { - return this.getBack(aColor); - } - - public ITexture[] getBottomActive(final byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(final byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(final byte aColor) { - return this.getSides(aColor); - } - - @Override - public boolean isFacingValid(final byte aSide) { - return aSide > 1; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex < 2; - } - - @Override - public boolean isEnetOutput() { - return true; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return this.getBaseMetaTileEntity().getFrontFacing() == aSide; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public long maxEUOutput() { - return V[this.mTier]; - } - - @Override - public long maxEUStore() { - return Math.max(this.getEUVar(), (V[this.mTier] * 500) + this.getMinimumStoredEU()); - } - - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public boolean doesEmptyContainers() { - return true; - } - - @Override - public boolean canTankBeFilled() { - return true; - } - - @Override - public boolean canTankBeEmptied() { - return false; - } - - @Override - public boolean displaysItemStack() { - return true; - } - - @Override - public boolean displaysStackSize() { - return false; - } - - @Override - public boolean isFluidInputAllowed(final FluidStack aFluid) { - return this.getFuelValue(aFluid) > 0; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - - - //super.onPostTick(aBaseMetaTileEntity, aTick); - - /*if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) { - int tFuelValue; - if (this.mFluid == null) { - if (aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() + this.getMinimumStoredEU()) { - this.mInventory[this.getStackDisplaySlot()] = null; - } else { - if (this.mInventory[this.getStackDisplaySlot()] == null) { - this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); - } - - this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " - + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); - } - } else { - tFuelValue = this.getFuelValue(this.mFluid); - int tConsumed = this.consumedFluidPerOperation(this.mFluid); - if (tFuelValue > 0 && tConsumed > 0 && this.mFluid.amount > tConsumed) { - long tFluidAmountToUse = Math.min((long) (this.mFluid.amount / tConsumed), - (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); - if (tFluidAmountToUse > 0L && aBaseMetaTileEntity - .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); - this.mFluid.amount = (int) ((long) this.mFluid.amount - tFluidAmountToUse * (long) tConsumed); - } - } - } - - if (this.mInventory[this.getInputSlot()] != null - && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L - + this.getMinimumStoredEU() - && GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null) { - tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); - if (tFuelValue > 0) { - ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); - } - } - } - } - - if (aBaseMetaTileEntity.isServerSide()) { - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity - .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU()); - }*/ - - - - - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && ((aTick % 10) == 0)) { - if (this.mFluid == null) { - if (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + this.getMinimumStoredEU())) { - this.mInventory[this.getStackDisplaySlot()] = null; - } else { - if (this.mInventory[this.getStackDisplaySlot()] == null) { - this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); - } - this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); - } - } else { - final int tFuelValue = this.getFuelValue(this.mFluid), tConsumed = this.consumedFluidPerOperation(this.mFluid); - if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount >= tConsumed)) { - final long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 20) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); - if ((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){ - int aSafeFloor = (int) Math.max(((tFluidAmountToUse * tConsumed)/3), 1); - this.mFluid.amount -= (int) aSafeFloor; - PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution()); - } - } - } - if ((this.mInventory[this.getInputSlot()] != null) && (aBaseMetaTileEntity.getUniversalEnergyStored() < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())) && (GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null)) { - final int tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); - if (tFuelValue > 0) { - final ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); - if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); - aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); - PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution()); - } - } - } - } - - if (aBaseMetaTileEntity.isServerSide()) { - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); - } - } - - public int getPollution() { - return MathUtils.randInt(pollMin, pollMax); - } - - public abstract GT_Recipe_Map getRecipes(); - - public abstract int getEfficiency(); - - public int consumedFluidPerOperation(final FluidStack aLiquid) { - return 1; - } - - public int getFuelValue(final FluidStack aLiquid) { - if ((aLiquid == null) || (this.getRecipes() == null)) { - return 0; - } - FluidStack tLiquid; - final Collection tRecipeList = this.getRecipes().mRecipeList; - if (tRecipeList != null) { - //Logger.INFO("Step A"); - for (final GT_Recipe tFuel : tRecipeList) { - //Logger.INFO("Step B"); - if ((tLiquid = tFuel.mFluidInputs[0]) != null) { - //Logger.INFO("Step C"); - if (aLiquid.isFluidEqual(tLiquid)) { - //Logger.INFO("Found some fuel?"); - int aperOp = this.consumedFluidPerOperation(tLiquid); - int aConsume = (int) (((long) tFuel.mSpecialValue * this.getEfficiency() * aperOp) / 100); - //Logger.INFO("Fuel Value: "+tFuel.mSpecialValue); - //Logger.INFO("Efficiency: "+getEfficiency()); - //Logger.INFO("Consumed per op: "+aperOp); - //Logger.INFO("Consuming "+aConsume); - return aConsume; - } - } - } - } - //Logger.INFO("No Fuel Value | Valid? "+(aLiquid != null)); - return 0; - } - - public int getFuelValue(final ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { - return 0; - } - final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); - if (tFuel != null) { - return (int) ((tFuel.mSpecialValue * 1000L * this.getEfficiency()) / 100); - } - return 0; - } - - public ItemStack getEmptyContainer(final ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { - return null; - } - final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); - if (tFuel != null) { - return GT_Utility.copy(tFuel.getOutput(0)); - } - return GT_Utility.getContainerItem(aStack, true); - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && ((this.getFuelValue(aStack) > 0) || (this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0)); - } - - @Override - public int getCapacity() { - return 32000; - } - - @Override - public int getTankPressure() { - return -100; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java deleted file mode 100644 index 34b3e86c70..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java +++ /dev/null @@ -1,291 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.player.PlayerCache; - -public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_TieredMachineBlock { - public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bUnbreakable = false; - public int mSuccess = 0, mTargetStackSize = 0; - public UUID ownerUUID; - //UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); - private boolean value_last = false, value_current = false; - - public GregtechMetaSafeBlockBase(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); - } - - public GregtechMetaSafeBlockBase(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[6][17][]; - final ITexture tIcon = this.getOverlayIcon(), tOut = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_QCHEST), tUp = new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT); - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tUp, tIcon}; //Back - rTextures[1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Right, Strangely The top side as well when facing East? - rTextures[2][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Top And Bottom, When Facing South (What the hell?) - rTextures[3][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Left, Top if facing West and Bottom if facing east? - rTextures[4][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Top and Bottom when Facing North.. - rTextures[5][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tOut}; // Front - } - return rTextures; - - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return this.mTextures[5][aColorIndex + 1]; - } - if (GT_Utility.getOppositeSide(aSide) == aFacing) { - return this.mTextures[0][aColorIndex + 1]; - } - switch (aFacing) { - case 0: - return this.mTextures[4][aColorIndex + 1]; - case 1: - return this.mTextures[2][aColorIndex + 1]; - case 2: - switch (aSide) { - case 0: - return this.mTextures[2][aColorIndex + 1]; - case 1: - return this.mTextures[2][aColorIndex + 1]; - case 4: - return this.mTextures[1][aColorIndex + 1]; - case 5: - return this.mTextures[3][aColorIndex + 1]; - } - case 3: - switch (aSide) { - case 0: - return this.mTextures[4][aColorIndex + 1]; - case 1: - return this.mTextures[4][aColorIndex + 1]; - case 4: - return this.mTextures[3][aColorIndex + 1]; - case 5: - return this.mTextures[1][aColorIndex + 1]; - } - case 4: - switch (aSide) { - case 0: - return this.mTextures[3][aColorIndex + 1]; - case 1: - return this.mTextures[1][aColorIndex + 1]; - case 2: - return this.mTextures[3][aColorIndex + 1]; - case 3: - return this.mTextures[1][aColorIndex + 1]; - } - case 5: - switch (aSide) { - case 0: - return this.mTextures[1][aColorIndex + 1]; - case 1: - return this.mTextures[3][aColorIndex + 1]; - case 2: - return this.mTextures[1][aColorIndex + 1]; - case 3: - return this.mTextures[3][aColorIndex + 1]; - } - } - return this.mTextures[5][aColorIndex + 1]; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex < (this.mInventory.length - 1); - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return true; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isEnetOutput() { - return true; - } - - @Override - public boolean isInputFacing(final byte aSide) { - return !this.isOutputFacing(aSide); - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return this.getBaseMetaTileEntity().getBackFacing() == aSide; - } - - @Override - public boolean isTeleporterCompatible() { - return false; - } - - @Override - public long getMinimumStoredEU() { - return 512; - } - - @Override - public long maxEUStore() { - return 512 + (V[this.mTier] * 50); - } - - @Override - public long maxEUInput() { - return V[this.mTier]; - } - - @Override - public long maxEUOutput() { - return this.bOutput ? V[this.mTier] : 0; - } - - @Override - public long maxAmperesIn() { - return 1; - } - - @Override - public long maxAmperesOut() { - return 1; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - public abstract ITexture getOverlayIcon(); - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - - if (aBaseMetaTileEntity.isClientSide()) { - //Utils.LOG_WARNING("Clicky Clicky."); - return true; - - } - if (aPlayer != null) { - final UUID tempUUID = aPlayer.getUniqueID(); - /*if (!aPlayer.worldObj.isRemote){ - //PlayerCache.appendParamChanges(aPlayer.getDisplayName(), aPlayer.getUniqueID().toString()); - }*/ - //Utils.LOG_INFO("test"); - if (this.ownerUUID == null){ - Logger.INFO("No owner yet for this block."); - } - else { - //Utils.LOG_INFO("test"); - Logger.INFO("Current Owner: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)+" - UUID: "+this.ownerUUID); - } - Logger.WARNING("Is ownerUUID Null"); - if (this.ownerUUID == null){ - Logger.WARNING("OwnerUUID is Null, let's set it."); - Logger.WARNING("Accessing Players UUID is: "+tempUUID); - this.ownerUUID = tempUUID; - //Utils.messagePlayer(aPlayer, "Owner of this safe, now set. Try accessing it again."); - Logger.WARNING("Block Owner is now set to: "+this.ownerUUID); - } - Logger.WARNING("No, it is not."); - Logger.WARNING("Checking ownerUUID."); - if (this.ownerUUID != null){ - Logger.WARNING("ownerUUID != Null, if accessor == owner."); - Logger.WARNING("Accessing is: "+PlayerCache.lookupPlayerByUUID(tempUUID)); - if (this.ownerUUID.equals(tempUUID)){ - Logger.WARNING("Owner's UUID: "+this.ownerUUID); - aBaseMetaTileEntity.openGUI(aPlayer); - //Utils.LOG_WARNING("GUI should now be open for you sir."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Access Denied, This does not belong to you."); - PlayerUtils.messagePlayer(aPlayer, "it is owned by: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); - Logger.WARNING("Expecting Player : "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); - Logger.ERROR("Access Denied."); - return true; - } - - } - - /*else { - Utils.LOG_ERROR("This is NOT good. Tell Draknyte1 your safe broke."); - }*/ - /*Utils.LOG_WARNING("Clicky Clicky."); - Utils.messagePlayer(aPlayer, "Owner of this safe, now set."); - aBaseMetaTileEntity.openGUI(aPlayer); */ - - } - return true; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setBoolean("bUnbreakable", this.bUnbreakable); - aNBT.setBoolean("bOutput", this.bOutput); - aNBT.setBoolean("bRedstoneIfFull", this.bRedstoneIfFull); - aNBT.setInteger("mTargetStackSize", this.mTargetStackSize); - if (this.ownerUUID != null) { - aNBT.setString("ownerUUID", this.ownerUUID.toString()); - } - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.bUnbreakable = aNBT.getBoolean("bUnbreakable"); - this.bOutput = aNBT.getBoolean("bOutput"); - this.bRedstoneIfFull = aNBT.getBoolean("bRedstoneIfFull"); - this.mTargetStackSize = aNBT.getInteger("mTargetStackSize"); - if (aNBT.hasKey("ownerUUID")) { - this.ownerUUID = UUID.fromString(aNBT.getString("ownerUUID")); - } - } - - @Override - public void setItemNBT(final NBTTagCompound aNBT) { - super.setItemNBT(aNBT); - if (this.mTargetStackSize > 0) { - aNBT.setInteger("mTargetStackSize", this.mTargetStackSize); - } - } - - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return aSide != aBaseMetaTileEntity.getBackFacing(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java deleted file mode 100644 index df838f012a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public abstract class GregtechMetaTreeFarmerBase extends GT_MetaTileEntity_TieredMachineBlock { - public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bUnbreakable = false; - public int mSuccess = 0, mTargetStackSize = 0; - - public GregtechMetaTreeFarmerBase(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); - } - - public GregtechMetaTreeFarmerBase(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return true; - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public boolean isEnetOutput() { - return false; - } - - @Override - public boolean isInputFacing(final byte aSide) { - return !this.isOutputFacing(aSide); - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return this.getBaseMetaTileEntity().getBackFacing() == aSide; - } - - @Override - public boolean isTeleporterCompatible() { - return false; - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public long maxEUStore() { - return 0; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public long maxAmperesOut() { - return 0; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return false; - } - - public abstract ITexture getOverlayIcon(); - - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log)}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Podzol)}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)}; - } - - public ITexture[] getFrontActive(final byte aColor) { - return this.getFront(aColor); - } - - public ITexture[] getBackActive(final byte aColor) { - return this.getBack(aColor); - } - - public ITexture[] getBottomActive(final byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(final byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(final byte aColor) { - return this.getSides(aColor); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java deleted file mode 100644 index 5e0918059d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -public class GT_MetaTileEntity_Hatch_Catalysts extends GT_MetaTileEntity_Hatch_NbtConsumable { - - public GT_MetaTileEntity_Hatch_Catalysts(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, 0, 16, "Dedicated Catalyst Storage", false); - } - - public GT_MetaTileEntity_Hatch_Catalysts(String aName, String aDescription, ITexture[][][] aTextures) { - super(aName, 0, 16, aDescription, false, aTextures); - } - - public GT_MetaTileEntity_Hatch_Catalysts(String aName, String[] aDescription, ITexture[][][] aTextures) { - super(aName, 0, 16, aDescription[0], false, aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst)}; - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - CORE.GT_Tooltip}; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public Class getHatchEntityClass() { - return GT_MetaTileEntity_Hatch_Catalysts.class; - } - - @Override - public String getNameGUI() { - return "Catalyst Container"; - } - - @Override - public AutoMap getItemsValidForUsageSlots() { - return new AutoMap(); - } - - @Override - public boolean isItemValidForUsageSlot(ItemStack aStack) { - return ItemUtils.isCatalyst(aStack); - } - - @Override - public int getInputSlotCount() { - return 16; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java deleted file mode 100644 index 7514855a2c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -public class GT_MetaTileEntity_Hatch_MillingBalls extends GT_MetaTileEntity_Hatch_NbtConsumable { - - public GT_MetaTileEntity_Hatch_MillingBalls(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, 6, 4, "Dedicated Milling Ball Storage", true); - } - - public GT_MetaTileEntity_Hatch_MillingBalls(String aName, String aDescription, ITexture[][][] aTextures) { - super(aName, 6, 4, aDescription, true, aTextures); - } - - public GT_MetaTileEntity_Hatch_MillingBalls(String aName, String[] aDescription, ITexture[][][] aTextures) { - super(aName, 6, 4, aDescription[0], true, aTextures); - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls)}; - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - CORE.GT_Tooltip}; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public Class getHatchEntityClass() { - return GT_MetaTileEntity_Hatch_MillingBalls.class; - } - - @Override - public String getNameGUI() { - return "Ball Housing"; - } - - @Override - public AutoMap getItemsValidForUsageSlots() { - return new AutoMap(); - } - - @Override - public boolean isItemValidForUsageSlot(ItemStack aStack) { - return ItemUtils.isMillingBall(aStack); - } - - @Override - public int getInputSlotCount() { - return 4; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java deleted file mode 100644 index 56dff1b1e3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java +++ /dev/null @@ -1,273 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers; - -import java.lang.reflect.Constructor; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_HatchNbtConsumable; -import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_HatchNbtConsumable; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileEntity_Hatch { - - public GT_Recipe_Map mRecipeMap = null; - private final int mInputslotCount; - private final int mTotalSlotCount; - private final boolean mAllowDuplicateUsageTypes; - - public GT_MetaTileEntity_Hatch_NbtConsumable(int aID, String aName, String aNameRegional, int aTier, int aInputSlots, String aDescription, boolean aAllowDuplicateTypes) { - super(aID, aName, aNameRegional, aTier, aInputSlots*2, aDescription); - mInputslotCount = getInputSlotCount(); - mTotalSlotCount = getInputSlotCount()*2; - mAllowDuplicateUsageTypes = aAllowDuplicateTypes; - } - - public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String aDescription, boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { - super(aName, aTier, aInputSlots*2, aDescription, aTextures); - mInputslotCount = getInputSlotCount(); - mTotalSlotCount = getInputSlotCount()*2; - mAllowDuplicateUsageTypes = aAllowDuplicateTypes; - } - - public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String[] aDescription, boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { - super(aName, aTier, aInputSlots*2, aDescription, aTextures); - mInputslotCount = getInputSlotCount(); - mTotalSlotCount = getInputSlotCount()*2; - mAllowDuplicateUsageTypes = aAllowDuplicateTypes; - } - - @Override - public abstract ITexture[] getTexturesActive(ITexture aBaseTexture); - - @Override - public abstract ITexture[] getTexturesInactive(ITexture aBaseTexture); - - public abstract int getInputSlotCount(); - - @Override - public final boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public final boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override - public final boolean isValidSlot(int aIndex) { - return aIndex < mInputslotCount; - } - - @Override - public final MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - Constructor aConstructor = ReflectionUtils.getConstructor(getHatchEntityClass(), new Class[] {String.class, String[].class, ITexture[][][].class}); - GT_MetaTileEntity_Hatch_NbtConsumable aInstance = ReflectionUtils.createNewInstanceFromConstructor(aConstructor, new Object[] {mName, StaticFields59.getDescriptionArray(this), mTextures}); - if (aInstance instanceof GT_MetaTileEntity_Hatch_NbtConsumable) { - GT_MetaTileEntity_Hatch_NbtConsumable aMetaTile = (GT_MetaTileEntity_Hatch_NbtConsumable) aInstance; - return aMetaTile; - } - return null; - } - - public abstract Class getHatchEntityClass(); - - @Override - public final boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public final Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_HatchNbtConsumable(aPlayerInventory, aBaseMetaTileEntity, mInputslotCount); - } - - @Override - public final Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - CONTAINER_HatchNbtConsumable aContainer = new CONTAINER_HatchNbtConsumable(aPlayerInventory, aBaseMetaTileEntity, mInputslotCount); - return new GUI_HatchNbtConsumable(aContainer, getNameGUI()); - } - - public abstract String getNameGUI(); - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { - fillStacksIntoFirstSlots(); - tryFillUsageSlots(); - } - } - - public final void updateSlots() { - for (int i = 0; i < mInventory.length; i++) { - if (mInventory[i] != null && mInventory[i].stackSize <= 0) { - mInventory[i] = null; - } - // Only moves items in the first four slots - if (i <= getSlotID_LastInput()) { - fillStacksIntoFirstSlots(); - } - } - } - - // Only moves items in the first four slots - protected final void fillStacksIntoFirstSlots() { - for (int i = 0; i <= getSlotID_LastInput() ; i++) { - for (int j = i + 1; j <= getSlotID_LastInput(); j++) { - if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } - } - } - } - - public final void tryFillUsageSlots() { - int aSlotSpace = (mInputslotCount - getContentUsageSlots().size()); - if (aSlotSpace > 0) { - Logger.INFO("We have empty usage slots. "+aSlotSpace); - for (int i=getSlotID_FirstInput();i<=getSlotID_LastInput();i++) { - ItemStack aStackToTryMove = mInventory[i]; - if (aStackToTryMove != null && isItemValidForUsageSlot(aStackToTryMove)) { - Logger.INFO("Trying to move stack from input slot "+i); - if (moveItemFromStockToUsageSlots(aStackToTryMove)) { - Logger.INFO("Updating Slots."); - updateSlots(); - } - } - } - } - } - - private int getSlotID_FirstInput() { - return 0; - } - private int getSlotID_LastInput() { - return mInputslotCount-1; - } - private int getSlotID_FirstUsage() { - return mInputslotCount; - } - private int getSlotID_LastUsage() { - return mTotalSlotCount-1; - } - - - public final AutoMap getContentUsageSlots() { - AutoMap aItems = new AutoMap(); - for (int i=mInputslotCount;i 0) { - - if (!isItemValidForUsageSlot(aStack)) { - Logger.INFO("Stack not valid: "+ItemUtils.getItemName(aStack)); - return false; - } - - // Copy the input stack into a new object - ItemStack aStackToMove = aStack.copy(); - // Set stack size of stack to move to 1. - aStackToMove.stackSize = 1; - // Did we set a stack in the usage slots? - boolean aDidSet = false; - // Did we find another of this item already in the usage slots? - boolean aFoundMatching = false; - // Continue processing with our new stack - // First check for duplicates - for (int i = getSlotID_FirstUsage(); i <= getSlotID_LastUsage(); i++) { - if (mInventory[i] != null) { - if (GT_Utility.areStacksEqual(aStackToMove, mInventory[i], true)) { - Logger.INFO("Found matching stack in slot "+i+"."); - aFoundMatching = true; - break; - } - } - } - // Then Move stack to Usage slots - for (int i = getSlotID_FirstUsage(); i <= getSlotID_LastUsage(); i++) { - if (mInventory[i] == null) { - if ((aFoundMatching && aAllowMultiOfSameTypeInUsageSlots) || !aFoundMatching) { - mInventory[i] = aStackToMove; - aDidSet = true; - Logger.INFO("Moving new stack to usage slots."); - break; - } - } - } - if (aDidSet) { - Logger.INFO("Depleting input stack size by 1."); - // Depleted one from the original input stack - aStack.stackSize--; - } - return aDidSet; - } - } - return false; - } - - @Override - public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() && isItemValidForUsageSlot(aStack); - } - - /** - * Items that get compared when checking for Usage Slot validity. - * Can return an empty map if isItemValidForUsageSlot() is overridden. - * @return - */ - public abstract AutoMap getItemsValidForUsageSlots(); - - /** - * Checks if the given item is valid for Usage Slots. - * Can be overridden for easier handling if you already have methods to check this. - * @param aStack - * @return - */ - public boolean isItemValidForUsageSlot(ItemStack aStack) { - if (aStack != null) { - for (ItemStack aValid : getItemsValidForUsageSlots()) { - if (GT_Utility.areStacksEqual(aStack, aValid, true)) { - return true; - } - } - } - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java deleted file mode 100644 index 9cc0e3a315..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import gregtech.api.GregTech_API; - -import gtPlusPlus.core.lib.CORE; -import net.minecraftforge.fluids.Fluid; - -public class GregtechFluid extends Fluid implements Runnable { - public final String mTextureName; - private final short[] mRGBa; - - public GregtechFluid(final String aName, final String aTextureName, final short[] aRGBa) { - super(aName); - this.mRGBa = aRGBa; - this.mTextureName = aTextureName; - GregTech_API.sGTBlockIconload.add(this); - } - - @Override - public int getColor() { - return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2])); - } - - @Override - public void run() { - this.setIcons(GregTech_API.sBlockIcons.registerIcon(CORE.MODID+ ":" + "fluids/fluid." + this.mTextureName)); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java deleted file mode 100644 index eb5939caca..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java +++ /dev/null @@ -1,144 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import java.util.*; - -import net.minecraft.item.ItemStack; - -import gregtech.api.objects.GT_ArrayList; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; - -public class GregtechItemData { - private static final GregtechMaterialStack[] EMPTY_GT_MaterialStack_ARRAY = new GregtechMaterialStack[0]; - - public final List mExtraData = new GT_ArrayList<>(false, 1); - public final GregtechOrePrefixes mPrefix; - public final GregtechMaterialStack mMaterial; - public final GregtechMaterialStack[] mByProducts; - public boolean mBlackListed = false; - public ItemStack mUnificationTarget = null; - - public GregtechItemData(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final boolean aBlackListed) { - this.mPrefix = aPrefix; - this.mMaterial = aMaterial == null ? null : new GregtechMaterialStack(aMaterial, aPrefix.mMaterialAmount); - this.mBlackListed = aBlackListed; - this.mByProducts = (aPrefix.mSecondaryMaterial == null) || (aPrefix.mSecondaryMaterial.mMaterial == null) ? EMPTY_GT_MaterialStack_ARRAY : new GregtechMaterialStack[]{aPrefix.mSecondaryMaterial.clone()}; - } - - public GregtechItemData(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial) { - this(aPrefix, aMaterial, false); - } - - public GregtechItemData(final GregtechMaterialStack aMaterial, final GregtechMaterialStack... aByProducts) { - this.mPrefix = null; - this.mMaterial = aMaterial.mMaterial == null ? null : aMaterial.clone(); - this.mBlackListed = true; - if (aByProducts == null) { - this.mByProducts = EMPTY_GT_MaterialStack_ARRAY; - } else { - final GregtechMaterialStack[] tByProducts = aByProducts.length < 1 ? EMPTY_GT_MaterialStack_ARRAY : new GregtechMaterialStack[aByProducts.length]; - int j = 0; - for (int i = 0; i < aByProducts.length; i++) { - if ((aByProducts[i] != null) && (aByProducts[i].mMaterial != null)) { - tByProducts[j++] = aByProducts[i].clone(); - } - } - this.mByProducts = j > 0 ? new GregtechMaterialStack[j] : EMPTY_GT_MaterialStack_ARRAY; - for (int i = 0; i < this.mByProducts.length; i++) { - this.mByProducts[i] = tByProducts[i]; - } - } - } - - public GregtechItemData(final GT_Materials aMaterial, final long aAmount, final GregtechMaterialStack... aByProducts) { - this(new GregtechMaterialStack(aMaterial, aAmount), aByProducts); - } - - public GregtechItemData(final GT_Materials aMaterial, final long aAmount, final GT_Materials aByProduct, final long aByProductAmount) { - this(new GregtechMaterialStack(aMaterial, aAmount), new GregtechMaterialStack(aByProduct, aByProductAmount)); - } - - public GregtechItemData(final GregtechItemData... aData) { - this.mPrefix = null; - this.mBlackListed = true; - - final ArrayList aList = new ArrayList<>(), rList = new ArrayList<>(); - - for (final GregtechItemData tData : aData) { - if (tData != null) { - if (tData.hasValidMaterialData() && (tData.mMaterial.mAmount > 0)) { - aList.add(tData.mMaterial.clone()); - } - for (final GregtechMaterialStack tMaterial : tData.mByProducts) { - if (tMaterial.mAmount > 0) { - aList.add(tMaterial.clone()); - } - } - } - } - - for (final GregtechMaterialStack aMaterial : aList) { - boolean temp = true; - for (final GregtechMaterialStack tMaterial : rList) { - if (aMaterial.mMaterial == tMaterial.mMaterial) { - tMaterial.mAmount += aMaterial.mAmount; - temp = false; - break; - } - } - if (temp) { - rList.add(aMaterial.clone()); - } - } - - Collections.sort(rList, new Comparator() { - @Override - public int compare(final GregtechMaterialStack a, final GregtechMaterialStack b) { - return a.mAmount == b.mAmount ? 0 : a.mAmount > b.mAmount ? -1 : +1; - } - }); - - if (rList.isEmpty()) { - this.mMaterial = null; - } else { - this.mMaterial = rList.get(0); - rList.remove(0); - } - - this.mByProducts = rList.toArray(new GregtechMaterialStack[rList.size()]); - } - - public boolean hasValidPrefixMaterialData() { - return (this.mPrefix != null) && (this.mMaterial != null) && (this.mMaterial.mMaterial != null); - } - - public boolean hasValidPrefixData() { - return this.mPrefix != null; - } - - public boolean hasValidMaterialData() { - return (this.mMaterial != null) && (this.mMaterial.mMaterial != null); - } - - public ArrayList getAllGT_MaterialStacks() { - final ArrayList rList = new ArrayList(); - if (this.hasValidMaterialData()) { - rList.add(this.mMaterial); - } - rList.addAll(Arrays.asList(this.mByProducts)); - return rList; - } - - public GregtechMaterialStack getByProduct(final int aIndex) { - return (aIndex >= 0) && (aIndex < this.mByProducts.length) ? this.mByProducts[aIndex] : null; - } - - @Override - public String toString() { - if ((this.mPrefix == null) || (this.mMaterial == null) || (this.mMaterial.mMaterial == null)) { - return ""; - } - return this.mPrefix.name() + this.mMaterial.mMaterial.name(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java deleted file mode 100644 index 6ec5907256..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java +++ /dev/null @@ -1,49 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; - -public class GregtechMaterialStack implements Cloneable { - public long mAmount; - public GT_Materials mMaterial; - - public GregtechMaterialStack(final GT_Materials aMaterial, final long aAmount) { - this.mMaterial = aMaterial == null ? GT_Materials._NULL : aMaterial; - this.mAmount = aAmount; - } - - public GregtechMaterialStack copy(final long aAmount) { - return new GregtechMaterialStack(this.mMaterial, aAmount); - } - - @Override - public GregtechMaterialStack clone() { - return new GregtechMaterialStack(this.mMaterial, this.mAmount); - } - - @Override - public boolean equals(final Object aObject) { - if (aObject == this) { - return true; - } - if (aObject == null) { - return false; - } - if (aObject instanceof GT_Materials) { - return aObject == this.mMaterial; - } - if (aObject instanceof GregtechMaterialStack) { - return (((GregtechMaterialStack) aObject).mMaterial == this.mMaterial) && ((this.mAmount < 0) || (((GregtechMaterialStack) aObject).mAmount < 0) || (((GregtechMaterialStack) aObject).mAmount == this.mAmount)); - } - return false; - } - - @Override - public String toString() { - return ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? "(" : "") + this.mMaterial.getToolTip(true) + ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? ")" : "") + (this.mAmount > 1 ? this.mAmount : ""); - } - - @Override - public int hashCode() { - return this.mMaterial.hashCode(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java deleted file mode 100644 index 7af6af2ffd..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java +++ /dev/null @@ -1,469 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.api.objects.data.Triplet; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer.LayerBlockData; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraftforge.common.util.ForgeDirection; - -public abstract class MultiblockBlueprint { - - private final MultiblockLayer[] mBlueprintData; - - public final int height; - public final int width; - public final int depth; - public final int mMinimumCasingCount; - public final int mTextureID; - - /** - * Cached Matrix of the Multiblock, which makes future structural checks far quicker. - */ - private final BlockPos[][][] StructureMatrix; - - /** - * Has {@value StructureMatrix} been set yet? - */ - @SuppressWarnings("unused") - private boolean mGeneratedMatrix = false; - - /** - * A detailed class which will contain blueprints for a Multiblock. - * Values are not relative to the controller, but in total. - * @param x - Overall width - * @param y - Overall height - * @param z - Overall depth - * @param aMinimumCasings - The lowest amount of casings required - * @param aTextureID - The texture ID used by hatches. - */ - public MultiblockBlueprint(final int x, final int y, final int z, final int aMinimumCasings, final int aTextureID) { - mBlueprintData = new MultiblockLayer[y]; - height = y; - width = x; - depth = z; - mMinimumCasingCount = aMinimumCasings; - mTextureID = aTextureID; - StructureMatrix = new BlockPos[width][height][depth]; - //Logger.INFO("Created new Blueprint."); - } - - /** - * - * @param aY - The Y level of the layer to return, where 0 is the bottom and N is the top. - * @return - A {@link MultiblockLayer} object. - */ - public MultiblockLayer getLayer(int aY) { - return mBlueprintData[aY]; - } - - /** - * - * @param aLayer - A {@link MultiblockLayer} object. - * @param aY - The Y level of the layer, where 0 is the bottom and N is the top. - * - */ - public void setLayer(MultiblockLayer aLayer, int aY) { - mBlueprintData[aY] = aLayer; - } - - public MultiblockLayer getControllerLayer() { - for (MultiblockLayer u : mBlueprintData) { - if (u.hasController()) { - return u; - } - } - return null; - } - - public int getControllerY() { - int i = 0; - for (MultiblockLayer u : mBlueprintData) { - if (u.hasController()) { - return i; - } - i++; - } - return 0; - } - - @SuppressWarnings({ "unused", "rawtypes" }) - public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity) { - //Check for Nulls - if (aBaseMetaTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - GT_MetaTileEntity_MultiBlockBase aControllerObject = null; - if (aMetaTileEntity instanceof GT_MetaTileEntity_MultiBlockBase) { - aControllerObject = (GT_MetaTileEntity_MultiBlockBase) aMetaTileEntity; - } - if (aControllerObject == null) { - return false; - } - - //Get some Vars - int xOffSetMulti = ((this.getControllerLayer().width-1)/2); - int zOffSetMulti = ((this.getControllerLayer().depth-1)/2); - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * xOffSetMulti; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * zOffSetMulti; - ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); - int tAmount = 0; - - int contX = aControllerObject.getBaseMetaTileEntity().getXCoord(), contY = aControllerObject.getBaseMetaTileEntity().getYCoord(), contZ = aControllerObject.getBaseMetaTileEntity().getZCoord(); - - Logger.INFO("Controller is located at ["+contX+", "+contY+", "+contZ+"]"); - - boolean debugCacheDataVisually = true; - - - if (/*!mGeneratedMatrix || StructureMatrix == null*/ true) { - //Try Fancy Cache Stuff - BlockPos aPos = getOffsetRelativeToGridPosition(aBaseMetaTileEntity, 0, 0, 0); - for (int Y = 0; Y < height; Y++) { - for (int Z = 0; Z < depth; Z++) { - for (int X = 0; X < width; X++) { - int offsetX, offsetZ; - Pair j = MultiblockLayer.rotateOffsetValues(aDir, X, Z); - offsetX = j.getKey(); - offsetZ = j.getValue(); - - Logger.INFO("Pre-Rotated Offsets ["+X+", "+(aPos.yPos + Y)+", "+Z+"] | "+aDir.name()); - Logger.INFO("Rotated Offsets ["+offsetX+", "+(aPos.yPos + Y)+", "+offsetZ+"]"); - - // Resolve Negatives - int negTestX, negTestZ; - if (aPos.xPos < 0) { - int testA = aPos.xPos; - testA -= -offsetX; - negTestX = testA; - } else { - negTestX = offsetX + aPos.xPos; - } - if (aPos.zPos < 0) { - int testA = aPos.zPos; - testA -= -offsetZ; - negTestZ = testA; - } else { - negTestZ = offsetZ + aPos.zPos; - } - Logger.INFO("Caching With Offset ["+negTestX+", "+(aPos.yPos + Y)+", "+negTestZ+"]"); - StructureMatrix[X][Y][Z] = new BlockPos(negTestX, (aPos.yPos + Y), negTestZ, aPos.world); - - if (debugCacheDataVisually) { - aBaseMetaTileEntity.getWorld().setBlock(negTestX, (aPos.yPos + Y), negTestZ, Blocks.glass); - } - } - } - } - Logger.INFO("Cached blueprint matrix."); - mGeneratedMatrix = true; - } - else { - Logger.INFO("Found cached blueprint matrix."); - } - - if (StructureMatrix == null) { - Logger.INFO("Error caching blueprint matrix."); - return false; - } - - - int a1, a2, a3; - a1 = StructureMatrix.length; - a2 = StructureMatrix[0].length; - a3 = StructureMatrix[0][0].length; - - Logger.INFO("Matrix Size ["+a1+", "+a2+", "+a3+"]"); - - for (int H = 0; H < a2; H++) { - - MultiblockLayer currentLayer = this.getLayer(H); - for (int W = 0; W < a1; W++) { - for (int D = 0; D < a3; D++) { - - BlockPos aToCheck = StructureMatrix[W][H][D]; - if (aToCheck == null) { - Logger.INFO("Found bad data stored at X: "+W+", Y: "+H+", Z: "+D); - continue; - } - else { - //Logger.INFO("Found data stored at X: "+W+", Y: "+H+", Z: "+D); - Logger.INFO("Checking "+aToCheck.getLocationString()); - } - - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntity(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos); - final Block tBlock = aBaseMetaTileEntity.getBlock(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos); - final int tMeta = aBaseMetaTileEntity.getMetaID(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos); - - - LayerBlockData g1 = currentLayer.getDataFromCoordsWithDirection(aDir, W, D); - if (g1 == null) { - Logger.INFO("Failed to find LayerBlockData. Using AIR_FALLBACK"); - //return false;*/ - g1 = LayerBlockData.FALLBACK_AIR_CHECK; - } - else { - if (g1.isController) { - Logger.INFO("Controller is at X: "+W+", Y: "+H+", Z: "+D); - } - } - - boolean isMatch = g1.match(tBlock, tMeta); - - - if (!isMatch) { - Logger.INFO("Checking ["+aToCheck.xPos+", "+ aToCheck.yPos +", "+ aToCheck.zPos+"]"); - Logger.INFO("Checking Position relative to Grid. X: "+W+", Y: "+H+", Z: "+D); - Logger.INFO("Found "+tBlock.getLocalizedName()+" : "+tMeta + " | Bad ["+W+", "+D+"]"); - - LayerBlockData g = currentLayer.getDataFromCoordsWithDirection(aDir, W, D); - - if (g == null) { - Logger.INFO("Expected "+" BAD DATA - Possibly Unset Area in Blueprint."); - - } - else { - Logger.INFO("Expected "+g.mBlock.getLocalizedName()+" : "+g.mMeta + ""); - } - aBaseMetaTileEntity.getWorld().setBlock(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos, g.mBlock); - aBaseMetaTileEntity.getWorld().setBlockMetadataWithNotify(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos, g.mMeta, 4); - //return false; - } - else { - - LayerBlockData g = currentLayer.getDataFromCoordsWithDirection(aDir, W, D); - - - - - - - - - - - - - - - - - - - - boolean isHatchValidType = false; - if (g != null) { - if (g.canBeHatch && !g.isController && tTileEntity != null) { - IMetaTileEntity aMetaTileEntity2 = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity2 != null) { - if (aMetaTileEntity2 instanceof GT_MetaTileEntity_MultiBlockBase) { - isHatchValidType = true; - break; - } - else { - for (Class c : g.mHatchClass) { - if (c != null) { - if (c.isInstance(aMetaTileEntity2)) { - isHatchValidType = true; - break; - } - } - } - } - } - } - } - - if (!isHatchValidType && !g.isController && tTileEntity != null) { - Logger.INFO("Checking ["+aToCheck.xPos+", "+ aToCheck.yPos +", "+ aToCheck.zPos+"]"); - Logger.INFO("Hatch Type did not match allowed types. "+tTileEntity.getClass().getSimpleName()); - return false; - } - if (!aControllerObject.addToMachineList(tTileEntity, mTextureID)) { - tAmount++; - } - - - } - } - } - } - - boolean hasCorrectHatches = ( - aControllerObject.mInputBusses.size() >= this.getMinimumInputBus() && - aControllerObject.mOutputBusses.size() >= this.getMinimumOutputBus() && - aControllerObject.mInputHatches.size() >= this.getMinimumInputHatch() && - aControllerObject.mOutputHatches.size() >= this.getMinimumOutputHatch() && - aControllerObject.mDynamoHatches.size() >= this.getMinimumOutputEnergy() && - aControllerObject.mEnergyHatches.size() >= this.getMinimumInputEnergy() && - aControllerObject.mMaintenanceHatches.size() >= this.getMinimumMaintHatch() && - aControllerObject.mMufflerHatches.size() >= this.getMinimumMufflers()); - - - Logger.INFO("mInputBusses: "+aControllerObject.mInputBusses.size()); - Logger.INFO("mOutputBusses: "+aControllerObject.mOutputBusses.size()); - Logger.INFO("mInputHatches: "+aControllerObject.mInputHatches.size()); - Logger.INFO("mOutputHatches: "+aControllerObject.mOutputHatches.size()); - Logger.INFO("mEnergyHatches: "+aControllerObject.mEnergyHatches.size()); - Logger.INFO("mDynamoHatches: "+aControllerObject.mDynamoHatches.size()); - Logger.INFO("mMaintenanceHatches: "+aControllerObject.mMaintenanceHatches.size()); - Logger.INFO("mMufflerHatches: "+aControllerObject.mMufflerHatches.size()); - - boolean built = hasCorrectHatches && tAmount >= mMinimumCasingCount; - Logger.INFO("Built? "+built); - Logger.INFO("hasCorrectHatches? "+hasCorrectHatches); - Logger.INFO("tAmount? "+tAmount); - return built; - } - - public BlockPos getOffsetRelativeToGridPosition(final IGregTechTileEntity aBaseMetaTileEntity, final int x, final int y, final int z) { - - if (aBaseMetaTileEntity == null) { - return null; - } - - int controllerX, controllerY, controllerZ; - MultiblockLayer layerController = this.getControllerLayer(); - - if (layerController == null) { - return null; - } - - int controllerYRelative = this.getControllerY(); - Pair controllerLocationRelativeToGrid = layerController.getControllerLocation(); - - if (controllerLocationRelativeToGrid == null) { - return null; - } - - controllerX = aBaseMetaTileEntity.getXCoord(); - controllerY = aBaseMetaTileEntity.getYCoord(); - controllerZ = aBaseMetaTileEntity.getZCoord(); - - Logger.INFO("Controller is at ["+controllerX+", "+controllerY+", "+controllerZ+"]"); - - ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); - Logger.INFO("Controller is facing "+aDir.name()); - - //Find Bottom Left corner of Structure - // 0, 0, 0 - - int offsetX, offsetY, offsetZ; - int X = controllerLocationRelativeToGrid.getKey(), Z = controllerLocationRelativeToGrid.getValue(); - Logger.INFO("Attempting to translate offsets ["+X+", "+Z+"]"); - if (aDir == ForgeDirection.NORTH) { - offsetX = -X; - offsetZ = -Z; - } - - else if (aDir == ForgeDirection.EAST) { - offsetX = Z; - offsetZ = -X; - } - - else if (aDir == ForgeDirection.SOUTH) { - offsetX = X; - offsetZ = Z; - } - - else if (aDir == ForgeDirection.WEST) { - offsetX = -Z; - offsetZ = X; - } - else { - offsetX = -X; - offsetZ = -Z; - } - - offsetY = -controllerYRelative; - - Logger.INFO("Attempting to use offsets ["+offsetX+", "+offsetY+", "+offsetZ+"]"); - - //Resolve Negatives - int negTestX, negTestZ; - if (controllerX < 0) { - Logger.INFO("Found Negative X Pos."); - int testA = controllerX; - testA -= offsetX; - Logger.INFO("Adding Inverted Offset of "+offsetX+", making "+testA); - negTestX = testA; - } - else { - negTestX = offsetX + controllerX; - } - if (controllerZ < 0) { - Logger.INFO("Found Negative Z Pos."); - int testA = controllerZ; - testA -= -offsetZ; - Logger.INFO("Adding Inverted Offset of "+offsetZ+", making "+testA); - negTestZ = testA; - } - else { - negTestZ = offsetZ + controllerZ; - } - - - //} - //Bottom left Corner position - BlockPos p = new BlockPos(negTestX, offsetY+controllerY, negTestZ, aBaseMetaTileEntity.getWorld()); - - Logger.INFO("World XYZ for Bottom left Corner Block of structure ["+p.xPos+", "+p.yPos+", "+p.zPos+"]"); - - //Add the xyz relative to the grid. - BlockPos offsetPos = new BlockPos(p.xPos+x, p.yPos+y, p.zPos+z, aBaseMetaTileEntity.getWorld()); - Logger.INFO("World XYZ for Target Check Block in structure ["+offsetPos.xPos+", "+offsetPos.yPos+", "+offsetPos.zPos+"]"); - - return p; - } - - - public IGregTechTileEntity getTileAtOffset(final IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z){ - BlockPos aPos = getOffsetRelativeToGridPosition(aBaseMetaTileEntity, x, y, z); - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(aPos.xPos, aPos.yPos, aPos.zPos); - //aBaseMetaTileEntity.getWorld().setBlock(xh, yh, zh, Blocks.gold_ore); - return tTileEntity; - } - - public Pair getBlockAtOffset(final IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z){ - BlockPos aPos = getOffsetRelativeToGridPosition(aBaseMetaTileEntity, x, y, z); - final Block tBlock = aBaseMetaTileEntity.getBlockOffset(aPos.xPos, aPos.yPos, aPos.zPos); - final int tMeta = aBaseMetaTileEntity.getMetaIDOffset(aPos.xPos, aPos.yPos, aPos.zPos); - return new Pair(tBlock, tMeta); - } - - public Triplet getOffsetFromControllerTo00(){ - MultiblockLayer l = this.getControllerLayer(); - if (l == null) { - return null; - } - int yOffset = this.getControllerY(); - Pair cl = l.getControllerLocation(); - - if (cl == null) { - return null; - } - - return new Triplet (cl.getKey(), yOffset, cl.getValue()); - //return new Triplet (cl.getKey(), yOffset, cl.getValue()); - - } - - public abstract int getMinimumInputBus(); - public abstract int getMinimumInputHatch(); - public abstract int getMinimumOutputBus(); - public abstract int getMinimumOutputHatch(); - public abstract int getMinimumInputEnergy(); - public abstract int getMinimumOutputEnergy(); - public abstract int getMinimumMaintHatch(); - public abstract int getMinimumMufflers(); - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java deleted file mode 100644 index c5554a6679..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java +++ /dev/null @@ -1,643 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import java.util.HashMap; - -import gregtech.api.GregTech_API; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.init.Blocks; -import net.minecraftforge.common.util.ForgeDirection; - -public class MultiblockLayer { - - public final int width; - public final int depth; - - private boolean mFinalised; - - - /** - * WARNING!! May be {@link null}. - */ - private Pair mControllerLocation; - - /** - * Holds the North facing Orientation data. - */ - public final LayerBlockData[][] mLayerData; - public final AutoMap mVariantOrientations = new AutoMap(); - - /** - * A detailed class which will contain a single x/z Layer for a {@link MultiblockBlueprint}. - * Values are not relative, but in total. - * @param x - Overall width - * @param z - Overall depth - */ - public MultiblockLayer(final int x, final int z) { - width = x; - depth = z; - mLayerData = new LayerBlockData[x][z]; - //Logger.INFO("Created new Blueprint Layer."); - } - - /** - * A detailed class which will contain a single x/z Layer for a {@link MultiblockBlueprint}. - * Values are not relative, but in total. - */ - public MultiblockLayer(final LayerBlockData[][] aData) { - width = aData.length; - depth = aData[0].length; - mLayerData = aData; - } - - /** - * - * @param aBlock - The block expected as this location. - * @param aMeta - The meta for the block above. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @param canBeHatch - is this location able to be substituted for any hatch? - * @return - Is this data added to the layer data map? - */ - public boolean addBlockForPos(Block aBlock, int aMeta, int x, int z, boolean canBeHatch) { - return addBlockForPos(aBlock, aMeta, x, z, canBeHatch, new Class[] {}); - } - - /** - * - * @param aBlock - The block expected as this location. - * @param aMeta - The meta for the block above. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @param canBeHatch - is this location able to be substituted for a hatch? - * @param aHatchTypeClass - Specify the class for the hatch if you want it explicit. Use base classes to allow custom hatches which extend. - * @return - Is this data added to the layer data map? - */ - public boolean addBlockForPos(Block aBlock, int aMeta, int x, int z, boolean canBeHatch, Class aHatchTypeClass) { - return addBlockForPos(aBlock, aMeta, x, z, canBeHatch, new Class[] {aHatchTypeClass}); - } - - /** - * - * @param aBlock - The block expected as this location. - * @param aMeta - The meta for the block above. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @param canBeHatch - is this location able to be substituted for a hatch? - * @param aHatchTypeClass - Specify the class for the hatch if you want it explicit. Use base classes to allow custom hatches which extend. - * @return - Is this data added to the layer data map? - */ - public boolean addBlockForPos(Block aBlock, int aMeta, int x, int z, boolean canBeHatch, Class[] aHatchTypeClass) { - if (x > width -1) { - return false; - } - if (z > depth - 1) { - return false; - } - - if (canBeHatch && (aHatchTypeClass == null || aHatchTypeClass.length <= 0)){ - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - aHatchTypeClass = new Class[] { - GT_MetaTileEntity_Hatch_Dynamo.class, - GT_MetaTileEntity_Hatch_Energy.class, - GT_MetaTileEntity_Hatch_Input.class, - GT_MetaTileEntity_Hatch_InputBus.class, - GT_MetaTileEntity_Hatch_Maintenance.class, - GT_MetaTileEntity_Hatch_Muffler.class, - GT_MetaTileEntity_Hatch_Output.class, - GT_MetaTileEntity_Hatch_OutputBus.class, - GT_MetaTileEntity_Hatch.class - }; - } - else { - Class aDataHatch = ReflectionUtils.getClass("gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess"); - if (aDataHatch != null) { - aHatchTypeClass = new Class[] { - aDataHatch, - GT_MetaTileEntity_Hatch_Dynamo.class, - GT_MetaTileEntity_Hatch_Energy.class, - GT_MetaTileEntity_Hatch_Input.class, - GT_MetaTileEntity_Hatch_InputBus.class, - GT_MetaTileEntity_Hatch_Maintenance.class, - GT_MetaTileEntity_Hatch_Muffler.class, - GT_MetaTileEntity_Hatch_Output.class, - GT_MetaTileEntity_Hatch_OutputBus.class, - GT_MetaTileEntity_Hatch.class - }; - } else { - aHatchTypeClass = new Class[] { - GT_MetaTileEntity_Hatch_Dynamo.class, - GT_MetaTileEntity_Hatch_Energy.class, - GT_MetaTileEntity_Hatch_Input.class, - GT_MetaTileEntity_Hatch_InputBus.class, - GT_MetaTileEntity_Hatch_Maintenance.class, - GT_MetaTileEntity_Hatch_Muffler.class, - GT_MetaTileEntity_Hatch_Output.class, - GT_MetaTileEntity_Hatch_OutputBus.class, - GT_MetaTileEntity_Hatch.class - }; - } - } - } - - - - mLayerData[x][z] = new LayerBlockData(aBlock, aMeta, canBeHatch, aHatchTypeClass); - return true; - } - - /** - * Adds a controller to the layer at the designated location, Details about the controller do not need to be specified. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addController(int x, int z) { - setControllerLocation(new Pair(x, z)); - return addBlockForPos(GregTech_API.sBlockMachines, 0, x, z, true, GT_MetaTileEntity_MultiBlockBase.class); - } - - - /** - * Adds a Muffler to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addMuffler(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Muffler.class); - } - - - /** - * Adds a Maint Hatch to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addMaintHatch(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Maintenance.class); - } - - - /** - * Adds ah Input to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addInputBus(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_InputBus.class); - } - - - /** - * Adds an Output to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addOutputBus(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_OutputBus.class); - } - - /** - * Adds ah Input to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addInputHatch(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Input.class); - } - - - /** - * Adds an Output to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addOutputHatch(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Output.class); - } - - /** - * Adds ah Input to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addInput(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, new Class[] {GT_MetaTileEntity_Hatch_Input.class, GT_MetaTileEntity_Hatch_InputBus.class}); - } - - - /** - * Adds an Output to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addOutput(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, new Class[] {GT_MetaTileEntity_Hatch_Output.class, GT_MetaTileEntity_Hatch_OutputBus.class}); - } - - /** - * Adds ah Input to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addEnergyInput(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Energy.class); - } - - - /** - * Adds an Output to the layer at the designated location. - * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. - * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. - * @return - Is this controller added to the layer data map? - */ - public boolean addEnergyOutput(Block aBlock, int aMeta, int x, int z) { - return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Dynamo.class); - } - - /** - * - * @param aBlock - The block you expect. - * @param aMeta - The meta you expect. - * @param x - the non-relative x location you expect it. - * @param z - the non-relative z location you expect it. - * @param aDir - The direction the controller is facing. - * @return - True if the correct Block was found. May also return true if a hatch is found when allowed or it's the controller. - */ - public boolean getBlockForPos(Block aBlock, int aMeta, int x, int z, ForgeDirection aDir) { - //Logger.INFO("Grid Index X: "+x+" | Z: "+z + " | "+aDir.name()); - LayerBlockData g; - if (aDir == ForgeDirection.SOUTH) { - g = mVariantOrientations.get(2)[x][z]; - } - else if (aDir == ForgeDirection.WEST) { - g = mVariantOrientations.get(3)[x][z]; - } - else if (aDir == ForgeDirection.NORTH) { - LayerBlockData[][] aData = mVariantOrientations.get(0); - if (aData != null) { - //Logger.INFO("Found Valid Orientation Data. "+aData.length + ", "+aData[0].length); - g = aData[x][z]; - } - else { - //Logger.INFO("Did not find valid orientation data."); - g = null; - } - } - else if (aDir == ForgeDirection.EAST) { - g = mVariantOrientations.get(1)[x][z]; - } - else { - g = mLayerData[x][z]; - } - if (g == null) { - Logger.INFO("Failed to find LayerBlockData. Using AIR_FALLBACK"); - //return false;*/ - g = LayerBlockData.FALLBACK_AIR_CHECK; - } - - return g.match(aBlock, aMeta); - } - - - - /** - * Is this layer final? - * @return - If true, layer data cannot be edited. - */ - public final boolean isLocked() { - return mFinalised; - } - - /** - * Used to finalize the layer, after which all four Orientations are then generated. - * Cannot be set to false, useful for not locking the layer if an error occurs. - * @param lockData - */ - public final void lock(boolean lockData) { - if (!lockData) { - Logger.INFO("Failed to lock layer"); - return; - } - //Logger.INFO("Trying to lock layer"); - this.mFinalised = true; - generateOrientations(); - //Logger.INFO("Trying to Build Blueprint Layer [Constructed orietations & finalized]"); - } - - private void generateOrientations() { - try { - - //Logger.INFO("Trying to gen orients for layer"); - //North - mVariantOrientations.put(mLayerData); - LayerBlockData[][] val; - //Logger.INFO("1 done"); - //East - val = rotateArrayClockwise(mLayerData); - mVariantOrientations.put((LayerBlockData[][]) val); - //Logger.INFO("2 done"); - //South - val = rotateArrayClockwise(mLayerData); - mVariantOrientations.put((LayerBlockData[][]) val); - //Logger.INFO("3 done"); - //West - val = rotateArrayClockwise(mLayerData); - mVariantOrientations.put((LayerBlockData[][]) val); - //Logger.INFO("4 done"); - - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - public static LayerBlockData[][] rotateArrayClockwise(LayerBlockData[][] mat) { - //Logger.INFO("Rotating Layer 90' Clockwise"); - try { - final int M = mat.length; - final int N = mat[0].length; - //Logger.INFO("Dimension X: "+M); - //Logger.INFO("Dimension Z: "+N); - LayerBlockData[][] ret = new LayerBlockData[N][M]; - for (int r = 0; r < M; r++) { - for (int c = 0; c < N; c++) { - ret[c][M-1-r] = mat[r][c]; - } - } - //Logger.INFO("Returning Rotated Layer"); - return ret; - } - catch (Throwable t) { - t.printStackTrace(); - return null; - } - } - - public boolean hasController() { - if (getControllerLocation() == null) { - return false; - } - return true; - } - - public Pair getControllerLocation() { - return mControllerLocation; - } - - public void setControllerLocation(Pair mControllerLocation) { - if (hasController()) { - return; - } - this.mControllerLocation = mControllerLocation; - } - - public LayerBlockData getDataFromCoordsWithDirection(ForgeDirection aDir, int W, int D) { - LayerBlockData g; - if (aDir == ForgeDirection.SOUTH) { - g = this.mVariantOrientations.get(2)[W][D]; - } - else if (aDir == ForgeDirection.WEST) { - g = this.mVariantOrientations.get(3)[W][D]; - } - else if (aDir == ForgeDirection.NORTH) { - g = this.mVariantOrientations.get(0)[W][D]; - } - else if (aDir == ForgeDirection.EAST) { - g = this.mVariantOrientations.get(1)[W][D]; - } - else { - g = this.mLayerData[W][D]; - } - return g; - } - - public static Pair rotateOffsetValues(ForgeDirection aDir, int X, int Z) { - int offsetX, offsetZ; - - if (aDir == ForgeDirection.NORTH) { - offsetX = X; - offsetZ = Z; - } - - else if (aDir == ForgeDirection.EAST) { - offsetX = -X; - offsetZ = Z; - } - - else if (aDir == ForgeDirection.SOUTH) { - offsetX = -X; - offsetZ = -Z; - } - - else if (aDir == ForgeDirection.WEST) { - offsetX = X; - offsetZ = -Z; - } - else { - offsetX = X; - offsetZ = Z; - } - - return new Pair(offsetX, offsetZ); - } - - - - - - - - - - - - - - - - /** - * Generates a complete {@link MultiblockLayer} from String data. - * @param aDataMap - A {@link HashMap} containing single character {@link String}s, which map to {@link Pair}<{@link Block}, {@link Integer}>s contains pairs of Blocks & Meta. - * @param aHorizontalStringRows - The horizontal rows used to map blocks to a grid. Each array slot is one vertical row going downwards as the index increases. - * @return - */ - public static MultiblockLayer generateLayerFromData(HashMap> aDataMap, String[] aHorizontalStringRows) { - AutoMap>> x = new AutoMap>>(); - - for (String u : aDataMap.keySet()) { - Pair r = aDataMap.get(u); - if (r != null) { - x.put(new Pair>(u, r)); - } - } - - //String aFreeLetters = "abdefgijklmnopqrstuvwxyz"; - /*for (Pair h : aDataMap.values()) { - String y = aFreeLetters.substring(0, 0); - aFreeLetters = aFreeLetters.replace(y.toLowerCase(), ""); - Pair> t = new Pair>(y, h); - x.put(t); - }*/ - return generateLayerFromData(x, aHorizontalStringRows); - } - - - /** - * Generates a complete {@link MultiblockLayer} from String data. - * @param aDataMap - An {@link AutoMap} which contains {@link Pair}s. These Pairs hold a single character {@link String} and another Pair. This inner pair holds a {@link Block} and an {@link Integer}. - * @param aHorizontalStringRows - An array which holds the horizontal (X/Width) string data for the layer. - * @return A complete Multiblock Layer. - */ - public static MultiblockLayer generateLayerFromData(AutoMap>> aDataMap, String[] aHorizontalStringRows) { - int width = aHorizontalStringRows[0].length(); - int depth = aHorizontalStringRows.length; - MultiblockLayer L = new MultiblockLayer(width, depth); - HashMap> K = new HashMap>(); - - //24 Free Letters - //C = Controller - //H = Hatch - String aFreeLetters = "abdefgijklmnopqrstuvwxyz"; - AutoMap>> j = new AutoMap>>(); - - //Map the keys to a Hashmap - for (Pair> t : aDataMap) { - String aKeyTemp = t.getKey(); - if (aKeyTemp.toUpperCase().equals("C")){ - j.put(t); - } - else if (aKeyTemp.toUpperCase().equals("H")){ - j.put(t); - } - else { - K.put(aKeyTemp.toLowerCase(), t.getValue()); - aFreeLetters.replace(aKeyTemp.toLowerCase(), ""); - } - } - - //Map any Invalid Characters to new ones, in case someone uses C/H. - if (j.size() > 0) { - for (Pair> h : j) { - String newKey = aFreeLetters.substring(0, 0); - K.put(newKey.toLowerCase(), h.getValue()); - aFreeLetters.replace(newKey.toLowerCase(), ""); - } - } - - int xPos = 0; - int zPos = 0; - - //Vertical Iterator - for (String s : aHorizontalStringRows) { - //Horizontal Iterator - for (int q = 0; q < s.length(); q++) { - //Get char as a String at index q. - String c = s.substring(q, q); - //if the character at c matches the character in this row, we add it to the map. - if (c.toLowerCase().equals(s.toLowerCase())) { - Pair p = K.get(c); - if (c.toLowerCase().equals("c")) { - L.addController(xPos, zPos); - } - else if (c.toLowerCase().equals("h")) { - L.addBlockForPos(p.getKey(), p.getValue(), xPos, zPos, true); - } - else { - L.addBlockForPos(p.getKey(), p.getValue(), xPos, zPos, false); - } - } - xPos++; - } - xPos = 0; - zPos++; - } - L.lock(true); - return L; - } - - - - - public static class LayerBlockData{ - - public static final LayerBlockData FALLBACK_AIR_CHECK = new LayerBlockData(Blocks.air, 0, false); - - public final Block mBlock; - public final int mMeta; - public final boolean canBeHatch; - public final Class[] mHatchClass; - - public final boolean isController; - - - public LayerBlockData(Block aBlock, int aMeta, boolean aHatch) { - this(aBlock, aMeta, aHatch, new Class[] {}); - } - - public LayerBlockData(Block aBlock, int aMeta, boolean aHatch, Class clazz) { - this(aBlock, aMeta, aHatch, new Class[] {clazz}); - } - - public LayerBlockData(Block aBlock, int aMeta, boolean aHatch, Class[] clazz) { - mBlock = aBlock; - mMeta = aMeta; - canBeHatch = aHatch; - mHatchClass = clazz; - if (clazz != null && clazz.length > 0 && clazz[0].equals(GT_MetaTileEntity_MultiBlockBase.class)) { - isController = true; - } - else { - isController = false; - } - } - - public boolean match(Block blockToTest, int metaToTest) { - - //If Both are some kind of Air Block, good enough. - if (blockToTest instanceof BlockAir && mBlock instanceof BlockAir) { - return true; - } - - if (isController && blockToTest == GregTech_API.sBlockMachines) { - return true; - } - - if (canBeHatch && blockToTest == GregTech_API.sBlockMachines) { - return true; - } - - if (blockToTest == mBlock && metaToTest == mMeta) { - return true; - } - - return false; - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java b/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java deleted file mode 100644 index 10909081d1..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java +++ /dev/null @@ -1,108 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -public class MultiblockRequirements { - - public int mInputBusMinimum = 0; - public int mInputHatchMinimum = 0; - - public int mOutputBusMinimum = 0; - public int mOutputHatchMinimum = 0; - - public int mMaintMinimum = 1; - - public int mEnergyHatchMinimum = 1; - public int mDynamoHatchMinimum = 0; - - public final int mMinimumCasingCount; - - public final MultiblockBlueprint mBlueprint; - - //public static final int mControlCoreMinimum = 1; - /** - * - * @param aInputBusses - * @param aOutputBusses - * @param aInputHatches - * @param aOutputHatches - * @param aEnergyHatches - * @param aDynamoHatches - * @param aMaintHatches - * @param aBlueprint - A data object containing the structural data for this Multiblock - */ - public MultiblockRequirements(int aCasingCount, MultiblockBlueprint aBlueprint) { - mMinimumCasingCount = aCasingCount; - mBlueprint = aBlueprint; - } - - public final int getInputBusMinimum() { - return this.mInputBusMinimum; - } - - public final MultiblockRequirements setInputBusMinimum(int mInputBusMinimum) { - this.mInputBusMinimum = mInputBusMinimum; - return this; - } - - public final int getInputHatchMinimum() { - return this.mInputHatchMinimum; - } - - public final MultiblockRequirements setInputHatchMinimum(int mInputHatchMinimum) { - this.mInputHatchMinimum = mInputHatchMinimum; - return this; - } - - public final int getOutputBusMinimum() { - return this.mOutputBusMinimum; - } - - public final MultiblockRequirements setOutputBusMinimum(int mOutputBusMinimum) { - this.mOutputBusMinimum = mOutputBusMinimum; - return this; - } - - public final int getOutputHatchMinimum() { - return this.mOutputHatchMinimum; - } - - public final MultiblockRequirements setOutputHatchMinimum(int mOutputHatchMinimum) { - this.mOutputHatchMinimum = mOutputHatchMinimum; - return this; - } - - public final int getMaintMinimum() { - return this.mMaintMinimum; - } - - public final MultiblockRequirements setMaintMinimum(int mMaintMinimum) { - this.mMaintMinimum = mMaintMinimum; - return this; - } - - public final int getEnergyHatchMinimum() { - return this.mEnergyHatchMinimum; - } - - public final MultiblockRequirements setEnergyHatchMinimum(int mEnergyHatchMinimum) { - this.mEnergyHatchMinimum = mEnergyHatchMinimum; - return this; - } - - public final int getDynamoHatchMinimum() { - return this.mDynamoHatchMinimum; - } - - public final MultiblockRequirements setDynamoHatchMinimum(int mDynamoHatchMinimum) { - this.mDynamoHatchMinimum = mDynamoHatchMinimum; - return this; - } - - public final MultiblockBlueprint getBlueprint() { - return this.mBlueprint; - } - - public final int getMinimumCasingCount() { - return this.mMinimumCasingCount; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java b/src/Java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java deleted file mode 100644 index 976f21c329..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.recipe; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.ToolDictNames; -import gregtech.api.interfaces.IOreRecipeRegistrator; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; - -public class ProcessingSkookumChoocherToolRecipes implements IOreRecipeRegistrator { - public ProcessingSkookumChoocherToolRecipes() { - //GregtechOrePrefixes.toolSkookumChoocher.add(this); - } - - @Override - public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { - GT_ModHandler.addShapelessCraftingRecipe(MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(7734, 1, aMaterial, aMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial), OrePrefixes.screw.get(aMaterial), ToolDictNames.craftingToolScrewdriver}); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java b/src/Java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java deleted file mode 100644 index dcdc1220d0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.util; - -import static gregtech.api.enums.GT_Values.E; - -import net.minecraft.item.ItemStack; - -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.common.config.Property; - -public class GTPP_Config implements Runnable { - public static boolean troll = false; - - public static Configuration sConfigFileIDs; - public final Configuration mConfig; - - public GTPP_Config(Configuration aConfig) { - mConfig = aConfig; - mConfig.load(); - mConfig.save(); - } - - public static int addIDConfig(Object aCategory, String aName, int aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = sConfigFileIDs.get(aCategory.toString().replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault); - int rResult = tProperty.getInt(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sConfigFileIDs.save(); - return rResult; - } - - public static String getStackConfigName(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return E; - Object rName = GT_OreDictUnificator.getAssociation(aStack); - if (rName != null) return rName.toString(); - try { - if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString(); - } catch (Throwable e) {/*Do nothing*/} - String sName = aStack.getItem().toString(); - String[] tmp = sName.split("@"); - if (tmp.length > 0) sName = tmp[0]; - return sName + "." + aStack.getItemDamage(); - } - - public boolean get(Object aCategory, ItemStack aStack, boolean aDefault) { - String aName = getStackConfigName(aStack); - return get(aCategory, aName, aDefault); - } - - public boolean get(Object aCategory, String aName, boolean aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); - boolean rResult = tProperty.getBoolean(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); - return rResult; - } - - public int get(Object aCategory, ItemStack aStack, int aDefault) { - return get(aCategory, getStackConfigName(aStack), aDefault); - } - - public int get(Object aCategory, String aName, int aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); - int rResult = tProperty.getInt(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); - return rResult; - } - - public double get(Object aCategory, ItemStack aStack, double aDefault) { - return get(aCategory, getStackConfigName(aStack), aDefault); - } - - public double get(Object aCategory, String aName, double aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); - double rResult = tProperty.getDouble(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); - return rResult; - } - - public String get(Object aCategory, ItemStack aStack, String aDefault) { - return get(aCategory, getStackConfigName(aStack), aDefault); - } - - public String get(Object aCategory, String aName, String aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); - String rResult = tProperty.getString(); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); - return rResult; - } - - @Override - public void run() { - mConfig.save(); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java deleted file mode 100644 index 3e0084139e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java +++ /dev/null @@ -1,402 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.util; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.objects.GT_HashSet; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; -import gregtech.api.util.*; - -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import static gregtech.api.enums.GT_Values.*; - -public class GregtechOreDictUnificator { - - - private static final Map sName2StackMap = new HashMap(); - private static final Map sItemStack2DataMap = new HashMap(); - private static final Map> sUnificationTable = new HashMap>(); - private static final GT_HashSet sNoUnificationList = new GT_HashSet(); - - - private static int isRegisteringOre = 0, isAddingOre = 0; - private static boolean mRunThroughTheList = true; - - static { - if (ReflectionUtils.getField(GT_OreDictUnificator.class, "sUnificationTable") == null) { - GregTech_API.sItemStackMappings.add(sUnificationTable); - } - } - - /** - * The Blacklist just prevents the Item from being unificated into something else. - * Useful if you have things like the Industrial Diamond, which is better than regular Diamond, but also usable in absolutely all Diamond Recipes. - */ - public static void addToBlacklist(ItemStack aStack) { - if (GT_Utility.isStackValid(aStack) && !GT_Utility.isStackInList(aStack, sNoUnificationList)) - sNoUnificationList.add(aStack); - } - - public static boolean isBlacklisted(ItemStack aStack) { - return GT_Utility.isStackInList(aStack, sNoUnificationList); - } - - public static void add(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack) { - set(aPrefix, aMaterial, aStack, false, false); - } - - public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack) { - set(aPrefix, aMaterial, aStack, true, false); - } - - public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aOverwrite, boolean aAlreadyRegistered) { - if (aMaterial == null || aPrefix == null || GT_Utility.isStackInvalid(aStack) || Items.feather.getDamage(aStack) == W) - return; - isAddingOre++; - aStack = GT_Utility.copyAmount(1, aStack); - if (!aAlreadyRegistered) registerOre(aPrefix.get(aMaterial), aStack); - addAssociation(aPrefix, aMaterial, aStack, isBlacklisted(aStack)); - if (aOverwrite || GT_Utility.isStackInvalid(sName2StackMap.get(aPrefix.get(aMaterial).toString()))) - sName2StackMap.put(aPrefix.get(aMaterial).toString(), aStack); - isAddingOre--; - } - - public static ItemStack getFirstOre(Object aName, long aAmount) { - if (GT_Utility.isStringInvalid(aName)) return null; - ItemStack tStack = sName2StackMap.get(aName.toString()); - if (GT_Utility.isStackValid(tStack)) return GT_Utility.copyAmount(aAmount, tStack); - return GT_Utility.copyAmount(aAmount, getOres(aName).toArray()); - } - - public static ItemStack get(Object aName, long aAmount) { - return get(aName, null, aAmount, true, true); - } - - public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount) { - return get(aName, aReplacement, aAmount, true, true); - } - - public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, long aAmount) { - return get(aPrefix, aMaterial, null, aAmount); - } - - public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, ItemStack aReplacement, long aAmount) { - //if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) aPrefix.mDynamicItems.add((Materials) aMaterial); - if (StaticFields59.geOrePrefixesBooleanPreventableComponents().contains(aPrefix) && StaticFields59.getOrePrefixesBooleanDisabledItems().contains(aMaterial)) return aReplacement; - return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true); - } - - public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount, boolean aMentionPossibleTypos, boolean aNoInvalidAmounts) { - if (aNoInvalidAmounts && aAmount < 1) return null; - if (!sName2StackMap.containsKey(aName.toString()) && aMentionPossibleTypos) - GT_Log.err.println("Unknown Key for Unification, Typo? " + aName); - return GT_Utility.copyAmount(aAmount, sName2StackMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement); - } - - public static ItemStack[] setStackArray(boolean aUseBlackList, ItemStack... aStacks) { - for (int i = 0; i < aStacks.length; i++) aStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i])); - return aStacks; - } - - public static ItemStack[] getStackArray(boolean aUseBlackList, Object... aStacks) { - ItemStack[] rStacks = new ItemStack[aStacks.length]; - for (int i = 0; i < aStacks.length; i++) rStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i])); - return rStacks; - } - - public static ItemStack setStack(ItemStack aStack) { - return setStack(true, aStack); - } - - public static ItemStack setStack(boolean aUseBlackList, ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return aStack; - ItemStack tStack = get(aUseBlackList, aStack); - if (GT_Utility.areStacksEqual(aStack, tStack)) return aStack; - aStack.func_150996_a(tStack.getItem()); - Items.feather.setDamage(aStack, Items.feather.getDamage(tStack)); - return aStack; - } - - public static ItemStack get(ItemStack aStack) { - return get(true, aStack); - } - - public static ItemStack get(boolean aUseBlackList, ItemStack aStack) { - return get(aUseBlackList, aStack, false); - } - - public static ItemStack get(boolean aUseBlackList, ItemStack aStack, boolean aOnUnificationTableCreation) { - if (GT_Utility.isStackInvalid(aStack)) return null; - ItemData tPrefixMaterial = getAssociation(aStack); - ItemStack rStack = null; - if (tPrefixMaterial == null || !tPrefixMaterial.hasValidPrefixMaterialData() || (aUseBlackList && tPrefixMaterial.mBlackListed)) - return GT_Utility.copy(aStack); - if (aUseBlackList && !GregTech_API.sUnificationEntriesRegistered && isBlacklisted(aStack)) { - tPrefixMaterial.mBlackListed = true; - return GT_Utility.copy(aStack); - } - if (tPrefixMaterial.mUnificationTarget == null) { - tPrefixMaterial.mUnificationTarget = sName2StackMap.get(tPrefixMaterial.toString()); - if (!aOnUnificationTableCreation) sUnificationTable.clear(); - } - rStack = tPrefixMaterial.mUnificationTarget; - if (GT_Utility.isStackInvalid(rStack)) return GT_Utility.copy(aStack); - assert rStack != null; - rStack.setTagCompound(aStack.getTagCompound()); - return GT_Utility.copyAmount(aStack.stackSize, rStack); - } - - public static List getNonUnifiedStacks(Object obj) { - synchronized (sUnificationTable) { - if (sUnificationTable.isEmpty() && !sItemStack2DataMap.isEmpty()) { - for (GT_ItemStack tGTStack0 : sItemStack2DataMap.keySet()) { - ItemStack tStack0 = tGTStack0.toStack(); - ItemStack tStack1 = get(false, tStack0, true); - if (tStack0 != null && tStack1 != null && !GT_Utility.areStacksEqual(tStack0, tStack1)) { - GT_ItemStack tGTStack1 = new GT_ItemStack(tStack1); - List list = sUnificationTable.get(tGTStack1); - if (list == null) sUnificationTable.put(tGTStack1, list = new ArrayList()); - if (!list.contains(tStack0)) list.add(tStack0); - } - } - } - } - ItemStack[] aStacks = {}; - if (obj instanceof ItemStack) aStacks = new ItemStack[]{(ItemStack) obj}; - else if (obj instanceof ItemStack[]) aStacks = (ItemStack[]) obj; - else if (obj instanceof List) aStacks = (ItemStack[]) ((List)obj).toArray(new ItemStack[0]); - List rList = new ArrayList(); - for (ItemStack aStack : aStacks) { - rList.add(aStack); - List tList = sUnificationTable.get(new GT_ItemStack(aStack)); - if (tList != null) { - for (ItemStack tStack : tList) { - ItemStack tStack1 = GT_Utility.copyAmount(aStack.stackSize, tStack); - tStack1.setTagCompound(aStack.getTagCompound()); - rList.add(tStack1); - } - } - } - return rList; - } - - public static void addItemData(ItemStack aStack, ItemData aData) { - if (GT_Utility.isStackValid(aStack) && getItemData(aStack) == null && aData != null) setItemData(aStack, aData); - } - - public static void setItemData(ItemStack aStack, ItemData aData) { - if (GT_Utility.isStackInvalid(aStack) || aData == null) return; - ItemData tData = getItemData(aStack); - if (tData == null || !tData.hasValidPrefixMaterialData()) { - if (tData != null) for (Object tObject : tData.mExtraData) - if (!aData.mExtraData.contains(tObject)) aData.mExtraData.add(tObject); - if (aStack.stackSize > 1) { - if (aData.mMaterial != null) aData.mMaterial.mAmount /= aStack.stackSize; - for (MaterialStack tMaterial : aData.mByProducts) tMaterial.mAmount /= aStack.stackSize; - aStack = GT_Utility.copyAmount(1, aStack); - } - sItemStack2DataMap.put(new GT_ItemStack(aStack), aData); - if (aData.hasValidMaterialData()) { - long tValidMaterialAmount = aData.mMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : aData.mMaterial.mAmount >= 0 ? aData.mMaterial.mAmount : M; - for (MaterialStack tMaterial : aData.mByProducts) - tValidMaterialAmount += tMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : tMaterial.mAmount >= 0 ? tMaterial.mAmount : M; - if (tValidMaterialAmount < M) GT_ModHandler.addToRecyclerBlackList(aStack); - } - if (mRunThroughTheList) { - if (GregTech_API.sLoadStarted) { - mRunThroughTheList = false; - for (Entry tEntry : sItemStack2DataMap.entrySet()) - if (!tEntry.getValue().hasValidPrefixData() || tEntry.getValue().mPrefix.mAllowNormalRecycling) - GT_RecipeRegistrator.registerMaterialRecycling(tEntry.getKey().toStack(), tEntry.getValue()); - } - } else { - if (!aData.hasValidPrefixData() || aData.mPrefix.mAllowNormalRecycling) - GT_RecipeRegistrator.registerMaterialRecycling(aStack, aData); - } - } else { - for (Object tObject : aData.mExtraData) - if (!tData.mExtraData.contains(tObject)) tData.mExtraData.add(tObject); - } - } - - public static void addAssociation(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aBlackListed) { - if (aPrefix == null || aMaterial == null || GT_Utility.isStackInvalid(aStack)) return; - if (Items.feather.getDamage(aStack) == W) for (byte i = 0; i < 16; i++) - setItemData(GT_Utility.copyAmountAndMetaData(1, i, aStack), new ItemData(aPrefix, aMaterial, aBlackListed)); - setItemData(aStack, new ItemData(aPrefix, aMaterial, aBlackListed)); - } - - public static ItemData getItemData(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return null; - ItemData rData = sItemStack2DataMap.get(new GT_ItemStack(aStack)); - if (rData == null) rData = sItemStack2DataMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, aStack))); - return rData; - } - - public static ItemData getAssociation(ItemStack aStack) { - ItemData rData = getItemData(aStack); - return rData != null && rData.hasValidPrefixMaterialData() ? rData : null; - } - - public static boolean isItemStackInstanceOf(ItemStack aStack, Object aName) { - if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false; - for (ItemStack tOreStack : getOres(aName.toString())) - if (GT_Utility.areStacksEqual(tOreStack, aStack, true)) return true; - return false; - } - - public static boolean isItemStackDye(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return false; - for (Dyes tDye : Dyes.VALUES) if (isItemStackInstanceOf(aStack, tDye.toString())) return true; - return false; - } - - public static boolean registerOre(OrePrefixes aPrefix, Object aMaterial, ItemStack aStack) { - return registerOre(aPrefix.get(aMaterial), aStack); - } - - public static boolean registerOre(Object aName, ItemStack aStack) { - if (aName == null || GT_Utility.isStackInvalid(aStack)) return false; - String tName = aName.toString(); - if (GT_Utility.isStringInvalid(tName)) return false; - ArrayList tList = getOres(tName); - for (int i = 0; i < tList.size(); i++) if (GT_Utility.areStacksEqual(tList.get(i), aStack, true)) return false; - isRegisteringOre++; - OreDictionary.registerOre(tName, GT_Utility.copyAmount(1, aStack)); - isRegisteringOre--; - return true; - } - - public static boolean isRegisteringOres() { - return isRegisteringOre > 0; - } - - public static boolean isAddingOres() { - return isAddingOre > 0; - } - - public static void resetUnificationEntries() { - for (ItemData tPrefixMaterial : sItemStack2DataMap.values()) tPrefixMaterial.mUnificationTarget = null; - sUnificationTable.clear(); - } - - public static ItemStack getGem(MaterialStack aMaterial) { - return aMaterial == null ? null : getGem(aMaterial.mMaterial, aMaterial.mAmount); - } - - public static ItemStack getGem(Materials aMaterial, OrePrefixes aPrefix) { - return aMaterial == null ? null : getGem(aMaterial, aPrefix.mMaterialAmount); - } - - public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) { - ItemStack rStack = null; - if (((aMaterialAmount >= M))) - rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M); - if (rStack == null) { - if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16)) - rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M); - if ((((aMaterialAmount * 4) >= M))) - rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M); - } - return rStack; - } - - public static ItemStack getDust(MaterialStack aMaterial) { - return aMaterial == null ? null : getDust(aMaterial.mMaterial, aMaterial.mAmount); - } - - public static ItemStack getDust(Materials aMaterial, OrePrefixes aPrefix) { - return aMaterial == null ? null : getDust(aMaterial, aPrefix.mMaterialAmount); - } - - public static ItemStack getDust(Materials aMaterial, long aMaterialAmount) { - if (aMaterialAmount <= 0) return null; - ItemStack rStack = null; - if (((aMaterialAmount % M == 0) || aMaterialAmount >= M * 16)) - rStack = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); - if (rStack == null && (((aMaterialAmount * 4) % M == 0) || aMaterialAmount >= M * 8)) - rStack = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); - if (rStack == null && (((aMaterialAmount * 9) >= M))) - rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); - return rStack; - } - - public static ItemStack getIngot(MaterialStack aMaterial) { - return aMaterial == null ? null : getIngot(aMaterial.mMaterial, aMaterial.mAmount); - } - - public static ItemStack getIngot(Materials aMaterial, OrePrefixes aPrefix) { - return aMaterial == null ? null : getIngot(aMaterial, aPrefix.mMaterialAmount); - } - - public static ItemStack getIngot(Materials aMaterial, long aMaterialAmount) { - if (aMaterialAmount <= 0) return null; - ItemStack rStack = null; - if (((aMaterialAmount % (M * 9) == 0 && aMaterialAmount / (M * 9) > 1) || aMaterialAmount >= M * 72)) - rStack = get(OrePrefixes.block, aMaterial, aMaterialAmount / (M * 9)); - if (rStack == null && ((aMaterialAmount % M == 0) || aMaterialAmount >= M * 8)) - rStack = get(OrePrefixes.ingot, aMaterial, aMaterialAmount / M); - if (rStack == null && (((aMaterialAmount * 9) >= M))) - rStack = get(OrePrefixes.nugget, aMaterial, (aMaterialAmount * 9) / M); - return rStack; - } - - public static ItemStack getIngotOrDust(Materials aMaterial, long aMaterialAmount) { - if (aMaterialAmount <= 0) return null; - ItemStack rStack = getIngot(aMaterial, aMaterialAmount); - if (rStack == null) rStack = getDust(aMaterial, aMaterialAmount); - return rStack; - } - - public static ItemStack getIngotOrDust(MaterialStack aMaterial) { - ItemStack rStack = getIngot(aMaterial); - if(aMaterial!=null&&aMaterial.mMaterial!=null&&(aMaterial.mMaterial==Materials.Naquadah||aMaterial.mMaterial==Materials.NaquadahEnriched))rStack = getDust(aMaterial); - if (rStack == null) rStack = getDust(aMaterial); - return rStack; - } - - public static ItemStack getDustOrIngot(Materials aMaterial, long aMaterialAmount) { - if (aMaterialAmount <= 0) return null; - ItemStack rStack = getDust(aMaterial, aMaterialAmount); - if (rStack == null) rStack = getIngot(aMaterial, aMaterialAmount); - return rStack; - } - - public static ItemStack getDustOrIngot(MaterialStack aMaterial) { - ItemStack rStack = getDust(aMaterial); - if (rStack == null) rStack = getIngot(aMaterial); - return rStack; - } - - /** - * @return a Copy of the OreDictionary.getOres() List - */ - public static ArrayList getOres(OrePrefixes aPrefix, Object aMaterial) { - return getOres(aPrefix.get(aMaterial)); - } - - /** - * @return a Copy of the OreDictionary.getOres() List - */ - public static ArrayList getOres(Object aOreName) { - String aName = aOreName == null ? E : aOreName.toString(); - ArrayList rList = new ArrayList(); - if (GT_Utility.isStringValid(aName)) rList.addAll(OreDictionary.getOres(aName)); - return rList; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java deleted file mode 100644 index 74655fb744..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.util; - -import java.util.HashMap; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -public class SpecialBehaviourTooltipHandler { - - private static final HashMap mTooltipCache = new HashMap(); - - public static void addTooltipForItem(ItemStack aStack, String aTooltip) { - mTooltipCache.put(aStack, aTooltip); - } - - @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event){ - if (event != null) { - if (event.itemStack != null) { - for (ItemStack aKey : mTooltipCache.keySet()) { - if (GT_Utility.areStacksEqual(aKey, event.itemStack, false)) { - String s = mTooltipCache.get(aKey); - if (s != null && s.length() > 0) { - event.toolTip.add(EnumChatFormatting.RED+s); - } - } - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java deleted file mode 100644 index 795fd18826..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; - -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.ConcurrentHashMap; - -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -public abstract class GTPP_Worldgen{ - - public final String mWorldGenName; - public final boolean mEnabled; - private final Map mDimensionMap = new ConcurrentHashMap(); - - public GTPP_Worldgen(String aName, List aList, boolean aDefault) { - mWorldGenName = aName; - mEnabled = sCustomWorldgenFile.get("worldgen", mWorldGenName, aDefault); - if (mEnabled) aList.add(this); - } - - /** - * @param aWorld The World Object - * @param aRandom The Random Generator to use - * @param aBiome The Name of the Biome (always != null) - * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End - * @param aChunkX xCoord of the Chunk - * @param aChunkZ zCoord of the Chunk - * @return if the Worldgeneration has been successfully completed - */ - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return false; - } - - /** - * @param aWorld The World Object - * @param aRandom The Random Generator to use - * @param aBiome The Name of the Biome (always != null) - * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End - * @param aChunkX xCoord of the Chunk - * @param aChunkZ zCoord of the Chunk - * @return if the Worldgeneration has been successfully completed - */ - public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - return false; - } - - public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { - String aDimName = aWorld.provider.getDimensionName(); - Boolean tAllowed = mDimensionMap.get(aDimName); - if (tAllowed == null) { - boolean tValue = sCustomWorldgenFile.get("worldgen.dimensions." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType); - mDimensionMap.put(aDimName, tValue); - return tValue; - } - return tAllowed; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java deleted file mode 100644 index ca78a72e04..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java +++ /dev/null @@ -1,77 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import java.util.Collection; -import java.util.Random; - -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -public class GTPP_Worldgen_Boulder extends GTPP_Worldgen_Ore { - public GTPP_Worldgen_Boulder(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, boolean aAllowToGenerateinVoid) { - super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); - } - - @Override - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { - for (int i = 0; i < mAmount; i++) { - int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); - Block tBlock = aWorld.getBlock(tX, tY - 7, tZ); - if (tBlock != null && tBlock.isOpaqueCube() && aWorld.getBlock(tX, tY - 6, tZ).isAir(aWorld, tX, tY - 6, tZ)) { - float math_pi = CORE.PI; - float var6 = aRandom.nextFloat() * math_pi; - float var1b = mSize / 8.0F; - float var3b = MathHelper.sin(var6) * var1b; float var4b = MathHelper.cos(var6) * var1b; - float var8b = -2*var3b;float var9b = -2*var4b; - int var10b = (tX + 8);int var11b = (tZ + 8); - float var7 = (var10b + var3b); - float var11 = (var11b + var4b); - int var5b = aRandom.nextInt(3);int var6b = aRandom.nextInt(3);int var7b = var6b - var5b; - float var15 = (tY + var5b - 2); - float var12b = math_pi / mSize; - - for (int var19 = 0; var19 <= mSize; ++var19) { - float var2b = var19 / mSize; - float var20 = var7 + var8b * var2b; - float var22 = var15 + var7b * var2b; - float var24 = var11 + var9b * var2b; - float var26 = aRandom.nextFloat() * mSize / 16.0F; - float var28 = ((MathHelper.sin(var19 * var12b) + 1.0F) * var26 + 1.0F) / 2.0F; - int var32 = MathHelper.floor_float(var20 - var28); - int var33 = MathHelper.floor_float(var22 - var28); - int var34 = MathHelper.floor_float(var24 - var28); - int var35 = MathHelper.floor_float(var20 + var28); - int var36 = MathHelper.floor_float(var22 + var28); - int var37 = MathHelper.floor_float(var24 + var28); - - for (int var38 = var32; var38 <= var35; ++var38) { - float var39 = (var38 + 0.5F - var20) / (var28); - float var13b = var39 * var39; - if (var13b < 1.0F) { - for (int var41 = var33; var41 <= var36; ++var41) { - float var42 = (var41 + 0.5F - var22) / (var28); - float var14b = var13b + var42 * var42; - if (var14b < 1.0F) { - for (int var44 = var34; var44 <= var37; ++var44) { - float var45 = (var44 + 0.5F - var24) / (var28); - Block block = aWorld.getBlock(var38, var41, var44); - if (var14b + var45 * var45 < 1.0F && ((mAllowToGenerateinVoid && aWorld.getBlock(var38, var41, var44).isAir(aWorld, var38, var41, var44)) || (block != null && !(block instanceof BlockContainer)))) { - aWorld.setBlock(var38, var41, var44, mBlock, mBlockMeta, 0); - } - } - } - } - } - } - } - } - } - return true; - } - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java deleted file mode 100644 index 7cd215aa4e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java +++ /dev/null @@ -1,167 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Random; - -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.common.blocks.GT_TileEntity_Ores; -import gregtech.loaders.misc.GT_Achievements; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; - -public class GTPP_Worldgen_GT_Ore_Layer -extends GTPP_Worldgen { - public static ArrayList sList = new ArrayList(); - public static int sWeight = 0; - public final short mMinY; - public final short mMaxY; - public final short mWeight; - public final short mDensity; - public final short mSize; - public short mPrimaryMeta; - public short mSecondaryMeta; - public short mBetweenMeta; - public short mSporadicMeta; - public final String mRestrictBiome; - public final boolean mDarkWorld; - public final String aTextWorldgen = "worldgen.gtpp."; - - public GTPP_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { - super(aName, sList, aDefault); - this.mDarkWorld = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); - this.mMinY = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); - this.mMaxY = ((short) Math.max(this.mMinY + 5, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); - this.mWeight = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); - this.mDensity = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); - this.mSize = ((short) Math.max(1, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); - this.mPrimaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); - this.mSecondaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); - this.mBetweenMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); - this.mSporadicMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); - this.mRestrictBiome = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); - - if (this.mEnabled) { - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - sWeight += this.mWeight; - } - } - - public GTPP_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, - int aSize, Material aPrimary, Material aSecondary, Material aBetween, - Material aSporadic) { - super(aName, sList, aDefault); - this.mDarkWorld = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Darkworld", true); - this.mMinY = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); - this.mMaxY = ((short) Math.max(this.mMinY + 5, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); - this.mWeight = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); - this.mDensity = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); - this.mSize = ((short) Math.max(1, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); - /*this.mPrimaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); - this.mSecondaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); - this.mBetweenMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); - this.mSporadicMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); - */this.mRestrictBiome = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); - - if (this.mEnabled) { - /* GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); - */ sWeight += this.mWeight; - } - } - - @Override - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { - return false; //Not the correct biome for ore mix - } - if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (false)) || ((aDimensionType == 0) && (this.mDarkWorld)) || ((aDimensionType == 1) && (false)) || ((aWorld.provider.getDimensionName().equals("Moon")) && (false)) || ((aWorld.provider.getDimensionName().equals("Mars")) && (false)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { - return false; - } - int tMinY = this.mMinY + aRandom.nextInt(this.mMaxY - this.mMinY - 5); - - int cX = aChunkX - aRandom.nextInt(this.mSize); - int eX = aChunkX + 16 + aRandom.nextInt(this.mSize); - for (int tX = cX; tX <= eX; tX++) { - int cZ = aChunkZ - aRandom.nextInt(this.mSize); - int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize); - for (int tZ = cZ; tZ <= eZ; tZ++) { - if (this.mSecondaryMeta > 0) { - for (int i = tMinY - 1; i < tMinY + 2; i++) { - if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) { - setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false); - } - } - } - if ((this.mBetweenMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) { - setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false); - } - if (this.mPrimaryMeta > 0) { - for (int i = tMinY + 3; i < tMinY + 6; i++) { - if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) { - setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false); - } - } - } - if ((this.mSporadicMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) { - setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false); - } - } - } - if (GT_Values.D1) { - System.out.println("Generated Orevein: " + this.mWorldGenName+" "+aChunkX +" "+ aChunkZ); - } - return true; - } - private Method mSetOre = null; - private boolean setOreBlock(World world, int x, int y, int z, int secondarymeta, boolean bool){ - - if (mSetOre == null){ - try { - mSetOre = GT_TileEntity_Ores.class.getMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class); - } - catch (SecurityException | NoSuchMethodException e) { - try { - mSetOre = GT_TileEntity_Ores.class.getMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class); - } - catch (SecurityException | NoSuchMethodException r) {} - } - } - - if (mSetOre != null) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - try { - return (boolean) mSetOre.invoke(world, x, y, z, secondarymeta, bool); - } - catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException t) { - return false; - } - } - else { - try { - return (boolean) mSetOre.invoke(world, x, y, z, secondarymeta); - } - catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException t) { - return false;} - } - } - else { - return false; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java deleted file mode 100644 index aae3bdd48a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java +++ /dev/null @@ -1,41 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import static gtPlusPlus.xmod.gregtech.api.world.WorldGenUtils.mOresToRegister; - -import gtPlusPlus.core.material.Material; - -public class GTPP_Worldgen_Handler implements Runnable{ - - - - @Override - public void run() { - - for (GT_OreVein_Object ore : mOresToRegister){ - generateNewVein(ore); - } - - } - - - - private final GTPP_Worldgen_GT_Ore_Layer generateNewVein(final GT_OreVein_Object ore){ - return generateNewVein(ore.mOreMixName, ore.minY, ore.maxY, ore.weight, ore.density, ore.size, ore.aPrimary, ore.aSecondary, ore.aBetween, ore.aSporadic); - } - - private final GTPP_Worldgen_GT_Ore_Layer generateNewVein(String mOreMixName, int minY, int maxY, int weight, int density, int size, - Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic){ - return new GTPP_Worldgen_GT_Ore_Layer( - "ore.mix."+mOreMixName, //String aName, - true, //boolean aDefault, - minY, maxY, //int aMinY, int aMaxY, - weight, //int aWeight, - density, //int aDensity, - size, //int aSize, - aPrimary, //Materials aPrimary, - aSecondary, //Materials aSecondary, - aBetween, //Materials aBetween, - aSporadic); //Materials aSporadic - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java deleted file mode 100644 index 2d7f817060..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java +++ /dev/null @@ -1,33 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; - -import java.util.ArrayList; -import java.util.Collection; - -import net.minecraft.block.Block; - -import gtPlusPlus.xmod.gregtech.HANDLER_GT; - -public abstract class GTPP_Worldgen_Ore extends GTPP_Worldgen { - public final int mBlockMeta, mAmount, mSize, mMinY, mMaxY, mProbability, mDimensionType; - public final Block mBlock; - public final Collection mBiomeList; - public final boolean mAllowToGenerateinVoid; - private final String aTextWorldgen = "worldgen."; - - public GTPP_Worldgen_Ore(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, boolean aAllowToGenerateinVoid) { - super(aName, HANDLER_GT.sCustomWorldgenList, aDefault); - mDimensionType = aDimensionType; - mBlock = aBlock; - mBlockMeta = Math.min(Math.max(aBlockMeta, 0), 15); - mProbability = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "Probability", aProbability); - mAmount = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "Amount", aAmount); - mSize = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "Size", aSize); - mMinY = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "MinHeight", aMinY); - mMaxY = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "MaxHeight", aMaxY); - if (aBiomeList == null) mBiomeList = new ArrayList(); - else mBiomeList = aBiomeList; - mAllowToGenerateinVoid = aAllowToGenerateinVoid; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java deleted file mode 100644 index e66106ad4a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java +++ /dev/null @@ -1,75 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import java.util.Collection; -import java.util.Random; - -import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.chunk.IChunkProvider; - -public class GTPP_Worldgen_Ore_Normal extends GTPP_Worldgen_Ore { - public GTPP_Worldgen_Ore_Normal(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, boolean aAllowToGenerateinVoid) { - super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); - } - - @Override - public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { - if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { - for (int i = 0; i < mAmount; i++) { - int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); - if (mAllowToGenerateinVoid || aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) { - float math_pi = CORE.PI;float var1b = mSize / 8.0F; - float var6 = aRandom.nextFloat() * math_pi; - float var3b = MathHelper.sin(var6) * var1b; float var4b = MathHelper.cos(var6) * var1b; - float var8b = -2*var3b;float var9b = -2*var4b; - int var10b = (tX + 8);int var11b = (tZ + 8); - float var7 = (var10b + var3b); - float var11 = (var11b + var4b); - int var5b = aRandom.nextInt(3);int var6b = aRandom.nextInt(3);int var7b = var6b - var5b; - float var15 = (tY + var5b - 2); - float var12b = math_pi / mSize; - - for (int var19 = 0; var19 <= mSize; ++var19) { - float var2b = var19 / mSize; - float var20 = var7 + var8b * var2b; - float var22 = var15 + var7b * var2b; - float var24 = var11 + var9b * var2b; - float var26 = aRandom.nextFloat() * mSize / 16.0F; - float var28 = ((MathHelper.sin(var19 * var12b) + 1.0F) * var26 + 1.0F) / 2.0F; - int var32 = MathHelper.floor_float(var20 - var28); - int var33 = MathHelper.floor_float(var22 - var28); - int var34 = MathHelper.floor_float(var24 - var28); - int var35 = MathHelper.floor_float(var20 + var28); - int var36 = MathHelper.floor_float(var22 + var28); - int var37 = MathHelper.floor_float(var24 + var28); - - for (int var38 = var32; var38 <= var35; ++var38) { - float var39 = (var38 + 0.5F - var20) / (var28); - float var13b = var39 * var39; - if (var13b < 1.0F) { - for (int var41 = var33; var41 <= var36; ++var41) { - float var42 = (var41 + 0.5F - var22) / (var28); - float var14b = var13b + var42 * var42; - if (var14b < 1.0F) { - for (int var44 = var34; var44 <= var37; ++var44) { - float var45 = (var44 + 0.5F - var24) / (var28); - Block block = aWorld.getBlock(var38, var41, var44); - if (var14b + var45 * var45 < 1.0F && ((mAllowToGenerateinVoid && aWorld.getBlock(var38, var41, var44).isAir(aWorld, var38, var41, var44)) || (block != null && (block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.stone) || block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.end_stone) || block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.netherrack))))) { - aWorld.setBlock(var38, var41, var44, mBlock, mBlockMeta, 0); - } - } - } - } - } - } - } - } - } - return true; - } - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java deleted file mode 100644 index 770083fee8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import gtPlusPlus.core.material.Material; - -public class GT_OreVein_Object { - - final String mOreMixName; //String aName, - final int minY, maxY; //int aMinY, int aMaxY, - final int weight; //int aWeight, - final int density; //int aDensity, - final int size; //int aSize, - final Material aPrimary; //Materials aPrimary, - final Material aSecondary; //Materials aSecondary, - final Material aBetween; //Materials aBetween, - final Material aSporadic; //Materials aSporadic - - GT_OreVein_Object(String mOreMixName, int minY, int maxY, int weight, int density, int size, - Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic){ - this.mOreMixName = mOreMixName; - this.minY = minY; - this.maxY = maxY; - this.weight = weight; - this.density = density; - this.size = size; - this.aPrimary = aPrimary; - this.aSecondary = aSecondary; - this.aBetween = aBetween; - this.aSporadic = aSporadic; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java deleted file mode 100644 index fd0738596a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.world; - -import java.util.ArrayList; -import java.util.List; - -import gtPlusPlus.core.material.Material; - -public class WorldGenUtils { - - static List mOresToRegister = new ArrayList(); - - public static final void addNewOreMixForWorldgen(GT_OreVein_Object newVein){ - mOresToRegister.add(newVein); - } - - public static boolean generateNewOreVeinObject(String mOreMixName, int minY, int maxY, int weight, int density, int size, - Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic){ - GT_OreVein_Object newVein = new GT_OreVein_Object(mOreMixName, minY, maxY, weight, density, size, aPrimary, aSecondary, aBetween, aSporadic); - addNewOreMixForWorldgen(newVein); - return true; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java deleted file mode 100644 index 091ee734e6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java +++ /dev/null @@ -1,631 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.util.*; - -import org.apache.commons.lang3.ArrayUtils; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.*; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.util.*; -import gregtech.common.GT_Proxy; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.FormattedTooltipString; -import gtPlusPlus.core.handler.AchievementHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.*; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.BaseCustomTileEntity; -import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.BaseCustomPower_MTE; -import gtPlusPlus.xmod.gregtech.common.covers.CoverManager; -import gtPlusPlus.xmod.gregtech.common.helpers.MachineUpdateHandler; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator; -import ic2.core.init.BlocksItems; -import ic2.core.init.InternalName; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class Meta_GT_Proxy { - - static { - Logger.INFO("GT_PROXY - initialized."); - sDoesVolumetricFlaskExist = ReflectionUtils.doesClassExist("gregtech.common.items.GT_VolumetricFlask"); - } - - public static List GT_BlockIconload = new ArrayList<>(); - public static List GT_ItemIconload = new ArrayList<>(); - - public static AutoMap GT_ValidHeatingCoilMetas = new AutoMap(); - - private static Class sBaseMetaTileEntityClass; - private static Class sBaseMetaTileEntityClass2; - - public static AchievementHandler mAssemblyAchievements; - - public static final Map mCustomGregtechMetaTooltips = new LinkedHashMap(); - - /** - * Does this feature exist within GT? Saves loading useless content if not. - */ - public static final boolean sDoesVolumetricFlaskExist; - - @SideOnly(Side.CLIENT) - public static IIconRegister sBlockIcons, sItemIcons; - - public Meta_GT_Proxy() { - - } - - public static Block sBlockMachines; - - public static void preInit() { - - //New GT++ Block, yay! (Progress) - //sBlockMachines = new GTPP_Block_Machines(); - fixIC2FluidNames(); - - GT_Log.out.println("GT++ Mod: Register TileEntities."); - BaseMetaTileEntity tBaseMetaTileEntity = constructBaseMetaTileEntity(); - BaseMetaTileEntity tBaseMetaTileEntity2 = constructBaseMetaTileEntityCustomPower(); - - GT_Log.out.println("GT++ Mod: Testing BaseMetaTileEntity."); - if (tBaseMetaTileEntity == null || tBaseMetaTileEntity2 == null) { - GT_Log.out.println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft."); - throw new RuntimeException(""); - } - - //Gotta set it here so that we don't try call gregtech too early. - //Must set on the correct side - - if (ReflectionUtils.doesFieldExist(GT_Proxy.class, "gt6Pipe")) { - StaticFields59.mGT6StylePipes = (boolean) StaticFields59.getFieldFromGregtechProxy("gt6Pipe"); - } - else { - StaticFields59.mGT6StylePipes = false; - } - - GT_Log.out.println("GT++ Mod: Registering the BaseMetaTileEntity."); - GameRegistry.registerTileEntity(tBaseMetaTileEntity.getClass(), "BaseMetaTileEntity_GTPP"); - GameRegistry.registerTileEntity(tBaseMetaTileEntity2.getClass(), "BaseMetaTileEntity_GTPP2"); - CoverManager.generateCustomCovers(); - } - - public static void init() { - setValidHeatingCoilMetas(); - PollutionUtils.setPollutionFluids(); - fixIC2FluidNames(); - Utils.registerEvent(new MachineUpdateHandler()); - } - - public static void postInit() { - mAssemblyAchievements = new AchievementHandler(); - fixIC2FluidNames(); - - // Finalise TAE - TAE.finalizeTAE(); - } - - @SuppressWarnings("deprecation") - public static void fixIC2FluidNames() { - //Fix IC2 Hot Water name - try { - String aNewHeatedWaterName = "Heated Water"; - Logger.INFO("Renaming [IC2 Hotspring Water] --> ["+aNewHeatedWaterName+"].");LanguageRegistry.instance().addStringLocalization("fluidHotWater", "Heated Water"); - LanguageRegistry.instance().addStringLocalization("fluidHotWater", aNewHeatedWaterName); - LanguageRegistry.instance().addStringLocalization("ic2.fluidHotWater", aNewHeatedWaterName); - GT_LanguageManager.addStringLocalization("fluidHotWater", aNewHeatedWaterName); - GT_LanguageManager.addStringLocalization("ic2.fluidHotWater", aNewHeatedWaterName); - - Block b = BlocksItems.getFluidBlock(InternalName.fluidHotWater); - if (b != null) { - LanguageRegistry.addName(ItemUtils.getSimpleStack(b), aNewHeatedWaterName); - LanguageRegistry.instance().addStringLocalization(b.getUnlocalizedName(), aNewHeatedWaterName); - GT_LanguageManager.addStringLocalization(b.getUnlocalizedName(), aNewHeatedWaterName); - } - Fluid f = BlocksItems.getFluid(InternalName.fluidHotWater); - if (f != null) { - LanguageRegistry.instance().addStringLocalization(f.getUnlocalizedName(), aNewHeatedWaterName); - GT_LanguageManager.addStringLocalization(f.getUnlocalizedName(), aNewHeatedWaterName); - int aDam = FluidRegistry.getFluidID(f); - ItemStack s = ItemList.Display_Fluid.getWithDamage(1, aDam); - if (s != null) { - LanguageRegistry.addName(s, aNewHeatedWaterName); - } - } - - String[] aLangs = new String[] { - "de_DE", - "en_US", - "en_GB", - "en_IC", - "es_AR", - "es_ES", - "es_MX", - "es_UY", - "es_VE", - "fr_CA", - "fr_FR", - "it_IT", - "ko_KR", - "pt_BR", - "pt_PT", - "ru_RU", - "sv_SE", - "tr_TR", - "zh_CN", - "zh_TW", - }; - String[] aLangValues = new String[] { - "Erhitztes Wasser", - "Heated Water", - "Heated Water", - "Heated Water", - "Agua caliente", - "Agua caliente", - "Agua caliente", - "Agua caliente", - "Agua caliente", - "Eau chauffée", - "Eau chauffée", - "Acqua riscaldata", - "온수", - "Ãgua aquecida", - "Ãgua aquecida", - "Вода Ñ Ð¿Ð¾Ð´Ð¾Ð³Ñ€ÐµÐ²Ð¾Ð¼", - "Uppvärmt vatten", - "Isıtılmış Su", - "热水", - "热水", - - }; - for (int i=0;i aFreezerMapRebaked = new AutoMap(); - AutoMap aRemovedRecipes = new AutoMap(); - - //Find recipes containing Plasma and map them - for (GT_Recipe y : GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList) { - if (y.mFluidInputs.length > 0) { - for (FluidStack r : y.mFluidInputs) { - if (r.getUnlocalizedName().toLowerCase().contains("plasma")) { - aRemovedRecipes.put(y); - continue; - } - } - aFreezerMapRebaked.put(y); - } - } - - AutoMap aNewRecipes = new AutoMap(); - int aAtomicMass = 0; - int aAtomicTier = 0; - - final FluidStack NULL_PLASMA = Materials._NULL.getPlasma(1); - - for (String s : ELEMENT.NAMES) { - - aAtomicMass++; - aAtomicTier = (aAtomicMass/30)+1; - FluidStack aMoltenFluid = null; - FluidStack aPlasma = null; - - //Try Get Material via Gregtech - Materials aGregMaterial = MaterialUtils.getMaterial(s); - if (aGregMaterial != null) { - aMoltenFluid = aGregMaterial.getMolten(1); - if (aMoltenFluid == null) { - aMoltenFluid = aGregMaterial.getFluid(1); - if (aMoltenFluid == null) { - aMoltenFluid = aGregMaterial.getGas(1); - if (aMoltenFluid == null) { - aMoltenFluid = aGregMaterial.getSolid(1); - } - } - } - aPlasma = aGregMaterial.getPlasma(100); - } - - //Just wildcard values - if (aMoltenFluid == null || aPlasma == null) { - if (aMoltenFluid == null) { - aMoltenFluid = FluidUtils.getWildcardFluidStack(s, 1); - } - if (aPlasma == null) { - aPlasma = FluidUtils.getFluidStack("plasma."+s.toLowerCase(), 1); - } - } - - //Skip this material - if (aMoltenFluid == null || aPlasma == null || aPlasma.isFluidEqual(NULL_PLASMA)) { - Logger.INFO("Could not generate Advanced Vacuum Freezer recipe. Cooling "+s+" plasma. Molten Form Exists? "+(aMoltenFluid != null)+" | Plasma Exists? "+(aPlasma != null)); - continue; - } - else { - //Build a new plasma recipe - int aTotalTickTime = (20 * 1 + (aAtomicMass)); - GTPP_Recipe aTempRecipe = new GTPP_Recipe(true, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {10000}, - new FluidStack[] { - aPlasma, - FluidUtils.getFluidStack("cryotheum", aTotalTickTime) - }, - new FluidStack[] { - aMoltenFluid - }, - aTotalTickTime, - (int) GT_Values.V[4+aAtomicTier], - aAtomicMass); - - //Add it to the map if it's valid - if (aTempRecipe != null) { - aNewRecipes.put(aTempRecipe); - } - } - - } - - - //Add the new recipes to the map we will rebake over the original - for (GTPP_Recipe w : aNewRecipes) { - aFreezerMapRebaked.put(w); - } - - //Best not touch the original map if we don't have a valid map to override it with. - if (aFreezerMapRebaked.size() > 0) { - - int aOriginalCount = GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.size(); - - //Empty the original map - GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.clear(); - - //Rebake the real map - for (GT_Recipe w : aFreezerMapRebaked) { - GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.add(w); - } - - return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.size() >= aOriginalCount; - } - - return false; - } - - public static TileEntity constructCustomGregtechMetaTileEntityByMeta(int aMeta) { - if (aMeta == 12) { - return Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower(); - } - else { - return Meta_GT_Proxy.constructBaseMetaTileEntity(); - } - } - - public static BaseCustomTileEntity constructBaseMetaTileEntity() { - if (sBaseMetaTileEntityClass == null) { - try { - sBaseMetaTileEntityClass = BaseCustomTileEntity.class; - return (BaseCustomTileEntity) BaseCustomTileEntity.class.newInstance(); - } catch (Throwable arg1) { - try { - Constructor g = BaseCustomTileEntity.class.getConstructors()[0]; - g.setAccessible(true); - return (BaseCustomTileEntity) g.newInstance(); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException | SecurityException e) { - } - } - } - try { - return (BaseCustomTileEntity) ((BaseCustomTileEntity) sBaseMetaTileEntityClass.newInstance()); - } catch (Throwable arg0) { - arg0.printStackTrace(GT_Log.err); - try { - Constructor g = BaseCustomTileEntity.class.getConstructors()[0]; - g.setAccessible(true); - return (BaseCustomTileEntity) g.newInstance(); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException | SecurityException e) { - GT_Log.err - .println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft."); - e.printStackTrace(GT_Log.err); - throw new RuntimeException(e); - } - } - } - - public static BaseCustomPower_MTE constructBaseMetaTileEntityCustomPower() { - if (sBaseMetaTileEntityClass2 == null) { - try { - sBaseMetaTileEntityClass2 = BaseCustomPower_MTE.class; - return (BaseCustomPower_MTE) BaseCustomPower_MTE.class.newInstance(); - } catch (Throwable arg1) { - try { - Constructor g = BaseCustomPower_MTE.class.getConstructors()[0]; - g.setAccessible(true); - return (BaseCustomPower_MTE) g.newInstance(); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException | SecurityException e) { - // e.printStackTrace(); - } - } - } - - try { - return (BaseCustomPower_MTE) ((BaseCustomPower_MTE) sBaseMetaTileEntityClass2.newInstance()); - } catch (Throwable arg0) { - arg0.printStackTrace(GT_Log.err); - try { - Constructor g = BaseCustomPower_MTE.class.getConstructors()[0]; - g.setAccessible(true); - return (BaseCustomPower_MTE) g.newInstance(); - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException | SecurityException e) { - GT_Log.err - .println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft."); - e.printStackTrace(GT_Log.err); - throw new RuntimeException(e); - } - } - } - - - - - - public static boolean setTileEntityClassAsBlacklistedInWorldAccelerator(String aClassName) { - if (CORE.GTNH) { - Class aMainModClass = ReflectionUtils.getClass("com.dreammaster.main.MainRegistry"); - Class aCoreModConfig = ReflectionUtils.getClass("com.dreammaster.config"); - if (aMainModClass != null && aCoreModConfig != null) { - Field aCoreConfig = ReflectionUtils.getField(aMainModClass, "CoreConfig"); - if (aCoreConfig != null) { - Field aBlackList = ReflectionUtils.getField(aCoreModConfig, "BlacklistedTileEntiyClassNames"); - Object aInstance = ReflectionUtils.getFieldValue(aCoreConfig); - if (aBlackList != null && aInstance != null) { - String[] aBlackListValue = (String[]) ReflectionUtils.getFieldValue(aBlackList, aInstance); - if (aBlackListValue != null) { - aBlackListValue = ArrayUtils.add(aBlackListValue, aClassName); - ReflectionUtils.setField(aInstance, aBlackList, aBlackListValue); - return true; - } - } - } - } - } - else { - GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames = ArrayUtils.add(GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames, aClassName); - return true; - } - return false; - } - - - - public static void setValidHeatingCoilMetas() { - for (int i = 0; i <= 6; i++ ) { - GT_ValidHeatingCoilMetas.put(i); - } - if (CORE.GTNH) { - for (int i = 7; i <= 8; i++ ) { - GT_ValidHeatingCoilMetas.put(i); - } - } - } - - public static boolean areWeUsingGregtech5uExperimental(){ - final int version = GregTech_API.VERSION; - if ((version == 508) || (version == 507)){ - return false; - } - else if (version == 509){ - return true; - } - else { - return false; - } - } - - static GT_Proxy[] mProxies = new GT_Proxy[2]; - - /** - * @deprecated Use {@link StaticFields59#getFieldFromGregtechProxy(boolean,String)} instead - */ - public static Object getFieldFromGregtechProxy(boolean client, String fieldName) { - return StaticFields59.getFieldFromGregtechProxy(client, fieldName); - } - - public static void setCustomGregtechTooltip(String aNbtTagName, FormattedTooltipString aData) { - mCustomGregtechMetaTooltips.put(aNbtTagName, aData); - } - - public static void conStructGtTileBlockTooltip(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { - try { - int tDamage = aStack.getItemDamage(); - if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) { - return; - } - - if (GregTech_API.METATILEENTITIES[tDamage] != null) { - IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); - if (tTileEntity.getDescription() != null) { - int i = 0; - for (String tDescription : tTileEntity.getDescription()) { - if (GT_Utility.isStringValid(tDescription)) { - if(tDescription.contains("%%%")){ - String[] tString = tDescription.split("%%%"); - if(tString.length>=2){ - StringBuffer tBuffer = new StringBuffer(); - Object tRep[] = new String[tString.length / 2]; - for (int j = 0; j < tString.length; j++) - if (j % 2 == 0) tBuffer.append(tString[j]); - else {tBuffer.append(" %s"); tRep[j / 2] = tString[j];} - aList.add(String.format(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tBuffer.toString(), !GregTech_API.sPostloadFinished), tRep)); - } - }else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished ); - aList.add(tTranslated.equals("") ? tDescription : tTranslated);} - }else i++; - } - } - - - - if (tTileEntity.getEUCapacity() > 0L) { - - final long tVoltage = tTileEntity.getInputVoltage(); - byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); - - //Custom handling - if (tDamage < 30500 && tDamage >= 30400) { - int aOffset = tDamage - 30400; - if ((aOffset) <= 10) { - tTier -= 2; - aList.add(EnumChatFormatting.BOLD+"16"+" Fuse Slots"+EnumChatFormatting.GRAY); - aList.add("Per each fuse, you may insert "+EnumChatFormatting.YELLOW+(GT_Values.V[tTier])+EnumChatFormatting.GRAY+" EU/t"); - aList.add("However this "+EnumChatFormatting.ITALIC+EnumChatFormatting.RED+"MUST"+EnumChatFormatting.GRAY+" be in a single Amp"); - aList.add("This machine can accept upto a single amp of "+GT_Values.VN[Math.min(tTier+2, 12)]+" as a result"); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Breaker_Loss", "Breaker Loss: "+EnumChatFormatting.RED+""+(GT_Values.V[Math.max(tTier-1, 0)]/10)+EnumChatFormatting.GRAY+" EU/t", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Special_Power_1", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - - if (tTileEntity.getInputVoltage() > 0L) { - String inA = "0"; - if (tTileEntity.getInputAmperage() >= 1L) { - inA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - else { - inA = " at " + EnumChatFormatting.WHITE + tTileEntity.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - String a1 = "Voltage IN: "+EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" - + EnumChatFormatting.GRAY + inA; - aList.add(a1); - } - - if (tTileEntity.getOutputVoltage() > 0L) { - String outA = "0"; - if (tTileEntity.getOutputAmperage() >= 1L) { - outA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - else { - outA = " at " + EnumChatFormatting.WHITE + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - String a1 = "Voltage OUT: "+EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" - + EnumChatFormatting.GRAY + outA; - aList.add(a1); - } - - - if (tTileEntity.getOutputVoltage() > 0L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Lossess_EU", "Transmission Loss: "+EnumChatFormatting.DARK_BLUE+""+(tDamage < 30500 && tDamage >= 30400 ? 0 : 1), !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - if (tTileEntity.getEUCapacity() > 0) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE2", - "Internal Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE - + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY + " EU"); - } - } - - /*if (tTileEntity.getEUCapacity() > 0L) { - if (tTileEntity.getInputVoltage() > 0L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY); - } - if (tTileEntity.getOutputVoltage() > 0L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY); - } - if (tTileEntity.getOutputAmperage() > 1L) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY); - } - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY); - }*/ - - } - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - if (aNBT.getBoolean("mMuffler")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished )); - } - if (aNBT.getBoolean("mSteamConverter")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished )); - } - int tAmount = 0; - if ((tAmount = aNBT.getByte("mSteamTanks")) > 0) { - aList.add(tAmount + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMTANKS", "Steam Tank Upgrades", !GregTech_API.sPostloadFinished )); - } - - FluidStack afluid = net.minecraftforge.fluids.FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); - if (afluid != null) { - int tFluidAmount = afluid.amount; - if (tFluidAmount > 0) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_FLUIDTANK", "Tank Fluid: "+tFluidAmount+"L "+afluid.getLocalizedName()+"", !GregTech_API.sPostloadFinished )); - } - } - - } - - //Add Custom Here - - //Add Custom Tooltips - for (String s : mCustomGregtechMetaTooltips.keySet()) { - if (aNBT.hasKey(s)) { - String aTip = mCustomGregtechMetaTooltips.get(s).getTooltip(aNBT.getString(s)); - aList.add(aTip); - } - } - - //Add GT++ Stuff - - if (tDamage >= 30400 && tDamage < 30500) { - aList.add(EnumChatFormatting.UNDERLINE+"Special GT++ Machine"); - } - if ((tDamage >= 750 && tDamage < 1000) || (tDamage >= 30000 && tDamage < 31000)) { - aList.add(CORE.GT_Tooltip); - } - - - } catch (Throwable e) { - e.printStackTrace(GT_Log.err); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java deleted file mode 100644 index 44c580fe4f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java +++ /dev/null @@ -1,303 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.common.GT_Proxy; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.reflect.ProxyFinder; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - -public class StaticFields59 { - - - public static boolean mGT6StylePipes; - - public static final Field mGtBlockCasings5; - public static final Field mPreventableComponents; - public static final Field mDisabledItems; - public static final Field mMultiblockChemicalRecipes; - public static final Field mPyrolyseRecipes; - public static final Field mDescriptionArray; - public static final Field mCasingTexturePages; - public static final Field mAssLineVisualMapNEI; - public static final GT_Recipe_Map sAssemblylineVisualRecipes; - - public static final Method mCalculatePollutionReduction; - public static final Method mAddFurnaceRecipe; - - private static final Map mMaterialCache = new LinkedHashMap(); - - - //OrePrefixes - - static { - Logger.INFO("[SH] Creating Static Helper for various fields which require reflective access."); - - mGtBlockCasings5 = getField(GregTech_API.class, "sBlockCasings5"); - Logger.INFO("[SH] Got Field: sBlockCasings5"); - mPreventableComponents = getField(OrePrefixes.class, "mPreventableComponents"); - Logger.INFO("[SH] Got Field: mPreventableComponents"); - mDisabledItems = getField(OrePrefixes.class, "mDisabledItems"); - Logger.INFO("[SH] Got Field: mDisabledItems"); - mDescriptionArray = getField(GT_MetaTileEntity_TieredMachineBlock.class, "mDescriptionArray"); - Logger.INFO("[SH] Got Field: mDescriptionArray"); - mCasingTexturePages = getField(BlockIcons.class, "casingTexturePages"); - Logger.INFO("[SH] Got Field: casingTexturePages"); - - mAssLineVisualMapNEI = getField(GT_Recipe_Map.class, "sAssemblylineVisualRecipes"); - Logger.INFO("[SH] Got Field: mAssLineVisualMapNEI"); - GT_Recipe_Map aTemp; - if (mAssLineVisualMapNEI != null) { - try { - aTemp = (GT_Recipe_Map) mAssLineVisualMapNEI.get(null); - Logger.INFO("[SH] Got Field: sAssemblylineVisualRecipes"); - } catch (IllegalArgumentException | IllegalAccessException e) { - aTemp = null; - } - } else { - aTemp = null; - } - - sAssemblylineVisualRecipes = aTemp; - - mMultiblockChemicalRecipes = getField(GT_Recipe_Map.class, "sMultiblockChemicalRecipes"); - Logger.INFO("[SH] Got Field: sMultiblockChemicalRecipes"); - if (ReflectionUtils.doesFieldExist(GT_Recipe.GT_Recipe_Map.class, "sPyrolyseRecipes")) { - mPyrolyseRecipes = getField(GT_Recipe_Map.class, "sPyrolyseRecipes"); - Logger.INFO("[SH] Got Field: sPyrolyseRecipes"); - } - else { - mPyrolyseRecipes = null; - } - - mCalculatePollutionReduction = getMethod(GT_MetaTileEntity_Hatch_Muffler.class, "calculatePollutionReduction", - int.class); - Logger.INFO("[SH] Got Method: calculatePollutionReduction"); - - // Yep... - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, - ItemStack.class); - Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe"); - } else { - mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, - ItemStack.class, boolean.class); - Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe"); - } - - } - - public static synchronized final Block getBlockCasings5() { - try { - return (Block) mGtBlockCasings5.get(GregTech_API.class); - } catch (IllegalArgumentException | IllegalAccessException e) { - return null; - } - } - - public static int calculatePollutionReducation(GT_MetaTileEntity_Hatch_Muffler h, int i) { - try { - return (int) mCalculatePollutionReduction.invoke(h, i); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return 0; - } - } - - public static Field getField(Class a, String b) { - return ReflectionUtils.getField(a, b); - } - - public static Method getMethod(Class a, String b, Class... params) { - return ReflectionUtils.getMethod(a, b, params); - } - - public static synchronized final Collection getOrePrefixesBooleanDisabledItems() { - try { - return (Collection) mDisabledItems.get(OrePrefixes.class); - } catch (IllegalArgumentException | IllegalAccessException e) { - return new ArrayList(); - } - } - - - public static synchronized final List geOrePrefixesBooleanPreventableComponents() { - try { - return (List) mPreventableComponents.get(OrePrefixes.class); - } catch (IllegalArgumentException | IllegalAccessException e) { - return new ArrayList(); - } - } - - public static synchronized final GT_Recipe_Map getLargeChemicalReactorRecipeMap() { - try { - return (GT_Recipe_Map) mMultiblockChemicalRecipes.get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - return null; - } - } - - public static synchronized final GT_Recipe_Map getPyrolyseRecipeMap() { - try { - return mPyrolyseRecipes != null ? (GT_Recipe_Map) mPyrolyseRecipes.get(null) : null; - } catch (IllegalArgumentException | IllegalAccessException e) { - return null; - } - } - - public static Materials getMaterial(String aMaterialName) { - Materials m = mMaterialCache.get(aMaterialName); - if (m != null) { - return m; - } - else { - m = Materials.get(aMaterialName); - if (m != null) { - mMaterialCache.put(aMaterialName, m); - return m; - } - return null; - } - } - - public static String[] getDescriptionArray(GT_MetaTileEntity_TieredMachineBlock aTile) { - try { - return (String[]) mDescriptionArray.get(aTile); - } catch (IllegalArgumentException | IllegalAccessException e) { - return new String[] {aTile.mDescription}; - } - } - - public static ITexture getCasingTexturePages(int a, int b) { - try { - ITexture[][] g = (ITexture[][]) mCasingTexturePages.get(null); - if (g != null) { - return g[a][b]; - } - } - catch (Throwable t) { - - } - return null; - } - - - public static Object getFieldFromGregtechProxy(String fieldName) { - return getFieldFromGregtechProxy(Utils.isServer() ? false : true, fieldName); - } - - public static Object getFieldFromGregtechProxy(boolean client, String fieldName) { - Object proxyGT; - - if (Meta_GT_Proxy.mProxies[0] != null && client) { - proxyGT = Meta_GT_Proxy.mProxies[0]; - } else if (Meta_GT_Proxy.mProxies[1] != null && !client) { - proxyGT = Meta_GT_Proxy.mProxies[1]; - } else { - try { - proxyGT = (client ? ProxyFinder.getClientProxy(GT_Mod.instance) - : ProxyFinder.getServerProxy(GT_Mod.instance)); - } catch (final ReflectiveOperationException e1) { - proxyGT = null; - Logger.INFO("Failed to obtain instance of GT " + (client ? "Client" : "Server") + " proxy."); - } - if (Meta_GT_Proxy.mProxies[0] == null && client) { - Meta_GT_Proxy.mProxies[0] = (GT_Proxy) proxyGT; - } else if (Meta_GT_Proxy.mProxies[1] == null && !client) { - Meta_GT_Proxy.mProxies[1] = (GT_Proxy) proxyGT; - } - } - - if (proxyGT != null && proxyGT instanceof GT_Proxy) { - try { - return ReflectionUtils.getField(proxyGT.getClass(), fieldName).get(proxyGT); - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - return null; - } - - - - public static int getTierForCoil(Block aBlock, int aMeta) { - if (aBlock == GregTech_API.sBlockCasings1 && (aMeta >= 12 && aMeta <= 14)) { - return aMeta == 12 ? 1 : aMeta == 13 ? 2 : 3; - } - else if (aBlock == getBlockCasings5() && (aMeta >= 0 && aMeta <= 10)) { - return aMeta; - } - return 0; - } - - public static int getHeatingCapacityForCoil(Block aBlock, int aMeta) { - int aTier = getTierForCoil(aBlock, aMeta); - return aTier > 0 ? getHeatingCapacityForCoilTier(aTier) : 0; - } - - public static int getHeatingCapacityForCoilTier(int aCoilTier) { - int mHeatingCapacity = 0; - switch (aCoilTier) { - case 0: - mHeatingCapacity = 1800; - break; - case 1: - mHeatingCapacity = 2700; - break; - case 2: - mHeatingCapacity = 3600; - break; - case 3: - mHeatingCapacity = 4500; - break; - case 4: - mHeatingCapacity = 5400; - break; - case 5: - mHeatingCapacity = 7200; - break; - case 6: - mHeatingCapacity = 9000; - break; - case 7: - mHeatingCapacity = 9900; - break; - case 8: - mHeatingCapacity = 10800; - break; - case 9: - mHeatingCapacity = 6300; - break; - case 10: - mHeatingCapacity = 9000; - break; - default: - Logger.INFO("Heating Coils are bad."); - mHeatingCapacity = 0; - } - if (CORE.GTNH && aCoilTier <= 10) { - mHeatingCapacity += 1; - } - return mHeatingCapacity; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java deleted file mode 100644 index 01f655c355..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java +++ /dev/null @@ -1,534 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.ArrayList; -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.IDebugableBlock; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_Generic_Block; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gregtech.common.blocks.GT_Item_Machines; -import gregtech.common.blocks.GT_Material_Machines; -import gregtech.common.render.GT_Renderer_Block; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; -import net.minecraft.block.Block; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider { - public static ThreadLocal mTemporaryTileEntity = new ThreadLocal(); - - public GTPP_Block_Machines() { - super(GTPP_Item_Machines.class, "gtpp.blockmachines", new GT_Material_Machines()); - GregTech_API.registerMachineBlock(this, -1); - this.setHardness(1.0F); - this.setResistance(10.0F); - this.setStepSound(soundTypeMetal); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - this.isBlockContainer = true; - } - - public String getHarvestTool(int aMeta) { - switch (aMeta / 4) { - case 0 : - return "wrench"; - case 1 : - return "wrench"; - case 2 : - return "cutter"; - case 3 : - return "axe"; - default : - return "wrench"; - } - } - - public int getHarvestLevel(int aMeta) { - return aMeta % 4; - } - - protected boolean canSilkHarvest() { - return false; - } - - public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof BaseTileEntity) { - ((BaseTileEntity) tTileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); - } - - } - - public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { - super.onBlockAdded(aWorld, aX, aY, aZ); - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - - } - - public String getUnlocalizedName() { - int tDamage = 0; - String aUnlocalName = (tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length) - ? (GregTech_API.METATILEENTITIES[tDamage] != null - ? ("gtpp.blockmachines.name" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName()) - : ("gtpp.blockmachines.name")) : ""; - - Logger.INFO("Unlocal Name: "+aUnlocalName); - return aUnlocalName; - } - - public String getLocalizedName() { - String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");; - if (aName.toLowerCase().contains(".name")) { - aName = StatCollector.translateToLocal(getUnlocalizedName() + ".name"); - } - if (aName.toLowerCase().contains(".name")) { - aName = StatCollector.translateToLocal("gt.blockmachines" + ".name"); - } - if (aName.toLowerCase().contains(".name")) { - aName = "BAD"; - } - Logger.INFO("Name: "+aName); - return aName; - } - - public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return 0; - } - - public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 100 : 0; - } - - public int getRenderType() { - return GTPP_Render_MachineBlock.INSTANCE == null ? super.getRenderType() : GTPP_Render_MachineBlock.INSTANCE.mRenderID; - } - - public boolean isFireSource(World aWorld, int aX, int aY, int aZ, ForgeDirection side) { - return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; - } - - public boolean isFlammable(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; - } - - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess aWorld, int aX, int aY, int aZ) { - return false; - } - - public boolean canConnectRedstone(IBlockAccess var1, int var2, int var3, int var4, int var5) { - return true; - } - - public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { - return false; - } - - public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { - return false; - } - - public boolean hasTileEntity(int aMeta) { - return true; - } - - public boolean hasComparatorInputOverride() { - return true; - } - - public boolean renderAsNormalBlock() { - return false; - } - - public boolean canProvidePower() { - return true; - } - - public boolean isOpaqueCube() { - return false; - } - - public TileEntity createNewTileEntity(World aWorld, int aMeta) { - return this.createTileEntity(aWorld, aMeta); - } - - public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { - return BlockIcons.MACHINE_LV_SIDE.getIcon(); - } - - public IIcon getIcon(int aSide, int aMeta) { - return BlockIcons.MACHINE_LV_SIDE.getIcon(); - } - - public boolean onBlockEventReceived(World aWorld, int aX, int aY, int aZ, int aData1, int aData2) { - super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2); - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; - } - - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, - Entity collider) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - ((IGregTechTileEntity) tTileEntity).addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, - collider); - } else { - super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); - } - } - - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null - ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) - : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - - @SideOnly(Side.CLIENT) - public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null - ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) - : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - - public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { - TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) - .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); - this.minX = bbb.minX; - this.minY = bbb.minY; - this.minZ = bbb.minZ; - this.maxX = bbb.maxX; - this.maxY = bbb.maxY; - this.maxZ = bbb.maxZ; - } else { - super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ); - } - } - - public void setBlockBoundsForItemRender() { - super.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - - public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); - } else { - super.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); - } - } - - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - - } - - public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { - return super.getBlockHardness(aWorld, aX, aY, aZ); - } - - public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess() - && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) - ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); - } - - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, - float par2, float par3) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity == null) { - return false; - } else { - if (aPlayer.isSneaking()) { - ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if (tCurrentItem == null) { - return false; - } - - if (!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { - return false; - } - } - - return tTileEntity instanceof IGregTechTileEntity - ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L - ? false - : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) - ? true - : ((IGregTechTileEntity) tTileEntity).onRightclick(aPlayer, (byte) aSide, par1, - par2, par3))) - : false; - } - } - - public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - ((IGregTechTileEntity) tTileEntity).onLeftclick(aPlayer); - } - - } - - public int getDamageValue(World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileID() : 0; - } - - public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof BaseMetaTileEntity) { - ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); - } - - super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); - } - - public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity; - XSTR tRandom = new XSTR(); - mTemporaryTileEntity.set(tGregTechTileEntity); - - for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); ++i) { - ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); - if (tItem != null && tItem.stackSize > 0 && tGregTechTileEntity.isValidSlot(i)) { - EntityItem tItemEntity = new EntityItem(aWorld, - (double) ((float) aX + tRandom.nextFloat() * 0.8F + 0.1F), - (double) ((float) aY + tRandom.nextFloat() * 0.8F + 0.1F), - (double) ((float) aZ + tRandom.nextFloat() * 0.8F + 0.1F), - new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); - if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); - } - - tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; - tItemEntity.motionY = tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D; - tItemEntity.motionZ = tRandom.nextGaussian() * 0.0500000007450581D; - aWorld.spawnEntityInWorld(tItemEntity); - tItem.stackSize = 0; - tGregTechTileEntity.setInventorySlotContents(i, (ItemStack) null); - } - } - } - - super.breakBlock(aWorld, aX, aY, aZ, par5, par6); - aWorld.removeTileEntity(aX, aY, aZ); - } - - public ArrayList getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getDrops() - : (mTemporaryTileEntity.get() == null - ? new ArrayList() - : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops()); - } - - public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getComparatorValue((byte) aSide) - : 0; - } - - public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - if (aSide >= 0 && aSide <= 5) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) - : 0; - } else { - return 0; - } - } - - public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - if (aSide >= 0 && aSide <= 5) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity) - .getStrongOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) - : 0; - } else { - return 0; - } - } - - public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) { - if (!aWorld.isRemote) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null && chance < 1.0F) { - if (tTileEntity instanceof BaseMetaTileEntity && GregTech_API.sMachineNonWrenchExplosions) { - ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); - } - } else { - super.dropBlockAsItemWithChance(aWorld, aX, aY, aZ, par5, chance, par7); - } - } - - } - - public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) { - if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) { - return true; - } else { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null) { - if (tTileEntity instanceof BaseMetaTileEntity) { - return true; - } - - if (tTileEntity instanceof BaseMetaPipeEntity - && (((BaseMetaPipeEntity) tTileEntity).mConnections & -64) != 0) { - return true; - } - - if (tTileEntity instanceof ICoverable - && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0) { - return true; - } - } - - return false; - } - } - - public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity == null - ? 0 - : (tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getLightOpacity() - : (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0)); - } - - public int getLightValue(IBlockAccess aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity ? ((BaseMetaTileEntity) tTileEntity).getLightValue() : 0; - } - - public TileEntity createTileEntity(World aWorld, int aMeta) { - return (TileEntity) (aMeta >= 4 ? Meta_GT_Proxy.constructBaseMetaTileEntity() : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); - } - - public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, - double explosionY, double explosionZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6) - : 10.0F; - } - - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { - for (int i = 0; i < 100; ++i) { - if (GregTech_API.METATILEENTITIES[(30400 + i)] != null) { - par3List.add(new ItemStack(par1, 1, i)); - } - } - - } - - public void onBlockPlacedBy(World aWorld, int aX, int aY, int aZ, EntityLivingBase aPlayer, ItemStack aStack) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null) { - if (tTileEntity instanceof IGregTechTileEntity) { - IGregTechTileEntity var6 = (IGregTechTileEntity) tTileEntity; - if (aPlayer == null) { - var6.setFrontFacing((byte) 1); - } else { - int var7 = MathHelper.floor_double((double) (aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; - int var8 = Math.round(aPlayer.rotationPitch); - if (var8 >= 65 && var6.isValidFacing((byte) 1)) { - var6.setFrontFacing((byte) 1); - } else if (var8 <= -65 && var6.isValidFacing((byte) 0)) { - var6.setFrontFacing((byte) 0); - } else { - switch (var7) { - case 0 : - var6.setFrontFacing((byte) 2); - break; - case 1 : - var6.setFrontFacing((byte) 5); - break; - case 2 : - var6.setFrontFacing((byte) 3); - break; - case 3 : - var6.setFrontFacing((byte) 4); - } - } - } - } - - } - } - - public ArrayList getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) { - TileEntity tTileEntity = aPlayer.worldObj.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity - ? ((BaseMetaTileEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) - : (tTileEntity instanceof BaseMetaPipeEntity - ? ((BaseMetaPipeEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) - : null); - } - - public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - if (((IGregTechTileEntity) tTileEntity).getColorization() == (byte) (~aColor & 15)) { - return false; - } else { - ((IGregTechTileEntity) tTileEntity).setColorization((byte) (~aColor & 15)); - return true; - } - } else { - return false; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java deleted file mode 100644 index ba3b05ff8e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java +++ /dev/null @@ -1,229 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_ItsNotMyFaultException; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - -import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -public class GTPP_Item_Machines extends ItemBlock { - public GTPP_Item_Machines(Block par1) { - super(par1); - this.setMaxDamage(0); - this.setHasSubtypes(true); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - } - - @SuppressWarnings("unchecked") - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { - try { - int e = this.getDamage(aStack) + 30400; //Add Offset - if (e <= 0 || e >= GregTech_API.METATILEENTITIES.length) { - return; - } - - if (GregTech_API.METATILEENTITIES[e] != null) { - - IGregTechTileEntity aNBT = GregTech_API.METATILEENTITIES[e].getBaseMetaTileEntity(); - - final long tVoltage = aNBT.getInputVoltage(); - byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); - - /*if (aNBT.getDescription() != null) { - int tAmount = 0; - String[] arg7 = aNBT.getDescription(); - int arg8 = arg7.length-1; - - if (arg7 != null && arg7.length > 0) { - for (String t : arg7) { - aList.add(t); - } - - } - else { - aList.add("ERROR"); - } - - for (int y = 0; y < arg8; y++) { - String tDescription = arg7[y]; - - if (tDescription != null) { - aList.add(tDescription+"|"+arg8); - continue; - } - else { - continue; - } - } - }*/ - - if (aNBT.getEUCapacity() > 0L) { - - //Custom handling - if ((e - 30400) <= 100) { - - - if ((e - 30400) <= 10) { - tTier -= 2; - aList.add(EnumChatFormatting.BOLD+"16"+" Fuse Slots"+EnumChatFormatting.GRAY); - aList.add("Per each fuse, you may insert "+EnumChatFormatting.YELLOW+(GT_Values.V[tTier])+EnumChatFormatting.GRAY+" EU/t"); - aList.add("However this "+EnumChatFormatting.ITALIC+EnumChatFormatting.RED+"MUST"+EnumChatFormatting.GRAY+" be in a single Amp"); - aList.add("This machine can accept upto a single amp of "+GT_Values.VN[Math.min(tTier+2, 12)]+" as a result"); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Breaker_Loss", "Breaker Loss: "+EnumChatFormatting.RED+""+(GT_Values.V[Math.max(tTier-1, 0)]/10)+EnumChatFormatting.GRAY+" EU/t", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Special_Power_1", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - - if (aNBT.getInputVoltage() > 0L) { - String inA = "0"; - if (aNBT.getInputAmperage() >= 1L) { - inA = " at " + EnumChatFormatting.YELLOW + aNBT.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - else { - inA = " at " + EnumChatFormatting.WHITE + aNBT.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - String a1 = "Voltage IN: "+EnumChatFormatting.GREEN + aNBT.getInputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + ")" - + EnumChatFormatting.GRAY + inA; - aList.add(a1); - } - - if (aNBT.getOutputVoltage() > 0L) { - String outA = "0"; - if (aNBT.getOutputAmperage() >= 1L) { - outA = " at " + EnumChatFormatting.YELLOW + aNBT.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - else { - outA = " at " + EnumChatFormatting.WHITE + aNBT.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - String a1 = "Voltage OUT: "+EnumChatFormatting.GREEN + aNBT.getOutputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + ")" - + EnumChatFormatting.GRAY + outA; - aList.add(a1); - } - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Lossess_EU", "Transmission Loss: "+EnumChatFormatting.DARK_BLUE+"0", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE2", "Internal Capacity: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + aNBT.getEUCapacity() - + EnumChatFormatting.GRAY + " EU"); - } - } - - NBTTagCompound arg16 = aStack.getTagCompound(); - if (arg16 != null) { - if (arg16.getBoolean("mMuffler")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_MUFFLER", "has Muffler Upgrade", - !GregTech_API.sPostloadFinished)); - } - - if (arg16.getBoolean("mSteamConverter")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMCONVERTER", - "has Steam Upgrade", !GregTech_API.sPostloadFinished)); - } - - boolean arg17 = false; - byte arg18; - if ((arg18 = arg16.getByte("mSteamTanks")) > 0) { - aList.add(arg18 + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMTANKS", - "Steam Tank Upgrades", !GregTech_API.sPostloadFinished)); - } - } - - - aList.add(EnumChatFormatting.UNDERLINE+"Special GT++ Machine"); - - } catch (Throwable arg15) { - arg15.printStackTrace(GT_Log.err); - } - - } - - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { - return false; - } - - public String getUnlocalizedName(ItemStack aStack) { - short tDamage = (short) (this.getDamage(aStack) + 30400); //Add Offset; - return tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length - ? (GregTech_API.METATILEENTITIES[tDamage] != null - ? "gtpp.blockmachines" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName() - : "") - : ""; - } - - public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - super.onCreated(aStack, aWorld, aPlayer); - short tDamage = (short) ((short) this.getDamage(aStack) + 30400); //Add Offset; - if (tDamage < 0 - || tDamage >= GregTech_API.METATILEENTITIES.length && GregTech_API.METATILEENTITIES[tDamage] != null) { - GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); - } - - } - - public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { - short tDamage = (short) ((short) this.getDamage(aStack) + 30400); //Add Offset; - if (tDamage > 0) { - if (GregTech_API.METATILEENTITIES[tDamage] == null) { - return false; - } - - byte tMetaData = 32; - //byte tMetaData = GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType(); - Logger.INFO("Using Meta: "+tMetaData+" for ID "+tDamage+" | "+GregTech_API.METATILEENTITIES[tDamage].getInventoryName()); - if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tMetaData, 3)) { - return false; - } - - if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { - throw new GT_ItsNotMyFaultException( - "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); - } - - if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { - throw new GT_ItsNotMyFaultException( - "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); - } - - IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null) { - tTileEntity.setInitialValuesAsNBT(tTileEntity.isServerSide() ? aStack.getTagCompound() : null, tDamage); - if (aPlayer != null) { - tTileEntity.setOwnerName(aPlayer.getDisplayName()); - } - - tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound()); - } - } else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) { - return false; - } - - if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { - this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); - this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, tDamage); - } - - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java deleted file mode 100644 index c4b2e4f738..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java +++ /dev/null @@ -1,78 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import gregtech.api.enums.TAE; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Material_Casings; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; - -public class GregtechMetaCasingBlocks -extends GregtechMetaCasingBlocksAbstract { - - CasingTextureHandler TextureHandler = new CasingTextureHandler(); - - public GregtechMetaCasingBlocks() { - super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i == 2 || i == 3 || i == 4) { - continue; - } - TAE.registerTexture(0, i, new GT_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60 - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Matter Generation Coil"); //65 - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Matter Fabricator Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Iron Plated Bricks"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil "); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block"); - GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_CokeOven_Coil1.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_CokeOven_Coil2.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_MaterialPress.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_Electrolyzer.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_WireFactory.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_MacerationStack.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_MatterGen.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_MatterFab.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_IronPlatedBricks.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_MultitankExterior.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Reactor_I.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_Reactor_II.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_Coil_BlastSmelter.set(new ItemStack(this, 1, 14)); - GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15)); - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - return CasingTextureHandler.getIcon(aSide, aMeta); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks i = this; - return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java deleted file mode 100644 index 596643e06c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ /dev/null @@ -1,89 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gregtech.api.enums.TAE; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Material_Casings; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2; - -import java.util.List; - -public class GregtechMetaCasingBlocks2 -extends GregtechMetaCasingBlocksAbstract { - - CasingTextureHandler2 TextureHandler = new CasingTextureHandler2(); - - public static class GregtechMetaCasingItemBlocks2 extends GregtechMetaCasingItems { - - public GregtechMetaCasingItemBlocks2(Block par1) { - super(par1); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int meta = aStack.getItemDamage(); - int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); - if (meta == 7 && tier > 0) { - long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); - aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaCasingBlocks2() { - super(GregtechMetaCasingItemBlocks2.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i == 4 || i == 10 || i == 11 || i == 12 || i == 14) { - continue; - } - TAE.registerTexture(1, i, new GT_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); //Tree Farmer Textures - GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Refinery_Internal.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_Power_SubStation.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_Cyclotron_Coil.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); - //GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); - GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); //Tree Farmer Textures - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return CasingTextureHandler2.getIcon(aSide, aMeta); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java deleted file mode 100644 index 8cd6dd0ca8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ /dev/null @@ -1,366 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.TAE; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.blocks.GT_Material_Casings; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -public class GregtechMetaCasingBlocks3 -extends GregtechMetaCasingBlocksAbstract { - - public static boolean mConnectedMachineTextures = false; - CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); - - public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { - - public GregtechMetaCasingItemBlocks3(Block par1) { - super(par1); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int meta = aStack.getItemDamage(); - int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); - if (tier > 0) { - long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); - aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaCasingBlocks3() { - super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - TAE.registerTexture(2, i, new GT_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Supply Depot Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Advanced Cryogenic Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Volcanus Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4) - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing"); - GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Multi_Use.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_BedrockMiner.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Vanadium_Redox_IV.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_Vanadium_Redox_LuV.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_Vanadium_Redox_ZPM.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_Vanadium_Redox_UV.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_Vanadium_Redox_MAX.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_AmazonWarehouse.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_AdvancedVacuum.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_Adv_BlastFurnace.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Fusion_External.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_Fusion_Internal.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_Containment.set(new ItemStack(this, 1, 15)); - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return CasingTextureHandler3.getIcon(aSide, aMeta); - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, - final int aSide) { - final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord); - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if ((tMeta != 12)|| !GregtechMetaCasingBlocks3.mConnectedMachineTextures) { - return getIcon(aSide, tMeta); - } - final int tStartIndex = 0; - if (tMeta == 12) { - final boolean[] tConnectedSides = { - aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta, - aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta, - aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta, - aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta, - aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock - && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta, - aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock - && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta}; - switch (aSide) { - case 0 : { - if (tConnectedSides[0]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); - } - if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); - } - if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); - } - if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); - } - if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); - } - if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); - } - if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (!tConnectedSides[4] && !tConnectedSides[2]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); - } - if (!tConnectedSides[5] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); - } - } - case 1 : { - if (tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); - } - if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); - } - if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); - } - if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); - } - if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); - } - if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); - } - if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); - } - if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[4]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); - } - if (!tConnectedSides[3] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); - } - } - case 2 : { - if (tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); - } - if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); - } - if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); - } - if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); - } - if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[4]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); - } - } - case 3 : { - if (tConnectedSides[3]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); - } - if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); - } - if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); - } - if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); - } - if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); - } - if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (!tConnectedSides[2] && !tConnectedSides[4]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); - } - } - case 4 : { - if (tConnectedSides[4]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); - } - if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); - } - if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); - } - if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); - } - if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); - } - if (!tConnectedSides[3] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); - } - } - case 5 : { - if (tConnectedSides[2]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); - } - if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); - } - if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); - } - if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); - } - if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); - } - if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - if (!tConnectedSides[0] && !tConnectedSides[1]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); - } - if (!tConnectedSides[3] && !tConnectedSides[5]) { - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); - } - break; - } - } - return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); - } - return CasingTextureHandler3.getIcon(aSide, tMeta); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java deleted file mode 100644 index 419b5f3d30..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ /dev/null @@ -1,115 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Material_Casings; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - - -public class GregtechMetaCasingBlocks4 -extends GregtechMetaCasingBlocksAbstract { - - public GregtechMetaCasingBlocks4() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.4", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i == 2 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 12 || i == 13 || i == 14 || i == 15) { - continue; - } - TAE.registerTexture(3, i, new GT_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); //48 - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Industrial_Arc_Furnace.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Vacuum_Furnace.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11)); - } - - //private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); - - /*@Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks4 i = this; - return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - }*/ - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return getStaticIcon((byte) aSide, (byte) aMeta); - } - - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { - //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - return TexturesGtBlock.Casing_Trinium_Titanium.getIcon(); - case 1: - return TexturesGtBlock.TEXTURE_TECH_C.getIcon(); - case 2: - return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); - case 3: - return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon(); - case 4: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 5: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 6: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 7: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 8: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 9: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 10: - if (aSide <2) { - return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon(); - } - else { - return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon(); - } - case 11: - return TexturesGtBlock.TEXTURE_CASING_ROCKETDYNE.getIcon(); - case 12: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 13: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 15: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - default: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - - } - } - return TexturesGtBlock._PlaceHolder.getIcon(); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java deleted file mode 100644 index c594ee0e5d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java +++ /dev/null @@ -1,83 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Material_Casings; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGrinderMultiblock; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - - -public class GregtechMetaCasingBlocks5 -extends GregtechMetaCasingBlocksAbstract { - - //Free Indexes within TAE: 90, 91, 92, 94, 114, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127 - private static final TexturesGrinderMultiblock mGrinderOverlayHandler = new TexturesGrinderMultiblock(); - - public GregtechMetaCasingBlocks5() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", GT_Material_Casings.INSTANCE); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill Casing - TAE.registerTexture(0, 2, new GT_CopiedBlockTexture(this, 6, 0)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill Pipe - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing - TAE.registerTexture(0, 3, new GT_CopiedBlockTexture(this, 6, 3)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing - TAE.registerTexture(0, 4, new GT_CopiedBlockTexture(this, 6, 4)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - - GregtechItemList.Casing_IsaMill_Casing.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_IsaMill_Pipe.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_IsaMill_Gearbox.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_ElementalDuplicator.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Sparge_Tower_Exterior.set(new ItemStack(this, 1, 4)); - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return getStaticIcon(aSide, aMeta); - } - - - public static IIcon getStaticIcon(final int aSide, final int aMeta) { - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); - case 1: - return TexturesGtBlock.TEXTURE_PIPE_GRINDING_MILL.getIcon(); - case 2: - return TexturesGtBlock.TEXTURE_GEARBOX_GRINDING_MILL.getIcon(); - case 3: - return TexturesGtBlock.TEXTURE_TECH_PANEL_D.getIcon(); - case 4: - return TexturesGtBlock.Casing_Machine_Metal_Sheet_H.getIcon(); - } - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks5 i = this; - return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java deleted file mode 100644 index ea59eb50ba..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Block_Casings_Abstract; - -import gtPlusPlus.core.creative.AddToCreativeTab; - -public abstract class GregtechMetaCasingBlocksAbstract -extends GT_Block_Casings_Abstract { - public GregtechMetaCasingBlocksAbstract(final Class aItemClass, final String aName, final Material aMaterial) { - super(aItemClass, aName, aMaterial); - this.setStepSound(soundTypeMetal); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GregTech_API.registerMachineBlock(this, -1); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); - } - - @Override - public String getHarvestTool(final int aMeta) { - return "wrench"; - } - - @Override - public int getHarvestLevel(final int aMeta) { - return 2; - } - - @Override - public float getBlockHardness(final World aWorld, final int aX, final int aY, final int aZ) { - return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); - } - - @Override - public float getExplosionResistance(final Entity aTNT) { - return Blocks.iron_block.getExplosionResistance(aTNT); - } - - @Override - protected boolean canSilkHarvest() { - return false; - } - - @Override - public void onBlockAdded(final World aWorld, final int aX, final int aY, final int aZ) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - } - - @Override - public String getUnlocalizedName() { - return this.mUnlocalizedName; - } - - @Override - public String getLocalizedName() { - return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); - } - - @Override - public boolean canBeReplacedByLeaves(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { - return false; - } - - @Override - public boolean isNormalCube(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { - return true; - } - - @Override - public boolean renderAsNormalBlock() { - return true; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public int getRenderBlockPass() { - return 0; - } - - @Override - public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public int damageDropped(final int par1) { - return par1; - } - - @Override - public int getDamageValue(final World par1World, final int par2, final int par3, final int par4) { - return par1World.getBlockMetadata(par2, par3, par4); - } - - @Override - public int quantityDropped(final Random par1Random) { - return 1; - } - - @Override - public Item getItemDropped(final int par1, final Random par2Random, final int par3) { - return Item.getItemFromBlock(this); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister aIconRegister) { - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(final Item aItem, final CreativeTabs par2CreativeTabs, final List aList) { - for (int i = 0; i < 16; i++) { - aList.add(new ItemStack(aItem, 1, i)); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java deleted file mode 100644 index de51cb164b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import net.minecraft.block.Block; - -public class GregtechMetaCasingItems -extends GregtechMetaItemCasingsAbstract { - public GregtechMetaCasingItems(final Block par1) { - super(par1); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java deleted file mode 100644 index 7fb344a4ec..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -public class GregtechMetaItemCasings1 -extends GregtechMetaItemCasingsAbstract { - public GregtechMetaItemCasings1(final Block par1) { - super(par1); - } - - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { - super.addInformation(aStack, aPlayer, aList, aF3_H); - switch (this.getDamage(aStack)) { - case 0: - aList.add(this.mCasing_Centrifuge); - break; - case 1: - aList.add(this.mCasing_CokeOven); - break; - case 2: - aList.add(this.mCasing_CokeCoil1); - break; - case 3: - aList.add(this.mCasing_CokeCoil2); - break; - default: - aList.add(this.mCasing_CokeCoil2); - break; - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java deleted file mode 100644 index 62e0f0acdf..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_LanguageManager; - -public abstract class GregtechMetaItemCasingsAbstract -extends ItemBlock { - - protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization("mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended"); - protected final String mCasing_CokeOven = GT_LanguageManager.addStringLocalization("mu.cokeoven", "Sturdy and Strong"); - protected final String mCasing_CokeCoil1 = GT_LanguageManager.addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin"); - protected final String mCasing_CokeCoil2 = GT_LanguageManager.addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin"); - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); - - public GregtechMetaItemCasingsAbstract(final Block par1) { - super(par1); - this.setMaxDamage(0); - this.setHasSubtypes(true); - //setCreativeTab(AddToCreativeTab.tabMachines); - } - - @Override - public int getMetadata(final int aMeta) { - return aMeta; - } - - @Override - public String getUnlocalizedName(final ItemStack aStack) { - return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack); - } - - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { - super.addInformation(aStack, aPlayer, aList, aF3_H); - switch (this.getDamage(aStack)) { - case 0: - //aList.add(this.mCasing_Centrifuge); - break; - case 1: - //aList.add(this.mCasing_CokeOven); - break; - case 2: - //aList.add(this.mCasing_CokeCoil1); - break; - case 3: - //aList.add(this.mCasing_CokeCoil2); - break; - default: - break; - } - aList.add(this.mNoMobsToolTip); - aList.add(this.mNoTileEntityToolTip); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java deleted file mode 100644 index 8f5dff592a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.List; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Material_Casings; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - - -public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksAbstract { - - - public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { - - public SpecialCasingItemBlock(Block par1) { - super(par1); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 10) { - //aList.add("Tier: "+GT_Values.VN[aMeta]); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaSpecialMachineCasings() { - super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.2", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); - // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Strong Bronze Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing"); - TAE.registerTexture(84, new GT_CopiedBlockTexture(this, 6, 2)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - - GregtechItemList.Casing_Machine_Custom_1.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Machine_Custom_2.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Machine_Custom_3.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Machine_Custom_4.set(new ItemStack(this, 1, 3)); - } - - public IIcon getIcon(int aSide, int aMeta) { - switch (aMeta) { - case 0: - return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); - case 1: - return Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon(); - case 2: - return TexturesGtBlock.Casing_Material_Laurenium.getIcon(); - case 3: - return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java deleted file mode 100644 index 5a5c923d10..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ /dev/null @@ -1,103 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import java.util.List; - -import gregtech.api.enums.Textures; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Material_Casings; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - - -public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbstract { - - - public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { - - public SpecialCasingItemBlock(Block par1) { - super(par1); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 10) { - //aList.add("Tier: "+GT_Values.VN[aMeta]); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaSpecialMultiCasings() { - super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.1", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); - // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Turbine Shaft"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Tesla Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Structural Solar Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Salt Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - - GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Turbine_Gas.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Turbine_Plasma.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10)); - } - - public IIcon getIcon(int aSide, int aMeta) { - - switch (aMeta) { - - case 0: - return TexturesGtBlock.Casing_Redox_1.getIcon(); - case 1: - return Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon(); - case 2: - return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); - case 3: - return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); - case 4: - return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); - case 5: - return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); - case 6: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - case 7: - return TexturesGtBlock.Casing_Material_Stellite.getIcon(); - case 8: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - case 9: - return TexturesGtBlock.TEXTURE_CASING_FLOTATION.getIcon(); - case 10: - return TexturesGtBlock.Casing_Material_Talonite.getIcon(); - - } - - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java deleted file mode 100644 index cbd585e50d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java +++ /dev/null @@ -1,110 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.blocks.GT_Material_Casings; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; - - -public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbstract { - - - public static class TieredCasingItemBlock extends GregtechMetaCasingItems { - - public TieredCasingItemBlock(Block par1) { - super(par1); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 10) { - aList.add("Tier: "+GT_Values.VN[aMeta]); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaTieredCasingBlocks1() { - super(TieredCasingItemBlock.class, "gtplusplus.blocktieredcasings.1", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); - // Don't register these Textures, Hatches should never need to use their Textures. - } - int aIndex = 0; - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Integral Encasement I"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Integral Encasement II"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Integral Encasement III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Integral Encasement IV"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Integral Encasement V"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Integral Framework I"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Integral Framework II"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Integral Framework III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Integral Framework IV"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Integral Framework V"); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Block"); - - GregtechItemList.GTPP_Casing_ULV.set(new ItemStack(this, 1, 0)); - GregtechItemList.GTPP_Casing_LV.set(new ItemStack(this, 1, 1)); - GregtechItemList.GTPP_Casing_MV.set(new ItemStack(this, 1, 2)); - GregtechItemList.GTPP_Casing_HV.set(new ItemStack(this, 1, 3)); - GregtechItemList.GTPP_Casing_EV.set(new ItemStack(this, 1, 4)); - GregtechItemList.GTPP_Casing_IV.set(new ItemStack(this, 1, 5)); - GregtechItemList.GTPP_Casing_LuV.set(new ItemStack(this, 1, 6)); - GregtechItemList.GTPP_Casing_ZPM.set(new ItemStack(this, 1, 7)); - GregtechItemList.GTPP_Casing_UV.set(new ItemStack(this, 1, 8)); - GregtechItemList.GTPP_Casing_MAX.set(new ItemStack(this, 1, 9)); - - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 10)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 11)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 12)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 13)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 14)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 15)); - } - - public IIcon getIcon(int aSide, int aMeta) { - if (aMeta < 10) { - return TexturesGtBlock.TIERED_MACHINE_HULLS[aMeta].getIcon(); - } - switch (aMeta) { - case 10: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 11: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 12: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 13: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 15: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java deleted file mode 100644 index 3e4b9a3fee..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.fluid; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; - -public class GregtechFluidHandler { - - protected static int cellID = 0; - - public static void run(){ - start(); - } - - private static void start(){ - - /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemUtils.getEmptyCell(), 1000); - */ - - if (!LoadedMods.ThermalFoundation){ - - Logger.INFO("Adding in our own GT versions of Thermal Foundation Fluids if they do not already exist."); - if (!FluidRegistry.isFluidRegistered("cryotheum")) { - FluidUtils.addGtFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemUtils.getEmptyCell(), 1000); - } - if (!FluidRegistry.isFluidRegistered("pyrotheum")) { - FluidUtils.addGtFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemUtils.getEmptyCell(), 1000); - } - if (!FluidRegistry.isFluidRegistered("ender")) { - FluidUtils.addGtFluid("ender", "Resonant Ender", GT_Materials.Ender, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Ender, 1L), ItemUtils.getEmptyCell(), 1000); - } - - } - - if (LoadedMods.IndustrialCraft2){ - Logger.INFO("Adding in GT Fluids for various nuclear related content."); - - FluidUtils.addGtFluid("hydrofluoricAcid", "Industrial Strength Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("HydrofluoricAcid"); - - FluidUtils.generateFluidNoPrefix("SulfurDioxide", "High Quality Sulfur Dioxide", 263, GT_Materials.SulfurDioxide.mRGBa); - - FluidUtils.addGtFluid("sulfurousAcid", "Sulfurous Acid", GT_Materials.SulfurousAcid, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurousAcid, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("SulfurousAcid"); - - FluidUtils.addGtFluid("sulfuricApatite", "Sulfuric Apatite Mix", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("SulfuricApatite"); - - - //Check for IHL Hydrogen Chloride - if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)){ - if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){ - if (LoadedMods.IHL){ - Logger.INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); - } - else { - Logger.INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); - } - FluidUtils.addGtFluid("hydrogenChloride", "Industrial Strength Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("HydrogenChloride"); - } - } - - - FluidUtils.addGtFluid("sulfuricLithium", "Sulfuric Lithium Mix", GT_Materials.SulfuricLithium, 4, 280, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("SulfuricLithium"); - - FluidUtils.addGtFluid("lithiumHydroxide", "Lithium Hydroxide", GT_Materials.LithiumHydroxide, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.LithiumHydroxide, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("LithiumHydroxide"); - - - } - } - - private static ItemStack generateIC2FluidCell(final String fluidNameWithCaps){ - Logger.INFO("Adding a Cell for "+fluidNameWithCaps); - if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic){ - return Utils.createInternalNameAndFluidCell(fluidNameWithCaps); - } - return null; - } - - private static ItemStack generateIC2FluidCellNoOreDict(final String fluidNameWithCaps){ - Logger.INFO("Adding a Cell for "+fluidNameWithCaps); - if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic){ - return Utils.createInternalNameAndFluidCellNoOreDict(fluidNameWithCaps); - } - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java deleted file mode 100644 index 123df8fe0f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java +++ /dev/null @@ -1,82 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import gregtech.api.enums.Textures; - -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; - -public class CasingTextureHandler { - - //private static final TexturesGregtech59 gregtech59 = new TexturesGregtech59(); - //private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58(); - private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock(); - - public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - //Centrifuge - case 0: - return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); - //Coke Oven Frame - case 1: - return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); - //Coke Oven Casing Tier 1 - case 2: - return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon(); - //Coke Oven Casing Tier 2 - case 3: - return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon(); - //Material Press Casings - case 4: - return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); - //Electrolyzer Casings - case 5: - return TexturesGtBlock.Casing_Material_Potin.getIcon(); - //Broken Blue Fusion Casings - case 6: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - //Maceration Stack Casings - case 7: - return TexturesGtBlock.Casing_Material_Tumbaga.getIcon(); - //Broken Pink Fusion Casings - case 8: - return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); - //Matter Fabricator Casings - case 9: - return TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon(); - //Iron Blast Fuance Textures - case 10: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - //Multitank Exterior Casing - case 11: - return TexturesGtBlock.Casing_Material_Grisium.getIcon(); - //Reactor Casing I - case 12: - return TexturesGtBlock.Casing_Material_Stellite.getIcon(); - //Reactor Casing II - case 13: - return TexturesGtBlock.Casing_Material_Zeron100.getIcon(); - case 14: - return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon(); - case 15: - return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon(); - - default: - return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon(); - - } - } - return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); - } - - - public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } - return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);*/ - return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java deleted file mode 100644 index c980997c64..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java +++ /dev/null @@ -1,57 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.util.IIcon; - -import gregtech.api.enums.Textures; - -public class CasingTextureHandler2 { - - public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); - case 1: - return TexturesGtBlock.Casing_Material_HastelloyX.getIcon(); - case 2: - return TexturesGtBlock.Casing_Material_HastelloyN.getIcon(); - case 3: - return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon(); - case 4: - return TexturesGtBlock.Casing_Material_Grisium.getIcon(); - case 5: - return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon(); - case 6: - return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon(); - case 7: - return TexturesGtBlock.Casing_Redox_1.getIcon(); - case 8: - return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon(); - case 9: - return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon(); - case 10: - return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); - case 11: - return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); - case 12: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - case 13: - if (aSide <2) { - return TexturesGtBlock.TEXTURE_TECH_A.getIcon(); - } - else { - return TexturesGtBlock.TEXTURE_TECH_B.getIcon(); - } - case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 15: - return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); - default: - return TexturesGtBlock.Overlay_UU_Matter.getIcon(); - - } - } - return TexturesGtBlock._PlaceHolder.getIcon(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java deleted file mode 100644 index 019a432013..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java +++ /dev/null @@ -1,68 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.util.IIcon; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3; - -public class CasingTextureHandler3 { - - public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - //Aquatic Casing - return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon(); - case 1: - //Inconel Reinforced Casing - return TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon(); - case 2: - //Multi-Use Casing - return TexturesGtBlock.TEXTURE_METAL_PANEL_C.getIcon(); - case 3: - //Trinium Plated Mining Platform Casing - return TexturesGtBlock.Casing_Trinium_Naquadah_Vent.getIcon(); - case 4: - //Vanadium Redox IV - return TexturesGtBlock.Casing_Redox_2.getIcon(); - case 5: - //Vanadium Redox LuV - return TexturesGtBlock.Casing_Redox_3.getIcon(); - case 6: - //Vanadium Redox ZPM - return TexturesGtBlock.Casing_Redox_4.getIcon(); - case 7: - //Vanadium Redox UV - return TexturesGtBlock.Casing_Redox_5.getIcon(); - case 8: - //Vanadium Redox MAX - return TexturesGtBlock.Casing_Redox_6.getIcon(); - case 9: - //Amazon Warehouse Casing - return TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon(); - case 10: - //Adv. Vac. Freezer - return TexturesGtBlock.TEXTURE_CASING_ADVANCED_CRYOGENIC.getIcon(); - case 11: - //Adv. EBF - return TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon(); - case 12: - return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon(); - case 13: - return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon(); - case 14: - return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon(); - case 15: - return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); - - default: - return TexturesGtBlock._PlaceHolder.getIcon(); - - } - } - return TexturesGtBlock._PlaceHolder.getIcon(); - } - - static { - GregtechMetaCasingBlocks3.mConnectedMachineTextures = true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java deleted file mode 100644 index 6326dd2c29..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java +++ /dev/null @@ -1,166 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -public class TexturesCentrifugeMultiblock { - - private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1"); - private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1"); - private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2"); - private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2"); - private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3"); - private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3"); - private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4"); - private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4"); - private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); - private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); - private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6"); - private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6"); - private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7"); - private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7"); - private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8"); - private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8"); - private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9"); - private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9"); - - private static CustomIcon frontFace_0 = (GT8_1); - private static CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static CustomIcon frontFace_1 = (GT8_2); - private static CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static CustomIcon frontFace_2 = (GT8_3); - private static CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static CustomIcon frontFace_3 = (GT8_4); - private static CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static CustomIcon frontFace_4 = (GT8_5); - private static CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static CustomIcon frontFace_5 = (GT8_6); - private static CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static CustomIcon frontFace_6 = (GT8_7); - private static CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static CustomIcon frontFace_7 = (GT8_8); - private static CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static CustomIcon frontFace_8 = (GT8_9); - private static CustomIcon frontFaceActive_8 = (GT8_9_Active); - - CustomIcon[] CENTRIFUGE = new CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; - - CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; - - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } - - private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; - IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; - if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge && tTile.getFrontFacing() == aSide) - return tTile.isActive() ? 1 : 2; - return 0; - } - - public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (tMeta != 0) { - return CasingTextureHandler.getIcon(aSide, tMeta); - } - int tInvertLeftRightMod = aSide % 2 * 2 - 1; - switch (aSide / 2) { - case 0: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); - } - } - } - break; - case 1: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); - } - } - } - break; - case 2: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); - } - } - } - break; - } - return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); - } - - public boolean isCentrifugeRunning(IMetaTileEntity aTile) { - if (aTile == null) { - return false; - } - else { - return aTile.getBaseMetaTileEntity().isActive(); - } - - - } - - public boolean isUsingAnimatedTexture(IMetaTileEntity aMetaTileEntity) { - if (aMetaTileEntity != null) { - if (aMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) { - return ((GregtechMetaTileEntity_IndustrialCentrifuge) aMetaTileEntity).usingAnimations(); - } - } - return false; - } - - public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { - if (isUsingAnimatedTexture(aMetaTileEntity)) { - if (isCentrifugeRunning(aMetaTileEntity)) { - return this.CENTRIFUGE_ACTIVE[aIndex].getIcon(); - } - } - return this.CENTRIFUGE[aIndex].getIcon(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java deleted file mode 100644 index e772f0f48c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java +++ /dev/null @@ -1,443 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; - -public class TexturesGregtech58 { - - private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE1"); - private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1"); - private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE2"); - private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2"); - private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE3"); - private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3"); - private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE4"); - private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4"); - private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5"); - private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5"); - private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE6"); - private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6"); - private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE7"); - private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7"); - private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE8"); - private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8"); - private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE9"); - private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9"); - - private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1); - private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2); - private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3); - private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4); - private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5); - private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6); - private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7); - private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8); - private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9); - private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active); - - Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; - - Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; - - - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } - - - public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { - return CasingTextureHandler.getIcon(aSide, tMeta); - } - final int tStartIndex = tMeta == 6 ? 1 : 13; - if (tMeta == 0) { - if ((aSide == 2) || (aSide == 3)) { - TileEntity tTileEntity; - IMetaTileEntity tMetaTileEntity; - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.TURBINE[0].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.TURBINE[3].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.TURBINE[6].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.TURBINE[1].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.TURBINE[7].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.TURBINE[8].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.TURBINE[5].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.TURBINE[2].getIcon(); - } - } else if ((aSide == 4) || (aSide == 5)) { - TileEntity tTileEntity; - Object tMetaTileEntity; - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.TURBINE[0].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.TURBINE[3].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.TURBINE[6].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.TURBINE[1].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.TURBINE[7].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.TURBINE[8].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.TURBINE[5].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.TURBINE[2].getIcon(); - } - } - return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - } - final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)}; - switch (aSide) { - case 0: - if (tConnectedSides[0]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[2])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[5]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 1: - if (tConnectedSides[1]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 2: - if (tConnectedSides[5]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 3: - if (tConnectedSides[3]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 4: - if (tConnectedSides[4]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - case 5: - if (tConnectedSides[2]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - break; - } - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java deleted file mode 100644 index ac721d81c3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java +++ /dev/null @@ -1,444 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; - -public class TexturesGregtech59 { - - private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1"); - private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1"); - private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2"); - private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2"); - private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3"); - private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3"); - private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4"); - private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4"); - private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5"); - private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5"); - private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6"); - private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6"); - private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7"); - private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7"); - private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8"); - private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8"); - private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9"); - private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9"); - - private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1); - private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2); - private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3); - private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4); - private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5); - private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6); - private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7); - private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8); - private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9); - private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active); - - Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; - - Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; - - - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } - - - public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { - return CasingTextureHandler.getIcon(aSide, tMeta); - } - final int tStartIndex = tMeta == 6 ? 1 : 13; - if (tMeta == 0) { - if ((aSide == 2) || (aSide == 3)) { - TileEntity tTileEntity; - IMetaTileEntity tMetaTileEntity; - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.TURBINE[0].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.TURBINE[3].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.TURBINE[6].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.TURBINE[1].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.TURBINE[7].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.TURBINE[8].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.TURBINE[5].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.TURBINE[2].getIcon(); - } - } else if ((aSide == 4) || (aSide == 5)) { - TileEntity tTileEntity; - Object tMetaTileEntity; - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.TURBINE[0].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.TURBINE[3].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.TURBINE[6].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.TURBINE[1].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.TURBINE[7].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.TURBINE[8].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.TURBINE[5].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.TURBINE[2].getIcon(); - } - } - return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - } - final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)}; - switch (aSide) { - case 0: - if (tConnectedSides[0]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[2])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[5]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 1: - if (tConnectedSides[1]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 2: - if (tConnectedSides[5]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 3: - if (tConnectedSides[3]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - case 4: - if (tConnectedSides[4]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - case 5: - if (tConnectedSides[2]) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); - } - if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); - } - if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); - } - if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); - } - if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); - } - break; - } - return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java deleted file mode 100644 index 962f981d3b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks5; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IsaMill; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -public class TexturesGrinderMultiblock { - - private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE1"); - private static CustomIcon GT8_1 = new CustomIcon("iconsets/Grinder/GRINDER1"); - private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE2"); - private static CustomIcon GT8_2 = new CustomIcon("iconsets/Grinder/GRINDER2"); - private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE3"); - private static CustomIcon GT8_3 = new CustomIcon("iconsets/Grinder/GRINDER3"); - private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE4"); - private static CustomIcon GT8_4 = new CustomIcon("iconsets/Grinder/GRINDER4"); - private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5"); - private static CustomIcon GT8_5 = new CustomIcon("iconsets/Grinder/GRINDER5"); - private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE6"); - private static CustomIcon GT8_6 = new CustomIcon("iconsets/Grinder/GRINDER6"); - private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE7"); - private static CustomIcon GT8_7 = new CustomIcon("iconsets/Grinder/GRINDER7"); - private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE8"); - private static CustomIcon GT8_8 = new CustomIcon("iconsets/Grinder/GRINDER8"); - private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE9"); - private static CustomIcon GT8_9 = new CustomIcon("iconsets/Grinder/GRINDER9"); - - private static CustomIcon frontFace_0 = (GT8_1); - private static CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static CustomIcon frontFace_1 = (GT8_2); - private static CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static CustomIcon frontFace_2 = (GT8_3); - private static CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static CustomIcon frontFace_3 = (GT8_4); - private static CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static CustomIcon frontFace_4 = (GT8_5); - private static CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static CustomIcon frontFace_5 = (GT8_6); - private static CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static CustomIcon frontFace_6 = (GT8_7); - private static CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static CustomIcon frontFace_7 = (GT8_8); - private static CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static CustomIcon frontFace_8 = (GT8_9); - private static CustomIcon frontFaceActive_8 = (GT8_9_Active); - - CustomIcon[] GRINDER = new CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; - - CustomIcon[] GRINDER_ACTIVE = new CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; - - private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; - IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; - if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == aSide) - return tTile.isActive() ? 1 : 2; - return 0; - } - - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks5 ii) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (tMeta != 0) { - return GregtechMetaCasingBlocks5.getStaticIcon(aSide, tMeta); - } - int tInvertLeftRightMod = aSide % 2 * 2 - 1; - switch (aSide / 2) { - case 0: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); - } - } - } - break; - case 1: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); - } - } - } - break; - case 2: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); - } - } - } - break; - } - return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); - } - - public boolean isCentrifugeRunning(IMetaTileEntity aTile) { - if (aTile == null) { - return false; - } - else { - return aTile.getBaseMetaTileEntity().isActive(); - } - } - - public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { - if (isCentrifugeRunning(aMetaTileEntity)) { - return this.GRINDER_ACTIVE[aIndex].getIcon(); - } - - return this.GRINDER[aIndex].getIcon(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java deleted file mode 100644 index 518ffe0eae..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ /dev/null @@ -1,652 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; - -public class TexturesGtBlock { - - private static AutoMap mCustomiconMap = new AutoMap(); - - static { - - } - - //public static ITexture[] CASING_BLOCKS_GTPP = new ITexture[256]; - - /* - * Handles Custom Textures. - */ - - public static class CustomIcon implements IIconContainer, Runnable { - protected IIcon mIcon; - protected String mIconName; - protected String mModID; - - public CustomIcon(final String aIconName) { - this(CORE.MODID, aIconName); - } - - public CustomIcon(final String aModID, final String aIconName) { - this.mIconName = aIconName; - this.mModID = aModID; - mCustomiconMap.put(this); - Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); - GregTech_API.sGTBlockIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sBlockIcons.registerIcon(this.mModID + ":" + this.mIconName); - Logger.WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath()); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - } - - - public static class VanillaIcon implements IIconContainer, Runnable { - protected IIcon mIcon; - protected String mIconName; - - public VanillaIcon(final String aIconName) { - this.mIconName = aIconName; - mCustomiconMap.put(this); - Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); - GregTech_API.sGTBlockIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sBlockIcons.registerIcon("minecraft" + ":" + this.mIconName); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - } - - public static GT_RenderedTexture getTextureFromIcon(CustomIcon aIcon, short[] aRGB) { - return new GT_RenderedTexture(aIcon, aRGB); - } - - /* - * Add Some Custom Textures below. - * I am not sure whether or not I need to declare them as such, but better to be safe than sorry. - * Right? - */ - - //Vanilla Textures - public static final VanillaIcon VanillaIcon_OakPlanks = new VanillaIcon("planks_oak"); - - - - //PlaceHolder Texture - private static final CustomIcon Internal_PlaceHolder = new CustomIcon("TileEntities/_PlaceHolder"); - public static final CustomIcon _PlaceHolder = Internal_PlaceHolder; - - //Energy overlays - public static final CustomIcon OVERLAY_ENERGY_OUT_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_BUFFER"); - public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER"); - - //Wooden Shelf and Compartment Overlays - public static final CustomIcon OVERLAY_WOODEN_SHELF_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf"); - public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_cans"); - public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_paper"); - public static final CustomIcon OVERLAY_CABINET_1 = new CustomIcon("TileEntities/Compartment/0"); - public static final CustomIcon OVERLAY_CABINET_2 = new CustomIcon("TileEntities/Compartment/1"); - public static final CustomIcon OVERLAY_CABINET_3 = new CustomIcon("TileEntities/Compartment/2"); - public static final CustomIcon OVERLAY_CABINET_4 = new CustomIcon("TileEntities/Compartment/3"); - public static final CustomIcon OVERLAY_CABINET_5 = new CustomIcon("TileEntities/Compartment/4"); - public static final CustomIcon OVERLAY_CABINET_6 = new CustomIcon("TileEntities/Compartment/5"); - public static final CustomIcon OVERLAY_CABINET_7 = new CustomIcon("TileEntities/Compartment/6"); - public static final CustomIcon OVERLAY_CABINET_8 = new CustomIcon("TileEntities/Compartment/7"); - public static final CustomIcon OVERLAY_CABINET_9 = new CustomIcon("TileEntities/Compartment/8"); - public static final CustomIcon OVERLAY_CABINET_10 = new CustomIcon("TileEntities/Compartment/9"); - public static final CustomIcon OVERLAY_CABINET_11 = new CustomIcon("TileEntities/Compartment/10"); - public static final CustomIcon OVERLAY_CABINET_12 = new CustomIcon("TileEntities/Compartment/11"); - public static final CustomIcon OVERLAY_CABINET_13 = new CustomIcon("TileEntities/Compartment/12"); - public static final CustomIcon OVERLAY_CABINET_14 = new CustomIcon("TileEntities/Compartment/13"); - public static final CustomIcon OVERLAY_CABINET_15 = new CustomIcon("TileEntities/Compartment/14"); - public static final CustomIcon OVERLAY_CABINET_16 = new CustomIcon("TileEntities/Compartment/15"); - public static final CustomIcon OVERLAY_COMPARTMENT_1 = new CustomIcon("TileEntities/Compartment/16"); - public static final CustomIcon OVERLAY_COMPARTMENT_2 = new CustomIcon("TileEntities/Compartment/17"); - public static final CustomIcon OVERLAY_COMPARTMENT_3 = new CustomIcon("TileEntities/Compartment/18"); - public static final CustomIcon OVERLAY_COMPARTMENT_4 = new CustomIcon("TileEntities/Compartment/19"); - public static final CustomIcon OVERLAY_COMPARTMENT_5 = new CustomIcon("TileEntities/Compartment/20"); - public static final CustomIcon OVERLAY_COMPARTMENT_6 = new CustomIcon("TileEntities/Compartment/21"); - public static final CustomIcon OVERLAY_COMPARTMENT_7 = new CustomIcon("TileEntities/Compartment/22"); - public static final CustomIcon OVERLAY_COMPARTMENT_8 = new CustomIcon("TileEntities/Compartment/23"); - public static final CustomIcon OVERLAY_COMPARTMENT_9 = new CustomIcon("TileEntities/Compartment/24"); - public static final CustomIcon OVERLAY_COMPARTMENT_10 = new CustomIcon("TileEntities/Compartment/25"); - public static final CustomIcon OVERLAY_COMPARTMENT_11 = new CustomIcon("TileEntities/Compartment/26"); - public static final CustomIcon OVERLAY_COMPARTMENT_12 = new CustomIcon("TileEntities/Compartment/27"); - public static final CustomIcon OVERLAY_COMPARTMENT_13 = new CustomIcon("TileEntities/Compartment/28"); - public static final CustomIcon OVERLAY_COMPARTMENT_14 = new CustomIcon("TileEntities/Compartment/29"); - public static final CustomIcon OVERLAY_COMPARTMENT_15 = new CustomIcon("TileEntities/Compartment/30"); - public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31"); - - //Controllers - private static final CustomIcon Internal_Casing_Fusion_Simple_Front = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT"); - public static final CustomIcon Casing_Fusion_Simple_Front = Internal_Casing_Fusion_Simple_Front; - private static final CustomIcon Internal_Casing_Fusion_Simple_Front_Active = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE"); - public static final CustomIcon Casing_Fusion_Simple_Front_Active = Internal_Casing_Fusion_Simple_Front_Active; - - //Machine Casings - //Simple - private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top"); - public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top; - private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon("TileEntities/machine_bottom"); - public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom; - //Advanced and Ultra - private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine"); - public static final CustomIcon Casing_Machine_Advanced = Internal_Casing_Machine_Advanced; - private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu"); - public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra; - //Dimensional - Non Overlay - private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon("TileEntities/adv_machine_dimensional"); - public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional; - private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon("TileEntities/high_adv_machine_dimensional"); - public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv; - - //Material Casings - private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61"); - public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61; - private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL"); - public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel; - private static final CustomIcon Internal_Casing_Stellite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE"); - public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite; - private static final CustomIcon Internal_Casing_Talonite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE"); - public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite; - private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA"); - public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga; - private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100"); - public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100; - private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN"); - public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin; - - private static final CustomIcon Internal_Casing_Grisium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM"); - public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium; - private static final CustomIcon Internal_Casing_RedSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_RED_STEEL"); - public static final CustomIcon Casing_Material_RedSteel = Internal_Casing_RedSteel; - private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020"); - public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020; - private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS"); - public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS; - private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956"); - public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956; - private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE"); - public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide; - - - private static final CustomIcon Internal_Casing_HastelloyX = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X"); - public static final CustomIcon Casing_Material_HastelloyX = Internal_Casing_HastelloyX; - private static final CustomIcon Internal_Casing_HastelloyN = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N"); - public static final CustomIcon Casing_Material_HastelloyN = Internal_Casing_HastelloyN; - private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS"); - public static final CustomIcon Casing_Material_Fluid_IncoloyDS = Internal_Casing_Fluid_IncoloyDS; - - private static final CustomIcon Internal_Casing_Laurenium = new CustomIcon("TileEntities/MACHINE_CASING_LAURENIUM"); - public static final CustomIcon Casing_Material_Laurenium = Internal_Casing_Laurenium; - - //Trinium Alloys - public static final CustomIcon Casing_Trinium_Titanium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM"); - public static final CustomIcon Casing_Trinium_Naquadah = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH"); - public static final CustomIcon Casing_Trinium_Naquadah_Vent = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT"); - public static final CustomIcon Casing_Trinium_Naquadah_Carbon = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON"); - - //Material Machine/Firebox Casings - private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY"); - public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox; - - //Misc Casings - private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon("TileEntities/cover_redstone_conductor"); - public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off; - private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon("TileEntities/cover_redstone_emitter"); - public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On; - - //Redox Cells - public static final CustomIcon Casing_Redox_1 = new CustomIcon("redox/redox1"); - public static final CustomIcon Casing_Redox_2 = new CustomIcon("redox/redox2"); - public static final CustomIcon Casing_Redox_3 = new CustomIcon("redox/redox3"); - public static final CustomIcon Casing_Redox_4 = new CustomIcon("redox/redox4"); - public static final CustomIcon Casing_Redox_5 = new CustomIcon("redox/redox5"); - public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6"); - //public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7"); - //public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8"); - - //Centrifuge Casing - private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE"); - public static final CustomIcon Casing_Material_Centrifuge = Internal_Casing_Centrifuge; - - //MACHINE_CASING_FARM_MANAGER_STRUCTURAL - //Farm Manager Casings - private static final CustomIcon Internal_Casing_Machine_Farm_Manager = new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); - public static final CustomIcon Casing_Machine_Farm_Manager = Internal_Casing_Machine_Farm_Manager; - //Acacia_Log - private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top"); - public static final CustomIcon Casing_Machine_Acacia_Log = Internal_Casing_Machine_Acacia_Log; - //Podzol Top - private static final CustomIcon Internal_Casing_Machine_Podzol = new CustomIcon("TileEntities/dirt_podzol_top"); - public static final CustomIcon Casing_Machine_Podzol = Internal_Casing_Machine_Podzol; - - //Structural Blocks - private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A = new CustomIcon("chrono/MetalGrate"); - public static final CustomIcon Casing_Machine_Metal_Grate_A = Internal_Casing_Machine_Metal_Grate_A; - private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A_Solid = new CustomIcon("chrono/MetalGrateA_Solid"); - public static final CustomIcon Casing_Machine_Metal_Grate_A_Solid = Internal_Casing_Machine_Metal_Grate_A_Solid; - private static final CustomIcon Internal_Casing_Machine_Metal_Grate_B = new CustomIcon("chrono/MetalGrate2"); - public static final CustomIcon Casing_Machine_Metal_Grate_B = Internal_Casing_Machine_Metal_Grate_B; - private static final CustomIcon Internal_Casing_Machine_Metal_Panel_A = new CustomIcon("chrono/MetalPanel"); - public static final CustomIcon Casing_Machine_Metal_Panel_A = Internal_Casing_Machine_Metal_Panel_A; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_A = new CustomIcon("chrono/MetalSheet"); - public static final CustomIcon Casing_Machine_Metal_Sheet_A = Internal_Casing_Machine_Metal_Sheet_A; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_B = new CustomIcon("chrono/MetalSheet2"); - public static final CustomIcon Casing_Machine_Metal_Sheet_B = Internal_Casing_Machine_Metal_Sheet_B; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_C = new CustomIcon("chrono/MetalSheet3"); - public static final CustomIcon Casing_Machine_Metal_Sheet_C = Internal_Casing_Machine_Metal_Sheet_C; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_D = new CustomIcon("chrono/MetalSheet4"); - public static final CustomIcon Casing_Machine_Metal_Sheet_D = Internal_Casing_Machine_Metal_Sheet_D; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_E = new CustomIcon("chrono/MetalSheet5"); - public static final CustomIcon Casing_Machine_Metal_Sheet_E = Internal_Casing_Machine_Metal_Sheet_E; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_F = new CustomIcon("chrono/MetalSheet6"); - public static final CustomIcon Casing_Machine_Metal_Sheet_F = Internal_Casing_Machine_Metal_Sheet_F; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_G = new CustomIcon("chrono/MetalSheet7"); - public static final CustomIcon Casing_Machine_Metal_Sheet_G = Internal_Casing_Machine_Metal_Sheet_G; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_H = new CustomIcon("chrono/MetalSheet8"); - public static final CustomIcon Casing_Machine_Metal_Sheet_H = Internal_Casing_Machine_Metal_Sheet_H; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_I = new CustomIcon("chrono/MetalSheet9"); - public static final CustomIcon Casing_Machine_Metal_Sheet_I = Internal_Casing_Machine_Metal_Sheet_I; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_J = new CustomIcon("chrono/MetalSheet10"); - public static final CustomIcon Casing_Machine_Metal_Sheet_J = Internal_Casing_Machine_Metal_Sheet_J; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_K = new CustomIcon("chrono/MetalSheet11"); - public static final CustomIcon Casing_Machine_Metal_Sheet_K = Internal_Casing_Machine_Metal_Sheet_K; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_L = new CustomIcon("chrono/MetalSheet12"); - public static final CustomIcon Casing_Machine_Metal_Sheet_L = Internal_Casing_Machine_Metal_Sheet_L; - private static final CustomIcon Internal_Overlay_Machine_Cyber_A = new CustomIcon("chrono/CyberPanel"); - public static final CustomIcon Overlay_Machine_Cyber_A = Internal_Overlay_Machine_Cyber_A; - private static final CustomIcon Internal_Overlay_Machine_Cyber_B = new CustomIcon("chrono/CyberPanel2"); - public static final CustomIcon Overlay_Machine_Cyber_B = Internal_Overlay_Machine_Cyber_B; - - - public static final CustomIcon TEXTURE_CASING_AMAZON = new CustomIcon("TileEntities/CASING_AMAZON"); - public static final CustomIcon TEXTURE_CASING_ADVANCED_CRYOGENIC = new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC"); - public static final CustomIcon TEXTURE_CASING_ADVANCED_VOLCNUS = new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS"); - public static final CustomIcon TEXTURE_CASING_ROCKETDYNE = new CustomIcon("TileEntities/MACHINE_CASING_ROCKETDYNE"); - public static final CustomIcon TEXTURE_CASING_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_GRINDING_FACTORY"); - public static final CustomIcon TEXTURE_CASING_FLOTATION = new CustomIcon("TileEntities/MACHINE_CASING_FLOTATION"); - - // Custom Pipes - public static final CustomIcon TEXTURE_PIPE_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_PIPE_T1"); - - // Custom Gearboxes - public static final CustomIcon TEXTURE_GEARBOX_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_GEARBOX_T1"); - - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II = new CustomIcon("iconsets/MACHINE_CASING_FUSION_3"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_INNER = new CustomIcon("iconsets/MACHINE_CASING_FUSION_COIL_II"); - public static final CustomIcon TEXTURE_CASING_FUSION_CASING_ULTRA = new CustomIcon("iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA"); - // - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_1 = new CustomIcon("iconsets/FUSIONIII_1"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_2 = new CustomIcon("iconsets/FUSIONIII_2"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_3 = new CustomIcon("iconsets/FUSIONIII_3"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_4 = new CustomIcon("iconsets/FUSIONIII_4"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_5 = new CustomIcon("iconsets/FUSIONIII_5"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_6 = new CustomIcon("iconsets/FUSIONIII_6"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_7 = new CustomIcon("iconsets/FUSIONIII_7"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_8 = new CustomIcon("iconsets/FUSIONIII_8"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_9 = new CustomIcon("iconsets/FUSIONIII_9"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_10 = new CustomIcon("iconsets/FUSIONIII_10"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_11 = new CustomIcon("iconsets/FUSIONIII_11"); - public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_12 = new CustomIcon("iconsets/FUSIONIII_12"); - - //Overlays - //Fan Textures - private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon("TileEntities/machine_top_vent_rotating"); - public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent; - private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon("TileEntities/machine_top_vent_rotating_fast"); - public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast; - private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon("TileEntities/adv_machine_vent_rotating"); - public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv; - private static final CustomIcon Internal_Overlay_Machine_Turbine_Active = new CustomIcon("TileEntities/STEAM_TURBINE_SIDE_ACTIVE"); - public static final CustomIcon Overlay_Machine_Turbine_Active = Internal_Overlay_Machine_Turbine_Active; - //Grate Texture - public static final CustomIcon OVERLAY_GRATE_A = new CustomIcon("metro/OVERLAY_GRATE_A"); - //Speaker Texture - private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out"); - public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound; - private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon("TileEntities/audio_out_active"); - public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active; - //Diesel Engines - private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon("TileEntities/machine_top_dieselmotor"); - public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical; - private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon("TileEntities/machine_top_dieselmotor2"); - public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal; - private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon("TileEntities/machine_top_dieselmotor_active"); - public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = Internal_Overlay_Machine_Diesel_Vertical_Active; - private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon("TileEntities/machine_top_dieselmotor2_active"); - public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = Internal_Overlay_Machine_Diesel_Horizontal_Active; - //Computer Screens - private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon("TileEntities/adv_machine_screen_random1"); - public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1; - private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon("TileEntities/adv_machine_screen_random2"); - public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2; - private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon("TileEntities/adv_machine_screen_random3"); - public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3; - private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon("TileEntities/adv_machine_screen_frequency"); - public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency; - private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon("TileEntities/adv_machine_screen_logo"); - public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo; - private static final CustomIcon Internal_Overlay_Machine_Cyber_Interface = new CustomIcon("chrono/Overlay_Cyber"); - public static final CustomIcon Overlay_Machine_Cyber_Interface = Internal_Overlay_Machine_Cyber_Interface; - - //Machine Controller Overlays - private static final CustomIcon Internal_Overlay_Machine_Controller_Default = new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED"); - public static final CustomIcon Overlay_Machine_Controller_Default = Internal_Overlay_Machine_Controller_Default; - private static final CustomIcon Internal_Overlay_Machine_Controller_Default_Active = new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE"); - public static final CustomIcon Overlay_Machine_Controller_Default_Active = Internal_Overlay_Machine_Controller_Default_Active; - - private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced = new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED"); - public static final CustomIcon Overlay_Machine_Controller_Advanced = Internal_Overlay_Machine_Controller_Advanced; - private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced_Active = new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE"); - public static final CustomIcon Overlay_Machine_Controller_Advanced_Active = Internal_Overlay_Machine_Controller_Advanced_Active; - - //Fluid Reactor Overlays - public static final CustomIcon Overlay_FluidReactor_Front = new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT"); - public static final CustomIcon Overlay_FluidReactor_Side = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE"); - public static final CustomIcon Overlay_FluidReactor_Top = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP"); - public static final CustomIcon Overlay_FluidReactor_Front_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE"); - public static final CustomIcon Overlay_FluidReactor_Side_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE"); - public static final CustomIcon Overlay_FluidReactor_Top_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE"); - - //Crafting Overlays - private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); - public static final CustomIcon Overlay_Crafting_Bronze = Internal_Overlay_Crafting_Bronze; - private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); - public static final CustomIcon Overlay_Crafting_Steel = Internal_Overlay_Crafting_Steel; - - //Covers - private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); - public static final CustomIcon Overlay_Overflow_Valve = Internal_Overlay_Overflow_Valve; - - - //Hatch Overlays - //Charger Texture - private static final CustomIcon Internal_Overlay_Hatch_Charger = new CustomIcon("TileEntities/cover_charger"); - public static final CustomIcon Overlay_Hatch_Charger = Internal_Overlay_Hatch_Charger; - //Discharger Texture - private static final CustomIcon Internal_Overlay_Hatch_Discharger = new CustomIcon("TileEntities/cover_discharge"); - public static final CustomIcon Overlay_Hatch_Discharger = Internal_Overlay_Hatch_Discharger; - //Advanced Muffler - private static final CustomIcon Internal_Overlay_Hatch_Muffler_Adv = new CustomIcon("iconsets/OVERLAY_MUFFLER_ADV"); - public static final CustomIcon Overlay_Hatch_Muffler_Adv = Internal_Overlay_Hatch_Muffler_Adv; - //Control Core Bus - private static final CustomIcon Internal_Overlay_Hatch_Control_Core = new CustomIcon("iconsets/OVERLAY_CONTROL_CORE_BUS"); - public static final CustomIcon Overlay_Hatch_Control_Core = Internal_Overlay_Hatch_Control_Core; - // Milling Ball Bus - private static final CustomIcon Internal_Overlay_Bus_Milling_Balls = new CustomIcon("iconsets/OVERLAY_MILLING_BALL_BUS"); - public static final CustomIcon Overlay_Bus_Milling_Balls = Internal_Overlay_Bus_Milling_Balls; - // Catalyst Bus - private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS"); - public static final CustomIcon Overlay_Bus_Catalyst = Internal_Overlay_Bus_Catalyst; - // RTG Hatch - private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); - public static final CustomIcon Overlay_Hatch_RTG_Off = Internal_Overlay_Hatch_RTG_Off; - private static final CustomIcon Internal_Overlay_Hatch_RTG_On = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_ON"); - public static final CustomIcon Overlay_Hatch_RTG_On = Internal_Overlay_Hatch_RTG_On; - - //Dimensional - private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue"); - public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue; - private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange"); - public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange; - //Icons - private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab"); - public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab; - private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon("TileEntities/adv_machine_matterfab_active"); - public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active; - - private static final CustomIcon Internal_Overlay_MatterFab_Animated = new CustomIcon("TileEntities/adv_machine_matterfab_animated"); - public static final CustomIcon Overlay_MatterFab_Animated = Internal_Overlay_MatterFab_Animated; - private static final CustomIcon Internal_Overlay_MatterFab_Active_Animated = new CustomIcon("TileEntities/adv_machine_matterfab_active_animated"); - public static final CustomIcon Overlay_MatterFab_Active_Animated = Internal_Overlay_MatterFab_Active_Animated; - - private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil"); - public static final CustomIcon Overlay_Oil = Internal_Overlay_Oil; - private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum"); - public static final CustomIcon Overlay_UU_Matter = Internal_Overlay_UU_Matter; - - // GT++ Tiered Hulls - public static final CustomIcon TEXTURE_CASING_TIERED_ULV = new CustomIcon("iconsets/TieredHulls/CASING_ULV"); - public static final CustomIcon TEXTURE_CASING_TIERED_LV = new CustomIcon("iconsets/TieredHulls/CASING_LV"); - public static final CustomIcon TEXTURE_CASING_TIERED_MV = new CustomIcon("iconsets/TieredHulls/CASING_MV"); - public static final CustomIcon TEXTURE_CASING_TIERED_HV = new CustomIcon("iconsets/TieredHulls/CASING_HV"); - public static final CustomIcon TEXTURE_CASING_TIERED_EV = new CustomIcon("iconsets/TieredHulls/CASING_EV"); - public static final CustomIcon TEXTURE_CASING_TIERED_IV = new CustomIcon("iconsets/TieredHulls/CASING_IV"); - public static final CustomIcon TEXTURE_CASING_TIERED_LuV = new CustomIcon("iconsets/TieredHulls/CASING_LuV"); - public static final CustomIcon TEXTURE_CASING_TIERED_ZPM = new CustomIcon("iconsets/TieredHulls/CASING_ZPM"); - public static final CustomIcon TEXTURE_CASING_TIERED_UV = new CustomIcon("iconsets/TieredHulls/CASING_UV"); - public static final CustomIcon TEXTURE_CASING_TIERED_MAX = new CustomIcon("iconsets/TieredHulls/CASING_MAX"); - - //Metroid related - public static final CustomIcon TEXTURE_METAL_PANEL_A = new CustomIcon("metro/TEXTURE_METAL_PANEL_A"); - public static final CustomIcon TEXTURE_METAL_PANEL_B = new CustomIcon("metro/TEXTURE_METAL_PANEL_B"); - public static final CustomIcon TEXTURE_METAL_PANEL_C = new CustomIcon("metro/TEXTURE_METAL_PANEL_C"); - public static final CustomIcon TEXTURE_METAL_PANEL_D = new CustomIcon("metro/TEXTURE_METAL_PANEL_D"); - public static final CustomIcon TEXTURE_METAL_PANEL_E = new CustomIcon("metro/TEXTURE_METAL_PANEL_E"); - public static final CustomIcon TEXTURE_METAL_PANEL_F = new CustomIcon("metro/TEXTURE_METAL_PANEL_F"); - public static final CustomIcon TEXTURE_METAL_PANEL_G = new CustomIcon("metro/TEXTURE_METAL_PANEL_G"); - public static final CustomIcon TEXTURE_METAL_PANEL_H = new CustomIcon("metro/TEXTURE_METAL_PANEL_H"); - public static final CustomIcon TEXTURE_METAL_PANEL_I = new CustomIcon("metro/TEXTURE_METAL_PANEL_I"); - - public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); - - public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); - public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); - - public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A"); - public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT"); - public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT"); - public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A"); - public static final CustomIcon TEXTURE_STONE_RED_B = new CustomIcon("metro/TEXTURE_STONE_RED_B"); - public static final CustomIcon TEXTURE_STONE_BLUE_A = new CustomIcon("metro/TEXTURE_STONE_BLUE_A"); - public static final CustomIcon TEXTURE_STONE_GREEN_A = new CustomIcon("metro/TEXTURE_STONE_GREEN_A"); - public static final CustomIcon TEXTURE_STONE_TABLET_A = new CustomIcon("metro/TEXTURE_STONE_TABLET_A"); - public static final CustomIcon TEXTURE_STONE_TABLET_B = new CustomIcon("metro/TEXTURE_STONE_TABLET_B"); - - public static final CustomIcon TEXTURE_TECH_A = new CustomIcon("metro/TEXTURE_TECH_A"); - public static final CustomIcon TEXTURE_TECH_B = new CustomIcon("metro/TEXTURE_TECH_B"); - public static final CustomIcon TEXTURE_TECH_C = new CustomIcon("metro/TEXTURE_TECH_C"); - - public static final CustomIcon TEXTURE_TECH_PANEL_A = new CustomIcon("metro/TEXTURE_TECH_PANEL_A"); - public static final CustomIcon TEXTURE_TECH_PANEL_B = new CustomIcon("metro/TEXTURE_TECH_PANEL_B"); - public static final CustomIcon TEXTURE_TECH_PANEL_C = new CustomIcon("metro/TEXTURE_TECH_PANEL_C"); - public static final CustomIcon TEXTURE_TECH_PANEL_D = new CustomIcon("metro/TEXTURE_TECH_PANEL_D"); - - public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE = new CustomIcon("TileEntities/DecayablesChest_bottom"); - public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT = new CustomIcon("TileEntities/DecayablesChest_top"); - - // LFTR Single blocks - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE"); - - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE"); - - - //Overlay Arrays - public static ITexture[] OVERLAYS_ENERGY_OUT_BUFFER = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{255, 100, 0, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{255, 255, 30, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{128, 128, 128, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0})}; - - public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{255, 100, 0, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{255, 255, 30, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{128, 128, 128, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0})}; - - public static ITexture[] OVERLAYS_CABINET_FRONT = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16, - new short[]{255, 255, 255, 0}),}; - - public static ITexture[] OVERLAYS_COMPARTMENT_FRONT = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_7, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_8, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_9, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_10, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_11, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_12, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_13, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_14, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_15, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_16, - new short[]{255, 255, 255, 0}),}; - - public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[]{ - TEXTURE_CASING_FUSION_COIL_II_1, TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3, - TEXTURE_CASING_FUSION_COIL_II_4, TEXTURE_CASING_FUSION_COIL_II_5, TEXTURE_CASING_FUSION_COIL_II_6, - TEXTURE_CASING_FUSION_COIL_II_7, TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9, - TEXTURE_CASING_FUSION_COIL_II_10, TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12}; - - public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[]{ - TEXTURE_CASING_TIERED_ULV, - TEXTURE_CASING_TIERED_LV, - TEXTURE_CASING_TIERED_MV, - TEXTURE_CASING_TIERED_HV, - TEXTURE_CASING_TIERED_EV, - TEXTURE_CASING_TIERED_IV, - TEXTURE_CASING_TIERED_LuV, - TEXTURE_CASING_TIERED_ZPM, - TEXTURE_CASING_TIERED_UV, - TEXTURE_CASING_TIERED_MAX}; - - - public static Object Casing_Material_Turbine; - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java deleted file mode 100644 index cc5cf3d55e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; - -public class TexturesGtCutomCovers { - - public static final CustomIcon[] TEXTURE_ZTONES_AGON = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_ISZM = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_KORP = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_JELT = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_BITT = new CustomIcon[16]; - - public static void init() { - generateZTones(); - } - - private static void generateZTones() { - // ZTONES - String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; - int aArrayIndex = 0; - CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, - TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; - - for (CustomIcon[] t : aArrays) { - for (int s = 0; s < 16; s++) { - t[s] = new CustomIcon("Ztones", "sets/" + aZtoneCoverTextureNames[aArrayIndex] + "/"+aZtoneCoverTextureNames[aArrayIndex]+"_ (" + s + ")"); - } - aArrayIndex++; - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java deleted file mode 100644 index ee104eaca3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blocks.textures; - -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.IIconContainer; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - -public final class TexturesGtTools { - - public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER"); - public final static CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER"); - public final static CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS"); - public final static CustomIcon ELECTRIC_LIGHTER = new CustomIcon("iconsets/ELECTRIC_LIGHTER"); - public final static CustomIcon ELECTRIC_BUTCHER_KNIFE = new CustomIcon("iconsets/ELECTRIC_BUTCHER_KNIFE"); - - - - - - - - - public final static class CustomIcon implements IIconContainer, Runnable { - protected IIcon mIcon, mOverlay; - protected final String mIconName; - - public CustomIcon(final String aIconName) { - this.mIconName = aIconName; - Logger.INFO("Constructing a Custom Texture. " + this.mIconName); - GregTech_API.sGTItemIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return this.mOverlay; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName); - //Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g); - this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName + "_OVERLAY"); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java deleted file mode 100644 index c3d6a655c3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java +++ /dev/null @@ -1,318 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks4; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; - -public class LargeTurbineTextureHandler { - - */ -/** - * LP Turbines - *//* - - private static CustomIcon aTex1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1"); - private static CustomIcon aTex1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_1"); - private static CustomIcon aTex2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2"); - private static CustomIcon aTex2 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_2"); - private static CustomIcon aTex3_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3"); - private static CustomIcon aTex3 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_3"); - private static CustomIcon aTex4_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4"); - private static CustomIcon aTex4 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_4"); - private static CustomIcon aTex5_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5"); - private static CustomIcon aTex5 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_5"); - private static CustomIcon aTex6_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6"); - private static CustomIcon aTex6 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_6"); - private static CustomIcon aTex7_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7"); - private static CustomIcon aTex7 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_7"); - private static CustomIcon aTex8_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8"); - private static CustomIcon aTex8 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_8"); - private static CustomIcon aTex9_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9"); - private static CustomIcon aTex9 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_9"); - - private static CustomIcon frontFace_0 = (aTex1); - private static CustomIcon frontFaceActive_0 = (aTex1_Active); - private static CustomIcon frontFace_1 = (aTex2); - private static CustomIcon frontFaceActive_1 = (aTex2_Active); - private static CustomIcon frontFace_2 = (aTex3); - private static CustomIcon frontFaceActive_2 = (aTex3_Active); - private static CustomIcon frontFace_3 = (aTex4); - private static CustomIcon frontFaceActive_3 = (aTex4_Active); - public static CustomIcon frontFace_4 = (aTex5); - public static CustomIcon frontFaceActive_4 = (aTex5_Active); - private static CustomIcon frontFace_5 = (aTex6); - private static CustomIcon frontFaceActive_5 = (aTex6_Active); - private static CustomIcon frontFace_6 = (aTex7); - private static CustomIcon frontFaceActive_6 = (aTex7_Active); - private static CustomIcon frontFace_7 = (aTex8); - private static CustomIcon frontFaceActive_7 = (aTex8_Active); - private static CustomIcon frontFace_8 = (aTex9); - private static CustomIcon frontFaceActive_8 = (aTex9_Active); - - CustomIcon[] OVERLAY_LP_TURBINE = new CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; - - CustomIcon[] OVERLAY_LP_TURBINE_ACTIVE = new CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; - - - */ -/** - * HP Turbines - *//* - - private static CustomIcon aTexHP1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1"); - private static CustomIcon aTexHP1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_1"); - private static CustomIcon aTexHP2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2"); - private static CustomIcon aTexHP2 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_2"); - private static CustomIcon aTexHP3_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3"); - private static CustomIcon aTexHP3 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_3"); - private static CustomIcon aTexHP4_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4"); - private static CustomIcon aTexHP4 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_4"); - private static CustomIcon aTexHP5_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5"); - private static CustomIcon aTexHP5 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_5"); - private static CustomIcon aTexHP6_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6"); - private static CustomIcon aTexHP6 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_6"); - private static CustomIcon aTexHP7_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7"); - private static CustomIcon aTexHP7 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_7"); - private static CustomIcon aTexHP8_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8"); - private static CustomIcon aTexHP8 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_8"); - private static CustomIcon aTexHP9_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9"); - private static CustomIcon aTexHP9 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_9"); - - private static CustomIcon frontFaceHP_0 = (aTexHP1); - private static CustomIcon frontFaceHPActive_0 = (aTexHP1_Active); - private static CustomIcon frontFaceHP_1 = (aTexHP2); - private static CustomIcon frontFaceHPActive_1 = (aTexHP2_Active); - private static CustomIcon frontFaceHP_2 = (aTexHP3); - private static CustomIcon frontFaceHPActive_2 = (aTexHP3_Active); - private static CustomIcon frontFaceHP_3 = (aTexHP4); - private static CustomIcon frontFaceHPActive_3 = (aTexHP4_Active); - public static CustomIcon frontFaceHP_4 = (aTexHP5); - public static CustomIcon frontFaceHPActive_4 = (aTexHP5_Active); - private static CustomIcon frontFaceHP_5 = (aTexHP6); - private static CustomIcon frontFaceHPActive_5 = (aTexHP6_Active); - private static CustomIcon frontFaceHP_6 = (aTexHP7); - private static CustomIcon frontFaceHPActive_6 = (aTexHP7_Active); - private static CustomIcon frontFaceHP_7 = (aTexHP8); - private static CustomIcon frontFaceHPActive_7 = (aTexHP8_Active); - private static CustomIcon frontFaceHP_8 = (aTexHP9); - private static CustomIcon frontFaceHPActive_8 = (aTexHP9_Active); - - CustomIcon[] OVERLAY_HP_TURBINE = new CustomIcon[]{ - frontFaceHP_0, - frontFaceHP_1, - frontFaceHP_2, - frontFaceHP_3, - frontFaceHP_4, - frontFaceHP_5, - frontFaceHP_6, - frontFaceHP_7, - frontFaceHP_8 - }; - - CustomIcon[] OVERLAY_HP_TURBINE_ACTIVE = new CustomIcon[]{ - frontFaceHPActive_0, - frontFaceHPActive_1, - frontFaceHPActive_2, - frontFaceHPActive_3, - frontFaceHPActive_4, - frontFaceHPActive_5, - frontFaceHPActive_6, - frontFaceHPActive_7, - frontFaceHPActive_8 - }; - - - - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks4 thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - - //7 - shaft - //8 LP - //9 HP - - CustomIcon[] mGetCurrentTextureSet = null, mGetCurrentTextureSet_ACTIVE = null; - - - if (tMeta <= 6 || tMeta >= 10) { - return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); - } - else { - if (tMeta == 8) { - mGetCurrentTextureSet = OVERLAY_LP_TURBINE; - mGetCurrentTextureSet_ACTIVE = OVERLAY_LP_TURBINE_ACTIVE; - } - else if (tMeta == 9) { - mGetCurrentTextureSet = OVERLAY_HP_TURBINE; - mGetCurrentTextureSet_ACTIVE = OVERLAY_HP_TURBINE_ACTIVE; - } - if (mGetCurrentTextureSet == null || mGetCurrentTextureSet_ACTIVE == null) { - return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); - } - - - - if ((aSide == 2) || (aSide == 3)) { - TileEntity tTileEntity; - IMetaTileEntity tMetaTileEntity; - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[0].getIcon(); - } - return mGetCurrentTextureSet[0].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[3].getIcon(); - } - return mGetCurrentTextureSet[3].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[6].getIcon(); - } - return mGetCurrentTextureSet[6].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[1].getIcon(); - } - return mGetCurrentTextureSet[1].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[7].getIcon(); - } - return mGetCurrentTextureSet[7].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[8].getIcon(); - } - return mGetCurrentTextureSet[8].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[5].getIcon(); - } - return mGetCurrentTextureSet[5].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[2].getIcon(); - } - return mGetCurrentTextureSet[2].getIcon(); - } - } else if ((aSide == 4) || (aSide == 5)) { - TileEntity tTileEntity; - Object tMetaTileEntity; - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[0].getIcon(); - } - return mGetCurrentTextureSet[0].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[3].getIcon(); - } - return mGetCurrentTextureSet[3].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[6].getIcon(); - } - return mGetCurrentTextureSet[6].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[1].getIcon(); - } - return mGetCurrentTextureSet[1].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[7].getIcon(); - } - return mGetCurrentTextureSet[7].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[8].getIcon(); - } - return mGetCurrentTextureSet[8].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[5].getIcon(); - } - return mGetCurrentTextureSet[5].getIcon(); - } - if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[2].getIcon(); - } - return mGetCurrentTextureSet[2].getIcon(); - } - } - } - return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); - } - - public boolean isUsingAnimatedTexture(TileEntity tTileEntity) { - boolean aVal = true; - */ -/*IGregTechTileEntity aTile; - if (tTileEntity instanceof IGregTechTileEntity) { - aTile = (IGregTechTileEntity) tTileEntity; - if (aTile != null) { - final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { - aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity).isControllerActive(); - Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status"); - } - } - } *//* - - return aVal; - } - - public GT_MetaTileEntity_Hatch_Turbine isTurbineHatch(final IGregTechTileEntity aTileEntity) { - if (aTileEntity != null) { - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { - return (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; - } - } - return null; - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java deleted file mode 100644 index ca7cbca5f8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java +++ /dev/null @@ -1,87 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blueprint; - -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockBlueprint; -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; - -public class Blueprint_Generic_3x3 extends MultiblockBlueprint { - - public Blueprint_Generic_3x3(Pair aCasing, int aTextureID) { - super(3, 3, 3, 10, aTextureID); - - // Top/Bottom - MultiblockLayer a0 = new MultiblockLayer(3, 3); - Block aCasingBlock_1 = aCasing.getKey(); - int aMeta = aCasing.getValue(); - a0.addBlockForPos(aCasingBlock_1, aMeta, 0, 0, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 0, 1, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 0, 2, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 1, 0, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 1, 1, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 1, 2, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 2, 0, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 2, 1, true); - a0.addBlockForPos(aCasingBlock_1, aMeta, 2, 2, true); - a0.lock(true); - - //Layer one - MultiblockLayer a1 = new MultiblockLayer(3, 3); - a1.addBlockForPos(aCasingBlock_1, aMeta, 0, 0, true); - a1.addBlockForPos(aCasingBlock_1, aMeta, 0, 1, true); - a1.addBlockForPos(aCasingBlock_1, aMeta, 0, 2, true); - a1.addBlockForPos(aCasingBlock_1, aMeta, 1, 0, true); - a1.addBlockForPos(Blocks.air, 0, 1, 1, true); - a1.addController(1, 2); - a1.addBlockForPos(aCasingBlock_1, aMeta, 2, 0, true); - a1.addBlockForPos(aCasingBlock_1, aMeta, 2, 1, true); - a1.addBlockForPos(aCasingBlock_1, aMeta, 2, 2, true); - a1.lock(true); - - this.setLayer(a0, 0); - this.setLayer(a1, 1); - this.setLayer(a0, 2); - } - - @Override - public int getMinimumInputBus() { - return 0; - } - - @Override - public int getMinimumInputHatch() { - return 0; - } - - @Override - public int getMinimumOutputBus() { - return 0; - } - - @Override - public int getMinimumOutputHatch() { - return 0; - } - - @Override - public int getMinimumInputEnergy() { - return 1; - } - - @Override - public int getMinimumOutputEnergy() { - return 0; - } - - @Override - public int getMinimumMaintHatch() { - return 1; - } - - @Override - public int getMinimumMufflers() { - return 1; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java deleted file mode 100644 index 3551172904..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java +++ /dev/null @@ -1,137 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.blueprint; - -import gregtech.api.enums.TAE; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockBlueprint; -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer; -import net.minecraft.block.Block; - -public class Blueprint_LFTR extends MultiblockBlueprint { - - public Blueprint_LFTR() { - super(7, 4, 7, 10, TAE.GTPP_INDEX(12)); - - - Block aCasingMain = ModBlocks.blockCasingsMisc; - int aMetaCasingMain = 12; - int aMetaCasingSecondary = 13; - - - - /** - * First Layer (All edges can be Hatches, controller is centered in the front) - */ - - MultiblockLayer a0 = new MultiblockLayer(7, 7); - for (int i = 0; i < 7; i++) { - a0.addBlockForPos(aCasingMain, aMetaCasingMain, i, 0, true); - } - for (int i = 0; i < 7; i++) { - for (int u = 1; u < 6; u++) { - a0.addBlockForPos(aCasingMain, aMetaCasingMain, i, u, i == 0 ? true : i == 6 ? true : false); - } - } - for (int i = 0; i < 7; i++) { - if (i != 3) { - a0.addBlockForPos(aCasingMain, aMetaCasingMain, i, 6, true); - } - else { - a0.addController(i, 6); - } - } - a0.lock(true); - - - - - /** - * Middle Layer(s) - */ - - MultiblockLayer a1 = new MultiblockLayer(7, 7); - for (int i = 0; i < 7; i++) { - a1.addBlockForPos(aCasingMain, aMetaCasingSecondary, i, 0, false); - } - for (int i = 0; i < 7; i++) { - for (int u = 1; u < 6; u++) { - if (i == 0 || i == 6) - a1.addBlockForPos(aCasingMain, aMetaCasingSecondary, i, u, false); - } - } - for (int i = 0; i < 7; i++) { - a1.addBlockForPos(aCasingMain, aMetaCasingSecondary, i, 6, false); - - } - a1.lock(true); - - - /** - * Top Layer (All edges can be Hatches, Mufflers required in inner 3x3) - */ - - MultiblockLayer a2 = new MultiblockLayer(7, 7); - for (int i = 0; i < 7; i++) { - a2.addBlockForPos(aCasingMain, aMetaCasingMain, i, 0, true); - } - for (int i = 0; i < 7; i++) { - for (int u = 1; u < 6; u++) { - if ((i == 2 || i == 3 || i == 4) && (u == 2 || u ==3 || u == 4)) { - a2.addMuffler(aCasingMain, aMetaCasingMain, i, u); - } - else { - a2.addBlockForPos(aCasingMain, aMetaCasingMain, i, u, true); - } - } - } - for (int i = 0; i < 7; i++) { - a2.addBlockForPos(aCasingMain, aMetaCasingMain, i, 6, true); - } - a2.lock(true); - - this.setLayer(a0, 0); - this.setLayer(a1, 1); - this.setLayer(a1, 2); - this.setLayer(a2, 3); - } - - @Override - public int getMinimumInputBus() { - return 0; - } - - @Override - public int getMinimumInputHatch() { - return 4; - } - - @Override - public int getMinimumOutputBus() { - return 0; - } - - @Override - public int getMinimumOutputHatch() { - return 4; - } - - @Override - public int getMinimumInputEnergy() { - return 0; - } - - @Override - public int getMinimumOutputEnergy() { - return 4; - } - - @Override - public int getMinimumMaintHatch() { - return 1; - } - - @Override - public int getMinimumMufflers() { - return 4; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java deleted file mode 100644 index 2fba1b0448..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java +++ /dev/null @@ -1,102 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.covers; - -import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_AGON; -import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_BITT; -import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_ISZM; -import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_JELT; -import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_KORP; - -import cpw.mods.fml.common.Loader; -import gtPlusPlus.core.lib.VanillaColours; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers; -import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; -import gtPlusPlus.xmod.gregtech.common.items.covers.MetaItemCoverCasings; - -public class CoverManager { - - // ZTones - public static MetaCustomCoverItem Cover_Agon; - public static MetaCustomCoverItem Cover_Iszm; - public static MetaCustomCoverItem Cover_Korp; - public static MetaCustomCoverItem Cover_Jelt; - public static MetaCustomCoverItem Cover_Bitt; - - // GT - public static MetaItemCoverCasings Cover_Gt_Machine_Casing; - - public static void generateCustomCovers() { - - // init textures - TexturesGtCutomCovers.init(); - - // GT Machine Casings - Cover_Gt_Machine_Casing = new MetaItemCoverCasings(); - - if (Loader.isModLoaded("Ztones")) { - String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; - MetaCustomCoverItem[] aZtoneCoverItems = new MetaCustomCoverItem[] { Cover_Agon, Cover_Iszm, Cover_Korp, - Cover_Jelt, Cover_Bitt }; - CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, - TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; - short[][][] aRGB = new short[][][] { ZTONES.RGB_AGON, ZTONES.RGB_ISZM, ZTONES.RGB_KORP, ZTONES.RGB_JELT, - ZTONES.RGB_BITT }; - for (int y = 0; y < aZtoneCoverTextureNames.length; y++) { - aZtoneCoverItems[y] = new MetaCustomCoverItem("Ztones", 16, aZtoneCoverTextureNames[y], aArrays[y], - aRGB[y]); - } - } - - } - - final static class ZTONES { - - private static final short[][] RGB_AGON = new short[][] { VanillaColours.DYE_WHITE.getAsShort(), - VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_LIME.getAsShort(), - VanillaColours.DYE_GREEN.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(), - VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(), - VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(), - VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_BROWN.getAsShort(), - VanillaColours.DYE_BLACK.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_LIGHT_GRAY.getAsShort(), }; - private static final short[][] RGB_ISZM = new short[][] { VanillaColours.DYE_LIGHT_GRAY.getAsShort(), - VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(), - VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_RED.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(), - VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_RED.getAsShort(), - VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(), - VanillaColours.DYE_DARK_PURPLE.getAsShort(), - }; - private static final short[][] RGB_KORP = new short[][] { new short[] { 125, 125, 125 }, - VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), - VanillaColours.DYE_DARK_GRAY.getAsShort(), new short[] { 22, 156, 156 }, new short[] { 22, 156, 156 }, - VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), }; - private static final short[][] RGB_JELT = new short[][] { VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_ORANGE.getAsShort(), }; - private static final short[][] RGB_BITT = new short[][] { VanillaColours.DYE_BLACK.getAsShort(), - VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(), - VanillaColours.DYE_LIME.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(), - VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(), - VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(), - VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(), - VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(), - VanillaColours.DYE_RED.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), - VanillaColours.DYE_BROWN.getAsShort(), }; - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java deleted file mode 100644 index a88fbc0d66..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java +++ /dev/null @@ -1,247 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.covers; - -import gregtech.api.gui.GT_GUICover; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.minecraft.LangUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; -import gregtech.api.gui.widgets.GT_GuiIntegerTextBox; -import gregtech.api.enums.GT_Values; -import gregtech.api.net.GT_Packet_TileEntityCover; - - -public class GTPP_Cover_Overflow extends GT_CoverBehavior { - - public final int mTransferRate; - public final int mInitialTransferRate; - public final int mMaxTransferRate; - - public GTPP_Cover_Overflow(int aTransferRate) { - this.mTransferRate = aTransferRate * 1000 / 10; - this.mInitialTransferRate = aTransferRate; - this.mMaxTransferRate = aTransferRate * 1000; - } - - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { - if (aCoverVariable == 0) { - return aCoverVariable; - } - if ((aTileEntity instanceof IFluidHandler)) { - //Logger.INFO("Trying to Void via Overflow."); - IFluidHandler tTank1; - ForgeDirection directionFrom; - directionFrom = ForgeDirection.UNKNOWN; - tTank1 = (IFluidHandler) aTileEntity; - if (tTank1 != null) { - //Logger.INFO("Found Self. "+aSide); - //FluidStack aTankStack = tTank1.drain(ForgeDirection.UNKNOWN, 1, false); - FluidStack aTankStack = tTank1.getTankInfo(directionFrom)[0].fluid; - if (aTankStack != null) { - //Logger.INFO("Found Fluid inside self - "+aTankStack.getLocalizedName()+", overflow point set at "+aCoverVariable+"L and we have "+aTankStack.amount+"L inside."); - if (aTankStack.amount > aCoverVariable) { - int aAmountToDrain = aTankStack.amount - aCoverVariable; - //Logger.INFO("There is "+aAmountToDrain+" more fluid in the tank than we would like."); - if (aAmountToDrain > 0) { - FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aAmountToDrain), true); - if (tLiquid != null) { - //Logger.INFO("Drained "+aAmountToDrain+"L."); - } - } - } - } - else { - //Logger.INFO("Could not simulate drain on self."); - } - } - } - return aCoverVariable; - } - - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += (mMaxTransferRate * (aPlayer.isSneaking() ? 0.1f : 0.01f)); - } else { - aCoverVariable -= (mMaxTransferRate * (aPlayer.isSneaking() ? 0.1f : 0.01f)); - } - if (aCoverVariable > mMaxTransferRate) { - aCoverVariable = mInitialTransferRate; - } - if (aCoverVariable <= 0) { - aCoverVariable = mMaxTransferRate; - } - GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); - return aCoverVariable; - } - - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - boolean aShift = aPlayer.isSneaking(); - int aAmount = aShift ? 128 : 8; - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += aAmount; - } else { - aCoverVariable -= aAmount; - } - if (aCoverVariable > mMaxTransferRate) { - aCoverVariable = mInitialTransferRate; - } - if (aCoverVariable <= 0) { - aCoverVariable = mMaxTransferRate; - } - GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); - aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); - return true; - } - - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } - - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return true; - } - - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 5; - } - - //GUI - @Override - public boolean hasCoverGUI() { - return true; - } - - @Override - public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { - return new GTPP_Cover_Overflow.GUI(aSide, aCoverID, coverData, aTileEntity); - } - - private class GUI extends GT_GUICover { - private final byte side; - private final int coverID; - private GT_GuiIntegerTextBox tBox; - private int coverVariable; - - private static final int startX = 10; - private static final int startY = 25; - private static final int spaceX = 18; - private static final int spaceY = 18; - - private boolean warn = false; - - public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); - this.side = aSide; - this.coverID = aCoverID; - this.coverVariable = aCoverVariable; - - tBox = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 0 + 8, spaceX * 4 - 3, 12); - tBox.setText(String.valueOf(this.coverVariable)); - tBox.setMaxStringLength(10); - } - - @Override - protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { - tBox.setFocused(true); - } - - @Override - public void drawExtras(int mouseX, int mouseY, float parTicks) { - super.drawExtras(mouseX, mouseY, parTicks); - this.getFontRenderer().drawString(trans("010", "L"), startX + spaceX * 4, 4 + startY + spaceY * 0 + 8, 0xFF555555); - if (warn) - this.getFontRenderer().drawString(trans("011","Max")+": "+coverVariable+"/"+mMaxTransferRate+" "+trans("010", "L"), startX + spaceX * 0, 4 + startY + spaceY * 1 + 6, 0xffff0000); - else - this.getFontRenderer().drawString(trans("011","Now")+": "+coverVariable+"/"+mMaxTransferRate+" "+trans("010", "L"), startX + spaceX * 0, 4 + startY + spaceY * 1 + 6, 0xFF555555); - } - @Override - public void onMouseWheel(int x, int y, int delta) { - for (GT_GuiIntegerTextBox box : textBoxes){ - if (box.isFocused()) { - int step = Math.max(1, Math.abs(delta / 120)); - step = (isShiftKeyDown() ? 50 : isCtrlKeyDown() ? 5 : 1) * (delta > 0 ? step : -step); - long i; - try { - i = Long.parseLong(box.getText()); - } catch (NumberFormatException e) { - return; - } - if (i > (Long.MAX_VALUE-1000)) - break; - - i = i + step; - if (i <= 0) - i = 0; - box.setText(String.valueOf(i)); - break; - } - } - } - - @Override - public void applyTextBox(GT_GuiIntegerTextBox box) { - long i; - String s = box.getText().trim(); - try { - i = Long.parseLong(s); - } catch (NumberFormatException e) { - resetTextBox(box); - return; - } - - warn = false; - if (box.id == 2) { - if (i > (long) mMaxTransferRate) { - i = mMaxTransferRate; - warn = true; - } else if (i < 0) { - i = 0; - } - coverVariable = (int) i; - } - box.setText(String.valueOf(i)); - GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); - } - - @Override - public void resetTextBox(GT_GuiIntegerTextBox box) { - if (box.id == 2) - box.setText(String.valueOf(coverVariable)); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java deleted file mode 100644 index 0299447694..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java +++ /dev/null @@ -1,182 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.covers; - -import java.lang.reflect.Field; -import java.util.HashMap; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.LangUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; - -public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior { - - public final int mInitialCapacity; - public final int mMaxItemCapacity; - - public static final Class sQuantumChest; - public static final Class sSuperChestGTPP; - public static final Class sSuperChestGTNH; - public static HashMap mItemAmountFields = new HashMap(); - public static HashMap mItemTypeFields = new HashMap(); - - static { - sQuantumChest = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest"); - sSuperChestGTPP = ReflectionUtils.getClass("gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest"); - if (CORE.GTNH) { - sSuperChestGTNH = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest"); - } - else { - sSuperChestGTNH = null; - } - if (sQuantumChest != null) { - mItemAmountFields.put(0, ReflectionUtils.getField(sQuantumChest, "mItemCount")); - mItemTypeFields.put(0, ReflectionUtils.getField(sQuantumChest, "mItemStack")); - } - if (sSuperChestGTPP != null) { - mItemAmountFields.put(1, ReflectionUtils.getField(sSuperChestGTPP, "mItemCount")); - mItemTypeFields.put(1, ReflectionUtils.getField(sSuperChestGTPP, "mItemStack")); - } - if (sSuperChestGTNH != null) { - mItemAmountFields.put(2, ReflectionUtils.getField(sSuperChestGTNH, "mItemCount")); - mItemTypeFields.put(2, ReflectionUtils.getField(sSuperChestGTNH, "mItemStack")); - } - } - - public GTPP_Cover_Overflow_Item(int aCapacity) { - this.mInitialCapacity = aCapacity; - this.mMaxItemCapacity = aCapacity * 1000; - } - - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { - if (aCoverVariable == 0) { - return aCoverVariable; - } - - // Get the IGTTile - IGregTechTileEntity aGtTileEntity = aTileEntity.getIGregTechTileEntity(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()); - if (aGtTileEntity == null) { - return aCoverVariable; - } - - // Get the MetaTile - final IMetaTileEntity aMetaTileEntity = aGtTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return aCoverVariable; - } - boolean didHandle = false; - // Special Case for everything I want to support. /facepalm - if (sQuantumChest != null && sQuantumChest.isInstance(aMetaTileEntity)) { - didHandle = handleDigitalChest(aMetaTileEntity, 0); - } - else if (sSuperChestGTPP.isInstance(aMetaTileEntity)) { - didHandle = handleDigitalChest(aMetaTileEntity, 1); - - } - else if (CORE.GTNH && sSuperChestGTNH != null && sSuperChestGTNH.isInstance(aMetaTileEntity)) { - didHandle = handleDigitalChest(aMetaTileEntity, 2); - } - - return aCoverVariable; - } - - private boolean handleDigitalChest(IMetaTileEntity aTile, int aType) { - int aItemAmount = (int) ReflectionUtils.getFieldValue(mItemAmountFields.get(aType), aTile); - ItemStack aItemType = (ItemStack) ReflectionUtils.getFieldValue(mItemTypeFields.get(aType), aTile); - - if (aItemType == null || aItemAmount <= 0) { - return false; - } - else { - if (aItemAmount > mInitialCapacity) { - int aNewItemAmount = mInitialCapacity; - ReflectionUtils.setField(aTile, mItemAmountFields.get(aType), aNewItemAmount); - } - } - return true; - } - - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f)); - } else { - aCoverVariable -= (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f)); - } - if (aCoverVariable > mMaxItemCapacity) { - aCoverVariable = mInitialCapacity; - } - if (aCoverVariable <= 0) { - aCoverVariable = mMaxItemCapacity; - } - GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); - return aCoverVariable; - } - - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - boolean aShift = aPlayer.isSneaking(); - int aAmount = aShift ? 128 : 8; - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += aAmount; - } else { - aCoverVariable -= aAmount; - } - if (aCoverVariable > mMaxItemCapacity) { - aCoverVariable = mInitialCapacity; - } - if (aCoverVariable <= 0) { - aCoverVariable = mMaxItemCapacity; - } - GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); - aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); - return true; - } - - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } - - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return true; - } - - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 5; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java deleted file mode 100644 index 65b59ce151..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java +++ /dev/null @@ -1,186 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.covers; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_CoverBehavior; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.util.minecraft.LangUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; - -public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { - - private static final Map sConnectionStateForEntityMap = new ConcurrentHashMap(); - private static final Map sPrefixMap = new ConcurrentHashMap(); - private static final int VALUE_OFF = 0; - private static final int VALUE_ON = 1; - - public static String generateUniqueKey(byte aSide, ICoverable aEntity) { - try { - BlockPos aPos = new BlockPos(aEntity.getIGregTechTileEntity(aEntity.getXCoord(), aEntity.getYCoord(), aEntity.getZCoord())); - ForgeDirection aDir = ForgeDirection.getOrientation(aSide); - String s = aEntity.getInventoryName()+"."+aPos.getUniqueIdentifier()+aDir.name(); - return s; - } - catch (Throwable t) {} - XSTR x = new XSTR(); - return "ERROR."+x.getSeed()+x.hashCode()+x.nextDouble()+".ID"; - } - - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - PlayerUtils.messagePlayer(aPlayer, LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable)); - return super.onCoverRightclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); - } - - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - return super.onCoverScrewdriverclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); - } - - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable); - } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 1; - } - - @Override - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { - try { - String aKey = generateUniqueKey(aSide, aTileEntity); - Integer b = sConnectionStateForEntityMap.get(aKey); - //Logger.INFO("Val: "+aCoverVariable); - if (b != null && aCoverVariable != b) { - aCoverVariable = b; - } - if (b == null) { - b = aCoverVariable; - sConnectionStateForEntityMap.put(aKey, b); - trySetState(aSide, b == VALUE_ON ? VALUE_ON : VALUE_OFF, aTileEntity); - } - } - catch (Throwable t) { - - } - return aCoverVariable; - } - - @Override - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - @Override - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aCoverVariable); - } - - @Override - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return super.alwaysLookConnected(aSide, aCoverID, aCoverVariable, aTileEntity); - } - - @Override - public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { - if (!getConnectionState(aCoverVariable)) { - return 0; - } - return super.getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity); - } - - @Override - public void placeCover(byte aSide, ItemStack aCover, ICoverable aTileEntity) { - String aKey = generateUniqueKey(aSide, aTileEntity); - boolean state = getCoverConnections(aCover); - sPrefixMap.put(aKey, aCover.getUnlocalizedName()); - Logger.INFO("Mapping key "+aKey+" to "+state); - sConnectionStateForEntityMap.put(aKey, state ? VALUE_ON : VALUE_OFF); - Logger.INFO("Key Value: "+(state ? VALUE_ON : VALUE_OFF)); - //Try set cover state directly - //trySetState(aSide, state ? VALUE_ON : VALUE_OFF, aTileEntity); - super.placeCover(aSide, aCover, aTileEntity); - } - - @Override - public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - boolean aForced) { - String aKey = generateUniqueKey(aSide, aTileEntity); - sConnectionStateForEntityMap.remove(aKey); - //Logger.INFO("Unmapping key "+aKey+"."); - return true; - } - - public static boolean getConnectionState(int aCoverVar) { - return aCoverVar == VALUE_ON; - } - - private static final void trySetState(byte aSide, int aState, ICoverable aTile) { - //Try set cover state directly - if (aTile instanceof IGregTechTileEntity) { - IGregTechTileEntity gTileEntity = (IGregTechTileEntity) aTile; - if (gTileEntity != null) { - gTileEntity.setCoverDataAtSide(aSide, aState); - } - } - } - - - public static boolean getConnectionState(byte aSide, ICoverable aTile) { - String aKey = generateUniqueKey(aSide, aTile); - return getConnectionState(aKey); - } - - public static boolean getConnectionState(String aKey) { - Integer b = sConnectionStateForEntityMap.get(aKey); - //Logger.INFO("Get State: "+b+" | "+aKey); - return b != null ? b == VALUE_ON : false; - } - - public static final boolean getCoverConnections(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("CustomCoverMeta"); - if (aNBT != null) { - return aNBT.getBoolean("AllowConnections"); - } - } - return false; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java deleted file mode 100644 index 70c7b2da23..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java +++ /dev/null @@ -1,429 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_ModHandler; -import gregtech.common.items.GT_MetaGenerated_Item_01; -import gregtech.common.items.GT_MetaGenerated_Item_02; -import gregtech.common.items.GT_MetaGenerated_Tool_01; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaWirelessCharger; -import ic2.api.info.Info; -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; - -public class ChargingHelper { - - private static Map> mValidPlayers = new HashMap>(); - protected static Map mChargerMap = new HashMap(); - private int mTickTimer = 0; - private final int mTickMultiplier = 20; - - //Called whenever the player is updated or ticked. - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onPlayerTick(LivingUpdateEvent event) { - try { - if (event.entity != null && event.entityLiving != null){ - if (event.entityLiving instanceof EntityPlayer){ - EntityPlayer mPlayerMan = (EntityPlayer) event.entityLiving; - - - if (mPlayerMan != null){ - //Utils.LOG_WARNING("Found Player."); - - if (Utils.isServer()){ - //Utils.LOG_WARNING("Found Server-Side."); - - mTickTimer++; - if (mTickTimer % mTickMultiplier == 0){ - - long mVoltage = 0; - long mEuStored = 0; - - if (!mChargerMap.isEmpty() && mValidPlayers.containsKey(mPlayerMan)){ - InventoryPlayer mPlayerInventory = mPlayerMan.inventory; - ItemStack[] mArmourContents = mPlayerInventory.armorInventory.clone(); - ItemStack[] mInventoryContents = mPlayerInventory.mainInventory.clone(); - - for (GregtechMetaWirelessCharger mEntityTemp : mChargerMap.values()){ - if (mEntityTemp != null){ - if (mPlayerMan.getEntityWorld().provider.dimensionId == mEntityTemp.getDimensionID()){ - mVoltage = mEntityTemp.maxEUInput(); - mEuStored = mEntityTemp.getEUVar(); - if (mVoltage > 0 && mEuStored >= mVoltage){ - - Map LR = mEntityTemp.getLongRangeMap(); - Map LO = mEntityTemp.getLocalMap(); - - long mStartingEu = mEntityTemp.getEUVar(); - long mCurrentEu = mEntityTemp.getEUVar(); - long mEuUsed = 0; - if (mEntityTemp.getMode() == 0){ - if (!LR.isEmpty() && LR.containsKey(mPlayerMan)){ - mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); - mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); - } - } - else if (mEntityTemp.getMode() == 1){ - if (!LO.isEmpty() && LO.containsValue(mPlayerMan)){ - mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); - mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); - } - } - else { - if (!LR.isEmpty() && LR.containsKey(mPlayerMan)){ - mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); - mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); - } - if (!LO.isEmpty() && LO.containsValue(mPlayerMan)){ - mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); - mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); - } - } - - if ((mEuUsed = (mStartingEu - mCurrentEu)) <= 0 && mEntityTemp != null){ - long mMaxDistance; - if (mEntityTemp.getMode() == 0){ - mMaxDistance = (4*GT_Values.V[mEntityTemp.getTier()]); - } - else if (mEntityTemp.getMode() == 1){ - mMaxDistance = (mEntityTemp.getTier()*10); - } - else { - mMaxDistance = (4*GT_Values.V[mEntityTemp.getTier()]/2); - } - double mDistance = calculateDistance(mEntityTemp, mPlayerMan); - long mVoltageCost = MathUtils.findPercentageOfInt(mMaxDistance, (float) mDistance); - - if (mVoltageCost > 0){ - if (mVoltageCost > mEntityTemp.maxEUInput()){ - mEntityTemp.setEUVar((mEntityTemp.getEUVar()-mEntityTemp.maxEUInput())); - } - else { - mEntityTemp.setEUVar((mEntityTemp.getEUVar()-mVoltageCost)); - } - } - } - } - } - } - } - } - } - } - } - } - } - } - - catch (Throwable t){ - //Utils.LOG_WARNING("State of Wireless Charger changed in an invalid way, this prevented a crash."); - - if (!mChargerMap.isEmpty()){ - for (GregtechMetaWirelessCharger r : mChargerMap.values()){ - if (r == null){ - mChargerMap.remove(r); - } - } - } - //t.printStackTrace(); - } - - - } - - public static boolean addEntry(BlockPos mPos, GregtechMetaWirelessCharger mEntity){ - if (mEntity == null){ - return false; - } - if (!mChargerMap.containsKey(mPos)){ - if (mChargerMap.put(mPos, mEntity) == null){ - return true; - } - else { - return false; - } - } - else { - return false; - } - } - - public static boolean removeEntry(BlockPos mPos, GregtechMetaWirelessCharger mEntity){ - if (mEntity == null){ - return false; - } - if (mChargerMap.containsKey(mPos)){ - if (mChargerMap.remove(mPos, mEntity)){ - return true; - } - else { - return false; - } - } - else { - return false; - } - } - - public static boolean addValidPlayer(EntityPlayer mPlayer, GregtechMetaWirelessCharger mEntity){ - if (mEntity == null){ - return false; - } - Logger.WARNING("trying to map new player"); - if (mValidPlayers.containsKey(mPlayer)){ - Logger.WARNING("Key contains player already?"); - return false; - } - else { - Logger.WARNING("key not found, adding"); - Pair mEntry = new Pair(mEntity, (byte) mEntity.getMode()); - if (mValidPlayers.put(mPlayer, mEntry) == null){ - Logger.WARNING("Added a Player to the Tick Map."); - return true; - } - else { - Logger.WARNING("Tried to add player but it was already there?"); - return false; - } - } - } - - public static boolean removeValidPlayer(EntityPlayer mPlayer, GregtechMetaWirelessCharger mEntity){ - if (mEntity == null){ - return false; - } - Logger.WARNING("trying to remove player from map"); - if (mValidPlayers.containsKey(mPlayer)){ - Logger.WARNING("key found, removing"); - Pair mEntry = new Pair(mEntity, (byte) mEntity.getMode()); - if (mValidPlayers.remove(mPlayer, mEntry)){ - Logger.WARNING("Removed a Player to the Tick Map."); - return true; - } - else { - Logger.WARNING("Tried to remove player but it was not there?"); - return false; - } - } - else { - Logger.WARNING("Key does not contain player?"); - return false; - } - } - - public double calculateDistance(GregtechMetaWirelessCharger mEntityTemp, EntityPlayer mPlayerMan){ - if (mEntityTemp == null || mPlayerMan == null){ - return 0; - } - return mEntityTemp.getDistanceBetweenTwoPositions(mEntityTemp.getTileEntityPosition(), mEntityTemp.getPositionOfEntity(mPlayerMan)); - } - - public long chargeItems(GregtechMetaWirelessCharger mEntity, ItemStack[] mItems, EntityPlayer mPlayer){ - if (mEntity == null){ - return -100; - } - if (mItems == null || mItems.length == 0){ - return mEntity.getEUVar(); - } - long mInitialValue = mEntity.getEUVar(); - long mReturnValue = chargeItemsEx(mEntity, mItems, mPlayer); - return ((mReturnValue < mInitialValue) ? mReturnValue : mInitialValue); - } - - public long chargeItemsEx(GregtechMetaWirelessCharger mEntity, ItemStack[] mItems, EntityPlayer mPlayer){ - - //Bad Entity - if (mEntity == null){ - return -100; - } - //Bad Inventory - if (mItems == null || mItems.length == 0){ - return mEntity.getEUVar(); - } - //Set Variables to Charge - int mChargedItems = 0; - final int mTier = mEntity.getTier(); - final long mVoltage = mEntity.maxEUInput(); - long mEuStored = mEntity.getEUVar(); - final long mEuStoredOriginal = mEntity.getEUVar(); - //For Inventory Contents - - int mItemSlot = 0; - - for (ItemStack mTemp : mItems){ - mItemSlot++; - if (mTemp != null){ - Logger.WARNING("Slot "+mItemSlot+" contains "+mTemp.getDisplayName()); - } - //Is item Electrical - if (isItemValid(mTemp)){ - Logger.WARNING("1"); - - //Transfer Limit - double mItemEuTLimit = ((IElectricItem) mTemp.getItem()).getTransferLimit(mTemp); - //Check if Tile has more or equal EU to what can be transferred into the item. - if (mEuStored >= mItemEuTLimit){ - Logger.WARNING("2"); - - double mItemMaxCharge = ((IElectricItem) mTemp.getItem()).getMaxCharge(mTemp); - double mitemCurrentCharge = ElectricItem.manager.getCharge(mTemp); - - if (mitemCurrentCharge >= mItemMaxCharge){ - continue; - } - - //Try get charge direct from NBT for GT and IC2 stacks - Logger.WARNING("3"); - if (mTemp.getItem() instanceof GT_MetaGenerated_Tool_01 - || mTemp.getItem() instanceof GT_MetaGenerated_Item_01 - || mTemp.getItem() instanceof GT_MetaGenerated_Item_02 - || ReflectionUtils.getClass("gregtech.common.items.GT_MetaGenerated_Item_03").isInstance(mTemp.getItem()) - || mTemp.getItem().getClass().getName().toLowerCase().equals(("gregtech.common.items.GT_MetaGenerated_Tool_01").toLowerCase())){ - if (!NBTUtils.hasKey(mTemp, "GT.ItemCharge")){ - if (!mTemp.getDisplayName().toLowerCase().contains("battery")){ - if (!GT_ModHandler.isElectricItem(mTemp)){ - continue; - } - } - else { - mitemCurrentCharge = 0; - } - } - else { - mitemCurrentCharge = NBTUtils.getLong(mTemp, "GT.ItemCharge"); - } - } - else if (mTemp.getItem() instanceof IElectricItem){ - mitemCurrentCharge = NBTUtils.getLong(mTemp, "charge"); - } - - double mVoltageIncrease; - if (mItemEuTLimit >= mVoltage){ - mVoltageIncrease = mVoltage; - } - else if (mItemEuTLimit < mVoltage){ - mVoltageIncrease = mItemEuTLimit; - } - else { - mVoltageIncrease = mItemEuTLimit; - } - - Logger.WARNING("4"); - - int mMulti; - if ((mitemCurrentCharge + (mVoltageIncrease*20)) <= (mItemMaxCharge - (mVoltageIncrease*20))){ - mMulti = 20; - } - else if ((mitemCurrentCharge + (mVoltageIncrease*10)) <= (mItemMaxCharge - (mVoltageIncrease*10))){ - mMulti = 10; - } - else if ((mitemCurrentCharge + (mVoltageIncrease*5)) <= (mItemMaxCharge - (mVoltageIncrease*5))){ - mMulti = 5; - } - else { - mMulti = 1; - } - Logger.WARNING("5"); - - - int mMultiVoltage = (int) (mMulti*mVoltageIncrease); - - if ((mitemCurrentCharge + mMultiVoltage) <= mItemMaxCharge){ - Logger.WARNING("6"); - int g = 0; - if ((g = GT_ModHandler.chargeElectricItem(mTemp, mMultiVoltage, Integer.MAX_VALUE, true, false)) > 0){ - Logger.WARNING("6.5 - "+g+" - "+mMulti); - for (int i=0; i 0){ - continue; - } - } - } - if (ElectricItem.manager.getCharge(mTemp) > mitemCurrentCharge){ - Logger.WARNING("7"); - mEntity.setEUVar(mEuStored-(mVoltage*mMulti)); - mEuStored = mEntity.getEUVar(); - Logger.WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp)); - mChargedItems++; - } - } - - //Try top up Item Chrage - mitemCurrentCharge = ElectricItem.manager.getCharge(mTemp); - if (mitemCurrentCharge < mItemMaxCharge && mitemCurrentCharge >= (mItemMaxCharge-mVoltage)){ - int xDif = (int) (mItemMaxCharge - mitemCurrentCharge); - Logger.WARNING("8 - "+xDif); - int g = 0; - if ((g = GT_ModHandler.chargeElectricItem(mTemp, xDif, Integer.MAX_VALUE, true, false)) >= 0){ - Logger.WARNING("8.5 - "+g); - if (ElectricItem.manager.getCharge(mTemp) >= mItemMaxCharge){ - Logger.WARNING("9"); - mEntity.setEUVar(mEntity.getEUVar()-(xDif)); - mEuStored = mEntity.getEUVar(); - Logger.WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp)); - mChargedItems++; - } - } - } - - - } - } - else { - if (mTemp != null){ - Logger.WARNING("Found Non-Valid item. "+mTemp.getDisplayName()); - } - } - } - - //Return Values - if (mChargedItems < 1){ - return mEuStoredOriginal; - } - - return mEntity.getEUVar(); - } - - public static boolean isItemValid(final ItemStack itemstack) { - if (itemstack == null){ - return false; - } - if (GT_ModHandler.isElectricItem(itemstack)){ - return true; - } - if ((accepts(itemstack)) || (itemstack.getItem() instanceof IElectricItem)) { - return true; - } - return false; - } - - public static boolean accepts(final ItemStack stack) { - if (stack == null) { - return false; - } - else { - return false; - } - //return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java deleted file mode 100644 index e06636e168..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.world.World; -import net.minecraft.world.WorldServer; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Container; -import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; -import net.minecraftforge.common.util.FakePlayerFactory; - -public class CraftingHelper{ - - public final String mInventoryName; - public final int mPosX; - public final int mPosY; - public final int mPosZ; - public final GT4Entity_AutoCrafter crafter; - public final World world; - public final EntityPlayerMP player; - public final AC_Helper_Container inventory; - - public CraftingHelper(GT4Entity_AutoCrafter AC){ - Logger.INFO("[A-C] Created a crafting helper."); - crafter = AC; - AC_Helper_Utils.addCrafter(AC); - //Get some variables. - world = AC.getBaseMetaTileEntity().getWorld(); - mPosX = AC.getBaseMetaTileEntity().getXCoord(); - mPosY = AC.getBaseMetaTileEntity().getYCoord(); - mPosZ = AC.getBaseMetaTileEntity().getZCoord(); - //Create Fake player to handle crating. - - player = CORE.getFakePlayer(world); - //Set storage container - inventory = new AC_Helper_Container(player.inventory, world, mPosX, mPosY, mPosZ); - mInventoryName = inventory.getMatrix().getInventoryName(); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java deleted file mode 100644 index 333939d800..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java +++ /dev/null @@ -1,79 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import java.util.HashMap; - -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.data.AES; -import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; -import net.minecraft.item.ItemStack; - -public class FlotationRecipeHandler { - - private static HashMap sMaterialMap = new HashMap(); - private static HashMap sMilledMap = new HashMap(); - private static final AES sEncodingHandler = new AES(); - - public static boolean registerOreType(Material aMaterial) { - String aMaterialKey = sEncodingHandler.encode(aMaterial.getUnlocalizedName()); - if (sMaterialMap.containsKey(aMaterialKey)) { - CORE.crash("Tried to register a Flotation material to an ID already in use. ID: "+aMaterialKey); - return false; - } - else { - sMaterialMap.put(aMaterialKey, aMaterial); - sMilledMap.put(aMaterialKey, aMaterial.getMilled(1)); - } - return true; - } - - public static int getHashForMaterial(Material aMaterial) { - return getMaterialsID(aMaterial).hashCode(); - } - - public static String getMaterialsID(Material aMaterial) { - for (String aKey : sMaterialMap.keySet()) { - if (sMaterialMap.get(aKey).equals(aMaterial)) { - return aKey; - } - } - return "BAD_MATERIAL_ID"; - } - - public static Material getMaterialOfMilledProduct(ItemStack aMilled) { - for (String aKey : sMilledMap.keySet()) { - ItemStack aTempMilledStack = sMilledMap.get(aKey); - if (GT_Utility.areStacksEqual(aTempMilledStack, aMilled, true)) { - return sMaterialMap.get(aKey); - } - } - return null; - } - - public static ItemStack findMilledStack(GT_Recipe aRecipe) { - if (aRecipe == null || aRecipe.mInputs == null || aRecipe.mInputs.length <= 0) { - return null; - } - return findMilledStack(aRecipe.mInputs); - } - - public static ItemStack findMilledStack(ItemStack[] aInputs) { - if (aInputs == null || aInputs.length <= 0) { - return null; - } - for (ItemStack aStack : aInputs) { - if (CustomOrePrefix.milled.get().contains(aStack)) { - return aStack; - } - } - return null; - } - - public static AES getEncoder() { - return sEncodingHandler; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java deleted file mode 100644 index d51107bbf0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; - -public class GT_MethodHelper { - - private static final Method mGetTexture; - private static final Class mITexturedTileEntity; - - static { - Class clazz = null; - Method aMeth = null; - if (ReflectionUtils.doesClassExist("gregtech.api.interfaces.tileentity.ITexturedTileEntity")) { - clazz = ReflectionUtils.getClass("gregtech.api.interfaces.tileentity.ITexturedTileEntity"); - aMeth = ReflectionUtils.getMethod(clazz, "getTexture", Block.class, byte.class); - } - mITexturedTileEntity = clazz; - mGetTexture = aMeth; - } - - - public static ITexture[] getTexture(TileEntity tTileEntity, Block aBlock, byte aSide) { - - if (mITexturedTileEntity.isInstance(tTileEntity)) { - - if (mGetTexture != null) { - try { - mGetTexture.invoke(tTileEntity, aBlock, aSide); - } - catch (IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - e.printStackTrace(); - } - } - else { - if (tTileEntity instanceof BaseMetaTileEntity) { - try { - BaseMetaTileEntity aTile = (BaseMetaTileEntity) tTileEntity; - ITexture rIcon = aTile.getCoverTexture(aSide); - Field aFacing = ReflectionUtils.getField(BaseMetaTileEntity.class, "mFacing"); - Field aColor = ReflectionUtils.getField(BaseMetaTileEntity.class, "mColor"); - Field aActive = ReflectionUtils.getField(BaseMetaTileEntity.class, "mActive"); - Field aMetaTile = ReflectionUtils.getField(BaseMetaTileEntity.class, "mMetaTileEntity"); - Method aHasValidTile = ReflectionUtils.getMethod(BaseMetaTileEntity.class, "hasValidMetaTileEntity", new Class[] {}); - - boolean hasValidTileObj = (boolean) aHasValidTile.invoke(aTile, new Object[] {}); - boolean aActiveObj = aActive.getBoolean(aTile); - byte aFacingObj = aFacing.getByte(aTile); - byte aColorObj = aColor.getByte(aTile);; - MetaTileEntity aMetaTileObj = (MetaTileEntity) aMetaTile.get(aTile); - - if (rIcon != null) { - return new ITexture[]{rIcon}; - } else { - return hasValidTileObj - ? aMetaTileObj.getTexture(aTile, aSide, aFacingObj, (byte) (aColorObj - 1), aActiveObj, - aTile.getOutputRedstoneSignal(aSide) > 0) - : BlockIcons.ERROR_RENDERING; - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - } - } - return BlockIcons.ERROR_RENDERING; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java deleted file mode 100644 index 0b52560e0d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import java.util.HashMap; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.GregTech_API; -import net.minecraft.block.Block; -import net.minecraftforge.event.world.BlockEvent; - -public class MachineUpdateHandler { - - private static final HashMap mBlockCache = new HashMap(); - - public static void registerBlockToCauseMachineUpdate(String aUnlocalName, Block aBlock) { - mBlockCache.put(aUnlocalName, aBlock); - } - - @SubscribeEvent - public void onBlockEvent(BlockEvent event) { - Block aBlock = event.block; - String aUnlocalName = aBlock != null ? aBlock.getUnlocalizedName() : "NULL"; - boolean aDoUpdate = false; - if (aBlock != null && aUnlocalName != null && !aUnlocalName.equals("NULL")) { - for (String aCachedName : mBlockCache.keySet()) { - if (aCachedName.equals(aUnlocalName)) { - aDoUpdate = true; - break; - } - else { - if (aBlock == mBlockCache.get(aCachedName)) { - aDoUpdate = true; - break; - } - } - } - if (aDoUpdate) { - GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java deleted file mode 100644 index 2ff2712952..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java +++ /dev/null @@ -1,1033 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableTreeFarmerParticles; - -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -import com.google.common.collect.Lists; - -import gnu.trove.set.hash.THashSet; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; - -import gregtech.api.enums.*; -import net.minecraft.block.Block; -import net.minecraft.block.BlockAir; -import net.minecraft.block.IGrowable; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.network.play.server.S23PacketBlockChange; -import net.minecraft.server.MinecraftServer; -import net.minecraft.world.ChunkPosition; -import net.minecraft.world.World; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.items.GT_MetaGenerated_Item_02; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.players.FakeFarmer; -import gtPlusPlus.core.slots.SlotBuzzSaw.SAWTOOL; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.particles.BlockBreakParticles; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; -import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.BonemealEvent; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -public class TreeFarmHelper { - - public static final FluidStack fertT1 = FluidUtils.getFluidStack("fluid.fertiliser", 3); - public static final FluidStack fertT2 = FluidUtils.getFluidStack("fluid.un18fertiliser", 2); - public static final FluidStack fertT3 = FluidUtils.getFluidStack("fluid.un32fertiliser", 1); - private static final int sawOreId = OreDictionary.getOreID(ToolDictNames.craftingToolSaw.name()); - - public static ITexture[][][] getTextureSet() { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = TreeFarmHelper.getFront(i); - rTextures[1][i + 1] = TreeFarmHelper.getBack(i); - rTextures[2][i + 1] = TreeFarmHelper.getBottom(i); - rTextures[3][i + 1] = TreeFarmHelper.getTop(i); - rTextures[4][i + 1] = TreeFarmHelper.getSides(i); - rTextures[5][i + 1] = TreeFarmHelper.getFrontActive(i); - rTextures[6][i + 1] = TreeFarmHelper.getBackActive(i); - rTextures[7][i + 1] = TreeFarmHelper.getBottomActive(i); - rTextures[8][i + 1] = TreeFarmHelper.getTopActive(i); - rTextures[9][i + 1] = TreeFarmHelper.getSidesActive(i); - } - return rTextures; - } - - public static ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; - } - - public static ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; - } - - public static ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; - } - - public static ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; - } - - public static ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; - } - - public static ITexture[] getFrontActive(final byte aColor) { - return getFront(aColor); - } - - public static ITexture[] getBackActive(final byte aColor) { - return getBack(aColor); - } - - public static ITexture[] getBottomActive(final byte aColor) { - return getBottom(aColor); - } - - public static ITexture[] getTopActive(final byte aColor) { - return getTop(aColor); - } - - public static ITexture[] getSidesActive(final byte aColor) { - return getSides(aColor); - } - - public static boolean applyBonemeal(final EntityPlayer player, final World world, final int intX, final int intY, final int intZ, final short multiplier){ - final Block block = world.getBlock(intX, intY, intZ); - - - int roll; - int rollNeeded; - - if (multiplier==1){ - roll = MathUtils.randInt(1, 15); - rollNeeded = 15; - } - else if (multiplier==2){ - roll = MathUtils.randInt(1, 10); - rollNeeded = 10; - } - else { - roll = MathUtils.randInt(1, 5); - rollNeeded = 5; - } - - if (roll != rollNeeded){ - return false; - } - - //EntityPlayer player = FakePlayerFactory.getMinecraft((WorldServer)world); - if (!world.isRemote){ - if (enableTreeFarmerParticles){ - world.playAuxSFX(2005, intX, intY, intZ, 0); - } - } - final BonemealEvent event = new BonemealEvent(player, world, block, intX, intY, intZ); - if (MinecraftForge.EVENT_BUS.post(event)){ - Logger.MACHINE_INFO("Not sure why this returned false"); - return false; - } - if (event.getResult() == Result.ALLOW){ - if (!world.isRemote){ - world.playAuxSFX(2005, intX, intY, intZ, 0); - } - return true; - } - if (block instanceof IGrowable){ - final IGrowable igrowable = (IGrowable)block; - if (igrowable.func_149851_a(world, intX, intY, intZ, world.isRemote)){ - if (!world.isRemote){ - if (igrowable.func_149852_a(world, CORE.RANDOM, intX, intY, intZ)){ - igrowable.func_149853_b(world, CORE.RANDOM, intX, intY, intZ); - } - } - return true; - } - } - return false; - } - - public static boolean cleanUp(final IGregTechTileEntity aBaseMetaTileEntity){ - Logger.MACHINE_INFO("called cleanUp()"); - int cleanedUp = 0; - final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11; - final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 11; - - for (int h=1;h<175;h++){ - for (int i = -11; i <= 11; i++) { - for (int j = -11; j <= 11; j++) { - - final Block testBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - - - if - (( - ((i == -8) || (i == 8)) || - ((i == -9) || (i == 9)) || - ((i == -10) || (i == 10)) || - ((i == -11) || (i == 11)) - ) - && - ( - ((j == -8) || (j == 8)) || - ((j == -9) || (j == 9)) || - ((j == -10) || (j == 10)) || - ((j == -11) || (j == 11)) - )){ - - if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) { - //Logger.WARNING("5:"+testBlock.getUnlocalizedName()); - } else { - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.bookshelf); - } - } - - - //If not in the middle - don't know how else to check this one without lots of != - if ( - (i != 7) && (i != -7) && (j != 7) && (j != -7) && - (i != 6) && (i != -6) && (j != 6) && (j != -6) && - (i != 5) && (i != -5) && (j != 5) && (j != -5) && - (i != 4) && (i != -4) && (j != 4) && (j != -4) && - (i != 3) && (i != -3) && (j != 3) && (j != -3) && - (i != 2) && (i != -2) && (j != 2) && (j != -2) && - (i != 1) && (i != -1) && (j != 1) && (j != -1) && - (i != 0) && (j != 0) - ){ - - if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) { - //Logger.WARNING("0:"+testBlock.getUnlocalizedName()); - } else { - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.melon_block); - } - - - if (isLeaves(testBlock) || isWoodLog(testBlock)){ - //Logger.WARNING("1:"+testBlock.getUnlocalizedName()); - int posiX, posiY, posiZ; - posiX = aBaseMetaTileEntity.getXCoord()+xDir+i; - posiY = aBaseMetaTileEntity.getYCoord()+h; - posiZ = aBaseMetaTileEntity.getZCoord()+zDir+j; - //Utils.LOG_MACHINE_INFO("Cleaning Up some leftovers."); - cleanedUp++; - aBaseMetaTileEntity.getWorld().setBlockToAir(posiX, posiY, posiZ); - new BlockBreakParticles(aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, Blocks.dirt); - } - else { - //Utils.LOG_WARNING("2:"+testBlock.getUnlocalizedName()); - } - } - else { - //Utils.LOG_WARNING("1"); - } - - - } - - } - } - Logger.MACHINE_INFO("cleaning up | "+cleanedUp ); - return true; - } - - public static SAWTOOL isCorrectMachinePart(final ItemStack aStack) { - if (aStack != null){ - //Utils.LOG_WARNING("Found "+aStack.getDisplayName()+" in the GUI slot."); - if ((aStack.getItem() instanceof GT_MetaGenerated_Item_02) || (aStack.getItem() instanceof GT_MetaGenerated_Tool)){ - if (OrePrefixes.craftingTool.contains(aStack)){ - if (aStack.getDisplayName().toLowerCase().contains("saw") || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01")){ - if (aStack.getItemDamage() == 10){ - return SAWTOOL.SAW; - } - else if (aStack.getItemDamage() == 140 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")){ - return SAWTOOL.BUZZSAW; - } - else if (aStack.getItemDamage() == 110 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.110")){ - return SAWTOOL.CHAINSAW; - } - else if (aStack.getItemDamage() == 112 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.112")){ - return SAWTOOL.CHAINSAW; - } - else if (aStack.getItemDamage() == 114 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.114")){ - return SAWTOOL.CHAINSAW; - } - else { - return SAWTOOL.NONE; - } - } - } - } - } - return SAWTOOL.NONE; - } - - public static ToolType getPartType(final ItemStack aStack) { - if (aStack != null){ - //Utils.LOG_WARNING("Found "+aStack.getDisplayName()+" in the GUI slot."); - - if (aStack.getItem() == MetaGeneratedGregtechItems.INSTANCE) { - int aDmg = aStack.getItemDamage(); - if (aDmg >= 32120 && aDmg <= 32128) { - return ToolType.Unbreakable; - } - Logger.INFO("bad Tool in Slot 2 | "+aStack.getUnlocalizedName().toLowerCase() + " | "+aDmg); - return null; - } - - if (aStack.getItem() instanceof GT_MetaGenerated_Tool) { - if (Arrays.stream(OreDictionary.getOreIDs(aStack)).anyMatch(i -> i == sawOreId)) - return ToolType.Breakable; - } - } - Logger.INFO("bad Tool in Slot 4"); - return null; - } - - public static boolean isHumusLoaded = false; - public static boolean isForestryLogsLoaded = false; - public static boolean isForestryFenceLoaded = false; - public static boolean isForestrySaplingsLoaded = false; - public static boolean isForestryLeavesLoaded = false; - public static Block blockHumus; - - public static boolean isForestryValid(){ - if (!LoadedMods.Forestry){ - return false; - } - if (ReflectionUtils.doesClassExist("forestry.core.blocks.BlockSoil")){ - isHumusLoaded = true; - } - if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockLog")){ - isForestryLogsLoaded = true; - } - if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockArbFence")){ - isForestryFenceLoaded = true; - } - if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockSapling")){ - isForestrySaplingsLoaded = true; - } - if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockForestryLeaves")){ - isForestryLeavesLoaded = true; - } - return true; - } - - @Optional.Method(modid = "Forestry") - public static Block getHumus(){ - if(blockHumus != null){ - return blockHumus; - } - else if (isHumusLoaded){ - final Class humusClass = ReflectionUtils.getClass("forestry.core.blocks.BlockSoil"); - final ItemStack humusStack = ItemUtils.getCorrectStacktype("Forestry:soil", 1); - if (humusClass != null){ - blockHumus = Block.getBlockFromItem(humusStack.getItem()); - return Block.getBlockFromItem(humusStack.getItem()); - } - } - return null; - } - - public static boolean isWoodLog(final Block log){ - final String tTool = log.getHarvestTool(0); - - if ((log == Blocks.log) || (log == Blocks.log2)){ - return true; - } - - //Forestry/General Compat - if (log.getClass().getName().toLowerCase().contains("blocklog")){ - return true; - } - - //IC2 Rubber Tree Compat - if (log.getClass().getName().toLowerCase().contains("rubwood") || log.getClass().getName().toLowerCase().contains("rubleaves")){ - return true; - } - - return (OrePrefixes.log.contains(new ItemStack(log, 1))&& ((tTool != null) && (tTool.equals("axe")))) || (log.getMaterial() != Material.wood) ? false : (OrePrefixes.fence.contains(new ItemStack(log, 1)) ? false : true); - } - - public static boolean isLeaves(final Block log){ - if (log.getUnlocalizedName().toLowerCase().contains("leaf")){ - return true; - } - if (log.getUnlocalizedName().toLowerCase().contains("leaves")){ - return true; - } - if (log.getLocalizedName().toLowerCase().contains("leaf")){ - return true; - } - if (log.getLocalizedName().toLowerCase().contains("leaves")){ - return true; - } - return OrePrefixes.leaves.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.leaves || OrePrefixes.treeLeaves.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.vine || OrePrefixes.mushroom.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.cactus; - } - - public static boolean isSapling(final Block log){ - if (log != null){ - if (OrePrefixes.sapling.contains(new ItemStack(log, 1))){ - //Logger.WARNING(""+log.getLocalizedName()); - } - if (log.getLocalizedName().toLowerCase().contains("sapling")){ - //Logger.WARNING(""+log.getLocalizedName()); - return true; - } - } - return OrePrefixes.sapling.contains(new ItemStack(log, 1)); - } - - public static boolean isDirtBlock(final Block dirt){ - return (dirt == Blocks.dirt ? true : (dirt == Blocks.grass ? true : (getHumus() == null ? false : (dirt == blockHumus ? true : false)))); - } - - public static boolean isFenceBlock(final Block fence){ - return (fence == Blocks.fence ? true : (fence == Blocks.fence_gate ? true : (fence == Blocks.nether_brick_fence ? true : (OrePrefixes.fence.contains(new ItemStack(fence, 1)) ? true : false)))); - } - - public static boolean isAirBlock(final Block air){ - if (air.getLocalizedName().toLowerCase().contains("air")){ - return true; - } - if (air.getClass().getName().toLowerCase().contains("residual") || air.getClass().getName().toLowerCase().contains("heat")){ - return true; - } - return (air == Blocks.air ? true : (air instanceof BlockAir ? true : false)); - } - - /*public static boolean isSaplingBlock(Block sapling){ - return (sapling == Blocks.sapling ? true : (sapling == Blocks.)) - }*/ - - public static BlockPos checkForLogsInGrowArea(final IGregTechTileEntity aBaseMetaTileEntity) { - final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7; - final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7; - for (int i = -7; i <= 7; i++) { - for (int j = -7; j <= 7; j++) { - for (int h = 0; h <= 1; h++) { - //Farm Floor inner 14x14 - if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) { - if (h == 1) { - if (TreeFarmHelper.isWoodLog(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) { - Logger.INFO("Found a Log"); - return new BlockPos(aBaseMetaTileEntity.getXCoord()+xDir + i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir + j, aBaseMetaTileEntity.getWorld()); - } - } - } - } - } - } - return null; - } - - public static ItemStack[] findTreeFromBase(World world, BlockPos h) { - int HARD_LIMIT = 10000; - int mCount = 0; - Logger.INFO("Finding Rest of Tree."); - BlockPos mFirstSpot = h; - Set mSearchedSpaces = new HashSet(); - Set mTreeSet = getConnectedBlocks(world, mFirstSpot, mSearchedSpaces); - Set> mTreeSet2 = new HashSet>(); - Set mFinalTree = new HashSet(); - Iterator it = mTreeSet.iterator(); - - - Logger.INFO("Running first iteration."); - while(it.hasNext()){ - BlockPos G = it.next(); - mSearchedSpaces.add(G); - mTreeSet2.add(getConnectedBlocks(world, G, mSearchedSpaces)); - mCount++; - Logger.INFO("First Search: "+G.getLocationString()); - if (mCount > HARD_LIMIT) { - break; - } - } - - mCount = 0; - Iterator> it2 = mTreeSet2.iterator(); - Iterator it3; - Logger.INFO("Running second iteration."); - while(it2.hasNext()){ - Set G = it2.next(); - it3 = G.iterator(); - while(it3.hasNext()){ - BlockPos G2 = it3.next(); - mSearchedSpaces.add(G2); - mFinalTree.add(G2); - mCount++; - Logger.INFO("Second Search: "+G2.getLocationString()); - if (mCount > HARD_LIMIT) { - break; - } - } - if (mCount > HARD_LIMIT) { - break; - } - } - - - if (mFinalTree.size() > 0) { - Logger.INFO("Queuing "+mFinalTree.size()+" to Harvest Manager."); - TreeCutter harvestManager = new TreeCutter(world); - - Iterator ith = mFinalTree.iterator(); - while(ith.hasNext()){ - BlockPos G = ith.next(); - harvestManager.queue(G); - mCount++; - Logger.INFO("Queued: "+G.getLocationString()); - if (mCount > HARD_LIMIT) { - break; - } - } - - if (harvestManager.isValid) { - ItemStack[] loot = harvestManager.getDrops(); - if (loot.length > 0) { - //Logger.INFO("Returning Drops from harvestManager Queue."); - return loot; - } - } - } - return new ItemStack[] {}; - } - - - public static Set getConnectedBlocks(World W, BlockPos P, Set checkedSpaces) { - int HARD_LIMIT = 1000; - int mCount = 0; - Logger.INFO("Finding blocks connected to "+P.getLocationString()+"."); - Set mCheckedSpaces = checkedSpaces; - Set mStartSearch = searchSixFaces(W, P, mCheckedSpaces, false); - Set mSecondSearch = new HashSet(); - Set mThirdSearch = new HashSet(); - Iterator it = mStartSearch.iterator(); - while(it.hasNext()){ - Logger.INFO("Running first iteration. [II]"); - BlockPos G = it.next(); - mCheckedSpaces.add(G); - Set mBranchSearch = searchSixFaces(W, G, mCheckedSpaces, true); - Iterator it2 = mBranchSearch.iterator(); - while(it2.hasNext()){ - Logger.INFO("Running second iteration. [II]"); - BlockPos G2 = it2.next(); - mCheckedSpaces.add(G2); - mSecondSearch.add(G2); - mCount++; - if (mCount > HARD_LIMIT) { - break; - } - } - if (mCount > HARD_LIMIT) { - break; - } - } - mCount = 0; - Iterator itx = mSecondSearch.iterator(); - while(itx.hasNext()){ - BlockPos G = itx.next(); - mCheckedSpaces.add(G); - Set mBranchSearch = searchSixFaces(W, G, mCheckedSpaces, true); - Iterator it2 = mBranchSearch.iterator(); - while(it2.hasNext()){ - BlockPos G2 = it2.next(); - mCheckedSpaces.add(G2); - mThirdSearch.add(G2); - mCount++; - if (mCount > HARD_LIMIT) { - break; - } - } - if (mCount > HARD_LIMIT) { - break; - } - } - return mThirdSearch; - } - - public static Set searchSixFaces(World W, BlockPos P, Set checkedSpaces, boolean checkLeaves) { - Set mConnected = new HashSet(); - int x = P.xPos; - int y = P.yPos; - int z = P.zPos; - if (checkLeaves) { - if (isWoodLog(W.getBlock(x-1, y, z)) || isLeaves(W.getBlock(x-1, y, z))) { - BlockPos L = new BlockPos(x-1, y, z, W); - if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - } - } - if (isWoodLog(W.getBlock(x+1, y, z)) || isLeaves(W.getBlock(x+1, y, z))) { - BlockPos L = new BlockPos(x+1, y, z, W); - if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - } - } - if (isWoodLog(W.getBlock(x, y-1, z)) || isLeaves(W.getBlock(x, y-1, z))) { - BlockPos L = new BlockPos(x, y-1, z, W); - if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - } - } - if (isWoodLog(W.getBlock(x, y+1, z)) || isLeaves(W.getBlock(x, y+1, z))) { - BlockPos L = new BlockPos(x, y+1, z, W); - if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - } - } - if (isWoodLog(W.getBlock(x, y, z-1)) || isLeaves(W.getBlock(x, y, z-1))) { - BlockPos L = new BlockPos(x, y, z-1, W); - if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - } - } - if (isWoodLog(W.getBlock(x, y, z+1)) || isLeaves(W.getBlock(x, y, z+1))) { - BlockPos L = new BlockPos(x, y, z+1, W); - if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - } - } - } - else { - if (isWoodLog(W.getBlock(x-1, y, z))) { - BlockPos L = new BlockPos(x-1, y, z, W); - //if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - //} - } - if (isWoodLog(W.getBlock(x+1, y, z))) { - BlockPos L = new BlockPos(x+1, y, z, W); - //if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - //} - } - if (isWoodLog(W.getBlock(x, y-1, z))) { - BlockPos L = new BlockPos(x, y-1, z, W); - //if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - //} - } - if (isWoodLog(W.getBlock(x, y+1, z))) { - BlockPos L = new BlockPos(x, y+1, z, W); - //if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - //} - } - if (isWoodLog(W.getBlock(x, y, z-1))) { - BlockPos L = new BlockPos(x, y, z-1, W); - //if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - //} - } - if (isWoodLog(W.getBlock(x, y, z+1))) { - BlockPos L = new BlockPos(x, y, z+1, W); - //if (!checkedSpaces.contains(L)) { - mConnected.add(L); - Logger.INFO("Found Connected. [III]"); - //} - } - } - return mConnected; - } - - - public enum ToolType { - Unbreakable, - Breakable - } - - - /** - * Tree Cutting - */ - - public static class TreeCutter { - - private final World mWorld; - private Map mQueue = new ConcurrentHashMap(); - private AutoMap mDrops = new AutoMap(); - private boolean isValid = true; - - public TreeCutter(World world) { - this.mWorld = world; - } - - public boolean queue(BlockPos pos) { - if (isValid && pos != null) { - //Logger.INFO("Queued: "+pos.getLocationString()); - String hash = Utils.calculateChecksumMD5(pos); - if (hash != null && !mQueue.containsKey(hash)) { - mQueue.put(hash, pos); - return true; - } - } - return false; - } - - private boolean emptyQueue() { - if (isValid) { - Logger.INFO("Emptying Queue."); - if (this.mQueue.size() > 0) { - int totalRemoved = 0; - for (BlockPos h : mQueue.values()) { - final Block block = mWorld.getBlock(h.xPos, h.yPos, h.zPos); - if (block != null) { - final int dropMeta = mWorld.getBlockMetadata(h.xPos, h.yPos, h.zPos); - final ArrayList blockDrops = block.getDrops(mWorld, h.xPos, h.yPos, h.zPos, dropMeta, 0); - final ItemStack[] drops = ItemUtils.getBlockDrops(blockDrops); - mDrops.put(drops); - //Remove drop that was added to the bus. - mWorld.setBlockToAir(h.xPos, h.yPos, h.zPos); - //new BlockBreakParticles(mWorld, h.xPos, h.yPos, h.zPos, block); - totalRemoved++; - } - } - if (totalRemoved > 0 && mDrops.size() > 0) { - return true; - } - } - } - return false; - } - - public ItemStack[] getDrops() { - //If Queue is successfully cleared and drops are created, let us continue. - if (isValid && emptyQueue()) { - AutoMap mCollective = new AutoMap(); - //Iterate ALL of the arrays, add output to a collective. - for (ItemStack[] i : this.mDrops) { - //Array is not null. - if (i != null) { - //Iterate this array. - for (int d=0;d 0) { - mCollective.put(i[d]); - } - } - } - } - //Build an ItemStack array. - ItemStack[] drops = new ItemStack[mCollective.size()]; - for (int m=0;m 0) { - isValid = false; - return drops; - } - } - //Invalid or no drops, return empty array. - isValid = false; - return new ItemStack[] {}; - } - - } - - - /** - * Farm AI - */ - private static EntityPlayerMP farmerAI; - public EntityPlayerMP getFakePlayer(World world) { - return farmerAI = checkFakePlayer(world); - } - - public static EntityPlayerMP checkFakePlayer(World world) { - if (farmerAI == null) { - return new FakeFarmer(MinecraftServer.getServer().worldServerForDimension(world.provider.dimensionId)); - } - return farmerAI; - } - - public static boolean onBlockStartBreak (int x, int y, int z, World world){ - final Block wood = world.getBlock(x, y, z); - if (wood == null){ - return false; - } - if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge) - if(detectTree(world, x,y,z)) { - TreeChopTask chopper = new TreeChopTask(new ChunkPosition(x, y, z), checkFakePlayer(world), 128); - FMLCommonHandler.instance().bus().register(chopper); - // custom block breaking code, don't call vanilla code - return true; - } - //return onBlockStartBreak(stack, x, y, z, player); - return false; - } - - public static boolean detectTree(World world, int pX, int pY, int pZ) { - ChunkPosition pos = null; - Stack candidates = new Stack<>(); - candidates.add(new ChunkPosition(pX, pY, pZ)); - - while (!candidates.isEmpty()) { - ChunkPosition candidate = candidates.pop(); - int curX = candidate.chunkPosX, curY = candidate.chunkPosY, curZ = candidate.chunkPosZ; - - Block block = world.getBlock(curX, curY, curZ); - if ((pos == null || candidate.chunkPosY > pos.chunkPosY) && block.isWood(world, curX, curY, curZ)) { - pos = new ChunkPosition(curX, candidate.chunkPosY + 1, curZ); - // go up - while (world.getBlock(curX, pos.chunkPosY, curZ).isWood(world, curX, pos.chunkPosY, curZ)) { - pos = new ChunkPosition(curX, pos.chunkPosY + 1, curZ); - } - // check if we still have a way diagonally up - candidates.add(new ChunkPosition(curX + 1, pos.chunkPosY + 1, curZ )); - candidates.add(new ChunkPosition(curX , pos.chunkPosY + 1, curZ + 1)); - candidates.add(new ChunkPosition(curX - 1, pos.chunkPosY + 1, curZ )); - candidates.add(new ChunkPosition(curX , pos.chunkPosY + 1, curZ - 1)); - } - } - - // not even one match, so there were no logs. - if (pos == null) { - return false; - } - - // check if there were enough leaves around the last position - // pos now contains the block above the topmost log - // we want at least 5 leaves in the surrounding 26 blocks - int d = 3; - int leaves = 0; - for (int offX = 0; offX < d; offX++) { - for (int offY = 0; offY < d; offY++) { - for (int offZ = 0; offZ < d; offZ++) { - int xPos = pos.chunkPosX -1 + offX, yPos = pos.chunkPosY - 1 + offY, zPos = pos.chunkPosZ - 1 + offZ; - Block leaf = world.getBlock(xPos, yPos, zPos); - if (leaf != null && leaf.isLeaves(world, xPos, yPos, zPos)) { - if (++leaves >= 5) { - return true; - } - } - } - } - } - - // not enough leaves. sorreh - return false; - } - - public static class TreeChopTask { - - public final World world; - public final EntityPlayer player; - public final int blocksPerTick; - - public Queue blocks = Lists.newLinkedList(); - public Set visited = new THashSet<>(); - - public TreeChopTask(ChunkPosition start, EntityPlayer player, int blocksPerTick) { - this.world = player.getEntityWorld(); - this.player = player; - this.blocksPerTick = blocksPerTick; - - this.blocks.add(start); - } - - private void queueCoordinate(int x, int y, int z) { - ChunkPosition pos = new ChunkPosition(x, y, z); - if (!visited.contains(pos)) { - blocks.add(pos); - } - } - - @SubscribeEvent - public void onWorldTick(TickEvent.WorldTickEvent event) { - if (event.side.isClient()) { - finish(); - return; - } - // only if same dimension - if (event.world.provider.dimensionId != world.provider.dimensionId) { - return; - } - - // setup - int left = blocksPerTick; - //NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - - // continue running - ChunkPosition pos; - while (left > 0) { - // completely done or can't do our job anymore?! - if (blocks.isEmpty()/* || tags.getBoolean("Broken")*/) { - finish(); - return; - } - - pos = blocks.remove(); - if (!visited.add(pos)) { - continue; - } - int x = pos.chunkPosX, y = pos.chunkPosY, z = pos.chunkPosZ; - - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - - // can we harvest the block and is effective? - if (!block.isWood(world, x, y, z) || !isWoodLog(block)) { - continue; - } - - // save its neighbors - queueCoordinate(x + 1, y, z ); - queueCoordinate(x, y, z + 1); - queueCoordinate(x - 1, y, z ); - queueCoordinate(x, y, z - 1); - - // also add the layer above.. stupid acacia trees - for (int offX = 0; offX < 3; offX++) { - for (int offZ = 0; offZ < 3; offZ++) { - queueCoordinate(x - 1 + offX, y + 1, z - 1 + offZ); - } - } - - // break it, wooo! - breakExtraBlock(player.worldObj, x, y, z, 0, player, x, y, z); - left--; - } - } - - private void finish() { - // goodbye cruel world - FMLCommonHandler.instance().bus().unregister(this); - } - } - - - public static void breakExtraBlock(World world, int x, int y, int z, int sidehit, EntityPlayer playerEntity, int refX, int refY, int refZ) { - // prevent calling that stuff for air blocks, could lead to unexpected behaviour since it fires events - if (world.isAirBlock(x, y, z)) - return; - - // what? - if(!(playerEntity instanceof EntityPlayerMP)) - return; - EntityPlayerMP player = (EntityPlayerMP) playerEntity; - - // check if the block can be broken, since extra block breaks shouldn't instantly break stuff like obsidian - // or precious ores you can't harvest while mining stone - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - - // only effective materials - if (!isWoodLog(block)) - return; - - Block refBlock = world.getBlock(refX, refY, refZ); - float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ); - float strength = ForgeHooks.blockStrength(block, player, world, x,y,z); - - // only harvestable blocks that aren't impossibly slow to harvest - if (!ForgeHooks.canHarvestBlock(block, player, meta) || refStrength/strength > 10f) - return; - - // send the blockbreak event - BlockEvent.BreakEvent event = ForgeHooks.onBlockBreakEvent(world, player.theItemInWorldManager.getGameType(), player, x,y,z); - if(event.isCanceled()) - return; - - if (player.capabilities.isCreativeMode) { - block.onBlockHarvested(world, x, y, z, meta, player); - if (block.removedByPlayer(world, player, x, y, z, false)) - block.onBlockDestroyedByPlayer(world, x, y, z, meta); - - // send update to client - if (!world.isRemote) { - player.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world)); - } - return; - } - - // callback to the tool the player uses. Called on both sides. This damages the tool n stuff. - player.getCurrentEquippedItem().func_150999_a(world, block, x, y, z, player); - - // server sided handling - if (!world.isRemote) { - // serverside we reproduce ItemInWorldManager.tryHarvestBlock - - // ItemInWorldManager.removeBlock - block.onBlockHarvested(world, x,y,z, meta, player); - - if(block.removedByPlayer(world, player, x,y,z, true)) // boolean is if block can be harvested, checked above - { - block.onBlockDestroyedByPlayer( world, x,y,z, meta); - block.harvestBlock(world, player, x,y,z, meta); - block.dropXpOnBlockBreak(world, x,y,z, event.getExpToDrop()); - } - - // always send block update to client - player.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world)); - } - // client sided handling - else { - //PlayerControllerMP pcmp = Minecraft.getMinecraft().playerController; - // clientside we do a "this clock has been clicked on long enough to be broken" call. This should not send any new packets - // the code above, executed on the server, sends a block-updates that give us the correct state of the block we destroy. - - // following code can be found in PlayerControllerMP.onPlayerDestroyBlock - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); - if(block.removedByPlayer(world, player, x,y,z, true)) - { - block.onBlockDestroyedByPlayer(world, x,y,z, meta); - } - // callback to the tool - ItemStack itemstack = player.getCurrentEquippedItem(); - if (itemstack != null) - { - itemstack.func_150999_a(world, block, x, y, z, player); - - if (itemstack.stackSize == 0) - { - player.destroyCurrentEquippedItem(); - } - } - - // send an update to the server, so we get an update back - //if(PHConstruct.extraBlockUpdates) - //Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(2, x,y,z, Minecraft.getMinecraft().objectMouseOver.sideHit)); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java deleted file mode 100644 index 575e094696..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java +++ /dev/null @@ -1,188 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class VolumetricFlaskHelper { - - private static final Class sClassVolumetricFlask; - private static final Method sMethodGetFlaskMaxCapacity; - private static Item mFlask; - - static { - if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { - sClassVolumetricFlask = ReflectionUtils.getClass("gregtech.common.items.GT_VolumetricFlask"); - Method aMaxCapacity = null; - try { - aMaxCapacity = sClassVolumetricFlask.getDeclaredMethod("getMaxCapacity", new Class[] {}); - } - catch (NoSuchMethodException e) { - e.printStackTrace(); - CORE.crash("Secondary Error Obtaining instance of 'getMaxCapacity' from 'GT_VolumetricFlask'. Crashing."); - } - sMethodGetFlaskMaxCapacity = aMaxCapacity; - } - else { - sClassVolumetricFlask = null; - sMethodGetFlaskMaxCapacity = null; - } - } - - public static ItemStack getVolumetricFlask(int aAmount) { - ItemStack aFlask = ItemUtils.getValueOfItemList("VOLUMETRIC_FLASK", aAmount, (ItemStack) null); - return aFlask; - } - - public static ItemStack getLargeVolumetricFlask(int aAmount) { - ItemStack aFlask = GregtechItemList.VOLUMETRIC_FLASK_8k.get(aAmount); - return aFlask; - } - - public static ItemStack getGiganticVolumetricFlask(int aAmount) { - ItemStack aFlask = GregtechItemList.VOLUMETRIC_FLASK_32k.get(aAmount); - return aFlask; - } - - public static boolean isVolumetricFlask(ItemStack aStack) { - if (isNormalVolumetricFlask(aStack) || isLargeVolumetricFlask(aStack) || isGiganticVolumetricFlask(aStack)) { - return true; - } - return false; - } - - public static boolean isNormalVolumetricFlask(ItemStack aStack) { - if (mFlask == null) { - ItemStack aFlask = ItemUtils.getValueOfItemList("VOLUMETRIC_FLASK", 1, (ItemStack) null); - if (aFlask != null) { - mFlask = aFlask.getItem(); - } - } - if (aStack.getItem() == mFlask) { - return true; - } - return false; - } - - public static boolean isLargeVolumetricFlask(ItemStack aStack) { - if (GregtechItemList.VOLUMETRIC_FLASK_8k.getItem() == aStack.getItem()) { - return true; - } - return false; - } - - public static boolean isGiganticVolumetricFlask(ItemStack aStack) { - if (GregtechItemList.VOLUMETRIC_FLASK_32k.getItem() == aStack.getItem()) { - return true; - } - return false; - } - - public static int getMaxFlaskCapacity(ItemStack aStack) { - if (aStack != null && sMethodGetFlaskMaxCapacity != null) { - Item aItem = aStack.getItem(); - if (sClassVolumetricFlask.isInstance(aItem)) { - int aMaxCapacity = (int) ReflectionUtils.invokeNonBool(aItem, sMethodGetFlaskMaxCapacity, new Object[] {}); - return aMaxCapacity; - } - } - return 0; - } - - public static boolean isFlaskEmpty(ItemStack aStack) { - return getFlaskFluid(aStack) == null; - } - - public static FluidStack getFlaskFluid(ItemStack aStack) { - if (aStack.hasTagCompound()) { - NBTTagCompound nbt = aStack.getTagCompound(); - if (nbt.hasKey("Fluid", 10)) - return FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("Fluid")); - } - return null; - } - - public static void setFluid(ItemStack stack, FluidStack fluidStack) { - boolean removeFluid = (fluidStack == null) || (fluidStack.amount <= 0); - NBTTagCompound nbt = stack.getTagCompound(); - if (nbt == null) { - if (removeFluid) - return; - stack.setTagCompound(nbt = new NBTTagCompound()); - } - if (removeFluid) { - nbt.removeTag("Fluid"); - if (nbt.hasNoTags()) { - stack.setTagCompound(null); - } - } else { - nbt.setTag("Fluid", fluidStack.writeToNBT(new NBTTagCompound())); - } - } - - public static int getFlaskCapacity(ItemStack aStack) { - int capacity = 1000; - if (aStack.hasTagCompound()) { - NBTTagCompound nbt = aStack.getTagCompound(); - if (nbt.hasKey("Capacity", 3)) - capacity = nbt.getInteger("Capacity"); - } - return Math.min(getMaxFlaskCapacity(aStack), capacity); - } - - public static boolean setNewFlaskCapacity(ItemStack aStack, int aCapacity) { - if (aStack == null || aCapacity <= 0) { - return false; - } - aCapacity = Math.min(aCapacity, getMaxFlaskCapacity(aStack)); - NBTTagCompound nbt = aStack.getTagCompound(); - if (nbt == null) { - aStack.setTagCompound(nbt = new NBTTagCompound()); - } - nbt.setInteger("Capacity", aCapacity); - return true; - } - - public static int fillFlask(ItemStack stack, FluidStack resource, boolean doFill) { - if (stack.stackSize != 1) - return 0; - if ((resource == null) || (resource.amount <= 0)) { - return 0; - } - FluidStack fluidStack = getFlaskFluid(stack); - if (fluidStack == null) { - fluidStack = new FluidStack(resource, 0); - } else if (!fluidStack.isFluidEqual(resource)) { - return 0; - } - int amount = Math.min(getMaxFlaskCapacity(stack) - fluidStack.amount, resource.amount); - if ((doFill) && (amount > 0)) { - fluidStack.amount += amount; - setFluid(stack, fluidStack); - } - return amount; - } - - public static Item generateNewFlask(String unlocalized, String english, int maxCapacity) { - Constructor aFlask = ReflectionUtils.getConstructor(sClassVolumetricFlask, new Class[] {String.class, String.class, int.class}); - if (aFlask != null) { - Object aInstance = ReflectionUtils.createNewInstanceFromConstructor(aFlask, new Object[] {unlocalized, english, maxCapacity}); - if (aInstance != null && aInstance instanceof Item) { - Item aNewFlaskItem = (Item) aInstance; - return aNewFlaskItem; - } - } - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java deleted file mode 100644 index 29dabaf084..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java +++ /dev/null @@ -1,118 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gtPlusPlus.api.objects.Logger; - -public class AC_Helper_Container extends Container -{ - /** The crafting matrix inventory (3x3). */ - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public IInventory craftResult = new InventoryCraftResult(); - private World worldObj; - - public InventoryCrafting getMatrix(){ - return this.craftMatrix; - } - - public boolean putItemsIntoGrid(ItemStack[] inputs){ - if (inputs.length < 9){ - return false; - } - for (int i=0;i<9;i++){ - this.putStackInSlot(i, inputs[i]); - } - this.onCraftMatrixChanged(this.craftMatrix); - return true; - } - - public AC_Helper_Container(InventoryPlayer playerInventory, World world, int x, int y, int z) - { - this.worldObj = world; - this.addSlotToContainer(new SlotCrafting(playerInventory.player, this.craftMatrix, this.craftResult, 0, 124, 35)); - int l; - int i1; - - for (l = 0; l < 3; ++l) - { - for (i1 = 0; i1 < 3; ++i1) - { - this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 3, 30 + i1 * 18, 17 + l * 18)); - } - } - - for (l = 0; l < 3; ++l) - { - for (i1 = 0; i1 < 9; ++i1) - { - this.addSlotToContainer(new Slot(playerInventory, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18)); - } - } - - for (l = 0; l < 9; ++l) - { - this.addSlotToContainer(new Slot(playerInventory, l, 8 + l * 18, 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - } - - /** - * Callback for when the crafting matrix is changed. - */ - @Override - public void onCraftMatrixChanged(IInventory p_75130_1_) - { - this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - Logger.INFO("Crafted "+this.craftResult.getStackInSlot(0)); - - } - - /** - * Called when the container is closed. - */ - @Override - public void onContainerClosed(EntityPlayer p_75134_1_) - { - super.onContainerClosed(p_75134_1_); - - if (!this.worldObj.isRemote) - { - for (int i = 0; i < 9; ++i) - { - ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); - - if (itemstack != null) - { - p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); - } - } - } - } - - @Override - public boolean canInteractWith(EntityPlayer p_75145_1_) - { - return true; - } - - /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. - */ - @Override - public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_){ - ItemStack itemstack = null; - return itemstack; - } - - @Override - public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_) - { - return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java deleted file mode 100644 index 772ece96aa..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java +++ /dev/null @@ -1,80 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter; - -import java.util.*; -import java.util.Map.Entry; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; - -public class AC_Helper_Utils { - - //AC maps - public static final Map sAutocrafterMap = new HashMap(); - - //Add Crafter - public final static int addCrafter(GT4Entity_AutoCrafter AC) { - if (!sAutocrafterMap.containsValue(AC)){ - int increase = sAutocrafterMap.size()+1; - sAutocrafterMap.put(increase, AC); - Logger.INFO("[A-C] "+"Added Auto-Crafter to index on position "+increase+"."); - return increase; - } - else { - Logger.INFO("[A-C] Tried adding an Auto-Crafter to Index, but found one already there."); - } - return 0; - } - - //Remove Crafter - public final static boolean removeCrafter(int frequency) { - if (!sAutocrafterMap.isEmpty()){ - if (sAutocrafterMap.containsKey(frequency)){ - sAutocrafterMap.remove(frequency); - return true; - } - } - return false; - } - - public final static boolean removeCrafter(GT4Entity_AutoCrafter AC) { - if (!sAutocrafterMap.isEmpty()){ - if (sAutocrafterMap.containsValue(AC)){ - sAutocrafterMap.remove(getIDByCrafter(AC)); - return true; - } - } - return false; - } - - //Get Crafter - public final static GT4Entity_AutoCrafter getCrafterByID(int ID) { - if (!sAutocrafterMap.isEmpty()) { - Set> players = sAutocrafterMap.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - Entry current = i.next(); - if (current.getKey().equals(ID)) { - return current.getValue(); - } - } - } - Logger.WARNING("Failed. [getCrafterByID]"); - return null; - } - - public final static int getIDByCrafter(GT4Entity_AutoCrafter AC) { - if (!sAutocrafterMap.isEmpty()) { - Set> players = sAutocrafterMap.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - Entry current = i.next(); - if (current.getValue().equals(AC)) { - return current.getKey(); - } - } - } - Logger.WARNING("Failed. [getIDByCrafter]"); - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java deleted file mode 100644 index a3a116fea6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java +++ /dev/null @@ -1,263 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers.tesseract; - -import static gtPlusPlus.core.lib.CORE.*; - -import java.util.*; -import java.util.Map.Entry; - -import net.minecraft.entity.player.EntityPlayer; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; - -public class TesseractHelper { - - /** - * Tesseract Generator Helpers - * - * @param player - * @return - */ - - //Checks if a Generator is owned by a player. - public final static boolean isGeneratorOwnedByPlayer(EntityPlayer player, - GT_MetaTileEntity_TesseractGenerator generator) { - if (player == null){ - Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]"); - return false; - } - //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 1"); - UUID playerIdentifier = player.getUniqueID(); - if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { - //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 2"); - Map generators = getGeneratorOwnershipByPlayer(player); - Set> players = generators.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 3"); - Entry current = i.next(); - if (current.getValue().equals(generator)) { - //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 4"); - return true; - } - } - } - Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]"); - return false; - } - - //Saves A Generator to the Players UUID map along with the Freq. - public final static boolean setGeneratorOwnershipByPlayer(EntityPlayer player, int freq, - GT_MetaTileEntity_TesseractGenerator generator) { - if (player == null){ - return false; - } - UUID playerIdentifier = player.getUniqueID(); - Logger.WARNING("Setting Generator on "+freq+" for "+player.getDisplayName()+"."); - if (playerIdentifier != null) { - Map playerOwned = sTesseractGeneratorOwnershipMap - .get(playerIdentifier); - if (playerOwned == null || playerOwned.isEmpty()) { - Map newOwnershipMap = new HashMap(); - newOwnershipMap.put(freq, generator); - sTesseractGeneratorOwnershipMap.put(playerIdentifier, newOwnershipMap); - Logger.WARNING("Success! [Empty Map]"); - return true; - } else if (sTesseractGeneratorOwnershipMap.containsKey(playerIdentifier)) { - Map ownershipMap = sTesseractGeneratorOwnershipMap - .get(playerIdentifier); - if (!ownershipMap.containsKey(freq)){ - ownershipMap.put(freq, generator); - } - ownershipMap.put(freq, generator); - sTesseractGeneratorOwnershipMap.put(playerIdentifier, ownershipMap); - Logger.WARNING("Success!"); - return true; - } - } - Logger.WARNING("Failed. [setGeneratorOwnershipByPlayer]"); - return false; - } - - //Gets Generator based on Frequency. - public final static GT_MetaTileEntity_TesseractGenerator getGeneratorByFrequency(EntityPlayer player, - int freq) { - if (player == null){ - return null; - } - UUID playerIdentifier = player.getUniqueID(); - Logger.WARNING("Getting Generator on "+freq+" for "+player.getDisplayName()+"."); - if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { - //Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 1"); - Map generators = getGeneratorOwnershipByPlayer(player); - Set> players = generators.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - //Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 2"); - Entry current = i.next(); - if (current.getKey().equals(freq)) { - //Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 3"); - Logger.WARNING("Success!"); - return current.getValue(); - } - } - } - Logger.WARNING("Failed. [getGeneratorByFrequency]"); - return null; - } - - //Remove Tesseract Generator - public final static boolean removeGenerator(EntityPlayer player, int frequency) { - if (player == null){ - return false; - } - UUID playerIdentifier = player.getUniqueID(); - if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { - sTesseractGeneratorOwnershipMap.get(playerIdentifier).remove(frequency); - return true; - } - return false; - } - - /** - * - * Tesseract Terminal Helpers - * - * @param player - * @return - */ - - //Checks if a Terminal is owned by a player. - public final static boolean isTerminalOwnedByPlayer(EntityPlayer player, - GT_MetaTileEntity_TesseractTerminal generator) { - if (player == null){ - return false; - } - UUID playerIdentifier = player.getUniqueID(); - if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { - Map generators = getTerminalOwnershipByPlayer(player); - Set> players = generators.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - Entry current = i.next(); - if (current.getValue().equals(generator)) { - return true; - } - } - } - return false; - } - - //Saves A Terminal to the Players UUID map along with the Freq. - public final static boolean setTerminalOwnershipByPlayer(EntityPlayer player, int freq, - GT_MetaTileEntity_TesseractTerminal generator) { - if (player == null){ - return false; - } - UUID playerIdentifier = player.getUniqueID(); - if (playerIdentifier != null) { - Logger.WARNING("Setting Terminal on "+freq+" for "+player.getDisplayName()+"."); - Map playerOwned = sTesseractTerminalOwnershipMap - .get(playerIdentifier); - if (playerOwned == null || playerOwned.isEmpty()) { - Map newOwnershipMap = new HashMap(); - newOwnershipMap.put(freq, generator); - sTesseractTerminalOwnershipMap.put(playerIdentifier, newOwnershipMap); - Logger.WARNING("Success! [Empty Map]"); - return true; - } else if (sTesseractTerminalOwnershipMap.containsKey(playerIdentifier)) { - Map ownershipMap = sTesseractTerminalOwnershipMap - .get(playerIdentifier); - if (!ownershipMap.containsKey(freq)){ - ownershipMap.put(freq, generator); - } - sTesseractTerminalOwnershipMap.put(playerIdentifier, ownershipMap); - Logger.WARNING("Success!"); - return true; - } - } - Logger.WARNING("Failed. [setTerminalOwnershipByPlayer]"); - return false; - } - - //Gets Terminal based on Frequency. - public final static GT_MetaTileEntity_TesseractTerminal getTerminalByFrequency(EntityPlayer player, - int freq) { - if (player == null){ - return null; - } - UUID playerIdentifier = player.getUniqueID(); - Logger.WARNING("Getting Terminal on "+freq+" for "+player.getDisplayName()+"."); - if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { - Map generators = getTerminalOwnershipByPlayer(player); - Set> players = generators.entrySet(); - Iterator> i = players.iterator(); - while (i.hasNext()) { - Entry current = i.next(); - if (current.getKey().equals(freq)) { - Logger.WARNING("Success!"); - return current.getValue(); - } - } - } - Logger.WARNING("Failed. [getTerminalByFrequency]"); - return null; - } - - //Remove Tesseract Terminal - public final static boolean removeTerminal(EntityPlayer player, int frequency) { - if (player == null){ - return false; - } - UUID playerIdentifier = player.getUniqueID(); - if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { - sTesseractTerminalOwnershipMap.get(playerIdentifier).remove(frequency); - return true; - } - return false; - } - - /** - * - * Internal Methods - * - */ - - private final static Map getGeneratorOwnershipByPlayer( - EntityPlayer player) { - UUID playerIdentifier = player.getUniqueID(); - if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { - Set>> players = sTesseractGeneratorOwnershipMap - .entrySet(); - Iterator>> i = players.iterator(); - while (i.hasNext()) { - Entry> current = i.next(); - if (current.getKey().compareTo(playerIdentifier) == 0) { - return current.getValue(); - } - - } - } - return null; - } - - private final static Map getTerminalOwnershipByPlayer( - EntityPlayer player) { - UUID playerIdentifier = player.getUniqueID(); - if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { - Set>> players = sTesseractTerminalOwnershipMap - .entrySet(); - Iterator>> i = players.iterator(); - while (i.hasNext()) { - Entry> current = i.next(); - if (current.getKey().compareTo(playerIdentifier) == 0) { - return current.getValue(); - } - - } - } - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java deleted file mode 100644 index bb40c9b379..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java +++ /dev/null @@ -1,386 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.helpers.treefarm; - -import java.util.Random; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.FakeBlockPos; -import gtPlusPlus.api.objects.minecraft.FakeWorld; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.block.Block; -import net.minecraft.block.BlockSapling; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.world.World; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraftforge.common.util.ForgeDirection; - -public class TreeGenerator { - - private static final FakeTreeInFakeWorldGenerator mTreeData; - - static { - Logger.WARNING("Created Fake Tree Generator."); - mTreeData = new FakeTreeInFakeWorldGenerator(); - } - - - public TreeGenerator() { - if (!mTreeData.hasGenerated) { - mTreeData.generate(null, CORE.RANDOM, 0, 0, 0); - } - } - - public AutoMap generateOutput(int aTreeSize){ - AutoMap aOutputMap = mTreeData.getOutputFromTree(); - if (aOutputMap != null && aOutputMap.size() > 0) { - Logger.WARNING("Valid tree data output"); - return aOutputMap; - } - Logger.WARNING("Invalid tree data output"); - return new AutoMap(); - } - - public static class FakeTreeInFakeWorldGenerator extends WorldGenAbstractTree - { - /** The minimum height of a generated tree. */ - private final int minTreeHeight; - /** True if this tree should grow Vines. */ - private final boolean vinesGrow; - /** The metadata value of the wood to use in tree generation. */ - private final int metaWood; - /** The metadata value of the leaves to use in tree generation. */ - private final int metaLeaves; - - private final AutoMap mFakeWorld; - private final int mTreesToGenerate; - - private int mCurrentGeneratorIteration = 0; - - private boolean hasGenerated = false; - private AutoMap aOutputsFromGenerator = new AutoMap(); - - public FakeTreeInFakeWorldGenerator() - { - this(4, 0, 0, false, 5000); - } - - public FakeTreeInFakeWorldGenerator(int aMinHeight, int aWoodMeta, int aLeafMeta, boolean aVines, int aTreeCount) - { - super(false); - this.minTreeHeight = aMinHeight; - this.metaWood = aWoodMeta; - this.metaLeaves = aLeafMeta; - this.vinesGrow = aVines; - this.mFakeWorld = new AutoMap(); - this.mTreesToGenerate = aTreeCount; - Logger.WARNING("Created Fake Tree In Fake World Instance."); - } - - - public AutoMap getOutputFromTree(){ - if (!hasGenerated) { - Logger.WARNING("Generating Tree sample data"); - generate(null, CORE.RANDOM, 0, 0, 0); - } - AutoMap aOutputMap = new AutoMap(); - int aRandomTreeID = MathUtils.randInt(0, this.mFakeWorld.size()-1); - FakeWorld aWorld = this.mFakeWorld.get(aRandomTreeID); - if (aWorld != null) { - //Logger.WARNING("Getting all block data from fake world"); - aOutputMap = aWorld.getAllBlocksStoredInFakeWorld(); - } - return aOutputMap; - - } - - @Override - protected boolean func_150523_a(Block p_150523_1_) - { - return p_150523_1_.getMaterial() == Material.air || p_150523_1_.getMaterial() == Material.leaves || p_150523_1_ == Blocks.grass || p_150523_1_ == Blocks.dirt || p_150523_1_ == Blocks.log || p_150523_1_ == Blocks.log2 || p_150523_1_ == Blocks.sapling || p_150523_1_ == Blocks.vine; - } - - @Override - protected boolean isReplaceable(World world, int x, int y, int z) - { - FakeWorld aWorld = getWorld(); - Block block = aWorld.getBlock(x, y, z); - return block.isAir(null, x, y, z) || block.isLeaves(null, x, y, z) || block.isWood(null, x, y, z) || func_150523_a(block); - } - - @Override - public boolean generate(World world, Random aRand, int aWorldX, int aWorldRealY, int aWorldZ){ - //Only Generate Once - This object is Cached - if (hasGenerated) { - return hasGenerated; - } - else { - for (int yy=0;yy 0) { - for (FakeWorld aWorld : this.mFakeWorld) { - for (ItemStack aBlockInFakeWorld : aWorld.getAllBlocksStoredInFakeWorld()) { - aOutputsFromGenerator.add(aBlockInFakeWorld); - } - } - return true; - } - else { - return false; - } - } - } - - private FakeWorld aFakeWorld; - - public FakeWorld getWorld() { - FakeWorld aWorld = this.mFakeWorld.get(mCurrentGeneratorIteration); - if (aWorld == null) { - this.mFakeWorld.set(mCurrentGeneratorIteration, new FakeWorld(200)); - aWorld = this.mFakeWorld.get(mCurrentGeneratorIteration); - } - return aWorld; - } - - public boolean generateTree(int aWorldX, int aWorldRealY, int aWorldZ) { - FakeWorld aWorld = getWorld(); - - //Set some static values - - Logger.WARNING("Stepping through generateTree [0]"); - //Dummy Value - int aWorldY = 10; - - int l = CORE.RANDOM.nextInt(3) + this.minTreeHeight; - boolean flag = true; - - if (aWorldY >= 1 && aWorldY + l + 1 <= 256) - { - Logger.WARNING("Stepping through generateTree [1]"); - byte b0; - int k1; - Block block; - - for (int i1 = aWorldY; i1 <= aWorldY + 1 + l; ++i1) - { - b0 = 1; - - if (i1 == aWorldY) - { - b0 = 0; - } - - if (i1 >= aWorldY + 1 + l - 2) - { - b0 = 2; - } - - for (int j1 = aWorldX - b0; j1 <= aWorldX + b0 && flag; ++j1) - { - for (k1 = aWorldZ - b0; k1 <= aWorldZ + b0 && flag; ++k1) - { - if (i1 >= 0 && i1 < 256) - { - block = aWorld.getBlock(j1, i1, k1); - - if (!this.isReplaceable(null, j1, i1, k1)) - { - flag = false; - } - } - else - { - flag = false; - } - } - } - } - - if (!flag) - { - Logger.WARNING("Stepping through generateTree [2]"); - return false; - } - else - { - Logger.WARNING("Stepping through generateTree [3]"); - Block block2 = aWorld.getBlock(aWorldX, aWorldY - 1, aWorldZ); - FakeBlockPos aBlockToGrowPlantOn = aWorld.getBlockAtCoords(aWorldX, aWorldY-1, aWorldZ); - - boolean isSoil = block2.canSustainPlant(aWorld, aWorldX, aWorldY - 1, aWorldZ, ForgeDirection.UP, (BlockSapling)Blocks.sapling); - if (/*isSoil &&*/ aWorldY < 256 - l - 1) - { - Logger.WARNING("Stepping through generateTree [4]"); - aBlockToGrowPlantOn.onPlantGrow(aWorld, aWorldX, aWorldY - 1, aWorldZ, aWorldX, aWorldY, aWorldZ); - b0 = 3; - byte b1 = 0; - int l1; - int i2; - int j2; - int i3; - - for (k1 = aWorldY - b0 + l; k1 <= aWorldY + l; ++k1) - { - i3 = k1 - (aWorldY + l); - l1 = b1 + 1 - i3 / 2; - - for (i2 = aWorldX - l1; i2 <= aWorldX + l1; ++i2) - { - j2 = i2 - aWorldX; - - for (int k2 = aWorldZ - l1; k2 <= aWorldZ + l1; ++k2) - { - int l2 = k2 - aWorldZ; - - if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || CORE.RANDOM.nextInt(2) != 0 && i3 != 0) - { - Block block1 = aWorld.getBlock(i2, k1, k2); - - if (block1.isAir(null, i2, k1, k2) || block1.isLeaves(null, i2, k1, k2)) - { - this.setBlockAndNotifyAdequately(aWorld, i2, k1, k2, Blocks.leaves, this.metaLeaves); - } - } - } - } - } - Logger.WARNING("Stepping through generateTree [5]"); - - for (k1 = 0; k1 < l; ++k1) - { - block = aWorld.getBlock(aWorldX, aWorldY + k1, aWorldZ); - - if (block.isAir(null, aWorldX, aWorldY + k1, aWorldZ) || block.isLeaves(null, aWorldX, aWorldY + k1, aWorldZ)) - { - this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ, Blocks.log, this.metaWood); - - if (this.vinesGrow && k1 > 0) - { - if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX - 1, aWorldY + k1, aWorldZ)) - { - this.setBlockAndNotifyAdequately(aWorld, aWorldX - 1, aWorldY + k1, aWorldZ, Blocks.vine, 8); - } - - if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX + 1, aWorldY + k1, aWorldZ)) - { - this.setBlockAndNotifyAdequately(aWorld, aWorldX + 1, aWorldY + k1, aWorldZ, Blocks.vine, 2); - } - - if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ - 1)) - { - this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ - 1, Blocks.vine, 1); - } - - if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ + 1)) - { - this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ + 1, Blocks.vine, 4); - } - } - } - } - Logger.WARNING("Stepping through generateTree [6]"); - - if (this.vinesGrow) - { - Logger.WARNING("Stepping through generateTree [7]"); - for (k1 = aWorldY - 3 + l; k1 <= aWorldY + l; ++k1) - { - i3 = k1 - (aWorldY + l); - l1 = 2 - i3 / 2; - - for (i2 = aWorldX - l1; i2 <= aWorldX + l1; ++i2) - { - for (j2 = aWorldZ - l1; j2 <= aWorldZ + l1; ++j2) - { - if (aWorld.getBlock(i2, k1, j2).isLeaves(null, i2, k1, j2)) - { - if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2 - 1, k1, j2).isAir(null, i2 - 1, k1, j2)) - { - this.growVines(aWorld, i2 - 1, k1, j2, 8); - } - - if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2 + 1, k1, j2).isAir(null, i2 + 1, k1, j2)) - { - this.growVines(aWorld, i2 + 1, k1, j2, 2); - } - - if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2, k1, j2 - 1).isAir(null, i2, k1, j2 - 1)) - { - this.growVines(aWorld, i2, k1, j2 - 1, 1); - } - - if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2, k1, j2 + 1).isAir(null, i2, k1, j2 + 1)) - { - this.growVines(aWorld, i2, k1, j2 + 1, 4); - } - } - } - } - } - Logger.WARNING("Stepping through generateTree [8]"); - - if (CORE.RANDOM.nextInt(5) == 0 && l > 5) - { - for (k1 = 0; k1 < 2; ++k1) - { - for (i3 = 0; i3 < 4; ++i3) - { - if (CORE.RANDOM.nextInt(4 - k1) == 0) - { - l1 = CORE.RANDOM.nextInt(3); - this.setBlockAndNotifyAdequately(aWorld, aWorldX + Direction.offsetX[Direction.rotateOpposite[i3]], aWorldY + l - 5 + k1, aWorldZ + Direction.offsetZ[Direction.rotateOpposite[i3]], Blocks.cocoa, l1 << 2 | i3); - } - } - } - } - } - Logger.WARNING("Stepping through generateTree [9]"); - return true; - } - else - { - Logger.WARNING("Stepping through generateTree [10]"); - return false; - } - } - } - else - { - Logger.WARNING("Stepping through generateTree [11]"); - return false; - } - } - - /** - * Grows vines downward from the given block for a given length. Args: World, x, starty, z, vine-length - */ - private void growVines(FakeWorld aWorld, int aX, int aY, int aZ, int aMeta) - { - int aLoopSize = vinesGrow ? MathUtils.randInt(0, 4) : 0; - for (int i=0;i= 0 && aMeta <= Short.MAX_VALUE)) { - Logger.WARNING("Setting block "+aX+", "+aY+", "+aZ+" | "+aBlock.getLocalizedName()+" | "+aMeta); - aWorld.setBlockAtCoords(aX, aY, aZ, aBlock, aMeta); - //aOutputsFromGenerator.put(ItemUtils.simpleMetaStack(aBlock, aMeta, 1)); - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java deleted file mode 100644 index 7c3f764794..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java +++ /dev/null @@ -1,225 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items; - -import java.util.List; - -import org.apache.commons.lang3.StringUtils; - -import cofh.core.render.IconRegistry; -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_MultiTexture; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.client.renderer.CustomItemBlockRenderer; -import gtPlusPlus.core.common.CommonProxy; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class MetaCustomCoverItem extends Item { - - protected final IIcon[] icons; - private final String mModID; - private final String mTextureSetName; - protected final IIconContainer[] mTextures; - private final short[][] mRGB; - - public MetaCustomCoverItem(String aModId, int aTextureCount, String aTextureSetName, IIconContainer[] aTextures, short[][] aRGB) { - super(); - icons = new IIcon[aTextureCount]; - mModID = aModId; - mTextureSetName = Utils.sanitizeString(aTextureSetName); - mTextures = aTextures; - mRGB = aRGB; - this.setTextureName(CORE.MODID + ":" + "itemPlate"); - this.setHasSubtypes(true); - String unlocalizedName = "itemCustomMetaCover." + mModID + "." + mTextureSetName; - this.setUnlocalizedName(unlocalizedName); - this.setCreativeTab(AddToCreativeTab.tabMisc); - this.setMaxStackSize(1); - GameRegistry.registerItem(this, unlocalizedName); - registerCover(); - Logger.INFO("[Covers] Generated Custom covers for "+mModID+" using "+aTextureCount+" textures from "+mTextureSetName+"."); - } - - public boolean hide() { - return true; - } - - private final void registerCover() { - //CommonProxy.registerItemRendererGlobal(this, new CustomItemBlockRenderer()); - for (int i=0;i 0 && hide()) { - ItemUtils.hideItemFromNEI(thisStack); - } - GregTech_API.registerCover( - thisStack, - new GT_MultiTexture( - new ITexture[]{ - new GT_RenderedTexture(mTextures[i]) - }), - new GTPP_Cover_ToggleVisual()); - } - } - - /* - * @Override public void registerIcons(IIconRegister reg) { for (int i = 0; i < - * icons.length; i++) { this.icons[i] = mTextures[i].getIcon(); } } - * - * @Override public IIcon getIconFromDamage(int meta) { return this.icons[meta]; - * } - */ - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < icons.length; i++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return this.getUnlocalizedName() + "_" + stack.getItemDamage(); - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - return StringUtils.capitalize(mTextureSetName) + " (" + tItem.getItemDamage() + ")"; //super.getItemStackDisplayName(tItem); - } - - private static boolean createNBT(ItemStack rStack) { - final NBTTagCompound tagMain = new NBTTagCompound(); - final NBTTagCompound tagNBT = new NBTTagCompound(); - tagNBT.setLong("Damage", 0); - tagNBT.setBoolean("AllowConnections", false); - tagMain.setTag("CustomCoverMeta", tagNBT); - rStack.setTagCompound(tagMain); - return true; - } - - public static final long getCoverDamage(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("CustomCoverMeta"); - if (aNBT != null) { - return aNBT.getLong("Damage"); - } - } else { - createNBT(aStack); - } - return 0L; - } - - public static final boolean setCoverDamage(final ItemStack aStack, final long aDamage) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("CustomCoverMeta"); - if (aNBT != null) { - aNBT.setLong("Damage", aDamage); - return true; - } - } - return false; - } - - public static final boolean getCoverConnections(final ItemStack aStack) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("CustomCoverMeta"); - if (aNBT != null) { - return aNBT.getBoolean("AllowConnections"); - } - } else { - createNBT(aStack); - } - return false; - } - - public static final boolean setCoverConnections(final ItemStack aStack, final boolean aConnections) { - NBTTagCompound aNBT = aStack.getTagCompound(); - if (aNBT != null) { - aNBT = aNBT.getCompoundTag("CustomCoverMeta"); - if (aNBT != null) { - aNBT.setBoolean("AllowConnections", aConnections); - return true; - } - } - return false; - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - if (stack.getTagCompound() == null) { - createNBT(stack); - } - double currentDamage = getCoverDamage(stack); - double meta = stack.getItemDamage() == 0 ? 50 : 2500; - double durabilitypercent = currentDamage / meta; - return durabilitypercent; - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - if (KeyboardUtils.isShiftKeyDown()) { - boolean con = getCoverConnections(stack); - if (con) { - setCoverConnections(stack, false); - } else { - setCoverConnections(stack, true); - } - } - return stack; - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { - boolean cons = getCoverConnections(stack); - list.add(EnumChatFormatting.GRAY + "Allows Connections: "+cons); - list.add(EnumChatFormatting.GRAY + "Shift Rmb to change state before applying"); - super.addInformation(stack, player, list, bool); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } - - @Override - public Item setFull3D() { - // TODO Auto-generated method stub - return super.setFull3D(); - } - - @Override - public boolean isFull3D() { - // TODO Auto-generated method stub - return super.isFull3D(); - } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - if (this.mRGB == null){ - return super.getColorFromItemStack(stack, HEX_OxFFFFFF); - } - int aMeta = stack.getItemDamage(); - return Utils.rgbtoHexValue(mRGB[aMeta][0], mRGB[aMeta][1], mRGB[aMeta][2]); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java deleted file mode 100644 index ce8b6eaf62..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ /dev/null @@ -1,453 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items; - -import static gtPlusPlus.core.util.Utils.getTcAspectStack; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.enums.TC_Aspects; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GT_MultiTexture; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; -import gregtech.api.util.GT_FoodStat; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GTPP_Recipe; -import gregtech.common.covers.GT_Cover_Arm; -import gregtech.common.covers.GT_Cover_Conveyor; -import gregtech.common.covers.GT_Cover_Pump; -import gregtech.common.items.behaviors.Behaviour_DataOrb; -import gregtech.common.items.behaviors.Behaviour_DataStick; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.handler.OldCircuitHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.StringUtils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow; -import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow_Item; -import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; - -public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { - - public final static MetaGeneratedGregtechItems INSTANCE; - - static { - INSTANCE = new MetaGeneratedGregtechItems(); - } - - public MetaGeneratedGregtechItems() { - super("MU-metaitem.01", new OrePrefixes[]{null}); - } - - public void generateMetaItems() { - int tLastID = 0; - - registerCustomCircuits(); - OldCircuitHandler.addCircuitItems(); - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - Logger.INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)"); - GregtechItemList.Electric_Pump_LuV.set(this.addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Electric_Pump_ZPM.set(this.addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L), getTcAspectStack(TC_Aspects.AQUA, 2L)})); - GregtechItemList.Electric_Pump_UV.set(this.addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L), getTcAspectStack(TC_Aspects.AQUA, 4L)})); - GregtechItemList.Electric_Pump_MAX.set(this.addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)})); - GregTech_API.registerCover(GregtechItemList.Electric_Pump_LuV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8196)); - GregTech_API.registerCover(GregtechItemList.Electric_Pump_ZPM.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768)); - GregTech_API.registerCover(GregtechItemList.Electric_Pump_UV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072)); - GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288)); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Bronze)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Steel)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Titanium)}); - tLastID = 4; - GregtechItemList.Electric_Motor_LuV.set(this.addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); - GregtechItemList.Electric_Motor_ZPM.set(this.addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 2L)})); - GregtechItemList.Electric_Motor_UV.set(this.addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 4L)})); - GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.IronMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.AnyIron), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.AnyCopper), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Silver)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Cupronickel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.NeodymiumMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.TungstenSteel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Nichrome)}); - - tLastID = 8; - GregtechItemList.Conveyor_Module_LuV.set(this.addItem(tLastID = 8, "Conveyor Module (LuV)", "1 Stack every 20 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)})); - GregtechItemList.Conveyor_Module_ZPM.set(this.addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L)})); - GregtechItemList.Conveyor_Module_UV.set(this.addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L)})); - GregtechItemList.Conveyor_Module_MAX.set(this.addItem(tLastID = 11, "Conveyor Module (MAX)", "1 Stack every 1/5 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); - GregTech_API.registerCover(GregtechItemList.Conveyor_Module_LuV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400)); - GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ZPM.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100)); - GregTech_API.registerCover(GregtechItemList.Conveyor_Module_UV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20)); - GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4)); - tLastID = 12; - GregtechItemList.Electric_Piston_LuV.set(this.addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); - GregtechItemList.Electric_Piston_ZPM.set(this.addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L)})); - GregtechItemList.Electric_Piston_UV.set(this.addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L)})); - GregtechItemList.Electric_Piston_MAX.set(this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)}); - tLastID = 16; - GregtechItemList.Robot_Arm_LuV.set(this.addItem(tLastID = 16, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)})); - GregtechItemList.Robot_Arm_ZPM.set(this.addItem(tLastID = 17, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L), getTcAspectStack("COGNITIO", 2L)})); - GregtechItemList.Robot_Arm_UV.set(this.addItem(tLastID = 18, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L), getTcAspectStack("COGNITIO", 4L)})); - GregtechItemList.Robot_Arm_MAX.set(this.addItem(tLastID = 19, "Robot Arm (MAX)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('P'), GregtechItemList.Electric_Piston_LuV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('P'), GregtechItemList.Electric_Piston_ZPM, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('P'), GregtechItemList.Electric_Piston_UV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('P'), GregtechItemList.Electric_Piston_MAX, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)}); - GregTech_API.registerCover(GregtechItemList.Robot_Arm_LuV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400)); - GregTech_API.registerCover(GregtechItemList.Robot_Arm_ZPM.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100)); - GregTech_API.registerCover(GregtechItemList.Robot_Arm_UV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20)); - GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4)); - tLastID = 20; - GregtechItemList.Field_Generator_LuV.set(this.addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)})); - GregtechItemList.Field_Generator_ZPM.set(this.addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.TUTAMEN, 2L)})); - GregtechItemList.Field_Generator_UV.set(this.addItem(tLastID = 22, "Field Generator (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.TUTAMEN, 4L)})); - GregtechItemList.Field_Generator_MAX.set(this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium)}); - tLastID = 24; - GregtechItemList.Emitter_LuV.set(this.addItem(tLastID = 24, "Emitter (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)})); - GregtechItemList.Emitter_ZPM.set(this.addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.LUX, 2L)})); - GregtechItemList.Emitter_UV.set(this.addItem(tLastID = 26, "Emitter (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.LUX, 4L)})); - GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium)}); - tLastID = 28; - GregtechItemList.Sensor_LuV.set(this.addItem(tLastID = 28, "Sensor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)})); - GregtechItemList.Sensor_ZPM.set(this.addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.SENSUS, 2L)})); - GregtechItemList.Sensor_UV.set(this.addItem(tLastID = 30, "Sensor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.SENSUS, 4L)})); - GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)})); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced)}); - //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite)}); - - //Handler for ULV Components - registerComponents_ULV(); - - - } - - else { - //Simplify life. - registerComponents_ULV(); - registerComponents_MAX(); - } - - //Extruder Shape - GregtechItemList.Shape_Extruder_WindmillShaft.set(this.addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts")); - - //GTNH Already adds this. - if (!CORE.GTNH) { - GregtechItemList.Shape_Extruder_SmallGear.set(this.addItem(221, "Extruder Shape (Small Gear)", "Extruder Shape for making small gears")); - } - - //Batteries - GregtechItemList.Battery_RE_EV_Sodium.set(this.addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L), getTcAspectStack(TC_Aspects.POTENTIA, 2L)})); - this.setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true); - - GregtechItemList.Battery_RE_EV_Cadmium.set(this.addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); - this.setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true); - - GregtechItemList.Battery_RE_EV_Lithium.set(this.addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 3L), getTcAspectStack(TC_Aspects.METALLUM, 3L), getTcAspectStack(TC_Aspects.POTENTIA, 3L)})); - this.setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true); - - /** - * Power Gems - */ - - GregtechItemList.Battery_Gem_1.set(this.addItem(tLastID = 66, "Proton Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 24L), getTcAspectStack(TC_Aspects.POTENTIA, 16L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 20 * 300 / 4, GT_Values.V[6], 6L, -3L, false); - GregtechItemList.Battery_Gem_2.set(this.addItem(tLastID = 68, "Electron Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.METALLUM, 32L), getTcAspectStack(TC_Aspects.POTENTIA, 32L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[7] * 20 * 300 / 4, GT_Values.V[7], 7L, -3L, false); - GregtechItemList.Battery_Gem_3.set(this.addItem(tLastID = 70, "Quark Entanglement", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 32L), getTcAspectStack(TC_Aspects.METALLUM, 48L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 20 * 300 / 4, GT_Values.V[8], 8L, -3L, false); - //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_1.get(1), "batteryFutureBasic"); - //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_2.get(1), "batteryFutureGood"); - //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_3.get(1), "batteryFutureAdvanced"); - - - /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); - setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true); - - GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Mercury Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); - setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);*/ - - //RTG Pellet - GregtechItemList.Pellet_RTG_PU238.set(this.addItem(41, StringUtils.superscript("238")+"Pu Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); - GregtechItemList.Pellet_RTG_SR90.set(this.addItem(42, StringUtils.superscript("90")+"Sr Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); - GregtechItemList.Pellet_RTG_PO210.set(this.addItem(43, StringUtils.superscript("210")+"Po Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); - GregtechItemList.Pellet_RTG_AM241.set(this.addItem(44, StringUtils.superscript("241")+"Am Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); - - CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_PU238.get(1), MathUtils.roundToClosestInt(87.7f), 64); - CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_SR90.get(1), MathUtils.roundToClosestInt(28.8f), 32); - CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_PO210.get(1), 1, 512); - CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_AM241.get(1), MathUtils.roundToClosestInt(432/2), 16); - CORE.RA.addFuelForRTG(GT_ModHandler.getIC2Item("RTGPellets", 1), MathUtils.roundToClosestInt(2.6f), 8); - - //Computer Cube - GregtechItemList.Gregtech_Computer_Cube.set(this.addItem(tLastID = 55, "Gregtech Computer Cube", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[6]* 10 * 60 * 20, GT_Values.V[5], 5L, -3L, true); - - //FOOOOOOOOOOOOOOD - GregtechItemList.Food_Baked_Raisin_Bread.set(this.addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[]{new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]), getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L), getTcAspectStack(TC_Aspects.IGNIS, 1L)})); - - if (!CORE.GTNH) { - GregtechItemList.Fluid_Cell_144L.set(this.addItem(tLastID = 61, "144L Invar Fluid Cell", "Holds exactly one dust worth of liquid.", new Object[]{new ItemData(Materials.Invar, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - this.setFluidContainerStats(32000 + tLastID, 144L, 64L); - - GregtechItemList.Fluid_Cell_36L.set(this.addItem(tLastID = 62, "36L Brass Fluid Cell", "Holds exactly one small dust worth of liquid.", new Object[]{new ItemData(Materials.Brass, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - this.setFluidContainerStats(32000 + tLastID, 36L, 64L); - - GregtechItemList.Fluid_Cell_16L.set(this.addItem(tLastID = 63, "16L Bronze Fluid Cell", "Holds exactly one tiny dust / nugget worth of liquid.", new Object[]{new ItemData(Materials.Bronze, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - this.setFluidContainerStats(32000 + tLastID, 16L, 64L); - - GregtechItemList.Fluid_Cell_1L.set(this.addItem(tLastID = 64, "1L Wrought Iron Fluid Cell", "Holds exactly one litre worth of liquid.", new Object[]{new ItemData(Materials.WroughtIron, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - this.setFluidContainerStats(32000 + tLastID, 1L, 64L); - } - - - - GregtechItemList.Cover_Overflow_ULV.set(this.addItem(71, "Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_LV.set(this.addItem(72, "Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_MV.set(this.addItem(73, "Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_HV.set(this.addItem(74, "Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_EV.set(this.addItem(75, "Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_IV.set(this.addItem(76, "Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(8)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(64)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(512)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(4096)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(32768)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(262144)); - - //Fusion Reactor MK4 Singularity - GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)")); - - - //NanoTubes - GregtechItemList.NanoTube_Base_Substrate.set(this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes")); - GregtechItemList.NanoTube_Finished.set(this.addItem(102, "Carbon Nanotubes", "Multi-walled Zigzag nanotubes, possibly Carbon's final form")); - GregtechItemList.Carbyne_Tube_Finished.set(this.addItem(103, "Linear Acetylenic Carbon (LAC/Carbyne)", "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable")); - GregtechItemList.Carbyne_Sheet_Finished.set(this.addItem(104, "Carbyne Composite Panel", "Nanotubes which contain LAC, arranged side by side and compressed further")); - GregtechItemList.Laser_Lens_Special.set(this.addItem(105, "Quantum Anomaly", "Probably should shoot it with lasers")); - - GregtechItemList.Battery_Casing_Gem_1.set(this.addItem(106, "Containment Unit I", "Used in crafting")); - GregtechItemList.Battery_Casing_Gem_2.set(this.addItem(107, "Containment Unit II", "Used in crafting")); - GregtechItemList.Battery_Casing_Gem_3.set(this.addItem(108, "Advanced Containment Unit", "Used in crafting")); - GregtechItemList.Battery_Casing_Gem_4.set(this.addItem(109, "Exotic Containment Unit", "Used in crafting")); - - GregtechItemList.Battery_Gem_4.set(this.addItem(tLastID = 110, "Graviton Anomaly", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 64L), getTcAspectStack(TC_Aspects.METALLUM, 64L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); - this.setElectricStats(32000 + tLastID, (64000000000L*16), GT_Values.V[9], 9L, -3L, false); - - - - /* - * Bombs - */ - GregtechItemList.Bomb_Cast.set(this.addItem(111, "Bomb Cast", "Used in the production of Bombs")); - GregtechItemList.Bomb_Cast_Molten.set(this.addItem(112, "Bomb Cast (Hot)", "Consider cooling this off")); - GregtechItemList.Bomb_Cast_Set.set(this.addItem(113, "Bomb Cast (Set)", "Break it open for the goodies inside!")); - GregtechItemList.Bomb_Cast_Broken.set(this.addItem(114, "Bomb Cast (Broken)", "This is probably just junk")); - GregtechItemList.Bomb_Cast_Mold.set(this.addItem(115, "Mold (Bomb Cast)", "Used in the production of Bombs")); - - /* - * High Tier 'Saws' for the tree Farm - */ - GregtechItemList.Farm_Processor_EV.set(this.addItem(tLastID = 120, "Farm Processor [EV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[5]* 10 * 60 * 20, GT_Values.V[4], 4L, -3L, false); - GregtechItemList.Farm_Processor_IV.set(this.addItem(tLastID = 122, "Farm Processor [IV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[6]* 10 * 60 * 20, GT_Values.V[5], 5L, -3L, false); - GregtechItemList.Farm_Processor_LuV.set(this.addItem(tLastID = 124, "Farm Processor [LuV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[7]* 10 * 60 * 20, GT_Values.V[6], 6L, -3L, false); - GregtechItemList.Farm_Processor_ZPM.set(this.addItem(tLastID = 126, "Farm Processor [ZPM]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[8]* 10 * 60 * 20, GT_Values.V[7], 7L, -3L, false); - GregtechItemList.Farm_Processor_UV.set(this.addItem(tLastID = 128, "Farm Processor [UV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); - this.setElectricStats(32000 + tLastID, GT_Values.V[9]* 10 * 60 * 20, GT_Values.V[8], 8L, -3L, false); - - String aTierName; - int aFirstMachineCasingID = 130; - GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] { - GregtechItemList.FakeMachineCasingPlate_ULV, - GregtechItemList.FakeMachineCasingPlate_LV, - GregtechItemList.FakeMachineCasingPlate_MV, - GregtechItemList.FakeMachineCasingPlate_HV, - GregtechItemList.FakeMachineCasingPlate_EV, - GregtechItemList.FakeMachineCasingPlate_IV, - GregtechItemList.FakeMachineCasingPlate_LuV, - GregtechItemList.FakeMachineCasingPlate_ZPM, - GregtechItemList.FakeMachineCasingPlate_UV, - GregtechItemList.FakeMachineCasingPlate_MAX, - }; - for (int i=0;i<10;i++) { - if (i==10) { - break; - } - else { - aTierName = GT_Values.VN[i]; - mMachineCasingCovers[i].set(this.addItem(aFirstMachineCasingID++, aTierName+" Machine Plate Cover", "Deprecated - Shapeless Craft to new version", new Object[]{})); - GregTech_API.registerCover(mMachineCasingCovers[i].get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[i][0]}), new GTPP_Cover_ToggleVisual()); - } - } - GregtechItemList.Laser_Lens_WoodsGlass.set(this.addItem(140, "Wood's Glass Lens", "Allows UV & IF to pass through, blocks visible light spectrums")); - - int aStartID = 141; - GregtechItemList[] aTransParts = new GregtechItemList[] { - GregtechItemList.TransmissionComponent_ULV, - GregtechItemList.TransmissionComponent_LV, - GregtechItemList.TransmissionComponent_MV, - GregtechItemList.TransmissionComponent_HV, - GregtechItemList.TransmissionComponent_EV, - GregtechItemList.TransmissionComponent_IV, - GregtechItemList.TransmissionComponent_LuV, - GregtechItemList.TransmissionComponent_ZPM, - GregtechItemList.TransmissionComponent_UV, - GregtechItemList.TransmissionComponent_MAX, - }; - for (int aIndex=0;aIndex<10;aIndex++){ - aTransParts[aIndex].set(this.addItem(aStartID++, "Transmission Component ("+GT_Values.VN[aIndex]+")", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, aIndex), getTcAspectStack(TC_Aspects.MACHINA, aIndex), getTcAspectStack(TC_Aspects.MAGNETO, aIndex)})); - } - - // Distillus Chip - GregtechItemList.Distillus_Upgrade_Chip.set(this.addItem(151, "Upgrade Chip", "Used to upgrade Distillus to Tier 2")); - - - GregtechItemList.Chip_MultiNerf_NoOutputBonus.set(this.addItem(160, "No-Bonus Chip", "You won't like using this")); - GregtechItemList.Chip_MultiNerf_NoSpeedBonus.set(this.addItem(161, "No-Bonus Chip", "You won't like using this")); - GregtechItemList.Chip_MultiNerf_NoEuBonus.set(this.addItem(162, "No-Bonus Chip", "You won't like using this")); - - - /* - GregtechItemList.Cover_Overflow_Item_ULV.set(this.addItem(165, "Item Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_Item_LV.set(this.addItem(166, "Item Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_Item_MV.set(this.addItem(167, "Item Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_Item_HV.set(this.addItem(168, "Item Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_Item_EV.set(this.addItem(169, "Item Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Cover_Overflow_Item_IV.set(this.addItem(170, "Item Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(8)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(64)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(512)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(4096)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(32768)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(262144)); - */ - } - - private boolean registerComponents_ULV(){ - GregtechItemList.Electric_Pump_ULV.set(this.addItem(32, "Electric Pump (ULV)", "160 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregtechItemList.Electric_Motor_ULV.set(this.addItem(33, "Electric Motor (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); - GregtechItemList.Conveyor_Module_ULV.set(this.addItem(34, "Conveyor Module (ULV)", "1 Stack every 80 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)})); - GregtechItemList.Electric_Piston_ULV.set(this.addItem(35, "Electric Piston (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); - GregtechItemList.Robot_Arm_ULV.set(this.addItem(36, "Robot Arm (ULV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)})); - GregtechItemList.Field_Generator_ULV.set(this.addItem(37, "Field Generator (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)})); - GregtechItemList.Emitter_ULV.set(this.addItem(38, "Emitter (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)})); - GregtechItemList.Sensor_ULV.set(this.addItem(39, "Sensor (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)})); - - GregTech_API.registerCover(GregtechItemList.Electric_Pump_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8)); - GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1600)); - GregTech_API.registerCover(GregtechItemList.Robot_Arm_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1600)); - - return true; - } - - private boolean registerComponents_MAX(){ - GregtechItemList.Electric_Pump_MAX.set(this.addItem(3, "Electric Pump (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)})); - GregtechItemList.Electric_Motor_MAX.set(this.addItem(7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); - GregtechItemList.Conveyor_Module_MAX.set(this.addItem(11, "Conveyor Module (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)})); - GregtechItemList.Electric_Piston_MAX.set(this.addItem(15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); - GregtechItemList.Robot_Arm_MAX.set(this.addItem(19, "Robot Arm (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)})); - GregtechItemList.Field_Generator_MAX.set(this.addItem(23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)})); - GregtechItemList.Emitter_MAX.set(this.addItem(27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)})); - GregtechItemList.Sensor_MAX.set(this.addItem(31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)})); - - GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288)); - GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4)); - GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4)); - - - return true; - } - - public boolean registerOldCircuits(){ - //Enable Old Circuits - Logger.INFO("[Old Feature - Circuits] Enabling Pre-5.09.28 Circuits and Data Storage."); - - GregtechItemList.Old_Circuit_Primitive.set(this.addItem(200, "NAND Chip", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive)})); - GregtechItemList.Old_Circuit_Basic.set(this.addItem(201, "Basic Electronic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic)})); - GregtechItemList.Old_Circuit_Good.set(this.addItem(202, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good)})); - GregtechItemList.Old_Circuit_Advanced.set(this.addItem(203, "Advanced Circuit", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced)})); - GregtechItemList.Old_Circuit_Data.set(this.addItem(204, "Data Storage Circuit", "A Data Storage Chip", new Object[]{OrePrefixes.circuit.get(Materials.Data)})); - GregtechItemList.Old_Circuit_Elite.set(this.addItem(205, "Data Control Circuit", "A Processor", new Object[]{OrePrefixes.circuit.get(Materials.Elite)})); - GregtechItemList.Old_Circuit_Master.set(this.addItem(206, "Energy Flow Circuit", "A High Voltage Processor", new Object[]{OrePrefixes.circuit.get(Materials.Master)})); - - GregtechItemList.Old_Tool_DataOrb.set(this.addItem(207, "Data Orb [GT++]", "A High Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); - GregtechItemList.Old_Circuit_Ultimate.set(GregtechItemList.Old_Tool_DataOrb.get(1L)); - GT_ModHandler.addShapelessCraftingRecipe(GregtechItemList.Old_Tool_DataOrb.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{GregtechItemList.Old_Tool_DataOrb.get(1L)}); - - GregtechItemList.Old_Tool_DataStick.set(this.addItem(208, "Data Stick [GT++]", "A Low Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); - GT_ModHandler.addShapelessCraftingRecipe(GregtechItemList.Old_Tool_DataStick.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{GregtechItemList.Old_Tool_DataStick.get(1L)}); - - GregtechItemList.Old_Circuit_Board_Basic.set(this.addItem(210, "Basic Circuit Board", "A basic Board")); - GregtechItemList.Old_Circuit_Board_Advanced.set(this.addItem(211, "Advanced Circuit Board", "An advanced Board")); - GregtechItemList.Old_Circuit_Board_Elite.set(this.addItem(212, "Processor Board", "A Processor Board")); - GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.set(this.addItem(213, "Engraved Crystal Chip", "Needed for Circuits")); - GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.set(this.addItem(214, "Engraved Lapotron Chip", "Needed for Circuits")); - GregtechItemList.Old_Circuit_Parts_Advanced.set(this.addItem(215, "Advanced Circuit Parts", "Advanced Circuit Parts")); - GregtechItemList.Old_Circuit_Parts_Wiring_Basic.set(this.addItem(216, "Etched Medium Voltage Wiring", "Part of Circuit Boards")); - GregtechItemList.Old_Circuit_Parts_Wiring_Advanced.set(this.addItem(217, "Etched High Voltage Wiring", "Part of Circuit Boards")); - GregtechItemList.Old_Circuit_Parts_Wiring_Elite.set(this.addItem(218, "Etched Extreme Voltage Wiring", "Part of Circuit Boards")); - GregtechItemList.Old_Empty_Board_Basic.set(this.addItem(219, "Empty Circuit Board", "A Board Part")); - GregtechItemList.Old_Empty_Board_Elite.set(this.addItem(220, "Empty Processor Board", "A Processor Board Part")); - - return true; - } - - public boolean registerCustomCircuits() { - if (CORE.ConfigSwitches.enableCustomCircuits){ - GregtechItemList.Circuit_IV.set(this.addItem(704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)})); - GregtechItemList.Circuit_LuV.set(this.addItem(705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)})); - GregtechItemList.Circuit_ZPM.set(this.addItem(706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)})); - GregtechItemList.Circuit_Board_IV.set(this.addItem(710, "IV Circuit Board", "An IV Voltage Rated Circuit Board")); - GregtechItemList.Circuit_Board_LuV.set(this.addItem(711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board")); - GregtechItemList.Circuit_Board_ZPM.set(this.addItem(712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board")); - GregtechItemList.Circuit_Parts_Crystal_Chip_IV.set(this.addItem(713, "(IV) Energized Crystal Chip", "Needed for Circuits")); - GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(this.addItem(714, "(LuV) Neutron based Microchip", "Needed for Circuits")); - GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.set(this.addItem(715, "(ZPM) Quantum Chip", "Needed for Circuits")); - GregtechItemList.Circuit_Parts_IV.set(this.addItem(716, "(IV) Energized Circuit Parts", "Circuit Parts")); - GregtechItemList.Circuit_Parts_LuV.set(this.addItem(717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts")); - GregtechItemList.Circuit_Parts_ZPM.set(this.addItem(718, "(ZPM) Quantum Circuit Parts", "Circuit Parts")); - GregtechItemList.Circuit_Parts_Wiring_IV.set(this.addItem(719, "Etched IV Voltage Wiring", "Part of Circuit Boards")); - GregtechItemList.Circuit_Parts_Wiring_LuV.set(this.addItem(720, "Etched LuV Voltage Wiring", "Part of Circuit Boards")); - GregtechItemList.Circuit_Parts_Wiring_ZPM.set(this.addItem(721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards")); - ItemUtils.addItemToOreDictionary(GregtechItemList.Circuit_IV.get(1), "circuitSuperconductor"); - ItemUtils.addItemToOreDictionary(GregtechItemList.Circuit_LuV.get(1), "circuitInfinite"); - return true; - } - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java deleted file mode 100644 index 14100d1599..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items; - -import java.lang.reflect.Field; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.TC_Aspects; -import gregtech.api.enums.ToolDictNames; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_HashSet; -import gregtech.api.objects.GT_ItemStack; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames; -import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_AngleGrinder; -import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher; -import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricButcherKnife; -import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricLighter; -import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricSnips; - -public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool { - - public static final short ELECTRIC_LIGHTER = 7534; - public static final short ELECTRIC_BUTCHER_KNIFE = 7634; - public static final short SKOOKUM_CHOOCHER = 7734; - public static final short ANGLE_GRINDER = 7834; - public static final short ELECTRIC_SNIPS = 7934; - public static GT_MetaGenerated_Tool INSTANCE; - - static { - INSTANCE = new MetaGeneratedGregtechTools(); - } - - public static GT_MetaGenerated_Tool getInstance() { - return INSTANCE; - } - - - private MetaGeneratedGregtechTools() { - super("plusplus.metatool.01"); - // Skookum Choocher - GregTech_API.registerTool(this.addTool(SKOOKUM_CHOOCHER, "Skookum Choocher", - "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.", new TOOL_Gregtech_Choocher(), - new Object[] { GregtechToolDictNames.craftingToolSkookumChoocher, ToolDictNames.craftingToolHardHammer, - ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }), - GregTech_API.sWrenchList); - - // Electric File - this.addTool(ANGLE_GRINDER, "Angle Grinder", "Hand-held electric filing device", - new TOOL_Gregtech_AngleGrinder(), - new Object[] { GregtechToolDictNames.craftingToolAngleGrinder, ToolDictNames.craftingToolFile, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); - - GT_HashSet aWireCutterList = new GT_HashSet(); - //Does not exist prior to 5.09.32, use an empty field if we can't find the existing one. - if (ReflectionUtils.doesFieldExist(GregTech_API.class, "sWireCutterList")) { - Field sWireCutterList = ReflectionUtils.getField(GregTech_API.class, "sWireCutterList"); - try { - if (sWireCutterList != null) { - Object val = sWireCutterList.get(null); - if (val != null && val instanceof GT_HashSet) { - aWireCutterList = (GT_HashSet) val; - } - } - - } - catch (IllegalArgumentException | IllegalAccessException e) { - // Not found, so it's GT 5.09.31 or earlier. - } - } - - // Electric Wire Cutter - GregTech_API.registerTool( - this.addTool(ELECTRIC_SNIPS, "Automatic Snips", "Hand-held electric wire cutter", - new TOOL_Gregtech_ElectricSnips(), - new Object[] { GregtechToolDictNames.craftingToolElectricSnips, ToolDictNames.craftingToolWireCutter, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L) }), aWireCutterList); - - - // Electric Lighter - this.addTool(ELECTRIC_LIGHTER, "Pyromatic 9k", "Electric Fire!", - new TOOL_Gregtech_ElectricLighter(), - new Object[] { GregtechToolDictNames.craftingToolElectricLighter, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); - - // Electric Butcher Knife - this.addTool(ELECTRIC_BUTCHER_KNIFE, "Meat-o-matic", "Electric butcher knife", - new TOOL_Gregtech_ElectricButcherKnife(), - new Object[] { GregtechToolDictNames.craftingToolElectricButcherKnife, ToolDictNames.craftingToolKnife, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java deleted file mode 100644 index f82e0e5cb0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items.behaviours; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.items.behaviors.Behaviour_None; -import gregtech.common.items.behaviors.Behaviour_Wrench; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; - -public class Behaviour_Choocher -extends Behaviour_None { - private boolean isWrench = true; - private final Behaviour_Wrench wrench = new Behaviour_Wrench(150); - private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250); - private final String mTooltip1 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering1", "Current tool mode: "); - private final String mTooltip2 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick."); - private final String mTooltipH = GT_LanguageManager.addStringLocalization("gt.behaviour.prospectingEx", "Usable for Prospecting large areas."); - private final String mTooltipW = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick."); - - public Behaviour_Choocher() { - - } - - @Override - public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - if (aWorld.isRemote) { - return false; - } - - boolean inWrenchMode; - if (NBTUtils.hasKey(aStack, "aMode")) { - inWrenchMode = NBTUtils.getBoolean(aStack, "aMode"); - } - else { - aStack.getTagCompound().setBoolean("aMode", true); - inWrenchMode = true; - } - - if (aPlayer.isSneaking()){ - boolean aModeNew = Utils.invertBoolean(inWrenchMode); - aStack.getTagCompound().setBoolean("aMode", aModeNew); - PlayerUtils.messagePlayer(aPlayer, "Mode: "+(aModeNew ? "Wrench" : "Hammer")); - return true; - } - else { - if (inWrenchMode){ - return this.wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ); - } - else { - return this.prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); - } - } - } - - @Override - public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { - - boolean inWrenchMode; - if (NBTUtils.hasKey(aStack, "aMode")) { - inWrenchMode = NBTUtils.getBoolean(aStack, "aMode"); - } - else { - NBTUtils.setBoolean(aStack, "aMode", true); - aStack.getTagCompound().setBoolean("aMode", true); - inWrenchMode = true; - } - - - if (inWrenchMode){ - aList.add(this.mTooltip1+"Wrench"); - aList.add(this.mTooltipW); - } - else { - aList.add(this.mTooltip1+"Prospecting"); - aList.add(this.mTooltipH); - } - aList.add(this.mTooltip2); - - return aList; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java deleted file mode 100644 index 422a29c34e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java +++ /dev/null @@ -1,220 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items.behaviours; - -import java.util.List; - -import codechicken.lib.math.MathHelper; -import gregtech.api.GregTech_API; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.behaviors.Behaviour_None; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.entity.projectile.EntityLightningAttack; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import ic2.api.item.IElectricItemManager; -import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public class Behaviour_Electric_Lighter extends Behaviour_None { - - private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", - "Can light things on Fire"); - private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", - "Remaining Uses:"); - private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", - "Not usable when stacked!"); - - public Behaviour_Electric_Lighter() { - - } - - public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { - if (!aPlayer.worldObj.isRemote && aStack != null && aStack.stackSize == 1) { - boolean rOutput = false; - if (aEntity instanceof EntityCreeper) { - if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { - GT_Utility.sendSoundToPlayers(aPlayer.worldObj, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, - MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), - MathHelper.floor_double(aEntity.posZ)); - ((EntityCreeper) aEntity).func_146079_cb(); - rOutput = true; - } - } - return rOutput; - } else { - return false; - } - } - - public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { - if (aPlayer.isSneaking()) { - Logger.INFO("Changing Mode"); - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); - Logger.INFO("Is currently in Fireball mode? "+aCurrentMode); - boolean aNewMode = Utils.invertBoolean(aCurrentMode); - Logger.INFO("Is now set to Fireball mode? "+aNewMode); - aStack.getTagCompound().setBoolean("aFireballMod", aNewMode); - //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode); - PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter")); - } - else { - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); - if (aCurrentMode) { - //Shoot Lightning Attack - aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F)); - if (!aWorld.isRemote) { - aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ)); - } - } - else { - //Lights Fires Mode - Logger.WARNING("Preparing Lighter a"); - boolean rOutput = false; - ForgeDirection tDirection = ForgeDirection.getOrientation(aSide); - aX += tDirection.offsetX; - aY += tDirection.offsetY; - aZ += tDirection.offsetZ; - if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { - Logger.WARNING("Preparing Lighter b"); - if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { - Logger.WARNING("Preparing Lighter c"); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, - aZ); - aWorld.setBlock(aX, aY, aZ, Blocks.fire); - rOutput = true; - // ItemNBT.setLighterFuel(aStack, tFuelAmount); - return rOutput; - } - } - } - } - } - Logger.WARNING("Preparing Lighter z"); - return false; - } - - public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { - if (aPlayer.isSneaking()) { - Logger.INFO("Changing Mode"); - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); - Logger.INFO("Is currently in Fireball mode? "+aCurrentMode); - boolean aNewMode = Utils.invertBoolean(aCurrentMode); - Logger.INFO("Is now set to Fireball mode? "+aNewMode); - aStack.getTagCompound().setBoolean("aFireballMode", aNewMode); - //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode); - PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter")); - } - else { - boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); - if (aCurrentMode) { - //Shoot Lightning Attack - aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F)); - if (!aWorld.isRemote) { - aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ)); - } - } - else { - //Lights Fires Mode - Logger.WARNING("Preparing Lighter a"); - boolean rOutput = false; - ForgeDirection tDirection = ForgeDirection.getOrientation(aSide); - aX += tDirection.offsetX; - aY += tDirection.offsetY; - aZ += tDirection.offsetZ; - if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { - Logger.WARNING("Preparing Lighter b"); - if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { - Logger.WARNING("Preparing Lighter c"); - GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, - aZ); - aWorld.setBlock(aX, aY, aZ, Blocks.fire); - rOutput = true; - // ItemNBT.setLighterFuel(aStack, tFuelAmount); - return rOutput; - } - } - } - } - } - Logger.WARNING("Preparing Lighter z"); - return false; - } - - private boolean prepare(ItemStack aStack) { - if (aStack != null) { - Logger.WARNING("Preparing Lighter 1"); - if (aStack.getItem() instanceof MetaGeneratedGregtechTools) { - Logger.WARNING("Preparing Lighter 2"); - if (ChargingHelper.isItemValid(aStack)) { - Logger.WARNING("Preparing Lighter 3"); - if (aStack.getItem() instanceof IElectricItemManager) { - Logger.WARNING("Preparing Lighter 4"); - IElectricItemManager aItemElec = (IElectricItemManager) aStack.getItem(); - double aCharge = aItemElec.getCharge(aStack); - long aEuCost = 4096 * 2; - if (aCharge >= aEuCost) { - Logger.WARNING("Preparing Lighter 5"); - aItemElec.discharge(aStack, aEuCost, 3, true, true, false); - return true; - } - } - } - } - } - Logger.WARNING("Preparing Lighter 0"); - return false; - } - - private void useUp(ItemStack aStack) { - - } - - public List getAdditionalToolTips(GT_MetaBase_Item aItem, List aList, ItemStack aStack) { - aList.add(this.mTooltip); - int aUses = 0; - if (aStack != null) { - if (aStack.getItem() instanceof MetaGeneratedGregtechTools) { - if (ChargingHelper.isItemValid(aStack)) { - if (aStack.getItem() instanceof IElectricItemManager) { - IElectricItemManager aItemElec = (IElectricItemManager) aStack.getItem(); - double aCharge = aItemElec.getCharge(aStack); - long aEuCost = 4096 * 2; - aUses = (int) (aCharge / aEuCost); - } - } - boolean aCurrentMode; - if (!NBTUtils.hasTagCompound(aStack)) { - NBTUtils.createEmptyTagCompound(aStack); - } - if (NBTUtils.hasKey(aStack, "aFireballMode")) { - aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); - } - else { - aStack.getTagCompound().setBoolean("aFireballMode", false); - aCurrentMode = false; - } - aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter")); - } - - } - - aList.add(this.mTooltipUses + " " + aUses); - aList.add(this.mTooltipUnstackable); - return aList; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java deleted file mode 100644 index 9012bb8cd8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java +++ /dev/null @@ -1,94 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items.behaviours; - -import java.util.List; - -import gregtech.api.enums.SubTag; -import gregtech.api.interfaces.IItemBehaviour; -import gregtech.api.items.GT_MetaBase_Item; -import net.minecraft.dispenser.IBlockSource; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class Behaviour_Grinder implements IItemBehaviour { - - @Override - public boolean onLeftClickEntity(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, Entity var4) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean onItemUse(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, World var4, int var5, int var6, - int var7, int var8, float var9, float var10, float var11) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean onItemUseFirst(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, World var4, int var5, - int var6, int var7, int var8, float var9, float var10, float var11) { - // TODO Auto-generated method stub - return false; - } - - @Override - public ItemStack onItemRightClick(GT_MetaBase_Item var1, ItemStack var2, World var3, EntityPlayer var4) { - // TODO Auto-generated method stub - return null; - } - - @Override - public List getAdditionalToolTips(GT_MetaBase_Item var1, List var2, ItemStack var3) { - // TODO Auto-generated method stub - return null; - } - - @Override - public void onUpdate(GT_MetaBase_Item var1, ItemStack var2, World var3, Entity var4, int var5, boolean var6) { - // TODO Auto-generated method stub - - } - - @Override - public boolean isItemStackUsable(GT_MetaBase_Item var1, ItemStack var2) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean canDispense(GT_MetaBase_Item var1, IBlockSource var2, ItemStack var3) { - // TODO Auto-generated method stub - return false; - } - - @Override - public ItemStack onDispense(GT_MetaBase_Item var1, IBlockSource var2, ItemStack var3) { - // TODO Auto-generated method stub - return null; - } - - @Override - public boolean hasProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3) { - // TODO Auto-generated method stub - return false; - } - - @Override - public EntityArrow getProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, double var5, - double var7, double var9) { - // TODO Auto-generated method stub - return null; - } - - @Override - public EntityArrow getProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, - EntityLivingBase var5, float var6) { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java deleted file mode 100644 index f320bfc77d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java +++ /dev/null @@ -1,123 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items.behaviours; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gregtech.common.blocks.GT_Block_Ores; -import gregtech.common.blocks.GT_TileEntity_Ores; -import gregtech.common.items.behaviors.Behaviour_Prospecting; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.IFluidBlock; - -public class Behaviour_Prospecting_Ex -extends Behaviour_Prospecting { - private final int mVanillaCosts; - private final int mEUCosts; - - public Behaviour_Prospecting_Ex(final int aVanillaCosts, final int aEUCosts) { - super(aVanillaCosts, aEUCosts); - this.mVanillaCosts = aVanillaCosts; - this.mEUCosts = aEUCosts; - } - - @Override - public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { - if (aWorld.isRemote) { - return false; - } - final Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) { - return false; - } - final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); - - - ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { - GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); - return true; - } - if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt)) ||(aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass)) ) { - if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); - int tX = aX; - int tY = aY; - int tZ = aZ; - int tMetaID = 0; - final int tQuality = ((aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0)*3; - - int i = 0; - for (final int j = 6 + tQuality; i < j; i++) { - tX -= ForgeDirection.getOrientation(aSide).offsetX; - tY -= ForgeDirection.getOrientation(aSide).offsetY; - tZ -= ForgeDirection.getOrientation(aSide).offsetZ; - - final Block tBlock = aWorld.getBlock(tX, tY, tZ); - if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) { - GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block."); - break; - } - if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) { - GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block."); - break; - } - if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) { - GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Block."); - break; - } - if (tBlock != aBlock) { - if (i >= 4) { - break; - } - GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Block."); - break; - } - } - final Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide); - i = 0; - for (final int j = 9 + (2 * tQuality); i < j; i++) { - tX = (aX - 4 - tQuality) + tRandom.nextInt(j); - tY = (aY - 4 - tQuality) + tRandom.nextInt(j); - tZ = (aZ - 4 - tQuality) + tRandom.nextInt(j); - final Block tBlock = aWorld.getBlock(tX, tY, tZ); - if ((tBlock instanceof GT_Block_Ores)) { - final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); - if ((tTileEntity instanceof GT_TileEntity_Ores)) { - final Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; - if ((tMaterial != null) && (tMaterial != Materials._NULL)) { - GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore."); - return true; - } - } - } else { - tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); - tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { - GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); - return true; - } - } - } - GT_Utility.sendChatToPlayer(aPlayer, "No Ores found."); - } - return true; - } - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java deleted file mode 100644 index 7af057bc59..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java +++ /dev/null @@ -1,40 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.items.covers; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; - -public class MetaItemCoverCasings extends MetaCustomCoverItem { - - public MetaItemCoverCasings() { - super(CORE.MODID, Textures.BlockIcons.MACHINECASINGS_SIDE.length, "Gt Machine Casings", Textures.BlockIcons.MACHINECASINGS_SIDE, null); - } - - @Override - public void registerIcons(IIconRegister reg) { - for (int i = 0; i < icons.length; i++) { - this.icons[i] = reg.registerIcon(CORE.MODID+":"+"covers/"+i); - } - } - - public boolean hide() { - return false; - } - - @Override - public IIcon getIconFromDamage(int meta) { - return this.icons[MathUtils.balance(meta, 0, 15)]; - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - return EnumChatFormatting.LIGHT_PURPLE + GT_Values.VOLTAGE_NAMES[MathUtils.balance(tItem.getItemDamage(), 0, GT_Values.VOLTAGE_NAMES.length-1)]+" Machine Plate Cover"; //super.getItemStackDisplayName(tItem); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java deleted file mode 100644 index 49537ab559..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ /dev/null @@ -1,517 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.render; - -import java.io.*; -import java.net.URL; -import java.util.Date; -import java.util.List; -import java.util.UUID; - -import org.apache.commons.io.IOUtils; -import org.lwjgl.opengl.GL11; - -import com.mojang.authlib.GameProfile; - -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.proxy.ClientProxy; -import gtPlusPlus.core.util.data.AES; -import gtPlusPlus.core.util.data.FileUtils; -import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.client.entity.AbstractClientPlayer; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.entity.RenderPlayer; -import net.minecraft.potion.Potion; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.event.RenderPlayerEvent; - -public class GTPP_CapeRenderer extends RenderPlayer { - - private static final ResourceLocation[] mCapes = { - new ResourceLocation("miscutils:textures/OrangeHD.png"), - new ResourceLocation("miscutils:textures/FancyCapeHD.png"), - new ResourceLocation("miscutils:textures/TesterCapeHD.png"), - new ResourceLocation("miscutils:textures/PatreonCapeHD.png"), - new ResourceLocation("miscutils:textures/DevCapeHD.png"), - }; - - private final boolean mInit; - - public GTPP_CapeRenderer() { - mInit = init(); - } - - private final boolean init() { - if (mInit) { - return false; - } - return CapeUtils.init(); - } - - private static boolean hasResourceChecked = false; - private static boolean hasSetRenderer = false; - private boolean hasCape = false; - private ResourceLocation tResource = null; - - public synchronized void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) { - - // Check we have set Render Manager - if (this.renderManager == null) { - hasSetRenderer = false; - } - - // Set Render Manager - if (!hasSetRenderer) { - if (RenderManager.instance != null) { - setRenderManager(RenderManager.instance); - hasSetRenderer = true; - } - } - - // Actually Render - if (hasSetRenderer) { - - // We have capes turned off, so let's not render. - if (!ConfigSwitches.enableCustomCapes) { - return; - } - - // We have already checked if this player has a cape, but since they do not, we best not render. - if (hasResourceChecked) { - if (!hasCape && !CORE.DEVENV) { - return; - } - } - - // Allocate client player object - AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer; - - // Make sure we don't keep checking on clients who dont have capes. - if (!hasResourceChecked) { - - // Get players UUID - String aPlayerUUID = aPlayer != null ? aPlayer.getGameProfile().getId().toString() : "BAD"; - - // If for whatever reason this fails, we just exit early. - if (aPlayerUUID.equals("BAD")) { - return; - } - - // Automatically allocate a Dev cape while in Dev mode. - if (tResource == null && CORE.DEVENV) { - tResource = mCapes[4]; - hasCape = true; - } - - String aPlayerName = ClientProxy.playerName; - - // Check cape lists for the cape this player owns. - if (!hasCape) { - for (Pair aData : CapeUtils.mOrangeCapes) { - if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { - tResource = mCapes[0]; - hasCape = true; - break; - } - } - } - if (!hasCape) { - for (Pair aData : CapeUtils.mMiscCapes) { - if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { - tResource = mCapes[1]; - hasCape = true; - break; - } - } - } - if (!hasCape) { - for (Pair aData : CapeUtils.mBetaTestCapes) { - if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { - tResource = mCapes[2]; - hasCape = true; - break; - } - } - } - if (!hasCape) { - for (Pair aData : CapeUtils.mPatreonCapes) { - if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { - tResource = mCapes[3]; - hasCape = true; - break; - } - } - } - if (!hasCape) { - for (Pair aData : CapeUtils.mDevCapes) { - if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { - tResource = mCapes[4]; - hasCape = true; - break; - } - } - } - hasResourceChecked = true; - } - - if (hasResourceChecked) { - // We have met all the conditions, let's render that cape. - renderCapeOnPlayer(aEvent, aPlayer); - } - } - - } - - private final boolean renderCapeOnPlayer(RenderPlayerEvent.Specials.Pre aEvent, AbstractClientPlayer aPlayer) { - float aPartialTicks = aEvent.partialRenderTick; - try { - if (tResource == null && CORE.DEVENV) { - tResource = mCapes[3]; - } - - // If player is invisible, don't render. - if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible() - || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) { - aEvent.setCanceled(true); - return false; - } - - if ((tResource != null) && (!aPlayer.getHideCape())) { - bindTexture(tResource); - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0.0F, 0.125F); - double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); - double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); - double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); - float f6 = aPlayer.prevRenderYawOffset - + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; - double d3 = MathHelper.sin(f6 * CORE.PI / 180.0F); - double d4 = -MathHelper.cos(f6 * CORE.PI / 180.0F); - float f7 = (float) d1 * 10.0F; - float f8 = (float) (d0 * d3 + d2 * d4) * 100.0F; - float f9 = (float) (d0 * d4 - d2 * d3) * 100.0F; - if (f7 < -6.0F) { - f7 = -6.0F; - } - if (f7 > 32.0F) { - f7 = 32.0F; - } - if (f8 < 0.0F) { - f8 = 0.0F; - } - float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks; - f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified - + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) - * 32.0F * f10; - if (aPlayer.isSneaking()) { - f7 += 25.0F; - } - GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F); - GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F); - GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); - ((ModelBiped) this.mainModel).renderCloak(0.0625F); - GL11.glPopMatrix(); - return true; - } - } catch (Throwable e) { - - } - return false; - } - - @SuppressWarnings("unused") - @Deprecated - /** - * Should be able to get the username from a UUID - * @param name - Players Name - * @param uuid - Players known UUID - * @return - The newest Player name - */ - private String getPlayerName(String name, String uuid) { - try { - Logger.WORLD("[Capes++] Trying to UUID check " + name + "."); - if (uuid != null) { - if (uuid.length() > 0) { - UUID g = UUID.fromString(uuid); - if (g != null) { - Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); - GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g); - if (profile != null) { - Logger.WARNING("[Capes++] Found for UUID check: " + profile.getName() + "."); - return profile.getName(); - } - } else { - g = UUID.fromString(uuid.replace("-", "")); - if (g != null) { - Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); - GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g); - if (profile != null) { - Logger.WARNING("[Capes++] Found for UUID check 2: " + profile.getName() + "."); - return profile.getName(); - } - } - } - } - } - if (name != null) { - if (name.length() > 0) { - Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); - GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name); - if (profile != null) { - Logger.WARNING("[Capes++] Found for name check: " + profile.getName() + "."); - return profile.getName(); - } - } - } - Logger.WORLD("[Capes++] Failed UUID check for " + name + "."); - } catch (Throwable t) { - } - return name; - } - - - - private static class CapeUtils { - - private static char SPLIT_CHARACTER = '§'; - private static AES sAES; - - // UUID - Username - private static final AutoMap> mOrangeCapes = new AutoMap>(); - private static final AutoMap> mMiscCapes = new AutoMap>(); - private static final AutoMap> mBetaTestCapes = new AutoMap>(); - private static final AutoMap> mPatreonCapes = new AutoMap>(); - private static final AutoMap> mDevCapes = new AutoMap>(); - - private static final boolean init() { - CapeUtils.handleOldCapeCache(); - if (CORE.DEVENV) { - return true; - } - try { - if (shouldDownloadCapeList()) { - downloadCapeList(); - } - } - catch (Exception e) { - return false; - } - writeCacheToMaps(); - return true; - } - - - private static boolean shouldDownloadCapeList() { - if (!doesCapeCacheExistLocally()) { - return true; - } - if (isCapeCacheWeekOld()) { - return true; - } - return false; - } - - private static final boolean isCapeCacheWeekOld() { - if (!doesCapeCacheExistLocally()) { - return true; - } - else { - File dat = CapeUtils.getCapeCache(); - Date dateLastMod = new Date(dat.lastModified()); - Date dateNow = new Date(System.currentTimeMillis() - (7l * 24 * 60 * 60 * 1000)); - if (dateLastMod.before(dateNow)) { - return true; - } - } - return false; - } - - private static final void downloadCapeList() { - try { - File dat = getCapeCache(); - File temp = allocateTempFile(); - InputStream inputStream = new URL("https://alkcorp.overminddl1.com/CapeCache.dat").openStream(); - FileOutputStream fileOS = new FileOutputStream(temp); - IOUtils.copy(inputStream, fileOS); - if (isDownloadedCapeListBigger(temp)) { - fileOS = new FileOutputStream(dat); - IOUtils.copy(inputStream, fileOS); - } - } catch (Throwable t) { - Logger.INFO("Unable to download GT++ cape list."); - } - } - - private static final boolean isDownloadedCapeListBigger(File aFile) { - double aExistingFileSize = (doesCapeCacheExistLocally() ? getCapeCache().length() : 0); - double aNewFileSize = aFile.length(); - if (aNewFileSize > aExistingFileSize) { - return true; - } - return false; - } - - private static void handleOldCapeCache() { - File aCacheFile = FileUtils.getFile("GTPP", "dat"); - if (FileUtils.doesFileExist(aCacheFile)) { - aCacheFile.delete(); - } - } - - private static final boolean doesCapeCacheExistLocally() { - File aCacheFile = FileUtils.getFile("CapeCache", "dat"); - if (FileUtils.doesFileExist(aCacheFile)) { - return true; - } - return false; - } - - private static final File getCapeCache() { - File aCacheFile = FileUtils.getFile("CapeCache", "dat"); - if (FileUtils.doesFileExist(aCacheFile)) { - FileUtils.createFile(aCacheFile); - } - return aCacheFile; - } - - public static final List getDataFromCache(){ - File aCacheFile = getCapeCache(); - List aCache = FileUtils.readLines(aCacheFile); - if (aCache != null && !aCache.isEmpty()) { - return aCache; - } - return new AutoMap(); - } - - private static final File allocateTempFile() { - File tempFile = null; - try { - tempFile = File.createTempFile("gtpp-", null); - } - catch (IOException e) { - e.printStackTrace(); - } - if (tempFile == null) { - tempFile = FileUtils.createFile("", "gtpp-"+MathUtils.randInt(Short.MAX_VALUE, (Integer.MAX_VALUE/2)), "tmp"); - } - tempFile.deleteOnExit(); - return tempFile; - } - - - public static final void writeCacheToMaps() { - List aCacheData = getDataFromCache(); - if (aCacheData != null && !aCacheData.isEmpty()) { - if (sAES == null) { - sAES = new AES(); - } - AutoMap aDecodedData = new AutoMap(); - for (String aToDecode : aCacheData) { - aDecodedData.put(sAES.decode(aToDecode)); - } - if (!aDecodedData.isEmpty()) { - AutoMap> aCapeType1 = new AutoMap>(); - AutoMap> aCapeType2 = new AutoMap>(); - AutoMap> aCapeType3 = new AutoMap>(); - AutoMap> aCapeType4 = new AutoMap>(); - AutoMap> aCapeType5 = new AutoMap>(); - boolean didProcessStringData = false; - Logger.INFO("Decoded String Count: "+aDecodedData.size()); - for (String aToSplit : aDecodedData) { - String[] aSplitData = aToSplit.split(""+SPLIT_CHARACTER); - if (aSplitData != null && aSplitData.length >= 2) { - if (aSplitData[0] != null) { - Integer aCapeTypeID2 = Integer.parseInt(aSplitData[0]); - if (aCapeTypeID2 != null) { - int aCapeTypeID = aCapeTypeID2; - Pair aFinalString = new Pair("UUID: "+aSplitData[1], "Username: "+(aSplitData[2] != null && aSplitData[0].length() > 0 ? aSplitData[2] : "Not Specified")); - Logger.INFO("Cape Type: "+aCapeTypeID); - switch (aCapeTypeID) { - case 0: - aCapeType1.add(aFinalString); - Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType1.size()+" users."); - break; - case 1: - aCapeType2.add(aFinalString); - Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType2.size()+" users."); - break; - case 2: - aCapeType3.add(aFinalString); - Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType3.size()+" users."); - break; - case 3: - aCapeType4.add(aFinalString); - Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType4.size()+" users."); - break; - case 4: - aCapeType5.add(aFinalString); - Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType5.size()+" users."); - break; - default: - break; - } - } - } - } - } - if (!aCapeType1.isEmpty() || !aCapeType2.isEmpty() || !aCapeType3.isEmpty() || !aCapeType4.isEmpty() || !aCapeType5.isEmpty()) { - didProcessStringData = true; - } - else { - // did not process any data - } - if (didProcessStringData) { - if (!aCapeType1.isEmpty()) { - for (Pair aUser : aCapeType1) { - Logger.INFO("Adding Generic cape for "+aUser.getKey()); - mOrangeCapes.add(aUser); - } - } - if (!aCapeType2.isEmpty()) { - for (Pair aUser : aCapeType2) { - Logger.INFO("Adding Blue cape for "+aUser.getKey()); - mMiscCapes.add(aUser); - } - } - if (!aCapeType3.isEmpty()) { - for (Pair aUser : aCapeType3) { - Logger.INFO("Adding Beta cape for "+aUser.getKey()); - mBetaTestCapes.add(aUser); - } - } - if (!aCapeType4.isEmpty()) { - for (Pair aUser : aCapeType4) { - Logger.INFO("Adding Patreon cape for "+aUser.getKey()); - mPatreonCapes.add(aUser); - } - } - if (!aCapeType5.isEmpty()) { - for (Pair aUser : aCapeType5) { - Logger.INFO("Adding Dev cape for "+aUser.getKey()); - mDevCapes.add(aUser); - } - } - } - } - else { - // No data decoded - } - } - else { - // Nothing was cached? - } - } - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java deleted file mode 100644 index 1561ba9f73..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java +++ /dev/null @@ -1,94 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.render; - -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.ItemList; -import gregtech.common.items.GT_VolumetricFlask; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import ic2.core.util.DrawUtil; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemRenderer; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.MinecraftForgeClient; -import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; - -@SideOnly(cpw.mods.fml.relauncher.Side.CLIENT) -public final class GTPP_FlaskRenderer implements net.minecraftforge.client.IItemRenderer { - - public GTPP_FlaskRenderer() { - MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_8k.getItem(), this); - MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_32k.getItem(), this); - } - - public boolean handleRenderType(ItemStack item, ItemRenderType type) { - return type != ItemRenderType.FIRST_PERSON_MAP; - } - - - public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) { - return type == ItemRenderType.ENTITY; - } - - public void renderItem(ItemRenderType type, ItemStack item, Object... data) { - GT_VolumetricFlask cell = (GT_VolumetricFlask) item.getItem(); - - int aType = cell.getMaxCapacity() == 8000 ? 0 : 1; - IIcon icon = item.getIconIndex(); - GL11.glEnable(3042); - GL11.glEnable(3008); - if (type.equals(ItemRenderType.ENTITY)) { - GL11.glRotated(180.0D, 0.0D, 0.0D, 1.0D); - GL11.glRotated(90.0D, 0.0D, 1.0D, 0.0D); - GL11.glTranslated(-0.5D, -0.6D, 0.0D); - } else if (type.equals(ItemRenderType.EQUIPPED_FIRST_PERSON)) { - GL11.glTranslated(1.0D, 1.0D, 0.0D); - GL11.glRotated(180.0D, 0.0D, 0.0D, 1.0D); - } else if (type.equals(ItemRenderType.EQUIPPED)) { - GL11.glRotated(180.0D, 0.0D, 0.0D, 1.0D); - GL11.glTranslated(-1.0D, -1.0D, 0.0D); - } - - FluidStack fs = cell.getFluid(item); - if (fs != null) { - IIcon iconWindow = cell.iconWindow; - IIcon fluidicon = fs.getFluid().getIcon(fs); - int fluidColor = fs.getFluid().getColor(fs); - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); - GL11.glBlendFunc(0, 1); - if (type.equals(ItemRenderType.INVENTORY)) { - DrawUtil.renderIcon(iconWindow, 16.0D, 0.0D, 0.0F, 0.0F, -1.0F); - } else { - DrawUtil.renderIcon(iconWindow, 1.0D, -0.001D, 0.0F, 0.0F, 1.0F); - DrawUtil.renderIcon(iconWindow, 1.0D, -0.0615D, 0.0F, 0.0F, -1.0F); - } - - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); - GL11.glBlendFunc(770, 771); - GL11.glDepthFunc(514); - GL11.glColor3ub((byte) (fluidColor >> 16), (byte) (fluidColor >> 8), (byte) fluidColor); - if (type.equals(ItemRenderType.INVENTORY)) { - DrawUtil.renderIcon(fluidicon, 16.0D, 0.0D, 0.0F, 0.0F, -1.0F); - } else { - DrawUtil.renderIcon(fluidicon, 1.0D, -0.001D, 0.0F, 0.0F, 1.0F); - DrawUtil.renderIcon(fluidicon, 1.0D, -0.0615D, 0.0F, 0.0F, -1.0F); - } - - GL11.glColor3ub((byte) -1, (byte) -1, (byte) -1); - GL11.glDepthFunc(515); - } - - Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); - GL11.glBlendFunc(770, 771); - if (type.equals(ItemRenderType.INVENTORY)) { - DrawUtil.renderIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); - } else { - ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625F); - } - GL11.glDisable(3008); - GL11.glDisable(3042); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java deleted file mode 100644 index 35d78008c5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java +++ /dev/null @@ -1,659 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.render; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.registry.RenderingRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity; -import gregtech.api.interfaces.tileentity.ITexturedTileEntity; -import gregtech.common.blocks.GT_Block_Machines; -import gregtech.common.render.GT_Renderer_Block; -import gtPlusPlus.xmod.gregtech.common.blocks.GTPP_Block_Machines; -import gtPlusPlus.xmod.gregtech.common.helpers.GT_MethodHelper; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.IBlockAccess; - -public class GTPP_Render_MachineBlock extends GT_Renderer_Block { - - public static GTPP_Render_MachineBlock INSTANCE; - public final int mRenderID = RenderingRegistry.getNextAvailableRenderId(); - - public GTPP_Render_MachineBlock() { - INSTANCE = this; - RenderingRegistry.registerBlockHandler(this); - } - - private static ITexture[] getTexture(IMetaTileEntity arg0, int arg1, int arg2, int arg3, boolean arg4, boolean arg5) { - IGregTechTileEntity arg0b = arg0.getBaseMetaTileEntity(); - return arg0.getTexture(arg0b, (byte) arg1, (byte) arg2, (byte) arg3, arg4, arg5); - } - - private static void renderNormalInventoryMetaTileEntity(Block aBlock, int aMeta, RenderBlocks aRenderer) { - if (aMeta > 0 && aMeta < GregTech_API.METATILEENTITIES.length) { - IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aMeta]; - if (tMetaTileEntity != null) { - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); - GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - if (tMetaTileEntity.getBaseMetaTileEntity() instanceof IPipeRenderedTileEntity) { - float tThickness = ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity()) - .getThickNess(); - float sp = (1.0F - tThickness) / 2.0F; - aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 0, 9, -1, false, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 1, 9, -1, false, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 2, 9, -1, false, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 3, 9, -1, false, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 4, 9, -1, true, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 5, 9, -1, true, false), - true); - Tessellator.instance.draw(); - } else { - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 0, 4, -1, true, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 1, 4, -1, true, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 2, 4, -1, true, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 3, 4, -1, true, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 4, 4, -1, true, false), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, - getTexture(tMetaTileEntity, 5, 4, -1, true, false), - true); - Tessellator.instance.draw(); - } - - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - } - } - - public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - RenderBlocks aRenderer) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - - return tTileEntity instanceof ITexturedTileEntity - ? renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, - new ITexture[][]{GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 0), - GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 1), - GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 2), - GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 3), - GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 4), - GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 5)}) - : false; - } - - public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - RenderBlocks aRenderer, ITexture[][] aTextures) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); - return true; - } - - public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) { - byte aConnections = aTileEntity.getConnections(); - if ((aConnections & 192) != 0) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); - } else { - float tThickness = aTileEntity.getThickNess(); - if (tThickness >= 0.99F) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); - } else { - float sp = (1.0F - tThickness) / 2.0F; - byte tConnections = 0; - - for (byte tIsCovered = 0; tIsCovered < 6; ++tIsCovered) { - if ((aConnections & 1 << tIsCovered) != 0) { - tConnections = (byte) (tConnections | 1 << (tIsCovered + 2) % 6); - } - } - - boolean[] arg14 = new boolean[6]; - - for (byte tIcons = 0; tIcons < 6; ++tIcons) { - arg14[tIcons] = aTileEntity.getCoverIDAtSide(tIcons) != 0; - } - - if (arg14[0] && arg14[1] && arg14[2] && arg14[3] && arg14[4] && arg14[5]) { - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); - } else { - ITexture[][] arg15 = new ITexture[6][]; - ITexture[][] tCovers = new ITexture[6][]; - - for (byte i = 0; i < 6; ++i) { - tCovers[i] = GT_MethodHelper.getTexture((TileEntity) aTileEntity, aBlock, i); - arg15[i] = aTileEntity.getTextureUncovered(i); - } - - if (tConnections == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - } else if (tConnections == 3) { - aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - if (!arg14[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - } - - if (!arg14[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - } - } else if (tConnections == 12) { - aBlock.setBlockBounds(sp, 0.0F, sp, sp + tThickness, 1.0F, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - if (!arg14[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - } - - if (!arg14[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - } - } else if (tConnections == 48) { - aBlock.setBlockBounds(sp, sp, 0.0F, sp + tThickness, sp + tThickness, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - if (!arg14[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - } - - if (!arg14[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - } - } else { - if ((tConnections & 1) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - } else { - aBlock.setBlockBounds(0.0F, sp, sp, sp, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - if (!arg14[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - } - } - - if ((tConnections & 2) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - } else { - aBlock.setBlockBounds(sp + tThickness, sp, sp, 1.0F, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - if (!arg14[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - } - } - - if ((tConnections & 4) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - } else { - aBlock.setBlockBounds(sp, 0.0F, sp, sp + tThickness, sp, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - if (!arg14[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - } - } - - if ((tConnections & 8) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - } else { - aBlock.setBlockBounds(sp, sp + tThickness, sp, sp + tThickness, 1.0F, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - if (!arg14[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - } - } - - if ((tConnections & 16) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - } else { - aBlock.setBlockBounds(sp, sp, 0.0F, sp + tThickness, sp + tThickness, sp); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - if (!arg14[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); - } - } - - if ((tConnections & 32) == 0) { - aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - } else { - aBlock.setBlockBounds(sp, sp, sp + tThickness, sp + tThickness, sp + tThickness, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); - if (!arg14[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); - } - } - } - - if (arg14[0]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - if (!arg14[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - - if (!arg14[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - - if (!arg14[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - - if (!arg14[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); - } - } - - if (arg14[1]) { - aBlock.setBlockBounds(0.0F, 0.875F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - if (!arg14[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - - if (!arg14[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - - if (!arg14[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - - if (!arg14[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); - } - } - - if (arg14[2]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.125F); - aRenderer.setRenderBoundsFromBlock(aBlock); - if (!arg14[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - - if (!arg14[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - if (!arg14[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - - if (!arg14[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); - } - } - - if (arg14[3]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.875F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - if (!arg14[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - - if (!arg14[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - if (!arg14[4]) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - - if (!arg14[5]) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); - } - } - - if (arg14[4]) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 0.125F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - if (!arg14[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - - if (!arg14[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - - if (!arg14[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - - if (!arg14[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); - } - - if (arg14[5]) { - aBlock.setBlockBounds(0.875F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - if (!arg14[0]) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - } - - if (!arg14[1]) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - } - - if (!arg14[2]) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - } - - if (!arg14[3]) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - } - - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); - } - - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - return true; - } - } - } - } - - public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0)) { - return; - } - - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); - } - - if (aIcon != null) { - for (int i = 0; i < aIcon.length; ++i) { - if (aIcon[i] != null) { - aIcon[i].renderYNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - - aRenderer.flipTexture = false; - } - - public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1)) { - return; - } - - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); - } - - if (aIcon != null) { - for (int i = 0; i < aIcon.length; ++i) { - if (aIcon[i] != null) { - aIcon[i].renderYPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - - aRenderer.flipTexture = false; - } - - public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2)) { - return; - } - - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); - } - - aRenderer.flipTexture = !aFullBlock; - if (aIcon != null) { - for (int i = 0; i < aIcon.length; ++i) { - if (aIcon[i] != null) { - aIcon[i].renderZNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - - aRenderer.flipTexture = false; - } - - public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3)) { - return; - } - - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); - } - - if (aIcon != null) { - for (int i = 0; i < aIcon.length; ++i) { - if (aIcon[i] != null) { - aIcon[i].renderZPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - - aRenderer.flipTexture = false; - } - - public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4)) { - return; - } - - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); - } - - if (aIcon != null) { - for (int i = 0; i < aIcon.length; ++i) { - if (aIcon[i] != null) { - aIcon[i].renderXNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - - aRenderer.flipTexture = false; - } - - public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5)) { - return; - } - - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); - } - - aRenderer.flipTexture = !aFullBlock; - if (aIcon != null) { - for (int i = 0; i < aIcon.length; ++i) { - if (aIcon[i] != null) { - aIcon[i].renderXPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - - aRenderer.flipTexture = false; - } - - public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { - aMeta += 30400; - if (aBlock instanceof GT_Block_Machines || aBlock instanceof GTPP_Block_Machines) { - if (aMeta > 0 && aMeta < GregTech_API.METATILEENTITIES.length - && GregTech_API.METATILEENTITIES[aMeta] != null - && !GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer)) { - renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); - } - } - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - } - - public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, - RenderBlocks aRenderer) { - TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return aTileEntity == null - ? false - : (aTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null - && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity().renderInWorld(aWorld, aX, aY, aZ, - aBlock, aRenderer) - ? true - : (aTileEntity instanceof IPipeRenderedTileEntity - ? renderPipeBlock(aWorld, aX, aY, aZ, aBlock, - (IPipeRenderedTileEntity) aTileEntity, aRenderer) - : renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer))); - } - - public boolean shouldRender3DInInventory(int aModel) { - return true; - } - - public int getRenderId() { - return this.mRenderID; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java b/src/Java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java deleted file mode 100644 index e53a7e4738..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java +++ /dev/null @@ -1,11 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.requirements; - -import gtPlusPlus.xmod.gregtech.api.objects.MultiblockRequirements; - -public class RequirementsBasicCubic extends MultiblockRequirements { - - public RequirementsBasicCubic( ) { - super(0, null); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java deleted file mode 100644 index 9c856840b0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java +++ /dev/null @@ -1,730 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.automation; - -import static gtPlusPlus.core.lib.CORE.*; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IDigitalChest; -import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.*; - -public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_BasicTank { - - public static int TESSERACT_ENERGY_COST_DIMENSIONAL = 512; - public static int TESSERACT_ENERGY_COST = 128; - public byte isWorking = 0; - public int oFrequency = 0; - public int mNeededEnergy = 0; - public int mFrequency = 0; - public UUID mOwner; - - public GT_MetaTileEntity_TesseractGenerator(final int aID, final String aName, final String aNameRegional, - final int aTier) { - super(aID, aName, aNameRegional, aTier, 3, ""); - } - - public GT_MetaTileEntity_TesseractGenerator(final String aName, final int aTier, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_TesseractGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public boolean isTransformerUpgradable() { - return true; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return true; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isEnetOutput() { - return false; - } - - @Override - public boolean isInputFacing(final byte aSide) { - return true; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getBackFacing(); - } - - @Override - public boolean isValidSlot(final int aIndex) { - return false; - } - - @Override - public long getMinimumStoredEU() { - return this.getBaseMetaTileEntity().getEUCapacity() / 2; - } - - @Override - public long maxEUInput() { - return 512; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxEUStore() { - return 512 * 32; - } - - @Override - public long maxSteamStore() { - return this.maxEUStore(); - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public boolean ownerControl() { - return true; - } - - @Override - public int getProgresstime() { - return (TesseractHelper.getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), - this.mFrequency) == this) && (this.isWorking >= 20) ? 999 : 0; - } - - @Override - public int maxProgresstime() { - return 1000; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mFrequency", this.mFrequency); - if (mOwner != null) - aNBT.setString("mOwner", mOwner.toString()); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mFrequency = aNBT.getInteger("mFrequency"); - try { - this.mOwner = UUID.fromString(aNBT.getString("mOnwer")); - } - catch (IllegalArgumentException i){ - - } - } - - @Override - public void onConfigLoad(final GT_Config aConfig) { - int J = 1; - if (CORE.GTNH) { - J = 4; - } - TESSERACT_ENERGY_COST = 128*J; - TESSERACT_ENERGY_COST_DIMENSIONAL = 512*J; - } - - @Override - public void onServerStart() { - sTesseractGeneratorOwnershipMap.clear(); - sTesseractTerminalOwnershipMap.clear(); - } - - public void onServerStop() { - sTesseractGeneratorOwnershipMap.clear(); - sTesseractTerminalOwnershipMap.clear(); - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer, - final byte aSide, final float aX, final float aY, final float aZ) { - - if (this.mOwner == null) { - if (this.getBaseMetaTileEntity().getOwnerName() != null - && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { - if (this.getBaseMetaTileEntity().getOwnerName().toLowerCase() - .equals(aPlayer.getDisplayName().toLowerCase())) { - this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - } - } - } - - if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { - if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { - final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); - switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { - case 0: - Logger.WARNING("Freq. -1 | " + this.mFrequency); - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency -= 1; - - break; - case 1: - Logger.WARNING("Freq. +1 | " + this.mFrequency); - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency += 1; - default: - // Utils.LOG_WARNING("Did not click the correct place."); - break; - } - if (getGeneratorEntity(this.mFrequency) != null && getGeneratorEntity(this.mFrequency) != this){ - GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)"); - } - else { - GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency); - } - } else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0){ - GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Generator to configure."); - } - } - - return true; - } - - @Override - public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, - final float aZ) { - if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { - if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { - final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); - switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { - case 0: - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency -= 64; - break; - case 1: - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency += 64; - break; - case 2: - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency -= 512; - break; - case 3: - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency += 512; - } - if (getGeneratorEntity(this.mFrequency) != null && getGeneratorEntity(this.mFrequency) != this){ - GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)"); - } - else { - GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency); - } - } - } else { - GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Generator to configure."); - } - } - - public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public String[] getInfoData() { - final TileEntity tTileEntity = this.getBaseMetaTileEntity() - .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((tTileEntity instanceof IGregTechDeviceInformation)) - && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { - return ((IGregTechDeviceInformation) tTileEntity).getInfoData(); - } - return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, - (getGeneratorEntity() == this) && (this.isWorking >= 20) ? "Active" : "Inactive" }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - public boolean isSendingInformation() { - final TileEntity tTileEntity = this.getBaseMetaTileEntity() - .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((tTileEntity instanceof IGregTechDeviceInformation))) { - return ((IGregTechDeviceInformation) tTileEntity).isGivingInformation(); - } - return false; - } - - @Override - public boolean isDigitalChest() { - final TileEntity tTileEntity = this.getBaseMetaTileEntity() - .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((tTileEntity instanceof IDigitalChest))) { - return ((IDigitalChest) tTileEntity).isDigitalChest(); - } - return false; - } - - @Override - public ItemStack[] getStoredItemData() { - final TileEntity tTileEntity = this.getBaseMetaTileEntity() - .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((tTileEntity instanceof IDigitalChest))) { - return ((IDigitalChest) tTileEntity).getStoredItemData(); - } - return new ItemStack[] {}; - } - - @Override - public void setItemCount(final int aCount) { - final TileEntity tTileEntity = this.getBaseMetaTileEntity() - .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((tTileEntity instanceof IDigitalChest))) { - ((IDigitalChest) tTileEntity).setItemCount(aCount); - } - } - - @Override - public int getMaxItemCount() { - final TileEntity tTileEntity = this.getBaseMetaTileEntity() - .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((tTileEntity instanceof IDigitalChest))) { - return ((IDigitalChest) tTileEntity).getMaxItemCount(); - } - return 0; - } - - @Override - public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.isItemValidForSlot(aIndex, aStack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int aSide) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return new int[0]; - } - if ((tTileEntity instanceof ISidedInventory)) { - return ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(aSide); - } - final int[] rArray = new int[this.getSizeInventory()]; - for (int i = 0; i < this.getSizeInventory(); i++) { - rArray[i] = i; - } - return rArray; - } - - @Override - public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - if ((tTileEntity instanceof ISidedInventory)) { - return ((ISidedInventory) tTileEntity).canInsertItem(aIndex, aStack, aSide); - } - return true; - } - - @Override - public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - if ((tTileEntity instanceof ISidedInventory)) { - return ((ISidedInventory) tTileEntity).canExtractItem(aIndex, aStack, aSide); - } - return true; - } - - @Override - public int getSizeInventory() { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int aIndex) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.getStackInSlot(aIndex); - } - - @Override - public void setInventorySlotContents(final int aIndex, final ItemStack aStack) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return; - } - tTileEntity.setInventorySlotContents(aIndex, aStack); - } - - @Override - public ItemStack decrStackSize(final int aIndex, final int aAmount) { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.decrStackSize(aIndex, aAmount); - } - - @Override - public String getInventoryName() { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return ""; - } - return tTileEntity.getInventoryName(); - } - - @Override - public int getInventoryStackLimit() { - final IInventory tTileEntity = this.getBaseMetaTileEntity() - .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.getInventoryStackLimit(); - } - - @Override - public boolean canFill(final ForgeDirection aSide, final Fluid aFluid) { - final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() - .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.canFill(aSide, aFluid); - } - - @Override - public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid) { - final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() - .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.canDrain(aSide, aFluid); - } - - @Override - public FluidTankInfo[] getTankInfo(final ForgeDirection aSide) { - final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() - .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return new FluidTankInfo[0]; - } - return tTileEntity.getTankInfo(aSide); - } - - @Override - public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill) { - final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() - .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.fill(aDirection, aFluid, doFill); - } - - @Override - public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain) { - final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() - .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.drain(aDirection, maxDrain, doDrain); - } - - @Override - public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) { - final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() - .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.drain(aSide, aFluid, doDrain); - } - - public boolean addEnergyConsumption(final GT_MetaTileEntity_TesseractTerminal aTerminal) { - if (!this.getBaseMetaTileEntity().isAllowedToWork()) { - return false; - } - int J = (aTerminal.getBaseMetaTileEntity().getWorld() == this.getBaseMetaTileEntity().getWorld() - ? TESSERACT_ENERGY_COST : TESSERACT_ENERGY_COST_DIMENSIONAL); - - if (CORE.GTNH) { - J *= 4; - } - - this.mNeededEnergy += J; - - return true; - } - - public boolean isValidTesseractGenerator(final String aOwnerName, final boolean aWorkIrrelevant) { - return (this.getBaseMetaTileEntity() != null) && (!this.getBaseMetaTileEntity().isInvalidTileEntity()) - && (this.getBaseMetaTileEntity().isAllowedToWork()) - && ((aOwnerName == null) || (this.getBaseMetaTileEntity().getOwnerName().equals(aOwnerName))) - && ((aWorkIrrelevant) || (this.isWorking >= 20)); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - // TODO Auto-generated method stub - super.onPreTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - //Utils.LOG_WARNING("Ticking Generator. 0"); - if (this.getBaseMetaTileEntity().isServerSide()) { - //Utils.LOG_WARNING("Ticking Generator."); - // Set owner - if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) { - if (this.mOwner == null) { - Logger.WARNING("Setting Generators Owner. 1"); - this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - } - } - - if (this.mFrequency != this.oFrequency) { - - Logger.WARNING("mFreq != oFreq"); - - if (getGeneratorEntity() == this) { - getGeneratorEntity(this.oFrequency); - this.getBaseMetaTileEntity().issueBlockUpdate(); - Logger.WARNING("this Gen == oFreq on map - do block update"); - } - Logger.WARNING("mFreq will be set to oFreq"); - this.oFrequency = this.mFrequency; - } - if ((this.getBaseMetaTileEntity().isAllowedToWork()) - && (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mNeededEnergy, false))) { - //Utils.LOG_WARNING("Can Work & Has Energy"); - if ((getGeneratorEntity(Integer.valueOf(this.mFrequency)) == null) - || (!getGeneratorEntity(Integer.valueOf(this.mFrequency)).isValidTesseractGenerator(null, - true))) { - //Utils.LOG_WARNING("storing TE I think to mFreq map?"); - TesseractHelper.setGeneratorOwnershipByPlayer(PlayerUtils.getPlayerOnServerFromUUID(mOwner), - this.mFrequency, this); - } - } else { - if (getGeneratorEntity(Integer.valueOf(this.mFrequency)) == this) { - Logger.WARNING("this gen == mFreq on map - do block update"); - TesseractHelper.removeGenerator(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency); - this.getBaseMetaTileEntity().issueBlockUpdate(); - } - this.isWorking = 0; - } - if (getGeneratorEntity(Integer.valueOf(this.mFrequency)) == this) { - //Utils.LOG_WARNING("mFreq == this - do work related things"); - if (this.isWorking < 20) { - this.isWorking = ((byte) (this.isWorking + 1)); - } - if (this.isWorking == 20) { - this.getBaseMetaTileEntity().issueBlockUpdate(); - this.isWorking = ((byte) (this.isWorking + 1)); - } - } else { - this.isWorking = 0; - } - this.mNeededEnergy = 0; - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public String[] getDescription() { - return new String[] { this.mDescription, - "Generates a Tesseract for the attached Inventory", - "Connect with pipes to insert items", - "Consumes "+TESSERACT_ENERGY_COST+"EU/t for same dimension transfers", - "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers", - CORE.GT_Tooltip}; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return false; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - return new ITexture[0][0][0]; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return aSide == aFacing - ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } - : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GT_RenderedTexture(Textures.BlockIcons.VOID) }; - } - - // To-Do? - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean canTankBeFilled() { - return false; - } - - @Override - public boolean canTankBeEmptied() { - return false; - } - - @Override - public boolean displaysItemStack() { - return false; - } - - @Override - public boolean displaysStackSize() { - return false; - } - - private GT_MetaTileEntity_TesseractGenerator getGeneratorEntity() { - GT_MetaTileEntity_TesseractGenerator thisGenerator = TesseractHelper - .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency); - if (thisGenerator != null) { - return thisGenerator; - } - return null; - } - - private GT_MetaTileEntity_TesseractGenerator getGeneratorEntity(int frequency) { - GT_MetaTileEntity_TesseractGenerator thisGenerator = TesseractHelper - .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), frequency); - if (thisGenerator != null) { - return thisGenerator; - } - return null; - } - - @Override - public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - if (this.getBaseMetaTileEntity().getOwnerName() != null - && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { - this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - Logger.WARNING("Setting Generators Owner. 2"); - } - super.onCreated(aStack, aWorld, aPlayer); - } - - @Override - public void onRemoval() { - try { - CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - super.onRemoval(); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java deleted file mode 100644 index 088a596410..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java +++ /dev/null @@ -1,581 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.automation; - -import java.util.UUID; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; - -public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_BasicTank { - public int mFrequency = 0; - public UUID mOwner; - public boolean mDidWork = false; - public static boolean sInterDimensionalTesseractAllowed = true; - private static int TESSERACT_ENERGY_COST = 128; - private static int TESSERACT_ENERGY_COST_DIMENSIONAL = 512; - - public GT_MetaTileEntity_TesseractTerminal(final int aID, final String aName, final String aNameRegional, - final int aTier) { - super(aID, aName, aNameRegional, aTier, 3, ""); - } - - public GT_MetaTileEntity_TesseractTerminal(final String aName, final int aTier, final String aDescription, - final ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_TesseractTerminal(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return true; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getBackFacing(); - } - - @Override - public boolean isValidSlot(final int aIndex) { - return false; - } - - @Override - public long getMinimumStoredEU() { - return (this.getBaseMetaTileEntity().getEUCapacity() / 100); - } - - @Override - public long maxEUInput() { - return TESSERACT_ENERGY_COST_DIMENSIONAL; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public long maxEUStore() { - return TESSERACT_ENERGY_COST_DIMENSIONAL * 8 * 32; - } - - @Override - public long maxSteamStore() { - return this.maxEUStore(); - } - - @Override - public boolean ownerControl() { - return true; - } - - @Override - public int getProgresstime() { - return this.getTesseract(this.mFrequency, false) != null ? 999 : 0; - } - - @Override - public int maxProgresstime() { - return 1000; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mFrequency", this.mFrequency); - aNBT.setString("mOwner", mOwner.toString()); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mFrequency = aNBT.getInteger("mFrequency"); - this.mOwner = UUID.fromString(aNBT.getString("mOnwer")); - } - - @Override - public void onConfigLoad(final GT_Config aConfig) { - sInterDimensionalTesseractAllowed = true; - if (CORE.GTNH) { - TESSERACT_ENERGY_COST = 512; - TESSERACT_ENERGY_COST_DIMENSIONAL = 2048; - } - else { - TESSERACT_ENERGY_COST = 128; - TESSERACT_ENERGY_COST_DIMENSIONAL = 512; - } - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer, - final byte aSide, final float aX, final float aY, final float aZ) { - - if (this.mOwner == null) { - if (this.getBaseMetaTileEntity().getOwnerName() != null - && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { - if (this.getBaseMetaTileEntity().getOwnerName().toLowerCase() - .equals(aPlayer.getDisplayName().toLowerCase())) { - this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - } - } - } - - if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { - if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { - final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); - switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { - case 0: - //Utils.LOG_WARNING("Freq. -1 | " + this.mFrequency); - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency -= 1; - break; - case 1: - //Utils.LOG_WARNING("Freq. +1 | " + this.mFrequency); - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency += 1; - default: - // Utils.LOG_WARNING("Did not click the correct place."); - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - break; - } - PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency); - if (this.getTesseract(this.mFrequency, false) != null) { - PlayerUtils.messagePlayer(aPlayer, - new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()); - } - } - } else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0){ - GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Terminal to configure."); - } - return true; - } - - @Override - public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, - final float aZ) { - if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { - if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { - final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); - switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { - case 0: - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency -= 64; - break; - case 1: - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency += 64; - break; - case 2: - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency -= 512; - break; - case 3: - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - this.mFrequency += 512; - } - GT_Utility.sendChatToPlayer(aPlayer, - "Frequency: " + this.mFrequency - + (this.getTesseract(this.mFrequency, false) == null ? "" - : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)") - .toString())); - } - } else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0){ - GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Terminal to configure."); - } - } - - public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - public GT_MetaTileEntity_TesseractGenerator getTesseract(final int aFrequency, final boolean aWorkIrrelevant) { - final GT_MetaTileEntity_TesseractGenerator rTesseract = TesseractHelper - .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), aFrequency); - if (rTesseract == null) { - return null; - } - if (!TesseractHelper.isGeneratorOwnedByPlayer(PlayerUtils.getPlayerOnServerFromUUID(mOwner), rTesseract)) { - return null; - } - if (rTesseract.mFrequency != aFrequency) { - TesseractHelper.setTerminalOwnershipByPlayer(PlayerUtils.getPlayerOnServerFromUUID(mOwner), - Integer.valueOf(aFrequency), null); - return null; - } - if (!rTesseract.isValidTesseractGenerator(this.getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) { - return null; - } - if ((!sInterDimensionalTesseractAllowed) - && (rTesseract.getBaseMetaTileEntity().getWorld() != this.getBaseMetaTileEntity().getWorld())) { - return null; - } - return rTesseract; - } - - @Override - public String[] getInfoData() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) - && (tTileEntity.isSendingInformation())) { - return tTileEntity.getInfoData(); - } - return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, - this.getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive" }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean isDigitalChest() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.isDigitalChest(); - } - - @Override - public ItemStack[] getStoredItemData() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.getStoredItemData(); - } - - @Override - public void setItemCount(final int aCount) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return; - } - tTileEntity.setItemCount(aCount); - } - - @Override - public int getMaxItemCount() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.getMaxItemCount(); - } - - @Override - public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.isItemValidForSlot(aIndex, aStack); - } - - @Override - public int[] getAccessibleSlotsFromSide(final int aSide) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return new int[0]; - } - return tTileEntity.getAccessibleSlotsFromSide(aSide); - } - - @Override - public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.canInsertItem(aIndex, aStack, aSide); - } - - @Override - public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.canExtractItem(aIndex, aStack, aSide); - } - - @Override - public int getSizeInventory() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.getSizeInventory(); - } - - @Override - public ItemStack getStackInSlot(final int aIndex) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.getStackInSlot(aIndex); - } - - @Override - public void setInventorySlotContents(final int aIndex, final ItemStack aStack) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return; - } - tTileEntity.setInventorySlotContents(aIndex, aStack); - } - - @Override - public ItemStack decrStackSize(final int aIndex, final int aAmount) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.decrStackSize(aIndex, aAmount); - } - - @Override - public String getInventoryName() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return ""; - } - return tTileEntity.getInventoryName(); - } - - @Override - public int getInventoryStackLimit() { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.getInventoryStackLimit(); - } - - @Override - public boolean canFill(final ForgeDirection aSide, final Fluid aFluid) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.canFill(aSide, aFluid); - } - - @Override - public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return false; - } - return tTileEntity.canDrain(aSide, aFluid); - } - - @Override - public FluidTankInfo[] getTankInfo(final ForgeDirection aSide) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return new FluidTankInfo[0]; - } - return tTileEntity.getTankInfo(aSide); - } - - @Override - public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return 0; - } - return tTileEntity.fill(aDirection, aFluid, doFill); - } - - @Override - public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.drain(aDirection, maxDrain, doDrain); - } - - @Override - public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) { - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); - if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { - return null; - } - return tTileEntity.drain(aSide, aFluid, doDrain); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((this.getBaseMetaTileEntity().isServerSide()) && (this.getBaseMetaTileEntity().isAllowedToWork())) { - // Set owner - if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) { - if (this.mOwner == null) { - this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - } - } - final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, true); - if (tTileEntity != null) { - tTileEntity.addEnergyConsumption(this); - if ((!this.mDidWork) && (this.getTesseract(this.mFrequency, false) != null)) { - this.mDidWork = true; - this.getBaseMetaTileEntity().issueBlockUpdate(); - this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(128, false); - } - } else if (this.mDidWork == true) { - this.mDidWork = false; - this.getBaseMetaTileEntity().issueBlockUpdate(); - } - } - } - - @Override - public String[] getDescription() { - return new String[] { this.mDescription, - "Accesses Tesseract Generators remotely", - "Connect with pipes to extract items or fluids", - "Outputs from the back face", - "Consumes "+TESSERACT_ENERGY_COST+"EU/t for same dimension transfers", - "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers", - CORE.GT_Tooltip}; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return false; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - return new ITexture[0][0][0]; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return aSide == aFacing - ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } - : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GT_RenderedTexture(Textures.BlockIcons.VOID) }; - } - - // To-Do? - @Override - public boolean doesFillContainers() { - return false; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean canTankBeFilled() { - return false; - } - - @Override - public boolean canTankBeEmptied() { - return false; - } - - @Override - public boolean displaysItemStack() { - return false; - } - - @Override - public boolean displaysStackSize() { - return false; - } - - @Override - public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - if (this.getBaseMetaTileEntity().getOwnerName() != null - && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { - this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - } - super.onCreated(aStack, aWorld, aPlayer); - } - - @Override - public void onRemoval() { - try { - CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); - } catch (Throwable t) { - } - super.onRemoval(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java deleted file mode 100644 index 4173489be6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java +++ /dev/null @@ -1,296 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_AdvancedBoiler; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_AdvancedBoiler; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntityFurnace; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidTankInfo; - -public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { - - private final int steamPerSecond; - private final int tier; - - public GT_MetaTileEntity_Boiler_Base(int aID, String aNameRegional, int tier) { - super(aID, "electricboiler." + tier + ".tier.single", aNameRegional, - "Produces " + (CORE.ConfigSwitches.boilerSteamPerSecond * tier) + "L of Steam per second"); - this.steamPerSecond = (CORE.ConfigSwitches.boilerSteamPerSecond * tier); - this.tier = tier; - } - - public GT_MetaTileEntity_Boiler_Base(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - this.steamPerSecond = (CORE.ConfigSwitches.boilerSteamPerSecond * aTier); - this.tier = aTier; - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - "Produces " + getPollution() + " pollution/sec", - "Consumes fuel only when temperature is less than 100C", - "Fuel with burn time greater than 500 is more efficient.", - "Doesn't explode if there's no water", - CORE.GT_Tooltip - }; - } - - public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - protected GT_RenderedTexture getCasingTexture() { - if (this.tier == 1) { - return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_LV_SIDE); - } else if (this.tier == 2) { - return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_MV_SIDE); - } else { - return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); - } - // return new - // GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 - : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex - + 1]; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], - this.getCasingTexture() }; - } - - public ITexture[] getBack(final byte aColor) { - return this.getSides(aColor); - } - - public ITexture[] getBottom(final byte aColor) { - return this.getSides(aColor); - } - - public ITexture[] getTop(final byte aColor) { - return this.getSides(aColor); - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], - this.getCasingTexture() }; - } - - public ITexture[] getFrontActive(final byte aColor) { - return this.getFront(aColor); - } - - public ITexture[] getBackActive(final byte aColor) { - return this.getSides(aColor); - } - - public ITexture[] getBottomActive(final byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(final byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(final byte aColor) { - return this.getSides(aColor); - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public boolean isFacingValid(final byte aSide) { - return aSide > 1; - } - - // Please find out what I do. - // I do stuff within the GUI. - // this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); - @Override - public int maxProgresstime() { - return 1000 + (250 * tier); - } - - @Override - public boolean isElectric() { - return false; - } - - @Override - public int getCapacity() { - return (16000 + (16000 * tier)); - } - - // This type of machine can have different water and steam capacities. - public int getSteamCapacity() { - return 2 * getCapacity(); - } - - @Override - protected int getProductionPerSecond() { - return steamPerSecond; - } - - @Override - protected int getMaxTemperature() { - return maxProgresstime(); - } - - @Override - protected int getEnergyConsumption() { - return 2; - } - - @Override - protected int getCooldownInterval() { - return 40; - } - - @Override - protected int getHeatUpRate() { - return 10; - } - - @Override - protected void updateFuel(IGregTechTileEntity tile, long ticks) { - ItemStack fuelStack = this.mInventory[2]; - if(fuelStack == null) return; - - int burnTime = getBurnTime(fuelStack); - if (burnTime > 0 && this.mTemperature <= 101) { - consumeFuel(tile, fuelStack, burnTime); - } - } - - @Override - protected void produceSteam(int aAmount) { - super.produceSteam(aAmount); - - if(mSteam.amount > getSteamCapacity()) { - sendSound(SOUND_EVENT_LET_OFF_EXCESS_STEAM); - - mSteam.amount = getSteamCapacity(); - } - } - - @Override - // Since this type of machine can have different water and steam capacities, we need to override getTankInfo() to - // support returning those different capacities. - public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - return new FluidTankInfo[]{ - new FluidTankInfo(this.mFluid, getCapacity()), - new FluidTankInfo(this.mSteam, getSteamCapacity()) - }; - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 1 || aIndex == 3; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 2; - } - - @Override - protected int getPollution() { - return (int) (CORE.ConfigSwitches.basePollutionPerSecondBoiler*CORE.ConfigSwitches.pollutionReleasedByTierBoiler[this.tier]); - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity, "AdvancedBoiler.png"); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Base(this.mName, tier, this.mDescription, this.mTextures); - } - - @Override - protected void onDangerousWaterLack(IGregTechTileEntity tile, long ticks) { - // Smart boilers don't explode! - } - - /** - * Returns burn time if the stack is a valid fuel, otherwise return 0. - */ - private static int getBurnTime(ItemStack stack) { - int burnTime = GameRegistry.getFuelValue(stack); - if (burnTime <= 0) { - burnTime = TileEntityFurnace.getItemBurnTime(stack); - } - - return burnTime; - } - - public void consumeFuel(IGregTechTileEntity tile, ItemStack fuel, int burnTime) { - this.mProcessingEnergy += burnTime / 10; - this.mTemperature += burnTime / 500; // will add bonus temperature points if the burn time is pretty high - - tile.decrStackSize(2, 1); - if (tile.getRandomNumber(3) == 0) { - if (fuel.getDisplayName().toLowerCase().contains("charcoal") - || fuel.getDisplayName().toLowerCase().contains("coke")) { - tile.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); - } else { - tile.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } - } - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { - if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { - return true; - } - return super.allowCoverOnSide(aSide, aCover); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java deleted file mode 100644 index dfbd254897..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Boiler_HV - extends GT_MetaTileEntity_Boiler_Base { - - public GT_MetaTileEntity_Boiler_HV(int aID, String aNameRegional, int aBoilerTier) { - super(aID, aNameRegional, aBoilerTier); - } - - public GT_MetaTileEntity_Boiler_HV(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_HV(this.mName, 3, this.mDescription, this.mTextures); - } - - - @Override - protected GT_RenderedTexture getCasingTexture(){ - return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); - } - - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Talonite)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return getTop(aColor); - } - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java deleted file mode 100644 index e2b9046c68..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Boiler_LV -extends GT_MetaTileEntity_Boiler_Base { - - public GT_MetaTileEntity_Boiler_LV(int aID, String aNameRegional, int aBoilerTier) { - super(aID, aNameRegional, aBoilerTier); - } - - public GT_MetaTileEntity_Boiler_LV(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_LV(this.mName, 1, this.mDescription, this.mTextures); - } - - - @Override - protected GT_RenderedTexture getCasingTexture(){ - return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_LV_SIDE); - } - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Potin)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return getTop(aColor); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java deleted file mode 100644 index 7ef781da17..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_Boiler_MV -extends GT_MetaTileEntity_Boiler_Base { - - public GT_MetaTileEntity_Boiler_MV(int aID, String aNameRegional, int aBoilerTier) { - super(aID, aNameRegional, aBoilerTier); - } - - public GT_MetaTileEntity_Boiler_MV(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_MV(this.mName, 2, this.mDescription, this.mTextures); - } - - @Override - protected GT_RenderedTexture getCasingTexture(){ - return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_MV_SIDE); - } - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Tumbaga)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return getTop(aColor); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java deleted file mode 100644 index f9cf904cc2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java +++ /dev/null @@ -1,194 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_AdvancedBoiler; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_AdvancedBoiler; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.common.gui.GT_Container_Boiler; -import gregtech.common.gui.GT_GUIContainer_Boiler; -import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler; - -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -public class GT_MetaTileEntity_Boiler_Solar -extends GT_MetaTileEntity_Boiler { - public GT_MetaTileEntity_Boiler_Solar(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional, "Steam Power by the Sun"); - } - - public GT_MetaTileEntity_Boiler_Solar(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - "Produces "+(this.getPollution()*20)+" pollution/sec", - CORE.GT_Tooltip}; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[4][17][]; - for (byte i = -1; i < 16; i = (byte) (i + 1)) { - final ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[0][(i + 1)] = tmp0; - final ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)}; - rTextures[1][(i + 1)] = tmp1; - final ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; - rTextures[2][(i + 1)] = tmp2; - final ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; - rTextures[3][(i + 1)] = tmp3; - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1]; - } - - @Override - public int maxProgresstime() { - return 500; - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png"); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - private int mRunTime = 0; - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setInteger("mRunTime", this.mRunTime); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - this.mRunTime = aNBT.getInteger("mRunTime"); - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { - if (this.mTemperature <= 20) { - this.mTemperature = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 45) { - this.mTemperature -= 1; - this.mLossTimer = 0; - } - if (this.mSteam != null) { - final byte i = aBaseMetaTileEntity.getFrontFacing(); - final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) { - final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) { - final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - if ((aTick % 25L) == 0L) { - if (this.mTemperature > 100) { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { - this.mHadNoWater = true; - } else { - if (this.mHadNoWater) { - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= 1; - this.mRunTime += 1; - int tOutput = 150; - if(this.mRunTime > 10000){ - tOutput = Math.max(50, 150 - ((this.mRunTime-10000)/100)); - } - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(tOutput); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += tOutput; - } else { - this.mSteam = GT_ModHandler.getSteam(tOutput); - } - } - } else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > 16000)) { - this.sendSound((byte) 1); - this.mSteam.amount = 12000; - } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { - final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); - this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; - } - if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) { - this.mProcessingEnergy -= 1; - this.mTemperature += 1; - } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); - } - } - - @Override - protected int getPollution() { - return 0; - } - - @Override - protected int getProductionPerSecond() { - return 0; - } - - @Override - protected int getMaxTemperature() { - return 0; - } - - @Override - protected int getEnergyConsumption() { - return 0; - } - - @Override - protected int getCooldownInterval() { - return 0; - } - - @Override - protected void updateFuel(IGregTechTileEntity iGregTechTileEntity, long l) { - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java deleted file mode 100644 index c6f368f0c0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java +++ /dev/null @@ -1,348 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import static gregtech.api.enums.GT_Values.V; - -import cofh.api.energy.IEnergyConnection; -import cofh.api.energy.IEnergyHandler; -import cofh.api.energy.IEnergyProvider; -import cofh.api.energy.IEnergyReceiver; -import cofh.api.energy.IEnergyStorage; -import crazypants.enderio.machine.capbank.TileCapBank; -import crazypants.enderio.machine.capbank.network.ICapBankNetwork; -import crazypants.enderio.power.IPowerContainer; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.ForgeDirection; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - * - * This is the main construct for my Basic Machines such as the Automatic Extractor - * Extend this class to make a simple Machine - */ -public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer implements IEnergyReceiver { - - - public GT_MetaTileEntity_RfConvertor(final String aName, final int aTier, - final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aDescription, aTextures, aSlotCount); - } - - public GT_MetaTileEntity_RfConvertor(final int aID, final String aName, - final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); - } - - @Override - public String[] getDescription() { - return new String[] { - "Use Screwdriver to change voltage", - "Hold Shift while using Screwdriver to change amperage", - EnumChatFormatting.DARK_AQUA+"Variable Output Voltage", - CORE.GT_Tooltip}; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[12][17][]; - GT_RenderedTexture aTex = new GT_RenderedTexture(TexturesGtBlock.Casing_Material_ZirconiumCarbide); - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; - rTextures[1][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; - rTextures[2][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; - rTextures[3][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; - rTextures[4][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; - rTextures[5][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; - rTextures[6][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]}; - rTextures[7][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]}; - rTextures[8][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]}; - rTextures[9][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; - rTextures[10][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; - rTextures[11][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; - } - return rTextures; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aActive ? 0 : 6)][aColorIndex + 1]; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_RfConvertor(this.mName, this.mTier, this.mDescription, - this.mTextures, this.mInventory.length); - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public long maxEUStore() { - return Integer.MAX_VALUE; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return V[this.mTier]; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public boolean isEnetOutput() { - return true; - } - - @Override - public boolean isInputFacing(byte aSide) { - return !isOutputFacing(aSide); - } - - @Override - public boolean isOutputFacing(byte aSide) { - return aSide == getBaseMetaTileEntity().getFrontFacing(); - } - - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (!aBaseMetaTileEntity.isActive()) { - aBaseMetaTileEntity.setActive(true); - } - if (this.getEUVar() < this.maxEUStore()) { - for (byte i = 0; i < 6 && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity(); i++) { - if (isInputFacing(i)) { - receiveEnergy(ForgeDirection.getOrientation(i), Integer.MAX_VALUE, false); - } - } - } - return; - } - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public String[] getInfoData() { - String[] infoData = super.getInfoData(); - return new String[] { - infoData[0], - "Converts RF -> GTEU | Tier: "+this.mTier, - infoData[1], - infoData[2] - }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setByte("mTier", this.mTier); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - this.mTier = aNBT.getByte("mTier"); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aPlayer.isSneaking()) { - byte aTest = (byte) (aCurrentOutputAmperage + 1); - if (aTest > 16 || aTest <= 0 ) { - aTest = 1; - } - aCurrentOutputAmperage = aTest; - PlayerUtils.messagePlayer(aPlayer, "Now handling "+maxAmperesOut()+" Amps."); - } - else { - if (this.mTier < (CORE.GTNH ? GT_Values.V.length : 9)) { - this.mTier++; - } - else { - this.mTier = 0; - } - PlayerUtils.messagePlayer(aPlayer, "Now running at "+GT_Values.VOLTAGE_NAMES[this.mTier]+"."); - } - - } - - @Override - public boolean canConnectEnergy(ForgeDirection from) { - if (isOutputFacing((byte) from.ordinal())) { - return false; - } - return true; - } - - @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) { - - // Cannot accept power on the output face. - if (!canConnectEnergy(from) || isOutputFacing((byte) from.ordinal())) { - return 0; - } - - TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide((byte) from.ordinal()); - if (tTileEntity == null) { - return 0; - } - - Logger.WARNING("Someone is trying to inject RF from "+from+". Type:"+tTileEntity.getClass().getName()); - - // Calculate maximum RF we need to consume - int aInputRF = MathUtils.safeInt(this.maxEUOutput() * GregTech_API.mEUtoRF / 100); - - // Make sure we only consume the correct amount of RF that is pushed into this Tile. - if (aInputRF > maxReceive) { - aInputRF = maxReceive; - } - - int aInjectedRF = 0; - boolean aVal = false; - - long aStoredEU = this.getEUVar(); - long aMaxEU = this.maxEUStore(); - Logger.WARNING("Stored: "+aStoredEU+", Capacity: "+aMaxEU+""); - if (aStoredEU < aMaxEU) { - Logger.WARNING("StoredEU < MaxEU"); - long aRemainingSpace = aMaxEU - aStoredEU; - if (aRemainingSpace > 0) { - long tEU = 0; - byte aSide = (byte) from.ordinal(); - Logger.WARNING("Free: "+aRemainingSpace+"EU"); - if (tTileEntity instanceof IEnergyProvider && ((IEnergyProvider) tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)), 1, true) == 1) { - tEU = (long) ((IEnergyProvider) tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)), (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU, false); - Logger.WARNING("Drained from IEnergyProvider Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); - tEU = tEU * GregTech_API.mRFtoEU / 100; - } - else if (tTileEntity instanceof IEnergyStorage && ((IEnergyStorage) tTileEntity).extractEnergy(1, true) == 1) { - tEU = (long) ((IEnergyStorage) tTileEntity).extractEnergy((int) maxEUOutput() * 100 / GregTech_API.mRFtoEU, false); - Logger.WARNING("Drained from IEnergyStorage Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); - tEU = tEU * GregTech_API.mRFtoEU / 100; - } - else if (GregTech_API.meIOLoaded && tTileEntity instanceof IPowerContainer && ((IPowerContainer) tTileEntity).getEnergyStored() > 0) { - int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored(); - int extractRF = (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU; - tEU = 0; - if (tTileEntity instanceof TileCapBank) { - ICapBankNetwork network = ((TileCapBank) tTileEntity).getNetwork(); - if (network != null && network.getEnergyStoredL() > 0) { - tEU = Math.min((Math.min(Math.min(network.getEnergyStoredL(), storedRF - extractRF), network.getMaxOutput())) * GregTech_API.mRFtoEU / 100, maxEUOutput()); - Logger.WARNING("Drained from EIO CapBank Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); - network.addEnergy((int) -(tEU * 100 / GregTech_API.mRFtoEU)); - } - } else { - if (storedRF > extractRF) { - ((IPowerContainer) tTileEntity).setEnergyStored(storedRF - extractRF); - tEU = maxEUOutput(); - Logger.WARNING("Drained from EIO Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); - } else { - ((IPowerContainer) tTileEntity).setEnergyStored(0); - tEU = storedRF * GregTech_API.mRFtoEU / 100; - Logger.WARNING("Drained from EIO Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); - } - } - } - Logger.WARNING("EU to inject: "+tEU+"EU"); - if (!simulate) { - aVal = this.getBaseMetaTileEntity().increaseStoredEnergyUnits(tEU, true); - } - if (tEU > 0) { - Logger.WARNING("Tried injecting "+tEU+" eu into self. Success? "+aVal); - } - } - } - return aInjectedRF; - } - - @Override - public int getEnergyStored(ForgeDirection from) { - long aStoredEU = this.getEUVar(); - long aMaxEU = this.maxEUStore(); - if (aStoredEU == 0) { - return 0; - } - if (aStoredEU < aMaxEU) { - long aRemainingSpace = aMaxEU - aStoredEU; - if (aRemainingSpace > 0) { - if (aRemainingSpace > (this.maxEUOutput() / (GregTech_API.mEUtoRF / 100))) { - int aCalculatedFreeSpace = 0; - int aRfPer10Eu = GregTech_API.mEUtoRF / 10; - // Calculate how many lots of '10 - aCalculatedFreeSpace = (int) Math.floor(aRemainingSpace / 10); - // Return value equal to how many lots of '10eu' packets we can fit in. - return Integer.MAX_VALUE - MathUtils.balance(aCalculatedFreeSpace * aRfPer10Eu, 0, Integer.MAX_VALUE); - } - } - } - return Integer.MAX_VALUE; - } - - @Override - public int getMaxEnergyStored(ForgeDirection from) { - return Integer.MAX_VALUE; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java deleted file mode 100644 index d1628bdb59..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java +++ /dev/null @@ -1,171 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import net.minecraft.item.ItemStack; - -public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_BasicGenerator { - - public int mEfficiency; - - /*public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - onConfigLoad(); - }*/ - - public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, - "Requires semi-fluid Fuel", - new ITexture[0]); - onConfigLoad(); - } - - public GT_MetaTileEntity_SemiFluidGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - onConfigLoad(); - } - - public int getPollution() { - return (int) (CORE.ConfigSwitches.basePollutionPerSecondSemiFluidGenerator * CORE.ConfigSwitches.pollutionReleasedByTierSemiFluidGenerator[this.mTier]); - } - - @Override - public int getCapacity() { - return 4000 * this.mTier; - } - - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, - "SemiFluidGenerator.efficiency.tier." + this.mTier, 100 - (this.mTier * 5)); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SemiFluidGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipes() { - //Logger.WARNING("Fuel Count: "+Gregtech_Recipe_Map.sSemiFluidLiquidFuels.mRecipeList.size()); - return GTPP_Recipe_Map.sSemiFluidLiquidFuels; - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - "Produces "+(this.getPollution())+" pollution/sec", - "Fuel Efficiency: "+this.getEfficiency() + "%", - CORE.GT_Tooltip}; - } - - @Override - public int getEfficiency() { - return this.mEfficiency; - } - - @Override - public boolean isOutputFacing(byte aSide) { - return (aSide == getBaseMetaTileEntity().getFrontFacing()); - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { - if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { - return true; - } - return super.allowCoverOnSide(aSide, aCover); - } - - @Override - public int getFuelValue(ItemStack aStack) { - if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) { - Logger.WARNING("Bad Fuel?"); - return 0; - } - int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); - if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { - rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); - } - Logger.WARNING("Good Fuel: "+rValue); - return rValue; - } - - @Override - public ITexture[] getFront(byte aColor) { - return new ITexture[] { super.getFront(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), - Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; - } - - @Override - public ITexture[] getBack(byte aColor) { - return new ITexture[] { super.getBack(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; - } - - @Override - public ITexture[] getBottom(byte aColor) { - return new ITexture[] { super.getBottom(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; - } - - @Override - public ITexture[] getTop(byte aColor) { - return new ITexture[] { super.getTop(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) }; - } - - @Override - public ITexture[] getSides(byte aColor) { - return new ITexture[] { super.getSides(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; - } - - @Override - public ITexture[] getFrontActive(byte aColor) { - return new ITexture[] { super.getFrontActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), - Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; - } - - @Override - public ITexture[] getBackActive(byte aColor) { - return new ITexture[] { super.getBackActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; - } - - @Override - public ITexture[] getBottomActive(byte aColor) { - return new ITexture[] { super.getBottomActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; - } - - @Override - public ITexture[] getTopActive(byte aColor) { - return new ITexture[] { super.getTopActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) }; - } - - @Override - public ITexture[] getSidesActive(byte aColor) { - return new ITexture[] { super.getSidesActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java deleted file mode 100644 index 2a0133245e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java +++ /dev/null @@ -1,153 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.item.ItemStack; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaTileEntityDoubleFuelGeneratorBase -extends GregtechRocketFuelGeneratorBase { - - public int mEfficiency; - - public GregtechMetaTileEntityDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires two liquid Fuels. Fuel A is Fastburn, Fuel B is slowburn.", new ITexture[0]); - this.onConfigLoad(); - } - - public GregtechMetaTileEntityDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - this.onConfigLoad(); - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, - "Generates power at " + this.getEfficiency() + "% Efficiency per tick", - "Output Voltage: "+this.getOutputTier()+" EU/t", - CORE.GT_Tooltip - }; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntityDoubleFuelGeneratorBase(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipes() { - return GT_Recipe.GT_Recipe_Map.sDieselFuels; - } - - @Override - public int getCapacity() { - return 32000; - } - - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - (this.mTier * 8))); - } - - @Override - public int getEfficiency() { - return this.mEfficiency; - } - - @Override - public int getFuelValue(final ItemStack aStack) { - int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack)); - if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { - rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); - } - return rValue; - } - - private GT_RenderedTexture getCasingTexture(){ - if (this.mTier <= 4){ - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); - } - else if (this.mTier == 5){ - - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); - } - else { - - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); - } - //return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); - } - - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)}; - } - - @Override - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)}; - } - - @Override - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)}; - } - - @Override - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)}; - } - - @Override - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)}; - } - - @Override - public int getPollution() { - return 250; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java deleted file mode 100644 index a392ae5a58..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java +++ /dev/null @@ -1,151 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaTileEntityGeothermalGenerator -extends GT_MetaTileEntity_BasicGenerator -{ - - public int mEfficiency; - - public GregtechMetaTileEntityGeothermalGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires Pahoehoe Lava or Normal Lava as Fuel", new ITexture[0]); - this.onConfigLoad(); - } - - public GregtechMetaTileEntityGeothermalGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - this.onConfigLoad(); - } - - @Override - public String[] getDescription() { - String aPollution = "Causes "+this.getPollution()+ " Pollution per second"; - return new String[]{ - this.mDescription, - "Generates power at " + this.getEfficiency() + "% Efficiency per tick", - aPollution, - CORE.GT_Tooltip}; - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()){ - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public int getCapacity() { - //return MathUtils.roundToClosestMultiple(32000*(this.mTier/2), 25000); - return 5000*this.mTier; - } - - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "ThermalGenerator.efficiency.tier." + this.mTier, (100 - (this.mTier * 7))); - } - - @Override - public int getEfficiency() { - return this.mEfficiency; - } - - @Override - public int getFuelValue(final ItemStack aStack) { - int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack)); - if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { - rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); - } - return rValue; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntityGeothermalGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical)}; - } - - @Override - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)}; - } - - @Override - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active)}; - } - - @Override - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)}; - } - - @Override - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)}; - } - - @Override - public GT_Recipe_Map getRecipes() - { - return GT_Recipe_Map.sHotFuels; - } - - public int getPollution() { - return (int) (CORE.ConfigSwitches.basePollutionPerSecondGeothermalGenerator * CORE.ConfigSwitches.pollutionReleasedByTierGeothermalGenerator[mTier]); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java deleted file mode 100644 index c05c7ae3ff..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java +++ /dev/null @@ -1,142 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -public class GregtechMetaTileEntityRocketFuelGenerator -extends GregtechRocketFuelGeneratorBase { - - public int mEfficiency; - - public GregtechMetaTileEntityRocketFuelGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires GT++ Rocket Fuels", new ITexture[0]); - this.onConfigLoad(); - } - - public GregtechMetaTileEntityRocketFuelGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - this.onConfigLoad(); - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - //Logger.INFO("Valid Fuels: "+Recipe_GT.Gregtech_Recipe_Map.sRocketFuels.mRecipeList.size()); - return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipes() { - return GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels; - } - - @Override - public int getCapacity() { - return 32000; - } - - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, 80 - (10 * (this.mTier - 4))); - } - - @Override - public int getEfficiency() { - int eff = 80 - (10 * (this.mTier - 4)); - return eff; - - } - - @Override - public int getFuelValue(final ItemStack aStack) { - int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack)); - if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { - rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); - } - return rValue; - } - - private GT_RenderedTexture getCasingTexture(){ - if (this.mTier <= 4){ - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); - } - else if (this.mTier == 5){ - - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); - } - else{ - - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); - } - //return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); - } - - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)}; - } - - @Override - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)}; - } - - @Override - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)}; - } - - @Override - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)}; - } - - @Override - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java deleted file mode 100644 index 68dbc4fb61..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java +++ /dev/null @@ -1,187 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import static gregtech.api.enums.GT_Values.V; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SolarGenerator; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_SolarGenerator; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaSolarGenerator; - -public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGenerator { - - public GregtechMetaTileEntitySolarGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, "Feasts on the power of the Sun!", new ITexture[0]); - this.onConfigLoad(); - } - - public GregtechMetaTileEntitySolarGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - this.onConfigLoad(); - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, - "Generates power at " + this.getEfficiency() + "% Efficiency per tick", - "Output Voltage: "+this.getOutputTier()+" EU/t", - CORE.GT_Tooltip - }; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png"); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntitySolarGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SunAbsorber.efficiency.tier." + this.mTier, 100 - (this.mTier * 10)); - - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() - && (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) { - - if (this.mSolarCharge <= 20) { - //Utils.LOG_WARNING("1."); - this.mSolarCharge = 20; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 45) { - //Utils.LOG_WARNING("2."); - this.mSolarCharge -= 1; - this.mLossTimer = 0; - } - - if ((aTick % 10L) == 0L) { - - Logger.WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())); - - if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) && - (!aBaseMetaTileEntity.getWorld().isThundering()) && - (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUStore() - this.getMinimumStoredEU()))) { - this.getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * this.getEfficiency(), true); - } - } - - if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && ((aTick % 32L) == 0L)) { - Logger.WARNING("Adding Solar Charge. Currently "+this.mSolarCharge); - this.mProcessingEnergy -= 1; - this.mSolarCharge += 1; - } - - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 64L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { - Logger.WARNING("Adding Processing Energy. Currently "+this.mProcessingEnergy); - final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); - this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; - } - - if (aBaseMetaTileEntity.isServerSide()){ - //Utils.LOG_WARNING("6."); - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); - } - } - } - - @Override - public void inValidate() { - - } - - @Override - public int getEfficiency() { - return this.mEfficiency; - } - - @Override - public long maxEUStore() { - return Math.max(this.getEUVar(), (V[this.mTier] * 16000) + this.getMinimumStoredEU()); - } - - - ITexture SolarArray[] = {new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; - - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT), - Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - @Override - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; - } - - @Override - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; - } - - @Override - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; - } - - @Override - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; - } - - @Override - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE), - Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; - } - - @Override - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; - } - - @Override - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; - } - - @Override - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; - } - - @Override - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java deleted file mode 100644 index ab000b98d4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java +++ /dev/null @@ -1,390 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators; - -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator { - public int mEfficiency; - private int mDays; - private long mTicksToBurnFor; - private int mVoltage = 0; - private GT_Recipe mCurrentRecipe; - private int mDaysRemaining = 0; - private int mDayTick = 0; - private byte mNewTier = 0; - - public int removeDayOfTime(){ - if (this.mDaysRemaining > 0){ - return this.mDaysRemaining--; - } - return this.mDaysRemaining; - } - - //Generates fuel value based on MC days - public static int convertDaysToTicks(float days){ - int value = 0; - value = MathUtils.roundToClosestInt(20*86400*days); - return value; - } - - public static long getTotalEUGenerated(int ticks, int voltage){ - return ticks*voltage; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setLong("mTicksToBurnFor", this.mTicksToBurnFor); - aNBT.setInteger("mVoltage", this.mVoltage); - aNBT.setInteger("mDaysRemaining", this.mDaysRemaining); - aNBT.setInteger("mDayTick", this.mDayTick); - aNBT.setByte("mNewTier", this.mNewTier); - - - if (this.mCurrentRecipe != null){ - final NBTTagList list = new NBTTagList(); - final ItemStack stack = this.mCurrentRecipe.mInputs[0]; - if(stack != null){ - final NBTTagCompound data = new NBTTagCompound(); - stack.writeToNBT(data); - data.setInteger("mSlot", 0); - list.appendTag(data); - } - aNBT.setTag("mRecipeItem", list); - } - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - //this.mMachineBlock = aNBT.getByte("mMachineBlock"); - this.mTicksToBurnFor = aNBT.getLong("mTicksToBurnFor"); - this.mVoltage = aNBT.getInteger("mVoltage"); - this.mDaysRemaining = aNBT.getInteger("mDaysRemaining"); - this.mDayTick = aNBT.getInteger("mDayTick"); - this.mNewTier = aNBT.getByte("mNewTier"); - - try { - ReflectionUtils.setByte(this, "mTier", this.mNewTier); - } - catch (Exception e) { - if (this.getBaseMetaTileEntity() != null){ - IGregTechTileEntity thisTile = this.getBaseMetaTileEntity(); - if (thisTile.isAllowedToWork() || thisTile.isActive()){ - thisTile.setActive(false); - } - } - } - - - final NBTTagList list = aNBT.getTagList("mRecipeItem", 10); - final NBTTagCompound data = list.getCompoundTagAt(0); - ItemStack lastUsedFuel = ItemStack.loadItemStackFromNBT(data); - if (lastUsedFuel != null){ - this.mCurrentRecipe = getRecipes().findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, new ItemStack[] { lastUsedFuel }); - } - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()){ - if (this.mDayTick < 24000){ - this.mDayTick++; - } - else if (this.mDayTick >= 24000){ - this.mDayTick = 0; - this.mDaysRemaining = this.removeDayOfTime(); - } - } - - - if ((aBaseMetaTileEntity.isServerSide()) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 10L == 0L)) { - long tProducedEU = 0L; - if (this.mFluid == null) { - if (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + getMinimumStoredEU()) { - this.mInventory[getStackDisplaySlot()] = null; - } else { - if (this.mInventory[getStackDisplaySlot()] == null) - this.mInventory[getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); - this.mInventory[getStackDisplaySlot()].setStackDisplayName("Generating: " - + (aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + " EU"); - } - } else { - int tFuelValue = getFuelValue(this.mFluid); - int tConsumed = consumedFluidPerOperation(this.mFluid); - if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount > tConsumed)) { - long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, - (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); - if ((tFluidAmountToUse > 0L) - && (aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true))) { - tProducedEU = tFluidAmountToUse * tFuelValue; - FluidStack tmp260_257 = this.mFluid; - tmp260_257.amount = (int) (tmp260_257.amount - (tFluidAmountToUse * tConsumed)); - } - } - } - if ((this.mInventory[getInputSlot()] != null) - && (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() * 20L + getMinimumStoredEU()) - && (GT_Utility.getFluidForFilledItem(this.mInventory[getInputSlot()], true) == null)) { - int tFuelValue = getFuelValue(this.mInventory[getInputSlot()]); - if (tFuelValue > 0) { - ItemStack tEmptyContainer = getEmptyContainer(this.mInventory[getInputSlot()]); - if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); - aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - tProducedEU = tFuelValue; - } - } - } - if ((tProducedEU > 0L) && (getPollution() > 0)) { - PollutionUtils.addPollution(aBaseMetaTileEntity, (int) (tProducedEU * getPollution() / 500 * this.mTier + 1L)); - } - } - - if (aBaseMetaTileEntity.isServerSide()) - aBaseMetaTileEntity.setActive((aBaseMetaTileEntity.isAllowedToWork()) - && (aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU())); - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, - "Fuel is measured in minecraft days (Check with Scanner)", - "RTG changes output voltage depending on fuel", - "Generates power at " + this.getEfficiency() + "% Efficiency per tick", - "Output Voltage: "+this.getOutputTier()+" EU/t", - CORE.GT_Tooltip - }; - } - - public GregtechMetaTileEntity_RTG(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires RTG Pellets", new ITexture[0]); - } - - private byte getTier(){ - int voltage = this.mVoltage; - if (voltage >= 512){ - return 4; - } - else if (voltage >= 128){ - return 3; - } - else if (voltage >= 32){ - return 2; - } - else if (voltage >= 8){ - return 1; - } - return 0; - } - - public GregtechMetaTileEntity_RTG(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public boolean isOutputFacing(byte aSide) { - return ((aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) - && (aSide != getBaseMetaTileEntity().getBackFacing())); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_RTG(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipes() { - return GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels; - } - - @Override - public int getCapacity() { - return 0; - } - - @Override - public int getEfficiency() { - return this.mEfficiency = 100; - } - - @Override - public ITexture[] getFront(byte aColor) { - return new ITexture[] { super.getFront(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB) }; - } - - @Override - public ITexture[] getBack(byte aColor) { - return new ITexture[] { super.getBack(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; - } - - @Override - public ITexture[] getBottom(byte aColor) { - return new ITexture[] { super.getBottom(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; - } - - @Override - public ITexture[] getTop(byte aColor) { - return new ITexture[] { super.getTop(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; - } - - @Override - public ITexture[] getSides(byte aColor) { - return new ITexture[]{ - gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()]}; - } - - @Override - public ITexture[] getFrontActive(byte aColor) { - return new ITexture[] { super.getFrontActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE) }; - } - - @Override - public ITexture[] getBackActive(byte aColor) { - return new ITexture[] { super.getBackActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; - } - - @Override - public ITexture[] getBottomActive(byte aColor) { - return new ITexture[] { super.getBottomActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; - } - - @Override - public ITexture[] getTopActive(byte aColor) { - return new ITexture[] { super.getTopActive(aColor)[0], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; - } - - @Override - public ITexture[] getSidesActive(byte aColor) { - return new ITexture[]{ - gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)], - new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()]}; - } - - - public int getPollution() { - return 0; - } - - @Override - public int getFuelValue(ItemStack aStack) { - if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) - return 0; - GT_Recipe tFuel = getRecipes().findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, - new ItemStack[] { aStack }); - if (tFuel != null){ - this.mCurrentRecipe = tFuel; - int voltage = tFuel.mEUt; - this.mVoltage = voltage; - int sfsf = this.mTier; - //this.mDaysRemaining = tFuel.mSpecialValue*365; - - //Do some voodoo. - byte mTier2; - //mTier2 = ReflectionUtils.getField(this.getClass(), "mTier"); - try { - if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_AM241.get(1))){ - mTier2 = 1; - } - else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PO210.get(1))){ - mTier2 = 3; - } - else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PU238.get(1))){ - mTier2 = 2; - } - else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_SR90.get(1))){ - mTier2 = 1; - } - else { - //Utils.LOG_INFO("test:"+tFuel.mInputs[0].getDisplayName() + " | " + (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PU238.get(1)))); - mTier2 = 0; - } - ReflectionUtils.setByte(this, "mTier", mTier2); - this.mNewTier = mTier2; - //ReflectionUtils.setFinalStatic(mTier2, GT_Values.V[0]); - } catch (Exception e) { - Logger.WARNING("Failed setting mTier."); - e.printStackTrace(); - } - - this.mTicksToBurnFor = getTotalEUGenerated(convertDaysToTicks(tFuel.mSpecialValue), voltage); - if (mTicksToBurnFor >= Integer.MAX_VALUE){ - mTicksToBurnFor = Integer.MAX_VALUE; - Logger.WARNING("Fuel went over Int limit, setting to MAX_VALUE."); - } - this.mDaysRemaining = MathUtils.roundToClosestInt(mTicksToBurnFor/20/60/3); - Logger.WARNING("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L)); - return (int) (mTicksToBurnFor * getEfficiency() / 100L); - //return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L); - //return tFuel.mEUt; - } - Logger.WARNING("Not sure"); - return 0; - } - - @Override - public long maxEUOutput() { - return ((getBaseMetaTileEntity().isAllowedToWork()) ? this.mVoltage : 0L); - } - - @Override - public long getOutputTier() { - if (this.mCurrentRecipe != null){ - return this.mVoltage = this.mCurrentRecipe.mEUt; - } - return 0; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public String[] getInfoData() { - return new String[] { "RTG - Running at tier "+this.mTier, - "Active: "+this.getBaseMetaTileEntity().isActive(), "Current Output: " + this.mVoltage + " EU/t", - "Days of Fuel remaining: "+(mTicksToBurnFor/20/60/20), - "Hours of Fuel remaining: "+(mTicksToBurnFor/20/60/60), - "Ticks of "+this.mVoltage+"v remaining: "+(mTicksToBurnFor), - "Current Recipe input: "+ this.mCurrentRecipe != null ? this.mCurrentRecipe.mInputs[0].getDisplayName() + " x1" : "NUll" - }; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java deleted file mode 100644 index 58919f0954..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV; - -import static gregtech.api.enums.GT_Values.V; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.common.tileentities.generators.GT_MetaTileEntity_DieselGenerator; -import gtPlusPlus.core.lib.CORE; - -public class GT_MetaTileEntity_ULV_CombustionGenerator extends GT_MetaTileEntity_DieselGenerator { - public GT_MetaTileEntity_ULV_CombustionGenerator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_ULV_CombustionGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - "Produces "+(this.getPollution()*20)+" pollution/sec", - "Fuel Efficiency: "+this.getEfficiency() + "%", - CORE.GT_Tooltip}; - } - - @Override - public long maxEUStore() { - return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU()); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ULV_CombustionGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public int getCapacity() { - return 16000; - } - - @Override - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, 95); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java deleted file mode 100644 index 17bb4463c4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV; - -import static gregtech.api.enums.GT_Values.V; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.common.tileentities.generators.GT_MetaTileEntity_GasTurbine; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbine { - public GT_MetaTileEntity_ULV_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_ULV_GasTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - "Produces "+(this.getPollution()*20)+" pollution/sec", - "Fuel Efficiency: "+this.getEfficiency() + "%", - CORE.GT_Tooltip}; - } - - @Override - public long maxEUStore() { - return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU()); - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ULV_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public int getCapacity() { - return 16000; - } - - @Override - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, 95); - } - - @Override - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], - new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active)}; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java deleted file mode 100644 index ef3310c6fc..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV; - -import static gregtech.api.enums.GT_Values.V; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.common.tileentities.generators.GT_MetaTileEntity_SteamTurbine; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamTurbine { - public GT_MetaTileEntity_ULV_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_ULV_SteamTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - "Produces "+(this.getPollution()*20)+" pollution/sec", - "Fuel Efficiency: "+this.getEfficiency() + "%", - CORE.GT_Tooltip}; - } - - @Override - public long maxEUStore() { - return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU()); - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ULV_SteamTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public int getCapacity() { - return 16000; - } - - @Override - public void onConfigLoad() { - this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + 1); - } - - @Override - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{super.getSidesActive(aColor)[0], - new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active)}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java deleted file mode 100644 index a62a5d16c8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java +++ /dev/null @@ -1,229 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative; - -import static gregtech.api.enums.GT_Values.V; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - * - * This is the main construct for my Basic Machines such as the Automatic Extractor - * Extend this class to make a simple Machine - */ -public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer { - - - public GregtechMetaCreativeEnergyBuffer(final String aName, final int aTier, - final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aDescription, aTextures, aSlotCount); - // TODO Auto-generated constructor stub - } - - public GregtechMetaCreativeEnergyBuffer(final int aID, final String aName, - final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, - "Use Screwdriver to change voltage", - "Hold Shift while using Screwdriver to change amperage", - EnumChatFormatting.GREEN+"CREATIVE MACHINE", - CORE.GT_Tooltip}; - } - - /* - * MACHINE_STEEL_SIDE - */ - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - CustomIcon h = TexturesGtBlock.Casing_Material_RedSteel; - CustomIcon g = TexturesGtBlock.Casing_Material_Grisium; - CustomIcon k; - boolean j = MathUtils.isNumberEven(this.mTier); - final ITexture[][][] rTextures = new ITexture[2][17][]; - k = j ? g : h; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture(k) }; - rTextures[1][i + 1] = new ITexture[] { - new GT_RenderedTexture(k), this.mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] - : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, - final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, - final boolean aRedstone) { - return this.mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1]; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaCreativeEnergyBuffer(this.mName, this.mTier, this.mDescription, - this.mTextures, this.mInventory.length); - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public long maxEUStore() { - return Long.MAX_VALUE; - } - - @Override - public long maxEUInput() { - return V[this.mTier]; - } - - @Override - public long maxEUOutput() { - return V[this.mTier]; - } - - @Override - public long maxAmperesIn() { - return 16; - } - - @Override - public long maxAmperesOut() { - return 16; - } - - @Override public int getProgresstime() {return Integer.MAX_VALUE;} - @Override public int maxProgresstime() {return Integer.MAX_VALUE;} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - this.getBaseMetaTileEntity().increaseStoredEnergyUnits(Integer.MAX_VALUE, true); - if (aBaseMetaTileEntity.isServerSide()) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(Integer.MAX_VALUE, true); - } - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public String[] getInfoData() { - String[] infoData = super.getInfoData(); - return new String[] { - infoData[0], - "THIS IS A CREATIVE ITEM - FOR TESTING | Tier: "+this.mTier, - infoData[1], - infoData[2] - }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setByte("mTier", this.mTier); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - this.mTier = aNBT.getByte("mTier"); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (KeyboardUtils.isShiftKeyDown()) { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - else { - if (this.mTier < (CORE.GTNH ? GT_Values.V.length-1 : 9)) { - this.mTier++; - } - else { - this.mTier = 0; - } - this.markDirty(); - try { - Field field = ReflectionUtils.getField(this.getClass(), "mTextures"); - field.setAccessible(true); - Field modifiersField = Field.class.getDeclaredField("modifiers"); - modifiersField.setAccessible(true); - modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); - ITexture[][][] V = getTextureSet(null); - if (V != null) { - Logger.REFLECTION("Got Valid Textures."); - if (this.getBaseMetaTileEntity().isClientSide()) { - Logger.REFLECTION("Clientside Call."); - Logger.REFLECTION("Refreshing Textures on buffer."); - field.set(this, V); - Logger.REFLECTION("Refreshed Textures on buffer."); - } - else { - Logger.REFLECTION("Serverside Call."); - } - } - else { - Logger.REFLECTION("Bad mTextures setter."); - } - } - catch (Throwable t) { - //Bad refresh. - t.printStackTrace(); - Logger.REFLECTION("Bad mTextures setter."); - } - PlayerUtils.messagePlayer(aPlayer, "Now running at "+GT_Values.VOLTAGE_NAMES[this.mTier]+"."); - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java deleted file mode 100644 index 129446c40d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java +++ /dev/null @@ -1,328 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons.CustomIcon; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import net.minecraftforge.common.util.ForgeDirection; - -public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_TieredMachineBlock { - - public static String[] BlacklistedTileEntiyClassNames; - - private byte mMode = 0; // 0: RandomTicks around 1: TileEntities with range - // 1 - private static CustomIcon _mGTIco_Norm_Idle; - private static CustomIcon _mGTIco_Norm_Active; - private static CustomIcon _mGTIco_TE_Idle; - private static CustomIcon _mGTIco_TE_Active; - private static int[] mAccelerateStatic = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, 512, 512, 512, 512, 512 }; - - @Override - public void registerIcons(IIconRegister aBlockIconRegister) { - super.registerIcons(aBlockIconRegister); - _mGTIco_Norm_Idle = new CustomIcon("iconsets/OVERLAY_ACCELERATOR"); - _mGTIco_Norm_Active = new CustomIcon("iconsets/OVERLAY_ACCELERATOR_ACTIVE"); - _mGTIco_TE_Idle = new CustomIcon("iconsets/OVERLAY_ACCELERATOR_TE"); - _mGTIco_TE_Active = new CustomIcon("iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE"); - } - - @SideOnly(Side.CLIENT) - @Override - public void onValueUpdate(byte aValue) { - mMode = aValue; - } - - @Override - public byte getUpdateData() { - return mMode; - } - - public GT_MetaTileEntity_WorldAccelerator(int pID, String pName, String pNameRegional, int pTier) { - super(pID, pName, pNameRegional, pTier, 0, ""); - } - - @Override - public String[] getDescription() { - return new String[] { - String.format("Accelerating things (Radius: %d EU/t: %d Speed Bonus: x%d)", mTier, - getEnergyDemand(mTier, false), mAccelerateStatic[mTier]), - "Use a screwdriver to change mode", "To accelerate TileEntities, this machine has to be adjacent to it", - "This machine accepts up to 8 Amps", "Accelerating TileEntities doubles Energy-Demand"}; - - } - - public GT_MetaTileEntity_WorldAccelerator(String pName, int pTier, int pInvSlotCount, String pDescription, - ITexture[][][] pTextures) { - super(pName, pTier, pInvSlotCount, pDescription, pTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity pTileEntity) { - return new GT_MetaTileEntity_WorldAccelerator(mName, mTier, mInventory.length, mDescription, mTextures); - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] pTextures) { - return new ITexture[0][0][0]; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity pBaseMetaTileEntity, byte pSide, byte pFacing, byte pColorIndex, - boolean pActive, boolean pRedstone) { - if (mMode == 0) - return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1], - (pSide < 2) ? null - : pActive ? new GT_RenderedTexture(_mGTIco_Norm_Active) - : new GT_RenderedTexture(_mGTIco_Norm_Idle) }; - else - return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1], (pSide < 2) ? null - : pActive ? new GT_RenderedTexture(_mGTIco_TE_Active) : new GT_RenderedTexture(_mGTIco_TE_Idle) }; - } - - @Override - public boolean allowPullStack(IGregTechTileEntity pBaseMetaTileEntity, int pIndex, byte pSide, ItemStack pStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity pBaseMetaTileEntity, int pIndex, byte pSide, ItemStack pStack) { - return false; - } - - @Override - public void saveNBTData(NBTTagCompound pNBT) { - pNBT.setByte("mAccelMode", mMode); - } - - public static long getEnergyDemand(int pTier, boolean pIsAcceleratingTEs) { - return V[pTier] * (pIsAcceleratingTEs ? 6 : 3); - } - - @Override - public void loadNBTData(NBTTagCompound pNBT) { - mMode = pNBT.getByte("mAccelMode"); - } - - @Override - public boolean isAccessAllowed(EntityPlayer pPlayer) { - return true; - } - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isInputFacing(byte aSide) { - return true; - } - - @Override - public boolean isTeleporterCompatible() { - return false; - } - - @Override - public long getMinimumStoredEU() { - return 512; - } - - @Override - public long maxEUStore() { - return 512 + V[mTier] * 50; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public long maxAmperesIn() { - return 8; - } - - private static String[] mModeStr = { "Blocks", "TileEntities" }; - - @Override - public void onScrewdriverRightClick(byte pSide, EntityPlayer pPlayer, float pX, float pY, float pZ) { - mMode = (byte) (mMode == 0x00 ? 0x01 : 0x00); - markDirty(); - PlayerUtils.messagePlayer(pPlayer, String.format("Switched mode to: %s", mModeStr[mMode])); - } - - @Override - public void onPostTick(IGregTechTileEntity pBaseMetaTileEntity, long pTick) { - try { - if (!pBaseMetaTileEntity.isServerSide()) - return; - - long tEnergyDemand = getEnergyDemand(mTier, (mMode == 1)); - - // Do we have enough energy to run? Or are we not allowed to run? - if (pBaseMetaTileEntity.getStoredEU() < tEnergyDemand || !pBaseMetaTileEntity.isAllowedToWork()) { - // Check if machine was active before - if (pBaseMetaTileEntity.isActive()) - pBaseMetaTileEntity.setActive(false); // Then disable it now - } else { - // Continue to drain power - if (pBaseMetaTileEntity.decreaseStoredEnergyUnits(tEnergyDemand, false)) { - World tWorld = pBaseMetaTileEntity.getWorld(); - // Limit the random ticks to once per second - if (mMode == 0) { - if (pTick % 20 == 0) - doAccelerateNormalBlocks(pBaseMetaTileEntity, tWorld); - } else - doAccelerateTileEntities(pBaseMetaTileEntity, tWorld); - - } else { - // Energy drain failed. Disable machine - if (pBaseMetaTileEntity.isActive()) - pBaseMetaTileEntity.setActive(false); - } - } - } catch (Exception e) { - Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash"); - Logger.ERROR(e.getMessage()); - } - } - - private void doAccelerateTileEntities(IGregTechTileEntity pBaseMetaTileEntity, World pWorld) { - try { - if (!pBaseMetaTileEntity.isActive()) - getBaseMetaTileEntity().setActive(true); - - for (ForgeDirection tDir : ForgeDirection.VALID_DIRECTIONS) { - TileEntity tTile = pBaseMetaTileEntity.getTileEntityAtSide((byte) tDir.ordinal()); - if (isTEBlackListed(tTile)) - continue; - - long tMaxTime = System.nanoTime() + 1000000; - for (int j = 0; j < mAccelerateStatic[mTier]; j++) { - tTile.updateEntity(); - if (System.nanoTime() > tMaxTime) - break; - } - } - } catch (Exception e) { - Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash"); - Logger.ERROR(e.getMessage()); - } - } - - private static List _mBlacklistedTileEntities = new ArrayList(); - - // Inspired by ChromatiCraft's TileAccelerator - private boolean isTEBlackListed(TileEntity pTile) { - if (pTile == null) - return true; // Obvious - if (!pTile.canUpdate()) - return true; // Skip if TE can't update at all - if (pTile.isInvalid()) - return true; // Obvious - - String tSimpleClassName = pTile.getClass().getSimpleName().toLowerCase(); - String tCanonicalName = pTile.getClass().getCanonicalName().toLowerCase(); - if (tSimpleClassName.contains("conduit") || tSimpleClassName.contains("wire") - || tSimpleClassName.contains("cable")) - return true; - if (tCanonicalName.contains("appeng") || tCanonicalName.contains("gregtech")) - // Don't accelerate ANY Gregtech machines! - return true; - for (String tS : BlacklistedTileEntiyClassNames) { - if (tCanonicalName.equalsIgnoreCase(tS)) - return true; - } - - return false; - } - - /** - * Accelerate normal blocks. Eats some power and adds randomTicks to every - * block within its working area (Tier-Number = radius) This does only - * affect blocks that implement the "RandomTick" method; Which is mostly - * used for grass growth and plants. - * - * @param pBaseMetaTileEntity - */ - private void doAccelerateNormalBlocks(IGregTechTileEntity pBaseMetaTileEntity, World pWorld) { - if (!pBaseMetaTileEntity.isActive()) - getBaseMetaTileEntity().setActive(true); - - Random rnd = new Random(); - int tX = pBaseMetaTileEntity.getXCoord(); - int tY = pBaseMetaTileEntity.getYCoord(); - int tZ = pBaseMetaTileEntity.getZCoord(); - - int tX1 = tX - mTier; - int tX2 = tX + mTier; - int tY1 = Math.max(tY - mTier, 0); // Limit to bedrock - int tY2 = Math.min(tY + mTier, 255); // Limit to build height - int tZ1 = tZ - mTier; - int tZ2 = tZ + mTier; - - for (int xi = tX1; xi <= tX2; xi++) - for (int yi = tY1; yi <= tY2; yi++) - for (int zi = tZ1; zi <= tZ2; zi++) - tryTickBlock(pWorld, xi, yi, zi, rnd); - - } - - /** - * Send a tick to the target block - * - * @param pWorld - * @param pX - * @param pY - * @param pZ - * @param pRnd - */ - private void tryTickBlock(World pWorld, int pX, int pY, int pZ, Random pRnd) { - try { - for (int j = 0; j < mTier; j++) { - Block tBlock = pWorld.getBlock(pX, pY, pZ); - if (tBlock.getTickRandomly()) - tBlock.updateTick(pWorld, pX, pY, pZ, pRnd); - } - } catch (Exception e) { - Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash"); - Logger.ERROR(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java deleted file mode 100644 index eb01823151..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java +++ /dev/null @@ -1,789 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import static gregtech.api.enums.GT_Values.V; -import static gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils.mPollution; - -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.item.general.ItemAirFilter; -import gtPlusPlus.core.item.general.ItemBasicScrubberTurbine; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.gui.basic.CONTAINER_PollutionCleaner; -import gtPlusPlus.xmod.gregtech.api.gui.basic.GUI_PollutionCleaner; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_BasicMachine { - - public int mPollutionReduction = 0; - protected int mBaseEff = 2500; - protected int mOptimalAirFlow = 0; - protected boolean mHasPollution = false; - protected int SLOT_ROTOR = 4; - protected int SLOT_FILTER = 5; - protected static boolean mPollutionEnabled = true; - - protected boolean mSaveRotor = false; - - public GregtechMetaAtmosphericReconditioner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 2, "Making sure you don't live in Gwalior - Uses 2A", 2, 0, "Recycler.png", "", - new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), - new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active), - new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB) - }); - mPollutionEnabled = PollutionUtils.mPollution(); - } - - public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName); - mPollutionEnabled = PollutionUtils.mPollution(); - } - - /*public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName); - }*/ - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaAtmosphericReconditioner(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); - } - - @Override - public String[] getDescription() { - - boolean highTier = this.mTier >= 7; - - String[] A = new String[]{ - this.mDescription, - highTier ? "Will attempt to remove 1/4 pollution from 8 surrounding chunks" : "", - highTier ? "If these chunks are not loaded, they will be ignored" : "", - "Requires a turbine rotor and an Air Filter [T1/T2] to run.", - "The turbine rotor must be manually inserted/replaced", - "Can be configured with a soldering iron to change modes", - "Low Efficiency: Removes half pollution, Turbine takes 50% dmg", - "High Efficiency: Removes full pollution, Turbine takes 100% dmg", - "Turbine Rotor will not break in LE mode", - "Insert an equal tier Conveyor Module to enable automation" - }; - if (!mPollutionEnabled) { - String[] B = new String[] { - "===============================================", - "Pollution is disabled, scrubbers will now have a bonus use", - "They are now able to remove ALL lingering pollution as GT ignores it", - "and it will linger forever!", - "===============================================", - }; - A = ArrayUtils.addAll(A, B); - } - return A; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setInteger("mOptimalAirFlow", this.mOptimalAirFlow); - aNBT.setBoolean("mSaveRotor", mSaveRotor); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - this.mOptimalAirFlow = aNBT.getInteger("mOptimalAirFlow"); - this.mSaveRotor = aNBT.getBoolean("mSaveRotor"); - } - - @Override - public long maxAmperesIn() { - return 2; - } - - @Override - public long getMinimumStoredEU() { - return V[mTier] * 2; - } - - @Override - public long maxEUStore() { - return V[mTier] * 256; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { - - //Get Current Pollution Amount. - int mCurrentPollution = getCurrentChunkPollution(); - boolean isIdle = true; - - //Get Inventory Item - ItemStack stackRotor = this.mInventory[SLOT_ROTOR]; - ItemStack stackFilter = this.mInventory[SLOT_FILTER]; - - //Power Drain - long drainEU = maxEUInput() * maxAmperesIn(); - if (aBaseMetaTileEntity.isActive() && aBaseMetaTileEntity.getStoredEU() >= drainEU){ - if(aBaseMetaTileEntity.decreaseStoredEnergyUnits(drainEU, false)){ - isIdle = false; - } - else { - aBaseMetaTileEntity.setActive(false); - this.sendSound((byte) -122); - } - } - else if (!aBaseMetaTileEntity.isActive() && aBaseMetaTileEntity.getStoredEU() >= drainEU/4){ - if(aBaseMetaTileEntity.decreaseStoredEnergyUnits((drainEU/4), false)){ - isIdle = false; - } - else { - aBaseMetaTileEntity.setActive(false); - this.sendSound((byte) -122); - } - } - else { - aBaseMetaTileEntity.setActive(false); - this.sendSound((byte) -122); - } - - //Only try once/sec. - if (!isIdle && aTick % 20L == 0L){ - - //Check if machine can work. - if ((aBaseMetaTileEntity.isAllowedToWork())){ - - //Enable machine animation/graphic - if (hasRotor(stackRotor) && hasAirFilter(stackFilter) && this.mHasPollution){ - if (!this.getBaseMetaTileEntity().isActive()) { - aBaseMetaTileEntity.setActive(true); - } - } - else if (!this.mHasPollution || mCurrentPollution <= 0 || stackRotor == null || stackFilter == null || !hasRotor(stackRotor) || !hasAirFilter(stackFilter)){ - if (!this.getBaseMetaTileEntity().isActive()) { - aBaseMetaTileEntity.setActive(false); - this.sendSound((byte) -122); - } - } - - //If Active. - if (aBaseMetaTileEntity.isActive()){ - - //Do nothing if there is no pollution. - if(this.mHasPollution && mCurrentPollution > 0){ - - //Only check every 30s. - if (!isIdle && aTick % (20L * 30) == 0L){ - mPollutionEnabled = PollutionUtils.mPollution(); - //Clear out pollution if it's disabled, because I am a nice gal. - if (!mPollution()) { - PollutionUtils.nullifyPollution(this.getBaseMetaTileEntity()); - } - } - - - - - //Use a Turbine - if(hasRotor(stackRotor) && hasAirFilter(stackFilter)){ - Logger.WARNING("Found Turbine."); - mBaseEff = (int) ((50.0F + (10.0F * ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolCombatDamage(stackRotor))) * 100); - mOptimalAirFlow = (int) Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolStats(stackRotor).getSpeedMultiplier() - * GT_MetaGenerated_Tool.getPrimaryMaterial(stackRotor).mToolSpeed * 50); - - //Make sure we have a valid Turbine and Eff/Airflow - if (this.mBaseEff > 0 && this.mOptimalAirFlow > 0){ - //Utils.LOG_WARNING("Pollution Cleaner [5]"); - - //Log Debug information. - Logger.WARNING("mBaseEff[1]:"+mBaseEff); - Logger.WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow); - - //Calculate The Voltage we are running - long tVoltage = drainEU; - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - - //Check Sides for Air, - //More air means more pollution processing. - int mAirSides = getFreeSpaces(); - - int reduction = 0; - - //If no sides are free, how will you process the atmosphere? - if (mAirSides > 0){ - reduction += (((Math.max((tTier-2), 1)*2)*50)*mAirSides); //Was originally *100 - Logger.WARNING("mPollutionReduction[1]:"+reduction); - - //I stole this code - reduction = (MathUtils.safeInt((long)reduction*this.mBaseEff)/100000)*mAirSides*Math.max((tTier-2), 1); - Logger.WARNING("reduction[2]:"+reduction); - reduction = MathUtils.safeInt(((long)reduction/100)*this.mOptimalAirFlow); - Logger.WARNING("reduction[3]:"+reduction); - - mPollutionReduction = reduction; - - //Set a temp to remove variable to aleviate duplicate code. - int toRemove = 0; - - Logger.WARNING("mCurrentPollution[4]:"+mCurrentPollution); - if (reduction <= mCurrentPollution){ - //Clean some Air. - toRemove = reduction; - } - else { - //Makes sure we don't get negative pollution. - toRemove = mCurrentPollution; - } - - //We are good to clean - if (toRemove > 0){ - if (damageTurbineRotor() && damageAirFilter()){ - Logger.INFO("Removing "+toRemove+" pollution"); - removePollution(mSaveRotor ? (toRemove/2) : toRemove); - Logger.WARNING("mNewPollution[4]:"+getCurrentChunkPollution()); - } - else { - Logger.WARNING("Could not damage turbine rotor or Air Filter."); - aBaseMetaTileEntity.setActive(false); - } - } //End of pollution removal block. - } //End of valid air sides block. - } //End of valid toolstats block. - } //End of correct inventory item block. - else { - //Utils.LOG_WARNING("Wrong Tool metaitem Found."); - } - } - } - else if (!aBaseMetaTileEntity.isActive()) { - return; - } - } //End of can work block. - else { //Disable Machine. - //aBaseMetaTileEntity.setActive(false); - } - } //End of 1/sec action block. - else { - - if (hasRotor(stackRotor) && hasAirFilter(stackFilter) && this.mHasPollution && !isIdle && aBaseMetaTileEntity.isAllowedToWork()){ - aBaseMetaTileEntity.setActive(true); - } - else if (isIdle || !this.mHasPollution || mCurrentPollution <= 0 || stackRotor == null || stackFilter == null || !hasRotor(stackRotor) || !hasAirFilter(stackFilter)){ - aBaseMetaTileEntity.setActive(false); - } - - } - if (this.getBaseMetaTileEntity().isActive()) { - if (MathUtils.randInt(0, 5) <= 2) { - this.sendSound((byte) -120); - } - } - - } //End of is serverside block. - } - - - public int getCurrentChunkPollution(){ - int mCurrentChunkPollution = 0; - if (this.mTier < 7) { - mCurrentChunkPollution = PollutionUtils.getPollution(getBaseMetaTileEntity()); - } - else { - AutoMap aSurrounding = new AutoMap(); - World aWorld = this.getBaseMetaTileEntity().getWorld(); - int xPos = this.getBaseMetaTileEntity().getXCoord(); - int zPos = this.getBaseMetaTileEntity().getZCoord(); - Chunk a1 = aWorld.getChunkFromBlockCoords(xPos-32, zPos-32); - Chunk a2 = aWorld.getChunkFromBlockCoords(xPos-32, zPos); - Chunk a3 = aWorld.getChunkFromBlockCoords(xPos-32, zPos+32); - Chunk b1 = aWorld.getChunkFromBlockCoords(xPos, zPos-32); - Chunk b2 = aWorld.getChunkFromBlockCoords(xPos, zPos); - Chunk b3 = aWorld.getChunkFromBlockCoords(xPos, zPos+32); - Chunk c1 = aWorld.getChunkFromBlockCoords(xPos+32, zPos-32); - Chunk c2 = aWorld.getChunkFromBlockCoords(xPos+32, zPos); - Chunk c3 = aWorld.getChunkFromBlockCoords(xPos+32, zPos+32); - aSurrounding.put(a1); - aSurrounding.put(a2); - aSurrounding.put(a3); - aSurrounding.put(b1); - aSurrounding.put(b2); - aSurrounding.put(b3); - aSurrounding.put(c1); - aSurrounding.put(c2); - aSurrounding.put(c3); - for (Chunk r : aSurrounding) { - mCurrentChunkPollution += getPollutionInChunk(r); - } - } - if (mCurrentChunkPollution > 0){ - mHasPollution = true; - } - else { - mHasPollution = false; - } - return mCurrentChunkPollution; - } - - public int getPollutionInChunk(Chunk aChunk){ - int mCurrentChunkPollution = PollutionUtils.getPollution(aChunk); - if (mCurrentChunkPollution > 0){ - mHasPollution = true; - } - else { - mHasPollution = false; - } - return mCurrentChunkPollution; - } - - public boolean hasRotor(ItemStack rotorStack){ - if(rotorStack != null){ - if (rotorStack.getItem() instanceof ItemBasicScrubberTurbine) { - return true; - } - if (rotorStack.getItem() instanceof GT_MetaGenerated_Tool && rotorStack.getItemDamage() >= 170 && rotorStack.getItemDamage() <= 179){ - return true; - } - } - return false; - } - - public boolean damageTurbineRotor(){ - try{ - - boolean creativeRotor = false; - ItemStack rotorStack = this.mInventory[SLOT_ROTOR]; - if (rotorStack == null) { - return false; - } - else { - if(rotorStack.getItem() instanceof GT_MetaGenerated_Tool_01) { - Materials t1 = GT_MetaGenerated_Tool.getPrimaryMaterial(rotorStack); - Materials t2 = GT_MetaGenerated_Tool.getSecondaryMaterial(rotorStack); - if (t1 == Materials._NULL && t2 == Materials._NULL){ - creativeRotor = true; - } - } - } - - if (rotorStack.getItem() instanceof ItemBasicScrubberTurbine) { - long currentUse = ItemBasicScrubberTurbine.getFilterDamage(rotorStack); - //Remove broken Filter - if (rotorStack.getItemDamage() == 0 && currentUse >= 2500-10){ - this.mInventory[this.SLOT_FILTER] = null; - return false; - } - else if (rotorStack.getItemDamage() == 1 && currentUse >= 5000-10){ - this.mInventory[this.SLOT_FILTER] = null; - return false; - } - else { - //Do Damage - ItemAirFilter.setFilterDamage(rotorStack, currentUse+10); - Logger.WARNING("Rotor Damage: "+currentUse); - return true; - } - } - - if(mInventory[SLOT_ROTOR].getItem() instanceof GT_MetaGenerated_Tool_01 && - ((GT_MetaGenerated_Tool) mInventory[SLOT_ROTOR].getItem()).getToolStats(mInventory[SLOT_ROTOR]).getSpeedMultiplier()>0 && - GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[SLOT_ROTOR]).mToolSpeed>0 ) { - - long damageValue = (long) Math.floor(Math.abs(MathUtils.randFloat(1, 2) - MathUtils.randFloat(1, 3)) * (1 + 3 - 1) + 1); - double fDam = Math.floor(Math.abs(MathUtils.randFloat(1f, 2f) - MathUtils.randFloat(1f, 2f)) * (1f + 2f - 1f) + 1f); - damageValue -= fDam; - - //Logger.WARNING("Trying to do "+damageValue+" damage to the rotor. ["+fDam+"]"); - /*Materials M1 = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[this.SLOT_ROTOR]); - Materials M2 = GT_MetaGenerated_Tool.getSecondaryMaterial(this.mInventory[this.SLOT_ROTOR]); - - Logger.WARNING("Trying to do "+damageValue+" damage to the rotor. [2]");*/ - - //Damage Rotor - //int rotorDurability = this.mInventory[this.SLOT_ROTOR].getItemDamage(); - long rotorDamage = creativeRotor ? 0 : GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); - long rotorDurabilityMax = creativeRotor ? Integer.MAX_VALUE : GT_MetaGenerated_Tool.getToolMaxDamage(this.mInventory[this.SLOT_ROTOR]); - long rotorDurability = (rotorDurabilityMax - rotorDamage); - Logger.WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability); - if (rotorDurability >= damageValue){ - - - if (!mSaveRotor){ - Logger.WARNING("Damaging Rotor."); - - if (!creativeRotor) - GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null); - - long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); - if (tempDur < rotorDurabilityMax){ - return true; - } - else { - rotorDurability = 0; - } - } - else { - Logger.WARNING("Damaging Rotor."); - if (rotorDurability > 1000){ - if (!creativeRotor) - GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue/2, 0, null); - long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); - if (tempDur < rotorDurabilityMax){ - return true; - } - else { - rotorDurability = 0; - } - } - } - - - } - - if (rotorDurability <= 0 && !mSaveRotor && !creativeRotor) { - Logger.WARNING("Destroying Rotor."); - this.mInventory[this.SLOT_ROTOR] = null; - return false; - } - else if (rotorDurability <= 0 && mSaveRotor) { - Logger.WARNING("Saving Rotor."); - return false; - } - - - }else { - Logger.WARNING("Bad Rotor."); - return false; - } - } - catch (Throwable t){} - return false; - } - - public int getFreeSpaces(){ - int mAir = 0; - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - int x = aBaseMetaTileEntity.getXCoord(); - int y = aBaseMetaTileEntity.getYCoord(); - int z = aBaseMetaTileEntity.getZCoord(); - if(aBaseMetaTileEntity.getAirOffset(x+1, y, z)){ - mAir++; - } - if(aBaseMetaTileEntity.getAirOffset(x-1, y, z)){ - mAir++; - } - if(aBaseMetaTileEntity.getAirOffset(x, y, z+1)){ - mAir++; - } - if(aBaseMetaTileEntity.getAirOffset(x, y, z-1)){ - mAir++; - } - if(aBaseMetaTileEntity.getAirOffset(x, y+1, z)){ - mAir++; - } - if(aBaseMetaTileEntity.getAirOffset(x, y-1, z)){ - mAir++; - } - return mAir; - } - - public boolean removePollution(int toRemove){ - - if (this == null || this.getBaseMetaTileEntity() == null || this.getBaseMetaTileEntity().getWorld() == null) { - return false; - } - - if (this.mTier < 7) { - int startPollution = getCurrentChunkPollution(); - PollutionUtils.removePollution(this.getBaseMetaTileEntity(), toRemove); - int after = getCurrentChunkPollution(); - return (after aSurrounding = new AutoMap(); - Chunk aThisChunk = this.getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord()); - int mainChunkX = aThisChunk.xPosition; - int mainChunkZ = aThisChunk.zPosition; - - World aWorld = this.getBaseMetaTileEntity().getWorld(); - int xPos = this.getBaseMetaTileEntity().getXCoord(); - int zPos = this.getBaseMetaTileEntity().getZCoord(); - - Chunk a1 = aWorld.getChunkFromBlockCoords(xPos-32, zPos-32); - Chunk a2 = aWorld.getChunkFromBlockCoords(xPos-32, zPos); - Chunk a3 = aWorld.getChunkFromBlockCoords(xPos-32, zPos+32); - Chunk b1 = aWorld.getChunkFromBlockCoords(xPos, zPos-32); - Chunk b2 = aWorld.getChunkFromBlockCoords(xPos, zPos); - Chunk b3 = aWorld.getChunkFromBlockCoords(xPos, zPos+32); - Chunk c1 = aWorld.getChunkFromBlockCoords(xPos+32, zPos-32); - Chunk c2 = aWorld.getChunkFromBlockCoords(xPos+32, zPos); - Chunk c3 = aWorld.getChunkFromBlockCoords(xPos+32, zPos+32); - - aSurrounding.put(a1); - aSurrounding.put(a2); - aSurrounding.put(a3); - aSurrounding.put(b1); - aSurrounding.put(b2); - aSurrounding.put(b3); - aSurrounding.put(c1); - aSurrounding.put(c2); - aSurrounding.put(c3); - - for (Chunk r : aSurrounding) { - if (!r.isChunkLoaded) { - continue; - } - - int startPollution = getPollutionInChunk(r); - if (startPollution == 0) { - continue; - } - - Logger.WARNING("Trying to remove pollution from chunk "+r.xPosition+", "+r.zPosition+" | "+startPollution); - int after = 0; - boolean isMainChunk = r.isAtLocation(mainChunkX, mainChunkZ); - - int removal = Math.max(0, !isMainChunk ? (toRemove/4) : toRemove); - if (removePollution(r, removal)) { - chunksWithRemoval++; - after = getPollutionInChunk(r); - } - else { - after = 0; - } - if (startPollution - after > 0) { - totalRemoved += (startPollution - after); - } - Logger.WARNING("Removed "+(startPollution - after)+" pollution from chunk "+r.xPosition+", "+r.zPosition+" | "+after); - } - return totalRemoved > 0 && chunksWithRemoval > 0; - } - } - - public boolean removePollution(Chunk aChunk, int toRemove){ - int before = getCurrentChunkPollution(); - PollutionUtils.removePollution(aChunk, toRemove); - int after = getCurrentChunkPollution(); - return (after= 50-1){ - this.mInventory[this.SLOT_FILTER] = null; - return false; - } - else if (filter.getItemDamage() == 1 && currentUse >= 2500-1){ - this.mInventory[this.SLOT_FILTER] = null; - return false; - } - else { - //Do Damage - ItemAirFilter.setFilterDamage(filter, currentUse+1); - Logger.WARNING("Filter Damage: "+currentUse); - return true; - } - } - return false; - } - - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_PollutionCleaner(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_PollutionCleaner(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), this.mGUIName); - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - if (aIndex == 5) { - if (aStack.getItem() instanceof ItemAirFilter) { - Logger.INFO("Inserting Air Filter into "+aIndex); - return true; - } - } - if (aIndex == 4) { - if (this.mInventory[6] != null) { - Logger.INFO("Found conveyor, can automate turbines. Inserting into "+aIndex); - if (aStack.getItem() instanceof ItemBasicScrubberTurbine) { - return true; - } - if (aStack.getItem() instanceof GT_MetaGenerated_Tool && aStack.getItemDamage() >= 170 && aStack.getItemDamage() <= 179){ - return true; - } - } - } - //return super.canInsertItem(aIndex, aStack, aSide); - return false; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { - this.mSaveRotor = Utils.invertBoolean(mSaveRotor); - if (mSaveRotor){ - PlayerUtils.messagePlayer(aPlayer, "Running in low efficiency mode, rotors will not break."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Running in high efficiency mode, rotors will break."); - } - return true; - } - - @Override - public void doSound(byte aIndex, double aX, double aY, double aZ) { - if (aIndex == -120) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(103)), MathUtils.randInt(5, 50), 0.05F, aX, aY, aZ); - } else if (aIndex == -121 || aIndex == -122) { - //GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(108)), 0, 0.5F, aX, aY, aZ); - } /*else if (aIndex == -122) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 100, 1.0F, aX, aY, aZ); - }*/ else { - super.doSound((byte) 0, aX, aY, aZ); - } - } - - @Override - public boolean canHaveInsufficientEnergy() { - // TODO Auto-generated method stub - return super.canHaveInsufficientEnergy(); - } - - @Override - public String[] getInfoData() { - AutoMap aTooltipSuper = new AutoMap(); - for (String s : super.getInfoData()) { - aTooltipSuper.put(s); - } - int mAirSides = getFreeSpaces(); - int reduction = 0; - - try { - long tVoltage = maxEUInput(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - reduction += (((Math.max((tTier-2), 1)*2)*50)*mAirSides); - reduction = (MathUtils.safeInt((long)reduction*this.mBaseEff)/100000)*mAirSides*Math.max((tTier-2), 1); - reduction = MathUtils.safeInt(((long)reduction/100)*this.mOptimalAirFlow); - - aTooltipSuper.put("Maximum pollution removed per second: "+reduction); - } - catch (Throwable t) { - aTooltipSuper.put("Maximum pollution removed per second: "+mPollutionReduction); - } - aTooltipSuper.put("Air Sides: "+mAirSides); - - String[] mBuiltOutput = new String[aTooltipSuper.size()]; - int aIndex = 0; - for (String i : aTooltipSuper) { - mBuiltOutput[aIndex++] = i; - } - - - - return mBuiltOutput; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { - if (aSide <= 1) { - return false; - } - return super.allowCoverOnSide(aSide, aCoverID); - } - - @Override - public ITexture[] getTopFacingInactive(byte aColor) { - return super.getTopFacingInactive(aColor); - } - - @Override - public void setItemNBT(NBTTagCompound aNBT) { - aNBT.setInteger("mOptimalAirFlow", this.mOptimalAirFlow); - aNBT.setBoolean("mSaveRotor", mSaveRotor); - super.setItemNBT(aNBT); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java deleted file mode 100644 index 0f7edd062d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java +++ /dev/null @@ -1,174 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SteamCondenser; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_SteamCondenser; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -public class GregtechMetaCondensor extends GregtechMetaBoilerBase{ - - public GregtechMetaCondensor(final int aID, final String aName, final String aNameRegional) - { - super(aID, aName, aNameRegional, "A Steam condenser - [IC2->Steam]", new ITexture[0]); - } - - public GregtechMetaCondensor(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) - { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, "IC2 Steam + Water = Normal Steam.", "Requires no power to run, although it's not very fast.", CORE.GT_Tooltip}; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) - { - final ITexture[][][] rTextures = new ITexture[5][17][]; - for (byte i = -1; i < 16; i++){ - rTextures[0][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa))}; - rTextures[1][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; - rTextures[2][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; - rTextures[3][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER) }; - rTextures[4][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE) }; - } - return rTextures; - } - - @Override - public int maxProgresstime() - { - return 1000; - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) - { - return new CONTAINER_SteamCondenser(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) - { - return new GUI_SteamCondenser(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png"); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) - { - return new GregtechMetaCondensor(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) - { - this.RI = MathUtils.randLong(5L, 30L); - if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) - { - if (this.mTemperature <= 5) - { - this.mTemperature = 5; - this.mLossTimer = 0; - } - if (++this.mLossTimer > 10) - { - this.mTemperature -= 1; - this.mLossTimer = 0; - } - for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) { - if (i != aBaseMetaTileEntity.getFrontFacing()) - { - final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); - if (tTileEntity != null) - { - final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); - if (tDrained != null) - { - final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); - if (tFilledAmount > 0) { - tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); - } - } - } - } - } - if ((aTick % 10L) == 0L) { - if (this.mTemperature > 5) - { - if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) - { - this.mHadNoWater = true; - } - else - { - if (this.mHadNoWater) - { - aBaseMetaTileEntity.doExplosion(2048L); - return; - } - this.mFluid.amount -= 1; - if (this.mSteam == null) { - this.mSteam = GT_ModHandler.getSteam(30L); - } else if (GT_ModHandler.isSteam(this.mSteam)) { - this.mSteam.amount += 30; - } else { - this.mSteam = GT_ModHandler.getSteam(30L); - } - } - } - else { - this.mHadNoWater = false; - } - } - if ((this.mSteam != null) && - (this.mSteam.amount > getSteamCapacity())) - { - this.sendSound((byte)1); - this.mSteam.amount = getSteamCapacity() * 3 / 4; - } - /*if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && - (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(IC2.getItemFromBlock(p_150898_0_))))) - { - this.mProcessingEnergy += 1000; - aBaseMetaTileEntity.decrStackSize(2, 1); - aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L)); - }*/ - if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && ((aTick % this.RI) == 0L)) - { - this.mProcessingEnergy -= 40; - this.mTemperature += 2; - } - aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); - } - } - - @Override - public final int fill(final FluidStack aFluid, final boolean doFill) - { - if ((Utils.isIC2Steam(aFluid)) && (this.mProcessingEnergy < 50)) - { - final int tFilledAmount = Math.min(50, aFluid.amount); - if (doFill) { - this.mProcessingEnergy += tFilledAmount; - } - return tFilledAmount; - } - return super.fill(aFluid, doFill); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java deleted file mode 100644 index 88658c399d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java +++ /dev/null @@ -1,323 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity { - - long mLastCleanup = 0; - long mLocalTickVar = 0; - int mFrequency = 5; - - public GregtechMetaGarbageCollector(final String aName, final String aNameRegional, final String aDescription) { - super(991, aName, aNameRegional, 5, 0, aDescription); - } - - public GregtechMetaGarbageCollector(final String aName, final String aDescription, final ITexture[][][] aTextures) { - super(aName, 5, 0, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, - "Can request the JVM to perform garbage collection", - "Configurable to run once every 5 minute interval (5-180)", - "This Machine has no recipe", - "Admin Tool, Limit one per world if possible", - CORE.GT_Tooltip}; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; - } - - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; - } - - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (mFrequency < 180){ - mFrequency += 5; - } - else { - mFrequency = 5; - } - PlayerUtils.messagePlayer(aPlayer, "Running every "+mFrequency+" minutes."); - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaGarbageCollector(this.mName, this.mDescription, this.mTextures); - } - - @Override public boolean isSimpleMachine() {return true;} - @Override public boolean isElectric() {return false;} - @Override public boolean isValidSlot(final int aIndex) {return false;} - @Override public boolean isFacingValid(final byte aFacing) {return true;} - @Override public boolean isEnetInput() {return false;} - @Override public boolean isEnetOutput() {return false;} - @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isTeleporterCompatible() {return false;} - @Override public long getMinimumStoredEU() {return 0;} - @Override public long maxEUStore() {return 0;} - - @Override - public int getCapacity() { - return 0; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public long maxAmperesOut() { - return 0; - } - @Override public int rechargerSlotStartIndex() {return 0;} - @Override public int dechargerSlotStartIndex() {return 0;} - @Override public int rechargerSlotCount() {return 0;} - @Override public int dechargerSlotCount() {return 0;} - @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} - @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - { - return true; - } - this.showPollution(aPlayer.getEntityWorld(), aPlayer); - return true; - } - - private void showPollution(final World worldIn, final EntityPlayer playerIn){ - PlayerUtils.messagePlayer(playerIn, "Running every "+mFrequency+" minutes. Owner: "+this.getBaseMetaTileEntity().getOwnerName()); - long aDiff = mLocalTickVar - this.mLastCleanup; - PlayerUtils.messagePlayer(playerIn, "Last run: "+Utils.getSecondsFromMillis(aDiff)+" seconds ago."); - - - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - - @Override - public String[] getInfoData() { - return new String[] { - this.getLocalName() - }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { - } - - @Override - public String getInventoryName() { - return null; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (this.getBaseMetaTileEntity().isServerSide()) { - mLocalTickVar = System.currentTimeMillis(); - long aDiff = mLocalTickVar - this.mLastCleanup; - if (Utils.getSecondsFromMillis(aDiff) >= (this.mFrequency * 60)) { - CORE.gc(); - this.mLastCleanup = mLocalTickVar; - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java deleted file mode 100644 index 5f55e080ad..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java +++ /dev/null @@ -1,386 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity { - - int mCurrentPollution; - int mAveragePollution; - int mAveragePollutionArray[] = new int[10]; - private int mArrayPos = 0; - private int mTickTimer = 0; - private int mSecondTimer = 0; - - public GregtechMetaPollutionCreator(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); - } - - public GregtechMetaPollutionCreator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, "A useful debug machine to create pollution.", CORE.GT_Tooltip}; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } - - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (pollutionMultiplier > 99){ - pollutionMultiplier = 1; - } - else { - pollutionMultiplier++; - } - PlayerUtils.messagePlayer(aPlayer, "Pollution Mutliplier is now "+pollutionMultiplier+"."); - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaPollutionCreator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); - } - - @Override public boolean isSimpleMachine() {return false;} - @Override public boolean isElectric() {return true;} - @Override public boolean isValidSlot(final int aIndex) {return true;} - @Override public boolean isFacingValid(final byte aFacing) {return true;} - @Override public boolean isEnetInput() {return true;} - @Override public boolean isEnetOutput() {return false;} - @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isTeleporterCompatible() {return false;} - @Override public long getMinimumStoredEU() {return 0;} - @Override public long maxEUStore() {return 0;} - - @Override - public int getCapacity() { - return 0; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public long maxAmperesOut() { - return 0; - } - @Override public int rechargerSlotStartIndex() {return 0;} - @Override public int dechargerSlotStartIndex() {return 0;} - @Override public int rechargerSlotCount() {return 0;} - @Override public int dechargerSlotCount() {return 0;} - @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} - @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - { - return true; - } - this.showPollution(aPlayer.getEntityWorld(), aPlayer); - return true; - } - - public int pollutionMultiplier = 1; - - private void showPollution(final World worldIn, final EntityPlayer playerIn){ - if(!PollutionUtils.mPollution()){ - PlayerUtils.messagePlayer(playerIn, "This block is useless, Pollution is disabled."); - } - else { - addPollution(); - PlayerUtils.messagePlayer(playerIn, "This chunk now contains "+getCurrentChunkPollution()+" pollution."); - //PlayerUtils.messagePlayer(playerIn, "Average over last ten minutes: "+getAveragePollutionOverLastTen()+" pollution."); - } - } - - private boolean addPollution(){ - PollutionUtils.addPollution(getBaseMetaTileEntity(), 100000*pollutionMultiplier); - return true; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - public int getCurrentChunkPollution(){ - return getCurrentChunkPollution(this.getBaseMetaTileEntity()); - } - - public int getCurrentChunkPollution(IGregTechTileEntity aBaseMetaTileEntity){ - return PollutionUtils.getPollution(aBaseMetaTileEntity); - } - - - @Override - public String[] getInfoData() { - return new String[] { - this.getLocalName(), - "Current Pollution: "+this.mCurrentPollution, - "Average/10 minutes:"+getAveragePollutionOverLastTen()}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { - } - - @Override - public String getInventoryName() { - return null; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return false; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - //int mCurrentPollution; - //int mAveragePollution; - //int mAveragePollutionArray[] = new int[10]; - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); - aNBT.setInteger("mAveragePollution", this.mAveragePollution); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mCurrentPollution = aNBT.getInteger("mCurrentPollution"); - this.mAveragePollution = aNBT.getInteger("mAveragePollution"); - } - - @Override - public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { - if (this.getBaseMetaTileEntity().isServerSide()) { - if (this.mCurrentPollution == 0) { - this.mCurrentPollution = getCurrentChunkPollution(); - } - if (this.mArrayPos < 0 || this.mArrayPos > 9) { - this.mArrayPos = 0; - } - this.mTickTimer = 0; - } - } - - - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (this.getBaseMetaTileEntity().isServerSide()) { - //TickTimer - 20 times a second - this.mTickTimer++; - if (mTickTimer % 20 == 0){ - this.mCurrentPollution = getCurrentChunkPollution(); - } - } - } - - public int getAveragePollutionOverLastTen(){ - int counter = 0; - int total = 0; - - for (int i=0;i 0 && counter > 0){ - returnValue = (total/counter); - this.mAveragePollution = returnValue; - } - else { - returnValue = getCurrentChunkPollution(); - } - //Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); - return returnValue; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java deleted file mode 100644 index 10319f2269..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java +++ /dev/null @@ -1,439 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity { - - int mCurrentPollution; - int mAveragePollution; - int mAveragePollutionArray[] = new int[10]; - private int mArrayPos = 0; - private int mTickTimer = 0; - private int mSecondTimer = 0; - private long mRedstoneLevel = 0; - - public GregtechMetaPollutionDetector(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); - } - - public GregtechMetaPollutionDetector(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, "Right click to check pollution levels.", - "Configure with screwdriver to set redstone output amount.", - "Does not use power.", - CORE.GT_Tooltip}; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return aSide == aFacing - ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } - : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GT_RenderedTexture(Textures.BlockIcons.VOID) }; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - /*@Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - }*/ - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } - - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaPollutionDetector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); - } - - @Override public boolean isSimpleMachine() {return false;} - @Override public boolean isElectric() {return true;} - @Override public boolean isValidSlot(final int aIndex) {return true;} - @Override public boolean isFacingValid(final byte aFacing) {return true;} - @Override public boolean isEnetInput() {return true;} - @Override public boolean isEnetOutput() {return false;} - @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isTeleporterCompatible() {return false;} - @Override public long getMinimumStoredEU() {return 0;} - @Override public long maxEUStore() {return 0;} - - @Override - public int getCapacity() { - return 0; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public long maxAmperesOut() { - return 0; - } - @Override public int rechargerSlotStartIndex() {return 0;} - @Override public int dechargerSlotStartIndex() {return 0;} - @Override public int rechargerSlotCount() {return 0;} - @Override public int dechargerSlotCount() {return 0;} - @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} - @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - { - return true; - } - this.showPollution(aPlayer.getEntityWorld(), aPlayer); - return true; - } - - private void showPollution(final World worldIn, final EntityPlayer playerIn){ - if(!PollutionUtils.mPollution()){ - PlayerUtils.messagePlayer(playerIn, "This block is useless, Pollution is disabled."); - } - else { - PlayerUtils.messagePlayer(playerIn, "This chunk contains "+getCurrentChunkPollution()+" pollution."); - PlayerUtils.messagePlayer(playerIn, "Emit Redstone at pollution level: "+this.mRedstoneLevel); - } - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - public int getCurrentChunkPollution(){ - return getCurrentChunkPollution(this.getBaseMetaTileEntity()); - } - - public int getCurrentChunkPollution(IGregTechTileEntity aBaseMetaTileEntity){ - return PollutionUtils.getPollution(aBaseMetaTileEntity); - } - - - @Override - public String[] getInfoData() { - return new String[] { - this.getLocalName(), - "Current Pollution: "+this.mCurrentPollution, - "Average/10 Sec: "+this.mAveragePollution, - "Emit Redstone at pollution level: "+this.mRedstoneLevel}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { - } - - @Override - public String getInventoryName() { - return null; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return false; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - //int mCurrentPollution; - //int mAveragePollution; - //int mAveragePollutionArray[] = new int[10]; - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); - aNBT.setInteger("mAveragePollution", this.mAveragePollution); - aNBT.setLong("mRedstoneLevel", this.mRedstoneLevel); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mCurrentPollution = aNBT.getInteger("mCurrentPollution"); - this.mAveragePollution = aNBT.getInteger("mAveragePollution"); - this.mRedstoneLevel = aNBT.getLong("mRedstoneLevel"); - } - - @Override - public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { - super.onFirstTick(aBaseMetaTileEntity); - } - - public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - //Only Calc server-side - if (!this.getBaseMetaTileEntity().isServerSide()) { - return; - } - //Emit Redstone - if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ - for (int i=0;i<6;i++){ - this.getBaseMetaTileEntity().setStrongOutputRedstoneSignal((byte) i, (byte) 16); - } - this.markDirty(); - } - else { - for (int i=0;i<6;i++){ - this.getBaseMetaTileEntity().setStrongOutputRedstoneSignal((byte) i, (byte) 0); - } - this.markDirty(); - } - - //Do Math for stats - if (this.mTickTimer % 20 == 0) { - mCurrentPollution = this.getCurrentChunkPollution(); - if (mArrayPos > mAveragePollutionArray.length-1) { - mArrayPos = 0; - } - mAveragePollutionArray[mArrayPos] = mCurrentPollution; - mAveragePollution = getAveragePollutionOverLastTen(); - mArrayPos++; - } - this.mTickTimer++; - - } - - public int getAveragePollutionOverLastTen(){ - return MathUtils.getIntAverage(mAveragePollutionArray); - - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { - - if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { - final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); - switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { - case 0: - this.mRedstoneLevel -= 5000; - break; - case 1: - this.mRedstoneLevel += 5000; - break; - case 2: - this.mRedstoneLevel -= 50000; - break; - case 3: - this.mRedstoneLevel += 50000; - } - this.markDirty(); - GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone at Pollution Level: " + this.mRedstoneLevel); - } - - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - public boolean allowGeneralRedstoneOutput() { - if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ - this.markDirty(); - return true; - } - return false; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, - EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { - return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - } - - @Override - public void onMachineBlockUpdate() { - super.onMachineBlockUpdate(); - } - - @Override - public boolean hasSidedRedstoneOutputBehavior() { - if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ - this.markDirty(); - return true; - } - return false; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java deleted file mode 100644 index 140f1d9cd5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java +++ /dev/null @@ -1,394 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import static gregtech.api.enums.GT_Values.V; - -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.interfaces.IChunkLoader; -import gtPlusPlus.core.chunkloading.GTPP_ChunkManager; -import gtPlusPlus.core.chunkloading.StaticChunkFunctions; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; - -public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMachine implements IChunkLoader { - - public GregtechMetaTileEntityChunkLoader(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 2, "Loads " + getMaxChunksToLoadForTier(aTier) + " chunks when powered", 0, 0, "Recycler.png", "", new ITexture[]{}); - } - - public GregtechMetaTileEntityChunkLoader(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 2, aDescription, aTextures, 0, 0, aGUIName, aNEIName); - } - - public static int getMaxChunksToLoadForTier(int aTier) { - if (aTier < 4) { - return 3 * 3; - } - if (aTier < 6) { - return 7 * 7; - } - if (aTier < 8) { - return 15 * 15; - } - else { - return 0; - } - } - - @Override - public String[] getDescription() { - return new String[] { - "Loads " + getMaxChunksToLoadForTier(this.mTier) + " chunks when powered", - "Consumes 2A", - "Behaves Identically to a Railcraft World Anchor", - CORE.GT_Tooltip - }; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; - } - - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; - } - - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()){ - return true; - } - this.showPollution(aPlayer.getEntityWorld(), aPlayer); - return true; - } - - private void showPollution(final World worldIn, final EntityPlayer playerIn){ - //PlayerUtils.messagePlayer(playerIn, "Running every "+mFrequency+" minutes. Owner: "+this.getBaseMetaTileEntity().getOwnerName()); - //PlayerUtils.messagePlayer(playerIn, "Last run: "+Utils.getSecondsFromMillis(aDiff)+" seconds ago."); - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - - @Override - public String[] getInfoData() { - return super.getInfoData(); - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - // Have we set the Chunk this Tile resides in yet? - if (mCurrentChunk == null) { - int xTile = getBaseMetaTileEntity().getXCoord(); - int zTile = getBaseMetaTileEntity().getZCoord(); - createInitialWorkingChunk(aBaseMetaTileEntity, xTile, zTile); - } - - // Try unload all chunks if fail to meet global chunkloading conditions. - if (StaticChunkFunctions.onPostTick(aBaseMetaTileEntity, aTick)) { - // Can this tile actively chunkload? - if (getChunkLoadingActive()) { - // Consume some power - this.setEUVar(this.getEUVar() - (maxEUInput() * maxAmperesIn())); - - // Do we need to re-request tickets? - if (getDoesWorkChunkNeedReload()) { - // Request ticket for current chunk. - GTPP_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), mCurrentChunk); - // Request a ticket for each chunk we have mapped out in a spiral pattern. - if (!mLoadedChunks.isEmpty()) { - for (ChunkCoordIntPair Y : mLoadedChunks) { - GTPP_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), Y); - } - } - setDoesWorkChunkNeedReload(false); - } - - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - StaticChunkFunctions.saveNBTDataForTileEntity(this.getBaseMetaTileEntity(), aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - StaticChunkFunctions.loadNBTDataForTileEntity(this.getBaseMetaTileEntity(), aNBT); - } - - @Override - public long maxAmperesIn() { - return 2; - } - - @Override - public long getMinimumStoredEU() { - return V[mTier] * 2; - } - - @Override - public long maxEUStore() { - return V[mTier] * 256; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - - /* - * Chunkloading Vars - */ - - private long mTicksRemainingForChunkloading = -1; - private ChunkCoordIntPair mCurrentChunk; - private Set mLoadedChunks = new HashSet(); - private boolean mRefreshChunkTickets = false; - - @Override - public long getTicksRemaining() { - return -1; - } - - @Override - public void setTicksRemaining(long aTicks) { - mTicksRemainingForChunkloading = aTicks; - } - - @Override - public ChunkCoordIntPair getResidingChunk() { - return mCurrentChunk; - } - - @Override - public void setResidingChunk(ChunkCoordIntPair aCurrentChunk) { - mCurrentChunk = aCurrentChunk; - } - - @Override - public boolean getChunkLoadingActive() { - return this.getEUVar() >= maxEUInput() * maxAmperesIn(); - } - - @Override - public void setChunkLoadingActive(boolean aActive) { - - } - - @Override - public boolean getDoesWorkChunkNeedReload() { - return mRefreshChunkTickets; - } - - @Override - public void setDoesWorkChunkNeedReload(boolean aActive) { - mRefreshChunkTickets = aActive; - } - - @Override - public boolean addChunkToLoadedList(ChunkCoordIntPair aActiveChunk) { - return mLoadedChunks.add(aActiveChunk); - } - - @Override - public boolean removeChunkFromLoadedList(ChunkCoordIntPair aActiveChunk) { - return mLoadedChunks.remove(aActiveChunk); - } - - @Override - public Set getManagedChunks() { - return mLoadedChunks; - } - - @Override - public void onRemoval() { - StaticChunkFunctions.onRemoval(getBaseMetaTileEntity()); - super.onRemoval(); - } - - public static Set spiralChunks(final IGregTechTileEntity aBaseMetaTileEntity, int X, int Z) { - World w = aBaseMetaTileEntity.getWorld(); - HashSet aSet = new HashSet(); - if (w == null) { - return aSet; - } - Chunk thisChunk = w.getChunkFromBlockCoords(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getZCoord()); - ChunkCoordIntPair aChunkCo = new ChunkCoordIntPair(thisChunk.xPosition, thisChunk.zPosition); - int x,z,dx,dz; - x = z = dx =0; - dz = -1; - int t = Math.max(X,Z); - int maxI = t*t; - for(int i =0; i < maxI; i++){ - if ((-X/2 <= x) && (x <= X/2) && (-Z/2 <= z) && (z <= Z/2)){ - Chunk C = w.getChunkFromChunkCoords(aChunkCo.chunkXPos + x, aChunkCo.chunkZPos + z); - if (C != null) { - aSet.add(new ChunkCoordIntPair(C.xPosition, C.zPosition)); - } - } - if( (x == z) || ((x < 0) && (x == -z)) || ((x > 0) && (x == 1-z))){ - t = dx; - dx = -dz; - dz = t; - } - x += dx; - z += dz; - } - return aSet; - } - - @Override - public int getChunkloaderTier() { - return mTier; - } - - public void createInitialWorkingChunk(IGregTechTileEntity aBaseMetaTileEntity, int aTileX, int aTileZ) { - final int centerX = aTileX >> 4; - final int centerZ = aTileZ >> 4; - addChunkToLoadedList(new ChunkCoordIntPair(centerX, centerZ)); - GTPP_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity.getMetaTileEntity(), getResidingChunk()); - // If this surrounding chunk map for this tile is empty, we spiral out and map chunks to keep loaded. - if (getManagedChunks().isEmpty()) { - int aChunks = GregtechMetaTileEntityChunkLoader.getMaxChunksToLoadForTier(getChunkloaderTier()); - mLoadedChunks.addAll(spiralChunks(aBaseMetaTileEntity, getChunkloaderTier(), getChunkloaderTier())); - } - if (!mLoadedChunks.isEmpty()) { - for (ChunkCoordIntPair Y : mLoadedChunks) { - GTPP_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity.getMetaTileEntity(), Y); - } - } - setDoesWorkChunkNeedReload(false); - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java deleted file mode 100644 index 8456f40797..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java +++ /dev/null @@ -1,204 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTileEntity { - - public GregtechMetaTileEntityThaumcraftResearcher(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); - } - - public GregtechMetaTileEntityThaumcraftResearcher(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, "Generates Thaumcraft research notes, because it's magic."}; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_A)}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_B)}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{getSides(aColor)[0]}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue)}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return getFront(aColor); - } - - - public ITexture[] getBackActive(final byte aColor) { - return getBack(aColor); - } - - - public ITexture[] getBottomActive(final byte aColor) { - return getBottom(aColor); - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return getSides(aColor); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntityThaumcraftResearcher(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); - } - - @Override public boolean isSimpleMachine() {return false;} - @Override public boolean isElectric() {return true;} - @Override public boolean isValidSlot(final int aIndex) {return true;} - @Override public boolean isFacingValid(final byte aFacing) {return true;} - @Override public boolean isEnetInput() {return true;} - @Override public boolean isEnetOutput() {return false;} - @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getBackFacing();} - @Override public boolean isTeleporterCompatible() {return false;} - @Override public long getMinimumStoredEU() {return 0;} - @Override public long maxEUStore() {return 512000;} - @Override public int rechargerSlotStartIndex() {return 0;} - @Override public int dechargerSlotStartIndex() {return 0;} - @Override public int rechargerSlotCount() {return 0;} - @Override public int dechargerSlotCount() {return 0;} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public int getCapacity() { - return 128000; - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - { - return true; - } - return true; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return aSide==this.getBaseMetaTileEntity().getBackFacing(); - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return true; - } - - @Override - public String[] getInfoData() { - return new String[] { - this.getLocalName(), - }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int getSizeInventory() { - return 2; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - //aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); - //aNBT.setInteger("mAveragePollution", this.mAveragePollution); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - //this.mCurrentPollution = aNBT.getInteger("mCurrentPollution"); - //this.mAveragePollution = aNBT.getInteger("mAveragePollution"); - } - - @Override - public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { - super.onFirstTick(aBaseMetaTileEntity); - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java deleted file mode 100644 index 99b3faa7d4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.lib.CORE; -import gregtech.api.util.GTPP_Recipe; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_BasicWasher extends GT_MetaTileEntity_BasicMachine { - - public GregtechMetaTileEntity_BasicWasher(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, - "It's like an automatic Cauldron for washing dusts.", 1, 1, "PotionBrewer.png", "", - new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) - } - ); - } - - public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - /*public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - }*/ - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, "Grants no byproducts, but it is fast.", CORE.GT_Tooltip}; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_BasicWasher(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeList() { - return GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return (aFluid.getFluid().getName().equals("water")) || (super.isFluidInputAllowed(aFluid)); - } - - @Override - public int getCapacity() { - return 8000 * Math.max(1, this.mTier); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java deleted file mode 100644 index c872e5c912..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java +++ /dev/null @@ -1,666 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import static gregtech.api.enums.GT_Values.E; - -import java.util.HashSet; -import java.util.List; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.slots.SlotChemicalPlantInput; -import gtPlusPlus.xmod.gregtech.api.gui.fluidreactor.Container_FluidReactor; -import gtPlusPlus.xmod.gregtech.api.gui.fluidreactor.GUI_FluidReactor; -import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; - -public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_BasicMachine { - - public boolean mFluidTransfer_1 = false; - public boolean mFluidTransfer_2 = false; - - public FluidStack[] mInputFluids = new FluidStack[4]; - public FluidStack[] mOutputFluids = new FluidStack[2]; - - public GregtechMetaTileEntity_ChemicalReactor(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, - "For mixing fluids", 4, 4, "ChemicalReactor.png", "", - new ITexture[]{ - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side_Active), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front_Active), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active), - new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top) - } - ); - } - - public GregtechMetaTileEntity_ChemicalReactor(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - /*public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - }*/ - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, "Because why not?", CORE.GT_Tooltip}; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - try { - GregtechMetaTileEntity_ChemicalReactor y = new GregtechMetaTileEntity_ChemicalReactor(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); - return y; - } - catch(Throwable t) { - t.printStackTrace(); - } - return null; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - try { - Container_FluidReactor y = new Container_FluidReactor(aPlayerInventory, aBaseMetaTileEntity); - return y; - } - catch(Throwable t) { - t.printStackTrace(); - } - return null; - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_FluidReactor(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), - this.mGUIName, - GT_Utility.isStringValid(this.mNEIName) - ? this.mNEIName - : (this.getRecipeList() != null ? this.getRecipeList().mUnlocalizedName : "")); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeList() { - return null; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return (super.isFluidInputAllowed(aFluid)); - } - - @Override - public int getCapacity() { - return 32000 * Math.max(1, this.mTier) / 4; - } - - @Override - public int getInputSlot() { - return 3; - } - - @Override - public boolean isLiquidInput(byte aSide) { - return aSide > 1; - } - - @Override - public boolean isLiquidOutput(byte aSide) { - return aSide < 2; - } - - @Override - public int getOutputSlot() { - return super.getOutputSlot(); - } - - @Override - public int getStackDisplaySlot() { - return super.getStackDisplaySlot(); - } - - @Override - public boolean doesEmptyContainers() { - return true; - } - - @Override - public boolean canTankBeFilled() { - return super.canTankBeFilled(); - } - - @Override - public boolean canTankBeEmptied() { - return super.canTankBeEmptied(); - } - - @Override - public FluidStack getDisplayedFluid() { - return super.getDisplayedFluid(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mFluidTransfer_1", mFluidTransfer_1); - aNBT.setBoolean("mFluidTransfer_2", mFluidTransfer_2); - for (int i=0;i<4;i++) { - if (this.mInputFluids[i] != null) { - aNBT.setTag("mInputFluid"+i, this.mInputFluids[i].writeToNBT(new NBTTagCompound())); - } - } - for (int i=0;i<2;i++) { - if (this.mOutputFluids[i] != null) { - aNBT.setTag("mOutputFluid"+i, this.mOutputFluids[i].writeToNBT(new NBTTagCompound())); - } - } - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mFluidTransfer_1 = aNBT.getBoolean("mFluidTransfer_1"); - mFluidTransfer_2 = aNBT.getBoolean("mFluidTransfer_2"); - for (int i=0;i<4;i++) { - if (this.mInputFluids[i] == null) { - this.mInputFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mInputFluid"+i)); - } - } - for (int i=0;i<2;i++) { - if (this.mOutputFluids[i] == null) { - this.mOutputFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid"+i)); - } - } - } - - /* - * Custom Fluid Handling - TODO - */ - - public FluidStack getFillableStack() { - return this.mFluid; - } - - public FluidStack setFillableStack(FluidStack aFluid) { - this.mFluid = aFluid; - return this.mFluid; - } - - public FluidStack getDrainableStack() { - return this.mFluid; - } - - public FluidStack setDrainableStack(FluidStack aFluid) { - this.mFluid = aFluid; - return this.mFluid; - } - - - - - - - - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - // Re-implement basic machine logic from the ground up.= - - if (aBaseMetaTileEntity.isServerSide()) { - this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; - this.doDisplayThings(); - boolean tSucceeded = false; - int i; - if (this.mMaxProgresstime > 0 && (this.mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) { - aBaseMetaTileEntity.setActive(true); - if (this.mProgresstime >= 0 && !this.drainEnergyForProcess((long) this.mEUt)) { - if (!this.mStuttering) { - this.stutterProcess(); - if (this.canHaveInsufficientEnergy()) { - this.mProgresstime = -100; - } - - this.mStuttering = true; - } - } else { - if (++this.mProgresstime >= this.mMaxProgresstime) { - for (i = 0; i < this.mOutputItems.length; ++i) { - for (i = 0; i < this.mOutputItems.length && !aBaseMetaTileEntity.addStackToSlot( - this.getOutputSlot() + (i + i) % this.mOutputItems.length, - this.mOutputItems[i]); ++i) { - ; - } - } - - if (this.mOutputFluid != null) { - if (this.getDrainableStack() == null) { - this.setDrainableStack(this.mOutputFluid.copy()); - } else if (this.mOutputFluid.isFluidEqual(this.getDrainableStack())) { - FluidStack var10000 = this.getDrainableStack(); - var10000.amount += this.mOutputFluid.amount; - } - } - - for (i = 0; i < this.mOutputItems.length; ++i) { - this.mOutputItems[i] = null; - } - - this.mOutputFluid = null; - this.mEUt = 0; - this.mProgresstime = 0; - this.mMaxProgresstime = 0; - this.mStuttering = false; - tSucceeded = true; - this.endProcess(); - } - - if (this.mProgresstime > 5) { - this.mStuttering = false; - } - } - } else { - aBaseMetaTileEntity.setActive(false); - } - - boolean tRemovedOutputFluid = false; - if (this.doesAutoOutputFluids() && this.getDrainableStack() != null - && aBaseMetaTileEntity.getFrontFacing() != this.mMainFacing && (tSucceeded || aTick % 20L == 0L)) { - IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); - if (tTank != null) { - FluidStack tDrained = this.drain(1000, false); - if (tDrained != null) { - int tFilledAmount = tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); - if (tFilledAmount > 0) { - tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), - this.drain(tFilledAmount, true), true); - } - } - } - - if (this.getDrainableStack() == null) { - tRemovedOutputFluid = true; - } - } - - int j; - if (this.doesAutoOutput() && !this.isOutputEmpty() - && aBaseMetaTileEntity.getFrontFacing() != this.mMainFacing - && (tSucceeded || this.mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() - || aTick % 600L == 0L)) { - TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); - j = 0; - - for (byte tCosts = 1; j < this.mOutputItems.length && tCosts > 0 - && aBaseMetaTileEntity.isUniversalEnergyStored(128L); ++j) { - tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, - aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), (List) null, - false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - if (tCosts > 0) { - aBaseMetaTileEntity.decreaseStoredEnergyUnits((long) tCosts, true); - } - } - } - - if (this.mOutputBlocked != 0) { - if (this.isOutputEmpty()) { - this.mOutputBlocked = 0; - } else { - ++this.mOutputBlocked; - } - } - - if (this.allowToCheckRecipe()) { - if (this.mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() - && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() - || aTick % 600L == 0L || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) - && this.hasEnoughEnergyToCheckRecipe()) { - if (this.checkRecipe() == 2) { - if (this.mInventory[3] != null && this.mInventory[3].stackSize <= 0) { - this.mInventory[3] = null; - } - - i = this.getInputSlot(); - - for (j = i + this.mInputSlotCount; i < j; ++i) { - if (this.mInventory[i] != null && this.mInventory[i].stackSize <= 0) { - this.mInventory[i] = null; - } - } - - for (i = 0; i < this.mOutputItems.length; ++i) { - this.mOutputItems[i] = GT_Utility.copy(new Object[]{this.mOutputItems[i]}); - if (this.mOutputItems[i] != null && this.mOutputItems[i].stackSize > 64) { - this.mOutputItems[i].stackSize = 64; - } - - this.mOutputItems[i] = GT_OreDictUnificator.get(true, this.mOutputItems[i]); - } - - if (this.mFluid != null && this.mFluid.amount <= 0) { - this.mFluid = null; - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - if (GT_Utility.isDebugItem(this.mInventory[this.dechargerSlotStartIndex()])) { - this.mEUt = this.mMaxProgresstime = 1; - } - - this.startProcess(); - } else { - this.mMaxProgresstime = 0; - - for (i = 0; i < this.mOutputItems.length; ++i) { - this.mOutputItems[i] = null; - } - - this.mOutputFluid = null; - } - } - } else if (!this.mStuttering) { - this.stutterProcess(); - this.mStuttering = true; - } - } - - - - } - - @Override - protected void doDisplayThings() { - // TODO Auto-generated method stub - super.doDisplayThings(); - } - - @Override - protected ItemStack getSpecialSlot() { - // TODO Auto-generated method stub - return super.getSpecialSlot(); - } - - @Override - protected ItemStack getOutputAt(int aIndex) { - // TODO Auto-generated method stub - return super.getOutputAt(aIndex); - } - - @Override - protected ItemStack[] getAllOutputs() { - // TODO Auto-generated method stub - return super.getAllOutputs(); - } - - @Override - protected ItemStack getInputAt(int aIndex) { - // TODO Auto-generated method stub - return super.getInputAt(aIndex); - } - - @Override - protected ItemStack[] getAllInputs() { - // TODO Auto-generated method stub - return super.getAllInputs(); - } - - @Override - protected boolean displaysInputFluid() { - return true; - } - - @Override - protected boolean displaysOutputFluid() { - return true; - } - - @Override - public boolean doesAutoOutput() { - return super.doesAutoOutput(); - } - - @Override - public boolean doesAutoOutputFluids() { - return this.mFluidTransfer_1 && this.mFluidTransfer_2; - } - - @Override - public void startProcess() { - super.startProcess(); - } - - @Override - public void endProcess() { - super.endProcess(); - } - - @Override - public String[] getInfoData() { - return super.getInfoData(); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return super.allowPullStack(aBaseMetaTileEntity, aIndex, aSide, aStack); - } - - @Override - public int checkRecipe() { - return super.checkRecipe(); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - - /* if (aBaseMetaTileEntity != null) { - if (!aBaseMetaTileEntity.getWorld().isRemote) { - itemslots : for (int i=3;i<7;i++) { - ItemStack aStack = aBaseMetaTileEntity.getStackInSlot(i); - if (aStack != null) { - if (FluidContainerRegistry.isContainer(aStack)) { - if (this.isItemValidForSlot(i, aStack)) { - // Add Fluid - FluidStack aContainerFluid = FluidContainerRegistry.getFluidForFilledItem(aStack); - if (aContainerFluid != null) { - fluidslots : for (FluidStack u : mInputFluids) { - if (u != null && u.isFluidEqual(aContainerFluid)) { - if (u.amount <= (this.getCapacity() - aContainerFluid.amount)) { - - // Matching, not full, let's fill, then continue - u.amount += aContainerFluid.amount; - - // Update stack size - if (aStack.stackSize > 1) { - aStack.stackSize--; - } - else { - aStack = null; - } - - // Add Output container - // TODO - - continue itemslots; - } - else { - // Too full - break fluidslots; - } - } - else { - if (u == null ) { - - // Empty, let's fill, then continue - u = aContainerFluid.copy(); - - // Update stack size - if (aStack.stackSize > 1) { - aStack.stackSize--; - } - else { - aStack = null; - } - - // Add Output container - // TODO - - continue itemslots; - - } - else { - // Not empty, doesn't match, check next slot. - continue fluidslots; - } - } - } - - - - } - // Eat Input - - // Add Container to Output - } - } - } - } - } - }*/ - - } - - @Override - public FluidStack getFluid() { - return super.getFluid(); - } - - @Override - public int getFluidAmount() { - return super.getFluidAmount(); - } - - @Override - public int fill(FluidStack aFluid, boolean doFill) { - return super.fill(aFluid, doFill); - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) { - return super.drain(maxDrain, doDrain); - } - - @Override - public void setItemNBT(NBTTagCompound aNBT) { - super.setItemNBT(aNBT); - } - - @Override - public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { - if (aIndex >= 3 && aIndex <= 6) { - return SlotChemicalPlantInput.isItemValidForChemicalPlantSlot(aStack); - } - return false; - } - - @Override - public int[] getAccessibleSlotsFromSide(int aSide) { - return super.getAccessibleSlotsFromSide(aSide); - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - if (aIndex >= 3 && aIndex <= 6) { - return super.canInsertItem(aIndex, aStack, aSide); - } - return false; - } - - @Override - public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { - if (aIndex >= 7 && aIndex <= 11) { - return super.canExtractItem(aIndex, aStack, aSide); - } - return false; - } - - @Override - public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - // TODO Auto-generated method stub - return super.canFill(aSide, aFluid); - } - - @Override - public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { - // TODO Auto-generated method stub - return super.canDrain(aSide, aFluid); - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { - // TODO Auto-generated method stub - return super.getTankInfo(aSide); - } - - @Override - public int fill_default( - ForgeDirection aSide, FluidStack aFluid, boolean doFill - ) { - // TODO Auto-generated method stub - return super.fill_default(aSide, aFluid, doFill); - } - - @Override - public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - // TODO Auto-generated method stub - return super.fill(aSide, aFluid, doFill); - } - - @Override - public FluidStack drain( - ForgeDirection aSide, FluidStack aFluid, boolean doDrain - ) { - // TODO Auto-generated method stub - return super.drain(aSide, aFluid, doDrain); - } - - @Override - public FluidStack drain( - ForgeDirection aSide, int maxDrain, boolean doDrain - ) { - // TODO Auto-generated method stub - return super.drain(aSide, maxDrain, doDrain); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java deleted file mode 100644 index 2197ce193d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java +++ /dev/null @@ -1,702 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import java.util.ArrayList; -import java.util.Random; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEntity_DeluxeMachine { - - private boolean mCanProcessRecipe = false; - private boolean mCharging = false; - private long mChargeConsumed = 0; - - private GT_Recipe mLastRecipe; - private long mEUStore; - private boolean mRunningOnLoad = false; - private boolean mMachine = false; - private int mEfficiency, mEfficiencyIncrease, mEfficiencyMax = 0; - private int mStartUpCheck = 100, mUpdate = 0; - private FluidStack[] mOutputFluids = null; - - public GregtechMetaTileEntity_CompactFusionReactor(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "It's like a midget Ra.", 1, 1, "PotionBrewer.png", ""); - } - - public GregtechMetaTileEntity_CompactFusionReactor(String aName, int aTier, String aDescription, - ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - @Override - public String[] getDescription() { - return new String[] { this.mDescription, "Not Very Fast, but not very big either.", - "Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.", - "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2." }; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_CompactFusionReactor(this.mName, this.mTier, this.mDescription, - this.mTextures, this.mGUIName, this.mNEIName); - } - - public int tier() { - return this.mTier; - } - - public int tierOverclock() { - return this.mTier == 6 ? 0 : this.mTier == 7 ? 1 : 2; - } - - private GT_RenderedTexture getCasingTexture() { - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 - : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex - + 1]; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeList() { - return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getBackFacing(); - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return (aFluid.getFluid().getName().contains("plasma")) || (super.isFluidInputAllowed(aFluid)); - } - - @Override - public int getCapacity() { - return 32000; - } - - @Override - public void abortProcess() { - super.abortProcess(); - } - - long mFusionPoint = 20000000L; - - @Override - public int checkRecipe() { - Logger.MACHINE_INFO("Recipe Tick 1."); - if (!this.mCanProcessRecipe) { - Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); - if (this.mChargeConsumed < mFusionPoint) { - Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); - this.mCharging = true; - this.mCanProcessRecipe = false; - if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { - Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" - + mFusionPoint); - mChargeConsumed += (mFusionPoint / 100); - } - } - else { - mChargeConsumed = 0; - this.mCharging = false; - this.mCanProcessRecipe = true; - - } - } - else { - Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); - if (checkRecipeMulti()) { - Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); - return 2; - } - } - Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); - return 0; - } - - public ArrayList getStoredFluids() { - ArrayList mList = new ArrayList(); - mList.add(this.mFluid); - mList.add(this.mFluid2); - return mList; - } - - public boolean checkRecipeMulti() { - ArrayList tFluidList = getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - tFluidList_sS = tFluidList.size(); - } - else { - tFluidList.remove(i--); - tFluidList_sS = tFluidList.size(); - break; - } - } - } - } - if (tFluidList.size() > 1) { - FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - GT_Recipe tRecipe = getRecipeList().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, - GT_Values.V[8], tFluids, new ItemStack[] {}); - if (tRecipe == null) { - return false; - } - if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { - this.mLastRecipe = null; - Logger.MACHINE_INFO("Just plain bad."); - return false; - } - if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { - this.mLastRecipe = tRecipe; - this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); - this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); - - this.mEfficiencyIncrease = 10000; - - this.mOutputFluids = this.mLastRecipe.mFluidOutputs; - mRunningOnLoad = false; - return true; - } - } - return false; - } - - public int overclock(int mStartEnergy) { - if (tierOverclock() == 1) { - return 1; - } - if (tierOverclock() == 2) { - return mStartEnergy < 160000000 ? 2 : 1; - } - return mStartEnergy < 160000000 ? 4 : mStartEnergy < 320000000 ? 2 : 1; - } - - @Override - public boolean displaysItemStack() { - return false; - } - - @Override - public boolean doesAutoOutputFluids() { - return true; - } - - @Override - public boolean doesEmptyContainers() { - return true; - } - - @Override - public boolean doesFillContainers() { - return true; - } - - @Override - public long maxAmperesIn() { - return 16L; - } - - @Override - public long maxEUStore() { - return Long.MAX_VALUE; - } - - @Override - public void doExplosion(long aExplosionPower) { - super.doExplosion(aExplosionPower * 2); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - onRunningTickMulti(); - if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) - && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) - && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { - if (MathUtils.randInt(0, 4) == 4) { - final Random tRandom = aBaseMetaTileEntity.getWorld().rand; - aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", - (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), - aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), - (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D); - aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", - (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F), - aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F), - (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), 0.0D, 0.0D, 0.0D); - aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", - (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F), - aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F), - (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F), 0.0D, 0.0D, 0.0D); - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("mCanProcessRecipe", this.mCanProcessRecipe); - aNBT.setBoolean("mCharging", this.mCharging); - aNBT.setLong("mChargeConsumed", this.mChargeConsumed); - aNBT.setInteger("mEfficiency", this.mEfficiency); - aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease); - aNBT.setInteger("mEfficiencyMax", this.mEfficiencyMax); - aNBT.setInteger("mStartUpCheck", this.mStartUpCheck); - aNBT.setInteger("mUpdate", mUpdate); - aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease); - aNBT.setBoolean("mRunningOnLoad", this.mRunningOnLoad); - aNBT.setBoolean("mMachine", this.mMachine); - aNBT.setLong("mEUStore", this.mEUStore); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - if (mMaxProgresstime > 0) - mRunningOnLoad = true; - this.mCanProcessRecipe = aNBT.getBoolean("mCanProcessRecipe"); - this.mCharging = aNBT.getBoolean("mCharging"); - this.mChargeConsumed = aNBT.getLong("mChargeConsumed"); - this.mEfficiency = aNBT.getInteger("mEfficiency"); - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mEfficiencyMax = aNBT.getInteger("mEfficiencyMax"); - this.mStartUpCheck = aNBT.getInteger("mStartUpCheck"); - this.mUpdate = aNBT.getInteger("mUpdate"); - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mRunningOnLoad = aNBT.getBoolean("mRunningOnLoad"); - this.mMachine = aNBT.getBoolean("mMachine"); - this.mEUStore = aNBT.getLong("mEUStore"); - super.loadNBTData(aNBT); - } - - @Override - public String[] getInfoData() { - String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III"; - float plasmaOut = 0; - String fusionName = ""; - int powerRequired = 0; - if (this.mLastRecipe != null) { - fusionName = this.mLastRecipe.mFluidOutputs[0].getLocalizedName() + " Fusion."; - powerRequired = this.mLastRecipe.mEUt; - if (this.mLastRecipe.getFluidOutput(0) != null) { - plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration; - } - } - - return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t", - "Stored EU: " + this.getEUVar() + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t", - "Current Recipe: " + fusionName }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab) }; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; - } - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), - new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active) }; - } - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; - } - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; - } - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; - } - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) }; - } - - @Override - public void onMachineBlockUpdate() { - this.mUpdate = 50; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - // super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { - // Logger.MACHINE_INFO("1"); - if (mEfficiency < 0) - mEfficiency = 0; - if (mRunningOnLoad) { - Logger.MACHINE_INFO("2"); - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - checkRecipeMulti(); - } - if (--mUpdate == 0 || --mStartUpCheck == 0) { - Logger.MACHINE_INFO("3"); - mMachine = true; - } - if (mStartUpCheck < 0) { - //Logger.MACHINE_INFO("4"); - if (mMachine) { - //Logger.MACHINE_INFO("5"); - - if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { - if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { - //Logger.MACHINE_INFO("5.5 A"); - } - else { - //Logger.MACHINE_INFO("5.5 B"); - } - } - if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Logger.MACHINE_INFO("6"); - stopMachine(); - this.mLastRecipe = null; - } - if (mMaxProgresstime > 0) { - Logger.MACHINE_INFO("7"); - this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); - if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { - if (mOutputFluids != null) - for (FluidStack tStack : mOutputFluids) - if (tStack != null) - addOutput(tStack); - mEfficiency = Math.max(0, (mEfficiency + mEfficiencyIncrease)); - mProgresstime = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - if (mOutputFluids != null && mOutputFluids.length > 0) { - - } - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - if (aBaseMetaTileEntity.isAllowedToWork()) - checkRecipeMulti(); - } - } - else { - //Logger.MACHINE_INFO("8"); - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() - || aBaseMetaTileEntity.hasInventoryBeenModified()) { - Logger.MACHINE_INFO("9"); - // turnCasingActive(mMaxProgresstime > 0); - if (aBaseMetaTileEntity.isAllowedToWork()) { - Logger.MACHINE_INFO("10"); - if (checkRecipeMulti()) { - Logger.MACHINE_INFO("11"); - if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Logger.MACHINE_INFO("12"); - mMaxProgresstime = 0; - // turnCasingActive(false); - } - aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true); - } - } - if (mMaxProgresstime <= 0) - mEfficiency = Math.max(0, mEfficiency - 1000); - } - } - } - else { - // turnCasingActive(false); - Logger.MACHINE_INFO("Bad"); - this.mLastRecipe = null; - stopMachine(); - } - } - Logger.MACHINE_INFO("Good | "+mMaxProgresstime); - aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); - } - } - - public boolean onRunningTickMulti() { - if (this.getBaseMetaTileEntity().isServerSide()) { - if (mEUt < 0) { - if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { - this.mLastRecipe = null; - stopMachine(); - Logger.MACHINE_INFO("a1"); - return false; - } - } - if (this.mEUStore <= 0) { - this.mLastRecipe = null; - stopMachine(); - Logger.MACHINE_INFO("a2"); - return false; - } - } - return true; - } - - public boolean drainEnergyInput(long aEU) { - return false; - } - - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) - return false; - FluidStack copiedFluidStack = aLiquid.copy(); - this.mOutputFluid = copiedFluidStack; - return false; - } - - public void stopMachine() { - mEUt = 0; - mEfficiency = 0; - mProgresstime = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - getBaseMetaTileEntity().disableWorking(); - } - - @Override - public boolean isLiquidInput(byte aSide) { - switch (aSide) { - case 0: - return true; - case 1: - return true; - case 2: - return true; - case 3: - return false; - case 4: - return false; - case 5: - return false; - default: - return false; - } - } - - @Override - public boolean isLiquidOutput(byte aSide) { - switch (aSide) { - case 0: - return false; - case 1: - return false; - case 2: - return false; - case 3: - return true; - case 4: - return true; - case 5: - return true; - default: - return true; - } - } - - @Override - public int fill(FluidStack aFluid, boolean doFill) { - return super.fill(aFluid, doFill); - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) { - return super.drain(maxDrain, doDrain); - } - - @Override - public int getTankPressure() { - return 500; - } - - @Override - public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return false; - } - else { - return super.canFill(aSide, aFluid); - } - } - - @Override - public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.canDrain(aSide, aFluid); - } - else { - return false; - } - } - - @Override - public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return 0; - } - else { - return super.fill_default(aSide, aFluid, doFill); - } - } - - @Override - public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.fill(aSide, aFluid, doFill); - } - else { - return 0; - } - } - - @Override - public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.drain(aSide, aFluid, doDrain); - } - else { - return null; - } - } - - @Override - public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.drain(aSide, maxDrain, doDrain); - } - else { - return null; - } - } - - @Override - public boolean isOverclockerUpgradable() { - return true; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - // TODO Auto-generated method stub - return super.onRightclick(aBaseMetaTileEntity, aPlayer); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { - // TODO Auto-generated method stub - return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - // TODO Auto-generated method stub - return super.getServerGUI(aID, aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - // TODO Auto-generated method stub - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return false; - } - - @Override - public void onExplosion() { - // TODO Auto-generated method stub - super.onExplosion(); - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, - aZ); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java deleted file mode 100644 index 6cae58ced2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java +++ /dev/null @@ -1,704 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import java.util.ArrayList; -import java.util.Random; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_DeluxeMachine { - - private boolean mCanProcessRecipe = false; - private boolean mCharging = false; - private long mChargeConsumed = 0; - - private GT_Recipe mLastRecipe; - private long mEUStore; - private boolean mRunningOnLoad = false; - private boolean mMachine = false; - private int mEfficiency, mEfficiencyIncrease, mEfficiencyMax = 0; - private int mStartUpCheck = 100, mUpdate = 0; - private FluidStack[] mOutputFluids = null; - - public GregtechMetaTileEntity_PocketFusion(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "It's like a midget Ra.", 1, 1, "PotionBrewer.png", ""); - } - - public GregtechMetaTileEntity_PocketFusion(String aName, int aTier, String aDescription, - ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - @Override - public String[] getDescription() { - return new String[] { this.mDescription, "Not Very Fast, but not very big either.", - "Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.", - "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2.", CORE.GT_Tooltip }; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_PocketFusion(this.mName, this.mTier, this.mDescription, - this.mTextures, this.mGUIName, this.mNEIName); - } - - public int tier() { - return this.mTier; - } - - public int tierOverclock() { - return this.mTier == 6 ? 0 : this.mTier == 7 ? 1 : 2; - } - - private GT_RenderedTexture getCasingTexture() { - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 - : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex - + 1]; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeList() { - return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide == this.getBaseMetaTileEntity().getBackFacing(); - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return (aFluid.getFluid().getName().contains("plasma")) || (super.isFluidInputAllowed(aFluid)); - } - - @Override - public int getCapacity() { - return 32000; - } - - @Override - public void abortProcess() { - super.abortProcess(); - } - - long mFusionPoint = 20000000L; - - @Override - public int checkRecipe() { - Logger.MACHINE_INFO("Recipe Tick 1."); - if (!this.mCanProcessRecipe) { - Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); - if (this.mChargeConsumed < mFusionPoint) { - Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); - this.mCharging = true; - this.mCanProcessRecipe = false; - if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { - Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" - + mFusionPoint); - mChargeConsumed += (mFusionPoint / 100); - } - } - else { - mChargeConsumed = 0; - this.mCharging = false; - this.mCanProcessRecipe = true; - - } - } - else { - Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); - if (checkRecipeMulti()) { - Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); - return 2; - } - } - Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); - return 0; - } - - public ArrayList getStoredFluids() { - ArrayList mList = new ArrayList(); - mList.add(this.mFluid); - mList.add(this.mFluid2); - return mList; - } - - public boolean checkRecipeMulti() { - ArrayList tFluidList = getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - for (int i = 0; i < tFluidList_sS - 1; i++) { - for (int j = i + 1; j < tFluidList_sS; j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - tFluidList_sS = tFluidList.size(); - } - else { - tFluidList.remove(i--); - tFluidList_sS = tFluidList.size(); - break; - } - } - } - } - if (tFluidList.size() > 1) { - FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - GT_Recipe tRecipe = getRecipeList().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, - GT_Values.V[8], tFluids, new ItemStack[] {}); - - if (tRecipe == null) { - return false; - } - - if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { - this.mLastRecipe = null; - Logger.MACHINE_INFO("Just plain bad."); - return false; - } - if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { - this.mLastRecipe = tRecipe; - this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); - this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); - - this.mEfficiencyIncrease = 10000; - - this.mOutputFluids = this.mLastRecipe.mFluidOutputs; - mRunningOnLoad = false; - return true; - } - } - return false; - } - - public int overclock(int mStartEnergy) { - if (tierOverclock() == 1) { - return 1; - } - if (tierOverclock() == 2) { - return mStartEnergy < 160000000 ? 2 : 1; - } - return mStartEnergy < 160000000 ? 4 : mStartEnergy < 320000000 ? 2 : 1; - } - - @Override - public boolean displaysItemStack() { - return false; - } - - @Override - public boolean doesAutoOutputFluids() { - return true; - } - - @Override - public boolean doesEmptyContainers() { - return true; - } - - @Override - public boolean doesFillContainers() { - return true; - } - - @Override - public long maxAmperesIn() { - return 16L; - } - - @Override - public long maxEUStore() { - return Long.MAX_VALUE; - } - - @Override - public void doExplosion(long aExplosionPower) { - super.doExplosion(aExplosionPower * 2); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - onRunningTickMulti(); - if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) - && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) - && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { - if (MathUtils.randInt(0, 4) == 4) { - final Random tRandom = aBaseMetaTileEntity.getWorld().rand; - aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", - (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), - aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), - (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D); - aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", - (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F), - aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F), - (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), 0.0D, 0.0D, 0.0D); - aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", - (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F), - aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F), - (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F), 0.0D, 0.0D, 0.0D); - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("mCanProcessRecipe", this.mCanProcessRecipe); - aNBT.setBoolean("mCharging", this.mCharging); - aNBT.setLong("mChargeConsumed", this.mChargeConsumed); - aNBT.setInteger("mEfficiency", this.mEfficiency); - aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease); - aNBT.setInteger("mEfficiencyMax", this.mEfficiencyMax); - aNBT.setInteger("mStartUpCheck", this.mStartUpCheck); - aNBT.setInteger("mUpdate", mUpdate); - aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease); - aNBT.setBoolean("mRunningOnLoad", this.mRunningOnLoad); - aNBT.setBoolean("mMachine", this.mMachine); - aNBT.setLong("mEUStore", this.mEUStore); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - if (mMaxProgresstime > 0) - mRunningOnLoad = true; - this.mCanProcessRecipe = aNBT.getBoolean("mCanProcessRecipe"); - this.mCharging = aNBT.getBoolean("mCharging"); - this.mChargeConsumed = aNBT.getLong("mChargeConsumed"); - this.mEfficiency = aNBT.getInteger("mEfficiency"); - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mEfficiencyMax = aNBT.getInteger("mEfficiencyMax"); - this.mStartUpCheck = aNBT.getInteger("mStartUpCheck"); - this.mUpdate = aNBT.getInteger("mUpdate"); - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); - this.mRunningOnLoad = aNBT.getBoolean("mRunningOnLoad"); - this.mMachine = aNBT.getBoolean("mMachine"); - this.mEUStore = aNBT.getLong("mEUStore"); - super.loadNBTData(aNBT); - } - - @Override - public String[] getInfoData() { - String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III"; - float plasmaOut = 0; - String fusionName = ""; - int powerRequired = 0; - if (this.mLastRecipe != null) { - fusionName = this.mLastRecipe.mFluidOutputs[0].getLocalizedName() + " Fusion."; - powerRequired = this.mLastRecipe.mEUt; - if (this.mLastRecipe.getFluidOutput(0) != null) { - plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration; - } - } - - return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t", - "Stored EU: " + this.getEUVar() + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t", - "Current Recipe: " + fusionName }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab) }; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; - } - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), - new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active) }; - } - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; - } - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; - } - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; - } - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[] { this.getCasingTexture(), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) }; - } - - @Override - public void onMachineBlockUpdate() { - this.mUpdate = 50; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - // super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { - // Logger.MACHINE_INFO("1"); - if (mEfficiency < 0) - mEfficiency = 0; - if (mRunningOnLoad) { - Logger.MACHINE_INFO("2"); - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - checkRecipeMulti(); - } - if (--mUpdate == 0 || --mStartUpCheck == 0) { - Logger.MACHINE_INFO("3"); - mMachine = true; - } - if (mStartUpCheck < 0) { - //Logger.MACHINE_INFO("4"); - if (mMachine) { - //Logger.MACHINE_INFO("5"); - - if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { - if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { - //Logger.MACHINE_INFO("5.5 A"); - } - else { - //Logger.MACHINE_INFO("5.5 B"); - } - } - if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Logger.MACHINE_INFO("6"); - stopMachine(); - this.mLastRecipe = null; - } - if (mMaxProgresstime > 0) { - Logger.MACHINE_INFO("7"); - this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); - if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { - if (mOutputFluids != null) - for (FluidStack tStack : mOutputFluids) - if (tStack != null) - addOutput(tStack); - mEfficiency = Math.max(0, (mEfficiency + mEfficiencyIncrease)); - mProgresstime = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - if (mOutputFluids != null && mOutputFluids.length > 0) { - - } - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - if (aBaseMetaTileEntity.isAllowedToWork()) - checkRecipeMulti(); - } - } - else { - //Logger.MACHINE_INFO("8"); - this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); - if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() - || aBaseMetaTileEntity.hasInventoryBeenModified()) { - Logger.MACHINE_INFO("9"); - // turnCasingActive(mMaxProgresstime > 0); - if (aBaseMetaTileEntity.isAllowedToWork()) { - Logger.MACHINE_INFO("10"); - if (checkRecipeMulti()) { - Logger.MACHINE_INFO("11"); - if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Logger.MACHINE_INFO("12"); - mMaxProgresstime = 0; - // turnCasingActive(false); - } - aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true); - } - } - if (mMaxProgresstime <= 0) - mEfficiency = Math.max(0, mEfficiency - 1000); - } - } - } - else { - // turnCasingActive(false); - Logger.MACHINE_INFO("Bad"); - this.mLastRecipe = null; - stopMachine(); - } - } - Logger.MACHINE_INFO("Good | "+mMaxProgresstime); - aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); - } - } - - public boolean onRunningTickMulti() { - if (this.getBaseMetaTileEntity().isServerSide()) { - if (mEUt < 0) { - if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { - this.mLastRecipe = null; - stopMachine(); - Logger.MACHINE_INFO("a1"); - return false; - } - } - if (this.mEUStore <= 0) { - this.mLastRecipe = null; - stopMachine(); - Logger.MACHINE_INFO("a2"); - return false; - } - } - return true; - } - - public boolean drainEnergyInput(long aEU) { - return false; - } - - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) - return false; - FluidStack copiedFluidStack = aLiquid.copy(); - this.mOutputFluid = copiedFluidStack; - return false; - } - - public void stopMachine() { - mEUt = 0; - mEfficiency = 0; - mProgresstime = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - getBaseMetaTileEntity().disableWorking(); - } - - @Override - public boolean isLiquidInput(byte aSide) { - switch (aSide) { - case 0: - return true; - case 1: - return true; - case 2: - return true; - case 3: - return false; - case 4: - return false; - case 5: - return false; - default: - return false; - } - } - - @Override - public boolean isLiquidOutput(byte aSide) { - switch (aSide) { - case 0: - return false; - case 1: - return false; - case 2: - return false; - case 3: - return true; - case 4: - return true; - case 5: - return true; - default: - return true; - } - } - - @Override - public int fill(FluidStack aFluid, boolean doFill) { - return super.fill(aFluid, doFill); - } - - @Override - public FluidStack drain(int maxDrain, boolean doDrain) { - return super.drain(maxDrain, doDrain); - } - - @Override - public int getTankPressure() { - return 500; - } - - @Override - public boolean canFill(ForgeDirection aSide, Fluid aFluid) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return false; - } - else { - return super.canFill(aSide, aFluid); - } - } - - @Override - public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.canDrain(aSide, aFluid); - } - else { - return false; - } - } - - @Override - public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return 0; - } - else { - return super.fill_default(aSide, aFluid, doFill); - } - } - - @Override - public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.fill(aSide, aFluid, doFill); - } - else { - return 0; - } - } - - @Override - public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.drain(aSide, aFluid, doDrain); - } - else { - return null; - } - } - - @Override - public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { - if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { - return super.drain(aSide, maxDrain, doDrain); - } - else { - return null; - } - } - - @Override - public boolean isOverclockerUpgradable() { - return true; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - // TODO Auto-generated method stub - return super.onRightclick(aBaseMetaTileEntity, aPlayer); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { - // TODO Auto-generated method stub - return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - // TODO Auto-generated method stub - return super.getServerGUI(aID, aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - // TODO Auto-generated method stub - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - return false; - } - - @Override - public void onExplosion() { - // TODO Auto-generated method stub - super.onExplosion(); - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, - aZ); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java deleted file mode 100644 index 85e2df42c9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java +++ /dev/null @@ -1,67 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_ReactorColdTrap extends GT_MetaTileEntity_BasicMachine { - - public GregtechMetaTileEntity_ReactorColdTrap(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, - "Just like the Arctic", 2, 9, "Dehydrator.png", "", - new ITexture[]{ - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP) - } - ); - } - - public GregtechMetaTileEntity_ReactorColdTrap(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, "Does not require ice cubes", CORE.GT_Tooltip}; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_ReactorColdTrap(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeList() { - return GTPP_Recipe.GTPP_Recipe_Map.sColdTrapRecipes; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return super.isFluidInputAllowed(aFluid); - } - - @Override - public int getCapacity() { - return 16000 * Math.max(1, this.mTier); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java deleted file mode 100644 index 60e2ec8c0a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java +++ /dev/null @@ -1,67 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_ReactorProcessingUnit extends GT_MetaTileEntity_BasicMachine { - - public GregtechMetaTileEntity_ReactorProcessingUnit(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, - "Processes Nuclear things", 2, 9, "Dehydrator.png", "", - new ITexture[]{ - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE), - new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP) - } - ); - } - - public GregtechMetaTileEntity_ReactorProcessingUnit(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - @Override - public String[] getDescription() { - return new String[]{this.mDescription, CORE.GT_Tooltip}; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_ReactorProcessingUnit(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeList() { - return GTPP_Recipe.GTPP_Recipe_Map.sReactorProcessingUnitRecipes; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); - } - - @Override - public boolean isFluidInputAllowed(FluidStack aFluid) { - return super.isFluidInputAllowed(aFluid); - } - - @Override - public int getCapacity() { - return 8000 * Math.max(1, this.mTier); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java deleted file mode 100644 index ffaa77a0be..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java +++ /dev/null @@ -1,560 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; - -public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { - - private boolean mHasBeenMapped = false; - private int mCurrentDimension = 0; - public int mMode = 0; - - public GregtechMetaWirelessCharger(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); - } - - public GregtechMetaWirelessCharger(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, - "3 Modes, Long-Range, Local and Mixed.", - "Long-Range: Can supply 2A of power to a single player up to "+(GT_Values.V[this.mTier]*4)+"m away.", - "Local: Can supply several Amps to each player within "+this.mTier*20+"m.", - "Mixed: Provides both 2A of long range and 1A per player locally.", - "Mixed mode is more conservative of power and as a result only", - "Gets half the distances each singular mode gets.", - CORE.GT_Tooltip - }; - } - - public int getTier(){ - return this.mTier; - } - - public int getMode(){ - return this.mMode; - } - - public int getDimensionID(){ - return this.mCurrentDimension; - } - - public Map getLocalMap(){ - return this.mLocalChargingMap; - } - - public Map getLongRangeMap(){ - return this.mWirelessChargingMap; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; - } - - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mWirelessChargingMap.clear(); - mLocalChargingMap.clear(); - - if (!this.getBaseMetaTileEntity().getWorld().playerEntities.isEmpty()){ - for (Object mTempPlayer : this.getBaseMetaTileEntity().getWorld().playerEntities){ - if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ - EntityPlayer mTemp = (EntityPlayer) mTempPlayer; - ChargingHelper.removeValidPlayer(mTemp, this); - } - } - } - - if (this.mMode >= 2){ - this.mMode = 0; - } - else { - this.mMode++; - } - if (this.mMode == 0){ - PlayerUtils.messagePlayer(aPlayer, "Now in Long-Range Charge Mode."); - } - else if (this.mMode == 1){ - PlayerUtils.messagePlayer(aPlayer, "Now in Local Charge Mode."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Now in Mixed Charge Mode."); - } - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaWirelessCharger(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); - } - - @Override public boolean isSimpleMachine() {return false;} - @Override public boolean isElectric() {return true;} - @Override public boolean isValidSlot(final int aIndex) {return true;} - @Override public boolean isFacingValid(final byte aFacing) {return true;} - @Override public boolean isEnetInput() {return true;} - @Override public boolean isEnetOutput() {return false;} - @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isTeleporterCompatible() {return false;} - @Override public long getMinimumStoredEU() {return 0;} - @Override public long maxEUStore() {return GT_Values.V[this.mTier]*128;} - - @Override - public int getCapacity() { - return (int) (GT_Values.V[this.mTier]*32); - } - - @Override - public long maxEUInput() { - return GT_Values.V[this.mTier]; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - if (this.mMode == 0){ - return 2; - } - else if (this.mMode == 1){ - return this.mLocalChargingMap.size()*8; - } - else { - return ((this.mLocalChargingMap.size()*4)+this.mWirelessChargingMap.size()); - } - } - - @Override - public long maxAmperesOut() { - return 0; - } - @Override public int rechargerSlotStartIndex() {return 0;} - @Override public int dechargerSlotStartIndex() {return 0;} - @Override public int rechargerSlotCount() {return 0;} - @Override public int dechargerSlotCount() {return 0;} - @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} - @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) - { - return true; - } - return true; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public String[] getInfoData() { - return new String[] { - this.getLocalName()}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { - } - - @Override - public String getInventoryName() { - return null; - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return false; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mMode", this.mMode); - aNBT.setInteger("mCurrentDimension", this.mCurrentDimension); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mMode = aNBT.getInteger("mMode"); - this.mCurrentDimension = aNBT.getInteger("mCurrentDimension"); - } - - @Override - public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { - super.onFirstTick(aBaseMetaTileEntity); - } - - - private Map mWirelessChargingMap = new HashMap(); - private Map mLocalChargingMap = new HashMap(); - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (this.getBaseMetaTileEntity().isServerSide()) { - - if (this.mCurrentDimension != aBaseMetaTileEntity.getWorld().provider.dimensionId){ - this.mCurrentDimension = aBaseMetaTileEntity.getWorld().provider.dimensionId; - } - - if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){ - mHasBeenMapped = true; - } - - if (aTick % 20 == 0 && mHasBeenMapped){ - if (!aBaseMetaTileEntity.getWorld().playerEntities.isEmpty()){ - for (Object mTempPlayer : aBaseMetaTileEntity.getWorld().playerEntities){ - if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ - EntityPlayer mTemp = (EntityPlayer) mTempPlayer; - - if (this.mMode == 1 || this.mMode == 2){ - int tempRange = (this.mMode == 1 ? this.mTier*20 : this.mTier*10); - if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) < tempRange){ - if (!mLocalChargingMap.containsKey(mTemp.getPersistentID())){ - mLocalChargingMap.put(mTemp.getPersistentID(), mTemp); - ChargingHelper.addValidPlayer(mTemp, this); - //PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m - Local]."); - } - } - else { - if (mLocalChargingMap.containsKey(mTemp.getPersistentID())){ - if (mLocalChargingMap.remove(mTemp.getPersistentID()) != null){ - //PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m - Local]."); - ChargingHelper.removeValidPlayer(mTemp, this); - } - } - } - } - if (this.mMode == 0 || this.mMode == 2){ - int tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); - if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) <= tempRange){ - if (!mWirelessChargingMap.containsKey(mTemp)){ - if (mTemp.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) { - mWirelessChargingMap.put(mTemp, mTemp.getPersistentID()); - ChargingHelper.addValidPlayer(mTemp, this); - PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m - Long-Range]."); - } - } - } - else { - if (mWirelessChargingMap.containsKey(mTemp)){ - if (mWirelessChargingMap.remove(mTemp) != null){ - PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m - Long Range]."); - ChargingHelper.removeValidPlayer(mTemp, this); - } - } - } - if (mWirelessChargingMap.containsKey(mTemp) && !mTemp.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())){ - if (mWirelessChargingMap.remove(mTemp) != null){ - ChargingHelper.removeValidPlayer(mTemp, this); - } - } - } - /*if (this.mMode == 0 || this.mMode == 2){ - int tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); - if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) < tempRange){ - if (!mWirelessChargingMap.containsKey(mTemp)){ - mWirelessChargingMap.put(mTemp, mTemp.getPersistentID()); - PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m]."); - ChargingHelper.addValidPlayer(mTemp, this); - } - } - else { - if (mWirelessChargingMap.containsKey(mTemp)){ - if (mWirelessChargingMap.remove(mTemp) != null){ - PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m]."); - ChargingHelper.removeValidPlayer(mTemp, this); - } - } - } - } */ - - } - } - } - } - - - } - } - - public BlockPos getTileEntityPosition(){ - return new BlockPos(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld()); - } - - public BlockPos getPositionOfEntity(Entity mEntity){ - if (mEntity == null){ - return null; - } - return EntityUtils.findBlockPosUnderEntity(mEntity); - } - - public double getDistanceBetweenTwoPositions(BlockPos objectA, BlockPos objectB){ - if (objectA == null || objectB == null){ - return 0f; - } - int[] objectArray1 = new int[]{objectA.xPos, objectA.yPos, objectA.zPos}; - int[] objectArray2 = new int[]{objectB.xPos, objectB.yPos, objectB.zPos}; - - final double distance = Math.sqrt( - (objectArray2[0]-objectArray1[0])*(objectArray2[0]-objectArray1[0]) - +(objectArray2[1]-objectArray1[1])*(objectArray2[1]-objectArray1[1]) - +(objectArray2[2]-objectArray1[2])*(objectArray2[2]-objectArray1[2])); - return distance; - } - - @Override - public void onRemoval() { - - ChargingHelper.removeEntry(getTileEntityPosition(), this); - - mWirelessChargingMap.clear(); - mLocalChargingMap.clear(); - if (!this.getBaseMetaTileEntity().getWorld().playerEntities.isEmpty()){ - for (Object mTempPlayer : this.getBaseMetaTileEntity().getWorld().playerEntities){ - if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ - EntityPlayer mTemp = (EntityPlayer) mTempPlayer; - ChargingHelper.removeValidPlayer(mTemp, this); - } - } - } - - - super.onRemoval(); - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, - EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { - - int tempRange; - - if (this.mMode == 0 || this.mMode == 2){ - tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); - } - else { - tempRange = this.mMode == 1 ? this.mTier*20 : this.mTier*10; - } - - if (this.mMode == 2){ - PlayerUtils.messagePlayer(aPlayer, "Mixed Mode | Local: "+this.mTier*10+"m | Long: "+tempRange+"m"); - } - else if (this.mMode == 1){ - PlayerUtils.messagePlayer(aPlayer, "Local Mode: "+this.mTier*20+"m"); - - } - else { - PlayerUtils.messagePlayer(aPlayer, "Long-range Mode: "+tempRange+"m"); - - } - - return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); - } - - @Override - public void onServerStart() { - mWirelessChargingMap.clear(); - mLocalChargingMap.clear(); - super.onServerStart(); - } - - @Override - public void onExplosion() { - ChargingHelper.removeEntry(getTileEntityPosition(), this); - super.onExplosion(); - } - - @Override - public void doExplosion(long aExplosionPower) { - ChargingHelper.removeEntry(getTileEntityPosition(), this); - super.doExplosion(aExplosionPower); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){ - mHasBeenMapped = true; - } - super.onPreTick(aBaseMetaTileEntity, aTick); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java deleted file mode 100644 index b8f24d6c5e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java +++ /dev/null @@ -1,323 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; - -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.*; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.ItemStackData; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { - - private long mVoltage; - private byte mTier; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GMTE_AmazonPackager(mName); - } - - public GMTE_AmazonPackager(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GMTE_AmazonPackager(String aName) { - super(aName); - } - - @Override - public String getMachineType() { - return "Packager"; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "Generic3By3"; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GMTE_AmazonPackager::addAmazonPackagerList, TAE.getIndexFromPage(2, 9), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 9 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - - - public final boolean addAmazonPackagerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Amazon Warehouse") - .addInfo("This Multiblock is used for EXTREME packaging requirements") - .addInfo("Dust Schematics are inserted into the input busses") - .addInfo("If inserted into the controller, it is shared across all busses") - .addInfo("1x, 2x, 3x & Other Schematics are to be placed into the controller GUI slot") - .addInfo("Uncomparably fast compared to a single packager of the same tier") - .addInfo("Only uses 75% of the eu/t normally required") - .addInfo("Processes five items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo("Supply Depot Casings", 10) - .addInputBus("Any casing", 1) - .addOutputBus("Any casing", 1) - .addEnergyHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .addMufflerHatch("Any casing", 1) - .toolTipFinisher("GT++"); - return tt; - } - - private final void initFields() { - mVoltage = getMaxInputVoltage(); - mTier = (byte) Math.max(1, GT_Utility.getTier(mVoltage)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(2, 1)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(2, 1))}; - } - - - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; - } - - public void sortInputBusses() { - for (GT_MetaTileEntity_Hatch_InputBus h : this.mInputBusses) { - h.updateSlots(); - } - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - - //Just the best place to check this~ - initFields(); - - ArrayList tItems = getStoredInputs(); - if (this.getGUIItemStack() != null) { - tItems.add(this.getGUIItemStack()); - } - ArrayList tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - boolean state = checkRecipeGeneric(tItemInputs, tFluidInputs, 5 * GT_Utility.getTier(this.getMaxInputVoltage()), 75, 500, 10000); - - - if (state) { - return true; - } - else { - tItems = getStoredInputs(); - AutoMap mCompleted = new AutoMap(); - AutoMap mSchematics = new AutoMap(); - for (ItemStack tInputItem : tItems) { - if (tInputItem != null) { - if (ItemList.Schematic_1by1.isStackEqual((Object) tInputItem) || ItemList.Schematic_2by2.isStackEqual((Object) tInputItem) || ItemList.Schematic_3by3.isStackEqual((Object) tInputItem)) { - mSchematics.put(new ItemStackData(tInputItem)); - } - } - } - if (mSchematics.size() > 0) { - for (ItemStackData g : mSchematics) { - for (ItemStack tInputItem : tItems) { - if (tInputItem != null) { - mCompleted.put(new ItemStackData(tInputItem)); - checkRecipe(tInputItem, g.getStack()); - } - } - } - } - - return mCompleted != null && mCompleted.size() > 0; - } - } - - public boolean checkRecipe(ItemStack inputStack, ItemStack schematicStack) { - if (GT_Utility.isStackValid((Object) inputStack) && GT_Utility.isStackValid((Object) schematicStack) - && GT_Utility.getContainerItem(inputStack, true) == null) { - ItemStack tOutputStack; - if (ItemList.Schematic_1by1.isStackEqual((Object) schematicStack)&& inputStack.stackSize >= 1) { - tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{inputStack}); - if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { - final ItemStack input = inputStack; - --input.stackSize; - this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); - //this.mMaxProgresstime = 16 / (1 << this.mTier - 1); - this.mMaxProgresstime = 2; - this.addOutput(tOutputStack); - updateSlots(); - return true; - } - return false; - } else if (ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) - && inputStack.stackSize >= 4) { - tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{inputStack, - inputStack, null, inputStack, inputStack}); - if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { - final ItemStack input2 = inputStack; - input2.stackSize -= 4; - this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); - //this.mMaxProgresstime = 32 / (1 << this.mTier - 1); - this.mMaxProgresstime = 4; - this.addOutput(tOutputStack); - updateSlots(); - return true; - } - return false; - } else if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack) - && inputStack.stackSize >= 9) { - tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{inputStack, - inputStack, inputStack, inputStack, inputStack, - inputStack, inputStack, inputStack, inputStack}); - if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { - final ItemStack input3 = inputStack; - input3.stackSize -= 9; - this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); - //this.mMaxProgresstime = 64 / (1 << this.mTier - 1); - this.mMaxProgresstime = 6; - this.addOutput(tOutputStack); - updateSlots(); - return true; - } - return false; - } - } - return false; - } - - public boolean allowPutStack(final ItemStack aStack, ItemStack schematicStack) { - //If Schematic Static is not 1x1, 2x2, 3x3 - if (!ItemList.Schematic_1by1.isStackEqual((Object) schematicStack) && !ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) && !ItemList.Schematic_3by3.isStackEqual((Object) schematicStack)) { - return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack); - } - //Something - if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe((IHasWorldObjectAndCoords) this.getBaseMetaTileEntity(), true, GT_Values.V[this.mTier], - (FluidStack[]) null, new ItemStack[]{GT_Utility.copyAmount(64L, new Object[]{aStack}), schematicStack}) != null) { - return true; - } - //1x1 - if (ItemList.Schematic_1by1.isStackEqual((Object) schematicStack) - && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack}) != null) { - return true; - } - //2x2 - if (ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) - && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, null, aStack, aStack}) != null) { - return true; - } - //3x3 - if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack) && GT_ModHandler.getRecipeOutput( - new ItemStack[]{aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack}) != null) { - return true; - } - return false; - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); - } - - @Override - public int getMaxEfficiency(ItemStack p0) { - return 10000; - } - - @Override - public int getPollutionPerSecond(ItemStack arg0){ - return CORE.ConfigSwitches.pollutionPerSecondMultiPackager; - } - - @Override - public int getMaxParallelRecipes() { - return 9; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java deleted file mode 100644 index 7ddf16b36f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java +++ /dev/null @@ -1,479 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; - -import static gregtech.api.enums.GT_Values.*; - -import java.util.*; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.entity.EntityTeslaTowerLightning; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraftforge.common.util.ForgeDirection; - -public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { - - private Block casingBlock; - private int casingMeta; - private int frameMeta; - private int casingTextureIndex; - - private ForgeDirection back; - - private int xLoc, yLoc, zLoc; - - protected int mRange; - */ -/** - * Machine Mode, - * {@value false} Attacks all entities, - * {@value true} Only attacks players. - *//* - - protected volatile boolean mMode = false; - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMTE_TeslaTower(mName); - } - - public GregtechMTE_TeslaTower(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - initFields(); - } - - public GregtechMTE_TeslaTower(String aName) { - super(aName); - initFields(); - } - - @Override - public String getMachineType() { - return "Weaponized Lighting Rod"; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String[] getTooltip() { - String casings = getCasingBlockItem().get(0).getDisplayName(); - return new String[]{ - "Controller Block for the Tesla Defence Tower Mk3200", - "Enemies within "+this.mRange+"m are blasted with a high energy plasma.", - "This uses 5,000,000EU per blast.", - "Can screwdriver to toggle mode between Players and all Entities.", - "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", - "3x1x3 Base of " + casings, - "1x3x1 " + casings + " pillar (Center of base)", - "1x3x1 " + MaterialUtils.getMaterialName(getFrameMaterial()) + " Frame Boxes (Each pillar side and on top)", - "1x Maintenance Hatch (One of base casings)", - "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)"}; - } - - private final void initFields() { - casingBlock = ModBlocks.blockCasings2Misc; - casingMeta = getCasingBlockItem().get(0).getItemDamage(); - int frameId = 4096 + getFrameMaterial().mMetaItemSubID; - frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; - casingTextureIndex = getCasingTextureIndex(); - mRange = 50; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("mMode", this.mMode); - aNBT.setInteger("mRange", this.mRange); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - this.mMode = aNBT.getBoolean("mMode"); - this.mRange = aNBT.getInteger("mRange"); - super.loadNBTData(aNBT); - } - - private boolean isEnergyEnough() { - if (this.getEUVar() >= 5000000){ - return true; - } - return false; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - */ -/*if (!isEnergyEnough()) { - this.mProgresstime = 0; - this.mMaxProgresstime = 20; - this.getBaseMetaTileEntity().setActive(false); - stopMachine(); - } - else {*//* -*/ -/* - this.mProgresstime = 1; - this.mMaxProgresstime = 100; - this.getBaseMetaTileEntity().setActive(true);*//* - - //} - return false; - } - - @Override - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - updateCoordinates(); - //check base layer - for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) { - for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) { - if (xOff == 0 && zOff == 0) continue; - - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff); - if (!checkCasingBlock(xOff, 0, zOff) - && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex) - && !addEnergyInputToMachineList(tTileEntity, casingTextureIndex)){ - Logger.INFO("bad block"); - return false; - } - } - } - if(!checkHatches()){ - Logger.INFO("bad Hatches"); - return false; - } - if (GT_Utility.getTier(getMaxInputVoltage()) < getMinTier()){ - Logger.INFO("bad Voltage"); - return false; - } - //check tower - for (int yOff = 1; yOff < 4; yOff++) { - if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ) - || !checkFrameBlock(back.offsetX + 1, yOff, back.offsetZ) - || !checkFrameBlock(back.offsetX - 1, yOff, back.offsetZ) - || !checkFrameBlock(back.offsetX, yOff, back.offsetZ + 1) - || !checkFrameBlock(back.offsetX, yOff, back.offsetZ - 1) - || !checkFrameBlock(back.offsetX, yOff + 3, back.offsetZ)){ - Logger.INFO("bad frame?"); - return false; - } - } - Logger.INFO("good"); - return true; - } - - private void updateCoordinates() { - casingTextureIndex = getCasingTextureIndex(); - mRange = 50; - xLoc = getBaseMetaTileEntity().getXCoord(); - yLoc = getBaseMetaTileEntity().getYCoord(); - zLoc = getBaseMetaTileEntity().getZCoord(); - back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()); - } - - protected boolean checkCasingBlock(int xOff, int yOff, int zOff) { - Logger.INFO("Looking For Casing."); - return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta); - } - //meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation) - protected boolean checkFrameBlock(int xOff, int yOff, int zOff) { - Logger.INFO("Looking For Frame."); - return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta); - } - - protected boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) { - return checkBlockAndMeta(xLoc + xOff, yLoc + yOff, zLoc + zOff, block, meta); - } - - private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) { - Logger.INFO("Found: "+getBaseMetaTileEntity().getBlock(x, y, z).getLocalizedName()+" | Meta: "+getBaseMetaTileEntity().getMetaID(x, y, z)); - Logger.INFO("Expected: "+block.getLocalizedName()+" | Meta: "+meta); - return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta) - && getBaseMetaTileEntity().getBlock(x, y, z) == block; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - protected int getMinTier() { - return 7; - } - - protected boolean checkHatches() { - return !mMaintenanceHatches.isEmpty() && !mEnergyHatches.isEmpty(); - } - - private Map, Entity> mInRange = new HashMap, Entity>(); - - @SuppressWarnings("unchecked") - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - try { - if (this.getBaseMetaTileEntity().isServerSide()){ - if (this.mEnergyHatches.size() > 0) { - for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches){ - if (isValidMetaTileEntity(tHatch)) { - long mHT = tHatch.getBaseMetaTileEntity().getInputVoltage(); - if (tHatch.getEUVar() >= mHT) { - for (int o=0;o<(tHatch.getEUVar()/mHT);o++){ - //1A - if (this.getEUVar()<(this.maxEUStore()-mHT)){ - tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mHT, false); - this.setEUVar(this.getEUVar()+mHT); - } - //2A - if (this.getEUVar()<(this.maxEUStore()-mHT)){ - tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mHT, false); - this.setEUVar(this.getEUVar()+mHT); - } - } - } - } - } - } - - if (aTick % 10 == 0){ - if (this.getEUVar() >= 5000000){ - //Logger.INFO("Can Zap."); - this.getBaseMetaTileEntity().enableWorking(); - this.getBaseMetaTileEntity().setActive(true); - if (this.mProgresstime <= 0){ - this.mProgresstime++; - } - else if (this.mProgresstime >= 100){ - this.mProgresstime = 0; - } - this.mMaxProgresstime = 10000; - } - //Logger.INFO("Allowed to be Working? "+this.getBaseMetaTileEntity().isAllowedToWork()); - //Logger.INFO("Working? "+this.getBaseMetaTileEntity().isActive()); - //Logger.INFO("Has Working just been enabled? "+this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()); - } - - - if (aTick % 20 == 0){ - List o = aBaseMetaTileEntity.getWorld().loadedEntityList; - //Clean up old entities first - if (this.mInRange.size() > 0){ - for (Entity j : this.mInRange.values()){ - if (((Entity) j).getDistance(this.xLoc, this.yLoc, this.zLoc) > this.mRange){ - mInRange.remove(new Pair(((Entity) j).getUniqueID().getMostSignificantBits(), ((Entity) j).getUniqueID().getLeastSignificantBits()), (Entity) j); - } - } - } - //Add new entities - if (o.size() > 0){ - for (Object r : o){ - if (r instanceof Entity){ - if (!((Entity) r).getUniqueID().equals(getOwner())){ - if (((Entity) r).isEntityAlive() || r instanceof EntityLiving){ - if (((Entity) r).getDistance(this.xLoc, this.yLoc, this.zLoc) <= this.mRange){ - if (r instanceof EntityItem){ - //Do nothing - } - else { - if (!this.mMode){ - mInRange.put(new Pair(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); - } - else { - if (r instanceof EntityPlayer){ - mInRange.put(new Pair(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); - } - } - } - } - } - } - } - } - } - } - } - } - catch (Throwable r){ - - } - super.onPreTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - try { - if (this.getBaseMetaTileEntity().isServerSide()){ - //Handle Progress Time - if (this.getEUVar() >= 0 && !this.getBaseMetaTileEntity().isAllowedToWork()){ - this.mProgresstime = 20; - this.mMaxProgresstime = 40; - } - else if (this.getEUVar() >= 0 && this.getBaseMetaTileEntity().isAllowedToWork()){ - this.mProgresstime = 20; - this.mMaxProgresstime = 40; - } - - if (aTick % 10 == 0){ - if (this.mInRange.size() > 0){ - if (this.getEUVar() >= 5000000){ - - for (Entity f : mInRange.values()){ - if (f instanceof EntityLiving){ - int j1 = (int) f.posX; - int l1 = (int) f.posY; - int k1 = (int) f.posZ; - World world = aBaseMetaTileEntity.getWorld(); - - if (f.isEntityAlive() && !f.getUniqueID().equals(getOwner())){ - //if (world.canLightningStrikeAt(j1, l1+1, k1)){ - //if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1))){ - if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1, f, getOwner()))){ - if (f == null || f.isDead || !f.isEntityAlive()){ - this.mInRange.remove(new Pair(f.getUniqueID().getMostSignificantBits(), f.getUniqueID().getLeastSignificantBits())); - } - this.setEUVar(this.getEUVar()-5000000); - } - //} - } - - } - } - } - } - } - } - } - catch (Throwable r){ - - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - - protected GregtechItemList getCasingBlockItem() { - return GregtechItemList.Casing_TeslaTower; - } - - protected Materials getFrameMaterial() { - */ -/*casingBlock = getCasingBlockItem().getBlock(); - casingMeta = getCasingBlockItem().get(0).getItemDamage(); - int frameId = 4096 + getFrameMaterial().mMetaItemSubID; - frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; - *//* -return Materials.get("TungstenCarbide"); - } - - protected int getCasingTextureIndex() { - return TAE.GTPP_INDEX(30); - } - - public UUID getOwner(){ - return PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public long maxAmperesIn() { - return 32; - } - - @Override - public long maxEUInput() { - return 131072; - } - - @Override - public long maxEUStore() { - return Integer.MAX_VALUE; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mMode = Utils.invertBoolean(mMode); - this.mInRange.clear(); - if (mMode){ - PlayerUtils.messagePlayer(aPlayer, "[Tesla Tower] Now only targetting players."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "[Tesla Tower] Targetting all types of entities."); - } - } - - @Override - public int getMaxParallelRecipes() { - return 0; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java deleted file mode 100644 index df01d01679..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java +++ /dev/null @@ -1,403 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gtPlusPlus.core.lib.CORE; -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_MultiBlockBase { - - public static int CASING_TEXTURE_ID; - private HeatingCoilLevel mHeatingCapacity; - private int mLevel = 0; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialAlloySmelter(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 1); - } - - public GregtechMetaTileEntity_IndustrialAlloySmelter(String aName) { - super(aName); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 1); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialAlloySmelter(this.mName); - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiFurnace.png"); - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialAlloySmelter; - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Alloy Smelter"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Alloy Smelter") - .addInfo("Gains one parallel per voltage tier") - .addInfo("Gains one multiplier per coil tier") - .addInfo("parallel = tier * coil tier") - .addInfo("Gains 5% speed bonus per coil tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 5, 3, true) - .addController("Bottom center") - .addCasingInfo("Inconel Reinforced Casings", 10) - .addCasingInfo("Integral Encasement V", 8) - .addCasingInfo("Heating Coils", 16) - .addInputBus("Any Inconel Reinforced Casing", 1) - .addOutputBus("Any Inconel Reinforced Casing", 1) - .addEnergyHatch("Any Inconel Reinforced Casing", 1) - .addMaintenanceHatch("Any Inconel Reinforced Casing", 1) - .addMufflerHatch("Any Inconel Reinforced Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"HHH", "H-H", "HHH"}, - {"VVV", "V-V", "VVV"}, - {"HHH", "H-H", "HHH"}, - {"C~C", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialAlloySmelter::addIndustrialAlloySmelterList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 1 - ) - ) - ) - ) - .addElement( - 'H', - ofCoil( - GregtechMetaTileEntity_IndustrialAlloySmelter::setCoilLevel, GregtechMetaTileEntity_IndustrialAlloySmelter::getCoilLevel - ) - ) - .addElement( - 'V', - ofBlock( - ModBlocks.blockCasingsTieredGTPP, 4 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public final boolean addIndustrialAlloySmelterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName, stackSize, hintsOnly, 1, 4, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mLevel = 0; - setCoilLevel(HeatingCoilLevel.None); - return checkPiece(mName, 1, 4, 0) && mCasing >= 10 && getCoilLevel() != HeatingCoilLevel.None && (mLevel = getCoilLevel().getTier() + 1) > 0 && checkHatch(); - } - - @Override - public int getMaxParallelRecipes() { - return (this.mLevel * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - - @Override - public boolean checkRecipe(ItemStack aStack) { - FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tInputs = new ArrayList<>(); - if (isValidMetaTileEntity(tBus)) { - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) { - tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - if (tInputs.size() > 1) { - ItemStack[] tItems = tInputs.toArray(new ItemStack[0]); - if (checkRecipeGeneric(tItems, tFluids, getMaxParallelRecipes(), 100, 5 * this.mLevel, 10000)) { - return true; - } - } - } - return false; - } - - @Override - public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, - int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[] {}; - this.mOutputFluids = new FluidStack[] {}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - Logger.WARNING("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - Logger.WARNING("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe == null) { - Logger.WARNING("BAD RETURN - 1"); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - Logger.WARNING("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - int tHeatCapacityDivTiers = (int) mHeatingCapacity.getHeat() / 900; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - // Count recipes to do in parallel, consuming input items and fluids and - // considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - Logger.WARNING("Broke at " + parallelRecipes + "."); - break; - } - Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + "."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - Logger.WARNING("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = mLevel * 5; - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - int rInt = 2; - - this.mEUt = (int) Math.max(Math.ceil(tTotalEUt), 1); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= (tHeatCapacityDivTiers >= rInt ? 4 : 2); - } - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) - tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - Logger.WARNING("GOOD RETURN - 1"); - return true; - - } - - public HeatingCoilLevel getCoilLevel() { - return mHeatingCapacity; - } - - public void setCoilLevel(HeatingCoilLevel aCoilLevel) { - mHeatingCapacity = aCoilLevel; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java deleted file mode 100644 index 35a92d5be3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java +++ /dev/null @@ -1,320 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialArcFurnace -extends GregtechMeta_MultiBlockBase { - - //862 - private static final int mCasingTextureID = TAE.getIndexFromPage(3, 3); - public static String mCasingName = "Tempered Arc Furnace Casing"; - private boolean mPlasmaMode = false; - private int mSize = 0; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialArcFurnace(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); - } - - public GregtechMetaTileEntity_IndustrialArcFurnace(final String aName) { - super(aName); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialArcFurnace(this.mName); - } - - @Override - public String getMachineType() { - return "(Plasma/Electric) Arc Furnace"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); - } - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for Industrial Arc Furnace") - .addInfo("250% faster than using single block machines of the same voltage") - .addInfo("Processes 8 items per voltage tier") - .addInfo("Max Size required to process Plasma recipes") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .addController("Top center") - .addStructureInfo("Size: nx3xn [WxHxL] (Hollow)") - .addStructureInfo("n can be 3, 5 or 7") - .addCasingInfo(mCasingName, 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName + "3", new String[][]{ - {"CCC", "C~C", "CCC"}, - {"CCC", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - }) - .addShape(mName + "5", new String[][]{ - {"CCCCC", "CCCCC", "CC~CC", "CCCCC", "CCCCC"}, - {"CCCCC", "C---C", "C---C", "C---C", "CCCCC"}, - {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, - }) - .addShape(mName + "7", new String[][]{ - {"CCCCCCC", "CCCCCCC", "CCCCCCC", "CCC~CCC", "CCCCCCC", "CCCCCCC", "CCCCCCC"}, - {"CCCCCCC", "C-----C", "C-----C", "C-----C", "C-----C", "C-----C", "CCCCCCC"}, - {"CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC"}, - }) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialArcFurnace::addIndustrialArcFurnaceList, mCasingTextureID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings4Misc, 3 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public void clearHatches() { - mOutputHatches.clear(); - mInputHatches.clear(); - mOutputBusses.clear(); - mInputBusses.clear(); - mEnergyHatches.clear(); - mMaintenanceHatches.clear(); - mMufflerHatches.clear(); - } - - public final boolean addIndustrialArcFurnaceList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - int size; - switch (stackSize.stackSize) { - case 1: size = 3; break; - case 2: size = 5; break; - default: size = 7; break; - } - buildPiece(mName + size, stackSize, hintsOnly, (size - 1) / 2, (size - 1) / 2, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mSize = 0; - if (checkPiece(mName + "3", 1, 1, 0)) { - mSize = 3; - return mCasing >= 10 && checkHatch(); - } - mCasing = 0; - clearHatches(); - if (checkPiece(mName + "5", 2, 2, 0)) { - mSize = 5; - return mCasing >= 10 && checkHatch(); - } - mCasing = 0; - clearHatches(); - if (checkPiece(mName + "7", 3, 3, 0)) { - mSize = 3; - return mCasing >= 10 && checkHatch(); - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(207)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(mCasingTextureID), - new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(mCasingTextureID)}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialExtruder"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return mPlasmaMode ? GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes : GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return this.checkRecipeGeneric(this.mSize * 8 * GT_Utility.getTier(this.getMaxInputVoltage()), 100, 250); - } - - @Override - public int getMaxParallelRecipes() { - return (this.mSize * 8 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialArcFurnace; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings4Misc; - } - - - public byte getCasingMeta() { - return 3; - } - - public Block getCasingBlock2() { - return ModBlocks.blockCasings3Misc; - } - - - public byte getCasingMeta2() { - return 15; - } - - public byte getCasingTextureIndex() { - return (byte) mCasingTextureID; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (this.mSize > 3) { - this.mPlasmaMode = Utils.invertBoolean(mPlasmaMode); - if (mPlasmaMode) { - PlayerUtils.messagePlayer(aPlayer, "["+EnumChatFormatting.RED+"MODE"+EnumChatFormatting.RESET+"] "+EnumChatFormatting.LIGHT_PURPLE+"Plasma"+EnumChatFormatting.RESET); - } - else { - PlayerUtils.messagePlayer(aPlayer, "["+EnumChatFormatting.RED+"MODE"+EnumChatFormatting.RESET+"] "+EnumChatFormatting.YELLOW+"Electric"+EnumChatFormatting.RESET); - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mPlasmaMode", mPlasmaMode); - aNBT.setInteger("mSize", mSize); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mPlasmaMode = aNBT.getBoolean("mPlasmaMode"); - mSize = aNBT.getInteger("mSize"); - } - - @Override - public void onMachineBlockUpdate() { - mUpdate = 100; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java deleted file mode 100644 index 8802a7148b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java +++ /dev/null @@ -1,263 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialCentrifuge -extends GregtechMeta_MultiBlockBase { - - private boolean mIsAnimated; - private static ITexture frontFace; - private static ITexture frontFaceActive; - private static CustomIcon GT9_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); - private static CustomIcon GT9_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - //public static double recipesComplete = 0; - - public GregtechMetaTileEntity_IndustrialCentrifuge(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - frontFaceActive = new GT_RenderedTexture(GT9_5_Active); - frontFace = new GT_RenderedTexture(GT9_5); - mIsAnimated = true; - } - - public GregtechMetaTileEntity_IndustrialCentrifuge(final String aName) { - super(aName); - mIsAnimated = true; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialCentrifuge(this.mName); - } - - @Override - public String getMachineType() { - return "Centrifuge"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Centrifuge") - .addInfo("125% faster than using single block machines of the same voltage") - .addInfo("Disable animations with a screwdriver") - .addInfo("Only uses 90% of the eu/t normally required") - .addInfo("Processes six items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Centrifuge Casings", 10) - .addInputBus("Any Casing except front", 1) - .addOutputBus("Any Casing except front", 1) - .addInputHatch("Any Casing except front", 1) - .addOutputHatch("Any Casing except front", 1) - .addEnergyHatch("Any Casing except front", 1) - .addMaintenanceHatch("Any Casing except front", 1) - .addMufflerHatch("Any Casing except front", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialCentrifuge::addIndustrialCentrifugeList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 0 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); - } - - public final boolean addIndustrialCentrifugeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(0)), aFacing == aSide ? aActive ? getFrontFacingTurbineTexture(aActive) : getFrontFacingTurbineTexture(aActive) : Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(0))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialCentrifuge"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(6* GT_Utility.getTier(this.getMaxInputVoltage()), 90, 125); - } - - @Override - public int getMaxParallelRecipes() { - return (6 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 90; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasingsMisc; - } - - public byte getCasingMeta() { - return 0; - } - - public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(0); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialCentrifuge; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - this.mIsAnimated = !mIsAnimated; - Logger.INFO("Is Centrifuge animated "+this.mIsAnimated); - if (this.mIsAnimated) { - PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture. "); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture. "); - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mIsAnimated", mIsAnimated); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - if (aNBT.hasKey("mIsAnimated")) { - mIsAnimated = aNBT.getBoolean("mIsAnimated"); - } - else { - mIsAnimated = true; - } - } - - public boolean usingAnimations() { - //Logger.INFO("Is animated? "+this.mIsAnimated); - return this.mIsAnimated; - } - - private ITexture getFrontFacingTurbineTexture(boolean isActive) { - if (usingAnimations()) { - if (isActive) { - return frontFaceActive; - } - } - return frontFace; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java deleted file mode 100644 index 21caf135b1..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java +++ /dev/null @@ -1,230 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialCokeOven -extends GregtechMeta_MultiBlockBase { - private int mLevel = 0; - private int mCasing; - private int mCasing1; - private int mCasing2; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialCokeOven(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialCokeOven(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialCokeOven(this.mName); - } - - @Override - public String getMachineType() { - return "Coke Oven"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Processes Logs and Coal into Charcoal and Coal Coke.") - .addInfo("Controller Block for the Industrial Coke Oven") - .addInfo("Gain 4% speed bonus per voltage tier increased") - .addInfo("Process 12x materials with Heat Resistant Casings") - .addInfo("Or 24x materials with Heat Proof Casings") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front middle at bottom") - .addCasingInfo("Structural Coke Oven Casings", 8) - .addCasingInfo("Heat Resistant/Proof Coke Oven Casings", 8) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "C-C", "CCC"}, - {"HHH", "H-H", "HHH"}, - {"C~C", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialCokeOven::addIndustrialCokeOvenList, TAE.GTPP_INDEX(1), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 1 - ) - ) - ) - ) - .addElement( - 'H', - ofChain( - onElementPass( - x -> ++x.mCasing1, - ofBlock( - ModBlocks.blockCasingsMisc, 2 - ) - ), - onElementPass( - x -> ++x.mCasing2, - ofBlock( - ModBlocks.blockCasingsMisc, 3 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 2, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mCasing1 = 0; - mCasing2 = 0; - mLevel = 0; - if (checkPiece(mName, 1, 2, 0)) { - if (mCasing1 == 8) mLevel = 1; - if (mCasing2 == 8) mLevel = 2; - return mLevel > 0 && mCasing >= 8 && checkHatch(); - } - return false; - } - - public final boolean addIndustrialCokeOvenList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(207)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "CokeOven"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes; - - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); - } - - @Override - public int getMaxParallelRecipes() { - return this.mLevel * 12; - } - - @Override - public int getEuDiscountForParallelism() { - return (100-(GT_Utility.getTier(this.getMaxInputVoltage())*4)); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialCokeOven; - } - - @Override - public int getAmountOfOutputs() { - return 24; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java deleted file mode 100644 index bf5f8aaeaf..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java +++ /dev/null @@ -1,234 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialCuttingMachine -extends GregtechMeta_MultiBlockBase { - - private boolean mCuttingMode = true; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialCuttingMachine(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialCuttingMachine(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialCuttingMachine(this.mName); - } - - @Override - public String getMachineType() { - return "Cutting Machine / Slicing Machine"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Cutting Factory") - .addInfo("200% faster than using single block machines of the same voltage") - .addInfo("Only uses 75% of the eu/t normally required") - .addInfo("Processes four items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 5, true) - .addController("Front Center") - .addCasingInfo("Cutting Factory Frames", 26) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC", "CCC", "CCC"}, - {"C~C", "C-C", "C-C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialCuttingMachine::addIndustrialCuttingMachineList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 13 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 26 && checkHatch(); - } - - public final boolean addIndustrialCuttingMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(29)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(29))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialCuttingMachine"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return mCuttingMode ? GT_Recipe.GT_Recipe_Map.sCutterRecipes : GT_Recipe.GT_Recipe_Map.sSlicerRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 200); - } - - @Override - public int getMaxParallelRecipes() { - return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 75; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialCuttingMachine; - } - - @Override - public int getAmountOfOutputs() { - return 2; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings2Misc; - } - - - public byte getCasingMeta() { - return 13; - } - - - public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(29); - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mCuttingMode = Utils.invertBoolean(mCuttingMode); - String aMode = mCuttingMode ? "Cutting" : "Slicing"; - PlayerUtils.messagePlayer(aPlayer, "Mode: "+aMode); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mCuttingMode", mCuttingMode); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - if (aNBT.hasKey("mCuttingMode")) { - mCuttingMode = aNBT.getBoolean("mCuttingMode"); - } - else { - mCuttingMode = true; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java deleted file mode 100644 index 44552ea2f7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java +++ /dev/null @@ -1,415 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gtPlusPlus.core.lib.CORE; -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_MultiBlockBase { - - private static int CASING_TEXTURE_ID; - private static String mCasingName = "Vacuum Casing"; - private HeatingCoilLevel mHeatingCapacity; - private boolean mDehydratorMode = false; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialDehydrator(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - CASING_TEXTURE_ID = TAE.getIndexFromPage(3, 10); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10); - } - - public GregtechMetaTileEntity_IndustrialDehydrator(String aName) { - super(aName); - CASING_TEXTURE_ID = TAE.getIndexFromPage(3, 10); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialDehydrator(mName); - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10); - } - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Factory Grade Vacuum Furnace") - .addInfo("Can toggle the operation temperature with a Screwdriver") - .addInfo("All Dehydrator recipes are Low Temp recipes") - .addInfo("Speed: 120% | Eu Usage: 50% | Parallel: 4") - .addInfo("Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)") - .addInfo("Each 1800K over the min. Heat Capacity allows for one upgraded overclock") - .addInfo("Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 4, 3, true) - .addController("Bottom Center") - .addCasingInfo(mCasingName, 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"HHH", "H-H", "HHH"}, - {"HHH", "H-H", "HHH"}, - {"HHH", "H-H", "HHH"}, - {"C~C", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialDehydrator::addIndustrialDehydratorList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings4Misc, 10 - ) - ) - ) - ) - .addElement( - 'H', - ofCoil( - GregtechMetaTileEntity_IndustrialDehydrator::setCoilLevel, GregtechMetaTileEntity_IndustrialDehydrator::getCoilLevel - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 4, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - setCoilLevel(HeatingCoilLevel.None); - return checkPiece(mName, 1, 4, 0) && mCasing >= 10 && getCoilLevel() != HeatingCoilLevel.None && checkHatch(); - } - - public final boolean addIndustrialDehydratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active - : TexturesGtBlock.Overlay_Machine_Controller_Advanced) }; - } - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return mDehydratorMode ? GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes : GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialDehydrator; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getMachineType() { - return "Vacuum Furnace / Dehydrator"; - } - - @Override - public int getMaxParallelRecipes() { - return 4; - } - - @Override - public int getEuDiscountForParallelism() { - return 50; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "ElectricBlastFurnace"; - } - - public boolean checkRecipe(ItemStack aStack) { - return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 120); - } - - @Override - public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, - int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[] {}; - this.mOutputFluids = new FluidStack[] {}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - Logger.WARNING("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - Logger.WARNING("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe == null || this.mHeatingCapacity.getHeat() < tRecipe.mSpecialValue) { - Logger.WARNING("BAD RETURN - 1"); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - Logger.WARNING("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - int tHeatCapacityDivTiers = (int) (mHeatingCapacity.getHeat() - tRecipe.mSpecialValue) / 900; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - // Count recipes to do in parallel, consuming input items and fluids and - // considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - Logger.WARNING("Broke at " + parallelRecipes + "."); - break; - } - Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + "."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - Logger.WARNING("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - int rInt = 2; - - this.mEUt = (int) Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= (tHeatCapacityDivTiers >= rInt ? 4 : 2); - } - } - - if (tHeatCapacityDivTiers > 0) { - this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) - tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - Logger.WARNING("GOOD RETURN - 1"); - return true; - - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mDehydratorMode = Utils.invertBoolean(mDehydratorMode); - String aMode = mDehydratorMode ? "Dehydrator" : "Vacuum Furnace"; - PlayerUtils.messagePlayer(aPlayer, "Mode: "+aMode); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mDehydratorMode", mDehydratorMode); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mDehydratorMode = aNBT.getBoolean("mDehydratorMode"); - } - - public HeatingCoilLevel getCoilLevel() { - return mHeatingCapacity; - } - - public void setCoilLevel(HeatingCoilLevel aCoilLevel) { - mHeatingCapacity = aCoilLevel; - } -} - - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java deleted file mode 100644 index f6613980ca..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java +++ /dev/null @@ -1,193 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialElectrolyzer -extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialElectrolyzer(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialElectrolyzer(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialElectrolyzer(this.mName); - } - - @Override - public String getMachineType() { - return "Electrolyzer"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Electrolyzer") - .addInfo("180% faster than using single block machines of the same voltage") - .addInfo("Only uses 90% of the eu/t normally required") - .addInfo("Processes two items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Electrolyzer Casings", 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialElectrolyzer::addIndustrialElectrolyzerList, TAE.GTPP_INDEX(5), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 5 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); - } - - public final boolean addIndustrialElectrolyzerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(5)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(5))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialElectrolyzer"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(2* GT_Utility.getTier(this.getMaxInputVoltage()), 90, 180); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialElectrolyzer; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 2* GT_Utility.getTier(this.getMaxInputVoltage()); - } - - @Override - public int getEuDiscountForParallelism() { - return 90; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java deleted file mode 100644 index a5c7f62578..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java +++ /dev/null @@ -1,260 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialExtruder -extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - - public GregtechMetaTileEntity_IndustrialExtruder(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialExtruder(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialExtruder(this.mName); - } - - @Override - public String getMachineType() { - return "Extruder"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Material Extruder") - .addInfo("250% faster than using single block machines of the same voltage") - .addInfo("Processes four items per voltage tier") - .addInfo("Extrusion Shape for recipe goes in the Input Bus") - .addInfo("Each Input Bus can have a different shape!") - .addInfo("You can use several input buses per multiblock") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 5, true) - .addController("Front Center") - .addCasingInfo("Inconel Reinforced Casings", 28) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Back Center", 2) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC", "CCC", "CCC"}, - {"C~C", "C-C", "C-C", "C-C", "CMC"}, - {"CCC", "CCC", "CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialExtruder::addIndustrialExtruderList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .addElement( - 'M', - ofHatchAdder( - GregtechMetaTileEntity_IndustrialExtruder::addIndustrialExtruderMufflerList, getCasingTextureIndex(), 2 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 28 && checkHatch(); - } - - public final boolean addIndustrialExtruderList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addIndustrialExtruderMufflerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(203)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(33)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(33))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialExtruder"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sExtruderRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tBusItems = new ArrayList(); - tBus.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tBus)) { - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - ItemStack[] inputs = new ItemStack[tBusItems.size()]; - int slot = 0; - for (ItemStack g : tBusItems) { - inputs[slot++] = g; - } - if (inputs.length > 0) { - int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); - log("Recipe. ["+inputs.length+"]["+para+"]"); - if (checkRecipeGeneric(inputs, new FluidStack[]{}, para, 100, 250, 10000)) { - log("Recipe 2."); - return true; - } - } - - } - return false; - } - - @Override - public int getMaxParallelRecipes() { - return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialExtruder; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings3Misc; - } - - public byte getCasingMeta() { - return 1; - } - - public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(33); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java deleted file mode 100644 index b6e072b653..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java +++ /dev/null @@ -1,259 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import java.util.Random; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialMacerator -extends GregtechMeta_MultiBlockBase { - private int mCasing; - private int mPerLayer; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialMacerator(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialMacerator(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialMacerator(this.mName); - } - - @Override - public String getMachineType() { - return "Macerator/Pulverizer"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Maceration Stack") - .addInfo("60% faster than using single block machines of the same voltage") - .addInfo("Processes 8*tier materials at a time") - .addInfo("ULV = Tier 0, LV = Tier 1, etc.") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 6, 3, true) - .addController("Bottom Center") - .addCasingInfo("Maceration Stack Casings", 26) - .addInputBus("Bottom Casing", 1) - .addEnergyHatch("Bottom Casing", 1) - .addMaintenanceHatch("Bottom Casing", 1) - .addOutputBus("One per layer except bottom layer", 2) - .addMufflerHatch("Any Casing", 2) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName + "top", transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - })) - .addShape(mName + "mid", transpose(new String[][]{ - {"CCC", "C-C", "CCC"}, - })) - .addShape(mName + "bottom", transpose(new String[][]{ - {"B~B", "BBB", "BBB"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialMacerator::addIndustrialMaceratorMidList, TAE.GTPP_INDEX(7), 2 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 7 - ) - ) - ) - ) - .addElement( - 'B', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialMacerator::addIndustrialMaceratorBottomList, TAE.GTPP_INDEX(7), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 7 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName + "bottom", stackSize, hintsOnly, 1, 0, 0); - buildPiece(mName + "mid", stackSize, hintsOnly, 1, 1, 0); - buildPiece(mName + "mid", stackSize, hintsOnly, 1, 2, 0); - buildPiece(mName + "mid", stackSize, hintsOnly, 1, 3, 0); - buildPiece(mName + "mid", stackSize, hintsOnly, 1, 4, 0); - buildPiece(mName + "top", stackSize, hintsOnly, 1, 5, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mPerLayer = 0; - if (checkPiece(mName + "bottom", 1, 0 ,0)) { - while (mPerLayer < 4) { - if (!checkPiece(mName + "mid", 1, mPerLayer + 1, 0) || - mPerLayer + 1 != mOutputBusses.size()) return false; - mPerLayer ++; - } - return checkPiece(mName + "top", 1, 5, 0) && mOutputBusses.size() == 5 && mCasing >= 26 && checkHatch(); - } - return false; - } - - public final boolean addIndustrialMaceratorBottomList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addIndustrialMaceratorMidList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(201)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_MatterFab_Active : TexturesGtBlock.Overlay_MatterFab)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "MacerationStack"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; - } - - @Override - public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { - final Random tRandom = aBaseMetaTileEntity.getWorld().rand; - aBaseMetaTileEntity.getWorld().spawnParticle("smoke", (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D); - } - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 60, 7500); - } - - @Override - protected boolean doesMachineBoostOutput() { - return true; - } - - @Override - public int getMaxParallelRecipes() { - final long tVoltage = getMaxInputVoltage(); - final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - return Math.max(1, 8 * tTier); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMacerator; - } - - @Override - public int getAmountOfOutputs() { - return 16; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java deleted file mode 100644 index 5e405d426d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java +++ /dev/null @@ -1,257 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialMixer -extends GregtechMeta_MultiBlockBase { - - public static int CASING_TEXTURE_ID; - public static String mCasingName = "Advanced Blast Furnace Casing"; - public static String mCasingName2 = "Advanced Blast Furnace Casing"; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - - public GregtechMetaTileEntity_IndustrialMixer(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 2); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 2); - mCasingName2 = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockCasings4, 11); - } - - public GregtechMetaTileEntity_IndustrialMixer(final String aName) { - super(aName); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 2); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 2); - mCasingName2 = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockCasings4, 11); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialMixer(this.mName); - } - - @Override - public String getMachineType() { - return "Mixer"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 2); - } - if (mCasingName2.toLowerCase().contains(".name")) { - mCasingName2 = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockCasings4, 11); - } - - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Mixer") - .addInfo("250% faster than using single block machines of the same voltage") - .addInfo("Processes eight recipes per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 4, 3, false) - .addController("Second Layer Center") - .addCasingInfo(mCasingName, 16) - .addCasingInfo(mCasingName2, 2) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"CCC", "CMC", "CCC"}, - {"C~C", "CMC", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialMixer::addIndustrialMixerList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 2 - ) - ) - ) - ) - .addElement( - 'M', - ofBlock( - GregTech_API.sBlockCasings4, 11 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 2, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 2, 0) && mCasing >= 16 && checkHatch(); - } - - public final boolean addIndustrialMixerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(203)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialMixer"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tBusItems = new ArrayList(); - tBus.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tBus)) { - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - ItemStack[] inputs = new ItemStack[tBusItems.size()]; - int slot = 0; - for (ItemStack g : tBusItems) { - inputs[slot++] = g; - } - if (inputs.length > 0) { - log("Recipe. ["+inputs.length+"]["+getMaxParallelRecipes()+"]"); - FluidStack[] fluid = this.getStoredFluids().toArray(new FluidStack[] {}); - if (checkRecipeGeneric(inputs,fluid , getMaxParallelRecipes(), getEuDiscountForParallelism(), 250, 10000)) { - log("Recipe 2."); - return true; - } - } - - } - return false; - } - - @Override - public int getMaxParallelRecipes() { - return (8 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMixer; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java deleted file mode 100644 index a0909a4fff..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java +++ /dev/null @@ -1,541 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.*; -import gtPlusPlus.core.lib.CORE; -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_IndustrialMultiMachine -extends GregtechMeta_MultiBlockBase { - - protected int mInternalMode = 0; - protected GT_Recipe[] mLastRecipeExtended = new GT_Recipe[9]; - private static final int MODE_COMPRESSOR = 0; - private static final int MODE_LATHE = 1; - private static final int MODE_MAGNETIC = 2; - private static final int MODE_FERMENTER = 3; - private static final int MODE_FLUIDEXTRACT = 4; - private static final int MODE_EXTRACTOR = 5; - private static final int MODE_LASER = 6; - private static final int MODE_AUTOCLAVE = 7; - private static final int MODE_FLUIDSOLIDIFY = 8; - private static final int[][] MODE_MAP = new int[][] {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}}; - public static final String[] aToolTipNames = new String[9]; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - static { - for (int id = 0; id < 9; id++) { - String aNEI = GT_LanguageManager.getTranslation(getRecipeMap(id).mUnlocalizedName); - aToolTipNames[id] = aNEI != null ? aNEI : "BAD NEI NAME (Report to Github)"; - } - } - - - public GregtechMetaTileEntity_IndustrialMultiMachine(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialMultiMachine(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialMultiMachine(this.mName); - } - - @Override - public String getMachineType() { - return "Nine in One"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - - String[] aBuiltStrings = new String[3]; - aBuiltStrings[0] = aToolTipNames[0] + ", " + aToolTipNames[1] + ", " + aToolTipNames[2]; - aBuiltStrings[1] = aToolTipNames[3] + ", " + aToolTipNames[4] + ", " + aToolTipNames[5]; - aBuiltStrings[2] = aToolTipNames[6] + ", " + aToolTipNames[7]; - - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Multi-Machine") - .addInfo("250% faster than using single block machines of the same voltage") - .addInfo("Only uses 80% of the eu/t normally required") - .addInfo("Processes two items per voltage tier") - .addInfo("Machine Type: [A] - " + EnumChatFormatting.YELLOW + aBuiltStrings[0] + EnumChatFormatting.RESET) - .addInfo("Machine Type: [B] - " + EnumChatFormatting.YELLOW + aBuiltStrings[1] + EnumChatFormatting.RESET) - .addInfo("Machine Type: [C] - " + EnumChatFormatting.YELLOW + aBuiltStrings[2] + EnumChatFormatting.RESET) - .addInfo("Read Multi-Machine Manual for extra information") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Multi-Use Casings", 6) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialMultiMachine::addIndustrialMultiMachineList, getTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 2 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 6 && checkHatch(); - } - - public final boolean addIndustrialMultiMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getTextureIndex()), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getTextureIndex())}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "Generic3By3"; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - ArrayList tFluids = getStoredFluids(); - //Logger.MACHINE_INFO("1"); - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tBusItems = new ArrayList(); - tBus.mRecipeMap = getRecipeMap(); - //Logger.MACHINE_INFO("2"); - if (isValidMetaTileEntity(tBus)) { - //Logger.MACHINE_INFO("3"); - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - - boolean aFoundCircuitInBus = false; - for (ItemStack aBusItem : tBusItems) { - if (ItemUtils.isControlCircuit(aBusItem)) { - aFoundCircuitInBus = true; - } - } - if (!aFoundCircuitInBus) { - continue; - } - - Object[] tempArray = tFluids.toArray(new FluidStack[] {}); - FluidStack[] properArray; - properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {}); - - //Logger.MACHINE_INFO("4"); - if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), properArray, - (2*GT_Utility.getTier(this.getMaxInputVoltage())), 80, 250, 10000)) return true; - } - return false; - - //return checkRecipeGeneric(2*GT_Utility.getTier(this.getMaxInputVoltage()), 90, 180); - } - - @Override - public int getMaxParallelRecipes() { - return (2 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 80; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - if (mInternalMode == 0) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal; - } - else if (mInternalMode == 1) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid; - } - else { //config 2 - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc; - } - } - - public int getTextureIndex() { - return TAE.getIndexFromPage(2, 2); - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - private ItemStack getCircuit(ItemStack[] t) { - for (ItemStack j : t) { - if (j.getItem() == CI.getNumberedCircuit(0).getItem()) { - if (j.getItemDamage() >= 20 && j.getItemDamage() <= 22) { - return j; - } - } - } - return null; - } - - private final int getCircuitID(ItemStack circuit) { - int H = circuit.getItemDamage(); - int T = (H == 20 ? 0 : (H == 21 ? 1 : (H == 22 ? 2 : -1))); - return MODE_MAP[this.mInternalMode][T]; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - private final GT_Recipe.GT_Recipe_Map getRecipeMap(ItemStack circuit) { - return getRecipeMap(getCircuitID(circuit)); - } - - private static final GT_Recipe.GT_Recipe_Map getRecipeMap(int aMode) { - if (aMode == MODE_COMPRESSOR) { - return GT_Recipe.GT_Recipe_Map.sCompressorRecipes; - } - else if (aMode == MODE_LATHE) { - return GT_Recipe.GT_Recipe_Map.sLatheRecipes; - } - else if (aMode == MODE_MAGNETIC) { - return GT_Recipe.GT_Recipe_Map.sPolarizerRecipes; - } - else if (aMode == MODE_FERMENTER) { - return GT_Recipe.GT_Recipe_Map.sFermentingRecipes; - } - else if (aMode == MODE_FLUIDEXTRACT) { - return GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes; - } - else if (aMode == MODE_EXTRACTOR) { - return GT_Recipe.GT_Recipe_Map.sExtractorRecipes; - } - else if (aMode == MODE_LASER) { - return GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes; - } - else if (aMode == MODE_AUTOCLAVE) { - return GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes; - } - else if (aMode == MODE_FLUIDSOLIDIFY) { - return GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes; - } - else { - return null; - } - } - - @Override - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll) { - - // Based on the Processing Array. A bit overkill, but very flexible. - - // Get Circuit info for this recipe. - ItemStack tCircuit = getCircuit(aItemInputs); - int tCircuitID = getCircuitID(tCircuit); - - Logger.MACHINE_INFO("Mode: "+tCircuitID); - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - - GT_Recipe.GT_Recipe_Map tRecipeMap = this.getRecipeMap(tCircuit); - if (tRecipeMap == null) - return false; - GT_Recipe tRecipe = tRecipeMap.findRecipe( - getBaseMetaTileEntity(), this.mLastRecipeExtended[tCircuitID], false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - // Remember last recipe - an optimization for findRecipe() - //this.mLastRecipe = tRecipe; //Let's not do this, it's bad. - //Instead, how about I use a array for types? - this.mLastRecipeExtended[tCircuitID] = tRecipe; - - if (tRecipe == null) { - Logger.MACHINE_INFO("BAD RETURN - 1|"+tCircuitID); - - if (aItemInputs.length > 0) { - Logger.MACHINE_INFO("Input Items: "+ItemUtils.getArrayStackNames(aItemInputs)); - } - if (aFluidInputs.length > 0) { - Logger.MACHINE_INFO("Input Fluids: "+ItemUtils.getFluidArrayStackNames(aFluidInputs)); - } - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - Logger.MACHINE_INFO("BAD RETURN - 2|"+tCircuitID); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - - Logger.WARNING("parallelRecipes: "+parallelRecipes); - Logger.WARNING("aMaxParallelRecipes: "+aMaxParallelRecipes); - Logger.WARNING("tTotalEUt: "+tTotalEUt); - Logger.WARNING("tVoltage: "+tVoltage); - Logger.WARNING("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - Logger.WARNING("Broke at "+parallelRecipes+"."); - break; - } - Logger.WARNING("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - Logger.MACHINE_INFO("BAD RETURN - 3|"+tCircuitID); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - Logger.MACHINE_INFO("GOOD RETURN - 1|"+tCircuitID); - return true; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (mInternalMode < 2) { - mInternalMode++; - } - else { - mInternalMode = 0; - } - String mModeString = (mInternalMode == 0 ? "Metal" : mInternalMode == 1 ? "Fluid" : mInternalMode == 2 ? "Misc." : "null"); - PlayerUtils.messagePlayer(aPlayer, "Multi-Machine is now in "+mModeString+" mode."); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mInternalMode", mInternalMode); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - this.mInternalMode = aNBT.getInteger("mInternalMode"); - super.loadNBTData(aNBT); - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java deleted file mode 100644 index 007d1a0d0f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java +++ /dev/null @@ -1,242 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_MultiBlockBase { - - private boolean mFormingMode = false; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialPlatePress(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialPlatePress(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialPlatePress(this.mName); - } - - @Override - public String getMachineType() { - return "Bending Machine, Forming Press"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for Advanced Bending & Forming") - .addInfo("500% faster than using single block machines of the same voltage") - .addInfo("Processes four items per voltage tier") - .addInfo("Circuit for recipe goes in the Input Bus") - .addInfo("Each Input Bus can have a different Circuit/Shape!") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Material Press Machine Casings", 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialPlatePress::addIndustrialPlatePressList, 50, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 4 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); - } - - public final boolean addIndustrialPlatePressList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(203)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50)}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "MaterialPress"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return mFormingMode ? GT_Recipe.GT_Recipe_Map.sPressRecipes : GT_Recipe.GT_Recipe_Map.sBenderRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tBusItems = new ArrayList(); - tBus.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tBus)) { - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - - if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, - (4* GT_Utility.getTier(this.getMaxInputVoltage())), 100, 500, 10000)) return true; - } - return false; - } - - @Override - public int getMaxParallelRecipes() { - return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - if (this.mFormingMode) return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialPlatePress_ModeForming; - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialPlatePress_ModeBending; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("mFormingMode", mFormingMode); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - mFormingMode = aNBT.getBoolean("mFormingMode"); - super.loadNBTData(aNBT); - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mFormingMode = Utils.invertBoolean(mFormingMode); - if (mFormingMode){ - PlayerUtils.messagePlayer(aPlayer, "Now running in Forming Press Mode."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Now running in Bending Mode."); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java deleted file mode 100644 index c5450fec5b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java +++ /dev/null @@ -1,225 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import java.util.Random; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialSifter -extends GregtechMeta_MultiBlockBase { - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialSifter(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialSifter(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialSifter(this.mName); - } - - @Override - public String getMachineType() { - return "Sifter"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Sifter") - .addInfo("400% faster than single-block machines of the same voltage") - .addInfo("Only uses 75% of the eu/t normally required") - .addInfo("Processes four items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(5, 3, 5, false) - .addController("Bottom Center") - .addCasingInfo("Sieve Grate", 18) - .addCasingInfo("Sieve Casings", 35) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC"}, - {"CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC"}, - {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialSifter::addIndustrialSifterList, TAE.GTPP_INDEX(21), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 5 - ) - ) - ) - ) - .addElement( - 'M', - ofBlock( - ModBlocks.blockCasings2Misc, 6 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 2, 2, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 2, 2, 0) && mCasing >= 35 && mOutputBusses.size() >= 4 && checkHatch(); - } - - public final boolean addIndustrialSifterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(21)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(21))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialSifter"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sSifterRecipes; - } - - @Override - public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { - final Random tRandom = aBaseMetaTileEntity.getWorld().rand; - if (tRandom.nextFloat() > 0.4) return; - - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2; - - aBaseMetaTileEntity.getWorld().spawnParticle("smoke", - (aBaseMetaTileEntity.getXCoord() + xDir + 2.1F) - (tRandom.nextFloat() * 3.2F), - aBaseMetaTileEntity.getYCoord() + 2.5f + (tRandom.nextFloat() * 1.2F), - (aBaseMetaTileEntity.getZCoord() + zDir + 2.1F) - (tRandom.nextFloat() * 3.2F), - 0.0, 0.0, 0.0); - - } - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 400, 10000); - } - - @Override - protected boolean doesMachineBoostOutput() { - return false; - } - - @Override - public int getMaxParallelRecipes() { - return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 75; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialSifter; - } - - @Override - public int getAmountOfOutputs() { - return 16; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return true; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java deleted file mode 100644 index 5a62c6c335..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java +++ /dev/null @@ -1,268 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import java.util.ArrayList; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaTileEntity_IndustrialSinter -extends GT_MetaTileEntity_MultiBlockBase { - - - RenderBlocks asdasd = RenderBlocks.getInstance(); - - public GregtechMetaTileEntity_IndustrialSinter(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialSinter(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialSinter(this.mName); - } - - @Override - public String[] getDescription() { - return new String[]{ - "Controller Block for the Industrial Sinter Furnace", - "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)", - "2x Input Bus (side centered)", - "2x Output Bus (side centered)", - "1x Energy Hatch (top or bottom centered)", - "1x Maintenance Hatch (back centered)", - "Sinter Furnace Casings for the rest (32 at least!)", - "Causes " + 20 * this.getPollutionPerTick(null) + " Pollution per second", - CORE.GT_Tooltip - }; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7))}; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png"); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sWiremillRecipes; - } - - @Override - public boolean isCorrectMachinePart(final ItemStack aStack) { - return true; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return aFacing > 1; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - final ArrayList tInputList = this.getStoredInputs(); - for (final ItemStack tInput : tInputList) { - final long tVoltage = this.getMaxInputVoltage(); - final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - - final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput}); - if (tRecipe != null) { - if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) { - this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000)); - this.mEfficiencyIncrease = 10000; - if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1))); - this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1))); - } else { - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; - this.updateSlots(); - return true; - } - } - } - return false; - } - - @Override - public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - final int controllerX = aBaseMetaTileEntity.getXCoord(); - final int controllerY = aBaseMetaTileEntity.getYCoord(); - final int controllerZ = aBaseMetaTileEntity.getZCoord(); - - final byte tSide = this.getBaseMetaTileEntity().getBackFacing(); - if ((this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 3)))) { - int tAirCount = 0; - for (byte i = -1; i < 2; i = (byte) (i + 1)) { - for (byte j = -1; j < 2; j = (byte) (j + 1)) { - for (byte k = -1; k < 2; k = (byte) (k + 1)) { - if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) { - Logger.INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k)); - //if (aBaseMetaTileEntity.getWorld().isRemote){ - //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k)); - //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN); - //} - tAirCount++; - } - } - } - } - if (tAirCount != 10) { - Logger.INFO("False. Air != 10. Air == "+tAirCount); - //return false; - } - for (byte i = 2; i < 6; i = (byte) (i + 1)) { - //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ), Color.LIME_GREEN); - IGregTechTileEntity tTileEntity; - if ((null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) && - (tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) && - ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter))) { - //Utils.LOG_INFO("False 1"); - return false; - } - } - final int tX = this.getBaseMetaTileEntity().getXCoord(); - final int tY = this.getBaseMetaTileEntity().getYCoord(); - final int tZ = this.getBaseMetaTileEntity().getZCoord(); - for (byte i = -1; i < 2; i = (byte) (i + 1)) { - for (byte j = -1; j < 2; j = (byte) (j + 1)) { - if ((i != 0) || (j != 0)) { - for (byte k = 0; k < 5; k = (byte) (k + 1)) { - //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.ORANGE); - if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) { - //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.TOMATO); - if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) { - } - else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) { - Logger.INFO("False 2"); - return false; - } - } - else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) { - } - else { - Logger.INFO("False 3"); - return false; - } - } - } - } - } - if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) { - Logger.INFO("Use Busses, Not Hatches for Input/Output."); - return false; - } - if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) { - Logger.INFO("Incorrect amount of Input & Output busses."); - return false; - } - this.mMaintenanceHatches.clear(); - final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); - if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { - if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) { - this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity()); - ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex(); - } else { - Logger.INFO("Maintenance hatch must be in the middle block on the back."); - return false; - } - } - if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) { - Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); - return false; - } - } else { - Logger.INFO("False 5"); - return false; - } - Logger.INFO("True"); - return true; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(final ItemStack aStack) { - return 0; - } - - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasingsMisc; - } - - - public byte getCasingMeta() { - return 6; - } - - - public byte getCasingTextureIndex() { - return 1; //TODO - } - - private boolean addToMachineList(final IGregTechTileEntity tTileEntity) { - return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex()))); - } - - private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) { - return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex()))); - } -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java deleted file mode 100644 index 01b887694a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java +++ /dev/null @@ -1,224 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialThermalCentrifuge -extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialThermalCentrifuge(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialThermalCentrifuge(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialThermalCentrifuge(this.mName); - } - - @Override - public String getMachineType() { - return "Thermal Centrifuge"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Thermal Centrifuge") - .addInfo("150% faster than using single block machines of the same voltage") - .addInfo("Only uses 80% of the eu/t normally required") - .addInfo("Processes eight items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 2, 3, false) - .addController("Front Center") - .addCasingInfo("Thermal Processing Casings/Noise Hazard Sign Blocks", 8) - .addInputBus("Bottom Casing", 1) - .addOutputBus("Bottom Casing", 1) - .addEnergyHatch("Bottom Casing", 1) - .addMaintenanceHatch("Bottom Casing", 1) - .addMufflerHatch("Bottom Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"X~X", "XXX", "XXX"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialThermalCentrifuge::addIndustrialThermalCentrifugeList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 0 - ) - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - GregTech_API.sBlockCasings3, 9 - ) - ) - ) - ) - .addElement( - 'X', - ofChain( - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 0 - ) - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - GregTech_API.sBlockCasings3, 9 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 0, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 0, 0) && mCasing >= 8 && checkHatch(); - } - - public final boolean addIndustrialThermalCentrifugeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialThermalCentrifuge"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric((8* GT_Utility.getTier(this.getMaxInputVoltage())), 80, 150); - } - - @Override - public int getMaxParallelRecipes() { - return (8 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 80; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialThermalCentrifuge; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings2Misc; - } - - public byte getCasingMeta() { - return 0; - } - - public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(16); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java deleted file mode 100644 index 1f63995651..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java +++ /dev/null @@ -1,261 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta_MultiBlockBase { - - public static int CASING_TEXTURE_ID; - public static String mCryoFuelName = "Gelid Cryotheum"; - public static String mCasingName = "Advanced Cryogenic Casing"; - public static String mHatchName = "Cryotheum Hatch"; - public static FluidStack mFuelStack; - private boolean mHaveHatch; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - - public GregtechMetaTileEntity_IndustrialVacuumFreezer(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - mFuelStack = FluidUtils.getFluidStack("cryotheum", 1); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); - mCryoFuelName = mFuelStack.getLocalizedName(); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); - mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); - } - - public GregtechMetaTileEntity_IndustrialVacuumFreezer(final String aName) { - super(aName); - mFuelStack = FluidUtils.getFluidStack("cryotheum", 1); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); - mCryoFuelName = mFuelStack.getLocalizedName(); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); - mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); - } - - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (IMetaTileEntity) new GregtechMetaTileEntity_IndustrialVacuumFreezer(this.mName); - } - - @Override - public String getMachineType() { - return "Vacuum Freezer"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); - } - if (mCryoFuelName.toLowerCase().contains(".")) { - mCryoFuelName = FluidUtils.getFluidStack("cryotheum", 1).getLocalizedName(); - } - if (mHatchName.toLowerCase().contains(".name")) { - mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); - } - - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Factory Grade Advanced Vacuum Freezer") - .addInfo("Speed: 200% | Eu Usage: 100% | Parallel: 4") - .addInfo("Consumes 1L of " + mCryoFuelName + "/t during operation") - .addInfo("Constructed exactly the same as a normal Vacuum Freezer") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo(mCasingName, 10) - .addStructureHint(mHatchName, 1) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialVacuumFreezer::addIndustrialVacuumFreezerList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 10 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mHaveHatch = false; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && mHaveHatch && checkHatch(); - } - - public final boolean addIndustrialVacuumFreezerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 967) { - mHaveHatch = true; - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - new GT_RenderedTexture((IIconContainer) (aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced))}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "VacuumFreezer"; - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT; - } - - public boolean isCorrectMachinePart(final ItemStack aStack) { - return true; - } - - public boolean checkRecipe(final ItemStack aStack) { - return this.checkRecipeGeneric(4, 100, 100); - } - - @Override - public int getMaxParallelRecipes() { - return 4; - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialVacuumFreezer; - } - - public int getDamageToComponent(final ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - private volatile int mGraceTimer = 2; - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - /*if (this.getBaseMetaTileEntity().isActive()) { - if (!this.depleteInput(mFuelStack.copy())) { - this.getBaseMetaTileEntity().setActive(false); - } - } */ - super.onPostTick(aBaseMetaTileEntity, aTick); - - if (this.mStartUpCheck < 0) { - if (this.mMaxProgresstime > 0 && this.mProgresstime != 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { - if (aTick % 10 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { - if (!this.depleteInput(FluidUtils.getFluidStack("cryotheum", 10))) { - if (mGraceTimer-- == 0) { - this.causeMaintenanceIssue(); - this.stopMachine(); - mGraceTimer = 2; - } - } - } - } - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java deleted file mode 100644 index 168d4ff6d6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java +++ /dev/null @@ -1,335 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import ic2.core.init.BlocksItems; -import ic2.core.init.InternalName; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialWashPlant -extends GregtechMeta_MultiBlockBase { - - private boolean mChemicalMode = false; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialWashPlant(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialWashPlant(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialWashPlant(this.mName); - } - - @Override - public String getMachineType() { - return "Ore Washer, Chemical Bath"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Ore Washing Plant") - .addInfo("Can be configured with a screwdriver to also process Chemical Bathing") - .addInfo("400% faster than using single block machines of the same voltage") - .addInfo("Processes four item per voltage tier") - .addInfo("Always requires an Input Hatch full of water to refill structure") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(5, 3, 7, true) - .addController("Front Center") - .addCasingInfo("Wash Plant Casings", 40) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCCCC", "C C", "C C", "C C", "C C", "C C", "CCCCC"}, - {"CC~CC", "C C", "C C", "C C", "C C", "C C", "CCCCC"}, - {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialWashPlant::addIndustrialWashPlantList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 2, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 2, 1, 0) && mCasing >= 40 && checkHatch(); - } - - public final boolean addIndustrialWashPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - protected IAlignmentLimits getInitialAlignmentLimits() { - // don't rotate a washer, water will flow out. - return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialWashPlant"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return mChemicalMode ? GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes : GT_Recipe.GT_Recipe_Map.sOreWasherRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - if (checkForWater()) { - return checkRecipeGeneric((4 * GT_Utility.getTier(this.getMaxInputVoltage())), 100, 400); - } - return false; - } - - @Override - public int getMaxParallelRecipes() { - return (4* GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - if (this.mChemicalMode) return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath; - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialWashPlant_ModeWasher; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings2Misc; - } - - - public byte getCasingMeta() { - return 4; - } - - - public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(11); - } - - public boolean checkForWater() { - - //Get Facing direction - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int mCurrentDirectionX; - int mCurrentDirectionZ; - int mOffsetX_Lower = 0; - int mOffsetX_Upper = 0; - int mOffsetZ_Lower = 0; - int mOffsetZ_Upper = 0; - - if (mDirectionX == 0){ - mCurrentDirectionX = 2; - mCurrentDirectionZ = 3; - mOffsetX_Lower = -2; - mOffsetX_Upper = 2; - mOffsetZ_Lower = -3; - mOffsetZ_Upper = 3; - } - else { - mCurrentDirectionX = 3; - mCurrentDirectionZ = 2; - mOffsetX_Lower = -3; - mOffsetX_Upper = 3; - mOffsetZ_Lower = -2; - mOffsetZ_Upper = 2; - } - - //if (aBaseMetaTileEntity.fac) - - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ; - - int tAmount = 0; - for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) { - for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { - for (int h = 0; h < 2; ++h) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water) { - if (this.getStoredFluids() != null) { - for (FluidStack stored : this.getStoredFluids()) { - if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) { - if (stored.amount >= 1000) { - //Utils.LOG_WARNING("Going to try swap an air block for water from inut bus."); - stored.amount -= 1000; - Block fluidUsed = null; - if (tBlock == Blocks.air || tBlock == Blocks.flowing_water) { - fluidUsed = Blocks.water; - } - if (tBlock == Blocks.water) { - fluidUsed = BlocksItems.getFluidBlock(InternalName.fluidDistilledWater); - } - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord() + xDir + i, aBaseMetaTileEntity.getYCoord() + h, aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed); - - - } - } - } - } - } - if (tBlock == Blocks.water) { - ++tAmount; - //Utils.LOG_WARNING("Found Water"); - } else if (tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) { - ++tAmount; - ++tAmount; - //Utils.LOG_WARNING("Found Distilled Water"); - } - } - } - } - if ((tAmount >= 45)){ - Logger.WARNING("Filled structure."); - } - else { - Logger.WARNING("Did not fill structure."); - } - return (tAmount >= 45); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("mChemicalMode", mChemicalMode); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - mChemicalMode = aNBT.getBoolean("mChemicalMode"); - super.loadNBTData(aNBT); - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mChemicalMode = Utils.invertBoolean(mChemicalMode); - if (mChemicalMode){ - PlayerUtils.messagePlayer(aPlayer, "Wash Plant is now running in Chemical Bath Mode."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Wash Plant is now running in Ore Washer Mode."); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java deleted file mode 100644 index ccce25d925..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java +++ /dev/null @@ -1,206 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_IndustrialWireMill -extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialWireMill(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialWireMill(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialWireMill(this.mName); - } - - @Override - public String getMachineType() { - return "Wiremill"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Wire Factory") - .addInfo("200% faster than using single block machines of the same voltage") - .addInfo("Only uses 75% of the eu/t normally required") - .addInfo("Processes four items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 5, true) - .addController("Front Center") - .addCasingInfo("Wire Factory Casings", 32) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC", "CCC", "CCC"}, - {"C~C", "C-C", "C-C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialWireMill::addIndustrialWireMillList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 32 && checkHatch(); - } - - public final boolean addIndustrialWireMillList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(204)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(6)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(6))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "IndustrialWireFactory"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sWiremillRecipes; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 200); - } - - @Override - public int getMaxParallelRecipes() { - return (4* GT_Utility.getTier(this.getMaxInputVoltage())); - } - - @Override - public int getEuDiscountForParallelism() { - return 75; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialWireMill; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasingsMisc; - } - - public byte getCasingMeta() { - return 6; - } - - public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(6); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java deleted file mode 100644 index 5d6904bd46..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java +++ /dev/null @@ -1,403 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_IronBlastFurnace; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_IronBlastFurnace; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraftforge.common.util.ForgeDirection; - -public class GregtechMetaTileEntity_IronBlastFurnace -extends MetaTileEntity { - private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)}; - private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)}; - private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)}; - public int mMaxProgresstime = 0; - public int mUpdate = 30; - public int mProgresstime = 0; - public boolean mMachine = false; - public ItemStack mOutputItem1; - public ItemStack mOutputItem2; - - public GregtechMetaTileEntity_IronBlastFurnace(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional, 4); - } - - public GregtechMetaTileEntity_IronBlastFurnace(final String aName) { - super(aName, 4); - } - - @Override - public String[] getDescription() { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - return new String[]{"Iron is a much better furnace material!", - "Can be Automated", - "Multiblock: 3x3x5 hollow with opening on top", - "Same shape as Bronze/Bricked blast furnace, except one ring of 8 taller.", - "40 Iron Plated Bricks required", - }; - } - else { - return new String[]{"Sloooowly, Skip the Bronze age, Get some Steel!", - "Multiblock: 3x3x5 hollow with opening on top", - "40 Iron Plated Bricks required", - "----", - "Even though Iron melts hotter than bronze,", - "this machine is to help players skip looking", - "for tin and copper, which are not as common", - "as Iron is. This machine takes 5x longer than the bronze", - "blast furnace as a result.", - "----", - }; - } - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return aActive ? FACING_ACTIVE : FACING_FRONT; - } - return FACING_SIDE; - } - - @Override - public boolean isSteampowered() { - return false; - } - - @Override - public boolean isElectric() { - return false; - } - - @Override - public boolean isPneumatic() { - return false; - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public boolean isEnetOutput() { - return false; - } - - @Override - public boolean isInputFacing(final byte aSide) { - return false; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return false; - } - - @Override - public boolean isTeleporterCompatible() { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return aFacing > 1; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public int getProgresstime() { - return this.mProgresstime; - } - - @Override - public int maxProgresstime() { - return this.mMaxProgresstime; - } - - @Override - public int increaseProgress(final int aProgress) { - this.mProgresstime += aProgress; - return this.mMaxProgresstime - this.mProgresstime; - } - - @Override - public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) { - return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID)); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IronBlastFurnace(this.mName); - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("mProgresstime", this.mProgresstime); - aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime); - if (this.mOutputItem1 != null) { - final NBTTagCompound tNBT = new NBTTagCompound(); - this.mOutputItem1.writeToNBT(tNBT); - aNBT.setTag("mOutputItem1", tNBT); - } - if (this.mOutputItem2 != null) { - final NBTTagCompound tNBT = new NBTTagCompound(); - this.mOutputItem2.writeToNBT(tNBT); - aNBT.setTag("mOutputItem2", tNBT); - } - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - this.mUpdate = 30; - this.mProgresstime = aNBT.getInteger("mProgresstime"); - this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); - this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1"); - this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2"); - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); - } - - private boolean checkMachine() { - final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX; - final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ; - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 4; j++) { //This is height - for (int k = -1; k < 2; k++) { - if (((xDir + i) != 0) || (j != 0) || ((zDir + k) != 0)) { - if ((i != 0) || (j == -1) || (k != 0)) { - if ((this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k) != ModBlocks.blockCasingsMisc) || (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) { - return false; - } - } else if ((!GT_Utility.arrayContains(this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[]{Blocks.lava, Blocks.flowing_lava, null})) && (!this.getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) { - return false; - } - } - } - } - } - return true; - } - - @Override - public void onMachineBlockUpdate() { - this.mUpdate = 30; - } - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { - if ((aBaseMetaTileEntity.isClientSide()) && - (aBaseMetaTileEntity.isActive())) { - aBaseMetaTileEntity.getWorld().spawnParticle("cloud", aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), 0.0D, 0.3D, 0.0D); - } - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate-- == 0) { - this.mMachine = this.checkMachine(); - } - if (this.mMachine) { - if (this.mMaxProgresstime > 0) { - if (++this.mProgresstime >= this.mMaxProgresstime) { - this.addOutputProducts(); - this.mOutputItem1 = null; - this.mOutputItem2 = null; - this.mProgresstime = 0; - this.mMaxProgresstime = 0; - try { - GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel"); - } catch (final Exception e) { - } - } - } else if (aBaseMetaTileEntity.isAllowedToWork()) { - this.checkRecipe(); - } - } - aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); - if (aBaseMetaTileEntity.isActive()) { - if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) { - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2); - this.mUpdate = 1; - } - if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) { - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2); - this.mUpdate = 1; - } - } else { - if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) { - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2); - this.mUpdate = 1; - } - if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) { - aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2); - this.mUpdate = 1; - } - } - } - } - - private void addOutputProducts() { - if (this.mOutputItem1 != null) { - if (this.mInventory[2] == null) { - this.mInventory[2] = GT_Utility.copy(new Object[]{this.mOutputItem1}); - } else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) { - this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(), this.mOutputItem1.stackSize + this.mInventory[2].stackSize); - } - } - if (this.mOutputItem2 != null) { - if (this.mInventory[3] == null) { - this.mInventory[3] = GT_Utility.copy(new Object[]{this.mOutputItem2}); - } else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) { - this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(), this.mOutputItem2.stackSize + this.mInventory[3].stackSize); - } - } - } - - private boolean spaceForOutput(final ItemStack aStack1, final ItemStack aStack2) { - if (((this.mInventory[2] == null) || (aStack1 == null) || (((this.mInventory[2].stackSize + aStack1.stackSize) <= this.mInventory[2].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1)))) && ( - (this.mInventory[3] == null) || (aStack2 == null) || (((this.mInventory[3].stackSize + aStack2.stackSize) <= this.mInventory[3].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) { - return true; - } - return false; - } - - private int getProperTime(int time) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - return (int) (time/3); - } - else { - return time; - } - } - - private boolean checkRecipe() { - - if (!this.mMachine) { - return false; - } - if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) { - if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) { - if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 4*3); - this.mMaxProgresstime = getProperTime(36000); - return true; - } - if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 2*3); - this.mMaxProgresstime = getProperTime(4800); - return true; - } - if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 9); - this.getBaseMetaTileEntity().decrStackSize(1, 4*3); - this.mMaxProgresstime = getProperTime(64800); - return true; - } - } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) { - if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 2*3); - this.mMaxProgresstime = getProperTime(3600); - return true; - } - if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 1) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 1*3); - this.mMaxProgresstime = getProperTime(2400); - return true; - } - if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 9); - this.getBaseMetaTileEntity().decrStackSize(1, 2*3); - this.mMaxProgresstime = getProperTime(32400); - return true; - } - } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) { - if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 64); - this.mMaxProgresstime = getProperTime(64800); - return true; - } - if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 18) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 18*3); - this.mMaxProgresstime = getProperTime(43200); - return true; - } - if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) { - this.getBaseMetaTileEntity().decrStackSize(0, 1); - this.getBaseMetaTileEntity().decrStackSize(1, 4*3); - this.mMaxProgresstime = getProperTime(64800); - return true; - } - } - } - this.mOutputItem1 = null; - this.mOutputItem2 = null; - return false; - } - - @Override - public boolean isGivingInformation() { - return false; - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return aIndex > 1; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - if (aIndex < 2) { - } - return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]); - } - - @Override - public byte getTileEntityBaseType() { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java deleted file mode 100644 index 59e6e78757..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java +++ /dev/null @@ -1,666 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gtPlusPlus.core.lib.CORE; -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.EntityUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_MillingBalls; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase { - - protected boolean boostEu = false; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - private static ITexture frontFace; - private static ITexture frontFaceActive; - - private ArrayList mMillingBallBuses = new ArrayList(); - private static final DamageSource mIsaMillDamageSource = new DamageSource("gtpp.grinder").setDamageBypassesArmor(); - - public GregtechMetaTileEntity_IsaMill(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - frontFaceActive = new GT_RenderedTexture(new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5")); - frontFace = new GT_RenderedTexture(new CustomIcon("iconsets/Grinder/GRINDER5")); - } - - public GregtechMetaTileEntity_IsaMill(String aName) { - super(aName); - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Large Grinding Machine") - .addInfo("Grind ores.") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 7, false) - .addController("Front Center") - .addCasingInfo("IsaMill Exterior Casing", 40) - .addOtherStructurePart("IsaMill Gearbox", "Inner Blocks") - .addOtherStructurePart("IsaMill Piping", "8x, ring around controller") - .addStructureInfo("IsaMill Pipings must not be obstructed in front (only air blocks)") - .addOtherStructurePart("Milling Ball Hatch", "Any Casing") - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC"}, - {"D~D", "CGC", "CGC", "CGC", "CGC", "CGC", "CCC"}, - {"DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IsaMill::addToMachineList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .addElement( - 'D', - ofBlock( - getIntakeBlock(), getIntakeMeta() - ) - ) - .addElement( - 'G', - ofBlock( - getGearboxBlock(), getGearboxMeta() - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mMillingBallBuses.clear(); - return checkPiece(mName, 1, 1, 0) && mCasing >= 48 - 8 && checkHatch(); - } - - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return new ITexture[]{ - Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(2)), - aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(2))}; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return getMaxEfficiency(aStack) > 0; - } - - @Override - public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_MillingBalls) { - log("Found GT_MetaTileEntity_Hatch_MillingBalls"); - return addToMachineListInternal(mMillingBallBuses, aMetaTileEntity, aBaseCasingIndex); - } - return super.addToMachineList(aTileEntity, aBaseCasingIndex); - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate == 1 || this.mStartUpCheck == 1) { - this.mMillingBallBuses.clear(); - } - } - if (aTick % 20 == 0) { - checkForEntities(aBaseMetaTileEntity, aTick); - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - private final AutoMap mFrontBlockPosCache = new AutoMap(); - - public void checkForEntities(IGregTechTileEntity aBaseMetaTileEntity, long aTime) { - - if (aTime % 100 == 0) { - mFrontBlockPosCache.clear(); - } - if (mFrontBlockPosCache.isEmpty()) { - byte tSide = aBaseMetaTileEntity.getBackFacing(); - int aTileX = aBaseMetaTileEntity.getXCoord(); - int aTileY = aBaseMetaTileEntity.getYCoord(); - int aTileZ = aBaseMetaTileEntity.getZCoord(); - boolean xFacing = (tSide == 4 || tSide == 5); - boolean zFacing = (tSide == 2 || tSide == 3); - - // Check Casings - int aDepthOffset = (tSide == 2 || tSide == 4) ? 1 : -1; - for (int aHorizontalOffset = -1; aHorizontalOffset < 2; aHorizontalOffset++) { - for (int aVerticalOffset = -1; aVerticalOffset < 2; aVerticalOffset++) { - int aX = !xFacing ? (aTileX + aHorizontalOffset) : (aTileX + aDepthOffset); - int aY = aTileY + aVerticalOffset; - int aZ = !zFacing ? (aTileZ + aHorizontalOffset) : (aTileZ + aDepthOffset); - mFrontBlockPosCache.add(new BlockPos(aX, aY, aZ, aBaseMetaTileEntity.getWorld())); - } - } - } - - AutoMap aEntities = getEntities(mFrontBlockPosCache, aBaseMetaTileEntity.getWorld()); - if (!aEntities.isEmpty()) { - for (EntityLivingBase aFoundEntity : aEntities) { - if (aFoundEntity instanceof EntityPlayer) { - EntityPlayer aPlayer = (EntityPlayer) aFoundEntity; - if (PlayerUtils.isCreative(aPlayer) || !PlayerUtils.canTakeDamage(aPlayer)) { - continue; - } - else { - if (aFoundEntity.getHealth() > 0) { - EntityUtils.doDamage(aFoundEntity, mIsaMillDamageSource, (int) (aFoundEntity.getMaxHealth() / 5)); - if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { - generateParticles(aFoundEntity); - } - } - } - } - if (aFoundEntity.getHealth() > 0) { - EntityUtils.doDamage(aFoundEntity, mIsaMillDamageSource, Math.max(1, (int) (aFoundEntity.getMaxHealth() / 3))); - if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { - generateParticles(aFoundEntity); - } - } - } - } - } - - private static final AutoMap getEntities(AutoMap aPositionsToCheck, World aWorld){ - AutoMap aEntities = new AutoMap(); - HashSet aChunksToCheck = new HashSet(); - if (!aPositionsToCheck.isEmpty()) { - Chunk aLocalChunk; - for (BlockPos aPos : aPositionsToCheck) { - aLocalChunk = aWorld.getChunkFromBlockCoords(aPos.xPos, aPos.zPos); - aChunksToCheck.add(aLocalChunk); - } - } - if (!aChunksToCheck.isEmpty()) { - AutoMap aEntitiesFound = new AutoMap(); - for (Chunk aChunk : aChunksToCheck) { - if (aChunk.isChunkLoaded) { - List[] aEntityLists = aChunk.entityLists; - for (List aEntitySubList : aEntityLists) { - for (Object aEntity : aEntitySubList) { - if (aEntity instanceof EntityLivingBase) { - EntityLivingBase aPlayer = (EntityLivingBase) aEntity; - aEntitiesFound.add(aPlayer); - } - } - } - } - } - if (!aEntitiesFound.isEmpty()) { - for (EntityLivingBase aEntity : aEntitiesFound) { - BlockPos aPlayerPos = EntityUtils.findBlockPosOfEntity(aEntity); - for (BlockPos aBlockSpaceToCheck : aPositionsToCheck) { - if (aBlockSpaceToCheck.equals(aPlayerPos)) { - aEntities.add(aEntity); - } - } - } - } - } - return aEntities; - } - - private static void generateParticles(EntityLivingBase aEntity) { - BlockPos aPlayerPosBottom = EntityUtils.findBlockPosOfEntity(aEntity); - BlockPos aPlayerPosTop = aPlayerPosBottom.getUp(); - AutoMap aEntityPositions = new AutoMap(); - aEntityPositions.add(aPlayerPosBottom); - aEntityPositions.add(aPlayerPosTop); - for (int i = 0; i < 64; i++) { - BlockPos aEffectPos = aEntityPositions.get(aEntity.height > 1f ? MathUtils.randInt(0, 1) : 0); - float aOffsetX = MathUtils.randFloat(-0.35f, 0.35f); - float aOffsetY = MathUtils.randFloat(-0.25f, 0.35f); - float aOffsetZ = MathUtils.randFloat(-0.35f, 0.35f); - aEntity.worldObj.spawnParticle("reddust", aEffectPos.xPos + aOffsetX, aEffectPos.yPos + 0.3f + aOffsetY, aEffectPos.zPos + aOffsetZ, 0.0D, 0.0D, 0.0D); - } - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - return checkRecipeGeneric(); - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings5Misc; - } - - public byte getCasingMeta() { - return 0; - } - - public Block getIntakeBlock() { - return ModBlocks.blockCasings5Misc; - } - - public byte getIntakeMeta() { - return 1; - } - - public Block getGearboxBlock() { - return ModBlocks.blockCasings5Misc; - } - - public byte getGearboxMeta() { - return 2; - } - - public byte getCasingTextureIndex() { - return 66; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IsaMill(this.mName); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 1; - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIsaMill; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public String[] getExtraInfoData() { - return new String[]{ - "IsaMill Grinding Machine", - "Current Efficiency: " + (mEfficiency / 100) + "%", - getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" - }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Grinding Machine"; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - /* - * Milling Ball Handling - */ - - @Override - public ArrayList getStoredInputs() { - ArrayList tItems = super.getStoredInputs(); - for (GT_MetaTileEntity_Hatch_MillingBalls tHatch : mMillingBallBuses) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - tItems.addAll(tHatch.getContentUsageSlots()); - } - } - return tItems; - } - - - public int getMaxBallDurability(ItemStack aStack) { - return ItemGenericChemBase.getMaxBallDurability(aStack); - } - - private ItemStack findMillingBall(ItemStack[] aItemInputs) { - if (mMillingBallBuses.isEmpty() || mMillingBallBuses.size() > 1) { - return null; - } - else { - GT_MetaTileEntity_Hatch_MillingBalls aBus = mMillingBallBuses.get(0); - if (aBus != null) { - AutoMap aAvailableItems = aBus.getContentUsageSlots(); - if (!aAvailableItems.isEmpty()) { - for (final ItemStack aInput : aItemInputs) { - if (ItemUtils.isMillingBall(aInput)) { - for (ItemStack aBall : aAvailableItems) { - if (GT_Utility.areStacksEqual(aBall, aInput, true)) { - Logger.INFO("Found a valid milling ball to use."); - return aBall; - } - } - } - } - } - } - } - return null; - } - - - private void damageMillingBall(ItemStack aStack) { - if (MathUtils.randFloat(0, 10000000)/10000000f < (1.2f - (0.2 * 1))) { - int damage = getMillingBallDamage(aStack) + 1; - log("damage milling ball "+damage); - if (damage >= getMaxBallDurability(aStack)) { - log("consuming milling ball"); - aStack.stackSize -= 1; - } - else { - setDamage(aStack,damage); - } - } - else { - log("not damaging milling ball"); - } - } - - private int getMillingBallDamage(ItemStack aStack) { - return ItemGenericChemBase.getMillingBallDamage(aStack); - } - - private void setDamage(ItemStack aStack,int aAmount) { - ItemGenericChemBase.setMillingBallDamage(aStack, aAmount); - } - - - @Override - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) { - - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - log("Running checkRecipeGeneric(0)"); - - // checks if it has a milling ball with enough durability - ItemStack tMillingBallRecipe = findMillingBall(aItemInputs); - if (tMillingBallRecipe == null) { - log("does not have milling ball"); - return false; - } - - GT_Recipe tRecipe = findRecipe( - getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - - log("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - log("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - log("aEUPercent "+aEUPercent); - log("mEUt "+tRecipe.mEUt); - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+1); - log("tTotalEUt: "+tTotalEUt); - log("tVoltage: "+tVoltage); - log("tEnergy: "+tEnergy); - log("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < 1 && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - - // Damage Milling ball once all is said and done. - if (tMillingBallRecipe != null) { - log("damaging milling ball"); - damageMillingBall(tMillingBallRecipe); - } - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("GOOD RETURN - 1"); - return true; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java deleted file mode 100644 index 81f8ba9edb..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java +++ /dev/null @@ -1,414 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -import java.util.ArrayList; -import java.util.List; - -import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; - -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GasSpargingRecipe; -import gregtech.api.util.GasSpargingRecipeMap; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockBase { - - protected static final String STRUCTURE_PIECE_BASE = "base"; - protected static final String STRUCTURE_PIECE_LAYER = "layer"; - protected static final String STRUCTURE_PIECE_LAYER_HINT = "layerHint"; - protected static final String STRUCTURE_PIECE_TOP_HINT = "topHint"; - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][]{ - {"b~b", "bbb", "bbb"}, - })) - .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][]{ - {"lll", "lcl", "lll"} - })) - .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][]{ - {"lll", "l-l", "lll"} - })) - .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][]{ - {"lll", "lll", "lll"} - })) - .addElement('b', ofChain( - ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 1), - ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addInputToMachineList, getCasingIndex(), 1), - ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 1), - onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4)) - )) - .addElement('l', ofChain( - ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 2), - ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addLayerOutputHatch, getCasingIndex(), 2), - ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 2), - onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4)) - )) - .addElement('c', ofChain( - onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addOutputToMachineList, getCasingIndex(), 3)), - onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 3)), - onElementPass(t -> t.onTopLayerFound(true), ofBlock(ModBlocks.blockCasings5Misc, 4)), - isAir() - )) - .build(); - - protected final List> mOutputHatchesByLayer = new ArrayList<>(); - protected int mHeight; - protected int mCasing; - protected boolean mTopLayerFound; - - public GregtechMetaTileEntity_SpargeTower(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_SpargeTower(String aName) { - super(aName); - } - - public static int getCasingIndex() { - return 68; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_SpargeTower(this.mName); - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Gas Sparge Tower") - .addInfo("Controller block for the Sparging Tower") - .addInfo("Fluids are only put out at the correct height") - .addInfo("The correct height equals the slot number in the NEI recipe") - .addSeparator() - .beginStructureBlock(3, 8, 3, true) - .addController("Front bottom") - .addOtherStructurePart("Sparge Tower Exterior Casing", "45 (minimum)") - .addEnergyHatch("Any casing", 1, 2) - .addMaintenanceHatch("Any casing", 1, 2, 3) - .addInputHatch("2x Input Hatches (Any bottom layer casing)", 1) - .addOutputHatch("6x Output Hatches (At least one per layer except bottom layer)", 2, 3) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - if (aActive) - return new ITexture[]{ - BlockIcons.getCasingTextureForId(getCasingIndex()), - TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active).extFacing().build()}; - return new ITexture[]{ - BlockIcons.getCasingTextureForId(getCasingIndex()), - TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced).extFacing().build()}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingIndex())}; - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png"); - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - if (GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.isEmpty()) { - generateRecipes(); - } - return GTPP_Recipe_Map.sSpargeTowerRecipes; - } - - private static boolean generateRecipes() { - for (GasSpargingRecipe aRecipe : GasSpargingRecipeMap.mRecipes) { - GTPP_Recipe newRecipe = new GTPP_Recipe( - false, - new ItemStack[] {}, - new ItemStack[] {}, - null, - null, - aRecipe.mFluidInputs.clone(), - new FluidStack[] {}, - aRecipe.mDuration, - aRecipe.mEUt, - 0); - GTPP_Recipe_Map.sSpargeTowerRecipes.add(newRecipe); - } - if (GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.isEmpty()) { - return false; - } - return true; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - ArrayList tFluidList = getStoredFluids(); - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(0, GT_Utility.getTier(tVoltage)); - FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); - if (tFluids.length > 0) { - Logger.INFO("Found "+tFluids.length+" input fluids. Searching "+GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.size()+" recipes."); - GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids); - if (tRecipe != null) { - Logger.INFO("Found recipe!"); - if (tRecipe.isRecipeInputEqual(true, tFluids)) { - Logger.INFO("Found recipe that matches!"); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Reset outputs and progress stats - this.mEUt = 0; - this.mProgresstime = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - this.mLastRecipe = tRecipe; - - calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); - int aDevProgress = this.mMaxProgresstime / 10; - this.mMaxProgresstime = Math.max(1, aDevProgress); - this.mOutputItems = new ItemStack[]{}; - ArrayList aFluidOutputs = getByproductsOfSparge(tRecipe.mFluidInputs[0], tRecipe.mFluidInputs[1]); - this.mOutputFluids = (FluidStack[]) aFluidOutputs.toArray(new FluidStack[0]); - updateSlots(); - Logger.INFO("Done!"); - return true; - } - } - else { - Logger.INFO("Did not find recipe!"); - } - } - this.mEUt = 0; - this.mEfficiency = 0; - Logger.INFO("Did not find recipe! (2)"); - return false; - } - - private static ArrayList getByproductsOfSparge(final FluidStack aSpargeGas, final FluidStack aSpentFuel){ - GasSpargingRecipe aSpargeRecipe = GasSpargingRecipeMap.findRecipe(aSpargeGas, aSpentFuel); - ArrayList aOutputGases = new ArrayList(); - if (aSpargeRecipe == null) { - Logger.INFO("Did not find sparge recipe!"); - return aOutputGases; - } - int aSpargeGasAmount = aSpargeRecipe.mInputGas.amount; - - aOutputGases.add(aSpargeRecipe.mOutputSpargedFuel.copy()); - ArrayList aTempMap = new ArrayList(); - for (int i=2;i 0) { - aSpargeOutput = new FluidStack(aOutput.getFluid(), aGasAmount); - } - aTempMap.add(aSpargeOutput); - } - Logger.INFO("Sparge gas left: "+aSpargeGasAmount); - if (aSpargeGasAmount > 0) { - aOutputGases.add(new FluidStack(aSpargeRecipe.mInputGas.getFluid(), aSpargeGasAmount)); - } - //Logger.INFO("Sparge Outputs: "+ItemUtils.getArrayStackNames(aTempMap)); - aOutputGases.addAll(aTempMap); - Logger.INFO("Sparge output size: "+aOutputGases.size()); - //Logger.INFO("Output of sparging: "+ItemUtils.getArrayStackNames(aOutputGases)); - return aOutputGases; - } - - protected void onCasingFound() { - mCasing++; - } - - protected void onTopLayerFound(boolean aIsCasing) { - mTopLayerFound = true; - if (aIsCasing) { - onCasingFound(); - } - } - - protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) { - Logger.INFO("Bad Output Hatch"); - return false; - } - while (mOutputHatchesByLayer.size() < mHeight) { - mOutputHatchesByLayer.add(new ArrayList<>()); - } - GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity(); - tHatch.updateTexture(aBaseCasingIndex); - boolean addedHatch = mOutputHatchesByLayer.get(mHeight - 1).add(tHatch); - Logger.INFO("Added Hatch: "+addedHatch); - return addedHatch; - } - - @Override - protected IAlignmentLimits getInitialAlignmentLimits() { - // don't rotate a freaking tower, it won't work - return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); - } - - @Override - public IStructureDefinition getStructureDefinition() { - return STRUCTURE_DEFINITION; - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - // reset - mOutputHatchesByLayer.forEach(List::clear); - mHeight = 1; - mTopLayerFound = false; - mCasing = 0; - - // check base - if (!checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0)) { - Logger.INFO("Bad Base. Height: "+mHeight); - return false; - } - - // check each layer - while (mHeight < 8 && checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0) && !mTopLayerFound) { - if (mOutputHatchesByLayer.get(mHeight - 1).isEmpty()) { - // layer without output hatch - Logger.INFO("Height: "+mHeight + " - Missing output on "+(mHeight - 1)); - return false; - } - // not top - mHeight++; - } - - // validate final invariants... - Logger.INFO("Height: "+mHeight); - Logger.INFO("Casings: "+mCasing); - Logger.INFO("Required: "+(7 * mHeight - 5)); - Logger.INFO("Found Top: "+mTopLayerFound); - return mCasing >= 45 && mTopLayerFound && mMaintenanceHatches.size() == 1; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - protected void addFluidOutputs(FluidStack[] mOutputFluids2) { - for (int i = 0; i < mOutputFluids2.length && i < mOutputHatchesByLayer.size(); i++) { - FluidStack tStack = mOutputFluids2[i] != null ? mOutputFluids2[i].copy() : null; - if (tStack == null) { - continue; - } - if (!dumpFluid(mOutputHatchesByLayer.get(i), tStack, true)) { - dumpFluid(mOutputHatchesByLayer.get(i), tStack, false); - } - } - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(STRUCTURE_PIECE_BASE, stackSize, hintsOnly, 1, 0, 0); - int tTotalHeight = 8; // min 2 output layer, so at least 1 + 2 height - for (int i = 1; i < tTotalHeight - 1; i++) { - buildPiece(STRUCTURE_PIECE_LAYER_HINT, stackSize, hintsOnly, 1, i, 0); - } - buildPiece(STRUCTURE_PIECE_TOP_HINT, stackSize, hintsOnly, 1, tTotalHeight - 1, 0); - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getMachineType() { - return "Gas Sparger"; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { - int aLayerIndex = 0; - PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatchesByLayer.size()+" layers of output hatches."); - for (List layer : this.mOutputHatchesByLayer) { - int aHatchIndex = 0; - for (GT_MetaTileEntity_Hatch_Output hatch : layer) { - if (hatch.mFluid != null) { - PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+" on layer "+aLayerIndex+"."); - hatch.mFluid = null; - } - aHatchIndex++; - } - aLayerIndex++; - } - return aLayerIndex > 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java deleted file mode 100644 index 8c9e886e94..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java +++ /dev/null @@ -1,629 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; - -import java.util.ArrayList; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.minecraft.LangUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Naquadah; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_Adv_AssemblyLine - extends GregtechMeta_MultiBlockBase { - - public ArrayList mDataAccessHatches = new ArrayList(); - - public static String[] mCasingName = new String[5]; - private final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 13); - private final int META_BaseCasing = 0; //4 - private final int META_ContainmentCasing = 15; //3 - private final int META_Shielding = 13; //1 - private final int META_PipeCasing = 1; //4 - private final int META_IntegralCasing = 6; //0 - private final int META_ContainmentChamberCasing = 2; //4 - - - public GregtechMetaTileEntity_Adv_AssemblyLine(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); - mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); - mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); - mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); - mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); - } - - public GregtechMetaTileEntity_Adv_AssemblyLine(String aName) { - super(aName); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Adv_AssemblyLine(this.mName); - } - - public String[] getTooltip() { - if (mCasingName[0].toLowerCase().contains(".name")) { - mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); - } - if (mCasingName[1].toLowerCase().contains(".name")) { - mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); - } - if (mCasingName[2].toLowerCase().contains(".name")) { - mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); - } - if (mCasingName[3].toLowerCase().contains(".name")) { - mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); - } - if (mCasingName[4].toLowerCase().contains(".name")) { - mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); - } - return new String[]{ - "Advanced Integrated Assembly Line" - }; - } - - private Block getCasing(int casingID) { - if (casingID == 1) { - return ModBlocks.blockCasingsMisc; - } - else if (casingID == 2) { - return ModBlocks.blockCasings2Misc; - } - else if (casingID == 3) { - return ModBlocks.blockCasings3Misc; - } - else if (casingID == 4) { - return ModBlocks.blockCasings4Misc; - } - else { - return ModBlocks.blockCasingsTieredGTPP; - } - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(16), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(16)}; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png"); - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - - public boolean checkRecipe(ItemStack aStack) { - if(GT_Values.D1)System.out.println("Start ALine recipe check"); - ArrayList tDataStickList = getDataItems(2); - if (tDataStickList.size() == 0) return false; - if(GT_Values.D1)System.out.println("Stick accepted, " + tDataStickList.size() + " Data Sticks found"); - - ItemStack tStack[] = new ItemStack[15]; - FluidStack[] tFluids = new FluidStack[4]; - boolean findRecipe = false; - nextDS:for (ItemStack tDataStick : tDataStickList){ - NBTTagCompound tTag = tDataStick.getTagCompound(); - if (tTag == null) continue; - for (int i = 0; i < 15; i++) { - int count = tTag.getInteger("a"+i); - if (!tTag.hasKey("" + i) && count <= 0) continue; - if (mInputBusses.get(i) == null) { - continue nextDS; - } - - ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0); - boolean flag = true; - if (count > 0) { - for (int j = 0; j < count; j++) { - tStack[i] = GT_Utility.loadItem(tTag, "a" + i + ":" + j); - if (tStack[i] == null) continue; - if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName()); - if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { - flag = false; - break; - } - } - } - if (flag) { - tStack[i] = GT_Utility.loadItem(tTag, "" + i); - if (tStack[i] == null) { - flag = false; - continue; - } - if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName()); - if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { - flag = false; - } - } - if(GT_Values.D1) System.out.println(i + (flag ? " not accepted" : " accepted")); - if (flag) continue nextDS; - } - - if(GT_Values.D1)System.out.println("All Items done, start fluid check"); - for (int i = 0; i < 4; i++) { - if (!tTag.hasKey("f" + i)) continue; - tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i); - if (tFluids[i] == null) continue; - if(GT_Values.D1)System.out.println("Fluid "+i+" "+tFluids[i].getUnlocalizedName()); - if (mInputHatches.get(i) == null) { - continue nextDS; - } - FluidStack fluidInHatch = mInputHatches.get(i).mFluid; - if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) { - if(GT_Values.D1)System.out.println(i+" not accepted"); - continue nextDS; - } - if(GT_Values.D1)System.out.println(i+" accepted"); - } - - if(GT_Values.D1)System.out.println("Input accepted, check other values"); - if (!tTag.hasKey("output")) continue; - mOutputItems = new ItemStack[]{GT_Utility.loadItem(tTag, "output")}; - if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0])) - continue; - - if (!tTag.hasKey("time")) continue; - mMaxProgresstime = tTag.getInteger("time"); - if (mMaxProgresstime <= 0) continue; - - if (!tTag.hasKey("eu")) continue; - mEUt = tTag.getInteger("eu"); - - if(GT_Values.D1)System.out.println("Find avaiable recipe"); - findRecipe = true; - break; - } - if (!findRecipe) return false; - - if(GT_Values.D1)System.out.println("All checked start consuming inputs"); - for (int i = 0; i < 15; i++) { - if (tStack[i] == null) continue; - ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0); - stackInSlot.stackSize -= tStack[i].stackSize; - } - - for (int i = 0; i < 4; i++) { - if (tFluids[i] == null) continue; - mInputHatches.get(i).mFluid.amount -= tFluids[i].amount; - if (mInputHatches.get(i).mFluid.amount <= 0) { - mInputHatches.get(i).mFluid = null; - } - } - if(GT_Values.D1)System.out.println("Check overclock"); - - byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - if (mEUt <= 16) { - this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - if (this.mEUt > 0) { - this.mEUt = -this.mEUt; - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - updateSlots(); - if(GT_Values.D1)System.out.println("Recipe sucessfull"); - return true; - } - - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 20) { - GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ); - } - } - - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4; - - // Counts for all Casing Types - int aBaseCasingCount = 0; - int aContainmentCasingCount = 0; - int aShieldingCount = 0; - int aPipeCount = 0; - int aIntegralCasingCount = 0; - int aContainmentChamberCount = 0; - - // Bottom Layer - aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, -7, xDir, zDir); - log("Bottom Layer is Valid. Moving to Layer 1."); - - // Layer 1 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -6, xDir, zDir); - aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -6, xDir, zDir); - aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir); - log("Layer 1 is Valid. Moving to Layer 2."); - - // Layer 2 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -5, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -5, xDir, zDir); - log("Layer 2 is Valid. Moving to Layer 3."); - - // Layer 3 - aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir); - log("Layer 3 is Valid. Moving to Layer 4."); - - // Layer 4 - aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir); - log("Layer 4 is Valid. Moving to Layer 5."); - - // Layer 5 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -2, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -2, xDir, zDir); - log("Layer 5 is Valid. Moving to Layer 6."); - - // Layer 6 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir); - aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir); - aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -1, xDir, zDir); - log("Layer 6 is Valid. Moving to Top Layer."); - - // Top Layer - aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, 0, xDir, zDir); - - log("Found "+aBaseCasingCount+" "+mCasingName[0]+"s"); - log("Found "+aShieldingCount+" "+mCasingName[4]+"s"); - log("Found "+aPipeCount+" "+mCasingName[1]+"s"); - log("Found "+aContainmentCasingCount+" "+mCasingName[3]+"s"); - log("Found "+aIntegralCasingCount+" "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s"); - log("Found "+aContainmentChamberCount+" "+mCasingName[2]+"s"); - - // Try mesage player - String aOwnerName = this.getBaseMetaTileEntity().getOwnerName(); - EntityPlayer aOwner = null; - if (aOwnerName != null && aOwnerName.length() > 0) { - aOwner = PlayerUtils.getPlayer(aOwnerName); - } - - if (aShieldingCount != 128) { - log("Not enough "+mCasingName[4]+"s, require 128."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[4]+"s, require 128."); - } - return false; - } - if (aPipeCount != 20) { - log("Not enough "+mCasingName[1]+"s, require 20."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[1]+"s, require 20."); - } - return false; - } - if (aContainmentCasingCount != 64) { - log("Not enough "+mCasingName[3]+"s, require 64."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[3]+"s, require 64."); - } - return false; - } - if (aContainmentChamberCount != 42) { - log("Not enough "+mCasingName[2]+"s, require 42."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[2]+"s, require 42."); - } - return false; - } - if (aBaseCasingCount < 140) { - log("Not enough "+mCasingName[0]+"s, require 140 at a minimum."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[0]+"s, require 140 at a minimum."); - } - return false; - } - if (aIntegralCasingCount != 48) { - log("Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); - } - return false; - } - log("LNR Formed."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Large Naquadah Reactor has formed successfully."); - } - return true; - } - - public boolean addNaquadahHatchToMachineInput(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity); - } - return false; - } - - public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -4; x < 5; x++) { - for (int z = -4; z < 5; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { - continue; - } - // Skip controller - if (aY == 0 && x == 0 && z == 0) { - continue; - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - - public int checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -4; x < 5; x++) { - for (int z = -4; z < 5; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { - continue; - } - - // If we are on the 5x5 ring, proceed - if ((x > -4 && x < 4 ) && (z > -4 && z < 4)) { - if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - } - else { - continue; - } - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -3; x < 4; x++) { - for (int z = -3; z < 4; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { - continue; - } - - // If we are on the 5x5 ring, proceed - if ((x > -3 && x < 3 ) && (z > -3 && z < 3)) { - if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - } - else { - continue; - } - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - - public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -1; x < 2; x++) { - for (int z = -1; z < 2; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 1 && z == 1) || (x == -1 && z == -1) || (x == 1 && z == -1) || (x == -1 && z == 1) || (x == 0 && z == 0)) { - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Pipe has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - }; - } - } - } - return aCasingCount; - } - - public int checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -2; x < 3; x++) { - for (int z = -2; z < 3; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { - continue; - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - - */ -/** - * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb - *//* - - private boolean isCorrectDataItem(ItemStack aStack, int state){ - if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true; - if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true; - if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true; - return false; - } - - */ -/** - * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb - *//* - - public ArrayList getDataItems(int state) { - ArrayList rList = new ArrayList(); - if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) { - rList.add(mInventory[1]); - } - for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) { - if (isValidMetaTileEntity(tHatch)) { - for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null - && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state)) - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - return rList; - } - - public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) return false; - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity); - } - return false; - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Assembly Line"; - } - - @Override - public int getMaxParallelRecipes() { - return 0; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java deleted file mode 100644 index 6d8ca49d7d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java +++ /dev/null @@ -1,481 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; - -import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; - -public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_MultiBlockBase { - - private short mControllerY = 0; - private byte mMode = 0; - private boolean mUpgraded = false; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_Adv_DistillationTower(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_Adv_DistillationTower(String aName) { - super(aName); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Adv_DistillationTower(this.mName); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName + "bottom", transpose(new String[][]{ - {"I~I", "III", "III"} - })) - .addShape(mName + "mid", transpose(new String[][]{ - {"CCC", "C-C", "CCC"} - })) - .addShape(mName + "top", transpose(new String[][]{ - {"MMM", "MMM", "MMM"} - })) - .addElement( - 'I', - ofHatchAdderOptional( - GregtechMetaTileEntity_Adv_DistillationTower::addAdvDistillationTowerBottomList, getCasingTextureID(), - 1, GregTech_API.sBlockCasings4, 1 - ) - ) - .addElement( - 'C', - ofHatchAdderOptional( - GregtechMetaTileEntity_Adv_DistillationTower::addAdvDistillationTowerMidList, getCasingTextureID(), - 2, GregTech_API.sBlockCasings4, 1 - ) - ) - .addElement( - 'M', - ofHatchAdderOptional( - GregtechMetaTileEntity_Adv_DistillationTower::addAdvDistillationTowerTopList, getCasingTextureID(), - 3, GregTech_API.sBlockCasings4, 1 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public final boolean addAdvDistillationTowerBottomList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addAdvDistillationTowerMidList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addAdvDistillationTowerTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Advanced Distillation Tower") - .addInfo("T1 and T2 constructed identical to standard DT") - .addInfo("Right click the controller with screwdriver to change mode.") - .addInfo("Max parallel dictated by tower tier and mode") - .addInfo("DTower Mode: T1=4, T2=12") - .addInfo("Distilery Mode: Tower Tier * (4*InputTier)") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .addCasingInfo("Clean Stainless Steel Machine Casing", 7) - .addInputBus("Bottom Casing", 1) - .addOutputBus("Bottom Casing", 1) - .addInputHatch("Bottom Casing", 1) - .addMaintenanceHatch("Bottom Casing", 1) - .addEnergyHatch("Bottom Casing", 1) - .addOutputHatch("One per layer except bottom", 2) - .addMufflerHatch("Top Center Casing", 3) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - int layer = Math.min(stackSize.stackSize + 2, 12); - buildPiece(mName + "bottom", stackSize, hintsOnly, 1, 0, 0); - for (int i = 1; i < layer - 1; i++) { - buildPiece(mName + "mid", stackSize, hintsOnly, 1, i, 0); - } - buildPiece(mName + "top", stackSize, hintsOnly, 1, layer - 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - if (!checkPiece(mName + "bottom", 1, 0, 0)) - return false; - int layer = 1; - while (checkPiece(mName + "mid", 1, layer, 0)) { - if (layer != mOutputHatches.size()) return false; - layer ++; - } - if (layer > 12 || !checkPiece(mName + "top", 1, layer, 0)) - return false; - return layer == mOutputHatches.size() && checkHatch(); - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName()+(mUpgraded ? " T2" : ""), "MultiblockDisplay.png"); - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return mMode == 0 ? GT_Recipe.GT_Recipe_Map.sDistillationRecipes : GT_Recipe.GT_Recipe_Map.sDistilleryRecipes; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - protected IAlignmentLimits getInitialAlignmentLimits() { - // don't rotate a freaking tower, it won't work - return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(ItemStack aStack) { - if (this.mMode == 1) return CORE.ConfigSwitches.pollutionPerSecondMultiAdvDistillationTower_ModeDistillery; - return CORE.ConfigSwitches.pollutionPerSecondMultiAdvDistillationTower_ModeDT; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setByte("mMode", mMode); - aNBT.setInteger("mCasingTier", this.mCasingTier); - aNBT.setBoolean("mUpgraded", mUpgraded); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - mMode = aNBT.getByte("mMode"); - mCasingTier = aNBT.getInteger("mCasingTier"); - mUpgraded = aNBT.getBoolean("mUpgraded"); - super.loadNBTData(aNBT); - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(203)); - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mMode++; - if (mMode > 1){ - mMode = 0; - PlayerUtils.messagePlayer(aPlayer, "Now running in Distillation Tower Mode."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Now running in Distillery Mode."); - } - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) return false; - FluidStack tLiquid = aLiquid.copy(); - for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { - if (tHatch.getBaseMetaTileEntity().getYCoord() == this.mControllerY + 1) { - int tAmount = tHatch.fill(tLiquid, false); - if (tAmount >= tLiquid.amount) { - return tHatch.fill(tLiquid, true) >= tLiquid.amount; - } else if (tAmount > 0) { - tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); - } - } - } - } - return false; - } - - @Override - protected void addFluidOutputs(FluidStack[] mOutputFluids2) { - for (int i = 0; i < mOutputFluids2.length; i++) { - if (mOutputHatches.size() > i && mOutputHatches.get(i) != null && mOutputFluids2[i] != null && isValidMetaTileEntity(mOutputHatches.get(i))) { - if (mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord() == this.mControllerY + 1 + i) { - mOutputHatches.get(i).fill(mOutputFluids2[i], true); - } - } - } - - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "DistillationTower"; - } - - @Override - public String getMachineType() { - return "Distillery, Distillation Tower"; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - // Run standard recipe handling for distillery recipes - if (mMode == 1) { - return this.checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 100); - } - else { - for (GT_MetaTileEntity_Hatch_Input hatch : mInputHatches) { - FluidStack tFluid = hatch.getFluid(); - if (tFluid != null) { - int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); - if (checkRecipeGeneric(null, new FluidStack[]{tFluid}, para,100, 250, 10000)) { - return true; - } - } - } - return false; - } - } - - @Override - public int getMaxParallelRecipes() { - if (this.mMode == 0) { - return getTierOfTower() == 1 ? 4 : getTierOfTower() == 2 ? 12 : 0; - } - else if (this.mMode == 1) { - return getTierOfTower() * (4 * GT_Utility.getTier(this.getMaxInputVoltage())); - } - return 0; - } - - @Override - public int getEuDiscountForParallelism() { - return 15; - } - - private int getTierOfTower() { - return mUpgraded ? 2 : 1; - } - - private int mCasingTier = 0; - - private int getMachineCasingTier() { - return mCasingTier; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - - ITexture aOriginalTexture; - - // Check things exist client side (The worst code ever) - if (aBaseMetaTileEntity.getWorld() != null) { - - } - // Check the Tier Client Side - int aTier = mCasingTier; - - if (aTier == 0) { - aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(49); - } - else if (aTier == 1) { - aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(43); - } - else { - aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(49); - } - - if (aSide == aFacing) { - return new ITexture[]{aOriginalTexture, new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)}; - } - return new ITexture[]{aOriginalTexture}; - } - - private int getCasingTextureID() { - // Check the Tier Client Side - int aTier = mCasingTier; - - if (aTier == 1) { - return 49; - } - else if (aTier == 2) { - return 43; - } - else { - return 49; - } - } - - public boolean addToMachineList(IGregTechTileEntity aTileEntity) { - int aMaxTier = getMachineCasingTier(); - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { - GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity; - int aTileTier = aMachineBlock.mTier; - if (aTileTier > aMaxTier) { - Logger.INFO("Hatch tier too high."); - return false; - } - else { - return addToMachineList(aTileEntity, getCasingTextureID()); - } - } - else { - Logger.INFO("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know.. - return false; - } - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (aTick % 20 == 0 && !mUpgraded) { - ItemStack aGuiStack = this.getGUIItemStack(); - if (aGuiStack != null) { - if (GT_Utility.areStacksEqual(aGuiStack, GregtechItemList.Distillus_Upgrade_Chip.get(1))) { - this.mUpgraded = true; - ItemUtils.depleteStack(aGuiStack); - } - } - } - // Silly Client Syncing - if (aBaseMetaTileEntity.isClientSide()) { - this.mCasingTier = getCasingTierOnClientSide(); - } - } - - - - @SideOnly(Side.CLIENT) - private final int getCasingTierOnClientSide() { - if (this == null || this.getBaseMetaTileEntity().getWorld() == null) { - return 0; - } - try { - Block aInitStructureCheck; - int aInitStructureCheckMeta; - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - if (aBaseMetaTileEntity == null || aBaseMetaTileEntity.getWorld() == null || aBaseMetaTileEntity.getWorld().getChunkFromBlockCoords(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getZCoord()) == null) { - return 0; - } - for (int i=1;i<10;i++) { - aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, i, 0); - aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, i, 0); - if (aInitStructureCheck == null) { - continue; - } - if (aInitStructureCheck == GregTech_API.sBlockCasings4 && aInitStructureCheckMeta == 1) { - return 0; - } - else if (aInitStructureCheck == ModBlocks.blockCasingsTieredGTPP) { - return 1; - } - } - } - catch (Throwable t) { - //t.printStackTrace(); - } - return 0; - - } - - @Override - public void setItemNBT(NBTTagCompound aNBT) { - aNBT.setBoolean("mUpgraded", mUpgraded); - super.setItemNBT(aNBT); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java deleted file mode 100644 index ce54aef282..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ /dev/null @@ -1,484 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ChatComponentTranslation; -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase { - - public static int CASING_TEXTURE_ID; - public static String mHotFuelName = "Blazing Pyrotheum"; - public static String mCasingName = "Advanced Blast Furnace Casing"; - public static String mHatchName = "Pyrotheum Hatch"; - private IStructureDefinition STRUCTURE_DEFINITION = null; - private int mCasing; - private boolean mHaveHatch; - - private HeatingCoilLevel mHeatingCapacity; - private boolean isBussesSeparate = false; - - public GregtechMetaTileEntity_Adv_EBF(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 11); - mHotFuelName = FluidUtils.getFluidStack("pyrotheum", 1).getLocalizedName(); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 11); - mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); - } - - public GregtechMetaTileEntity_Adv_EBF(String aName) { - super(aName); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 11); - mHotFuelName = FluidUtils.getFluidStack("pyrotheum", 1).getLocalizedName(); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 11); - mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); - } - - @Override - public String getMachineType() { - return "Blast Furnace"; - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Adv_EBF(this.mName); - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 11); - } - if (mHotFuelName.toLowerCase().contains(".")) { - mHotFuelName = FluidUtils.getFluidStack("pyrotheum", 1).getLocalizedName(); - } - if (mHatchName.toLowerCase().contains(".name")) { - mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); - } - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Factory Grade Advanced Blast Furnace") - .addInfo("Speed: 120% | Eu Usage: 90% | Parallel: 8") - .addInfo("Consumes 10L of " + mHotFuelName + " per second during operation") - .addInfo("Constructed exactly the same as a normal EBF") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .addController("Bottom center") - .addCasingInfo(mCasingName, 9) - .addInputHatch("Any Casing", 1) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addStructureHint(mHatchName, 1) - .addEnergyHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"HHH", "H-H", "HHH"}, - {"HHH", "H-H", "HHH"}, - {"C~C", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_Adv_EBF::addAdvEBFList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 11 - ) - ) - ) - ) - .addElement( - 'H', - ofCoil( - GregtechMetaTileEntity_Adv_EBF::setCoilLevel, GregtechMetaTileEntity_Adv_EBF::getCoilLevel - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName, stackSize, hintsOnly, 1, 3, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mHaveHatch = false; - setCoilLevel(HeatingCoilLevel.None); - return checkPiece(mName, 1, 3, 0) && mCasing >= 9 && mHaveHatch && getCoilLevel() != HeatingCoilLevel.None && checkHatch(); - } - - public final boolean addAdvEBFList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 968) { - mHaveHatch = true; - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced) }; - } - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "ElectricBlastFurnace"; - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sBlastRecipes; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - if (isBussesSeparate) { - FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tInputs = new ArrayList<>(); - if (isValidMetaTileEntity(tBus)) { - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) { - tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - } - if (tInputs.size() > 0) { - if (checkRecipeGeneric(tInputs.toArray(new ItemStack[0]), tFluids, 8, 90, 120, 10000)) { - return true; - } - } - } - return false; - } else { - return checkRecipeGeneric(8, 90, 120); - } - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiAdvEBF; - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, - int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[] {}; - this.mOutputFluids = new FluidStack[] {}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - Logger.WARNING("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - Logger.WARNING("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe == null || this.mHeatingCapacity.getHeat() < tRecipe.mSpecialValue) { - Logger.WARNING("BAD RETURN - 1"); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - Logger.WARNING("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - int tHeatCapacityDivTiers = (int) (mHeatingCapacity.getHeat() - tRecipe.mSpecialValue) / 900; - if (tHeatCapacityDivTiers > 0) - tRecipeEUt = (int) (tRecipeEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - // Count recipes to do in parallel, consuming input items and fluids and - // considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - Logger.WARNING("Broke at " + parallelRecipes + "."); - break; - } - Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + "."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - Logger.WARNING("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - int tHalfHeatCapacityDivTiers = tHeatCapacityDivTiers / 2; - - this.mEUt = (int) Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - if (tHalfHeatCapacityDivTiers > 0) { - this.mMaxProgresstime = mMaxProgresstime / 4; - tHalfHeatCapacityDivTiers--; - } else { - this.mMaxProgresstime = mMaxProgresstime / 2; - } - if (this.mMaxProgresstime <= 1) { - break; - } - } - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) - tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - Logger.WARNING("GOOD RETURN - 1"); - return true; - - } - - private volatile int mGraceTimer = 2; - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - //Try dry Pyrotheum after all other logic - if (this.mStartUpCheck < 0) { - if (this.mMaxProgresstime > 0 && this.mProgresstime != 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { - if (aTick % 10 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { - if (!this.depleteInput(FluidUtils.getFluidStack("pyrotheum", 5))) { - if (mGraceTimer-- == 0) { - this.causeMaintenanceIssue(); - this.stopMachine(); - mGraceTimer = 2; - } - } - } - } - } - - } - - @Override - public int getMaxParallelRecipes() { - return 8; - } - - @Override - public int getEuDiscountForParallelism() { - return 90; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - isBussesSeparate = !isBussesSeparate; - aPlayer.addChatMessage(new ChatComponentTranslation(isBussesSeparate ? "interaction.separateBusses.enabled" : "interaction.separateBusses.disabled")); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("isBussesSeparate", isBussesSeparate); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - isBussesSeparate = aNBT.getBoolean("isBussesSeparate"); - super.loadNBTData(aNBT); - } - - public HeatingCoilLevel getCoilLevel() { - return mHeatingCapacity; - } - - public void setCoilLevel(HeatingCoilLevel aCoilLevel) { - mHeatingCapacity = aCoilLevel; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java deleted file mode 100644 index 56206f8178..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java +++ /dev/null @@ -1,153 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; - -import java.lang.reflect.Method; - -public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_FusionComputer { - - public static final Method mUpdateHatchTexture; - - static { - mUpdateHatchTexture = ReflectionUtils.getMethod(GT_MetaTileEntity_Hatch.class, "updateTexture", int.class); - } - - public GregtechMetaTileEntity_Adv_Fusion_MK4(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, 6); - } - - public GregtechMetaTileEntity_Adv_Fusion_MK4(String aName) { - super(aName); - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Fusion Reactor") - .addInfo("HARNESSING THE POWER OF A NEUTRON STAR") - .addSeparator() - .beginStructureBlock(15, 3, 15, false) - .addController("See diagram when placed") - .addCasingInfo("Fusion Machine Casings MK III", 79) - .addStructureInfo("Cover the coils with casing") - .addOtherStructurePart("Advanced Fusion Coils", "Center part of the ring") - .addEnergyHatch("1-16, Specified casings", 2) - .addInputHatch("2-16, Specified casings", 1) - .addOutputHatch("1-16, Specified casings", 3) - .addStructureInfo("ALL Hatches must be UHV or better") - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public int tier() { - return 9; - } - - @Override - public long maxEUStore() { - return (640010000L * 4) * (Math.min(16, this.mEnergyHatches.size())) / 8L; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Adv_Fusion_MK4(mName); - } - - @Override - public Block getCasing() { - return getFusionCoil(); - } - - @Override - public int getCasingMeta() { - return 12; - } - - @Override - public Block getFusionCoil() { - return ModBlocks.blockCasings3Misc; - } - - @Override - public int getFusionCoilMeta() { - return 13; - } - - @Override - public int tierOverclock() { - return 8; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - ITexture[] sTexture; - if (aSide == aFacing) { - sTexture = new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)), - new GT_RenderedTexture(this.getIconOverlay())}; - } else if (!aActive) { - sTexture = new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; - } else { - sTexture = new ITexture[]{ - new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA, - Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; - } - return sTexture; - } - - @Override - public ITexture getTextureOverlay() { - return new GT_RenderedTexture(this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1); - } - - public IIconContainer getIconOverlay() { - return this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1; - } - - public boolean turnCasingActive(final boolean status) { - try { - if (this.mEnergyHatches != null) { - for (final GT_MetaTileEntity_Hatch_Energy hatch : this.mEnergyHatches) { - mUpdateHatchTexture.invoke(hatch, (status ? TAE.getIndexFromPage(2, 14) : 53)); - } - } - if (this.mOutputHatches != null) { - for (final GT_MetaTileEntity_Hatch_Output hatch2 : this.mOutputHatches) { - mUpdateHatchTexture.invoke(hatch2, (status ? TAE.getIndexFromPage(2, 14) : 53)); - } - } - if (this.mInputHatches != null) { - for (final GT_MetaTileEntity_Hatch_Input hatch3 : this.mInputHatches) { - mUpdateHatchTexture.invoke(hatch3, (status ? TAE.getIndexFromPage(2, 14) : 53)); - } - } - } - catch (Throwable t) { - return false; - } - return true; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java deleted file mode 100644 index aff614184a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java +++ /dev/null @@ -1,207 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.GregTech_API.sBlockCasings4; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_Adv_Implosion -extends GregtechMeta_MultiBlockBase { - - private String mCasingName; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_Adv_Implosion(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); - } - - public GregtechMetaTileEntity_Adv_Implosion(String aName) { - super(aName); - mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Adv_Implosion(this.mName); - } - - @Override - public String getMachineType() { - return "Implosion Compressor"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.contains("gt.blockcasings")) { - mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); - } - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Factory Grade Advanced Implosion Compressor") - .addInfo("Speed: 100% | Eu Usage: 100% | Parallel: ((Tier/2)+1)") - .addInfo("Constructed exactly the same as a normal Implosion Compressor") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo(mCasingName, 10) - .addInputBus("Any casing", 1) - .addOutputBus("Any casing", 1) - .addEnergyHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .addMufflerHatch("Any casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_Adv_Implosion::addAdvImplosionList, 48, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - sBlockCasings4, 0 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public final boolean addAdvImplosionList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48)}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "ImplosionCompressor"; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sImplosionRecipes; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric((GT_Utility.getTier(this.getMaxInputVoltage())/2+1), 100, 100); - } - - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 20) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ); - } - } - - @Override - public String getSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(5)); - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiAdvImplosion; - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public int getMaxParallelRecipes() { - return (GT_Utility.getTier(this.getMaxInputVoltage())/2+1); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java deleted file mode 100644 index 3191f56889..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java +++ /dev/null @@ -1,165 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.GregTech_API.sBlockCasings1; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase; -import net.minecraft.item.ItemStack; - -public class GregtechMetaTileEntity_SteamMacerator extends GregtechMeta_SteamMultiBase { - - private String mCasingName = "Bronze Plated Bricks"; - private IStructureDefinition STRUCTURE_DEFINITION = null; - private int mCasing; - - public GregtechMetaTileEntity_SteamMacerator(String aName) { - super(aName); - } - - public GregtechMetaTileEntity_SteamMacerator(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { - return new GregtechMetaTileEntity_SteamMacerator(this.mName); - } - - @Override - protected GT_RenderedTexture getFrontOverlay() { - return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR); - } - - @Override - protected GT_RenderedTexture getFrontOverlayActive() { - return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE); - } - - @Override - public String getMachineType() { - return "Macerator"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.contains("gt.blockcasings")) { - mCasingName = ItemList.Casing_BronzePlatedBricks.get(1).getDisplayName(); - } - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Steam Macerator") - .addInfo("Macerates " + getMaxParallelRecipes() + " ores at a time") - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo(mCasingName, 14) - .addStructureHint("Input Bus (Steam)", 1) - .addStructureHint("Output Bus (Steam)", 1) - .addStructureHint("Steam Hatch", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_SteamMacerator::addSteamMaceratorList, 10, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - sBlockCasings1, 10 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public final boolean addSteamMaceratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 31040){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - fixAllMaintenanceIssue(); - return checkPiece(mName, 1, 1, 0) && mCasing >= 14; - } - - @Override - public int getMaxParallelRecipes() { - return 8; - } - - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; - } - - @Override - public ItemStack[] getOutputItems(GT_Recipe aRecipe) { - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[1]; - for (int h = 0; h < 1; h++) { - if (aRecipe.getOutput(h) != null) { - tOutputItems[h] = aRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - return tOutputItems; - } - - @Override - public int getOutputCount(ItemStack[] aOutputs) { - return 1; - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java deleted file mode 100644 index eae51e5c1d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java +++ /dev/null @@ -1,656 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.lang.reflect.Field; -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.helpers.CraftingHelper; -import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase { - - private MODE mMachineMode = MODE.ASSEMBLY; - private byte mTier = 1; - protected GT_Recipe mLastRecipeToBuffer; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - /** The crafting matrix inventory (3x3). */ - public CraftingHelper mInventoryCrafter; - - public static enum MODE { - CRAFTING("CIRCUIT", "ASSEMBLY"), ASSEMBLY("CRAFTING", "DISASSEMBLY"), DISASSEMBLY("ASSEMBLY", "CIRCUIT"), CIRCUIT("DISASSEMBLY", "CRAFTING"); - - private final String lastMode; - private final String nextMode; - - MODE(String previous, String next) { - this.lastMode = previous; - this.nextMode = next; - } - - public MODE nextMode() { - return MODE.valueOf(this.nextMode); - } - - public MODE lastMode() { - return MODE.valueOf(this.lastMode); - } - - } - - public void onRightclick(EntityPlayer aPlayer) { - } - - public GT4Entity_AutoCrafter(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT4Entity_AutoCrafter(String mName) { - super(mName); - } - - @Override - public String getMachineType() { - String sType = "Assembler, Disassembler, "+((CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH) ? "Circuit Assembler" : ""); - return sType; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_AutoCrafter(this.mName); - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - return super.onRunningTick(aStack); - //return true; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiAutoCrafter; - } - - public int getAmountOfOutputs() { - return 1; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Highly Advanced Autocrafter") - .addInfo("Right Click with a Screwdriver to change mode") - .addInfo("200% faster than using single block machines of the same voltage") - .addInfo("Processes two items per voltage tier") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Autocrafter Frame", 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(0, 10)), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE - : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER) }; - } - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(0, 10)) }; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GT4Entity_AutoCrafter::addAutoCrafterList, TAE.getIndexFromPage(0, 10), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 12 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - if (checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch()) { - setTier(); - return true; - } else return false; - } - - public final boolean addAutoCrafterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - private static GT_Recipe_Map fCircuitMap; - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - if (this.mMachineMode == MODE.ASSEMBLY) { - return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; - } - else if (this.mMachineMode == MODE.CIRCUIT && !CORE.GTNH) { - if (fCircuitMap != null) { - return fCircuitMap; - } - GT_Recipe_Map r; - try { - Field f = ReflectionUtils.getField(GT_Recipe.GT_Recipe_Map.class, "sCircuitAssemblerRecipes"); - if (f != null) { - r = (GT_Recipe_Map) f.get(null); - if (r != null) { - fCircuitMap = r; - return r; - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - else if (this.mMachineMode == MODE.DISASSEMBLY || this.mMachineMode == MODE.CRAFTING) { - return null; - } - return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; - } - - private boolean isModernGT = true; - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (isModernGT && !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - isModernGT = false; - } - //5.09 support - if (isModernGT && !CORE.GTNH) { - mMachineMode = mMachineMode.nextMode(); - if (mMachineMode == MODE.CRAFTING) { - PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.AQUA+"AutoCrafting"); - } else if (mMachineMode == MODE.ASSEMBLY) { - PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.GREEN+"Assembly"); - } else if (mMachineMode == MODE.DISASSEMBLY) { - PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.RED+"Disassembly"); - } else { - PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.YELLOW+"Circuit Assembly"); - } - } - //5.08 support - else { - if (mMachineMode.nextMode() == MODE.CIRCUIT) { - mMachineMode = MODE.ASSEMBLY; - } - else if (mMachineMode.nextMode() == MODE.CRAFTING) { - mMachineMode = MODE.ASSEMBLY; - } - else { - mMachineMode = mMachineMode.nextMode(); - } - - if (mMachineMode == MODE.CRAFTING) { - PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.AQUA+"AutoCrafting"); - } else if (mMachineMode == MODE.ASSEMBLY) { - PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.GREEN+"Assembly"); - } else { - PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.RED+"Disassembly"); - } - } - } - -// @Override -// public boolean checkRecipe(final ItemStack aStack) { -// -// final long tVoltage = this.getMaxInputVoltage(); -// final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); -// -// if (mMachineMode == MODE.DISASSEMBLY) { -// return doDisassembly(); -// } else if (mMachineMode == MODE.CRAFTING) { -// return doCrafting(aStack); -// } else { -// return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200); -// } -// } - - private void setTier() { - long tVoltage = getMaxInputVoltage(); - this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - if (mMachineMode == MODE.DISASSEMBLY) { - return doDisassembly(); - } else if (mMachineMode == MODE.CRAFTING) { - return doCrafting(aStack); - } else { - ArrayList tFluids = getStoredFluids(); - //Logger.MACHINE_INFO("1"); - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList tBusItems = new ArrayList(); - //Logger.MACHINE_INFO("2"); - if (isValidMetaTileEntity(tBus)) { - //Logger.MACHINE_INFO("3"); - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - - Object[] tempArray = tFluids.toArray(new FluidStack[] {}); - FluidStack[] properArray; - properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {}); - - //Logger.MACHINE_INFO("4"); - if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), properArray, - getMaxParallelRecipes(), 100, 200, 10000)) return true; - } - return false; - } - } - - @Override - public int getMaxParallelRecipes() { - return 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage()))); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - public boolean doDisassembly() { - - final ArrayList tInputList = this.getStoredInputs(); - for (int tInputList_sS = tInputList.size(), i = 0; i < tInputList_sS - 1; ++i) { - for (int j = i + 1; j < tInputList_sS; ++j) { - if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { - if (tInputList.get(i).stackSize < tInputList.get(j).stackSize) { - tInputList.remove(i--); - tInputList_sS = tInputList.size(); - break; - } - tInputList.remove(j--); - tInputList_sS = tInputList.size(); - } - } - } - final ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]); - - ItemStack inputItem = tInputs[0]; - if (tInputs[0].stackSize <= 0) { - tInputs[0] = null; - this.updateSlots(); - } - int outputSlots = this.mOutputBusses.get(0).getSizeInventory(); - - if (this.mOutputBusses.size() > 1) { - outputSlots = 0; - for (GT_MetaTileEntity_Hatch_OutputBus r : this.mOutputBusses) { - outputSlots += r.getSizeInventory(); - } - } - - this.mOutputItems = new ItemStack[outputSlots]; - if (inputItem != null && inputItem.stackSize > 0) { - NBTTagCompound tNBT = inputItem.getTagCompound(); - if (tNBT != null) { - tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); - if (tNBT != null) { - this.mEUt = 16 * (1 << this.mTier - 1) * (1 << this.mTier - 1); - this.mMaxProgresstime = (100 - (8 * this.mTier)); - for (int i = 0; i < this.mOutputItems.length; ++i) { - if (this.getBaseMetaTileEntity().getRandomNumber(100) < 60 + 12 * this.mTier) { - this.mOutputItems[i] = GT_Utility.loadItem(tNBT, "Ingredient." + i); - if (this.mOutputItems[i] != null) { - this.mMaxProgresstime *= (int) 1.5; - } - } - } - - if (this.mTier > 5) { - this.mMaxProgresstime >>= this.mTier - 5; - } - if (this.mEUt > 0) - this.mEUt = (-this.mEUt); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - inputItem.stackSize--; - if (inputItem.stackSize <= 0) { - tInputs[0] = null; - } - this.updateSlots(); - return true; - - } - } - } - return false; - } - - private boolean doesCrafterHave9SlotInput() { - GT_MetaTileEntity_Hatch_InputBus craftingInput = null; - if (!this.mInputBusses.isEmpty()) { - for (GT_MetaTileEntity_Hatch_InputBus x : this.mInputBusses) { - if (x.mInventory.length == 9) { - craftingInput = x; - } - } - } - // Return if no input hatch set. - if (craftingInput == null) { - Logger.WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV]."); - return false; - - } else { - return true; - } - } - - private boolean doCrafting(ItemStack aStack) { - this.mMaxProgresstime = 0; - return false; // do nothing - /* - try { - // Set Crafting input hatch - if (!doesCrafterHave9SlotInput()) { - return false; - } - - // Read stored data from encrypted data stick. - ItemStack storedData_Output[] = NBTUtils.readItemsFromNBT(aStack, "Output"); - ItemStack storedData_Input[] = NBTUtils.readItemsFromNBT(aStack); - if (storedData_Output != null && storedData_Input != null) { - ItemStack loadedData[] = new ItemStack[9]; - if (storedData_Input.length >= 1) { - int number = 0; - for (ItemStack a : storedData_Input) { - if (a.getItem() == ModItems.ZZZ_Empty) { - // Utils.LOG_WARNING("Allocating free memory into crafting manager slot - // "+number+"."); - loadedData[number] = null; - } else { - // Utils.LOG_WARNING("Downloading "+a.getDisplayName()+" into crafting manager - // slot "+number+"."); - loadedData[number] = a; - } - number++; - } - } - - // Remove inputs here - ArrayList mInputArray = new ArrayList(); - ItemStack allInputs[]; - - for (GT_MetaTileEntity_Hatch_InputBus x : this.mInputBusses) { - if (x.mInventory.length > 0) { - for (ItemStack r : x.mInventory) { - if (r != null) { - mInputArray.add(r); - } - } - } - } - - if (mInputArray.isEmpty()) { - return false; - } else { - List list = mInputArray; - allInputs = list.toArray(new ItemStack[list.size()]); - - if (allInputs != null && allInputs.length > 0) { - - this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1); - this.mMaxProgresstime = MathUtils.roundToClosestInt((50 - (5 - * MathUtils.randDouble(((this.mTier - 2) <= 0 ? 1 : (this.mTier - 2)), this.mTier)))); - - Logger.WARNING("MPT: " + mMaxProgresstime + " | " + mEUt); - this.getBaseMetaTileEntity().setActive(true); - - // Setup some vars - int counter = 0; - - ItemStack toUse[] = new ItemStack[9]; - - outerloop: for (ItemStack inputItem : loadedData) { - if (inputItem == null) { - toUse[counter] = null; - continue outerloop; - } - for (ItemStack r : allInputs) { - if (r != null) { - // Utils.LOG_WARNING("Input Bus Inventory Iteration - Found:" - // +r.getDisplayName()+" | "+allInputs.length); - if (GT_Utility.areStacksEqual(r, inputItem)) { - if (this.getBaseMetaTileEntity().isServerSide()) { - toUse[counter] = inputItem; - counter++; - continue outerloop; - } - - } - } - } - counter++; - } - - int mCorrectInputs = 0; - for (ItemStack isValid : toUse) { - if (isValid == null || this.depleteInput(isValid)) { - mCorrectInputs++; - } else { - Logger.WARNING("Input in Slot " + mCorrectInputs + " was not valid."); - } - } - - if (this.mTier > 5) { - this.mMaxProgresstime >>= this.mTier - 5; - } - if (this.mEUt > 0) - this.mEUt = (-this.mEUt); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - if (mCorrectInputs == 9) { - ItemStack mOutputItem = storedData_Output[0]; - NBTUtils.writeItemsToGtCraftingComponents(mOutputItem, loadedData, true); - this.addOutput(mOutputItem); - this.updateSlots(); - return true; - } else { - return false; - } - - } - } - } - } - // End Debug - catch (Throwable t) { - t.printStackTrace(); - this.mMaxProgresstime = 0; - } - - this.mMaxProgresstime = 0; - return false; - */ - } - - @Override - public String[] getExtraInfoData() { - final String tRunning = (this.mMaxProgresstime > 0 ? "Auto-Crafter running" : "Auto-Crafter stopped"); - final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" - : "Needs Maintainance"); - String tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts."; - String tMode; - if (mMachineMode == MODE.DISASSEMBLY) { - tMode = "§cDisassembly"; - tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts."; - } else if (mMachineMode == MODE.ASSEMBLY || mMachineMode == MODE.CIRCUIT) { - tMode = mMachineMode == MODE.ASSEMBLY ? "§aAssembly" : "§eCircuit Assembly"; - if (mLastRecipeToBuffer != null && mLastRecipeToBuffer.mOutputs[0].getDisplayName() != null) { - tSpecialText = "Currently processing: " + mLastRecipeToBuffer.mOutputs[0].getDisplayName(); - } else { - tSpecialText = "Currently processing: Nothing"; - } - } else { - tMode = "§dAuto-Crafting"; - tSpecialText = "Does Auto-Crafter have 9-slot input bus? " + doesCrafterHave9SlotInput(); - } - - return new String[] { "Large Scale Auto-Asesembler v1.01c", tRunning, tMaintainance, "Mode: " + tMode, - tSpecialText }; - } - - private String getMode() { - return this.mMachineMode.name(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - String mMode = getMode(); - aNBT.setString("mMode", mMode); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - String modeString = aNBT.getString("mMode"); - MODE newMode = MODE.valueOf(modeString); - this.mMachineMode = newMode; - super.loadNBTData(aNBT); - } - - @Override - public void explodeMultiblock() { - AC_Helper_Utils.removeCrafter(this); - super.explodeMultiblock(); - } - - @Override - public void onExplosion() { - AC_Helper_Utils.removeCrafter(this); - super.onExplosion(); - } - - @Override - public void onRemoval() { - AC_Helper_Utils.removeCrafter(this); - super.onRemoval(); - } - - @Override - public void doExplosion(long aExplosionPower) { - AC_Helper_Utils.removeCrafter(this); - super.doExplosion(aExplosionPower); - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "Generic3By3"; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java deleted file mode 100644 index 65474d38ed..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java +++ /dev/null @@ -1,354 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.*; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.general.ItemLavaFilter; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GT4Entity_ThermalBoiler -extends GregtechMeta_MultiBlockBase -{ - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - private int mSuperEfficencyIncrease = 0; - - public void onRightclick(EntityPlayer aPlayer) - { - getBaseMetaTileEntity().openGUI(aPlayer, 158); - } - - public GT4Entity_ThermalBoiler(int aID, String aName, String aNameRegional) - { - super(aID, aName, aNameRegional); - } - - public GT4Entity_ThermalBoiler(String mName) { - super(mName); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) - { - return new GT4Entity_ThermalBoiler(this.mName); - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) - { - return true; - } - - @Override - public String getMachineType() { - return "Boiler"; - } - - @Override - public int getDamageToComponent(ItemStack aStack){ - //log("Trying to damage component."); - return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0; - } - - private static Item mLavaFilter; - - @Override - public boolean checkRecipe(ItemStack aStack) { - this.mSuperEfficencyIncrease=0; - - if (mLavaFilter == null) { - mLavaFilter = ItemList.Component_LavaFilter.getItem(); - } - - //Try reload new Lava Filter - if (aStack == null) { - ItemStack uStack = this.findItemInInventory(mLavaFilter); - if (uStack != null) { - this.setGUIItemStack(uStack); - aStack = this.getGUIItemStack(); - } - } - - - for (GT_Recipe tRecipe : GTPP_Recipe.GTPP_Recipe_Map.sThermalFuels.mRecipeList) { - FluidStack tFluid = tRecipe.mFluidInputs[0]; - if (tFluid != null) { - if (depleteInput(tFluid)) { - this.mMaxProgresstime = Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2)); - this.mEUt = getEUt(); - this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); - - int loot_MAXCHANCE = 100000; - if (mLavaFilter.getClass().isInstance(aStack.getItem())) { - - if ((tRecipe.getOutput(0) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(0))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(0) }) }; - } - if ((tRecipe.getOutput(1) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(1))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(1) }) }; - } - if ((tRecipe.getOutput(2) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(2))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(2) }) }; - } - if ((tRecipe.getOutput(3) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(3))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(3) }) }; - } - if ((tRecipe.getOutput(4) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(4))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(4) }) }; - } - if ((tRecipe.getOutput(5) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(5))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(5) }) }; - } - - } - //Give Obsidian without Lava Filter - if (tFluid.isFluidEqual(GT_ModHandler.getLava(86))){ - if ((tRecipe.getOutput(6) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(6))) { - this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(6) }) }; - } - } - - - return true; - } - } - } - this.mMaxProgresstime = 0; - this.mEUt = 0; - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - if (this.mEUt > 0) { - if(this.mSuperEfficencyIncrease>0){ - this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); - } - int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); - if (tGeneratedEU > 0) { - long amount = (tGeneratedEU + 160) / 160; - if (depleteInput(Materials.Water.getFluid(amount)) || depleteInput(GT_ModHandler.getDistilledWater(amount))) { - addOutput(GT_ModHandler.getSteam(tGeneratedEU)); - } else { - explodeMultiblock(); - } - } - return true; - } - return true; - } - - public int getEUt() { - return 400; - } - - public int getEfficiencyIncrease() { - return 12; - } - - int runtimeBoost(int mTime) { - return mTime * 150 / 100; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) - { - return false; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) - { - return 10000; - } - - @Override - public int getPollutionPerSecond(ItemStack aStack) - { - return CORE.ConfigSwitches.pollutionPerSecondMultiThermalBoiler; - } - - public int getAmountOfOutputs() - { - return 7; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Thermal Boiler Controller") - .addInfo("Converts Water & Heat into Steam") - .addInfo("Consult user manual for more information") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Thermal Containment Casings", 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), - new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GT4Entity_ThermalBoiler::addThermalBoilerList, TAE.getIndexFromPage(0, 1), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 11 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); - } - - public final boolean addThermalBoilerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public void damageFilter(){ - ItemStack filter = this.mInventory[1]; - if (filter != null){ - if (filter.getItem() instanceof ItemLavaFilter){ - - long currentUse = ItemLavaFilter.getFilterDamage(filter); - - //Remove broken Filter - if (currentUse >= 100-1){ - this.mInventory[1] = null; - } - else { - //Do Damage - ItemLavaFilter.setFilterDamage(filter, currentUse+1); - } - } - } - - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()){ - // Reload Lava Filter - if (this.getGUIItemStack() == null) { - if (this.mInputBusses.size() > 0) { - for (GT_MetaTileEntity_Hatch_InputBus aBus : this.mInputBusses) { - for (ItemStack aStack : aBus.mInventory) { - if (aStack != null && aStack.getItem() instanceof ItemLavaFilter) { - this.setGUIItemStack(aStack); - } - } - } - } - } - - if (this.mEUt > 0){ - if (aTick % 600L == 0L){ - damageFilter(); - } - } - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "Generic3By3"; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java deleted file mode 100644 index 326cc01de7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java +++ /dev/null @@ -1,744 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.apache.commons.lang3.ArrayUtils; - -import com.gtnewhorizon.structurelib.StructureLibAPI; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.IStructureElement; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Triplet; -import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase { - - private int mSolidCasingTier = 0; - private int mMachineCasingTier = 0; - private int mPipeCasingTier = 0; - private int mCoilTier = 0; - private int checkCoil; - private int[] checkCasing = new int[8]; - private int checkMachine; - private int checkPipe; - private int maxTierOfHatch; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - private ArrayList mReplicatorDataOrbHatches = new ArrayList(); - - private static final HashMap> mTieredBlockRegistry = new HashMap>(); - - public GregtechMTE_ElementalDuplicator(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMTE_ElementalDuplicator(final String aName) { - super(aName); - } - - public static boolean registerMachineCasingForTier(int aTier, Block aBlock, int aMeta, int aCasingTextureID) { - int aSize = mTieredBlockRegistry.size(); - int aSize2 = aSize; - Triplet aCasingData = new Triplet(aBlock, aMeta, aCasingTextureID); - if (mTieredBlockRegistry.containsKey(aTier)) { - CORE.crash("Tried to register a Machine casing for tier "+aTier+" to the Chemical Plant, however this tier already contains one."); - } - mTieredBlockRegistry.put(aTier, aCasingData); - aSize = mTieredBlockRegistry.size(); - return aSize > aSize2; - } - - private static int getCasingTextureIdForTier(int aTier) { - if (!mTieredBlockRegistry.containsKey(aTier)) { - return 10; - } - int aCasingID = mTieredBlockRegistry.get(aTier).getValue_3(); - //Logger.INFO("Found casing texture ID "+aCasingID+" for tier "+aTier); - return aCasingID; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMTE_ElementalDuplicator(this.mName); - } - - @Override - public String getMachineType() { - return "Replicator"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Industrial Replication Machine") - .addInfo("Now replication is less painful") - .addInfo("Please read to user manual for more information on construction & usage") - .addSeparator() - .addController("Bottom Center") - .addStructureHint("Catalyst Housing", 1) - .addInputBus("Bottom Casing", 1) - .addOutputBus("Bottom Casing", 1) - .addInputHatch("Bottom Casing", 1) - .addOutputHatch("Bottom Casing", 1) - .addEnergyHatch("Bottom Casing", 1) - .addMaintenanceHatch("Bottom Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - public void setMachineMeta(int meta) { - checkMachine = meta; - } - - public int getMachineMeta() { - return checkMachine; - } - - public void setPipeMeta(int meta) { - checkPipe = meta; - } - - public int getPipeMeta() { - return checkPipe; - } - - public void setCoilMeta(int meta) { - checkCoil = meta; - } - - public int getCoilMeta() { - return checkCoil; - } - - public int coilTier(int meta) { - switch (meta) { - case 0: return 1; - case 1: return 2; - case 2: return 3; - case 3: return 4; - case 4: return 5; - case 5: return 7; - case 6: return 8; - case 7: return 10; - case 8: return 11; - case 9: return 6; - case 10: return 9; - } - return 0; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"}, - {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, - {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, - {"X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X"}, - {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, - {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, - {"CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMTE_ElementalDuplicator::addChemicalPlantList, getCasingTextureID(), 1 - ), - onElementPass( - x -> {++x.checkCasing[0]; ++x.mCasing;}, - ofSolidCasing(0) - ), - onElementPass( - x -> {++x.checkCasing[1]; ++x.mCasing;}, - ofSolidCasing(1) - ), - onElementPass( - x -> {++x.checkCasing[2]; ++x.mCasing;}, - ofSolidCasing(2) - ), - onElementPass( - x -> {++x.checkCasing[3]; ++x.mCasing;}, - ofSolidCasing(3) - ), - onElementPass( - x -> {++x.checkCasing[4]; ++x.mCasing;}, - ofSolidCasing(4) - ), - onElementPass( - x -> {++x.checkCasing[5]; ++x.mCasing;}, - ofSolidCasing(5) - ), - onElementPass( - x -> {++x.checkCasing[6]; ++x.mCasing;}, - ofSolidCasing(6) - ), - onElementPass( - x -> {++x.checkCasing[7]; ++x.mCasing;}, - ofSolidCasing(7) - ) - ) - ) - .addElement( - 'X', - ofChain( - onElementPass( - x -> {++x.checkCasing[0]; ++x.mCasing;}, - ofSolidCasing(0) - ), - onElementPass( - x -> {++x.checkCasing[1]; ++x.mCasing;}, - ofSolidCasing(1) - ), - onElementPass( - x -> {++x.checkCasing[2]; ++x.mCasing;}, - ofSolidCasing(2) - ), - onElementPass( - x -> {++x.checkCasing[3]; ++x.mCasing;}, - ofSolidCasing(3) - ), - onElementPass( - x -> {++x.checkCasing[4]; ++x.mCasing;}, - ofSolidCasing(4) - ), - onElementPass( - x -> {++x.checkCasing[5]; ++x.mCasing;}, - ofSolidCasing(5) - ), - onElementPass( - x -> {++x.checkCasing[6]; ++x.mCasing;}, - ofSolidCasing(6) - ), - onElementPass( - x -> {++x.checkCasing[7]; ++x.mCasing;}, - ofSolidCasing(7) - ) - ) - ) - .addElement( - 'M', - addTieredBlock( - GregTech_API.sBlockCasings1, GregtechMTE_ElementalDuplicator::setMachineMeta, GregtechMTE_ElementalDuplicator::getMachineMeta, 10 - ) - ) - .addElement( - 'H', - addTieredBlock( - GregTech_API.sBlockCasings5, GregtechMTE_ElementalDuplicator::setCoilMeta, GregtechMTE_ElementalDuplicator::getCoilMeta, 11 - ) - ) - .addElement( - 'P', - addTieredBlock( - GregTech_API.sBlockCasings2, GregtechMTE_ElementalDuplicator::setPipeMeta, GregtechMTE_ElementalDuplicator::getPipeMeta, 12, 16 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public static IStructureElement ofSolidCasing(int aIndex) { - return new IStructureElement() { - @Override - public boolean check(T t, World world, int x, int y, int z) { - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - Block target = mTieredBlockRegistry.get(aIndex).getValue_1(); - int targetMeta = mTieredBlockRegistry.get(aIndex).getValue_2(); - return target.equals(block) && meta == targetMeta; - } - - int getIndex(int size) { - if (size > 8) size = 8; - return size - 1; - } - - @Override - public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { - StructureLibAPI.hintParticle(world, x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2()); - return true; - } - - @Override - public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { - return world.setBlock(x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2(), 3); - } - }; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 3, 6, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - for (int i = 0; i < 8; i++) { - checkCasing[i] = 0; - } - checkCoil = 0; - checkPipe = 0; - checkMachine = 0; - mSolidCasingTier = 0; - mMachineCasingTier = 0; - mPipeCasingTier = 0; - mCoilTier = 0; - mReplicatorDataOrbHatches.clear(); - if (checkPiece(mName, 3, 6, 0) && mCasing >= 80) { - for (int i = 0; i < 8; i++) { - if (checkCasing[i] == mCasing) { - mSolidCasingTier = i; - } - else if (checkCasing[i] > 0) - return false; - } - mMachineCasingTier = checkMachine - 1; - mPipeCasingTier = checkPipe - 12; - mCoilTier = coilTier(checkCoil - 1); - updateHatchTexture(); - return mMachineCasingTier >= maxTierOfHatch; - } - return false; - } - - public void updateHatchTexture() { - for (GT_MetaTileEntity_Hatch h : mReplicatorDataOrbHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mInputBusses) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mMaintenanceHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mEnergyHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mOutputBusses) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mInputHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mOutputHatches) h.updateTexture(getCasingTextureID()); - } - - public final boolean addChemicalPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ElementalDataOrbHolder){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(207)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - - ITexture aOriginalTexture; - - // Check things exist client side (The worst code ever) - if (aBaseMetaTileEntity.getWorld() != null) { - - } - int aCasingID = getCasingTextureID(); - aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(aCasingID); - - if (aSide == aFacing) { - return new ITexture[]{aOriginalTexture, new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{aOriginalTexture}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - if (GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList.size() == 0) { - generateRecipes(); - } - return GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT; - } - - public static void generateRecipes() { - for (GT_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { - GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.add(i); - } - } - - @Override - public int getMaxParallelRecipes() { - return 2 * getPipeCasingTier(); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - private int getSolidCasingTier() { - return this.mSolidCasingTier; - } - - private int getMachineCasingTier() { - return mMachineCasingTier; - } - - private int getPipeCasingTier() { - return mPipeCasingTier; - } - - private int getCasingTextureID() { - // Check the Tier Client Side - int aTier = mSolidCasingTier; - int aCasingID = getCasingTextureIdForTier(aTier); - return aCasingID; - } - - public boolean addToMachineList(IGregTechTileEntity aTileEntity) { - int aMaxTier = getMachineCasingTier(); - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { - GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity; - int aTileTier = aMachineBlock.mTier; - if (aTileTier > aMaxTier) { - log("Hatch tier too high."); - return false; - } - else { - return addToMachineList(aTileEntity, getCasingTextureID()); - } - } - else { - log("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know.. - return false; - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setInteger("mSolidCasingTier", this.mSolidCasingTier); - aNBT.setInteger("mMachineCasingTier", this.mMachineCasingTier); - aNBT.setInteger("mPipeCasingTier", this.mPipeCasingTier); - aNBT.setInteger("mCoilTier", this.mCoilTier); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mSolidCasingTier = aNBT.getInteger("mSolidCasingTier"); - mMachineCasingTier = aNBT.getInteger("mMachineCasingTier"); - mPipeCasingTier = aNBT.getInteger("mPipeCasingTier"); - mCoilTier = aNBT.getInteger("mCoilTier"); - } - - @Override - public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ElementalDataOrbHolder) { - log("Found GT_MetaTileEntity_Hatch_ElementalDataOrbHolder"); - ((GT_MetaTileEntity_Hatch_ElementalDataOrbHolder) aTileEntity).mRecipeMap = getRecipeMap(); - return addToMachineListInternal(mReplicatorDataOrbHatches, aMetaTileEntity, aBaseCasingIndex); - } - return super.addToMachineList(aTileEntity, aBaseCasingIndex); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 100; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - // Same speed bonus as pyro oven - public int getSpeedBonus() { - return 50 * (this.mCoilTier - 2); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate == 1 || this.mStartUpCheck == 1) { - this.mReplicatorDataOrbHatches.clear(); - } - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), getSpeedBonus()); - } - - - @Override - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) { - return false; - } - - private static final HashMap> mTieredRecipeMap = new HashMap>(); - private static final AutoMap aTier0Recipes = new AutoMap(); - private static final AutoMap aTier1Recipes = new AutoMap(); - private static final AutoMap aTier2Recipes = new AutoMap(); - private static final AutoMap aTier3Recipes = new AutoMap(); - private static final AutoMap aTier4Recipes = new AutoMap(); - private static final AutoMap aTier5Recipes = new AutoMap(); - private static final AutoMap aTier6Recipes = new AutoMap(); - private static final AutoMap aTier7Recipes = new AutoMap(); - private static boolean mInitRecipeCache = false; - - private static void initRecipeCaches() { - if (!mInitRecipeCache) { - mTieredRecipeMap.put((long) 0, aTier0Recipes); - mTieredRecipeMap.put((long) 1, aTier1Recipes); - mTieredRecipeMap.put((long) 2, aTier2Recipes); - mTieredRecipeMap.put((long) 3, aTier3Recipes); - mTieredRecipeMap.put((long) 4, aTier4Recipes); - mTieredRecipeMap.put((long) 5, aTier5Recipes); - mTieredRecipeMap.put((long) 6, aTier6Recipes); - mTieredRecipeMap.put((long) 7, aTier7Recipes); - for (GT_Recipe aRecipe : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList) { - if (aRecipe != null) { - switch (aRecipe.mSpecialValue) { - case 0: - aTier0Recipes.add(aRecipe); - continue; - case 1: - aTier1Recipes.add(aRecipe); - continue; - case 2: - aTier2Recipes.add(aRecipe); - continue; - case 3: - aTier3Recipes.add(aRecipe); - continue; - case 4: - aTier4Recipes.add(aRecipe); - continue; - case 5: - aTier5Recipes.add(aRecipe); - continue; - case 6: - aTier6Recipes.add(aRecipe); - continue; - case 7: - aTier7Recipes.add(aRecipe); - continue; - } - } - } - mInitRecipeCache = true; - } - } - - private static boolean areInputsEqual(GT_Recipe aComparator, ItemStack[] aInputs, FluidStack[] aFluids) { - int aInputCount = aComparator.mInputs.length; - if (aInputCount > 0) { - //Logger.INFO("Looking for recipe with "+aInputCount+" Items"); - int aMatchingInputs = 0; - recipe : for (ItemStack a : aComparator.mInputs) { - for (ItemStack b : aInputs) { - if (a.getItem() == b.getItem()) { - if (a.getItemDamage() == b.getItemDamage()) { - //Logger.INFO("Found matching Item Input - "+b.getUnlocalizedName()); - aMatchingInputs++; - continue recipe; - } - } - } - } - if (aMatchingInputs != aInputCount) { - return false; - } - } - int aFluidInputCount = aComparator.mFluidInputs.length; - if (aFluidInputCount > 0) { - //Logger.INFO("Looking for recipe with "+aFluidInputCount+" Fluids"); - int aMatchingFluidInputs = 0; - recipe : for (FluidStack b : aComparator.mFluidInputs) { - //Logger.INFO("Checking for fluid "+b.getLocalizedName()); - for (FluidStack a : aFluids) { - if (GT_Utility.areFluidsEqual(a, b)) { - //Logger.INFO("Found matching Fluid Input - "+b.getLocalizedName()); - aMatchingFluidInputs++; - continue recipe; - } - else { - //Logger.INFO("Found fluid which did not match - "+a.getLocalizedName()); - } - } - } - if (aMatchingFluidInputs != aFluidInputCount) { - return false; - } - } - Logger.INFO("Recipes Match!"); - return true; - } - - public GT_Recipe findRecipe(final GT_Recipe aRecipe, final long aVoltage, final long aSpecialValue, ItemStack[] aInputs, final FluidStack[] aFluids) { - if (!mInitRecipeCache) { - initRecipeCaches(); - } - if (this.getRecipeMap().mRecipeList.isEmpty()) { - log("No Recipes in Map to search through."); - return null; - } - else { - log("Checking tier "+aSpecialValue+" recipes and below. Using Input Voltage of "+aVoltage+"V."); - log("We have "+aInputs.length+" Items and "+aFluids.length+" Fluids."); - // Try check the cached recipe first - if (aRecipe != null) { - if (areInputsEqual(aRecipe, aInputs, aFluids)) { - if (aRecipe.mEUt <= aVoltage) { - Logger.INFO("Using cached recipe."); - return aRecipe; - } - } - } - - // Get all recipes for the tier - AutoMap> aMasterMap = new AutoMap>(); - for (long i=0;i<=aSpecialValue;i++) { - aMasterMap.add(mTieredRecipeMap.get(i)); - } - GT_Recipe aFoundRecipe = null; - - // Iterate the tiers recipes until we find the one with all inputs matching - master : for (AutoMap aTieredMap : aMasterMap) { - for (GT_Recipe aRecipeToCheck : aTieredMap) { - if (areInputsEqual(aRecipeToCheck, aInputs, aFluids)) { - log("Found recipe with matching inputs!"); - if (aRecipeToCheck.mSpecialValue <= aSpecialValue) { - if (aRecipeToCheck.mEUt <= aVoltage) { - aFoundRecipe = aRecipeToCheck; - break master; - } - } - } - } - } - - // If we found a recipe, return it - if (aFoundRecipe != null) { - log("Found valid recipe."); - return aFoundRecipe; - } - } - log("Did not find valid recipe."); - return null; - } - - /* - * Catalyst Handling - */ - - @Override - public ArrayList getStoredInputs() { - ArrayList tItems = super.getStoredInputs(); - for (GT_MetaTileEntity_Hatch_ElementalDataOrbHolder tHatch : mReplicatorDataOrbHatches) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - tItems.addAll(tHatch.getInventory()); - } - } - return tItems; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java deleted file mode 100644 index 3941d59edb..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java +++ /dev/null @@ -1,231 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMTE_FastNeutronReactor -extends GregtechMeta_MultiBlockBase -{ - - private int mSuperEfficencyIncrease = 0; - - - public GregtechMTE_FastNeutronReactor(int aID, String aName, String aNameRegional) - { - super(aID, aName, aNameRegional); - } - - public GregtechMTE_FastNeutronReactor(String mName) { - super(mName); - } - - @Override - public String getMachineType() { - return "Reactor"; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) - { - return new GregtechMTE_FastNeutronReactor(this.mName); - } - @Override - public boolean isFacingValid(byte aFacing) - { - return aFacing > 1; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) - { - return true; - } - - @Override - public int getDamageToComponent(ItemStack aStack){ - return 0; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - this.mSuperEfficencyIncrease=0; - if (processing_Stage_1()) { - if (processing_Stage_2()) { - if (processing_Stage_3()) { - if (processing_Stage_4()) { - - } - else { - //Stage 4 - } - } - else { - //Stage 3 - } - } - else { - //Stage 2 - } - } - else { - //Stage 1 - } - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - public boolean processing_Stage_1() { //Deplete Water, Add More Progress Time - for (GT_MetaTileEntity_Hatch_Input tRecipe : this.mInputHatches) { - if (tRecipe.getFluid() != null){ - FluidStack tFluid = FluidUtils.getFluidStack(tRecipe.getFluid(), 200); - if (tFluid != null) { - if (tFluid == GT_ModHandler.getDistilledWater(1)) { - if (depleteInput(tFluid)) { - this.mMaxProgresstime = Math.max(1, runtimeBoost(8 * 2)); - this.mEUt = getEUt(); - this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); - return true; - } - } - - } - } - } - this.mMaxProgresstime = 0; - this.mEUt = 0; - return false; - } - public boolean processing_Stage_2() { - return false; - } - public boolean processing_Stage_3() { - return false; - } - public boolean processing_Stage_4() { - return false; - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - if (this.mEUt > 0) { - if(this.mSuperEfficencyIncrease>0){ - this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); - } - int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); - if (tGeneratedEU > 0) { - long amount = (tGeneratedEU + 160) / 160; - if (!depleteInput(GT_ModHandler.getDistilledWater(amount))) { - explodeMultiblock(); - } else { - addOutput(GT_ModHandler.getSteam(tGeneratedEU)); - } - } - return true; - } - return true; - } - - public int getEUt() { - return 0; //Default 400 - } - - public int getEfficiencyIncrease() { - return 0; //Default 12 - } - - int runtimeBoost(int mTime) { - return mTime * 150 / 100; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) - { - return true; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) - { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) - { - return 0; - } - - public int getAmountOfOutputs() - { - return 1; - } - - @Override - public String[] getTooltip() - { - return new String[]{ - "Fukushima-Daiichi Reactor No. 6", - "------------------------------------------", - "Boiling Water Reactor", - "Harness the power of Nuclear Fission", - "------------------------------------------", - "Consult user manual for more information", - }; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; - } - - @Override - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) { - return true; - } - - public boolean damageFilter(){ - return false; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java deleted file mode 100644 index 8a936525f0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java +++ /dev/null @@ -1,449 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gtPlusPlus.core.lib.CORE; -import org.apache.commons.lang3.ArrayUtils; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMTE_FrothFlotationCell(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMTE_FrothFlotationCell(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMTE_FrothFlotationCell(this.mName); - } - - @Override - public String getMachineType() { - return "Flotation Cell"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Process that milled ore!") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("Inconel Reinforced Casing", 68) - .addCasingInfo("Flotation Casings", 52) - .addInputBus("Bottom Casing", 1) - .addInputHatch("Bottom Casing", 1) - .addOutputHatch("Bottom Casing", 1) - .addEnergyHatch("Bottom Casing", 1) - .addMaintenanceHatch("Bottom Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(207)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - int aID = TAE.getIndexFromPage(2, 1); - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID)}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, new String[][]{ - {" ", " ", " X ", " X~X ", " X ", " ", " "}, - {" ", " F ", " FFF ", " FF FF ", " FFF ", " F ", " "}, - {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, - {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, - {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, - {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, - {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, - {" CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC "}, - {" CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC "}, - }) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMTE_FrothFlotationCell::addFrothFlotationCellList, TAE.getIndexFromPage(2, 1), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 1 - ) - ) - ) - ) - .addElement( - 'F', - ofBlock( - ModBlocks.blockSpecialMultiCasings, 9 - ) - ) - .addElement( - 'X', - ofBlock( - ModBlocks.blockCasings3Misc, 1 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 3, 3, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 3, 3, 0) && mCasing >= 68 - 4 && checkHatch(); - } - - public final boolean addFrothFlotationCellList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiFrothFlotationCell; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - // Fix GT bug - if (this.getBaseMetaTileEntity().getFrontFacing() == 0 && this.getBaseMetaTileEntity().getBackFacing() == 1) { - log("Fixing Bad Facing. (GT Bug)"); - this.getBaseMetaTileEntity().setFrontFacing((byte) 1); - } - } - - @Override - public boolean checkRecipe(ItemStack arg0) { - return super.checkRecipeGeneric(); - } - - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - log("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = findRecipe( - getBaseMetaTileEntity(), mLastRecipe, false, - gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - log("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - /* - * - * Material Hash checks - * Makes sure we can only ever use one type of material in this flotation cell. - * - */ - int aExpectedMaterialHash; - // Set the hash of expected material type - if (mLockedOreType == -1) { - mLockedOreType = FlotationRecipeHandler.getHashForMaterial(FlotationRecipeHandler.getMaterialOfMilledProduct(FlotationRecipeHandler.findMilledStack(aRecipe))); - } - // Set the hash for this recipe check - aExpectedMaterialHash = mLockedOreType; - - // Compute hash of current inputs - int aFoundMaterialHash = FlotationRecipeHandler.getHashForMaterial(FlotationRecipeHandler.getMaterialOfMilledProduct(FlotationRecipeHandler.findMilledStack(aItemInputs))); - - // Check hashes match - if (aExpectedMaterialHash != aFoundMaterialHash) { - log("Did not find the correct milled type."); - log("Found: "+aFoundMaterialHash); - log("Expected: "+mLockedOreType); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - log("BAD RETURN - 2"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+aMaxParallelRecipes); - log("tTotalEUt: "+tTotalEUt); - log("tVoltage: "+tVoltage); - log("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("GOOD RETURN - 1"); - return true; - } - - /* - * Handle NBT - */ - - private int mLockedOreType = -1; - - @Override - public void setItemNBT(NBTTagCompound aNBT) { - if (mLockedOreType != -1) { - aNBT.setInteger("mLockedOreType", mLockedOreType); - } - super.setItemNBT(aNBT); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - if (mLockedOreType != -1) { - aNBT.setInteger("mLockedOreType", mLockedOreType); - } - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mLockedOreType = aNBT.getInteger("mLockedOreType"); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java deleted file mode 100644 index 1ead7edad5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java +++ /dev/null @@ -1,501 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.minecraft.LangUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Naquadah; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -public class GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase { - - public ArrayList mNaqHatches = new ArrayList(); - public static String[] mCasingName = new String[5]; - public static String mHatchName = "Naquadah Fuel Hatch"; - - private final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 13); - private final int META_BaseCasing = 0; //4 - private final int META_ContainmentCasing = 15; //3 - private final int META_Shielding = 13; //1 - private final int META_PipeCasing = 1; //4 - private final int META_IntegralCasing = 6; //0 - private final int META_ContainmentChamberCasing = 2; //4 - - public GregtechMTE_LargeNaqReactor(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); - mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); - mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); - mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); - mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); - mHatchName = LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969); - } - - public GregtechMTE_LargeNaqReactor(String aName) { - super(aName); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMTE_LargeNaqReactor(this.mName); - } - - public String[] getTooltip() { - if (mCasingName[0].toLowerCase().contains(".name")) { - mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); - } - if (mCasingName[1].toLowerCase().contains(".name")) { - mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); - } - if (mCasingName[2].toLowerCase().contains(".name")) { - mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); - } - if (mCasingName[3].toLowerCase().contains(".name")) { - mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); - } - if (mCasingName[4].toLowerCase().contains(".name")) { - mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); - } - if (mHatchName.toLowerCase().contains(".name")) { - mHatchName = LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969); - } - return new String[]{ - "Naquadah reacts violently with potassium, ", - "resulting in massive explosions with radioactive potential.", - "Size: 3x4x12, WxHxL", - "Bottom Layer: "+mCasingName[0]+"s, (30x min)", - "Middle Layer: "+mCasingName[2]+"s (10x), with", - " "+mCasingName[3]+"s on either side", - " "+mCasingName[3]+"s also on each end (x26)", - "Middle Layer2: "+mCasingName[1]+" (12x total), with", - " "+mCasingName[4]+"s on either side (x24)", - "Top: Single row of "+mCasingName[0]+" along the middle (x12) ", - "", - "1x " + mHatchName + " (Any bottom layer casing)", - "1x " + "Maintenance Hatch" + " (Any bottom layer side casing)", - "1x " + "Energy Hatch" + " (Any top layer casing)", - - }; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { - return aSide == aFacing - ? new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0)), - new GT_RenderedTexture(aActive - ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active - : TexturesGtBlock.Overlay_Machine_Controller_Default)} - : new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0))}; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), - "AssemblyLine.png"); - } - - public GT_Recipe_Map getRecipeMap() { - return null; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return aFacing == 1; - } - - public boolean checkRecipe(ItemStack aStack) { - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 20) { - GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, - aZ); - } - } - - @Override - public String getSound() { - return (String) GregTech_API.sSoundList.get(Integer.valueOf(212)); - } - - private Block getCasing(int casingID) { - if (casingID == 1) { - return ModBlocks.blockCasingsMisc; - } - else if (casingID == 2) { - return ModBlocks.blockCasings2Misc; - } - else if (casingID == 3) { - return ModBlocks.blockCasings3Misc; - } - else if (casingID == 4) { - return ModBlocks.blockCasings4Misc; - } - else { - return ModBlocks.blockCasingsTieredGTPP; - } - } - - - - //Casing3, Meta 10 - "Grate Machine Casing"); - //Casing2, Meta 0 - "Solid Steel Machine Casing" - //Casing2, Meta 5 - "Assembling Line Casing" - //Casing2, Meta 9 - "Assembler Machine Casing" - //Magic Glass - blockAlloyGlass - - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4; - - // Counts for all Casing Types - int aBaseCasingCount = 0; - int aContainmentCasingCount = 0; - int aShieldingCount = 0; - int aPipeCount = 0; - int aIntegralCasingCount = 0; - int aContainmentChamberCount = 0; - - // Bottom Layer - aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, -7, xDir, zDir); - log("Bottom Layer is Valid. Moving to Layer 1."); - - // Layer 1 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -6, xDir, zDir); - aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -6, xDir, zDir); - aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir); - log("Layer 1 is Valid. Moving to Layer 2."); - - // Layer 2 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -5, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -5, xDir, zDir); - log("Layer 2 is Valid. Moving to Layer 3."); - - // Layer 3 - aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir); - log("Layer 3 is Valid. Moving to Layer 4."); - - // Layer 4 - aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir); - log("Layer 4 is Valid. Moving to Layer 5."); - - // Layer 5 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -2, xDir, zDir); - aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -2, xDir, zDir); - log("Layer 5 is Valid. Moving to Layer 6."); - - // Layer 6 - aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir); - aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir); - aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -1, xDir, zDir); - log("Layer 6 is Valid. Moving to Top Layer."); - - // Top Layer - aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, 0, xDir, zDir); - - log("Found "+aBaseCasingCount+" "+mCasingName[0]+"s"); - log("Found "+aShieldingCount+" "+mCasingName[4]+"s"); - log("Found "+aPipeCount+" "+mCasingName[1]+"s"); - log("Found "+aContainmentCasingCount+" "+mCasingName[3]+"s"); - log("Found "+aIntegralCasingCount+" "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s"); - log("Found "+aContainmentChamberCount+" "+mCasingName[2]+"s"); - - // Try mesage player - String aOwnerName = this.getBaseMetaTileEntity().getOwnerName(); - EntityPlayer aOwner = null; - if (aOwnerName != null && aOwnerName.length() > 0) { - aOwner = PlayerUtils.getPlayer(aOwnerName); - } - - if (aShieldingCount != 128) { - log("Not enough "+mCasingName[4]+"s, require 128."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[4]+"s, require 128."); - } - return false; - } - if (aPipeCount != 20) { - log("Not enough "+mCasingName[1]+"s, require 20."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[1]+"s, require 20."); - } - return false; - } - if (aContainmentCasingCount != 64) { - log("Not enough "+mCasingName[3]+"s, require 64."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[3]+"s, require 64."); - } - return false; - } - if (aContainmentChamberCount != 42) { - log("Not enough "+mCasingName[2]+"s, require 42."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[2]+"s, require 42."); - } - return false; - } - if (aBaseCasingCount < 140) { - log("Not enough "+mCasingName[0]+"s, require 140 at a minimum."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[0]+"s, require 140 at a minimum."); - } - return false; - } - if (aIntegralCasingCount != 48) { - log("Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); - } - return false; - } - log("LNR Formed."); - if (aOwner != null) { - PlayerUtils.messagePlayer(aOwner, "Large Naquadah Reactor has formed successfully."); - } - return true; - } - - public boolean addNaquadahHatchToMachineInput(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Naquadah) { - this.updateTexture(aMetaTileEntity, aBaseCasingIndex); - return this.mNaqHatches.add((GT_MetaTileEntity_Hatch_Naquadah) aMetaTileEntity); - } else { - return false; - } - } - } - - public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -4; x < 5; x++) { - for (int z = -4; z < 5; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { - continue; - } - // Skip controller - if (aY == 0 && x == 0 && z == 0) { - continue; - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - - public int checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -4; x < 5; x++) { - for (int z = -4; z < 5; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { - continue; - } - - // If we are on the 5x5 ring, proceed - if ((x > -4 && x < 4 ) && (z > -4 && z < 4)) { - if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - } - else { - continue; - } - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -3; x < 4; x++) { - for (int z = -3; z < 4; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { - continue; - } - - // If we are on the 5x5 ring, proceed - if ((x > -3 && x < 3 ) && (z > -3 && z < 3)) { - if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - } - else { - continue; - } - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - - public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -1; x < 2; x++) { - for (int z = -1; z < 2; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 1 && z == 1) || (x == -1 && z == -1) || (x == 1 && z == -1) || (x == -1 && z == 1) || (x == 0 && z == 0)) { - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Pipe has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - }; - } - } - } - return aCasingCount; - } - - public int checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { - int aCasingCount = 0; - for (int x = -2; x < 3; x++) { - for (int z = -2; z < 3; z++) { - int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; - int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; - int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; - //Skip the corners - if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { - continue; - } - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); - if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { - aCasingCount++; - } - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { - log("Layer has error. Height: "+aY); - //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); - return 0; - } - } - } - return aCasingCount; - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerTick(ItemStack aStack) { - return 133; - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Reactor"; - } -}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java deleted file mode 100644 index 9c2e3289c3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java +++ /dev/null @@ -1,386 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ControlCore; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Plasma; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { - - public long currentVoltage = GT_Values.V[7]; - public byte currentTier = 8; - - public void upvolt() { - byte f = currentTier; - if ((f+1) > 10) { - f = 8; - } - else { - f++; - } - this.currentTier = f; - updateVoltage(); - } - - public void downvolt() { - byte f = currentTier; - if ((f-1) < 8) { - f = 10; - } - else { - f--; - } - this.currentTier = f; - updateVoltage(); - } - - private long updateVoltage() { - this.currentVoltage = GT_Values.V[this.currentTier-1]; - return currentVoltage; - } - - public GregtechMTE_MiniFusionPlant(String aName) { - super(aName); - } - - public GregtechMTE_MiniFusionPlant(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMTE_MiniFusionPlant(this.mName); - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == this.getBaseMetaTileEntity().getBackFacing()) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), - Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]}; - } - if (aSide == 1) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), - Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]}; - } - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10))}; - } - - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Fusion Reactor"; - } - - @Override - public String[] getTooltip() { - return new String[] { - "Small scale fusion", - "16x slower than using Multiblock of the same voltage", - //"Input voltage can be changed within the GUI", - "Place Input/Output Hatches on sides and bottom", - "Power can only be inserted into the back", - //e"Power can only be extracted from the top", - TAG_HIDE_HATCHES - }; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - int xDir2 = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetX; - int zDir2 = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetZ; - int tAmount = 0; - - ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); - - //Require air in front, I think - if (!aBaseMetaTileEntity.getAirOffset(xDir2, 0, zDir2)) { - Logger.INFO("Did not find air in front"); - return false; - } else { - for (int i = -1; i < 2; ++i) { - for (int j = -1; j < 2; ++j) { - for (int h = -1; h < 2; ++h) { - if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, - h, zDir + j); - if (this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(10))) { - tAmount++; - } - } - } - } - } - } - Logger.INFO("Tanks found: "+tAmount); - return tAmount == 3; - } - - @Override - public boolean checkRecipe(ItemStack arg0) { - - - ArrayList tFluidList = this.getStoredFluids(); - int tFluidList_sS = tFluidList.size(); - - for (int tFluids = 0; tFluids < tFluidList_sS - 1; ++tFluids) { - for (int tRecipe = tFluids + 1; tRecipe < tFluidList_sS; ++tRecipe) { - if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(tFluids), - (FluidStack) tFluidList.get(tRecipe))) { - if (((FluidStack) tFluidList.get(tFluids)).amount < ((FluidStack) tFluidList.get(tRecipe)).amount) { - tFluidList.remove(tFluids--); - tFluidList_sS = tFluidList.size(); - break; - } - - tFluidList.remove(tRecipe--); - tFluidList_sS = tFluidList.size(); - } - } - } - int aStep = 0; - //Logger.INFO("Step "+aStep++); - if (tFluidList.size() > 1) { - //Logger.INFO("Step "+aStep++); - FluidStack[] arg5 = (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]); - GT_Recipe arg6 = getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, - false, this.getMaxInputVoltage(), arg5, new ItemStack[0]); - if (arg6 == null && !this.mRunningOnLoad || (arg6 != null && this.maxEUStore() < (long) arg6.mSpecialValue)) { - //Logger.INFO("Bad Step "+aStep++); - //this.turnCasingActive(false); - this.mLastRecipe = null; - return false; - } - //Logger.INFO("Step "+aStep++); - - if (this.mRunningOnLoad || (arg6 != null && arg6.isRecipeInputEqual(true, arg5, new ItemStack[0]))) { - //Logger.INFO("Step "+aStep++); - this.mLastRecipe = arg6; - this.mEUt = this.mLastRecipe.mEUt * 1; - this.mMaxProgresstime = this.mLastRecipe.mDuration / 1; - this.mEfficiencyIncrease = 10000; - this.mOutputFluids = this.mLastRecipe.mFluidOutputs; - //this.turnCasingActive(true); - this.mRunningOnLoad = false; - return true; - } - //Logger.INFO("Step "+aStep++); - } - //Logger.INFO("Step "+aStep++); - - return false; - - - - - //return this.checkRecipeGeneric(this.getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); - } - - @Override - public int getMaxEfficiency(ItemStack arg0) { - return 10000; - } - - @Override - public boolean drainEnergyInput(long aEU) { - // Not applicable to this machine - return true; - } - - @Override - public boolean addEnergyOutput(long aEU) { - // Not applicable to this machine - return true; - } - - @Override - public long maxEUStore() { - return this.getMaxInputVoltage() * 256 * 512; - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public String[] getExtraInfoData() { - String mode = EnumChatFormatting.BLUE + "" + currentVoltage + EnumChatFormatting.RESET; - String aOutput = EnumChatFormatting.BLUE + "" + mEUt + EnumChatFormatting.RESET; - String storedEnergyText; - if (this.getEUVar() > maxEUStore()) { - storedEnergyText = EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; - } else { - storedEnergyText = EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; - } - - return new String[]{ - "Stored EU: " + storedEnergyText, - "Capacity: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.maxEUStore()) + EnumChatFormatting.RESET, - "Voltage: " + mode, - "Output Voltage: " + aOutput - }; - } - - @Override - public void explodeMultiblock() { - super.explodeMultiblock(); - } - - @Override - public void doExplosion(long aExplosionPower) { - super.doExplosion(aExplosionPower); - } - - @Override - public long getMaxInputVoltage() { - return updateVoltage(); - } - - @Override - public long getInputTier() { - return (long) GT_Utility.getTier(maxEUInput()); - } - - @Override - public boolean isElectric() { - return true; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isEnetOutput() { - return false; - } - - @Override - public boolean isInputFacing(byte aSide) { - return (aSide == this.getBaseMetaTileEntity().getBackFacing()); - } - - @Override - public boolean isOutputFacing(byte aSide) { - return aSide == 1; - } - - @Override - public long maxAmperesIn() { - return 32; - } - - @Override - public long maxAmperesOut() { - return 1; - } - - @Override - public long maxEUInput() { - return updateVoltage(); - } - - @Override - public long maxEUOutput() { - return mEUt > 0 ? mEUt : 0; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - this.mWrench = true; - this.mScrewdriver = true; - this.mSoftHammer = true; - this.mHardHammer = true; - this.mSolderingTool = true; - this.mCrowbar = true; - } - - @Override - public boolean causeMaintenanceIssue() { - return true; - } - - @Override - public int getControlCoreTier() { - return this.currentTier; - } - - @Override - public int getPollutionPerTick(ItemStack arg0) { - return 0; - } - - @Override - public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() { - GT_MetaTileEntity_Hatch_ControlCore x = new GT_MetaTileEntity_Hatch_ControlCore("", 0, "", null); - return (GT_MetaTileEntity_Hatch_ControlCore) x; - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java deleted file mode 100644 index 1f6ae41be2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java +++ /dev/null @@ -1,523 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -import java.util.Collection; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.nuclear.NUCLIDE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase { - - protected int mFuelRemaining = 0; - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - - public GregtechMTE_NuclearReactor(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMTE_NuclearReactor(final String aName) { - super(aName); - } - - @Override - public long maxEUStore() { - return (640000000L * (Math.min(16, this.mEnergyHatches.size()))) / 16L; - } - - @Override - public String getMachineType() { - return "Reactor"; - } - - @Override - public GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Liquid Fluoride Thorium Reactor.") - .addInfo("Produces Heat & Energy from Radioactive Beta Decay.") - .addInfo("Outputs U233 every 10 seconds, on average") - .addInfo("Input Fluorine and Helium for bonus byproducts") - .addInfo("Input Li2BeF4 and a molten salt as fuel.") - .addInfo("LiFBeF2ThF4UF4, LiFBeF2ZrF4UF4 or LiFBeF2ZrF4U235") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(7, 4, 7, true) - .addController("Bottom Center") - .addCasingInfo("Hastelloy-N Reactor Casing", 27) - .addCasingInfo("Zeron-100 Reactor Shielding", 26) - .addInputHatch("Top or bottom layer edges", 1) - .addOutputHatch("Top or bottom layer edges", 1) - .addDynamoHatch("Top or bottom layer edges", 1) - .addMaintenanceHatch("Top or bottom layer edges", 1) - .addMufflerHatch("Top 3x3", 2) - .addStructureInfo("All dynamos must be IV or LuV tier.") - .addStructureInfo("All other hatches must be IV+ tier.") - .addStructureInfo("3x Output Hatches, 2x Input Hatches, 4x Dynamo Hatches") - .addStructureInfo("2x Maintenance Hatches, 4x Mufflers") - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public String[] getExtraInfoData() { - final String tRunning = (this.mMaxProgresstime>0 ? "Reactor running":"Reactor stopped"); - final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"); - - return new String[]{ - "Liquid Fluoride Thorium Reactor", - tRunning, - tMaintainance, - "Current Output: "+this.mEUt+" EU/t", - "Fuel Remaining: "+this.mFuelRemaining+" Litres", - "Current Efficiency: "+(this.mEfficiency/5)+"%", - "Current Efficiency (Raw): "+(this.mEfficiency), - "It requires you to have 100% Efficiency."}; - } - - @Override - public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aStack) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - boolean aWarmedUp = this.mEfficiency == this.getMaxEfficiency(null); - if (!aBaseMetaTileEntity.isActive() || !aWarmedUp){ - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))}; - } - else if(aBaseMetaTileEntity.isActive() && aWarmedUp){ - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13))}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))}; - - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "MatterFabricator"; - } - - public final boolean addNuclearReactorEdgeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo && (((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier >= 5 && ((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier <= 6)){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output && ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier >= 5) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addNuclearReactorTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 5) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCCCCCC", "COOOOOC", "COXXXOC", "COXXXOC", "COXXXOC", "COOOOOC", "CCCCCCC"}, - {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"}, - {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"}, - {"CCC~CCC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "CCCCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMTE_NuclearReactor::addNuclearReactorEdgeList, TAE.GTPP_INDEX(12), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 12 - ) - ) - ) - ) - .addElement( - 'X', - ofChain( - ofHatchAdder( - GregtechMTE_NuclearReactor::addNuclearReactorTopList, TAE.GTPP_INDEX(12), 2 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 12 - ) - ) - ) - ) - .addElement( - 'O', - ofBlock( - ModBlocks.blockCasingsMisc, 12 - ) - ) - .addElement( - 'G', - ofBlock( - ModBlocks.blockCasingsMisc, 13 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 3, 3, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - if (checkPiece(mName, 3, 3, 0) && mCasing >= 27) { - if (mOutputHatches.size() >= 3 && mInputHatches.size() >= 2 && mDynamoHatches.size() == 4 && - mMufflerHatches.size() == 4 && mMaintenanceHatches.size() == 2) { - this.mWrench = true; - this.mScrewdriver = true; - this.mSoftHammer = true; - this.mHardHammer = true; - this.mSolderingTool = true; - this.mCrowbar = true; - this.turnCasingActive(false); - return true; - } - } - return false; - } - - // Alk's Life Lessons from Greg. - /* - [23:41:15] xdir and zdir are x2 and not x3 - [23:41:26] thats you issue - [23:44:33] mmm? - [23:44:49] Should they be x3? - [23:44:50] you just do a x2, what is for a 5x5 multiblock - [23:45:01] x3 is for a 7x7 one - [23:45:06] I have no idea what that value does, tbh.. - [23:45:15] its the offset - [23:45:23] Debugging checkMachine has been a pain and I usually trash designs that don't work straight up.. - [23:45:28] it determines the horizontal middle of the multiblock - [23:45:47] which is in your case THREE blocks away from the controller - [23:45:51] Ahh - [23:45:57] and not 2 - [23:46:06] Noted, thanks :D - */ - - @Override - public boolean isCorrectMachinePart(final ItemStack aStack) { - return true; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(final ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return true; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMTE_NuclearReactor(this.mName); - } - - public boolean turnCasingActive(final boolean status) { - //TODO - if (this.mDynamoHatches != null) { - for (final GT_MetaTileEntity_Hatch_Dynamo hatch : this.mDynamoHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); - } - } - if (this.mMufflerHatches != null) { - for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); - } - } - if (this.mOutputHatches != null) { - for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); - } - } - if (this.mInputHatches != null) { - for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); - } - } - if (this.mMaintenanceHatches != null) { - for (final GT_MetaTileEntity_Hatch_Maintenance hatch : this.mMaintenanceHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); - } - } - return true; - } - - public FluidStack[] getStoredFluidsAsArray() { - return getStoredFluids().toArray(new FluidStack[0]); - } - - public int getStoredFuel(GT_Recipe aRecipe) { - int aFuelStored = 0; - FluidStack aFuelFluid = null; - for (FluidStack aFluidInput : aRecipe.mFluidInputs) { - if (!aFluidInput.getFluid().equals(NUCLIDE.Li2BeF4.getFluid())) { - aFuelFluid = aFluidInput; - break; - } - } - if (aFuelFluid != null) { - for (GT_MetaTileEntity_Hatch_Input aInputHatch : this.mInputHatches) { - if (aInputHatch.getFluid() != null && aInputHatch.getFluidAmount() > 0) { - if (aInputHatch.getFluid().isFluidEqual(aFuelFluid)) { - aFuelStored += aInputHatch.getFluidAmount(); - } - } - } - } - return aFuelStored; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - // Warm up for 4~ minutes - Logger.WARNING("Checking LFTR recipes."); - if (mEfficiency < this.getMaxEfficiency(null)) { - this.mProgresstime = 0; - this.mMaxProgresstime = 1; - this.mEfficiencyIncrease = 2; - Logger.WARNING("Warming Up! "+this.mEfficiency+"/"+this.getMaxEfficiency(null)); - return true; - } - Logger.WARNING("Warmed up, checking LFTR recipes."); - - final FluidStack[] tFluids = getStoredFluidsAsArray(); - final Collection tRecipeList = getRecipeMap().mRecipeList; - if(tFluids.length > 0 && tRecipeList != null && tRecipeList.size() > 0) { //Does input hatch have a LFTR fuel? - Logger.WARNING("Found more than one input fluid and a list of valid recipes."); - // Find a valid recipe - GT_Recipe aFuelProcessing = this.findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, 0, tFluids, new ItemStack[] {}); - if (aFuelProcessing == null) { - Logger.WARNING("Did not find valid recipe for given inputs."); - return false; - } - else { - Logger.WARNING("Found recipe? "+(aFuelProcessing != null ? "true" : "false")); - for (FluidStack aFluidInput : aFuelProcessing.mFluidInputs) { - Logger.WARNING("Using "+aFluidInput.getLocalizedName()); - } - } - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - this.mLastRecipe = aFuelProcessing; - // Deplete Inputs - if (aFuelProcessing.mFluidInputs.length > 0) { - for (FluidStack aInputToConsume : aFuelProcessing.mFluidInputs) { - Logger.WARNING("Depleting "+aInputToConsume.getLocalizedName()+" - "+aInputToConsume.amount+"L"); - this.depleteInput(aInputToConsume); - } - } - // -- Try not to fail after this point - inputs have already been consumed! -- - this.mMaxProgresstime = (int)(aFuelProcessing.mDuration); - this.mEUt = aFuelProcessing.mSpecialValue * 4; - Logger.WARNING("Outputting "+this.mEUt+"eu/t"); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - Logger.WARNING("Recipe time: "+this.mMaxProgresstime); - mFuelRemaining = getStoredFuel(aFuelProcessing); //Record available fuel - - this.mOutputFluids = aFuelProcessing.mFluidOutputs.clone(); - updateSlots(); - Logger.WARNING("Recipe Good!"); - return true; - } - this.mEUt = 0; - this.mEfficiency = 0; - Logger.WARNING("Recipe Bad!"); - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public void explodeMultiblock() { - this.mInventory[1] = null; - long explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - for (final MetaTileEntity tTileEntity : this.mInputBusses) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mOutputBusses) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mInputHatches) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mOutputHatches) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mDynamoHatches) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mMufflerHatches) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mEnergyHatches) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - for (final MetaTileEntity tTileEntity : this.mMaintenanceHatches) { - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); - } - explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); - this.getBaseMetaTileEntity().doExplosion(explodevalue); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.getWorld().isRemote) { - if (aBaseMetaTileEntity.isActive()){ - // Set casings active if we're warmed up. - if (this.mEfficiency == this.getMaxEfficiency(null)){ - this.turnCasingActive(true); - } - else { - this.turnCasingActive(false); - } - } - else { - this.turnCasingActive(false); - } - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - // See if we're warmed up. - if (this.mEfficiency == this.getMaxEfficiency(null)){ - // Try output some Uranium-233 - if (MathUtils.randInt(1, 300) == 1){ - this.addOutput(ELEMENT.getInstance().URANIUM233.getFluidStack(MathUtils.randInt(1, 10))); - } - - } - return super.onRunningTick(aStack); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mFuelRemaining", this.mFuelRemaining); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - this.mFuelRemaining = aNBT.getInteger("mFuelRemaining"); - super.loadNBTData(aNBT); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java deleted file mode 100644 index cccee84c99..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java +++ /dev/null @@ -1,521 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntityGeneratorArray(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntityGeneratorArray(String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntityGeneratorArray(this.mName); - } - - @Override - public String getMachineType() { - return "Processing Array"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Generator Array") - .addInfo("Runs supplied generators as if placed in the world") - .addInfo("Place up to 16 Single Block GT Generators into the Controller") - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo("Robust Tungstensteel Machine Casings", 10) - .addInputBus("Any casing", 1) - .addOutputBus("Any casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addDynamoHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48)}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "ProcessingArray"; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - this.mMode = getModeFromInventorySlot(this.getGUIItemStack()); - if (this.mMode == MODE_NONE) { - return null; - } - else if (this.mMode == MODE_STEAM) { - return GTPP_Recipe.GTPP_Recipe_Map.sSteamTurbineFuels; - } - else if (this.mMode == MODE_DIESEL) { - return GT_Recipe.GT_Recipe_Map.sDieselFuels; - } - else if (this.mMode == MODE_GAS) { - return GT_Recipe.GT_Recipe_Map.sTurbineFuels; - } - else if (this.mMode == MODE_SEMIFLUID) { - return GTPP_Recipe.GTPP_Recipe_Map.sSemiFluidLiquidFuels; - } - else if (this.mMode == MODE_GEOTHERMAL) { - return GTPP_Recipe.GTPP_Recipe_Map.sThermalFuels; - } - else if (this.mMode == MODE_ROCKETFUEL) { - return GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels; - } - else if (this.mMode == MODE_MAGIC_A) { - return GT_Recipe.GT_Recipe_Map.sMagicFuels; - } - else if (this.mMode == MODE_PLASMA) { - return GT_Recipe.GT_Recipe_Map.sPlasmaFuels; - } - else if (this.mMode == MODE_NAQUADAH) { - return GT_Recipe.GT_Recipe_Map.sFluidNaquadahReactorFuels; - } - return null; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - if (aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.")) { - return true; - } - return false; - } - - public String mMachine = ""; - protected int fuelConsumption = 0; - protected int fuelValue = 0; - protected int fuelRemaining = 0; - protected boolean boostEu = false; - - int mMode = 0; - - private final static int MODE_STEAM = 0; - private final static int MODE_DIESEL = 1; - private final static int MODE_GAS = 2; - private final static int MODE_SEMIFLUID = 3; - private final static int MODE_GEOTHERMAL = 4; - private final static int MODE_ROCKETFUEL = 5; - private final static int MODE_MAGIC_A = 6; - private final static int MODE_MAGIC_B_DISABLED = 7; - private final static int MODE_PLASMA = 8; - private final static int MODE_NAQUADAH = 9; - private final static int MODE_NONE = 100; - - private final static int[] ID_STEAM = new int[] {962, 1120, 1121, 1122}; - private final static int[] ID_GAS = new int[] {961, 1115, 1116, 1117}; - private final static int[] ID_DIESEL = new int[] {960, 1110, 1111, 1112}; - private final static int[] ID_SEMIFLUID = new int[] {837, 838, 839}; - private final static int[] ID_GEOTHERMAL = new int[] {830, 831, 832}; - private final static int[] ID_ROCKETFUEL = new int[] {793, 794, 795}; - private final static int[] ID_MAGIC_A = new int[] {1123, 1124, 1125}; - private final static int[] ID_MAGIC_B_DISABLED = new int[] {1127, 1128, 1129, 1130}; - private final static int[] ID_PLASMA = new int[] {1196, 1197, 1198}; - private final static int[] ID_NAQUADAH = new int[] {1190, 1191, 1192}; - - private static final int getModeFromInventorySlot(ItemStack aStack) { - - if (aStack == null) { - return MODE_NONE; - } - - String aItemStackName = aStack == null ? "" : aStack.getUnlocalizedName(); - //Logger.INFO("Item Name: "+aItemStackName+" ("+aStack.getItemDamage()+")"); - if (aItemStackName.toLowerCase().contains("gt.blockmachines")) { - for (int g : ID_STEAM) { - if (aStack.getItemDamage() == g) { - return MODE_STEAM; - } - } - for (int g : ID_GAS) { - if (aStack.getItemDamage() == g) { - return MODE_GAS; - } - } - for (int g : ID_DIESEL) { - if (aStack.getItemDamage() == g) { - return MODE_DIESEL; - } - } - for (int g : ID_SEMIFLUID) { - if (aStack.getItemDamage() == g) { - return MODE_SEMIFLUID; - } - } - for (int g : ID_GEOTHERMAL) { - if (aStack.getItemDamage() == g) { - return MODE_GEOTHERMAL; - } - } - for (int g : ID_ROCKETFUEL) { - if (aStack.getItemDamage() == g) { - return MODE_ROCKETFUEL; - } - } - for (int g : ID_MAGIC_A) { - if (aStack.getItemDamage() == g) { - return MODE_MAGIC_A; - } - } - for (int g : ID_PLASMA) { - if (aStack.getItemDamage() == g) { - return MODE_PLASMA; - } - } - for (int g : ID_NAQUADAH) { - if (aStack.getItemDamage() == g) { - return MODE_NAQUADAH; - } - } - } - return MODE_NONE; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - - this.resetRecipeMapForAllInputHatches(); - this.mMode = getModeFromInventorySlot(aStack); - if (mMode == MODE_NONE) { - Logger.INFO("Did not find valid generator."); - return false; - } - else { - Logger.INFO("Changed Mode to "+mMode); - } - int aMulti = this.getGUIItemStack() != null ? this.getGUIItemStack().stackSize : 0; - if (aMulti > 16 || aMulti == 0) { - return false; - } - - - - ArrayList tFluids = this.getStoredFluids(); - - Collection tRecipeList = this.getRecipeMap().mRecipeList; - Logger.INFO("Got Recipe Map"); - if (tFluids.size() > 0 && tRecipeList != null) { - Logger.INFO("Found Fuels for Map."); - Iterator arg3 = tFluids.iterator(); - int aCount = 0; - while (arg3.hasNext()) { - FluidStack hatchFluid1 = (FluidStack) arg3.next(); - Logger.INFO("Iterating Fluid Found "+(aCount++)+" | "+hatchFluid1.getLocalizedName()); - Iterator arg5 = tRecipeList.iterator(); - - int Hatch = 0; - int totalFuelValue = 0; - while (arg5.hasNext()) { - Logger.INFO("Iterating Recipe "+(Hatch++)); - GT_Recipe aFuel = (GT_Recipe) arg5.next(); - FluidStack tLiquid; - boolean addedFuelOnce = false; - for (int a = 0; a < aMulti; a++) { - if ((tLiquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null - && hatchFluid1.isFluidEqual(tLiquid)) { - this.fuelConsumption = tLiquid.amount = this.boostEu - ? 4096 / aFuel.mSpecialValue - : 2048 / aFuel.mSpecialValue; - if (this.depleteInput(tLiquid)) { - Logger.INFO("Depleted Fuel"); - this.boostEu = this.depleteInput(Materials.Oxygen.getGas(2L)); - -/*if (!tFluids.contains(Materials.Lubricant.getFluid(1L))) { - Logger.INFO("No Lube."); - return false; - }*/ - - if (this.mRuntime % 72 == 0 || this.mRuntime == 0) { - this.depleteInput(Materials.Lubricant.getFluid(this.boostEu ? 2L : 1L)); - } - Logger.INFO("ADDING POWER"); - this.fuelRemaining = hatchFluid1.amount; - totalFuelValue++; - } - } - } - //Do things after consuming Fuel - if (totalFuelValue == aMulti) { - this.fuelValue = aFuel.mSpecialValue*aMulti; - this.mEUt = this.mEfficiency < 2000 ? 0 : aFuel.mSpecialValue*aMulti; - this.mProgresstime = aMulti; - this.mMaxProgresstime = aMulti; - this.mEfficiencyIncrease = 15*aMulti; - return true; - } - } - } - } - - this.mEUt = 0; - this.mEfficiency = 0; - return false; - } - - public static ItemStack[] clean(final ItemStack[] v) { - List list = new ArrayList(Arrays.asList(v)); - list.removeAll(Collections.singleton(null)); - return list.toArray(new ItemStack[list.size()]); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntityGeneratorArray::addGeneratorArrayList, 48, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - GregTech_API.sBlockCasings4, 0 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10; - } - - public final boolean addGeneratorArrayList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - /** - * Code from single blocks - */ - - public void tryProcessFuelItems(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a) { - if (a != null - && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L + this.getMinimumStoredEU() - && GT_Utility.getFluidForFilledItem(a, true) == null) { - int tFuelValue; - tFuelValue = this.getFuelValue(a); - if (tFuelValue > 0) { - ItemStack tEmptyContainer1 = this.getEmptyContainer(a); - if (this.addOutput(tEmptyContainer1)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); - this.depleteInput(a); - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); - } - } - } - } - - public void tryProcessFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick, FluidStack mFluid) { - if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) { - int tFuelValue; - if (mFluid != null) { - tFuelValue = this.getFuelValue(mFluid); - int tEmptyContainer = this.consumedFluidPerOperation(mFluid); - if (tFuelValue > 0 && tEmptyContainer > 0 && mFluid.amount > tEmptyContainer) { - long tFluidAmountToUse = Math.min((long) (mFluid.amount / tEmptyContainer), - (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); - if (tFluidAmountToUse > 0L && aBaseMetaTileEntity - .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { - PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); - mFluid.amount = (int) ((long) mFluid.amount - - tFluidAmountToUse * (long) tEmptyContainer); - } - } - } - - //Check items - } - - if (aBaseMetaTileEntity.isServerSide()) { - aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity - .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU()); - } - - } - - public boolean isFluidInputAllowed(FluidStack aFluid) { - return this.getFuelValue(aFluid) > 0; - } - - - public int consumedFluidPerOperation(FluidStack aLiquid) { - return 1; - } - - public int getFuelValue(FluidStack aLiquid) { - if (aLiquid != null && this.getRecipeMap() != null) { - Collection tRecipeList = this.getRecipeMap().mRecipeList; - if (tRecipeList != null) { - Iterator arg3 = tRecipeList.iterator(); - - while (arg3.hasNext()) { - GT_Recipe tFuel = (GT_Recipe) arg3.next(); - FluidStack tLiquid; - if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null - && aLiquid.isFluidEqual(tLiquid)) { - return (int) ((long) tFuel.mSpecialValue * (long) this.mEfficiency - * (long) this.consumedFluidPerOperation(tLiquid) / 100L); - } - } - } - - return 0; - } else { - return 0; - } - } - - public int getFuelValue(ItemStack aStack) { - if (!GT_Utility.isStackInvalid(aStack) && this.getRecipeMap() != null) { - GT_Recipe tFuel = this.getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, - (FluidStack[]) null, new ItemStack[]{aStack}); - return tFuel != null ? (int) ((long) tFuel.mSpecialValue * 1000L * (long) this.mEfficiency / 100L) : 0; - } else { - return 0; - } - } - - public ItemStack getEmptyContainer(ItemStack aStack) { - if (!GT_Utility.isStackInvalid(aStack) && this.getRecipeMap() != null) { - GT_Recipe tFuel = this.getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, - (FluidStack[]) null, new ItemStack[]{aStack}); - return tFuel != null - ? GT_Utility.copy(new Object[]{tFuel.getOutput(0)}) - : GT_Utility.getContainerItem(aStack, true); - } else { - return null; - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java deleted file mode 100644 index 83b8eae458..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ /dev/null @@ -1,332 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import codechicken.nei.ItemStackMap; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.*; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.*; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.helpers.TreeFarmHelper; -import gtPlusPlus.xmod.gregtech.common.helpers.treefarm.TreeGenerator; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase { - - public static int CASING_TEXTURE_ID; - public static String mCasingName = "Advanced Cryogenic Casing"; - public static TreeGenerator mTreeData; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - static { - new Thread("GTPP-TreeDataWorker") { - @Override - public void run() { - mTreeData = new TreeGenerator(); - } - }.start(); - } - - private static ItemStack aLeaves; - - public GregtechMetaTileEntityTreeFarm(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - CASING_TEXTURE_ID = TAE.getIndexFromPage(1, 15); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); - } - - public GregtechMetaTileEntityTreeFarm(final String aName) { - super(aName); - CASING_TEXTURE_ID = TAE.getIndexFromPage(1, 15); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); - } - - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntityTreeFarm(this.mName); - } - - @Override - public String getMachineType() { - return "Tree Farm"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); - } - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Converts EU to Oak Logs") - .addInfo("Eu Usage: 100% | Parallel: 1") - .addInfo("Requires a Saw or Chainsaw in GUI slot") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front center") - .addCasingInfo("Sterile Farm Casing", 10) - .addInputBus("Any casing", 1) - .addOutputBus("Any casing", 1) - .addEnergyHatch("Any casing", 1) - .addMaintenanceHatch("Any casing", 1) - .addMufflerHatch("Any casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), - TextureFactory.of(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "VacuumFreezer"; - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - public boolean isCorrectMachinePart(final ItemStack aStack) { - // is correct part && either not powered tool or have enough power - return TreeFarmHelper.getPartType(aStack) != null && !GT_ModHandler.isElectricItem(aStack) || GT_ModHandler.canUseElectricItem(aStack, 1); - } - - public boolean checkRecipe(final ItemStack aStack) { - if (mTreeData == null) - // not finished somehow - return false; - if (aStack == null && !replaceTool()) - // no tool - return false; - if (!isCorrectMachinePart(aStack)) - // not a tool - return false; - if (mTreeData != null) { - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - - this.mMaxProgresstime = 100; - this.mEUt = (int) tVoltage; - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - - int aChance = MathUtils.randInt(0, 10); - - try { - if (aChance < 8) { - ItemStackMap allOutputs = new ItemStackMap<>(); - if (aLeaves == null) - aLeaves = ItemUtils.getSimpleStack(Blocks.leaves); - //1% Chance per Tick - for (int u = 0; u < (Math.max(4, (MathUtils.randInt((3 * tTier), 100) * tTier * tTier) / 14)); u++) { - AutoMap aOutputs = mTreeData.generateOutput(0); - if (aOutputs.size() > 0) { - for (ItemStack aOutputItemStack : aOutputs) { - if (!GT_Utility.areStacksEqual(aLeaves, aOutputItemStack)) { - Integer oldStackSize = allOutputs.get(aOutputItemStack); - int oldStackSizeUnboxed = oldStackSize == null ? 0 : oldStackSize; - allOutputs.put(aOutputItemStack, oldStackSizeUnboxed + aOutputItemStack.stackSize); - } - } - } - } - - mOutputItems = allOutputs.entries().stream() - .map(e -> { - e.key.stackSize = e.value; - return e.key; - }).toArray(ItemStack[]::new); - } - } catch (Throwable t) { - t.printStackTrace(GT_Log.err); - } - return true; - } else { - return false; - } - } - - @Override - public boolean checkHatch() { - return super.checkHatch() && mEnergyHatches.size() == 1; - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 - 8 && checkHatch(); - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntityTreeFarm::addTreeFarmList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 15 - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public final boolean addTreeFarmList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiTreeFarm; - } - - public int getDamageToComponent(final ItemStack aStack) { - return MathUtils.balance((int) (75 - ((GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).getMass()))), 5, 120); - } - - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public boolean replaceTool() { - ItemStack invItem = this.mInventory[1]; - if (invItem == null) { - for (GT_MetaTileEntity_Hatch_InputBus mInputBus : this.mInputBusses) { - for (int i = 0; i < mInputBus.mInventory.length; i++) { - ItemStack uStack = mInputBus.mInventory[i]; - if (uStack != null && TreeFarmHelper.getPartType(uStack) != null) { - this.setGUIItemStack(uStack); - return true; - } - } - } - } - return false; - } - - public boolean tryDamageTool(ItemStack invItem) { - if (invItem != null && invItem.getItem() instanceof GT_MetaGenerated_Tool) { - long aDmg = GT_MetaGenerated_Tool.getToolDamage(invItem); - long aDmgMax = GT_MetaGenerated_Tool.getToolMaxDamage(invItem); - if (aDmg < aDmgMax && GT_MetaGenerated_Tool.getPrimaryMaterial(invItem) != Materials._NULL) { - return GT_ModHandler.damageOrDechargeItem(invItem, 1, 0, null); - } - } - return false; - } - - @Override - public boolean doRandomMaintenanceDamage() { - ItemStack tSaw = mInventory[1]; - if (!isCorrectMachinePart(tSaw) || getRepairStatus() == 0) { - stopMachine(); - return false; - } - if (CORE.RANDOM.nextInt(200) == 0) { - if (!tryDamageTool(tSaw)) { - if (tSaw.getItem().isDamageable()) - addOutput(tSaw); - this.mInventory[1] = null; - if (!replaceTool()) - this.getBaseMetaTileEntity().disableWorking(); - tryDamageTool(tSaw); - } - } - return super.doRandomMaintenanceDamage(); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - replaceTool(); - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java deleted file mode 100644 index c84c5e162e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java +++ /dev/null @@ -1,336 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_AlloyBlastSmelter -extends GregtechMeta_MultiBlockBase { - - private int mMode = 0; - private boolean isUsingControllerCircuit = false; - private static Item circuit; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - - public GregtechMetaTileEntity_AlloyBlastSmelter(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_AlloyBlastSmelter(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_AlloyBlastSmelter(this.mName); - } - - @Override - public String getMachineType() { - return "Fluid Alloy Cooker"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Alloy Blast Smelter") - .addInfo("20% Faster than the Electric Blast Furnace") - .addInfo("Allows Complex GT++ alloys to be created") - .addInfo("Circuit for recipe goes in the Input Bus or GUI slot") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 4, 3, true) - .addController("Bottom Center") - .addCasingInfo("Blast Smelter Casings", 10) - .addCasingInfo("Blast Smelter Heat Containment Coils", 16) - .addInputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"HHH", "H-H", "HHH"}, - {"HHH", "H-H", "HHH"}, - {"C~C", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_AlloyBlastSmelter::addAlloyBlastSmelterList, TAE.GTPP_INDEX(15), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 15 - ) - ) - ) - ) - .addElement( - 'H', - ofBlock( - ModBlocks.blockCasingsMisc, 14 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 3, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 1, 3, 0) && mCasing >= 10 && mEnergyHatches.size() == 1 && checkHatch(); - } - - public final boolean addAlloyBlastSmelterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(208)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15))}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public boolean requiresVanillaGtGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return "ElectricBlastFurnace"; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes; - } - - @Override - public boolean isCorrectMachinePart(final ItemStack aStack) { - if (this.getBaseMetaTileEntity().isServerSide()) { - //Get Controller Circuit - if (circuit == null) { - circuit = CI.getNumberedCircuit(0).getItem(); - } - if (aStack != null && aStack.getItem() == circuit) { - this.mMode = aStack.getItemDamage(); - return this.isUsingControllerCircuit = true; - } - else { - if (aStack == null) { - this.isUsingControllerCircuit = false; - return true; //Allowed empty - } - Logger.WARNING("Not circuit in GUI inputs."); - return this.isUsingControllerCircuit = false; - } - } - Logger.WARNING("No Circuit, clientside."); - return this.isUsingControllerCircuit = false; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - - if (this.getBaseMetaTileEntity().isServerSide()) { - //Get Controller Circuit - this.isUsingControllerCircuit = isCorrectMachinePart(aStack); - - final ArrayList tInputList = this.getStoredInputs(); - for (int i = 0; i < (tInputList.size() - 1); i++) { - for (int j = i + 1; j < tInputList.size(); j++) { - if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { - if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { - tInputList.remove(j--); - } else { - tInputList.remove(i--); - break; - } - } - } - } - - //Validity check - if ((isUsingControllerCircuit && tInputList.size() < 1) || (!isUsingControllerCircuit && tInputList.size() < 2)) { - Logger.WARNING("Not enough inputs."); - return false; - } - else if (isUsingControllerCircuit && tInputList.size() >= 1) { - tInputList.add(CI.getNumberedCircuit(this.mMode)); - } - - - final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, tInputList.size()); - - final ArrayList tFluidList = this.getStoredFluids(); - for (int i = 0; i < (tFluidList.size() - 1); i++) { - for (int j = i + 1; j < tFluidList.size(); j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - } else { - tFluidList.remove(i--); - break; - } - } - } - } - final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1); - if (tInputList.size() > 1) { - final long tVoltage = this.getMaxInputVoltage(); - final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - final GT_Recipe tRecipe = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) { - Logger.WARNING("Found some Valid Inputs."); - this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000)); - this.mEfficiencyIncrease = 10000; - if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1))); - this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1))); - } else { - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; - List tOutPutItems = new ArrayList(); - for (ItemStack tOut : tRecipe.mOutputs) { - if (ItemUtils.checkForInvalidItems(tOut)) { - tOutPutItems.add(tOut); - } - } - if (tOutPutItems.size() > 0) - this.mOutputItems = tOutPutItems.toArray(new ItemStack[tOutPutItems.size()]); - this.updateSlots(); - return true; - } - } - } - Logger.WARNING("Failed to find some Valid Inputs or Clientside."); - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiABS; - } - - @Override - public int getDamageToComponent(final ItemStack aStack) { - return 0; - } - - @Override - public int getAmountOfOutputs() { - return 2; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java deleted file mode 100644 index ecd4882516..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ /dev/null @@ -1,481 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.chemistry.IonParticles; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_Cyclotron(int aID, String aName, String aNameRegional, int tier) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_Cyclotron(String aName) { - super(aName); - } - - @Override - public String getMachineType() { - return "Particle Accelerator"; - } - - public int tier(){ - return 5; - } - - @Override - public long maxEUStore() { - return 1800000000L; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return super.getServerGUI(aID, aPlayerInventory, aBaseMetaTileEntity); - //return new CONTAINER_Cyclotron(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return super.getClientGUI(aID, aPlayerInventory, aBaseMetaTileEntity); - //return new GUI_Cyclotron(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.mNEIName); - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Cyclotron(this.mName); - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { - return aSide != getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - { - " ", - " hhh ", - " hh hh ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " hh hh ", - " hhh ", - " ", - }, - { - " hhh ", - " hhccchh ", - " hcchhhcch ", - " hchh hhch ", - " hch hch ", - " hch hch ", - "hch hch", - "hch hch", - "hch hch", - " hch hch ", - " hch hch ", - " hchh hhch ", - " hcch~hcch ", - " hhccchh ", - " hhh ", - }, - { - " ", - " hhh ", - " hh hh ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " h h ", - " hh hh ", - " hhh ", - " ", - } - })) - .addElement( - 'h', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_Cyclotron::addCyclotronList, 44, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasing(), getCasingMeta() - ) - ) - ) - ) - .addElement( - 'c', - ofBlock( - getCyclotronCoil(), getCyclotronCoilMeta() - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 7, 1, 12); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 7, 1, 12) && mCasing >= 40 && checkHatch(); - } - - public final boolean addCyclotronList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus && ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier >= 5){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy && ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier >= 5){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus && ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier >= 5) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 5) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public Block getCasing() { - return ModBlocks.blockCasings2Misc; - } - - public int getCasingMeta() { - return 10; - } - - public Block getCyclotronCoil() { - return ModBlocks.blockCasings2Misc; - } - - public int getCyclotronCoilMeta() { - return 9; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Super Magnetic Speed Shooter") - .addSeparator() - .addInfo("Particles are accelerated over 186 revolutions to 80% light speed") - .addInfo("Can produce a continuous beam current of 2.2 mA at 590 MeV") - .addInfo("Which will be extracted from the Isochronous Cyclotron") - .addSeparator() - .addInfo("Consists of the same layout as a Fusion Reactor") - .addInfo("Any external casing can be a hatch/bus, unlike Fusion") - .addInfo("Cyclotron Machine Casings around Cyclotron Coil Blocks") - .addInfo("All Hatches must be IV or better") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .addCasingInfo("Cyclotron Machine Casings", 40) - .addCasingInfo("Cyclotron Coil", 32) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - ITexture[] sTexture; - if (aSide == aFacing) { - sTexture = new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44), new GT_RenderedTexture(getIconOverlay())}; - } else { - if (!aActive) { - sTexture = new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44)}; - } else { - sTexture = new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44)}; - } - } - return sTexture; - } - - public IIconContainer getIconOverlay() { - if (this.getBaseMetaTileEntity().isActive()){ - return TexturesGtBlock.Overlay_MatterFab_Active_Animated; - } - return TexturesGtBlock.Overlay_MatterFab_Animated; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - - /*if (CORE.DEVENV) { - return this.checkRecipeGeneric(); - }*/ - this.fixAllMaintenanceIssue(); - - //log("Recipe Check."); - ArrayList tItemList = getStoredInputs(); - ItemStack[] tItemInputs = tItemList.toArray(new ItemStack[tItemList.size()]); - ArrayList tInputList = getStoredFluids(); - FluidStack[] tFluidInputs = tInputList.toArray(new FluidStack[tInputList.size()]); - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - - GT_Recipe tRecipe = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.findRecipe(getBaseMetaTileEntity(), false, - gregtech.api.enums.GT_Values.V[tTier], tFluidInputs, tItemInputs); - if (tRecipe != null){ - if (tRecipe.isRecipeInputEqual(true, tFluidInputs, tItemInputs)) { - - this.mEfficiency = (10000 - ((getIdealStatus() - getRepairStatus()) * 1000)); - this.mEfficiencyIncrease = 10000; - this.mEUt = tRecipe.mEUt; - this.mMaxProgresstime = tRecipe.mDuration; - - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - final ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length]; - for (int i = 0; i < tRecipe.mOutputs.length; i++){ - if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)){ - Logger.WARNING("Adding a bonus output"); - outputs[i] = tRecipe.getOutput(i); - } - else { - Logger.WARNING("Adding null output"); - outputs[i] = null; - } - } - - for (ItemStack s : outputs) { - if (s != null) { - if (s.getItem() instanceof IonParticles) { - long aCharge = IonParticles.getChargeState(s); - if (aCharge == 0) { - IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] { - -5, -5, - -4, -4, -4, - -3, -3, -3, -3, -3, - -2, -2, -2, -2, -2, -2, -2, - -1, -1, -1, -1, -1, -1, -1, -1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, - 5, 5, 5, - 6, 6})); - } - } - } - } - - this.mOutputItems = outputs; - this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; - return true; - } - } - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - if (this.mOutputBusses.size() > 0) { - for (GT_MetaTileEntity_Hatch_OutputBus g : this.mOutputBusses) { - if (g != null) { - for (ItemStack s : g.mInventory) { - if (s != null) { - if (s.getItem() instanceof IonParticles) { - long aCharge = IonParticles.getChargeState(s); - if (aCharge == 0) { - IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] { - -5, -5, - -4, -4, -4, - -3, -3, -3, -3, -3, - -2, -2, -2, -2, -2, -2, -2, - -1, -1, -1, -1, -1, -1, -1, -1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, - 5, 5, 5, - 6, 6})); - } - } - } - } - } - } - } - this.fixAllMaintenanceIssue(); - return super.onRunningTick(aStack); - } - - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiCyclotron; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - @Override - public String[] getExtraInfoData() { - String tier = tier() == 5 ? "I" : "II"; - float plasmaOut = 0; - int powerRequired = 0; - if (this.mLastRecipe != null) { - powerRequired = this.mLastRecipe.mEUt; - if (this.mLastRecipe.getFluidOutput(0) != null) { - plasmaOut = (float)this.mLastRecipe.getFluidOutput(0).amount / (float)this.mLastRecipe.mDuration; - } - } - - return new String[]{ - "COMET - Compact Cyclotron MK "+tier, - "EU Required: "+powerRequired+"EU/t", - "Stored EU: "+this.getEUVar()+" / "+maxEUStore()}; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @SuppressWarnings("deprecation") - public boolean turnCasingActive(final boolean status) { - if (this.mEnergyHatches != null) { - for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) { - hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; - } - } - if (this.mOutputHatches != null) { - for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { - hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; - } - } - if (this.mInputHatches != null) { - for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) { - hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; - } - } - if (this.mMaintenanceHatches != null) { - for (final GT_MetaTileEntity_Hatch_Maintenance hatch : this.mMaintenanceHatches) { - hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; - } - } - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java deleted file mode 100644 index 80eb09640d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java +++ /dev/null @@ -1,623 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.*; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import ic2.core.init.BlocksItems; -import ic2.core.init.InternalName; -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandomFishable; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_MultiBlockBase { - - private boolean isUsingControllerCircuit = false; - private static final Item circuit = CI.getNumberedCircuit(0).getItem(); - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_IndustrialFishingPond(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_IndustrialFishingPond(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_IndustrialFishingPond(this.mName); - } - - @Override - public String getMachineType() { - return "Fish Trap"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Fishing Pond") - .addInfo("Can process (Tier + 1) * 2 recipes") - .addInfo("Put a numbered circuit into the input bus.") - .addInfo("Circuit 14 for Fish") - .addInfo("Circuit 15 for Junk") - .addInfo("Circuit 16 for Treasure") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(9, 3, 9, true) - .addController("Front Center") - .addCasingInfo("Aquatic Casings", 64) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - protected IAlignmentLimits getInitialAlignmentLimits() { - // fuck - return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"XXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, - {"XXXX~XXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, - {"XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX"}, - })) - .addElement( - 'X', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialFishingPond::addIndustrialFishingPondList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public final boolean addIndustrialFishingPondList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 4, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 4, 1, 0) && mCasing >= 64 && checkHatch(); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE - : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER) }; - } - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) }; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - if (aStack != null) { - log("Found " + aStack.getDisplayName()); - if (aStack.getItem() == circuit) { - this.isUsingControllerCircuit = true; - this.mMode = aStack.getItemDamage(); - log("Found Circuit!"); - } else { - this.isUsingControllerCircuit = false; - } - } else { - this.isUsingControllerCircuit = false; - } - if (!hasGenerateRecipes) { - log("Generating Recipes."); - generateRecipes(); - } - if (hasGenerateRecipes) { - if (!checkForWater()) { - return false; - } - - log("Trying to run recipe."); - ArrayList tItems = getStoredInputs(); - ArrayList tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - - if (!isUsingControllerCircuit && tItems.size() == 0) { - return false; - } - - return checkRecipeGeneric(tItemInputs, tFluidInputs, getMaxParallelRecipes(), 100, 80, 100); - } - return true; - } - - @Override - public int getMaxParallelRecipes() { - return (2 * (GT_Utility.getTier(this.getMaxInputVoltage())+1)); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialFishingPond; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings3Misc; - } - - public byte getCasingMeta() { - return 0; - } - - public int getCasingTextureIndex() { - return TAE.GTPP_INDEX(32); - } - - public boolean checkForWater() { - - // Get Facing direction - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int mCurrentDirectionX; - int mCurrentDirectionZ; - int mOffsetX_Lower = 0; - int mOffsetX_Upper = 0; - int mOffsetZ_Lower = 0; - int mOffsetZ_Upper = 0; - - mCurrentDirectionX = 4; - mCurrentDirectionZ = 4; - - mOffsetX_Lower = -4; - mOffsetX_Upper = 4; - mOffsetZ_Lower = -4; - mOffsetZ_Upper = 4; - - // if (aBaseMetaTileEntity.fac) - - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX - * mCurrentDirectionX; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ - * mCurrentDirectionZ; - - int tAmount = 0; - for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) { - for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { - for (int h = 0; h < 2; h++) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - // byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) { - if (this.getStoredFluids() != null) { - for (FluidStack stored : this.getStoredFluids()) { - if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) { - if (stored.amount >= 1000) { - // Utils.LOG_WARNING("Going to try swap an air block for water from inut bus."); - stored.amount -= 1000; - Block fluidUsed = Blocks.water; - aBaseMetaTileEntity.getWorld().setBlock( - aBaseMetaTileEntity.getXCoord() + xDir + i, - aBaseMetaTileEntity.getYCoord() + h, - aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed); - - } - } - } - } - } - tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - if (tBlock == Blocks.water || tBlock == Blocks.flowing_water) { - ++tAmount; - // log("Found Water"); - } - } - } - } - - boolean isValidWater = tAmount >= 60; - - if (isValidWater) { - log("Filled structure."); - return true; - } - else { - - long aAvgVoltage = 0; - for (GT_MetaTileEntity_Hatch_Energy g : this.mEnergyHatches) { - if (g != null) { - aAvgVoltage += (g.maxEUInput() * g.maxAmperesIn()); - } - } - this.mEUt = (int) Math.max(30, aAvgVoltage); - this.mMaxProgresstime = (int) Math.max(((aAvgVoltage/8)*20/10), 100); - this.mProgresstime = 1; - log("Did not fill structure. Consuming "+aAvgVoltage+"eu/t to try fill."); - return false; - } - } - - private static AutoMap> categories = new AutoMap>(); - private static AutoMap categoryFish = new AutoMap(); - private static AutoMap categoryJunk = new AutoMap(); - private static AutoMap categoryLoot = new AutoMap(); - private static boolean hasGenerateRecipes = false; - private int mMode = 14; - private int mMax = 8; - - private boolean generateRecipes() { - if (!hasGenerateRecipes) { - categories.put(categoryFish); - categories.put(categoryJunk); - categories.put(categoryLoot); - for (WeightedRandomFishable h : FishPondFakeRecipe.fish) { - categoryFish.put(h); - } - for (WeightedRandomFishable h : FishPondFakeRecipe.junk) { - categoryJunk.put(h); - } - for (WeightedRandomFishable h : FishPondFakeRecipe.treasure) { - categoryLoot.put(h); - } - hasGenerateRecipes = true; - return true; - } else { - return true; - } - } - - private int getCircuit(ItemStack[] t) { - if (!this.isUsingControllerCircuit) { - for (ItemStack j : t) { - if (j.getItem() == CI.getNumberedCircuit(0).getItem()) { - // Fish - if (j.getItemDamage() == 14) { - mMax = 8 + (this.getMaxParallelRecipes() - 2); - this.mMode = 14; - break; - } - // Junk - else if (j.getItemDamage() == 15) { - this.mMode = 15; - mMax = 4; - break; - } - // Loot - else if (j.getItemDamage() == 16) { - this.mMode = 16; - mMax = 4; - break; - } else { - this.mMode = 0; - mMax = 0; - break; - } - } else { - this.mMode = 0; - mMax = 0; - break; - } - } - } - return this.mMode; - } - - // reflection map - private static Map reflectiveFishMap = new HashMap(); - - private ItemStack reflectiveFish(WeightedRandomFishable y) { - if (reflectiveFishMap.containsKey(y)) { - return reflectiveFishMap.get(y); - } - ItemStack t; - try { - t = (ItemStack) ReflectionUtils.getField(WeightedRandomFishable.class, "field_150711_b").get(y); - ItemStack k = ItemUtils.getSimpleStack(t, 1); - reflectiveFishMap.put(y, k); - return t; - } catch (IllegalArgumentException | IllegalAccessException e) { - } - return null; - } - - private ItemStack[] generateLoot(int mode) { - ItemStack[] mFishOutput = new ItemStack[this.mMax]; - if (this.mMode == 14) { - for (int k = 0; k < this.mMax; k++) { - if (mFishOutput[k] == null) - for (WeightedRandomFishable g : categoryFish.values()) { - if (MathUtils.randInt(0, (65 - getMaxParallelRecipes())) <= 2) { - ItemStack t = reflectiveFish(g); - if (t != null) { - mFishOutput[k] = ItemUtils.getSimpleStack(t, 1); - } - } - } - } - } else if (this.mMode == 15) { - for (int k = 0; k < this.mMax; k++) { - if (mFishOutput[k] == null) - for (WeightedRandomFishable g : categoryJunk.values()) { - if (MathUtils.randInt(0, 100) <= 1) { - ItemStack t = reflectiveFish(g); - if (t != null) { - mFishOutput[k] = ItemUtils.getSimpleStack(t, 1); - } - } - } - } - } else if (this.mMode == 16) { - for (int k = 0; k < this.mMax; k++) { - if (mFishOutput[k] == null) - for (WeightedRandomFishable g : categoryLoot.values()) { - if (MathUtils.randInt(0, 1000) <= 2) { - ItemStack t = reflectiveFish(g); - if (t != null) { - mFishOutput[k] = ItemUtils.getSimpleStack(t, 1); - } - } - } - } - } else { - mFishOutput = null; - } - return mFishOutput; - } - - @Override - public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, - int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { - - - - //Control Core to control the Multiblocks behaviour. - int aControlCoreTier = getControlCoreTier(); - - //If no core, return false; - if (aControlCoreTier == 0 && CORE.ConfigSwitches.requireControlCores) { - log("Invalid/No Control Core"); - return false; - } - - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - log("Running checkRecipeGeneric(0)"); - - //Check to see if Voltage Tier > Control Core Tier - if (tTier > aControlCoreTier && CORE.ConfigSwitches.requireControlCores) { - return false; - } - - // Based on the Processing Array. A bit overkill, but very flexible. - getCircuit(aItemInputs); - - /* - * GT_Recipe tRecipe = this.getRecipeMap().findRecipe( getBaseMetaTileEntity(), - * mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, - * aItemInputs); - */ - - ItemStack[] mFishOutput = generateLoot(this.mMode); - mFishOutput = removeNulls(mFishOutput); - GT_Recipe g = new GTPP_Recipe(true, new ItemStack[] {}, mFishOutput, null, new int[] {}, aFluidInputs, mOutputFluids, 200, 16, 0); - aMaxParallelRecipes = this.canBufferOutputs(g, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - log("No Space"); - return false; - } - - log("Mode: " + this.mMode + " | Is loot valid? " + (mFishOutput != null)); - - int jslot = 0; - for (ItemStack x : mFishOutput) { - if (x != null) { - log( - "Slot " + jslot + " in mFishOutput contains " + x.stackSize + "x " + x.getDisplayName() + "."); - } else { - log("Slot " + jslot + " in mFishOutput was null."); - } - jslot++; - } - - // EU discount - float tRecipeEUt = (8 * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+aMaxParallelRecipes); - log("tTotalEUt: "+tTotalEUt); - log("tVoltage: "+tVoltage); - log("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(20 * tTimeFactor * 4); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - - //Only Overclock as high as the control circuit. - byte tTierOld = tTier; - tTier = CORE.ConfigSwitches.requireControlCores ? (byte) aControlCoreTier : tTierOld; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - - log("Recipe Step. [3]"); - // Collect output item types - ItemStack[] tOutputItems = mFishOutput; - - int rslot = 0; - tOutputItems = removeNulls(mFishOutput); - - for (ItemStack x : tOutputItems) { - if (x != null) { - log( - "rSlot " + rslot + " in mFishOutput contains " + x.stackSize + "x " + x.getDisplayName() + "."); - } else { - log("rSlot " + rslot + " in mFishOutput was null."); - } - rslot++; - } - - // Commit outputs - this.mOutputItems = tOutputItems; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - return true; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java deleted file mode 100644 index d9162cea89..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java +++ /dev/null @@ -1,629 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; -import java.util.Collection; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.item.chemistry.RocketFuels; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_AirIntake; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_MultiBlockBase -{ - protected int fuelConsumption; - protected int fuelValue; - protected int fuelRemaining; - protected int freeFuelTicks = 0; - protected int euProduction = 0; - protected boolean boostEu; - - public static String mLubricantName = "Carbon Dioxide"; - public static String mCoolantName = "Liquid Hydrogen"; - - public static String mCasingName = "Turbodyne Casing"; - public static String mIntakeHatchName = "Tungstensteel Turbine Casing"; - public static String mGearboxName = "Inconel Reinforced Casing"; - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - private final static int CASING_ID = TAE.getIndexFromPage(3, 11); - - public GregtechMetaTileEntity_LargeRocketEngine(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - this.fuelConsumption = 0; - this.fuelValue = 0; - this.fuelRemaining = 0; - this.boostEu = false; - } - - public GregtechMetaTileEntity_LargeRocketEngine(final String aName) { - super(aName); - this.fuelConsumption = 0; - this.fuelValue = 0; - this.fuelRemaining = 0; - this.boostEu = false; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 11); - } - if (mIntakeHatchName.toLowerCase().contains(".name")) { - mIntakeHatchName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 11); - } - if (mGearboxName.toLowerCase().contains(".name")) { - mGearboxName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 1); - } - if (mLubricantName.toLowerCase().contains(".")) { - mLubricantName = FluidUtils.getFluidStack("carbondioxide", 1).getLocalizedName(); - } - if (mCoolantName.toLowerCase().contains(".")) { - mCoolantName = FluidUtils.getFluidStack("liquidhydrogen", 1).getLocalizedName(); - } - - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Large Rocket Engine") - .addInfo("Supply Rocket Fuels and 1000L(3000L boosted) of " + mLubricantName + " per hour to run") - .addInfo("Supply 4L of " + mCoolantName + " per second per 2100 eu/t to boost output (optional)") - .addInfo("Consumes 2000L/s of air per 16384 eu/t produced") - .addInfo("Produces as much energy as you put fuel in") - .addInfo("Produces 1500 pollution/S per 16384 eu/t produced") - .addInfo("When producing more then 32K eu/t fuel wil be consume less efficiently (3x - 1.5x eff@57Keu/t input energy)") - .addInfo("formula: x = input of energy (10K^(1/3)/ x^(1/3)) * (40K^(1/3)/ x^(1/3))") - .addInfo("Boosting will produce 3x the amount of power but will consume 3x fuel") - .addSeparator() - .beginStructureBlock(3, 3, 10, false) - .addController("Front Center") - .addCasingInfo(mCasingName, 64) - .addCasingInfo(mGearboxName, 8) - .addStructureHint("Air Intake Hatch", 1) - .addInputBus("Side center line", 1) - .addInputHatch("Side center line", 1) - .addMaintenanceHatch("Side center line", 1) - .addDynamoHatch("Top center line", 2) - .addMufflerHatch("Back Center", 3) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CCC"}, - {"C~C", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "CMC"}, - {"CCC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CCC"}, - })) - .addElement( - 'C', - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - .addElement( - 'I', - ofBlock( - getGearboxBlock(), getGearboxMeta() - ) - ) - .addElement( - 'T', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_LargeRocketEngine::addLargeRocketEngineTopList, getCasingTextureIndex(), 2 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .addElement( - 'S', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_LargeRocketEngine::addLargeRocketEngineSideList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .addElement( - 'M', - ofHatchAdder( - GregtechMetaTileEntity_LargeRocketEngine::addLargeRocketEngineBackList, getCasingTextureIndex(), 3 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - this.mTecTechDynamoHatches.clear(); - this.mAllDynamoHatches.clear(); - this.mAirIntakes.clear(); - return checkPiece(mName, 1, 1, 0) && mCasing >= 64 - 48 && mAirIntakes.size() >= 8 && checkHatch(); - } - - public final boolean addLargeRocketEngineTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } if (LoadedMods.TecTech) { - if (isThisHatchMultiDynamo(aMetaTileEntity)) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - } - return false; - } - - public final boolean addLargeRocketEngineSideList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addLargeRocketEngineBackList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_ID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced) }; - } - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_ID) }; - } - - @Override - public boolean isCorrectMachinePart(final ItemStack aStack) { - return this.getMaxEfficiency(aStack) > 0; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return super.getClientGUI(aID, aPlayerInventory, aBaseMetaTileEntity); - } - - public int getAir() { - if (this.mAirIntakes.isEmpty() || this.mAirIntakes.size() <= 0) { - return 0; - } - else { - int totalAir = 0; - FluidStack airstack = FluidUtils.getFluidStack("air", 1); - for (GT_MetaTileEntity_Hatch_AirIntake u : this.mAirIntakes) { - if (u != null && u.mFluid != null) { - // had this trow errors cousing the machine to stop probebly fixed - FluidStack f = u.mFluid; - if (f.isFluidEqual(airstack)) { - totalAir += f.amount; - } - } - } - return totalAir; - } - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - final ArrayList tFluids = this.getStoredFluids(); - FluidStack air = FluidUtils.getFluidStack("air", 1); - - int aircount = getAir() ; - if (aircount < euProduction/100) { - //log("Not Enough Air to Run "+aircount); - return false; - } - else { - boolean hasIntakeAir = this.depleteInput(FluidUtils.getFluidStack(air, euProduction/100)); - if (!hasIntakeAir) { - //log("Could not consume Air to run "+aircount); - freeFuelTicks = 0; - return false; - } - } - // reste fuel ticks incase it does not reset when it stops - if (freeFuelTicks != 0 && this.mProgresstime == 0 && this.mEfficiency == 0) - freeFuelTicks = 0; - - //log("Running "+aircount); - log("looking at hatch"); - final Collection tRecipeList = GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels.mRecipeList; - - - if (tFluids.size() > 0 && tRecipeList != null) { - - if (tFluids.contains(MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(this.boostEu ? 3 : 1)) || tFluids.contains(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) { - if (this.mRuntime % 72 == 0 || this.mRuntime == 0) { - if (!consumeCO2()) { - freeFuelTicks = 0; - return false; - } - } - } else - { - freeFuelTicks = 0; - return false; - } - - if (freeFuelTicks == 0) - this.boostEu = consumeLOH(); - - for (final FluidStack hatchFluid1 : tFluids) { - if (hatchFluid1.isFluidEqual(air)) { - continue; - } - - if (freeFuelTicks == 0) { - for (final GT_Recipe aFuel : tRecipeList) { - final FluidStack tLiquid; - tLiquid = aFuel.mFluidInputs[0]; - if (hatchFluid1.isFluidEqual(tLiquid)) { - if (!consumeFuel(aFuel,hatchFluid1.amount)) { - continue; - } - this.fuelValue = aFuel.mSpecialValue; - this.fuelRemaining = hatchFluid1.amount; - this.mEUt = (int) ((this.mEfficiency < 2000) ? 0 : GT_Values.V[5]<<1); - this.mProgresstime = 1; - this.mMaxProgresstime = 1; - this.mEfficiencyIncrease = euProduction/2000; - return true; - //log(""); - } - } - - } else - { - this.mEfficiencyIncrease = euProduction/2000; - freeFuelTicks--; - this.mEUt = (int) ((this.mEfficiency < 1000) ? 0 : GT_Values.V[5]<<1); - this.mProgresstime = 1; - this.mMaxProgresstime = 1; - return true; - } - - } - } - this.mEUt = 0; - this.mEfficiency = 0; - freeFuelTicks = 0; - return false; - } - - /** - * Consumes Fuel if required. Free Fuel Ticks are handled here. - * @param aFuel - * @return - */ - public boolean consumeFuel(GT_Recipe aFuel,int amount) { - amount *= this.boostEu ? 0.3 : 0.9; - freeFuelTicks = 0; - int value = aFuel.mSpecialValue * 3; - int energy = value * amount; - if (amount < 5) - return false; - FluidStack tLiquid = FluidUtils.getFluidStack(aFuel.mFluidInputs[0], (this.boostEu ? amount * 3 : amount)); - if (!this.depleteInput(tLiquid)) { - return false; - } - else { - this.fuelConsumption = this.boostEu ? amount * 3 : amount; - this.freeFuelTicks = 20; - setEUProduction(energy); - return true; - } - } - - public void setEUProduction(int energy){ - energy /= 20; - double energyEfficiency; - double tDevideEnergy = Math.cbrt(energy); - if (energy > 10000) { - //cbrt(10 000) / - energyEfficiency = ((double) 21.5443469/tDevideEnergy); - if (energy >= 40000) - //cbrt(40 000) / - energyEfficiency *= ((double)34.19951893/tDevideEnergy); - energyEfficiency *= energy; - } - else { - energyEfficiency = energy; - } - euProduction = (int) ((double) energyEfficiency * 1.84); - if (this.boostEu) - euProduction *= 3; - } - - public boolean consumeCO2() { - if (this.depleteInput(MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(this.boostEu ? 3 : 1)) || this.depleteInput(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) { - return true; - } - else { - return false; - } - } - - public boolean consumeLOH() { - int LOHamount = (3 * euProduction)/1000; - return this.depleteInput(FluidUtils.getFluidStack(RocketFuels.Liquid_Hydrogen, LOHamount)); //(40 * ((long) euProduction / 10000)) - } - - @Override - public boolean addEnergyOutput(long aEU) { - if (aEU <= 0) { - return true; - } - if (mAllDynamoHatches.size() > 0) { - return addEnergyOutputMultipleDynamos(aEU, true); - } - return false; - } - - - public boolean addEnergyOutputMultipleDynamos(long aEU, boolean aAllowMixedVoltageDynamos) { - int injected = 0; - long totalOutput = 0; - long aFirstVoltageFound = -1; - boolean aFoundMixedDynamos = false; - for (GT_MetaTileEntity_Hatch aDynamo : mAllDynamoHatches) { - if( aDynamo == null ) { - return false; - } - if (isValidMetaTileEntity(aDynamo)) { - long aVoltage = aDynamo.maxEUOutput(); - long aTotal = aDynamo.maxAmperesOut() * aVoltage; - // Check against voltage to check when hatch mixing - if (aFirstVoltageFound == -1) { - aFirstVoltageFound = aVoltage; - } - else { - /** - * Calcualtes overclocked ness using long integers - * @param aEUt - recipe EUt - * @param aDuration - recipe Duration - * @param mAmperage - should be 1 ? - */ - //Long time calculation - if (aFirstVoltageFound != aVoltage) { - aFoundMixedDynamos = true; - } - } - totalOutput += aTotal; - } - } - - if (totalOutput < aEU || (aFoundMixedDynamos && !aAllowMixedVoltageDynamos)) { - explodeMultiblock(); - return false; - } - - long leftToInject; - //Long EUt calculation - long aVoltage; - //Isnt too low EUt check? - int aAmpsToInject; - int aRemainder; - - //xEUt *= 4;//this is effect of everclocking - for (GT_MetaTileEntity_Hatch aDynamo : mAllDynamoHatches) { - if (isValidMetaTileEntity(aDynamo)) { - leftToInject = aEU - injected; - aVoltage = aDynamo.maxEUOutput(); - aAmpsToInject = (int) (leftToInject / aVoltage); - aRemainder = (int) (leftToInject - (aAmpsToInject * aVoltage)); - long powerGain; - for (int i = 0; i < Math.min(aDynamo.maxAmperesOut(), aAmpsToInject + 1); i++) { - if (i == Math.min(aDynamo.maxAmperesOut(), aAmpsToInject)){ - powerGain = aRemainder; - }else{ - powerGain = aVoltage; - } - aDynamo.getBaseMetaTileEntity().increaseStoredEnergyUnits(powerGain, false); - injected += powerGain; - } - } - } - return injected > 0; - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - if (this.mRuntime%20 == 0) { - if (mMufflerHatches.size() == 1 && mMufflerHatches.get(0) instanceof GT_MetaTileEntity_Hatch_Muffler_Adv) { - GT_MetaTileEntity_Hatch_Muffler_Adv tMuffler = (GT_MetaTileEntity_Hatch_Muffler_Adv) mMufflerHatches.get(0); - if (!tMuffler.hasValidFilter()) { - ArrayList tInputs = getStoredInputs(); - for (ItemStack tItem : tInputs) { - if (tMuffler.isAirFilter(tItem)) { - tMuffler.mInventory[0] = tItem.copy(); - depleteInput(tItem); - updateSlots(); - break; - } - } - } - } - } - super.onRunningTick(aStack); - return true; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings4Misc; - } - - public byte getCasingMeta() { - return 11; - } - - public Block getGearboxBlock() { - return ModBlocks.blockCasings3Misc; - } - - public byte getGearboxMeta() { - return 1; - } - - public byte getCasingTextureIndex() { - return (byte) CASING_ID; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_LargeRocketEngine(this.mName); - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setInteger("freeFuelTicks", freeFuelTicks); - aNBT.setInteger("euProduction", euProduction); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - freeFuelTicks = aNBT.getInteger("freeFuelTicks"); - euProduction = aNBT.getInteger("euProduction"); - } - - @Override - public int getDamageToComponent(final ItemStack aStack) { - return 1; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return euProduction; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 75 * ( euProduction / 10000); - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return true; - } - - @Override - public String[] getExtraInfoData() { - return new String[] { - "Rocket Engine", - "Current Air: "+getAir(), - "Current Pollution: " + getPollutionPerTick(null), - "Time until next fuel consumption: "+freeFuelTicks, - "Current Output: " + this.mEUt * this.mEfficiency / 10000 + " EU/t", - "Fuel Consumption: " + (this.fuelConsumption) + "L/s", - "Fuel Value: " + this.fuelValue*3 + " EU/L", - "Fuel Remaining: " + this.fuelRemaining + " Litres", - "Current Efficiency: " + this.mEfficiency / 100 + "%", - (this.getIdealStatus() == this.getRepairStatus()) ? "No Maintainance issues" : "Needs Maintainance" }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Rocket Engine"; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java deleted file mode 100644 index 9be787e922..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java +++ /dev/null @@ -1,341 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.block.Block; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_LargeSemifluidGenerator extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - protected int fuelConsumption = 0; - protected int fuelValue = 0; - protected int fuelRemaining = 0; - protected boolean boostEu = false; - - public GregtechMetaTileEntity_LargeSemifluidGenerator(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_LargeSemifluidGenerator(String aName) { - super(aName); - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Large Semifluid Generator") - .addInfo("Engine Intake Casings must not be obstructed in front (only air blocks)") - .addInfo("Supply Semifluid Fuels and 2000L of Lubricant per hour to run.") - .addInfo("Supply 80L of Oxygen per second to boost output (optional).") - .addInfo("Default: Produces 2048EU/t at 100% efficiency") - .addInfo("Boosted: Produces 6144EU/t at 150% efficiency") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 3, 4, false) - .addController("Front Center") - .addCasingInfo("Stable Titanium Machine Casing", 16) - .addCasingInfo("Steel Gear Box Machine Casing", 2) - .addCasingInfo("Engine Intake Machine Casing", 8) - .addInputHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .addDynamoHatch("Back Center", 2) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50)}; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return getMaxEfficiency(aStack) > 0; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - ArrayList tFluids = getStoredFluids(); - - // Check for lubricant and oxygen first, so we can compute costs ahead of time. - // This will allow us to check costs without needing to actually try to deplete fluids - // (wasting earlier fluids in the check if later fluids turn out to be insufficient). - FluidStack lubricant = Materials.Lubricant.getFluid(0L); - FluidStack oxygen = Materials.Oxygen.getGas(0L); - for (FluidStack hatchFluid : tFluids) { - if (hatchFluid.isFluidEqual(lubricant)) { - lubricant.amount = Math.max(lubricant.amount, hatchFluid.amount); - } else if (hatchFluid.isFluidEqual(oxygen)) { - oxygen.amount = Math.max(oxygen.amount, hatchFluid.amount); - } - } - boostEu = oxygen.amount >= 4L; - long lubricantCost = boostEu ? 2L : 1L; - if (lubricant.amount < lubricantCost) { - return false; - } - - for (FluidStack hatchFluid : tFluids) { //Loops through hatches - GT_Recipe aFuel = GTPP_Recipe_Map.sSemiFluidLiquidFuels.findFuel(hatchFluid); - if (aFuel == null) { - // Not a valid semi-fluid fuel. - continue; - } - - int newEUt = boostEu ? 4096 : 2048; - fuelConsumption = newEUt / aFuel.mSpecialValue; //Calc fuel consumption - FluidStack tLiquid = new FluidStack(hatchFluid.getFluid(), fuelConsumption); - if(depleteInput(tLiquid)) { //Deplete that amount - // We checked beforehand, so both of these depletions should succeed. - // But check the return values anyway just to be safe. - if (boostEu) { - if (!depleteInput(Materials.Oxygen.getGas(4L))) { - return false; - } - } - //Deplete Lubricant. 2000L should = 1 hour of runtime (if baseEU = 2048) - if(mRuntime % 72 == 0 || mRuntime == 0) { - if(!depleteInput(Materials.Lubricant.getFluid(lubricantCost))) { - return false; - } - } - - fuelValue = aFuel.mSpecialValue; - fuelRemaining = hatchFluid.amount; //Record available fuel - this.mEUt = mEfficiency < 2000 ? 0 : newEUt; //Output 0 if startup is less than 20% - this.mProgresstime = 1; - this.mMaxProgresstime = 1; - this.mEfficiencyIncrease = 15; - return true; - } - } - - this.mEUt = 0; - this.mEfficiency = 0; - return false; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"III", "CCC", "CCC", "CCC"}, - {"I~I", "CGC", "CGC", "CMC"}, - {"III", "CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_LargeSemifluidGenerator::addLargeSemifluidGeneratorList, getCasingTextureIndex(), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - getCasingBlock(), getCasingMeta() - ) - ) - ) - ) - .addElement( - 'G', - ofBlock( - getGearboxBlock(), getGearboxMeta() - ) - ) - .addElement( - 'I', - ofBlock( - getIntakeBlock(), getIntakeMeta() - ) - ) - .addElement( - 'M', - ofHatchAdder( - GregtechMetaTileEntity_LargeSemifluidGenerator::addLargeSemifluidGeneratorBackList, getCasingTextureIndex(), 2 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mDynamoHatches.clear(); - return checkPiece(mName, 1, 1, 0) && mCasing >= 16 && checkHatch(); - } - - public final boolean addLargeSemifluidGeneratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public final boolean addLargeSemifluidGeneratorBackList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || this.isThisHatchMultiDynamo(aTileEntity)){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - public Block getCasingBlock() { - return GregTech_API.sBlockCasings4; - } - - public byte getCasingMeta() { - return 2; - } - - public Block getIntakeBlock() { - return GregTech_API.sBlockCasings4; - } - - public byte getIntakeMeta() { - return 13; - } - - public Block getGearboxBlock() { - return GregTech_API.sBlockCasings2; - } - - public byte getGearboxMeta() { - return 3; - } - - public byte getCasingTextureIndex() { - return 50; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_LargeSemifluidGenerator(this.mName); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 1; - } - - public int getMaxEfficiency(ItemStack aStack) { - return boostEu ? 15000 : 10000; - } - - @Override - public int getPollutionPerSecond(ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiLargeSemiFluidGenerator; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return true; - } - - @Override - public String[] getExtraInfoData() { - return new String[]{ - "Large Semifluid Generator", - "Current Output: " + mEUt * mEfficiency / 10000 + " EU/t", - "Fuel Consumption: " + fuelConsumption + "L/t", - "Fuel Value: " + fuelValue + " EU/L", - "Fuel Remaining: " + fuelRemaining + " Litres", - "Current Efficiency: " + (mEfficiency / 100) + "%", - getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Semifluid Generator"; - } - - @Override - public int getMaxParallelRecipes() { - return 0; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java deleted file mode 100644 index f016288547..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java +++ /dev/null @@ -1,425 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.ArrayList; -import java.util.Collection; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.*; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_MatterFab; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlockBase { - - public static int sUUAperUUM = 1; - public static int sUUASpeedBonus = 4; - public static int sDurationMultiplier = 3200; - - private int mMatterProduced = 0; - private int mScrapProduced = 0; - private int mAmplifierProduced = 0; - private int mScrapUsed = 0; - private int mAmplifierUsed = 0; - - public static String mCasingName1 = "Matter Fabricator Casing"; - public static String mCasingName2 = "Containment Casing"; - public static String mCasingName3 = "Matter Generation Coil"; - - private int mMode = 0; - - private final static int MODE_SCRAP = 1; - private final static int MODE_UU = 0; - - public static boolean sRequiresUUA = false; - private static FluidStack[] mUU = new FluidStack[2]; - private static ItemStack mScrap[] = new ItemStack[2]; - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public int getAmplifierUsed(){ - return this.mAmplifierUsed; - } - - public int getMatterProduced(){ - return this.mMatterProduced; - } - - public GregtechMetaTileEntity_MassFabricator(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); - mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); - mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); - } - - public GregtechMetaTileEntity_MassFabricator(final String aName) { - super(aName); - mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); - mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); - mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); - } - - @Override - public String getMachineType() { - return "Mass Fabricator / Recycler"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - - if (mCasingName1.toLowerCase().contains(".name")) { - mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); - } - if (mCasingName2.toLowerCase().contains(".name")) { - mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); - } - if (mCasingName3.toLowerCase().contains(".name")) { - mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); - } - - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Matter Fabricator") - .addInfo("Produces UU-A, UU-M & Scrap") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(5, 4, 5, true) - .addController("Front Center") - .addCasingInfo(mCasingName3, 9) - .addCasingInfo(mCasingName2, 24) - .addCasingInfo(mCasingName1, 40) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(9)), - new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_MatterFab_Active_Animated : TexturesGtBlock.Overlay_MatterFab_Animated)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(9))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "MatterFabricator"; - } - - public static ItemStack getScrapPile() { - if (mScrap[0] == null) { - mScrap[0] = ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrap")); - } - return mScrap[0]; - } - public static ItemStack getScrapBox() { - if (mScrap[1] == null) { - mScrap[1] = ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrapbox")); - } - return mScrap[1]; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_MatterFab(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png"); - } - - @Override - public void onConfigLoad(final GT_Config aConfig) { - super.onConfigLoad(aConfig); - sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier); - sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM); - sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus); - sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA); - //Materials.UUAmplifier.mChemicalFormula = ("Mass Fabricator Eff/Speed Bonus: x" + sUUASpeedBonus); - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - ArrayList tItems = getStoredInputs(); - ArrayList tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, 4, 80, 00, 100); - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, - {"CGGGC", "G---G", "G---G", "G---G", "CGGGC"}, - {"CGGGC", "G---G", "G---G", "G---G", "CGGGC"}, - {"CC~CC", "CHHHC", "CHHHC", "CHHHC", "CCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_MassFabricator::addMassFabricatorList, TAE.GTPP_INDEX(9), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasingsMisc, 9 - ) - ) - ) - ) - .addElement( - 'H', - ofBlock( - ModBlocks.blockCasingsMisc, 8 - ) - ) - .addElement( - 'G', - ofBlock( - ModBlocks.blockCasings3Misc, 15 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 2, 3, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - return checkPiece(mName, 2, 3, 0) && mCasing >= 40 && checkHatch(); - } - - public final boolean addMassFabricatorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiMassFabricator; - } - - @Override - public int getAmountOfOutputs() { - return 10; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_MassFabricator(this.mName); - } - - public boolean doesHatchContainUUA() { - if (mUU[0] == null) { - mUU[0] = Materials.UUAmplifier.getFluid(100); - } - if (mUU[1] == null) { - mUU[1] = Materials.UUMatter.getFluid(100); - } - - if (mUU[0] != null && mUU[1] != null) { - for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { - if (g.getFluid() != null) { - if (g.mFluid.isFluidEqual(mUU[0])) { - return true; - } - } - } - } - - return false; - } - - - /** - * Special Recipe Handling - */ - - - @Override - public GT_Recipe_Map getRecipeMap() { - return this.mMode == MODE_SCRAP ? GT_Recipe_Map.sRecyclerRecipes : GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes; - //return Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes; - } - - @Override - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll) { - - if (this.mMode == MODE_SCRAP) { - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - GT_Recipe c = new GTPP_Recipe(false, new ItemStack[] { GT_Utility.copyAmount(1, aItemInputs[0]) }, - GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aItemInputs[0]), 0) == null ? null - : new ItemStack[] { ItemList.IC2_Scrap.get(1) }, - null, new int[] { 2000 }, null, null, 100, - (int) gregtech.api.enums.GT_Values.V[2], 0); - - // EU discount - float tRecipeEUt = (c.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - - int parallelRecipes = 0; - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!c.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - this.mEUt = (int) gregtech.api.enums.GT_Values.V[tTier]; - this.mMaxProgresstime = 10; - return true; - } - - return super.checkRecipeGeneric(c, getMaxParallelRecipes(), getEuDiscountForParallelism(), aSpeedBonusPercent, aOutputChanceRoll, true); - } - - //Return normal Recipe handling - return super.checkRecipeGeneric(aItemInputs, aFluidInputs, getMaxParallelRecipes(), getEuDiscountForParallelism(), aSpeedBonusPercent, aOutputChanceRoll, true); - } - - @Override - public int getMaxParallelRecipes() { - return this.mMode == MODE_SCRAP ? 32 : 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage()))); - } - - @Override - public int getEuDiscountForParallelism() { - return 80; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - int aMode = this.mMode + 1; - if (aMode > 1) { - this.mMode = MODE_UU; - PlayerUtils.messagePlayer(aPlayer, "Mode ["+this.mMode+"]: Matter/AmpliFabricator"); - } - else if (aMode == 1) { - this.mMode = MODE_SCRAP; - PlayerUtils.messagePlayer(aPlayer, "Mode ["+this.mMode+"]: Recycler"); - } - else { - this.mMode = MODE_SCRAP; - PlayerUtils.messagePlayer(aPlayer, "Mode ["+this.mMode+"]: Recycler"); - } - GT_Recipe_Map r = this.getRecipeMap(); - final Collection x = r.mRecipeList; - Logger.INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug. size: "+x.size()); - for (final GT_Recipe newBo : x) { - Logger.INFO("========================"); - Logger.INFO("Dumping Input: " + ItemUtils.getArrayStackNames(newBo.mInputs)); - Logger.INFO("Dumping Inputs " + ItemUtils.getFluidArrayStackNames(newBo.mFluidInputs)); - Logger.INFO("Dumping Duration: " + newBo.mDuration); - Logger.INFO("Dumping EU/t: " + newBo.mEUt); - Logger.INFO("Dumping Output: " + ItemUtils.getArrayStackNames(newBo.mOutputs)); - Logger.INFO("Dumping Output: " + ItemUtils.getFluidArrayStackNames(newBo.mFluidOutputs)); - Logger.INFO("========================"); - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mScrapProduced", mScrapProduced); - aNBT.setInteger("mAmplifierProduced", mAmplifierProduced); - aNBT.setInteger("mMatterProduced", mMatterProduced); - aNBT.setInteger("mScrapUsed", mScrapUsed); - aNBT.setInteger("mAmplifierUsed", mAmplifierUsed); - aNBT.setInteger("mMode", mMode); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - mScrapProduced = aNBT.getInteger("mScrapProduced"); - mAmplifierProduced = aNBT.getInteger("mAmplifierProduced"); - mMatterProduced = aNBT.getInteger("mMatterProduced"); - mScrapUsed = aNBT.getInteger("mScrapUsed"); - mAmplifierUsed = aNBT.getInteger("mAmplifierUsed"); - mMode = aNBT.getInteger("mMode"); - super.loadNBTData(aNBT); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java deleted file mode 100644 index f86ecf3196..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java +++ /dev/null @@ -1,238 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.item.ItemStack; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase { - - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_Refinery(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_Refinery(final String aName) { - super(aName); - } - - @Override - public String getMachineType() { - return "Fuel Refinery"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Fission Fuel Processing Unit") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(3, 9, 3, false) - .addController("Bottom Center") - .addCasingInfo("Hastelloy-X Structural Casing", 7) - .addCasingInfo("Incoloy-DS Fluid Containment Block", 5) - .addCasingInfo("Zeron-100 Reactor Shielding", 4) - .addCasingInfo("Hastelloy-N Sealant Blocks", 17) - .addInputHatch("Base platform", 1) - .addOutputHatch("Base platform", 1) - .addOutputBus("Base platform", 1) - .addMufflerHatch("Base platform", 1) - .addMaintenanceHatch("Base platform", 1) - .addEnergyHatch("Base platform", 1) - .addStructureInfo("Muffler's Tier must be LuV+") - .addStructureInfo("4x Input Hatches, 2x Output Hatches, 1x Output Bus") - .addStructureInfo("1x Muffler, 1x Maintenance Hatch, 1x Energy Hatch") - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(18)), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(18))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return "MatterFabricator"; - } - - @Override - public GT_Recipe_Map getRecipeMap() { - return GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing; - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - //this.resetRecipeMapForAllInputHatches(); - for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { - g.mRecipeMap = null; - } - boolean ab = super.checkRecipeGeneric(); - //Logger.INFO("Did Recipe? "+ab); - return ab; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - public final boolean addRefineryList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 6) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {" ", " N ", " "}, - {" N ", "NIN", " N "}, - {" N ", "NIN", " N "}, - {" N ", "NIN", " N "}, - {" Z ", "ZIZ", " Z "}, - {" N ", "NIN", " N "}, - {"XXX", "XXX", "XXX"}, - {"X~X", "XXX", "XXX"}, - })) - .addElement( - 'X', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_Refinery::addRefineryList, TAE.GTPP_INDEX(18), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 2 - ) - ) - ) - ) - .addElement( - 'I', - ofBlock( - ModBlocks.blockCasings2Misc, 3 - ) - ) - .addElement( - 'N', - ofBlock( - ModBlocks.blockCasings2Misc, 1 - ) - ) - .addElement( - 'Z', - ofBlock( - ModBlocks.blockCasingsMisc, 13 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 7, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - if (checkPiece(mName, 1, 7, 0) && mCasing >= 7) { - if (this.mInputHatches.size() == 4 && this.mOutputHatches.size() == 2 && - this.mOutputBusses.size() == 1 && this.mMufflerHatches.size() == 1 && - this.mMaintenanceHatches.size() == 1 && this.mEnergyHatches.size() == 1) { - this.resetRecipeMapForAllInputHatches(this.getRecipeMap()); - return true; - } - } - return false; - } - - @Override - public boolean isCorrectMachinePart(final ItemStack aStack) { - return true; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiRefinery; - } - - @Override - public int getDamageToComponent(final ItemStack aStack) { - return 0; - } - - public int getAmountOfOutputs() { - return 5; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_Refinery(this.mName); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java deleted file mode 100644 index d42b33a403..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java +++ /dev/null @@ -1,702 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.tileentities.misc.TileEntitySolarHeater; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class GregtechMetaTileEntity_SolarTower -extends GregtechMeta_MultiBlockBase { - - //862 - private static final int mCasingTextureID = TAE.getIndexFromPage(3, 4); - public static String mCasingName = ""; - private int mHeight = 0; - private int mHeatLevel = 0; - - public GregtechMetaTileEntity_SolarTower(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 4); - } - - public GregtechMetaTileEntity_SolarTower(final String aName) { - super(aName); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 4); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_SolarTower(this.mName); - } - - @Override - public String getMachineType() { - return "Solar Tower"; - } - - @Override - public String[] getTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 4); - } - return new String[]{ - "Contributing Green Energy towards the future", - mCasingName+"s for the base of the tower", - }; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(212)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == 0 || aSide == 1) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 6)), - new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 6))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return aFacing <= 1; - } - - private Set mCachedReflectors = new HashSet(); - - public Set getConnectedSolarReflectors(){ - Set mValidTilePositions = new HashSet(); - IGregTechTileEntity tTileEntity; - Map mFastMap = new HashMap(); - for (int x = -64; x <= 64; x++) { - for (int z = -64; z <= 64; z++) { - int aX, aY, aZ; - aX = this.getBaseMetaTileEntity().getXCoord(); - aY = this.mHeight; - aZ = this.getBaseMetaTileEntity().getZCoord(); - BlockPos b = new BlockPos(aX+x, aY, aZ+z, this.getBaseMetaTileEntity().getWorld()); - - tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(aX + x, this.mHeight, aZ + z); - if (tTileEntity == null) { - continue; - } - else { - Logger.INFO("Found Tile Entity at "+b.getLocationString()); - if (tTileEntity.getMetaTileEntity() instanceof TileEntitySolarHeater) { - TileEntitySolarHeater mTile = (TileEntitySolarHeater) tTileEntity.getMetaTileEntity(); - if (mTile != null) { - b = new BlockPos(tTileEntity.getXCoord(), tTileEntity.getYCoord(), tTileEntity.getZCoord(), tTileEntity.getWorld()); - if (!mTile.mHasTower || mTile.mSolarTower == null) { - Logger.INFO("Found Solar Reflector, Injecting Data."); - mTile.setSolarTower(b); - } - mFastMap.put(b.getUniqueIdentifier(), b); - } - } - else { - continue; - } - } - - if (addToMachineList(tTileEntity, mCasingTextureID)) { - continue; - } - } - } - - for (BlockPos p : mFastMap.values()) { - if (mValidTilePositions.add(p.getUniqueIdentifier())); - } - mCachedReflectors = mValidTilePositions; - return mCachedReflectors; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - //this.mEfficiencyIncrease = 100; - //this.mMaxProgresstime = 100; - //this.mEUt = -4; - return true; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public void startProcess() { - this.sendLoopStart((byte) 1); - } - - @Override - public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - this.mHeight = 0; - for (int i = 0; i <= 19; i++) { - if (!checkLayer(i)) { - Logger.INFO("Invalid Structure on Y level "+i); - return false; - } - } - if (mMaintenanceHatches.size() != 1) { - Logger.INFO("Bad Hatches"); - return false; - } - - this.mHeight = this.getBaseMetaTileEntity().getYCoord() - 19; - Logger.INFO("Built Structure"); - if (!aBaseMetaTileEntity.getWorld().isRemote) - getConnectedSolarReflectors(); - return true; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 0; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings4Misc; - } - - - public byte getCasingMeta() { - return 4; - } - - - public byte getCasingMeta2() { - return 5; - } - - - public byte getCasingMeta3() { - return 6; - } - - public boolean isValidCasingBlock(Block aBlock, int aMeta) { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta()) { - return true; - } - if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { - return true; - } - if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { - return true; - } - Logger.INFO("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + "With Meta "+aMeta); - return false; - } - - public byte getCasingTextureIndex() { - return (byte) mCasingTextureID; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (this.mHeight > 3) {} - - - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setInteger("mHeight", mHeight); - aNBT.setInteger("mHeatLevel", mHeatLevel); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mHeight = aNBT.getInteger("mHeight"); - mHeatLevel = aNBT.getInteger("mHeatLevel"); - } - - public boolean checkLayer(int aY) { - if (aY >= 0 && aY <= 6) { - return checkTopLayers(-aY); - } - if (aY >= 7 && aY <= 16) { - return checkTowerLayer(-aY); - } - else if (aY >= 17 && aY <= 19) { - return checkBaseLayer(-aY); - } - Logger.INFO("Bad Y level to check"); - return false; - } - - public boolean checkTopLayers(int aY) { - Block aBlock; - int aMeta; - - if (aY == 0) { - return true; - } else if (aY == -1) { - for (int x = -1; x <= 1; x++) { - for (int z = -1; z <= 1; z++) { - aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - } else if (aY == -2 || aY == -6) { - for (int x = -2; x <= 2; x++) { - for (int z = -2; z <= 2; z++) { - aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - //Edge Casing - if (x == -2 || x == 2 || z == -2 || z == 2) { - //Edge Corners - if ((x == 2 || x == -2) && (z == 2 | z == -2)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - else { - continue; - } - } - else { - //Edge Sides - if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - - //Internal - else { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - } - } - //Top Layers 7x7 - else if (aY == -3 || aY == -5) { - for (int x = -3; x <= 3; x++) { - for (int z = -3; z <= 3; z++) { - aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - //Edge Casing - if (x == -3 || x == 3 || z == -3 || z == 3) { - - //3, 3 - //2, 3 - //3, 2 - - //Air Spacing - if (x == 3 && (z == -3 || z == -2 || z == 2 || z == 3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - else { - continue; - } - } - else if (x == -3 && (z == -3 || z == -2 || z == 2 || z == 3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - else { - continue; - } - } - else if (z == 3 && (x == -3 || x == -2 || x == 2 || x == 3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - else { - continue; - } - } - else if (z == -3 && (x == -3 || x == -2 || x == 2 || x == 3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - else { - continue; - } - } - else { - //Edge Sides - if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - else if ((x == -2 || x == 2) & (z == -2 || z == 2)) { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - //Internal - else { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - } - } - //Midle Top Layer 9x9 - else if (aY == -4) { - //Check Inner 5x5 - for (int x = -2; x <= 2; x++) { - for (int z = -2; z <= 2; z++) { - if (getBaseMetaTileEntity().getBlockOffset(x, aY, z) != getCasingBlock() && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z) != getCasingMeta2()) { - Logger.INFO("Error at offset: X:" + x + ", Y:" + aY + ", Z:" + z); - return false; - } - else { - continue; - } - } - } - //Check Pos Sides - for (int z = -1; z <= -1; z++) { - if (getBaseMetaTileEntity().getBlockOffset(3, aY, z) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(3, aY, z) == getCasingMeta2()) { - continue; - } else if (getBaseMetaTileEntity().getBlockOffset(-3, aY, z) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(-3, aY, z) == getCasingMeta2()) { - continue; - } else { - Logger.INFO("1 Error at offset: X:3/-3" + ", Y:" + aY + ", Z:" + z); - return false; - } - - } - for (int x = -1; x <= -1; x++) { - if (getBaseMetaTileEntity().getBlockOffset(x, aY, 3) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, 3) == getCasingMeta2()) { - continue; - } else if (getBaseMetaTileEntity().getBlockOffset(x, aY, -3) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, -3) == getCasingMeta2()) { - continue; - } else { - Logger.INFO("1 Error at offset: X:" + x + ", Y:" + aY + ", Z:3/-3"); - return false; - } - } - - //Corner Casings - for (int z = -2; z <= -2; z++) { - if (z == -2 || z == 2) { - if (getBaseMetaTileEntity().getBlockOffset(3, aY, z) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(3, aY, z) == getCasingMeta3()) { - continue; - } else if (getBaseMetaTileEntity().getBlockOffset(-3, aY, z) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(-3, aY, z) == getCasingMeta3()) { - continue; - } else { - Logger.INFO("2 Error at offset: X:3/-3" + ", Y:" + aY + ", Z:" + z); - return false; - } - } - } - for (int x = -2; x <= -2; x++) { - if (x == -2 || x == 2) { - if (getBaseMetaTileEntity().getBlockOffset(x, aY, 3) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, 3) == getCasingMeta3()) { - continue; - } else if (getBaseMetaTileEntity().getBlockOffset(x, aY, -3) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, -3) == getCasingMeta3()) { - continue; - } else { - Logger.INFO("2 Error at offset: X:" + x + ", Y:" + aY + ", Z:3/-3"); - return false; - } - } - } - //Check Sides Casings - for (int z = -1; z <= -1; z++) { - if (getBaseMetaTileEntity().getBlockOffset(4, aY, z) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(4, aY, z) == getCasingMeta3()) { - continue; - } else if (getBaseMetaTileEntity().getBlockOffset(-4, aY, z) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(-4, aY, z) == getCasingMeta3()) { - continue; - } else { - Logger.INFO("1 Error at offset: X:3/-3" + ", Y:" + aY + ", Z:" + z); - return false; - } - - } - for (int x = -1; x <= -1; x++) { - if (getBaseMetaTileEntity().getBlockOffset(x, aY, 4) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, 4) == getCasingMeta3()) { - continue; - } else if (getBaseMetaTileEntity().getBlockOffset(x, aY, -4) == getCasingBlock() - && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, -4) == getCasingMeta3()) { - continue; - } else { - Logger.INFO("1 Error at offset: X:" + x + ", Y:" + aY + ", Z:3/-3"); - return false; - } - } - } - return true; - } - - public boolean checkTowerLayer(int aY) { - Block aBlock; - int aMeta; - for (int x = -1; x <= 1; x++) { - for (int z = -1; z <= 1; z++) { - aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - if (x == -1 || x == 1 || z == -1 || z == 1) { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block Externally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } else { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - } - return true; - } - - public boolean checkBaseLayer(int aY) { - Block aBlock; - int aMeta; - - int requiredMeta = getCasingMeta2(); - if (aY == -19) { - requiredMeta = getCasingMeta(); - } - - for (int x = -3; x <= 3; x++) { - for (int z = -3; z <= 3; z++) { - aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - - if ((x == 3 && z == 3) || (x == 2 && z == 2) || (x == 3 && z == 2) || (x == 2 && z == 3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - return false; - } - } - else if ((x == -3 && z == -3) || (x == -2 && z == -2) || (x == -3 && z == -2) || (x == -2 && z == -3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - return false; - } - } - else if ((x == -3 && z == 3) || (x == -2 && z == 2) || (x == -3 && z == 2) || (x == -2 && z == 3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - return false; - } - } - else if ((x == 3 && z == -3) || (x == 2 && z == -2) || (x == 3 && z == -2) || (x == 2 && z == -3)) { - if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - return false; - } - } - else { - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); - if (addToMachineList(tTileEntity, mCasingTextureID)) { - continue; - } - if (x == 0 && z == 0) { - if (aBlock == getCasingBlock() && aMeta == requiredMeta) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - else { - if (aBlock == getCasingBlock() && aMeta == getCasingMeta()) { - continue; - } else { - Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); - Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); - return false; - } - } - } - } - } - return true; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - //Add Heat every second - if (aTick % 20 == 0) { - - //Add Heat First, if sources available - int aCacheSize = this.mCachedReflectors.size(); - if (aCacheSize > 0) { - int aCount = aCacheSize; - for (int i = 0; i < aCount; i++) { - this.mHeatLevel++; - } - } - - //Remove Heat, based on time of day - World w = this.getBaseMetaTileEntity().getWorld(); - if (w != null) { - int aRemovalFactor = 0; - if (w.isDaytime()) { - aRemovalFactor = 1; - } - else { - aRemovalFactor = 3; - } - for (int i = 0; i STRUCTURE_DEFINITION = null; - private int checkMeta; - - public GregtechMTE_AlgaePondBase(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMTE_AlgaePondBase(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMTE_AlgaePondBase(this.mName); - } - - @Override - public String getMachineType() { - return "Algae Pond"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Grows Algae!") - .addInfo("Controller Block for the Algae Farm") - .addInfo("Provide compost to boost production by one tier") - .addInfo("Does not require power or maintenance") - .addInfo("All Machine Casings must be the same tier, this dictates machine speed.") - .addInfo("Fill Input Hatch with water.") - .addPollutionAmount(getPollutionPerSecond(null)) - .addSeparator() - .beginStructureBlock(9, 3, 9, true) - .addController("Front Center") - .addCasingInfo("Machine Casings", 64) - .addCasingInfo("Sterile Farm Casings", 34) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - public void setMeta(int meta) { - checkMeta = meta; - } - - public int getMeta() { - return checkMeta; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"XXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, - {"XXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, - {"CCCC~CCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMTE_AlgaePondBase::addAlgaePondBaseList, TAE.getIndexFromPage(1, 15), 1 - ), - onElementPass( - x -> ++x.mCasing, - addTieredBlock( - GregTech_API.sBlockCasings1, GregtechMTE_AlgaePondBase::setMeta, GregtechMTE_AlgaePondBase::getMeta, 10 - ) - ) - ) - ) - .addElement( - 'X', - ofBlock( - ModBlocks.blockCasings2Misc, 15 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 4, 2, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mLevel = 0; - checkMeta = 0; - if (checkPiece(mName, 4, 2, 0) && mCasing >= 64 && checkMeta > 0) { - mLevel = checkMeta - 1; - return true; - } - return false; - } - - public final boolean addAlgaePondBaseList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - }else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - protected IAlignmentLimits getInitialAlignmentLimits() { - // fuck - return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(207)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - - int aID = TAE.getIndexFromPage(1, 15); - if (mLevel > -1) { - aID = mLevel; - } - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID)}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - @Override - public int getMaxParallelRecipes() { - return 2; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - public boolean checkForWater() { - - // Get Facing direction - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int mCurrentDirectionX; - int mCurrentDirectionZ; - int mOffsetX_Lower = 0; - int mOffsetX_Upper = 0; - int mOffsetZ_Lower = 0; - int mOffsetZ_Upper = 0; - - mCurrentDirectionX = 4; - mCurrentDirectionZ = 4; - - mOffsetX_Lower = -4; - mOffsetX_Upper = 4; - mOffsetZ_Lower = -4; - mOffsetZ_Upper = 4; - - // if (aBaseMetaTileEntity.fac) - - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX - * mCurrentDirectionX; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ - * mCurrentDirectionZ; - - int tAmount = 0; - for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) { - for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { - for (int h = 0; h < 2; h++) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - // byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) { - if (this.getStoredFluids() != null) { - for (FluidStack stored : this.getStoredFluids()) { - if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) { - if (stored.amount >= 1000) { - // Utils.LOG_WARNING("Going to try swap an air block for water from inut bus."); - stored.amount -= 1000; - Block fluidUsed = Blocks.water; - aBaseMetaTileEntity.getWorld().setBlock( - aBaseMetaTileEntity.getXCoord() + xDir + i, - aBaseMetaTileEntity.getYCoord() + h, - aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed); - - } - } - } - } - } - tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - if (tBlock == Blocks.water || tBlock == Blocks.flowing_water) { - ++tAmount; - // Logger.INFO("Found Water"); - } - } - } - } - - boolean isValidWater = tAmount >= 60; - - if (isValidWater) { - Logger.INFO("Filled structure."); - return true; - } - else { - return false; - } - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiAlgaePond; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - this.fixAllMaintenanceIssue(); - // Silly Client Syncing - if (aBaseMetaTileEntity.isClientSide()) { - this.mLevel = getCasingTier(); - } - - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); - } - - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { - - if (this.mLevel < 0) { - Logger.INFO("Bad Tier."); - return false; - } - - if (!checkForWater()) { - Logger.INFO("Not enough Water."); - return false; - } - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - Logger.INFO("Running checkRecipeGeneric(0)"); - - GT_Recipe tRecipe = RecipeLoader_AlgaeFarm.getTieredRecipeFromCache(this.mLevel, isUsingCompost(aItemInputs)); - - this.mLastRecipe = tRecipe; - - if (tRecipe == null) { - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - return false; - } - if (tRecipe.mInputs.length > 0) { - for (ItemStack aInputToConsume : tRecipe.mInputs) { - this.depleteInput(aInputToConsume); - } - } - - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - this.mMaxProgresstime = (int)(tRecipe.mDuration); - this.mEUt = 0; - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - Logger.INFO("Recipe time: "+this.mMaxProgresstime); - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= aMaxParallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < aMaxParallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - Logger.INFO("GOOD RETURN - 1"); - return true; - - } - - private boolean isUsingCompost(ItemStack[] aItemInputs) { - ItemStack aCompost = ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1); - for (ItemStack i : aItemInputs) { - if (GT_Utility.areStacksEqual(aCompost, i)) { - if (i.stackSize >= 8) { - return true; - } - } - } - return false; - } - - - private int getCasingTier() { - if (this.getBaseMetaTileEntity().getWorld() == null) { - return 0; - } - try { - Block aInitStructureCheck; - int aInitStructureCheckMeta; - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(xDir, -1, zDir); - aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, zDir); - if (aInitStructureCheck == GregTech_API.sBlockCasings1) { - return aInitStructureCheckMeta; - } - return 0; - } - catch (Throwable t) { - t.printStackTrace(); - return 0; - } - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java deleted file mode 100644 index 018120d614..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; - -import gregtech.api.enums.TAE; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.Material; - -public class GregtechMetaTileEntity_BedrockMiningPlatform1 extends GregtechMetaTileEntity_BedrockMiningPlatformBase { - public GregtechMetaTileEntity_BedrockMiningPlatform1(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_BedrockMiningPlatform1(final String aName) { - super(aName); - } - - public String[] getTooltip() { - return this.getDescriptionInternal("I"); - } - - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (IMetaTileEntity) new GregtechMetaTileEntity_BedrockMiningPlatform1(this.mName); - } - - protected Material getFrameMaterial() { - return ALLOY.INCONEL_690; - } - - protected int getCasingTextureIndex() { - return TAE.getIndexFromPage(0, 14); - } - - protected int getRadiusInChunks() { - return 9; - } - - protected int getMinTier() { - return 5; - } - - protected int getBaseProgressTime() { - return (int) (420*(this.mProductionModifier/100)); - } -}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java deleted file mode 100644 index 6b97cb7ee2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; - -public class GregtechMetaTileEntity_BedrockMiningPlatform2 extends GregtechMetaTileEntity_BedrockMiningPlatformBase { - public GregtechMetaTileEntity_BedrockMiningPlatform2(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_BedrockMiningPlatform2(final String aName) { - super(aName); - } - - public String[] getTooltip() { - return this.getDescriptionInternal("II"); - } - - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (IMetaTileEntity) new GregtechMetaTileEntity_BedrockMiningPlatform2(this.mName); - } - - protected Material getFrameMaterial() { - return ELEMENT.getInstance().AMERICIUM241; - } - - protected int getCasingTextureIndex() { - return 62; - } - - protected int getRadiusInChunks() { - return 9; - } - - protected int getMinTier() { - return 5; - } - - protected int getBaseProgressTime() { - return 480; - } -}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java deleted file mode 100644 index 05a05d53e0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java +++ /dev/null @@ -1,683 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Worldgen_GT_Ore_Layer; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MiningUtils; -import gtPlusPlus.core.util.minecraft.OreDictUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.block.Block; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.oredict.OreDictionary; - -public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends GregtechMeta_MultiBlockBase { - - protected double mProductionModifier = 0; - - - private static final ItemStack miningPipe; - private static final ItemStack miningPipeTip; - - private Block casingBlock; - private int casingMeta; - // private int frameMeta; - private int casingTextureIndex; - - private ForgeDirection back; - - private int xDrill; - private int yDrill; - private int zDrill; - - private int[] xCenter = new int[5]; - private int[] zCenter = new int[5]; - - public GregtechMetaTileEntity_BedrockMiningPlatformBase(final int aID, final String aName, - final String aNameRegional) { - super(aID, aName, aNameRegional); - this.initFields(); - } - - public GregtechMetaTileEntity_BedrockMiningPlatformBase(final String aName) { - super(aName); - this.initFields(); - } - - private void initFields() { - this.casingBlock = this.getCasingBlockItem().getBlock(); - this.casingMeta = this.getCasingBlockItem().get(0L, new Object[0]).getItemDamage(); - this.casingTextureIndex = this.getCasingTextureIndex(); - } - - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(this.casingTextureIndex), - new GT_RenderedTexture( - (IIconContainer) (aActive ? Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE - : Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)) }; - } - return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(this.casingTextureIndex) }; - } - - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), - "OreDrillingPlant.png"); - } - - - public int getAmountOfOutputs() { - return 1; - } - - public void saveNBTData(final NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setDouble("mProductionModifier", mProductionModifier); - } - - public void loadNBTData(final NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - this.mProductionModifier = aNBT.getDouble("mProductionModifier"); - } - - public boolean checkRecipe(final ItemStack aStack) { - //this.setElectricityStats(); - - - if (true) { - return false; - } - - boolean[] didWork = new boolean[5]; - - if (!this.tryConsumeDrillingFluid()) { - Logger.INFO("No drilling Fluid."); - return false; - } - - if (MathUtils.isNumberEven((int) this.mProductionModifier)) { - if (!this.tryConsumePyrotheum()) { - Logger.INFO("No tryConsumePyrotheum Fluid."); - return false; - } - else { - mProductionModifier++; - } - } - else { - if (!this.tryConsumeCryotheum()) { - Logger.INFO("No tryConsumeCryotheum Fluid."); - return false; - } - else { - mProductionModifier++; - } - } - - for (int i = 0; i < 5; i++) { - process(); - didWork[i] = true; - } - - // Fail recipe handling if one pipe didn't handle properly, to try again - // next run. - for (boolean y : didWork) { - if (!y) { - Logger.INFO("[Bedrock Miner] Fail [x]"); - return false; - } - } - - this.mEUt = -8000; - this.mMaxProgresstime = 1; - this.mEfficiencyIncrease = 10000; - - return true; - } - - private boolean isEnergyEnough() { - long requiredEnergy = 512L + this.getMaxInputVoltage() * 4L; - for (final GT_MetaTileEntity_Hatch_Energy energyHatch : this.mEnergyHatches) { - requiredEnergy -= energyHatch.getEUVar(); - if (requiredEnergy <= 0L) { - return true; - } - } - return false; - } - - private void setElectricityStats() { - //this.mEfficiency = this.getCurrentEfficiency((ItemStack) null); - this.mEfficiencyIncrease = 10000; - final int overclock = 8 << GT_Utility.getTier(this.getMaxInputVoltage()); - //this.mEUt = -12 * overclock * overclock; - Logger.INFO("Trying to set EU to "+(12 * overclock * overclock)); - int mCombinedAvgTime = 0; - for (int g = 0; g < 5; g++) { - mCombinedAvgTime += this.getBaseProgressTime() / overclock; - } - Logger.INFO("Trying to set Max Time to "+(mCombinedAvgTime)); - //this.mMaxProgresstime = (mCombinedAvgTime / 5); - } - - private boolean tryConsumeDrillingFluid() { - boolean consumed = false; - boolean g = (this.getBaseMetaTileEntity().getWorld().getTotalWorldTime() % 2 == 0); - consumed = (g ? tryConsumePyrotheum() : tryConsumeCryotheum()); - if (consumed) { - //increaseProduction(g ? 2 : 1); - } - else { - //lowerProduction(g ? 5 : 3); - } - return consumed; - } - - private boolean tryConsumePyrotheum() { - return this.depleteInput(FluidUtils.getFluidStack("pyrotheum", 4)); - } - - private boolean tryConsumeCryotheum() { - return this.depleteInput(FluidUtils.getFluidStack("cryotheum", 4)); - } - - private void putMiningPipesFromInputsInController() { - final int maxPipes = 64; - if (this.isHasMiningPipes(maxPipes)) { - return; - } - ItemStack pipes = this.getStackInSlot(1); - for (final ItemStack storedItem : this.getStoredInputs()) { - if (!storedItem.isItemEqual(GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe)) { - continue; - } - if (pipes == null) { - this.setInventorySlotContents(1, - GT_Utility.copy(new Object[] { GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe })); - pipes = this.getStackInSlot(1); - } - if (pipes.stackSize == maxPipes) { - break; - } - final int needPipes = maxPipes - pipes.stackSize; - final int transferPipes = (storedItem.stackSize < needPipes) ? storedItem.stackSize : needPipes; - final ItemStack itemStack = pipes; - itemStack.stackSize += transferPipes; - final ItemStack itemStack2 = storedItem; - itemStack2.stackSize -= transferPipes; - } - this.updateSlots(); - } - - - - private boolean isHasMiningPipes(final int minCount) { - final ItemStack pipe = this.getStackInSlot(1); - return pipe != null && pipe.stackSize > minCount - 1 - && pipe.isItemEqual(GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe); - } - - public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - this.updateCoordinates(); - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - int tAmount = 0; - if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { - return false; - } else { - - Block aCasing = Block.getBlockFromItem(getCasingBlockItem().getItem()); - - for (int i = -1; i < 2; ++i) { - for (int j = -1; j < 2; ++j) { - for (int h = -1; h < 2; ++h) { - if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, - h, zDir + j); - Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - - if (!this.addToMachineList(tTileEntity, 48)) { - if (aBlock != aCasing) { - Logger.INFO("Found Bad Casing"); - return false; - } - if (aMeta != 3) { - Logger.INFO("Found Bad Meta"); - return false; - } - } - ++tAmount; - - - - /*if (!isValidBlockForStructure(tTileEntity, 48, true, aBlock, aMeta, sBlockCasings4, 0)) { - Logger.INFO("Bad centrifuge casing"); - return false; - }*/ - - } - } - } - } - return tAmount >= 10; - } - - } - - private void updateCoordinates() { - this.xDrill = this.getBaseMetaTileEntity().getXCoord(); - this.yDrill = this.getBaseMetaTileEntity().getYCoord()-1; - this.zDrill = this.getBaseMetaTileEntity().getZCoord(); - this.back = ForgeDirection.getOrientation((int) this.getBaseMetaTileEntity().getBackFacing()); - - // Middle - this.xCenter[0] = this.xDrill + this.back.offsetX; - this.zCenter[0] = this.zDrill + this.back.offsetZ; - - this.xCenter[1] = xCenter[0] + 1; - this.zCenter[1] = zCenter[0]; - - this.xCenter[2] = xCenter[0] - 1; - this.zCenter[2] = zCenter[0]; - - this.xCenter[3] = xCenter[0]; - this.zCenter[3] = zCenter[0] + 1; - - this.xCenter[4] = xCenter[0]; - this.zCenter[4] = zCenter[0] - 1; - - } - - public boolean isCorrectMachinePart(final ItemStack aStack) { - return true; - } - - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - public int getPollutionPerTick(final ItemStack aStack) { - return 0; - } - - public int getDamageToComponent(final ItemStack aStack) { - return 0; - } - - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - protected GregtechItemList getCasingBlockItem() { - return GregtechItemList.Casing_BedrockMiner; - } - - protected abstract Material getFrameMaterial(); - - protected abstract int getCasingTextureIndex(); - - protected abstract int getRadiusInChunks(); - - protected abstract int getMinTier(); - - protected abstract int getBaseProgressTime(); - - protected String[] getDescriptionInternal(final String tierSuffix) { - final String casings = this.getCasingBlockItem().get(0L, new Object[0]).getDisplayName(); - return new String[] { - "Controller Block for the Experimental Deep Earth Drilling Platform - MK " - + ((tierSuffix != null) ? tierSuffix : ""), - "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", "3x1x3 Base of " + casings, - "1x3x1 " + casings + " pillar (Center of base)", - "1x3x1 " + this.getFrameMaterial().getLocalizedName() + " Frame Boxes (Each pillar side and on top)", - "2x Input Hatch (Any bottom layer casing)", - "1x Input Bus for mining pipes (Any bottom layer casing; not necessary)", - "1x Output Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", - "1x " + GT_Values.VN[this.getMinTier()] + "+ Energy Hatch (Any bottom layer casing)", - "Radius is " + (this.getRadiusInChunks() << 4) + " blocks", - "Every tick, this machine altenates betweem consumption of Pyrotheum & Cryotheum", - "Pyrotheum is used to bore through the Mantle of the world", - "Cryotheum is used to keep the internal components cool",}; - } - - static { - miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0L); - miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0L); - } - - - - - - - - - - - - - - - - - - - - - - - - - - private AutoMap mOutputs; - - public void process() { - ItemStack aOutput = generateOutputWithchance(); - if (aOutput != null) { - this.addOutput(aOutput); - Logger.INFO("Mined some "+aOutput.getDisplayName()); - } - this.updateSlots(); - } - - public ItemStack generateOutputWithchance() { - int aChance = MathUtils.randInt(0, 7500); - if (aChance < 100) { - return generateOutput(); - } - else { - return null; - } - } - - public ItemStack generateOutput() { - AutoMap aData = generateOreForOutput(); - int aMax = aData.size()-1; - return aData.get(MathUtils.randInt(0, aMax)); - } - - /** - * Here we generate valid ores and also a basic loot set - */ - - public AutoMap generateOreForOutput() { - - if (mOutputs != null) { - return mOutputs; - } - - AutoMap aOverWorldOres = MiningUtils.getOresForDim(0); - AutoMap aNetherOres = MiningUtils.getOresForDim(-1); - AutoMap aEndOres = MiningUtils.getOresForDim(1); - - AutoMap aTempMap = new AutoMap(); - Block tOreBlock = GregTech_API.sBlockOres1; - Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Initial]"); - - for (GT_Worldgen_GT_Ore_Layer layer : aOverWorldOres) { - if (layer.mEnabled) { - ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1); - ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1); - ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1); - ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1); - aTempMap.put(aTempOreStack1); - aTempMap.put(aTempOreStack2); - aTempMap.put(aTempOreStack3); - aTempMap.put(aTempOreStack4); - aTempMap.put(aTempOreStack1); - aTempMap.put(aTempOreStack2); - aTempMap.put(aTempOreStack3); - aTempMap.put(aTempOreStack4); - aTempMap.put(aTempOreStack1); - aTempMap.put(aTempOreStack2); - aTempMap.put(aTempOreStack3); - aTempMap.put(aTempOreStack4); - } - } - Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Overworld]"); - for (GT_Worldgen_GT_Ore_Layer layer : aNetherOres) { - if (layer.mEnabled) { - ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1); - ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1); - ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1); - ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1); - aTempMap.put(aTempOreStack1); - aTempMap.put(aTempOreStack2); - aTempMap.put(aTempOreStack3); - aTempMap.put(aTempOreStack4); - aTempMap.put(aTempOreStack1); - aTempMap.put(aTempOreStack2); - aTempMap.put(aTempOreStack3); - aTempMap.put(aTempOreStack4); - } - } - Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Nether]"); - for (GT_Worldgen_GT_Ore_Layer layer : aEndOres) { - if (layer.mEnabled) { - ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1); - ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1); - ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1); - ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1); - aTempMap.put(aTempOreStack1); - aTempMap.put(aTempOreStack2); - aTempMap.put(aTempOreStack3); - aTempMap.put(aTempOreStack4); - } - } - Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [End]"); - - addOreTypeToMap(ELEMENT.getInstance().IRON, 200, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().COPPER, 175, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().TIN, 150, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().GOLD, 150, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().SILVER, 110, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().NICKEL, 40, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().ZINC, 40, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().LEAD, 40, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().ALUMINIUM, 30, aTempMap); - addOreTypeToMap(ELEMENT.getInstance().THORIUM, 20, aTempMap); - Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Extra Common Ores]"); - - AutoMap> mMixedOreData = new AutoMap>(); - mMixedOreData.put(new Pair("oreRuby", 30)); - mMixedOreData.put(new Pair("oreSapphire", 25)); - mMixedOreData.put(new Pair("oreEmerald", 25)); - mMixedOreData.put(new Pair("oreLapis", 40)); - mMixedOreData.put(new Pair("oreRedstone", 40)); - - if (LoadedMods.Thaumcraft || (OreDictUtils.containsValidEntries("oreAmber") && OreDictUtils.containsValidEntries("oreCinnabar"))) { - mMixedOreData.put(new Pair("oreAmber", 20)); - mMixedOreData.put(new Pair("oreCinnabar", 20)); - } - if (LoadedMods.Railcraft || OreDictUtils.containsValidEntries("oreSaltpeter")) { - mMixedOreData.put(new Pair("oreSaltpeter", 10)); - } - if (LoadedMods.IndustrialCraft2 || OreDictUtils.containsValidEntries("oreUranium")) { - mMixedOreData.put(new Pair("oreUranium", 10)); - } - if (OreDictUtils.containsValidEntries("oreSulfur")) { - mMixedOreData.put(new Pair("oreSulfur", 15)); - } - if (OreDictUtils.containsValidEntries("oreSilicon")) { - mMixedOreData.put(new Pair("oreSilicon", 15)); - } - if (OreDictUtils.containsValidEntries("oreApatite")) { - mMixedOreData.put(new Pair("oreApatite", 25)); - } - - mMixedOreData.put(new Pair("oreFirestone", 2)); - mMixedOreData.put(new Pair("oreBismuth", 20)); - mMixedOreData.put(new Pair("oreLithium", 20)); - mMixedOreData.put(new Pair("oreManganese", 20)); - mMixedOreData.put(new Pair("oreBeryllium", 20)); - mMixedOreData.put(new Pair("oreCoal", 75)); - mMixedOreData.put(new Pair("oreLignite", 75)); - mMixedOreData.put(new Pair("oreSalt", 15)); - mMixedOreData.put(new Pair("oreCalcite", 15)); - mMixedOreData.put(new Pair("oreBauxite", 20)); - mMixedOreData.put(new Pair("oreAlmandine", 15)); - mMixedOreData.put(new Pair("oreGraphite", 25)); - mMixedOreData.put(new Pair("oreGlauconite", 15)); - mMixedOreData.put(new Pair("orePyrolusite", 15)); - mMixedOreData.put(new Pair("oreGrossular", 15)); - mMixedOreData.put(new Pair("oreTantalite", 15)); - - for (Pair g : mMixedOreData) { - for (int i=0; i aMyOreMaterials = new AutoMap(); - aMyOreMaterials.add(ORES.CROCROITE); - aMyOreMaterials.add(ORES.GEIKIELITE); - aMyOreMaterials.add(ORES.NICHROMITE); - aMyOreMaterials.add(ORES.TITANITE); - aMyOreMaterials.add(ORES.ZIMBABWEITE); - aMyOreMaterials.add(ORES.ZIRCONILITE); - aMyOreMaterials.add(ORES.GADOLINITE_CE); - aMyOreMaterials.add(ORES.GADOLINITE_Y); - aMyOreMaterials.add(ORES.LEPERSONNITE); - aMyOreMaterials.add(ORES.SAMARSKITE_Y); - aMyOreMaterials.add(ORES.SAMARSKITE_YB); - aMyOreMaterials.add(ORES.XENOTIME); - aMyOreMaterials.add(ORES.YTTRIAITE); - aMyOreMaterials.add(ORES.YTTRIALITE); - aMyOreMaterials.add(ORES.YTTROCERITE); - aMyOreMaterials.add(ORES.ZIRCON); - aMyOreMaterials.add(ORES.POLYCRASE); - aMyOreMaterials.add(ORES.ZIRCOPHYLLITE); - aMyOreMaterials.add(ORES.ZIRKELITE); - aMyOreMaterials.add(ORES.LANTHANITE_LA); - aMyOreMaterials.add(ORES.LANTHANITE_CE); - aMyOreMaterials.add(ORES.LANTHANITE_ND); - aMyOreMaterials.add(ORES.AGARDITE_Y); - aMyOreMaterials.add(ORES.AGARDITE_CD); - aMyOreMaterials.add(ORES.AGARDITE_LA); - aMyOreMaterials.add(ORES.AGARDITE_ND); - aMyOreMaterials.add(ORES.HIBONITE); - aMyOreMaterials.add(ORES.CERITE); - aMyOreMaterials.add(ORES.FLUORCAPHITE); - aMyOreMaterials.add(ORES.FLORENCITE); - aMyOreMaterials.add(ORES.CRYOLITE); - aMyOreMaterials.add(ORES.LAUTARITE); - aMyOreMaterials.add(ORES.LAFOSSAITE); - aMyOreMaterials.add(ORES.DEMICHELEITE_BR); - aMyOreMaterials.add(ORES.COMANCHEITE); - aMyOreMaterials.add(ORES.PERROUDITE); - aMyOreMaterials.add(ORES.HONEAITE); - aMyOreMaterials.add(ORES.ALBURNITE); - aMyOreMaterials.add(ORES.MIESSIITE); - aMyOreMaterials.add(ORES.KASHINITE); - aMyOreMaterials.add(ORES.IRARSITE); - aMyOreMaterials.add(ORES.RADIOBARITE); - aMyOreMaterials.add(ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT); - - for (Material aOreType : aMyOreMaterials) { - if (aOreType == ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT || aOreType == ORES.RADIOBARITE) { - addOreTypeToMap(aOreType, 4, aTempMap); - } - else { - addOreTypeToMap(aOreType, 7, aTempMap); - } - } - - //Cleanup Map - Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [GT++]"); - AutoMap aCleanUp = new AutoMap(); - for (ItemStack verify : aTempMap) { - if (!ItemUtils.checkForInvalidItems(verify)) { - aCleanUp.put(verify); - } - } - Logger.INFO("Cleanup Map contains "+aCleanUp.size()+" values."); - for (ItemStack remove : aCleanUp) { - aTempMap.remove(remove); - } - - //Generate Massive Map - AutoMap aFinalMap = new AutoMap(); - for (ItemStack aTempItem : aTempMap) { - int aTempMulti = MathUtils.randInt(20, 50); - for (int i=0;i aMap) { - for (int i=0; i STRUCTURE_DEFINITION = null; - - private ArrayList mCatalystBuses = new ArrayList(); - - private static final HashMap> mTieredBlockRegistry = new HashMap>(); - - public GregtechMTE_ChemicalPlant(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMTE_ChemicalPlant(final String aName) { - super(aName); - } - - public static boolean registerMachineCasingForTier(int aTier, Block aBlock, int aMeta, int aCasingTextureID) { - int aSize = mTieredBlockRegistry.size(); - int aSize2 = aSize; - Triplet aCasingData = new Triplet(aBlock, aMeta, aCasingTextureID); - if (mTieredBlockRegistry.containsKey(aTier)) { - CORE.crash("Tried to register a Machine casing for tier "+aTier+" to the Chemical Plant, however this tier already contains one."); - } - mTieredBlockRegistry.put(aTier, aCasingData); - aSize = mTieredBlockRegistry.size(); - return aSize > aSize2; - } - - private static int getCasingTextureIdForTier(int aTier) { - if (!mTieredBlockRegistry.containsKey(aTier)) { - return 10; - } - int aCasingID = mTieredBlockRegistry.get(aTier).getValue_3(); - //Logger.INFO("Found casing texture ID "+aCasingID+" for tier "+aTier); - return aCasingID; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMTE_ChemicalPlant(this.mName); - } - - @Override - public String getMachineType() { - return "Chemical Plant"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("Controller Block for the Chemical Plant") - .addInfo("Heavy Industry, now right at your doorstep!") - .addInfo("Please read the user manual for more information on construction and usage") - .addSeparator() - .addController("Bottom Center") - .addStructureHint("Catalyst Housing", 1) - .addInputBus("Bottom Casing", 1) - .addOutputBus("Bottom Casing", 1) - .addInputHatch("Bottom Casing", 1) - .addOutputHatch("Bottom Casing", 1) - .addEnergyHatch("Bottom Casing", 1) - .addMaintenanceHatch("Bottom Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - public void setMachineMeta(int meta) { - checkMachine = meta; - } - - public int getMachineMeta() { - return checkMachine; - } - - public void setPipeMeta(int meta) { - checkPipe = meta; - } - - public int getPipeMeta() { - return checkPipe; - } - - public void setCoilMeta(int meta) { - checkCoil = meta; - } - - public int getCoilMeta() { - return checkCoil; - } - - public int coilTier(int meta) { - switch (meta) { - case 0: return 1; - case 1: return 2; - case 2: return 3; - case 3: return 4; - case 4: return 5; - case 5: return 7; - case 6: return 8; - case 7: return 10; - case 8: return 11; - case 9: return 6; - case 10: return 9; - } - return 0; - } - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"}, - {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, - {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, - {"X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X"}, - {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, - {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, - {"CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMTE_ChemicalPlant::addChemicalPlantList, getCasingTextureID(), 1 - ), - onElementPass( - x -> {++x.checkCasing[0]; ++x.mCasing;}, - ofSolidCasing(0) - ), - onElementPass( - x -> {++x.checkCasing[1]; ++x.mCasing;}, - ofSolidCasing(1) - ), - onElementPass( - x -> {++x.checkCasing[2]; ++x.mCasing;}, - ofSolidCasing(2) - ), - onElementPass( - x -> {++x.checkCasing[3]; ++x.mCasing;}, - ofSolidCasing(3) - ), - onElementPass( - x -> {++x.checkCasing[4]; ++x.mCasing;}, - ofSolidCasing(4) - ), - onElementPass( - x -> {++x.checkCasing[5]; ++x.mCasing;}, - ofSolidCasing(5) - ), - onElementPass( - x -> {++x.checkCasing[6]; ++x.mCasing;}, - ofSolidCasing(6) - ), - onElementPass( - x -> {++x.checkCasing[7]; ++x.mCasing;}, - ofSolidCasing(7) - ) - ) - ) - .addElement( - 'X', - ofChain( - onElementPass( - x -> {++x.checkCasing[0]; ++x.mCasing;}, - ofSolidCasing(0) - ), - onElementPass( - x -> {++x.checkCasing[1]; ++x.mCasing;}, - ofSolidCasing(1) - ), - onElementPass( - x -> {++x.checkCasing[2]; ++x.mCasing;}, - ofSolidCasing(2) - ), - onElementPass( - x -> {++x.checkCasing[3]; ++x.mCasing;}, - ofSolidCasing(3) - ), - onElementPass( - x -> {++x.checkCasing[4]; ++x.mCasing;}, - ofSolidCasing(4) - ), - onElementPass( - x -> {++x.checkCasing[5]; ++x.mCasing;}, - ofSolidCasing(5) - ), - onElementPass( - x -> {++x.checkCasing[6]; ++x.mCasing;}, - ofSolidCasing(6) - ), - onElementPass( - x -> {++x.checkCasing[7]; ++x.mCasing;}, - ofSolidCasing(7) - ) - ) - ) - .addElement( - 'M', - addTieredBlock( - GregTech_API.sBlockCasings1, GregtechMTE_ChemicalPlant::setMachineMeta, GregtechMTE_ChemicalPlant::getMachineMeta, 10 - ) - ) - .addElement( - 'H', - addTieredBlock( - GregTech_API.sBlockCasings5, GregtechMTE_ChemicalPlant::setCoilMeta, GregtechMTE_ChemicalPlant::getCoilMeta, 11 - ) - ) - .addElement( - 'P', - addTieredBlock( - GregTech_API.sBlockCasings2, GregtechMTE_ChemicalPlant::setPipeMeta, GregtechMTE_ChemicalPlant::getPipeMeta, 12, 16 - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public static IStructureElement ofSolidCasing(int aIndex) { - return new IStructureElement() { - @Override - public boolean check(T t, World world, int x, int y, int z) { - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - Block target = mTieredBlockRegistry.get(aIndex).getValue_1(); - int targetMeta = mTieredBlockRegistry.get(aIndex).getValue_2(); - return target.equals(block) && meta == targetMeta; - } - - int getIndex(int size) { - if (size > 8) size = 8; - return size - 1; - } - - @Override - public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { - StructureLibAPI.hintParticle(world, x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2()); - return true; - } - - @Override - public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { - return world.setBlock(x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2(), 3); - } - }; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 3, 6, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - for (int i = 0; i < 8; i++) { - checkCasing[i] = 0; - } - checkCoil = 0; - checkPipe = 0; - checkMachine = 0; - mSolidCasingTier = 0; - mMachineCasingTier = 0; - mPipeCasingTier = 0; - mCoilTier = 0; - mCatalystBuses.clear(); - if (checkPiece(mName, 3, 6, 0) && mCasing >= 80) { - for (int i = 0; i < 8; i++) { - if (checkCasing[i] == mCasing) { - mSolidCasingTier = i; - } - else if (checkCasing[i] > 0) - return false; - } - mMachineCasingTier = checkMachine - 1; - mPipeCasingTier = checkPipe - 12; - mCoilTier = coilTier(checkCoil - 1); - updateHatchTexture(); - return mMachineCasingTier >= maxTierOfHatch; - } - return false; - } - - public void updateHatchTexture() { - for (GT_MetaTileEntity_Hatch h : mCatalystBuses) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mInputBusses) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mMaintenanceHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mEnergyHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mOutputBusses) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mInputHatches) h.updateTexture(getCasingTextureID()); - for (GT_MetaTileEntity_Hatch h : mOutputHatches) h.updateTexture(getCasingTextureID()); - } - - public final boolean addChemicalPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Catalysts){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier); - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - return false; - } - - @Override - public String getSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(207)); - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - - ITexture aOriginalTexture; - - // Check things exist client side (The worst code ever) - if (aBaseMetaTileEntity.getWorld() != null) { - - } - int aCasingID = getCasingTextureID(); - aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(aCasingID); - - if (aSide == aFacing) { - return new ITexture[]{aOriginalTexture, new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; - } - return new ITexture[]{aOriginalTexture}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - if (GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList.size() == 0) { - generateRecipes(); - } - return GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT; - } - - public static void generateRecipes() { - for (GT_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { - GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.add(i); - } - } - - @Override - public int getMaxParallelRecipes() { - return 2 * getPipeCasingTier(); - } - - @Override - public int getEuDiscountForParallelism() { - return 100; - } - - private int getSolidCasingTier() { - return this.mSolidCasingTier; - } - - private int getMachineCasingTier() { - return mMachineCasingTier; - } - - private int getPipeCasingTier() { - return mPipeCasingTier; - } - - private int getCasingTextureID() { - // Check the Tier Client Side - int aTier = mSolidCasingTier; - return getCasingTextureIdForTier(aTier); - } - - public boolean addToMachineList(IGregTechTileEntity aTileEntity) { - int aMaxTier = getMachineCasingTier(); - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { - GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity; - int aTileTier = aMachineBlock.mTier; - if (aTileTier > aMaxTier) { - log("Hatch tier too high."); - return false; - } - else { - return addToMachineList(aTileEntity, getCasingTextureID()); - } - } - else { - log("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know.. - return false; - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setInteger("mSolidCasingTier", this.mSolidCasingTier); - aNBT.setInteger("mMachineCasingTier", this.mMachineCasingTier); - aNBT.setInteger("mPipeCasingTier", this.mPipeCasingTier); - aNBT.setInteger("mCoilTier", this.mCoilTier); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mSolidCasingTier = aNBT.getInteger("mSolidCasingTier"); - mMachineCasingTier = aNBT.getInteger("mMachineCasingTier"); - mPipeCasingTier = aNBT.getInteger("mPipeCasingTier"); - mCoilTier = aNBT.getInteger("mCoilTier"); - } - - @Override - public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Catalysts) { - log("Found GT_MetaTileEntity_Hatch_Catalysts"); - return addToMachineListInternal(mCatalystBuses, aMetaTileEntity, aBaseCasingIndex); - } - return super.addToMachineList(aTileEntity, aBaseCasingIndex); - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 0; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - // Same speed bonus as pyro oven - public int getSpeedBonus() { - return 50 * (this.mCoilTier - 2); - } - - public int getMaxCatalystDurability() { - return 50; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate == 1 || this.mStartUpCheck == 1) { - this.mCatalystBuses.clear(); - } - } - // Silly Client Syncing - if (aBaseMetaTileEntity.isClientSide()) { - if (this != null && this.getBaseMetaTileEntity() != null && this.getBaseMetaTileEntity().getWorld() != null) { - this.mSolidCasingTier = getCasingTierOnClientSide(); - markDirty(); - } - } - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), getSpeedBonus()); - } - - - @Override - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) { - - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - long tEnergy = getMaxInputEnergy(); - log("Running checkRecipeGeneric(0)"); - - //GT_Recipe tRecipe = findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - GT_Recipe tRecipe = findRecipe(mLastRecipe, gregtech.api.enums.GT_Values.V[tTier], getSolidCasingTier(), aItemInputs, aFluidInputs); - - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - // checks if it has a catalyst - ItemStack tCatalystRecipe = findCatalyst(aItemInputs); - boolean aDoesRecipeNeedCatalyst = false; - for (ItemStack aInputItem : tRecipe.mInputs) { - if (ItemUtils.isCatalyst(aInputItem)) { - aDoesRecipeNeedCatalyst = true; - break; - } - } - if (aDoesRecipeNeedCatalyst) { - if (tCatalystRecipe == null) { - log("does not have catalyst"); - return false; - } - if (mCatalystBuses.size() != 1) { - log("does not have correct number of catalyst hatches. (Required 1, found "+mCatalystBuses.size()+")"); - return false; - } - } - - - log("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - - if (tRecipe.mSpecialValue > this.mSolidCasingTier) { - log("solid tier is too low"); - return false; - } - - aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); - if (aMaxParallelRecipes == 0) { - log("BAD RETURN - 2"); - return false; - } - - // checks if it has enough catalyst durability - ArrayListtCatalysts = null; - int tMaxParallelCatalyst = aMaxParallelRecipes; - if (tCatalystRecipe != null) { - tCatalysts = new ArrayList(); - tMaxParallelCatalyst = getCatalysts(aItemInputs, tCatalystRecipe, aMaxParallelRecipes, tCatalysts); - log("Can process "+tMaxParallelCatalyst+" recipes. If less than "+aMaxParallelRecipes+", catalyst does not have enough durability."); - } - - if (tMaxParallelCatalyst == 0) { - log("found not enough catalysts"); - return false; - } - - // EU discount - float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - float tTotalEUt = 0.0f; - log("aEUPercent "+aEUPercent); - log("mEUt "+tRecipe.mEUt); - - int parallelRecipes = 0; - - log("parallelRecipes: "+parallelRecipes); - log("aMaxParallelRecipes: "+tMaxParallelCatalyst); - log("tTotalEUt: "+tTotalEUt); - log("tVoltage: "+tVoltage); - log("tEnergy: "+tEnergy); - log("tRecipeEUt: "+tRecipeEUt); - // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits - for (; parallelRecipes < tMaxParallelCatalyst && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { - if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { - log("Broke at "+parallelRecipes+"."); - break; - } - log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); - tTotalEUt += tRecipeEUt; - } - - if (parallelRecipes == 0) { - log("BAD RETURN - 3"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - - - // Convert speed bonus to duration multiplier - // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. - aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); - float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); - this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); - - this.mEUt = (int)Math.ceil(tTotalEUt); - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); - } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - - - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - - // Collect fluid outputs - FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; - for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { - if (tRecipe.getFluidOutput(h) != null) { - tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); - tOutputFluids[h].amount *= parallelRecipes; - } - } - - // Collect output item types - ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int h = 0; h < tRecipe.mOutputs.length; h++) { - if (tRecipe.getOutput(h) != null) { - tOutputItems[h] = tRecipe.getOutput(h).copy(); - tOutputItems[h].stackSize = 0; - } - } - - // Set output item stack sizes (taking output chance into account) - for (int f = 0; f < tOutputItems.length; f++) { - if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { - for (int g = 0; g < parallelRecipes; g++) { - if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) - tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; - } - } - } - - tOutputItems = removeNulls(tOutputItems); - - // Sanitize item stack size, splitting any stacks greater than max stack size - List splitStacks = new ArrayList(); - for (ItemStack tItem : tOutputItems) { - while (tItem.getMaxStackSize() < tItem.stackSize) { - ItemStack tmp = tItem.copy(); - tmp.stackSize = tmp.getMaxStackSize(); - tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); - splitStacks.add(tmp); - } - } - - if (splitStacks.size() > 0) { - ItemStack[] tmp = new ItemStack[splitStacks.size()]; - tmp = splitStacks.toArray(tmp); - tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); - } - - // Strip empty stacks - List tSList = new ArrayList(); - for (ItemStack tS : tOutputItems) { - if (tS.stackSize > 0) tSList.add(tS); - } - tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); - - // Damage catalyst once all is said and done. - if (tCatalystRecipe != null) { - log("damaging catalyst"); - damageCatalyst(tCatalystRecipe, parallelRecipes); - } - - // Commit outputs - this.mOutputItems = tOutputItems; - this.mOutputFluids = tOutputFluids; - updateSlots(); - for (GT_MetaTileEntity_Hatch_Catalysts h : mCatalystBuses) { - h.updateSlots(); - h.tryFillUsageSlots(); - } - - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("GOOD RETURN - 1"); - return true; - } - - private static final HashMap> mTieredRecipeMap = new HashMap>(); - private static final AutoMap aTier0Recipes = new AutoMap(); - private static final AutoMap aTier1Recipes = new AutoMap(); - private static final AutoMap aTier2Recipes = new AutoMap(); - private static final AutoMap aTier3Recipes = new AutoMap(); - private static final AutoMap aTier4Recipes = new AutoMap(); - private static final AutoMap aTier5Recipes = new AutoMap(); - private static final AutoMap aTier6Recipes = new AutoMap(); - private static final AutoMap aTier7Recipes = new AutoMap(); - private static boolean mInitRecipeCache = false; - - private static void initRecipeCaches() { - if (!mInitRecipeCache) { - mTieredRecipeMap.put((long) 0, aTier0Recipes); - mTieredRecipeMap.put((long) 1, aTier1Recipes); - mTieredRecipeMap.put((long) 2, aTier2Recipes); - mTieredRecipeMap.put((long) 3, aTier3Recipes); - mTieredRecipeMap.put((long) 4, aTier4Recipes); - mTieredRecipeMap.put((long) 5, aTier5Recipes); - mTieredRecipeMap.put((long) 6, aTier6Recipes); - mTieredRecipeMap.put((long) 7, aTier7Recipes); - for (GT_Recipe aRecipe : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList) { - if (aRecipe != null) { - switch (aRecipe.mSpecialValue) { - case 0: - aTier0Recipes.add(aRecipe); - continue; - case 1: - aTier1Recipes.add(aRecipe); - continue; - case 2: - aTier2Recipes.add(aRecipe); - continue; - case 3: - aTier3Recipes.add(aRecipe); - continue; - case 4: - aTier4Recipes.add(aRecipe); - continue; - case 5: - aTier5Recipes.add(aRecipe); - continue; - case 6: - aTier6Recipes.add(aRecipe); - continue; - case 7: - aTier7Recipes.add(aRecipe); - continue; - } - } - } - mInitRecipeCache = true; - } - } - - private static boolean areInputsEqual(GT_Recipe aComparator, ItemStack[] aInputs, FluidStack[] aFluids) { - int aInputCount = aComparator.mInputs.length; - if (aInputCount > 0) { - //Logger.INFO("Looking for recipe with "+aInputCount+" Items"); - int aMatchingInputs = 0; - recipe : for (ItemStack a : aComparator.mInputs) { - for (ItemStack b : aInputs) { - if (a.getItem() == b.getItem()) { - if (a.getItemDamage() == b.getItemDamage()) { - //Logger.INFO("Found matching Item Input - "+b.getUnlocalizedName()); - aMatchingInputs++; - continue recipe; - } - } - } - } - if (aMatchingInputs != aInputCount) { - return false; - } - } - int aFluidInputCount = aComparator.mFluidInputs.length; - if (aFluidInputCount > 0) { - //Logger.INFO("Looking for recipe with "+aFluidInputCount+" Fluids"); - int aMatchingFluidInputs = 0; - recipe : for (FluidStack b : aComparator.mFluidInputs) { - //Logger.INFO("Checking for fluid "+b.getLocalizedName()); - for (FluidStack a : aFluids) { - if (GT_Utility.areFluidsEqual(a, b)) { - //Logger.INFO("Found matching Fluid Input - "+b.getLocalizedName()); - aMatchingFluidInputs++; - continue recipe; - } - else { - //Logger.INFO("Found fluid which did not match - "+a.getLocalizedName()); - } - } - } - if (aMatchingFluidInputs != aFluidInputCount) { - return false; - } - } - Logger.INFO("Recipes Match!"); - return true; - } - - public GT_Recipe findRecipe(final GT_Recipe aRecipe, final long aVoltage, final long aSpecialValue, ItemStack[] aInputs, final FluidStack[] aFluids) { - if (!mInitRecipeCache) { - initRecipeCaches(); - } - if (this.getRecipeMap().mRecipeList.isEmpty()) { - log("No Recipes in Map to search through."); - return null; - } - else { - log("Checking tier "+aSpecialValue+" recipes and below. Using Input Voltage of "+aVoltage+"V."); - log("We have "+aInputs.length+" Items and "+aFluids.length+" Fluids."); - // Try check the cached recipe first - if (aRecipe != null) { - if (areInputsEqual(aRecipe, aInputs, aFluids)) { - if (aRecipe.mEUt <= aVoltage) { - Logger.INFO("Using cached recipe."); - return aRecipe; - } - } - } - - // Get all recipes for the tier - AutoMap> aMasterMap = new AutoMap>(); - for (long i=0;i<=aSpecialValue;i++) { - aMasterMap.add(mTieredRecipeMap.get(i)); - } - GT_Recipe aFoundRecipe = null; - - // Iterate the tiers recipes until we find the one with all inputs matching - master : for (AutoMap aTieredMap : aMasterMap) { - for (GT_Recipe aRecipeToCheck : aTieredMap) { - if (areInputsEqual(aRecipeToCheck, aInputs, aFluids)) { - log("Found recipe with matching inputs!"); - if (aRecipeToCheck.mSpecialValue <= aSpecialValue) { - if (aRecipeToCheck.mEUt <= aVoltage) { - aFoundRecipe = aRecipeToCheck; - break master; - } - } - } - } - } - - // If we found a recipe, return it - if (aFoundRecipe != null) { - log("Found valid recipe."); - return aFoundRecipe; - } - } - log("Did not find valid recipe."); - return null; - } - - private int getCatalysts(ItemStack[] aItemInputs, ItemStack aRecipeCatalyst, int aMaxParrallel, ArrayList aOutPut) { - int allowedParallel = 0; - for (final ItemStack aInput : aItemInputs) { - if (aRecipeCatalyst.isItemEqual(aInput)) { - int aDurabilityRemaining = getMaxCatalystDurability() - getDamage(aInput); - return Math.min(aMaxParrallel, aDurabilityRemaining); - } - } - return allowedParallel; - } - - private ItemStack findCatalyst(ItemStack[] aItemInputs) { - if (aItemInputs != null) { - for (final ItemStack aInput : aItemInputs) { - if (aInput != null) { - if (ItemUtils.isCatalyst(aInput)) { - return aInput; - } - } - } - } - return null; - } - - - private void damageCatalyst(ItemStack aStack, int parallelRecipes) { - for (int i=0; i= getMaxCatalystDurability()) { - log("consume catalyst"); - addOutput(CI.getEmptyCatalyst(1)); - aStack.stackSize -= 1; - } - else { - log("damaging catalyst"); - setDamage(aStack, damage); - } - } - else { - log("not consuming catalyst"); - } - } - } - - private int getDamage(ItemStack aStack) { - return ItemGenericChemBase.getCatalystDamage(aStack); - } - - private void setDamage(ItemStack aStack,int aAmount) { - ItemGenericChemBase.setCatalystDamage(aStack, aAmount); - } - - @SideOnly(Side.CLIENT) - private final int getCasingTierOnClientSide() { - - if (this == null || this.getBaseMetaTileEntity().getWorld() == null) { - return 0; - } - try { - Block aInitStructureCheck; - int aInitStructureCheckMeta; - IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3; - if (xDir == 0) { - aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(zDir, 1, 0); - aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(zDir, 1, 0); - } - else { - aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, 1, xDir); - aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 1, xDir); - } - for (int aTier : mTieredBlockRegistry.keySet()) { - Triplet aData = mTieredBlockRegistry.get(aTier); - if (aData.getValue_1() == aInitStructureCheck && aData.getValue_2() == aInitStructureCheckMeta) { - return aTier; - } - } - return 0; - } - catch (Throwable t) { - t.printStackTrace(); - return 0; - } - } - - /* - * Catalyst Handling - */ - - @Override - public ArrayList getStoredInputs() { - ArrayList tItems = super.getStoredInputs(); - for (GT_MetaTileEntity_Hatch_Catalysts tHatch : mCatalystBuses) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch)) { - tItems.addAll(tHatch.getContentUsageSlots()); - } - } - return tItems; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java deleted file mode 100644 index f52f02b5de..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java +++ /dev/null @@ -1,179 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines; - -import java.util.ArrayList; - -import gregtech.GT_Mod; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTurbineBase { - - public boolean achievement = false; - private boolean looseFit=false; - - public GT_MTE_LargeTurbine_SHSteam(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MTE_LargeTurbine_SHSteam(String aName) { - super(aName); - } - - public String[] getTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 9); - } - return new String[]{ - "Controller Block for the XL High Pressure Steam Turbine", - "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Superheated Steam Input Hatch (Side centered)", - "1x Maintenance Hatch (Side centered)", - "1x Dynamo Hatch (Back centered)", - "1x Output Hatch for Steam (Side centered)", - mCasingName+"s for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor and fitting", - "Use screwdriver to adjust fitting of turbine"}; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MTE_LargeTurbine_SHSteam(mName); - } - - @Override - public Block getCasingBlock() { - return ModBlocks.blockCasings4Misc; - } - - @Override - public byte getCasingMeta() { - return 9; - } - - @Override - public byte getCasingTextureIndex() { - return 59; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { - if(looseFit) { - aOptFlow*=4; - if(aBaseEff>10000){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff=7500; - }else if(aBaseEff>7500){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff*=0.75f; - }else{ - aBaseEff*=0.75f; - } - } - int tEU = 0; - int totalFlow = 0; // Byproducts are based on actual flow - int flow = 0; - int remainingFlow = MathUtils.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. - this.realOptFlow = aOptFlow; - - storedFluid=0; - for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { - String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); - if (fluidName.equals("ic2.fluidSuperheatedSteam")) { - flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid += aFluids.get(i).amount; - remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches - totalFlow += flow; // track total input used - if (!achievement) { - try { - GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); - } catch (Exception e) { - } - achievement = true; - } - }else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){ - depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); - } - } - if(totalFlow<=0)return 0; - tEU = totalFlow; - addOutput(GT_ModHandler.getSteam(totalFlow)); - if (totalFlow != aOptFlow) { - float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); - //if(totalFlow>aOptFlow){efficiency = 1.0f;} - tEU *= efficiency; - tEU = Math.max(1, MathUtils.safeInt((long)tEU * (long)aBaseEff / 10000L)); - } else { - tEU = MathUtils.safeInt((long)tEU * (long)aBaseEff / 10000L); - } - - return tEU; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aSide == getBaseMetaTileEntity().getFrontFacing()) { - looseFit^=true; - GT_Utility.sendChatToPlayer(aPlayer, looseFit ? "Fitting: Loose - More Flow" : "Fitting: Tight - More Efficiency"); - } - super.onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return (looseFit && CORE.RANDOM.nextInt(4)==0)?0:1; - } - - @Override - public String[] getExtraInfoData() { - super.looseFit = looseFit; - return super.getInfoData(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("turbineFitting",looseFit); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - looseFit=aNBT.getBoolean("turbineFitting"); - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Large Super-heated Steam Turbine"; - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java deleted file mode 100644 index 2e6f6149e7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java +++ /dev/null @@ -1,189 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines; - -import static gtPlusPlus.core.lib.CORE.RANDOM; - -import java.util.ArrayList; - -import gregtech.GT_Mod; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.FluidStack; - -public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurbineBase { - - private float water; - private boolean achievement = false; - private boolean looseFit=false; - - public GT_MTE_LargeTurbine_Steam(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - - public GT_MTE_LargeTurbine_Steam(String aName) { - super(aName); - } - - public String[] getTooltip() { - if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 8); - } - return new String[]{ - "Controller Block for the XL Steam Turbine", - "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Steam Input Hatch (Side centered)", - "1x Maintenance Hatch (Side centered)", - "1x Dynamo Hatch (Back centered)", - "1x Output Hatch for Distilled Water (Side centered)", - mCasingName+"s for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor and fitting", - "Use screwdriver to adjust fitting of turbine"}; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MTE_LargeTurbine_Steam(mName); - } - - @Override - public Block getCasingBlock() { - return ModBlocks.blockCasings4Misc; - } - - @Override - public byte getCasingMeta() { - return 8; - } - - @Override - public byte getCasingTextureIndex() { - return 16; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - private int useWater(float input) { - water = water + input; - int usage = (int) water; - water = water - usage; - return usage; - } - - @Override - int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { - if(looseFit) { - aOptFlow*=4; - if(aBaseEff>10000){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff=7500; - }else if(aBaseEff>7500){ - aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); - aBaseEff*=0.75f; - }else{ - aBaseEff*=0.75f; - } - } - int tEU = 0; - int totalFlow = 0; // Byproducts are based on actual flow - int flow = 0; - int remainingFlow = MathUtils.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. - this.realOptFlow = aOptFlow; - - storedFluid=0; - for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals. - String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); - if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")) { - flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - this.storedFluid += aFluids.get(i).amount; - remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches - totalFlow += flow; // track total input used - if (!achievement) { - GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); - achievement = true; - } - }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){ - depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); - } - } - if(totalFlow<=0)return 0; - tEU = totalFlow; - int waterToOutput = useWater(totalFlow / 160.0f); - addOutput(GT_ModHandler.getDistilledWater(waterToOutput)); - if (totalFlow != aOptFlow) { - float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); - //if(totalFlow>aOptFlow){efficiency = 1.0f;} - tEU *= efficiency; - tEU = Math.max(1, MathUtils.safeInt((long)tEU * (long)aBaseEff / 20000L)); - } else { - tEU = MathUtils.safeInt((long)tEU * (long)aBaseEff / 20000L); - } - - return tEU; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aSide == getBaseMetaTileEntity().getFrontFacing()) { - looseFit^=true; - GT_Utility.sendChatToPlayer(aPlayer, looseFit ? "Fitting: Loose - More Flow" : "Fitting: Tight - More Efficiency"); - } - super.onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return (looseFit && RANDOM.nextInt(4)==0)?0:1; - } - - - @Override - public String[] getExtraInfoData() { - super.looseFit = looseFit; - return super.getInfoData(); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("turbineFitting",looseFit); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - looseFit=aNBT.getBoolean("turbineFitting"); - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public String getMachineType() { - return "Large Steam Turbine"; - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java deleted file mode 100644 index 9da724c6eb..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java +++ /dev/null @@ -1,663 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines; - -import java.util.ArrayList; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; - -public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechMeta_MultiBlockBase { - - protected int baseEff = 0; - protected int optFlow = 0; - protected double realOptFlow = 0; - protected int storedFluid = 0; - protected int counter = 0; - protected boolean looseFit=false; - - private final int mCasingTextureID; - public static String mCasingName; - - public ArrayList mTurbineRotorHatches = new ArrayList(); - - public GregtechMetaTileEntity_LargerTurbineBase(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); - mCasingTextureID = getTAE(); - GT9_5_Active = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFaceActive_4 : LargeTurbineTextureHandler.frontFaceHPActive_4; - GT9_5 = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFace_4 : LargeTurbineTextureHandler.frontFaceHP_4; - frontFaceActive = new GT_RenderedTexture(GT9_5_Active); - frontFace = new GT_RenderedTexture(GT9_5); - - } - public GregtechMetaTileEntity_LargerTurbineBase(String aName) { - super(aName); - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); - mCasingTextureID = getTAE(); - GT9_5_Active = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFaceActive_4 : LargeTurbineTextureHandler.frontFaceHPActive_4; - GT9_5 = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFace_4 : LargeTurbineTextureHandler.frontFaceHP_4; - frontFaceActive = new GT_RenderedTexture(GT9_5_Active); - frontFace = new GT_RenderedTexture(GT9_5); - } - - public final int getTAE() { - return TAE.getIndexFromPage(3, getCasingMeta()); - } - - public final String getCasingNaming() { - return ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return getMaxEfficiency(aStack) > 0; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png"); - } - - @Override - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - return checkMachine2(aBaseMetaTileEntity, aStack); - } - - public boolean checkMachine2(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - //9 high - //7x7 - - this.mDynamoHatches.clear(); - this.mTurbineRotorHatches.clear(); - this.mMaintenanceHatches.clear(); - this.mMufflerHatches.clear(); - this.mInputHatches.clear(); - this.mOutputHatches.clear(); - - for (int i=0;i>-9;i--) { - if (!getLayer(i)) { - Logger.INFO("Bad Layer: "+(+i)); - return false; - } - } - - Logger.INFO("Hatches | Found "+mTurbineRotorHatches.size()+" Rotor Assemblies, "+12+" are required."); - Logger.INFO("Hatches | Found "+mMaintenanceHatches.size()+" Maint. hatches, "+1+" are required."); - Logger.INFO("Hatches | Found "+mDynamoHatches.size()+" Dynamos, "+1+" or more are required."); - Logger.INFO("Hatches | Found "+mMufflerHatches.size()+" Mufflers, "+4+" are required."); - Logger.INFO("Hatches | Found "+mInputHatches.size()+" Input Hatches, "+1+" or more are required."); - Logger.INFO("Hatches | Found "+mOutputHatches.size()+" Output Hatches, "+1+" ore more are required."); - - if (mTurbineRotorHatches.size() != 12 || - mMaintenanceHatches.size() != 1 || - mDynamoHatches.size() < 1 || - mMufflerHatches.size() != 4 || - mInputHatches.size() < 1 || - mOutputHatches.size() < 1 - ) { - return false; - } - Logger.INFO("Built Structure"); - return true; - } - - - public boolean getLayer(int aY) { - if (aY == 0 || aY == -2 || aY == -3 || aY == -5 || aY == -6 || aY == -8) { - return checkNormalLayer(aY); - } - else { - return checkTurbineLayer(aY); - } - } - - public boolean checkNormalLayer(int aY) { - Block tBlock; - int tMeta; - for (int x = -3; x <= 3; x++) { - for (int z = -3; z <= 3; z++) { - tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - IGregTechTileEntity tTileEntity; - - if (aY == 0 && x == 0 && z == 0) { - continue; - } - else if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || - ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { - tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); - if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { - Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); - continue; - } - } - else if (isValidCasingBlock(tBlock, tMeta)) { - continue; - } else { - if (tBlock != null) { - log("Offset: "+x+", "+aY+", "+z); - log("Found "+tBlock.getLocalizedName()+" with Meta "+tMeta); - log("Expected "+getCasingBlock().getLocalizedName()+" with Meta "+getCasingMeta()); - } - return false; - } - } - } - return true; - } - - - public boolean checkTurbineLayer(int aY) { - if (!checkTurbineLayerX(aY)) { - return checkTurbineLayerZ(aY); - } - else { - return true; - } - } - - public boolean checkTurbineLayerX(int aY) { - Logger.INFO("checking X"); - Block tBlock; - int tMeta; - for (int x = -3; x <= 3; x++) { - for (int z = -3; z <= 3; z++) { - tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - - if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || - ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { - IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); - if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { - Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); - continue; - } - } - - - if (x == -2 || x == 2) { - - //Find Hatches on the ends - if (z == -3 || z == 3) { - IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); - if (this.addTurbineHatch(tTileEntity, this.mCasingTextureID)) { - log("Found x axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); - continue; - } - else { - log("Missing x axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); - } - } - - if (isValidTurbineBlock(tBlock, tMeta)) { - continue; - } - else { - return false; - } - } - else { - if (isValidCasingBlock(tBlock, tMeta)) { - continue; - } - else { - return false; - } - } - } - } - return true; - } - - public boolean checkTurbineLayerZ(int aY) { - Logger.INFO("checking Z"); - Block tBlock; - int tMeta; - for (int x = -3; x <= 3; x++) { - for (int z = -3; z <= 3; z++) { - tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); - tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - - if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || - ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { - IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); - if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { - Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); - continue; - } - } - - if (z == -2 || z == 2) { - - //Find Hatches on the ends - if (x == -3 || x == 3) { - IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); - if (this.addTurbineHatch(tTileEntity, this.mCasingTextureID)) { - log("Found z axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); - continue; - } - else { - log("Missing z axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); - } - } - - if (isValidTurbineBlock(tBlock, tMeta)) { - continue; - } - else { - return false; - } - } - else { - if (isValidCasingBlock(tBlock, tMeta)) { - continue; - } - else { - return false; - } - } - } - } - return true; - } - - public boolean isValidCasingBlock(Block aBlock, int aMeta) { - if (GregTech_API.sBlockMachines == aBlock) { - return true; - } - if (Block.isEqualTo(aBlock, getCasingBlock()) && (int) aMeta == (int) getCasingMeta()) { - return true; - } - log("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMeta()); - return false; - } - - public boolean isValidTurbineBlock(Block aBlock, int aMeta) { - if (aBlock == getCasingBlock() && aMeta == getCasingMetaTurbine()) { - return true; - } - log("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMetaTurbine()); - return false; - } - - public Block getCasingBlock() { - return ModBlocks.blockCasings4Misc; - } - - public abstract byte getCasingMeta(); - - public byte getCasingMetaTurbine() { - return 7; - } - - public abstract byte getCasingTextureIndex(); - - @Override - public boolean checkRecipe(ItemStack aStack) { - if((counter&7)==0 && (aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)) { - stopMachine(); - return false; - } - ArrayList tFluids = getStoredFluids(); - if (tFluids.size() > 0) { - if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() - || this.getBaseMetaTileEntity().hasInventoryBeenModified()) { - counter = 0; - baseEff = MathUtils.safeInt((long)((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); - optFlow = MathUtils.safeInt((long)Math.max(Float.MIN_NORMAL, - ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() - * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed - * 50)); - if(optFlow<=0 || baseEff<=0){ - stopMachine();//in case the turbine got removed - return false; - } - } else { - counter++; - } - } - else { - Logger.INFO("Did not find any valid input fluids."); - } - - int newPower = fluidIntoPower(tFluids, optFlow, baseEff); // How much the turbine should be producing with this flow - int difference = newPower - this.mEUt; // difference between current output and new output - - // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) - // This is how much the turbine can actually change during this tick - int maxChangeAllowed = Math.max(10, MathUtils.safeInt((long)Math.abs(difference)/100)); - - if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change - int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. - this.mEUt += change; // Apply the change - } else { - this.mEUt = newPower; - } - - if (this.mEUt <= 0) { - //stopMachine(); - this.mEUt=0; - this.mEfficiency=0; - return false; - } else { - this.mMaxProgresstime = 1; - this.mEfficiencyIncrease = 10; - if(this.mDynamoHatches.size()>0){ - for(GT_MetaTileEntity_Hatch dynamo:mDynamoHatches) - if(isValidMetaTileEntity(dynamo) && dynamo.maxEUOutput() < mEUt) - explodeMultiblock(); - } - return true; - } - } - - abstract int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff); - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 1; - } - - public int getMaxEfficiency(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) { - return 0; - } - if (aStack.getItem() instanceof GT_MetaGenerated_Tool_01) { - return 10000; - } - return 0; - } - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return true; - } - - @Override - public String[] getExtraInfoData() { - int mPollutionReduction=0; - for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - mPollutionReduction=Math.max(StaticFields59.calculatePollutionReducation(tHatch, 100),mPollutionReduction); - } - } - - String tRunning = mMaxProgresstime>0 ? - - EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.running.true")+EnumChatFormatting.RESET : - EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.running.false")+EnumChatFormatting.RESET; - String tMaintainance = getIdealStatus() == getRepairStatus() ? - EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.maintenance.false")+EnumChatFormatting.RESET : - EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.maintenance.true")+EnumChatFormatting.RESET ; - int tDura = 0; - - if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { - tDura = MathUtils.safeInt((long)(100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); - } - - long storedEnergy=0; - long maxEnergy=0; - for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { - if (isValidMetaTileEntity(tHatch)) { - storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); - } - } - String[] ret = new String[]{ - // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", */ -/* 1 *//* - - tMaintainance, */ -/* 2 *//* - - StatCollector.translateToLocal("GT5U.turbine.efficiency")+": "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", */ -/* 2 *//* - - StatCollector.translateToLocal("GT5U.multiblock.energy")+": " + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ */ -/* 3 *//* - - EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", - StatCollector.translateToLocal("GT5U.turbine.flow")+": "+EnumChatFormatting.YELLOW+MathUtils.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t" + */ -/* 4 *//* - - EnumChatFormatting.YELLOW+" ("+(looseFit?StatCollector.translateToLocal("GT5U.turbine.loose"):StatCollector.translateToLocal("GT5U.turbine.tight"))+")", */ -/* 5 *//* - - StatCollector.translateToLocal("GT5U.turbine.fuel")+": "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", */ -/* 6 *//* - - StatCollector.translateToLocal("GT5U.turbine.dmg")+": "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", */ -/* 7 *//* - - StatCollector.translateToLocal("GT5U.multiblock.pollution")+": "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" */ -/* 8 *//* - - }; - if (!this.getClass().getName().contains("Steam")) - ret[4]=StatCollector.translateToLocal("GT5U.turbine.flow")+": "+EnumChatFormatting.YELLOW+MathUtils.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t"; - return ret; - - - } - - @Override - public boolean isGivingInformation() { - return true; - } - - - public boolean polluteEnvironment(int aPollutionLevel) { - mPollution += aPollutionLevel; - for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (mPollution >= 1000) { - if (tHatch.polluteEnvironment()) { - mPollution -= 1000; - } - } else { - break; - } - } - } - return mPollution < 1000; - } - @Override - public long maxAmperesOut() { - return 16; - } - - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (!KeyboardUtils.isShiftKeyDown()) { - //super.onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); - } - else { - this.mIsAnimated = Utils.invertBoolean(mIsAnimated); - if (this.mIsAnimated) { - PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); - } - if (mTurbineRotorHatches.size() > 0) { - for (GT_MetaTileEntity_Hatch_Turbine h : mTurbineRotorHatches) { - if (h != null) { - h.mUsingAnimation = mIsAnimated; - } - } - } - } - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setBoolean("mIsAnimated", mIsAnimated); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mIsAnimated = aNBT.getBoolean("mIsAnimated"); - } - - private boolean mIsAnimated = true; - public ITexture frontFace; - public ITexture frontFaceActive; - private CustomIcon GT9_5_Active; - private CustomIcon GT9_5; - - public boolean usingAnimations() { - return mIsAnimated; - } - - @Override - public final ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? getFrontFacingTurbineTexture(aActive) : Textures.BlockIcons.getCasingTextureForId(getTAE())}; - } - - protected ITexture getFrontFacingTurbineTexture(boolean isActive) { - if (usingAnimations()) { - if (isActive) { - return frontFaceActive; - } - } - return frontFace; - } - - public boolean addTurbineHatch(final IGregTechTileEntity aTileEntity, - final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { - log("Found GT_MetaTileEntity_Hatch_Turbine"); - updateTexture(aTileEntity, aBaseCasingIndex); - GT_MetaTileEntity_Hatch_Turbine aTurbineHatch = (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; - IGregTechTileEntity g = this.getBaseMetaTileEntity(); - if (aTurbineHatch.setController(new BlockPos(g.getXCoord(), g.getYCoord(), g.getZCoord(), g.getWorld()))) { - Logger.INFO("Injected Controller into Turbine Assembly."); - return this.mTurbineRotorHatches.add(aTurbineHatch); - } - else { - Logger.INFO("Failed to inject controller into Turbine Assembly Hatch."); - } - } - return false; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { - if (mUpdate == 0 || this.mStartUpCheck == 0) { - this.mTurbineRotorHatches.clear(); - } - } - if (aTick % 20 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { - enableAllTurbineHatches(); - } - - } - @Override - public void startProcess() { - super.startProcess(); - enableAllTurbineHatches(); - } - @Override - public void onMachineBlockUpdate() { - super.onMachineBlockUpdate(); - } - @Override - public boolean onRunningTick(ItemStack aStack) { - return super.onRunningTick(aStack); - } - @Override - public void stopMachine() { - super.stopMachine(); - disableAllTurbineHatches(); - } - @Override - public void onRemoval() { - super.onRemoval(); - for (GT_MetaTileEntity_Hatch_Turbine h : this.mTurbineRotorHatches) { - h.clearController(); - } - disableAllTurbineHatches(); - this.mTurbineRotorHatches.clear(); - } - - public boolean enableAllTurbineHatches() { - return updateTurbineHatches(this.isMachineRunning()) > 0; - } - public boolean disableAllTurbineHatches() { - return updateTurbineHatches(false) > 0; - } - - private Long mLastHatchUpdate; - public int updateTurbineHatches(boolean aState) { - int aUpdated = 0; - if (mLastHatchUpdate == null) { - mLastHatchUpdate = System.currentTimeMillis()/1000; - } - if (this.mTurbineRotorHatches.isEmpty() || ((System.currentTimeMillis()/1000)-mLastHatchUpdate) <= 2) { - return 0; - } - for (GT_MetaTileEntity_Hatch_Turbine h : this.mTurbineRotorHatches) { - h.setActive(aState); - aUpdated++; - } - - mLastHatchUpdate = System.currentTimeMillis()/1000; - return aUpdated; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java deleted file mode 100644 index 6ed14eb2a9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java +++ /dev/null @@ -1,621 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage; - -import java.util.ArrayList; -import java.util.Arrays; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechMetaTileEntity_MultiTank -extends GregtechMeta_MultiBlockBase { - public GregtechMetaTileEntity_MultiTank(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - private short multiblockCasingCount = 0; - private int mInternalSaveClock = 0; - private final short storageMultiplier = 1; - private int maximumFluidStorage = 128000; - private FluidStack internalStorageTank = null; - private final NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound(); - - @Override - public String getMachineType() { - return "Fluid Tank"; - } - - @Override - public String[] getExtraInfoData() { - final ArrayList mTier = this.mEnergyHatches; - if (!mTier.isEmpty()){ - final int temp = mTier.get(0).mTier; - if (this.internalStorageTank == null) { - return new String[]{ - GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank", - "Stored Fluid: No Fluid", - "Internal | Current: "+Integer.toString(0) + "L", - "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; - } - return new String[]{ - GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank", - "Stored Fluid: "+this.internalStorageTank.getLocalizedName(), - "Internal | Current: "+Integer.toString(this.internalStorageTank.amount) + "L", - "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; - } - return new String[]{ - "Voltage Tier not set -" +" Large Fluid Tank", - "Stored Fluid: No Fluid", - "Internal | Current: "+Integer.toString(0) + "L", - "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; - } - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - */ -/*final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents"); - if (gtCraftingComponentsTag != null){ - - Utils.LOG_WARNING("Got Crafting Tag"); - - if (this.internalStorageTank != null){ - Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data."); - - gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName()); - gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount); - gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage); - - aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); - } - else { - Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data."); - gtCraftingComponentsTag.removeTag("xFluid"); - gtCraftingComponentsTag.removeTag("xAmount"); - gtCraftingComponentsTag.removeTag("xAmountMax"); - gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage); - - - aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); - } - }*//* - - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - */ -/*final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents"); - String xFluid = null; - int xAmount = 0; - if (gtCraftingComponentsTag.hasNoTags()){ - if (this.internalStorageTank != null){ - Utils.LOG_WARNING("mFluid was not null, Creating TileEntity NBT data."); - gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount); - gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName()); - aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); - } - } - else { - - //internalCraftingComponentsTag = gtCraftingComponentsTag.getCompoundTag("backupTag"); - - if (gtCraftingComponentsTag.hasKey("xFluid")){ - Utils.LOG_WARNING("xFluid was not null, Loading TileEntity NBT data."); - xFluid = gtCraftingComponentsTag.getString("xFluid"); - } - if (gtCraftingComponentsTag.hasKey("xAmount")){ - Utils.LOG_WARNING("xAmount was not null, Loading TileEntity NBT data."); - xAmount = gtCraftingComponentsTag.getInteger("xAmount"); - } - if ((xFluid != null) && (xAmount != 0)){ - Utils.LOG_WARNING("Setting Internal Tank, loading "+xAmount+"L of "+xFluid); - this.setInternalTank(xFluid, xAmount); - } - }*//* - - } - - private boolean setInternalTank(final String fluidName, final int amount){ - final FluidStack temp = FluidUtils.getFluidStack(fluidName, amount); - if (temp != null){ - if (this.internalStorageTank == null){ - this.internalStorageTank = temp; - Logger.WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L"); - } - else{ - Logger.WARNING("Retained Fluid."); - Logger.WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L"); - } - this.markDirty(); - return true; - } - return false; - } - - @Override - public void onLeftclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - this.tryForceNBTUpdate(); - super.onLeftclick(aBaseMetaTileEntity, aPlayer); - } - - @Override - public boolean onWrenchRightClick(final byte aSide, final byte aWrenchingSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) { - this.tryForceNBTUpdate(); - return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); - } - - @Override - public void onRemoval() { - this.tryForceNBTUpdate(); - super.onRemoval(); - } - - - @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - if ((this.internalStorageTank != null) && this.internalStorageTank.amount >= this.maximumFluidStorage){ - if (this.internalStorageTank.amount > this.maximumFluidStorage){ - this.internalStorageTank.amount = this.maximumFluidStorage; - } - this.stopMachine(); - } - - if (this.mInternalSaveClock != 20){ - this.mInternalSaveClock++; - } - else { - this.mInternalSaveClock = 0; - this.tryForceNBTUpdate(); - } - - } - - public GregtechMetaTileEntity_MultiTank(final String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_MultiTank(this.mName); - } - - @Override - public String[] getTooltip() { - return new String[]{ - "Controller Block for the Multitank", - "Size: 3xHx3 (Block behind controller must be air)", - "Structure must be at least 4 blocks tall, maximum 20.", - "Each casing within the structure adds 128000L storage.", - "Multitank Exterior Casings (16 at least!)", - "Controller (front centered)", - "1x Input hatch", - "1x Output hatch", - "1x Energy Hatch", - }; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11))}; - } - - @Override - public boolean hasSlotInGUI() { - return false; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return aFacing > 1; - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - - final ArrayList tInputList = this.getStoredInputs(); - for (int i = 0; i < (tInputList.size() - 1); i++) { - for (int j = i + 1; j < tInputList.size(); j++) { - if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { - if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { - tInputList.remove(j--); - } else { - tInputList.remove(i--); - break; - } - } - } - } - final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2); - - final ArrayList tFluidList = this.getStoredFluids(); - for (int i = 0; i < (tFluidList.size() - 1); i++) { - for (int j = i + 1; j < tFluidList.size(); j++) { - if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { - if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { - tFluidList.remove(j--); - } else { - tFluidList.remove(i--); - break; - } - } - } - } - final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1); - - if (tFluids.length >= 2){ - Logger.WARNING("Bad"); - return false; - } - - final ArrayList> rList = new ArrayList<>(); - int slotInputCount = 0; - for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { - boolean containsFluid = false; - if (isValidMetaTileEntity(tHatch)) { - slotInputCount++; - for (int i=0; i(tHatch, containsFluid)); - } - } - if ((tFluids.length <= 0) || (slotInputCount > 1)){ - Logger.WARNING("Bad"); - return false; - } - - Logger.WARNING("Okay - 2"); - if (this.internalStorageTank == null){ - Logger.WARNING("Okay - 3"); - if ((rList.get(0).getKey().mFluid != null) && (rList.get(0).getKey().mFluid.amount > 0)){ - Logger.WARNING("Okay - 4"); - Logger.WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount */ -/*+" internalStorageTank:"+internalStorageTank.amount*//* -); - final FluidStack tempFluidStack = rList.get(0).getKey().mFluid; - final Fluid tempFluid = tempFluidStack.getFluid(); - this.internalStorageTank = FluidUtils.getFluidStack(tempFluid.getName(), tempFluidStack.amount); - rList.get(0).getKey().mFluid.amount = 0; - Logger.WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+this.internalStorageTank.amount); - return true; - } - Logger.WARNING("No Fluid in hatch."); - return false; - } - else if (this.internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){ - Logger.WARNING("Storing "+rList.get(0).getKey().mFluid.amount+"L"); - Logger.WARNING("Contains "+this.internalStorageTank.amount+"L"); - - - int tempAdd = 0; - tempAdd = rList.get(0).getKey().getFluidAmount(); - rList.get(0).getKey().mFluid = null; - Logger.WARNING("adding "+tempAdd); - this.internalStorageTank.amount = this.internalStorageTank.amount + tempAdd; - Logger.WARNING("Tank now Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+"."); - - - //Utils.LOG_WARNING("Tank"); - return true; - } - else { - final FluidStack superTempFluidStack = rList.get(0).getKey().mFluid; - Logger.WARNING("is input fluid equal to stored fluid? "+(this.internalStorageTank.isFluidEqual(superTempFluidStack))); - if (superTempFluidStack != null) { - Logger.WARNING("Input hatch[0] Contains "+superTempFluidStack.amount+"L of "+superTempFluidStack.getFluid().getName()+"."); - } - Logger.WARNING("Large Multi-Tank Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+"."); - - if (this.internalStorageTank.amount <= 0){ - Logger.WARNING("Internal Tank is empty, sitting idle."); - return false; - } - - if ((this.mOutputHatches.get(0).mFluid == null) || this.mOutputHatches.isEmpty() || (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.internalStorageTank) && (this.mOutputHatches.get(0).mFluid.amount < this.mOutputHatches.get(0).getCapacity()))){ - Logger.WARNING("Okay - 3"); - final int tempCurrentStored = this.internalStorageTank.amount; - int tempResult = 0; - final int tempHatchSize = this.mOutputHatches.get(0).getCapacity(); - final int tempHatchCurrentHolding = this.mOutputHatches.get(0).getFluidAmount(); - final int tempHatchRemainingSpace = tempHatchSize - tempHatchCurrentHolding; - final FluidStack tempOutputFluid = this.internalStorageTank; - if (tempHatchRemainingSpace <= 0){ - return false; - } - Logger.WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left."); - - if (tempHatchSize >= tempHatchRemainingSpace){ - Logger.WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left."); - - int adder; - if ((tempCurrentStored > 0) && (tempCurrentStored <= tempHatchSize)){ - adder = tempCurrentStored; - if (adder >= tempHatchRemainingSpace){ - adder = tempHatchRemainingSpace; - } - } - else { - adder = 0; - if (tempCurrentStored >= tempHatchRemainingSpace){ - adder = tempHatchRemainingSpace; - } - } - - tempResult = adder; - tempOutputFluid.amount = tempResult; - Logger.WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName()); - this.mOutputHatches.get(0).fill(tempOutputFluid, true); - //mOutputHatches.get(0).mFluid.amount = tempResult; - this.internalStorageTank.amount = (tempCurrentStored-adder); - Logger.WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.internalStorageTank.amount +"L | output hatch contains: "+this.mOutputHatches.get(0).mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.getFluid().getName()); - */ -/*if (internalStorageTank.amount <= 0) - internalStorageTank = null;*//* - - } - Logger.WARNING("Tank ok."); - return true; - } - } - //this.getBaseMetaTileEntity().(tFluids[0].amount, true); - Logger.WARNING("Tank"); - return false; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - @Override - public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { - Logger.WARNING("Must be hollow."); - return false; - } - int tAmount = 0; - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - for (int h = -1; h < 19; h++) { - if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); - if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - if (h < 3){ - Logger.WARNING("Casing Expected."); - return false; - } - else if (h >= 3){ - //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); - } - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 11) { - if (h < 3){ - Logger.WARNING("Wrong Meta."); - return false; - } - else if (h >= 3){ - //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); - } - } - if (h < 3){ - tAmount++; - } - else if (h >= 3){ - if ((aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air) || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){ - Logger.WARNING("Found air"); - } - else { - Logger.WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank."); - tAmount++; - } - } - } - } - } - } - } - this.multiblockCasingCount = (short) tAmount; - this.maximumFluidStorage = getMaximumTankStorage(tAmount); - Logger.INFO("Your Multitank can be 20 blocks tall."); - Logger.INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L"); - this.tryForceNBTUpdate(); - return tAmount >= 16; - } - - */ -/*public int countCasings() { - Utils.LOG_INFO("Counting Machine Casings"); - try{ - if (this.getBaseMetaTileEntity().getWorld() == null){ - Utils.LOG_INFO("Tile Entity's world was null for casing count."); - return 0; - } - if (this.getBaseMetaTileEntity() == null){ - Utils.LOG_INFO("Tile Entity was null for casing count."); - return 0; - } - } catch(NullPointerException r){ - Utils.LOG_INFO("Null Pointer Exception caught."); - return 0; - } - int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ; - if (!this.getBaseMetaTileEntity().getAirOffset(xDir, 0, zDir)) { - Utils.LOG_INFO("Failed due to air being misplaced."); - Utils.LOG_WARNING("Must be hollow."); - return 0; - } - int tAmount = 0; - Utils.LOG_INFO("Casing Count set to 0."); - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - for (int h = -1; h < 19; h++) { - if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) { - IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(xDir + i, h, zDir + j); - if ((!addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) { - if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { - if (h < 3){ - Utils.LOG_WARNING("Casing Expected."); - return 0; - } - else if (h >= 3){ - //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); - } - } - if (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, h, zDir + j) != 11) { - if (h < 3){ - Utils.LOG_WARNING("Wrong Meta."); - return 0; - } - else if (h >= 3){ - //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); - } - } - if (h < 3){ - tAmount++; - } - else if (h >= 3){ - if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) == Blocks.air || this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){ - Utils.LOG_WARNING("Found air"); - } - else { - Utils.LOG_WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank."); - tAmount++; - } - } - } - } - } - } - } - Utils.LOG_INFO("Finished counting."); - multiblockCasingCount = (short) tAmount; - //Utils.LOG_INFO("Your Multitank can be 20 blocks tall."); - Utils.LOG_INFO("Casings Count: "+tAmount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+getMaximumTankStorage(tAmount)+"L"); - return tAmount; - }*//* - - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(final ItemStack aStack) { - return 5; - } - - @Override - public int getAmountOfOutputs() { - return 1; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - private static short getStorageMultiplier(final int casingCount){ - final int tsm = 1*casingCount; - if (tsm <= 0){ - return 1; - } - return (short) tsm; - } - - private static int getMaximumTankStorage(final int casingCount){ - final int multiplier = getStorageMultiplier(casingCount); - final int tempTankStorageMax = 128000*multiplier; - if (tempTankStorageMax <= 0){return 128000;} - return tempTankStorageMax; - } - - private boolean tryForceNBTUpdate(){ -*/ -/* - //Block is invalid. - if ((this == null) || (this.getBaseMetaTileEntity() == null)){ - Utils.LOG_WARNING("Block was not valid for saving data."); - return false; - } - - //Don't need this to run clientside. - if (!this.getBaseMetaTileEntity().isServerSide()) { - return false; - } - - //Internal Tag was not valid. - try{ - if (this.internalCraftingComponentsTag == null){ - Utils.LOG_WARNING("Internal NBT data tag was null."); - return false; - } - } catch (final NullPointerException x){ - Utils.LOG_WARNING("Caught null NBT."); - } - - //Internal tag was valid. - this.saveNBTData(this.internalCraftingComponentsTag); - - - //Mark block for update - int x,y,z = 0; - x = this.getBaseMetaTileEntity().getXCoord(); - y = this.getBaseMetaTileEntity().getYCoord(); - z = this.getBaseMetaTileEntity().getZCoord(); - this.getBaseMetaTileEntity().getWorld().markBlockForUpdate(x, y, z); - - //Mark block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly) - this.getBaseMetaTileEntity().markDirty();*//* - - return true; - } -}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java deleted file mode 100644 index a90c962cae..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ /dev/null @@ -1,657 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - -import com.gtnewhorizon.structurelib.StructureLibAPI; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.IStructureElement; -import com.gtnewhorizon.structurelib.structure.StructureDefinition; - -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.preloader.asm.AsmConfig; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_PowerSubStation; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_PowerSubStation; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMeta_MultiBlockBase { - - protected long mAverageEuUsage = 0; - protected long mTotalEnergyAdded = 0; - protected long mTotalEnergyConsumed = 0; - protected long mTotalEnergyLost = 0; - protected boolean mIsOutputtingPower = false; - protected long mBatteryCapacity = 0; - - private final int ENERGY_TAX = 2; - - private int mCasing; - private int[] cellCount = new int[6]; - private IStructureDefinition STRUCTURE_DEFINITION = null; - - public GregtechMetaTileEntity_PowerSubStationController(final int aID, final String aName, final String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GregtechMetaTileEntity_PowerSubStationController(final String aName) { - super(aName); - } - - @Override - public String getMachineType() { - return "Energy Buffer"; - } - - @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(getMachineType()) - .addInfo("[BUG] GUI does not work until structure is assembled correctly. (Do Not Report issue)") - .addInfo("Consumes " + this.ENERGY_TAX + "% of the average voltage of all energy type hatches") - .addInfo("Does not require maintenance") - .addInfo("Can be built with variable height between " + (CELL_HEIGHT_MIN + 2) + "-" + (CELL_HEIGHT_MAX + 2) + "") - .addInfo("Hatches can be placed nearly anywhere") - .addInfo("HV Energy/Dynamo Hatches are the lowest tier you can use") - .addInfo("Supports voltages >= UHV using MAX tier components.") - .addSeparator() - .addController("Bottom Center") - .addCasingInfo("Sub-Station External Casings", 10) - .addDynamoHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .toolTipFinisher(CORE.GT_Tooltip_Builder); - return tt; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; - } - if (aSide == this.getBaseMetaTileEntity().getBackFacing()) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)), - mIsOutputtingPower ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()] : Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]}; - } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(23))}; - } - - @Override - public boolean hasSlotInGUI() { - return true; - } - - @Override - public String getCustomGUIResourceName() { - return null; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (mBatteryCapacity <= 0) return false; - if (!aBaseMetaTileEntity.isClientSide()) { - aBaseMetaTileEntity.openGUI(aPlayer); - } - return true; - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_PowerSubStation(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "Ergon Energy - Sub Station"); - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_PowerSubStation(aPlayerInventory, aBaseMetaTileEntity); - } - - private void checkMachineProblem(String msg, int xOff, int yOff, int zOff) { - final IGregTechTileEntity te = this.getBaseMetaTileEntity(); - final Block tBlock = te.getBlockOffset(xOff, yOff, zOff); - final byte tMeta = te.getMetaIDOffset(xOff, yOff, zOff); - String name = tBlock.getLocalizedName(); - String problem = msg + ": (" + xOff + ", " + yOff + ", " + zOff + ") " + name + ":" + tMeta; - checkMachineProblem(problem); - } - private void checkMachineProblem(String msg) { - if (!AsmConfig.disableAllLogging) { - Logger.INFO("Power Sub-Station problem: " + msg); - } - } - - public static int getCellTier(Block aBlock, int aMeta) { - if (aBlock == ModBlocks.blockCasings2Misc && aMeta == 7) { - return 4; - } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 4) { - return 5; - } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 5) { - return 6; - } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 6) { - return 7; - } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 7) { - return 8; - } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 8) { - return 9; - } else { - return -1; - } - } - - public static int getMetaFromTier(int tier) { - if (tier == 4) return 7; - if (tier >= 5 && tier <= 9) return tier - 1; - return 0; - } - - public static Block getBlockFromTier(int tier) { - switch (tier) { - case 4: return ModBlocks.blockCasings2Misc; - case 5: case 6: case 7: case 8: case 9: return ModBlocks.blockCasings3Misc; - default: return null; - } - } - - public static int getMaxHatchTier(int aCellTier) { - switch(aCellTier) { - case 9: - return CORE.GTNH ? 15 : 9; - default: - if (aCellTier < 4) { - return 0; - } - else { - return aCellTier; - } - } - } - - public static final int CELL_HEIGHT_MAX = 16; - public static final int CELL_HEIGHT_MIN = 2; - - @Override - public IStructureDefinition getStructureDefinition() { - if (STRUCTURE_DEFINITION == null) { - STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName + "bottom", transpose(new String[][]{ - {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"} - })) - .addShape(mName + "mid", transpose(new String[][]{ - {"CCCCC", "CHHHC", "CHHHC", "CHHHC", "CCCCC"} - })) - .addShape(mName + "top", transpose(new String[][]{ - {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"} - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_PowerSubStationController::addPowerSubStationList, TAE.GTPP_INDEX(24), 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings2Misc, 8 - ) - ) - ) - ) - .addElement( - 'H', - ofChain( - onElementPass( - x -> ++x.cellCount[0], - ofCell(4) - ), - onElementPass( - x -> ++x.cellCount[1], - ofCell(5) - ), - onElementPass( - x -> ++x.cellCount[2], - ofCell(6) - ), - onElementPass( - x -> ++x.cellCount[3], - ofCell(7) - ), - onElementPass( - x -> ++x.cellCount[4], - ofCell(8) - ), - onElementPass( - x -> ++x.cellCount[5], - ofCell(9) - ) - ) - ) - .build(); - } - return STRUCTURE_DEFINITION; - } - - public static IStructureElement ofCell(int aIndex) { - return new IStructureElement() { - @Override - public boolean check(T t, World world, int x, int y, int z) { - Block block = world.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - int tier = getCellTier(block, meta); - return aIndex == tier; - } - - public int getIndex(int size) { - if (size > 6) size = 6; - return size + 3; - } - - @Override - public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { - StructureLibAPI.hintParticle(world, x, y, z, getBlockFromTier(getIndex(trigger.stackSize)), getMetaFromTier(getIndex(trigger.stackSize))); - return true; - } - - @Override - public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { - return world.setBlock(x, y, z, getBlockFromTier(getIndex(trigger.stackSize)), getMetaFromTier(getIndex(trigger.stackSize)), 3); - } - }; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - int layer = Math.min(stackSize.stackSize + 3, 18); - buildPiece(mName + "bottom" , stackSize, hintsOnly, 2, 0, 0); - for (int i = 1; i < layer - 1; i++) { - buildPiece(mName + "mid", stackSize, hintsOnly, 2, i, 0); - } - buildPiece(mName + "top", stackSize, hintsOnly, 2, layer - 1, 0); - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - mCasing = 0; - mAllEnergyHatches.clear(); - mAllDynamoHatches.clear(); - for (int i = 0; i < 6; i++) { - cellCount[i] = 0; - } - if (!checkPiece(mName + "bottom", 2, 0, 0)) - return false; - int layer = 1; - while (checkPiece(mName + "mid", 2, layer, 0)) { - layer ++; - } - if (layer > 19 || !checkPiece(mName + "top", 2, layer, 0)) - return false; - int level = 0; - for (int i = 0; i < 6; i++) { - if (cellCount[i] != 0) { - if (level == 0) level = i + 4; - else return false; - } - } - int tier = getMaxHatchTier(level); - long volSum = 0; - for (GT_MetaTileEntity_Hatch hatch : mAllDynamoHatches) { - if (hatch.mTier > tier || hatch.mTier < 3) return false; - volSum += (8 << (hatch.mTier * 2)); - } - for (GT_MetaTileEntity_Hatch hatch : mAllEnergyHatches) { - if (hatch.mTier > tier || hatch.mTier < 3) return false; - volSum += (8 << (hatch.mTier * 2)); - } - mBatteryCapacity = getCapacityFromCellTier(level) * cellCount[level - 4]; - if (mAllEnergyHatches.size() + mAllDynamoHatches.size() > 0) { - mAverageEuUsage = volSum / (mAllEnergyHatches.size() + mAllDynamoHatches.size()); - } - else mAverageEuUsage = 0; - fixAllMaintenanceIssue(); - return true; - } - - public final boolean addPowerSubStationList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } if (LoadedMods.TecTech) { - if (isThisHatchMultiDynamo(aMetaTileEntity)) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (isThisHatchMultiEnergy(aMetaTileEntity)) { - return addToMachineList(aTileEntity, aBaseCasingIndex); - } - } - } - return false; - } - - // Define storage capacity of smallest cell tier (EV) and compute higher tiers from it - private static final long CELL_TIER_EV_CAPACITY = 100 * 1000 * 1000; // one lapotronic orb - private static final long CELL_TIER_MULTIPLIER = 4; // each tier's capacity is this many times the previous tier - - public static long getCapacityFromCellTier(int aOverallCellTier) { - // Use integer math instead of `Math.pow` to avoid range/precision errors - if (aOverallCellTier < 4) return 0; - aOverallCellTier -= 4; - long capacity = CELL_TIER_EV_CAPACITY; - while (aOverallCellTier > 0) { - capacity *= CELL_TIER_MULTIPLIER; - aOverallCellTier--; - } - return capacity; - } - - @Override - public int getMaxEfficiency(final ItemStack aStack) { - return 10000; - } - - @Override - public boolean explodesOnComponentBreak(final ItemStack aStack) { - return false; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaTileEntity_PowerSubStationController(this.mName); - } - - //mTotalEnergyAdded - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setLong("mAverageEuUsage", this.mAverageEuUsage); - - //Usage Stats - aNBT.setLong("mTotalEnergyAdded", this.mTotalEnergyAdded); - aNBT.setLong("mTotalEnergyLost", this.mTotalEnergyLost); - aNBT.setLong("mTotalEnergyConsumed", this.mTotalEnergyConsumed); - aNBT.setLong("mTotalRunTime", this.mTotalRunTime); - aNBT.setBoolean("mIsOutputtingPower", this.mIsOutputtingPower); - aNBT.setLong("mBatteryCapacity", this.mBatteryCapacity); - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - - // Best not to get a long if the Tag Map is holding an int - if (aNBT.hasKey("mAverageEuUsage")) { - this.mAverageEuUsage = aNBT.getLong("mAverageEuUsage"); - } - - //Usage Stats - this.mTotalEnergyAdded = aNBT.getLong("mTotalEnergyAdded"); - this.mTotalEnergyLost = aNBT.getLong("mTotalEnergyLost"); - this.mTotalEnergyConsumed = aNBT.getLong("mTotalEnergyConsumed"); - this.mTotalRunTime = aNBT.getLong("mTotalRunTime"); - - this.mIsOutputtingPower = aNBT.getBoolean("mIsOutputtingPower"); - - this.mBatteryCapacity = aNBT.getLong("mBatteryCapacity"); - - super.loadNBTData(aNBT); - } - - @Override - public boolean checkRecipe(final ItemStack aStack) { - this.mProgresstime = 1; - this.mMaxProgresstime = 1; - this.mEUt = 0; - this.mEfficiencyIncrease = 10000; - this.fixAllMaintenanceIssue(); - return true; - } - - @Override - public int getMaxParallelRecipes() { - return 1; - } - - @Override - public int getEuDiscountForParallelism() { - return 0; - } - - private void drawEnergyFromHatch(MetaTileEntity aHatch) { - if (!isValidMetaTileEntity(aHatch)) return; - - long stored = aHatch.getEUVar(); - long voltage = aHatch.maxEUInput() * aHatch.maxAmperesIn(); - - if (voltage > stored) { - return; - } - - if (this.getBaseMetaTileEntity().increaseStoredEnergyUnits(voltage, false)) { - aHatch.setEUVar((stored - voltage)); - this.mTotalEnergyAdded += voltage; - } - } - - private void addEnergyToHatch(MetaTileEntity aHatch) { - if (!isValidMetaTileEntity(aHatch)) return; - - long voltage = aHatch.maxEUOutput() * aHatch.maxAmperesOut(); - - if (aHatch.getEUVar() > aHatch.maxEUStore() - voltage) return; - - if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(voltage, false)) { - aHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(voltage, false); - this.mTotalEnergyConsumed+=voltage; - } - - } - - private long computeEnergyTax() { - float mTax = mAverageEuUsage * (ENERGY_TAX / 100f); - - // Increase tax up to 2x if machine is not fully repaired - mTax = mTax * (1f + (10000f - mEfficiency) / 10000f); - - return MathUtils.roundToClosestLong(mTax); - } - - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - this.fixAllMaintenanceIssue(); - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - // First, decay overcharge (0.1% of stored energy plus 1000 EU per tick) - if (this.getEUVar() > this.mBatteryCapacity) { - long energy = (long) (this.getEUVar() * 0.999f) - 1000; - this.setEUVar(energy); - } - - // Pay Tax - long mDecrease = computeEnergyTax(); - this.mTotalEnergyLost += Math.min(mDecrease, this.getEUVar()); - this.setEUVar(Math.max(0, this.getEUVar() - mDecrease)); - - // Input Power - for (Object THatch : this.mDischargeHatches) { - GT_MetaTileEntity_Hatch_OutputBattery tHatch = (GT_MetaTileEntity_Hatch_OutputBattery) THatch; - drawEnergyFromHatch(tHatch); - } - for (GT_MetaTileEntity_Hatch tHatch : this.mAllEnergyHatches) { - drawEnergyFromHatch(tHatch); - } - - // Output Power - for (Object THatch : this.mChargeHatches) { - GT_MetaTileEntity_Hatch_InputBattery tHatch = (GT_MetaTileEntity_Hatch_InputBattery) THatch; - addEnergyToHatch(tHatch); - } - for (GT_MetaTileEntity_Hatch tHatch : this.mAllDynamoHatches) { - addEnergyToHatch(tHatch); - } - - return true; - - } - - @Override - public boolean drainEnergyInput(long aEU) { - // Not applicable to this machine - return true; - } - - @Override - public boolean addEnergyOutput(long aEU) { - // Not applicable to this machine - return true; - } - - @Override - public long maxEUStore() { - return mBatteryCapacity; - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public String[] getExtraInfoData() { - String mode; - if (mIsOutputtingPower) { - mode = EnumChatFormatting.GOLD + "Output" + EnumChatFormatting.RESET; - } else { - mode = EnumChatFormatting.BLUE + "Input" + EnumChatFormatting.RESET; - } - - String storedEnergyText; - if (this.getEUVar() > this.mBatteryCapacity) { - storedEnergyText = EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; - } else { - storedEnergyText = EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; - } - - int errorCode = this.getBaseMetaTileEntity().getErrorDisplayID(); - boolean mMaint = (errorCode != 0); - - return new String[]{ - "Ergon Energy - District Sub-Station", - "Stored EU: " + storedEnergyText, - "Capacity: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.maxEUStore()) + EnumChatFormatting.RESET, - "Running Costs: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.computeEnergyTax()) + EnumChatFormatting.RESET + " EU/t", - "Controller Mode: " + mode, - "Requires Maintenance: " + (!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED)+ mMaint + EnumChatFormatting.RESET +" | Code: ["+(!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + errorCode + EnumChatFormatting.RESET +"]", - "----------------------", - "Stats for Nerds", - "Total Input: " + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(this.mTotalEnergyAdded) + EnumChatFormatting.RESET + " EU", - "Total Output: " + EnumChatFormatting.GOLD + GT_Utility.formatNumbers(this.mTotalEnergyConsumed) + EnumChatFormatting.RESET + " EU", - "Total Costs: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.mTotalEnergyLost) + EnumChatFormatting.RESET + " EU", - }; - } - - @Override - public void explodeMultiblock() { - // TODO Auto-generated method stub - super.explodeMultiblock(); - } - - @Override - public void doExplosion(long aExplosionPower) { - // TODO Auto-generated method stub - super.doExplosion(aExplosionPower); - } - - @Override - public long getMaxInputVoltage() { - return 32768; - } - - @Override - public boolean isElectric() { - return true; - } - - @Override - public boolean isEnetInput() { - return !mIsOutputtingPower; - } - - @Override - public boolean isEnetOutput() { - return mIsOutputtingPower; - } - - @Override - public boolean isInputFacing(byte aSide) { - return (aSide == this.getBaseMetaTileEntity().getBackFacing() && !mIsOutputtingPower); - } - - @Override - public boolean isOutputFacing(byte aSide) { - return (aSide == this.getBaseMetaTileEntity().getBackFacing() && mIsOutputtingPower); - } - - @Override - public long maxAmperesIn() { - return 32; - } - - @Override - public long maxAmperesOut() { - return 32; - } - - @Override - public long maxEUInput() { - return 32768; - } - - @Override - public long maxEUOutput() { - return 32768; - } - - @Override - public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - mIsOutputtingPower = Utils.invertBoolean(mIsOutputtingPower); - if (mIsOutputtingPower) { - PlayerUtils.messagePlayer(aPlayer, "Sub-Station is now outputting power from the controller."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Sub-Station is now inputting power into the controller."); - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java deleted file mode 100644 index 5d8e9d468d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java +++ /dev/null @@ -1,348 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.common.tileentities.misc; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_SolarTower; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock { - - public String mSolarTower; - public boolean mHasTower = false; - - private Integer mTX, mTY, mTZ; - private Byte mRequiredFacing; - - public TileEntitySolarHeater(final int aID, final String aName, final String aNameRegional, final int aTier, - final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); - } - - public TileEntitySolarHeater(final String aName, final int aTier, final String aDescription, - final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] { - this.mDescription, - "Point me at a Solar Tower", - CORE.GT_Tooltip }; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, - final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 - : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex - + 1]; - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) }; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; - } - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; - } - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; - } - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; - } - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) }; - } - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new TileEntitySolarHeater(this.mName, this.mTier, this.mDescription, this.mTextures, 0); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - @Override - public String[] getInfoData() { - return new String[] { - this.getLocalName(), - "Testificate" - }; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return false; - } - - public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { - return false; - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public long maxEUStore() { - return 0; - } - - @Override - public int getCapacity() { - return 0; - } - - @Override - public long maxEUInput() { - return 0; - } - - @Override - public long maxEUOutput() { - return 0; - } - - @Override - public long maxAmperesIn() { - return 0; - } - - @Override - public long maxAmperesOut() { - return 0; - } - - @Override - public boolean isElectric() { - return false; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return false; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return aFacing >= 2; - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public boolean isEnetOutput() { - return false; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setBoolean("mHasTower", mHasTower); - if (mHasTower && mTX != null && mTY != null && mTZ != null) { - aNBT.setInteger("mTX", mTX); - aNBT.setInteger("mTY", mTY); - aNBT.setInteger("mTZ", mTZ); - } - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - this.mHasTower = aNBT.getBoolean("mHasTower"); - if (this.mHasTower) { - if (aNBT.hasKey("mTX")) - this.mTX = aNBT.getInteger("mTX"); - if (aNBT.hasKey("mTY")) - this.mTY = aNBT.getInteger("mTY"); - if (aNBT.hasKey("mTZ")) - this.mTZ = aNBT.getInteger("mTZ"); - } - } - - @Override - public long getInputTier() { - return 0; - } - - @Override - public long getOutputTier() { - return 0; - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { - return false; - } - - @Override - public void onExplosion() { - - } - - public GregtechMetaTileEntity_SolarTower getSolarTower() { - if (this.mHasTower && this.mSolarTower != null && this.mSolarTower.length() > 0) { - BlockPos p = BlockPos.generateBlockPos(mSolarTower); - if (p != null) { - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(p.xPos, p.yPos, p.zPos); - if (tTileEntity != null && tTileEntity instanceof GregtechMetaTileEntity_SolarTower) { - return (GregtechMetaTileEntity_SolarTower) tTileEntity; - } - } - } - return null; - } - - - public boolean setSolarTower(BlockPos aTowerPos) { - if (!this.mHasTower && setSolarTowerInternal(aTowerPos.getUniqueIdentifier())) { - IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(aTowerPos.xPos, aTowerPos.yPos, aTowerPos.zPos); - if (tTileEntity != null && tTileEntity instanceof GregtechMetaTileEntity_SolarTower) { - this.mTX = tTileEntity.getXCoord(); - this.mTY = (int) tTileEntity.getYCoord(); - this.mTZ = tTileEntity.getZCoord(); - this.mHasTower = true; - return true; - } - } - return false; - } - - private boolean clearSolarTower() { - if (mHasTower || mTX != null || mTY != null || mTZ != null || mRequiredFacing != null || this.mSolarTower != null) { - this.mTX = null; - this.mTY = null; - this.mTZ = null; - this.mRequiredFacing = null; - this.mSolarTower = null; - this.mHasTower = false; - return true; - } - return false; - } - - private final boolean setSolarTowerInternal(String aTowerPos) { - this.mSolarTower = aTowerPos; - return this.mSolarTower != null && this.mSolarTower.length() > 0; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - - } - - @Override - public void onRemoval() { - super.onRemoval(); - } - - @Override - public boolean isOutputFacing(byte aSide) { - return aSide > 1; - } - - @Override - public boolean isInputFacing(byte aSide) { - return false; - } - - @Override - public long getMinimumStoredEU() { - return 0; - } - - @Override - public void onFacingChange() { - super.onFacingChange(); - } - - @Override - public void doExplosion(long aExplosionPower) { - - } -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java deleted file mode 100644 index a3c11d486b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java +++ /dev/null @@ -1,574 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.data.ArrayUtils; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_TieredMachineBlock { - - /*sides.put(getUp()); - sides.put(getDown()); - sides.put(getXPos()); - sides.put(getXNeg()); - sides.put(getZPos()); - sides.put(getZNeg());*/ - - public int mItemCount = 0; - public ItemStack mItemStack = null; - private final static double mStorageFactor = 2; - - //Meta Tile ID - public final static int mCrateID = 955; - - //Sides - public final static int SIDE_Up = 0; - public final static int SIDE_Down = 1; - public final static int SIDE_XPos = 2; - public final static int SIDE_XNeg = 3; - public final static int SIDE_ZPos = 4; - public final static int SIDE_ZNeg = 5; - public final static int[] SIDES = new int[] {SIDE_Up, SIDE_Down, SIDE_XPos, SIDE_XNeg, SIDE_ZPos, SIDE_ZNeg}; - - //Neighbour Cache - private GT_MetaTileEntity_ConnectableCrate[] mNeighbourCache = new GT_MetaTileEntity_ConnectableCrate[6]; - //Cached Crate Location - private BlockPos mCurrentPos = null; - //Master Crate Position - protected BlockPos mMasterCrateLocation = null; - //Is Master? - protected boolean mIsMaster = false; - //Is Connected? - protected boolean mIsConnected[] = new boolean[] {false, false, false, false, false, false}; - //How many are connected? - protected int mConnectedCount = 0; - //Map of connected locations - protected AutoMap mConnectedCache = new AutoMap(); - - - public GT_MetaTileEntity_ConnectableCrate(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 3, - "This Crate stores " + (int) (Math.pow(6.0D, (double) aTier) * mStorageFactor) + " Items", new ITexture[0]); - } - - public GT_MetaTileEntity_ConnectableCrate(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - CORE.GT_Tooltip}; - } - - public boolean isSimpleMachine() { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return true; - } - - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - public boolean isValidSlot(int aIndex) { - return true; - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ConnectableCrate(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - public int getOppositeSide(int side) { - if (side == SIDE_Up) { - return SIDE_Down; - } - else if (side == SIDE_Down) { - return SIDE_Up; - } - else if (side == SIDE_XNeg) { - return SIDE_XPos; - } - else if (side == SIDE_XPos) { - return SIDE_XNeg; - } - else if (side == SIDE_ZNeg) { - return SIDE_ZPos; - } - else { - return SIDE_ZNeg; - } - } - - public boolean calculateOwnershipIfConnected() { - if (mCurrentPos == null) { - mCurrentPos = new BlockPos(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld()); - } - AutoMap n = mCurrentPos.getSurroundingBlocks(); - int p = 0; - for (BlockPos i : n) { - if (i != null) { - if (doesSideContainCrate(p)) { - GT_MetaTileEntity_ConnectableCrate yu = getCrateAtBlockPos(i); - if (yu != null) { - mNeighbourCache[p] = yu; - } - } - } - p++; - } - - int e4 = 0; - if (mNeighbourCache.length > 0) { - for (GT_MetaTileEntity_ConnectableCrate e : mNeighbourCache) { - this.mConnectedCount = this.mConnectedCache.size(); - if (e != null) { - //First, we check if this Crate is a Master, if not, continue checking what it is. - if (this.mIsMaster) { - //So this other Crate is also a master? Which is more Powerful - if (e.mIsMaster) { - //This crate holds more connected, it becomes master now. - if (this.mConnectedCount > e.mConnectedCount) { - e.mIsMaster = false; - e.mMasterCrateLocation = this.mCurrentPos; - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - this.mConnectedCache = ArrayUtils.mergeTwoMaps(this.mConnectedCache, e.mConnectedCache); - continue; - } - //Other crate held more connected, it is now master. - else { - this.mIsMaster = false; - this.mMasterCrateLocation = e.mCurrentPos; - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - e.mConnectedCache = ArrayUtils.mergeTwoMaps(e.mConnectedCache, this.mConnectedCache); - //Best wipe our cache of connected blocks then, since they no longer hold value. - mConnectedCache.clear(); - continue; - } - } - //Other Crate was not a Master, but we are, time to inherit it into our connection hivemind. - else { - //It would appear this controller has another master, time to query it. - if (e.mMasterCrateLocation != null && !e.mMasterCrateLocation.getUniqueIdentifier().equalsIgnoreCase(this.mMasterCrateLocation.getUniqueIdentifier())) { - GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation); - if (gM != null) { - //Lets compare controller strengths - int gM_Owned = gM.mConnectedCount; - //We are stronger, let's inherit it. - if (this.mConnectedCount > gM_Owned) { - e.mIsMaster = false; - e.mMasterCrateLocation = this.mCurrentPos; - gM.mIsMaster = false; - gM.mMasterCrateLocation = this.mCurrentPos; - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - this.mConnectedCache = ArrayUtils.mergeTwoMaps(this.mConnectedCache, gM.mConnectedCache); - continue; - } - //We lost, time to submit to a new master crate - else { - this.mIsMaster = false; - this.mMasterCrateLocation = e.mMasterCrateLocation; - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - gM.mConnectedCache = ArrayUtils.mergeTwoMaps(gM.mConnectedCache, this.mConnectedCache); - //Best wipe our cache of connected blocks then, since they no longer hold value. - mConnectedCache.clear(); - continue; - } - } - else { - //Could not get the Tile Entity for the Other Master Crate.. Guess I can just ignore this case for now~ TODO - continue; - } - } - //Either the other crate has no known Master or it is already this crate. - else { - //The other crate has no master, time to inherit. - if (e.mMasterCrateLocation == null || (!e.mIsConnected[getOppositeSide(e4)])) { - e.mMasterCrateLocation = this.mCurrentPos; - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - mConnectedCache.put(e.mCurrentPos.getUniqueIdentifier()); - continue; - } - else { - //Do nothing, we own this Crate already :) - continue; - } - - - } - } - } - - //We are not a Storage Master Crate, into a brave new world we go - else { - //Best wipe our cache of connected blocks then, since they no longer hold value. - mConnectedCache.clear(); - - //Dang, the other crate is a master, time to get incorporated. - if (e.mIsMaster) { - this.mIsMaster = false; - this.mMasterCrateLocation = e.mCurrentPos; - this.mIsConnected[e4] = true; - if (!e.mIsConnected[e4]) { - e.mIsConnected[e4] = true; - } - if (e.mMasterCrateLocation == null) { - e.mMasterCrateLocation = e.mCurrentPos; - } - e.mConnectedCache.put(this.mCurrentPos.getUniqueIdentifier()); - continue; - } - //So the Crate we Checked is not a Master, so let's see if it knows where one is - else { - //So, this Crate we have found knows about a master - if (e.mMasterCrateLocation != null) { - GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation); - //Found the master crate - if (gM != null) { - this.mIsMaster = false; - this.mMasterCrateLocation = e.mMasterCrateLocation; - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - gM.mConnectedCache.put(this.mCurrentPos.getUniqueIdentifier()); - continue; - } - else { - //Could not get the Tile Entity for the Other Master Crate.. Guess I can just ignore this case for now~ TODO - continue; - } - } - //This crate has no master, not going to check if it's connected. - else { - this.mIsMaster = true; - this.mMasterCrateLocation = this.mCurrentPos; - e.mIsMaster = false; - e.mMasterCrateLocation = this.mCurrentPos; - if (!e.mIsConnected[getOppositeSide(e4)]) { - e.mIsConnected[getOppositeSide(e4)] = true; - } - if (!this.mIsConnected[e4]) { - this.mIsConnected[e4] = true; - } - mConnectedCache.put(e.mCurrentPos.getUniqueIdentifier()); - continue; - } - } - } - } - e4++; - } - return true; - } - else { - return false; - } - - - - - } - - public boolean doesSideContainCrate(int side) { - return checkSideForDataType(0, side); - } - - public boolean isCrateAtSideController(int side) { - return checkSideForDataType(1, side); - } - - private boolean checkSideForDataType(int aType, int aSide) { - BlockPos mPosToCheck = - aSide == SIDE_Up ? mCurrentPos.getUp() : - aSide == SIDE_Down ? mCurrentPos.getDown() : - aSide == SIDE_XPos ? mCurrentPos.getXPos() : - aSide == SIDE_XNeg ? mCurrentPos.getXNeg() : - aSide == SIDE_ZPos ? mCurrentPos.getZPos() : - mCurrentPos.getZNeg(); - GT_MetaTileEntity_ConnectableCrate g = getCrateAtBlockPos(mPosToCheck); - if (g != null) { - if (aType == 0) { - return true; - } - else { - if (g.mIsMaster) { - return true; - } - } - } - return false; - } - - public GT_MetaTileEntity_ConnectableCrate getCrateAtBlockPos(BlockPos pos) { - if (pos != null) { - Block b = pos.getBlockAtPos(); - int m = pos.getMetaAtPos(); - TileEntity t = pos.world.getTileEntity(pos.xPos, pos.yPos, pos.zPos); - if (b != null && t != null) { - if (b == GregTech_API.sBlockMachines && m == mCrateID) { - if (t instanceof IGregTechTileEntity) { - IGregTechTileEntity g = (IGregTechTileEntity) t; - final IMetaTileEntity aMetaTileEntity = g.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return null; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_ConnectableCrate) { - return ((GT_MetaTileEntity_ConnectableCrate) aMetaTileEntity); - - } - } - } - } - } - return null; - } - - - - - - - - - - - - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } else { - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - } - - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_SuperChest(aPlayerInventory, aBaseMetaTileEntity); - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_SuperChest(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); - } - - - - - - - - - - - - - - - - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) { - if (this.getItemCount() <= 0) { - this.mItemStack = null; - this.mItemCount = 0; - } - - if (this.mItemStack == null && this.mInventory[0] != null) { - this.mItemStack = this.mInventory[0].copy(); - } - - if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount() - && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) { - this.mItemCount += this.mInventory[0].stackSize; - if (this.mItemCount > this.getMaxItemCount()) { - this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount(); - this.mItemCount = this.getMaxItemCount(); - } else { - this.mInventory[0] = null; - } - } - - if (this.mInventory[1] == null && this.mItemStack != null) { - this.mInventory[1] = this.mItemStack.copy(); - this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); - this.mItemCount -= this.mInventory[1].stackSize; - } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) - && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { - int tmp = Math.min(this.mItemCount, - this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); - this.mInventory[1].stackSize += tmp; - this.mItemCount -= tmp; - } - - if (this.mItemStack != null) { - this.mInventory[2] = this.mItemStack.copy(); - this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); - } else { - this.mInventory[2] = null; - } - } - - } - - private int getItemCount() { - return this.mItemCount; - } - - public void setItemCount(int aCount) { - this.mItemCount = aCount; - } - - public int getProgresstime() { - return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize) - + (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize); - } - - public int maxProgresstime() { - return this.getMaxItemCount(); - } - - public int getMaxItemCount() { - return (int) (Math.pow(6.0D, (double) this.mTier) * mStorageFactor - 128.0D); - } - - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 1; - } - - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 0 && (this.mInventory[0] == null || GT_Utility.areStacksEqual(this.mInventory[0], aStack)); - } - - public String[] getInfoData() { - return this.mItemStack == null - ? new String[]{"Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0), - Integer.toString(this.getMaxItemCount())} - : new String[]{"Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(), - Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount())}; - } - - public boolean isGivingInformation() { - return true; - } - - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mItemCount", this.mItemCount); - if (this.mItemStack != null) { - aNBT.setTag("mItemStack", this.mItemStack.writeToNBT(new NBTTagCompound())); - } - aNBT.setString("mMasterCrateLocation", mMasterCrateLocation.getUniqueIdentifier()); - aNBT.setBoolean("mIsMaster", mIsMaster); - for (int y=0;y this.getMaxItemCount()) { - this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount(); - this.mItemCount = this.getMaxItemCount(); - } else { - this.mInventory[0] = null; - } - } - - if (this.mInventory[1] == null && this.mItemStack != null) { - this.mInventory[1] = this.mItemStack.copy(); - this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); - this.mItemCount -= this.mInventory[1].stackSize; - } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) - && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { - int tmp = Math.min(this.mItemCount, - this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); - this.mInventory[1].stackSize += tmp; - this.mItemCount -= tmp; - } - - if (this.mItemStack != null) { - this.mInventory[2] = this.mItemStack.copy(); - this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); - } else { - this.mInventory[2] = null; - } - } - - } - - private int getItemCount() { - return this.mItemCount; - } - - public void setItemCount(int aCount) { - this.mItemCount = aCount; - } - - public int getProgresstime() { - return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize) - + (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize); - } - - public int maxProgresstime() { - return this.getMaxItemCount(); - } - - public int getMaxItemCount() { - return (int) (Math.pow(6.0D, (double) this.mTier) * mStorageFactor - 128.0D); - } - - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 1; - } - - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aIndex == 0 && (this.mInventory[0] == null || GT_Utility.areStacksEqual(this.mInventory[0], aStack)); - } - - public String[] getInfoData() { - return this.mItemStack == null - ? new String[]{"Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0), - Integer.toString(this.getMaxItemCount())} - : new String[]{"Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(), - Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount())}; - } - - public boolean isGivingInformation() { - return true; - } - - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mItemCount", this.mItemCount); - if (this.mItemStack != null) { - aNBT.setTag("mItemStack", this.mItemStack.writeToNBT(new NBTTagCompound())); - } - - } - - public void loadNBTData(NBTTagCompound aNBT) { - if (aNBT.hasKey("mItemCount")) { - this.mItemCount = aNBT.getInteger("mItemCount"); - } - - if (aNBT.hasKey("mItemStack")) { - this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack")); - } - - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { - return aBaseMetaTileEntity.getFrontFacing() == 0 && aSide == 4 - ? new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], - new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)} - : (aSide == aBaseMetaTileEntity.getFrontFacing() - ? new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], - new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)} - : new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]}); - } - - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - return new ITexture[0][0][0]; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java deleted file mode 100644 index ef7fe829d4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java +++ /dev/null @@ -1,160 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.preloader.asm.AsmConfig; - -public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank { - - public GT_MetaTileEntity_TieredTank(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid"); - } - - public GT_MetaTileEntity_TieredTank(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid", aTextures); - } - - @Override - public String[] getDescription() { - String[] aTip; - - String aTankPortableness = "portable"; - - if (this.mFluid == null) { - aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", CORE.GT_Tooltip}; - } - else { - aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", "Fluid: "+mFluid.getLocalizedName()+" "+mFluid.amount+"L", CORE.GT_Tooltip}; - } - return aTip; - } - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - return new ITexture[0][0][0]; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)}; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - @Override - public boolean isFacingValid(final byte aFacing) { - return true; - } - - @Override - public boolean isAccessAllowed(final EntityPlayer aPlayer) { - return true; - } - - @Override - public final byte getUpdateData() { - return 0x00; - } - - @Override - public boolean doesFillContainers() { - return true; - } - - @Override - public boolean doesEmptyContainers() { - return true; - } - - @Override - public boolean canTankBeFilled() { - return true; - } - - @Override - public boolean canTankBeEmptied() { - return true; - } - - @Override - public String[] getInfoData() { - - if (this.mFluid == null) { - return new String[]{ - GT_Values.VOLTAGE_NAMES[this.mTier]+" Fluid Tank", - "Stored Fluid:", - "No Fluid", - Integer.toString(0) + "L", - Integer.toString(this.getCapacity()) + "L"}; - } - return new String[]{ - GT_Values.VOLTAGE_NAMES[this.mTier]+" Fluid Tank", - "Stored Fluid:", - this.mFluid.getLocalizedName(), - Integer.toString(this.mFluid.amount) + "L", - Integer.toString(this.getCapacity()) + "L"}; - } - - @Override - public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_TieredTank(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - @Override - public int getCapacity() { - return (int) (Math.pow(2, this.mTier) * 32000); - } - - @Override - public int getTankPressure() { - return 100; - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()){ - //setVars(); - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - @Override - public boolean displaysItemStack() { - return true; - } - - @Override - public boolean displaysStackSize() { - return false; - } - - @Override - public void setItemNBT(NBTTagCompound aNBT) { - if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) { - if (mFluid != null){ - Logger.WARNING("Setting item fluid nbt"); - aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); - if (aNBT.hasKey("mFluid")) { - Logger.WARNING("Set mFluid to NBT."); - } - } - } - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java deleted file mode 100644 index 320e2175b0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java +++ /dev/null @@ -1,421 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage; - -import static gregtech.api.enums.GT_Values.V; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_Container_1by1; -import gregtech.api.gui.GT_GUIContainer_1by1; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity { - - protected byte aCurrentOutputAmperage = 4; - - public GregtechMetaEnergyBuffer(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { - super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); - } - - public GregtechMetaEnergyBuffer(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { - super(aName, aTier, aSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[] {this.mDescription, - "Defaults 4A In/Out", - "Change output Amperage with a screwdriver", - "Now Portable!", - CORE.GT_Tooltip}; - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { - if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { - return true; - } - return super.allowCoverOnSide(aSide, aCover); - } - - /* - * MACHINE_STEEL_SIDE - */ - - @Override - public ITexture[][][] getTextureSet(final ITexture[] aTextures) { - final ITexture[][][] rTextures = new ITexture[10][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = this.getFront(i); - rTextures[1][i + 1] = this.getBack(i); - rTextures[2][i + 1] = this.getBottom(i); - rTextures[3][i + 1] = this.getTop(i); - rTextures[4][i + 1] = this.getSides(i); - rTextures[5][i + 1] = this.getFrontActive(i); - rTextures[6][i + 1] = this.getBackActive(i); - rTextures[7][i + 1] = this.getBottomActive(i); - rTextures[8][i + 1] = this.getTopActive(i); - rTextures[9][i + 1] = this.getSidesActive(i); - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; - } - - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo)}; - } - - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - - public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; - } - - - public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - - public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - - public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo)}; - } - - - public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; - } - - /*@Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[2][17][]; - for (byte i = -1; i < 16; i++) { - rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture( - Textures.BlockIcons.MACHINE_HEATPROOFCASING) }; - rTextures[1][i + 1] = new ITexture[] { - new GT_RenderedTexture( - Textures.BlockIcons.MACHINE_HEATPROOFCASING), - mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] - : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; - } - return rTextures; - }*/ - - /* - * @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { - * ITexture[][][] rTextures = new ITexture[5][17][]; for (byte i = -1; i < - * 16; i = (byte) (i + 1)) { ITexture[] tmp0 = { new GT_RenderedTexture( - * Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, - * Dyes._NULL.mRGBa)) }; rTextures[0][(i + 1)] = tmp0; ITexture[] tmp1 = { - * new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_TOP) }; - * rTextures[1][(i + 1)] = tmp1; ITexture[] tmp2 = { new GT_RenderedTexture( - * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, - * Dyes._NULL.mRGBa)), new - * GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; rTextures[2][(i + - * 1)] = tmp2; ITexture[] tmp4 = { new GT_RenderedTexture( - * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, - * Dyes._NULL.mRGBa)), new - * GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; rTextures[3][(i + - * 1)] = tmp4; ITexture[] tmp5 = { new GT_RenderedTexture( - * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, - * Dyes._NULL.mRGBa)), new GT_RenderedTexture( - * Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; rTextures[4][(i + 1)] = tmp5; - * } return rTextures; } - */ - - /*@Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return mTextures[aSide == aFacing ? 1 : 0][aColorIndex+1]; - }*/ - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaEnergyBuffer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); - } - - @Override public boolean isSimpleMachine() {return false;} - @Override public boolean isElectric() {return true;} - @Override public boolean isValidSlot(final int aIndex) {return true;} - @Override public boolean isFacingValid(final byte aFacing) {return true;} - @Override public boolean isEnetInput() {return true;} - @Override public boolean isEnetOutput() {return true;} - @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} - @Override public boolean isTeleporterCompatible() {return false;} - @Override public long getMinimumStoredEU() {return V[this.mTier]*2;} - @Override public long maxEUStore() {return V[this.mTier]*250000;} - - @Override - public long maxEUInput() { - return V[this.mTier]; - } - - @Override - public long maxEUOutput() { - return V[this.mTier]; - } - - @Override - public long maxAmperesIn() { - return aCurrentOutputAmperage; - } - - @Override - public long maxAmperesOut() { - return aCurrentOutputAmperage; - } - @Override public int rechargerSlotStartIndex() {return 0;} - @Override public int dechargerSlotStartIndex() {return 0;} - @Override public int rechargerSlotCount() {return 0;} - @Override public int dechargerSlotCount() {return 0;} - @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} - @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} - @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} - - @Override - public void saveNBTData(final NBTTagCompound aNBT) { - aNBT.setByte("aCurrentOutputAmperage", aCurrentOutputAmperage); - if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) { - long aEU = this.getBaseMetaTileEntity().getStoredEU(); - if (aEU > 0){ - aNBT.setLong("aStoredEU", aEU); - if (aNBT.hasKey("aStoredEU")) { - Logger.WARNING("Set aStoredEU to NBT."); - } - } - } - } - - @Override - public void loadNBTData(final NBTTagCompound aNBT) { - aCurrentOutputAmperage = aNBT.getByte("aCurrentOutputAmperage"); - if (aNBT.hasKey("aStoredEU")) { - this.setEUVar(aNBT.getLong("aStoredEU")); - } - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - Logger.WARNING("Right Click on MTE by Player"); - if (aBaseMetaTileEntity.isClientSide()) - { - return true; - //aBaseMetaTileEntity.openGUI(aPlayer); - } - - Logger.WARNING("MTE is Client-side"); - this.showEnergy(aPlayer.getEntityWorld(), aPlayer); - return true; - } - - private void showEnergy(final World worldIn, final EntityPlayer playerIn){ - final long tempStorage = this.getBaseMetaTileEntity().getStoredEU(); - final double c = ((double) tempStorage / this.maxEUStore()) * 100; - final double roundOff = Math.round(c * 100.00) / 100.00; - PlayerUtils.messagePlayer(playerIn, "Energy: " + GT_Utility.formatNumbers(tempStorage) + " EU at "+V[this.mTier]+"v ("+roundOff+"%)"); - PlayerUtils.messagePlayer(playerIn, "Amperage: " + GT_Utility.formatNumbers(maxAmperesOut())+"A"); - - } - //Utils.LOG_WARNING("Begin Show Energy"); - /* - * - //Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" C: "+c); - Utils.LOG_INFO("getProgressTime: "+getProgresstime()); - Utils.LOG_INFO("maxProgressTime: "+maxProgresstime()); - Utils.LOG_INFO("getMinimumStoredEU: "+getMinimumStoredEU()); - Utils.LOG_INFO("maxEUStore: "+maxEUStore());*/ - /*final long d = (tempStorage * 100L) / maxEUStore(); - Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" D: "+d); - final double roundOff2 = Math.round(d * 100.00) / 100.00; - Utils.messagePlayer(playerIn, "Energy: " + tempStorage + " EU at "+V[mTier]+"v ("+roundOff2+"%)"); - Utils.LOG_WARNING("Making new instance of Guihandler"); - GuiHandler block = new GuiHandler(); - Utils.LOG_WARNING("Guihandler.toString(): "+block.toString()); - block.getClientGuiElement(1, playerIn, worldIn, (int) playerIn.posX, (int) playerIn.posY, (int) playerIn.posZ);*/ - - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); - } - - @Override - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return false; - } - - @Override - public String[] getInfoData() { - String cur = GT_Utility.formatNumbers(this.getBaseMetaTileEntity().getStoredEU()); - String max = GT_Utility.formatNumbers(this.getBaseMetaTileEntity().getEUCapacity()); - - // Right-align current storage with maximum storage - String fmt = String.format("%%%ds", max.length()); - cur = String.format(fmt, cur); - - return new String[] { - cur+" EU stored", - max+" EU capacity"}; - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { - return new int[] {}; - } - - @Override - public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { - return false; - } - - @Override - public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { - return false; - } - - @Override - public int getSizeInventory() { - return 0; - } - - @Override - public ItemStack getStackInSlot(final int p_70301_1_) { - return null; - } - - @Override - public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { - return null; - } - - @Override - public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { - return null; - } - - @Override - public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { - } - - @Override - public String getInventoryName() { - return super.getInventoryName(); - } - - @Override - public boolean hasCustomInventoryName() { - return false; - } - - @Override - public int getInventoryStackLimit() { - return 0; - } - - @Override - public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { - return false; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { - return false; - } - - @Override - public void setItemNBT(NBTTagCompound aNBT) { - if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) { - aNBT.setByte("aCurrentOutputAmperage", aCurrentOutputAmperage); - long aEU = this.getBaseMetaTileEntity().getStoredEU(); - if (aEU > 0){ - aNBT.setLong("aStoredEU", aEU); - if (aNBT.hasKey("aStoredEU")) { - Logger.WARNING("Set aStoredEU to NBT."); - } - } - } - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - byte aTest = (byte) (aCurrentOutputAmperage + 1); - if (aTest > 16 || aTest <= 0 ) { - aTest = 1; - } - aCurrentOutputAmperage = aTest; - PlayerUtils.messagePlayer(aPlayer, "Now handling "+aCurrentOutputAmperage+" Amps."); - } - - - - - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java deleted file mode 100644 index 63042d4702..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java +++ /dev/null @@ -1,62 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage; - -import net.minecraft.entity.player.InventoryPlayer; - -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SafeBlock; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_SafeBlock; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase; - -public class GregtechMetaSafeBlock -extends GregtechMetaSafeBlockBase { - - public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier) { - super(aID, aName, aNameRegional, aTier, 28, "Protecting your items from sticky fingers."); - } - - public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { - super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); - } - - public GregtechMetaSafeBlock(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { - super(aName, aTier, aInvSlotCount, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - CORE.GT_Tooltip}; - } - - @Override - public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GregtechMetaSafeBlock(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); - } - - @Override - public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.VOID); - } - - @Override - public boolean isValidSlot(final int aIndex) { - return aIndex < (this.mInventory.length - 1); - } - - @Override - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_SafeBlock(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_SafeBlock(aPlayerInventory, aBaseMetaTileEntity); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java deleted file mode 100644 index fb37f33055..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java +++ /dev/null @@ -1,105 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; - -public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_TieredChest { - - public GT_MetaTileEntity_InfiniteItemHolder(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier); - } - - public GT_MetaTileEntity_InfiniteItemHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, aDescription, aTextures); - } - - @Override - public String[] getDescription() { - return new String[]{ - this.mDescription, - CORE.GT_Tooltip}; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.getWorld().isRemote) { - return false; - } - - if (!KeyboardUtils.isShiftKeyDown()) { - if (this.mItemStack == null) { - if (aPlayer.getHeldItem() != null) { - this.mItemStack = aPlayer.getHeldItem().copy(); - this.mItemCount = Short.MAX_VALUE; - aPlayer.setCurrentItemOrArmor(0, null); - PlayerUtils.messagePlayer(aPlayer, "Now holding "+this.mItemStack.getDisplayName()+" x"+Short.MAX_VALUE+"."); - return true; - } - } - else { - if (aPlayer.getHeldItem() == null) { - aPlayer.entityDropItem(mItemStack, 1); - this.mItemStack = null; - this.mItemCount = 0; - PlayerUtils.messagePlayer(aPlayer, "Emptying."); - return true; - } - } - } - - PlayerUtils.messagePlayer(aPlayer, "Currently holding: "+(this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing")+" x"+this.mItemCount); - return true; - //return super.onRightclick(aBaseMetaTileEntity, aPlayer); - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return null; - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (mItemStack != null) { - setItemCount(0); - } - super.onPostTick(aBaseMetaTileEntity, aTimer); - } - - @Override - public void setItemCount(int aCount) { - super.setItemCount(Short.MAX_VALUE); - } - - @Override - public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return true; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; - } - - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_InfiniteItemHolder(this.mName, this.mTier, this.mDescription, this.mTextures); - } - - - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java deleted file mode 100644 index 43d5cffe82..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java +++ /dev/null @@ -1,359 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.enums.*; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Utility; -import gregtech.common.items.GT_MetaGenerated_Tool_01; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; - -public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric { - public byte mType = 0; - public String mOldDesc = ""; - public boolean mLocked = false; - protected byte mIndex = (byte) MathUtils.randInt(1, 3); - public static GT_RenderedTexture texBottom = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_bottom")); - public static GT_RenderedTexture texTop = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_top")); - public static GT_RenderedTexture texSide = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side")); - public static GT_RenderedTexture texSideCabinet = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side_cabinet")); - - public GT4Entity_Shelf(final int aID, final String aName, final String aNameRegional, final String aDescription) { - super(aID, aName, aNameRegional, 0, aDescription); - mOldDesc = aDescription; - } - - public GT4Entity_Shelf(final String aName, final String aDescription, final ITexture[][][] aTextures) { - super(aName, 0, aDescription, aTextures); - mOldDesc = aDescription; - } - - @Override - public boolean isSimpleMachine() { - return true; - } - - public int getInvSize() { - return 1; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - if (this.getBaseMetaTileEntity().getOwnerName().equalsIgnoreCase(aPlayer.getDisplayName())) { - return true; - } - PlayerUtils.messagePlayer(aPlayer, "This container belongs to "+this.getBaseMetaTileEntity().getOwnerName()+"."); - return false; - } - - @Override - public boolean ownerControl() { - return false; - } - - @Override - public boolean isEnetOutput() { - return false; - } - - @Override - public boolean isEnetInput() { - return false; - } - - @Override - public boolean isOutputFacing(final byte aSide) { - return aSide != this.getBaseMetaTileEntity().getFrontFacing(); - } - - @Override - public boolean isInputFacing(byte aSide) { - return false; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) { - if (aTile.isClientSide()) { - return true; - } - ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem); - if (tStack == null) { - if (KeyboardUtils.isCtrlKeyDown()) { - if (this.mInventory[0] != null) { - PlayerUtils.messagePlayer(aPlayer, "Contains "+this.mInventory[0].getDisplayName()+" x"+this.mInventory[0].stackSize+"."); - } - return false; - } - else { - if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) { - if (!this.mLocked) { - PlayerUtils.messagePlayer(aPlayer, "Removed "+this.mInventory[0].getDisplayName()+" x"+this.mInventory[0].stackSize+"."); - aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]); - getBaseMetaTileEntity().setInventorySlotContents(0, null); - this.mType = 0; - return true; - } - else { - PlayerUtils.messagePlayer(aPlayer, "This container is locked. It belongs to "+aTile.getOwnerName()+"."); - return false; - } - } - return false; - } - } - else if (tStack != null && this.mInventory[0] == null) { - - if (KeyboardUtils.isCtrlKeyDown() || GT_MetaGenerated_Tool_01.class.isInstance(tStack.getItem())) { - return false; - } - PlayerUtils.messagePlayer(aPlayer, "Stored "+tStack.getDisplayName()+" x"+tStack.stackSize+"."); - aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null); - getBaseMetaTileEntity().setInventorySlotContents(0, tStack); - this.mType = (byte) MathUtils.randInt(1, 3); - return true; - } - else { - if (this.mInventory[0] == null) { - this.mType = 0; - } - return super.onRightclick(aTile, aPlayer); - } - } - - @Override - public void onLeftclick(IGregTechTileEntity aTile,EntityPlayer aPlayer) { - if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) { - ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] }); - if (!aPlayer.isSneaking()) { - tOutput.stackSize = 1; - } - getBaseMetaTileEntity().decrStackSize(0, tOutput.stackSize); - EntityItem tEntity = new EntityItem(getBaseMetaTileEntity().getWorld(), - getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, - getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, - getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, tOutput); - tEntity.motionX = 0.0D; - tEntity.motionY = 0.0D; - tEntity.motionZ = 0.0D; - getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity); - if (this.mInventory[0] == null) { - this.mType = 0; - } - } - super.onLeftclick(aTile, aPlayer); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_Shelf(this.mName, this.mDescription, this.mTextures); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) {//mLocked - aNBT.setInteger("mType", this.mType); - aNBT.setBoolean("mLocked", this.mLocked); - aNBT.setByte("mIndex", this.mIndex); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - if (aNBT.hasKey("mIndex")) { - this.mType = ((byte) aNBT.getInteger("mType")); - } - if (aNBT.hasKey("mIndex")) { - this.mLocked = (aNBT.getBoolean("mLocked")); - } - if (aNBT.hasKey("mIndex")) { - this.mIndex = aNBT.getByte("mIndex"); - } - } - - @Override - public void onValueUpdate(byte aValue) { - this.mType = aValue; - } - - @Override - public byte getUpdateData() { - return this.mType; - } - - @Override - public String[] getDescription() { - return new String[] { - mOldDesc, - "Decorative Item Storage", - "Right click to store/remove something", - "Ctrl + Rmb to check contents", - "Ctrl + Rmb with a screwdriver to lock", - }; - } - - @Override - public byte getTileEntityBaseType() { - return 0; - } - - @Override - public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { - //return aSide != getBaseMetaTileEntity().getFrontFacing(); - return false; - } - - @Override - public boolean allowPullStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) { - return true; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) { - return false; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[7][17][]; - for (byte i = -1; i < 16; i = (byte) (i + 1)) { - ITexture[] tmp0 = {this.getBottom((byte) 0)[0]}; - rTextures[0][(i + 1)] = tmp0; - ITexture[] tmp1 = { this.getTop((byte) 0)[0]}; - rTextures[1][(i + 1)] = tmp1; - ITexture[] tmp2 = { this.getSides((byte) 0)[0]}; - rTextures[2][(i + 1)] = tmp2; - ITexture[] tmp4 = {this.getSides((byte) 0)[0]}; - rTextures[3][(i + 1)] = tmp4; - ITexture[] tmp5 = {this.getSides((byte) 0)[0], getFront((byte) 0)[0]}; - rTextures[4][(i + 1)] = tmp5; - ITexture[] tmp6 = {this.getSides((byte) 0)[0], getFront((byte) 1)[0]}; - rTextures[5][(i + 1)] = tmp6; - ITexture[] tmp7 = {this.getSides((byte) 0)[0], getFront((byte) 2)[0]}; - rTextures[6][(i + 1)] = tmp7; - } - return rTextures; - } - - @Override - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, - final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, - final boolean aRedstone) { - - ITexture[] tmp = this.mTextures[(aSide >= 2) ? ((aSide != aFacing) ? 2 : ((byte) this.mType == 0 ? 4 : this.mType == 1 || this.mType == 2 ? 5 : this.mType == 3 ? 6 : 0)) : aSide][aColorIndex + 1]; - if (aSide != aFacing && tmp.length == 2) { - tmp = new ITexture[]{tmp[0]}; - } - return tmp; - } - - private static GT_RenderedTexture x1 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_FRONT); - private static GT_RenderedTexture x2 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_PAPER_FRONT); - private static GT_RenderedTexture x3 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_CANS_FRONT); - - public ITexture[] getFrontNormal() { - return new ITexture[]{x1}; - } - public ITexture[] getFrontActive() { - return new ITexture[]{x2}; - } - public ITexture[] getFrontAlternative() { - return new ITexture[]{x3}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log)}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } - - public ITexture[] getFrontActive(final byte aColor) { - return this.getFrontNormal(); - } - - public ITexture[] getBackActive(final byte aColor) { - return this.getBack(aColor); - } - - public ITexture[] getBottomActive(final byte aColor) { - return this.getBottom(aColor); - } - - public ITexture[] getTopActive(final byte aColor) { - return this.getTop(aColor); - } - - public ITexture[] getSidesActive(final byte aColor) { - return this.getSides(aColor); - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - public ITexture[] getFront(byte aColour) { - if (aColour == 1) { - return getFrontActive(); - } - else if (aColour == 2) { - return getFrontAlternative(); - } - return getFrontNormal(); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (KeyboardUtils.isCtrlKeyDown()) { - if (!aPlayer.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) { - PlayerUtils.messagePlayer(aPlayer, "Container is not yours to lock."); - } - else { - this.mLocked = Utils.invertBoolean(this.mLocked); - if (this.mLocked) { - PlayerUtils.messagePlayer(aPlayer, "Container is now locked."); - } - else { - PlayerUtils.messagePlayer(aPlayer, "Container is now unlocked."); - } - } - } - else { - super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); - } - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPreTick(aBaseMetaTileEntity, aTick); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java deleted file mode 100644 index 7dcb76a22e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; - -import net.minecraft.entity.player.EntityPlayer; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf { - - - public GT4Entity_Shelf_Compartment(final int aID, final String aName, final String aNameRegional, final String aDescription) { - super(aID, aName, aNameRegional, aDescription); - } - - public GT4Entity_Shelf_Compartment(String mName, String mDescriptionArray, ITexture[][][] mTextures) { - super(mName, mDescriptionArray, mTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_Shelf_Compartment(this.mName, this.mDescription, this.mTextures); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aSide == getBaseMetaTileEntity().getFrontFacing()) { - this.mType = ((byte) ((this.mType + 1) % 16)); - PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+"."); - } - } - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0]}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java deleted file mode 100644 index 2c7186a3ce..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java +++ /dev/null @@ -1,45 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GT_RenderedTexture; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf { - - public GT4Entity_Shelf_Desk(final int aID, final String aName, final String aNameRegional, final String aDescription) { - super(aID, aName, aNameRegional, aDescription); - } - - public GT4Entity_Shelf_Desk(String mName, String mDescriptionArray, ITexture[][][] mTextures) { - super(mName, mDescriptionArray, mTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_Shelf_Desk(this.mName, this.mDescription, this.mTextures); - } - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java deleted file mode 100644 index 93bb7d5bb9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; - -import net.minecraft.entity.player.EntityPlayer; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; - -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf { - - public GT4Entity_Shelf_FileCabinet(final int aID, final String aName, final String aNameRegional, final String aDescription) { - super(aID, aName, aNameRegional, aDescription); - } - - public GT4Entity_Shelf_FileCabinet(String mName, String mDescriptionArray, ITexture[][][] mTextures) { - super(mName, mDescriptionArray, mTextures); - } - - @Override - public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aSide == getBaseMetaTileEntity().getFrontFacing()) { - this.mType = ((byte) ((this.mType + 1) % 16)); - PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+"."); - } - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_Shelf_FileCabinet(this.mName, this.mDescription, this.mTextures); - } - - @Override - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{texSide}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{texBottom}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{texTop}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{texSide}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java deleted file mode 100644 index 606496501f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java +++ /dev/null @@ -1,41 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; - -public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf { - - public GT4Entity_Shelf_Iron(final int aID, final String aName, final String aNameRegional, final String aDescription) { - super(aID, aName, aNameRegional, aDescription); - } - - public GT4Entity_Shelf_Iron(String mName, String mDescriptionArray, ITexture[][][] mTextures) { - super(mName, mDescriptionArray, mTextures); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_Shelf_Iron(this.mName, this.mDescription, this.mTextures); - } - - public ITexture[] getFront(final byte aColor) { - return new ITexture[]{texSideCabinet}; - } - - public ITexture[] getBack(final byte aColor) { - return new ITexture[]{texSide}; - } - - public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{texBottom}; - } - - public ITexture[] getTop(final byte aColor) { - return new ITexture[]{texTop}; - } - - public ITexture[] getSides(final byte aColor) { - return new ITexture[]{texSide}; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java deleted file mode 100644 index cc17f49d83..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java +++ /dev/null @@ -1,266 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTBase; -import net.minecraft.nbt.NBTTagCompound; - -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest; -import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest; - -public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { - - private final int mSize; - public int mItemCount; - public ItemStack mItemStack; - - - public GT4Entity_Shelf_Large(final int aID, final String aName, final String aNameRegional, final String aDescription, final int aSize) { - super(aID, aName, aNameRegional, aDescription); - this.mSize = aSize; - this.mItemCount = 0; - this.mItemStack = null; - } - - public GT4Entity_Shelf_Large(String mName, String mDescriptionArray, final int aSize, ITexture[][][] mTextures) { - super(mName, mDescriptionArray, mTextures); - this.mSize = aSize; - this.mItemCount = 0; - this.mItemStack = null; - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT4Entity_Shelf_Large(this.mName, this.mDescription, mSize, this.mTextures); - } - - /*@Override - public int getInvSize() { - return (mSize > 0 && mSize < 255 ? mSize : 255); - }*/ - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public boolean isDigitalChest() { - return true; - } - - @Override - public boolean isValidSlot(final int aIndex) { - return true; - } - - @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - if (KeyboardUtils.isCtrlKeyDown()) { - String itemName = (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing."); - String itemAmount = (this.mItemCount > 0 ? ""+this.mItemCount : "bad"); - String itemMessage = "This container currently holds "+(itemAmount.equalsIgnoreCase("bad") ? "nothing." : itemName+" x"+itemAmount+"."); - PlayerUtils.messagePlayer(aPlayer, itemMessage); - } - else { - aBaseMetaTileEntity.openGUI(aPlayer); - } - return true; - } - - public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_SuperChest(aPlayerInventory, aBaseMetaTileEntity); - } - - public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, - final IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_SuperChest(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setInteger("mItemCount", this.mItemCount); - if (this.mItemStack != null) { - aNBT.setTag("mItemStack", (NBTBase) this.mItemStack.writeToNBT(new NBTTagCompound())); - } - super.saveNBTData(aNBT); - - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - if (aNBT.hasKey("mItemCount")) { - this.mItemCount = aNBT.getInteger("mItemCount"); - } - if (aNBT.hasKey("mItemStack")) { - this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack")); - } - super.loadNBTData(aNBT); - } - - @Override - public void onOpenGUI() { - super.onOpenGUI(); - } - - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { - if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) { - try { - if (this.mInventory[0] != null) { - this.mType = (byte) this.mIndex; - } - else { - this.mType = 0; - } - - if (this.getItemCount() <= 0) { - this.mItemStack = null; - this.mItemCount = 0; - } - if (this.mItemStack == null && this.mInventory[0] != null) { - this.mItemStack = this.mInventory[0].copy(); - } - if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount() - && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) { - this.mItemCount += this.mInventory[0].stackSize; - if (this.mItemCount > this.getMaxItemCount()) { - this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount(); - this.mItemCount = this.getMaxItemCount(); - } else { - this.mInventory[0] = null; - } - } - if (this.mInventory[1] == null && this.mItemStack != null) { - this.mInventory[1] = this.mItemStack.copy(); - this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); - this.mItemCount -= this.mInventory[1].stackSize; - } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) - && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { - final int tmp = Math.min(this.mItemCount, - this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); - final ItemStack itemStack = this.mInventory[1]; - itemStack.stackSize += tmp; - this.mItemCount -= tmp; - } - if (this.mItemStack != null) { - this.mInventory[2] = this.mItemStack.copy(); - this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); - } else { - this.mInventory[2] = null; - } - } - catch (Throwable t) { - if (t instanceof ArrayIndexOutOfBoundsException) { - - } - } - } - } - - private int getItemCount() { - return this.mItemCount; - } - - public void setItemCount(final int aCount) { - this.mItemCount = aCount; - } - - public int getProgresstime() { - try { - return this.mItemCount + ((this.mInventory[0] == null) ? 0 : this.mInventory[0].stackSize) - + ((this.mInventory[1] == null) ? 0 : this.mInventory[1].stackSize); - } - catch (Throwable t) { - return 0; - } - } - - public int maxProgresstime() { - return this.getMaxItemCount(); - } - - public int getMaxItemCount() { - return this.mSize; - } - - public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return aIndex == 1; - } - - public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, - final ItemStack aStack) { - return aIndex == 0 && ((this.mInventory[0] == null && this.mItemStack == null) || GT_Utility.areStacksEqual(this.mInventory[0], aStack) || (this.mItemStack != null && GT_Utility.areStacksEqual(this.mItemStack, aStack))); - } - - public String[] getInfoData() { - if (this.mItemStack == null) { - return new String[]{ - this.getLocalName(), "No Items Stored", "Free Space: "+Integer.toString(this.getMaxItemCount())}; - } - return new String[]{ - this.getLocalName(), - "Storing: "+this.mItemStack.getDisplayName()+" x"+Integer.toString(this.mItemCount), - "Space Remaining: "+Integer.toString(this.getMaxItemCount()-this.getItemCount())+"/"+Integer.toString(this.getMaxItemCount())}; - } - - @Override - public String[] getDescription() { - String[] mSuper = super.getDescription(); - String[] desc = new String[mSuper.length+1]; - for (int i=0;i>mSuper.length;i++) { - desc[i] = mSuper[i]; - } - desc[desc.length-1] = "Control + Rmb block to check contents"; - return desc; - } - - @Override - public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { - Logger.INFO("1:"+aIndex); - if (aIndex == 2) { - if (ItemStack.areItemStacksEqual(aStack, mItemStack)) { - return true; - } - else { - if (mItemStack == null) { - return true; - } - return false; - } - } - return super.isItemValidForSlot(aIndex, aStack); - } - - @Override - public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { - Logger.INFO("2:"+aIndex); - if (aIndex == 0) { - if (ItemStack.areItemStacksEqual(aStack, mItemStack)) { - return true; - } - else { - if (mItemStack == null) { - return true; - } - return false; - } - } - return super.canInsertItem(aIndex, aStack, aSide); - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java deleted file mode 100644 index 27f118e363..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java +++ /dev/null @@ -1,199 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tools; - -import java.util.Arrays; -import java.util.List; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.items.behaviors.Behaviour_None; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; -import net.minecraftforge.event.world.BlockEvent; - -public class TOOL_Gregtech_AngleGrinder -extends GT_Tool { - - public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); - - - @Override - public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { - String tName = aEntity.getClass().getName(); - tName = tName.substring(tName.lastIndexOf(".") + 1); - return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; - } - - @Override - public int getToolDamagePerBlockBreak() { - return 50; - } - - @Override - public int getToolDamagePerDropConversion() { - return 100; - } - - @Override - public int getToolDamagePerContainerCraft() { - return 400; - } - - @Override - public int getToolDamagePerEntityAttack() { - return 100; - } - - @Override - public int getBaseQuality() { - return 0; - } - - @Override - public float getBaseDamage() { - return 8.0F; - } - - @Override - public float getSpeedMultiplier() { - return 2F; - } - - @Override - public float getMaxDurabilityMultiplier() { - return 1.8F; - } - - @Override - public String getCraftingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(1)); - } - - @Override - public String getEntityHitSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(2)); - } - - @Override - public String getBreakingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(0)); - } - - @Override - public String getMiningSound() { - return null; - } - - @Override - public boolean canBlock() { - return false; - } - - public boolean isWrench(){ - return false; - } - - @Override - public boolean isCrowbar() { - return false; - } - - @Override - public boolean isWeapon() { - return true; - } - - @Override - public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { - final String tTool = aBlock.getHarvestTool(aMetaData); - return (tTool != null) && (tTool.equals("sword") || tTool.equals("file")); - } - - - @Override - public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { - int rConversions = 0; - /*GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); - if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { - for (final ItemStack tDrop : aDrops) { - tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); - if (tRecipe != null) { - final ItemStack tHammeringOutput = tRecipe.getOutput(0); - if (tHammeringOutput != null) { - rConversions += tDrop.stackSize; - tDrop.stackSize *= tHammeringOutput.stackSize; - tHammeringOutput.stackSize = tDrop.stackSize; - GT_Utility.setStack(tDrop, tHammeringOutput); - } - } - } - } else { - aDrops.clear(); - aDrops.add(tRecipe.getOutput(0)); - rConversions++; - }*/ - return rConversions; - } - - @Override - public ItemStack getBrokenItem(final ItemStack aStack) { - return null; - } - - public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return (IIconContainer) (aIsToolHead - ? TexturesGtTools.ANGLE_GRINDER - : ItemIcons.POWER_UNIT_HV); - } - - public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : Materials.TungstenSteel.mRGBa; - } - - - - - @Override - public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { - super.onToolCrafted(aStack, aPlayer); - aPlayer.triggerAchievement(AchievementList.buildSword); - try { - GT_Mod.achievements.issueAchievement(aPlayer, "tools"); - GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } - } - - @Override - public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Ground out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); - } - - @Override - public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { - aItem.addItemBehavior(aID, new Behaviour_None()); - } - - @Override - public boolean isGrafter() { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java deleted file mode 100644 index 97f9a43187..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java +++ /dev/null @@ -1,180 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tools; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EntityDamageSource; -import net.minecraft.util.IChatComponent; - -import gregtech.api.GregTech_API; -import gregtech.api.damagesources.GT_DamageSources; - -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; -import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool; -import net.minecraftforge.event.world.BlockEvent; - -public abstract class TOOL_Gregtech_Base -implements Interface_ToolStats { - public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune}; - public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting}; - public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0]; - public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0]; - - @Override - public int getToolDamagePerBlockBreak() { - return 100; - } - - @Override - public int getToolDamagePerDropConversion() { - return 100; - } - - @Override - public int getToolDamagePerContainerCraft() { - return 800; - } - - @Override - public int getToolDamagePerEntityAttack() { - return 200; - } - - @Override - public float getSpeedMultiplier() { - return 1.0F; - } - - @Override - public float getMaxDurabilityMultiplier() { - return 1.0F; - } - - @Override - public int getHurtResistanceTime(final int aOriginalHurtResistance, final Entity aEntity) { - return aOriginalHurtResistance; - } - - @Override - public String getMiningSound() { - return null; - } - - @Override - public String getCraftingSound() { - return null; - } - - @Override - public String getEntityHitSound() { - return null; - } - - @Override - public String getBreakingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(0)); - } - - @Override - public int getBaseQuality() { - return 0; - } - - @Override - public boolean canBlock() { - return false; - } - - @Override - public boolean isCrowbar() { - return false; - } - - @Override - public boolean isWrench() { - return false; - } - - @Override - public boolean isWeapon() { - return false; - } - - @Override - public boolean isRangedWeapon() { - return false; - } - - @Override - public boolean isMiningTool() { - return true; - } - - public boolean isChainsaw(){ - return false; - } - - - @Override - public boolean isGrafter(){ - return false; - } - - - @Override - public DamageSource getDamageSource(final EntityLivingBase aPlayer, final Entity aEntity) { - return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); - } - - public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity); - } - - @Override - public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { - return 0; - } - - @Override - public ItemStack getBrokenItem(final ItemStack aStack) { - return null; - } - - @Override - public Enchantment[] getEnchantments(final ItemStack aStack) { - return ZERO_ENCHANTMENTS; - } - - @Override - public int[] getEnchantmentLevels(final ItemStack aStack) { - return ZERO_ENCHANTMENT_LEVELS; - } - - @Override - public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { - aPlayer.triggerAchievement(AchievementList.openInventory); - aPlayer.triggerAchievement(AchievementList.mineWood); - aPlayer.triggerAchievement(AchievementList.buildWorkBench); - } - - @Override - public void onStatsAddedToTool(final Gregtech_MetaTool aItem, final int aID) { - } - - @Override - public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { - return aOriginalDamage; - } - - @Override - public float getMagicDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { - return aOriginalDamage; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java deleted file mode 100644 index 1fd1e8241a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java +++ /dev/null @@ -1,196 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tools; - -import java.util.Arrays; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.common.tools.GT_Tool; - -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher; -import net.minecraftforge.event.world.BlockEvent; - -public class TOOL_Gregtech_Choocher -extends GT_Tool { - - public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); - - - @Override - public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { - String tName = aEntity.getClass().getName(); - tName = tName.substring(tName.lastIndexOf(".") + 1); - return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; - } - - @Override - public int getToolDamagePerBlockBreak() { - return 50; - } - - @Override - public int getToolDamagePerDropConversion() { - return 100; - } - - @Override - public int getToolDamagePerContainerCraft() { - return 400; - } - - @Override - public int getToolDamagePerEntityAttack() { - return 100; - } - - @Override - public int getBaseQuality() { - return 0; - } - - @Override - public float getBaseDamage() { - return 4.0F; - } - - @Override - public float getSpeedMultiplier() { - return 0.85F; - } - - @Override - public float getMaxDurabilityMultiplier() { - return 1.2F; - } - - @Override - public String getCraftingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(1)); - } - - @Override - public String getEntityHitSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(2)); - } - - @Override - public String getBreakingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(0)); - } - - @Override - public String getMiningSound() { - return null; - } - - @Override - public boolean canBlock() { - return true; - } - - public boolean isWrench(){ - return true; - } - - @Override - public boolean isCrowbar() { - return false; - } - - @Override - public boolean isWeapon() { - return true; - } - - @Override - public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { - final String tTool = aBlock.getHarvestTool(aMetaData); - return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench")) || (tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge); - } - - @Override - public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { - int rConversions = 0; - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); - if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { - for (final ItemStack tDrop : aDrops) { - tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); - if (tRecipe != null) { - final ItemStack tHammeringOutput = tRecipe.getOutput(0); - if (tHammeringOutput != null) { - rConversions += tDrop.stackSize; - tDrop.stackSize *= tHammeringOutput.stackSize; - tHammeringOutput.stackSize = tDrop.stackSize; - GT_Utility.setStack(tDrop, tHammeringOutput); - } - } - } - } else { - aDrops.clear(); - aDrops.add(tRecipe.getOutput(0)); - rConversions++; - } - return rConversions; - } - - @Override - public ItemStack getBrokenItem(final ItemStack aStack) { - return null; - } - - @Override - public IIconContainer getIcon(final boolean aIsToolHead, final ItemStack aStack) { - //Utils.LOG_INFO("Texture: "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile()); - return TexturesGtTools.SKOOKUM_CHOOCHER; - } - - @Override - public short[] getRGBa(final boolean aIsToolHead, final ItemStack aStack) { - return GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa; - } - - @Override - public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { - super.onToolCrafted(aStack, aPlayer); - aPlayer.triggerAchievement(AchievementList.buildSword); - try { - GT_Mod.achievements.issueAchievement(aPlayer, "tools"); - GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } - } - - @Override - public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); - } - - @Override - public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { - aItem.addItemBehavior(aID, new Behaviour_Choocher()); - } - - @Override - public boolean isGrafter() { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java deleted file mode 100644 index 7aa7529817..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java +++ /dev/null @@ -1,192 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tools; - -import java.util.Arrays; -import java.util.List; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.items.behaviors.Behaviour_None; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import net.minecraft.block.Block; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; -import net.minecraftforge.event.world.BlockEvent; - -public class TOOL_Gregtech_ElectricButcherKnife -extends GT_Tool { - - public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); - - - @Override - public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { - String tName = aEntity.getClass().getName(); - tName = tName.substring(tName.lastIndexOf(".") + 1); - return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; - } - - @Override - public int getToolDamagePerBlockBreak() { - return 100; - } - - @Override - public int getToolDamagePerDropConversion() { - return 100; - } - - @Override - public int getToolDamagePerContainerCraft() { - return 100; - } - - @Override - public int getToolDamagePerEntityAttack() { - return 200; - } - - @Override - public int getBaseQuality() { - return 0; - } - - @Override - public float getBaseDamage() { - return 8.0F; - } - - @Override - public float getSpeedMultiplier() { - return 2F; - } - - @Override - public float getMaxDurabilityMultiplier() { - return 1.8F; - } - - @Override - public String getCraftingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(1)); - } - - @Override - public String getEntityHitSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(2)); - } - - @Override - public String getBreakingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(0)); - } - - @Override - public String getMiningSound() { - return null; - } - - @Override - public boolean canBlock() { - return false; - } - - public boolean isWrench(){ - return false; - } - - @Override - public boolean isCrowbar() { - return false; - } - - @Override - public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { - final String tTool = aBlock.getHarvestTool(aMetaData); - return (tTool != null) && (tTool.equals("sword") || tTool.equals("knife")); - } - - @Override - public ItemStack getBrokenItem(final ItemStack aStack) { - return null; - } - - public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return (IIconContainer) (aIsToolHead - ? TexturesGtTools.ELECTRIC_BUTCHER_KNIFE - : ItemIcons.POWER_UNIT_HV); - } - - public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : Materials.RedSteel.mRGBa; - } - - - - - @Override - public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { - super.onToolCrafted(aStack, aPlayer); - aPlayer.triggerAchievement(AchievementList.buildSword); - try { - GT_Mod.achievements.issueAchievement(aPlayer, "tools"); - GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } - } - - @Override - public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Sliced out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); - } - - @Override - public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { - aItem.addItemBehavior(aID, new Behaviour_None()); - } - - @Override - public boolean isGrafter() { - return false; - } - - @Override - public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { - return aOriginalHurtResistance * 2; - } - - @Override - public boolean isWeapon() { - return true; - } - - @Override - public boolean isMiningTool() { - return false; - } - - @Override - public Enchantment[] getEnchantments(ItemStack aStack) { - return LOOTING_ENCHANTMENT; - } - - @Override - public int[] getEnchantmentLevels(ItemStack aStack) { - return new int[]{(4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java deleted file mode 100644 index 395a7c42cb..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java +++ /dev/null @@ -1,166 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tools; - -import java.util.Arrays; -import java.util.List; - -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.tools.GT_Tool; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter; -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.EntityIronGolem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; - -public class TOOL_Gregtech_ElectricLighter -extends GT_Tool { - - public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); - - - @Override - public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { - String tName = aEntity.getClass().getName(); - tName = tName.substring(tName.lastIndexOf(".") + 1); - return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; - } - - @Override - public int getToolDamagePerBlockBreak() { - return 50; - } - - @Override - public int getToolDamagePerDropConversion() { - return 100; - } - - @Override - public int getToolDamagePerContainerCraft() { - return 400; - } - - @Override - public int getToolDamagePerEntityAttack() { - return 100; - } - - @Override - public int getBaseQuality() { - return 0; - } - - @Override - public float getBaseDamage() { - return 8.0F; - } - - @Override - public float getSpeedMultiplier() { - return 2F; - } - - @Override - public float getMaxDurabilityMultiplier() { - return 1.8F; - } - - @Override - public String getCraftingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(1)); - } - - @Override - public String getEntityHitSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(2)); - } - - @Override - public String getBreakingSound() { - return GregTech_API.sSoundList.get(Integer.valueOf(0)); - } - - @Override - public String getMiningSound() { - return null; - } - - @Override - public boolean canBlock() { - return false; - } - - public boolean isWrench(){ - return false; - } - - @Override - public boolean isCrowbar() { - return false; - } - - @Override - public boolean isWeapon() { - return true; - } - - @Override - public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { - return false; - } - - @Override - public ItemStack getBrokenItem(final ItemStack aStack) { - return null; - } - - public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return (IIconContainer) (aIsToolHead - ? TexturesGtTools.ELECTRIC_LIGHTER - : ItemIcons.POWER_UNIT_HV); - } - - public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : Materials.Silver.mRGBa; - } - - @Override - public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { - super.onToolCrafted(aStack, aPlayer); - aPlayer.triggerAchievement(AchievementList.buildSword); - try { - GT_Mod.achievements.issueAchievement(aPlayer, "tools"); - GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } - } - - @Override - public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been burnt out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); - } - - @Override - public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { - aItem.addItemBehavior(aID, new Behaviour_Electric_Lighter()); - } - - @Override - public boolean isGrafter() { - return false; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java deleted file mode 100644 index 2277ce339f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java +++ /dev/null @@ -1,97 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.tools; - -import gregtech.GT_Mod; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures.ItemIcons; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.common.tools.GT_Tool_WireCutter; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.stats.AchievementList; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IChatComponent; - -public class TOOL_Gregtech_ElectricSnips -extends GT_Tool_WireCutter { - - - @Override - public int getToolDamagePerBlockBreak() { - return 50; - } - - @Override - public int getToolDamagePerDropConversion() { - return 100; - } - - @Override - public int getToolDamagePerContainerCraft() { - return 400; - } - - @Override - public int getToolDamagePerEntityAttack() { - return 100; - } - - @Override - public int getBaseQuality() { - return 0; - } - - @Override - public float getBaseDamage() { - return 4.0F; - } - - @Override - public float getSpeedMultiplier() { - return 1F; - } - - @Override - public float getMaxDurabilityMultiplier() { - return 1.4F; - } - - @Override - public ItemStack getBrokenItem(final ItemStack aStack) { - return null; - } - - public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { - return (IIconContainer) (aIsToolHead - ? TexturesGtTools.ELECTRIC_SNIPS - : ItemIcons.POWER_UNIT_MV); - } - - public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { - return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : Materials.TungstenSteel.mRGBa; - } - - - - @Override - public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { - super.onToolCrafted(aStack, aPlayer); - aPlayer.triggerAchievement(AchievementList.buildSword); - try { - GT_Mod.achievements.issueAchievement(aPlayer, "tools"); - GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); - } catch (final Exception e) { - } - } - - @Override - public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { - return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Snipped out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java deleted file mode 100644 index 4c8707e5e8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java +++ /dev/null @@ -1,290 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.lang.reflect.*; -import java.util.HashMap; -import java.util.Map; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class GT_Material_Loader { - - private volatile static GT_Material_Loader instance = new GT_Material_Loader(); - private volatile Object mProxyObject; - private static AutoMap mMaterials = new AutoMap(); - private static volatile boolean mHasRun = false; - - public synchronized GT_Material_Loader getInstance(){ - return GT_Material_Loader.instance; - } - - public synchronized boolean getRunAbility(){ - return (mHasRun ? false : true); - } - public synchronized void setRunAbility(boolean b){ - mHasRun = Utils.invertBoolean(b); - } - - public GT_Material_Loader() { - if (getRunAbility()){ - //Set Singleton Instance - instance = this; - - //Try Reflectively add ourselves to the GT loader. - Class mInterface = ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler"); - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && mInterface != null){ - - //Make this class Dynamically implement IMaterialHandler - if (mProxyObject == null){ - mProxyObject = Proxy.newProxyInstance( - mInterface.getClassLoader(), new Class[] { mInterface }, - new MaterialHandler(getInstance())); - } - - if (ReflectionUtils.invoke(Materials.class, "add", new Class[]{ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler")}, new Object[]{mProxyObject})){ - Logger.REFLECTION("Successfully invoked add, on the proxied object implementing IMaterialHandler."); - - - Logger.REFLECTION("Examining Proxy to ensure it implements the correct Interface."); - Class[] i = mProxyObject.getClass().getInterfaces(); - for (int r=0;r 0){ - Logger.DEBUG_MATERIALS("Success - Re-enabled all components for "+MaterialUtils.getMaterialName(material)); - } - else { - Logger.DEBUG_MATERIALS("Failure - Did not enable any components for "+MaterialUtils.getMaterialName(material)); - } - return mValid > 0; - } - catch (SecurityException | IllegalArgumentException e) { - Logger.DEBUG_MATERIALS("Total Failure - Unable to re-enable "+MaterialUtils.getMaterialName(material)+". Most likely an IllegalArgumentException, but small chance it's a SecurityException."); - return false; - } - } - - - - - - - - - - /** - * Special Dynamic Interface Class - */ - - public class MaterialHandler implements InvocationHandler { - - private final Map methods = new HashMap(); - private Object target; - - public MaterialHandler(Object target) { - Logger.REFLECTION("Created a Proxy Interface which implements IMaterialHandler."); - this.target = target; - for(Method method: target.getClass().getDeclaredMethods()) { - Logger.REFLECTION("Adding "+method.getName()+" to internal method map."); - this.methods.put(method.getName(), method); - } - } - - @Override - public Object invoke(Object proxy, Method method, Object[] args) - throws Throwable { - long start = System.nanoTime(); - Object result = methods.get(method.getName()).invoke(target, args); - long elapsed = System.nanoTime() - start; - Logger.INFO("[Debug] Executed "+method.getName()+" in "+elapsed+" ns"); - return result; - } - } - - - /* - public static class ProxyListener implements java.lang.reflect.InvocationHandler { - - public static Object IMaterialHandlerProxy; - - ProxyListener(){ - - Logger.REFLECTION("Failed setting IMaterialHandler Proxy instance."); - } - - //Loading the class at runtime - public static void main(String[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException { - Class someInterface = ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler"); - Object instance = Proxy.newProxyInstance(someInterface.getClassLoader(), new Class[]{someInterface}, new InvocationHandler() { - - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - //Handle the invocations - if(method.getName().equals("onMaterialsInit")){ - Logger.REFLECTION("Invoked onMaterialsInit() via IMaterialHandler proxy"); - return 1; - } - else if(method.getName().equals("onComponentInit")){ - Logger.REFLECTION("Invoked onComponentInit() via IMaterialHandler proxy"); - return 2; - } - else if(method.getName().equals("onComponentIteration")){ - Logger.REFLECTION("Invoked onComponentIteration() via IMaterialHandler proxy"); - return 3; - } - else { - return -1; - } - } - }); - System.out.println(instance.getClass().getDeclaredMethod("someMethod", (Class[])null).invoke(instance, new Object[]{})); - } - - private static class MaterialHandler implements InvocationHandler { - private final Object original; - - public MaterialHandler(Object original) { - this.original = original; - } - - @Override - public Object invoke(Object proxy, Method method, Object[] args) - throws IllegalAccessException, IllegalArgumentException, - InvocationTargetException { - System.out.println("BEFORE"); - method.invoke(original, args); - System.out.println("AFTER"); - return null; - } - } - - public static void init(){ - - Class someInterface = ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler"); - GT_Material_Loader original = GT_Material_Loader.instance; - MaterialHandler handler = new MaterialHandler(original); - - Object f = Proxy.newProxyInstance(someInterface.getClassLoader(), - new Class[] { someInterface }, - handler); - - f.originalMethod("Hallo"); - } - - - - } - - */ -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java deleted file mode 100644 index e918d8015e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.xmod.gregtech.common.blocks.*; - -public class Gregtech_Blocks { - - public static void run(){ - - //Casing Blocks - ModBlocks.blockCasingsMisc = new GregtechMetaCasingBlocks(); - ModBlocks.blockCasings2Misc = new GregtechMetaCasingBlocks2(); - ModBlocks.blockCasings3Misc = new GregtechMetaCasingBlocks3(); - ModBlocks.blockCasings4Misc = new GregtechMetaCasingBlocks4(); - ModBlocks.blockCasings5Misc = new GregtechMetaCasingBlocks5(); - - ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1(); - ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings(); - ModBlocks.blockCustomMachineCasings = new GregtechMetaSpecialMachineCasings(); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java deleted file mode 100644 index 51316f024a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java +++ /dev/null @@ -1,135 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.loaders; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_ModHandler.RecipeBits; -import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import net.minecraft.item.ItemStack; - -public class ProcessingAngleGrinder implements Interface_OreRecipeRegistrator, Runnable { - public ProcessingAngleGrinder() { - GregtechOrePrefixes.toolAngleGrinder.add(this); - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { - if (aMaterial != Materials.Rubber) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING))) { - - } - } - } - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - // TODO Auto-generated method stub - - } - - public void materialsLoops() { - final Materials[] i = Materials.values(); - final int size = i.length; - Logger.MATERIALS("Materials to attempt tool gen. with: " + size); - int used = 0; - Materials aMaterial = null; - for (int r = 0; r < size; r++) { - aMaterial = i[r]; - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) - && (aMaterial != Materials._NULL)) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) - && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) - && (!aMaterial.contains(SubTag.NO_SMELTING))) { - Logger.MATERIALS("Generating Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)); - // Input 1 - - - final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); - final ItemStack longrod = GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L); - - if ((null != plate && longrod != null)) { - addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); - addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); - addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); - used++; - } else { - Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+(longrod == null)+" |"); - } - // GT_ModHandler.addCraftingRecipe(, - // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | - // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", - // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), - // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), - // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); - } else { - Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)); - } - } else { - Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)); - } - - } - - Logger.INFO("Materials used for tool gen: " + used); - } - - @Override - public void run() { - Logger.INFO("Generating Angle Grinders for all valid GT Materials."); - this.materialsLoops(); - } - - public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { - - ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( - MetaGeneratedGregtechTools.ANGLE_GRINDER, - 1, - aMaterial, - Materials.Titanium, - new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); - - - - long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); - if (aDura <= 32000) { - Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); - return false; - } - - return GT_ModHandler.addCraftingRecipe( - aOutputStack, - RecipeBits.DISMANTLEABLE | RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, - new Object[]{ - "SXL", - "GMG", - "PBP", - 'X', ItemList.Component_Grinder_Tungsten.get(1), - 'M', CI.getElectricMotor(aVoltageTier, 1), - 'S', OrePrefixes.screw.get(Materials.Titanium), - 'L', OrePrefixes.stickLong.get(aMaterial), - 'P', OrePrefixes.plate.get(aMaterial), - 'G', ELEMENT.STANDALONE.BLACK_METAL.getGear(1), - 'B', aBattery - }); - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java deleted file mode 100644 index 9fe9ad7816..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java +++ /dev/null @@ -1,134 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.loaders; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_ModHandler.RecipeBits; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import net.minecraft.item.ItemStack; - -public class ProcessingElectricButcherKnife implements Interface_OreRecipeRegistrator, Runnable { - public ProcessingElectricButcherKnife() { - GregtechOrePrefixes.toolElectricButcherKnife.add(this); - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { - if (aMaterial != Materials.Rubber) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING))) { - - } - } - } - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - // TODO Auto-generated method stub - - } - - public void materialsLoops() { - final Materials[] i = Materials.values(); - final int size = i.length; - Logger.MATERIALS("Materials to attempt tool gen. with: " + size); - int used = 0; - Materials aMaterial = null; - for (int r = 0; r < size; r++) { - aMaterial = i[r]; - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) - && (aMaterial != Materials._NULL)) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) - && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) - && (!aMaterial.contains(SubTag.NO_SMELTING))) { - Logger.MATERIALS("Generating Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)); - // Input 1 - - - final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); - final ItemStack screw = GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L); - - if ((null != plate) && screw != null) { - addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); - addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); - addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); - used++; - } else { - Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+" |"); - } - // GT_ModHandler.addCraftingRecipe(, - // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | - // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", - // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), - // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), - // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); - } else { - Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)); - } - } else { - Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)); - } - - } - - Logger.INFO("Materials used for tool gen: " + used); - } - - @Override - public void run() { - Logger.INFO("Generating Electric Butcher Knives for all valid GT Materials."); - this.materialsLoops(); - } - - public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { - - ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( - MetaGeneratedGregtechTools.ELECTRIC_BUTCHER_KNIFE, - 1, - aMaterial, - Materials.Titanium, - new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); - - ItemStack aInputCutter = GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, - 1, - aMaterial, - aMaterial, - null); - - long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); - if (aDura <= 32000) { - Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); - return false; - } - - - - return RecipeUtils.addShapedRecipe( - OrePrefixes.wireFine.get(Materials.Electrum), aInputCutter, OrePrefixes.wireFine.get(Materials.Electrum), - OrePrefixes.plate.get(aMaterial), CI.getElectricMotor(aVoltageTier, 1), OrePrefixes.plate.get(aMaterial), - OrePrefixes.screw.get(aMaterial), aBattery, OrePrefixes.screw.get(aMaterial), - aOutputStack); - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java deleted file mode 100644 index 5f6c5a0427..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java +++ /dev/null @@ -1,131 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.loaders; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_ModHandler.RecipeBits; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import net.minecraft.item.ItemStack; - -public class ProcessingElectricLighter implements Interface_OreRecipeRegistrator, Runnable { - public ProcessingElectricLighter() { - GregtechOrePrefixes.toolElectricLighter.add(this); - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { - if (aMaterial != Materials.Rubber) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING))) { - - } - } - } - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - // TODO Auto-generated method stub - - } - - public void materialsLoops() { - final Materials[] i = Materials.values(); - final int size = i.length; - Logger.MATERIALS("Materials to attempt tool gen. with: " + size); - int used = 0; - Materials aMaterial = null; - for (int r = 0; r < size; r++) { - aMaterial = i[r]; - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) - && (aMaterial != Materials._NULL)) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) - && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) - && (!aMaterial.contains(SubTag.NO_SMELTING))) { - Logger.MATERIALS("Generating Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)); - // Input 1 - - - final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); - - if ((null != plate)) { - addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); - addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); - addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); - used++; - } else { - Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+" |"); - } - // GT_ModHandler.addCraftingRecipe(, - // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | - // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", - // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), - // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), - // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); - } else { - Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)); - } - } else { - Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)); - } - - } - - Logger.INFO("Materials used for tool gen: " + used); - } - - @Override - public void run() { - Logger.INFO("Generating Electric Lighters for all valid GT Materials."); - this.materialsLoops(); - } - - public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { - - ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( - MetaGeneratedGregtechTools.ELECTRIC_LIGHTER, - 1, - aMaterial, - Materials.Titanium, - new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); - - ItemStack aInputCutter = GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, - 1, - aMaterial, - aMaterial, - null); - - long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); - if (aDura <= 32000) { - Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); - return false; - } - - return RecipeUtils.addShapedRecipe( - OrePrefixes.wireGt04.get(Materials.Gold), aInputCutter, OrePrefixes.wireGt04.get(Materials.Gold), - ELEMENT.STANDALONE.RUNITE.getPlate(1), CI.getSensor(aVoltageTier, 1), ELEMENT.STANDALONE.RUNITE.getPlate(1), - OrePrefixes.plate.get(aMaterial), aBattery, OrePrefixes.plate.get(aMaterial), - aOutputStack); - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java deleted file mode 100644 index dfcb7de4f8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java +++ /dev/null @@ -1,130 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.loaders; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_ModHandler.RecipeBits; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; -import net.minecraft.item.ItemStack; - -public class ProcessingElectricSnips implements Interface_OreRecipeRegistrator, Runnable { - public ProcessingElectricSnips() { - GregtechOrePrefixes.toolElectricSnips.add(this); - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { - if (aMaterial != Materials.Rubber) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING))) { - - } - } - } - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, - final String aModName, final ItemStack aStack) { - // TODO Auto-generated method stub - - } - - public void materialsLoops() { - final Materials[] i = Materials.values(); - final int size = i.length; - Logger.MATERIALS("Materials to attempt tool gen. with: " + size); - int used = 0; - Materials aMaterial = null; - for (int r = 0; r < size; r++) { - aMaterial = i[r]; - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) - && (aMaterial != Materials._NULL)) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) - && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) - && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) - && (!aMaterial.contains(SubTag.NO_SMELTING))) { - Logger.MATERIALS("Generating Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)); - // Input 1 - - - final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); - - if ((null != plate)) { - addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); - addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); - addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); - used++; - } else { - Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+" |"); - } - // GT_ModHandler.addCraftingRecipe(, - // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | - // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", - // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), - // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), - // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); - } else { - Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)); - } - } else { - Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)); - } - - } - - Logger.INFO("Materials used for tool gen: " + used); - } - - @Override - public void run() { - Logger.INFO("Generating Electric Snips for all valid GT Materials."); - this.materialsLoops(); - } - - public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { - - ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( - MetaGeneratedGregtechTools.ELECTRIC_SNIPS, - 1, - aMaterial, - Materials.Titanium, - new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); - - ItemStack aInputCutter = GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.WIRECUTTER, - 1, - aMaterial, - aMaterial, - null); - - long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); - if (aDura <= 32000) { - Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); - return false; - } - return RecipeUtils.addShapedRecipe( - OrePrefixes.wireFine.get(Materials.Electrum), aInputCutter, OrePrefixes.wireFine.get(Materials.Electrum), - ELEMENT.STANDALONE.WHITE_METAL.getGear(1), CI.getElectricMotor(aVoltageTier, 1), ELEMENT.STANDALONE.WHITE_METAL.getGear(1), - OrePrefixes.plate.get(aMaterial), aBattery, OrePrefixes.plate.get(aMaterial), - aOutputStack); - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java deleted file mode 100644 index e4858f8cd1..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java +++ /dev/null @@ -1,92 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; -import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; - -public class ProcessingToolHeadChoocher implements Interface_OreRecipeRegistrator, Runnable { - public ProcessingToolHeadChoocher() { - GregtechOrePrefixes.toolSkookumChoocher.add(this); - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { - if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { - if (aMaterial != Materials.Rubber) { - if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) && (!aMaterial.contains(SubTag.NO_SMASHING))) { - GT_ModHandler.addCraftingRecipe(MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(16, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial)}); - } - } - } - } - - @Override - public void registerOre(final GregtechOrePrefixes aPrefix, - final GT_Materials aMaterial, final String aOreDictName, final String aModName, - final ItemStack aStack) { - // TODO Auto-generated method stub - - } - - public void materialsLoops(){ - final Materials[] i = Materials.values(); - final int size = i.length; - Logger.WARNING("Materials to attempt tool gen. with: "+size); - int used = 0; - Materials aMaterial = null; - for (int r=0;r> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_AlloySmelter(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - final int tVoltageMultiplier = material.vVoltageMultiplier; - - - - //Nuggets - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getNugget(1))) - GT_Values.RA.addAlloySmelterRecipe( - material.getIngot(1), - ItemList.Shape_Mold_Nugget.get(0), - material.getNugget(9), - (int) Math.max(material.getMass() * 2L, 1L), - tVoltageMultiplier); - - //Gears - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) - GT_Values.RA.addAlloySmelterRecipe( - material.getIngot(8), - ItemList.Shape_Mold_Gear.get(0), - material.getGear(1), - (int) Math.max(material.getMass() * 2L, 1L), - tVoltageMultiplier); - - //Ingot - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getNugget(1))) - GT_Values.RA.addAlloySmelterRecipe( - material.getNugget(9), - ItemList.Shape_Mold_Ingot.get(0), - material.getIngot(1), - (int) Math.max(material.getMass() * 2L, 1L), - tVoltageMultiplier); - - } - -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java deleted file mode 100644 index d7244919d8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; - -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class RecipeGen_Assembler extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_Assembler(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - - //Frame Box - if (ItemUtils.checkForInvalidItems(new ItemStack[] {material.getRod(1), material.getFrameBox(1)})) - GT_Values.RA.addAssemblerRecipe( - material.getRod(4), - ItemUtils.getGregtechCircuit(4), - material.getFrameBox(1), - 60, - material.vVoltageMultiplier); - - //Rotor - if (ItemUtils.checkForInvalidItems(new ItemStack[] {material.getPlate(1), material.getRing(1), material.getRotor(1)})) - addAssemblerRecipe( - material.getPlate(4), - material.getRing(1), - material.getRotor(1), - 240, - material.vVoltageMultiplier); - - } - - private static void addAssemblerRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1, final int seconds, final int euCost){ - GT_Values.RA.addAssemblerRecipe( - input1, - input2, - FluidUtils.getFluidStack("molten.solderingalloy", 16), - output1, - seconds, - euCost); - GT_Values.RA.addAssemblerRecipe( - input1, - input2, - FluidUtils.getFluidStack("molten.tin", 32), - output1, - seconds, - euCost); - GT_Values.RA.addAssemblerRecipe( - input1, - input2, - FluidUtils.getFluidStack("molten.lead", 48), - output1, - seconds, - euCost); - } - - -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java deleted file mode 100644 index 7e9153679f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java +++ /dev/null @@ -1,16 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.core.material.Material; - -public abstract class RecipeGen_Base implements RunnableWithInfo{ - - protected Material toGenerate; - protected boolean disableOptional; - - @Override - public Material getInfoData() { - return toGenerate; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java deleted file mode 100644 index 9e58d486d3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java +++ /dev/null @@ -1,280 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.material.nuclear.NUCLIDE; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeGen_BlastSmelter extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_BlastSmelter(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateARecipe(this.toGenerate); - } - - private void generateARecipe(final Material M){ - - //Add a Blast Smelting Recipe, Let's go! - ItemStack tStack; - if (null != (tStack = M.getDust(1))) { - - final Material[] badMaterials = { - FLUORIDES.THORIUM_HEXAFLUORIDE, - FLUORIDES.THORIUM_TETRAFLUORIDE, - ALLOY.BLOODSTEEL, - NUCLIDE.LiFBeF2ThF4UF4, - NUCLIDE.LiFBeF2ZrF4UF4, - NUCLIDE.LiFBeF2ZrF4U235 - }; - for (final Material R : badMaterials){ - if (M == R){ - return; - } - } - - //Prepare some Variables - ItemStack[] components; - ArrayList tMaterial = new ArrayList<>(); - int inputStackCount=0; - int fluidAmount=0; - final boolean doTest = true; - tMaterial = M.getComposites(); - - //This Bad boy here is what dictates unique recipes. Fuck life, right? - ItemStack circuitGT = ItemUtils.getGregtechCircuit(0); - - - //Set a duration - OLD - /*int duration = 0; - if (M.getMeltingPointK() > 150){ - duration = (int) Math.max(M.getMass() / 50L, 1L) * M.getMeltingPointK(); - } - else { - duration = (int) Math.max(M.getMass() / 50L, 1L) * 150; - }*/ - - long aVoltage = MaterialUtils.getVoltageForTier(M.vTier); - - - //Set a duration - NEW - int duration = 120*M.vTier*10; - - if (M.vTier <= 4){ - duration = 20*M.vTier*10; - } - - int mMaterialListSize=0; - - int mTotalPartsCounter = M.smallestStackSizeWhenProcessing; - - if (M.getComposites() != null){ - for (final gtPlusPlus.core.material.MaterialStack ternkfsdf : M.getComposites()){ - if (ternkfsdf != null) { - mMaterialListSize++; - //mTotalPartsCounter += ternkfsdf.getSmallestStackSizes()[0]; - } - } - } - else { - mMaterialListSize = 1; - } - - if (duration <= 0){ - final int second = 20; - duration = 14*second*mMaterialListSize*8; - } - - Logger.WARNING("[BAS] Size: "+mMaterialListSize); - - - //Make a simple one Material Materialstack[] and log it for validity. - circuitGT = ItemUtils.getGregtechCircuit(1); - final ItemStack[] tItemStackTest = new ItemStack[]{circuitGT, tStack}; - inputStackCount = 1; - fluidAmount = 144*inputStackCount; - Logger.WARNING("[BAS] Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+". Gives "+fluidAmount+"L of molten metal."); - for (int das=0;das 1); - - //Generate Recipes for all singular materials that can be made molten. - if (hasMoreInputThanACircuit){ - if (M.requiresBlastFurnace()) { - if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, (duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)), (int) aVoltage)){ - Logger.WARNING("[BAS] Success."); - Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe."); - if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration, 120)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - } - if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/9, 120)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - } - /*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - } - if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/9, 120)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - }*/ - } - } - else { - Logger.WARNING("[BAS] Failed."); - } - } - else { - if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)/2, (int) aVoltage)){ - Logger.WARNING("[BAS] Success."); - if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), M.getFluidStack(144), M.getIngot(1), duration/2, 60)){ - Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe."); - if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration/2, 60)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - } - if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/2/9, 60)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - } - /*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - } - if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/2/9, 60)){ - Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); - }*/ - } - } - else { - Logger.WARNING("[BAS] Failed."); - } - } - - if (tMaterial != null){ - //Reset the Variables for compounds if last recipe was a success. - inputStackCount=0; - - //If this Material has some kind of compound list, proceed - if (mMaterialListSize > 1){ - final gtPlusPlus.core.material.MaterialStack[] tempStack = new gtPlusPlus.core.material.MaterialStack[mMaterialListSize]; - circuitGT = ItemUtils.getGregtechCircuit(mMaterialListSize); - //Just double checking - if (tempStack.length > 1){ - - //Builds me a MaterialStack[] from the MaterialList of M. - int ooo=0; - for (final gtPlusPlus.core.material.MaterialStack xMaterial : M.getComposites()){ - if (xMaterial != null){ - if (xMaterial.getStackMaterial() != null){ - Logger.WARNING("[BAS] FOUND: "+xMaterial.getStackMaterial().getLocalizedName()); - Logger.WARNING("[BAS] ADDING: "+xMaterial.getStackMaterial().getLocalizedName()); - } - tempStack[ooo] = xMaterial; - } - ooo++; - } - - //Builds me an ItemStack[] of the materials. - Without a circuit - this gets a good count for the 144L fluid multiplier - components = new ItemStack[9]; - inputStackCount=0; - FluidStack componentsFluid = null; - for (int irc=0;irc 0) && (xr <= 100)){ - final int mathmatics = (r*1000); - componentsFluid = FluidUtils.getFluidStack(M.getComposites().get(irc).getStackMaterial().getFluidStack(mathmatics), mathmatics); - } - } - else { - components[irc] = M.getComposites().get(irc).getDustStack(r); - } - } - } - - - //Adds a circuit - if ((mMaterialListSize < 9) && (mMaterialListSize != 0)){ - final ItemStack[] components_NoCircuit = components; - //Builds me an ItemStack[] of the materials. - With a circuit - components = new ItemStack[components_NoCircuit.length+1]; - for (int fr=0;fr 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); - if (aMaterial.mBlastFurnaceTemp <= 1000) { - GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copyAmount(1L, new Object[]{tDustStack}), aMaterial.mBlastFurnaceTemp); - } - } - } - } - case ingot: - if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ - if ((null != (tDustStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L))) && (!aMaterial.contains(SubTag.NO_SMELTING))) { - if (aMaterial.mBlastFurnaceRequired) { - addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); - } - } - } - break; - case dustSmall: - if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ - if (aMaterial.mBlastFurnaceRequired) { - addBlastRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); - } - } - break; - case dustTiny: - if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ - if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) { - if (aMaterial.mBlastFurnaceRequired) { - addBlastRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); - - } - } - } - break; - default: - if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ - if (!aMaterial.contains(SubTag.NO_SMELTING)) { - if ((aMaterial.mBlastFurnaceRequired) || (aMaterial.mDirectSmelting.mBlastFurnaceRequired)) { - addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); - if (aMaterial.mBlastFurnaceTemp <= 1000) - GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), aMaterial.mBlastFurnaceTemp * 2); - } - } - } - break; - } - } - - public boolean addBlastRecipe(ItemStack input1, ItemStack input2, - FluidStack fluid1, FluidStack fluid2, ItemStack output1, - ItemStack output2, int time, int euCost, Materials smeltInto) { - - //Set up variables. - ItemStack[] components; - int count = 0; - - if (smeltInto == Materials._NULL){ - //If the material is null then we probably don't want to try. - return false; - } - if (input1 != null && input2 != null){ - count = 2; - } - else if (input1 == null && input2 == null){ - //If both inputs are null, then we don't want to try. - return false; - } - else { - count = 1; - } - //Set up input components. - ItemStack configCircuit = ItemUtils.getGregtechCircuit(count); - components = new ItemStack[]{configCircuit, input1, input2}; - if (fluid1 != null || fluid2 != null){ - //If it uses an input fluid, we cannot handle this. So let's not try. (Annealed copper for example) - //return false; - if (fluid1 != null && fluid2 != null){ - //Cannot handle two input fluids - return false; - } - - FluidStack mInputfluidstack; - mInputfluidstack = (fluid1 != null) ? fluid1 : fluid2; - - //Try with new handler - //Add Blast Smelter Recipe. - return CORE.RA.addBlastSmelterRecipe( - components, - mInputfluidstack, - smeltInto.mSmeltInto.getMolten(144L), - 100, - MathUtils.roundToClosestInt(time*0.8), - euCost); // EU Cost - - } - - //Add Blast Smelter Recipe. - return CORE.RA.addBlastSmelterRecipe( - components, - smeltInto.mSmeltInto.getMolten(144L), - 100, - MathUtils.roundToClosestInt(time*0.8), - euCost); // EU Cost - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java deleted file mode 100644 index 63c2d18783..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java +++ /dev/null @@ -1,215 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import gregtech.api.util.*; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.ItemStackData; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.HashMap; -import java.util.Map; - -public class RecipeGen_BlastSmelterGT_GTNH { - - private static Map mCachedIngotToFluidRegistry = new HashMap(); - private static Map mCachedHotToColdRegistry = new HashMap(); - - private synchronized static void setIngotToFluid(final ItemStackData stack, final FluidStack fluid) { - if (stack != null && fluid != null) { - mCachedIngotToFluidRegistry.put(stack.getUniqueDataIdentifier(), fluid); - } - } - - private synchronized static void setHotToCold(final ItemStackData hot, final ItemStackData cold) { - if (hot != null && cold != null) { - mCachedHotToColdRegistry.put(hot.getUniqueDataIdentifier(), cold.getUniqueDataIdentifier()); - } - } - - private synchronized static FluidStack getFluidFromIngot(final ItemStackData ingot) { - ItemStackData h = ingot; - if (mCachedIngotToFluidRegistry.containsKey(h.getUniqueDataIdentifier())) { - Logger.MACHINE_INFO("[ABS] mCachedIngotToFluidRegistry contains Output Ingot."); - return mCachedIngotToFluidRegistry.get(h.getUniqueDataIdentifier()); - } - if (mCachedHotToColdRegistry.containsKey(h.getUniqueDataIdentifier())) { - Logger.MACHINE_INFO("[ABS] mCachedHotToColdRegistry contains Output Ingot."); - return mCachedIngotToFluidRegistry.get(mCachedHotToColdRegistry.get(h.getUniqueDataIdentifier())); - } - Logger.MACHINE_INFO("[ABS] Neither Cache contains Output Ingot."); - return null; - } - - private static boolean isValid(final ItemStack[] inputs, final ItemStack outputs[], final FluidStack[] fluidIn, final FluidStack fluidOut) { - if (inputs != null && outputs != null && fluidIn != null && fluidOut != null && inputs.length > 0 && outputs.length > 0) { - return true; - } - return false; - } - - public synchronized static boolean generateGTNHBlastSmelterRecipesFromEBFList() { - - //Make a counting object - int mSuccess = 0; - - Logger.INFO("[ABS] Starting recipe generation based on EBF recipe map."); - Logger.INFO("[ABS] Caching Ingots and their Molten fluid.."); - //First, we make sure that we have a valid recipe map of Ingots/Dusts -> Fluids - if (GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size() > 0) { - //So, let's check every recipe - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList) { - ItemStack validInput = null; - FluidStack validOutput = null; - //If we the input is an ingot and it and the output are valid, map it to cache. - if (x.mInputs[0] != null) { - for(int tag: OreDictionary.getOreIDs(x.mInputs[0])) { - String oreName = OreDictionary.getOreName(tag).toLowerCase(); - String mType = "dust"; - if (CORE.GTNH) { - mType = "ingot"; - } - if(oreName.startsWith(mType) && !oreName.contains("double") && !oreName.contains("triple") && !oreName.contains("quad") && !oreName.contains("quintuple")) { - validInput = x.mInputs[0]; - } - } - } - if (x.mFluidOutputs[0] != null) { - validOutput = x.mFluidOutputs[0]; - } - if (validInput != null && validOutput != null) { - ItemStackData R = new ItemStackData(validInput); - setIngotToFluid(R, validOutput); - Logger.MACHINE_INFO("[ABS][I2F] Cached "+validInput.getDisplayName()+" to "+validOutput.getLocalizedName()+". Stored Under ID of "+R.getUniqueDataIdentifier()); - } - } - } - - Logger.INFO("[ABS] Caching Ingots and their Hot form..."); - //Second, we make sure that we have a valid recipe map of Hot Ingots -> Cold Ingots - if (GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList.size() > 0) { - //So, let's check every recipe - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList) { - ItemStack validInput = null; - ItemStack validOutput = null; - //If we the input is an ingot and it and the output are valid, map it to cache. - if (x.mInputs != null && x.mInputs.length > 0 && x.mInputs[0] != null) { - validInput = x.mInputs[0]; - } - if (x.mOutputs != null && x.mOutputs.length > 0 && x.mOutputs[0] != null) { - validOutput = x.mOutputs[0]; - } - if (validInput != null && validOutput != null) { - ItemStackData R1 = new ItemStackData(validInput); - ItemStackData R2 = new ItemStackData(validOutput); - setHotToCold(R1, R2); - Logger.MACHINE_INFO("[ABS][H2C] Cached "+validInput.getDisplayName()+" to "+validOutput.getDisplayName()+". Stored Under ID of "+R1.getUniqueDataIdentifier()+", links to ID "+R2.getUniqueDataIdentifier()); - } - } - } - - Logger.INFO("[ABS] Generating recipes based on existing EBF recipes."); - //Okay, so now lets Iterate existing EBF recipes. - if (GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList.size() > 0) { - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList) { - if (x == null) { - continue; - } - ItemStack[] inputs, outputs; - FluidStack[] inputsF; - int voltage, time, special; - boolean enabled; - inputs = x.mInputs; - outputs = x.mOutputs; - inputsF = x.mFluidInputs; - voltage = x.mEUt; - time = x.mDuration; - enabled = x.mEnabled; - special = x.mSpecialValue; - - //Check for GTNH, if it's found, continue to next recipe if the Temp is too high. - if (CORE.GTNH && special > 3600) { - Logger.MACHINE_INFO("[ABS] Skipping ABS addition for GTNH due to temp."); - continue; - } - else { - FluidStack mMoltenStack = null; - int mMoltenCount = 0; - //If We have a valid Output, let's try use our cached data to get it's molten form. - if (x.mOutputs != null && x.mOutputs[0] != null) { - mMoltenCount = x.mOutputs[0].stackSize; - ItemStackData R = new ItemStackData(x.mOutputs[0]); - Logger.MACHINE_INFO("[ABS] Found "+x.mOutputs[0].getDisplayName()+" as valid EBF output, finding it's fluid from the cache. We will require "+(144*mMoltenCount)+"L. Looking for ID "+R.getUniqueDataIdentifier()); - FluidStack tempFluid = getFluidFromIngot(R); - if (tempFluid != null) { - //Logger.MACHINE_INFO("[ABS] Got Fluid from Cache."); - mMoltenStack = FluidUtils.getFluidStack(tempFluid, mMoltenCount*144); - } - else { - Logger.MACHINE_INFO("[ABS] Failed to get Fluid from Cache."); - } - } - //If this recipe is enabled and we have a valid molten fluidstack, let's try add this recipe. - if (enabled && isValid(inputs, outputs, inputsF, mMoltenStack)) { - //Build correct input stack - ItemStack[] newInput = new ItemStack[inputs.length+1]; - int l = 1; - for (ItemStack y : inputs) { - newInput[l++] = y; - } - newInput[0] = CI.getNumberedCircuit(inputs.length); - //Logger.MACHINE_INFO("[ABS] Generating ABS recipe for "+mMoltenStack.getLocalizedName()+"."); - if (CORE.RA.addBlastSmelterRecipe(newInput, (inputsF.length > 0 ? inputsF[0] : null), mMoltenStack, 100, MathUtils.roundToClosestInt(time*0.8), voltage, special)) { - //Logger.MACHINE_INFO("[ABS] Success."); - mSuccess++; - } - else { - Logger.MACHINE_INFO("[ABS] Failure."); - } - } - else { - if (!enabled) { - Logger.MACHINE_INFO("[ABS] Failure. EBF recipe was not enabled."); - } - else { - Logger.MACHINE_INFO("[ABS] Failure. Invalid Inputs or Outputs."); - if (inputs == null) { - Logger.MACHINE_INFO("[ABS] Inputs were not Valid."); - } - else { - Logger.MACHINE_INFO("[ABS] inputs size: "+inputs.length); - } - if (outputs == null) { - Logger.MACHINE_INFO("[ABS] Outputs were not Valid."); - } - else { - Logger.MACHINE_INFO("[ABS] outputs size: "+outputs.length); - } - if (inputsF == null) { - Logger.MACHINE_INFO("[ABS] Input Fluids were not Valid."); - } - else { - Logger.MACHINE_INFO("[ABS] inputsF size: "+inputsF.length); - } - if (mMoltenStack == null) { - Logger.MACHINE_INFO("[ABS] Output Fluid were not Valid."); - } - } - } - } - } - } - else { - Logger.MACHINE_INFO("[ABS] Failure. Did not find any EBF recipes to iterate."); - } - - Logger.INFO("[ABS] Processed "+mSuccess+" recipes."); - return mSuccess > 0; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java deleted file mode 100644 index 24c8eb488f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java +++ /dev/null @@ -1,444 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeGen_DustGeneration extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_DustGeneration(final Material M){ - this(M, false); - } - - public RecipeGen_DustGeneration(final Material M, final boolean O){ - this.toGenerate = M; - this.disableOptional = O; - mRecipeGenMap.add(this); - final ItemStack normalDust = M.getDust(1); - final ItemStack smallDust = M.getSmallDust(1); - final ItemStack tinyDust = M.getTinyDust(1); - if (tinyDust != null && normalDust != null) { - if (RecipeUtils.addShapedRecipe( - tinyDust, tinyDust, tinyDust, - tinyDust, tinyDust, tinyDust, - tinyDust, tinyDust, tinyDust, - normalDust)){ - Logger.INFO("9 Tiny dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Success"); - } - else { - Logger.INFO("9 Tiny dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Failed"); - } - - if (RecipeUtils.addShapedRecipe( - normalDust, null, null, - null, null, null, - null, null, null, - M.getTinyDust(9))){ - Logger.INFO("9 Tiny dust from 1 Recipe: "+M.getLocalizedName()+" - Success"); - } - else { - Logger.INFO("9 Tiny dust from 1 Recipe: "+M.getLocalizedName()+" - Failed"); - } - } - - if (smallDust != null && normalDust != null) { - if (RecipeUtils.addShapedRecipe( - smallDust, smallDust, null, - smallDust, smallDust, null, - null, null, null, - normalDust)){ - Logger.INFO("4 Small dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Success"); - } - else { - Logger.INFO("4 Small dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Failed"); - } - if (RecipeUtils.addShapedRecipe( - null, normalDust, null, - null, null, null, - null, null, null, - M.getSmallDust(4))){ - Logger.INFO("4 Small dust from 1 Dust Recipe: "+M.getLocalizedName()+" - Success"); - } - else { - Logger.INFO("4 Small dust from 1 Dust Recipe: "+M.getLocalizedName()+" - Failed"); - } - } - } - - @Override - public void run() { - generateRecipes(this.toGenerate, this.disableOptional); - } - - private void generateRecipes(final Material material, final boolean disableOptional){ - - Logger.INFO("Generating Shaped Crafting recipes for "+material.getLocalizedName()); - - final ItemStack normalDust = material.getDust(1); - final ItemStack smallDust = material.getSmallDust(1); - final ItemStack tinyDust = material.getTinyDust(1); - - final ItemStack[] inputStacks = material.getMaterialComposites(); - final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); - - //Macerate blocks back to dusts. - final ItemStack materialBlock = material.getBlock(1); - final ItemStack materialFrameBox = material.getFrameBox(1); - - if (ItemUtils.checkForInvalidItems(materialBlock)) { - GT_ModHandler.addPulverisationRecipe(materialBlock, material.getDust(9)); - } - - if (ItemUtils.checkForInvalidItems(materialFrameBox)) { - GT_ModHandler.addPulverisationRecipe(materialFrameBox, material.getDust(2)); - } - - if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(tinyDust)) { - generatePackagerRecipes(material); - } - - ItemStack ingot = material.getIngot(1); - if (ItemUtils.checkForInvalidItems(normalDust) && ItemUtils.checkForInvalidItems(ingot)) { - addFurnaceRecipe(material); - addMacerationRecipe(material); - } - - //Is this a composite? - if ((inputStacks != null) && !disableOptional){ - //Is this a composite? - Logger.WARNING("mixer length: "+inputStacks.length); - if ((inputStacks.length != 0) && (inputStacks.length <= 4)){ - //Log Input items - Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); - final long[] inputStackSize = material.vSmallestRatio; - Logger.WARNING("mixer is stacksizeVar null? "+(inputStackSize != null)); - //Is smallest ratio invalid? - if (inputStackSize != null){ - //set stack sizes on an input ItemStack[] - for (short x=0;x= 1) ? ((inputStacks[0] == null) ? null : inputStacks[0]) : null; - input[1] = (inputStacks.length >= 2) ? ((inputStacks[1] == null) ? null : inputStacks[1]) : null; - input[2] = (inputStacks.length >= 3) ? ((inputStacks[2] == null) ? null : inputStacks[2]) : null; - input[3] = (inputStacks.length >= 4) ? ((inputStacks[3] == null) ? null : inputStacks[3]) : null; - - - if (inputStacks.length == 1) { - input[1] = input[0]; - input[0] = CI.getNumberedCircuit(inputStacks.length+10); - } - else if (inputStacks.length == 2) { - input[2] = input[1]; - input[1] = input[0]; - input[0] = CI.getNumberedCircuit(inputStacks.length+10); - - } - else if (inputStacks.length == 3) { - input[3] = input[2]; - input[2] = input[1]; - input[1] = input[0]; - input[0] = CI.getNumberedCircuit(inputStacks.length+10); - } - - - /*for (int g = 0; g<4; g++) { - if(inputStacks.length > g) { - input[g] = inputStacks[g] != null ? inputStacks[g] : null; - } - else { - input[g] = CI.getNumberedCircuit(g+10); - break; - } - }*/ - - //Add mixer Recipe - FluidStack oxygen = GT_Values.NF; - if (material.getComposites() != null){ - for (final MaterialStack x : material.getComposites()){ - if (!material.getComposites().isEmpty()){ - if (x != null){ - if (x.getStackMaterial() != null){ - if (x.getStackMaterial().getDust(1) == null){ - if (x.getStackMaterial().getState() != MaterialState.SOLID && x.getStackMaterial().getState() != MaterialState.ORE && x.getStackMaterial().getState() != MaterialState.PLASMA){ - oxygen = x.getStackMaterial().getFluidStack(1000); - break; - } - } - } - } - } - } - } - - input = ItemUtils.cleanItemStackArray(input); - - //Add mixer Recipe - if (GT_Values.RA.addMixerRecipe( - input[0], input[1], - input[2], input[3], - oxygen, - null, - outputStacks, - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. - { - Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Add Shapeless recipe for low tier alloys. - /*if (tVoltageMultiplier <= 30){ - if (RecipeUtils.addShapedGregtechRecipe(inputStacks, outputStacks)){ - Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed"); - } - }*/ - } - } - } - - - - - - - } - - public static boolean addMixerRecipe_Standalone(final Material material){ - final ItemStack[] inputStacks = material.getMaterialComposites(); - final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); - //Is this a composite? - if ((inputStacks != null)){ - //Is this a composite? - Logger.WARNING("mixer length: "+inputStacks.length); - if ((inputStacks.length >= 1) && (inputStacks.length <= 4)){ - //Log Input items - Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); - final long[] inputStackSize = material.vSmallestRatio; - Logger.WARNING("mixer is stacksizeVar not null? "+(inputStackSize != null)); - //Is smallest ratio invalid? - if (inputStackSize != null){ - //set stack sizes on an input ItemStack[] - for (short x=0;x= 2) ? (input2 = (inputStacks[1] == null) ? null : inputStacks[1]) : null; - input3 = (inputStacks.length >= 3) ? (input3 = (inputStacks[2] == null) ? null : inputStacks[2]) : null; - input4 = (inputStacks.length >= 4) ? (input4 = (inputStacks[3] == null) ? null : inputStacks[3]) : null; - - if (inputStacks.length == 1) { - input2 = input1; - input1 = CI.getNumberedCircuit(20); - } - else if (inputStacks.length == 2) { - input3 = input2; - input2 = input1; - input1 = CI.getNumberedCircuit(20); - - } - else if (inputStacks.length == 3) { - input4 = input3; - input3 = input2; - input2 = input1; - input1 = CI.getNumberedCircuit(20); - } - - //Add mixer Recipe - FluidStack oxygen = GT_Values.NF; - if (material.getComposites() != null){ - int compSlot = 0; - for (final MaterialStack x : material.getComposites()){ - if (!material.getComposites().isEmpty()){ - if (x != null){ - if (x.getStackMaterial() != null){ - if (x.getStackMaterial().getDust(1) == null){ - MaterialState f = x.getStackMaterial().getState(); - if (f == MaterialState.GAS || f == MaterialState.LIQUID || f == MaterialState.PURE_LIQUID || f == MaterialState.PURE_GAS){ - oxygen = x.getStackMaterial().getFluidStack((int) (material.vSmallestRatio[compSlot] * 1000)); - } - } - } - } - } - compSlot++; - } - - } - - //Add mixer Recipe - try { - if (GT_Values.RA.addMixerRecipe( - input1, input2, - input3, input4, - oxygen, - null, - outputStacks, - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. - { - Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); - return true; - } - else { - Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); - return false; - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - else { - Logger.WARNING("inputStackSize == NUll - "+material.getLocalizedName()); - } - } - else { - Logger.WARNING("InputStacks is out range 1-4 - "+material.getLocalizedName()); - } - } - else { - Logger.WARNING("InputStacks == NUll - "+material.getLocalizedName()); - } - return false; - } - - public static boolean generatePackagerRecipes(Material aMatInfo) { - AutoMap aResults = new AutoMap(); - //Small Dust - aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, new Object[]{aMatInfo.getSmallDust(4)}), ItemList.Schematic_Dust.get(0L, new Object[0]), aMatInfo.getDust(1), 100, 4)); - //Tiny Dust - aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, new Object[]{aMatInfo.getTinyDust(9)}), ItemList.Schematic_Dust.get(0L, new Object[0]), aMatInfo.getDust(1), 100, 4)); - - for (boolean b : aResults) { - if (!b) { - return false; - } - } - return true; - } - - private void addMacerationRecipe(Material aMatInfo){ - try { - Logger.MATERIALS("Adding Maceration recipe for "+aMatInfo.getLocalizedName()+" Ingot -> Dusts"); - final int chance = (aMatInfo.vTier*10)/MathUtils.randInt(10, 20); - GT_ModHandler.addPulverisationRecipe(aMatInfo.getIngot(1), aMatInfo.getDust(1), null, chance); - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - private void addFurnaceRecipe(Material aMatInfo){ - - ItemStack aDust = aMatInfo.getDust(1); - ItemStack aOutput; - try { - if (aMatInfo.requiresBlastFurnace()) { - aOutput = aMatInfo.getHotIngot(1); - if (ItemUtils.checkForInvalidItems(aOutput)) { - if (addBlastFurnaceRecipe(aMatInfo, aDust, null, aOutput, null, aMatInfo.getMeltingPointK())){ - Logger.MATERIALS("Successfully added a blast furnace recipe for "+aMatInfo.getLocalizedName()); - } - else { - Logger.MATERIALS("Failed to add a blast furnace recipe for "+aMatInfo.getLocalizedName()); - } - } - else { - Logger.MATERIALS("Failed to add a blast furnace recipe for "+aMatInfo.getLocalizedName()); - } - } - else { - aOutput = aMatInfo.getIngot(1); - if (ItemUtils.checkForInvalidItems(aOutput)) { - if (CORE.RA.addSmeltingAndAlloySmeltingRecipe(aDust, aOutput)){ - Logger.MATERIALS("Successfully added a furnace recipe for "+aMatInfo.getLocalizedName()); - } - else { - Logger.MATERIALS("Failed to add a furnace recipe for "+aMatInfo.getLocalizedName()); - } - } - } - } - catch (Throwable t) { - t.printStackTrace(); - } - - } - - private boolean addBlastFurnaceRecipe(Material aMatInfo, final ItemStack input1, final ItemStack input2, final ItemStack output1, final ItemStack output2, final int tempRequired){ - - try { - int timeTaken = 125*aMatInfo.vTier*10; - - if (aMatInfo.vTier <= 4){ - timeTaken = 25*aMatInfo.vTier*10; - } - int aSlot = aMatInfo.vTier; - if (aSlot < 2) { - aSlot = 2; - } - long aVoltage = aMatInfo.vVoltageMultiplier; - - return GT_Values.RA.addBlastRecipe( - input1, - input2, - GT_Values.NF, GT_Values.NF, - output1, - output2, - timeTaken, - (int) aVoltage, - tempRequired); - } - catch (Throwable t) { - t.printStackTrace(); - return false; - } - } - -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java deleted file mode 100644 index cd43d6201c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java +++ /dev/null @@ -1,176 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import net.minecraft.item.ItemStack; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_Recipe; - -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class RecipeGen_Extruder extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_Extruder(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - - final ItemStack itemIngot = material.getIngot(1); - final ItemStack itemPlate = material.getPlate(1); - final ItemStack itemGear = material.getGear(1); - - final ItemStack shape_Plate = ItemList.Shape_Extruder_Plate.get(0); - final ItemStack shape_Ring = ItemList.Shape_Extruder_Ring.get(0); - final ItemStack shape_Gear = ItemList.Shape_Extruder_Gear.get(0); - final ItemStack shape_Rod = ItemList.Shape_Extruder_Rod.get(0); - final ItemStack shape_Bolt = ItemList.Shape_Extruder_Bolt.get(0); - final ItemStack shape_Block = ItemList.Shape_Extruder_Block.get(0); - final ItemStack shape_Ingot = ItemList.Shape_Extruder_Ingot.get(0); - - Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName()); - - - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) { - //Ingot Recipe - if (addExtruderRecipe( - material.getBlock(1), - shape_Ingot, - material.getIngot(9), - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Block Recipe - if (addExtruderRecipe( - material.getIngot(9), - shape_Block, - material.getBlock(1), - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - - //Plate Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) - if (addExtruderRecipe( - itemIngot, - shape_Plate, - itemPlate, - 10, - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Ring Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1))) - if (!material.isRadioactive){ - if (addExtruderRecipe( - itemIngot, - shape_Ring, - material.getRing(4), - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - - //Gear Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) - if (!material.isRadioactive){ - if (addExtruderRecipe( - material.getIngot(4), - shape_Gear, - itemGear, - (int) Math.max(material.getMass() * 5L, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - - //Rod Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) - if (addExtruderRecipe( - itemIngot, - shape_Rod, - material.getRod(2), - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } - - - //Bolt Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) - if (!material.isRadioactive){ - if (addExtruderRecipe( - itemIngot, - shape_Bolt, - material.getBolt(8), - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - } - - - public static boolean addExtruderRecipe(final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) { - if ((aInput == null) || (aShape == null) || (aOutput == null)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { - return false; - } - GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); - return true; - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java deleted file mode 100644 index 9fe86985f4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java +++ /dev/null @@ -1,230 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeGen_FluidCanning implements Runnable { - - public static void init() { - FluidCanningRunnableHandler x = new FluidCanningRunnableHandler(); - x.run(); - } - - private static class FluidCanningRunnableHandler implements RunnableWithInfo { - - @Override - public void run() { - mHasRun = true; - for (RecipeGen_FluidCanning aRecipe : mCache) { - aRecipe.run(); - } - } - - @Override - public String getInfoData() { - return "Fluid Canning Recipes"; - } - } - - private static boolean mHasRun = false; - - private static HashSet mCache = new HashSet(); - - private static void addRunnableToRecipeCache(RecipeGen_FluidCanning r) { - if (mHasRun) { - CORE.crash(); - } - mCache.add(r); - } - - protected boolean disableOptional; - - private final GT_Recipe recipe; - private final boolean isValid; - - public boolean valid() { - return isValid; - } - public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluid) { - this(aExtracting, aEmpty, aFull, aFluid, GT_Values.NF, null, null); - } - - public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluidIn, FluidStack aFluidOut) { - this(aExtracting, aEmpty, aFull, aFluidIn, aFluidOut, null, null); - } - - public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluid, Integer aDuration, Integer aEUt) { - this(aExtracting, aEmpty, aFull, aFluid, GT_Values.NF, aDuration, aEUt); - } - - // Alternative Constructor - public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluidIn, FluidStack aFluidOut, Integer aDuration, Integer aEUt) { - ItemStack aInput; - ItemStack aOutput; - FluidStack aFluidInput; - FluidStack aFluidOutput; - - // Safety check on the duration - if (aDuration == null || aDuration <= 0) { - aDuration = (aFluidIn != null) ? (aFluidIn.amount / 62) : ((aFluidOut != null) ? (aFluidOut.amount / 62) : 10); - } - - // Safety check on the EU - if (aEUt == null || aEUt <= 0) { - if (aExtracting) { - aEUt = 2; - } - else { - aEUt = 1; - } - } - - // Set Item stacks correctly, invert if extraction recipe. - if (aExtracting) { - aInput = aFull; - aOutput = aEmpty; - aFluidInput = GT_Values.NF; - aFluidOutput = aFluidIn; - } - else { - aInput = aEmpty; - aOutput = aFull; - aFluidInput = aFluidIn; - aFluidOutput = aFluidOut != null ? aFluidOut : GT_Values.NF; - } - - //Check validity - - GTPP_Recipe aRecipe = new GTPP_Recipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - null, - new int[] {10000}, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); - - - // Check Valid - boolean aTempValidityCheck = false; - //Logger.INFO("Validity Check."); - if (aExtracting) { - Logger.INFO("Extracting."); - if (aInput != null && aFluidOutput != null) { - //Logger.INFO("Pass."); - aTempValidityCheck = true; - } - } - else { - //Logger.INFO("Canning."); - if (aInput != null && aOutput != null && (aFluidInput != null || aFluidOutput != null)) { - //Logger.INFO("Pass."); - aTempValidityCheck = true; - } - } - - - if (aTempValidityCheck) { - // Valid Recipe - recipe = aRecipe; - disableOptional = aExtracting; - isValid = true; - //Logger.INFO("Passed Validity Check. Hash: "+recipe.hashCode()); - //Logger.INFO("Mapped as: "+(disableOptional ? "Extracting" : "Canning")); - addRunnableToRecipeCache(this); - } - else { - //Logger.INFO("Failed Validity Check."); - isValid = false; - disableOptional = aExtracting; - aRecipe.mEnabled = false; - aRecipe.mHidden = true; - recipe = null; - } - } - - @Override - public void run() { - Logger.INFO("Processing Recipe with Hash: "+recipe.hashCode()); - generateRecipes(); - } - - private void generateRecipes() { - if (isValid && recipe != null) { - //Logger.INFO("Processing "+(disableOptional ? "Extracting" : "Canning")+" Recipe."); - if (this.disableOptional) { - addFluidExtractionRecipe(recipe); - } - else { - addFluidCannerRecipe(recipe); - } - } - } - - private final boolean addFluidExtractionRecipe(GT_Recipe aRecipe) { - boolean result = false; - int aCount1 = GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size(); - int aCount2 = aCount1; - GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(aRecipe); - aCount1 = GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size(); - result = aCount1 > aCount2; - if (result) { - //Logger.INFO("[FIND] Added Extraction recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); - } - else { - Logger.INFO("[ERROR] Failed adding Extraction recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); - //dumpStack(); - } - return result; - } - - private final boolean addFluidCannerRecipe(GT_Recipe aRecipe) { - boolean result = false; - int aCount1 = GT_Recipe_Map.sFluidCannerRecipes.mRecipeList.size(); - int aCount2 = aCount1; - GT_Recipe_Map.sFluidCannerRecipes.addRecipe(aRecipe); - aCount1 = GT_Recipe_Map.sFluidCannerRecipes.mRecipeList.size(); - result = aCount1 > aCount2; - if (result) { - //Logger.INFO("[FIND] Added Canning recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); - } - else { - Logger.INFO("[ERROR] Failed adding Canning recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); - //dumpStack(); - } - return result; - } - - private void dumpStack() { - int parents = 2; - for (int i=0;i<6;i++) { - Logger.INFO((disableOptional ? "EXTRACTING" : "CANNING")+" DEBUG | "+(i == 0 ? "Called from: " : "Parent: ")+ReflectionUtils.getMethodName(i+parents)); - } - - } - - private String buildLogString() { - int solidSize = getMapSize(GT_Recipe_Map.sCannerRecipes); - int fluidSize = getMapSize(GT_Recipe_Map.sFluidCannerRecipes); - return (disableOptional ? "EXTRACTING" : "CANNING")+" DEBUG | Solids: "+solidSize+" | Liquids: "+fluidSize+" | "; - } - - private final int getMapSize(GT_Recipe_Map aMap) { - return aMap.mRecipeList.size(); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java deleted file mode 100644 index e87fc08c90..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java +++ /dev/null @@ -1,298 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class RecipeGen_Fluids extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_Fluids(final Material M) { - this(M, false); - } - - public RecipeGen_Fluids(final Material M, final boolean dO) { - this.toGenerate = M; - this.disableOptional = dO; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate, this.disableOptional); - } - - private void generateRecipes(final Material material, final boolean dO) { - - if (material == null) { - return; - } - - // Melting Shapes to fluid - if (material.getFluidStack(1) != null - && !material.getFluidStack(1).getUnlocalizedName().toLowerCase().contains("plasma")) { - - if (!material.requiresBlastFurnace()) { - - // Ingot - if (ItemUtils.checkForInvalidItems(material.getIngot(1))) - if (CORE.RA.addFluidExtractionRecipe( - material.getIngot(1), // Input - material.getFluidStack(144), // Fluid Output - 1 * 20, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING("144l fluid extractor from 1 ingot Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING("144l fluid extractor from 1 ingot Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Plate - if (ItemUtils.checkForInvalidItems(material.getPlate(1))) - if (CORE.RA.addFluidExtractionRecipe( - material.getPlate(1), // Input - material.getFluidStack(144), // Fluid Output - 1 * 20, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING("144l fluid extractor from 1 plate Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING("144l fluid extractor from 1 plate Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Double Plate - if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1))) - if (CORE.RA.addFluidExtractionRecipe( - material.getPlateDouble(1), // Input - material.getFluidStack(288), // Fluid Output - 1 * 20, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING("144l fluid extractor from 1 double plate Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING("144l fluid extractor from 1 double plate Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Nugget - if (ItemUtils.checkForInvalidItems(material.getNugget(1))) - if (CORE.RA.addFluidExtractionRecipe( - material.getNugget(1), // Input - material.getFluidStack(16), // Fluid Output - 16, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING("16l fluid extractor from 1 nugget Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING("16l fluid extractor from 1 nugget Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Block - if (ItemUtils.checkForInvalidItems(material.getBlock(1))) - if (CORE.RA.addFluidExtractionRecipe( - material.getBlock(1), // Input - material.getFluidStack(144 * 9), // Fluid Output - 288, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid extractor from 1 block Recipe: " - + material.getLocalizedName() + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid extractor from 1 block Recipe: " - + material.getLocalizedName() + " - Failed"); - } - - } - - // Making Shapes from fluid - - // Ingot - if (ItemUtils.checkForInvalidItems(material.getIngot(1))) - if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), // Item Shape - material.getFluidStack(144), // Fluid Input - material.getIngot(1), // output - 32, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING( - "144l fluid molder for 1 ingot Recipe: " + material.getLocalizedName() + " - Success"); - } else { - Logger.WARNING( - "144l fluid molder for 1 ingot Recipe: " + material.getLocalizedName() + " - Failed"); - } - - // Plate - if (ItemUtils.checkForInvalidItems(material.getPlate(1))) - if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0), // Item Shape - material.getFluidStack(144), // Fluid Input - material.getPlate(1), // output - 32, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING( - "144l fluid molder for 1 plate Recipe: " + material.getLocalizedName() + " - Success"); - } else { - Logger.WARNING( - "144l fluid molder for 1 plate Recipe: " + material.getLocalizedName() + " - Failed"); - } - - // Nugget - if (ItemUtils.checkForInvalidItems(material.getNugget(1))) - if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), // Item Shape - material.getFluidStack(16), // Fluid Input - material.getNugget(1), // output - 16, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING( - "16l fluid molder for 1 nugget Recipe: " + material.getLocalizedName() + " - Success"); - } else { - Logger.WARNING( - "16l fluid molder for 1 nugget Recipe: " + material.getLocalizedName() + " - Failed"); - } - - // Gears - if (ItemUtils.checkForInvalidItems(material.getGear(1))) - if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0), // Item Shape - material.getFluidStack(576), // Fluid Input - material.getGear(1), // output - 128, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING( - "576l fluid molder for 1 gear Recipe: " + material.getLocalizedName() + " - Success"); - } else { - Logger.WARNING("576l fluid molder for 1 gear Recipe: " + material.getLocalizedName() + " - Failed"); - } - - // Blocks - if (ItemUtils.checkForInvalidItems(material.getBlock(1))) - if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), // Item Shape - material.getFluidStack(144 * 9), // Fluid Input - material.getBlock(1), // output - 288, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid molder from 1 block Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid molder from 1 block Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - if (CORE.GTNH) { - - // GTNH - - // Shape_Mold_Rod - // Shape_Mold_Rod_Long - // Shape_Mold_Bolt, - // Shape_Mold_Screw, - // Shape_Mold_Ring, - - - ItemList mold_Rod = ItemUtils.getValueOfItemList("Shape_Mold_Rod", null); - ItemList mold_Rod_Long = ItemUtils.getValueOfItemList("Shape_Mold_Rod_Long", null); - ItemList mold_Bolt = ItemUtils.getValueOfItemList("Shape_Mold_Bolt", null); - ItemList mold_Screw = ItemUtils.getValueOfItemList("Shape_Mold_Screw", null); - ItemList mold_Ring = ItemUtils.getValueOfItemList("Shape_Mold_Ring", null); - - // Rod - if (ItemUtils.checkForInvalidItems(material.getRod(1))) - if (mold_Rod != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod.get(0), // Item Shape - material.getFluidStack(72), // Fluid Input - material.getRod(1), // output - 150, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid molder from 1 rod Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid molder from 1 rod Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Rod Long - if (ItemUtils.checkForInvalidItems(material.getLongRod(1))) - if (mold_Rod_Long != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod_Long.get(0), // Item - // Shape - material.getFluidStack(144), // Fluid Input - material.getLongRod(1), // output - 300, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid molder from 1 rod long Recipe: " - + material.getLocalizedName() + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid molder from 1 rod long Recipe: " - + material.getLocalizedName() + " - Failed"); - } - - // Bolt - if (ItemUtils.checkForInvalidItems(material.getBolt(1))) - if (mold_Bolt != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Bolt.get(0), // Item Shape - material.getFluidStack(18), // Fluid Input - material.getBolt(1), // output - 50, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid molder from 1 bolt Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid molder from 1 bolt Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Screw - if (ItemUtils.checkForInvalidItems(material.getScrew(1))) - if (mold_Screw != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Screw.get(0), // Item Shape - material.getFluidStack(18), // Fluid Input - material.getScrew(1), // output - 50, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid molder from 1 screw Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid molder from 1 screw Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - // Ring - if (ItemUtils.checkForInvalidItems(material.getRing(1))) - if (mold_Ring != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Ring.get(0), // Item Shape - material.getFluidStack(36), // Fluid Input - material.getRing(1), // output - 100, // Duration - material.vVoltageMultiplier // Eu Tick - )) { - Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName() - + " - Success"); - } else { - Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName() - + " - Failed"); - } - - } - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java deleted file mode 100644 index f8108852f4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java +++ /dev/null @@ -1,274 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import net.minecraft.item.ItemStack; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Recipe; - -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeGen_MaterialProcessing extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_MaterialProcessing(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - - if (material.getMaterialComposites().length > 1){ - Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]"); - final int tVoltageMultiplier = material.vVoltageMultiplier; - int[] partSizes = new int[99]; - if (material.vSmallestRatio != null) { - partSizes = new int[material.vSmallestRatio.length]; - for (int hu=0;hu> componentMap = new AutoMap>(); - int alnsnfds = 0; - for (MaterialStack r : material.getComposites()){ - if (r != null){ - componentMap.put(new Pair(partSizes[alnsnfds], r.getStackMaterial())); - } - alnsnfds++; - } - - - - - - /** - * Electrolyzer - */ - - //Process Dust - if (componentMap.size() > 0 && componentMap.size() <= 6){ - ItemStack mInternalOutputs[] = new ItemStack[6]; - int mChances[] = new int[6]; - int mCellCount = 0; - - int mTotalCount = 0; - - int mCounter = 0; - for (Pair f : componentMap){ - if (f.getValue().getState() != MaterialState.SOLID){ - Logger.MATERIALS("[Electrolyzer] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); - mCellCount += f.getKey(); - mTotalCount += f.getKey(); - Logger.MATERIALS("[Electrolyzer] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); - } - else { - Logger.MATERIALS("[Electrolyzer] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); - mTotalCount += f.getKey(); - } - } - - //Build Output Array - for (int g=0;g 0){ - emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); - Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mCellCount+" empty cells as input."); - } - - ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); - if (mainDust != null){ - Logger.MATERIALS("[Electrolyzer] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); - } - else { - mainDust = material.getDust(mTotalCount); - Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, trying alternative."); - if (mainDust != null){ - Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); - } - else { - Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, exiting."); - } - } - - for (int j=0;j 6 && componentMap.size() <= 9){ - Logger.MATERIALS("[Issue][Electrolyzer] "+material.getLocalizedName()+" is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead."); - - ItemStack mInternalOutputs[] = new ItemStack[9]; - int mChances[] = new int[9]; - int mCellCount = 0; - - int mTotalCount = 0; - - int mCounter = 0; - for (Pair f : componentMap){ - if (f.getValue().getState() != MaterialState.SOLID){ - Logger.MATERIALS("[Dehydrator] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); - mCellCount += f.getKey(); - mTotalCount += f.getKey(); - Logger.MATERIALS("[Dehydrator] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); - } - else { - Logger.MATERIALS("[Dehydrator] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); - mTotalCount += f.getKey(); - } - } - - //Build Output Array - for (int g=0;g 0){ - emptyCell = CI.emptyCells(mCellCount); - Logger.MATERIALS("[Dehydrator] Recipe now requires "+mCellCount+" empty cells as input."); - } - - ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); - if (mainDust != null){ - Logger.MATERIALS("[Dehydrator] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); - } - else { - mainDust = material.getDust(mTotalCount); - Logger.MATERIALS("[Dehydrator] Could not find valid input dust, trying alternative."); - if (mainDust != null){ - Logger.MATERIALS("[Dehydrator] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); - } - else { - Logger.MATERIALS("[Dehydrator] Could not find valid input dust, exiting."); - } - } - - for (int j=0;j> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_MetalRecipe(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material) { - - Logger.WARNING("Generating Metal recipes for "+material.getLocalizedName()); - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) - if (GT_ModHandler.addCompressionRecipe( - material.getIngot(9), - material.getBlock(1) - )){ - Logger.WARNING("Compress Block Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Compress Block Recipe: "+material.getLocalizedName()+" - Failed"); - } - - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) - if (GT_Values.RA.addLatheRecipe( - material.getIngot(1), - material.getRod(1), - material.getSmallDust(2), - (int) Math.max(material.getMass() / 8L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Lathe Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Lathe Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } - - if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) - if (GT_Values.RA.addCutterRecipe( - material.getRod(1), - material.getBolt(4), - null, - (int) Math.max(material.getMass() * 2L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Cut Bolt Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Cut Bolt Recipe: "+material.getLocalizedName()+" - Failed"); - } - - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getHotIngot(1))) - if (CORE.RA.addVacuumFreezerRecipe( - material.getHotIngot(1), - material.getIngot(1), - (int) Math.max(material.getMass() * 3L, 1L), - material.vVoltageMultiplier) - ){ - Logger.WARNING("Cool Hot Ingot Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Cool Hot Ingot Recipe: "+material.getLocalizedName()+" - Failed"); - } - - if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getLongRod(1))) { - if (GT_Values.RA.addForgeHammerRecipe( - material.getRod(2), - material.getLongRod(1), - (int) Math.max(material.getMass(), 1L), - 16)){ - Logger.WARNING("Hammer Long Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Hammer Long Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } - - GT_Values.RA.addCutterRecipe( - material.getLongRod(1), - material.getRod(2), - null, - (int) Math.max(material.getMass(), 1L), - 4); - } - - if (ItemUtils.checkForInvalidItems(material.getBolt(1)) && ItemUtils.checkForInvalidItems(material.getScrew(1))) - if (GT_Values.RA.addLatheRecipe( - material.getBolt(1), - material.getScrew(1), - null, - (int) Math.max(material.getMass() / 8L, 1L), - 4)){ - Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Failed"); - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java deleted file mode 100644 index a76322e4f4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java +++ /dev/null @@ -1,187 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map_Internal; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeGen_MultisUsingFluidInsteadOfCells { - - - private static ItemStack mEmptyCell; - private static AutoMap mItemsToIgnore = new AutoMap(); - private static boolean mInit = false; - - private static void init() { - if (!mInit) { - mInit = true; - mItemsToIgnore.add(ItemUtils.simpleMetaStack(CI.emptyCells(1).getItem(), 8, 1)); - - - } - } - - private static boolean doesItemMatchIgnoringStackSize(ItemStack a, ItemStack b) { - if (a == null || b == null) { - return false; - } - if (a.getItem() == b.getItem()) { - if (a.getItemDamage() == b.getItemDamage()) { - return true; - } - } - return false; - } - - private static boolean isEmptyCell(ItemStack aCell) { - if (aCell == null) { - return false; - } - if (mEmptyCell == null) { - mEmptyCell = CI.emptyCells(1); - } - if (mEmptyCell != null) { - ItemStack aTempStack = mEmptyCell.copy(); - aTempStack.stackSize = aCell.stackSize; - if (GT_Utility.areStacksEqual(aTempStack, aCell)) { - return true; - } - } - return false; - } - - private synchronized static FluidStack getFluidFromItemStack(final ItemStack ingot) { - if (ingot == null) { - return null; - } - FluidStack aFluid = GT_Utility.getFluidForFilledItem(ingot, true); - if (aFluid != null) { - return aFluid; - } - return null; - } - - public synchronized static int generateRecipesNotUsingCells(GT_Recipe_Map aInputs, GTPP_Recipe_Map_Internal aOutputs) { - init(); - int aRecipesHandled = 0; - int aInvalidRecipesToConvert = 0; - int aOriginalCount = aInputs.mRecipeList.size(); - - recipe : for (GT_Recipe x : aInputs.mRecipeList) { - if (x != null) { - - ItemStack[] aInputItems = x.mInputs.clone(); - ItemStack[] aOutputItems = x.mOutputs.clone(); - FluidStack[] aInputFluids = x.mFluidInputs.clone(); - FluidStack[] aOutputFluids = x.mFluidOutputs.clone(); - - AutoMap aInputItemsMap = new AutoMap(); - AutoMap aOutputItemsMap = new AutoMap(); - AutoMap aInputFluidsMap = new AutoMap(); - AutoMap aOutputFluidsMap = new AutoMap(); - - // Iterate Inputs, Convert valid items into fluids - inputs : for (ItemStack aInputStack : aInputItems) { - FluidStack aFoundFluid = getFluidFromItemStack(aInputStack); - if (aFoundFluid == null) { - for (ItemStack aBadStack : mItemsToIgnore) { - if (doesItemMatchIgnoringStackSize(aInputStack, aBadStack)) { - continue recipe; // Skip this recipe entirely if we find an item we don't like - } - } - if (!isEmptyCell(aInputStack)) { - aInputItemsMap.add(aInputStack); - } - } - else { - aFoundFluid.amount = aFoundFluid.amount * aInputStack.stackSize; - aInputFluidsMap.add(aFoundFluid); - } - } - // Iterate Outputs, Convert valid items into fluids - outputs: for (ItemStack aOutputStack : aOutputItems) { - FluidStack aFoundFluid = getFluidFromItemStack(aOutputStack); - if (aFoundFluid == null) { - for (ItemStack aBadStack : mItemsToIgnore) { - if (doesItemMatchIgnoringStackSize(aOutputStack, aBadStack)) { - continue recipe; // Skip this recipe entirely if we find an item we don't like - } - } - if (!isEmptyCell(aOutputStack)) { - aOutputItemsMap.add(aOutputStack); - } - } - else { - aFoundFluid.amount = aFoundFluid.amount * aOutputStack.stackSize; - aOutputFluidsMap.add(aFoundFluid); - } - } - // Add Input fluids second - for (FluidStack aInputFluid : aInputFluids) { - aInputFluidsMap.add(aInputFluid); - } - // Add Output fluids second - for (FluidStack aOutputFluid : aOutputFluids) { - aOutputFluidsMap.add(aOutputFluid); - } - - // Make some new Arrays - ItemStack[] aNewItemInputs = new ItemStack[aInputItemsMap.size()]; - ItemStack[] aNewItemOutputs = new ItemStack[aOutputItemsMap.size()]; - FluidStack[] aNewFluidInputs = new FluidStack[aInputFluidsMap.size()]; - FluidStack[] aNewFluidOutputs = new FluidStack[aOutputFluidsMap.size()]; - - // Add AutoMap contents to Arrays - for (int i = 0; i < aInputItemsMap.size(); i++) { - aNewItemInputs[i] = aInputItemsMap.get(i); - } - for (int i = 0; i < aOutputItemsMap.size(); i++) { - aNewItemOutputs[i] = aOutputItemsMap.get(i); - } - for (int i = 0; i < aInputFluidsMap.size(); i++) { - aNewFluidInputs[i] = aInputFluidsMap.get(i); - } - for (int i = 0; i < aOutputFluidsMap.size(); i++) { - aNewFluidOutputs[i] = aOutputFluidsMap.get(i); - } - - if (!ItemUtils.checkForInvalidItems(aNewItemInputs, aNewItemOutputs)) { - aInvalidRecipesToConvert++; - continue recipe; // Skip this recipe entirely if we find an item we don't like - } - - // Add Recipe to map - GT_Recipe aNewRecipe = new GTPP_Recipe( - false, - aNewItemInputs, - aNewItemOutputs, - x.mSpecialItems, - x.mChances, - aNewFluidInputs, - aNewFluidOutputs, - x.mDuration, - x.mEUt, - x.mSpecialValue); - aOutputs.add(aNewRecipe); - aRecipesHandled++; - } - else { - aInvalidRecipesToConvert++; - } - } - - Logger.INFO("Generated Recipes for "+aOutputs.mNEIName); - Logger.INFO("Original Map contains "+aOriginalCount+" recipes."); - Logger.INFO("Output Map contains "+aRecipesHandled+" recipes."); - Logger.INFO("There were "+aInvalidRecipesToConvert+" invalid recipes."); - return aRecipesHandled; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java deleted file mode 100644 index b7043b5983..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java +++ /dev/null @@ -1,573 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import net.minecraft.item.ItemStack; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.MaterialStack; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeGen_Ore extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_Ore(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private static Material mStone; - - public static void generateRecipes(final Material material){ - - if (mStone == null) { - mStone = MaterialUtils.generateMaterialFromGtENUM(Materials.Stone); - } - - //if (material.getMaterialComposites().length > 1){ - Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]"); - int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier); - - final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1); - Material bonusA = null; //Ni - Material bonusB = null; //Tin - - if (material.getComposites().size() >= 1 && material.getComposites().get(0) != null){ - bonusA = material.getComposites().get(0).getStackMaterial(); - } - else { - bonusA = material; - } - - boolean allFailed = false; - - - //Setup Bonuses - ArrayList aMatComp = new ArrayList(); - for (Material j : MaterialUtils.getCompoundMaterialsRecursively(material)) { - aMatComp.add(j); - } - - if (aMatComp.size() < 3) { - while (aMatComp.size() < 3) { - aMatComp.add(material); - } - } - - AutoMap amJ = new AutoMap(); - int aIndexCounter = 0; - for (Material g : aMatComp) { - if (g.hasSolidForm()) { - if (getDust(g) != null && getTinyDust(g) != null) { - amJ.put(g); - } - } - } - - if (amJ.size() < 2) { - if (material.getComposites().size() >= 2 && material.getComposites().get(1) != null){ - bonusB = material.getComposites().get(1).getStackMaterial(); - //If Secondary Output has no solid output, try the third (If it exists) - if (!bonusB.hasSolidForm() && material.getComposites().size() >= 3 && material.getComposites().get(2) != null) { - bonusB = material.getComposites().get(2).getStackMaterial(); - //If Third Output has no solid output, try the Fourth (If it exists) - if (!bonusB.hasSolidForm() && material.getComposites().size() >= 4 && material.getComposites().get(3) != null) { - bonusB = material.getComposites().get(3).getStackMaterial(); - //If Fourth Output has no solid output, try the Fifth (If it exists) - if (!bonusB.hasSolidForm() && material.getComposites().size() >= 5 && material.getComposites().get(4) != null) { - bonusB = material.getComposites().get(4).getStackMaterial(); - //If Fifth Output has no solid output, default out to Stone dust. - if (!bonusB.hasSolidForm()) { - allFailed = true; - bonusB = mStone; - } - } - } - } - } - else { - allFailed = true; - } - } - else { - bonusA = amJ.get(0); - bonusB = amJ.get(1); - } - - //Default out if it's made of fluids or some shit. - if (bonusA == null) { - bonusA = tVoltageMultiplier > 100 ? material : mStone; - } - //Default out if it's made of fluids or some shit. - if (allFailed || bonusB == null) { - bonusB = tVoltageMultiplier > 100 ? material : mStone; - } - - AutoMap> componentMap = new AutoMap>(); - for (MaterialStack r : material.getComposites()){ - if (r != null){ - componentMap.put(new Pair(r.getPartsPerOneHundred(), r.getStackMaterial())); - } - } - - //Need two valid outputs - if (bonusA == null || bonusB == null || !bonusA.hasSolidForm() || !bonusB.hasSolidForm()) { - if (bonusA == null) { - bonusA = mStone; - } - if (bonusB == null) { - bonusB = mStone; - } - if (!bonusA.hasSolidForm()) { - bonusA = mStone; - } - if (!bonusB.hasSolidForm()) { - bonusB = mStone; - } - } - - ItemStack tinyDustA = getTinyDust(bonusA); - ItemStack tinyDustB = getTinyDust(bonusB); - ItemStack matDust = getDust(material); - ItemStack matDustA = getDust(bonusA); - ItemStack matDustB = getDust(bonusB); - - /** - * Package - */ - //Allow ore dusts to be packaged - if (ItemUtils.checkForInvalidItems(material.getSmallDust(1)) && ItemUtils.checkForInvalidItems(material.getTinyDust(1))) { - RecipeGen_DustGeneration.generatePackagerRecipes(material); - } - - - /** - * Macerate - */ - //Macerate ore to Crushed - if (GT_Values.RA.addPulveriserRecipe(material.getOre(1), new ItemStack[]{material.getCrushed(2)}, new int[]{10000}, 20*20, tVoltageMultiplier/2)){ - Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate ore to Crushed ore'"); - } - //Macerate Crushed to Impure Dust - if (GT_Values.RA.addPulveriserRecipe(material.getCrushed(1), new ItemStack[]{material.getDustImpure(1), matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ - Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Crushed ore to Impure Dust'"); - } - //Macerate Washed to Purified Dust - if (GT_Values.RA.addPulveriserRecipe(material.getCrushedPurified(1), new ItemStack[]{material.getDustPurified(1), matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ - Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Washed ore to Purified Dust'"); - } - //Macerate Centrifuged to Pure Dust - if (GT_Values.RA.addPulveriserRecipe(material.getCrushedCentrifuged(1), new ItemStack[]{matDust, matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ - Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Centrifuged ore to Pure Dust'"); - } - - /** - * Wash - */ - //Wash into Purified Crushed - /*if (GT_Values.RA.addOreWasherRecipe(material.getCrushed(1), material.getCrushedPurified(1), bonusA.getTinyDust(1), dustStone, FluidUtils.getWater(1000), 25*20, 16)){ - Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'"); - }*/ - //.08 compat method - if (GT_ModHandler.addOreWasherRecipe(material.getCrushed(1), 1000, material.getCrushedPurified(1), tinyDustA, dustStone)){ - Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'"); - } - - - - - - /** - * Thermal Centrifuge - */ - /*//Crushed ore to Centrifuged Ore - if (GT_Values.RA.addThermalCentrifugeRecipe(material.getCrushed(1), material.getCrushedCentrifuged(1), tinyDustB, dustStone, 25*20, 24)){ - Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore'"); - } - //Washed ore to Centrifuged Ore - if (GT_Values.RA.addThermalCentrifugeRecipe(material.getCrushedPurified(1), material.getCrushedCentrifuged(1), bonusA.getTinyDust(1), dustStone, 25*20, 24)){ - Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore'"); - }*/ - - Logger.MATERIALS("material.getCrushed(1): "+(material.getCrushed(1) != null)); - Logger.MATERIALS("material.getCrushedPurified(1): "+(material.getCrushedPurified(1) != null)); - - Logger.MATERIALS("material.getTinyDust(1): "+(ItemUtils.getItemName(bonusA.getCrushed(1)))); - Logger.MATERIALS("material.getTinyDust(1): "+(ItemUtils.getItemName(bonusB.getCrushed(1)))); - - try { - //.08 compat - if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushed(1), 200, material.getCrushedCentrifuged(1), tinyDustB, dustStone)){ - Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore' | Input: "+material.getCrushed(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustB.getDisplayName()+", "+dustStone.getDisplayName()+"."); - } - } - catch (Throwable t) {} - try { - if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), 200, material.getCrushedCentrifuged(1), tinyDustA, dustStone)){ - Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore' | Input: "+material.getCrushedPurified(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustA.getDisplayName()+", "+dustStone.getDisplayName()+"."); - } - } - catch (Throwable t) {} - - - /** - * Forge Hammer - */ - if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), matDust, 10, tVoltageMultiplier/4)){ - Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'"); - } - if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedPurified(1), material.getDustPurified(1), 10, tVoltageMultiplier/4)){ - Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Purified to Purified Dust'"); - } - if (GT_Values.RA.addForgeHammerRecipe(material.getOre(1), material.getCrushed(1), 10, tVoltageMultiplier/4)){ - Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Ore to Crushed'"); - } - - /** - * Centrifuge - */ - //Purified Dust to Clean - if (GT_Values.RA.addCentrifugeRecipe( - material.getDustPurified(1), null, - null, //In Fluid - null, //Out Fluid - matDust, tinyDustA,null, - null, null,null, - new int[]{10000, 10000}, //Chances - 5*20, //Time - tVoltageMultiplier/2)){ //Eu - Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust"); - } - - //Impure Dust to Clean - if (GT_Values.RA.addCentrifugeRecipe( - material.getDustImpure(1), null, - null, //In Fluid - null, //Out Fluid - matDust, tinyDustB,null, - null, null,null, - new int[]{10000, 10000}, //Chances - 5*20, //Time - tVoltageMultiplier/2)){ //Eu - Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust"); - } - - - /** - * Electrolyzer - */ - - //Process Dust - if (componentMap.size() > 0 && componentMap.size() <= 6){ - - ItemStack mInternalOutputs[] = new ItemStack[6]; - int mChances[] = new int[6]; - int mCellCount = 0; - - int mTotalCount = 0; - - int mCounter = 0; - for (Pair f : componentMap){ - if (f.getValue().getState() != MaterialState.SOLID){ - Logger.MATERIALS("[Electrolyzer] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); - mCellCount += f.getKey(); - mTotalCount += f.getKey(); - Logger.MATERIALS("[Electrolyzer] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); - } - else { - Logger.MATERIALS("[Electrolyzer] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); - mTotalCount += f.getKey(); - } - } - - //Build Output Array - for (int g=0;g 0){ - emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); - Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mCellCount+" empty cells as input."); - } - - ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); - if (mainDust != null){ - Logger.MATERIALS("[Electrolyzer] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); - } - else { - mainDust = material.getDust(mTotalCount); - Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, trying alternative."); - if (mainDust != null){ - Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); - } - else { - Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, exiting."); - } - } - - for (int j=0;j 6 && componentMap.size() <= 9){ - Logger.MATERIALS("[Issue][Electrolyzer] "+material.getLocalizedName()+" is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead."); - - ItemStack mInternalOutputs[] = new ItemStack[9]; - int mChances[] = new int[9]; - int mCellCount = 0; - - int mTotalCount = 0; - - int mCounter = 0; - for (Pair f : componentMap){ - if (f.getValue().getState() != MaterialState.SOLID && f.getValue().getState() != MaterialState.ORE){ - Logger.MATERIALS("[Dehydrator] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); - mCellCount += f.getKey(); - mTotalCount += f.getKey(); - Logger.MATERIALS("[Dehydrator] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); - } - else { - Logger.MATERIALS("[Dehydrator] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); - mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); - mTotalCount += f.getKey(); - } - } - - //Build Output Array - for (int g=0;g 0){ - emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); - Logger.MATERIALS("[Dehydrator] Recipe now requires "+mCellCount+" empty cells as input."); - } - - ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); - if (mainDust != null){ - Logger.MATERIALS("[Dehydrator] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); - } - else { - mainDust = material.getDust(mTotalCount); - Logger.MATERIALS("[Dehydrator] Could not find valid input dust, trying alternative."); - if (mainDust != null){ - Logger.MATERIALS("[Dehydrator] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); - } - else { - Logger.MATERIALS("[Dehydrator] Could not find valid input dust, exiting."); - } - } - - for (int j=0;j> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_Plasma(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material) { - // Cool Plasma - ItemStack aPlasmaCell = material.getPlasmaCell(1); - ItemStack aCell = material.getCell(1); - if (material.getPlasmaCell(1) != null){ - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : null, (int) Math.max(1024L, 1024L * material.getMass()), 4); - } - if (material.getCell(1) != null && material.getPlasmaCell(1) != null){ - GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L)); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java deleted file mode 100644 index 56d11520d0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java +++ /dev/null @@ -1,154 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_Recipe; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; - -public class RecipeGen_Plates extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_Plates(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - - final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15; - final ItemStack ingotStackOne = material.getIngot(1); - final ItemStack ingotStackTwo = material.getIngot(2); - final ItemStack shape_Mold = ItemList.Shape_Mold_Plate.get(0); - final ItemStack plate_Single = material.getPlate(1); - final ItemStack plate_SingleTwo = material.getPlate(2); - final ItemStack plate_SingleNine = material.getPlate(9); - final ItemStack plate_Double = material.getPlateDouble(1); - final ItemStack block = material.getBlock(1); - - Logger.WARNING("Generating Plate recipes for "+material.getLocalizedName()); - - //Forge Hammer - if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) - if (addForgeHammerRecipe( - ingotStackTwo, - plate_Single, - (int) Math.max(material.getMass(), 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Failed"); - } - //Bender - if (ItemUtils.checkForInvalidItems(ingotStackOne) && ItemUtils.checkForInvalidItems(plate_Single)) - if (addBenderRecipe( - ingotStackOne, - plate_Single, - (int) Math.max(material.getMass() * 1L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); - } - //Alloy Smelter - if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) - if (GT_Values.RA.addAlloySmelterRecipe( - ingotStackTwo, - shape_Mold, - plate_Single, - (int) Math.max(material.getMass() * 2L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Failed"); - } - //Cutting Machine - if (ItemUtils.checkForInvalidItems(block) && ItemUtils.checkForInvalidItems(plate_Single)) - if (GT_Values.RA.addCutterRecipe( - block, - null, - plate_SingleNine, - (int) Math.max(material.getMass() * 10L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("ACutting Machine Recipe: "+material.getLocalizedName()+" - Failed"); - } - - - //Making Double Plates - if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Double)) - if (addBenderRecipe( - ingotStackTwo, - plate_Double, - (int) Math.max(material.getMass() * 2L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); - } - - if (ItemUtils.checkForInvalidItems(plate_SingleTwo) && ItemUtils.checkForInvalidItems(plate_Double)) - if (addBenderRecipe( - plate_SingleTwo, - plate_Double, - (int) Math.max(material.getMass() * 2L, 1L), - material.vVoltageMultiplier)){ - Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - public static boolean addBenderRecipe(final ItemStack aInput1, final ItemStack aOutput1, int aDuration, final int aEUt) { - return GT_Values.RA.addBenderRecipe(aInput1, aOutput1, aDuration, aEUt); - } - - public static boolean addExtruderRecipe(final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) { - if ((aInput == null) || (aShape == null) || (aOutput == null)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { - return false; - } - GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); - return true; - } - - public static boolean addForgeHammerRecipe(final ItemStack aInput1, final ItemStack aOutput1, final int aDuration, final int aEUt) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if (!GregTech_API.sRecipeFile.get("forgehammer", aOutput1, true)) { - return false; - } - GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); - return true; - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java deleted file mode 100644 index acb7e5fe02..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java +++ /dev/null @@ -1,373 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import static gregtech.api.enums.GT_Values.M; - -import java.util.ArrayList; -import java.util.Map; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.state.MaterialState; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class RecipeGen_Recycling implements Runnable { - - public static AutoMap mQueuedRecyclingGenerators = new AutoMap(); - - public static void executeGenerators() { - if (mQueuedRecyclingGenerators.size() > 0) { - for (Runnable R : mQueuedRecyclingGenerators.values()) { - R.run(); - } - } - } - - final Material toGenerate; - public static Map mNameMap; - - public RecipeGen_Recycling(final Material M) { - this.toGenerate = M; - if (mNameMap == null){ - mNameMap = this.getNameMap(); - } - mQueuedRecyclingGenerators.put(this); - } - - @Override - public void run() { - if (mNameMap != null){ - generateRecipes(this.toGenerate); - } - } - - public static void generateRecipes(final Material material) { - - if (material != null) - Logger.WARNING("Generating Recycling recipes for " + material.getLocalizedName()); - - final OrePrefixes[] mValidPrefixesAsString = { OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.nugget, - OrePrefixes.plate, OrePrefixes.plateDense, OrePrefixes.plateDouble, OrePrefixes.plateTriple, - OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.stick, OrePrefixes.stickLong, - OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.rotor, OrePrefixes.gearGt, - OrePrefixes.gearGtSmall, OrePrefixes.gear, OrePrefixes.block, OrePrefixes.cableGt01, OrePrefixes.cableGt02, - OrePrefixes.cableGt04, OrePrefixes.cableGt08, OrePrefixes.cableGt12, OrePrefixes.wireFine, OrePrefixes.wireGt01, - OrePrefixes.wireGt02, OrePrefixes.wireGt04, OrePrefixes.wireGt08, OrePrefixes.wireGt12, OrePrefixes.wireGt16, - OrePrefixes.foil, OrePrefixes.frameGt, OrePrefixes.pipeHuge, OrePrefixes.pipeLarge, OrePrefixes.pipeMedium, OrePrefixes.pipeSmall, OrePrefixes.pipeTiny, - }; - - int mSlotIndex = 0; - Pair[] mValidPairs = new Pair[mValidPrefixesAsString.length]; - - for (int r=0;r(mValidPrefixesAsString[r], temp.copy()); - } - } - - if (mValidPairs.length > 0){ - int validCounter = 0; - Pair[] temp = mValidPairs; - for (Pair temp2 : mValidPairs){ - if (temp2 != null){ - Logger.WARNING("Valid: "+temp2.getValue().getDisplayName()); - validCounter++; - } - } - Pair temp3[] = new Pair[validCounter]; - int temp4 = 0; - for (Pair r : mValidPairs){ - if (r != null){ - temp3[temp4++] = r; - } - } - if (temp3.length > 0){ - mValidPairs = temp3.clone(); - } - } - - if (mValidPrefixesAsString.length >= 1) { - for (final Pair validPrefix : mValidPairs) { - try { - - if (material == null || validPrefix == null || material.getState() != MaterialState.SOLID || validPrefix.getKey() == OrePrefixes.ingotHot) { - continue; - } - - final ItemStack tempStack = validPrefix.getValue(); - final ItemStack mDust = getDust(material, validPrefix.getKey()); - final Pair mData = getDustData(material, validPrefix.getKey()); - int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(validPrefix.getKey().mMaterialAmount, true); - - //Maceration - if (ItemUtils.checkForInvalidItems(tempStack)) { - // mValidItems[mSlotIndex++] = tempStack; - if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)) { - Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " - + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName()); - } - else { - Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Failed"); - if (mDust == null) { - Logger.WARNING("Invalid Dust output."); - } - } - } - - //Arc Furnace - if (ItemUtils.checkForInvalidItems(tempStack)) { - - } - - //Fluid Extractor - if (ItemUtils.checkForInvalidItems(tempStack)) { - // mValidItems[mSlotIndex++] = tempStack; - if ((mDust != null) && CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluidStack(mFluidAmount), 30, material.vVoltageMultiplier)) { - Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " - + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluidStack(1).getLocalizedName()+"."); - } - else { - Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Failed"); - if (mDust == null) { - Logger.WARNING("Invalid Dust output."); - } - } - } - - } - catch (final Throwable t) { - t.printStackTrace(); - // Utils.LOG_WARNING("Returning Null. Throwable Info: - // "+t.getMessage()); - // Utils.LOG_WARNING("Throwable Info: "+t.toString()); - // Utils.LOG_WARNING("Throwable Info: - // "+t.getCause().toString()); - } - - } - } - } - - public static Pair getDustData(final Material aMaterial, final OrePrefixes aPrefix) { - return getDustData(aMaterial, aPrefix.mMaterialAmount); - } - - public static Pair getDustData(final Material aMaterial, final long aMaterialAmount) { - ItemStack mDust = null; - OrePrefixes mPrefix = null; - - if (aMaterial == null || aMaterialAmount <= 0) { - return null; - } - if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) { - mDust = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); - mPrefix = OrePrefixes.dust; - } - if ((mDust == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) { - mDust = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); - mPrefix = OrePrefixes.dustSmall; - } - if ((mDust == null) && (((aMaterialAmount * 9) >= M))) { - mDust = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); - mPrefix = OrePrefixes.dustTiny; - } - - if (mPrefix != null && mDust != null){ - Logger.WARNING("Built valid dust pair."); - return new Pair(mPrefix, mDust); - } - else { - Logger.WARNING("mPrefix: "+(mPrefix!=null)); - Logger.WARNING("mDust: "+(mDust!=null)); - } - Logger.WARNING("Failed to build valid dust pair."); - return null; - } - - public static ItemStack getDust(final Material aMaterial, final OrePrefixes aPrefix) { - return aMaterial == null ? null : getDust(aMaterial, aPrefix.mMaterialAmount); - } - - public static ItemStack getDust(final Material aMaterial, final long aMaterialAmount) { - if (aMaterialAmount <= 0) { - return null; - } - ItemStack rStack = null; - if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) { - Logger.WARNING("Trying to get a Dust"); - rStack = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); - } - if ((rStack == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) { - Logger.WARNING("Trying to get a Small Dust"); - rStack = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); - } - if ((rStack == null) && (((aMaterialAmount * 9) >= M))) { - Logger.WARNING("Trying to get a Tiny Dust"); - rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); - } - return rStack; - } - - public static ItemStack get(final Object aName, final long aAmount) { - return get(aName, null, aAmount, true, true); - } - - public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount) { - return get(aName, aReplacement, aAmount, true, true); - } - - public static ItemStack get(final OrePrefixes aPrefix, final Material aMaterial, final long aAmount) { - return get(aPrefix, aMaterial, null, aAmount); - } - - public static ItemStack get(final OrePrefixes aPrefix, final Material aMaterial, final ItemStack aReplacement, - final long aAmount) { - return get(aPrefix.name()+Utils.sanitizeString(aMaterial.getLocalizedName()), aReplacement, aAmount, false, true); - } - - public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount, - final boolean aMentionPossibleTypos, final boolean aNoInvalidAmounts) { - if (aNoInvalidAmounts && (aAmount < 1L)) { - Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4)); - return null; - } - if (!mNameMap.containsKey(aName.toString()) && aMentionPossibleTypos) { - Logger.WARNING("Unknown Key for Unification, Typo? " + aName); - } - return GT_Utility.copyAmount(aAmount, - new Object[] { mNameMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement }); - } - - public static ItemStack getFirstOre(final Object aName, final long aAmount) { - if (GT_Utility.isStringInvalid(aName)) { - Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3)); - Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4)); - return null; - } - final ItemStack tStack = mNameMap.get(aName.toString()); - if (GT_Utility.isStackValid(tStack)) { - Logger.WARNING("Found valid stack."); - return GT_Utility.copyAmount(aAmount, new Object[] { tStack }); - } - return GT_Utility.copyAmount(aAmount, getOres(aName).toArray()); - } - - public static ArrayList getOres(final Object aOreName) { - final String aName = (aOreName == null) ? "" : aOreName.toString(); - final ArrayList rList = new ArrayList(); - if (GT_Utility.isStringValid(aName)) { - Logger.WARNING("Making a list of all OreDict entries for "+aOreName+"."); - if (rList.addAll(OreDictionary.getOres(aName))){ - Logger.WARNING("Added "+rList.size()+" elements to list."); - } - else { - Logger.WARNING("Failed to Add Collection from oreDictionary, forcing an entry."); - rList.add(ItemUtils.getItemStackOfAmountFromOreDict((String) aOreName, 1)); - } - } - return rList; - } - - @SuppressWarnings("unchecked") - public Map getNameMap() { - Map tempMap; - try { - tempMap = (Map) FieldUtils.readStaticField(GT_OreDictUnificator.class, "sName2StackMap", - true); - if (tempMap != null) { - Logger.WARNING("Found 'sName2StackMap' in GT_OreDictUnificator.class."); - return tempMap; - } - } - catch (final IllegalAccessException e) { - e.printStackTrace(); - } - Logger.WARNING("Invalid map stored in GT_OreDictUnificator.class, unable to find sName2StackMap field."); - return null; - } - - public static ItemStack getItemStackOfAmountFromOreDictNoBroken(String oredictName, final int amount) { - - try { - - if (oredictName.contains("-") || oredictName.contains("_")) { - oredictName = Utils.sanitizeString(oredictName, new char[] {'-', '_'}); - } - else { - oredictName = Utils.sanitizeString(oredictName); - } - - // Adds a check to grab dusts using GT methodology if possible. - ItemStack returnValue = null; - if (oredictName.toLowerCase().contains("dust")) { - final String MaterialName = oredictName.toLowerCase().replace("dust", ""); - final Materials m = Materials.get(MaterialName); - if (m != null && m != Materials._NULL) { - returnValue = ItemUtils.getGregtechDust(m, amount); - if (ItemUtils.checkForInvalidItems(returnValue)) { - return returnValue; - } - } - } - if (returnValue == null) { - returnValue = getItemStackOfAmountFromOreDict(oredictName, amount); - if (ItemUtils.checkForInvalidItems(returnValue)) { - return returnValue.copy(); - } - } - return null; - } catch (final Throwable t) { - return null; - } - } - - public static ItemStack getItemStackOfAmountFromOreDict(String oredictName, final int amount) { - String mTemp = oredictName; - - // Banned Materials and replacements for GT5.8 compat. - - if (oredictName.toLowerCase().contains("ingotclay")) { - return ItemUtils.getSimpleStack(Items.clay_ball, amount); - } - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - if (oredictName.toLowerCase().contains("rutile")) { - mTemp = oredictName.replace("Rutile", "Titanium"); - } - if (oredictName.toLowerCase().contains("vanadiumsteel")) { - mTemp = oredictName.replace("VanadiumSteel", "StainlessSteel"); - } - } - final ArrayList oreDictList = OreDictionary.getOres(mTemp); - if (!oreDictList.isEmpty()) { - final ItemStack returnValue = oreDictList.get(0).copy(); - returnValue.stackSize = amount; - return returnValue; - } - return null; - //return getItemStackOfAmountFromOreDictNoBroken(mTemp, amount); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java deleted file mode 100644 index ea129a2b0e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ /dev/null @@ -1,264 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraft.item.ItemStack; - -public class RecipeGen_ShapedCrafting extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_ShapedCrafting(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO - - if (!CORE.GTNH) { - //Nuggets - if (ItemUtils.checkForInvalidItems(material.getNugget(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) - GT_ModHandler.addShapelessCraftingRecipe( - material.getIngot(1), - new Object[]{ - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1) - }); - } - - //Plates - - //Single Plate Shaped/Shapeless - if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) - if (material.getPlate(1) != null && material.getIngot(1) != null) - GT_ModHandler.addCraftingRecipe( - material.getPlate(1), - gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"h", "B", "I", - Character.valueOf('I'), - material.getIngot(1), - Character.valueOf('B'), - material.getIngot(1)}); - - if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) - GT_ModHandler.addShapelessCraftingRecipe( - material.getPlate(1), - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - material.getIngot(1), - material.getIngot(1)}); - - //Double Plate Shaped/Shapeless - if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) - GT_ModHandler.addCraftingRecipe( - material.getPlateDouble(1), - gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"I", "B", "h", - Character.valueOf('I'), - material.getPlate(1), - Character.valueOf('B'), - material.getPlate(1)}); - - if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) - GT_ModHandler.addShapelessCraftingRecipe( - material.getPlateDouble(1), - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - material.getPlate(1), - material.getPlate(1)}); - - //Ring Recipe - if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getRing(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { - if (CORE.GTNH){ - if (RecipeUtils.addShapedRecipe( - "craftingToolHardHammer", null, null, - "craftingToolFile", material.getRod(1), null, - null, null, null, - material.getRing(1))){ - Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - else { - if (RecipeUtils.addShapedRecipe( - "craftingToolHardHammer", null, null, - null, material.getRod(1), null, - null, null, null, - material.getRing(1))){ - Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - } - - - //Framebox Recipe - if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getFrameBox(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { - final ItemStack stackStick = material.getRod(1); - if (RecipeUtils.addShapedRecipe( - stackStick, stackStick, stackStick, - stackStick, "craftingToolWrench", stackStick, - stackStick, stackStick, stackStick, - material.getFrameBox(2))){ - Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - - /*final int tVoltageMultiplier = material.getMeltingPointK() >= 1600 ? 60 : 15; - - - //Add a shapeless recipe for each dust this way - Compat mode. - ItemStack[] inputStacks = material.getMaterialComposites(); - ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); - - if (inputStacks.length > 0 && tVoltageMultiplier == 15){ - Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); - long[] inputStackSize = material.vSmallestRatio; - if (inputStackSize != null){ - for (short x=0;x mAchievementMap; - public static ConcurrentHashMap mIssuedAchievementMap; - public static int adjX = 5; - public static int adjY = 9; - private static boolean active = true; - - public AssLineAchievements() { - Logger.INFO(active ? "Loading custom achievement page for Assembly Line recipes." - : "Achievements are disabled."); - Utils.registerEvent(this); - } - - private static boolean ready = false; - private static int recipeTotal = 0; - private static int recipeCount = 0; - private static void init() { - if (!ready) { - active = GT_Mod.gregtechproxy.mAchievements; - try { - recipeTotal = ((GT_Recipe.GT_Recipe_Map) StaticFields59.mAssLineVisualMapNEI.get(null)).mRecipeList.size(); - } catch (IllegalArgumentException | IllegalAccessException e) { - recipeTotal = 0; - } - mAchievementMap = new ConcurrentHashMap(); - mIssuedAchievementMap = new ConcurrentHashMap(); - ready = true; - } - - } - - public static void registerAchievements() { - if (active && mAchievementMap.size() > 0) { - AchievementPage.registerAchievementPage(new AchievementPage("GT Assembly Line", - (Achievement[]) mAchievementMap.values().toArray(new Achievement[mAchievementMap.size()]))); - } - else if (active) { - Logger.INFO("Unable to register custom achievement page for Assembly Line recipes."); - } - } - - public static Achievement registerAssAchievement(GT_Recipe recipe) { - init(); - String aSafeUnlocalName; - // Debugging - if (recipe == null) { - Logger.INFO( - "Someone tried to register an achievement for an invalid recipe. Please report this to Alkalus."); - return null; - } - if (recipe.getOutput(0) == null) { - Logger.INFO( - "Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); - return null; - } - ItemStack aStack = recipe.getOutput(0); - try { - aSafeUnlocalName = aStack.getUnlocalizedName(); - } catch (Throwable t) { - aSafeUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); - } - - Achievement aYouDidSomethingInGT; - if (mAchievementMap.get(aSafeUnlocalName) == null) { - assReg++; - recipeCount++; - aYouDidSomethingInGT = registerAchievement(aSafeUnlocalName, -(11 + assReg % 5), ((assReg) / 5) - 8, - recipe.getOutput(0), AchievementList.openInventory, false); - } - else { - aYouDidSomethingInGT = null; - } - if (recipeCount >= recipeTotal) { - Logger.INFO("Critical mass achieved. ["+recipeCount+"]"); - registerAchievements(); - } - - return aYouDidSomethingInGT; - } - - public static Achievement registerAchievement(String textId, int x, int y, ItemStack icon, - Achievement requirement, boolean special) { - if (!GT_Mod.gregtechproxy.mAchievements) { - return null; - } - Achievement achievement = new Achievement(textId, textId, adjX + x, adjY + y, icon, requirement); - if (special) { - achievement.setSpecial(); - } - achievement.registerStat(); - if (CORE.DEVENV) { - GT_Log.out.println("achievement." + textId + "="); - GT_Log.out.println("achievement." + textId + ".desc="); - } - mAchievementMap.put(textId, achievement); - return achievement; - } - - public static void issueAchievement(EntityPlayer entityplayer, String textId) { - if (entityplayer == null || !GT_Mod.gregtechproxy.mAchievements) { - return; - } - - entityplayer.triggerAchievement((StatBase) getAchievement(textId)); - } - - public static Achievement getAchievement(String textId) { - if (mAchievementMap.containsKey(textId)) { - Logger.INFO("Found Achivement: "+textId); - return (Achievement) mAchievementMap.get(textId); - } - return null; - } - - @SubscribeEvent - public void onItemPickup(EntityItemPickupEvent event) { - EntityPlayer player = event.entityPlayer; - ItemStack stack = event.item.getEntityItem(); - String aPickupUnlocalSafe = ItemUtils.getUnlocalizedItemName(stack); - if (player == null || stack == null) { - return; - } - - if (StaticFields59.sAssemblylineVisualRecipes == null) { - return; - } - - Logger.INFO("Trying to check for achievements"); - // Debug scanner unlocks all AL recipes in creative - if (player.capabilities.isCreativeMode && aPickupUnlocalSafe.equals("gt.metaitem.01.32761")) { - for (GT_Recipe recipe : StaticFields59.sAssemblylineVisualRecipes.mRecipeList) { - issueAchievement(player, recipe.getOutput(0).getUnlocalizedName()); - recipe.mHidden = false; - } - } - for (GT_Recipe recipe : StaticFields59.sAssemblylineVisualRecipes.mRecipeList) { - - String aSafeUnlocalName; - if (recipe.getOutput(0) == null) { - Logger.INFO( - "Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); - continue; - } - ItemStack aStack = recipe.getOutput(0); - aSafeUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); - if (aSafeUnlocalName.equals(aPickupUnlocalSafe)) { - issueAchievement(player, aSafeUnlocalName); - recipe.mHidden = false; - Logger.INFO("FOUND: " + aSafeUnlocalName + " | " + aPickupUnlocalSafe); - } - else { - //Logger.INFO(aSafeUnlocalName + " | " + aPickupUnlocalSafe); - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java deleted file mode 100644 index 053c71c89d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java +++ /dev/null @@ -1,207 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders.recipe; - -import java.util.HashMap; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.WeightedCollection; -import gtPlusPlus.core.item.chemistry.AgriculturalChem; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeLoader_AlgaeFarm { - - private static final HashMap> mRecipeCache = new HashMap>(); - private static final HashMap> mRecipeCompostCache = new HashMap>(); - - public static final void generateRecipes() { - for (int i=0;i<10;i++) { - getTieredRecipeFromCache(i, false); - } - for (int i=0;i<10;i++) { - getTieredRecipeFromCache(i, true); - } - } - - public static GT_Recipe getTieredRecipeFromCache(int aTier, boolean aCompost) { - HashMap> aMap = aCompost ? mRecipeCompostCache : mRecipeCache; - String aComp = aCompost ? "(Compost)" : ""; - - AutoMap aTemp = aMap.get(aTier); - if (aTemp == null || aTemp.isEmpty()) { - aTemp = new AutoMap(); - aMap.put(aTier, aTemp); - Logger.INFO("Tier "+aTier+aComp+" had no recipes, initialising new map."); - } - if (aTemp.size() < 500) { - Logger.INFO("Tier "+aTier+aComp+" has less than 500 recipes, generating "+(500 - aTemp.size())+"."); - for (int i=aTemp.size();i<500;i++) { - aTemp.put(generateBaseRecipe(aCompost, aTier)); - } - } - int aIndex = MathUtils.randInt(0, aTemp.isEmpty() ? 1 : aTemp.size()); - Logger.INFO("Using recipe with index of "+aIndex+". "+aComp); - return aTemp.get(aIndex); - } - - private static GT_Recipe generateBaseRecipe(boolean aUsingCompost, int aTier) { - - // Type Safety - if (aTier < 0) { - return null; - } - - WeightedCollection aOutputTimeMulti = new WeightedCollection(); - for (int i=100;i> 0;i--) { - float aValue = 0; - if (i < 10) { - aValue = 3f; - } - else if (i < 20) { - aValue = 2f; - } - else { - aValue = 1f; - } - aOutputTimeMulti.put(i, aValue); - } - - final int[] aDurations = new int[] { - 432000, - 378000, - 216000, - 162000, - 108000, - 81000, - 54000, - 40500, - 27000, - 20250, - 13500, - 6750, - 3375, - 1686, - 843, - 421 - }; - - ItemStack[] aInputs = new ItemStack[] {}; - - if (aUsingCompost) { - // Make it use 4 compost per tier if we have some available - ItemStack aCompost = ItemUtils.getSimpleStack(AgriculturalChem.mCompost, aTier * 4); - aInputs = new ItemStack[] {aCompost}; - // Boost Tier by one if using compost so it gets a speed boost - aTier++; - } - - // We set these elsewhere - ItemStack[] aOutputs = getOutputsForTier(aTier); - - GT_Recipe tRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - (Object) null, - new int[] {}, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {GT_Values.NF}, - (int) (aDurations[aTier] * aOutputTimeMulti.get() / 2), // Time - 0, - 0); - - tRecipe.mSpecialValue = tRecipe.hashCode(); - - return tRecipe; - } - - private static ItemStack[] getOutputsForTier(int aTier) { - - // Create an Automap to dump contents into - AutoMap aOutputMap = new AutoMap(); - - // Buff output by yielding 6-8 times more. - for (int i=0;i= 0) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(16, 32))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(32, 64))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(8, 16))); - } - } - if (aTier >= 1) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(16, 32))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(4, 8))); - } - } - if (aTier >= 2) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(8, 16))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(4, 8))); - } - } - if (aTier >= 3) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(2, 8))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(8, 16))); - } - } - if (aTier >= 4) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(32, 64))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(4, 8))); - } - } - if (aTier >= 5) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(1, 2))); - } - } - // Tier 6 is Highest for outputs - if (aTier >= 6) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16))); - if (MathUtils.randInt(0, 10) > 9) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16))); - } - } - - // Iterate a special loop at higher tiers to provide more Red/Gold Algae. - for (int i2=0;i2<(9-aTier);i2++) { - if (aTier >= (6+i2)) { - int aMulti = i2 + 1; - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(4, 8*aMulti))); - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(4, 8*aMulti))); - if (MathUtils.randInt(0, 10) > 8) { - aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16*aMulti))); - } - } - } - } - - - - // Map the AutoMap contents to an Itemstack Array. - ItemStack[] aOutputs = new ItemStack[aOutputMap.size()]; - for (int i=0;i mNobleGases; - private static AutoMap mFluorideGases; - private static AutoMap mSpargeGases; - - private static void configureSparging() { - if (mSpargeGases == null) { - mSpargeGases = new AutoMap(); - mSpargeGases.add(Materials.Helium.getGas(1).getFluid()); - mSpargeGases.add(Materials.Fluorine.getGas(1).getFluid()); - } - if (mNobleGases == null) { - mNobleGases = new AutoMap(); - mNobleGases.add(mSpargeGases.get(0)); - mNobleGases.add(ELEMENT.getInstance().XENON.getFluid()); - mNobleGases.add(ELEMENT.getInstance().NEON.getFluid()); - mNobleGases.add(ELEMENT.getInstance().ARGON.getFluid()); - mNobleGases.add(ELEMENT.getInstance().KRYPTON.getFluid()); - mNobleGases.add(ELEMENT.getInstance().RADON.getFluid()); - } - if (mFluorideGases == null) { - mFluorideGases = new AutoMap(); - mFluorideGases.add(mSpargeGases.get(1)); - mFluorideGases.add(FLUORIDES.LITHIUM_FLUORIDE.getFluid()); - mFluorideGases.add(FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid()); - mFluorideGases.add(FLUORIDES.TECHNETIUM_HEXAFLUORIDE.getFluid()); - mFluorideGases.add(FLUORIDES.SELENIUM_HEXAFLUORIDE.getFluid()); - mFluorideGases.add(FLUORIDES.THORIUM_TETRAFLUORIDE.getFluid()); - } - } - - public static void generate() { - // Fli2BeF4 + Thorium TetraFluoride = Uranium233 - //72k Ticks/hr - //1l/4t = 1000l/hr - //1l/40t = 1000l/10hr (Probably better) LiFBeF2ThF4UF4 - //1l/20t= 1000l/2.5hr LiFBeF2ZrF4UF4 - //1l/10t= 1000l/2.5hr LiFBeF2ZrF4U235 - - configureSparging(); - FluidStack Li2BeF4 = NUCLIDE.Li2BeF4.getFluidStack(200); - - //LiFBeF2ThF4UF4 - T3 - GT_Recipe LFTR1 = new GTPP_Recipe( - false, - new ItemStack[] {}, - new ItemStack[] {}, - null, new int[] {10000, 10000, 5000, 2500}, - new FluidStack[] { - NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(100), - Li2BeF4 - }, - new FluidStack[] { - NUCLIDE.LiFBeF2UF4FP.getFluidStack(100), - NUCLIDE.LiFBeF2ThF4.getFluidStack(200), - FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(20), - FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(10) - }, - 400 * 20,//time - 0,//cost - 8192*4//fuel value - ); - - //LiFBeF2ZrF4UF4 - T2 - GT_Recipe LFTR2 = new GTPP_Recipe( - false, - new ItemStack[] {}, - new ItemStack[] {}, - null, new int[] {10000, 10000, 2500, 1250}, - new FluidStack[] { - NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(100), - Li2BeF4 - }, - new FluidStack[] { - NUCLIDE.LiFBeF2UF4FP.getFluidStack(50), - NUCLIDE.LiFBeF2ThF4.getFluidStack(100), - FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(10), - FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(5) - }, - 400 * 20,//time - 0,//cost - 8192//fuel value - ); - - //LiFBeF2ZrF4U235 - T1 - GT_Recipe LFTR3 = new GTPP_Recipe( - false, - new ItemStack[] {}, - new ItemStack[] {}, - null, new int[] {10000, 10000, 1000, 500}, - new FluidStack[] { - NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(100), - Li2BeF4 - }, - new FluidStack[] { - NUCLIDE.LiFBeF2UF4FP.getFluidStack(25), - NUCLIDE.LiFThF4.getFluidStack(50), - FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(4), - FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(2) - }, - 100 *20,//time - 0,//cost - 8192//fuel value - ); - - // Sparging NEI Recipes - GasSpargingRecipeMap.addRecipe( - new FluidStack(mSpargeGases.get(0), 50), - NUCLIDE.LiFBeF2UF4FP.getFluidStack(50), - NUCLIDE.Sparged_LiFBeF2UF4FP.getFluidStack(50), - new FluidStack[] { - new FluidStack(mNobleGases.get(1), 10), - new FluidStack(mNobleGases.get(2), 10), - new FluidStack(mNobleGases.get(3), 10), - new FluidStack(mNobleGases.get(4), 10), - new FluidStack(mNobleGases.get(5), 10) - }, - new int[] { - 1000, 1000, 1000, 1000, 1000 - }); - - GasSpargingRecipeMap.addRecipe( - new FluidStack(mSpargeGases.get(1), 50), - NUCLIDE.LiFThF4.getFluidStack(50), - NUCLIDE.Sparged_LiFThF4.getFluidStack(50), - new FluidStack[] { - new FluidStack(mFluorideGases.get(1), 5), - new FluidStack(mFluorideGases.get(2), 5), - new FluidStack(mFluorideGases.get(3), 5), - new FluidStack(mFluorideGases.get(4), 5), - new FluidStack(mFluorideGases.get(5), 5) - }, - new int[] { - 500, 500, 500, 500, 500 - }); - - GasSpargingRecipeMap.addRecipe( - new FluidStack(mSpargeGases.get(1), 50), - NUCLIDE.LiFBeF2ThF4.getFluidStack(50), - NUCLIDE.Sparged_LiFBeF2ThF4.getFluidStack(50), - new FluidStack[] { - new FluidStack(mFluorideGases.get(1), 10), - new FluidStack(mFluorideGases.get(2), 10), - new FluidStack(mFluorideGases.get(3), 10), - new FluidStack(mFluorideGases.get(4), 10), - new FluidStack(mFluorideGases.get(5), 10) - }, - new int[] { - 1000, 1000, 1000, 1000, 1000 - }); - - GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR1); - GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR2); - GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR3); - - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java deleted file mode 100644 index 330d507115..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java +++ /dev/null @@ -1,695 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders.recipe; - -import static gtPlusPlus.core.lib.CORE.GTNH; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.item.chemistry.GenericChem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MISC_MATERIALS; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.material.nuclear.NUCLIDE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeLoader_Nuclear { - - - - public static void generate() { - createRecipes(); - RecipeLoader_LFTR.generate(); - RecipeLoader_NuclearFuelProcessing.generate(); - } - - private static void createRecipes() { - autoclave(); - blastFurnace(); - centrifugeRecipes(); - chemicalBathRecipes(); - chemicalReactorRecipes(); - dehydratorRecipes(); - electroMagneticSeperator(); - fluidExtractorRecipes(); - fluidHeater(); - macerator(); - mixerRecipes(); - sifter(); - } - - private static void autoclave() { - - GT_Values.RA.addAutoclaveRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 9), - FluidUtils.getFluidStack("chlorine", 9 * 4 * 144), - ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 9), - 0, - 120 * 20, - 30); - - } - - private static void blastFurnace() { - - GT_Values.RA.addBlastRecipe( - FLUORIDES.LITHIUM_FLUORIDE.getDust(2), - FLUORIDES.BERYLLIUM_FLUORIDE.getDust(1), - GT_Values.NF, - GT_Values.NF, - NUCLIDE.Li2BeF4.getDust(3), - null, - 60 * 20, 2000, - 3000); - - GT_Values.RA.addBlastRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1), - null, - GT_Values.NF, - GT_Values.NF, - ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 1), - null, - 60 * 20, - 340, - 300); - - } - - - private static void centrifugeRecipes() { - - //Process Used Fuel Rods for Krypton - - //Uranium - GT_Values.RA.addCentrifugeRecipe( - CI.getNumberedCircuit(20), - ItemUtils.getItemStackFromFQRN("IC2:reactorUraniumSimpledepleted", 8), - GT_Values.NF, - ELEMENT.getInstance().KRYPTON.getFluidStack(60), - ItemList.IC2_Fuel_Rod_Empty.get(8), - ELEMENT.getInstance().URANIUM238.getDust(2), - ELEMENT.getInstance().URANIUM232.getSmallDust(1), - ELEMENT.getInstance().URANIUM233.getSmallDust(1), - ELEMENT.getInstance().URANIUM235.getSmallDust(1), - ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), - new int[] { 0, 0, 1000, 1000, 1000, 500 }, 500 * 20, 4000); - //Mox - GT_Values.RA.addCentrifugeRecipe( - CI.getNumberedCircuit(20), - ItemUtils.getItemStackFromFQRN("IC2:reactorMOXSimpledepleted", 8), - GT_Values.NF, - ELEMENT.getInstance().KRYPTON.getFluidStack(90), - ItemList.IC2_Fuel_Rod_Empty.get(8), - ELEMENT.getInstance().PLUTONIUM244.getDust(2), - ELEMENT.getInstance().PLUTONIUM241.getTinyDust(1), - ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), - ELEMENT.getInstance().PLUTONIUM238.getTinyDust(1), - ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), - new int[] { 0, 0, 500, 500, 500, 500 }, 750 * 20, 4000); - - //Thorium - GT_Values.RA.addCentrifugeRecipe( - CI.getNumberedCircuit(20), - ItemList.Depleted_Thorium_1.get(8), - GT_Values.NF, - ELEMENT.getInstance().KRYPTON.getFluidStack(30), - ItemList.IC2_Fuel_Rod_Empty.get(8), - ELEMENT.getInstance().THORIUM.getDust(2), - ELEMENT.getInstance().THORIUM232.getDust(1), - ELEMENT.getInstance().LUTETIUM.getSmallDust(1), - ELEMENT.getInstance().POLONIUM.getSmallDust(1), - ELEMENT.getInstance().THALLIUM.getTinyDust(1), - new int[] { 0, 0, 5000, 5000, 5000, 2500 }, 250 * 20, 4000); - - } - - - private static void chemicalBathRecipes() { - - int[] chances = {9000, 6000, 3000}; - GT_Values.RA.addChemicalBathRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 12), - FluidUtils.getFluidStack("chlorine", 2400), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 4), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 5), - chances, - 30 * 20, - 480); - - chances = new int[]{9000, 3000, 1000}; - GT_Values.RA.addChemicalBathRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRutile", 5), - FluidUtils.getFluidStack("chlorine", 4000), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustTitanium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1), - chances, - 30 * 20, - 1024); - - GT_Values.RA.addChemicalBathRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 10), - FluidUtils.getFluidStack("hydrofluoricacid", 10 * 144), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 10), - null, - null, - new int[] {}, - 90 * 20, - 500); - - } - - - private static void chemicalReactorRecipes() { - - ItemStack aGtHydrofluoricAcid = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellHydrofluoricAcid_GT5U", 2); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 5), // Input - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 5), // Input - null, // Fluid Input - null, // Fluid Output - ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 10), - 600 * 20); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 5), // Input - null, // Input Stack 2 - FluidUtils.getFluidStack("hydrofluoricacid", 5 * 144), - FluidUtils.getFluidStack("water", 5 * 144), // Fluid Output - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 5), - 600 * 20); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 1), null, - FluidUtils.getFluidStack("sulfuricacid", 144 * 8), - FluidUtils.getFluidStack("sulfuriclithium", 144 * 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium7", 1), - 20 * 20); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 16), - FluidUtils.getFluidStack("water", 1000), - FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4), - CI.emptyCells(1), - 300 * 20); - - // LFTR Fuel Related Compounds - if (GTNH) { - // Hydroxide - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ELEMENT.getInstance().OXYGEN.getCell(1), - ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), - MISC_MATERIALS.HYDROXIDE.getFluidStack(2000), - CI.emptyCells(2), - GT_Values.NI, - 8 * 20, - 30); - // Beryllium Hydroxide - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ELEMENT.getInstance().BERYLLIUM.getDust(7), - MISC_MATERIALS.HYDROXIDE.getFluidStack(1000), - FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), - GT_Values.NI, - 8 * 20, - 30); - // Ammonium Bifluoride - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 1), - MISC_MATERIALS.AMMONIUM.getFluidStack(1000), - FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000), - CI.emptyCells(1), - 20 * 20, - 30); - if (aGtHydrofluoricAcid != null) { - // Ammonium Bifluoride - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - aGtHydrofluoricAcid, - MISC_MATERIALS.AMMONIUM.getFluidStack(1000), - FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000), - CI.emptyCells(2), - 40 * 20, - 30); - } - // Ammonium - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ELEMENT.getInstance().HYDROGEN.getCell(1), - MISC_MATERIALS.AMMONIA.getFluidStack(1000), - MISC_MATERIALS.AMMONIUM.getFluidStack(2000), - CI.emptyCells(1), - GT_Values.NI, - 20 * 20, - 30); - } - - if (!GTNH) { - // Hydroxide - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ELEMENT.getInstance().OXYGEN.getCell(1), - ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), - MISC_MATERIALS.HYDROXIDE.getFluidStack(2000), - CI.emptyCells(2), - GT_Values.NI, - 8 * 20, - 30); - // Beryllium Hydroxide - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ELEMENT.getInstance().BERYLLIUM.getDust(7), - MISC_MATERIALS.HYDROXIDE.getFluidStack(1000), - FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), - GT_Values.NI, - 8 * 20, - 30); - // Ammonium Bifluoride - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 1), - MISC_MATERIALS.AMMONIUM.getFluidStack(1000), - FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(3000), - CI.emptyCells(1), - 20 * 20, - 30); - - if (aGtHydrofluoricAcid != null) { - // Ammonium Bifluoride - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - aGtHydrofluoricAcid, - MISC_MATERIALS.AMMONIUM.getFluidStack(1000), - FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000), - CI.emptyCells(2), - 40 * 20, - 30); - } - - // Ammonium - GT_Values.RA.addChemicalRecipe( - ItemUtils.getGregtechCircuit(3), - ELEMENT.getInstance().HYDROGEN.getCell(1), - MISC_MATERIALS.AMMONIA.getFluidStack(1000), - MISC_MATERIALS.AMMONIUM.getFluidStack(2000), - CI.emptyCells(1), - GT_Values.NI, - 20 * 20, - 30); - // Ammonia - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustMagnetite", 0), - FluidUtils.getFluidStack("nitrogen", 1000), - FluidUtils.getFluidStack("ammonia", 1000), - CI.emptyCells(3), - 14 * 20); - } - - - //Technetium - GT_Values.RA.addChemicalRecipe( - CI.getNumberedAdvancedCircuit(22), - ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium99", 1), - FluidUtils.getFluidStack("sulfuricacid", 1000), - FluidUtils.getFluidStack("sulfuricacid", 144 * 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium", 1), - 100 * 20); - - // Sodium Hydroxide - GT_Values.RA.addChemicalRecipe( - CI.getNumberedBioCircuit(15), - ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1), - FluidUtils.getFluidStack("hydrofluoricacid", 500), - FluidUtils.getWater(1000), - FLUORIDES.SODIUM_FLUORIDE.getDust(1), - 60 * 20); - - if (FluidUtils.doesFluidExist("hydrofluoricacid_gt5u")) { - GT_Values.RA.addChemicalRecipe( - CI.getNumberedBioCircuit(15), - ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1), - FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 1000), - FluidUtils.getWater(1000), - FLUORIDES.SODIUM_FLUORIDE.getDust(1), - 60 * 20); - } - - } - - private static void dehydratorRecipes() { - - // Makes 7-Lithium - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(14), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1) - }, - FluidUtils.getFluidStack("sulfuriclithium", 440), - null, - new ItemStack[] { - CI.emptyCells(1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 4) - }, - new int[] {10000, 10000, 10000, 10000, 10000}, - 30 * 20, - 30); - - // Makes Lithium Carbonate - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.emptyCells(12), - ItemUtils.getItemStackOfAmountFromOreDict("dustLepidolite", 20) - }, // Item input (Array, up to 2) - FluidUtils.getFluidStack("sulfuricacid", 10000), - FluidUtils.getFluidStack("sulfuriclithium", 10000), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4), - ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 10), - ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 3), // LithiumCarbonate - }, // Output Array of Items - Upto 9, - new int[] { 10000, 10000, 10000, 10000, 10000 }, - 75 * 20, // Time in ticks - 1000); // EU - - // Calcium Hydroxide - if ((ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) || LoadedMods.IHL) { - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedBioCircuit(20), - ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) - }, - FluidUtils.getFluidStack("water", 10000), - null, // Fluid output (slot 2) - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 20) - }, // Output - new int[] { 10000 }, - 120 * 20, // Time in ticks - 120); // EU - } - else { - Logger.INFO("[dustCalciumHydroxide] FAILED TO LOAD RECIPE"); - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) { - Logger.INFO("Could not find dustQuicklime, cannot make dustCalciumHydroxide."); - } - else if (!LoadedMods.IHL) { - Logger.INFO("IHL not loaded."); - } - } - - // 2 LiOH + CaCO3 - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(20), - ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 5) - }, // Item - null, // Fluid input (slot 1) - null, // Fluid output (slot 2) - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 3) - }, // Output - new int[] { 10000, 10000 }, - 120 * 20, // Time in ticks - 1000); // EU - - // LiOH Liquid to Dust - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(22) - }, - FluidUtils.getFluidStack("lithiumhydroxide", 144), - null, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 1) - }, - new int[] { 10000 }, - 1 * 20, // Time in ticks - 64); // EU - - // Zirconium Chloride -> TetraFluoride - FluidStack aHydrogenChloride = new FluidStack(GenericChem.HydrochloricAcid, 9000); - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(11), - ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9), - }, // Item - FluidUtils.getFluidStack("hydrofluoricacid", 9 * 144), - aHydrogenChloride, - new ItemStack[] { - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9) - }, - new int[] { 10000 }, - 120 * 20, // Time in ticks - 500); // EU - - // Zirconium Chloride -> TetraFluoride - FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 1); - if (aGregtechHydro != null || Utils.getGregtechVersionAsInt() >= 50929) { - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(10), - ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9) - }, - FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 18 * 144), - aHydrogenChloride, - new ItemStack[] { - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9) - }, - new int[] { 10000 }, - 240 * 20, // Time in ticks - 500); // EU - } - - // Be(OH)2 + 2 (NH4)HF2 → (NH4)2BeF4 + 2 H2O - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(6), - FLUORIDES.AMMONIUM_BIFLUORIDE.getCell(4) - }, - FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), // Fluid input (slot 1) - FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE.getFluidStack(6000), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 4) - }, - new int[] { 10000}, - 32 * 20, // Time in ticks - 64); // EU - - // (NH4)2BeF4 → 2 NH3 + 2 HF + BeF2 - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(17), - CI.emptyCells(5) - }, - FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE.getFluidStack(5000), - null, - new ItemStack[] { - MISC_MATERIALS.AMMONIA.getCell(2), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2), - FLUORIDES.BERYLLIUM_FLUORIDE.getCell(1) - }, - new int[] {10000, 10000, 10000}, - 5 * 60 * 20, - 120); - - } - - private static void electroMagneticSeperator() { - - // Zirconium - GT_Values.RA.addElectromagneticSeparatorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedBauxite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustBauxite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallRutile", 1), - ItemUtils.getItemStackOfAmountFromOreDict("nuggetZirconium", 1), - new int[] { 10000, 2500, 4000 }, - 20 * 20, - 24); - - // Zircon - GT_Values.RA.addElectromagneticSeparatorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMagnetite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustMagnetite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1), - new int[] { 10000, 1250, 2500 }, - 20 * 20, - 24); - GT_Values.RA.addElectromagneticSeparatorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCassiterite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCassiterite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1), - new int[] { 10000, 1250, 2500 }, - 20 * 20, - 24); - - } - - private static void fluidExtractorRecipes() { - - //FLiBe fuel - CORE.RA.addFluidExtractionRecipe( - NUCLIDE.Li2BeF4.getDust(1), - NUCLIDE.Li2BeF4.getFluidStack(144), - 100, - 500); - //LFTR Fuel 1 - CORE.RA.addFluidExtractionRecipe( - NUCLIDE.LiFBeF2ZrF4U235.getDust(1), - NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(144), - 250, - 1000); - CORE.RA.addFluidExtractionRecipe( - NUCLIDE.LiFBeF2ZrF4UF4.getDust(1), - NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(144), - 150, - 1500); - CORE.RA.addFluidExtractionRecipe( - NUCLIDE.LiFBeF2ThF4UF4.getDust(1), - NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(144), - 150, - 2000); - - //ZIRCONIUM_TETRAFLUORIDE - CORE.RA.addFluidExtractionRecipe( - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(1), - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(144), - 200, - 512+256); - - } - - private static void macerator() { - - GT_ModHandler.addPulverisationRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1)); - - } - - private static void mixerRecipes() { - - GT_Values.RA.addMixerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("dustUranium233", 4), - ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1), - null, - null, - FluidUtils.getFluidStack("hydrofluoricacid", 5000), - FLUORIDES.URANIUM_TETRAFLUORIDE.getFluidStack(5000), - null, - 3000, - 500); - - } - - - private static void sifter() { - - // Zirconium - GT_Values.RA.addSifterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIlmenite", 1), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyWroughtIron", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1) }, - new int[] { 5000, 2500, 1000, 1000, 300, 300 }, - 20 * 30, - 500); - GT_Values.RA.addSifterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedTin", 1), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZinc", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) }, - new int[] { 10000, 5000, 1500, 1000, 500, 500 }, - 20 * 30, - 500); - GT_Values.RA.addSifterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCassiterite", 1), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustCassiterite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyTin", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) }, - new int[] { 10000, 5000, 1500, 1000, 500, 500 }, - 20 * 30, - 500); - - // Radium - GT_Values.RA.addSifterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUranium", 1), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) }, - new int[] { 10000, 5000, 1000, 500, 500, 500 }, - 20 * 30, - 500); - GT_Values.RA.addSifterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUraninite", 1), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustUraninite", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyUranium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) }, - new int[] { 10000, 5000, 500, 250, 250, 250 }, - 20 * 30, - 500); - GT_Values.RA.addSifterRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPitchblende", 1), - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("dustPitchblende", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) }, - new int[] { 10000, 5000, 500, 250, 250, 250 }, - 20 * 30, - 500); - } - - private static void fluidHeater() { - - CORE.RA.addFluidHeaterRecipe( - FLUORIDES.SODIUM_FLUORIDE.getDust(1), - null, - FLUORIDES.SODIUM_FLUORIDE.getFluidStack(144), - 20 * 30, - 500); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java deleted file mode 100644 index c2c8c01f45..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java +++ /dev/null @@ -1,372 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders.recipe; - -import gregtech.api.enums.GT_Values; -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.chemistry.NuclearChem; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.material.nuclear.NUCLIDE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipeLoader_NuclearFuelProcessing { - - public static void generate() { - - // Create Fuels - - final FluidStack aLithiumFluoride = FLUORIDES.LITHIUM_FLUORIDE.getFluidStack(100); - final FluidStack aBerylliumFluoride = FLUORIDES.BERYLLIUM_FLUORIDE.getFluidStack(100); - final FluidStack aThoriumFluoride = FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(100); - final FluidStack aZirconiumFluoride = FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(100); - final FluidStack aUraniumTetraFluoride = FLUORIDES.URANIUM_TETRAFLUORIDE.getFluidStack(100); - final FluidStack aUranium235 = ELEMENT.getInstance().URANIUM235.getFluidStack(1000); - final FluidStack aLiFBeF2ZrF4U235 = NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(100); - final FluidStack aLiFBeF2ZrF4UF4 = NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(100); - final FluidStack aLiFBeF2ThF4UF4 = NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(100); - - // 7LiF - BeF2 - ZrF4 - U235 - 590C - CORE.RA.addFissionFuel( - FluidUtils.getFluidStack(aLithiumFluoride, 550), - FluidUtils.getFluidStack(aBerylliumFluoride, 150), - FluidUtils.getFluidStack(aZirconiumFluoride, 60), - FluidUtils.getFluidStack(aUranium235, 240), - null, null, null, null, null, // Extra 5 inputs - FluidUtils.getFluidStack(aLiFBeF2ZrF4U235, 1000), - null, - 90 * 60 * 20, // Duration - MaterialUtils.getVoltageForTier(4) - ); - - // 7LiF - BeF2 - ZrF4 - UF4 - 650C - CORE.RA.addFissionFuel( - FluidUtils.getFluidStack(aLithiumFluoride, 600), - FluidUtils.getFluidStack(aBerylliumFluoride, 250), - FluidUtils.getFluidStack(aZirconiumFluoride, 80), - FluidUtils.getFluidStack(aUraniumTetraFluoride, 70), - null, null, null, null, null, // Extra 5 inputs - FluidUtils.getFluidStack(aLiFBeF2ZrF4UF4, 1000), - null, - 120 * 60 * 20, - MaterialUtils.getVoltageForTier(5) - ); - - // 7liF - BeF2 - ThF4 - UF4 - 566C - CORE.RA.addFissionFuel( - FluidUtils.getFluidStack(aLithiumFluoride, 580), - FluidUtils.getFluidStack(aBerylliumFluoride, 270), - FluidUtils.getFluidStack(aThoriumFluoride, 80), - FluidUtils.getFluidStack(aUraniumTetraFluoride, 70), - null, null, null, null, null, // Extra 5 inputs - FluidUtils.getFluidStack(aLiFBeF2ThF4UF4, 1000), - null, - 150 * 60 * 20, // Duration - MaterialUtils.getVoltageForTier(5) - ); - - - // Reprocess Fuels - - - // Reactor Blanket step 1 - Fluorination - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(17), - ELEMENT.getInstance().FLUORINE.getCell(6), - NUCLIDE.LiFThF4.getFluidStack(10000), - new ItemStack[] { - CI.emptyCells(5), - FLUORIDES.LITHIUM_FLUORIDE.getCell(1), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233) - }, - new int[] {10000, 10000, 500, 500, 500, 250, 250, 250}, - NUCLIDE.UF6F2.getFluidStack(1500), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(5)); - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(18), - ELEMENT.getInstance().FLUORINE.getCell(6), - NUCLIDE.LiFBeF2ThF4.getFluidStack(10000), - new ItemStack[] { - CI.emptyCells(4), - FLUORIDES.LITHIUM_FLUORIDE.getCell(1), - FLUORIDES.BERYLLIUM_FLUORIDE.getCell(1), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233) - }, - new int[] {10000, 10000, 10000, 1000, 1000, 1000, 500, 500, 500}, - NUCLIDE.UF6F2.getFluidStack(3000), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(5)); - - // Reactor Blanket step 1 - Fluorination - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(7), - ELEMENT.getInstance().FLUORINE.getCell(6), - NUCLIDE.Sparged_LiFThF4.getFluidStack(10000), - new ItemStack[] { - CI.emptyCells(4), - FLUORIDES.LITHIUM_FLUORIDE.getCell(2), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233) - }, - new int[] {10000, 10000, 1000, 1000, 1000, 1000, 1000, 1000}, - NUCLIDE.UF6F2.getFluidStack(3000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5)); - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(8), - ELEMENT.getInstance().FLUORINE.getCell(6), - NUCLIDE.Sparged_LiFBeF2ThF4.getFluidStack(10000), - new ItemStack[] { - CI.emptyCells(2), - FLUORIDES.LITHIUM_FLUORIDE.getCell(2), - FLUORIDES.BERYLLIUM_FLUORIDE.getCell(2), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233), - ItemUtils.getSimpleStack(ModItems.dustProtactinium233) - }, - new int[] {10000, 10000, 10000, 2000, 2000, 2000, 2000, 2000, 2000}, - NUCLIDE.UF6F2.getFluidStack(6000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5)); - - - // Reactor Blanket step 2 - Sorption + Cold Trap - CORE.RA.addColdTrapRecipe( - 8, - FLUORIDES.SODIUM_FLUORIDE.getCell(4), - NUCLIDE.UF6F2.getFluidStack(3000), - new ItemStack[] { - ELEMENT.getInstance().FLUORINE.getCell(2), - FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2), - ELEMENT.getInstance().URANIUM233.getDust(1), - ELEMENT.getInstance().URANIUM233.getDust(1), - ELEMENT.getInstance().URANIUM233.getDust(1) - }, - new int[] {10000, 10000, 3000, 2000, 1000}, - FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(3)); - - - - - // Reactor Core step 0 - Process Burnt Salt - // Tier 1 Fuel - Gives back FLIBE and breeds U233 - /* CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(1), - CI.emptyCells(2), - new FluidStack(NuclearChem.Burnt_LiFBeF2ZrF4U235, 4000), - new ItemStack[] { - FLUORIDES.LITHIUM_FLUORIDE.getCell(1), - ELEMENT.getInstance().URANIUM233.getCell(1) - }, - new int[] {10000, 10000}, - NUCLIDE.LiFBeF2.getFluidStack(2000), - 20 * 60 * 60, - MaterialUtils.getVoltageForTier(3));*/ - - - - // LiBeF2UF4FP + F2 = LiFBeF2 & UF6F2FP - // Reactor Core step 1 - Process Burnt Salt - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(1), - ELEMENT.getInstance().FLUORINE.getCell(1), - NUCLIDE.LiFBeF2UF4FP.getFluidStack(1000), - new ItemStack[] { - NUCLIDE.UF6F2FP.getCell(1) - }, - new int[] {10000}, - FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 1000), - 20 * 60 * 120, - MaterialUtils.getVoltageForTier(3)); - - // LiBeF2UF4FP + F2 = LiFBeF2 & UF6F2FP - // Reactor Core step 1 - Process Burnt Salt - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(1), - ELEMENT.getInstance().FLUORINE.getCell(3), - NUCLIDE.Sparged_LiFBeF2UF4FP.getFluidStack(1000), - new ItemStack[] { - CI.emptyCells(1), - NUCLIDE.UF6F2FP.getCell(2) - }, - new int[] {10000}, - FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 2000), - 20 * 60 * 60, - MaterialUtils.getVoltageForTier(3)); - - - - // Reactor Core step 2A - Sorption + Cold Trap - CORE.RA.addColdTrapRecipe( - 8, - FLUORIDES.SODIUM_FLUORIDE.getCell(3), - NUCLIDE.UF6F2FP.getFluidStack(2000), - new ItemStack[] { - ELEMENT.getInstance().FLUORINE.getCell(1), - FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2), - ELEMENT.getInstance().PHOSPHORUS.getDust(1), - ELEMENT.getInstance().PHOSPHORUS.getDust(1), - ELEMENT.getInstance().PHOSPHORUS.getDust(1), - ELEMENT.getInstance().PHOSPHORUS.getDust(1), - ELEMENT.getInstance().PHOSPHORUS.getDust(1), - ELEMENT.getInstance().PHOSPHORUS.getDust(1), - ELEMENT.getInstance().PHOSPHORUS.getDust(1) - }, - new int[] {10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000, 5000}, - FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000), - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(4)); - - - // Reactor Core step 2B - Distillation - GT_Values.RA.addDistillationTowerRecipe( - FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 1000), - new FluidStack[] { - NUCLIDE.LiFBeF2.getFluidStack(250) - }, - null, - 120 * 60 * 20, - MaterialUtils.getVoltageForTier(3)); - - - // UF6 -> UF4 reduction - // UF6 + LiFBeF2 + H2 -> LiFBeF2UF4 + HF - CORE.RA.addBlastRecipe( - new ItemStack[] { - FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(1), - NUCLIDE.LiFBeF2.getCell(1) - }, - new FluidStack[] { - ELEMENT.getInstance().HYDROGEN.getFluidStack(2000) - }, - new ItemStack[] { - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2), - CI.emptyCells(1) - }, - new FluidStack[] { - NUCLIDE.LiFBeF2UF4.getFluidStack(3000) - }, - 20 * 60 * 10, - MaterialUtils.getVoltageForTier(4), - 6500); - - - - - // LiFBeF2ZrF4U235 - We can't add both ZrF4 and U235 here, so best we leave this disabled. - /*CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(8), - NUCLIDE.LiFBeF2UF4.getCell(9), - ELEMENT.getInstance().URANIUM235.getFluidStack(1000), - new ItemStack[] { - CI.emptyCells(9) - }, - new int[] {10000}, - NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(10000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(4));*/ - - // LiFBeF2ZrF4UF4 - /*CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(9), - NUCLIDE.LiFBeF2UF4.getCell(9), - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(1000), - new ItemStack[] { - CI.emptyCells(9) - }, - new int[] {10000}, - NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5)); - - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(9), - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getCell(1), - NUCLIDE.LiFBeF2UF4.getFluidStack(9000), - new ItemStack[] { - CI.emptyCells(1) - }, - new int[] {10000}, - NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5));*/ - - CORE.RA.addFissionFuel( - FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(1000), - NUCLIDE.LiFBeF2UF4.getFluidStack(9000), - null, - null, - null, null, null, null, null, - NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000), - null, - 20 * 60 * 120, // Duration - MaterialUtils.getVoltageForTier(5) - ); - - // LiFBeF2ThF4UF4 - /*CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(10), - NUCLIDE.LiFBeF2UF4.getCell(9), - FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(1000), - new ItemStack[] { - CI.emptyCells(9) - }, - new int[] {10000}, - NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5)); - - CORE.RA.addReactorProcessingUnitRecipe( - CI.getNumberedAdvancedCircuit(10), - FLUORIDES.THORIUM_TETRAFLUORIDE.getCell(1), - NUCLIDE.LiFBeF2UF4.getFluidStack(9000), - new ItemStack[] { - CI.emptyCells(1) - }, - new int[] {10000}, - NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000), - 20 * 60 * 5, - MaterialUtils.getVoltageForTier(5));*/ - - - CORE.RA.addFissionFuel( - FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(1000), - NUCLIDE.LiFBeF2UF4.getFluidStack(9000), - null, - null, - null, null, null, null, null, - NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000), - null, - 20 * 60 * 150, // Duration - MaterialUtils.getVoltageForTier(5) - ); - - - - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java deleted file mode 100644 index be4d6a8f7d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ /dev/null @@ -1,1851 +0,0 @@ -package gtPlusPlus.xmod.gregtech.recipes; - -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gtPlusPlus.core.lib.CORE.GTNH; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.interfaces.internal.IGT_RecipeAdder; -import gregtech.api.util.*; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.data.ArrayUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG; -import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_MatterFabricator; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -public class GregtechRecipeAdder implements IGregtech_RecipeAdder { - - @Override - public boolean addCokeOvenRecipe(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, - final FluidStack aFluidOutput, final ItemStack aOutput, int aDuration, final int aEUt) { - try { - try { - // RECIPEHANDLER_CokeOven.debug1(); - if (((aInput1 == null) /* && (aFluidInput == null) */) - || ((aOutput == null) || (aFluidOutput == null))) { - // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" - // aInput2:"+aInput2.toString()+" - // aFluidInput:"+aFluidInput.toString()+" - // aFluidOutput:"+aFluidOutput.toString()+" - // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" - // aEU/t:"+aEUt); - Logger.WARNING("Something was null, returning false"); - return false; - } - - } - catch (final NullPointerException e) { - e.getStackTrace(); - } - try { - // RECIPEHANDLER_CokeOven.debug2(aInput1, aInput2, aFluidInput, - // aFluidOutput, aOutput, aDuration, aEUt); - if ((aOutput != null) - && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) { - // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" - // aInput2:"+aInput2.toString()+" - // aFluidInput:"+aFluidInput.toString()+" - // aFluidOutput:"+aFluidOutput.toString()+" - // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" - // aEU/t:"+aEUt); - Logger.WARNING("Something was null, returning false"); - return false; - } - - } - catch (final NullPointerException e) { - e.getStackTrace(); - } - try { - // RECIPEHANDLER_CokeOven.debug3(aInput1, aInput2, aFluidInput, - // aFluidOutput, aOutput, aDuration, aEUt); - if ((aFluidOutput == null) || ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", - aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { - // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" - // aInput2:"+aInput2.toString()+" - // aFluidInput:"+aFluidInput.toString()+" - // aFluidOutput:"+aFluidOutput.toString()+" - // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" - // aEU/t:"+aEUt); - Logger.WARNING("Something was null, returning false"); - return false; - } - - } - catch (final NullPointerException e) { - e.getStackTrace(); - } - try { - - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput }, - null, - new int[] {}, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - Math.max(1, aDuration), - Math.max(1, aEUt), - 0); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size(); - - - // RECIPEHANDLER_CokeOven.debug4(aInput1, aInput2, aFluidInput, - // aFluidOutput, aOutput, aDuration, aEUt); - /*if (aFluidInput == null && aInput2 != null) { - GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration, - aEUt, 0); - } - else if (aFluidInput == null && aInput2 == null) { - GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1 }, - new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration, - aEUt, 0); - } - else { - GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput }, null, null, new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); - }*/ - // RECIPEHANDLER_CokeOven.debug5(aInput1, aInput2, aFluidInput, - // aFluidOutput, aOutput, aDuration, aEUt); - - return aSize > aSize2; - - } - catch (final NullPointerException e) { - Logger.WARNING("Something was null, returning false"); - return false; - } - } - catch (final Throwable e) { - // Logger.WARNING("aInput1:"+aInput1.toString()+" - // aInput2:"+aInput2.toString()+" - // aFluidInput:"+aFluidInput.toString()+" - // aFluidOutput:"+aFluidOutput.toString()+" - // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" - // aEU/t:"+aEUt); - Logger.WARNING("Failed."); - e.getStackTrace(); - return false; - } - } - - - @Override - public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) { - return addCokeOvenRecipe(CI.getNumberedCircuit(aCircuit), aInput2, aFluidInputs, aFluidOutputs, aOutputs, aDuration, aEUt); - } - - @Override - public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) { - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - true, - new ItemStack[] { aInput1, aInput2 }, - aOutputs, - null, - new int[] {}, - aFluidInputs, - aFluidOutputs, - Math.max(1, aDuration), - Math.max(1, aEUt), - 0); - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size(); - GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe); - return GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size() > aSize; - } - - @Override - public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput, - final int aDuration, final int aEUt) { - try { - try { - // RECIPEHANDLER_MatterFabricator.debug1(); - if (aFluidOutput == null) { - // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" - // aFluidOutput:"+aFluidOutput.toString()+" - // aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Something was null, returning false"); - return false; - } - - } - catch (final NullPointerException e) { - e.getStackTrace(); - } - try { - - // RECIPEHANDLER_MatterFabricator.debug4(aFluidInput, - // aFluidOutput, aDuration, aEUt); - if (aFluidInput == null) { - // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, - // null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, - // 0); - - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {}, - new FluidStack[] {aFluidOutput}, - aDuration, - aEUt, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); - } - else { - // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, - // new FluidStack[]{aFluidInput}, new - // FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, - aDuration, - aEUt, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); - } - RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt); - - return true; - - } - catch (final NullPointerException e) { - return false; - } - } - catch (final Throwable e) { - // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" - // aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" - // aEU/t:"+aEUt); - Logger.WARNING("Failed."); - e.getStackTrace(); - return false; - } - } - - @Override - public boolean addMatterFabricatorRecipe(final ItemStack aInputStack, final FluidStack aFluidInput, - final FluidStack aFluidOutput, final int aDuration, final int aEUt) { - try { - try { - if ((aFluidOutput == null) || (aInputStack == null)) { - return false; - } - } - catch (final NullPointerException e) { - } - try { - if (aFluidInput == null) { - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] { aInputStack }, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {}, - new FluidStack[] {aFluidOutput}, - aDuration, - aEUt, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); - } - else { - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] { aInputStack }, - new ItemStack[] {}, - null, - new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, - aDuration, - aEUt, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); - } - RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt); - return true; - } - catch (final NullPointerException e) { - return false; - } - } - catch (final Throwable e) { - return false; - } - } - - @Override - public boolean addFuel(final ItemStack aInput1, final ItemStack aOutput1, final int aEU, final int aType) { - if (aInput1 == null) { - Logger.WARNING("Fuel Input is Invalid."); - return false; - } - // new GregtechRecipe(aInput1, aOutput1, - // GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType); - return true; - } - - /* - * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack - * aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack - * aOutputFluid, int aDuration, int aEUt) { if ((aItemA == null) || (aItemB - * == null) || (aOutputItems == null)) { return false; } for (ItemStack - * tStack : aOutputItems) { if (tStack != null) { if ((aDuration = - * GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) { - * return false; } - * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, - * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null, - * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, - * aFluid, aOutputFluid, aOutputItems, aDuration, aEUt); return true; } } - * return false; } - * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack - * aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt) { if ((aItemA - * == null) || (aItemB == null) || (aOutputItems == null)) { return false; } - * if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA, - * aDuration)) <= 0) { return false; } - * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, - * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null, - * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, - * null, null, aOutputItems, aDuration, aEUt); return true; } - * @Override public boolean addDehydratorRecipe(FluidStack aFluid, - * FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int - * aEUt){ if ((aFluid == null) || (aOutputFluid == null || aOutputItems == - * null)) { return false; } if ((aDuration = - * GregTech_API.sRecipeFile.get("dehydrator", aFluid.getUnlocalizedName(), - * aDuration)) <= 0) { return false; } - * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, - * null, aOutputItems, null, new FluidStack[]{aFluid}, new - * FluidStack[]{aOutputFluid}, aDuration, aEUt, 0); - * RECIPEHANDLER_Dehydrator.debug5(null, null, aFluid, aOutputFluid, - * aOutputItems, aDuration, aEUt); return true; } - */ - - /*@Override - public boolean addDehydratorRecipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput, - int aDuration, final int aEUt) { - Logger.WARNING("Trying to add a Dehydrator recipe."); - try { - if ((aInput == null) || (aFluid == null) || (aOutput == null)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aInput, aDuration)) <= 0) { - return false; - } - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] { aInput }, - aOutput, - null, - new int[] {}, - new FluidStack[] { aFluid }, - new FluidStack[] {}, - aDuration, - aEUt, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(aRecipe); - // RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null, - // aOutput, aDuration, aEUt); - return true; - } - catch (final NullPointerException e) { - Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); - return false; - } - }*/ - - @Override - public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput, - final FluidStack aFluidOutput, final ItemStack[] aOutputItems, final int[] aChances, int aDuration, - final int aEUt) throws IndexOutOfBoundsException { - Logger.WARNING("Trying to add a Dehydrator recipe."); - try { - if (aInput != null && aInput.length > 0) { - if (aInput[0] != null) { - Logger.WARNING("Recipe requires input: " + aInput[0].getDisplayName() + " x" + aInput[0].stackSize); - } - if (aInput.length > 1) { - if (aInput[1] != null) { - Logger.WARNING("Recipe requires input: " + aInput[1].getDisplayName() + " x" + aInput[1].stackSize); - } - } - } - if (aFluidInput != null) { - Logger.WARNING("Recipe requires input: " + aFluidInput.getFluid().getName() + " " + aFluidInput.amount - + "mbs"); - } - if (((aInput == null || aInput.length == 0) && (aFluidInput == null)) || ((aOutputItems == null || aOutputItems.length == 0) && (aFluidOutput == null))) { - return false; - } - if (aOutputItems != null) { - Logger.WARNING("Recipe will output: " + ItemUtils.getArrayStackNames(aOutputItems)); - } - if (aFluidOutput != null) { - Logger.WARNING("Recipe will output: " + aFluidOutput.getFluid().getName()); - } - - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - true, - aInput, - aOutputItems, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - Math.max(1, aDuration), - Math.max(1, aEUt), - 0); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mRecipeList.size(); - - /*if (aInput.length == 1) { - Logger.WARNING("Dehydrator recipe only has a single input item."); - GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, - aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, - 0); - - } - else { - Logger.WARNING("Dehydrator recipe has two input items."); - GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, - aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, - 0); - }*/ - - return aSize > aSize2; - } - catch (final NullPointerException e) { - Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); - return false; - } - } - - @Override - public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration, - final int aEUt) { - return addBlastSmelterRecipe(aInput, null, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700); - } - - @Override - public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, - final int aChance, int aDuration, final int aEUt) { - return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700); - } - - @Override - public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, - final int aChance[], int aDuration, final int aEUt) { - return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, 3700); - } - - @Override - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, - int aDuration, int aEUt, int aSpecialValue) { - return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, aSpecialValue); - } - - @Override - public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, - int aDuration, int aEUt, int aSpecialValue) { - if ((aInput == null) || (aOutput == null)) { - Logger.WARNING("Fail - Input or Output was null."); - return false; - } - - if (aOutput.isFluidEqual(Materials.PhasedGold.getMolten(1))) { - aOutput = Materials.VibrantAlloy.getMolten(aOutput.amount); - } - if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) { - aOutput = Materials.PulsatingIron.getMolten(aOutput.amount); - } - if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) { - Logger.WARNING("Recipe did not register."); - return false; - } - - for (int das = 0; das < aInput.length; das++) { - if (aInput[das] != null) { - Logger.WARNING("tMaterial[" + das + "]: " + aInput[das].getDisplayName() + ", Amount: " - + aInput[das].stackSize); - } - } - - ArrayUtils.removeNulls(aInput); - if (aInput.length <= 1) { - return false; - } - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - true, - aInput, - aOutputStack, - null, - aChance, - new FluidStack[] { aInputFluid }, - new FluidStack[] { aOutput }, - Math.max(1, aDuration), - Math.max(1, aEUt), - aSpecialValue); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size(); - - - /*GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, aOutputStack, null, - aChance, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt, - aSpecialValue);*/ - - return aSize > aSize2; - } - - @Override - public boolean addLFTRRecipe(final ItemStack aInput1, final FluidStack aInput2, final ItemStack aOutput1, - final FluidStack aOutput2, final int aDuration, final int aEUt) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean addLFTRRecipe(final ItemStack aInput1, final ItemStack aInput2, final ItemStack aOutput1, - final int aDuration, final int aEUt) { - return false; - } - - @Override - public boolean addLFTRRecipe(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aOutput1, - final int aDuration, final int aEUt) { - if ((aInput1 == null) || (aInput2 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) { - return false; - } - GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(null, - new FluidStack[] { aInput1, aInput2 }, new FluidStack[] { aOutput1 }, aDuration, aEUt, 16000); - return true; - } - - @Override - public boolean addFissionFuel(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3, - final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7, - final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2, - final int aDuration, final int aEUt) { - return addFissionFuel(false, aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9, aOutput1, aOutput2, aDuration, aEUt); - } - - @Override - public boolean addFissionFuel(final boolean aOptimise, final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3, - final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7, - final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2, - final int aDuration, final int aEUt) { - - if ((aInput1 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) { - return false; - } - final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; - final FluidStack outputs[] = { aOutput1, aOutput2 }; - - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - aOptimise, - new ItemStack[] {}, - new ItemStack[] {}, - null, - new int[] {}, - inputs, - outputs, - Math.max(1, aDuration), - Math.max(1, aEUt), - 0); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size(); - - if (aSize > aSize2) { - Logger.INFO("Added Nuclear Fuel Recipe."); - return true; - } - return false; - } - - @Override - public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs, - FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { - return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs, aFluidOutput, aChances, aDuration, aEUt, aSpecialValue); - } - - @Override - public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput, - FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { - if (aOutput == null || aOutput.length < 1 || !ItemUtils.checkForInvalidItems(aOutput)) { - Logger.INFO("Bad output for Cyclotron Recipe."); - return false; - } - - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - true, - aInputs, - aOutput, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - Math.max(1, aDuration), - Math.max(1, aEUt), - aSpecialValue); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.mRecipeList.size(); - - if (aSize > aSize2) { - Logger.INFO("Added Cyclotron Recipe."); - return true; - } - - Logger.INFO("Failed to add Cyclotron Recipe. Output: "+ItemUtils.getArrayStackNames(aOutput)); - return false; - } - - @Override - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { - return false; - } - if ((aOutput1 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", aOutput1, aDuration)) <= 0)) { - return false; - } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", - aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { - return false; - } - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - true, - new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, - null, - new int[] {}, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - Math.max(1, aDuration), - Math.max(1, aEUt), - 0); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size(); - - /*GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.addRecipe(true, - new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null, - new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);*/ - - return aSize > aSize2; - } - - // Machine Component Assembler - @Override - public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, - int aDuration, int aEUt) { - if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) { - return false; - } - if (aOutput1 == null) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) { - return false; - } - if (GTNH) { - return false; - } - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - aInputs, - new ItemStack[] { aOutput1 }, - null, - new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {}, - aDuration, - aEUt, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes.addRecipe(aRecipe); - return true; - } - - - public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){ - if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { - return false; - } - - if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { - Logger.INFO("[Recipe] Error generating Large Centrifuge recipe."); - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); - return false; - } - - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - aChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUtick, - aSpecial); - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.addRecipe(aRecipe); - - //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); - return true; - } - - public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){ - if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { - return false; - } - if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { - Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe."); - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); - return false; - } - - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - aChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUtick, - aSpecial); - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.addRecipe(aRecipe); - //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); - return true; - } - - - public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial) { - if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { - return false; - } - - if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { - Logger.INFO("[Recipe] Error generating Adv. Vac Freezer recipe."); - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); - return false; - } - - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - aChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUtick, - aSpecial); - GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.addRecipe(aRecipe); - /*if (GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) { - return true; - }*/ - return false; - - } - - public boolean addMultiblockMixerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){ - if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { - return false; - } - if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { - Logger.INFO("[Recipe] Error generating Large Mixer recipe."); - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); - return false; - } - - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - aChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUtick, - aSpecial); - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.addRecipe(aRecipe); - return true; - } - - public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) { - if (aInput1 instanceof String || aInput2 instanceof String) { - int mCompleted = 0; - if (aInput1 instanceof String && aInput2 instanceof String) { - List x = OreDictionary.getOres((String) aInput1, false); - List x1 = OreDictionary.getOres((String) aInput2, false); - if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) { - for (ItemStack r : x) { - r.stackSize = aAmount1; - for (ItemStack r1 : x1) { - r1.stackSize = aAmount2; - if (GT_Values.RA.addAssemblerRecipe(r, r1, aOutput, a1, a2)) { - mCompleted++; - } - } - } - } - } - else if (aInput1 instanceof String) { - List x = OreDictionary.getOres((String) aInput1, false); - if (x != null && x.size() > 0) { - for (ItemStack r : x) { - r.stackSize = aAmount1; - if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aOutput, a1, a2)) { - mCompleted++; - } - } - } - - } - else { - List x = OreDictionary.getOres((String) aInput2, false); - if (x != null && x.size() > 0) { - for (ItemStack r : x) { - r.stackSize = aAmount1; - if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aOutput, a1, a2)) { - mCompleted++; - } - } - } - } - return mCompleted > 0; - } - else { - return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aOutput, a1, a2); - } - } - - public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2) { - if (aInput1 instanceof String || aInput2 instanceof String) { - int mCompleted = 0; - if (aInput1 instanceof String && aInput2 instanceof String) { - List x = OreDictionary.getOres((String) aInput1, false); - List x1 = OreDictionary.getOres((String) aInput2, false); - if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) { - for (ItemStack r : x) { - r.stackSize = aAmount1; - for (ItemStack r1 : x1) { - r1.stackSize = aAmount2; - if (GT_Values.RA.addAssemblerRecipe(r, r1, aInputFluid, aOutput, a1, a2)) { - mCompleted++; - } - } - } - } - } - else if (aInput1 instanceof String) { - List x = OreDictionary.getOres((String) aInput1, false); - if (x != null && x.size() > 0) { - for (ItemStack r : x) { - r.stackSize = aAmount1; - if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2)) { - mCompleted++; - } - } - } - - } - else { - List x = OreDictionary.getOres((String) aInput2, false); - if (x != null && x.size() > 0) { - for (ItemStack r : x) { - r.stackSize = aAmount1; - if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aInputFluid, aOutput, a1, a2)) { - mCompleted++; - } - } - } - } - return mCompleted > 0; - } - else { - return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2); - } - } - - /* - * Reflection Based Recipe Additions with Fallbacks - */ - - private static final Method mSixSlotAssembly; - private static final Method mAssemblyLine; - private static final Method mScannerTT; - private static final Method[] mChemicalRecipe = new Method[3]; - private static final Method mLargeChemReactor; - private static final Method mPyroOven; - - static { - - //Get GT's RA class; - Class clazz = GT_Values.RA.getClass(); - - mChemicalRecipe[0] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class); - - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { - //6 Slot Assembler - mSixSlotAssembly = ReflectionUtils.getMethod(clazz, "addAssemblerRecipe", ItemStack[].class, FluidStack.class, ItemStack.class, int.class, int.class); - //Assembly Line - mAssemblyLine = ReflectionUtils.getMethod(clazz, "addAssemblylineRecipe", ItemStack.class, int.class, ItemStack[].class, FluidStack[].class, ItemStack.class, int.class, int.class); - - - Method T = null; - if (LoadedMods.TecTech) { - Class TTRecipeAdder = ReflectionUtils.getClass("com.github.technus.tectech.recipe.TT_recipeAdder"); - if (TTRecipeAdder != null) { - Method ttTest = ReflectionUtils.getMethod(TTRecipeAdder, "addResearchableAssemblylineRecipe", - ItemStack.class, int.class, int.class, int.class, int.class, Object[].class, - FluidStack[].class, ItemStack.class, int.class, int.class); - if (ttTest != null) { - T = ttTest; - } - else { - Method[] aDump = TTRecipeAdder.getDeclaredMethods(); - for (Method m : aDump) { - if (m != null) { - Logger.INFO("Found "+m.getName()+" | "+m.getModifiers()+" | "+ArrayUtils.toString(m.getParameters(), "EMPTY")+""); - if (m.getName().toLowerCase().equals("addresearchableassemblylinerecipe")){ - Logger.INFO("Types: "+ArrayUtils.toString(m.getParameterTypes())); - } - } - } - } - } - } - else { - T = null; - } - mScannerTT = T; - - mChemicalRecipe[1] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class, int.class); - mChemicalRecipe[2] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class); - - mLargeChemReactor = ReflectionUtils.getMethod(clazz, "addMultiblockChemicalRecipe", ItemStack[].class, FluidStack[].class, FluidStack[].class, ItemStack[].class, int.class, int.class); - - mPyroOven = ReflectionUtils.getMethod(clazz, "addPyrolyseRecipe", ItemStack.class, FluidStack.class, int.class, ItemStack.class, FluidStack.class, int.class, int.class); - - - - } - else { - mSixSlotAssembly = null; - mAssemblyLine = null; - mLargeChemReactor = null; - mScannerTT = null; - mPyroOven = null; - } - - - } - - - - - - - public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt) { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { - if (mSixSlotAssembly != null) { - try { - return (boolean) mSixSlotAssembly.invoke(GT_Values.RA, aInputs, aInputFluid, aOutput1, aDuration, aEUt); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - if (CORE.GTNH) { - return false; - } - } - } - } - return CORE.RA.addComponentMakerRecipe(aInputs, aInputFluid, aOutput1, aDuration, aEUt); - } - - @Override - public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { - if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { - return false; - } - for(ItemStack tItem : aInputs){ - if(tItem==null){ - GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe"); - } - } - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201); - GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); - GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt)); - return true; - } - - @Override - public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { - if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { - return false; - } - ItemStack[] tInputs = new ItemStack[aInputs.length]; - ItemStack[][] tAlts = new ItemStack[aInputs.length][]; - for(int i = 0; i < aInputs.length; i++){ - Object obj = aInputs[i]; - if (obj instanceof ItemStack) { - tInputs[i] = (ItemStack) obj; - tAlts[i] = null; - continue; - } else if (obj instanceof ItemStack[]) { - ItemStack[] aStacks = (ItemStack[]) obj; - if (aStacks.length > 0) { - tInputs[i] = aStacks[0]; - tAlts[i] = (ItemStack[]) Arrays.copyOf(aStacks, aStacks.length); - continue; - } - } else if (obj instanceof Object[]) { - Object[] objs = (Object[]) obj; - List tList; - if (objs.length >= 2 && !(tList = GT_OreDictUnificator.getOres(objs[0])).isEmpty()) { - try { - int tAmount = ((Number) objs[1]).intValue(); - List uList = new ArrayList<>(); - for (ItemStack tStack : tList) { - ItemStack uStack = GT_Utility.copyAmount(tAmount, tStack); - if (GT_Utility.isStackValid(uStack)) { - uList.add(uStack); - if (tInputs[i] == null) - tInputs[i] = uStack; - } - } - tAlts[i] = uList.toArray(new ItemStack[uList.size()]); - continue; - } catch (Exception t) {} - } - } - GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe"); - } - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201); - GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])},aFluidInputs,null,aDuration,aEUt,0,tAlts,true); - GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, tInputs, aFluidInputs, aOutput, aDuration, aEUt, tAlts)); - return true; - } - - private boolean tryAddTecTechScannerRecipe(ItemStack aResearchItem, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int assDuration, int assEUt) { - if (!LoadedMods.TecTech) { - return true; - } - else { - - int compSec = (GT_Utility.getTier(assEUt)+1) * 16; - int compMax = (GT_Utility.getTier(assEUt)+1) * 10000; - - if (mScannerTT != null) { - try { - boolean aResult = (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec, - (assEUt/2), 16, aInputs, aFluidInputs, aOutput, assDuration, assEUt); - Logger.INFO("Added TecTech Scanner Recipe for "+ItemUtils.getItemName(aResearchItem)+"? "+aResult); - return aResult; - - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus. [Severe]"); - e.printStackTrace(); - } - } - } - return false; - } - - - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu){ - return addChemicalRecipe(input1, input2, inputFluid, outputFluid, output, null, time, eu); - } - - @Override - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu) { - try { - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time); - } - else { - return (boolean) mChemicalRecipe[1].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time, eu); - } - } - catch (Throwable t) { - return false; - } - } - - @Override - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time) { - try { - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time); - } - else { - return (boolean) mChemicalRecipe[2].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, output2, time); - } - } - catch (Throwable t) { - return false; - } - } - - @Override - public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, int aCircuit, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time, int eu) { - if (aCircuit < 0 || aCircuit > 24) { - aCircuit = 22; - } - GT_Recipe aSpecialRecipe = new GTPP_Recipe( - false, - new ItemStack[] {input1, input2}, - new ItemStack[] {output, output2}, - CI.getNumberedCircuit(aCircuit), - new int[] {}, - new FluidStack[] {inputFluid}, - new FluidStack[] {outputFluid}, - time, - eu, - 0); - return GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList.add(aSpecialRecipe); - } - - @Override - public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu) { - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || mLargeChemReactor == null) { - return false; - } - try { - return (boolean) mLargeChemReactor.invoke(GT_Values.RA, itemStacks, fluidStacks, fluidStacks2, outputs, time, eu); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - - - - - - - - private boolean areItemsAndFluidsBothNull(final ItemStack[] items, final FluidStack[] fluids) { - boolean itemsNull = true; - if (items != null) { - for (final ItemStack itemStack : items) { - if (itemStack != null) { - itemsNull = false; - break; - } - } - } - boolean fluidsNull = true; - if (fluids != null) { - for (final FluidStack fluidStack : fluids) { - if (fluidStack != null) { - fluidsNull = false; - break; - } - } - } - return itemsNull && fluidsNull; - } - - @Override - public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0)) { - return false; - } - GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); - return true; - } - - @Override - public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) { - return addBrewingRecipe(CI.getNumberedCircuit(aCircuit), aInput, aOutput, aTime, aEu, aHidden); - } - - @Override - public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) { - if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { - return false; - } - if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { - return false; - } - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aTime, aEu, 0); - if ((aHidden) && (tRecipe != null)) { - tRecipe.mHidden = true; - } - return true; - } - - - /** - * Lets me add recipes for GT 5.08 & 5.09, since someone broke the method headers. - */ - @Override - public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput) { - Method m = StaticFields59.mAddFurnaceRecipe; - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - try { - return (boolean) m.invoke(null, aDust, aOutput); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - else { - try { - return (boolean) m.invoke(null, aDust, aOutput, true); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - } - - @Override - public boolean addFluidExtractionRecipe(ItemStack input, FluidStack output, int aTime, int aEu) { - return MaterialGenerator.addFluidExtractionRecipe(GT_Values.NI, input, output, aTime, aEu); - } - - @Override - public boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid, int aDuration, int aEU) { - return MaterialGenerator.addFluidExtractionRecipe(aEmpty, aRemains, aFluid, aDuration, aEU); - } - - @Override - public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn) { - return MaterialGenerator.addFluidCannerRecipe(aContainer, aFullContainer, rFluidIn, null); - } - - @Override - public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, FluidStack rFluidOut) { - return MaterialGenerator.addFluidCannerRecipe(aContainer, aFullContainer, rFluidIn, rFluidOut); - } - - - @Override - public boolean addFluidCannerRecipe(ItemStack aFullContainer, ItemStack container, FluidStack rFluidIn, FluidStack rFluidOut, int aTime, int aEu) { - return MaterialGenerator.addFluidCannerRecipe(container, aFullContainer, rFluidIn, rFluidOut, aTime, aEu); - } - - /** - * Adds a Fusion reactor Recipe - * - * @param aInputStackA = first Input (not null, and respects StackSize) - * @param aInputStackB = second Input (not null, and respects StackSize) - * @param plasma = Output of the Fusion (can be null, and respects StackSize) - * @param aOutputChance = chance to output plasma (can be 0) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aEu = The EU generated per Tick (can even be negative!) - * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) - */ - @Override - public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma, - int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) { - if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) { - return false; - } - GTPP_Recipe aFusionCustom = new GTPP_Recipe( - true, - null, - null, - null, - new int[] {aOutputChance}, - new FluidStack[]{aInputStackA, aInputStackB}, - new FluidStack[]{plasma}, - aFusionDurationInTicks, - aEu, - aSpecial); - GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom); - return true; - } - - - - - - - /** - * Adds a Fusion reactor Recipe - * - * @param aInputStackA = first Input (not null, and respects StackSize) - * @param aInputStackB = second Input (not null, and respects StackSize) - * @param plasma = Output of the Fusion (can be null, and respects StackSize) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aEu = The EU generated per Tick (can even be negative!) - * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) - */ - @Override - public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, - int aFusionDurationInTicks, int aEu, int aSpecial) { - return addFusionReactorRecipe(aInputStackA, aInputStackB, plasma, 10000, aFusionDurationInTicks, aEu, aSpecial); - } - - - /** - * Adds a Fusion reactor Recipe - * - * @param aInputStackA = first Input (not null, and respects StackSize) - * @param aInputStackB = second Input (not null, and respects StackSize) - * @param plasma = Output of the Fusion (can be null, and respects StackSize) - * @param aOutputChance = chance to output plasma (can be 0) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aEu = The EU generated per Tick (can even be negative!) - * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) - */ - @Override - public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, - int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) { - if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) { - return false; - } - GTPP_Recipe aFusionCustom = new GTPP_Recipe( - true, - new ItemStack[]{aInputStackA, aInputStackB}, - null, - null, - new int[] {aOutputChance}, - null, - new FluidStack[]{plasma}, - aFusionDurationInTicks, - aEu, - aSpecial); - GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom); - return true; - - } - - @Override - public boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue) { - return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue); - } - - @Override - public boolean addSemifluidFuel(FluidStack aFuelItem, int aFuelValue) { - return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue); - } - - - - - @Override - public boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { - if (aInput1 != null && aOutput1 != null) { - return addVacuumFurnaceRecipe(new ItemStack[] {aInput1, aInput2}, new FluidStack[] {aFluidInput}, new ItemStack[] {aOutput1, aOutput2}, new FluidStack[] {aFluidOutput}, aDuration, aEUt, aLevel); - } - else { - return false; - } - } - - - @Override - public boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel) { - if (aInputs != null && aOutputs != null) { - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - new int[] {}, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aLevel); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.addRecipe(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size(); - return aSize > aSize2; - } else { - return false; - } - } - - @Override - public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu) { - // Generate Special Laser Recipe - GT_Recipe u = new GTPP_Recipe( - false, - new ItemStack[] { - aInput1, - aInput2, - }, - new ItemStack[] { - aOutput - }, - GregtechItemList.Laser_Lens_WoodsGlass.get(1), - new int[] { - 10000 - }, - new FluidStack[] {}, - new FluidStack[] {}, - time, - (int) eu, - 0); - return GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.mRecipeList.add(u); - } - - @Override - public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu) { - return addUvLaserRecipe(aInput1, aInput2, aOutput, time, eu); - } - - - @Override - public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier) { - return addChemicalPlantRecipe(aInputs, aInputFluids, aOutputs, aFluidOutputs, new int[] {}, time, eu, aTier); - } - - @Override - public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier) { - - if (aInputs.length > 4 || aInputFluids.length > 4 || aOutputs.length > 4 || aFluidOutputs.length > 2) { - Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); - Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aInputFluids)); - Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); - Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); - CORE.crash(); - } - - - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - aChances, - aInputFluids, - aFluidOutputs, - time, - (int) eu, - aTier); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size(); - int aSize2 = aSize; - GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.add(aSpecialRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size(); - return aSize > aSize2; - } - - @Override - public boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aHeat) { - GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( - false, - aInputs, - aOutputs, - null, - new int[] {}, - aInputFluids, - aFluidOutputs, - time, - (int) eu, - aHeat); - - int aSize = GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList.size(); - int aSize2 = aSize; - GT_Recipe.GT_Recipe_Map.sBlastRecipes.add(aSpecialRecipe); - aSize = GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList.size(); - return aSize > aSize2; - - } - - @Override - public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt) { - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || mPyroOven == null) { - return false; - } - try { - return (boolean) mPyroOven.invoke(GT_Values.RA, aInput, aFluidInput, intCircuit, aOutput, aFluidOutput, aDuration, aEUt); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - @Override - public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { - if (aInput != null && aOutput != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("distillery", aOutput.getFluid().getUnlocalizedName(), - aDuration)) <= 0) { - return false; - } else { - GT_Recipe tRecipe = GT_Recipe_Map.sDistilleryRecipes.addRecipe(true, new ItemStack[]{aCircuit}, - new ItemStack[] {aSolidOutput}, (Object) null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, - aDuration, aEUt, 0); - if (aHidden && tRecipe != null) { - tRecipe.mHidden = true; - } - return true; - } - } else { - return false; - } - } - - @Override - public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { - if (aInput != null && aOutput != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("extractor", aInput, aDuration)) <= 0) { - return false; - } else { - GT_Recipe_Map.sExtractorRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, - (Object) null, (FluidStack[]) null, (FluidStack[]) null, aDuration, aEUt, 0); - return true; - } - } else { - return false; - } - } - - @Override - public boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3) { - //return GT_Values.RA.addPulveriserRecipe(arg0, arg1, arg2, arg3, arg4) - - aOutput1 = GT_OreDictUnificator.get(true, aOutput1); - aOutput2 = GT_OreDictUnificator.get(true, aOutput2); - aOutput3 = GT_OreDictUnificator.get(true, aOutput3); - if ((GT_Utility.isStackInvalid(aInput)) || (GT_Utility.isStackInvalid(aOutput1))) { - return false; - } - if (GT_Utility.getContainerItem(aInput, false) == null) { - - if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, true)) { - GT_Utility.addSimpleIC2MachineRecipe(aInput, GT_ModHandler.getMaceratorRecipeList(), null, - new Object[] { aOutput1 }); - } - GT_Values.RA.addPulveriserRecipe(aInput, new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - new int[] { 10000, 10000, 10000 }, 400, 2); - } - return true; - - } - - @Override - public boolean addMillingRecipe(Materials aMat, int aEU) { - return addMillingRecipe(MaterialUtils.generateMaterialFromGtENUM(aMat), aEU); - } - - @Override - public boolean addMillingRecipe(Material aMat, int aEU) { - - ItemStack aOreStack = aMat.getOre(16); - ItemStack aCrushedStack = aMat.getCrushed(16); - - ItemStack aMilledStackOres1 = aMat.getMilled(64); - ItemStack aMilledStackCrushed1 = aMat.getMilled(32); - ItemStack aMilledStackOres2 = aMat.getMilled(48); - ItemStack aMilledStackCrushed2 = aMat.getMilled(16); - - ItemStack aMillingBall_Alumina = GregtechItemList.Milling_Ball_Alumina.get(0); - ItemStack aMillingBall_Soapstone = GregtechItemList.Milling_Ball_Soapstone.get(0); - - // Inputs - ItemStack[] aInputsOre1 = new ItemStack[] { - CI.getNumberedCircuit(10), - aOreStack, - aMillingBall_Alumina - }; - - ItemStack[] aInputsOre2 = new ItemStack[] { - CI.getNumberedCircuit(11), - aOreStack, - aMillingBall_Soapstone - }; - - ItemStack[] aInputsCrushed1 = new ItemStack[] { - CI.getNumberedCircuit(10), - aCrushedStack, - aMillingBall_Alumina - }; - - ItemStack[] aInputsCrushed2 = new ItemStack[] { - CI.getNumberedCircuit(11), - aCrushedStack, - aMillingBall_Soapstone - }; - - // Outputs - ItemStack[] aOutputsOre1 = new ItemStack[] { - aMilledStackOres1 - }; - - ItemStack[] aOutputsOre2 = new ItemStack[] { - aMilledStackOres2 - }; - - ItemStack[] aOutputsCrushed1 = new ItemStack[] { - aMilledStackCrushed1 - }; - - ItemStack[] aOutputsCrushed2 = new ItemStack[] { - aMilledStackCrushed2 - }; - - ItemStack[][] aInputArray = new ItemStack[][] {aInputsOre1, aInputsOre2, aInputsCrushed1, aInputsCrushed2}; - ItemStack[][] aOutputArray = new ItemStack[][] {aOutputsOre1, aOutputsOre2, aOutputsCrushed1, aOutputsCrushed2}; - int[] aTime = new int[] {6000, 7500, 7500, 9000}; - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes.mRecipeList.size(); - int aSize2 = aSize; - - for (int i=0;i<4;i++) { - GTPP_Recipe aOreRecipe = new GTPP_Recipe( - false, - aInputArray[i], - aOutputArray[i], - null, - new int[] {}, - null, - null, - aTime[i], - aEU, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes.add(aOreRecipe); - } - - aSize = GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes.mRecipeList.size(); - return aSize > aSize2; - } - - @Override - public boolean addFlotationRecipe(Materials aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU) { - return addFlotationRecipe(MaterialUtils.generateMaterialFromGtENUM(aMat), aXanthate, aInputFluids, aOutputFluids, aTime, aEU); - } - - @Override - public boolean addFlotationRecipe(Material aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU) { - - FlotationRecipeHandler.registerOreType(aMat); - int aSpecialValue = FlotationRecipeHandler.getHashForMaterial(aMat); - - int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes.mRecipeList.size(); - int aSize2 = aSize; - - GT_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] { - ItemUtils.getSimpleStack(aXanthate, 32), - aMat.getMilled(64), - aMat.getMilled(64), - aMat.getMilled(64), - aMat.getMilled(64), - }, - new ItemStack[] { - - }, - null, - new int[] {}, - aInputFluids, - aOutputFluids, - aTime, - aEU, - aSpecialValue); - - GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes.add(aRecipe); - aSize = GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes.mRecipeList.size(); - - return aSize > aSize2; - } - - @Override - public boolean addpackagerRecipe(ItemStack aRecipeType, ItemStack aSmallDust, ItemStack aTinyDust, ItemStack aOutputStack1) { - AutoMap aResults = new AutoMap(); - //Dust 1 - aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, new Object[]{aSmallDust}), aRecipeType, aOutputStack1, 100, 4)); - //Dust 2 - aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, new Object[]{aTinyDust}), aRecipeType, aOutputStack1, 100, 4)); - for (boolean b : aResults) { - if (!b) { - return false; - } - } - return true; - } - - @Override - public boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage) { - int aSize1 = GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels.mRecipeList.size(); - GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels.addRecipe( - true, - new ItemStack[]{aFuelPellet}, - new ItemStack[]{}, - null, - null, - null, - 0, - aVoltage, - aFuelDays); - int aSize2 = GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels.mRecipeList.size(); - - if (aSize2 > aSize1) { - long eu = GregtechMetaTileEntity_RTG.getTotalEUGenerated(GregtechMetaTileEntity_RTG.convertDaysToTicks(aFuelDays), aVoltage); - GT_MetaTileEntity_Hatch_Energy_RTG.registerPelletForHatch(aFuelPellet, eu); - return true; - } - else { - return false; - } - } - - - @Override - public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU) { - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedAdvancedCircuit(aCircuit), aInput}, - aOutputs, - null, - aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, - aTime, - aEU, - 0); - - int aSize = GTPP_Recipe_Map.sColdTrapRecipes.mRecipeList.size(); - GTPP_Recipe_Map.sColdTrapRecipes.add(aRecipe); - return GTPP_Recipe_Map.sColdTrapRecipes.mRecipeList.size() > aSize; - } - - - @Override - public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU) { - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] {aInput1, aInput2}, - aOutputs, - null, - aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, - aTime, - aEU, - 0); - - int aSize = GTPP_Recipe_Map.sReactorProcessingUnitRecipes.mRecipeList.size(); - GTPP_Recipe_Map.sReactorProcessingUnitRecipes.add(aRecipe); - return GTPP_Recipe_Map.sReactorProcessingUnitRecipes.mRecipeList.size() > aSize; - } - - - @Override - public boolean addFluidHeaterRecipe(ItemStack aInput, FluidStack aFluidInput, FluidStack aOutput, int aDuration, int aEUt) { - if ((aInput == null && aFluidInput == null) || (aOutput == null)) { - return false; - } - GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe(true, new ItemStack[]{aInput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); - return true; - } - - - @Override - public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { - if ((aInput == null) || (aOutput == null)) { - return false; - } - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] {aInput}, - new ItemStack[] {aOutput}, - null, - new int[] {10000}, - new FluidStack[] {}, - new FluidStack[] {}, - aDuration, - aEUt, - 0); - - int aSize = GT_Recipe_Map.sVacuumRecipes.mRecipeList.size(); - GT_Recipe_Map.sVacuumRecipes.add(aRecipe); - return GT_Recipe_Map.sVacuumRecipes.mRecipeList.size() > aSize; - } - - - - - - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java deleted file mode 100644 index 99e3d5c4d9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java +++ /dev/null @@ -1,57 +0,0 @@ -package gtPlusPlus.xmod.gregtech.recipes; - -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class RecipesToRemove { - - public static void go() { - - Logger.INFO("Processing Gregtech recipe maps, removing recipes to suit GT++."); - - //Remove Rare Earth Centrifuging - //1 Rare Earth Dust - 25% chance for small piles of: neodymium, yttrium, lanthanum, cerium, cadmium, and caesium - //Replaced by advanced sifting recipe. - GT_Recipe aRareEarthCentrifuging = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(null, false, 20, new FluidStack[] {}, new ItemStack[] {ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1)}); - if (aRareEarthCentrifuging != null && aRareEarthCentrifuging.mEnabled) { - aRareEarthCentrifuging.mEnabled = false; - aRareEarthCentrifuging.mHidden = true; - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); - //GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging); - Logger.INFO("Removed vanilla GT Rare Earth processing."); - //Set the Chemical Symbol for Rare Earth now that we are giving it custom outputs - //Best not to set this unless the original recipe is removed. - /*Materials.RareEarth.mChemicalFormula = "(" - +ELEMENT.getInstance().YTTRIUM.vChemicalSymbol - +ELEMENT.getInstance().NEODYMIUM.vChemicalSymbol - +ELEMENT.getInstance().LANTHANUM.vChemicalSymbol - +ELEMENT.getInstance().CERIUM.vChemicalSymbol - +ELEMENT.getInstance().CADMIUM.vChemicalSymbol - +ELEMENT.getInstance().CAESIUM.vChemicalSymbol - +ELEMENT.getInstance().YTTERBIUM.vChemicalSymbol - +ELEMENT.getInstance().SAMARIUM.vChemicalSymbol - +ELEMENT.getInstance().GADOLINIUM.vChemicalSymbol+ - ")";*/ - - Material[] aLowTierOutputMaterials = new Material[] { - ORES.GREENOCKITE - }; - - - - - - - - } - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java deleted file mode 100644 index 15115647ae..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.xmod.gregtech.recipes.machines; - -import net.minecraft.item.ItemStack; - -import net.minecraftforge.fluids.FluidStack; - -public class RECIPEHANDLER_AssemblyLine { - - public static boolean addAssemblylineRecipe( - ItemStack paramItemStack1, - int paramInt1, - ItemStack[] paramArrayOfItemStack, - FluidStack[] paramArrayOfFluidStack, - ItemStack paramItemStack2, - int paramInt2, int paramInt3){ - - return false; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java deleted file mode 100644 index cd06f86ef9..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.xmod.gregtech.recipes.machines; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import net.minecraftforge.fluids.FluidStack; - -public class RECIPEHANDLER_CokeOven { - - public static void debug1(){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("Walking Through CokeOven Recipe Creation."); - Logger.WARNING("My name is Ralph and I will be your humble host."); - } - public static void debug2(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - } - public static void debug3(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - } - public static void debug4(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - - } - public static void debug5(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.INFO("Successfully added a Coke Oven recipe for: "+aOutput.getDisplayName()+" & "+aFluidOutput.getFluid().getName()+", Using "+aInput1.getDisplayName()+" & "+aInput2.getDisplayName()+" & liquid "+aFluidInput.getFluid().getName()+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t."); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java deleted file mode 100644 index 402d47d3e5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java +++ /dev/null @@ -1,82 +0,0 @@ -package gtPlusPlus.xmod.gregtech.recipes.machines; - -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraftforge.fluids.FluidStack; - -public class RECIPEHANDLER_Dehydrator { - - public static void debug1(){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("Walking Through Chemical Dehydrator Recipe Creation."); - Logger.WARNING("My name is Willus and I will be your humble host."); - } - public static void debug2(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - } - public static void debug3(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - } - public static void debug4(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - - } - public static void debug5(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack[] aOutput, final int aDuration, final int aEUt){ - - String inputAname; - String inputBname; - String inputFluidname; - String outputFluidName; - - if (aInput1 != null){ - inputAname = aInput1.getDisplayName(); - } - else { - inputAname = "null"; - } - - if (aInput2 != null){ - inputBname = aInput2.getDisplayName(); - } - else { - inputBname = "null"; - } - - if (aFluidInput != null){ - inputFluidname = aFluidInput.getFluid().getName(); - } - else { - inputFluidname = "null"; - } - - if (aFluidOutput != null){ - outputFluidName = aFluidOutput.getFluid().getName(); - } - else { - outputFluidName = "null"; - } - - Logger.INFO("Successfully added a Chemical Dehydrator recipe for: "+ItemUtils.getArrayStackNames(aOutput)+" & "+outputFluidName+", Using "+inputAname+" & "+inputBname+" & liquid "+inputFluidname+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t."); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java deleted file mode 100644 index df51f1ad77..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.xmod.gregtech.recipes.machines; - -import gtPlusPlus.api.objects.Logger; -import net.minecraftforge.fluids.FluidStack; - -public class RECIPEHANDLER_MatterFabricator { - - public static void debug1(){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("Walking Through Matter Fabrication Recipe Creation."); - Logger.WARNING("My name is Ralph and I will be your humble host."); - } - public static void debug2(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); - Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - } - public static void debug3(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); - Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - } - public static void debug4(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ - Logger.WARNING("=================================================================================="); - Logger.WARNING("Taking a step forward."); - Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); - Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - Logger.WARNING("Passed."); - Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); - - } - public static void debug5(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ - String a = "nothing"; - String b = ""; - - if (aFluidInput != null){ - a = aFluidInput.getFluid().getName(); - } - if (aFluidOutput != null){ - b = aFluidOutput.getFluid().getName(); - } - - Logger.INFO("Successfully added a Matter Fabrication recipe for: "+b+", Using "+" liquid "+a+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t."); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - Logger.WARNING("=================================================================================="); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java deleted file mode 100644 index 0817202e85..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ /dev/null @@ -1,85 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.*; - -public class Gregtech4Content { - - // ID Range 828, 829, 833 - 850 - - public static void run() { - if (LoadedMods.Gregtech) { - workbenches(); - thermalBoiler(); - multiCrafter(); - tesseracts(); - shelves(); - } - } - - private static void workbenches() { - // Gregtech 4 Workbenches - //Utils.LOG_INFO("Gregtech 4 Content | Registering Workbenches."); - // Free //GregtechItemList.GT4_Workbench_Bronze.set(new - // GT_MetaTileEntity_BronzeCraftingTable(828, "workbench.bronze", - // "Bronze Workbench", 0).getStackForm(1L)); - } - - private static void tesseracts() { - // Gregtech 4 Tesseracts - Logger.INFO("Gregtech 4 Content | Registering Tesseracts."); - GregtechItemList.GT4_Tesseract_Generator - .set(new GT_MetaTileEntity_TesseractGenerator(833, "tesseract.generator", "Tesseract Generator", 4) - .getStackForm(1L)); - GregtechItemList.GT4_Tesseract_Terminal - .set(new GT_MetaTileEntity_TesseractTerminal(834, "tesseract.terminal", "Tesseract Terminal", 4) - .getStackForm(1L)); - } - - private static void shelves() { - // Gregtech 4 Shelves - Logger.INFO("Gregtech 4 Content | Registering Shelves."); - GregtechItemList.GT4_Shelf - .set(new GT4Entity_Shelf(870, "gtplusplus.shelf.wooden", "Wooden Shelf", "Usually used for books") - .getStackForm(1L)); - GregtechItemList.GT4_Shelf_Iron.set( - new GT4Entity_Shelf_Iron(871, "gtplusplus.shelf.iron", "Metal Shelf", "A heavy duty shelf") - .getStackForm(1L)); - GregtechItemList.GT4_Shelf_FileCabinet.set(new GT4Entity_Shelf_FileCabinet(872, "gtplusplus.shelf.filecabinet", - "File Cabinet", "Could look nice in your office").getStackForm(1L)); - GregtechItemList.GT4_Shelf_Desk.set( - new GT4Entity_Shelf_Desk(873, "gtplusplus.shelf.desk", "Metal encased Desk", "A place to study") - .getStackForm(1L)); - GregtechItemList.GT4_Shelf_Compartment.set(new GT4Entity_Shelf_Compartment(874, "gtplusplus.shelf.compartment", - "Compartment", "Stores Books & Things").getStackForm(1L)); - - //Custom Storage - GregtechItemList.GT4_Shelf_Large.set( - new GT4Entity_Shelf_Large(966, "gtplusplus.shelf.large", "Large Shelf", "A spacious shelf", 2048) - .getStackForm(1L)); - } - - private static void thermalBoiler() { - // Gregtech 4 Thermal Boiler - if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){ - Logger.INFO("Gregtech 4 Content | Registering Thermal Boiler."); - GregtechItemList.GT4_Thermal_Boiler - .set(new GT4Entity_ThermalBoiler(875, "gtplusplus.thermal.boiler", "Thermal Boiler").getStackForm(1L)); - } - - } - - private static void multiCrafter() { - // Gregtech 4 Multiblock Auto-Crafter - Logger.INFO("Gregtech 4 Content | Registering Multiblock Crafter."); - GregtechItemList.GT4_Multi_Crafter.set( - new GT4Entity_AutoCrafter(876, "gtplusplus.autocrafter.multi", "Large Scale Auto-Assembler v1.01").getStackForm(1L)); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java deleted file mode 100644 index d50a8f3924..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java +++ /dev/null @@ -1,104 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.recipe.RECIPES_MachineComponents; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_HV; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_LV; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_MV; - -public class GregtechAdvancedBoilers { - - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Advanced Boilers."); - run1(); - } - } - - private static void run1() { - // Boilers - GregtechItemList.Boiler_Advanced_LV - .set(new GT_MetaTileEntity_Boiler_LV(753, "Advanced Boiler [LV]", 1).getStackForm(1L)); - GregtechItemList.Boiler_Advanced_MV - .set(new GT_MetaTileEntity_Boiler_MV(754, "Advanced Boiler [MV]", 2).getStackForm(1L)); - GregtechItemList.Boiler_Advanced_HV - .set(new GT_MetaTileEntity_Boiler_HV(755, "Advanced Boiler [HV]", 3).getStackForm(1L)); - - ItemStack chassisT1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", - 0, 1); - ItemStack chassisT2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", - 1, 1); - ItemStack chassisT3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", - 2, 1); - - // Make the Coil in each following recipe a hammer and a Screwdriver. - - // Chassis Recipes - GT_ModHandler.addCraftingRecipe(chassisT1, - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "WCW", "GMG", "WPW", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('P'), - OrePrefixes.pipeLarge.get(Materials.Bronze), Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), - OrePrefixes.plate.get(Materials.Lead), Character.valueOf('G'), - OrePrefixes.pipeSmall.get(Materials.Copper) }); - - GT_ModHandler.addCraftingRecipe(chassisT2, - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "WCW", "GMG", "WPW", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('P'), - OrePrefixes.pipeLarge.get(Materials.Steel), Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), - OrePrefixes.plate.get(Materials.Steel), Character.valueOf('G'), - OrePrefixes.pipeSmall.get(Materials.Bronze) }); - - GT_ModHandler.addCraftingRecipe(chassisT3, - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "WCW", "GMG", "WPW", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('P'), - OrePrefixes.pipeLarge.get(Materials.StainlessSteel), Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), - OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('G'), - OrePrefixes.pipeSmall.get(Materials.Steel) }); - - ItemStack pipeTier1 = ItemUtils.getItemStackOfAmountFromOreDict(RECIPES_MachineComponents.pipeTier7, 1); - ItemStack pipeTier2 = ItemUtils.getItemStackOfAmountFromOreDict(RECIPES_MachineComponents.pipeTier8, 1); - ItemStack pipeTier3 = ItemUtils.getItemStackOfAmountFromOreDict(RECIPES_MachineComponents.pipeTier9, 1); - - // Boiler Recipes - GT_ModHandler.addCraftingRecipe(GregtechItemList.Boiler_Advanced_LV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "dCw", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('P'), - pipeTier1, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), - Character.valueOf('W'), chassisT1, Character.valueOf('G'), - OrePrefixes.gear.get(Materials.Steel) }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Boiler_Advanced_MV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "dCw", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('P'), - pipeTier2, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), - Character.valueOf('W'), chassisT2, Character.valueOf('G'), ALLOY.SILICON_CARBIDE.getGear(1) }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Boiler_Advanced_HV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "dCw", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('P'), - pipeTier3, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), - Character.valueOf('W'), chassisT3, Character.valueOf('G'), ALLOY.SILICON_CARBIDE.getGear(1) }); - - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java deleted file mode 100644 index 3cefaa1bf7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java +++ /dev/null @@ -1,132 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import java.util.Collection; - -import gregtech.api.enums.ItemList; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GTPP_Recipe; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class GregtechAdvancedMixer { - - private static int mID = 851; - - public static void run(){ - //generateMixerRecipeMap(); - run1(); - } - - private static GT_Recipe_Map map = GT_Recipe.GT_Recipe_Map.sMixerRecipes; - - private static boolean generateMixerRecipeMap(){ - if (GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size() == 0){ - GT_Recipe_Map oldMap = GT_Recipe.GT_Recipe_Map.sMixerRecipes; - GT_Recipe_Map map = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes; - final Collection x = oldMap.mRecipeList; - //Logger.INFO("Generating " + map.mUnlocalizedName + " Recipes."); - for (final GT_Recipe g : x) { - GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.add(g); - } - - if (GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size() > 0){ - return true; - } - else { - Logger.INFO("Failed to generate "+ map.mUnlocalizedName +" recipes."); - return false; - } - - } - return true; - } - - private static void run1(){ - GregtechItemList.Machine_Advanced_LV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.01", - "Basic Combiner", 1, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - ItemList.Machine_LV_Mixer, Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - GregtechItemList.Machine_Advanced_MV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.02", - "Advanced Combiner I", 2, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - ItemList.Machine_MV_Mixer, Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - GregtechItemList.Machine_Advanced_HV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.03", - "Advanced Combiner II", 3, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - ItemList.Machine_HV_Mixer, Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - GregtechItemList.Machine_Advanced_EV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.04", - "Super Combiner I", 4, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - ItemList.Machine_EV_Mixer, Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - GregtechItemList.Machine_Advanced_IV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.05", - "Super Combiner II", 5, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - ItemList.Machine_IV_Mixer, Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - try { - GregtechItemList.Machine_Advanced_LuV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.06", - "Mega Combiner I", 6, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - //ItemList.Machine_LuV_Mixer, Character.valueOf('E'), - ItemList.valueOf("Machine_LuV_Mixer"), Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - GregtechItemList.Machine_Advanced_ZPM_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.07", - "Mega Combiner II", 7, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - //ItemList.Machine_ZPM_Mixer, Character.valueOf('E'), - ItemList.valueOf("Machine_ZPM_Mixer"), Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - GregtechItemList.Machine_Advanced_UV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.08", - "Ultra Combiner I", 8, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, - "MixerAdvanced.png", "", false, false, 0, "MIXER", null - /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), - //ItemList.Machine_UV_Mixer, Character.valueOf('E'), - ItemList.valueOf("Machine_UV_Mixer"), Character.valueOf('E'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); - } - catch (Throwable t){} - } - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java deleted file mode 100644 index 6ddc971f85..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_Catalysts; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.algae.GregtechMTE_AlgaePondBase; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.chemplant.GregtechMTE_ChemicalPlant; - -public class GregtechAlgaeContent { - - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Algae Content."); - run1(); - } - } - - private static void run1() { - - // Algae Pond - GregtechItemList.AlgaeFarm_Controller.set(new GregtechMTE_AlgaePondBase(997, "algaefarm.controller.tier.single", "Algae Farm").getStackForm(1L)); - - // Chemical Plant - GregtechItemList.ChemicalPlant_Controller.set(new GregtechMTE_ChemicalPlant(998, "chemicalplant.controller.tier.single", "ExxonMobil Chemical Plant").getStackForm(1L)); - - GregtechItemList.Bus_Catalysts.set((new GT_MetaTileEntity_Hatch_Catalysts(31030, "hatch.catalysts", "Catalyst Housing")).getStackForm(1L)); - - - int aTier = 0; - // Bronze - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 0, 10); - // Steel - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings2, 0, 16); - // Aluminium - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 1, 17); - // Stainless - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings4, 1, 49); - // Titanium - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings4, 2, 50); - // Tungsten - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings4, 0, 48); - // Laurenium - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 2, 84); - // Botmium - GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 3, 11); - - - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java deleted file mode 100644 index 8adf580011..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc.GMTE_AmazonPackager; - -public class GregtechAmazonWarehouse { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Amazon Warehouse Multiblock."); - run1(); - } - } - - private static void run1() { - // Amazon packager multiblock - GregtechItemList.Amazon_Warehouse_Controller.set(new GMTE_AmazonPackager(942, "amazonprime.controller.tier.single", "Amazon Warehousing Depot.").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java deleted file mode 100644 index 43a9402be2..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java +++ /dev/null @@ -1,18 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock.GregtechMetaTileEntity_BedrockMiningPlatform1; - -public class GregtechBedrockPlatforms { - - //941-945 - - public static void run() { - Logger.INFO("Gregtech5u Content | Registering Bedrock Mining Platform."); - GregtechItemList.BedrockMiner_MKI.set(new GregtechMetaTileEntity_BedrockMiningPlatform1(941, "multimachine.tier.01.bedrockminer", "Experimental Deep Earth Drilling Platform - MK I").getStackForm(1)); - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java deleted file mode 100644 index f236002505..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java +++ /dev/null @@ -1,64 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import static gtPlusPlus.core.recipe.common.CI.bitsd; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DynamoBuffer; - -public class GregtechBufferDynamos { - - private static int mID = 899; - public static void run() { - run2(); - } - - private static final void run2() { - GregtechItemList.Hatch_Buffer_Dynamo_ULV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.00", "ULV Dynamo Hatch [Buffered]", 0).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_LV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.01", "LV Dynamo Hatch [Buffered]", 1).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_MV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.02", "MV Dynamo Hatch [Buffered]", 2).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_HV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.03", "HV Dynamo Hatch [Buffered]", 3).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_EV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.04", "EV Dynamo Hatch [Buffered]", 4).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_IV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.05", "IV Dynamo Hatch [Buffered]", 5).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_LuV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.06", "LuV Dynamo Hatch [Buffered]", 6).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_ZPM.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.07", "ZPM Dynamo Hatch [Buffered]", 7).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_UV.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.08", "UV Dynamo Hatch [Buffered]", 8).getStackForm(1L)); - GregtechItemList.Hatch_Buffer_Dynamo_MAX.set( - new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.09", "Max Dynamo Hatch [Buffered]", 9).getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_ULV.get(1L, new Object[0]), bitsd, - new Object[]{"TMC", 'M', ItemList.Hatch_Dynamo_ULV, 'T', CI.getTieredCircuit(0), 'C', OrePrefixes.cableGt04.get((Object) Materials.Lead)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_LV.get(1L, new Object[0]), bitsd, - new Object[]{"TMC", 'M', ItemList.Hatch_Dynamo_LV, 'T', CI.getTieredCircuit(1), 'C', OrePrefixes.cableGt04.get((Object) Materials.Tin)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_MV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', - ItemList.Hatch_Dynamo_MV, 'T', CI.getTieredCircuit(2), 'C', OrePrefixes.cableGt04.get((Object) Materials.AnyCopper)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_HV.get(1L, new Object[0]), bitsd, - new Object[]{"TMC", 'M', ItemList.Hatch_Dynamo_HV, 'T', CI.getTieredCircuit(3), 'C', OrePrefixes.cableGt04.get((Object) Materials.Gold)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_EV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', - ItemList.Hatch_Dynamo_EV, 'T', CI.getTieredCircuit(4), 'C', OrePrefixes.cableGt04.get((Object) Materials.Aluminium)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_IV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', - ItemList.Hatch_Dynamo_IV, 'T', CI.getTieredCircuit(5), 'C', OrePrefixes.cableGt04.get((Object) Materials.Tungsten)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_LuV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", - 'M', ItemList.Hatch_Dynamo_LuV, 'T', CI.getTieredCircuit(6), 'C', OrePrefixes.cableGt04.get((Object) Materials.VanadiumGallium)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_ZPM.get(1L, new Object[0]), bitsd, new Object[]{"TMC", - 'M', ItemList.Hatch_Dynamo_ZPM, 'T', CI.getTieredCircuit(7), 'C', OrePrefixes.cableGt04.get((Object) Materials.Naquadah)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_UV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', - ItemList.Hatch_Dynamo_UV, 'T', CI.getTieredCircuit(8), 'C', OrePrefixes.wireGt12.get((Object) Materials.NaquadahAlloy)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_MAX.get(1L, new Object[0]), bitsd, new Object[]{"TMC", - 'M', ItemList.Hatch_Dynamo_MAX, 'T', CI.getTieredCircuit(9), 'C', OrePrefixes.wireGt04.get((Object) Materials.Superconductor)}); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java deleted file mode 100644 index 73d29b2174..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java +++ /dev/null @@ -1,532 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMachine_ComponentAssemblers; - -import java.util.ArrayList; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.*; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; -import gregtech.api.util.GTPP_Recipe; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraftforge.oredict.OreDictionary; - -public class GregtechComponentAssembler { - - public static void run() { - - if (!enableMachine_ComponentAssemblers) { - return; - } - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - Logger.INFO("Component Assemblers cannot be created in 5.08.33 during the pre-release. Please wait for 1.7.0 release."); - return; - } - - GregtechItemList.Machine_LV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(985, - "basicmachine.componentmaker.tier.01", "Basic Component Maker", 1, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_MV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(986, - "basicmachine.componentmaker.tier.02", "Advanced Component Maker", 2, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_HV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(987, - "basicmachine.componentmaker.tier.03", "Advanced Component Maker II", 3, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_EV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(988, - "basicmachine.componentmaker.tier.04", "Advanced Component Maker III", 4, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_IV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(989, - "basicmachine.componentmaker.tier.05", "Advanced Component Maker IV", 5, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_LuV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(31012, - "basicmachine.componentmaker.tier.06", "Advanced Component Maker V", 6, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 24000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_ZPM_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(31013, - "basicmachine.componentmaker.tier.07", "Advanced Component Maker VI", 7, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 32000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - GregtechItemList.Machine_UV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(31014, - "basicmachine.componentmaker.tier.08", "Advanced Component Maker VII", 8, "Components, Unite!", - GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 48000, 0, 1, "Assembler.png", "", false, - false, 0, "ASSEMBLER", - new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', - GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); - - // Motors - // addRecipeMotor(0, Materials.Lead, 1, Materials.RedAlloy, 1, - // Materials.WroughtIron, Materials.IronMagnetic); - addRecipeMotor(1, Materials.Copper, 1, Materials.Tin, 1, Materials.Iron, Materials.IronMagnetic); - addRecipeMotor(2, Materials.Copper, 2, Materials.Copper, 1, Materials.Aluminium, Materials.SteelMagnetic); - addRecipeMotor(3, Materials.Copper, 4, Materials.Gold, 1, Materials.StainlessSteel, Materials.SteelMagnetic); - addRecipeMotor(4, Materials.Copper, 8, Materials.Aluminium, 1, Materials.Titanium, Materials.NeodymiumMagnetic); - addRecipeMotor(5, Materials.Copper, 16, Materials.Tungsten, 1, Materials.TungstenSteel, - Materials.NeodymiumMagnetic); - - // Pistons - // addRecipePiston(0, Materials.Lead, Materials.Lead); - addRecipePiston(1, Materials.Steel, Materials.Tin); - addRecipePiston(2, Materials.Aluminium, Materials.Copper); - addRecipePiston(3, Materials.StainlessSteel, Materials.Gold); - addRecipePiston(4, Materials.Titanium, Materials.Aluminium); - addRecipePiston(5, Materials.TungstenSteel, Materials.Tungsten); - - // Conveyors - // addRecipeConveyor(0, Materials.Lead); - addRecipeConveyor(1, Materials.Tin); - addRecipeConveyor(2, Materials.Copper); - addRecipeConveyor(3, Materials.Gold); - addRecipeConveyor(4, Materials.Aluminium); - addRecipeConveyor(5, Materials.Tungsten); - - // Pumps - // addRecipePump(0, Materials.Lead, Materials.Lead, Materials.Lead); - addRecipePump(1, Materials.Tin, Materials.Copper, Materials.Tin); - addRecipePump(2, Materials.Bronze, Materials.Steel, Materials.Copper); - addRecipePump(3, Materials.Steel, Materials.StainlessSteel, Materials.Gold); - addRecipePump(4, Materials.StainlessSteel, Materials.Titanium, Materials.Aluminium); - addRecipePump(5, Materials.TungstenSteel, Materials.TungstenSteel, Materials.Tungsten); - - // Robot Arms - // addRecipeRobotArm(0, Materials.Lead, Materials.Lead); - addRecipeRobotArm(1, Materials.Steel, Materials.Tin); - addRecipeRobotArm(2, Materials.Aluminium, Materials.Copper); - addRecipeRobotArm(3, Materials.StainlessSteel, Materials.Gold); - addRecipeRobotArm(4, Materials.Titanium, Materials.Aluminium); - addRecipeRobotArm(5, Materials.TungstenSteel, Materials.Tungsten); - - // Field Generators - // addRecipeFieldGenerator(0, Materials.Lead); - addRecipeFieldGenerator(1); - addRecipeFieldGenerator(2); - addRecipeFieldGenerator(3); - addRecipeFieldGenerator(4); - addRecipeFieldGenerator(5); - - // Emitters - // addRecipeEmitter(0, Materials.Lead, Materials.IronMagnetic); - addRecipeEmitter(1, Materials.Tin, Materials.Brass, Materials.Quartzite); - addRecipeEmitter(2, Materials.Copper, Materials.Electrum, Materials.NetherQuartz); - addRecipeEmitter(3, Materials.Gold, Materials.Chrome, Materials.Emerald); - addRecipeEmitter(4, Materials.Aluminium, Materials.Platinum, Materials.EnderPearl); - addRecipeEmitter(5, Materials.Tungsten, Materials.Osmium, Materials.EnderEye); - - // Sensors - // addRecipeSensor(0, Materials.WroughtIron, Materials.IronMagnetic, - // Materials.Apatite); - addRecipeSensor(1, Materials.Steel, Materials.Brass, Materials.Quartzite); - addRecipeSensor(2, Materials.Aluminium, Materials.Electrum, Materials.NetherQuartz); - addRecipeSensor(3, Materials.StainlessSteel, Materials.Chrome, Materials.Emerald); - addRecipeSensor(4, Materials.Titanium, Materials.Platinum, Materials.EnderPearl); - addRecipeSensor(5, Materials.TungstenSteel, Materials.Osmium, Materials.EnderEye); - - } - - private static boolean addRecipeMotor(int tier, Materials wire, int wirethickness, Materials cable, - int cablethickness, Materials stick, Materials magstick) { - try { - String mWT = "" + wirethickness; - String mCT = "" + cablethickness; - - if (wirethickness < 10) { - mWT = "0" + wirethickness; - } - if (cablethickness < 10) { - mCT = "0" + cablethickness; - } - - OrePrefixes prefixWire = OrePrefixes.getOrePrefix("wireGt" + mWT); - OrePrefixes prefixCable = OrePrefixes.getOrePrefix("cableGt" + mCT); - - ItemStack wireStack = ItemUtils.getGregtechOreStack(prefixWire, wire, 4); - ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 2); - ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 2); - ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, magstick, 1); - - ItemStack Input[] = { wireStack, cableStack, rodStack, magrodStack }; - - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getElectricMotor(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipePiston(int tier, Materials mat, Materials cable) { - try { - - OrePrefixes prefixCable = OrePrefixes.cableGt01; - ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 2); - ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, mat, 2); - ItemStack plateStack = ItemUtils.getGregtechOreStack(OrePrefixes.plate, mat, 3); - ItemStack gearStack = ItemUtils.getGregtechOreStack(OrePrefixes.gearGtSmall, mat, 1); - ItemStack motorStack = CI.getElectricMotor(tier, 1); - - ItemStack Input[] = { plateStack, cableStack, rodStack, gearStack, motorStack }; - - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getElectricPiston(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeConveyor(int tier, Materials cable) { - try { - OrePrefixes prefixCable = OrePrefixes.cableGt01; - ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 1); - ItemStack motorStack = CI.getElectricMotor(tier, 2); - boolean mAdd[]; - final ArrayList oreDictList = OreDictionary.getOres("plateAnyRubber"); - if (!oreDictList.isEmpty()) { - int mcount = 0; - mAdd = new boolean[oreDictList.size()]; - for (ItemStack mRubberType : oreDictList) { - final ItemStack returnValue = mRubberType.copy(); - returnValue.stackSize = 6; - ItemStack Input[] = { cableStack, motorStack, returnValue }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getConveyor(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - int added = 0; - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.size() / 2)) { - return true; - } - else { - return false; - } - } - else { - ItemStack Input[] = { cableStack, motorStack, - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateRubber", 6) }; - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getConveyor(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipePump(int tier, Materials main, Materials pipe, Materials cable) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 1); - ItemStack screwStack = ItemUtils.getGregtechOreStack(OrePrefixes.screw, main, 1); - ItemStack rotorStack = ItemUtils.getGregtechOreStack(OrePrefixes.rotor, main, 1); - ItemStack pipeStack = ItemUtils.getGregtechOreStack(OrePrefixes.pipeMedium, pipe, 1); - ItemStack motorStack = CI.getElectricMotor(tier, 1); - boolean mAdd[]; - final ArrayList oreDictList = OreDictionary.getOres("ringAnyRubber"); - if (!oreDictList.isEmpty()) { - int mcount = 0; - mAdd = new boolean[oreDictList.size()]; - for (ItemStack mRubberType : oreDictList) { - final ItemStack returnValue = mRubberType.copy(); - returnValue.stackSize = 2; - ItemStack Input[] = { cableStack, screwStack, rotorStack, pipeStack, motorStack, returnValue }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getElectricPump(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - int added = 0; - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.size() / 2)) { - return true; - } - else { - return false; - } - } - else { - ItemStack Input[] = { cableStack, screwStack, rotorStack, pipeStack, motorStack, - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ringRubber", 2) }; - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getElectricPump(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeRobotArm(int tier, Materials stick, Materials cable) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 3); - ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 2); - ItemStack motorStack = CI.getElectricMotor(tier, 2); - ItemStack pistonStack = CI.getElectricPiston(tier, 1); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 1; - ItemStack Input[] = { returnValue, cableStack, rodStack, pistonStack, motorStack }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getRobotArm(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } - else { - return false; - } - } - else { - ItemStack Input[] = { ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 1), cableStack, rodStack, pistonStack, motorStack }; - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getRobotArm(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeFieldGenerator(int tier) { - try { - ItemStack gem; - String mWT; - if (tier == 1) - mWT = "01"; - else if (tier == 2) - mWT = "02"; - else if (tier == 3) - mWT = "04"; - else if (tier == 4) - mWT = "08"; - else if (tier == 5) - mWT = "16"; - else - mWT = "01"; - - ItemStack eyeQuantum = ItemUtils.getValueOfItemList("QuantumEye", 1, ItemUtils.getSimpleStack(Items.ender_eye, 4)); - ItemStack starQuantum = ItemUtils.getValueOfItemList("QuantumStar", 1, ItemUtils.getSimpleStack(Items.nether_star, 4)); - - if (tier == 1) - gem = ItemUtils.getSimpleStack(Items.ender_pearl); - else if (tier == 2) - gem = ItemUtils.getSimpleStack(Items.ender_eye); - else if (tier == 3) - gem = eyeQuantum; - else if (tier == 4) - gem = ItemUtils.getSimpleStack(Items.nether_star); - else if (tier == 5) - gem = starQuantum; - else - gem = ItemUtils.getSimpleStack(Items.ender_pearl); - - OrePrefixes prefixWire = OrePrefixes.getOrePrefix("wireGt" + mWT); - ItemStack wireStack = ItemUtils.getGregtechOreStack(prefixWire, Materials.Osmium, 4); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 4; - ItemStack Input[] = { returnValue, wireStack, gem }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getFieldGenerator(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } - else { - return false; - } - } - else { - ItemStack Input[] = { ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 4), wireStack, gem }; - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getFieldGenerator(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeEmitter(int tier, Materials cable, Materials stick, Materials gem) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 2); - ItemStack gemstack = ItemUtils.getGregtechOreStack(OrePrefixes.gem, gem, 1); - ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 4); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 2; - ItemStack Input[] = { returnValue, cableStack, gemstack, magrodStack }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getEmitter(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } - else { - return false; - } - } - else { - ItemStack Input[] = { ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 2), cableStack, gemstack, magrodStack }; - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getEmitter(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - - - } - catch (Throwable t) { - return false; - } - } - - private static boolean addRecipeSensor(int tier, Materials plate, Materials rod, Materials gem) { - try { - ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.plate, plate, 4); - ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, rod, 1); - ItemStack gemStack = ItemUtils.getGregtechOreStack(OrePrefixes.gem, gem, 1); - - boolean mAdd[]; - final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); - if (oreDictList.length > 0) { - int mcount = 0, added = 0; - mAdd = new boolean[oreDictList.length]; - for (ItemStack mCircuitType : oreDictList) { - final ItemStack returnValue = mCircuitType.copy(); - returnValue.stackSize = 1; - ItemStack Input[] = { gemStack, cableStack, returnValue, magrodStack }; - mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getSensor(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - for (boolean y : mAdd) { - if (y) { - added++; - } - } - if (added >= (oreDictList.length / 2)) { - return true; - } - else { - return false; - } - } - else { - ItemStack Input[] = { gemStack, cableStack, magrodStack, ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 1) }; - return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, - CI.getSensor(tier, 1), (tier * 40), - ((int) GT_Values.V[tier] / 16) * 15); - } - - - } - catch (Throwable t) { - return false; - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java deleted file mode 100644 index 9a5fa6f6de..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ /dev/null @@ -1,698 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import static gtPlusPlus.core.lib.CORE.GTNH; -import static gtPlusPlus.core.lib.LoadedMods.Gregtech; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaPipeEntityFluid; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaPipeEntity_Cable; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class GregtechConduits { - /** - * - * The Voltage Tiers. Use this Array instead of the old named Voltage Variables - * public static final long[] V = new long[] {0=8, 1=32, 2=128, 3=512, 4=2048, 5=8192, 6=32768, 7=131072, 8=524288, 9=Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE}; - * - */ - - private static OrePrefixes cableGt16; - static{ - if(GTNH) { - try { - cableGt16=(OrePrefixes) GT_Utility.getField(OrePrefixes.class,"cableGt16").get(null); - }catch (IllegalAccessException | NullPointerException e){ - e.printStackTrace(); - } - } - } - - //30000-30999 - - private static int BaseWireID = 30600; - private static int BasePipeID = 30700; - private static int BasePipeHexadecupleID = 30100; - - - public static void run() - { - if (Gregtech){ - Logger.INFO("Gregtech5u Content | Registering Custom Cables/Wires/Pipes."); - if (CORE.ConfigSwitches.enableCustom_Cables) { - run1(); - } - if (CORE.ConfigSwitches.enableCustom_Pipes) { - run2(); - run3(); - } - } - - } - - private static void run3() { - - if (Utils.getGregtechVersionAsInt() >= 50930) { - try { - Class aPipeEntity = GT_MetaPipeEntity_Fluid.class; - Constructor constructor = aPipeEntity.getConstructor(int.class, String.class, String.class, float.class, Materials.class, int.class, int.class, boolean.class, int.class); - if (constructor != null) { - Logger.INFO("Generating Hexadecuple pipes."); - generateFluidMultiPipes(constructor, Materials.Copper, MaterialUtils.getMaterialName(Materials.Copper), "Copper", BasePipeHexadecupleID++, 60, 1000, true); - generateFluidMultiPipes(constructor, Materials.Bronze, MaterialUtils.getMaterialName(Materials.Bronze), "Bronze", BasePipeHexadecupleID++, 120, 2000, true); - generateFluidMultiPipes(constructor, Materials.Steel, MaterialUtils.getMaterialName(Materials.Steel), "Steel", BasePipeHexadecupleID++, 240, 2500, true); - generateFluidMultiPipes(constructor, Materials.StainlessSteel, MaterialUtils.getMaterialName(Materials.StainlessSteel), "Stainless Steel", BasePipeHexadecupleID++, 360, 3000, true); - generateFluidMultiPipes(constructor, Materials.Titanium, MaterialUtils.getMaterialName(Materials.Titanium), "Titanium", BasePipeHexadecupleID++, 480, 5000, true); - generateFluidMultiPipes(constructor, Materials.TungstenSteel, MaterialUtils.getMaterialName(Materials.TungstenSteel), "Tungsten Steel", BasePipeHexadecupleID++, 600, 7500, true); - generateFluidMultiPipes(constructor, Materials.Plastic, MaterialUtils.getMaterialName(Materials.Plastic), "Plastic", BasePipeHexadecupleID++, 360, 350, true); - - Materials aPTFE = Materials.get("Polytetrafluoroethylene"); - if (aPTFE != null) { - generateFluidMultiPipes(constructor, aPTFE, MaterialUtils.getMaterialName(aPTFE), "PTFE", BasePipeHexadecupleID++, 480, 600, true); - } - } - else { - Logger.INFO("Failed during Hexadecuple pipe generation."); - } - - } catch (NoSuchMethodException | SecurityException e) { - Logger.INFO("Failed during Hexadecuple pipe generation. [Ecx]"); - e.printStackTrace(); - } - } - - - //Generate Heat Pipes - //GregtechItemList.HeatPipe_Tier_1.set(new GT_MetaPipeEntity_Heat(31021, "gtpp.pipe.heat.basic.01", "Lead Heat Pipe (500C)", Materials.Lead, 500).getStackForm(1L)); - //GregtechItemList.HeatPipe_Tier_2.set(new GT_MetaPipeEntity_Heat(31022, "gtpp.pipe.heat.basic.02", "Iron Heat Pipe (500C)", Materials.Iron, 500).getStackForm(1L)); - //GregtechItemList.HeatPipe_Tier_3.set(new GT_MetaPipeEntity_Heat(31023, "gtpp.pipe.heat.basic.03", "Silver Heat Pipe (1500C)", Materials.Silver, 1500).getStackForm(1L)); - - - - } - - private static void generateFluidMultiPipes(Constructor aClazz, Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ - GT_MetaPipeEntity_Fluid aPipe; - try { - aPipe = aClazz.newInstance(startID, "GT_Pipe_" + name + "_Hexadecuple", - "Hexadecuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, gasProof, - 16); - if (aPipe == null) { - Logger.INFO("Failed to Generate "+aMaterial+" Hexadecuple pipes."); - } - else { - Logger.INFO("Generated "+aMaterial+" Hexadecuple pipes."); - GT_OreDictUnificator.registerOre("pipeHexadecuple" + aMaterial, aPipe.getStackForm(1L)); - } - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - Logger.INFO("Failed to Generate "+aMaterial+" Hexadecuple pipes. [Ecx]"); - e.printStackTrace(); - } - } - - private static void run1(){ - - if (LoadedMods.Big_Reactors){ - wireFactory("Blutonium", 8196, BaseWireID, 8, 32, 2, new short[]{28, 28, 218, 0}); - wireFactory("Cyanite", 512, BaseWireID+15, 2, 16, 4, new short[]{27, 130, 178, 0}); - wireFactory("Yellorium", 2048, BaseWireID+30, 4, 16, 2, new short[]{150, 195, 54, 0}); - } - - if (LoadedMods.EnderIO){ - wireFactory("RedstoneAlloy", 32, BaseWireID+45, 0, 2, 1, new short[]{178,34,34, 0}); - } - - if(!GTNH) { - customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID + 56, 1, 2, 2); - customWireFactory(ELEMENT.getInstance().ZIRCONIUM, 128, BaseWireID + 67, 1, 2, 2); - customWireFactory(ALLOY.HG1223, 32768, BaseWireID + 78, 2, 8, 4); - customWireFactory(ALLOY.TRINIUM_TITANIUM, 2048, BaseWireID + 89, 1, 2, 16); - } - - - //superConductorFactory(GT_Materials.Superconductor, 524288, 30660, 0, 0, 8); - if (LoadedMods.Thaumcraft){ - //superConductorFactory(GT_Materials.Void, 512, 30661, 0, 0, 8); - } - } - - private static void run2(){ - generateNonGTFluidPipes(GT_Materials.Staballoy, ALLOY.STABALLOY, BasePipeID, 6250, 7500, true); - generateNonGTFluidPipes(GT_Materials.Tantalloy60, ALLOY.TANTALLOY_60, BasePipeID+5, 5000, 4250, true); - generateNonGTFluidPipes(GT_Materials.Tantalloy61, ALLOY.TANTALLOY_61, BasePipeID+10, 6000, 5800, true); - if (LoadedMods.Thaumcraft){ - generateNonGTFluidPipes(GT_Materials.Void, null, BasePipeID+15, 800, 25000, true); - } - generateGTFluidPipes(Materials.Europium, BasePipeID+20, 12000, 7500, true); - generateNonGTFluidPipes(GT_Materials.Potin, ALLOY.POTIN, BasePipeID+25, 480, 2000, true); - generateNonGTFluidPipes(GT_Materials.MaragingSteel300, ALLOY.MARAGING300, BasePipeID+30, 7000, 2500, true); - generateNonGTFluidPipes(GT_Materials.MaragingSteel350, ALLOY.MARAGING350, BasePipeID+35, 8000, 2500, true); - generateNonGTFluidPipes(GT_Materials.Inconel690, ALLOY.INCONEL_690, BasePipeID+40, 7500, 4800, true); - generateNonGTFluidPipes(GT_Materials.Inconel792, ALLOY.INCONEL_792, BasePipeID+45, 8000, 5500, true); - generateNonGTFluidPipes(GT_Materials.HastelloyX, ALLOY.HASTELLOY_X, BasePipeID+50, 10000, 4200, true); - - generateGTFluidPipes(Materials.Tungsten, BasePipeID+55, 4320, 7200, true); - if (LoadedMods.EnderIO){ - generateGTFluidPipes(Materials.DarkSteel, BasePipeID+60, 2320, 2750, true); - } - generateGTFluidPipes(Materials.Clay, BasePipeID+65, 100, 500, false); - generateGTFluidPipes(Materials.Lead, BasePipeID+70, 720, 1200, true); - - generateNonGTFluidPipes(GT_Materials.TriniumNaquadahCarbonite, ALLOY.TRINIUM_NAQUADAH_CARBON, 30500, 10, 250000, true); - - } - - private static void wireFactory(final String Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps, final short[] rgb){ - @SuppressWarnings("deprecation") - final Materials T = Materials.valueOf(Material); - int V = GT_Utility.getTier(Voltage); - if (V == -1){ - Logger.ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set."); - Logger.ERROR(Material+" has defaulted to 8v."); - V=0; - } - makeWires(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false, rgb); - } - - @SuppressWarnings("deprecation") - private static void makeWires(final Materials aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated, final short[] aRGB) - { - Logger.WARNING("Gregtech5u Content | Registered "+aMaterial.name() +" as a new material for Wire & Cable."); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Wire", 0.50F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", GTNH?0.625F:0.75F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", GTNH?0.75F:1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - if (aInsulatable) - { - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Cable", 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", GTNH?0.75F:0.875F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - if(GTNH){ - GT_OreDictUnificator.registerOre(cableGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Cable", 0.875f, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - } - } - } - - private static void customWireFactory(final Material Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps){ - int V = GT_Utility.getTier(Voltage); - if (V == -1){ - Logger.ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set."); - Logger.ERROR(Material+" has defaulted to 8v."); - V=0; - } - makeCustomWires(Material, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false); - } - - private static void makeCustomWires(final Material aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated) - { - Logger.WARNING("Gregtech5u Content | Registered "+aMaterial.getLocalizedName() +" as a new material for Wire & Cable."); - registerOre(OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".01", "1x " + aMaterial.getLocalizedName() + " Wire", 0.125F, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Wire", 0.25F, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Wire", 0.375F, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".08", "8x " + aMaterial.getLocalizedName() + " Wire", 0.50F, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Wire", GTNH?0.625F:0.75F, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Wire", GTNH?0.75F:1.0F, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - if (aInsulatable) - { - registerOre(OrePrefixes.cableGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".01", "1x " + aMaterial.getLocalizedName() + " Cable", 0.25F, aLossInsulated, 1L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.cableGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Cable", 0.375F, aLossInsulated, 2L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.cableGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Cable", 0.5F, aLossInsulated, 4L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.cableGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".08", "8x " + aMaterial.getLocalizedName() + " Cable", 0.625F, aLossInsulated, 8L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Cable", GTNH?0.75F:0.875F, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - if(GTNH){ - registerOre(cableGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Cable", 0.875f, aLossInsulated, 16L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - } - } - - } - - private static void superConductorFactory(final GT_Materials Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps){ - final GT_Materials T = Material; - int V = 0; - if (Voltage == 8){ - V = 0; - } - else if (Voltage == 32){ - V = 1; - } - else if (Voltage == 128){ - V = 2; - } - else if (Voltage == 512){ - V = 3; - } - else if (Voltage == 2048){ - V = 4; - } - else if (Voltage == 8196){ - V = 5; - } - else if (Voltage == 32768){ - V = 6; - } - else if (Voltage == 131072){ - V = 7; - } - else if (Voltage == 524288){ - V = 8; - } - else if (Voltage == Integer.MAX_VALUE){ - V = 9; - } - else { - Logger.ERROR("Failed to set voltage on "+Material.name()+". Invalid voltage of "+Voltage+"V set."); - Logger.ERROR(Material.name()+" has defaulted to 8v."); - V = 0; - } - //makeWires(T, ID, 2L, 4L, 2L, GT_Values.V[V], true, false); - //makeSuperConductors(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false); - //makeWires(T, ID, bEC ? 2L : 2L, bEC ? 4L : 4L, 2L, gregtech.api.enums.GT_Values.V[V], true, false); - } - - - private static void generateGTFluidPipes(final Materials material, final int startID, final int transferRatePerSec, final int heatResistance, final boolean isGasProof){ - final int transferRatePerTick = transferRatePerSec/20; - final long mass = material.getMass(); - final long voltage = material.mMeltingPoint >= 2800 ? 64 : 16; - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(material), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_"+material.mDefaultLocalName+"_Tiny", "Tiny "+material.mDefaultLocalName+" Fluid Pipe", 0.25F, material, transferRatePerTick*2, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material), new GT_MetaPipeEntity_Fluid(startID+1, "GT_Pipe_"+material.mDefaultLocalName+"_Small", "Small "+material.mDefaultLocalName+" Fluid Pipe", 0.375F, material, transferRatePerTick*4, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GT_MetaPipeEntity_Fluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*12, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GT_MetaPipeEntity_Fluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*24, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GT_MetaPipeEntity_Fluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*48, heatResistance, isGasProof).getStackForm(1L)); - //generatePipeRecipes(material.mDefaultLocalName, mass, voltage); - } - - private static void generateNonGTFluidPipes(final GT_Materials material, final Material myMaterial, final int startID, final int transferRatePerSec, final int heatResistance, final boolean isGasProof){ - final int transferRatePerTick = transferRatePerSec/10; - long mass; - if (myMaterial != null){ - mass = myMaterial.getMass(); - } - else { - mass = ELEMENT.getInstance().IRON.getMass(); - } - - int tVoltageMultiplier = (material.mBlastFurnaceTemp >= 2800) ? 64 : 16; - - GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(material), new GregtechMetaPipeEntityFluid(startID, "GT_Pipe_"+material.mDefaultLocalName+"_Tiny", "Tiny "+material.mDefaultLocalName+" Fluid Pipe", 0.25F, material, transferRatePerTick*2, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material), new GregtechMetaPipeEntityFluid(startID+1, "GT_Pipe_"+material.mDefaultLocalName+"_Small", "Small "+material.mDefaultLocalName+" Fluid Pipe", 0.375F, material, transferRatePerTick*4, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GregtechMetaPipeEntityFluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*12, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GregtechMetaPipeEntityFluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*24, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GregtechMetaPipeEntityFluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*48, heatResistance, isGasProof).getStackForm(1L)); - //generatePipeRecipes(material.mDefaultLocalName, mass, tVoltageMultiplier); - - } - - public static void generatePipeRecipes(final String materialName, final long Mass, final long vMulti){ - - String output = materialName.substring(0, 1).toUpperCase() + materialName.substring(1); - output = Utils.sanitizeString(output); - - if (output.equals("VoidMetal")){ - output = "Void"; - } - - Logger.INFO("Generating "+output+" pipes & respective recipes."); - - ItemStack pipeIngot = ItemUtils.getItemStackOfAmountFromOreDict("ingot"+output, 1); - ItemStack pipePlate = ItemUtils.getItemStackOfAmountFromOreDict("plate"+output, 1); - - if (pipeIngot == null){ - if (pipePlate != null){ - pipeIngot = pipePlate; - } - } - - //Check all pipes are not null - Logger.WARNING("Generated pipeTiny from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Tiny"+output, 1) != null) ? true : false)); - Logger.WARNING("Generated pipeSmall from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 1) != null) ? true : false)); - Logger.WARNING("Generated pipeNormal from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 1) != null) ? true : false)); - Logger.WARNING("Generated pipeLarge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1) != null) ? true : false)); - Logger.WARNING("Generated pipeHuge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1) != null) ? true : false)); - - int eut = 120; - eut = (int) (8 * vMulti); - - - //Add the Three Shaped Recipes First - RecipeUtils.addShapedRecipe( - pipePlate, "craftingToolWrench", pipePlate, - pipePlate, null, pipePlate, - pipePlate, "craftingToolHardHammer", pipePlate, - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 6)); - - RecipeUtils.addShapedRecipe( - pipePlate, pipePlate, pipePlate, - "craftingToolWrench", null, "craftingToolHardHammer", - pipePlate, pipePlate, pipePlate, - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 2)); - - RecipeUtils.addShapedRecipe( - pipePlate, "craftingToolHardHammer", pipePlate, - pipePlate, null, pipePlate, - pipePlate, "craftingToolWrench", pipePlate, - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1)); - - if (pipeIngot != null && ItemUtils.checkForInvalidItems(pipeIngot)) { - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(pipeIngot, 1), - ItemList.Shape_Extruder_Pipe_Tiny.get(0), - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("pipe"+"Tiny"+output, 2), - 5, eut); - - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(pipeIngot, 1), - ItemList.Shape_Extruder_Pipe_Small.get(0), - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 1), - 10, eut); - - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(pipeIngot, 3), - ItemList.Shape_Extruder_Pipe_Medium.get(0), - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 1), - 1*20, eut); - - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(pipeIngot, 6), - ItemList.Shape_Extruder_Pipe_Large.get(0), - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1), - 2*20, eut); - - GT_Values.RA.addExtruderRecipe( - ItemUtils.getSimpleStack(pipeIngot, 12), - ItemList.Shape_Extruder_Pipe_Huge.get(0), - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1), - 4*20, eut); - - } - - if ((eut < 512) && !output.equals("Void")){ - try { - final ItemStack pipePlateDouble = ItemUtils.getItemStackOfAmountFromOreDict("plateDouble"+output, 1).copy(); - if (pipePlateDouble != null) { - RecipeUtils.addShapedRecipe( - pipePlateDouble, "craftingToolHardHammer", pipePlateDouble, - pipePlateDouble, null, pipePlateDouble, - pipePlateDouble, "craftingToolWrench", pipePlateDouble, - ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1)); - } else { - Logger.INFO("Failed to add a recipe for "+materialName+" Huge pipes. Double plates probably do not exist."); - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - - - } - - public static boolean registerOre(OrePrefixes aPrefix, Material aMaterial, ItemStack aStack) { - return registerOre(aPrefix.get(Utils.sanitizeString(aMaterial.getLocalizedName())), aStack); - } - - public static boolean registerOre(Object aName, ItemStack aStack) { - if ((aName == null) || (GT_Utility.isStackInvalid(aStack))) - return false; - String tName = aName.toString(); - if (GT_Utility.isStringInvalid(tName)) - return false; - ArrayList tList = GT_OreDictUnificator.getOres(tName); - for (int i = 0; i < tList.size(); ++i) - if (GT_Utility.areStacksEqual((ItemStack) tList.get(i), aStack, true)) - return false; - OreDictionary.registerOre(tName, GT_Utility.copyAmount(1L, new Object[] { aStack })); - return true; - } - - public static boolean generateWireRecipes(Material aMaterial){ - - //Adds manual crafting recipe - RecipeUtils.addShapedRecipe( - Utils.sanitizeString("plate"+aMaterial.getLocalizedName()), CI.craftingToolWireCutter, null, - null, null, null, - null, null, null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1)); - - //Wire mill - GT_Values.RA.addWiremillRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - 5*20, - 4); - - //Extruder - GT_Values.RA.addExtruderRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), - ItemList.Shape_Extruder_Wire.get(0), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - 196, - 96); - - GT_Values.RA.addUnboxingRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - null, - 100, - 8); - - //Shapeless Down-Crafting - //2x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2) - ); - //4x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 4) - ); - //8x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 8) - ); - //12x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 12) - ); - //16x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 16) - ); - - - //1x -> 2x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) - ); - - //2x -> 4x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - ); - - //4x -> 8x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - ); - - //8x -> 12x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) - ); - - //12x -> 16x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) - ); - - //8x -> 16x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) - ); - - //1x -> 4x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - ); - - //1x -> 8x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - ); - - - //Wire to Cable - //1x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 144), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //2x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 144), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt02"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //4x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 288), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt04"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //8x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 432), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt08"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //12x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 576), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt12"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - if(GTNH){ - //16x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 720), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt16"+aMaterial.getLocalizedName()), 1), - 100, - 8); - } - - //Assemble small wires into bigger wires - - //2x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(2), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //4x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(4), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //8x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(8), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //12x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(12), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //16x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(16), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - return true; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java deleted file mode 100644 index 64e77393bd..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java +++ /dev/null @@ -1,217 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.*; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; - -import java.lang.reflect.Constructor; - -public class GregtechCustomHatches { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Custom Fluid Hatches."); - run1(); - if (PollutionUtils.isPollutionEnabled()) { - run2(); - } - run3(); - run4(); - } - } - - private static void run1() { - - GregtechItemList.Hatch_Input_Cryotheum - .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getFluidStack("cryotheum", 1).getFluid(), // Fluid - // to - // resitrct - // hatch - // to - 128000, // Capacity - 967, // ID - "hatch.cryotheum.input.tier.00", // unlocal name - "Cryotheum Cooling Hatch" // Local name - ).getStackForm(1L)); - - GregtechItemList.Hatch_Input_Pyrotheum - .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getFluidStack("pyrotheum", 1).getFluid(), // Fluid - // to - // resitrct - // hatch - // to - 128000, // Capacity - 968, // ID - "hatch.pyrotheum.input.tier.00", // unlocal name - "Pyrotheum Heating Vent" // Local name - ).getStackForm(1L)); - - GregtechItemList.Hatch_Input_Naquadah.set(new GT_MetaTileEntity_Hatch_Naquadah(969, // ID - "hatch.naquadah.input.tier.00", // unlocal name - "Naquadah Reactor Input hatch" // Local name - ).getStackForm(1L)); - - - GregtechItemList.Hatch_Input_TurbineHousing.set(new GT_MetaTileEntity_Hatch_TurbineProvider(31025, // ID - "hatch.turbine.input.tier.00", // unlocal name - "Turbine Housing", // Local name - 8 - ).getStackForm(1L)); - - // Multiblock Control Core Bus - GregtechItemList.Hatch_Control_Core.set((new GT_MetaTileEntity_Hatch_ControlCore(30020, "hatch.control.adv", "Control Core Module", 1)).getStackForm(1L)); - - // Multiblock Air Intake Hatch - GregtechItemList.Hatch_Air_Intake.set(new GT_MetaTileEntity_Hatch_AirIntake(861, "hatch.air.intake.tier.00", "Air Intake Hatch", 5).getStackForm(1L)); - - // Steam Hatch - GregtechItemList.Hatch_Input_Steam - .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getSteam(1).getFluid(), // Fluid - // to - // resitrct - // hatch - // to - 64000, // Capacity - 31040, // ID - "hatch.steam.input.tier.00", // unlocal name - "Steam Hatch" // Local name - ).getStackForm(1L)); - - - - - - } - - private static void run2() { - GregtechItemList.Hatch_Muffler_Adv_LV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30001, "hatch.muffler.adv.tier.01", "Advanced Muffler Hatch (LV)", 1)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_MV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30002, "hatch.muffler.adv.tier.02", "Advanced Muffler Hatch (MV)", 2)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_HV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30003, "hatch.muffler.adv.tier.03", "Advanced Muffler Hatch (HV)", 3)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_EV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30004, "hatch.muffler.adv.tier.04", "Advanced Muffler Hatch (EV)", 4)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_IV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30005, "hatch.muffler.adv.tier.05", "Advanced Muffler Hatch (IV)", 5)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_LuV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30006, "hatch.muffler.adv.tier.06", "Advanced Muffler Hatch (LuV)", 6)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_ZPM - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30007, "hatch.muffler.adv.tier.07", "Advanced Muffler Hatch (ZPM)", 7)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_UV - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30008, "hatch.muffler.adv.tier.08", "Advanced Muffler Hatch (UV)", 8)) - .getStackForm(1L)); - GregtechItemList.Hatch_Muffler_Adv_MAX - .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30009, "hatch.muffler.adv.tier.09", "Advanced Muffler Hatch (MAX)", 9)) - .getStackForm(1L)); - } - - private static void run3() { - /* - * Super Input Busses - */ - - int aStartID = 30021; - - GregtechItemList.Hatch_SuperBus_Input_ULV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.00", "Super Bus (I) (ULV)", 0)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_LV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.01", "Super Bus (I) (LV)", 1)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_MV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.02", "Super Bus (I) (MV)", 2)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_HV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.03", "Super Bus (I) (HV)", 3)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_EV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.04", "Super Bus (I) (EV)", 4)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_IV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.05", "Super Bus (I) (IV)", 5)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_LuV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.06", "Super Bus (I) (LuV)", 6)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_ZPM - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.07", "Super Bus (I) (ZPM)", 7)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_UV - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.08", "Super Bus (I) (UV)", 8)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Input_MAX - .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.09", "Super Bus (I) (MAX)", 9)) - .getStackForm(1L)); - - /* - * Super Output Busses - */ - - GregtechItemList.Hatch_SuperBus_Output_ULV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.00", "Super Bus (O) (ULV)", 0)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_LV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.01", "Super Bus (O) (LV)", 1)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_MV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.02", "Super Bus (O) (MV)", 2)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_HV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.03", "Super Bus (O) (HV)", 3)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_EV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.04", "Super Bus (O) (EV)", 4)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_IV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.05", "Super Bus (O) (IV)", 5)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_LuV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.06", "Super Bus (O) (LuV)", 6)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_ZPM - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.07", "Super Bus (O) (ZPM)", 7)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_UV - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.08", "Super Bus (O) (UV)", 8)) - .getStackForm(1L)); - GregtechItemList.Hatch_SuperBus_Output_MAX - .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.09", "Super Bus (O) (MAX)", 9)) - .getStackForm(1L)); - } - - private static GT_MetaTileEntity_SuperBus_Input makeInputBus(int id, String unlocalizedName, String localizedName, int tier) { - return new GT_MetaTileEntity_SuperBus_Input(id, unlocalizedName, localizedName, tier); - } - - private static GT_MetaTileEntity_SuperBus_Output makeOutputBus(int id, String unlocalizedName, String localizedName, int tier) { - return new GT_MetaTileEntity_SuperBus_Output(id, unlocalizedName, localizedName, tier); - } - - private static void run4() { - int aID = 31060; - //41, "hatch.energy.tier.01", "LV Energy Hatch", 1 - Constructor aRTG = ReflectionUtils.getConstructor(GT_MetaTileEntity_Hatch_Energy_RTG.class, new Class[]{int.class, String.class, String.class, int.class, int.class}); - Object aHatch1 = ReflectionUtils.createNewInstanceFromConstructor(aRTG, new Object[]{aID++, "hatch.energy.rtg.tier.01", "RTG Power Unit [LV]", 1, 9}); - Object aHatch2 = ReflectionUtils.createNewInstanceFromConstructor(aRTG, new Object[]{aID++, "hatch.energy.rtg.tier.02", "RTG Power Unit [MV]", 2, 9}); - Object aHatch3 = ReflectionUtils.createNewInstanceFromConstructor(aRTG, new Object[]{aID++, "hatch.energy.rtg.tier.03", "RTG Power Unit [HV]", 3, 9}); - - GregtechItemList.Hatch_RTG_LV.set(((IMetaTileEntity) aHatch1).getStackForm(1L)); - GregtechItemList.Hatch_RTG_MV.set(((IMetaTileEntity) aHatch2).getStackForm(1L)); - GregtechItemList.Hatch_RTG_HV.set(((IMetaTileEntity) aHatch3).getStackForm(1L)); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java deleted file mode 100644 index e095ed4cbe..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_Cyclotron; - -public class GregtechCyclotron { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering COMET Cyclotron."); - run1(); - } - } - - private static void run1() { - GregtechItemList.COMET_Cyclotron - .set(new GregtechMetaTileEntity_Cyclotron(828, "cyclotron.tier.single", "COMET - Compact Cyclotron", 6) - .getStackForm(1L)); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java deleted file mode 100644 index a8b5aea0e6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java +++ /dev/null @@ -1,193 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Dehydrator; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialDehydrator; -import net.minecraft.item.ItemStack; - -public class GregtechDehydrator { - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Chemical Dehydrators."); - if (CORE.ConfigSwitches.enableMachine_Dehydrators) { - run1(); - } - } - - } - - private static void run1() { - - /* - * - * public GT_MetaTileEntity_BasicMachine_GT_Recipe( int aID, String - * aName, String aNameRegional, int aTier, String aDescription, - * GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int - * aTankCapacity, int aGUIParameterA, int aGUIParameterB, String - * aGUIName, String aSound, boolean aSharedTank, boolean - * aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, - * Object[] aRecipe) { - * - */ - - //Basic - GregtechItemList.GT_Dehydrator_MV - .set(new GT_MetaTileEntity_Dehydrator( - 911, - "machine.dehydrator.tier.00", - "Basic Dehydrator I", - 2, - "This dehydrates your Grapes into Raisins.", - 16000) - .getStackForm(1L)); - - GregtechItemList.GT_Dehydrator_HV - .set(new GT_MetaTileEntity_Dehydrator( - 912, - "machine.dehydrator.tier.01", - "Basic Dehydrator II", - 3, - "This dehydrates your Grapes into Raisins.", - 32000) - .getStackForm(1L)); - - - //Chemical - - GregtechItemList.GT_Dehydrator_EV - .set(new GT_MetaTileEntity_Dehydrator( - 813, - "advancedmachine.dehydrator.tier.01", - "Chemical Dehydrator I", - 4, - "A hangover is the way your body reacts to dehydration.", - 48000) - .getStackForm(1L)); - - GregtechItemList.GT_Dehydrator_IV - .set(new GT_MetaTileEntity_Dehydrator( - 814, - "advancedmachine.dehydrator.tier.02", - "Chemical Dehydrator II", - 5, - "A hangover is the way your body reacts to dehydration.", - 48000) - .getStackForm(1L)); - - GregtechItemList.GT_Dehydrator_LuV - .set(new GT_MetaTileEntity_Dehydrator( - 815, - "advancedmachine.dehydrator.tier.03", - "Chemical Dehydrator III", - 6, - "You could probably make space icecream with this..", - 64000) - .getStackForm(1L)); - - GregtechItemList.GT_Dehydrator_ZPM - .set(new GT_MetaTileEntity_Dehydrator( - 816, - "advancedmachine.dehydrator.tier.04", - "Chemical Dehydrator IV", - 7, - "You can definitely make space icecream with this..", - 64000) - .getStackForm(1L)); - - //Advanced - GregtechItemList.Controller_Vacuum_Furnace.set(new GregtechMetaTileEntity_IndustrialDehydrator(995, "multimachine.adv.vacuumfurnace", "Utupu-Tanuri").getStackForm(1L)); - - - ItemStack coilWire1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire", "coilWire1", 0, - 4); - ItemStack coilWire2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:1", "coilWire2", 1, - 4); - ItemStack coilWire3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:2", "coilWire3", 2, - 4); - ItemStack coilWire4 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:3", "coilWire4", 3, - 4); - ItemStack coilT1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil", "coil1", 0, 1); - ItemStack coilT2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil:1", "coil2", 1, 1); - ItemStack coilT3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil:2", "coil3", 2, 1); - ItemStack coilT4 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil:3", "coil4", 3, 1); - ItemStack spoolT1 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumBronze", 1); - ItemStack spoolT2 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumSteel", 1); - ItemStack spoolT3 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumStainlessSteel", 1); - ItemStack spoolT4 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumTitanium", 1); - - // Make some coils by wrapping wire around a spool. - GT_Values.RA.addAssemblerRecipe(coilWire1, spoolT1, coilT1, 8 * 20, 120); - GT_Values.RA.addAssemblerRecipe(coilWire2, spoolT2, coilT2, 8 * 20, 240); - GT_Values.RA.addAssemblerRecipe(coilWire3, spoolT3, coilT3, 8 * 20, 480); - GT_Values.RA.addAssemblerRecipe(coilWire4, spoolT4, coilT4, 8 * 20, 960); - - // Add recipes for the Dehydrators. - - //Basic - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_MV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('P'), - ItemList.Robot_Arm_MV, Character.valueOf('E'), OrePrefixes.wireFine.get(Materials.RedAlloy), Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Copper), Character.valueOf('G'), - OrePrefixes.gearGt.get(Materials.Steel) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_HV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('P'), - ItemList.Robot_Arm_HV, Character.valueOf('E'), OrePrefixes.wireFine.get(Materials.Electrum), Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Silver), Character.valueOf('G'), - ALLOY.POTIN.getGear(1) }); - - //Chemical - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_EV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), - ItemList.Robot_Arm_EV, Character.valueOf('E'), coilT1, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Data), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Aluminium), Character.valueOf('G'), - ALLOY.TUMBAGA.getGear(1) }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_IV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), - ItemList.Robot_Arm_IV, Character.valueOf('E'), coilT2, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Tungsten), Character.valueOf('G'), - ALLOY.INCONEL_690.getGear(1) }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_LuV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), - CI.robotArm_LuV, Character.valueOf('E'), coilT3, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Master), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Naquadah), Character.valueOf('G'), - ALLOY.HASTELLOY_N.getGear(1) }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_ZPM.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('P'), - CI.robotArm_ZPM, Character.valueOf('E'), coilT4, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Osmium), Character.valueOf('G'), - ALLOY.ZERON_100.getGear(1) }); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java deleted file mode 100644 index e82fade029..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java +++ /dev/null @@ -1,94 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechOreDictNames; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_RfConvertor; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative.GregtechMetaCreativeEnergyBuffer; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer; - -public class GregtechEnergyBuffer -{ - - //Misc Items - //public static Item itemBufferCore; - - public static void run() - { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech){ - Logger.INFO("Gregtech5u Content | Registering Energy Buffer Blocks."); - run1(); - } - } - - private static void run1() - { - - //itemBufferCore = new Item().setUnlocalizedName("itemBufferCore").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemBufferCore"); - - //Registry - //GameRegistry.registerItem(itemBufferCore, "itemBufferCore"); - //LanguageRegistry.addName(itemBufferCore, "Buffer Core"); - //OreDictionary.registerOre("itemBufferCore", itemBufferCore); - - - //Energy Buffers - GregtechItemList.Energy_Buffer_1by1_ULV.set(new GregtechMetaEnergyBuffer(770, "energybuffer.tier.00", "Ultra Low Voltage Energy Buffer", 0, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_LV.set(new GregtechMetaEnergyBuffer(771, "energybuffer.tier.01", "Low Voltage Energy Buffer", 1, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_MV.set(new GregtechMetaEnergyBuffer(772, "energybuffer.tier.02", "Medium Voltage Energy Buffer", 2, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_HV.set(new GregtechMetaEnergyBuffer(773, "energybuffer.tier.03", "High Voltage Energy Buffer", 3, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_EV.set(new GregtechMetaEnergyBuffer(774, "energybuffer.tier.04", "Extreme Voltage Energy Buffer", 4, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_IV.set(new GregtechMetaEnergyBuffer(775, "energybuffer.tier.05", "Insane Voltage Energy Buffer", 5, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_LuV.set(new GregtechMetaEnergyBuffer(776, "energybuffer.tier.06", "Ludicrous Voltage Energy Buffer", 6, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_ZPM.set(new GregtechMetaEnergyBuffer(777, "energybuffer.tier.07", "ZPM Voltage Energy Buffer", 7, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_UV.set(new GregtechMetaEnergyBuffer(778, "energybuffer.tier.08", "Ultimate Voltage Energy Buffer", 8, "", 1).getStackForm(1L)); - GregtechItemList.Energy_Buffer_1by1_MAX.set(new GregtechMetaEnergyBuffer(779, "energybuffer.tier.09", "MAX Voltage Energy Buffer", 9, "", 1).getStackForm(1L)); - // Creative Buffer Has Special ID - GregtechItemList.Energy_Buffer_CREATIVE - .set(new GregtechMetaCreativeEnergyBuffer(750, - "energybuffer.tier.xx", - "512V Creative Energy Buffer", 3, "", 0) - .getStackForm(1L)); - - if (LoadedMods.CoFHCore && CORE.ConfigSwitches.enableMachine_RF_Convetor) { - // RF Convertor Buffer Has Special ID - GregtechItemList.Energy_Buffer_RF_Convertor - .set(new GT_MetaTileEntity_RfConvertor(31022, - "energybuffer.rf.tier.01", - "RF Energy Convertor", 3, "", 0) - .getStackForm(1L)); - } - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_ULV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Lead), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Tin), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.AnyCopper), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Gold), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Aluminium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Tungsten), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_LuV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_ZPM.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_UV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_MAX.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MAX, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Superconductor), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); - /*GT_ModHandler.addCraftingRecipe( - GregtechItemList.Energy_Buffer_1by1_MAX.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE - | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE - | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { - "WTW", "WMW", Character.valueOf('M'), - ItemList.Hull_MAX, Character.valueOf('W'), - OrePrefixes.wireGt08.get(Materials.Superconductor), - Character.valueOf('T'), GregtechOreDictNames.buffer_core });*/ - - - - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java deleted file mode 100644 index 8340b7088c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java +++ /dev/null @@ -1,35 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialVacuumFreezer; -//import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_AssemblyLine; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_DistillationTower; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_EBF; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Fusion_MK4; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Implosion; - -public class GregtechFactoryGradeReplacementMultis { - - public static void run() { - run1(); - } - - private static void run1() { - Logger.INFO("Gregtech 5 Content | Registering Advanced GT Multiblock replacements."); - GregtechItemList.Machine_Adv_BlastFurnace.set(new GregtechMetaTileEntity_Adv_EBF(963, "multimachine.adv.blastfurnace", "Volcanus").getStackForm(1L)); - GregtechItemList.Machine_Adv_ImplosionCompressor.set(new GregtechMetaTileEntity_Adv_Implosion(964, "multimachine.adv.implosioncompressor", "Density^2").getStackForm(1L)); - GregtechItemList.Industrial_Cryogenic_Freezer.set(new GregtechMetaTileEntity_IndustrialVacuumFreezer(910, "multimachine.adv.industrialfreezer", "Cryogenic Freezer").getStackForm(1L)); - GregtechItemList.FusionComputer_UV2.set(new GregtechMetaTileEntity_Adv_Fusion_MK4(965, "fusioncomputer.tier.09", "FusionTech MK IV").getStackForm(1L)); - - - //31021 - GregtechItemList.Machine_Adv_DistillationTower.set(new GregtechMetaTileEntity_Adv_DistillationTower(31021, "multimachine.adv.distillationtower", "Dangote Distillus").getStackForm(1L)); - /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - GregtechItemList.Machine_Adv_AssemblyLine.set(new GregtechMetaTileEntity_Adv_AssemblyLine(31024, "multimachine.adv.assemblyline", "Compound Fabricator").getStackForm(1L)); - }*/ - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java deleted file mode 100644 index 86146640fd..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ChemicalReactor; - -public class GregtechFluidReactor { - - public static void run() { - - /* - * GregtechItemList.FluidReactor_LV .set(new - * GregtechMetaTileEntity_ChemicalReactor(31021, "chemicalplant.01.tier.01", - * "Chemical Plant I", 1) .getStackForm(1L)); GregtechItemList.FluidReactor_HV - * .set(new GregtechMetaTileEntity_ChemicalReactor(31022, - * "chemicalplant.01.tier.02", "Chemical Plant II", 3) .getStackForm(1L)); - * GregtechItemList.FluidReactor_IV .set(new - * GregtechMetaTileEntity_ChemicalReactor(31023, "chemicalplant.01.tier.03", - * "Chemical Plant III", 5) .getStackForm(1L)); - * GregtechItemList.FluidReactor_ZPM .set(new - * GregtechMetaTileEntity_ChemicalReactor(31024, "chemicalplant.01.tier.04", - * "Chemical Plant IV", 7) .getStackForm(1L)); - */ - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV deleted file mode 100644 index d063d85b1f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV +++ /dev/null @@ -1,15 +0,0 @@ - - -public class GregtechGeneratorsULV { - public static void run(){ - - GregtechItemList.Generator_Diesel_ULV.set(new GT_MetaTileEntity_ULV_CombustionGenerator(960, "basicgenerator.diesel.tier.00", "Simple Combustion Generator", 0).getStackForm(1L)); - GregtechItemList.Generator_Gas_Turbine_ULV.set(new GT_MetaTileEntity_ULV_GasTurbine(961, "basicgenerator.gas.tier.00", "Simple Gas Turbine", 0).getStackForm(1L)); - GregtechItemList.Generator_Steam_Turbine_ULV.set(new GT_MetaTileEntity_ULV_SteamTurbine(962, "basicgenerator.steam.tier.00", "Simple Steam Turbine", 0).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Diesel_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_ULV, 'P', GregtechItemList.Electric_Piston_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'G', OrePrefixes.gearGt.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Gas_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Steam_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "RMR", aTextMotorWire, 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.pipeMedium.get(Materials.Copper)}); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java deleted file mode 100644 index 1663c9ada4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV.GT_MetaTileEntity_ULV_CombustionGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV.GT_MetaTileEntity_ULV_GasTurbine; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV.GT_MetaTileEntity_ULV_SteamTurbine; - -import static gtPlusPlus.core.recipe.common.CI.bitsd; - -public class GregtechGeneratorsULV { - public static void run(){ - - GregtechItemList.Generator_Diesel_ULV.set(new GT_MetaTileEntity_ULV_CombustionGenerator(960, "basicgenerator.diesel.tier.00", "Simple Combustion Generator", 0).getStackForm(1L)); - GregtechItemList.Generator_Gas_Turbine_ULV.set(new GT_MetaTileEntity_ULV_GasTurbine(961, "basicgenerator.gas.tier.00", "Simple Gas Turbine", 0).getStackForm(1L)); - GregtechItemList.Generator_Steam_Turbine_ULV.set(new GT_MetaTileEntity_ULV_SteamTurbine(962, "basicgenerator.steam.tier.00", "Simple Steam Turbine", 0).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Diesel_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_ULV, 'P', GregtechItemList.Electric_Piston_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'G', OrePrefixes.gearGt.get(Materials.Bronze)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Gas_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"CRC", "RMR", "EWE", 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Steam_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "RMR", "EWE", 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.pipeMedium.get(Materials.Copper)}); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java deleted file mode 100644 index 2e7e96dd2f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java +++ /dev/null @@ -1,68 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityGeothermalGenerator; - -public class GregtechGeothermalThermalGenerator { - - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Geothermal Engines."); - if (CORE.ConfigSwitches.enableMachine_GeothermalEngines) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Geothermal_Engine_EV.set(new GregtechMetaTileEntityGeothermalGenerator(830, - "advancedgenerator.geothermalFuel.tier.01", "Basic Geothermal Engine", 4).getStackForm(1L)); - GregtechItemList.Geothermal_Engine_IV.set(new GregtechMetaTileEntityGeothermalGenerator(831, - "advancedgenerator.geothermalFuel.tier.02", "Turbo Geothermal Engine", 5).getStackForm(1L)); - GregtechItemList.Geothermal_Engine_LuV.set(new GregtechMetaTileEntityGeothermalGenerator(832, - "advancedgenerator.geothermalFuel.tier.03", "Vulcan Geothermal Engine", 6).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_EV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), - ItemList.Electric_Piston_EV, Character.valueOf('E'), ItemList.Electric_Motor_EV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Aluminium), Character.valueOf('G'), - ALLOY.TANTALLOY_61.getGear(1) }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_IV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), - ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Superconductor), - Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Platinum), Character.valueOf('G'), - ALLOY.STELLITE.getGear(1) }); - - final ItemStack INGREDIENT_1 = CI.electricPiston_LuV; - final ItemStack INGREDIENT_2 = CI.electricMotor_LuV; - GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_LuV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), - INGREDIENT_1, Character.valueOf('E'), INGREDIENT_2, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Infinite), Character.valueOf('W'), - OrePrefixes.cableGt04.get(Materials.Tungsten), Character.valueOf('G'), - ALLOY.ZERON_100.getGear(1) }); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java deleted file mode 100644 index a69c91e93b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java +++ /dev/null @@ -1,158 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import static gtPlusPlus.core.lib.CORE.GTNH; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTransformerHiAmp; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.item.ItemStack; - -public class GregtechHiAmpTransformer { - - - public static void run(){ - - long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; - int mID = 877; - - String mHammerName = "Hammer"; - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { - mHammerName = "Mallet"; - } - - GregtechItemList.Transformer_HA_LV_ULV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.00", - "ULV Hi-Amp Transformer", 0, "LV -> ULV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_MV_LV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.01", - "LV Hi-Amp Transformer", 1, "MV -> LV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_HV_MV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.02", - "MV Hi-Amp Transformer", 2, "HV -> MV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_EV_HV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.03", - "HV Hi-Amp Transformer", 3, "EV -> HV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_IV_EV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.04", - "EV Hi-Amp Transformer", 4, "IV -> EV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_LuV_IV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.05", - "IV Hi-Amp Transformer", 5, "LuV -> IV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_ZPM_LuV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.06", - "LuV Hi-Amp Transformer", 6, "ZPM -> LuV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_UV_ZPM.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.07", - "ZPM Hi-Amp Transformer", 7, "UV -> ZPM (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - if (!GTNH) { - GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", - "UV Hi-Amp Transformer", 8, "Any Voltage -> UV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - } else { - GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", - "UV Hi-Amp Transformer", 8, "UHV -> UV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); - } - ItemStack mItem_1; - ItemStack mItem_2; - ItemStack mItem_3; - - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - mItem_1 = ItemUtils.simpleMetaStack(ItemUtils.getSimpleStack(StaticFields59.getBlockCasings5()).getItem(), 3, 1); - mItem_2 = ItemUtils.simpleMetaStack(ItemUtils.getSimpleStack(StaticFields59.getBlockCasings5()).getItem(), 4, 1); - mItem_3 = ItemUtils.simpleMetaStack(ItemUtils.getSimpleStack(StaticFields59.getBlockCasings5()).getItem(), 5, 1); - } - else { - mItem_1 = ItemList.Circuit_Elite.get(1); - mItem_2 = ItemList.Circuit_Master.get(1); - mItem_3 = ItemList.Circuit_Ultimate.get(1); - } - - if(!GTNH){ - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Lead) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Copper), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Tin) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.AnnealedCopper) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), - ItemList.Casing_Coil_Cupronickel }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), - ItemList.Casing_Coil_Kanthal }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), - ItemList.Casing_Coil_Nichrome }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), - mItem_1 }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('C'), - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), - mItem_2 }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('C'), - OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), - mItem_3 }); - }else{ - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_LV_ULV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Lead) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_MV_LV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.AnyCopper), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Tin) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_HV_MV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.AnyCopper) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_EV_HV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), - ItemList.Casing_Coil_Cupronickel }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_IV_EV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), - ItemList.Casing_Coil_Kanthal }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_LuV_IV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), - ItemList.Casing_Coil_Nichrome }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_ZPM_LuV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), - mItem_1 }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_UV_ZPM, Character.valueOf('C'), - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), - mItem_2 }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_MAX_UV, Character.valueOf('C'), - OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), - mItem_3 }); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java deleted file mode 100644 index 6587e3a253..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialAlloySmelter; - -public class GregtechIndustrialAlloySmelter { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Alloy Smelter Multiblock."); - run1(); - } - - } - - private static void run1() { - GregtechItemList.Industrial_AlloySmelter.set(new GregtechMetaTileEntity_IndustrialAlloySmelter(31023, - "industrialalloysmelter.controller.tier.single", "Zyngen").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java deleted file mode 100644 index fb8f69e865..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialArcFurnace; - -public class GregtechIndustrialArcFurnace { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Arc Furnace Multiblock."); - run1(); - } - - } - - private static void run1() { - // Industrial Arc Furnace Multiblock - GregtechItemList.Industrial_Arc_Furnace.set(new GregtechMetaTileEntity_IndustrialArcFurnace(862, "industrialarcfurnace.controller.tier.single", "High Current Industrial Arc Furnace").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java deleted file mode 100644 index 15c2d9b238..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_AlloyBlastSmelter; - -public class GregtechIndustrialBlastSmelter { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Alloy Blast Smelter Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_AlloyBlastSmelter) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Alloy Blast Smelter Multiblock - GregtechItemList.Industrial_AlloyBlastSmelter.set(new GregtechMetaTileEntity_AlloyBlastSmelter(810, - "industrialsalloyamelter.controller.tier.single", "Alloy Blast Smelter").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java deleted file mode 100644 index dfbe7304ef..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; - -public class GregtechIndustrialCentrifuge { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Centrifuge Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCentrifuge) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Centrifuge Multiblock - GregtechItemList.Industrial_Centrifuge.set(new GregtechMetaTileEntity_IndustrialCentrifuge(790, - "industrialcentrifuge.controller.tier.single", "Industrial Centrifuge").getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java deleted file mode 100644 index 7afc73709a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCokeOven; - -public class GregtechIndustrialCokeOven { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Coke Oven Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Centrifuge Multiblock - GregtechItemList.Industrial_CokeOven.set(new GregtechMetaTileEntity_IndustrialCokeOven(791, - "industrialcokeoven.controller.tier.single", "Industrial Coke Oven").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java deleted file mode 100644 index f6133f6bf3..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCuttingMachine; - -public class GregtechIndustrialCuttingFactory { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Cutting Factory Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialCuttingMachine) { - run1(); - } - } - } - - private static void run1() { - // Industrial Wire Factory Multiblock - GregtechItemList.Industrial_CuttingFactoryController.set(new GregtechMetaTileEntity_IndustrialCuttingMachine(992, - "industrialcuttingmachine.controller.tier.01", "Cutting Factory Controller").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java deleted file mode 100644 index 10d7510625..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialElectrolyzer; - -public class GregtechIndustrialElectrolyzer { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Electrolyzer Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialElectrolyzer) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Electrolyzer Multiblock - GregtechItemList.Industrial_Electrolyzer.set(new GregtechMetaTileEntity_IndustrialElectrolyzer(796, - "industrialelectrolyzer.controller.tier.single", "Industrial Electrolyzer").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java deleted file mode 100644 index 9e940dff26..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_ElementalDuplicator; - -public class GregtechIndustrialElementDuplicator { - - public static void run(){ - - Logger.INFO("Gregtech5u Content | Registering Elemental Duplicator Multiblock."); - - GregtechItemList.Controller_ElementalDuplicator.set(new GregtechMTE_ElementalDuplicator(31050, "gtpp.multimachine.replicator", "Elemental Duplicator").getStackForm(1L)); - GregtechItemList.Hatch_Input_Elemental_Duplicator.set(new GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(31051, "hatch.input_bus.elementalorbholder", "Elemental Data Orb Storage", 7).getStackForm(1L)); - - } - -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java deleted file mode 100644 index 51b2f4b0d5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialExtruder; - -public class GregtechIndustrialExtruder { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Extrusion Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialExtrudingMachine) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Presser Multiblock - GregtechItemList.Industrial_Extruder.set(new GregtechMetaTileEntity_IndustrialExtruder(859, - "industrialextruder.controller.tier.single", "Industrial Extrusion Machine").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java deleted file mode 100644 index 681256a385..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_IndustrialFishingPond; - -public class GregtechIndustrialFishPond { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Fishing Pond Multiblock."); - //if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant) { - run1(); - //} - } - - } - - private static void run1() { - GregtechItemList.Industrial_FishingPond.set(new GregtechMetaTileEntity_IndustrialFishingPond(829, - "industrial.fishpond.controller.tier.single", "Zhuhai - Fishing Port").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java deleted file mode 100644 index 0b6dcb1b94..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_Refinery; - -public class GregtechIndustrialFuelRefinery { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Fuel Processing and Refinery Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_NuclearFuelRefinery) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Maceration Stack Multiblock - GregtechItemList.Industrial_FuelRefinery.set(new GregtechMetaTileEntity_Refinery(835, - "industrialrefinery.controller.tier.single", "Reactor Fuel Processing Plant").getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java deleted file mode 100644 index 9bdcf231d0..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityGeneratorArray; - -public class GregtechIndustrialGeneratorArray { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Generator Array Multiblock."); - //if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter) { // TODO - run1(); - //} - } - - } - - private static void run1() { - // Industrial Maceration Stack Multiblock - GregtechItemList.Generator_Array_Controller.set(new GregtechMetaTileEntityGeneratorArray( - 990, - "generatorarray.controller.tier.01", - "Large Generator Array").getStackForm(1L)); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java deleted file mode 100644 index c67296fc53..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialMacerator; - -public class GregtechIndustrialMacerator { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Maceration Stack Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialMacerationStack) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Maceration Stack Multiblock - GregtechItemList.Industrial_MacerationStack.set(new GregtechMetaTileEntity_IndustrialMacerator(797, - "industrialmacerator.controller.tier.single", "Maceration Stack Controller").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java deleted file mode 100644 index f07be17ffd..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java +++ /dev/null @@ -1,230 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_MassFabricator; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechIndustrialMassFabricator { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Matter Fabricator Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_MatterFabricator) { - generateRecipes(); - run1(); - } - } - - } - - private static void run1() { - // Industrial Matter Fabricator Multiblock - GregtechItemList.Industrial_MassFab.set(new GregtechMetaTileEntity_MassFabricator(799, - "industrialmassfab.controller.tier.single", "Matter Fabrication CPU").getStackForm(1L)); - } - - private static void generateRecipes() { - - //Generate Scrap->UUA Recipes - - - - //Basic UUA1 - GT_Recipe UUA_From_Scrap = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(9), ItemUtils.getSimpleStack(getScrapPile(), 9)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - 9*20, - 32, - 0); - //Basic UUA2 - GT_Recipe UUA_From_ScrapBoxes = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(19), ItemUtils.getSimpleStack(getScrapBox(), 1)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - 9*20, - 32, - 0); - - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(UUA_From_Scrap); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(UUA_From_ScrapBoxes); - - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - //Basic UUM - GT_Recipe generateUUM = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(1)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 160*20, - 32, - 0); - - //Basic UUM - GT_Recipe generateUUMFromUUA = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(2)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 40*20, - 32, - 0); - - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA); - } - else { - - //Basic UUM - GT_Recipe generateUUM_LV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(15)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 160*20, - 256, - 0); - GT_Recipe generateUUM_MV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(14)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 160*20, - 512, - 0); - GT_Recipe generateUUM_HV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(13)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 160*20, - 1024, - 0); - GT_Recipe generateUUM_EV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(12)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 160*20, - 2048, - 0); - GT_Recipe generateUUM_IV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(11)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {GT_Values.NF}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 160*20, - 4096, - 0); - - //Basic UUM - GT_Recipe generateUUMFromUUA_LV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(5)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 40*20, - 256, - 0); - GT_Recipe generateUUMFromUUA_MV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(4)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 40*20, - 512, - 0); - GT_Recipe generateUUMFromUUA_HV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(3)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 40*20, - 1024, - 0); - GT_Recipe generateUUMFromUUA_EV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(2)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 40*20, - 2048, - 0); - GT_Recipe generateUUMFromUUA_IV = new GTPP_Recipe( - false, - new ItemStack[] {CI.getNumberedCircuit(1)}, - new ItemStack[] {GT_Values.NI}, - null, null, - new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, - new FluidStack[] {Materials.UUMatter.getFluid(1)}, - 40*20, - 4096, - 0); - - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_LV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_MV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_HV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_EV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_IV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_LV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_MV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_HV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_EV); - GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_IV); - - } - - Logger.INFO("Generated "+GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.mRecipeList.size()+" Matter Fabricator recipes."); - - - - - } - - - - public static ItemStack getScrapPile() { - return ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrap")); - } - public static ItemStack getScrapBox() { - return ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrapbox")); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java deleted file mode 100644 index 9c8673682c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialMixer; - -public class GregtechIndustrialMixer { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Mixer Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Mixer Multiblock - GregtechItemList.Industrial_Mixer.set(new GregtechMetaTileEntity_IndustrialMixer(811, - "industrialmixer.controller.tier.single", "Industrial Mixing Machine").getStackForm(1L)); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java deleted file mode 100644 index 40d6c12f0b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialMultiMachine; - -public class GregtechIndustrialMultiMachine { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Multi-Machine Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialMultiMachine) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Industrial_MultiMachine.set(new GregtechMetaTileEntity_IndustrialMultiMachine(860, - "industrialmultimachine.controller.tier.single", "Large Processing Factory").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java deleted file mode 100644 index 1d723784ac..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java +++ /dev/null @@ -1,32 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_MultiTank; - -public class GregtechIndustrialMultiTank { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Multitank controller blocks."); - if (CORE.ConfigSwitches.enableMultiblock_MultiTank) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Industrial_MultiTank - .set(new GregtechMetaTileEntity_MultiTank(827, "multitank.controller.tier.single", "Gregtech Multitank") - .getStackForm(1L)); - // GregtechItemList.Industrial_MultiTankDense.set(new - // GregtechMetaTileEntityMultiTankDense(828, - // "multitankdense.controller.tier.single", "Gregtech Dense - // Multitank").getStackForm(1L)); - - } -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java deleted file mode 100644 index ecf1e73675..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialPlatePress; - -public class GregtechIndustrialPlatePress { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Press Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Presser Multiblock - GregtechItemList.Industrial_PlatePress.set(new GregtechMetaTileEntity_IndustrialPlatePress(792, - "industrialbender.controller.tier.single", "Industrial Material Press").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java deleted file mode 100644 index 15bf42c9d4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialSifter; - -public class GregtechIndustrialSifter { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Sifter Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter) { // TODO - run1(); - } - } - - } - - private static void run1() { - // Industrial Maceration Stack Multiblock - GregtechItemList.Industrial_Sifter.set(new GregtechMetaTileEntity_IndustrialSifter(840, - "industrialsifter.controller.tier.single", "Large Sifter Control Block").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java deleted file mode 100644 index 01c04b4668..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialThermalCentrifuge; - -public class GregtechIndustrialThermalCentrifuge { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Thermal Centrifuge Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialThermalCentrifuge) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Industrial_ThermalCentrifuge.set(new GregtechMetaTileEntity_IndustrialThermalCentrifuge(849, - "industrialthermalcentrifuge.controller.tier.single", "Large Thermal Refinery").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java deleted file mode 100644 index 47dd3c265f..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java +++ /dev/null @@ -1,28 +0,0 @@ - -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityTreeFarm; - -public class GregtechIndustrialTreeFarm { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Tree Farm Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer) { - run1(); - } - } - - } - - private static void run1() { - // Industrial Maceration Stack Multiblock - GregtechItemList.Industrial_TreeFarm - .set(new GregtechMetaTileEntityTreeFarm(836, "treefarm.controller.tier.single", "Tree Growth Simulator") - .getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java deleted file mode 100644 index f66ebca60e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialWashPlant; - -public class GregtechIndustrialWashPlant { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Wash Plant Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Industrial_WashPlant.set(new GregtechMetaTileEntity_IndustrialWashPlant(850, - "industrialwashplant.controller.tier.single", "Ore Washing Plant").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java deleted file mode 100644 index 6d575991bd..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialWireMill; - -public class GregtechIndustrialWiremill { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Wire Factory Multiblock."); - if (CORE.ConfigSwitches.enableMultiblock_IndustrialWireMill) { - run1(); - } - } - } - - private static void run1() { - // Industrial Wire Factory Multiblock - GregtechItemList.Industrial_WireFactory.set(new GregtechMetaTileEntity_IndustrialWireMill(798, - "industrialwiremill.controller.tier.single", "Wire Factory Controller").getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java deleted file mode 100644 index 1bcd0f3300..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java +++ /dev/null @@ -1,24 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IronBlastFurnace; - -public class GregtechIronBlastFurnace { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Iron Blast Furnace."); - if (CORE.ConfigSwitches.enableMultiblock_IronBlastFurnace) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Machine_Iron_BlastFurnace.set(new GregtechMetaTileEntity_IronBlastFurnace(768, - "ironmachine.blastfurnace", "Iron Plated Blast Furnace").getStackForm(1L)); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java deleted file mode 100644 index 19c361be93..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java +++ /dev/null @@ -1,23 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_MillingBalls; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IsaMill; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_FrothFlotationCell; - -public class GregtechIsaMill { - - public static void run(){ - - Logger.INFO("Gregtech5u Content | Registering Milling Content."); - - GregtechItemList.Controller_IsaMill.set(new GregtechMetaTileEntity_IsaMill(31027, "gtpp.multimachine.isamill", "IsaMill Grinding Machine").getStackForm(1L)); - GregtechItemList.Controller_Flotation_Cell.set(new GregtechMTE_FrothFlotationCell(31028, "gtpp.multimachine.flotationcell", "Flotation Cell Regulator").getStackForm(1L)); - - // Milling Ball Bus - GregtechItemList.Bus_Milling_Balls.set((new GT_MetaTileEntity_Hatch_MillingBalls(31029, "hatch.milling", "Ball Housing")).getStackForm(1L)); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java deleted file mode 100644 index cef60ba712..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ReactorColdTrap; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ReactorProcessingUnit; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_SpargeTower; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_NuclearReactor; - -public class GregtechLFTR { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Liquid Fluorine Thorium Reactor [LFTR]."); - if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor) { - run1(); - } - } - - } - - private static void run1() { - // LFTR - GregtechItemList.ThoriumReactor.set(new GregtechMTE_NuclearReactor(751, "lftr.controller.single", "Thorium Reactor [LFTR]").getStackForm(1L)); - // Reactor Processing Units - GregtechItemList.ReactorProcessingUnit_IV.set(new GregtechMetaTileEntity_ReactorProcessingUnit(31031, "rpu.tier.01", "Reactor Processing Unit I", 5).getStackForm(1L)); - GregtechItemList.ReactorProcessingUnit_ZPM.set(new GregtechMetaTileEntity_ReactorProcessingUnit(31032, "rpu.tier.02", "Reactor Processing Unit II", 7).getStackForm(1L)); - // Cold Traps - GregtechItemList.ColdTrap_IV.set(new GregtechMetaTileEntity_ReactorColdTrap(31033, "coldtrap.tier.01", "Cold Trap I", 5).getStackForm(1L)); - GregtechItemList.ColdTrap_ZPM.set(new GregtechMetaTileEntity_ReactorColdTrap(31034, "coldtrap.tier.02", "Cold Trap II", 7).getStackForm(1L)); - // Sparge Tower - GregtechItemList.Controller_Sparge_Tower.set(new GregtechMetaTileEntity_SpargeTower(31035, "sparge.controller.single", "Sparge Tower Controller").getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java deleted file mode 100644 index 9b9f5fd59b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; - -public class GregtechLargeTurbinesAndHeatExchanger { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Larger Turbines & Extra Large Heat Exchanger."); - run1(); - } - - } - - private static void run1() { - /* GregtechItemList.Large_Steam_Turbine.set(new GT_MTE_LargeTurbine_Steam(865, "multimachine.largerturbine", "XL Turbo Steam Turbine").getStackForm(1L)); - GregtechItemList.Large_HPSteam_Turbine.set(new GT_MTE_LargeTurbine_SHSteam(866, "multimachine.largerhpturbine", "XL Turbo HP Steam Turbine").getStackForm(1L)); - GregtechItemList.Hatch_Turbine_Rotor.set(new GT_MetaTileEntity_Hatch_Turbine(30010, "hatch.turbine", "Rotor Assembly", 8).getStackForm(1L)); - */ - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java deleted file mode 100644 index aea40c564c..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java +++ /dev/null @@ -1,45 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Plasma; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_MiniFusionPlant; - -public class GregtechMiniRaFusion { - - public static void run() { - // Register the Simple Fusion Entity. - GregtechItemList.Miniature_Fusion.set(new GregtechMTE_MiniFusionPlant(31015, "gtplusplus.fusion.single", "Helium Prime").getStackForm(1L)); - GregtechItemList.Plasma_Tank.set(new GT_MetaTileEntity_Hatch_Plasma(31016, "gtplusplus.tank.plasma", "Plasma Tank").getStackForm(1L)); - - } - - public static boolean generateSlowFusionrecipes() { - for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList){ - if (x.mEnabled) { - GT_Recipe y = x.copy(); - y.mDuration *= 16; - long z = y.mEUt * 4; - if (z > Integer.MAX_VALUE) { - y.mEnabled = false; - continue; - } - y.mEUt = (int) Math.min(Math.max(0, z), Integer.MAX_VALUE); - y.mCanBeBuffered = true; - GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes.add(y); - } - } - int mRecipeCount = GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes.mRecipeList.size(); - if (mRecipeCount > 0) { - Logger.INFO("[Pocket Fusion] Generated "+mRecipeCount+" recipes for the Pocket Fusion Reactor."); - return true; - } - return false; - } - - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java deleted file mode 100644 index e2c63c77da..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java +++ /dev/null @@ -1,24 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_LargeNaqReactor; - -public class GregtechNaqReactor { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Futuristic Naquadah Reactor {LNR]."); - run1(); - } - - } - - private static void run1() { - // LFTR - GregtechItemList.Controller_Naq_Reactor.set(new GregtechMTE_LargeNaqReactor(970, "lnr.controller.single", "Naquadah Reactor Mark XII").getStackForm(1L)); - - } -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java deleted file mode 100644 index 6095413150..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java +++ /dev/null @@ -1,182 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import net.minecraft.item.ItemStack; - -import gregtech.GT_Mod; -import gregtech.api.enums.*; -import gregtech.api.objects.MaterialStack; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechNitroDieselFix { - - @SuppressWarnings("unchecked") - public static void run(){ - if (CORE.ConfigSwitches.enableNitroFix){ - Logger.INFO("Gregtech5u Content | Attempting to Fix Nitro-Diesel production."); - try { - int mSub = Utils.getGregtechSubVersion(); - if (mSub != 0){ - if (mSub >= 30){ - Class mb = ReflectionUtils.getClass("gregtech.api.enums.MaterialBuilder"); - Object df = mb.getConstructor(int.class, TextureSet.class, String.class).newInstance(975, TextureSet.SET_FLUID, "Nitro-Diesel [Old]"); - if (mb.isInstance(df)){ - - Logger.INFO("[Nitro] Created new instance of Material builder, for Nitro fix."); - - //Get Methods - Method addFluid = mb.getDeclaredMethod("addFluid"); - Method addCell = mb.getDeclaredMethod("addCell"); - Method setColour = mb.getDeclaredMethod("setColor", Dyes.class); - Method setFuelPower = mb.getDeclaredMethod("setFuelPower", int.class); - Method setMaterials = mb.getDeclaredMethod("setMaterialList", List.class); - Method setTemp = mb.getDeclaredMethod("setLiquidTemperature", int.class); - Method setRGB = mb.getDeclaredMethod("setRGB", int.class, int.class, int.class); - Method construct = mb.getDeclaredMethod("constructMaterial"); - Logger.INFO("[Nitro] Got internal methods for setting fields."); - - //Invoke the methods - addFluid.invoke(df); - addCell.invoke(df); - setColour.invoke(df, Dyes.dyeLime); - setFuelPower.invoke(df, 512000); - setMaterials.invoke(df, Arrays.asList(new MaterialStack(Materials.Glyceryl, 1), new MaterialStack(Materials.Fuel, 4))); - setTemp.invoke(df, 295); - setRGB.invoke(df, 200, 255, 0); - Materials mNitroFix = (Materials) construct.invoke(df); - Logger.INFO("[Nitro] Invoked 8 method calls successfully."); - - GT_Mod.gregtechproxy.addFluid("NitroFuel_Old", "Nitro Diesel [Old]", mNitroFix, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, mNitroFix, 1L), ItemUtils.getEmptyCell(), 1000); - Logger.INFO("[Nitro] Added a fluid."); - - - /** - * Reflectively get all the values to maintain 5.08.xx compat - */ - - - GT_Recipe_Map recipeMapMultiblockChemReactor; - recipeMapMultiblockChemReactor = (GT_Recipe_Map) FieldUtils.getDeclaredField(GT_Recipe_Map.class, "sMultiblockChemicalRecipes", true).get(null); - - - - /** - * Do Recipe Stuff - */ - - //Set up some Variables - final Collection xSingle = GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList; - final Collection xMulti = recipeMapMultiblockChemReactor.mRecipeList; - final FluidStack mNitroStack = Materials.NitroFuel.getFluid(1000); - GT_Recipe toRemoveSingle[] = new GT_Recipe[99]; - GT_Recipe toRemoveMulti[] = new GT_Recipe[99]; - int mIndexSingle = 0; - int mIndexMulti = 0; - - //Iterate Single Block recipes for Nitro production. - for (GT_Recipe rnd : xSingle){ - for (FluidStack mOutputFluid : rnd.mFluidOutputs){ - if (mOutputFluid.isFluidEqual(mNitroStack)){ - toRemoveSingle[mIndexSingle++] = rnd; - } - } - } - Logger.INFO("[Nitro] Found "+mIndexSingle+" single block Chemical Reactor recipes to remove."); - - //Iterate Multi Block recipes for Nitro production. - for (GT_Recipe rnd : xMulti){ - for (FluidStack mOutputFluid : rnd.mFluidOutputs){ - if (mOutputFluid.isFluidEqual(mNitroStack)){ - toRemoveMulti[mIndexMulti++] = rnd; - } - } - } - Logger.INFO("[Nitro] Found "+mIndexMulti+" multi block Chemical Reactor recipes to remove."); - - //Remove Single Block recipes found. - int mRemovedSingle = 0; - int mRemovedMulti = 0; - for (GT_Recipe single : toRemoveSingle){ - if (GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(single)){ - mRemovedSingle++; - } - } - Logger.INFO("[Nitro] Removed "+mRemovedSingle+" single block Chemical Reactor recipes."); - - //Remove Multi Block recipes found. - for (GT_Recipe multi : toRemoveMulti){ - if (recipeMapMultiblockChemReactor.mRecipeList.remove(multi)){ - mRemovedMulti++; - } - } - Logger.INFO("[Nitro] Removed "+mRemovedMulti+" multi block Chemical Reactor recipes."); - - Materials mGlycerol = Materials.valueOf("Glycerol"); - Materials mLightFuel = Materials.valueOf("LightFuel"); - - //Build a New Recipe set - Materials mFuels[] = {mLightFuel, Materials.Fuel}; - for (Materials fuel : mFuels){ - boolean didAdd[] = new boolean[3]; - Logger.INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the mixer, using "+fuel.mDefaultLocalName+" as the fuel input."); - didAdd[0] = GT_Values.RA.addMixerRecipe(getCells(fuel, 4), getCells(mGlycerol, 1), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, getCells(mNitroFix, 5), 20, 30); - didAdd[1] = GT_Values.RA.addMixerRecipe(getCells(fuel, 4), GT_Values.NI, GT_Values.NI, GT_Values.NI, mGlycerol.getFluid(1000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(4L), 20, 30); - didAdd[2] = GT_Values.RA.addMixerRecipe(getCells(mGlycerol, 1), GT_Values.NI,GT_Values.NI,GT_Values.NI, fuel.getFluid(4000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(1L), 20, 30); - Logger.INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]); - } - - for (Materials fuel : mFuels){ - boolean didAdd[] = new boolean[3]; - Logger.INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the chemical reactors, using "+fuel.mDefaultLocalName+" as the fuel input."); - didAdd[0] = GT_Values.RA.addChemicalRecipe(getCells(fuel, 4), getCells(mGlycerol, 1), GT_Values.NF, GT_Values.NF, getCells(mNitroFix, 5), 20); - didAdd[1] = GT_Values.RA.addChemicalRecipe(getCells(fuel, 4), GT_Values.NI, mGlycerol.getFluid(1000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(4L), 20); - didAdd[2] = GT_Values.RA.addChemicalRecipe(getCells(mGlycerol, 1), GT_Values.NI, fuel.getFluid(4000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(1L), 20); - Logger.INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]); - } - - Logger.INFO("[Nitro] Getting ready to add back in the old glycerol recipe!"); - GT_Values.RA.addChemicalRecipe(getCells(Materials.Nitrogen, 1), getDust(Materials.Carbon, 1), Materials.Water.getFluid(2000L), mGlycerol.getFluid(3000L), ItemList.Cell_Empty.get(1), 3000); - Logger.INFO("[Nitro] Added recipes."); - - } - } - } - } - catch (IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) { - Logger.INFO("[Nitro] ================ Error ================"); - e.printStackTrace(); - Logger.INFO("[Nitro] ================ Error ================"); - } - } - } - - - public static ItemStack getCells(Materials mat, int amount){ - String mName = MaterialUtils.getMaterialName(mat); - return ItemUtils.getItemStackOfAmountFromOreDict("cell"+mName, amount); - } - - public static ItemStack getDust(Materials mat, int amount){ - String mName = MaterialUtils.getMaterialName(mat); - return ItemUtils.getItemStackOfAmountFromOreDict("dust"+mName, amount); - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java deleted file mode 100644 index c470243822..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java +++ /dev/null @@ -1,57 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionCreator; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionDetector; - -public class GregtechPollutionDevices { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - if (PollutionUtils.isPollutionEnabled()) { - Logger.INFO("Gregtech5u Content | Registering Anti-Pollution Devices."); - run1(); - } - } - } - - private static void run1() { - if (CORE.ConfigSwitches.enableMachine_Pollution){ - // 759 - GregtechItemList.Pollution_Detector.set( - new GregtechMetaPollutionDetector(756, "pollutiondetector.01.tier.single", "Pollution Detection Device", - 0, "Tells you if you're living in Gwalior yet.", 0).getStackForm(1L)); - GregtechItemList.Pollution_Creator.set(new GregtechMetaPollutionCreator(951, "pollutioncreator.01.tier.single", - "Smog Device", 4, "Polluting the skies.", 0).getStackForm(1L)); - - GregtechItemList.Pollution_Cleaner_ULV.set(new GregtechMetaAtmosphericReconditioner(757, - "pollutioncleaner.01.tier.single", "Pollution Scrubber", 0).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_LV.set(new GregtechMetaAtmosphericReconditioner(758, - "pollutioncleaner.02.tier.single", "Upgraded Pollution Scrubber", 1).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_MV.set(new GregtechMetaAtmosphericReconditioner(759, - "pollutioncleaner.03.tier.single", "Advanced Pollution Scrubber", 2).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_HV.set(new GregtechMetaAtmosphericReconditioner(760, - "pollutioncleaner.04.tier.single", "Precision Pollution Scrubber", 3).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_EV.set(new GregtechMetaAtmosphericReconditioner(761, - "pollutioncleaner.05.tier.single", "Air Recycler", 4).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_IV.set(new GregtechMetaAtmosphericReconditioner(762, - "pollutioncleaner.06.tier.single", "Upgraded Air Recycler", 5).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_LuV.set(new GregtechMetaAtmosphericReconditioner(763, - "pollutioncleaner.07.tier.single", "Advanced Air Recycler", 6).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_ZPM.set(new GregtechMetaAtmosphericReconditioner(764, - "pollutioncleaner.08.tier.single", "Precision Air Recycler", 7).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_UV.set(new GregtechMetaAtmosphericReconditioner(765, - "pollutioncleaner.09.tier.single", "Atmospheric Cleaner", 8).getStackForm(1L)); - GregtechItemList.Pollution_Cleaner_MAX.set(new GregtechMetaAtmosphericReconditioner(766, - "pollutioncleaner.10.tier.single", "Biosphere Cleanser", 9).getStackForm(1L)); - } - - - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java deleted file mode 100644 index 3e9582b80a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBreaker; - -public class GregtechPowerBreakers { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Power Breakers."); - run1(); - } - - } - - private static void run1() { - //30200 - int aStartID = 30400; - GregtechItemList.BreakerBox_ULV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.00", - "Ultra Low Voltage Breaker Box", 0, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_LV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.01", - "Low Voltage Breaker Box", 1, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_MV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.02", - "Medium Voltage Breaker Box", 2, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_HV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.03", - "High Voltage Breaker Box", 3, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_EV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.04", - "Extreme Voltage Breaker Box", 16, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_IV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.05", - "Insane Voltage Breaker Box", 5, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_LuV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.06", - "Ludicrous Voltage Breaker Box", 6, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_ZPM.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.07", - "ZPM Voltage Breaker Box", 7, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_UV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.08", - "Ultimate Voltage Breaker Box", 8, "", 16)).getStackForm(1L)); - GregtechItemList.BreakerBox_MAX.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.09", - "MAX Voltage Breaker Box", 9, "", 16)).getStackForm(1L)); - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java deleted file mode 100644 index 9e94d633f6..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java +++ /dev/null @@ -1,43 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; - -public class GregtechPowerSubStation { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Power Substation Node."); - if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation) { - run1(); - } - } - - } - - private static void run1() { - // Steam Condensors - GregtechItemList.PowerSubStation.set(new GregtechMetaTileEntity_PowerSubStationController(812, - "substation.01.input.single", "Power Station Control Node").getStackForm(1L)); - int tID = 886; - GregtechItemList.Hatch_Input_Battery_MV.set(new GT_MetaTileEntity_Hatch_InputBattery(tID++, "hatch.input_battery.tier.00", "Charging Bus (MV)", 2).getStackForm(1L)); - GregtechItemList.Hatch_Input_Battery_EV.set(new GT_MetaTileEntity_Hatch_InputBattery(tID++, "hatch.input_battery.tier.01", "Charging Bus (EV)", 4).getStackForm(1L)); - - GregtechItemList.Hatch_Output_Battery_MV.set(new GT_MetaTileEntity_Hatch_OutputBattery(tID++, "hatch.output_battery.tier.00", "Discharging Bus (MV)", 2).getStackForm(1L)); - GregtechItemList.Hatch_Output_Battery_EV.set(new GT_MetaTileEntity_Hatch_OutputBattery(tID++, "hatch.output_battery.tier.01", "Discharging Bus (EV)", 4).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Input_Battery_MV.get(1L, new Object[0]), CI.bitsd, new Object[]{"C", "M", 'M', ItemList.Hull_MV, 'C', ItemList.Battery_Buffer_2by2_MV}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Input_Battery_EV.get(1L, new Object[0]), CI.bitsd, new Object[]{"C", "M", 'M', ItemList.Hull_EV, 'C', ItemList.Battery_Buffer_4by4_EV}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Output_Battery_MV.get(1L, new Object[0]), CI.bitsd, new Object[]{"M", "C", 'M', ItemList.Hull_MV, 'C', ItemList.Battery_Buffer_2by2_MV}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Output_Battery_EV.get(1L, new Object[0]), CI.bitsd, new Object[]{"M", "C", 'M', ItemList.Hull_EV, 'C', ItemList.Battery_Buffer_4by4_EV}); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java deleted file mode 100644 index a7332657ce..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG; - -public class GregtechRTG { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering RTG."); - run1(); - } - } - - private static void run1() { - GregtechItemList.RTG.set( - new GregtechMetaTileEntity_RTG(869, "basicgenerator.rtg.tier.01", "Radioisotope Thermoelectric Generator", 3) - .getStackForm(1L)); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java deleted file mode 100644 index 5a7d3a50d7..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java +++ /dev/null @@ -1,128 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityRocketFuelGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_LargeRocketEngine; - -public class GregtechRocketFuelGenerator { - - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Industrial Rocket Engines."); - if (CORE.ConfigSwitches.enableMachine_RocketEngines) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.Controller_RocketEngine.set( - new GregtechMetaTileEntity_LargeRocketEngine(996, "gtpp.multimachine.rocketengine", "Rocketdyne F-1A Engine").getStackForm(1L)); - - - ItemList aDieselEngine = ItemUtils.getValueOfItemList("Machine_Multi_DieselEngine", ItemList.Machine_Multi_LargeBoiler_TungstenSteel); - - GT_ModHandler.addCraftingRecipe( - GregtechItemList.Controller_RocketEngine.get(1L), - CI.bitsd, - new Object[]{ - "PCP", "EME", "GWG", - 'M', aDieselEngine, - 'P', ItemList.Electric_Piston_IV, - 'E', ItemList.Field_Generator_EV, - 'C', OrePrefixes.circuit.get(Materials.Master), - 'W', OrePrefixes.cableGt08.get(Materials.Platinum), - 'G', ALLOY.MARAGING350.getGear(1)}); - - GT_ModHandler.addCraftingRecipe( - GregtechItemList.Casing_RocketEngine.get(1L), - CI.bitsd, - new Object[]{ - "PhP", "RFR", "PWP", - 'R', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), - 'F', ItemList.Casing_RobustTungstenSteel, - 'P', ALLOY.NITINOL_60.getGear(1)}); - - GregtechItemList.Rocket_Engine_EV.set(new GregtechMetaTileEntityRocketFuelGenerator(793, - "advancedgenerator.rocketFuel.tier.01", "Basic Rocket Engine", 4).getStackForm(1L)); - GregtechItemList.Rocket_Engine_IV.set(new GregtechMetaTileEntityRocketFuelGenerator(794, - "advancedgenerator.rocketFuel.tier.02", "Advanced Rocket Engine", 5).getStackForm(1L)); - GregtechItemList.Rocket_Engine_LuV.set(new GregtechMetaTileEntityRocketFuelGenerator(795, - "advancedgenerator.rocketFuel.tier.03", "Turbo Rocket Engine", 6).getStackForm(1L)); - if (!CORE.GTNH) { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_EV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), - ItemList.Electric_Piston_EV, Character.valueOf('E'), ItemList.Electric_Motor_EV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), - OrePrefixes.cableGt02.get(Materials.Aluminium), Character.valueOf('G'), - ALLOY.TANTALLOY_61.getGear(1)}); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_IV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), - ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Superconductor), - Character.valueOf('W'), OrePrefixes.cableGt02.get(Materials.Platinum), Character.valueOf('G'), - ALLOY.STELLITE.getGear(1)}); - } - if (CORE.GTNH) { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_EV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), - ItemList.Electric_Piston_EV, Character.valueOf('E'), ItemList.Electric_Motor_EV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), - OrePrefixes.cableGt02.get(Materials.Aluminium), Character.valueOf('G'), - ALLOY.TANTALLOY_61.getGear(1)}); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_IV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), - ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, - Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Master), - Character.valueOf('W'), OrePrefixes.cableGt02.get(Materials.Platinum), Character.valueOf('G'), - ALLOY.STELLITE.getGear(1)}); - } - final ItemStack INGREDIENT_1 = CI.electricPiston_LuV; - final ItemStack INGREDIENT_2 = CI.electricMotor_LuV; - if (!CORE.GTNH) { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_LuV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), - INGREDIENT_1, Character.valueOf('E'), INGREDIENT_2, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Infinite), Character.valueOf('W'), - OrePrefixes.cableGt02.get(Materials.Tungsten), Character.valueOf('G'), - ALLOY.ZERON_100.getGear(1)}); - } - if (CORE.GTNH) { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_LuV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), - INGREDIENT_1, Character.valueOf('E'), INGREDIENT_2, Character.valueOf('C'), - OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), - OrePrefixes.cableGt02.get(Materials.Tungsten), Character.valueOf('G'), - ALLOY.ZERON_100.getGear(1)}); - } - } -} - diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java deleted file mode 100644 index 124b5d114d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java +++ /dev/null @@ -1,118 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock; - -public class GregtechSafeBlock { - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Lockable Safe Blocks."); - if (CORE.ConfigSwitches.enableMachine_Safes) { - run1(); - } - } - - } - - private static void run1() { - - GregtechItemList.GT_Safe_ULV - .set(new GregtechMetaSafeBlock(780, "protection.playersafe.tier.00", "Ultra Low Voltage Player Safe", 0) - .getStackForm(1L)); - GregtechItemList.GT_Safe_LV - .set(new GregtechMetaSafeBlock(781, "protection.playersafe.tier.01", "Low Voltage Player Safe", 1) - .getStackForm(1L)); - GregtechItemList.GT_Safe_MV - .set(new GregtechMetaSafeBlock(782, "protection.playersafe.tier.02", "Medium Voltage Player Safe", 2) - .getStackForm(1L)); - GregtechItemList.GT_Safe_HV - .set(new GregtechMetaSafeBlock(783, "protection.playersafe.tier.03", "High Voltage Player Safe", 3) - .getStackForm(1L)); - GregtechItemList.GT_Safe_EV - .set(new GregtechMetaSafeBlock(784, "protection.playersafe.tier.04", "Extreme Voltage Player Safe", 4) - .getStackForm(1L)); - GregtechItemList.GT_Safe_IV - .set(new GregtechMetaSafeBlock(785, "protection.playersafe.tier.05", "Insane Voltage Player Safe", 5) - .getStackForm(1L)); - GregtechItemList.GT_Safe_LuV - .set(new GregtechMetaSafeBlock(786, "protection.playersafe.tier.06", "Ludicrous Voltage Player Safe", 6) - .getStackForm(1L)); - GregtechItemList.GT_Safe_ZPM - .set(new GregtechMetaSafeBlock(787, "protection.playersafe.tier.07", "ZPM Voltage Player Safe", 7) - .getStackForm(1L)); - GregtechItemList.GT_Safe_UV - .set(new GregtechMetaSafeBlock(788, "protection.playersafe.tier.08", "Ultimate Voltage Player Safe", 8) - .getStackForm(1L)); - GregtechItemList.GT_Safe_MAX - .set(new GregtechMetaSafeBlock(789, "protection.playersafe.tier.09", "MAX Voltage Player Safe", 9) - .getStackForm(1L)); - - // To-Do Change Recipes - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_ULV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Basic) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_LV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Good) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_MV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Good) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_HV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Advanced) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_EV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Elite) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_IV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Master) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_LuV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Master) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_ZPM.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Master) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_UV.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Master), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Superconductor) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_MAX.get(1L, new Object[0]), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_MAX, Character.valueOf('V'), - OrePrefixes.circuit.get(Materials.Master), Character.valueOf('C'), OreDictNames.craftingChest, - Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Infinite) }); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java deleted file mode 100644 index 6b38415db1..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java +++ /dev/null @@ -1,20 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_SemiFluidGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_LargeSemifluidGenerator; - -public class GregtechSemiFluidgenerators { - - public static void run(){ - GregtechItemList.Generator_SemiFluid_LV.set(new GT_MetaTileEntity_SemiFluidGenerator(837, "basicgenerator.semifluid.tier.01", - "Basic Semi-Fluid Generator", 1).getStackForm(1L)); - GregtechItemList.Generator_SemiFluid_MV.set(new GT_MetaTileEntity_SemiFluidGenerator(838, "basicgenerator.semifluid.tier.02", - "Advanced Semi-Fluid Generator", 2).getStackForm(1L)); - GregtechItemList.Generator_SemiFluid_HV.set(new GT_MetaTileEntity_SemiFluidGenerator(839, "basicgenerator.semifluid.tier.03", - "Turbo Semi-Fluid Generator", 3).getStackForm(1L)); - GregtechItemList.Controller_LargeSemifluidGenerator.set(new GregtechMetaTileEntity_LargeSemifluidGenerator(31026, "gtpp.multimachine.semifluidgenerator", "Large Semifluid Burner").getStackForm(1L)); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java deleted file mode 100644 index d2087b22f4..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java +++ /dev/null @@ -1,109 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GTPP_Recipe; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_BasicWasher; -import net.minecraftforge.fluids.FluidStack; - -public class GregtechSimpleWasher { - - public static void run() { - if (CORE.ConfigSwitches.enableMachine_SimpleWasher){ - generateDirtyDustRecipes(); - generateDirtyCrushedRecipes(); - // Register the Simple Washer Entity. - GregtechItemList.SimpleDustWasher_ULV - .set(new GregtechMetaTileEntity_BasicWasher(767, "simplewasher.01.tier.01", "Simple Washer I", 0) - .getStackForm(1L)); - - //People want them in higher tiers apparently - GregtechItemList.SimpleDustWasher_MV - .set(new GregtechMetaTileEntity_BasicWasher(31017, "simplewasher.01.tier.02", "Simple Washer II", 2) - .getStackForm(1L)); - GregtechItemList.SimpleDustWasher_EV - .set(new GregtechMetaTileEntity_BasicWasher(31018, "simplewasher.01.tier.03", "Simple Washer III", 4) - .getStackForm(1L)); - GregtechItemList.SimpleDustWasher_LuV - .set(new GregtechMetaTileEntity_BasicWasher(31019, "simplewasher.01.tier.04", "Simple Washer IV", 6) - .getStackForm(1L)); - GregtechItemList.SimpleDustWasher_UV - .set(new GregtechMetaTileEntity_BasicWasher(31020, "simplewasher.01.tier.05", "Simple Washer V", 8) - .getStackForm(1L)); - } - } - - private static boolean generateDirtyDustRecipes(){ - boolean disablePlat = CORE.GTNH; - int mRecipeCount = 0; - // Generate Recipe Map for the Dust Washer. - ItemStack dustClean; - ItemStack dustDirty; - for (Materials v : Materials.values()) { - if (disablePlat) { - if (v == Materials.Platinum || v == Materials.Osmium || v == Materials.Iridium || v == Materials.Palladium) { - continue; - } - } - - dustClean = GT_OreDictUnificator.get(OrePrefixes.dust, v, 1L); - dustDirty = GT_OreDictUnificator.get(OrePrefixes.dustImpure, v, 1L); - if (dustClean != null && dustDirty != null) { - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] { dustDirty }, - new ItemStack[] { dustClean }, - null, - new int[] {}, - new FluidStack[] { FluidUtils.getFluidStack("water", 100) }, - new FluidStack[] {}, - 5, - 8, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.addRecipe(aRecipe); - } - } - - if (GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.mRecipeList.size() > mRecipeCount){ - return true; - } - return false; - } - - private static boolean generateDirtyCrushedRecipes(){ - int mRecipeCount = GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.mRecipeList.size(); - // Generate Recipe Map for the Dust Washer. - ItemStack crushedClean; - ItemStack crushedDirty; - for (Materials v : Materials.values()) { - crushedClean = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, v, 1L); - crushedDirty = GT_OreDictUnificator.get(OrePrefixes.crushed, v, 1L); - if (crushedClean != null && crushedDirty != null) { - GTPP_Recipe aRecipe = new GTPP_Recipe( - false, - new ItemStack[] { crushedDirty }, - new ItemStack[] { crushedClean }, - null, - new int[] {}, - new FluidStack[] { FluidUtils.getFluidStack("water", 100) }, - new FluidStack[] {}, - 5, - 8, - 0); - GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.addRecipe(aRecipe); - } - } - - if (GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.mRecipeList.size() > mRecipeCount){ - return true; - } - return false; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java deleted file mode 100644 index 45f78d660b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java +++ /dev/null @@ -1,49 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.ConfigSwitches; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntitySolarGenerator; - -public class GregtechSolarGenerators { - public static void run() { - if (LoadedMods.Gregtech && ConfigSwitches.enableMachine_SolarGenerators) { - Logger.INFO("Gregtech5u Content | Registering Solar Generator Blocks."); - if (CORE.ConfigSwitches.enableMachine_SolarGenerators) { - run1(); - } - } - - } - - private static void run1() { - - GregtechItemList.GT_Solar_ULV.set(new GregtechMetaTileEntitySolarGenerator(800, "sunabsorber.tier.00", - "Ultra Low Voltage Solar Generator", 0).getStackForm(1L)); - GregtechItemList.GT_Solar_LV.set( - new GregtechMetaTileEntitySolarGenerator(801, "sunabsorber.tier.01", "Low Voltage Solar Generator", 1) - .getStackForm(1L)); - GregtechItemList.GT_Solar_MV.set(new GregtechMetaTileEntitySolarGenerator(802, "sunabsorber.tier.02", - "Medium Voltage Solar Generator", 2).getStackForm(1L)); - GregtechItemList.GT_Solar_HV.set( - new GregtechMetaTileEntitySolarGenerator(803, "sunabsorber.tier.03", "High Voltage Solar Generator", 3) - .getStackForm(1L)); - GregtechItemList.GT_Solar_EV.set(new GregtechMetaTileEntitySolarGenerator(804, "sunabsorber.tier.04", - "Extreme Voltage Solar Generator", 4).getStackForm(1L)); - GregtechItemList.GT_Solar_IV.set(new GregtechMetaTileEntitySolarGenerator(805, "sunabsorber.tier.05", - "Insane Voltage Solar Generator", 5).getStackForm(1L)); - GregtechItemList.GT_Solar_LuV.set(new GregtechMetaTileEntitySolarGenerator(806, "sunabsorber.tier.06", - "Ludicrous Voltage Solar Generator", 6).getStackForm(1L)); - GregtechItemList.GT_Solar_ZPM.set( - new GregtechMetaTileEntitySolarGenerator(807, "sunabsorber.tier.07", "ZPM Voltage Solar Generator", 7) - .getStackForm(1L)); - GregtechItemList.GT_Solar_UV.set(new GregtechMetaTileEntitySolarGenerator(808, "sunabsorber.tier.08", - "Ultimate Voltage Solar Generator", 8).getStackForm(1L)); - GregtechItemList.GT_Solar_MAX.set( - new GregtechMetaTileEntitySolarGenerator(809, "sunabsorber.tier.09", "MAX Voltage Solar Generator", 9) - .getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java deleted file mode 100644 index d7f8f7f4d5..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java +++ /dev/null @@ -1,32 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_SolarTower; -import gtPlusPlus.xmod.gregtech.common.tileentities.misc.TileEntitySolarHeater; - -public class GregtechSolarTower { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Solar Tower."); - run1(); - } - - } - - private static void run1() { - // Solar Tower - GregtechItemList.Industrial_Solar_Tower.set(new GregtechMetaTileEntity_SolarTower(863, "solartower.controller.tier.single", "Solar Tower").getStackForm(1L)); - GregtechItemList.Solar_Tower_Reflector.set( - new TileEntitySolarHeater( - 864, - "solarreflector.simple.single", - "Solar Reflector", - 8, - "Part of the Clean Green energy movement", - 0).getStackForm(1L)); - - } -}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java deleted file mode 100644 index 60e6b31936..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaCondensor; - -public class GregtechSteamCondenser { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Steam Condensor."); - if (CORE.ConfigSwitches.enableMachine_SteamConverter) { - run1(); - } - } - - } - - private static void run1() { - // Steam Condensors - GregtechItemList.Condensor_MAX.set( - new GregtechMetaCondensor(769, "steamcondensor.01.tier.single", "Steam Condensor").getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java deleted file mode 100644 index add0400d87..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam.GregtechMetaTileEntity_SteamMacerator; - -public class GregtechSteamMultis { - - public static void run(){ - - Logger.INFO("Gregtech5u Content | Registering Steam Multiblocks."); - - GregtechItemList.Controller_SteamMaceratorMulti.set(new GregtechMetaTileEntity_SteamMacerator(31041, "gtpp.multimachine.steam.macerator", "Steam Grinder").getStackForm(1L)); - - GregtechItemList.Hatch_Input_Bus_Steam.set(new GT_MetaTileEntity_Hatch_Steam_BusInput(31046, "hatch.input_bus.tier.steam", "Input Bus (Steam)", 0).getStackForm(1L)); - GregtechItemList.Hatch_Output_Bus_Steam.set(new GT_MetaTileEntity_Hatch_Steam_BusOutput(31047, "hatch.output_bus.tier.steam", "Output Bus (Steam)", 0).getStackForm(1L)); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java deleted file mode 100644 index 5027e2d6e8..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java +++ /dev/null @@ -1,73 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import static gtPlusPlus.core.recipe.common.CI.bitsd; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_ConnectableCrate; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; - -public class GregtechSuperChests { - - public static void run() { - int mId = 946; - - String aSuffix = ""; - if (CORE.GTNH) { - aSuffix = " [Disabled]"; - } - - GregtechItemList.Super_Chest_LV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.01", "Super Chest I"+aSuffix, 1)).getStackForm(1L)); - GregtechItemList.Super_Chest_MV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.02", "Super Chest II"+aSuffix, 2)).getStackForm(1L)); - GregtechItemList.Super_Chest_HV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.03", "Super Chest III"+aSuffix, 3)).getStackForm(1L)); - GregtechItemList.Super_Chest_EV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.04", "Super Chest IV"+aSuffix, 4)).getStackForm(1L)); - GregtechItemList.Super_Chest_IV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.05", "Super Chest V"+aSuffix, 5)).getStackForm(1L)); - - // Do not add Recipes for GTNH, hide them from NEI instead. - if (CORE.GTNH) { - ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_LV.get(1L)); - ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_MV.get(1L)); - ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_HV.get(1L)); - ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_EV.get(1L)); - ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_IV.get(1L)); - } - else { - GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_LV.get(1L, new Object[0]), bitsd, - new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('G'), - ItemList.Automation_ChestBuffer_LV, Character.valueOf('D'), - OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('P'), - OrePrefixes.plate.get(Materials.Invar)}); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_MV.get(1L, new Object[0]), bitsd, - new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('G'), - ItemList.Automation_ChestBuffer_MV, Character.valueOf('D'), OrePrefixes.circuit.get(Materials.Good), - Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium)}); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_HV.get(1L, new Object[0]), bitsd, - new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('G'), - ItemList.Automation_ChestBuffer_HV, Character.valueOf('D'), OrePrefixes.circuit.get(Materials.Advanced), - Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel)}); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_EV.get(1L, new Object[0]), bitsd, - new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('G'), - ItemList.Automation_ChestBuffer_EV, Character.valueOf('D'), OrePrefixes.circuit.get(Materials.Data), - Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium)}); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_IV.get(1L, new Object[0]), bitsd, - new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('G'), - ItemList.Automation_ChestBuffer_IV, Character.valueOf('D'), - OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('P'), - OrePrefixes.plate.get(Materials.Tungsten)}); - } - - //Test Thing - GregtechItemList.CrateStorage.set((new GT_MetaTileEntity_ConnectableCrate(GT_MetaTileEntity_ConnectableCrate.mCrateID, "crate.tier.01", "Interconnecting Storage Crate", 0)).getStackForm(1L)); - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java deleted file mode 100644 index 1376f4313d..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java +++ /dev/null @@ -1,19 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -public class GregtechSuperConductionPoint { - - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - //Utils.LOG_INFO("Gregtech5u Content | Registering Super Conductor Input Node."); - run1(); - } - - } - - private static void run1() { - // Steam Condensors - //GregtechItemList.SuperConductorInputNode.set(new GregtechMetaTileEntitySuperCondensor(811, - // "superconductor.01.input.single", "Power Phase Shifting Station", 8).getStackForm(1L)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java deleted file mode 100644 index 1c5181130b..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java +++ /dev/null @@ -1,17 +0,0 @@ -/* -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc.GregtechMTE_TeslaTower; - -public class GregtechTeslaTower { - - public static void run() { - Logger.INFO("Gregtech5u Content | Registering Tesla Tower."); - GregtechItemList.TelsaTower.set(new GregtechMTE_TeslaTower(984, "multimachine.telsatower", "Tesla's Last Testament").getStackForm(1)); - - } - -} -*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java deleted file mode 100644 index 398d2caf01..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionCreator; - -public class GregtechThaumcraftDevices { - - public static void run() { - if (LoadedMods.Gregtech && LoadedMods.Thaumcraft) { - Logger.INFO("Gregtech5u Content | Registering Thaumcraft content."); - run1(); - } - } - - private static void run1() { - //956-960 - GregtechItemList.Thaumcraft_Researcher.set(new GregtechMetaPollutionCreator(956, "thaumcraft.gtpp.machine.01", - "Arcane Researcher", 5, "Thinking for you.", 0).getStackForm(1L)); - - - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java deleted file mode 100644 index 23c9f7e666..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java +++ /dev/null @@ -1,136 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.ItemList; - -import gregtech.api.util.GT_Recipe; -import gregtech.common.tileentities.automation.GT_MetaTileEntity_SuperBuffer; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative.GT_MetaTileEntity_InfiniteItemHolder; -import net.minecraft.item.ItemStack; - -public class GregtechThreadedBuffers { - - public static void run() { - run2(); - } - - private static void run2() { - - GregtechItemList.Infinite_Item_Chest.set((new GT_MetaTileEntity_InfiniteItemHolder(31010, "infinite.chest.tier.01", "Infinite Item Chest", 1)).getStackForm(1L)); - - /* - * This file used to contain registration and recipes for GT++ threaded super buffers. Those have now been - * deprecated and replaced by the original GT super buffers. - * - * To avoid breaking existing bases, we've assigned the threaded super buffer metadata IDs to a copy of the GT - * super buffers, with a deprecation notice attached. We've also provided disassembler recipes that are the - * reverse of the original crafting recipes, allowing players to reclaim their original materials as well as - * convert the deprecated threaded super buffer metadata ID item back to the original GT super buffer metadata - * ID item. - */ - - final String deprecationNotice = "**DEPRECATED - Drop in disassembler!** "; - GregtechItemList.Automation_Threaded_SuperBuffer_ULV.set((new GT_MetaTileEntity_SuperBuffer(31000, "automation.superbuffer.tier.00.deprecated", deprecationNotice + "Ultra Low Voltage Super Buffer", 0)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_LV.set((new GT_MetaTileEntity_SuperBuffer(31001, "automation.superbuffer.tier.01.deprecated", deprecationNotice + "Low Voltage Super Buffer", 1)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_MV.set((new GT_MetaTileEntity_SuperBuffer(31002, "automation.superbuffer.tier.02.deprecated", deprecationNotice + "Medium Voltage Super Buffer", 2)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_HV.set((new GT_MetaTileEntity_SuperBuffer(31003, "automation.superbuffer.tier.03.deprecated", deprecationNotice + "High Voltage Super Buffer", 3)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_EV.set((new GT_MetaTileEntity_SuperBuffer(31004, "automation.superbuffer.tier.04.deprecated", deprecationNotice + "Extreme Voltage Super Buffer", 4)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_IV.set((new GT_MetaTileEntity_SuperBuffer(31005, "automation.superbuffer.tier.05.deprecated", deprecationNotice + "Insane Voltage Super Buffer", 5)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_LuV.set((new GT_MetaTileEntity_SuperBuffer(31006, "automation.superbuffer.tier.06.deprecated", deprecationNotice + "Ludicrous Voltage Super Buffer", 6)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_ZPM.set((new GT_MetaTileEntity_SuperBuffer(31007, "automation.superbuffer.tier.07.deprecated", deprecationNotice + "ZPM Voltage Super Buffer", 7)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_UV.set((new GT_MetaTileEntity_SuperBuffer(31008, "automation.superbuffer.tier.08.deprecated", deprecationNotice + "Ultimate Voltage Super Buffer", 8)).getStackForm(1L)); - GregtechItemList.Automation_Threaded_SuperBuffer_MAX.set((new GT_MetaTileEntity_SuperBuffer(31009, "automation.superbuffer.tier.09.deprecated", deprecationNotice + "Highly Ultimate Voltage Super Buffer", 9)).getStackForm(1L)); - - // These recipes are all 1 sec @ 32 EU/t - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_ULV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_ULV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_LV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_LV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_LV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_LV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_MV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_MV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_MV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_HV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_HV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_HV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_EV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_EV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_EV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_IV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_IV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_IV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_LuV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_LuV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_LuV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_ZPM.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_ZPM.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_UV.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_UV.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - ItemList.Conveyor_Module_UV.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( - true, - new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_MAX.get(1L, new Object[0]) }, - new ItemStack[]{ - ItemList.Automation_SuperBuffer_MAX.get(1L, new Object[0]), - ItemList.Tool_DataOrb.get(1L, new Object[0]), - GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), - }, - null, null, null, 20, 32, -100); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java deleted file mode 100644 index bbfd568e54..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntityChunkLoader; - -public class GregtechTieredChunkloaders { - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Chunk Loaders."); - run1(); - } - } - - private static void run1() { - int ID = 943; - GregtechItemList.GT_Chunkloader_HV - .set(new GregtechMetaTileEntityChunkLoader(ID++, "chunkloader.tier.01", "Chunkloader MK I", 3) - .getStackForm(1L)); - GregtechItemList.GT_Chunkloader_IV - .set(new GregtechMetaTileEntityChunkLoader(ID++, "chunkloader.tier.02", "Chunkloader MK II", 5) - .getStackForm(1L)); - GregtechItemList.GT_Chunkloader_ZPM - .set(new GregtechMetaTileEntityChunkLoader(ID++, "chunkloader.tier.03", "Chunkloader MK III", 7) - .getStackForm(1L)); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java deleted file mode 100644 index 2a4a2b9f85..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java +++ /dev/null @@ -1,58 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredTank; - -public class GregtechTieredFluidTanks { - public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Portable Fluid Tanks."); - if (CORE.ConfigSwitches.enableMachine_FluidTanks) { - run1(); - } - } - - } - - private static void run1() { - int ID = 817; - if (CORE.GTNH) { - Logger.INFO("Only loading ULV-IV tier tanks for New Horizons Modpack."); - } - GregtechItemList.GT_FluidTank_ULV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.00", "Ultra Low Voltage Fluid Tank", 0) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_LV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.01", "Low Voltage Fluid Tank", 1) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_MV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.02", "Medium Voltage Fluid Tank", 2) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_HV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.03", "High Voltage Fluid Tank", 3) - .getStackForm(1L)); - if (!CORE.GTNH) { - GregtechItemList.GT_FluidTank_EV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.04", "Extreme Voltage Fluid Tank", 4) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_IV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.05", "Insane Voltage Fluid Tank", 5) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_LuV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.06", "Ludicrous Voltage Fluid Tank", 6) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_ZPM - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.07", "ZPM Voltage Fluid Tank", 7) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_UV - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.08", "Ultimate Voltage Fluid Tank", 8) - .getStackForm(1L)); - GregtechItemList.GT_FluidTank_MAX - .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.09", "MAX Voltage Fluid Tank", 9) - .getStackForm(1L)); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java deleted file mode 100644 index 07139da024..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaTreeFarmerStructural; - -public class GregtechTreeFarmerTE { - public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Tree Farmer Structural Block."); - if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer) { - run1(); - } - } - } - - private static void run1() { - GregtechItemList.TreeFarmer_Structural.set( - new GregtechMetaTreeFarmerStructural(752, "treefarmer.structural", "Farm Keeper", 0).getStackForm(1L)); - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java deleted file mode 100644 index ca90724400..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java +++ /dev/null @@ -1,48 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaWirelessCharger; - -public class GregtechWirelessChargers { - - - public static void run(){ - - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Wireless Chargers."); - - - long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; - int mID = 890; - - Utils.registerEvent(new ChargingHelper()); - - GregtechItemList.Charger_LV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.01.tier.single", - "Wireless Charger MK I", 1, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_MV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.02.tier.single", - "Wireless Charger MK II", 2, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_HV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.03.tier.single", - "Wireless Charger MK III", 3, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_EV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.04.tier.single", - "Wireless Charger MK IV", 4, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_IV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.05.tier.single", - "Wireless Charger MK V", 5, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_LuV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.06.tier.single", - "Wireless Charger MK VI", 6, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_ZPM.set(new GregtechMetaWirelessCharger(mID++, "wificharger.07.tier.single", - "Wireless Charger MK VII", 7, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_UV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.08.tier.single", - "Wireless Charger MK VIII", 8, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - GregtechItemList.Charger_MAX.set(new GregtechMetaWirelessCharger(mID++, "wificharger.09.tier.single", - "Wireless Charger MK IX", 9, "Hopefully won't give you cancer.", 0).getStackForm(1L)); - - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java deleted file mode 100644 index d5b95a61bf..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java +++ /dev/null @@ -1,99 +0,0 @@ -package gtPlusPlus.xmod.gregtech.registration.gregtech; - -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator; - -public class NewHorizonsAccelerator { - - public static void run() { - if (LoadedMods.Gregtech && !CORE.GTNH) { - Logger.INFO("New Horizons Content | Registering World Accelerators."); - if (CORE.ConfigSwitches.enableMachine_WorldAccelerators) { - run1(); - } - } - - } - - private static void run1() { - GregtechItemList.AcceleratorLV.set(new GT_MetaTileEntity_WorldAccelerator(841, - "basicmachine.accelerator.tier.01", "Basic World Accelerator", 1).getStackForm(1L)); - GregtechItemList.AcceleratorMV.set(new GT_MetaTileEntity_WorldAccelerator(842, - "basicmachine.accelerator.tier.02", "Advanced World Accelerator", 2).getStackForm(1L)); - GregtechItemList.AcceleratorHV.set(new GT_MetaTileEntity_WorldAccelerator(843, - "basicmachine.accelerator.tier.03", "Advanced World Accelerator II", 3).getStackForm(1L)); - GregtechItemList.AcceleratorEV.set(new GT_MetaTileEntity_WorldAccelerator(844, - "basicmachine.accelerator.tier.04", "Advanced World Accelerator III", 4).getStackForm(1L)); - GregtechItemList.AcceleratorIV.set(new GT_MetaTileEntity_WorldAccelerator(845, - "basicmachine.accelerator.tier.05", "Advanced World Accelerator IV", 5).getStackForm(1L)); - GregtechItemList.AcceleratorLuV.set(new GT_MetaTileEntity_WorldAccelerator(846, - "basicmachine.accelerator.tier.06", "Elite World Accelerator", 6).getStackForm(1L)); - GregtechItemList.AcceleratorZPM.set(new GT_MetaTileEntity_WorldAccelerator(847, - "basicmachine.accelerator.tier.07", "Elite World Accelerator II", 7).getStackForm(1L)); - GregtechItemList.AcceleratorUV.set(new GT_MetaTileEntity_WorldAccelerator(848, - "basicmachine.accelerator.tier.08", "Ultimate Time Anomaly", 8).getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorLV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_LV, 'M', ItemList.Electric_Motor_LV, 'P', - ItemList.Electric_Pump_LV, 'B', ItemList.Hull_LV, 'C', ItemList.Conveyor_Module_LV, 'I', - ItemList.Electric_Piston_LV }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorMV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_MV, 'M', ItemList.Electric_Motor_MV, 'P', - ItemList.Electric_Pump_MV, 'B', ItemList.Hull_MV, 'C', ItemList.Conveyor_Module_MV, 'I', - ItemList.Electric_Piston_MV }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorHV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_HV, 'M', ItemList.Electric_Motor_HV, 'P', - ItemList.Electric_Pump_HV, 'B', ItemList.Hull_HV, 'C', ItemList.Conveyor_Module_HV, 'I', - ItemList.Electric_Piston_HV }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorEV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_EV, 'M', ItemList.Electric_Motor_EV, 'P', - ItemList.Electric_Pump_EV, 'B', ItemList.Hull_EV, 'C', ItemList.Conveyor_Module_EV, 'I', - ItemList.Electric_Piston_EV }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorIV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_IV, 'M', ItemList.Electric_Motor_IV, 'P', - ItemList.Electric_Pump_IV, 'B', ItemList.Hull_IV, 'C', ItemList.Conveyor_Module_IV, 'I', - ItemList.Electric_Piston_IV }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorLuV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_LuV, 'M', ItemList.Electric_Motor_LuV, 'P', - ItemList.Electric_Pump_LuV, 'B', ItemList.Hull_LuV, 'C', ItemList.Conveyor_Module_LuV, 'I', - ItemList.Electric_Piston_LuV }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorZPM.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_ZPM, 'M', ItemList.Electric_Motor_ZPM, 'P', - ItemList.Electric_Pump_ZPM, 'B', ItemList.Hull_ZPM, 'C', ItemList.Conveyor_Module_ZPM, 'I', - ItemList.Electric_Piston_ZPM }); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorUV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_UV, 'M', ItemList.Electric_Motor_UV, 'P', - ItemList.Electric_Pump_UV, 'B', ItemList.Hull_UV, 'C', ItemList.Conveyor_Module_UV, 'I', - ItemList.Electric_Piston_UV }); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java b/src/Java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java deleted file mode 100644 index d2f85e5daa..0000000000 --- a/src/Java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java +++ /dev/null @@ -1,26 +0,0 @@ -package gtPlusPlus.xmod.growthcraft; - -import gtPlusPlus.core.lib.LoadedMods; - -public class HANDLER_GC { - - - //Run me during Pre-Init - public static void preInit(){ - if (LoadedMods.Growthcraft){ - //Register_Booze.preInit(); - } - } - - public static void init(){ - if (LoadedMods.Growthcraft){ - } - } - - public static void postInit(){ - if (LoadedMods.Growthcraft){ - - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java deleted file mode 100644 index 43347949b6..0000000000 --- a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java +++ /dev/null @@ -1,232 +0,0 @@ -package gtPlusPlus.xmod.growthcraft.fishtrap; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.ItemStack; - -public class FishTrapHandler { - - private static final String[] fishTypes = {"fish", "junk", "treasure"}; - private static Object mFishingRegistry; - private static Growthcraft_Old mHandler; - - public static Object getFishingRegistry(){ - if (mFishingRegistry != null){ - return mFishingRegistry; - } - else { - return setFishTrapRegistry(); - } - } - - private final static Object setFishTrapRegistry(){ - Class mFishingRegistryClass; - try { - mFishingRegistryClass = ReflectionUtils.getClass("growthcraft.api.fishtrap.FishTrapRegistry"); - final Method mFishingRegistryMethod = mFishingRegistryClass.getDeclaredMethod("getInstance"); - mFishingRegistry = mFishingRegistryMethod.invoke(null); - if (mFishingRegistry != null){ - return mFishingRegistry; - } - } - catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - return null; - } - - protected static void addFish(final String lootType, final ItemStack lootStack, final int lootChance){ - - if (mFishingRegistry == null){ - setFishTrapRegistry(); - } - if (mHandler == null){ - mHandler = new Growthcraft_Old(); - } - - final String GCVersion = LoadedMods.getModVersion("Growthcraft"); - final String[] versionString = GCVersion.split("//."); - - if (LoadedMods.getModVersion("Growthcraft").contains("2.3.1") || versionString[1].equals("3")){ - if (lootType.equals(fishTypes[0])){ - mHandler.addTrapFish(lootStack, lootChance); - Logger.INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps."); - } - else if (lootType.equals(fishTypes[1])){ - mHandler.addTrapJunk(lootStack, lootChance); - Logger.INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps."); - } - else if (lootType.equals(fishTypes[2])){ - mHandler.addTrapTreasure(lootStack, lootChance); - Logger.INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps."); - } - else { - return; - } - }/* - else if (LoadedMods.getModVersion("Growthcraft").contains("2.7.2")){ - if (lootType.equals(fishTypes[0])){ - Growthcraft_New.addTrapFish(lootStack, lootChance); - Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps."); - } - else if (lootType.equals(fishTypes[1])){ - Growthcraft_New.addTrapJunk(lootStack, lootChance); - Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps."); - } - else if (lootType.equals(fishTypes[2])){ - Growthcraft_New.addTrapTreasure(lootStack, lootChance); - Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps."); - } - else { - return; - } - }*/ - - else { - Logger.INFO("Extra Fish loot for Growthcraft Fishtraps disabled. Found V."+LoadedMods.getModVersion("Growthcraft")); - } - - } - //FishTrapHandler.pamsHarvestCraftCompat(); - final static String prefix = "food"; - final static String suffix = "raw"; - final static String seaweed = "cropSeaweed"; - final static String greenheartFish = "foodGreenheartfish"; - private static final String[] harvestcraftFish = { - "Anchovy", "Bass", "Carp", "Catfish", "Charr", "Clam", "Crab", "Crayfish", "Eel", "Frog", "Grouper", "Herring", - "Jellyfish", "Mudfish", "Octopus", "Perch", "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walley"}; - public static void pamsHarvestCraftCompat(){ - for (int i = 0; i < harvestcraftFish.length; i++){ - final String itemName = prefix+harvestcraftFish[i]+suffix; - final int lootChance = getLootChance(harvestcraftFish[i]); - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken(itemName, 1) != null){ - //addFish("fish", ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1), lootChance); - addGregtechMaceratorRecipe(ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1)); - addGregtechCentrifugeRecipe(ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1)); - addGregtechFluidRecipe(ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1)); - } - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken(greenheartFish, 1) != null){ - //addFish("fish", ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1), getLootChance(greenheartFish)); - addGregtechMaceratorRecipe(ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1)); - addGregtechCentrifugeRecipe(ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1)); - addGregtechFluidRecipe(ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1)); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken(seaweed, 1) != null){ - //addFish("junk", ItemUtils.getItemStackOfAmountFromOreDict(seaweed, 1), getLootChance(seaweed)); - } - } - - private static int getLootChance(final String name){ - if (name.equals(harvestcraftFish[0])){ - return 20; - } - else if (name.equals(harvestcraftFish[1])){ - return 10; - } - else if (name.equals(harvestcraftFish[2])){ - return 15; - } - else if (name.equals(harvestcraftFish[3])){ - return 55; - } - else if (name.equals(harvestcraftFish[4])){ - return 5; - } - else if (name.equals(harvestcraftFish[5])){ - return 8; - } - else if (name.equals(harvestcraftFish[6])){ - return 11; - } - else if (name.equals(harvestcraftFish[7])){ - return 11; - } - else if (name.equals(harvestcraftFish[8])){ - return 15; - } - else if (name.equals(harvestcraftFish[9])){ - return 1; - } - else if (name.equals(harvestcraftFish[10])){ - return 5; - } - else if (name.equals(harvestcraftFish[11])){ - return 10; - } - else if (name.equals(harvestcraftFish[12])){ - return 25; - } - else if (name.equals(harvestcraftFish[13])){ - return 15; - } - else if (name.equals(harvestcraftFish[14])){ - return 20; - } //"Perch", "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walleye"}; - else if (name.equals(harvestcraftFish[15])){ - return 22; - } - else if (name.equals(harvestcraftFish[16])){ - return 10; - } - else if (name.equals(harvestcraftFish[17])){ - return 35; - } - else if (name.equals(harvestcraftFish[18])){ - return 3; - } - else if (name.equals(harvestcraftFish[19])){ - return 20; - } - else if (name.equals(harvestcraftFish[20])){ - return 4; - } - else if (name.equals(harvestcraftFish[21])){ - return 40; - } - else if (name.equals(harvestcraftFish[22])){ - return 30; - } - else if (name.equals(harvestcraftFish[23])){ - return 5; - } - else if (name.equals(harvestcraftFish[24])){ - return 8; - } - else { - return 25; - } - } - - private static void addGregtechCentrifugeRecipe(final ItemStack input){ - if (LoadedMods.Gregtech){ - GT_Values.RA.addCentrifugeRecipe(input, null, null, FluidUtils.getFluidStack("methane", 96), null, null, null, null, null, null, null, 19*20, 5); - } - } - - private static void addGregtechMaceratorRecipe(final ItemStack input){ - if (LoadedMods.Gregtech){ - GT_ModHandler.addPulverisationRecipe(input, ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustTinyBone", 1), 0); - } - } - - private static void addGregtechFluidRecipe(final ItemStack input){ - if (LoadedMods.Gregtech){ - if (CORE.GTNH) { - CORE.RA.addFluidExtractionRecipe(input, FluidUtils.getFluidStack("fishoil", 50), 16, 4); - } - else { - CORE.RA.addFluidExtractionRecipe(input, FluidUtils.getFluidStack("fishoil", 4), 16, 4); //4eu/t total eu used = 64 so time = 64/4 - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java deleted file mode 100644 index 41fec179b5..0000000000 --- a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.xmod.growthcraft.fishtrap; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.minecraft.item.ItemStack; - -public class Growthcraft_New { - - Method addTrapJunk; - Method addTrapTreasure; - Method addTrapFish; - Object FishTrapRegistryO; - - public Growthcraft_New(){ - setFishTrapRegistry(); - } - - void setFishTrapRegistry(){ - try { - Class FishTrapRegistryClass = Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry"); - Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); - if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())){ - addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry); - addTrapTreasure = FishTrapRegistryClass.getDeclaredMethod("addTrapTreasure", FishTrapEntry); - addTrapFish = FishTrapRegistryClass.getDeclaredMethod("addTrapFish", FishTrapEntry); - FishTrapRegistryO = FishTrapHandler.getFishingRegistry(); - } - } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException e) { - e.printStackTrace(); - } - } - - private Object createFishTrapEntry(ItemStack loot, int chance){ - try { - Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); - Object o = FishTrapEntry.getConstructor(ItemStack.class, int.class); - if (FishTrapEntry != null){ - Constructor[] constructors = FishTrapEntry.getDeclaredConstructors(); - constructors[0].setAccessible(true); - Object x = constructors[0].newInstance(loot, chance); - if (x != null){ - return x; - } - } - } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - - return null; - } - - private boolean invoke(Method m, ItemStack o, int p){ - try { - Object I = createFishTrapEntry(o, p); - m.invoke(FishTrapRegistryO, I); - return true; - } - catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - return false; - } - - public void addTrapJunk(final ItemStack loot, final int lootChance){ - //FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance)); - if (addTrapJunk != null){ - invoke(addTrapJunk, loot, lootChance); - } - - } - - public void addTrapTreasure(final ItemStack loot, final int lootChance){ - //FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance)); - if (addTrapTreasure != null){ - invoke(addTrapTreasure, loot, lootChance); - } - } - - public void addTrapFish(final ItemStack loot, final int lootChance){ - //FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance)); - if (addTrapFish != null){ - invoke(addTrapFish, loot, lootChance); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java deleted file mode 100644 index ab11c062e0..0000000000 --- a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.xmod.growthcraft.fishtrap; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.minecraft.item.ItemStack; - -public class Growthcraft_Old { - - Method addTrapJunk; - Method addTrapTreasure; - Method addTrapFish; - Object FishTrapRegistryO; - - public Growthcraft_Old(){ - setFishTrapRegistry(); - } - - void setFishTrapRegistry(){ - try { - Class FishTrapRegistryClass = Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry"); - Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); - if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())){ - addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry); - addTrapTreasure = FishTrapRegistryClass.getDeclaredMethod("addTrapTreasure", FishTrapEntry); - addTrapFish = FishTrapRegistryClass.getDeclaredMethod("addTrapFish", FishTrapEntry); - FishTrapRegistryO = FishTrapHandler.getFishingRegistry(); - } - } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException e) { - e.printStackTrace(); - } - } - - private Object createFishTrapEntry(ItemStack loot, int chance){ - try { - Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); - Object o = FishTrapEntry.getConstructor(ItemStack.class, int.class); - if (FishTrapEntry != null){ - Constructor[] constructors = FishTrapEntry.getDeclaredConstructors(); - constructors[0].setAccessible(true); - Object x = constructors[0].newInstance(loot, chance); - if (x != null){ - return x; - } - } - } - catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - - return null; - } - - private boolean invoke(Method m, ItemStack o, int p){ - try { - Object I = createFishTrapEntry(o, p); - m.invoke(FishTrapRegistryO, I); - return true; - } - catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} - return false; - } - - public void addTrapJunk(final ItemStack loot, final int lootChance){ - //FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance)); - if (addTrapJunk != null){ - invoke(addTrapJunk, loot, lootChance); - } - - } - - public void addTrapTreasure(final ItemStack loot, final int lootChance){ - //FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance)); - if (addTrapTreasure != null){ - invoke(addTrapTreasure, loot, lootChance); - } - } - - public void addTrapFish(final ItemStack loot, final int lootChance){ - //FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance)); - if (addTrapFish != null){ - invoke(addTrapFish, loot, lootChance); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/CustomInternalName.java b/src/Java/gtPlusPlus/xmod/ic2/CustomInternalName.java deleted file mode 100644 index a349d7f86e..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/CustomInternalName.java +++ /dev/null @@ -1,22 +0,0 @@ -package gtPlusPlus.xmod.ic2; - -import ic2.core.init.InternalName; -import net.minecraftforge.common.util.EnumHelper; - -public class CustomInternalName { - - public static InternalName aHazmatHelmetEx; - public static InternalName aHazmatChestEx; - public static InternalName aHazmatLegsEx; - public static InternalName aHazmatBootsEx; - - public static void init() { - aHazmatHelmetEx = EnumHelper.addEnum(InternalName.class, "itemArmorHazmatHelmetEx", new Class[] {}, new Object[] {}); - aHazmatChestEx = EnumHelper.addEnum(InternalName.class, "itemArmorHazmatChestplateEx", new Class[] {}, new Object[] {}); - aHazmatLegsEx = EnumHelper.addEnum(InternalName.class, "itemArmorHazmatLeggingsEx", new Class[] {}, new Object[] {}); - aHazmatBootsEx = EnumHelper.addEnum(InternalName.class, "itemArmorRubBootsEx", new Class[] {}, new Object[] {}); - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java b/src/Java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java deleted file mode 100644 index bb97132ab4..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.xmod.ic2; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.ic2.item.IC2_Items; -import gtPlusPlus.xmod.ic2.recipe.RECIPE_IC2; - -public class HANDLER_IC2{ - - public static void preInit() { - if (LoadedMods.IndustrialCraft2){ - IC2_Items.register(); - //new BlockRTG(InternalName.beer); - } - } - - public static void init() { - if (LoadedMods.IndustrialCraft2){ - - } - } - - public static void postInit() { - if (LoadedMods.IndustrialCraft2){ - RECIPE_IC2.initRecipes(); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java deleted file mode 100644 index 2a1b5ab44d..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java +++ /dev/null @@ -1,208 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.RTGGenerator; - -import java.util.List; -import java.util.Random; - -import org.apache.commons.lang3.mutable.MutableObject; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.xmod.ic2.block.kieticgenerator.tileentity.TileEntityKineticWindGenerator; -import gtPlusPlus.xmod.ic2.item.IC2_Items; -import gtPlusPlus.xmod.ic2.item.ItemGenerators; -import ic2.core.IC2; -import ic2.core.Ic2Items; -import ic2.core.block.BlockMultiID; -import ic2.core.block.TileEntityBlock; -import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric; -import ic2.core.init.InternalName; - -public class BlockRTG -extends BlockMultiID -{ - public BlockRTG(final InternalName internalName1) - { - super(internalName1, Material.iron, ItemGenerators.class); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setHardness(3.0F); - this.setStepSound(soundTypeMetal); - - IC2_Items.blockRTG = new ItemStack(this, 1, 0); - IC2_Items.blockKineticGenerator = new ItemStack(this, 1, 1); - - GameRegistry.registerTileEntity(TileEntityRTG.class, "RTG Mach II"); - GameRegistry.registerTileEntity(TileEntityKineticWindGenerator.class, "Wind Ripper Mach II"); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void getSubBlocks(final Item j, final CreativeTabs tabs, final List itemList) { - final Item item = Item.getItemFromBlock(this); - if (!item.getHasSubtypes()) { - itemList.add(new ItemStack(this)); - } else { - for (int i = 0; i < 16; i++) - { - final ItemStack is = new ItemStack(this, 1, i); - if (is.getItem().getUnlocalizedName(is) == null) { - break; - } - itemList.add(is); - } - } - } - - - @Override - public String getTextureFolder(final int id) - { - return "generator"; - } - - @Override - public int damageDropped(final int meta) - { - switch (meta) - { - case 2: - return 2; - } - return 0; - } - - @Override - public Class getTeClass(final int meta, final MutableObject[]> ctorArgTypes, final MutableObject ctorArgs) - { - try - { - switch (meta) - { - case 0: - return TileEntityRTG.class; - case 1: - return TileEntityKineticWindGenerator.class; - } - } - catch (final Exception e) - { - throw new RuntimeException(e); - } - return null; - } - - /* - * - * { - case 0: - return TileEntityGenerator.class; - case 1: - return TileEntityGeoGenerator.class; - case 2: - return TileEntityWaterGenerator.class; - case 3: - return TileEntitySolarGenerator.class; - case 4: - return TileEntityWindGenerator.class; - case 5: - return TileEntityNuclearReactorElectric.class; - case 6: - return TileEntityRTGenerator.class; - case 7: - return TileEntitySemifluidGenerator.class; - case 8: - return TileEntityStirlingGenerator.class; - case 9: - return TileEntityKineticGenerator.class; - } - * - * (non-Javadoc) - * @see net.minecraft.block.Block#randomDisplayTick(net.minecraft.world.World, int, int, int, java.util.Random) - */ - - @Override - public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random random) - { - if (!IC2.platform.isRendering()) { - return; - } - final int meta = world.getBlockMetadata(x, y, z); - if ((meta == 0) && (this.isActive(world, x, y, z))) - { - final TileEntityBlock te = (TileEntityBlock)this.getOwnTe(world, x, y, z); - if (te == null) { - return; - } - final int l = te.getFacing(); - final float f = x + 0.5F; - final float f1 = y + 0.0F + ((random.nextFloat() * 6.0F) / 16.0F); - final float f2 = z + 0.5F; - final float f3 = 0.52F; - final float f4 = (random.nextFloat() * 0.6F) - 0.3F; - switch (l) - { - case 4: - world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - break; - case 5: - world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - break; - case 2: - world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); - break; - case 3: - world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); - } - } - else if (meta == 5) - { - final TileEntityNuclearReactorElectric te = (TileEntityNuclearReactorElectric)this.getOwnTe(world, x, y, z); - if (te == null) { - return; - } - int puffs = te.heat / 1000; - if (puffs <= 0) { - return; - } - puffs = world.rand.nextInt(puffs); - for (int n = 0; n < puffs; n++) { - world.spawnParticle("smoke", x + random.nextFloat(), y + 0.95F, z + random.nextFloat(), 0.0D, 0.0D, 0.0D); - } - puffs -= world.rand.nextInt(4) + 3; - for (int n = 0; n < puffs; n++) { - world.spawnParticle("flame", x + random.nextFloat(), y + 1.0F, z + random.nextFloat(), 0.0D, 0.0D, 0.0D); - } - } - } - - @Override - public boolean onBlockActivated(final World world, final int i, final int j, final int k, final EntityPlayer entityplayer, final int side, final float a, final float b, final float c) - { - if ((entityplayer.getCurrentEquippedItem() != null) && (entityplayer.getCurrentEquippedItem().isItemEqual(Ic2Items.reactorChamber))) { - return false; - } - return super.onBlockActivated(world, i, j, k, entityplayer, side, a, b, c); - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack stack) - { - return stack.getItemDamage() == 5 ? EnumRarity.uncommon : EnumRarity.common; - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java deleted file mode 100644 index aa50243914..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.RTGGenerator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; - -import gtPlusPlus.xmod.ic2.block.RTGGenerator.gui.CONTAINER_RTG; -import gtPlusPlus.xmod.ic2.block.RTGGenerator.gui.GUI_RTG; -import ic2.core.ContainerBase; -import ic2.core.Ic2Items; -import ic2.core.block.generator.tileentity.TileEntityRTGenerator; -import ic2.core.block.invslot.InvSlotConsumable; -import ic2.core.block.invslot.InvSlotConsumableId; - -public class TileEntityRTG -extends TileEntityRTGenerator -{ - public final InvSlotConsumable fuelSlot; - - public TileEntityRTG() - { - this.fuelSlot = new InvSlotConsumableId(this, "fuelSlot", 0, 12, new Item[] { Ic2Items.RTGPellets.getItem() }); - } - - @Override - public int gaugeFuelScaled(final int i) - { - return i; - } - - @Override - public boolean gainEnergy() - { - int counter = 0; - for (int i = 0; i < this.fuelSlot.size(); i++) { - if (this.fuelSlot.get(i) != null) { - counter++; - } - } - if (counter == 0) { - return false; - } - this.storage += (int)Math.pow(2.0D, counter - 1); - return true; - } - - @Override - public boolean gainFuel() - { - return false; - } - - @Override - public boolean needsFuel() - { - return true; - } - - @Override - public String getInventoryName() - { - return "RTG"; - } - - @Override - public ContainerBase getGuiContainer(final EntityPlayer entityPlayer) - { - return new CONTAINER_RTG(entityPlayer, this); - } - - @Override - @SideOnly(Side.CLIENT) - public GuiScreen getGui(final EntityPlayer entityPlayer, final boolean isAdmin) - { - return new GUI_RTG(new CONTAINER_RTG(entityPlayer, this)); - } - - @Override - public boolean delayActiveUpdate() - { - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java deleted file mode 100644 index 0afe47c983..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.RTGGenerator.gui; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; - -import gtPlusPlus.xmod.ic2.block.RTGGenerator.TileEntityRTG; -import ic2.core.block.generator.container.ContainerRTGenerator; -import ic2.core.slot.SlotInvSlot; - -public class CONTAINER_RTG -extends ContainerRTGenerator -{ - public CONTAINER_RTG(final EntityPlayer entityPlayer, final TileEntityRTG tileEntity1) - { - super(entityPlayer, tileEntity1); - for (int i = 0; i < 4; i++) { - this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + (i * 18), 18)); - } - for (int i = 4; i < 8; i++) { - this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + ((i - 4) * 18), 36)); - } - for (int i = 8; i < 12; i++) { - this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + ((i - 8) * 18), 54)); - } - } - - @Override - public List getNetworkedFields() - { - final List ret = super.getNetworkedFields(); - - ret.add("storage"); - - return ret; - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java deleted file mode 100644 index c6e09a78d1..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.RTGGenerator.gui; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import gtPlusPlus.xmod.ic2.block.RTGGenerator.TileEntityRTG; -import ic2.core.IC2; -import ic2.core.block.generator.gui.GuiRTGenerator; -import ic2.core.util.GuiTooltipHelper; - -@SideOnly(Side.CLIENT) -public class GUI_RTG -extends GuiRTGenerator -{ - public CONTAINER_RTG container; - - public GUI_RTG(final CONTAINER_RTG container1) - { - super(container1); - - this.container = container1; - this.name = "RTG Mach II"; - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) - { - this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 4, 4210752); - - GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocalFormatted("ic2.generic.text.bufferEU", new Object[] { Double.valueOf(((TileEntityRTG)this.container.base).storage) }), 117, 38, 150, 48); - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int x, final int y) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(background); - final int j = (this.width - this.xSize) / 2; - final int k = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize); - - final int i1 = ((TileEntityRTG)this.container.base).gaugeStorageScaled(31); - this.drawTexturedModalRect(j + 119, k + 40, 179, 3, i1, 8); - } - - private static final ResourceLocation background = new ResourceLocation(IC2.textureDomain, "textures/gui/GUIRTGenerator.png"); -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java b/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java deleted file mode 100644 index 95e785d1a1..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java +++ /dev/null @@ -1,77 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.kieticgenerator; - -import org.apache.commons.lang3.mutable.MutableObject; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import ic2.core.block.BlockMultiID; -import ic2.core.block.kineticgenerator.tileentity.TileEntityManualKineticGenerator; -import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator; -import ic2.core.init.InternalName; -import ic2.core.item.block.ItemKineticGenerator; - -public class IC2_BlockKineticGenerator -extends BlockMultiID -{ - public IC2_BlockKineticGenerator(final InternalName internalName1) - { - super(internalName1, Material.iron, ItemKineticGenerator.class); - - this.setHardness(3.0F); - this.setStepSound(Block.soundTypeMetal); - this.setCreativeTab(AddToCreativeTab.tabMachines); - - GameRegistry.registerTileEntity(TileEntityWindKineticGenerator.class, "Advanced Kinetic Wind Generator"); - - } - - @Override - public String getTextureFolder(final int id) - { - return "kineticgenerator"; - } - - @Override - public int damageDropped(final int meta) - { - return meta; - } - - @Override - public Class getTeClass(final int meta, final MutableObject[]> ctorArgTypes, final MutableObject ctorArgs) - { - try - { - switch (meta) - { - case 0: - return TileEntityWindKineticGenerator.class; - } - } - catch (final Exception e) - { - e.printStackTrace(); - } - return null; - } - - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer entityPlayer, final int side, final float a, final float b, final float c) - { - if (entityPlayer.isSneaking()) { - return false; - } - final TileEntity te = this.getOwnTe(world, x, y, z); - if ((te != null) && ((te instanceof TileEntityManualKineticGenerator))) { - return ((TileEntityManualKineticGenerator)te).playerKlicked(entityPlayer); - } - return super.onBlockActivated(world, x, y, z, entityPlayer, side, a, b, c); - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java b/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java deleted file mode 100644 index 2c4c2e1d16..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java +++ /dev/null @@ -1,48 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.kieticgenerator; - -import java.io.DataInput; -import java.io.IOException; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTTagCompound; - -import ic2.core.block.TileEntityBlock; - -public abstract class IC2_TEComponent -{ - protected final TileEntityBlock parent; - - public IC2_TEComponent(final TileEntityBlock parent) - { - this.parent = parent; - } - - public abstract String getDefaultName(); - - public void readFromNbt(final NBTTagCompound nbt) {} - - public NBTTagCompound writeToNbt() - { - return null; - } - - public void onLoaded() {} - - public void onUnloaded() {} - - public void onNeighborUpdate(final Block srcBlock) {} - - public void onContainerUpdate(final String name, final EntityPlayerMP player) {} - - public void onNetworkUpdate(final DataInput is) - throws IOException - {} - - public boolean enableWorldTick() - { - return false; - } - - public void onWorldTick() {} -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java b/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java deleted file mode 100644 index 2a5b4dc9ae..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.kieticgenerator.container; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; - -import ic2.core.ContainerFullInv; -import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator; -import ic2.core.slot.SlotInvSlot; - -public class ContainerKineticWindgenerator -extends ContainerFullInv -{ - public ContainerKineticWindgenerator(final EntityPlayer entityPlayer, final TileEntityWindKineticGenerator tileEntity1) - { - super(entityPlayer, tileEntity1, 166); - - this.addSlotToContainer(new SlotInvSlot(tileEntity1.rotorSlot, 0, 80, 26)); - } - - @Override - public List getNetworkedFields() - { - final List ret = super.getNetworkedFields(); - ret.add("windStrength"); - return ret; - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java b/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java deleted file mode 100644 index 740991c5d3..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java +++ /dev/null @@ -1,5 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.kieticgenerator.container; - -public class IC2_ContainerBase { - -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java b/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java deleted file mode 100644 index 44053ed2e0..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java +++ /dev/null @@ -1,78 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.kieticgenerator.gui; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import ic2.core.IC2; -import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator; -import ic2.core.util.GuiTooltipHelper; - -@SideOnly(Side.CLIENT) -public class GuiKineticWindGenerator -extends GuiContainer -{ - public ContainerWindKineticGenerator container; - public String name; - - public GuiKineticWindGenerator(final ContainerWindKineticGenerator container1) - { - super(container1); - - this.container = container1; - this.name = StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.name"); - } - - @Override - protected void drawGuiContainerForegroundLayer(final int par1, final int par2) - { - this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 6, 4210752); - if (this.container.base.checkrotor()) - { - if (!this.container.base.rotorspace()) - { - this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotorspace"), 20, 52, 2157374); - } - else if ((this.container.base.checkrotor()) && (!this.container.base.guiisminWindStrength())) - { - this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak1"), 27, 52, 2157374); - this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak2"), 24, 69, 2157374); - } - else - { - this.fontRendererObj.drawString(StatCollector.translateToLocalFormatted("ic2.WindKineticGenerator.gui.output", new Object[] { Integer.valueOf(this.container.base.getKuOutput()) }), 55, 52, 2157374); - this.fontRendererObj.drawString(this.container.base.getRotorhealth() + " %", 46, 70, 2157374); - if (this.container.base.guiisoverload()) - { - GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocal("ic2.WindKineticGenerator.error.overload"), 44, 20, 79, 45); - GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocal("ic2.WindKineticGenerator.error.overload2"), 102, 20, 131, 45); - } - } - } - else { - this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotormiss"), 27, 52, 2157374); - } - } - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int x, final int y) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(background); - final int j = (this.width - this.xSize) / 2; - final int k = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize); - if ((this.container.base.guiisoverload()) && (this.container.base.checkrotor())) - { - this.drawTexturedModalRect(j + 44, k + 20, 176, 0, 30, 26); - this.drawTexturedModalRect(j + 102, k + 20, 176, 0, 30, 26); - } - } - - private static final ResourceLocation background = new ResourceLocation(IC2.textureDomain, "textures/gui/GUIWindKineticGenerator.png"); -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java b/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java deleted file mode 100644 index a2c39cb17b..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java +++ /dev/null @@ -1,389 +0,0 @@ -package gtPlusPlus.xmod.ic2.block.kieticgenerator.tileentity; - -import java.util.List; -import java.util.Vector; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import net.minecraft.world.ChunkCache; - -import ic2.api.energy.tile.IKineticSource; -import ic2.api.item.IKineticRotor; -import ic2.api.item.IKineticRotor.GearboxType; -import ic2.core.*; -import ic2.core.block.invslot.InvSlotConsumableKineticRotor; -import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator; -import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; -import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator; -import ic2.core.util.Util; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileEntityKineticWindGenerator -extends TileEntityWindKineticGenerator -implements IKineticSource, IHasGui -{ - public final InvSlotConsumableKineticRotor rotorSlot; - private double windStrength; - private int obstructedCrossSection; - private int crossSection; - private int updateTicker; - private float rotationSpeed; - private static final double efficiencyRollOffExponent = 2.0D; - private static final int nominalRotationPeriod = 500; - - public TileEntityKineticWindGenerator() - { - this.updateTicker = IC2.random.nextInt(this.getTickRate()); - this.rotorSlot = new InvSlotConsumableKineticRotor(this, "rotorslot", 0, null, 1, null, GearboxType.WIND); - } - - - public void update2Entity() - { - super.updateEntity(); - - assert (IC2.platform.isSimulating()); - if ((this.updateTicker++ % this.getTickRate()) != 0) { - return; - } - boolean needsInvUpdate = false; - if (!this.rotorSlot.isEmpty()) - { - if (this.checkSpace(1, true) == 0) - { - if (this.getActive() != true) { - this.setActive(true); - } - needsInvUpdate = true; - } - else - { - if (this.getActive()) { - this.setActive(false); - } - needsInvUpdate = true; - } - } - else - { - if (this.getActive()) { - this.setActive(false); - } - needsInvUpdate = true; - } - if (this.getActive()) - { - this.crossSection = (((this.getRotorDiameter() / 2) * 2 * 2) + 1); - - this.crossSection *= this.crossSection; - this.obstructedCrossSection = this.checkSpace(this.getRotorDiameter() * 3, false); - if ((this.obstructedCrossSection > 0) && (this.obstructedCrossSection <= ((this.getRotorDiameter() + 1) / 2))) { - this.obstructedCrossSection = 0; - } else if (this.obstructedCrossSection < 0) { - this.obstructedCrossSection = this.crossSection; - } - this.windStrength = this.calcWindStrength(); - - final float speed = (float)Util.limit((this.windStrength - this.getMinWindStrength()) / this.getMaxWindStrength(), 0.0D, 2.0D); - - - this.setRotationSpeed(speed*2); - if (this.windStrength >= this.getMinWindStrength()) { - if (this.windStrength <= this.getMaxWindStrength()) { - this.rotorSlot.damage(1, false); - } else { - this.rotorSlot.damage(4, false); - } - } - } - } - - - - @Override - public List getNetworkedFields() - { - final List ret = new Vector<>(1); - - ret.add("rotationSpeed"); - ret.add("rotorSlot"); - ret.addAll(super.getNetworkedFields()); - - return ret; - } - - @Override - public ContainerBase getGuiContainer(final EntityPlayer entityPlayer) - { - return new ContainerWindKineticGenerator(entityPlayer, this); - } - - @Override - @SideOnly(Side.CLIENT) - public GuiScreen getGui(final EntityPlayer entityPlayer, final boolean isAdmin) - { - return new GuiWindKineticGenerator(new ContainerWindKineticGenerator(entityPlayer, this)); - } - - @Override - public boolean facingMatchesDirection(final ForgeDirection direction) - { - return direction.ordinal() == this.getFacing(); - } - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - if ((side == 0) || (side == 1)) { - return false; - } - return this.getFacing() != side; - } - - @Override - public void setFacing(final short side) - { - super.setFacing(side); - } - - public boolean enableUpdateEntity() - { - return IC2.platform.isSimulating(); - } - - @Override - public String getRotorhealth() - { - if (!this.rotorSlot.isEmpty()) { - return StatCollector.translateToLocalFormatted("ic2.WindKineticGenerator.gui.rotorhealth", new Object[] { Integer.valueOf((int)(100.0F - ((this.rotorSlot.get().getItemDamage() / this.rotorSlot.get().getMaxDamage()) * 100.0F))) }); - } - return ""; - } - - @Override - public int maxrequestkineticenergyTick(final ForgeDirection directionFrom) - { - return this.getKuOutput(); - } - - @Override - public int requestkineticenergy(final ForgeDirection directionFrom, final int requestkineticenergy) - { - if (this.facingMatchesDirection(directionFrom.getOpposite())) { - return Math.min(requestkineticenergy, this.getKuOutput()); - } - return 0; - } - - @Override - public String getInventoryName() - { - return "Advanced Kinetic Wind Generator"; - } - - @Override - public void onGuiClosed(final EntityPlayer entityPlayer) {} - - @Override - public boolean shouldRenderInPass(final int pass) - { - return pass == 0; - } - - @Override - public int checkSpace(int length, final boolean onlyrotor) - { - int box = this.getRotorDiameter() / 2; - int lentemp = 0; - if (onlyrotor) - { - length = 1; - lentemp = length + 1; - } - if (!onlyrotor) { - box *= 2; - } - final ForgeDirection fwdDir = ForgeDirection.VALID_DIRECTIONS[this.getFacing()]; - final ForgeDirection rightDir = fwdDir.getRotation(ForgeDirection.DOWN); - - final int xMaxDist = Math.abs((length * fwdDir.offsetX) + (box * rightDir.offsetX)); - - final int zMaxDist = Math.abs((length * fwdDir.offsetZ) + (box * rightDir.offsetZ)); - - - final ChunkCache chunkCache = new ChunkCache(this.worldObj, this.xCoord - xMaxDist, this.yCoord - box, this.zCoord - zMaxDist, this.xCoord + xMaxDist, this.yCoord + box, this.zCoord + zMaxDist, 0); - - - - int ret = 0; - for (int up = -box; up <= box; up++) - { - final int y = this.yCoord + up; - for (int right = -box; right <= box; right++) - { - boolean occupied = false; - for (int fwd = lentemp - length; fwd <= length; fwd++) - { - final int x = this.xCoord + (fwd * fwdDir.offsetX) + (right * rightDir.offsetX); - - final int z = this.zCoord + (fwd * fwdDir.offsetZ) + (right * rightDir.offsetZ); - - - assert (Math.abs(x - this.xCoord) <= xMaxDist); - assert (Math.abs(z - this.zCoord) <= zMaxDist); - - final Block block = chunkCache.getBlock(x, y, z); - if (!block.isAir(chunkCache, x, y, z)) - { - occupied = true; - if (((up != 0) || (right != 0) || (fwd != 0)) && ((chunkCache.getTileEntity(x, y, z) instanceof TileEntityKineticWindGenerator)) && (!onlyrotor)) { - return -1; - } - } - } - if (occupied) { - ret++; - } - } - } - return ret; - } - - @Override - public boolean checkrotor() - { - return !this.rotorSlot.isEmpty(); - } - - @Override - public boolean rotorspace() - { - return this.checkSpace(1, true) == 0; - } - - private void setRotationSpeed(final float speed) - { - if (this.rotationSpeed != speed) - { - this.rotationSpeed = speed; - IC2.network.get().updateTileEntityField(this, "rotationSpeed"); - } - } - - @Override - public int getTickRate() - { - return 32; - } - - @Override - public double calcWindStrength() - { - double windStr = WorldData.get(this.worldObj).windSim.getWindAt(this.yCoord); - - windStr *= (1.0D - Math.pow(this.obstructedCrossSection / this.crossSection, 2.0D)); - - - return Math.max(0.0D, windStr); - } - - @Override - public float getAngle() - { - if (this.rotationSpeed > 0.0F) - { - final long period = (long) (5.0E+008F / this.rotationSpeed); - - - return ((float)(System.nanoTime() % period) / (float)period) * 360.0F; - } - return 0.0F; - } - - @Override - public float getefficiency() - { - final ItemStack stack = this.rotorSlot.get(); - if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { - return (float) (((IKineticRotor)stack.getItem()).getEfficiency(stack)*1.5); - } - return 0.0F; - } - - @Override - public int getMinWindStrength() - { - final ItemStack stack = this.rotorSlot.get(); - if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { - return ((IKineticRotor)stack.getItem()).getMinWindStrength(stack)/2; - } - return 0; - } - - @Override - public int getMaxWindStrength() - { - final ItemStack stack = this.rotorSlot.get(); - if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { - return ((IKineticRotor)stack.getItem()).getMaxWindStrength(stack)*2; - } - return 0; - } - - @Override - public int getRotorDiameter() - { - final ItemStack stack = this.rotorSlot.get(); - if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { - return ((IKineticRotor)stack.getItem()).getDiameter(stack)/2; - } - return 0; - } - - @Override - public ResourceLocation getRotorRenderTexture() - { - final ItemStack stack = this.rotorSlot.get(); - if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { - return ((IKineticRotor)stack.getItem()).getRotorRenderTexture(stack); - } - return new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorWoodmodel.png"); - } - - @Override - public boolean guiisoverload() - { - if (this.windStrength > this.getMaxWindStrength()) { - return true; - } - return false; - } - - @Override - public boolean guiisminWindStrength() - { - return this.windStrength >= this.getMinWindStrength(); - } - - @Override - public int getKuOutput() - { - if ((this.windStrength >= this.getMinWindStrength()) && (this.getActive())) { - return (int)(this.windStrength * 50.0D * this.getefficiency()); - } - return 0; - } - - @Override - public int getWindStrength() - { - return (int)this.windStrength; - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java b/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java deleted file mode 100644 index 92d711101b..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java +++ /dev/null @@ -1,276 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import java.util.List; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.Utils; -import ic2.api.item.IKineticRotor; -import ic2.core.IC2; -import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator; -import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -public class CustomKineticRotor extends Item implements IKineticRotor { - - private final int mTier; - - @SideOnly(Side.CLIENT) - private IIcon[] mTextures; - - private static final String[] mRegistrationNames = new String[] { - "itemwoodrotor", "itemironrotor", "itemsteelrotor", "itemwcarbonrotor" - }; - - private static final String[] mUnlocalNames = new String[] { - "itemEnergeticRotor", - "itemTungstenSteelRotor", - "itemVibrantRotor", - "itemIridiumRotor", - "itemMagnaliumRotor", - "itemUltimetRotor", - }; - private static final int[] mMaxDurability = new int[] { - 512000, 809600, 1600000, 3200000 - }; - private static final int[] mRadius = new int[] { - 9, 11, 13, 15 - }; - private static final float[] mEfficiency = new float[] { - 0.9f, 1.0f, 1.2f, 1.5f - }; - private static final int[] mMinWindStrength = new int[] { - 12, 14, 16, 18 - }; - private static final int[] mMaxWindStrength = new int[] { - 80, 120, 160, 320 - }; - - private static final ResourceLocation[] mResourceLocations = new ResourceLocation[] { - new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorEnergeticModel.png"), - new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorTungstenSteelModel.png"), - new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorVibrantModel.png"), - new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorIridiumModel.png"), - new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorMagnaliumModel.png"), - new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorUltimetModel.png"), - }; - - private final int maxWindStrength; - private final int minWindStrength; - private final int radius; - private final float efficiency; - private final ResourceLocation renderTexture; - - public CustomKineticRotor(int aTier) { - mTier = aTier; - this.setMaxStackSize(1); - // Handle Differences if EIO is not loaded - if (!LoadedMods.EnderIO && (aTier == 0 || aTier == 2)) { - this.renderTexture = mResourceLocations[(aTier == 0 ? 4 : 5)]; - this.setUnlocalizedName(mUnlocalNames[(aTier == 0 ? 4 : 5)]); - } - else { - this.renderTexture = mResourceLocations[aTier]; - this.setUnlocalizedName(mUnlocalNames[aTier]); - } - this.setMaxDamage(mMaxDurability[aTier]); - this.radius = mRadius[aTier]; - this.efficiency = mEfficiency[aTier]; - this.minWindStrength = mMinWindStrength[aTier]; - this.maxWindStrength = mMaxWindStrength[aTier]; - this.setNoRepair(); - this.setCreativeTab(IC2.tabIC2); - GameRegistry.registerItem(this, mRegistrationNames[aTier]); - } - - @Override - public void setDamage(final ItemStack stack, final int damage) { - if (mTier < 3) { - super.setDamage(stack, damage); - } - } - - @Override - public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) { - - info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", new Object[]{this.minWindStrength, this.maxWindStrength})); - - GearboxType type = null; - if (Minecraft.getMinecraft().currentScreen != null && Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator) { - type = GearboxType.WATER; - } - else if (Minecraft.getMinecraft().currentScreen != null && Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator) { - type = GearboxType.WIND; - } - - if (type != null) { - info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + this.isAcceptedType(itemStack, type))); - } - - } - - @Override - public int getDiameter(final ItemStack stack) - { - return this.radius; - } - - @Override - public ResourceLocation getRotorRenderTexture(final ItemStack stack) - { - return this.renderTexture; - } - - @Override - public float getEfficiency(final ItemStack stack) - { - return this.efficiency; - } - - @Override - public int getMinWindStrength(final ItemStack stack) - { - return this.minWindStrength; - } - - @Override - public int getMaxWindStrength(final ItemStack stack) - { - return this.maxWindStrength; - } - - @Override - public boolean isAcceptedType(final ItemStack stack, final IKineticRotor.GearboxType type){ - return (type == IKineticRotor.GearboxType.WIND) || (type == IKineticRotor.GearboxType.WATER); - } - - public String getUnlocalizedName() { - return "ic2." + super.getUnlocalizedName().substring(5); - } - - public String getUnlocalizedName(ItemStack itemStack) { - return this.getUnlocalizedName(); - } - - public String getItemStackDisplayName(ItemStack itemStack) { - return StatCollector.translateToLocal(this.getUnlocalizedName(itemStack)); - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return mTier < 3; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) { - if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { - if (mTier == 0) { - return mTextures[4]; - } - else { - return mTextures[5]; - } - } - else { - return mTextures[mTier]; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconIndex(ItemStack aIndex) { - if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { - if (mTier == 0) { - return mTextures[4]; - } - else { - return mTextures[5]; - } - } - else { - return mTextures[mTier]; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIconFromDamageForRenderPass(int aDmg, int aPass) { - if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { - if (mTier == 0) { - return mTextures[4]; - } - else { - return mTextures[5]; - } - } - else { - return mTextures[mTier]; - } - } - - @Override - protected String getIconString() { - return super.getIconString(); - } - - @Override - public int getDisplayDamage(ItemStack stack) { - return super.getDisplayDamage(stack); - } - - @Override - public double getDurabilityForDisplay(ItemStack stack) { - return super.getDurabilityForDisplay(stack); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { - if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { - if (mTier == 0) { - return mTextures[4]; - } - else { - return mTextures[5]; - } - } - else { - return mTextures[mTier]; - } - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(ItemStack stack, int pass) { - if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { - if (mTier == 0) { - return mTextures[4]; - } - else { - return mTextures[5]; - } - } - else { - return mTextures[mTier]; - } - } - - @Override - public void registerIcons(IIconRegister iconRegister) { - int aIndex = 0; - mTextures = new IIcon[6]; - for (String y : mUnlocalNames) { - mTextures[aIndex++] = iconRegister.registerIcon(IC2.textureDomain + ":" + "rotors/" + y); - } - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java b/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java deleted file mode 100644 index bd1ad91588..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java +++ /dev/null @@ -1,43 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; - -public class IC2_ItemGradual -extends CoreItem -{ - public IC2_ItemGradual(final String internalName) - { - super(internalName, AddToCreativeTab.tabMachines, 1, 10000, "", EnumRarity.uncommon); - this.setNoRepair(); - } - - @Override - public boolean isDamaged(final ItemStack stack) - { - return this.getDamage(stack) > 1; - } - - @Override - public boolean showDurabilityBar(final ItemStack stack) - { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubItems(final Item item, final CreativeTabs tabs, final List itemList) - { - itemList.add(new ItemStack(this, 1, 1)); - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java b/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java deleted file mode 100644 index 3ccb2cb0ee..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java +++ /dev/null @@ -1,54 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import ic2.api.item.ICustomDamageItem; -import ic2.core.util.StackUtil; - -public class IC2_ItemGradualInteger -extends IC2_ItemGradual -implements ICustomDamageItem -{ - private final int maxDmg; - - public IC2_ItemGradualInteger(final String internalName, final int maxdmg) - { - super(internalName); - - this.maxDmg = maxdmg; - } - - @Override - public int getCustomDamage(final ItemStack stack) - { - final NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); - return nbt.getInteger("advDmg"); - } - - @Override - public int getMaxCustomDamage(final ItemStack stack) - { - return this.maxDmg; - } - - @Override - public void setCustomDamage(final ItemStack stack, final int damage) - { - final NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); - nbt.setInteger("advDmg", 0); - - final int maxStackDamage = stack.getMaxDamage(); - if (maxStackDamage > 2) { - //stack.setItemDamage(1 + (int)Util.map(damage, this.maxDmg, maxStackDamage - 2)); - } - } - - @Override - public boolean applyCustomDamage(final ItemStack stack, final int damage, final EntityLivingBase src) - { - this.setCustomDamage(stack, this.getCustomDamage(stack) + damage); - return true; - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java b/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java deleted file mode 100644 index 897e831b73..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java +++ /dev/null @@ -1,106 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.StatCollector; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class IC2_ItemIC2 -extends Item -{ - public IC2_ItemIC2(final String internalName) - { - this.setUnlocalizedName(internalName); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setTextureName(CORE.MODID + ":" + internalName); - - GameRegistry.registerItem(this, internalName); - } - - public String getTextureFolder() - { - return null; - } - - /* public String getTextureName(int index) - { - if ((!this.hasSubtypes) && (index > 0)) { - return null; - } - String name = getUnlocalizedName(new ItemStack(this, 1, index)); - if ((name != null) && (name.length() > 4)) { - return name.substring(4); - } - return name; - } - - @Override -@SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) - { - int indexCount = 0; - while (getTextureName(indexCount) != null) - { - indexCount++; - if (indexCount > 32767) { - throw new RuntimeException("More Item Icons than actually possible @ " + getUnlocalizedName()); - } - } - this.textures = new IIcon[indexCount]; - for (int index = 0; index < indexCount; index++) { - this.textures[index] = iconRegister.registerIcon(CORE.MODID + ":" + getUnlocalizedName()); - } - } - - @Override -@SideOnly(Side.CLIENT) - public IIcon getIconFromDamage(int meta) - { - if (meta < this.textures.length) { - return this.textures[meta]; - } - return this.textures.length < 1 ? null : this.textures[0]; - }*/ - - @Override - public String getUnlocalizedName() - { - return super.getUnlocalizedName(); - } - - @Override - public String getUnlocalizedName(final ItemStack itemStack) - { - return this.getUnlocalizedName(); - } - - @Override - public String getItemStackDisplayName(final ItemStack itemStack) - { - return StatCollector.translateToLocal(this.getUnlocalizedName(itemStack)); - } - - public IC2_ItemIC2 setRarity(final int aRarity) - { - this.rarity = aRarity; - return this; - } - - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack stack) - { - return EnumRarity.values()[this.rarity]; - } - - private int rarity = 0; - protected IIcon[] textures; -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_Items.java b/src/Java/gtPlusPlus/xmod/ic2/item/IC2_Items.java deleted file mode 100644 index 8c8b2ea7ad..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_Items.java +++ /dev/null @@ -1,60 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.CoreItem; -import gtPlusPlus.core.item.wearable.hazmat.ItemArmorHazmatEx; -import gtPlusPlus.core.lib.LoadedMods; -import net.minecraft.item.ItemStack; - -public class IC2_Items { - - public static ItemStack rotor_Material_1; //Energetic Alloy - public static ItemStack rotor_Material_2; //TungstenSteel - public static ItemStack rotor_Material_3; //Vibrant Alloy - public static ItemStack rotor_Material_4; //Iridium - - public static ItemStack rotor_Blade_Material_1; - public static ItemStack rotor_Blade_Material_2; - public static ItemStack rotor_Blade_Material_3; - public static ItemStack rotor_Blade_Material_4; - - public static ItemStack shaft_Material_1; //Energetic Alloy - public static ItemStack shaft_Material_2; //TungstenSteel - public static ItemStack shaft_Material_3; //Vibrant Alloy - public static ItemStack shaft_Material_4; //Iridium - - public static ItemStack blockRTG; - public static ItemStack blockKineticGenerator; - - private static final String[] mData1 = new String[] {"itemEnergeticRotorBlade", "itemMagnaliumRotorBlade"}; - private static final String[] mData2 = new String[] {"itemEnergeticShaft", "itemMagnaliumShaft"}; - private static final String[] mData3 = new String[] {"itemVibrantRotorBlade", "itemUltimetRotorBlade"}; - private static final String[] mData4 = new String[] {"itemVibrantShaft", "itemUltimetShaft"}; - - - public static void register(){ - - int aIndexEIO = (LoadedMods.EnderIO ? 0 : 1); - - // Rotor Blades - rotor_Blade_Material_1 = new ItemStack (new CoreItem(mData1[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - rotor_Blade_Material_2 = new ItemStack (new CoreItem("itemTungstenSteelRotorBlade", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - rotor_Blade_Material_3 = new ItemStack (new CoreItem(mData3[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - rotor_Blade_Material_4 = new ItemStack (new CoreItem("itemIridiumRotorBlade", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - - // Rotor Shafts - shaft_Material_1 = new ItemStack (new CoreItem(mData2[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - shaft_Material_2 = new ItemStack (new CoreItem("itemTungstenSteelShaft", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - shaft_Material_3 = new ItemStack (new CoreItem(mData4[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - shaft_Material_4 = new ItemStack (new CoreItem("itemIridiumShaft", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); - - // Rotors - rotor_Material_1 = new ItemStack (new CustomKineticRotor(0)); - rotor_Material_2 = new ItemStack (new CustomKineticRotor(1)); - rotor_Material_3 = new ItemStack (new CustomKineticRotor(2)); - rotor_Material_4 = new ItemStack (new CustomKineticRotor(3)); - - ItemArmorHazmatEx.init(); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java b/src/Java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java deleted file mode 100644 index 0df2c8d7f1..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java +++ /dev/null @@ -1,55 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -import ic2.core.item.block.ItemBlockIC2; - -public class ItemGenerators -extends ItemBlockIC2 -{ - public ItemGenerators(final Block block) - { - super(block); - - this.setMaxDamage(0); - this.setHasSubtypes(true); - } - - @Override - public int getMetadata(final int i) - { - return i; - } - - @Override - public String getUnlocalizedName(final ItemStack itemstack) - { - final int meta = itemstack.getItemDamage(); - switch (meta) - { - case 0: - return "ic2.blockRTGenerator2"; - case 1: - return "ic2.blockKineticGenerator2"; - } - return null; - } - - @Override - public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) - { - final int meta = itemStack.getItemDamage(); - switch (meta) - { - case 0: - info.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerOutput") + " 1-32 EU/t " + StatCollector.translateToLocal("ic2.item.tooltip.max")); break; - case 1: - info.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerOutput") + " 1-512 EU/t " + StatCollector.translateToLocal("ic2.item.tooltip.max")); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/RotorBase.java b/src/Java/gtPlusPlus/xmod/ic2/item/RotorBase.java deleted file mode 100644 index b9f9ab68ef..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/RotorBase.java +++ /dev/null @@ -1,100 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import ic2.api.item.IKineticRotor; -import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator; -import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; -import ic2.core.init.InternalName; -import ic2.core.item.resources.ItemWindRotor; - -public class RotorBase extends ItemWindRotor{ - - private final int maxWindStrength; - private final int minWindStrength; - private final int radius; - private final float efficiency; - private final ResourceLocation renderTexture; - private final boolean water; - - public RotorBase(final InternalName internalName, final int Radius, final int durability, final float efficiency, final int minWindStrength, final int maxWindStrength, final ResourceLocation RenderTexture) - { - super(internalName, Radius, durability, efficiency, minWindStrength, maxWindStrength, RenderTexture); - - - - this.setMaxStackSize(1); - this.setMaxDamage(durability); - - this.radius = Radius; - this.efficiency = efficiency; - this.renderTexture = RenderTexture; - this.minWindStrength = minWindStrength; - this.maxWindStrength = maxWindStrength; - this.water = true; - } - - @Override - public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) - { - info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", new Object[] { Integer.valueOf(this.minWindStrength), Integer.valueOf(this.maxWindStrength) })); - IKineticRotor.GearboxType type = null; - if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator))) { - type = IKineticRotor.GearboxType.WATER; - } else if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator))) { - type = IKineticRotor.GearboxType.WIND; - } - if (type != null) { - //info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + isAcceptedType(itemStack, type))); - } - } - - @Override - public String getTextureFolder() - { - return "rotors"; - } - - @Override - public int getDiameter(final ItemStack stack) - { - return this.radius; - } - - @Override - public ResourceLocation getRotorRenderTexture(final ItemStack stack) - { - return this.renderTexture; - } - - @Override - public float getEfficiency(final ItemStack stack) - { - return this.efficiency; - } - - @Override - public int getMinWindStrength(final ItemStack stack) - { - return this.minWindStrength; - } - - @Override - public int getMaxWindStrength(final ItemStack stack) - { - return this.maxWindStrength; - } - - @Override - public boolean isAcceptedType(final ItemStack stack, final IKineticRotor.GearboxType type) - { - return (type == IKineticRotor.GearboxType.WIND) || (this.water); - } -} - diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/RotorIridium.java b/src/Java/gtPlusPlus/xmod/ic2/item/RotorIridium.java deleted file mode 100644 index b9dffbd371..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/RotorIridium.java +++ /dev/null @@ -1,127 +0,0 @@ -package gtPlusPlus.xmod.ic2.item; - -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import ic2.api.item.IKineticRotor; -import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator; -import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; -import ic2.core.init.InternalName; -import ic2.core.util.StackUtil; - -public class RotorIridium extends RotorBase{ - - private final int maxWindStrength; - private final int minWindStrength; - private final int radius; - private final float efficiency; - private final ResourceLocation renderTexture; - private final boolean water; - - public RotorIridium(final InternalName internalName, final int Radius, final int durability, final float efficiency, final int minWindStrength, final int maxWindStrength, final ResourceLocation RenderTexture) - { - super(internalName, Radius, durability, efficiency, minWindStrength, maxWindStrength, RenderTexture); - - - - this.setMaxStackSize(1); - this.setMaxDamage(Integer.MAX_VALUE); - - this.radius = Radius; - this.efficiency = efficiency; - this.renderTexture = RenderTexture; - this.minWindStrength = minWindStrength; - this.maxWindStrength = maxWindStrength; - this.water = (internalName != InternalName.itemwoodrotor); - } - - @Override - public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) - { - info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", new Object[] { Integer.valueOf(this.minWindStrength), Integer.valueOf(this.maxWindStrength) })); - IKineticRotor.GearboxType type = null; - if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator))) { - type = IKineticRotor.GearboxType.WATER; - } else if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator))) { - type = IKineticRotor.GearboxType.WIND; - } - if (type != null) { - //info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + isAcceptedType(itemStack, type))); - } - } - - @Override - public String getTextureFolder() - { - return "rotors"; - } - - @Override - public int getDiameter(final ItemStack stack) - { - return this.radius; - } - - @Override - public ResourceLocation getRotorRenderTexture(final ItemStack stack) - { - return this.renderTexture; - } - - @Override - public float getEfficiency(final ItemStack stack) - { - return this.efficiency; - } - - @Override - public int getMinWindStrength(final ItemStack stack) - { - return this.minWindStrength; - } - - @Override - public int getMaxWindStrength(final ItemStack stack) - { - return this.maxWindStrength; - } - - @Override - public boolean isAcceptedType(final ItemStack stack, final IKineticRotor.GearboxType type) - { - return (type == IKineticRotor.GearboxType.WIND) || (this.water); - } - - - @Override - public void setCustomDamage(final ItemStack stack, final int damage) - { - final NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); - nbt.setInteger("advDmg", 0); - - final int maxStackDamage = stack.getMaxDamage(); - if (maxStackDamage > 2) { - //stack.setItemDamage(1 + (int)Util.map(damage, this.maxDmg, maxStackDamage - 2)); - } - } - - @Override - public boolean applyCustomDamage(final ItemStack stack, final int damage, final EntityLivingBase src) - { - this.setCustomDamage(stack, this.getCustomDamage(stack) + damage); - return true; - } - - @Override - public boolean showDurabilityBar(ItemStack stack) { - return false; - } -} - diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java b/src/Java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java deleted file mode 100644 index 01151024c4..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.xmod.ic2.item.reactor; - -import ic2.api.reactor.IReactor; -import ic2.api.reactor.IReactorComponent; -import net.minecraft.item.ItemStack; - -public class IC2_FuelRod_Base implements IReactorComponent { - - @Override - public void processChamber(IReactor var1, ItemStack var2, int var3, int var4, boolean var5) { - // TODO Auto-generated method stub - - } - - @Override - public boolean acceptUraniumPulse(IReactor var1, ItemStack var2, ItemStack var3, int var4, int var5, int var6, - int var7, boolean var8) { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean canStoreHeat(IReactor var1, ItemStack var2, int var3, int var4) { - // TODO Auto-generated method stub - return false; - } - - @Override - public int getMaxHeat(IReactor var1, ItemStack var2, int var3, int var4) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int getCurrentHeat(IReactor var1, ItemStack var2, int var3, int var4) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int alterHeat(IReactor var1, ItemStack var2, int var3, int var4, int var5) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public float influenceExplosion(IReactor var1, ItemStack var2) { - // TODO Auto-generated method stub - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java b/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java deleted file mode 100644 index 1b090cc51a..0000000000 --- a/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java +++ /dev/null @@ -1,326 +0,0 @@ -package gtPlusPlus.xmod.ic2.recipe; - -import static gtPlusPlus.core.recipe.RECIPES_Tools.*; - -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.*; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.ic2.item.IC2_Items; -import ic2.core.Ic2Items; - -public class RECIPE_IC2 { - - public static String plate_T1 = "plateEnergeticAlloy"; - public static String plate_T2 = "plateTungstenSteel"; - public static String plate_T3 = "plateVibrantAlloy"; - public static String plate_T4 = "plateAlloyIridium"; - - public static ItemStack block_T1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.EnergeticAlloy, 1L); - public static ItemStack block_T2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L); - public static ItemStack block_T3 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.VibrantAlloy, 1L); - public static ItemStack block_T4 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L); - - public static ItemStack shaft_block_T1 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.EnergeticAlloy, 1L); - public static ItemStack shaft_block_T2 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.TungstenSteel, 1L); - public static ItemStack shaft_block_T3 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.VibrantAlloy, 1L); - public static ItemStack shaft_block_T4 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iridium, 1L); - - public static String ingot_T1 = "ingotEnergeticAlloy"; - public static String ingot_T2 = "ingotTungstenSteel"; - public static String ingot_T3 = "ingotVibrantAlloy"; - public static String ingot_T4 = "ingotIridium"; - - public static String ring_T1 = "ringStainlessSteel"; - public static String ring_T2 = "ringTungstenSteel"; - public static String ring_T3 = "ringChrome"; - public static String ring_T4 = "ringOsmiridium"; - - - private static ItemStack rotor_blade_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_1.getItem()); - private static ItemStack rotor_blade_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_2.getItem()); - private static ItemStack rotor_blade_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_3.getItem()); - private static ItemStack rotor_blade_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_4.getItem()); - - private static ItemStack shaft_T1 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_1.getItem()); - private static ItemStack shaft_T2 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_2.getItem()); - private static ItemStack shaft_T3 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_3.getItem()); - private static ItemStack shaft_T4 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_4.getItem()); - - private static ItemStack rotor_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_1.getItem()); - private static ItemStack rotor_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_2.getItem()); - private static ItemStack rotor_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_3.getItem()); - private static ItemStack rotor_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_4.getItem()); - - private static boolean checkForEnderIO(){ - if(!LoadedMods.EnderIO){ - plate_T1 = "plateMagnalium"; - plate_T2 = "plateTungstenSteel"; - plate_T3 = "plateUltimet"; - plate_T4 = "plateAlloyIridium"; - - block_T1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Magnalium, 1L); - block_T2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L); - block_T3 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Ultimet, 1L); - block_T4 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L); - - ingot_T1 = "ingotMagnalium"; - ingot_T2 = "ingotTungstenSteel"; - ingot_T3 = "ingotUltimet"; - ingot_T4 = "ingotIridium"; - return true; - } - return false; - } - - public static void initRecipes() { - - checkForEnderIO(); - addAdvancedHazmat(); - - if (!CORE.GTNH) { - //Rotor Blade Recipes - - RecipeUtils.addShapedRecipe( - plate_T1, ingot_T1, plate_T1, - plate_T1, ingot_T1, plate_T1, - plate_T1, ingot_T1, plate_T1, - rotor_blade_T1); - - RecipeUtils.addShapedRecipe( - plate_T2, ingot_T2, plate_T2, - plate_T2, ingot_T2, plate_T2, - plate_T2, ingot_T2, plate_T2, - rotor_blade_T2); - - RecipeUtils.addShapedRecipe( - plate_T3, ingot_T3, plate_T3, - plate_T3, ingot_T3, plate_T3, - plate_T3, ingot_T3, plate_T3, - rotor_blade_T3); - - RecipeUtils.addShapedRecipe( - plate_T4, ingot_T4, plate_T4, - plate_T4, ingot_T4, plate_T4, - plate_T4, ingot_T4, plate_T4, - rotor_blade_T4); - } - if (CORE.GTNH) { - - RecipeUtils.addShapedRecipe( - plate_T1, plate_T1, plate_T1, - plate_T1, ring_T1, plate_T1, - plate_T1, plate_T1, plate_T1, - rotor_blade_T1); - - RecipeUtils.addShapedRecipe( - plate_T2, plate_T2, plate_T2, - plate_T2, ring_T2, plate_T2, - plate_T2, plate_T2, plate_T2, - rotor_blade_T2); - - RecipeUtils.addShapedRecipe( - plate_T3, plate_T3, plate_T3, - plate_T3, ring_T3, plate_T3, - plate_T3, plate_T3, plate_T3, - rotor_blade_T3); - - RecipeUtils.addShapedRecipe( - plate_T4, plate_T4, plate_T4, - plate_T4, ring_T4, plate_T4, - plate_T4, plate_T4, plate_T4, - rotor_blade_T4); - - } - - //Shaft Extruder Recipe - GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.DarkSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.DarkSteel)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.TungstenSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.TungstenSteel)}); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.Molybdenum), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Molybdenum)}); - Logger.INFO("Added recipe item for GT5 Extruder: Shaft Shape"); - - - //Custm Recipes for Iron and Steel - ItemStack mShaftIron = ItemList.IC2_ShaftIron.get(1); - ItemStack mShaftSteel = ItemList.IC2_ShaftSteel.get(1); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.WroughtIron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftSteel, 64*20, 120); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.block, Materials.Steel, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftSteel, 64*20, 120); - - - //Shaft Recipes - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T1), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T1, 2560, 250); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T1), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T1, 2560, 250); - if (LoadedMods.EnderIO || CORE.GTNH) { - Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Energetic]"); - } else { - Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Magnalium]"); - } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T2), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T2, 5120, 500); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T2), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T2, 5120, 500); - - Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [TungstenSteel]"); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T3), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T3, 10240, 2000); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T3), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T3, 10240, 2000); - if (LoadedMods.EnderIO || CORE.GTNH) { - Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Vibrant]"); - } else { - Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Ultimet]"); - } - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T4), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T4, 20480, 4000); - GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T4), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T4, 20480, 4000); - Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Iridium]"); - - if (!CORE.GTNH) { - //Rotor Recipes - RecipeUtils.addShapedRecipe( - null, rotor_blade_T1, null, - rotor_blade_T1, shaft_T1, rotor_blade_T1, - null, rotor_blade_T1, null, - rotor_T1); - - RecipeUtils.addShapedRecipe( - null, rotor_blade_T2, null, - rotor_blade_T2, shaft_T2, rotor_blade_T2, - null, rotor_blade_T2, null, - rotor_T2); - - RecipeUtils.addShapedRecipe( - null, rotor_blade_T3, null, - rotor_blade_T3, shaft_T3, rotor_blade_T3, - null, rotor_blade_T3, null, - rotor_T3); - - RecipeUtils.addShapedRecipe( - null, rotor_blade_T4, null, - rotor_blade_T4, shaft_T4, rotor_blade_T4, - null, rotor_blade_T4, null, - rotor_T4); - - } - if (CORE.GTNH) { - RecipeUtils.addShapedRecipe( - shaft_T1, rotor_blade_T1, craftingToolHardHammer, - rotor_blade_T1, ring_T1, rotor_blade_T1, - craftingToolWrench, rotor_blade_T1, shaft_T1, - rotor_T1); - - RecipeUtils.addShapedRecipe( - shaft_T2, rotor_blade_T2, craftingToolHardHammer, - rotor_blade_T2, ring_T2, rotor_blade_T2, - craftingToolWrench, rotor_blade_T2, shaft_T2, - rotor_T2); - - RecipeUtils.addShapedRecipe( - shaft_T3, rotor_blade_T3, craftingToolHardHammer, - rotor_blade_T3, ring_T3, rotor_blade_T3, - craftingToolWrench, rotor_blade_T3, shaft_T3, - rotor_T3); - - RecipeUtils.addShapedRecipe( - shaft_T4, rotor_blade_T4, craftingToolHardHammer, - rotor_blade_T4, ring_T4, rotor_blade_T4, - craftingToolWrench, rotor_blade_T4, shaft_T4, - rotor_T4); - } - - - } - - private static void addAdvancedHazmat() { - - ItemStack[] aBasicHazmatPieces = new ItemStack[] { - Ic2Items.hazmatHelmet.copy(), - Ic2Items.hazmatChestplate.copy(), - Ic2Items.hazmatLeggings.copy(), - Ic2Items.hazmatBoots.copy() - }; - - Material aRubber = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubber); - ItemStack aYellowWool = ItemUtils.getSimpleStack(Blocks.wool, 4, 1); - ItemStack aBlackWool = ItemUtils.getSimpleStack(Blocks.wool, 15, 1); - ItemStack aCoilIC2 = Ic2Items.coil; - ItemStack aPlateCobalt = CI.getTieredComponentOfMaterial(Materials.Cobalt, OrePrefixes.plate, 1); - ItemStack aGearSmallSteel = CI.getTieredComponentOfMaterial(Materials.Steel, OrePrefixes.gearGtSmall, 1); - ItemStack aGearSmallAluminium = CI.getTieredComponentOfMaterial(Materials.Aluminium, OrePrefixes.gearGtSmall, 1); - ItemStack aGearPotin = ALLOY.TUMBAGA.getGear(1); - ItemStack aGearSiliconCarbide = ALLOY.SILICON_CARBIDE.getGear(1); - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(2), - aBasicHazmatPieces[0], - ItemUtils.getSimpleStack(aYellowWool,16), - ItemUtils.getSimpleStack(aPlateCobalt, 4), - ItemUtils.getSimpleStack(aCoilIC2, 8), - ItemUtils.getSimpleStack(aGearSmallAluminium, 4), - }, - aRubber.getFluidStack(144 * 4), - GregtechItemList.Armour_Hazmat_Advanced_Helmet.get(1), - 30 * 20, - MaterialUtils.getVoltageForTier(2)); - - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(2), - aBasicHazmatPieces[1], - ItemUtils.getSimpleStack(aYellowWool, 64), - ItemUtils.getSimpleStack(aCoilIC2, 32), - ItemUtils.getSimpleStack(aPlateCobalt, 16), - ItemUtils.getSimpleStack(aGearSiliconCarbide, 8), - }, - aRubber.getFluidStack(144 * 10), - GregtechItemList.Armour_Hazmat_Advanced_Chest.get(1), - 90 * 20, - MaterialUtils.getVoltageForTier(2)); - - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(2), - aBasicHazmatPieces[2], - ItemUtils.getSimpleStack(aYellowWool, 32), - ItemUtils.getSimpleStack(aCoilIC2, 16), - ItemUtils.getSimpleStack(aPlateCobalt, 8), - ItemUtils.getSimpleStack(aGearSiliconCarbide, 4), - }, - aRubber.getFluidStack(144 * 8), - GregtechItemList.Armour_Hazmat_Advanced_Legs.get(1), - 75 * 20, - MaterialUtils.getVoltageForTier(2)); - - - CORE.RA.addSixSlotAssemblingRecipe( - new ItemStack[] { - CI.getNumberedAdvancedCircuit(2), - aBasicHazmatPieces[3], - ItemUtils.getSimpleStack(aBlackWool, 16), - ItemUtils.getSimpleStack(aCoilIC2, 6), - ItemUtils.getSimpleStack(aGearSmallSteel, 8), - ItemUtils.getSimpleStack(aGearPotin, 4), - }, - aRubber.getFluidStack(144 * 6), - GregtechItemList.Armour_Hazmat_Advanced_Boots.get(1), - 45 * 20, - MaterialUtils.getVoltageForTier(2)); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java b/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java deleted file mode 100644 index 9073f2ec7f..0000000000 --- a/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java +++ /dev/null @@ -1,277 +0,0 @@ -package gtPlusPlus.xmod.mekanism; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import gregtech.api.util.GT_ModHandler; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.NBTUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; - -public class HANDLER_Mekanism { - - public static void preInit(){ - if (LoadedMods.Mekanism){ - - } - } - - public static void init(){ - if (LoadedMods.Mekanism){ - - } - } - - public static void postInit(){ - if (LoadedMods.Mekanism && !LoadedMods.RedTech){ - - Logger.INFO("Performing GT recipe balance for Mek. now that it's Osmium is useless."); - - //Steel Casing - final ItemStack tSteelCasing = ItemUtils.simpleMetaStack("Mekanism:BasicBlock:8", 8, 1); - addNewRecipe( - "plateSteel", "blockGlass", "plateSteel", - "blockGlass", "plateStainlessSteel", "blockGlass", - "plateSteel", "blockGlass", "plateSteel", - tSteelCasing); - - //Energy Storage - final ItemStack tAdvancedEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); - NBTUtils.setString(tAdvancedEnergyCube, "tier", "Advanced"); - final ItemStack tBasicEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); - NBTUtils.setString(tBasicEnergyCube, "tier", "Basic"); - - //Gas tanks - final ItemStack tBasicGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); - NBTUtils.setInteger(tBasicGasTank, "tier", 0); - final ItemStack tAdvancedGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); - NBTUtils.setInteger(tAdvancedGasTank, "tier", 1); - final ItemStack tEliteGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); - NBTUtils.setInteger(tEliteGasTank, "tier", 2); - final ItemStack tMasterGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); - NBTUtils.setInteger(tMasterGasTank, "tier", 3); - - //Machines that use Osmium - final ItemStack tMachineBlock_Basic = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:5", 5, 1); - final ItemStack tMachineBlock = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:6", 6, 1); - - //Smelting - final ItemStack tMachineBlock_0_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_0_Basic, "recipeType", 0); - final ItemStack tMachineBlock_0 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_0, "recipeType", 0); - //Enriching - final ItemStack tMachineBlock_1_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_1_Basic, "recipeType", 1); - final ItemStack tMachineBlock_1 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_1, "recipeType", 1); - //Crushing - final ItemStack tMachineBlock_2_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_2_Basic, "recipeType", 2); - final ItemStack tMachineBlock_2 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_2, "recipeType", 2); - //Compressing - final ItemStack tMachineBlock_3_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_3_Basic, "recipeType", 3); - final ItemStack tMachineBlock_3 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_3, "recipeType", 3); - //Combining - final ItemStack tMachineBlock_4_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_4_Basic, "recipeType", 4); - final ItemStack tMachineBlock_4 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_4, "recipeType", 4); - //Purifying - final ItemStack tMachineBlock_5_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_5_Basic, "recipeType", 5); - final ItemStack tMachineBlock_5 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_5, "recipeType", 5); - //Injecting - final ItemStack tMachineBlock_6_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_6_Basic, "recipeType", 6); - final ItemStack tMachineBlock_6 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_6, "recipeType", 6); - //Infusing - final ItemStack tMachineBlock_7_Basic = tMachineBlock_Basic.copy(); - NBTUtils.setInteger(tMachineBlock_7_Basic, "recipeType", 7); - final ItemStack tMachineBlock_7 = tMachineBlock.copy(); - NBTUtils.setInteger(tMachineBlock_7, "recipeType", 7); - - //Infuser - final ItemStack tMachineBlock_8 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:8", 8, 1); - //Purification - final ItemStack tMachineBlock_9 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:9", 9, 1); - //Pump - final ItemStack tMachineBlock_12 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:12", 12, 1); - - // - final ItemStack tItem_1 = ItemUtils.simpleMetaStack("Mekanism:ElectrolyticCore", 0, 1); - // - final ItemStack tItem_2 = ItemUtils.simpleMetaStack("Mekanism:FactoryInstaller:1", 1, 1); - // - final ItemStack tItem_3 = ItemUtils.simpleMetaStack("Mekanism:SpeedUpgrade", 0, 1); - - //MiscItems - final String tAdvancedAlloy = "alloyAdvanced"; - final String tCircuitAdvanced = "circuitAdvanced"; - final ItemStack tMekBatterySimple = ItemUtils.simpleMetaStack("Mekanism:EnergyTablet", 0, 1); - - //Items - addNewRecipe( - tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, - "dustIron", tAdvancedAlloy, "dustGold", - tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, - tItem_1); - addNewRecipe( - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, - "plateStainlessSteel", "plankWood", "plateStainlessSteel", - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, - tItem_2); - addNewRecipe( - null, "blockGlass", null, - tAdvancedAlloy, "plateTungsten", tAdvancedAlloy, - null, "blockGlass", null, - tItem_3); - - //Power Storage - addNewRecipe( - tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, - "plateAluminium", tBasicEnergyCube, "plateAluminium", - tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, - tAdvancedEnergyCube); - - //Blocks - addNewRecipe( - "plateSteel", "craftingFurnace", "plateSteel", - "plateRedstone", "platePlatinum", "plateRedstone", - "plateSteel", "craftingFurnace", "plateSteel", - tMachineBlock_8); - addNewRecipe( - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, - "plateTitanium", ItemUtils.simpleMetaStack("Mekanism:MachineBlock", 0, 1), "plateTitanium", - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, - tMachineBlock_9); - addNewRecipe( - null, ItemUtils.getSimpleStack(Items.bucket), null, - tAdvancedAlloy, tSteelCasing, tAdvancedAlloy, - "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", - tMachineBlock_12); - - //Machines - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_0_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_0); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_1_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_1); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_2_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_2); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_3_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_3); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_4_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_4); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_5_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_5); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_6_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_6); - addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_7_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_7); - - //Gas Tanks - addNewRecipe( - "plateRedstone", "plateAluminium", "plateRedstone", - "plateAluminium", null, "plateAluminium", - "plateRedstone", "plateAluminium", "plateRedstone", - tBasicGasTank); - addNewRecipe( - tAdvancedAlloy, "plateStainlessSteel", tAdvancedAlloy, - "plateStainlessSteel", tBasicGasTank, "plateStainlessSteel", - tAdvancedAlloy, "plateStainlessSteel", tAdvancedAlloy, - tAdvancedGasTank); - addNewRecipe( - "alloyElite", "plateTitanium", "alloyElite", - "plateTitanium", tAdvancedGasTank, "plateTitanium", - "alloyElite", "plateTitanium", "alloyElite", - tEliteGasTank); - addNewRecipe( - "alloyUltimate", "plateTungsten", "alloyUltimate", - "plateTungsten", tEliteGasTank, "plateTungsten", - "alloyUltimate", "plateTungsten", "alloyUltimate", - tMasterGasTank); - } - } - - private static boolean addNewRecipe( - final Object InputItem1, final Object InputItem2, final Object InputItem3, - final Object InputItem4, final Object InputItem5, final Object InputItem6, - final Object InputItem7, final Object InputItem8, final Object InputItem9, - final ItemStack OutputItem){ - - /*if (removeRecipe(OutputItem)){ - return RecipeUtils.recipeBuilder( - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9, - OutputItem); - }*/ - - removeRecipe(OutputItem); - return RecipeUtils.recipeBuilder( - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9, - OutputItem); - } - - private static boolean removeRecipe(final ItemStack item){ - Class mekUtils; - boolean removed = false; - try { - mekUtils = Class.forName("mekanism.common.util.RecipeUtils"); - if (mekUtils != null){ - final Method mRemoveRecipe = mekUtils.getDeclaredMethod("removeRecipes", ItemStack.class); - if (mRemoveRecipe != null){ - removed = (boolean) mRemoveRecipe.invoke(null, item); - if (!removed) { - removed = (boolean) mRemoveRecipe.invoke(mekUtils, item); - } - } - } - } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - Logger.INFO("[Mek] Failed to use the built-in recipe remover from Mekanism."); - } - if (!removed){ - removed = GT_ModHandler.removeRecipeByOutput(item); - } - Logger.INFO("[Mek] Successfully removed the recipe for "+item.getDisplayName()+"."); - return removed; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java b/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java deleted file mode 100644 index a190511b02..0000000000 --- a/src/Java/gtPlusPlus/xmod/ob/GliderHandler.java +++ /dev/null @@ -1,127 +0,0 @@ -package gtPlusPlus.xmod.ob; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; - -public class GliderHandler { - - private static final AutoMap mDimensionalBlacklist = new AutoMap(); - - @SubscribeEvent - public void onItemUsageEx(final PlayerInteractEvent event) { - if (event != null && event.entityPlayer != null) { - - if (event.action != Action.RIGHT_CLICK_BLOCK && event.action != Action.RIGHT_CLICK_AIR) { - Logger.WARNING("[OpenBlocks] Wrong type of PlayerInteractEvent, skipping."); - } - if (event.entityPlayer.worldObj.isRemote) { - return; - } - - ItemStack aItem = PlayerUtils.getItemStackInPlayersHand(event.entityPlayer); - if (ItemUtils.checkForInvalidItems(aItem)) { - Class aItemGliderClass = ReflectionUtils.getClass("openblocks.common.item.ItemHangGlider"); - if (aItemGliderClass.isInstance(aItem.getItem())) { - if (!canPlayerGlideInThisDimension(event.entityPlayer)){ - event.setCanceled(true); - PlayerUtils.messagePlayer(event.entityPlayer, "Glider is blacklisted in this dimension."); - Logger.WARNING("[OpenBlocks] "+event.entityPlayer.getCommandSenderName()+" tried to use glider in dimension "+event.entityPlayer.getEntityWorld().provider.dimensionId+"."); - } - else { - Logger.WARNING("[OpenBlocks] "+event.entityPlayer.getCommandSenderName()+" used glider in dimension "+event.entityPlayer.getEntityWorld().provider.dimensionId+"."); - } - } - else { - Logger.WARNING("[OpenBlocks] Item was not a glider."); - } - } - else { - Logger.WARNING("[OpenBlocks] Bad Item in player hand."); - } - } - else { - Logger.WARNING("[OpenBlocks] Bad event or player."); - } - - - } - - private static final boolean canPlayerGlideInThisDimension(EntityPlayer aPlayer) { - World aWorld = aPlayer.worldObj; - if (aWorld == null) { - return false; - } - else { - if (aWorld.provider == null) { - return false; - } - else { - int aDimID = aWorld.provider.dimensionId; - for (int i : mDimensionalBlacklist) { - if (i == aDimID) { - return false; - } - } - } - } - return true; - } - - static final void populateBlacklist() { - if (!mDimensionalBlacklist.isEmpty()) { - return; - } - File aBlacklist = gtPlusPlus.core.util.data.FileUtils.getFile("config/GTplusplus/", "GliderBlacklist", "cfg"); - List lines = new ArrayList(); - try { - lines = org.apache.commons.io.FileUtils.readLines(aBlacklist, "utf-8"); - } catch (IOException e) { - e.printStackTrace(); - } - if (lines.isEmpty()) { - FileWriter fw; - try { - String aInfoTip = "# Add one dimension ID per line. Lines with a # are comments and are ignored."; - fw = new FileWriter(aBlacklist); - fw.write(aInfoTip); - fw.close(); - lines.add(aInfoTip); - } catch (IOException e) { - e.printStackTrace(); - } - } - if (!lines.isEmpty()) { - for (String s : lines) { - if (s != null && !s.equals("") && !s.contains("#")) { - s = StringUtils.remove(s, " "); - s = StringUtils.trim(s); - s = StringUtils.remove(s, ","); - Integer g = Integer.decode(s); - if (g != null) { - mDimensionalBlacklist.add(g); - Logger.INFO("[OpenBlocks] Added Dimension with ID '"+g+"' to Blacklist for Glider."); - } - } - } - } - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java b/src/Java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java deleted file mode 100644 index c1b678f5ee..0000000000 --- a/src/Java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java +++ /dev/null @@ -1,38 +0,0 @@ -package gtPlusPlus.xmod.ob; - -import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.base.BaseItemBurnable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.railcraft.utils.RailcraftUtils; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -public class HANDLER_OpenBlocks { - - public static void preInit() { - if (LoadedMods.OpenBlocks) { - - } - } - - public static void init() { - if (LoadedMods.OpenBlocks) { - GliderHandler.populateBlacklist(); - } - } - - public static void postInit() { - if (LoadedMods.OpenBlocks) { - Utils.registerEvent(new GliderHandler()); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/ob/SprinklerHandler.java b/src/Java/gtPlusPlus/xmod/ob/SprinklerHandler.java deleted file mode 100644 index 85f8ded290..0000000000 --- a/src/Java/gtPlusPlus/xmod/ob/SprinklerHandler.java +++ /dev/null @@ -1,66 +0,0 @@ -package gtPlusPlus.xmod.ob; - -import java.util.HashMap; - -import com.google.common.base.Objects; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -/** - * Wrapper Class to assist in handling the OB Sprinkler. - * @author Alkalus - * - */ -public class SprinklerHandler { - - - private static final HashMap mValidFerts = new HashMap(); - - /** - * @return - A valid {@link Map} of all Fertilizers for the OB Sprinkler. - */ - public static HashMap getValidFerts() { - return mValidFerts; - } - - /** - * @param aFert - An {@link ItemStack} which is to be registered for OB Sprinklers. - */ - public static void registerSprinklerFertilizer(ItemStack aFert) { - int aHash = Objects.hashCode(aFert.getItem(), aFert.getItemDamage()); - if (!mValidFerts.containsKey(aHash)) { - Logger.INFO("Registering "+aFert.getDisplayName()+" as OB Sprinkler Fertilizer."); - mValidFerts.put(aHash, aFert.copy()); - } - } - - public static void registerModFerts() { - ItemStack f; - - f = new ItemStack(Items.dye, 1, 15); - SprinklerHandler.registerSprinklerFertilizer(f); - - if (LoadedMods.Forestry) { - f = ItemUtils.getCorrectStacktype("Forestry:fertilizerBio", 1); - if (f != null) { - registerSprinklerFertilizer(f); - } - f = ItemUtils.getCorrectStacktype("Forestry:fertilizerCompound", 1); - if (f != null) { - registerSprinklerFertilizer(f); - } - } - if (LoadedMods.IndustrialCraft2) { - f = ItemUtils.getCorrectStacktype("IC2:itemFertilizer", 1); - if (f != null) { - registerSprinklerFertilizer(f); - } - - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java b/src/Java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java deleted file mode 100644 index a21a759a77..0000000000 --- a/src/Java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java +++ /dev/null @@ -1,83 +0,0 @@ -package gtPlusPlus.xmod.railcraft; - -import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; - -import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.item.base.BaseItemBurnable; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.railcraft.utils.RailcraftUtils; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -public class HANDLER_Railcraft { - - - - public static void preInit() { - if (LoadedMods.Railcraft) { - - } - - //Register Custom Coal Coke - ModItems.itemCoalCoke = new BaseItemBurnable("itemCoalCoke", "Coking Coal", tabMisc, 64, 0, "Used for metallurgy.", "fuelCoke", 3200, 0).setTextureName(CORE.MODID + ":burnables/itemCoalCoke"); - - //Add in things that once existed in 1.5.2 - ModItems.itemCactusCharcoal = new BaseItemBurnable("itemCactusCharcoal", "Cactus Charcoal", tabMisc, 64, 0, "Used for smelting.", "fuelCactusCharcoal", 400, 0).setTextureName(CORE.MODID + ":burnables/itemCactusCharcoal"); - ModItems.itemSugarCharcoal = new BaseItemBurnable("itemSugarCharcoal", "Sugar Charcoal", tabMisc, 64, 0, "Used for smelting.", "fuelSugarCharcoal", 400, 0).setTextureName(CORE.MODID + ":burnables/itemSugarCharcoal"); - ModItems.itemCactusCoke = new BaseItemBurnable("itemCactusCoke", "Cactus Coke", tabMisc, 64, 0, "Used for smelting.", "fuelCactusCoke", 800, 0).setTextureName(CORE.MODID + ":burnables/itemCactusCoke"); - ModItems.itemSugarCoke = new BaseItemBurnable("itemSugarCoke", "Sugar Coke", tabMisc, 64, 0, "Used for smelting.", "fuelSugarCoke", 800, 0).setTextureName(CORE.MODID + ":burnables/itemSugarCoke"); - - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemCactusCharcoal), "itemCharcoalCactus"); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemCactusCoke), "itemCokeCactus"); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemSugarCharcoal), "itemCharcoalSugar"); - ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemSugarCoke), "itemCokeSugar"); - - } - - public static void init() { - if (LoadedMods.Railcraft) { - - } - } - - public static void postInit() { - if (LoadedMods.Railcraft) { - - } - generateCokeOvenRecipes(); - } - - - private static void generateCokeOvenRecipes() { - ItemStack[] aInputs1 = new ItemStack[] { - ItemUtils.getSimpleStack(Blocks.cactus), - ItemUtils.getSimpleStack(Items.reeds) - }; - ItemStack[] aInputs2 = new ItemStack[] { - ItemUtils.getSimpleStack(ModItems.itemCactusCharcoal), - ItemUtils.getSimpleStack(ModItems.itemSugarCharcoal) - }; - ItemStack[] aOutputs = new ItemStack[] { - ItemUtils.getSimpleStack(ModItems.itemCactusCoke), - ItemUtils.getSimpleStack(ModItems.itemSugarCoke) - }; - for (int i=0;i CLASS_MAIN = ReflectionUtils.getClass("xreliquary.Reliquary"); - private static Field FIELD_CONTENT = ReflectionUtils.getField(CLASS_MAIN, "CONTENT"); - private static Object OBJECT_CONTENT = ReflectionUtils.getFieldValue(FIELD_CONTENT); - private static Method METHOD_GETITEM = ReflectionUtils.getMethod(OBJECT_CONTENT, "getItem", new Class[] {String.class}); - - public static Item getItem(String name) { - try { - return (Item) METHOD_GETITEM.invoke(OBJECT_CONTENT, name); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - return null; - } - - public static ItemStack emptyVoidTear() { - return new ItemStack(getItem("void_tear_empty"), 1, 0); - } - - public static ItemStack glowingWater() { - return new ItemStack(getItem("glowing_water")); - } - - public static ItemStack emptyVial() { - return new ItemStack(getItem("potion"), 1, 0); - } - - public static ItemStack emperorChalice() { - return new ItemStack(getItem("emperor_chalice")); - } - - public static ItemStack infernalChalice() { - return new ItemStack(getItem("infernal_chalice")); - } - - public static ItemStack witherSkull() { - return new ItemStack(Items.skull, 1, 1); - } - - public static ItemStack roseBush() { - return new ItemStack(Blocks.double_plant, 1, 4); - } - - public static ItemStack blackWool() { - return new ItemStack(Blocks.wool, 1, 15); - } - - public static ItemStack lapis() { - return new ItemStack(Items.dye, 1, 4); - } - - public static ItemStack gunPart(int i, int m) { - return new ItemStack(getItem("gun_part"), i, m); - } - - public static ItemStack magazine(int m) { - return magazine(1, m); - } - - public static ItemStack magazine(int i, int m) { - return new ItemStack(getItem("magazine"), i, m); - } - - public static ItemStack bullet(int m) { - return bullet(1, m); - } - - public static ItemStack bullet(int i, int m) { - return new ItemStack(getItem("bullet"), i, m); - } - - public static ItemStack ingredient(int m) { - return new ItemStack(getItem("mob_ingredient"), 1, m); - } - - public static ItemStack enderHeart() { - return ingredient(11); - } - - public static ItemStack creeperGland() { - return ingredient(3); - } - - public static ItemStack slimePearl() { - return ingredient(4); - } - - public static ItemStack batWing() { - return ingredient(5); - } - - public static ItemStack ribBone() { - return ingredient(0); - } - - public static ItemStack witherRib() { - return ingredient(1); - } - - public static ItemStack stormEye() { - return ingredient(8); - } - - public static ItemStack fertileEssence() { - return ingredient(9); - } - - public static ItemStack frozenCore() { - return ingredient(10); - } - - public static ItemStack moltenCore() { - return ingredient(7); - } - - public static ItemStack zombieHeart() { - return ingredient(6); - } - - public static ItemStack infernalClaw() { - return ingredient(13); - } - - public static ItemStack shellFragment() { - return ingredient(14); - } - - public static ItemStack squidBeak() { - return ingredient(12); - } - - public static ItemStack spiderFangs() { - return ingredient(2); - } - - public static ItemStack heartPearl(int m) { - return new ItemStack(getItem("heart_pearl"), 1, m); - } - - public static ItemStack nianZhu(int m) { - return new ItemStack(getItem("heart_zhu"), 1, m); - } - - public static ItemStack emptyVoidSatchel() { - return new ItemStack(getItem("void_tear_empty"), 1, 0); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java b/src/Java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java deleted file mode 100644 index 6086b74ec4..0000000000 --- a/src/Java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java +++ /dev/null @@ -1,47 +0,0 @@ -package gtPlusPlus.xmod.reliquary.util; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.ItemStack; - -public class AlkahestRecipeWrapper { - public ItemStack item = null; - public int yield = 0; - public int cost = 0; - public String dictionaryName = null; - - public AlkahestRecipeWrapper(ItemStack par1, int par2, int par3) { - this.item = par1; - this.yield = par2; - this.cost = par3; - } - - public AlkahestRecipeWrapper(String par1, int par2, int par3) { - this.dictionaryName = par1; - this.yield = par2; - this.cost = par3; - } - - public Object getOriginalRecipe() { - try { - Constructor o; - if (dictionaryName == null) { - o = ReflectionUtils.getClass("xreliquary.util.alkahestry.AlkahestRecipe").getConstructor(ItemStack.class, int.class, int.class); - } - else { - o = ReflectionUtils.getClass("xreliquary.util.alkahestry.AlkahestRecipe").getConstructor(String.class, int.class, int.class); - } - - Object r = o.newInstance(dictionaryName == null ? item : dictionaryName, yield, cost); - if (r != null) { - return r; - } - - } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - // oops - } - return null; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java b/src/Java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java deleted file mode 100644 index 1133e67fe6..0000000000 --- a/src/Java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java +++ /dev/null @@ -1,56 +0,0 @@ -package gtPlusPlus.xmod.reliquary.util; - -import static gtPlusPlus.core.lib.CORE.GTNH; - -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.reliquary.item.ReliquaryItems; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -public class ReliquaryRecipeHandler { - - public static boolean removeAlkahestRecipe(ItemStack aOutput) { - return false; - } - - public static boolean addAlkahestRecipe(ItemStack[] aInputs, ItemStack aOutput) { - if (aInputs == null || aInputs.length <= 0 || aInputs.length > 9) { - return false; - } - return false; - } - - public static void gregifyDefaultRecipes() { - Logger.INFO("Gregifying Reliquary recipes."); - if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.glowingWater())) { - Logger.INFO("Removing recipe for Glowing Water."); - } - if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.emptyVoidTear())) { - Logger.INFO("Removing recipe for Empty Void Tears."); - } - if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.emperorChalice())) { - Logger.INFO("Removing recipe for the Emperor Chalice."); - } - if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.infernalChalice())) { - Logger.INFO("Removing recipe for the Infernal Chalice."); - } - Logger.INFO("Finished removing original recipes."); - - // Add new recipes - if (CORE.RA.addChemicalRecipe(ALLOY.ENERGYCRYSTAL.getDust(4), ReliquaryItems.emptyVial(), FluidUtils.getHotWater(2000), null, ReliquaryItems.glowingWater(), 20 * 30, 500)) { - Logger.INFO("Added new recipe for Glowing Water."); - } - if (CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.simpleMetaStack(Items.ender_eye, 0, 32), CI.getFieldGenerator(5, GTNH ? 8 : 4), CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 16 : 8), CI.getEmitter(3, 20)}, FluidUtils.getUUM(50), ReliquaryItems.emptyVoidTear(), 20 * 2000, 2000)){ - Logger.INFO("Added new recipe for Empty Void Tears."); - } - Logger.INFO("Finished adding new recipes."); - - } -} diff --git a/src/Java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java b/src/Java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java deleted file mode 100644 index f39a69dfbc..0000000000 --- a/src/Java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.sc2; - -import gtPlusPlus.core.lib.LoadedMods; -import vswe.stevescarts.ModuleData.GppModuleData; - -public class HANDLER_SC2 { - - public synchronized static void preInit() { - if (LoadedMods.StevesCarts){ - GppModuleData.loadGpp(); - } - } - - public static void init(){ - } - - public static void postInit(){ - } - - -} diff --git a/src/Java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java b/src/Java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java deleted file mode 100644 index dfaec8b703..0000000000 --- a/src/Java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java +++ /dev/null @@ -1,117 +0,0 @@ -package gtPlusPlus.xmod.sc2.modules; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import static net.minecraft.init.Blocks.farmland; - -import java.lang.reflect.Field; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockCrops; -import net.minecraft.item.Item; -import net.minecraft.item.ItemSeeds; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import vswe.stevescarts.Carts.MinecartModular; -import vswe.stevescarts.Modules.ICropModule; -import vswe.stevescarts.Modules.Addons.ModuleAddon; - -public class ModuleExoticSeeds extends ModuleAddon implements ICropModule { - - public ModuleExoticSeeds(MinecartModular cart) { - super(cart); - } - - private synchronized Block getBlockFromItemSeeds(ItemStack seed) { - try { - - Item seedItem = seed.getItem(); - if (!(seedItem instanceof ItemSeeds)) return null; - - Block cropBlock = (Block) ReflectionUtils.getField(ItemSeeds.class, "field_150925_a").get(seedItem); - - return cropBlock; - } catch (Throwable t) { - - } - return null; - } - - @Override - public boolean isSeedValid(ItemStack seed) { - return getBlockFromItemSeeds(seed) != null; - } - - @Override - public Block getCropFromSeed(ItemStack seed) { - return getBlockFromItemSeeds(seed); - } - - @Override - public boolean isReadyToHarvest(int x, int y, int z) { - World world = getCart().worldObj; - Block b = world.getBlock(x, y, z); - int m = world.getBlockMetadata(x, y, z); - - //If Forestry is loaded, let's make this upgrade convert farmland to Humus. - /*if (LoadedMods.Forestry) { - Block mFarmLand = world.getBlock(x, y-1, z); - if (mFarmLand == farmland) { - Block h = tryGetHumus(); - if (h != farmland) { - world.setBlock(x, y-1, z, h); - } - } - }*/ - - - return b instanceof BlockCrops && m == 7; - } - - - - /** - * Static Class & Block References for Forestry content. - * Stops Forestry being a hard requirement for this feature without having to make @Optional annotations. - */ - - private static Class mForestryHumusBlockClass; - private static Class mForestryBlockRegistryCoreClass; - private static Block mForestryHumusBlock; - - private synchronized Block tryGetHumus() { - if (!LoadedMods.Forestry) { - return farmland; - } - else { - if (mForestryHumusBlockClass == null || mForestryHumusBlock == null) { - try { - mForestryHumusBlockClass = ReflectionUtils.getClass("forestry.plugins.PluginCore"); - Field blocks = ReflectionUtils.getField(mForestryHumusBlockClass, "blocks"); - if (blocks != null) { - Object blockRegistryCoreObject = blocks.get(null); - mForestryBlockRegistryCoreClass = ReflectionUtils.getClass("forestry.core.blocks.BlockRegistryCore"); - if (mForestryBlockRegistryCoreClass != null && blockRegistryCoreObject != null) { - Field soil = ReflectionUtils.getField(mForestryBlockRegistryCoreClass, "soil"); - if (soil != null) { - Block testHumus = (Block) soil.get(blockRegistryCoreObject); - if (testHumus != null) { - mForestryHumusBlock = testHumus; - } - } - } - } - } - catch (Throwable t) { - t.printStackTrace(); - } - } - if (mForestryHumusBlock != null) { - return mForestryHumusBlock; - } - } - return farmland; - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java b/src/Java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java deleted file mode 100644 index 11cc5da89c..0000000000 --- a/src/Java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java +++ /dev/null @@ -1,61 +0,0 @@ -package gtPlusPlus.xmod.sol; - -import java.lang.reflect.Constructor; - -import cpw.mods.fml.common.registry.GameRegistry; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.Item; - -public class HANDLER_SpiceOfLife { - - public static final void preInit() { - if (LoadedMods.SpiceOfLife) { - //Add a new Lunch Box with a reasonable amount of slots - tryRegisterNewLunchBox("foodcrate", 12); - } - } - - public static final void init() { - if (LoadedMods.SpiceOfLife) { - - } - } - - public static final void postInit() { - if (LoadedMods.SpiceOfLife) { - - } - } - - private static boolean tryRegisterNewLunchBox(String aItemName, int aSlots) { - Item aNewBox = getNewLunchBox(aItemName, aSlots); - if (aNewBox != null) { - GameRegistry.registerItem(aNewBox, aItemName); - Logger.INFO("[Spice of Life] Registered "+aItemName+" as a new food container."); - return true; - } - return false; - } - - private static Item getNewLunchBox(String aItemName, int aSlots) { - Class aItemFoodContainer = ReflectionUtils.getClass("squeek.spiceoflife.items.ItemFoodContainer"); - if (aItemFoodContainer != null) { - Constructor aItemFoodContainerConstructor = ReflectionUtils.getConstructor(aItemFoodContainer, new Class[] {String.class, int.class}); - if (aItemFoodContainerConstructor != null) { - Object aNewObject = ReflectionUtils.createNewInstanceFromConstructor(aItemFoodContainerConstructor, new Object[] {aItemName, aSlots}); - if (aNewObject instanceof Item) { - Item aNewInstance = (Item) aNewObject; - return aNewInstance; - } - } - } - return null; - } - - - - - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java b/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java deleted file mode 100644 index b1353cc481..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java +++ /dev/null @@ -1,59 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectCompat; -import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectStack; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class HANDLER_Thaumcraft { - - public static GTPP_AspectCompat sThaumcraftCompat; - public static Item mResearchNotes; - public static final AutoMap> sItemsToGetAspects = new AutoMap>(); - - public static void preInit(){ - if (LoadedMods.Thaumcraft){ - } - } - - public static void init(){ - if (LoadedMods.Thaumcraft){ - try { - mResearchNotes = (Item) ReflectionUtils.getField(ReflectionUtils.getClass("thaumcraft.common.config.ConfigItems"), "itemResearchNotes").get(null); - } - catch (IllegalArgumentException | IllegalAccessException e) { - mResearchNotes = Items.paper; - } - } - } - - public static void postInit(){ - if (LoadedMods.Thaumcraft){ - //Add Custom Aspects - - - //sThaumcraftCompat = (IThaumcraftCompat) GT_Utility.callConstructor("gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectCompat", 0, null, GT_Values.D1, new Object[0]); - //sThaumcraftCompat = new GTPP_AspectCompat(); - - /*if (!sItemsToGetAspects.isEmpty() && false) { - for (Pair j : sItemsToGetAspects) { - if (j .getKey() != null && (j.getValue() != null && j.getValue().length > 0)) { - List list = Arrays.asList(j.getValue()); - if (ThaumcraftUtils.registerThaumcraftAspectsToItem(j.getKey(), list, true)) { - Logger.WARNING("[Aspect] Successfully added Aspects to "+j.getKey().getDisplayName()+"."); - } - else { - Logger.WARNING("[Aspect] Failed adding Aspects to "+j.getKey().getDisplayName()+"."); - } - } - } - }*/ - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java b/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java deleted file mode 100644 index 56ad95c5e3..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java +++ /dev/null @@ -1,200 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.aspect; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; - -import gregtech.api.enums.TC_Aspects; -import gregtech.common.GT_ThaumcraftCompat; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; -import net.minecraft.util.ResourceLocation; - -public class GTPP_AspectCompat { - - public static volatile Method m = null; - - private static HashMap mAspectCache = new LinkedHashMap(); - - - public static TC_Aspect_Wrapper ASPECT_BALANCE; - public static TC_Aspect_Wrapper ASPECT_LUST; - public static TC_Aspect_Wrapper ASPECT_STARBOUND; - public static TC_Aspect_Wrapper ASPECT_TOXIC; - public static TC_Aspect_Wrapper ASPECT_HEAVEN; - - -/* TC_Aspects.AER.mAspect = Aspect.AIR; - TC_Aspects.ALIENIS.mAspect = Aspect.ELDRITCH; - TC_Aspects.AQUA.mAspect = Aspect.WATER; - TC_Aspects.ARBOR.mAspect = Aspect.TREE; - TC_Aspects.AURAM.mAspect = Aspect.AURA; - TC_Aspects.BESTIA.mAspect = Aspect.BEAST; - TC_Aspects.COGNITIO.mAspect = Aspect.MIND; - TC_Aspects.CORPUS.mAspect = Aspect.FLESH; - TC_Aspects.EXANIMIS.mAspect = Aspect.UNDEAD; - TC_Aspects.FABRICO.mAspect = Aspect.CRAFT; - TC_Aspects.FAMES.mAspect = Aspect.HUNGER; - TC_Aspects.GELUM.mAspect = Aspect.COLD; - TC_Aspects.GRANUM.mAspect = Aspect.PLANT; - TC_Aspects.HERBA.mAspect = Aspect.PLANT; - TC_Aspects.HUMANUS.mAspect = Aspect.MAN; - TC_Aspects.IGNIS.mAspect = Aspect.FIRE; - TC_Aspects.INSTRUMENTUM.mAspect = Aspect.TOOL; - TC_Aspects.ITER.mAspect = Aspect.TRAVEL; - TC_Aspects.LIMUS.mAspect = Aspect.SLIME; - TC_Aspects.LUCRUM.mAspect = Aspect.GREED; - TC_Aspects.LUX.mAspect = Aspect.LIGHT; - TC_Aspects.MACHINA.mAspect = Aspect.MECHANISM; - TC_Aspects.MESSIS.mAspect = Aspect.CROP; - TC_Aspects.METALLUM.mAspect = Aspect.METAL; - TC_Aspects.METO.mAspect = Aspect.HARVEST; - TC_Aspects.MORTUUS.mAspect = Aspect.DEATH; - TC_Aspects.MOTUS.mAspect = Aspect.MOTION; - TC_Aspects.ORDO.mAspect = Aspect.ORDER; - TC_Aspects.PANNUS.mAspect = Aspect.CLOTH; - TC_Aspects.PERDITIO.mAspect = Aspect.ENTROPY; - TC_Aspects.PERFODIO.mAspect = Aspect.MINE; - TC_Aspects.PERMUTATIO.mAspect = Aspect.EXCHANGE; - TC_Aspects.POTENTIA.mAspect = Aspect.ENERGY; - TC_Aspects.PRAECANTATIO.mAspect = Aspect.MAGIC; - TC_Aspects.SANO.mAspect = Aspect.HEAL; - TC_Aspects.SENSUS.mAspect = Aspect.SENSES; - TC_Aspects.SPIRITUS.mAspect = Aspect.SOUL; - TC_Aspects.TELUM.mAspect = Aspect.WEAPON; - TC_Aspects.TERRA.mAspect = Aspect.EARTH; - TC_Aspects.TEMPESTAS.mAspect = Aspect.WEATHER; - TC_Aspects.TENEBRAE.mAspect = Aspect.DARKNESS; - TC_Aspects.TUTAMEN.mAspect = Aspect.ARMOR; - TC_Aspects.VACUOS.mAspect = Aspect.VOID; - TC_Aspects.VENENUM.mAspect = Aspect.POISON; - TC_Aspects.VICTUS.mAspect = Aspect.LIFE; - TC_Aspects.VINCULUM.mAspect = Aspect.TRAP; - TC_Aspects.VITIUM.mAspect = Aspect.TAINT; - TC_Aspects.VITREUS.mAspect = Aspect.CRYSTAL; - TC_Aspects.VOLATUS.mAspect = Aspect.FLIGHT;*/ - - - public GTPP_AspectCompat() { - - - // Generate all existing Aspects as TC_Aspects - LinkedHashMap h = TC_Aspect_Wrapper.getVanillaAspectList(); - for (String g : h.keySet()) { - Object aBaseAspect = h.get(g); - if (aBaseAspect != null && TC_Aspect_Wrapper.isObjectAnAspect(aBaseAspect)) { - TC_Aspect_Wrapper aS = TC_Aspect_Wrapper.getAspect(g); - if (aS != null) { - mAspectCache.put(g, aS); - continue; - } - } - } - - - - - // Custom Aspects - ASPECT_BALANCE = - new TC_Aspect_Wrapper( - "Sagrausten", - Utils.rgbtoHexValue(125, 125, 125), - new TC_Aspect_Wrapper[]{ - ASPECT_STARBOUND, - get(TC_Aspects.RADIO) - }, - new ResourceLocation(CORE.MODID+":textures/aspects/" + "Sagrausten.png"), - false, - 1, - "Ancient Knowledge"); - - ASPECT_LUST = - new TC_Aspect_Wrapper( - "Slusium", - Utils.rgbtoHexValue(175, 125, 25), - new TC_Aspect_Wrapper[]{ - ASPECT_BALANCE, - get(TC_Aspects.NEBRISUM) - }, - new ResourceLocation(CORE.MODID+":textures/aspects/" + "Slusium.png"), - false, - 1, - "Warped Thoughts"); - - ASPECT_STARBOUND = - new TC_Aspect_Wrapper( - "Xenil", - Utils.rgbtoHexValue(25, 25, 25), - new TC_Aspect_Wrapper[]{ - get(TC_Aspects.MAGNETO), - get(TC_Aspects.RADIO)}, - new ResourceLocation(CORE.MODID+":textures/aspects/" + "Xenil.png"), - false, - 1, - "A beginning to something new"); - - ASPECT_TOXIC = - new TC_Aspect_Wrapper( - "Xablum", - Utils.rgbtoHexValue(25, 185, 25), - new TC_Aspect_Wrapper[]{ - ASPECT_STARBOUND, - ASPECT_LUST - }, - new ResourceLocation(CORE.MODID+":textures/aspects/" + "Xablum.png"), - false, - 1, - "Insanity"); - - ASPECT_HEAVEN = - new TC_Aspect_Wrapper( - "Zetralt", - Utils.rgbtoHexValue(225, 225, 225), - new TC_Aspect_Wrapper[]{ - get(TC_Aspects.AURAM), - ASPECT_TOXIC - }, - new ResourceLocation(CORE.MODID+":textures/aspects/" + "Zetralt.png"), - false, - 1, - "Control, Respect, Glory"); - - - } - - private TC_Aspect_Wrapper get(TC_Aspects aGtObjects) { - try { - return TC_Aspect_Wrapper.generate(aGtObjects.mAspect); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - return null; - } - } - - public static synchronized final TC_AspectList_Wrapper getTC_AspectList_Wrapper(final List aAspects) { - TC_AspectList_Wrapper o = null; - try { - if (m == null || (m != null && !m.isAccessible())) { - m = GT_ThaumcraftCompat.class.getDeclaredMethod("getTC_AspectList_Wrapper", List.class); - m.setAccessible(true); - } - if (m != null) { - o = (TC_AspectList_Wrapper) m.invoke(null, aAspects); - } - } - catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - if (o == null) { - Logger.REFLECTION("[Aspect] Did not retrieve valid aspect list from reflective invocation."); - } - return o; - } - - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java b/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java deleted file mode 100644 index 23e9035f40..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.aspect; - -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; - -public class GTPP_AspectStack { - - public final TC_Aspect_Wrapper mAspect; - public final int mAmount; - - public GTPP_AspectStack(TC_Aspect_Wrapper aAspect, int aAmount) { - mAspect = aAspect; - mAmount= aAmount; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java b/src/Java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java deleted file mode 100644 index dda5a62b27..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java +++ /dev/null @@ -1,90 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.commands; - -import static gtPlusPlus.core.util.minecraft.PlayerUtils.messagePlayer; - -import java.util.ArrayList; -import java.util.List; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.commands.CommandUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.thaumcraft.objects.ThreadAspectScanner; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; - -public class CommandDumpAspects implements ICommand { - private final List aliases; - public static long mLastScanTime = System.currentTimeMillis(); - - public CommandDumpAspects() { - this.aliases = new ArrayList<>(); - this.aliases.add("DA"); - this.aliases.add("da"); - this.aliases.add("dumpaspects"); - this.aliases.add("dumptc"); - Logger.INFO("Registered Aspect Dump Command."); - } - - @Override - public int compareTo(final Object o) { - return 0; - } - - @Override - public String getCommandName() { - return "DumpAspects"; - } - - @Override - public String getCommandUsage(final ICommandSender var1) { - return "/DumpAspects"; - } - - @Override - public List getCommandAliases() { - return this.aliases; - } - - @Override - public void processCommand(final ICommandSender S, final String[] argString) { - final EntityPlayer P = CommandUtils.getPlayer(S); - final long T = System.currentTimeMillis(); - final long D = T - mLastScanTime; - final int Z = (int) (D / 1000); - if (Z >= 30) { - // Lets process this in the Background on a new Thread. - Thread t = createNewThread(); - messagePlayer(P, "Beginning to dump information about all items/blocks & their aspects to file."); - messagePlayer(P, "Please do not close your game during this process, you will be notified upon completion."); - t.start(); - } else { - messagePlayer(P, "Your last run of DA was less than 30 seconds ago, please wait " + (30 - Z) - + " seconds before trying again."); - } - } - - @Override - public boolean canCommandSenderUseCommand(final ICommandSender var1) { - final EntityPlayer P = CommandUtils.getPlayer(var1); - if (P == null || !PlayerUtils.isPlayerOP(P)) { - return false; - } - return true; - } - - @Override - public List addTabCompletionOptions(final ICommandSender var1, final String[] var2) { - return null; - } - - @Override - public boolean isUsernameIndex(final String[] var1, final int var2) { - return false; - } - - private static Thread createNewThread() { - return new ThreadAspectScanner(); - } - -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java deleted file mode 100644 index fdcf7b8498..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java +++ /dev/null @@ -1,158 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.FileUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public class ThreadAspectScanner extends Thread { - - public static boolean mDoWeScan = false; - private static final Map> mAllGameContent = new HashMap>(); - public final File mAspectCacheFile; - - public ThreadAspectScanner() { - mAspectCacheFile = FileUtils.getFile("config/GTplusplus", "AspectInfo", "txt"); - mDoWeScan = true; - } - - private void tryCacheObject(ItemStack aStack) { - if (aStack == null) { - return; - } - String nameKey; - try { - nameKey = ItemUtils.getUnlocalizedItemName(aStack); - } catch (NullPointerException n) { - try { - nameKey = Utils.sanitizeString(aStack.getDisplayName().toLowerCase()); - } catch (NullPointerException n2) { - try { - nameKey = aStack.getItem().getUnlocalizedName(); - } catch (NullPointerException n3) { - nameKey = "BadItemsGalore"; - } - } - } - AutoMap m = new AutoMap(); - if (mAllGameContent.containsKey(nameKey)) { - m = mAllGameContent.get(nameKey); - } - m.put(aStack); - mAllGameContent.put(nameKey, m); - } - - @SuppressWarnings({ "rawtypes" }) - @Override - public void run() { - if (mDoWeScan) { - Iterator iterator; - Logger.INFO("Finding Blocks and Items to scan for Aspect data."); - long mBlocksCounter = 0; - long mItemsCounter = 0; - - // First, find blocks - iterator = Block.blockRegistry.getKeys().iterator(); - while (iterator.hasNext()) { - String s = (String) iterator.next(); - Block block = (Block) Block.blockRegistry.getObject(s); - if (block != null) { - tryCacheObject(ItemUtils.getSimpleStack(block)); - mBlocksCounter++; - } - } - Logger.INFO("Completed Block Scan. Counted "+mBlocksCounter); - - // Second Find items, Skipping things that exist. - iterator = Item.itemRegistry.getKeys().iterator(); - while (iterator.hasNext()) { - String s = (String) iterator.next(); - Item item = (Item) Item.itemRegistry.getObject(s); - if (item != null) { - if (item.getHasSubtypes()) { - List q1 = new ArrayList(); - item.getSubItems(item, item.getCreativeTab(), q1); - if (q1 != null && q1.size() > 0) { - for (int e = 0; e < q1.size(); e++) { - ItemStack check = ItemUtils.simpleMetaStack(item, e, 1); - if (check != null) { - tryCacheObject(check); - mItemsCounter++; - } - } - } else { - tryCacheObject(ItemUtils.getSimpleStack(item)); - mItemsCounter++; - } - } else { - tryCacheObject(ItemUtils.getSimpleStack(item)); - mItemsCounter++; - } - } - } - Logger.INFO("Completed Item Scan. Counted "+mItemsCounter); - - Set y = mAllGameContent.keySet(); - Logger.INFO("Beginning iteration of "+y.size()+" itemstacks for aspect information."); - - for (String key : y) { - //Logger.INFO("Looking for key: "+key); - if (mAllGameContent.containsKey(key)) { - AutoMap group = mAllGameContent.get(key); - if (group == null || group.size() <= 0) { - continue; - } - for (ItemStack stack : group) { - thaumcraft.api.aspects.AspectList a = thaumcraft.common.lib.crafting.ThaumcraftCraftingManager - .getObjectTags(stack); - if (a == null) { - continue; - } else { - AutoMap> aspectPairs = new AutoMap>(); - for (thaumcraft.api.aspects.Aspect c : a.getAspectsSortedAmount()) { - if (c != null) { - aspectPairs.put(new Pair(c.getName(), a.getAmount(c))); - } - } - try { - List mList = new ArrayList(); - mList.add(stack.getDisplayName() + " | Meta: " + stack.getItemDamage() - + " | Unlocal: " + stack.getUnlocalizedName()); - for (Pair r : aspectPairs) { - if (r != null) { - mList.add(r.getKey() + " x" + r.getValue()); - } - } - mList.add(""); - if (mAspectCacheFile != null && mList.size() >= 3) { - FileUtils.appendListToFile(mAspectCacheFile, mList); - } - } - catch (Throwable t) { - Logger.INFO("Error while iterating one item. "+t); - } - } - } - } - } - Logger.INFO("Completed Aspect Iteration. AspectInfo.txt is now available to process in the GTplusplus configuration folder."); - CommandDumpAspects.mLastScanTime = System.currentTimeMillis(); - } - return; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java deleted file mode 100644 index 9df38ca384..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect; - -import net.minecraft.item.ItemStack; - -public class TC_AspectList_Wrapper { - - - //thaumcraft.api.aspects.Aspect; - //thaumcraft.api.aspects.AspectList; - - public TC_AspectList_Wrapper() { - - } - - public TC_AspectList_Wrapper(ItemStack stack) { - - } - - public TC_AspectList_Wrapper(Object invoke) { - // TODO Auto-generated constructor stub - } - - public int size() { - // TODO Auto-generated method stub - return 0; - } - - public Object getVanillaAspectList() { - // TODO Auto-generated method stub - return null; - } - - public void add(TC_Aspect_Wrapper mAspect, int mAmount) { - // TODO Auto-generated method stub - - } - - - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java deleted file mode 100644 index fda0fd27c5..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java +++ /dev/null @@ -1,327 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect; - -import java.lang.reflect.Array; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.LinkedHashMap; -import java.util.Map; - -import gregtech.api.enums.TC_Aspects; -import gregtech.api.util.GT_LanguageManager; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils; -import net.minecraft.util.ResourceLocation; - -/** - * Wrapper class for Thaumcraft Aspects. - * Used to avoid compile time dependencies. - * @author Alkalus - * - */ -public class TC_Aspect_Wrapper { - - private static Class mClass_Aspect; - private static Field mField_Aspects; - - private final String tag; - private final TC_Aspect_Wrapper[] components; - private final int color; - private String chatcolor; - private final ResourceLocation image; - private final int blend; - - public final Object mAspect; - - /** - * May be null, but links back to the TC_Aspects class from GT for convinience. - */ - public final TC_Aspects mGtEnumField; - - - - - /** - * Statically set the Class objects - */ - static { - mClass_Aspect = ReflectionUtils.getClass("thaumcraft.api.aspects.Aspect"); - } - - /** - * Gets the total aspect list from Thaumcraft, which should contain all other registered aspects. - * @return - A LinkedHashMap(String, Aspect); - */ - public static LinkedHashMap getVanillaAspectList() { - try { - if (mField_Aspects == null) { - mField_Aspects = ReflectionUtils.getField(mClass_Aspect, "aspects"); - } - return (LinkedHashMap) mField_Aspects.get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - Logger.REFLECTION("Failed configuring TC Aspect compatibility."); - return new LinkedHashMap(); - } - } - - public static Object getVanillaAspectObject(String aAspectName) { - return getVanillaAspectList().get(aAspectName); - } - - - - - - - - - - - - - - - /** - * Vanilla Aspect Constructor - * @param tag - Aspect Name - * @param color - * @param chatcolor - * @param blend - */ - public TC_Aspect_Wrapper(String tag, int color, String chatcolor, int blend, String aTooltip) { - this(tag, color, (TC_Aspect_Wrapper[]) null, blend, aTooltip); - this.chatcolor = chatcolor; - } - - /** - * - * Vanilla Aspect Constructor - * @param tag - Aspect Name - * @param color - * @param components - */ - public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, String aTooltip) { - this(tag, color, components, false, 1, aTooltip); - } - - /** - * - * Vanilla Aspect Constructor - * @param tag - Aspect Name - * @param color - * @param components - * @param blend - */ - public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, int blend, String aTooltip) { - this(tag, color, components, false, blend, aTooltip); - } - - - /** - * - * Vanilla Aspect Constructor - * @param tag - Aspect Name - * @param color - * @param components - * @param image - * @param blend - */ - public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, boolean vanilla, int blend, String aTooltip) { - this(tag, color, components, vanilla ? new ResourceLocation("thaumcraft", "textures/aspects/" + tag.toLowerCase() + ".png") : new ResourceLocation(CORE.MODID, "textures/aspects/" + tag.toLowerCase() + ".png"), vanilla, blend, aTooltip); - } - - private static int aInternalAspectIDAllocation = 1; - - public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, ResourceLocation image, boolean vanilla, int blend, String aTooltip) { - if (components == null) { - components = new TC_Aspect_Wrapper[] {}; - } - //String aTag = vanilla ? tag.toLowerCase() : "custom"+(aInternalAspectIDAllocation++); - String aTag = tag.toLowerCase(); - if (getAspectList().containsKey(tag.toLowerCase())) { - this.tag = aTag; - this.components = components; - this.color = color; - this.image = image; - this.blend = blend; - this.mAspect = null; - this.mGtEnumField = null; - } else { - this.tag = aTag; - this.components = components; - this.color = color; - this.image = image; - this.blend = blend; - this.mAspect = vanilla ? getVanillaAspectObject(this.tag) : this.generateTcAspect(); - - // Set GT Type if exists - TC_Aspects y = null; - for (TC_Aspects e : TC_Aspects.values()) { - try { - String gtTag = ThaumcraftUtils.getTagFromAspectObject(e.mAspect); - if (gtTag != null) { - if (gtTag.equals(this.tag)) { - y = e; - break; - } - } - } catch (IllegalArgumentException e1) { - e1.printStackTrace(); - } - } - this.mGtEnumField = y; - mInternalAspectCache.put(this.tag, this); - // Double link custom Aspects, but internalise names using custom# instead - if (!vanilla) { - mInternalAspectCache.put("custom"+(aInternalAspectIDAllocation++), this); - GT_LanguageManager.addStringLocalization("tc.aspect."+aTag, aTooltip); - } - Logger.INFO("[Thaumcraft++] Adding support for Aspect: "+tag); - } - } - - - - /** - * Generates a TC_Aspect from an object, presummed to be a TC Aspect. - * @param aBaseAspect - The TC Aspect to generate from. - * @return - * @throws IllegalArgumentException - * @throws IllegalAccessException - */ - @SuppressWarnings("unused") - public static TC_Aspect_Wrapper generate(Object aBaseAspect) { - try { - Field aTagF = ReflectionUtils.getField(mClass_Aspect, "tag"); - if (aTagF == null) { - return null; - } - String aTafB = (String) aTagF.get(aBaseAspect); - if (aTafB == null) { - return null; - } - String aTag = aTafB.toLowerCase(); - if (aTag != null && getAspectList().containsKey(aTag.toLowerCase())) { - return getAspect(aTag); - } else { - TC_Aspect_Wrapper aTemp = new TC_Aspect_Wrapper( - aTag, - (int) ReflectionUtils.getField(mClass_Aspect, "color").get(aBaseAspect), - generateAspectArrayInternal(ReflectionUtils.getField(mClass_Aspect, "components"), (aBaseAspect)), - (ResourceLocation) ReflectionUtils.getField(mClass_Aspect, "image").get(aBaseAspect), - true, - (int) ReflectionUtils.getField(mClass_Aspect, "blend").get(aBaseAspect), - "" - ); - if (aTemp != null) { - aTemp.chatcolor = (String) ReflectionUtils.getField(mClass_Aspect, "chatcolor").get(aBaseAspect); - return aTemp; - } - else { - return null; - } - } - } - catch (Throwable t) { - t.printStackTrace(); - return null; - } - } - - - /** - * Internal Map containing all the TC_Aspects. - */ - private static Map mInternalAspectCache = new LinkedHashMap(); - - /** - * Public getter for all TC_Aspects - * @param aAspectName - Aspect Name - * @return - A GT++ Aspect wrapper or null. (TC_Aspect) - */ - public static TC_Aspect_Wrapper getAspect(String aAspectName) { - String aName = aAspectName.toLowerCase(); - TC_Aspect_Wrapper g = mInternalAspectCache.get(aName); - if (g != null) { - return g; - } - else { - try { - TC_Aspect_Wrapper aTemp = generate(getVanillaAspectList().get(aName)); - if (aTemp != null) { - mInternalAspectCache.put(aName, aTemp); - return aTemp; - } - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } - } - return null; - } - - public static Map getAspectList(){ - return mInternalAspectCache; - } - - - private static TC_Aspect_Wrapper[] generateAspectArrayInternal(Field aField, Object aInstance) { - //thaumcraft.api.aspects.Aspect.Aspect() - Object[] components; - TC_Aspect_Wrapper[] aAspectArray; - try { - components = (Object[]) aField.get(aInstance); - aAspectArray = new TC_Aspect_Wrapper[components == null ? 0 : components.length]; - if (aAspectArray.length > 0) { - int i = 0; - for (Object g : components) { - aAspectArray[i] = getAspect((String) ReflectionUtils.getField(mClass_Aspect, "tag").get(g)); - i++; - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - aAspectArray = new TC_Aspect_Wrapper[0]; - } - return aAspectArray; - } - - /** - * Tasty code to generate TC Aspects reflectively. - * @return - */ - public Object generateTcAspect() { - try { - //thaumcraft.api.aspects.Aspect.Aspect() - Object aAspectArray = (Object[]) Array.newInstance(mClass_Aspect, 0); - if (components.length > 0) { - aAspectArray = (Object[]) Array.newInstance(mClass_Aspect, components.length); - int i = 0; - for (TC_Aspect_Wrapper g : components) { - if (g != null && g.mAspect != null) - ((Object[]) aAspectArray)[i++] = g.mAspect; - } - } - Constructor constructor = mClass_Aspect.getConstructor(String.class, int.class, aAspectArray.getClass(), ResourceLocation.class, int.class); - Object myObject = constructor.newInstance(tag, color, aAspectArray, image, blend); - - //Set chat colour - if (chatcolor != null && chatcolor.length() > 0) { - Method setChatColour = ReflectionUtils.getMethod(mClass_Aspect, "setChatcolor", String.class); - if (setChatColour != null) { - setChatColour.invoke(myObject, chatcolor); - } - } - return myObject; - } catch (Throwable t) { - t.printStackTrace(); - return null; - } - } - - public static boolean isObjectAnAspect(Object aAspect) { - return mClass_Aspect.isInstance(aAspect); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java deleted file mode 100644 index 914144445c..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java +++ /dev/null @@ -1,10 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public interface Base_Recipe_Wrapper { - - public abstract ItemStack getRecipeOutput(); - - public abstract ItemStack getRecipeInput(); -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java deleted file mode 100644 index 8ee4e7011d..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_CrucibleRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java deleted file mode 100644 index fede079f7b..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_IArcaneRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java deleted file mode 100644 index b52fa0e6a7..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_InfusionEnchantmentRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java deleted file mode 100644 index a0c539f937..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; - -import net.minecraft.item.ItemStack; - -public class TC_InfusionRecipe_Wrapper implements Base_Recipe_Wrapper { - - @Override - public ItemStack getRecipeInput() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ItemStack getRecipeOutput() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java deleted file mode 100644 index d6c7f66988..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -public class TC_PageType_Wrapper { - - public static final TC_PageType_Wrapper TEXT = null; - public static final TC_PageType_Wrapper TEXT_CONCEALED = null; - public static final TC_PageType_Wrapper NORMAL_CRAFTING = null; - public static final TC_PageType_Wrapper ARCANE_CRAFTING = null; - public static final TC_PageType_Wrapper CRUCIBLE_CRAFTING = null; - public static final TC_PageType_Wrapper INFUSION_CRAFTING = null; - public static final TC_PageType_Wrapper COMPOUND_CRAFTING = null; - public static final TC_PageType_Wrapper SMELTING = null; - public static final TC_PageType_Wrapper INFUSION_ENCHANTMENT = null; - public static final TC_PageType_Wrapper IMAGE = null; - public static final TC_PageType_Wrapper ASPECTS = null; - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java deleted file mode 100644 index 93869cb8d8..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java +++ /dev/null @@ -1,89 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import cpw.mods.fml.common.FMLLog; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -import org.apache.logging.log4j.Level; - -public class TC_ResearchCategories_Wrapper { - - public static LinkedHashMap researchCategories = new LinkedHashMap(); - - public static TC_ResearchCategoryList_Wrapper getResearchList(String key) { - return (TC_ResearchCategoryList_Wrapper) researchCategories.get(key); - } - - public static String getCategoryName(String key) { - return StatCollector.translateToLocal("tc.research_category." + key); - } - - public static TC_ResearchItem_Wrapper getResearch(String key) { - Collection rc = researchCategories.values(); - Iterator i$ = rc.iterator(); - - while (i$.hasNext()) { - Object cat = i$.next(); - Collection rl = ((TC_ResearchCategoryList_Wrapper) cat).research.values(); - Iterator i$1 = rl.iterator(); - - while (i$1.hasNext()) { - Object ri = i$1.next(); - if (((TC_ResearchItem_Wrapper) ri).key.equals(key)) { - return (TC_ResearchItem_Wrapper) ri; - } - } - } - - return null; - } - - public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) { - if (getResearchList(key) == null) { - TC_ResearchCategoryList_Wrapper rl = new TC_ResearchCategoryList_Wrapper(icon, background); - researchCategories.put(key, rl); - } - - } - - public static void addResearch(TC_ResearchItem_Wrapper ri) { - TC_ResearchCategoryList_Wrapper rl = getResearchList(ri.category); - if (rl != null && !rl.research.containsKey(ri.key)) { - if (!ri.isVirtual()) { - Iterator i$ = rl.research.values().iterator(); - - while (i$.hasNext()) { - TC_ResearchItem_Wrapper rr = (TC_ResearchItem_Wrapper) i$.next(); - 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() + "]", - new Object[0]); - 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; - } - } - - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java deleted file mode 100644 index 3e6f5b78f2..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import java.util.HashMap; -import java.util.Map; - -import net.minecraft.util.ResourceLocation; - -public class TC_ResearchCategoryList_Wrapper { - public int minDisplayColumn; - public int minDisplayRow; - public int maxDisplayColumn; - public int maxDisplayRow; - public ResourceLocation icon; - public ResourceLocation background; - public Map research = new HashMap(); - - public TC_ResearchCategoryList_Wrapper(ResourceLocation icon, ResourceLocation background) { - this.icon = icon; - this.background = background; - } -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java deleted file mode 100644 index 6372cc0371..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java +++ /dev/null @@ -1,246 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; -import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - -public class TC_ResearchItem_Wrapper { - - public final String key; - public final String category; - public final TC_AspectList_Wrapper tags; - public String[] parents = null; - public String[] parentsHidden = null; - public String[] siblings = null; - public final int displayColumn; - public final int displayRow; - public final ItemStack icon_item; - public final ResourceLocation icon_resource; - private int complexity; - private boolean isSpecial; - private boolean isSecondary; - private boolean isRound; - private boolean isStub; - private boolean isVirtual; - private boolean isConcealed; - private boolean isHidden; - private boolean isLost; - private boolean isAutoUnlock; - private ItemStack[] itemTriggers; - private String[] entityTriggers; - private TC_Aspect_Wrapper[] aspectTriggers; - private Object[] pages = null; - - public TC_ResearchItem_Wrapper(String key, String category) { - this.key = key; - this.category = category; - this.tags = new TC_AspectList_Wrapper(); - this.icon_resource = null; - this.icon_item = null; - this.displayColumn = 0; - this.displayRow = 0; - this.setVirtual(); - } - - public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper 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 (this.complexity < 1) { - this.complexity = 1; - } - - if (this.complexity > 3) { - this.complexity = 3; - } - - } - - public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper 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 (this.complexity < 1) { - this.complexity = 1; - } - - if (this.complexity > 3) { - this.complexity = 3; - } - - } - - public TC_ResearchItem_Wrapper setSpecial() { - this.isSpecial = true; - return this; - } - - public TC_ResearchItem_Wrapper setStub() { - this.isStub = true; - return this; - } - - public TC_ResearchItem_Wrapper setLost() { - this.isLost = true; - return this; - } - - public TC_ResearchItem_Wrapper setConcealed() { - this.isConcealed = true; - return this; - } - - public TC_ResearchItem_Wrapper setHidden() { - this.isHidden = true; - return this; - } - - public TC_ResearchItem_Wrapper setVirtual() { - this.isVirtual = true; - return this; - } - - public TC_ResearchItem_Wrapper setParents(String... par) { - this.parents = par; - return this; - } - - public TC_ResearchItem_Wrapper setParentsHidden(String... par) { - this.parentsHidden = par; - return this; - } - - public TC_ResearchItem_Wrapper setSiblings(String... sib) { - this.siblings = sib; - return this; - } - - public TC_ResearchItem_Wrapper setPages(Object... par) { - this.pages = par; - return this; - } - - public Object[] getPages() { - return this.pages; - } - - public TC_ResearchItem_Wrapper setItemTriggers(ItemStack... par) { - this.itemTriggers = par; - return this; - } - - public TC_ResearchItem_Wrapper setEntityTriggers(String... par) { - this.entityTriggers = par; - return this; - } - - public TC_ResearchItem_Wrapper setAspectTriggers(TC_Aspect_Wrapper... par) { - this.aspectTriggers = par; - return this; - } - - public ItemStack[] getItemTriggers() { - return this.itemTriggers; - } - - public String[] getEntityTriggers() { - return this.entityTriggers; - } - - public TC_Aspect_Wrapper[] getAspectTriggers() { - return this.aspectTriggers; - } - - public TC_ResearchItem_Wrapper registerResearchItem() { - ThaumcraftUtils.addResearch(this); - return this; - } - - public String getName() { - return StatCollector.translateToLocal("tc.research_name." + this.key); - } - - public String getText() { - return StatCollector.translateToLocal("tc.research_text." + this.key); - } - - public boolean isSpecial() { - return this.isSpecial; - } - - public boolean isStub() { - return this.isStub; - } - - 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 this.isAutoUnlock; - } - - public TC_ResearchItem_Wrapper setAutoUnlock() { - this.isAutoUnlock = true; - return this; - } - - public boolean isRound() { - return this.isRound; - } - - public TC_ResearchItem_Wrapper setRound() { - this.isRound = true; - return this; - } - - public boolean isSecondary() { - return this.isSecondary; - } - - public TC_ResearchItem_Wrapper setSecondary() { - this.isSecondary = true; - return this; - } - - public int getComplexity() { - return this.complexity; - } - - public TC_ResearchItem_Wrapper setComplexity(int complexity) { - this.complexity = complexity; - return this; - } - - public TC_Aspect_Wrapper getResearchPrimaryTag() { - //TODO - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java deleted file mode 100644 index 5adf0150d9..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -public class TC_ResearchNoteData_Wrapper { - - public TC_ResearchNoteData_Wrapper(Object researchNoteData) { - // TODO Auto-generated constructor stub - } - - public Object getResearchNoteData() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java deleted file mode 100644 index 998f37bf8c..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java +++ /dev/null @@ -1,228 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; - -import java.util.List; - -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_CrucibleRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_IArcaneRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionEnchantmentRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionRecipe_Wrapper; -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; - -public class TC_ResearchPage_Wrapper { - public TC_PageType_Wrapper type; - public String text; - public String research; - public ResourceLocation image; - public TC_AspectList_Wrapper aspects; - public Object recipe; - public ItemStack recipeOutput; - - public TC_ResearchPage_Wrapper(String text) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.TEXT; - this.text = text; - } - - public TC_ResearchPage_Wrapper(String research, String text) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.TEXT_CONCEALED; - this.research = research; - this.text = text; - } - - public TC_ResearchPage_Wrapper(IRecipe recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.NORMAL_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - public TC_ResearchPage_Wrapper(IRecipe[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.NORMAL_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.ARCANE_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper[] recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.INFUSION_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(List recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.COMPOUND_CRAFTING; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.ARCANE_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING; - this.recipe = recipe; - this.recipeOutput = recipe.getRecipeOutput(); - } - - public TC_ResearchPage_Wrapper(ItemStack input) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.SMELTING; - this.recipe = input; - this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input); - } - - public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.INFUSION_CRAFTING; - this.recipe = recipe; - if (recipe.getRecipeOutput() instanceof ItemStack) { - this.recipeOutput = (ItemStack) recipe.getRecipeOutput(); - } else { - this.recipeOutput = recipe.getRecipeInput(); - } - - } - - public TC_ResearchPage_Wrapper(TC_InfusionEnchantmentRecipe_Wrapper recipe) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.INFUSION_ENCHANTMENT; - this.recipe = recipe; - } - - public TC_ResearchPage_Wrapper(ResourceLocation image, String caption) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.IMAGE; - this.image = image; - this.text = caption; - } - - public TC_ResearchPage_Wrapper(TC_AspectList_Wrapper as) { - this.type = TC_PageType_Wrapper.TEXT; - this.text = null; - this.research = null; - this.image = null; - this.aspects = null; - this.recipe = null; - this.recipeOutput = null; - this.type = TC_PageType_Wrapper.ASPECTS; - this.aspects = as; - } - - public String getTranslatedText() { - String ret = ""; - if (this.text != null) { - ret = StatCollector.translateToLocal(this.text); - if (ret.isEmpty()) { - ret = this.text; - } - } - - return ret; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java b/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java deleted file mode 100644 index 4f1006693e..0000000000 --- a/src/Java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java +++ /dev/null @@ -1,464 +0,0 @@ -package gtPlusPlus.xmod.thaumcraft.util; - -import static gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft.sItemsToGetAspects; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.TC_Aspects; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft; -import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectStack; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_CrucibleRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_IArcaneRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionEnchantmentRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionRecipe_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchCategories_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchCategoryList_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchItem_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchNoteData_Wrapper; -import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchPage_Wrapper; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.world.World; - -public class ThaumcraftUtils { - - - private static Class mClass_Aspect; - private static Field mField_Aspects; - - static { - mClass_Aspect = ReflectionUtils.getClass("thaumcraft.api.aspects.Aspect"); - if (mClass_Aspect != null) { - Field aTagF = ReflectionUtils.getField(mClass_Aspect, "tag"); - if (aTagF != null) { - mField_Aspects = aTagF; - } - } - } - - public static boolean addAspectToItem(ItemStack item, TC_Aspect_Wrapper aspect, int amount) { - return addAspectToItem(item, new TC_Aspect_Wrapper[] {aspect}, new Integer[] {amount}); - - } - - public static boolean addAspectToItem(ItemStack item, TC_Aspect_Wrapper[] aspect, Integer[] amounts) { - GTPP_AspectStack[] aspects = new GTPP_AspectStack[aspect.length]; - for (int g=0;g 0) { - //aspects[g] = new GTPP_AspectStack(aspect[g], amounts[g]); - } - } - Pair k = new Pair(item, aspects); - int mSizeA = sItemsToGetAspects.size(); - sItemsToGetAspects.put(k); - if (sItemsToGetAspects.size() > mSizeA) { - Logger.MATERIALS("[Aspect] Successfully queued an ItemStack for Aspect addition."); - return true; - } - Logger.MATERIALS("[Aspect] Failed to queue an ItemStack for Aspect addition."); - //Logger.INFO("[Aspect] "); - return false; - } - - - public static TC_Aspect_Wrapper getAspect(String name) { - return TC_Aspect_Wrapper.getAspect(name); - } - - public static TC_Aspects getEnumAspect(String name) { - TC_Aspect_Wrapper r = getAspect(name); - return r.mGtEnumField; - } - - - - public static Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, List aAspects, ItemStack[] aResearchTriggers, Object[] aPages) { - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { - return null; - } - TC_ResearchCategoryList_Wrapper tCategory = TC_ResearchCategories_Wrapper.getResearchList(aCategory); - if (tCategory == null) { - return null; - } - for (Iterator i$ = tCategory.research.values().iterator(); i$.hasNext(); ) { - TC_ResearchItem_Wrapper tResearch = (TC_ResearchItem_Wrapper) i$.next(); - if ((tResearch.displayColumn == aX) && (tResearch.displayRow == aY)) { - aX += (aX > 0 ? 5 : -5); - aY += (aY > 0 ? 5 : -5); - } - } - TC_ResearchItem_Wrapper rResearch = new TC_ResearchItem_Wrapper(aResearch, aCategory, getAspectList_Ex(aAspects), aX, aY, aComplexity, aIcon); - ArrayList tPages = new ArrayList(aPages.length); - GT_LanguageManager.addStringLocalization("tc.research_name." + aResearch, aName); - GT_LanguageManager.addStringLocalization("tc.research_text." + aResearch, "[GT++] " + aText); - for (Object tPage : aPages) { - if ((tPage instanceof String)) { - tPages.add(new TC_ResearchPage_Wrapper((String) tPage)); - } else if ((tPage instanceof IRecipe)) { - tPages.add(new TC_ResearchPage_Wrapper((IRecipe) tPage)); - } - else if ((tPage instanceof TC_IArcaneRecipe_Wrapper)) { - tPages.add(new TC_ResearchPage_Wrapper((TC_IArcaneRecipe_Wrapper) tPage)); - } else if ((tPage instanceof TC_CrucibleRecipe_Wrapper)) { - tPages.add(new TC_ResearchPage_Wrapper((TC_CrucibleRecipe_Wrapper) tPage)); - } else if ((tPage instanceof TC_InfusionRecipe_Wrapper)) { - tPages.add(new TC_ResearchPage_Wrapper((TC_InfusionRecipe_Wrapper) tPage)); - } else if ((tPage instanceof TC_InfusionEnchantmentRecipe_Wrapper)) { - tPages.add(new TC_ResearchPage_Wrapper((TC_InfusionEnchantmentRecipe_Wrapper) tPage)); - } - } - if ((aType & 0x40) != 0) { - rResearch.setAutoUnlock(); - } - if ((aType & 0x1) != 0) { - rResearch.setSecondary(); - } - if ((aType & 0x20) != 0) { - rResearch.setSpecial(); - } - if ((aType & 0x8) != 0) { - rResearch.setVirtual(); - } - if ((aType & 0x4) != 0) { - rResearch.setHidden(); - } - if ((aType & 0x10) != 0) { - rResearch.setRound(); - } - if ((aType & 0x2) != 0) { - rResearch.setStub(); - } - if (aParentResearches != null) { - ArrayList tParentResearches = new ArrayList(); - for (String tParent : aParentResearches) { - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { - tParentResearches.add(tParent); - } - } - if (tParentResearches.size() > 0) { - rResearch.setParents((String[]) tParentResearches.toArray(new String[tParentResearches.size()])); - rResearch.setConcealed(); - } - } - if (aResearchTriggers != null) { - rResearch.setItemTriggers(aResearchTriggers); - rResearch.setHidden(); - } - - Object[] aVarArgs = (TC_ResearchPage_Wrapper[]) tPages.toArray(new TC_ResearchPage_Wrapper[tPages.size()]); - rResearch.setPages(aVarArgs); - return rResearch.registerResearchItem(); - } - - - public static Object addCrucibleRecipe(final String aResearch, final Object aInput, final ItemStack aOutput, - final List aAspects) { - if (GT_Utility.isStringInvalid((Object) aResearch) || aInput == null || aOutput == null || aAspects == null - || aAspects.isEmpty()) { - return null; - } - return addCrucibleRecipe(aResearch, GT_Utility.copy(new Object[]{aOutput}), - (aInput instanceof ItemStack || aInput instanceof ArrayList) ? aInput : aInput.toString(), - getAspectList_Ex(aAspects)); - } - - public static Object addInfusionRecipe(final String aResearch, final ItemStack aMainInput, final ItemStack[] aSideInputs, - final ItemStack aOutput, final int aInstability, final List aAspects) { - if (GT_Utility.isStringInvalid((Object) aResearch) || aMainInput == null || aSideInputs == null - || aOutput == null || aAspects == null || aAspects.isEmpty()) { - return null; - } - return addInfusionCraftingRecipe(aResearch, (Object) GT_Utility.copy(new Object[]{aOutput}), - aInstability, getAspectList_Ex(aAspects), aMainInput, aSideInputs); - } - - public static boolean registerThaumcraftAspectsToItem(final ItemStack aExampleStack, - final List aAspects, final String aOreDict) { - if (aAspects.isEmpty()) { - return false; - } - registerObjectTag(aOreDict, getAspectList_Ex(aAspects)); - return true; - } - - public static boolean registerThaumcraftAspectsToItem(final ItemStack aStack, - final List aAspects, final boolean aAdditive) { - try { - if (aAspects.isEmpty()) { - return false; - } - TC_AspectList_Wrapper h = getAspectList_Ex(aAspects); - if (aAdditive && (h != null && h.size() > 0)) { - registerComplexObjectTag(aStack, getAspectList_Ex(aAspects)); - return true; - } - else { - Logger.MATERIALS("[Aspect] Failed adding aspects to "+aStack.getDisplayName()+"."); - } - final TC_AspectList_Wrapper tAlreadyRegisteredAspects = getObjectAspects(aStack); - if (tAlreadyRegisteredAspects == null || tAlreadyRegisteredAspects.size() <= 0) { - registerObjectTag(aStack, getAspectList_Ex(aAspects)); - } - return true; - } - catch (Throwable t) { - Logger.MATERIALS("[Aspect] Failed adding aspects to "+aStack.getDisplayName()+"."); - t.printStackTrace(); - return false; - } - } - - - private static final Class mClass_ThaumcraftApi; - private static final Class mClass_ThaumcraftApiHelper; - private static final Class mClass_AspectList; - private static final Class mClass_ResearchManager; - private static final Method mMethod_registerObjectTag1; - private static final Method mMethod_registerObjectTag2; - private static final Method mMethod_registerComplexObjectTag; - private static final Method mMethod_addInfusionCraftingRecipe; - private static final Method mMethod_addCrucibleRecipe; - private static final Method mMethod_getObjectAspects; - private static final Method mMethod_updateData; - private static final Method mMethod_getData; - - private static final Field mField_PortholeBlacklist; - static { - /* - * Classes - */ - mClass_ThaumcraftApi = ReflectionUtils.getClass("thaumcraft.api.ThaumcraftApi"); - mClass_ThaumcraftApiHelper = ReflectionUtils.getClass("thaumcraft.api.ThaumcraftApiHelper"); - mClass_AspectList = ReflectionUtils.getClass("thaumcraft.api.aspects.AspectList"); - mClass_ResearchManager = ReflectionUtils.getClass("thaumcraft.common.lib.research.ResearchManager"); - - /* - * Methods - */ - mMethod_registerObjectTag1 = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "registerObjectTag", - ItemStack.class, mClass_AspectList); - - mMethod_registerObjectTag2 = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "registerObjectTag", String.class, - mClass_AspectList); - - mMethod_registerComplexObjectTag = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "registerComplexObjectTag", - ItemStack.class, mClass_AspectList); - - mMethod_addInfusionCraftingRecipe = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "addInfusionCraftingRecipe", - String.class, Object.class, int.class, mClass_AspectList, ItemStack.class, ItemStack[].class); - - mMethod_addCrucibleRecipe = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "addCrucibleRecipe", String.class, - ItemStack.class, Object.class, mClass_AspectList); - - - mMethod_getObjectAspects = ReflectionUtils.getMethod(mClass_ThaumcraftApiHelper, "getObjectAspects", ItemStack.class); - - - mMethod_updateData = ReflectionUtils.getMethod(mClass_ResearchManager, "updateData", ItemStack.class, ReflectionUtils.getClass("thaumcraft.common.lib.research.ResearchNoteData")); - mMethod_getData = ReflectionUtils.getMethod(mClass_ResearchManager, "getData", ItemStack.class); - - /* - * Fields - */ - mField_PortholeBlacklist = ReflectionUtils.getField(mClass_ThaumcraftApi, "portableHoleBlackList"); - - } - - public static void registerObjectTag(ItemStack aStack, TC_AspectList_Wrapper aAspectList) { - try { - mMethod_registerObjectTag1.invoke(null, aStack, aAspectList.getVanillaAspectList()); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - } - - public static void registerObjectTag(String aOreDict, TC_AspectList_Wrapper aAspectList) { - try { - mMethod_registerObjectTag2.invoke(null, aOreDict, aAspectList.getVanillaAspectList()); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - } - - public static void registerComplexObjectTag(ItemStack aStack, TC_AspectList_Wrapper aAspectList) { - try { - mMethod_registerComplexObjectTag.invoke(null, aStack, aAspectList.getVanillaAspectList()); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - } - - - public static TC_AspectList_Wrapper getObjectAspects(ItemStack aStack) { - try { - return new TC_AspectList_Wrapper(mMethod_getObjectAspects.invoke(null, aStack)); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - - - public static Object addCrucibleRecipe(String aResearch, ItemStack copy, Object aOutput, - TC_AspectList_Wrapper aAspectList) { - try { - return mMethod_addCrucibleRecipe.invoke(null, aResearch, copy, aOutput, aAspectList); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - public static Object addInfusionCraftingRecipe(String aResearch, Object copy, int aInstability, - TC_AspectList_Wrapper aAspectList, ItemStack aMainInput, ItemStack[] aSideInputs) { - try { - return mMethod_addInfusionCraftingRecipe.invoke(null, aResearch, copy, aInstability, aAspectList, aMainInput, aSideInputs); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - - public static boolean registerPortholeBlacklistedBlock(final Block aBlock) { - try { - ((ArrayList) mField_PortholeBlacklist.get(null)).add(aBlock); - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - return false; - } - return true; - } - - - public static String getTagFromAspectObject(Object aAspect) { - try { - if (mClass_Aspect == null || mField_Aspects == null) { - return null; - } - String aTafB = (String) mField_Aspects.get(aAspect); - if (aTafB == null) { - return null; - } - String aTag = aTafB.toLowerCase(); - return aTag; - } catch (IllegalArgumentException | IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return "error"; - } - } - - - public static void updateResearchNote(ItemStack a, TC_ResearchNoteData_Wrapper b) { - //updateData(a, b.getResearchNoteData()); - try { - mMethod_updateData.invoke(a, b.getResearchNoteData()); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - } - - public static Object getResearchNoteData(ItemStack a) { - //getData(a); - try { - return mMethod_getData.invoke(a); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - return null; - } - - public static boolean isItemResearchNotes(ItemStack aStack) { - if (aStack != null && aStack.getItem() == HANDLER_Thaumcraft.mResearchNotes && HANDLER_Thaumcraft.mResearchNotes.getClass().isInstance(aStack.getItem())) { - return true; - } - return false; - } - - public static boolean isItemStackValidResearchNotes(ItemStack aStack) { - if (isItemResearchNotes(aStack) && aStack.getItemDamage() < 64) { - return true; - } - return false; - } - - public static TC_ResearchNoteData_Wrapper gatherResults(ItemStack note) { - TC_ResearchNoteData_Wrapper research = null; - if (isItemResearchNotes(note)) { - research = new TC_ResearchNoteData_Wrapper(getResearchNoteData(note)); - } - return research; - } - - public static void placeAspectIntoResearchNote(ItemStack note, World aWorld, final int q, final int r, final TC_Aspect_Wrapper aspect) { - /*TC_ResearchNoteData_Wrapper data = gatherResults(note); - String mGTPP = CORE.gameProfile.getName(); - EntityPlayer player = CORE.getFakePlayer(aWorld); - - if (isItemResearchNotes(note) && data != null && note.getItemDamage() < 64) { - final boolean r2 = ResearchManager.isResearchComplete(mGTPP, "RESEARCHER1"); - final boolean r3 = ResearchManager.isResearchComplete(mGTPP, "RESEARCHER2"); - final HexUtils.Hex hex = new HexUtils.Hex(q, r); - ResearchManager.HexEntry he = null; - if (aspect != null) { - he = new ResearchManager.HexEntry(aspect, 2); - if (r3 && aWorld.rand.nextFloat() < 0.1f) { - aWorld.playSoundAtEntity((Entity) player, "random.orb", 0.2f, 0.9f + player.worldObj.rand.nextFloat() * 0.2f); - } - } else { - final float f = aWorld.rand.nextFloat(); - if (data.hexEntries.get(hex.toString()).aspect != null - && ((r2 && f < 0.25f) || (r3 && f < 0.5f))) { - aWorld.playSoundAtEntity((Entity) player, "random.orb", 0.2f, - 0.9f + player.worldObj.rand.nextFloat() * 0.2f); - ResearchManager.scheduleSave(player); - } - he = new ResearchManager.HexEntry((Aspect) null, 0); - } - data.hexEntries.put(hex.toString(), he); - data.hexes.put(hex.toString(), hex); - updateResearchNote(note, data); - if (!aWorld.isRemote && ResearchManager.checkResearchCompletion(note, data, player.getCommandSenderName())) { - note.setItemDamage(64); - } - }*/ - } - - public static void completeResearchNote(World aWorld, ItemStack aStack) { - if (!aWorld.isRemote) { - if (isItemResearchNotes(aStack)) { - aStack.setItemDamage(64); - } - } - } - - public static synchronized final TC_AspectList_Wrapper getAspectList_Ex(final List aAspects) { - final TC_AspectList_Wrapper rAspects = new TC_AspectList_Wrapper(); - for (final GTPP_AspectStack tAspect : aAspects) { - rAspects.add(tAspect.mAspect, tAspect.mAmount); - } - return rAspects; - } - - public static void addResearch(TC_ResearchItem_Wrapper tc_ResearchItem_Wrapper) { - // TODO Auto-generated method stub - - } -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java deleted file mode 100644 index fe9a82c6b5..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java +++ /dev/null @@ -1,43 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation; - -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.thermalfoundation.block.TF_Blocks; -import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; -import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; -import gtPlusPlus.xmod.thermalfoundation.recipe.TF_Gregtech_Recipes; - -public class HANDLER_TF{ - - public static void preInit(){ - if (LoadedMods.CoFHCore && !LoadedMods.ThermalFoundation){ - TF_Fluids.preInit(); - TF_Items.preInit(); - TF_Blocks.preInit(); - if (LoadedMods.Gregtech){ - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - //mGregMatLoader.enableMaterial(Materials.Enderium); - } - } - } - } - - public static void init(){ - if (LoadedMods.CoFHCore && !LoadedMods.ThermalFoundation){ - TF_Fluids.init(); - TF_Blocks.init(); - TF_Items.init(); - } - } - - public static void postInit(){ - if (LoadedMods.CoFHCore && !LoadedMods.ThermalFoundation){ - TF_Fluids.postInit(); - TF_Items.postInit(); - TF_Blocks.postInit(); - if(LoadedMods.Gregtech){ - TF_Gregtech_Recipes.run(); - } - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java deleted file mode 100644 index a0480e907e..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java +++ /dev/null @@ -1,191 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.block; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.MapColor; -import net.minecraft.block.material.Material; -import net.minecraft.block.material.MaterialLiquid; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.monster.*; -import net.minecraft.init.Blocks; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cofh.core.fluid.BlockFluidInteractive; -import cofh.lib.util.BlockWrapper; -import cofh.lib.util.helpers.DamageHelper; -import cofh.lib.util.helpers.ServerHelper; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; -import net.minecraftforge.common.util.ForgeDirection; - -public class TF_Block_Fluid_Cryotheum -extends BlockFluidInteractive -{ - Random random = new Random(); - public static final int LEVELS = 5; - public static final Material materialFluidCryotheum = new MaterialLiquid(MapColor.iceColor); - private static boolean enableSourceFall = true; - private static boolean effect = true; - - public TF_Block_Fluid_Cryotheum() - { - super(CORE.MODID, TF_Fluids.fluidCryotheum, materialFluidCryotheum, "cryotheum"); - this.setQuantaPerBlock(5); - this.setTickRate(15); - - this.setHardness(1000.0F); - this.setLightOpacity(1); - this.setParticleColor(0.15F, 0.7F, 1.0F); - } - - @Override - public boolean preInit() - { - GameRegistry.registerBlock(this, "FluidCryotheum"); - - this.addInteraction(Blocks.grass, Blocks.dirt); - this.addInteraction(Blocks.water, 0, Blocks.ice); - this.addInteraction(Blocks.water, Blocks.snow); - this.addInteraction(Blocks.flowing_water, 0, Blocks.ice); - this.addInteraction(Blocks.flowing_water, Blocks.snow); - this.addInteraction(Blocks.lava, 0, Blocks.obsidian); - this.addInteraction(Blocks.lava, Blocks.stone); - this.addInteraction(Blocks.flowing_lava, 0, Blocks.obsidian); - this.addInteraction(Blocks.flowing_lava, Blocks.stone); - this.addInteraction(Blocks.leaves, Blocks.air); - this.addInteraction(Blocks.tallgrass, Blocks.air); - this.addInteraction(Blocks.fire, Blocks.air); - //addInteraction(TFBlocks.blockFluidGlowstone, 0, Blocks.glowstone); - - final String str1 = "Fluid.Cryotheum"; - String str2 = "Enable this for Fluid Cryotheum to be worse than lava, except cold."; - effect = true; - - str2 = "Enable this for Fluid Cryotheum Source blocks to gradually fall downwards."; - enableSourceFall = true; - - return true; - } - - @Override - public void onEntityCollidedWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Entity paramEntity) - { - paramEntity.extinguish(); - if (!effect) { - return; - } - if ((paramEntity.motionY < -0.05D) || (paramEntity.motionY > 0.05D)) { - paramEntity.motionY *= 0.05D; - } - if ((paramEntity.motionZ < -0.05D) || (paramEntity.motionZ > 0.05D)) { - paramEntity.motionZ *= 0.05D; - } - if ((paramEntity.motionX < -0.05D) || (paramEntity.motionX > 0.05D)) { - paramEntity.motionX *= 0.05D; - } - if (ServerHelper.isClientWorld(paramWorld)) { - return; - } - if ((paramWorld.getTotalWorldTime() % 8L) != 0L) { - return; - } - if (((paramEntity instanceof EntityZombie)) || ((paramEntity instanceof EntityCreeper))) - { - final EntitySnowman localEntitySnowman = new EntitySnowman(paramWorld); - localEntitySnowman.setLocationAndAngles(paramEntity.posX, paramEntity.posY, paramEntity.posZ, paramEntity.rotationYaw, paramEntity.rotationPitch); - paramWorld.spawnEntityInWorld(localEntitySnowman); - - paramEntity.setDead(); - } - else if (/*((paramEntity instanceof EntityBlizz)) ||*/((paramEntity instanceof EntitySnowman))) - { - ((EntityLivingBase)paramEntity).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120, 0)); - ((EntityLivingBase)paramEntity).addPotionEffect(new PotionEffect(Potion.regeneration.id, 120, 0)); - } - else if ((paramEntity instanceof EntityBlaze)) - { - paramEntity.attackEntityFrom(DamageHelper.cryotheum, 10.0F); - } - else - { - final boolean bool = paramEntity.velocityChanged; - paramEntity.attackEntityFrom(DamageHelper.cryotheum, 2.0F); - paramEntity.velocityChanged = bool; - } - } - - @Override - public int getLightValue(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3) - { - return TF_Fluids.fluidCryotheum.getLuminosity(); - } - - @Override - public void updateTick(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Random paramRandom) - { - if (effect) { - this.checkForInteraction(paramWorld, paramInt1, paramInt2, paramInt3); - } - if ((enableSourceFall) && (paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3) == 0)) - { - final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2 + this.densityDir, paramInt3); - final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2 + this.densityDir, paramInt3); - if ((localBlock == this) && (i != 0)) - { - paramWorld.setBlock(paramInt1, paramInt2 + this.densityDir, paramInt3, this, 0, 3); - paramWorld.setBlockToAir(paramInt1, paramInt2, paramInt3); - return; - } - } - super.updateTick(paramWorld, paramInt1, paramInt2, paramInt3, paramRandom); - } - - protected void checkForInteraction(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) - { - if (paramWorld.getBlock(paramInt1, paramInt2, paramInt3) != this) { - return; - } - int i = paramInt1; - int j = paramInt2; - int k = paramInt3; - for (int m = 0; m < 6; m++) - { - i = paramInt1 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][0]; - j = paramInt2 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][1]; - k = paramInt3 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][2]; - - this.interactWithBlock(paramWorld, i, j, k); - } - this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 - 1); - this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 + 1); - this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 - 1); - this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 + 1); - } - - protected void interactWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) - { - final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2, paramInt3); - if ((localBlock == Blocks.air) || (localBlock == this)) { - return; - } - final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3); - if (this.hasInteraction(localBlock, i)) - { - final BlockWrapper localBlockWrapper = this.getInteraction(localBlock, i); - paramWorld.setBlock(paramInt1, paramInt2, paramInt3, localBlockWrapper.block, localBlockWrapper.metadata, 3); - } - else if ((paramWorld.isSideSolid(paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) && (paramWorld.isAirBlock(paramInt1, paramInt2 + 1, paramInt3))) - { - paramWorld.setBlock(paramInt1, paramInt2 + 1, paramInt3, Blocks.snow_layer, 0, 3); - } - } - - protected void triggerInteractionEffects(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) {} -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java deleted file mode 100644 index 513fe51fd9..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java +++ /dev/null @@ -1,68 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.block; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.block.material.MapColor; -import net.minecraft.block.material.Material; -import net.minecraft.block.material.MaterialLiquid; -import net.minecraft.entity.Entity; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cofh.core.fluid.BlockFluidCoFHBase; -import cofh.core.util.CoreUtils; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; - -public class TF_Block_Fluid_Ender - extends BlockFluidCoFHBase -{ - public static final int LEVELS = 4; - public static final Material materialFluidEnder = new MaterialLiquid(MapColor.greenColor); - private static boolean effect = true; - - public TF_Block_Fluid_Ender() - { - super(CORE.MODID, TF_Fluids.fluidEnder, materialFluidEnder, "ender"); - setQuantaPerBlock(4); - setTickRate(20); - - setHardness(2000.0F); - setLightOpacity(7); - setParticleColor(0.05F, 0.2F, 0.2F); - } - - @Override -public boolean preInit() - { - GameRegistry.registerBlock(this, "FluidEnder"); - - String str1 = "Fluid.Ender"; - String str2 = "Enable this for Fluid Ender to randomly teleport entities on contact."; - - return true; - } - - @Override -public void onEntityCollidedWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Entity paramEntity) - { - if ((!effect) || (paramWorld.isRemote)) { - return; - } - if (paramWorld.getTotalWorldTime() % 8L == 0L) - { - int i = paramInt1 - 8 + paramWorld.rand.nextInt(17); - int j = paramInt2 + paramWorld.rand.nextInt(8); - int k = paramInt3 - 8 + paramWorld.rand.nextInt(17); - if (!paramWorld.getBlock(i, j, k).getMaterial().isSolid()) { - CoreUtils.teleportEntityTo(paramEntity, i, j, k); - } - } - } - - @Override -public int getLightValue(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3) - { - return TF_Fluids.fluidEnder.getLuminosity(); - } -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java deleted file mode 100644 index 5444e8d5ad..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java +++ /dev/null @@ -1,191 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.block; - -import java.util.Random; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.MapColor; -import net.minecraft.block.material.Material; -import net.minecraft.block.material.MaterialLiquid; -import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cofh.core.fluid.BlockFluidInteractive; -import cofh.lib.util.BlockWrapper; -import cofh.lib.util.helpers.ServerHelper; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; -import net.minecraftforge.common.util.ForgeDirection; - -public class TF_Block_Fluid_Pyrotheum -extends BlockFluidInteractive -{ - Random random = new Random(); - public static final int LEVELS = 5; - public static final Material materialFluidPyrotheum = new MaterialLiquid(MapColor.tntColor); - private static boolean effect = true; - private static boolean enableSourceFall = true; - - public TF_Block_Fluid_Pyrotheum() - { - super(CORE.MODID, TF_Fluids.fluidPyrotheum, Material.lava, "pyrotheum"); - this.setQuantaPerBlock(5); - this.setTickRate(10); - - this.setHardness(1000.0F); - this.setLightOpacity(1); - this.setParticleColor(1.0F, 0.7F, 0.15F); - } - - @Override - public boolean preInit() - { - GameRegistry.registerBlock(this, "FluidPyrotheum"); - - this.addInteraction(Blocks.cobblestone, Blocks.stone); - this.addInteraction(Blocks.grass, Blocks.dirt); - this.addInteraction(Blocks.sand, Blocks.glass); - this.addInteraction(Blocks.water, Blocks.stone); - this.addInteraction(Blocks.flowing_water, Blocks.stone); - this.addInteraction(Blocks.clay, Blocks.hardened_clay); - this.addInteraction(Blocks.ice, Blocks.stone); - this.addInteraction(Blocks.snow, Blocks.air); - this.addInteraction(Blocks.snow_layer, Blocks.air); - for (int i = 0; i < 8; i++) { - this.addInteraction(Blocks.stone_stairs, i, Blocks.stone_brick_stairs, i); - } - final String str1 = "Fluid.Pyrotheum"; - String str2 = "Enable this for Fluid Pyrotheum to be worse than lava."; - effect = true; - - str2 = "Enable this for Fluid Pyrotheum Source blocks to gradually fall downwards."; - enableSourceFall = true; - - return true; - } - - @Override - public void onEntityCollidedWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Entity paramEntity) - { - if (!effect) { - return; - } - if (ServerHelper.isClientWorld(paramWorld)) { - return; - } - if (!(paramEntity instanceof EntityPlayer)) { - if ((paramEntity instanceof EntityCreeper)) - { - paramWorld.createExplosion(paramEntity, paramEntity.posX, paramEntity.posY, paramEntity.posZ, 6.0F, paramEntity.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")); - paramEntity.setDead(); - } - } - } - - @Override - public int getLightValue(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3) - { - return TF_Fluids.fluidPyrotheum.getLuminosity(); - } - - @Override - public int getFireSpreadSpeed(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) - { - return effect ? 800 : 0; - } - - @Override - public int getFlammability(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) - { - return 0; - } - - @Override - public boolean isFlammable(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) - { - return (effect) && (paramForgeDirection.ordinal() > ForgeDirection.UP.ordinal()) && (paramIBlockAccess.getBlock(paramInt1, paramInt2 - 1, paramInt3) != this); - } - - @Override - public boolean isFireSource(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) - { - return effect; - } - - @Override - public void updateTick(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Random paramRandom) - { - if (effect) { - this.checkForInteraction(paramWorld, paramInt1, paramInt2, paramInt3); - } - if ((enableSourceFall) && (paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3) == 0)) - { - final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2 + this.densityDir, paramInt3); - final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2 + this.densityDir, paramInt3); - if (((localBlock == this) && (i != 0)) || (localBlock.isFlammable(paramWorld, paramInt1, paramInt2 + this.densityDir, paramInt3, ForgeDirection.UP))) - { - paramWorld.setBlock(paramInt1, paramInt2 + this.densityDir, paramInt3, this, 0, 3); - paramWorld.setBlockToAir(paramInt1, paramInt2, paramInt3); - return; - } - } - super.updateTick(paramWorld, paramInt1, paramInt2, paramInt3, paramRandom); - } - - protected void checkForInteraction(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) - { - if (paramWorld.getBlock(paramInt1, paramInt2, paramInt3) != this) { - return; - } - int i = paramInt1; - int j = paramInt2; - int k = paramInt3; - for (int m = 0; m < 6; m++) - { - i = paramInt1 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][0]; - j = paramInt2 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][1]; - k = paramInt3 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][2]; - - this.interactWithBlock(paramWorld, i, j, k); - } - this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 - 1); - this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 + 1); - this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 - 1); - this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 + 1); - } - - protected void interactWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) - { - final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2, paramInt3); - if ((localBlock == Blocks.air) || (localBlock == this)) { - return; - } - final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3); - if (this.hasInteraction(localBlock, i)) - { - final BlockWrapper localBlockWrapper = this.getInteraction(localBlock, i); - paramWorld.setBlock(paramInt1, paramInt2, paramInt3, localBlockWrapper.block, localBlockWrapper.metadata, 3); - this.triggerInteractionEffects(paramWorld, paramInt1, paramInt2, paramInt3); - } - else if (localBlock.isFlammable(paramWorld, paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) - { - paramWorld.setBlock(paramInt1, paramInt2, paramInt3, Blocks.fire); - } - else if ((paramWorld.isSideSolid(paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) && (paramWorld.isAirBlock(paramInt1, paramInt2 + 1, paramInt3))) - { - paramWorld.setBlock(paramInt1, paramInt2 + 1, paramInt3, Blocks.fire, 0, 3); - } - } - - protected void triggerInteractionEffects(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) - { - if (this.random.nextInt(16) == 0) { - paramWorld.playSoundEffect(paramInt1 + 0.5F, paramInt2 + 0.5F, paramInt3 + 0.5F, "random.fizz", 0.5F, 2.2F + ((paramWorld.rand.nextFloat() - paramWorld.rand.nextFloat()) * 0.8F)); - } - } -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java deleted file mode 100644 index 6b56262b1a..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.block; - -import cofh.core.fluid.BlockFluidCoFHBase; - -public class TF_Blocks -{ - - public static BlockFluidCoFHBase blockFluidPyrotheum; - public static BlockFluidCoFHBase blockFluidCryotheum; - public static BlockFluidCoFHBase blockFluidEnder; - - - public static void preInit() - { - blockFluidPyrotheum = new TF_Block_Fluid_Pyrotheum(); - blockFluidCryotheum = new TF_Block_Fluid_Cryotheum(); - blockFluidEnder = new TF_Block_Fluid_Ender(); - blockFluidPyrotheum.preInit(); - blockFluidCryotheum.preInit(); - blockFluidEnder.preInit(); - } - - public static void init() {} - - public static void postInit() - { - - } -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java deleted file mode 100644 index 6ebae64384..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java +++ /dev/null @@ -1,79 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.fluid; - -import net.minecraft.block.BlockDispenser; -import net.minecraft.init.Items; -import net.minecraft.item.EnumRarity; - -import cofh.core.util.fluid.DispenserEmptyBucketHandler; -import cofh.core.util.fluid.DispenserFilledBucketHandler; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; - -public class TF_Fluids -{ - public static Fluid fluidPyrotheum; - public static Fluid fluidCryotheum; - public static Fluid fluidEnder; - - public static void preInit() - { - if (!LoadedMods.ThermalFoundation){ - Logger.INFO("Adding in our own versions of Thermal Foundation Fluids - Non-GT"); - final Fluid pyrotheum = FluidRegistry.getFluid("pyrotheum"); - final Fluid cryotheum = FluidRegistry.getFluid("cryotheum"); - final Fluid ender = FluidRegistry.getFluid("ender"); - - if (pyrotheum == null){ - Logger.INFO("Registering Blazing Pyrotheum as it does not exist."); - fluidPyrotheum = new Fluid("pyrotheum").setLuminosity(15).setDensity(2000).setViscosity(1200).setTemperature(4000).setRarity(EnumRarity.rare); - registerFluid(fluidPyrotheum, "pyrotheum"); - } - else { - Logger.INFO("Registering Blazing Pyrotheum as it is an already existing Fluid."); - fluidPyrotheum = pyrotheum; - } - if (cryotheum == null){ - Logger.INFO("Registering Gelid Cryotheum as it does not exist."); - fluidCryotheum = new Fluid("cryotheum").setLuminosity(0).setDensity(4000).setViscosity(3000).setTemperature(50).setRarity(EnumRarity.rare); - registerFluid(fluidCryotheum, "cryotheum"); - } - else { - Logger.INFO("Registering Gelid Cryotheum as it is an already existing Fluid."); - fluidCryotheum = cryotheum; - } - - if (ender == null){ - Logger.INFO("Registering Resonant Ender as it does not exist."); - fluidEnder = new Fluid("ender").setLuminosity(3).setDensity(4000).setViscosity(3000).setTemperature(300).setRarity(EnumRarity.uncommon); - registerFluid(fluidEnder, "ender"); - } - else { - Logger.INFO("Registering Resonant Ender as it is an already existing Fluid."); - fluidEnder = ender; - } - } - else { - Logger.INFO("Thermal Foundation is already loaded, no need to add our own Cryotheum/Pyrotheum."); - } - } - - public static void init() {} - - public static void postInit() {} - - public static void registerFluid(final Fluid paramFluid, final String paramString) - { - if (!FluidRegistry.isFluidRegistered(paramString)) { - FluidRegistry.registerFluid(paramFluid); - } - } - - public static void registerDispenserHandlers() - { - BlockDispenser.dispenseBehaviorRegistry.putObject(TF_Items.itemBucket, new DispenserFilledBucketHandler()); - BlockDispenser.dispenseBehaviorRegistry.putObject(Items.bucket, new DispenserEmptyBucketHandler()); - } -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java deleted file mode 100644 index a628b9c5b6..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java +++ /dev/null @@ -1,88 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.item; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; - -import cofh.core.item.ItemBase; -import cofh.core.item.ItemBucket; -import cofh.core.util.energy.FurnaceFuelHandler; -import cofh.core.util.fluid.BucketHandler; -import cofh.lib.util.helpers.ItemHelper; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.thermalfoundation.block.TF_Blocks; -import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; -import net.minecraftforge.fluids.FluidContainerRegistry; - -public class TF_Items { - - public static ItemBase itemMaterial; - public static ItemStack rodBlizz; - public static ItemStack dustBlizz; - public static ItemStack dustPyrotheum; - public static ItemStack dustCryotheum; - public static ItemBucket itemBucket; - public static ItemStack bucketPyrotheum; - public static ItemStack bucketCryotheum; - public static ItemStack bucketEnder; - - public static ItemStack itemDustBlizz; - public static ItemStack itemDustPyrotheum; - public static ItemStack itemDustCryotheum; - public static ItemStack itemRodBlizz; - - public static void preInit(){ - - - itemBucket = (ItemBucket)new ItemBucket("MiscUtils").setUnlocalizedName("bucket").setCreativeTab(AddToCreativeTab.tabMisc); - itemMaterial = (ItemBase)new ItemBase("MiscUtils").setUnlocalizedName("material").setCreativeTab(AddToCreativeTab.tabMisc); - - - bucketPyrotheum = itemBucket.addOreDictItem(1, "bucketPyrotheum"); - bucketCryotheum = itemBucket.addOreDictItem(2, "bucketCryotheum"); - bucketEnder = itemBucket.addOreDictItem(3, "bucketEnder", 1); - rodBlizz = itemMaterial.addOreDictItem(1, "rodBlizz"); - dustBlizz = itemMaterial.addOreDictItem(2, "dustBlizz"); - dustPyrotheum = itemMaterial.addOreDictItem(3, "dustPyrotheum"); - dustCryotheum = itemMaterial.addOreDictItem(4, "dustCryotheum"); - - if (ReflectionUtils.doesClassExist("cofh.core.util.energy.FurnaceFuelHandler")){ - FurnaceFuelHandler.registerFuel(dustPyrotheum, 2400); //cofh.core.util.energy.FurnaceFuelHandler.registerFuel(ItemStack, int) - } - - ItemUtils.addItemToOreDictionary(rodBlizz, "stickBlizz"); - - itemRodBlizz = ItemUtils.simpleMetaStack(itemMaterial, 1, 1); - itemDustBlizz = ItemUtils.simpleMetaStack(itemMaterial, 2, 1); - itemDustPyrotheum = ItemUtils.simpleMetaStack(itemMaterial, 3, 1); - itemDustCryotheum = ItemUtils.simpleMetaStack(itemMaterial, 4, 1); - - - - } - - public static void init(){ - - BucketHandler.registerBucket(TF_Blocks.blockFluidPyrotheum, 0, bucketPyrotheum); - BucketHandler.registerBucket(TF_Blocks.blockFluidCryotheum, 0, bucketCryotheum); - BucketHandler.registerBucket(TF_Blocks.blockFluidEnder, 0, bucketEnder); - FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidPyrotheum, bucketPyrotheum, FluidContainerRegistry.EMPTY_BUCKET); - FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidCryotheum, bucketCryotheum, FluidContainerRegistry.EMPTY_BUCKET); - FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidEnder, bucketEnder, FluidContainerRegistry.EMPTY_BUCKET); - - - } - - public static void postInit(){ - if (!CORE.GTNH) { - ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustPyrotheum, 1), new Object[] { "dustCoal", "dustSulfur", "dustRedstone", "dustBlaze" })); - ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustCryotheum, 1), new Object[] { Items.snowball, "dustSaltpeter", "dustRedstone", "dustBlizz" })); - ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustCryotheum, 1), new Object[] { Items.snowball, "dustNitor", "dustRedstone", "dustBlizz" })); - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java deleted file mode 100644 index 85485b5565..0000000000 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.xmod.thermalfoundation.recipe; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; - -import cofh.lib.util.helpers.ItemHelper; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -public class TF_Gregtech_Recipes { - - public static void run(){ - start(); - } - - private static void start(){ - //Get Items to work with - final ItemStack dust_Cryotheum = ItemUtils.getItemStackOfAmountFromOreDict("dustCryotheum", 1); - final ItemStack dust_Pyrotheum = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrotheum, 1L); - final ItemStack dust_Blizz = ItemUtils.getItemStackOfAmountFromOreDict("dustBlizz", 1); - final ItemStack dust_Blizz3 = ItemUtils.getItemStackOfAmountFromOreDict("dustBlizz", 3); - final ItemStack rod_Blizz = ItemUtils.getItemStackOfAmountFromOreDict("stickBlizz", 1); - - final FluidStack moltenBlaze = getFluidStack("molten.blaze", 1440); - - //Gelid Cryotheum - GT_Values.RA.addChemicalBathRecipe((GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Cinnabar, 1L)), getFluidStack("cryotheum", 144), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cinnabar, 3L), GT_Values.NI, GT_Values.NI, null, 400, 30); - - //Blizz Powder - GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.snowball, 4), moltenBlaze, dust_Blizz, GT_Values.NI, GT_Values.NI, null, 400, 240); - - //Blizz Rod - GT_Values.RA.addVacuumFreezerRecipe(new ItemStack(Items.blaze_rod), rod_Blizz, (int) Math.max((Materials.Blaze.getMass()*4) * 3L, 1L)); - GT_ModHandler.addPulverisationRecipe(rod_Blizz, dust_Blizz3, new ItemStack(Items.snowball, 1), 50, false); - - ItemStack dustCoal = ItemUtils.getItemStackOfAmountFromOreDict("dustCoal", 1); - ItemStack dustSulfur = ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1); - ItemStack dustRedstone = ItemUtils.getItemStackOfAmountFromOreDict("dustRedstone", 1); - ItemStack dustBlaze = ItemUtils.getItemStackOfAmountFromOreDict("dustBlaze", 1); - ItemStack dustSaltpeter = ItemUtils.getItemStackOfAmountFromOreDict("dustSaltpeter", 1); - ItemStack dustSnow = ItemUtils.getItemStackOfAmountFromOreDict("dustSnow", 1); - ItemStack dustBlizz = ItemUtils.getItemStackOfAmountFromOreDict("dustBlizz", 1); - ItemStack dustNiter = ItemUtils.getItemStackOfAmountFromOreDict("dustNiter", 1); - - if (ItemUtils.checkForInvalidItems(new ItemStack[] {dustCoal, dustSulfur, dustRedstone, dustBlaze})) { - GT_Values.RA.addMixerRecipe( - dustCoal, - dustSulfur, - dustRedstone, - dustBlaze, //Input - null, //F in - null, //F out - ItemHelper.cloneStack(dust_Pyrotheum, 1), //Output - 20*8, - 120); - } - - if (ItemUtils.checkForInvalidItems(new ItemStack[] {dustSaltpeter, dustSnow, dustRedstone, dustBlizz})) { - GT_Values.RA.addMixerRecipe( - dustSaltpeter, - dustSnow, - dustRedstone, - dustBlizz, //Input - null, //F in - null, //F out - ItemHelper.cloneStack(dust_Cryotheum, 1), //Output - 20*8, - 120); - } - - if (ItemUtils.checkForInvalidItems(new ItemStack[] {dustNiter, dustSnow, dustRedstone, dustBlizz})) { - GT_Values.RA.addMixerRecipe( - dustNiter, - dustSnow, - dustRedstone, - dustBlizz, //Input - null, //F in - null, //F out - ItemHelper.cloneStack(dust_Cryotheum, 1), //Output - 20*8, - 120); - } - - } - - private static FluidStack getFluidStack(final String fluidName, final int amount){ - return FluidUtils.getFluidStack(fluidName, amount); - } - -} diff --git a/src/Java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java b/src/Java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java deleted file mode 100644 index 4a3f9cd504..0000000000 --- a/src/Java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java +++ /dev/null @@ -1,105 +0,0 @@ -package gtPlusPlus.xmod.tinkers; - -import java.lang.reflect.Field; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; -import gtPlusPlus.xmod.tinkers.util.TinkersDryingRecipe; -import gtPlusPlus.xmod.tinkers.util.TinkersUtils; -import net.minecraft.block.Block; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; - -public class HANDLER_Tinkers { - - public static AutoMap mTinkerMaterials = new AutoMap(); - - public static final void preInit() { - if (LoadedMods.TiCon) { - - } - } - - public static final void init() { - if (LoadedMods.TiCon) { - - } - } - - public static final void postInit() { - if (LoadedMods.TiCon) { - - Fluid pyrotheumFluid = FluidRegistry.getFluid("pyrotheum"); - if (pyrotheumFluid != null) { - //Enable Pyrotheum as Fuel for the Smeltery - TinkersUtils.addSmelteryFuel(pyrotheumFluid, 5000, 70); // pyrotheum lasts 3.5 seconds per 15 mb - } - - //Generate Drying Rack recipes - TinkersDryingRecipe.generateAllDryingRecipes(); - - for (BaseTinkersMaterial y : mTinkerMaterials) { - //y.generate(); - } - - Class aTinkersSmeltery = ReflectionUtils.getClass("tconstruct.smeltery.TinkerSmeltery"); - AutoMap aTweakedFluids = new AutoMap(); - if (aTinkersSmeltery != null) { - try { - Logger.INFO("Manipulating the light levels of fluids in TiCon. Molten 'metals' in world are now very luminescent!"); - Field aFluidArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluids"); - Field aBlockArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluidBlocks"); - Fluid[] aTiconFluids = (Fluid[]) aFluidArrayField.get(null); - Block[] aTiconFluidBlocks = (Block[]) aBlockArrayField.get(null); - if (aTiconFluids != null && aTiconFluidBlocks != null) { - for (Fluid a : aTiconFluids) { - if (a == null) { - continue; - } else { - if (a.getLuminosity() <= 15) { - //if (a.getTemperature() >= 500) { - a.setLuminosity(16); - aTweakedFluids.put(a); - //} - } else { - aTweakedFluids.put(a); - continue; - } - } - } - for (Block a : aTiconFluidBlocks) { - if (a == null) { - continue; - } else { - Fluid f = FluidRegistry.lookupFluidForBlock(a); - boolean isHot = false; - if (f != null && f.getTemperature() >= 500) { - if (f.getLuminosity() <= 16 && !aTweakedFluids.containsValue(f)) { - f.setLuminosity(16); - } - isHot = true; - } - if (a.getLightValue() <= 16f) { - if (isHot) { - a.setLightLevel(16f); - } else { - if (a.getLightValue() <= 16f) { - a.setLightLevel(16f); - } - } - } else { - continue; - } - } - } - } - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - } - } - -} diff --git a/src/Java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java b/src/Java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java deleted file mode 100644 index 0d2c79db08..0000000000 --- a/src/Java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java +++ /dev/null @@ -1,274 +0,0 @@ -package gtPlusPlus.xmod.tinkers.material; - -import static gtPlusPlus.core.util.math.MathUtils.safeCast_LongToInt; - -import java.util.HashMap; - -import cpw.mods.fml.common.event.FMLInterModComms; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.xmod.tinkers.HANDLER_Tinkers; -import gtPlusPlus.xmod.tinkers.util.TinkersUtils; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.Fluid; - -public class BaseTinkersMaterial { - - - - private static HashMap aInternalMaterialIdMap = new HashMap(); - private static int aNextFreeID; - - public final String mLocalName; - - private final String mUnlocalName; - private final int mID; - private final Material mMaterial; - - static { - aNextFreeID = (Short.MAX_VALUE/2)+420; - } - - public BaseTinkersMaterial(Material aMaterial) { - mLocalName = aMaterial.getLocalizedName(); - mUnlocalName = "material.gtpp."+Utils.sanitizeString(mLocalName); - mMaterial = aMaterial; - mID = aNextFreeID++; - Logger.INFO("[TiCon] Assigning ID "+mID+" to "+mLocalName+"."); - aInternalMaterialIdMap.put(mUnlocalName, mID); - HANDLER_Tinkers.mTinkerMaterials.put(this); - } - - public String getUnlocalName() { - return mUnlocalName; - } - - private static int calcDurability(Material aMaterial) { - return safeCast_LongToInt(aMaterial.vDurability); - } - - private static int calcMiningSpeed(Material aMaterial) { - return (aMaterial.vHarvestLevel * 2)+aMaterial.vTier; - } - - private static int calcHarvestLevel(Material aMaterial) { - return aMaterial.vHarvestLevel; - } - - private static int calcAttack(Material aMaterial) { - return aMaterial.vHarvestLevel+aMaterial.vTier+aMaterial.vRadiationLevel; - } - - private static float calcHandleModifier(Material aMaterial) { - return 1f; - } - - private static int calcReinforced(Material aMaterial) { - return aMaterial.getMeltingPointC()/3600; - } - - private static int calcBowProjectileSpeed(Material aMaterial) { - return aMaterial.vHarvestLevel+2; - } - - private static int calcBowDrawSpeed(Material aMaterial) { - return aMaterial.vHarvestLevel+8; - } - - private static float calcProjectileMass(Material aMaterial) { - return (aMaterial.getMeltingPointC()/1800)*0.1f; - } - - private static float calcProjectileFragility(Material aMaterial) { - return 0f; - } - - private static String calcStyle(Material aMaterial) { - String aReturn = "" + EnumChatFormatting.WHITE; - int aTemp = aMaterial.getMeltingPointC(); - if (aTemp < 3600) { - aReturn = "" + EnumChatFormatting.WHITE; - } - else if (aTemp >= 3600) { - aReturn = "" + EnumChatFormatting.YELLOW; - } - else if (aTemp >= (3600*2)) { - aReturn = "" + EnumChatFormatting.GREEN; - } - else if (aTemp >= (3600*3)) { - aReturn = "" + EnumChatFormatting.RED; - } - else if (aTemp >= (3600*4)) { - aReturn = "" + EnumChatFormatting.DARK_RED; - } - else { - aReturn = "" + EnumChatFormatting.GOLD; - } - return aReturn; - } - - private static int calcColour(Material aMaterial) { - return aMaterial.getRgbAsHex(); - } - - public Object generateToolMaterial(Material aMaterial) { - int level, dura, speed, dmg, reinf, primColour; - float handle, stonebound; - level = calcHarvestLevel(aMaterial); - dura = calcDurability(aMaterial); - speed = calcMiningSpeed(aMaterial); - dmg = calcAttack(aMaterial); - reinf = calcReinforced(aMaterial); - primColour = calcColour(aMaterial); - handle = calcHandleModifier(aMaterial); - //stonebound = calcHarvestLevel(aMaterial); - stonebound = 0; - return TinkersUtils.generateToolMaterial(aMaterial.getLocalizedName(), aMaterial.getUnlocalizedName(), level, dura, speed, dmg, handle, reinf, stonebound, calcStyle(aMaterial), primColour); - } - - public void generate() { - - Logger.INFO("[TiCon] Trying to generate Material: "+mLocalName); - int id = mID; - if (id > 0) { - - //Object aTinkersCustomMaterial = generateToolMaterial(mMaterial); - //Logger.INFO("[TiCon] Created Material: "+mLocalName); - - //TinkersUtils.addToolMaterial(id, aTinkersCustomMaterial); - //TinkersUtils.addDefaultToolPartMaterial(id); - //TinkersUtils.addBowMaterial(id, calcBowDrawSpeed(mMaterial), 1.0F); - //TinkersUtils.addArrowMaterial(id, calcProjectileMass(mMaterial), calcProjectileFragility(mMaterial)); - - NBTTagCompound tag = new NBTTagCompound(); - tag.setInteger("Id", id); - tag.setString("Name", mUnlocalName); - tag.setString("localizationString", mLocalName); - tag.setInteger("Durability", calcDurability(mMaterial)); // 97 - tag.setInteger("MiningSpeed", calcMiningSpeed(mMaterial)); // 150 - tag.setInteger("HarvestLevel", calcHarvestLevel(mMaterial)); // 1 - tag.setInteger("Attack", calcAttack(mMaterial)); // 0 - tag.setFloat("HandleModifier", calcHandleModifier(mMaterial)); // 1.0f - tag.setInteger("Reinforced", calcReinforced(mMaterial)); // 0 - tag.setFloat("Bow_ProjectileSpeed", calcBowProjectileSpeed(mMaterial)); // 3.0f - tag.setInteger("Bow_DrawSpeed", calcBowDrawSpeed(mMaterial)); // 18 - tag.setFloat("Projectile_Mass", calcProjectileMass(mMaterial)); // 0.69f - tag.setFloat("Projectile_Fragility", calcProjectileFragility(mMaterial)); // 0.2f - tag.setString("Style", calcStyle(mMaterial)); - tag.setInteger("Color", calcColour(mMaterial)); - - - boolean generate = generateRecipes(mMaterial, id); - - if (generate) { - Logger.INFO("[TiCon] Sending IMC: addMaterial - "+mLocalName+"."); - FMLInterModComms.sendMessage("TConstruct", "addMaterial", tag); - - ItemStack itemstack = mMaterial.getIngot(1); - tag = new NBTTagCompound(); - tag.setInteger("MaterialId", id); - NBTTagCompound item = new NBTTagCompound(); - itemstack.writeToNBT(item); - tag.setTag("Item", item); - tag.setInteger("Value", 2); // What is value for? - - Logger.INFO("[TiCon] Sending IMC: addPartBuilderMaterial - "+mLocalName+"."); - FMLInterModComms.sendMessage("TConstruct", "addPartBuilderMaterial", tag); - - tag = new NBTTagCompound(); - tag.setInteger("MaterialId", id); - tag.setInteger("Value", 2); // What is value for? - item = new NBTTagCompound(); - itemstack.writeToNBT(item); - tag.setTag("Item", item); - - Logger.INFO("[TiCon] Sending IMC: addMaterialItem - "+mLocalName+"."); - FMLInterModComms.sendMessage("TConstruct", "addMaterialItem", tag); - } - - - } - - } - - private boolean generateRecipes(Material aMaterial, int aID) { - - Block aMatBlock; - Integer aMelt; - Fluid aFluid; - - try { - aMatBlock = aMaterial.getBlock(); - aMelt = aMaterial.getMeltingPointC(); - aFluid = aMaterial.getFluidStack(0).getFluid(); - } - catch (Throwable t) { - return false; - } - - if (aMatBlock == null || aMelt == null || aFluid == null) { - return false; - } - - - //Smeltery.addMelting(new ItemStack(ExtraUtils.unstableIngot, 1, 0), ExtraUtils.decorative1, 5, 850, aMaterial.getFluid(72)); - TinkersUtils.registerFluidType(mLocalName, aMatBlock, 0, aMelt, aFluid, true); - TinkersUtils.addMelting(aMaterial.getBlock(1), aMatBlock, 0, aMelt, aMaterial.getFluidStack(144*9)); - TinkersUtils.addMelting(aMaterial.getIngot(1), aMatBlock, 0, aMelt, aMaterial.getFluidStack(144)); - if (aMelt <= 3600) { - ItemStack ingotcast = TinkersUtils.getPattern(1); - TinkersUtils.addBasinRecipe(aMaterial.getBlock(1), - aMaterial.getFluidStack(144*9), (ItemStack) null, true, 100); - TinkersUtils.addCastingTableRecipe(aMaterial.getIngot(1), - aMaterial.getFluidStack(144), ingotcast, false, 50); - } - - boolean extended = TinkersUtils.generateCastingRecipes(aMaterial, aID); - - - - - - - //TConstructRegistry.getBasinCasting().addCastingRecipe(new ItemStack(ExtraUtils.decorative1, 1, 5), new FluidStack(unstable, 1296), (ItemStack)null, true, 100); - - - - - - - - - - - - - - - - - - - - - - - - - - - - return true; - } - - - - - - - -} diff --git a/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java b/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java deleted file mode 100644 index 8bc7ffef29..0000000000 --- a/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java +++ /dev/null @@ -1,120 +0,0 @@ -package gtPlusPlus.xmod.tinkers.util; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -import gregtech.api.enums.GT_Values; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class TinkersDryingRecipe { - - public static AutoMap recipes = new AutoMap(); - - public final int time; - public final ItemStack input; - public final ItemStack result; - - public static void generateAllDryingRecipes() { - List aRecipes = TinkersUtils.getDryingRecipes(); - if (aRecipes != null && aRecipes.size() > 0) { - for (Object o : aRecipes) { - Logger.INFO("Trying to generate recipe using object of type "+o.getClass().getSimpleName()); - generateFromTinkersRecipeObject(o); - } - } - else { - Logger.INFO("Error generating Drying recipes, map was either null or empty. Null? "+(aRecipes != null)+", Size: "+aRecipes.size()); - } - if (!recipes.isEmpty()) { - Logger.INFO("Adding "+recipes.size()+" drying rack recipes to the dehydrator."); - for (TinkersDryingRecipe r : recipes) { - CORE.RA.addDehydratorRecipe( - new ItemStack[] { - CI.getNumberedCircuit(16), - r.input - }, - GT_Values.NF, - GT_Values.NF, - new ItemStack[] {r.result}, - new int[] {}, - r.time/10, - 30); - } - } - } - - public static TinkersDryingRecipe generateFromTinkersRecipeObject(Object o) { - Field aTime; - Field aInput; - Field aOutput; - Class aTinkerClass = ReflectionUtils.getClass("tconstruct.library.crafting.DryingRackRecipes.DryingRecipe");//o.getClass(); - if (aTinkerClass == null || !LoadedMods.TiCon) { - Logger.INFO("Error generating Drying Recipe, could not find class. Exists? "+ReflectionUtils.doesClassExist("tconstruct.library.crafting.DryingRackRecipes.DryingRecipe")); - Class clazz = ReflectionUtils.getClass("tconstruct.library.crafting.DryingRackRecipes"); - Class[] y = clazz.getDeclaredClasses(); - if (y == null || y.length <= 0) { - Logger.INFO("No hidden inner classes."); - return null; - } - else { - boolean found = false; - for (Class h : y) { - Logger.INFO("Found hidden inner class: "+h.getCanonicalName()); - if (h.getSimpleName().toLowerCase().equals("dryingrecipe")) { - Logger.INFO("Found correct recipe. Caching at correct location."); - ReflectionUtils.mCachedClasses.put("tconstruct.library.crafting.DryingRackRecipes.DryingRecipe", h); - aTinkerClass = h; - found = true; - break; - } - } - if (!found) { - return null; - } - } - } - aTime = ReflectionUtils.getField(aTinkerClass, "time"); - aInput = ReflectionUtils.getField(aTinkerClass, "input"); - aOutput = ReflectionUtils.getField(aTinkerClass, "result"); - try { - int time_internal = aTime.getInt(o); - ItemStack input_internal = (ItemStack) aInput.get(o); - ItemStack result_internal = (ItemStack) aOutput.get(o); - return new TinkersDryingRecipe(input_internal, time_internal, result_internal); - } catch (Throwable b) { - b.printStackTrace(); - } - return null; - } - - public TinkersDryingRecipe(final ItemStack input, final int time, final ItemStack result) { - this.time = time; - this.input = input; - this.result = result; - Logger.INFO("Generating Drying Recipe. Input: "+input.getDisplayName()+", Output: "+result.getDisplayName()); - recipes.add(this); - } - - public boolean matches(ItemStack input) { - if (input.hasTagCompound()) { - input = input.copy(); - input.getTagCompound().removeTag("frypanKill"); - if (input.getTagCompound().hasNoTags()) { - input.setTagCompound((NBTTagCompound) null); - } - } - return ItemStack.areItemStacksEqual(this.input, input); - } - - public ItemStack getResult() { - return this.result.copy(); - } -} diff --git a/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java b/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java deleted file mode 100644 index cf3284bfae..0000000000 --- a/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java +++ /dev/null @@ -1,544 +0,0 @@ -package gtPlusPlus.xmod.tinkers.util; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; - -import gregtech.api.enums.Materials; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -public class TinkersUtils { - - private static final Class mClass_Smeltery; - private static final Class mClass_TConstructRegistry; - private static final Class mClass_ToolMaterial; - private static final Class mClass_IPattern; - private static final Class mClass_DynamicToolPart; - private static final Class mClass_FluidType; - private static final Class mClass_CastingRecipe; - private static final Class mClass_TinkerSmeltery; - - private static final Field mField_MoltenIronFluid; - - private static final Method mMethod_getFluidType; - private static final Method mMethod_getCastingRecipes; - - private static Object mSmelteryInstance; - private static Object mTinkersRegistryInstance; - - private static final HashMap mMethodCache = new LinkedHashMap(); - - - static { - mClass_Smeltery = ReflectionUtils.getClass("tconstruct.library.crafting.Smeltery"); - mClass_TConstructRegistry = ReflectionUtils.getClass("tconstruct.library.TConstructRegistry"); - - mClass_ToolMaterial = ReflectionUtils.getClass("tconstruct.library.tools.ToolMaterial"); - mClass_IPattern = ReflectionUtils.getClass("tconstruct.library.util.IPattern"); - mClass_DynamicToolPart = ReflectionUtils.getClass("tconstruct.library.tools.DynamicToolPart"); - mClass_FluidType = ReflectionUtils.getClass("tconstruct.library.crafting.FluidType"); - mClass_CastingRecipe = ReflectionUtils.getClass("tconstruct.library.crafting.CastingRecipe"); - mClass_TinkerSmeltery = ReflectionUtils.getClass("tconstruct.smeltery.TinkerSmeltery"); - - mField_MoltenIronFluid = ReflectionUtils.getField(mClass_TinkerSmeltery, "moltenIronFluid"); - - mMethod_getFluidType = ReflectionUtils.getMethod(mClass_FluidType, "getFluidType", String.class); - mMethod_getCastingRecipes = ReflectionUtils.getMethod(getCastingInstance(0), "getCastingRecipes", new Class[] {}); - } - - - /** - * - * @param aSwitch - The Registry to return - */ - private static void setTiConDataInstance() { - if (!LoadedMods.TiCon) { - return; - } else { - if (mSmelteryInstance == null) { - if (mClass_Smeltery != null) { - try { - mSmelteryInstance = ReflectionUtils.getField(mClass_Smeltery, "instance").get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - } - if (mTinkersRegistryInstance == null) { - if (mClass_TConstructRegistry != null) { - try { - mTinkersRegistryInstance = ReflectionUtils.getField(mClass_TConstructRegistry, "instance").get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - } - } - } - - public static final boolean isTiConFirstInOD() { - if (LoadedMods.TiCon) { - try { - return (boolean) ReflectionUtils.getField(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst").get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - return false; - } - - public static final boolean stopTiconLoadingFirst() { - if (isTiConFirstInOD()) { - try { - ReflectionUtils.setFinalFieldValue(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst", false); - if ((boolean) ReflectionUtils.getField(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst").get(null) == false) { - return true; - } - //Did not work, let's see where TiCon uses this and prevent it. - else { - ItemUtils.getNonTinkersDust("", 1); - } - } - catch (Exception e) {} - } - return false; - } - - /** - * Add a new fluid as a valid Smeltery fuel. - * @param fluid The fluid. - * @param power The temperature of the fluid. This also influences the melting speed. Lava is 1000. - * @param duration How long one "portion" of liquid fuels the smeltery. Lava is 10. - */ - public static void addSmelteryFuel (Fluid fluid, int power, int duration){ - setTiConDataInstance(); - ReflectionUtils.invokeVoid(mSmelteryInstance, "addSmelteryFuel", new Class[] {Fluid.class, int.class, int.class}, new Object[] {fluid, power, duration}); - } - - /** - * Returns true if the liquid is a valid smeltery fuel. - */ - public static boolean isSmelteryFuel (Fluid fluid){ - setTiConDataInstance(); - return ReflectionUtils.invoke(mSmelteryInstance, "isSmelteryFuel", new Class[] {Fluid.class}, new Object[] {fluid}); - } - - /** - * Returns the power of a smeltery fuel or 0 if it's not a fuel. - */ - public static int getFuelPower (Fluid fluid){ - setTiConDataInstance(); - return (int) ReflectionUtils.invokeNonBool(mSmelteryInstance, "getFuelPower", new Class[] {Fluid.class}, new Object[] {fluid}); - } - - /** - * Returns the duration of a smeltery fuel or 0 if it's not a fuel. - */ - public static int getFuelDuration (Fluid fluid){ - setTiConDataInstance(); - return (int) ReflectionUtils.invokeNonBool(mSmelteryInstance, "getFuelDuration", new Class[] {Fluid.class}, new Object[] {fluid}); - } - - - - - - - - public static boolean registerFluidType(String name, Block block, int meta, int baseTemperature, Fluid fluid, boolean isToolpart) { - if (mMethodCache.get("registerFluidType") == null) { - Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.FluidType"), "registerFluidType", String.class, Block.class, int.class, int.class, Fluid.class, boolean.class); - mMethodCache.put("registerFluidType", m); - } - try { - mMethodCache.get("registerFluidType").invoke(null, name, block, meta, baseTemperature, fluid, isToolpart); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - - - - - - - - public static boolean addBaseMeltingRecipes(Material aMaterial) { - return addMelting(aMaterial.getBlock(1), aMaterial.getBlock(), 0, aMaterial.getMeltingPointC(), aMaterial.getFluidStack(144*9)) && - addMelting(aMaterial.getIngot(1), aMaterial.getBlock(), 0, aMaterial.getMeltingPointC(), aMaterial.getFluidStack(144)); - } - - public static boolean addMelting(ItemStack input, Block block, int metadata, int temperature, FluidStack liquid) { - if (mMethodCache.get("addMelting") == null) { - Method m = ReflectionUtils.getMethod(mClass_Smeltery, "addMelting", ItemStack.class, Block.class, int.class, int.class, FluidStack.class); - mMethodCache.put("addMelting", m); - } - try { - mMethodCache.get("addMelting").invoke(null, input, block, metadata, temperature, liquid); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - public static boolean addMelting(Object type, ItemStack input, int temperatureDifference, int fluidAmount) { - if (mMethodCache.get("addMelting") == null) { - Method m = ReflectionUtils.getMethod(mClass_Smeltery, "addMelting", mClass_FluidType, ItemStack.class, int.class, int.class); - mMethodCache.put("addMelting", m); - } - try { - mMethodCache.get("addMelting").invoke(null, type, input, temperatureDifference, fluidAmount); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - - - - - - - - - - - public static boolean addBaseBasinRecipes(Material aMaterial) { - return addBasinRecipe(aMaterial.getBlock(1), aMaterial.getFluidStack(144*9), (ItemStack) null, true, 100); - } - - public static boolean addBasinRecipe(ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay) { - if (mMethodCache.get("addBasinRecipe") == null) { - Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.LiquidCasting"), "addCastingRecipe", ItemStack.class, FluidStack.class, ItemStack.class, boolean.class, int.class); - mMethodCache.put("addBasinRecipe", m); - } - try { - mMethodCache.get("addBasinRecipe").invoke(getCastingInstance(0), output, metal, cast, consume, delay); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - - - - - - - public static boolean addBaseCastingRecipes(Material aMaterial) { - ItemStack ingotcast = getPattern(1); - return addCastingTableRecipe(aMaterial.getIngot(1), aMaterial.getFluidStack(144), ingotcast, false, 50); - } - - public static boolean addCastingTableRecipe(ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay) { - if (mMethodCache.get("addCastingTableRecipe") == null) { - Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.LiquidCasting"), "addCastingRecipe", ItemStack.class, FluidStack.class, ItemStack.class, boolean.class, int.class); - mMethodCache.put("addCastingTableRecipe", m); - } - try { - mMethodCache.get("addCastingTableRecipe").invoke(getCastingInstance(1), output, metal, cast, consume, delay); - return true; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - return false; - } - } - - - - - - - - /** - * 0 For Table, 1 For Basin. - * @param aType - Casting Type - * @return - The casting instance. - */ - public static Object getCastingInstance(int aType) { - - setTiConDataInstance(); - - Method m = null; - if (aType == 0) { - m = ReflectionUtils.getMethod(mTinkersRegistryInstance, "getTableCasting", new Class[] {}); - //return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getTableCasting", new Class[] {}, new Object[] {}); - } - else if (aType == 1) { - m = ReflectionUtils.getMethod(mTinkersRegistryInstance, "getBasinCasting", new Class[] {}); - //return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getBasinCasting", new Class[] {}, new Object[] {}); - } - else { - //return null; - } - - if (m != null) { - try { - return m.invoke(mTinkersRegistryInstance, new Object[] {}); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - } - return null; - } - - - private static Item mTinkerMetalPattern; - public static ItemStack getPattern(int aType) { - if (mTinkerMetalPattern == null) { - Field m = ReflectionUtils.getField(mClass_TinkerSmeltery, "metalPattern"); - if (m != null) { - try { - mTinkerMetalPattern = (Item) m.get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - } - } - } - if (mTinkerMetalPattern != null) { - ItemStack ingotCast = new ItemStack(mTinkerMetalPattern, aType, 0); - return ingotCast; - } - return ItemUtils.getErrorStack(1, "Bad Tinkers Pattern"); - } - - private static AutoMap mDryingRackRecipes; - - public static List getDryingRecipes(){ - if (mDryingRackRecipes != null) { - return mDryingRackRecipes; - } - AutoMap aData = new AutoMap(); - int aCount = 0; - try { - ArrayList recipes = (ArrayList) ReflectionUtils.getField(ReflectionUtils.getClass("tconstruct.library.crafting.DryingRackRecipes"), "recipes").get(null); - if (recipes != null) { - for (Object o : recipes) { - aData.put(o); - aCount++; - } - Logger.INFO("Found "+aCount+" Tinkers drying rack recipes."); - } - else { - Logger.INFO("Failed to find any Tinkers drying rack recipes."); - } - } catch (IllegalArgumentException | IllegalAccessException e) { - Logger.INFO("Failed to find any Tinkers drying rack recipes."); - } - mDryingRackRecipes = aData; - return aData; - } - - /** - * Generates Tinkers {@link ToolMaterial}'s reflectively. - * @param name - * @param localizationString - * @param level - * @param durability - * @param speed - * @param damage - * @param handle - * @param reinforced - * @param stonebound - * @param style - * @param primaryColor - * @return - */ - public static Object generateToolMaterial(String name, String localizationString, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style, int primaryColor) { - try { - Constructor constructor = mClass_ToolMaterial.getConstructor(String.class, String.class, int.class, int.class, int.class, int.class, float.class, int.class, float.class, String.class, int.class); - Object myObject = constructor.newInstance(name, localizationString, level, durability, speed, damage, handle, reinforced, stonebound, style, primaryColor); - return myObject; - } catch (Throwable t) { - t.printStackTrace(); - return null; - } - } - - - - - - - - - - - - public static void addToolMaterial(int id, Object aToolMaterial) { - if (mMethodCache.get("addToolMaterial") == null) { - Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addtoolMaterial", int.class, mClass_ToolMaterial); - mMethodCache.put("addToolMaterial", m); - } - try { - mMethodCache.get("addToolMaterial").invoke(mClass_TConstructRegistry, id, aToolMaterial); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - - } - } - - public static void addDefaultToolPartMaterial(int id) { - if (mMethodCache.get("addDefaultToolPartMaterial") == null) { - Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addDefaultToolPartMaterial", int.class); - mMethodCache.put("addDefaultToolPartMaterial", m); - } - try { - mMethodCache.get("addDefaultToolPartMaterial").invoke(mClass_TConstructRegistry, id); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - - public static void addBowMaterial(int id, int drawspeed, float maxSpeed) { - if (mMethodCache.get("addBowMaterial") == null) { - Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addBowMaterial", int.class, int.class, float.class); - mMethodCache.put("addBowMaterial", m); - } - try { - mMethodCache.get("addBowMaterial").invoke(mClass_TConstructRegistry, id, drawspeed, maxSpeed); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - - public static void addArrowMaterial(int id, float mass, float fragility) { - if (mMethodCache.get("addArrowMaterial") == null) { - Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addArrowMaterial", int.class, float.class, float.class); - mMethodCache.put("addArrowMaterial", m); - } - try { - mMethodCache.get("addArrowMaterial").invoke(mClass_TConstructRegistry, id, mass, fragility); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - } - } - - public static List getTableCastingRecipes(){ - Object aCastingTableHandlerInstance = getCastingInstance(0); - List aTemp; - try { - aTemp = (List) mMethod_getCastingRecipes.invoke(aCastingTableHandlerInstance, new Object[] {}); - return aTemp; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - return new ArrayList(); - } - - public static boolean generateCastingRecipes(Material aMaterial, int aID) { - - List newRecipies = new LinkedList(); - - - Iterator iterator1 = getTableCastingRecipes().iterator(); - Fluid aMoltenIron = null; - if (aMoltenIron == null) { - try { - aMoltenIron = (Fluid) mField_MoltenIronFluid.get(null); - } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); - aMoltenIron = Materials.Iron.getMolten(0).getFluid(); - } - } - while (iterator1.hasNext()) { - CastingRecipeHandler recipe = new CastingRecipeHandler(iterator1.next()); - if (recipe == null || !recipe.valid) { - continue; - } - try { - if (recipe.castingMetal.getFluid() == aMoltenIron && recipe.cast != null - && mClass_IPattern.isInstance(recipe.cast.getItem()) && mClass_DynamicToolPart.isInstance(recipe.getResult().getItem())) { - newRecipies.add(recipe); - } - } catch (IllegalArgumentException e) { - e.printStackTrace(); - return false; - } - } - - - Object ft; - try { - ft = mMethod_getFluidType.invoke(null, aMaterial.getLocalizedName()); - Iterator iterator2 = newRecipies.iterator(); - while (iterator2.hasNext()) { - CastingRecipeHandler recipe = new CastingRecipeHandler(iterator2.next()); - if (!recipe.valid){ - continue; - } - //CastingRecipe recipe = (CastingRecipe) i$.next(); - ItemStack output = recipe.getResult().copy(); - output.setItemDamage(aID); - FluidStack liquid2 = new FluidStack(aMaterial.getFluidStack(0).getFluid(), recipe.castingMetal.amount); - addCastingTableRecipe(output, liquid2, recipe.cast, recipe.consumeCast, recipe.coolTime); - addMelting(ft, output, 0, liquid2.amount / 2); - } - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - return false; - } - - return true; - } - - private static class CastingRecipeHandler { - - public ItemStack output; - public FluidStack castingMetal; - public ItemStack cast; - public boolean consumeCast; - public int coolTime; - - public boolean valid; - - public CastingRecipeHandler(Object aCastingRecipe) { - if (mClass_CastingRecipe.isInstance(aCastingRecipe)) { - try { - Field aF_output = ReflectionUtils.getField(mClass_CastingRecipe, "output"); - Field aF_castingMetal = ReflectionUtils.getField(mClass_CastingRecipe, "castingMetal"); - Field aF_cast = ReflectionUtils.getField(mClass_CastingRecipe, "cast"); - Field aF_consumeCast = ReflectionUtils.getField(mClass_CastingRecipe, "consumeCast"); - Field aF_coolTime = ReflectionUtils.getField(mClass_CastingRecipe, "coolTime"); - - output = (ItemStack) aF_output.get(aCastingRecipe); - castingMetal = (FluidStack) aF_castingMetal.get(aCastingRecipe); - cast = (ItemStack) aF_cast.get(aCastingRecipe); - consumeCast = (boolean) aF_consumeCast.get(aCastingRecipe); - coolTime = (int) aF_coolTime.get(aCastingRecipe); - valid = true; - } - catch (Throwable t) { - t.printStackTrace(); - valid = false; - } - } - else { - valid = false; - } - } - - public boolean matches(FluidStack metal, ItemStack inputCast) { - return this.castingMetal.isFluidEqual(metal) && (this.cast != null && this.cast.getItemDamage() == 32767 - && inputCast.getItem() == this.cast.getItem() || ItemStack.areItemStacksEqual(this.cast, inputCast)); - } - - public ItemStack getResult() { - return this.output.copy(); - } - - } - -} diff --git a/src/Java/gtPlusPlus/xmod/witchery/WitchUtils.java b/src/Java/gtPlusPlus/xmod/witchery/WitchUtils.java deleted file mode 100644 index 35f9f4bbe8..0000000000 --- a/src/Java/gtPlusPlus/xmod/witchery/WitchUtils.java +++ /dev/null @@ -1,99 +0,0 @@ -package gtPlusPlus.xmod.witchery; - -import java.lang.reflect.Field; -import java.util.ArrayList; - -import com.mojang.authlib.GameProfile; - -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.oredict.OreDictionary; - -public class WitchUtils { - - private static final GameProfile NORMAL_MINER_PROFILE; - private static final GameProfile KOBOLDITE_MINER_PROFILE; - - static { - Field a1 = null, a2 = null; - GameProfile b1 = null, b2 = null; - if (LoadedMods.Witchery) { - try { - a1 = getField("com.emoniph.witchery.entity.ai.EntityAIDigBlocks", "NORMAL_MINER_PROFILE"); - a2 = getField("com.emoniph.witchery.entity.ai.EntityAIDigBlocks", "KOBOLDITE_MINER_PROFILE"); - b1 = (GameProfile) a1.get(null); - b2 = (GameProfile) a2.get(null); - } - catch (Throwable t) { - } - } - NORMAL_MINER_PROFILE = b1; - KOBOLDITE_MINER_PROFILE = b2; - } - - //com.emoniph.witchery.entity.ai.EntityAIDigBlocks.onHarvestDrops(EntityPlayer, HarvestDropsEvent) - public static void onHarvestDrops(final EntityPlayer harvester, final BlockEvent.HarvestDropsEvent event) { - - - if (LoadedMods.Witchery) { - - if (harvester != null && !harvester.worldObj.isRemote && !event.isCanceled() && (isEqual(harvester.getGameProfile(), KOBOLDITE_MINER_PROFILE) || isEqual(harvester.getGameProfile(), NORMAL_MINER_PROFILE))) { - final boolean hasKobolditePick = isEqual(harvester.getGameProfile(), KOBOLDITE_MINER_PROFILE); - final ArrayList newDrops = new ArrayList(); - double kobolditeChance = hasKobolditePick ? 0.02 : 0.01; - for (final ItemStack drop : event.drops) { - final int[] oreIDs = OreDictionary.getOreIDs(drop); - boolean addOriginal = true; - if (oreIDs.length > 0) { - final String oreName = OreDictionary.getOreName(oreIDs[0]); - if (oreName != null && oreName.startsWith("ore")) { - final ItemStack smeltedDrop = FurnaceRecipes.smelting().getSmeltingResult(drop); - if (smeltedDrop != null && hasKobolditePick && harvester.worldObj.rand.nextDouble() < 0.5) { - addOriginal = false; - newDrops.add(smeltedDrop.copy()); - newDrops.add(smeltedDrop.copy()); - if (harvester.worldObj.rand.nextDouble() < 0.25) { - newDrops.add(smeltedDrop.copy()); - } - } - kobolditeChance = (hasKobolditePick ? 0.08 : 0.05); - } - } - if (addOriginal) { - newDrops.add(drop); - } - } - event.drops.clear(); - for (final ItemStack newDrop : newDrops) { - event.drops.add(newDrop); - } - if (kobolditeChance > 0.0 && harvester.worldObj.rand.nextDouble() < kobolditeChance) { - event.drops.add(ALLOY.KOBOLDITE.getDust(1)); - } - } - } - - } - - public static Field getField(String aClassName, String aFieldName) { - Class c; - c = ReflectionUtils.getClass(aClassName); - if (c != null) { - Field f = ReflectionUtils.getField(c, aFieldName); - if (f != null) { - return f; - } - } - return null; - } - - public static boolean isEqual(final GameProfile a, final GameProfile b) { - return a != null && b != null && a.getId() != null && b.getId() != null && a.getId().equals(b.getId()); - } - -} diff --git a/src/Java/vswe/stevescarts/ModuleData/GppModuleData.java b/src/Java/vswe/stevescarts/ModuleData/GppModuleData.java deleted file mode 100644 index eb8a8f319f..0000000000 --- a/src/Java/vswe/stevescarts/ModuleData/GppModuleData.java +++ /dev/null @@ -1,49 +0,0 @@ -package vswe.stevescarts.ModuleData; - -import java.util.ArrayList; -import java.util.HashMap; - -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.sc2.modules.ModuleExoticSeeds; -import net.minecraft.init.Items; -import vswe.stevescarts.Helpers.ComponentTypes; -import vswe.stevescarts.Items.ModItems; -import vswe.stevescarts.Modules.ModuleBase; - -public class GppModuleData extends ModuleData { - - static byte ID_ExoticSeedAddon = 105; - public static ArrayList moduleListCustom = new ArrayList<>(); - - public GppModuleData(int id, String name, Class moduleClass, int modularCost) { - super(id, name, moduleClass, modularCost); - } - - @SuppressWarnings("unchecked") - public static void loadGpp() { - try { - HashMap moduleList = - (HashMap) (ReflectionUtils.getField(ModuleData.class, "moduleList").get(ModuleData.class)); - ModuleData netherWartModule = moduleList.get((byte)58); - - ModuleDataGroup farmerGroup = netherWartModule.getRequirement().get(0); - - ModuleData exoticSeedModule = - new ModuleData(ID_ExoticSeedAddon, "Crop: Exotic Seeds", ModuleExoticSeeds.class, 20).addRequirement(farmerGroup) - .addRecipe(new Object[][]{{Items.wheat_seeds}, - {ComponentTypes.EMPTY_DISK.getItemStack()} - }); - - moduleListCustom.add(exoticSeedModule); - - HashMap validModules = - (HashMap) (ReflectionUtils.getField(ModItems.class, "validModules").get(ModItems.class)); - - validModules.put(ID_ExoticSeedAddon, true); - - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } - -} diff --git a/src/main/java/gregtech/api/enums/TAE.java b/src/main/java/gregtech/api/enums/TAE.java new file mode 100644 index 0000000000..e8fd31d89e --- /dev/null +++ b/src/main/java/gregtech/api/enums/TAE.java @@ -0,0 +1,139 @@ +package gregtech.api.enums; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.HashSet; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class TAE { + + //TAE stands for Texture Array Expansion. + + public static int gtPPLastUsedIndex = 64; + public static int secondaryIndex = 0; + + public static HashMap mTAE = new HashMap(); + private static final HashSet mFreeSlots = new HashSet(64); + + static { + for (int i=64;i<128;i++) { + mFreeSlots.add(i); + } + Logger.INFO("Initialising TAE."); + } + + /** + * + * @param aPage - The Texture page (0-3) + * @param aID - The ID on the specified page (0-15) + * @param gt_CopiedBlockTexture - The Texture to register + * @return - Did it register correctly? + */ + public static boolean registerTexture(int aPage, int aID, GT_CopiedBlockTexture gt_CopiedBlockTexture) { + int aRealID = aID + (aPage * 16); + return registerTexture(64 + aRealID, gt_CopiedBlockTexture); + } + + public static boolean registerTexture(int aID, GT_CopiedBlockTexture gt_CopiedBlockTexture) { + if (mFreeSlots.contains(aID)) { + mFreeSlots.remove(aID); + mTAE.put(aID, gt_CopiedBlockTexture); + return true; + } + else { + CORE.crash("Tried to register texture with ID "+aID+" to TAE, but it is already in use."); + return false; // Dead Code + } + } + + public static void finalizeTAE() { + String aFreeSpaces = ""; + AutoMap aTemp = new AutoMap(mFreeSlots); + for (int i = 0; i < mFreeSlots.size() ; i++) { + aFreeSpaces += aTemp.get(i); + if (i != (mFreeSlots.size() - 1)) { + aFreeSpaces += ", "; + } + } + Logger.INFO("Free Indexes within TAE: "+aFreeSpaces); + Logger.INFO("Filling them with ERROR textures."); + for (int aFreeSlot : aTemp.values()) { + registerTexture(aFreeSlot, new GT_CopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15)); + } + Logger.INFO("Finalising TAE."); + for (int aKeyTae : mTAE.keySet()) { + Textures.BlockIcons.setCasingTextureForId(aKeyTae, mTAE.get(aKeyTae)); + } + Logger.INFO("Finalised TAE."); + } + + private static boolean registerTextures(GT_CopiedBlockTexture gt_CopiedBlockTexture) { + try { + //Handle page 2. + Logger.INFO("[TAE} Registering Texture, Last used casing ID is "+gtPPLastUsedIndex+"."); + if (gtPPLastUsedIndex >= 128) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) { + Field x = ReflectionUtils.getField(Textures.BlockIcons.class, "casingTexturePages"); + if (x != null) { + ITexture[][] h = (ITexture[][]) x.get(null); + if (h != null) { + h[64][secondaryIndex++] = gt_CopiedBlockTexture; + x.set(null, h); + Logger.INFO("[TAE} Registered Texture with ID "+(secondaryIndex-1)+" in secondary index."); + return true; + } + } + } + } + + //set to page 1. + else { + Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, gt_CopiedBlockTexture); + Logger.INFO("[TAE} Registered Texture with ID "+(gtPPLastUsedIndex)+" in main index."); + gtPPLastUsedIndex++; + return true; + } + } + catch (Throwable t) { + t.printStackTrace(); + } + Logger.INFO("[TAE} Failed to register texture, Last used casing ID is "+gtPPLastUsedIndex+"."); + return false; + } + + public static ITexture getTexture(int index){ + if (gtPPLastUsedIndex >= 128) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) { + return Textures.BlockIcons.getCasingTextureForId(((64*128)+index)); + } + } + return Textures.BlockIcons.getCasingTextureForId((64+index)); + } + + public static int GTPP_INDEX(int ID){ + + if (ID >= 64) { + if (gtPPLastUsedIndex >= 128) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) { + return (128+ID); + } + } + } + return (64+ID); + } + + public static int getIndexFromPage(int page, int blockMeta) { + int id = 64; + id += (page == 0 ? 0 : page == 1 ? 16 : page == 2 ? 32 : page == 3 ? 48 : page == 4 ? 64 : 0); + id += blockMeta; + return id; + } +} diff --git a/src/main/java/gregtech/api/util/EmptyRecipeMap.java b/src/main/java/gregtech/api/util/EmptyRecipeMap.java new file mode 100644 index 0000000000..31e1e3db17 --- /dev/null +++ b/src/main/java/gregtech/api/util/EmptyRecipeMap.java @@ -0,0 +1,51 @@ +package gregtech.api.util; + +import java.util.Collection; + +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; + +import net.minecraftforge.fluids.FluidStack; + +public class EmptyRecipeMap extends GT_Recipe_Map{ + + public EmptyRecipeMap(Collection aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { + super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, + aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, + aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + + } + + @Override + public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + return null; + + } + + @Override + public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + return null; + } + + @Override + public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + return null; + } + + @Override + public GT_Recipe addRecipe(GT_Recipe aRecipe) { + return null; + } + + @Override + protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { + return null; + } + + @Override + public GT_Recipe add(GT_Recipe aRecipe) { + return null; + } + +} diff --git a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java new file mode 100644 index 0000000000..bc7cdb4701 --- /dev/null +++ b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java @@ -0,0 +1,80 @@ +package gregtech.api.util; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomFishable; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraftforge.common.FishingHooks; +import net.minecraftforge.fluids.FluidStack; + +public class FishPondFakeRecipe { + + public static ArrayList fish = new ArrayList(); + public static ArrayList junk = new ArrayList(); + public static ArrayList treasure = new ArrayList(); + + @SuppressWarnings("unchecked") + public static boolean generateFishPondRecipes() { + + try { + fish = (ArrayList) ReflectionUtils.getField(FishingHooks.class, "fish").get(null); + junk = (ArrayList) ReflectionUtils.getField(FishingHooks.class, "junk").get(null); + treasure = (ArrayList) ReflectionUtils.getField(FishingHooks.class, "treasure").get(null); + } + catch (IllegalArgumentException | IllegalAccessException e) { + Logger.INFO("Error generating Fish Pond Recipes. [1]"); + e.printStackTrace(); + } + + AutoMap> mega = new AutoMap>(); + mega.put(fish); + mega.put(junk); + mega.put(treasure); + + int mType = 14; + for (ArrayList f : mega.values()) { + for (int e=0;e mHashMap = new AutoMap(); + + public GTPP_Recipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecialItems, final int[] aChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + super(aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); + //Logger.SPECIFIC_WARNING(this.getClass().getName()+" | [GregtechRecipe]", "Created new recipe instance for "+ItemUtils.getArrayStackNames(aInputs), 167); + mRecipeHash = getRecipeHash(this); + mHashMap.addAll(convertStringDataToInts(getEncodedRecipeData(this))); + } + + public GTPP_Recipe(final ItemStack aInput1, final ItemStack aOutput1, final int aFuelValue, final int aType) { + this(aInput1, aOutput1, null, null, null, aFuelValue, aType); + } + + private static AutoMap convertStringDataToInts(AutoMap aData){ + AutoMap aMap = new AutoMap(); + for (String string : aData) { + aMap.add(string.hashCode()); + } + return aMap; + } + + private static AutoMap getEncodedRecipeData(GTPP_Recipe aRecipe){ + AutoMap aData = new AutoMap(); + aData.add(aRecipe.mRecipeHash); + aData.add(""+aRecipe.mCanBeBuffered); + aData.add(""+aRecipe.mHidden); + aData.add(""+aRecipe.mEnabled); + aData.add(""+aRecipe.mDuration); + aData.add(""+aRecipe.mEUt); + aData.add(""+aRecipe.mFakeRecipe); + aData.add(""+aRecipe.mSpecialItems); + aData.add(aRecipe.mChances.toString()); + aData.add(aRecipe.mInputs.toString()); + aData.add(aRecipe.mOutputs.toString()); + aData.add(aRecipe.mFluidInputs.toString()); + aData.add(aRecipe.mFluidOutputs.toString()); + return aData; + } + + public static String getRecipeHash(GT_Recipe aRecipe) { + String aEncoderString = aRecipe.toString(); + return aEncoderString; + } + + private final void checkModified() { + if (hasBeenModified()) { + CORE.crash("Someone has edited an internal GT++ recipe, which is no longer allowed. Please complain to whoever has done this, not Alkalus."); + } + } + + private final boolean hasBeenModified() { + String aEncoderString = this.toString(); + boolean aBasicHashCheck = mRecipeHash.equals(aEncoderString); + if (!aBasicHashCheck) { + Logger.INFO("This Recipe Hash: "+aEncoderString); + Logger.INFO("Expected Hash Code: "+mRecipeHash); + return true; + } + AutoMap aData = new AutoMap(); + aData.addAll(convertStringDataToInts(getEncodedRecipeData(this))); + long aHashTotal = 0; + long aExpectedHashTotal = 0; + for (int a : aData) { + aHashTotal += a; + } + for (int a : mHashMap) { + aExpectedHashTotal += a; + } + if (aHashTotal != aExpectedHashTotal) { + Logger.INFO("This Recipe Hash: "+aEncoderString); + Logger.INFO("Expected Hash Code: "+mRecipeHash); + Logger.INFO("This Recipe Hash: "+aHashTotal); + Logger.INFO("Expected Hash Code: "+aExpectedHashTotal); + return true; + } + return false; + } + + // aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000! + public GTPP_Recipe(final ItemStack aInput1, final ItemStack aOutput1, final ItemStack aOutput2, final ItemStack aOutput3, final ItemStack aOutput4, final int aSpecialValue, final int aType) { + this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue)); + + Logger.WARNING("Switch case method for adding fuels"); + if ((this.mInputs.length > 0) && (aSpecialValue > 0)) { + switch (aType) { + // Diesel Generator + case 0: + Logger.WARNING("Added fuel "+aInput1.getDisplayName()+" is ROCKET FUEL - continuing"); + GTPP_Recipe_Map.sRocketFuels.addRecipe(this); + break; + // Gas Turbine + case 1: + GTPP_Recipe_Map.sGeoThermalFuels.addRecipe(this); + break; + // Thermal Generator + case 2: + GTPP_Recipe_Map.sRTGFuels.addRecipe(this); + break; + // Plasma Generator + case 4: + //Gregtech_Recipe_Map.sPlasmaFuels.addRecipe(this); + break; + // Magic Generator + case 5: + //Gregtech_Recipe_Map.sMagicFuels.addRecipe(this); + break; + // Fluid Generator. Usually 3. Every wrong Type ends up in the Semifluid Generator + default: + //Gregtech_Recipe_Map.sDenseLiquidFuels.addRecipe(this); + break; + } + } + } + + //Custom Recipe Handlers + public GTPP_Recipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput, final int aDuration, final int aEUt) { + this(true, new ItemStack[]{aInput}, aOutput.clone(), null, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); + if ((this.mInputs.length > 0) && (this.mOutputs[0] != null)) { + GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(this); + } + } + + /*public GregtechRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) { + this(true, new ItemStack[]{aInput}, aOutput.clone(), null, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); + if (mInputs.length > 0 && mOutputs[0] != null) { + Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(this); + } + }*/ + + + public static void reInit() { + GT_Log.out.println("GT_Mod: Re-Unificating Recipes."); + for (final GTPP_Recipe_Map tMapEntry : GTPP_Recipe_Map.sMappings) { + //tMapEntry.reInit(); + if (tMapEntry != null && tMapEntry.mRecipeList != null && !tMapEntry.mRecipeList.isEmpty()) { + for (GT_Recipe aRecipe : tMapEntry.mRecipeList) { + checkRecipeOwnership(aRecipe); + } + } + } + for (final GTPP_Recipe_Map_Internal tMapEntry : GTPP_Recipe_Map_Internal.sMappingsEx) { + //tMapEntry.reInit(); + if (tMapEntry != null && tMapEntry.mRecipeList != null && !tMapEntry.mRecipeList.isEmpty()) { + for (GT_Recipe aRecipe : tMapEntry.mRecipeList) { + checkRecipeOwnership(aRecipe); + } + } + } + } + + private final static boolean checkRecipeOwnership(GT_Recipe aRecipe) { + if (aRecipe != null && aRecipe instanceof GTPP_Recipe) { + GTPP_Recipe nRecipe = (GTPP_Recipe) aRecipe; + GTPP_Recipe_Map_Internal.mHashedRecipes.put(nRecipe.hashCode(), nRecipe); + return true; + } + return false; + } + + public final static void checkRecipeModifications() { + for (GTPP_Recipe aRecipe : GTPP_Recipe_Map_Internal.mHashedRecipes.values()) { + Logger.INFO("Checking recipe: "+aRecipe.hashCode()); + aRecipe.checkModified(); + } + } + + @Override + public ItemStack getRepresentativeInput(final int aIndex) { + if ((aIndex < 0) || (aIndex >= this.mInputs.length)) { + return null; + } + return GT_Utility.copy(this.mInputs[aIndex]); + } + + @Override + public ItemStack getOutput(final int aIndex) { + if ((aIndex < 0) || (aIndex >= this.mOutputs.length)) { + return null; + } + return GT_Utility.copy(this.mOutputs[aIndex]); + } + + @Override + public int getOutputChance(final int aIndex) { + if ((aIndex < 0) || (aIndex >= this.mChances.length)) { + return 10000; + } + return this.mChances[aIndex]; + } + + @Override + public FluidStack getRepresentativeFluidInput(final int aIndex) { + if ((aIndex < 0) || (aIndex >= this.mFluidInputs.length) || (this.mFluidInputs[aIndex] == null)) { + return null; + } + return this.mFluidInputs[aIndex].copy(); + } + + @Override + public FluidStack getFluidOutput(final int aIndex) { + if ((aIndex < 0) || (aIndex >= this.mFluidOutputs.length) || (this.mFluidOutputs[aIndex] == null)) { + return null; + } + return this.mFluidOutputs[aIndex].copy(); + } + + @Override + public boolean isRecipeInputEqual(final boolean aDecreaseStacksizeBySuccess, final FluidStack[] aFluidInputs, final ItemStack... aInputs) { + return this.isRecipeInputEqual(aDecreaseStacksizeBySuccess, false, aFluidInputs, aInputs); + } + + @Override + public boolean isRecipeInputEqual(final boolean aDecreaseStacksizeBySuccess, final boolean aDontCheckStackSizes, final FluidStack[] aFluidInputs, final ItemStack... aInputs) { + if ((this.mFluidInputs.length > 0) && (aFluidInputs == null)) { + return false; + } + for (final FluidStack tFluid : this.mFluidInputs) { + if (tFluid != null) { + boolean temp = true; + for (final FluidStack aFluid : aFluidInputs) { + if ((aFluid != null) && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || (aFluid.amount >= tFluid.amount))) { + temp = false; + break; + } + } + if (temp) { + return false; + } + } + } + + if ((this.mInputs.length > 0) && (aInputs == null)) { + return false; + } + + for (final ItemStack tStack : this.mInputs) { + if (tStack != null) { + boolean temp = true; + for (final ItemStack aStack : aInputs) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true)) && (aDontCheckStackSizes || (aStack.stackSize >= tStack.stackSize))) { + temp = false; + break; + } + } + if (temp) { + return false; + } + } + } + + if (aDecreaseStacksizeBySuccess) { + if (aFluidInputs != null) { + for (final FluidStack tFluid : this.mFluidInputs) { + if (tFluid != null) { + for (final FluidStack aFluid : aFluidInputs) { + if ((aFluid != null) && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || (aFluid.amount >= tFluid.amount))) { + aFluid.amount -= tFluid.amount; + break; + } + } + } + } + } + + if (aInputs != null) { + for (final ItemStack tStack : this.mInputs) { + if (tStack != null) { + for (final ItemStack aStack : aInputs) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true)) && (aDontCheckStackSizes || (aStack.stackSize >= tStack.stackSize))) { + aStack.stackSize -= tStack.stackSize; + break; + } + } + } + } + } + } + + return true; + } + + public static class GTPP_Recipe_Map_Internal extends GT_Recipe_Map { + + public static final Collection sMappingsEx = new ArrayList<>(); + private static final HashMap mHashedRecipes = new HashMap(); + + public GTPP_Recipe_Map_Internal(Collection aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { + super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + GT_Recipe_Map.sMappings.remove(this); + GTPP_Recipe_Map_Internal.sMappingsEx.add(this); + } + + } + + public static class GTPP_Recipe_Map { + /** + * Contains all Recipe Maps + */ + public static final Collection sMappings = new ArrayList<>(); + //public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map(new HashSet(200), "gtpp.recipe.chemicalbath", "Chemical Bath", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true); + public static final GTPP_Recipe_Map_Internal sCokeOvenRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 1, 0, 1, E, 1, E, true, true); + public static final GTPP_Recipe_Map_Internal sMatterFab2Recipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.matterfab2", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Default", 9, 9, 0, 0, 1, E, 1, E, true, true); + //public static final Gregtech_Recipe_Map sMatterFabRecipes = new Gregtech_Recipe_Map(new HashSet(200), "gtpp.recipe.matterfab", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 3, 1, 1, 1, E, 1, E, true, true); + + public static final GT_Recipe_Map_Fuel sRocketFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gtpp.recipe.rocketenginefuel", "Rocket Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 3000, " EU", true, true); + + public static final GTPP_Recipe_Map_Internal sGeoThermalFuels = new GTPP_Recipe_Map_Internal(new HashSet(10), "gtpp.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); + public static final GTPP_Recipe_Map_Internal sChemicalDehydratorRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.chemicaldehydrator", "Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true); + public static final GTPP_Recipe_Map_Internal sVacuumFurnaceRecipes = new GTPP_Recipe_Map_Internal(new HashSet(500), "gtpp.recipe.vacfurnace", "Vacuum Furnace", null, "gregtech:textures/gui/basicmachines/Default", 6, 6, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true); + public static final GTPP_Recipe_Map_Internal sAlloyBlastSmelterRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.alloyblastsmelter", "Alloy Blast Smelter", null, RES_PATH_GUI + "basicmachines/BlastSmelter", 9, 9, 1, 0, 1, E, 1, E, true, true); + public static final GTPP_Recipe_Map_Internal sSteamTurbineFuels = new GTPP_Recipe_Map_Internal(new HashSet(10), "gtpp.recipe.steamturbinefuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); + + //LFTR recipes + public static final GTPP_Recipe_Map_Internal sLiquidFluorineThoriumReactorRecipes = new GTPP_Recipe_Map_Internal(new HashSet(50), "gtpp.recipe.lftr", "Liquid Fluoride Thorium Reactor", null, RES_PATH_GUI + "basicmachines/FissionFuel", 0, 0, 0, 2, 0, "Power: ", 1, " EU/t per Dynamo", true, true); + + // Ore Milling Map + public static final GTPP_Recipe_Map_Internal sOreMillRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.oremill", "Milling", null, RES_PATH_GUI + "basicmachines/LFTR", 3, 4, 1, 0, 1, E, 1, E, true, false); + + //Fission Fuel Plant Recipes + public static final GTPP_Recipe_Map_Internal sFissionFuelProcessing = new GTPP_Recipe_Map_Internal(new HashSet(50), "gtpp.recipe.fissionfuel", "Nuclear Fuel Processing", null, RES_PATH_GUI + "basicmachines/FissionFuel", 0, 0, 0, 0, 1, E, 1, E, true, false); + + //Cold Trap + public static final GTPP_Recipe_Map_Internal sColdTrapRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.coldtrap", "Cold Trap", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true); + + //Reactor Processing Unit + public static final GTPP_Recipe_Map_Internal sReactorProcessingUnitRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.reactorprocessingunit", "Reactor Processing Unit", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true); + + //Basic Washer Map + public static final GTPP_Recipe_Map_Internal sSimpleWasherRecipes = new GTPP_Recipe_Map_Internal(new HashSet(3), "gtpp.recipe.simplewasher", "Simple Dust Washer", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 1, 1, 0, 0, 1, E, 1, E, true, true); + + //public static final GT_Recipe_Map sSimpleWasherRecipes_FakeFuckBW = new GT_Recipe_Map(new HashSet(3), "gtpp.recipe.simplewasher", "Fuck you Bart", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 1, 1, 0, 0, 1, E, 1, E, true, false); + + public static final GTPP_Recipe_Map_Internal sChemicalPlantRecipes = new GTPP_Recipe_Map_Internal( + new HashSet(100), + "gtpp.recipe.fluidchemicaleactor", + "Chemical Plant", + null, + CORE.MODID+":textures/gui/FluidReactor", + 0, + 0, + 0, + 2, + 1, + "Tier: ", + 1, + E, + true, + false); + + + //RTG Fuel Map + public static final GT_Recipe.GT_Recipe_Map_Fuel sRTGFuels = new GTPP_Recipe.GT_Recipe_Map_Fuel( + new HashSet(10), "gtpp.recipe.RTGgenerators", "RTG", null, + "gregtech:textures/gui/basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 365, " Minecraft Days", true, true); + + //Thermal Boiler map + public static final GT_Recipe.GT_Recipe_Map_Fuel sThermalFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gtpp.recipe.thermalgeneratorfuel", + "Thermal Generator Fuel", null, "gregtech:textures/gui/basicmachines/Default", 1, 1, 0, 0, 1, + "Fuel Value: ", 1000, " EU", true, false); + + //Cyclotron recipe map + public static final GTPP_Recipe_Map_Internal sCyclotronRecipes = new GTPP_Recipe_Map_Internal(new HashSet(200), "gtpp.recipe.cyclotron", "COMET - Compact Cyclotron", null, RES_PATH_GUI + "basicmachines/BlastSmelter", 2, 16, 0, 0, 1, E, 1, E, true, true); + + //Advanced Mixer + public static final GTPP_Recipe_Map_Internal sAdvancedMixerRecipes = new GTPP_Recipe_Map_Internal(new HashSet(1000), "gtpp.recipe.advanced.mixer", + "Advanced Material Combiner", null, "gregtech:textures/gui/basicmachines/MixerAdvanced", 4, 4, 1, 0, 2, "", 1, "", true, true); + + + //Mini Fusion + public static final GTPP_Recipe_Map_Internal sSlowFusionRecipes = new GTPP_Recipe_Map_Internal(new HashSet(50), "gtpp.recipe.slowfusionreactor", + "Mimir - Slow Fusion", null, "gregtech:textures/gui/basicmachines/LFTR", 0, 0, 0, 2, 1, "Start: ", 1, + " EU", true, true); + + + //Component Assembler + public static final GT_Recipe_Map sComponentAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet(300), "gtpp.recipe.componentassembler", "Component Assembler", null, RES_PATH_GUI + "basicmachines/Assembler", 6, 1, 1, 0, 1, E, 1, E, true, true); + + //Special Maps for Multis + public static final GTPP_Recipe_Map_Internal sFishPondRecipes = new GTPP_Recipe_Map_Internal(new HashSet(3), "gtpp.recipe.fishpond", "Zhuhai - Fishing Port", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 1, 0, 0, 1, "Requires Circuit: ", 1, ".", true, true); + public static final GTPP_Recipe_Map_Internal sSpargeTowerRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.spargetower", "Sparging", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, E, 1, E, true, false); + + //public static final GTPP_Recipe_Map sMultiblockCentrifugeRecipes = new GT_Recipe_Map_LargeCentrifuge(); + //public static final GTPP_Recipe_Map sMultiblockElectrolyzerRecipes = new GT_Recipe_Map_LargeElectrolyzer(); + //public static final GTPP_Recipe_Map sAdvFreezerRecipes = new GT_Recipe_Map_AdvancedVacuumFreezer(); + + public static final GTPP_Recipe_Map_Internal sAdvFreezerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.cryogenicfreezer", "Cryogenic Freezer", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, "", 0, "", false, true); + public static final GTPP_Recipe_Map_Internal sMultiblockCentrifugeRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.multicentrifuge", "Multiblock Centrifuge", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, "", 0, "", false, true); + public static final GTPP_Recipe_Map_Internal sMultiblockElectrolyzerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.multielectro", "Multiblock Electrolyzer", null, RES_PATH_GUI + "basicmachines/FissionFuel", 9, 9, 0, 0, 1, "", 0, "", false, true); + public static final GTPP_Recipe_Map_Internal sChemicalPlant_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.temp4", "temp4", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 0, 0, 0, 0, 0, "", 0, "", false, false); + public static final GTPP_Recipe_Map_Internal sMultiblockMixerRecipes_GT = new GTPP_Recipe_Map_Internal(new HashSet(2000), "gtpp.recipe.multimixer", "Multiblock Mixer", null, RES_PATH_GUI + "basicmachines/FissionFuel", 12, 9, 0, 0, 1, "", 0, "", false, true); + + //Semi-Fluid Fuel Map + public static final GT_Recipe_Map_Fuel sSemiFluidLiquidFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gtpp.recipe.semifluidgeneratorfuels", "Semifluid Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); + + // Flotation Cell + public static final GTPP_Recipe_Map_Internal sFlotationCellRecipes = new GTPP_Recipe_Map_Internal(new HashSet(10000), "gtpp.recipe.flotationcell", "Flotation Cell", null, RES_PATH_GUI + "basicmachines/LFTR", 6, 4, 1, 1, 1, "Ore Key: ", 1, E, true, false); + + + + + /** + * HashMap of Recipes based on their Items + */ + public final Map> mRecipeItemMap = new HashMap<>(); + /** + * HashMap of Recipes based on their Fluids + */ + public final Map> mRecipeFluidMap = new HashMap<>(); + /** + * The List of all Recipes + */ + public final Collection mRecipeList; + /** + * String used as an unlocalised Name. + */ + public final String mUnlocalizedName; + /** + * String used in NEI for the Recipe Lists. If null it will use the unlocalised Name instead + */ + public final String mNEIName; + /** + * GUI used for NEI Display. Usually the GUI of the Machine itself + */ + public final String mNEIGUIPath; + public final String mNEISpecialValuePre, mNEISpecialValuePost; + public final int mUsualInputCount, mUsualOutputCount, mNEISpecialValueMultiplier, mMinimalInputItems, mMinimalInputFluids, mAmperage; + public final boolean mNEIAllowed, mShowVoltageAmperageInNEI; + + /** + * Initialises a new type of Recipe Handler. + * + * @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a pre-initialised Size. + * @param aUnlocalizedName the unlocalised Name of this Recipe Handler, used mainly for NEI. + * @param aLocalName the displayed Name inside the NEI Recipe GUI. + * @param aNEIGUIPath the displayed GUI Texture, usually just a Machine GUI. Auto-Attaches ".png" if forgotten. + * @param aUsualInputCount the usual amount of Input Slots this Recipe Class has. + * @param aUsualOutputCount the usual amount of Output Slots this Recipe Class has. + * @param aNEISpecialValuePre the String in front of the Special Value in NEI. + * @param aNEISpecialValueMultiplier the Value the Special Value is getting Multiplied with before displaying + * @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something. + * @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general. + */ + public GTPP_Recipe_Map(final Collection aRecipeList, + final String aUnlocalizedName, final String aLocalName, final String aNEIName, + final String aNEIGUIPath, final int aUsualInputCount, + final int aUsualOutputCount, final int aMinimalInputItems, + final int aMinimalInputFluids, final int aAmperage, + final String aNEISpecialValuePre, final int aNEISpecialValueMultiplier, + final String aNEISpecialValuePost, final boolean aShowVoltageAmperageInNEI, + final boolean aNEIAllowed) { + sMappings.add(this); + this.mNEIAllowed = aNEIAllowed; + this.mShowVoltageAmperageInNEI = aShowVoltageAmperageInNEI; + this.mRecipeList = aRecipeList; + this.mNEIName = aNEIName == null ? aUnlocalizedName : aNEIName; + this.mNEIGUIPath = aNEIGUIPath.endsWith(".png") ? aNEIGUIPath : aNEIGUIPath + ".png"; + this.mNEISpecialValuePre = aNEISpecialValuePre; + this.mNEISpecialValueMultiplier = aNEISpecialValueMultiplier; + this.mNEISpecialValuePost = aNEISpecialValuePost; + this.mAmperage = aAmperage; + this.mUsualInputCount = aUsualInputCount; + this.mUsualOutputCount = aUsualOutputCount; + this.mMinimalInputItems = aMinimalInputItems; + this.mMinimalInputFluids = aMinimalInputFluids; + GregTech_API.sFluidMappings.add(this.mRecipeFluidMap); + GregTech_API.sItemStackMappings.add(this.mRecipeItemMap); + GT_LanguageManager.addStringLocalization(this.mUnlocalizedName = aUnlocalizedName, aLocalName); + } + + public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return this.addRecipe(new GTPP_Recipe(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + } + + public GTPP_Recipe addRecipe(final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return this.addRecipe(new GTPP_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false); + } + + public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return this.addRecipe(new GTPP_Recipe(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + } + + public GTPP_Recipe addRecipe(final boolean aOptimize, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return this.addRecipe(new GTPP_Recipe(aOptimize, null, null, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + } + + /*public GregtechRecipe addRecipe(boolean aOptimize, FluidStack aInput1, FluidStack aOutput1, ItemStack[] bInput1, ItemStack[] bOutput1, int aDuration, int aEUt, int aSpecialValue) { + return addRecipe(new GregtechRecipe(aOptimize, aInput1, aOutput1, bInput1,bOutput1, aDuration, aEUt, aSpecialValue)); + + }*/ + + public GTPP_Recipe addRecipe(final GTPP_Recipe aRecipe) { + Logger.WARNING("Adding Recipe Method 1"); + return this.addRecipe(aRecipe, true, false, false); + } + + protected GTPP_Recipe addRecipe(final GTPP_Recipe aRecipe, final boolean aCheckForCollisions, final boolean aFakeRecipe, final boolean aHidden) { + Logger.WARNING("Adding Recipe Method 2 - This Checks if hidden, fake or if duplicate recipes exists, I think."); + aRecipe.mHidden = aHidden; + aRecipe.mFakeRecipe = aFakeRecipe; + Logger.WARNING("Logging some data about this method: GregtechRecipe["+aRecipe.toString()+"] | aCheckForCollisions["+aCheckForCollisions+"] | aFakeRecipe["+aFakeRecipe+"] | aHidden["+aHidden+"]"); + Logger.WARNING("Logging some data about this method: mMinimalInputFluids["+this.mMinimalInputFluids+"] | mMinimalInputItems["+this.mMinimalInputItems+"] | aRecipe.mFluidInputs.length["+aRecipe.mFluidInputs.length+"] | aRecipe.mInputs.length["+aRecipe.mInputs.length+"]"); + if ((aRecipe.mFluidInputs.length < this.mMinimalInputFluids) && (aRecipe.mInputs.length < this.mMinimalInputItems)){ + Logger.WARNING("Step 2 failed"); + return null;} + + Logger.WARNING("Logging some data about this method: aCheckForCollisions["+aCheckForCollisions+"] | findRecipe != null ["+(this.findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null)+"]"); + if (aCheckForCollisions && (this.findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null)){ + Logger.WARNING("Step 2 failed - 2"); + return null; + } + return this.add(aRecipe); + } + + + + /** + * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes + */ + public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return this.addFakeRecipe(aCheckForCollisions, new GTPP_Recipe(false, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + } + + /** + * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes + */ + public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return this.addFakeRecipe(aCheckForCollisions, new GTPP_Recipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + } + + /** + * Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes + */ + public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final GTPP_Recipe aRecipe) { + return this.addRecipe(aRecipe, aCheckForCollisions, true, false); + } + + public GTPP_Recipe add(final GTPP_Recipe aRecipe) { + Logger.WARNING("Adding Recipe Method 3"); + this.mRecipeList.add(aRecipe); + for (final FluidStack aFluid : aRecipe.mFluidInputs) { + if (aFluid != null) { + Logger.WARNING("Fluid is valid - getting some kind of fluid instance to add to the recipe hashmap."); + Collection tList = this.mRecipeFluidMap.get(aFluid.getFluid()); + if (tList == null) { + this.mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<>(1)); + } + tList.add(aRecipe); + } + } + return this.addToItemMap(aRecipe); + } + + public void reInit() { + final Map> tMap = this.mRecipeItemMap; + if (tMap != null) { + tMap.clear(); + } + for (final GTPP_Recipe tRecipe : this.mRecipeList) { + GT_OreDictUnificator.setStackArray(true, tRecipe.mInputs); + GT_OreDictUnificator.setStackArray(true, tRecipe.mOutputs); + if (tMap != null) { + this.addToItemMap(tRecipe); + } + } + } + + /** + * @return if this Item is a valid Input for any for the Recipes + */ + public boolean containsInput(final ItemStack aStack) { + return (aStack != null) && (this.mRecipeItemMap.containsKey(new GT_ItemStack(aStack)) || this.mRecipeItemMap.containsKey(new GT_ItemStack(GT_Utility.copyMetaData(W, aStack)))); + } + + /** + * @return if this Fluid is a valid Input for any for the Recipes + */ + public boolean containsInput(final FluidStack aFluid) { + return (aFluid != null) && this.containsInput(aFluid.getFluid()); + } + + /** + * @return if this Fluid is a valid Input for any for the Recipes + */ + public boolean containsInput(final Fluid aFluid) { + return (aFluid != null) && this.mRecipeFluidMap.containsKey(aFluid); + } + + public GTPP_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs); + } + + public GTPP_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GTPP_Recipe aRecipe, final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, null, aInputs); + } + + /** + * finds a Recipe matching the aFluid and ItemStack Inputs. + * + * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup. + * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up. + * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs + * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage + * @param aFluids the Fluid Inputs + * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do. + * @param aInputs the Item Inputs + * @return the Recipe it has found or null for no matching Recipe + */ + public GTPP_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GTPP_Recipe aRecipe, final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, final ItemStack aSpecialSlot, ItemStack... aInputs) { + // No Recipes? Well, nothing to be found then. + if (this.mRecipeList.isEmpty()) { + return null; + } + + // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes. + // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes. + if (GregTech_API.sPostloadFinished) { + if (this.mMinimalInputFluids > 0) { + if (aFluids == null) { + return null; + } + int tAmount = 0; + for (final FluidStack aFluid : aFluids) { + if (aFluid != null) { + tAmount++; + } + } + if (tAmount < this.mMinimalInputFluids) { + return null; + } + } + if (this.mMinimalInputItems > 0) { + if (aInputs == null) { + return null; + } + int tAmount = 0; + for (final ItemStack aInput : aInputs) { + if (aInput != null) { + tAmount++; + } + } + if (tAmount < this.mMinimalInputItems) { + return null; + } + } + } + + // Unification happens here in case the Input isn't already unificated. + if (aNotUnificated) { + aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); + } + + // Check the Recipe which has been used last time in order to not have to search for it again, if possible. + if (aRecipe != null) { + if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return aRecipe.mEnabled && ((aVoltage * this.mAmperage) >= aRecipe.mEUt) ? aRecipe : null; + } + } + + // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. + if ((this.mUsualInputCount > 0) && (aInputs != null)) { + for (final ItemStack tStack : aInputs) { + if (tStack != null) { + Collection + tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(tStack)); + if (tRecipes != null) { + for (final GTPP_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; + } + } + } + tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack))); + if (tRecipes != null) { + for (final GTPP_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; + } + } + } + } + } + } + + // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too. + if ((this.mMinimalInputItems == 0) && (aFluids != null)) { + for (final FluidStack aFluid : aFluids) { + if (aFluid != null) { + final Collection + tRecipes = this.mRecipeFluidMap.get(aFluid.getFluid()); + if (tRecipes != null) { + for (final GTPP_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; + } + } + } + } + } + } + + // And nothing has been found. + return null; + } + + protected GTPP_Recipe addToItemMap(final GTPP_Recipe aRecipe) { + Logger.WARNING("Adding Recipe Method 4"); + for (final ItemStack aStack : aRecipe.mInputs) { + if (aStack != null) { + Logger.WARNING("Method 4 - Manipulating "+aStack.getDisplayName()); + final GT_ItemStack tStack = new GT_ItemStack(aStack); + Logger.WARNING("Method 4 - Made gt stack of item "+tStack.toStack().getDisplayName()); + Collection tList = this.mRecipeItemMap.get(tStack); + if (tList != null){ + Logger.WARNING("Method 4 - Gt Recipe Hashmap: "+tList.toString()); + } + if (tList == null){ + Logger.WARNING("Method 4 - brrr list was NUll"); + this.mRecipeItemMap.put(tStack, tList = new HashSet<>(1)); + Logger.WARNING("Method 4 - Attemping backup method for Gt Recipe Hashmap:"); + + while (tList.iterator().hasNext()){ + Logger.WARNING(tList.iterator().next().toString()); + } + + } + tList.add(aRecipe); + Logger.WARNING("Method 4 - Added recipe to map? I think."); + } + } + return aRecipe; + } + + public GTPP_Recipe findRecipe(final IGregTechTileEntity baseMetaTileEntity, final GTPP_Recipe aRecipe, final boolean aNotUnificated, + final long aVoltage, final FluidStack[] aFluids, final FluidStack[] fluidStacks) { + + ItemStack aInputs[] = null; + // No Recipes? Well, nothing to be found then. + if (this.mRecipeList.isEmpty()) { + return null; + } + + // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes. + // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes. + if (GregTech_API.sPostloadFinished) { + if (this.mMinimalInputFluids > 0) { + if (aFluids == null) { + return null; + } + int tAmount = 0; + for (final FluidStack aFluid : aFluids) { + if (aFluid != null) { + tAmount++; + } + } + if (tAmount < this.mMinimalInputFluids) { + return null; + } + } + if (this.mMinimalInputItems > 0) { + if (aInputs == null) { + return null; + } + int tAmount = 0; + for (final ItemStack aInput : aInputs) { + if (aInput != null) { + tAmount++; + } + } + if (tAmount < this.mMinimalInputItems) { + return null; + } + } + } + + // Unification happens here in case the Input isn't already unificated. + if (aNotUnificated) { + aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); + } + + // Check the Recipe which has been used last time in order to not have to search for it again, if possible. + if (aRecipe != null) { + if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return aRecipe.mEnabled && ((aVoltage * this.mAmperage) >= aRecipe.mEUt) ? aRecipe : null; + } + } + + // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. + if ((this.mUsualInputCount > 0) && (aInputs != null)) { + for (final ItemStack tStack : aInputs) { + if (tStack != null) { + Collection + tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(tStack)); + if (tRecipes != null) { + for (final GTPP_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; + } + } + } + tRecipes = this.mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack))); + if (tRecipes != null) { + for (final GTPP_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; + } + } + } + } + } + } + + // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too. + if ((this.mMinimalInputItems == 0) && (aFluids != null)) { + for (final FluidStack aFluid : aFluids) { + if (aFluid != null) { + final Collection + tRecipes = this.mRecipeFluidMap.get(aFluid.getFluid()); + if (tRecipes != null) { + for (final GTPP_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) { + return tRecipe.mEnabled && ((aVoltage * this.mAmperage) >= tRecipe.mEUt) ? tRecipe : null; + } + } + } + } + } + } + + // And nothing has been found. + return null; + } + } + + // ----------------------------------------------------------------------------------------------------------------- + // Here are a few Classes I use for Special Cases in some Machines without having to write a separate Machine Class. + // ----------------------------------------------------------------------------------------------------------------- + + /** + * Abstract Class for general Recipe Handling of non GT Recipes + */ + public static abstract class GT_Recipe_Map_NonGTRecipes extends GTPP_Recipe_Map { + public GT_Recipe_Map_NonGTRecipes(final Collection aRecipeList, final String aUnlocalizedName, final String aLocalName, final String aNEIName, final String aNEIGUIPath, final int aUsualInputCount, final int aUsualOutputCount, final int aMinimalInputItems, final int aMinimalInputFluids, final int aAmperage, final String aNEISpecialValuePre, final int aNEISpecialValueMultiplier, final String aNEISpecialValuePost, final boolean aShowVoltageAmperageInNEI, final boolean aNEIAllowed) { + super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + } + + @Override + public boolean containsInput(final ItemStack aStack) { + return false; + } + + @Override + public boolean containsInput(final FluidStack aFluid) { + return false; + } + + @Override + public boolean containsInput(final Fluid aFluid) { + return false; + } + + @Override + public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return null; + } + + @Override + public GTPP_Recipe addRecipe(final boolean aOptimize, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return null; + } + + @Override + public GTPP_Recipe addRecipe(final GTPP_Recipe aRecipe) { + return null; + } + + @Override + public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final int[] aOutputChances, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return null; + } + + @Override + public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final ItemStack[] aInputs, final ItemStack[] aOutputs, final Object aSpecial, final FluidStack[] aFluidInputs, final FluidStack[] aFluidOutputs, final int aDuration, final int aEUt, final int aSpecialValue) { + return null; + } + + @Override + public GTPP_Recipe addFakeRecipe(final boolean aCheckForCollisions, final GTPP_Recipe aRecipe) { + return null; + } + + @Override + public GTPP_Recipe add(final GTPP_Recipe aRecipe) { + return null; + } + + @Override + public void reInit() {/**/} + + @Override + protected GTPP_Recipe addToItemMap(final GTPP_Recipe aRecipe) { + return null; + } + } + + /** + * Just a Recipe Map with Utility specifically for Fuels. + */ + public static class Gregtech_Recipe_Map_Fuel extends GTPP_Recipe_Map { + public Gregtech_Recipe_Map_Fuel(final Collection aRecipeList, final String aUnlocalizedName, final String aLocalName, final String aNEIName, final String aNEIGUIPath, final int aUsualInputCount, final int aUsualOutputCount, final int aMinimalInputItems, final int aMinimalInputFluids, final int aAmperage, final String aNEISpecialValuePre, final int aNEISpecialValueMultiplier, final String aNEISpecialValuePost, final boolean aShowVoltageAmperageInNEI, final boolean aNEIAllowed) { + super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + } + + public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final int aFuelValueInEU) { + Logger.WARNING("Adding Fuel using method 1"); + return this.addFuel(aInput, aOutput, null, null, 10000, aFuelValueInEU); + } + + public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final int aChance, final int aFuelValueInEU) { + Logger.WARNING("Adding Fuel using method 2"); + return this.addFuel(aInput, aOutput, null, null, aChance, aFuelValueInEU); + } + + public GTPP_Recipe addFuel(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aFuelValueInEU) { + Logger.WARNING("Adding Fuel using method 3"); + return this.addFuel(null, null, aFluidInput, aFluidOutput, 10000, aFuelValueInEU); + } + + public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aFuelValueInEU) { + Logger.WARNING("Adding Fuel using method 4"); + return this.addFuel(aInput, aOutput, aFluidInput, aFluidOutput, 10000, aFuelValueInEU); + } + + public GTPP_Recipe addFuel(final ItemStack aInput, final ItemStack aOutput, final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aChance, final int aFuelValueInEU) { + Logger.WARNING("Adding Fuel using method 5"); + return this.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, 0, 0, aFuelValueInEU); + } + } + + public ArrayList getInputPositionedStacks() { + return null; + } + + public ArrayList getOutputPositionedStacks() { + return null; + } + + public int compareTo(GTPP_Recipe recipe) { + // first lowest tier recipes + // then fastest + // then with lowest special value + // then dry recipes + // then with fewer inputs + if (this.mEUt != recipe.mEUt) { + return this.mEUt - recipe.mEUt; + } else if (this.mDuration != recipe.mDuration) { + return this.mDuration - recipe.mDuration; + } else if (this.mSpecialValue != recipe.mSpecialValue) { + return this.mSpecialValue - recipe.mSpecialValue; + } else if (this.mFluidInputs.length != recipe.mFluidInputs.length) { + return this.mFluidInputs.length - recipe.mFluidInputs.length; + } else if (this.mInputs.length != recipe.mInputs.length) { + return this.mInputs.length - recipe.mInputs.length; + } + return 0; + } + + public int compareTo(GT_Recipe recipe) { + // first lowest tier recipes + // then fastest + // then with lowest special value + // then dry recipes + // then with fewer inputs + if (this.mEUt != recipe.mEUt) { + return this.mEUt - recipe.mEUt; + } else if (this.mDuration != recipe.mDuration) { + return this.mDuration - recipe.mDuration; + } else if (this.mSpecialValue != recipe.mSpecialValue) { + return this.mSpecialValue - recipe.mSpecialValue; + } else if (this.mFluidInputs.length != recipe.mFluidInputs.length) { + return this.mFluidInputs.length - recipe.mFluidInputs.length; + } else if (this.mInputs.length != recipe.mInputs.length) { + return this.mInputs.length - recipe.mInputs.length; + } + return 0; + } + +} diff --git a/src/main/java/gregtech/api/util/GasSpargingRecipe.java b/src/main/java/gregtech/api/util/GasSpargingRecipe.java new file mode 100644 index 0000000000..493c31dc65 --- /dev/null +++ b/src/main/java/gregtech/api/util/GasSpargingRecipe.java @@ -0,0 +1,99 @@ +package gregtech.api.util; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.data.ArrayUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import net.minecraftforge.fluids.FluidStack; + +public class GasSpargingRecipe implements Comparable { + + public final FluidStack mInputGas; + public final FluidStack mInputSpentFuel; + public final FluidStack mOutputSpargedFuel; + public final int[] mMaxOutputQuantity; + public final FluidStack[] mFluidInputs; + public final FluidStack[] mFluidOutputs; + public final int mDuration; + public final int mEUt; + + public GasSpargingRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel, FluidStack aSpargedFuel, FluidStack[] aOutputs, int[] aMaxOutputQuantity) { + mInputGas = aSpargeGas; + mInputSpentFuel = aSpentFuel; + mOutputSpargedFuel = aSpargedFuel; + mFluidInputs = new FluidStack[] {mInputGas, mInputSpentFuel}; + aOutputs = ArrayUtils.insertElementAtIndex(aOutputs, 0, aSpargeGas); + aOutputs = ArrayUtils.insertElementAtIndex(aOutputs, 1, aSpargedFuel); + mFluidOutputs = aOutputs; + mMaxOutputQuantity = aMaxOutputQuantity; + mDuration = 20 * 60 * 5; + mEUt = MaterialUtils.getVoltageForTier(3); + } + + @Override + public boolean equals(Object o) { + if (o instanceof GasSpargingRecipe) { + GasSpargingRecipe i = (GasSpargingRecipe) o; + if (this.mInputGas.equals(i.mInputGas) && this.mInputSpentFuel.equals(i.mInputSpentFuel)) { + return true; + } + } + return false; + } + + public int getMaxOutput(int aIndex) { + if (aIndex == 0) { + return mInputGas.amount * 100; + } + else if (aIndex == 1) { + return mOutputSpargedFuel.amount * 100; + } + aIndex -= 2; + if ((aIndex < 0) || (aIndex >= this.mMaxOutputQuantity.length)) { + return 10000; + } + return this.mMaxOutputQuantity[aIndex]; + } + + public boolean isValid() { + if (mInputGas == null || mInputGas.amount <= 0 || + mInputSpentFuel == null || mInputSpentFuel.amount <= 0 || + mFluidOutputs == null || mFluidOutputs.length < 1 || + mMaxOutputQuantity == null || mMaxOutputQuantity.length < 1 || + mFluidOutputs.length != mMaxOutputQuantity.length) { + return false; + } + return true; + } + + public boolean containsInputs(FluidStack aSpargeGas, FluidStack aSpentFuel) { + if (aSpargeGas != null && aSpargeGas.getFluid().equals(this.mInputGas.getFluid())) { + if (aSpentFuel != null && aSpentFuel.getFluid().equals(this.mInputSpentFuel.getFluid())) { + return true; + } + } + return false; + } + + @Override + public int compareTo(GasSpargingRecipe o) { + if (o.mFluidOutputs.length > this.mFluidOutputs.length) { + return 1; + } else if (o.mFluidOutputs.length == this.mFluidOutputs.length) { + return 0; + } else { + return -1; + } + } + + public String[] getRecipeInfo() { + AutoMap result = new AutoMap(); + result.put("Input "+ItemUtils.getArrayStackNames(mFluidInputs)); + result.put("Output "+ItemUtils.getArrayStackNames(mFluidOutputs)); + result.put("Duration: "+mDuration); + result.put("EU/t: "+mEUt); + String s[] = result.toArray(); + return s; + } + +} diff --git a/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java b/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java new file mode 100644 index 0000000000..6e60cc7ac3 --- /dev/null +++ b/src/main/java/gregtech/api/util/GasSpargingRecipeMap.java @@ -0,0 +1,48 @@ +package gregtech.api.util; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraftforge.fluids.FluidStack; + +public class GasSpargingRecipeMap extends AutoMap{ + + public static final AutoMap mRecipes = new AutoMap(); + public static final String mUnlocalizedName = "gtpp.recipe.lftr.sparging"; + public static final String mNEIName = mUnlocalizedName; + public static final String mNEIDisplayName = "LFTR Gas Sparging"; + public static final String mNEIGUIPath = RES_PATH_GUI + "basicmachines/FissionFuel.png"; + + + public static boolean addRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel, FluidStack aSpargedFuel, FluidStack[] aOutputs, int[] aMaxOutputs) { + if (aSpargeGas == null || aSpargeGas.amount <= 0 || + aSpentFuel == null || aSpentFuel.amount <= 0 || + aSpargedFuel == null || aSpargedFuel.amount <= 0 || + aOutputs == null || aOutputs.length < 1 || + aMaxOutputs == null || aMaxOutputs.length < 1 || + aOutputs.length != aMaxOutputs.length) { + return false; + } + int aMapSize = mRecipes.size(); + GasSpargingRecipe aRecipe = new GasSpargingRecipe( + aSpargeGas, + aSpentFuel, + aSpargedFuel, + aOutputs, + aMaxOutputs + ); + mRecipes.put(aRecipe); + return mRecipes.size() > aMapSize; + } + + public static GasSpargingRecipe findRecipe(FluidStack aSpargeGas, FluidStack aSpentFuel) { + for (GasSpargingRecipe aRecipe : mRecipes) { + if (aRecipe.containsInputs(aSpargeGas, aSpentFuel)) { + return aRecipe; + } + } + return null; + } +} + + diff --git a/src/main/java/gregtech/api/util/HotFuel.java b/src/main/java/gregtech/api/util/HotFuel.java new file mode 100644 index 0000000000..c9a6dcf7c5 --- /dev/null +++ b/src/main/java/gregtech/api/util/HotFuel.java @@ -0,0 +1,28 @@ +package gregtech.api.util; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +public class HotFuel { + + public static void addNewHotFuel(FluidStack aInput1, FluidStack aOutput1, ItemStack[] outputItems, int[] chances, int aSpecialValue) { + GTPP_Recipe x = new GTPP_Recipe( + true, + null, + outputItems, + null, + chances, + new FluidStack[]{aInput1}, + new FluidStack[]{aOutput1}, + 1, //1 Tick + 0, //No Eu produced + aSpecialValue //Magic Number + ); + GTPP_Recipe.GTPP_Recipe_Map.sThermalFuels.addRecipe(x); + } + + + + +} diff --git a/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java b/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java new file mode 100644 index 0000000000..fa01ea9b5d --- /dev/null +++ b/src/main/java/gregtech/api/util/SemiFluidFuelHandler.java @@ -0,0 +1,117 @@ +package gregtech.api.util; + +import static gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sSemiFluidLiquidFuels; + +import java.util.HashMap; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class SemiFluidFuelHandler { + + + public static boolean addSemiFluidFuel(ItemStack aFuelItem, int aFuelValue) { + FluidStack p = FluidContainerRegistry.getFluidForFilledItem(aFuelItem); + if (p != null && aFuelValue > 0) { + return addSemiFluidFuel(p, aFuelValue); + } else { + Logger.INFO("Fuel value for " + aFuelItem.getDisplayName() + " is <= 0, ignoring."); + } + return false; + } + + + public static boolean addSemiFluidFuel(FluidStack aFuel, int aFuelValue) { + FluidStack p = aFuel; + if (p != null && aFuelValue > 0) { + GT_Recipe aRecipe = + new GTPP_Recipe(true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] { p }, + null, + 0, + 0, + aFuelValue); + if (aRecipe.mSpecialValue > 0) { + Logger.INFO("Added " + aRecipe.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+(aRecipe.mSpecialValue*1000)+"EU per 1000L."); + sSemiFluidLiquidFuels.add(aRecipe); + return true; + } + } else { + Logger.INFO("Fuel value for " + p != null ? p.getLocalizedName() : "NULL Fluid" + " is <= 0, ignoring."); + } + return false; + } + + + + + + + public static boolean generateFuels() { + final FluidStack aCreosote = FluidUtils.getFluidStack("creosote", 1000); + final FluidStack aHeavyFuel = FluidUtils.getFluidStack("liquid_heavy_fuel", 1000); + final FluidStack aHeavyOil = FluidUtils.getFluidStack("liquid_heavy_oil", 1000); + final HashMap> aFoundFluidsFromItems = new HashMap>(); + // Find Fluids From items + for (final GT_Recipe r : gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDenseLiquidFuels.mRecipeList) { + + GT_Recipe g = r.copy(); + + + if (g != null && g.mEnabled && g.mInputs.length > 0 && g.mInputs[0] != null) { + for (ItemStack i : g.mInputs) { + FluidStack f = FluidContainerRegistry.getFluidForFilledItem(i); + if (f != null) { + Pair aData = new Pair(f, g.mSpecialValue); + aFoundFluidsFromItems.put(aData.hashCode(), aData); + } + } + } else if (g != null && g.mEnabled && g.mFluidInputs.length > 0 && g.mFluidInputs[0] != null) { + boolean aContainsCreosote = false; + for (FluidStack f : g.mFluidInputs) { + if (f.isFluidEqual(aCreosote)) { + aContainsCreosote = true; + } + } + g.mSpecialValue *= aContainsCreosote ? 6 : 3; + Logger.INFO("Added " + g.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+g.mSpecialValue+"EU per 1000L."); + sSemiFluidLiquidFuels.add(g); + } + } + for (Pair p : aFoundFluidsFromItems.values()) { + if (p != null) { + int aFuelValue = p.getValue(); + if (p.getKey().isFluidEqual(aCreosote)) { + aFuelValue *= 6; + } + else if (p.getKey().isFluidEqual(aHeavyFuel) || p.getKey().isFluidEqual(aHeavyOil)){ + aFuelValue *= 1.5; + } + else { + aFuelValue *= 2; + } + + if (aFuelValue <= (128*3)) { + GT_Recipe aRecipe = new GTPP_Recipe(true, new ItemStack[] {}, new ItemStack[] {}, null, new int[] {}, + new FluidStack[] { p.getKey() }, null, 0, 0, aFuelValue); + if (aRecipe.mSpecialValue > 0) { + Logger.INFO("Added " + aRecipe.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+(aRecipe.mSpecialValue*1000)+"EU per 1000L."); + sSemiFluidLiquidFuels.add(aRecipe); + } + } else { + Logger.INFO("Boosted Fuel value for " + p.getKey().getLocalizedName() + " exceeds 512k, ignoring."); + } + } + } + return sSemiFluidLiquidFuels.mRecipeList.size() > 0; + } + +} diff --git a/src/main/java/gregtech/api/util/ThermalFuel.java b/src/main/java/gregtech/api/util/ThermalFuel.java new file mode 100644 index 0000000000..d7b732ce5d --- /dev/null +++ b/src/main/java/gregtech/api/util/ThermalFuel.java @@ -0,0 +1,43 @@ +package gregtech.api.util; + +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraftforge.fluids.FluidStack; + +public class ThermalFuel { + + public static void addThermalFuel(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int euValue, int aSpecialValue) { + GTPP_Recipe x = new GTPP_Recipe( + true, + null, + null, + null, + null, + new FluidStack[]{aInput1, aInput2}, + new FluidStack[]{aOutput1}, + 20, //1 Tick + euValue, //No Eu produced + aSpecialValue //Magic Number + ); + GTPP_Recipe.GTPP_Recipe_Map.sGeoThermalFuels.addRecipe(x); + } + + public static void addSteamTurbineFuel(FluidStack aInput1) { + GTPP_Recipe x = new GTPP_Recipe( + true, + null, + null, + null, + null, + new FluidStack[]{aInput1}, + null, + 20, //1 Tick + MathUtils.findPercentageOfInt((aInput1.amount/2), 95), //No Eu produced + 0 //Magic Number + ); + GTPP_Recipe.GTPP_Recipe_Map.sSteamTurbineFuels.addRecipe(x); + } + + + + +} diff --git a/src/main/java/gtPlusPlus/GTplusplus.java b/src/main/java/gtPlusPlus/GTplusplus.java new file mode 100644 index 0000000000..a70ce24e45 --- /dev/null +++ b/src/main/java/gtPlusPlus/GTplusplus.java @@ -0,0 +1,564 @@ +package gtPlusPlus; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableAnimatedTurbines; +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableCustomCapes; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Collection; +import java.util.HashMap; + +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.*; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.util.*; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.chunkloading.GTPP_ChunkManager; +import gtPlusPlus.core.commands.CommandDebugChunks; +import gtPlusPlus.core.commands.CommandEnableDebugWhileRunning; +import gtPlusPlus.core.commands.CommandMath; +import gtPlusPlus.core.common.CommonProxy; +import gtPlusPlus.core.config.ConfigHandler; +import gtPlusPlus.core.handler.BookHandler; +import gtPlusPlus.core.handler.PacketHandler; +import gtPlusPlus.core.handler.Recipes.RegistrationHandler; +import gtPlusPlus.core.handler.events.BlockEventHandler; +import gtPlusPlus.core.handler.events.LoginEventHandler; +import gtPlusPlus.core.handler.events.MissingMappingsEvent; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.general.ItemGiantEgg; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.LocaleUtils; +import gtPlusPlus.core.util.minecraft.HazmatUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.nei.NEI_IMC_Sender; +import gtPlusPlus.plugin.manager.Core_Manager; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.chemplant.GregtechMTE_ChemicalPlant; +import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelterGT_GTNH; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MultisUsingFluidInsteadOfCells; +import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.launchwrapper.Launch; +import net.minecraft.util.IIcon; + +@MCVersion(value = "1.7.10") +@Mod(modid = CORE.MODID, name = CORE.name, version = CORE.VERSION, dependencies = "required-after:Forge; after:TConstruct; after:PlayerAPI; after:dreamcraft; after:IC2; after:ihl; after:psychedelicraft; after:gregtech; after:Forestry; after:MagicBees; after:CoFHCore; after:Growthcraft; after:Railcraft; after:CompactWindmills; after:ForbiddenMagic; after:MorePlanet; after:PneumaticCraft; after:ExtraUtilities; after:Thaumcraft; after:rftools; after:simplyjetpacks; after:BigReactors; after:EnderIO; after:tectech; after:GTRedtech; after:beyondrealitycore; after:OpenBlocks; after:IC2NuclearControl; after:TGregworks; after:StevesCarts; after:xreliquary;") +public class GTplusplus implements ActionListener { + + public static enum INIT_PHASE { + SUPER(null), PRE_INIT(SUPER), INIT(PRE_INIT), POST_INIT( + INIT + ), SERVER_START(POST_INIT), STARTED(SERVER_START); + protected boolean mIsPhaseActive = false; + private final INIT_PHASE mPrev; + + private INIT_PHASE(INIT_PHASE aPreviousPhase) { + mPrev = aPreviousPhase; + } + + public synchronized final boolean isPhaseActive() { + return mIsPhaseActive; + } + public synchronized final void setPhaseActive(boolean aIsPhaseActive) { + if (mPrev != null && mPrev.isPhaseActive()) { + mPrev.setPhaseActive(false); + } + mIsPhaseActive = aIsPhaseActive; + if (CURRENT_LOAD_PHASE != this) { + CURRENT_LOAD_PHASE = this; + } + } + } + + public static INIT_PHASE CURRENT_LOAD_PHASE = INIT_PHASE.SUPER; + + // Mod Instance + @Mod.Instance(CORE.MODID) + public static GTplusplus instance; + + // Material Loader + public static GT_Material_Loader mGregMatLoader; + + // GT_Proxy instance + protected static Meta_GT_Proxy mGregProxy; + + // GT++ Proxy Instances + @SidedProxy(clientSide = "gtPlusPlus.core.proxy.ClientProxy", serverSide = "gtPlusPlus.core.proxy.ServerProxy") + public static CommonProxy proxy; + + // Loads Textures + @SideOnly(value = Side.CLIENT) + public static void loadTextures() { + Logger.INFO("Loading some textures on the client."); + // Tools + Logger.WARNING( + "Processing texture: " + + TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile().getResourcePath() + ); + Logger.WARNING( + "Processing texture: " + + TexturesGtTools.ANGLE_GRINDER.getTextureFile().getResourcePath() + ); + Logger.WARNING( + "Processing texture: " + + TexturesGtTools.ELECTRIC_SNIPS.getTextureFile().getResourcePath() + ); + Logger.WARNING( + "Processing texture: " + + TexturesGtTools.ELECTRIC_LIGHTER.getTextureFile().getResourcePath() + ); + Logger.WARNING( + "Processing texture: " + + TexturesGtTools.ELECTRIC_BUTCHER_KNIFE.getTextureFile().getResourcePath() + ); + + // Blocks + Logger.WARNING( + "Processing texture: " + + TexturesGtBlock.Casing_Machine_Dimensional.getTextureFile().getResourcePath() + ); + } + + public GTplusplus() { + super(); + INIT_PHASE.SUPER.setPhaseActive(true); + } + + // Pre-Init + @Mod.EventHandler + public void preInit(final FMLPreInitializationEvent event) { + INIT_PHASE.PRE_INIT.setPhaseActive(true); + Logger.INFO( + "Loading " + CORE.name + " " + CORE.VERSION + " on Gregtech " + + Utils.getGregtechVersionAsString() + ); + // Load all class objects within the plugin package. + Core_Manager.veryEarlyInit(); + PacketHandler.init(); + + if (!Utils.isServer()) { + enableCustomCapes = true; + } + + // Give this a go mate. + // initAnalytics(); + setupMaterialBlacklist(); + // setupMaterialWhitelist(); + + // Handle GT++ Config + ConfigHandler.handleConfigFile(event); + + // Check for Dev + CORE.DEVENV = (Boolean) Launch.blackboard.get( + "fml.deobfuscatedEnvironment" + ); + // Utils.LOG_INFO("User's Country: " + CORE.USER_COUNTRY); + + Utils.registerEvent(new LoginEventHandler()); + Utils.registerEvent(new MissingMappingsEvent()); + Logger.INFO("Login Handler Initialized"); + + proxy.preInit(event); + Logger.INFO("Setting up our own GT_Proxy."); + Meta_GT_Proxy.preInit(); + Core_Manager.preInit(); + GTPP_ChunkManager.init(); + } + + // Init + @Mod.EventHandler + public void init(final FMLInitializationEvent event) { + INIT_PHASE.INIT.setPhaseActive(true); + proxy.init(event); + proxy.registerNetworkStuff(); + Meta_GT_Proxy.init(); + Core_Manager.init(); + NEI_IMC_Sender.IMCSender(); + // Used by foreign players to generate .lang files for translation. + if (CORE.ConfigSwitches.dumpItemAndBlockData) { + LocaleUtils.generateFakeLocaleFile(); + } + + } + + // Post-Init + @Mod.EventHandler + public void postInit(final FMLPostInitializationEvent event) { + INIT_PHASE.POST_INIT.setPhaseActive(true); + proxy.postInit(event); + HazmatUtils.init(); + BookHandler.runLater(); + Meta_GT_Proxy.postInit(); + Core_Manager.postInit(); + // SprinklerHandler.registerModFerts(); + + ItemGiantEgg.postInit(ModItems.itemBigEgg); + BlockEventHandler.init(); + GTPP_Recipe.reInit(); + + Logger.INFO( + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + ); + Logger.INFO( + "| Recipes succesfully Loaded: " + + RegistrationHandler.recipesSuccess + " | Failed: " + + RegistrationHandler.recipesFailed + " |" + ); + Logger.INFO( + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + ); + Logger.INFO( + "Finally, we are finished. Have some cripsy bacon as a reward." + ); + } + + @EventHandler + public synchronized void serverStarting( + final FMLServerStartingEvent event + ) { + INIT_PHASE.SERVER_START.setPhaseActive(true); + event.registerServerCommand(new CommandMath()); + event.registerServerCommand(new CommandEnableDebugWhileRunning()); + event.registerServerCommand(new CommandDebugChunks()); + if (LoadedMods.Thaumcraft) { + event.registerServerCommand(new CommandDumpAspects()); + } + if (GTPP_ChunkManager.debugChunkloaders) { + event.registerServerCommand(new GTPP_ChunkManager.DebugCommand()); + } + Core_Manager.serverStart(); + INIT_PHASE.STARTED.setPhaseActive(true); + } + + @Mod.EventHandler + public synchronized void serverStopping( + final FMLServerStoppingEvent event + ) { + Core_Manager.serverStop(); + } + + @Override + public void actionPerformed(final ActionEvent arg0) { + + } + + /** + * This {@link EventHandler} is called after the + * {@link FMLPostInitializationEvent} stages of all loaded mods executes + * successfully. {@link #onLoadComplete(FMLLoadCompleteEvent)} exists to + * inject recipe generation after Gregtech and all other mods are entirely + * loaded and initialized. + * + * @param event + * - The {@link EventHandler} object passed through from FML to + * {@link #GTplusplus()}'s {@link #instance}. + */ + @Mod.EventHandler + public void onLoadComplete(FMLLoadCompleteEvent event) { + proxy.onLoadComplete(event); + generateGregtechRecipeMaps(); + // Check our maps are untouched + GTPP_Recipe.checkRecipeModifications(); + Logger.INFO("Passed verification checks."); + } + + @Mod.EventHandler + public void onIDChangingEvent(FMLModIdMappingEvent aEvent) { + GTPP_Recipe.reInit(); + } + + public static void tryPatchTurbineTextures() { + if (enableAnimatedTurbines) { + BlockIcons h = Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE; + BlockIcons h2 = Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE; + try { + Logger.INFO( + "Trying to patch GT textures to make Turbines animated." + ); + IIcon aIcon = TexturesGtBlock.Overlay_Machine_Turbine_Active.getIcon(); + if (ReflectionUtils.setField(h, "mIcon", aIcon)) { + Logger.INFO("Patched Gas Turbine Icon."); + } + if (ReflectionUtils.setField(h2, "mIcon", aIcon)) { + Logger.INFO("Patched Steam Turbine Icon."); + } + } + catch (Throwable e) { + e.printStackTrace(); + } + } + } + + protected void generateGregtechRecipeMaps() { + + int[] mValidCount = new int[]{ + 0, 0, 0 + }; + int[] mInvalidCount = new int[]{ + 0, 0, 0, 0 + }; + int[] mOriginalCount = new int[]{ + 0, 0, 0 + }; + + RecipeGen_BlastSmelterGT_GTNH.generateGTNHBlastSmelterRecipesFromEBFList(); + FishPondFakeRecipe.generateFishPondRecipes(); + //GregtechMiniRaFusion.generateSlowFusionrecipes(); + SemiFluidFuelHandler.generateFuels(); + GregtechMTE_ChemicalPlant.generateRecipes(); + + mInvalidCount[0] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT + ); + mInvalidCount[1] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT + ); + mInvalidCount[2] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( + GT_Recipe.GT_Recipe_Map.sVacuumRecipes, GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT + ); + mInvalidCount[3] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells( + GT_Recipe.GT_Recipe_Map.sMixerRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT + ); + /* + + //Large Centrifuge generation + mOriginalCount[0] = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size(); + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList) { + if (x != null) { + if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { + if (CORE.RA.addMultiblockCentrifugeRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { + mValidCount[0]++; + } + else { + mInvalidCount[0]++; + } + } + else { + Logger.INFO("[Recipe] Error generating Large Centrifuge recipe."); + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(x.mInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(x.mFluidInputs)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(x.mOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(x.mFluidOutputs)); + } + } + else { + mInvalidCount[0]++; + } + } + + if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.size() < 1) { + for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList) { + GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.add(a); + } + } + + //Large Electrolyzer generation + mOriginalCount[1] = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size(); + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList) { + if (x != null) { + if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { + if (CORE.RA.addMultiblockElectrolyzerRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { + mValidCount[1]++; + } + else { + mInvalidCount[1]++; + } + } + else { + Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe."); + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(x.mInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(x.mFluidInputs)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(x.mOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(x.mFluidOutputs)); + } + } + else { + mInvalidCount[1]++; + } + } + + if (GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList.size() < 1) { + for (GT_Recipe a : GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList) { + GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.add(a); + } + } + + //Advanced Vacuum Freezer generation + mOriginalCount[2] = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList.size(); + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList) { + if (x != null && RecipeUtils.doesGregtechRecipeHaveEqualCells(x)) { + if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { + if (CORE.RA.addAdvancedFreezerRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { + mValidCount[2]++; + } + } + else { + mInvalidCount[2]++; + } + } + else { + mInvalidCount[2]++; + } + } + + //Redo plasma recipes in Adv. Vac. + //Meta_GT_Proxy.generatePlasmaRecipesForAdvVacFreezer(); + + + String[] machineName = new String[] {"Centrifuge", "Electrolyzer", "Vacuum Freezer"}; + for (int i=0;i<3;i++) { + Logger.INFO("[Recipe] Generated "+mValidCount[i]+" recipes for the Industrial "+machineName[i]+". The original machine can process "+mOriginalCount[i]+" recipes, meaning "+mInvalidCount[i]+" are invalid for this Multiblock's processing in some way."); + }*/ + } + + protected void dumpGtRecipeMap(final GT_Recipe_Map r) { + final Collection x = r.mRecipeList; + Logger.INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug."); + for (final GT_Recipe newBo : x) { + Logger.INFO("========================"); + Logger.INFO( + "Dumping Input: " + + ItemUtils.getArrayStackNames(newBo.mInputs) + ); + Logger.INFO( + "Dumping Inputs " + ItemUtils.getFluidArrayStackNames( + newBo.mFluidInputs + ) + ); + Logger.INFO("Dumping Duration: " + newBo.mDuration); + Logger.INFO("Dumping EU/t: " + newBo.mEUt); + Logger.INFO( + "Dumping Output: " + + ItemUtils.getArrayStackNames(newBo.mOutputs) + ); + Logger.INFO( + "Dumping Output: " + ItemUtils.getFluidArrayStackNames( + newBo.mFluidOutputs + ) + ); + Logger.INFO("========================"); + } + } + + private static final boolean setupMaterialBlacklist() { + Material.invalidMaterials.put(Materials._NULL); + Material.invalidMaterials.put(Materials.Clay); + Material.invalidMaterials.put(Materials.Phosphorus); + Material.invalidMaterials.put(Materials.Steel); + Material.invalidMaterials.put(Materials.Bronze); + Material.invalidMaterials.put(Materials.Hydrogen); + // Infused TC stuff + Material.invalidMaterials.put(Materials.InfusedAir); + Material.invalidMaterials.put(Materials.InfusedEarth); + Material.invalidMaterials.put(Materials.InfusedFire); + Material.invalidMaterials.put(Materials.InfusedWater); + // EIO Materials + Material.invalidMaterials.put(Materials.SoulSand); + Material.invalidMaterials.put(Materials.EnderPearl); + Material.invalidMaterials.put(Materials.EnderEye); + Material.invalidMaterials.put(Materials.Redstone); + Material.invalidMaterials.put(Materials.Glowstone); + Material.invalidMaterials.put(Materials.Soularium); + Material.invalidMaterials.put(Materials.PhasedIron); + + if (Material.invalidMaterials.size() > 0) { + return true; + } + return false; + + } + + @SuppressWarnings("unused") + private void setupMaterialWhitelist() { + + mGregMatLoader = new GT_Material_Loader(); + + // Non GTNH Materials + if (!CORE.GTNH) { + // Mithril - Random Dungeon Loot + mGregMatLoader.enableMaterial(Materials.Mithril); + } + + // Force - Alloying + mGregMatLoader.enableMaterial(Materials.Force); + } + + private static final HashMap sMissingItemMappings = new HashMap(); + private static final HashMap sMissingBlockMappings = new HashMap(); + + private static void processMissingMappings() { + sMissingItemMappings.put("miscutils:Ammonium", GameRegistry.findItem(CORE.MODID, "itemCellAmmonium")); + sMissingItemMappings.put("miscutils:Hydroxide", GameRegistry.findItem(CORE.MODID, "itemCellHydroxide")); + sMissingItemMappings.put("miscutils:BerylliumHydroxide", GameRegistry.findItem(CORE.MODID, "itemCellmiscutils:BerylliumHydroxide")); + sMissingItemMappings.put("miscutils:Bromine", GameRegistry.findItem(CORE.MODID, "itemCellBromine")); + sMissingItemMappings.put("miscutils:Krypton", GameRegistry.findItem(CORE.MODID, "itemCellKrypton")); + sMissingItemMappings.put("miscutils:itemCellZirconiumTetrafluoride", GameRegistry.findItem(CORE.MODID, "ZirconiumTetrafluoride")); + sMissingItemMappings.put("miscutils:Li2BeF4", GameRegistry.findItem(CORE.MODID, "itemCellLithiumTetrafluoroberyllate")); + + // Cryolite + sMissingBlockMappings.put("miscutils:oreCryolite", GameRegistry.findBlock(CORE.MODID, "oreCryoliteF")); + sMissingItemMappings.put("miscutils:itemDustTinyCryolite", GameRegistry.findItem(CORE.MODID, "itemDustTinyCryoliteF")); + sMissingItemMappings.put("miscutils:itemDustSmallCryolite", GameRegistry.findItem(CORE.MODID, "itemDustSmallCryoliteF")); + sMissingItemMappings.put("miscutils:itemDustCryolite", GameRegistry.findItem(CORE.MODID, "itemDustCryoliteF")); + sMissingItemMappings.put("miscutils:dustPureCryolite", GameRegistry.findItem(CORE.MODID, "dustPureCryoliteF")); + sMissingItemMappings.put("miscutils:dustImpureCryolite", GameRegistry.findItem(CORE.MODID, "dustImpureCryoliteF")); + sMissingItemMappings.put("miscutils:crushedCryolite", GameRegistry.findItem(CORE.MODID, "crushedCryoliteF")); + sMissingItemMappings.put("miscutils:crushedPurifiedCryolite", GameRegistry.findItem(CORE.MODID, "crushedPurifiedCryoliteF")); + sMissingItemMappings.put("miscutils:crushedCentrifugedCryolite", GameRegistry.findItem(CORE.MODID, "crushedCentrifugedCryoliteF")); + sMissingItemMappings.put("miscutils:oreCryolite", GameRegistry.findItem(CORE.MODID, "oreCryoliteF")); + } + + @Mod.EventHandler + public void missingMapping(FMLMissingMappingsEvent event) { + processMissingMappings(); + for (FMLMissingMappingsEvent.MissingMapping mapping : event.get()) { + if (mapping.type == GameRegistry.Type.ITEM) { + Item aReplacement = sMissingItemMappings.get(mapping.name); + if (aReplacement != null) { + remap(aReplacement, mapping); + } + else { + //Logger.INFO("Unable to remap: "+mapping.name+", item has no replacement mapping."); + } + } + else if (mapping.type == GameRegistry.Type.BLOCK) { + Block aReplacement = sMissingBlockMappings.get(mapping.name); + if (aReplacement != null) { + remap(aReplacement, mapping); + } + else { + //Logger.INFO("Unable to remap: "+mapping.name+", block has no replacement mapping."); + } + } + } + } + + private static void remap(Item item, FMLMissingMappingsEvent.MissingMapping mapping) { + mapping.remap(item); + Logger.INFO("Remapping item " + mapping.name + " to " + CORE.MODID + ":" + item.getUnlocalizedName()); + } + + private static void remap(Block block, FMLMissingMappingsEvent.MissingMapping mapping) { + mapping.remap(block); + Logger.INFO("Remapping block " + mapping.name + " to " + CORE.MODID + ":" + block.getUnlocalizedName()); + } + +} diff --git a/src/main/java/gtPlusPlus/GenerateDictionaries.java b/src/main/java/gtPlusPlus/GenerateDictionaries.java new file mode 100644 index 0000000000..abdf4f4027 --- /dev/null +++ b/src/main/java/gtPlusPlus/GenerateDictionaries.java @@ -0,0 +1,176 @@ +package gtPlusPlus; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Random; + +import gtPlusPlus.api.objects.random.XSTR; + +public class GenerateDictionaries { + + public static void main(String[] args) { + + File aMainDictionary = new File("proguard/DictionaryMain.txt"); + File aMethodDict = new File("proguard/method-dict.txt"); + File aClassDict = new File("proguard/class-dict.txt"); + + if (Utils.doesFileExist(aMainDictionary)) { + Utils.log("Found Main Dictionary"); + List aLines = Utils.readLines(aMainDictionary); + + ArrayList aLinesToWriteMethods = new ArrayList(); + ArrayList aLinesToWriteClasses = new ArrayList(); + + if (aLines != null && aLines.size() > 0) { + Utils.log("Main Dictionary has > 0 keywords ("+aLines.size()+")"); + HashSet aUsedIndicies = new HashSet(); + int aCount = aLines.size() / 5; + + Utils.log("Mapping "+aCount+" to each dict."); + // Map New Method Names + for (int i=0;aLinesToWriteMethods.size() 0) { + aLinesToWriteMethods.add(aLineAtIndex); + aUsedIndicies.add(aIndex); + } + } + if (i >= aCount * 5) { + break; + } + } + + // Map New Class Names + for (int i=0;aLinesToWriteClasses.size() 0) { + aLinesToWriteClasses.add(aLineAtIndex); + aUsedIndicies.add(aIndex); + } + } + if (i >= aCount * 5) { + break; + } + } + } + + // Remove old generated Dicts + if (Utils.doesFileExist(aMethodDict)) { + aMethodDict.delete(); + Utils.log("Removed old Method-Dict"); + } + if (Utils.doesFileExist(aClassDict)) { + aClassDict.delete(); + Utils.log("Removed old Class-Dict"); + } + + // Create new empty dict files + if (!Utils.doesFileExist(aMethodDict)) { + Utils.createFile(aMethodDict); + } + if (!Utils.doesFileExist(aClassDict)) { + Utils.createFile(aClassDict); + } + + Utils.log("Writing new Dictionaries."); + // Write + Utils.appendListToFile(aMethodDict, aLinesToWriteMethods); + Utils.appendListToFile(aClassDict, aLinesToWriteClasses); + + Utils.log("Finished all generation of new Dictionaries."); + + } + + } + + + + private static final class Utils { + + private static final Charset utf8 = StandardCharsets.UTF_8; + private static final Random rand = new XSTR(); + + private static final void log(String s) { + System.out.println("[GTPP-Proguard] "+s); + } + + public static int randInt(final int min, final int max) { + return rand.nextInt((max - min) + 1) + min; + } + + public static boolean doesFileExist(File f) { + if (f != null && f.exists() && !f.isDirectory()) { + return true; + } + return false; + } + + public static File createFile(File aFile) { + boolean blnCreated = false; + log("Trying to use relative path "+aFile.getPath()); + try { + //log("Trying to use path "+aFile.getCanonicalPath()); + //log("Trying to use absolute path "+aFile.getAbsolutePath()); + blnCreated = aFile.createNewFile(); + } catch (IOException ioe) { + log("Error while creating a new empty file :" + ioe); + return null; + } + return blnCreated ? aFile : null; + } + + public static boolean appendListToFile(File file, List content) { + try { + long oldSize; + long newSize; + if (doesFileExist(file)) { + Path p = Paths.get(file.getPath()); + if (p != null && Files.isWritable(p)) { + oldSize = Files.size(p); + try { + Files.write(p, content, utf8, StandardOpenOption.APPEND); + } catch (IOException e) { + e.printStackTrace(); + } + newSize = Files.size(p); + return newSize > oldSize; + } + } + } catch (IOException e) { + } + return false; + } + + /** + * Reads the contents of a file line by line to a List of Strings using the default encoding for the VM. + * The file is always closed. + * + * @param file the file to read, must not be {@code null} + * @return the list of Strings representing each line in the file, never {@code null} + * @throws IOException in case of an I/O error + * @since 1.3 + */ + public static List readLines(File file) { + try { + return org.apache.commons.io.FileUtils.readLines(file, utf8); + } + catch (IOException e) { + return new ArrayList(); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/RoadMap.java b/src/main/java/gtPlusPlus/RoadMap.java new file mode 100644 index 0000000000..c7bb4d5a22 --- /dev/null +++ b/src/main/java/gtPlusPlus/RoadMap.java @@ -0,0 +1,80 @@ +package gtPlusPlus; + +import java.util.LinkedHashMap; + +import com.google.common.base.Objects; + +import gtPlusPlus.api.objects.data.ObjMap; +import net.minecraft.item.ItemStack; + +/** + * This Class purely exists to note down ideas and or plans to (re)implement things. + * + * @author Alkalus + * + */ +public class RoadMap { + + //Reorganization of Item, Block and Common Class loading. + /* + * So, due to the complex/silly way I've done things, I've ran into some circular loading problems around the mod. + * Issues occur where Classes like CI.java try access the GregtechItemList.java objects before they're actually set. + * A plan should be created to organize the best scheme to load things in the best order. + */ + + //Recreation of GUIs for all Multiblocks + /* + * Most Multi's use generic or straight out wrong GUI's on the controller. + * I'd like to go back and recreate all of these. + * + * Some could even benefit from a totally new type of UI (Instead of Text issues, just change a 2x2px area between red and green for status lights) + * These advanced GUIs are probably out of my capability, but if anyone thinks they're a good idea, I'll give them a go. + */ + + //Better Integration with GTNH + /* + * Refactor things to be more common, refactor things to automatically switch between GTNH and standard variants + * without having to over-abuse CORE.GTNH switches everywhere. + * Most of this can be done via expanding CI.java, so that we have automated handlers for everything + * (IE. getX(5) will get 5x of the correct version of X) + */ + + + /* + Thallium - Everglades only. (Mostly useless) + Technetium - Has some recipes but seem to be dead ends so unobtainable. + Polonium - Unobtainable. (Radioactive, Mostly Useless) + Francium - Unobtainable. (Radioactive, Mostly Useless) + Promethium - Unobtainable. + Radium - Everglades only. (Do use, Moderately Rare) + Actinium - Unobtainable. (Radioactive, Do use) + Proactinium - Unobtainable. (Do use) + Neptunium - Has some recipes but seem to be dead ends so unobtainable. + Curium - Fusion only. + Berkelium - Unobtainable. + Californium - Fusion only. + Einsteinium - Unobtainable. + Fermium - Unobtainable. + Strontium - Everglades only. (Do use 1) + Iodine - Everglades only. + Dysprosium - Everglades only. (Do use 1) + Rhenium - Weird ABS recipe only. + Flerovium - Unobtainable. + Dubnium - Unobtainable. + Seaborgium - Unobtainable. + Bohrium - Unobtainable. + Hassium - Unobtainable. + Meitnerium - Unobtainable. + Darmstadtium - Unobtainable. + Roentgenium - Unobtainable. + Copernicium - Unobtainable. + Nihonium - Unobtainable. + Moscovium - Unobtainable. + Livermorium - Unobtainable. + Tennessine - Unobtainable. + Nobelium - Unobtainable. + Lawrencium - Unobtainable. + Astatine - Unobtainable. (Radioactive, Mostly Useless) + */ + +} diff --git a/src/main/java/gtPlusPlus/api/damage/DamageTeslaTower.java b/src/main/java/gtPlusPlus/api/damage/DamageTeslaTower.java new file mode 100644 index 0000000000..f35c9cbc6b --- /dev/null +++ b/src/main/java/gtPlusPlus/api/damage/DamageTeslaTower.java @@ -0,0 +1,24 @@ +package gtPlusPlus.api.damage; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.IChatComponent; + +import gtPlusPlus.core.world.damage.BaseCustomDamageSource; + +public class DamageTeslaTower extends BaseCustomDamageSource{ + + public DamageTeslaTower(Entity transmitter) { + super("plasmabolt", transmitter, null); + this.setDamageBypassesArmor(); + this.setDamageIsAbsolute(); + } + + @Override + public IChatComponent func_151519_b(EntityLivingBase target) { + String s = "death.attack." + this.damageType; + return new ChatComponentTranslation(s, target.getCommandSenderName(), "Plasma"); + } + +} diff --git a/src/main/java/gtPlusPlus/api/enums/ParticleNames.java b/src/main/java/gtPlusPlus/api/enums/ParticleNames.java new file mode 100644 index 0000000000..d082cd6779 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/enums/ParticleNames.java @@ -0,0 +1,37 @@ +package gtPlusPlus.api.enums; + +public enum ParticleNames { + + explode, + largeexplode, + hugeexplosion, + bubble, + splash, + suspended, + depthsuspend, + crit, + magicCrit, + smoke, + largesmoke, + spell, + instantSpell, + mobSpell, + dripWater, + dripLava, + townaura, + note, + portal, + enchantmenttable, + flame, + lava, + footstep, + cloud, + reddust, + snowballpoof, + snowshovel, + slime, + heart, + iconcrack_, + tilecrack_; + +} diff --git a/src/main/java/gtPlusPlus/api/enums/Quality.java b/src/main/java/gtPlusPlus/api/enums/Quality.java new file mode 100644 index 0000000000..050f335b5e --- /dev/null +++ b/src/main/java/gtPlusPlus/api/enums/Quality.java @@ -0,0 +1,62 @@ +package gtPlusPlus.api.enums; + +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.util.math.MathUtils; + +public enum Quality { + + // Magic Blue + // Rare Yellow + // Set Green + // Unique Gold/Purple + // Trade-off Brown + + POOR("Poor", EnumChatFormatting.GRAY), COMMON("Common", EnumChatFormatting.WHITE), UNCOMMON("Uncommon", + EnumChatFormatting.DARK_GREEN), MAGIC("Magic", EnumChatFormatting.BLUE), RARE("Rare", + EnumChatFormatting.YELLOW), UNIQUE("Unique", EnumChatFormatting.GOLD), ARTIFACT("Artifact", + EnumChatFormatting.AQUA), SET("Set Piece", EnumChatFormatting.GREEN), TRADEOFF("Trade-off", + EnumChatFormatting.DARK_RED), EPIC("Epic", EnumChatFormatting.LIGHT_PURPLE); + + private String LOOT; + private EnumChatFormatting COLOUR; + + private Quality(final String lootTier, final EnumChatFormatting tooltipColour) { + this.LOOT = lootTier; + this.COLOUR = tooltipColour; + } + + public String getQuality() { + return this.LOOT; + } + + protected EnumChatFormatting getColour() { + return this.COLOUR; + } + + public String formatted() { + return this.COLOUR + this.LOOT; + } + + public static Quality getRandomQuality() { + final int lootChance = MathUtils.randInt(0, 100); + if (lootChance <= 10) { + return Quality.POOR; + } else if (lootChance <= 45) { + return Quality.COMMON; + } else if (lootChance <= 65) { + return Quality.UNCOMMON; + } else if (lootChance <= 82) { + return Quality.MAGIC; + } else if (lootChance <= 92) { + return Quality.EPIC; + } else if (lootChance <= 97) { + return Quality.RARE; + } else if (lootChance <= 99) { + return Quality.ARTIFACT; + } else { + return null; + } + } + +} diff --git a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java new file mode 100644 index 0000000000..6fe4209efe --- /dev/null +++ b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java @@ -0,0 +1,203 @@ +package gtPlusPlus.api.helpers; + +import java.util.HashMap; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.WeightedCollection; +import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; +import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +public class GregtechPlusPlus_API { + + public static class Multiblock_API { + + private static final HashMap mSpecialBehaviourItemMap = new HashMap(); + + /** + * Register a special behaviour for GT++ Multis to listen use. + * @param aBehaviour - An Object which has extended {@link SpecialMultiBehaviour}'s base implementation. + * @return - Did this behaviour register properly? + */ + public static boolean registerSpecialMultiBehaviour(SpecialMultiBehaviour aBehaviour) { + if (aBehaviour.getTriggerItem() == null || aBehaviour.getTriggerItemTooltip() == null || aBehaviour.getTriggerItemTooltip().length() <= 0) { + Logger.INFO("Failed to attach custom multiblock logic to "+ItemUtils.getItemName(aBehaviour.getTriggerItem())); + return false; + } + mSpecialBehaviourItemMap.put("UniqueKey_"+aBehaviour.hashCode(), aBehaviour); + SpecialBehaviourTooltipHandler.addTooltipForItem(aBehaviour.getTriggerItem(), aBehaviour.getTriggerItemTooltip()); + Logger.INFO("Attached custom multiblock logic to "+ItemUtils.getItemName(aBehaviour.getTriggerItem())); + return true; + } + + public static final HashMap getSpecialBehaviourItemMap() { + return mSpecialBehaviourItemMap; + } + + /** + * Allows RTG Fuel pellets from other mods to be used in the RTG hatch. + * @param aStack - The Pellet Stack, sanitsed after passing through. + * @param aFuelValue - The Fuel Value of the Pellet to be added to the energy storage. + * @return - Did register? + */ + public static boolean registerPelletForRtgHatch(ItemStack aStack, long aFuelValue) { + return GT_MetaTileEntity_Hatch_Energy_RTG.registerPelletForHatch(aStack, aFuelValue); + } + + } + + public static class VoidMiner_API { + + private static final HashMap>> mMinerLootCache; + + static { + mMinerLootCache = new HashMap>>(); + } + + + /** + * + * Registers an ore block for a dimension. Uses a default weight of 100. + * @param aDim - The Dimension ID + * @param aOredictName - The OreDict name of the Ore to be mined. + * @return - If there was a valid Block found in the OreDict for the provided name. + */ + public static boolean registerOreForVoidMiner(int aDim, String aOredictName) { + return registerOreForVoidMiner(aDim, aOredictName, 100); + } + + /** + * + * Registers an ore block for a dimension. Uses a default weight of 100. + * @param aDim - The Dimension ID + * @param aOredictName - The OreDict name of the Ore to be mined. + * @param aWeight - The weight of this ore Block. + * @return - If there was a valid Block found in the OreDict for the provided name. + */ + public static boolean registerOreForVoidMiner(int aDim, String aOredictName, int aWeight) { + Block b = null; + ItemStack[] aValidItems = ItemUtils.validItemsForOreDict(aOredictName); + for (ItemStack g : aValidItems) { + if (g != null) { + b = Block.getBlockFromItem(g.getItem()); + if (b != null) { + break; + } + } + } + if (b != null) { + registerOreForVoidMiner(aDim, b, aWeight); + return true; + } + return false; + } + + + /** + * Registers an ore block for a dimension. Uses a default weight of 100. + * @param aDim - The Dimension ID + * @param aOreBlock - The Ore Block to be mined. + */ + public static void registerOreForVoidMiner(int aDim, Block aOreBlock) { + registerOreForVoidMiner(aDim, aOreBlock, 100); + } + + /** + * Registers an ore block for a dimension. + * @param aDim - The Dimension ID + * @param aOreBlock - The Ore Block to be mined. + * @param aWeight - The weight of this ore Block. + */ + public static void registerOreForVoidMiner(int aDim, Block aOreBlock, int aWeight) { + GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aOreBlock, aWeight); + } + + /** + * Registers a surface block for a dimension. Uses a default weight of 100. + * @param aDim - The Dimension ID + * @param aDirtBlock - The Dirt/Grass Block to be mined. + */ + public static void registerEarthSurfaceForVoidMiner(int aDim, Block aDirtBlock) { + registerEarthSurfaceForVoidMiner(aDim, aDirtBlock, 100); + } + + /** + * Registers a surface block for a dimension. + * @param aDim - The Dimension ID + * @param aDirtBlock - The Dirt/Grass Block to be mined. + * @param aWeight - The weight of this Dirt/Grass Block. + */ + public static void registerEarthSurfaceForVoidMiner(int aDim, Block aDirtBlock, int aWeight) { + GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aDirtBlock, aWeight); + } + + /** + * Registers a stone block for a dimension. Uses a default weight of 100. + * @param aDim - The Dimension ID + * @param aStoneBlock - The Stone Block to be mined. + */ + public static void registerEarthStoneForVoidMiner(int aDim, Block aStoneBlock) { + registerEarthStoneForVoidMiner(aDim, aStoneBlock, 100); + } + + /** + * Registers a stone block for a dimension. + * @param aDim - The Dimension ID + * @param aStoneBlock - The Stone Block to be mined. + * @param aWeight - The weight of this Stone Block. + */ + public static void registerEarthStoneForVoidMiner(int aDim, Block aStoneBlock, int aWeight) { + GregtechPlusPlus_API_Internal.writeBlockToDimensionInCache(aDim, 0, aStoneBlock, aWeight); + } + + + + + public static WeightedCollection getAllRegisteredOresForDimension(int aDim) { + return mMinerLootCache.get(aDim).get("ore"); + } + + public static WeightedCollection getAllRegisteredDirtTypesForDimension(int aDim) { + return mMinerLootCache.get(aDim).get("dirt"); + } + + public static WeightedCollection getAllRegisteredStoneTypesForDimension(int aDim) { + return mMinerLootCache.get(aDim).get("stone"); + } + + public static final HashMap>> getVoidMinerLootCache() { + return mMinerLootCache; + } + + } + + + private static class GregtechPlusPlus_API_Internal { + + private static void writeBlockToDimensionInCache(int aDim, int aType, Block aBlock, int aWeight) { + HashMap> aDimMap = VoidMiner_API.mMinerLootCache.get(aDim); + if (aDimMap == null) { + aDimMap = new HashMap>(); + } + WeightedCollection aMappedBlocks = getBlockMap(aType, aDimMap); + aMappedBlocks.put(aWeight, aBlock); + + } + + private static WeightedCollection getBlockMap(int aType, HashMap> aDimMap){ + WeightedCollection aMappedBlocks; + String aTypeName = ((aType == 0) ? "ore" : (aType == 1) ? "dirt" : (aType == 2) ? "stone" : "error"); + aMappedBlocks = aDimMap.get(aTypeName); + if (aMappedBlocks == null) { + aMappedBlocks = new WeightedCollection(); + } + return aMappedBlocks; + } + + } + + +} diff --git a/src/main/java/gtPlusPlus/api/helpers/MaterialHelper.java b/src/main/java/gtPlusPlus/api/helpers/MaterialHelper.java new file mode 100644 index 0000000000..9d2e894d99 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/helpers/MaterialHelper.java @@ -0,0 +1,76 @@ +package gtPlusPlus.api.helpers; + +import net.minecraft.item.ItemStack; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class MaterialHelper { + + public static ItemStack getComponentFromMaterial(OrePrefixes oreprefix, Material material, int amount){ + return ItemUtils.getOrePrefixStack(oreprefix, material, amount); + } + public static ItemStack getComponentFromGtMaterial(OrePrefixes oreprefix, Materials material, int amount){ + return ItemUtils.getGregtechOreStack(oreprefix, material, amount); + } + + /** + * Generates a 16 Fluid Pipe + * @see {@code Example: Copper 16x Pipe (Materials.Copper, Materials.Copper.mName, "Copper", ID, 60, 1000, true)} + * @param aMaterial - Pipe Material + * @param name - Pipe Internal name + * @param displayName - Pipe Display Name + * @param aID - Pipe's Meta ID + * @param baseCapacity - Pipes Base Capacity + * @param heatCapacity - Pipe Max Temp + * @param gasProof - Is Gas Proof? + * @return A boolean which corresponds to whether or not the Pipe was registered to the Ore Dictionary. + */ + public static boolean generateHexadecuplePipe(Materials aMaterial, String name, String displayName, int aID, + int baseCapacity, int heatCapacity, boolean gasProof) { + if (Utils.getGregtechVersionAsInt() >= 50930) { + try { + Class aPipeEntity = GT_MetaPipeEntity_Fluid.class; + Constructor constructor = aPipeEntity + .getConstructor(new Class[] { int.class, String.class, String.class, float.class, + Materials.class, int.class, int.class, boolean.class, int.class }); + if (constructor != null) { + GT_MetaPipeEntity_Fluid aPipe; + aPipe = constructor.newInstance(aID, "GT_Pipe_" + name + "_Hexadecuple", + "Hexadecuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, + gasProof, 16); + return GT_OreDictUnificator.registerOre("pipeHexadecuple" + aMaterial, aPipe.getStackForm(1L)); + } + + } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + } + return false; + } + + public static ItemStack getCells(Materials aMaterial, int i) { + return ItemUtils.getOrePrefixStack(OrePrefixes.cell, aMaterial, i); + } + public static ItemStack getDust(Materials aMaterial, int i) { + return ItemUtils.getOrePrefixStack(OrePrefixes.dust, aMaterial, i); + } + public static ItemStack getDustSmall(Materials aMaterial, int i) { + return ItemUtils.getOrePrefixStack(OrePrefixes.dustSmall, aMaterial, i); + } + public static ItemStack getDustTiny(Materials aMaterial, int i) { + return ItemUtils.getOrePrefixStack(OrePrefixes.dustTiny, aMaterial, i); + } + public static ItemStack getGems(Materials aMaterial, int i) { + return ItemUtils.getOrePrefixStack(OrePrefixes.gem, aMaterial, i); + } +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IChunkLoader.java b/src/main/java/gtPlusPlus/api/interfaces/IChunkLoader.java new file mode 100644 index 0000000000..c04e25f570 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IChunkLoader.java @@ -0,0 +1,33 @@ +package gtPlusPlus.api.interfaces; + +import java.util.Set; + +import net.minecraft.world.ChunkCoordIntPair; + +public interface IChunkLoader { + + public long getTicksRemaining(); + + public void setTicksRemaining(long aTicks); + + public ChunkCoordIntPair getResidingChunk(); + + public void setResidingChunk(ChunkCoordIntPair aCurrentChunk); + + public boolean getChunkLoadingActive(); + + public void setChunkLoadingActive(boolean aActive); + + public boolean getDoesWorkChunkNeedReload(); + + public void setDoesWorkChunkNeedReload(boolean aActive); + + public boolean addChunkToLoadedList(ChunkCoordIntPair aActiveChunk); + + public boolean removeChunkFromLoadedList(ChunkCoordIntPair aActiveChunk); + + public Set getManagedChunks(); + + public int getChunkloaderTier(); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IComparableRecipe.java b/src/main/java/gtPlusPlus/api/interfaces/IComparableRecipe.java new file mode 100644 index 0000000000..ddbf9f38bb --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IComparableRecipe.java @@ -0,0 +1,8 @@ +package gtPlusPlus.api.interfaces; + +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; + +public interface IComparableRecipe extends Comparable{ + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IEntityCatcher.java b/src/main/java/gtPlusPlus/api/interfaces/IEntityCatcher.java new file mode 100644 index 0000000000..5ab90d47ce --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IEntityCatcher.java @@ -0,0 +1,21 @@ +package gtPlusPlus.api.interfaces; + +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.minecraft.BlockPos; + +public interface IEntityCatcher { + + public boolean hasEntity(ItemStack aStack); + + public Entity getStoredEntity(World aWorld, ItemStack aStack); + + public boolean setStoredEntity(World aWorld, ItemStack aStack, Entity aEntity); + + public Class getStoredEntityClass(ItemStack aStack); + + public boolean spawnStoredEntity(World aWorld, ItemStack aStack, BlockPos aPos); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IGeneratorWorld.java b/src/main/java/gtPlusPlus/api/interfaces/IGeneratorWorld.java new file mode 100644 index 0000000000..63f2adbba7 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IGeneratorWorld.java @@ -0,0 +1,17 @@ +package gtPlusPlus.api.interfaces; + +import java.util.Random; +import net.minecraft.world.World; + +public abstract interface IGeneratorWorld +{ + public abstract boolean generate(World paramWorld, Random paramRandom, int paramInt1, int paramInt2); + + public abstract void initiate(); + + public abstract int getExtentX(); + + public abstract int getExtentZ(); + + public abstract int getRange(); +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java b/src/main/java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java new file mode 100644 index 0000000000..fa59c58d9f --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IGregtechPacketEntity.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.interfaces; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +public interface IGregtechPacketEntity { + + public void writePacketData(DataOutputStream data) throws IOException; + + public void readPacketData(DataInputStream data) throws IOException; + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IGregtechPower.java b/src/main/java/gtPlusPlus/api/interfaces/IGregtechPower.java new file mode 100644 index 0000000000..4bb29b3354 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IGregtechPower.java @@ -0,0 +1,145 @@ +package gtPlusPlus.api.interfaces; + +import net.minecraft.block.Block; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.interfaces.IDescribable; +import gregtech.api.interfaces.tileentity.*; + +public abstract interface IGregtechPower extends IGearEnergyTileEntity, ITurnable, IGregTechDeviceInformation, IDescribable, IBasicEnergyContainer { + + @Override + public String[] getDescription(); + + @Override + default boolean isUniversalEnergyStored(long p0) { + return false; + } + + @Override + public long getOutputAmperage(); + + @Override + public long getOutputVoltage(); + + @Override + public long getInputAmperage(); + + @Override + public long getInputVoltage(); + + @Override + public boolean decreaseStoredEnergyUnits(long p0, boolean p1); + + @Override + public boolean increaseStoredEnergyUnits(long p0, boolean p1); + + @Override + public boolean drainEnergyUnits(byte p0, long p1, long p2); + + @Override + public long getAverageElectricInput(); + + @Override + public long getAverageElectricOutput(); + + @Override + public long getStoredEU(); + + @Override + public long getEUCapacity(); + + @Override + public long getStoredSteam(); + + @Override + public long getSteamCapacity(); + + @Override + public boolean increaseStoredSteam(long p0, boolean p1); + + @Override + public Block getBlockAtSide(byte p0); + + @Override + public Block getBlockAtSideAndDistance(byte p0, int p1); + + @Override + public Block getBlockOffset(int p0, int p1, int p2); + + + @Override + public TileEntity getTileEntity(int p0, int p1, int p2); + + @Override + public TileEntity getTileEntityAtSide(byte p0); + + @Override + public TileEntity getTileEntityAtSideAndDistance(byte p0, int p1); + + @Override + public TileEntity getTileEntityOffset(int p0, int p1, int p2); + + @Override + public World getWorld(); + + @Override + public int getXCoord(); + + @Override + public short getYCoord(); + + @Override + public int getZCoord(); + + @Override + public boolean isClientSide(); + + @Override + public boolean isDead(); + + @Override + public boolean isInvalidTileEntity(); + + @Override + public boolean isServerSide(); + + @Override + public void readFromNBT(NBTTagCompound p0); + + @Override + public void writeToNBT(NBTTagCompound p0); + + @Override + public boolean acceptsRotationalEnergy(byte p0); + + @Override + public boolean injectRotationalEnergy(byte p0, long p1, long p2); + + @Override + public long injectEnergyUnits(byte p0, long p1, long p2); + + @Override + public boolean inputEnergyFrom(byte p0); + + @Override + public boolean outputsEnergyTo(byte p0); + + @Override + public String[] getInfoData(); + + @Override + default public boolean isGivingInformation() { + return true; + } + +/* boolean onPreTick(TilePoweredGT tilePoweredGT, long mTickTimer2); + + boolean onTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2); + + boolean onPostTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2);*/ + + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java b/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java new file mode 100644 index 0000000000..9e1a7431db --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java @@ -0,0 +1,144 @@ +package gtPlusPlus.api.interfaces; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public interface ILazyCoverable extends ICoverable { + + @Override + default byte getColorization() { + return 0; + } + + @Override + default byte setColorization(byte arg0) { + return 0; + } + + @Override + default byte getInputRedstoneSignal(byte arg0) { + return 0; + } + + @Override + default byte getStrongestRedstone() { + return 0; + } + + @Override + default boolean getRedstone() { + // TODO Auto-generated method stub + return false; + } + + @Override + default boolean getRedstone(byte arg0) { + return false; + } + + @Override + default boolean isUniversalEnergyStored(long arg0) { + return false; + } + + @Override + default long getUniversalEnergyStored() { + return 0; + } + + @Override + default long getUniversalEnergyCapacity() { + return 0; + } + + @Override + default long getStoredSteam() { + return 0; + } + + @Override + default long getSteamCapacity() { + return 0; + } + + @Override + default boolean increaseStoredSteam(long arg0, boolean arg2) { + return false; + } + + @Override + default byte getOutputRedstoneSignal(byte arg0) { + return 0; + } + + @Override + default void setOutputRedstoneSignal(byte arg0, byte arg1) { + + } + + @Override + default byte getStrongOutputRedstoneSignal(byte arg0) { + return 0; + } + + @Override + default void setStrongOutputRedstoneSignal(byte arg0, byte arg1) { + + } + + @Override + default byte getComparatorValue(byte arg0) { + return 0; + } + + @Override + default IGregTechTileEntity getIGregTechTileEntity(int arg0, int arg1, int arg2) { + return null; + } + + @Override + default IGregTechTileEntity getIGregTechTileEntityOffset(int arg0, int arg1, int arg2) { + return null; + } + + @Override + default IGregTechTileEntity getIGregTechTileEntityAtSide(byte arg0) { + return null; + } + + @Override + default IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte arg0, int arg1) { + return null; + } + + @Override + default byte getMetaID(int arg0, int arg1, int arg2) { + return 0; + } + + @Override + default byte getMetaIDOffset(int arg0, int arg1, int arg2) { + return 0; + } + + @Override + default byte getMetaIDAtSide(byte arg0) { + return 0; + } + + @Override + default byte getMetaIDAtSideAndDistance(byte arg0, int arg1) { + return 0; + } + + @Override + default boolean isDead() { + return false; + } + + @Override + default void setLightValue(byte arg0) { + + } + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IPlugin.java b/src/main/java/gtPlusPlus/api/interfaces/IPlugin.java new file mode 100644 index 0000000000..67be182402 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IPlugin.java @@ -0,0 +1,40 @@ +package gtPlusPlus.api.interfaces; + +import gtPlusPlus.api.objects.Logger; + +public interface IPlugin { + + /** + * @return A {@link String} object which returns the {@link IPlugin}'s name. + */ + public String getPluginName(); + + /** + * @return + * A {@link String} object which returns the {@link IPlugin}'s short name. + * This String should only contain 4 Characters. + */ + public String getPluginAbbreviation(); + + /** + * @param message - A {@link String} object which holds a message to be logged to console. + */ + default void log(String message) { + Logger.INFO("["+getPluginAbbreviation()+"] "+message); + } + + /** + * @param message - A {@link String} object which holds a warning/error message to be logged to console. + */ + default void logDebug(String message) { + Logger.WARNING("["+getPluginAbbreviation()+"] "+message); + } + + public boolean preInit(); + public boolean init(); + public boolean postInit(); + + public boolean serverStart(); + public boolean serverStop(); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IRandomGenerator.java b/src/main/java/gtPlusPlus/api/interfaces/IRandomGenerator.java new file mode 100644 index 0000000000..233fb93d4d --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IRandomGenerator.java @@ -0,0 +1,55 @@ +/* + * Copyright 2005, Nick Galbreath -- nickg [at] modp [dot] com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the modp.com nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This is the standard "new" BSD license: + * http://www.opensource.org/licenses/bsd-license.php + */ + +package gtPlusPlus.api.interfaces; + +/** + * Simplified interface for random number generation + * + * @author Nick Galbreath -- nickg [at] modp [dot] com + * @version 1 -- 06-Jul-2005 + */ +public interface IRandomGenerator { + + /** + * Returns N random bits + * + * See also java.util.Random#next + * @param numBits + * @return and int with the LSB being random + */ + public int next(int numBits); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/ITexturedBlock.java b/src/main/java/gtPlusPlus/api/interfaces/ITexturedBlock.java new file mode 100644 index 0000000000..47e692bffb --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/ITexturedBlock.java @@ -0,0 +1,14 @@ +package gtPlusPlus.api.interfaces; + +import net.minecraft.block.Block; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ITexturedTileEntity; + +public interface ITexturedBlock extends ITexturedTileEntity{ + + ITexture[] getTexture(byte side); + + ITexture[] getTexture(Block block, byte side); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/ITileTooltip.java b/src/main/java/gtPlusPlus/api/interfaces/ITileTooltip.java new file mode 100644 index 0000000000..08866c2712 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/ITileTooltip.java @@ -0,0 +1,7 @@ +package gtPlusPlus.api.interfaces; + +public interface ITileTooltip { + + public abstract int getTooltipID(); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/IToolable.java b/src/main/java/gtPlusPlus/api/interfaces/IToolable.java new file mode 100644 index 0000000000..24797825a9 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/IToolable.java @@ -0,0 +1,17 @@ +package gtPlusPlus.api.interfaces; + +public interface IToolable { + + public boolean isScrewdriverable(); + public boolean onScrewdriverLMB(); + public boolean onScrewdriverRMB(); + + public boolean isWrenchable(); + public boolean onWrenchLMB(); + public boolean onWrenchRMB(); + + public boolean isMalletable(); + public boolean onMalletLMB(); + public boolean onMalletRMB(); + +} diff --git a/src/main/java/gtPlusPlus/api/interfaces/RunnableWithInfo.java b/src/main/java/gtPlusPlus/api/interfaces/RunnableWithInfo.java new file mode 100644 index 0000000000..4f4b9d7acd --- /dev/null +++ b/src/main/java/gtPlusPlus/api/interfaces/RunnableWithInfo.java @@ -0,0 +1,12 @@ +package gtPlusPlus.api.interfaces; + +public interface RunnableWithInfo extends Runnable { + + public V getInfoData(); + + default public Class getInfoDataType() { + return getInfoData().getClass(); + } + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/GregtechException.java b/src/main/java/gtPlusPlus/api/objects/GregtechException.java new file mode 100644 index 0000000000..916dbc4aaf --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/GregtechException.java @@ -0,0 +1,28 @@ +package gtPlusPlus.api.objects; + +public class GregtechException extends Throwable { + + private static final long serialVersionUID = 3601884582161841486L; + + public GregtechException(String aError) { + this(aError, true); + } + + public GregtechException(String aError, boolean aIsVerbose) { + Logger.ERROR("Throwing GT++ Exception!"); + Logger.ERROR("[EXCEPTION] "+aError); + if (aIsVerbose) { + Logger.INFO("Throwing GT++ Exception!"); + Logger.INFO("[EXCEPTION] "+aError); + printStackTrace(); + } + } + + @Override + public void printStackTrace() { + super.printStackTrace(); + } + + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/Logger.java b/src/main/java/gtPlusPlus/api/objects/Logger.java new file mode 100644 index 0000000000..1a1da6868b --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/Logger.java @@ -0,0 +1,179 @@ +package gtPlusPlus.api.objects; + +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.preloader.asm.AsmConfig; +import org.apache.logging.log4j.LogManager; + +public class Logger { + + public Logger(String string) { + + } + + // Logging Functions + public static final org.apache.logging.log4j.Logger modLogger = Logger.makeLogger(); + + // Generate GT++ Logger + public static org.apache.logging.log4j.Logger makeLogger() { + final org.apache.logging.log4j.Logger gtPlusPlusLogger = LogManager.getLogger("GT++"); + return gtPlusPlusLogger; + } + + private static final boolean enabled = !AsmConfig.disableAllLogging; + + public static final org.apache.logging.log4j.Logger getLogger() { + return modLogger; + } + + // Non-Dev Comments + public static void INFO(final String s) { + if (enabled) { + modLogger.info(s); + } + } + + // Non-Dev Comments + public static void MACHINE_INFO(String s, Object... args) { + if (enabled) { + boolean localPlayer = CORE_Preloader.DEV_ENVIRONMENT; + if (CORE.ConfigSwitches.MACHINE_INFO || localPlayer) { + final String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2); + modLogger.info("Machine Info: " + s + " | " + name1, args); + } + } + } + + // Developer Comments + public static void WARNING(final String s) { + if (enabled) { + if (CORE_Preloader.DEBUG_MODE) { + modLogger.warn(s); + } + } + } + + // Errors + public static void ERROR(final String s) { + if (enabled) { + if (CORE_Preloader.DEBUG_MODE) { + modLogger.fatal(s); + } + } + } + + // Developer Logger + public static void SPECIFIC_WARNING(final String whatToLog, final String msg, final int line) { + if (enabled) { + // if (!CORE_Preloader.DEBUG_MODE){ + FMLLog.warning("GT++ |" + line + "| " + whatToLog + " | " + msg); + // } + } + } + + // ASM Comments + public static void LOG_ASM(final String s) { + if (enabled) { + FMLRelaunchLog.info("[Special ASM Logging] ", s); + } + } + + + + + + + + + + + /** + * Special Loggers + */ + + /** + * Special Logger for Bee related content + */ + public static void BEES(final String s) { + if (enabled) { + if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { + modLogger.info("[Bees] "+s); + } + } + } + /** + * Special Logger for Debugging Bee related content + */ + public static void DEBUG_BEES(final String s) { + if (enabled) { + if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { + modLogger.info("[Debug][Bees] "+s); + } + } + } + + + + /** + * Special Logger for Materials related content + */ + public static void MATERIALS(final String s) { + if (enabled) { + if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { + modLogger.info("[Materials] "+s); + } + } + } + /** + * Special Logger for Debugging Materials related content + */ + public static void DEBUG_MATERIALS(final String s) { + if (enabled) { + if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { + modLogger.info("[Debug][Materials] "+s); + } + } + } + + /** + * Special Logger for Reflection related content + */ + public static void REFLECTION(final String s) { + if (enabled) { + if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { + modLogger.info("[Reflection] "+s); + } + } + } + + + /** + * Special Logger for Darkworld related content + */ + public static void WORLD(final String s) { + if (enabled) { + if (CORE_Preloader.DEV_ENVIRONMENT || CORE_Preloader.DEBUG_MODE) { + modLogger.info("[WorldGen] "+s); + } + } + } + + public static void RECIPE(String string) { + if (enabled) { + if (/*CORE_Preloader.DEV_ENVIRONMENT || */CORE_Preloader.DEBUG_MODE) { + modLogger.info("[Recipe] "+string); + } + } + } + + public static void SPACE(final String s) { + if (enabled) { + modLogger.info("[Space] "+s); + } + } + + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java b/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java new file mode 100644 index 0000000000..e04f1af03a --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/AutoMap.java @@ -0,0 +1,345 @@ +package gtPlusPlus.api.objects.data; + +import java.io.Serializable; +import java.util.*; + +public class AutoMap implements Iterable, Cloneable, Serializable, Collection, Queue, List { + + /** + * The Internal Map + */ + protected final Map mInternalMap; + protected final Map mInternalNameMap; + + /** + * The Internal ID + */ + private int mInternalID = 0; + private static final long serialVersionUID = 3771412318075131790L; + + + public AutoMap() { + this(new LinkedHashMap()); + } + + public Map getMap(){ + return mInternalMap; + } + + public AutoMap(Map defaultMapType) { + mInternalMap = defaultMapType; + mInternalNameMap = new LinkedHashMap(); + } + + /** + * Generates an AutoMap from the List. + * @param aList - Data to be inserted into the AutoMap. + */ + public AutoMap(List aList) { + mInternalMap = new LinkedHashMap(); + mInternalNameMap = new LinkedHashMap(); + if (aList != null && aList.size() > 0) { + for (V obj : aList) { + add(obj); + } + } + } + /** + * Generates an AutoMap from a Set. + * @param aList - Data to be inserted into the AutoMap. + */ + public AutoMap(Set aList) { + mInternalMap = new LinkedHashMap(); + mInternalNameMap = new LinkedHashMap(); + if (aList != null && aList.size() > 0) { + for (V obj : aList) { + add(obj); + } + } + } + /** + * Generates an AutoMap from a Collection. + * @param aList - Data to be inserted into the AutoMap. + */ + public AutoMap(Collection aList) { + mInternalMap = new LinkedHashMap(); + mInternalNameMap = new LinkedHashMap(); + if (aList != null && aList.size() > 0) { + for (V obj : aList) { + add(obj); + } + } + } + + /** + * Generates an AutoMap from a Array. + * @param aArray - Data to be inserted into the AutoMap. + */ + public AutoMap(V[] aArray) { + mInternalMap = new LinkedHashMap(); + mInternalNameMap = new LinkedHashMap(); + if (aArray != null && aArray.length > 0) { + for (V obj : aArray) { + add(obj); + } + } + } + + @Override + public Iterator iterator() { + return values().iterator(); + } + + public synchronized boolean setValue(V object){ + int mOriginalID = this.mInternalID; + put(object); + if (this.mInternalMap.get(mOriginalID).equals(object) || mOriginalID > this.mInternalID){ + return true; + } + else { + return false; + } + } + + public synchronized V put(V object){ + return set(object); + } + + public synchronized boolean add(V object){ + return set(object) != null; + } + + public synchronized V set(V object){ + if (object == null) { + return null; + } + mInternalNameMap.put(""+object.hashCode(), (mInternalID+1)); + return mInternalMap.put(mInternalID++, object); + } + + public synchronized V get(int id){ + return mInternalMap.get(id); + } + + public synchronized Collection values(){ + return mInternalMap.values(); + } + + public synchronized int size(){ + return mInternalMap.size(); + } + + public synchronized int hashCode(){ + return mInternalMap.hashCode(); + } + + public synchronized boolean containsKey(int key){ + return mInternalMap.containsKey(key); + } + + public synchronized boolean containsValue(V value){ + return mInternalMap.containsValue(value); + } + + public synchronized boolean isEmpty(){ + return mInternalMap.isEmpty(); + } + + public synchronized void clear(){ + this.mInternalID = 0; + this.mInternalMap.clear(); + this.mInternalNameMap.clear(); + return; + } + + @SuppressWarnings("unchecked") + public V[] toArray() { + V[] toR = (V[]) java.lang.reflect.Array.newInstance(mInternalMap.get(0).getClass(), mInternalMap.size()); + for (int i = 0; i < mInternalMap.size(); i++) { + toR[i] = mInternalMap.get(i); + } + return toR; + } + + public synchronized final int getInternalID() { + return mInternalID; + } + + public synchronized final boolean remove(Object value) { + value.getClass(); + if (this.mInternalMap.containsValue(value)) { + return this.mInternalMap.remove(mInternalNameMap.get(""+value.hashCode()), value); + } + return false; + } + + @Override + public boolean contains(Object o) { + for (V g : this.mInternalMap.values()) { + if (g.equals(o)) { + return true; + } + } + return false; + } + + @SuppressWarnings("unchecked") + @Override + public V[] toArray(V[] a) { + return (V[]) toArray(); + } + + @Override + public boolean containsAll(Collection c) { + boolean aTrue = true; + for (Object g : c) { + if (!this.contains(g)) { + aTrue = false; + } + } + return aTrue; + } + + @Override + public boolean addAll(Collection c) { + boolean aTrue = true; + for (V g : c) { + if (!this.add(g)) { + aTrue = false; + } + } + return aTrue; + } + + @Override + public boolean removeAll(Collection c) { + boolean aTrue = true; + for (Object g : c) { + if (!this.remove(g)) { + aTrue = false; + } + } + return aTrue; + } + + @Override + public boolean retainAll(Collection c) { + AutoMap aTempAllocation = new AutoMap(); + boolean aTrue = false; + aTempAllocation = this; + aTempAllocation.removeAll(c); + aTempAllocation.clear(); + aTrue = aTempAllocation.isEmpty(); + aTempAllocation.clear(); + return aTrue; + } + + @Override + public boolean offer(V e) { + return add(e); + } + + @Override + public V remove() { + V y = this.get(0); + if (remove(y)) + return y; + else + return null; + } + + @Override + public V poll() { + if (this.mInternalMap.isEmpty()) { + return null; + } + return remove(); + } + + @Override + public V element() { + if (this.mInternalMap.isEmpty()) { + return null; + } + return this.get(0); + } + + @Override + public V peek() { + return element(); + } + + @Override + public boolean addAll(int index, Collection c) { + for (V y : c) { + add(y); + } + return true; + } + + @Override + public V set(int index, V element) { + return mInternalMap.put(index, element); + } + + @Override + public void add(int index, V element) { + add(element); + } + + @Override + public V remove(int index) { + V h = mInternalMap.get(index); + set(index, null); + return h; + } + + @Override + public int indexOf(Object o) { + int aCount = 0; + for (V of : mInternalMap.values()) { + if (of != o) { + aCount++; + continue; + } + else { + return aCount; + } + } + return -1; + } + + @Override + public int lastIndexOf(Object o) { + //TODO + return indexOf(o); + } + + @Override + public ListIterator listIterator() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ListIterator listIterator(int index) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List subList(int fromIndex, int toIndex) { + AutoMap aNewSubList = new AutoMap(); + for (int slot=fromIndex; slot<=toIndex; slot++) { + V obj = mInternalMap.get(slot); + if (obj == null) { + continue; + } + else { + aNewSubList.put(obj); + } + } + return aNewSubList; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java b/src/main/java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java new file mode 100644 index 0000000000..991908e402 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/ConcurrentHashSet.java @@ -0,0 +1,18 @@ +package gtPlusPlus.api.objects.data; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +public class ConcurrentHashSet extends ConcurrentSet { + + private static final long serialVersionUID = -1293478938482781728L; + + public ConcurrentHashSet() { + this(new ConcurrentHashMap()); + } + + public ConcurrentHashSet(ConcurrentMap defaultMapType) { + super(defaultMapType); + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/ConcurrentSet.java b/src/main/java/gtPlusPlus/api/objects/data/ConcurrentSet.java new file mode 100644 index 0000000000..1d3ffc1c01 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/ConcurrentSet.java @@ -0,0 +1,53 @@ +package gtPlusPlus.api.objects.data; + +import java.io.Serializable; +import java.util.AbstractSet; +import java.util.Iterator; +import java.util.concurrent.ConcurrentMap; + +public abstract class ConcurrentSet extends AbstractSet implements Serializable { + + private static final long serialVersionUID = -6761513279741915432L; + + private final ConcurrentMap mInternalMap; + + private int mInternalID = 0; + + /** + * Creates a new instance which wraps the specified {@code map}. + */ + public ConcurrentSet(ConcurrentMap aMap) { + mInternalMap = aMap; + } + + @Override + public int size() { + return mInternalMap.size(); + } + + @Override + public boolean contains(Object o) { + return mInternalMap.containsKey(o); + } + + @Override + public boolean add(E o) { + return mInternalMap.putIfAbsent(mInternalID++, o) == null; + } + + @Override + public boolean remove(Object o) { + return mInternalMap.remove(o) != null; + } + + @Override + public void clear() { + this.mInternalID = 0; + mInternalMap.clear(); + } + + @Override + public Iterator iterator() { + return mInternalMap.values().iterator(); + } +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/FlexiblePair.java b/src/main/java/gtPlusPlus/api/objects/data/FlexiblePair.java new file mode 100644 index 0000000000..64f57b4e5a --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/FlexiblePair.java @@ -0,0 +1,39 @@ +package gtPlusPlus.api.objects.data; + +import java.io.Serializable; + +import com.google.common.base.Objects; + +public class FlexiblePair implements Serializable { + + /** + * SVUID + */ + private static final long serialVersionUID = 1250550491092812443L; + private final K key; + private V value; + + public FlexiblePair(final K key, final V value){ + this.key = key; + this.value = value; + } + + final public K getKey(){ + return this.key; + } + + final public V getValue(){ + return this.value; + } + + final public void setValue(V aObj) { + value = aObj; + } + + @Override + public int hashCode() { + Integer aCode = Objects.hashCode(getKey(), getValue()); + return aCode != null ? aCode : super.hashCode(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/objects/data/ObjMap.java b/src/main/java/gtPlusPlus/api/objects/data/ObjMap.java new file mode 100644 index 0000000000..49dd70d2b8 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/ObjMap.java @@ -0,0 +1,285 @@ +package gtPlusPlus.api.objects.data; + +import java.util.Arrays; + +/** + * Object-2-object map based on IntIntMap4a + */ +public class ObjMap +{ + private static final Object FREE_KEY = new Object(); + private static final Object REMOVED_KEY = new Object(); + + /** Keys and values */ + private Object[] m_data; + + /** Value for the null key (if inserted into a map) */ + private Object m_nullValue; + private boolean m_hasNull; + + /** Fill factor, must be between (0 and 1) */ + private final float m_fillFactor; + /** We will resize a map once it reaches this size */ + private int m_threshold; + /** Current map size */ + private int m_size; + /** Mask to calculate the original position */ + private int m_mask; + /** Mask to wrap the actual array pointer */ + private int m_mask2; + + public ObjMap( final int size, final float fillFactor ) + { + if ( fillFactor <= 0 || fillFactor >= 1 ) + throw new IllegalArgumentException( "FillFactor must be in (0, 1)" ); + if ( size <= 0 ) + throw new IllegalArgumentException( "Size must be positive!" ); + final int capacity = arraySize(size, fillFactor); + m_mask = capacity - 1; + m_mask2 = capacity * 2 - 1; + m_fillFactor = fillFactor; + + m_data = new Object[capacity * 2]; + Arrays.fill( m_data, FREE_KEY ); + + m_threshold = (int) (capacity * fillFactor); + } + + @SuppressWarnings("unchecked") + public V get( final K key ) + { + if ( key == null ) + return (V) m_nullValue; //we null it on remove, so safe not to check a flag here + + int ptr = (key.hashCode() & m_mask) << 1; + Object k = m_data[ ptr ]; + + if ( k == FREE_KEY ) + return null; //end of chain already + if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call + return (V) m_data[ ptr + 1 ]; + while ( true ) + { + ptr = (ptr + 2) & m_mask2; //that's next index + k = m_data[ ptr ]; + if ( k == FREE_KEY ) + return null; + if ( k.equals( key ) ) + return (V) m_data[ ptr + 1 ]; + } + } + + @SuppressWarnings("unchecked") + public V put( final K key, final V value ) + { + if ( key == null ) + return insertNullKey(value); + + int ptr = getStartIndex(key) << 1; + Object k = m_data[ptr]; + + if ( k == FREE_KEY ) //end of chain already + { + m_data[ ptr ] = key; + m_data[ ptr + 1 ] = value; + if ( m_size >= m_threshold ) + rehash( m_data.length * 2 ); //size is set inside + else + ++m_size; + return null; + } + else if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call + { + final Object ret = m_data[ ptr + 1 ]; + m_data[ ptr + 1 ] = value; + return (V) ret; + } + + int firstRemoved = -1; + if ( k == REMOVED_KEY ) + firstRemoved = ptr; //we may find a key later + + while ( true ) + { + ptr = ( ptr + 2 ) & m_mask2; //that's next index calculation + k = m_data[ ptr ]; + if ( k == FREE_KEY ) + { + if ( firstRemoved != -1 ) + ptr = firstRemoved; + m_data[ ptr ] = key; + m_data[ ptr + 1 ] = value; + if ( m_size >= m_threshold ) + rehash( m_data.length * 2 ); //size is set inside + else + ++m_size; + return null; + } + else if ( k.equals( key ) ) + { + final Object ret = m_data[ ptr + 1 ]; + m_data[ ptr + 1 ] = value; + return (V) ret; + } + else if ( k == REMOVED_KEY ) + { + if ( firstRemoved == -1 ) + firstRemoved = ptr; + } + } + } + + @SuppressWarnings("unchecked") + public V remove( final K key ) + { + if ( key == null ) + return removeNullKey(); + + int ptr = getStartIndex(key) << 1; + Object k = m_data[ ptr ]; + if ( k == FREE_KEY ) + return null; //end of chain already + else if ( k.equals( key ) ) //we check FREE and REMOVED prior to this call + { + --m_size; + if ( m_data[ ( ptr + 2 ) & m_mask2 ] == FREE_KEY ) + m_data[ ptr ] = FREE_KEY; + else + m_data[ ptr ] = REMOVED_KEY; + final V ret = (V) m_data[ ptr + 1 ]; + m_data[ ptr + 1 ] = null; + return ret; + } + while ( true ) + { + ptr = ( ptr + 2 ) & m_mask2; //that's next index calculation + k = m_data[ ptr ]; + if ( k == FREE_KEY ) + return null; + else if ( k.equals( key ) ) + { + --m_size; + if ( m_data[ ( ptr + 2 ) & m_mask2 ] == FREE_KEY ) + m_data[ ptr ] = FREE_KEY; + else + m_data[ ptr ] = REMOVED_KEY; + final V ret = (V) m_data[ ptr + 1 ]; + m_data[ ptr + 1 ] = null; + return ret; + } + } + } + + @SuppressWarnings("unchecked") + private V insertNullKey(final V value) + { + if ( m_hasNull ) + { + final Object ret = m_nullValue; + m_nullValue = value; + return (V) ret; + } + else + { + m_nullValue = value; + ++m_size; + return null; + } + } + + @SuppressWarnings("unchecked") + private V removeNullKey() + { + if ( m_hasNull ) + { + final Object ret = m_nullValue; + m_nullValue = null; + m_hasNull = false; + --m_size; + return (V) ret; + } + else + { + return null; + } + } + + public int size() + { + return m_size; + } + + @SuppressWarnings("unchecked") + private void rehash( final int newCapacity ) + { + m_threshold = (int) (newCapacity/2 * m_fillFactor); + m_mask = newCapacity/2 - 1; + m_mask2 = newCapacity - 1; + + final int oldCapacity = m_data.length; + final Object[] oldData = m_data; + + m_data = new Object[ newCapacity ]; + Arrays.fill( m_data, FREE_KEY ); + + m_size = m_hasNull ? 1 : 0; + + for ( int i = 0; i < oldCapacity; i += 2 ) { + final Object oldKey = oldData[ i ]; + if( oldKey != FREE_KEY && oldKey != REMOVED_KEY ) + put( (K)oldKey, (V)oldData[ i + 1 ]); + } + } + + public int getStartIndex( final Object key ) + { + //key is not null here + return key.hashCode() & m_mask; + } + + public Object[] values() { + return m_data; + } + + /** Taken from FastUtil implementation */ + + /** Return the least power of two greater than or equal to the specified value. + * + *

Note that this function will return 1 when the argument is 0. + * + * @param x a long integer smaller than or equal to 262. + * @return the least power of two greater than or equal to the specified value. + */ + public static long nextPowerOfTwo( long x ) { + if ( x == 0 ) return 1; + x--; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return ( x | x >> 32 ) + 1; + } + + /** Returns the least power of two smaller than or equal to 230 and larger than or equal to Math.ceil( expected / f ). + * + * @param expected the expected number of elements in a hash table. + * @param f the load factor. + * @return the minimum possible size for a backing array. + * @throws IllegalArgumentException if the necessary size is larger than 230. + */ + public static int arraySize( final int expected, final float f ) { + final long s = Math.max( 2, nextPowerOfTwo( (long)Math.ceil( expected / f ) ) ); + if ( s > (1 << 30) ) throw new IllegalArgumentException( "Too large (" + expected + " expected elements with load factor " + f + ")" ); + return (int)s; + } + + //taken from FastUtil + private static final int INT_PHI = 0x9E3779B9; + + public static int phiMix( final int x ) { + final int h = x * INT_PHI; + return h ^ (h >> 16); +} + +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/Pair.java b/src/main/java/gtPlusPlus/api/objects/data/Pair.java new file mode 100644 index 0000000000..e1d23e6b43 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/Pair.java @@ -0,0 +1,35 @@ +package gtPlusPlus.api.objects.data; + +import java.io.Serializable; + +import com.google.common.base.Objects; + +public class Pair implements Serializable { + + /** + * SVUID + */ + private static final long serialVersionUID = 1250550491092812443L; + private final K key; + private final V value; + + public Pair(final K key, final V value){ + this.key = key; + this.value = value; + } + + final public K getKey(){ + return this.key; + } + + final public V getValue(){ + return this.value; + } + + @Override + public int hashCode() { + Integer aCode = Objects.hashCode(getKey(), getValue()); + return aCode != null ? aCode : super.hashCode(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/objects/data/Quad.java b/src/main/java/gtPlusPlus/api/objects/data/Quad.java new file mode 100644 index 0000000000..fa2e52951e --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/Quad.java @@ -0,0 +1,45 @@ +package gtPlusPlus.api.objects.data; + +import java.util.ArrayList; +import java.util.List; + +public class Quad { + + private final K key; + private final V value; + private final C value2; + private final R value3; + + public Quad(final K key, final V value, final C value2, final R value3){ + this.key = key; + this.value = value; + this.value2 = value2; + this.value3 = value3; + } + + final public K getKey(){ + return this.key; + } + + final public V getValue_1(){ + return this.value; + } + + final public C getValue_2(){ + return this.value2; + } + + final public R getValue_3(){ + return this.value3; + } + + public final List values() { + List aVals = new ArrayList(); + aVals.add(key); + aVals.add(value); + aVals.add(value2); + aVals.add(value3); + return aVals; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/objects/data/ReverseAutoMap.java b/src/main/java/gtPlusPlus/api/objects/data/ReverseAutoMap.java new file mode 100644 index 0000000000..72ec0bc293 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/ReverseAutoMap.java @@ -0,0 +1,175 @@ +package gtPlusPlus.api.objects.data; + +import java.util.*; + +public class ReverseAutoMap extends AutoMap { + + /** + * The Internal Map + */ + private Map mInternalMapReverseLookup = new HashMap(); + + /** + * The Internal ID + */ + private int mInternalID = 0; + private static final long serialVersionUID = 3771412318075131790L; + + @Override + public Iterator iterator() { + return values().iterator(); + } + + public synchronized boolean setValue(N object){ + int mOriginalID = this.mInternalID; + put(object); + if (this.mInternalMap.get(mOriginalID).equals(object) || mOriginalID > this.mInternalID){ + return true; + } + else { + return false; + } + } + + @Override + public synchronized N put(N object){ + return set(object); + } + + @Override + public synchronized N set(N object){ + int newID = getNextFreeMapID(); + mInternalMapReverseLookup.put(object, newID); + return mInternalMap.put(newID, object); + } + + public synchronized int putToInternalMap(N object){ + return setInternalMap(object); + } + + public synchronized int setInternalMap(N object){ + int newID = getNextFreeMapID(); + mInternalMap.put(newID, object); + mInternalMapReverseLookup.put(object, newID); + return newID; + } + + public synchronized boolean injectCleanDataToAutoMap(Integer g, N object){ + if (!mInternalMap.containsKey(g) && !mInternalMapReverseLookup.containsKey(object)) { + int a1 = 0, a2 = 0, a11 = 0, a22 = 0; + a1 = mInternalMap.size(); + a2 = mInternalMapReverseLookup.size(); + a11 = a1; + a22 = a2; + mInternalMap.put(g, object); + a1 = mInternalMap.size(); + mInternalMapReverseLookup.put(object, g); + a2 = mInternalMapReverseLookup.size(); + if (a1 > a11 && a2 > a22) + return true; + } + return false; + } + + public synchronized boolean injectDataToAutoMap(Integer g, N object){ + int a1 = 0, a2 = 0, a11 = 0, a22 = 0; + a1 = mInternalMap.size(); + a2 = mInternalMapReverseLookup.size(); + a11 = a1; + a22 = a2; + mInternalMap.put(g, object); + a1 = mInternalMap.size(); + mInternalMapReverseLookup.put(object, g); + a2 = mInternalMapReverseLookup.size(); + if (a1 > a11 && a2 > a22) + return true; + return false; + } + + private boolean raiseInternalID() { + int mOld = mInternalID; + mInternalID++; + return mInternalID > mOld; + } + + public synchronized int getNextFreeMapID() { + if (raiseInternalID()) { + return mInternalID; + } + return Short.MIN_VALUE; + } + + @Override + public synchronized N get(int id){ + return mInternalMap.get(id); + } + + public synchronized int get(N key) { + return mInternalMapReverseLookup.get(key); + } + + @Override + public synchronized Collection values(){ + return mInternalMap.values(); + } + + public synchronized Collection keys(){ + return mInternalMapReverseLookup.values(); + } + + @Override + public synchronized int size(){ + return mInternalMap.size(); + } + + @Override + public synchronized int hashCode(){ + return mInternalMap.hashCode()+mInternalMapReverseLookup.hashCode(); + } + + @Override + public synchronized boolean containsKey(int key){ + return mInternalMap.containsKey(key); + } + + @Override + public synchronized boolean containsValue(N value){ + return mInternalMap.containsValue(value); + } + + public synchronized boolean containsKey(N key){ + return mInternalMapReverseLookup.containsKey(key); + } + + public synchronized boolean containsValue(int value){ + return mInternalMapReverseLookup.containsValue(value); + } + + @Override + public synchronized boolean isEmpty(){ + return mInternalMap.isEmpty() && mInternalMapReverseLookup.isEmpty(); + } + + @Override + public synchronized void clear(){ + this.mInternalID = 0; + this.mInternalMap.clear(); + this.mInternalMapReverseLookup.clear(); + return; + } + + @Override + public synchronized N[] toArray() { + Collection col = this.mInternalMap.values(); + @SuppressWarnings("unchecked") + N[] val = (N[]) col.toArray(); + return val; + } + + public synchronized Integer[] toArrayInternalMap() { + Collection col = this.mInternalMapReverseLookup.values(); + Integer[] val = col.toArray(new Integer[col.size()]); + return val; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/Triplet.java b/src/main/java/gtPlusPlus/api/objects/data/Triplet.java new file mode 100644 index 0000000000..affb03d868 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/Triplet.java @@ -0,0 +1,27 @@ +package gtPlusPlus.api.objects.data; + +public class Triplet { + + private final K key; + private final V value; + private final C count; + + public Triplet(final K key, final V value, final C value2){ + this.key = key; + this.value = value; + this.count = value2; + } + + final public K getValue_1(){ + return this.key; + } + + final public V getValue_2(){ + return this.value; + } + + final public C getValue_3(){ + return this.count; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java b/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java new file mode 100644 index 0000000000..601a51392f --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/TypeCounter.java @@ -0,0 +1,178 @@ +package gtPlusPlus.api.objects.data; + +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; + +import gtPlusPlus.api.objects.Logger; + + +public class TypeCounter implements Set { + + private Map> mInternalMap = new LinkedHashMap>(); + private String mHighestValueKey; + private int mHighestValue = 0; + private final Class mClass; + + public TypeCounter(Class o) { + Logger.WARNING("Created new TypeCounter for "+o.getName()); + mClass = o; + } + + public static class InternalTypeCounterObject { + private final Z mObject; + private int mCounter = 0; + + public InternalTypeCounterObject(Z o) { + mObject = o; + } + + public String hash() { + return String.valueOf(mObject.hashCode()); + } + + public Z get() { + return mObject; + } + + public void add() { + mCounter++; + } + + public int count() { + return mCounter; + } + + } + + public boolean add(V arg0) { + return add(arg0, null); + } + + public boolean add(V arg0, String aKeyName) { + String aKey = aKeyName != null ? aKeyName : arg0.toString(); + InternalTypeCounterObject aValue = mInternalMap.get(aKey); + if (aValue == null) { + aValue = new InternalTypeCounterObject((V) arg0); + Logger.WARNING("Adding new key to map: "+aKey); + } + aValue.add(); + int a = aValue.count(); + if (a > mHighestValue) { + mHighestValue = a; + mHighestValueKey = aKey; + Logger.WARNING("New Highest Count - "+aKey+":"+a); + } + mInternalMap.put(aKey, aValue); + Logger.WARNING(aKey+":"+a); + return true; + } + + @Override + public boolean addAll(Collection arg0) { + boolean aReturn = true; + for (Object o : arg0) { + if (mClass.isInstance(o)) { + V j = (V) o; + boolean b = add(j); + if (!b) { + aReturn = false; + } + } + } + return aReturn; + } + + @Override + public void clear() { + mInternalMap.clear(); + } + + @Override + public boolean contains(Object arg0) { + return mInternalMap.containsKey(arg0.toString()); + } + + @Override + public boolean containsAll(Collection arg0) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isEmpty() { + return mInternalMap.isEmpty(); + } + + @Override + public Iterator iterator() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean remove(Object arg0) { + InternalTypeCounterObject aValue = mInternalMap.remove(arg0.toString()); + if (aValue != null) { + return true; + } + else { + return false; + } + } + + @Override + public boolean removeAll(Collection arg0) { + boolean aReturn = true; + for (Object o : arg0) { + boolean a = remove(o); + if (!a) { + aReturn = false; + } + } + return aReturn; + } + + @Override + public boolean retainAll(Collection arg0) { + // TODO Auto-generated method stub + return false; + } + + @Override + public int size() { + return this.mInternalMap.size(); + } + + @Override + public Object[] toArray() { + Object[] aArray = new Object[this.mInternalMap.size()]; + int aPos = 0; + for (String k : this.mInternalMap.keySet()) { + if (k != null) { + InternalTypeCounterObject aVal = this.mInternalMap.get(k); + aArray[aPos++] = new Pair>(k, aVal); + } + } + return aArray; + } + + @Override + public V[] toArray(Object[] a) { + Object[] aArray = new Object[a.length]; + int aPos = 0; + for (Object k : a) { + if (k != null) { + aArray[aPos++] = k; + } + } + return (V[]) aArray; + } + + public V getResults() { + InternalTypeCounterObject x = mInternalMap.get(mHighestValueKey); + return x.get(); + } +} diff --git a/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java b/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java new file mode 100644 index 0000000000..f9966474b0 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/WeightedCollection.java @@ -0,0 +1,102 @@ +package gtPlusPlus.api.objects.data; + +import java.util.Collection; +import java.util.Map; +import java.util.NavigableMap; +import java.util.Random; +import java.util.Set; +import java.util.TreeMap; + +import gtPlusPlus.api.objects.random.XSTR; + +public class WeightedCollection implements Map { + + private NavigableMap map = new TreeMap(); + private Random random; + private int total = 0; + + public WeightedCollection() { + this(new XSTR()); + } + + public WeightedCollection(Random random) { + this.random = random; + } + + public E add(int weight, E object) { + if (weight <= 0) return null; + total += weight; + return map.put(total, object); + } + + private E next() { + int value = random.nextInt(total) + 1; // Can also use floating-point weights + return map.ceilingEntry(value).getValue(); + } + + @Override + public int size() { + return map.size(); + } + + @Override + public boolean isEmpty() { + return map.isEmpty(); + } + + @Override + public boolean containsKey(Object key) { + return map.containsKey(key); + } + + @Override + public boolean containsValue(Object value) { + return map.containsValue(value); + } + + public E get() { + return next(); + } + + @Override + public E get(Object key) { + return next(); + } + + @Override + public void putAll(Map m) { + map.putAll(m); + } + + @Override + public void clear() { + map.clear(); + this.total = 0; + } + + @Override + public Set keySet() { + return map.keySet(); + } + + @Override + public Collection values() { + return map.values(); + } + + @Override + public Set entrySet() { + return map.entrySet(); + } + + @Override + public E put(Integer key, E value) { + return add(key, value); + } + + @Override + public E remove(Object key) { + return map.remove(key); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java b/src/main/java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java new file mode 100644 index 0000000000..6c55822ca9 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/data/weakref/WeakAutoMap.java @@ -0,0 +1,12 @@ +package gtPlusPlus.api.objects.data.weakref; + +import java.util.WeakHashMap; + +import gtPlusPlus.api.objects.data.AutoMap; + +public class WeakAutoMap extends AutoMap { + private static final long serialVersionUID = 8328345351801363386L; + public WeakAutoMap() { + super(new WeakHashMap()); + } +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java b/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java new file mode 100644 index 0000000000..722ac00b64 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/AABB.java @@ -0,0 +1,65 @@ +package gtPlusPlus.api.objects.minecraft; + +import gtPlusPlus.core.util.minecraft.EntityUtils; +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +/** + * Generates an AABB around an entity. + * @author Alkalus + * + */ +public class AABB { + + private final AxisAlignedBB mAabb; + private final World mWorld; + + /** + * Creates a AxisAlignedBB based around an Entity. + * @param aEntity - The Entity to work with. + * @param x - Maximum X from origin. + * @param y - Maximum Y from origin. + * @param z - Maximum Z from origin. + */ + public AABB(Entity aEntity, int x, int y, int z) { + if (aEntity == null) { + mAabb = null; + mWorld = null; + } + else { + mWorld = aEntity.worldObj; + BlockPos aEntityLocation = EntityUtils.findBlockPosUnderEntity(aEntity); + int xMin, xMax, yMin, yMax, zMin, zMax; + xMin = aEntityLocation.xPos; + yMin = aEntityLocation.yPos; + zMin = aEntityLocation.zPos; + xMax = aEntityLocation.xPos + x; + yMax = aEntityLocation.yPos + y; + zMax = aEntityLocation.zPos + z; + mAabb = AxisAlignedBB.getBoundingBox(xMin, yMin, zMin, xMax, yMax, zMax); + } + + } + + /** + * Used to get the AxisAlignedBB from this class. + * @return + */ + public AxisAlignedBB get() { + return mAabb; + } + + /** + * Used to determine if this object is valid or not. + * @return + */ + public boolean valid() { + return mAabb != null && mWorld != null; + } + + public World world() { + return mWorld; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java new file mode 100644 index 0000000000..0b8f97b378 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_FluidTank.java @@ -0,0 +1,188 @@ +package gtPlusPlus.api.objects.minecraft; + +import gtPlusPlus.core.util.minecraft.FluidUtils; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; + +public class BTF_FluidTank extends FluidTank { + + public FluidStack mFluid; + + public BTF_FluidTank(int capacity) { + super(capacity); + } + + /** + * Let's replace the Default handling with GT's own handling code, because it's probably better, right? + * @author Alkalus/GregoriusT + */ + + + public FluidStack getFluid() { + return this.getDrainableStack(); + } + + public int getFluidAmount() { + return this.getDrainableStack() != null ? this.getDrainableStack().amount : 0; + } + + public NBTTagCompound writeToNBT(NBTTagCompound aNBT) { + super.writeToNBT(aNBT); + if (this.mFluid != null) { + aNBT.setTag("mFluid", this.mFluid.writeToNBT(new NBTTagCompound())); + } + return aNBT; + } + + public FluidTank readFromNBT(NBTTagCompound aNBT) { + this.mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); + return this; + } + +/* public abstract boolean isLiquidInput(byte arg0); + + public abstract boolean isLiquidOutput(byte arg0); + + public abstract boolean doesFillContainers(); + + public abstract boolean doesEmptyContainers();*/ + + public boolean canTankBeFilled() { + return true; + } + + public boolean canTankBeEmptied() { + return true; + } + + + public boolean isFluidInputAllowed(FluidStack aFluid) { + return true; + } + + public FluidStack getFillableStack() { + return this.mFluid; + } + + public FluidStack setFillableStack(FluidStack aFluid) { + this.mFluid = aFluid; + return this.mFluid; + } + + public FluidStack getDrainableStack() { + return this.mFluid; + } + + public FluidStack setDrainableStack(FluidStack aFluid) { + this.mFluid = aFluid; + return this.mFluid; + } + + public FluidStack getDisplayedFluid() { + return this.getDrainableStack(); + } + + public boolean isFluidChangingAllowed() { + return true; + } + + public int fill(FluidStack aFluid, boolean doFill) { + if (aFluid != null && aFluid.getFluid().getID() > 0 && aFluid.amount > 0 && this.canTankBeFilled() + && this.isFluidInputAllowed(aFluid)) { + if (this.getFillableStack() != null && this.getFillableStack().getFluid().getID() > 0) { + if (!this.getFillableStack().isFluidEqual(aFluid)) { + return 0; + } else { + int space = this.getCapacity() - this.getFillableStack().amount; + if (aFluid.amount <= space) { + if (doFill) { + FluidStack arg9999 = this.getFillableStack(); + arg9999.amount += aFluid.amount; + } + + return aFluid.amount; + } else { + if (doFill) { + this.getFillableStack().amount = this.getCapacity(); + } + + return space; + } + } + } else if (aFluid.amount <= this.getCapacity()) { + if (doFill) { + this.setFillableStack(aFluid.copy()); + } + + return aFluid.amount; + } else { + if (doFill) { + this.setFillableStack(aFluid.copy()); + this.getFillableStack().amount = this.getCapacity(); + } + + return this.getCapacity(); + } + } else { + return 0; + } + } + + public FluidStack drain(int maxDrain, boolean doDrain) { + if (this.getDrainableStack() != null && this.canTankBeEmptied()) { + if (this.getDrainableStack().amount <= 0 && this.isFluidChangingAllowed()) { + this.setDrainableStack((FluidStack) null); + return null; + } else { + int used = maxDrain; + if (this.getDrainableStack().amount < maxDrain) { + used = this.getDrainableStack().amount; + } + + if (doDrain) { + FluidStack arg9999 = this.getDrainableStack(); + arg9999.amount -= used; + } + + FluidStack drained = this.getDrainableStack().copy(); + drained.amount = used; + if (this.getDrainableStack().amount <= 0 && this.isFluidChangingAllowed()) { + this.setDrainableStack((FluidStack) null); + } + + return drained; + } + } else { + return null; + } + } + + @Override + public int getCapacity() { + return super.getCapacity(); + } + + @Override + public FluidTankInfo getInfo() { + return new FluidTankInfo(this); + } + + @Override + public void setFluid(FluidStack fluid) { + setFillableStack(fluid); + } + + @Override + public void setCapacity(int capacity) { + super.setCapacity(capacity); + } + + public FluidStack drain(FluidStack aFluid, boolean doDrain) { + return drain(aFluid.amount, doDrain); + } + + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java new file mode 100644 index 0000000000..04ce0dff19 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BTF_Inventory.java @@ -0,0 +1,228 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.ArrayList; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.tileentities.base.TileEntityBase; +import gtPlusPlus.core.util.data.ArrayUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; + +public class BTF_Inventory implements ISidedInventory{ + + public final ItemStack[] mInventory; + public final TileEntityBase mTile; + + public BTF_Inventory(int aSlots, TileEntityBase tile) { + this.mInventory = new ItemStack[aSlots]; + this.mTile = tile; + } + + public ItemStack[] getRealInventory() { + purgeNulls(); + return this.mInventory; + } + + public int getSizeInventory() { + return this.mInventory.length; + } + + public ItemStack getStackInSlot(int aIndex) { + return aIndex >= 0 && aIndex < this.mInventory.length ? this.mInventory[aIndex] : null; + } + + public void setInventorySlotContents(int aIndex, ItemStack aStack) { + if (aIndex >= 0 && aIndex < this.mInventory.length) { + this.mInventory[aIndex] = aStack; + } + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public boolean isValidSlot(int aIndex) { + return true; + } + + public int getInventoryStackLimit() { + return 64; + } + + + public boolean setStackToZeroInsteadOfNull(int aIndex) { + return false; +} + + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + return isValidSlot(aIndex); + } + + public ItemStack decrStackSize(int aIndex, int aAmount) { + ItemStack tStack = this.getStackInSlot(aIndex); + ItemStack rStack = GT_Utility.copy(new Object[]{tStack}); + if (tStack != null) { + if (tStack.stackSize <= aAmount) { + if (this.setStackToZeroInsteadOfNull(aIndex)) { + tStack.stackSize = 0; + } else { + this.setInventorySlotContents(aIndex, (ItemStack) null); + } + } else { + rStack = tStack.splitStack(aAmount); + if (tStack.stackSize == 0 && !this.setStackToZeroInsteadOfNull(aIndex)) { + this.setInventorySlotContents(aIndex, (ItemStack) null); + } + } + } + + return rStack; + } + + public int[] getAccessibleSlotsFromSide(int aSide) { + ArrayList tList = new ArrayList(); + TileEntityBase tTileEntity = this.mTile; + boolean tSkip = tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), -2, + tTileEntity) + || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), -2, + tTileEntity); + + for (int rArray = 0; rArray < this.getSizeInventory(); ++rArray) { + if (this.isValidSlot(rArray) && (tSkip + || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), + rArray, tTileEntity) + || tTileEntity.getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, + tTileEntity.getCoverIDAtSide((byte) aSide), tTileEntity.getCoverDataAtSide((byte) aSide), + rArray, tTileEntity))) { + tList.add(Integer.valueOf(rArray)); + } + } + + int[] arg6 = new int[tList.size()]; + + for (int i = 0; i < arg6.length; ++i) { + arg6[i] = ((Integer) tList.get(i)).intValue(); + } + + return arg6; + } + + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + return this.isValidSlot(aIndex) && aStack != null && aIndex < this.mInventory.length + && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(aStack, this.mInventory[aIndex])) + && this.allowPutStack(this.mTile, aIndex, (byte) aSide, aStack); + } + + public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { + return this.isValidSlot(aIndex) && aStack != null && aIndex < this.mInventory.length + && this.allowPullStack(this.mTile, aIndex, (byte) aSide, aStack); + } + + public boolean allowPullStack(TileEntityBase mTile2, int aIndex, byte aSide, ItemStack aStack) { + return aIndex >= 0 && aIndex < this.getSizeInventory(); + } + + public boolean allowPutStack(TileEntityBase aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (aIndex >= 0 && aIndex < this.getSizeInventory()) && (this.mInventory[aIndex] == null || GT_Utility.areStacksEqual(this.mInventory[aIndex], aStack)); + } + + public ItemStack getStackInSlotOnClosing(int i) { + return null; + } + + public final boolean hasCustomInventoryName() { + return mTile != null ? mTile.hasCustomInventoryName() : false; + } + + + public void markDirty() { + if (mTile != null) { + purgeNulls(); + mTile.markDirty(); + } + } + + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return true; + } + + public void openInventory() { + + } + + public void closeInventory() { + + } + + @Override + public final String getInventoryName() { + return this.mTile != null ? mTile.getInventoryName() : ""; + } + + public boolean isFull() { + for (int s=0;s getSurroundingBlocks(){ + AutoMap sides = new AutoMap(); + sides.put(getUp()); + sides.put(getDown()); + sides.put(getXPos()); + sides.put(getXNeg()); + sides.put(getZPos()); + sides.put(getZNeg()); + return sides; + } + + public Block getBlockAtPos() { + return getBlockAtPos(this); + } + + public Block getBlockAtPos(BlockPos pos) { + return getBlockAtPos(world, pos); + } + + public Block getBlockAtPos(World world, BlockPos pos) { + return world.getBlock(pos.xPos, pos.yPos, pos.zPos); + } + + public int getMetaAtPos() { + return getMetaAtPos(this); + } + + public int getMetaAtPos(BlockPos pos) { + return getMetaAtPos(world, pos); + } + + public int getMetaAtPos(World world, BlockPos pos) { + return world.getBlockMetadata(pos.xPos, pos.yPos, pos.zPos); + } + + public boolean hasSimilarNeighbour() { + return hasSimilarNeighbour(false); + } + + /** + * @param strict - Does this check Meta Data? + * @return - Does this block have a neighbour that is the same? + */ + public boolean hasSimilarNeighbour(boolean strict) { + for (BlockPos g : getSurroundingBlocks().values()) { + if (getBlockAtPos(g) == getBlockAtPos()) { + if (!strict) { + return true; + } + else { + if (getMetaAtPos() == getMetaAtPos(g)) { + return true; + } + } + } + } + return false; + } + + public AutoMap getSimilarNeighbour() { + return getSimilarNeighbour(false); + } + + /** + * @param strict - Does this check Meta Data? + * @return - Does this block have a neighbour that is the same? + */ + public AutoMap getSimilarNeighbour(boolean strict) { + AutoMap sides = new AutoMap(); + for (BlockPos g : getSurroundingBlocks().values()) { + if (getBlockAtPos(g) == getBlockAtPos()) { + if (!strict) { + sides.put(g); + } + else { + if (getMetaAtPos() == getMetaAtPos(g)) { + sides.put(g); + } + } + } + } + return sides; + } + + public Set getValidNeighboursAndSelf(){ + AutoMap h = getSimilarNeighbour(true); + h.put(this); + Set result = new HashSet(); + for (BlockPos f : h.values()) { + result.add(f); + } + return result; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/CubicObject.java b/src/main/java/gtPlusPlus/api/objects/minecraft/CubicObject.java new file mode 100644 index 0000000000..8c76513d09 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/CubicObject.java @@ -0,0 +1,62 @@ +package gtPlusPlus.api.objects.minecraft; + +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraftforge.common.util.ForgeDirection; + +public class CubicObject { + + public final T NORTH; + public final T SOUTH; + + public final T WEST; + public final T EAST; + + public final T UP; + public final T DOWN; + + public CubicObject(AutoMap aDataSet) { + this(aDataSet.get(0), aDataSet.get(1), aDataSet.get(2), aDataSet.get(3), aDataSet.get(4), aDataSet.get(5)); + } + + public CubicObject(T[] aDataSet) { + this(aDataSet[0], aDataSet[1], aDataSet[2], aDataSet[3], aDataSet[4], aDataSet[5]); + } + + public CubicObject(T aDOWN, T aUP, T aNORTH, T aSOUTH, T aWEST, T aEAST) { + DOWN = aDOWN; + UP = aUP; + NORTH = aNORTH; + SOUTH = aSOUTH; + WEST = aWEST; + EAST = aEAST; + } + + public T get(int aSide) { + return get(ForgeDirection.getOrientation(aSide)); + } + + public T get(ForgeDirection aSide) { + if (aSide == ForgeDirection.DOWN) { + return DOWN; + } + else if (aSide == ForgeDirection.UP) { + return UP; + } + else if (aSide == ForgeDirection.NORTH) { + return NORTH; + } + else if (aSide == ForgeDirection.SOUTH) { + return SOUTH; + } + else if (aSide == ForgeDirection.WEST) { + return WEST; + } + else if (aSide == ForgeDirection.EAST) { + return EAST; + } + else { + return null; + } + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java b/src/main/java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java new file mode 100644 index 0000000000..010e522a14 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/DimChunkPos.java @@ -0,0 +1,52 @@ +package gtPlusPlus.api.objects.minecraft; + +import net.minecraft.client.Minecraft; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class DimChunkPos { + + public final int dimension; + public final int xPos; + public final int zPos; + public final Chunk mainChunk; + + + public DimChunkPos(World world, BlockPos block){ + this.dimension = world.provider.dimensionId; + this.mainChunk = world.getChunkFromBlockCoords(block.xPos, block.zPos); + this.xPos = this.mainChunk.xPosition; + this.zPos = this.mainChunk.zPosition; + } + + + public DimChunkPos(TileEntity tile){ + this.dimension = tile.getWorldObj().provider.dimensionId; + this.mainChunk = tile.getWorldObj().getChunkFromBlockCoords(tile.xCoord, tile.zCoord); + this.xPos = this.mainChunk.xPosition; + this.zPos = this.mainChunk.zPosition; + } + + public DimChunkPos(int dim, int x, int z){ + this.dimension = dim; + this.xPos = x; + this.zPos = z; + Chunk h = Minecraft.getMinecraft().getIntegratedServer().worldServerForDimension(dim).getChunkFromChunkCoords(xPos, zPos); + if (h == null) { + this.mainChunk = null; + } + else { + this.mainChunk = h; + } + } + + public Chunk getChunk() { + if (this.mainChunk != null) { + return this.mainChunk; + } + Chunk h = Minecraft.getMinecraft().getIntegratedServer().worldServerForDimension(this.dimension).getChunkFromChunkCoords(xPos, zPos); + return h; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java new file mode 100644 index 0000000000..d5db8081dc --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeBlockPos.java @@ -0,0 +1,253 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.HashSet; +import java.util.Set; + +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; + +public class FakeBlockPos extends BlockPos { + + private static final long serialVersionUID = -6442245826092414593L; + private transient Block aBlockAtPos; + private int aBlockMetaAtPos = 0; + + public static FakeBlockPos generateBlockPos(String sUUID) { + String[] s2 = sUUID.split("@"); + return new FakeBlockPos(s2); + } + + public FakeBlockPos(String[] s){ + this(Integer.parseInt(s[1]), Integer.parseInt(s[2]), Integer.parseInt(s[3]), Integer.parseInt(s[0])); + } + + public FakeBlockPos(int x, int y, int z, Block aBlock, int aMeta){ + this(x, y, z, 0); + aBlockAtPos = aBlock; + aBlockMetaAtPos = aMeta; + } + + private FakeBlockPos(int x, int y, int z, int dim){ + this(x, y, z, DimensionManager.getWorld(dim)); + } + + private FakeBlockPos(int x, int y, int z, World dim){ + super(x, y, z, null); + } + + public String getLocationString() { + String S = ""+this.xPos+"@"+this.yPos+"@"+this.zPos; + return S; + } + + public String getUniqueIdentifier() { + String S = ""+this.xPos+"@"+this.yPos+"@"+this.zPos+this.aBlockAtPos.getLocalizedName()+"@"+this.aBlockMetaAtPos; + return S; + } + + @Override + public int hashCode() { + int hash = 5; + hash += (13 * this.xPos); + hash += (19 * this.yPos); + hash += (31 * this.zPos); + hash += (17 * this.dim); + return hash; + } + + @Override + public boolean equals(Object other) { + if (other == null) { + return false; + } + if (other == this) { + return true; + } + if(!(other instanceof FakeBlockPos)) { + return false; + } + FakeBlockPos otherPoint = (FakeBlockPos) other; + return this.xPos == otherPoint.xPos && this.yPos == otherPoint.yPos && this.zPos == otherPoint.zPos; + } + + public int distanceFrom(FakeBlockPos target) { + if (target.dim != this.dim) { + return Short.MIN_VALUE; + } + return distanceFrom(target.xPos, target.yPos, target.zPos); + } + + /** + * + * @param x X coordinate of target. + * @param y Y coordinate of target. + * @param z Z coordinate of target. + * @return square of distance + */ + public int distanceFrom(int x, int y, int z) { + int distanceX = this.xPos - x; + int distanceY = this.yPos - y; + int distanceZ = this.zPos - z; + return distanceX * distanceX + distanceY * distanceY + distanceZ * distanceZ; + } + + public boolean isWithinRange(FakeBlockPos target, int range) { + if (target.dim != this.dim) { + return false; + } + return isWithinRange(target.xPos, target.yPos, target.zPos, range); + } + + public boolean isWithinRange(int x, int y, int z, int range) { + return distanceFrom(x, y, z) <= (range * range); + } + + + public FakeBlockPos getUp() { + return new FakeBlockPos(this.xPos, this.yPos+1, this.zPos, this.dim); + } + + public FakeBlockPos getDown() { + return new FakeBlockPos(this.xPos, this.yPos-1, this.zPos, this.dim); + } + + public FakeBlockPos getXPos() { + return new FakeBlockPos(this.xPos+1, this.yPos, this.zPos, this.dim); + } + + public FakeBlockPos getXNeg() { + return new FakeBlockPos(this.xPos-1, this.yPos, this.zPos, this.dim); + } + + public FakeBlockPos getZPos() { + return new FakeBlockPos(this.xPos, this.yPos, this.zPos+1, this.dim); + } + + public FakeBlockPos getZNeg() { + return new FakeBlockPos(this.xPos, this.yPos, this.zPos-1, this.dim); + } + + public AutoMap getSurroundingBlocks(){ + AutoMap sides = new AutoMap(); + sides.put(getUp()); + sides.put(getDown()); + sides.put(getXPos()); + sides.put(getXNeg()); + sides.put(getZPos()); + sides.put(getZNeg()); + return sides; + } + + public Block getBlockAtPos() { + return getBlockAtPos(this); + } + + public Block getBlockAtPos(FakeBlockPos pos) { + return getBlockAtPos(world, pos); + } + + public Block getBlockAtPos(World world, FakeBlockPos pos) { + return aBlockAtPos; + } + + public int getMetaAtPos() { + return getMetaAtPos(this); + } + + public int getMetaAtPos(FakeBlockPos pos) { + return getMetaAtPos(world, pos); + } + + public int getMetaAtPos(World world, FakeBlockPos pos) { + return aBlockMetaAtPos; + } + + public boolean hasSimilarNeighbour() { + return hasSimilarNeighbour(false); + } + + /** + * @param strict - Does this check Meta Data? + * @return - Does this block have a neighbour that is the same? + */ + public boolean hasSimilarNeighbour(boolean strict) { + for (BlockPos g : getSurroundingBlocks().values()) { + if (getBlockAtPos(g) == getBlockAtPos()) { + if (!strict) { + return true; + } + else { + if (getMetaAtPos() == getMetaAtPos(g)) { + return true; + } + } + } + } + return false; + } + + public AutoMap getSimilarNeighbour() { + return getSimilarNeighbour(false); + } + + /** + * @param strict - Does this check Meta Data? + * @return - Does this block have a neighbour that is the same? + */ + public AutoMap getSimilarNeighbour(boolean strict) { + AutoMap sides = new AutoMap(); + for (BlockPos g : getSurroundingBlocks().values()) { + if (getBlockAtPos(g) == getBlockAtPos()) { + if (!strict) { + sides.put(g); + } + else { + if (getMetaAtPos() == getMetaAtPos(g)) { + sides.put(g); + } + } + } + } + return sides; + } + + public Set getValidNeighboursAndSelf(){ + AutoMap h = getSimilarNeighbour(true); + h.put(this); + Set result = new HashSet(); + for (BlockPos f : h.values()) { + result.add(f); + } + return result; + } + + /** + * Called when a plant grows on this block, only implemented for saplings using the WorldGen*Trees classes right now. + * Modder may implement this for custom plants. + * This does not use ForgeDirection, because large/huge trees can be located in non-representable direction, + * so the source location is specified. + * Currently this just changes the block to dirt if it was grass. + * + * Note: This happens DURING the generation, the generation may not be complete when this is called. + * + * @param world Current world + * @param x Soil X + * @param y Soil Y + * @param z Soil Z + * @param sourceX Plant growth location X + * @param sourceY Plant growth location Y + * @param sourceZ Plant growth location Z + */ + public void onPlantGrow(FakeWorld world, int x, int y, int z, int sourceX, int sourceY, int sourceZ) + { + if (getBlockAtPos() == Blocks.grass || getBlockAtPos() == Blocks.farmland) + { + this.aBlockAtPos = Blocks.dirt; + this.aBlockMetaAtPos = 0; + } + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java new file mode 100644 index 0000000000..8ee033a341 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FakeWorld.java @@ -0,0 +1,173 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.HashMap; + +import gregtech.api.enums.Materials; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.util.ForgeDirection; + +public class FakeWorld implements IBlockAccess { + + public static HashMap mStaticFakeWorldData; + + public HashMap mFakeWorldData = new HashMap(); + + /** + * Must be an odd number + */ + private int aWorldSize = 99; + private final int aDistanceFromOrigin; + private final int aWorldHeight; + + public FakeWorld() { + this(99); + } + + public FakeWorld(int aSize) { + if (MathUtils.isNumberEven(aSize)) { + aSize++; + } + aWorldSize = aSize; + aDistanceFromOrigin = ((aWorldSize-1)/2); + aWorldHeight = aDistanceFromOrigin >= 255 ? 255 : aDistanceFromOrigin; + Logger.WARNING("Created a Fake World with data:"); + Logger.WARNING("World Size: "+aWorldSize); + Logger.WARNING("Distance from Origin in each dir: "+aDistanceFromOrigin); + Logger.WARNING("World Height: "+aWorldHeight); + init(); + } + + public void init() { + + /*if (mStaticFakeWorldData == null) { + Logger.WARNING("Setting all Blocks in Fake World to Air."); + mStaticFakeWorldData = new HashMap(); + for (int y=0;y<=aWorldHeight;y++) { + for (int x=-aDistanceFromOrigin;x<=aDistanceFromOrigin;x++) { + for (int z=-aDistanceFromOrigin;z<=aDistanceFromOrigin;z++) { + FakeBlockPos aTempPos = new FakeBlockPos(x, y, z, Blocks.air, 0); + mStaticFakeWorldData.put(aTempPos.getLocationString(), aTempPos); + } + } + } + }*/ + //if (mStaticFakeWorldData != null) { + //Logger.WARNING(" Instancing static air world."); + mFakeWorldData = new HashMap(); + //mFakeWorldData = (HashMap) mStaticFakeWorldData.clone(); + //} + + + //Logger.WARNING("Initialisation of FakeWorld is now complete."); + } + + public FakeBlockPos getBlockAtCoords(int x, int y, int z) { + String S = ""+x+"@"+y+"@"+z; + FakeBlockPos aBlock = mFakeWorldData.get(S); + if (aBlock == null) { + return new FakeBlockPos(x, y, z, Blocks.air, 0); + } + return aBlock; + } + + public void setBlockAtCoords(int x, int y, int z, Block aBlock, int aMeta) { + FakeBlockPos aTempPos = new FakeBlockPos(x, y, z, aBlock, aMeta); + Logger.WARNING("Setting "+x+", "+y+", "+z+" to "+aBlock.getLocalizedName()+":"+aMeta); + mFakeWorldData.put(aTempPos.getLocationString(), aTempPos); + } + + public AutoMap getAllBlocksStoredInFakeWorld(){ + AutoMap aOutput = new AutoMap(); + for (FakeBlockPos aPos : mFakeWorldData.values()) { + if (aPos == null || aPos.getBlockAtPos() == Blocks.air) { + continue; + } + else { + ItemStack aTempStack = ItemUtils.simpleMetaStack(aPos.getBlockAtPos(), aPos.getMetaAtPos(), 1); + if (ItemUtils.checkForInvalidItems(aTempStack)) { + //Logger.WARNING("Output: "+aTempStack.getDisplayName()); + aOutput.put(aTempStack); + } + } + } + return aOutput; + } + + public Block getBlock(int x, int y, int z) { + FakeBlockPos aPos = getBlockAtCoords(x, y, z); + return aPos.getBlockAtPos(); + } + + public boolean isAirBlock(int x, int y, int z) { + Block aBlock = getBlock(x, y, z); + return aBlock == Blocks.air || aBlock.getMaterial() == Material.air; + } + + + + + + + + + + + + + + @Override + public TileEntity getTileEntity(int p_147438_1_, int p_147438_2_, int p_147438_3_) { + return null; + } + + @Override + public int getLightBrightnessForSkyBlocks(int p_72802_1_, int p_72802_2_, int p_72802_3_, int p_72802_4_) { + return 0; + } + + @Override + public int getBlockMetadata(int x, int y, int z) { + return getBlockAtCoords(x, y, z).getMetaAtPos(); + } + + @Override + public int isBlockProvidingPowerTo(int p_72879_1_, int p_72879_2_, int p_72879_3_, int p_72879_4_) { + return 0; + } + + @Override + public BiomeGenBase getBiomeGenForCoords(int p_72807_1_, int p_72807_2_) { + return BiomeGenBase.plains; + } + + @Override + public int getHeight() { + return aWorldHeight; + } + + @Override + public boolean extendedLevelsInChunkCache() { + return false; + } + + @Override + public boolean isSideSolid(int x, int y, int z, ForgeDirection side, boolean _default) { + if (!isAirBlock(x, y, z)) { + return true; + } + return false; + } + + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java new file mode 100644 index 0000000000..2535046792 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FluidGT6.java @@ -0,0 +1,31 @@ +package gtPlusPlus.api.objects.minecraft; + +import gregtech.api.GregTech_API; + +import gtPlusPlus.core.lib.CORE; +import net.minecraftforge.fluids.Fluid; + +public class FluidGT6 extends Fluid implements Runnable +{ + private final short[] mRGBa; + public final String mTextureName; + + public FluidGT6(final String aName, final String aTextureName, final short[] aRGBa) { + super(aName); + this.mRGBa = aRGBa; + this.mTextureName = aTextureName; + if (GregTech_API.sGTBlockIconload != null) { + GregTech_API.sGTBlockIconload.add(this); + } + } + + @Override + public int getColor() { + return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2])); + } + + @Override + public void run() { + this.setIcons(GregTech_API.sBlockIcons.registerIcon(CORE.MODID+ ":" + "fluids/fluid." + this.mTextureName)); + } +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java b/src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java new file mode 100644 index 0000000000..ec13c82ea0 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/FormattedTooltipString.java @@ -0,0 +1,25 @@ +package gtPlusPlus.api.objects.minecraft; + +public class FormattedTooltipString { + + public final String mText; + public final boolean mPrefix; + + public FormattedTooltipString(String aText, boolean aPrefix) { + mText = aText; + mPrefix = aPrefix; + } + + public String getTooltip(Object aTagValue) { + String aTip; + + if (mPrefix) { + aTip = mText+": "+aTagValue.toString(); + } + else { + aTip = ""+aTagValue.toString()+": "+mText; + } + return aTip; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/GenericStack.java b/src/main/java/gtPlusPlus/api/objects/minecraft/GenericStack.java new file mode 100644 index 0000000000..9c1b231961 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/GenericStack.java @@ -0,0 +1,42 @@ +package gtPlusPlus.api.objects.minecraft; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +public class GenericStack { + + private ItemStack mItemStack; + private FluidStack mFluidStack; + + public GenericStack(ItemStack s){ + this.mItemStack = s; + this.mFluidStack = null; + } + + public GenericStack(FluidStack f){ + this.mItemStack = null; + this.mFluidStack = f; + } + + public GenericStack() { + this.mItemStack = null; + this.mFluidStack = null; + } + + public synchronized final FluidStack getFluidStack() { + return mFluidStack; + } + + public synchronized final ItemStack getItemStack() { + return mItemStack; + } + + public synchronized final void setItemStack(ItemStack mItemStack) { + this.mItemStack = mItemStack; + } + + public synchronized final void setFluidStack(FluidStack mFluidStack) { + this.mFluidStack = mFluidStack; + } +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java new file mode 100644 index 0000000000..fa85f23cf3 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ItemPackage.java @@ -0,0 +1,58 @@ +package gtPlusPlus.api.objects.minecraft; + +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.core.handler.COMPAT_HANDLER; + +public abstract class ItemPackage implements RunnableWithInfo { + + public ItemPackage() { + this(false); + } + + public ItemPackage(boolean hasExtraLateRun) { + // Register for late run + COMPAT_HANDLER.mObjectsToRunInPostInit.put(this); + if (hasExtraLateRun) { + COMPAT_HANDLER.mObjectsToRunInOnLoadComplete.put(this); + } + init(); + } + + @Override + public final void run() { + generateRecipes(); + } + + @Override + public final String getInfoData() { + return errorMessage(); + } + + public abstract String errorMessage(); + + public abstract boolean generateRecipes(); + + private final void init() { + items(); + blocks(); + fluids(); + } + + public abstract void items(); + + public abstract void blocks(); + + public abstract void fluids(); + + /** + * Override this to handle GT Recipe map manipulation after they're Baked. + * @param event - the {@link FMLLoadCompleteEvent}. + * @return - Did we do anything? + */ + public boolean onLoadComplete(FMLLoadCompleteEvent event) { + return false; + }; + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ItemStackData.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ItemStackData.java new file mode 100644 index 0000000000..476926826b --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ItemStackData.java @@ -0,0 +1,35 @@ +package gtPlusPlus.api.objects.minecraft; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class ItemStackData { + + protected final Item mItem; + protected final int mDamage; + protected final int mStackSize; + protected final NBTTagCompound mNBT; + protected final String mUniqueDataTag; + + public ItemStackData (ItemStack aStack) { + mItem = aStack.getItem(); + mDamage = aStack.getItemDamage(); + mStackSize = aStack.stackSize; + mNBT = (aStack.getTagCompound() != null ? aStack.getTagCompound() : new NBTTagCompound()); + mUniqueDataTag = ""+Item.getIdFromItem(mItem)+""+mDamage+""+mStackSize+""+mNBT.getId(); + } + + public String getUniqueDataIdentifier() { + return this.mUniqueDataTag; + } + + public ItemStack getStack() { + ItemStack aTemp = ItemUtils.simpleMetaStack(mItem, mDamage, mStackSize); + aTemp.setTagCompound(mNBT); + return aTemp; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java b/src/main/java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java new file mode 100644 index 0000000000..78e925fe04 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/NoConflictGTRecipeMap.java @@ -0,0 +1,123 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.Collection; +import java.util.Iterator; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Recipe; + +import gtPlusPlus.api.objects.data.AutoMap; + +public class NoConflictGTRecipeMap implements Collection { + + private AutoMap mRecipeCache = new AutoMap(); + private final IGregTechTileEntity mMachineType; + + public NoConflictGTRecipeMap () { + this(null); + } + + public NoConflictGTRecipeMap (IGregTechTileEntity tile0) { + this.mMachineType = tile0; + } + public boolean put(GT_Recipe recipe) { + return add(recipe); + } + + public boolean add(GT_Recipe recipe) { + return mRecipeCache.setValue(recipe); + } + + public Collection getRecipeMap() { + return mRecipeCache.values(); + } + + public boolean isMapValidForMachine(IGregTechTileEntity tile) { + return tile == mMachineType; + } + + @Override + public boolean addAll(Collection arg0) { + int a = 0; + for (Object v : arg0) { + if (!this.mRecipeCache.containsValue((GT_Recipe) v)) { + this.mRecipeCache.put((GT_Recipe) v); + a++; + } + } + return a > 0; + } + + @Override + public void clear() { + mRecipeCache.clear(); + } + + @Override + public boolean contains(Object arg0) { + return mRecipeCache.containsValue((GT_Recipe) arg0); + } + + @Override + public boolean containsAll(Collection arg0) { + int a = 0; + for (Object v : arg0) { + if (this.mRecipeCache.containsValue((GT_Recipe) v)) { + a++; + } + } + return a == arg0.size(); + } + + @Override + public boolean isEmpty() { + return mRecipeCache.isEmpty(); + } + + @Override + public Iterator iterator() { + return mRecipeCache.iterator(); + } + + @Override + public boolean remove(Object arg0) { + return mRecipeCache.remove((GT_Recipe) arg0); + } + + @Override + public boolean removeAll(Collection arg0) { + int a = 0; + for (Object v : arg0) { + if (this.mRecipeCache.containsValue((GT_Recipe) v)) { + this.mRecipeCache.remove((GT_Recipe) v); + a++; + } + } + return a > 0; + } + + @Override + public boolean retainAll(Collection arg0) { + int mStartSize = this.mRecipeCache.size(); + this.mRecipeCache = (AutoMap) arg0; + int mEndsize = this.mRecipeCache.size(); + return mStartSize != mEndsize; + } + + @Override + public int size() { + return this.mRecipeCache.size(); + } + + @Override + public Object[] toArray() { + return this.mRecipeCache.toArray(); + } + + @Override + public T[] toArray(T[] arg0) { + return (T[]) this.mRecipeCache.toArray(); + } + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java b/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java new file mode 100644 index 0000000000..7c418b5a77 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/SafeTexture.java @@ -0,0 +1,64 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.HashMap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gtPlusPlus.core.util.Utils; +import net.minecraft.util.IIcon; + +/** + * A Server Side safe object that can hold {@link IIcon}s. + * @author Alkalus + * + */ +public class SafeTexture implements Runnable { + + @SideOnly(Side.CLIENT) + private static final HashMap mHashToIconCache = new HashMap(); + + @SideOnly(Side.CLIENT) + private static final HashMap mPathToHashCash = new HashMap(); + + private static final HashMap mTextureObjectCache = new HashMap(); + + private final int mHash; + + private final String mTextureName; + + private final static String getKey(String aTexPath) { + String aNameKey = Utils.sanitizeString(aTexPath); + aNameKey = aNameKey.replace('/', ' '); + aNameKey = aNameKey.toLowerCase(); + return aNameKey; + } + + public static SafeTexture register(String aTexturePath) { + String aNameKey = getKey(aTexturePath); + SafeTexture g = mTextureObjectCache.get(aNameKey); + if (g == null) { + g = new SafeTexture(aTexturePath); + mTextureObjectCache.put(aNameKey, g); + mPathToHashCash.put(aTexturePath, aTexturePath.hashCode()); + } + return g; + } + + private SafeTexture(String aTexturePath) { + mTextureName = aTexturePath; + mHash = getKey(aTexturePath).hashCode(); + GregTech_API.sGTBlockIconload.add(this); + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon() { + return mHashToIconCache.get(mHash); + } + + @Override + public void run() { + mHashToIconCache.put(getKey(mTextureName).hashCode(), GregTech_API.sBlockIcons.registerIcon(mTextureName)); + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java new file mode 100644 index 0000000000..c0e9b20c54 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java @@ -0,0 +1,250 @@ +package gtPlusPlus.api.objects.minecraft; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.ShapedOreRecipe; + +public class ShapedRecipe { + + private final static String CHARS = "abcdefghijklmnop"; + public ShapedOreRecipe mRecipe; + + ItemStack[] mBlackList = null; + + public ShapedRecipe( + Object aInput1, Object aInput2, Object aInput3, + Object aInput4, Object aInput5, Object aInput6, + Object aInput7, Object aInput8, Object aInput9, + ItemStack aOutput) { + + this(new Object[] {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, aOutput); + + } + + public ShapedRecipe(Object[] aInputs, ItemStack aOutput) { + String aGridWhole = ""; + String aGrid[] = new String[3]; + char[] aChar = new char[9]; + String[] aLoggingInfo = new String[9]; + + if (mBlackList == null) { + mBlackList = new ItemStack[] {}; + } + + //Just to be safe + try { + int xSlot = 0; + int xNull = 0; + for (Object u : aInputs) { + String mInfo = ""; + if (u instanceof String) { + mInfo = (String) u; + Logger.RECIPE("Input slot "+xSlot+++" contains "+mInfo); + } + else if (u instanceof ItemStack || u instanceof Item) { + if (u instanceof Item) { + u = ItemUtils.getSimpleStack((Item) u); + } + mInfo = ((ItemStack) u).getDisplayName(); + Logger.RECIPE("Input slot "+xSlot+++" contains "+mInfo); + } + else if (u == null) { + xNull++; + } + } + Logger.RECIPE("Found "+xNull+" null inputs."); + //Check if the output is invalid + if (aOutput != null && xNull < 9) { + + for (ItemStack q : mBlackList) { + if (q != null) { + if (q.isItemEqual(aOutput)) { + Logger.RECIPE("Found recipe Alkalus is Debugging."); + } + } + } + + Object[] mVarags2 = null; + Logger.RECIPE("Generating Shaped Crafting Recipe for "+aOutput.getDisplayName()); + + if (aInputs.length < 9 || aInputs.length > 9) { + Logger.RECIPE("[Fix] Recipe for "+aOutput.getDisplayName()+" has incorrect number of inputs. Size: "+aInputs.length+"."); + //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(1)); + //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(2)); + //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(3)); + //Logger.RECIPE("[1234abcd] Reciped exists at location: "+ReflectionUtils.getMethodName(4)); + //Logger.RECIPE("Reciped exists at location: "+ReflectionUtils.getMethodName(1)); + } + + + //Build a Pair for each slot + AutoMap> aRecipePairs = new AutoMap>(); + int aCharSlot = 0; + int aMemSlot = 0; + int aInfoSlot = 0; + for (Object stack : aInputs) { + if (stack != null) { + String mInfo = ""; + if (stack instanceof String) { + mInfo = (String) stack; + } + else if (stack instanceof ItemStack || stack instanceof Item) { + if (stack instanceof Item) { + stack = ItemUtils.getSimpleStack((Item) stack); + } + mInfo = ((ItemStack) stack).getDisplayName(); + } + aRecipePairs.put(new Pair(CHARS.charAt(aCharSlot), stack)); + Logger.RECIPE("Storing '"+CHARS.charAt(aCharSlot)+"' with an object of type "+stack.getClass().getSimpleName()+" and a value of "+mInfo); + aChar[aMemSlot++] = CHARS.charAt(aCharSlot); + aCharSlot++; + aLoggingInfo[aInfoSlot++] = mInfo; + } + else { + aRecipePairs.put(new Pair(' ', (ItemStack) null)); + Logger.RECIPE("Storing ' ' with an object of type null"); + aChar[aMemSlot++] = ' '; + aLoggingInfo[aInfoSlot++] = "Empty"; + } + } + + Logger.RECIPE(aRecipePairs.size()+" Char|Object pairs registered for recipe."); + //If we have enough valid slots, iterate them and build a String which represents the entire grid. + //If this String is the correct length, we will split it into thirds and build the grid String array. + if (aRecipePairs.size() == 9) { + + for (Pair h : aRecipePairs) { + if (h.getKey() != null) { + aGridWhole += String.valueOf(h.getKey()); + Logger.RECIPE("Adding '"+String.valueOf(h.getKey())+"' to aGridWhole."); + } + } + + Logger.RECIPE("aGridWhole: "+aGridWhole+" | size: "+aGridWhole.length()); + + //Build crafting grid + if (aGridWhole.length() == 9) { + Logger.RECIPE("aGridWhole size == 9"); + aGrid[0] = ""+aGridWhole.charAt(0)+aGridWhole.charAt(1)+aGridWhole.charAt(2); + aGrid[1] = ""+aGridWhole.charAt(3)+aGridWhole.charAt(4)+aGridWhole.charAt(5); + aGrid[2] = ""+aGridWhole.charAt(6)+aGridWhole.charAt(7)+aGridWhole.charAt(8); + } + else { + Logger.RECIPE("[Fix] Grid length for recipe outputting "+aOutput.getDisplayName()+" is not 9."); + } + + //Rebuild the Map without spaces + aRecipePairs.clear(); + aCharSlot = 0; + + //The amount of spaces in the Varags that the Shape strings takes. + //Currently they are inserted as a single array into index 0. + final int KEY_COUNTER = 1; + + int counter = KEY_COUNTER; + for (Object stack : aInputs) { + if (stack != null) { + String mInfo = ""; + if (stack instanceof String) { + mInfo = (String) stack; + } + else if (stack instanceof ItemStack || stack instanceof Item) { + if (stack instanceof Item) { + stack = ItemUtils.getSimpleStack((Item) stack); + } + mInfo = ((ItemStack) stack).getDisplayName(); + } + aRecipePairs.put(new Pair(CHARS.charAt(aCharSlot), stack)); + Logger.RECIPE("Registering Pair of '"+CHARS.charAt(aCharSlot)+"' and a "+stack.getClass().getSimpleName()+" object. Object has a value of "+mInfo); + aCharSlot++; + counter++; + } + } + + Logger.RECIPE("Counter started at "+KEY_COUNTER+", counter is now at "+counter+". Trying to create Varag array with a size of "+(KEY_COUNTER+(counter-KEY_COUNTER)*2)); + //Counter started at 3, counter is now at 4. Trying to create Varag array with a size of 2 + + //Register the shaped grid straight to the varags + mVarags2 = new Object[(KEY_COUNTER+(counter-KEY_COUNTER)*2)]; + /*mVarags2[0] = aGrid[0]; + mVarags2[1] = aGrid[1]; + mVarags2[2] = aGrid[2];*/ + mVarags2[0] = aGrid; + + //Add Each Char, then Item to the varags, sequentially. + int counter2 = KEY_COUNTER; + for (Pair r : aRecipePairs) { + char c = r.getKey(); + Object o = r.getValue(); + + if (o instanceof ItemStack || o instanceof Item) { + if (o instanceof Item) { + o = ItemUtils.getSimpleStack((Item) o); + } + o = ((ItemStack) o).copy(); + } + + mVarags2[counter2] = (char) c; + mVarags2[counter2+1] = o; + counter2 += 2; + } + + Logger.RECIPE("Recipe Summary"); + Logger.RECIPE("+ = + = + = +"); + Logger.RECIPE("= "+aChar[0]+" = "+aChar[1]+" = "+aChar[2]+" ="); + Logger.RECIPE("+ = + = + = +"); + Logger.RECIPE("= "+aChar[3]+" = "+aChar[4]+" = "+aChar[5]+" ="); + Logger.RECIPE("+ = + = + = +"); + Logger.RECIPE("= "+aChar[6]+" = "+aChar[7]+" = "+aChar[8]+" ="); + Logger.RECIPE("+ = + = + = +"); + for (int r=0;r<9;r++) { + if (aChar[r] != ' ') { + Logger.RECIPE(""+aChar[r]+" : "+aLoggingInfo[r]); + } + } + + } + else { + Logger.RECIPE("[Fix] Recipe for "+aOutput.getDisplayName()+" contains a strange number of inputs."); + } + + //Try set the recipe for this object. + ShapedOreRecipe testRecipe = null; + try { + testRecipe = new ShapedOreRecipe(aOutput, mVarags2); + } + catch (Throwable t) { + Logger.RECIPE("[Fix][0] Error thrown when making a ShapedOreRecipe object."); + t.printStackTrace(); + } + if (testRecipe == null) { + this.mRecipe = null; + Logger.RECIPE("[Fix] Failed to generate a shaped recipe."); + } + else { + this.mRecipe = testRecipe; + Logger.RECIPE("Generated a shaped recipe successfully."); + } + } + + //Output was not valid + else { + this.mRecipe = null; + Logger.RECIPE("[Fix] Failed to generate a shaped recipe. Output was not valid."); + } + + + } + catch(Throwable t) { + this.mRecipe = null; + Logger.RECIPE("[Fix][1] Error thrown when making a ShapedOreRecipe object."); + t.printStackTrace(); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/TexturePackage.java b/src/main/java/gtPlusPlus/api/objects/minecraft/TexturePackage.java new file mode 100644 index 0000000000..e610f8fdf0 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/TexturePackage.java @@ -0,0 +1,55 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.LinkedHashMap; +import java.util.Set; + +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraft.util.IIcon; + +public class TexturePackage { + + private AutoMap mAnimationArray = new AutoMap(); + + public IIcon getFrame(int aFrame) { + if (aFrame < 0 || aFrame >= mAnimationArray.size()) { + return mAnimationArray.get(0); + } + return mAnimationArray.get(aFrame); + } + + public boolean addFrame(IIcon aFrame) { + if (aFrame != null) { + return mAnimationArray.add(aFrame); + } + return false; + } + + public boolean addFrames(AutoMap aFrames) { + for (IIcon h : aFrames) { + if (!addFrame(h)) { + return false; + } + } + return true; + } + + public boolean addFrames(LinkedHashMap aFrames) { + for (IIcon h : aFrames.values()) { + if (!addFrame(h)) { + return false; + } + } + return true; + } + + public boolean addFrames(Set aFrames) { + for (IIcon h : aFrames) { + if (!addFrame(h)) { + return false; + } + } + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java b/src/main/java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java new file mode 100644 index 0000000000..0ff6e112ac --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/ThreadPooCollector.java @@ -0,0 +1,111 @@ +package gtPlusPlus.api.objects.minecraft; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.GTplusplus.INIT_PHASE; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; +import gtPlusPlus.core.util.Utils; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class ThreadPooCollector extends Thread { + + public boolean canRun = true; + public boolean isRunning = false; + + private static final long INIT_TIME; + private static long internalTickCounter = 0; + + private static final ThreadPooCollector mThread; + private static final HashMap> mPooCollectors = new LinkedHashMap>(); + + + static { + mThread = new ThreadPooCollector(); + INIT_TIME = (System.currentTimeMillis()); + } + + public ThreadPooCollector() { + setName("gtpp.handler.poop"); + start(); + } + + public static ThreadPooCollector getInstance() { + return mThread; + } + + public static void addTask(TileEntityPooCollector aTile) { + BlockPos aTempPos = new BlockPos(aTile); + mPooCollectors.put(aTempPos.getUniqueIdentifier(), new Pair(aTempPos, aTile)); + } + + public static void stopThread() { + mThread.canRun = false; + } + + + @Override + public void run() { + + if (!isRunning) { + isRunning = true; + } + else { + return; + } + + while (canRun) { + if (mPooCollectors.isEmpty() || GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED) { + continue; + } else { + internalTickCounter = Utils.getTicksFromSeconds( + Utils.getSecondsFromMillis(Utils.getMillisSince(INIT_TIME, System.currentTimeMillis()))); + if (internalTickCounter % 100 == 0) { + for (Pair pair : mPooCollectors.values()) { + if (pair != null) { + BlockPos p = pair.getKey(); + if (p != null) { + if (p.world != null) { + World w = p.world; + if (w == null) { + continue; + } + Chunk c = w.getChunkFromBlockCoords(p.xPos, p.zPos); + if (c != null) { + if (c.isChunkLoaded) { + int startX = p.xPos - 2; + int startY = p.yPos; + int startZ = p.zPos - 2; + int endX = p.xPos + 3; + int endY = p.yPos + 5; + int endZ = p.zPos + 3; + AxisAlignedBB box = AxisAlignedBB.getBoundingBox(startX, startY, startZ, + endX, endY, endZ); + if (box != null) { + @SuppressWarnings("unchecked") + List animals = w.getEntitiesWithinAABB(EntityAnimal.class, box); + if (animals != null && !animals.isEmpty()) { + pair.getValue().onPostTick(animals); + } + } else { + continue; + } + } + } + } + } + } + } + } + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java new file mode 100644 index 0000000000..78341db7a1 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoEUBonusMultiBehaviour.java @@ -0,0 +1,27 @@ +package gtPlusPlus.api.objects.minecraft.multi; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.item.ItemStack; + +public class NoEUBonusMultiBehaviour extends SpecialMultiBehaviour { + + public NoEUBonusMultiBehaviour() { + // Used by other mods which may wish to not obtain bonus outputs on their Sifting or Maceration recipes. + } + + @Override + public ItemStack getTriggerItem() { + return GregtechItemList.Chip_MultiNerf_NoEuBonus.get(1); + } + + @Override + public String getTriggerItemTooltip() { + return "Prevents EU discounts on GT++ multiblocks when used"; + } + + @Override + public int getEUPercent() { + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java new file mode 100644 index 0000000000..8137f2573d --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoOutputBonusMultiBehaviour.java @@ -0,0 +1,27 @@ +package gtPlusPlus.api.objects.minecraft.multi; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.item.ItemStack; + +public class NoOutputBonusMultiBehaviour extends SpecialMultiBehaviour { + + public NoOutputBonusMultiBehaviour() { + // Used by other mods which may wish to not obtain bonus outputs on their Sifting or Maceration recipes. + } + + @Override + public ItemStack getTriggerItem() { + return GregtechItemList.Chip_MultiNerf_NoOutputBonus.get(1); + } + + @Override + public String getTriggerItemTooltip() { + return "Prevents bonus output % on GT++ multiblocks when used"; + } + + @Override + public int getOutputChanceRoll() { + return 10000; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java new file mode 100644 index 0000000000..fe7a90960d --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/NoSpeedBonusMultiBehaviour.java @@ -0,0 +1,27 @@ +package gtPlusPlus.api.objects.minecraft.multi; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.item.ItemStack; + +public class NoSpeedBonusMultiBehaviour extends SpecialMultiBehaviour { + + public NoSpeedBonusMultiBehaviour() { + // Used by other mods which may wish to not obtain bonus outputs on their Sifting or Maceration recipes. + } + + @Override + public ItemStack getTriggerItem() { + return GregtechItemList.Chip_MultiNerf_NoSpeedBonus.get(1); + } + + @Override + public String getTriggerItemTooltip() { + return "Prevents speed bonuses on GT++ multiblocks when used"; + } + + @Override + public int getSpeedBonusPercent() { + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java new file mode 100644 index 0000000000..e562ccc40b --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/multi/SpecialMultiBehaviour.java @@ -0,0 +1,44 @@ +package gtPlusPlus.api.objects.minecraft.multi; + +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +/** + * Extend this class to implement custom behaviour for multiblocks. + * The Trigger item when in a special slot or input bus, will cause the multiblock to behave as specified. + * Not overriding a method here will cause the default values to be used. + * @author Alkalus + * + */ +public abstract class SpecialMultiBehaviour { + + private final int mMaxParallelRecipes = Short.MIN_VALUE; + private final int mEUPercent = Short.MIN_VALUE; + private final int mSpeedBonusPercent = Short.MIN_VALUE; + private final int mOutputChanceRoll = Short.MIN_VALUE; + + public abstract ItemStack getTriggerItem(); + + public abstract String getTriggerItemTooltip(); + + public int getMaxParallelRecipes() { + return this.mMaxParallelRecipes; + } + + public int getEUPercent() { + return this.mEUPercent; + } + + public int getSpeedBonusPercent() { + return this.mSpeedBonusPercent; + } + + public int getOutputChanceRoll() { + return this.mOutputChanceRoll; + } + + public final boolean isTriggerItem(ItemStack aToMatch) { + return GT_Utility.areStacksEqual(getTriggerItem(), aToMatch, false); + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java b/src/main/java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java new file mode 100644 index 0000000000..b2dc984456 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/random/CSPRNG_DO_NOT_USE.java @@ -0,0 +1,271 @@ +/* + * Copyright 2005, Nick Galbreath -- nickg [at] modp [dot] com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the modp.com nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This is the standard "new" BSD license: + * http://www.opensource.org/licenses/bsd-license.php + */ + +package gtPlusPlus.api.objects.random; +import java.math.BigInteger; +import java.security.SecureRandom; +import java.util.Random; + +import gtPlusPlus.api.interfaces.IRandomGenerator; +import gtPlusPlus.core.util.Utils; + +/** + * The Blum-Blum-Shub random number generator. + * + *

+ * The Blum-Blum-Shub is a "cryptographically secure" random number + * generator. It has been proven that predicting the ouput + * is equivalent to factoring n, a large integer generated + * from two prime numbers. + *

+ * + *

+ * The Algorithm: + *

+ *
    + *
  1. + * (setup) generate two secret prime numbers p, q such that + * pq, p ≡ 3 mod 4, q ≡ 3 mod 4. + *
  2. + *
  3. (setup) compute n = pq. n can be re-used, but + * p, and q are secret and should be disposed of.
  4. + *
  5. Generate a (secure) random seed s in the range [1, n -1] + * such that gcd(s, n) = 1. + *
  6. Compute x = s2 mod n
  7. + *
  8. Compute a single random bit with: + *
      + *
    1. x = x2 mod n
    2. + *
    3. return Least-Significant-Bit(x) (i.e. x & 1)
    4. + *
    + * Repeat as necessary. + *
  9. + *
+ * + *

+ * The code originally appeared in Cryptography for + * Internet and Database Applications , Chapter 4, pages 174-177 + *

+ *

+ * More details are in the Handbook of Applied Cryptography, + * Section 5.5.2 + *

+ * + * @author Nick Galbreath -- nickg [at] modp [dot] com + * @version 3 -- 06-Jul-2005 + * + */ +public class CSPRNG_DO_NOT_USE extends Random implements IRandomGenerator { + + // pre-compute a few values + private static final BigInteger two = BigInteger.valueOf(2L); + + private static final BigInteger three = BigInteger.valueOf(3L); + + private static final BigInteger four = BigInteger.valueOf(4L); + + /** + * main parameter + */ + private BigInteger n; + + private BigInteger state; + + /** + * Generate appropriate prime number for use in Blum-Blum-Shub. + * + * This generates the appropriate primes (p = 3 mod 4) needed to compute the + * "n-value" for Blum-Blum-Shub. + * + * @param bits Number of bits in prime + * @param rand A source of randomness + */ + private static BigInteger getPrime(int bits, Random rand) { + BigInteger p; + while (true) { + p = new BigInteger(bits, 100, rand); + if (p.mod(four).equals(three)) + break; + } + return p; + } + + /** + * This generates the "n value" -- the multiplication of two equally sized + * random prime numbers -- for use in the Blum-Blum-Shub algorithm. + * + * @param bits + * The number of bits of security + * @param rand + * A random instance to aid in generating primes + * @return A BigInteger, the n. + */ + public static BigInteger generateN(int bits, Random rand) { + BigInteger p = getPrime(bits/2, rand); + BigInteger q = getPrime(bits/2, rand); + + // make sure p != q (almost always true, but just in case, check) + while (p.equals(q)) { + q = getPrime(bits, rand); + } + return p.multiply(q); + } + + /** + * Constructor, specifing bits for n + * + * @param bits number of bits + */ + public CSPRNG_DO_NOT_USE(int bits) { + this(bits, new Random()); + } + + /** + * Constructor, generates prime and seed + * + * @param bits + * @param rand + */ + public CSPRNG_DO_NOT_USE(int bits, Random rand) { + this(generateN(bits, rand)); + } + + /** + * A constructor to specify the "n-value" to the Blum-Blum-Shub algorithm. + * The inital seed is computed using Java's internal "true" random number + * generator. + * + * @param n + * The n-value. + */ + public CSPRNG_DO_NOT_USE(BigInteger n) { + this(n, SecureRandom.getSeed(n.bitLength() / 8)); + } + + /** + * A constructor to specify both the n-value and the seed to the + * Blum-Blum-Shub algorithm. + * + * @param n + * The n-value using a BigInteger + * @param seed + * The seed value using a byte[] array. + */ + public CSPRNG_DO_NOT_USE(BigInteger n, byte[] seed) { + this.n = n; + setSeed(seed); + } + + /** + * Sets or resets the seed value and internal state + * + * @param seedBytes + * The new seed. + */ + public void setSeed(byte[] seedBytes) { + // ADD: use hardwired default for n + BigInteger seed = new BigInteger(1, seedBytes); + state = seed.mod(n); + } + + /** + * Returns up to numBit random bits + * + * @return int + */ + @Override + public int next(int numBits) { + // TODO: find out how many LSB one can extract per cycle. + // it is more than one. + int result = 0; + for (int i = numBits; i != 0; --i) { + state = state.modPow(two, n); + result = (result << 1) | (state.testBit(0) == true ? 1 : 0); + } + return result; + } + + + public static CSPRNG_DO_NOT_USE generate(){ + return generate(512); + } + + /** + * @return CSPRNG_DO_NOT_USE + * @Author Draknyte1/Alkalus + */ + public static CSPRNG_DO_NOT_USE generate(int bitsize){ + // First use the internal, stock "true" random number + // generator to get a "true random seed" + SecureRandom r = Utils.generateSecureRandom(); + r.nextInt(); // need to do something for SR to be triggered. + // Use this seed to generate a n-value for Blum-Blum-Shub + // This value can be re-used if desired. + BigInteger nval = CSPRNG_DO_NOT_USE.generateN(bitsize, r); + // now get a seed + byte[] seed = new byte[bitsize/8]; + r.nextBytes(seed); + // now create an instance of BlumBlumShub + CSPRNG_DO_NOT_USE bbs = new CSPRNG_DO_NOT_USE(nval, seed); + return bbs; + } + + + /** + * @return CSPRNG_DO_NOT_USE + * @Author Draknyte1/Alkalus + */ + public static CSPRNG_DO_NOT_USE generate(Random aRandom){ + return generate(512, aRandom); + } + + /** + * @return CSPRNG_DO_NOT_USE + * @Author Draknyte1/Alkalus + */ + public static CSPRNG_DO_NOT_USE generate(int aBitSize, Random aRandom){ + // First use the internal, stock "true" random number + // generator to get a "true random seed" + SecureRandom r = Utils.generateSecureRandom(); + r.nextInt(); // need to do something for SR to be triggered. + // Use this seed to generate a n-value for Blum-Blum-Shub + // This value can be re-used if desired. + int bitsize = aBitSize; + // now create an instance of BlumBlumShub + // do everything almost automatically + CSPRNG_DO_NOT_USE bbs = new CSPRNG_DO_NOT_USE(bitsize, aRandom); + return bbs; + } + +} diff --git a/src/main/java/gtPlusPlus/api/objects/random/UUIDGenerator.java b/src/main/java/gtPlusPlus/api/objects/random/UUIDGenerator.java new file mode 100644 index 0000000000..fec92368f8 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/random/UUIDGenerator.java @@ -0,0 +1,449 @@ +package gtPlusPlus.api.objects.random; + +import java.io.IOException; +import java.net.InetAddress; +import java.util.Random; +import java.util.UUID; + +/** + * + * Implement modified version of Apache's OpenJPA UUID generator. + * This UUID generator is paired with a Blum-Blum-Shub random number generator + * which in itself is seeded by custom SecureRandom. + * + * The UUID generator class has been converted from a static factory to an instanced factory. + * + */ + +//========================================= APACHE BLOCK ========================================= + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * UUID value generator. Type 1 generator is based on the time-based generator + * in the Apache Commons Id project: http://jakarta.apache.org/commons/sandbox + * /id/uuid.html The type 4 generator uses the standard Java UUID generator. + * + * The type 1 code has been vastly simplified and modified to replace the + * ethernet address of the host machine with the IP, since we do not want to + * require native libs and Java cannot access the MAC address directly. + * + * In spirit, implements the IETF UUID draft specification, found here:
+ * http://www1.ics.uci.edu/~ejw/authoring/uuid-guid/draft-leach-uuids-guids-01 + * .txt + * + * @author Abe White, Kevin Sutter + * @since 0.3.3 + */ +public class UUIDGenerator { + + // supported UUID types + public static final int TYPE1 = 1; + public static final int TYPE4 = 4; + // indexes within the uuid array for certain boundaries + private static final byte IDX_TIME_HI = 6; + private static final byte IDX_TYPE = 6; // multiplexed + private static final byte IDX_TIME_MID = 4; + private static final byte IDX_TIME_LO = 0; + private static final byte IDX_TIME_SEQ = 8; + private static final byte IDX_VARIATION = 8; // multiplexed + // indexes and lengths within the timestamp for certain boundaries + private static final byte TS_TIME_LO_IDX = 4; + private static final byte TS_TIME_LO_LEN = 4; + private static final byte TS_TIME_MID_IDX = 2; + private static final byte TS_TIME_MID_LEN = 2; + private static final byte TS_TIME_HI_IDX = 0; + private static final byte TS_TIME_HI_LEN = 2; + // offset to move from 1/1/1970, which is 0-time for Java, to gregorian + // 0-time 10/15/1582, and multiplier to go from 100nsec to msec units + private static final long GREG_OFFSET = 0xB1D069B5400L; + private static final long MILLI_MULT = 10000L; + // type of UUID -- time based + private final static byte TYPE_TIME_BASED = 0x10; + // random number generator used to reduce conflicts with other JVMs, and + // hasher for strings. + private Random RANDOM; + // 4-byte IP address + 2 random bytes to compensate for the fact that + // the MAC address is usually 6 bytes + private byte[] IP; + // counter is initialized to 0 and is incremented for each uuid request + // within the same timestamp window. + private int _counter; + // current timestamp (used to detect multiple uuid requests within same + // timestamp) + private long _currentMillis; + // last used millis time, and a semi-random sequence that gets reset + // when it overflows + private long _lastMillis = 0L; + private static final int MAX_14BIT = 0x3FFF; + private short _seq = 0; + private boolean type1Initialized = false; /* + * Initializer for type 1 UUIDs. Creates random generator and genenerates + * the node portion of the UUID using the IP address. + */ + private synchronized void initializeForType1() { + if (type1Initialized == true) { + return; + } + // note that secure random is very slow the first time + // it is used; consider switching to a standard random + RANDOM = CSPRNG_DO_NOT_USE.generate(); + _seq = (short) RANDOM.nextInt(MAX_14BIT); + + byte[] ip = null; + try { + ip = InetAddress.getLocalHost().getAddress(); + } catch (IOException ioe) { + throw new RuntimeException(ioe); + } + IP = new byte[6]; + RANDOM.nextBytes(IP); + //OPENJPA-2055: account for the fact that 'getAddress' + //may return an IPv6 address which is 16 bytes wide. + for( int i = 0 ; i < ip.length; ++i ) { + IP[2+(i%4)] ^= ip[i]; + } + type1Initialized = true; + } + /** + * Return a unique UUID value. + */ + public byte[] next(int type) { + if (type == TYPE4) { + return createType4(); + } + return createType1(); + } + /* + * Creates a type 1 UUID + */ + public byte[] createType1() { + if (type1Initialized == false) { + initializeForType1(); + } + // set ip addr + byte[] uuid = new byte[16]; + System.arraycopy(IP, 0, uuid, 10, IP.length); + // Set time info. Have to do this processing within a synchronized + // block because of the statics... + long now = 0; + synchronized (UUIDGenerator.class) { + // Get the time to use for this uuid. This method has the side + // effect of modifying the clock sequence, as well. + now = getTime(); + // Insert the resulting clock sequence into the uuid + uuid[IDX_TIME_SEQ] = (byte) ((_seq & 0x3F00) >>> 8); + uuid[IDX_VARIATION] |= 0x80; + uuid[IDX_TIME_SEQ+1] = (byte) (_seq & 0xFF); + } + // have to break up time because bytes are spread through uuid + byte[] timeBytes = Bytes.toBytes(now); + // Copy time low + System.arraycopy(timeBytes, TS_TIME_LO_IDX, uuid, IDX_TIME_LO, + TS_TIME_LO_LEN); + // Copy time mid + System.arraycopy(timeBytes, TS_TIME_MID_IDX, uuid, IDX_TIME_MID, + TS_TIME_MID_LEN); + // Copy time hi + System.arraycopy(timeBytes, TS_TIME_HI_IDX, uuid, IDX_TIME_HI, + TS_TIME_HI_LEN); + //Set version (time-based) + uuid[IDX_TYPE] |= TYPE_TIME_BASED; // 0001 0000 + return uuid; + } + /* + * Creates a type 4 UUID + */ + private byte[] createType4() { + UUID type4 = UUID.randomUUID(); + byte[] uuid = new byte[16]; + longToBytes(type4.getMostSignificantBits(), uuid, 0); + longToBytes(type4.getLeastSignificantBits(), uuid, 8); + return uuid; + } + /* + * Converts a long to byte values, setting them in a byte array + * at a given starting position. + */ + private void longToBytes(long longVal, byte[] buf, int sPos) { + sPos += 7; + for(int i = 0; i < 8; i++) + buf[sPos-i] = (byte)(longVal >>> (i * 8)); + } + + /** + * Return the next unique uuid value as a 16-character string. + */ + public String nextString(int type) { + byte[] bytes = next(type); + try { + return new String(bytes, "ISO-8859-1"); + } catch (Exception e) { + return new String(bytes); + } + } + /** + * Return the next unique uuid value as a 32-character hex string. + */ + public String nextHex(int type) { + return Base16Encoder.encode(next(type)); + } + /** + * Get the timestamp to be used for this uuid. Must be called from + * a synchronized block. + * + * @return long timestamp + */ + // package-visibility for testing + private long getTime() { + if (RANDOM == null) + initializeForType1(); + long newTime = getUUIDTime(); + if (newTime <= _lastMillis) { + incrementSequence(); + newTime = getUUIDTime(); + } + _lastMillis = newTime; + return newTime; + } + /** + * Gets the appropriately modified timestamep for the UUID. Must be called + * from a synchronized block. + * + * @return long timestamp in 100ns intervals since the Gregorian change + * offset + */ + private long getUUIDTime() { + if (_currentMillis != System.currentTimeMillis()) { + _currentMillis = System.currentTimeMillis(); + _counter = 0; // reset counter + } + // check to see if we have created too many uuid's for this timestamp + if (_counter + 1 >= MILLI_MULT) { + // Original algorithm threw exception. Seemed like overkill. + // Let's just increment the timestamp instead and start over... + _currentMillis++; + _counter = 0; + } + // calculate time as current millis plus offset times 100 ns ticks + long currentTime = (_currentMillis + GREG_OFFSET) * MILLI_MULT; + // return the uuid time plus the artificial tick counter incremented + return currentTime + _counter++; + } + /** + * Increments the clock sequence for this uuid. Must be called from a + * synchronized block. + */ + private void incrementSequence() { + // increment, but if it's greater than its 14-bits, reset it + if (++_seq > MAX_14BIT) { + _seq = (short) RANDOM.nextInt(MAX_14BIT); // semi-random + } + } + + //Add Dependant classes internally + + /** + * This class came from the Apache Commons Id sandbox project in support + * of the UUIDGenerator implementation. + * + *

Static methods for managing byte arrays (all methods follow Big + * Endian order where most significant bits are in front).

+ */ + public static final class Bytes { + /** + *

Hide constructor in utility class.

+ */ + private Bytes() { + } + /** + * Appends two bytes array into one. + * + * @param a A byte[]. + * @param b A byte[]. + * @return A byte[]. + */ + public static byte[] append(byte[] a, byte[] b) { + byte[] z = new byte[a.length + b.length]; + System.arraycopy(a, 0, z, 0, a.length); + System.arraycopy(b, 0, z, a.length, b.length); + return z; + } + /** + * Returns a 8-byte array built from a long. + * + * @param n The number to convert. + * @return A byte[]. + */ + public static byte[] toBytes(long n) { + return toBytes(n, new byte[8]); + } + /** + * Build a 8-byte array from a long. No check is performed on the + * array length. + * + * @param n The number to convert. + * @param b The array to fill. + * @return A byte[]. + */ + public static byte[] toBytes(long n, byte[] b) { + b[7] = (byte) (n); + n >>>= 8; + b[6] = (byte) (n); + n >>>= 8; + b[5] = (byte) (n); + n >>>= 8; + b[4] = (byte) (n); + n >>>= 8; + b[3] = (byte) (n); + n >>>= 8; + b[2] = (byte) (n); + n >>>= 8; + b[1] = (byte) (n); + n >>>= 8; + b[0] = (byte) (n); + + return b; + } + /** + * Build a long from first 8 bytes of the array. + * + * @param b The byte[] to convert. + * @return A long. + */ + public static long toLong(byte[] b) { + return ((((long) b[7]) & 0xFF) + + ((((long) b[6]) & 0xFF) << 8) + + ((((long) b[5]) & 0xFF) << 16) + + ((((long) b[4]) & 0xFF) << 24) + + ((((long) b[3]) & 0xFF) << 32) + + ((((long) b[2]) & 0xFF) << 40) + + ((((long) b[1]) & 0xFF) << 48) + + ((((long) b[0]) & 0xFF) << 56)); + } + /** + * Compares two byte arrays for equality. + * + * @param a A byte[]. + * @param b A byte[]. + * @return True if the arrays have identical contents. + */ + public static boolean areEqual(byte[] a, byte[] b) { + int aLength = a.length; + if (aLength != b.length) { + return false; + } + for (int i = 0; i < aLength; i++) { + if (a[i] != b[i]) { + return false; + } + } + return true; + } + /** + *

Compares two byte arrays as specified by Comparable. + * + * @param lhs - left hand value in the comparison operation. + * @param rhs - right hand value in the comparison operation. + * @return a negative integer, zero, or a positive integer as + * lhs is less than, equal to, or greater than + * rhs. + */ + public static int compareTo(byte[] lhs, byte[] rhs) { + if (lhs == rhs) { + return 0; + } + if (lhs == null) { + return -1; + } + if (rhs == null) { + return +1; + } + if (lhs.length != rhs.length) { + return ((lhs.length < rhs.length) ? -1 : +1); + } + for (int i = 0; i < lhs.length; i++) { + if (lhs[i] < rhs[i]) { + return -1; + } else if (lhs[i] > rhs[i]) { + return 1; + } + } + return 0; + } + /** + * Build a short from first 2 bytes of the array. + * + * @param b The byte[] to convert. + * @return A short. + */ + public static short toShort(byte[] b) { + return (short) ((b[1] & 0xFF) + ((b[0] & 0xFF) << 8)); + } + } + /** + * Base 16 encoder. + * + * @author Marc Prud'hommeaux + */ + public static final class Base16Encoder { + + private final static char[] HEX = new char[]{ + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + /** + * Convert bytes to a base16 string. + */ + public static String encode(byte[] byteArray) { + StringBuilder hexBuffer = new StringBuilder(byteArray.length * 2); + for (int i = 0; i < byteArray.length; i++) + for (int j = 1; j >= 0; j--) + hexBuffer.append(HEX[(byteArray[i] >> (j * 4)) & 0xF]); + return hexBuffer.toString(); + } + /** + * Convert a base16 string into a byte array. + */ + public static byte[] decode(String s) { + int len = s.length(); + byte[] r = new byte[len / 2]; + for (int i = 0; i < r.length; i++) { + int digit1 = s.charAt(i * 2), digit2 = s.charAt(i * 2 + 1); + if (digit1 >= '0' && digit1 <= '9') + digit1 -= '0'; + else if (digit1 >= 'A' && digit1 <= 'F') + digit1 -= 'A' - 10; + if (digit2 >= '0' && digit2 <= '9') + digit2 -= '0'; + else if (digit2 >= 'A' && digit2 <= 'F') + digit2 -= 'A' - 10; + + r[i] = (byte) ((digit1 << 4) + digit2); + } + return r; + } + } + + + +} + +//========================================= APACHE BLOCK ========================================= + diff --git a/src/main/java/gtPlusPlus/api/objects/random/XSTR.java b/src/main/java/gtPlusPlus/api/objects/random/XSTR.java new file mode 100644 index 0000000000..6ce1cbeb6c --- /dev/null +++ b/src/main/java/gtPlusPlus/api/objects/random/XSTR.java @@ -0,0 +1,278 @@ +package gtPlusPlus.api.objects.random; +/** + * A subclass of java.util.random that implements the Xorshift random number + * generator + * + * - it is 30% faster than the generator from Java's library - it produces + * random sequences of higher quality than java.util.Random - this class also + * provides a clone() function + * + * Usage: XSRandom rand = new XSRandom(); //Instantiation x = rand.nextInt(); + * //pull a random number + * + * To use the class in legacy code, you may also instantiate an XSRandom object + * and assign it to a java.util.Random object: java.util.Random rand = new + * XSRandom(); + * + * for an explanation of the algorithm, see + * http://demesos.blogspot.com/2011/09/pseudo-random-number-generators.html + * + * @author Wilfried Elmenreich University of Klagenfurt/Lakeside Labs + * http://www.elmenreich.tk + * + * This code is released under the GNU Lesser General Public License Version 3 + * http://www.gnu.org/licenses/lgpl-3.0.txt + */ + +import java.util.Random; +import java.util.concurrent.atomic.AtomicLong; + +/** + * XSTR - Xorshift ThermiteRandom + * Modified by Bogdan-G + * 03.06.2016 + * version 0.0.4 + */ +public class XSTR extends Random implements Cloneable { + + private static final long serialVersionUID = 6208727693524452904L; + private long seed; + private long last; + private static final long GAMMA = 0x9e3779b97f4a7c15L; + private static final int PROBE_INCREMENT = 0x9e3779b9; + private static final long SEEDER_INCREMENT = 0xbb67ae8584caa73bL; + private static final double DOUBLE_UNIT = 0x1.0p-53; // 1.0 / (1L << 53) + private static final float FLOAT_UNIT = 0x1.0p-24f; // 1.0f / (1 << 24) + + /* + MODIFIED BY: Robotia + Modification: Implemented Random class seed generator + */ + /** + * Creates a new pseudo random number generator. The seed is initialized to + * the current time, as if by + * setSeed(System.currentTimeMillis());. + */ + public XSTR() { + this(seedUniquifier() ^ System.nanoTime()); + } + private static final AtomicLong seedUniquifier + = new AtomicLong(8682522807148012L); + + private static long seedUniquifier() { + // L'Ecuyer, "Tables of Linear Congruential Generators of + // Different Sizes and Good Lattice Structure", 1999 + for (;;) { + final long current = seedUniquifier.get(); + final long next = current * 181783497276652981L; + if (seedUniquifier.compareAndSet(current, next)) { + return next; + } + } + } + + /** + * Creates a new pseudo random number generator, starting with the specified + * seed, using setSeed(seed);. + * + * @param seed the initial seed + */ + public XSTR(final long seed) { + this.seed = seed; + } + @Override + public boolean nextBoolean() { + return this.next(1) != 0; + } + + @Override + public double nextDouble() { + return (((long)(this.next(26)) << 27) + this.next(27)) * DOUBLE_UNIT; + } + /** + * Returns the current state of the seed, can be used to clone the object + * + * @return the current seed + */ + public synchronized long getSeed() { + return this.seed; + } + + /** + * Sets the seed for this pseudo random number generator. As described + * above, two instances of the same random class, starting with the same + * seed, produce the same results, if the same methods are called. + * + * @param seed the new seed + */ + @Override + public synchronized void setSeed(final long seed) { + this.seed = seed; + } + + /** + * @return Returns an XSRandom object with the same state as the original + */ + @Override + public XSTR clone() { + try { + super.clone(); + } + catch (CloneNotSupportedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return new XSTR(this.getSeed()); + } + + /** + * Implementation of George Marsaglia's elegant Xorshift random generator + * 30% faster and better quality than the built-in java.util.random see also + * see http://www.javamex.com/tutorials/random_numbers/xorshift.shtml + * + * @param nbits + * @return + */ + @Override + public int next(final int nbits) { + long x = this.seed; + x ^= (x << 21); + x ^= (x >>> 35); + x ^= (x << 4); + this.seed = x; + x &= ((1L << nbits) - 1); + return (int) x; + } + boolean haveNextNextGaussian = false; + double nextNextGaussian = 0; + @Override + synchronized public double nextGaussian() { + // See Knuth, ACP, Section 3.4.1 Algorithm C. + if (this.haveNextNextGaussian) { + this.haveNextNextGaussian = false; + return this.nextNextGaussian; + } + double v1, v2, s; + do { + v1 = (2 * this.nextDouble()) - 1; // between -1 and 1 + v2 = (2 * this.nextDouble()) - 1; // between -1 and 1 + s = (v1 * v1) + (v2 * v2); + } while ((s >= 1) || (s == 0)); + final double multiplier = StrictMath.sqrt((-2 * StrictMath.log(s))/s); + this.nextNextGaussian = v2 * multiplier; + this.haveNextNextGaussian = true; + return v1 * multiplier; + } + /** + * Returns a pseudorandom, uniformly distributed {@code int} value between 0 + * (inclusive) and the specified value (exclusive), drawn from this random + * number generator's sequence. The general contract of {@code nextInt} is + * that one {@code int} value in the specified range is pseudorandomly + * generated and returned. All {@code bound} possible {@code int} values are + * produced with (approximately) equal probability. The method + * {@code nextInt(int bound)} is implemented by class {@code Random} as if + * by: + *

 {@code
+	 * public int nextInt(int bound) {
+	 *   if (bound <= 0)
+	 *     throw new IllegalArgumentException("bound must be positive");
+	 *
+	 *   if ((bound & -bound) == bound)  // i.e., bound is a power of 2
+	 *     return (int)((bound * (long)next(31)) >> 31);
+	 *
+	 *   int bits, val;
+	 *   do {
+	 *       bits = next(31);
+	 *       val = bits % bound;
+	 *   } while (bits - val + (bound-1) < 0);
+	 *   return val;
+	 * }}
+ * + *

The hedge "approx + * imately" is used in the foregoing description only because the next + * method is only approximately an unbiased source of independently chosen + * bits. If it were a perfect source of randomly chosen bits, then the + * algorithm shown would choose {@code int} values from the stated range + * with perfect uniformity. + *

+ * The algorithm is slightly tricky. It rejects values that would result in + * an uneven distribution (due to the fact that 2^31 is not divisible by n). + * The probability of a value being rejected depends on n. The worst case is + * n=2^30+1, for which the probability of a reject is 1/2, and the expected + * number of iterations before the loop terminates is 2. + *

+ * The algorithm treats the case where n is a power of two specially: it + * returns the correct number of high-order bits from the underlying + * pseudo-random number generator. In the absence of special treatment, the + * correct number of low-order bits would be returned. Linear + * congruential pseudo-random number generators such as the one implemented + * by this class are known to have short periods in the sequence of values + * of their low-order bits. Thus, this special case greatly increases the + * length of the sequence of values returned by successive calls to this + * method if n is a small power of two. + * + * @param bound the upper bound (exclusive). Must be positive. + * @return the next pseudorandom, uniformly distributed {@code int} value + * between zero (inclusive) and {@code bound} (exclusive) from this random + * number generator's sequence + * @throws IllegalArgumentException if bound is not positive + * @since 1.2 + */ + @Override + public int nextInt(final int bound) { + final int newBound; + if (bound <= 0) { + newBound = 1; + //throw new RuntimeException("BadBound"); + } + else { + newBound = bound; + } + + /*int r = next(31); + int m = bound - 1; + if ((bound & m) == 0) // i.e., bound is a power of 2 + { + r = (int) ((bound * (long) r) >> 31); + } else { + for (int u = r; + u - (r = u % bound) + m < 0; + u = next(31)) + ; + } + return r;*/ + //speedup, new nextInt ~+40% + this.last = this.seed ^ (this.seed << 21); + this.last ^= (this.last >>> 35); + this.last ^= (this.last << 4); + this.seed = this.last; + final int out = (int) this.last % newBound; + return (out < 0) ? -out : out; + } + @Override + public int nextInt() { + return this.next(32); + } + + @Override + public float nextFloat() { + return this.next(24) * FLOAT_UNIT; + } + + @Override + public long nextLong() { + // it's okay that the bottom word remains signed. + return ((long)(this.next(32)) << 32) + this.next(32); + } + + @Override + public void nextBytes(final byte[] bytes_arr) { + for (int iba = 0, lenba = bytes_arr.length; iba < lenba; ) { + for (int rndba = this.nextInt(), + nba = Math.min(lenba - iba, Integer.SIZE/Byte.SIZE); + nba-- > 0; rndba >>= Byte.SIZE) { + bytes_arr[iba++] = (byte)rndba; + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/plugin/Sample_Plugin.java b/src/main/java/gtPlusPlus/api/plugin/Sample_Plugin.java new file mode 100644 index 0000000000..543ec8e1fa --- /dev/null +++ b/src/main/java/gtPlusPlus/api/plugin/Sample_Plugin.java @@ -0,0 +1,47 @@ +package gtPlusPlus.api.plugin; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.plugin.manager.Core_Manager; + +public final class Sample_Plugin implements IPlugin { + + public Sample_Plugin() { + Core_Manager.registerPlugin(this); //This must be called, else it won't load. + } + + @Override + public boolean preInit() { + return true; + } + + @Override + public boolean init() { + return true; + } + + @Override + public boolean postInit() { + return true; + } + + @Override + public boolean serverStart() { + return true; + } + + @Override + public boolean serverStop() { + return true; + } + + @Override + public String getPluginName() { + return "Sample Plugin"; + } + + @Override + public String getPluginAbbreviation() { + return "Test"; + } + +} diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java new file mode 100644 index 0000000000..d8573000fc --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalConnection.java @@ -0,0 +1,7 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalConnection { + boolean canConnectThermalEnergy(ForgeDirection arg0); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java new file mode 100644 index 0000000000..072695bd76 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java @@ -0,0 +1,15 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraft.item.ItemStack; + +public interface IThermalContainerItem { + + int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2); + + int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ItemStack arg0); + + int getMaxThermalEnergyStored(ItemStack arg0); + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java new file mode 100644 index 0000000000..3ab7127757 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalHandler.java @@ -0,0 +1,15 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalHandler extends IThermalProvider, IThermalReceiver { + + int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ForgeDirection arg0); + + int getMaxThermalEnergyStored(ForgeDirection arg0); + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java new file mode 100644 index 0000000000..0e4a060b23 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalProvider.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalProvider extends IThermalConnection { + + int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ForgeDirection arg0); + + int getMaxThermalEnergyStored(ForgeDirection arg0); + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java new file mode 100644 index 0000000000..e08ce48a06 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalReceiver extends IThermalConnection { + + int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ForgeDirection arg0); + + int getMaxThermalEnergyStored(ForgeDirection arg0); + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java new file mode 100644 index 0000000000..db3e6c8966 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/IThermalStorage.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.energy; + +public interface IThermalStorage { + + int receiveThermalEnergy(int arg0, boolean arg1); + + int extractThermalEnergy(int arg0, boolean arg1); + + int getThermalEnergyStored(); + + int getMaxThermalEnergyStored(); + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java new file mode 100644 index 0000000000..9c7bb0066c --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorage.java @@ -0,0 +1,116 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraft.nbt.NBTTagCompound; + +public class ThermalStorage implements IThermalStorage { + + protected int thermal_energy; + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public ThermalStorage(int arg0) { + this(arg0, arg0, arg0); + } + + public ThermalStorage(int arg0, int arg1) { + this(arg0, arg1, arg1); + } + + public ThermalStorage(int arg0, int arg1, int arg2) { + this.capacity = arg0; + this.maxReceive = arg1; + this.maxExtract = arg2; + } + + public ThermalStorage readFromNBT(NBTTagCompound arg0) { + this.thermal_energy = arg0.getInteger("ThermalEnergy"); + if (this.thermal_energy > this.capacity) { + this.thermal_energy = this.capacity; + } + return this; + } + + public NBTTagCompound writeToNBT(NBTTagCompound arg0) { + if (this.thermal_energy < 0) { + this.thermal_energy = 0; + } + arg0.setInteger("ThermalEnergy", this.thermal_energy); + return arg0; + } + + public void setCapacity(int arg0) { + this.capacity = arg0; + if (this.thermal_energy > arg0) { + this.thermal_energy = arg0; + } + + } + + public void setMaxTransfer(int arg0) { + this.setMaxReceive(arg0); + this.setMaxExtract(arg0); + } + + public void setMaxReceive(int arg0) { + this.maxReceive = arg0; + } + + public void setMaxExtract(int arg0) { + this.maxExtract = arg0; + } + + public int getMaxReceive() { + return this.maxReceive; + } + + public int getMaxExtract() { + return this.maxExtract; + } + + public void setEnergyStored(int arg0) { + this.thermal_energy = arg0; + if (this.thermal_energy > this.capacity) { + this.thermal_energy = this.capacity; + } else if (this.thermal_energy < 0) { + this.thermal_energy = 0; + } + + } + + public void modifyEnergyStored(int arg0) { + this.thermal_energy += arg0; + if (this.thermal_energy > this.capacity) { + this.thermal_energy = this.capacity; + } else if (this.thermal_energy < 0) { + this.thermal_energy = 0; + } + + } + + public int receiveThermalEnergy(int arg0, boolean arg1) { + int arg2 = Math.min(this.capacity - this.thermal_energy, Math.min(this.maxReceive, arg0)); + if (!arg1) { + this.thermal_energy += arg2; + } + + return arg2; + } + + public int extractThermalEnergy(int arg0, boolean arg1) { + int arg2 = Math.min(this.thermal_energy, Math.min(this.maxExtract, arg0)); + if (!arg1) { + this.thermal_energy -= arg2; + } + + return arg2; + } + + public int getThermalEnergyStored() { + return this.thermal_energy; + } + + public int getMaxThermalEnergyStored() { + return this.capacity; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java new file mode 100644 index 0000000000..47af7e79a6 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java @@ -0,0 +1,34 @@ +package gtPlusPlus.api.thermal.energy; + +public class ThermalStorageAdv extends ThermalStorage { + + public ThermalStorageAdv(int arg0) { + this(arg0, arg0, arg0); + } + + public ThermalStorageAdv(int arg0, int arg1) { + this(arg0, arg1, arg1); + } + + public ThermalStorageAdv(int arg0, int arg1, int arg2) { + super(arg0, arg1, arg2); + } + + public int receiveEnergyNoLimit(int arg0, boolean arg1) { + int arg2 = Math.min(super.capacity - super.thermal_energy, arg0); + if (!arg1) { + super.thermal_energy += arg2; + } + + return arg2; + } + + public int extractEnergyNoLimit(int arg0, boolean arg1) { + int arg2 = Math.min(super.thermal_energy, arg0); + if (!arg1) { + super.thermal_energy -= arg2; + } + + return arg2; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/main/java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java new file mode 100644 index 0000000000..015e5fd5f3 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java @@ -0,0 +1,84 @@ +package gtPlusPlus.api.thermal.sample; + +import gtPlusPlus.api.thermal.energy.IThermalContainerItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class ItemThermalContainer extends Item implements IThermalContainerItem { + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public ItemThermalContainer() { + } + + public ItemThermalContainer(int arg0) { + this(arg0, arg0, arg0); + } + + public ItemThermalContainer(int arg0, int arg1) { + this(arg0, arg1, arg1); + } + + public ItemThermalContainer(int arg0, int arg1, int arg2) { + this.capacity = arg0; + this.maxReceive = arg1; + this.maxExtract = arg2; + } + + public ItemThermalContainer setCapacity(int arg0) { + this.capacity = arg0; + return this; + } + + public void setMaxTransfer(int arg0) { + this.setMaxReceive(arg0); + this.setMaxExtract(arg0); + } + + public void setMaxReceive(int arg0) { + this.maxReceive = arg0; + } + + public void setMaxExtract(int arg0) { + this.maxExtract = arg0; + } + + public int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { + if (arg0.getTagCompound() == null) { + arg0.stackTagCompound = new NBTTagCompound(); + } + int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); + int arg4 = Math.min(this.capacity - arg3, Math.min(this.maxReceive, arg1)); + if (!arg2) { + arg3 += arg4; + arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); + } + return arg4; + } + + public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { + if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")) { + int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); + int arg4 = Math.min(arg3, Math.min(this.maxExtract, arg1)); + if (!arg2) { + arg3 -= arg4; + arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); + } + return arg4; + } else { + return 0; + } + } + + public int getThermalEnergyStored(ItemStack arg0) { + return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy") + ? arg0.stackTagCompound.getInteger("ThermalEnergy") + : 0; + } + + public int getMaxThermalEnergyStored(ItemStack arg0) { + return this.capacity; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java b/src/main/java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java new file mode 100644 index 0000000000..e2e3c50ab7 --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java @@ -0,0 +1,42 @@ +package gtPlusPlus.api.thermal.sample; + +import gtPlusPlus.api.thermal.energy.IThermalHandler; +import gtPlusPlus.api.thermal.energy.ThermalStorage; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileThermalHandler extends TileEntity implements IThermalHandler { + + protected ThermalStorage storage = new ThermalStorage(32000); + + public void readFromNBT(NBTTagCompound arg0) { + super.readFromNBT(arg0); + this.storage.readFromNBT(arg0); + } + + public void writeToNBT(NBTTagCompound arg0) { + super.writeToNBT(arg0); + this.storage.writeToNBT(arg0); + } + + public boolean canConnectThermalEnergy(ForgeDirection arg0) { + return true; + } + + public int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) { + return this.storage.receiveThermalEnergy(arg1, arg2); + } + + public int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) { + return this.storage.extractThermalEnergy(arg1, arg2); + } + + public int getThermalEnergyStored(ForgeDirection arg0) { + return this.storage.getThermalEnergyStored(); + } + + public int getMaxThermalEnergyStored(ForgeDirection arg0) { + return this.storage.getMaxThermalEnergyStored(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java b/src/main/java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java new file mode 100644 index 0000000000..a40535887c --- /dev/null +++ b/src/main/java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.tileentity; + +public interface IThermalInfo { + + int getInfoEnergyPerTick(); + + int getInfoMaxEnergyPerTick(); + + int getInfoEnergyStored(); + + int getInfoMaxEnergyStored(); + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java b/src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java new file mode 100644 index 0000000000..9a16ad1785 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java @@ -0,0 +1,158 @@ +package gtPlusPlus.australia; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; + +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +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.registry.GameRegistry; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.biome.type.Biome_AustralianDesert_Ex; +import gtPlusPlus.australia.biome.type.Biome_AustralianForest; +import gtPlusPlus.australia.biome.type.Biome_AustralianOcean; +import gtPlusPlus.australia.biome.type.Biome_AustralianOutback; +import gtPlusPlus.australia.biome.type.Biome_AustralianPlains; +import gtPlusPlus.australia.block.AustraliaContentLoader; +import gtPlusPlus.australia.dimension.Dimension_Australia; +import gtPlusPlus.australia.gen.gt.WorldGen_Australia_Ores; +import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia_Base; +import gtPlusPlus.australia.gen.map.structure.StructureManager; +import gtPlusPlus.australia.world.AustraliaWorldGenerator; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.Australia; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.config.Configuration; + +@MCVersion(value = "1.7.10") +@Mod(modid = Australia.MODID, name = Australia.NAME, version = Australia.VERSION, dependencies = "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") +public class GTplusplus_Australia implements ActionListener { + + //Mod Instance + @Mod.Instance(Australia.MODID) + public static GTplusplus_Australia instance; + public static GTPP_Config sCustomWorldgenFile = null; + + // Dark World Handler + //protected static volatile Biome_AustralianDesert Australian_Desert_Biome_1; + //protected static volatile Biome_AustralianDesert2 Australian_Desert_Biome_2; + + public static volatile Biome_AustralianDesert_Ex Australian_Desert_Biome_3; + public static volatile Biome_AustralianForest Australian_Forest_Biome; + public static volatile Biome_AustralianOcean Australian_Ocean_Biome; + public static volatile Biome_AustralianOutback Australian_Outback_Biome; + public static volatile Biome_AustralianPlains Australian_Plains_Biome; + + public static volatile Dimension_Australia Australia_Dimension; + public static AustraliaWorldGenerator Australia_World_Generator; + public static int globalAustraliaPortalSpawnTimer = 0; + + // Pre-Init + @Mod.EventHandler + public void preInit(final FMLPreInitializationEvent event) { + Logger.INFO("Loading " + Australia.MODID + " V" + Australia.VERSION); + + //Setup + setVars(event); + + Australia_Dimension = new Dimension_Australia(); + Australia_Dimension.instance = instance; + + //Australian_Desert_Biome_1 = (new Biome_AustralianDesert()); + //Australian_Desert_Biome_2 = (new Biome_AustralianDesert2()); + //Australian_Desert_Biome_1.instance = instance; + //Australian_Desert_Biome_2.instance = instance; + //Australian_Desert_Biome_1.preInit(event); + //Australian_Desert_Biome_2.preInit(event); + + + Australian_Desert_Biome_3 = (Biome_AustralianDesert_Ex.biome); + Australian_Forest_Biome = (Biome_AustralianForest.biome); + Australian_Ocean_Biome = (Biome_AustralianOcean.biome); + Australian_Outback_Biome = (Biome_AustralianOutback.biome); + Australian_Plains_Biome = Biome_AustralianPlains.biome; + + //Load Villages + StructureManager.registerVillageComponents(); + + setupWorldGenerator(); + + //Load/Set Custom Ore Gen + sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "Australia.cfg"))); + + } + + @EventHandler + public void load(final FMLInitializationEvent e) { + Logger.INFO("Begin resource allocation for " + Australia.MODID + " V" +Australia.VERSION); + + //Load World and Biome + GameRegistry.registerWorldGenerator(new WorldGen_GT_Australia_Base(), Short.MAX_VALUE); + + //Australian_Desert_Biome_1.load(); + //Australian_Desert_Biome_2.load(); + Australian_Desert_Biome_3.load(); + Australian_Forest_Biome.load(); + Australian_Ocean_Biome.load(); + Australian_Outback_Biome.load(); + Australian_Plains_Biome.load(); + + Australia_Dimension.load(); + + } + + public static synchronized void GenerateOreMaterials() { + + } + + protected synchronized void setVars(FMLPreInitializationEvent event){ + + sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "Australia.cfg"))); + + if (DimensionManager.isDimensionRegistered(Dimension_Australia.DIMID)){ + Dimension_Australia.DIMID = DimensionManager.getNextFreeDimId(); + } + + /* + * Set World Generation Values + */ + WorldGen_Australia_Ores.generateValidOreVeins(); + WorldGen_GT_Australia_Base.oreveinPercentage = 16; + WorldGen_GT_Australia_Base.oreveinAttempts = 16; + WorldGen_GT_Australia_Base.oreveinMaxPlacementAttempts = 2; + if (CORE_Preloader.DEBUG_MODE || CORE.DEVENV){ + WorldGen_GT_Australia_Base.debugWorldGen = true; + } + AustraliaContentLoader.run(); + } + + @EventHandler + public void serverLoad(FMLServerStartingEvent event) { + Australia_World_Generator.initiate(); + } + + @EventHandler + public static void postInit(final FMLPostInitializationEvent e) { + Logger.INFO("Finished loading Australia plugin for GT++."); + } + + @Override + public void actionPerformed(ActionEvent arg0) { + // TODO Auto-generated method stub + + } + + private void setupWorldGenerator() { + Logger.INFO("Registering World Generator for Australia."); + Australia_World_Generator = new AustraliaWorldGenerator(); + GameRegistry.registerWorldGenerator(Australia_World_Generator, 0); + } + +} diff --git a/src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java b/src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java new file mode 100644 index 0000000000..2d9b335d52 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java @@ -0,0 +1,355 @@ +package gtPlusPlus.australia.biome; + +import java.util.Random; + +import gtPlusPlus.api.interfaces.IGeneratorWorld; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.GTplusplus_Australia; +import gtPlusPlus.australia.gen.world.WorldGenAustralianOre; +import net.minecraft.block.BlockFlower; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenBigMushroom; +import net.minecraft.world.gen.feature.WorldGenCactus; +import net.minecraft.world.gen.feature.WorldGenDeadBush; +import net.minecraft.world.gen.feature.WorldGenFlowers; +import net.minecraft.world.gen.feature.WorldGenLiquids; +import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraft.world.gen.feature.WorldGenPumpkin; +import net.minecraft.world.gen.feature.WorldGenReed; +import net.minecraft.world.gen.feature.WorldGenSand; +import net.minecraft.world.gen.feature.WorldGenWaterlily; +import net.minecraft.world.gen.feature.WorldGenerator; + +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; +import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; +import net.minecraftforge.common.*; +import net.minecraftforge.event.terraingen.*; + +public class CustomDecorator extends BiomeDecorator { + + + public CustomDecorator() { + this.sandGen = new WorldGenSand(Blocks.sand, 10); + this.gravelAsSandGen = new WorldGenSand(Blocks.gravel, 6); + this.dirtGen = new WorldGenMinable(Blocks.dirt, 16); + this.gravelGen = new WorldGenMinable(Blocks.gravel, 16); + + this.coalGen = new WorldGenAustralianOre(Blocks.coal_ore, 4); + this.ironGen = new WorldGenAustralianOre(Blocks.clay, 4); + this.goldGen = new WorldGenAustralianOre(Blocks.soul_sand, 20); + this.redstoneGen = new WorldGenAustralianOre(Blocks.bedrock, 8); + this.diamondGen = new WorldGenAustralianOre(Blocks.diamond_ore, 1); + this.lapisGen = new WorldGenAustralianOre(Blocks.lava, 16); + + this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); + this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); + this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); + this.bigMushroomGen = new WorldGenBigMushroom(); + this.reedGen = new WorldGenReed(); + this.cactusGen = new WorldGenCactus(); + this.waterlilyGen = new WorldGenWaterlily(); + this.flowersPerChunk = 2; + this.grassPerChunk = 1; + this.sandPerChunk = 1; + this.sandPerChunk2 = 3; + this.clayPerChunk = 2; + this.generateLakes = true; + } + + int mDecoratorTimeout = 0; + + public void decorateChunk(World aWorld, Random aRand, BiomeGenBase aGen, int aX, int aZ) { + if (this.currentWorld != null && this.chunk_X == aX && this.chunk_Z == aZ) { + try { + while (this.currentWorld != null) { + if (mDecoratorTimeout % 1000 == 0) { + Logger.WORLD("Waiting for chunk @ "+aX+", "+aZ+" to generate. Waited "+mDecoratorTimeout+"ms already."); + } + if (this.currentWorld == null) { + break; + } + if (mDecoratorTimeout >= 5000) { + throw new RuntimeException("Already decorating!!"); + } + mDecoratorTimeout++; + } + } + catch (Throwable t) { + t.printStackTrace(); + throw new RuntimeException("Already decorating!!"); + } + } + if (this.currentWorld == null) { + this.currentWorld = aWorld; + this.randomGenerator = aRand; + this.chunk_X = aX; + this.chunk_Z = aZ; + this.genDecorations(aGen); + this.currentWorld = null; + this.randomGenerator = null; + } + } + + protected void genDecorations(BiomeGenBase p_150513_1_) { + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + this.generateOres(); + int i; + int j; + int k; + + boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); + for (i = 0; doGen && i < this.sandPerChunk2; ++i) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.sandGen.generate(this.currentWorld, this.randomGenerator, j, + this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); + for (i = 0; doGen && i < this.clayPerChunk; ++i) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.clayGen.generate(this.currentWorld, this.randomGenerator, j, + this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); + for (i = 0; doGen && i < this.sandPerChunk; ++i) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, + this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + i = this.treesPerChunk; + + if (this.randomGenerator.nextInt(10) == 0) { + ++i; + } + + int l; + int i1; + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); + for (j = 0; doGen && j < i; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); + worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); + + if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) { + worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); + for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, + this.currentWorld.getHeightValue(k, l), l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); + for (j = 0; doGen && j < this.flowersPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); + String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); + BlockFlower blockflower = BlockFlower.func_149857_e(s); + + if (blockflower.getMaterial() != Material.air) { + this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); + this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); + for (j = 0; doGen && j < this.grassPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); + worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); + for (j = 0; doGen && j < this.deadBushPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); + for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + + for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 + && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) { + ; + } + + this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); + for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) { + if (this.randomGenerator.nextInt(4) == 0) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + if (this.randomGenerator.nextInt(8) == 0) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + if (doGen && this.randomGenerator.nextInt(4) == 0) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + if (doGen && this.randomGenerator.nextInt(8) == 0) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); + for (j = 0; doGen && j < this.reedsPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + for (j = 0; doGen && j < 10; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); + if (doGen && this.randomGenerator.nextInt(32) == 0) { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); + for (j = 0; doGen && j < this.cactiPerChunk; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + try { + int midX = Math.max(0, 7 / 2); + int midZ = Math.max(0, 7 / 2); + int mCurrentBiomeID = Integer.valueOf(currentWorld.getBiomeGenForCoords(chunk_X+midX, chunk_Z+midZ).biomeID); + + if (mCurrentBiomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { + this.generateLakes = false; + } + + if (mCurrentBiomeID != GTplusplus_Australia.Australian_Outback_Biome.biomeID) { + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); + if (doGen && this.generateLakes) { + for (j = 0; j < 50; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + + for (j = 0; j < 20; ++j) { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator + .nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + } + } + } + catch (Throwable t) { + + } + + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + + /** + * Standard ore generation helper. Generates most ores. + */ + protected void genStandardOre1(int aAmount, WorldGenerator aOreGenerator, int p_76795_3_, int p_76795_4_) { + for (int l = 0; l < aAmount; ++l) { + int i1 = this.chunk_X + this.randomGenerator.nextInt(16); + int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; + int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); + aOreGenerator.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); + } + } + + /** + * Standard ore generation helper. Generates Lapis Lazuli. + */ + protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) { + for (int l = 0; l < p_76793_1_; ++l) { + int i1 = this.chunk_X + this.randomGenerator.nextInt(16); + int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) + + (p_76793_3_ - p_76793_4_); + int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); + p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); + } + } + + /** + * Generates ores in the current chunk + */ + protected void generateOres() { + MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) + this.genStandardOre1(20, this.dirtGen, 0, 256); + if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) + this.genStandardOre1(10, this.gravelGen, 0, 256); + if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) + this.genStandardOre1(20, this.coalGen, 0, 128); + if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) + this.genStandardOre1(10, this.ironGen, 0, 64); + if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) + this.genStandardOre1(15, this.goldGen, 0, 32); + if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) + this.genStandardOre1(10, this.redstoneGen, 0, 16); + if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) + this.genStandardOre1(1, this.diamondGen, 0, 16); + if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) + this.genStandardOre2(10, this.lapisGen, 16, 16); + MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + + private int nextInt(int i) { + if (i <= 1) + return 0; + return this.randomGenerator.nextInt(i); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/GenLayerAustralia.java b/src/main/java/gtPlusPlus/australia/biome/GenLayerAustralia.java new file mode 100644 index 0000000000..d9c328d756 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/GenLayerAustralia.java @@ -0,0 +1,32 @@ +package gtPlusPlus.australia.biome; + +import net.minecraft.world.WorldType; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.GenLayerVoronoiZoom; +import net.minecraft.world.gen.layer.GenLayerZoom; + +public class GenLayerAustralia extends GenLayer { + + public GenLayerAustralia(long seed) { + super(seed); + } + + public static GenLayer[] makeTheWorld(long seed, WorldType type) { + GenLayer biomes = new GenLayerBiomesAustraliaDimension(1L); + biomes = new GenLayerZoom(1000L, biomes); + biomes = new GenLayerZoom(1001L, biomes); + biomes = new GenLayerZoom(1002L, biomes); + biomes = new GenLayerZoom(1003L, biomes); + biomes = new GenLayerZoom(1004L, biomes); + biomes = new GenLayerZoom(1005L, biomes); + GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes); + biomes.initWorldGenSeed(seed); + genlayervoronoizoom.initWorldGenSeed(seed); + return new GenLayer[] { biomes, genlayervoronoizoom }; + } + + @Override + public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { + return new int[] {}; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java b/src/main/java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java new file mode 100644 index 0000000000..571ae636e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/GenLayerBiomesAustraliaDimension.java @@ -0,0 +1,47 @@ +package gtPlusPlus.australia.biome; + +import gtPlusPlus.australia.biome.type.Biome_AustralianDesert_Ex; +import gtPlusPlus.australia.biome.type.Biome_AustralianForest; +import gtPlusPlus.australia.biome.type.Biome_AustralianOcean; +import gtPlusPlus.australia.biome.type.Biome_AustralianOutback; +import gtPlusPlus.australia.biome.type.Biome_AustralianPlains; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; + +public class GenLayerBiomesAustraliaDimension extends GenLayer { + + protected BiomeGenBase[] allowedBiomes = { + Biome_AustralianDesert_Ex.biome, + Biome_AustralianDesert_Ex.biome, + Biome_AustralianOutback.biome, + Biome_AustralianOutback.biome, + Biome_AustralianForest.biome, + Biome_AustralianForest.biome, + Biome_AustralianPlains.biome, + Biome_AustralianPlains.biome, + Biome_AustralianOcean.biome, + }; + + public GenLayerBiomesAustraliaDimension(long seed) { + super(seed); + } + + public GenLayerBiomesAustraliaDimension(long seed, GenLayer genlayer) { + super(seed); + this.parent = genlayer; + } + + @Override + public int[] getInts(int x, int z, int width, int depth) { + int[] dest = IntCache.getIntCache(width * depth); + for (int dz = 0; dz < depth; dz++) { + for (int dx = 0; dx < width; dx++) { + this.initChunkSeed(dx + x, dz + z); + dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID; + } + } + return dest; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java new file mode 100644 index 0000000000..666360f058 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert.java @@ -0,0 +1,355 @@ +package gtPlusPlus.australia.biome.type; + +import java.lang.reflect.Field; +import java.util.Random; + +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntitySilverfish; +import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.EntitySlime; +import net.minecraft.entity.monster.EntitySpider; +import net.minecraft.entity.monster.EntityWitch; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.passive.EntityCow; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.passive.EntitySquid; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianDesert { + + + public Object instance; + + public static Block blockTopLayer; + public static Block blockSecondLayer; + public static Block blockMainFiller = Blocks.stone; + public static Block blockSecondaryFiller; + public static Block blockFluidLakes; + + public Biome_AustralianDesert() { + + } + + public static BiomeGenAustralianDesert biome = new BiomeGenAustralianDesert(); + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); + BiomeManager.addSpawnBiome(biome); + } + + public void generateNether(World world, Random random, int chunkX, int chunkZ) { + } + + public void generateSurface(World world, Random random, int chunkX, int chunkZ) { + } + + public void registerRenderers() { + } + + public int addFuel(ItemStack fuel) { + return 0; + } + + public void serverLoad(FMLServerStartingEvent event) { + } + + public void preInit(FMLPreInitializationEvent event) { + } + + static class BiomeGenAustralianDesert extends BiomeGenBase { + @SuppressWarnings("unchecked") + public BiomeGenAustralianDesert() { + super(CORE.AUSTRALIA_BIOME_DESERT_1_ID); + this.setBiomeName("Australian Desert"); + //this.setBiomeID(); + this.enableRain = true; + this.enableSnow = false; + this.topBlock = blockTopLayer; + this.fillerBlock = blockSecondLayer; + //this.theBiomeDecorator = new BiomeGenerator_Custom(); + this.theBiomeDecorator.generateLakes = true; + this.theBiomeDecorator.treesPerChunk = 20; + this.theBiomeDecorator.flowersPerChunk = 0; + this.theBiomeDecorator.grassPerChunk = 5; + this.theBiomeDecorator.deadBushPerChunk = 63; + this.theBiomeDecorator.mushroomsPerChunk = 0; + this.theBiomeDecorator.reedsPerChunk = 42; + this.theBiomeDecorator.cactiPerChunk = 56; + this.theBiomeDecorator.sandPerChunk = 84; + this.rainfall = 0.1F; + this.waterColorMultiplier = 13434879; + setHeight(new BiomeGenBase.Height(0.15F, 0.45F)); + this.rootHeight = -0.25f; //Ground level + + this.spawnableMonsterList.clear(); + this.spawnableCreatureList.clear(); + this.spawnableWaterCreatureList.clear(); + this.spawnableCaveCreatureList.clear(); + + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySilverfish.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 5, 1, 5)); + + this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 5, 1, 5)); + + } + + private synchronized boolean setBiomeID() { + try { + Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); + Field mClone = mInternalBiomeList; + BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); + BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; + for (int index=0;index EntityClass, int a, int b, int c){ + //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); + this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); + return true; + } + + @Override + public WorldGenAbstractTree func_150567_a(Random par1Random){ + return (WorldGenAbstractTree)(getRandomWorldGenForTrees(par1Random)); + } + + + //TODO - DOES THIS WORK? + public WorldGenerator getRandomWorldGenForTrees(Random par1Random) + { + return new Tree(); + } + + class Tree + extends WorldGenAbstractTree + { + private final int minTreeHeight; + private final boolean vinesGrow; + private final int metaWood; + private final int metaLeaves; + + public Tree() + { + super(false); + this.minTreeHeight = 5; + this.metaWood = 0; + this.metaLeaves = 0; + this.vinesGrow = false; + } + + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + int var6 = par2Random.nextInt(3) + this.minTreeHeight; + boolean var7 = true; + if ((par4 >= 1) && (par4 + var6 + 1 <= 256)) + { + for (int var8 = par4; var8 <= par4 + 1 + var6; var8++) + { + byte var9 = 1; + if (var8 == par4) { + var9 = 0; + } + if (var8 >= par4 + 1 + var6 - 2) { + var9 = 2; + } + for (int var10 = par3 - var9; (var10 <= par3 + var9) && (var7); var10++) { + for (int var11 = par5 - var9; (var11 <= par5 + var9) && (var7); var11++) { + if ((var8 >= 0) && (var8 < 256)) + { + Block var12s = par1World.getBlock(var10, var8, var11); + int var12 = Block.getIdFromBlock(var12s); + if ((var12 != 0) && (var12s != Blocks.air) && (var12s != Blocks.grass) && (var12s != Blocks.dirt) && (var12s != Blocks.cactus)) { + var7 = false; + } + } + else + { + var7 = false; + } + } + } + } + if (!var7) { + return false; + } + Block var8s = par1World.getBlock(par3, par4 - 1, par5); + int var8 = Block.getIdFromBlock(var8s); + if (((var8s == Blocks.grass) || (var8s == Blocks.dirt)) && (par4 < 256 - var6 - 1)) + { + par1World.setBlock(par3, par4 - 1, par5, Blocks.dirt, 0, 2); + byte var9 = 3; + byte var18 = 0; + for (int var11 = par4 - var9 + var6; var11 <= par4 + var6; var11++) + { + int var12 = var11 - (par4 + var6); + int var13 = var18 + 1 - var12 / 2; + for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) + { + int var15 = var14 - par3; + for (int var16 = par5 - var13; var16 <= par5 + var13; var16++) + { + int var17 = var16 - par5; + if ((Math.abs(var15) != var13) || (Math.abs(var17) != var13) || ((par2Random.nextInt(2) != 0) && (var12 != 0))) { + par1World.setBlock(var14, var11, var16, Blocks.air, this.metaLeaves, 2); + } + } + } + } + for (int var11 = 0; var11 < var6; var11++) + { + Block var12s = par1World.getBlock(par3, par4 + var11, par5); + int var12 = Block.getIdFromBlock(var12s); + if ((var12 == 0) || (var12s == Blocks.air)) + { + par1World.setBlock(par3, par4 + var11, par5, Blocks.cactus, this.metaWood, 2); + if ((this.vinesGrow) && (var11 > 0)) + { + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 - 1, par4 + var11, par5))) { + par1World.setBlock(par3 - 1, par4 + var11, par5, Blocks.air, 8, 2); + } + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 + 1, par4 + var11, par5))) { + par1World.setBlock(par3 + 1, par4 + var11, par5, Blocks.air, 2, 2); + } + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 - 1))) { + par1World.setBlock(par3, par4 + var11, par5 - 1, Blocks.air, 1, 2); + } + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 + 1))) { + par1World.setBlock(par3, par4 + var11, par5 + 1, Blocks.air, 4, 2); + } + } + } + } + if (this.vinesGrow) + { + for (int var11 = par4 - 3 + var6; var11 <= par4 + var6; var11++) + { + int var12 = var11 - (par4 + var6); + int var13 = 2 - var12 / 2; + for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) { + for (int var15 = par5 - var13; var15 <= par5 + var13; var15++) { + if (par1World.getBlock(var14, var11, var15) == Blocks.air) + { + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14 - 1, var11, var15)) == 0)) { + growVines(par1World, var14 - 1, var11, var15, 8); + } + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14 + 1, var11, var15)) == 0)) { + growVines(par1World, var14 + 1, var11, var15, 2); + } + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 - 1)) == 0)) { + growVines(par1World, var14, var11, var15 - 1, 1); + } + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 + 1)) == 0)) { + growVines(par1World, var14, var11, var15 + 1, 4); + } + } + } + } + } + if ((par2Random.nextInt(5) == 0) && (var6 > 5)) { + for (int var11 = 0; var11 < 2; var11++) { + for (int var12 = 0; var12 < 4; var12++) { + if (par2Random.nextInt(4 - var11) == 0) + { + int var13 = par2Random.nextInt(3); + par1World.setBlock(par3 + net.minecraft.util.Direction.offsetX[net.minecraft.util.Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + net.minecraft.util.Direction.offsetZ[net.minecraft.util.Direction.rotateOpposite[var12]], Blocks.air, var13 << 2 | var12, 2); + } + } + } + } + } + return true; + } + return false; + } + return false; + } + + private void growVines(World par1World, int par2, int par3, int par4, int par5) + { + par1World.setBlock(par2, par3, par4, Blocks.vine, par5, 2); + int var6 = 4; + for (;;) + { + par3--; + if ((Block.getIdFromBlock(par1World.getBlock(par2, par3, par4)) != 0) || (var6 <= 0)) { + return; + } + par1World.setBlock(par2, par3, par4, Blocks.air, par5, 2); + var6--; + } + } + } + + } + +} diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java new file mode 100644 index 0000000000..2ac11bb412 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert2.java @@ -0,0 +1,355 @@ +package gtPlusPlus.australia.biome.type; + +import java.lang.reflect.Field; +import java.util.Random; + +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntitySilverfish; +import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.EntitySlime; +import net.minecraft.entity.monster.EntitySpider; +import net.minecraft.entity.monster.EntityWitch; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.passive.EntityCow; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.passive.EntitySquid; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenerator; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianDesert2 { + + public static BiomeGenAustralianDesert2 biome = new BiomeGenAustralianDesert2(); + + public Object instance; + + public static Block blockTopLayer; + public static Block blockSecondLayer; + public static Block blockMainFiller = Blocks.stone; + public static Block blockSecondaryFiller; + public static Block blockFluidLakes; + + public Biome_AustralianDesert2() { + } + + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); + BiomeManager.addSpawnBiome(biome); + } + + public void generateNether(World world, Random random, int chunkX, int chunkZ) { + } + + public void generateSurface(World world, Random random, int chunkX, int chunkZ) { + } + + public void registerRenderers() { + } + + public int addFuel(ItemStack fuel) { + return 0; + } + + public void serverLoad(FMLServerStartingEvent event) { + } + + public void preInit(FMLPreInitializationEvent event) { + } + + static class BiomeGenAustralianDesert2 extends BiomeGenBase { + @SuppressWarnings("unchecked") + public BiomeGenAustralianDesert2() { + super(CORE.AUSTRALIA_BIOME_DESERT_2_ID); + this.setBiomeName("Australian Desert II"); + //this.setBiomeID(); + this.enableRain = true; + this.enableSnow = false; + this.topBlock = blockTopLayer; + this.fillerBlock = blockSecondLayer; + //this.theBiomeDecorator = new BiomeGenerator_Custom(); + this.theBiomeDecorator.generateLakes = true; + this.theBiomeDecorator.treesPerChunk = 40; + this.theBiomeDecorator.flowersPerChunk = 0; + this.theBiomeDecorator.grassPerChunk = 0; + this.theBiomeDecorator.deadBushPerChunk = 63; + this.theBiomeDecorator.mushroomsPerChunk = 0; + this.theBiomeDecorator.reedsPerChunk = 42; + this.theBiomeDecorator.cactiPerChunk = 84; + this.theBiomeDecorator.sandPerChunk = 84; + this.rainfall = 0.1F; + this.waterColorMultiplier = 13434879; + setHeight(new BiomeGenBase.Height(0.10F, 0.35F)); + this.rootHeight = -0.15f; //Ground level + + this.spawnableMonsterList.clear(); + this.spawnableCreatureList.clear(); + this.spawnableWaterCreatureList.clear(); + this.spawnableCaveCreatureList.clear(); + + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySilverfish.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 5, 1, 5)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 5, 1, 5)); + + this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 5, 1, 5)); + + } + + private synchronized boolean setBiomeID() { + try { + Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); + Field mClone = mInternalBiomeList; + BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); + BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; + for (int index=0;index EntityClass, int a, int b, int c){ + //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); + this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); + return true; + } + + @Override + public WorldGenAbstractTree func_150567_a(Random par1Random){ + boolean a = (MathUtils.randInt(0, 100) < MathUtils.randInt(30, 65)); + return a ? getRandomWorldGenForTrees(par1Random) : super.func_150567_a(par1Random); + } + + //TODO - DOES THIS WORK? + public WorldGenAbstractTree getRandomWorldGenForTrees(Random par1Random) + { + return new Tree(); + } + + class Tree + extends WorldGenAbstractTree + { + private final int minTreeHeight; + private final boolean vinesGrow; + private final int metaWood; + private final int metaLeaves; + + public Tree() + { + super(false); + this.minTreeHeight = 3; + this.metaWood = 0; + this.metaLeaves = 0; + this.vinesGrow = false; + } + + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + int var6 = par2Random.nextInt(3) + this.minTreeHeight; + boolean var7 = true; + if ((par4 >= 1) && (par4 + var6 + 1 <= 256)) + { + for (int var8 = par4; var8 <= par4 + 1 + var6; var8++) + { + byte var9 = 1; + if (var8 == par4) { + var9 = 0; + } + if (var8 >= par4 + 1 + var6 - 2) { + var9 = 2; + } + for (int var10 = par3 - var9; (var10 <= par3 + var9) && (var7); var10++) { + for (int var11 = par5 - var9; (var11 <= par5 + var9) && (var7); var11++) { + if ((var8 >= 0) && (var8 < 256)) + { + Block var12s = par1World.getBlock(var10, var8, var11); + int var12 = Block.getIdFromBlock(var12s); + if ((var12 != 0) && (var12s != Blocks.air) && (var12s != Blocks.grass) && (var12s != Blocks.dirt) && (var12s != Blocks.cactus)) { + var7 = false; + } + } + else + { + var7 = false; + } + } + } + } + if (!var7) { + return false; + } + Block var8s = par1World.getBlock(par3, par4 - 1, par5); + int var8 = Block.getIdFromBlock(var8s); + if (((var8s == Blocks.grass) || (var8s == Blocks.dirt)) && (par4 < 256 - var6 - 1)) + { + par1World.setBlock(par3, par4 - 1, par5, Blocks.dirt, 0, 2); + byte var9 = 3; + byte var18 = 0; + for (int var11 = par4 - var9 + var6; var11 <= par4 + var6; var11++) + { + int var12 = var11 - (par4 + var6); + int var13 = var18 + 1 - var12 / 2; + for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) + { + int var15 = var14 - par3; + for (int var16 = par5 - var13; var16 <= par5 + var13; var16++) + { + int var17 = var16 - par5; + if ((Math.abs(var15) != var13) || (Math.abs(var17) != var13) || ((par2Random.nextInt(2) != 0) && (var12 != 0))) { + par1World.setBlock(var14, var11, var16, Blocks.air, this.metaLeaves, 2); + } + } + } + } + for (int var11 = 0; var11 < var6; var11++) + { + Block var12s = par1World.getBlock(par3, par4 + var11, par5); + int var12 = Block.getIdFromBlock(var12s); + if ((var12 == 0) || (var12s == Blocks.air)) + { + par1World.setBlock(par3, par4 + var11, par5, Blocks.cactus, this.metaWood, 2); + if ((this.vinesGrow) && (var11 > 0)) + { + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 - 1, par4 + var11, par5))) { + par1World.setBlock(par3 - 1, par4 + var11, par5, Blocks.air, 8, 2); + } + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3 + 1, par4 + var11, par5))) { + par1World.setBlock(par3 + 1, par4 + var11, par5, Blocks.air, 2, 2); + } + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 - 1))) { + par1World.setBlock(par3, par4 + var11, par5 - 1, Blocks.air, 1, 2); + } + if ((par2Random.nextInt(3) > 0) && (par1World.isAirBlock(par3, par4 + var11, par5 + 1))) { + par1World.setBlock(par3, par4 + var11, par5 + 1, Blocks.air, 4, 2); + } + } + } + } + if (this.vinesGrow) + { + for (int var11 = par4 - 3 + var6; var11 <= par4 + var6; var11++) + { + int var12 = var11 - (par4 + var6); + int var13 = 2 - var12 / 2; + for (int var14 = par3 - var13; var14 <= par3 + var13; var14++) { + for (int var15 = par5 - var13; var15 <= par5 + var13; var15++) { + if (par1World.getBlock(var14, var11, var15) == Blocks.air) + { + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14 - 1, var11, var15)) == 0)) { + growVines(par1World, var14 - 1, var11, var15, 8); + } + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14 + 1, var11, var15)) == 0)) { + growVines(par1World, var14 + 1, var11, var15, 2); + } + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 - 1)) == 0)) { + growVines(par1World, var14, var11, var15 - 1, 1); + } + if ((par2Random.nextInt(4) == 0) && + (Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 + 1)) == 0)) { + growVines(par1World, var14, var11, var15 + 1, 4); + } + } + } + } + } + if ((par2Random.nextInt(5) == 0) && (var6 > 5)) { + for (int var11 = 0; var11 < 2; var11++) { + for (int var12 = 0; var12 < 4; var12++) { + if (par2Random.nextInt(4 - var11) == 0) + { + int var13 = par2Random.nextInt(3); + par1World.setBlock(par3 + net.minecraft.util.Direction.offsetX[net.minecraft.util.Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + net.minecraft.util.Direction.offsetZ[net.minecraft.util.Direction.rotateOpposite[var12]], Blocks.air, var13 << 2 | var12, 2); + } + } + } + } + } + return true; + } + return false; + } + return false; + } + + private void growVines(World par1World, int par2, int par3, int par4, int par5) + { + par1World.setBlock(par2, par3, par4, Blocks.vine, par5, 2); + int var6 = 4; + for (;;) + { + par3--; + if ((Block.getIdFromBlock(par1World.getBlock(par2, par3, par4)) != 0) || (var6 <= 0)) { + return; + } + par1World.setBlock(par2, par3, par4, Blocks.air, par5, 2); + var6--; + } + } + } + + } + +} diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java new file mode 100644 index 0000000000..bfb0fb8631 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianDesert_Ex.java @@ -0,0 +1,65 @@ +package gtPlusPlus.australia.biome.type; + +import java.util.Random; + +import gtPlusPlus.australia.biome.CustomDecorator; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenDesert; +import net.minecraft.world.gen.feature.WorldGenDesertWells; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianDesert_Ex extends BiomeGenDesert { + + public Biome_AustralianDesert_Ex(int aID) + { + super(aID); + this.spawnableCreatureList.clear(); + this.topBlock = Blocks.sand; + this.fillerBlock = Blocks.sand; + this.theBiomeDecorator.treesPerChunk = -999; + this.theBiomeDecorator.deadBushPerChunk = 2; + this.theBiomeDecorator.reedsPerChunk = 50; + this.theBiomeDecorator.cactiPerChunk = 20; + this.setColor(16421912); + this.setBiomeName("Australian Desert III"); + this.setDisableRain(); + this.setTemperatureRainfall(2.0F, 0.0F); + this.setHeight(height_LowPlains); + this.spawnableCreatureList.clear(); + } + + public static Biome_AustralianDesert_Ex biome = new Biome_AustralianDesert_Ex(CORE.AUSTRALIA_BIOME_DESERT_3_ID); + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); + BiomeManager.addSpawnBiome(biome); + } + + public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) + { + super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); + + if (p_76728_2_.nextInt(850) == 0) + { + int k = p_76728_3_ + p_76728_2_.nextInt(16) + 8; + int l = p_76728_4_ + p_76728_2_.nextInt(16) + 8; + WorldGenDesertWells worldgendesertwells = new WorldGenDesertWells(); + worldgendesertwells.generate(p_76728_1_, p_76728_2_, k, p_76728_1_.getHeightValue(k, l) + 1, l); + } + } + + /** + * Allocate a new BiomeDecorator for this BiomeGenBase + */ + @Override + public BiomeDecorator createBiomeDecorator() + { + return getModdedBiomeDecorator(new CustomDecorator()); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java new file mode 100644 index 0000000000..c00fd5edef --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianForest.java @@ -0,0 +1,198 @@ +package gtPlusPlus.australia.biome.type; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.australia.biome.CustomDecorator; +import gtPlusPlus.australia.gen.world.WorldGenAustralianTrees; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; + +import java.util.Random; +import net.minecraft.block.BlockFlower; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.BiomeGenForest; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraft.world.gen.feature.WorldGenBigMushroom; +import net.minecraft.world.gen.feature.WorldGenCanopyTree; +import net.minecraft.world.gen.feature.WorldGenForest; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianForest extends BiomeGenForest { + + private int mWoodMeta; + protected static final WorldGenForest mGenTreeForest = new WorldGenForest(false, true); + protected static final WorldGenForest mGenTreeForest2 = new WorldGenForest(false, false); + protected static final WorldGenCanopyTree mGenTreeCanopy = new WorldGenCanopyTree(false); + protected static final WorldGenAustralianTrees mGenTreeAustralian = new WorldGenAustralianTrees(true); + + public static Biome_AustralianForest biome = new Biome_AustralianForest(CORE.AUSTRALIA_BIOME_FOREST_ID, 2); + + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.FOREST); + BiomeManager.addSpawnBiome(biome); + } + + public Biome_AustralianForest(int p_i45377_1_, int aWoodMeta) { + super(p_i45377_1_, aWoodMeta); + this.mWoodMeta = aWoodMeta; + this.setColor(353825); + this.setBiomeName("Australian Forest"); + this.setTemperatureRainfall(1.1F, 0.75F); + this.theBiomeDecorator.treesPerChunk = 16; + this.theBiomeDecorator.grassPerChunk = 5; + this.theBiomeDecorator.flowersPerChunk = 2; + this.func_76733_a(5159473); + this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 5, 4, 4)); + } + + public BiomeGenBase func_150557_a(int p_150557_1_, boolean p_150557_2_) { + if (this.mWoodMeta == 2) { + this.field_150609_ah = 353825; + this.color = p_150557_1_; + + if (p_150557_2_) { + this.field_150609_ah = (this.field_150609_ah & 16711422) >> 1; + } + + return this; + } else { + return super.func_150557_a(p_150557_1_, p_150557_2_); + } + } + + public WorldGenAbstractTree func_150567_a(Random p_150567_1_) { + int mTreeType = MathUtils.getRandomFromArray(new int[] { + 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5 + }); + if (mTreeType == 0) { + return mGenTreeCanopy; + } + else if (mTreeType == 1) { + return mGenTreeAustralian; + } + else if (mTreeType == 2) { + return mGenTreeForest; + } + else if (mTreeType == 3) { + return mGenTreeForest2; + } + else if (mTreeType == 4) { + return this.worldGeneratorSwamp; + } + else { + return MathUtils.randInt(0, 1) == 0 ? this.worldGeneratorTrees : this.worldGeneratorBigTree; + } + } + + public String func_150572_a(Random p_150572_1_, int p_150572_2_, int p_150572_3_, int p_150572_4_) { + if (this.mWoodMeta == 1) { + double d0 = MathHelper.clamp_double( + (1.0D + plantNoise.func_151601_a((double) p_150572_2_ / 48.0D, (double) p_150572_4_ / 48.0D)) + / 2.0D, + 0.0D, 0.9999D); + int l = (int) (d0 * (double) BlockFlower.field_149859_a.length); + + if (l == 1) { + l = 0; + } + + return BlockFlower.field_149859_a[l]; + } else { + return super.func_150572_a(p_150572_1_, p_150572_2_, p_150572_3_, p_150572_4_); + } + } + + public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) { + int k; + int l; + int i1; + int j1; + int k1; + + if (this.mWoodMeta == 3) { + for (k = 0; k < 4; ++k) { + for (l = 0; l < 4; ++l) { + i1 = p_76728_3_ + k * 4 + 1 + 8 + p_76728_2_.nextInt(3); + j1 = p_76728_4_ + l * 4 + 1 + 8 + p_76728_2_.nextInt(3); + k1 = p_76728_1_.getHeightValue(i1, j1); + + if (p_76728_2_.nextInt(20) == 0) { + WorldGenBigMushroom worldgenbigmushroom = new WorldGenBigMushroom(); + worldgenbigmushroom.generate(p_76728_1_, p_76728_2_, i1, k1, j1); + } else { + WorldGenAbstractTree worldgenabstracttree = this.func_150567_a(p_76728_2_); + worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); + + if (worldgenabstracttree.generate(p_76728_1_, p_76728_2_, i1, k1, j1)) { + worldgenabstracttree.func_150524_b(p_76728_1_, p_76728_2_, i1, k1, j1); + } + } + } + } + } + + k = p_76728_2_.nextInt(5) - 3; + + if (this.mWoodMeta == 1) { + k += 2; + } + + l = 0; + + while (l < k) { + i1 = p_76728_2_.nextInt(3); + + if (i1 == 0) { + genTallFlowers.func_150548_a(1); + } else if (i1 == 1) { + genTallFlowers.func_150548_a(4); + } else if (i1 == 2) { + genTallFlowers.func_150548_a(5); + } + + j1 = 0; + + while (true) { + if (j1 < 5) { + k1 = p_76728_3_ + p_76728_2_.nextInt(16) + 8; + int i2 = p_76728_4_ + p_76728_2_.nextInt(16) + 8; + int l1 = p_76728_2_.nextInt(p_76728_1_.getHeightValue(k1, i2) + 32); + + if (!genTallFlowers.generate(p_76728_1_, p_76728_2_, k1, l1, i2)) { + ++j1; + continue; + } + } + + ++l; + break; + } + } + + super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); + } + + /** + * Provides the basic grass color based on the biome temperature and rainfall + */ + @SideOnly(Side.CLIENT) + public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_) { + int l = super.getBiomeGrassColor(p_150558_1_, p_150558_2_, p_150558_3_); + return this.mWoodMeta == 3 ? (l & 16711422) + 2634762 >> 1 : l; + } + + /** + * Allocate a new BiomeDecorator for this BiomeGenBase + */ + @Override + public BiomeDecorator createBiomeDecorator() + { + return getModdedBiomeDecorator(new CustomDecorator()); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java new file mode 100644 index 0000000000..ebfb455882 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOcean.java @@ -0,0 +1,52 @@ +package gtPlusPlus.australia.biome.type; + +import java.util.Random; + +import gtPlusPlus.australia.biome.CustomDecorator; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.BiomeGenOcean; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianOcean extends BiomeGenOcean { + + public Biome_AustralianOcean(int p_i1985_1_) + { + super(p_i1985_1_); + this.setColor(48); + this.setBiomeName("Australian Ocean"); + this.setHeight(height_DeepOceans); + this.spawnableCreatureList.clear(); + } + + public static Biome_AustralianOcean biome = new Biome_AustralianOcean(CORE.AUSTRALIA_BIOME_OCEAN_ID); + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.COLD); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.OCEAN); + BiomeManager.addSpawnBiome(biome); + } + + public BiomeGenBase.TempCategory getTempCategory() + { + return BiomeGenBase.TempCategory.OCEAN; + } + + public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_) + { + super.genTerrainBlocks(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_); + } + + /** + * Allocate a new BiomeDecorator for this BiomeGenBase + */ + @Override + public BiomeDecorator createBiomeDecorator() + { + return getModdedBiomeDecorator(new CustomDecorator()); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java new file mode 100644 index 0000000000..439c213ac7 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianOutback.java @@ -0,0 +1,381 @@ +package gtPlusPlus.australia.biome.type; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.australia.biome.CustomDecorator; +import gtPlusPlus.core.lib.CORE; + +import java.util.Arrays; +import java.util.Random; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.BiomeGenMesa; +import net.minecraft.world.gen.NoiseGeneratorPerlin; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianOutback extends BiomeGenMesa +{ + private byte[] field_150621_aC; + private long field_150622_aD; + private NoiseGeneratorPerlin field_150623_aE; + private NoiseGeneratorPerlin field_150624_aF; + private NoiseGeneratorPerlin field_150625_aG; + private boolean field_150626_aH; + private boolean field_150620_aI; + + public Biome_AustralianOutback(int p_i45380_1_){ + super(p_i45380_1_, false, false); + this.setColor(14238997); + this.setBiomeName("Australian Outback"); + this.field_150626_aH = false; + this.field_150620_aI = false; + this.theBiomeDecorator.generateLakes = false; + this.setDisableRain(); + this.setTemperatureRainfall(2.0F, 0.0F); + this.spawnableCreatureList.clear(); + this.topBlock = Blocks.sand; + this.field_150604_aj = 1; + this.fillerBlock = Blocks.stained_hardened_clay; + this.theBiomeDecorator.deadBushPerChunk = 20; + this.theBiomeDecorator.reedsPerChunk = 3; + this.theBiomeDecorator.cactiPerChunk = 20; + this.theBiomeDecorator.flowersPerChunk = 0; + this.spawnableCreatureList.clear(); + this.theBiomeDecorator.treesPerChunk = 5; + } + + public static Biome_AustralianOutback biome = new Biome_AustralianOutback(CORE.AUSTRALIA_BIOME_OUTBACK_ID); + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.HOT); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DESERT); + BiomeManager.addSpawnBiome(biome); + } + + public WorldGenAbstractTree func_150567_a(Random p_150567_1_) + { + return this.worldGeneratorTrees; + } + + public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) + { + super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); + } + + public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_) + { + if (this.field_150621_aC == null || this.field_150622_aD != p_150573_1_.getSeed()) + { + this.func_150619_a(p_150573_1_.getSeed()); + } + + if (this.field_150623_aE == null || this.field_150624_aF == null || this.field_150622_aD != p_150573_1_.getSeed()) + { + Random random1 = new Random(this.field_150622_aD); + this.field_150623_aE = new NoiseGeneratorPerlin(random1, 3); + this.field_150624_aF = new NoiseGeneratorPerlin(random1, 3); + } + + this.field_150622_aD = p_150573_1_.getSeed(); + double d5 = 0.0D; + int k; + int l; + + if (this.field_150626_aH) + { + k = (p_150573_5_ & -16) + (p_150573_6_ & 15); + l = (p_150573_6_ & -16) + (p_150573_5_ & 15); + double d1 = Math.min(Math.abs(p_150573_7_), this.field_150623_aE.func_151601_a((double)k * 0.25D, (double)l * 0.25D)); + + if (d1 > 0.0D) + { + double d2 = 0.001953125D; + double d3 = Math.abs(this.field_150624_aF.func_151601_a((double)k * d2, (double)l * d2)); + d5 = d1 * d1 * 2.5D; + double d4 = Math.ceil(d3 * 50.0D) + 32.0D; + + if (d5 > d4) + { + d5 = d4; + } + + d5 += 64.0D; + } + } + + k = p_150573_5_ & 15; + l = p_150573_6_ & 15; + boolean flag = true; + Block block = Blocks.stained_hardened_clay; + Block block2 = this.fillerBlock; + int i1 = (int)(p_150573_7_ / 3.0D + 3.0D + p_150573_2_.nextDouble() * 0.25D); + boolean flag1 = Math.cos(p_150573_7_ / 3.0D * Math.PI) > 0.0D; + int j1 = -1; + boolean flag2 = false; + int k1 = p_150573_3_.length / 256; + + for (int l1 = 255; l1 >= 0; --l1) + { + int i2 = (l * 16 + k) * k1 + l1; + + if ((p_150573_3_[i2] == null || p_150573_3_[i2].getMaterial() == Material.air) && l1 < (int)d5) + { + p_150573_3_[i2] = Blocks.stone; + } + + if (l1 <= 0 + p_150573_2_.nextInt(5)) + { + p_150573_3_[i2] = Blocks.bedrock; + } + else + { + Block block1 = p_150573_3_[i2]; + + if (block1 != null && block1.getMaterial() != Material.air) + { + if (block1 == Blocks.stone) + { + byte b0; + + if (j1 == -1) + { + flag2 = false; + + if (i1 <= 0) + { + block = null; + block2 = Blocks.stone; + } + else if (l1 >= 59 && l1 <= 64) + { + block = Blocks.stained_hardened_clay; + block2 = this.fillerBlock; + } + + if (l1 < 63 && (block == null || block.getMaterial() == Material.air)) + { + block = Blocks.sandstone; + } + + j1 = i1 + Math.max(0, l1 - 63); + + if (l1 >= 62) + { + if (this.field_150620_aI && l1 > 86 + i1 * 2) + { + if (flag1) + { + p_150573_3_[i2] = Blocks.dirt; + p_150573_4_[i2] = 1; + } + else + { + p_150573_3_[i2] = Blocks.grass; + } + } + else if (l1 > 66 + i1) + { + b0 = 16; + + if (l1 >= 64 && l1 <= 127) + { + if (!flag1) + { + b0 = this.func_150618_d(p_150573_5_, l1, p_150573_6_); + } + } + else + { + b0 = 1; + } + + if (b0 < 16) + { + p_150573_3_[i2] = Blocks.stained_hardened_clay; + p_150573_4_[i2] = (byte)b0; + } + else + { + p_150573_3_[i2] = Blocks.hardened_clay; + } + } + else + { + p_150573_3_[i2] = this.topBlock; + p_150573_4_[i2] = (byte)this.field_150604_aj; + flag2 = true; + } + } + else + { + p_150573_3_[i2] = block2; + + if (block2 == Blocks.stained_hardened_clay) + { + p_150573_4_[i2] = 1; + } + } + } + else if (j1 > 0) + { + --j1; + + if (flag2) + { + p_150573_3_[i2] = Blocks.stained_hardened_clay; + p_150573_4_[i2] = 1; + } + else + { + b0 = this.func_150618_d(p_150573_5_, l1, p_150573_6_); + + if (b0 < 16) + { + p_150573_3_[i2] = Blocks.stained_hardened_clay; + p_150573_4_[i2] = b0; + } + else + { + p_150573_3_[i2] = Blocks.hardened_clay; + } + } + } + } + } + else + { + j1 = -1; + } + } + } + super.genTerrainBlocks(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_); + } + + public void func_150619_a(long p_150619_1_) + { + this.field_150621_aC = new byte[128]; + Arrays.fill(this.field_150621_aC, (byte)16); + Random random = new Random(p_150619_1_); + this.field_150625_aG = new NoiseGeneratorPerlin(random, 3); + int j; + + for (j = 0; j < 128; ++j) + { + j += random.nextInt(8) + 1; + + if (j < 128) + { + this.field_150621_aC[j] = 1; + } + } + + j = random.nextInt(7) + 2; + int k; + int l; + int i1; + int j1; + + for (k = 0; k < j; ++k) + { + l = random.nextInt(7) + 1; + i1 = random.nextInt(128); + + for (j1 = 0; i1 + j1 < 128 && j1 < l; ++j1) + { + this.field_150621_aC[i1 + j1] = 4; + } + } + + k = random.nextInt(6) + 2; + int k1; + + for (l = 0; l < k; ++l) + { + i1 = random.nextInt(7) + 2; + j1 = random.nextInt(128); + + for (k1 = 0; j1 + k1 < 128 && k1 < i1; ++k1) + { + this.field_150621_aC[j1 + k1] = 12; + } + } + + l = random.nextInt(7) + 2; + + for (i1 = 0; i1 < l; ++i1) + { + j1 = random.nextInt(5) + 1; + k1 = random.nextInt(128); + + for (int l1 = 0; k1 + l1 < 128 && l1 < j1; ++l1) + { + this.field_150621_aC[k1 + l1] = 14; + } + } + + i1 = random.nextInt(8) + 3; + j1 = 0; + + for (k1 = 0; k1 < i1; ++k1) + { + byte b0 = 1; + j1 += random.nextInt(8) + 4; + + for (int i2 = 0; j1 + i2 < 128 && i2 < b0; ++i2) + { + this.field_150621_aC[j1 + i2] = 0; + + if (j1 + i2 > 1 && random.nextBoolean()) + { + this.field_150621_aC[j1 + i2 - 1] = 8; + } + + if (j1 + i2 < 63 && random.nextBoolean()) + { + this.field_150621_aC[j1 + i2 + 1] = 8; + } + } + } + } + + /** + * Provides the basic foliage color based on the biome temperature and rainfall + */ + @SideOnly(Side.CLIENT) + public int getBiomeFoliageColor(int p_150571_1_, int p_150571_2_, int p_150571_3_) + { + return 10387789; + } + + /** + * Provides the basic grass color based on the biome temperature and rainfall + */ + @SideOnly(Side.CLIENT) + public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_) + { + return 9470285; + } + + public byte func_150618_d(int p_150618_1_, int p_150618_2_, int p_150618_3_) + { + int l = (int)Math.round(this.field_150625_aG.func_151601_a((double)p_150618_1_ * 1.0D / 512.0D, (double)p_150618_1_ * 1.0D / 512.0D) * 2.0D); + return this.field_150621_aC[(p_150618_2_ + l + 64) % 64]; + } + + /** + * Allocate a new BiomeDecorator for this BiomeGenBase + */ + @Override + public BiomeDecorator createBiomeDecorator() + { + return getModdedBiomeDecorator(new CustomDecorator()); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java new file mode 100644 index 0000000000..c04f211fd3 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/biome/type/Biome_AustralianPlains.java @@ -0,0 +1,122 @@ +package gtPlusPlus.australia.biome.type; + +import java.util.Random; + +import gtPlusPlus.australia.biome.CustomDecorator; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.BlockFlower; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.BiomeGenPlains; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_AustralianPlains extends BiomeGenPlains +{ + + public Biome_AustralianPlains(int p_i1986_1_) + { + super(p_i1986_1_); + this.setTemperatureRainfall(0.8F, 0.4F); + this.setColor(9286496); + this.setBiomeName("Plainlands"); + this.setHeight(height_LowPlains); + this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 2, 6)); + this.theBiomeDecorator.treesPerChunk = 1; + this.theBiomeDecorator.flowersPerChunk = 4; + this.theBiomeDecorator.grassPerChunk = 20; + this.flowers.clear(); + this.addFlower(Blocks.red_flower, 4, 3); + this.addFlower(Blocks.red_flower, 5, 3); + this.addFlower(Blocks.red_flower, 6, 3); + this.addFlower(Blocks.red_flower, 7, 3); + this.addFlower(Blocks.red_flower, 0, 20); + this.addFlower(Blocks.red_flower, 3, 20); + this.addFlower(Blocks.red_flower, 8, 20); + this.addFlower(Blocks.yellow_flower, 0, 30); + } + + public static Biome_AustralianPlains biome = new Biome_AustralianPlains(CORE.AUSTRALIA_BIOME_PLAINS_ID); + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DRY); + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.SPARSE); + BiomeManager.addSpawnBiome(biome); + } + + public String func_150572_a(Random p_150572_1_, int p_150572_2_, int p_150572_3_, int p_150572_4_) + { + double d0 = plantNoise.func_151601_a((double)p_150572_2_ / 200.0D, (double)p_150572_4_ / 200.0D); + int l; + + if (d0 < -0.8D) + { + l = p_150572_1_.nextInt(4); + return BlockFlower.field_149859_a[4 + l]; + } + else if (p_150572_1_.nextInt(3) > 0) + { + l = p_150572_1_.nextInt(3); + return l == 0 ? BlockFlower.field_149859_a[0] : (l == 1 ? BlockFlower.field_149859_a[3] : BlockFlower.field_149859_a[8]); + } + else + { + return BlockFlower.field_149858_b[0]; + } + } + + public void decorate(World aWorld, Random aRand, int aX, int aZ) + { + double d0 = plantNoise.func_151601_a((double)(aX + 8) / 200.0D, (double)(aZ + 8) / 200.0D); + int k; + int l; + int i1; + int j1; + + if (d0 < -0.8D) + { + this.theBiomeDecorator.flowersPerChunk = 15; + this.theBiomeDecorator.grassPerChunk = 5; + } + else + { + this.theBiomeDecorator.flowersPerChunk = 4; + this.theBiomeDecorator.grassPerChunk = 10; + genTallFlowers.func_150548_a(2); + + for (k = 0; k < 7; ++k) + { + l = aX + aRand.nextInt(16) + 8; + i1 = aZ + aRand.nextInt(16) + 8; + j1 = aRand.nextInt(aWorld.getHeightValue(l, i1) + 32); + genTallFlowers.generate(aWorld, aRand, l, j1, i1); + } + } + + if (this.field_150628_aC) + { + genTallFlowers.func_150548_a(0); + + for (k = 0; k < 10; ++k) + { + l = aX + aRand.nextInt(16) + 8; + i1 = aZ + aRand.nextInt(16) + 8; + j1 = aRand.nextInt(aWorld.getHeightValue(l, i1) + 32); + genTallFlowers.generate(aWorld, aRand, l, j1, i1); + } + } + + this.theBiomeDecorator.decorateChunk(aWorld, aRand, this, aX, aZ); + } + + /** + * Allocate a new BiomeDecorator for this BiomeGenBase + */ + @Override + public BiomeDecorator createBiomeDecorator() + { + return getModdedBiomeDecorator(new CustomDecorator()); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/block/AustraliaContentLoader.java b/src/main/java/gtPlusPlus/australia/block/AustraliaContentLoader.java new file mode 100644 index 0000000000..0df84500e1 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/block/AustraliaContentLoader.java @@ -0,0 +1,67 @@ +package gtPlusPlus.australia.block; + +import static gtPlusPlus.australia.dimension.Dimension_Australia.*; + +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.australia.biome.type.Biome_AustralianDesert; +import gtPlusPlus.australia.biome.type.Biome_AustralianDesert2; +import gtPlusPlus.australia.item.ItemAustraliaPortalTrigger; +import gtPlusPlus.australia.item.ItemBlockAustralia; + +public class AustraliaContentLoader { + + private static Block blockAustralianSand; + private static Block blockAustralianTopSoil; + + public static AutoMap mValidGenerationBlocks = new AutoMap(); + + public synchronized static void run() { + initMisc(); + initItems(); + initBlocks(); + } + + public synchronized static boolean initMisc(){ + return true; + } + + public synchronized static boolean initItems(){ + portalItem = (ItemAustraliaPortalTrigger) (new ItemAustraliaPortalTrigger().setUnlocalizedName("australia.trigger")); + GameRegistry.registerItem(portalItem, "australia.trigger"); + return true; + } + + public synchronized static boolean initBlocks(){ + + //Create Block Instances + portalBlock = new BlockAustraliaPortal(); + blockPortalFrame = new BlockDarkWorldPortalFrame(); + blockAustralianSand = new BlockAustraliaSand(); + blockAustralianTopSoil = new BlockAustraliaTopSoil(); + mValidGenerationBlocks.put(blockAustralianSand); + mValidGenerationBlocks.put(blockAustralianTopSoil); + + //Registry + GameRegistry.registerBlock(portalBlock, ItemBlockAustralia.class, "dimensionAustraliaPortalBlock"); + GameRegistry.registerBlock(blockPortalFrame, ItemBlockAustralia.class, "blockAustraliaPortalFrame"); + + GameRegistry.registerBlock(blockAustralianSand, ItemBlockAustralia.class, "blockAustralianTopSoil"); + GameRegistry.registerBlock(blockAustralianTopSoil, ItemBlockAustralia.class, "blockAustralianSand"); + + //Set Biome Blocks up + Biome_AustralianDesert.blockFluidLakes = Blocks.water; + Biome_AustralianDesert.blockTopLayer = blockAustralianSand; + Biome_AustralianDesert.blockSecondLayer = blockAustralianTopSoil; + + Biome_AustralianDesert2.blockFluidLakes = Blocks.water; + Biome_AustralianDesert2.blockTopLayer = blockAustralianSand; + Biome_AustralianDesert2.blockSecondLayer = blockAustralianTopSoil; + + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/australia/block/BlockAustraliaPortal.java b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaPortal.java new file mode 100644 index 0000000000..44ece25e43 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaPortal.java @@ -0,0 +1,403 @@ +package gtPlusPlus.australia.block; + +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockBreakable; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.australia.dimension.Dimension_Australia; +import gtPlusPlus.australia.world.AustraliaTeleporterDimensionMod; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class BlockAustraliaPortal extends BlockBreakable implements ITileTooltip{ + IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null; + + public BlockAustraliaPortal() { + super("portal", Material.portal, false); + this.setTickRandomly(true); + this.setHardness(-1.0F); + this.setLightLevel(0.75F); + this.setCreativeTab(CreativeTabs.tabBlock); + this.setBlockName("dimensionAustraliaPortalBlock"); + + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int i, int par2) { + + if (i == 0) + return gor; + + else if (i == 1) + return dol; + + else if (i == 2) + return st1; + + else if (i == 3) + return st2; + + else if (i == 4) + return st4; + + else if (i == 5) + return st3; + + else + return gor; + + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister reg) { + this.gor = reg.registerIcon("portal"); + this.dol = reg.registerIcon("portal"); + this.st1 = reg.registerIcon("portal"); + this.st2 = reg.registerIcon("portal"); + this.st3 = reg.registerIcon("portal"); + this.st4 = reg.registerIcon("portal"); + } + + /** + * Ticks the block if it's been scheduled + */ + @Override + public void updateTick(World par1World, int x, int y, int z, Random par5Random) { + super.updateTick(par1World, x, y, z, par5Random); + + int blockCount = 0; + BlockPos portal = new BlockPos(x, y, z, par1World.provider.dimensionId); + + for (BlockPos side : portal.getSurroundingBlocks()) { + Block b = side.getBlockAtPos(); + if (b == Dimension_Australia.blockPortalFrame || b == Dimension_Australia.portalBlock) { + blockCount++; + } + } + if (blockCount < 4) { + par1World.setBlockToAir(x, y, z); + } + + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means + * this box can change after the pool has been cleared to be reused) + */ + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { + return null; + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, + * y, z + */ + @Override + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { + float f; + float f1; + if (par1IBlockAccess.getBlock(par2 - 1, par3, par4) != this && par1IBlockAccess.getBlock(par2 + 1, par3, par4) != this) { + f = 0.125F; + f1 = 0.5F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); + } else { + f = 0.5F; + f1 = 0.125F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); + } + } + + /** + * Is this block (a) opaque and (B) a full 1m cube? This determines + * whether or not to render the shared face of two adjacent blocks and + * also whether the player can attach torches, redstone wire, etc to + * this block. + */ + @Override + public boolean isOpaqueCube() { + return false; + } + + /** + * If this block doesn't render as an ordinary block it will return + * False (examples: signs, buttons, stairs, etc) + */ + @Override + public boolean renderAsNormalBlock() { + return false; + } + + /** + * Checks to see if this location is valid to create a portal and will + * return True if it does. Args: world, x, y, z + */ + public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) { + byte b0 = 0; + byte b1 = 0; + if (par1World.getBlock(par2 - 1, par3, par4) == Dimension_Australia.blockPortalFrame + || par1World.getBlock(par2 + 1, par3, par4) == Dimension_Australia.blockPortalFrame) { + b0 = 1; + } + if (par1World.getBlock(par2, par3, par4 - 1) == Dimension_Australia.blockPortalFrame + || par1World.getBlock(par2, par3, par4 + 1) == Dimension_Australia.blockPortalFrame) { + b1 = 1; + } + if (b0 == b1) { + return false; + } else { + if (par1World.getBlock(par2 - b0, par3, par4 - b1) == Blocks.air) { + par2 -= b0; + par4 -= b1; + } + int l; + int i1; + for (l = -1; l <= 2; ++l) { + for (i1 = -1; i1 <= 3; ++i1) { + boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3; + if (l != -1 && l != 2 || i1 != -1 && i1 != 3) { + Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); + if (flag) { + if (j1 != Dimension_Australia.blockPortalFrame) { + return false; + } + } + /* + * else if (j1 != 0 && j1 != + * Main.TutorialFire.blockID) { return false; } + */ + } + } + } + for (l = 0; l < 2; ++l) { + for (i1 = 0; i1 < 3; ++i1) { + par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, this, 0, 2); + } + } + return true; + } + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know + * which neighbor changed (coordinates passed are their own) Args: x, y, + * z, neighbor blockID + */ + public void onNeighborBlockChange(BlockPos pos) { + int x = pos.xPos, y = pos.yPos, z = pos.zPos; + //Logger.INFO("Trigger"); + int blockCount = 0; + BlockPos portal = pos; + World par1World = portal.world; + for (BlockPos side : portal.getSurroundingBlocks()) { + Block b = side.getBlockAtPos(); + if (b == Dimension_Australia.blockPortalFrame || b == Dimension_Australia.portalBlock) { + blockCount++; + } + } + if (blockCount < 4) { + par1World.setBlockToAir(x, y, z); + par1World.scheduleBlockUpdate(x, y, z, portal.getBlockAtPos(), 0); + } + + + + byte b0 = 0; + byte b1 = 1; + if (par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this) { + b0 = 1; + b1 = 0; + } + int i1; + for (i1 = y; par1World.getBlock(x, i1 - 1, z) == this; --i1) { + ; + } + if (par1World.getBlock(x, i1 - 1, z) != Dimension_Australia.blockPortalFrame) { + par1World.setBlockToAir(x, y, z); + } else { + int j1; + for (j1 = 1; j1 < 4 && par1World.getBlock(x, i1 + j1, z) == this; ++j1) { + ; + } + if (j1 == 3 && par1World.getBlock(x, i1 + j1, z) == Dimension_Australia.blockPortalFrame) { + boolean flag = par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this; + boolean flag1 = par1World.getBlock(x, y, z - 1) == this || par1World.getBlock(x, y, z + 1) == this; + if (flag && flag1) { + par1World.setBlockToAir(x, y, z); + } else { + if ((par1World.getBlock(x + b0, y, z + b1) != Dimension_Australia.blockPortalFrame || par1World + .getBlock(x - b0, y, z - b1) != this) + && (par1World.getBlock(x - b0, y, z - b1) != Dimension_Australia.blockPortalFrame || par1World.getBlock(x + b0, y, + z + b1) != this)) { + par1World.setBlockToAir(x, y, z); + } + } + } else { + par1World.setBlockToAir(x, y, z); + } + } + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + onNeighborBlockChange(new BlockPos(x, y, z, world.provider.dimensionId)); + super.onNeighborBlockChange(world, x, y, z, block); + } + + /*@Override + public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) { + onNeighborBlockChange(new BlockPos(x, y, z, world.)); + super.onNeighborChange(world, x, y, z, tileX, tileY, tileZ); + }*/ + + @Override + @SideOnly(Side.CLIENT) + /** + * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given + * coordinates. Args: blockAccess, x, y, z, side + */ + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { + if (par1IBlockAccess.getBlock(par2, par3, par4) == this) { + return false; + } else { + boolean flag = par1IBlockAccess.getBlock(par2 - 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 - 2, par3, par4) != this; + boolean flag1 = par1IBlockAccess.getBlock(par2 + 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 + 2, par3, par4) != this; + boolean flag2 = par1IBlockAccess.getBlock(par2, par3, par4 - 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 - 2) != this; + boolean flag3 = par1IBlockAccess.getBlock(par2, par3, par4 + 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this; + boolean flag4 = flag || flag1; + boolean flag5 = flag2 || flag3; + return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3)); + } + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(Random par1Random) { + return 0; + } + + /** + * Triggered whenever an entity collides with this block (enters into + * the block). Args: world, x, y, z, entity + */ + @Override + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { + if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { + EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity; + if (thePlayer.timeUntilPortal > 0) { + thePlayer.timeUntilPortal = 100; + } else if (thePlayer.dimension != Dimension_Australia.DIMID) { + thePlayer.timeUntilPortal = 100; + thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, Dimension_Australia.DIMID, + new AustraliaTeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(Dimension_Australia.DIMID))); + } else { + thePlayer.timeUntilPortal = 100; + thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, + new AustraliaTeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(0))); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + /** + * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha + */ + public int getRenderBlockPass() { + return 1; + } + + @Override + @SideOnly(Side.CLIENT) + /** + * A randomly called display update to be able to add particles or other items for display + */ + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { + if (CORE.RANDOM.nextInt(100) == 0) { + par1World.playSound(par2 + 0.5D, par3 + 0.5D, par4 + 0.5D, "portal.portal", 0.5F, + CORE.RANDOM.nextFloat() * 0.4F + 0.8F, false); + } + for (int l = 0; l < 4; ++l) { + double d0 = par2 + CORE.RANDOM.nextFloat(); + double d1 = par3 + CORE.RANDOM.nextFloat(); + double d2 = par4 + CORE.RANDOM.nextFloat(); + double d3 = 0.0D; + double d4 = 0.0D; + double d5 = 0.0D; + int i1 = CORE.RANDOM.nextInt(2) * 2 - 1; + d3 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; + d4 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; + d5 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; + if (par1World.getBlock(par2 - 1, par3, par4) != this && par1World.getBlock(par2 + 1, par3, par4) != this) { + d0 = par2 + 0.5D + 0.25D * i1; + d3 = CORE.RANDOM.nextFloat() * 2.0F * i1; + } else { + d2 = par4 + 0.5D + 0.25D * i1; + d5 = CORE.RANDOM.nextFloat() * 2.0F * i1; + } + par1World.spawnParticle("reddust", d0+0.1D, d1, d2, d3, d4, d5); + par1World.spawnParticle("smoke", d0, d1+0.1D, d2, 0, 0, 0); + + Random R = new Random(); + + if (R.nextInt(10) == 0){ + par1World.spawnParticle("largesmoke", d0, d1, d2, 0, 0+0.2D, 0); + } + else if (R.nextInt(5)==1){ + par1World.spawnParticle("flame", d0, d1, d2, 0, 0+0.1D, 0); + } + } + } + + @SideOnly(Side.CLIENT) + /** + * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) + */ + public int idPicked(World par1World, int par2, int par3, int par4) { + return 0; + } + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + return Utils.rgbtoHexValue(0, 255, 0); + } + + @Override + public int getRenderColor(final int aMeta) { + return Utils.rgbtoHexValue(0, 255, 0); + } + + @Override + public String getLocalizedName() { + return EnumChatFormatting.OBFUSCATED+super.getLocalizedName(); + } + + @Override + public int getTooltipID() { + return 1; + } +} + + diff --git a/src/main/java/gtPlusPlus/australia/block/BlockAustraliaSand.java b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaSand.java new file mode 100644 index 0000000000..62d443bc13 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaSand.java @@ -0,0 +1,25 @@ +package gtPlusPlus.australia.block; + +import cpw.mods.fml.common.registry.LanguageRegistry; + +import net.minecraft.block.BlockGrass; +import net.minecraft.block.BlockSand; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; + +public class BlockAustraliaSand extends BlockSand implements ITileTooltip{ + + public BlockAustraliaSand() { + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setBlockName("blockAustralianSand"); + this.setHardness(0.1F); + this.setBlockTextureName("minecraft" + ":" + "sand"); + LanguageRegistry.addName(this, "Sandy Earth"); + } + + @Override + public int getTooltipID() { + return 2; + } + +} diff --git a/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java new file mode 100644 index 0000000000..09c7dbf22d --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/block/BlockAustraliaTopSoil.java @@ -0,0 +1,76 @@ +package gtPlusPlus.australia.block; + +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockDirt; +import net.minecraft.block.BlockSand; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.world.ColorizerGrass; +import net.minecraft.world.IBlockAccess; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; + +public class BlockAustraliaTopSoil extends BlockSand implements ITileTooltip{ + + public BlockAustraliaTopSoil() { + this.setHardness(0.5F); + this.setBlockTextureName("minecraft" + ":" + "dirt"); + this.setCreativeTab(CreativeTabs.tabBlock); + this.setBlockName("blockAustralianTopSoil"); + LanguageRegistry.addName(this, "Desert Earth"); + } + + @Override + @SideOnly(Side.CLIENT) + public int getBlockColor() + { + double d0 = 0.5D; + double d1 = 1.0D; + return ColorizerGrass.getGrassColor(d0, d1); + } + + /** + * Returns the color this block should be rendered. Used by leaves. + */ + @Override + @SideOnly(Side.CLIENT) + public int getRenderColor(int p_149741_1_) + { + return this.getBlockColor(); + } + + /** + * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called + * when first determining what to render. + */ + @Override + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) + { + int l = 0; + int i1 = 0; + int j1 = 0; + + for (int k1 = -1; k1 <= 1; ++k1) + { + for (int l1 = -1; l1 <= 1; ++l1) + { + int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); + l += (i2 & 16711680) >> 16; + i1 += (i2 & 65280) >> 8; + j1 += i2 & 255; + } + } + + return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; + } + + @Override + public int getTooltipID() { + return 3; + } + +} diff --git a/src/main/java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java b/src/main/java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java new file mode 100644 index 0000000000..1de7425f6a --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/block/BlockDarkWorldPortalFrame.java @@ -0,0 +1,30 @@ +package gtPlusPlus.australia.block; + +import cpw.mods.fml.common.registry.LanguageRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip{ + + public BlockDarkWorldPortalFrame() { + super(Material.iron); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setBlockName("blockAustraliaPortalFrame"); + this.setHardness(3.0F); + this.setLightLevel(0.5F); + this.setBlockTextureName(CORE.MODID + ":" + "metro/TEXTURE_TECH_PANEL_A"); + LanguageRegistry.addName(this, "Containment Frame"); + + } + + @Override + public int getTooltipID() { + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java b/src/main/java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java new file mode 100644 index 0000000000..07f5f969e2 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/chunk/ChunkProviderAustralia.java @@ -0,0 +1,821 @@ +package gtPlusPlus.australia.chunk; + +import static net.minecraft.world.gen.structure.MapGenVillage.villageSpawnBiomes; +import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import cpw.mods.fml.common.eventhandler.Event.Result; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.gen.map.MapGenLargeRavine; +import net.minecraft.block.Block; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.util.IProgressUpdate; +import net.minecraft.util.MathHelper; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.SpawnerAnimals; +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.ChunkProviderGenerate; +import net.minecraft.world.gen.MapGenBase; +import net.minecraft.world.gen.MapGenCaves; +import net.minecraft.world.gen.NoiseGenerator; +import net.minecraft.world.gen.NoiseGeneratorOctaves; +import net.minecraft.world.gen.NoiseGeneratorPerlin; +import net.minecraft.world.gen.feature.WorldGenDungeons; +import net.minecraft.world.gen.structure.MapGenMineshaft; +import net.minecraft.world.gen.structure.MapGenScatteredFeature; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.terraingen.ChunkProviderEvent; +import net.minecraftforge.event.terraingen.PopulateChunkEvent; +import net.minecraftforge.event.terraingen.TerrainGen; + +public class ChunkProviderAustralia extends ChunkProviderGenerate implements IChunkProvider { + private Random rand; + private NoiseGeneratorOctaves noiseGen1; + private NoiseGeneratorOctaves noiseGen2; + private NoiseGeneratorOctaves noiseGen3; + private NoiseGeneratorPerlin noiseGen4; + /** + * Reference to the World object. + */ + private World worldObj; + private WorldType worldType; + private final double[] field_147434_q; + private final float[] parabolicField; + private double[] stoneNoise = new double[256]; + private MapGenBase caveGenerator = new MapGenCaves(); + /** + * Holds Stronghold Generator + */ + // private MapGenStronghold strongholdGenerator = new + // MapGenStronghold(); + + /** + * Holds Mineshaft Generator + */ + private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft(); + private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); + /** + * Holds ravine generator + */ + private MapGenBase ravineGenerator = new MapGenLargeRavine(); + /** + * The biomes that are used to generate the chunk + */ + private BiomeGenBase[] biomesForGeneration; + double[] doubleArray1; + double[] doubleArray2; + double[] doubleArray3; + double[] doubleArray4; + + int[][] field_73219_j = new int[32][32]; + Map map; + + // Some Init Field? + { + + try { + List y = new ArrayList(); + if (!villageSpawnBiomes.isEmpty()) { + y.addAll(villageSpawnBiomes); + } + + for (BiomeGenBase h : gtPlusPlus.australia.gen.map.MapGenExtendedVillage.villageSpawnBiomes) { + if (!y.contains(h)) { + if (h instanceof BiomeGenBase) { + try { + y.add(h); + } + catch (Throwable t) {} + } + } + } + if (y.size() > villageSpawnBiomes.size()) { + villageSpawnBiomes = y; + } + } + catch (Throwable t) {} + + caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); + mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT); + scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE); + ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE); + } + + public ChunkProviderAustralia(World par1World, long par2) { + super(par1World, par2, true); + this.worldObj = par1World; + this.worldType = par1World.getWorldInfo().getTerrainType(); + this.rand = new Random(par2); + this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16); + this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16); + this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8); + this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4); + this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); + this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); + this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); + this.field_147434_q = new double[2500]; + this.parabolicField = new float[25]; + for (int j = -2; j <= 2; j++) { + for (int k = -2; k <= 2; k++) { + float f = 10.0F / MathHelper.sqrt_float(j * j + k * k + 0.2F); + this.parabolicField[(j + 2 + (k + 2) * 5)] = f; + } + } + NoiseGenerator[] noiseGens = { this.noiseGen1, this.noiseGen2, this.noiseGen3, this.noiseGen4, this.noiseGen5, + this.noiseGen6, this.mobSpawnerNoise }; + noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens); + this.noiseGen1 = ((NoiseGeneratorOctaves) noiseGens[0]); + this.noiseGen2 = ((NoiseGeneratorOctaves) noiseGens[1]); + this.noiseGen3 = ((NoiseGeneratorOctaves) noiseGens[2]); + this.noiseGen4 = ((NoiseGeneratorPerlin) noiseGens[3]); + this.noiseGen5 = ((NoiseGeneratorOctaves) noiseGens[4]); + this.noiseGen6 = ((NoiseGeneratorOctaves) noiseGens[5]); + this.mobSpawnerNoise = ((NoiseGeneratorOctaves) noiseGens[6]); + } + + public void func_147424_a(int p_147424_1_, int p_147424_2_, Block[] p_147424_3_) { + byte b0 = 63; + this.biomesForGeneration = this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration, + p_147424_1_ * 4 - 2, p_147424_2_ * 4 - 2, 10, 10); + + func_147423_a(p_147424_1_ * 4, 0, p_147424_2_ * 4); + for (int k = 0; k < 4; k++) { + int l = k * 5; + int i1 = (k + 1) * 5; + for (int j1 = 0; j1 < 4; j1++) { + int k1 = (l + j1) * 33; + int l1 = (l + j1 + 1) * 33; + int i2 = (i1 + j1) * 33; + int j2 = (i1 + j1 + 1) * 33; + for (int k2 = 0; k2 < 32; k2++) { + double d0 = 0.125D; + double d1 = this.field_147434_q[(k1 + k2)]; + double d2 = this.field_147434_q[(l1 + k2)]; + double d3 = this.field_147434_q[(i2 + k2)]; + double d4 = this.field_147434_q[(j2 + k2)]; + double d5 = (this.field_147434_q[(k1 + k2 + 1)] - d1) * d0; + double d6 = (this.field_147434_q[(l1 + k2 + 1)] - d2) * d0; + double d7 = (this.field_147434_q[(i2 + k2 + 1)] - d3) * d0; + double d8 = (this.field_147434_q[(j2 + k2 + 1)] - d4) * d0; + for (int l2 = 0; l2 < 8; l2++) { + double d9 = 0.25D; + double d10 = d1; + double d11 = d2; + double d12 = (d3 - d1) * d9; + double d13 = (d4 - d2) * d9; + for (int i3 = 0; i3 < 4; i3++) { + int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2; + short short1 = 256; + j3 -= short1; + double d14 = 0.25D; + double d16 = (d11 - d10) * d14; + double d15 = d10 - d16; + for (int k3 = 0; k3 < 4; k3++) { + if ((d15 += d16) > 0.0D) { + p_147424_3_[(j3 += short1)] = Blocks.stone; + } else if (k2 * 8 + l2 < b0) { + p_147424_3_[(j3 += short1)] = Blocks.water; + } else { + p_147424_3_[(j3 += short1)] = null; + } + } + d10 += d12; + d11 += d13; + } + d1 += d5; + d2 += d6; + d3 += d7; + d4 += d8; + } + } + } + } + } + + public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, + BiomeGenBase[] p_147422_5_) { + ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, + p_147422_2_, p_147422_3_, p_147422_5_); + MinecraftForge.EVENT_BUS.post(event); + if (event.getResult() == Result.DENY) { + return; + } + double d0 = 0.03125D; + this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16, 16, + d0 * 2.0D, d0 * 2.0D, 1.0D); + for (int k = 0; k < 16; k++) { + for (int l = 0; l < 16; l++) { + BiomeGenBase biomegenbase = p_147422_5_[(l + k * 16)]; + biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, p_147422_1_ * 16 + k, + p_147422_2_ * 16 + l, this.stoneNoise[(l + k * 16)]); + } + } + } + + /** + * loads or generates the chunk at the chunk location specified + */ + @Override + public Chunk loadChunk(int par1, int par2) { + return this.provideChunk(par1, par2); + } + + /** + * Will return back a chunk, if it doesn't exist and its not a MP client it will + * generates all the blocks for the specified chunk from the map seed and chunk + * seed + */ + @Override + public Chunk provideChunk(int x, int z) { + try { + Block[] ablock = new Block[65536]; + //generateTerrain(x, z, ablock); + caveGenerator.func_151539_a(this, worldObj, x, z, ablock); + ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); + } catch (Exception e) { + e.printStackTrace(); + } + return super.provideChunk(x, z); + /* + * rand.setSeed(x * 341873128712L + z * 132897987541L); Block[] ablock = new + * Block[65536]; byte[] abyte = new byte[65536]; generateTerrain(x, z, ablock); + * biomesForGeneration = + * worldObj.getWorldChunkManager().loadBlockGeneratorData(biomesForGeneration, x + * * 16, z * 16, 16, 16); replaceBlocksForBiome(x, z, ablock, abyte, + * biomesForGeneration); + * + * caveGenerator.func_151539_a(this, worldObj, x, z, ablock); + * caveGenerator.func_151539_a(this, worldObj, x, z, ablock); + * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); + * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); + * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); + * ravineGenerator.func_151539_a(this, worldObj, x, z, ablock); + * //villageGenerator.func_151539_a(this, worldObj, x, z, ablock); + * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); + * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); + * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); + * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); + * scatteredFeatureGenerator.func_151539_a(this, worldObj, x, z, ablock); + * mineshaftGenerator.func_151539_a(this, worldObj, x, z, ablock); + * + * Chunk chunk = new Chunk(worldObj, ablock, abyte, x, z); byte[] abyte1 = + * chunk.getBiomeArray(); + * + * for (int k = 0; k < abyte1.length; ++k) abyte1[k] = + * (byte)biomesForGeneration[k].biomeID; + * + * chunk.generateSkylightMap(); return chunk; + */ + } + + public void generateTerrain(int x, int z, Block[] par3BlockArray) { + byte b0 = 63; + biomesForGeneration = worldObj.getWorldChunkManager().getBiomesForGeneration(biomesForGeneration, x * 4 - 2, + z * 4 - 2, 10, 10); + generateNoise(x * 4, 0, z * 4); + + for (int k = 0; k < 4; ++k) { + int l = k * 5; + int i1 = (k + 1) * 5; + + for (int j1 = 0; j1 < 4; ++j1) { + int k1 = (l + j1) * 33; + int l1 = (l + j1 + 1) * 33; + int i2 = (i1 + j1) * 33; + int j2 = (i1 + j1 + 1) * 33; + + for (int k2 = 0; k2 < 32; ++k2) { + double d0 = 0.125D; + double d1 = field_147434_q[k1 + k2]; + double d2 = field_147434_q[l1 + k2]; + double d3 = field_147434_q[i2 + k2]; + double d4 = field_147434_q[j2 + k2]; + double d5 = (field_147434_q[k1 + k2 + 1] - d1) * d0; + double d6 = (field_147434_q[l1 + k2 + 1] - d2) * d0; + double d7 = (field_147434_q[i2 + k2 + 1] - d3) * d0; + double d8 = (field_147434_q[j2 + k2 + 1] - d4) * d0; + + for (int l2 = 0; l2 < 8; ++l2) { + double d9 = 0.25D; + double d10 = d1; + double d11 = d2; + double d12 = (d3 - d1) * d9; + double d13 = (d4 - d2) * d9; + + for (int i3 = 0; i3 < 4; ++i3) { + int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2; + short short1 = 256; + j3 -= short1; + double d14 = 0.25D; + double d16 = (d11 - d10) * d14; + double d15 = d10 - d16; + + for (int k3 = 0; k3 < 4; ++k3) + if ((d15 += d16) > 0.0D) + par3BlockArray[j3 += short1] = Blocks.stone; + else if (k2 * 8 + l2 < b0) + par3BlockArray[j3 += short1] = Blocks.water; + else + par3BlockArray[j3 += short1] = null; + + d10 += d12; + d11 += d13; + } + + d1 += d5; + d2 += d6; + d3 += d7; + d4 += d8; + } + } + } + } + } + + private void generateNoise(int x, int y, int z) { + doubleArray4 = noiseGen6.generateNoiseOctaves(doubleArray4, x, z, 5, 5, 200.0D, 200.0D, 0.5D); + doubleArray1 = noiseGen3.generateNoiseOctaves(doubleArray1, x, y, z, 5, 33, 5, 8.555150000000001D, + 4.277575000000001D, 8.555150000000001D); + doubleArray2 = noiseGen1.generateNoiseOctaves(doubleArray2, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D); + doubleArray3 = noiseGen2.generateNoiseOctaves(doubleArray3, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D); + int l = 0; + int i1 = 0; + for (int j1 = 0; j1 < 5; ++j1) + for (int k1 = 0; k1 < 5; ++k1) { + float f = 0.0F; + float f1 = 0.0F; + float f2 = 0.0F; + byte b0 = 2; + BiomeGenBase biomegenbase = biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; + + for (int l1 = -b0; l1 <= b0; ++l1) + for (int i2 = -b0; i2 <= b0; ++i2) { + BiomeGenBase biomegenbase1 = biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10]; + float f3 = biomegenbase1.rootHeight; + float f4 = biomegenbase1.heightVariation; + + if (worldType == WorldType.AMPLIFIED && f3 > 0.0F) { + f3 = 1.0F + f3 * 2.0F; + f4 = 1.0F + f4 * 4.0F; + } + + float f5 = parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F); + + if (biomegenbase1.rootHeight > biomegenbase.rootHeight) + f5 /= 2.0F; + + f += f4 * f5; + f1 += f3 * f5; + f2 += f5; + } + + f /= f2; + f1 /= f2; + f = f * 0.9F + 0.1F; + f1 = (f1 * 4.0F - 1.0F) / 8.0F; + double d13 = doubleArray4[i1] / 8000.0D; + + if (d13 < 0.0D) + d13 = -d13 * 0.3D; + + d13 = d13 * 3.0D - 2.0D; + + if (d13 < 0.0D) { + d13 /= 2.0D; + + if (d13 < -1.0D) + d13 = -1.0D; + + d13 /= 1.4D; + d13 /= 2.0D; + } else { + if (d13 > 1.0D) + d13 = 1.0D; + + d13 /= 8.0D; + } + + ++i1; + double d12 = f1; + double d14 = f; + d12 += d13 * 0.2D; + d12 = d12 * 8.5D / 8.0D; + double d5 = 8.5D + d12 * 4.0D; + + for (int j2 = 0; j2 < 33; ++j2) { + double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; + + if (d6 < 0.0D) + d6 *= 4.0D; + + double d7 = doubleArray2[l] / 512.0D; + double d8 = doubleArray3[l] / 512.0D; + double d9 = (doubleArray1[l] / 10.0D + 1.0D) / 2.0D; + double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; + + if (j2 > 29) { + double d11 = (j2 - 29) / 3.0F; + d10 = d10 * (1.0D - d11) + -10.0D * d11; + } + + field_147434_q[l] = d10; + ++l; + } + } + } + + private void func_147423_a(int p_147423_1_, int p_147423_2_, int p_147423_3_) { + double d0 = 684.412D; + double d1 = 684.412D; + double d2 = 512.0D; + double d3 = 512.0D; + this.doubleArray4 = this.noiseGen6.generateNoiseOctaves(this.doubleArray4, p_147423_1_, p_147423_3_, 5, 5, + 200.0D, 200.0D, 0.5D); + this.doubleArray1 = this.noiseGen3.generateNoiseOctaves(this.doubleArray1, p_147423_1_, p_147423_2_, + p_147423_3_, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D); + + this.doubleArray2 = this.noiseGen1.generateNoiseOctaves(this.doubleArray2, p_147423_1_, p_147423_2_, + p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); + + this.doubleArray3 = this.noiseGen2.generateNoiseOctaves(this.doubleArray3, p_147423_1_, p_147423_2_, + p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); + + boolean flag1 = false; + boolean flag = false; + int l = 0; + int i1 = 0; + double d4 = 8.5D; + for (int j1 = 0; j1 < 5; j1++) { + for (int k1 = 0; k1 < 5; k1++) { + float f = 0.0F; + float f1 = 0.0F; + float f2 = 0.0F; + byte b0 = 2; + BiomeGenBase biomegenbase = this.biomesForGeneration[(j1 + 2 + (k1 + 2) * 10)]; + for (int l1 = -b0; l1 <= b0; l1++) { + for (int i2 = -b0; i2 <= b0; i2++) { + BiomeGenBase biomegenbase1 = this.biomesForGeneration[(j1 + l1 + 2 + (k1 + i2 + 2) * 10)]; + float f3 = biomegenbase1.rootHeight; + float f4 = biomegenbase1.heightVariation; + if ((this.worldType == WorldType.AMPLIFIED) && (f3 > 0.0F)) { + f3 = 1.0F + f3 * 2.0F; + f4 = 1.0F + f4 * 4.0F; + } + float f5 = this.parabolicField[(l1 + 2 + (i2 + 2) * 5)] / (f3 + 2.0F); + if (biomegenbase1.rootHeight > biomegenbase.rootHeight) { + f5 /= 2.0F; + } + f += f4 * f5; + f1 += f3 * f5; + f2 += f5; + } + } + f /= f2; + f1 /= f2; + f = f * 0.9F + 0.1F; + f1 = (f1 * 4.0F - 1.0F) / 8.0F; + double d13 = this.doubleArray4[i1] / 8000.0D; + if (d13 < 0.0D) { + d13 = -d13 * 0.3D; + } + d13 = d13 * 3.0D - 2.0D; + if (d13 < 0.0D) { + d13 /= 2.0D; + if (d13 < -1.0D) { + d13 = -1.0D; + } + d13 /= 1.4D; + d13 /= 2.0D; + } else { + if (d13 > 1.0D) { + d13 = 1.0D; + } + d13 /= 8.0D; + } + i1++; + double d12 = f1; + double d14 = f; + d12 += d13 * 0.2D; + d12 = d12 * 8.5D / 8.0D; + double d5 = 8.5D + d12 * 4.0D; + for (int j2 = 0; j2 < 33; j2++) { + double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; + if (d6 < 0.0D) { + d6 *= 4.0D; + } + double d7 = this.doubleArray2[l] / 512.0D; + double d8 = this.doubleArray3[l] / 512.0D; + double d9 = (this.doubleArray1[l] / 10.0D + 1.0D) / 2.0D; + double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; + if (j2 > 29) { + double d11 = (j2 - 29) / 3.0F; + d10 = d10 * (1.0D - d11) + -10.0D * d11; + } + this.field_147434_q[l] = d10; + l++; + } + } + } + } + + /** + * Checks to see if a chunk exists at x, y + */ + @Override + public boolean chunkExists(int par1, int par2) { + return super.chunkExists(par1, par2); + } + + /** + * Populates chunk with ores etc etc + */ + @Override + public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { + + if (this.worldObj.getChunkFromChunkCoords(par2, par3) != null) { + super.populate(par1IChunkProvider, par2, par3); + try { + //Maybe Custom stuff? + boolean doGen = false; + boolean flag = false; + int k1; + int l1; + int i2; + int x = par2 * 16; + int z = par3 * 16; + BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(x + 16, z + 16); + MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); + doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON); + for (k1 = 0; doGen && k1 < 8; ++k1) { + l1 = x + this.rand.nextInt(16) + 8; + i2 = this.rand.nextInt(256); + int j2 = z + this.rand.nextInt(16) + 8; + (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2); + } + + if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) { + SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand); + SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand); + } + MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + + + /*boolean generateStructures = true; + + BlockFalling.fallInstantly = true; + int x = par2 * 16; + int z = par3 * 16; + BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(x + 16, z + 16); + this.rand.setSeed(this.worldObj.getSeed()); + long i1 = this.rand.nextLong() / 2L * 2L + 1L; + long j1 = this.rand.nextLong() / 2L * 2L + 1L; + this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed()); + boolean flag = false; + + MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); + + if (generateStructures) { + this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); + // flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, + // this.rand, par2, par3); + this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); + } + + int k1; + int l1; + int i2; + + if (generateStructures) { + if (generateStructures) { + // No specific liquid dimlets specified: we generate default lakes (water and + // lava were appropriate). + if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag + && this.rand.nextInt(4) == 0 + && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, + net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE)) { + k1 = x + this.rand.nextInt(16) + 8; + l1 = this.rand.nextInt(256); + i2 = z + this.rand.nextInt(16) + 8; + (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2); + } + + if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, + net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA) && !flag + && this.rand.nextInt(8) == 0) { + k1 = x + this.rand.nextInt(16) + 8; + l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); + i2 = z + this.rand.nextInt(16) + 8; + + if (l1 < 63 || this.rand.nextInt(10) == 0) { + (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); + } + } + } + * else { // Generate lakes for the specified biomes. for (Block liquid : + * dimensionInformation.getFluidsForLakes()) { if (!flag && this.rand.nextInt(4) + * == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, + * flag, + * net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType. + * LAKE)) { k1 = x + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 + * = z + this.rand.nextInt(16) + 8; (new + * WorldGenLakes(liquid)).generate(this.worldObj, this.rand, k1, l1, i2); } } } + + } + + boolean doGen = false; + if (generateStructures) { + doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, + net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON); + for (k1 = 0; doGen && k1 < 8; ++k1) { + l1 = x + this.rand.nextInt(16) + 8; + i2 = this.rand.nextInt(256); + int j2 = z + this.rand.nextInt(16) + 8; + (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2); + } + } + + biomegenbase.decorate(this.worldObj, this.rand, x, z); + if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) { + SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand); + } + x += 8; + z += 8; + + doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, + net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE); + for (k1 = 0; doGen && k1 < 16; ++k1) { + for (l1 = 0; l1 < 16; ++l1) { + i2 = this.worldObj.getPrecipitationHeight(x + k1, z + l1); + + if (this.worldObj.isBlockFreezable(k1 + x, i2 - 1, l1 + z)) { + this.worldObj.setBlock(k1 + x, i2 - 1, l1 + z, Blocks.ice, 0, 2); + } + + if (this.worldObj.func_147478_e(k1 + x, i2, l1 + z, true)) { + this.worldObj.setBlock(k1 + x, i2, l1 + z, Blocks.snow_layer, 0, 2); + } + } + } + + MinecraftForge.EVENT_BUS + .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); + + BlockFalling.fallInstantly = false;*/ + // super.populate(par1IChunkProvider, par2, par3); + /* + * net.minecraft.block.BlockFalling.fallInstantly = false; int k = par2 * 16; + * int l = par3 * 16; BiomeGenBase biomegenbase = + * this.worldObj.getBiomeGenForCoords(k + 16, l + 16); + * this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / + * 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; + * this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed()); boolean + * flag = false; + * + * MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, + * this.worldObj, this.rand, par2, par3, flag)); + * + * + * this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, + * par2, par3); flag = + * this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, + * par2, par3); + * this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, + * this.rand, par2, par3); if (flag) { Logger.INFO("Did Generate? "+flag); } + * else { + * //Logger.INFO("Can village spawn here? "+villageGenerator.villageSpawnBiomes. + * contains(biomegenbase)); } + * + * + * if ((biomegenbase != BiomeGenBase.desert) && (biomegenbase != + * BiomeGenBase.desertHills) && (!flag)) { if ((this.rand.nextInt(4) == 0) && + * (TerrainGen.populate(par1IChunkProvider, this.worldObj, this.rand, par2, + * par3, flag, PopulateChunkEvent.Populate.EventType.LAKE))) { int k1 = k + + * this.rand.nextInt(16) + 8; int l1 = this.rand.nextInt(256); int i2 = l + + * this.rand.nextInt(16) + 8; new + * WorldGenLakes(Blocks.water).generate(this.worldObj, this.rand, k1, l1, i2); } + * } if ((TerrainGen.populate(par1IChunkProvider, this.worldObj, this.rand, + * par2, par3, flag, PopulateChunkEvent.Populate.EventType.LAVA)) && (!flag) && + * (this.rand.nextInt(8) == 0)) { int k1 = k + this.rand.nextInt(16) + 8; int l1 + * = this.rand.nextInt(this.rand.nextInt(248) + 8); int i2 = l + + * this.rand.nextInt(16) + 8; if ((l1 < 63) || (this.rand.nextInt(10) == 0)) { + * new WorldGenLakes(Blocks.water).generate(this.worldObj, this.rand, k1, l1, + * i2); } } int var4 = par2 * 16; int var5 = par3 * 16; + * + * biomegenbase.decorate(this.worldObj, this.rand, k, l); + * SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + * + 8, 16, 16, this.rand); if (TerrainGen.populate(this, worldObj, rand, par2, + * par3, flag, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, + * biomegenbase, k + 8, l + 8, 16, 16, this.rand); } k += 8; l += 8; + * + * MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, + * this.worldObj, this.rand, par2, par3, flag)); + * + * net.minecraft.block.BlockFalling.fallInstantly = false; + */ + } + + /** + * Two modes of operation: if passed true, save all Chunks in one go. If passed + * false, save up to two chunks. Return true if all chunks have been saved. + */ + @Override + public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate) { + return super.saveChunks(par1, par2IProgressUpdate); + } + + /** + * Save extra data not associated with any Chunk. Not saved during autosave, + * only during world unload. Currently unimplemented. + */ + @Override + public void saveExtraData() { + super.saveExtraData(); + } + + /** + * Unloads chunks that are marked to be unloaded. This is not guaranteed to + * unload every such chunk. + */ + @Override + public boolean unloadQueuedChunks() { + return super.unloadQueuedChunks(); + } + + /** + * Returns if the IChunkProvider supports saving. + */ + @Override + public boolean canSave() { + return super.canSave(); + } + + /** + * Converts the instance data to a readable string. + */ + @Override + public String makeString() { + return "RandomLevelSource"; + } + + /** + * Returns a list of creatures of the specified type that can spawn at the given + * location. + */ + @SuppressWarnings("rawtypes") + @Override + public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { + BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4); + return (par1EnumCreatureType == EnumCreatureType.monster) + && (this.scatteredFeatureGenerator.func_143030_a(par2, par3, par4)) + ? this.scatteredFeatureGenerator.getScatteredFeatureSpawnList() + : biomegenbase.getSpawnableList(par1EnumCreatureType); + } + + @Override + public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, + int p_147416_5_) { + Logger.INFO("func_147416_a: " + p_147416_2_); + return super.func_147416_a(p_147416_1_, p_147416_2_, p_147416_3_, p_147416_4_, p_147416_5_); + /* + * return "ExtendedVillage".equals(p_147416_2_) && this.villageGenerator != null + * ? this.villageGenerator.func_151545_a(p_147416_1_, p_147416_3_, p_147416_4_, + * p_147416_5_) : null; + */ + } + + @Override + public int getLoadedChunkCount() { + return super.getLoadedChunkCount(); + } + + @Override + public void recreateStructures(int par1, int par2) { + super.recreateStructures(par1, par2); + // this.mineshaftGenerator.func_151539_a(this, this.worldObj, par1, par2, + // (Block[])null); + // this.villageGenerator.func_151539_a(this, this.worldObj, par1, par2, + // (Block[])null); + // this.scatteredFeatureGenerator.func_151539_a(this, this.worldObj, par1, par2, + // (Block[])null); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/dimension/Dimension_Australia.java b/src/main/java/gtPlusPlus/australia/dimension/Dimension_Australia.java new file mode 100644 index 0000000000..ff9e81085d --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/dimension/Dimension_Australia.java @@ -0,0 +1,23 @@ +package gtPlusPlus.australia.dimension; + +import net.minecraft.block.Block; +import gtPlusPlus.australia.block.BlockAustraliaPortal; +import gtPlusPlus.australia.item.ItemAustraliaPortalTrigger; +import gtPlusPlus.australia.world.AustraliaWorldProvider; +import gtPlusPlus.core.lib.CORE; +import net.minecraftforge.common.DimensionManager; + +public class Dimension_Australia { + + public Object instance; + public static int DIMID = CORE.AUSTRALIA_ID; + public static BlockAustraliaPortal portalBlock; + public static ItemAustraliaPortalTrigger portalItem; + public static Block blockPortalFrame; + + public void load() { + DimensionManager.registerProviderType(DIMID, AustraliaWorldProvider.class, false); + DimensionManager.registerDimension(DIMID, DIMID); + } + +} diff --git a/src/main/java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java b/src/main/java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java new file mode 100644 index 0000000000..05b43b7558 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/model/ModelAustralianSpider.java @@ -0,0 +1,148 @@ +package gtPlusPlus.australia.entity.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; + +@SideOnly(Side.CLIENT) +public class ModelAustralianSpider extends ModelBase { + + /** The spider's head box */ + public ModelRenderer spiderHead; + /** The spider's neck box */ + public ModelRenderer spiderNeck; + /** The spider's body box */ + public ModelRenderer spiderBody; + /** Spider's first leg */ + public ModelRenderer spiderLeg1; + /** Spider's second leg */ + public ModelRenderer spiderLeg2; + /** Spider's third leg */ + public ModelRenderer spiderLeg3; + /** Spider's fourth leg */ + public ModelRenderer spiderLeg4; + /** Spider's fifth leg */ + public ModelRenderer spiderLeg5; + /** Spider's sixth leg */ + public ModelRenderer spiderLeg6; + /** Spider's seventh leg */ + public ModelRenderer spiderLeg7; + /** Spider's eight leg */ + public ModelRenderer spiderLeg8; + + public ModelAustralianSpider() { + float f = 0.0F; + byte b0 = 15; + this.spiderHead = new ModelRenderer(this, 32, 4); + this.spiderHead.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 8, f); + this.spiderHead.setRotationPoint(0.0F, (float) b0, -3.0F); + this.spiderNeck = new ModelRenderer(this, 0, 0); + this.spiderNeck.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, f); + this.spiderNeck.setRotationPoint(0.0F, (float) b0, 0.0F); + this.spiderBody = new ModelRenderer(this, 0, 12); + this.spiderBody.addBox(-5.0F, -4.0F, -6.0F, 10, 8, 12, f); + this.spiderBody.setRotationPoint(0.0F, (float) b0, 9.0F); + this.spiderLeg1 = new ModelRenderer(this, 18, 0); + this.spiderLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg1.setRotationPoint(-4.0F, (float) b0, 2.0F); + this.spiderLeg2 = new ModelRenderer(this, 18, 0); + this.spiderLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg2.setRotationPoint(4.0F, (float) b0, 2.0F); + this.spiderLeg3 = new ModelRenderer(this, 18, 0); + this.spiderLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg3.setRotationPoint(-4.0F, (float) b0, 1.0F); + this.spiderLeg4 = new ModelRenderer(this, 18, 0); + this.spiderLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg4.setRotationPoint(4.0F, (float) b0, 1.0F); + this.spiderLeg5 = new ModelRenderer(this, 18, 0); + this.spiderLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg5.setRotationPoint(-4.0F, (float) b0, 0.0F); + this.spiderLeg6 = new ModelRenderer(this, 18, 0); + this.spiderLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg6.setRotationPoint(4.0F, (float) b0, 0.0F); + this.spiderLeg7 = new ModelRenderer(this, 18, 0); + this.spiderLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg7.setRotationPoint(-4.0F, (float) b0, -1.0F); + this.spiderLeg8 = new ModelRenderer(this, 18, 0); + this.spiderLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f); + this.spiderLeg8.setRotationPoint(4.0F, (float) b0, -1.0F); + } + + /** + * Sets the models various rotation angles then renders the model. + */ + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, + float p_78088_6_, float p_78088_7_) { + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); + this.spiderHead.render(p_78088_7_); + this.spiderNeck.render(p_78088_7_); + this.spiderBody.render(p_78088_7_); + this.spiderLeg1.render(p_78088_7_); + this.spiderLeg2.render(p_78088_7_); + this.spiderLeg3.render(p_78088_7_); + this.spiderLeg4.render(p_78088_7_); + this.spiderLeg5.render(p_78088_7_); + this.spiderLeg6.render(p_78088_7_); + this.spiderLeg7.render(p_78088_7_); + this.spiderLeg8.render(p_78088_7_); + } + + /** + * Sets the model's various rotation angles. For bipeds, par1 and par2 are used + * for animating the movement of arms and legs, where par1 represents the + * time(so that arms and legs swing back and forth) and par2 represents how + * "far" arms and legs can swing at most. + */ + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, + float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { + this.spiderHead.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI); + this.spiderHead.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI); + float f6 = ((float) Math.PI / 4F); + this.spiderLeg1.rotateAngleZ = -f6; + this.spiderLeg2.rotateAngleZ = f6; + this.spiderLeg3.rotateAngleZ = -f6 * 0.74F; + this.spiderLeg4.rotateAngleZ = f6 * 0.74F; + this.spiderLeg5.rotateAngleZ = -f6 * 0.74F; + this.spiderLeg6.rotateAngleZ = f6 * 0.74F; + this.spiderLeg7.rotateAngleZ = -f6; + this.spiderLeg8.rotateAngleZ = f6; + float f7 = -0.0F; + float f8 = 0.3926991F; + this.spiderLeg1.rotateAngleY = f8 * 2.0F + f7; + this.spiderLeg2.rotateAngleY = -f8 * 2.0F - f7; + this.spiderLeg3.rotateAngleY = f8 * 1.0F + f7; + this.spiderLeg4.rotateAngleY = -f8 * 1.0F - f7; + this.spiderLeg5.rotateAngleY = -f8 * 1.0F + f7; + this.spiderLeg6.rotateAngleY = f8 * 1.0F - f7; + this.spiderLeg7.rotateAngleY = -f8 * 2.0F + f7; + this.spiderLeg8.rotateAngleY = f8 * 2.0F - f7; + float f9 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + 0.0F) * 0.4F) * p_78087_2_; + float f10 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + (float) Math.PI) * 0.4F) * p_78087_2_; + float f11 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + ((float) Math.PI / 2F)) * 0.4F) * p_78087_2_; + float f12 = -(MathHelper.cos(p_78087_1_ * 0.6662F * 2.0F + ((float) Math.PI * 3F / 2F)) * 0.4F) * p_78087_2_; + float f13 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + 0.0F) * 0.4F) * p_78087_2_; + float f14 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + (float) Math.PI) * 0.4F) * p_78087_2_; + float f15 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + ((float) Math.PI / 2F)) * 0.4F) * p_78087_2_; + float f16 = Math.abs(MathHelper.sin(p_78087_1_ * 0.6662F + ((float) Math.PI * 3F / 2F)) * 0.4F) * p_78087_2_; + this.spiderLeg1.rotateAngleY += f9; + this.spiderLeg2.rotateAngleY += -f9; + this.spiderLeg3.rotateAngleY += f10; + this.spiderLeg4.rotateAngleY += -f10; + this.spiderLeg5.rotateAngleY += f11; + this.spiderLeg6.rotateAngleY += -f11; + this.spiderLeg7.rotateAngleY += f12; + this.spiderLeg8.rotateAngleY += -f12; + this.spiderLeg1.rotateAngleZ += f13; + this.spiderLeg2.rotateAngleZ += -f13; + this.spiderLeg3.rotateAngleZ += f14; + this.spiderLeg4.rotateAngleZ += -f14; + this.spiderLeg5.rotateAngleZ += f15; + this.spiderLeg6.rotateAngleZ += -f15; + this.spiderLeg7.rotateAngleZ += f16; + this.spiderLeg8.rotateAngleZ += -f16; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/model/ModelBoar.java b/src/main/java/gtPlusPlus/australia/entity/model/ModelBoar.java new file mode 100644 index 0000000000..7d858e39f0 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/model/ModelBoar.java @@ -0,0 +1,20 @@ +package gtPlusPlus.australia.entity.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelQuadruped; + +@SideOnly(Side.CLIENT) +public class ModelBoar extends ModelQuadruped { + + public ModelBoar() { + this(0.0F); + } + + public ModelBoar(float p_i1151_1_) { + super(6, p_i1151_1_); + this.head.setTextureOffset(16, 16).addBox(-2.0F, 0.0F, -9.0F, 4, 3, 1, p_i1151_1_); + this.field_78145_g = 4.0F; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/model/ModelDingo.java b/src/main/java/gtPlusPlus/australia/entity/model/ModelDingo.java new file mode 100644 index 0000000000..2999cdf2dd --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/model/ModelDingo.java @@ -0,0 +1,168 @@ +package gtPlusPlus.australia.entity.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.util.MathHelper; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class ModelDingo extends ModelBase { + + /** main box for the dingo head */ + public ModelRenderer dingoHeadMain; + /** The dingo's body */ + public ModelRenderer dingoBody; + /** dingo'se first leg */ + public ModelRenderer dingoLeg1; + /** dingo's second leg */ + public ModelRenderer dingoLeg2; + /** dingo's third leg */ + public ModelRenderer dingoLeg3; + /** dingo's fourth leg */ + public ModelRenderer dingoLeg4; + /** The dingo's tail */ + ModelRenderer dingoTail; + /** The dingo's mane */ + ModelRenderer dingoMane; + + public ModelDingo() { + float f = 0.0F; + float f1 = 13.5F; + this.dingoHeadMain = new ModelRenderer(this, 0, 0); + this.dingoHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, f); + this.dingoHeadMain.setRotationPoint(-1.0F, f1, -7.0F); + this.dingoBody = new ModelRenderer(this, 18, 14); + this.dingoBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, f); + this.dingoBody.setRotationPoint(0.0F, 14.0F, 2.0F); + this.dingoMane = new ModelRenderer(this, 21, 0); + this.dingoMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, f); + this.dingoMane.setRotationPoint(-1.0F, 14.0F, 2.0F); + this.dingoLeg1 = new ModelRenderer(this, 0, 18); + this.dingoLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); + this.dingoLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F); + this.dingoLeg2 = new ModelRenderer(this, 0, 18); + this.dingoLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); + this.dingoLeg2.setRotationPoint(0.5F, 16.0F, 7.0F); + this.dingoLeg3 = new ModelRenderer(this, 0, 18); + this.dingoLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); + this.dingoLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F); + this.dingoLeg4 = new ModelRenderer(this, 0, 18); + this.dingoLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); + this.dingoLeg4.setRotationPoint(0.5F, 16.0F, -4.0F); + this.dingoTail = new ModelRenderer(this, 9, 18); + this.dingoTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f); + this.dingoTail.setRotationPoint(-1.0F, 12.0F, 8.0F); + this.dingoHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, f); + this.dingoHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, f); + this.dingoHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, f); + } + + /** + * Sets the models various rotation angles then renders the model. + */ + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, + float p_78088_6_, float p_78088_7_) { + super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); + + if (this.isChild) { + float f6 = 2.0F; + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 5.0F * p_78088_7_, 2.0F * p_78088_7_); + this.dingoHeadMain.renderWithRotation(p_78088_7_); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); + GL11.glTranslatef(0.0F, 24.0F * p_78088_7_, 0.0F); + this.dingoBody.render(p_78088_7_); + this.dingoLeg1.render(p_78088_7_); + this.dingoLeg2.render(p_78088_7_); + this.dingoLeg3.render(p_78088_7_); + this.dingoLeg4.render(p_78088_7_); + this.dingoTail.renderWithRotation(p_78088_7_); + this.dingoMane.render(p_78088_7_); + GL11.glPopMatrix(); + } else { + this.dingoHeadMain.renderWithRotation(p_78088_7_); + this.dingoBody.render(p_78088_7_); + this.dingoLeg1.render(p_78088_7_); + this.dingoLeg2.render(p_78088_7_); + this.dingoLeg3.render(p_78088_7_); + this.dingoLeg4.render(p_78088_7_); + this.dingoTail.renderWithRotation(p_78088_7_); + this.dingoMane.render(p_78088_7_); + } + } + + /** + * Used for easily adding entity-dependent animations. The second and third + * float params here are the same second and third as in the setRotationAngles + * method. + */ + public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) { + EntityWolf entitydingo = (EntityWolf) p_78086_1_; + + if (entitydingo.isAngry()) { + this.dingoTail.rotateAngleY = 0.0F; + } else { + this.dingoTail.rotateAngleY = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; + } + + if (entitydingo.isSitting()) { + this.dingoMane.setRotationPoint(-1.0F, 16.0F, -3.0F); + this.dingoMane.rotateAngleX = ((float) Math.PI * 2F / 5F); + this.dingoMane.rotateAngleY = 0.0F; + this.dingoBody.setRotationPoint(0.0F, 18.0F, 0.0F); + this.dingoBody.rotateAngleX = ((float) Math.PI / 4F); + this.dingoTail.setRotationPoint(-1.0F, 21.0F, 6.0F); + this.dingoLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F); + this.dingoLeg1.rotateAngleX = ((float) Math.PI * 3F / 2F); + this.dingoLeg2.setRotationPoint(0.5F, 22.0F, 2.0F); + this.dingoLeg2.rotateAngleX = ((float) Math.PI * 3F / 2F); + this.dingoLeg3.rotateAngleX = 5.811947F; + this.dingoLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F); + this.dingoLeg4.rotateAngleX = 5.811947F; + this.dingoLeg4.setRotationPoint(0.51F, 17.0F, -4.0F); + } else { + this.dingoBody.setRotationPoint(0.0F, 14.0F, 2.0F); + this.dingoBody.rotateAngleX = ((float) Math.PI / 2F); + this.dingoMane.setRotationPoint(-1.0F, 14.0F, -3.0F); + this.dingoMane.rotateAngleX = this.dingoBody.rotateAngleX; + this.dingoTail.setRotationPoint(-1.0F, 12.0F, 8.0F); + this.dingoLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F); + this.dingoLeg2.setRotationPoint(0.5F, 16.0F, 7.0F); + this.dingoLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F); + this.dingoLeg4.setRotationPoint(0.5F, 16.0F, -4.0F); + this.dingoLeg1.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; + this.dingoLeg2.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float) Math.PI) * 1.4F * p_78086_3_; + this.dingoLeg3.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float) Math.PI) * 1.4F * p_78086_3_; + this.dingoLeg4.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; + } + + this.dingoHeadMain.rotateAngleZ = entitydingo.getInterestedAngle(p_78086_4_) + + entitydingo.getShakeAngle(p_78086_4_, 0.0F); + this.dingoMane.rotateAngleZ = entitydingo.getShakeAngle(p_78086_4_, -0.08F); + this.dingoBody.rotateAngleZ = entitydingo.getShakeAngle(p_78086_4_, -0.16F); + this.dingoTail.rotateAngleZ = entitydingo.getShakeAngle(p_78086_4_, -0.2F); + } + + /** + * Sets the model's various rotation angles. For bipeds, par1 and par2 are used + * for animating the movement of arms and legs, where par1 represents the + * time(so that arms and legs swing back and forth) and par2 represents how + * "far" arms and legs can swing at most. + */ + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, + float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { + super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, p_78087_7_); + this.dingoHeadMain.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI); + this.dingoHeadMain.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI); + this.dingoTail.rotateAngleX = p_78087_3_; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/model/ModelOctopus.java b/src/main/java/gtPlusPlus/australia/entity/model/ModelOctopus.java new file mode 100644 index 0000000000..f820d0ad85 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/model/ModelOctopus.java @@ -0,0 +1,67 @@ +package gtPlusPlus.australia.entity.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +@SideOnly(Side.CLIENT) +public class ModelOctopus extends ModelBase { + + /** The squid's body */ + ModelRenderer octopusBody; + /** The squid's tentacles */ + ModelRenderer[] octoTentacles = new ModelRenderer[8]; + + public ModelOctopus() { + byte b0 = -16; + this.octopusBody = new ModelRenderer(this, 0, 0); + this.octopusBody.addBox(-6.0F, -8.0F, -6.0F, 12, 16, 12); + this.octopusBody.rotationPointY += (float) (24 + b0); + + for (int i = 0; i < this.octoTentacles.length; ++i) { + this.octoTentacles[i] = new ModelRenderer(this, 48, 0); + double d0 = (double) i * Math.PI * 2.0D / (double) this.octoTentacles.length; + float f = (float) Math.cos(d0) * 5.0F; + float f1 = (float) Math.sin(d0) * 5.0F; + this.octoTentacles[i].addBox(-1.0F, 0.0F, -1.0F, 2, 18, 2); + this.octoTentacles[i].rotationPointX = f; + this.octoTentacles[i].rotationPointZ = f1; + this.octoTentacles[i].rotationPointY = (float) (31 + b0); + d0 = (double) i * Math.PI * -2.0D / (double) this.octoTentacles.length + (Math.PI / 2D); + this.octoTentacles[i].rotateAngleY = (float) d0; + } + } + + /** + * Sets the model's various rotation angles. For bipeds, par1 and par2 are used + * for animating the movement of arms and legs, where par1 represents the + * time(so that arms and legs swing back and forth) and par2 represents how + * "far" arms and legs can swing at most. + */ + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, + float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { + ModelRenderer[] amodelrenderer = this.octoTentacles; + int i = amodelrenderer.length; + + for (int j = 0; j < i; ++j) { + ModelRenderer modelrenderer = amodelrenderer[j]; + modelrenderer.rotateAngleX = p_78087_3_; + } + } + + /** + * Sets the models various rotation angles then renders the model. + */ + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, + float p_78088_6_, float p_78088_7_) { + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); + this.octopusBody.render(p_78088_7_); + + for (int i = 0; i < this.octoTentacles.length; ++i) { + this.octoTentacles[i].render(p_78088_7_); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java b/src/main/java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java new file mode 100644 index 0000000000..af432e04b9 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/render/RenderAustralianSpider.java @@ -0,0 +1,84 @@ +package gtPlusPlus.australia.entity.render; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.australia.entity.model.ModelAustralianSpider; +import gtPlusPlus.australia.entity.type.EntityAustralianSpiderBase; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderAustralianSpider extends RenderLiving { + + private static final ResourceLocation spiderEyesTextures = new ResourceLocation("textures/entity/spider_eyes.png"); + private static final ResourceLocation spiderTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/australia/bush_spider.png"); + + public RenderAustralianSpider() { + super(new ModelAustralianSpider(), 1.0F); + this.setRenderPassModel(new ModelAustralianSpider()); + } + + protected float getDeathMaxRotation(EntityAustralianSpiderBase p_77037_1_) { + return 180.0F; + } + + /** + * Queries whether should render the specified pass or not. + */ + protected int shouldRenderPass(EntityAustralianSpiderBase p_77032_1_, int p_77032_2_, float p_77032_3_) { + if (p_77032_2_ != 0) { + return -1; + } else { + this.bindTexture(spiderEyesTextures); + GL11.glEnable(GL11.GL_BLEND); + GL11.glDisable(GL11.GL_ALPHA_TEST); + GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); + + if (p_77032_1_.isInvisible()) { + GL11.glDepthMask(false); + } else { + GL11.glDepthMask(true); + } + + char c0 = 61680; + int j = c0 % 65536; + int k = c0 / 65536; + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + return 1; + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless + * you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(EntityAustralianSpiderBase p_110775_1_) { + return spiderTextures; + } + + protected float getDeathMaxRotation(EntityLivingBase p_77037_1_) { + return this.getDeathMaxRotation((EntityAustralianSpiderBase) p_77037_1_); + } + + /** + * Queries whether should render the specified pass or not. + */ + protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { + return this.shouldRenderPass((EntityAustralianSpiderBase) p_77032_1_, p_77032_2_, p_77032_3_); + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless + * you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return this.getEntityTexture((EntityAustralianSpiderBase) p_110775_1_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/render/RenderBoar.java b/src/main/java/gtPlusPlus/australia/entity/render/RenderBoar.java new file mode 100644 index 0000000000..cc4bfa8906 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/render/RenderBoar.java @@ -0,0 +1,64 @@ +package gtPlusPlus.australia.entity.render; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.australia.entity.type.EntityBoar; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class RenderBoar extends RenderLiving +{ + private static final ResourceLocation saddledBoarTextures = new ResourceLocation("textures/entity/boar/boar_saddle.png"); + private static final ResourceLocation boarTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/australia/boar.png"); + + public RenderBoar(ModelBase p_i1265_1_, ModelBase p_i1265_2_, float p_i1265_3_) + { + super(p_i1265_1_, p_i1265_3_); + this.setRenderPassModel(p_i1265_2_); + } + + /** + * Queries whether should render the specified pass or not. + */ + protected int shouldRenderPass(EntityBoar p_77032_1_, int p_77032_2_, float p_77032_3_) + { + if (p_77032_2_ == 0 && p_77032_1_.getSaddled()) + { + this.bindTexture(saddledBoarTextures); + return 1; + } + else + { + return -1; + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(EntityBoar p_110775_1_) + { + return boarTextures; + } + + /** + * Queries whether should render the specified pass or not. + */ + protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) + { + return this.shouldRenderPass((EntityBoar)p_77032_1_, p_77032_2_, p_77032_3_); + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) + { + return this.getEntityTexture((EntityBoar)p_110775_1_); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/render/RenderDingo.java b/src/main/java/gtPlusPlus/australia/entity/render/RenderDingo.java new file mode 100644 index 0000000000..8bbf0392cd --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/render/RenderDingo.java @@ -0,0 +1,90 @@ +package gtPlusPlus.australia.entity.render; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.australia.entity.type.EntityDingo; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderDingo extends RenderLiving { + + private static final ResourceLocation dingoTextures = new ResourceLocation( + CORE.MODID + ":" + "textures/entity/australia/dingo/dingo.png"); + private static final ResourceLocation tamedDingoTextures = new ResourceLocation( + CORE.MODID + ":" + "textures/entity/australia/dingo/wdingo_tame.png"); + private static final ResourceLocation anrgyDingoTextures = new ResourceLocation( + CORE.MODID + ":" + "textures/entity/australia/dingo/dingo_angry.png"); + private static final ResourceLocation dingoCollarTextures = new ResourceLocation( + CORE.MODID + ":" + "textures/entity/australia/wdingoolf/dingo_collar.png"); + + public RenderDingo(ModelBase p_i1269_1_, ModelBase p_i1269_2_, float p_i1269_3_) { + super(p_i1269_1_, p_i1269_3_); + this.setRenderPassModel(p_i1269_2_); + } + + /** + * Defines what float the third param in setRotationAngles of ModelBase is + */ + protected float handleRotationFloat(EntityDingo p_77044_1_, float p_77044_2_) { + return p_77044_1_.getTailRotation(); + } + + /** + * Queries whether should render the specified pass or not. + */ + protected int shouldRenderPass(EntityDingo p_77032_1_, int p_77032_2_, float p_77032_3_) { + if (p_77032_2_ == 0 && p_77032_1_.getWolfShaking()) { + float f1 = p_77032_1_.getBrightness(p_77032_3_) * p_77032_1_.getShadingWhileShaking(p_77032_3_); + this.bindTexture(dingoTextures); + GL11.glColor3f(f1, f1, f1); + return 1; + } else if (p_77032_2_ == 1 && p_77032_1_.isTamed()) { + this.bindTexture(dingoCollarTextures); + int j = p_77032_1_.getCollarColor(); + GL11.glColor3f(EntitySheep.fleeceColorTable[j][0], EntitySheep.fleeceColorTable[j][1], + EntitySheep.fleeceColorTable[j][2]); + return 1; + } else { + return -1; + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless + * you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(EntityDingo p_110775_1_) { + return p_110775_1_.isTamed() ? tamedDingoTextures + : (p_110775_1_.isAngry() ? anrgyDingoTextures : dingoTextures); + } + + /** + * Queries whether should render the specified pass or not. + */ + protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) { + return this.shouldRenderPass((EntityDingo) p_77032_1_, p_77032_2_, p_77032_3_); + } + + /** + * Defines what float the third param in setRotationAngles of ModelBase is + */ + protected float handleRotationFloat(EntityLivingBase p_77044_1_, float p_77044_2_) { + return this.handleRotationFloat((EntityDingo) p_77044_1_, p_77044_2_); + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless + * you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return this.getEntityTexture((EntityDingo) p_110775_1_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/render/RenderOctopus.java b/src/main/java/gtPlusPlus/australia/entity/render/RenderOctopus.java new file mode 100644 index 0000000000..592ef9391a --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/render/RenderOctopus.java @@ -0,0 +1,120 @@ +package gtPlusPlus.australia.entity.render; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.australia.entity.type.EntityOctopus; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class RenderOctopus extends RenderLiving { + + private static final ResourceLocation octopusTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/australia/octopus.png"); + + public RenderOctopus(ModelBase p_i1268_1_, float p_i1268_2_) { + super(p_i1268_1_, p_i1268_2_); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker function + * which does the actual work. In all probabilty, the class Render is generic + * (Render 0) { + ((EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.poison.id, b0 * 20, 0)); + } + } + return true; + } else { + return false; + } + } + + public IEntityLivingData onSpawnWithEgg(IEntityLivingData p_110161_1_) { + return p_110161_1_; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/type/EntityBoar.java b/src/main/java/gtPlusPlus/australia/entity/type/EntityBoar.java new file mode 100644 index 0000000000..871b1a5356 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/type/EntityBoar.java @@ -0,0 +1,220 @@ +package gtPlusPlus.australia.entity.type; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityAgeable; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.EntityAIControlledByPlayer; +import net.minecraft.entity.ai.EntityAIFollowParent; +import net.minecraft.entity.ai.EntityAILookIdle; +import net.minecraft.entity.ai.EntityAIMate; +import net.minecraft.entity.ai.EntityAIPanic; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAITempt; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.EntityAIWatchClosest; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.stats.AchievementList; +import net.minecraft.world.World; + +public class EntityBoar extends EntityAnimal { + /** AI task for player control. */ + private final EntityAIControlledByPlayer aiControlledByPlayer; + + public EntityBoar(World p_i1689_1_) { + super(p_i1689_1_); + this.setSize(0.9F, 0.9F); + this.getNavigator().setAvoidsWater(true); + this.tasks.addTask(0, new EntityAISwimming(this)); + //this.tasks.addTask(1, new EntityAIPanic(this, 1.25D)); + this.tasks.addTask(2, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 0.3F)); + this.tasks.addTask(3, new EntityAIMate(this, 1.0D)); + this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot_on_a_stick, false)); + this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.carrot, false)); + this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D)); + this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); + this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); + this.tasks.addTask(8, new EntityAILookIdle(this)); + } + + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() { + return true; + } + + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D); + } + + protected void updateAITasks() { + super.updateAITasks(); + } + + /** + * returns true if all the conditions for steering the entity are met. For pigs, + * this is true if it is being ridden by a player and the player is holding a + * carrot-on-a-stick + */ + public boolean canBeSteered() { + ItemStack itemstack = ((EntityPlayer) this.riddenByEntity).getHeldItem(); + return itemstack != null && itemstack.getItem() == Items.carrot_on_a_stick; + } + + protected void entityInit() { + super.entityInit(); + this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { + super.writeEntityToNBT(p_70014_1_); + p_70014_1_.setBoolean("Saddle", this.getSaddled()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { + super.readEntityFromNBT(p_70037_1_); + this.setSaddled(p_70037_1_.getBoolean("Saddle")); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() { + return "mob.pig.say"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() { + return "mob.pig.say"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() { + return "mob.pig.death"; + } + + protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { + this.playSound("mob.pig.step", 0.15F, 1.0F); + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets + * into the saddle on a pig. + */ + public boolean interact(EntityPlayer p_70085_1_) { + if (super.interact(p_70085_1_)) { + return true; + } else if (this.getSaddled() && !this.worldObj.isRemote + && (this.riddenByEntity == null || this.riddenByEntity == p_70085_1_)) { + p_70085_1_.mountEntity(this); + return true; + } else { + return false; + } + } + + protected Item getDropItem() { + return this.isBurning() ? Items.cooked_porkchop : Items.porkchop; + } + + /** + * Drop 0-2 items of this living's type. @param par1 - Whether this entity has + * recently been hit by a player. @param par2 - Level of Looting used to kill + * this mob. + */ + protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { + int j = this.rand.nextInt(3) + 1 + this.rand.nextInt(1 + p_70628_2_); + + for (int k = 0; k < j; ++k) { + if (this.isBurning()) { + this.dropItem(Items.cooked_porkchop, 1); + } else { + this.dropItem(Items.porkchop, 1); + } + } + + if (this.getSaddled()) { + this.dropItem(Items.saddle, 1); + } + } + + /** + * Returns true if the pig is saddled. + */ + public boolean getSaddled() { + return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; + } + + /** + * Set or remove the saddle of the pig. + */ + public void setSaddled(boolean p_70900_1_) { + if (p_70900_1_) { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1)); + } else { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0)); + } + } + + /** + * Called when a lightning bolt hits the entity. + */ + public void onStruckByLightning(EntityLightningBolt p_70077_1_) { + if (!this.worldObj.isRemote) { + EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj); + entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword)); + entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.worldObj.spawnEntityInWorld(entitypigzombie); + this.setDead(); + } + } + + /** + * Called when the mob is falling. Calculates and applies fall damage. + */ + protected void fall(float p_70069_1_) { + super.fall(p_70069_1_); + + if (p_70069_1_ > 5.0F && this.riddenByEntity instanceof EntityPlayer) { + ((EntityPlayer) this.riddenByEntity).triggerAchievement(AchievementList.flyPig); + } + } + + public EntityBoar createChild(EntityAgeable p_90011_1_) { + return new EntityBoar(this.worldObj); + } + + /** + * 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 p_70877_1_) { + return p_70877_1_ != null && p_70877_1_.getItem() == Items.carrot; + } + + /** + * Return the AI task for player control. + */ + public EntityAIControlledByPlayer getAIControlledByPlayer() { + return this.aiControlledByPlayer; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/type/EntityDingo.java b/src/main/java/gtPlusPlus/australia/entity/type/EntityDingo.java new file mode 100644 index 0000000000..11b9737c4f --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/type/EntityDingo.java @@ -0,0 +1,536 @@ +package gtPlusPlus.australia.entity.type; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockColored; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityAgeable; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIBeg; +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.EntityAIMate; +import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; +import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; +import net.minecraft.entity.ai.EntityAISwimming; +import net.minecraft.entity.ai.EntityAITargetNonTamed; +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.EntityAnimal; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntitySheep; +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.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.pathfinding.PathEntity; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class EntityDingo extends EntityWolf { + + private float mPrivateField1; + private float mPrivateField2; + private boolean mPrivateField3; + + /** true is the dingo is wet else false */ + private boolean isShaking; + /** This time increases while dingo is shaking and emitting water particles. */ + private float timeWolfIsShaking; + private float prevTimeWolfIsShaking; + + public EntityDingo(World p_i1696_1_) { + super(p_i1696_1_); + this.setSize(0.6F, 0.8F); + this.getNavigator().setAvoidsWater(true); + this.tasks.addTask(1, new EntityAISwimming(this)); + this.tasks.addTask(2, this.aiSit); + this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); + this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true)); + this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); + this.tasks.addTask(6, new EntityAIMate(this, 1.0D)); + this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); + this.tasks.addTask(8, new EntityAIBeg(this, 8.0F)); + this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); + this.tasks.addTask(9, new EntityAILookIdle(this)); + this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); + this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); + this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); + this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); + this.setTamed(false); + } + + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D); + + if (this.isTamed()) { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); + } else { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.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 p_70624_1_) { + super.setAttackTarget(p_70624_1_); + + if (p_70624_1_ == null) { + this.setAngry(false); + } else if (!this.isTamed()) { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() { + this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth())); + } + + protected void entityInit() { + super.entityInit(); + } + + protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { + this.playSound("mob.wolf.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { + super.writeEntityToNBT(p_70014_1_); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { + super.readEntityFromNBT(p_70037_1_); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() { + 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; + } + + protected Item getDropItem() { + return Item.getItemById(-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(); + + if (!this.worldObj.isRemote && this.isShaking && !this.mPrivateField3 && !this.hasPath() && this.onGround) { + this.mPrivateField3 = true; + this.timeWolfIsShaking = 0.0F; + this.prevTimeWolfIsShaking = 0.0F; + this.worldObj.setEntityState(this, (byte) 8); + } + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() { + super.onUpdate(); + this.mPrivateField2 = this.mPrivateField1; + + if (this.func_70922_bv()) { + this.mPrivateField1 += (1.0F - this.mPrivateField1) * 0.4F; + } else { + this.mPrivateField1 += (0.0F - this.mPrivateField1) * 0.4F; + } + + if (this.func_70922_bv()) { + this.numTicksToChaseTarget = 10; + } + + if (this.isWet()) { + this.isShaking = true; + this.mPrivateField3 = false; + this.timeWolfIsShaking = 0.0F; + this.prevTimeWolfIsShaking = 0.0F; + } else if ((this.isShaking || this.mPrivateField3) && this.mPrivateField3) { + if (this.timeWolfIsShaking == 0.0F) { + this.playSound("mob.wolf.shake", this.getSoundVolume(), + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); + } + + this.prevTimeWolfIsShaking = this.timeWolfIsShaking; + this.timeWolfIsShaking += 0.05F; + + if (this.prevTimeWolfIsShaking >= 2.0F) { + this.isShaking = false; + this.mPrivateField3 = false; + this.prevTimeWolfIsShaking = 0.0F; + this.timeWolfIsShaking = 0.0F; + } + + if (this.timeWolfIsShaking > 0.4F) { + float f = (float) this.boundingBox.minY; + int i = (int) (MathHelper.sin((this.timeWolfIsShaking - 0.4F) * (float) Math.PI) * 7.0F); + + for (int j = 0; j < i; ++j) { + float f1 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F; + float f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F; + this.worldObj.spawnParticle("splash", this.posX + (double) f1, (double) (f + 0.8F), + this.posZ + (double) f2, this.motionX, this.motionY, this.motionZ); + } + } + } + } + + @SideOnly(Side.CLIENT) + public boolean getWolfShaking() { + return this.isShaking; + } + + /** + * Used when calculating the amount of shading to apply while the dingo is + * shaking. + */ + @SideOnly(Side.CLIENT) + public float getShadingWhileShaking(float p_70915_1_) { + return 0.75F + (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70915_1_) + / 2.0F * 0.25F; + } + + @SideOnly(Side.CLIENT) + public float getShakeAngle(float p_70923_1_, float p_70923_2_) { + float f2 = (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70923_1_ + + p_70923_2_) / 1.8F; + + if (f2 < 0.0F) { + f2 = 0.0F; + } else if (f2 > 1.0F) { + f2 = 1.0F; + } + + return MathHelper.sin(f2 * (float) Math.PI) * MathHelper.sin(f2 * (float) Math.PI * 11.0F) * 0.15F + * (float) Math.PI; + } + + public float getEyeHeight() { + return this.height * 0.8F; + } + + @SideOnly(Side.CLIENT) + public float getInterestedAngle(float p_70917_1_) { + return (this.mPrivateField2 + (this.mPrivateField1 - this.mPrivateField2) * p_70917_1_) * 0.15F + * (float) Math.PI; + } + + /** + * 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 p_70097_1_, float p_70097_2_) { + if (this.isEntityInvulnerable()) { + return false; + } else { + Entity entity = p_70097_1_.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) { + p_70097_2_ = (p_70097_2_ + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(p_70097_1_, p_70097_2_); + } + } + + public boolean attackEntityAsMob(Entity p_70652_1_) { + int i = this.isTamed() ? 4 : 2; + return p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean p_70903_1_) { + super.setTamed(p_70903_1_); + + if (p_70903_1_) { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); + } else { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.0D); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets + * into the saddle on a pig. + */ + public boolean interact(EntityPlayer p_70085_1_) { + ItemStack itemstack = p_70085_1_.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) < 20.0F) { + if (!p_70085_1_.capabilities.isCreativeMode) { + --itemstack.stackSize; + } + + this.heal((float) itemfood.func_150905_g(itemstack)); + + if (itemstack.stackSize <= 0) { + p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, + (ItemStack) null); + } + + return true; + } + } else if (itemstack.getItem() == Items.dye) { + int i = BlockColored.func_150032_b(itemstack.getItemDamage()); + + if (i != this.getCollarColor()) { + this.setCollarColor(i); + + if (!p_70085_1_.capabilities.isCreativeMode && --itemstack.stackSize <= 0) { + p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, + (ItemStack) null); + } + + return true; + } + } + } + + if (this.func_152114_e(p_70085_1_) && !this.worldObj.isRemote && !this.isBreedingItem(itemstack)) { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); + } + } else if (itemstack != null && itemstack.getItem() == Items.bone && !this.isAngry()) { + if (!p_70085_1_.capabilities.isCreativeMode) { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) { + p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack) null); + } + + if (!this.worldObj.isRemote) { + if (this.rand.nextInt(3) == 0) { + this.setTamed(true); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); + this.aiSit.setSitting(true); + this.setHealth(20.0F); + this.func_152115_b(p_70085_1_.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(p_70085_1_); + } + + @SideOnly(Side.CLIENT) + public void handleHealthUpdate(byte p_70103_1_) { + if (p_70103_1_ == 8) { + this.mPrivateField3 = true; + this.timeWolfIsShaking = 0.0F; + this.prevTimeWolfIsShaking = 0.0F; + } else { + super.handleHealthUpdate(p_70103_1_); + } + } + + @SideOnly(Side.CLIENT) + public float getTailRotation() { + return this.isAngry() ? 1.5393804F + : (this.isTamed() + ? (0.55F - (20.0F - this.dataWatcher.getWatchableObjectFloat(18)) * 0.02F) * (float) Math.PI + : ((float) Math.PI / 5F)); + } + + /** + * 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 p_70877_1_) { + return p_70877_1_ == null ? false + : (!(p_70877_1_.getItem() instanceof ItemFood) ? false + : ((ItemFood) p_70877_1_.getItem()).isWolfsFavoriteMeat()); + } + + /** + * Will return how many at most can spawn in a chunk at once. + */ + public int getMaxSpawnedInChunk() { + return 8; + } + + /** + * Determines whether this dingo is angry or not. + */ + public boolean isAngry() { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this dingo is angry or not. + */ + public void setAngry(boolean p_70916_1_) { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70916_1_) { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); + } + } + + /** + * Return this dingo's collar color. + */ + public int getCollarColor() { + return this.dataWatcher.getWatchableObjectByte(20) & 15; + } + + /** + * Set this dingo's collar color. + */ + public void setCollarColor(int p_82185_1_) { + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (p_82185_1_ & 15))); + } + + public EntityDingo createChild(EntityAgeable p_90011_1_) { + EntityDingo entitydingo = new EntityDingo(this.worldObj); + String s = this.func_152113_b(); + + if (s != null && s.trim().length() > 0) { + entitydingo.func_152115_b(s); + entitydingo.setTamed(true); + } + + return entitydingo; + } + + public void func_70918_i(boolean p_70918_1_) { + if (p_70918_1_) { + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else { + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); + } + } + + /** + * Returns true if the mob is currently able to mate with the specified mob. + */ + public boolean canMateWith(EntityAnimal p_70878_1_) { + if (p_70878_1_ == this) { + return false; + } else if (!this.isTamed()) { + return false; + } else if (!(p_70878_1_ instanceof EntityDingo)) { + return false; + } else { + EntityDingo entitydingo = (EntityDingo) p_70878_1_; + return !entitydingo.isTamed() ? false + : (entitydingo.isSitting() ? false : this.isInLove() && entitydingo.isInLove()); + } + } + + 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 !this.isTamed() && this.ticksExisted > 2400; + } + + public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) { + if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) { + if (p_142018_1_ instanceof EntityDingo) { + EntityDingo entitydingo = (EntityDingo) p_142018_1_; + + if (entitydingo.isTamed() && entitydingo.getOwner() == p_142018_2_) { + return false; + } + } + + return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer + && !((EntityPlayer) p_142018_2_).canAttackPlayer((EntityPlayer) p_142018_1_) ? false + : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse) p_142018_1_).isTame(); + } else { + return false; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/entity/type/EntityOctopus.java b/src/main/java/gtPlusPlus/australia/entity/type/EntityOctopus.java new file mode 100644 index 0000000000..f88d931b52 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/entity/type/EntityOctopus.java @@ -0,0 +1,228 @@ +package gtPlusPlus.australia.entity.type; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.passive.EntityWaterMob; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class EntityOctopus extends EntityWaterMob +{ + public float octopusPitch; + public float prevSquidPitch; + public float octopusYaw; + public float prevSquidYaw; + /** appears to be rotation in radians; we already have pitch & yaw, so this completes the triumvirate. */ + public float octopusRotation; + /** previous octopusRotation in radians */ + public float prevSquidRotation; + /** angle of the tentacles in radians */ + public float tentacleAngle; + /** the last calculated angle of the tentacles in radians */ + public float lastTentacleAngle; + private float randomMotionSpeed; + /** change in octopusRotation in radians. */ + private float rotationVelocity; + private float field_70871_bB; + private float randomMotionVecX; + private float randomMotionVecY; + private float randomMotionVecZ; + + public EntityOctopus(World p_i1693_1_) + { + super(p_i1693_1_); + this.setSize(0.95F, 0.95F); + this.rotationVelocity = 1.0F / (this.rand.nextFloat() + 1.0F) * 0.2F; + } + + protected void applyEntityAttributes() + { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + return null; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return null; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return null; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + protected Item getDropItem() + { + return Item.getItemById(0); + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + protected boolean canTriggerWalking() + { + return false; + } + + /** + * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param + * par2 - Level of Looting used to kill this mob. + */ + protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) + { + int j = this.rand.nextInt(3 + p_70628_2_) + 1; + + for (int k = 0; k < j; ++k) + { + this.entityDropItem(new ItemStack(Items.dye, 1, 0), 0.0F); + } + } + + /** + * Checks if this entity is inside water (if inWater field is true as a result of handleWaterMovement() returning + * true) + */ + public boolean isInWater() + { + return this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.6000000238418579D, 0.0D), Material.water, this); + } + + /** + * 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(); + this.prevSquidPitch = this.octopusPitch; + this.prevSquidYaw = this.octopusYaw; + this.prevSquidRotation = this.octopusRotation; + this.lastTentacleAngle = this.tentacleAngle; + this.octopusRotation += this.rotationVelocity; + + if (this.octopusRotation > ((float)Math.PI * 2F)) + { + this.octopusRotation -= ((float)Math.PI * 2F); + + if (this.rand.nextInt(10) == 0) + { + this.rotationVelocity = 1.0F / (this.rand.nextFloat() + 1.0F) * 0.2F; + } + } + + if (this.isInWater()) + { + float f; + + if (this.octopusRotation < (float)Math.PI) + { + f = this.octopusRotation / (float)Math.PI; + this.tentacleAngle = MathHelper.sin(f * f * (float)Math.PI) * (float)Math.PI * 0.25F; + + if ((double)f > 0.75D) + { + this.randomMotionSpeed = 1.0F; + this.field_70871_bB = 1.0F; + } + else + { + this.field_70871_bB *= 0.8F; + } + } + else + { + this.tentacleAngle = 0.0F; + this.randomMotionSpeed *= 0.9F; + this.field_70871_bB *= 0.99F; + } + + if (!this.worldObj.isRemote) + { + this.motionX = (double)(this.randomMotionVecX * this.randomMotionSpeed); + this.motionY = (double)(this.randomMotionVecY * this.randomMotionSpeed); + this.motionZ = (double)(this.randomMotionVecZ * this.randomMotionSpeed); + } + + f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.renderYawOffset += (-((float)Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float)Math.PI - this.renderYawOffset) * 0.1F; + this.rotationYaw = this.renderYawOffset; + this.octopusYaw += (float)Math.PI * this.field_70871_bB * 1.5F; + this.octopusPitch += (-((float)Math.atan2((double)f, this.motionY)) * 180.0F / (float)Math.PI - this.octopusPitch) * 0.1F; + } + else + { + this.tentacleAngle = MathHelper.abs(MathHelper.sin(this.octopusRotation)) * (float)Math.PI * 0.25F; + + if (!this.worldObj.isRemote) + { + this.motionX = 0.0D; + this.motionY -= 0.08D; + this.motionY *= 0.9800000190734863D; + this.motionZ = 0.0D; + } + + this.octopusPitch = (float)((double)this.octopusPitch + (double)(-90.0F - this.octopusPitch) * 0.02D); + } + } + + /** + * Moves the entity based on the specified heading. Args: strafe, forward + */ + public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) + { + this.moveEntity(this.motionX, this.motionY, this.motionZ); + } + + protected void updateEntityActionState() + { + ++this.entityAge; + + if (this.entityAge > 100) + { + this.randomMotionVecX = this.randomMotionVecY = this.randomMotionVecZ = 0.0F; + } + else if (this.rand.nextInt(50) == 0 || !this.inWater || this.randomMotionVecX == 0.0F && this.randomMotionVecY == 0.0F && this.randomMotionVecZ == 0.0F) + { + float f = this.rand.nextFloat() * (float)Math.PI * 2.0F; + this.randomMotionVecX = MathHelper.cos(f) * 0.2F; + this.randomMotionVecY = -0.1F + this.rand.nextFloat() * 0.2F; + this.randomMotionVecZ = MathHelper.sin(f) * 0.2F; + } + + this.despawnEntity(); + } + + /** + * Checks if the entity's current position is a valid location to spawn this entity. + */ + public boolean getCanSpawnHere() + { + return this.posY > 45.0D && this.posY < 63.0D && super.getCanSpawnHere(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java new file mode 100644 index 0000000000..18f9e6684f --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_Australia_Ores.java @@ -0,0 +1,294 @@ +package gtPlusPlus.australia.gen.gt; + +import java.util.Hashtable; + +import gregtech.api.enums.Materials; + +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.everglades.object.BoxedQuad; + +public class WorldGen_Australia_Ores { + + /** + * Set Ore Types on by one. + */ + + private static final Material PYRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Pyrite); + private static final Material PYROPE = MaterialUtils.generateMaterialFromGtENUM(Materials.Pyrope); + private static final Material ALMANDINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Almandine); + private static final Material RUBY = MaterialUtils.generateMaterialFromGtENUM(Materials.Ruby); + private static final Material CHALCOPYRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chalcopyrite); + private static final Material TOPAZ = MaterialUtils.generateMaterialFromGtENUM(Materials.Topaz); + private static final Material SAPPHIRE_GREEN = MaterialUtils.generateMaterialFromGtENUM(Materials.GreenSapphire); + private static final Material SAPPHIRE_BLUE = MaterialUtils.generateMaterialFromGtENUM(Materials.Sapphire); + + + private static final Material EMERALD = MaterialUtils.generateMaterialFromGtENUM(Materials.Emerald); + private static final Material DIAMOND = MaterialUtils.generateMaterialFromGtENUM(Materials.Diamond); + private static final Material BANDED_IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.BandedIron); + private static final Material LIM_YELLOW = MaterialUtils.generateMaterialFromGtENUM(Materials.YellowLimonite); + private static final Material LIM_BROWN = MaterialUtils.generateMaterialFromGtENUM(Materials.BrownLimonite); + private static final Material TETRAHEDRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Tetrahedrite); + private static final Material COAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Coal); + private static final Material SHIT_COAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Lignite); + private static final Material GRAPHITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Graphite); + + + + public static WorldGen_GT_Australia_Ore_Layer BaseVein = new WorldGen_GT_Australia_Ore_Layer( + "veinA", + 0, 128, + 5, + 8, + 32, + ELEMENT.getInstance().IRON, + BANDED_IRON, + LIM_YELLOW, + TETRAHEDRITE); + + + + /** + * Custom ore Veins + */ + + public static WorldGen_GT_Australia_Ore_Layer Vein1 = new WorldGen_GT_Australia_Ore_Layer( + "vein1", + 0, 10, + 1, + 8, + 16, + EMERALD, + SHIT_COAL, + TOPAZ, + DIAMOND); + + public static WorldGen_GT_Australia_Ore_Layer Vein2 = new WorldGen_GT_Australia_Ore_Layer( + "vein2", + 0, 128, + 20, + 16, + 64, + COAL, + COAL, + SHIT_COAL, + SHIT_COAL); + + public static WorldGen_GT_Australia_Ore_Layer Vein3 = new WorldGen_GT_Australia_Ore_Layer( + "vein3", + 0, 128, + 5, + 8, + 32, + ELEMENT.getInstance().IRON, + ELEMENT.getInstance().TIN, + ELEMENT.getInstance().GOLD, + ELEMENT.getInstance().LEAD); + + public static WorldGen_GT_Australia_Ore_Layer Vein4 = new WorldGen_GT_Australia_Ore_Layer( + "vein4", + 0, 128, + 5, + 8, + 32, + ELEMENT.getInstance().GOLD, + ELEMENT.getInstance().COPPER, + ELEMENT.getInstance().COBALT, + ALMANDINE); + + + + public static WorldGen_GT_Australia_Ore_Layer Vein5 = new WorldGen_GT_Australia_Ore_Layer( + "vein5", + 0, 128, + 15, + 8, + 16, + PYRITE, + PYROPE, + LIM_YELLOW, + CHALCOPYRITE); + + public static WorldGen_GT_Australia_Ore_Layer Vein6 = new WorldGen_GT_Australia_Ore_Layer( + "vein6", + 0, 128, + 5, + 8, + 32, + LIM_BROWN, + SAPPHIRE_GREEN, + ELEMENT.getInstance().IRON, + ELEMENT.getInstance().COPPER); + + public static WorldGen_GT_Australia_Ore_Layer Vein7 = new WorldGen_GT_Australia_Ore_Layer( + "vein7", + 0, 128, + 5, + 8, + 32, + GRAPHITE, + RUBY, + LIM_YELLOW, + ELEMENT.getInstance().NICKEL); + + public static WorldGen_GT_Australia_Ore_Layer Vein8 = new WorldGen_GT_Australia_Ore_Layer( + "vein8", + 0, 128, + 5, + 8, + 32, + ELEMENT.getInstance().IRON, + SAPPHIRE_BLUE, + LIM_YELLOW, + GRAPHITE); + + + + + /*public static WorldGen_GT_Australia_Ore_Layer Vein9 = new WorldGen_GT_Australia_Ore_Layer( + "vein9", + 10, 30, + 20, + 4, + 64, + ORES.LANTHANITE_CE, + FLUORIDES.FLUORITE, + PLATINUM, + ORES.FLORENCITE); + public static WorldGen_GT_Australia_Ore_Layer Vein10 = new WorldGen_GT_Australia_Ore_Layer( + "vein10", + 20, 50, + 20, + 8, + 32, + ORES.GEIKIELITE, + ORES.YTTROCERITE, + ORES.LANTHANITE_LA, + BAUXITE); + public static WorldGen_GT_Australia_Ore_Layer Vein11 = new WorldGen_GT_Australia_Ore_Layer( + "vein11", + 30, 70, + 20, + 5, + 64, + FLUORIDES.FLUORITE, + SAPPHIRE_BLUE, + ORES.ZIRCON, + ORES.CRYOLITE); + public static WorldGen_GT_Australia_Ore_Layer Vein12 = new WorldGen_GT_Australia_Ore_Layer( + "vein12", + 40, 80, + 20, + 8, + 32, + ORES.CERITE, + SAPPHIRE_GREEN, + CHALCOPYRITE, + ORES.HIBONITE); + + *//** + * Best Rarest Veins 2017 + *//* + + public static WorldGen_GT_Australia_Ore_Layer Vein13 = new WorldGen_GT_Australia_Ore_Layer( + "vein13", + 5, 15, + 5, + 5, + 16, + ORES.CRYOLITE, + NAQPLUS, + NAQUADRIA, + ORES.FLORENCITE); + + public static WorldGen_GT_Australia_Ore_Layer Vein14 = new WorldGen_GT_Australia_Ore_Layer( + "vein14", + 10, 20, + 8, + 3, + 16, + URNAIUM235, + PLUTONIUM, + OSMIUM, + AMETHYST); + + public static WorldGen_GT_Australia_Ore_Layer Vein15 = new WorldGen_GT_Australia_Ore_Layer( + "vein15", + 5, 25, + 5, + 6, + 24, + ORES.FLUORCAPHITE, + BISMUTH, + ORES.GADOLINITE_CE, + ORES.GADOLINITE_Y); + + public static WorldGen_GT_Australia_Ore_Layer Vein16 = new WorldGen_GT_Australia_Ore_Layer( + "vein16", + 0, 25, + 4, + 6, + 32, + ORES.YTTROCERITE, + ORES.LEPERSONNITE, + INFUSEDGOLD, + FLUORIDES.FLUORITE); + + public static WorldGen_GT_Australia_Ore_Layer Vein17 = new WorldGen_GT_Australia_Ore_Layer( + "vein17", + 10, 35, + 4, + 5, + 32, + ORES.FLORENCITE, + URNAIUM235, + ORES.SAMARSKITE_YB, + ORES.POLYCRASE); + public static WorldGen_GT_Australia_Ore_Layer Vein18 = new WorldGen_GT_Australia_Ore_Layer( + "vein18", + 15, 40, + 4, + 4, + 64, + ORES.GADOLINITE_CE, + ORES.GADOLINITE_Y, + ORES.AGARDITE_LA, + ORES.AGARDITE_CD);*/ + + + + + public static Hashtable validOreveins = new Hashtable( + 1024); + + + public static volatile BoxedQuad OreVein1 = new BoxedQuad(null, null, null, null); + + static long ID = 0; + public static void generateValidOreVeins(){ + validOreveins.put(ID++, BaseVein); + + validOreveins.put(ID++, Vein1); + validOreveins.put(ID++, Vein2); + validOreveins.put(ID++, Vein3); + validOreveins.put(ID++, Vein4); + validOreveins.put(ID++, Vein5); + validOreveins.put(ID++, Vein6); + validOreveins.put(ID++, Vein7); + validOreveins.put(ID++, Vein8); + + /*validOreveins.put(ID++, Vein9); + validOreveins.put(ID++, Vein10); + validOreveins.put(ID++, Vein11); + validOreveins.put(ID++, Vein12); + validOreveins.put(ID++, Vein13); + validOreveins.put(ID++, Vein14); + validOreveins.put(ID++, Vein15); + validOreveins.put(ID++, Vein16); + validOreveins.put(ID++, Vein17); + validOreveins.put(ID++, Vein18);*/ + } + +} diff --git a/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java new file mode 100644 index 0000000000..93d5524a66 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia.java @@ -0,0 +1,48 @@ +package gtPlusPlus.australia.gen.gt; + +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import gtPlusPlus.australia.GTplusplus_Australia; + +public abstract class WorldGen_GT_Australia { + public final String mWorldGenName; + public final boolean mEnabled; + private final Map mDimensionMap = new ConcurrentHashMap(); + + public WorldGen_GT_Australia(String aName, List aList, boolean aDefault) { + this.mWorldGenName = aName; + this.mEnabled = GTplusplus_Australia.sCustomWorldgenFile.get("worldgen", this.mWorldGenName, aDefault); + if (this.mEnabled) { + aList.add(this); + } + + } + + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, + int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + return false; + } + + public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, + int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + return false; + } + + public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { + String aDimName = aWorld.provider.getDimensionName(); + Boolean tAllowed = (Boolean) this.mDimensionMap.get(aDimName); + if (tAllowed == null) { + boolean tValue = GTplusplus_Australia.sCustomWorldgenFile.get("worldgen.dimensions." + this.mWorldGenName, aDimName, + aDimensionType == aAllowedDimensionType); + this.mDimensionMap.put(aDimName, Boolean.valueOf(tValue)); + return tValue; + } else { + return tAllowed.booleanValue(); + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java new file mode 100644 index 0000000000..917c1eb746 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Base.java @@ -0,0 +1,471 @@ +package gtPlusPlus.australia.gen.gt; + +import java.util.*; + +import cpw.mods.fml.common.IWorldGenerator; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import gregtech.api.util.GT_Log; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.australia.dimension.Dimension_Australia; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.xmod.gregtech.HANDLER_GT; + +public class WorldGen_GT_Australia_Base implements IWorldGenerator { + + /** + * Class Variables + */ + + /** + * Control percentage of filled 3x3 chunks. Lower number means less oreveins + * spawn + */ + public static int oreveinPercentage; + /** + * Control number of attempts to find a valid orevein. Generally this + * maximum limit isn't hit, selecting a vein is cheap + */ + public static int oreveinAttempts; + /** + * Control number of attempts to place a valid orevein. If a vein wasn't + * placed due to height restrictions, completely in the water, etc, another + * attempt is tried. + */ + public static int oreveinMaxPlacementAttempts; + /** + * Debug parameter for world generation. Tracks chunks added/removed from + * run queue. + */ + public static boolean debugWorldGen = false; + /** + * Try re-implement Richard Hendrick's Chunk by Chunk Ore Generation from + * his GT5u fork. + */ + + public static List mList = new ArrayList(); + public static HashSet ProcChunks = new HashSet(); + // This is probably not going to work. Trying to create a fake orevein to + // put into hashtable when there will be no ores in a vein. + public static WorldGen_GT_Australia_Ore_Layer noOresInVein = new WorldGen_GT_Australia_Ore_Layer("vein0", 0, 255, 0, 0, + 0, ELEMENT.getInstance().IRON, ELEMENT.getInstance().GOLD, ELEMENT.getInstance().LEAD, ELEMENT.getInstance().TIN); + + public static Hashtable validOreveins = new Hashtable( + 1024); + + public boolean mIsGenerating = false; + public static final Object listLock = new Object(); + // private static boolean gcAsteroids = true; + + public WorldGen_GT_Australia_Base() { + if (debugWorldGen) { + GT_Log.out.println("GTPP_Worldgenerator created"); + } + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, + IChunkProvider chunkProvider) { + if (world.provider.dimensionId == Dimension_Australia.DIMID) { + generateSafely(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); + } + } + + public synchronized void generateSafely(Random random, int chunkX, int chunkZ, World world, + IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + int xDim = Dimension_Australia.DIMID; + switch (world.provider.dimensionId) { + case -1: // Nether + // generateNether(world, random, chunkX * 16, chunkZ * 16); + break; + case 0: // Overworld + // generateSurface(world, random, chunkX * 16, chunkZ * 16); + break; + case 1: // End + // generateEnd(world, random, chunkX * 16, chunkZ * 16); + break; + default: // Any other dimension + if (world.provider.dimensionId != xDim) { + break; + } + else { + generateEverglades(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); + break; + } + } + } + + private synchronized void generateEverglades(Random aRandom, int aX, int aZ, World aWorld, + IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + Logger.WARNING("Trying to Generate Dimension."); + synchronized (listLock) { + Logger.WARNING("Locked List addition."); + if (WorldGen_GT_Australia_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) + 1), aX, aZ, + Dimension_Australia.DIMID, + aWorld, aChunkGenerator, aChunkProvider, + aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName))){ + Logger.WARNING("Locked List addition. Success."); + } + else { + Logger.WARNING("Locked List addition. Fail."); + } + if (debugWorldGen) + GT_Log.out.println("ADD WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId + + " chunk x:" + aX + " z:" + aZ + " SIZE: " + WorldGen_GT_Australia_Base.mList.size()); + } + + if (!this.mIsGenerating) { + Logger.WARNING("Is not generating."); + this.mIsGenerating = true; + Logger.WARNING("Setting Generation to true."); + int mList_sS = WorldGen_GT_Australia_Base.mList.size(); + mList_sS = Math.min(mList_sS, 3); // Run a maximum of 3 chunks at a + // time through worldgen. Extra + // chunks get done later. + for (int i = 0; i < mList_sS; i++) { + WorldGenContainer toRun = (WorldGenContainer) WorldGen_GT_Australia_Base.mList.get(0); + if (debugWorldGen) + GT_Log.out.println("RUN WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId + + " chunk x:" + toRun.mX + " z:" + toRun.mZ + " SIZE: " + WorldGen_GT_Australia_Base.mList.size() + + " i: " + i); + synchronized (listLock) { + Logger.WARNING("Locked List Removal."); + WorldGen_GT_Australia_Base.mList.remove(0); + } + toRun.run(); + } + this.mIsGenerating = false; + Logger.WARNING("Is Generating now set to false.."); + } + } + + public void generateOre(Block block, World world, Random random, int chunk_x, int chunk_z, int maxX, int maxZ, + int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block generateIn) { + int heightRange = maxY - minY; + WorldGenMinable worldgenminable = new WorldGenMinable(block, maxVeinSize, generateIn); + for (int k1 = 0; k1 < chancesToSpawn; ++k1) { + int xrand = random.nextInt(16); + int yrand = random.nextInt(heightRange) + minY; + int zrand = random.nextInt(16); + worldgenminable.generate(world, random, chunk_x + xrand, yrand, chunk_z + zrand); + } + } + + public static class WorldGenContainer implements Runnable { + public final Random mRandom; + public final int mX; + public final int mZ; + public final int mDimensionType; + public final World mWorld; + public final IChunkProvider mChunkGenerator; + public final IChunkProvider mChunkProvider; + public final String mBiome; + + // Local class to track which orevein seeds must be checked when doing + // chunkified worldgen + class NearbySeeds { + public int mX; + public int mZ; + + NearbySeeds(int x, int z) { + this.mX = x; + this.mZ = z; + } + }; + + public static ArrayList seedList = new ArrayList(); + + // aX and aZ are now the by-chunk X and Z for the chunk of interest + public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, + IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { + this.mRandom = aRandom; + this.mX = aX; + this.mZ = aZ; + this.mDimensionType = aDimensionType; + this.mWorld = aWorld; + this.mChunkGenerator = aChunkGenerator; + this.mChunkProvider = aChunkProvider; + this.mBiome = aBiome; + } + + public void worldGenFindVein(int oreseedX, int oreseedZ) { + // Explanation of oreveinseed implementation. + // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen + // passes, one with getSeed set to +1 the original world seed. This + // pushes that +1 off the low bits of oreseedZ, so that the hashes + // are far apart for the two passes. + // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the + // dimension in the top bits of the hash, to make sure to get unique + // hashes per dimension + // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in + // the bits 29-55. Cuts off the top few bits of the chunk so we have + // bits for dimension. + // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the + // bits 0-27. Cuts off the top few bits of the chunk so we have bits + // for dimension. + long oreveinSeed = (this.mWorld.getSeed() << 16) ^ ((this.mWorld.provider.dimensionId & 0xffL) << 56 + | ((oreseedX & 0x000000000fffffffL) << 28) | (oreseedZ & 0x000000000fffffffL)); // Use + // an + // RNG + // that + // is + // identical + // every + // time + // it + // is + // called + // for + // this + // oreseed. + XSTR oreveinRNG = new XSTR(oreveinSeed); + int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the + // dice, see + // if we get + // an + // orevein + // here at + // all + int noOrePlacedCount = 0; + String tDimensionName = ""; + if (debugWorldGen) { + tDimensionName = this.mWorld.provider.getDimensionName(); + } + + if (debugWorldGen){ + GT_Log.out.println(" Finding oreveins for oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + + this.mZ + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " worldSeed=" + + this.mWorld.getSeed()); + } + + Logger.WARNING("[World Generation Debug] !validOreveins.containsKey(oreveinSeed) | oreveinSeed: "+oreveinSeed); + // Search for a valid orevein for this dimension + if (!validOreveins.containsKey(oreveinSeed)) { + + + Logger.WARNING("[World Generation Debug] oreveinPercentageRoll < oreveinPercentage? "+((oreveinPercentageRoll < oreveinPercentage))); + Logger.WARNING("[World Generation Debug] WorldGen_GT_Ore_Layer.sWeight > 0? "+(WorldGen_GT_Australia_Ore_Layer.sWeight > 0)); + Logger.WARNING("[World Generation Debug] WorldGen_GT_Ore_Layer.sList.size() > 0? "+(WorldGen_GT_Australia_Ore_Layer.sList.size() > 0)); + if ((oreveinPercentageRoll < oreveinPercentage) && (WorldGen_GT_Australia_Ore_Layer.sWeight > 0) + && (WorldGen_GT_Australia_Ore_Layer.sList.size() > 0)) { + int placementAttempts = 0; + boolean oreveinFound = false; + int i; + for (i = 0; (i < oreveinAttempts) && (!oreveinFound) + && (placementAttempts < oreveinMaxPlacementAttempts); i++) { + Logger.WARNING("[World Generation Debug] i: "+i); + Logger.WARNING("[World Generation Debug] placementAttempts: "+placementAttempts); + Logger.WARNING("[World Generation Debug] oreveinAttempts: "+oreveinAttempts); + Logger.WARNING("[World Generation Debug] (placementAttempts < oreveinMaxPlacementAttempts): "+(placementAttempts < oreveinMaxPlacementAttempts)); + Logger.WARNING("[World Generation Debug] oreveinFound: "+oreveinFound); + int tRandomWeight = oreveinRNG.nextInt(WorldGen_GT_Australia_Ore_Layer.sWeight); + for (WorldGen_GT_Australia_Ore_Layer tWorldGen : WorldGen_GT_Australia_Ore_Layer.sList) { + Logger.WARNING("[World Generation Debug] Iterating sList - Size: "+WorldGen_GT_Australia_Ore_Layer.sList.size()); + tRandomWeight -= (tWorldGen).mWeight; + if (tRandomWeight <= 0) { + try { + // Adjust the seed so that this layer has a + // series of unique random numbers. + // Otherwise multiple attempts at this same + // oreseed will get the same offset and X/Z + // values. If an orevein failed, any orevein + // with the + // same minimum heights would fail as well. + // This prevents that, giving each orevein a + // unique height each pass through here. + int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, + new XSTR(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))), this.mBiome, + this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, + oreseedZ * 16, this.mChunkGenerator, this.mChunkProvider); + switch (placementResult) { + case WorldGen_GT_Australia_Ore_Layer.ORE_PLACED: + if (debugWorldGen) + GT_Log.out.println(" Added oreveinSeed=" + oreveinSeed + + " tries at oremix=" + i + " placementAttempts=" + + placementAttempts + " dimensionName=" + tDimensionName); + validOreveins.put(oreveinSeed, tWorldGen); + oreveinFound = true; + Logger.WARNING("[World Generation Debug] ORE_PLACED"); + break; + case WorldGen_GT_Australia_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: + placementAttempts++; + Logger.WARNING("[World Generation Debug] NO_ORE_IN_BOTTOM_LAYER | Attempts: "+placementAttempts); + // SHould do retry in this case + // until out of chances + break; + case WorldGen_GT_Australia_Ore_Layer.NO_OVERLAP: + // Orevein didn't reach this chunk, + // can't add it yet to the hash + Logger.WARNING("[World Generation Debug] NO_OVERLAP"); + if (debugWorldGen) GT_Log.out.println( + " Added far oreveinSeed=" + oreveinSeed + " " + + ( tWorldGen).mWorldGenName + + " tries at oremix=" + i + + " placementAttempts=" + placementAttempts + + " dimensionName=" + tDimensionName + ); + validOreveins.put(oreveinSeed, tWorldGen); + oreveinFound = true; + break; + case WorldGen_GT_Australia_Ore_Layer.NO_OVERLAP_AIR_BLOCK: + if (debugWorldGen) GT_Log.out.println( + " No overlap and air block in test spot=" + oreveinSeed + " " + + ( tWorldGen).mWorldGenName + + " tries at oremix=" + i + + " placementAttempts=" + placementAttempts + + " dimensionName=" + tDimensionName + ); + // SHould do retry in this case until out of chances + Logger.WARNING("[World Generation Debug] NO_OVERLAP_AIR_BLOCK"); + placementAttempts++; + break; + } + break; // Try the next orevein + } + catch (Throwable e) { + if (debugWorldGen) + GT_Log.out.println("Exception occurred on oreVein" + tWorldGen + " oreveinSeed=" + + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + " oreseedX=" + + oreseedX + " oreseedZ=" + oreseedZ); + e.printStackTrace(GT_Log.err); + } + } + } + } + // Only add an empty orevein if are unable to place a vein + // at the oreseed chunk. + if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) { + if (debugWorldGen) + GT_Log.out.println(" Empty oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " tries at oremix=" + i + + " placementAttempts=" + placementAttempts + " dimensionName=" + tDimensionName); + validOreveins.put(oreveinSeed, noOresInVein); + } + } + else if (oreveinPercentageRoll >= oreveinPercentage) { + if (debugWorldGen) + GT_Log.out.println(" Skipped oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " RNG=" + oreveinPercentageRoll + + " %=" + oreveinPercentage + " dimensionName=" + tDimensionName); + validOreveins.put(oreveinSeed, noOresInVein); + } + } + else { + // oreseed is located in the previously processed table + if (debugWorldGen) + GT_Log.out.print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" + + validOreveins.size() + " "); + WorldGen_GT_Australia_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed); + oreveinRNG.setSeed(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))); // Reset + // RNG + // to + // only + // be + // based + // on + // oreseed + // X/Z + // and + // type + // of + // vein + int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, + this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, oreseedZ * 16, + this.mChunkGenerator, this.mChunkProvider); + switch (placementResult) { + case WorldGen_GT_Australia_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: + if (debugWorldGen) + GT_Log.out.println(" No ore in bottom layer"); + break; + case WorldGen_GT_Australia_Ore_Layer.NO_OVERLAP: + if (debugWorldGen) + GT_Log.out.println(" No overlap"); + break; + } + } + } + + @Override + public void run() { + long startTime = System.nanoTime(); + int oreveinMaxSize; + + // Determine bounding box on how far out to check for oreveins + // affecting this chunk + // For now, manually reducing oreveinMaxSize when not in the + // Underdark for performance + if (this.mWorld.provider.getDimensionName().equals("Underdark")) { + oreveinMaxSize = 24; // Leave Deep Dark/Underdark max oregen at + // 32, instead of 64 + } + else { + oreveinMaxSize = 48; + } + + int wXbox = this.mX - (oreveinMaxSize / 16); + int eXbox = this.mX + (oreveinMaxSize / 16 + 1); // Need to add 1 + // since it is + // compared + // using a < + int nZbox = this.mZ - (oreveinMaxSize / 16); + int sZbox = this.mZ + (oreveinMaxSize / 16 + 1); + + // Search for orevein seeds and add to the list; + for (int x = wXbox; x < eXbox; x++) { + for (int z = nZbox; z < sZbox; z++) { + // Determine if this X/Z is an orevein seed + if (((Math.abs(x) % 3) == 1) && ((Math.abs(z) % 3) == 1)) { + if (debugWorldGen) + GT_Log.out.println("Adding seed x=" + x + " z=" + z); + seedList.add(new NearbySeeds(x, z)); + } + } + } + + // Now process each oreseed vs this requested chunk + for (; seedList.size() != 0; seedList.remove(0)) { + if (debugWorldGen) + GT_Log.out.println("Processing seed x=" + seedList.get(0).mX + " z=" + seedList.get(0).mZ); + worldGenFindVein(seedList.get(0).mX, seedList.get(0).mZ); + } + + long oregenTime = System.nanoTime(); + + // Do leftover worldgen for this chunk (GT_Stones and GT_small_ores) + try { + for (WorldGen_GT_Australia tWorldGen : HANDLER_GT.sWorldgenListAustralia) { + /* + * if (debugWorldGen) GT_Log.out.println( + * "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); + */ + tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX * 16, + this.mZ * 16, this.mChunkGenerator, this.mChunkProvider); + } + } + catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } + + long leftOverTime = System.nanoTime(); + + Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ); + if (tChunk != null) { + tChunk.isModified = true; + } + long endTime = System.nanoTime(); + long duration = (endTime - startTime); + if (debugWorldGen) { + GT_Log.out.println(" Oregen took " + (oregenTime - startTime) + " Leftover gen took " + + (leftOverTime - oregenTime) + " Worldgen took " + duration + " nanoseconds"); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java new file mode 100644 index 0000000000..a5e5f8b245 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/gt/WorldGen_GT_Australia_Ore_Layer.java @@ -0,0 +1,511 @@ +package gtPlusPlus.australia.gen.gt; + +import static gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia_Base.debugWorldGen; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.*; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Log; +import gregtech.common.blocks.GT_Block_Ores; +import gregtech.common.blocks.GT_TileEntity_Ores; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.GTplusplus_Australia; +import gtPlusPlus.australia.dimension.Dimension_Australia; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class WorldGen_GT_Australia_Ore_Layer +extends WorldGen_GT_Australia { + public static ArrayList sList = new ArrayList(); + public static int sWeight = 0; + public final short mMinY; + public final short mMaxY; + public final short mWeight; + public final short mDensity; + public final short mSize; + public Block mPrimaryMeta; + public Block mSecondaryMeta; + public Block mBetweenMeta; + public Block mSporadicMeta; + public final Material mPrimary; + public final Material mSecondary; + public final Material mBetween; + public final Material mSporadic; + + public static boolean mUpdated = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; + public static final Block mStoneTypes; + + //public final String mBiome; + public final String mRestrictBiome; + public final boolean mOverworld; + public final boolean mNether; + public final boolean mEnd; + public static final int WRONG_BIOME=0; + public static final int WRONG_DIMENSION=1; + public static final int NO_ORE_IN_BOTTOM_LAYER=2; + public static final int NO_OVERLAP=3; + public static final int ORE_PLACED=4; + public static final int NO_OVERLAP_AIR_BLOCK=5; + + //public final boolean mMoon; + //public final boolean mMars; + //public final boolean mAsteroid; + public final String aTextWorldgen = "worldgen."; + + static { + if (mUpdated) { + Object tempBlock = null; + try { + Field temp = ReflectionUtils.getField(GregTech_API.class, "sBlockStones"); + tempBlock = temp.get(null); + } + catch (IllegalArgumentException | IllegalAccessException e) {} + mStoneTypes = (Block) tempBlock; + } + else { + mStoneTypes = null; + } + } + + + public WorldGen_GT_Australia_Ore_Layer(String aName, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { + this(aName, true, aMinY, aMaxY, aWeight, aDensity, aSize, false, false, false, false, false, false, aPrimary, aSecondary, aBetween, aSporadic); + } + + + public WorldGen_GT_Australia_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { + super(aName, sList, aDefault); + Logger.WARNING("Creating Ore Layer Object"); + this.mOverworld = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); + this.mNether = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); + this.mEnd = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); + //this.mMoon = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); + //this.mMars = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); + //this.mAsteroid = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); + this.mMinY = 5; + short mMaxY = 14; + if (mMaxY < (this.mMinY + 7)) { + GT_Log.out.println( + "Oremix " + this.mWorldGenName + + " has invalid Min/Max heights!" + ); + mMaxY = (short) (this.mMinY + 7); + } + this.mMaxY = mMaxY; + this.mWeight = ((short) GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); + this.mDensity = ((short) GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); + this.mSize = ((short) Math.max(1, GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); + this.mPrimary = aPrimary; + this.mSecondary = aSecondary; + this.mBetween = aBetween; + this.mSporadic = aSporadic; + this.mPrimaryMeta = aPrimary.getOreBlock(1); + this.mSecondaryMeta = aSecondary.getOreBlock(1); + this.mBetweenMeta = aBetween.getOreBlock(1); + this.mSporadicMeta = aSporadic.getOreBlock(1); + this.mRestrictBiome = GTplusplus_Australia.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); + + //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); + //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); + //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist"); + //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist"); + + if (this.mEnabled) { + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + sWeight += this.mWeight; + } + } + + public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + + //Debug Handler + /** + * This handles Variables that are null during Init + */ + + if (this.mPrimaryMeta == Blocks.stone || this.mSecondaryMeta == Blocks.stone + || this.mBetweenMeta == Blocks.stone || this.mSporadicMeta == Blocks.stone){ + this.mPrimaryMeta = this.mPrimary.getOreBlock(1); + this.mSecondaryMeta = this.mSecondary.getOreBlock(1); + this.mBetweenMeta = this.mBetween.getOreBlock(1); + this.mSporadicMeta = this.mSporadic.getOreBlock(1); + Logger.WARNING("[Vein Generator] An Ore in a Vein had defaulted back to a default value, so they have now been reset to correct values."); + } + + if( mWorldGenName.equals("vein0") ) { + if (debugWorldGen) GT_Log.out.println( + " NoOresInVein-vein0" + ); + // This is a special empty orevein + Logger.WARNING("[World Generation Debug] Special Empty Vein placed."); + return ORE_PLACED; + } + if (aDimensionType != Dimension_Australia.DIMID) { + /* // Debug code, but spams log + if (debugWorldGen) { + GT_Log.out.println( + "Wrong dimension" + ); + } + */ + Logger.WARNING("[World Generation Debug] Wrong dimension."); + return WRONG_DIMENSION; + } + if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { + return WRONG_BIOME; + } + int[] placeCount=new int[4]; + + int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5); + // Determine West/East ends of orevein + int wXVein = aSeedX - aRandom.nextInt(mSize); // West side + int eXVein = aSeedX + 16 + aRandom.nextInt(mSize); + // Limit Orevein to only blocks present in current chunk + int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade. + int eX = Math.min( eXVein, aChunkX + 2 + 16); + if (wX >= eX) { //No overlap between orevein and this chunk exists in X + Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); + if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || + (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { + // Didn't reach, but could have placed. Save orevein for future use. + return NO_OVERLAP; + } else { + // Didn't reach, but couldn't place in test spot anywys, try for another orevein + return NO_OVERLAP_AIR_BLOCK; + } + } + // Determine North/Sound ends of orevein + int nZVein = aSeedZ - aRandom.nextInt(mSize); + int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize); + + int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade. + int sZ = Math.min(sZVein, aChunkZ + 2 + 16); + if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z + Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); + if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || + (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { + // Didn't reach, but could have placed. Save orevein for future use. + return NO_OVERLAP; + } else { + // Didn't reach, but couldn't place in test spot anywys, try for another orevein + return NO_OVERLAP_AIR_BLOCK; + } + + } + + if (debugWorldGen) { + String tDimensionName = aWorld.provider.getDimensionName(); + GT_Log.out.print( + "Trying Orevein:" + this.mWorldGenName + + " Dimension=" + tDimensionName + + " mX="+aChunkX/16+ + " mZ="+aChunkZ/16+ + " oreseedX="+ aSeedX/16 + + " oreseedZ="+ aSeedZ/16 + + " cY="+tMinY + ); + } + // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt(). + int localDensity = (Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))))); + + // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop + // Now we do bottom-level-first oregen, and work our way upwards. + int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure. + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { + placeCount[1]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + /*if ((placeCount[1]+placeCount[3])==0) { + if (debugWorldGen) GT_Log.out.println( + " No ore in bottom layer" + ); + return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer + }*/ + Logger.WARNING("[World Generation Debug] Trying to set Ores?"); + for (level = tMinY; level < (tMinY-1+3); level++) { + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { + placeCount[1]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + } + // Low Middle layer is between + sporadic + // level should be = tMinY-1+3 from end of for loop + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { + placeCount[2]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + // High Middle layer is between + primary + sporadic + level++; // Increment level to next layer + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { + placeCount[2]++; + } + } + else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { + placeCount[0]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + // Top two layers are primary + sporadic + level++; // Increment level to next layer + for( ; level < (tMinY + 6); level++){ // should do two layers + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { + placeCount[0]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + } + if (debugWorldGen) { + String tDimensionName = aWorld.provider.getDimensionName(); + GT_Log.out.println( + "Generated Orevein:" + this.mWorldGenName + + " Dimension=" + tDimensionName + + " mX="+aChunkX/16+ + " mZ="+aChunkZ/16+ + " oreseedX="+ aSeedX/16 + + " oreseedZ="+ aSeedZ/16 + + " cY="+tMinY+ + " wXVein" + wXVein + + " eXVein" + eXVein + + " nZVein" + nZVein + + " sZVein" + sZVein + + " locDen=" + localDensity + + " Den=" + this.mDensity + + " Sec="+placeCount[1]+ + " Spo="+placeCount[3]+ + " Bet="+placeCount[2]+ + " Pri="+placeCount[0] + ); + } + // Something (at least the bottom layer must have 1 block) must have been placed, return true + return ORE_PLACED; + } + + private String fString = "unset", ore1String = "unset", ore2String = "unset", ore3String = "unset", ore4String = "unset"; + Map gtOreMap = new HashMap(); + + @SuppressWarnings("deprecation") + public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData, boolean isSmallOre, + boolean air) { + if (!air) { + aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); + } + + //Set GT ORE + if (aMetaData instanceof GT_Block_Ores){ + if (ore1String.equals("unset")) { + ore1String = Utils.sanitizeString(this.mPrimary.getLocalizedName().toLowerCase()); + } + if (ore2String.equals("unset")) { + ore2String = Utils.sanitizeString(this.mSecondaryMeta.getLocalizedName().toLowerCase()); + } + if (ore3String.equals("unset")) { + ore3String = Utils.sanitizeString(this.mBetweenMeta.getLocalizedName().toLowerCase()); + } + if (ore4String.equals("unset")) { + ore4String = Utils.sanitizeString(this.mSporadicMeta.getLocalizedName().toLowerCase()); + } + + if (this.mPrimaryMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore1String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + if (this.mSecondaryMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore2String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + if (this.mBetweenMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore3String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + if (this.mSporadicMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore4String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WARNING("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + + } + + Block tBlock = aWorld.getBlock(aX, aY, aZ); + Block tOreBlock = aMetaData; + int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ); + String BlockName = tBlock.getUnlocalizedName(); + if ( + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sand) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) || + (mUpdated && tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, mStoneTypes)) ||/* + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondLayer) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockMainFiller) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondaryFiller) ||*/ + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sandstone)) { + + if (aWorld.setBlock(aX, aY, aZ, tOreBlock, 0, 3)){ + Logger.WARNING("[World Generation Debug] Set "+tOreBlock.getLocalizedName()+" at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + return false; + } + + + private boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int mMetaItemSubID, boolean useless){ + + //Get Class and Methods + Method setOres = null; + boolean is08 = !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; + + //GT 5.08 + if (is08){ + try { + setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class); + } + catch (NoSuchMethodException | SecurityException e) { + + } + } + //GT 5.09 + else { + try { + setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class); + } + catch (NoSuchMethodException | SecurityException e) { + + } + } + + try { + if (is08 && setOres != null){ + setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID); + } + else if (!is08 && setOres != null){ + setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID, useless); + } + else { + return false; + }} + catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java b/src/main/java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java new file mode 100644 index 0000000000..8fc6940242 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/MapGenExtendedVillage.java @@ -0,0 +1,265 @@ +package gtPlusPlus.australia.gen.map; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.GTplusplus_Australia; + +import java.util.Map.Entry; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.structure.MapGenStructure; +import net.minecraft.world.gen.structure.StructureBoundingBox; +import net.minecraft.world.gen.structure.StructureComponent; +import net.minecraft.world.gen.structure.StructureStart; +import net.minecraft.world.gen.structure.StructureVillagePieces; + +public class MapGenExtendedVillage extends MapGenStructure +{ + /** A list of all the biomes villages can spawn in. */ + public static List villageSpawnBiomes = Arrays.asList(new BiomeGenBase[] {GTplusplus_Australia.Australian_Desert_Biome_3, GTplusplus_Australia.Australian_Plains_Biome, GTplusplus_Australia.Australian_Forest_Biome, GTplusplus_Australia.Australian_Outback_Biome}); + /** World terrain type, 0 for normal, 1 for flat map */ + private int terrainType; + private int field_82665_g; + private int field_82666_h; + + public MapGenExtendedVillage(){ + this.field_82665_g = 8; + this.field_82666_h = 4; + } + + public MapGenExtendedVillage(Map p_i2093_1_){ + this(); + Iterator iterator = p_i2093_1_.entrySet().iterator(); + + Logger.INFO("Created Extended Village Object."); + + while (iterator.hasNext()) + { + Entry entry = (Entry)iterator.next(); + + if (((String)entry.getKey()).equals("size")) + { + this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0); + } + else if (((String)entry.getKey()).equals("distance")) + { + this.field_82665_g = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.field_82665_g, this.field_82666_h + 1); + } + } + } + + public String func_143025_a() + { + return "ExtendedVillage"; + } + + protected boolean canSpawnStructureAtCoords(int p_75047_1_, int p_75047_2_) + { + + + int k = p_75047_1_; + int l = p_75047_2_; + + if (p_75047_1_ < 0) + { + p_75047_1_ -= this.field_82665_g - 1; + } + + if (p_75047_2_ < 0) + { + p_75047_2_ -= this.field_82665_g - 1; + } + + int i1 = p_75047_1_ / this.field_82665_g; + int j1 = p_75047_2_ / this.field_82665_g; + Random random = this.worldObj.setRandomSeed(i1, j1, 10387312); + i1 *= this.field_82665_g; + j1 *= this.field_82665_g; + i1 += random.nextInt(this.field_82665_g - this.field_82666_h); + j1 += random.nextInt(this.field_82665_g - this.field_82666_h); + + if (k == i1 && l == j1) + { + boolean flag = this.worldObj.getWorldChunkManager().areBiomesViable(k * 16 + 8, l * 16 + 8, 0, villageSpawnBiomes); + + if (flag) + { + Logger.INFO("Found viable biome(s) for custom village"); + return true; + } + } + + return false; + } + + protected StructureStart getStructureStart(int p_75049_1_, int p_75049_2_) + { + return new MapGenExtendedVillage.Start(this.worldObj, this.rand, p_75049_1_, p_75049_2_, this.terrainType); + } + + public static class Start extends StructureStart + { + /** well ... thats what it does */ + private boolean hasMoreThanTwoComponents; + + public Start() { + } + + public Start(World p_i2092_1_, Random p_i2092_2_, int p_i2092_3_, int p_i2092_4_, int p_i2092_5_) + { + super(p_i2092_3_, p_i2092_4_); + Logger.INFO("Trying to Start Village Builder."); + List list = StructureVillagePieces.getStructureVillageWeightedPieceList(p_i2092_2_, p_i2092_5_); + StructureVillagePieces.Start start = new StructureVillagePieces.Start(p_i2092_1_.getWorldChunkManager(), 0, p_i2092_2_, (p_i2092_3_ << 4) + 2, (p_i2092_4_ << 4) + 2, list, p_i2092_5_); + this.components.add(start); + start.buildComponent(start, this.components, p_i2092_2_); + List list1 = start.field_74930_j; + List list2 = start.field_74932_i; + int l; + Logger.INFO("List1: "+list1.size()+" | List2: "+list2.size()); + + while (!list1.isEmpty() || !list2.isEmpty()) + { + Logger.INFO("Iterating non empty list."); + StructureComponent structurecomponent; + + if (list1.isEmpty()) + { + l = p_i2092_2_.nextInt(list2.size()); + structurecomponent = (StructureComponent)list2.remove(l); + structurecomponent.buildComponent(start, this.components, p_i2092_2_); + } + else + { + l = p_i2092_2_.nextInt(list1.size()); + structurecomponent = (StructureComponent)list1.remove(l); + structurecomponent.buildComponent(start, this.components, p_i2092_2_); + } + } + Logger.INFO("Finished iterating lists, updating bounding box for structure."); + + this.updateBoundingBox(); + l = 0; + Iterator iterator = this.components.iterator(); + + while (iterator.hasNext()) + { + Logger.INFO("Iterating Components."); + StructureComponent structurecomponent1 = (StructureComponent)iterator.next(); + + if (!(structurecomponent1 instanceof StructureVillagePieces.Road)) + { + ++l; + } + } + + Logger.INFO("hasMoreThanTwoComponents? "+(l > 2)); + this.hasMoreThanTwoComponents = l > 2; + } + + /** + * currently only defined for Villages, returns true if Village has more than 2 non-road components + */ + public boolean isSizeableStructure() + { + //return this.hasMoreThanTwoComponents; + return true; + } + + public void func_143022_a(NBTTagCompound p_143022_1_) + { + super.func_143022_a(p_143022_1_); + p_143022_1_.setBoolean("Valid", this.hasMoreThanTwoComponents); + } + + public void func_143017_b(NBTTagCompound p_143017_1_) + { + super.func_143017_b(p_143017_1_); + this.hasMoreThanTwoComponents = p_143017_1_.getBoolean("Valid"); + } + } + + /** + * Generates structures in specified chunk next to existing structures. Does *not* generate StructureStarts. + */ + @Override + public boolean generateStructuresInChunk(World p_75051_1_, Random p_75051_2_, int p_75051_3_, int p_75051_4_){ + //Logger.INFO("Try generate Structs in chunk."); + this.callPrivateFunction1(p_75051_1_); + int k = (p_75051_3_ << 4) + 8; + int l = (p_75051_4_ << 4) + 8; + boolean flag = false; + Iterator iterator = this.structureMap.values().iterator(); + + //Logger.INFO("Iteration Size: "+this.structureMap.values().size()); + while (iterator.hasNext()) + { + //Logger.INFO("Iterating."); + StructureStart structurestart = (StructureStart)iterator.next(); + + if (structurestart.isSizeableStructure() && (structurestart.getBoundingBox().intersectsWith(k, l, k + 15, l + 15) || structurestart.getBoundingBox().intersectsWith(k, l, k - 15, l - 15))) + { + Logger.INFO("Iterating. 2"); + structurestart.generateStructure(p_75051_1_, p_75051_2_, new StructureBoundingBox(k, l, k + 15, l + 15)); + flag = true; + this.callPrivateFunction2(structurestart.func_143019_e(), structurestart.func_143018_f(), structurestart); + } + /* else { + Logger.INFO("Iterating. 3"); + Logger.INFO("structurestart.isSizeableStructure()? "+structurestart.isSizeableStructure()); + Logger.INFO("structurestart.getBoundingBox().intersectsWith(k, l, k + 15, l + 15)? "+(structurestart.getBoundingBox().intersectsWith(k, l, k + 15, l + 15) || structurestart.getBoundingBox().intersectsWith(k, l, k - 15, l - 15))); + Logger.INFO("K: "+k+" | L: "+l); + Logger.INFO("structure bounding box info: x-:"+structurestart.getBoundingBox().minX+" y-:"+structurestart.getBoundingBox().minY+" x+:"+structurestart.getBoundingBox().maxX+" y+:"+structurestart.getBoundingBox().maxY); + }*/ + } + + return flag; + } + + Method mMethod1; + Method mMethod2; + private boolean callPrivateFunction1(World aWorld) { + if (mMethod1 == null) { + try { + mMethod1 = MapGenStructure.class.getDeclaredMethod("func_143027_a", World.class); + } catch (NoSuchMethodException | SecurityException e) { + return false; + } + } + if (mMethod1 != null) { + try { + //Logger.INFO("Invoking func_143027_a"); + mMethod1.invoke(this, aWorld); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + } + return false; + } + + private boolean callPrivateFunction2(int aInt1, int aInt2, StructureStart aStruct) { + if (mMethod2 == null) { + try { + mMethod2 = MapGenStructure.class.getDeclaredMethod("func_143026_a", int.class, int.class, StructureStart.class); + } catch (NoSuchMethodException | SecurityException e) { + return false; + } + } + if (mMethod2 != null) { + try { + Logger.INFO("Invoking func_143026_a"); + mMethod2.invoke(this, aInt1, aInt2, aStruct); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java b/src/main/java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java new file mode 100644 index 0000000000..0eab94c5d1 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java @@ -0,0 +1,217 @@ +package gtPlusPlus.australia.gen.map; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.Block; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.MapGenRavine; + +public class MapGenLargeRavine extends MapGenRavine { + private float[] field_75046_d = new float[1024]; + + @Override + protected void func_151540_a(long aSeed, int var1, int var2, Block[] aBlocksInChunkOrPassedIn, double p_151540_6_, + double p_151540_8_, double p_151540_10_, float p_151540_12_, float p_151540_13_, float p_151540_14_, + int possibleCurrentY, int possibleMaxY, double p_151540_17_) { + Random random = CORE.RANDOM; + //gtPlusPlus.api.objects.Logger.WORLD("Generating Large Ravine. 1"); + this.range *= 2; + double d4 = (double) (var1 * 24 + 16); + double d5 = (double) (var2 * 24 + 16); + float f3 = 0.0F; + float f4 = 0.0F; + + if (possibleMaxY <= 25) { + int j1 = Math.min(this.range * 16 - 32, 200); + possibleMaxY = j1 - random.nextInt(j1 / 4); + } + + boolean possibleIsUnderGroundFlag = false; + + if (possibleCurrentY <= -1) { + possibleCurrentY = possibleMaxY / 3; + possibleIsUnderGroundFlag = true; + } + + float f5 = 1.0F; + + for (int k1 = 0; k1 < 256; ++k1) { + if (k1 == 0 || random.nextInt(3) == 0) { + f5 = 1.0F + random.nextFloat() * random.nextFloat() * 1.0F; + } + + this.field_75046_d[k1] = f5 * f5; + } + + for (; possibleCurrentY < possibleMaxY; ++possibleCurrentY) { + double d12 = 3.5D + (double) (MathHelper.sin((float) possibleCurrentY * CORE.PI / (float) possibleMaxY) + * p_151540_12_ * 1.0F); + double d6 = d12 * p_151540_17_; + d12 *= (double) random.nextFloat() * 0.55D + 0.75D; + d6 *= (double) random.nextFloat() * 0.55D + 0.75D; + float f6 = MathHelper.cos(p_151540_14_); + float f7 = MathHelper.sin(p_151540_14_); + p_151540_6_ += (double) (MathHelper.cos(p_151540_13_) * f6); + p_151540_8_ += (double) f7; + p_151540_10_ += (double) (MathHelper.sin(p_151540_13_) * f6); + p_151540_14_ *= 1.7F; + p_151540_14_ += f4 * 0.25F; + p_151540_13_ += f3 * 0.25F; + f4 *= 0.8F; + f3 *= 0.5F; + f4 += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 2.0F; + f3 += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 4.0F; + + if (possibleIsUnderGroundFlag || random.nextInt(4) != 0) { + double d7 = p_151540_6_ - d4; + double d8 = p_151540_10_ - d5; + double d9 = (double) (possibleMaxY - possibleCurrentY); + double d10 = (double) (p_151540_12_ + 2.0F + 16.0F); + + if (d7 * d7 + d8 * d8 - d9 * d9 > d10 * d10) { + return; + } + + if (p_151540_6_ >= d4 - 16.0D - d12 * 2.0D && p_151540_10_ >= d5 - 16.0D - d12 * 2.0D + && p_151540_6_ <= d4 + 16.0D + d12 * 2.0D && p_151540_10_ <= d5 + 16.0D + d12 * 2.0D) { + int i4 = MathHelper.floor_double(p_151540_6_ - d12) - var1 * 16 - 1; + int l1 = MathHelper.floor_double(p_151540_6_ + d12) - var1 * 16 + 1; + int j4 = MathHelper.floor_double(p_151540_8_ - d6) - 1; + int i2 = MathHelper.floor_double(p_151540_8_ + d6) + 1; + int k4 = MathHelper.floor_double(p_151540_10_ - d12) - var2 * 16 - 1; + int j2 = MathHelper.floor_double(p_151540_10_ + d12) - var2 * 16 + 1; + + if (i4 < 0) { + i4 = 0; + } + + if (l1 > 16) { + l1 = 16; + } + + if (j4 < 1) { + j4 = 1; + } + + if (i2 > 248) { + i2 = 248; + } + + if (k4 < 0) { + k4 = 0; + } + + if (j2 > 16) { + j2 = 16; + } + + boolean flag2 = false; + int k2; + int j3; + + for (k2 = i4; !flag2 && k2 < l1; ++k2) { + for (int l2 = k4; !flag2 && l2 < j2; ++l2) { + for (int i3 = i2 + 1; !flag2 && i3 >= j4 - 1; --i3) { + j3 = (k2 * 16 + l2) * 256 + i3; + + if (i3 >= 0 && i3 < 256) { + Block block = aBlocksInChunkOrPassedIn[j3]; + + if (isOceanBlock(aBlocksInChunkOrPassedIn, j3, k2, i3, l2, var1, var2)) { + flag2 = true; + } + + if (i3 != j4 - 1 && k2 != i4 && k2 != l1 - 1 && l2 != k4 && l2 != j2 - 1) { + i3 = j4; + } + } + } + } + } + + if (!flag2) { + for (k2 = i4; k2 < l1; ++k2) { + double d13 = ((double) (k2 + var1 * 16) + 0.5D - p_151540_6_) / d12; + + for (j3 = k4; j3 < j2; ++j3) { + double d14 = ((double) (j3 + var2 * 16) + 0.5D - p_151540_10_) / d12; + int k3 = (k2 * 16 + j3) * 256 + i2; + boolean flag = false; + + if (d13 * d13 + d14 * d14 < 1.0D) { + for (int l3 = i2 - 1; l3 >= j4; --l3) { + double d11 = ((double) l3 + 0.5D - p_151540_8_) / d6; + + if ((d13 * d13 + d14 * d14) * (double) this.field_75046_d[l3] + + d11 * d11 / 6.0D < 1.0D) { + Block block1 = aBlocksInChunkOrPassedIn[k3]; + + if (checkIfTopBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2)) { + flag = true; + } + + Logger.WORLD("Generating Large Ravine. 2"); + digBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2, flag); + } + + --k3; + } + } + } + } + + if (possibleIsUnderGroundFlag) { + break; + } + } + } + } + } + } + + // generate? + @Override + protected void func_151538_a(World p_151538_1_, int p_151538_2_, int p_151538_3_, int chunkX, int chunkZ, + Block[] blocks) { + if (this.rand.nextInt(50) == 0) { + double d0 = (double) (p_151538_2_ * 16 + this.rand.nextInt(16)); + double d1 = (double) (this.rand.nextInt(this.rand.nextInt(40) + 8) + 20); + double d2 = (double) (p_151538_3_ * 16 + this.rand.nextInt(16)); + byte b0 = 1; + + for (int i1 = 0; i1 < b0; ++i1) { + float f = this.rand.nextFloat() * (float) Math.PI * 2.0F; + float f1 = (this.rand.nextFloat() - 0.5F) * 2.0F / 8.0F; + float f2 = (this.rand.nextFloat() * 2.0F + this.rand.nextFloat()) * 2.0F; + this.func_151540_a(this.rand.nextLong(), chunkX, chunkZ, blocks, d0, d1, d2, f2, f, f1, 0, 0, 3.0D); + } + } + } + + private static Method isTopBlock; + + // Determine if the block at the specified location is the top block for the + // biome, we take into account + private synchronized boolean checkIfTopBlock(Block[] data, int index, int x, int y, int z, int chunkX, int chunkZ) { + try { + if (isTopBlock == null) { + isTopBlock = MapGenRavine.class.getDeclaredMethod("isTopBlock", Block[].class, int.class, int.class, + int.class, int.class, int.class, int.class); + } + if (isTopBlock != null) { + return (boolean) isTopBlock.invoke(this, data, index, x, y, z, chunkX, chunkZ); + } else { + return false; + } + } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException n) { + return false; + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java b/src/main/java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java new file mode 100644 index 0000000000..b6b83d997b --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/component/AustraliaComponent.java @@ -0,0 +1,196 @@ +package gtPlusPlus.australia.gen.map.component; + +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityDispenser; +import net.minecraft.tileentity.TileEntityMobSpawner; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraft.world.gen.structure.StructureBoundingBox; +import net.minecraft.world.gen.structure.StructureComponent; +import net.minecraftforge.common.ChestGenHooks; + +public class AustraliaComponent extends StructureComponent { + public AustraliaComponent() { + } + + public AustraliaComponent(int direction, Random random, int x, int z, int dimX, int dimY, int dimZ) { + super(direction); + this.coordBaseMode = direction; + this.boundingBox = calcBox(direction, x + (16 - dimX) / 2, 64, z + (16 - dimZ) / 2, dimX, dimY, dimZ, 0); + } + + public boolean addComponentParts(World world, Random random) { + return true; + } + + protected void func_151554_b(World par1World, Block par2, int par3, int par4, int par5, int par6, + StructureBoundingBox par7StructureBoundingBox) { + int j1 = getXWithOffset(par4, par6); + int k0 = getYWithOffset(par5); + int k1 = k0; + int l1 = getZWithOffset(par4, par6); + if (par7StructureBoundingBox.isVecInside(j1, k1, l1)) { + if (par1World.isAirBlock(j1, k1, l1)) { + return; + } + k1--; + while (((par1World.isAirBlock(j1, k1, l1)) || (!par1World.getBlock(j1, k1, l1).getMaterial().isSolid()) + || (par1World.getBlock(j1, k1, l1) == Blocks.ice)) && (k1 > 1)) { + par1World.setBlock(j1, k1, l1, par2, par3, 2); + + k1--; + } + } + } + + protected void clearCurrentPositionBlocksUpwards(World par1World, int par2, int par3, int par4, + StructureBoundingBox par5StructureBoundingBox) { + int l = getXWithOffset(par2, par4); + int i1 = getYWithOffset(par3); + int j1 = getZWithOffset(par2, par4); + if (par5StructureBoundingBox.isVecInside(l, i1, j1)) { + int i = 0; + for (;;) { + i++; + if (((i >= 20) && (par1World.isAirBlock(l, i1, j1))) || (i1 >= 255)) { + break; + } + par1World.setBlock(l, i1, j1, Blocks.air, 0, 2); + i1++; + } + } + } + + protected boolean isWaterBelow(World par1World, int par4, int par5, int par6, + StructureBoundingBox par7StructureBoundingBox) { + int j1 = getXWithOffset(par4, par6); + int k1 = getYWithOffset(par5); + int l1 = getZWithOffset(par4, par6); + for (int i = 0; i < 10; i++) { + Material material = par1World.getBlock(j1, k1, l1).getMaterial(); + if ((material.isLiquid()) || (material == Material.ice)) { + return true; + } + if (!par1World.isAirBlock(j1, k1, l1)) { + return false; + } + } + return false; + } + + public void setDispenser(int x, int y, int z, Random random, World world, int facing) { + int i1 = getXWithOffset(x, z); + int j1 = getYWithOffset(y); + int k1 = getZWithOffset(x, z); + + world.setBlock(i1, j1, k1, Blocks.dispenser, facing, 0); + TileEntity tileDispenser = world.getTileEntity(i1, j1, k1); + if ((tileDispenser != null) && ((tileDispenser instanceof TileEntityDispenser))) { + ChestGenHooks info = ChestGenHooks.getInfo("mineshaftCorridor"); + WeightedRandomChestContent.generateChestContents(random, info.getItems(random), + (TileEntityDispenser) tileDispenser, info.getCount(random)); + } else { + Logger.WARNING("Failed to fetch dispenser entity at (" + i1 + ", " + j1 + ", " + k1 + ")"); + } + } + + protected void setSpawner(int x, int y, int z, String mobName, World world) { + int i1 = getXWithOffset(x, z); + int j1 = getYWithOffset(y); + int k1 = getZWithOffset(x, z); + + world.setBlock(i1, j1, k1, Blocks.mob_spawner, 0, 2); + TileEntity tileSpawner = world.getTileEntity(i1, j1, k1); + if ((tileSpawner != null) && ((tileSpawner instanceof TileEntityMobSpawner))) { + ((TileEntityMobSpawner) tileSpawner).func_145881_a().setEntityName(mobName); + } else { + Logger.WARNING("Failed to fetch mob spawner entity at (" + i1 + ", " + j1 + ", " + k1 + ")"); + } + } + + protected void setFurnace(int x, int y, int z, World world) { + int i1 = getXWithOffset(x, z); + int j1 = getYWithOffset(y); + int k1 = getZWithOffset(x, z); + + world.setBlock(i1, j1, k1, Blocks.furnace, getMetadataWithOffset(Blocks.piston, 3), 2); + } + + protected void placeAirBlockAtPos(int x, int y, int z, StructureBoundingBox bounds, World world) { + placeBlockAtCurrentPosition(world, Blocks.air, 0, x, y, z, bounds); + } + + protected void place(Block block, int meta, int x, int y, int z, StructureBoundingBox bounds, World world) { + placeBlockAtCurrentPosition(world, block, meta, x, y, z, bounds); + } + + protected StructureBoundingBox calcBox(int direction, int x, int y, int z, int xLength, int height, int zLength, + int xShift) { + int minX = 0; + int maxX = 0; + int minY = y; + int maxY = y + height; + int minZ = 0; + int maxZ = 0; + switch (direction) { + case 0: + minX = x - xShift; + maxX = x - xShift + xLength; + minZ = z; + maxZ = z + zLength; + break; + case 1: + minX = x - zLength; + maxX = x; + minZ = z - xShift; + maxZ = z - xShift + xLength; + break; + case 2: + minX = x - xShift; + maxX = x - xShift + xLength; + minZ = z - zLength; + maxZ = z; + break; + case 3: + minX = x; + maxX = x + zLength; + minZ = z - xShift; + maxZ = z - xShift + xLength; + } + return new StructureBoundingBox(minX, minY, minZ, maxX, maxY, maxZ); + } + + protected int calcGroundHeight(World world, StructureBoundingBox boundingBox) { + int height = 0; + int count = 0; + for (int z = boundingBox.minZ; z <= boundingBox.maxZ; z++) { + for (int x = boundingBox.minX; x <= boundingBox.maxX; x++) { + if (boundingBox.isVecInside(x, 64, z)) { + height += Math.max(world.getTopSolidOrLiquidBlock(x, z), world.provider.getAverageGroundLevel()); + count++; + } + } + } + if (count == 0) { + return -1; + } + return height / count; + } + + protected void func_143012_a(NBTTagCompound nbttagcompound) { + } + + protected void func_143011_b(NBTTagCompound nbttagcompound) { + } + + public boolean addComponentParts(World world, Random random, StructureBoundingBox structureboundingbox) { + return true; + } +} diff --git a/src/main/java/gtPlusPlus/australia/gen/map/component/ComponentHut.java b/src/main/java/gtPlusPlus/australia/gen/map/component/ComponentHut.java new file mode 100644 index 0000000000..1f5dd59667 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/component/ComponentHut.java @@ -0,0 +1,474 @@ +package gtPlusPlus.australia.gen.map.component; + +import java.util.Random; + +import gtPlusPlus.api.interfaces.IGeneratorWorld; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.GTplusplus_Australia; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.plugin.villagers.entity.EntityNativeAustralian; +import net.minecraft.block.Block; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.structure.StructureBoundingBox; + +public class ComponentHut extends AustraliaComponent { + public static final int DIM_X = 7; + public static final int DIM_Y = 10; + public static final int DIM_Z = 7; + + public ComponentHut() { + } + + public ComponentHut(int direction, Random random, int x, int z) { + super(direction, random, x, z, 7, 10, 7); + } + + public boolean addComponentParts(World world, Random random) { + + BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0)); + int groundAvg = calcGroundHeight(world, this.boundingBox); + if (groundAvg < 0) { + return true; + } + this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0); + if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox)) + || (isWaterBelow(world, 6, -1, 0, this.boundingBox)) + || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) { + return false; + } + + Block aWall1, aWall2, aRoof, aFloor; + + if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) { + aWall1 = Blocks.sand; + aWall2 = Blocks.sandstone; + aRoof = Blocks.sandstone; + aFloor = Blocks.sandstone; + } + else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { + aWall1 = Blocks.clay; + aWall2 = Blocks.hardened_clay; + aRoof = Blocks.hardened_clay; + aFloor = Blocks.stained_hardened_clay; + } + else { + aWall1 = Blocks.sand; + aWall2 = Blocks.sandstone; + aRoof = Blocks.sandstone; + aFloor = Blocks.sandstone; + } + + //Empty Area + fillWithAir(world, this.boundingBox, 0, 1, 0, 6, 9, 6); + + //Build Floor + fillWithMetadataBlocks(world, this.boundingBox, 0, 0, 0, 6, 0, 6, aFloor, 0, aFloor, 1, false); + + //Layer 2 + int dir = MathUtils.randInt(0, 3); + + //Door First + if (dir == 0) { + placeDoorAtCurrentPosition( + world, this.boundingBox, random, 0, 1, 3, getMetadataWithOffset(Blocks.wooden_door, 1)); + } + else if (dir == 1) { + placeDoorAtCurrentPosition( + world, this.boundingBox, random, 3, 1, 6, getMetadataWithOffset(Blocks.wooden_door, 1)); + } + else if (dir == 2) { + placeDoorAtCurrentPosition( + world, this.boundingBox, random, 6, 1, 3, getMetadataWithOffset(Blocks.wooden_door, 1)); + } + else { + placeDoorAtCurrentPosition( + world, this.boundingBox, random, 3, 1, 0, getMetadataWithOffset(Blocks.wooden_door, 1)); + } + + //Layer 1 + //Wall Top + place(aWall1, 0, 0, 1, 2, this.boundingBox, world); + if (dir != 0) place(aWall1, 0, 0, 1, 3, this.boundingBox, world); + place(aWall1, 0, 0, 1, 4, this.boundingBox, world); + //Wall Right + place(aWall1, 0, 2, 1, 6, this.boundingBox, world); + if (dir != 1) place(aWall2, 0, 3, 1, 6, this.boundingBox, world); + place(aWall1, 0, 4, 1, 6, this.boundingBox, world); + //Wall Bottom + place(aWall2, 0, 6, 1, 4, this.boundingBox, world); + if (dir != 2) place(aWall1, 0, 6, 1, 3, this.boundingBox, world); + place(aWall1, 0, 6, 1, 2, this.boundingBox, world); + //Wall Left + place(aWall1, 0, 4, 1, 0, this.boundingBox, world); + if (dir != 3) place(aWall1, 0, 3, 1, 0, this.boundingBox, world); + place(aWall2, 0, 2, 1, 0, this.boundingBox, world); + //Corners + place(aWall1, 0, 1, 1, 5, this.boundingBox, world); + place(aWall2, 0, 5, 1, 5, this.boundingBox, world); + place(aWall1, 0, 5, 1, 1, this.boundingBox, world); + place(aWall1, 0, 1, 1, 1, this.boundingBox, world); + + + //Wall Top + place(aWall1, 0, 0, 2, 2, this.boundingBox, world); + //place(aWall1, 0, 0, 2, 3, this.boundingBox, world); + place(aWall2, 0, 0, 2, 4, this.boundingBox, world); + + //Wall Right + place(aWall2, 0, 2, 2, 6, this.boundingBox, world); + //place(aWall1, 0, 3, 2, 6, this.boundingBox, world); + place(aWall1, 0, 4, 2, 6, this.boundingBox, world); + + //Wall Bottom + place(aWall1, 0, 6, 2, 4, this.boundingBox, world); + //place(aWall1, 0, 6, 2, 3, this.boundingBox, world); + place(aWall2, 0, 6, 2, 2, this.boundingBox, world); + + //Wall Left + place(aWall1, 0, 4, 2, 0, this.boundingBox, world); + //place(aWall2, 0, 4, 2, 0, this.boundingBox, world); + place(aWall1, 0, 2, 2, 0, this.boundingBox, world); + + //Corners + place(aWall1, 0, 1, 2, 5, this.boundingBox, world); + place(aWall1, 0, 5, 2, 5, this.boundingBox, world); + place(aWall2, 0, 5, 2, 1, this.boundingBox, world); + place(aWall2, 0, 1, 2, 1, this.boundingBox, world); + + //Layer 3 + //Wall Top + place(aWall2, 0, 0, 3, 2, this.boundingBox, world); + place(aWall1, 0, 0, 3, 3, this.boundingBox, world); + place(aWall1, 0, 0, 3, 4, this.boundingBox, world); + //Wall Right + place(aWall1, 0, 2, 3, 6, this.boundingBox, world); + place(aWall1, 0, 3, 3, 6, this.boundingBox, world); + place(aWall1, 0, 4, 3, 6, this.boundingBox, world); + //Wall Bottom + place(aWall1, 0, 6, 3, 4, this.boundingBox, world); + place(aWall2, 0, 6, 3, 3, this.boundingBox, world); + place(aWall1, 0, 6, 3, 2, this.boundingBox, world); + //Wall Left + place(aWall1, 0, 4, 3, 0, this.boundingBox, world); + place(aWall2, 0, 3, 3, 0, this.boundingBox, world); + place(aWall1, 0, 2, 3, 0, this.boundingBox, world); + //Corners + place(aWall1, 0, 1, 3, 5, this.boundingBox, world); + place(aWall2, 0, 5, 3, 5, this.boundingBox, world); + place(aWall1, 0, 5, 3, 1, this.boundingBox, world); + place(aWall1, 0, 1, 3, 1, this.boundingBox, world); + + //Roof + //Roof 1 Top + place(aRoof, 0, 1, 4, 2, this.boundingBox, world); + place(aRoof, 0, 1, 4, 3, this.boundingBox, world); + place(aRoof, 0, 1, 4, 4, this.boundingBox, world); + //Roof 1 Right + place(aRoof, 0, 2, 4, 5, this.boundingBox, world); + place(aRoof, 0, 3, 4, 5, this.boundingBox, world); + place(aRoof, 0, 4, 4, 5, this.boundingBox, world); + //Roof 1 Bottom + place(aRoof, 0, 5, 4, 4, this.boundingBox, world); + place(aRoof, 0, 5, 4, 3, this.boundingBox, world); + place(aRoof, 0, 5, 4, 2, this.boundingBox, world); + //Roof 1 Left + place(aRoof, 0, 4, 4, 1, this.boundingBox, world); + place(aRoof, 0, 3, 4, 1, this.boundingBox, world); + place(aRoof, 0, 2, 4, 1, this.boundingBox, world); + + //Roof 2 Top + place(aRoof, 0, 2, 5, 2, this.boundingBox, world); + place(aRoof, 0, 2, 5, 3, this.boundingBox, world); + place(aRoof, 0, 2, 5, 4, this.boundingBox, world); + + //Roof 2 Right + //place(aWall1, 0, 2, 5, 4, this.boundingBox, world); + place(aRoof, 0, 3, 5, 4, this.boundingBox, world); + //place(aWall1, 0, 4, 5, 4, this.boundingBox, world); + + //Roof 2 Bottom + place(aRoof, 0, 4, 5, 4, this.boundingBox, world); + place(aRoof, 0, 4, 5, 3, this.boundingBox, world); + place(aRoof, 0, 4, 5, 2, this.boundingBox, world); + + //Roof 2 Left + //place(aWall1, 0, 4, 5, 2, this.boundingBox, world); + place(aRoof, 0, 3, 5, 2, this.boundingBox, world); + //place(aWall1, 0, 2, 5, 2, this.boundingBox, world); + + //Roof 3 Top + place(Blocks.glowstone, 0, 3, 5, 3, this.boundingBox, world); + /* + int logID = MathUtils.randInt(0, 1); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 1, this.boundingBox, world); + + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 5, this.boundingBox, world); + + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 1, this.boundingBox, world); + + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 5, this.boundingBox, world); + + int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8; + + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 2, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 3, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 4, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 2, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 3, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 4, this.boundingBox, world); + + for (int x = -2; x < 9; x++) { + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 0, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 1, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 2, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 3, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 4, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 5, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 6, this.boundingBox, world); + } + + int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8))); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 2, 2, 1, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 2, 2, 5, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 4, 2, 5, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 0, 2, 3, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 6, 2, 3, this.boundingBox, world); + + placeDoorAtCurrentPosition(world, this.boundingBox, random, 4, 1, 1, + getMetadataWithOffset(Blocks.wooden_door, 1)); + + place(Blocks.leaves, MathUtils.randInt(0, 3), 1, 1, 4, this.boundingBox, world); + place(Blocks.torch, 0, 1, 2, 3, this.boundingBox, world); + place(Blocks.torch, 0, 3, 2, 2, this.boundingBox, world); + if (!this.hasMadeChest) { + int ic = getYWithOffset(0); + int jc = getXWithOffset(7, 1); + int kc = getZWithOffset(7, 1); + if (this.boundingBox.isVecInside(jc, ic, kc)) { + this.hasMadeChest = true; + generateStructureChestContents(world, this.boundingBox, random, 1, 1, 2, shackChestContents, + 1 + random.nextInt(3)); + } + }*/ + for (int i = 0; i < 7; i++) { + for (int j = 0; j < 7; j++) { + clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox); + func_151554_b(world, aFloor, 0, j, 0, i, this.boundingBox); + } + } + spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5)); + + return true; + + /* + BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0)); + int groundAvg = calcGroundHeight(world, this.boundingBox); + if (groundAvg < 0) { + return true; + } + this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0); + if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox)) + || (isWaterBelow(world, 6, -1, 0, this.boundingBox)) + || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) { + return false; + } + Block groundID = Blocks.grass; + Block undergroundID = Blocks.dirt; + if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) { + groundID = Blocks.sand; + undergroundID = Blocks.sand; + } + else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { + groundID = Blocks.hardened_clay; + undergroundID = Blocks.stained_hardened_clay; + } + + + fillWithAir(world, this.boundingBox, 0, 1, 0, 6, 9, 6); + fillWithMetadataBlocks(world, this.boundingBox, 0, 0, 1, 6, 1, 5, Blocks.dirt, 0, Blocks.dirt, 1, false); + fillWithMetadataBlocks(world, this.boundingBox, 0, 2, 1, 6, 3, 5, Blocks.cobblestone, 0, Blocks.cobblestone, 0, false); + fillWithAir(world, this.boundingBox, 1, 1, 2, 5, 3, 4); + + int logID = MathUtils.randInt(0, 1); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 1, this.boundingBox, world); + + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 5, this.boundingBox, world); + + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 1, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 1, this.boundingBox, world); + + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 5, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 5, this.boundingBox, world); + + int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8; + + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 2, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 3, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 4, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 2, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 3, this.boundingBox, world); + place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 4, this.boundingBox, world); + + for (int x = -2; x < 9; x++) { + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 0, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 1, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 2, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 3, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 4, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 5, this.boundingBox, world); + place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 6, this.boundingBox, world); + } + + int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8))); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 2, 2, 1, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 2, 2, 5, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 4, 2, 5, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 0, 2, 3, this.boundingBox, world); + if (MathUtils.randInt(0, 5) > 4) + place(Blocks.stained_glass, glassMeta, 6, 2, 3, this.boundingBox, world); + + placeDoorAtCurrentPosition(world, this.boundingBox, random, 4, 1, 1, + getMetadataWithOffset(Blocks.wooden_door, 1)); + + place(Blocks.leaves, MathUtils.randInt(0, 3), 1, 1, 4, this.boundingBox, world); + place(Blocks.torch, 0, 1, 2, 3, this.boundingBox, world); + place(Blocks.torch, 0, 3, 2, 2, this.boundingBox, world); + if (!this.hasMadeChest) { + int ic = getYWithOffset(0); + int jc = getXWithOffset(7, 1); + int kc = getZWithOffset(7, 1); + if (this.boundingBox.isVecInside(jc, ic, kc)) { + this.hasMadeChest = true; + generateStructureChestContents(world, this.boundingBox, random, 1, 1, 2, shackChestContents, + 1 + random.nextInt(3)); + } + } + for (int i = 0; i < 7; i++) { + for (int j = 0; j < 7; j++) { + clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox); + func_151554_b(world, undergroundID, 0, j, 0, i, this.boundingBox); + } + } + spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5)); + + return true; + */} + + private int nativesSpawned = 0; + + private void spawnNatives(World par1World, StructureBoundingBox par2StructureBoundingBox, int par3, int par4, + int par5, int maxSpawned) { + if (this.nativesSpawned < maxSpawned) { + for (int i1 = this.nativesSpawned; i1 < maxSpawned; i1++) { + int j1 = getXWithOffset(par3 + i1, par5); + int k1 = getYWithOffset(par4); + int l1 = getZWithOffset(par3 + i1, par5); + if (!par2StructureBoundingBox.isVecInside(j1, k1, l1)) { + break; + } + if (par1World.rand.nextInt(MathUtils.randInt(3, 5)) != 0) { + EntityNativeAustralian entityvillager = new EntityNativeAustralian(par1World); + entityvillager.func_110163_bv(); + entityvillager.setLocationAndAngles(j1 + 0.5D, k1, l1 + 0.5D, 0.0F, 0.0F); + par1World.spawnEntityInWorld(entityvillager); + this.nativesSpawned += 1; + } + } + } + } + + public static final WeightedRandomChestContent[] shackChestContents = { + new WeightedRandomChestContent(Items.glass_bottle, 0, 1, 1, 10), + new WeightedRandomChestContent(Items.bread, 0, 1, 3, 15), + new WeightedRandomChestContent(Items.apple, 0, 1, 3, 15), + new WeightedRandomChestContent(Items.cooked_fished, 0, 1, 3, 10), + new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.sapling), 1, 1, 1, 15), + // new WeightedRandomChestContent(Witchery.Items.GENERIC, + // Witchery.Items.GENERIC.itemRowanBerries.damageValue, 1, 2, 10), + new WeightedRandomChestContent(Items.iron_shovel, 0, 1, 1, 5), + new WeightedRandomChestContent(Items.iron_pickaxe, 0, 1, 1, 5) }; + private boolean hasMadeChest; + private static final String CHEST_KEY = "AUSShackChest"; + + protected void func_143012_a(NBTTagCompound par1NBTTagCompound) { + super.func_143012_a(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("AUSShackChest", this.hasMadeChest); + par1NBTTagCompound.setInteger("AUSWCount", this.nativesSpawned); + } + + protected void func_143011_b(NBTTagCompound par1NBTTagCompound) { + super.func_143011_b(par1NBTTagCompound); + this.hasMadeChest = par1NBTTagCompound.getBoolean("AUSShackChest"); + if (par1NBTTagCompound.hasKey("AUSWCount")) { + this.nativesSpawned = par1NBTTagCompound.getInteger("AUSWCount"); + } else { + this.nativesSpawned = 0; + } + } + + public static class WorldHandlerHut implements IGeneratorWorld { + private final double chance; + private final int range; + + public WorldHandlerHut(double chance) { + this.chance = chance; + this.range = 400; + } + + public int getExtentX() { + return 7; + } + + public int getExtentZ() { + return 7; + } + + public int getRange() { + return this.range; + } + + public boolean generate(World world, Random random, int x, int z) { + if ((MathUtils.randInt(0, 100) < (this.chance/5))) { + int direction = MathUtils.randInt(0, 3); + new ComponentHut(direction, random, x, z).addComponentParts(world, random); + Logger.WORLD("NativeHut x: " + x + " | z: " + z + " | Dir: " + direction); + return true; + } + return false; + } + + public void initiate() { + } + } + +} diff --git a/src/main/java/gtPlusPlus/australia/gen/map/component/ComponentShack.java b/src/main/java/gtPlusPlus/australia/gen/map/component/ComponentShack.java new file mode 100644 index 0000000000..e3f501468b --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/component/ComponentShack.java @@ -0,0 +1,279 @@ +package gtPlusPlus.australia.gen.map.component; + +import java.util.Random; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.api.interfaces.IGeneratorWorld; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.GTplusplus_Australia; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.structure.StructureBoundingBox; + +public class ComponentShack extends AustraliaComponent { + public static final int DIM_X = 9; + public static final int DIM_Y = 10; + public static final int DIM_Z = 9; + + public ComponentShack() { + } + + public ComponentShack(int direction, Random random, int x, int z) { + super(direction, random, x, z, DIM_X, DIM_Y, DIM_Z); + } + + public boolean addComponentParts(World world, Random random) { + BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0)); + int groundAvg = calcGroundHeight(world, this.boundingBox); + if (groundAvg < 0) { + return true; + } + this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0); + if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox)) + || (isWaterBelow(world, 6, -1, 0, this.boundingBox)) + || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) { + return false; + } + Block mStone; + Block groundID = Blocks.grass; + Block undergroundID = Blocks.dirt; + if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) { + groundID = Blocks.sand; + undergroundID = Blocks.sand; + mStone = Blocks.sandstone; + } + else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) { + groundID = Blocks.hardened_clay; + undergroundID = Blocks.stained_hardened_clay; + mStone = Blocks.stained_hardened_clay; + } + else { + mStone = Blocks.stonebrick; + } + + int mWoodType = MathUtils.randInt(0, 5); + int logID; + Block mWoodenStairs; + Block mLog; + if (mWoodType == 1) { + mWoodenStairs = Blocks.spruce_stairs; + logID = 1; + } + else if (mWoodType == 2) { + mWoodenStairs = Blocks.birch_stairs; + logID = 2; + + } + else if (mWoodType == 3) { + mWoodenStairs = Blocks.jungle_stairs; + logID = 3; + } + else if (mWoodType == 4) { + mWoodenStairs = Blocks.acacia_stairs; + logID = 0; + } + else if (mWoodType == 5) { + mWoodenStairs = Blocks.dark_oak_stairs; + logID = 1; + } + else { + mWoodenStairs = Blocks.oak_stairs; + logID = 0; + } + if (mWoodType >= 4) { + mLog = Blocks.log2; + } + else { + mLog = Blocks.log; + } + + int mStoneMeta = MathUtils.randInt(0, mStone == Blocks.stained_hardened_clay ? 15 : mStone == Blocks.sandstone ? 2 : 3); + + fillWithAir(world, this.boundingBox, 0, 1, 0, 7, 7, 4); + fillWithMetadataBlocks(world, this.boundingBox, 1, 0, 1, 7, 1, 5, mStone, mStoneMeta, mStone, mStoneMeta, false); + fillWithMetadataBlocks(world, this.boundingBox, 1, 2, 1, 7, 3, 5, Blocks.planks, mWoodType, Blocks.planks, mWoodType, false); + fillWithAir(world, this.boundingBox, 2, 1, 2, 6, 3, 4); + + place(mLog, logID, 1, 1, 1, this.boundingBox, world); + place(mLog, logID, 1, 2, 1, this.boundingBox, world); + place(mLog, logID, 1, 3, 1, this.boundingBox, world); + + place(mLog, logID, 1, 1, 5, this.boundingBox, world); + place(mLog, logID, 1, 2, 5, this.boundingBox, world); + place(mLog, logID, 1, 3, 5, this.boundingBox, world); + + place(mLog, logID, 7, 1, 1, this.boundingBox, world); + place(mLog, logID, 7, 2, 1, this.boundingBox, world); + place(mLog, logID, 7, 3, 1, this.boundingBox, world); + + place(mLog, logID, 7, 1, 5, this.boundingBox, world); + place(mLog, logID, 7, 2, 5, this.boundingBox, world); + place(mLog, logID, 7, 3, 5, this.boundingBox, world); + + int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8; + + place(mLog, logID, 1, 4, 2, this.boundingBox, world); + place(mLog, logID, 1, 4, 3, this.boundingBox, world); + place(mLog, logID, 1, 4, 4, this.boundingBox, world); + place(mLog, logID, 7, 4, 2, this.boundingBox, world); + place(mLog, logID, 7, 4, 3, this.boundingBox, world); + place(mLog, logID, 7, 4, 4, this.boundingBox, world); + + for (int x = 0; x < 9; x++) { + place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 3, 0, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 4, 1, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 5, 2, this.boundingBox, world); + place(Blocks.planks, mWoodType, x, 5, 3, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 2), x, 5, 4, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 2), x, 4, 5, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 2), x, 3, 6, this.boundingBox, world); + } + + int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8))); + + place(Blocks.stained_glass_pane, glassMeta, 3, 2, 1, this.boundingBox, world); + place(Blocks.stained_glass_pane, glassMeta, 3, 2, 5, this.boundingBox, world); + place(Blocks.stained_glass_pane, glassMeta, 5, 2, 5, this.boundingBox, world); + place(Blocks.stained_glass_pane, glassMeta, 1, 2, 3, this.boundingBox, world); + place(Blocks.stained_glass_pane, glassMeta, 7, 2, 3, this.boundingBox, world); + + placeDoorAtCurrentPosition(world, this.boundingBox, random, 5, 1, 1, + getMetadataWithOffset(Blocks.wooden_door, 1)); + + place(Blocks.redstone_lamp, mWoodType, 2, 1, 4, this.boundingBox, world); + place(Blocks.redstone_torch, 0, 2, 2, 4, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 1), 2, 1, 3, this.boundingBox, world); + place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 3), 3, 1, 4, this.boundingBox, world); + place(Blocks.fence, 0, 3, 1, 3, this.boundingBox, world); + place(Blocks.heavy_weighted_pressure_plate, 0, 3, 2, 3, this.boundingBox, world); + if (!this.hasMadeChest) { + int ic = getYWithOffset(0); + int jc = getXWithOffset(7, 1); + int kc = getZWithOffset(7, 1); + if (this.boundingBox.isVecInside(jc, ic, kc)) { + this.hasMadeChest = true; + generateStructureChestContents(world, this.boundingBox, random, 2, 1, 2, shackChestContents, + 1 + random.nextInt(3)); + } + } + for (int i = 0; i < 9; i++) { + for (int j = 0; j < 9; j++) { + clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox); + func_151554_b(world, undergroundID, 0, j, 0, i, this.boundingBox); + } + } + spawnNatives(world, this.boundingBox, 3, 2, 3, MathUtils.randInt(3, 5)); + + return true; + } + + private int nativesSpawned = 0; + + private void spawnNatives(World par1World, StructureBoundingBox par2StructureBoundingBox, int par3, int par4, + int par5, int maxSpawned) { + if (this.nativesSpawned < maxSpawned) { + for (int i1 = this.nativesSpawned; i1 < maxSpawned; i1++) { + int j1 = getXWithOffset(par3 + i1, par5); + int k1 = getYWithOffset(par4); + int l1 = getZWithOffset(par3 + i1, par5); + if (!par2StructureBoundingBox.isVecInside(j1, k1, l1)) { + break; + } + if (par1World.rand.nextInt(MathUtils.randInt(1, 3)) != 0) { + EntityVillager entityvillager = new EntityVillager(par1World, 7736+(MathUtils.randInt(0, 1))); + entityvillager.func_110163_bv(); + entityvillager.setLocationAndAngles(j1 + 0.5D, k1, l1 + 0.5D, 0.0F, 0.0F); + par1World.spawnEntityInWorld(entityvillager); + this.nativesSpawned += 1; + } + } + } + } + + //Min, max, Weight + public static final WeightedRandomChestContent[] shackChestContents = { + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustIron", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 9), 50), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 6), 50), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustTin", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 6), 50), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustGold", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 3), 30), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 3), 30), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", MathUtils.randInt(1, 2)), 0, MathUtils.randInt(1, 2), 5), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemEmerald", MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemRuby", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 4), 15), + new WeightedRandomChestContent(ItemUtils.getItemStackOfAmountFromOreDict("gemSapphire", MathUtils.randInt(1, 4)), 0, MathUtils.randInt(1, 4), 15), + new WeightedRandomChestContent(ItemUtils.getSimpleStack(CI.electricMotor_LV, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), + new WeightedRandomChestContent(ItemUtils.getSimpleStack(CI.electricPiston_LV, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), + new WeightedRandomChestContent(ItemUtils.getSimpleStack(CI.robotArm_LV, MathUtils.randInt(1, 2)), 0, MathUtils.randInt(1, 2), 2), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, Materials.Copper, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 25), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, Materials.Tin, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 25), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.wireGt01, Materials.Copper, MathUtils.randInt(2, 5)), 0, MathUtils.randInt(2, 5), 35), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.wireGt01, Materials.Tin, MathUtils.randInt(2, 5)), 0, MathUtils.randInt(2, 5), 35), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.pipeSmall, Materials.Copper, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 25), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.pipeSmall, Materials.Bronze, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 15), + new WeightedRandomChestContent(ItemUtils.getGregtechOreStack(OrePrefixes.pipeTiny, Materials.Steel, MathUtils.randInt(1, 3)), 0, MathUtils.randInt(1, 3), 5), + }; + + private boolean hasMadeChest; + private static final String CHEST_KEY = "AUSShackChest"; + + protected void func_143012_a(NBTTagCompound par1NBTTagCompound) { + super.func_143012_a(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("AUSShackChest", this.hasMadeChest); + par1NBTTagCompound.setInteger("AUSWCount", this.nativesSpawned); + } + + protected void func_143011_b(NBTTagCompound par1NBTTagCompound) { + super.func_143011_b(par1NBTTagCompound); + this.hasMadeChest = par1NBTTagCompound.getBoolean("AUSShackChest"); + if (par1NBTTagCompound.hasKey("AUSWCount")) { + this.nativesSpawned = par1NBTTagCompound.getInteger("AUSWCount"); + } else { + this.nativesSpawned = 0; + } + } + + public static class WorldHandlerShack implements IGeneratorWorld { + private final double chance; + private final int range; + + public WorldHandlerShack(double chance) { + this.chance = chance; + this.range = 400; + } + + public int getExtentX() { + return 7; + } + + public int getExtentZ() { + return 7; + } + + public int getRange() { + return this.range; + } + + public boolean generate(World world, Random random, int x, int z) { + if ((MathUtils.randInt(0, 100) < (this.chance/5))) { + int direction = MathUtils.randInt(0, 3); + new ComponentShack(direction, random, x, z).addComponentParts(world, random); + Logger.WORLD("NativeShack x: " + x + " | z: " + z + " | dir: " + direction); + return true; + } + return false; + } + + public void initiate() { + } + } + +} diff --git a/src/main/java/gtPlusPlus/australia/gen/map/structure/StructureManager.java b/src/main/java/gtPlusPlus/australia/gen/map/structure/StructureManager.java new file mode 100644 index 0000000000..b3238a5903 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/structure/StructureManager.java @@ -0,0 +1,20 @@ +package gtPlusPlus.australia.gen.map.structure; + +import gtPlusPlus.australia.gen.map.MapGenExtendedVillage; +import gtPlusPlus.australia.gen.map.structure.type.ComponentVillageBank; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.world.gen.structure.MapGenStructureIO; + +public class StructureManager { + + public static void registerVillageComponents() { + try { + //Register Village + MapGenStructureIO.registerStructure(MapGenExtendedVillage.Start.class, "ExtendedVillage"); + + //Register Structures within village + MapGenStructureIO.func_143031_a(ComponentVillageBank.class, CORE.MODID+":"+"Bank"); + } catch (Throwable e) {} + } + +} diff --git a/src/main/java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java b/src/main/java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java new file mode 100644 index 0000000000..5b7017aaf0 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/map/structure/type/ComponentVillageBank.java @@ -0,0 +1,175 @@ +package gtPlusPlus.australia.gen.map.structure.type; + +import static net.minecraftforge.common.ChestGenHooks.VILLAGE_BLACKSMITH; + +import java.util.List; +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.WeightedRandomChestContent; +import net.minecraft.world.World; +import net.minecraft.world.gen.structure.StructureBoundingBox; +import net.minecraft.world.gen.structure.StructureComponent; +import net.minecraft.world.gen.structure.StructureVillagePieces; +import net.minecraft.world.gen.structure.StructureVillagePieces.House2; +import net.minecraftforge.common.ChestGenHooks; + +public class ComponentVillageBank extends House2 { + + /** List of items that Village's Blacksmith chest can contain. */ + public static final WeightedRandomChestContent[] villageBlacksmithChestContents = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(Items.diamond, 0, 1, 3, 3), + new WeightedRandomChestContent(Items.iron_ingot, 0, 1, 5, 10), + new WeightedRandomChestContent(Items.gold_ingot, 0, 1, 3, 5), + new WeightedRandomChestContent(Items.bread, 0, 1, 3, 15), + new WeightedRandomChestContent(Items.apple, 0, 1, 3, 15), + new WeightedRandomChestContent(Items.iron_pickaxe, 0, 1, 1, 5), + new WeightedRandomChestContent(Items.iron_sword, 0, 1, 1, 5), + new WeightedRandomChestContent(Items.iron_chestplate, 0, 1, 1, 5), + new WeightedRandomChestContent(Items.iron_helmet, 0, 1, 1, 5), + new WeightedRandomChestContent(Items.iron_leggings, 0, 1, 1, 5), + new WeightedRandomChestContent(Items.iron_boots, 0, 1, 1, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.obsidian), 0, 3, 7, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.sapling), 0, 3, 7, 5), + new WeightedRandomChestContent(Items.saddle, 0, 1, 1, 3), + new WeightedRandomChestContent(Items.iron_horse_armor, 0, 1, 1, 1), + new WeightedRandomChestContent(Items.golden_horse_armor, 0, 1, 1, 1), + new WeightedRandomChestContent(Items.diamond_horse_armor, 0, 1, 1, 1) + }; + + private boolean hasMadeChest; + + public ComponentVillageBank() { + Logger.INFO("Created a Bank."); + } + + public ComponentVillageBank(StructureVillagePieces.Start aStart, int p_i2103_2_, Random aRand, + StructureBoundingBox aBox, int aCoordBaseMode) { + super(aStart, p_i2103_2_, aRand, aBox, aCoordBaseMode); + this.coordBaseMode = aCoordBaseMode; + this.boundingBox = aBox; + } + + public static StructureVillagePieces.House2 func_74915_a(StructureVillagePieces.Start p_74915_0_, List p_74915_1_, + Random p_74915_2_, int p_74915_3_, int p_74915_4_, int p_74915_5_, int p_74915_6_, int p_74915_7_) { + StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p_74915_3_, + p_74915_4_, p_74915_5_, 0, 0, 0, 10, 6, 7, p_74915_6_); + Logger.INFO("12334453"); + return canVillageGoDeeper(structureboundingbox) + && StructureComponent.findIntersecting(p_74915_1_, structureboundingbox) == null + ? new StructureVillagePieces.House2(p_74915_0_, p_74915_7_, p_74915_2_, structureboundingbox, + p_74915_6_) + : null; + } + + protected void func_143012_a(NBTTagCompound aNBT) { + super.func_143012_a(aNBT); + aNBT.setBoolean("Chest", this.hasMadeChest); + } + + protected void func_143011_b(NBTTagCompound aNBT) { + super.func_143011_b(aNBT); + this.hasMadeChest = aNBT.getBoolean("Chest"); + } + + /** + * second Part of Structure generating, this for example places Spiderwebs, Mob + * Spawners, it closes Mineshafts at the end, it adds Fences... + */ + public boolean addComponentParts(World aWorld, Random aRand, StructureBoundingBox aBox) { + if (this.field_143015_k < 0) { + this.field_143015_k = this.getAverageGroundLevel(aWorld, aBox); + + if (this.field_143015_k < 0) { + return true; + } + + this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 6 - 1, 0); + } + + this.fillWithBlocks(aWorld, aBox, 0, 1, 0, 9, 4, 6, Blocks.air, Blocks.air, false); + this.fillWithBlocks(aWorld, aBox, 0, 0, 0, 9, 0, 6, Blocks.cobblestone, Blocks.cobblestone, false); + this.fillWithBlocks(aWorld, aBox, 0, 4, 0, 9, 4, 6, Blocks.cobblestone, Blocks.cobblestone, false); + this.fillWithBlocks(aWorld, aBox, 0, 5, 0, 9, 5, 6, Blocks.stone_slab, Blocks.stone_slab, false); + this.fillWithBlocks(aWorld, aBox, 1, 5, 1, 8, 5, 5, Blocks.air, Blocks.air, false); + this.fillWithBlocks(aWorld, aBox, 1, 1, 0, 2, 3, 0, Blocks.planks, Blocks.planks, false); + this.fillWithBlocks(aWorld, aBox, 0, 1, 0, 0, 4, 0, Blocks.log, Blocks.log, false); + this.fillWithBlocks(aWorld, aBox, 3, 1, 0, 3, 4, 0, Blocks.log, Blocks.log, false); + this.fillWithBlocks(aWorld, aBox, 0, 1, 6, 0, 4, 6, Blocks.log, Blocks.log, false); + this.placeBlockAtCurrentPosition(aWorld, Blocks.planks, 0, 3, 3, 1, aBox); + this.fillWithBlocks(aWorld, aBox, 3, 1, 2, 3, 3, 2, Blocks.planks, Blocks.planks, false); + this.fillWithBlocks(aWorld, aBox, 4, 1, 3, 5, 3, 3, Blocks.planks, Blocks.planks, false); + this.fillWithBlocks(aWorld, aBox, 0, 1, 1, 0, 3, 5, Blocks.planks, Blocks.planks, false); + this.fillWithBlocks(aWorld, aBox, 1, 1, 6, 5, 3, 6, Blocks.planks, Blocks.planks, false); + this.fillWithBlocks(aWorld, aBox, 5, 1, 0, 5, 3, 0, Blocks.fence, Blocks.fence, false); + this.fillWithBlocks(aWorld, aBox, 9, 1, 0, 9, 3, 0, Blocks.fence, Blocks.fence, false); + this.fillWithBlocks(aWorld, aBox, 6, 1, 4, 9, 4, 6, Blocks.cobblestone, Blocks.cobblestone, false); + this.placeBlockAtCurrentPosition(aWorld, Blocks.flowing_lava, 0, 7, 1, 5, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.flowing_lava, 0, 8, 1, 5, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.iron_bars, 0, 9, 2, 5, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.iron_bars, 0, 9, 2, 4, aBox); + this.fillWithBlocks(aWorld, aBox, 7, 2, 4, 8, 2, 5, Blocks.air, Blocks.air, false); + this.placeBlockAtCurrentPosition(aWorld, Blocks.cobblestone, 0, 6, 1, 3, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.furnace, 0, 6, 2, 3, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.furnace, 0, 6, 3, 3, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.double_stone_slab, 0, 8, 1, 1, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 0, 2, 2, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 0, 2, 4, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 2, 2, 6, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.glass_pane, 0, 4, 2, 6, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.fence, 0, 2, 1, 4, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.wooden_pressure_plate, 0, 2, 2, 4, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.planks, 0, 1, 1, 5, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.oak_stairs, + this.getMetadataWithOffset(Blocks.oak_stairs, 3), 2, 1, 5, aBox); + this.placeBlockAtCurrentPosition(aWorld, Blocks.oak_stairs, + this.getMetadataWithOffset(Blocks.oak_stairs, 1), 1, 1, 4, aBox); + int i; + int j; + + if (!this.hasMadeChest) { + i = this.getYWithOffset(1); + j = this.getXWithOffset(5, 5); + int k = this.getZWithOffset(5, 5); + + if (aBox.isVecInside(j, i, k)) { + this.hasMadeChest = true; + this.generateStructureChestContents(aWorld, aBox, aRand, 5, 1, 5, + ChestGenHooks.getItems(VILLAGE_BLACKSMITH, aRand), + ChestGenHooks.getCount(VILLAGE_BLACKSMITH, aRand)); + } + } + + for (i = 6; i <= 8; ++i) { + if (this.getBlockAtCurrentPosition(aWorld, i, 0, -1, aBox).getMaterial() == Material.air && this + .getBlockAtCurrentPosition(aWorld, i, -1, -1, aBox).getMaterial() != Material.air) { + this.placeBlockAtCurrentPosition(aWorld, Blocks.stone_stairs, + this.getMetadataWithOffset(Blocks.stone_stairs, 3), i, 0, -1, aBox); + } + } + + for (i = 0; i < 7; ++i) { + for (j = 0; j < 10; ++j) { + this.clearCurrentPositionBlocksUpwards(aWorld, j, 6, i, aBox); + this.func_151554_b(aWorld, Blocks.cobblestone, 0, j, -1, i, aBox); + } + } + + this.spawnVillagers(aWorld, aBox, 7, 1, 1, 1); + return true; + } + + /** + * Returns the villager type to spawn in this component, based on the number of + * villagers already spawned. + */ + protected int getVillagerType(int p_74888_1_) { + return 7735; + } + +} diff --git a/src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java b/src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java new file mode 100644 index 0000000000..9adb84eef2 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianOre.java @@ -0,0 +1,87 @@ +package gtPlusPlus.australia.gen.world; + +import java.util.Random; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenAustralianOre extends WorldGenerator { + + private Block mOreToSpawn; + private int numberOfBlocks; + private Block mBlockToReplace; + private int mineableBlockMeta; + + public WorldGenAustralianOre(Block aBlock, int aNumber) { + this(aBlock, aNumber, Blocks.stone); + this.mineableBlockMeta = 0; + } + + public WorldGenAustralianOre(Block aBlock, int aNumber, Block aReplace) { + this.mOreToSpawn = aBlock; + this.numberOfBlocks = aNumber; + this.mBlockToReplace = aReplace; + } + + public WorldGenAustralianOre(Block block, int meta, int number, Block target) { + this(block, number, target); + this.mineableBlockMeta = meta; + } + + + + public boolean generate(World aWorld, Random aRand, int aX, int aY, int aZ) { + float f = MathUtils.randFloat(0f, 1.5f) * CORE.PI; + double d0 = (double) ((float) (aX + 8) + MathHelper.sin(f) * (float) this.numberOfBlocks / 8.0F); + double d1 = (double) ((float) (aX + 8) - MathHelper.sin(f) * (float) this.numberOfBlocks / 8.0F); + double d2 = (double) ((float) (aZ + 8) + MathHelper.cos(f) * (float) this.numberOfBlocks / 8.0F); + double d3 = (double) ((float) (aZ + 8) - MathHelper.cos(f) * (float) this.numberOfBlocks / 8.0F); + double d4 = (double) (aY + aRand.nextInt(MathUtils.randInt(3, 6)) - 2); + double d5 = (double) (aY + aRand.nextInt(MathUtils.randInt(3, 6)) - 2); + + for (int aOreGenerated = 0; aOreGenerated <= this.numberOfBlocks; ++aOreGenerated) { + double d6 = d0 + (d1 - d0) * (double) aOreGenerated / (double) this.numberOfBlocks; + double d7 = d4 + (d5 - d4) * (double) aOreGenerated / (double) this.numberOfBlocks; + double d8 = d2 + (d3 - d2) * (double) aOreGenerated / (double) this.numberOfBlocks; + double d9 = aRand.nextDouble() * (double) this.numberOfBlocks / 16.0D; + double d10 = (double) (MathHelper.sin((float) aOreGenerated * CORE.PI / (float) this.numberOfBlocks) + 1.0F) + * d9 + 1.0D; + double d11 = (double) (MathHelper.sin((float) aOreGenerated * CORE.PI / (float) this.numberOfBlocks) + 1.0F) + * d9 + 1.0D; + int i1 = MathHelper.floor_double(d6 - d10 / 2.0D); + int j1 = MathHelper.floor_double(d7 - d11 / 2.0D); + int k1 = MathHelper.floor_double(d8 - d10 / 2.0D); + int l1 = MathHelper.floor_double(d6 + d10 / 2.0D); + int i2 = MathHelper.floor_double(d7 + d11 / 2.0D); + int j2 = MathHelper.floor_double(d8 + d10 / 2.0D); + + for (int k2 = i1; k2 <= l1; ++k2) { + double d12 = ((double) k2 + 0.5D - d6) / (d10 / 2.0D); + + if (d12 * d12 < 1.0D) { + for (int l2 = j1; l2 <= i2; ++l2) { + double d13 = ((double) l2 + 0.5D - d7) / (d11 / 2.0D); + + if (d12 * d12 + d13 * d13 < 1.0D) { + for (int i3 = k1; i3 <= j2; ++i3) { + double d14 = ((double) i3 + 0.5D - d8) / (d10 / 2.0D); + + if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && aWorld.getBlock(k2, l2, i3) + .isReplaceableOreGen(aWorld, k2, l2, i3, mBlockToReplace)) { + aWorld.setBlock(k2, l2, i3, this.mOreToSpawn, mineableBlockMeta, 2); + } + } + } + } + } + } + } + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java b/src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java new file mode 100644 index 0000000000..f3529aff0b --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/gen/world/WorldGenAustralianTrees.java @@ -0,0 +1,250 @@ +package gtPlusPlus.australia.gen.world; + +import java.util.Random; + +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.util.Direction; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenTrees; +import net.minecraftforge.common.util.ForgeDirection; + +public class WorldGenAustralianTrees extends WorldGenTrees { + + /** The minimum height of a generated tree. */ + private final int minHeight; + /** True if this tree should grow Vines. */ + private final boolean growVines; + /** The metadata value of the wood to use in tree generation. */ + private final int woodMeta; + /** The metadata value of the leaves to use in tree generation. */ + private final int leavesMeta; + + public WorldGenAustralianTrees(boolean p_i2027_1_) { + this(p_i2027_1_, 4, false); + } + + public WorldGenAustralianTrees(boolean p_i2028_1_, int aMinHeight, boolean aVinesGrow) { + super(p_i2028_1_, aMinHeight, 0, 0, aVinesGrow); + this.minHeight = aMinHeight; + this.woodMeta = 0; + this.leavesMeta = 0; + this.growVines = aVinesGrow; + } + + public boolean generate(World aWorld, Random aRand, int aX, int aY, int aZ) { + int aActualMinHeight = MathUtils.randInt(4, 8) + this.minHeight; + boolean flag = true; + + if (aY >= 1 && aY + aActualMinHeight + 1 <= 256) { + byte b0; + int k1; + Block block; + + for (int i1 = aY; i1 <= aY + 1 + aActualMinHeight; ++i1) { + b0 = 1; + + if (i1 == aY) { + b0 = 0; + } + + if (i1 >= aY + 1 + aActualMinHeight - 2) { + b0 = 2; + } + + for (int j1 = aX - b0; j1 <= aX + b0 && flag; ++j1) { + for (k1 = aZ - b0; k1 <= aZ + b0 && flag; ++k1) { + if (i1 >= 0 && i1 < 256) { + block = aWorld.getBlock(j1, i1, k1); + + if (!this.isReplaceable(aWorld, j1, i1, k1)) { + flag = false; + } + } else { + flag = false; + } + } + } + } + + if (!flag) { + return false; + } else { + Block block2 = aWorld.getBlock(aX, aY - 1, aZ); + boolean isSoil = true; + for (int gh = 0; gh < 5; gh++) { + int xMod, zMod; + if (gh == 0) { + xMod = 1; + zMod = 0; + } + else if (gh == 1) { + xMod = 0; + zMod = 1; + } + else if (gh == 2) { + xMod = -1; + zMod = 0; + } + else if (gh == 3) { + xMod = 0; + zMod = -1; + } + else { + xMod = 0; + zMod = 0; + } + block2 = aWorld.getBlock(aX+xMod, aY - 1, aZ+zMod); + if (block2 == Blocks.air || !block2.canSustainPlant(aWorld, aX+xMod, aY - 1, aZ+zMod, ForgeDirection.UP, (BlockSapling) Blocks.sapling)) { + isSoil = false; + break; + } + } + + if (isSoil && aY < 256 - aActualMinHeight - 1) { + block2.onPlantGrow(aWorld, aX, aY - 1, aZ, aX, aY, aZ); + b0 = 5; + byte b1 = 0; + int l1; + int i2; + int j2; + int i3; + + for (k1 = aY - b0 + aActualMinHeight; k1 <= aY + aActualMinHeight; ++k1) { + i3 = k1 - (aY + aActualMinHeight); + l1 = b1 + 3 - i3 / 2; + + for (i2 = aX - l1; i2 <= aX + l1; ++i2) { + j2 = i2 - aX; + + for (int k2 = aZ - l1; k2 <= aZ + l1; ++k2) { + int l2 = k2 - aZ; + + if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || aRand.nextInt(2) != 0 && i3 != 0) { + Block block1 = aWorld.getBlock(i2, k1, k2); + + if (block1.isAir(aWorld, i2, k1, k2) || block1.isLeaves(aWorld, i2, k1, k2)) { + this.setBlockAndNotifyAdequately(aWorld, i2, k1, k2, Blocks.leaves, + this.leavesMeta); + } + } + } + } + } + + for (k1 = 0; k1 < aActualMinHeight; ++k1) { + block = aWorld.getBlock(aX, aY + k1, aZ); + + if (block.isAir(aWorld, aX, aY + k1, aZ) || block.isLeaves(aWorld, aX, aY + k1, aZ)) { + + //Set Middle Trunk + this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ, Blocks.log, this.woodMeta); + //Set Sides + if (k1 < (aActualMinHeight - 2)) { + if (aWorld.isAirBlock(aX+1, aY + k1, aZ) || block.isLeaves(aWorld, aX+1, aY + k1, aZ)) this.setBlockAndNotifyAdequately(aWorld, aX+1, aY + k1, aZ, Blocks.log, this.woodMeta); + if (aWorld.isAirBlock(aX-1, aY + k1, aZ) || block.isLeaves(aWorld, aX-1, aY + k1, aZ)) this.setBlockAndNotifyAdequately(aWorld, aX-1, aY + k1, aZ, Blocks.log, this.woodMeta); + if (aWorld.isAirBlock(aX, aY + k1, aZ+1) || block.isLeaves(aWorld, aX, aY + k1, aZ+1)) this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ+1, Blocks.log, this.woodMeta); + if (aWorld.isAirBlock(aX, aY + k1, aZ-1) || block.isLeaves(aWorld, aX, aY + k1, aZ-1)) this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ-1, Blocks.log, this.woodMeta); + } + + if (this.growVines && k1 > 0) { + if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX - 1, aY + k1, aZ)) { + this.setBlockAndNotifyAdequately(aWorld, aX - 1, aY + k1, aZ, Blocks.vine, 8); + } + + if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX + 1, aY + k1, aZ)) { + this.setBlockAndNotifyAdequately(aWorld, aX + 1, aY + k1, aZ, Blocks.vine, 2); + } + + if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX, aY + k1, aZ - 1)) { + this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ - 1, Blocks.vine, 1); + } + + if (aRand.nextInt(3) > 0 && aWorld.isAirBlock(aX, aY + k1, aZ + 1)) { + this.setBlockAndNotifyAdequately(aWorld, aX, aY + k1, aZ + 1, Blocks.vine, 4); + } + } + } + } + + if (this.growVines) { + for (k1 = aY - 3 + aActualMinHeight; k1 <= aY + aActualMinHeight; ++k1) { + i3 = k1 - (aY + aActualMinHeight); + l1 = 2 - i3 / 2; + + for (i2 = aX - l1; i2 <= aX + l1; ++i2) { + for (j2 = aZ - l1; j2 <= aZ + l1; ++j2) { + if (aWorld.getBlock(i2, k1, j2).isLeaves(aWorld, i2, k1, j2)) { + if (aRand.nextInt(4) == 0 + && aWorld.getBlock(i2 - 1, k1, j2).isAir(aWorld, i2 - 1, k1, j2)) { + this.growVines(aWorld, i2 - 1, k1, j2, 8); + } + + if (aRand.nextInt(4) == 0 + && aWorld.getBlock(i2 + 1, k1, j2).isAir(aWorld, i2 + 1, k1, j2)) { + this.growVines(aWorld, i2 + 1, k1, j2, 2); + } + + if (aRand.nextInt(4) == 0 + && aWorld.getBlock(i2, k1, j2 - 1).isAir(aWorld, i2, k1, j2 - 1)) { + this.growVines(aWorld, i2, k1, j2 - 1, 1); + } + + if (aRand.nextInt(4) == 0 + && aWorld.getBlock(i2, k1, j2 + 1).isAir(aWorld, i2, k1, j2 + 1)) { + this.growVines(aWorld, i2, k1, j2 + 1, 4); + } + } + } + } + } + + if (aRand.nextInt(5) == 0 && aActualMinHeight > 5) { + for (k1 = 0; k1 < 2; ++k1) { + for (i3 = 0; i3 < 4; ++i3) { + if (aRand.nextInt(4 - k1) == 0) { + l1 = aRand.nextInt(3); + this.setBlockAndNotifyAdequately(aWorld, + aX + Direction.offsetX[Direction.rotateOpposite[i3]], aY + aActualMinHeight - 5 + k1, + aZ + Direction.offsetZ[Direction.rotateOpposite[i3]], Blocks.cocoa, + l1 << 2 | i3); + } + } + } + } + } + + return true; + } else { + return false; + } + } + } else { + return false; + } + } + + /** + * Grows vines downward from the given block for a given length. Args: World, x, + * starty, z, vine-length + */ + private void growVines(World p_76529_1_, int p_76529_2_, int p_76529_3_, int p_76529_4_, int p_76529_5_) { + this.setBlockAndNotifyAdequately(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_, Blocks.vine, p_76529_5_); + int i1 = 4; + + while (true) { + --p_76529_3_; + + if (!p_76529_1_.getBlock(p_76529_2_, p_76529_3_, p_76529_4_).isAir(p_76529_1_, p_76529_2_, p_76529_3_, + p_76529_4_) || i1 <= 0) { + return; + } + + this.setBlockAndNotifyAdequately(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_, Blocks.vine, p_76529_5_); + --i1; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java b/src/main/java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java new file mode 100644 index 0000000000..5100ed31c5 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/item/ItemAustraliaPortalTrigger.java @@ -0,0 +1,100 @@ +package gtPlusPlus.australia.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import gtPlusPlus.australia.dimension.Dimension_Australia; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class ItemAustraliaPortalTrigger extends Item { + public ItemAustraliaPortalTrigger() { + super(); + this.maxStackSize = 1; + setMaxDamage(64); + setCreativeTab(CreativeTabs.tabTools); + this.setTextureName(CORE.MODID + ":" + "itemAlkalusDisk"); + } + + @Override + public Item setMaxStackSize(int int1) { + return super.setMaxStackSize(1); + } + + @Override + public EnumRarity getRarity(ItemStack thisItem) { + return EnumRarity.rare; + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack, int pass) { + return false; + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return EnumChatFormatting.GOLD+"Alkalus ROM ["+EnumChatFormatting.RED+"Activated"+EnumChatFormatting.GOLD+"]"; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GREEN+"Shows a glipse of the past."); + list.add(EnumChatFormatting.GREEN+"This item produces such a temperature, that you'd hate to use it incorrectly."); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + return Utils.rgbtoHexValue(128, 192, 64); + } + + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, + float par8, float par9, float par10) { + if (par7 == 0) { + par5--; + } + if (par7 == 1) { + par5++; + } + if (par7 == 2) { + par6--; + } + if (par7 == 3) { + par6++; + } + if (par7 == 4) { + par4--; + } + if (par7 == 5) { + par4++; + } + if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { + return false; + } + Block i1 = par3World.getBlock(par4, par5, par6); + if (i1 == Blocks.air) { + par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + if (Dimension_Australia.portalBlock.tryToCreatePortal(par3World, par4, par5, par6)){ + //Make a Portal + } + else { + if (!par3World.isRemote){ + par3World.setBlock(par4, par5, par6, ModBlocks.blockHellfire, 0, 3); + } + } + } + par1ItemStack.damageItem(1, par2EntityPlayer); + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/item/ItemBlockAustralia.java b/src/main/java/gtPlusPlus/australia/item/ItemBlockAustralia.java new file mode 100644 index 0000000000..9854f9fa6a --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/item/ItemBlockAustralia.java @@ -0,0 +1,39 @@ +package gtPlusPlus.australia.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.interfaces.ITileTooltip; + +public class ItemBlockAustralia extends ItemBlock { + + protected final int mID; + + public ItemBlockAustralia(final Block block) { + super(block); + this.mID = ((ITileTooltip) block).getTooltipID(); + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.mID == 0){ //blockDarkWorldPortalFrame + list.add("Use this to access Australia."); + list.add("Assembled in the same shape as the Nether Portal."); + } + else if (this.mID == 1){ //blockDarkWorldPortal + list.add("Place this if you are lazy to create the portal structure, slacker."); + } + else if (this.mID == 2){ //blockDarkWorldGround + list.add("Pure Australian Outback."); + } + else if (this.mID == 3){ //blockDarkWorldPollutedDirt + list.add("Maybe you can do something with this?."); + } + } + + +} diff --git a/src/main/java/gtPlusPlus/australia/world/AustraliaPortalPosition.java b/src/main/java/gtPlusPlus/australia/world/AustraliaPortalPosition.java new file mode 100644 index 0000000000..865c0c3bb2 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/world/AustraliaPortalPosition.java @@ -0,0 +1,14 @@ +package gtPlusPlus.australia.world; + +import net.minecraft.util.ChunkCoordinates; + +public class AustraliaPortalPosition extends ChunkCoordinates { + public long field_85087_d; + final AustraliaTeleporterDimensionMod field_85088_e; + + public AustraliaPortalPosition(AustraliaTeleporterDimensionMod gladesTeleporter, int par2, int par3, int par4, long par5) { + super(par2, par3, par4); + this.field_85088_e = gladesTeleporter; + this.field_85087_d = par5; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java b/src/main/java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java new file mode 100644 index 0000000000..4ad693263e --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/world/AustraliaTeleporterDimensionMod.java @@ -0,0 +1,470 @@ +package gtPlusPlus.australia.world; + +import java.util.*; + +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.util.*; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.Teleporter; +import net.minecraft.world.WorldServer; +import gtPlusPlus.australia.dimension.Dimension_Australia; + +public class AustraliaTeleporterDimensionMod extends Teleporter { + + private final WorldServer worldServerInstance; + /** + * A private Random() function in Teleporter + */ + private final Random random; + /** + * Stores successful portal placement locations for rapid lookup. + */ + private final LongHashMap destinationCoordinateCache = new LongHashMap(); + /** + * A list of valid keys for the destinationCoordainteCache. These are + * based on the X & Z of the players initial location. + */ + @SuppressWarnings("rawtypes") + private final List destinationCoordinateKeys = new ArrayList(); + + public AustraliaTeleporterDimensionMod(WorldServer par1WorldServer) { + super(par1WorldServer); + this.worldServerInstance = par1WorldServer; + this.random = new Random(par1WorldServer.getSeed()); + } + + /** + * Place an entity in a nearby portal, creating one if necessary. + */ + @Override + public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { + if (this.worldServerInstance.provider.dimensionId != 1) { + if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { + this.makePortal(par1Entity); + this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); + } + } + else { + int i = MathHelper.floor_double(par1Entity.posX); + int j = MathHelper.floor_double(par1Entity.posY) - 1; + int k = MathHelper.floor_double(par1Entity.posZ); + byte b0 = 1; + byte b1 = 0; + + for (int l = -2; l <= 2; ++l) { + for (int i1 = -2; i1 <= 2; ++i1) { + for (int j1 = -1; j1 < 3; ++j1) { + int k1 = i + i1 * b0 + l * b1; + int l1 = j + j1; + int i2 = k + i1 * b1 - l * b0; + boolean flag = j1 < 0; + this.worldServerInstance.setBlock(k1, l1, i2, flag ? Dimension_Australia.blockPortalFrame : Blocks.air); + } + } + } + + par1Entity.setLocationAndAngles(i, j, k, par1Entity.rotationYaw, 0.0F); + par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; + } + } + + /** + * Place an entity in a nearby portal which already exists. + */ + @Override + public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { + short short1 = 128; + double d3 = -1.0D; + int i = 0; + int j = 0; + int k = 0; + int l = MathHelper.floor_double(par1Entity.posX); + int i1 = MathHelper.floor_double(par1Entity.posZ); + long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1); + boolean flag = true; + double d7; + int l3; + + if (this.destinationCoordinateCache.containsItem(j1)) { + Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache + .getValueByKey(j1); + d3 = 0.0D; + i = portalposition.posX; + j = portalposition.posY; + k = portalposition.posZ; + portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); + flag = false; + } + else { + for (l3 = l - short1; l3 <= l + short1; ++l3) { + double d4 = l3 + 0.5D - par1Entity.posX; + + for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) { + double d5 = l1 + 0.5D - par1Entity.posZ; + + for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) { + if (this.worldServerInstance.getBlock(l3, i2, l1) == Dimension_Australia.portalBlock) { + while (this.worldServerInstance.getBlock(l3, i2 - 1, l1) == Dimension_Australia.portalBlock) { + --i2; + } + + d7 = i2 + 0.5D - par1Entity.posY; + double d8 = d4 * d4 + d7 * d7 + d5 * d5; + + if (d3 < 0.0D || d8 < d3) { + d3 = d8; + i = l3; + j = i2; + k = l1; + } + } + } + } + } + } + + if (d3 >= 0.0D) { + if (flag) { + this.destinationCoordinateCache.add(j1, + new Teleporter.PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); + this.destinationCoordinateKeys.add(Long.valueOf(j1)); + } + + double d11 = i + 0.5D; + double d6 = j + 0.5D; + d7 = k + 0.5D; + int i4 = -1; + + if (this.worldServerInstance.getBlock(i - 1, j, k) == Dimension_Australia.portalBlock) { + i4 = 2; + } + + if (this.worldServerInstance.getBlock(i + 1, j, k) == Dimension_Australia.portalBlock) { + i4 = 0; + } + + if (this.worldServerInstance.getBlock(i, j, k - 1) == Dimension_Australia.portalBlock) { + i4 = 3; + } + + if (this.worldServerInstance.getBlock(i, j, k + 1) == Dimension_Australia.portalBlock) { + i4 = 1; + } + + int j2 = par1Entity.getTeleportDirection(); + + if (i4 > -1) { + int k2 = Direction.rotateLeft[i4]; + int l2 = Direction.offsetX[i4]; + int i3 = Direction.offsetZ[i4]; + int j3 = Direction.offsetX[k2]; + int k3 = Direction.offsetZ[k2]; + boolean flag1 = !this.worldServerInstance.isAirBlock(i + l2 + j3, j, k + i3 + k3) + || !this.worldServerInstance.isAirBlock(i + l2 + j3, j + 1, k + i3 + k3); + boolean flag2 = !this.worldServerInstance.isAirBlock(i + l2, j, k + i3) + || !this.worldServerInstance.isAirBlock(i + l2, j + 1, k + i3); + + if (flag1 && flag2) { + i4 = Direction.rotateOpposite[i4]; + k2 = Direction.rotateOpposite[k2]; + l2 = Direction.offsetX[i4]; + i3 = Direction.offsetZ[i4]; + j3 = Direction.offsetX[k2]; + k3 = Direction.offsetZ[k2]; + l3 = i - j3; + d11 -= j3; + int k1 = k - k3; + d7 -= k3; + flag1 = !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j, k1 + i3 + k3) + || !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j + 1, k1 + i3 + k3); + flag2 = !this.worldServerInstance.isAirBlock(l3 + l2, j, k1 + i3) + || !this.worldServerInstance.isAirBlock(l3 + l2, j + 1, k1 + i3); + } + + float f1 = 0.5F; + float f2 = 0.5F; + + if (!flag1 && flag2) { + f1 = 1.0F; + } + else if (flag1 && !flag2) { + f1 = 0.0F; + } + else if (flag1 && flag2) { + f2 = 0.0F; + } + + d11 += j3 * f1 + f2 * l2; + d7 += k3 * f1 + f2 * i3; + float f3 = 0.0F; + float f4 = 0.0F; + float f5 = 0.0F; + float f6 = 0.0F; + + if (i4 == j2) { + f3 = 1.0F; + f4 = 1.0F; + } + else if (i4 == Direction.rotateOpposite[j2]) { + f3 = -1.0F; + f4 = -1.0F; + } + else if (i4 == Direction.rotateRight[j2]) { + f5 = 1.0F; + f6 = -1.0F; + } + else { + f5 = -1.0F; + f6 = 1.0F; + } + + double d9 = par1Entity.motionX; + double d10 = par1Entity.motionZ; + par1Entity.motionX = d9 * f3 + d10 * f6; + par1Entity.motionZ = d9 * f5 + d10 * f4; + par1Entity.rotationYaw = par8 - j2 * 90 + i4 * 90; + } + else { + par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; + } + + par1Entity.setLocationAndAngles(d11, d6, d7, par1Entity.rotationYaw, par1Entity.rotationPitch); + return true; + } + else { + return false; + } + } + + @Override + public boolean makePortal(Entity par1Entity) { + byte b0 = 16; + double d0 = -1.0D; + int i = MathHelper.floor_double(par1Entity.posX); + int j = MathHelper.floor_double(par1Entity.posY); + int k = MathHelper.floor_double(par1Entity.posZ); + int l = i; + int i1 = j; + int j1 = k; + int k1 = 0; + int l1 = this.random.nextInt(4); + int i2; + double d1; + double d2; + int k2; + int i3; + int k3; + int j3; + int i4; + int l3; + int k4; + int j4; + int i5; + int l4; + double d3; + double d4; + + for (i2 = i - b0; i2 <= i + b0; ++i2) { + d1 = i2 + 0.5D - par1Entity.posX; + + for (k2 = k - b0; k2 <= k + b0; ++k2) { + d2 = k2 + 0.5D - par1Entity.posZ; + label274: + + for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { + if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { + while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { + --i3; + } + + for (j3 = l1; j3 < l1 + 4; ++j3) { + k3 = j3 % 2; + l3 = 1 - k3; + + if (j3 % 4 >= 2) { + k3 = -k3; + l3 = -l3; + } + + for (i4 = 0; i4 < 3; ++i4) { + for (j4 = 0; j4 < 4; ++j4) { + for (k4 = -1; k4 < 4; ++k4) { + l4 = i2 + (j4 - 1) * k3 + i4 * l3; + i5 = i3 + k4; + int j5 = k2 + (j4 - 1) * l3 - i4 * k3; + + if (k4 < 0 + && !this.worldServerInstance.getBlock(l4, i5, j5).getMaterial() + .isSolid() + || k4 >= 0 && !this.worldServerInstance.isAirBlock(l4, i5, j5)) { + continue label274; + } + } + } + } + + d4 = i3 + 0.5D - par1Entity.posY; + d3 = d1 * d1 + d4 * d4 + d2 * d2; + + if (d0 < 0.0D || d3 < d0) { + d0 = d3; + l = i2; + i1 = i3; + j1 = k2; + k1 = j3 % 4; + } + } + } + } + } + } + + if (d0 < 0.0D) { + for (i2 = i - b0; i2 <= i + b0; ++i2) { + d1 = i2 + 0.5D - par1Entity.posX; + + for (k2 = k - b0; k2 <= k + b0; ++k2) { + d2 = k2 + 0.5D - par1Entity.posZ; + label222: + + for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { + if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { + while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { + --i3; + } + + for (j3 = l1; j3 < l1 + 2; ++j3) { + k3 = j3 % 2; + l3 = 1 - k3; + + for (i4 = 0; i4 < 4; ++i4) { + for (j4 = -1; j4 < 4; ++j4) { + k4 = i2 + (i4 - 1) * k3; + l4 = i3 + j4; + i5 = k2 + (i4 - 1) * l3; + + if (j4 < 0 + && !this.worldServerInstance.getBlock(k4, l4, i5).getMaterial() + .isSolid() + || j4 >= 0 && !this.worldServerInstance.isAirBlock(k4, l4, i5)) { + continue label222; + } + } + } + + d4 = i3 + 0.5D - par1Entity.posY; + d3 = d1 * d1 + d4 * d4 + d2 * d2; + + if (d0 < 0.0D || d3 < d0) { + d0 = d3; + l = i2; + i1 = i3; + j1 = k2; + k1 = j3 % 2; + } + } + } + } + } + } + } + + int k5 = l; + int j2 = i1; + k2 = j1; + int l5 = k1 % 2; + int l2 = 1 - l5; + + if (k1 % 4 >= 2) { + l5 = -l5; + l2 = -l2; + } + + boolean flag; + + if (d0 < 0.0D) { + if (i1 < 70) { + i1 = 70; + } + + if (i1 > this.worldServerInstance.getActualHeight() - 10) { + i1 = this.worldServerInstance.getActualHeight() - 10; + } + + j2 = i1; + + for (i3 = -1; i3 <= 1; ++i3) { + for (j3 = 1; j3 < 3; ++j3) { + for (k3 = -1; k3 < 3; ++k3) { + l3 = k5 + (j3 - 1) * l5 + i3 * l2; + i4 = j2 + k3; + j4 = k2 + (j3 - 1) * l2 - i3 * l5; + flag = k3 < 0; + this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Australia.blockPortalFrame : Blocks.air); + } + } + } + } + + for (i3 = 0; i3 < 4; ++i3) { + for (j3 = 0; j3 < 4; ++j3) { + for (k3 = -1; k3 < 4; ++k3) { + l3 = k5 + (j3 - 1) * l5; + i4 = j2 + k3; + j4 = k2 + (j3 - 1) * l2; + flag = j3 == 0 || j3 == 3 || k3 == -1 || k3 == 3; + this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Australia.blockPortalFrame : Dimension_Australia.portalBlock, 0, 2); + } + } + + for (j3 = 0; j3 < 4; ++j3) { + for (k3 = -1; k3 < 4; ++k3) { + l3 = k5 + (j3 - 1) * l5; + i4 = j2 + k3; + j4 = k2 + (j3 - 1) * l2; + this.worldServerInstance.notifyBlocksOfNeighborChange(l3, i4, j4, + this.worldServerInstance.getBlock(l3, i4, j4)); + } + } + } + + return true; + } + + /** + * called periodically to remove out-of-date portal locations from the + * cache list. Argument par1 is a WorldServer.getTotalWorldTime() value. + */ + @Override + public void removeStalePortalLocations(long par1) { + if (par1 % 100L == 0L) { + @SuppressWarnings("rawtypes") + Iterator iterator = this.destinationCoordinateKeys.iterator(); + long j = par1 - 600L; + + while (iterator.hasNext()) { + Long olong = (Long) iterator.next(); + Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache + .getValueByKey(olong.longValue()); + + if (portalposition == null || portalposition.lastUpdateTime < j) { + iterator.remove(); + this.destinationCoordinateCache.remove(olong.longValue()); + } + } + } + } + + public class PortalPosition extends ChunkCoordinates { + /** + * The worldtime at which this PortalPosition was last verified + */ + public long lastUpdateTime; + + public PortalPosition(int par2, int par3, int par4, long par5) { + super(par2, par3, par4); + this.lastUpdateTime = par5; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java new file mode 100644 index 0000000000..f0bd35a8b9 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldChunkManager.java @@ -0,0 +1,257 @@ +package gtPlusPlus.australia.world; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.crash.CrashReport; +import net.minecraft.crash.CrashReportCategory; +import net.minecraft.util.ReportedException; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.biome.BiomeCache; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.WorldChunkManager; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; +import gtPlusPlus.australia.biome.GenLayerAustralia; + +public class AustraliaWorldChunkManager extends WorldChunkManager { + + private GenLayer genBiomes; + /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */ + private GenLayer biomeIndexLayer; + /** The BiomeCache object for this world. */ + private BiomeCache biomeCache; + /** A list of biomes that the player can spawn in. */ + private List biomesToSpawnIn; + + @SuppressWarnings({ "rawtypes" }) + public AustraliaWorldChunkManager() { + this.biomeCache = new BiomeCache(this); + this.biomesToSpawnIn = new ArrayList(); + this.biomesToSpawnIn.addAll(allowedBiomes); // TODO + } + + public AustraliaWorldChunkManager(long seed, WorldType worldType) { + this(); + // i changed this to my GenLayerDarkWorld + GenLayer[] agenlayer = GenLayerAustralia.makeTheWorld(seed, worldType); + + agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer); + this.genBiomes = agenlayer[0]; + this.biomeIndexLayer = agenlayer[1]; + + + + } + + public AustraliaWorldChunkManager(World world) { + this(world.getSeed(), world.getWorldInfo().getTerrainType()); + + } + + /** + * Gets the list of valid biomes for the player to spawn in. + */ + @Override + public List getBiomesToSpawnIn() { + return this.biomesToSpawnIn; + } + + /** + * Returns a list of rainfall values for the specified blocks. Args: + * listToReuse, x, z, width, length. + */ + @Override + public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) { + IntCache.resetIntCache(); + + if ((listToReuse == null) || (listToReuse.length < width * length)) { + listToReuse = new float[width * length]; + } + int[] aint = this.biomeIndexLayer.getInts(x, z, width, length); + for (int i1 = 0; i1 < width * length; i1++) { + try + { + float f = BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F; + if (f > 1.0F) { + f = 1.0F; + } + listToReuse[i1] = f; + } + catch (Throwable throwable) + { + CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); + CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock"); + crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1)); + crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length)); + crashreportcategory.addCrashSection("x", Integer.valueOf(x)); + crashreportcategory.addCrashSection("z", Integer.valueOf(z)); + crashreportcategory.addCrashSection("w", Integer.valueOf(width)); + crashreportcategory.addCrashSection("h", Integer.valueOf(length)); + throw new ReportedException(crashreport); + } + } + return listToReuse; + } + + /** + * Return an adjusted version of a given temperature based on the y + * height + */ + @Override + @SideOnly(Side.CLIENT) + public float getTemperatureAtHeight(float par1, int par2) { + return par1; + } + + /** + * Returns an array of biomes for the location input. + */ + @Override + public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { + IntCache.resetIntCache(); + + if ((par1ArrayOfBiomeGenBase == null) || (par1ArrayOfBiomeGenBase.length < par4 * par5)) { + par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; + } + int[] aint = this.genBiomes.getInts(par2, par3, par4, par5); + try + { + for (int i = 0; i < par4 * par5; i++) { + par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]); + } + return par1ArrayOfBiomeGenBase; + } + catch (Throwable throwable) + { + CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); + CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock"); + crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length)); + crashreportcategory.addCrashSection("x", Integer.valueOf(par2)); + crashreportcategory.addCrashSection("z", Integer.valueOf(par3)); + crashreportcategory.addCrashSection("w", Integer.valueOf(par4)); + crashreportcategory.addCrashSection("h", Integer.valueOf(par5)); + throw new ReportedException(crashreport); + } + + } + + /** + * Returns biomes to use for the blocks and loads the other data like + * temperature and humidity onto the WorldChunkManager Args: + * oldBiomeList, x, z, width, depth + */ + @Override + public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth) { + return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true); + } + + /** + * Return a list of biomes for the specified blocks. Args: listToReuse, + * x, y, width, length, cacheFlag (if false, don't check biomeCache to + * avoid infinite loop in BiomeCacheBlock) + */ + @Override + public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag) { + IntCache.resetIntCache(); + if ((listToReuse == null) || (listToReuse.length < width * length)) { + listToReuse = new BiomeGenBase[width * length]; + } + if ((cacheFlag) && (width == 16) && (length == 16) && ((x & 0xF) == 0) && ((y & 0xF) == 0)) + { + BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y); + System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length); + return listToReuse; + } + int[] aint = this.biomeIndexLayer.getInts(x, y, width, length); + for (int i = 0; i < width * length; i++) { + listToReuse[i] = BiomeGenBase.getBiome(aint[i]); + } + return listToReuse; + } + + /** + * checks given Chunk's Biomes against List of allowed ones + */ + @Override + @SuppressWarnings("rawtypes") + public boolean areBiomesViable(int x, int y, int z, List par4List) { + IntCache.resetIntCache(); + int l = x - z >> 2; + int i1 = y - z >> 2; + int j1 = x + z >> 2; + int k1 = y + z >> 2; + int l1 = j1 - l + 1; + int i2 = k1 - i1 + 1; + int[] aint = this.genBiomes.getInts(l, i1, l1, i2); + try + { + for (int j2 = 0; j2 < l1 * i2; j2++) + { + BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]); + if (!par4List.contains(biomegenbase)) { + return false; + } + } + return true; + } + catch (Throwable throwable) + { + CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); + CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer"); + crashreportcategory.addCrashSection("Layer", this.genBiomes.toString()); + crashreportcategory.addCrashSection("x", Integer.valueOf(x)); + crashreportcategory.addCrashSection("z", Integer.valueOf(y)); + crashreportcategory.addCrashSection("radius", Integer.valueOf(z)); + crashreportcategory.addCrashSection("allowed", par4List); + throw new ReportedException(crashreport); + } + } + + /** + * Finds a valid position within a range, that is in one of the listed + * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive + * y positions. + */ + @Override + @SuppressWarnings("rawtypes") + public ChunkPosition findBiomePosition(int p_150795_1_, int p_150795_2_, int p_150795_3_, List p_150795_4_, Random p_150795_5_) { + IntCache.resetIntCache(); + int l = p_150795_1_ - p_150795_3_ >> 2; + int i1 = p_150795_2_ - p_150795_3_ >> 2; + int j1 = p_150795_1_ + p_150795_3_ >> 2; + int k1 = p_150795_2_ + p_150795_3_ >> 2; + int l1 = j1 - l + 1; + int i2 = k1 - i1 + 1; + int[] aint = this.genBiomes.getInts(l, i1, l1, i2); + ChunkPosition chunkposition = null; + int j2 = 0; + for (int k2 = 0; k2 < l1 * i2; k2++) + { + int l2 = l + k2 % l1 << 2; + int i3 = i1 + k2 / l1 << 2; + BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]); + if ((p_150795_4_.contains(biomegenbase)) && ((chunkposition == null) || (p_150795_5_.nextInt(j2 + 1) == 0))) + { + chunkposition = new ChunkPosition(l2, 0, i3); + j2++; + } + } + return chunkposition; + } + + /** + * Calls the WorldChunkManager's biomeCache.cleanupCache() + */ + @Override + public void cleanupCache() { + this.biomeCache.cleanupCache(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java new file mode 100644 index 0000000000..93112bb30f --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldGenerator.java @@ -0,0 +1,142 @@ +package gtPlusPlus.australia.world; + +import cpw.mods.fml.common.IWorldGenerator; +import gtPlusPlus.api.interfaces.IGeneratorWorld; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.australia.GTplusplus_Australia; +import gtPlusPlus.australia.gen.map.MapGenExtendedVillage; +import gtPlusPlus.australia.gen.map.component.ComponentHut.WorldHandlerHut; +import gtPlusPlus.australia.gen.map.component.ComponentShack.WorldHandlerShack; +import gtPlusPlus.core.lib.CORE; + +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.IChunkProvider; + +public class AustraliaWorldGenerator implements IWorldGenerator { + private LinkedList structuresList = new LinkedList(); + //private final WorldHandlerCoven covenGen; + //private final WorldHandlerWickerMan wickerManGen; + private final WorldHandlerShack shackGen; + private final WorldHandlerHut hutGen; + private final List generators; + private int midX; + private int midZ; + int field_82665_g; + int field_82666_h = 8; + + public static final AutoMap SHACK_ALLOWED_BIOMES = new AutoMap(); + public static final AutoMap HUT_ALLOWED_BIOMES = new AutoMap(); + public static final AutoMap ALLOWED_BIOMES = new AutoMap(); + + public AustraliaWorldGenerator() { + + SHACK_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Plains_Biome.biomeID); + SHACK_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Forest_Biome.biomeID); + HUT_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Desert_Biome_3.biomeID); + HUT_ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Outback_Biome.biomeID); + + ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Plains_Biome.biomeID); + ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Forest_Biome.biomeID); + ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Desert_Biome_3.biomeID); + ALLOWED_BIOMES.put(GTplusplus_Australia.Australian_Outback_Biome.biomeID); + + + this.shackGen = new WorldHandlerShack(3); + this.hutGen = new WorldHandlerHut(5); + + //IGeneratorWorld goblinHut = new WorldHandlerClonedStructure(ComponentGoblinHut.class, 1.0D, 400, 7, 7, 7); + this.generators = Arrays + .asList(new IGeneratorWorld[] { this.shackGen, this.hutGen }); + + this.field_82665_g = (8 + Math.max(gtPlusPlus.core.util.math.MathUtils.randInt(/*Config.instance().worldGenFrequency*/32, 64), 1)); + + this.midX = 0; + this.midZ = 0; + for (IGeneratorWorld gen : this.generators) { + this.midX = Math.max(this.midX, gen.getExtentX() / 2); + this.midZ = Math.max(this.midZ, gen.getExtentZ() / 2); + } + } + + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, + IChunkProvider chunkProvider) { + if (world.provider.dimensionId == CORE.AUSTRALIA_ID) { + generateOverworld(world, world.rand, chunkX * 16, chunkZ * 16); + } + } + + private void generateOverworld(World world, Random random, int x, int z) { + boolean gen = false; + try { + if (ALLOWED_BIOMES.containsValue(Integer.valueOf(world.getBiomeGenForCoords(x + this.midX, z + this.midZ).biomeID))) { + Collections.shuffle(this.generators, random); + for (IGeneratorWorld generator : this.generators) { + boolean canGenerate = false; + + if (generator instanceof WorldHandlerShack) { + if (SHACK_ALLOWED_BIOMES.containsValue(Integer.valueOf(world.getBiomeGenForCoords(x + this.midX, z + this.midZ).biomeID))) { + canGenerate = true; + } + } + else if (generator instanceof WorldHandlerHut) { + if (HUT_ALLOWED_BIOMES.containsValue(Integer.valueOf(world.getBiomeGenForCoords(x + this.midX, z + this.midZ).biomeID))) { + canGenerate = true; + } + } + + if (canGenerate) { + //Logger.WORLD("Running World Generator on Australia."); + boolean a1, a2; + a1 = generator.generate(world, random, x, z); + a2 = nonInRange(world, x, z, generator.getRange()); + //Logger.INFO("A1: "+a1+" | A2: "+a2); + if (a1 && a2) { + this.structuresList.add(new ChunkCoordIntPair(x, z)); + gen = true; + //Logger.INFO("Generated a structure"); + break; + } + } + } + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + protected boolean nonInRange(World worldObj, int x, int z, int range) { + int par1 = x / 16; + int par2 = z / 16; + + int k = par1; + int l = par2; + if (par1 < 0) { + par1 -= this.field_82665_g - 1; + } + if (par2 < 0) { + par2 -= this.field_82665_g - 1; + } + int i1 = par1 / this.field_82665_g; + int j1 = par2 / this.field_82665_g; + Random random = worldObj.setRandomSeed(i1, j1, 10387312); + i1 *= this.field_82665_g; + j1 *= this.field_82665_g; + i1 += random.nextInt(this.field_82665_g - this.field_82666_h); + j1 += random.nextInt(this.field_82665_g - this.field_82666_h); + + return (k == i1) && (l == j1); + } + + public void initiate() { + this.structuresList.clear(); + } +} diff --git a/src/main/java/gtPlusPlus/australia/world/AustraliaWorldProvider.java b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldProvider.java new file mode 100644 index 0000000000..af1ca90cc9 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldProvider.java @@ -0,0 +1,80 @@ +package gtPlusPlus.australia.world; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.util.Vec3; +import net.minecraft.world.WorldProvider; +import net.minecraft.world.WorldType; +import net.minecraft.world.chunk.IChunkProvider; +import gtPlusPlus.australia.chunk.ChunkProviderAustralia; +import gtPlusPlus.australia.dimension.Dimension_Australia; + +public class AustraliaWorldProvider extends WorldProvider { + + @Override + public void registerWorldChunkManager() { + this.worldChunkMgr = new AustraliaWorldChunkManager(this.worldObj.getSeed(), WorldType.LARGE_BIOMES); + this.isHellWorld = false; + this.hasNoSky = false; + this.dimensionId = Dimension_Australia.DIMID; + } + + @Override + public float getSunBrightness(float par1) { + return (par1*2F); + } + + @Override + public float getStarBrightness(float par1) { + return (par1*5F); + } + + @SideOnly(Side.CLIENT) + public Vec3 getFogColor(float par1, float par2) + { + return Vec3.createVectorHelper(0.8D, 0.8D, 0.8D); + } + + @Override + public IChunkProvider createChunkGenerator() { + return new ChunkProviderAustralia(this.worldObj, this.worldObj.getSeed() - 15726L); + } + + public boolean isSurfaceWorld() + { + return true; + } + + public boolean canCoordinateBeSpawn(int par1, int par2) + { + return false; + } + + public boolean canRespawnHere() + { + return true; + } + + @SideOnly(Side.CLIENT) + public boolean doesXZShowFog(int par1, int par2) + { + return false; + } + + public String getDimensionName() + { + return "Australia"; + } + + protected void generateLightBrightnessTable() + { + float f = 0.5F; + for (int i = 0; i <= 15; i++) + { + float f1 = 1.0F - i / 15.0F; + this.lightBrightnessTable[i] = ((1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/australia/world/AustraliaWorldType.java b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldType.java new file mode 100644 index 0000000000..e8c8af4f76 --- /dev/null +++ b/src/main/java/gtPlusPlus/australia/world/AustraliaWorldType.java @@ -0,0 +1,59 @@ +package gtPlusPlus.australia.world; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.minecraft.world.WorldType; + +public class AustraliaWorldType extends WorldType{ + + public AustraliaWorldType(String name) { + super(name); + } + + public AustraliaWorldType(int p_i1959_1_, String p_i1959_2_){ + this("test"); + try { + //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); + Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); + m.setAccessible(true); + m.invoke(this, p_i1959_1_, p_i1959_2_, 0); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public AustraliaWorldType(int p_i1960_1_, String p_i1960_2_, int p_i1960_3_){ + this("test2"); + try { + //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); + Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); + m.setAccessible(true); + m.invoke(this, p_i1960_1_, p_i1960_2_, p_i1960_3_); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + private WorldType getMC(){ + try { + Constructor c = WorldType.class.getDeclaredConstructor(); + c.setAccessible(true); // solution + return c.newInstance(); + + // production code should handle these exceptions more gracefully + } catch (InvocationTargetException x) { + x.printStackTrace(); + } catch (NoSuchMethodException x) { + x.printStackTrace(); + } catch (InstantiationException x) { + x.printStackTrace(); + } catch (IllegalAccessException x) { + x.printStackTrace(); + } + return null; + } +} + diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java new file mode 100644 index 0000000000..b51915bb7b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java @@ -0,0 +1,162 @@ +package gtPlusPlus.core.block; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.general.BlockCompressedObsidian; +import gtPlusPlus.core.block.general.BlockNet; +import gtPlusPlus.core.block.general.BlockTankXpConverter; +import gtPlusPlus.core.block.general.FirePit; +import gtPlusPlus.core.block.general.FluidTankInfinite; +import gtPlusPlus.core.block.general.HellFire; +import gtPlusPlus.core.block.general.LightGlass; +import gtPlusPlus.core.block.general.MiningExplosives; +import gtPlusPlus.core.block.general.PlayerDoors; +import gtPlusPlus.core.block.general.antigrief.BlockWitherProof; +import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneDetector; +import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneTest; +import gtPlusPlus.core.block.machine.*; +import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; +import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; +import gtPlusPlus.core.fluids.FluidRegistryHandler; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraftforge.fluids.Fluid; + +public final class ModBlocks { + + public static Block blockRoundRobinator; + public static Block blockCircuitProgrammer; + public static Block blockVolumetricFlaskSetter; + public static Block blockFakeMiningPipe; + public static Block blockFakeMiningHead; + + public static Block blockFishTrap; + public static Block blockWorkbench; + public static Block blockWorkbenchAdvanced; + public static Block blockDecayablesChest; + public static Block blockEggBox; + + //Blocks + //public static Block blockBloodSteel; + //public static Block blockStaballoy; + // WIP TODO public static Block blockToolBuilder; + public static Block blockGriefSaver; + + public static Block blockCasingsMisc; + public static Block blockCasings2Misc; + public static Block blockCasings3Misc; + public static Block blockCasings4Misc; + public static Block blockCasings5Misc; + public static Block blockCasingsTieredGTPP; + public static Block blockSpecialMultiCasings; + public static Block blockCustomMachineCasings; + + public static Block blockMetaTileEntity; + public static Block blockHeliumGenerator; + public static Block blockNHG; + public static Block blockCharger; + + public static Block MatterFabricatorEffectBlock; + + public static Fluid fluidSludge = new Fluid("fluid.sludge"); + public static Block blockFluidSludge; + + public static Block blockFirePit; + + public static Block blockOreFluorite; + + public static Block blockMiningExplosive; + + public static Block blockHellfire; + public static Block blockInfiniteFLuidTank; + public static Block blockProjectTable; + public static Block blockTradeTable; + public static Block blockModularTable; + + public static Block blockWitherGuard; + public static Block blockXpConverter; + public static Block blockCompressedObsidian; + public static Block blockNet; + + public static Block blockPlayerDoorWooden; + public static Block blockPlayerDoorIron; + public static Block blockPlayerDoorCustom_Glass; + public static Block blockPlayerDoorCustom_Ice; + public static Block blockPlayerDoorCustom_Cactus; + + public static Block blockCustomMobSpawner; + public static Block blockCustomSuperLight; + public static Block blockCustomJukebox; + + public static Block blockPooCollector; + + public static Block blockPestKiller; + + public static void init() { + Logger.INFO("Initializing Blocks."); + //blockGriefSaver = new TowerDevice().setBlockName("blockGriefSaver").setCreativeTab(AddToCreativeTab.tabBlock).setBlockTextureName("blockDefault"); + + registerBlocks(); + } + + public static void registerBlocks(){ + + Logger.INFO("Registering Blocks."); + MatterFabricatorEffectBlock = new LightGlass(false); + + //Fluids + FluidRegistryHandler.registerFluids(); + + //Workbench + blockWorkbench = new Machine_Workbench().setHardness(1.5F); + blockWorkbenchAdvanced = new Machine_WorkbenchAdvanced().setHardness(2.5F); + blockHeliumGenerator = new HeliumGenerator(); + blockFirePit = new FirePit(); + blockFishTrap = new FishTrap(); + blockInfiniteFLuidTank = new FluidTankInfinite(); + //blockOreFluorite = new BlockBaseOre.oldOreBlock("oreFluorite", "Fluorite", Material.rock, BlockTypes.ORE, Utils.rgbtoHexValue(120, 120, 30), 3); + blockMiningExplosive = new MiningExplosives(); + blockHellfire = new HellFire(); + blockProjectTable = new Machine_ProjectTable(); + blockTradeTable = new Machine_TradeTable(); + blockModularTable = new Machine_ModularityTable(); + blockWitherGuard = new BlockWitherProof(); + blockXpConverter = new BlockTankXpConverter(); + blockCompressedObsidian = new BlockCompressedObsidian(); + blockNet = new BlockNet(); + + blockFakeMiningPipe = new Mining_Pipe_Fake(); + blockFakeMiningHead = new Mining_Head_Fake(); + + blockCircuitProgrammer = new CircuitProgrammer(); + + blockDecayablesChest = new DecayablesChest(); + blockEggBox = new EggBox(); + + blockPlayerDoorWooden = new PlayerDoors(Material.wood, "door_wood", true); + blockPlayerDoorIron = new PlayerDoors(Material.iron, "door_iron", true); + blockPlayerDoorCustom_Glass = new PlayerDoors(Material.glass, "door_glass", false); + blockPlayerDoorCustom_Ice = new PlayerDoors(Material.ice, "door_ice", false); + blockPlayerDoorCustom_Cactus = new PlayerDoors(Material.cactus, "door_cactus", false, 0.6f, Block.soundTypeGrass, "Cactus"); + + //blockCustomSuperLight = new BlockSuperLight(); + blockCustomJukebox = new Machine_SuperJukebox(); + + blockPooCollector = new Machine_PooCollector(); + + blockPestKiller = new Machine_PestKiller(); + + blockRoundRobinator = new Machine_RoundRobinator(); + + if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { + blockVolumetricFlaskSetter = new VolumetricFlaskSetter(); + } + + new BlockGenericRedstoneDetector(); + new BlockGenericRedstoneTest(); + + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java b/src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java new file mode 100644 index 0000000000..f63762a2d7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.block.base; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.core.lib.CORE; + +public class AdvancedBlock extends Block { + + protected AdvancedBlock(final String unlocalizedName, final Material material, final CreativeTabs x, final float blockHardness, final float blockResistance, final float blockLightLevel, + final String blockHarvestTool, final int blockHarvestLevel, final SoundType BlockSound) { + super(material); + this.setBlockName(unlocalizedName); + this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(x); + this.setHardness(blockHardness); //block Hardness + this.setResistance(blockResistance); + this.setLightLevel(blockLightLevel); + this.setHarvestLevel(blockHarvestTool, blockHarvestLevel); + this.setStepSound(BlockSound); + } + + @Override + public boolean onBlockActivated(final World p_149727_1_, final int p_149727_2_, final int p_149727_3_, final int p_149727_4_, final EntityPlayer p_149727_5_, final int p_149727_6_, final float p_149727_7_, final float p_149727_8_, final float p_149727_9_) + { + return false; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java b/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java new file mode 100644 index 0000000000..6014388cda --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/BasicBlock.java @@ -0,0 +1,81 @@ +package gtPlusPlus.core.block.base; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class BasicBlock extends BlockContainer { + + public BasicBlock(final String unlocalizedName, final Material material) { + this(BlockTypes.STANDARD, unlocalizedName, material, 2); + } + + public BasicBlock(final BlockTypes type, final String unlocalizedName, final Material material) { + this(type, unlocalizedName, material, 2); + } + + public BasicBlock(BlockTypes type, final String unlocalizedName, final Material material, final int harvestLevel) { + super(material); + this.setBlockName(Utils.sanitizeString(unlocalizedName)); + + if (type != BlockTypes.ORE && !unlocalizedName.toLowerCase().contains("ore")) { + this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); + } + + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setResistance(6.0F); + this.setLightLevel(0.0F); + this.setHardness(1.0f*harvestLevel); + this.setHarvestLevel("pickaxe", harvestLevel); + this.setStepSound(soundTypeMetal); + } + + + public static enum BlockTypes { + STANDARD("blockBlock", "pickaxe", soundTypeMetal), + FRAME("blockFrameGt", "wrench", soundTypeMetal), + ORE("blockStone", "pickaxe", soundTypeStone); + + private String TEXTURE_NAME; + private String HARVEST_TOOL; + private SoundType soundOfBlock; + private BlockTypes (final String textureName, final String harvestTool, final SoundType blockSound) + { + this.TEXTURE_NAME = textureName; + this.HARVEST_TOOL = harvestTool; + this.soundOfBlock = blockSound; + } + + public String getTexture() { + return this.TEXTURE_NAME; + } + + public String getHarvestTool(){ + return this.HARVEST_TOOL; + } + + public SoundType getBlockSoundType(){ + return this.soundOfBlock; + } + + } + + + @Override + public TileEntity createNewTileEntity(final World p_149915_1_, final int p_149915_2_) { + return null; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java b/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java new file mode 100644 index 0000000000..2bfd09d848 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/BasicTileBlockWithTooltip.java @@ -0,0 +1,328 @@ +package gtPlusPlus.core.block.base; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.CubicObject; +import gtPlusPlus.api.objects.minecraft.SafeTexture; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.InventoryUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public abstract class BasicTileBlockWithTooltip extends BlockContainer implements ITileTooltip { + + /** + * Each mapped object holds the data for the six sides. + */ + @SideOnly(Side.CLIENT) + private AutoMap> mSidedTextureArray; + + /** + * Holds the data for the six sides, each side holds an array of data for each respective meta. + */ + @SideOnly(Side.CLIENT) + private AutoMap> mSidedTexturePathArray; + + /** + * Does this block have any meta at all? + * @return + */ + public final boolean hasMeta() { + return getMetaCount() > 0; + } + + /** + * The amount of meta this block has. + * @return + */ + public abstract int getMetaCount(); + + /** + * Does this {@link Block} require special {@link ItemBlock} handling? + * @return The {@link Class} that will be used for this {@link Block}. + */ + public Class getItemBlockClass() { + return ItemBlock.class; + } + + /** + * A lazy way to declare the unlocal name for the block, makes boilerplating easy. + * @return The internal name for this block. + */ + public abstract String getUnlocalBlockName(); + + /** + * Does this Block have {@link ITileTooltip} support? + * @return {@link boolean} that represents if this block supports {@link ITileTooltip} or not. + */ + public final boolean hasTooltip() { + return getTooltipID() >= -1; + } + + /** + * Lazy Boilerplating. + * @return Block Hardness. + */ + protected abstract float initBlockHardness(); + + /** + * Lazy Boilerplating. + * @return Block Resistance. + */ + protected abstract float initBlockResistance(); + + /** + * Lazy Boilerplating. + * @return The {@link CreativeTab} this Block is shown on. + */ + protected abstract CreativeTabs initCreativeTab(); + + /** + * The ID used by the {@link ITileTooltip} handler. Return -1 if you are not providing a custom {@link ItemBlock} in {@link #getItemBlockClass}(). + * @return + */ + @Override + public abstract int getTooltipID(); + + public BasicTileBlockWithTooltip(Material aBlockMat){ + super(aBlockMat); + //Use Abstract method values + this.setHardness(initBlockHardness()); + this.setResistance(initBlockResistance()); + this.setBlockName(getUnlocalBlockName()); + this.setCreativeTab(initCreativeTab()); + // Register the block last. + GameRegistry.registerBlock(this, getItemBlockClass(), getUnlocalBlockName()); + Logger.INFO("Registered "+getTileEntityName()+"."); + if (Utils.isClient()) { + // Handle Textures + handleTextures(); + } + } + + /** + * The name of the Tile Entity. + * @return + */ + protected abstract String getTileEntityName(); + + /** + * The String used for texture pathing. + * @return Sanitized {@link String}, containing no spaces or illegal characters. + */ + private final String getTileEntityNameForTexturePathing() { + return Utils.sanitizeString(getTileEntityName().replace(" ", "")); + } + + /** + * An array of CubicObjects, one for each meta, else just a single cell array. + * Expected to be null regularly, as the default texture handling should suffice. + * Handy if re-using textures or using a non-standard structure for them. FULL texture path must be used, + * inclusive of the MODID and a colon. + * @return + */ + public CubicObject[] getCustomTextureDirectoryObject(){ + return null; + } + + @Override + @SideOnly(Side.CLIENT) + public final IIcon getIcon(final int aSide, final int aMeta) { + return mSidedTextureArray.get(aMeta).get(aSide).getIcon(); + } + + @Override + public IIcon getIcon(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + return super.getIcon(aWorld, aX, aY, aZ, aSide); + } + + @SideOnly(Side.CLIENT) + private final void handleTextures() { + + Logger.INFO("[TeTexture] Building Texture Maps for "+getTileEntityName()+"."); + + // Init on the Client side only, to prevent Field initialisers existing in the Server side bytecode. + mSidedTextureArray = new AutoMap>(); + mSidedTexturePathArray = new AutoMap>(); + + + //Store them in forge order + //DOWN, UP, NORTH, SOUTH, WEST, EAST + + // Default Path Name, this will make us look inside 'miscutils\textures\blocks' + final String aPrefixTexPath = CORE.MODID + ":"; + // Default Path Name, this will make us look in the sub-directory for this Tile Entity. + final String aTexPathMid = "TileEntities"+CORE.SEPERATOR+getTileEntityNameForTexturePathing()+CORE.SEPERATOR; + // Construct a full path + String aTexPathBuilt = aPrefixTexPath + aTexPathMid; + // File Name Suffixes, without meta tags + String aStringBot; + String aStringTop; + String aStringBack; + String aStringFront; + String aStringLeft; + String aStringRight; + // Do we provide a matrix of custom data to be used for texture processing instead? + if (getCustomTextureDirectoryObject() != null) { + // Get custom provided texture data. + CubicObject[] aDataMap = getCustomTextureDirectoryObject(); + Logger.INFO("[TeTexture] Found custom texture data, using this instead. Size: "+aDataMap.length); + // Map each meta string data to the main map. + for (int i=0;i aMetaBlob = new CubicObject(aStringBot, aStringTop, aStringBack, aStringFront, aStringLeft, aStringRight); + mSidedTexturePathArray.put(aMetaBlob); + Logger.INFO("[TeTexture] Added Texture Path data to map for meta "+i); + } + } + Logger.INFO("[TeTexture] Map size for pathing: "+mSidedTexturePathArray.size()); + + // Iteration Index + int aIndex = 0; + + // Iterate each CubicObject, holding the six texture paths for each meta. + for (CubicObject aMetaBlob : mSidedTexturePathArray) { + // Make a Safe Texture for each side + SafeTexture aBottom = SafeTexture.register(aMetaBlob.DOWN); + SafeTexture aTop = SafeTexture.register(aMetaBlob.UP); + SafeTexture aBack = SafeTexture.register(aMetaBlob.NORTH); + SafeTexture aFont = SafeTexture.register(aMetaBlob.SOUTH); + SafeTexture aWest = SafeTexture.register(aMetaBlob.WEST); + SafeTexture aEast = SafeTexture.register(aMetaBlob.EAST); + // Store them in an Array + SafeTexture[] aInjectBlob = new SafeTexture[] { + aBottom, + aTop, + aBack, + aFont, + aWest, + aEast + }; + // Convenience Blob + CubicObject aMetaBlob2 = new CubicObject(aInjectBlob); + // Store this Blob into + mSidedTextureArray.put(aMetaBlob2); + Logger.INFO("[TeTexture] Added SafeTexture data to map for meta "+(aIndex++)); + } + Logger.INFO("[TeTexture] Map size for registration: "+mSidedTextureArray.size()); + + + } + + @Override + @SideOnly(Side.CLIENT) + public final void registerBlockIcons(final IIconRegister aRegisterer){ + this.blockIcon = aRegisterer.registerIcon(CORE.MODID + ":" + "net"); + } + + @Override + public abstract TileEntity createNewTileEntity(final World world, final int p_149915_2_); + + /** + * Called when {@link #breakBlock}() is called, but before {@link InventoryUtils#dropInventoryItems} and the super call. + */ + public void onBlockBreak() { + + } + + @Override + public final void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { + onBlockBreak(); + InventoryUtils.dropInventoryItems(world, x, y, z, block); + super.breakBlock(world, x, y, z, block, number); + } + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public final void getSubBlocks(Item aItem, CreativeTabs p_149666_2_, List aList) { + if (hasMeta()) { + for (int i=0;i getDrops(World world, int x, int y, int z, int metadata, int fortune){ + ArrayList drops = new ArrayList(); + drops.add(ItemUtils.simpleMetaStack(this, metadata, 1)); + return drops; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java new file mode 100644 index 0000000000..db37e18a32 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseFluid.java @@ -0,0 +1,103 @@ +package gtPlusPlus.core.block.base; + +import java.util.Random; + +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import gtPlusPlus.core.client.renderer.particle.EntityDropParticleFX; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; + +public class BlockBaseFluid extends BlockFluidClassic { + + private final String name; + private final IIcon textureArray[] = new IIcon[6]; + + protected float particleRed = 1.0F; + protected float particleGreen = 1.0F; + protected float particleBlue = 1.0F; + + public BlockBaseFluid(String materialName, Fluid fluid, Material material) { + super(fluid, material); + this.setLightOpacity(2); + this.name = Utils.sanitizeString(materialName); + this.setBlockName("fluid"+this.name); + this.setCreativeTab(AddToCreativeTab.tabBlock); + GameRegistry.registerBlock(this, ItemBlockMeta.class, "fluid"+this.name); + } + + public BlockFluidClassic setParticleColor(int arg0) { + return this.setParticleColor((arg0 >> 16 & 255) / 255.0F, (arg0 >> 8 & 255) / 255.0F, + (arg0 >> 0 & 255) / 255.0F); + } + + public BlockFluidClassic setParticleColor(float arg0, float arg1, float arg2) { + this.particleRed = arg0; + this.particleGreen = arg1; + this.particleBlue = arg2; + return this; + } + + @Override + public boolean canCreatureSpawn(EnumCreatureType arg0, IBlockAccess arg1, int arg2, int arg3, int arg4) { + return false; + } + + public boolean preInit() { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return side <= 1 ? this.textureArray[0] : this.textureArray[1]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iicon) { + this.textureArray[0] = iicon.registerIcon(CORE.MODID + ":" + "fluid/" + "Fluid_" + this.name + "_Still"); + this.textureArray[1] = iicon.registerIcon(CORE.MODID + ":" + "fluid/" + "Fluid_" + this.name + "_Flow"); + //IconRegistry.addIcon("Fluid" + this.name, this.modName + ":fluid/Fluid_" + this.name + "_Still", arg0); + //IconRegistry.addIcon("Fluid" + this.name + "1", this.modName + ":fluid/Fluid_" + this.name + "_Flow", arg0); + } + + @Override + @Optional.Method(modid = "CoFHCore") + @SideOnly(Side.CLIENT) + public void randomDisplayTick(World arg0, int arg1, int arg2, int arg3, Random arg4) { + super.randomDisplayTick(arg0, arg1, arg2, arg3, arg4); + double arg5 = arg1 + arg4.nextFloat(); + double arg7 = arg2 - 1.05D; + double arg9 = arg3 + arg4.nextFloat(); + if (super.density < 0) { + arg7 = arg2 + 2.1D; + } + + if (arg4.nextInt(20) == 0 + && arg0.isSideSolid(arg1, arg2 + super.densityDir, arg3, + super.densityDir == -1 ? ForgeDirection.UP : ForgeDirection.DOWN) + && !arg0.getBlock(arg1, arg2 + 2 * super.densityDir, arg3).getMaterial().blocksMovement()) { + EntityDropParticleFX arg11 = new EntityDropParticleFX(arg0, arg5, arg7, arg9, this.particleRed, + this.particleGreen, this.particleBlue, super.densityDir); + FMLClientHandler.instance().getClient().effectRenderer.addEffect(arg11); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java new file mode 100644 index 0000000000..c0113e869b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseModular.java @@ -0,0 +1,211 @@ +package gtPlusPlus.core.block.base; + +import java.util.HashMap; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TextureSet; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock; +import gtPlusPlus.core.item.base.itemblock.ItemBlockGtFrameBox; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BlockBaseModular extends BasicBlock { + + protected Material blockMaterial; + + protected int blockColour; + protected BlockTypes thisBlock; + protected String thisBlockMaterial; + protected final String thisBlockType; + + public BlockBaseModular(final Material material, final BlockTypes blockType) { + this(material, blockType, material.getRgbAsHex()); + } + + public BlockBaseModular(final Material material, final BlockTypes blockType, final int colour) { + this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, + blockType, colour, Math.min(Math.max(material.vTier, 1), 6)); + blockMaterial = material; + registerComponent(); + } + + protected BlockBaseModular(final String unlocalizedName, final String blockMaterial, + final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, + final int miningLevel) { + super(blockType, unlocalizedName, vanillaMaterial, miningLevel); + this.setHarvestLevel(blockType.getHarvestTool(), miningLevel); + this.setBlockTextureName(CORE.MODID + ":" + blockType.getTexture()); + this.blockColour = colour; + this.thisBlock = blockType; + this.thisBlockMaterial = blockMaterial; + this.thisBlockType = blockType.name().toUpperCase(); + this.setBlockName(this.GetProperName()); + int fx = getBlockTypeMeta(); + if (fx == 0) { + GameRegistry.registerBlock(this, ItemBlockGtBlock.class, + Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); + GT_OreDictUnificator.registerOre( + "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") + .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), + ItemUtils.getSimpleStack(this)); + } + else if (fx == 1) { + GameRegistry.registerBlock(this, ItemBlockGtBlock.class, + Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); + GT_OreDictUnificator.registerOre( + "frameGt" + getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "") + .replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), + ItemUtils.getSimpleStack(this)); + } + else if (fx == 2) { + GameRegistry.registerBlock(this, ItemBlockGtBlock.class, + Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); + GT_OreDictUnificator.registerOre( + "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") + .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), + ItemUtils.getSimpleStack(this)); + } + } + + public boolean registerComponent() { + Logger.MATERIALS("Attempting to register "+this.getUnlocalizedName()+"."); + if (this.blockMaterial == null) { + Logger.MATERIALS("Tried to register "+this.getUnlocalizedName()+" but the material was null."); + return false; + } + String aName = blockMaterial.getUnlocalizedName(); + //Register Component + Map aMap = Material.mComponentMap.get(aName); + if (aMap == null) { + aMap = new HashMap(); + } + int fx = getBlockTypeMeta(); + String aKey = (fx == 0 ? OrePrefixes.block.name() : ( fx == 1 ? OrePrefixes.frameGt.name() : OrePrefixes.ore.name())); + ItemStack x = aMap.get(aKey); + if (x == null) { + aMap.put(aKey, ItemUtils.getSimpleStack(this)); + Logger.MATERIALS("Registering a material component. Item: ["+aName+"] Map: ["+aKey+"]"); + Material.mComponentMap.put(aName, aMap); + return true; + } + else { + //Bad + Logger.MATERIALS("Tried to double register a material component."); + return false; + } + } + + public int getBlockTypeMeta() { + if (this.thisBlockType.equals(BlockTypes.STANDARD.name().toUpperCase())) { + return 0; + } + else if (this.thisBlockType.equals(BlockTypes.FRAME.name().toUpperCase())) { + return 1; + } + else if (this.thisBlockType.equals(BlockTypes.ORE.name().toUpperCase())) { + return 2; + } + return 0; + } + + /** + * Returns which pass should this block be rendered on. 0 for solids and 1 + * for alpha + */ + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + if (this.thisBlock == BlockTypes.FRAME) { + return 1; + } + return 0; + } + + public String GetProperName() { + String tempIngot; + if (this.thisBlock == BlockTypes.STANDARD) { + tempIngot = "Block of " + this.thisBlockMaterial; + } + else if (this.thisBlock == BlockTypes.FRAME) { + tempIngot = this.thisBlockMaterial + " Frame Box"; + } + else if (this.thisBlock == BlockTypes.ORE) { + tempIngot = this.thisBlockMaterial + " Ore [Old]"; + } + else { + + tempIngot = this.getUnlocalizedName().replace("tile.blockGt", "ingot"); + } + return tempIngot; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + public Material getMaterialEx(){ + return this.blockMaterial; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon) { + if (!CORE.ConfigSwitches.useGregtechTextures || this.blockMaterial == null || this.thisBlock == BlockTypes.ORE){ + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture()); + } + String metType = "9j4852jyo3rjmh3owlhw9oe"; + if (this.blockMaterial != null) { + TextureSet u = this.blockMaterial.getTextureSet(); + if (u != null) { + metType = u.mSetName; + } + } + metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType); + int tier = blockMaterial != null ? this.blockMaterial.vTier : 0; + String aType = (this.thisBlock == BlockTypes.FRAME) ? "frameGt" : (tier <= 4 ? "block1" : "block5"); + this.blockIcon = iIcon.registerIcon("gregtech" + ":" + "materialicons/"+ metType +"/" + aType); + } + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) { + + if (this.blockColour == 0) { + return MathUtils.generateSingularRandomHexValue(); + } + + return this.blockColour; + } + + @Override + public int getRenderColor(final int aMeta) { + if (this.blockColour == 0) { + return MathUtils.generateSingularRandomHexValue(); + } + + return this.blockColour; + } + + @Override + public int getBlockColor() { + if (this.blockColour == 0) { + return MathUtils.generateSingularRandomHexValue(); + } + + return this.blockColour; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseNBT.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseNBT.java new file mode 100644 index 0000000000..e4dff82ec4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseNBT.java @@ -0,0 +1,81 @@ +package gtPlusPlus.core.block.base; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockNBT; + +public abstract class BlockBaseNBT extends BlockContainer +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + @SuppressWarnings("deprecation") + public BlockBaseNBT(final Material material, final String unlocalName, final String displayName){ + super(material); + this.setBlockName(unlocalName); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockNBT.class, unlocalName); + //LanguageRegistry.addName(this, displayName); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_){ + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + public abstract TileEntity createNewTileEntity(final World world, final int p_149915_2_); + + @Override + public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int meta) { + super.breakBlock(world, x, y, z, block, meta); + } + + @Override + public void onBlockDestroyedByPlayer(final World world, final int x, final int y, final int z, final int meta) { + super.onBlockDestroyedByPlayer(world, x, y, z, meta); + } + + @Override + public void onBlockDestroyedByExplosion(final World world, final int x, final int y, final int z, final Explosion explosion) { + super.onBlockDestroyedByExplosion(world, x, y, z, explosion); + } + + @Override + public void onBlockHarvested(final World world, final int x, final int y, final int z, final int meta, final EntityPlayer player) { + super.onBlockHarvested(world, x, y, z, meta, player); + } + + @Override + public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion) { + super.onBlockExploded(world, x, y, z, explosion); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java new file mode 100644 index 0000000000..e1bc3462be --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -0,0 +1,229 @@ +package gtPlusPlus.core.block.base; + +import java.lang.reflect.Field; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.interfaces.ITexturedBlock; +import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer; +import gtPlusPlus.core.item.base.itemblock.ItemBlockOre; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class BlockBaseOre extends BasicBlock implements ITexturedBlock { + + private final Material blockMaterial; + + public BlockBaseOre(final Material material, final BlockTypes blockType, final int colour) { + super(blockType, Utils.sanitizeString(material.getUnlocalizedName()), net.minecraft.block.material.Material.rock, Math.min(Math.max(material.vTier, 1), 6)); + int aMaterialTierForMining = Math.min(Math.max(material.vTier, 1), 6); + this.blockMaterial = material; + this.setHardness(1.0f*aMaterialTierForMining); + this.setResistance(6.0F); + this.setLightLevel(0.0F); + this.setHarvestLevel("pickaxe", aMaterialTierForMining); + this.setStepSound(soundTypeStone); + this.setBlockName("Ore"+Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName()))); + this.setBlockTextureName("stone"); + try { + GameRegistry.registerBlock(this, ItemBlockOre.class, Utils.sanitizeString("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()))); + GT_OreDictUnificator.registerOre("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()), ItemUtils.getSimpleStack(this)); + } + catch (Throwable t){ + t.printStackTrace(); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + public Material getMaterialEx(){ + return this.blockMaterial; + } + + @Override + public int getRenderType() { + try { + if (CustomOreBlockRenderer.INSTANCE != null){ + return CustomOreBlockRenderer.INSTANCE.mRenderID; + } + return super.getRenderType(); + } + catch (NullPointerException n) { + return 0; + } + } + + @Override + public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { + return Blocks.stone.getIcon(0, 0); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + return Blocks.stone.getIcon(0, 0); + } + + /** + * GT Texture Handler + */ + + //.08 compat + public static IIconContainer[] hiddenTextureArray; + public ITexture[] getTexture(byte arg0) { + return getTexture(null, arg0); + } + + public ITexture[] getTexture(Block block, byte side) { + if (this.blockMaterial != null){ + GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); + if (aIconSet != null){ + return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; + } + } + + if (hiddenTextureArray == null){ + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + hiddenTextureArray = Textures.BlockIcons.GRANITES; + } + else { + try { + Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES"); + if (o != null){ + hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); + } + if (hiddenTextureArray == null){ + hiddenTextureArray = new IIconContainer[6]; + } + } + catch (IllegalArgumentException | IllegalAccessException e) { + hiddenTextureArray = new IIconContainer[6]; + } + } + } + return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; + } + + @Override + public void registerBlockIcons(IIconRegister p_149651_1_) { + + } + + public static class oldOreBlock extends BlockBaseModular implements ITexturedBlock{ + + public oldOreBlock(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) { + this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2); + } + + public oldOreBlock(final String unlocalizedName, final String blockMaterial, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) { + super(unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel); + } + + /*@Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon) + { + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture()); + //this.base = iIcon.registerIcon(CORE.MODID + ":" + "blockStone"); + //this.overlay = iIcon.registerIcon(CORE.MODID + ":" + "blockOre_Overlay"); + } + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + if (this.blockColour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.blockColour; + } + + @Override + public int getRenderColor(final int aMeta) { + if (this.blockColour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.blockColour; + }*/ + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public int getRenderType() { + if (CustomOreBlockRenderer.INSTANCE != null){ + return CustomOreBlockRenderer.INSTANCE.mRenderID; + } + return super.getRenderType(); + } + + @Override + public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { + return Blocks.stone.getIcon(0, 0); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + return Blocks.stone.getIcon(0, 0); + } + + /** + * GT Texture Handler + */ + + //.08 compat + IIconContainer[] hiddenTextureArray; + public ITexture[] getTexture(byte arg0) { + return getTexture(null, arg0); + } + + public ITexture[] getTexture(Block block, byte side) { + if (this.blockMaterial != null){ + GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); + if (aIconSet != null){ + return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; + } + } + + if (hiddenTextureArray == null){ + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + hiddenTextureArray = Textures.BlockIcons.GRANITES; + } + else { + try { + Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES"); + if (o != null){ + hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); + } + if (hiddenTextureArray == null){ + hiddenTextureArray = new IIconContainer[6]; + } + } + catch (IllegalArgumentException | IllegalAccessException e) { + hiddenTextureArray = new IIconContainer[6]; + } + } + } + return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/base/MetaBlock.java b/src/main/java/gtPlusPlus/core/block/base/MetaBlock.java new file mode 100644 index 0000000000..880bb3a597 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/MetaBlock.java @@ -0,0 +1,35 @@ +package gtPlusPlus.core.block.base; + +import java.util.List; + +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; + +public class MetaBlock extends MultiTextureBlock { + + protected MetaBlock(final String unlocalizedName, final Material material, final SoundType soundType) { + super(unlocalizedName, material, soundType); + } + + @Override + public int damageDropped(final int meta) { + return meta; + } + + @Override + public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { + for (int i = 0; i < 6; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java b/src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java new file mode 100644 index 0000000000..a04bf841ba --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.block.base; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class MultiTextureBlock extends Block { + + public IIcon[] icons = new IIcon[6]; + + protected MultiTextureBlock(final String unlocalizedName, final Material material, final SoundType blockSound) + { + super(material); + this.setBlockName(unlocalizedName); + this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setHardness(2.0F); + this.setResistance(6.0F); + this.setStepSound(blockSound); + } + + @Override + public void registerBlockIcons(final IIconRegister reg) { + for (int i = 0; i < 6; i ++) { + this.icons[i] = reg.registerIcon(this.textureName + "_" + i); + } + } + + @Override + public IIcon getIcon(final int side, final int meta) { + return this.icons[side]; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java new file mode 100644 index 0000000000..03ca846b7d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java @@ -0,0 +1,94 @@ +package gtPlusPlus.core.block.general; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockObsidian; +import net.minecraft.block.material.MapColor; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; +import gtPlusPlus.core.lib.CORE; + +public class BlockCompressedObsidian extends BlockObsidian { + + private final IIcon textureArray[] = new IIcon[6]; + + public BlockCompressedObsidian() { + this.setBlockName("blockCompressedObsidian"); + this.setHardness(50.0F); + this.setResistance(2000.0F); + this.setStepSound(soundTypePiston); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockMeta.class, "blockCompressedObsidian"); + } + + @Override + public MapColor getMapColor(final int meta) { + if (meta != 5) { + return MapColor.obsidianColor; + } + else { + return MapColor.sandColor; + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iicon) { + this.textureArray[0] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian1"); + this.textureArray[1] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian2"); + this.textureArray[2] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian3"); + this.textureArray[3] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian4"); + this.textureArray[4] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian5"); + this.textureArray[5] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian_invert"); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int side, final int meta) { + return this.textureArray[meta]; + } + + @Override + public int damageDropped(final int damage) { + return damage; + } + + @Override + public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { + for (int i = 0; i < 6; i++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public Item getItemDropped(final int meta, final Random rand, final int fortune) { + return Item.getItemFromBlock(this); + } + + @Override + public ArrayList getDrops(final World world, final int x, final int y, final int z, final int metadata, + final int fortune) { + int m = metadata; + if (m == 5) { + m = 1; + } + return super.getDrops(world, x, y, z, m, fortune); + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockNet.java b/src/main/java/gtPlusPlus/core/block/general/BlockNet.java new file mode 100644 index 0000000000..1f0f145392 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/BlockNet.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.block.general; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockWeb; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; + +public class BlockNet extends BlockWeb{ + + public BlockNet(){ + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setLightOpacity(1); + this.setHardness(4.0F); + this.setBlockName("blockNet"); + GameRegistry.registerBlock(this, "blockNet"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon){ + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "net"); + } + + @Override + public Item getItemDropped(final int p_149650_1_, final Random p_149650_2_, final int p_149650_3_){ + return ModItems.itemRope; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java new file mode 100644 index 0000000000..a1ba3be487 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java @@ -0,0 +1,220 @@ +package gtPlusPlus.core.block.general; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class BlockSuperLight extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + //propecia (Inhibit DHD - recover hair get depression) + + public BlockSuperLight() { + super(Material.circuits); + this.setBlockName("blockSuperLight"); + this.setCreativeTab(CreativeTabs.tabRedstone); + GameRegistry.registerBlock(this, "blockSuperLight"); + LanguageRegistry.addName(this, "Shining Star"); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { + return this.blockIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlBigBlue"); + } + + /** + * Returns a new instance of a block's tile entity class. Called on placing the + * block. + */ + public TileEntity createNewTileEntity(World aWorld, int p_149915_2_) { + return new TileEntitySuperLight(); + } + + public static class TileEntitySuperLight extends TileEntity { + + private long mCreated; + + private long mLastUpdateTick = 0; + + private int mLitBlockCount = 0; + + private int[][][][] aLitBlocks = new int[50][10][50][1]; + + private boolean mPowered = false; + + public TileEntitySuperLight() { + mCreated = System.currentTimeMillis(); + Logger.INFO("Created Super-Lamp"); + } + + public void readFromNBT(NBTTagCompound aNBT) { + super.readFromNBT(aNBT); + mCreated = aNBT.getLong("mCreated"); + mPowered = aNBT.getBoolean("mPowered"); + NBTTagCompound aLightingData = aNBT.getCompoundTag("lighting"); + for (int x = 0; x < 50; x++) { + for (int y = 0; y < 10; y++) { + for (int z = 0; z < 50; z++) { + int aData = aLightingData.getInteger("["+x+"]["+y+"]["+z+"]"); + aLitBlocks[x][y][z][0] = aData; + } + } + } + } + + public void writeToNBT(NBTTagCompound aNBT) { + super.writeToNBT(aNBT); + aNBT.setLong("mCreated", mCreated); + aNBT.setBoolean("mPowered", mPowered); + NBTTagCompound aLightingData = new NBTTagCompound(); + for (int x = 0; x < 50; x++) { + for (int y = 0; y < 10; y++) { + for (int z = 0; z < 50; z++) { + int aFlag = aLitBlocks[x][y][z][0]; + aLightingData.setInteger("["+x+"]["+y+"]["+z+"]", aFlag); + } + } + } + aNBT.setTag("lighting", aLightingData); + } + + @Override + public void updateEntity() { + super.updateEntity(); + + if (this.worldObj.isRemote) { + return; + } + + try { + if (mLastUpdateTick == 0 || (System.currentTimeMillis() - mLastUpdateTick) >= 30000) { + boolean powered = (this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord)); + boolean aLastState = mPowered; + //Logger.INFO("Powered: "+powered); + mPowered = powered; + if (mPowered != aLastState) { + updateLighting(powered); + } + } + } catch (Throwable t) { + } + } + + @Override + public void markDirty() { + super.markDirty(); + } + + @Override + public boolean canUpdate() { + return super.canUpdate(); + } + + public void updateLighting(boolean enable) { + + + mLastUpdateTick = System.currentTimeMillis(); + + if (false) { + return; + } + + aLitBlocks = new int[50][10][50][1]; + int aLitCounter = 0; + AutoMap aBlocksToUpdate = new AutoMap(); + Logger.INFO("Trying to relight area."); + + BlockPos aStartIterationPoint = new BlockPos(this.xCoord-24, this.yCoord-4, this.zCoord-24, this.worldObj); + for (int x = 0; x < 50; x++) { + for (int y = 0; y < 10; y++) { + for (int z = 0; z < 50; z++) { + int xOff = aStartIterationPoint.xPos + x; + int yOff = aStartIterationPoint.yPos + y; + int zOff = aStartIterationPoint.zPos + z; + Block aBlockGet = this.worldObj.getBlock(xOff, yOff, zOff); + if (aBlockGet != null) { + if (aBlockGet instanceof BlockAir || aBlockGet instanceof LightGlass) { + + int aLight = aBlockGet.getLightValue(); + + //Don't Need to relight anything. + if ((enable && aLight > 0) || (!enable && aLight == 0)) { + continue; + } + //Turning Lights on + else if (enable && aLight == 0) { + aBlocksToUpdate.put(new BlockPos(xOff, yOff, zOff, this.worldObj)); + if (aBlockGet instanceof BlockAir) { + Logger.INFO("Lit air."); + this.worldObj.setBlock(xOff, yOff, zOff, ModBlocks.MatterFabricatorEffectBlock, 0, 3); + } + //aBlockGet.setLightLevel(15); + aLitCounter++; + } + //Turning Lights off + else if (!enable && aLight > 0) { + aBlocksToUpdate.put(new BlockPos(xOff, yOff, zOff, this.worldObj)); + if (aBlockGet instanceof LightGlass) { + Logger.INFO("Dimmed air."); + this.worldObj.setBlock(xOff, yOff, zOff, Blocks.air, 0, 3); + } + //aBlockGet.setLightLevel(0); + } + aLitBlocks[x][y][z][0] = enable ? 15 : 0; + } + else { + aLitBlocks[x][y][z][0] = -1; + } + } + else { + aLitBlocks[x][y][z][0] = -1; + } + } + } + } + mLitBlockCount = aLitCounter; + doLargeBlockUpdate(aBlocksToUpdate); + } + + public void doLargeBlockUpdate(AutoMap aUpdateMap) { + if (aUpdateMap.isEmpty()) { + return; + } + for (BlockPos p : aUpdateMap) { + //this.worldObj.markBlockForUpdate(p.xPos, p.yPos, p.zPos); + //this.worldObj.markBlocksDirtyVertical(p_72975_1_, p_72975_2_, p_72975_3_, p_72975_4_); + } + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java b/src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java new file mode 100644 index 0000000000..f7f0b446ce --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java @@ -0,0 +1,192 @@ +package gtPlusPlus.core.block.general; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockEntityBase; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockTankXpConverter extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + @SuppressWarnings("deprecation") + public BlockTankXpConverter() { + super(Material.iron); + this.setBlockName("blockTankXpConverter"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockEntityBase.class, "blockTankXpConverter"); + LanguageRegistry.addName(this, "Xp Converter"); + this.generateRainbowMap(); + if (!this.getTickRandomly()) { + this.setTickRandomly(true); + } + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { + return p_149691_1_ == 1 ? this.textureTop + : (p_149691_1_ == 0 ? this.textureBottom + : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlGray"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, + final int side, final float lx, final float ly, final float lz) { + + return true; + + /* + if (world.isRemote) { + return true; + } + else { + boolean mDidScrewDriver = false; + // Check For Screwdriver + try { + final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); + final Item mHandItem = mHandStack.getItem(); + if (((mHandItem instanceof GT_MetaGenerated_Tool_01) + && ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { + final TileEntityXpConverter tile = (TileEntityXpConverter) world.getTileEntity(x, y, z); + if (tile != null) { + mDidScrewDriver = true; + tile.onScrewdriverRightClick((byte) side, player, x, y, z); + } + + } + } + catch (final Throwable t) { + mDidScrewDriver = false; + } + + if (!mDidScrewDriver) { + + try { + final TileEntityXpConverter tile = (TileEntityXpConverter) world.getTileEntity(x, y, z); + if (tile != null) { + tile.onRightClick((byte) side, player, x, y, z); + } + } + catch (final Throwable t) { + } + + final TileEntityXpConverter tank = (TileEntityXpConverter) world.getTileEntity(x, y, z); + if (tank != null) { + if (tank.tankEssence.getFluid() != null) { + PlayerUtils.messagePlayer(player, "This tank contains " + tank.tankEssence.getFluidAmount() + + "L of " + tank.tankEssence.getFluid().getLocalizedName()); + } + if (tank.tankLiquidXp.getFluid() != null) { + PlayerUtils.messagePlayer(player, "This tank contains " + tank.tankLiquidXp.getFluidAmount() + + "L of " + tank.tankLiquidXp.getFluid().getLocalizedName()); + } + if ((tank.tankEssence.getFluid() != null) && (tank.tankLiquidXp.getFluid() != null)) { + PlayerUtils.messagePlayer(player, "This is worth " + + EnchantingUtils.getLevelForLiquid(tank.tankLiquidXp.getFluidAmount()) + " levels."); + } + } + } + } + return true; + */} + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + //return new TileEntityXpConverter(); + return null; + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, + final int z) { + return false; + } + + private final boolean generateRainbowMap() { + return true; + } + + @Override + public int getBlockColor() { + return super.getBlockColor(); + } + + @Override + public int colorMultiplier(final IBlockAccess p_149720_1_, final int p_149720_2_, final int p_149720_3_, + final int p_149720_4_) { + return super.colorMultiplier(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_); + } + + @Override + public void updateTick(final World world, final int x, final int y, final int z, final Random rand) { + // this.mRainbowTick++; + super.updateTick(world, x, y, z, rand); + } + + @Override + public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random rand) { + //this.mRainbowTick++; + super.randomDisplayTick(world, x, y, z, rand); + } + + @Override + public int tickRate(final World p_149738_1_) { + return 20; + } + + @Override + public int getLightValue() { + return 6; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/FirePit.java b/src/main/java/gtPlusPlus/core/block/general/FirePit.java new file mode 100644 index 0000000000..6f35715c48 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/FirePit.java @@ -0,0 +1,230 @@ +package gtPlusPlus.core.block.general; + +import static net.minecraftforge.common.util.ForgeDirection.*; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.core.block.base.BasicBlock; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.tileentities.general.TileEntityFirepit; +import net.minecraftforge.common.util.ForgeDirection; + +public class FirePit extends BasicBlock{ + private static IIcon[] TEXTURE; + public static final int META_ANTIBUILDER = 2; + private int meta; + + @SuppressWarnings("deprecation") + public FirePit() { + super("blockFirePit", Material.wood); + this.setBlockName("blockFirePit"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setHardness(10.0F); + this.setResistance(35.0F); + this.setStepSound(Block.soundTypeWood); + GameRegistry.registerBlock(this, "blockFirePit"); + LanguageRegistry.addName(this, "Fire Pit"); + } + + @Override + public int tickRate(final World aParWorld) { + return 30; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int i) { + return new TileEntityFirepit(); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister par1IconRegister){ + TEXTURE = new IIcon[] {par1IconRegister.registerIcon(this.getTextureName() + "_layer_0"), par1IconRegister.registerIcon(this.getTextureName() + "_layer_1")}; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void getSubBlocks(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List){ + par3List.add(new ItemStack(par1, 1, 2)); + } + + @Override + public void updateTick(final World par1World, final int x, final int y, final int z, final Random par5Random){ + if (!par1World.isRemote){ + //Sets meta. + this.meta = par1World.getBlockMetadata(x, y, z); + //If Raining, Put out. + if (par1World.isRaining() + && (par1World.canLightningStrikeAt(x, y, z) + || par1World.canLightningStrikeAt(x - 1, y, z) + || par1World.canLightningStrikeAt(x + 1, y, z) + || par1World.canLightningStrikeAt(x, y, z - 1) + || par1World.canLightningStrikeAt(x, y, z + 1))){ + //Fire goes out + par1World.setBlockMetadataWithNotify(x, y, z, 1, 4); + } + if (isNeighborBurning(par1World, x, y, z)){ + //Fire can ignite from a nearby flame source. + par1World.setBlockMetadataWithNotify(x, y, z, 2, 4); + } + } + } + + @Override + public Item getItemDropped(final int meta, final Random par2Random, final int par3){ + switch (meta){ + case 0: + return null; + default: + break; + } + return Item.getItemFromBlock(this); + } + + @Override + public int damageDropped(final int meta){ + return meta; + } + + @Override + public boolean isOpaqueCube(){ + return false; + } + + @Override + public int getRenderType(){ + return -1; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass(){ + return 1; + } + + @Override + public boolean renderAsNormalBlock(){ + return false; + } + + /*@Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aParWorld, int x, int y, int z){ + return null; + }*/ + + @Override + protected boolean canSilkHarvest(){ + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(final World p_149734_1_, final int p_149734_2_, final int p_149734_3_, final int p_149734_4_, final Random p_149734_5_){ + int l; + float f; + float f1; + float f2; + if (this.meta == 2) { + if (p_149734_5_.nextInt(24) == 0){ + p_149734_1_.playSound(p_149734_2_ + 0.5F, p_149734_3_ + 0.5F, p_149734_4_ + 0.5F, "fire.fire", 1.0F + p_149734_5_.nextFloat(), (p_149734_5_.nextFloat() * 0.7F) + 0.3F, false); + } + } + if (this.meta == 2) { + if (!World.doesBlockHaveSolidTopSurface(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP)){ + if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_, EAST)){ + for (l = 0; l < 2; ++l){ + f = p_149734_2_ + (p_149734_5_.nextFloat() * 0.1F); + f1 = p_149734_3_ + p_149734_5_.nextFloat(); + f2 = p_149734_4_ + p_149734_5_.nextFloat(); + p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } + } + if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_, WEST)){ + for (l = 0; l < 2; ++l){ + f = p_149734_2_ + 1 - (p_149734_5_.nextFloat() * 0.1F); + f1 = p_149734_3_ + p_149734_5_.nextFloat(); + f2 = p_149734_4_ + p_149734_5_.nextFloat(); + p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } + } + if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1, SOUTH)){ + for (l = 0; l < 2; ++l){ + f = p_149734_2_ + p_149734_5_.nextFloat(); + f1 = p_149734_3_ + p_149734_5_.nextFloat(); + f2 = p_149734_4_ + (p_149734_5_.nextFloat() * 0.1F); + p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } + } + if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1, NORTH)){ + for (l = 0; l < 2; ++l){ + f = p_149734_2_ + p_149734_5_.nextFloat(); + f1 = p_149734_3_ + p_149734_5_.nextFloat(); + f2 = p_149734_4_ + 1 - (p_149734_5_.nextFloat() * 0.1F); + p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } + } + if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_, DOWN)){ + for (l = 0; l < 2; ++l){ + f = p_149734_2_ + p_149734_5_.nextFloat(); + f1 = p_149734_3_ + 1 - (p_149734_5_.nextFloat() * 0.1F); + f2 = p_149734_4_ + p_149734_5_.nextFloat(); + p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } + } + } + else{ + if (this.meta == 2) { + for (l = 0; l < 3; ++l){ + f = p_149734_2_ + p_149734_5_.nextFloat(); + f1 = p_149734_3_ + (p_149734_5_.nextFloat() * 0.5F) + 0.5F; + f2 = p_149734_4_ + p_149734_5_.nextFloat(); + p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + } + } + } + } + } + + @SideOnly(Side.CLIENT) + public static IIcon getFireIcon(final int p_149840_1_){ + return FirePit.TEXTURE[p_149840_1_]; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_){ + return FirePit.TEXTURE[0]; + } + + private static boolean isNeighborBurning(final World world, final int x, final int y, final int z){ + return canCatchFire(world, x + 1, y, z, WEST ) || + canCatchFire(world, x - 1, y, z, EAST ) || + canCatchFire(world, x, y - 1, z, UP ) || + canCatchFire(world, x, y + 1, z, DOWN ) || + canCatchFire(world, x, y, z - 1, SOUTH) || + canCatchFire(world, x, y, z + 1, NORTH); + } + + public static boolean canCatchFire(final World world, final int x, final int y, final int z, final ForgeDirection face) + { + return world.getBlock(x, y, z).isFireSource(world, x, y, z, face); + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/FluidTankInfinite.java b/src/main/java/gtPlusPlus/core/block/general/FluidTankInfinite.java new file mode 100644 index 0000000000..b979f7864b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/FluidTankInfinite.java @@ -0,0 +1,136 @@ +package gtPlusPlus.core.block.general; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityInfiniteFluid; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; +import net.minecraftforge.fluids.ItemFluidContainer; + +public class FluidTankInfinite extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + @SuppressWarnings("deprecation") + public FluidTankInfinite() { + super(Material.iron); + this.setBlockName("blockInfiniteFluidTank"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, "blockInfiniteFluidTank"); + LanguageRegistry.addName(this, "Infinite Fluid Tank"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { + return p_149691_1_ == 1 ? this.textureTop + : (p_149691_1_ == 0 ? this.textureBottom + : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "Generic_Creative_Texture"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, + final int side, final float lx, final float ly, final float lz) { + if (world.isRemote) { + return true; + } else { + TileEntityInfiniteFluid tank = (TileEntityInfiniteFluid) world.getTileEntity(x, y, z); + if (tank != null) { + Item handItem; + try { + handItem = player.getHeldItem().getItem(); + } catch (Throwable t) { + handItem = null; + } + if (handItem != null + && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer + || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) { + if (tank.tank.getFluid() == null) { + try { + if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())) { + ItemStack handItemStack = player.getHeldItem(); + IFluidContainerItem container = (IFluidContainerItem) handItem; + FluidStack containerFluid = container.getFluid(handItemStack); + container.drain(handItemStack, container.getFluid(handItemStack).amount, true); + tank.tank.setFluid(containerFluid); + } else { + ItemStack handItemStack = player.getHeldItem(); + FluidContainerRegistry.drainFluidContainer(handItemStack); + FluidStack containerFluid = FluidContainerRegistry.getFluidForFilledItem(handItemStack); + ItemStack emptyContainer = FluidContainerRegistry.drainFluidContainer(handItemStack); + player.setItemInUse(emptyContainer, 0); + + tank.tank.setFluid(containerFluid); + } + } catch (Throwable t) { + t.printStackTrace(); + } + } + + } + if (tank.tank.getFluid() != null) { + PlayerUtils.messagePlayer(player, "This tank contains " + tank.tank.getFluidAmount() + "L of " + + tank.tank.getFluid().getLocalizedName()); + } + } + } + return true; + } + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityInfiniteFluid(); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z) { + super.onBlockAdded(world, x, y, z); + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/HellFire.java b/src/main/java/gtPlusPlus/core/block/general/HellFire.java new file mode 100644 index 0000000000..233f200815 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/HellFire.java @@ -0,0 +1,557 @@ +package gtPlusPlus.core.block.general; + +import static net.minecraftforge.common.util.ForgeDirection.*; + +import java.util.IdentityHashMap; +import java.util.Map.Entry; +import java.util.Random; + +import com.google.common.collect.Maps; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFire; +import net.minecraft.block.material.MapColor; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraftforge.common.util.ForgeDirection; + +public class HellFire extends BlockFire { + @Deprecated + private final int[] field_149849_a = new int[Short.MAX_VALUE]; + @Deprecated + private final int[] field_149848_b = new int[Short.MAX_VALUE]; + @SideOnly(Side.CLIENT) + private IIcon[] IIconArray; + + public HellFire() { + this.setTickRandomly(true); + this.setLightLevel(1F); + this.setLightOpacity(0); + //this.setBlockTextureName(CORE.MODID + "hellfire/blockHellFire"); + this.setBlockName("blockHellFire"); + this.setCreativeTab(AddToCreativeTab.tabBlock); + GameRegistry.registerBlock(this, "blockHellFire"); + LanguageRegistry.addName(this, "Hellish Fire"); + this.enableBrutalFire(); + } + + private void enableBrutalFire() { + for (final Object o : Block.blockRegistry.getKeys()) + { + + try { + + final String name = (String)o; + final Block b = Block.getBlockFromName(name); + if (b != Blocks.air) + { + final int spread = Blocks.fire.getEncouragement(b); + final int flamm = Blocks.fire.getFlammability(b); + if (flamm > 0 && spread > 0) { + this.setFireInfo(b, spread * 4, flamm * 4); + } + } + + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + //Special Case madness + this.setFireInfo(Blocks.brown_mushroom_block, 20, 100); + this.setFireInfo(Blocks.red_mushroom_block, 20, 100); + this.setFireInfo(Blocks.grass, 20, 100); + this.setFireInfo(Blocks.mycelium, 20, 100); + + } + + /** + * How many world ticks before ticking + */ + @Override + public int tickRate(final World world) { + return 5; + } + + /** + * Ticks the block if it's been scheduled + */ + @Override + public void updateTick(final World world, final int x, final int y, final int z, Random random) { + + random = new XSTR(); + + if (world.getGameRules().getGameRuleBooleanValue("doFireTick")) { + final boolean flag = world.getBlock(x, y - 1, z).isFireSource(world, x, y - 1, z, UP); + + if (!this.canPlaceBlockAt(world, x, y, z)) { + world.setBlockToAir(x, y, z); + } + + if (!flag && world.isRaining() + && (world.canLightningStrikeAt(x, y, z) || world.canLightningStrikeAt(x - 1, y, z) + || world.canLightningStrikeAt(x + 1, y, z) || world.canLightningStrikeAt(x, y, z - 1) + || world.canLightningStrikeAt(x, y, z + 1))) { + + if (MathUtils.randInt(0, 100) >= 90){ + world.setBlockToAir(x, y, z); + } + } + else { + final int blockMeta = world.getBlockMetadata(x, y, z); + + if (blockMeta < 15) { + world.setBlockMetadataWithNotify(x, y, z, blockMeta + (random.nextInt(3) / 2), 4); + } + + world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world) + random.nextInt(10)); + + if (!flag && !this.canNeighborBurn(world, x, y, z)) { + if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) || (blockMeta > 3)) { + world.setBlockToAir(x, y, z); + } + } + else if (!flag && !this.canCatchFire(world, x, y - 1, z, UP) && (blockMeta == 15) && (random.nextInt(4) == 0)) { + world.setBlockToAir(x, y, z); + } + else { + final boolean flag1 = world.isBlockHighHumidity(x, y, z); + byte b0 = 0; + + if (flag1) { + b0 = -50; + } + + this.tryCatchFire(world, x + 1, y, z, 300 + b0, random, blockMeta, WEST); + this.tryCatchFire(world, x - 1, y, z, 300 + b0, random, blockMeta, EAST); + this.tryCatchFire(world, x, y - 1, z, 250 + b0, random, blockMeta, UP); + this.tryCatchFire(world, x, y + 1, z, 250 + b0, random, blockMeta, DOWN); + this.tryCatchFire(world, x, y, z - 1, 300 + b0, random, blockMeta, SOUTH); + this.tryCatchFire(world, x, y, z + 1, 300 + b0, random, blockMeta, NORTH); + + for (int i1 = x - 1; i1 <= (x + 1); ++i1) { + for (int j1 = z - 1; j1 <= (z + 1); ++j1) { + for (int k1 = y - 1; k1 <= (y + 4); ++k1) { + if ((i1 != x) || (k1 != y) || (j1 != z)) { + int l1 = 100; + + if (k1 > (y + 1)) { + l1 += (k1 - (y + 1)) * 100; + } + + final int neighbourFireChance = this.getChanceOfNeighborsEncouragingFire(world, i1, k1, j1); + + if (neighbourFireChance > 0) { + int j2 = (neighbourFireChance + 40 + (world.difficultySetting.getDifficultyId() * 14)) / (blockMeta + 30); + + if (flag1) { + j2 /= 2; + } + + if ((j2 > 0) && (random.nextInt(l1) <= j2) + && (!world.isRaining() || !world.canLightningStrikeAt(i1, k1, j1)) + && !world.canLightningStrikeAt(i1 - 1, k1, z) + && !world.canLightningStrikeAt(i1 + 1, k1, j1) + && !world.canLightningStrikeAt(i1, k1, j1 - 1) + && !world.canLightningStrikeAt(i1, k1, j1 + 1)) { + int k2 = blockMeta + (random.nextInt(5) / 4); + + if (k2 > 15) { + k2 = 15; + } + + world.setBlock(i1, k1, j1, this, k2, 3); + } + } + } + } + } + } + } + } + } + } + + private void tryCatchFire(final World world, final int p_149841_2_, final int p_149841_3_, final int p_149841_4_, final int p_149841_5_, final Random p_149841_6_, final int p_149841_7_, final ForgeDirection face) { + final int j1 = world.getBlock(p_149841_2_, p_149841_3_, p_149841_4_).getFlammability(world, p_149841_2_, + p_149841_3_, p_149841_4_, face); + + if (p_149841_6_.nextInt(p_149841_5_) < j1) { + final boolean flag = world.getBlock(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.tnt; + + if ((p_149841_6_.nextInt(p_149841_7_ + 10) < 5) + && !world.canLightningStrikeAt(p_149841_2_, p_149841_3_, p_149841_4_)) { + int k1 = p_149841_7_ + (p_149841_6_.nextInt(5) / 4); + + if (k1 > 15) { + k1 = 15; + } + + world.setBlock(p_149841_2_, p_149841_3_, p_149841_4_, this, k1, 3); + } + else { + world.setBlockToAir(p_149841_2_, p_149841_3_, p_149841_4_); + } + + if (flag) { + Blocks.tnt.onBlockDestroyedByPlayer(world, p_149841_2_, p_149841_3_, p_149841_4_, 1); + } + } + } + + /** + * Returns true if at least one block next to this one can burn. + */ + private boolean canNeighborBurn(final World world, final int x, final int y, final int z) { + return this.canCatchFire(world, x + 1, y, z, WEST) + || this.canCatchFire(world, x - 1, y, z, EAST) + || this.canCatchFire(world, x, y - 1, z, UP) + || this.canCatchFire(world, x, y + 1, z, DOWN) + || this.canCatchFire(world, x, y, z - 1, SOUTH) + || this.canCatchFire(world, x, y, z + 1, NORTH); + } + + /** + * Gets the highest chance of a neighbor block encouraging this block to + * catch fire + */ + private int getChanceOfNeighborsEncouragingFire(final World world, final int x, final int y, final int z) { + final byte b0 = 0; + + if (!world.isAirBlock(x, y, z)) { + return 0; + } + else { + int l = b0; + l = this.getChanceToEncourageFire(world, x + 1, y, z, l, WEST); + l = this.getChanceToEncourageFire(world, x - 1, y, z, l, EAST); + l = this.getChanceToEncourageFire(world, x, y - 1, z, l, UP); + l = this.getChanceToEncourageFire(world, x, y + 1, z, l, DOWN); + l = this.getChanceToEncourageFire(world, x, y, z - 1, l, SOUTH); + l = this.getChanceToEncourageFire(world, x, y, z + 1, l, NORTH); + return l; + } + } + + /** + * Checks the specified block coordinate to see if it can catch fire. Args: + * blockAccess, x, y, z + */ + @Override + @Deprecated + public boolean canBlockCatchFire(final IBlockAccess p_149844_1_, final int p_149844_2_, final int p_149844_3_, final int p_149844_4_) { + return this.canCatchFire(p_149844_1_, p_149844_2_, p_149844_3_, p_149844_4_, UP); + } + + /** + * Checks to see if its valid to put this block at the specified + * coordinates. Args: world, x, y, z + */ + @Override + public boolean canPlaceBlockAt(final World worldObj, final int x, final int y, final int z) { + return World.doesBlockHaveSolidTopSurface(worldObj, x, y - 1, z) + || this.canNeighborBurn(worldObj, x, y, z); + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which + * neighbor changed (coordinates passed are their own) Args: x, y, z, + * neighbor Block + */ + @Override + public void onNeighborBlockChange(final World worldObj, final int x, final int y, final int z, final Block blockObj) { + if (!World.doesBlockHaveSolidTopSurface(worldObj, x, y - 1, z) + && !this.canNeighborBurn(worldObj, x, y, z)) { + worldObj.setBlockToAir(x, y, z); + } + } + + /** + * Called whenever the block is added into the world. Args: world, x, y, z + */ + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + if ((world.provider.dimensionId > 0) + || !Blocks.portal.func_150000_e(world, x, y, z)) { + if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) + && !this.canNeighborBurn(world, x, y, z)) { + world.setBlockToAir(x, y, z); + } + else { + world.scheduleBlockUpdate(x, y, z, this, + this.tickRate(world) + world.rand.nextInt(10)); + } + } + } + + //Burn + @Override + public void onEntityWalking(final World world, final int i, final int j, final int k, final Entity entity) { + entity.setFire(10); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + //Burn + @Override + public void onEntityCollidedWithBlock(final World world, final int i, final int j, final int k, final Entity entity) { + entity.setFire(10); + } + + /** + * A randomly called display update to be able to add particles or other + * items for display + */ + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(final World world, final int x, final int y, final int z, Random randomObj) { + + randomObj = new XSTR(); + + if (randomObj.nextInt(24) == 0) { + world.playSound(x + 0.5F, y + 0.5F, z + 0.5F, "fire.fire", + 1.0F + randomObj.nextFloat(), (randomObj.nextFloat() * 0.7F) + 0.3F, false); + } + + int l; + float f; + float f1; + float f2; + + if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) + && !Blocks.fire.canCatchFire(world, x, y - 1, z, UP)) { + if (Blocks.fire.canCatchFire(world, x - 1, y, z, EAST)) { + for (l = 0; l < 2; ++l) { + f = x + (randomObj.nextFloat() * 0.1F); + f1 = y + randomObj.nextFloat(); + f2 = z + randomObj.nextFloat(); + world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); + + } + } + + if (Blocks.fire.canCatchFire(world, x + 1, y, z, WEST)) { + for (l = 0; l < 2; ++l) { + f = (x + 1) - (randomObj.nextFloat() * 0.1F); + f1 = y + randomObj.nextFloat(); + f2 = z + randomObj.nextFloat(); + world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); + } + } + + if (Blocks.fire.canCatchFire(world, x, y, z - 1, SOUTH)) { + for (l = 0; l < 2; ++l) { + f = x + randomObj.nextFloat(); + f1 = y + randomObj.nextFloat(); + f2 = z + (randomObj.nextFloat() * 0.1F); + world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); + } + } + + if (Blocks.fire.canCatchFire(world, x, y, z + 1, NORTH)) { + for (l = 0; l < 2; ++l) { + f = x + randomObj.nextFloat(); + f1 = y + randomObj.nextFloat(); + f2 = (z + 1) - (randomObj.nextFloat() * 0.1F); + world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); + } + } + + if (Blocks.fire.canCatchFire(world, x, y + 1, z, DOWN)) { + for (l = 0; l < 2; ++l) { + f = x + randomObj.nextFloat(); + f1 = (y + 1) - (randomObj.nextFloat() * 0.1F); + f2 = z + randomObj.nextFloat(); + world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); + } + } + } + else { + for (l = 0; l < 5; ++l) { + f = x + randomObj.nextFloat(); + f1 = y + (randomObj.nextFloat() * 0.5F) + 0.5F; + f2 = z + randomObj.nextFloat(); + world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); + world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister IIconRegister) { + this.IIconArray = new IIcon[] { + IIconRegister.registerIcon(CORE.MODID + ":" + "hellfire/" + "blockHellFire" + "_layer_0"), + IIconRegister.registerIcon(CORE.MODID + ":" + "hellfire/" + "blockHellFire" + "_layer_1") }; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getFireIcon(final int p_149840_1_) { + return this.IIconArray[p_149840_1_]; + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) { + return this.IIconArray[0]; + } + + @Override + public MapColor getMapColor(final int p_149728_1_) { + return MapColor.snowColor; + } + + /* + * ================================= Forge Start + * ====================================== + */ + private static class FireInfo { + private int encouragement = 0; + private int flammibility = 0; + } + + private final IdentityHashMap blockInfo = Maps.newIdentityHashMap(); + + @Override + public void setFireInfo(final Block block, final int encouragement, final int flammibility) { + try { + if (block == Blocks.air) { + throw new IllegalArgumentException("Tried to set air on fire... This is bad."); + } + final int id = Block.getIdFromBlock(block); + if (id >= 4096 || id >= field_149849_a.length || id >= field_149848_b.length) { + return; + } + this.field_149849_a[id] = encouragement; + this.field_149848_b[id] = flammibility; + + final FireInfo info = this.getInfo(block, true); + info.encouragement = encouragement; + info.flammibility = flammibility; + } + catch (Throwable t) {} + } + + private FireInfo getInfo(final Block block, final boolean garentee) { + FireInfo ret = this.blockInfo.get(block); + if ((ret == null) && garentee) { + ret = new FireInfo(); + this.blockInfo.put(block, ret); + } + return ret; + } + + @Override + public void rebuildFireInfo() { + for (int x = 0; x < 4096; x++) { + // If we care.. we could detect changes in here and make sure we + // keep them, however + // it's my thinking that anyone who hacks into the private variables + // should DIAF and we don't care about them. + this.field_149849_a[x] = 0; + this.field_149848_b[x] = 0; + } + + for (final Entry e : this.blockInfo.entrySet()) { + final int id = Block.getIdFromBlock(e.getKey()); + if ((id >= 0) && (id < 4096)) { + this.field_149849_a[id] = e.getValue().encouragement; + this.field_149848_b[id] = e.getValue().flammibility; + } + } + } + + @Override + public int getFlammability(final Block block) { + final int id = Block.getIdFromBlock(block); + return (id >= 0) && (id < 4096) ? this.field_149848_b[id] : 0; + } + + @Override + public int getEncouragement(final Block block) { + final int id = Block.getIdFromBlock(block); + return (id >= 0) && (id < 4096) ? this.field_149849_a[id] : 0; + } + + /** + * Side sensitive version that calls the block function. + * + * @param world + * The current world + * @param x + * X Position + * @param y + * Y Position + * @param z + * Z Position + * @param face + * The side the fire is coming from + * @return True if the face can catch fire. + */ + @Override + public boolean canCatchFire(final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection face) { + return world.getBlock(x, y, z).isFlammable(world, x, y, z, face); + } + + /** + * Side sensitive version that calls the block function. + * + * @param world + * The current world + * @param x + * X Position + * @param y + * Y Position + * @param z + * Z Position + * @param oldChance + * The previous maximum chance. + * @param face + * The side the fire is coming from + * @return The chance of the block catching fire, or oldChance if it is + * higher + */ + @Override + public int getChanceToEncourageFire(final IBlockAccess world, final int x, final int y, final int z, final int oldChance, final ForgeDirection face) { + final int newChance = world.getBlock(x, y, z).getFireSpreadSpeed(world, x, y, z, face); + return (newChance > oldChance ? newChance : oldChance); + } + /* + * ================================= Forge Start + * ====================================== + */ +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/general/LightGlass.java b/src/main/java/gtPlusPlus/core/block/general/LightGlass.java new file mode 100644 index 0000000000..30da7f1d56 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/LightGlass.java @@ -0,0 +1,144 @@ +package gtPlusPlus.core.block.general; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +/*public class LightGlass extends BlockBreakable +{*/ +public class LightGlass extends BlockAir +{ + +private int state = 0; + private final int a = 255; + private int r = 255; + private int g = 0; + private int b = 0; + private int hex; + + public LightGlass(final boolean bool) + { + //super("blockMFEffect", Material.air, bool); + super(); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setBlockName("blockMFEffect"); + this.setLightLevel(12F); + setHardness(0.1F); + setBlockTextureName(CORE.MODID + ":" + "blockMFEffect"); + setStepSound(Block.soundTypeGlass); + GameRegistry.registerBlock(this, "blockMFEffect"); + + /* + this.setLightOpacity(0); + this.setTickRandomly(true); + this.setResistance(1);*/ + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(final Random rand) + { + return 0; + } + + /** + * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha + */ + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() + { + return 0; + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + @Override + public boolean renderAsNormalBlock() + { + return false; + } + + /** + * Return true if a player with Silk Touch can harvest this block directly, and not its normal drops. + */ + @Override + protected boolean canSilkHarvest() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon) + { + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockMFEffect"); + } + + @Override + //http://stackoverflow.com/questions/31784658/how-can-i-loop-through-all-rgb-combinations-in-rainbow-order-in-java + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) + { + if(this.state == 0){ + this.g++; + if(this.g == 255) { + this.state = 1; + } + } + if(this.state == 1){ + this.r--; + if(this.r == 0) { + this.state = 2; + } + } + if(this.state == 2){ + this.b++; + if(this.b == 255) { + this.state = 3; + } + } + if(this.state == 3){ + this.g--; + if(this.g == 0) { + this.state = 4; + } + } + if(this.state == 4){ + this.r++; + if(this.r == 255) { + this.state = 5; + } + } + if(this.state == 5){ + this.b--; + if(this.b == 0) { + this.state = 0; + } + } + this.hex = (this.a << 24) + (this.r << 16) + (this.g << 8) + (this.b); + return this.hex; + } + + /** + * A randomly called display update to be able to add particles or other items for display + */ + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(final World world, final int posX, final int posY, final int posZ, final Random random){ + //Utils.spawnFX(world, posX, posY, posZ, "smoke", "cloud"); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/general/MiningExplosives.java b/src/main/java/gtPlusPlus/core/block/general/MiningExplosives.java new file mode 100644 index 0000000000..8925962e4e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/MiningExplosives.java @@ -0,0 +1,172 @@ +package gtPlusPlus.core.block.general; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockTNT; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.init.Items; +import net.minecraft.util.IIcon; +import net.minecraft.world.Explosion; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; +import gtPlusPlus.core.lib.CORE; + +public class MiningExplosives extends BlockTNT { + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + + public MiningExplosives(){ + this.setBlockName("blockMiningExplosives"); + GameRegistry.registerBlock(this, "blockMiningExplosives"); + LanguageRegistry.addName(this, "Earth Blasting Explosives"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_){ + return p_149691_1_ == 0 ? this.textureBottom : (p_149691_1_ == 1 ? this.textureTop : this.blockIcon); + } + + /** + * Called whenever the block is added into the world. Args: world, x, y, z + */ + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z){ + super.onBlockAdded(world, x, y, z); + + if (world.isBlockIndirectlyGettingPowered(x, y, z)) + { + this.onBlockDestroyedByPlayer(world, x, y, z, 1); + world.setBlockToAir(x, y, z); + } + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are + * their own) Args: x, y, z, neighbor Block + */ + @Override + public void onNeighborBlockChange(final World world, final int x, final int y, final int z, final Block neighbourblock){ + if (world.isBlockIndirectlyGettingPowered(x, y, z)) + { + this.onBlockDestroyedByPlayer(world, x, y, z, 1); + world.setBlockToAir(x, y, z); + } + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(final Random random){ + return 1; + } + + /** + * Called upon the block being destroyed by an explosion + */ + @Override + public void onBlockDestroyedByExplosion(final World world, final int x, final int y, final int z, final Explosion bang){ + if (!world.isRemote) + { + final EntityPrimedMiningExplosive EntityPrimedMiningExplosive = new EntityPrimedMiningExplosive(world, x + 0.5F, y + 0.5F, z + 0.5F, bang.getExplosivePlacedBy()); + EntityPrimedMiningExplosive.fuse = world.rand.nextInt(EntityPrimedMiningExplosive.fuse / 4) + (EntityPrimedMiningExplosive.fuse / 8); + world.spawnEntityInWorld(EntityPrimedMiningExplosive); + } + } + + /** + * Called right before the block is destroyed by a player. Args: world, x, y, z, metaData + */ + @Override + public void onBlockDestroyedByPlayer(final World world, final int x, final int y, final int z, final int meta){ + this.func_150114_a(world, x, y, z, meta, (EntityLivingBase)null); + } + + //TODO Spawns Primed TNT? + @Override + public void func_150114_a(final World world, final int p_150114_2_, final int p_150114_3_, final int p_150114_4_, final int p_150114_5_, final EntityLivingBase entityLiving){ + if (!world.isRemote) + { + if ((p_150114_5_ & 1) == 1) + { + final EntityPrimedMiningExplosive EntityPrimedMiningExplosive = new EntityPrimedMiningExplosive(world, p_150114_2_ + 0.5F, p_150114_3_ + 0.5F, p_150114_4_ + 0.5F, entityLiving); + world.spawnEntityInWorld(EntityPrimedMiningExplosive); + world.playSoundAtEntity(EntityPrimedMiningExplosive, "game.tnt.primed", 1.0F, 1.0F); + } + } + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer clickingPlayer, final int p_149727_6_, final float p_149727_7_, final float p_149727_8_, final float p_149727_9_){ + if ((clickingPlayer.getCurrentEquippedItem() != null) && (clickingPlayer.getCurrentEquippedItem().getItem() == Items.flint_and_steel)) + { + this.func_150114_a(world, x, y, z, 1, clickingPlayer); + world.setBlockToAir(x, y, z); + clickingPlayer.getCurrentEquippedItem().damageItem(1, clickingPlayer); + return true; + } + else + { + return super.onBlockActivated(world, x, y, z, clickingPlayer, p_149727_6_, p_149727_7_, p_149727_8_, p_149727_9_); + } + } + + /** + * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity + */ + @Override + public void onEntityCollidedWithBlock(final World world, final int x, final int y, final int z, final Entity entityTriggering){ + if ((entityTriggering instanceof EntityArrow) && !world.isRemote) + { + final EntityArrow entityarrow = (EntityArrow)entityTriggering; + + if (entityarrow.isBurning()) + { + this.func_150114_a(world, x, y, z, 1, entityarrow.shootingEntity instanceof EntityLivingBase ? (EntityLivingBase)entityarrow.shootingEntity : null); + world.setBlockToAir(x, y, z); + } + } + } + + /** + * Return whether this block can drop from an explosion. + */ + @Override + public boolean canDropFromExplosion(final Explosion bang){ + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iconRegister){ + // + /*this.blockIcon = iconRegister.registerIcon(this.getTextureName() + "_side"); + this.textureTop = iconRegister.registerIcon(this.getTextureName() + "_top"); + this.textureBottom = iconRegister.registerIcon(this.getTextureName() + "_bottom");*/ + this.blockIcon = iconRegister.registerIcon(CORE.MODID + ":" + "chrono/" + "MetalSheet2"); + this.textureTop = iconRegister.registerIcon(CORE.MODID + ":" + "chrono/" + "MetalFunnel"); + this.textureBottom = iconRegister.registerIcon(CORE.MODID + ":" + "chrono/" + "MetalPanel"); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java b/src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java new file mode 100644 index 0000000000..a4c0c1a0a5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java @@ -0,0 +1,467 @@ +package gtPlusPlus.core.block.general; + +import java.util.HashMap; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.base.itemblock.ItemBlockDoor; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityPlayerDoorBase; +import gtPlusPlus.core.util.Utils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockDoor; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.IconFlipped; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class PlayerDoors extends BlockDoor implements ITileEntityProvider { + + @SideOnly(Side.CLIENT) + private IIcon[] aTextureUpper; + @SideOnly(Side.CLIENT) + private IIcon[] aTextureLower; + + private final static HashMap mDoorMap = new HashMap(); + + public PlayerDoors(Material aMaterial, String aTextureName, boolean vanillaType) { + this(aMaterial, aTextureName, vanillaType, 0f, null, null); + } + + public PlayerDoors(Material aMaterial, String aTextureName, boolean vanillaType, float aHardness, + SoundType aStepSound, String aBlockExtensionName) { + super(aMaterial); + this.disableStats(); + this.isBlockContainer = true; + if (mDoorMap.get(aMaterial) == null) { + mDoorMap.put(aMaterial, this); + } + float f = 0.5F; + float f1 = 1.0F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f); + + this.setBlockName("playerDoor_" + aTextureName); + if (aMaterial == Material.wood) { + setHardness(3.0F); + setStepSound(soundTypeWood); + setBlockName("playerDoor" + "Wood"); + this.setHarvestLevel("axe", 1); + } else if (aMaterial == Material.iron) { + setHardness(5.0F); + setStepSound(Block.soundTypeMetal); + setBlockName("playerDoor" + "Iron"); + this.setHarvestLevel("pickaxe", 1); + + } else if (aMaterial == Material.glass) { + setHardness(0.1F); + setStepSound(Block.soundTypeGlass); + setBlockName("playerDoor" + "Glass"); + this.setHarvestLevel("pickaxe", 1); + + } else if (aMaterial == Material.ice) { + setHardness(0.5F); + setStepSound(Block.soundTypeSnow); + setBlockName("playerDoor" + "Ice"); + this.setHarvestLevel("pickaxe", 1); + } else { + setHardness(aHardness); + setStepSound(aStepSound); + setBlockName("playerDoor" + aBlockExtensionName); + this.setHarvestLevel("axe", 1); + + } + this.setBlockTextureName(vanillaType ? aTextureName : CORE.MODID + ":" + aTextureName); + GameRegistry.registerBlock(this, ItemBlockDoor.class, Utils.sanitizeString(this.getUnlocalizedName())); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + return this.aTextureLower[0]; + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aAccess, int p_149673_2_, int p_149673_3_, int p_149673_4_, int p_149673_5_) { + if (p_149673_5_ != 1 && p_149673_5_ != 0) { + int i1 = this.getState(aAccess, p_149673_2_, p_149673_3_, p_149673_4_); + int j1 = i1 & 3; + boolean flag = (i1 & 4) != 0; + boolean flag1 = false; + boolean flag2 = (i1 & 8) != 0; + + if (flag) { + if (j1 == 0 && p_149673_5_ == 2) { + flag1 = !flag1; + } else if (j1 == 1 && p_149673_5_ == 5) { + flag1 = !flag1; + } else if (j1 == 2 && p_149673_5_ == 3) { + flag1 = !flag1; + } else if (j1 == 3 && p_149673_5_ == 4) { + flag1 = !flag1; + } + } else { + if (j1 == 0 && p_149673_5_ == 5) { + flag1 = !flag1; + } else if (j1 == 1 && p_149673_5_ == 3) { + flag1 = !flag1; + } else if (j1 == 2 && p_149673_5_ == 4) { + flag1 = !flag1; + } else if (j1 == 3 && p_149673_5_ == 2) { + flag1 = !flag1; + } + + if ((i1 & 16) != 0) { + flag1 = !flag1; + } + } + + return flag2 ? this.aTextureUpper[flag1 ? 1 : 0] : this.aTextureLower[flag1 ? 1 : 0]; + } else { + return this.aTextureLower[0]; + } + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) { + this.aTextureUpper = new IIcon[2]; + this.aTextureLower = new IIcon[2]; + this.aTextureUpper[0] = p_149651_1_.registerIcon(this.getTextureName() + "_upper"); + this.aTextureLower[0] = p_149651_1_.registerIcon(this.getTextureName() + "_lower"); + this.aTextureUpper[1] = new IconFlipped(this.aTextureUpper[0], true, false); + this.aTextureLower[1] = new IconFlipped(this.aTextureLower[0], true, false); + } + + public boolean getBlocksMovement(IBlockAccess aAccess, int aX, int aY, int aZ) { + int l = this.getState(aAccess, aX, aY, aZ); + return (l & 4) != 0; + } + + /** + * If this block doesn't render as an ordinary block it will return False + * (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() { + return false; + } + + /** + * The type of render function that is called for this block + */ + public int getRenderType() { + return 7; + } + + /** + * Returns the bounding box of the wired rectangular prism to render. + */ + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + this.setBlockBoundsBasedOnState(aWorld, aX, aY, aZ); + return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this box + * can change after the pool has been cleared to be reused) + */ + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + this.setBlockBoundsBasedOnState(aWorld, aX, aY, aZ); + return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, y, z + */ + public void setBlockBoundsBasedOnState(IBlockAccess aAccess, int aX, int aY, int aZ) { + this.setBounds(this.getState(aAccess, aX, aY, aZ)); + } + + public int func_150013_e(IBlockAccess p_150013_1_, int p_150013_2_, int p_150013_3_, int p_150013_4_) { + return this.getState(p_150013_1_, p_150013_2_, p_150013_3_, p_150013_4_) & 3; + } + + public boolean func_150015_f(IBlockAccess p_150015_1_, int p_150015_2_, int p_150015_3_, int p_150015_4_) { + return (this.getState(p_150015_1_, p_150015_2_, p_150015_3_, p_150015_4_) & 4) != 0; + } + + private void setBounds(int aState) { + float f = 0.1875F; + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F); + int j = aState & 3; + boolean flag = (aState & 4) != 0; + boolean flag1 = (aState & 16) != 0; + + if (j == 0) { + if (flag) { + if (!flag1) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + } else { + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + } + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + } + } else if (j == 1) { + if (flag) { + if (!flag1) { + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + } + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + } + } else if (j == 2) { + if (flag) { + if (!flag1) { + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + } else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f); + } + } else { + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + } else if (j == 3) { + if (flag) { + if (!flag1) { + this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F); + } else { + this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + } else { + this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F); + } + } + } + + /** + * Called upon block activation (right click on the block.) + */ + public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int p_149727_6_, + float p_149727_7_, float p_149727_8_, float p_149727_9_) { + if (this.blockMaterial == Material.iron) { + return false; // Allow items to interact with the door + } else { + int i1 = this.getState(aWorld, aX, aY, aZ); + int j1 = i1 & 7; + j1 ^= 4; + + if ((i1 & 8) == 0) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, j1, 2); + aWorld.markBlockRangeForRenderUpdate(aX, aY, aZ, aX, aY, aZ); + } else { + aWorld.setBlockMetadataWithNotify(aX, aY - 1, aZ, j1, 2); + aWorld.markBlockRangeForRenderUpdate(aX, aY - 1, aZ, aX, aY, aZ); + } + + aWorld.playAuxSFXAtEntity(aPlayer, 1003, aX, aY, aZ, 0); + return true; + } + } + + public void func_150014_a(World aWorld, int aX, int aY, int aZ, boolean aFlag) { + int l = this.getState(aWorld, aX, aY, aZ); + boolean flag1 = (l & 4) != 0; + + if (flag1 != aFlag) { + int i1 = l & 7; + i1 ^= 4; + + if ((l & 8) == 0) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, i1, 2); + aWorld.markBlockRangeForRenderUpdate(aX, aY, aZ, aX, aY, aZ); + } else { + aWorld.setBlockMetadataWithNotify(aX, aY - 1, aZ, i1, 2); + aWorld.markBlockRangeForRenderUpdate(aX, aY - 1, aZ, aX, aY, aZ); + } + + aWorld.playAuxSFXAtEntity((EntityPlayer) null, 1003, aX, aY, aZ, 0); + } + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which + * neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor + * Block + */ + public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aNeighbour) { + int l = aWorld.getBlockMetadata(aX, aY, aZ); + + if ((l & 8) == 0) { + boolean flag = false; + + if (aWorld.getBlock(aX, aY + 1, aZ) != this) { + aWorld.setBlockToAir(aX, aY, aZ); + flag = true; + } + + if (!World.doesBlockHaveSolidTopSurface(aWorld, aX, aY - 1, aZ)) { + aWorld.setBlockToAir(aX, aY, aZ); + flag = true; + + if (aWorld.getBlock(aX, aY + 1, aZ) == this) { + aWorld.setBlockToAir(aX, aY + 1, aZ); + } + } + + if (flag) { + if (!aWorld.isRemote) { + this.dropBlockAsItem(aWorld, aX, aY, aZ, l, 0); + } + } else { + boolean flag1 = aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ) + || aWorld.isBlockIndirectlyGettingPowered(aX, aY + 1, aZ); + + if ((flag1 || aNeighbour.canProvidePower()) && aNeighbour != this) { + this.func_150014_a(aWorld, aX, aY, aZ, flag1); + } + } + } else { + if (aWorld.getBlock(aX, aY - 1, aZ) != this) { + aWorld.setBlockToAir(aX, aY, aZ); + } + + if (aNeighbour != this) { + this.onNeighborBlockChange(aWorld, aX, aY - 1, aZ, aNeighbour); + } + } + } + + public Item getItemDropped(int p_149650_1_, Random aRand, int p_149650_3_) { + if ((p_149650_1_ & 8) != 0) { + return null; + } else { + Block b = mDoorMap.get(this.blockMaterial); + if (b != null) { + return Item.getItemFromBlock(b); + } + } + return null; + } + + /** + * Ray traces through the blocks collision from start vector to end vector + * returning a ray trace hit. Args: world, x, y, z, startVec, endVec + */ + public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, + Vec3 p_149731_5_, Vec3 p_149731_6_) { + this.setBlockBoundsBasedOnState(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_); + return super.collisionRayTrace(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_, p_149731_5_, p_149731_6_); + } + + /** + * Checks to see if its valid to put this block at the specified coordinates. + * Args: world, x, y, z + */ + public boolean canPlaceBlockAt(World aWorld, int aX, int aY, int aZ) { + boolean aHeight = (aY < aWorld.getHeight() - 1); + boolean aSolidTopSurface = World.doesBlockHaveSolidTopSurface(aWorld, aX, aY - 1, aZ); + + boolean aCanPlace = aWorld.getBlock(aX, aY, aZ).isReplaceable(aWorld, aX, aY, aZ); + boolean aCanPlace2 = aWorld.getBlock(aX, aY, aZ).isReplaceable(aWorld, aX, aY + 1, aZ); + + // Logger.INFO(""+aY+"/"+aWorld.getHeight()+" | Trying to place door. Good + // height? "+aHeight+" | Solid top surface? "+aSolidTopSurface+" | Can Place? + // "+aCanPlace+"|"+aCanPlace2); + + return aHeight && aSolidTopSurface && aCanPlace && aCanPlace2; + } + + /** + * Returns the mobility information of the block, 0 = free, 1 = can't push but + * can move over, 2 = total immobility and stop pistons + */ + public int getMobilityFlag() { + return 1; + } + + public int getState(IBlockAccess aAccess, int aX, int aY, int aZ) { + int l = aAccess.getBlockMetadata(aX, aY, aZ); + boolean flag = (l & 8) != 0; + int i1; + int j1; + + if (flag) { + i1 = aAccess.getBlockMetadata(aX, aY - 1, aZ); + j1 = l; + } else { + i1 = l; + j1 = aAccess.getBlockMetadata(aX, aY + 1, aZ); + } + + boolean flag1 = (j1 & 1) != 0; + return i1 & 7 | (flag ? 8 : 0) | (flag1 ? 16 : 0); + } + + /** + * Gets an item for the block being called on. Args: world, x, y, z + */ + @SideOnly(Side.CLIENT) + public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { + Block b = mDoorMap.get(this.blockMaterial); + if (b != null) { + return Item.getItemFromBlock(b); + } + // return this.blockMaterial == Material.iron ? Items.iron_door : + // Items.wooden_door; + return null; + } + + /** + * Called when the block is attempted to be harvested + */ + public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, + EntityPlayer p_149681_6_) { + if (p_149681_6_.capabilities.isCreativeMode && (p_149681_5_ & 8) != 0 + && p_149681_1_.getBlock(p_149681_2_, p_149681_3_ - 1, p_149681_4_) == this) { + p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_); + } + } + + /** + * Called whenever the block is added into the world. Args: world, x, y, z + */ + @Override + public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) { + super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_); + } + + @Override + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, + int p_149749_6_) { + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); + } + + @Override + public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, + int p_149696_5_, int p_149696_6_) { + super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); + TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); + return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false; + } + + @Override + public TileEntity createNewTileEntity(World world, int metadata) { + return new TileEntityPlayerDoorBase(this, metadata); + } + + @Override + public TileEntity createTileEntity(World world, int metadata) { + return new TileEntityPlayerDoorBase(this, metadata); + } +} diff --git a/src/main/java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java b/src/main/java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java new file mode 100644 index 0000000000..2210e68e8a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java @@ -0,0 +1,166 @@ +package gtPlusPlus.core.block.general.antigrief; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.boss.EntityDragon; +import net.minecraft.entity.boss.EntityWither; +import net.minecraft.entity.boss.IBossDisplayData; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class BlockWitherProof extends Block{ + + public BlockWitherProof(){ + super(Material.redstoneLight); + this.setBlockName(Utils.sanitizeString("blockBlackGate")); + this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt"); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setHardness(-1F); + this.setResistance(5000.0F); + this.setHarvestLevel("pickaxe", 3); + this.setStepSound(soundTypeMetal); + //LanguageRegistry.addName(this, "Wither Cage"); + GameRegistry.registerBlock(this, Utils.sanitizeString("blockBlackGate")); + } + + public String GetProperName(){ + return "Wither Cage"; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass(){ + return 1; + } + + @Override + public boolean isOpaqueCube(){ + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon){ + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt"); + } + + @Override + public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion){ + //prevent from being destroyed by wither and nukes. + } + + @Override + public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, + final int p_149723_3_, final int p_149723_4_, final Explosion p_149723_5_) { + + } + + @Override + public boolean canDropFromExplosion(final Explosion p_149659_1_) { + return false; + } + + @Override + public boolean canEntityDestroy(final IBlockAccess world, final int x, final int y, final int z, + final Entity entity) { + if ((entity == null) || !entity.isEntityAlive()){ + return false; + } + if ((entity instanceof EntityWither) || (entity instanceof EntityDragon) || (entity instanceof IBossDisplayData)){ + return false; + } + else { + return super.canEntityDestroy(world, x, y, z, entity); + } + } + + + //Colour Handling + private static final int mWitherColour = Utils.rgbtoHexValue(32, 32, 32); + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + return mWitherColour; + } + + @Override + public int getRenderColor(final int aMeta) { + return mWitherColour; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + } + + @Override + public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World p_149737_2_, int p_149737_3_, int p_149737_4_, int p_149737_5_) { + if (aPlayer != null && aPlayer instanceof EntityPlayerMP) { + return 1f; + } + return -1f; + } + + @Override + public float getExplosionResistance(Entity p_149638_1_) { + return Float.MAX_VALUE; + } + + @Override + public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) { + super.onBlockClicked(p_149699_1_, p_149699_2_, p_149699_3_, p_149699_4_, p_149699_5_); + } + + @Override + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { + if ((entity == null) || !entity.isEntityAlive()){ + return; + } + if ((entity instanceof EntityWither) || (entity instanceof EntityDragon) || (entity instanceof IBossDisplayData)){ + return; + } + else { + super.onEntityCollidedWithBlock(world, x, y, z, entity); + } + } + + @Override + public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_) { + super.harvestBlock( p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_); + } + + @Override + public boolean canHarvestBlock(EntityPlayer player, int meta) { + if (player != null && player instanceof EntityPlayerMP) { + return true; + } + return super.canHarvestBlock(player, meta); + } + + @Override + public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) { + return Float.MAX_VALUE; + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java b/src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java new file mode 100644 index 0000000000..01a2116a0b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java @@ -0,0 +1,293 @@ +package gtPlusPlus.core.block.general.antigrief; + +import static gtPlusPlus.core.block.ModBlocks.blockGriefSaver; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityReverter; + +public class TowerDevice extends Block { + private static IIcon TEX_ANTIBUILDER; + public static final int META_ANTIBUILDER = 9; + private boolean bUnbreakable; + + public TowerDevice() + { + super(Material.wood); + this.setHardness(10.0F); + this.setResistance(35.0F); + this.setStepSound(Block.soundTypeWood); + this.setCreativeTab(AddToCreativeTab.tabMachines); + } + + public int tickRate() + { + return 15; + } + + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setBoolean("bUnbreakable", this.bUnbreakable); + } + + public void loadNBTData(final NBTTagCompound aNBT) { + this.bUnbreakable = aNBT.getBoolean("bUnbreakable"); + } + + @Override + public IIcon getIcon(final int side, final int meta) + { + return TEX_ANTIBUILDER; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister par1IconRegister) + { + TEX_ANTIBUILDER = par1IconRegister.registerIcon(CORE.MODID + ":" + "blockAntiGrief"); + } + + @Override + public void getSubBlocks(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) + { + par3List.add(new ItemStack(par1, 1, 9)); + } + + @Override + public boolean onBlockActivated(final World par1World, final int x, final int y, final int z, final EntityPlayer par5EntityPlayer, final int par6, final float par7, final float par8, final float par9) + { + final int meta = par1World.getBlockMetadata(x, y, z); + return false; + } + + @Override + public float getExplosionResistance(final Entity par1Entity, final World world, final int x, final int y, final int z, final double explosionX, final double explosionY, final double explosionZ) + { + final int meta = world.getBlockMetadata(x, y, z); + return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ); + } + + @Override + public float getBlockHardness(final World world, final int x, final int y, final int z) + { + final int meta = world.getBlockMetadata(x, y, z); + return super.getBlockHardness(world, x, y, z); + } + + public static boolean areNearbyLockBlocks(final World world, final int x, final int y, final int z) + { + boolean locked = false; + for (int dx = x - 2; dx <= (x + 2); dx++) { + for (int dy = y - 2; dy <= (y + 2); dy++) { + for (int dz = z - 2; dz <= (z + 2); dz++) { + if ((world.getBlock(dx, dy, dz) == blockGriefSaver) && (world.getBlockMetadata(dx, dy, dz) == 4)) { + locked = true; + } + } + } + } + return locked; + } + + public static void unlockBlock(final World par1World, final int x, final int y, final int z) + { + final Block thereBlockID = par1World.getBlock(x, y, z); + final int thereBlockMeta = par1World.getBlockMetadata(x, y, z); + if ((thereBlockID == blockGriefSaver) || (thereBlockMeta == 4)) + { + changeToBlockMeta(par1World, x, y, z, 5); + par1World.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.click", 0.3F, 0.6F); + } + } + + private static void changeToBlockMeta(final World par1World, final int x, final int y, final int z, final int meta) + { + final Block thereBlockID = par1World.getBlock(x, y, z); + if ((thereBlockID == blockGriefSaver)) + { + par1World.setBlock(x, y, z, thereBlockID, meta, 3); + par1World.markBlockRangeForRenderUpdate(x, y, z, x, y, z); + par1World.notifyBlocksOfNeighborChange(x, y, z, thereBlockID); + } + } + + @Override + public void onBlockAdded(final World par1World, final int x, final int y, final int z) + { + final int meta = par1World.getBlockMetadata(x, y, z); + if (!par1World.isRemote) { + + } + } + + @Override + public void onNeighborBlockChange(final World par1World, final int x, final int y, final int z, final Block myBlockID) + { + final int meta = par1World.getBlockMetadata(x, y, z); + if (!par1World.isRemote) + { + + } + } + + @Override + public void updateTick(final World par1World, final int x, final int y, final int z, final Random par5Random) + { + if (!par1World.isRemote) + { + final int meta = par1World.getBlockMetadata(x, y, z); + } + } + + private void letsBuild(final World par1World, final int x, final int y, final int z) + { + + } + + private boolean isInactiveTrapCharged(final World par1World, final int x, final int y, final int z) + { + return false; + } + + private boolean isReactorReady(final World world, final int x, final int y, final int z) + { + if ((world.getBlock(x, y + 1, z) != Blocks.redstone_block) || + (world.getBlock(x, y - 1, z) != Blocks.redstone_block) || + (world.getBlock(x + 1, y, z) != Blocks.redstone_block) || + (world.getBlock(x - 1, y, z) != Blocks.redstone_block) || + (world.getBlock(x, y, z + 1) != Blocks.redstone_block) || + (world.getBlock(x, y, z - 1) != Blocks.redstone_block)) { + return false; + } + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(final World par1World, final int x, final int y, final int z, final Random par5Random) + { + final int meta = par1World.getBlockMetadata(x, y, z); + if ((meta == 3) || (meta == 1) || (meta == 9)) { + for (int i = 0; i < 1; i++) { + this.sparkle(par1World, x, y, z, par5Random); + } + } + } + + public void sparkle(final World world, final int x, final int y, final int z, final Random rand) + { + final double offset = 0.0625D; + for (int side = 0; side < 6; side++) + { + double rx = x + rand.nextFloat(); + double ry = y + rand.nextFloat(); + double rz = z + rand.nextFloat(); + if ((side == 0) && (!world.getBlock(x, y + 1, z).isOpaqueCube())) { + ry = y + 1 + offset; + } + if ((side == 1) && (!world.getBlock(x, y - 1, z).isOpaqueCube())) { + ry = (y + 0) - offset; + } + if ((side == 2) && (!world.getBlock(x, y, z + 1).isOpaqueCube())) { + rz = z + 1 + offset; + } + if ((side == 3) && (!world.getBlock(x, y, z - 1).isOpaqueCube())) { + rz = (z + 0) - offset; + } + if ((side == 4) && (!world.getBlock(x + 1, y, z).isOpaqueCube())) { + rx = x + 1 + offset; + } + if ((side == 5) && (!world.getBlock(x - 1, y, z).isOpaqueCube())) { + rx = (x + 0) - offset; + } + if ((rx < x) || (rx > (x + 1)) || (ry < 0.0D) || (ry > (y + 1)) || (rz < z) || (rz > (z + 1))) { + world.spawnParticle("reddust", rx, ry, rz, 0.0D, 0.0D, 0.0D); + } + } + } + + public static void checkAndActivateVanishBlock(final World world, final int x, final int y, final int z) + { + final Block thereID = world.getBlock(x, y, z); + final int thereMeta = world.getBlockMetadata(x, y, z); + } + + public static void changeToActiveVanishBlock(final World par1World, final int x, final int y, final int z, final int meta) + { + changeToBlockMeta(par1World, x, y, z, meta); + par1World.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.pop", 0.3F, 0.6F); + + final Block thereBlockID = par1World.getBlock(x, y, z); + par1World.scheduleBlockUpdate(x, y, z, thereBlockID, getTickRateFor(thereBlockID, meta, par1World.rand)); + } + + private static int getTickRateFor(final Block thereBlockID, final int meta, final Random rand) + { + return 15; + } + + @Override + public int getLightValue(final IBlockAccess world, final int x, final int y, final int z) + { + final Block blockID = world.getBlock(x, y, z); + final int meta = world.getBlockMetadata(x, y, z); + if (blockID != this) { + return 0; + } + return 10; + } + + @Override + public boolean hasTileEntity(final int metadata) + { + return (metadata == 0); + } + + @Override + public TileEntity createTileEntity(final World world, final int metadata) + { + if (metadata == 0) { + Logger.INFO("I have been created. [Antigriefer]"+this.getLocalizedName()); + return new TileEntityReverter(); + } + return null; + } + + @Override + public Item getItemDropped(final int meta, final Random par2Random, final int par3) + { + switch (meta) + { + case 0: + return null; + } + return Item.getItemFromBlock(this); + } + + @Override + public int damageDropped(final int meta) + { + return meta; + } +} diff --git a/src/main/java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java b/src/main/java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java new file mode 100644 index 0000000000..6af27639ae --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/fluids/BlockFluidSludge.java @@ -0,0 +1,63 @@ +package gtPlusPlus.core.block.general.fluids; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; + +public class BlockFluidSludge extends BlockFluidClassic { + + @SideOnly(Side.CLIENT) + protected IIcon stillIcon; + @SideOnly(Side.CLIENT) + protected IIcon flowingIcon; + + public BlockFluidSludge(final Fluid fluid, final Material material) { + super(fluid, material); + this.setCreativeTab(AddToCreativeTab.tabMisc); + } + + @Override + public IIcon getIcon(final int side, final int meta) { + return ((side == 0) || (side == 1))? this.stillIcon : this.flowingIcon; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(final IIconRegister register) { + this.stillIcon = register.registerIcon(CORE.MODID+":fluids/fluid.jackdaniels"); + this.flowingIcon = register.registerIcon(CORE.MODID+":fluids/fluid.jackdaniels"); + } + + @Override + public boolean canDisplace(final IBlockAccess world, final int x, final int y, final int z) { + if (world.getBlock(x, y, z).getMaterial().isLiquid()) { + return false; + } + return super.canDisplace(world, x, y, z); + } + + @Override + public boolean displaceIfPossible(final World world, final int x, final int y, final int z) { + if (world.getBlock(x, y, z).getMaterial().isLiquid()) { + return false; + } + return super.displaceIfPossible(world, x, y, z); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java new file mode 100644 index 0000000000..b84c96be99 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java @@ -0,0 +1,370 @@ +package gtPlusPlus.core.block.general.redstone; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; +import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler; +import gtPlusPlus.core.util.minecraft.InventoryUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public abstract class BlockGenericRedstone extends BlockContainer { + + + @SuppressWarnings("deprecation") + public BlockGenericRedstone(String aUnlocalizedSuffix, String aDisplayName) { + super(Material.redstoneLight); + this.setBlockName("blockGenericRedstone." + aUnlocalizedSuffix); + this.setHardness(3f); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockMeta.class, "blockGenericRedstone." + aUnlocalizedSuffix); + LanguageRegistry.addName(this, aDisplayName); + + } + + + private final HashMap> mTextures = new HashMap>(); + + /** + * A map of the textures used for this blocks. The key is the meta, then each internal map holds textures tied to each forge direction. Do not use unknown direction. + * @return + */ + public HashMap> getTextureArray() { + return mTextures; + } + + public abstract void generateTextureArray(final IIconRegister iicon); + + + @Override + @SideOnly(Side.CLIENT) + public final void registerBlockIcons(final IIconRegister iicon) { + generateTextureArray(iicon); + this.blockIcon = iicon.registerIcon("redstone_block"); + } + + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, + final int side, final float lx, final float ly, final float lz) { + + if (world.isRemote) { + return true; + } + + boolean mDidTool = false; + // Check For Tools + try { + final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); + final Item mHandItem = mHandStack.getItem(); + if (ItemUtils.isItemGregtechTool(mHandStack)) { + + Logger.INFO("Found Tool in players hand!"); + + final TileEntityRedstoneHandler tile = (TileEntityRedstoneHandler) world.getTileEntity(x, y, z); + if (tile != null) { + if (tile.isScrewdriverable()) { + if (ItemUtils.isToolScrewdriver(mHandStack)){ + mDidTool = tile.onScrewdriverRMB(); + PlayerUtils.messagePlayer(player, "Adjusted Light level by 0.0625f. "+tile.getLightBrightness()); + } + } + if (tile.isMalletable()) { + if (ItemUtils.isToolMallet(mHandStack)){ + mDidTool = tile.onMalletRMB(); + PlayerUtils.messagePlayer(player, "Light Mode active: "+mDidTool); + } + } + if (tile.isWrenchable()) { + if (ItemUtils.isToolWrench(mHandStack)){ + mDidTool = tile.onWrenchRMB(); + } + } + } + } + } + catch (final Throwable t) {} + if (mDidTool) { + return true; + } + + return false; + } + + + + @Override + public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { + + boolean mDidTool = false; + // Check For Tools + try { + final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(aWorld, aPlayer.getDisplayName()); + final Item mHandItem = mHandStack.getItem(); + if (mHandItem instanceof GT_MetaGenerated_Tool_01) { + + final TileEntityRedstoneHandler tile = (TileEntityRedstoneHandler) aWorld.getTileEntity(aX, aY, aZ); + if (tile != null) { + if (tile.isScrewdriverable()) { + if (ItemUtils.isToolScrewdriver(mHandStack)){ + mDidTool = tile.onScrewdriverLMB(); + } + } + if (tile.isMalletable()) { + if (ItemUtils.isToolMallet(mHandStack)){ + mDidTool = tile.onMalletLMB(); + } + } + if (tile.isWrenchable()) { + if (ItemUtils.isToolWrench(mHandStack)){ + mDidTool = tile.onWrenchLMB(); + } + } + } + } + } + catch (Throwable t) {} + + if (!mDidTool && !aPlayer.capabilities.isCreativeMode) { + super.onBlockClicked(aWorld, aX, aY, aZ, aPlayer); + } + else { + return; + } + } + + @Override + public abstract TileEntity createNewTileEntity(final World world, final int p_149915_2_); + + @Override + public void breakBlock(final World world, final int x, final int y, final int z, final Block block, + final int number) { + InventoryUtils.dropInventoryItems(world, x, y, z, block); + super.breakBlock(world, x, y, z, block, number); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, + final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityRedstoneHandler) world.getTileEntity(x, y, z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, + final int z) { + return false; + } + + @Override + public int getLightValue() { + return super.getLightValue(); + } + + @Override + public int onBlockPlaced(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, + float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_) { + // TODO Auto-generated method stub + return super.onBlockPlaced(p_149660_1_, p_149660_2_, p_149660_3_, p_149660_4_, p_149660_5_, p_149660_6_, + p_149660_7_, p_149660_8_, p_149660_9_); + } + + @Override + public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { + TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); + if (aThis != null) { + return aThis.isProvidingWeakPower(world, x, y, z, side); + } + return 0; + } + + @Override + public boolean canProvidePower() { + return false; + } + + @Override + public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { + TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); + if (aThis != null) { + return aThis.isProvidingStrongPower(world, x, y, z, side); + } + return 0; + } + + @Override + public boolean hasComparatorInputOverride() { + // TODO Auto-generated method stub + return super.hasComparatorInputOverride(); + } + + @Override + public int getComparatorInputOverride(World p_149736_1_, int p_149736_2_, int p_149736_3_, int p_149736_4_, + int p_149736_5_) { + // TODO Auto-generated method stub + return super.getComparatorInputOverride(p_149736_1_, p_149736_2_, p_149736_3_, p_149736_4_, p_149736_5_); + } + + @Override + public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { + TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); + if (aThis != null) { + return aThis.canConnectRedstone(world, x, y, z, side); + } + return false; + } + + @Override + public boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int side) { + TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); + if (aThis != null) { + return aThis.shouldCheckWeakPower(world, x, y, z, side); + } + return isNormalCube(); + } + + @Override + public boolean getWeakChanges(IBlockAccess world, int x, int y, int z) { + TileEntityRedstoneHandler aThis = getTileEntity(world, x, y, z); + if (aThis != null) { + return aThis.getWeakChanges(world, x, y, z); + } + return false; + } + + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public abstract IIcon getIcon(final int side, final int meta); + + @Override + public int damageDropped(final int damage) { + return damage; + } + + @Override + public abstract void getSubBlocks(final Item item, final CreativeTabs tab, final List list); + + + /** + * Called whenever the block is added into the world. Args: world, x, y, z + */ + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + TileEntityRedstoneHandler aThis = getTileEntity(aWorld, aX, aY, aZ); + + if (!aWorld.isRemote) { + if (aThis.hasUpdatedRecently() && !aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { + aWorld.scheduleBlockUpdate(aX, aY, aZ, this, 4); + } else if (!aThis.hasUpdatedRecently() && aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { + aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 2); + } + } + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which + * neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor + * Block + */ + public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block p_149695_5_) { + + TileEntityRedstoneHandler aThis = getTileEntity(aWorld, aX, aY, aZ); + + if (!aWorld.isRemote) { + if (aThis.hasUpdatedRecently() && !aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { + aWorld.scheduleBlockUpdate(aX, aY, aZ, this, 4); + } else if (!aThis.hasUpdatedRecently() && aWorld.isBlockIndirectlyGettingPowered(aX, aY, aZ)) { + aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 2); + } + } + } + + /** + * Ticks the block if it's been scheduled + */ + public void updateTick(World aWorld, int aX, int aY, int aZ, Random p_149674_5_) { + TileEntityRedstoneHandler aTile = getTileEntity(aWorld, aX, aY, aZ); + // Client side handling + if (aTile != null) { + this.setLightLevel(aTile.getLightBrightness()); + } + // Only continue on server + if (aWorld.isRemote) { + return; + } + if (aTile != null) { + if (aTile.isGettingIndirectlyPowered()) { + } + } + } + + public TileEntityRedstoneHandler getTileEntity(IBlockAccess world, int aX, int aY, int aZ) { + TileEntity aTemp = world.getTileEntity(aX, aY, aZ); + if (aTemp != null) { + if (aTemp instanceof TileEntityRedstoneHandler) { + TileEntityRedstoneHandler g = (TileEntityRedstoneHandler) aTemp; + if (g != null) { + return g; + } + } + } + return null; + } + + + /** + * Gets an item for the block being called on. Args: world, x, y, z + */ + @SideOnly(Side.CLIENT) + @Override + public abstract Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_); + + /** + * Returns an item stack containing a single instance of the current block type. + * 'i' is the block's subtype/damage and is ignored for blocks which do not + * support subtypes. Blocks which cannot be harvested should return null. + */ + @Override + protected abstract ItemStack createStackedBlock(int p_149644_1_); + + @Override + public abstract ArrayList getDrops(final World world, final int x, final int y, final int z, final int metadata, final int fortune); + + @Override + public abstract Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_); + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java new file mode 100644 index 0000000000..43247110f1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneDetector.java @@ -0,0 +1,131 @@ +package gtPlusPlus.core.block.general.redstone; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Random; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockGenericRedstoneDetector extends BlockGenericRedstone { + + public BlockGenericRedstoneDetector() { + super("detector", "Redstone Detector"); + setTickRandomly(true); + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileEntityRedstoneDetector(); + } + + public class TileEntityRedstoneDetector extends TileEntityRedstoneHandler { + public TileEntityRedstoneDetector() { + super(0); + } + + @Override + protected Class getTileEntityClass() { + return this.getClass(); + } + + @Override + protected String getTileEntityNameForRegistration() { + return "TileEntityRedstoneDetector"; + } + } + + @Override + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List aList) { + aList.add(ItemUtils.getSimpleStack(this)); + } + + + @Override + public void updateTick(World aWorld, int aX, int aY, int aZ, Random aRand) { + super.updateTick(aWorld, aX, aY, aZ, aRand); + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + // TODO Auto-generated method stub + return ItemUtils.getSimpleStack(this).getItem(); + } + + @Override + public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { + // TODO Auto-generated method stub + return ItemUtils.getSimpleStack(this).getItem(); + } + + @Override + protected ItemStack createStackedBlock(int p_149644_1_) { + return ItemUtils.simpleMetaStack(this, p_149644_1_, 1); + } + + public void generateTextureArray(final IIconRegister iicon) { + HashMap> aTextures = new HashMap>(); + + + //New Block for Each Meta + int aMeta = 0; + { + HashMap aTempMap = new HashMap(); + aTempMap.put(ForgeDirection.UP, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.DOWN, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.NORTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.SOUTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.EAST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.WEST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTextures.put(aMeta++, aTempMap); + } + + } + + @Override + public IIcon getIcon(int side, int meta) { + HashMap aTemp = getTextureArray().get(meta); + if (aTemp != null) { + IIcon aSide = aTemp.get(ForgeDirection.getOrientation(side)); + if (aSide != null) { + return aSide; + } + else { + //Smart calculate missing sides + if (side <= 1) { + for (int ss = 0; ss < 2; ss++) { + aSide = aTemp.get(ForgeDirection.getOrientation(side)); + if (aSide != null) { + return aSide; + } + } + } + for (int ss = 2; ss < 6; ss++) { + aSide = aTemp.get(ForgeDirection.getOrientation(side)); + if (aSide != null) { + return aSide; + } + } + } + } + return blockIcon; + } + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + ArrayList aDrops = new ArrayList(); + aDrops.add(ItemUtils.getSimpleStack(this)); + return aDrops; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java new file mode 100644 index 0000000000..df8a929302 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java @@ -0,0 +1,5 @@ +package gtPlusPlus.core.block.general.redstone; + +public class BlockGenericRedstoneEmitter { + +} diff --git a/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java new file mode 100644 index 0000000000..0f1f983cd0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java @@ -0,0 +1,201 @@ +package gtPlusPlus.core.block.general.redstone; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.world.explosions.ExplosionHandler; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockGenericRedstoneTest extends BlockGenericRedstone { + + public BlockGenericRedstoneTest() { + super("test", "Redstone Test"); + setTickRandomly(true); + } + + @Override + public TileEntity createNewTileEntity(World world, int p_149915_2_) { + return new TileEntityRedstoneTest(); + } + + public class TileEntityRedstoneTest extends TileEntityRedstoneHandler { + public TileEntityRedstoneTest() { + super(2); + } + + @Override + public boolean isScrewdriverable() { + return true; + } + + @Override + public boolean onScrewdriverLMB() { + return super.onScrewdriverLMB(); + } + + @Override + public boolean onScrewdriverRMB() { + if (this.mLightValue + 0.0625f <= 1) { + this.mLightValue += 0.0625f; + } + else { + this.mLightValue = 0; + } + this.markForUpdate(); + return true; + } + + @Override + public boolean isMalletable() { + return true; + } + + @Override + public boolean onMalletLMB() { + return super.onMalletLMB(); + } + + @Override + public boolean onMalletRMB() { + this.mLightMode = Utils.invertBoolean(mLightMode); + this.markForUpdate(); + return mLightMode; + } + + @Override + public boolean isWrenchable() { + return true; + } + + @Override + public boolean onWrenchLMB() { + return super.onWrenchLMB(); + } + + @Override + public boolean onWrenchRMB() { + Logger.INFO("Found Wrench"); + ExplosionHandler explode = new ExplosionHandler(); + explode.createExplosion(this.worldObj, null, this.xCoord, this.yCoord, this.zCoord, 1f, false, true); + return true; + } + + @Override + protected Class getTileEntityClass() { + return this.getClass(); + } + + @Override + protected String getTileEntityNameForRegistration() { + return "TileEntityRedstoneTest"; + } + + @Override + public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { + return super.isProvidingWeakPower(world, x, y, z, side); + } + + @Override + public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { + return super.isProvidingStrongPower(world, x, y, z, side); + } + } + + @SuppressWarnings("unchecked") + @Override + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List aList) { + aList.add(ItemUtils.getSimpleStack(this)); + } + + + @Override + public void updateTick(World aWorld, int aX, int aY, int aZ, Random aRand) { + super.updateTick(aWorld, aX, aY, aZ, aRand); + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + return ItemUtils.getSimpleStack(this).getItem(); + } + + @Override + public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { + return ItemUtils.getSimpleStack(this).getItem(); + } + + @Override + protected ItemStack createStackedBlock(int p_149644_1_) { + return ItemUtils.simpleMetaStack(this, p_149644_1_, 1); + } + + public void generateTextureArray(final IIconRegister iicon) { + HashMap> aTextures = new HashMap>(); + + + //New Block for Each Meta + int aMeta = 0; + { + HashMap aTempMap = new HashMap(); + aTempMap.put(ForgeDirection.UP, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.DOWN, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.NORTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.SOUTH, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.EAST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTempMap.put(ForgeDirection.WEST, iicon.registerIcon(CORE.MODID + ":" + "redstone/redstone_meter/" + "top")); + aTextures.put(aMeta++, aTempMap); + } + + } + + @Override + public IIcon getIcon(int side, int meta) { + HashMap aTemp = getTextureArray().get(meta); + if (aTemp != null) { + IIcon aSide = aTemp.get(ForgeDirection.getOrientation(side)); + if (aSide != null) { + return aSide; + } + else { + //Smart calculate missing sides + if (side <= 1) { + for (int ss = 0; ss < 2; ss++) { + aSide = aTemp.get(ForgeDirection.getOrientation(side)); + if (aSide != null) { + return aSide; + } + } + } + for (int ss = 2; ss < 6; ss++) { + aSide = aTemp.get(ForgeDirection.getOrientation(side)); + if (aSide != null) { + return aSide; + } + } + } + } + return blockIcon; + } + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int metadata, int fortune) { + ArrayList aDrops = new ArrayList(); + aDrops.add(ItemUtils.getSimpleStack(this)); + return aDrops; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java b/src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java new file mode 100644 index 0000000000..a4ed895b13 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java @@ -0,0 +1,42 @@ +package gtPlusPlus.core.block.machine; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.world.IBlockAccess; + +import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; +import gtPlusPlus.core.block.base.MetaBlock; +import gtPlusPlus.core.lib.CORE; + +public class BlockGtFrameBox extends MetaBlock { + + private int[] colours; + private int totalColours; + + public BlockGtFrameBox( + final String unlocalizedName, final Material material, + final BlockTypes blockTypeENUM, final boolean recolour, final int... colour) { + super(unlocalizedName, material, blockTypeENUM.getBlockSoundType()); + this.setBlockTextureName(CORE.MODID + ":" + "blockGtFrame"); + this.setHarvestLevel(blockTypeENUM.getHarvestTool(), 2); + if (recolour && ((colour != null) && (colour.length > 0))){ + this.colours = colour; + this.totalColours = this.colours.length; + } + } + + @Override + public int colorMultiplier(final IBlockAccess p_149720_1_, final int p_149720_2_, + final int p_149720_3_, final int p_149720_4_) { + for (final int i : this.colours){ + + } + return super.colorMultiplier(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java b/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java new file mode 100644 index 0000000000..7d8b3eb708 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/CircuitProgrammer.java @@ -0,0 +1,159 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.LanguageRegistry; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.minecraft.CubicObject; +import gtPlusPlus.core.block.base.BasicTileBlockWithTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +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; + +public class CircuitProgrammer extends BasicTileBlockWithTooltip { + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 4; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public CircuitProgrammer(){ + super(Material.iron); + LanguageRegistry.addName(this, "Circuit Programmer"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + else { + + boolean mDidScrewDriver = false; + // Check For Screwdriver + try { + final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); + final Item mHandItem = mHandStack.getItem(); + if (((mHandItem instanceof GT_MetaGenerated_Tool_01) + && ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { + final TileEntityCircuitProgrammer tile = (TileEntityCircuitProgrammer) world.getTileEntity(x, y, z); + if (tile != null) { + mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); + } + } + } + catch (final Throwable t) {} + + if (!mDidScrewDriver) { + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityCircuitProgrammer)){ + player.openGui(GTplusplus.instance, GuiHandler.GUI8, world, x, y, z); + return true; + } + } + else { + return true; + } + + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityCircuitProgrammer(); + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityCircuitProgrammer) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public int getMetaCount() { + return 0; + } + + @Override + public String getUnlocalBlockName() { + return "blockCircuitProgrammer"; + } + + @Override + protected float initBlockHardness() { + return 5f; + } + + @Override + protected float initBlockResistance() { + return 1f; + } + + @Override + protected CreativeTabs initCreativeTab() { + return AddToCreativeTab.tabMachines; + } + + @Override + protected String getTileEntityName() { + return "Circuit Programmer"; + } + + @Override + public CubicObject[] getCustomTextureDirectoryObject() { + String[] aTexData = new String[] { + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_G", + CORE.MODID + ":" + "metro/" + "TEXTURE_TECH_PANEL_B", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_I" + }; + CubicObject[] aTextureData = new CubicObject[] {new CubicObject(aTexData)}; + return aTextureData; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java b/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java new file mode 100644 index 0000000000..15d330defc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/DecayablesChest.java @@ -0,0 +1,223 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.client.renderer.RenderDecayChest; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import gtPlusPlus.core.util.minecraft.InventoryUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class DecayablesChest extends BlockContainer implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 5; + public final int field_149956_a = 0; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public DecayablesChest() + { + super(Material.iron); + this.setBlockName("blockDecayablesChest"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setHardness(5f); + this.setResistance(1f); + GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockDecayablesChest"); + LanguageRegistry.addName(this, "Lead Lined Box"); + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); + + } + + /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two + * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + */ + public boolean isOpaqueCube() + { + return false; + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() + { + return false; + } + + /** + * The type of render function that is called for this block + */ + @SideOnly(Side.CLIENT) + public int getRenderType(){ + try { + if (RenderDecayChest.INSTANCE != null){ + return RenderDecayChest.INSTANCE.mRenderID; + } + return super.getRenderType(); + } + catch (NullPointerException n) { + return 0; + } + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, y, z + */ + public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) + { + if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this) + { + this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F); + } + else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this) + { + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F); + } + else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this) + { + this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); + } + else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this) + { + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F); + } + else + { + this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); + } + } + + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : this.textureFront); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_top"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_top"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_side"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "DecayablesChest_bottom"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityDecayablesChest)){ + player.openGui(GTplusplus.instance, GuiHandler.GUI13, world, x, y, z); + return true; + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityDecayablesChest(); + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { + InventoryUtils.dropInventoryItems(world, x, y, z, block); + super.breakBlock(world, x, y, z, block, number); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityDecayablesChest) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + /*@Override + public void breakBlock(World world, BlockPos pos, IBlockState blockstate) { + TileEntityFishTrap te = (TileEntityFishTrap) world.getTileEntity(pos); + InventoryHelper.dropInventoryItems(world, pos, te); + super.breakBlock(world, pos, blockstate); + } + + + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityFishTrap) worldIn.getTileEntity(pos)).setCustomName(stack.getDisplayName()); + } + }*/ + + /** + * Update Chest Meta - Stub + * @param aWorld + * @param xPos + * @param yPos + * @param zPos + */ + @Deprecated + public void func_149954_e(World aWorld, int xPos, int yPos, int zPos) + { + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/EggBox.java b/src/main/java/gtPlusPlus/core/block/machine/EggBox.java new file mode 100644 index 0000000000..630c4b5bc2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/EggBox.java @@ -0,0 +1,175 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import gtPlusPlus.core.util.minecraft.InventoryUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class EggBox extends BlockContainer implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 7; + public final int field_149956_a = 0; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public EggBox(){ + super(Material.wood); + this.setBlockName("blockEggBox"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setHardness(5f); + this.setResistance(1f); + GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockEggBox"); + LanguageRegistry.addName(this, "Egg Box"); + + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() + { + return true; + } + + /** + * The type of render function that is called for this block + */ + @SideOnly(Side.CLIENT) + public int getRenderType(){ + return super.getRenderType(); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : this.textureFront; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_top"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_top"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_side"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "EggBox_side"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityEggBox)){ + player.openGui(GTplusplus.instance, GuiHandler.GUI17, world, x, y, z); + return true; + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 0; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityEggBox(); + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { + InventoryUtils.dropInventoryItems(world, x, y, z, block); + super.breakBlock(world, x, y, z, block, number); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityEggBox) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + /*@Override + public void breakBlock(World world, BlockPos pos, IBlockState blockstate) { + TileEntityFishTrap te = (TileEntityFishTrap) world.getTileEntity(pos); + InventoryHelper.dropInventoryItems(world, pos, te); + super.breakBlock(world, pos, blockstate); + } + + + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityFishTrap) worldIn.getTileEntity(pos)).setCustomName(stack.getDisplayName()); + } + }*/ + + /** + * Update Chest Meta - Stub + * @param aWorld + * @param xPos + * @param yPos + * @param zPos + */ + @Deprecated + public void func_149954_e(World aWorld, int xPos, int yPos, int zPos) + { + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java b/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java new file mode 100644 index 0000000000..037ec61ced --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/FishTrap.java @@ -0,0 +1,152 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; +import gtPlusPlus.core.util.minecraft.InventoryUtils; + +public class FishTrap extends BlockContainer implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 0; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public FishTrap() + { + super(Material.iron); + this.setBlockName("blockFishTrap"); + this.setHardness(5f); + this.setResistance(1f); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockFishTrap"); + LanguageRegistry.addName(this, "Fish Catcher"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "fishtrap"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityFishTrap)){ + player.openGui(GTplusplus.instance, 5, world, x, y, z); + return true; + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityFishTrap(); + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { + InventoryUtils.dropInventoryItems(world, x, y, z, block); + super.breakBlock(world, x, y, z, block, number); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityFishTrap) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + /*@Override + public void breakBlock(World world, BlockPos pos, IBlockState blockstate) { + TileEntityFishTrap te = (TileEntityFishTrap) world.getTileEntity(pos); + InventoryHelper.dropInventoryItems(world, pos, te); + super.breakBlock(world, pos, blockstate); + } + + + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityFishTrap) worldIn.getTileEntity(pos)).setCustomName(stack.getDisplayName()); + } + }*/ + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/HeliumGenerator.java b/src/main/java/gtPlusPlus/core/block/machine/HeliumGenerator.java new file mode 100644 index 0000000000..5dc8604a93 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/HeliumGenerator.java @@ -0,0 +1,95 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator; + +public class HeliumGenerator extends BlockContainer +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + + @SuppressWarnings("deprecation") + public HeliumGenerator() + { + super(Material.wood); + this.setBlockName("blockHeliumGenerator"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, "blockHeliumGenerator"); + LanguageRegistry.addName(this, "Helium Generator"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "Chrono/" + "CyberPanel"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityHeliumGenerator)){ //TODO + player.openGui(GTplusplus.instance, 1, world, x, y, z); //TODO + return true; + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityHeliumGenerator(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java new file mode 100644 index 0000000000..6f60d39ce7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java @@ -0,0 +1,103 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; + +public class Machine_ModularityTable extends BlockContainer implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 1; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public Machine_ModularityTable() + { + super(Material.iron); + this.setBlockName("blockModularity"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockModularity"); + LanguageRegistry.addName(this, "Modularity Configurator"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_side"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_top"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_output"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "ModularTable_side"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz){ + if (world.isRemote) { + return true; + } + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityModularityTable)){ + player.openGui(GTplusplus.instance, 1, world, x, y, z); + Logger.INFO("Player opened GUI"); + return true; + } + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityModularityTable(); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java new file mode 100644 index 0000000000..11fa80f439 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_PestKiller.java @@ -0,0 +1,137 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; +import gtPlusPlus.core.util.minecraft.InventoryUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class Machine_PestKiller extends BlockContainer implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 6; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public Machine_PestKiller() + { + super(Material.wood); + this.setBlockName("blockPestKiller"); + this.setHardness(5f); + this.setResistance(1f); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockPestKiller"); + LanguageRegistry.addName(this, "Pest Killer"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int aSide, final int p_149691_2_) + { + return aSide == 1 ? this.textureTop : (aSide == 0 ? this.textureBottom : this.textureFront); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_PESTKILLER_TOP"); + this.textureBottom = p_149651_1_.registerIcon("planks_acacia"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityPestKiller)){ + player.openGui(GTplusplus.instance, GuiHandler.GUI15, world, x, y, z); + return true; + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 0; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityPestKiller(); + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public void breakBlock(final World world, final int x, final int y, final int z, final Block block, final int number) { + InventoryUtils.dropInventoryItems(world, x, y, z, block); + super.breakBlock(world, x, y, z, block, number); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityPestKiller) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_PooCollector.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_PooCollector.java new file mode 100644 index 0000000000..945cf7b581 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_PooCollector.java @@ -0,0 +1,182 @@ +package gtPlusPlus.core.block.machine; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityAdvPooCollector; +import gtPlusPlus.core.tileentities.machines.TileEntityBaseFluidCollector; +import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class Machine_PooCollector extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureTop2; + @SideOnly(Side.CLIENT) + private IIcon textureSide; + @SideOnly(Side.CLIENT) + private IIcon textureSide2; + + public Machine_PooCollector() { + super(Material.iron); + this.setHardness(5f); + this.setResistance(1f); + this.setBlockName("blockPooCollector"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockMeta.class,"blockPooCollector"); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int aSide, final int aMeta) { + if (aMeta <= 7) { + blockIcon = textureSide; + return aSide <= 1 ? this.textureTop : this.textureSide; + } + else { + blockIcon = textureSide2; + return aSide <= 1 ? this.textureTop2 : this.textureSide2; + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) { + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_top"); + this.textureTop2 = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_adv_top"); + this.textureSide = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_sides"); + this.textureSide2 = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "sewer_adv_sides"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, + final int side, final float lx, final float ly, final float lz) { + if (world.isRemote) { + return true; + } else { + TileEntityBaseFluidCollector tank = (TileEntityBaseFluidCollector) world.getTileEntity(x, y, z); + if (tank != null) { + Item handItem; + try { + handItem = player.getHeldItem().getItem(); + } catch (Throwable t) { + handItem = null; + } + + //Fluid container code + /*if (handItem != null + && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer + || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) { + if (tank.tank.getFluid() == null) { + try { + if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())) { + ItemStack handItemStack = player.getHeldItem(); + IFluidContainerItem container = (IFluidContainerItem) handItem; + FluidStack containerFluid = container.getFluid(handItemStack); + container.drain(handItemStack, container.getFluid(handItemStack).amount, true); + tank.tank.setFluid(containerFluid); + } else { + ItemStack handItemStack = player.getHeldItem(); + FluidContainerRegistry.drainFluidContainer(handItemStack); + FluidStack containerFluid = FluidContainerRegistry.getFluidForFilledItem(handItemStack); + ItemStack emptyContainer = FluidContainerRegistry.drainFluidContainer(handItemStack); + player.setItemInUse(emptyContainer, 0); + + tank.tank.setFluid(containerFluid); + } + } catch (Throwable t) { + t.printStackTrace(); + } + } + + }*/ + + if (!tank.mInventory.isEmpty()) { + PlayerUtils.messagePlayer(player, "Inventory contains:"); + PlayerUtils.messagePlayer(player, ItemUtils.getArrayStackNames(tank.mInventory.getRealInventory())); + } + else { + PlayerUtils.messagePlayer(player, "No solids collected yet."); + } + if (tank.tank.getFluid() != null) { + PlayerUtils.messagePlayer(player, "Tank contains " + tank.tank.getFluidAmount() + "L of " + + tank.tank.getFluid().getLocalizedName()); + } + } + } + return true; + } + + @Override + public int getRenderBlockPass() { + return 0; + } + + @Override + public boolean isOpaqueCube() { + return super.isOpaqueCube(); + } + + @Override + public TileEntity createNewTileEntity(final World world, final int aMeta) { + return aMeta <= 7 ? new TileEntityPooCollector() : new TileEntityAdvPooCollector(); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public int getBlockColor() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int damageDropped(final int damage) { + return damage; + } + + @Override + public Item getItemDropped(final int meta, final Random rand, final int fortune) { + return Item.getItemFromBlock(this); + } + + @Override + public int getRenderColor(int aMeta) { + return super.getRenderColor(aMeta); + } + + @Override + public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { + aList.add(new ItemStack(aItem, 1, 0)); + aList.add(new ItemStack(aItem, 1, 8)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java new file mode 100644 index 0000000000..fdb6b1a0a8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java @@ -0,0 +1,164 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import ic2.core.item.tool.ItemToolWrench; + +@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") +public class Machine_ProjectTable extends BlockContainer implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 3; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @SuppressWarnings("deprecation") + public Machine_ProjectTable() + { + super(Material.iron); + this.setBlockName("blockProjectBench"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockProjectBench"); + LanguageRegistry.addName(this, "Project Workbench"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + + ItemStack heldItem = null; + if (world.isRemote){ + heldItem = PlayerUtils.getItemStackInPlayersHand(); + } + + boolean holdingWrench = false; + + if (heldItem != null){ + holdingWrench = isWrench(heldItem); + } + + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityProjectTable)) + { + if (!holdingWrench){ + player.openGui(GTplusplus.instance, 0, world, x, y, z); + return true; + } + Logger.INFO("Holding a Wrench, doing wrench things instead."); + } + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityProjectTable(); + } + + public static boolean isWrench(final ItemStack item){ + if (item.getItem() instanceof ItemToolWrench){ + return true; + } + if (LoadedMods.BuildCraft){ + return checkBuildcraftWrench(item); + } + if (LoadedMods.EnderIO){ + return checkEnderIOWrench(item); + } + return false; + } + + @Optional.Method(modid = "EnderIO") + private static boolean checkEnderIOWrench(final ItemStack item) { + if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { + Class wrenchClass; + wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); + if (wrenchClass.isInstance(item.getItem())) { + return true; + } + } + return false; + } + + @Optional.Method(modid = "Buildcraft") + private static boolean checkBuildcraftWrench(final ItemStack item) { + if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { + Class wrenchClass; + wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); + if (wrenchClass.isInstance(item.getItem())) { + return true; + } + } + return false; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java new file mode 100644 index 0000000000..dc87b885b9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_RoundRobinator.java @@ -0,0 +1,131 @@ +package gtPlusPlus.core.block.machine; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.CubicObject; +import gtPlusPlus.core.block.base.BasicTileBlockWithTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.itemblock.ItemBlockRoundRobinator; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class Machine_RoundRobinator extends BasicTileBlockWithTooltip { + + + public Machine_RoundRobinator(){ + super(Material.iron); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + else { + + boolean mDidScrewDriver = false; + // Check For Screwdriver + try { + final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); + if (ItemUtils.isToolScrewdriver(mHandStack)) { + final TileEntityRoundRobinator tile = (TileEntityRoundRobinator) world.getTileEntity(x, y, z); + if (tile != null) { + mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); + } + } + } + catch (final Throwable t) {} + + if (!mDidScrewDriver) { + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityRoundRobinator)){ + return ((TileEntityRoundRobinator) te).onRightClick((byte) side, player, x, y, z); + } + return false; + } + else { + return true; + } + } + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityRoundRobinator(); + } + + @Override + public int getMetaCount() { + return 5; + } + + @Override + public String getUnlocalBlockName() { + return "blockRoundRobinator"; + } + + @Override + protected float initBlockHardness() { + return 1; + } + + @Override + protected float initBlockResistance() { + return 1; + } + + @Override + protected CreativeTabs initCreativeTab() { + return AddToCreativeTab.tabMachines; + } + + @Override + public int getTooltipID() { + return -1; + } + + @Override + protected String getTileEntityName() { + return "Round Robinator"; + } + + @Override + public Class getItemBlockClass() { + return ItemBlockRoundRobinator.class; + } + + @Override + public CubicObject[] getCustomTextureDirectoryObject() { + AutoMap aTemp = new AutoMap(); + for (int i=0;i<5;i++) { + String[] aTexData = new String[] { + CORE.MODID + ":" + "TileEntities/RoundRobinator/Top_"+i, + CORE.MODID + ":" + "TileEntities/RoundRobinator/Top_"+i, + CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, + CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, + CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, + CORE.MODID + ":" + "TileEntities/RoundRobinator/Side_"+i, + }; + aTemp.put(aTexData); + } + AutoMap> aTemp2 = new AutoMap>(); + for (String[] y : aTemp) { + aTemp2.put(new CubicObject(y)); + } + CubicObject[] aTextureData = new CubicObject[] {aTemp2.get(0), aTemp2.get(1), aTemp2.get(2), aTemp2.get(3), aTemp2.get(4)}; + return aTextureData; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java new file mode 100644 index 0000000000..021279f820 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java @@ -0,0 +1,579 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.inventories.Inventory_SuperJukebox; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockJukebox; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemRecord; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class Machine_SuperJukebox extends BlockJukebox +{ + @SideOnly(Side.CLIENT) + private IIcon mIcon; + + public Machine_SuperJukebox(){ + this.setBlockName("blockSuperJukebox"); + this.setCreativeTab(CreativeTabs.tabRedstone); + setHardness(2.0F); + setResistance(10.0F); + setStepSound(soundTypePiston); + setBlockTextureName("jukebox"); + GameRegistry.registerBlock(this, "blockSuperJukebox"); + LanguageRegistry.addName(this, "Sir Mixalot [Jukebox]"); + } + + /** + * Gets the block's texture. Args: side, meta + */ + @SideOnly(Side.CLIENT) + public IIcon getIcon(int aSide, int aMeta) + { + return aSide == 1 ? this.mIcon : this.blockIcon; + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntitySuperJukebox)){ + player.openGui(GTplusplus.instance, GuiHandler.GUI14, world, x, y, z); + return true; + } + return false; + + + /* if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) + { + return false; + } + else + { + this.func_149925_e(aWorld, aX, aY, aZ); + return true; + }*/ + } + + /** + * Set the record in the {@link SuperJukebox} {@link TileEntity}. + */ + @Override + public final void func_149926_b(World aWorld, int aX, int aY, int aZ, ItemStack aStackToSet) { + setRecordInJukeBox(aWorld, aX, aY, aZ, aStackToSet); + } + + public void setRecordInJukeBox(World aWorld, int aX, int aY, int aZ, ItemStack aStackToSet) { + if (!aWorld.isRemote) { + TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, aY, aZ); + if (tileentityjukebox != null && aStackToSet.getItem() instanceof ItemRecord) { + tileentityjukebox.setCurrentRecord(aStackToSet.copy()); + //aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 1, 2); + } + } + } + + /** + * Function to handle playing of records. + */ + @Override + public final void func_149925_e(World aWorld, int aX, int aY, int aZ) { + playJukeboxRecord(aWorld, aX, aY, aZ); + } + + public void playJukeboxRecord(World aWorld, int aX, int aY, int aZ) { + if (!aWorld.isRemote) { + TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, + aY, aZ); + + if (tileentityjukebox != null) { + ItemStack itemstack = tileentityjukebox.func_145856_a(); + + if (itemstack != null) { + + + + aWorld.playAuxSFX(1005, aX, aY, aZ, Item.getIdFromItem(itemstack.getItem())); + //aWorld.playRecord((String) null, aX, aY, aZ); + //tileentityjukebox.func_145857_a((ItemStack) null); + //aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 0, 2); + /*float f = 0.7F; + double d0 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; + double d1 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.2D + 0.6D; + double d2 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; + ItemStack itemstack1 = itemstack.copy(); + EntityItem entityitem = new EntityItem(aWorld, (double) aX + d0, + (double) aY + d1, (double) aZ + d2, itemstack1); + entityitem.delayBeforeCanPickup = 10; + aWorld.spawnEntityInWorld(entityitem);*/ + } + } + } + } + + @Override + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) + { + this.func_149925_e(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_); + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + } + + /** + * Drops the block items with a specified chance of dropping the specified items + */ + @Override + public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) + { + if (!p_149690_1_.isRemote) + { + super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0); + } + } + + /** + * Returns a new instance of a block's tile entity class. Called on placing the block. + */ + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) + { + return new TileEntitySuperJukebox(); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(this.getTextureName() + "_side"); + this.mIcon = p_149651_1_.registerIcon(this.getTextureName() + "_top"); + } + + public static class TileEntitySuperJukebox extends TileEntityJukebox implements ISidedInventory { + + /** The number of players currently using this chest */ + public int numPlayersUsing; + private ItemStack mCurrentlyPlayingStack; + private final Inventory_SuperJukebox inventoryContents; + private String customName; + + + /* + * Important Data + */ + + public int a_TEST_INT_VAR_1; + public int a_TEST_INT_VAR_2; + public int a_TEST_INT_VAR_3; + public int a_TEST_INT_VAR_4; + + public boolean mIsPlaying = false; + public boolean mIsLooping = false; + public boolean a_TEST_BOOL_VAR_3; + public boolean a_TEST_BOOL_VAR_4; + + + + public TileEntitySuperJukebox() { + this.inventoryContents = new Inventory_SuperJukebox(); + } + + @Override + public void readFromNBT(NBTTagCompound aNBT) { + super.readFromNBT(aNBT); + + if (aNBT.hasKey("RecordItem", 10)) { + this.func_145857_a(ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("RecordItem"))); + } else if (aNBT.getInteger("Record") > 0) { + this.func_145857_a(new ItemStack(Item.getItemById(aNBT.getInteger("Record")), 1, 0)); + } + + this.inventoryContents.readFromNBT(aNBT.getCompoundTag("ContentsChest")); + if (aNBT.hasKey("CustomName", 8)) { + this.setCustomName(aNBT.getString("CustomName")); + } + + mIsPlaying = aNBT.getBoolean("mIsPlaying"); + mIsLooping = aNBT.getBoolean("mIsLooping"); + + + } + + @Override + public void writeToNBT(NBTTagCompound aNBT) { + super.writeToNBT(aNBT); + + if (this.getCurrentRecord() != null) { + aNBT.setTag("RecordItem", this.func_145856_a().writeToNBT(new NBTTagCompound())); + aNBT.setInteger("Record", Item.getIdFromItem(this.func_145856_a().getItem())); + } + + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + aNBT.setTag("ContentsChest", chestData); + if (this.hasCustomInventoryName()) { + aNBT.setString("CustomName", this.getCustomName()); + } + + aNBT.setBoolean("mIsPlaying", mIsPlaying); + aNBT.setBoolean("mIsLooping", mIsLooping); + + } + + /** + * Called to get the internal stack + */ + @Override + public ItemStack func_145856_a() { + return this.mCurrentlyPlayingStack; + } + + /** + * Called to get the internal stack, wraps vanilla function + * {@link func_145856_a}. + */ + public ItemStack getCurrentRecord() { + return func_145856_a(); + } + + /** + * Called to set the internal stack + */ + @Override + public void func_145857_a(ItemStack p_145857_1_) { + this.mCurrentlyPlayingStack = p_145857_1_; + this.markDirty(); + } + + /** + * Called to set the internal stack, wraps vanilla function + * {@link func_145857_a}. + */ + public void setCurrentRecord(ItemStack aStack) { + func_145857_a(aStack); + this.markDirty(); + } + + public Inventory_SuperJukebox getInventory() { + return this.inventoryContents; + } + + + + + + public boolean playRecord(ItemStack aRecord) { + + + + return false; + } + + public boolean stopRecord() { + return openDiscDrive(); + } + + public void setLoopState(boolean isShufflingForever) { + + + + } + + + //Play button pressed + public boolean jukeboxLogicUpdate() { + + if (this.worldObj.isRemote) { + return true; + } + + Logger.INFO("a"); + if (this.mIsPlaying || this.mIsLooping) { + return selectRecordToPlayFromInventoryAndSetViaVanillaHandler(); + } + else { + return stopRecord(); + } + } + + + //Determine which record to play + public boolean selectRecordToPlayFromInventoryAndSetViaVanillaHandler() { + AutoMap mValidRecords = new AutoMap(); + for (ItemStack g : this.getInventory().getInventory()) { + if (g != null) { + if (g.getItem() instanceof ItemRecord) { + mValidRecords.put(g); + } + } + } + + Logger.INFO("b1"); + //Select First Record + ItemStack aRecordToPlay; + if (mValidRecords.size() == 0) { + Logger.INFO("bX"); + return false; + } + else { + aRecordToPlay = mValidRecords.get(!mIsLooping ? 0 : MathUtils.randInt(0, (mValidRecords.size()-1))); + } + Logger.INFO("b2 - "+aRecordToPlay.getDisplayName()); + + int aSlotCounter = 0; + for (ItemStack g : this.getInventory().getInventory()) { + if (g != null && aSlotCounter <= 17) { + Logger.INFO("b3 - "+g.getDisplayName()); + if (GT_Utility.areStacksEqual(g, aRecordToPlay, true)) { + IInventory aThisInv = this.getInventory(); + if (aThisInv.getStackInSlot(20) != null) { + openDiscDrive(); + } + + GT_Utility.moveStackFromSlotAToSlotB(aThisInv, aThisInv, aSlotCounter, 20, (byte) 1, (byte) 1, (byte) 1, (byte) 1); + setCurrentRecord(aThisInv.getStackInSlot(20)); + + World aWorld = this.worldObj; + int aX = this.xCoord; + int aY = this.yCoord; + int aZ = this.zCoord; + if (!aWorld.isRemote) { + aRecordToPlay = this.func_145856_a(); + if (aRecordToPlay != null) { + aWorld.playAuxSFX(1005, aX, aY, aZ, Item.getIdFromItem(aRecordToPlay.getItem())); + this.markDirty(); + return true; + } + } + + Logger.INFO("b++"); + this.markDirty(); + return false; + } + } + aSlotCounter++; + } + + + Logger.INFO("b4"); + this.markDirty(); + return false; + } + + + public boolean genericMethodThree(Object a1, Object a2, Object a3, Object a4) { + return false; + } + + + public void vanillaStopJukebox() { + World aWorld = this.worldObj; + int aX = this.xCoord; + int aY = this.yCoord; + int aZ = this.zCoord; + if (!aWorld.isRemote) { + TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, aY, aZ); + if (tileentityjukebox != null) { + ItemStack aRecordToPlay = tileentityjukebox.func_145856_a(); + if (aRecordToPlay != null) { + aWorld.playAuxSFX(1005, aX, aY, aZ, 0); + aWorld.playRecord((String) null, aX, aY, aZ); + tileentityjukebox.func_145857_a((ItemStack) null); + this.markDirty(); + } + } + } + } + + public boolean openDiscDrive() { + int aSlotCounter = 17; + + ItemStack g; + + for (int i = 17; i >= 0; i--) { + g = this.getInventory().getInventory()[i]; + if (g == null && aSlotCounter >= 0) { + IInventory aThisInv = this.getInventory(); + GT_Utility.moveStackFromSlotAToSlotB(aThisInv, aThisInv, 20, i, (byte) 1, (byte) 1, (byte) 1, (byte) 1); + vanillaStopJukebox(); + Logger.INFO("b++"); + this.markDirty(); + return true; + + } + } + + + /*for (ItemStack g : this.getInventory().getInventory()) { + if (g == null && aSlotCounter >= 0) { + IInventory aThisInv = this.getInventory(); + GT_Utility.moveStackFromSlotAToSlotB(aThisInv, aThisInv, 20, aSlotCounter, (byte) 1, (byte) 1, (byte) 1, (byte) 1); + vanillaStopJukebox(); + Logger.INFO("b++"); + return true; + + } + aSlotCounter--; + } */ + this.markDirty(); + return false; + } + + + + + + + + + + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, + 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory()-3; + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + if (this.numPlayersUsing < 0) { + this.numPlayersUsing = 0; + } + if (!this.worldObj.isRemote) { + this.numPlayersUsing++; + } + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, + this.numPlayersUsing); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + if (!this.worldObj.isRemote) { + this.numPlayersUsing--; + } + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, + this.numPlayersUsing); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + if (slot >= 18) { + return false; + } + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + private final static int[] SIDED_SLOTS = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}; + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return SIDED_SLOTS; + + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + if (p_102007_1_ >= 18) { + return false; + } + return this.getInventory().isItemValidForSlot(p_102007_1_, p_102007_2_); + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + if (p_102008_1_ >= 18) { + return false; + } + return this.getInventory().isItemValidForSlot(p_102008_1_, p_102008_2_); + } + + public String getCustomName() { + return this.customName; + } + + public void setCustomName(final String customName) { + this.customName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.SuperJukebox"; + } + + @Override + public boolean hasCustomInventoryName() { + return (this.customName != null) && !this.customName.equals(""); + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_TradeTable.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_TradeTable.java new file mode 100644 index 0000000000..5195e0f18c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_TradeTable.java @@ -0,0 +1,86 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.base.BlockBaseNBT; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; + +public class Machine_TradeTable extends BlockBaseNBT implements ITileTooltip +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 2; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + public Machine_TradeTable(){ + super(Material.leaves, "blockTradeBench", "Trade-o-Mat"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_){ + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "workbench_top"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz){ + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityTradeTable)) + { + //Utils.LOG_INFO("Clicked on TE - ok"); + player.openGui(GTplusplus.instance, 6, world, x, y, z); + return true; + } + else { + Logger.INFO("Bad TE"); + } + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityTradeTable(); + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java new file mode 100644 index 0000000000..e964a9da01 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java @@ -0,0 +1,5 @@ +package gtPlusPlus.core.block.machine; + +public class Machine_WireiusDeletus { //A Block that removes GT Cable and Wire from it's inventory. + +} diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java new file mode 100644 index 0000000000..5c08612042 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java @@ -0,0 +1,152 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import ic2.core.item.tool.ItemToolWrench; + +@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") +public class Machine_Workbench extends BlockContainer +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + @SuppressWarnings("deprecation") + public Machine_Workbench() + { + super(Material.iron); + this.setBlockName("blockWorkbenchGT"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, "blockWorkbenchGT"); + LanguageRegistry.addName(this, "Bronze Workbench"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_top_crafting"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + + ItemStack heldItem = null; + if (world.isRemote){ + heldItem = PlayerUtils.getItemStackInPlayersHand(); + } + + boolean holdingWrench = false; + + if (heldItem != null){ + holdingWrench = isWrench(heldItem); + } + + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityWorkbench)) + { + if (!holdingWrench){ + player.openGui(GTplusplus.instance, 3, world, x, y, z); + return true; + } + Logger.INFO("Holding a Wrench, doing wrench things instead."); + } + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityWorkbench(); + } + + public static boolean isWrench(final ItemStack item){ + if (item.getItem() instanceof ItemToolWrench){ + return true; + } + if (LoadedMods.BuildCraft){ + return checkBuildcraftWrench(item); + } + if (LoadedMods.EnderIO){ + return checkEnderIOWrench(item); + } + return false; + } + + @Optional.Method(modid = "EnderIO") + private static boolean checkEnderIOWrench(final ItemStack item) { + if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { + Class wrenchClass; + wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); + if (wrenchClass.isInstance(item.getItem())) { + return true; + } + } + return false; + } + + @Optional.Method(modid = "Buildcraft") + private static boolean checkBuildcraftWrench(final ItemStack item) { + if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { + Class wrenchClass; + wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); + if (wrenchClass.isInstance(item.getItem())) { + return true; + } + } + return false; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java new file mode 100644 index 0000000000..af2f9f82e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java @@ -0,0 +1,111 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; + +public class Machine_WorkbenchAdvanced extends BlockContainer +{ + @SideOnly(Side.CLIENT) + private IIcon textureTop; + @SideOnly(Side.CLIENT) + private IIcon textureBottom; + @SideOnly(Side.CLIENT) + private IIcon textureFront; + + @SuppressWarnings("deprecation") + public Machine_WorkbenchAdvanced() + { + super(Material.iron); + this.setBlockName("blockWorkbenchGTAdvanced"); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerBlock(this, "blockWorkbenchGTAdvanced"); + LanguageRegistry.addName(this, "Advanced Workbench"); + + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) + { + return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister p_149651_1_) + { + this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); + this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); + this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); + this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + + /*final ItemStack heldItem = PlayerUtils.getItemStackInPlayersHand(player); + if (world.isRemote) { + return true; + } + boolean holdingWrench = false; + + if (heldItem != null){ + if (heldItem.getItem() instanceof ItemToolWrench){ + holdingWrench = true; + } + else if (heldItem.getItem() instanceof IToolWrench){ + holdingWrench = true; + } + else if (heldItem.getItem() instanceof ITool){ + holdingWrench = true; + } + else if (heldItem.getItem() instanceof GT_MetaGenerated_Tool){ + GT_MetaGenerated_Tool testTool = (GT_MetaGenerated_Tool) heldItem.getItem(); + if (testTool.canWrench(player, x, y, z)){ + holdingWrench = true; + } + } + else { + holdingWrench = false; + } + } + + + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityWorkbenchAdvanced)) + { + if (!holdingWrench){ + player.openGui(GTplusplus.instance, 4, world, x, y, z); + return true; + } + Utils.LOG_INFO("Holding a Wrench, doing wrench things instead."); + }*/ + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityWorkbenchAdvanced(128000, 2); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java new file mode 100644 index 0000000000..36ea2af7cc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java @@ -0,0 +1,169 @@ +package gtPlusPlus.core.block.machine; + +import cpw.mods.fml.common.registry.LanguageRegistry; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.minecraft.CubicObject; +import gtPlusPlus.core.block.base.BasicTileBlockWithTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui2; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class VolumetricFlaskSetter extends BasicTileBlockWithTooltip { + + /** + * Determines which tooltip is displayed within the itemblock. + */ + private final int mTooltipID = 8; + + @Override + public int getTooltipID() { + return this.mTooltipID; + } + + @Override + public Class getItemBlockClass() { + return ItemBlockBasicTile.class; + } + + @SuppressWarnings("deprecation") + public VolumetricFlaskSetter(){ + super(Material.iron); + LanguageRegistry.addName(this, "Volumetric Flask Configurator"); + } + + /** + * Called upon block activation (right click on the block.) + */ + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) + { + if (world.isRemote) { + return true; + } + else { + + boolean mDidScrewDriver = false; + // Check For Screwdriver + try { + final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); + final Item mHandItem = mHandStack.getItem(); + if (((mHandItem instanceof GT_MetaGenerated_Tool_01) + && ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { + final TileEntityVolumetricFlaskSetter tile = (TileEntityVolumetricFlaskSetter) world.getTileEntity(x, y, z); + if (tile != null) { + mDidScrewDriver = tile.onScrewdriverRightClick((byte) side, player, x, y, z); + } + } + } + catch (final Throwable t) {} + + if (!mDidScrewDriver) { + final TileEntity te = world.getTileEntity(x, y, z); + if ((te != null) && (te instanceof TileEntityVolumetricFlaskSetter)){ + player.openGui(GTplusplus.instance, GuiHandler.GUI18, world, x, y, z); + TileEntityVolumetricFlaskSetter aTile = (TileEntityVolumetricFlaskSetter) te; + //new Packet_VolumetricFlaskGui2(aTile, aTile.getCustomValue()); + return true; + } + } + else { + return true; + } + + } + return false; + } + + @Override + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { + return new TileEntityVolumetricFlaskSetter(); + } + + @Override + public void onBlockAdded(final World world, final int x, final int y, final int z) { + super.onBlockAdded(world, x, y, z); + } + + @Override + public void onBlockPlacedBy(final World world, final int x, final int y, final int z, final EntityLivingBase entity, final ItemStack stack) { + if (stack.hasDisplayName()) { + ((TileEntityVolumetricFlaskSetter) world.getTileEntity(x,y,z)).setCustomName(stack.getDisplayName()); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public int getMetaCount() { + return 0; + } + + @Override + public String getUnlocalBlockName() { + return "blockVolumetricFlaskSetter"; + } + + @Override + protected float initBlockHardness() { + return 5f; + } + + @Override + protected float initBlockResistance() { + return 1f; + } + + @Override + protected CreativeTabs initCreativeTab() { + return AddToCreativeTab.tabMachines; + } + + @Override + protected String getTileEntityName() { + return "Volumetric Flask Configurator"; + } + + @Override + public CubicObject[] getCustomTextureDirectoryObject() { + String[] aTexData = new String[] { + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_A", + CORE.MODID + ":" + "metro/" + "TEXTURE_TECH_PANEL_C", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H", + CORE.MODID + ":" + "metro/" + "TEXTURE_METAL_PANEL_H" + }; + CubicObject[] aTextureData = new CubicObject[] {new CubicObject(aTexData)}; + return aTextureData; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java b/src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java new file mode 100644 index 0000000000..b8f9662ac7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Head_Fake.java @@ -0,0 +1,159 @@ +package gtPlusPlus.core.block.machine.bedrock; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.DamageSource; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; + +public class Mining_Head_Fake extends Block{ + + public Mining_Head_Fake(){ + super(Material.lava); + this.setBlockName(Utils.sanitizeString("blockMiningHeadFake")); + this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt"); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setHardness(-1F); + this.setResistance(50000.0F); + this.setHarvestLevel("pickaxe", 10); + this.setStepSound(soundTypeMetal); + //LanguageRegistry.addName(this, "Wither Cage"); + GameRegistry.registerBlock(this, Utils.sanitizeString("blockMiningHeadFake")); + } + + public String GetProperName(){ + return "Hardened Mining Head"; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass(){ + return 1; + } + + @Override + public boolean isOpaqueCube(){ + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon){ + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt"); + } + + @Override + public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion){ + //prevent from being destroyed by wither and nukes. + } + + @Override + public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, + final int p_149723_3_, final int p_149723_4_, final Explosion p_149723_5_) { + + } + + @Override + public boolean canDropFromExplosion(final Explosion p_149659_1_) { + return false; + } + + @Override + public boolean canEntityDestroy(final IBlockAccess world, final int x, final int y, final int z, + final Entity entity) { + return false; + } + + + //Colour Handling + private static final int mWitherColour = Utils.rgbtoHexValue(175, 64, 32); + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + return mWitherColour; + } + + @Override + public int getRenderColor(final int aMeta) { + return mWitherColour; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public boolean isCollidable() { + return true; + } + + @Override + public void randomDisplayTick(World world, int posX, int posY, int posZ, + Random rand) { + generateVoidParticlesAroundBlockPos(new BlockPos(posX, posY, posZ, world), 2); + super.randomDisplayTick(world, posX, posY, posZ, rand); + } + + @Override + public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, + Entity ent) { + EntityUtils.doDamage(ent, DamageSource.outOfWorld, 20); + EntityUtils.setEntityOnFire(ent, 100); + super.onEntityCollidedWithBlock(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, ent); + } + + @Override + protected boolean canSilkHarvest() { + return false; + } + + @Override + public boolean canHarvestBlock(EntityPlayer player, int meta) { + return false; + } + + public static void generateVoidParticlesAroundBlockPos(BlockPos Pos, int range){ + for (BlockPos G : Pos.getSurroundingBlocks()) { + int i1 = G.xPos + MathUtils.randInt(0, range) - MathUtils.randInt(0, range); + int j1 = G.yPos + MathUtils.randInt(0, range) - MathUtils.randInt(0, range); + int k1 = G.zPos + MathUtils.randInt(0, range) - MathUtils.randInt(0, range); + + Block block = Pos.world.getBlock(i1, j1, k1); + + if (block.getMaterial() == Material.air){ + + //lava + if (Pos.yPos <= 7) { + Pos.world.spawnParticle("portal", (double)((float)i1 + CORE.RANDOM.nextFloat()), (double)((float)j1 + CORE.RANDOM.nextFloat()), (double)((float)k1 + CORE.RANDOM.nextFloat()), 0.0D, 0.0D, 0.0D); + Pos.world.spawnParticle("lava", (double)((float)i1 + CORE.RANDOM.nextFloat()), (double)((float)j1 + CORE.RANDOM.nextFloat()), (double)((float)k1 + CORE.RANDOM.nextFloat()), 0.0D, 0.0D, 0.0D); + } + else { + Pos.world.spawnParticle("portal", (double)((float)i1 + CORE.RANDOM.nextFloat()), (double)((float)j1 + CORE.RANDOM.nextFloat()), (double)((float)k1 + CORE.RANDOM.nextFloat()), 0.0D, 0.0D, 0.0D); + } + + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java b/src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java new file mode 100644 index 0000000000..bba185a0c1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/block/machine/bedrock/Mining_Pipe_Fake.java @@ -0,0 +1,136 @@ +package gtPlusPlus.core.block.machine.bedrock; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.DamageSource; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; + +public class Mining_Pipe_Fake extends Block{ + + public Mining_Pipe_Fake(){ + super(Material.cactus); + this.setBlockName(Utils.sanitizeString("blockMiningPipeFake")); + this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt"); + this.setCreativeTab(AddToCreativeTab.tabBlock); + this.setHardness(-1F); + this.setResistance(50000.0F); + this.setHarvestLevel("pickaxe", 8); + this.setStepSound(soundTypeMetal); + //LanguageRegistry.addName(this, "Wither Cage"); + GameRegistry.registerBlock(this, Utils.sanitizeString("blockMiningPipeFake")); + } + + public String GetProperName(){ + return "Hardened Mining Pipe"; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass(){ + return 1; + } + + @Override + public boolean isOpaqueCube(){ + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister iIcon){ + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt"); + } + + @Override + public void onBlockExploded(final World world, final int x, final int y, final int z, final Explosion explosion){ + //prevent from being destroyed by wither and nukes. + } + + @Override + public void onBlockDestroyedByExplosion(final World p_149723_1_, final int p_149723_2_, + final int p_149723_3_, final int p_149723_4_, final Explosion p_149723_5_) { + + } + + @Override + public boolean canDropFromExplosion(final Explosion p_149659_1_) { + return false; + } + + @Override + public boolean canEntityDestroy(final IBlockAccess world, final int x, final int y, final int z, + final Entity entity) { + return false; + } + + + //Colour Handling + private static final int mWitherColour = Utils.rgbtoHexValue(32, 32, 32); + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + return mWitherColour; + } + + @Override + public int getRenderColor(final int aMeta) { + return mWitherColour; + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public boolean isCollidable() { + return true; + } + + @Override + public void randomDisplayTick(World world, int posX, int posY, int posZ, + Random rand) { + Mining_Head_Fake.generateVoidParticlesAroundBlockPos(new BlockPos(posX, posY, posZ, world), 2); + super.randomDisplayTick(world, posX, posY, posZ, rand); + } + + @Override + public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity ent) { + if (MathUtils.randInt(0, 100) < 5) { + EntityUtils.doDamage(ent, DamageSource.outOfWorld, 1); + } + super.onEntityCollidedWithBlock(p_149670_1_, p_149670_2_, p_149670_3_, p_149670_4_, ent); + } + + @Override + protected boolean canSilkHarvest() { + return false; + } + + @Override + public boolean canHarvestBlock(EntityPlayer player, int meta) { + return false; + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java b/src/main/java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java new file mode 100644 index 0000000000..ddfe9b8227 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/chunkloading/GTPP_ChunkManager.java @@ -0,0 +1,217 @@ +package gtPlusPlus.core.chunkloading; + +import com.google.common.collect.HashMultimap; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Log; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.IChunkLoader; +import gtPlusPlus.core.lib.CORE; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommandSender; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeChunkManager; +import net.minecraftforge.common.ForgeChunkManager.Ticket; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.world.WorldEvent; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * + * This class handles re-initializing chunks after a server restart + * Credits to Repo-Alt for the original implementation. + * @author Repo-Alt, Alkalus + * + */ +public class GTPP_ChunkManager implements ForgeChunkManager.OrderedLoadingCallback, ForgeChunkManager.PlayerOrderedLoadingCallback { + + + private Map registeredTickets = new HashMap<>(); + + private static GTPP_ChunkManager instance = new GTPP_ChunkManager(); + + public static boolean enableChunkloaders = true; + public static boolean alwaysReloadChunkloaders = false; + public static boolean debugChunkloaders = false; + + public static void init() { + if (enableChunkloaders) { + ForgeChunkManager.setForcedChunkLoadingCallback(GTplusplus.instance, instance); + } + } + + @Override + public void ticketsLoaded(List tickets, World world) {} + + // Determine if tickets should be kept. Based on if the ticket is a machine or working chunk ticket. + // Working chunk tickets are tossed and re-created when the machine re-activates. + // Machine tickets are kept only if the config alwaysReloadChunkloaders is true. Otherwise + // machine chunks are tossed and re-created only when the machine re-activates, similar to a Passive Anchor. + @Override + public List ticketsLoaded(List tickets, World world, int maxTicketCount) { + List validTickets = new ArrayList<>(); + if (alwaysReloadChunkloaders) { + for (Ticket ticket : tickets) { + int x = ticket.getModData().getInteger("OwnerX"); + int y = ticket.getModData().getInteger("OwnerY"); + int z = ticket.getModData().getInteger("OwnerZ"); + if (y > 0) { + TileEntity tile = world.getTileEntity(x, y, z); + if (tile != null && tile instanceof IGregTechTileEntity && ((IGregTechTileEntity)tile).isAllowedToWork()) { + ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(x >> 4, z >> 4)); + if (!registeredTickets.containsKey(tile)) { + registeredTickets.put(tile, ticket); + if (((IGregTechTileEntity)tile).getMetaTileEntity() instanceof IChunkLoader) { + ForgeChunkManager.forceChunk(ticket, ((IChunkLoader)((IGregTechTileEntity)tile).getMetaTileEntity()).getResidingChunk()); + } + validTickets.add(ticket); + } + } + } + } + } + return validTickets; + } + + // Determine if player tickets should be kept. This is where a ticket list per player would be created and maintained. When + // a player join event occurs, their name/UUID/whatevs is compared against tickets on this list and those tickets reactivated. + // Since that info would be maintained/dealt with on a per-player startup, the list returned back to Forge is empty. + @Override + public ListMultimap playerTicketsLoaded(ListMultimap tickets, World world) { + // Not currently used, so just return an empty list. + return ArrayListMultimap.create(); + } + + // Request a chunk to be loaded for this machine + // may pass null chunk to load just the machine itself, if "alwaysReloadChunkloaders" is enabled in config + static public boolean requestPlayerChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ, String player) { + if (!enableChunkloaders) { + return false; + } + if (!alwaysReloadChunkloaders && chunkXZ == null) { + return false; + } + if (debugChunkloaders && chunkXZ != null) { + GT_Log.out.println("GT_ChunkManager: Chunk request: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); + } + if (instance.registeredTickets.containsKey(owner)) { + ForgeChunkManager.forceChunk(instance.registeredTickets.get(owner), chunkXZ); + } + else { + Ticket ticket = null; + if (player != "") { + ticket = ForgeChunkManager.requestPlayerTicket(GT_Mod.instance, player, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); + } + else { + ticket = ForgeChunkManager.requestTicket(GT_Mod.instance, owner.getWorldObj(), ForgeChunkManager.Type.NORMAL); + } + if (ticket == null) { + if (debugChunkloaders) { + GT_Log.out.println("GT_ChunkManager: ForgeChunkManager.requestTicket failed"); + } + return false; + } + if (debugChunkloaders) { + GT_Log.out.println("GT_ChunkManager: ticket issued for machine at: (" + owner.xCoord + ", " + owner.yCoord + ", " + owner.zCoord + ")" ); + } + NBTTagCompound tag = ticket.getModData(); + tag.setInteger("OwnerX", owner.xCoord); + tag.setInteger("OwnerY", owner.yCoord); + tag.setInteger("OwnerZ", owner.zCoord); + ForgeChunkManager.forceChunk(ticket, chunkXZ); + if (alwaysReloadChunkloaders) { + ForgeChunkManager.forceChunk(ticket, new ChunkCoordIntPair(owner.xCoord << 4, owner.zCoord << 4)); + } + instance.registeredTickets.put(owner, ticket); + } + return true; + } + + static public boolean requestChunkLoad(TileEntity owner, ChunkCoordIntPair chunkXZ) { + return requestPlayerChunkLoad(owner, chunkXZ, ""); + } + + static public void releaseChunk(TileEntity owner, ChunkCoordIntPair chunkXZ) { + if (!enableChunkloaders) { + return; + } + Ticket ticket = instance.registeredTickets.get(owner); + if (ticket != null) { + if (debugChunkloaders) { + GT_Log.out.println("GT_ChunkManager: Chunk release: (" + chunkXZ.chunkXPos + ", " + chunkXZ.chunkZPos + ")"); + } + ForgeChunkManager.unforceChunk(ticket, chunkXZ); + } + } + + static public void releaseTicket(TileEntity owner) { + if (!enableChunkloaders) { + return; + } + Ticket ticket = instance.registeredTickets.get(owner); + if (ticket != null) { + if (debugChunkloaders) { + GT_Log.out.println("GT_ChunkManager: ticket released by machine at: (" + owner.xCoord + ", " + owner.yCoord + ", " + owner.zCoord + ")" ); + for (ChunkCoordIntPair chunk : ticket.getChunkList()) { + GT_Log.out.println("GT_ChunkManager: Chunk release: (" + chunk.chunkXPos + ", " + chunk.chunkZPos + ")"); + } + } + ForgeChunkManager.releaseTicket(ticket); + instance.registeredTickets.remove(owner); + } + } + + public static void printTickets() { + if (!debugChunkloaders) { + return; + } + GT_Log.out.println("GT_ChunkManager: Start forced chunks dump:"); + instance.registeredTickets.forEach((machine, ticket) -> { + GT_Log.out.print("GT_ChunkManager: Chunks forced by the machine at (" + machine.xCoord + ", " + machine.yCoord + ", " + machine.zCoord + ")"); + if (ticket.isPlayerTicket()) { + GT_Log.out.print(" Owner: " + ticket.getPlayerName()); + } + GT_Log.out.print(" :"); + for (ChunkCoordIntPair c : ticket.getChunkList()) { + GT_Log.out.print("("); + GT_Log.out.print(c.chunkXPos); + GT_Log.out.print(", "); + GT_Log.out.print(c.chunkZPos); + GT_Log.out.print("), "); + } + }); + GT_Log.out.println("GT_ChunkManager: End forced chunks dump:"); + } + public static class DebugCommand extends CommandBase { + @Override + public String getCommandName() { + return "gtpp:dump_chunks"; + } + @Override + public int getRequiredPermissionLevel() { + return 0; + } + @Override + public String getCommandUsage(ICommandSender sender) { + return "/" + getCommandName(); + } + @Override + public void processCommand(ICommandSender sender, String[] args) { + printTickets(); + } + } +} diff --git a/src/main/java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java b/src/main/java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java new file mode 100644 index 0000000000..36d9fa670c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/chunkloading/StaticChunkFunctions.java @@ -0,0 +1,63 @@ +package gtPlusPlus.core.chunkloading; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.api.interfaces.IChunkLoader; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntityChunkLoader; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkCoordIntPair; + +public class StaticChunkFunctions { + + public static void saveNBTDataForTileEntity(IGregTechTileEntity aBaseMetaTileEntity, NBTTagCompound aNBT) { + IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); + aNBT.setBoolean("chunkLoadingEnabled", aTileEntity.getChunkLoadingActive()); + aNBT.setBoolean("isChunkloading", aTileEntity.getResidingChunk() != null); + if (aTileEntity.getResidingChunk() != null) { + aNBT.setInteger("loadedChunkXPos", aTileEntity.getResidingChunk().chunkXPos); + aNBT.setInteger("loadedChunkZPos", aTileEntity.getResidingChunk().chunkZPos); + } + } + + public static void loadNBTDataForTileEntity(IGregTechTileEntity aBaseMetaTileEntity, NBTTagCompound aNBT) { + IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); + if (aNBT.hasKey("chunkLoadingEnabled")) { + aTileEntity.setChunkLoadingActive(aNBT.getBoolean("chunkLoadingEnabled")); + } + if (aNBT.getBoolean("isChunkloading")) { + aTileEntity.setResidingChunk(new ChunkCoordIntPair(aNBT.getInteger("loadedChunkXPos"), aNBT.getInteger("loadedChunkZPos"))); + } + } + + public static void onRemoval(IGregTechTileEntity aBaseMetaTileEntity) { + IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); + if (aTileEntity.getChunkLoadingActive()) { + GTPP_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity); + } + } + + public static boolean onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); + if (aBaseMetaTileEntity.isServerSide() && aTileEntity.getResidingChunk() != null && !aTileEntity.getDoesWorkChunkNeedReload() && !aBaseMetaTileEntity.isAllowedToWork()) { + // if machine has stopped, stop chunkloading + GTPP_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity); + aTileEntity.setDoesWorkChunkNeedReload(true); + return false; + } + return true; + } + + public static void createInitialWorkingChunk(IGregTechTileEntity aBaseMetaTileEntity, int aChunkX, int aDrillZ) { + final int centerX = aChunkX >> 4; + final int centerZ = aDrillZ >> 4; + IChunkLoader aTileEntity = getChunkLoader(aBaseMetaTileEntity); + aTileEntity.addChunkToLoadedList(new ChunkCoordIntPair(centerX, centerZ)); + GTPP_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity.getMetaTileEntity(), aTileEntity.getResidingChunk()); + aTileEntity.setDoesWorkChunkNeedReload(false); + } + + private static final IChunkLoader getChunkLoader(IGregTechTileEntity aTile) { + return (IChunkLoader) ((IGregTechTileEntity)aTile).getMetaTileEntity(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java b/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java new file mode 100644 index 0000000000..400503b2fa --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/CustomTextureSet.java @@ -0,0 +1,28 @@ +package gtPlusPlus.core.client; + +import gregtech.api.enums.TextureSet; + +public class CustomTextureSet extends TextureSet { + + public static enum TextureSets { + + REFINED(), + GEM_A(), + ENRICHED(), + NUCLEAR; + + private final CustomTextureSet A; + + private TextureSets (){ + A = new CustomTextureSet(this.name().toUpperCase()); + } + public CustomTextureSet get() { + return A; + } + } + + public CustomTextureSet(String aSetName) { + super(aSetName); + } + +} diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java b/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java new file mode 100644 index 0000000000..ac64dee26a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java @@ -0,0 +1,120 @@ +package gtPlusPlus.core.client.model; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.entity.monster.EntityBatKing; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.passive.EntityBat; +import net.minecraft.util.MathHelper; + +@SideOnly(Side.CLIENT) +public class ModelBatKing extends ModelBase +{ + private ModelRenderer batHead; + /** The body box of the bat model. */ + private ModelRenderer batBody; + /** The inner right wing box of the bat model. */ + private ModelRenderer batRightWing; + /** The inner left wing box of the bat model. */ + private ModelRenderer batLeftWing; + /** The outer right wing box of the bat model. */ + private ModelRenderer batOuterRightWing; + /** The outer left wing box of the bat model. */ + private ModelRenderer batOuterLeftWing; + + public ModelBatKing() + { + this.textureWidth = 64; + this.textureHeight = 64; + + this.batHead = new ModelRenderer(this, 0, 0); + this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6); + ModelRenderer modelrenderer = new ModelRenderer(this, 24, 0); + modelrenderer.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1); + this.batHead.addChild(modelrenderer); + ModelRenderer modelrenderer1 = new ModelRenderer(this, 24, 0); + modelrenderer1.mirror = true; + modelrenderer1.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1); + this.batHead.addChild(modelrenderer1); + this.batBody = new ModelRenderer(this, 0, 16); + this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6); + this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1); + this.batRightWing = new ModelRenderer(this, 42, 0); + this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1); + this.batOuterRightWing = new ModelRenderer(this, 24, 16); + this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F); + this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1); + this.batLeftWing = new ModelRenderer(this, 42, 0); + this.batLeftWing.mirror = true; + this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1); + this.batOuterLeftWing = new ModelRenderer(this, 24, 16); + this.batOuterLeftWing.mirror = true; + this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F); + this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1); + this.batBody.addChild(this.batRightWing); + this.batBody.addChild(this.batLeftWing); + this.batRightWing.addChild(this.batOuterRightWing); + this.batLeftWing.addChild(this.batOuterLeftWing); + } + + /** + * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and + * it seems a good match for a bats size + */ + public int getBatSize() + { + return 72; + } + + /** + * Sets the models various rotation angles then renders the model. + */ + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) + { + EntityBatKing entitybat = (EntityBatKing)p_78088_1_; + float f6; + + if (entitybat.getIsBatHanging()) + { + f6 = (180F / (float)Math.PI); + this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI); + this.batHead.rotateAngleY = (float)Math.PI - p_78088_5_ / (180F / (float)Math.PI); + this.batHead.rotateAngleZ = (float)Math.PI; + this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F); + this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F); + this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F); + this.batBody.rotateAngleX = (float)Math.PI; + this.batRightWing.rotateAngleX = -0.15707964F; + this.batRightWing.rotateAngleY = -((float)Math.PI * 2F / 5F); + this.batOuterRightWing.rotateAngleY = -1.7278761F; + this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX; + this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; + this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY; + } + else + { + f6 = (180F / (float)Math.PI); + this.batHead.rotateAngleX = p_78088_6_ / (180F / (float)Math.PI); + this.batHead.rotateAngleY = p_78088_5_ / (180F / (float)Math.PI); + this.batHead.rotateAngleZ = 0.0F; + this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F); + this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F); + this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F); + this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(p_78088_4_ * 0.1F) * 0.15F; + this.batBody.rotateAngleY = 0.0F; + this.batRightWing.rotateAngleY = MathHelper.cos(p_78088_4_ * 1.3F) * (float)Math.PI * 0.25F; + this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; + this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F; + this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F; + } + + + GL11.glScalef(4, 4, 4); + this.batHead.render(p_78088_7_); + this.batBody.render(p_78088_7_); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java b/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java new file mode 100644 index 0000000000..c116dcf115 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/ModelDecayChest.java @@ -0,0 +1,46 @@ +package gtPlusPlus.core.client.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; + +@SideOnly(Side.CLIENT) +public class ModelDecayChest extends ModelBase +{ + /** The chest lid in the chest's model. */ + public ModelRenderer chestLid = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); + /** The model of the bottom of the chest. */ + public ModelRenderer chestBelow; + /** The chest's knob in the chest model. */ + public ModelRenderer chestKnob; + + public ModelDecayChest() + { + this.chestLid.addBox(0.0F, -5.0F, -14.0F, 14, 5, 14, 0.0F); + this.chestLid.rotationPointX = 1.0F; + this.chestLid.rotationPointY = 7.0F; + this.chestLid.rotationPointZ = 15.0F; + this.chestKnob = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64); + this.chestKnob.addBox(-1.0F, -2.0F, -15.0F, 2, 4, 1, 0.0F); + this.chestKnob.rotationPointX = 8.0F; + this.chestKnob.rotationPointY = 7.0F; + this.chestKnob.rotationPointZ = 15.0F; + this.chestBelow = (new ModelRenderer(this, 0, 19)).setTextureSize(64, 64); + this.chestBelow.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); + this.chestBelow.rotationPointX = 1.0F; + this.chestBelow.rotationPointY = 6.0F; + this.chestBelow.rotationPointZ = 1.0F; + } + + /** + * This method renders out all parts of the chest model. + */ + public void renderAll() + { + this.chestKnob.rotateAngleX = this.chestLid.rotateAngleX; + this.chestLid.render(0.0625F); + this.chestKnob.render(0.0625F); + this.chestBelow.render(0.0625F); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java b/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java new file mode 100644 index 0000000000..0aef4eb7b0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java @@ -0,0 +1,65 @@ +package gtPlusPlus.core.client.model; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; +import gtPlusPlus.core.client.renderer.tabula.RenderTabulaBase; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +/** + * ModelEggBox - Alkalus + * Created using Tabula 4.1.1 + */ +public class ModelEggBox extends ModelTabulaBase { + + private final AutoMap> mParts = new AutoMap>(); + + private static RenderTabulaBase mRendererInstance; + + public ModelRenderer bottom; + //EggBox_full.png + + public ModelEggBox() { + super(64, 64); + this.textureWidth = 64; + this.textureHeight = 64; + + this.bottom = new ModelRenderer(this, 0, 19); + this.bottom.setRotationPoint(1.0F, 6.0F, 1.0F); + this.bottom.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); + mParts.add(new Pair(bottom, 0f)); + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + //Logger.INFO("Rendering EggBox"); + this.bottom.render(f5); + } + + /** + * This is a helper function from Tabula to set the rotation of model parts + */ + public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } + + @Override + protected AutoMap> getModelParts() { + AutoMap> aParts = new AutoMap>(); + aParts.add(new Pair(bottom, 0.0625F)); + return aParts; + //return mParts; + } + + public static RenderTabulaBase getRenderer() { + if (mRendererInstance == null) { + mRendererInstance = new RenderTabulaBase(new ModelEggBox(), "textures/blocks/TileEntities/EggBox_full.png", TileEntityEggBox.class); + } + return mRendererInstance; + } +} diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java b/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java new file mode 100644 index 0000000000..f7fb92f550 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java @@ -0,0 +1,112 @@ +package gtPlusPlus.core.client.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.model.ModelChicken; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class ModelGiantChicken extends ModelChicken{ + + public ModelGiantChicken() + { + byte b0 = 16; + this.head = new ModelRenderer(this, 0, 0); + this.head.addBox(-2.0F, -6.0F, -2.0F, 4, 6, 3, 0.0F); + this.head.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); + this.bill = new ModelRenderer(this, 14, 0); + this.bill.addBox(-2.0F, -4.0F, -4.0F, 4, 2, 2, 0.0F); + this.bill.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); + this.chin = new ModelRenderer(this, 14, 4); + this.chin.addBox(-1.0F, -2.0F, -3.0F, 2, 2, 2, 0.0F); + this.chin.setRotationPoint(0.0F, (float)(-1 + b0), -4.0F); + this.body = new ModelRenderer(this, 0, 9); + this.body.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F); + this.body.setRotationPoint(0.0F, (float)b0, 0.0F); + this.rightLeg = new ModelRenderer(this, 26, 0); + this.rightLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); + this.rightLeg.setRotationPoint(-2.0F, (float)(3 + b0), 1.0F); + this.leftLeg = new ModelRenderer(this, 26, 0); + this.leftLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); + this.leftLeg.setRotationPoint(1.0F, (float)(3 + b0), 1.0F); + this.rightWing = new ModelRenderer(this, 24, 13); + this.rightWing.addBox(0.0F, 0.0F, -3.0F, 1, 4, 6); + this.rightWing.setRotationPoint(-4.0F, (float)(-3 + b0), 0.0F); + this.leftWing = new ModelRenderer(this, 24, 13); + this.leftWing.addBox(-1.0F, 0.0F, -3.0F, 1, 4, 6); + this.leftWing.setRotationPoint(4.0F, (float)(-3 + b0), 0.0F); + } + + /** + * Sets the models various rotation angles then renders the model. + */ + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) + { + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); + + if (this.isChild) + { + float f6 = 1.0F; + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 0F, 0F); + this.head.render(p_78088_7_); + this.bill.render(p_78088_7_); + this.chin.render(p_78088_7_); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); + GL11.glTranslatef(0.0F, 0F, 0.0F); + this.body.render(p_78088_7_); + this.rightLeg.render(p_78088_7_); + this.leftLeg.render(p_78088_7_); + this.rightWing.render(p_78088_7_); + this.leftWing.render(p_78088_7_); + GL11.glPopMatrix(); + //super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); + } + else + { + float f6 = 2.0F; + GL11.glPushMatrix(); + GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); + GL11.glTranslatef(0.0F, -0.85F, 0F); + this.head.render(p_78088_7_); + this.bill.render(p_78088_7_); + this.chin.render(p_78088_7_); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); + GL11.glTranslatef(0.0F, -0.75F, 0.0F); + this.body.render(p_78088_7_); + this.rightLeg.render(p_78088_7_); + this.leftLeg.render(p_78088_7_); + this.rightWing.render(p_78088_7_); + this.leftWing.render(p_78088_7_); + GL11.glPopMatrix(); + } + } + + /** + * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms + * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how + * "far" arms and legs can swing at most. + */ + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) + { + this.head.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); + this.head.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); + this.bill.rotateAngleX = this.head.rotateAngleX; + this.bill.rotateAngleY = this.head.rotateAngleY; + this.chin.rotateAngleX = this.head.rotateAngleX; + this.chin.rotateAngleY = this.head.rotateAngleY; + this.body.rotateAngleX = ((float)Math.PI / 2F); + this.rightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 1.4F * p_78087_2_; + this.leftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float)Math.PI) * 1.4F * p_78087_2_; + this.rightWing.rotateAngleZ = p_78087_3_; + this.leftWing.rotateAngleZ = -p_78087_3_; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java b/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java new file mode 100644 index 0000000000..455df761cb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/ModelSickBlaze.java @@ -0,0 +1,93 @@ +package gtPlusPlus.core.client.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.model.ModelBlaze; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; + +@SideOnly(Side.CLIENT) +public class ModelSickBlaze extends ModelBlaze +{ + /** The sticks that fly around the Blaze. */ + private ModelRenderer[] blazeSticks = new ModelRenderer[24]; + private ModelRenderer blazeHead; + + public ModelSickBlaze() + { + for (int i = 0; i < this.blazeSticks.length; ++i) + { + this.blazeSticks[i] = new ModelRenderer(this, 0, 16); + this.blazeSticks[i].addBox(0.0F, 0.0F, 0.0F, 2, 8, 2); + } + + this.blazeHead = new ModelRenderer(this, 0, 0); + this.blazeHead.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8); + } + + @Override + public int func_78104_a() + { + return 8; + } + + /** + * Sets the models various rotation angles then renders the model. + */ + @Override + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) + { + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); + this.blazeHead.render(p_78088_7_); + + for (int i = 0; i < this.blazeSticks.length; ++i) + { + this.blazeSticks[i].render(p_78088_7_); + } + } + + /** + * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms + * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how + * "far" arms and legs can swing at most. + */ + @Override + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) + { + float f6 = p_78087_3_ * (float)Math.PI * -0.1F; + int i; + + for (i = 0; i < 4; ++i) + { + this.blazeSticks[i].rotationPointY = -2.0F + MathHelper.cos((i * 2 + p_78087_3_) * 0.25F); + this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 9.0F; + this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 9.0F; + ++f6; + } + + f6 = ((float)Math.PI / 4F) + p_78087_3_ * (float)Math.PI * 0.03F; + + for (i = 4; i < 8; ++i) + { + this.blazeSticks[i].rotationPointY = 2.0F + MathHelper.cos((i * 2 + p_78087_3_) * 0.25F); + this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 7.0F; + this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 7.0F; + ++f6; + } + + f6 = 0.47123894F + p_78087_3_ * (float)Math.PI * -0.05F; + + for (i = 8; i < 12; ++i) + { + this.blazeSticks[i].rotationPointY = 11.0F + MathHelper.cos((i * 1.5F + p_78087_3_) * 0.5F); + this.blazeSticks[i].rotationPointX = MathHelper.cos(f6) * 5.0F; + this.blazeSticks[i].rotationPointZ = MathHelper.sin(f6) * 5.0F; + ++f6; + } + + this.blazeHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); + this.blazeHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java b/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java new file mode 100644 index 0000000000..aa23635b4d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java @@ -0,0 +1,120 @@ +package gtPlusPlus.core.client.model; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.model.ModelIronGolem; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; + +@SideOnly(Side.CLIENT) +public class ModelStaballoyConstruct extends ModelIronGolem +{ + + public ModelStaballoyConstruct() + { + this(0.0F); + } + + public ModelStaballoyConstruct(float p_i1161_1_) + { + this(p_i1161_1_, -7.0F); + } + + public ModelStaballoyConstruct(float p_i1162_1_, float p_i1162_2_) + { + short short1 = 128; + short short2 = 128; + this.ironGolemHead = (new ModelRenderer(this)).setTextureSize(short1, short2); + this.ironGolemHead.setRotationPoint(0.0F, 0.0F + p_i1162_2_, -2.0F); + this.ironGolemHead.setTextureOffset(0, 0).addBox(-4.0F, -12.0F, -5.5F, 8, 10, 8, p_i1162_1_); + this.ironGolemHead.setTextureOffset(24, 0).addBox(-1.0F, -5.0F, -7.5F, 2, 4, 2, p_i1162_1_); + this.ironGolemBody = (new ModelRenderer(this)).setTextureSize(short1, short2); + this.ironGolemBody.setRotationPoint(0.0F, 0.0F + p_i1162_2_, 0.0F); + this.ironGolemBody.setTextureOffset(0, 40).addBox(-9.0F, -2.0F, -6.0F, 18, 12, 11, p_i1162_1_); + this.ironGolemBody.setTextureOffset(0, 70).addBox(-4.5F, 10.0F, -3.0F, 9, 5, 6, p_i1162_1_ + 0.5F); + this.ironGolemRightArm = (new ModelRenderer(this)).setTextureSize(short1, short2); + this.ironGolemRightArm.setRotationPoint(0.0F, -7.0F, 0.0F); + this.ironGolemRightArm.setTextureOffset(60, 21).addBox(-13.0F, -2.5F, -3.0F, 4, 30, 6, p_i1162_1_); + this.ironGolemLeftArm = (new ModelRenderer(this)).setTextureSize(short1, short2); + this.ironGolemLeftArm.setRotationPoint(0.0F, -7.0F, 0.0F); + this.ironGolemLeftArm.setTextureOffset(60, 58).addBox(9.0F, -2.5F, -3.0F, 4, 30, 6, p_i1162_1_); + this.ironGolemLeftLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2); + this.ironGolemLeftLeg.setRotationPoint(-4.0F, 18.0F + p_i1162_2_, 0.0F); + this.ironGolemLeftLeg.setTextureOffset(37, 0).addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, p_i1162_1_); + this.ironGolemRightLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2); + this.ironGolemRightLeg.mirror = true; + this.ironGolemRightLeg.setTextureOffset(60, 0).setRotationPoint(5.0F, 18.0F + p_i1162_2_, 0.0F); + this.ironGolemRightLeg.addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, p_i1162_1_); + } + + /** + * Sets the models various rotation angles then renders the model. + */ + @Override + public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) + { + this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); + this.ironGolemHead.render(p_78088_7_); + this.ironGolemBody.render(p_78088_7_); + this.ironGolemLeftLeg.render(p_78088_7_); + this.ironGolemRightLeg.render(p_78088_7_); + this.ironGolemRightArm.render(p_78088_7_); + this.ironGolemLeftArm.render(p_78088_7_); + } + + /** + * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms + * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how + * "far" arms and legs can swing at most. + */ + @Override + public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) + { + this.ironGolemHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); + this.ironGolemHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); + this.ironGolemLeftLeg.rotateAngleX = -1.5F * this.func_78172_a(p_78087_1_, 13.0F) * p_78087_2_; + this.ironGolemRightLeg.rotateAngleX = 1.5F * this.func_78172_a(p_78087_1_, 13.0F) * p_78087_2_; + this.ironGolemLeftLeg.rotateAngleY = 0.0F; + this.ironGolemRightLeg.rotateAngleY = 0.0F; + } + + /** + * Used for easily adding entity-dependent animations. The second and third float params here are the same second + * and third as in the setRotationAngles method. + */ + @Override + public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) + { + EntityIronGolem entityirongolem = (EntityIronGolem)p_78086_1_; + int i = entityirongolem.getAttackTimer(); + + if (i > 0) + { + this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F); + this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F); + } + else + { + int j = entityirongolem.getHoldRoseTick(); + + if (j > 0) + { + this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a(j, 70.0F); + this.ironGolemLeftArm.rotateAngleX = 0.0F; + } + else + { + this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_; + this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_; + } + } + } + + private float func_78172_a(float p_78172_1_, float p_78172_2_) + { + return (Math.abs(p_78172_1_ % p_78172_2_ - p_78172_2_ * 0.5F) - p_78172_2_ * 0.25F) / (p_78172_2_ * 0.25F); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java b/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java new file mode 100644 index 0000000000..3a0cbb636b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java @@ -0,0 +1,38 @@ +package gtPlusPlus.core.client.model.tabula; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; + +/** + * ModelEggBox - Alkalus + * Created using Tabula 4.1.1 + */ +public abstract class ModelTabulaBase extends ModelBase { + + + public ModelTabulaBase(int aTexWidth, int aTexHeight) { + this.textureWidth = aTexWidth; + this.textureHeight = aTexHeight; + } + + protected abstract AutoMap> getModelParts(); + + public void renderAll() { + for (Pair part : getModelParts()) { + //Logger.INFO("Rendering EggBox"); + part.getKey().render(part.getValue()); + } + } + + /** + * This is a helper function from Tabula to set the rotation of model parts + */ + public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } +} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java b/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java new file mode 100644 index 0000000000..f40357495a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/renderer/CustomItemBlockRenderer.java @@ -0,0 +1,85 @@ +package gtPlusPlus.core.client.renderer; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.IItemRenderer; + +import org.lwjgl.opengl.GL11; + + +/** + * Easy way of rendering an item which should look like a block. + * Borrowed. + * + * @author King Lemming + * + */ +public class CustomItemBlockRenderer implements IItemRenderer { + + public static CustomItemBlockRenderer instance = new CustomItemBlockRenderer(); + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + return true; + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return true; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + + double offset = -0.5; + if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) { + offset = 0; + } else if (type == ItemRenderType.ENTITY) { + GL11.glScalef(0.5F, 0.5F, 0.5F); + } + renderItemAsBlock((RenderBlocks) data[0], item, offset, offset, offset); + } + + public static void renderItemAsBlock(RenderBlocks renderer, ItemStack item, double translateX, double translateY, double translateZ) { + + renderTextureAsBlock(renderer, item.getIconIndex(), translateX, translateY, translateZ); + } + + public static void renderTextureAsBlock(RenderBlocks renderer, IIcon texture, double translateX, double translateY, double translateZ) { + + Tessellator tessellator = Tessellator.instance; + Block block = Blocks.stone; + + if (texture == null) { + return; + } + renderer.setRenderBoundsFromBlock(block); + GL11.glTranslated(translateX, translateY, translateZ); + tessellator.startDrawingQuads(); + + tessellator.setNormal(0.0F, -1.0F, 0.0F); + renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, texture); + + tessellator.setNormal(0.0F, 1.0F, 0.0F); + renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, texture); + + tessellator.setNormal(0.0F, 0.0F, -1.0F); + renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, texture); + + tessellator.setNormal(0.0F, 0.0F, 1.0F); + renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, texture); + + tessellator.setNormal(-1.0F, 0.0F, 0.0F); + renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, texture); + + tessellator.setNormal(1.0F, 0.0F, 0.0F); + renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, texture); + + tessellator.draw(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java b/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java new file mode 100644 index 0000000000..a0b34d3b0b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java @@ -0,0 +1,2083 @@ +package gtPlusPlus.core.client.renderer; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import gregtech.api.interfaces.ITexture; +import gtPlusPlus.api.interfaces.ITexturedBlock; +import gtPlusPlus.api.objects.Logger; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { + + public static CustomOreBlockRenderer INSTANCE; + public final int mRenderID; + + public CustomOreBlockRenderer() { + INSTANCE = this; + this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(this); + Logger.INFO("Registered Custom Ore Block Renderer."); + } + + public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { + Block tTileEntity = aBlock; + if ((tTileEntity instanceof ITexturedBlock)) { + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedBlock) tTileEntity).getTexture((byte) 0), ((ITexturedBlock) tTileEntity).getTexture((byte) 1), ((ITexturedBlock) tTileEntity).getTexture((byte) 2), ((ITexturedBlock) tTileEntity).getTexture((byte) 3), ((ITexturedBlock) tTileEntity).getTexture((byte) 4), ((ITexturedBlock) tTileEntity).getTexture((byte) 5)}); + } + return false; + } + + public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) { + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + int l = aBlock.colorMultiplier(aWorld, aX, aY, aZ); + float RED = (float)(l >> 16 & 255) / 255.0F; + float GREEN = (float)(l >> 8 & 255) / 255.0F; + float BLUE = (float)(l & 255) / 255.0F; + + if (Minecraft.isAmbientOcclusionEnabled() && aBlock.getLightValue() == 0){ + if (RenderBlocks.getInstance().partialRenderBounds){ + return INSTANCE.renderStandardBlockWithAmbientOcclusionPartial(aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); + } + else { + return INSTANCE.renderStandardBlockWithAmbientOcclusion(aWorld, aRenderer, aTextures, aBlock, aX, aY, aZ, RED, GREEN, BLUE); + } + } + else { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); + } + return true; + } + + public static void renderFaceYNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[0], true); + } + public static void renderFaceYPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[1], true); + } + public static void renderFaceZNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[2], true); + } + public static void renderFaceZPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[3], true); + } + public static void renderFaceXNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[4], true); + } + public static void renderFaceXPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[][] aIcon) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[5], true); + } + + public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) { + return; + } + Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); + } + if (aIcon != null) { + for (int i = 0; i < aIcon.length; i++) { + if (aIcon[i] != null) { + aIcon[i].renderYNeg(aRenderer, aBlock, aX, aY, aZ); + } + } + } + aRenderer.flipTexture = false; + } + + public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1))) { + return; + } + Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); + } + if (aIcon != null) { + for (int i = 0; i < aIcon.length; i++) { + if (aIcon[i] != null) { + aIcon[i].renderYPos(aRenderer, aBlock, aX, aY, aZ); + } + } + } + aRenderer.flipTexture = false; + } + + public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2))) { + return; + } + Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); + } + aRenderer.flipTexture = (!aFullBlock); + if (aIcon != null) { + for (int i = 0; i < aIcon.length; i++) { + if (aIcon[i] != null) { + aIcon[i].renderZNeg(aRenderer, aBlock, aX, aY, aZ); + } + } + } + aRenderer.flipTexture = false; + } + + public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3))) { + return; + } + Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); + } + if (aIcon != null) { + for (int i = 0; i < aIcon.length; i++) { + if (aIcon[i] != null) { + aIcon[i].renderZPos(aRenderer, aBlock, aX, aY, aZ); + } + } + } + aRenderer.flipTexture = false; + } + + public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4))) { + return; + } + Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); + } + if (aIcon != null) { + for (int i = 0; i < aIcon.length; i++) { + if (aIcon[i] != null) { + aIcon[i].renderXNeg(aRenderer, aBlock, aX, aY, aZ); + } + } + } + aRenderer.flipTexture = false; + } + + public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5))) { + return; + } + Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); + } + aRenderer.flipTexture = (!aFullBlock); + if (aIcon != null) { + for (int i = 0; i < aIcon.length; i++) { + if (aIcon[i] != null) { + aIcon[i].renderXPos(aRenderer, aBlock, aX, aY, aZ); + } + } + } + aRenderer.flipTexture = false; + } + + public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); + renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 0), true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); + renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 1), true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); + renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 2), true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); + renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 3), true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); + renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 4), true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); + renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 5), true); + Tessellator.instance.draw(); + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } + + public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { + blockAccess = aWorld; + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); + } + + public boolean shouldRender3DInInventory(int aModel) { + return true; + } + + public int getRenderId() { + return this.mRenderID; + } + + public void setRenderBounds(double p_147782_1_, double p_147782_3_, double p_147782_5_, double p_147782_7_, double p_147782_9_, double p_147782_11_) + { + if (!this.lockBlockBounds) + { + this.renderMinX = p_147782_1_; + this.renderMaxX = p_147782_7_; + this.renderMinY = p_147782_3_; + this.renderMaxY = p_147782_9_; + this.renderMinZ = p_147782_5_; + this.renderMaxZ = p_147782_11_; + this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D || this.renderMaxZ < 1.0D); + } + } + + /** + * Like setRenderBounds, but automatically pulling the bounds from the given Block. + */ + public void setRenderBoundsFromBlock(Block block) + { + if (!this.lockBlockBounds) + { + this.renderMinX = block.getBlockBoundsMinX(); + this.renderMaxX = block.getBlockBoundsMaxX(); + this.renderMinY = block.getBlockBoundsMinY(); + this.renderMaxY = block.getBlockBoundsMaxY(); + this.renderMinZ = block.getBlockBoundsMinZ(); + this.renderMaxZ = block.getBlockBoundsMaxZ(); + this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D || this.renderMinY > 0.0D || this.renderMaxY < 1.0D || this.renderMinZ > 0.0D || this.renderMaxZ < 1.0D); + } + } + + /** + * Vanilla Variables + */ + + /** The minimum X value for rendering (default 0.0). */ + public double renderMinX; + /** The maximum X value for rendering (default 1.0). */ + public double renderMaxX; + /** The minimum Y value for rendering (default 0.0). */ + public double renderMinY; + /** The maximum Y value for rendering (default 1.0). */ + public double renderMaxY; + /** The minimum Z value for rendering (default 0.0). */ + public double renderMinZ; + /** The maximum Z value for rendering (default 1.0). */ + public double renderMaxZ; + public boolean lockBlockBounds; + public boolean partialRenderBounds; + public final Minecraft minecraftRB = RenderBlocks.getInstance().minecraftRB; + public int uvRotateEast; + public int uvRotateWest; + public int uvRotateSouth; + public int uvRotateNorth; + public int uvRotateTop; + public int uvRotateBottom; + /** Whether ambient occlusion is enabled or not */ + public boolean enableAO; + /** Used as a scratch variable for ambient occlusion on the north/bottom/east corner. */ + public float aoLightValueScratchXYZNNN; + /** Used as a scratch variable for ambient occlusion between the bottom face and the north face. */ + public float aoLightValueScratchXYNN; + /** Used as a scratch variable for ambient occlusion on the north/bottom/west corner. */ + public float aoLightValueScratchXYZNNP; + /** Used as a scratch variable for ambient occlusion between the bottom face and the east face. */ + public float aoLightValueScratchYZNN; + /** Used as a scratch variable for ambient occlusion between the bottom face and the west face. */ + public float aoLightValueScratchYZNP; + /** Used as a scratch variable for ambient occlusion on the south/bottom/east corner. */ + public float aoLightValueScratchXYZPNN; + /** Used as a scratch variable for ambient occlusion between the bottom face and the south face. */ + public float aoLightValueScratchXYPN; + /** Used as a scratch variable for ambient occlusion on the south/bottom/west corner. */ + public float aoLightValueScratchXYZPNP; + /** Used as a scratch variable for ambient occlusion on the north/top/east corner. */ + public float aoLightValueScratchXYZNPN; + /** Used as a scratch variable for ambient occlusion between the top face and the north face. */ + public float aoLightValueScratchXYNP; + /** Used as a scratch variable for ambient occlusion on the north/top/west corner. */ + public float aoLightValueScratchXYZNPP; + /** Used as a scratch variable for ambient occlusion between the top face and the east face. */ + public float aoLightValueScratchYZPN; + /** Used as a scratch variable for ambient occlusion on the south/top/east corner. */ + public float aoLightValueScratchXYZPPN; + /** Used as a scratch variable for ambient occlusion between the top face and the south face. */ + public float aoLightValueScratchXYPP; + /** Used as a scratch variable for ambient occlusion between the top face and the west face. */ + public float aoLightValueScratchYZPP; + /** Used as a scratch variable for ambient occlusion on the south/top/west corner. */ + public float aoLightValueScratchXYZPPP; + /** Used as a scratch variable for ambient occlusion between the north face and the east face. */ + public float aoLightValueScratchXZNN; + /** Used as a scratch variable for ambient occlusion between the south face and the east face. */ + public float aoLightValueScratchXZPN; + /** Used as a scratch variable for ambient occlusion between the north face and the west face. */ + public float aoLightValueScratchXZNP; + /** Used as a scratch variable for ambient occlusion between the south face and the west face. */ + public float aoLightValueScratchXZPP; + /** Ambient occlusion brightness XYZNNN */ + public int aoBrightnessXYZNNN; + /** Ambient occlusion brightness XYNN */ + public int aoBrightnessXYNN; + /** Ambient occlusion brightness XYZNNP */ + public int aoBrightnessXYZNNP; + /** Ambient occlusion brightness YZNN */ + public int aoBrightnessYZNN; + /** Ambient occlusion brightness YZNP */ + public int aoBrightnessYZNP; + /** Ambient occlusion brightness XYZPNN */ + public int aoBrightnessXYZPNN; + /** Ambient occlusion brightness XYPN */ + public int aoBrightnessXYPN; + /** Ambient occlusion brightness XYZPNP */ + public int aoBrightnessXYZPNP; + /** Ambient occlusion brightness XYZNPN */ + public int aoBrightnessXYZNPN; + /** Ambient occlusion brightness XYNP */ + public int aoBrightnessXYNP; + /** Ambient occlusion brightness XYZNPP */ + public int aoBrightnessXYZNPP; + /** Ambient occlusion brightness YZPN */ + public int aoBrightnessYZPN; + /** Ambient occlusion brightness XYZPPN */ + public int aoBrightnessXYZPPN; + /** Ambient occlusion brightness XYPP */ + public int aoBrightnessXYPP; + /** Ambient occlusion brightness YZPP */ + public int aoBrightnessYZPP; + /** Ambient occlusion brightness XYZPPP */ + public int aoBrightnessXYZPPP; + /** Ambient occlusion brightness XZNN */ + public int aoBrightnessXZNN; + /** Ambient occlusion brightness XZPN */ + public int aoBrightnessXZPN; + /** Ambient occlusion brightness XZNP */ + public int aoBrightnessXZNP; + /** Ambient occlusion brightness XZPP */ + public int aoBrightnessXZPP; + /** Brightness top left */ + public int brightnessTopLeft; + /** Brightness bottom left */ + public int brightnessBottomLeft; + /** Brightness bottom right */ + public int brightnessBottomRight; + /** Brightness top right */ + public int brightnessTopRight; + /** Red color value for the top left corner */ + public float colorRedTopLeft; + /** Red color value for the bottom left corner */ + public float colorRedBottomLeft; + /** Red color value for the bottom right corner */ + public float colorRedBottomRight; + /** Red color value for the top right corner */ + public float colorRedTopRight; + /** Green color value for the top left corner */ + public float colorGreenTopLeft; + /** Green color value for the bottom left corner */ + public float colorGreenBottomLeft; + /** Green color value for the bottom right corner */ + public float colorGreenBottomRight; + /** Green color value for the top right corner */ + public float colorGreenTopRight; + /** Blue color value for the top left corner */ + public float colorBlueTopLeft; + /** Blue color value for the bottom left corner */ + public float colorBlueBottomLeft; + /** Blue color value for the bottom right corner */ + public float colorBlueBottomRight; + /** Blue color value for the top right corner */ + public float colorBlueTopRight; + /** If set to >=0, all block faces will be rendered using this texture index */ + public IIcon overrideBlockTexture; + /** + * Clear override block texture + */ + public void clearOverrideBlockTexture() + { + this.overrideBlockTexture = null; + } + + public boolean hasOverrideBlockTexture() + { + return this.overrideBlockTexture != null; + } + + public IIcon getBlockIcon(Block block, IBlockAccess access, int x, int y, int z, int side) + { + return this.getIconSafe(block.getIcon(access, x, y, z, side)); + } + + public IIcon getBlockIconFromSideAndMetadata(Block block, int side, int meta) + { + return this.getIconSafe(block.getIcon(side, meta)); + } + + public IIcon getBlockIconFromSide(Block block, int side) + { + return this.getIconSafe(block.getBlockTextureFromSide(side)); + } + + public IIcon getBlockIcon(Block block) + { + return this.getIconSafe(block.getBlockTextureFromSide(1)); + } + + public IIcon getIconSafe(IIcon iicon) + { + if (iicon == null) + { + iicon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); + } + + return (IIcon)iicon; + } + + IBlockAccess blockAccess = RenderBlocks.getInstance().blockAccess; + + public boolean renderStandardBlockWithAmbientOcclusion(IBlockAccess aWorld, RenderBlocks aRenderer, ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) + { + this.enableAO = true; + boolean flag = false; + float f3 = 0.0F; + float f4 = 0.0F; + float f5 = 0.0F; + float f6 = 0.0F; + boolean flag1 = true; + int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); + Tessellator tessellator = Tessellator.instance; + tessellator.setBrightness(983055); + + if (this.getBlockIcon(block).getIconName().equals("grass_top")) + { + flag1 = false; + } + else if (this.hasOverrideBlockTexture()) + { + flag1 = false; + } + + boolean flag2; + boolean flag3; + boolean flag4; + boolean flag5; + int i1; + float f7; + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) + { + if (this.renderMinY <= 0.0D) + { + --yPos; + } + + this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); + + if (!flag5 && !flag3) + { + this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; + this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; + } + else + { + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); + } + + if (!flag4 && !flag3) + { + this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; + this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; + } + else + { + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); + } + + if (!flag5 && !flag2) + { + this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; + this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; + } + else + { + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); + } + + if (!flag4 && !flag2) + { + this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; + this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; + } + else + { + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); + } + + if (this.renderMinY <= 0.0D) + { + ++yPos; + } + + i1 = l; + + if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + } + + f7 = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) / 4.0F; + f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) / 4.0F; + f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) / 4.0F; + f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) / 4.0F; + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.5F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.5F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.5F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) + { + if (this.renderMaxY >= 1.0D) + { + ++yPos; + } + + this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); + + if (!flag5 && !flag3) + { + this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; + this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; + } + else + { + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); + } + + if (!flag5 && !flag2) + { + this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; + this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; + } + else + { + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); + } + + if (!flag4 && !flag3) + { + this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; + this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; + } + else + { + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); + } + + if (!flag4 && !flag2) + { + this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; + this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; + } + else + { + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); + } + + if (this.renderMaxY >= 1.0D) + { + --yPos; + } + + i1 = l; + + if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + } + + f7 = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) / 4.0F; + f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) / 4.0F; + f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) / 4.0F; + f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + flag = true; + } + + IIcon iicon; + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) + { + if (this.renderMinZ <= 0.0D) + { + --zPos; + } + + this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); + + if (!flag3 && !flag5) + { + this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); + } + + if (!flag3 && !flag4) + { + this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); + } + + if (!flag2 && !flag5) + { + this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); + } + + if (!flag2 && !flag4) + { + this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); + } + + if (this.renderMinZ <= 0.0D) + { + ++zPos; + } + + i1 = l; + + if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + } + + f7 = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + f3 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; + f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) / 4.0F; + f5 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) / 4.0F; + f6 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) / 4.0F; + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); + CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) + { + if (this.renderMaxZ >= 1.0D) + { + ++zPos; + } + + this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); + + if (!flag3 && !flag5) + { + this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); + } + + if (!flag3 && !flag4) + { + this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); + } + + if (!flag2 && !flag5) + { + this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); + } + + if (!flag2 && !flag4) + { + this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); + } + + if (this.renderMaxZ >= 1.0D) + { + --zPos; + } + + i1 = l; + + if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + } + + f7 = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + f3 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) / 4.0F; + f6 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) / 4.0F; + f5 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) / 4.0F; + f4 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) / 4.0F; + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); + CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) + { + if (this.renderMinX <= 0.0D) + { + --xPos; + } + + this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); + + if (!flag4 && !flag3) + { + this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); + } + + if (!flag5 && !flag3) + { + this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); + } + + if (!flag4 && !flag2) + { + this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); + } + + if (!flag5 && !flag2) + { + this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); + } + + if (this.renderMinX <= 0.0D) + { + ++xPos; + } + + i1 = l; + + if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + } + + f7 = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + f6 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) / 4.0F; + f3 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) / 4.0F; + f4 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) / 4.0F; + f5 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) / 4.0F; + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); + CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) + { + if (this.renderMaxX >= 1.0D) + { + ++xPos; + } + + this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); + + if (!flag3 && !flag5) + { + this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); + } + + if (!flag3 && !flag4) + { + this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); + } + + if (!flag2 && !flag5) + { + this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); + } + + if (!flag2 && !flag4) + { + this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); + } + + if (this.renderMaxX >= 1.0D) + { + --xPos; + } + + i1 = l; + + if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + } + + f7 = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + f3 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) / 4.0F; + f4 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) / 4.0F; + f5 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) / 4.0F; + f6 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) / 4.0F; + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); + CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + this.enableAO = false; + return flag; + } + + /** + * Renders non-full-cube block with ambient occusion. Args: block, x, y, z, red, green, blue (lighting) + */ + public boolean renderStandardBlockWithAmbientOcclusionPartial(IBlockAccess aWorld, RenderBlocks aRenderer, ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) + { + this.enableAO = true; + boolean flag = false; + float f3 = 0.0F; + float f4 = 0.0F; + float f5 = 0.0F; + float f6 = 0.0F; + boolean flag1 = true; + int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); + Tessellator tessellator = Tessellator.instance; + tessellator.setBrightness(983055); + + if (this.getBlockIcon(block).getIconName().equals("grass_top")) + { + flag1 = false; + } + else if (this.hasOverrideBlockTexture()) + { + flag1 = false; + } + + boolean flag2; + boolean flag3; + boolean flag4; + boolean flag5; + int i1; + float f7; + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) + { + if (this.renderMinY <= 0.0D) + { + --yPos; + } + + this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); + + if (!flag5 && !flag3) + { + this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; + this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; + } + else + { + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); + } + + if (!flag4 && !flag3) + { + this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; + this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; + } + else + { + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); + } + + if (!flag5 && !flag2) + { + this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; + this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; + } + else + { + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); + } + + if (!flag4 && !flag2) + { + this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; + this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; + } + else + { + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); + } + + if (this.renderMinY <= 0.0D) + { + ++yPos; + } + + i1 = l; + + if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + } + + f7 = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) / 4.0F; + f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) / 4.0F; + f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) / 4.0F; + f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) / 4.0F; + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.5F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.5F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.5F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) + { + if (this.renderMaxY >= 1.0D) + { + ++yPos; + } + + this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); + + if (!flag5 && !flag3) + { + this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; + this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; + } + else + { + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); + } + + if (!flag5 && !flag2) + { + this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; + this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; + } + else + { + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); + } + + if (!flag4 && !flag3) + { + this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; + this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; + } + else + { + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); + } + + if (!flag4 && !flag2) + { + this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; + this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; + } + else + { + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); + } + + if (this.renderMaxY >= 1.0D) + { + --yPos; + } + + i1 = l; + + if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + } + + f7 = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) / 4.0F; + f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) / 4.0F; + f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) / 4.0F; + f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; + this.brightnessTopRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); + this.brightnessBottomLeft = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); + this.brightnessBottomRight = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + flag = true; + } + + float f8; + float f9; + float f10; + float f11; + int j1; + int k1; + int l1; + int i2; + IIcon iicon; + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) + { + if (this.renderMinZ <= 0.0D) + { + --zPos; + } + + this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getCanBlockGrass(); + + if (!flag3 && !flag5) + { + this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); + } + + if (!flag3 && !flag4) + { + this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); + } + + if (!flag2 && !flag5) + { + this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); + } + + if (!flag2 && !flag4) + { + this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); + } + + if (this.renderMinZ <= 0.0D) + { + ++zPos; + } + + i1 = l; + + if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + } + + f7 = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + f8 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) / 4.0F; + f9 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) / 4.0F; + f10 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) / 4.0F; + f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) / 4.0F; + f3 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMinX) + (double)f9 * this.renderMaxY * this.renderMinX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMinX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); + f4 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMaxY * this.renderMaxX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); + f5 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMinY * this.renderMaxX + (double)f10 * (1.0D - this.renderMinY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); + f6 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMinX) + (double)f9 * this.renderMinY * this.renderMinX + (double)f10 * (1.0D - this.renderMinY) * this.renderMinX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); + j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); + k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); + l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); + i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMaxY * (1.0D - this.renderMinX), this.renderMaxY * this.renderMinX, (1.0D - this.renderMaxY) * this.renderMinX, (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); + this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMaxY * (1.0D - this.renderMaxX), this.renderMaxY * this.renderMaxX, (1.0D - this.renderMaxY) * this.renderMaxX, (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); + this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMinY * (1.0D - this.renderMaxX), this.renderMinY * this.renderMaxX, (1.0D - this.renderMinY) * this.renderMaxX, (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); + this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, k1, l1, i2, this.renderMinY * (1.0D - this.renderMinX), this.renderMinY * this.renderMinX, (1.0D - this.renderMinY) * this.renderMinX, (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); + CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) + { + if (this.renderMaxZ >= 1.0D) + { + ++zPos; + } + + this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getCanBlockGrass(); + + if (!flag3 && !flag5) + { + this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); + } + + if (!flag3 && !flag4) + { + this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); + } + + if (!flag2 && !flag5) + { + this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); + } + + if (!flag2 && !flag4) + { + this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); + } + + if (this.renderMaxZ >= 1.0D) + { + --zPos; + } + + i1 = l; + + if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + } + + f7 = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + f8 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) / 4.0F; + f9 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) / 4.0F; + f10 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) / 4.0F; + f11 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) / 4.0F; + f3 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMinX) + (double)f9 * this.renderMaxY * this.renderMinX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMinX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); + f4 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMinX) + (double)f9 * this.renderMinY * this.renderMinX + (double)f10 * (1.0D - this.renderMinY) * this.renderMinX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); + f5 = (float)((double)f8 * this.renderMinY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMinY * this.renderMaxX + (double)f10 * (1.0D - this.renderMinY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); + f6 = (float)((double)f8 * this.renderMaxY * (1.0D - this.renderMaxX) + (double)f9 * this.renderMaxY * this.renderMaxX + (double)f10 * (1.0D - this.renderMaxY) * this.renderMaxX + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); + j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); + k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); + l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); + i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMaxY * (1.0D - this.renderMinX), (1.0D - this.renderMaxY) * (1.0D - this.renderMinX), (1.0D - this.renderMaxY) * this.renderMinX, this.renderMaxY * this.renderMinX); + this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMinY * (1.0D - this.renderMinX), (1.0D - this.renderMinY) * (1.0D - this.renderMinX), (1.0D - this.renderMinY) * this.renderMinX, this.renderMinY * this.renderMinX); + this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMinY * (1.0D - this.renderMaxX), (1.0D - this.renderMinY) * (1.0D - this.renderMaxX), (1.0D - this.renderMinY) * this.renderMaxX, this.renderMinY * this.renderMaxX); + this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, this.renderMaxY * (1.0D - this.renderMaxX), (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX), (1.0D - this.renderMaxY) * this.renderMaxX, this.renderMaxY * this.renderMaxX); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.8F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); + CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) + { + if (this.renderMinX <= 0.0D) + { + --xPos; + } + + this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1).getCanBlockGrass(); + + if (!flag4 && !flag3) + { + this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); + } + + if (!flag5 && !flag3) + { + this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); + } + + if (!flag4 && !flag2) + { + this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; + this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; + } + else + { + this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); + } + + if (!flag5 && !flag2) + { + this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; + this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; + } + else + { + this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); + } + + if (this.renderMinX <= 0.0D) + { + ++xPos; + } + + i1 = l; + + if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); + } + + f7 = blockAccess.getBlock(xPos - 1, yPos, zPos).getAmbientOcclusionLightValue(); + f8 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) / 4.0F; + f9 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) / 4.0F; + f10 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) / 4.0F; + f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) / 4.0F; + f3 = (float)((double)f9 * this.renderMaxY * this.renderMaxZ + (double)f10 * this.renderMaxY * (1.0D - this.renderMaxZ) + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) + (double)f8 * (1.0D - this.renderMaxY) * this.renderMaxZ); + f4 = (float)((double)f9 * this.renderMaxY * this.renderMinZ + (double)f10 * this.renderMaxY * (1.0D - this.renderMinZ) + (double)f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) + (double)f8 * (1.0D - this.renderMaxY) * this.renderMinZ); + f5 = (float)((double)f9 * this.renderMinY * this.renderMinZ + (double)f10 * this.renderMinY * (1.0D - this.renderMinZ) + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) + (double)f8 * (1.0D - this.renderMinY) * this.renderMinZ); + f6 = (float)((double)f9 * this.renderMinY * this.renderMaxZ + (double)f10 * this.renderMinY * (1.0D - this.renderMaxZ) + (double)f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) + (double)f8 * (1.0D - this.renderMinY) * this.renderMaxZ); + j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); + k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); + l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); + i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMaxY * this.renderMaxZ, this.renderMaxY * (1.0D - this.renderMaxZ), (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), (1.0D - this.renderMaxY) * this.renderMaxZ); + this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMaxY * this.renderMinZ, this.renderMaxY * (1.0D - this.renderMinZ), (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), (1.0D - this.renderMaxY) * this.renderMinZ); + this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMinY * this.renderMinZ, this.renderMinY * (1.0D - this.renderMinZ), (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), (1.0D - this.renderMinY) * this.renderMinZ); + this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(k1, l1, i2, j1, this.renderMinY * this.renderMaxZ, this.renderMinY * (1.0D - this.renderMaxZ), (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), (1.0D - this.renderMinY) * this.renderMaxZ); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); + CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + if (RenderBlocks.getInstance().renderAllFaces || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) + { + if (this.renderMaxX >= 1.0D) + { + ++xPos; + } + + this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1).getAmbientOcclusionLightValue(); + this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos).getAmbientOcclusionLightValue(); + this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); + this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); + this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); + this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); + flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos).getCanBlockGrass(); + flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos).getCanBlockGrass(); + flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1).getCanBlockGrass(); + flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1).getCanBlockGrass(); + + if (!flag3 && !flag5) + { + this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); + } + + if (!flag3 && !flag4) + { + this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); + } + + if (!flag2 && !flag5) + { + this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; + this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; + } + else + { + this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); + } + + if (!flag2 && !flag4) + { + this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; + this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; + } + else + { + this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1).getAmbientOcclusionLightValue(); + this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); + } + + if (this.renderMaxX >= 1.0D) + { + --xPos; + } + + i1 = l; + + if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos).isOpaqueCube()) + { + i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); + } + + f7 = blockAccess.getBlock(xPos + 1, yPos, zPos).getAmbientOcclusionLightValue(); + f8 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) / 4.0F; + f9 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) / 4.0F; + f10 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) / 4.0F; + f11 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) / 4.0F; + f3 = (float)((double)f8 * (1.0D - this.renderMinY) * this.renderMaxZ + (double)f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) + (double)f10 * this.renderMinY * (1.0D - this.renderMaxZ) + (double)f11 * this.renderMinY * this.renderMaxZ); + f4 = (float)((double)f8 * (1.0D - this.renderMinY) * this.renderMinZ + (double)f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) + (double)f10 * this.renderMinY * (1.0D - this.renderMinZ) + (double)f11 * this.renderMinY * this.renderMinZ); + f5 = (float)((double)f8 * (1.0D - this.renderMaxY) * this.renderMinZ + (double)f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) + (double)f10 * this.renderMaxY * (1.0D - this.renderMinZ) + (double)f11 * this.renderMaxY * this.renderMinZ); + f6 = (float)((double)f8 * (1.0D - this.renderMaxY) * this.renderMaxZ + (double)f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) + (double)f10 * this.renderMaxY * (1.0D - this.renderMaxZ) + (double)f11 * this.renderMaxY * this.renderMaxZ); + j1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); + k1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); + l1 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); + i2 = RenderBlocks.getInstance().getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); + this.brightnessTopLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMinY) * this.renderMaxZ, (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), this.renderMinY * (1.0D - this.renderMaxZ), this.renderMinY * this.renderMaxZ); + this.brightnessBottomLeft = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMinY) * this.renderMinZ, (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), this.renderMinY * (1.0D - this.renderMinZ), this.renderMinY * this.renderMinZ); + this.brightnessBottomRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMaxY) * this.renderMinZ, (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), this.renderMaxY * (1.0D - this.renderMinZ), this.renderMaxY * this.renderMinZ); + this.brightnessTopRight = RenderBlocks.getInstance().mixAoBrightness(j1, i2, l1, k1, (1.0D - this.renderMaxY) * this.renderMaxZ, (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), this.renderMaxY * (1.0D - this.renderMaxZ), this.renderMaxY * this.renderMaxZ); + + if (flag1) + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R * 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G * 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B * 0.6F; + } + else + { + this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; + this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; + this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; + } + + this.colorRedTopLeft *= f3; + this.colorGreenTopLeft *= f3; + this.colorBlueTopLeft *= f3; + this.colorRedBottomLeft *= f4; + this.colorGreenBottomLeft *= f4; + this.colorBlueBottomLeft *= f4; + this.colorRedBottomRight *= f5; + this.colorGreenBottomRight *= f5; + this.colorBlueBottomRight *= f5; + this.colorRedTopRight *= f6; + this.colorGreenTopRight *= f6; + this.colorBlueTopRight *= f6; + iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); + CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + + RenderBlocks.getInstance(); + if (RenderBlocks.fancyGrass && iicon.getIconName().equals("grass_side") && !this.hasOverrideBlockTexture()) + { + this.colorRedTopLeft *= R; + this.colorRedBottomLeft *= R; + this.colorRedBottomRight *= R; + this.colorRedTopRight *= R; + this.colorGreenTopLeft *= G; + this.colorGreenBottomLeft *= G; + this.colorGreenBottomRight *= G; + this.colorGreenTopRight *= G; + this.colorBlueTopLeft *= B; + this.colorBlueBottomLeft *= B; + this.colorBlueBottomRight *= B; + this.colorBlueTopRight *= B; + CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); + } + + flag = true; + } + + this.enableAO = false; + return flag; + } + +} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java new file mode 100644 index 0000000000..000badb80f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java @@ -0,0 +1,152 @@ +package gtPlusPlus.core.client.renderer; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.client.model.ModelBatKing; +import gtPlusPlus.core.entity.monster.EntityBatKing; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class RenderBatKing extends RenderLiving { + + private static final ResourceLocation batTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/batKing.png"); + + /** + * not actually sure this is size, is not used as of now, but the model would be + * recreated if the value changed and it seems a good match for a bats size + */ + private int renderedBatSize; + + public RenderBatKing() { + super(new ModelBatKing(), 0.7F); + this.renderedBatSize = (((ModelBatKing) this.mainModel).getBatSize()); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker function + * which does the actual work. In all probabilty, the class Render is generic + * (Render 1.0F) + { + f2 = 1.0F; + } + + f2 *= f2; + f2 *= f2; + final float f3 = 1.0F + (f2 * 0.3F); + GL11.glScalef(f3, f3, f3); + } + + f2 = (1.0F - (((entity.fuse - p_76986_9_) + 1.0F) / 100.0F)) * 0.8F; + this.bindEntityTexture(entity); + this.blockRenderer.renderBlockAsItem(ModBlocks.blockMiningExplosive, 0, entity.getBrightness(p_76986_9_)); + + if (((entity.fuse / 5) % 2) == 0) + { + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); + GL11.glColor4f(1.0F, 1.0F, 1.0F, f2); + this.blockRenderer.renderBlockAsItem(ModBlocks.blockMiningExplosive, 0, 1.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_TEXTURE_2D); + } + + GL11.glPopMatrix(); + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(final EntityPrimedMiningExplosive p_110775_1_){ + return TextureMap.locationBlocksTexture; + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. + */ + @Override + protected ResourceLocation getEntityTexture(final Entity p_110775_1_){ + Logger.WARNING("Rendering Mining Explosion. 4"); + return this.getEntityTexture((EntityPrimedMiningExplosive)p_110775_1_); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then + * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic + * (Render= 0; --i) { + adouble[i] = d3; + adouble1[i] = d4; + d3 += (double) (random.nextInt(11) - 5); + d4 += (double) (random.nextInt(11) - 5); + } + + for (int k1 = 0; k1 < 4; ++k1) { + Random random1 = new XSTR(p_76986_1_.boltVertex); + + for (int j = 0; j < 3; ++j) { + int k = 7; + int l = 0; + + if (j > 0) { + k = 7 - j; + } + + if (j > 0) { + l = k - 2; + } + + double d5 = adouble[k] - d3; + double d6 = adouble1[k] - d4; + + for (int i1 = k; i1 >= l; --i1) { + double d7 = d5; + double d8 = d6; + + if (j == 0) { + d5 += (double) (random1.nextInt(11) - 5); + d6 += (double) (random1.nextInt(11) - 5); + } + else { + d5 += (double) (random1.nextInt(31) - 15); + d6 += (double) (random1.nextInt(31) - 15); + } + + tessellator.startDrawing(5); + float f2 = 0.5F; + tessellator.setColorRGBA_F(0.9F * f2, 0.9F * f2, 1.0F * f2, 0.3F); + double d9 = 0.1D + (double) k1 * 0.2D; + + if (j == 0) { + d9 *= (double) i1 * 0.1D + 1.0D; + } + + double d10 = 0.1D + (double) k1 * 0.2D; + + if (j == 0) { + d10 *= (double) (i1 - 1) * 0.1D + 1.0D; + } + + for (int j1 = 0; j1 < 5; ++j1) { + double d11 = p_76986_2_ + 0.5D - d9; + double d12 = p_76986_6_ + 0.5D - d9; + + if (j1 == 1 || j1 == 2) { + d11 += d9 * 2.0D; + } + + if (j1 == 2 || j1 == 3) { + d12 += d9 * 2.0D; + } + + double d13 = p_76986_2_ + 0.5D - d10; + double d14 = p_76986_6_ + 0.5D - d10; + + if (j1 == 1 || j1 == 2) { + d13 += d10 * 2.0D; + } + + if (j1 == 2 || j1 == 3) { + d14 += d10 * 2.0D; + } + + tessellator.addVertex(d13 + d5, p_76986_4_ + (double) (i1 * 16), d14 + d6); + tessellator.addVertex(d11 + d7, p_76986_4_ + (double) ((i1 + 1) * 16), d12 + d8); + } + + tessellator.draw(); + } + } + } + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_TEXTURE_2D); + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called + * unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(EntityTeslaTowerLightning p_110775_1_) { + return null; + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called + * unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + Logger.INFO("Render Plasma. 5"); + return this.getEntityTexture((EntityTeslaTowerLightning) p_110775_1_); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker + * function which does the actual work. In all probabilty, the class Render + * is generic (Render> 16 & 255) / 255.0F; + float f3 = (i >> 8 & 255) / 255.0F; + float f4 = (i & 255) / 255.0F; + GL11.glColor3f(f2, f3, f4); + GL11.glPushMatrix(); + this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay")); + GL11.glPopMatrix(); + GL11.glColor3f(1.0F, 1.0F, 1.0F); + } + + this.func_77026_a(tessellator, iicon); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. + */ + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) + { + return TextureMap.locationItemsTexture; + } + + private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) + { + float f = p_77026_2_.getMinU(); + float f1 = p_77026_2_.getMaxU(); + float f2 = p_77026_2_.getMinV(); + float f3 = p_77026_2_.getMaxV(); + float f4 = 1.0F; + float f5 = 0.5F; + float f6 = 0.25F; + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + p_77026_1_.startDrawingQuads(); + p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); + p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); + p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); + p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); + p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); + p_77026_1_.draw(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java new file mode 100644 index 0000000000..e1e8360840 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java @@ -0,0 +1,99 @@ +package gtPlusPlus.core.client.renderer; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.client.model.ModelSickBlaze; +import gtPlusPlus.core.entity.monster.EntitySickBlaze; +import gtPlusPlus.core.lib.CORE; + +@SideOnly(Side.CLIENT) +public class RenderSickBlaze extends RenderLiving +{ + private static final ResourceLocation blazeTextures = new ResourceLocation(CORE.MODID+":"+"textures/entity/sickBlaze.png"); + private int field_77068_a; + + public RenderSickBlaze() + { + super(new ModelSickBlaze(), 0.5F); + this.field_77068_a = ((ModelSickBlaze)this.mainModel).func_78104_a(); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then + * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic + * (Render= 0.01D) { + float f3 = 13.0F; + float f4 = p_77043_1_.limbSwing - p_77043_1_.limbSwingAmount * (1.0F - p_77043_4_) + 6.0F; + float f5 = (Math.abs(f4 % f3 - f3 * 0.5F) - f3 * 0.25F) / (f3 * 0.25F); + GL11.glRotatef(6.5F * f5, 0.0F, 0.0F, 1.0F); + } + } + + protected void renderEquippedItems(EntityStaballoyConstruct p_77029_1_, float p_77029_2_) { + super.renderEquippedItems(p_77029_1_, p_77029_2_); + + if (p_77029_1_.getHoldRoseTick() != 0) { + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glPushMatrix(); + GL11.glRotatef(5.0F + 180.0F * this.staballoyGolemModel.ironGolemRightArm.rotateAngleX / (float) Math.PI, 1.0F, + 0.0F, 0.0F); + GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F); + GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); + float f1 = 0.8F; + GL11.glScalef(f1, -f1, f1); + int i = p_77029_1_.getBrightnessForRender(p_77029_2_); + int j = i % 65536; + int k = i / 65536; + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.bindTexture(TextureMap.locationBlocksTexture); + this.field_147909_c.renderBlockAsItem(Blocks.red_flower, 0, 1.0F); + GL11.glPopMatrix(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + } + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker + * function which does the actual work. In all probabilty, the class Render + * is generic (Render 0) { + this.motionX *= 0.02D; + this.motionY *= 0.02D; + this.motionZ *= 0.02D; + this.setParticleTextureIndex(113); + } else { + this.setParticleTextureIndex(112); + } + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.9800000190734863D; + this.motionY *= 0.9800000190734863D; + this.motionZ *= 0.9800000190734863D; + + if (this.particleMaxAge-- <= 0) { + this.setDead(); + } + if (this.onGround) { + this.setParticleTextureIndex(114); + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + if (this.particleGravity > 0) { + Material material = this.worldObj.getBlock(MathHelper.floor(this.posX), MathHelper.floor(this.posY), MathHelper.floor(this.posZ)).getMaterial(); + + if (material.isLiquid() || material.isSolid()) { + double d0 = MathHelper.floor(this.posY) + + 1 + - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.floor(this.posX), MathHelper.floor(this.posY), + MathHelper.floor(this.posZ))); + if (this.posY < d0) { + this.setDead(); + } + } + } else { + Material material = this.worldObj.getBlock(MathHelper.ceil(this.posX), MathHelper.ceil(this.posY), MathHelper.ceil(this.posZ)).getMaterial(); + + if (material.isLiquid() || material.isSolid()) { + double d0 = MathHelper.ceil(this.posY) + + 1 + - BlockLiquid.getLiquidHeightPercent(this.worldObj.getBlockMetadata(MathHelper.ceil(this.posX), MathHelper.ceil(this.posY), + MathHelper.ceil(this.posZ))); + if (this.posY > d0) { + this.setDead(); + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java b/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java new file mode 100644 index 0000000000..b4f64f9b35 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java @@ -0,0 +1,46 @@ +package gtPlusPlus.core.client.renderer.tabula; + +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class RenderTabulaBase extends TileEntitySpecialRenderer { + + private final ModelTabulaBase mModel; + private final ResourceLocation mTexture; + private final Class mTileClass; + + public final int mRenderID; + public final RenderTabulaBase mInstance; + + public RenderTabulaBase(ModelTabulaBase aModel, String aTexturePath, Class aTileClass) { + mModel = aModel; + mTexture = new ResourceLocation(CORE.MODID, aTexturePath); + mTileClass = aTileClass; + this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); + mInstance = this; + } + + public void renderTileEntityAt(Object aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { + if (mTileClass.isInstance(aTile)) { + //Logger.INFO("Rendering EggBox"); + this.bindTexture(mTexture); + mModel.renderAll(); + } + } + + public void renderTileEntityAt(TileEntity aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { + if (mTileClass != null && aTile != null) { + if (mTileClass.isInstance(aTile)) { + this.renderTileEntityAt((Object) aTile, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/commands/CommandDebugChunks.java b/src/main/java/gtPlusPlus/core/commands/CommandDebugChunks.java new file mode 100644 index 0000000000..8e86bcdcd6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/commands/CommandDebugChunks.java @@ -0,0 +1,152 @@ +package gtPlusPlus.core.commands; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.preloader.ChunkDebugger; +import gtPlusPlus.preloader.asm.AsmConfig; + + +public class CommandDebugChunks implements ICommand +{ + private final List aliases; + + protected String fullEntityName; + protected Entity conjuredEntity; + + public CommandDebugChunks(){ + this.aliases = new ArrayList<>(); + aliases.add("debugchunks"); + aliases.add("DC"); + } + + @Override + public int compareTo(final Object o){ + return 0; + + } + + @Override + public String getCommandName(){ + return "DebugChunks"; + + } + + @Override + public String getCommandUsage(final ICommandSender var1){ + return "/DebugChunks"; + + } + + @Override + public List getCommandAliases(){ + return this.aliases; + + } + + @Override + public void processCommand(final ICommandSender S, final String[] argString){ + Logger.INFO("Debug Command"); + + final World W = S.getEntityWorld(); + final EntityPlayer P = CommandUtils.getPlayer(S); + + if (!AsmConfig.enableChunkDebugging) { + PlayerUtils.messagePlayer(P, "Chunk Debugging is disabled."); + return; + } + + + Map aTicketCounter = new LinkedHashMap(); + for (Pair f : ChunkDebugger.mChunkTicketsMap.values()) { + String aMod = f.getKey(); + String aDim = f.getValue(); + if (aMod != null) { + if (aTicketCounter.containsKey(aMod)) { + int aModTicketCount = aTicketCounter.get(aMod); + aModTicketCount++; + aTicketCounter.put(aMod, aModTicketCount); + } + else { + aTicketCounter.put(aMod, 1); + } + } + } + if (aTicketCounter.isEmpty()) { + PlayerUtils.messagePlayer(P, "No forced chunk tickets active."); + } + for (String x : aTicketCounter.keySet()) { + PlayerUtils.messagePlayer(P, x+" has "+aTicketCounter.get(x)+" tickets active."); + } + + + Map aChunkCounter = new LinkedHashMap(); + for (Pair f : ChunkDebugger.mChunksLoadedByModsMap.values()) { + String aMod = f.getKey(); + String aDim = f.getValue(); + if (aMod == null) { + aMod = "Bad ModId"; + } + + if (aMod != null) { + //PlayerUtils.messagePlayer(P, aMod+" has "+aDim+" active."); + if (aChunkCounter.containsKey(aMod)) { + int aModTicketCount = aChunkCounter.get(aMod); + aModTicketCount = aModTicketCount + 1; + aChunkCounter.put(aMod, aModTicketCount); + Logger.INFO("Counting +1 for "+aMod+", total of "+aModTicketCount); + } + else { + aChunkCounter.put(aMod, 1); + Logger.INFO("Counting +1 for "+aMod); + } + } + } + if (aChunkCounter.isEmpty()) { + PlayerUtils.messagePlayer(P, "No chunks force loaded."); + } + for (String x : aChunkCounter.keySet()) { + PlayerUtils.messagePlayer(P, x+" has "+aChunkCounter.get(x)+" chunks active."); + } + + } + + @Override + public boolean canCommandSenderUseCommand(final ICommandSender var1){ + final EntityPlayer P = CommandUtils.getPlayer(var1); + if (P == null){ + return false; + } + if (PlayerUtils.isPlayerOP(P)) { + return true; + } + return false; + } + + @Override + public List addTabCompletionOptions(final ICommandSender var1, final String[] var2){ + return new ArrayList<>(); + } + + @Override + public boolean isUsernameIndex(final String[] var1, final int var2){ + // TODO Auto-generated method stub + return false; + } + + public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/main/java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java new file mode 100644 index 0000000000..493b7d415d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -0,0 +1,270 @@ +package gtPlusPlus.core.commands; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.preloader.asm.AsmConfig; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + + +public class CommandEnableDebugWhileRunning implements ICommand +{ + private final List aliases; + + public CommandEnableDebugWhileRunning(){ + this.aliases = new ArrayList<>(); + this.aliases.add("gtplusplus"); + } + + @Override + public int compareTo(final Object o){ + if (o instanceof Comparable) { + @SuppressWarnings("unchecked") + Comparable a = (Comparable) o; + if (a.equals(this)) { + return 0; + } + else { + return -1; + } + } + return -1; + } + + @Override + public String getCommandName(){ + return "gtpp"; + + } + + + // Use '/gtpp' along with 'logging' or 'debug' to toggle Debug mode and Logging. + // Using nothing after the command toggles both to their opposite states respectively. + @Override + public String getCommandUsage(final ICommandSender var1){ + return "/gtpp ?"; + } + + @Override + public List getCommandAliases(){ + return this.aliases; + } + + @Override + public void processCommand(final ICommandSender S, final String[] argString){ + int aMaxArgumentsAllowed = 2; + + if ((argString == null || argString.length == 0 || argString.length > aMaxArgumentsAllowed) || argString[0].toLowerCase().equals("?")) { + Logger.INFO("Listing commands and their uses."); + final EntityPlayer P = CommandUtils.getPlayer(S); + AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging); + PlayerUtils.messagePlayer(P, "The following are valid args for the '/gtpp' command:"); + PlayerUtils.messagePlayer(P, "? - This help command."); + PlayerUtils.messagePlayer(P, "logging - Toggles ALL GT++ logging for current session."); + PlayerUtils.messagePlayer(P, "hand - Lists information about held item."); + PlayerUtils.messagePlayer(P, "fuid xxx - Tries to find the fluid in the FluidRegistry."); + PlayerUtils.messagePlayer(P, "debug - Toggles GT++ Debug Mode. Only use when advised, may break everything. (OP)"); + } + else if (argString[0].toLowerCase().equals("debug")) { + Logger.INFO("Toggling Debug Mode."); + final EntityPlayer P = CommandUtils.getPlayer(S); + if (PlayerUtils.isPlayerOP(P)) { + CORE_Preloader.DEBUG_MODE = Utils.invertBoolean(CORE_Preloader.DEBUG_MODE); + PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE_Preloader.DEBUG_MODE); + } + } + else if (argString[0].toLowerCase().equals("logging")) { + Logger.INFO("Toggling Logging."); + final EntityPlayer P = CommandUtils.getPlayer(S); + AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging); + PlayerUtils.messagePlayer(P, "Toggled GT++ Logging - Enabled: "+(!AsmConfig.disableAllLogging)); + } + /* else if (argString[0].toLowerCase().equals("test")) { + ItemStack mSemiFluidgen = ItemUtils.simpleMetaStack("IC2:blockGenerator", 7, 1); + final EntityPlayer P = CommandUtils.getPlayer(S); + if(mSemiFluidgen != null) { + PlayerUtils.messagePlayer(P, ItemUtils.getItemName(mSemiFluidgen)); + } + }*/ + + else if (argString[0].toLowerCase().equals("inv")) { + final EntityPlayer P = CommandUtils.getPlayer(S); + if (P != null && !P.worldObj.isRemote) { + ItemStack[] aInv = P.inventory.mainInventory; + for (ItemStack aItem : aInv) { + if (aItem != null) { + String aModID = GameRegistry.findUniqueIdentifierFor(aItem.getItem()).modId; + String aRegistryName = GameRegistry.findUniqueIdentifierFor(aItem.getItem()).name; + Logger.INFO(aModID+":"+aRegistryName); + } + } + } + } + else if (argString[0].toLowerCase().equals("hand")) { + final EntityPlayer P = CommandUtils.getPlayer(S); + if (P != null) { + ItemStack aHeldItem = PlayerUtils.getItemStackInPlayersHand(P); + if (aHeldItem != null) { + String aItemDisplayName = ItemUtils.getItemName(aHeldItem); + String aItemUnlocalName = ItemUtils.getUnlocalizedItemName(aHeldItem); + String aNbtString = tryIterateNBTData(aHeldItem); + AutoMap aOreDictNames = new AutoMap(); + + int[] aOreIDs = OreDictionary.getOreIDs(aHeldItem); + for (int id : aOreIDs) { + String aOreNameFromID = OreDictionary.getOreName(id); + if (aOreNameFromID != null && aOreNameFromID.length() > 0 && !aOreNameFromID.equals("Unknown")) { + aOreDictNames.add(aOreNameFromID); + } + } + + String aOreDictData = ""; + if (!aOreDictNames.isEmpty()) { + for (String tag : aOreDictNames) { + aOreDictData += (tag+", "); + } + if (aOreDictData.endsWith(", ")) { + aOreDictData = aOreDictData.substring(0, aOreDictData.length()-2); + } + } + + AutoMap aFluidContainerData = new AutoMap(); + FluidStack aHeldItemFluid = FluidContainerRegistry.getFluidForFilledItem(aHeldItem); + if (aHeldItemFluid != null) { + aFluidContainerData.put("FluidStack Unlocal Name: "+aHeldItemFluid.getUnlocalizedName()); + aFluidContainerData.put("FluidStack Local Name: "+aHeldItemFluid.getLocalizedName()); + aFluidContainerData.put("Fluid Unlocal Name: "+aHeldItemFluid.getFluid().getUnlocalizedName()); + aFluidContainerData.put("Fluid Local Name: "+aHeldItemFluid.getFluid().getLocalizedName()); + aFluidContainerData.put("Fluid Name: "+aHeldItemFluid.getFluid().getName()); + } + + PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "); + if (aFluidContainerData.size() > 0) { + for (String s : aFluidContainerData) { + PlayerUtils.messagePlayer(P, ""+s); + } + } + if (!aOreDictNames.isEmpty()) { + PlayerUtils.messagePlayer(P, ""+aOreDictData); + } + if (aNbtString.length() > 0) { + PlayerUtils.messagePlayer(P, ""+aNbtString); + } + } + else { + PlayerUtils.messagePlayer(P, "No item held."); + } + } + } + else if (argString[0].toLowerCase().equals("fluid")) { + if (argString.length > 1 && argString[1] != null && argString[1].length() > 0) { + final EntityPlayer P = CommandUtils.getPlayer(S); + FluidStack aFluid = FluidUtils.getWildcardFluidStack(argString[1], 1); + if (P != null && aFluid != null) { + PlayerUtils.messagePlayer(P, "Found fluid stack: "+FluidRegistry.getFluidName(aFluid)); + } + else if (P != null && aFluid == null) { + PlayerUtils.messagePlayer(P, "Could not find any fluids."); + } + } + } + else if (argString[0].toLowerCase().equals("item")) { + if (argString.length > 1 && argString[1] != null && argString[1].length() > 0) { + final EntityPlayer P = CommandUtils.getPlayer(S); + ItemStack aTest = ItemUtils.getItemStackFromFQRN(argString[1], 1); + if (P != null && aTest != null) { + PlayerUtils.messagePlayer(P, "Found fluid stack: "+ItemUtils.getItemName(aTest)); + } + else if (P != null && aTest == null) { + PlayerUtils.messagePlayer(P, "Could not find valid item."); + } + } + } + else { + final EntityPlayer P = CommandUtils.getPlayer(S); + PlayerUtils.messagePlayer(P, "Invalid command, use '?' as an argument for help.'"); + } + + } + + @Override + public boolean canCommandSenderUseCommand(final ICommandSender var1){ + if (var1 == null || CommandUtils.getPlayer(var1) == null) { + return false; + } + return true; + } + + @Override + public List addTabCompletionOptions(final ICommandSender var1, final String[] var2){ + ArrayList aTabCompletes = new ArrayList(); + aTabCompletes.add("?"); + aTabCompletes.add("logging"); + aTabCompletes.add("debug"); + aTabCompletes.add("hand"); + aTabCompletes.add("fluid"); + return aTabCompletes; + } + + @Override + public boolean isUsernameIndex(final String[] var1, final int var2){ + // TODO Auto-generated method stub + return false; + } + + public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ + return true; + } + + public static String tryIterateNBTData(ItemStack aStack) { + try { + AutoMap aItemDataTags = new AutoMap(); + NBTTagCompound aNBT = NBTUtils.getNBT(aStack); + if (aNBT != null) { + if (!aNBT.hasNoTags()) { + Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); + if (mInternalMap != null) { + for (Map.Entry e : mInternalMap.entrySet()) { + aItemDataTags.add(e.getKey().toString()+":"+e.getValue()); + } + int a = 0; + String data = ""; + for (String tag : aItemDataTags) { + data += (tag+", "); + } + if (data.endsWith(", ")) { + data = data.substring(0, data.length()-2); + } + return data; + } else { + Logger.INFO("Data map reflected from NBTTagCompound was not valid."); + return "Bad NBT"; + } + } + } + } catch (Throwable t) {} + return ""; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/commands/CommandMath.java b/src/main/java/gtPlusPlus/core/commands/CommandMath.java new file mode 100644 index 0000000000..5ccfb3397f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/commands/CommandMath.java @@ -0,0 +1,100 @@ +package gtPlusPlus.core.commands; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.MiningUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.preloader.ChunkDebugger; + + +public class CommandMath implements ICommand +{ + private final List aliases; + + protected String fullEntityName; + protected Entity conjuredEntity; + + public CommandMath(){ + this.aliases = new ArrayList<>(); + //this.aliases.add("hometele"); + //this.aliases.add("warphome"); + } + + @Override + public int compareTo(final Object o){ + return 0; + + } + + @Override + public String getCommandName(){ + return "alkalus"; + + } + + @Override + public String getCommandUsage(final ICommandSender var1){ + return "/alkalus [Dev Command]"; + + } + + @Override + public List getCommandAliases(){ + return this.aliases; + + } + + @Override + public void processCommand(final ICommandSender S, final String[] argString){ + Logger.INFO("Debug Command"); + final World W = S.getEntityWorld(); + final EntityPlayer P = CommandUtils.getPlayer(S); + if (P.getDisplayName().equalsIgnoreCase("draknyte1")) { + Logger.INFO("[Bedrock Miner] OreType Scan"); + MiningUtils.iterateAllOreTypes(); + } + + } + + @Override + public boolean canCommandSenderUseCommand(final ICommandSender var1){ + final EntityPlayer P = CommandUtils.getPlayer(var1); + if (P == null){ + return false; + } + if (P.getDisplayName().toLowerCase().equals("draknyte1") || P.getCommandSenderName().toLowerCase().equals("draknyte1") || CORE.DEVENV) { + return true; + } + return false; + } + + @Override + public List addTabCompletionOptions(final ICommandSender var1, final String[] var2){ + return null; + } + + @Override + public boolean isUsernameIndex(final String[] var1, final int var2){ + // TODO Auto-generated method stub + return false; + } + + public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ + + + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/commands/CommandUtils.java b/src/main/java/gtPlusPlus/core/commands/CommandUtils.java new file mode 100644 index 0000000000..175925d40c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/commands/CommandUtils.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.commands; + +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; + +public class CommandUtils { + + public static EntityPlayer getPlayer(final ICommandSender icommandsender){ + EntityPlayer player; + + if(icommandsender instanceof EntityPlayer){ + player = (EntityPlayer)icommandsender; + return player; + } + else { + return null; + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/BasePlayer.java b/src/main/java/gtPlusPlus/core/common/BasePlayer.java new file mode 100644 index 0000000000..4686f34207 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/BasePlayer.java @@ -0,0 +1,212 @@ +package gtPlusPlus.core.common; + +import api.player.client.ClientPlayerAPI; +import api.player.client.ClientPlayerBase; +import gtPlusPlus.core.handler.events.CustomMovementHandler; +import gtPlusPlus.core.handler.events.SneakManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.settings.GameSettings; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.MovementInputFromOptions; + +public class BasePlayer extends ClientPlayerBase +{ + private final Minecraft mc = Minecraft.getMinecraft(); + private final CustomMovementHandler customMovementInput = new CustomMovementHandler(); + private final GameSettings settings = this.mc.gameSettings; + + public BasePlayer(final ClientPlayerAPI api) + { + super(api); + } + + /* + * EntityPlayerSP.onLivingUpdate() - Adapted to PlayerAPI + */ + @Override + public void onLivingUpdate() { + + super.onLivingUpdate(); + EntityPlayer aPlayer = this.player; + if (aPlayer != null) { + SneakManager aSneak = SneakManager.get(aPlayer); + if (!aSneak.isWearingRing()) { + return; + } + } + + if(this.player.sprintingTicksLeft > 0) + { + --this.player.sprintingTicksLeft; + if(this.player.sprintingTicksLeft == 0) + { + this.player.setSprinting(false); + } + } + + if(this.playerAPI.getSprintToggleTimerField() > 0) + { + this.playerAPI.setSprintToggleTimerField(this.playerAPI.getSprintToggleTimerField() - 1); + } + + if(this.mc.playerController.enableEverythingIsScrewedUpMode()) + { + this.player.posX = this.player.posZ = 0.5D; + this.player.posX = 0.0D; + this.player.posZ = 0.0D; + this.player.rotationYaw = this.player.ticksExisted / 12.0F; + this.player.rotationPitch = 10.0F; + this.player.posY = 68.5D; + } + else + { + + + + + final boolean isJumping = this.player.movementInput.jump; + + final float minSpeed = 0.8F; + final boolean isMovingForward = this.player.movementInput.moveForward >= minSpeed; + this.customMovementInput.update(this.mc, (MovementInputFromOptions)this.player.movementInput, this.player); + + + /* + * Begin ToggleSneak Changes - ToggleSprint + */ + SneakManager aSneak = SneakManager.get(this.player); + + final boolean isSprintDisabled = false; + final boolean canDoubleTap = aSneak.optionDoubleTap; + + + // Detect when ToggleSprint was disabled in the in-game options menu + if(aSneak.wasSprintDisabled) + { + this.player.setSprinting(false); + this.customMovementInput.UpdateSprint(false, false, aSneak); + aSneak.wasSprintDisabled = false; + } + + // Default Sprint routine converted to PlayerAPI, use if ToggleSprint is disabled - TODO - Disable sprinting as a whole + if(isSprintDisabled) + { + //Utils.LOG_INFO("Sprint pressed"); + if(aSneak.optionDoubleTap && this.player.onGround && !isMovingForward && (this.player.movementInput.moveForward >= minSpeed) && !this.player.isSprinting() && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness)) + { + if((this.playerAPI.getSprintToggleTimerField() <= 0) && !this.settings.keyBindSprint.getIsKeyPressed()) + { + this.playerAPI.setSprintToggleTimerField(7); + } + else + { + if (aSneak.Sprinting()){ + this.player.setSprinting(true); + this.customMovementInput.UpdateSprint(true, false, aSneak); + } + else { + this.player.setSprinting(false); + this.customMovementInput.UpdateSprint(false, false, aSneak); + } + } + } + + if(!this.player.isSprinting() && (this.player.movementInput.moveForward >= minSpeed) && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) && this.settings.keyBindSprint.getIsKeyPressed()) + { + if (aSneak.Sprinting()){ + this.player.setSprinting(true); + this.customMovementInput.UpdateSprint(true, false, aSneak); + } + else { + this.player.setSprinting(false); + this.customMovementInput.UpdateSprint(false, false, aSneak); + } + } + } + else + { + final boolean state = this.customMovementInput.sprint; + + // Only handle changes in state under the following conditions: + // On ground, not hungry, not eating/using item, not blind, and not Vanilla + // + // 5/6/14 - onGround check removed to match vanilla's 'start sprint while jumping' behavior. + //if(this.player.onGround && enoughHunger && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) && !this.customMovementInput.sprintHeldAndReleased) + + if(!this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness) && !this.customMovementInput.sprintHeldAndReleased) + { + if((canDoubleTap && !this.player.isSprinting()) || !canDoubleTap) + { + if (aSneak.Sprinting()){ + this.player.setSprinting(state); + } else { + this.player.setSprinting(false); + } + } + } + + if(canDoubleTap && !state && this.player.onGround && !isMovingForward && (this.player.movementInput.moveForward >= minSpeed) && !this.player.isSprinting() && !this.player.isUsingItem() && !this.player.isPotionActive(Potion.blindness)) + { + if(this.playerAPI.getSprintToggleTimerField() == 0) + { + this.playerAPI.setSprintToggleTimerField(7); + } + else + { + if (aSneak.Sprinting()){ + this.player.setSprinting(true); + this.customMovementInput.UpdateSprint(true, true, aSneak); + this.playerAPI.setSprintToggleTimerField(0); + } + } + } + } + + // If sprinting, break the sprint in appropriate circumstances: + // Player stops moving forward, runs into something, or gets too hungry + if(this.player.isSprinting() && ((this.player.movementInput.moveForward < minSpeed) || this.player.isCollidedHorizontally)) + { + this.player.setSprinting(false); + + // Undo toggle if we resumed vanilla operation due to Hold&Release, DoubleTap, Fly, Ride + if ((this.customMovementInput.sprintHeldAndReleased == true) || isSprintDisabled || this.customMovementInput.sprintDoubleTapped || this.player.capabilities.isFlying || this.player.isRiding()) + { + this.customMovementInput.UpdateSprint(false, false, aSneak); + } + } + + /* + * End ToggleSneak Changes - ToggleSprint + */ + + // // + // // Debug Framework - Added 5/7/2014 + // // + // if (this.showDebug && this.settings.keyBindPickBlock.getIsKeyPressed() && !this.handledDebugPress) + // { + // this.player.addChatMessage(new ChatComponentText("+--------------------------------------+")); + // this.player.addChatMessage(new ChatComponentText("| ToggleSneak Debug Info |")); + // this.player.addChatMessage(new ChatComponentText("+--------------------------------------+")); + // this.player.addChatMessage(new ChatComponentText(" ")); + // this.player.addChatMessage(new ChatComponentText("isFlying - " + (this.player.capabilities.isFlying == true ? "True" : "False"))); + // this.player.addChatMessage(new ChatComponentText("isCreative - " + (this.player.capabilities.isCreativeMode == true ? "True" : "False"))); + // this.player.addChatMessage(new ChatComponentText("enableFlyBoost - " + (SneakManager.optionEnableFlyBoost == true ? "True" : "False"))); + // this.player.addChatMessage(new ChatComponentText("flyBoostAmount - " + SneakManager.optionFlyBoostAmount)); + // this.player.addChatMessage(new ChatComponentText(" ")); + // this.player.addChatMessage(new ChatComponentText("keybindSprint - " + (this.settings.keyBindSprint.getIsKeyPressed() == true ? "True" : "False"))); + // this.player.addChatMessage(new ChatComponentText("keybindSneak - " + (this.settings.keyBindSneak.getIsKeyPressed() == true ? "True" : "False"))); + // this.player.addChatMessage(new ChatComponentText("keybindJump - " + (this.settings.keyBindJump.getIsKeyPressed() == true ? "True" : "False"))); + // this.player.addChatMessage(new ChatComponentText(" ")); + // this.player.addChatMessage(new ChatComponentText(" ")); + // + // this.handledDebugPress = true; + // } + // else if (this.showDebug && !this.settings.keyBindPickBlock.getIsKeyPressed() && this.handledDebugPress) + // { + // this.handledDebugPress = false; + // } + + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/common/CommonProxy.java b/src/main/java/gtPlusPlus/core/common/CommonProxy.java new file mode 100644 index 0000000000..c038afce8f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/CommonProxy.java @@ -0,0 +1,306 @@ +package gtPlusPlus.core.common; + +import cpw.mods.fml.common.event.*; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.entity.InternalEntityRegistry; +import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; +import gtPlusPlus.core.entity.monster.EntitySickBlaze; +import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; +import gtPlusPlus.core.fluids.FluidFactory; +import gtPlusPlus.core.handler.*; +import gtPlusPlus.core.handler.events.*; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.chemistry.GenericChem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.tileentities.ModTileEntities; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.debug.DEBUG_INIT; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.player.PlayerCache; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.eio.handler.HandlerTooltip_EIO; +import gtPlusPlus.xmod.galacticraft.handler.HandlerTooltip_GC; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer; + +public class CommonProxy { + + public CommonProxy() { + // Should Register Gregtech Materials I've Made + Utils.registerEvent(this); + if (!CORE.GTNH) { + Logger.INFO("We're using Gregtech " + Utils.getGregtechVersionAsString()); + } else { + Logger.INFO("We're using GTNH's Gregtech " + Utils.getGregtechVersionAsString()); + } + } + + public void preInit(final FMLPreInitializationEvent e) { + Logger.INFO("Doing some house cleaning."); + LoadedMods.checkLoaded(); + Logger.INFO("Making sure we're ready to party!"); + + if (!CORE_Preloader.DEBUG_MODE) { + Logger.WARNING("Development mode not enabled."); + } else if (CORE_Preloader.DEBUG_MODE) { + Logger.INFO("Development mode enabled."); + } else { + Logger.WARNING("Development mode not set."); + } + + AddToCreativeTab.initialiseTabs(); + EnumHelperHandler.init(); + + // Moved from Init after Debug Loading. + // 29/01/18 - Alkalus + // Moved earlier into PreInit, so that Items exist before they're called upon in + // recipes. + // 20/03/18 - Alkalus + ModItems.init(); + ModBlocks.init(); + CI.preInit(); + FluidFactory.preInit(); + COMPAT_IntermodStaging.preInit(e); + BookHandler.run(); + // Registration of entities and renderers + Logger.INFO("[Proxy] Calling Entity registrator."); + registerEntities(); + Logger.INFO("[Proxy] Calling Tile Entity registrator."); + registerTileEntities(); + + Logger.INFO("[Proxy] Calling Render registrator."); + registerRenderThings(); + + } + + public void init(final FMLInitializationEvent e) { + // Debug Loading + if (CORE_Preloader.DEBUG_MODE) { + DEBUG_INIT.registerHandlers(); + } + + registerCustomItemsForMaterials(); + ModBlocks.blockCustomMobSpawner = new BlockGenericSpawner(); + CI.init(); + FluidFactory.init(); + + /** + * Register the Event Handlers. + */ + + // Prevents my Safes being destroyed. + Utils.registerEvent(new PickaxeBlockBreakEventHandler()); + // Block Handler for all events. + Utils.registerEvent(new BlockEventHandler()); + Utils.registerEvent(new GeneralTooltipEventHandler()); + // Handles Tooltips for items giving custom multiblock behaviour + Utils.registerEvent(new SpecialBehaviourTooltipHandler()); + // Handles Custom tooltips for EIO. + Utils.registerEvent(new HandlerTooltip_EIO()); + // Handles Custom Tooltips for GC + Utils.registerEvent(new HandlerTooltip_GC()); + + if (CORE.DEVENV) { + Utils.registerEvent(new StopAnnoyingFuckingAchievements()); + } + + Utils.registerEvent(new EnderDragonDeathHandler()); + Utils.registerEvent(new EntityDeathHandler()); + + if (ConfigSwitches.disableZombieReinforcement) { + // Make Zombie reinforcements fuck off. + Utils.registerEvent(new ZombieBackupSpawnEventHandler()); + } + + /** + * End of Subscribe Event registration. + */ + + // Compat Handling + COMPAT_HANDLER.registerMyModsOreDictEntries(); + COMPAT_HANDLER.intermodOreDictionarySupport(); + COMPAT_IntermodStaging.init(e); + } + + public void postInit(final FMLPostInitializationEvent e) { + Logger.INFO("Cleaning up, doing postInit."); + PlayerCache.initCache(); + FluidFactory.postInit(); + + // Make Burnables burnable + if (!CORE.burnables.isEmpty()) { + BurnableFuelHandler fuelHandler = new BurnableFuelHandler(); + GameRegistry.registerFuelHandler(fuelHandler); + Logger.INFO("[Fuel Handler] Registering " + fuelHandler.getClass().getName()); + } + + // Compat Handling + Logger.INFO("Removing recipes from other mods."); + COMPAT_HANDLER.RemoveRecipesFromOtherMods(); + Logger.INFO("Initialising Handler, Then Adding Recipes"); + COMPAT_HANDLER.InitialiseHandlerThenAddRecipes(); + Logger.INFO("Loading Intermod staging."); + COMPAT_IntermodStaging.postInit(e); + Logger.INFO("Loading queued recipes."); + COMPAT_HANDLER.runQueuedRecipes(); + Logger.INFO("Registering custom mob drops."); + registerCustomMobDrops(); + + // Moved last in postInit(). + // 12/12/19 - Alkalus + // Moved last, to prevent recipes being generated post initialisation. + Logger.INFO("Loading Gregtech API recipes."); + COMPAT_HANDLER.startLoadingGregAPIBasedRecipes(); + } + + public void serverStarting(final FMLServerStartingEvent e) { + COMPAT_HANDLER.InitialiseLateHandlerThenAddRecipes(); + } + + public void onLoadComplete(FMLLoadCompleteEvent event) { + COMPAT_IntermodStaging.onLoadComplete(event); + COMPAT_HANDLER.onLoadComplete(event); + } + + public void registerNetworkStuff() { + GuiHandler.init(); + } + + public void registerEntities() { + InternalEntityRegistry.registerEntities(); + } + + public void registerTileEntities() { + ModTileEntities.init(); + } + + public void registerRenderThings() { + + } + + public int addArmor(final String armor) { + return 0; + } + + public void generateMysteriousParticles(final Entity entity) { + + } + + public void generateMobSpawners() { + // Try register some test spawners + Utils.createNewMobSpawner(0, EntityGiantChickenBase.class); + Utils.createNewMobSpawner(1, EntitySickBlaze.class); + Utils.createNewMobSpawner(2, EntityStaballoyConstruct.class); + } + + public void registerCustomItemsForMaterials() { + //Material.registerComponentForMaterial(GenericChem.CARBYNE, OrePrefixes.plate, GregtechItemList.Carbyne_Sheet_Finished.get(1)); + } + + public void registerCustomMobDrops() { + + //Zombie + EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemRope), 3, 100); + EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemFiber), 5, 250); + EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemSandstoneHammer), 1, 10); + EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemBomb), 2, 10); + EntityUtils.registerDropsForMob(EntityZombie.class, ALLOY.TUMBAGA.getTinyDust(1), 1, 10); + EntityUtils.registerDropsForMob(EntityZombie.class, ALLOY.POTIN.getTinyDust(1), 1, 10); + + //Blazes + if (ItemUtils.doesOreDictHaveEntryFor("dustPyrotheum")) { + EntityUtils.registerDropsForMob(EntityBlaze.class, ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), 1, 10); + EntityUtils.registerDropsForMob(EntityBlaze.class, ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), 1, 10); + } + + + //Special mobs Support + if (ReflectionUtils.doesClassExist("toast.specialMobs.entity.zombie.EntityBrutishZombie")) { + Class aBrutishZombie = ReflectionUtils.getClass("toast.specialMobs.entity.zombie.EntityBrutishZombie"); + ItemStack aFortune1 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); + ItemStack aFortune2 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); + ItemStack aFortune3 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); + EntityUtils.registerDropsForMob(aBrutishZombie, aFortune1, 1, 100); + EntityUtils.registerDropsForMob(aBrutishZombie, aFortune2, 1, 50); + EntityUtils.registerDropsForMob(aBrutishZombie, aFortune3, 1, 1); + EntityUtils.registerDropsForMob(aBrutishZombie, ItemUtils.getItemStackOfAmountFromOreDict("ingotRedAlloy", 1), 3, 200); + } + + //GalaxySpace Support + if (ReflectionUtils.doesClassExist("galaxyspace.SolarSystem.moons.europa.entities.EntityEvolvedColdBlaze")) { + Class aColdBlaze = ReflectionUtils.getClass("galaxyspace.SolarSystem.moons.europa.entities.EntityEvolvedColdBlaze"); + ItemStack aSmallBlizz, aTinyBlizz, aSmallCryo, aTinyCryo; + aSmallBlizz = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallBlizz", 1); + aTinyBlizz = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyBlizz", 1); + aSmallCryo = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallCryotheum", 1); + aTinyCryo = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCryotheum", 1); + EntityUtils.registerDropsForMob(aColdBlaze, ItemUtils.getItemStackOfAmountFromOreDict("stickBlizz", 1), 2, 500); + if (aSmallBlizz != null) { + EntityUtils.registerDropsForMob(aColdBlaze, aSmallBlizz, 2, 750); + } + if (aTinyBlizz != null) { + EntityUtils.registerDropsForMob(aColdBlaze, aTinyBlizz, 4, 1500); + } + if (aSmallCryo != null) { + EntityUtils.registerDropsForMob(aColdBlaze, aSmallCryo, 1, 50); + } + if (aTinyCryo != null) { + EntityUtils.registerDropsForMob(aColdBlaze, aTinyCryo, 2, 100); + } + } + + } + + protected final AutoMap> mItemRenderMappings = new AutoMap>(); + + + public static void registerItemRendererGlobal(Item aItem, IItemRenderer aRenderer) { + GTplusplus.proxy.registerItemRenderer(aItem, aRenderer); + } + + public void registerItemRenderer(Item aItem, IItemRenderer aRenderer) { + if (Utils.isServer()) { + return; + } + else { + mItemRenderMappings.add(new Pair(aItem, aRenderer)); + } + } + + public World getClientWorld() { + return null; + } + + /** + * Returns a side-appropriate EntityPlayer for use during message handling + */ + public EntityPlayer getPlayerEntity(MessageContext ctx) { + return ctx.getServerHandler().playerEntity; + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java new file mode 100644 index 0000000000..c9704603af --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java @@ -0,0 +1,71 @@ +package gtPlusPlus.core.common.compat; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.bauble.BatteryPackBaseBauble; +import gtPlusPlus.core.item.bauble.FireProtectionBauble; +import gtPlusPlus.core.item.bauble.MonsterKillerBaseBauble; +import gtPlusPlus.core.item.general.ItemCloakingDevice; +import gtPlusPlus.core.item.general.ItemHealingDevice; +import gtPlusPlus.core.item.general.ItemSlowBuildingRing; +import gtPlusPlus.core.lib.LoadedMods; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.monster.EntityMagmaCube; +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.entity.monster.EntitySkeleton; +import net.minecraft.entity.monster.EntitySpider; +import net.minecraft.entity.monster.EntityZombie; + +public class COMPAT_Baubles { + + public static void run(){ + if (LoadedMods.Baubles){ + baublesLoaded(); + } + else { + baublesNotLoaded(); + } + } + + public static void baublesLoaded(){ + Logger.INFO("Baubles Found - Loading Wearables."); + ModItems.itemPersonalCloakingDevice = new ItemCloakingDevice(0); + //itemPersonalCloakingDeviceCharged = new ItemCloakingDevice(0).set; + ModItems.itemPersonalHealingDevice = new ItemHealingDevice(); + ModItems.itemPersonalFireProofDevice = new FireProtectionBauble(); + + try { + ModItems.itemChargePack_Low_1 = new BatteryPackBaseBauble(1); + ModItems.itemChargePack_Low_2 = new BatteryPackBaseBauble(2); + ModItems.itemChargePack_Low_3 = new BatteryPackBaseBauble(3); + ModItems.itemChargePack_Low_4 = new BatteryPackBaseBauble(4); + ModItems.itemChargePack_Low_5 = new BatteryPackBaseBauble(5); + ModItems.itemChargePack_High_1 = new BatteryPackBaseBauble(6); + ModItems.itemChargePack_High_2 = new BatteryPackBaseBauble(7); + ModItems.itemChargePack_High_3 = new BatteryPackBaseBauble(8); + ModItems.itemChargePack_High_4 = new BatteryPackBaseBauble(9); + } + catch (Throwable t) { + t.printStackTrace(); + } + + ModItems.itemAmuletMonsterKiller_Zombie = new MonsterKillerBaseBauble(new Class[] {EntityZombie.class}, "Zombie", 3); + ModItems.itemAmuletMonsterKiller_Skeleton = new MonsterKillerBaseBauble(new Class[] {EntitySkeleton.class}, "Skeleton", 3); + ModItems.itemAmuletMonsterKiller_Spider = new MonsterKillerBaseBauble(new Class[] {EntitySpider.class}, "Spider", 3); + ModItems.itemAmuletMonsterKiller_Creeper = new MonsterKillerBaseBauble(new Class[] {EntityCreeper.class}, "Creeper", 4); + ModItems.itemAmuletMonsterKiller_Enderman = new MonsterKillerBaseBauble(new Class[] {EntityEnderman.class}, "Enderman", 4); + ModItems.itemAmuletMonsterKiller_Nether = new MonsterKillerBaseBauble(new Class[] {EntityPigZombie.class, EntityGhast.class, EntityMagmaCube.class, EntityBlaze.class}, "Hellish", 6); + + if (LoadedMods.PlayerAPI){ + ModItems.itemSlowBuildingRing = new ItemSlowBuildingRing(); + } + } + + public static void baublesNotLoaded(){ + Logger.INFO("Baubles Not Found - Skipping Resources."); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java new file mode 100644 index 0000000000..3854f6612f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_BigReactors.java @@ -0,0 +1,21 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.item.ModItems; + +public class COMPAT_BigReactors { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + GT_OreDictUnificator.registerOre("plateBlutonium", new ItemStack(ModItems.itemPlateBlutonium)); + GT_OreDictUnificator.registerOre("plateCyanite", new ItemStack(ModItems.itemPlateCyanite)); + GT_OreDictUnificator.registerOre("plateLudicrite", new ItemStack(ModItems.itemPlateLudicrite)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java new file mode 100644 index 0000000000..cd5d36b653 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_CompactWindmills.java @@ -0,0 +1,172 @@ +package gtPlusPlus.core.common.compat; + +import static gtPlusPlus.core.handler.COMPAT_HANDLER.*; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.recipe.ShapedRecipeObject; +import gtPlusPlus.core.util.minecraft.ItemUtils; + + + +public class COMPAT_CompactWindmills { + + //Change IC2 Upgrades + public static ItemStack kineticWind = ItemUtils.simpleMetaStack("IC2:blockKineticGenerator", 0, 1); + public static ItemStack shaftIron = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 11, 1); + public static ItemStack cableCopper = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 1367, 1); + public static String plateRubber = "ore:plateRubber"; + + //Machine Casings + public static ItemStack elvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 0, 1); + public static ItemStack lvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 1, 1); + public static ItemStack mvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 2, 1); + public static ItemStack hvCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 3, 1); + public static ItemStack evCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 4, 1); + public static ItemStack ivCasing = ItemUtils.simpleMetaStack("gregtech:gt.blockcasings", 5, 1); + + //GT Transformers + public static ItemStack elvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 20, 1); + public static ItemStack lvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 21, 1); + public static ItemStack mvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 22, 1); + public static ItemStack hvTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 23, 1); + public static ItemStack evTransformer = ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 24, 1); + + //Compact Windmills + public static ItemStack elvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 0, 1); + public static ItemStack lvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 1, 1); + public static ItemStack mvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 2, 1); + public static ItemStack hvWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 3, 1); + public static ItemStack evWindmill = ItemUtils.simpleMetaStack("CompactWindmills:blockCompactWindmill", 4, 1); + + //Compact Rotors + public static ItemStack rotor2 = ItemUtils.getItemStackFromFQRN("CompactWindmills:WOOL", 1); + public static ItemStack rotor1 = ItemUtils.getItemStackFromFQRN("CompactWindmills:WOOD", 1); + public static ItemStack rotor3 = ItemUtils.getItemStackFromFQRN("CompactWindmills:ALLOY", 1); + public static ItemStack rotor4 = ItemUtils.getItemStackFromFQRN("CompactWindmills:CARBON", 1); + public static ItemStack rotor5 = ItemUtils.getItemStackFromFQRN("CompactWindmills:IRIDIUM", 1); + + //IC2 Rotors + public static ItemStack rotorIC1 = ItemUtils.getItemStackFromFQRN("IC2:itemwoodrotor", 1); + public static ItemStack rotorIC2 = ItemUtils.getItemStackFromFQRN("IC2:itemironrotor", 1); + public static ItemStack rotorIC3 = ItemUtils.getItemStackFromFQRN("IC2:itemsteelrotor", 1); + public static ItemStack rotorIC4 = ItemUtils.getItemStackFromFQRN("IC2:itemwcarbonrotor", 1); + public static ItemStack rotorBlade1 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 7, 1); + public static ItemStack rotorBlade2 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 8, 1); + public static ItemStack rotorBlade3 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 10, 1); + public static ItemStack rotorBlade4 = ItemUtils.simpleMetaStack("IC2:itemRecipePart", 9, 1); + + //Plates + public static String plateTier1 = "ore:plateMagnalium"; + public static String plateTier2 = "ore:plateStainlessSteel"; + public static String plateTier3 = "ore:plateTitanium"; + public static String plateTier4 = "ore:plateTungstenSteel"; + public static String plateTier5 = "ore:plateNichrome"; + public static String plateCarbon = "ore:plateAlloyCarbon"; + public static String plateAlloy = "ore:plateAlloyAdvanced"; + + //Circuits + public static String circuitTier1 = "ore:circuitGood"; + public static String circuitTier2 = "ore:circuitAdvanced"; + public static String circuitTier3 = "ore:circuitData"; + public static String circuitTier4 = "ore:circuitElite"; + public static String circuitTier5 = "ore:circuitMaster"; + + //Wooden Rotor + public static ShapedRecipeObject Wooden_Rotor = new ShapedRecipeObject( + rotorBlade1, "ore:plateAnyIron", "ore:plateAnyIron", + "ore:screwAluminium", rotorIC1, "ore:screwAluminium", + rotorBlade1, "plateAnyIron", rotorBlade1, + rotor1); + //Alloy Rotor + public static ShapedRecipeObject Alloy_Rotor = new ShapedRecipeObject( + plateAlloy, plateAlloy, plateAlloy, + plateAlloy, rotorIC3, plateAlloy, + plateAlloy,plateAlloy, plateAlloy, + rotor3); + //Carbon Rotor + public static ShapedRecipeObject Carbon_Rotor = new ShapedRecipeObject( + plateCarbon, rotorBlade4, plateCarbon, + rotorBlade4, rotor3, rotorBlade4, + plateCarbon, rotorBlade4, plateCarbon, + rotor4); + + //Kinetic Wind Turbine + public static ShapedRecipeObject KWT = new ShapedRecipeObject( + plateCarbon, shaftIron, plateCarbon, + cableCopper, mvCasing, cableCopper, + plateRubber, plateCarbon, plateRubber, + kineticWind); + + //ELV Windmill + public static ShapedRecipeObject WM_ELV = new ShapedRecipeObject( + + circuitTier1, elvTransformer, circuitTier1, + plateTier1, lvCasing, plateTier1, + plateTier1, rotor1, plateTier1, + elvWindmill); + + + //LV Windmill + public static ShapedRecipeObject WM_LV = new ShapedRecipeObject( + circuitTier2, lvTransformer, circuitTier2, + plateTier2, mvCasing, plateTier2, + plateTier2, rotor2, plateTier2, + lvWindmill); + + //MV Windmill + public static ShapedRecipeObject WM_MV = new ShapedRecipeObject( + circuitTier3, mvTransformer, circuitTier3, + plateTier3, hvCasing, plateTier3, + plateTier3, rotor3, plateTier3, + mvWindmill); + + //HV Windmill + public static ShapedRecipeObject WM_HV = new ShapedRecipeObject( + circuitTier4, hvTransformer, circuitTier4, + plateTier4, evCasing, plateTier4, + plateTier4, rotor4, plateTier4, + hvWindmill); + + //EV Windmill + public static ShapedRecipeObject WM_EV = new ShapedRecipeObject( + circuitTier5, evTransformer, circuitTier5, + plateTier5, ivCasing, plateTier5, + plateTier5, rotor5, plateTier5, + evWindmill); + + public static void OreDict(){ + run(); + } + + private static final void run(){ + //RemoveRecipeQueue.add("CompactWindmills:WOOL"); + //RemoveRecipeQueue.add("CompactWindmills:WOOD"); + //RemoveRecipeQueue.add("CompactWindmills:ALLOY"); + //RemoveRecipeQueue.add("CompactWindmills:CARBON"); + //RemoveRecipeQueue.add("CompactWindmills:IRIDIUM"); + + //Remove Recipes + RemoveRecipeQueue.add(kineticWind); + RemoveRecipeQueue.add(elvWindmill); + RemoveRecipeQueue.add(lvWindmill); + RemoveRecipeQueue.add(mvWindmill); + RemoveRecipeQueue.add(hvWindmill); + RemoveRecipeQueue.add(evWindmill); + RemoveRecipeQueue.add(rotor1); + RemoveRecipeQueue.add(rotor3); + RemoveRecipeQueue.add(rotor4); + + //Add Recipes + AddRecipeQueue.add(Wooden_Rotor); + AddRecipeQueue.add(Alloy_Rotor); + AddRecipeQueue.add(Carbon_Rotor); + AddRecipeQueue.add(KWT); + AddRecipeQueue.add(WM_ELV); + AddRecipeQueue.add(WM_LV); + AddRecipeQueue.add(WM_MV); + AddRecipeQueue.add(WM_HV); + AddRecipeQueue.add(WM_EV); + + } +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java new file mode 100644 index 0000000000..6598a7e21e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_EnderIO.java @@ -0,0 +1,28 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class COMPAT_EnderIO { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + ItemUtils.getItemForOreDict("EnderIO:itemAlloy", "ingotVibrantAlloy", "Vibrant Alloy Ingot", 2); + GT_OreDictUnificator.registerOre("plateConductiveIron", new ItemStack(ModItems.itemPlateConductiveIron)); + GT_OreDictUnificator.registerOre("plateDarkSteel", new ItemStack(ModItems.itemPlateDarkSteel)); + GT_OreDictUnificator.registerOre("plateElectricalSteel", new ItemStack(ModItems.itemPlateElectricalSteel)); + GT_OreDictUnificator.registerOre("plateEnergeticAlloy", new ItemStack(ModItems.itemPlateEnergeticAlloy)); + GT_OreDictUnificator.registerOre("platePulsatingIron", new ItemStack(ModItems.itemPlatePulsatingIron)); + GT_OreDictUnificator.registerOre("plateRedstoneAlloy", new ItemStack(ModItems.itemPlateRedstoneAlloy)); + GT_OreDictUnificator.registerOre("plateSoularium", new ItemStack(ModItems.itemPlateSoularium)); + GT_OreDictUnificator.registerOre("plateVibrantAlloy", new ItemStack(ModItems.itemPlateVibrantAlloy)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java new file mode 100644 index 0000000000..d5ee51f61a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java @@ -0,0 +1,32 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.recipe.RECIPES_Tools; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; + +public class COMPAT_ExtraUtils { + + public static void OreDict(){ + RECIPES_Tools.RECIPE_DivisionSigil = new ItemStack(ItemUtils.getItemFromFQRN("ExtraUtilities:divisionSigil")); + run(); + + } + + private static final void run(){ + ItemUtils.getItemForOreDict("ExtraUtilities:bedrockiumIngot", "ingotBedrockium", "Bedrockium Ingot", 0); + //GT_OreDictUnificator.registerOre("plateBedrockium", new ItemStack(ModItems.itemPlateBedrockium)); + + if (ConfigSwitches.enableAlternativeDivisionSigilRecipe){ + //Division Sigil + RecipeUtils.addShapedRecipe( + "plateNetherStar", "gemIridium", "plateNetherStar", + "plateIridium", RECIPES_Tools.craftingToolHardHammer, "plateIridium", + "plateNetherStar", "gemIridium", "plateNetherStar", + RECIPES_Tools.RECIPE_DivisionSigil); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java new file mode 100644 index 0000000000..9e148f0102 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_HarvestCraft.java @@ -0,0 +1,15 @@ +package gtPlusPlus.core.common.compat; + +import gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler; + +public class COMPAT_HarvestCraft { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + FishTrapHandler.pamsHarvestCraftCompat(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java new file mode 100644 index 0000000000..e1ed2a666a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_IC2.java @@ -0,0 +1,64 @@ +package gtPlusPlus.core.common.compat; + + +import static gtPlusPlus.core.handler.COMPAT_HANDLER.RemoveRecipeQueue; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.ShapedRecipeObject; +import gtPlusPlus.core.util.minecraft.ItemUtils; + + +public class COMPAT_IC2 { + + private static ItemStack itemCropnalyzer = ItemUtils.simpleMetaStack("IC2:itemCropnalyzer", 0, 1); + private static ItemStack itemSolarHelmet = ItemUtils.simpleMetaStack("IC2:itemSolarHelmet", 0, 1); + + public static ShapedRecipeObject Cropnalyzer = new ShapedRecipeObject( + "ore:cableGt02Copper", "ore:cableGt02Copper", null, + "minecraft:redstone", "ore:blockGlass", "minecraft:redstone", + "minecraft:redstone", "ore:circuitBasic", "minecraft:redstone", + itemCropnalyzer); + public static ShapedRecipeObject SolarHelmet = new ShapedRecipeObject( + "ore:plateIron", "ore:plateIron", "ore:plateIron", + "ore:plateIron", "gregtech:gt.metaitem.01:32750", "ore:plateIron", + "ore:craftingWireCopper", "ore:craftingWireCopper", "ore:craftingWireCopper", + itemSolarHelmet); + + + + public static void OreDict(){ + //Get ItemStacks for results + /*itemCropnalyzer = UtilsItems.getItemStack("IC2:itemCropnalyzer", 1); + itemSolarHelmet = UtilsItems.getItemStack("IC2:itemSolarHelmet", 1); */ + run(); + } + + private static final void run(){ + + if (ConfigSwitches.disableIC2Recipes){ + + + + if (LoadedMods.Gregtech){ + //Fuck these right off. + RemoveRecipeQueue.add("IC2:itemCable"); + RemoveRecipeQueue.add("IC2:itemCable:1"); + RemoveRecipeQueue.add("IC2:itemCable:2"); + RemoveRecipeQueue.add("IC2:itemCable:3"); + RemoveRecipeQueue.add("IC2:itemCable:5"); + RemoveRecipeQueue.add("IC2:itemCable:6"); + RemoveRecipeQueue.add("IC2:itemCable:10"); + RemoveRecipeQueue.add("IC2:itemCable:13"); + //RemoveRecipeQueue.add(itemCropnalyzer); + //RemoveRecipeQueue.add(itemSolarHelmet); + + //AddRecipeQueue.add(Cropnalyzer); + //AddRecipeQueue.add(SolarHelmet); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java new file mode 100644 index 0000000000..b7da7c436e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_MorePlanets.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.common.compat; + +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class COMPAT_MorePlanets { + + + public static void OreDict(){ + run(); + } + + private final static void run(){ + //Metals + ItemUtils.getItemForOreDict("MorePlanet:kapteyn-b_item", "ingotFrozenIron", "Frozen Iron Ingot", 0); + ItemUtils.getItemForOreDict("MorePlanet:kapteyn-b_item", "ingotAnyIron", "Frozen Iron Ingot", 0); + ItemUtils.getItemForOreDict("MorePlanet:polongnius_item", "ingotPalladium", "Palladium Ingot", 5); + ItemUtils.getItemForOreDict("MorePlanet:fronos_item", "ingotIridium", "Iridium Ingot", 3); + ItemUtils.getItemForOreDict("MorePlanet:nibiru_item", "ingotNorium", "Norium Ingot", 1); + ItemUtils.getItemForOreDict("MorePlanet:venus_item", "ingotLead", "Lead Ingot", 0); + ItemUtils.getItemForOreDict("MorePlanet:diona_item", "ingotQuontonium", "Quontonium Ingot", 0); + ItemUtils.getItemForOreDict("MorePlanet:diona_item", "ingotFronisium", "Fronisium Ingot", 1); + ItemUtils.getItemForOreDict("MorePlanet:sirius-b_item", "ingotSulfur", "Sulfur Ingot", 3); + ItemUtils.getItemForOreDict("MorePlanet:koentus_item", "ingotKoentusMeteoricIron", "Koentus Meteoric Iron Ingot", 4); + ItemUtils.getItemForOreDict("MorePlanet:mercury_item", "ingotMetallic", "Metallic Ingot", 2); + ItemUtils.getItemForOreDict("MorePlanet:polongnius_item", "ingotPolongiusMeteoricIron", "Polongius Meteoric Iron Ingot", 4); + ItemUtils.getItemForOreDict("MorePlanet:mercury_item", "ingotMeteoricSteel", "Meteoric Steel Ingot", 3); + ItemUtils.getItemForOreDict("MorePlanet:sirius-b_item", "dustSulfur", "Sulfur Dust", 2); + + //Gems + ItemUtils.getItemForOreDict("MorePlanet:fronos_item", "gemBlackDiamond", "Black Diamond Gem", 2); + ItemUtils.getItemForOreDict("MorePlanet:koentus_item", "gemWhiteCrystal", "White Crystal", 0); + ItemUtils.getItemForOreDict("MorePlanet:nibiru_item", "gemRedCrystal", "Red Crystal", 0); + ItemUtils.getItemForOreDict("MorePlanet:pluto_item", "gemXeonius", "Xeonius Gem", 0); + ItemUtils.getItemForOreDict("MorePlanet:kapteyn-b_item", "gemUranium", "Uranium Gem", 1); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java new file mode 100644 index 0000000000..6381a6705e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_OpenBlocks.java @@ -0,0 +1,29 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class COMPAT_OpenBlocks { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + + Item aGraveItem = ItemUtils.getItemFromFQRN("OpenBlocks:grave"); + if (aGraveItem == null) { + return; + } + Block aGraveBlock = Block.getBlockFromItem(aGraveItem); + if (aGraveBlock == null) { + return; + } + + Logger.INFO("[Hungry Node Blacklist] Setting the Hardness of the OpenBlocks Grave to 6."); + aGraveBlock.setHardness(6f); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java new file mode 100644 index 0000000000..12b3a94083 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PlayerAPI.java @@ -0,0 +1,52 @@ +package gtPlusPlus.core.common.compat; + +import api.player.client.ClientPlayerAPI; +import gtPlusPlus.core.common.BasePlayer; +import gtPlusPlus.core.handler.events.SneakManager; +import gtPlusPlus.core.util.Utils; + +public class COMPAT_PlayerAPI { + + public static class commonProxy{ + public static void initPre(){ + + } + + public static void Init(){ + + } + + public static void initPost(){ + + } + } + + public static class clientProxy{ + public static void initPre(){ + //Utils.registerEvent(SneakManager.instance); + } + + public static void Init(){ + ClientPlayerAPI.register("SneakManager", BasePlayer.class); + } + + public static void initPost(){ + + } + } + + public static class serverProxy{ + public static void initPre(){ + + } + + public static void Init(){ + + } + + public static void initPost(){ + + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java new file mode 100644 index 0000000000..0f80dc8be4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_PneumaticCraft.java @@ -0,0 +1,19 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.item.ModItems; + +public class COMPAT_PneumaticCraft { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + GT_OreDictUnificator.registerOre("plateCompressedIron", new ItemStack(ModItems.itemPlateCompressedIron)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java new file mode 100644 index 0000000000..37c87ad99d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_RFTools.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.item.ModItems; + +public class COMPAT_RFTools { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + GT_OreDictUnificator.registerOre("plateDimensionShard", new ItemStack(ModItems.itemPlateDimensionShard)); + + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java new file mode 100644 index 0000000000..f6c8e86808 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Railcraft.java @@ -0,0 +1,14 @@ +package gtPlusPlus.core.common.compat; + +public class COMPAT_Railcraft { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + + + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java new file mode 100644 index 0000000000..5f9976acb0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_SimplyJetpacks.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.common.compat; + +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.item.ModItems; + +public class COMPAT_SimplyJetpacks { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + GT_OreDictUnificator.registerOre("plateEnrichedSoularium", new ItemStack(ModItems.itemPlateEnrichedSoularium)); + + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java new file mode 100644 index 0000000000..b78c10c8ce --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java @@ -0,0 +1,45 @@ +package gtPlusPlus.core.common.compat; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class COMPAT_Thaumcraft { + + public static void OreDict(){ + + if (ConfigSwitches.enableThaumcraftShardUnification){ + run(); + } + } + + private static final void run(){ + + for(int i=0; i<=6; i++){ + //Utils.LOG_INFO(""+i); + ItemUtils.getItemForOreDict("Thaumcraft:ItemShard", "shardAny", "TC Shard "+i, i); + GT_OreDictUnificator.registerOre("shardAny", ItemUtils.getItemStackFromFQRN("Thaumcraft:ItemShard:"+i, 1)); + ItemUtils.getItemForOreDict("Thaumcraft:ItemShard", "gemInfusedAnything", "TC Shard "+i, i); + GT_OreDictUnificator.registerOre("gemInfusedAnything", ItemUtils.getItemStackFromFQRN("Thaumcraft:ItemShard:"+i, 1)); + //System.out.println("TC Shard registration count is: "+i); + } + + if (LoadedMods.ForbiddenMagic){ + for(int i=0; i<=6; i++){ + //Utils.LOG_INFO(""+i); + ItemUtils.getItemForOreDict("ForbiddenMagic:NetherShard", "shardAny", "FM Shard "+i, i); + GT_OreDictUnificator.registerOre("shardAny", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:NetherShard:"+i, 1)); + ItemUtils.getItemForOreDict("ForbiddenMagic:NetherShard", "gemInfusedAnything", "FM Shard "+i, i); + GT_OreDictUnificator.registerOre("gemInfusedAnything", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:NetherShard:"+i, 1)); + //System.out.println("TC Shard registration count is: "+i); + } + ItemUtils.getItemForOreDict("ForbiddenMagic:GluttonyShard", "shardAny", "FM Gluttony Shard", 0); + GT_OreDictUnificator.registerOre("shardAny", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:GluttonyShard", 1)); + ItemUtils.getItemForOreDict("ForbiddenMagic:GluttonyShard", "gemInfusedAnything", "FM Gluttony Shard", 0); + GT_OreDictUnificator.registerOre("gemInfusedAnything", ItemUtils.getItemStackFromFQRN("ForbiddenMagic:GluttonyShard", 1)); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java new file mode 100644 index 0000000000..cde6e3ae98 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/common/compat/COMPAT_Witchery.java @@ -0,0 +1,26 @@ +package gtPlusPlus.core.common.compat; + +import static gtPlusPlus.core.lib.LoadedMods.Witchery; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; + +public class COMPAT_Witchery { + + public static void OreDict(){ + run(); + } + + private static final void run(){ + //Koboldite + ItemStack aKobolditeDust = ItemUtils.getItemStackWithMeta(Witchery, "witchery:ingredient", "Koboldite Dust", 148, 1); + ItemStack aKobolditeNugget = ItemUtils.getItemStackWithMeta(Witchery, "witchery:ingredient", "Koboldite Nugget", 149, 1); + ItemStack aKobolditeIngot = ItemUtils.getItemStackWithMeta(Witchery, "witchery:ingredient", "Koboldite Ingot", 150, 1); + if (aKobolditeDust != null) GT_OreDictUnificator.registerOre("dust"+"Koboldite", aKobolditeDust); + if (aKobolditeNugget != null) GT_OreDictUnificator.registerOre("nugget"+"Koboldite", aKobolditeNugget); + if (aKobolditeIngot != null) GT_OreDictUnificator.registerOre("ingot"+"Koboldite", aKobolditeIngot); + } + +} diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java new file mode 100644 index 0000000000..61610a03e9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java @@ -0,0 +1,245 @@ +package gtPlusPlus.core.config; + +import static gtPlusPlus.core.item.general.RF2EU_Battery.rfPerEU; +import static gtPlusPlus.core.lib.CORE.*; +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.*; +import static gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames; + +import java.io.File; + +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +import net.minecraftforge.common.config.Configuration; + +public class ConfigHandler { + + public static void handleConfigFile(final FMLPreInitializationEvent event) { + final Configuration config = new Configuration( + new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); + config.load(); + + // Debug + /* DEBUG = config.getBoolean("debugMode", "debug", false, + "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)");*/ + disableEnderIOIntegration = config.getBoolean("disableEnderIO", "debug", false, + "Disables EnderIO Integration."); + disableEnderIOIngotTooltips = config.getBoolean("disableEnderIOIngotTooltips", "debug", false, + "Disables EnderIO Ingot Tooltips. These apparently may cause issues for a very small number of users."); + MACHINE_INFO = config.getBoolean("enableMachineInfoLogging", "debug", false, + "Makes many machines display lots of debug logging."); + showHiddenNEIItems = config.getBoolean("showHiddenNEIItems", "debug", false, + "Makes all items hidden from NEI display."); + dumpItemAndBlockData = config.getBoolean("dumpItemAndBlockData", "debug", false, + "Dumps all GT++ and Toxic Everglade Data to en_US.lang in the config folder. This config option can be used by foreign players to generate blank .lang files, which they can populate with their language of choice."); + + + // Machines + enableThaumcraftShardUnification = config.getBoolean("enableThaumcraftShardUnification", "machines", false, + "Allows the use of TC shards across many recipes by oreDicting them into a common group."); + enableAlternativeBatteryAlloy = config.getBoolean("enableAlternativeBatteryAlloy", "machines", false, + "Adds a non-Antimony using Battery Alloy. Not Balanced at all.."); + disableIC2Recipes = config.getBoolean("disableIC2Recipes", "machines", false, + "Alkaluscraft Related - Removes IC2 Cables Except glass fibre. Few other Misc Tweaks."); + enableAlternativeDivisionSigilRecipe = config.getBoolean("enableAlternativeDivisionSigilRecipe", "machines", + false, "Utilizes Neutronium instead."); + boilerSteamPerSecond = config.getInt("boilerSteamPerSecond", "machines", 750, 0, 10000, "Sets the steam per second value in LV,MV,HV boilers (respectively 1x,2x,3x this number for the tiers)"); + + //requireControlCores + boolean temp = config.getBoolean("requireControlCores", "machines", true, "Multiblocks Require Control Cores"); + + + + //Circuits + enableCustomCircuits = config.getBoolean("enableCustomCircuits", "gregtech", false, + "Adds custom circuits to expand past the Master Tier. Only really recommended to enable if enableOldGTcircuits is enabled."); + enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, + "Restores circuits and their recipes from Pre-5.09.28 times."); + + // Tools + enableSkookumChoochers = config.getBoolean("enableSkookumChoochers", "gregtech", true, + "Adds Custom GT Tools, called Skookum Choochers, functioning as a hard hammer and a wrench."); + enableMultiSizeTools = config.getBoolean("enableMultiSizeTools", "gregtech", true, + "Adds Custom GT Shovels and Pickaxes which mine in a 3x3 style. One of each whill be generated for each Gregtech Material which has Dense Plates and Long Rods available."); + + // GT-Fixes + enableNitroFix = config.getBoolean("enableNitroFix", "gregtech", false, + "Restores the old Nitro-Diesel recipes."); + enableSulfuricAcidFix = config.getBoolean("enableSulfuricAcidFix", "gregtech", false, + "Adds GT6 recipes for Sulfuric Acid. Should remove all pre-existing recipes."); + enableAnimatedTurbines = config.getBoolean("enableAnimatedTurbines", "gregtech", true, + "Gives GT Gas/Steam turbines animated textures while running."); + turbineCutoffBase = config.getInt("turbineCutoffBase", "gregtech", 75000, 0, Integer.MAX_VALUE, "Rotors below this durability will be removed, prevents NEI clutter. Minimum Durability is N * x, where N is the new value set and x is the turbine size, where 1 is Tiny and 4 is Huge. Set to 0 to disable."); + + enableHarderRecipesForHighTierCasings = config.getBoolean("enableHarderRecipesForHighTierCasings", "gregtech", false, + "Makes LuV+ Casings and Hulls more difficult to craft."); + + // Pipes & Cables + enableCustom_Pipes = config.getBoolean("enableCustom_Pipes", "gregtech", true, + "Adds Custom GT Fluid Pipes."); + enableCustom_Cables = config.getBoolean("enableCustom_Cables", "gregtech", true, + "Adds Custom GT Cables."); + + // Block Drops + chanceToDropDrainedShard = config.getInt("chanceToDropDrainedShard", "blockdrops", 196, 0, + 10000, "Drained shards have a 1 in X chance to drop."); + chanceToDropFluoriteOre = config.getInt("chanceToDropFluoriteOre", "blockdrops", 32, 0, + 10000, "Fluorite Ore has a 1 in X chance to drop from Limestone and a 1 in X*20 from Sandstone.."); + + // Single machines + enableMachine_SolarGenerators = config.getBoolean("enableSolarGenerators", "gregtech", + false, "These may be overpowered, Consult a local electrician."); + enableMachine_ComponentAssemblers = config.getBoolean("enableComponentAssemblers", "gregtech", + true, "These construct machine components."); + enableMachine_Safes = config.getBoolean("enableMachineSafes", "gregtech", true, + "These protect your goodies/rare stuff."); + enableMachine_Dehydrators = config.getBoolean("enableMachineDehydrators", "gregtech", true, + "These dehydrate stuff."); + enableMachine_SteamConverter = config.getBoolean("enableMachineSteamConverter", "gregtech", + true, "Converts IC2 steam -> Railcraft steam."); + enableMachine_FluidTanks = config.getBoolean("enableMachineFluidTanks", "gregtech", true, + "Portable fluid tanks."); + enableMachine_RocketEngines = config.getBoolean("enableMachineRocketEngines", "gregtech", + true, "Diesel egines with different internals, they consume less fuel overall."); + enableMachine_GeothermalEngines = config.getBoolean("enableMachineGeothermalEngines", + "gregtech", true, "These may be overpowered, Consult a local geologist."); + enableMachine_WorldAccelerators = config.getBoolean("enableMachineWorldAccelerators", + "gregtech", true, "These allow boosting Block/TileEntity Tick times [OP]."); + enableMachine_Tesseracts = config.getBoolean("enableMachineTesseracts", + "gregtech", true, "Tesseracts for wireless item/fluid movement."); + enableMachine_SimpleWasher = config.getBoolean("enableMachineSimpleWasher", + "gregtech", true, "Very basic automated cauldron for dust washing."); + enableMachine_Pollution = config.getBoolean("enableMachinePollution", + "gregtech", true, "Pollution Detector & Scrubbers."); + enableMachine_RF_Convetor = config.getBoolean("enableMachineRFConvetor", "gregtech", + true, "Converts RF to GTEU. Requires COFH-Core to be installed."); + + + // Multi machines + enableMultiblock_AlloyBlastSmelter = config.getBoolean("enableMultiblockAlloyBlastSmelter", + "gregtech", true, + "Required to smelt most high tier materials from GT++. Also smelts everything else to molten metal."); + enableMultiblock_IndustrialCentrifuge = config + .getBoolean("enableMultiblockIndustrialCentrifuge", "gregtech", true, "Spin, Spin, Spiiiin."); + enableMultiblock_IndustrialCokeOven = config.getBoolean( + "enableMultiblockIndustrialCokeOven", "gregtech", true, + "Pyro Oven Alternative, older, more realistic, better."); + enableMultiblock_IndustrialElectrolyzer = config.getBoolean( + "enableMultiblockIndustrialElectrolyzer", "gregtech", true, + "Electrolyzes things with extra bling factor."); + enableMultiblock_IndustrialMacerationStack = config.getBoolean( + "enableMultiblockIndustrialMacerationStack", "gregtech", true, + "A hyper efficient maceration tower, nets more bonus outputs."); + enableMultiblock_IndustrialPlatePress = config.getBoolean( + "enableMultiblockIndustrialPlatePress", "gregtech", true, "Industrial bendering machine thingo."); + enableMultiblock_IndustrialWireMill = config.getBoolean( + "enableMultiblockIndustrialWireMill", "gregtech", true, "Produces fine wire and exotic cables."); + enableMultiblock_IronBlastFurnace = config.getBoolean("enableMultiblockIronBlastFurnace", + "gregtech", true, "Skip the Bronze age, very slowly."); + enableMultiblock_MatterFabricator = config.getBoolean("enableMultiblockMatterFabricator", + "gregtech", true, "?FAB?RIC?ATE MA?TT?ER."); + enableMultiblock_MultiTank = config.getBoolean("enableMultiblockMultiTank", "gregtech", + true, "Tall tanks, each layer adds extra fluid storage."); + enableMultiblock_PowerSubstation = config.getBoolean("enableMultiblockPowerSubstation", + "gregtech", true, "For managing large power grids."); + enableMultiblock_LiquidFluorideThoriumReactor = config.getBoolean( + "enableMultiblockLiquidFluorideThoriumReactor", "gregtech", true, "For supplying large power grids."); + enableMultiblock_NuclearFuelRefinery = config.getBoolean( + "enableMultiblock_NuclearFuelRefinery", "gregtech", true, + "Refines molten chemicals into nuclear fuels."); + enableMultiblock_IndustrialSifter = config.getBoolean("enableMultiblock_IndustrialSifter", + "gregtech", true, "Large scale sifting."); + enableMultiblock_LargeAutoCrafter = config.getBoolean("enableMultiblock_LargeAutoCrafter", + "gregtech", true, "Can Assemble, Disassemble and Craft Project data from Data Sticks."); + enableMultiblock_IndustrialThermalCentrifuge = config.getBoolean("enableMultiblock_IndustrialThermalCentrifuge", + "gregtech", true, "Your warm spin for the ore thing."); + enableMultiblock_IndustrialWashPlant = config.getBoolean("enableMultiblock_IndustrialWashPlant", + "gregtech", true, "Used to wash the dirt, riiiiight offff.."); + enableMultiblock_ThermalBoiler = config.getBoolean("enableMachineThermalBoiler", + "gregtech", true, "Thermal Boiler from GT4. Can Filter Lava for resources."); + enableMultiblock_IndustrialCuttingMachine = config.getBoolean("enableMultiblock_IndustrialCuttingMachine", + "gregtech", true, "Very fast and efficient Cutting Machine."); + enableMultiblock_IndustrialFishingPort = config.getBoolean("enableMultiblock_IndustrialFishingPort", + "gregtech", true, "Fish the seas, except on land."); + enableMultiblock_IndustrialExtrudingMachine = config.getBoolean("enableMultiblock_IndustrialExtrudingMachine", + "gregtech", true, "Very fast and efficient Extruding Machine."); + enableMultiblock_IndustrialMultiMachine = config.getBoolean("enableMultiblock_IndustrialMultiMachine", + "gregtech", true, "Can run recipes for 9 different types of machines."); + enableMultiblock_Cyclotron = config.getBoolean("enableMultiblock_Cyclotron", + "gregtech", true, "COMET - Scientific Cyclotron."); + + // Options + rfPerEU = config.getInt("rfUsedPerEUForUniversalBatteries", "configurables", 4, 1, 1000, + "How much RF is a single unit of EU worth? (Most mods use 4:1 ratio)"); + + // Features + enableCustomCapes = config.getBoolean("enableSupporterCape", "features", true, + "Enables Custom GT++ Cape."); + disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false, + "Disables Zombie Reinforcement on hard difficutly."); + enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); + + //Biomes + EVERGLADES_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension."); + EVERGLADESBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension."); + + //Blacklisted Accelerator TileEntities + BlacklistedTileEntiyClassNames = new String[] { "com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry" }; + BlacklistedTileEntiyClassNames = config.getStringList( + "BlacklistedTileEntiyClassNames", "gregtech", + BlacklistedTileEntiyClassNames, + "The Canonical Class-Names of TileEntities that should be ignored by the WorldAccelerator"); + + //Pollution + pollutionPerSecondMultiPackager = config.get("pollution", "pollutionPerSecondMultiPackager", pollutionPerSecondMultiPackager,"pollution rate in gibbl/s for the Amazon warehousing depot").getInt(pollutionPerSecondMultiPackager); + pollutionPerSecondMultiIndustrialAlloySmelter = config.get("pollution", "pollutionPerSecondMultiIndustrialAlloySmelter", pollutionPerSecondMultiIndustrialAlloySmelter,"pollution rate in gibbl/s for the Alloy blast smelter").getInt(pollutionPerSecondMultiIndustrialAlloySmelter); + pollutionPerSecondMultiIndustrialArcFurnace = config.get("pollution", "pollutionPerSecondMultiIndustrialArcFurnace", pollutionPerSecondMultiIndustrialArcFurnace,"pollution rate in gibbl/s for the High current arc furnace").getInt(pollutionPerSecondMultiIndustrialArcFurnace); + pollutionPerSecondMultiIndustrialCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialCentrifuge", pollutionPerSecondMultiIndustrialCentrifuge,"pollution rate in gibbl/s for the Industrial centrifuge").getInt(pollutionPerSecondMultiIndustrialCentrifuge); + pollutionPerSecondMultiIndustrialCokeOven = config.get("pollution", "pollutionPerSecondMultiIndustrialCokeOven", pollutionPerSecondMultiIndustrialCokeOven,"pollution rate in gibbl/s for the Industrial coke oven").getInt(pollutionPerSecondMultiIndustrialCokeOven); + pollutionPerSecondMultiIndustrialCuttingMachine = config.get("pollution", "pollutionPerSecondMultiIndustrialCuttingMachine", pollutionPerSecondMultiIndustrialCuttingMachine,"pollution rate in gibbl/s for the Cutting factory").getInt(pollutionPerSecondMultiIndustrialCuttingMachine); + pollutionPerSecondMultiIndustrialDehydrator = config.get("pollution", "pollutionPerSecondMultiIndustrialDehydrator", pollutionPerSecondMultiIndustrialDehydrator,"pollution rate in gibbl/s for the Utupu-Tanuri").getInt(pollutionPerSecondMultiIndustrialDehydrator); + pollutionPerSecondMultiIndustrialElectrolyzer = config.get("pollution", "pollutionPerSecondMultiIndustrialElectrolyzer", pollutionPerSecondMultiIndustrialElectrolyzer,"pollution rate in gibbl/s for the Industrial electrolyzer").getInt(pollutionPerSecondMultiIndustrialElectrolyzer); + pollutionPerSecondMultiIndustrialExtruder = config.get("pollution", "pollutionPerSecondMultiIndustrialExtruder", pollutionPerSecondMultiIndustrialExtruder,"pollution rate in gibbl/s for the Industrial extrusion machine").getInt(pollutionPerSecondMultiIndustrialExtruder); + pollutionPerSecondMultiIndustrialMacerator = config.get("pollution", "pollutionPerSecondMultiIndustrialMacerator", pollutionPerSecondMultiIndustrialMacerator,"pollution rate in gibbl/s for the Maceration stack").getInt(pollutionPerSecondMultiIndustrialMacerator); + pollutionPerSecondMultiIndustrialMixer = config.get("pollution", "pollutionPerSecondMultiIndustrialMixer", pollutionPerSecondMultiIndustrialMixer,"pollution rate in gibbl/s for the Industrial mixing machine").getInt(pollutionPerSecondMultiIndustrialMixer); + pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal", pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal,"pollution rate in gibbl/s for the Large processing factory in metal mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal); + pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid", pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid,"pollution rate in gibbl/s for the Large processing factory in fluid mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid); + pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = config.get("pollution", "pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc", pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc,"pollution rate in gibbl/s for the Large processing factory in misc mode").getInt(pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc); + pollutionPerSecondMultiIndustrialPlatePress_ModeForming = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeForming", pollutionPerSecondMultiIndustrialPlatePress_ModeForming,"pollution rate in gibbl/s for the Industrial material press in forming mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeForming); + pollutionPerSecondMultiIndustrialPlatePress_ModeBending = config.get("pollution", "pollutionPerSecondMultiIndustrialPlatePress_ModeBending", pollutionPerSecondMultiIndustrialPlatePress_ModeBending,"pollution rate in gibbl/s for the Industrial material press in bending mode").getInt(pollutionPerSecondMultiIndustrialPlatePress_ModeBending); + pollutionPerSecondMultiIndustrialSifter = config.get("pollution", "pollutionPerSecondMultiIndustrialSifter", pollutionPerSecondMultiIndustrialSifter,"pollution rate in gibbl/s for the Large Sifter").getInt(pollutionPerSecondMultiIndustrialSifter); + pollutionPerSecondMultiIndustrialThermalCentrifuge = config.get("pollution", "pollutionPerSecondMultiIndustrialThermalCentrifuge", pollutionPerSecondMultiIndustrialThermalCentrifuge,"pollution rate in gibbl/s for the Large thermal refinery").getInt(pollutionPerSecondMultiIndustrialThermalCentrifuge); + pollutionPerSecondMultiIndustrialVacuumFreezer = config.get("pollution", "pollutionPerSecondMultiIndustrialVacuumFreezer", pollutionPerSecondMultiIndustrialVacuumFreezer,"pollution rate in gibbl/s for the Cryogenic freezer").getInt(pollutionPerSecondMultiIndustrialVacuumFreezer); + pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath", pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath,"pollution rate in gibbl/s for the Ore washing plant in chemical bath mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath); + pollutionPerSecondMultiIndustrialWashPlant_ModeWasher = config.get("pollution", "pollutionPerSecondMultiIndustrialWashPlant_ModeWasher", pollutionPerSecondMultiIndustrialWashPlant_ModeWasher,"pollution rate in gibbl/s for the Ore washing plant in ore washer mode").getInt(pollutionPerSecondMultiIndustrialWashPlant_ModeWasher); + pollutionPerSecondMultiIndustrialWireMill = config.get("pollution", "pollutionPerSecondMultiIndustrialWireMill", pollutionPerSecondMultiIndustrialWireMill,"pollution rate in gibbl/s for the Wire factory").getInt(pollutionPerSecondMultiIndustrialWireMill); + pollutionPerSecondMultiIsaMill = config.get("pollution", "pollutionPerSecondMultiIsaMill", pollutionPerSecondMultiIsaMill,"pollution rate in gibbl/s for the IsaMill grinding machine").getInt(pollutionPerSecondMultiIsaMill); + pollutionPerSecondMultiAdvDistillationTower_ModeDistillery = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDistillery", pollutionPerSecondMultiAdvDistillationTower_ModeDistillery,"pollution rate in gibbl/s for the Dangote distillus in distillery mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDistillery); + pollutionPerSecondMultiAdvDistillationTower_ModeDT = config.get("pollution", "pollutionPerSecondMultiAdvDistillationTower_ModeDT", pollutionPerSecondMultiAdvDistillationTower_ModeDT,"pollution rate in gibbl/s for the Dangote distillus in distillation tower mode").getInt(pollutionPerSecondMultiAdvDistillationTower_ModeDT); + pollutionPerSecondMultiAdvEBF = config.get("pollution", "pollutionPerSecondMultiAdvEBF", pollutionPerSecondMultiAdvEBF,"pollution rate in gibbl/s for the Volcanus").getInt(pollutionPerSecondMultiAdvEBF); + pollutionPerSecondMultiAdvImplosion = config.get("pollution", "pollutionPerSecondMultiAdvImplosion", pollutionPerSecondMultiAdvImplosion,"pollution rate in gibbl/s for the Density^2").getInt(pollutionPerSecondMultiAdvImplosion); + pollutionPerSecondMultiABS = config.get("pollution", "pollutionPerSecondMultiABS", pollutionPerSecondMultiABS,"pollution rate in gibbl/s for the Alloy blast furnace").getInt(pollutionPerSecondMultiABS); + pollutionPerSecondMultiCyclotron = config.get("pollution", "pollutionPerSecondMultiCyclotron", pollutionPerSecondMultiCyclotron,"pollution rate in gibbl/s for the Cyclotron").getInt(pollutionPerSecondMultiCyclotron); + pollutionPerSecondMultiIndustrialFishingPond = config.get("pollution", "pollutionPerSecondMultiIndustrialFishingPond", pollutionPerSecondMultiIndustrialFishingPond,"pollution rate in gibbl/s for the Zuhai - fishing port").getInt(pollutionPerSecondMultiIndustrialFishingPond); + //pollutionPerSecondMultiLargeRocketEngine; + pollutionPerSecondMultiLargeSemiFluidGenerator = config.get("pollution", "pollutionPerSecondMultiLargeSemiFluidGenerator", pollutionPerSecondMultiLargeSemiFluidGenerator,"pollution rate in gibbl/s for the Large semifluid burner").getInt(pollutionPerSecondMultiLargeSemiFluidGenerator); + pollutionPerSecondMultiMassFabricator = config.get("pollution", "pollutionPerSecondMultiMassFabricator", pollutionPerSecondMultiMassFabricator,"pollution rate in gibbl/s for the Matter fabrication CPU").getInt(pollutionPerSecondMultiMassFabricator); + pollutionPerSecondMultiRefinery = config.get("pollution", "pollutionPerSecondMultiRefinery", pollutionPerSecondMultiRefinery,"pollution rate in gibbl/s for the Reactor fuel processing plant").getInt(pollutionPerSecondMultiRefinery); + //pollutionPerSecondMultiGeneratorArray; + pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm,"pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm); + pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell,"pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell); + pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter,"pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter); + pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler,"pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler); + pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond,"pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond); + basePollutionPerSecondSemiFluidGenerator = config.get("pollution", "basePollutionPerSecondSemiFluidGenerator", basePollutionPerSecondSemiFluidGenerator, "base pollution rate in gibbl/s for the single block semi fluid generators").getInt(basePollutionPerSecondSemiFluidGenerator); + pollutionReleasedByTierSemiFluidGenerator = config.get("pollution", "pollutionReleasedByTierSemiFluidGenerator", pollutionReleasedByTierSemiFluidGenerator, "coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)").getDoubleList(); + basePollutionPerSecondBoiler = config.get("pollution", "basePollutionPerSecondBoiler", basePollutionPerSecondBoiler,"base pollution rate in gibbl/s for the single block boilers").getInt(basePollutionPerSecondBoiler); + pollutionReleasedByTierBoiler = config.get("pollution", "pollutionReleasedByTierBoiler", pollutionReleasedByTierBoiler, "coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)").getDoubleList(); + baseMinPollutionPerSecondRocketFuelGenerator = config.get("pollution", "baseMinPollutionPerSecondRocketFuelGenerator", baseMinPollutionPerSecondRocketFuelGenerator, "minimum base pollution rate in gibbl/s for the single block rocket engines").getInt(baseMinPollutionPerSecondRocketFuelGenerator); + baseMaxPollutionPerSecondRocketFuelGenerator = config.get("pollution", "baseMaxPollutionPerSecondRocketFuelGenerator", baseMaxPollutionPerSecondRocketFuelGenerator, "maximum base pollution rate in gibbl/s for the single block rocket engines").getInt(baseMaxPollutionPerSecondRocketFuelGenerator); + pollutionReleasedByTierRocketFuelGenerator = config.get("pollution", "pollutionReleasedByTierRocketFuelGenerator", pollutionReleasedByTierRocketFuelGenerator, "coefficient applied to the base rate of the single block rocket engines based on its tier (first is tier 0 aka ULV)").getDoubleList(); + basePollutionPerSecondGeothermalGenerator = config.get("pollution", "basePollutionPerSecondGeothermalGenerator", basePollutionPerSecondGeothermalGenerator,"base pollution rate in gibbl/s for the geothermal engines").getInt(basePollutionPerSecondGeothermalGenerator); + pollutionReleasedByTierGeothermalGenerator = config.get("pollution", "pollutionReleasedByTierGeothermalGenerator", pollutionReleasedByTierGeothermalGenerator, "coefficient applied to the base rate of the single block geothermal engines based on its tier (first is tier 0 aka ULV)").getDoubleList(); + config.save(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/container/Container_BackpackBase.java b/src/main/java/gtPlusPlus/core/container/Container_BackpackBase.java new file mode 100644 index 0000000000..ad76bebe81 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_BackpackBase.java @@ -0,0 +1,208 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.inventories.BaseInventoryBackpack; +import gtPlusPlus.core.slots.SlotItemBackpackInv; + +public class Container_BackpackBase extends Container +{ + /** The Item Inventory for this Container, only needed if you want to reference isUseableByPlayer */ + public final BaseInventoryBackpack inventory; + + /** Using these will make transferStackInSlot easier to understand and implement + * INV_START is the index of the first slot in the Player's Inventory, so our + * BaseInventoryBackpack's number of slots (e.g. 5 slots is array indices 0-4, so start at 5) + * Notice how we don't have to remember how many slots we made? We can just use + * BaseInventoryBackpack.INV_SIZE and if we ever change it, the Container updates automatically. */ + private static final int INV_START = BaseInventoryBackpack.INV_SIZE, INV_END = INV_START+26, + HOTBAR_START = INV_END+1, HOTBAR_END = HOTBAR_START+8; + + // If you're planning to add armor slots, put those first like this: + // ARMOR_START = BaseInventoryBackpack.INV_SIZE, ARMOR_END = ARMOR_START+3, + // INV_START = ARMOR_END+1, and then carry on like above. + + public Container_BackpackBase(final EntityPlayer par1Player, final InventoryPlayer inventoryPlayer, final BaseInventoryBackpack inventoryItem) + { + this.inventory = inventoryItem; + + int i; + + // ITEM INVENTORY - you'll need to adjust the slot locations to match your texture file + // I have them set vertically in columns of 4 to the right of the player model + for (i = 0; i < BaseInventoryBackpack.INV_SIZE; ++i) + { + // You can make a custom Slot if you need different behavior, + // such as only certain item types can be put into this slot + // We made a custom slot to prevent our inventory-storing item + // from being stored within itself, but if you want to allow that and + // you followed my advice at the end of the above step, then you + // could get away with using the vanilla Slot class + this.addSlotToContainer(new SlotItemBackpackInv(this.inventory, i, 80 + (18 * (i/4)), 8 + (18*(i%4)))); + } + + // If you want, you can add ARMOR SLOTS here as well, but you need to + // make a public version of SlotArmor. I won't be doing that in this tutorial. + /* + for (i = 0; i < 4; ++i) + { + // These are the standard positions for survival inventory layout + this.addSlotToContainer(new SlotArmor(this.player, inventoryPlayer, inventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18, i)); + } + */ + + // PLAYER INVENTORY - uses default locations for standard inventory texture file + for (i = 0; i < 3; ++i) + { + for (int j = 0; j < 9; ++j) + { + this.addSlotToContainer(new Slot(inventoryPlayer, j + (i * 9) + 9, 8 + (j * 18), 84 + (i * 18))); + } + } + + // PLAYER ACTION BAR - uses default locations for standard action bar texture file + for (i = 0; i < 9; ++i) + { + this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + (i * 18), 142)); + } + } + + @Override + public boolean canInteractWith(final EntityPlayer entityplayer) + { + // be sure to return the inventory's isUseableByPlayer method + // if you defined special behavior there: + return this.inventory.isUseableByPlayer(entityplayer); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int index) + { + ItemStack itemstack = null; + final Slot slot = (Slot) this.inventorySlots.get(index); + + if ((slot != null) && slot.getHasStack()) + { + final ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + // If item is in our custom Inventory or armor slot + if (index < INV_START) + { + // try to place in player inventory / action bar + if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END+1, true)) + { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + // Item is in inventory / hotbar, try to place in custom inventory or armor slots + else + { + /* + If your inventory only stores certain instances of Items, + you can implement shift-clicking to your inventory like this: + + // Check that the item is the right type + if (itemstack1.getItem() instanceof ItemCustom) + { + // Try to merge into your custom inventory slots + // We use 'BaseInventoryBackpack.INV_SIZE' instead of INV_START just in case + // you also add armor or other custom slots + if (!this.mergeItemStack(itemstack1, 0, BaseInventoryBackpack.INV_SIZE, false)) + { + return null; + } + } + // If you added armor slots, check them here as well: + // Item being shift-clicked is armor - try to put in armor slot + if (itemstack1.getItem() instanceof ItemArmor) + { + int type = ((ItemArmor) itemstack1.getItem()).armorType; + if (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START + type + 1, false)) + { + return null; + } + } + Otherwise, you have basically 2 choices: + 1. shift-clicking between player inventory and custom inventory + 2. shift-clicking between action bar and inventory + + Be sure to choose only ONE of the following implementations!!! + */ + /** + * Implementation number 1: Shift-click into your custom inventory + */ + if (index >= INV_START) + { + // place in custom inventory + if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) + { + return null; + } + } + + /** + * Implementation number 2: Shift-click items between action bar and inventory + */ + // item is in player's inventory, but not in action bar + if ((index >= INV_START) && (index < HOTBAR_START)) + { + // place in action bar + if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END+1, false)) + { + return null; + } + } + // item in action bar - place in player inventory + else if ((index >= HOTBAR_START) && (index < (HOTBAR_END+1))) + { + if (!this.mergeItemStack(itemstack1, INV_START, INV_END+1, false)) + { + return null; + } + } + } + + if (itemstack1.stackSize == 0) + { + slot.putStack((ItemStack) null); + } + else + { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) + { + return null; + } + + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } + + return itemstack; + } + + /** + * You should override this method to prevent the player from moving the stack that + * opened the inventory, otherwise if the player moves it, the inventory will not + * be able to save properly + */ + @Override + public ItemStack slotClick(final int slot, final int button, final int flag, final EntityPlayer player) { + // this will prevent the player from interacting with the item that opened the inventory: + if ((slot >= 0) && (this.getSlot(slot) != null) && (this.getSlot(slot).getStack() == player.getHeldItem())) { + return null; + } + return super.slotClick(slot, button, flag, player); + } +} diff --git a/src/main/java/gtPlusPlus/core/container/Container_CircuitProgrammer.java b/src/main/java/gtPlusPlus/core/container/Container_CircuitProgrammer.java new file mode 100644 index 0000000000..d8ce521fb5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_CircuitProgrammer.java @@ -0,0 +1,190 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.InventoryCircuitProgrammer; +import gtPlusPlus.core.slots.SlotIntegratedCircuit; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; + +public class Container_CircuitProgrammer extends Container { + + protected TileEntityCircuitProgrammer tile_entity; + public final InventoryCircuitProgrammer inventoryChest; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + public static final int SLOT_OUTPUT = 25; + + public static int StorageSlotNumber = 26; // Number of slots in storage area + public static int InventorySlotNumber = 36; // Inventory Slots (Inventory + // and Hotbar) + public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All + // slots + + public Container_CircuitProgrammer(final InventoryPlayer inventory, final TileEntityCircuitProgrammer te) { + this.tile_entity = te; + this.inventoryChest = te.getInventory(); + + int var6; + int var7; + this.worldObj = te.getWorldObj(); + this.posX = te.xCoord; + this.posY = te.yCoord; + this.posZ = te.zCoord; + Logger.INFO("1"); + + int o = 0; + + // Storage Side + /*for (var6 = 0; var6 < 3; var6++) { + for (var7 = 0; var7 < 5; var7++) { + this.addSlotToContainer(new SlotIntegratedCircuit(o, this.inventoryChest, o, 44 + (var7 * 18), 15 + (var6 * 18))); + o++; + } + }*/ + + + int xStart = 8; + int yStart = 5; + + try { + //0 + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart, yStart)); + //1-10 + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+18)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+18)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+18)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+18)); + //11-20 + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+18)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+18)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+36)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+36)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+36)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+36)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+36)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+36)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+54)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+54)); + //21-24 + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+54)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+54)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+54)); + this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+54)); + Logger.INFO("2"); + + //Add Output + this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_OUTPUT, xStart+(8*18), yStart+54)); + o++; + Logger.INFO("3"); + + + + // Player Inventory + for (var6 = 0; var6 < 3; ++var6) { + for (var7 = 0; var7 < 9; ++var7) { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + // Player Hotbar + for (var6 = 0; var6 < 9; ++var6) { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + + + Logger.INFO("4"); + } + catch (Throwable t) {} + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, + final EntityPlayer aPlayer) { + + if (!aPlayer.worldObj.isRemote) { + if ((aSlotIndex == 999) || (aSlotIndex == -999)) { + // Utils.LOG_WARNING("??? - "+aSlotIndex); + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) { + super.onContainerClosed(par1EntityPlayer); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockCircuitProgrammer) { + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { + ItemStack var3 = null; + final Slot var4 = (Slot) this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + /* + * if (par2 == 0) { if (!this.mergeItemStack(var5, + * InOutputSlotNumber, FullSlotNumber, true)) { return null; } + * + * var4.onSlotChange(var5, var3); } else if (par2 >= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + // Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java b/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java new file mode 100644 index 0000000000..5bc384cd29 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_DecayablesChest.java @@ -0,0 +1,140 @@ +package gtPlusPlus.core.container; + +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.Inventory_DecayablesChest; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class Container_DecayablesChest extends Container { + + protected TileEntityDecayablesChest tile_entity; + public final Inventory_DecayablesChest inventoryChest; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + public static int StorageSlotNumber = 15; // Number of slots in storage area + public static int InventorySlotNumber = 36; // Inventory Slots (Inventory + // and Hotbar) + public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All + // slots + + private final int[] slotStorage = new int[15]; + + public Container_DecayablesChest(final InventoryPlayer inventory, final TileEntityDecayablesChest te) { + this.tile_entity = te; + this.inventoryChest = te.getInventory(); + te.openInventory(); + + int var6; + int var7; + this.worldObj = te.getWorldObj(); + this.posX = te.xCoord; + this.posY = te.yCoord; + this.posZ = te.zCoord; + + int o = 0; + + // Storage Side + for (var6 = 0; var6 < 3; var6++) { + for (var7 = 0; var7 < 5; var7++) { + this.slotStorage[o] = o; + this.addSlotToContainer(new Slot(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); + } + } + + // Player Inventory + for (var6 = 0; var6 < 3; ++var6) { + for (var7 = 0; var7 < 9; ++var7) { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + // Player Hotbar + for (var6 = 0; var6 < 9; ++var6) { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, + final EntityPlayer aPlayer) { + + if (!aPlayer.worldObj.isRemote) { + if ((aSlotIndex == 999) || (aSlotIndex == -999)) { + // Utils.LOG_WARNING("??? - "+aSlotIndex); + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) { + super.onContainerClosed(par1EntityPlayer); + tile_entity.closeInventory(); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockDecayablesChest) { + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { + ItemStack var3 = null; + final Slot var4 = (Slot) this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + /* + * if (par2 == 0) { if (!this.mergeItemStack(var5, + * InOutputSlotNumber, FullSlotNumber, true)) { return null; } + * + * var4.onSlotChange(var5, var3); } else if (par2 >= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + // Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_EggBox.java b/src/main/java/gtPlusPlus/core/container/Container_EggBox.java new file mode 100644 index 0000000000..c4396cca6f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_EggBox.java @@ -0,0 +1,140 @@ +package gtPlusPlus.core.container; + +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.Inventory_EggBox; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class Container_EggBox extends Container { + + protected TileEntityEggBox tile_entity; + public final Inventory_EggBox inventoryChest; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + public static int StorageSlotNumber = 15; // Number of slots in storage area + public static int InventorySlotNumber = 36; // Inventory Slots (Inventory + // and Hotbar) + public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All + // slots + + private final int[] slotStorage = new int[15]; + + public Container_EggBox(final InventoryPlayer inventory, final TileEntityEggBox te) { + this.tile_entity = te; + this.inventoryChest = te.getInventory(); + te.openInventory(); + + int var6; + int var7; + this.worldObj = te.getWorldObj(); + this.posX = te.xCoord; + this.posY = te.yCoord; + this.posZ = te.zCoord; + + int o = 0; + + // Storage Side + for (var6 = 0; var6 < 3; var6++) { + for (var7 = 0; var7 < 5; var7++) { + this.slotStorage[o] = o; + this.addSlotToContainer(new Slot(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); + } + } + + // Player Inventory + for (var6 = 0; var6 < 3; ++var6) { + for (var7 = 0; var7 < 9; ++var7) { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + // Player Hotbar + for (var6 = 0; var6 < 9; ++var6) { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, + final EntityPlayer aPlayer) { + + if (!aPlayer.worldObj.isRemote) { + if ((aSlotIndex == 999) || (aSlotIndex == -999)) { + // Utils.LOG_WARNING("??? - "+aSlotIndex); + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) { + super.onContainerClosed(par1EntityPlayer); + tile_entity.closeInventory(); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockEggBox) { + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { + ItemStack var3 = null; + final Slot var4 = (Slot) this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + /* + * if (par2 == 0) { if (!this.mergeItemStack(var5, + * InOutputSlotNumber, FullSlotNumber, true)) { return null; } + * + * var4.onSlotChange(var5, var3); } else if (par2 >= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + // Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java b/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java new file mode 100644 index 0000000000..a2f44441d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_FishTrap.java @@ -0,0 +1,142 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.InventoryFishTrap; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; + +public class Container_FishTrap extends Container { + + protected TileEntityFishTrap tile_entity; + public final InventoryFishTrap inventoryChest; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + public static int StorageSlotNumber = 15; // Number of slots in storage area + public static int InventorySlotNumber = 36; // Inventory Slots (Inventory + // and Hotbar) + public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All + // slots + + private final int[] slotStorage = new int[15]; + + public Container_FishTrap(final InventoryPlayer inventory, final TileEntityFishTrap te) { + this.tile_entity = te; + this.inventoryChest = te.getInventory(); + + te.openInventory(); + int var6; + int var7; + this.worldObj = te.getWorldObj(); + this.posX = te.xCoord; + this.posY = te.yCoord; + this.posZ = te.zCoord; + + int o = 0; + + // Storage Side + for (var6 = 0; var6 < 3; var6++) { + for (var7 = 0; var7 < 5; var7++) { + this.slotStorage[o] = o; + this.addSlotToContainer(new SlotNoInput(this.inventoryChest, o++, 44 + (var7 * 18), 15 + (var6 * 18))); + } + } + + // Player Inventory + for (var6 = 0; var6 < 3; ++var6) { + for (var7 = 0; var7 < 9; ++var7) { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + // Player Hotbar + for (var6 = 0; var6 < 9; ++var6) { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, + final EntityPlayer aPlayer) { + + if (!aPlayer.worldObj.isRemote) { + if ((aSlotIndex == 999) || (aSlotIndex == -999)) { + // Utils.LOG_WARNING("??? - "+aSlotIndex); + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) { + super.onContainerClosed(par1EntityPlayer); + tile_entity.closeInventory(); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockFishTrap) { + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { + ItemStack var3 = null; + final Slot var4 = (Slot) this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + /* + * if (par2 == 0) { if (!this.mergeItemStack(var5, + * InOutputSlotNumber, FullSlotNumber, true)) { return null; } + * + * var4.onSlotChange(var5, var3); } else if (par2 >= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + // Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_Grindle.java b/src/main/java/gtPlusPlus/core/container/Container_Grindle.java new file mode 100644 index 0000000000..4ab79322c9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_Grindle.java @@ -0,0 +1,160 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.inventories.BaseInventoryGrindle; +import gtPlusPlus.core.slots.SlotDataStick; + +public class Container_Grindle extends Container { + /** + * The Item Inventory for this Container, only needed if you want to reference + * isUseableByPlayer + */ + public final BaseInventoryGrindle inventory; + + /** + * Using these will make transferStackInSlot easier to understand and implement + * INV_START is the index of the first slot in the Player's Inventory, so our + * BaseInventoryBackpack's number of slots (e.g. 5 slots is array indices 0-4, + * so start at 5) Notice how we don't have to remember how many slots we made? + * We can just use BaseInventoryBackpack.INV_SIZE and if we ever change it, the + * Container updates automatically. + */ + private static final int + INV_START = BaseInventoryGrindle.INV_SIZE, + INV_END = INV_START + 0, + HOTBAR_START = INV_END, + HOTBAR_END = HOTBAR_START + 8; + + public Container_Grindle(final EntityPlayer par1Player, final InventoryPlayer inventoryPlayer, + final BaseInventoryGrindle inventoryItem) { + this.inventory = inventoryItem; + + int i; + + // Actual Scan Slot + this.addSlotToContainer(new SlotDataStick(this.inventory, 0, 152, 5)); + + for (i = 1; i < BaseInventoryGrindle.INV_SIZE; ++i) { + this.addSlotToContainer(new SlotDataStick(this.inventory, i, 153, 30 + (18 * i))); + } + + // PLAYER ACTION BAR - uses default locations for standard action bar texture + // file + for (i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + (i * 18), 142)); + } + } + + @Override + public boolean canInteractWith(final EntityPlayer entityplayer) { + return this.inventory.isUseableByPlayer(entityplayer); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you + * will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int index) { + ItemStack itemstack = null; + final Slot slot = (Slot) this.inventorySlots.get(index); + + if ((slot != null) && slot.getHasStack()) { + final ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + // If item is in our custom Inventory or armor slot + if (index < INV_START) { + // try to place in player inventory / action bar + if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END + 1, true)) { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + // Item is in inventory / hotbar, try to place in custom inventory or armor + // slots + else {/* + + * If your inventory only stores certain instances of Items, you can implement + * shift-clicking to your inventory like this: + * + * // Check that the item is the right type if (itemstack1.getItem() instanceof + * ItemCustom) { // Try to merge into your custom inventory slots // We use + * 'BaseInventoryBackpack.INV_SIZE' instead of INV_START just in case // you + * also add armor or other custom slots if (!this.mergeItemStack(itemstack1, 0, + * BaseInventoryBackpack.INV_SIZE, false)) { return null; } } // If you added + * armor slots, check them here as well: // Item being shift-clicked is armor - + * try to put in armor slot if (itemstack1.getItem() instanceof ItemArmor) { int + * type = ((ItemArmor) itemstack1.getItem()).armorType; if + * (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START + type + 1, + * false)) { return null; } } Otherwise, you have basically 2 choices: 1. + * shift-clicking between player inventory and custom inventory 2. + * shift-clicking between action bar and inventory + * + * Be sure to choose only ONE of the following implementations!!! + + *//** + * Implementation number 1: Shift-click into your custom inventory + *//* + if (index >= INV_START) { + // place in custom inventory + if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) { + return null; + } + } + + *//** + * Implementation number 2: Shift-click items between action bar and inventory + *//* + // item is in player's inventory, but not in action bar + if ((index >= INV_START) && (index < HOTBAR_START)) { + // place in action bar + if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END + 1, false)) { + return null; + } + } + // item in action bar - place in player inventory + else if ((index >= HOTBAR_START) && (index < (HOTBAR_END + 1))) { + if (!this.mergeItemStack(itemstack1, INV_START, INV_END + 1, false)) { + return null; + } + } + */} + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } + + return itemstack; + } + + /** + * You should override this method to prevent the player from moving the stack + * that opened the inventory, otherwise if the player moves it, the inventory + * will not be able to save properly + */ + @Override + public ItemStack slotClick(final int slot, final int button, final int flag, final EntityPlayer player) { + // this will prevent the player from interacting with the item that opened the + // inventory: + if ((slot >= 0) && (this.getSlot(slot) != null) && (this.getSlot(slot).getStack() == player.getHeldItem())) { + return null; + } + return super.slotClick(slot, button, flag, player); + } +} diff --git a/src/main/java/gtPlusPlus/core/container/Container_HeliumGenerator.java b/src/main/java/gtPlusPlus/core/container/Container_HeliumGenerator.java new file mode 100644 index 0000000000..39e07f2f0e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_HeliumGenerator.java @@ -0,0 +1,193 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.InventoryHeliumGenerator; +import gtPlusPlus.core.slots.SlotFuelRod; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator; + +public class Container_HeliumGenerator extends Container { + + protected TileEntityHeliumGenerator tile_entity; + public final InventoryHeliumGenerator inventoryChest; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + + public static int StorageSlotNumber = 19; //Number of slots in storage area + public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) + public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; //All slots + + //0 Is output, 1-18 are input. + private final int[] slotStorage = new int[19]; + + public Container_HeliumGenerator(final InventoryPlayer inventory, final TileEntityHeliumGenerator te){ + this.tile_entity = te; + this.inventoryChest = te.getInventory(); + + int var6; + int var7; + this.worldObj = te.getWorldObj(); + this.posX = te.xCoord; + this.posY = te.yCoord; + this.posZ = te.zCoord; + + int o=0; + + //Output + this.addSlotToContainer(new SlotNoInput(this.inventoryChest, 0, 80, 53)); + this.slotStorage[o] = o; + o++; + + //Side A + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + Logger.INFO("Adding slots at var:"+(o)+" x:"+(8 + var7 * 18)+" y:"+(9 + var6 * 18)); + this.addSlotToContainer(new SlotFuelRod(this.inventoryChest, o, 8 + (var7 * 18), 18 + (var6 * 18))); + this.slotStorage[o] = o; + o++; + } + } + + //Side B + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + Logger.INFO("Adding slots at var:"+(o)+" x:"+(90+8+(var7 * 18))+" y:"+(9 + var6 * 18)); + this.addSlotToContainer(new SlotFuelRod(this.inventoryChest, o, 116 + (var7 * 18), 18 + (var6 * 18))); + this.slotStorage[o] = o; + o++; + } + } + + o=0; + + //Player Inventory + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 9; ++var7) + { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + //Player Hotbar + for (var6 = 0; var6 < 9; ++var6) + { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + + if (!aPlayer.worldObj.isRemote){ + if ((aSlotIndex == 999) || (aSlotIndex == -999)){ + //Utils.LOG_WARNING("??? - "+aSlotIndex); + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + + + + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer){ + super.onContainerClosed(par1EntityPlayer); + } + + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockHeliumGenerator){ + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) + { + ItemStack var3 = null; + final Slot var4 = (Slot)this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) + { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + /*if (par2 == 0) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) + { + return null; + } + + var4.onSlotChange(var5, var3); + } + else if (par2 >= InOutputSlotNumber && par2 < InventoryOutSlotNumber) + { + if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) + { + return null; + } + } + else if (par2 >= InventoryOutSlotNumber && par2 < FullSlotNumber) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) + { + return null; + } + } + else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) + { + return null; + }*/ + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack)null); + } + else + { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) + { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + //Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_ModularityTable.java b/src/main/java/gtPlusPlus/core/container/Container_ModularityTable.java new file mode 100644 index 0000000000..e0fb51fe61 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_ModularityTable.java @@ -0,0 +1,252 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.modulartable.InventoryModularMain; +import gtPlusPlus.core.inventories.modulartable.InventoryModularOutput; +import gtPlusPlus.core.slots.SlotModularBauble; +import gtPlusPlus.core.slots.SlotModularBaubleUpgrades; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; + +public class Container_ModularityTable extends Container { + + /** The crafting matrix inventory (3x3). */ + + protected TileEntityModularityTable tile_entity; + public final InventoryModularMain inventoryGrid; + public final InventoryModularOutput inventoryOutputs; + public int mRecipeTime; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + private final int[] slotOutputs = new int[3]; + private final int[] slotGrid = new int[9]; + + + public Container_ModularityTable(final InventoryPlayer inventory, final TileEntityModularityTable tile){ + this.tile_entity = tile; + this.inventoryGrid = tile.inventoryGrid; + this.inventoryOutputs = tile.inventoryOutputs; + this.tile_entity.setContainer(this); + this.mRecipeTime = this.tile_entity.getRecipeTime(); + Logger.INFO("Container: "+this.mRecipeTime); + + int var6; + int var7; + this.worldObj = tile.getWorldObj(); + this.posX = tile.xCoord; + this.posY = tile.yCoord; + this.posZ = tile.zCoord; + + int nextFreeSlot = 0; + + + //Output slots + this.addSlotToContainer(new SlotModularBauble(this.inventoryOutputs, 0, 26+(18*6), 8)); + this.addSlotToContainer(new SlotModularBaubleUpgrades(this.inventoryOutputs, 1, 26+(18*5), 8)); + this.addSlotToContainer(new SlotNoInput(this.inventoryOutputs, 2, 26+(18*6), 44)); + + int o = 0; + + //Storage Side + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); + this.addSlotToContainer(new SlotModularBaubleUpgrades(this.inventoryGrid, nextFreeSlot, 8+18 + (var7 * 18), 17 + (var6 * 18))); + this.slotGrid[o] = nextFreeSlot; + nextFreeSlot++; + o++; + } + } + + //Player Inventory + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 9; ++var7) + { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + //Player Hotbar + for (var6 = 0; var6 < 9; ++var6) + { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + //this.onCraftMatrixChanged(this.craftMatrix); + + } + + /** + * Callback for when the crafting matrix is changed. + */ + /* public void onCraftMatrixChanged(IInventory p_75130_1_) + { + this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); + }*/ + + /** + * Called when the container is closed. + */ + @Override + public void onContainerClosed(EntityPlayer p_75134_1_){ + super.onContainerClosed(p_75134_1_); + if (!this.worldObj.isRemote){ + /* for (int i = 0; i < 9; ++i){ + ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); + if (itemstack != null){ + p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); + } + }*/ + } + } + + public TileEntityModularityTable getTileentityViaContainer(){ + if (this.tile_entity != null){ + return this.tile_entity; + } + return null; + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + + if (!aPlayer.worldObj.isRemote){ + if ((aSlotIndex == 999) || (aSlotIndex == -999)){ + //Utils.LOG_WARNING("??? - "+aSlotIndex); + } + + if (aSlotIndex == 0){ + Logger.INFO("Player Clicked on the bauble slot"); + //TODO + } + else if (aSlotIndex == 1){ + Logger.INFO("Player Clicked on the upgrade slot"); + //TODO + } + else if (aSlotIndex == 2){ + Logger.INFO("Player Clicked on the output slot"); + //TODO + } + else { + for (final int x : this.slotGrid){ + if (aSlotIndex == x){ + Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); + } + } + } + } + //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockModularTable){ + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) + { + + return null; + + /*ItemStack var3 = null; + final Slot var4 = (Slot)this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) + { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if (par2 == 0) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) + { + return null; + } + + var4.onSlotChange(var5, var3); + } + else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) + { + if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) + { + return null; + } + } + else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) + { + return null; + } + } + else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) + { + return null; + } + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack)null); + } + else + { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) + { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3;*/ + } + + //Can merge Slot + /*public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_){ + return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); + }*/ + + /*public ItemStack getOutputContent(){ + ItemStack output = this.craftResult.getStackInSlot(0); + if (output != null){ + return output; + } + return null; + } + + public ItemStack[] getInputComponents(){ + ItemStack inputs[] = new ItemStack[9]; + for (int r=0;r= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + // Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java b/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java new file mode 100644 index 0000000000..2cdf7ee783 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_ProjectTable.java @@ -0,0 +1,242 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.*; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain; +import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput; +import gtPlusPlus.core.slots.SlotCraftingNoCollect; +import gtPlusPlus.core.slots.SlotDataStick; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; + +public class Container_ProjectTable extends Container { + + /** The crafting matrix inventory (3x3). */ + public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); + public IInventory craftResult = new InventoryCraftResult(); + + protected TileEntityProjectTable tile_entity; + public final InventoryProjectMain inventoryGrid; + public final InventoryProjectOutput inventoryOutputs; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + private final int[] slotOutputs = new int[2]; + private final int[] slotGrid = new int[9]; + + + public Container_ProjectTable(final InventoryPlayer inventory, final TileEntityProjectTable tile){ + this.tile_entity = tile; + this.inventoryGrid = tile.inventoryGrid; + this.inventoryOutputs = tile.inventoryOutputs; + this.tile_entity.setContainer(this); + + int var6; + int var7; + this.worldObj = tile.getWorldObj(); + this.posX = tile.xCoord; + this.posY = tile.yCoord; + this.posZ = tile.zCoord; + + int nextFreeSlot = 0; + + + //Output slots + this.addSlotToContainer(new SlotDataStick(this.inventoryOutputs, 0, 26+(18*6), 8)); + this.addSlotToContainer(new SlotNoInput(this.inventoryOutputs, 1, 26+(18*6), 44)); + + this.addSlotToContainer(new SlotCraftingNoCollect(inventory.player, this.craftMatrix, this.craftResult, 0, 26+(18*4), 25)); + + + int o = 0; + //Storage Side + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); + this.addSlotToContainer(new Slot(this.craftMatrix, nextFreeSlot, 8+18 + (var7 * 18), 8 + (var6 * 18))); + this.slotGrid[o] = nextFreeSlot; + nextFreeSlot++; + o++; + } + } + + + //Player Inventory + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 9; ++var7) + { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + //Player Hotbar + for (var6 = 0; var6 < 9; ++var6) + { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + this.onCraftMatrixChanged(this.craftMatrix); + + } + + /** + * Callback for when the crafting matrix is changed. + */ + @Override + public void onCraftMatrixChanged(IInventory p_75130_1_) + { + this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); + } + + /** + * Called when the container is closed. + */ + @Override + public void onContainerClosed(EntityPlayer p_75134_1_){ + super.onContainerClosed(p_75134_1_); + if (!this.worldObj.isRemote){ + for (int i = 0; i < 9; ++i){ + ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); + if (itemstack != null){ + p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); + } + } + } + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + + if (!aPlayer.worldObj.isRemote){ + if ((aSlotIndex == 999) || (aSlotIndex == -999)){ + //Utils.LOG_WARNING("??? - "+aSlotIndex); + } + + if (aSlotIndex == 0){ + Logger.INFO("Player Clicked on the Data Stick slot"); + //TODO + }if (aSlotIndex == 1){ + Logger.INFO("Player Clicked on the output slot"); + //TODO + } + + for (final int x : this.slotGrid){ + if (aSlotIndex == x){ + Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); + } + } + } + //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockProjectTable){ + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) + { + + return null; + + /*ItemStack var3 = null; + final Slot var4 = (Slot)this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) + { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if (par2 == 0) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) + { + return null; + } + + var4.onSlotChange(var5, var3); + } + else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) + { + if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) + { + return null; + } + } + else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) + { + return null; + } + } + else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) + { + return null; + } + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack)null); + } + else + { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) + { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3;*/ + } + + //Can merge Slot + @Override + public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_){ + return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); + } + + public ItemStack getOutputContent(){ + ItemStack output = this.craftResult.getStackInSlot(0); + if (output != null){ + return output; + } + return null; + } + + public ItemStack[] getInputComponents(){ + ItemStack inputs[] = new ItemStack[9]; + for (int r=0;r= 3 && c < 6) { + continue; + } + this.addSlotToContainer(new SlotJukebox(this.inventoryChest, o++, xStart+(18*c), yStart)); + } + + //Row Two + for (int c = 0; c < 9; c++) { + if (c >= 3 && c < 6) { + continue; + } + this.addSlotToContainer(new SlotJukebox(this.inventoryChest, o++, xStart+(18*c), yStart+18)); + } + + //Row Two + for (int c = 0; c < 9; c++) { + if (c >= 3 && c < 6) { + continue; + } + this.addSlotToContainer(new SlotJukebox(this.inventoryChest, o++, xStart+(18*c), yStart+36)); + } + + + //Controls + int c = 4; + + //Two Control Buttons + this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_HOLO_PLAY, xStart+(18*c), 12)); + this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_HOLO_LOOP, xStart+(18*c), 12+(1*18))); + + //Active playing slot for visual + this.addSlotToContainer(new SlotJukebox(this.inventoryChest, SLOT_OUTPUT, xStart+(18*c), 18+(2*18), true)); + + + + + // Player Inventory + for (var6 = 0; var6 < 3; ++var6) { + for (var7 = 0; var7 < 9; ++var7) { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + // Player Hotbar + for (var6 = 0; var6 < 9; ++var6) { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + + Logger.INFO("3"); + + } + catch (Throwable t) { + t.printStackTrace(); + } + + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) { + super.onContainerClosed(par1EntityPlayer); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer) { + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockCustomJukebox) { + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) { + ItemStack var3 = null; + final Slot var4 = (Slot) this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + /* + * if (par2 == 0) { if (!this.mergeItemStack(var5, + * InOutputSlotNumber, FullSlotNumber, true)) { return null; } + * + * var4.onSlotChange(var5, var3); } else if (par2 >= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + // Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return super.func_94530_a(p_94530_1_, p_94530_2_); + } + + + + @Override + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (tile_entity == null || tile_entity.getWorldObj().isRemote) return null; + switch (aSlotIndex) { + case SLOT_HOLO_PLAY: + if (tile_entity == null) return null; + tile_entity.mIsPlaying = !tile_entity.mIsPlaying; + Logger.INFO("Jukebox | Playing: "+tile_entity.mIsPlaying); + tile_entity.jukeboxLogicUpdate(); + return null; + case SLOT_HOLO_LOOP: + if (tile_entity == null) return null; + tile_entity.mIsLooping = !tile_entity.mIsLooping; + Logger.INFO("Jukebox | Looping: "+tile_entity.mIsLooping); + return null; + case 20: + return null; + default: + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + } + + public boolean isPlaying; + public boolean isLooping; + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (tile_entity == null || tile_entity.getWorldObj().isRemote) return; + + isPlaying = tile_entity.mIsPlaying; + isLooping = tile_entity.mIsLooping; + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 102, isPlaying ? 1 : 0); + var1.sendProgressBarUpdate(this, 103, isLooping ? 1 : 0); + } + } + + @Override + public void addCraftingToCrafters(ICrafting par1ICrafting) { + super.addCraftingToCrafters(par1ICrafting); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 102: + isPlaying = (par2 != 0); + break; + case 103: + isLooping = (par2 != 0); + break; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_TradeTable.java b/src/main/java/gtPlusPlus/core/container/Container_TradeTable.java new file mode 100644 index 0000000000..f812e384a7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_TradeTable.java @@ -0,0 +1,223 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.tradetable.InventoryTradeMain; +import gtPlusPlus.core.inventories.tradetable.InventoryTradeOutput; +import gtPlusPlus.core.slots.SlotGeneric; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; + +public class Container_TradeTable extends Container { + + protected TileEntityTradeTable tile_entity; + public final InventoryTradeMain inventoryChest; + public final InventoryTradeOutput inventoryOutputs; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + private final int[] slotOutputs = new int[2]; + private final int[] slotGrid = new int[9]; + + + public Container_TradeTable(final InventoryPlayer inventory, final TileEntityTradeTable te){ + + this.tile_entity = te; + this.inventoryChest = te.inventoryGrid; + this.inventoryOutputs = te.inventoryOutputs; + this.tile_entity.setContainer(this); + + if (te.isServerSide()) + Logger.INFO("Container - "+te.mOwnerName); + + int var6; + int var7; + this.worldObj = te.getWorldObj(); + this.posX = te.xCoord; + this.posY = te.yCoord; + this.posZ = te.zCoord; + + int nextFreeSlot = 0; + + + //Output slots + this.addSlotToContainer(new SlotGeneric(this.inventoryOutputs, 0, 26+(18*6), 8)); + this.addSlotToContainer(new SlotNoInput(this.inventoryOutputs, 1, 26+(18*6), 44)); + + //this.addSlotToContainer(new SlotCraftingNoCollect(inventory.player, this.craftMatrix, this.craftResult, 0, 26+(18*4), 25)); + + int o = 0; + //Storage Side + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); + this.addSlotToContainer(new Slot(this.inventoryChest, nextFreeSlot, 8+18 + (var7 * 18), 8 + (var6 * 18))); + this.slotGrid[o] = nextFreeSlot; + nextFreeSlot++; + o++; + } + } + + //Player Inventory + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 9; ++var7) + { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + //Player Hotbar + for (var6 = 0; var6 < 9; ++var6) + { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + //this.onCraftMatrixChanged(this.craftMatrix); + } + + /** + * Called when the container is closed. + */ + @Override + public void onContainerClosed(EntityPlayer p_75134_1_){ + super.onContainerClosed(p_75134_1_); + if (!this.worldObj.isRemote){ + for (int i = 0; i < 9; ++i){ + ItemStack itemstack = this.inventoryChest.getStackInSlotOnClosing(i); + if (itemstack != null){ + p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); + } + } + } + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + + if (!aPlayer.worldObj.isRemote){ + if ((aSlotIndex == 999) || (aSlotIndex == -999)){ + //Utils.LOG_WARNING("??? - "+aSlotIndex); + } + + if (aSlotIndex == 0){ + Logger.INFO("Player Clicked on the Data Stick slot"); + //TODO + }if (aSlotIndex == 1){ + Logger.INFO("Player Clicked on the output slot"); + //TODO + } + + for (final int x : this.slotGrid){ + if (aSlotIndex == x){ + Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); + } + } + } + //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public boolean canInteractWith(final EntityPlayer par1EntityPlayer){ + if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockTradeTable){ + return false; + } + + return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D; + } + + + @Override + public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) + { + + return null; + + /*ItemStack var3 = null; + final Slot var4 = (Slot)this.inventorySlots.get(par2); + + if ((var4 != null) && var4.getHasStack()) + { + final ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if (par2 == 0) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, true)) + { + return null; + } + + var4.onSlotChange(var5, var3); + } + else if ((par2 >= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) + { + if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) + { + return null; + } + } + else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) + { + return null; + } + } + else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) + { + return null; + } + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack)null); + } + else + { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) + { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3;*/ + } + + public ItemStack getOutputContent(){ + ItemStack output = this.inventoryOutputs.getStackInSlot(0); + if (output != null){ + return output; + } + return null; + } + + public ItemStack[] getInputComponents(){ + ItemStack inputs[] = new ItemStack[9]; + for (int r=0;r= + * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if + * (!this.mergeItemStack(var5, InventoryOutSlotNumber, + * FullSlotNumber, false)) { return null; } } else if (par2 >= + * InventoryOutSlotNumber && par2 < FullSlotNumber) { if + * (!this.mergeItemStack(var5, InOutputSlotNumber, + * InventoryOutSlotNumber, false)) { return null; } } else if + * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, + * false)) { return null; } + */ + + if (var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if ((Utils.isClient()) || (this.mTileEntity == null)) { + return; + } + + mCustomValue = mTileEntity.getCustomValue(); + mTimer++; + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + if (mTimer % 20 == 10 || oCustomValue != mCustomValue) { + var1.sendProgressBarUpdate(this, 0, mCustomValue); + } + } + + oCustomValue = mCustomValue; + } + + @SideOnly(Side.CLIENT) + @Override + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 0: + mCustomValue = (short) par2; + break; + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java b/src/main/java/gtPlusPlus/core/container/Container_Workbench.java new file mode 100644 index 0000000000..55ef1a3d0c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_Workbench.java @@ -0,0 +1,413 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.*; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.world.World; + +import gregtech.api.gui.GT_Slot_Holo; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.interfaces.IItemBlueprint; +import gtPlusPlus.core.inventories.InventoryWorkbenchChest; +import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; +import gtPlusPlus.core.inventories.InventoryWorkbenchTools; +import gtPlusPlus.core.item.general.ItemBlueprint; +import gtPlusPlus.core.slots.*; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class Container_Workbench extends Container { + + protected TileEntityWorkbench tile_entity; + public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); + public final InventoryWorkbenchChest inventoryChest; + public final InventoryWorkbenchTools inventoryTool; + public final InventoryWorkbenchHoloSlots inventoryHolo; + //public final InventoryWorkbenchHoloCrafting inventoryCrafting; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + public static int HoloSlotNumber = 6; + public static int InputSlotNumber = 0; //Number of Slots in the Crafting Grid + public static int StorageSlotNumber = 16; //Number of slots in storage area + public static int ToolSlotNumber = 5; // Number of slots in the tool area up top + public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot + public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) + public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output + public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots + + private final int slotOutput = 0; + private final int[] slotHolo = new int[5]; + private final int[] slotCrafting = new int[9]; + private final int[] slotStorage = new int[16]; + private final int[] slotTools = new int[5]; + + public void moveCraftingToChest(){ + //Check Chest Space + for (int i=0;i<9;i++){ + if (this.craftMatrix.getStackInSlot(i) != null){ + for (int r=0;r<16;r++){ + if ((this.inventoryChest.getStackInSlot(r) == null) || ((this.inventoryChest.getStackInSlot(r).getItem() == this.craftMatrix.getStackInSlot(i).getItem()) && ((64-this.craftMatrix.getStackInSlot(i).stackSize) <= (64-this.craftMatrix.getStackInSlot(i).stackSize)))){ + this.inventoryChest.setInventorySlotContents(r, this.craftMatrix.getStackInSlot(i)); + this.craftMatrix.setInventorySlotContents(i, null); + break; + } + } + } + } + //For Each Space or already existing itemstack, move one itemstack or fill current partial stack + //Remove old itemstack or partial stack from crafting grid + } + + public void moveChestToCrafting(){ + //Check Crafting items and slots + for (int i=0;i<9;i++){ + if ((this.craftMatrix.getStackInSlot(i) == null) || (this.craftMatrix.getStackInSlot(i).stackSize > 0)){ + for (int r=0;r<16;r++){ + if (this.inventoryChest.getStackInSlot(r) != null){ + this.craftMatrix.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(r)); + this.inventoryChest.setInventorySlotContents(r, null); + } + } + } + } + //For Each already existing itemstack, fill current partial stack + //Remove partial stack from chest area + } + + + public Container_Workbench(final InventoryPlayer inventory, final TileEntityWorkbench tile){ + this.tile_entity = tile; + this.inventoryChest = tile.inventoryChest; + this.inventoryTool = tile.inventoryTool; + this.inventoryHolo = tile.inventoryHolo; + //this.inventoryCrafting = tile.inventoryCrafting; + + int var6; + int var7; + this.worldObj = tile.getWorldObj(); + this.posX = tile.xCoord; + this.posY = tile.yCoord; + this.posZ = tile.zCoord; + + int o=0; + + //Output slot + this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); + //Util Slots + this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint + this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper + this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking + //Holo Slots + this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); + this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); + + for (int i=1; i<6; i++){ + this.slotHolo[o] = o+1; + o++; + } + + o=0; + + this.updateCraftingMatrix(); + + //Crafting Grid + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + //this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); + + /*if (this.inventoryCrafting.getStackInSlot(o) != null){ + this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); + this.inventoryCrafting.setInventorySlotContents(o, null); + } */ + this.slotCrafting[o] = o+6; + o++; + } + } + + o=0; + + //Storage Side + for (var6 = 0; var6 < 4; ++var6) + { + for (var7 = 0; var7 < 4; ++var7) + { + //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); + this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); + this.slotStorage[o] = o+15; + o++; + } + } + + o=0; + + //Tool Slots + for (var6 = 0; var6 < 1; ++var6) + { + for (var7 = 0; var7 < 5; ++var7) + { + this.addSlotToContainer(new SlotGtTool(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18))); + this.slotTools[o] = o+31; + o++; + } + } + + //Player Inventory + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 9; ++var7) + { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + //Player Hotbar + for (var6 = 0; var6 < 9; ++var6) + { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + this.onCraftMatrixChanged(this.craftMatrix); + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + + if (!aPlayer.worldObj.isRemote){ + if ((aSlotIndex == 999) || (aSlotIndex == -999)){ + //Utils.LOG_WARNING("??? - "+aSlotIndex); + } + + if (aSlotIndex == this.slotOutput){ + Logger.WARNING("Player Clicked on the output slot"); + //TODO + } + + for (final int x : this.slotHolo){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); + if (x == 1){ + Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); + } + else if (x == 2){ + Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); + if (this.inventoryHolo.getStackInSlot(1) != null){ + Logger.WARNING("Found an ItemStack."); + if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ + Logger.WARNING("Found a blueprint."); + final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); + final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); + if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ + Logger.WARNING("Output slot was not empty."); + Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); + tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); + final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); + this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); + Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); + } + else { + if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ + Logger.WARNING("Blueprint already holds a recipe."); + } + else { + Logger.WARNING("Output slot was empty."); + } + } + } + else { + Logger.WARNING("ItemStack found was not a blueprint."); + } + } + else { + Logger.WARNING("No ItemStack found in Blueprint slot."); + } + } + else if (x == 3){ + Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); + } + else if (x == 4){ + Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); + } + else if (x == 5){ + Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); + } + } + } + + for (final int x : this.slotCrafting){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); + } + } + for (final int x : this.slotStorage){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); + } + } + for (final int x : this.slotTools){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); + } + } + } + //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + private void updateCraftingMatrix() { + for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { + //this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); + } + } + + @Override + public void onCraftMatrixChanged(final IInventory iiventory) { + this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) + { + super.onContainerClosed(par1EntityPlayer); + this.saveCraftingMatrix(); + } + + private void saveCraftingMatrix() { + for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { + //this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); + } + } + + + + + /*@Override + public void onCraftMatrixChanged(IInventory par1IInventory){ + //Custom Recipe Handler + //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); + + //Vanilla CraftingManager + Utils.LOG_WARNING("checking crafting grid for a valid output."); + ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); + if (temp != null){ + Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); + craftResult.setInventorySlotContents(slotOutput, temp); + } + else { + Utils.LOG_WARNING("No Valid output found."); + craftResult.setInventorySlotContents(slotOutput, null); + } + }*/ + + /*@Override + public void onContainerClosed(EntityPlayer par1EntityPlayer) + { + for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) + { + if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) + { + return null; + } + } + else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) + { + return null; + } + } + else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) + { + return null; + } + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack)null); + } + else + { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) + { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + //Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java new file mode 100644 index 0000000000..dc499c570f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java @@ -0,0 +1,377 @@ +package gtPlusPlus.core.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.*; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.world.World; + +import gregtech.api.gui.GT_Slot_Holo; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.interfaces.IItemBlueprint; +import gtPlusPlus.core.inventories.*; +import gtPlusPlus.core.item.general.ItemBlueprint; +import gtPlusPlus.core.slots.*; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class Container_WorkbenchAdvanced extends Container { + + protected TileEntityWorkbenchAdvanced tile_entity; + public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); + public final InventoryWorkbenchChest inventoryChest; + public final InventoryWorkbenchToolsElectric inventoryTool; + public final InventoryWorkbenchHoloSlots inventoryHolo; + public final InventoryWorkbenchHoloCrafting inventoryCrafting; + + private final World worldObj; + private final int posX; + private final int posY; + private final int posZ; + + public static int HoloSlotNumber = 6; + public static int InputSlotNumber = 9; //Number of Slots in the Crafting Grid + public static int StorageSlotNumber = 16; //Number of slots in storage area + public static int ToolSlotNumber = 5; // Number of slots in the tool area up top + public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot + public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) + public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output + public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots + + private final int slotOutput = 0; + private final int[] slotHolo = new int[5]; + private final int[] slotCrafting = new int[9]; + private final int[] slotStorage = new int[16]; + private final int[] slotTools = new int[5]; + + public Container_WorkbenchAdvanced(final InventoryPlayer inventory, final TileEntityWorkbenchAdvanced tile){ + this.tile_entity = tile; + this.inventoryChest = tile.inventoryChest; + this.inventoryTool = tile.inventoryTool; + this.inventoryHolo = tile.inventoryHolo; + this.inventoryCrafting = tile.inventoryCrafting; + + int var6; + int var7; + this.worldObj = tile.getWorldObj(); + this.posX = tile.xCoord; + this.posY = tile.yCoord; + this.posZ = tile.zCoord; + + int o=0; + + //Output slot + this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); + //Util Slots + this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint + this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper + this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking + //Holo Slots + this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); + this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); + + for (int i=1; i<6; i++){ + this.slotHolo[o] = o+1; + o++; + } + + o=0; + + this.updateCraftingMatrix(); + + //Crafting Grid + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 3; ++var7) + { + this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); + + /*if (this.inventoryCrafting.getStackInSlot(o) != null){ + this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); + this.inventoryCrafting.setInventorySlotContents(o, null); + } */ + this.slotCrafting[o] = o+6; + o++; + } + } + + o=0; + + //Storage Side + for (var6 = 0; var6 < 4; ++var6) + { + for (var7 = 0; var7 < 4; ++var7) + { + //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); + this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); + this.slotStorage[o] = o+15; + o++; + } + } + + o=0; + + //Tool Slots + for (var6 = 0; var6 < 1; ++var6) + { + for (var7 = 0; var7 < 5; ++var7) + { + this.addSlotToContainer(new SlotGtToolElectric(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18), 3, false)); + this.slotTools[o] = o+31; + o++; + } + } + + //Player Inventory + for (var6 = 0; var6 < 3; ++var6) + { + for (var7 = 0; var7 < 9; ++var7) + { + this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); + } + } + + //Player Hotbar + for (var6 = 0; var6 < 9; ++var6) + { + this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); + } + + this.onCraftMatrixChanged(this.craftMatrix); + + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ + + if (!aPlayer.worldObj.isRemote){ + if ((aSlotIndex == 999) || (aSlotIndex == -999)){ + //Utils.LOG_WARNING("??? - "+aSlotIndex); + } + + if (aSlotIndex == this.slotOutput){ + Logger.WARNING("Player Clicked on the output slot"); + //TODO + } + + for (final int x : this.slotHolo){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); + if (x == 1){ + Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); + } + else if (x == 2){ + Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); + if (this.inventoryHolo.getStackInSlot(1) != null){ + Logger.WARNING("Found an ItemStack."); + if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ + Logger.WARNING("Found a blueprint."); + final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); + final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); + if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ + Logger.WARNING("Output slot was not empty."); + Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); + tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); + final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); + this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); + Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); + } + else { + if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ + Logger.WARNING("Blueprint already holds a recipe."); + } + else { + Logger.WARNING("Output slot was empty."); + } + } + } + else { + Logger.WARNING("ItemStack found was not a blueprint."); + } + } + else { + Logger.WARNING("No ItemStack found in Blueprint slot."); + } + } + else if (x == 3){ + Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); + } + else if (x == 4){ + Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); + } + else if (x == 5){ + Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); + } + } + } + + for (final int x : this.slotCrafting){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); + } + } + for (final int x : this.slotStorage){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); + } + } + for (final int x : this.slotTools){ + if (aSlotIndex == x){ + Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); + } + } + } + //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + private void updateCraftingMatrix() { + for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { + this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); + } + } + + @Override + public void onCraftMatrixChanged(final IInventory iiventory) { + this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); + } + + @Override + public void onContainerClosed(final EntityPlayer par1EntityPlayer) + { + super.onContainerClosed(par1EntityPlayer); + this.saveCraftingMatrix(); + } + + private void saveCraftingMatrix() { + for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { + this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); + } + } + + + + + /*@Override + public void onCraftMatrixChanged(IInventory par1IInventory){ + //Custom Recipe Handler + //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); + + //Vanilla CraftingManager + Utils.LOG_WARNING("checking crafting grid for a valid output."); + ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); + if (temp != null){ + Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); + craftResult.setInventorySlotContents(slotOutput, temp); + } + else { + Utils.LOG_WARNING("No Valid output found."); + craftResult.setInventorySlotContents(slotOutput, null); + } + }*/ + + /*@Override + public void onContainerClosed(EntityPlayer par1EntityPlayer) + { + for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) + { + if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) + { + return null; + } + } + else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) + { + if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) + { + return null; + } + } + else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) + { + return null; + } + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack)null); + } + else + { + var4.onSlotChanged(); + } + + if (var5.stackSize == var3.stackSize) + { + return null; + } + + var4.onPickupFromSlot(par1EntityPlayer, var5); + } + + return var3; + } + + //Can merge Slot + @Override + public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { + return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/box/LunchBoxContainer.java b/src/main/java/gtPlusPlus/core/container/box/LunchBoxContainer.java new file mode 100644 index 0000000000..8e56c661f2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/box/LunchBoxContainer.java @@ -0,0 +1,13 @@ +package gtPlusPlus.core.container.box; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import gtPlusPlus.core.slots.SlotLunchBox; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; + +public class LunchBoxContainer extends ContainerBoxBase { + public LunchBoxContainer(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, CustomBoxInventory CustomBoxInventory) { + super(par1Player, inventoryPlayer, CustomBoxInventory, SlotLunchBox.class, gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS); + } +} diff --git a/src/main/java/gtPlusPlus/core/container/box/MagicBagContainer.java b/src/main/java/gtPlusPlus/core/container/box/MagicBagContainer.java new file mode 100644 index 0000000000..7820d56814 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/box/MagicBagContainer.java @@ -0,0 +1,13 @@ +package gtPlusPlus.core.container.box; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import gtPlusPlus.core.slots.SlotMagicToolBag; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; + +public class MagicBagContainer extends ContainerBoxBase { + public MagicBagContainer(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, CustomBoxInventory CustomBoxInventory) { + super(par1Player, inventoryPlayer, CustomBoxInventory, SlotMagicToolBag.class, gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS); + } +} diff --git a/src/main/java/gtPlusPlus/core/container/box/ToolBoxContainer.java b/src/main/java/gtPlusPlus/core/container/box/ToolBoxContainer.java new file mode 100644 index 0000000000..49719aa9ba --- /dev/null +++ b/src/main/java/gtPlusPlus/core/container/box/ToolBoxContainer.java @@ -0,0 +1,15 @@ +package gtPlusPlus.core.container.box; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox; +import gtPlusPlus.core.slots.SlotToolBox; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; + +public class ToolBoxContainer extends ContainerBoxBase { + public ToolBoxContainer(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, + CustomBoxInventory CustomBoxInventory) { + super(par1Player, inventoryPlayer, CustomBoxInventory, SlotToolBox.class, UniversalToolBox.SLOTS); + } +} diff --git a/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java b/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java new file mode 100644 index 0000000000..218bef46bd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java @@ -0,0 +1,35 @@ +package gtPlusPlus.core.creative; + +import net.minecraft.creativetab.CreativeTabs; +import gregtech.api.util.GT_CreativeTab; +import gtPlusPlus.core.creative.tabs.*; +import gtPlusPlus.xmod.bop.creative.MiscUtilsBOPTab; + +public class AddToCreativeTab { + + public static CreativeTabs tabBlock; + public static CreativeTabs tabMisc; + public static CreativeTabs tabCombat; + public static CreativeTabs tabTools; + public static CreativeTabs tabMachines; + public static CreativeTabs tabOther; + public static CreativeTabs tabBOP; + + public static void initialiseTabs() { + //GT_CreativeTab + /*tabBlock = new MiscUtilCreativeTabBlock("MiscUtilBlockTab"); + tabMisc = new MiscUtilCreativeTabMisc("MiscUtilMiscTab"); + tabTools = new MiscUtilCreativeTabTools("MiscUtilToolsTab"); + tabMachines = new MiscUtilCreativeTabMachines("MiscUtilMachineTab"); + tabOther = new MiscUtilCreativeTabOther("MiscUtilOtherTab"); + tabBOP = new MiscUtilsBOPTab("MiscUtilBOP");*/ + + tabBlock = new GT_CreativeTab("GTPP_BLOCKS", "GT++ Blocks"); + tabMisc = new GT_CreativeTab("GTPP_MISC", "GT++ Misc"); + tabTools = new GT_CreativeTab("GTPP_TOOLS", "GT++ Tools"); + tabMachines = new GT_CreativeTab("GTPP_MACHINES", "GT++ Machines"); + tabOther = new GT_CreativeTab("GTPP_OTHER", "GT++ Other"); + tabBOP = new GT_CreativeTab("GTPP_OTHER_2", "GT++ Other II"); + + } +} diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java new file mode 100644 index 0000000000..2851a514d0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java @@ -0,0 +1,27 @@ +package gtPlusPlus.core.creative.tabs; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.block.ModBlocks; + +public class MiscUtilCreativeTabBlock extends CreativeTabs { + + public MiscUtilCreativeTabBlock(final String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return Item.getItemFromBlock(Blocks.bedrock); + } + + @SideOnly(Side.CLIENT) + @Override + public int func_151243_f(){ + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java new file mode 100644 index 0000000000..96c809c4da --- /dev/null +++ b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java @@ -0,0 +1,21 @@ +package gtPlusPlus.core.creative.tabs; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.Item; + +import gtPlusPlus.core.item.ModItems; + +public class MiscUtilCreativeTabMachines extends CreativeTabs { + + + public MiscUtilCreativeTabMachines(final String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return Items.netherbrick; + } + +} diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java new file mode 100644 index 0000000000..a67668bbf0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.creative.tabs; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.Item; + +import gtPlusPlus.core.item.ModItems; + +public class MiscUtilCreativeTabMisc extends CreativeTabs { + + public MiscUtilCreativeTabMisc(final String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return Items.painting; + } + +} diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java new file mode 100644 index 0000000000..afd89346c0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.creative.tabs; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.Item; + +import gtPlusPlus.core.item.ModItems; + +public class MiscUtilCreativeTabOther extends CreativeTabs { + + public MiscUtilCreativeTabOther(final String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return Items.repeater; + } + +} diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java new file mode 100644 index 0000000000..ab1ab069de --- /dev/null +++ b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.creative.tabs; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; +import net.minecraft.item.Item; + +import gtPlusPlus.core.item.ModItems; + +public class MiscUtilCreativeTabTools extends CreativeTabs { + + public MiscUtilCreativeTabTools(final String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return Items.diamond_pickaxe; + } + +} diff --git a/src/main/java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java b/src/main/java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java new file mode 100644 index 0000000000..9abd07392d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java @@ -0,0 +1,216 @@ +package gtPlusPlus.core.entity; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityTNTPrimed; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.world.explosions.ExplosionHandler; + +public class EntityPrimedMiningExplosive extends EntityTNTPrimed +{ + /** How long the fuse is */ + private EntityLivingBase tntPlacedBy; + + public EntityPrimedMiningExplosive(final World world){ + super(world); + this.fuse = 160; + this.preventEntitySpawning = true; + this.setSize(0.98F, 0.98F); + this.yOffset = this.height / 2.0F; + } + + public EntityPrimedMiningExplosive(final World world, final double x, final double y, final double z, final EntityLivingBase placingEntity) + { + this(world); + this.setPosition(x, y, z); + final float f = (float)(Math.random() * Math.PI * 2.0D); + this.motionX = -((float)Math.sin(f)) * 0.02F; + this.motionY = 0.20000000298023224D; + this.motionZ = -((float)Math.cos(f)) * 0.02F; + this.fuse = 160; + this.prevPosX = x; + this.prevPosY = y; + this.prevPosZ = z; + this.tntPlacedBy = placingEntity; + } + + @Override + protected void entityInit() {} + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() + { + return false; + } + + /** + * Returns true if other Entities should be prevented from moving through this Entity. + */ + @Override + public boolean canBeCollidedWith() + { + return !this.isDead; + } + + /** + * Called to update the entity's position/logic. + */ + @Override + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.motionY -= 0.03999999910593033D; + this.moveEntity(this.motionX, this.motionY, this.motionZ); + this.motionX *= 0.9800000190734863D; + this.motionY *= 0.9800000190734863D; + this.motionZ *= 0.9800000190734863D; + + if (this.onGround) + { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + this.motionY *= -0.5D; + } + + if (this.fuse-- <= 0) + { + this.setDead(); + + if (!this.worldObj.isRemote) + { + this.explode(); + } + } + else + { + + int t = MathUtils.randInt(0, 15); + + if (t <= 2){ + int e = MathUtils.randInt(0, 3); + if (e <= 1){ + this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + else if (e == 2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + + } + } + else if (t <= 4){ + int e = MathUtils.randInt(0, 5); + if (e <= 1){ + this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + else if (e == 2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + + } + } + else if (t <= 6){ + int e = MathUtils.randInt(0, 4); + if (e <= 1){ + this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + else if (e == 2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + + } + } + else if (t <= 8){ + int e = MathUtils.randInt(0, 1); + if (e <= 1){ + this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + else if (e == 2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + + } + } + else if (t <= 10){ + int e = MathUtils.randInt(0, 6); + if (e <= 1){ + this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + else if (e >= 2){ + this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(0, 1), this.posY+MathUtils.randDouble(0, 1), this.posZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + + } + } + + } + } + + private void explode() + { + final float f = 100.0F; + + ExplosionHandler explode = new ExplosionHandler(); + explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, false, true); + + /*this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true); + this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); + this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); + this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true); + this.worldObj.createExplosion(this, this.posX+MathUtils.randDouble(-10, 10), this.posY, this.posZ+MathUtils.randDouble(-10, 10), f+MathUtils.randFloat(-5F, 5F), true);*/ + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + protected void writeEntityToNBT(final NBTTagCompound tag) + { + tag.setByte("Fuse", (byte)this.fuse); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + protected void readEntityFromNBT(final NBTTagCompound tag) + { + this.fuse = tag.getByte("Fuse"); + } + + /** + * returns null or the entityliving it was placed or ignited by + */ + @Override + public EntityLivingBase getTntPlacedBy() + { + return this.tntPlacedBy; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java b/src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java new file mode 100644 index 0000000000..ea667b8667 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java @@ -0,0 +1,247 @@ +package gtPlusPlus.core.entity; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class EntityTeleportFX extends Entity +{ + /** 'x' location the eye should float towards. */ + private double targetX; + /** 'y' location the eye should float towards. */ + private double targetY; + /** 'z' location the eye should float towards. */ + private double targetZ; + private int despawnTimer; + private boolean shatterOrDrop; + private static final String __OBFID = "CL_00001716"; + + public EntityTeleportFX(final World p_i1757_1_) + { + super(p_i1757_1_); + this.setSize(0.25F, 0.25F); + } + + @Override + protected void entityInit() {} + + /** + * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge + * length * 64 * renderDistanceWeight Args: distance + */ + @Override + @SideOnly(Side.CLIENT) + public boolean isInRangeToRenderDist(final double p_70112_1_) + { + double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D; + d1 *= 64.0D; + return p_70112_1_ < (d1 * d1); + } + + public EntityTeleportFX(final World p_i1758_1_, final double p_i1758_2_, final double p_i1758_4_, final double p_i1758_6_) + { + super(p_i1758_1_); + this.despawnTimer = 0; + this.setSize(0.25F, 0.25F); + this.setPosition(p_i1758_2_, p_i1758_4_, p_i1758_6_); + this.yOffset = 0.0F; + } + + /** + * The location the eye should float/move towards. Currently used for moving towards the nearest stronghold. Args: + * strongholdX, strongholdY, strongholdZ + */ + public void moveTowards(final double p_70220_1_, final int p_70220_3_, final double p_70220_4_) + { + final double d2 = p_70220_1_ - this.posX; + final double d3 = p_70220_4_ - this.posZ; + final float f = MathHelper.sqrt_double((d2 * d2) + (d3 * d3)); + + if (f > 12.0F) + { + this.targetX = this.posX + ((d2 / f) * 12.0D); + this.targetZ = this.posZ + ((d3 / f) * 12.0D); + this.targetY = this.posY + 8.0D; + } + else + { + this.targetX = p_70220_1_; + this.targetY = p_70220_3_; + this.targetZ = p_70220_4_; + } + + this.despawnTimer = 0; + this.shatterOrDrop = this.rand.nextInt(5) > 0; + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(final double p_70016_1_, final double p_70016_3_, final double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) + { + final float f = MathHelper.sqrt_double((p_70016_1_ * p_70016_1_) + (p_70016_5_ * p_70016_5_)); + this.prevRotationYaw = this.rotationYaw = (float)((Math.atan2(p_70016_1_, p_70016_5_) * 180.0D) / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)((Math.atan2(p_70016_3_, f) * 180.0D) / Math.PI); + } + } + + /** + * Called to update the entity's position/logic. + */ + @Override + public void onUpdate() + { + this.lastTickPosX = this.posX; + this.lastTickPosY = this.posY; + this.lastTickPosZ = this.posZ; + super.onUpdate(); + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + final float f = MathHelper.sqrt_double((this.motionX * this.motionX) + (this.motionZ * this.motionZ)); + this.rotationYaw = (float)((Math.atan2(this.motionX, this.motionZ) * 180.0D) / Math.PI); + + for (this.rotationPitch = (float)((Math.atan2(this.motionY, f) * 180.0D) / Math.PI); (this.rotationPitch - this.prevRotationPitch) < -180.0F; this.prevRotationPitch -= 360.0F) + { + ; + } + + while ((this.rotationPitch - this.prevRotationPitch) >= 180.0F) + { + this.prevRotationPitch += 360.0F; + } + + while ((this.rotationYaw - this.prevRotationYaw) < -180.0F) + { + this.prevRotationYaw -= 360.0F; + } + + while ((this.rotationYaw - this.prevRotationYaw) >= 180.0F) + { + this.prevRotationYaw += 360.0F; + } + + this.rotationPitch = this.prevRotationPitch + ((this.rotationPitch - this.prevRotationPitch) * 0.2F); + this.rotationYaw = this.prevRotationYaw + ((this.rotationYaw - this.prevRotationYaw) * 0.2F); + + if (!this.worldObj.isRemote) + { + final double d0 = this.targetX - this.posX; + final double d1 = this.targetZ - this.posZ; + final float f1 = (float)Math.sqrt((d0 * d0) + (d1 * d1)); + final float f2 = (float)Math.atan2(d1, d0); + double d2 = f + ((f1 - f) * 0.0025D); + + if (f1 < 1.0F) + { + d2 *= 0.8D; + this.motionY *= 0.8D; + } + + this.motionX = Math.cos(f2) * d2; + this.motionZ = Math.sin(f2) * d2; + + if (this.posY < this.targetY) + { + this.motionY += (1.0D - this.motionY) * 0.014999999664723873D; + } + else + { + this.motionY += (-1.0D - this.motionY) * 0.014999999664723873D; + } + } + + final float f3 = 0.25F; + + if (this.isInWater()) + { + for (int i = 0; i < 4; ++i) + { + this.worldObj.spawnParticle("bubble", this.posX - (this.motionX * f3), this.posY - (this.motionY * f3), this.posZ - (this.motionZ * f3), this.motionX, this.motionY, this.motionZ); + } + } + else + { + this.worldObj.spawnParticle("portal", ((this.posX - (this.motionX * f3)) + (this.rand.nextDouble() * 0.6D)) - 0.3D, this.posY - (this.motionY * f3) - 0.5D, ((this.posZ - (this.motionZ * f3)) + (this.rand.nextDouble() * 0.6D)) - 0.3D, this.motionX, this.motionY, this.motionZ); + } + + if (!this.worldObj.isRemote) + { + this.setPosition(this.posX, this.posY, this.posZ); + ++this.despawnTimer; + + if ((this.despawnTimer > 80) && !this.worldObj.isRemote) + { + this.setDead(); + + if (this.shatterOrDrop) + { + this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.ender_eye))); + } + else + { + this.worldObj.playAuxSFX(2003, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0); + } + } + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(final NBTTagCompound p_70014_1_) {} + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(final NBTTagCompound p_70037_1_) {} + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + /** + * Gets how bright this entity is. + */ + @Override + public float getBrightness(final float p_70013_1_) + { + return 1.0F; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(final float p_70070_1_) + { + return 15728880; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() + { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java b/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java new file mode 100644 index 0000000000..bf629bd147 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java @@ -0,0 +1,168 @@ +package gtPlusPlus.core.entity; +import java.util.List; +import java.util.Random; +import java.util.UUID; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.effect.EntityWeatherEffect; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.world.EnumDifficulty; +import net.minecraft.world.World; + +import gtPlusPlus.api.damage.DamageTeslaTower; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.util.minecraft.EntityUtils; + +public class EntityTeslaTowerLightning extends EntityWeatherEffect +{ + /** Declares which state the lightning bolt is in. Whether it's in the air, hit the ground, etc. */ + private int lightningState; + /** A random long that is used to change the vertex of the lightning rendered in RenderLightningBolt */ + public long boltVertex; + /** Determines the time before the EntityLightningBolt is destroyed. It is a random integer decremented over time. */ + private int boltLivingTime; + + private final UUID boltID; + private final UUID boltOwnerID; + + private final Entity boltValidDamageTarget; + + + public EntityTeslaTowerLightning(World p_i1703_1_, double p_i1703_2_, double p_i1703_4_, double p_i1703_6_, Entity valid, UUID owner) + { + super(p_i1703_1_); + Logger.INFO("Plasma Bolt - Created."); + Random rand = new XSTR(p_i1703_1_.getSeed()); + this.setLocationAndAngles(p_i1703_2_, p_i1703_4_, p_i1703_6_, 0.0F, 0.0F); + this.lightningState = 2; + this.boltVertex = rand.nextLong(); + this.boltLivingTime = (1) + rand.nextInt(3) + 1; + this.boltValidDamageTarget = valid; + this.boltID = UUID.randomUUID(); + this.boltOwnerID = owner; + + //Puts fires out + if (!p_i1703_1_.isRemote && p_i1703_1_.getGameRules().getGameRuleBooleanValue("doFireTick") && (p_i1703_1_.difficultySetting == EnumDifficulty.NORMAL || p_i1703_1_.difficultySetting == EnumDifficulty.HARD) && p_i1703_1_.doChunksNearChunkExist(MathHelper.floor_double(p_i1703_2_), MathHelper.floor_double(p_i1703_4_), MathHelper.floor_double(p_i1703_6_), 10)) + { + Logger.INFO("Plasma Bolt - Putting out fires?."); + int i = MathHelper.floor_double(p_i1703_2_); + int j = MathHelper.floor_double(p_i1703_4_); + int k = MathHelper.floor_double(p_i1703_6_); + + if (p_i1703_1_.getBlock(i, j, k).getMaterial() == Material.fire) + { + p_i1703_1_.setBlock(i, j, k, Blocks.air); + } + + for (i = 0; i < 4; ++i) + { + j = MathHelper.floor_double(p_i1703_2_) + rand.nextInt(3) - 1; + k = MathHelper.floor_double(p_i1703_4_) + rand.nextInt(3) - 1; + int l = MathHelper.floor_double(p_i1703_6_) + rand.nextInt(3) - 1; + + if (p_i1703_1_.getBlock(j, k, l).getMaterial() == Material.fire) + { + p_i1703_1_.setBlock(j, k, l, Blocks.air); + } + } + } + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + //Logger.INFO("Zap"); + super.onUpdate(); + Logger.INFO("Plasma Bolt - Tick."); + Random rand = new XSTR(this.worldObj.getSeed()); + + if (this.lightningState == 2) + { + Logger.INFO("Plasma Bolt - Playing Sound."); + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + rand.nextFloat() * 0.2F); + } + --this.lightningState; + + + if (this.lightningState >= 0) + { + Logger.INFO("Plasma Bolt - state >= 0."); + if (this.worldObj.isRemote) + { + Logger.INFO("Plasma Bolt - World is remote, resetting state to 2."); + this.worldObj.lastLightningBolt = 2; + } + else + { + Logger.INFO("Plasma Bolt - World is server side."); + double d0 = 3.0D; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getBoundingBox(this.posX - d0, this.posY - d0, this.posZ - d0, this.posX + d0, this.posY + 6.0D + d0, this.posZ + d0)); + + for (int l = 0; l < list.size(); ++l) + { + Entity entity = list.get(l); + if (this.boltValidDamageTarget.getUniqueID().equals(entity.getUniqueID())){ + if (!entity.getUniqueID().equals(boltOwnerID)){ + Logger.INFO("Plasma Bolt - Hurting Entity."); + Logger.INFO("Plasma Bolt - "+entity.getCommandSenderName()+"."); + //if (!net.minecraftforge.event.ForgeEventFactory.onEntityStruckByLightning(entity, this)) + EntityUtils.doFireDamage(entity, 5); + EntityUtils.doDamage(entity, new DamageTeslaTower(entity), 20); + } + } + } + + } + } + + if (this.lightningState < 0) + { + Logger.INFO("Plasma Bolt - state < 0."); + if (this.boltLivingTime == 0) + { + Logger.INFO("Plasma Bolt - setting dead."); + this.setDead(); + } + else if (this.lightningState < -rand.nextInt(10)) + { + Logger.INFO("Plasma Bolt - dunno."); + --this.boltLivingTime; + this.lightningState = 1; + this.boltVertex = rand.nextLong(); + //Puts fires out. + if (!this.worldObj.isRemote && this.worldObj.getGameRules().getGameRuleBooleanValue("doFireTick") && this.worldObj.doChunksNearChunkExist(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 10)) + { + Logger.INFO("Plasma Bolt - Putting fires out [2]."); + int i = MathHelper.floor_double(this.posX); + int j = MathHelper.floor_double(this.posY); + int k = MathHelper.floor_double(this.posZ); + + if (this.worldObj.getBlock(i, j, k).getMaterial() == Material.fire) + { + this.worldObj.setBlock(i, j, k, Blocks.air); + } + } + + } + } + } + + protected void entityInit() {} + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {} + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {} +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java new file mode 100644 index 0000000000..6b88d5775c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/InternalEntityRegistry.java @@ -0,0 +1,96 @@ +package gtPlusPlus.core.entity; + +import cpw.mods.fml.common.registry.EntityRegistry; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.australia.entity.type.EntityAustralianSpiderBase; +import gtPlusPlus.australia.entity.type.EntityBoar; +import gtPlusPlus.australia.entity.type.EntityDingo; +import gtPlusPlus.australia.entity.type.EntityOctopus; +import gtPlusPlus.core.entity.monster.EntityBatKing; +import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; +import gtPlusPlus.core.entity.monster.EntitySickBlaze; +import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; +import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion; +import gtPlusPlus.core.entity.projectile.EntityLightningAttack; +import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; +import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; +import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; +import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg; +import gtPlusPlus.core.util.Utils; + +public class InternalEntityRegistry { + + static int mEntityID = 0; + + public static void registerEntities(){ + Logger.INFO("Registering GT++ Entities."); + + //EntityRegistry.registerGlobalEntityID(EntityPrimedMiningExplosive.class, "MiningCharge", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(125, 125, 125)); + EntityRegistry.registerModEntity(EntityPrimedMiningExplosive.class, "MiningCharge", mEntityID++, GTplusplus.instance, 64, 20, true); + + //EntityRegistry.registerGlobalEntityID(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(200, 0, 200), Utils.rgbtoHexValue(125, 125, 125)); + EntityRegistry.registerModEntity(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", mEntityID++, GTplusplus.instance, 64, 20, true); + + + //EntityRegistry.registerGlobalEntityID(EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 0, 0), Utils.rgbtoHexValue(255, 255, 255)); + EntityRegistry.registerModEntity(EntityHydrofluoricAcidPotion.class, "throwablePotionHydrofluoric", mEntityID++, GTplusplus.instance, 64, 20, true); + + + //EntityRegistry.registerGlobalEntityID(EntityToxinballSmall.class, "toxinBall", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 25, 0), Utils.rgbtoHexValue(0, 125, 0)); + EntityRegistry.registerModEntity(EntityToxinballSmall.class, "toxinBall", mEntityID++, GTplusplus.instance, 64, 20, true); + + + //EntityRegistry.registerGlobalEntityID(EntityStaballoyConstruct.class, "constructStaballoy", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 75, 0), Utils.rgbtoHexValue(50, 220, 50)); + EntityRegistry.registerModEntity(EntityStaballoyConstruct.class, "constructStaballoy", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(0, "constructStaballoy", Utils.rgbtoHexValue(20, 200, 20), Utils.rgbtoHexValue(20, 20, 20)); + + //EntityRegistry.registerGlobalEntityID(EntitySickBlaze.class, "sickBlaze", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(0, 75, 0), Utils.rgbtoHexValue(75, 175, 75)); + EntityRegistry.registerModEntity(EntitySickBlaze.class, "sickBlaze", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(1, "sickBlaze", Utils.rgbtoHexValue(40, 180, 40), Utils.rgbtoHexValue(75, 75, 75)); + + //EntityRegistry.registerGlobalEntityID(EntityTeslaTowerLightning.class, "plasmaBolt", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(125, 125, 125)); + EntityRegistry.registerModEntity(EntityTeslaTowerLightning.class, "plasmaBolt", mEntityID++, GTplusplus.instance, 64, 5, true); + + EntityRegistry.registerModEntity(EntityThrowableBomb.class, "EntityThrowableBomb", mEntityID++, GTplusplus.instance, 64, 10, true); + + EntityRegistry.registerModEntity(EntityLightningAttack.class, "EntityLightningAttack", mEntityID++, GTplusplus.instance, 64, 20, true); + + /** + * Globals, which generate spawn eggs. (Currently required for Giant chicken spawning) + */ + + EntityRegistry.registerModEntity(EntityGiantChickenBase.class, "bigChickenFriendly", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(2, "bigChickenFriendly", Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); + EntityRegistry.registerModEntity(EntityBatKing.class, "batKing", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(3, "batKing", Utils.rgbtoHexValue(175, 175, 0), Utils.rgbtoHexValue(0, 175, 175)); + //EntityRegistry.registerModEntity(EntityGiantChickenBase.class, "bigChickenFriendly", mEntityID++, GTplusplus.instance, 64, 20, true); + + + + + + //Australia + EntityRegistry.registerModEntity(EntityAustralianSpiderBase.class, "AusSpider", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(30, "AusSpider", Utils.rgbtoHexValue(125, 0, 125), Utils.rgbtoHexValue(175, 175, 175)); + EntityRegistry.registerModEntity(EntityBoar.class, "AusBoar", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(31, "AusBoar", Utils.rgbtoHexValue(75, 75, 0), Utils.rgbtoHexValue(175, 175, 75)); + EntityRegistry.registerModEntity(EntityDingo.class, "AusDingo", mEntityID++, GTplusplus.instance, 64, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(32, "AusDingo", Utils.rgbtoHexValue(175, 125, 0), Utils.rgbtoHexValue(175, 75, 175)); + EntityRegistry.registerModEntity(EntityOctopus.class, "AusOctopus", mEntityID++, GTplusplus.instance, 32, 20, true); + ItemCustomSpawnEgg.registerEntityForSpawnEgg(33, "AusOctopus", Utils.rgbtoHexValue(150, 50, 150), Utils.rgbtoHexValue(75, 175, 175)); + //EntityRegistry.registerGlobalEntityID(EntityAustralianSpiderBase.class, "AusSpider", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); + //EntityRegistry.registerGlobalEntityID(EntityBoar.class, "AusBoar", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); + //EntityRegistry.registerGlobalEntityID(EntityDingo.class, "AusDingo", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); + //EntityRegistry.registerGlobalEntityID(EntityOctopus.class, "AusOctopus", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175)); + + + + + + + + } + +} diff --git a/src/main/java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java b/src/main/java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java new file mode 100644 index 0000000000..52d1d6100c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/ai/batking/EntityAIBatKingAttack.java @@ -0,0 +1,406 @@ +package gtPlusPlus.core.entity.ai.batking; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.entity.monster.EntityBatKing; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IRangedAttackMob; +import net.minecraft.entity.ai.EntityAIBase; +import net.minecraft.pathfinding.PathEntity; +import net.minecraft.pathfinding.PathPoint; +import net.minecraft.util.MathHelper; + +public class EntityAIBatKingAttack extends EntityAIBase { + + private final Ranged mRangedAI; + private final Melee mMeleeAI; + private boolean mIsMelee = false; + + /** The Bat King in control of this AI. */ + private final EntityBatKing mAttackingEntity; + + /** The PathEntity of our entity. */ + private PathEntity mEntityPathEntity; + + /** The current target of Bat King in control of this AI. */ + private EntityLivingBase mEntityTarget; + + private final Class mClassTarget; + + public EntityAIBatKingAttack(EntityBatKing aAttacker, Class aClassTarget, + double aMovementSpeed, int someInt, int aMaxRangedAttackTime, float someFloat, boolean aLongMemory) { + mRangedAI = new Ranged(this, aMovementSpeed, someInt, 5, someFloat); + mMeleeAI = new Melee(this, aClassTarget, aMovementSpeed, aLongMemory); + mAttackingEntity = aAttacker; + mClassTarget = aClassTarget; + } + + @Override + public boolean shouldExecute() { + determineCombatStyle(); + EntityLivingBase entitylivingbase = this.mAttackingEntity.getAttackTarget(); + if (entitylivingbase == null) { + this.mEntityTarget = null; + return false; + } else if (!entitylivingbase.isEntityAlive()) { + return false; + } else if (this.mClassTarget != null && !this.mClassTarget.isAssignableFrom(entitylivingbase.getClass())) { + return false; + } else { + if (this.mIsMelee) { + return this.mMeleeAI.shouldExecute(); + } + else { + this.mEntityTarget = entitylivingbase; + this.mEntityPathEntity = this.mAttackingEntity.getNavigator().getPathToEntityLiving(entitylivingbase); + return mRangedAI != null && mMeleeAI != null && hasValidTarget(); + } + } + } + + public EntityBatKing getBatKing() { + return this.mAttackingEntity; + } + + public IRangedAttackMob getBatKingAsIRangedAttackMob() { + return this.mAttackingEntity; + } + + public boolean hasValidTarget() { + return this.mEntityTarget != null; + } + + public EntityLivingBase getTarget() { + return mEntityTarget; + } + + @Override + public boolean continueExecuting() { + determineCombatStyle(); + if (mIsMelee) { + return mMeleeAI.continueExecuting(); + } else { + return mRangedAI.continueExecuting(); + } + } + + @Override + public boolean isInterruptible() { + if (mIsMelee) { + + } else { + + } + return super.isInterruptible(); + } + + @Override + public void startExecuting() { + determineCombatStyle(); + if (mIsMelee) { + mMeleeAI.startExecuting(); + } else { + mRangedAI.startExecuting(); + } + } + + @Override + public void resetTask() { + determineCombatStyle(); + if (mIsMelee) { + mMeleeAI.resetTask(); + } else { + mRangedAI.resetTask(); + } + } + + @Override + public void updateTask() { + determineCombatStyle(); + if (mIsMelee) { + mMeleeAI.updateTask(); + } else { + mRangedAI.updateTask(); + } + } + + + private final void determineCombatStyle() { + boolean aisMeleeNow = this.mIsMelee; + if (this.mEntityTarget != null && EntityUtils.getDistance(getBatKing(), mEntityTarget) < 4) { + this.mIsMelee = true; + } + else { + this.mIsMelee = false; + } + if (aisMeleeNow != this.mIsMelee) { + Logger.INFO("Bat King changed combat style from "+(aisMeleeNow ? "Melee" : "Ranged")+" to "+(this.mIsMelee ? "Melee" : "Ranged")); + } + } + + private class Ranged { + + private final EntityAIBatKingAttack parentAI; + + /** + * A decrementing tick that spawns a ranged attack once this value reaches 0. It + * is then set back to the maxRangedAttackTime. + */ + private int rangedAttackTime; + private double entityMoveSpeed; + private int mCooldownTime; + private int field_96561_g; + /** + * The maximum time the AI has to wait before performing another ranged attack. + */ + private int maxRangedAttackTime; + private float field_96562_i; + private float field_82642_h; //Max range + + public Ranged(EntityAIBatKingAttack aParent, double aMovementSpeed, int someInt, + int aMaxRangedAttackTime, float someFloat) { + this.rangedAttackTime = -1; + this.parentAI = aParent; + this.entityMoveSpeed = aMovementSpeed; + this.field_96561_g = someInt; + this.maxRangedAttackTime = aMaxRangedAttackTime; + this.field_96562_i = someFloat; + this.field_82642_h = someFloat * someFloat * 8; + parentAI.setMutexBits(3); + + } + + /** + * Execute a one shot task or start executing a continuous task + */ + public void startExecuting() { + parentAI.getBatKing().getNavigator().setPath(parentAI.mEntityPathEntity, this.entityMoveSpeed); + } + + /** + * Returns whether an in-progress EntityAIBase should continue executing + */ + public boolean continueExecuting() { + return parentAI.shouldExecute() || !parentAI.getBatKing().getNavigator().noPath(); + } + + /** + * Resets the task + */ + public void resetTask() { + parentAI.mEntityTarget = null; + this.mCooldownTime = 0; + this.rangedAttackTime = -1; + } + + /** + * Updates the task + */ + public void updateTask() { + + if (MathUtils.randInt(0, 100) == 0) { + maxRangedAttackTime = MathUtils.balance(maxRangedAttackTime, 20, 40); + } + + double d0 = parentAI.getBatKing().getDistanceSq(parentAI.mEntityTarget.posX, parentAI.mEntityTarget.boundingBox.minY, + parentAI.mEntityTarget.posZ); + boolean flag = parentAI.getBatKing().getEntitySenses().canSee(parentAI.mEntityTarget); + + if (flag) { + ++this.mCooldownTime; + } else { + this.mCooldownTime = 0; + } + + if (d0 <= (double) this.field_82642_h && this.mCooldownTime >= 20) { + parentAI.getBatKing().getNavigator().clearPathEntity(); + } else { + if (parentAI.getBatKing().getNavigator().tryMoveToEntityLiving(parentAI.mEntityTarget, this.entityMoveSpeed)) { + Logger.INFO("Doing Ranged Ai Task."); + } + else { + Logger.INFO("Not Doing Ranged Ai Task."); + } + } + + parentAI.getBatKing().getLookHelper().setLookPositionWithEntity(parentAI.mEntityTarget, 30.0F, 30.0F); + float f; + Logger.INFO("Ranged AI - "+rangedAttackTime); + + if (--this.rangedAttackTime == 0) { + if (d0 > (double) this.field_82642_h || !flag) { + Logger.INFO("Stopping ranged attack. "+flag+"|"+(d0 > (double) this.field_82642_h)+"|"+d0+"|"+(double) this.field_82642_h); + return; + } + + f = MathHelper.sqrt_double(d0) / this.field_96562_i; + float f1 = f; + + if (f < 0.1F) { + f1 = 0.1F; + } + + if (f1 > 1.0F) { + f1 = 1.0F; + } + Logger.INFO("Trying to do a ranged attack."); + parentAI.getBatKingAsIRangedAttackMob().attackEntityWithRangedAttack(parentAI.mEntityTarget, f1); + this.rangedAttackTime = MathHelper.floor_float( + f * (float) (this.maxRangedAttackTime - this.field_96561_g) + (float) this.field_96561_g); + } else if (this.rangedAttackTime < 0) { + f = MathHelper.sqrt_double(d0) / this.field_96562_i; + this.rangedAttackTime = MathHelper.floor_float( + f * (float) (this.maxRangedAttackTime - this.field_96561_g) + (float) this.field_96561_g); + } + } + + } + + private class Melee { + + private final EntityAIBatKingAttack parentAI; + + /** + * An amount of decrementing ticks that allows the entity to attack once the + * tick reaches 0. + */ + int attackTick; + /** The speed with which the mob will approach the target */ + double speedTowardsTarget; + /** + * When true, the mob will continue chasing its target, even if it can't find a + * path to them right now. + */ + boolean longMemory; + Class classTarget; + private int field_75445_i; + private double field_151497_i; + private double field_151495_j; + private double field_151496_k; + + private int failedPathFindingPenalty; + + public Melee(EntityAIBatKingAttack aParent, Class aClassTarget, + double aMoveToTargetSpeed, boolean aLongMemory) { + this.parentAI = aParent; + this.classTarget = aClassTarget; + this.speedTowardsTarget = aMoveToTargetSpeed; + this.longMemory = aLongMemory; + parentAI.setMutexBits(3); + } + + /** + * Returns whether the EntityAIBase should begin execution. + */ + public boolean shouldExecute() { + if (!parentAI.hasValidTarget()) { + return false; + } + EntityLivingBase entitylivingbase = parentAI.getTarget(); + + if (entitylivingbase == null) { + return false; + } else if (!entitylivingbase.isEntityAlive()) { + return false; + } else if (this.classTarget != null && !this.classTarget.isAssignableFrom(entitylivingbase.getClass())) { + return false; + } else { + if (--this.field_75445_i <= 0) { + parentAI.mEntityPathEntity = parentAI.mAttackingEntity.getNavigator().getPathToEntityLiving(entitylivingbase); + this.field_75445_i = 4 + parentAI.mAttackingEntity.getRNG().nextInt(7); + return parentAI.mEntityPathEntity != null; + } else { + return true; + } + } + } + + /** + * Returns whether an in-progress EntityAIBase should continue executing + */ + public boolean continueExecuting() { + EntityLivingBase entitylivingbase = parentAI.mAttackingEntity.getAttackTarget(); + return entitylivingbase == null ? false + : (!entitylivingbase.isEntityAlive() ? false + : (!this.longMemory ? !parentAI.mAttackingEntity.getNavigator().noPath() + : parentAI.mAttackingEntity.isWithinHomeDistance(MathHelper.floor_double(entitylivingbase.posX), + MathHelper.floor_double(entitylivingbase.posY), + MathHelper.floor_double(entitylivingbase.posZ)))); + } + + /** + * Execute a one shot task or start executing a continuous task + */ + public void startExecuting() { + parentAI.mAttackingEntity.getNavigator().setPath(parentAI.mEntityPathEntity, this.speedTowardsTarget); + this.field_75445_i = 0; + } + + /** + * Resets the task + */ + public void resetTask() { + parentAI.mAttackingEntity.getNavigator().clearPathEntity(); + } + + /** + * Updates the task + */ + public void updateTask() { + EntityLivingBase entitylivingbase = parentAI.mAttackingEntity.getAttackTarget(); + parentAI.mAttackingEntity.getLookHelper().setLookPositionWithEntity(entitylivingbase, 30.0F, 30.0F); + double d0 = parentAI.mAttackingEntity.getDistanceSq(entitylivingbase.posX, entitylivingbase.boundingBox.minY, + entitylivingbase.posZ); + double d1 = (double) (parentAI.mAttackingEntity.width * 2.0F * parentAI.mAttackingEntity.width * 2.0F + entitylivingbase.width); + --this.field_75445_i; + + if ((this.longMemory || parentAI.mAttackingEntity.getEntitySenses().canSee(entitylivingbase)) && this.field_75445_i <= 0 + && (this.field_151497_i == 0.0D && this.field_151495_j == 0.0D && this.field_151496_k == 0.0D + || entitylivingbase.getDistanceSq(this.field_151497_i, this.field_151495_j, + this.field_151496_k) >= 1.0D + || parentAI.mAttackingEntity.getRNG().nextFloat() < 0.05F)) { + this.field_151497_i = entitylivingbase.posX; + this.field_151495_j = entitylivingbase.boundingBox.minY; + this.field_151496_k = entitylivingbase.posZ; + this.field_75445_i = failedPathFindingPenalty + 4 + parentAI.mAttackingEntity.getRNG().nextInt(7); + + if (parentAI.mAttackingEntity.getNavigator().getPath() != null) { + PathPoint finalPathPoint = parentAI.mAttackingEntity.getNavigator().getPath().getFinalPathPoint(); + if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, + finalPathPoint.yCoord, finalPathPoint.zCoord) < 1) { + failedPathFindingPenalty = 0; + } else { + failedPathFindingPenalty += 10; + } + } else { + failedPathFindingPenalty += 10; + } + + if (d0 > 1024.0D) { + this.field_75445_i += 10; + } else if (d0 > 256.0D) { + this.field_75445_i += 5; + } + + if (!parentAI.mAttackingEntity.getNavigator().tryMoveToEntityLiving(entitylivingbase, this.speedTowardsTarget)) { + this.field_75445_i += 15; + } + } + + this.attackTick = Math.max(this.attackTick - 1, 0); + + if (d0 <= d1 && this.attackTick <= 20) { + this.attackTick = 20; + + if (parentAI.mAttackingEntity.getHeldItem() != null) { + parentAI.mAttackingEntity.swingItem(); + } + + parentAI.mAttackingEntity.attackEntityAsMob(entitylivingbase); + } + } + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java b/src/main/java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java new file mode 100644 index 0000000000..8e0b1b48ce --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/item/ItemEntityGiantEgg.java @@ -0,0 +1,117 @@ +package gtPlusPlus.core.entity.item; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; + +public class ItemEntityGiantEgg extends EntityItem { + + /** + * The maximum age of this Chicken Egg. The item will try hatch once this is reached. + */ + public int mEggAge = 10000; + public int mEggSize = -1; + + public ItemEntityGiantEgg(World aWorld) { + super(aWorld); + } + + public ItemEntityGiantEgg(World aWorld, double aX, double aY, double aZ) { + super(aWorld, aX, aY, aZ); + } + + public ItemEntityGiantEgg(World aWorld, double aX, double aY, double aZ, ItemStack aStack) { + super(aWorld, aX, aY, aZ, aStack); + } + + private boolean spawnGiantChicken() { + try { + EntityGiantChickenBase entitychicken = new EntityGiantChickenBase(this.worldObj); + entitychicken.setGrowingAge(-MathUtils.randInt(20000, 40000)); + entitychicken.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); + return this.worldObj.spawnEntityInWorld(entitychicken); + } + catch (Throwable t) { + return false; + } + } + + //These eggs also do not combine. + @Override + public boolean combineItems(EntityItem p_70289_1_) { + return false; + } + + @Override + public void writeEntityToNBT(NBTTagCompound aNBT) { + super.writeEntityToNBT(aNBT); + aNBT.setInteger("mEggAge", mEggAge); + aNBT.setInteger("mTicksExisted", this.age); + } + + @Override + public void readEntityFromNBT(NBTTagCompound aNBT) { + super.readEntityFromNBT(aNBT); + mEggAge = aNBT.getInteger("mEggAge"); + } + + //They're fireproof + @Override + public void setFire(int p_70015_1_) { + } + + @Override + public boolean isBurning() { + return false; + } + + @Override + public void onEntityUpdate() { + super.onEntityUpdate(); + Logger.INFO("1"); + //Large eggs don't despawn, because they will try hatch first. + if (this.lifespan != Integer.MAX_VALUE-1) { + this.lifespan = Integer.MAX_VALUE-1; + } + + if (this.getEntityItem() != null) { + ItemStack g = this.getEntityItem(); + NBTUtils.setInteger(g, "mTicksExisted", this.age); + NBTUtils.setInteger(g, "lifespan", this.lifespan); + NBTUtils.setBoolean(g, "playerHeld", false); + this.setEntityItemStack(g); + Logger.INFO("Writing age to NBT of stored stack item."); + } + else { + ItemStack g = ItemUtils.getSimpleStack(ModItems.itemBigEgg); + NBTUtils.setInteger(g, "mTicksExisted", this.age); + NBTUtils.setInteger(g, "lifespan", this.lifespan); + NBTUtils.setBoolean(g, "playerHeld", false); + this.setEntityItemStack(g); + Logger.INFO("Writing age to NBT of new stack item."); + + } + + if (this.age >= 1000) { + //Cache the value for efficiency + if (mEggSize == -1) + mEggSize = (this.getEntityItem() != null ? (this.getEntityItem().hasTagCompound() ? (this.getEntityItem().getTagCompound().hasKey("size") ? this.getEntityItem().getTagCompound().getInteger("size") : 1) : 1) : 1); + if (MathUtils.randInt(100*mEggSize, 1000) >= MathUtils.randInt(950, 1000)) { + //Spawn Chicken + if (spawnGiantChicken()) { + this.kill(); + } + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java b/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java new file mode 100644 index 0000000000..55e0f4c571 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java @@ -0,0 +1,712 @@ +package gtPlusPlus.core.entity.monster; + +import java.lang.reflect.Field; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.entity.ai.batking.EntityAIBatKingAttack; +import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureAttribute; +import net.minecraft.entity.IRangedAttackMob; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.EntityAIAttackOnCollide; +import net.minecraft.entity.ai.EntityAIHurtByTarget; +import net.minecraft.entity.ai.EntityAINearestAttackableTarget; +import net.minecraft.entity.ai.EntityAIWander; +import net.minecraft.entity.ai.RandomPositionGenerator; +import net.minecraft.entity.monster.EntityMob; +import net.minecraft.entity.passive.EntityBat; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.entity.projectile.EntityLargeFireball; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.Vec3; +import net.minecraft.world.EnumDifficulty; +import net.minecraft.world.World; + +public class EntityBatKing extends EntityMob implements IRangedAttackMob { + + public int courseChangeCooldown; + public double waypointX; + public double waypointY; + public double waypointZ; + private Entity targetedEntity; + private int aggroCooldown; + public int prevAttackCounter; + public int attackCounter; + private int explosionStrength = 1; + + private EntityAIBatKingAttack aiAttack = new EntityAIBatKingAttack(this, null, 1.0D, 20, 60, 15.0F, true); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, + false); + + public EntityBatKing(World p_i1680_1_) { + super(p_i1680_1_); + this.setSize(2.5F, 1.5F); + + this.setIsBatHanging(false); + this.isImmuneToFire = true; + this.experienceValue = 1000; + + this.tasks.addTask(3, this.aiAttack); + //this.tasks.addTask(4, this.aiAttackOnCollide); + //this.tasks.addTask(4, new EntityAIRestrictSun(this)); + //this.tasks.addTask(5, new EntityAIFleeSun(this, 1.0D)); + this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); + //this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); + //this.tasks.addTask(6, new EntityAILookIdle(this)); + + this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); + //this.targetTasks.addTask(2, this.aiAttack); + this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); + this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityBat.class, 0, false)); + + } + + protected void entityInit() { + super.entityInit(); + } + + /** + * Get this Entity's EnumCreatureAttribute + */ + public EnumCreatureAttribute getCreatureAttribute() { + return EnumCreatureAttribute.UNDEAD; + } + + /** + * Gets the pitch of living sounds in living entities. + */ + protected float getSoundPitch() { + return super.getSoundPitch() * 0.15F; + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() { + int aRand = MathUtils.randInt(0, 10); + if (aRand < 6) { + return null; + } else if (aRand <= 8) { + return "mob.bat.idle"; + } else { + 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.bat.death"; + } + + /** + * Returns true if this entity should push and be pushed by other entities when + * colliding. + */ + public boolean canBePushed() { + return true; + } + + protected void collideWithEntity(Entity aEntity) { + if (aEntity != null) { + if (aEntity instanceof EntityPlayer) { + EntityUtils.doDamage(aEntity, DamageSource.magic, (int) (((EntityPlayer) aEntity).getHealth() / 20)); + } + } + } + + protected void collideWithNearbyEntities() { + } + + protected void applyEntityAttributes() { + + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.maxHealth); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.attackDamage); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.knockbackResistance); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.movementSpeed); + this.getAttributeMap().registerAttribute(SharedMonsterAttributes.followRange); + + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(250.0D); + this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(6.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D); + this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(120.0D); + } + + public boolean getIsBatHanging() { + return false; + } + + public void setIsBatHanging(boolean p_82236_1_) { + generateParticles(this); + generateParticles(this); + generateParticles(this); + for (int i = 0; i < 32; ++i) { + // + String particleName = "lava"; + if (MathUtils.randInt(0, 3) <= 2) { + particleName = "crit"; + } + this.worldObj.spawnParticle(particleName, + this.posX + (this.rand.nextDouble() - 0.5D) * (double) this.width, + this.posY + this.rand.nextDouble() * (double) this.height, + this.posZ + (this.rand.nextDouble() - 0.5D) * (double) this.width, 0.0D, 0.0D, 0.0D); + } + + } + + /** + * Returns true if the newer Entity AI code should be run + */ + protected boolean isAIEnabled() { + return true; + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() { + super.onUpdate(); + generateParticles(this); + + if (!this.worldObj.isRemote && (this.targetedEntity == null || this.aggroCooldown-- <= 0)) { + this.targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(this, 100.0D); + + if (this.targetedEntity != null) { + this.aggroCooldown = 30; + if (aiAttack.hasValidTarget()) { + this.setAttackTarget(aiAttack.getTarget()); + } + else { + Logger.INFO("No valid target."); + if (ReflectionUtils.doesFieldExist(aiAttack.getClass(), "mEntityTarget")) { + Logger.INFO("Found field."); + } + else { + Logger.INFO("Did not find field."); + } + Field target = ReflectionUtils.getField(EntityAIBatKingAttack.class, "mEntityTarget"); + if (target != null) { + ReflectionUtils.setField(aiAttack, target, this.targetedEntity); + Logger.INFO("Set target."); + } + else { + Logger.INFO("Could not set via reflection."); + } + + + } + } + else { + Vec3 vec3 = RandomPositionGenerator.findRandomTarget(this, 32, 20); + if (vec3 != null) { + double xPosition = vec3.xCoord; + double yPosition = vec3.yCoord; + double zPosition = vec3.zCoord; + this.getNavigator().tryMoveToXYZ(xPosition, yPosition, zPosition, 3); + } + } + } + + } + + private static void generateParticles(EntityBatKing aKing) { + for (int i = 0; i < 20; ++i) { + // + if (MathUtils.randInt(0, 50) <= 1) { + String particleName = "smoke"; + if (MathUtils.randInt(0, 3) <= 2) { + particleName = "largesmoke"; + } + aKing.worldObj.spawnParticle(particleName, + aKing.posX + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, + aKing.posY + aKing.rand.nextDouble() * (double) aKing.height, + aKing.posZ + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, 0.0D, 0.0D, 0.0D); + } + if (MathUtils.randInt(0, 100) <= 1) { + String particleName = "smoke"; + int test2 = MathUtils.randInt(0, 3); + if (test2 == 2) { + particleName = "dripLava"; + } else if (test2 == 3) { + particleName = "portal"; + } + aKing.worldObj.spawnParticle(particleName, + aKing.posX + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, + aKing.posY + aKing.rand.nextDouble() * (double) aKing.height, + aKing.posZ + (aKing.rand.nextDouble() - 0.5D) * (double) aKing.width, 0.0D, 0.0D, 0.0D); + } + } + } + + protected void updateAITasks() { + super.updateAITasks(); + } + + private boolean isFlying() { + if (this.onGround) { + return false; + } + return true; + } + + private boolean hasAir() { + BlockPos p = EntityUtils.findBlockPosUnderEntity(this); + int y = p.yPos; + int yOriginal = p.yPos; + + for (int u = 0; u<5;u++) { + if (u > 50 || y <= 0) { + break; + } + if (!this.worldObj.isAirBlock(p.xPos, y, p.zPos)) { + break; + } + y--; + } + if (yOriginal != y) { + for (int i = 0; i < y; y++) { + this.jump(); + } + return true; + } + return false; + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk + * on. used for spiders and wolves to prevent them from trampling crops + */ + protected boolean canTriggerWalking() { + return false; + } + + /** + * Return whether this entity should NOT trigger a pressure plate or a tripwire. + */ + public boolean doesEntityNotTriggerPressurePlate() { + return true; + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { + if (this.isEntityInvulnerable()) { + return false; + } else { + if (!this.worldObj.isRemote && this.getIsBatHanging()) { + this.setIsBatHanging(false); + } + + return super.attackEntityFrom(p_70097_1_, p_70097_2_); + } + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { + super.readEntityFromNBT(p_70037_1_); + if (p_70037_1_.hasKey("ExplosionPower", 99)) { + this.explosionStrength = p_70037_1_.getInteger("ExplosionPower"); + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { + super.writeEntityToNBT(p_70014_1_); + p_70014_1_.setInteger("ExplosionPower", this.explosionStrength); + } + + /** + * Attack the specified entity using a ranged attack. + */ + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + Logger.INFO("Trying to do ranged attack 1 |"+(this.targetedEntity != null)+"|"); + + if (!this.isFlying() || !this.isAirBorne) { + //this.hasAir(); + /* + * for (int i=0;i<3;i++) { this.jump(); } + */ + } + + + double d4 = 64.0D; + if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4 * 8) { + Logger.INFO("Trying to do ranged attack 2"); + 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; + + ++this.attackCounter; + + if (this.canEntityBeSeen(this.targetedEntity)) { + Logger.INFO("Trying to do ranged attack 3a | "+attackCounter); + + + if (this.attackCounter >= 2) { + Logger.INFO("Trying to do ranged attack 3a1"); + + this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY, + (int) this.posZ, 0); + setIsBatHanging(true); + + EntityThrowableBomb entitylargefireball = new EntityThrowableBomb(this.worldObj, this/*d5, d6, d7*/); + //entitylargefireball.field_92057_e = this.explosionStrength; + //entitylargefireball.accelerationX *= 2; + //entitylargefireball.accelerationY *= 2; + //entitylargefireball.accelerationZ *= 2; + double d8 = 4.0D; + Vec3 vec3 = this.getLook(1.0F); + entitylargefireball.posX = this.posX + vec3.xCoord * d8; + entitylargefireball.posY = this.posY + (double) (this.height / 2.0F) + 0.5D; + entitylargefireball.posZ = this.posZ + vec3.zCoord * d8; + this.worldObj.spawnEntityInWorld(entitylargefireball); + + for (int u=0; u 0) { + Logger.INFO("Trying to do ranged attack 5a"); + --this.attackCounter; + EntityArrow entityarrow = new EntityArrow(this.worldObj, this, p_82196_1_, MathUtils.randFloat(1f, 3f), + (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); + int i = MathUtils.randInt(0, 4); + int j = MathUtils.randInt(0, 3); + int k = MathUtils.randInt(0, 3); + entityarrow.setDamage((double) (p_82196_2_ * 2.0F) + this.rand.nextGaussian() * 0.25D + + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); + + boolean boostAttack = MathUtils.randInt(0, 100) <= 21; + if (boostAttack) { + if (i > 0) { + entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D); + } + + if (j > 0) { + entityarrow.setKnockbackStrength(j); + } + if (k > 0) { + entityarrow.setFire(50 * k); + } + } + + this.playSound("mob.skeleton.say", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); + this.worldObj.spawnEntityInWorld(entityarrow); + Logger.INFO("Trying to do ranged attack 5a done"); + } + } + + + + + this.attackCounter = 0; + } + } else if (this.attackCounter > 0) { + Logger.INFO("Trying to do ranged attack 3b"); + --this.attackCounter; + } + } else { + Logger.INFO("Trying to do ranged attack 4a"); + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(this.motionX, this.motionZ)) * 180.0F + / (float) Math.PI; + + if (this.attackCounter > 0) { + Logger.INFO("Trying to do ranged attack 5a"); + --this.attackCounter; + EntityArrow entityarrow = new EntityArrow(this.worldObj, this, p_82196_1_, 1.6F, + (float) (14 - this.worldObj.difficultySetting.getDifficultyId() * 4)); + int i = MathUtils.randInt(0, 4); + int j = MathUtils.randInt(0, 3); + int k = MathUtils.randInt(0, 3); + entityarrow.setDamage((double) (p_82196_2_ * 2.0F) + this.rand.nextGaussian() * 0.25D + + (double) ((float) this.worldObj.difficultySetting.getDifficultyId() * 0.11F)); + + boolean boostAttack = MathUtils.randInt(0, 100) <= 21; + if (boostAttack) { + if (i > 0) { + entityarrow.setDamage(entityarrow.getDamage() + (double) i * 0.5D + 0.5D); + } + + if (j > 0) { + entityarrow.setKnockbackStrength(j); + } + if (k > 0) { + entityarrow.setFire(50 * k); + } + } + + this.playSound("mob.skeleton.say", 1.0F, 1.0F / (this.getRNG().nextFloat() * 0.4F + 0.8F)); + this.worldObj.spawnEntityInWorld(entityarrow); + Logger.INFO("Trying to do ranged attack 5a done"); + } + + } + + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() { + return 10.0F; + } + + /** + * Checks if the entity's current position is a valid location to spawn this + * entity. + */ + public boolean getCanSpawnHere() { + return super.getCanSpawnHere() && this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL; + } + + /** + * Will return how many at most can spawn in a chunk at once. + */ + public int getMaxSpawnedInChunk() { + return 1; + } + + protected Item getDropItem() { + return Items.gunpowder; + } + + /** + * Drop 0-2 items of this living's type. @param par1 - Whether this entity has + * recently been hit by a player. @param par2 - Level of Looting used to kill + * this mob. + */ + protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { + int j = this.rand.nextInt(2) + this.rand.nextInt(1 + p_70628_2_); + int k; + + for (k = 0; k < j; ++k) { + this.dropItem(Items.ghast_tear, 1); + } + + j = this.rand.nextInt(3) + this.rand.nextInt(1 + p_70628_2_); + + for (k = 0; k < j; ++k) { + this.dropItem(Items.gunpowder, 1); + } + } + + @Override + protected void updateEntityActionState() { + if (!this.worldObj.isRemote && this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL) { + this.setDead(); + } + + this.despawnEntity(); + 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; + this.waypointY = this.posY; + this.waypointZ = this.posZ; + } + } + + if (this.targetedEntity != null && this.targetedEntity.isDead) { + this.targetedEntity = null; + } + + if (this.targetedEntity == null || this.aggroCooldown-- <= 0) { + this.targetedEntity = this.worldObj.getClosestVulnerablePlayerToEntity(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.canEntityBeSeen(this.targetedEntity)) { + if (this.attackCounter == 10) { + this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1007, (int) this.posX, (int) this.posY, + (int) this.posZ, 0); + } + + ++this.attackCounter; + + if (this.attackCounter == 20) { + this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1008, (int) this.posX, (int) this.posY, + (int) this.posZ, 0); + EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.worldObj, this, d5, d6, d7); + entitylargefireball.field_92057_e = this.explosionStrength; + double d8 = 4.0D; + Vec3 vec3 = this.getLook(1.0F); + entitylargefireball.posX = this.posX + vec3.xCoord * d8; + entitylargefireball.posY = this.posY + (double) (this.height / 2.0F) + 0.5D; + entitylargefireball.posZ = this.posZ + vec3.zCoord * d8; + this.worldObj.spawnEntityInWorld(entitylargefireball); + this.attackCounter = -40; + } + } else if (this.attackCounter > 0) { + --this.attackCounter; + } + } else { + this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(this.motionX, this.motionZ)) * 180.0F + / (float) Math.PI; + + if (this.attackCounter > 0) { + --this.attackCounter; + } + } + + if (!this.worldObj.isRemote) { + byte b1 = this.dataWatcher.getWatchableObjectByte(16); + byte b0 = (byte) (this.attackCounter > 10 ? 1 : 0); + + if (b1 != b0) { + this.dataWatcher.updateObject(16, Byte.valueOf(b0)); + } + } + } + + /** + * True if the ghast has an unobstructed line of travel to the waypoint. + */ + private boolean isCourseTraversable(double p_70790_1_, double p_70790_3_, double p_70790_5_, double p_70790_7_) { + double d4 = (this.waypointX - this.posX) / p_70790_7_; + double d5 = (this.waypointY - this.posY) / p_70790_7_; + double d6 = (this.waypointZ - this.posZ) / p_70790_7_; + AxisAlignedBB axisalignedbb = this.boundingBox.copy(); + + for (int i = 1; (double) i < p_70790_7_; ++i) { + axisalignedbb.offset(d4, d5, d6); + + /* + * if (!this.worldObj.getCollidingBoundingBoxes(this, axisalignedbb).isEmpty()) + * { return false; } + */ + } + + return true; + } + + /** + * Called when the mob is falling. Calculates and applies fall damage. + */ + protected void fall(float p_70069_1_) { + } + + /** + * Takes in the distance the entity has fallen this tick and whether its on the + * ground to update the fall distance and deal fall damage if landing on the + * ground. Args: distanceFallenThisTick, onGround + */ + protected void updateFallState(double p_70064_1_, boolean p_70064_3_) { + } + + /** + * Moves the entity based on the specified heading. Args: strafe, forward + */ + public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) { + if (this.isInWater()) { + 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()) { + 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 { + float f2 = 0.91F; + + if (this.onGround) { + f2 = this.worldObj.getBlock(MathHelper.floor_double(this.posX), + MathHelper.floor_double(this.boundingBox.minY) - 1, + MathHelper.floor_double(this.posZ)).slipperiness * 0.91F; + } + + float f3 = 0.16277136F / (f2 * f2 * f2); + this.moveFlying(p_70612_1_, p_70612_2_, this.onGround ? 0.1F * f3 : 0.02F); + f2 = 0.91F; + + if (this.onGround) { + f2 = this.worldObj.getBlock(MathHelper.floor_double(this.posX), + MathHelper.floor_double(this.boundingBox.minY) - 1, + MathHelper.floor_double(this.posZ)).slipperiness * 0.91F; + } + + this.moveEntity(this.motionX, this.motionY, this.motionZ); + 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; + } + + /** + * returns true if this entity is by a ladder, false otherwise + */ + public boolean isOnLadder() { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java b/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java new file mode 100644 index 0000000000..3a094e129b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java @@ -0,0 +1,311 @@ +package gtPlusPlus.core.entity.monster; + +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.general.ItemGemShards; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraftforge.common.ForgeHooks; + +public class EntityGiantChickenBase extends EntityChicken { + + /** The time until the next egg is spawned. */ + public int timeUntilNextBigEgg; + + public EntityGiantChickenBase(World aWorld) + { + super(aWorld); + this.setSize(0.6F, 1.4F); //Double + this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; + this.timeUntilNextBigEgg = this.rand.nextInt(16000) + 4000; + this.tasks.addTask(0, new EntityAISwimming(this)); + this.tasks.addTask(1, new EntityAIPanic(this, 1.4D)); + this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); + this.tasks.addTask(3, new EntityAITempt(this, 1.0D, ModItems.itemGemShards, false)); + this.tasks.addTask(4, new EntityAIFollowParent(this, 1.1D)); + this.tasks.addTask(4, new EntityAIEatGrass(this)); + this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); + this.tasks.addTask(5, new EntityAILookIdle(this)); + this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); + + } + + protected void applyEntityAttributes() + { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35D); + } + + /** + * 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(); + this.field_70888_h = this.field_70886_e; + this.field_70884_g = this.destPos; + this.destPos = (float)((double)this.destPos + (double)(this.onGround ? -1 : 4) * 0.3D); + + if (this.destPos < 0.0F) + { + this.destPos = 0.0F; + } + + if (this.destPos > 1.0F) + { + this.destPos = 1.0F; + } + + if (!this.onGround && this.field_70889_i < 1.0F) + { + this.field_70889_i = 1.0F; + } + + this.field_70889_i = (float)((double)this.field_70889_i * 0.9D); + + if (!this.onGround && this.motionY < 0.0D) + { + this.motionY *= 0.6D; + } + + if (MathUtils.randInt(0, 10000) <= 5) { + jump(); + } + + this.field_70886_e += this.field_70889_i * 2.0F; + + if (!this.worldObj.isRemote && --this.timeUntilNextEgg <= 0) + { + this.playSound("mob.chicken.plop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); + this.dropItem(Items.egg, 1); + this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; + } + if (!this.worldObj.isRemote && !this.isChild() && --this.timeUntilNextEgg <= 0) + { + this.playSound("mob.chicken.plop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); + this.dropItem(ModItems.itemBigEgg, MathUtils.randInt(1, 4)); + this.timeUntilNextBigEgg = this.rand.nextInt(16000) + 4000; + } + } + + /** + * Called when the mob is falling. Calculates and applies fall damage. + */ + protected void fall(float p_70069_1_) { + + if (MathUtils.randInt(0, 10) <= 5) { + jump(); + } + + } + + protected Item getDropItem() + { + return ModItems.itemBigEgg; + } + + /** + * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param + * par2 - Level of Looting used to kill this mob. + */ + protected void dropFewItems(boolean recentHit, int lootLevel) + { + int j = this.rand.nextInt(3) + this.rand.nextInt(1 + lootLevel); + + for (int k = 0; k < j; ++k) + { + this.dropItem(Items.feather, 1); + } + + //Large Egg Chance + for (int k = 0; k < j*2; ++k) + { + this.dropItem(ModItems.itemBigEgg, MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2})); + } + + //Chicken Corpses Dropped + int mBodies = MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6}); + if (this.isBurning()) + { + this.dropItem(Items.cooked_chicken, mBodies); + } + else + { + this.dropItem(Items.chicken, mBodies); + } + } + + public EntityGiantChickenBase createChild(EntityAgeable p_90011_1_) + { + return new EntityGiantChickenBase(this.worldObj); + } + + /** + * 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 aStack) + { + return aStack != null && aStack.getItem() instanceof ItemGemShards; + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound aNBT) + { + super.readEntityFromNBT(aNBT); + timeUntilNextBigEgg = aNBT.getInteger("timeUntilNextBigEgg"); + } + + /** + * Get the experience points the entity currently has. + */ + protected int getExperiencePoints(EntityPlayer p_70693_1_) + { + return this.isChickenJockey() ? 20 : super.getExperiencePoints(p_70693_1_); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound aNBT) + { + super.writeEntityToNBT(aNBT); + aNBT.setInteger("timeUntilNextBigEgg", timeUntilNextBigEgg); + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + return this.isChickenJockey() && this.riddenByEntity == null; + } + + public void updateRiderPosition() + { + super.updateRiderPosition(); + float f = MathHelper.sin(this.renderYawOffset * (float)Math.PI / 180.0F); + float f1 = MathHelper.cos(this.renderYawOffset * (float)Math.PI / 180.0F); + float f2 = 0.1F; + float f3 = 0.0F; + this.riddenByEntity.setPosition(this.posX + (double)(f2 * f), this.posY + (double)(this.height * 0.5F) + this.riddenByEntity.getYOffset() + (double)f3, this.posZ - (double)(f2 * f1)); + + if (this.riddenByEntity instanceof EntityLivingBase) + { + ((EntityLivingBase)this.riddenByEntity).renderYawOffset = this.renderYawOffset; + } + } + + public boolean isChickenJockey() { + return func_152116_bZ(); + } + public void setIsChickenJockey(boolean isJockey) { + func_152117_i(isJockey); + } + + @Override + protected Entity findPlayerToAttack() { + // TODO Auto-generated method stub + return super.findPlayerToAttack(); + } + + @Override + public boolean interact(EntityPlayer p_70085_1_) { + // TODO Auto-generated method stub + return super.interact(p_70085_1_); + } + + @Override + public void setHomeArea(int p_110171_1_, int p_110171_2_, int p_110171_3_, int p_110171_4_) { + // TODO Auto-generated method stub + super.setHomeArea(p_110171_1_, p_110171_2_, p_110171_3_, p_110171_4_); + } + + @Override + public ChunkCoordinates getHomePosition() { + // TODO Auto-generated method stub + return super.getHomePosition(); + } + + @Override + public void detachHome() { + // TODO Auto-generated method stub + super.detachHome(); + } + + @Override + public boolean hasHome() { + // TODO Auto-generated method stub + return super.hasHome(); + } + + @Override + public void eatGrassBonus() { + if (this.isChild()) { + this.addGrowth(60); + } + } + + @Override + public float getRenderSizeModifier() { + return 1.0f; + } + + @Override + protected void jump() { + this.motionY = 0.68999998688697815D; + this.motionY += 0.068999998688697815D; + if (this.isPotionActive(Potion.jump)) + { + this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.5F); + } + + if (this.isSprinting()) + { + float f = this.rotationYaw * 0.017453292F; + this.motionX -= (double)(MathHelper.sin(f) * 0.2F); + this.motionZ += (double)(MathHelper.cos(f) * 0.2F); + } + + this.isAirBorne = true; + + if (MathUtils.randInt(0, 10) < 10) { + jump(); + } + + ForgeHooks.onLivingJump(this); + } + + @Override + public void onStruckByLightning(EntityLightningBolt p_70077_1_) { + this.spawnExplosionParticle(); + this.spawnExplosionParticle(); + this.spawnExplosionParticle(); + this.spawnExplosionParticle(); + this.spawnExplosionParticle(); + this.spawnExplosionParticle(); + this.spawnExplosionParticle(); + super.onStruckByLightning(p_70077_1_); + } + + @Override + public boolean shouldDismountInWater(Entity rider) { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java b/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java new file mode 100644 index 0000000000..a530f294e1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java @@ -0,0 +1,225 @@ +package gtPlusPlus.core.entity.monster; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.monster.EntityMob; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; + +public class EntitySickBlaze extends EntityMob { + /** Random offset used in floating behaviour */ + private float heightOffset = 0.5F; + /** ticks until heightOffset is randomized */ + private int heightOffsetUpdateTime; + private int field_70846_g; + private final int mDataWatcherID = 30; + + public EntitySickBlaze(World p_i1731_1_) { + super(p_i1731_1_); + this.isImmuneToFire = true; + this.experienceValue = 10; + } + + @Override + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.5D); + this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(6.0D); + } + + @Override + protected void entityInit() { + super.entityInit(); + this.dataWatcher.addObject(mDataWatcherID, new Byte((byte) 0)); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + @Override + protected String getLivingSound() { + return "mob.blaze.breathe"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + @Override + protected String getHurtSound() { + return "mob.blaze.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + @Override + protected String getDeathSound() { + return "mob.blaze.death"; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) { + return 15728880; + } + + /** + * Gets how bright this entity is. + */ + @Override + public float getBrightness(float p_70013_1_) { + return p_70013_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. + */ + @Override + public void onLivingUpdate() { + if (!this.worldObj.isRemote) { + if (this.isWet()) { + this.attackEntityFrom(DamageSource.drown, 1.0F); + } + + --this.heightOffsetUpdateTime; + + if (this.heightOffsetUpdateTime <= 0) { + this.heightOffsetUpdateTime = 100; + this.heightOffset = 0.5F + (float) this.rand.nextGaussian() * 3.0F; + } + + if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + + this.getEntityToAttack().getEyeHeight() > this.posY + this.getEyeHeight() + this.heightOffset) { + this.motionY += (0.30000001192092896D - this.motionY) * 0.30000001192092896D; + } + } + + if (this.rand.nextInt(24) == 0) { + /*this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.fire", + 1.0F + this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F);*/ + } + + if (!this.onGround && this.motionY < 0.0D) { + this.motionY *= 0.6D; + } + + for (int i = 0; i < 2; ++i) { + this.worldObj.spawnParticle("crit", this.posX + (this.rand.nextDouble() - 0.5D) * this.width, + this.posY + this.rand.nextDouble() * this.height, + this.posZ + (this.rand.nextDouble() - 0.5D) * this.width, 0.0D, 0.0D, 0.0D); + } + + super.onLivingUpdate(); + } + + /** + * Basic mob attack. Default to touch of death in EntityCreature. Overridden + * by each mob to define their attack. + */ + @Override + protected void attackEntity(Entity entity, float p_70785_2_) { + if (this.attackTime <= 0 && p_70785_2_ < 2.0F && entity.boundingBox.maxY > this.boundingBox.minY + && entity.boundingBox.minY < this.boundingBox.maxY) { + this.attackTime = 20; + this.attackEntityAsMob(entity); + } + else if (p_70785_2_ < 30.0F) { + double d0 = entity.posX - this.posX; + double d1 = entity.boundingBox.minY + entity.height / 2.0F - (this.posY + this.height / 2.0F); + double d2 = entity.posZ - this.posZ; + + if (this.attackTime == 0) { + ++this.field_70846_g; + + if (this.field_70846_g == 1) { + this.attackTime = 60; + } + else if (this.field_70846_g <= 4) { + this.attackTime = 6; + } + else { + this.attackTime = 100; + this.field_70846_g = 0; + } + + if (this.field_70846_g > 1) { + float f1 = MathHelper.sqrt_float(p_70785_2_) * 0.5F; + this.worldObj.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) this.posX, (int) this.posY, + (int) this.posZ, 0); + + for (int i = 0; i < 1; ++i) { + EntityToxinballSmall entitysmalltoxinball = new EntityToxinballSmall(this.worldObj, this, + d0 + this.rand.nextGaussian() * f1, d1, d2 + this.rand.nextGaussian() * f1); + entitysmalltoxinball.posY = this.posY + this.height / 2.0F + 0.5D; + this.worldObj.spawnEntityInWorld(entitysmalltoxinball); + } + } + } + + this.rotationYaw = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + this.hasAttacked = true; + } + } + + /** + * Called when the mob is falling. Calculates and applies fall damage. + */ + @Override + protected void fall(float p_70069_1_) { + } + + @Override + protected Item getDropItem() { + return Items.slime_ball; + } + + /** + * Returns true if the entity is on fire. Used by render to add the fire + * effect on rendering. + */ + @Override + public boolean isBurning() { + return false; + } + + /** + * Drop 0-2 items of this living's type. @param par1 - Whether this entity + * has recently been hit by a player. @param par2 - Level of Looting used to + * kill this mob. + */ + @Override + protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { + if (p_70628_1_) { + int j = this.rand.nextInt(2 + p_70628_2_); + + for (int k = 0; k < j; ++k) { + this.dropItem(getDropItem(), 1); + } + } + } + + /** + * Checks to make sure the light is not too bright where the mob is spawning + */ + @Override + protected boolean isValidLightLevel() { + return true; + } + + @Override + public int getMaxSpawnedInChunk() { + return 8; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java b/src/main/java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java new file mode 100644 index 0000000000..f6f397f59e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java @@ -0,0 +1,553 @@ +package gtPlusPlus.core.entity.monster; + +import java.lang.reflect.Field; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.core.world.explosions.ExplosionHandler; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.monster.IMob; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.village.Village; +import net.minecraft.world.World; + +public class EntityStaballoyConstruct extends EntityIronGolem { + + /* + * Determines whether or not the entity is in a fluid at all. + */ + private boolean inFluid = false; + private boolean mReflectFirstUpdate = true; + private boolean isReadyToExplode = false; + private int fuse = 60; + private int attackTimer; + + public EntityStaballoyConstruct(World world) { + super(world); + this.experienceValue = 250; + this.setSize(1.4F, 2.9F); + this.getNavigator().setAvoidsWater(true); + this.getNavigator().setBreakDoors(true); + this.getNavigator().setCanSwim(false); + this.getNavigator().setAvoidSun(false); + this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true)); + this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F)); + //this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true)); + this.tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 1.0D)); + this.tasks.addTask(4, new EntityAIWander(this, 0.6D)); + this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); + this.tasks.addTask(6, new EntityAILookIdle(this)); + this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); + this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector)); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { + super.writeEntityToNBT(p_70014_1_); + p_70014_1_.setBoolean("inFluid", this.inFluid); + p_70014_1_.setBoolean("isReadyToExplode", this.isReadyToExplode); + p_70014_1_.setInteger("fuse", this.fuse); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { + super.readEntityFromNBT(p_70037_1_); + this.inFluid = p_70037_1_.getBoolean("inFluid"); + this.isReadyToExplode = p_70037_1_.getBoolean("isReadyToExplode"); + this.fuse = p_70037_1_.getInteger("fuse"); + } + + @Override + protected void entityInit() { + super.entityInit(); + this.dataWatcher.addObject(17, Byte.valueOf((byte) 0)); + } + + /** + * Returns true if the newer Entity AI code should be run + */ + @Override + public boolean isAIEnabled() { + return true; + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + @Override + protected void updateAITick() { + super.updateAITick(); + } + + @Override + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(500.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D); + } + + /** + * Decrements the entity's air supply when underwater + */ + @Override + protected int decreaseAirSupply(int p_70682_1_) { + return 0; + } + + @Override + protected void collideWithEntity(Entity p_82167_1_) { + if (p_82167_1_ instanceof IMob && this.getRNG().nextInt(20) == 0) { + this.setAttackTarget((EntityLivingBase) p_82167_1_); + } + + super.collideWithEntity(p_82167_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. + */ + @Override + public void onLivingUpdate() { + super.onLivingUpdate(); + + if (this.attackTimer > 0) { + --this.attackTimer; + } + + if (this.motionX * this.motionX + this.motionZ * this.motionZ > 2.500000277905201E-7D + && this.rand.nextInt(5) == 0) { + int i = MathHelper.floor_double(this.posX); + int j = MathHelper.floor_double(this.posY - 0.20000000298023224D - this.yOffset); + int k = MathHelper.floor_double(this.posZ); + Block block = this.worldObj.getBlock(i, j, k); + + + + if (block.getMaterial() != Material.air) { + this.worldObj.spawnParticle( + "blockcrack_" + Block.getIdFromBlock(block) + "_" + this.worldObj.getBlockMetadata(i, j, k), + this.posX + (this.rand.nextFloat() - 0.5D) * this.width, + this.boundingBox.minY + 0.1D, + this.posZ + (this.rand.nextFloat() - 0.5D) * this.width, + 4.0D * (this.rand.nextFloat() - 0.5D), 0.5D, + (this.rand.nextFloat() - 0.5D) * 4.0D); + } + } + } + + /** + * Returns true if this entity can attack entities of the specified class. + */ + @Override + public boolean canAttackClass(Class clazz) { + return clazz.equals(this.getClass()) ? false : true; + } + + @Override + public boolean attackEntityAsMob(Entity p_70652_1_) { + this.attackTimer = 10; + this.worldObj.setEntityState(this, (byte) 4); + boolean flag = p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), + 7 + this.rand.nextInt(15)); + + if (flag) { + p_70652_1_.motionY += 0.4000000059604645D; + } + + this.playSound("mob.irongolem.throw", 1.0F, 1.0F); + return flag; + } + + @Override + @SideOnly(Side.CLIENT) + public void handleHealthUpdate(byte p_70103_1_) { + if (p_70103_1_ == 4) { + this.attackTimer = 10; + this.playSound("mob.irongolem.throw", 1.0F, 1.0F); + } + else { + super.handleHealthUpdate(p_70103_1_); + } + } + + @Override + public Village getVillage() { + return null; + } + + @Override + @SideOnly(Side.CLIENT) + public int getAttackTimer() { + return this.attackTimer; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + @Override + protected String getHurtSound() { + return "mob.irongolem.hit"; + } + + /** + * Returns the sound this mob makes on death. + */ + @Override + protected String getDeathSound() { + return "mob.irongolem.death"; + } + + @Override + protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) { + this.playSound("mob.irongolem.walk", 1.0F, 1.0F); + } + + /** + * Drop 0-2 items of this living's type. @param par1 - Whether this entity + * has recently been hit by a player. @param par2 - Level of Looting used to + * kill this mob. + */ + @Override + protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { + int lootingChance = p_70628_2_+1; + int j = this.rand.nextInt(3); + int k; + + for (k = 0; k < j; ++k) { + this.entityDropItem(ItemUtils.getItemStackOfAmountFromOreDict("blockStaballoy", 1), 0f); + } + + k = 3 + this.rand.nextInt(3); + + for (int l = 0; l < k; ++l) { + this.entityDropItem(ItemUtils.getItemStackOfAmountFromOreDict("ingotStaballoy", lootingChance), 0f); + if (MathUtils.randInt(0, 2) == 0){ + this.entityDropItem(ItemUtils.getItemStackOfAmountFromOreDict("plateStaballoy", lootingChance), 0f); + } + } + } + + @Override + public boolean isPlayerCreated() { + return false; + } + + @Override + public void setPlayerCreated(boolean p_70849_1_) { + + } + + /** + * Called when the mob's health reaches 0. + */ + @Override + public void onDeath(DamageSource p_70645_1_) { + super.onDeath(p_70645_1_); + } + + @Override + protected String getLivingSound() { //TODO + return super.getLivingSound(); + } + + @Override + public int getTalkInterval() { + return 0; + } + + @Override + protected boolean canDespawn() { + return true; + } + + @Override + public void onEntityUpdate() { + //Set Fire Immunity + if (!this.isImmuneToFire){ + this.isImmuneToFire = true; + } + + if (!this.worldObj.isRemote) { + final float hp = getHealth(); + final float modifier = MathUtils.randInt(5,10)/100F; + final float amountToExplode = (hp*modifier); + + if (hp <= amountToExplode && !isReadyToExplode){ + if (this.ticksExisted >= 50) { + //Logger.INFO("Construct has low hp, trying to enable explosions. HP: "+this.getHealth()+", Max: "+this.getMaxHealth()+", Mod: "+modifier); + //Logger.INFO("Construct required HP to be <= "+amountToExplode); + float r = MathUtils.randFloat(0, 10); + if (r <= 0.1){ + this.isReadyToExplode = true; + //Logger.INFO("Construct can now explode."); + } + } + } + //Handle Exploding + else if (hp <= amountToExplode && isReadyToExplode){ + //Logger.INFO("Trying to explode. ["+this.fuse+"]"); + if (this.fuse-- <= 0){ + //Logger.INFO("Fuse has run out."); + this.setDead(); + if (!this.worldObj.isRemote) + { + this.explode(); + } + } + else { + //Logger.INFO("Ticking fuse and spawning particles."); + + int maxFuse = 60; + int fuseUsed = maxFuse-this.fuse; + float var2 = (float) (fuseUsed * 0.1); + + this.setSize(1.4F+(var2/2), 2.9F+(var2/2)); + + float r = MathUtils.randFloat(0, 1); + int r2 = MathUtils.randInt(5, 15); + for (int o=0;o 1.0F) + { + f = 1.0F; + } + + this.playSound(this.getSplashSound(), f, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.4F); + float f1 = MathHelper.floor_double(this.boundingBox.minY); + int i; + float f2; + float f3; + + for (i = 0; i < 1.0F + this.width * 20.0F; ++i) + { + f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; + f3 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; + this.worldObj.spawnParticle("bubble", this.posX + f2, f1 + 1.0F, this.posZ + f3, this.motionX, this.motionY - this.rand.nextFloat() * 0.2F, this.motionZ); + } + + for (i = 0; i < 1.0F + this.width * 20.0F; ++i) + { + f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; + f3 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width; + this.worldObj.spawnParticle("splash", this.posX + f2, f1 + 1.0F, this.posZ + f3, this.motionX, this.motionY, this.motionZ); + } + } + this.fallDistance = 0.0F; + this.inFluid = true; + } + else + { + this.inFluid = false; + } + return this.inFluid; + } + + @Override + public void onChunkLoad() { + // TODO Auto-generated method stub + super.onChunkLoad(); + } + + @Override + public void onStruckByLightning(EntityLightningBolt p_70077_1_) { + this.isReadyToExplode = true; + this.fuse = 20; + } + + private void explode(){ + /* float f = 12.0F; + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true);*/ + + if (!this.worldObj.isRemote) { + final float f = 6.5F; + ExplosionHandler explode = new ExplosionHandler(); + explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, true, true); + + float r = MathUtils.randFloat(0, 1); + int r2 = MathUtils.randInt(20, 40); + for (int o=0;o 0) { + ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.poison.id, 20 * b0, 1)); + ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.confusion.id, 20 * b0, 1)); + ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.weakness.id, 20 * b0, 1)); + } + } + } + + this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 1.0F, false, + this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")); + this.setDead(); + } + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java new file mode 100644 index 0000000000..7660dd1b75 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java @@ -0,0 +1,115 @@ +package gtPlusPlus.core.entity.projectile; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.init.Blocks; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; + +public class EntitySulfuricAcidPotion extends EntityThrowable { + + public EntitySulfuricAcidPotion(World world) { + super(world); + } + + public EntitySulfuricAcidPotion(World world, EntityLivingBase entity) { + super(world, entity); + } + + public EntitySulfuricAcidPotion(World world, double posX, double posY, double posZ) { + super(world, posX, posY, posZ); + } + + /** + * Called when this EntityThrowable hits a block or entity. + */ + @Override + protected void onImpact(MovingObjectPosition object) { + int xBlock = object.blockX; + int yBlock = object.blockY; + int zBlock = object.blockZ; + if (object.entityHit != null) { + byte b0 = 6; + if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ + object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); + EntityUtils.setEntityOnFire(object.entityHit, 10); + object.entityHit.fireResistance = 0; + ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit)); + } + } + if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){ + ravage(new BlockPos(xBlock, yBlock, zBlock)); + } + + String mParticleType = "reddust"; + int e=0; + for (int i = 0; i < 24; ++i) { + if ((e = MathUtils.randInt(0, 5)) <= 1){ + if (e==0) + mParticleType = "largesmoke"; + if (e==1) + mParticleType = "flame"; + } + this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + + if (!this.worldObj.isRemote) { + this.setDead(); + } + } + + private boolean ravage(BlockPos blockpos){ + + int radius = 1; + + for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){ + for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){ + for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){ + + int mChance = MathUtils.randInt(1, 10); + if (mChance <= 3){ + Block mBlockhit = worldObj.getBlock(i, j, h); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + + //GT_Pollution.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), mPol); + + if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){ + worldObj.setBlock(i, j+1, h, Blocks.fire); + worldObj.setBlock(i, j, h, Blocks.dirt); + } + else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){ + worldObj.setBlock(i, j, h, Blocks.fire); + } + else if (mBlockhit == Blocks.tallgrass){ + worldObj.setBlock(i, j, h, Blocks.fire); + if (worldObj.getBlock(i, j-1, h) == Blocks.grass){ + worldObj.setBlock(i, j-1, h, Blocks.dirt); + } + } + else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){ + worldObj.setBlock(i, j+1, h, Blocks.fire); + worldObj.setBlock(i, j, h, Blocks.dirt); + } + else if (mBlockhit == Blocks.air){ + worldObj.setBlock(i, j, h, Blocks.fire); + } + } + } + } + } + + + return true; + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java new file mode 100644 index 0000000000..49daa459e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityThrowableBomb.java @@ -0,0 +1,145 @@ +package gtPlusPlus.core.entity.projectile; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.init.Blocks; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; + +public class EntityThrowableBomb extends EntityThrowable { + + public EntityThrowableBomb(World world) { + super(world); + } + + public EntityThrowableBomb(World world, EntityLivingBase entity) { + super(world, entity); + } + + public EntityThrowableBomb(World world, double posX, double posY, double posZ) { + super(world, posX, posY, posZ); + } + + /** + * Called when this EntityThrowable hits a block or entity. + */ + @Override + protected void onImpact(MovingObjectPosition object) { + int xBlock = object.blockX; + int yBlock = object.blockY; + int zBlock = object.blockZ; + if (object.entityHit != null) { + byte b0 = 6; + if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ + object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 20); + EntityUtils.setEntityOnFire(object.entityHit, 20); + object.entityHit.fireResistance = 0; + ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit)); + } + } + if (object.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK){ + + ravage(new BlockPos(xBlock, yBlock, zBlock)); + for (BlockPos aSur : new BlockPos(xBlock, yBlock, zBlock).getSurroundingBlocks()) { + ravage(new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos)); + for (BlockPos aSur2 : new BlockPos(aSur.xPos, aSur.yPos, aSur.zPos).getSurroundingBlocks()) { + //ravage(new BlockPos(aSur2.xPos, aSur2.yPos, aSur2.zPos)); + } + } + } + + String mParticleType = "reddust"; + int e=0; + for (int i = 0; i < 127; ++i) { + if ((e = MathUtils.randInt(0, 5)) <= 1){ + if (e==0) + mParticleType = "largesmoke"; + if (e==1) + mParticleType = "flame"; + } + this.worldObj.spawnParticle(mParticleType, this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + } + + if (!this.worldObj.isRemote) { + this.setDead(); + } + } + + private boolean ravage(BlockPos blockpos){ + + int radius = 5; + + for (int i=(blockpos.xPos-radius);i<(blockpos.xPos+radius);i++){ + for (int j=(blockpos.yPos-radius);j<(blockpos.yPos+radius);j++){ + for (int h=(blockpos.zPos-radius);h<(blockpos.zPos+radius);h++){ + + int mChance = MathUtils.randInt(0, 100); + if (mChance <= 3){ + Block mBlockhit = worldObj.getBlock(i, j, h); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D); + + PollutionUtils.addPollution(worldObj.getChunkFromBlockCoords(blockpos.xPos, blockpos.zPos), 500); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.01f, true); + if (mBlockhit == Blocks.grass || mBlockhit == Blocks.mycelium){ + worldObj.setBlock(i, j+1, h, Blocks.fire); + worldObj.setBlock(i, j, h, Blocks.dirt); + } + else if (mBlockhit == Blocks.leaves || mBlockhit == Blocks.leaves2){ + worldObj.setBlock(i, j, h, Blocks.fire); + } + else if (mBlockhit == Blocks.tallgrass){ + worldObj.setBlock(i, j, h, Blocks.fire); + if (worldObj.getBlock(i, j-1, h) == Blocks.grass){ + worldObj.setBlock(i, j-1, h, Blocks.dirt); + } + } + else if (mBlockhit == Blocks.carrots || mBlockhit == Blocks.melon_block || mBlockhit == Blocks.pumpkin || mBlockhit == Blocks.potatoes){ + worldObj.setBlock(i, j+1, h, Blocks.fire); + worldObj.setBlock(i, j, h, Blocks.dirt); + } + else if (mBlockhit == Blocks.air){ + worldObj.setBlock(i, j, h, Blocks.fire); + } + } + } + } + } + + + return true; + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java new file mode 100644 index 0000000000..4fe72345b2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinball.java @@ -0,0 +1,327 @@ +package gtPlusPlus.core.entity.projectile; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.*; +import net.minecraft.world.World; + +public abstract class EntityToxinball extends EntityFireball { + protected int entityX = -1; + protected int entityY = -1; + protected int entityZ = -1; + private Block block; + private boolean inGround; + private int ticksAlive; + private int ticksInAir; + + public EntityToxinball(World world) { + super(world); + this.setSize(1.0F, 1.0F); + } + + @Override + protected void entityInit() { + } + + /** + * Checks if the entity is in range to render by using the past in distance + * and comparing it to its average edge length * 64 * renderDistanceWeight + * Args: distance + */ + @Override + @SideOnly(Side.CLIENT) + public boolean isInRangeToRenderDist(double p_70112_1_) { + double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D; + d1 *= 64.0D; + return p_70112_1_ < d1 * d1; + } + + public EntityToxinball(World world, double x, double y, double z, double f1, double f2, double f3) { + super(world); + this.setSize(1.0F, 1.0F); + this.setLocationAndAngles(x, y, z, this.rotationYaw, this.rotationPitch); + this.setPosition(x, y, z); + double d6 = MathHelper + .sqrt_double(f1 * f1 + f2 * f2 + f3 * f3); + this.accelerationX = f1 / d6 * 0.1D; + this.accelerationY = f2 / d6 * 0.1D; + this.accelerationZ = f3 / d6 * 0.1D; + } + + public EntityToxinball(World world, EntityLivingBase entity, double x, double y, double z) { + super(world); + this.shootingEntity = entity; + this.setSize(1.0F, 1.0F); + this.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, + entity.rotationPitch); + this.setPosition(this.entityX, this.entityY, this.entityZ); + this.yOffset = 0.0F; + this.motionX = this.motionY = this.motionZ = 0.0D; + x += this.rand.nextGaussian() * 0.4D; + y += this.rand.nextGaussian() * 0.4D; + z += this.rand.nextGaussian() * 0.4D; + double d3 = MathHelper.sqrt_double(x * x + y * y + z * z); + this.accelerationX = x / d3 * 0.1D; + this.accelerationY = y / d3 * 0.1D; + this.accelerationZ = z / d3 * 0.1D; + } + + /** + * Called to update the entity's position/logic. + */ + @Override + public void onUpdate() { + if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead + || !this.worldObj.blockExists(this.entityX, this.entityY, this.entityZ))) { + this.setDead(); + } + else { + super.onUpdate(); + this.setFire(1); + + if (this.inGround) { + if (this.worldObj.getBlock(this.entityX, this.entityY, + this.entityZ) == this.block) { + ++this.ticksAlive; + + if (this.ticksAlive == 600) { + this.setDead(); + } + + return; + } + + this.inGround = false; + this.motionX *= this.rand.nextFloat() * 0.2F; + this.motionY *= this.rand.nextFloat() * 0.2F; + this.motionZ *= this.rand.nextFloat() * 0.2F; + this.ticksAlive = 0; + this.ticksInAir = 0; + } + else { + ++this.ticksInAir; + } + + Vec3 vec3 = Vec3.createVectorHelper(this.entityX, this.entityY, this.entityZ); + Vec3 vec31 = Vec3.createVectorHelper(this.entityX + this.motionX, this.entityY + this.motionY, + this.entityZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); + vec3 = Vec3.createVectorHelper(this.entityX, this.entityY, this.entityZ); + vec31 = Vec3.createVectorHelper(this.entityX + this.motionX, this.entityY + this.motionY, + this.entityZ + this.motionZ); + + if (movingobjectposition != null) { + vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, + movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, + this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + + for (int i = 0; i < list.size(); ++i) { + Entity entity1 = (Entity) list.get(i); + + if (entity1.canBeCollidedWith() + && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { + float f = 0.3F; + AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f); + MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); + + if (movingobjectposition1 != null) { + double d1 = vec3.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null) { + this.onImpact(movingobjectposition); + } + + this.entityX += this.motionX; + this.entityY += this.motionY; + this.entityZ += this.motionZ; + float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float) (Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) + 90.0F; + + for (this.rotationPitch = (float) (Math.atan2(f1, this.motionY) * 180.0D / Math.PI) + - 90.0F; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { + ; + } + + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + this.prevRotationPitch += 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + this.prevRotationYaw -= 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + this.prevRotationYaw += 360.0F; + } + + this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + float f2 = this.getMotionFactor(); + + if (this.isInWater()) { + for (int j = 0; j < 4; ++j) { + float f3 = 0.25F; + this.worldObj.spawnParticle("bubble", this.entityX - this.motionX * f3, this.entityY - this.motionY * f3, + this.entityZ - this.motionZ * f3, this.motionX, this.motionY, this.motionZ); + } + + f2 = 0.8F; + } + + this.motionX += this.accelerationX; + this.motionY += this.accelerationY; + this.motionZ += this.accelerationZ; + this.motionX *= f2; + this.motionY *= f2; + this.motionZ *= f2; + this.worldObj.spawnParticle("smoke", this.entityX, this.entityY + 0.5D, this.entityZ, 0.0D, 0.0D, 0.0D); + this.setPosition(this.entityX, this.entityY, this.entityZ); + } + } + + /** + * Return the motion factor for this projectile. The factor is multiplied by + * the original motion. + */ + @Override + protected float getMotionFactor() { + return 0.95F; + } + + /** + * Called when this EntityFireball hits a block or entity. + */ + @Override + protected abstract void onImpact(MovingObjectPosition p_70227_1_); + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound aTag) { + aTag.setShort("xTile", (short) this.entityX); + aTag.setShort("yTile", (short) this.entityY); + aTag.setShort("zTile", (short) this.entityZ); + aTag.setByte("inTile", (byte) Block.getIdFromBlock(this.block)); + aTag.setByte("inGround", (byte) (this.inGround ? 1 : 0)); + aTag.setTag("direction", + this.newDoubleNBTList(new double[] { this.motionX, this.motionY, this.motionZ })); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound aTag) { + this.entityX = aTag.getShort("xTile"); + this.entityY = aTag.getShort("yTile"); + this.entityZ = aTag.getShort("zTile"); + this.block = Block.getBlockById(aTag.getByte("inTile") & 255); + this.inGround = aTag.getByte("inGround") == 1; + + if (aTag.hasKey("direction", 9)) { + NBTTagList nbttaglist = aTag.getTagList("direction", 6); + this.motionX = nbttaglist.func_150309_d(0); + this.motionY = nbttaglist.func_150309_d(1); + this.motionZ = nbttaglist.func_150309_d(2); + } + else { + this.setDead(); + } + } + + /** + * Returns true if other Entities should be prevented from moving through + * this Entity. + */ + @Override + public boolean canBeCollidedWith() { + return true; + } + + @Override + public float getCollisionBorderSize() { + return 1.0F; + } + + /** + * Called when the entity is attacked. + */ + @Override + public boolean attackEntityFrom(DamageSource damage, float p_70097_2_) { + if (this.isEntityInvulnerable()) { + return false; + } + else { + this.setBeenAttacked(); + + if (damage.getEntity() != null) { + Vec3 vec3 = damage.getEntity().getLookVec(); + + if (vec3 != null) { + this.motionX = vec3.xCoord; + this.motionY = vec3.yCoord; + this.motionZ = vec3.zCoord; + this.accelerationX = this.motionX * 0.1D; + this.accelerationY = this.motionY * 0.1D; + this.accelerationZ = this.motionZ * 0.1D; + } + + if (damage.getEntity() instanceof EntityLivingBase) { + this.shootingEntity = (EntityLivingBase) damage.getEntity(); + } + + return true; + } + else { + return false; + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } + + /** + * Gets how bright this entity is. + */ + @Override + public float getBrightness(float p_70013_1_) { + return 1.0F; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) { + return 15728880; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java new file mode 100644 index 0000000000..78469c9dad --- /dev/null +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityToxinballSmall.java @@ -0,0 +1,88 @@ +package gtPlusPlus.core.entity.projectile; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.init.Blocks; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class EntityToxinballSmall extends EntityToxinball { + + public EntityToxinballSmall(World p_i1770_1_) { + super(p_i1770_1_); + this.setSize(0.3125F, 0.3125F); + } + + public EntityToxinballSmall(World world, EntityLivingBase entity, double x, double y, double z) { + super(world, entity, x, y, z); + this.setSize(0.3125F, 0.3125F); + } + + public EntityToxinballSmall(World p_i1772_1_, double p_i1772_2_, double p_i1772_4_, double p_i1772_6_, double p_i1772_8_, double p_i1772_10_, double p_i1772_12_) { + super(p_i1772_1_, p_i1772_2_, p_i1772_4_, p_i1772_6_, p_i1772_8_, p_i1772_10_, p_i1772_12_); + this.setSize(0.3125F, 0.3125F); + } + + /** + * Called when this EntityFireball hits a block or entity. + */ + @Override + protected void onImpact(MovingObjectPosition MoP) { + if (!this.worldObj.isRemote) { + if (MoP.entityHit != null) { + if (!MoP.entityHit.isImmuneToFire() && MoP.entityHit + .attackEntityFrom(DamageSource.causeFireballDamage(this, this.shootingEntity), 5.0F)) { + MoP.entityHit.setFire(5); + } + } + else { + int i = MoP.blockX; + int j = MoP.blockY; + int k = MoP.blockZ; + + switch (MoP.sideHit) { + case 0: + --j; + break; + case 1: + ++j; + break; + case 2: + --k; + break; + case 3: + ++k; + break; + case 4: + --i; + break; + case 5: + ++i; + } + + if (this.worldObj.isAirBlock(i, j, k)) { + this.worldObj.setBlock(i, j, k, Blocks.fire); + } + } + + this.setDead(); + } + } + + /** + * Returns true if other Entities should be prevented from moving through + * this Entity. + */ + @Override + public boolean canBeCollidedWith() { + return false; + } + + /** + * Called when the entity is attacked. + */ + @Override + public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/fluids/BlockFluidBase.java b/src/main/java/gtPlusPlus/core/fluids/BlockFluidBase.java new file mode 100644 index 0000000000..dc7c9c2e78 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/fluids/BlockFluidBase.java @@ -0,0 +1,104 @@ +package gtPlusPlus.core.fluids; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.BlockFluidClassic; +import net.minecraftforge.fluids.Fluid; + +public class BlockFluidBase extends BlockFluidClassic { + + @SideOnly(Side.CLIENT) + protected static IIcon stillIcon; + @SideOnly(Side.CLIENT) + protected static IIcon flowingIcon; + + protected final short[] mRGB; + + + public BlockFluidBase(Fluid fluid, short[] aRGB) { + this(fluid, Material.water, aRGB); + } + + public BlockFluidBase(Fluid fluid, Material material, short[] aRGB) { + super(fluid, material); + mRGB = aRGB; + this.setHardness(100.0F); + this.setLightOpacity(3); + this.disableStats(); + } + + @Override + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity ent) { + if (!(ent instanceof EntityLivingBase)) { + return; + } + /*EntityLivingBase player = (EntityLivingBase) ent; + int pot = world.rand.nextInt(Potion.potionTypes.length); + Potion.potionTypes[pot].performEffect(player, 40);*/ + } + + @Override + public IIcon getIcon(int side, int meta) { + return (side == 0 || side == 1) ? stillIcon : flowingIcon; + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister register) { + if (stillIcon == null) { + stillIcon = register.registerIcon(CORE.MODID+ ":" + "fluids/fluid.fluid.autogenerated.still"); + } + if (flowingIcon == null) { + flowingIcon = register.registerIcon(CORE.MODID+ ":" + "fluids/fluid.fluid.autogenerated.flowing"); + } + } + + @Override + public int getBlockColor() { + if (mRGB != null && mRGB.length >= 3) { + return Utils.rgbtoHexValue(mRGB[0], mRGB[1], mRGB[2]); + } + return super.getBlockColor(); + } + + @Override + public int getRenderColor(int aMeta) { + if (mRGB != null && mRGB.length >= 3) { + return Utils.rgbtoHexValue(mRGB[0], mRGB[1], mRGB[2]); + } + return super.getRenderColor(aMeta); + } + + @Override + public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour) { + // TODO Auto-generated method stub + return super.recolourBlock(world, x, y, z, side, colour); + } + + @Override + public boolean canDisplace(IBlockAccess world, int x, int y, int z) { + if (world.getBlock(x, y, z).getMaterial().isLiquid()) { + return false; + } + return super.canDisplace(world, x, y, z); + } + + @Override + public boolean displaceIfPossible(World world, int x, int y, int z) { + if (world.getBlock(x, y, z).getMaterial().isLiquid()) { + return false; + } + return super.displaceIfPossible(world, x, y, z); + } + +} diff --git a/src/main/java/gtPlusPlus/core/fluids/FactoryFluid.java b/src/main/java/gtPlusPlus/core/fluids/FactoryFluid.java new file mode 100644 index 0000000000..e3383aee91 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/fluids/FactoryFluid.java @@ -0,0 +1,49 @@ +package gtPlusPlus.core.fluids; +import gregtech.api.GregTech_API; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.Block; +import net.minecraft.item.EnumRarity; +import net.minecraftforge.fluids.Fluid; + +public class FactoryFluid extends Fluid implements Runnable { + + private final String mTextureName; + private final short[] mRGBa; + + public FactoryFluid(String fluidName, final short[] aRGBa) { + this(fluidName, null, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, false, EnumRarity.common, aRGBa); + } + + public FactoryFluid(String fluidName, int luminosity, int density, int temp, int viscosity, final short[] aRGBa) { + this(fluidName, null, luminosity, density, temp, viscosity, (density == Short.MIN_VALUE || density >= 0 ? false : true), EnumRarity.common, aRGBa); + } + + public FactoryFluid(String fluidName, Block aBlock, int luminosity, int density, int temp, int viscosity, boolean gas, EnumRarity aRarity, final short[] aRGBa) { + super(fluidName); + this.mRGBa = aRGBa; + this.setBlock(aBlock); + if (luminosity != Short.MIN_VALUE) + this.setLuminosity(luminosity); + if (density != Short.MIN_VALUE) + this.setDensity(density); + if (temp != Short.MIN_VALUE) + this.setTemperature(temp); + if (viscosity != Short.MIN_VALUE) + this.setViscosity(viscosity); + this.setGaseous(gas); + this.setRarity(aRarity); + this.mTextureName = CORE.MODID+":fluids/fluid.fluid.autogenerated"; + GregTech_API.sGTBlockIconload.add(this); + } + + @Override + public int getColor() { + return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2])); + } + + @Override + public void run() { + this.setIcons(GregTech_API.sBlockIcons.registerIcon(this.mTextureName)); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/fluids/FluidFactory.java b/src/main/java/gtPlusPlus/core/fluids/FluidFactory.java new file mode 100644 index 0000000000..d94fa35af7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/fluids/FluidFactory.java @@ -0,0 +1,214 @@ +package gtPlusPlus.core.fluids; + +import java.util.LinkedHashMap; +import java.util.Map; + +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.GTplusplus.INIT_PHASE; +import gtPlusPlus.api.objects.GregtechException; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.base.itemblock.FluidItemBlock; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +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.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; + +public class FluidFactory { + + public static final Map mNameToFluidMap = new LinkedHashMap(); + public static final Map mNameToBucketMap = new LinkedHashMap(); + public static final Map mNameToBlockMap = new LinkedHashMap(); + public static final Map mNameToMetaMap = new LinkedHashMap(); + + public static final Map mFluidToNameMap = new LinkedHashMap(); + public static final Map mFluidToBucketMap = new LinkedHashMap(); + public static final Map mFluidToBlockMap = new LinkedHashMap(); + public static final Map mFluidToMetaMap = new LinkedHashMap(); + + public static final Map mBucketToFluidMap = new LinkedHashMap(); + public static final Map mBucketToNameMap = new LinkedHashMap(); + public static final Map mBucketToBlockMap = new LinkedHashMap(); + public static final Map mBucketToMetaMap = new LinkedHashMap(); + + public static final Map mBlockToNameMap = new LinkedHashMap(); + public static final Map mBlockToFluidMap = new LinkedHashMap(); + public static final Map mBlockToBucketMap = new LinkedHashMap(); + public static final Map mBlockToMetaMap = new LinkedHashMap(); + + public static final Map mMetaToNameMap = new LinkedHashMap(); + public static final Map mMetaToFluidMap = new LinkedHashMap(); + public static final Map mMetaToBucketMap = new LinkedHashMap(); + public static final Map mMetaToBlockMap = new LinkedHashMap(); + + + //Special Colour Handling + public static final Map mMetaToColourMap = new LinkedHashMap(); + + + public static Item mGenericBucket; + private static FluidPackage mErrorFluid; + private static AutoMap mGeneratedFluids = new AutoMap(); + + public static void preInit() { + + } + + public static void init() { + mGenericBucket = new ItemGenericFluidBucket(Blocks.air); + GameRegistry.registerItem(mGenericBucket, "gtpp.bucket.generic"); + for (FluidPackage y : mGeneratedFluids) { + if (!y.valid()) { + continue; + } + GameRegistry.registerBlock(y.mBlock, FluidItemBlock.class, "gtpp_" + y.mName); + FluidContainerRegistry.registerFluidContainer(y.get(), y.mBucket, new ItemStack(Items.bucket)); + } + Utils.registerEvent(BucketHandler.INSTANCE); + } + + public static void postInit() { + + } + + /** + * Generates a 'Water' type fluid. + * @param aID - The Fluid ID (Must be unique) + * @param aUnlocalName - Unlocalized Fluid Name + * @param aRGB - a {@link Short[]} containing the RGB of the FluidPackage. + * @return - A fully constructed & registered {@linkplain FluidPackage} + */ + public static FluidPackage generate(int aID, String aUnlocalName, short[] aRGB) { + return generate(aID, aUnlocalName, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, Short.MIN_VALUE, aRGB); + } + + /** + * Generate a {@link FluidPackage} from the data provided. This FluidPackage is automatically registered and handled internally. + * Pass in {@link Short}.MIN_VALUE for any of the Fluid Fields (Besides ID, Name or RGB) and it will default to water values. + * @param aID - The Fluid ID (Must be unique) + * @param aUnlocalName - Unlocalized Fluid Name + * @param luminosity - How bright is the fluid. + * @param density - completely arbitrary; negative density indicates that the fluid is + * lighter than air. Default value is approximately the real-life density of water in kg/m^3. + * @param temp - completely arbitrary; higher temperature indicates that the fluid is + * hotter than air. Default value is approximately the real-life room temperature of water in degrees Kelvin + * @param viscosity - completely arbitrary; negative values are not + * permissible. Default value is approximately the real-life density of water in m/s^2 (x10^-3). * + * Higher viscosity means that a fluid flows more slowly, like molasses. + * Lower viscosity means that a fluid flows more quickly, like helium. + * @param aRGB - a {@link Short[]} containing the RGB of the FluidPackage. + * @return - A fully constructed & registered {@linkplain FluidPackage} + */ + public static FluidPackage generate(int aID, String aUnlocalName, int luminosity, int density, int temp, + int viscosity, short[] aRGB) { + + FluidPackage aFluidToGenerate = null; + + // Check Load Phase for some Safety, only allow this to be called in Pre-Init. + if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.PRE_INIT) { + try { + throw new GregtechException("Cannot generate Fluid Packages outside of Pre-Init!"); + } catch (GregtechException e) { + e.printStackTrace(); + CORE.crash("Cannot generate Fluid Packages outside of Pre-Init!"); + } + } + + Fluid aGenFluid = fluid(aUnlocalName, luminosity, density, temp, viscosity, aRGB); + Block aGenBlock = block(aGenFluid, aRGB); + ItemStack aGenBucket = bucket(aID); + + aFluidToGenerate = new FluidPackage(aID, aUnlocalName, aGenFluid, aGenBucket, aGenBlock); + + if (aFluidToGenerate != null && aFluidToGenerate.valid()) { + FluidRegistry.registerFluid(aFluidToGenerate.get()); + mGeneratedFluids.put(aFluidToGenerate); + } + else { + // Handle Bad generation + if (mErrorFluid == null) { + mErrorFluid = new FluidPackage(0, "", FluidUtils.getWater(1).getFluid(), ItemUtils.getSimpleStack(Items.water_bucket), Blocks.water); + } + return mErrorFluid; + } + + + return aFluidToGenerate; + } + + + + private static Fluid fluid(String aUnlocalName, int luminosity, int density, int temp, + int viscosity, short[] aRGB) { + return new FactoryFluid(aUnlocalName, luminosity, density, temp, viscosity, aRGB); + } + + private static ItemStack bucket(int aID) { + return ItemGenericFluidBucket.registerFluidForBucket(aID); + } + + private static Block block(Fluid aFluidForBlock, short[] aRGB) { + if (aFluidForBlock != null) { + FluidRegistry.registerFluid(aFluidForBlock); + return new BlockFluidBase(aFluidForBlock, aRGB); + } + return Blocks.dirt; + } + + /** + * Copyright © SpaceToad, 2011 http://www.mod-buildcraft.com BuildCraft is + * distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. + * Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + * + * Modified version of the BC BucketHandler, except using ItemStacks > Items + * (Why?) + * + * @author Alkalus + */ + + public static class BucketHandler { + + public static BucketHandler INSTANCE = new BucketHandler(); + + private BucketHandler() { + + } + + @SubscribeEvent + public void onBucketFill(FillBucketEvent event) { + ItemStack result = fillCustomBucket(event.world, event.target); + if (result == null) { + return; + } + event.result = result; + event.setResult(Result.ALLOW); + } + + private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) { + Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ); + ItemStack bucket = mBlockToBucketMap.get(block); + if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) { + world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ); + return ItemUtils.getSimpleStack(bucket, 1); + } else { + return null; + } + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/fluids/FluidPackage.java b/src/main/java/gtPlusPlus/core/fluids/FluidPackage.java new file mode 100644 index 0000000000..29f831776b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/fluids/FluidPackage.java @@ -0,0 +1,83 @@ +package gtPlusPlus.core.fluids; + +import static gtPlusPlus.core.fluids.FluidFactory.mBlockToBucketMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBlockToFluidMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBlockToMetaMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBlockToNameMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBucketToBlockMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBucketToFluidMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBucketToMetaMap; +import static gtPlusPlus.core.fluids.FluidFactory.mBucketToNameMap; +import static gtPlusPlus.core.fluids.FluidFactory.mFluidToBlockMap; +import static gtPlusPlus.core.fluids.FluidFactory.mFluidToBucketMap; +import static gtPlusPlus.core.fluids.FluidFactory.mFluidToMetaMap; +import static gtPlusPlus.core.fluids.FluidFactory.mFluidToNameMap; +import static gtPlusPlus.core.fluids.FluidFactory.mMetaToBlockMap; +import static gtPlusPlus.core.fluids.FluidFactory.mMetaToBucketMap; +import static gtPlusPlus.core.fluids.FluidFactory.mMetaToColourMap; +import static gtPlusPlus.core.fluids.FluidFactory.mMetaToFluidMap; +import static gtPlusPlus.core.fluids.FluidFactory.mMetaToNameMap; +import static gtPlusPlus.core.fluids.FluidFactory.mNameToBlockMap; +import static gtPlusPlus.core.fluids.FluidFactory.mNameToBucketMap; +import static gtPlusPlus.core.fluids.FluidFactory.mNameToFluidMap; +import static gtPlusPlus.core.fluids.FluidFactory.mNameToMetaMap; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + +public class FluidPackage { + + + public final int mID; + public final String mName; + private final Fluid mFluid; + public final ItemStack mBucket; + public final Block mBlock; + + public FluidPackage(int aID, String aName, Fluid aFluid, ItemStack aBucket, Block aBlock) { + + mNameToFluidMap.put(aName, aFluid); + mNameToBucketMap.put(aName, aBucket); + mNameToBlockMap.put(aName, aBlock); + mNameToMetaMap.put(aName, aID); + + mFluidToNameMap.put(aFluid, aName); + mFluidToBucketMap.put(aFluid, aBucket); + mFluidToBlockMap.put(aFluid, aBlock); + mFluidToMetaMap.put(aFluid, aID); + + mBucketToFluidMap.put(aBucket, aFluid); + mBucketToNameMap.put(aBucket, aName); + mBucketToBlockMap.put(aBucket, aBlock); + mBucketToMetaMap.put(aBucket, aID); + + mBlockToNameMap.put(aBlock, aName); + mBlockToFluidMap.put(aBlock, aFluid); + mBlockToBucketMap.put(aBlock, aBucket); + mBlockToMetaMap.put(aBlock, aID); + + mMetaToNameMap.put(aID, aName); + mMetaToFluidMap.put(aID, aFluid); + mMetaToBucketMap.put(aID, aBucket); + mMetaToBlockMap.put(aID, aBlock); + + mMetaToColourMap.put(aID, aFluid.getColor()); + + mID = aID; + mName = aName; + mFluid = aFluid; + mBucket = aBucket; + mBlock = aBlock; + + } + + public Fluid get() { + return mFluid; + } + + public boolean valid() { + return mName != null && mName.length() > 0 && mFluid != null && mBucket != null && mBlock != null; + } + +} diff --git a/src/main/java/gtPlusPlus/core/fluids/FluidRegistryHandler.java b/src/main/java/gtPlusPlus/core/fluids/FluidRegistryHandler.java new file mode 100644 index 0000000000..bc4df596de --- /dev/null +++ b/src/main/java/gtPlusPlus/core/fluids/FluidRegistryHandler.java @@ -0,0 +1,53 @@ +package gtPlusPlus.core.fluids; + +import static gtPlusPlus.core.block.ModBlocks.*; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.block.material.Material; + +import gtPlusPlus.core.block.general.fluids.BlockFluidSludge; +import gtPlusPlus.core.lib.CORE; +import net.minecraftforge.fluids.FluidRegistry; + +public class FluidRegistryHandler { + + //Fluids + /** + * + * Luminosity .setLuminosity(luminosity) + How much light does the fluid emit. Default: 0, Lava uses 15 + Density .setDensity(density) + How dense is the fluid, the only effect is whether or not a fluid replaces another fluid when they flow into each other. Default: 1000, the density of water at 4 degrees Celsius in kg/m³ + Temperature .setTemperature(temp) + How hot, or cold is the fluid. Has currently no effect. Default: 295, the "normal" room temperature in degrees Kelvin, this is approximately 72°F or 22°C. + Viscosity .setViscosity(viscosity) + How thick the fluid is. Determines how fast it flows. Default: 1000 for water, lava uses 6000 + Is Gaseous .setGaseous(boolean) + Indicates if the fluid is gaseous. Used for rendering. Default: false + * + */ + + public static void registerFluids(){ + run(); + } + + private static void run(){ + fluidSludge(); + } + + private static void fluidSludge(){ + //testFluid + fluidSludge.setLuminosity(8); + fluidSludge.setDensity(8196); + fluidSludge.setTemperature(295); + fluidSludge.setViscosity(3000); + fluidSludge.setGaseous(false); + fluidSludge.setUnlocalizedName("fluid.sludge"); + FluidRegistry.registerFluid(fluidSludge); + blockFluidSludge = new BlockFluidSludge(fluidSludge, Material.cactus).setBlockName("fluidBlockSludge"); + GameRegistry.registerBlock(blockFluidSludge, CORE.MODID + "_" + blockFluidSludge.getUnlocalizedName().substring(5)); + fluidSludge.setUnlocalizedName(blockFluidSludge.getUnlocalizedName()); + } + +} diff --git a/src/main/java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java b/src/main/java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java new file mode 100644 index 0000000000..6354be632d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/fluids/ItemGenericFluidBucket.java @@ -0,0 +1,319 @@ +package gtPlusPlus.core.fluids; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.eventhandler.Event; +import gtPlusPlus.api.objects.GregtechException; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBucket; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.FillBucketEvent; + +public class ItemGenericFluidBucket extends ItemBucket { + + private static IIcon mBaseBucketTexture; + private static IIcon mOverlayBucketTexture; + private static AutoMap mInternalFluidCache = new AutoMap(); + + public ItemGenericFluidBucket(Block aFluid) { + super(aFluid); + this.setContainerItem(Items.bucket); + this.maxStackSize = 1; + mInternalFluidCache.put(aFluid); + } + + public static ItemStack registerFluidForBucket(int aID) { + + if (FluidFactory.mMetaToBucketMap.containsKey(aID)) { + try { + throw new GregtechException(""+aID+" is already registered! Unable to register fluid: "+FluidFactory.mMetaToFluidMap.get(aID).getLocalizedName()); + } catch (GregtechException e) { + e.printStackTrace(); + CORE.crash(""+aID+" is already registered! Unable to register fluid: "+FluidFactory.mMetaToFluidMap.get(aID).getLocalizedName()); + } + } + mInternalFluidCache.put(FluidFactory.mMetaToBlockMap.get(aID)); + return ItemUtils.simpleMetaStack(FluidFactory.mGenericBucket, aID, 1); + } + + Map mIconCache = new LinkedHashMap(); + + /** + * Called whenever this item is equipped and the right mouse button is pressed. + * Args: itemStack, world, entityPlayer + */ + public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + + Block isFull = FluidFactory.mMetaToBlockMap.get(aStack.getItemDamage()); + + boolean flag = isFull == Blocks.air; + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(aWorld, aPlayer, flag); + + if (movingobjectposition == null || isFull == null) { + return aStack; + } else { + FillBucketEvent event = new FillBucketEvent(aPlayer, aStack, aWorld, movingobjectposition); + if (MinecraftForge.EVENT_BUS.post(event)) { + return aStack; + } + + if (event.getResult() == Event.Result.ALLOW) { + if (aPlayer.capabilities.isCreativeMode) { + return aStack; + } + + if (--aStack.stackSize <= 0) { + return event.result; + } + + if (!aPlayer.inventory.addItemStackToInventory(event.result)) { + aPlayer.dropPlayerItemWithRandomChoice(event.result, false); + } + + return aStack; + } + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!aWorld.canMineBlock(aPlayer, i, j, k)) { + return aStack; + } + + if (flag) { + if (!aPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, aStack)) { + return aStack; + } + + Material material = aWorld.getBlock(i, j, k).getMaterial(); + int l = aWorld.getBlockMetadata(i, j, k); + + if (material == Material.water && l == 0) { + aWorld.setBlockToAir(i, j, k); + return this.func_150910_a(aStack, aPlayer, Items.water_bucket); + } + + if (material == Material.lava && l == 0) { + aWorld.setBlockToAir(i, j, k); + return this.func_150910_a(aStack, aPlayer, Items.lava_bucket); + } + } else { + if (isFull == Blocks.air) { + return new ItemStack(Items.bucket); + } + + if (movingobjectposition.sideHit == 0) { + --j; + } + + if (movingobjectposition.sideHit == 1) { + ++j; + } + + if (movingobjectposition.sideHit == 2) { + --k; + } + + if (movingobjectposition.sideHit == 3) { + ++k; + } + + if (movingobjectposition.sideHit == 4) { + --i; + } + + if (movingobjectposition.sideHit == 5) { + ++i; + } + + if (!aPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, aStack)) { + return aStack; + } + + if (this.tryPlaceContainedLiquid(isFull, aWorld, i, j, k) && !aPlayer.capabilities.isCreativeMode) { + return new ItemStack(Items.bucket); + } + } + } + + return aStack; + } + } + + private ItemStack func_150910_a(ItemStack p_150910_1_, EntityPlayer p_150910_2_, Item p_150910_3_) { + if (p_150910_2_.capabilities.isCreativeMode) { + return p_150910_1_; + } else if (--p_150910_1_.stackSize <= 0) { + return new ItemStack(p_150910_3_); + } else { + if (!p_150910_2_.inventory.addItemStackToInventory(new ItemStack(p_150910_3_))) { + p_150910_2_.dropPlayerItemWithRandomChoice(new ItemStack(p_150910_3_, 1, 0), false); + } + + return p_150910_1_; + } + } + + /** + * Attempts to place the liquid contained inside the bucket. + */ + public boolean tryPlaceContainedLiquid(Block isFull, World aWorld, int aX, int aY, int aZ) { + if (isFull == Blocks.air) { + return false; + } else { + Material material = aWorld.getBlock(aX, aY, aZ).getMaterial(); + boolean flag = !material.isSolid(); + + if (!aWorld.isAirBlock(aX, aY, aZ) && !flag) { + return false; + } else { + + if (!aWorld.isRemote && flag && !material.isLiquid()) { + aWorld.func_147480_a(aX, aY, aZ, true); + } + + aWorld.setBlock(aX, aY, aZ, isFull, 0, 3); + + return true; + } + } + } + + @Override + public IIcon getIconFromDamage(int aMeta) { + IIcon aTemp = mIconCache.get(aMeta); + return aTemp != null ? aTemp : super.getIconFromDamage(aMeta); + } + + @Override + public boolean getHasSubtypes() { + return mInternalFluidCache.size() > 0; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + list.add(new ItemStack(item, 1, 0)); + for (Block f : mInternalFluidCache) { + Integer aMeta; + if (f != null) { + aMeta = FluidFactory.mBlockToMetaMap.get(f); + if (aMeta != null) { + list.add(new ItemStack(item, 1, aMeta)); + } + } + } + } + + @Override + public int getMaxDamage() { + return 512; + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + // TODO Auto-generated method stub + super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + if (stack != null && renderPass == 1) { + return mOverlayBucketTexture; + } + else { + return mBaseBucketTexture; + } + /*IIcon aTemp = mIconCache.get(stack.getItemDamage()); + return aTemp != null ? aTemp : super.getIcon(stack, renderPass, player, usingItem, useRemaining);*/ + } + + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + return false; + } + + @Override + public int getMaxDamage(ItemStack stack) { + return 512; + } + + @Override + public boolean isDamaged(ItemStack stack) { + return false; + } + + @Override + public int getItemEnchantability(ItemStack stack) { + return 0; + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + if (pass == 1) { + return mOverlayBucketTexture; + } + else { + return mBaseBucketTexture; + } + } + + @Override + public void registerIcons(final IIconRegister i) { + mBaseBucketTexture = i.registerIcon("bucket_empty"); + mOverlayBucketTexture = i.registerIcon(CORE.MODID+":bucket.generic.overlay"); + } + + @Override + public boolean tryPlaceContainedLiquid(World p_77875_1_, int p_77875_2_, int p_77875_3_, int p_77875_4_) { + return tryPlaceContainedLiquid(Blocks.air, p_77875_1_, p_77875_2_, p_77875_3_, p_77875_4_); + } + + @Override + public int getColorFromItemStack(ItemStack aStack, int aPass) { + if (aPass == 0) { + return super.getColorFromItemStack(aStack, aPass); + } + else { + return FluidFactory.mMetaToColourMap.get(aStack.getItemDamage()); + } + } + + @Override + public boolean requiresMultipleRenderPasses() { + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java b/src/main/java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java new file mode 100644 index 0000000000..aa10363e7c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/GUI_Base_Tile_Entity.java @@ -0,0 +1,15 @@ +package gtPlusPlus.core.gui; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.inventory.Container; + +public abstract class GUI_Base_Tile_Entity extends GuiContainer { + + public final Container mContainer; + + public GUI_Base_Tile_Entity(Container aContainer) { + super(aContainer); + mContainer = aContainer; + } + +} diff --git a/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java b/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java new file mode 100644 index 0000000000..1212054f01 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/beta/Gui_ID_Registry.java @@ -0,0 +1,56 @@ +package gtPlusPlus.core.gui.beta; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import gtPlusPlus.core.interfaces.IGuiManagerMiscUtils; + +public class Gui_ID_Registry +{ + private static final Map, MU_GuiId> classMap = new HashMap, MU_GuiId>(); + private static final Map idMap = new HashMap(); + private static int nextId = 0; + + static + { + //registerGuiHandlers(Gui_Types.Tile, Arrays.asList(new Class[] {TileAlveary.class})); + //registerGuiHandlers(MU_GuiType.Item, Arrays.asList(new Class[] { ItemBackpack.class, ItemBackpackNaturalist.class, ItemBeealyzer.class, ItemCatalogue.class, ItemFlutterlyzer.class, ItemHabitatLocator.class, ItemImprinter.class, ItemInfuser.class, ItemLetter.class, ItemSolderingIron.class, ItemTreealyzer.class })); + //registerGuiHandlers(MU_GuiType.Entity, Arrays.asList(new Class[] { EntityMinecartApiary.class, EntityMinecartBeehouse.class })); + } + + private static void registerGuiHandlers(final Gui_Types MU_GuiType, final List> guiHandlerClasses) + { + for (final Class tileGuiHandlerClass : guiHandlerClasses) + { + final MU_GuiId guiId = new MU_GuiId(nextId++, MU_GuiType, tileGuiHandlerClass); + classMap.put(tileGuiHandlerClass, guiId); + idMap.put(Integer.valueOf(guiId.getId()), guiId); + } + } + + public static MU_GuiId getGuiIdForGuiHandler(final IGuiManagerMiscUtils guiHandler) + { + final Class guiHandlerClass = guiHandler.getClass(); + MU_GuiId guiId = classMap.get(guiHandlerClass); + if (guiId == null) { + for (final Map.Entry, MU_GuiId> classGuiIdEntry : classMap.entrySet()) { + if (((Class)classGuiIdEntry.getKey()).isAssignableFrom(guiHandlerClass)) + { + guiId = classGuiIdEntry.getValue(); + break; + } + } + } + if (guiId == null) { + throw new IllegalStateException("No gui ID for gui handler: " + guiHandler); + } + return guiId; + } + + public static MU_GuiId getGuiId(final int id) + { + return idMap.get(Integer.valueOf(id)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/gui/beta/Gui_Types.java b/src/main/java/gtPlusPlus/core/gui/beta/Gui_Types.java new file mode 100644 index 0000000000..9348f40c9c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/beta/Gui_Types.java @@ -0,0 +1,8 @@ +package gtPlusPlus.core.gui.beta; + +public enum Gui_Types +{ + Item, Tile, Entity; + + private Gui_Types() {} +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/beta/MU_GuiId.java b/src/main/java/gtPlusPlus/core/gui/beta/MU_GuiId.java new file mode 100644 index 0000000000..116ad48480 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/beta/MU_GuiId.java @@ -0,0 +1,32 @@ +package gtPlusPlus.core.gui.beta; +import gtPlusPlus.core.interfaces.IGuiManagerMiscUtils; + +public class MU_GuiId +{ + private final int id; + private final Gui_Types MU_GuiType; + private final Class guiHandlerClass; + + MU_GuiId(final int id, final Gui_Types MU_GuiType, final Class guiHandlerClass) + { + this.id = id; + this.MU_GuiType = MU_GuiType; + this.guiHandlerClass = guiHandlerClass; + } + + public Gui_Types getGuiType() + { + return this.MU_GuiType; + } + + public Class getGuiHandlerClass() + { + return this.guiHandlerClass; + } + + public int getId() + { + return this.id; + } +} + diff --git a/src/main/java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java b/src/main/java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java new file mode 100644 index 0000000000..0ad4b9b51f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/GuiBaseBackpack.java @@ -0,0 +1,121 @@ +package gtPlusPlus.core.gui.item; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_BackpackBase; +import gtPlusPlus.core.inventories.BaseInventoryBackpack; +import gtPlusPlus.core.lib.CORE; + +public class GuiBaseBackpack extends GuiContainer +{ + /** x and y size of the inventory window in pixels. Defined as float, passed as int + * These are used for drawing the player model. */ + private float xSize_lo; + private float ySize_lo; + + /** The FontRenderer used by GuiScreen */ + protected FontRenderer fontRenderer; + + /** ResourceLocation takes 2 parameters: ModId, path to texture at the location: + * "src/minecraft/assets/modid/" + * + * I have provided a sample texture file that works with this tutorial. Download it + * from Forge_Tutorials/textures/gui/ + */ + private static final ResourceLocation iconLocation = new ResourceLocation(CORE.MODID, "textures/gui/itemBackpack.png"); + + /** The inventory to render on screen */ + private final BaseInventoryBackpack inventory; + + public GuiBaseBackpack(final Container_BackpackBase containerItem) + { + super(containerItem); + this.inventory = containerItem.inventory; + } + + /** + * Draws the screen and all the components in it. + */ + @Override + public void drawScreen(final int par1, final int par2, final float par3) + { + super.drawScreen(par1, par2, par3); + this.xSize_lo = par1; + this.ySize_lo = par2; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the items) + */ + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) + { + final String s = this.inventory.hasCustomInventoryName() ? this.inventory.getInventoryName() : this.inventory.getInventoryName(); + //this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 0, 4210752); + //this.fontRenderer.drawString(I18n.translate("container.inventory"), 26, this.ySize - 96 + 4, 4210752); + } + + /** + * Draw the background layer for the GuiContainer (everything behind the items) + */ + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(iconLocation); + final int k = (this.width - this.xSize) / 2; + final int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + final int i1; + drawPlayerModel(k + 51, l + 75, 30, k + 51 - this.xSize_lo, (l + 75) - 50 - this.ySize_lo, this.mc.thePlayer); + } + + /** + * This renders the player model in standard inventory position (in later versions of Minecraft / Forge, you can + * simply call GuiInventory.drawEntityOnScreen directly instead of copying this code) + */ + public static void drawPlayerModel(final int x, final int y, final int scale, final float yaw, final float pitch, final EntityLivingBase entity) { + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + GL11.glPushMatrix(); + GL11.glTranslatef(x, y, 50.0F); + GL11.glScalef(-scale, scale, scale); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + final float f2 = entity.renderYawOffset; + final float f3 = entity.rotationYaw; + final float f4 = entity.rotationPitch; + final float f5 = entity.prevRotationYawHead; + final float f6 = entity.rotationYawHead; + GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); + GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-((float) Math.atan(pitch / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F); + entity.renderYawOffset = (float) Math.atan(yaw / 40.0F) * 20.0F; + entity.rotationYaw = (float) Math.atan(yaw / 40.0F) * 40.0F; + entity.rotationPitch = -((float) Math.atan(pitch / 40.0F)) * 20.0F; + entity.rotationYawHead = entity.rotationYaw; + entity.prevRotationYawHead = entity.rotationYaw; + GL11.glTranslatef(0.0F, entity.yOffset, 0.0F); + RenderManager.instance.playerViewY = 180.0F; + RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); + entity.renderYawOffset = f2; + entity.rotationYaw = f3; + entity.rotationPitch = f4; + entity.prevRotationYawHead = f5; + entity.rotationYawHead = f6; + GL11.glPopMatrix(); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); + GL11.glDisable(GL11.GL_TEXTURE_2D); + OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + } +} diff --git a/src/main/java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java b/src/main/java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java new file mode 100644 index 0000000000..ed347e8d30 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java @@ -0,0 +1,564 @@ +package gtPlusPlus.core.gui.item; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreenBook; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ResourceLocation; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.container.Container_Grindle; +import gtPlusPlus.core.inventories.BaseInventoryGrindle; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class GuiBaseGrindle extends GuiContainer { + + /** The FontRenderer used by GuiScreen */ + protected FontRenderer fontRenderer; + + private GrindleGuiButton mButtonNextPage; + private GrindleGuiButton mButtonPreviousPage; + private String[][] mPageDataArray; + private short mCurrentPage = 0; + + private static final ResourceLocation iconLocation = new ResourceLocation(CORE.MODID, "textures/gui/itemGrindle.png"); + + /** The inventory to render on screen */ + private final BaseInventoryGrindle inventory; + + public GuiBaseGrindle(final Container_Grindle containerItem) { + super(containerItem); + this.inventory = containerItem.inventory; + } + + /** + * Draws the screen and all the components in it. + */ + @Override + public void drawScreen(final int par1, final int par2, final float par3) { + super.drawScreen(par1, par2, par3); + this.updateButtons(); + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the + * items) + */ + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + + try { + + // Title + this.fontRendererObj.drawStringWithShadow(I18n.format("Gregtech Information Transponder", new Object[0]), 0, + -12, Utils.rgbtoHexValue(255, 255, 255)); + ItemStack aStack = this.inventory.getStackInSlot(0); + + if (aStack != null) { + + GrindleData aDataCurrent = new GrindleData(aStack); + + if (aDataCurrent.mValid) { + + // Debug NBT Information + //NBTUtils.tryIterateNBTData(aStack); + + this.fontRendererObj.drawString(I18n.format(aDataCurrent.mTitle), 10, 8, Utils.rgbtoHexValue(125, 255, 125)); + + int tTier = aDataCurrent.mExtraInformation; + if (tTier >= 0) { + //Draw the GUI + // List prospection + this.fontRendererObj.drawString(I18n.format(aDataCurrent.mTierDim+" | Page: "+this.mCurrentPage, new Object[0]), 10, 18, Utils.rgbtoHexValue(125, 255, 125)); + // Divider + this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 23, Utils.rgbtoHexValue(125, 125, 255)); + // Pos data + this.fontRendererObj.drawString(I18n.format(aDataCurrent.mPosInfo, new Object[0]), 10, 29, Utils.rgbtoHexValue(125, 125, 255)); + // Divider + this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 35, Utils.rgbtoHexValue(125, 125, 255)); + int aLastYUsed = 41; + + int posOuter = 0; + int posInner = 0; + + mPageDataArray = new String[MathUtils.roundToClosestInt(Math.ceil(aDataCurrent.mListData.size() / 9.00))][9]; + for (String e : aDataCurrent.mListData) { + if (e != null) { + mPageDataArray[posInner][posOuter] = e; + if (posOuter < 8) { + posOuter++; + } + else { + posOuter = 0; + posInner++; + } + } + else { + continue; + } + } + + String[] aCurrentPage = mPageDataArray[this.mCurrentPage]; + + if (aCurrentPage != null) { + //Logger.INFO("valid Current page " + this.mCurrentPage); + if (aCurrentPage.length > 0) { + for (int i=0;i 0) { + if (!aCP.toLowerCase().contains("empty") && !aCP.toLowerCase().contains("null")) { + this.fontRendererObj.drawString(I18n.format(aCP), 10, aLastYUsed, Utils.rgbtoHexValue(125, 255, 125)); + aLastYUsed += 9; + } + } + } + } + } + } + + + + + } + + //Non-Prospecting Data + else { + //Draw the GUI + // List prospection + this.fontRendererObj.drawString(I18n.format(aDataCurrent.mTierDim, new Object[0]), 10, 18, Utils.rgbtoHexValue(125, 255, 125)); + // Divider + this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 23, Utils.rgbtoHexValue(125, 125, 255)); + // Pos data + this.fontRendererObj.drawString(I18n.format(aDataCurrent.mPosInfo, new Object[0]), 10, 29, Utils.rgbtoHexValue(125, 125, 255)); + // Divider + this.fontRendererObj.drawString(I18n.format("-------------------", new Object[0]), 10, 35, Utils.rgbtoHexValue(125, 125, 255)); + int aLastYUsed = 41; + /*for (int i=0;i= 0) { + if (this.mPageDataArray != null) { + if (this.mCurrentPage < (this.mPageDataArray.length - 1)) { + this.mButtonNextPage.visible = true; + } else { + this.mButtonNextPage.visible = false; + } + } else { + this.mButtonNextPage.visible = false; + } + } + if (this.mCurrentPage > 0) { + this.mButtonPreviousPage.visible = true; + } + else { + this.mButtonPreviousPage.visible = false; + } + } + + + /** + * Scrolling Related + */ + @Override + protected void actionPerformed(GuiButton aButton) { + if (aButton.enabled && aButton.visible) { + if (aButton.id == 1) { + if (this.mCurrentPage < this.mPageDataArray.length - 1) { + ++this.mCurrentPage; + } + } else if (aButton.id == 2) { + if (this.mCurrentPage > 0) { + --this.mCurrentPage; + } + } + this.updateButtons(); + } + } + + /** + * Handles mouse input. + */ + @Override + public void handleMouseInput() { + super.handleMouseInput(); + int i = Mouse.getEventDWheel(); + /* + * if (i != 0) { + * + * + * this.currentScroll = (float) ((double) this.currentScroll - (double) i / + * (double) j); + * + * if (this.currentScroll < 0.0F) { this.currentScroll = 0.0F; } + * + * if (this.currentScroll > 1.0F) { this.currentScroll = 1.0F; } + * + * this.scrollTo(this.currentScroll); } + */ + } + + /** + * Called when the mouse is moved or a mouse button is released. Signature: + * (mouseX, mouseY, which) which==-1 is mouseMove, which==0 or which==1 is + * mouseUp + */ + @Override + protected void mouseMovedOrUp(int p_146286_1_, int p_146286_2_, int p_146286_3_) { + /* + * if (p_146286_3_ == 0) { int l = p_146286_1_ - this.guiLeft; int i1 = + * p_146286_2_ - this.guiTop; CreativeTabs[] acreativetabs = + * CreativeTabs.creativeTabArray; int j1 = acreativetabs.length; + * + * for (int k1 = 0; k1 < j1; ++k1) { CreativeTabs creativetabs = + * acreativetabs[k1]; + * + * if (creativetabs != null && this.func_147049_a(creativetabs, l, i1)) { + * this.setCurrentCreativeTab(creativetabs); return; } } } + */ + + super.mouseMovedOrUp(p_146286_1_, p_146286_2_, p_146286_3_); + } + + /** + * Allows Mouseover Tooltips + */ + @Override + protected void renderToolTip(ItemStack aStack, int p_146285_2_, int p_146285_3_) { + super.renderToolTip(aStack, p_146285_2_, p_146285_3_); + } + + /** + * Custom Buttons + */ + + @SideOnly(Side.CLIENT) + static class GrindleGuiButton extends GuiButton { + + public static final ResourceLocation mBookTexture; + + static { + ResourceLocation r; + try { + r = (ResourceLocation) ReflectionUtils.getField(GuiScreenBook.class, "bookGuiTextures").get(null); + + } catch (IllegalArgumentException | IllegalAccessException e) { + r = new ResourceLocation("textures/gui/book.png"); + } + mBookTexture = r; + } + + private final boolean aPageForward; + + public GrindleGuiButton(int aID, int aX, int aY, boolean aForwards) { + this(aID, aX, aY, 20, 12, aForwards); + } + + public GrindleGuiButton(int aID, int aX, int aY, int aWidth, int aHeight, boolean aForwards) { + super(aID, aX, aY, aWidth, aHeight, ""); + this.aPageForward = aForwards; + } + + /** + * Draws this button to the screen. + */ + public void drawButton(Minecraft aGame, int aX, int aY) { + if (this.visible) { + boolean flag = aX >= this.xPosition && aY >= this.yPosition + && aX < this.xPosition + this.width && aY < this.yPosition + this.height; + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + aGame.getTextureManager().bindTexture(iconLocation); + int k = 0; + int l = 192; + + if (flag) { + k += 23; + } + + if (!this.aPageForward) { + l += 13; + } + + this.drawTexturedModalRect(this.xPosition, this.yPosition, k, l, 22, 12); + } + } + } + + + public static class GrindleData { + + public static enum GrindleMode { + PROSPECTING(0), + ELEMENT(1); + private final int aModeID; + private GrindleMode (final int aMode) + { + this.aModeID = aMode; + } + + public int getMode() { + return this.aModeID; + } + } + + final boolean mValid; + final ItemStack mStack; + final String mTitle, mPosInfo, mTierDim; + final AutoMap mListData; + final GrindleMode mMode; + final int mExtraInformation; + + + public GrindleData(ItemStack iStack) { + + if (iStack == null) { + mValid = false; + mStack = null; + mTitle = null; + mListData = null; + mMode = null; + mExtraInformation = 0; + this.mTierDim = ""; + this.mPosInfo = ""; + } else { + + this.mStack = iStack; + + int aType = -1; + boolean isProspecting = false; + + // If Input stack is a Data stick/Orb, set a valid type. + if (GT_Utility.areStacksEqual(iStack, CI.getDataStick(), true)) { + aType = 0; + } else if (GT_Utility.areStacksEqual(iStack, CI.getDataOrb(), true)) { + aType = 1; + } + + NBTTagCompound tNBT = iStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + + mTitle = tNBT.hasKey("title") ? tNBT.getString("title") + : (aType == 0 ? "Empty Data Stick" : (aType == 1 ? "Empty Data Orb" : "Unknown Item")); + if (mTitle.toLowerCase().contains("raw prospection data")) { + isProspecting = true; + } + + byte tTier = -1; + if (isProspecting) { + if (!tNBT.hasKey("prospection_tier") && tNBT.hasKey("prospection")) { + tTier = 0; + } else if (tNBT.hasKey("prospection_tier") && !tNBT.hasKey("prospection")) { + tTier = tNBT.getByte("prospection_tier"); + } + } + + mExtraInformation = isProspecting ? tTier : -1; + + if (tTier >= 0) { + String xPos, yPos, zPos, aDim; + String aPositionString, aInfoString; + Set aOreTypes = new LinkedHashSet(); + Set aOilTypes = new LinkedHashSet(); + + // Set variables that are shared between prospection types. + if (tTier == 0) { + String tData = tNBT.getString("prospection"); + String[] tDataArray = tData.split(","); + xPos = tDataArray[0]; + yPos = tDataArray[1]; + zPos = tDataArray[2]; + aDim = tDataArray[3]; + aOilTypes.add("Oil Type: " + tDataArray[5]); + aOilTypes.add("--------------------"); + aOreTypes.add("Ore Types: "); + for (int i = 6; tDataArray.length > i; i++) { + aOreTypes.add("-" + tDataArray[i]); + } + } else { + String tPos = tNBT.getString("prospection_pos"); + String[] tPosData = tPos.split(" "); + xPos = tPosData[1]; + yPos = tPosData[3]; + zPos = tPosData[5]; + aDim = tPosData[7]; + // Oil + String tOil = tNBT.getString("prospection_oils"); + String[] tOilData = tOil.split("\\|"); + if (tOilData.length > 0) { + aOilTypes.add("Oil Types:"); + for (String s : tOilData) { + if (s != null) { + aOilTypes.add(s); + } + } + aOilTypes.add("--------------------"); + } + + // Near + String tOresNear = tNBT.getString("prospection_near"); + String[] tOresNearData = tOresNear.split("\\|"); + // Middle + String tOresMid = tNBT.getString("prospection_middle"); + String[] tOresMidData = tOresMid.split("\\|"); + // Far + String tOresFar = tNBT.getString("prospection_far"); + String[] tOresFarData = tOresFar.split("\\|"); + + if ((tOresNearData.length + tOresMidData.length + tOresFarData.length) > 0) { + aOreTypes.add("Ore Types:"); + if (tOresNearData.length > 0) { + for (String s : tOresNearData) { + if (s != null) { + aOreTypes.add("-" + s + " - Near"); + } + } + } + if (tOresMidData.length > 0) { + for (String s : tOresMidData) { + if (s != null) { + aOreTypes.add("-" + s + " - Mid"); + } + } + } + if (tOresFarData.length > 0) { + for (String s : tOresFarData) { + if (s != null) { + aOreTypes.add("-" + s + " - Far"); + } + } + } + } + } + + mListData = new AutoMap(); + if (aOilTypes.size() > 0) { + for (String aOils : aOilTypes) { + if (aOils != null && aOils.length() > 0) { + mListData.put(aOils); + } + } + } + + if (aOreTypes.size() > 0) { + for (String aOres : aOreTypes) { + if (aOres != null && aOres.length() > 0) { + mListData.put(aOres); + } + } + } + + // Set Types + mMode = GrindleMode.PROSPECTING; + this.mTierDim = (aInfoString = "Tier: " + tTier + " | Dim: " + aDim); + this.mPosInfo = (aPositionString = "X:" + xPos + ", Y:" + yPos + ", Z:" + zPos); + this.mValid = true; + } + + // Non-Prospectic Data + else { + mValid = true; + mListData = null; + mMode = GrindleMode.ELEMENT; + this.mTierDim = "PLACEHOLDER"; + this.mPosInfo = "PLACEHOLDER"; + } + + } + + } + + } + + +} diff --git a/src/main/java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java b/src/main/java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java new file mode 100644 index 0000000000..cf94fbbb84 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/GuiScreenGrindle.java @@ -0,0 +1,490 @@ +package gtPlusPlus.core.gui.item; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.network.PacketBuffer; +import net.minecraft.network.play.client.C17PacketCustomPayload; +import net.minecraft.util.ChatAllowedCharacters; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_Grindle; +import gtPlusPlus.core.inventories.BaseInventoryGrindle; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; + +@SideOnly(Side.CLIENT) +public class GuiScreenGrindle extends GuiContainer { + private static final Logger logger = LogManager.getLogger(); + private static final ResourceLocation bookGuiTextures = new ResourceLocation("textures/gui/book.png"); + /** The player editing the book */ + private final EntityPlayer editingPlayer; + private final ItemStack bookObj; + /** Whether the book is signed or can still be edited */ + private final boolean bookIsUnsigned; + private boolean field_146481_r; + private boolean field_146480_s; + /** Update ticks since the gui was opened */ + private int updateCount; + private final int bookImageWidth = 192; + private final int bookImageHeight = 192; + private int bookTotalPages = 1; + private int currPage; + private NBTTagList bookPages; + private String bookTitle = ""; + private GuiScreenGrindle.NextPageButton buttonNextPage; + private GuiScreenGrindle.NextPageButton buttonPreviousPage; + private GuiButton buttonDone; + /** The GuiButton to sign this book. */ + private GuiButton buttonSign; + private GuiButton buttonFinalize; + private GuiButton buttonCancel; + + // Texture + private static final ResourceLocation iconLocation = new ResourceLocation(CORE.MODID, + "textures/gui/itemGrindle.png"); + + /** The inventory to render on screen */ + private final BaseInventoryGrindle inventory; + + public GuiScreenGrindle(final Container_Grindle containerItem, final EntityPlayer player) { + super(containerItem); + this.inventory = containerItem.inventory; + this.editingPlayer = player; + this.bookObj = this.inventory.getStackInSlot(0); + this.bookIsUnsigned = (this.bookObj == null ? true : false); + + if (this.bookObj != null) { + if (this.bookObj.hasTagCompound()) { + final NBTTagCompound nbttagcompound = this.bookObj.getTagCompound(); + this.bookPages = nbttagcompound.getTagList("pages", 8); + + if (this.bookPages != null) { + this.bookPages = (NBTTagList) this.bookPages.copy(); + this.bookTotalPages = this.bookPages.tagCount(); + + if (this.bookTotalPages < 1) { + this.bookTotalPages = 1; + } + } + } + + + if ((this.bookPages == null) && this.bookIsUnsigned) { this.bookPages = + new NBTTagList(); this.bookPages.appendTag(new NBTTagString("")); + this.bookTotalPages = 1; } + + } + } + + /** + * Called from the main game loop to update the screen. + */ + @Override + public void updateScreen() { + super.updateScreen(); + ++this.updateCount; + } + + /** + * Adds the buttons (and other controls) to the screen in question. + */ + @Override + @SuppressWarnings("unchecked") + public void initGui() { + this.buttonList.clear(); + Keyboard.enableRepeatEvents(true); + + if (this.bookIsUnsigned) { + this.buttonList.add(this.buttonSign = new GuiButton(3, (this.width / 2) - 100, 4 + this.bookImageHeight, 98, + 20, I18n.format("book.signButton", new Object[0]))); + this.buttonList.add(this.buttonDone = new GuiButton(0, (this.width / 2) + 2, this.bookImageHeight-4, 98, + 20, I18n.format("gui.close", new Object[0]))); + this.buttonList.add(this.buttonFinalize = new GuiButton(5, (this.width / 2) - 100, 4 + this.bookImageHeight, + 98, 20, I18n.format("book.finalizeButton", new Object[0]))); + this.buttonList.add(this.buttonCancel = new GuiButton(4, (this.width / 2) + 2, 4 + this.bookImageHeight, 98, + 20, I18n.format("gui.cancel", new Object[0]))); + } + else { + this.buttonList.add(this.buttonDone = new GuiButton(0, (this.width / 2) - 100, this.bookImageHeight+100, + 200, 20, I18n.format("gui.done", new Object[0]))); + } + + final int i = (this.width - this.bookImageWidth) / 2; + final byte b0 = 2; + this.buttonList.add(this.buttonNextPage = new GuiScreenGrindle.NextPageButton(1, i + 120, b0 + 154, true)); + this.buttonList.add(this.buttonPreviousPage = new GuiScreenGrindle.NextPageButton(2, i + 38, b0 + 154, false)); + this.updateButtons(); + } + + /** + * Called when the screen is unloaded. Used to disable keyboard repeat + * events + */ + @Override + public void onGuiClosed() { + Keyboard.enableRepeatEvents(false); + } + + private void updateButtons() { + this.buttonNextPage.visible = !this.field_146480_s + && ((this.currPage < (this.bookTotalPages - 1)) || this.bookIsUnsigned); + this.buttonPreviousPage.visible = !this.field_146480_s && (this.currPage > 0); + this.buttonDone.visible = !this.bookIsUnsigned || !this.field_146480_s; + + if (this.bookIsUnsigned) { + this.buttonSign.visible = !this.field_146480_s; + this.buttonCancel.visible = this.field_146480_s; + this.buttonFinalize.visible = this.field_146480_s; + this.buttonFinalize.enabled = this.bookTitle.trim().length() > 0; + } + } + + private void sendBookToServer(final boolean p_146462_1_) { + if (this.bookIsUnsigned && this.field_146481_r) { + if (this.bookPages != null) { + String s; + + while (this.bookPages.tagCount() > 1) { + s = this.bookPages.getStringTagAt(this.bookPages.tagCount() - 1); + + if (s.length() != 0) { + break; + } + + this.bookPages.removeTag(this.bookPages.tagCount() - 1); + } + + if (this.bookObj.hasTagCompound()) { + final NBTTagCompound nbttagcompound = this.bookObj.getTagCompound(); + nbttagcompound.setTag("pages", this.bookPages); + } + else { + this.bookObj.setTagInfo("pages", this.bookPages); + } + + s = "MC|BEdit"; + + if (p_146462_1_) { + s = "MC|BSign"; + this.bookObj.setTagInfo("author", new NBTTagString(this.editingPlayer.getCommandSenderName())); + this.bookObj.setTagInfo("title", new NBTTagString(this.bookTitle.trim())); + this.bookObj.func_150996_a(ModItems.itemGrindleTablet); + } + + final ByteBuf bytebuf = Unpooled.buffer(); + + try { + (new PacketBuffer(bytebuf)).writeItemStackToBuffer(this.bookObj); + this.mc.getNetHandler().addToSendQueue(new C17PacketCustomPayload(s, bytebuf)); + } + catch (final Exception exception) { + logger.error("Couldn\'t send book info", exception); + } + finally { + bytebuf.release(); + } + } + } + } + + @Override + protected void actionPerformed(final GuiButton button) { + if (button.enabled) { + if (button.id == 0) { + this.mc.displayGuiScreen((GuiScreen) null); + this.sendBookToServer(false); + } + else if ((button.id == 3) && this.bookIsUnsigned) { + this.field_146480_s = true; + } + else if (button.id == 1) { + if (this.currPage < (this.bookTotalPages - 1)) { + ++this.currPage; + } + else if (this.bookIsUnsigned) { + this.addNewPage(); + + if (this.currPage < (this.bookTotalPages - 1)) { + ++this.currPage; + } + } + } + else if (button.id == 2) { + if (this.currPage > 0) { + --this.currPage; + } + } + else if ((button.id == 5) && this.field_146480_s) { + this.sendBookToServer(true); + this.mc.displayGuiScreen((GuiScreen) null); + } + else if ((button.id == 4) && this.field_146480_s) { + this.field_146480_s = false; + } + + this.updateButtons(); + } + } + + private void addNewPage() { + if ((this.bookPages != null) && (this.bookPages.tagCount() < 50)) { + this.bookPages.appendTag(new NBTTagString("")); + ++this.bookTotalPages; + this.field_146481_r = true; + } + } + + /** + * Fired when a key is typed. This is the equivalent of + * KeyListener.keyTyped(KeyEvent e). + */ + @Override + protected void keyTyped(final char p_73869_1_, final int p_73869_2_) { + super.keyTyped(p_73869_1_, p_73869_2_); + + if (this.bookIsUnsigned) { + if (this.field_146480_s) { + this.func_146460_c(p_73869_1_, p_73869_2_); + } + else { + this.keyTypedInBook(p_73869_1_, p_73869_2_); + } + } + } + + /** + * Processes keystrokes when editing the text of a book + */ + private void keyTypedInBook(final char p_146463_1_, final int p_146463_2_) { + switch (p_146463_1_) { + case 22: + this.func_146459_b(GuiScreen.getClipboardString()); + return; + default: + switch (p_146463_2_) { + case 14: + final String s = this.func_146456_p(); + + if (s.length() > 0) { + this.func_146457_a(s.substring(0, s.length() - 1)); + } + + return; + case 28: + case 156: + this.func_146459_b("\n"); + return; + default: + if (ChatAllowedCharacters.isAllowedCharacter(p_146463_1_)) { + this.func_146459_b(Character.toString(p_146463_1_)); + } + } + } + } + + private void func_146460_c(final char p_146460_1_, final int p_146460_2_) { + switch (p_146460_2_) { + case 14: + if (!this.bookTitle.isEmpty()) { + this.bookTitle = this.bookTitle.substring(0, this.bookTitle.length() - 1); + this.updateButtons(); + } + + return; + case 28: + case 156: + if (!this.bookTitle.isEmpty()) { + this.sendBookToServer(true); + this.mc.displayGuiScreen((GuiScreen) null); + } + + return; + default: + if ((this.bookTitle.length() < 16) && ChatAllowedCharacters.isAllowedCharacter(p_146460_1_)) { + this.bookTitle = this.bookTitle + Character.toString(p_146460_1_); + this.updateButtons(); + this.field_146481_r = true; + } + } + } + + private String func_146456_p() { + return (this.bookPages != null) && (this.currPage >= 0) && (this.currPage < this.bookPages.tagCount()) + ? this.bookPages.getStringTagAt(this.currPage) : ""; + } + + private void func_146457_a(final String p_146457_1_) { + if ((this.bookPages != null) && (this.currPage >= 0) && (this.currPage < this.bookPages.tagCount())) { + this.bookPages.func_150304_a(this.currPage, new NBTTagString(p_146457_1_)); + this.field_146481_r = true; + } + } + + private void func_146459_b(final String p_146459_1_) { + final String s1 = this.func_146456_p(); + final String s2 = s1 + p_146459_1_; + final int i = this.fontRendererObj.splitStringWidth(s2 + "" + EnumChatFormatting.BLACK + "_", 118); + + if ((i <= 118) && (s2.length() < 256)) { + this.func_146457_a(s2); + } + } + + /** + * Draws the screen and all the components in it. + */ + @Override + public void drawScreen(final int p_73863_1_, final int p_73863_2_, final float p_73863_3_) { + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(iconLocation); + final int k = (this.width - this.xSize) / 2; + final int l2 = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l2, 0, 0, this.xSize, this.ySize); + + //GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + //this.mc.getTextureManager().bindTexture(iconLocation); + //final int k = (this.width - this.bookImageWidth) / 2; + //this.drawTexturedModalRect(k, b0, 0, 0, this.bookImageWidth, + // this.bookImageHeight); + + String s; + String s1; + int l; + final byte b0 = 2; + + if (this.inventory.getStackInSlot(0) != null) { + this.fontRendererObj.drawString( + I18n.format("" + NBTUtils.getBookTitle(this.inventory.getStackInSlot(0)), new Object[0]), 10, 8, + Utils.rgbtoHexValue(125, 255, 125)); + } + + if (this.field_146480_s) { + s = this.bookTitle; + + if (this.bookIsUnsigned) { + if (((this.updateCount / 6) % 2) == 0) { + s = s + "" + EnumChatFormatting.BLACK + "_"; + } + else { + s = s + "" + EnumChatFormatting.GRAY + "_"; + } + } + + s1 = I18n.format("book.editTitle", new Object[0]); + l = this.fontRendererObj.getStringWidth(s1); + this.fontRendererObj.drawString(s1, k + 36 + ((116 - l) / 2), b0 + 16 + 16, 0); + final int i1 = this.fontRendererObj.getStringWidth(s); + this.fontRendererObj.drawString(s, k + 36 + ((116 - i1) / 2), b0 + 48, 0); + final String s2 = I18n.format("book.byAuthor", new Object[] { this.editingPlayer.getCommandSenderName() }); + final int j1 = this.fontRendererObj.getStringWidth(s2); + this.fontRendererObj.drawString(EnumChatFormatting.DARK_GRAY + s2, k + 36 + ((116 - j1) / 2), b0 + 48 + 10, + 0); + final String s3 = I18n.format("book.finalizeWarning", new Object[0]); + this.fontRendererObj.drawSplitString(s3, k + 36, b0 + 80, 116, 0); + } + else { + s = I18n.format("book.pageIndicator", + new Object[] { Integer.valueOf(this.currPage + 1), Integer.valueOf(this.bookTotalPages) }); + s1 = ""; + + if ((this.bookPages != null) && (this.currPage >= 0) && (this.currPage < this.bookPages.tagCount())) { + s1 = this.bookPages.getStringTagAt(this.currPage); + } + + if (this.bookIsUnsigned) { + if (this.fontRendererObj.getBidiFlag()) { + s1 = s1 + "_"; + } + else if (((this.updateCount / 6) % 2) == 0) { + s1 = s1 + "" + EnumChatFormatting.BLACK + "_"; + } + else { + s1 = s1 + "" + EnumChatFormatting.GRAY + "_"; + } + } + + l = this.fontRendererObj.getStringWidth(s); + this.fontRendererObj.drawString(s, ((k - l) + this.bookImageWidth) - 44, b0 + 16, 0); + //this.fontRendererObj.drawString(s, k+36, b0 + 16, 0); + this.fontRendererObj.drawSplitString(s1, k + 36, b0 + 16 + 16, 116, 0); + //this.fontRendererObj.drawSplitString(s1, k, b0 + 16 + 16, 116, 0); + } + + super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + } + + @SideOnly(Side.CLIENT) + static class NextPageButton extends GuiButton { + private final boolean field_146151_o; + + public NextPageButton(final int p_i1079_1_, final int p_i1079_2_, final int p_i1079_3_, + final boolean p_i1079_4_) { + super(p_i1079_1_, p_i1079_2_, p_i1079_3_, 23, 13, ""); + this.field_146151_o = p_i1079_4_; + } + + /** + * Draws this button to the screen. + */ + @Override + public void drawButton(final Minecraft p_146112_1_, final int p_146112_2_, final int p_146112_3_) { + if (this.visible) { + final boolean flag = (p_146112_2_ >= this.xPosition) && (p_146112_3_ >= this.yPosition) + && (p_146112_2_ < (this.xPosition + this.width)) + && (p_146112_3_ < (this.yPosition + this.height)); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + p_146112_1_.getTextureManager().bindTexture(GuiScreenGrindle.bookGuiTextures); + int k = 0; + int l = 192; + + if (flag) { + k += 23; + } + + if (!this.field_146151_o) { + l += 13; + } + + this.drawTexturedModalRect(this.xPosition, this.yPosition, k, l, 23, 13); + } + } + } + + /** + * Draw the background layer for the GuiContainer (everything behind the + * items) + */ + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(iconLocation); + final int k = (this.width - this.xSize) / 2; + final int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + final int i1; + // drawPlayerModel(k + 51, l + 75, 30, k + 51 - this.xSize_lo, (l + 75) + // - 50 - this.ySize_lo, this.mc.thePlayer); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java b/src/main/java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java new file mode 100644 index 0000000000..97ec58bfa4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/box/GuiBaseBox.java @@ -0,0 +1,116 @@ +package gtPlusPlus.core.gui.item.box; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; + +public class GuiBaseBox extends GuiContainer { + /** + * x and y size of the inventory window in pixels. Defined as float, passed as + * int These are used for drawing the player model. + */ + private float xSize_lo; + private float ySize_lo; + + /** + * ResourceLocation takes 2 parameters: ModId, path to texture at the location: + * "src/minecraft/assets/modid/" + * + * I have provided a sample texture file that works with this tutorial. Download + * it from Forge_Tutorials/textures/gui/ + */ + private final ResourceLocation iconLocation; + + /** The inventory to render on screen */ + private final CustomBoxInventory inventory; + + public GuiBaseBox(ContainerBoxBase containerItem, ResourceLocation aGuiTexture) { + super(containerItem); + this.inventory = containerItem.getInventoryObject(); + this.iconLocation = aGuiTexture; + } + + /** + * Draws the screen and all the components in it. + */ + public void drawScreen(int par1, int par2, float par3) { + super.drawScreen(par1, par2, par3); + this.xSize_lo = (float) par1; + this.ySize_lo = (float) par2; + } + + /** + * Draw the foreground layer for the GuiContainer (everything in front of the + * items) + */ + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + String s = this.inventory.hasCustomInventoryName() ? this.inventory.getInventoryName() + : I18n.format(this.inventory.getInventoryName()); + this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 0, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 26, this.ySize - 96 + 4, 4210752); + } + + /** + * Draw the background layer for the GuiContainer (everything behind the items) + */ + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(iconLocation); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + int i1; + drawPlayerModel(k + 51, l + 75, 30, (float) (k + 51) - this.xSize_lo, (float) (l + 75 - 50) - this.ySize_lo, + this.mc.thePlayer); + } + + /** + * This renders the player model in standard inventory position (in later + * versions of Minecraft / Forge, you can simply call + * GuiInventory.drawEntityOnScreen directly instead of copying this code) + */ + public static void drawPlayerModel(int x, int y, int scale, float yaw, float pitch, EntityLivingBase entity) { + GL11.glEnable(GL11.GL_COLOR_MATERIAL); + GL11.glPushMatrix(); + GL11.glTranslatef(x, y, 50.0F); + GL11.glScalef(-scale, scale, scale); + GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); + float f2 = entity.renderYawOffset; + float f3 = entity.rotationYaw; + float f4 = entity.rotationPitch; + float f5 = entity.prevRotationYawHead; + float f6 = entity.rotationYawHead; + GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); + RenderHelper.enableStandardItemLighting(); + GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-((float) Math.atan(pitch / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F); + entity.renderYawOffset = (float) Math.atan(yaw / 40.0F) * 20.0F; + entity.rotationYaw = (float) Math.atan(yaw / 40.0F) * 40.0F; + entity.rotationPitch = -((float) Math.atan(pitch / 40.0F)) * 20.0F; + entity.rotationYawHead = entity.rotationYaw; + entity.prevRotationYawHead = entity.rotationYaw; + GL11.glTranslatef(0.0F, entity.yOffset, 0.0F); + RenderManager.instance.playerViewY = 180.0F; + RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); + entity.renderYawOffset = f2; + entity.rotationYaw = f3; + entity.rotationPitch = f4; + entity.prevRotationYawHead = f5; + entity.rotationYawHead = f6; + GL11.glPopMatrix(); + RenderHelper.disableStandardItemLighting(); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); + GL11.glDisable(GL11.GL_TEXTURE_2D); + OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java b/src/main/java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java new file mode 100644 index 0000000000..28e3913ac8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/box/LunchBoxGui.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.gui.item.box; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.util.ResourceLocation; + +public class LunchBoxGui extends GuiBaseBox { + public LunchBoxGui(ContainerBoxBase containerItem) { + super(containerItem, new ResourceLocation(CORE.MODID, "textures/gui/schematic_rocket_GS1.png")); + } +} diff --git a/src/main/java/gtPlusPlus/core/gui/item/box/MagicBagGui.java b/src/main/java/gtPlusPlus/core/gui/item/box/MagicBagGui.java new file mode 100644 index 0000000000..958cdd3c70 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/box/MagicBagGui.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.gui.item.box; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.util.ResourceLocation; + +public class MagicBagGui extends GuiBaseBox { + public MagicBagGui(ContainerBoxBase containerItem) { + super(containerItem, new ResourceLocation(CORE.MODID, "textures/gui/schematic_rocket_GS1.png")); + } +} diff --git a/src/main/java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java b/src/main/java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java new file mode 100644 index 0000000000..c440c017e9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/item/box/ToolBoxGui.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.gui.item.box; + +import gtPlusPlus.core.item.tool.misc.box.ContainerBoxBase; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.util.ResourceLocation; + +public class ToolBoxGui extends GuiBaseBox { + public ToolBoxGui(ContainerBoxBase containerItem) { + super(containerItem, new ResourceLocation(CORE.MODID, "textures/gui/schematic_rocket_GS1.png")); + } +} diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java new file mode 100644 index 0000000000..2ab5b58aa7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_CircuitProgrammer.java @@ -0,0 +1,44 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import gtPlusPlus.core.container.Container_CircuitProgrammer; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; + +@SideOnly(Side.CLIENT) +public class GUI_CircuitProgrammer extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/CircuitProgrammer.png"); + + public GUI_CircuitProgrammer(final InventoryPlayer player_inventory, final TileEntityCircuitProgrammer te){ + super(new Container_CircuitProgrammer(player_inventory, te)); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + super.drawGuiContainerForegroundLayer(i, j); + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + //This method is called when the Gui is first called! + @Override + public void initGui(){ + super.initGui(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java new file mode 100644 index 0000000000..094629ae48 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_DecayablesChest.java @@ -0,0 +1,59 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_DecayablesChest; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; + +@SideOnly(Side.CLIENT) +public class GUI_DecayablesChest extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/FishTrap.png"); + + public GUI_DecayablesChest(final InventoryPlayer player_inventory, final TileEntityDecayablesChest te){ + super(new Container_DecayablesChest(player_inventory, te)); + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + + //This method is called when the Gui is first called! + @Override + public void initGui() + { + //You have to add this line for the Gui to function properly! + super.initGui(); + + //The parameters of GuiButton are(id, x, y, width, height, text); + //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); + //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); + //NOTE: the id always has to be different or else it might get called twice or never! + + //Add any other buttons here too! + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_EggBox.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_EggBox.java new file mode 100644 index 0000000000..49d9890d3a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_EggBox.java @@ -0,0 +1,60 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_EggBox; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; + +@SideOnly(Side.CLIENT) +public class GUI_EggBox extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/FishTrap.png"); + + public GUI_EggBox(final InventoryPlayer player_inventory, final TileEntityEggBox te){ + super(new Container_EggBox(player_inventory, te)); + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.EggBox", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + + //This method is called when the Gui is first called! + @Override + public void initGui() + { + //You have to add this line for the Gui to function properly! + super.initGui(); + + //The parameters of GuiButton are(id, x, y, width, height, text); + //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); + //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); + //NOTE: the id always has to be different or else it might get called twice or never! + + //Add any other buttons here too! + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java new file mode 100644 index 0000000000..3d3bad7ece --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_FishTrap.java @@ -0,0 +1,59 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_FishTrap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; + +@SideOnly(Side.CLIENT) +public class GUI_FishTrap extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/FishTrap.png"); + + public GUI_FishTrap(final InventoryPlayer player_inventory, final TileEntityFishTrap te){ + super(new Container_FishTrap(player_inventory, te)); + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + + //This method is called when the Gui is first called! + @Override + public void initGui() + { + //You have to add this line for the Gui to function properly! + super.initGui(); + + //The parameters of GuiButton are(id, x, y, width, height, text); + //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); + //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); + //NOTE: the id always has to be different or else it might get called twice or never! + + //Add any other buttons here too! + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java new file mode 100644 index 0000000000..44d5c2ff9c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_HeliumGenerator.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_HeliumGenerator; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator; + +@SideOnly(Side.CLIENT) +public class GUI_HeliumGenerator extends GuiContainer { + + private static final ResourceLocation guiTexture = new ResourceLocation(CORE.MODID, "textures/gui/helium_collector_gui.png"); + + public GUI_HeliumGenerator(final InventoryPlayer player_inventory, final TileEntityHeliumGenerator te){ + super(new Container_HeliumGenerator(player_inventory, te)); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("", new Object[0]), 28, 6, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(guiTexture); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java new file mode 100644 index 0000000000..bbd4dd0ad8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ModularityTable.java @@ -0,0 +1,83 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_ModularityTable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; + +@SideOnly(Side.CLIENT) +public class GUI_ModularityTable extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ModularityTable.png"); + private Container_ModularityTable mThisContainer; + private TileEntityModularityTable mThisTile; + private int mRecipeTime = -1; + + public GUI_ModularityTable(final InventoryPlayer player_inventory, final TileEntityModularityTable tile){ + super(new Container_ModularityTable(player_inventory, tile)); + this.mThisContainer = tile.getContainer(); + this.mThisTile = tile; + if (this.mThisTile.getRecipeTime() > -1){ + this.mRecipeTime = this.mThisTile.getRecipeTime(); + } + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + if (this.mThisTile.getRecipeTime() > -1){ + this.mRecipeTime = this.mThisTile.getRecipeTime(); + } + //Utils.LOG_INFO("Container: "+this.mRecipeTime); + this.fontRendererObj.drawString(I18n.format("Modularity Table", new Object[0]), 8, 6, 4210752); + if (mRecipeTime > -1){ + this.fontRendererObj.drawString(I18n.format("Time", new Object[0]), 84, 42, 4210752); + this.fontRendererObj.drawString(I18n.format("Remaining", new Object[0]), 84, 50, 4210752); + this.fontRendererObj.drawString(I18n.format(""+this.mRecipeTime+" Ticks", new Object[0]), 84, 58, 4210752); + } + this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + + //This method is called when the Gui is first called! + @Override + public void initGui(){ + //You have to add this line for the Gui to function properly! + super.initGui(); + + //The parameters of GuiButton are(id, x, y, width, height, text); + //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); + //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); + //NOTE: the id always has to be different or else it might get called twice or never! + + //Add any other buttons here too! + } + + @Override + protected void actionPerformed(final GuiButton B){ + + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java new file mode 100644 index 0000000000..881c6c82a1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_PestKiller.java @@ -0,0 +1,159 @@ +package gtPlusPlus.core.gui.machine; + +import java.awt.Color; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.container.Container_PestKiller; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.IFluidTank; + +@SideOnly(Side.CLIENT) +public class GUI_PestKiller extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/PestKiller.png"); + private final TileEntityPestKiller mTileKiller; + + public GUI_PestKiller(final InventoryPlayer player_inventory, final TileEntityPestKiller te) { + super(new Container_PestKiller(player_inventory, te)); + mTileKiller = te; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j) { + if (mTileKiller != null) { + this.fontRendererObj.drawString(I18n.format(mTileKiller.getInventoryName(), new Object[0]), 4, 6, 4210752); + drawFluidTank(mTileKiller.getTank(), 134, 35); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j) { + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + // This method is called when the Gui is first called! + @Override + public void initGui() { + super.initGui(); + } + + private void drawFluidTank(IFluidTank tank, int x, int y) { + Color startGrad = new Color(50, 50, 50); + Color endGrad = new Color(20, 20, 20); + Container_PestKiller aCont = (Container_PestKiller) this.inventorySlots; + + double aPercentage = 0; + double aDivisor = (100/16); + int aFrameHeight = 16; + + boolean didRender = false; + if (aCont != null) { + TileEntityPestKiller aTile = mTileKiller; + if (aTile != null) { + FluidTank aTank = aTile.getTank(); + int aTier = aTile.getTier(); + drawGradientRect(x, y, x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); + if (aTier <= 0 || aTier > 2) { + if (aTank != null && aTank.getFluidAmount() > 0) { + aPercentage = MathUtils.findPercentage(aTank.getFluidAmount(), aTank.getCapacity()); + //Logger.INFO("Percent = "+aPercentage); + aFrameHeight = (int) (aPercentage / aDivisor); + //Logger.INFO("Frame Height = "+aFrameHeight); + } + this.fontRendererObj.drawString("Tier: 0", 4, 18, 4210752); + this.fontRendererObj.drawString("Range: 1x1", 4, 30, 4210752); + this.fontRendererObj.drawString("Poison: None", 4, 42, 4210752); + this.fontRendererObj.drawString("Amount: 0", 4, 64, 4210752); + didRender = true; + } + else if (aTier == 1) { + if (aTank != null && aTank.getFluidAmount() > 0) { + aPercentage = MathUtils.findPercentage(aTank.getFluidAmount(), aTank.getCapacity()); + //Logger.INFO("Percent = "+aPercentage); + aFrameHeight = (int) (aPercentage / aDivisor); + //Logger.INFO("Frame Height = "+aFrameHeight); + } + startGrad = new Color(240, 50, 240); + endGrad = new Color(130, 30, 130); + drawGradientRect(x, y+(16-aFrameHeight), x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); + this.fontRendererObj.drawString("Tier: 1", 4, 18, 4210752); + this.fontRendererObj.drawString("Range: 5x5", 4, 30, 4210752); + this.fontRendererObj.drawString("Poison: ", 4, 42, 4210752); + this.fontRendererObj.drawString(""+aTile.getTank().getFluid().getLocalizedName(), 4, 54, 4210752); + this.fontRendererObj.drawString("Amount: "+aTile.getTank().getFluidAmount(), 4, 64, 4210752); + didRender = true; + } + else if (aTier == 2) { + if (aTank != null && aTank.getFluidAmount() > 0) { + aPercentage = MathUtils.findPercentage(aTank.getFluidAmount(), aTank.getCapacity()); + //Logger.INFO("Percent = "+aPercentage); + aFrameHeight = (int) (aPercentage / aDivisor); + //Logger.INFO("Frame Height = "+aFrameHeight); + } + short[] aRGB = MISC_MATERIALS.HYDROGEN_CYANIDE.getRGB(); + startGrad = new Color(aRGB[0], aRGB[1], aRGB[2]); + endGrad = new Color(Math.max(aRGB[0], 0), Math.max(aRGB[1], 0), Math.max(aRGB[2], 0)); + drawGradientRect(x, y+(16-aFrameHeight), x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); + this.fontRendererObj.drawString("Tier: 2", 4, 18, 4210752); + this.fontRendererObj.drawString("Range: 9x9", 4, 30, 4210752); + this.fontRendererObj.drawString("Poison: ", 4, 42, 4210752); + this.fontRendererObj.drawString(""+aTile.getTank().getFluid().getLocalizedName(), 4, 54, 4210752); + this.fontRendererObj.drawString("Amount: "+aTile.getTank().getFluidAmount(), 4, 64, 4210752); + didRender = true; + } + } + } + if (!didRender) { + startGrad = new Color(255, 30, 120); + endGrad = new Color(255, 0, 50); + drawGradientRect(x, y, x+16, y+16, startGrad.getRGB(), endGrad.getRGB()); + this.fontRendererObj.drawString("Tier: 0", 4, 18, 4210752); + } + + + + + + + /* + * FluidStack fluid = tank.getFluid(); TextureManager manager = + * mc.getTextureManager(); if (fluid != null) { + * manager.bindTexture(manager.getResourceLocation(0)); float amount = + * fluid.amount; float capacity = tank.getCapacity(); float scale = amount / + * capacity; int fluidTankHeight = 60; int fluidAmount = (int) (scale * + * fluidTankHeight); drawFluid(x, y + fluidTankHeight - fluidAmount, + * fluid.getFluid().getIcon(fluid), 16, fluidAmount); } + */ + } + + private void drawFluid(int x, int y, IIcon icon, int width, int height) { + int i = 0; + int j = 0; + int drawHeight = 0; + int drawWidth = 0; + for (i = 0; i < width; i += 16) { + for (j = 0; j < height; j += 16) { + drawWidth = Math.min(width - i, 16); + drawHeight = Math.min(height - j, 16); + drawTexturedModelRectFromIcon(x + i, y + j, icon, drawWidth, drawHeight); + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java new file mode 100644 index 0000000000..4870269080 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ProjectTable.java @@ -0,0 +1,65 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_ProjectTable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; + +@SideOnly(Side.CLIENT) +public class GUI_ProjectTable extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ProjectTable.png"); + + public GUI_ProjectTable(final InventoryPlayer player_inventory, final TileEntityProjectTable tile){ + super(new Container_ProjectTable(player_inventory, tile)); + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + + //This method is called when the Gui is first called! + @Override + public void initGui(){ + //You have to add this line for the Gui to function properly! + super.initGui(); + + //The parameters of GuiButton are(id, x, y, width, height, text); + //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); + //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); + //NOTE: the id always has to be different or else it might get called twice or never! + + //Add any other buttons here too! + } + + @Override + protected void actionPerformed(final GuiButton B){ + + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java new file mode 100644 index 0000000000..edb53e8ec0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_RoundRobinator.java @@ -0,0 +1,120 @@ +package gtPlusPlus.core.gui.machine; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.container.Container_RoundRobinator; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class GUI_RoundRobinator extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/RoundRobinator.png"); + private TileEntityRoundRobinator mTile; + private Container_RoundRobinator mContainer; + private static final Method mDrawItemStack; + + static { + mDrawItemStack = ReflectionUtils.getMethod(GuiContainer.class, "drawItemStack", new Class[] {ItemStack.class, int.class, int.class, String.class}); + } + + public GUI_RoundRobinator(final InventoryPlayer player_inventory, final TileEntityRoundRobinator te){ + this(new Container_RoundRobinator(player_inventory, te)); + mTile = te; + } + + private GUI_RoundRobinator(final Container_RoundRobinator aContainer){ + super(aContainer); + mContainer = aContainer; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + super.drawGuiContainerForegroundLayer(i, j); + + int xStart = 134; + int yStart = 31; + mTile = this.mContainer.tile_entity; + + int tier = mContainer.mTier; + int aTickRate = mContainer.mTickRate; + + fontRendererObj.drawString("Round Robinator", 85, 4, Utils.rgbtoHexValue(50, 150, 50)); + fontRendererObj.drawString("Tier: "+tier, 85, 12, Utils.rgbtoHexValue(50, 150, 50)); + fontRendererObj.drawString("Rate: 1 Item/"+aTickRate+"t", 85, 20, Utils.rgbtoHexValue(50, 150, 50)); + + boolean[] aStates = new boolean[] {mContainer.mSide_1 == 0 ? false : true, mContainer.mSide_2 == 0 ? false : true, mContainer.mSide_3 == 0 ? false : true,mContainer.mSide_4 == 0 ? false : true}; + + fontRendererObj.drawString("West: "+(aStates[0] ? "Active" : "Disabled"), 5, 5, Utils.rgbtoHexValue(50, 50, 50)); + fontRendererObj.drawString("North: "+(aStates[1] ? "Active" : "Disabled"), 5, 15, Utils.rgbtoHexValue(50, 50, 50)); + fontRendererObj.drawString("South: "+(aStates[2] ? "Active" : "Disabled"), 5, 25, Utils.rgbtoHexValue(50, 50, 50)); + fontRendererObj.drawString("East: "+(aStates[3] ? "Active" : "Disabled"), 5, 35, Utils.rgbtoHexValue(50, 50, 50)); + fontRendererObj.drawString("Toggling South will visually", 5, 65, Utils.rgbtoHexValue(150, 50, 50)); + fontRendererObj.drawString("toggle East, This is a visual bug.", 5, 74, Utils.rgbtoHexValue(150, 50, 50)); + drawStatus(aStates[0], xStart, yStart); + drawStatus(aStates[1], xStart+18, yStart); + drawStatus(aStates[2], xStart, yStart+18); + drawStatus(aStates[3], xStart+18, yStart+18); + + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + + + + } + + private static ItemStack aGreenGlass; + private static ItemStack aRedGlass; + + private void drawStatus(boolean aStateActive, int x, int y) { + if (aGreenGlass == null) { + Item pane = ItemUtils.getSimpleStack(Blocks.stained_glass_pane).getItem(); + aGreenGlass = ItemUtils.simpleMetaStack(pane, 5, 1); + } + if (aRedGlass == null) { + Item pane = ItemUtils.getSimpleStack(Blocks.stained_glass_pane).getItem(); + aRedGlass = ItemUtils.simpleMetaStack(pane, 14, 1); + } + if (mDrawItemStack != null) { + try { + if (aStateActive) { + mDrawItemStack.invoke(this, new Object[]{aGreenGlass, x, y, ""}); + } + else { + mDrawItemStack.invoke(this, new Object[]{aRedGlass, x, y, ""}); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + } + + //This method is called when the Gui is first called! + @Override + public void initGui(){ + super.initGui(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java new file mode 100644 index 0000000000..8a1f7c3fe9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java @@ -0,0 +1,229 @@ +package gtPlusPlus.core.gui.machine; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.lwjgl.Sys; + +import com.google.common.collect.Lists; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiOptionButton; +import net.minecraft.client.gui.GuiResourcePackAvailable; +import net.minecraft.client.gui.GuiResourcePackSelected; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.client.resources.ResourcePackListEntry; +import net.minecraft.client.resources.ResourcePackListEntryFound; +import net.minecraft.client.resources.ResourcePackRepository; +import net.minecraft.client.resources.ResourcePackRepository.Entry; +import net.minecraft.util.Util; + +@SideOnly(Side.CLIENT) +public class GUI_ScrollTest extends GuiScreen +{ + private static final Logger logger = LogManager.getLogger(); + private GuiScreen aThisGUIScreen; + private List field_146966_g; + private List field_146969_h; + private GuiResourcePackAvailable MapOfFreeResourcePacks; + private GuiResourcePackSelected MapOfActiveResourcePacks; + private static final String __OBFID = "CL_00000820"; + + public GUI_ScrollTest(GuiScreen p_i45050_1_) + { + this.aThisGUIScreen = p_i45050_1_; + } + + /** + * Adds the buttons (and other controls) to the screen in question. + */ + @SuppressWarnings("unchecked") + public void initGui() + { + this.buttonList.add(new GuiOptionButton(2, this.width / 2 - 154, this.height - 48, I18n.format("resourcePack.openFolder", new Object[0]))); + this.buttonList.add(new GuiOptionButton(1, this.width / 2 + 4, this.height - 48, I18n.format("gui.done", new Object[0]))); + this.field_146966_g = new ArrayList(); + this.field_146969_h = new ArrayList(); + ResourcePackRepository resourcepackrepository = this.mc.getResourcePackRepository(); + resourcepackrepository.updateRepositoryEntriesAll(); + ArrayList arraylist = Lists.newArrayList(resourcepackrepository.getRepositoryEntriesAll()); + arraylist.removeAll(resourcepackrepository.getRepositoryEntries()); + Iterator iterator = arraylist.iterator(); + ResourcePackRepository.Entry entry; + + while (iterator.hasNext()) + { + entry = (ResourcePackRepository.Entry)iterator.next(); + //this.field_146966_g.add(new ResourcePackListEntryFound(this, entry)); + } + + iterator = Lists.reverse(resourcepackrepository.getRepositoryEntries()).iterator(); + + while (iterator.hasNext()) + { + entry = (ResourcePackRepository.Entry)iterator.next(); + //this.field_146969_h.add(new ResourcePackListEntryFound(this, entry)); + } + + //this.field_146969_h.add(new ResourcePackListEntryDefault(this)); + this.MapOfFreeResourcePacks = new GuiResourcePackAvailable(this.mc, 200, this.height, this.field_146966_g); + this.MapOfFreeResourcePacks.setSlotXBoundsFromLeft(this.width / 2 - 4 - 200); + this.MapOfFreeResourcePacks.registerScrollButtons(7, 8); + this.MapOfActiveResourcePacks = new GuiResourcePackSelected(this.mc, 200, this.height, this.field_146969_h); + this.MapOfActiveResourcePacks.setSlotXBoundsFromLeft(this.width / 2 + 4); + this.MapOfActiveResourcePacks.registerScrollButtons(7, 8); + } + + public boolean func_146961_a(ResourcePackListEntry p_146961_1_) + { + return this.field_146969_h.contains(p_146961_1_); + } + + public List func_146962_b(ResourcePackListEntry p_146962_1_) + { + return this.func_146961_a(p_146962_1_) ? this.field_146969_h : this.field_146966_g; + } + + public List func_146964_g() + { + return this.field_146966_g; + } + + public List func_146963_h() + { + return this.field_146969_h; + } + + protected void actionPerformed(GuiButton p_146284_1_) + { + if (p_146284_1_.enabled) + { + if (p_146284_1_.id == 2) + { + File file1 = this.mc.getResourcePackRepository().getDirResourcepacks(); + String s = file1.getAbsolutePath(); + + if (Util.getOSType() == Util.EnumOS.OSX) + { + try + { + logger.info(s); + Runtime.getRuntime().exec(new String[] {"/usr/bin/open", s}); + return; + } + catch (IOException ioexception1) + { + logger.error("Couldn\'t open file", ioexception1); + } + } + else if (Util.getOSType() == Util.EnumOS.WINDOWS) + { + String s1 = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[] {s}); + + try + { + Runtime.getRuntime().exec(s1); + return; + } + catch (IOException ioexception) + { + logger.error("Couldn\'t open file", ioexception); + } + } + + boolean flag = false; + + try + { + Class oclass = ReflectionUtils.getClass("java.awt.Desktop"); + Object object = ReflectionUtils.getMethod(oclass, "getDesktop", new Class[0]).invoke((Object)null, new Object[0]); + ReflectionUtils.getMethod(oclass, "browse", new Class[] {URI.class}).invoke(object, new Object[] {file1.toURI()}); + } + catch (Throwable throwable) + { + logger.error("Couldn\'t open link", throwable); + flag = true; + } + + if (flag) + { + logger.info("Opening via system class!"); + Sys.openURL("file://" + s); + } + } + else if (p_146284_1_.id == 1) + { + ArrayList arraylist = Lists.newArrayList(); + Iterator iterator = this.field_146969_h.iterator(); + + while (iterator.hasNext()) + { + ResourcePackListEntry resourcepacklistentry = (ResourcePackListEntry)iterator.next(); + + if (resourcepacklistentry instanceof ResourcePackListEntryFound) + { + arraylist.add(((ResourcePackListEntryFound)resourcepacklistentry).func_148318_i()); + } + } + + Collections.reverse(arraylist); + this.mc.getResourcePackRepository().func_148527_a(arraylist); + this.mc.gameSettings.resourcePacks.clear(); + iterator = arraylist.iterator(); + + while (iterator.hasNext()) + { + ResourcePackRepository.Entry entry = (ResourcePackRepository.Entry)iterator.next(); + this.mc.gameSettings.resourcePacks.add(entry.getResourcePackName()); + } + + this.mc.gameSettings.saveOptions(); + this.mc.refreshResources(); + this.mc.displayGuiScreen(this.aThisGUIScreen); + } + } + } + + /** + * Called when the mouse is clicked. + */ + protected void mouseClicked(int p_73864_1_, int p_73864_2_, int p_73864_3_) + { + super.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); + this.MapOfFreeResourcePacks.func_148179_a(p_73864_1_, p_73864_2_, p_73864_3_); + this.MapOfActiveResourcePacks.func_148179_a(p_73864_1_, p_73864_2_, p_73864_3_); + } + + /** + * Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is + * mouseMove, which==0 or which==1 is mouseUp + */ + protected void mouseMovedOrUp(int p_146286_1_, int p_146286_2_, int p_146286_3_) + { + super.mouseMovedOrUp(p_146286_1_, p_146286_2_, p_146286_3_); + } + + /** + * Draws the screen and all the components in it. + */ + public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) + { + this.drawBackground(0); + this.MapOfFreeResourcePacks.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + this.MapOfActiveResourcePacks.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + this.drawCenteredString(this.fontRendererObj, I18n.format("resourcePack.title", new Object[0]), this.width / 2, 16, 16777215); + this.drawCenteredString(this.fontRendererObj, I18n.format("resourcePack.folderInfo", new Object[0]), this.width / 2 - 77, this.height - 26, 8421504); + super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java new file mode 100644 index 0000000000..d3d8f1e814 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java @@ -0,0 +1,90 @@ +package gtPlusPlus.core.gui.machine; + +import java.util.ArrayList; +import java.util.List; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; +import gtPlusPlus.core.container.Container_SuperJukebox; +import gtPlusPlus.core.gui.GUI_Base_Tile_Entity; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.slots.SlotNoInput; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class GUI_SuperJukebox extends GUI_Base_Tile_Entity { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/SuperJukebox.png"); + private final Container_SuperJukebox mThisContainer; + + public GUI_SuperJukebox(final InventoryPlayer player_inventory, final TileEntitySuperJukebox te){ + super(new Container_SuperJukebox(player_inventory, te)); + mThisContainer = (Container_SuperJukebox) this.mContainer; + } + + //This method is called when the Gui is first called! + @Override + public void initGui(){ + super.initGui(); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + super.drawGuiContainerForegroundLayer(par1, par2); + + boolean a = mThisContainer.isPlaying; + boolean b = mThisContainer.isLooping; + + if (a && b) { + this.fontRendererObj.drawString("[X] [X]", 72, 74, 4210752); + } + else if (a && !b) { + this.fontRendererObj.drawString("[X] [ ]", 72, 74, 4210752); + } + else if (!a && b) { + this.fontRendererObj.drawString("[ ] [X]", 72, 74, 4210752); + } + else { + this.fontRendererObj.drawString("[ ] [ ]", 72, 74, 4210752); + } + + this.drawTooltip(par1, par2); + } + + private void drawTooltip(final int x2, final int y2) { + final int xStart = (this.width - this.xSize) / 2; + final int yStart = (this.height - this.ySize) / 2; + final int x3 = x2 - xStart; + final int y3 = y2 - yStart + 5; + final List list = new ArrayList(); + + if (y3 >= 17 && y3 <= 33) { + if (x3 >= 80 && x3 <= 96) { + list.add("Play"); + } + } + if (y3 >= 35 && y3 <= 53) { + if (x3 >= 80 && x3 <= 96) { + list.add("Loop"); + } + } + if (!list.isEmpty()) { + this.drawHoveringText(list, x3, y3, this.fontRendererObj); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java new file mode 100644 index 0000000000..7c71f09302 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java @@ -0,0 +1,50 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.container.Container_TradeTable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; + +@SideOnly(Side.CLIENT) +public class GUI_TradeTable extends GuiContainer { + + TileEntityTradeTable mThisTable; + String mOwnerName; + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ProjectTable.png"); + + public GUI_TradeTable(final InventoryPlayer player_inventory, final TileEntityTradeTable te, final String mOwnerName){ + super(new Container_TradeTable(player_inventory, te)); + if (te.isServerSide()){ + mThisTable = te; + this.mOwnerName = mOwnerName; + Logger.INFO("Set valid TE in GUI"); + } + } + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + this.fontRendererObj.drawString(I18n.format("Owner - "+this.mOwnerName, new Object[0]), 28, 66, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java new file mode 100644 index 0000000000..0257e51d0c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java @@ -0,0 +1,183 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; +import gtPlusPlus.core.gui.widget.GuiValueField; +import gtPlusPlus.core.handler.PacketHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class GUI_VolumetricFlaskSetter extends GuiContainer { + + private GuiTextField mText; + private boolean mIsOpen = false; + private TileEntityVolumetricFlaskSetter mTile; + private Container_VolumetricFlaskSetter mContainer; + private static final ResourceLocation mGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/VolumetricFlaskSetter.png"); + + public GUI_VolumetricFlaskSetter(Container_VolumetricFlaskSetter aContainer){ + super(aContainer); + mContainer = aContainer; + mTile = mContainer.mTileEntity; + } + + public void initGui(){ + super.initGui(); + Keyboard.enableRepeatEvents(true); + mIsOpen = true; + this.mText = new GuiValueField(this.fontRendererObj, 26, 31, this.width / 2 - 62, this.height/2-52, 106, 14); + mText.setMaxStringLength(5); + mText.setEnableBackgroundDrawing(true); + mText.setText("0"); + mText.setFocused(true); + } + + protected void keyTyped(char par1, int par2){ + if (mIsOpen) { + if (mText.isFocused()) { + if (par2 == Keyboard.KEY_RETURN) { + if (mText.isFocused()) { + mText.setFocused(false); + } + } + else if (par2 == Keyboard.KEY_BACK) { + String aCurrentText = getText(); + if (aCurrentText.length() > 0) { + this.mText.setText(aCurrentText.substring(0, aCurrentText.length() - 1)); + if (getText().length() <= 0) { + this.mText.setText("0"); + } + sendUpdateToServer(); + } + } + else { + if (isNumber(par1)) { + if (this.mText.getText().equals("0")) { + this.mText.setText(""+par1); + sendUpdateToServer(); + } + else { + this.mText.textboxKeyTyped(par1, par2); + sendUpdateToServer(); + } + } + else { + super.keyTyped(par1, par2); + } + } + } + else { + super.keyTyped(par1, par2); + } + } + } + + @Override + public void onGuiClosed() { + mIsOpen = false; + mText.setEnabled(false); + mText.setVisible(false); + super.onGuiClosed(); + Keyboard.enableRepeatEvents(false); + } + + public void updateScreen(){ + super.updateScreen(); + // Update Textbox to 0 if Empty + if (getText().length() <= 0) { + this.mText.setText("0"); + sendUpdateToServer(); + } + this.mText.updateCursorCounter(); + + // Check TextBox Value is correct + short aCustomValue = 0; + if (getText().length() > 0) { + try { + aCustomValue = Short.parseShort(getText()); + short aTileValue = ((Container_VolumetricFlaskSetter) mContainer).mCustomValue; + if (mContainer != null) { + if (aTileValue != aCustomValue){ + this.mText.setText(""+aTileValue); + } + } + } catch (NumberFormatException ex) { + + } + } + } + + public void drawScreen(int par1, int par2, float par3){ + this.drawDefaultBackground(); + super.drawScreen(par1, par2, par3); + + + } + + protected void mouseClicked(int x, int y, int btn) { + if (mIsOpen) { + super.mouseClicked(x, y, btn); + this.mText.mouseClicked(x, y, btn); + } + } + + + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + super.drawGuiContainerForegroundLayer(i, j); + this.mText.drawTextBox(); + this.fontRendererObj.drawString(I18n.format("container.VolumetricFlaskSetter", new Object[0]), 4, 3, 4210752); + int aYVal = 49; + this.fontRendererObj.drawString(I18n.format("0 = 16l", new Object[0]), 8, aYVal, 4210752); + this.fontRendererObj.drawString(I18n.format("4 = 576l", new Object[0]), 64, aYVal, 4210752); + this.fontRendererObj.drawString(I18n.format("1 = 36l", new Object[0]), 8, aYVal+=8, 4210752); + this.fontRendererObj.drawString(I18n.format("5 = 720l", new Object[0]), 64, aYVal, 4210752); + this.fontRendererObj.drawString(I18n.format("2 = 144l", new Object[0]), 8, aYVal+=8, 4210752); + this.fontRendererObj.drawString(I18n.format("6 = 864l", new Object[0]), 64, aYVal, 4210752); + this.fontRendererObj.drawString(I18n.format("3 = 432l", new Object[0]), 8, aYVal+=8, 4210752); + this.fontRendererObj.drawString(I18n.format("-> = Custom", new Object[0]), 59, aYVal, 4210752); + + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(mGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + public boolean isNumber(char c) { + return ((c >= 48 && c <= 57) || c == 45); + } + + protected String getText() { + return this.mText.getText(); + } + + protected void sendUpdateToServer() { + short aCustomValue = 0; + if (getText().length() > 0) { + try { + aCustomValue = Short.parseShort(getText()); + PacketHandler.sendToServer(new Packet_VolumetricFlaskGui(mTile, aCustomValue)); + } catch (NumberFormatException ex) { + + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java new file mode 100644 index 0000000000..861c2ba6b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java @@ -0,0 +1,81 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_Workbench; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; + +@SideOnly(Side.CLIENT) +public class GUI_Workbench extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png"); + + public boolean moveItemsToChest = false; + public boolean moveItemsToCrafting = false; + + public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile){ + super(new Container_Workbench(player_inventory, tile)); + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + + //This method is called when the Gui is first called! + @Override + public void initGui() + { + //You have to add this line for the Gui to function properly! + super.initGui(); + + //The parameters of GuiButton are(id, x, y, width, height, text); + //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); + //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); + //NOTE: the id always has to be different or else it might get called twice or never! + + //Add any other buttons here too! + } + + @Override + protected void actionPerformed(final GuiButton B) + { + //If the button id is different, or you have mrs buttons, create another if block for that too! + if(B.id == 1){ + System.out.println("Trying to empty crafting grid to the storage compartment."); + //moveItemsToChest = true; + ((Container_Workbench) this.inventorySlots).moveCraftingToChest(); + } + else if(B.id == 2){ + System.out.println("Trying to move items into the crafting grid."); + //moveItemsToCrafting = true; + ((Container_Workbench) this.inventorySlots).moveChestToCrafting(); + } + + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java new file mode 100644 index 0000000000..20183eb0b0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java @@ -0,0 +1,42 @@ +package gtPlusPlus.core.gui.machine; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.container.Container_WorkbenchAdvanced; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; + +@SideOnly(Side.CLIENT) +public class GUI_WorkbenchAdvanced extends GuiContainer { + + private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/AdvancedCraftingTable.png"); + + public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile){ + super(new Container_WorkbenchAdvanced(player_inventory, tile)); + } + + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j){ + //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); + //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); + } + + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(craftingTableGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/widget/GuiValueField.java b/src/main/java/gtPlusPlus/core/gui/widget/GuiValueField.java new file mode 100644 index 0000000000..ac4c1a8aee --- /dev/null +++ b/src/main/java/gtPlusPlus/core/gui/widget/GuiValueField.java @@ -0,0 +1,86 @@ +package gtPlusPlus.core.gui.widget; + +import java.lang.reflect.Field; + +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiTextField; + +public class GuiValueField extends GuiTextField { + + private final FontRenderer mFontRenderer; + private final int mScreenLocationX; + private final int mScreenLocationY; + + public GuiValueField(FontRenderer aFontRenderer, int aX, int aY, int aScreenLocationX, int aScreenLocationY, int aWidth, int aHeight) { + super(aFontRenderer, aX, aY, aWidth, aHeight); + mFontRenderer = aFontRenderer; + mScreenLocationX = aScreenLocationX; + mScreenLocationY = aScreenLocationY; + } + + public boolean canLoseFocus() { + Field canLoseFocus = ReflectionUtils.getField(GuiTextField.class, "canLoseFocus"); + if (canLoseFocus != null) { + return (boolean) ReflectionUtils.getFieldValue(canLoseFocus, this); + } + return true; + } + + public boolean isFocused() { + Field isFocused = ReflectionUtils.getField(GuiTextField.class, "isFocused"); + if (isFocused != null) { + return (boolean) ReflectionUtils.getFieldValue(isFocused, this); + } + return false; + } + + public boolean isBackgroundDrawingEnabled() { + Field enableBackgroundDrawing = ReflectionUtils.getField(GuiTextField.class, "enableBackgroundDrawing"); + if (enableBackgroundDrawing != null) { + return (boolean) ReflectionUtils.getFieldValue(enableBackgroundDrawing, this); + } + return true; + } + public int getLineScrollOffset() { + Field lineScrollOffset = ReflectionUtils.getField(GuiTextField.class, "lineScrollOffset"); + if (lineScrollOffset != null) { + return (int) ReflectionUtils.getFieldValue(lineScrollOffset, this); + } + return 0; + } + + /** + * Args: x, y, buttonClicked + */ + public void mouseClicked(int aX, int aY, int aButton){ + + boolean flag = aX >= this.mScreenLocationX && aX < this.mScreenLocationX + this.width && aY >= this.mScreenLocationY && aY < this.mScreenLocationY + this.height; + + //Logger.INFO("Clicked X:"+aX); + //Logger.INFO("Clicked Y:"+aY); + //Logger.INFO("ScreenPos X:"+mScreenLocationX); + //Logger.INFO("ScreenPos Y:"+mScreenLocationY); + //Logger.INFO("Render X:"+xPosition); + //Logger.INFO("Render Y:"+yPosition); + + if (canLoseFocus()) + { + this.setFocused(flag); + } + + if (isFocused() && aButton == 0) + { + int l = aX - this.mScreenLocationX; + + if (isBackgroundDrawingEnabled()) + { + l -= 4; + } + + String s = this.mFontRenderer.trimStringToWidth(this.getText().substring(getLineScrollOffset()), this.getWidth()); + this.setCursorPosition(this.mFontRenderer.trimStringToWidth(s, l).length() + getLineScrollOffset()); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/AchievementHandler.java b/src/main/java/gtPlusPlus/core/handler/AchievementHandler.java new file mode 100644 index 0000000000..fa10f4def3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/AchievementHandler.java @@ -0,0 +1,421 @@ +package gtPlusPlus.core.handler; + +import java.util.concurrent.ConcurrentHashMap; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent.ItemSmeltedEvent; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Log; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraft.stats.StatBase; +import net.minecraftforge.common.AchievementPage; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; + +public class AchievementHandler { + + public ConcurrentHashMap achievementList = new ConcurrentHashMap(); + public ConcurrentHashMap issuedAchievements = new ConcurrentHashMap(); + + public int adjX = 5; + public int adjY = 9; + + private static final String aBaseAchievementName = "gtpp.start"; + + public AchievementHandler() { + + Logger.INFO("Initializing GT++ achievements"); + GT_Log.out.println("Initializing GT++ achievements"); + + //register first + this.registerAchievement(aBaseAchievementName, 0, 0, MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(MetaGeneratedGregtechTools.ANGLE_GRINDER, 1, Materials.Osmium, Materials.Osmium, null), "", true); + + //Useful Info + boolean cores = CORE.ConfigSwitches.requireControlCores; + if (cores || GregtechMeta_MultiBlockBase.DEBUG_DISABLE_CORES_TEMPORARILY) { + this.registerAchievement("hatch.control", -2, -2, GregtechItemList.Hatch_Control_Core.get(1), aBaseAchievementName, false); + } + this.registerAchievement("hatch.dynamo.buffered", 2, -2, GregtechItemList.Hatch_Buffer_Dynamo_IV.get(1), aBaseAchievementName, false); + //First multi anyone really needs + this.registerAchievement("multi.abs", -4, -2, GregtechItemList.Industrial_AlloyBlastSmelter.get(1), cores ? "hatch.control" : aBaseAchievementName, true); + + //Material Advancement + this.registerAchievement("dust.potin", 0, 2, ALLOY.POTIN.getDust(1), aBaseAchievementName, false); + this.registerAchievement("dust.eglin", 0, 4, ALLOY.EGLIN_STEEL.getDust(1), "dust.potin", false); + this.registerAchievement("dust.staballoy", 0, 6, ALLOY.STABALLOY.getDust(1), "dust.eglin", false); + this.registerAchievement("dust.quantum", 0, 8, ALLOY.QUANTUM.getDust(1), "dust.staballoy", true); + this.registerAchievement("dust.hypogen", 0, 10, ELEMENT.STANDALONE.HYPOGEN.getDust(1), "dust.quantum", true); + + + //Blocks + this.registerAchievement("block.fishtrap", -2, 2, ItemUtils.getSimpleStack(ModBlocks.blockFishTrap), "dust.potin", false); + this.registerAchievement("block.withercage", -2, 4, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard), "dust.eglin", false); + + + //Machines (-10/-8/-6) + this.registerAchievement("rtg", -16, -10, GregtechItemList.RTG.get(1), aBaseAchievementName, false); + this.registerAchievement("dehydrate", -15, -10, GregtechItemList.GT_Dehydrator_HV.get(1), aBaseAchievementName, false); + this.registerAchievement("semifluid", -14, -10, GregtechItemList.Generator_SemiFluid_HV.get(1), aBaseAchievementName, false); + this.registerAchievement("earlywasher", -13, -10, GregtechItemList.SimpleDustWasher_ULV.get(1), aBaseAchievementName, false); + this.registerAchievement("advancedsteam", -12, -10, GregtechItemList.Boiler_Advanced_MV.get(1), aBaseAchievementName, false); + if (PollutionUtils.isPollutionEnabled()) { + this.registerAchievement("pollutionremoval", -11, -10, GregtechItemList.Pollution_Cleaner_IV.get(1), aBaseAchievementName, false); + } + this.registerAchievement("hiampxform", -10, -10, GregtechItemList.Transformer_HA_HV_MV.get(1), aBaseAchievementName, false); + + + //Multis (-4/-2/0) + this.registerAchievement("multi.pss", -16, -7, GregtechItemList.PowerSubStation.get(1), "multi.abs", false); + this.registerAchievement("multi.cyclo", -15, -7, GregtechItemList.COMET_Cyclotron.get(1), "multi.abs", false); + this.registerAchievement("multi.sifter", -14, -7, GregtechItemList.Industrial_Sifter.get(1), "dust.eglin", false); + this.registerAchievement("multi.cokeoven", -13, -7, GregtechItemList.Industrial_CokeOven.get(1), "multi.abs", false); + this.registerAchievement("multi.boiler.thermal", -12, -7, GregtechItemList.GT4_Thermal_Boiler.get(1), "multi.abs", false); + this.registerAchievement("multi.zhuhai", -11, -7, GregtechItemList.Industrial_FishingPond.get(1), aBaseAchievementName, false); + //this.registerAchievement("rtg", -4, -4, GregtechItemList.RTG.get(1), aBaseAchievementName, false); + + //Casings + this.registerAchievement("casing.abs", 2, -10, GregtechItemList.Casing_Coil_BlastSmelter.get(1), aBaseAchievementName, false); + this.registerAchievement("casing.cyclotron.coil", 3, -10, GregtechItemList.Casing_Cyclotron_Coil.get(1), aBaseAchievementName, false); + this.registerAchievement("casing.multiuse", 4, -10, GregtechItemList.Casing_Multi_Use.get(1), aBaseAchievementName, false); + this.registerAchievement("casing.containment", 5, -10, GregtechItemList.Casing_Containment.get(1), aBaseAchievementName, false); + + + + + + + + + //Radioactive + this.registerAchievement("decay.neptunium238", 11, 8, ItemUtils.getSimpleStack(ModItems.dustNeptunium238), "multi.cyclo", false); + this.registerAchievement("decay.radium226", 12, 8, ItemUtils.getSimpleStack(ModItems.dustRadium226), "multi.cyclo", false); + this.registerAchievement("decay.molybdenum99", 13, 8, ItemUtils.getSimpleStack(ModItems.dustMolybdenum99), "multi.cyclo", false); + this.registerAchievement("decay.technetium99m", 14, 8, ItemUtils.getSimpleStack(ModItems.dustTechnetium99M), "multi.cyclo", false); + this.registerAchievement("decay.technetium99", 15, 8, ItemUtils.getSimpleStack(ModItems.dustTechnetium99), "multi.cyclo", false); + + + + + + + + + + + + + AchievementPage.registerAchievementPage( + new AchievementPage("GT++", (Achievement[]) ((Achievement[]) this.achievementList.values() + .toArray(new Achievement[this.achievementList.size()])))); + MinecraftForge.EVENT_BUS.register(this); + FMLCommonHandler.instance().bus().register(this); + + + } + + public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement, + boolean special) { + Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, requirement); + if (special) { + achievement.setSpecial(); + } + + achievement.registerStat(); + if (CORE.DEVENV) { + GT_Log.out.println("achievement." + textId + "="); + GT_Log.out.println("achievement." + textId + ".desc="); + } + + this.achievementList.put(textId, achievement); + return achievement; + } + + public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, String requirement, + boolean special) { + Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY + y, icon, + this.getAchievement(requirement)); + if (special) { + achievement.setSpecial(); + } + + achievement.registerStat(); + if (CORE.DEVENV) { + GT_Log.out.println("achievement." + textId + "="); + GT_Log.out.println("achievement." + textId + ".desc="); + } + + this.achievementList.put(textId, achievement); + return achievement; + } + + public void issueAchievement(EntityPlayer entityplayer, String textId) { + if (entityplayer != null) { + entityplayer.triggerAchievement((StatBase) this.achievementList.get(textId)); + } + } + + public Achievement getAchievement(String textId) { + return this.achievementList.containsKey(textId) ? (Achievement) this.achievementList.get(textId) : null; + } + + + /** + * A generic handler that will give an achievement for an item. + * Useful to only write this once, then call it from all handlers. + * @param aStack - The Itemstack to check for achievements. + * @param aPlayer - The player to unlock for. + */ + private void handleAchivement(ItemStack aStack, EntityPlayer aPlayer) { + + if (aPlayer != null && aStack != null) { + /* + * Copy this to all events because I am lazy - Alk 2019 + */ + + //Safe name + String aUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); + + + boolean isValid = false; + //Check if valid name // mod + String aModID = ItemUtils.getModId(aStack); + + if (aModID == null || aModID.length() <= 0 || aModID.isEmpty()) { + return; + } + + if (aModID != null && (ItemUtils.getModId(aStack).equals(CORE.MODID) || ItemUtils.getModId(aStack).equalsIgnoreCase("gregtech"))) { + isValid = true; + } + if (!isValid) { + return; + } + + //Should unlock base achievement from *ANY* GT++ item. (Too lazy to special case GT machineBlocks though) + if (ItemUtils.getModId(aStack).equals(CORE.MODID)) { + this.issueAchievement(aPlayer, aBaseAchievementName); + } + + if (aUnlocalName.contains("item.")) { + aUnlocalName = aUnlocalName.substring(5); + } + else if (aUnlocalName.contains("tile.")) { + aUnlocalName = aUnlocalName.substring(5); + } + + //Logger.INFO("Picked up "+aUnlocalName); + + + /** + * Misc Blocks + */ + + if (aUnlocalName.equals("blockFishTrap")) { + this.issueAchievement(aPlayer, "block.fishtrap"); + } + if (aUnlocalName.equals("blockBlackGate")) { + this.issueAchievement(aPlayer, "block.withercage"); + } + + + /** + * Decayables + */ + if (aUnlocalName.equals("dustNeptunium238")) { + this.issueAchievement(aPlayer, "decay.neptunium238"); + } + else if (aUnlocalName.equals("dustRadium226")) { + this.issueAchievement(aPlayer, "decay.radium226"); + } + else if (aUnlocalName.equals("dustMolybdenum99")) { + this.issueAchievement(aPlayer, "decay.molybdenum99"); + } + else if (aUnlocalName.equals("dustTechnetium99M")) { + this.issueAchievement(aPlayer, "decay.technetium99m"); + } + else if (aUnlocalName.equals("dustTechnetium99")) { + this.issueAchievement(aPlayer, "decay.technetium99"); + } + + /** + * Random Materials worthy of Achievements + */ + else if (aUnlocalName.equals("itemDustPotin")) { + this.issueAchievement(aPlayer, "dust.potin"); + } + else if (aUnlocalName.equals("itemDustEglinSteel")) { + this.issueAchievement(aPlayer, "dust.eglin"); + } + else if (aUnlocalName.equals("itemDustStaballoy")) { + this.issueAchievement(aPlayer, "dust.staballoy"); + } + else if (aUnlocalName.equals("itemDustQuantum")) { + this.issueAchievement(aPlayer, "dust.quantum"); + } + else if (aUnlocalName.equals("itemDustHypogen")) { + this.issueAchievement(aPlayer, "dust.hypogen"); + } + + + + /** + * Machines + */ + + else if (aUnlocalName.startsWith("gt.blockmachines.")) { + + //Readability + String aStartsWith = "gt.blockmachines."; + + /** + * Single Blocks + */ + + //RTG + if (aUnlocalName.startsWith(aStartsWith + "basicgenerator.rtg")) { + this.issueAchievement(aPlayer, "rtg"); + } + //Dehydrator + else if (aUnlocalName.startsWith(aStartsWith + "machine.dehydrator.tier.")) { + this.issueAchievement(aPlayer, "dehydrate"); + } + //SemiFluids + else if (aUnlocalName.startsWith(aStartsWith + "basicgenerator.semifluid.tier.")) { + this.issueAchievement(aPlayer, "semifluid"); + } + //Simple Washer + else if (aUnlocalName.startsWith(aStartsWith + "simplewasher.01.tier.")) { + this.issueAchievement(aPlayer, "earlywasher"); + } + //Advanced Boilers + else if (aUnlocalName.startsWith(aStartsWith + "electricboiler.")) { + this.issueAchievement(aPlayer, "advancedsteam"); + } + //Scrubers + else if (aUnlocalName.startsWith(aStartsWith + "pollutioncleaner.01.tier.")) { + this.issueAchievement(aPlayer, "pollutionremoval"); + } + //High-amp xformers + else if (aUnlocalName.startsWith(aStartsWith + "transformer.ha.tier.")) { + this.issueAchievement(aPlayer, "hiampxform"); + } + //Buffered Dynamos + else if (aUnlocalName.startsWith(aStartsWith + "hatch.dynamo.buffer.tier.")) { + this.issueAchievement(aPlayer, "hatch.dynamo.buffered"); + } + //Control Core Hatch + else if (aUnlocalName.startsWith(aStartsWith + "hatch.control.adv")) { + this.issueAchievement(aPlayer, "hatch.control"); + } + + + + /** + * Multis + */ + + //ABS + else if (aUnlocalName.equals(aStartsWith + "industrialsalloyamelter.controller.tier.single")) { + this.issueAchievement(aPlayer, "multi.abs"); + } + //PSS + else if (aUnlocalName.equals(aStartsWith + "substation.01.input.single")) { + this.issueAchievement(aPlayer, "multi.pss"); + } + //Cyclotron + else if (aUnlocalName.startsWith(aStartsWith + "cyclotron.tier.single")) { + this.issueAchievement(aPlayer, "multi.cyclo"); + } + //Sifter + else if (aUnlocalName.equals(aStartsWith + "industrialsifter.controller.tier.single")) { + this.issueAchievement(aPlayer, "multi.sifter"); + } + //Coke Oven + else if (aUnlocalName.equals(aStartsWith + "industrialcokeoven.controller.tier.single")) { + this.issueAchievement(aPlayer, "multi.cokeoven"); + } + //Thermal Boiler + else if (aUnlocalName.equals(aStartsWith + "gtplusplus.thermal.boiler")) { + this.issueAchievement(aPlayer, "multi.boiler.thermal"); + } + //Zhuhai + else if (aUnlocalName.equals(aStartsWith + "industrial.fishpond.controller.tier.single")) { + this.issueAchievement(aPlayer, "multi.zhuhai"); + } + + } + + /** + * Casings + */ + + else if (aUnlocalName.equals("gtplusplus.blockcasings.14")) { + this.issueAchievement(aPlayer, "casing.abs"); + } + + else if (aUnlocalName.equals("gtplusplus.blockcasings.2.9")) { + this.issueAchievement(aPlayer, "casing.cyclotron.coil"); + } + + else if (aUnlocalName.equals("gtplusplus.blockcasings.3.2")) { + this.issueAchievement(aPlayer, "casing.multiuse"); + } + else if (aUnlocalName.equals("gtplusplus.blockcasings.3.15")) { + this.issueAchievement(aPlayer, "casing.containment"); + } + } + } + + + + + /* + * Handle achievements for all vanilla types of obtianment. + */ + + + + @SubscribeEvent + public void onCrafting(ItemCraftedEvent event) { + EntityPlayer player = event.player; + ItemStack stack = event.crafting; + if (player != null && stack != null) { + handleAchivement(stack, player); + } + } + + @SubscribeEvent + public void onSmelting(ItemSmeltedEvent event) { + EntityPlayer player = event.player; + ItemStack stack = event.smelting; + if (player != null && stack != null) { + handleAchivement(stack, player); + } + } + + @SubscribeEvent + public void onItemPickup(EntityItemPickupEvent event) { + EntityPlayer player = event.entityPlayer; + ItemStack stack = event.item.getEntityItem(); + if (player != null && stack != null) { + handleAchivement(stack, player); + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/BookHandler.java b/src/main/java/gtPlusPlus/core/handler/BookHandler.java new file mode 100644 index 0000000000..d85de925bf --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/BookHandler.java @@ -0,0 +1,404 @@ +package gtPlusPlus.core.handler; + +import java.util.HashMap; +import java.util.Map; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class BookHandler { + + public static int mBookKeeperCount = 0; + + public static Map mBookMap = new HashMap(); + + public static BookTemplate book_ThermalBoiler; + public static BookTemplate book_MultiPowerStation; + public static BookTemplate book_ModularBauble; + public static BookTemplate book_MultiMachineManual; + public static BookTemplate book_NuclearManual; + public static BookTemplate book_MultiChemicalPlant; + + public static void run(){ + + Logger.INFO("Writing books."); + + //Thermal Boiler + book_ThermalBoiler = writeBookTemplate( + "Manual_Thermal_Boiler", "Thermal Boiler Manual", "GregoriusT", + new String[] { + "This Book explains how to set up and run your Thermal Boiler. We are not responsible for any Damage done by this Book itself nor its content.", + "First you need to craft the following things for a Thermal Boiler to Function: The Main Boiler Block, 20 Thermal Containment Casings, two Input Hatches, two Output Hatches, a bunch of different Tools and a Maintenance Hatch.", + "To begin the building, lay out the first 3x3 layer of Machine Casings on the ground (with a Hatch in the Middle), then place the Boiler Block facing outward in the middle of one of the 3m wide Sides.", + "Now grab 3 other Hatches and place them on the remaining three 3m wide Sides also facing outwards. And now the four corners of the Machine need also a Machine Casing. There should only be a Hole left in the middle of the Cube.", + "So, now place a 3x3 of Machine Casings ontop, at the 3rd Layer with the last Hatch in the middle facing outwards as well.", + "When accessing the Boiler Block, it should now stop telling you, that the structure is incomplete (bottom Line of that Screen). Now go with a bunch of different Tools (Metal Hammer, Rubber Hammer, Screwdriver, Wrench, Soldering Iron and Crowbar)", + "to the Maintenance Hatch and access it. After that you grab the 6 Tools and rightclick the Slot with each of them in your Hand in the Maintenance GUI. Note that you need Soldering Tin/Lead in your Inventory to use the Soldering Iron.", + "The Main Block should now tell you that you need to use the Rubber Hammer on it to (re)activate the Machine. The Rubber Hammer can enable and disable Machines. The Machine disables itself after something important broke.", + "If you want to use Lava with this Device, then you should add a Lava Filter to extract additional Resources from the Lava. If the Filter breaks, the Machine won't explode like a Turbine would. If you use molten Salt, then you won't need a Filter.", + "You will get Obsidian when processing Lava, however if a Filter is used, you will get sometimes an Ingot instead of a Block of Obsidian. When using molten Salt, you will get the Salt back.", + "So, now for the Maintenance. After a few Hours of running nonstop, your Boiler will get small Problems, which don't prevent it from running, these Problems just decrease Efficiency. Every Problem listed on the Screen does -10% Efficiency.", + "To fix these Problems, just go to the Maintenance Hatch and click with the problem corresponding Tool on the Slot to repair. If all six possible runtime Problems happen, the Machine will auto-shutdown no matter what. No Explosion, it's just stopping.", + "The Thermal Boiler will produce 800 Liters of Steam per tick for about 5 or 6 Liters of Water per tick at reaching 100% Efficiency. In case of Lava it consumes 1666 Liters every Second.", + "A Thermal Boiler is worth about 33 small Thermal Generators, and as the Boilers get much less Efficient, when not having enough Fuel, you should consider making a large Nether Pump for Lava, or a good Nuclear Reactor for molten Salt.", + "Input and Output Slots are fully optional, you can place multiple ones of them or even none on the Machine. A Machine without Input couldn't process any Recipes, while a Machine without Output just voids all outputted Items and Liquids.", + "It might be useful to use the Screwdriver on the Output Hatches to determine what is outputted where." }); + + + + //Test Novel + book_MultiPowerStation = writeBookTemplate( + "Manual_Multi_PowerStation", + "Power Storage & You [Version 0.64]", + "Alkalus", + new String[] { + //Page 1 + "So, when it comes to power storage you relaly have three seperate options:\n"+ + " \n"+ + "Battery Buffers,\n"+ + "Energy Buffers,\n"+ + "The Power Sub-Station\n", + //Page 2 + "Battery Buffer\n" + + " \n" + + "Is rather portable. Allowing you to throw set one up and insert batteries where ever you may need."+"\n"+ + "They output 1A for each battery stored inside, upto a maximum of 16A.", + //Page 3 + "Energy Buffer\n" + + " \n" + + "Is a more optimal choice for storage in your base. Once placed down, they cannot be moved without losing all stored power."+"\n"+ + "Energy Buffers can output 4A from the output side, however accept 16A as input.", + //Page 4 + "The Power Sub-Station"+ + " \n"+ + "Is used for storing Insane amounts of power later game."+"\n"+ + "Consumes 2% of the average voltage of all energy type hatches every tick."+"\n", + //Page 5 + "Allows Insertation/Removal of power from the rear face of the controller, swap with a screwdriver."+"\n"+ + "Variable Height Structure, between 4-16Y. Inserted Redox Cells dictate max energy tier of structure."+"\n", + //Page 6 + "Redox Cells cannot be placed into the Top or Bottom layer and only take up 3xhx3 internally."+"\n"+ + "Different Tier cells CANNOT be mixed together."+"\n", + //Page 7 + "All Hatches Must be HV at a Minimum, this minimum tier is in place to stop people abusing ULV/LV hatches to lower the avg/t."+"\n"+ + "Currently the GUI will NOT display anything at all until the structure forms, this is a known bug."+"\n", + //Page 8 + "Valid Hatches:\n"+ + "Energy Hatch,\n"+ + "Dynamo Hatch,\n"+ + "Charging Bus,\n"+ + "Discharging Bus,\n"+ + "Dynamo Buffer,\n"+ + "Multi-Amp Dynamo Hatch.\n\n\n"+ + "Structure MUST contain at least one energy input and one energy output hatch." + }); + + //Test Novel + book_ModularBauble = writeBookTemplate( + "Manual_Modular_Bauble", "How to: Modular Baubles", "Alkalus", + new String[] { + "Concept: This idea came from wanting flexibility. \n" + + "First step, Build a Modularity table to begin customisation of your Bauble. \n" + + " After this has been constructed, you can now combine the upgrades listed within this book to improve the baubles level/100.", + "Defence:\n" + + "Can be upgraded by combining metal plates with the bauble. \n" + + " | +1 | Aluminium \n" + + " | +2 | Stainless Steel \n" + + " | +3 | Tungsten \n" + + " | +4 | Tungsten Steel \n" + + " | +5 | Naquadah \n", + "There was once a sad and lonely oak tree. \n", + "There was once a sad and lonely oak tree. \n", + "There was once a sad and lonely oak tree. \n"}); + + //Test Novel + //20/21/22 + book_MultiMachineManual = writeBookTemplate( + "Manual_Multi_Machine", "Multi-Machine Manual", "Alkalus", + new String[] { + "This Multiblock, depending upon the mode used, can function as a variety of different machines. The idea behind this, was that most of these machines are rather niche compared to any others, as such, not used often.", + "To build, you need to construct a hollow 3x3x3 structure made from Multi-Use casings, With a minimum of 6. Any Casing position can be substituted out with an Input Hatch/Bus, an Output Hatch/Bus, Muffler, Maint. Hatch or Energy Injector Hatch.", + "The Mode can be set by using a Screwdriver on the controller block. Each mode allows the use of Numbered Circuits, to allow a different machine 'type' for each input bus.", + "[Metal Work] Mode A - Allows the multiblock to function as a Compressor, a Lathe or an Electro-Magnet. To allow a hatch to run in Compressor mode, insert a No. 20 circuit. For Lathe, use No. 21 and for Electro-Magnet use No. 22.", + "[Fluid Work] Mode B - Allows the multiblock to function as a Fermenter, a Fluid Extractor or an Extractor. To allow a hatch to run in Fermenter mode, insert a No. 20 circuit. For Fluid Extractor, use No. 21 and for Extractor use No. 22.", + "[Misc. Work] Mode C - Allows the multiblock to function as a Laser Engraver, an Autoclave or a Fluid Solidifier. To allow a hatch to run in Laser Engraver mode, insert a No. 20 circuit. For Autoclave, use No. 21 and for Solidifier use No. 22.", + }); + + book_NuclearManual = writeBookTemplate( + "Manual_NuclearStuff_1", "Nuclear Chemistry [FFPP]", "Alkalus", + new String[] { + //Page 1 + "Fission Fuel Processing Plant\n" + + "Size: 3x9x3 [LxHxW]\n" + + "Controller: Center, Bottom\n" + + "4x Input Hatch\n" + + "2x Output Hatch\n" + + "1x Output Bus\n" + + "1x ZPM+ Muffler\n" + + "1x Maintenance Hatch\n" + + "1x Energy Hatch\n", + //Page 2 + "[1] 7x Hastelloy-X or I/O\n" + + "[2] 5x Incoloy-DS Fluid Containment\n" + + "[3] 4x Zeron-100 Shielding\n" + + "[4] 17x Hastelloy-N Sealant Case" + + "\n" + + "Multiblock Construction\n" + + "Convention is [LxHxW]\n" + + "\n", + //Page 3 + "Layer 1/2:\n" + + "[1][1][1]\n" + + "[1][1][1]\n" + + "[1][1][1]\n" + + "\n" + + "Layer 3/5/6\n" + + "[ ][4][ ]\n" + + "[4][2][4]\n" + + "[ ][4][ ]\n" + + "\n", + //Page 4 + "Layer 4\n" + + "[ ][3][ ]\n" + + "[3][2][3]\n" + + "[ ][3][ ]\n" + + "\n" + + "Layer 7/8/9\n" + + "[ ][ ][ ]\n" + + "[ ][3][ ]\n" + + "[ ][ ][ ]\n" + , + //Page 5 + "Fission Fuel\n"+ + "Processing Plant"+ + "----------------------\n"+ + "This structure is used to produce the Molten Salts required to run a Liquid Fluorine Thorium Reactor [LFTR]." + + }); + + + book_MultiChemicalPlant = writeBookTemplate( + "book_Multi_ChemicalPlant", "Chemical Plant Manual", "Alkalus", + new String[] { + + // Intro + "This book will explain how the Chemical Plant is constructed, which blocks are valid to upgrade it and also how the upgrades work.", + + // Info + "Solid Casings = Plant tier" + "\n" + + "Machine Casings = Hatch tier" + "\n" + + "Higher tier coils More Speed" + "\n" + + "T1 50% , T2 100% , T3 150%, etc" + "\n", + + "Higher tier pipe casings boost parallel"+ "\n" + + "and reduce catalyst consumption" + "\n" + + "+2 parallel per tier, 20% extra chance of"+ "\n" + + "not damaging catalyst per tier" + "\n", + + + // Machine Casings + "Valid Solid Machine Casings:" + "\n" + + "0 - Strong Bronze" + "\n" + + "1 - Solid Steel" + "\n" + + "2 - Sturdy Aluminium" + "\n" + + "3 - Clean Stainless Steel" + "\n" + + "4 - Stable Titanium" + "\n" + + "5 - Robust Tungstensteel" + "\n" + + "6 - Vigorous Laurenium" + "\n" + + "7 - Rugged Botmium", + + // Machine Casings + "Valid Tiered Machine Casings:" + "\n" + "\n" + + "1 - " + GT_Values.VN[0] + "\n" + + "2 - " + GT_Values.VN[1] + "\n" + + "3 - " + GT_Values.VN[2] + "\n" + + "4 - " + GT_Values.VN[3] + "\n" + + "5 - " + GT_Values.VN[4] + "\n" + + "6 - " + GT_Values.VN[5] + "\n" + + "7 - " + GT_Values.VN[6] + "\n" + + "8 - " + GT_Values.VN[7] + "\n" + + "9 - " + GT_Values.VN[8] + "\n" + + "10 - " + GT_Values.VN[9], + + // Pipe Casings + "Valid Pipe Casings:" + "\n" + "\n" + + "1 - Bronze" + "\n" + + "2 - Steel" + "\n" + + "3 - Titanium" + "\n" + + "4 - Tungstensteel", + + //Coils + "Valid Coils:" + "\n" + "\n" + + "1 - Cupronickel" + "\n" + + "2 - Kanthal" + "\n" + + "3 - Nichrome" + "\n" + + "4 - Tungstensteel" + "\n" + + "5 - HSS-G" + "\n" + + "6 - Naquadah" + "\n" + + "7 - Naquadah Alloy", + + // Requirements + "Multiblock Requirements:" + "\n" + "\n" + + "27x Coils" + "\n" + + "18x Pipe Casings" + "\n" + + "57x Tiered Machine Casings" + "\n" + + "80+ Solid Casings" + "\n" + + "1x Catalyst Housing (Catalysts cannot go inside an Input Bus)", + + // Construction Guide + "Construction Guide Pt1:" + "\n" + "\n" + + "Controller is placed on a middle casing in the bottom layer" + "\n" + + "Hatches can only be placed on the bottom layer edges", + + "Construction Guide Pt2:" + "\n" + "\n" + + "7x7x7 Hollow frame of solid casings" + "\n" + + "5x1x5 layer of solid casings (fills in top layer)" + "\n" + + "5x1x5 layer of machine casings (fills in bottom layer)", + + "Construction Guide Pt3:" + "\n" + + "In the central 3x5x3:" + "\n" + + "3x1x3 layer of Coils, surrounded by ring of Machine Casings" + "\n" + + "3x1x3 layer of Pipe Casings" + "\n" + + "3x1x3 layer of Coils" + "\n" + + "3x1x3 layer of Pipe Casings" + "\n" + + "3x1x3 layer of Coils, surrounded by ring of Machine Casings", + + // Construction Guide Info + "Information:" + "\n" + "\n" + + "A = Air" + "\n" + + "X = Solid Casing" + "\n" + + "M = Machine Casing" + "\n" + + "P = Pipe Casing" + "\n" + + "C = Coil Casing", + + "Layer 1:" + "\n" + "\n" + + "XXXXXXX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XXXXXXX", + + "Layer 2:" + "\n" + "\n" + + "XAAAAAX" + "\n" + + "AMMMMMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMMMMMA" + "\n" + + "XAAAAAX", + + "Layer 3:" + "\n" + "\n" + + "XAAAAAX" + "\n" + + "AAAAAAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAAAAAA" + "\n" + + "XAAAAAX", + + "Layer 4:" + "\n" + "\n" + + "XAAAAAX" + "\n" + + "AAAAAAA" + "\n" + + "AACCCAA" + "\n" + + "AACCCAA" + "\n" + + "AACCCAA" + "\n" + + "AAAAAAA" + "\n" + + "XAAAAAX", + + "Layer 5:" + "\n" + "\n" + + "XAAAAAX" + "\n" + + "AAAAAAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAAAAAA" + "\n" + + "XAAAAAX", + + "Layer 6:" + "\n" + "\n" + + "XAAAAAX" + "\n" + + "AMMMMMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMMMMMA" + "\n" + + "XAAAAAX", + + "Layer 7:" + "\n" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX", + }); + + } + + + + + public static ItemStack ItemBookWritten_ThermalBoiler; + public static ItemStack ItemBookWritten_NuclearManual; + public static ItemStack ItemBookWritten_ModularBaubles; + public static ItemStack ItemBookWritten_MultiPowerStorage; + public static ItemStack ItemBookWritten_MultiMachineManual; + public static ItemStack ItemBookWritten_MultiChemicalPlant; + + public static void runLater(){ + ItemBookWritten_ThermalBoiler = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 0, 1); + ItemBookWritten_MultiPowerStorage = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 1, 1); + ItemBookWritten_ModularBaubles = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 2, 1); + ItemBookWritten_MultiMachineManual = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 3, 1); + ItemBookWritten_NuclearManual = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 4, 1); + ItemBookWritten_MultiChemicalPlant = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, 5, 1); + + //Multiblock Manuals + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getSimpleStack(Items.lava_bucket)}, ItemBookWritten_ThermalBoiler); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict(CI.craftingToolWrench, 1)}, ItemBookWritten_MultiMachineManual); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Tin", 1)}, ItemBookWritten_MultiPowerStorage); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1)}, ItemBookWritten_NuclearManual); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Copper", 1)}, ItemBookWritten_MultiChemicalPlant); + + for (int i=0;i temp : CORE.burnables) { + int aStackID = Item.getIdFromItem(aStack.getItem()); + int burnID = Item.getIdFromItem(temp.getValue().getItem()); + if (aStackID == burnID){ + int burn = temp.getKey(); + ItemStack fuel = temp.getValue(); + ItemStack testItem = ItemUtils.getSimpleStack(fuel, aStack.stackSize); + + if (aStack.isItemEqual(testItem)){ + return burn; + } + } + } + + //If it's not my fuel, return 0. + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java new file mode 100644 index 0000000000..53d63499a6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -0,0 +1,320 @@ +package gtPlusPlus.core.handler; + +import static gtPlusPlus.core.lib.LoadedMods.Gregtech; + +import java.util.LinkedList; +import java.util.Queue; +import java.util.Set; + +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.common.compat.COMPAT_BigReactors; +import gtPlusPlus.core.common.compat.COMPAT_CompactWindmills; +import gtPlusPlus.core.common.compat.COMPAT_EnderIO; +import gtPlusPlus.core.common.compat.COMPAT_ExtraUtils; +import gtPlusPlus.core.common.compat.COMPAT_HarvestCraft; +import gtPlusPlus.core.common.compat.COMPAT_IC2; +import gtPlusPlus.core.common.compat.COMPAT_MorePlanets; +import gtPlusPlus.core.common.compat.COMPAT_OpenBlocks; +import gtPlusPlus.core.common.compat.COMPAT_PneumaticCraft; +import gtPlusPlus.core.common.compat.COMPAT_RFTools; +import gtPlusPlus.core.common.compat.COMPAT_Railcraft; +import gtPlusPlus.core.common.compat.COMPAT_SimplyJetpacks; +import gtPlusPlus.core.common.compat.COMPAT_Thaumcraft; +import gtPlusPlus.core.common.compat.COMPAT_Witchery; +import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler; +import gtPlusPlus.core.handler.Recipes.RegistrationHandler; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.recipe.RECIPES_Extruder; +import gtPlusPlus.core.recipe.RECIPES_GREGTECH; +import gtPlusPlus.core.recipe.RECIPES_LaserEngraver; +import gtPlusPlus.core.recipe.ShapedRecipeObject; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaGarbageCollector; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_FluidCanning; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling; +import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_GTNH; +import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_Nuclear; +import gtPlusPlus.xmod.gregtech.registration.gregtech.*; +import net.minecraft.item.ItemStack; + +public class COMPAT_HANDLER { + + public static Queue RemoveRecipeQueue = new LinkedList<>(); + public static Queue AddRecipeQueue = new LinkedList<>(); + public static Boolean areInitItemsLoaded = false; + + + public static void registerMyModsOreDictEntries(){ + + Logger.INFO("Registering Materials with OreDict."); + //In-house + + //tools + GT_OreDictUnificator.registerOre("craftingToolSandHammer", new ItemStack(ModItems.itemSandstoneHammer)); + + for(int i=1; i<=10; i++){ + GT_OreDictUnificator.registerOre("bufferCore_"+GT_Values.VN[i-1], new ItemStack(ItemUtils.getItemFromFQRN("miscutils:item.itemBufferCore"+i))); + } + } + + public static void registerGregtechMachines() { + if (Gregtech) { + + //Debug + GregtechItemList.Garbage_Collector_Debug_Machine.set( + new GregtechMetaGarbageCollector( + "garbagecollector.01.tier.single", + "JVM Garbage Collector", + "Useful for debugging or smoother performance on local servers").getStackForm(1L)); + + + //Free IDs + /* + --- + 859 + to + 868 + --- + 911 + to + 940 + */ + + new RECIPES_LaserEngraver(); + new RECIPES_Extruder(); + GregtechGeneratorsULV.run(); + GregtechEnergyBuffer.run(); + GregtechLFTR.run(); + GregtechSteamCondenser.run(); + GregtechSafeBlock.run(); + //GregtechSuperConductionPoint.run(); + GregtechIronBlastFurnace.run(); + GregtechIndustrialCentrifuge.run(); + GregtechIndustrialCokeOven.run(); + GregtechIndustrialPlatePress.run(); + GregtechRocketFuelGenerator.run(); + GregtechIndustrialElectrolyzer.run(); + GregtechIndustrialMacerator.run(); + GregtechIndustrialWiremill.run(); + GregtechIndustrialMassFabricator.run(); + GregtechIndustrialBlastSmelter.run(); + GregtechSolarGenerators.run(); + GregtechPowerSubStation.run(); + GregtechDehydrator.run(); + GregtechAdvancedBoilers.run(); + GregtechPollutionDevices.run(); + GregtechTieredFluidTanks.run(); + //GregtechIndustrialMultiTank.run(); + GregtechGeothermalThermalGenerator.run(); + Gregtech4Content.run(); + GregtechIndustrialFuelRefinery.run(); + GregtechTreeFarmerTE.run(); + GregtechIndustrialTreeFarm.run(); + GregtechIndustrialSifter.run(); + GregtechSimpleWasher.run(); + GregtechRTG.run(); + GregtechCyclotron.run(); + GregtechHiAmpTransformer.run(); + GregtechIndustrialThermalCentrifuge.run(); + GregtechIndustrialWashPlant.run(); + GregtechSemiFluidgenerators.run(); + GregtechAdvancedMixer.run(); + GregtechWirelessChargers.run(); + GregtechIndustrialGeneratorArray.run(); + GregtechIndustrialCuttingFactory.run(); + //GregtechMiniRaFusion.run(); + GregtechComponentAssembler.run(); + //GregtechTeslaTower.run(); + GregtechSuperChests.run(); + GregtechIndustrialFishPond.run(); + GregtechTieredChunkloaders.run(); + GregtechIndustrialExtruder.run(); + GregtechIndustrialMultiMachine.run(); + //GregtechBedrockPlatforms.run(); + GregtechBufferDynamos.run(); + GregtechAmazonWarehouse.run(); + GregtechFactoryGradeReplacementMultis.run(); + GregtechThaumcraftDevices.run(); + GregtechThreadedBuffers.run(); + GregtechIndustrialMixer.run(); + GregtechCustomHatches.run(); + //GregtechNaqReactor.run(); + GregtechIndustrialArcFurnace.run(); + //GregtechSolarTower.run(); + GregtechLargeTurbinesAndHeatExchanger.run(); + GregtechPowerBreakers.run(); + GregtechFluidReactor.run(); + GregtechAlgaeContent.run(); + GregtechIndustrialAlloySmelter.run(); + GregtechIsaMill.run(); + GregtechSteamMultis.run(); + //GregtechIndustrialElementDuplicator.run(); + + //New Horizons Content + NewHorizonsAccelerator.run(); + } + + } + + //InterMod + public static void intermodOreDictionarySupport(){ + + if (LoadedMods.Big_Reactors){ + COMPAT_BigReactors.OreDict(); + } + if (LoadedMods.EnderIO){ + COMPAT_EnderIO.OreDict(); + } + if (LoadedMods.MorePlanets){ + COMPAT_MorePlanets.OreDict(); + } + if (LoadedMods.OpenBlocks){ + COMPAT_OpenBlocks.OreDict(); + } + if (LoadedMods.Railcraft){ + COMPAT_Railcraft.OreDict(); + } + if (LoadedMods.Simply_Jetpacks){ + COMPAT_SimplyJetpacks.OreDict(); + } + if (LoadedMods.RFTools){ + COMPAT_RFTools.OreDict(); + } + if (LoadedMods.Thaumcraft){ + COMPAT_Thaumcraft.OreDict(); + } + if (LoadedMods.Extra_Utils){ + COMPAT_ExtraUtils.OreDict(); + } + if (LoadedMods.PneumaticCraft){ + COMPAT_PneumaticCraft.OreDict(); + } + if (LoadedMods.CompactWindmills){ + COMPAT_CompactWindmills.OreDict(); + } + if (LoadedMods.IndustrialCraft2){ + COMPAT_IC2.OreDict(); + } + if (LoadedMods.PamsHarvestcraft){ + COMPAT_HarvestCraft.OreDict(); + } + if (LoadedMods.Witchery) { + COMPAT_Witchery.OreDict(); + } + } + + public static void RemoveRecipesFromOtherMods(){ + //Removal of Recipes + for(final Object item : RemoveRecipeQueue){ + RecipeUtils.removeCraftingRecipe(item); + } + } + + public static void InitialiseHandlerThenAddRecipes(){ + RegistrationHandler.run(); + } + public static void InitialiseLateHandlerThenAddRecipes(){ + LateRegistrationHandler.run(); + } + + public static void startLoadingGregAPIBasedRecipes(){ + //Add hand-made recipes + RECIPES_GREGTECH.run(); + RecipeLoader_GTNH.generate(); + RecipeLoader_Nuclear.generate(); + //Add autogenerated Recipes from Item Components + for (Set> m : MaterialGenerator.mRecipeMapsToGenerate) { + for (RunnableWithInfo r : m) { + try { + r.run(); + Logger.INFO("[FIND] "+r.getInfoData().getLocalizedName()+" recipes generated."); + } + catch (Throwable t) { + t.printStackTrace(); + Logger.INFO("[ERROR] "+r.getInfoData().getLocalizedName()+" recipes failed to generated."); + } + } + } + RecipeGen_Recycling.executeGenerators(); + runQueuedMisc(); + + // Do Fluid Canning Last, because they're not executed on demand, but rather queued. + RecipeGen_FluidCanning.init(); + } + + + + public static void onLoadComplete(FMLLoadCompleteEvent event) { + runQueuedOnLoadComplete(event); + } + + public static final AutoMap> mRecipesToGenerate = new AutoMap>(); + public static final AutoMap> mGtRecipesToGenerate = new AutoMap>(); + + public static final AutoMap> mObjectsToRunInPostInit = new AutoMap>(); + public static final AutoMap mObjectsToRunInOnLoadComplete = new AutoMap(); + + public static void runQueuedRecipes() { + //Add autogenerated Recipes from Item Components + for (RunnableWithInfo m : mRecipesToGenerate) { + try { + m.run(); + } + catch (Throwable t) { + t.printStackTrace(); + Logger.INFO("[ERROR] "+m.getInfoData()+" recipe failed to generated."); + } + + } + for (RunnableWithInfo m : mGtRecipesToGenerate) { + try { + m.run(); + } + catch (Throwable t) { + t.printStackTrace(); + Logger.INFO("[ERROR] "+m.getInfoData()+" recipe failed to generated."); + } + + } + } + + public static void runQueuedMisc() { + for (RunnableWithInfo m : mObjectsToRunInPostInit) { + try { + m.run(); + } + catch (Throwable t) { + t.printStackTrace(); + Logger.INFO("[ERROR] "+m.getInfoData()); + } + + } + } + + /** + * Generally used to register GT recipe map changes after they've been populated. + */ + public static void runQueuedOnLoadComplete(FMLLoadCompleteEvent event) { + for (ItemPackage m : mObjectsToRunInOnLoadComplete) { + try { + m.onLoadComplete(event); + } + catch (Throwable t) { + t.printStackTrace(); + Logger.INFO("[ERROR] "+m.getInfoData()); + } + + } + } +} diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java new file mode 100644 index 0000000000..9a1b551d30 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java @@ -0,0 +1,91 @@ +package gtPlusPlus.core.handler; + +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gtPlusPlus.xmod.bartcrops.HANDLER_CropsPlusPlus; +import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; +import gtPlusPlus.xmod.computronics.HANDLER_Computronics; +import gtPlusPlus.xmod.forestry.HANDLER_FR; +import gtPlusPlus.xmod.galacticraft.HANDLER_GalactiCraft; +import gtPlusPlus.xmod.gregtech.HANDLER_GT; +import gtPlusPlus.xmod.growthcraft.HANDLER_GC; +import gtPlusPlus.xmod.ic2.HANDLER_IC2; +import gtPlusPlus.xmod.ob.HANDLER_OpenBlocks; +import gtPlusPlus.xmod.railcraft.HANDLER_Railcraft; +import gtPlusPlus.xmod.reliquary.HANDLER_Reliquary; +import gtPlusPlus.xmod.sc2.HANDLER_SC2; +import gtPlusPlus.xmod.sol.HANDLER_SpiceOfLife; +import gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft; +import gtPlusPlus.xmod.thermalfoundation.HANDLER_TF; +import gtPlusPlus.xmod.tinkers.HANDLER_Tinkers; + +public class COMPAT_IntermodStaging { + + public static void preInit(FMLPreInitializationEvent preinit){ + HANDLER_GT.preInit(); + HANDLER_GC.preInit(); + HANDLER_TF.preInit(); + HANDLER_FR.preInit(); + HANDLER_IC2.preInit(); + HANDLER_Computronics.preInit(); + HANDLER_BiomesOPlenty.preInit(); + //HANDLER_Mekanism.preInit(); + HANDLER_Thaumcraft.preInit(); + HANDLER_Tinkers.preInit(); + HANDLER_SC2.preInit(); + HANDLER_GalactiCraft.preInit(); + HANDLER_CropsPlusPlus.preInit(preinit); + HANDLER_Railcraft.preInit(); + HANDLER_Reliquary.preInit(); + HANDLER_OpenBlocks.preInit(); + HANDLER_SpiceOfLife.preInit(); + } + + public static void init(FMLInitializationEvent init){ + HANDLER_GT.init(); + HANDLER_GC.init(); + HANDLER_TF.init(); + HANDLER_FR.Init(); + HANDLER_IC2.init(); + HANDLER_Computronics.init(); + HANDLER_BiomesOPlenty.init(); + //HANDLER_Mekanism.init(); + HANDLER_Thaumcraft.init(); + HANDLER_Tinkers.init(); + HANDLER_SC2.init(); + HANDLER_GalactiCraft.init(); + HANDLER_CropsPlusPlus.init(init); + HANDLER_Railcraft.init(); + HANDLER_Reliquary.init(); + HANDLER_OpenBlocks.init(); + HANDLER_SpiceOfLife.init(); + } + + public static void postInit(FMLPostInitializationEvent postinit){ + HANDLER_GT.postInit(); + HANDLER_GC.postInit(); + HANDLER_TF.postInit(); + HANDLER_FR.postInit(); + HANDLER_IC2.postInit(); + HANDLER_Computronics.postInit(); + HANDLER_BiomesOPlenty.postInit(); + //HANDLER_Mekanism.postInit(); + HANDLER_Thaumcraft.postInit(); + HANDLER_Tinkers.postInit(); + HANDLER_SC2.postInit(); + HANDLER_GalactiCraft.postInit(); + HANDLER_CropsPlusPlus.postInit(postinit); + HANDLER_Railcraft.postInit(); + HANDLER_Reliquary.postInit(); + HANDLER_OpenBlocks.postInit(); + HANDLER_SpiceOfLife.postInit(); + } + + public static void onLoadComplete(FMLLoadCompleteEvent event) { + HANDLER_GT.onLoadComplete(event); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/handler/CraftingManager.java b/src/main/java/gtPlusPlus/core/handler/CraftingManager.java new file mode 100644 index 0000000000..6fb580cc32 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/CraftingManager.java @@ -0,0 +1,17 @@ +package gtPlusPlus.core.handler; + +public class CraftingManager { + + public static void mainRegistry() { + addCraftingRecipies(); + addSmeltingRecipies(); + } + + public static void addCraftingRecipies() { + + } + + public static void addSmeltingRecipies() { + + } +} diff --git a/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java b/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java new file mode 100644 index 0000000000..d164efa3d7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/EnumHelperHandler.java @@ -0,0 +1,21 @@ +package gtPlusPlus.core.handler; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.HANDLER_GT; +import gtPlusPlus.xmod.ic2.CustomInternalName; + +public class EnumHelperHandler { + + public static void init() { + + if (LoadedMods.IndustrialCraft2) { + CustomInternalName.init(); + } + + if (LoadedMods.Gregtech) { + HANDLER_GT.addNewOrePrefixes(); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java new file mode 100644 index 0000000000..0567d6c5dd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java @@ -0,0 +1,231 @@ +package gtPlusPlus.core.handler; + +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; +import gtPlusPlus.core.container.*; +import gtPlusPlus.core.container.box.LunchBoxContainer; +import gtPlusPlus.core.container.box.MagicBagContainer; +import gtPlusPlus.core.container.box.ToolBoxContainer; +import gtPlusPlus.core.gui.beta.Gui_ID_Registry; +import gtPlusPlus.core.gui.beta.MU_GuiId; +import gtPlusPlus.core.gui.item.GuiBaseBackpack; +import gtPlusPlus.core.gui.item.GuiBaseGrindle; +import gtPlusPlus.core.gui.item.box.LunchBoxGui; +import gtPlusPlus.core.gui.item.box.MagicBagGui; +import gtPlusPlus.core.gui.item.box.ToolBoxGui; +import gtPlusPlus.core.gui.machine.*; +import gtPlusPlus.core.interfaces.IGuiManager; +import gtPlusPlus.core.inventories.BaseInventoryBackpack; +import gtPlusPlus.core.inventories.BaseInventoryGrindle; +import gtPlusPlus.core.inventories.box.LunchBoxInventory; +import gtPlusPlus.core.inventories.box.MagicBagInventory; +import gtPlusPlus.core.inventories.box.ToolBoxInventory; +import gtPlusPlus.core.tileentities.base.TileEntityBase; +import gtPlusPlus.core.tileentities.general.*; +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; +import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; +import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; +import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; +import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; + +public class GuiHandler implements IGuiHandler { + + public static final int GUI1 = 0; // Project Table + public static final int GUI2 = 1; // Helium Generator + public static final int GUI3 = 2; // BackpackHandler + public static final int GUI4 = 3; // Workbench + public static final int GUI5 = 4; // Workbench Adv + public static final int GUI6 = 5; // Fish trap + public static final int GUI7 = 6; // Trade table + public static final int GUI8 = 7; // Circuit Programmer + public static final int GUI9 = 8; // Grindle + public static final int GUI10 = 9; // Universal Toolbox + public static final int GUI11 = 10; // Auto Lunchbox + public static final int GUI12 = 11; // Bag for Magic Tools + public static final int GUI13 = 12; // Decayables Chest + public static final int GUI14 = 13; // Super Jukebox + public static final int GUI15 = 14; // Pest Killer + public static final int GUI16 = 15; // Round-Robinator + public static final int GUI17 = 16; // Egg Box + public static final int GUI18 = 17; // Volumetric Flask Setter + + public static void init() { + + Logger.INFO("Registering GUIs."); + NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new GuiHandler()); + // Register GuiHandler + // NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new + // GuiHandler()); + } + + @Override // ContainerModTileEntity + public Object getServerGuiElement(final int ID, final EntityPlayer player, final World world, final int x, + final int y, final int z) { + final TileEntity te = world.getTileEntity(x, y, z); + + if (te != null) { + if (ID == GUI1) { + return new Container_ProjectTable(player.inventory, (TileEntityProjectTable) te); + } else if (ID == GUI2) { + return new Container_ModularityTable(player.inventory, (TileEntityModularityTable) te); + } + } + + if (ID == GUI3) { + // Use the player's held item to create the inventory + return new Container_BackpackBase(player, player.inventory, + new BaseInventoryBackpack(player.getHeldItem())); + } + + if (te != null) { + if (ID == GUI4) { + return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); + } else if (ID == GUI5) { + Logger.INFO("sad"); + return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); + + } else if (ID == GUI6) { + return new Container_FishTrap(player.inventory, (TileEntityFishTrap) te); + } else if (ID == GUI7) { + return new Container_TradeTable(player.inventory, (TileEntityTradeTable) te); + } else if (ID == GUI8) { + return new Container_CircuitProgrammer(player.inventory, (TileEntityCircuitProgrammer) te); + } else if (ID == GUI13) { + return new Container_DecayablesChest(player.inventory, (TileEntityDecayablesChest) te); + } else if (ID == GUI14) { + return new Container_SuperJukebox(player.inventory, (TileEntitySuperJukebox) te); + } else if (ID == GUI15) { + return new Container_PestKiller(player.inventory, (TileEntityPestKiller) te); + } else if (ID == GUI16) { + return new Container_RoundRobinator(player.inventory, (TileEntityRoundRobinator) te); + } else if (ID == GUI17) { + return new Container_EggBox(player.inventory, (TileEntityEggBox) te); + } else if (ID == GUI18) { + return new Container_VolumetricFlaskSetter(player.inventory, (TileEntityVolumetricFlaskSetter) te); + } + } + + if (ID == GUI9) { + return new Container_Grindle(player, player.inventory, new BaseInventoryGrindle(player.getHeldItem())); + } + // Tool, lunch, magic + if (ID == GUI10) { + return new ToolBoxContainer(player, player.inventory, new ToolBoxInventory(player.getHeldItem())); + } + if (ID == GUI11) { + return new LunchBoxContainer(player, player.inventory, new LunchBoxInventory(player.getHeldItem())); + } + if (ID == GUI12) { + return new MagicBagContainer(player, player.inventory, new MagicBagInventory(player.getHeldItem())); + } + + return null; + } + + @Override // GuiModTileEntity + public Object getClientGuiElement(final int ID, final EntityPlayer player, final World world, final int x, + final int y, final int z) { + Logger.WARNING("getClientGuiElement Called by: " + player + ", in world: " + player.dimension + " at x:" + x + + ", y:" + y + ", z:" + z + "."); + final TileEntity te = world.getTileEntity(x, y, z); + if (te != null) { + if (ID == GUI1) { + return new GUI_ProjectTable(player.inventory, (TileEntityProjectTable) te); + } else if (ID == GUI2) { + return new GUI_ModularityTable(player.inventory, (TileEntityModularityTable) te); + } + } + + if (ID == GUI3) { + // We have to cast the new container as our custom class + // and pass in currently held item for the inventory + return new GuiBaseBackpack(new Container_BackpackBase(player, player.inventory, + new BaseInventoryBackpack(player.getHeldItem()))); + } + + if (te != null) { + if (ID == GUI4) { + return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); + } else if (ID == GUI5) { + Logger.INFO("sad"); + return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); + } else if (ID == GUI6) { + return new GUI_FishTrap(player.inventory, (TileEntityFishTrap) te); + } else if (ID == GUI7) { + return new GUI_TradeTable(player.inventory, (TileEntityTradeTable) te, + ((TileEntityBase) te).getOwner()); + } else if (ID == GUI8) { + return new GUI_CircuitProgrammer(player.inventory, (TileEntityCircuitProgrammer) te); + } else if (ID == GUI13) { + return new GUI_DecayablesChest(player.inventory, (TileEntityDecayablesChest) te); + } else if (ID == GUI14) { + return new GUI_SuperJukebox(player.inventory, (TileEntitySuperJukebox) te); + } else if (ID == GUI15) { + return new GUI_PestKiller(player.inventory, (TileEntityPestKiller) te); + } else if (ID == GUI16) { + return new GUI_RoundRobinator(player.inventory, (TileEntityRoundRobinator) te); + } else if (ID == GUI17) { + return new GUI_EggBox(player.inventory, (TileEntityEggBox) te); + } else if (ID == GUI18) { + return new GUI_VolumetricFlaskSetter(new Container_VolumetricFlaskSetter(player.inventory, (TileEntityVolumetricFlaskSetter) te)); + } + } + + if (ID == GUI9) { + return new GuiBaseGrindle( + new Container_Grindle(player, player.inventory, new BaseInventoryGrindle(player.getHeldItem()))); + } + + // Tool, lunch, magic + if (ID == GUI10) { + return new ToolBoxGui( + new ToolBoxContainer(player, player.inventory, new ToolBoxInventory(player.getHeldItem()))); + } + if (ID == GUI11) { + return new LunchBoxGui( + new LunchBoxContainer(player, player.inventory, new LunchBoxInventory(player.getHeldItem()))); + } + if (ID == GUI12) { + return new MagicBagGui( + new MagicBagContainer(player, player.inventory, new MagicBagInventory(player.getHeldItem()))); + } + + return null; + } + + // New Methods + public static void openGui(final EntityPlayer entityplayer, final IGuiManager guiHandler) { + openGui(entityplayer, guiHandler, (short) 0); + } + + public static void openGui(final EntityPlayer entityplayer, final IGuiManager guiHandler, final short data) { + final int guiData = encodeGuiData(guiHandler, data); + final ChunkCoordinates coordinates = guiHandler.getCoordinates(); + entityplayer.openGui(GTplusplus.instance, guiData, entityplayer.worldObj, coordinates.posX, coordinates.posY, + coordinates.posZ); + } + + private static int encodeGuiData(final IGuiManager guiHandler, final short data) { + final MU_GuiId guiId = Gui_ID_Registry.getGuiIdForGuiHandler(guiHandler); + return (data << 16) | guiId.getId(); + } + + private static MU_GuiId decodeGuiID(final int guiData) { + final int guiId = guiData & 0xFF; + return Gui_ID_Registry.getGuiId(guiId); + } + + private static short decodeGuiData(final int guiId) { + return (short) (guiId >> 16); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java b/src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java new file mode 100644 index 0000000000..e20e13a337 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/OldCircuitHandler.java @@ -0,0 +1,66 @@ +package gtPlusPlus.core.handler; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableOldGTcircuits; + +import java.lang.reflect.Field; +import java.util.HashSet; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.EmptyRecipeMap; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.RECIPES_Old_Circuits; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; + +public class OldCircuitHandler { + + public static void preInit(){ + if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + removeCircuitRecipeMap(); //Bye shitty recipes. + } + } + + public static void init(){ + + } + + public static void postInit(){ + if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + RECIPES_Old_Circuits.handleCircuits(); + new RECIPES_Old_Circuits(); + } + } + + public static boolean addCircuitItems() { + if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + return MetaGeneratedGregtechItems.INSTANCE.registerOldCircuits(); + } + return false; + } + + private static boolean removeCircuitRecipeMap(){ + if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + try { + Logger.INFO("[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added."); + ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new EmptyRecipeMap(new HashSet(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); + Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"); + FieldUtils.removeFinalModifier(jaffar, true); + jaffar.set(null, new EmptyRecipeMap(new HashSet(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); + Logger.INFO("[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes."); + } + catch (Exception e) { + Logger.INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map."); + return false; + } + return true; + } + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/PacketHandler.java b/src/main/java/gtPlusPlus/core/handler/PacketHandler.java new file mode 100644 index 0000000000..382b82df29 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/PacketHandler.java @@ -0,0 +1,91 @@ +package gtPlusPlus.core.handler; + +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import cpw.mods.fml.relauncher.Side; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.network.handler.AbstractClientMessageHandler; +import gtPlusPlus.core.network.packet.AbstractPacket; +import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui; +import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui2; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; + +public class PacketHandler { + + private static byte packetId = 0; + + private static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(CORE.MODID); + + public static final void init() { + registerMessage(Packet_VolumetricFlaskGui.class, Packet_VolumetricFlaskGui.class); + registerMessage(Packet_VolumetricFlaskGui2.class, Packet_VolumetricFlaskGui2.class); + } + + /** + * Registers a message and message handler + */ + private static final void registerMessage(Class handlerClass, Class messageClass) { + Side side = AbstractClientMessageHandler.class.isAssignableFrom(handlerClass) ? Side.CLIENT : Side.SERVER; + registerMessage(handlerClass, messageClass, side); + } + + private static final void registerMessage(Class handlerClass, Class messageClass, Side side) { + INSTANCE.registerMessage(handlerClass, messageClass, packetId++, side); + if (AbstractPacket.class.isInstance(messageClass.getClass())) { + AbstractPacket aPacket = ReflectionUtils.createNewInstanceFromConstructor(ReflectionUtils.getConstructor(messageClass, new Class[] {}), new Object[] {}); + if (aPacket != null) { + Logger.INFO("Registered Packet: "+aPacket.getPacketName()); + } + } + } + + /** + * Send this message to the specified player. + * See {@link SimpleNetworkWrapper#sendTo(IMessage, EntityPlayerMP)} + */ + public static final void sendTo(IMessage message, EntityPlayerMP player) { + INSTANCE.sendTo(message, player); + } + + /** + * Send this message to everyone within a certain range of a point. + * See {@link SimpleNetworkWrapper#sendToDimension(IMessage, NetworkRegistry.TargetPoint)} + */ + public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { + INSTANCE.sendToAllAround(message, point); + } + + /** + * Sends a message to everyone within a certain range of the coordinates in the same dimension. + */ + public static final void sendToAllAround(IMessage message, int dimension, double x, double y, double z, double range) { + sendToAllAround(message, new NetworkRegistry.TargetPoint(dimension, x, y, z, range)); + } + + /** + * Sends a message to everyone within a certain range of the player provided. + */ + public static final void sendToAllAround(IMessage message, EntityPlayer player, double range) { + sendToAllAround(message, player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, range); + } + + /** + * Send this message to everyone within the supplied dimension. + * See {@link SimpleNetworkWrapper#sendToDimension(IMessage, int)} + */ + public static final void sendToDimension(IMessage message, int dimensionId) { + INSTANCE.sendToDimension(message, dimensionId); + } + + /** + * Send this message to the server. + * See {@link SimpleNetworkWrapper#sendToServer(IMessage)} + */ + public static final void sendToServer(IMessage message) { + INSTANCE.sendToServer(message); + } +} diff --git a/src/main/java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java b/src/main/java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java new file mode 100644 index 0000000000..360b0440a2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/Recipes/DecayableRecipe.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.handler.Recipes; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; + +public class DecayableRecipe { + + public static final AutoMap mRecipes = new AutoMap(); + + + public final int mTime; + public final ItemStack mInput; + public final ItemStack mOutput; + + public DecayableRecipe(int time, ItemStack input, ItemStack output) { + mTime = time; + mInput = input; + mOutput = output; + mRecipes.put(this); + } + + @Override + public boolean equals(Object o) { + if (o instanceof DecayableRecipe) { + DecayableRecipe i = (DecayableRecipe) o; + if (i.mTime == this.mTime && GT_Utility.areStacksEqual(mInput, i.mInput) && GT_Utility.areStacksEqual(mOutput, i.mOutput)) { + return true; + } + } + return false; + } + + public boolean isValid() { + return (mTime > 0 && ItemUtils.checkForInvalidItems(mInput) && ItemUtils.checkForInvalidItems(mOutput)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java b/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java new file mode 100644 index 0000000000..5bf6374725 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java @@ -0,0 +1,28 @@ +package gtPlusPlus.core.handler.Recipes; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.handler.COMPAT_HANDLER; +import gtPlusPlus.core.recipe.ShapedRecipeObject; + +public class LateRegistrationHandler { + + public static int recipesSuccess = 0; + public static int recipesFailed = 0; + + public static void run(){ + init(); + } + + private final static void init(){ + for(final ShapedRecipeObject item : COMPAT_HANDLER.AddRecipeQueue){ + item.buildRecipe(); + } + try { + Thread.sleep(10); + } catch (final InterruptedException e) { + Logger.INFO(e.toString()); + } + Logger.INFO("Late Recipes Loaded: "+recipesSuccess+" Failed: "+recipesFailed); + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java b/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java new file mode 100644 index 0000000000..4192e71091 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java @@ -0,0 +1,27 @@ +package gtPlusPlus.core.handler.Recipes; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.handler.COMPAT_HANDLER; +import gtPlusPlus.core.recipe.*; + +public class RegistrationHandler { + + public static int recipesSuccess = 0; + public static int recipesFailed = 0; + + public static void run(){ + init(); + } + + private final static void init(){ + RECIPES_Tools.loadRecipes(); + RECIPES_General.loadRecipes(); + RECIPES_Machines.loadRecipes(); + RECIPES_Shapeless.loadRecipes(); + RECIPES_MachineComponents.loadRecipes(); + RECIPE_Batteries.loadRecipes(); + Logger.INFO("Loaded: "+recipesSuccess+" Failed: "+recipesFailed); + COMPAT_HANDLER.areInitItemsLoaded = true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java b/src/main/java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java new file mode 100644 index 0000000000..8499f98525 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/StopAnnoyingFuckingAchievements.java @@ -0,0 +1,49 @@ +package gtPlusPlus.core.handler; + +import java.lang.reflect.Field; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.stats.AchievementList; +import net.minecraftforge.event.entity.player.AchievementEvent; + +public class StopAnnoyingFuckingAchievements { + + /** + * Stops me getting fireworks every fucking time I open my inventory upon first loading a dev client. + * @param event + */ + @SubscribeEvent(priority=EventPriority.HIGHEST) + public void FUCK_OFF(AchievementEvent event) { + if (Utils.isClient()) { + doClientStuff(); + } + if (event.achievement.equals(AchievementList.openInventory)) { + event.setCanceled(true); + } + } + + @SideOnly(Side.CLIENT) + private final void doClientStuff() { + Class aMC = ReflectionUtils.getClass("net.minecraft.client.Minecraft"); + if (aMC != null) { + Field aInstanceMC = ReflectionUtils.getField(aMC, "theMinecraft"); + Object aMcObj = ReflectionUtils.getFieldValue(null, aInstanceMC); + Class aClazz2 = aMcObj.getClass(); + if (aClazz2 != null) { + Field aGameSettings = ReflectionUtils.getField(aClazz2, "gameSettings"); + Object aGameSettingsObj = ReflectionUtils.getFieldValue(aInstanceMC, aGameSettings); + Class aClazz3 = aGameSettingsObj.getClass(); + if (aClazz3 != null) { + Field ainvHint = ReflectionUtils.getField(aClazz3, "showInventoryAchievementHint"); + ReflectionUtils.setField(aGameSettingsObj, ainvHint, false); + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/BlockEventHandler.java new file mode 100644 index 0000000000..03bb99bb2a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/BlockEventHandler.java @@ -0,0 +1,229 @@ +package gtPlusPlus.core.handler.events; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropDrainedShard; +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropFluoriteOre; + +import java.util.ArrayList; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.oredict.OreDictionary; + +public class BlockEventHandler { + public static ArrayList oreLimestone; + public static ArrayList blockLimestone; + public static ItemStack fluoriteOre; + + public static void init() { + //Set Variables for Fluorite Block handling + Logger.INFO("Setting some Variables for the block break event handler."); + BlockEventHandler.oreLimestone = OreDictionary.getOres("oreLimestone"); + BlockEventHandler.blockLimestone = OreDictionary.getOres("limestone"); + BlockEventHandler.fluoriteOre = FLUORIDES.FLUORITE.getOre(1); + } + + @SubscribeEvent + public void onBlockLeftClicked(final PlayerInteractEvent event) { + /* + * if (event.action != PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) return; + * + * ItemStack heldItem = event.entityPlayer.getHeldItem(); Block block = + * event.world.getBlock(event.x, event.y, event.z); + * + * // If the block clicked was Stone, the player was holding an Iron Pickaxe and + * a random integer from 0 (inclusive) to 2 (exclusive) is 0 (50% chance) if + * (block == Blocks.stone && heldItem != null && heldItem.getItem() == + * Items.iron_pickaxe && random.nextInt(2) == 0) { ForgeDirection direction = + * ForgeDirection.getOrientation(event.face); // Convert the numeric face to a + * ForgeDirection int fireX = event.x + direction.offsetX, fireY = event.y + + * direction.offsetY, fireZ = event.z + direction.offsetZ; // Offset the block's + * coordinates according to the direction + * + * if (event.world.isAirBlock(fireX, fireY, fireZ)) { // If the block at the new + * coordinates is Air event.world.setBlock(fireX, fireY, fireZ, Blocks.fire); // + * Replace it with Fire event.useBlock = Event.Result.DENY; // Prevent the Fire + * from being extinguished (also prevents Block#onBlockClicked from being + * called) } } + */ + } + + @SubscribeEvent + public void onEntityDrop(final LivingDropsEvent event) { + /* + * if (event.entityLiving instanceof EntityPig && event.source instanceof + * EntityDamageSource) { // getEntity will return the Entity that caused the + * damage,even for indirect damage sources like arrows/fireballs // (where it + * will return the Entity that shot the projectile rather than the projectile + * itself) Entity sourceEntity = event.source.getEntity(); ItemStack heldItem = + * sourceEntity instanceof EntityLiving ? ((EntityLiving) + * sourceEntity).getHeldItem() : sourceEntity instanceof EntityPlayer ? + * ((EntityPlayer) sourceEntity).getHeldItem() : null; + * + * if (heldItem != null && heldItem.getItem() == Items.iron_pickaxe) { + * System.out.println("EntityPig drops event"); event.drops.clear(); + * event.entityLiving.dropItem(Items.diamond, 64); } } + */ + } + + @SubscribeEvent + public void onBlockBreak(final BlockEvent.BreakEvent event) { + + } + + + // Used to handle Thaumcraft Shards when TC is not installed. + @SubscribeEvent + public void harvestDrops(final BlockEvent.HarvestDropsEvent event) { + try { + + if (event != null && event.harvester != null && event.harvester.worldObj != null) { + if (!event.harvester.worldObj.isRemote) { + + EntityPlayer p = event.harvester; + + if (PlayerUtils.isRealPlayer(p)) { + // Spawns Fluorite from Lime Stone + if (chanceToDropFluoriteOre != 0) { + if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()) { + + ArrayList mBlockTypes = new ArrayList(); + if (!oreLimestone.isEmpty()) { + for (int i = 0; i < oreLimestone.size(); i++) { + if (ItemUtils.getModId(oreLimestone.get(i)) != null + && !ItemUtils.getModId(oreLimestone.get(i)).toLowerCase() + .contains("biomesoplenty")) { + if (!mBlockTypes + .contains(Block.getBlockFromItem(oreLimestone.get(i).getItem()))) { + mBlockTypes.add(Block.getBlockFromItem(oreLimestone.get(i).getItem())); + } + } + } + } + if (!blockLimestone.isEmpty()) { + for (int i = 0; i < blockLimestone.size(); i++) { + if (ItemUtils.getModId(blockLimestone.get(i)) != null + && !ItemUtils.getModId(blockLimestone.get(i)).toLowerCase() + .contains("biomesoplenty")) { + if (!mBlockTypes.contains( + Block.getBlockFromItem(blockLimestone.get(i).getItem()))) { + mBlockTypes + .add(Block.getBlockFromItem(blockLimestone.get(i).getItem())); + } + } + } + } + + Logger.WARNING("Found Limestone in OreDict."); + if (!mBlockTypes.isEmpty()) { + Logger.WARNING("1a | " + event.block.getUnlocalizedName()); + for (final Block temp : mBlockTypes) { + Logger.WARNING("2a - " + temp.getUnlocalizedName()); + if (event.block == temp) { + Logger.WARNING("3a - found " + temp.getUnlocalizedName()); + if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1) { + Logger.WARNING("4a"); + event.drops.clear(); + event.drops.add(fluoriteOre.copy()); + } + } + } + } + } + + if (event.block.getUnlocalizedName().toLowerCase().contains("limestone")) { + Logger.WARNING("1c"); + if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1) { + Logger.WARNING("2c"); + event.drops.clear(); + event.drops.add(fluoriteOre.copy()); + } + } + + if (event.block == Blocks.sandstone) { + if (MathUtils.randInt(1, chanceToDropFluoriteOre * 20) == 1) { + event.drops.clear(); + event.drops.add(fluoriteOre.copy()); + } + } + } + } + + // Do things that can occur for fake players and real players + + // Spawn Dull Shards (Can spawn from Tree Logs, Grass or Stone. Stone going to + // be the most common source.) + if (((event.block == Blocks.stone) || (event.block == Blocks.sandstone) + || (event.block == Blocks.log) || (event.block == Blocks.log2) + || (event.block == Blocks.grass)) && !LoadedMods.Thaumcraft + && (chanceToDropDrainedShard != 0)) { + // small chance for one to spawn per stone mined. 1 per 3 stacks~ + if (MathUtils.randInt(1, chanceToDropDrainedShard) == 1) { + // Let's sort out a lucky charm for the player. + final int FancyChance = MathUtils.randInt(1, 4); + if (MathUtils.randInt(1, 100) < 90) { + event.drops.add(new ItemStack(ModItems.shardDull)); + } + // Make a Fire Shard + else if (FancyChance == 1) { + event.drops.add(new ItemStack(ModItems.shardIgnis)); + } + // Make a Water Shard. + else if (FancyChance == 2) { + event.drops.add(new ItemStack(ModItems.shardAqua)); + } + // Make an Earth Shard. + else if (FancyChance == 3) { + event.drops.add(new ItemStack(ModItems.shardTerra)); + } + // Make an Air Shard. + else if (FancyChance == 4) { + event.drops.add(new ItemStack(ModItems.shardAer)); + } + } else { + Logger.WARNING("invalid chance"); + } + } + + } + } + } catch (Throwable r) { + Logger.INFO("Block Event Handler Failed. Please Report this to Alkalus."); + r.printStackTrace(); + } + } + + @SubscribeEvent + public void logsHarvest(final BlockEvent.HarvestDropsEvent event) { + /* + * if (event.block instanceof BlockLog) { // + * http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/ + * modification-development/2444501-harvestdropevent-changing-drops-of-vanilla- + * blocks + * + * // Utils.sendServerMessage("Logs! Harvester: %s Drops: %s", event.harvester + * != null ? event.harvester.getCommandSenderName() : "", + * event.drops.stream().map(ItemStack.toString()).collect(Collectors. + * joining(", "))); if (event.harvester != null) { ItemStack heldItem = + * event.harvester.getHeldItem(); if (heldItem == null || + * heldItem.getItem().getHarvestLevel(heldItem, "axe") < 1) { + * event.drops.clear(); + * Utils.sendServerMessage("Harvester had wrong tool, clearing drops"); } else { + * Utils.sendServerMessage("Harvester had correct tool, not clearing drops"); } + * } else { event.drops.clear(); + * Utils.sendServerMessage("No harvester, clearing drops"); } } + */ + } +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java b/src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java new file mode 100644 index 0000000000..b70e58d009 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/CustomMovementHandler.java @@ -0,0 +1,163 @@ +package gtPlusPlus.core.handler.events; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.settings.GameSettings; +import net.minecraft.util.MovementInputFromOptions; + +/* + * Replacement for MovementInputFromOptions - Built from the source of ToggleSneak 3.0.3 + */ + +public class CustomMovementHandler { + + public boolean isDisabled; + public boolean canDoubleTap; + + public boolean sprint = false; + public boolean sprintHeldAndReleased = false; + public boolean sprintDoubleTapped = false; + + private long lastPressed; + private long lastSprintPressed; + private boolean handledSneakPress; + private boolean handledSprintPress; + private boolean wasRiding; + + /* + * MovementInputFromOptions.updatePlayerMoveState() + */ + public void update(final Minecraft mc, final MovementInputFromOptions options, final EntityPlayerSP thisPlayer) + { + options.moveStrafe = 0.0F; + options.moveForward = 0.0F; + + final GameSettings settings = mc.gameSettings; + + if(settings.keyBindForward.getIsKeyPressed()) + { + ++options.moveForward; + } + + if(settings.keyBindBack.getIsKeyPressed()) + { + --options.moveForward; + } + + if(settings.keyBindLeft.getIsKeyPressed()) + { + ++options.moveStrafe; + } + + if(settings.keyBindRight.getIsKeyPressed()) + { + --options.moveStrafe; + } + + options.jump = settings.keyBindJump.getIsKeyPressed(); + + // + // Sneak Toggle - Essentially the same as old ToggleSneak + // + + // Check to see if Enabled - Added 6/17/14 to provide option to disable Sneak Toggle + final boolean isSneaking = SneakManager.get(thisPlayer).Sneaking(); + //Utils.LOG_INFO("Can sneak: "+isSneaking); + //Utils.LOG_INFO("Can sprint: "+SneakManager.Sprinting()); + if (isSneaking) + { + // Key Pressed + if (settings.keyBindSneak.getIsKeyPressed() && !this.handledSneakPress) + { + // Descend if we are flying, note if we were riding (so we can unsneak once dismounted) + if(thisPlayer.isRiding() || thisPlayer.capabilities.isFlying) + { + options.sneak = true; + this.wasRiding = thisPlayer.isRiding(); + } + else + { + options.sneak = !options.sneak; + } + + this.lastPressed = System.currentTimeMillis(); + this.handledSneakPress = true; + } + + // Key Released + if (!settings.keyBindSneak.getIsKeyPressed() && this.handledSneakPress) + { + // If we are flying or riding, stop sneaking after descent/dismount. + if(thisPlayer.capabilities.isFlying || this.wasRiding) + { + options.sneak = false; + this.wasRiding = false; + } + // If the key was held down for more than 300ms, stop sneaking upon release. + else if((System.currentTimeMillis() - this.lastPressed) > 300L) + { + options.sneak = false; + } + + this.handledSneakPress = false; + } + } + else + { + options.sneak = settings.keyBindSneak.getIsKeyPressed(); + } + + if(options.sneak || SneakManager.get(thisPlayer).Sneaking()) + { + options.moveStrafe = (float)(options.moveStrafe * 0.3D); + options.moveForward = (float)(options.moveForward * 0.3D); + } + + // + // Sprint Toggle - Updated 6/18/2014 + // + + // Establish conditions where we don't want to start a sprint - sneaking, riding, flying, hungry + final boolean enoughHunger = (thisPlayer.getFoodStats().getFoodLevel() > 6.0F) || thisPlayer.capabilities.isFlying; + final boolean canSprint = !options.sneak && !thisPlayer.isRiding() && !thisPlayer.capabilities.isFlying && enoughHunger; + + this.isDisabled = !SneakManager.get(thisPlayer).Sprinting(); + this.canDoubleTap = SneakManager.get(thisPlayer).optionDoubleTap; + + // Key Pressed + if((canSprint || this.isDisabled) && settings.keyBindSprint.getIsKeyPressed() && !this.handledSprintPress) + { + if(!this.isDisabled) + { + this.sprint = !this.sprint; + this.lastSprintPressed = System.currentTimeMillis(); + this.handledSprintPress = true; + this.sprintHeldAndReleased = false; + } + } + + // Key Released + if((canSprint || this.isDisabled) && !settings.keyBindSprint.getIsKeyPressed() && this.handledSprintPress) + { + // Was key held for longer than 300ms? If so, mark it so we can resume vanilla behavior + if((System.currentTimeMillis() - this.lastSprintPressed) > 300L) + { + this.sprintHeldAndReleased = true; + } + this.handledSprintPress = false; + } + + } + + public void UpdateSprint(final boolean newValue, final boolean doubleTapped, SneakManager aSneak){ + if (!aSneak.Sprinting()){ + this.sprint = false; + this.sprintDoubleTapped = doubleTapped; + } + else{ + this.sprint = newValue; + this.sprintDoubleTapped = doubleTapped; + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java b/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java new file mode 100644 index 0000000000..884f14386d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java @@ -0,0 +1,59 @@ +package gtPlusPlus.core.handler.events; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.boss.EntityDragon; +import net.minecraftforge.event.entity.living.LivingDropsEvent; + +public class EnderDragonDeathHandler { + + private static final String mDragonClassName = "chylex.hee.entity.boss.EntityBossDragon"; + private static final boolean mHEE; + private static final Class mHardcoreDragonClass; + + static { + mHEE = ReflectionUtils.doesClassExist(mDragonClassName); + mHardcoreDragonClass = (mHEE ? ReflectionUtils.getClass(mDragonClassName) : null); + } + + @SubscribeEvent + public void onEntityDrop(LivingDropsEvent event) { + + boolean aDidDrop = false; + int aCountTotal = 0; + + //HEE Dragon + if (mHEE) { + if (mHardcoreDragonClass != null) { + if (mHardcoreDragonClass.isInstance(event.entityLiving)) { + for (int y = 0; y < MathUtils.randInt(100, 250); y++) { + int aAmount = MathUtils.randInt(5, 25); + event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1)); + aDidDrop = true; + aCountTotal =+ aAmount; + } + } + } + } + //Vanilla Dragon or any other dragon that extends it + else { + if (event.entityLiving instanceof EntityDragon) { + for (int y = 0; y < MathUtils.randInt(25, 50); y++) { + int aAmount = MathUtils.randInt(1, 10); + event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1)); + aDidDrop = true; + aCountTotal =+ aAmount; + } + } + } + + if (aDidDrop) { + PlayerUtils.messageAllPlayers(aCountTotal+" Shards of Dragons Blood have crystalized into a metallic form."); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/EntityDeathHandler.java b/src/main/java/gtPlusPlus/core/handler/events/EntityDeathHandler.java new file mode 100644 index 0000000000..391672e028 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/EntityDeathHandler.java @@ -0,0 +1,124 @@ +package gtPlusPlus.core.handler.events; + +import java.util.HashMap; +import java.util.HashSet; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Triplet; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.living.LivingDropsEvent; + +public class EntityDeathHandler { + + + private static final HashMap>> mMobDropMap = new HashMap>>(); + private static final HashSet mInternalClassKeyCache = new HashSet(); + + /** + * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. + * @param aMobClass - The Base Class you want to drop this item. + * @param aStack - The ItemStack, stack size is not respected. + * @param aMaxAmount - The maximum size of the ItemStack which drops. + * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok) + */ + public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) { + Triplet aData = new Triplet(aStack, aMaxAmount, aChance); + AutoMap> aDataMap = mMobDropMap.get(aMobClass); + if (aDataMap == null) { + aDataMap = new AutoMap>(); + } + aDataMap.put(aData); + mMobDropMap.put(aMobClass, aDataMap); + + Logger.INFO("[Loot] Registered "+aStack.getDisplayName()+" (1-"+aMaxAmount+") as a valid drop for "+aMobClass.getCanonicalName()); + + if (!mInternalClassKeyCache.contains(aMobClass)) { + mInternalClassKeyCache.add(aMobClass); + } + + } + + private static ItemStack processItemDropTriplet(Triplet aData) { + ItemStack aLoot = aData.getValue_1(); + int aMaxDrop = aData.getValue_2(); + int aChanceOutOf10000 = aData.getValue_3(); + if (MathUtils.randInt(0, 10000) <= aChanceOutOf10000) { + aLoot = ItemUtils.getSimpleStack(aLoot, MathUtils.randInt(1, aMaxDrop)); + if (ItemUtils.checkForInvalidItems(aLoot)) { + return aLoot; + } + } + return null; + } + + private static boolean processDropsForMob(EntityLivingBase entityLiving) { + AutoMap> aMobData = mMobDropMap.get(entityLiving.getClass()); + boolean aDidDrop = false; + if (aMobData != null) { + if (!aMobData.isEmpty()) { + ItemStack aPossibleDrop; + for (Triplet g : aMobData) { + aPossibleDrop = processItemDropTriplet(g); + if (aPossibleDrop != null) { + if (entityLiving.entityDropItem(aPossibleDrop, MathUtils.randFloat(0, 1)) != null) { + aDidDrop = true; + } + } + } + } + } + return aDidDrop; + } + + + + private static void dropMeatFromPlayer(EntityPlayer aPlayer) { + + // always drop some meat. + int aBigMeatStackSize1 = MathUtils.randInt(4, 8); + aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize1), MathUtils.randInt(0, 1)); + + // additional chances for more meat. + if (MathUtils.randInt(0, 10) < 7) { + int aBigMeatStackSize2 = MathUtils.randInt(4, 8); + aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize2), MathUtils.randInt(0, 1)); + } + if (MathUtils.randInt(0, 10) < 4) { + int aBigMeatStackSize3 = MathUtils.randInt(4, 8); + aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize3), MathUtils.randInt(0, 1)); + } + if (MathUtils.randInt(0, 10) < 2) { + int aBigMeatStackSize4 = MathUtils.randInt(4, 8); + aPlayer.entityDropItem(ItemUtils.simpleMetaStack(ModItems.itemMetaFood, 0, aBigMeatStackSize4), MathUtils.randInt(0, 1)); + } + + } + + @SubscribeEvent + public void onEntityDrop(LivingDropsEvent event) { + boolean aDidDrop = false; + if (event == null || event.entityLiving == null) { + return; + } + if (PlayerUtils.isRealPlayer(event.entityLiving)) { + EntityPlayer aPlayer = (EntityPlayer) event.entityLiving; + dropMeatFromPlayer(aPlayer); + } + else { + for (Class c : mInternalClassKeyCache) { + if (c.isInstance(event.entityLiving)) { + aDidDrop = processDropsForMob(event.entityLiving); + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java new file mode 100644 index 0000000000..fda7760607 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java @@ -0,0 +1,107 @@ +package gtPlusPlus.core.handler.events; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.enums.ItemList; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.GTplusplus.INIT_PHASE; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; + +public class GeneralTooltipEventHandler { + + ItemStack[] mGregtechTurbines = new ItemStack[6]; + String mTurbine; + String mExtra; + + @SubscribeEvent + public void onItemTooltip(ItemTooltipEvent event){ + + + if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED && GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.SERVER_START) { + return; + } + if (event.itemStack == null) { + return; + } + if (CORE.ConfigSwitches.chanceToDropFluoriteOre > 0) { + if (BlockEventHandler.blockLimestone != null && !BlockEventHandler.blockLimestone.isEmpty()) { + for (ItemStack h : BlockEventHandler.blockLimestone) { + if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) { + if (ItemUtils.getModId(h) != null && !ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) { + event.toolTip.add("May contain Fluorite Ore"); + } + } + } + } + if (BlockEventHandler.oreLimestone != null && !BlockEventHandler.oreLimestone.isEmpty()) { + for (ItemStack h : BlockEventHandler.oreLimestone) { + if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) { + if (ItemUtils.getModId(h) != null && !ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) { + event.toolTip.add("May contain Fluorite Ore"); + } + } + } + } + } + + //Material Collector Tooltips + if (ModBlocks.blockPooCollector != null && Block.getBlockFromItem(event.itemStack.getItem()) == ModBlocks.blockPooCollector) { + //Normal + if (event.itemStack.getItemDamage() == 0) { + event.toolTip.add("Used to collect animal waste"); + event.toolTip.add("Collects in a 5x4x5 area starting at Y+1"); + event.toolTip.add("Use Hoppers/Pipes to empty"); + event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"8000L"); + } + //Advanced + else { + event.toolTip.add("Used to collect waste (Works on more than animals)"); + event.toolTip.add("Significantly faster than the simple version"); + event.toolTip.add("Collects in a 5x4x5 area starting at Y+1"); + event.toolTip.add("Use Hoppers/Pipes to empty"); + event.toolTip.add(EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.AQUA+"128000L"); + } + } + + + + if (CORE.ConfigSwitches.enableAnimatedTurbines) { + boolean shift = false; + try { + + if (KeyboardUtils.isShiftKeyDown()) { + shift = true; + mTurbine = "Animated Turbines can be disabled in the GT++ config"; + } + else { + mTurbine = EnumChatFormatting.ITALIC+""+EnumChatFormatting.RESET; + } + for (int t=0;t<6;t++) { + if (mGregtechTurbines[t] != null) { + if (ItemStack.areItemStacksEqual(event.itemStack, mGregtechTurbines[t])){ + event.toolTip.add(mTurbine); + if (shift) { + if (mExtra == null) { + mExtra = CORE.GT_Tooltip; + } + event.toolTip.add(mExtra); + } + } + } + else { + mGregtechTurbines[t] = (t == 0 ? ItemList.Generator_Steam_Turbine_LV.get(1) : (t == 1 ? ItemList.Generator_Steam_Turbine_MV.get(1) : (t == 2 ? ItemList.Generator_Steam_Turbine_HV.get(1) : (t == 3 ? ItemList.Generator_Gas_Turbine_LV.get(1) : (t == 4 ? ItemList.Generator_Gas_Turbine_MV.get(1) : (ItemList.Generator_Gas_Turbine_HV.get(1))))))); + } + } + } + catch (Throwable t) {} + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java new file mode 100644 index 0000000000..1a8d87882e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/LoginEventHandler.java @@ -0,0 +1,128 @@ +package gtPlusPlus.core.handler.events; + +import java.util.Timer; +import java.util.TimerTask; +import java.util.UUID; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.proxy.ClientProxy; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.player.PlayerCache; + +public class LoginEventHandler { + + public String localPlayersName; + public UUID localPlayersUUID; + private EntityPlayer localPlayerRef; + + @SubscribeEvent + public void onPlayerLogin(final PlayerEvent.PlayerLoggedInEvent event) { + + this.localPlayerRef = event.player; + this.localPlayersName = event.player.getDisplayName(); + this.localPlayersUUID = event.player.getUniqueID(); + + //Set this for easier use elsewhere. + if (event.player.getEntityWorld().isRemote){ + ClientProxy.playerName = this.localPlayersName; + } + + try { + //new SegmentAnalytics(event.player); + } + catch (Throwable t){ + //SegmentAnalytics.LOG("Failed to create Analytics submission during log in process."); + } + + try { + + + if (this.localPlayerRef instanceof EntityPlayerMP){ + + //Populates player cache + if (!this.localPlayerRef.worldObj.isRemote){ + PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString()); + } + + + /*if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009") || localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){ + Utils.LOG_INFO("Spawning a new Santa Thread."); + Thread t = new Thread() { + UUID threadHandlerIDthing = localPlayersUUID; + @Override + public void run() { + while(true && Minecraft.getMinecraft().getIntegratedServer() != null) { + try { + if(localPlayerRef == null){ + localPlayerRef = Utils.getPlayerOnServerFromUUID(threadHandlerIDthing); + } + + + //ImQ009 is a legend. + if (localPlayerRef.getCommandSenderName().toLowerCase().equalsIgnoreCase("ImQ009")){ + Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread."); + localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems.itemIngotRaisinBread, MathUtils.randInt(1, 5))); + } + + + if (localPlayerRef.getCommandSenderName().toLowerCase().contains("player")){ + Utils.messagePlayer(localPlayerRef, "Enjoy some complimentary Raisin Bread."); + localPlayerRef.inventory.addItemStackToInventory(UtilsItems.getSimpleStack(ModItems.itemIngotRaisinBread, MathUtils.randInt(1, 5))); + } + Thread.sleep(1000*60*MathUtils.randInt(15, 90)); + } catch (InterruptedException ie) { + Utils.LOG_INFO("Santa Mode Disabled."); + } + } + + Utils.LOG_INFO("Thread Stopped. Handler Closed."); + + } + }; + //t.start(); + + + }*/ + + + } + } catch (final Throwable errr){ + Logger.INFO("Login Handler encountered an error."); + + } + } + + //Handles notifying the player about a version update. + public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) { + Timer timer; + timer = new Timer(); + timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000); + return timer; + } + + //Timer Task for notifying the player. + class NotifyPlayer extends TimerTask { + final EntityPlayer toMessage; + public NotifyPlayer(EntityPlayer localPlayer) { + toMessage = localPlayer; + } + + @Override + public void run() { + if (toMessage != null){ + if (toMessage instanceof EntityPlayerMP){ + PlayerUtils.messagePlayer(toMessage, "You're not using the latest recommended version of GT++, consider updating."); + } + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java b/src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java new file mode 100644 index 0000000000..31600a36c3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/MissingMappingsEvent.java @@ -0,0 +1,56 @@ +package gtPlusPlus.core.handler.events; + +import static gtPlusPlus.core.item.base.dusts.BaseItemDustEx.mCachedPileLinkages; + +import org.apache.commons.lang3.StringUtils; + +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLMissingMappingsEvent; +import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; + +public class MissingMappingsEvent { + + @EventHandler + public void onMissingMapping(FMLMissingMappingsEvent event){ + for(MissingMapping mapping : event.get()) { + boolean bool1 = mapping.name.contains(CORE.MODID); + //Missing Blocks + if(mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.BLOCK && bool1) { + + //Example + //if(mapping.name.equals("PneumaticCraft:etchingAcid")) { + // mapping.remap(Fluids.etchingAcid.getBlock()); + //} + + + } + + //Missing Items + if(mapping.type == cpw.mods.fml.common.registry.GameRegistry.Type.ITEM && bool1) { + + //Example + //if(mapping.name.equals("PneumaticCraft:etchingAcidBucket")) { + // mapping.remap(Fluids.getBucket(Fluids.etchingAcid)); + //} + + if(mapping.name.contains("miscutils:itemDustTiny")) { + ItemStack stack = null; + String missingItemString = StringUtils.remove(mapping.name, "miscutils:itemDustTiny"); + missingItemString = StringUtils.prependIfMissing(missingItemString, "item.itemDust"); + if (mCachedPileLinkages.containsKey(missingItemString)) { + //stack = ItemUtils.getSimpleStack(Item.itemRegistry.) + Logger.REFLECTION("Mapping Event Found Missing Item in the Pile Linkage Cache."); + } + + //mapping.remap(stack.getItem()); + } + + } + } + } +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java new file mode 100644 index 0000000000..956d045b3e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java @@ -0,0 +1,80 @@ +package gtPlusPlus.core.handler.events; + +import java.util.List; +import java.util.UUID; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkPosition; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.BlockEvent.BreakEvent; +import net.minecraftforge.event.world.ExplosionEvent; + +public class PickaxeBlockBreakEventHandler { + @SubscribeEvent + public void onBreakBlock(final BreakEvent event) { + try{ + final TileEntity entity = event.world.getTileEntity(event.x, event.y, event.z); + if (entity != null){ + if (entity instanceof BaseMetaTileEntity) { + final EntityPlayer playerInternal = event.getPlayer(); + final IMetaTileEntity X = ((BaseMetaTileEntity)entity).getMetaTileEntity(); + if(X instanceof GregtechMetaSafeBlockBase) { + final UUID ownerUUID = ((GregtechMetaSafeBlockBase)X).ownerUUID; + final UUID accessorUUID = playerInternal.getUniqueID(); + if (((GregtechMetaSafeBlockBase)X).bUnbreakable){ + if (accessorUUID == ownerUUID){ + PlayerUtils.messagePlayer(playerInternal, "Since you own this block, it has been destroyed."); + } + else { + PlayerUtils.messagePlayer(playerInternal, "Since you do not own this block, it has not been destroyed."); + event.setCanceled(true); + } + } + } + } + + } + } + catch (final NullPointerException e) { + //System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: "+e.getCause()); + } + } + + @SubscribeEvent + public void onExplode(ExplosionEvent.Detonate event) { + try { + @SuppressWarnings("unchecked") + List pos = event.explosion.affectedBlockPositions; + for(int i = 0;i mPlayerCache = new ConcurrentHashMap(); + + private static void addPlayer(EntityPlayer aPlayer) { + String aKey = getKey(aPlayer); + if (!mPlayerCache.containsKey(aKey)) { + mPlayerCache.put(aKey, new SneakManager(aPlayer)); + } + } + + public static SneakManager get(EntityPlayer aPlayer) { + + String aKey = getKey(aPlayer); + if (!mPlayerCache.containsKey(aKey)) { + addPlayer(aPlayer); + } + return mPlayerCache.get(aKey); + } + + private static String getKey(EntityPlayer aPlayer) { + return ""+aPlayer.getGameProfile().getId().toString(); + } + + + public SneakManager instance; + public EntityPlayer owner; + public boolean canSprint = true; + public boolean isSneaking = true; + public boolean optionDoubleTap = true; + public boolean wasSprintDisabled = false; + public boolean mIsWearingRing = false; + + private State Sprinting = State.ON; + private State Crouching = State.OFF; + + public SneakManager(EntityPlayer aPlayer) { + owner = aPlayer; + } + + public boolean Sneaking(){ + return Crouching.getState(); + } + + public boolean Sprinting(){ + return Sprinting.getState(); + } + + public State getSneakingState(){ + return Crouching; + } + + public State getSprintingDisabledState(){ + return Sprinting; + } + + public void toggleSneaking(){ + toggleState(Crouching); + } + + public void toggleSprinting(){ + toggleState(Sprinting); + } + + private State toggleState(final State state){ + Logger.INFO("State Toggle"); + if (state == State.ON) { + return State.OFF; + } + return State.ON; + } + + private State setCrouchingStateON(){ + return Crouching = State.ON; + } + + private State setCrouchingStateOFF(){ + return Crouching = State.OFF; + } + + private State setSprintingStateON(){ + return Sprinting = State.ON; + } + + private State setSprintingStateOFF(){ + return Sprinting = State.OFF; + } + + public void putRingOn() { + mIsWearingRing = true; + setSprintingStateOFF(); + setCrouchingStateON(); + } + + public void takeRingOff() { + mIsWearingRing = false; + setSprintingStateON(); + setCrouchingStateOFF(); + } + + public boolean isWearingRing() { + return mIsWearingRing; + } + + public static enum State { + ON(true), + OFF(false); + + private final boolean STATE; + private State (final boolean State) + { + this.STATE = State; + } + + public boolean getState() { + return this.STATE; + } + + } + +} + diff --git a/src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java b/src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java new file mode 100644 index 0000000000..b653c6ffb6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java @@ -0,0 +1,138 @@ +package gtPlusPlus.core.handler.events; + +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.metatileentity.BaseTileEntity; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock; + +public class UnbreakableBlockManager{ + + private static boolean hasRun = false; + + public final BaseMetaTileEntity getmTileEntity() { + return mTileEntity; + } + + + public final void setmTileEntity(final BaseMetaTileEntity mTileEntity/*, EntityPlayer aPlayer*/) { + UnbreakableBlockManager.mTileEntity = mTileEntity; + if (!hasRun){ + hasRun = true; + this.makeIndestructible(/*aPlayer*/); + } + else { + Logger.WARNING("Why do you run twice?"); + } + } + + + //BaseMetaTileEntity + //GregtechMetaSafeBlock + private static BaseMetaTileEntity mTileEntity = null; + + + private void makeIndestructible(/*EntityPlayer aPlayer*/){ + + + Logger.WARNING("Initializing the code to set this TE to -1 hardness and make it indestructible."); + final int X = mTileEntity.xCoord; //(GregtechMetaSafeBlock) this.mTileEntity.getXCoord(); + final int Y = mTileEntity.yCoord; + final int Z = mTileEntity.zCoord; + Logger.WARNING("Grabbing TileEntity @ [x,y,z] |"+X+"|"+Y+"|"+Z+"|"); + + try{ + final GregtechMetaSafeBlock MetaSafeBlock = ((GregtechMetaSafeBlock) UnbreakableBlockManager.mTileEntity.getMetaTileEntity()); + final TileEntity BaseMetaTileEntity = mTileEntity.getTileEntity(X, Y, Z); + //MetaSafeBlockBase. + final World TE_WORLD = MetaSafeBlock.getBaseMetaTileEntity().getWorld(); + Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + final TileEntity entity = BaseMetaTileEntity; + innerInvincible(MetaSafeBlock, entity, TE_WORLD, /*aPlayer,*/ X, Y, Z); + } + catch (final NullPointerException e) { + System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: "); + e.printStackTrace(); + } + } + + + private static void innerInvincible(final GregtechMetaSafeBlock MetaSafeBlock, final TileEntity entity, final World TE_WORLD, /*EntityPlayer aPlayer,*/ final int X, final int Y, final int Z){ + if (entity != null){ + Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + Logger.WARNING("Grabbed TE: "+entity.toString()); + + + + + if ((entity instanceof BaseTileEntity) && !(entity instanceof BaseMetaPipeEntity)){ + final IMetaTileEntity I = ((BaseMetaTileEntity)entity).getMetaTileEntity(); + Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + Logger.WARNING("I Details: "+I.getMetaName()+" | "+I.getTileEntityBaseType()+" | "+I.toString()); + + + + + + if (I instanceof GregtechMetaSafeBlock){ + Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + + final Block ThisBlock = I.getBaseMetaTileEntity().getBlock(X, Y, Z); + Logger.WARNING("Block Details: "+ThisBlock.toString()); + + + if (((GregtechMetaSafeBlock)I).bUnbreakable){ + ThisBlock.setHardness(Integer.MAX_VALUE); + //ThisBlock.setResistance(18000000.0F); + ThisBlock.setResistance(-1); + ThisBlock.setBlockUnbreakable(); + Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=true"); + MetaSafeBlock.bUnbreakable = true; + //entity.markDirty(); + Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + Logger.ERROR("New Indestructible Flag enabled."); + //GT_Utility.sendChatToPlayer(aPlayer, "Block is now unbreakable."); + } + + + + + else { + ThisBlock.setHardness(1); + ThisBlock.setResistance(1.0F); + Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=false"); + MetaSafeBlock.bUnbreakable = false; + //entity.markDirty(); + Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + Logger.ERROR("New Indestructible Flag disabled."); + //GT_Utility.sendChatToPlayer(aPlayer, "Block is now breakable."); + } + + //entity.markDirty(); + + Logger.WARNING("Block Hardness: "+ThisBlock.getBlockHardness(TE_WORLD, X, Y, Z)); + Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + hasRun = false; + + } + else { + Logger.WARNING("I is not an instanceof MetaSafeBlockBase"); + Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + } + } else { + Logger.WARNING("TE is not an instanceof BaseTileEntity or may be a pipe."); + Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + } + }else { + Logger.WARNING("Did not grab a TE instance to make a block instance from."); + Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java new file mode 100644 index 0000000000..68df68aa2a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java @@ -0,0 +1,55 @@ +package gtPlusPlus.core.handler.events; + +import java.lang.reflect.Field; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import gtPlusPlus.api.objects.Logger; +import net.minecraftforge.event.entity.living.ZombieEvent; + +public class ZombieBackupSpawnEventHandler { + + /** + * + * Do we really need this pathetic mechanic to exist when it doesn't work properly at all? + * Or , well, maybe you enjoy Zombies spawning IN YOUR FUCKING FACE?! + * + */ + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onZombieReinforcement(final ZombieEvent.SummonAidEvent event) { + try { + try { + Field mChance = FieldUtils.getDeclaredField(this.getClass(), "summonChance", true); + FieldUtils.removeFinalModifier(mChance, true); + mChance.set(this, 0); + } + catch(Throwable t){} + if (event.attacker != null){ + //SegmentHelper.getInstance().trackUser(event.attacker.getUniqueID().toString(), "Zombie Backup"); + } + Logger.WARNING("[Zombie] ZombieEvent.SummonAidEvent."); + event.setResult(Result.DENY); + } + catch(Throwable t){} + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onZombieReinforcement(final ZombieEvent event) { + try { + Logger.WARNING("[Zombie] ZombieEvent."); + if (event.entity != null){ + Logger.WARNING("Event Entity: "+event.entity.getCommandSenderName()); + } + event.setResult(Result.DENY); + } + catch(Throwable t){ + + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java b/src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java new file mode 100644 index 0000000000..491d9a2aba --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java @@ -0,0 +1,122 @@ +package gtPlusPlus.core.handler.render; + +import java.util.Collection; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.entity.RenderPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; +import net.minecraftforge.client.event.RenderPlayerEvent; + +public class CapeHandler extends RenderPlayer { + private final ResourceLocation[] mCapes = { + new ResourceLocation(CORE.MODID+":textures/TesterCape.png"), + new ResourceLocation(CORE.MODID+":textures/Draknyte1.png"), + new ResourceLocation("gregtech:textures/GregoriusCape.png") }; + private final Collection mCapeList; + + public CapeHandler(final Collection aCapeList) { + this.mCapeList = aCapeList; + this.setRenderManager(RenderManager.instance); + } + + public void receiveRenderSpecialsEvent(final RenderPlayerEvent.Specials.Pre aEvent) { + final AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer; + if (GT_Utility.getFullInvisibility(aPlayer)) { + aEvent.setCanceled(true); + return; + } + final float aPartialTicks = aEvent.partialRenderTick; + if (aPlayer.isInvisible()) { + return; + } + if (GT_Utility.getPotion(aPlayer, + Integer.valueOf(Potion.invisibility.id).intValue())) { + return; + } + try { + ResourceLocation tResource = null; + if (aPlayer.getDisplayName().equalsIgnoreCase("XW3B")) { + tResource = this.mCapes[0]; + } + if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) { + tResource = this.mCapes[0]; + } + if (aPlayer.getDisplayName().equalsIgnoreCase("Draknyte1")) { + tResource = this.mCapes[1]; + } + if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) { + tResource = this.mCapes[2]; + } + if ((tResource != null) && (!(aPlayer.getHideCape()))) { + this.bindTexture(tResource); + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 0.0F, 0.125F); + final double d0 = (aPlayer.field_71091_bM + + ((aPlayer.field_71094_bP - aPlayer.field_71091_bM) + * aPartialTicks)) + - (aPlayer.prevPosX + ((aPlayer.posX - aPlayer.prevPosX) + * aPartialTicks)); + final double d1 = (aPlayer.field_71096_bN + + ((aPlayer.field_71095_bQ - aPlayer.field_71096_bN) + * aPartialTicks)) + - (aPlayer.prevPosY + ((aPlayer.posY - aPlayer.prevPosY) + * aPartialTicks)); + final double d2 = (aPlayer.field_71097_bO + + ((aPlayer.field_71085_bR - aPlayer.field_71097_bO) + * aPartialTicks)) + - (aPlayer.prevPosZ + ((aPlayer.posZ - aPlayer.prevPosZ) + * aPartialTicks)); + final float f6 = aPlayer.prevRenderYawOffset + + ((aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) + * aPartialTicks); + final double d3 = MathHelper.sin((f6 * CORE.PI) / 180.0F); + final double d4 = -MathHelper.cos((f6 * CORE.PI) / 180.0F); + float f7 = (float) d1 * 10.0F; + float f8 = (float) ((d0 * d3) + (d2 * d4)) * 100.0F; + final float f9 = (float) ((d0 * d4) - (d2 * d3)) * 100.0F; + if (f7 < -6.0F) { + f7 = -6.0F; + } + if (f7 > 32.0F) { + f7 = 32.0F; + } + if (f8 < 0.0F) { + f8 = 0.0F; + } + final float f10 = aPlayer.prevCameraYaw + + ((aPlayer.cameraYaw - aPlayer.prevCameraYaw) + * aPartialTicks); + f7 += MathHelper + .sin((aPlayer.prevDistanceWalkedModified + ((aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) + * aPartialTicks)) * 6.0F) + * 32.0F * f10; + if (aPlayer.isSneaking()) { + f7 += 25.0F; + } + GL11.glRotatef(6.0F + (f8 / 2.0F) + f7, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + ((ModelBiped) this.mainModel).renderCloak(0.0625F); + GL11.glPopMatrix(); + } + } catch (final Throwable e) { + if (GT_Values.D1) { + e.printStackTrace(GT_Log.err); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/render/FirepitModel.java b/src/main/java/gtPlusPlus/core/handler/render/FirepitModel.java new file mode 100644 index 0000000000..029d961bff --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/render/FirepitModel.java @@ -0,0 +1,121 @@ +// Date: 20/12/2016 5:51:14 PM +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package gtPlusPlus.core.handler.render; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +import gtPlusPlus.core.lib.CORE; + +public class FirepitModel extends ModelBase +{ + //fields + ModelRenderer Side_A; + ModelRenderer Side_B; + ModelRenderer Side_C; + ModelRenderer Side_D; + ModelRenderer Log1; + ModelRenderer Log2; + ModelRenderer Log3; + ModelRenderer Log4; + + public FirepitModel() + { + this.textureWidth = 16; + this.textureHeight = 16; + + this.Side_A = new ModelRenderer(this, 0, 0); + this.Side_A.addBox(0F, 0F, 0F, 12, 6, 1); + this.Side_A.setRotationPoint(-6F, 18F, -6F); + this.Side_A.setTextureSize(16, 16); + this.Side_A.mirror = true; + setRotation(this.Side_A, -0.3148822F, 0F, 0F); + //Side_A.mirror = false; + + this.Side_B = new ModelRenderer(this, 0, 0); + this.Side_B.addBox(0F, 0F, 0F, 12, 6, 1); + this.Side_B.setRotationPoint(-6F, 18F, 6F); + this.Side_B.setTextureSize(16, 16); + this.Side_B.mirror = true; + setRotation(this.Side_B, -0.3148822F, (CORE.PI/2), 0F); + + this.Side_C = new ModelRenderer(this, 0, 0); + this.Side_C.addBox(0F, 0F, 0F, 12, 6, 1); + this.Side_C.setRotationPoint(6F, 18F, 6F); + this.Side_C.setTextureSize(16, 16); + this.Side_C.mirror = true; + setRotation(this.Side_C, -0.3148822F, CORE.PI, 0F); + //Side_C.mirror = false; + + this.Side_D = new ModelRenderer(this, 0, 0); + this.Side_D.addBox(0F, 0F, 0F, 12, 6, 1); + this.Side_D.setRotationPoint(6F, 18F, -6F); + this.Side_D.setTextureSize(16, 16); + this.Side_D.mirror = true; + setRotation(this.Side_D, -0.3148822F, 4.712389F, 0F); + + this.Log1 = new ModelRenderer(this, 0, 10); + this.Log1.addBox(0F, 0F, 0F, 14, 2, 2); + this.Log1.setRotationPoint(4F, 10F, -4F); + this.Log1.setTextureSize(16, 16); + this.Log1.mirror = true; + setRotation(this.Log1, 0F, 0F, (CORE.PI/2)); + + this.Log2 = new ModelRenderer(this, -2, 10); + this.Log2.addBox(0F, 0F, 0F, 14, 2, 2); + this.Log2.setRotationPoint(-4F, 10F, -4F); + this.Log2.setTextureSize(16, 16); + this.Log2.mirror = true; + setRotation(this.Log2, (CORE.PI/2), 0F, (CORE.PI/2)); + //Log2.mirror = false; + + this.Log3 = new ModelRenderer(this, 0, 10); + this.Log3.addBox(0F, 0F, 0F, 14, 2, 2); + this.Log3.setRotationPoint(-4F, 10F, 4F); + this.Log3.setTextureSize(16, 16); + this.Log3.mirror = true; + setRotation(this.Log3, CORE.PI, 0F, (CORE.PI/2)); + + this.Log4 = new ModelRenderer(this, -2, 10); + this.Log4.addBox(0F, 0F, 0F, 14, 2, 2); + this.Log4.setRotationPoint(4F, 10F, 4F); + this.Log4.setTextureSize(16, 16); + this.Log4.mirror = true; + setRotation(this.Log4, 4.712389F, 0F, (CORE.PI/2)); + //Log4.mirror = false; + } + + @Override + public void render(final Entity entity, final float f, final float f1, final float f2, final float f3, final float f4, final float f5) + { + super.render(entity, f, f1, f2, f3, f4, f5); + this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + this.Side_A.render(f5); + this.Side_B.render(f5); + this.Side_C.render(f5); + this.Side_D.render(f5); + this.Log1.render(f5); + this.Log2.render(f5); + this.Log3.render(f5); + this.Log4.render(f5); + } + + private static void setRotation(final ModelRenderer model, final float x, final float y, final float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + @Override + public void setRotationAngles(final float f, final float f1, final float f2, final float f3, final float f4, final float f5, final Entity entity) + { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/src/main/java/gtPlusPlus/core/handler/render/FirepitRender.java b/src/main/java/gtPlusPlus/core/handler/render/FirepitRender.java new file mode 100644 index 0000000000..7b8d23e25b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/render/FirepitRender.java @@ -0,0 +1,55 @@ +package gtPlusPlus.core.handler.render; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +public class FirepitRender extends TileEntitySpecialRenderer{ + ResourceLocation texture = new ResourceLocation("miscutils" + ":"+ "textures/blocks/FirePit/mossyFirepit.png"); + + private final FirepitModel model; + + public FirepitRender(){ + this.model = new FirepitModel(); + } + + private void adjustRotatePivotViaMeta(final World world, final int x, final int y, final int z) { + final int meta = world.getBlockMetadata(x, y, z); + GL11.glPushMatrix(); + GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F); + GL11.glPopMatrix(); + } + + @Override + public void renderTileEntityAt(final TileEntity entity, final double x, final double y, final double z, final float i) { + GL11.glPushMatrix(); + GL11.glTranslatef((float)x + 0.1F, (float)y + 1.0F, (float)z + 0.5F); + GL11.glRotatef(180, 0F, 0F, 1F); + + this.bindTexture(this.texture); + GL11.glPushMatrix(); + this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + GL11.glTranslatef(1.0f, 1.0f, 1.0f); + GL11.glPopMatrix(); + GL11.glPopMatrix(); + } + + //Set the lighting stuff, so it changes it's brightness properly. + private void adjustLightFixture(final World world, final int i, final int j, final int k, final Block block) { + final Tessellator tess = Tessellator.instance; + //float brightness = block.getBlockBrightness(world, i, j, k); + //As of MC 1.7+ block.getBlockBrightness() has become block.getLightValue(): + final float brightness = block.getLightValue(world, i, j, k); + final int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); + final int modulousModifier = skyLight % 65536; + final int divModifier = skyLight / 65536; + tess.setColorOpaque_F(brightness, brightness, brightness); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, modulousModifier, divModifier); + } +} diff --git a/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java new file mode 100644 index 0000000000..d6a73512e2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java @@ -0,0 +1,208 @@ +package gtPlusPlus.core.handler.workbench; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapedRecipes; +import net.minecraft.item.crafting.ShapelessRecipes; +import net.minecraft.world.World; + +public class Workbench_CraftingHandler { + + private static final Workbench_CraftingHandler instance = new Workbench_CraftingHandler(); + private final List recipes = new ArrayList(); + + public static final Workbench_CraftingHandler getInstance() { + return instance; + } + public Workbench_CraftingHandler() { + + //just a example recipe so you know how to add them + this.addRecipe(new ItemStack(Blocks.iron_block), new Object[] + { + "###", + "###", + "###", + Character.valueOf('#'), Items.iron_ingot + }); + + //another example Recipe, but shapeless + this.addShapelessRecipe(new ItemStack(Items.cake),new Object[]{Items.stick}); + + + } + + void addRecipe(final ItemStack par1ItemStack, final Object par2ArrayOfObj[]) + { + String s = ""; + int i = 0; + int j = 0; + int k = 0; + + if (par2ArrayOfObj[i] instanceof String[]) + { + final String as[] = (String[])par2ArrayOfObj[i++]; + + for (int l = 0; l < as.length; l++) + { + final String s2 = as[l]; + k++; + j = s2.length(); + s = (new StringBuilder()).append(s).append(s2).toString(); + } + } + else + { + while (par2ArrayOfObj[i] instanceof String) + { + final String s1 = (String)par2ArrayOfObj[i++]; + k++; + j = s1.length(); + s = (new StringBuilder()).append(s).append(s1).toString(); + } + } + + final HashMap hashmap = new HashMap(); + + for (; i < par2ArrayOfObj.length; i += 2) + { + final Character character = (Character)par2ArrayOfObj[i]; + ItemStack itemstack = null; + + if (par2ArrayOfObj[i + 1] instanceof Item) + { + itemstack = new ItemStack((Item)par2ArrayOfObj[i + 1]); + } + else if (par2ArrayOfObj[i + 1] instanceof Block) + { + itemstack = new ItemStack((Block)par2ArrayOfObj[i + 1], 1, -1); + } + else if (par2ArrayOfObj[i + 1] instanceof ItemStack) + { + itemstack = (ItemStack)par2ArrayOfObj[i + 1]; + } + + hashmap.put(character, itemstack); + } + + final ItemStack aitemstack[] = new ItemStack[j * k]; + + for (int i1 = 0; i1 < (j * k); i1++) + { + final char c = s.charAt(i1); + + if (hashmap.containsKey(Character.valueOf(c))) + { + aitemstack[i1] = hashmap.get(Character.valueOf(c)).copy(); + } + else + { + aitemstack[i1] = null; + } + } + + this.recipes.add(new ShapedRecipes(j, k, aitemstack, par1ItemStack)); + } + + public void addShapelessRecipe(final ItemStack par1ItemStack, final Object par2ArrayOfObj[]) + { + final ArrayList arraylist = new ArrayList(); + final Object aobj[] = par2ArrayOfObj; + final int i = aobj.length; + + for (int j = 0; j < i; j++) + { + final Object obj = aobj[j]; + + if (obj instanceof ItemStack) + { + arraylist.add(((ItemStack)obj).copy()); + continue; + } + + if (obj instanceof Item) + { + arraylist.add(new ItemStack((Item)obj)); + continue; + } + + if (obj instanceof Block) + { + arraylist.add(new ItemStack((Block)obj)); + } + else + { + throw new RuntimeException("Invalid shapeless recipe!"); + } + } + + this.recipes.add(new ShapelessRecipes(par1ItemStack, arraylist)); + } + + public ItemStack findMatchingRecipe(final InventoryCrafting par1InventoryCrafting, final World par2World) + { + int i = 0; + for (int j = 0; j < par1InventoryCrafting.getSizeInventory(); j++) + { + final ItemStack itemstack2 = par1InventoryCrafting.getStackInSlot(j); + + if (itemstack2 == null) + { + continue; + } + + if (i == 0) + { + } + + if (i == 1) + { + } + + i++; + } + + //TODO - Update from itemIDs + /*if (i == 2 && itemstack.itemID == itemstack1.itemID && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && Item.itemsList[itemstack.itemID].isDamageable()) + { + Item item = Item.itemsList[itemstack.itemID]; + int l = item.getMaxDamage() - itemstack.getItemDamageForDisplay(); + int i1 = item.getMaxDamage() - itemstack1.getItemDamageForDisplay(); + int j1 = l + i1 + (item.getMaxDamage() * 10) / 100; + int k1 = item.getMaxDamage() - j1; + + if (k1 < 0) + { + k1 = 0; + } + + return new ItemStack(itemstack.itemID, 1, k1); + }*/ + + for (int k = 0; k < this.recipes.size(); k++) + { + final IRecipe irecipe = this.recipes.get(k); + + if (irecipe.matches(par1InventoryCrafting, par2World)) + { + return irecipe.getCraftingResult(par1InventoryCrafting); + } + } + + return null; + } + + + public List getRecipeList() + { + return this.recipes; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java new file mode 100644 index 0000000000..9d5f7d03ed --- /dev/null +++ b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java @@ -0,0 +1,44 @@ +package gtPlusPlus.core.handler.workbench; + +import java.util.Comparator; + +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.ShapedRecipes; +import net.minecraft.item.crafting.ShapelessRecipes; + +public class Workbench_RecipeSorter implements Comparator +{ + final Workbench_CraftingHandler CraftingManagerCrafter; + + Workbench_RecipeSorter(final Workbench_CraftingHandler par1CraftingManager) + { + this.CraftingManagerCrafter = par1CraftingManager; + } + + public int compareRecipes(final IRecipe par1IRecipe, final IRecipe par2IRecipe) + { + if ((par1IRecipe instanceof ShapelessRecipes) && (par2IRecipe instanceof ShapedRecipes)) + { + return 1; + } + + if ((par2IRecipe instanceof ShapelessRecipes) && (par1IRecipe instanceof ShapedRecipes)) + { + return -1; + } + + if (par2IRecipe.getRecipeSize() < par1IRecipe.getRecipeSize()) + { + return -1; + } + + return par2IRecipe.getRecipeSize() <= par1IRecipe.getRecipeSize() ? 0 : 1; + } + + @Override + public int compare(final Object par1Obj, final Object par2Obj) + { + return this.compareRecipes((IRecipe)par1Obj, (IRecipe)par2Obj); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/interfaces/IGuiManager.java b/src/main/java/gtPlusPlus/core/interfaces/IGuiManager.java new file mode 100644 index 0000000000..1d0ad9ed87 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/interfaces/IGuiManager.java @@ -0,0 +1,16 @@ +package gtPlusPlus.core.interfaces; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; + +public abstract interface IGuiManager extends IGuiManagerMiscUtils{ + + public abstract ChunkCoordinates getCoordinates(); + + public abstract World getWorld(); + + public abstract Object getGui(EntityPlayer paramEntityPlayer, int paramInt); + + public abstract Object getContainer(EntityPlayer paramEntityPlayer, int paramInt); +} diff --git a/src/main/java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java b/src/main/java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java new file mode 100644 index 0000000000..cf46c67a54 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/interfaces/IGuiManagerMiscUtils.java @@ -0,0 +1,3 @@ +package gtPlusPlus.core.interfaces; + +public abstract interface IGuiManagerMiscUtils {} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/interfaces/IItemBlueprint.java b/src/main/java/gtPlusPlus/core/interfaces/IItemBlueprint.java new file mode 100644 index 0000000000..473aa827b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/interfaces/IItemBlueprint.java @@ -0,0 +1,48 @@ +package gtPlusPlus.core.interfaces; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public interface IItemBlueprint { + + /** + * The inventory size for the blueprint~ + */ + public int INV_SIZE = 9; + + /** + * Meta Compatible function to allow meta items to be blueprints + * @param stack yourMetaItem + * @return true if it is a Blueprint + */ + public boolean isBlueprint(ItemStack stack); + + /** + * Sets the blueprint for this itemstack. + * @param stack yourMetaItem + * @return true if blueprint is set successfully + */ + public boolean setBlueprint(ItemStack stack, IInventory craftingTable, ItemStack output); + + /** + * Sets the name of the recipe/blueprint + * @param String Blueprint Name + * @return N/A + */ + public void setBlueprintName(ItemStack stack, String name); + + /** + * Does this itemstack hold a blueprint? + * @param stack yourMetaItem + * @return true if is holding a Blueprint + */ + public boolean hasBlueprint(ItemStack stack); + + /** + * Gets the recipe held by the item + * @param stack yourMetaItem + * @return the blueprints contents + */ + public ItemStack[] getBlueprint(ItemStack stack); + +} diff --git a/src/main/java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java b/src/main/java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java new file mode 100644 index 0000000000..256fedb13c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/BaseInventoryBackpack.java @@ -0,0 +1,241 @@ +package gtPlusPlus.core.inventories; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gtPlusPlus.core.item.base.BaseItemBackpack; +import net.minecraftforge.common.util.Constants; + +public class BaseInventoryBackpack implements IInventory{ + + private final String name = "Inventory Item"; + + /** Provides NBT Tag Compound to reference */ + private final ItemStack invItem; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 8; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private final ItemStack[] inventory = new ItemStack[INV_SIZE]; + + // declaration of variable: + protected String uniqueID; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public BaseInventoryBackpack(final ItemStack stack) + { + this.invItem = stack; + + /** initialize variable within the constructor: */ + this.uniqueID = ""; + + if (!stack.hasTagCompound()) + { + stack.setTagCompound(new NBTTagCompound()); + // no tag compound means the itemstack does not yet have a UUID, so assign one: + this.uniqueID = UUID.randomUUID().toString(); + } + + // Create a new NBT Tag Compound if one doesn't already exist, or you will crash + if (!stack.hasTagCompound()) { + stack.setTagCompound(new NBTTagCompound()); + } + // note that it's okay to use stack instead of invItem right there + // both reference the same memory location, so whatever you change using + // either reference will change in the other + + // Read the inventory contents from NBT + this.readFromNBT(stack.getTagCompound()); + } + @Override + public int getSizeInventory() + { + return this.inventory.length; + } + + @Override + public ItemStack getStackInSlot(final int slot) + { + return this.inventory[slot]; + } + + @Override + public ItemStack decrStackSize(final int slot, final int amount) + { + ItemStack stack = this.getStackInSlot(slot); + if(stack != null) + { + if(stack.stackSize > amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { + this.inventory[i] = null; + } + } + + // This line here does the work: + this.writeToNBT(this.invItem.getTagCompound()); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return !(itemstack.getItem() instanceof BaseItemBackpack); + } + + /** + * A custom method to read our inventory from an ItemStack's NBT compound + */ + public void readFromNBT(final NBTTagCompound compound) + { + // Gets the custom taglist we wrote to this compound, if any + // 1.7.2+ change to compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); + final NBTTagList items = compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); + + if ("".equals(this.uniqueID)) + { + // try to read unique ID from NBT + this.uniqueID = compound.getString("uniqueID"); + // if it's still "", assign a new one: + if ("".equals(this.uniqueID)) + { + this.uniqueID = UUID.randomUUID().toString(); + } + } + + for (int i = 0; i < items.tagCount(); ++i) + { + // 1.7.2+ change to items.getCompoundTagAt(i) + final NBTTagCompound item = items.getCompoundTagAt(i); + final int slot = item.getInteger("Slot"); + + // Just double-checking that the saved slot index is within our inventory array bounds + if ((slot >= 0) && (slot < this.getSizeInventory())) { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(item); + } + } + } + + /** + * A custom method to write our inventory to an ItemStack's NBT compound + */ + public void writeToNBT(final NBTTagCompound tagcompound) + { + // Create a new NBT Tag List to store itemstacks as NBT Tags + final NBTTagList items = new NBTTagList(); + + for (int i = 0; i < this.getSizeInventory(); ++i) + { + // Only write stacks that contain items + if (this.getStackInSlot(i) != null) + { + // Make a new NBT Tag Compound to write the itemstack and slot index to + final NBTTagCompound item = new NBTTagCompound(); + item.setInteger("Slot", i); + // Writes the itemstack in slot(i) to the Tag Compound we just made + this.getStackInSlot(i).writeToNBT(item); + + // add the tag compound to our tag list + items.appendTag(item); + } + } + tagcompound.setString("uniqueID", this.uniqueID); + // Add the TagList to the ItemStack's Tag Compound with the name "ItemInventory" + tagcompound.setTag("ItemInventory", items); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java b/src/main/java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java new file mode 100644 index 0000000000..823398bd57 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/BaseInventoryGrindle.java @@ -0,0 +1,224 @@ +package gtPlusPlus.core.inventories; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gtPlusPlus.core.item.base.BaseItemBackpack; +import net.minecraftforge.common.util.Constants; + +public class BaseInventoryGrindle implements IInventory { + + private final String name = "Inventory Item"; + + /** Provides NBT Tag Compound to reference */ + private final ItemStack invItem; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 6; + + /** + * Inventory's size must be same as number of slots you add to the Container + * class + */ + private final ItemStack[] inventory = new ItemStack[INV_SIZE]; + + // declaration of variable: + protected String uniqueID; + + /** + * @param itemstack + * - the ItemStack to which this inventory belongs + */ + public BaseInventoryGrindle(final ItemStack stack) { + this.invItem = stack; + + /** initialize variable within the constructor: */ + this.uniqueID = ""; + + if (!stack.hasTagCompound()) { + stack.setTagCompound(new NBTTagCompound()); + // no tag compound means the itemstack does not yet have a UUID, so assign one: + this.uniqueID = UUID.randomUUID().toString(); + } + + // Create a new NBT Tag Compound if one doesn't already exist, or you will crash + if (!stack.hasTagCompound()) { + stack.setTagCompound(new NBTTagCompound()); + } + // note that it's okay to use stack instead of invItem right there + // both reference the same memory location, so whatever you change using + // either reference will change in the other + + // Read the inventory contents from NBT + this.readFromNBT(stack.getTagCompound()); + } + + @Override + public int getSizeInventory() { + return this.inventory.length; + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.inventory[slot]; + } + + @Override + public ItemStack decrStackSize(final int slot, final int amount) { + ItemStack stack = this.getStackInSlot(slot); + if (stack != null) { + if (stack.stackSize > amount) { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } else { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + /** + * This is the method that will handle saving the inventory contents, as it is + * called (or should be called!) anytime the inventory changes. Perfect. Much + * better than using onUpdate in an Item, as this will also let you change + * things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() { + for (int i = 0; i < this.getSizeInventory(); ++i) { + if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { + this.inventory[i] = null; + } + } + + // This line here does the work: + this.writeToNBT(this.invItem.getTagCompound()); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() { + } + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() { + } + + /** + * This method doesn't seem to do what it claims to do, as items can still be + * left-clicked and placed in the inventory even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return !(itemstack.getItem() instanceof BaseItemBackpack); + } + + /** + * A custom method to read our inventory from an ItemStack's NBT compound + */ + public void readFromNBT(final NBTTagCompound compound) { + // Gets the custom taglist we wrote to this compound, if any + // 1.7.2+ change to compound.getTagList("ItemInventory", + // Constants.NBT.TAG_COMPOUND); + final NBTTagList items = compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); + + if ("".equals(this.uniqueID)) { + // try to read unique ID from NBT + this.uniqueID = compound.getString("uniqueID"); + // if it's still "", assign a new one: + if ("".equals(this.uniqueID)) { + this.uniqueID = UUID.randomUUID().toString(); + } + } + + for (int i = 0; i < items.tagCount(); ++i) { + // 1.7.2+ change to items.getCompoundTagAt(i) + final NBTTagCompound item = items.getCompoundTagAt(i); + final int slot = item.getInteger("Slot"); + + // Just double-checking that the saved slot index is within our inventory array + // bounds + if ((slot >= 0) && (slot < this.getSizeInventory())) { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(item); + } + } + } + + /** + * A custom method to write our inventory to an ItemStack's NBT compound + */ + public void writeToNBT(final NBTTagCompound tagcompound) { + // Create a new NBT Tag List to store itemstacks as NBT Tags + final NBTTagList items = new NBTTagList(); + + for (int i = 0; i < this.getSizeInventory(); ++i) { + // Only write stacks that contain items + if (this.getStackInSlot(i) != null) { + // Make a new NBT Tag Compound to write the itemstack and slot index to + final NBTTagCompound item = new NBTTagCompound(); + item.setInteger("Slot", i); + // Writes the itemstack in slot(i) to the Tag Compound we just made + this.getStackInSlot(i).writeToNBT(item); + + // add the tag compound to our tag list + items.appendTag(item); + } + } + tagcompound.setString("uniqueID", this.uniqueID); + // Add the TagList to the ItemStack's Tag Compound with the name "ItemInventory" + tagcompound.setTag("ItemInventory", items); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java b/src/main/java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java new file mode 100644 index 0000000000..da45b5a988 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryCircuitProgrammer.java @@ -0,0 +1,173 @@ +package gtPlusPlus.core.inventories; + +import gtPlusPlus.core.slots.SlotIntegratedCircuit; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryCircuitProgrammer implements IInventory{ + + private final String name = "Circuit Programmer"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 26; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return SlotIntegratedCircuit.isItemValidForSlot(itemstack); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryFishTrap.java b/src/main/java/gtPlusPlus/core/inventories/InventoryFishTrap.java new file mode 100644 index 0000000000..429ff517c1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryFishTrap.java @@ -0,0 +1,176 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryFishTrap implements IInventory{ + + private final String name = "Fishtrap"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 15; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java b/src/main/java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java new file mode 100644 index 0000000000..0288aa4d29 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryHeliumGenerator.java @@ -0,0 +1,176 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryHeliumGenerator implements IInventory{ + + private final String name = "Helium"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 19; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryPestKiller.java b/src/main/java/gtPlusPlus/core/inventories/InventoryPestKiller.java new file mode 100644 index 0000000000..1c5d98f7d2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryPestKiller.java @@ -0,0 +1,176 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryPestKiller implements IInventory{ + + private final String name = "Pest Killer"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 3; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java new file mode 100644 index 0000000000..3ea5675ba2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java @@ -0,0 +1,188 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryWorkbenchChest implements IInventory{ + + private final String name = "Inventory Chest"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 16; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryWorkbenchChest() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java new file mode 100644 index 0000000000..f49540b5e2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java @@ -0,0 +1,201 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryWorkbenchCrafting implements IInventory{ + + private final String name = "Inventory Crafting"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 9; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + public final InventoryCrafting craftMatrix; + public final Container parentContainer; + + public InventoryCrafting getCrafting(){ + return this.craftMatrix; + } + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryWorkbenchCrafting(final Container containerR) + { + this.parentContainer = containerR; + this.craftMatrix = new InventoryCrafting(this.parentContainer, 3, 3); + } + + private ItemStack[] getArrayOfCraftingItems(){ + final ItemStack[] array = new ItemStack[9]; + for (int i=0; i= 0) && (slot < INV_SIZE)) + { + this.getInventory()[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.getInventory()[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { + this.getInventory()[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java new file mode 100644 index 0000000000..432a425a9b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java @@ -0,0 +1,164 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class InventoryWorkbenchHoloCrafting implements IInventory{ + + private final String name = "Inventory Crafting"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 9; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private final ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryWorkbenchHoloCrafting() + { + + } + + /*public void readFromNBT(NBTTagCompound nbt) + { + NBTTagList list = nbt.getTagList("Items", 10); + inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0 && slot < INV_SIZE) + { + inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(NBTTagCompound nbt) + { + NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + this.markDirty(); + } + else + { + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + this.markDirty(); + } + + @Override + public String getInventoryName() + { + return this.name; + } + + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + @Override + public void openInventory() {} + + @Override + public void closeInventory() {} + + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java new file mode 100644 index 0000000000..1966e8fdca --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java @@ -0,0 +1,269 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCraftResult; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gtPlusPlus.api.objects.Logger; + +public class InventoryWorkbenchHoloSlots implements IInventory{ + + private final String name = "Inventory Holo"; + + //Output Slot + public IInventory craftResult = new InventoryCraftResult(); + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 6; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryWorkbenchHoloSlots() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 1) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 1; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + return false; + } + + /** A list of one item containing the result of the crafting formula */ + private final ItemStack[] stackResult = new ItemStack[1]; + + /** + * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a + * new stack. + */ + /*@Override + public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) + { + ItemStack stack = getStackInSlot(0); + if (this.stackResult[0] != null) + { + ItemStack itemstack = this.stackResult[0]; + this.stackResult[0] = null; + return itemstack; + } + if(stack != null) + { + if(stack.stackSize > p_70298_2_) + { + stack = stack.splitStack(p_70298_2_); + // Don't forget this line or your inventory will not be saved! + markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + setInventorySlotContents(p_70298_1_, null); + } + } + return stack; + }*/ + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) + { + if (this.getStackInSlot(0) != null){ + Logger.INFO("getStackInSlot(0) contains "+this.getStackInSlot(0).getDisplayName()); + if (this.stackResult[0] == null){ + Logger.INFO("this.stackResult[0] == null"); + this.stackResult[0] = this.getStackInSlot(0); + } + else if (this.stackResult[0] != null){ + Logger.INFO("this.stackResult[0] != null"); + if (this.stackResult[0].getDisplayName().toLowerCase().equals(this.getStackInSlot(0).getDisplayName().toLowerCase())){ + Logger.INFO("Items are the same?"); + } + else { + Logger.INFO("Items are not the same."); + } + } + } + + if (this.stackResult[0] != null) + { + Logger.INFO("this.stackResult[0] != null - Really never should be though. - Returning "+this.stackResult[0].getDisplayName()); + final ItemStack itemstack = this.stackResult[0]; + this.stackResult[0] = null; + return itemstack; + } + return null; + } + + /** + * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - + * like when you close a workbench GUI. + */ + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) + { + if (this.stackResult[0] != null) + { + final ItemStack itemstack = this.stackResult[0]; + this.stackResult[0] = null; + return itemstack; + } + return null; + } + +} + + + +//Default Behaviour +/*@Override +public ItemStack decrStackSize(int slot, int amount) +{ + if(stack != null) + { + if(stack.stackSize > amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + setInventorySlotContents(slot, null); + } + } + return stack; +}*/ + +//Default Behaviour +/*@Override +public ItemStack getStackInSlotOnClosing(int slot) +{ + ItemStack stack = getStackInSlot(slot); + setInventorySlotContents(slot, null); + return stack; +}*/ + diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java new file mode 100644 index 0000000000..6543f6e9ea --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java @@ -0,0 +1,188 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gregtech.api.items.GT_MetaGenerated_Tool; + +public class InventoryWorkbenchTools implements IInventory{ + + private final String name = "Inventory Tools"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 5; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryWorkbenchTools() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 1; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + if (itemstack.getItem() instanceof GT_MetaGenerated_Tool){ + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java new file mode 100644 index 0000000000..29bf306b08 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java @@ -0,0 +1,193 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gregtech.api.items.GT_MetaGenerated_Tool; + +import gtPlusPlus.core.slots.SlotGtToolElectric; +import ic2.api.item.IElectricItem; + +public class InventoryWorkbenchToolsElectric implements IInventory{ + + private final String name = "Inventory Tools"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 5; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + private final Slot[] toolSlots = new SlotGtToolElectric[INV_SIZE]; //TODO + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryWorkbenchToolsElectric() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 1; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)){ + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java b/src/main/java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java new file mode 100644 index 0000000000..666f4aac53 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/Inventory_DecayablesChest.java @@ -0,0 +1,176 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class Inventory_DecayablesChest implements IInventory{ + + private final String name = "DecayablesChest"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 15; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/Inventory_EggBox.java b/src/main/java/gtPlusPlus/core/inventories/Inventory_EggBox.java new file mode 100644 index 0000000000..334afc3300 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/Inventory_EggBox.java @@ -0,0 +1,176 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class Inventory_EggBox implements IInventory{ + + private final String name = "EggBox"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 15; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java b/src/main/java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java new file mode 100644 index 0000000000..a47f250c39 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/Inventory_RoundRobinator.java @@ -0,0 +1,172 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class Inventory_RoundRobinator implements IInventory{ + + private final String name = "Round Robinator"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 4; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java b/src/main/java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java new file mode 100644 index 0000000000..681c67a988 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/Inventory_SuperJukebox.java @@ -0,0 +1,172 @@ +package gtPlusPlus.core.inventories; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class Inventory_SuperJukebox implements IInventory{ + + private final String name = "Sir Mixalot"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 21; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 1; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java new file mode 100644 index 0000000000..e2dc91a413 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/Inventory_VolumetricFlaskSetter.java @@ -0,0 +1,173 @@ +package gtPlusPlus.core.inventories; + +import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class Inventory_VolumetricFlaskSetter implements IInventory{ + + private final String name = "Volumetric Flask Setter"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 9; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + public void readFromNBT(final NBTTagCompound nbt){ + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)){ + //Utils.LOG_INFO("Trying to read NBT data from inventory."); + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt){ + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 16; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return VolumetricFlaskHelper.isVolumetricFlask(itemstack); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java b/src/main/java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java new file mode 100644 index 0000000000..03350a3c18 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/box/LunchBoxInventory.java @@ -0,0 +1,15 @@ +package gtPlusPlus.core.inventories.box; + +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import gtPlusPlus.core.slots.SlotLunchBox; +import net.minecraft.item.ItemStack; + +public class LunchBoxInventory extends CustomBoxInventory { + public LunchBoxInventory(ItemStack stack) { + super(stack, "Lunch Box", gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS); + } + @Override + public boolean isItemValidForSlot(int slot, ItemStack itemstack) { + return SlotLunchBox.isItemValid_STATIC(itemstack); + } +} diff --git a/src/main/java/gtPlusPlus/core/inventories/box/MagicBagInventory.java b/src/main/java/gtPlusPlus/core/inventories/box/MagicBagInventory.java new file mode 100644 index 0000000000..56b1835113 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/box/MagicBagInventory.java @@ -0,0 +1,15 @@ +package gtPlusPlus.core.inventories.box; + +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import gtPlusPlus.core.slots.SlotMagicToolBag; +import net.minecraft.item.ItemStack; + +public class MagicBagInventory extends CustomBoxInventory { + public MagicBagInventory(ItemStack stack) { + super(stack, "Mystic Bag", gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS); + } + @Override + public boolean isItemValidForSlot(int slot, ItemStack itemstack) { + return SlotMagicToolBag.isItemValid_STATIC(itemstack); + } +} diff --git a/src/main/java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java b/src/main/java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java new file mode 100644 index 0000000000..30893aeb4b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/box/ToolBoxInventory.java @@ -0,0 +1,16 @@ +package gtPlusPlus.core.inventories.box; + +import gtPlusPlus.core.item.tool.misc.box.CustomBoxInventory; +import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox; +import gtPlusPlus.core.slots.SlotToolBox; +import net.minecraft.item.ItemStack; + +public class ToolBoxInventory extends CustomBoxInventory { + public ToolBoxInventory(ItemStack stack) { + super(stack, "Tool Box", UniversalToolBox.SLOTS); + } + @Override + public boolean isItemValidForSlot(int slot, ItemStack itemstack) { + return SlotToolBox.isItemValid_STATIC(itemstack); + } +} diff --git a/src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java b/src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java new file mode 100644 index 0000000000..825a9a8851 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularMain.java @@ -0,0 +1,202 @@ +package gtPlusPlus.core.inventories.modulartable; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; + +public class InventoryModularMain implements IInventory{ + + private final String name = "Inventory Grid"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 9; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryModularMain() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i= this.inventory.length){ + //Utils.LOG_INFO("Returning invalid slot item."); + return null; + } + return this.inventory[slot]; + } catch (Throwable t){ + t.printStackTrace(); + return null; + } + } + + @Override + public ItemStack decrStackSize(final int slot, final int amount) + { + ItemStack stack = this.getStackInSlot(slot); + if(stack != null) + { + if(stack.stackSize > amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + if (slot >= this.inventory.length){ + return; + } + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack){ + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return TileEntityModularityTable.isValidUpgrade(itemstack); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java b/src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java new file mode 100644 index 0000000000..d3c59ee2a4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/modulartable/InventoryModularOutput.java @@ -0,0 +1,192 @@ +package gtPlusPlus.core.inventories.modulartable; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; + +public class InventoryModularOutput implements IInventory { + + private final String name = "Inventory Output"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 3; + private int mRecpeTime = -1; + + /** + * Inventory's size must be same as number of slots you add to the Container + * class + */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack + * - the ItemStack to which this inventory belongs + */ + public InventoryModularOutput() { + + } + + public void readFromNBT(final NBTTagCompound nbt) { + if (this.mRecpeTime > -1) { + nbt.setInteger("mRecipeTime", this.mRecpeTime); + } + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for (int i = 0; i < list.tagCount(); i++) { + final NBTTagCompound data = list.getCompoundTagAt(i); + final int slot = data.getInteger("Slot"); + if ((slot >= 0) && (slot < INV_SIZE)) { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) { + final NBTTagList list = new NBTTagList(); + if (nbt.hasKey("mRecipeTime")) { + this.mRecpeTime = nbt.getInteger("mRecipeTime"); + } + for (int i = 0; i < INV_SIZE; i++) { + final ItemStack stack = this.inventory[i]; + if (stack != null) { + final NBTTagCompound data = new NBTTagCompound(); + stack.writeToNBT(data); + data.setInteger("Slot", i); + list.appendTag(data); + } + } + nbt.setTag("Items", list); + } + + public int setRecipeTime(int mTime) { + return (this.mRecpeTime = mTime); + } + + public int getRecipeTime() { + return this.mRecpeTime; + } + + @Override + public int getSizeInventory() { + return this.inventory.length; + } + + public ItemStack[] getInventory() { + return this.inventory; + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.inventory[slot]; + } + + @Override + public ItemStack decrStackSize(final int slot, final int amount) { + ItemStack stack = this.getStackInSlot(slot); + if (stack != null) { + if (stack.stackSize > amount) { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } else { + // this method also calls markDirty, so we don't need to call it + // again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it + * is called (or should be called!) anytime the inventory changes. Perfect. + * Much better than using onUpdate in an Item, as this will also let you + * change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() { + for (int i = 0; i < this.getSizeInventory(); ++i) { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null) { + // Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" + // x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() { + } + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() { + } + + /** + * This method doesn't seem to do what it claims to do, as items can still + * be left-clicked and placed in the inventory even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + if (slot == 0){ + return TileEntityModularityTable.isValidUpgrade(itemstack); + } + return TileEntityModularityTable.isValidModularPiece(itemstack); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java b/src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java new file mode 100644 index 0000000000..2d91869027 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java @@ -0,0 +1,201 @@ +package gtPlusPlus.core.inventories.projecttable; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryProjectMain implements IInventory{ + + private final String name = "Inventory Grid"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 9; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryProjectMain() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i= this.inventory.length){ + //Utils.LOG_INFO("Returning invalid slot item."); + return null; + } + return this.inventory[slot]; + } catch (Throwable t){ + t.printStackTrace(); + return null; + } + } + + @Override + public ItemStack decrStackSize(final int slot, final int amount) + { + ItemStack stack = this.getStackInSlot(slot); + if(stack != null) + { + if(stack.stackSize > amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + if (slot >= this.inventory.length){ + return; + } + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java b/src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java new file mode 100644 index 0000000000..41ddd06ef1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/projecttable/InventoryProjectOutput.java @@ -0,0 +1,188 @@ +package gtPlusPlus.core.inventories.projecttable; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryProjectOutput implements IInventory{ + + private final String name = "Inventory Output"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 2; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryProjectOutput() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java b/src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java new file mode 100644 index 0000000000..aa7e8b1866 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeMain.java @@ -0,0 +1,201 @@ +package gtPlusPlus.core.inventories.tradetable; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryTradeMain implements IInventory{ + + private final String name = "Inventory Grid"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 9; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryTradeMain() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i= this.inventory.length){ + //Utils.LOG_INFO("Returning invalid slot item."); + return null; + } + return this.inventory[slot]; + } catch (Throwable t){ + t.printStackTrace(); + return null; + } + } + + @Override + public ItemStack decrStackSize(final int slot, final int amount) + { + ItemStack stack = this.getStackInSlot(slot); + if(stack != null) + { + if(stack.stackSize > amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + if (slot >= this.inventory.length){ + return; + } + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java b/src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java new file mode 100644 index 0000000000..fb4329e11a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/inventories/tradetable/InventoryTradeOutput.java @@ -0,0 +1,188 @@ +package gtPlusPlus.core.inventories.tradetable; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class InventoryTradeOutput implements IInventory{ + + private final String name = "Inventory Output"; + + /** Defining your inventory size this way is handy */ + public static final int INV_SIZE = 2; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory = new ItemStack[INV_SIZE]; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public InventoryTradeOutput() + { + + } + + public void readFromNBT(final NBTTagCompound nbt) + { + final NBTTagList list = nbt.getTagList("Items", 10); + this.inventory = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + this.inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + } + + public void writeToNBT(final NBTTagCompound nbt) + { + final NBTTagList list = new NBTTagList(); + for(int i = 0;i amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + else + { + // this method also calls markDirty, so we don't need to call it again + this.setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) + { + final ItemStack stack = this.getStackInSlot(slot); + this.setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) + { + this.inventory[slot] = stack; + + if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) + { + stack.stackSize = this.getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + this.markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return this.name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return this.name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < this.getSizeInventory(); ++i) + { + final ItemStack temp = this.getStackInSlot(i); + if (temp != null){ + //Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize); + } + + if ((temp != null) && (temp.stackSize == 0)) { + this.inventory[i] = null; + } + } + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) + { + // Don't want to be able to store the inventory item within itself + // Bad things will happen, like losing your inventory + // Actually, this needs a custom Slot to work + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java new file mode 100644 index 0000000000..4c6f0dc712 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -0,0 +1,1229 @@ +package gtPlusPlus.core.item; +import static gtPlusPlus.core.creative.AddToCreativeTab.tabMachines; +import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; +import static gtPlusPlus.core.lib.CORE.LOAD_ALL_CONTENT; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; +import gtPlusPlus.core.block.base.BlockBaseModular; +import gtPlusPlus.core.common.compat.COMPAT_Baubles; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.*; +import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; +import gtPlusPlus.core.item.base.dusts.BaseItemDust; +import gtPlusPlus.core.item.base.foil.BaseItemFoil; +import gtPlusPlus.core.item.base.foods.BaseItemFood; +import gtPlusPlus.core.item.base.foods.BaseItemHotFood; +import gtPlusPlus.core.item.base.gears.BaseItemSmallGear; +import gtPlusPlus.core.item.base.ingots.BaseItemIngot; +import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD; +import gtPlusPlus.core.item.base.misc.BaseItemMisc; +import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes; +import gtPlusPlus.core.item.base.plates.BaseItemPlate; +import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble; +import gtPlusPlus.core.item.bauble.*; +import gtPlusPlus.core.item.chemistry.*; +import gtPlusPlus.core.item.crafting.ItemDummyResearch; +import gtPlusPlus.core.item.effects.RarityUncommon; +import gtPlusPlus.core.item.food.BaseItemMetaFood; +import gtPlusPlus.core.item.general.*; +import gtPlusPlus.core.item.general.books.ItemBaseBook; +import gtPlusPlus.core.item.general.capture.ItemEntityCatcher; +import gtPlusPlus.core.item.general.chassis.ItemBoilerChassis; +import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoil; +import gtPlusPlus.core.item.general.chassis.ItemDehydratorCoilWire; +import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg; +import gtPlusPlus.core.item.general.throwables.ItemHydrofluoricAcidPotion; +import gtPlusPlus.core.item.general.throwables.ItemSulfuricAcidPotion; +import gtPlusPlus.core.item.general.throwables.ItemThrowableBomb; +import gtPlusPlus.core.item.init.ItemsFoods; +import gtPlusPlus.core.item.materials.DustDecayable; +import gtPlusPlus.core.item.tool.misc.DebugScanner; +import gtPlusPlus.core.item.tool.misc.GregtechPump; +import gtPlusPlus.core.item.tool.misc.SandstoneHammer; +import gtPlusPlus.core.item.tool.misc.box.AutoLunchBox; +import gtPlusPlus.core.item.tool.misc.box.MagicToolBag; +import gtPlusPlus.core.item.tool.misc.box.UniversalToolBox; +import gtPlusPlus.core.item.tool.staballoy.*; +import gtPlusPlus.core.item.wearable.WearableLoader; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.*; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.material.nuclear.NUCLIDE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.debug.DEBUG_INIT; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.everglades.GTplusplus_Everglades; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.cofh.HANDLER_COFH; +import gtPlusPlus.xmod.eio.material.MaterialEIO; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; +import net.minecraft.item.*; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +public final class ModItems { + + public static ToolMaterial STABALLOY = EnumHelper.addToolMaterial("Staballoy", 3, 2500, 7, 1.0F, 18); + + public static Item ZZZ_Empty; + public static Item AAA_Broken; + + + public static Item itemAlkalusDisk; + public static Item itemDebugShapeSpawner; + public static ItemCustomSpawnEgg itemCustomSpawnEgg; + + //EnderIO + public static Item itemPlateSoularium; + public static Item itemPlateRedstoneAlloy; + public static Item itemPlateElectricalSteel; + public static Item itemPlatePulsatingIron; + public static Item itemPlateEnergeticAlloy; + public static Item itemPlateVibrantAlloy; + public static Item itemPlateConductiveIron; + public static Item itemPlateDarkSteel; + public static Item itemDustSoularium; + public static Item itemDustRedstoneAlloy; + public static Item itemDustElectricalSteel; + public static Item itemDustPulsatingIron; + public static Item itemDustEnergeticAlloy; + public static Item itemDustVibrantAlloy; + public static Item itemDustConductiveIron; + //Big Reactors + public static Item itemPlateBlutonium; + public static Item itemPlateCyanite; + public static Item itemPlateLudicrite; + //Thaumcraft + public static Item itemPlateVoidMetal; + //Pneumaticraft + public static Item itemPlateCompressedIron; + //SimplyJetpacks + public static Item itemPlateEnrichedSoularium; + //rfTools + public static Item itemPlateDimensionShard; + //Staballoy + public static Item itemStaballoyPickaxe; + public static Item itemStaballoyAxe; + //Tools + public static Item itemSandstoneHammer; + //Machine Related + public static Item itemBufferCore0; + //Material related + public static Item itemStickyRubber; + public static Item itemIngotBatteryAlloy; + public static Item itemPlateBatteryAlloy; + public static Item itemHeliumBlob; + public static Item itemHydrogenBlob; + public static Item itemPLACEHOLDER_Circuit; + + public static Item FuelRod_Empty; + public static Item FuelRod_Thorium; + public static Item FuelRod_Uranium; + public static Item FuelRod_Plutonium; + + public static Item itemBedLocator_Base; + public static Item itemBaseItemWithCharge; + + public static Item itemIngotRaisinBread; + public static Item itemHotIngotRaisinBread; + + public static ItemFood itemFoodRaisinToast; + public static BaseItemHotFood itemHotFoodRaisinToast; + public static BaseItemFood itemFoodCurriedSausages; + public static BaseItemHotFood itemHotFoodCurriedSausages; + + public static Item RfEuBattery; + public static Item itemPersonalCloakingDevice; + public static Item itemPersonalCloakingDeviceCharged; + public static Item itemPersonalHealingDevice; + public static Item itemPersonalFireProofDevice; + public static Item itemSlowBuildingRing; + + public static MultiPickaxeBase MP_GTMATERIAL; + public static MultiSpadeBase MS_GTMATERIAL; + + public static ItemStack FluidCell; + + public static BaseItemBackpack backpack_Red; + public static BaseItemBackpack backpack_Green; + public static BaseItemBackpack backpack_Blue; + public static BaseItemBackpack backpack_Yellow; + public static BaseItemBackpack backpack_Purple; + public static BaseItemBackpack backpack_Cyan; + public static BaseItemBackpack backpack_Maroon; + public static BaseItemBackpack backpack_Olive; + public static BaseItemBackpack backpack_DarkGreen; + public static BaseItemBackpack backpack_DarkPurple; + public static BaseItemBackpack backpack_Teal; + public static BaseItemBackpack backpack_Navy; + public static BaseItemBackpack backpack_Silver; + public static BaseItemBackpack backpack_Gray; + public static BaseItemBackpack backpack_Black; + public static BaseItemBackpack backpack_White; + + public static ItemBlueprint itemBlueprintBase; + + public static Item dustLithiumCarbonate; + public static Item dustLithiumHydroxide; + public static Item dustLithiumPeroxide; + public static Item dustLithiumFluoride; + + public static Item dustUranium232; + public static Item dustUraniumTetraFluoride; + public static Item dustUraniumHexaFluoride; + + public static Item dustBerylliumFluoride; + + public static Item dustQuicklime; + public static Item dustCalciumHydroxide; + public static Item dustCalciumCarbonate; + public static Item dustLi2CO3CaOH2; + public static Item dustLi2BeF4; + + public static Item dustTumbagaMix; + + public static Item dustAer; + public static Item dustIgnis; + public static Item dustTerra; + public static Item dustAqua; + + public static BaseEuItem metaItem2; + + public static Item shardAer; + public static Item shardIgnis; + public static Item shardTerra; + public static Item shardAqua; + + //Tc Compat for energy crystal recipes + public static Item shardDull; + + //Lighter + public static Item itemBasicFireMaker; + + //Zirconium + public static Item itemZirconiumChlorideCinterPellet; + public static Item dustZrCl4; + public static Item dustCookedZrCl4; + public static Item dustZrF4; + + public static Item dustNaBF4NaF; + public static Item dustLiFBeF2ZrF4UF4; + public static Item dustLiFBeF2ZrF4U235; + public static Item dustLiFBeF2ThF4UF4; + + public static Item dustCalciumSulfate; + + public static Item dustFertUN18; + public static Item dustFertUN32; + + //public static Fluid fluidFLiBeSalt; + //public static Fluid fluidFLiBeSaltBurnt; + + public static Fluid fluidLftrCore1; + public static Fluid fluidLftrCore2; + public static Fluid fluidLftrCore3; + public static Fluid fluidLftrCore4; + public static Fluid fluidLftrBlanket1; + public static Fluid fluidLftrBlanket2; + public static Fluid fluidLftrBlanket3; + public static Fluid fluidNuclearWaste; + + + //Possibly missing base items that GT may be missing. + + public static Item itemSmallWroughtIronGear; + public static Item itemPlateRawMeat; + public static Item itemPlateClay; + public static Item itemPlateLithium; + public static Item itemPlateEuropium; + public static Item itemPlateVanadium; + public static Item itemDoublePlateClay; + public static Item itemDoublePlateEuropium; + public static Item itemFoilUranium235; + public static Item itemDustIndium; + public static BlockBaseModular blockRawMeat; + + public static Item itemBoilerChassis; + public static Item itemDehydratorCoilWire; + public static Item itemDehydratorCoil; + + public static Item itemLavaFilter; + public static Item itemAirFilter; + + public static Item itemCoalCoke; + public static Item itemCactusCharcoal; + public static Item itemSugarCharcoal; + public static Item itemCactusCoke; + public static Item itemSugarCoke; + + public static Item itemCircuitLFTR; + public static Item itemBasicTurbine; + + public static Item itemDebugAreaClear; + + public static Item itemGemShards; + public static Item itemHalfCompleteCasings; + + public static Item itemSulfuricPotion; + public static Item itemHydrofluoricPotion; + + public static Item itemModularBauble; + public static Item itemCustomBook; + + public static Item itemGrindleTablet; + public static Item itemRope; + public static Item itemFiber; + public static Item itemDragonJar; + + //Unstable Elements & Related Content + public static Item dustNeptunium238; + public static Item dustDecayedRadium226; + public static Item dustRadium226; + public static Item dustProtactinium233; + + public static ItemGiantEgg itemBigEgg; + + public static GregtechPump toolGregtechPump; + + public static ItemGenericToken itemGenericToken; + + public static Item itemControlCore; + + public static ItemStack itemHotTitaniumIngot; + + public static Fluid fluidZrF4; + + public static Item boxTools; + public static Item boxFood; + public static Item boxMagic; + + public static DustDecayable dustMolybdenum99; + public static DustDecayable dustTechnetium99; + public static DustDecayable dustTechnetium99M; + + public static IonParticles itemIonParticleBase; + public static StandardBaseParticles itemStandarParticleBase; + + public static BatteryPackBaseBauble itemChargePack_Low_1; + public static BatteryPackBaseBauble itemChargePack_Low_2; + public static BatteryPackBaseBauble itemChargePack_Low_3; + public static BatteryPackBaseBauble itemChargePack_Low_4; + public static BatteryPackBaseBauble itemChargePack_Low_5; + public static BatteryPackBaseBauble itemChargePack_High_1; + public static BatteryPackBaseBauble itemChargePack_High_2; + public static BatteryPackBaseBauble itemChargePack_High_3; + public static BatteryPackBaseBauble itemChargePack_High_4; + + public static DebugScanner itemDebugScanner; + + public static ItemDummyResearch itemDummyResearch; + + public static CoreItem itemBombCasing; + public static CoreItem itemBombUnf; + public static CoreItem itemDetCable; + public static ItemThrowableBomb itemBomb; + + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Zombie; + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Skeleton; + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Spider; + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Creeper; + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Enderman; + + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Nether; + public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Infernal; + + public static CoreItem itemExquisiteIndustrialDiamond; + + public static BaseItemMetaFood itemMetaFood; + + static { + Logger.INFO("Items!"); + //Default item used when recipes fail, handy for debugging. Let's make sure they exist when this class is called upon. + AAA_Broken = new BaseItemIngot_OLD("AAA_Broken", "Errors - Tell Alkalus", Utils.rgbtoHexValue(128, 128, 128), 0); + ZZZ_Empty = new ItemEmpty(); + } + + public static final void init(){ + + itemDebugScanner = new DebugScanner(); + + itemAlkalusDisk = new BaseItemDamageable("itemAlkalusDisk", AddToCreativeTab.tabMisc, 1, 0, "Unknown Use", EnumRarity.rare, EnumChatFormatting.AQUA, false, null); + itemBigEgg = new ItemGiantEgg(); + itemGenericToken = new ItemGenericToken(); + itemDummyResearch = new ItemDummyResearch(); + itemCustomSpawnEgg = new ItemCustomSpawnEgg(); + + //Debug Loading + if (CORE_Preloader.DEBUG_MODE){ + DEBUG_INIT.registerItems(); + } + + itemDebugAreaClear = new ItemAreaClear(); + + //Register meta item, because we need them for everything. + MetaGeneratedGregtechItems.INSTANCE.generateMetaItems(); + + //Some Simple forms of materials + itemStickyRubber = new Item().setUnlocalizedName("itemStickyRubber").setCreativeTab(tabMachines).setTextureName(CORE.MODID + ":itemStickyRubber"); + GameRegistry.registerItem(itemStickyRubber, "itemStickyRubber"); + GT_OreDictUnificator.registerOre("ingotRubber", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemStickyRubber", 1)); + + //Register Hydrogen Blobs first, so we can replace old helium blobs. + itemHydrogenBlob = new CoreItem("itemHydrogenBlob", "Mysterious Hydrogen Blob", tabMisc).setTextureName(CORE.MODID + ":itemHeliumBlob"); + //Register Old Helium Blob, this will be replaced when held by a player. + itemHeliumBlob = new CoreItem("itemHeliumBlob", tabMisc, ItemUtils.getSimpleStack(itemHydrogenBlob)).setTextureName(CORE.MODID + ":itemHydrogenBlob"); + + //Register this neato device, for making some fires. + itemBasicFireMaker = new ItemBasicFirestarter(); + + //Register Rope + itemFiber = new CoreItem("itemFiber", "Plant Fiber", tabMisc); + itemRope = new CoreItem("itemRope", "Rope", tabMisc); + + //Load Wearable Items + WearableLoader.run(); + + //Make some backpacks + //Primary colours + backpack_Red = new BaseItemBackpack("backpackRed", Utils.rgbtoHexValue(200, 0, 0)); + backpack_Green = new BaseItemBackpack("backpackGreen", Utils.rgbtoHexValue(0, 200, 0)); + backpack_Blue = new BaseItemBackpack("backpackBlue", Utils.rgbtoHexValue(0, 0, 200)); + //Secondary Colours + backpack_Yellow = new BaseItemBackpack("backpackYellow", Utils.rgbtoHexValue(200, 200, 0)); + backpack_Purple = new BaseItemBackpack("backpackPurple", Utils.rgbtoHexValue(200, 0, 200)); + backpack_Cyan = new BaseItemBackpack("backpackCyan", Utils.rgbtoHexValue(0, 200, 200)); + //Tertiary Colours + backpack_Maroon = new BaseItemBackpack("backpackMaroon", Utils.rgbtoHexValue(128, 0, 0)); + backpack_Olive = new BaseItemBackpack("backpackOlive", Utils.rgbtoHexValue(128, 128, 0)); + backpack_DarkGreen = new BaseItemBackpack("backpackDarkGreen", Utils.rgbtoHexValue(0, 128, 0)); + backpack_DarkPurple = new BaseItemBackpack("backpackDarkPurple", Utils.rgbtoHexValue(128, 0, 128)); + backpack_Teal = new BaseItemBackpack("backpackTeal", Utils.rgbtoHexValue(0, 128, 128)); + backpack_Navy = new BaseItemBackpack("backpackNavy", Utils.rgbtoHexValue(0, 0, 128)); + //Shades + backpack_Silver = new BaseItemBackpack("backpackSilver", Utils.rgbtoHexValue(192, 192, 192)); + backpack_Gray = new BaseItemBackpack("backpackGray", Utils.rgbtoHexValue(128, 128, 128)); + backpack_Black = new BaseItemBackpack("backpackBlack", Utils.rgbtoHexValue(20, 20, 20)); + backpack_White = new BaseItemBackpack("backpackWhite", Utils.rgbtoHexValue(240, 240, 240)); + + + //Load Custom Box/bags + boxTools = new UniversalToolBox("Tool Box"); + boxFood = new AutoLunchBox("Eatotron-9000"); + boxMagic = new MagicToolBag("Mystic Bag"); + + itemBlueprintBase = new ItemBlueprint("itemBlueprint"); + + itemGemShards = new ItemGemShards("itemGemShards", "Gem Shards", AddToCreativeTab.tabMisc, 32, 0, "They glitter in the light", EnumRarity.rare, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(182, 114, 18)).setTextureName(CORE.MODID + ":itemHeliumBlob"); + itemHalfCompleteCasings = new ItemHalfCompleteCasings("itemHalfCompleteCasings", AddToCreativeTab.tabMisc, 32, 0, "This isn't quite finished yet.", EnumRarity.common, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(255, 255, 255)).setTextureName("gregtech" + ":" + "gt.metaitem.01/" + "761"); + itemSulfuricPotion = new ItemSulfuricAcidPotion("itemSulfuricPotion", "Throwable Vial of Sulfuric Acid", "Burn your foes alive!").setTextureName(CORE.MODID + ":itemSulfuricAcidPotion"); + itemHydrofluoricPotion = new ItemHydrofluoricAcidPotion("itemHydrofluoricPotion", "Throwable Vial of Hydrofluoric Acid", "They won't see this coming, nor anything after!").setTextureName(CORE.MODID + ":itemPotion"); + //Start meta Item Generation + ItemsFoods.load(); + + + try{ + + /** + * Try generate dusts for missing rare earth materials if they don't exist + */ + + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1))){ + ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1))){ + ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1))){ + ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1))){ + ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGermanium", 1))){ + ItemUtils.generateSpecialUseDusts("Germanium", "Germanium", "Ge", ELEMENT.getInstance().GERMANIUM.getRgbAsHex()); + } + + + //Elements generate first so they can be used in compounds. + //Missing Elements + MaterialGenerator.generate(ELEMENT.getInstance().SELENIUM); //LFTR byproduct + MaterialGenerator.generate(ELEMENT.getInstance().BROMINE); + MaterialGenerator.generate(ELEMENT.getInstance().KRYPTON); //LFTR byproduct + MaterialGenerator.generate(ELEMENT.getInstance().STRONTIUM); + MaterialGenerator.generate(ELEMENT.getInstance().ZIRCONIUM); + MaterialGenerator.generate(ELEMENT.getInstance().RUTHENIUM); + MaterialGenerator.generate(ELEMENT.getInstance().IODINE); //LFTR byproduct + MaterialGenerator.generate(ELEMENT.getInstance().HAFNIUM); + MaterialGenerator.generate(ELEMENT.getInstance().DYSPROSIUM); + MaterialGenerator.generate(ELEMENT.getInstance().ERBIUM); + MaterialGenerator.generate(ELEMENT.getInstance().PRASEODYMIUM); + MaterialGenerator.generate(ELEMENT.getInstance().TELLURIUM); //LFTR byproduct + MaterialGenerator.generate(ELEMENT.getInstance().RHODIUM); + MaterialGenerator.generate(ELEMENT.getInstance().RHENIUM); + MaterialGenerator.generate(ELEMENT.getInstance().THALLIUM); + + //RADIOACTIVE ELEMENTS + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().TECHNETIUM, false); //LFTR byproduct + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().POLONIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().ASTATINE, false); + //MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().RADON, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().FRANCIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().RADIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PROMETHIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().ACTINIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PROTACTINIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().NEPTUNIUM, false); //LFTR byproduct + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().CURIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().BERKELIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().CALIFORNIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().EINSTEINIUM, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().FERMIUM, false); + + + //Nuclear Isotopes + + //Lithium-7 is used as a part of the molten lithium fluoride in molten salt reactors: liquid-fluoride nuclear reactors. + //The large neutron-absorption cross-section of lithium-6 (about 940 barns[5]) as compared with the very small + //neutron cross-section of lithium-7 (about 45 millibarns) makes high separation of lithium-7 from natural lithium a + //strong requirement for the possible use in lithium fluoride reactors. + MaterialGenerator.generate(ELEMENT.getInstance().LITHIUM7, false); + //Thorium-232 is the most stable isotope of Thorium, purified for nuclear fuel use in this case. + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().THORIUM232); + //Production of 233U (through the neutron irradiation of 232Th) invariably produces small amounts of 232U as an impurity + //because of parasitic (n,2n) reactions on uranium-233 itself, or on protactinium-233, or on thorium-232: + MaterialGenerator.generate(ELEMENT.getInstance().URANIUM232); + //Uranium-233 is a fissile isotope of uranium that is bred from thorium-232 as part of the thorium fuel cycle. + MaterialGenerator.generate(ELEMENT.getInstance().URANIUM233); + //Plutonium-238 is a very powerful alpha emitter. This makes the plutonium-238 isotope suitable for usage in radioisotope thermoelectric generators (RTGs) + //and radioisotope heater units - one gram of plutonium-238 generates approximately 0.5 W of thermal power. + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PLUTONIUM238, false); + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustPlutonium239", 1) == null || Utils.getGregtechVersionAsInt() < 50931) { + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().PLUTONIUM239, false); + } + + //RTG Fuel Materials + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().STRONTIUM90, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().POLONIUM210, false); + MaterialGenerator.generateNuclearMaterial(ELEMENT.getInstance().AMERICIUM241, false); + + + //Custom Materials that will have standalone refinery processes + MaterialGenerator.generate(ELEMENT.STANDALONE.ADVANCED_NITINOL, false); + MaterialGenerator.generate(ELEMENT.STANDALONE.ASTRAL_TITANIUM); + MaterialGenerator.generate(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialGenerator.generate(ELEMENT.STANDALONE.HYPOGEN); + MaterialGenerator.generate(ELEMENT.STANDALONE.CHRONOMATIC_GLASS); + + //Custom Materials that are from Runescape + MaterialGenerator.generate(ELEMENT.STANDALONE.BLACK_METAL); + MaterialGenerator.generate(ELEMENT.STANDALONE.WHITE_METAL); + MaterialGenerator.generate(ELEMENT.STANDALONE.GRANITE, false, false); + MaterialGenerator.generate(ELEMENT.STANDALONE.RUNITE, false); + MaterialGenerator.generate(ELEMENT.STANDALONE.DRAGON_METAL, false); + + MISC_MATERIALS.run(); + + + //Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + MaterialGenerator.generate(ALLOY.TUNGSTEN_CARBIDE); + } + MaterialGenerator.generate(ALLOY.SILICON_CARBIDE); + MaterialGenerator.generate(ALLOY.ZIRCONIUM_CARBIDE); + MaterialGenerator.generate(ALLOY.TANTALUM_CARBIDE); + MaterialGenerator.generate(ALLOY.NIOBIUM_CARBIDE); + MaterialGenerator.generate(ALLOY.TUNGSTEN_TITANIUM_CARBIDE); + + //LFTR Fuel components + //MaterialGenerator.generate(MISC_MATERIALS.HYDROXIDE); //LFTR fuel component + //MaterialGenerator.generate(MISC_MATERIALS.AMMONIA); //LFTR fuel component + //MaterialGenerator.generate(MISC_MATERIALS.AMMONIUM); //LFTR fuel component + MaterialGenerator.generateNuclearDusts(FLUORIDES.AMMONIUM_BIFLUORIDE); //LFTR fuel component + MaterialGenerator.generateNuclearDusts(FLUORIDES.BERYLLIUM_HYDROXIDE); //LFTR fuel component + MaterialGenerator.generateNuclearDusts(FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE); //LFTR fuel component + + //Generate Fluorides + MaterialGenerator.generateNuclearDusts(FLUORIDES.BERYLLIUM_FLUORIDE); + MaterialGenerator.generateNuclearDusts(FLUORIDES.LITHIUM_FLUORIDE); + MaterialGenerator.generateNuclearDusts(FLUORIDES.THORIUM_TETRAFLUORIDE); + MaterialGenerator.generateNuclearDusts(FLUORIDES.THORIUM_HEXAFLUORIDE); + MaterialGenerator.generateNuclearDusts(FLUORIDES.URANIUM_TETRAFLUORIDE, false); + MaterialGenerator.generateNuclearDusts(FLUORIDES.URANIUM_HEXAFLUORIDE, false); + MaterialGenerator.generateNuclearDusts(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE); + //LFTR Fluoride outputs + MaterialGenerator.generateNuclearDusts(FLUORIDES.NEPTUNIUM_HEXAFLUORIDE); + MaterialGenerator.generateNuclearDusts(FLUORIDES.TECHNETIUM_HEXAFLUORIDE); + MaterialGenerator.generateNuclearDusts(FLUORIDES.SELENIUM_HEXAFLUORIDE); + + //Generate Reactor Fuel Salts + MaterialGenerator.generateNuclearDusts(NUCLIDE.LiFBeF2ZrF4U235); + MaterialGenerator.generateNuclearDusts(NUCLIDE.LiFBeF2ZrF4UF4); + MaterialGenerator.generateNuclearDusts(NUCLIDE.LiFBeF2ThF4UF4); + //MaterialGenerator.generateNuclearMaterial(NUCLIDE.Li2BeF4, false); + + //Generate some Alloys + + //Misc Alloys + MaterialGenerator.generate(ALLOY.ENERGYCRYSTAL); + MaterialGenerator.generate(ALLOY.BLOODSTEEL); + + MaterialGenerator.generate(ALLOY.ZERON_100); + //Tumbaga was the name given by Spaniards to a non-specific alloy of gold and copper + MaterialGenerator.generate(ALLOY.TUMBAGA); + //Potin is traditionally an alloy of bronze, tin and lead, with varying quantities of each possible + MaterialGenerator.generate(ALLOY.POTIN); + + //Staballoy & Tantalloy + MaterialGenerator.generate(ALLOY.STABALLOY); + MaterialGenerator.generate(ALLOY.TANTALLOY_60); + MaterialGenerator.generate(ALLOY.TANTALLOY_61); + + //Inconel + MaterialGenerator.generate(ALLOY.INCONEL_625); + MaterialGenerator.generate(ALLOY.INCONEL_690); + MaterialGenerator.generate(ALLOY.INCONEL_792); + + + //Steels + MaterialGenerator.generateDusts(ALLOY.EGLIN_STEEL_BASE); + MaterialGenerator.generate(ALLOY.EGLIN_STEEL); + MaterialGenerator.generate(ALLOY.MARAGING250); + MaterialGenerator.generate(ALLOY.MARAGING300); + MaterialGenerator.generate(ALLOY.MARAGING350); + MaterialGenerator.generate(ALLOY.AQUATIC_STEEL); + + MaterialGenerator.generate(ALLOY.NITINOL_60,true,false); + + //Composite Alloys + MaterialGenerator.generate(ALLOY.STELLITE); + MaterialGenerator.generate(ALLOY.TALONITE); + + //Hastelloy + MaterialGenerator.generate(ALLOY.HASTELLOY_W); + MaterialGenerator.generate(ALLOY.HASTELLOY_X); + MaterialGenerator.generate(ALLOY.HASTELLOY_C276); + MaterialGenerator.generate(ALLOY.HASTELLOY_N); + + //Incoloy + MaterialGenerator.generate(ALLOY.INCOLOY_020); + MaterialGenerator.generate(ALLOY.INCOLOY_DS); + MaterialGenerator.generate(ALLOY.INCOLOY_MA956); + + //Leagrisium + MaterialGenerator.generate(ALLOY.LEAGRISIUM); + + //Super Conductor + MaterialGenerator.generate(ALLOY.HG1223, false, false); + + //Generate Fictional Materials + if (!CORE.GTNH) { + MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM, false); + MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM_REFINED, false); + } + MaterialGenerator.generate(ALLOY.TRINIUM_TITANIUM); + MaterialGenerator.generate(ALLOY.TRINIUM_NAQUADAH, false); + MaterialGenerator.generate(ALLOY.TRINIUM_NAQUADAH_CARBON); + MaterialGenerator.generate(ALLOY.TRINIUM_REINFORCED_STEEL); + + //Top Tier Alloys + MaterialGenerator.generate(ALLOY.HELICOPTER); + MaterialGenerator.generate(ALLOY.LAFIUM); + MaterialGenerator.generate(ALLOY.CINOBITE); + MaterialGenerator.generate(ALLOY.PIKYONIUM); + MaterialGenerator.generate(ALLOY.ABYSSAL); + MaterialGenerator.generate(ALLOY.LAURENIUM); + MaterialGenerator.generate(ALLOY.BOTMIUM); + MaterialGenerator.generate(ALLOY.HS188A); + + + MaterialGenerator.generate(ALLOY.TITANSTEEL); + MaterialGenerator.generate(ALLOY.ARCANITE); + MaterialGenerator.generate(ALLOY.OCTIRON); + + MaterialGenerator.generate(ALLOY.BABBIT_ALLOY, false); + MaterialGenerator.generate(ALLOY.BLACK_TITANIUM, false); + + // High Level Bioplastic + MaterialGenerator.generate(ELEMENT.STANDALONE.RHUGNOR, false, false); + + + + + + + + + //Must be the final Alloy to Generate + MaterialGenerator.generate(ALLOY.QUANTUM); + + //Ores + MaterialGenerator.generateOreMaterial(FLUORIDES.FLUORITE); + MaterialGenerator.generateOreMaterial(ALLOY.KOBOLDITE); + GTplusplus_Everglades.GenerateOreMaterials(); + + + } catch (final Throwable r){ + Logger.INFO("Failed to Generated a Material. "+r.getMessage()); + //Utils.LOG_INFO("Failed to Generated a Material. "+r.getCause().getMessage()); + //Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[0].getMethodName()); + //Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[1].getMethodName()); + r.printStackTrace(); + //System.exit(1); + } + + //TC Style Shards, for use in making energy crystal mix. + //A dull shard, able to be infused with an element. + shardDull = new BaseItemTCShard("Drained", Utils.rgbtoHexValue(75, 75, 75), "Can be infused to create a magical shard.", "Obtained from Mining Stone/SandStone, Chopping Logs or Shovelling Dirt."); + + //Generates four elemental shards when TC is not installed. + if (!LoadedMods.Thaumcraft){ + shardAer = new BaseItemTCShard("Aer", Utils.rgbtoHexValue(225, 225, 5)); + shardIgnis = new BaseItemTCShard("Ignis", Utils.rgbtoHexValue(255, 5, 5)); + shardTerra = new BaseItemTCShard("Terra", Utils.rgbtoHexValue(5, 255, 5)); + shardAqua = new BaseItemTCShard("Aqua", Utils.rgbtoHexValue(5, 5, 255)); + } + else { + shardAer = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Air Shard", 0, 1).getItem(); + shardIgnis = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Fire Shard", 1, 1).getItem(); + shardAqua = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Warer Shard", 2, 1).getItem(); + shardTerra = ItemUtils.getItemStackWithMeta(LoadedMods.Thaumcraft, "Thaumcraft:ItemShard", "Earth Shard", 3, 1).getItem(); + } + //Generates a set of four special dusts to be used in my recipes. + dustAer = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().AER, true)[0]; + dustIgnis = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().IGNIS, true)[0]; + dustTerra = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().TERRA, true)[0]; + dustAqua = ItemUtils.generateSpecialUseDusts(ELEMENT.getInstance().AQUA, true)[0]; + + //Nuclear Fuel Dusts + dustLithiumCarbonate = ItemUtils.generateSpecialUseDusts("LithiumCarbonate", "Lithium Carbonate", "Li2CO3", Utils.rgbtoHexValue(240, 240, 240))[0]; //https://en.wikipedia.org/wiki/Lithium_carbonate + dustLithiumPeroxide = ItemUtils.generateSpecialUseDusts("LithiumPeroxide", "Lithium Peroxide", "Li2O2", Utils.rgbtoHexValue(250, 250, 250))[0]; //https://en.wikipedia.org/wiki/Lithium_peroxide + dustLithiumHydroxide = ItemUtils.generateSpecialUseDusts("LithiumHydroxide", "Lithium Hydroxide", "LiOH", Utils.rgbtoHexValue(250, 250, 250))[0]; //https://en.wikipedia.org/wiki/Lithium_hydroxide + + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1)) && !LoadedMods.IHL){ + dustQuicklime = ItemUtils.generateSpecialUseDusts("Quicklime", "Quicklime", "CaO", Utils.rgbtoHexValue(255, 255, 175))[0]; //https://en.wikipedia.org/wiki/Calcium_oxide + } + dustCalciumHydroxide = ItemUtils.generateSpecialUseDusts("CalciumHydroxide", "Hydrated Lime", "Ca(OH)2", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_hydroxide + dustCalciumCarbonate = ItemUtils.generateSpecialUseDusts("CalciumCarbonate", "Calcium Carbonate", "CaCO3", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_carbonate + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGypsum", 1) == null) || (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustCalciumSulfate", 1) == null)){ + dustCalciumSulfate = ItemUtils.generateSpecialUseDusts("Gypsum", "Calcium Sulfate (Gypsum)", "CaSO4", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_sulfate + GT_OreDictUnificator.registerOre("dustCalciumSulfate", ItemUtils.getSimpleStack(dustCalciumSulfate)); + } + else { + GT_OreDictUnificator.registerOre("dustCalciumSulfate", ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGypsum", 1)); + } + dustLi2CO3CaOH2 = ItemUtils.generateSpecialUseDusts("Li2CO3CaOH2", "Li2CO3 + Ca(OH)2 Compound", "Li2CO3CaOH2", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/Calcium_carbonate + MaterialUtils.generateSpecialDustAndAssignToAMaterial(FLUORIDES.SODIUM_FLUORIDE, false); + //FLiBe Fuel Compounds + dustLi2BeF4 = ItemUtils.generateSpecialUseDusts("Li2BeF4", "Lithium Tetrafluoroberyllate Fuel Compound", "Li2BeF4", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/FLiBe + Material.registerComponentForMaterial(NUCLIDE.Li2BeF4, OrePrefixes.dust, ItemUtils.getSimpleStack(dustLi2BeF4)); + //fluidFLiBeSalt = ("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}, 0); + //fluidFLiBeSalt = FluidUtils.addGTFluidNoPrefix("Li2BeF4", "Lithium Tetrafluoroberyllate", new short[]{255, 255, 255, 100}, 0, 743, null, CI.emptyCells(1), 1000, true); + //fluidFLiBeSaltBurnt = FluidUtils.addGTFluidNoPrefix("Li2BeF2UF4", "Li2BeF2UF4", new short[]{50, 255, 50, 100}, 0, 743, null, CI.emptyCells(1), 1000, true); + + // LFTR Core Fluid Processing + //fluidLftrCore1 = FluidUtils.addGTFluidNoPrefix("LiBeF2UF4FP", "LiBeF2UF4FP", new short[]{110, 255, 110, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); + //fluidLftrCore2 = FluidUtils.addGTFluidNoPrefix("UF6F2FP", "UF6F2FP", new short[]{150, 255, 150, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); + //fluidLftrCore3 = FluidUtils.addGTFluidNoPrefix("LiFBeF2", "LiFBeF2", new short[]{100, 255, 50, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); + //fluidLftrCore4 = FluidUtils.addGTFluidNoPrefix("LiFBeF2UF4", "LiFBeF2UF4", new short[]{50, 255, 100, 100}, 0, 800, null, CI.emptyCells(1), 1000, true); + // LFTR Blanket Fluid Processing + //fluidLftrBlanket1 = FluidUtils.addGTFluidNoPrefix("LiFThF4", "LiFThF4", new short[]{50, 150, 255, 50}, 0, 500, null, CI.emptyCells(1), 1000, true); + //fluidLftrBlanket2 = FluidUtils.addGTFluidNoPrefix("LiFBeF2ThF4", "LiFBeF2ThF4", new short[]{100, 150, 100, 100}, 0, 500, null, CI.emptyCells(1), 1000, true); + //fluidLftrBlanket3 = FluidUtils.addGTFluidNoPrefix("UF6F2", "UF6F2", new short[]{10, 150, 10, 100}, 0, 500, null, CI.emptyCells(1), 1000, true); + fluidNuclearWaste = FluidUtils.addGTFluidNoPrefix("nuclear.waste", "Nuclear Waste", new short[]{10, 250, 10, 100}, 0, 1000, null, CI.emptyCells(1), 1000, true); + + + //LFTR Control Circuit + itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Control Circuit", AddToCreativeTab.tabMisc, 1, 0, new String[] {"Keeps Multiblocks Stable"}, EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null); + + if (CORE.ConfigSwitches.enableMachine_Pollution) { + itemBasicTurbine = new ItemBasicScrubberTurbine(); + } + + //Zirconium + //Cinter Pellet. + itemZirconiumChlorideCinterPellet = new CoreItem("itemZirconiumPellet", "Zirconium Pellet ["+StringUtils.subscript("ZrCl4")+"]", tabMisc).setTextureName(CORE.MODID + ":itemShard"); + GT_OreDictUnificator.registerOre("pelletZirconium", new ItemStack(itemZirconiumChlorideCinterPellet)); + //Zirconium Chloride + dustZrCl4 = ItemUtils.generateSpecialUseDusts("ZrCl4", "ZrCl4", "ZrCl4", Utils.rgbtoHexValue(180, 180, 180))[0]; //http://www.iaea.org/inis/collection/NCLCollectionStore/_Public/39/036/39036750.pdf + dustCookedZrCl4 = ItemUtils.generateSpecialUseDusts("CookedZrCl4", "Cooked ZrCl4", "ZrCl4", Utils.rgbtoHexValue(180, 180, 180))[0]; //http://www.iaea.org/inis/collection/NCLCollectionStore/_Public/39/036/39036750.pdf + + //Zirconium Tetrafluoride + /*GT_OreDictUnificator.registerOre("cellZrF4", ItemUtils.getItemStackOfAmountFromOreDict("cellZirconiumTetrafluoride", 1)); + GT_OreDictUnificator.registerOre("dustZrF4", ItemUtils.getItemStackOfAmountFromOreDict("dustZirconiumTetrafluoride", 1));*/ + //GT_OreDictUnificator.registerOre("cellZrF4", ItemUtils.getItemStackOfAmountFromOreDict("cellZirconiumTetrafluoride", 1)); + //GT_OreDictUnificator.registerOre("dustZrF4", ItemUtils.getItemStackOfAmountFromOreDict("dustZirconiumTetrafluoride", 1)); + fluidZrF4 = FluidUtils.generateFluidNoPrefix("ZirconiumTetrafluoride", "Zirconium Tetrafluoride", 500, new short[]{170, 170, 140, 100}); //https://en.wikipedia.org/wiki/Zirconium_tetrafluoride + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.setFluid(fluidZrF4); + + //Coolant Salt + //NaBF4 - NaF - 621C + //dustNaBF4NaF = ItemUtils.generateSpecialUseDusts("NaBF4NaF", "NaBF4NaF", Utils.rgbtoHexValue(45, 45, 90))[0]; //https://en.wikipedia.org/wiki/Zirconium_tetrafluoride + + + //Load Tree Farmer + if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ //https://en.wikipedia.org/wiki/UAN + dustFertUN18 = ItemUtils.generateSpecialUseDusts("UN18Fertiliser", "UN-18 Fertiliser", Utils.rgbtoHexValue(60, 155, 60))[0]; + dustFertUN32 = ItemUtils.generateSpecialUseDusts("UN32Fertiliser", "UN-32 Fertiliser", Utils.rgbtoHexValue(55, 190, 55))[0]; + + ItemStack temp1 = null; + ItemStack temp2 = null; + + if (LoadedMods.IndustrialCraft2){ + temp1 = ItemUtils.getCorrectStacktype("IC2:itemFertilizer", 1); + } + if (LoadedMods.Forestry){ + temp2 = ItemUtils.getCorrectStacktype("Forestry:fertilizerCompound", 1); + } + if (temp1 != null){ + FluidUtils.generateFluidNonMolten("Fertiliser", "Fertiliser", 32, new short[]{45, 170, 45, 100}, temp1, temp2, true); + } + FluidUtils.generateFluidNonMolten("UN32Fertiliser", "UN-32 Fertiliser", 24, new short[]{55, 190, 55, 100}, null, null, true); + FluidUtils.generateFluidNonMolten("UN18Fertiliser", "UN-18 Fertiliser", 22, new short[]{60, 155, 60, 100}, null, null, true); + + /*GT_Values.RA.addMixerRecipe( + arg0, //Item In + arg1, + arg2, + arg3, + arg4, //Fluid in + arg5, //Fluid Out + arg6, //Item out + arg7, //Eu + arg8); //Time + */ + + } + + //Juice + FluidUtils.generateFluidNonMolten("RaisinJuice", "Raisin Juice", 2, new short[]{51, 0, 51, 100}, ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foodRaisins", 1), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("fruitRaisins", 1), 50, true); + + + //Test items + metaItem2 = new BaseEuItem(); + metaItem2.registerItem(0, EnumChatFormatting.BLACK+"Test Item 0", 0, 0, "I am 0."); + metaItem2.registerItem(1, EnumChatFormatting.GREEN+"Test Item 1", 1006346000, 1, "I Hold EU 1.", 500); + metaItem2.registerItem(2, EnumChatFormatting.GOLD+"Test Item 2", 1004630000, 2, "I Hold EU 2.", 8000); + metaItem2.registerItem(3, "Test Item 3", 1000765000, 4, "I Hold EU 3.", 32000); + metaItem2.registerItem(4, "Whirlygig", 1043644000, (short) 5, "Spin me right round.", EnumRarity.rare, EnumChatFormatting.DARK_GREEN, true); + metaItem2.registerItem(5, "Whirlygig 2", 2124867000, (short) 7, "Spin me right round.", EnumRarity.uncommon, EnumChatFormatting.RED, true); + + toolGregtechPump = new GregtechPump(); + toolGregtechPump.registerPumpType(0, "Simple Hand Pump", 0, 0); + toolGregtechPump.registerPumpType(1, "Advanced Hand Pump", 32000, 1); + toolGregtechPump.registerPumpType(2, "Super Hand Pump", 128000, 2); + toolGregtechPump.registerPumpType(3, "Ultimate Hand Pump", 512000, 3); + + //Create Multi-tools + //ItemsMultiTools.load(); + + //Xp Fluids - Dev + if (!FluidRegistry.isFluidRegistered("mobessence")){ + FluidUtils.generateFluidNoPrefix("mobessence", "mobessence", 0, new short[]{125, 175, 125, 100}); + } + if (!FluidRegistry.isFluidRegistered("xpjuice")){ + FluidUtils.generateFluidNoPrefix("xpjuice", "xpjuice", 0, new short[]{50, 150, 50, 100}); + } + + //Just an unusual plate needed for some black magic. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateClay", 1) == null){ + itemPlateClay = new BaseItemPlate(NONMATERIAL.CLAY); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){ + itemDoublePlateClay = new BaseItemPlateDouble(NONMATERIAL.CLAY); + } + + //Need this for Mutagenic Frames + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){ + itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235); + } + + //A small gear needed for wizardry. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){ + itemSmallWroughtIronGear = new BaseItemSmallGear(NONMATERIAL.WROUGHT_IRON); + } + //Krypton Processing + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1) == null){ + itemHotTitaniumIngot = ItemUtils.getSimpleStack(new BaseItemIngot(ELEMENT.getInstance().TITANIUM, ComponentTypes.HOTINGOT)); + } + else { + itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1); + } + + //Need this for Laurenium + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIndium", 1) == null){ + itemDustIndium = new BaseItemDust(ELEMENT.getInstance().INDIUM); + } + + //Industrial Diamonds + itemExquisiteIndustrialDiamond = new CoreItem("IndustrialDiamondExquisite", "High Quality Industrial Diamond", tabMisc); + ItemStack tempStack = itemExquisiteIndustrialDiamond.getStack(); + ItemUtils.addItemToOreDictionary(tempStack, "gemDiamond"); + ItemUtils.addItemToOreDictionary(tempStack, "craftingIndustrialDiamond"); + ItemUtils.addItemToOreDictionary(tempStack, "gemExquisiteDiamond"); + ItemUtils.addItemToOreDictionary(tempStack, "craftingExquisiteIndustrialDiamond"); + + //Custom GT++ Crafting Components + + //Springs + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL); + + //Small Springs + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM); + + //Fine Wire + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM); + + //Dense Plates + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE); + + + + + //Special Sillyness + if (true) { + + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateSodium", 1) == null){ + new BaseItemPlate(ELEMENT.getInstance().SODIUM); + } + + Material meatRaw = NONMATERIAL.MEAT; + // A plate of Meat. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateMeatRaw", 1) == null){ + itemPlateRawMeat = new BaseItemPlate(meatRaw); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(itemPlateRawMeat), 100); + } + // A Block of Meat. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("blockMeatRaw", 1) == null){ + blockRawMeat = new BlockBaseModular(meatRaw, BlockTypes.STANDARD); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(blockRawMeat), 900); + } + } + + + // A plate of Vanadium. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){ + itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM); + } + + //A plate of Lithium. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){ + itemPlateLithium = new BaseItemPlate(ELEMENT.getInstance().LITHIUM); + } + + //A plate of Europium. + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ + itemPlateEuropium = new BaseItemPlate(ELEMENT.getInstance().EUROPIUM); + } + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ + itemDoublePlateEuropium = new BaseItemPlateDouble(ELEMENT.getInstance().EUROPIUM); + } + + //Tumbaga Mix (For Simple Crafting) + dustTumbagaMix = ItemUtils.generateSpecialUseDusts("MixTumbaga", "Tumbaga Mix", "Au2Cu", Utils.rgbtoHexValue(255, 150, 80))[0]; + + /* + * Decayable Materials + */ + + dustNeptunium238 = new DustDecayable("dustNeptunium238", Utils.rgbtoHexValue(175, 240, 75), 50640, new String[] {""+StringUtils.superscript("238Np"), "Result: Plutonium 238 ("+StringUtils.superscript("238Pu")+")"}, ELEMENT.getInstance().PLUTONIUM238.getDust(1).getItem(), 5); + dustDecayedRadium226 = ItemUtils.generateSpecialUseDusts("DecayedRadium226", "Decayed Radium-226", "Contains Radon ("+StringUtils.superscript("222Rn")+")", ELEMENT.getInstance().RADIUM.getRgbAsHex())[0]; + dustRadium226 = new DustDecayable("dustRadium226", ELEMENT.getInstance().RADIUM.getRgbAsHex(), 90000, new String[] {""+StringUtils.superscript("226Ra"), "Result: Radon ("+StringUtils.superscript("222Rn")+")"}, ItemUtils.getSimpleStack(dustDecayedRadium226).getItem(), 5); + dustProtactinium233 = new DustDecayable("dustProtactinium233", ELEMENT.getInstance().PROTACTINIUM.getRgbAsHex(), 32000, new String[] {""+StringUtils.superscript("233Pa"), "Result: Uranium 233("+StringUtils.superscript("233U")+")"}, ELEMENT.getInstance().URANIUM233.getDust(1).getItem(), 6); + dustTechnetium99 = new DustDecayable("dustTechnetium99", ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(), 164500, new String[] {""+StringUtils.superscript("99Mo"), "Result: Ruthenium 99("+StringUtils.superscript("99Ru")+")"}, ELEMENT.getInstance().RUTHENIUM.getDust(1).getItem(), 4); + dustTechnetium99M = new DustDecayable("dustTechnetium99M", ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(), 8570, new String[] {""+StringUtils.superscript("99áµTc"), "Result: Technicium 99 ("+StringUtils.superscript("99Tc")+")"}, dustTechnetium99, 4); + dustMolybdenum99 = new DustDecayable("dustMolybdenum99", ELEMENT.getInstance().MOLYBDENUM.getRgbAsHex(), 16450, new String[] {""+StringUtils.superscript("99Mo"), "Result: Technicium 99áµ ("+StringUtils.superscript("99áµTc")+")"}, dustTechnetium99M, 4); + + itemIonParticleBase = new IonParticles(); + itemStandarParticleBase = new StandardBaseParticles(); + + if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { + Item a8kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_8k", "Large Volumetric Flask", 8000); + Item a64kFlask = VolumetricFlaskHelper.generateNewFlask("Volumetric_Flask_32k", "Gigantic Volumetric Flask", 32000); + GregtechItemList.VOLUMETRIC_FLASK_8k.set(a8kFlask); + GregtechItemList.VOLUMETRIC_FLASK_32k.set(a64kFlask); + } + + itemBoilerChassis = new ItemBoilerChassis(); + itemDehydratorCoilWire = new ItemDehydratorCoilWire(); + itemDehydratorCoil = new ItemDehydratorCoil(); + + itemAirFilter = new ItemAirFilter(); + itemLavaFilter = new ItemLavaFilter(); + + itemGrindleTablet = new BaseItemGrindle(); + itemDragonJar = new ItemEntityCatcher(); + + itemControlCore = new ItemControlCore(); + + //Chemistry + new CoalTar(); + new RocketFuels(); + + //Nuclear Processing + new NuclearChem(); + + //Farm Animal Fun + new AgriculturalChem(); + + //General Chemistry + new GenericChem(); + + // Milled Ore Processing + new MilledOreProcessing(); + + //Bombs + itemBombCasing = new CoreItem("itemBombCasing", "Bomb Casing", tabMisc); + itemBombCasing.setTextureName(CORE.MODID + ":bomb_casing"); + itemBombUnf = new CoreItem("itemBombUnf", "Bomb (unf)", tabMisc); + itemBombUnf.setTextureName(CORE.MODID + ":bomb_casing"); + itemDetCable = new CoreItem("itemDetCable", "Det. Cable", tabMisc); + itemDetCable.setTextureName("string"); + itemBomb = new ItemThrowableBomb(); + + //Only used for debugging. + /*if (CORE.DEVENV) { + new ConnectedBlockFinder(); + }*/ + + //Misc Items + @SuppressWarnings("unused") + Item tI; + tI = new BaseItemMisc("Chilly", new short[]{0,64,196}, 32, MiscTypes.POTION, new String[]{"It's Blue"}); + tI = new BaseItemMisc("4000DC's", new short[]{180,100,30}, 1, MiscTypes.BIGKEY, new String[]{"It opens things."}); + tI = new BaseItemMisc("Dull", new short[]{64,64,64}, 64, MiscTypes.GEM, null); + tI = new BaseItemMisc("Forest", new short[]{130,164,96}, 64, MiscTypes.MUSHROOM, new String[]{"You Found this on the ground.", "Definitely not sure if it's worth eating."}); + + //Baubles + if (LoadedMods.Baubles){ + tI = new HealthBoostBauble(); + itemModularBauble = new ModularBauble(); + } + + //EnderIO Resources + if ((LoadedMods.EnderIO || LOAD_ALL_CONTENT)){ + Logger.INFO("EnderIO Found - Loading Resources."); + //Enderio Dusts + itemDustSoularium = ItemUtils.generateSpecialUseDusts("Soularium", "Soularium", MaterialEIO.SOULARIUM.vChemicalFormula, MaterialEIO.SOULARIUM.getRgbAsHex())[0]; + itemDustRedstoneAlloy = ItemUtils.generateSpecialUseDusts("RedstoneAlloy", "Redstone Alloy", MaterialEIO.REDSTONE_ALLOY.vChemicalFormula, MaterialEIO.REDSTONE_ALLOY.getRgbAsHex())[0]; + itemDustElectricalSteel = ItemUtils.generateSpecialUseDusts("ElectricalSteel", "Electrical Steel", MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula, MaterialEIO.ELECTRICAL_STEEL.getRgbAsHex())[0]; + itemDustPulsatingIron = ItemUtils.generateSpecialUseDusts("PulsatingIron", "Pulsating Iron", MaterialEIO.PULSATING_IRON.vChemicalFormula, MaterialEIO.PULSATING_IRON.getRgbAsHex())[0]; + itemDustEnergeticAlloy = ItemUtils.generateSpecialUseDusts("EnergeticAlloy", "Energetic Alloy", MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula, MaterialEIO.ENERGETIC_ALLOY.getRgbAsHex())[0]; + itemDustVibrantAlloy = ItemUtils.generateSpecialUseDusts("VibrantAlloy", "Vibrant Alloy", MaterialEIO.VIBRANT_ALLOY.vChemicalFormula, MaterialEIO.VIBRANT_ALLOY.getRgbAsHex())[0]; + itemDustConductiveIron = ItemUtils.generateSpecialUseDusts("ConductiveIron", "Conductive Iron", MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula, MaterialEIO.CONDUCTIVE_IRON.getRgbAsHex())[0]; + + //EnderIO Plates + itemPlateSoularium = ItemUtils.generateSpecialUsePlate("Soularium", "Soularium", MaterialEIO.SOULARIUM.vChemicalFormula, MaterialEIO.SOULARIUM.getRgbAsHex(), 0); + itemPlateRedstoneAlloy = ItemUtils.generateSpecialUsePlate("RedstoneAlloy", "Redstone Alloy", MaterialEIO.REDSTONE_ALLOY.vChemicalFormula, MaterialEIO.REDSTONE_ALLOY.getRgbAsHex(), 0); + itemPlateElectricalSteel = ItemUtils.generateSpecialUsePlate("ElectricalSteel", "Electrical Steel", MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula, MaterialEIO.ELECTRICAL_STEEL.getRgbAsHex(), 0); + itemPlatePulsatingIron = ItemUtils.generateSpecialUsePlate("PhasedIron", "Phased Iron", MaterialEIO.PULSATING_IRON.vChemicalFormula, MaterialEIO.PULSATING_IRON.getRgbAsHex(), 0); + itemPlateEnergeticAlloy = ItemUtils.generateSpecialUsePlate("EnergeticAlloy", "Energetic Alloy", MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula, MaterialEIO.ENERGETIC_ALLOY.getRgbAsHex(), 0); + itemPlateVibrantAlloy = ItemUtils.generateSpecialUsePlate("VibrantAlloy", "Vibrant Alloy", MaterialEIO.VIBRANT_ALLOY.vChemicalFormula, MaterialEIO.VIBRANT_ALLOY.getRgbAsHex(), 0); + itemPlateConductiveIron = ItemUtils.generateSpecialUsePlate("ConductiveIron", "Conductive Iron", MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula, MaterialEIO.CONDUCTIVE_IRON.getRgbAsHex(), 0); + + //Register dumb naming conventions - Who chose fucking phased Iron/Gold? + GT_OreDictUnificator.registerOre("dustPhasedGold", ItemUtils.getSimpleStack(itemDustVibrantAlloy)); + GT_OreDictUnificator.registerOre("platePhasedGold", ItemUtils.getSimpleStack(itemPlateVibrantAlloy)); + GT_OreDictUnificator.registerOre("dustPhasedIron", ItemUtils.getSimpleStack(itemDustPulsatingIron)); + GT_OreDictUnificator.registerOre("platePhasedIron", ItemUtils.getSimpleStack(itemPlatePulsatingIron)); + GT_OreDictUnificator.registerOre("blockVibrantAlloy", ItemUtils.getItemStackOfAmountFromOreDict("blockPhasedGold", 1)); + + CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getPlate(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(144), 16, 4*9); + CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getIngot(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(144), 16, 4*9); + CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getNugget(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(16), 16, 4); + CORE.RA.addFluidExtractionRecipe(MaterialEIO.REDSTONE_ALLOY.getBlock(1), MaterialEIO.REDSTONE_ALLOY.getFluidStack(1294), 16, 4*9*9); + + } + else { + /*Logger.WARNING("EnderIO not Found - Generating our own Resources."); + MaterialGenerator.generate(MaterialEIO.CONDUCTIVE_IRON); + MaterialGenerator.generate(MaterialEIO.PULSATING_IRON); + MaterialGenerator.generate(MaterialEIO.REDSTONE_ALLOY); + MaterialGenerator.generate(MaterialEIO.SOULARIUM); + MaterialGenerator.generate(MaterialEIO.ELECTRICAL_STEEL); + MaterialGenerator.generate(MaterialEIO.ENERGETIC_ALLOY); + MaterialGenerator.generate(MaterialEIO.VIBRANT_ALLOY); */ + } + + //Big Reactors + if (LoadedMods.Big_Reactors|| LOAD_ALL_CONTENT){ + Logger.INFO("BigReactors Found - Loading Resources."); + //Item Init + itemPlateBlutonium = ItemUtils.generateSpecialUsePlate("Blutonium", "Blutonium", new short[]{0, 0, 255}, 0); + itemPlateCyanite = ItemUtils.generateSpecialUsePlate("Cyanite", "Cyanite", new short[]{0, 191, 255}, 0); + itemPlateLudicrite = ItemUtils.generateSpecialUsePlate("Ludicrite", "Ludicrite", new short[]{167, 5, 179}, 0); + } + else { + Logger.WARNING("BigReactors not Found - Skipping Resources."); + } + + //Thaumcraft + if ((LoadedMods.Thaumcraft|| LOAD_ALL_CONTENT) && !CORE.GTNH){ + Logger.INFO("Thaumcraft Found - Loading Resources."); + //Item Init + try { + ItemUtils.getItemForOreDict("Thaumcraft:ItemResource", "ingotVoidMetal", "Void Metal Ingot", 16); + itemPlateVoidMetal = ItemUtils.generateSpecialUsePlate("Void", "Void", new short[]{82, 17, 82}, 0); + GT_OreDictUnificator.registerOre("plateVoidMetal", new ItemStack(ModItems.itemPlateVoidMetal)); + } catch (final NullPointerException e){} + + } + else { + Logger.WARNING("Thaumcraft not Found - Skipping Resources."); + } + + //Pneumaticraft + if (LoadedMods.PneumaticCraft|| LOAD_ALL_CONTENT){ + Logger.INFO("PneumaticCraft Found - Loading Resources."); + //Item Init + itemPlateCompressedIron = ItemUtils.generateSpecialUsePlate("CompressedIron", "Compressed Iron", new short[]{128, 128, 128}, 0); + } + else { + Logger.WARNING("PneumaticCraft not Found - Skipping Resources."); + } + + //Simply Jetpacks + if (LoadedMods.Simply_Jetpacks|| LOAD_ALL_CONTENT){ + Logger.INFO("SimplyJetpacks Found - Loading Resources."); + //Item Init + itemPlateEnrichedSoularium = new RarityUncommon().setUnlocalizedName("itemPlateEnrichedSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium"); + //Registry + GameRegistry.registerItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium"); + } + else { + Logger.WARNING("SimplyJetpacks not Found - Skipping Resources."); + } + + //rfTools + if (LoadedMods.RFTools|| LOAD_ALL_CONTENT){ + Logger.INFO("rfTools Found - Loading Resources."); + //Item Init + itemPlateDimensionShard = ItemUtils.generateSpecialUsePlate("DimensionShard", "Dimensional Shard", new short[]{170, 230, 230}, 0); + } + else { + Logger.WARNING("rfTools not Found - Skipping Resources."); + } + + //IC2 Exp + if (LoadedMods.IndustrialCraft2|| LOAD_ALL_CONTENT){ + Logger.INFO("IndustrialCraft2 Found - Loading Resources."); + + //Baubles Mod Test + try { + final Class baublesTest = ReflectionUtils.getClass("baubles.api.IBauble"); + if (baublesTest != null){ + COMPAT_Baubles.run(); + } + else { + Logger.INFO("Baubles Not Found - Skipping Resources."); + } + } catch(final Throwable T){ + Logger.INFO("Baubles Not Found - Skipping Resources."); + } + } + else { + Logger.WARNING("IndustrialCraft2 not Found - Skipping Resources."); + } + + + //Special Item Handling Case + if (ConfigSwitches.enableAlternativeBatteryAlloy) { + //ModItems.itemIngotBatteryAlloy = new BaseItemIngot("itemIngotBatteryAlloy", "Battery Alloy", new short[]{35, 228, 141}, 0); TODO + ModItems.itemPlateBatteryAlloy = ItemUtils.generateSpecialUsePlate("BatteryAlloy", "Battery Alloy", new short[]{35, 228, 141}, 0); + + } + + + //UtilsItems.generateSpawnEgg("ic2", "boatcarbon", Utils.generateSingularRandomHexValue(), Utils.generateSingularRandomHexValue()); + + HANDLER_COFH.initItems(); + + /* + * Misc Items + */ + + //Staballoy Equipment + itemStaballoyPickaxe = new StaballoyPickaxe("itemStaballoyPickaxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools); + GameRegistry.registerItem(itemStaballoyPickaxe, itemStaballoyPickaxe.getUnlocalizedName()); + itemStaballoyAxe = new StaballoyAxe("itemStaballoyAxe", STABALLOY).setCreativeTab(AddToCreativeTab.tabTools); + GameRegistry.registerItem(itemStaballoyAxe, itemStaballoyAxe.getUnlocalizedName()); + + //Sandstone Hammer + itemSandstoneHammer = new SandstoneHammer("itemSandstoneHammer").setCreativeTab(AddToCreativeTab.tabTools); + GameRegistry.registerItem(itemSandstoneHammer, itemSandstoneHammer.getUnlocalizedName()); + + //Buffer Cores! + Item itemBufferCore; + for(int i=1; i<=10; i++){ + //Utils.LOG_INFO(""+i); + itemBufferCore = new BufferCore("itemBufferCore", i).setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerItem(itemBufferCore, itemBufferCore.getUnlocalizedName()); + //System.out.println("Buffer Core registration count is: "+i); + } + + itemPLACEHOLDER_Circuit = new Item().setUnlocalizedName("itemPLACEHOLDER_Circuit").setTextureName(CORE.MODID + ":itemPLACEHOLDER_Circuit"); + GameRegistry.registerItem(itemPLACEHOLDER_Circuit, "itemPLACEHOLDER_Circuit"); + + //ItemBlockGtFrameBox = new ItemBlockGtFrameBox(ModBlocks.blockGtFrameSet1); + //GameRegistry.registerItem(ItemBlockGtFrameBox, "itemGtFrameBoxSet1"); + + itemCustomBook = new ItemBaseBook(); + registerCustomTokens(); + } + + public static void registerCustomTokens() { + itemGenericToken.register(0, "BitCoin", 16, "Can be used on the dark web"); + itemGenericToken.register(1, "Hand Pump Trade Token I", 1, "Craft into a Tier I Hand pump"); + itemGenericToken.register(2, "Hand Pump Trade Token II", 1, "Craft into a Tier II Hand pump"); + itemGenericToken.register(3, "Hand Pump Trade Token III", 1, "Craft into a Tier III Hand pump"); + itemGenericToken.register(4, "Hand Pump Trade Token IV", 1, "Craft into a Tier IV Hand pump"); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseEuItem.java b/src/main/java/gtPlusPlus/core/item/base/BaseEuItem.java new file mode 100644 index 0000000000..b4988136c0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseEuItem.java @@ -0,0 +1,582 @@ +package gtPlusPlus.core.item.base; + +import static gregtech.api.enums.GT_Values.*; + +import java.util.*; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.objects.ItemData; +import gregtech.api.util.*; + +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import ic2.api.item.*; + +public class BaseEuItem extends Item implements ISpecialElectricItem, IElectricItemManager { + + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + private final HashMap>> mItemBehaviors = new HashMap<>(); + public final short mOffset, mItemAmount; + public final BitSet mEnabledItems; + public final BitSet mVisibleItems; + public final IIcon[][] mIconList; + /** The unlocalized name of this item. */ + private String unlocalizedName; + + private final ArrayList> rarity = new ArrayList<>(); + private final ArrayList> descColour = new ArrayList<>(); + private final ArrayList> itemName = new ArrayList<>(); + private final ArrayList> itemDescription = new ArrayList<>(); + private final ArrayList> hasEffect = new ArrayList<>(); + + public final HashMap mElectricStats = new HashMap<>(); + public final HashMap mBurnValues = new HashMap<>(); + + public BaseEuItem() { + this("MU-metaitem.02", AddToCreativeTab.tabOther, (short) 1000, (short) 31766); + } + + public BaseEuItem(final String unlocalizedName, final CreativeTabs creativeTab, final short aOffset, final short aItemAmount) { + this.mEnabledItems = new BitSet(aItemAmount); + this.mVisibleItems = new BitSet(aItemAmount); + this.mOffset = (short) Math.min(32766, aOffset); + this.mItemAmount = (short) Math.min(aItemAmount, 32766 - this.mOffset); + this.mIconList = new IIcon[aItemAmount][1]; + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(1); + GameRegistry.registerItem(this, unlocalizedName); + } + + + public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, final String description) { + this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, EnumChatFormatting.GRAY, false); + } + + public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, final String description, final int burnTime) { + this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, EnumChatFormatting.GRAY, false); + this.setBurnValue(id, burnTime); + } + + + public void registerItem(final int id, final String localizedName, final long euStorage, final short tier, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect) { + this.addItem(id, localizedName, EnumChatFormatting.YELLOW+"Electric", new Object[]{}); + this.setElectricStats(this.mOffset + id, euStorage, GT_Values.V[tier], tier, -3L, true); + this.rarity.add(new Pair<>(id, regRarity)); + this.itemName.add(new Pair<>(id, localizedName)); + this.itemDescription.add(new Pair<>(id, description)); + this.descColour.add(new Pair<>(id, colour)); + this.hasEffect.add(new Pair<>(id, Effect)); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + if (this.rarity.get(par1ItemStack.getItemDamage()-this.mOffset) != null) { + return this.rarity.get(par1ItemStack.getItemDamage()-this.mOffset).getValue(); + } + return EnumRarity.common; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + if (this.hasEffect.get(par1ItemStack.getItemDamage()-this.mOffset) != null) { + return this.hasEffect.get(par1ItemStack.getItemDamage()-this.mOffset).getValue(); + } + return false; + } + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, final boolean aF3_H) { + //aList.add("Meta: "+(aStack.getItemDamage()-mOffset)); + if ((this.descColour.get(aStack.getItemDamage()-this.mOffset) != null) && (this.itemDescription.get(aStack.getItemDamage()-this.mOffset) != null)) { + aList.add(this.descColour.get(aStack.getItemDamage()-this.mOffset).getValue()+this.itemDescription.get(aStack.getItemDamage()-this.mOffset).getValue()); + } + final String tKey = this.getUnlocalizedName(aStack) + ".tooltip", tString = GT_LanguageManager.getTranslation(tKey); + if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) { + aList.add(tString); + } + final Long[] tStats = this.getElectricStats(aStack); + if (tStats != null) { + if (tStats[3] > 0) { + aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " + (tStats[2] >= 0 ? tStats[2] : 0) + EnumChatFormatting.GRAY); + } else { + final long tCharge = this.getRealCharge(aStack); + if ((tStats[3] == -2) && (tCharge <= 0)) { + aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY); + } else { + aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY); + } + } + } + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final IItemBehaviour tBehavior : tList) { + aList = tBehavior.getAdditionalToolTips(this, aList, aStack); + } + } + } + + + @Override + public final Item getChargedItem(final ItemStack itemStack) { + return this; + } + + @Override + public final Item getEmptyItem(final ItemStack itemStack) { + return this; + } + + @Override + public final double getMaxCharge(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + return Math.abs(tStats[0]); + } + + @Override + public final double getTransferLimit(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + return Math.max(tStats[1], tStats[3]); + } + + @Override + public final int getTier(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + return (int) (tStats == null ? Integer.MAX_VALUE : tStats[2]); + } + + @Override + public final double charge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aSimulate) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[2] > aTier) || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) || (aStack.stackSize != 1)) { + return 0; + } + final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (!aSimulate) { + this.setCharge(aStack, tNewCharge); + } + return tNewCharge - tChargeBefore; + } + + @Override + public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[2] > aTier)) { + return 0; + } + if (aBatteryAlike && !this.canProvideEnergy(aStack)) { + return 0; + } + if (tStats[3] > 0) { + if ((aCharge < tStats[3]) || (aStack.stackSize < 1)) { + return 0; + } + if (!aSimulate) { + aStack.stackSize--; + } + return tStats[3]; + } + final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (!aSimulate) { + this.setCharge(aStack, tNewCharge); + } + return tChargeBefore - tNewCharge; + } + + @Override + public final double getCharge(final ItemStack aStack) { + return this.getRealCharge(aStack); + } + + @Override + public final boolean canUse(final ItemStack aStack, final double aAmount) { + return this.getRealCharge(aStack) >= aAmount; + } + + @Override + public final boolean use(final ItemStack aStack, final double aAmount, final EntityLivingBase aPlayer) { + this.chargeFromArmor(aStack, aPlayer); + if ((aPlayer instanceof EntityPlayer) && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) { + return true; + } + final double tTransfer = this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); + if (tTransfer == aAmount) { + this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); + this.chargeFromArmor(aStack, aPlayer); + return true; + } + this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); + this.chargeFromArmor(aStack, aPlayer); + return false; + } + + @Override + public final boolean canProvideEnergy(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return false; + } + return (tStats[3] > 0) || ((aStack.stackSize == 1) && ((tStats[3] == -2) || (tStats[3] == -3))); + } + + @Override + public final void chargeFromArmor(final ItemStack aStack, final EntityLivingBase aPlayer) { + if ((aPlayer == null) || aPlayer.worldObj.isRemote) { + return; + } + for (int i = 1; i < 5; i++) { + final ItemStack tArmor = aPlayer.getEquipmentInSlot(i); + if (GT_ModHandler.isElectricItem(tArmor)) { + final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); + if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { + final double tCharge = ElectricItem.manager.discharge(tArmor, this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false); + if (tCharge > 0) { + this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); + if (aPlayer instanceof EntityPlayer) { + final Container tContainer = ((EntityPlayer) aPlayer).openContainer; + if (tContainer != null) { + tContainer.detectAndSendChanges(); + } + } + } + } + } + } + } + + public final long getRealCharge(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + if (tStats[3] > 0) { + return (int) (long) tStats[3]; + } + final NBTTagCompound tNBT = aStack.getTagCompound(); + return tNBT == null ? 0 : tNBT.getLong("GT.ItemCharge"); + } + + public final boolean setCharge(final ItemStack aStack, long aCharge) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[3] > 0)) { + return false; + } + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + tNBT.removeTag("GT.ItemCharge"); + aCharge = Math.min(tStats[0] < 0 ? Math.abs(tStats[0] / 2) : aCharge, Math.abs(tStats[0])); + if (aCharge > 0) { + aStack.setItemDamage(this.getChargedMetaData(aStack)); + tNBT.setLong("GT.ItemCharge", aCharge); + } else { + aStack.setItemDamage(this.getEmptyMetaData(aStack)); + } + if (tNBT.hasNoTags()) { + aStack.setTagCompound(null); + } else { + aStack.setTagCompound(tNBT); + } + this.isItemStackUsable(aStack); + return true; + } + + public short getChargedMetaData(final ItemStack aStack) { + return (short) aStack.getItemDamage(); + } + + public short getEmptyMetaData(final ItemStack aStack) { + return (short) aStack.getItemDamage(); + } + + + public boolean isItemStackUsable(final ItemStack aStack) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final IItemBehaviour tBehavior : tList) { + if (!tBehavior.isItemStackUsable(this, aStack)) { + return false; + } + } + } + return true; + } + + @Override + public final String getToolTip(final ItemStack aStack) { + return null; + } // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up at this Point + + @Override + public final IElectricItemManager getManager(final ItemStack aStack) { + return this; + } // We are our own Manager + + /** + * Sets the Furnace Burn Value for the Item. + * + * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aValue 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU) + * @return the Item itself for convenience in constructing. + */ + public final BaseEuItem setBurnValue(final int aMetaValue, final int aValue) { + if ((aMetaValue < 0) || (aValue < 0)) { + return this; + } + if (aValue == 0) { + this.mBurnValues.remove((short) aMetaValue); + } else { + this.mBurnValues.put((short) aMetaValue, aValue > Short.MAX_VALUE ? Short.MAX_VALUE : (short) aValue); + } + return this; + } + + /** + * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) + * @param aTransferLimit Transfer Limit. + * @param aTier The electric Tier. + * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). + * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) + * Use -2 if you want to make this Battery dischargeable. + * Use -3 if you want to make this Battery charge/discharge-able. + * @return the Item itself for convenience in constructing. + */ + public final BaseEuItem setElectricStats(final int aMetaValue, final long aMaxCharge, final long aTransferLimit, final long aTier, final long aSpecialData, final boolean aUseAnimations) { + if (aMetaValue < 0) { + return this; + } + if (aMaxCharge == 0) { + this.mElectricStats.remove((short) aMetaValue); + } else { + this.mElectricStats.put((short) aMetaValue, new Long[]{aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData}); + } + return this; + } + + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { + for (int i = 0, j = this.mEnabledItems.length(); i < j; i++) { + if (this.mVisibleItems.get(i) || (D1 && this.mEnabledItems.get(i))) { + final Long[] tStats = this.mElectricStats.get((short) (this.mOffset + i)); + if ((tStats != null) && (tStats[3] < 0)) { + final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); + this.setCharge(tStack, Math.abs(tStats[0])); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + if ((tStats == null) || (tStats[3] != -2)) { + final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public final void registerIcons(final IIconRegister aIconRegister) { + for (short i = 0, j = (short) this.mEnabledItems.length(); i < j; i++) { + if (this.mEnabledItems.get(i)) { + for (byte k = 1; k < this.mIconList[i].length; k++) { + this.mIconList[i][k] = aIconRegister.registerIcon(CORE.MODID+":" + (this.getUnlocalizedName() + "/" + i + "/" + k)); + } + this.mIconList[i][0] = aIconRegister.registerIcon(CORE.MODID+":" + (this.getUnlocalizedName() + "/" + i)); + } + } + } + + + @Override + public final IIcon getIconFromDamage(final int aMetaData) { + if (aMetaData < 0) { + return null; + } + return (aMetaData - this.mOffset) < this.mIconList.length ? this.mIconList[aMetaData - this.mOffset][0] : null; + } + + /** + * Sets the unlocalized name of this item to the string passed as the parameter" + */ + @Override + public Item setUnlocalizedName(final String p_77655_1_){ + this.unlocalizedName = p_77655_1_; + super.setUnlocalizedName(p_77655_1_); + return this; + } + + /** + * Returns the unlocalized name of this item. + */ + @Override + public String getUnlocalizedName() + { + return this.unlocalizedName; + } + + public final Long[] getElectricStats(final ItemStack aStack) { + return this.mElectricStats.get((short) aStack.getItemDamage()); + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { + return false; + } + + @Override + public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { + return false; + } + + + /** + * Adds a special Item Behaviour to the Item. + *

+ * Note: the boolean Behaviours sometimes won't be executed if another boolean Behaviour returned true before. + * + * @param aMetaValue the Meta Value of the Item you want to add it to. [0 - 32765] + * @param aBehavior the Click Behavior you want to add. + * @return the Item itself for convenience in constructing. + */ + public final BaseEuItem addItemBehavior(final int aMetaValue, final IItemBehaviour aBehavior) { + if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { + return this; + } + ArrayList> tList = this.mItemBehaviors.get((short) aMetaValue); + if (tList == null) { + tList = new ArrayList<>(1); + this.mItemBehaviors.put((short) aMetaValue, tList); + } + tList.add(aBehavior); + return this; + } + + /** + * This adds a Custom Item to the ending Range. + * + * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset) + * @param aEnglish The Default Localized Name of the created Item + * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip + * @param aFoodBehavior The Food Value of this Item. Can be null aswell. Just a convenience thing. + * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things. + * @return An ItemStack containing the newly created Item. + */ + @SuppressWarnings("unchecked") + public final ItemStack addItem(final int aID, final String aEnglish, String aToolTip, final Object... aRandomData) { + if (aToolTip == null) { + aToolTip = ""; + } + if ((aID >= 0) && (aID < this.mItemAmount)) { + final ItemStack rStack = new ItemStack(this, 1, this.mOffset + aID); + this.mEnabledItems.set(aID); + this.mVisibleItems.set(aID); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip); + final List tAspects = new ArrayList<>(); + // Important Stuff to do first + for (final Object tRandomData : aRandomData) { + if (tRandomData instanceof SubTag) { + if (tRandomData == SubTag.INVISIBLE) { + this.mVisibleItems.set(aID, false); + continue; + } + if (tRandomData == SubTag.NO_UNIFICATION) { + GT_OreDictUnificator.addToBlacklist(rStack); + continue; + } + } + } + // now check for the rest + for (final Object tRandomData : aRandomData) { + if (tRandomData != null) { + boolean tUseOreDict = true; + if (tRandomData instanceof IItemBehaviour) { + this.addItemBehavior(this.mOffset + aID, (IItemBehaviour) tRandomData); + tUseOreDict = false; + } + if (tRandomData instanceof IItemContainer) { + ((IItemContainer) tRandomData).set(rStack); + tUseOreDict = false; + } + if (tRandomData instanceof SubTag) { + continue; + } + if (tRandomData instanceof TC_AspectStack) { + ((TC_AspectStack) tRandomData).addToAspectList(tAspects); + continue; + } + if (tRandomData instanceof ItemData) { + if (GT_Utility.isStringValid(tRandomData)) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + } else { + GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); + } + continue; + } + if (tUseOreDict) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + continue; + } + } + } + if (GregTech_API.sThaumcraftCompat != null) { + GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); + } + return rStack; + } + return null; + } + + @Override + public String getItemStackDisplayName(final ItemStack par1ItemStack) { + int keyValue = (par1ItemStack.getItemDamage() - this.mOffset); + if (keyValue < 0 || keyValue > 3) { + keyValue = 0; + } + return this.itemName.get(keyValue).getValue(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java new file mode 100644 index 0000000000..246620344a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemBackpack.java @@ -0,0 +1,92 @@ +package gtPlusPlus.core.item.base; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemBackpack extends Item{ + + protected final int colourValue; + protected final String unlocalName; + + + public BaseItemBackpack(final String unlocalizedName, final int colour){ + this.unlocalName = unlocalizedName; + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + "itemBackpack"); + this.colourValue = colour; + GameRegistry.registerItem(this, unlocalizedName); + GT_OreDictUnificator.registerOre("storageBackpack", ItemUtils.getSimpleStack(this)); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabOther); + } + + // Without this method, your inventory will NOT work!!! + @Override + public int getMaxItemUseDuration(final ItemStack stack) { + return 1; // return any value greater than zero + } + + @Override + public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) + { + if (!world.isRemote) + { + // If player not sneaking, open the inventory gui + if (!player.isSneaking()) { + player.openGui(GTplusplus.instance, GuiHandler.GUI3, world, 0, 0, 0); + } + + // Otherwise, stealthily place some diamonds in there for a nice surprise next time you open it up :) + else { + // Utils.LOG_INFO("Player is Sneaking, giving them sneaky diamonds."); + // new BaseInventoryBackpack(player.getHeldItem()).setInventorySlotContents(0, new ItemStack(Items.diamond,4)); + } + } + + return itemstack; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.colourValue == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.colourValue; + + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + //Name Formatting. + String temp = this.unlocalName.replace("backpack", ""); + //Lets find the colour. + if (temp.toLowerCase().contains("dark")){ + temp = this.unlocalName.substring(12, this.unlocalName.length()); + temp = "Dark "+ temp; + } + return (temp+" Backpack"); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(final IIconRegister iconRegister) + { + this.itemIcon = iconRegister.registerIcon(CORE.MODID + ":" + "itemBackpack"); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java new file mode 100644 index 0000000000..73ed4afb42 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java @@ -0,0 +1,109 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; + +/* + * + * + Key Point: You can access the NBT compound data from the Item class (in those methods that pass an ItemStack), but the NBT compound can only be set on an ItemStack. + + The steps to add NBT data to an ItemStack: + Create or otherwise get an ItemStack of the desired item + Create an NBTTagCompound and fill it with the appropriate data + Call ItemStack#setTagCompound() method to set it. + + * + */ + +public class BaseItemBrain extends Item{ + // This is an array of all the types I am going to be adding. + String[] brainTypes = { "dead", "preserved", "fresh", "tasty" }; + + // This method allows us to have different language translation keys for + // each item we add. + @Override + public String getUnlocalizedName(final ItemStack stack) + { + // This makes sure that the stack has a tag compound. This is how data + // is stored on items. + if (stack.hasTagCompound()) + { + // This is the object holding all of the item data. + final NBTTagCompound itemData = stack.getTagCompound(); + // This checks to see if the item has data stored under the + // brainType key. + if (itemData.hasKey("brainType")) + { + // This retrieves data from the brainType key and uses it in + // the return value + return "item." + itemData.getString("brainType"); + } + } + // This will be used if the item is obtained without nbt data on it. + return "item.nullBrain"; + } + + + // This is a fun method which allows us to run some code when our item is + // shown in a creative tab. I am going to use it to add all the brain + // types. + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(final Item item, final CreativeTabs tab, final List itemList) + { + // This creates a loop with a counter. It will go through once for + // every listing in brainTypes, and gives us a number associated + // with each listing. + for (int pos = 0; pos < this.brainTypes.length; pos++) + { + // This creates a new ItemStack instance. The item parameter + // supplied is this item. + final ItemStack brainStack = new ItemStack(item); + // By default, a new ItemStack does not have any nbt compound data. + // We need to give it some. + brainStack.setTagCompound(new NBTTagCompound()); + // Now we set the type of the item, brainType is the key, and + // brainTypes[pos] is grabbing a + // entry from the brainTypes array. + brainStack.getTagCompound().setString("brainType", + this.brainTypes[pos]); + // And this adds it to the itemList, which is a list of all items + // in the creative tab. + itemList.add(brainStack); + } + } + + // This code will allow us to tell the items apart in game. You can change + @SuppressWarnings({ "rawtypes", "unchecked" }) + // texture based on nbt data, but I won't be covering that. + @Override + @SideOnly(Side.CLIENT) + public void addInformation(final ItemStack stack, final EntityPlayer player, final List tooltip, final boolean isAdvanced){ + if ( stack.hasTagCompound() + && stack.getTagCompound().hasKey("brainType")) + { + // StatCollector is a class which allows us to handle string + // language translation. This requires that you fill out the + // translation in you language class. + tooltip.add(StatCollector.translateToLocal("tooltip.yourmod." + + stack.getTagCompound().getString("brainType") + ".desc")); + } + else // If the brain does not have valid tag data, a default message + { + tooltip.add(StatCollector.translateToLocal( + "tooltip.yourmod.nullbrain.desc")); + } + } +} + diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemBurnable.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemBurnable.java new file mode 100644 index 0000000000..a5db714822 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemBurnable.java @@ -0,0 +1,44 @@ +package gtPlusPlus.core.item.base; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemBurnable extends CoreItem { + + protected final int meta; + + public BaseItemBurnable(String unlocalizedName, String displayName, CreativeTabs creativeTab, + int stackSize, int maxDmg, String description, String oredictName, int burnTime, int meta) { + super(unlocalizedName, creativeTab, stackSize, maxDmg, description); + this.itemName = displayName; + this.meta = meta; + if (oredictName != null && !oredictName.equals("")){ + registerOrdictionary(oredictName); + } + registerFuel(burnTime); + + } + + public void registerFuel(int burn){ + CORE.burnables.add(new Pair(burn, ItemUtils.getSimpleStack(this, 1))); + } + + public final void registerOrdictionary(String name){ + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), name); + } + + @Override + public int getDamage(ItemStack stack) { + return this.meta; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemColourable.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemColourable.java new file mode 100644 index 0000000000..ca7041617d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemColourable.java @@ -0,0 +1,98 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.lib.CORE; + +public class BaseItemColourable extends Item +{ + + private final EnumRarity rarity; + private final EnumChatFormatting descColour; + private final String itemDescription; + protected String itemName; + private final boolean hasEffect; + public final int componentColour; + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return this.componentColour; + } + + //5 + /* + * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect + */ + public BaseItemColourable(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, int rgb) + { + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + this.setHasSubtypes(true); + this.rarity = regRarity; + this.itemDescription = description; + this.descColour = colour; + this.hasEffect = Effect; + this.componentColour = rgb; + GameRegistry.registerItem(this, unlocalizedName); + } + + //6 + /* + * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect + */ + public BaseItemColourable(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, int rgb) + { + this.setUnlocalizedName(unlocalizedName); + this.itemName = displayName; + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + this.rarity = regRarity; + this.itemDescription = description; + this.descColour = colour; + this.hasEffect = Effect; + this.componentColour = rgb; + GameRegistry.registerItem(this, unlocalizedName); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(this.descColour+this.itemDescription); + //super.addInformation(stack, aPlayer, list, bool); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return this.rarity; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return this.hasEffect; + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + if ((this.itemName == null) || this.itemName.equals("")) { + return super.getItemStackDisplayName(tItem); + } + return this.itemName; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java new file mode 100644 index 0000000000..9ad8ea3feb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -0,0 +1,566 @@ +package gtPlusPlus.core.item.base; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TextureSet; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class BaseItemComponent extends Item{ + + private final static Class mTextureSetPreload; + + static { + mTextureSetPreload = TextureSet.class; + } + + public final Material componentMaterial; + public final String materialName; + public final String unlocalName; + public final ComponentTypes componentType; + public final int componentColour; + public Object extraData; + + protected IIcon base; + protected IIcon overlay; + + public BaseItemComponent(final Material material, final ComponentTypes componentType) { + this.componentMaterial = material; + this.unlocalName = "item"+componentType.COMPONENT_NAME+material.getUnlocalizedName(); + this.materialName = material.getLocalizedName(); + this.componentType = componentType; + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(64); + //this.setTextureName(this.getCorrectTextures()); + this.componentColour = material.getRgbAsHex(); + GameRegistry.registerItem(this, this.unlocalName); + + //if (componentType != ComponentTypes.DUST) + + GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); + if (LoadedMods.Thaumcraft) { + //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1); + if (componentMaterial.isRadioactive) { + //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel); + } + } + registerComponent(); + } + + //For Cell Generation + public BaseItemComponent(final String unlocalName, final String localName, final short[] RGBA) { + + // Handles .'s from fluid internal names. + String aFormattedNameForFluids; + if (unlocalName.contains(".")) { + aFormattedNameForFluids = StringUtils.splitAndUppercase(unlocalName, "."); + } + else { + aFormattedNameForFluids = unlocalName; + } + Material aTempMaterial = Material.mMaterialCache.get(localName.toLowerCase()); + Logger.INFO("Attempted to get "+localName+" cell material from cache. Valid? "+(aTempMaterial != null)); + this.componentMaterial = aTempMaterial; + this.unlocalName = "itemCell"+aFormattedNameForFluids; + this.materialName = localName; + this.componentType = ComponentTypes.CELL; + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(aFormattedNameForFluids); + this.setMaxStackSize(64); + this.componentColour = MathUtils.getRgbAsHex(RGBA); + this.extraData = RGBA; + + this.setTextureName(CORE.MODID + ":" + "item"+ComponentTypes.CELL.COMPONENT_NAME); + GameRegistry.registerItem(this, aFormattedNameForFluids); + GT_OreDictUnificator.registerOre(ComponentTypes.CELL.getOreDictName()+Utils.sanitizeStringKeepBrackets(localName), ItemUtils.getSimpleStack(this)); + registerComponent(); + } + + public boolean registerComponent() { + if (this.componentMaterial == null) { + return false; + } + //Register Component + Map aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName()); + if (aMap == null) { + aMap = new HashMap(); + } + String aKey = componentType.getGtOrePrefix().name(); + ItemStack x = aMap.get(aKey); + if (x == null) { + aMap.put(aKey, ItemUtils.getSimpleStack(this)); + Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); + Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); + return true; + } + else { + //Bad + Logger.MATERIALS("Tried to double register a material component. "); + return false; + } + } + + public String getCorrectTextures(){ + if (!CORE.ConfigSwitches.useGregtechTextures){ + return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME; + } + String metType = "9j4852jyo3rjmh3owlhw9oe"; + if (this.componentMaterial != null) { + TextureSet u = this.componentMaterial.getTextureSet(); + if (u != null) { + metType = u.mSetName; + } + } + metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType); + return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.getOreDictName(); + + + + //return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.COMPONENT_NAME.toLowerCase(); + } + + /*@Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + if (this.componentType == ComponentTypes.SMALLGEAR){ + return "Small " + this.materialName+" Gear"; + } + + if (this.componentMaterial != null) { + return (this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); + } + return this.materialName+" Cell"; + }*/ + + public final String getMaterialName() { + return this.materialName; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + try { + + + if (this.componentMaterial == null){ + if (this.materialName != null){ + //list.add(Utils.sanitizeStringKeepBrackets(materialName)); + } + } + + if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && (this.componentMaterial != null)){ + + + if (this.componentMaterial != null){ + if (!this.componentMaterial.vChemicalFormula.contains("?")) { + list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula)); + } + else if (this.componentMaterial.vChemicalFormula.contains("?")) { + String temp = componentMaterial.vChemicalFormula; + temp = temp.replace(" ", ""); + temp = temp.replace("-", ""); + temp = temp.replace("_", ""); + temp = temp.replace("!", ""); + temp = temp.replace("@", ""); + temp = temp.replace("#", ""); + temp = temp.replace(" ", ""); + list.add(temp); + } + + if (this.componentMaterial.isRadioactive){ + list.add(CORE.GT_Tooltip_Radioactive); + } + + if (this.componentType == ComponentTypes.INGOT || this.componentType == ComponentTypes.HOTINGOT){ + if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && this.unlocalName.toLowerCase().contains("hot")){ + list.add(EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.RED+"Very hot! "+EnumChatFormatting.GRAY+" Avoid direct handling.."); + } + } + } + else { + String aChemicalFormula = Material.sChemicalFormula.get(materialName.toLowerCase()); + if (aChemicalFormula != null && aChemicalFormula.length() > 0) { + list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula)); + } + } + + //Hidden Tooltip + if (KeyboardUtils.isCtrlKeyDown()) { + if (this.componentMaterial != null) { + String type = this.componentMaterial.getTextureSet().mSetName; + String output = type.substring(0, 1).toUpperCase() + type.substring(1); + list.add(EnumChatFormatting.GRAY+"Material Type: "+output+"."); + list.add(EnumChatFormatting.GRAY+"Material State: "+this.componentMaterial.getState().name()+"."); + list.add(EnumChatFormatting.GRAY+"Radioactivity Level: "+this.componentMaterial.vRadiationLevel+"."); + } + } + else { + list.add(EnumChatFormatting.DARK_GRAY+"Hold Ctrl to show additional info."); + } + + } + } + catch (Throwable t) {} + + super.addInformation(stack, aPlayer, list, bool); + } + + @SuppressWarnings("unchecked") + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (this.componentMaterial != null){ + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.componentMaterial.vRadiationLevel, world, entityHolding); + } + } + } + + if (extraData != null) { + if (componentMaterial != null && componentMaterial.getRGBA()[3] > 1) { + if (((Map) extraData).get(9999) == null) { + ((Map) extraData).put(9999, new Short[] {0}); + } + Short aCurrentFrame = ((Map) extraData).get(9999)[0]; + short fC = (short) (aCurrentFrame >= Short.MAX_VALUE ? 0 : aCurrentFrame+1); + ((Map) extraData).put((int) 9999, new Short[] {(short) (fC), 0}); + ((Map) extraData).put((int) 9998, new Short[] {aCurrentFrame, 0}); + + } + } + } + + + /** + * + * Handle Custom Rendering + * + */ + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses(){ + return (CORE.ConfigSwitches.useGregtechTextures ? true : false); + } + + @SuppressWarnings("unchecked") + @Override + public int getColorFromItemStack(final ItemStack stack, final int renderPass) { + + + if (this.componentType == ComponentTypes.CELL || this.componentType == ComponentTypes.PLASMACELL) { + if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ + return Utils.rgbtoHexValue(255, 255, 255); + } + if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ + return Utils.rgbtoHexValue(255, 255, 255); + } + } + if (this.componentType == ComponentTypes.PLATEHEAVY) { + + } + + + + try { + if (this.componentMaterial == null) { + if (extraData != null) { + if (short.class.isInstance(extraData)){ + short[] abc = (short[]) extraData; + return Utils.rgbtoHexValue(abc[0], abc[1], abc[2]); + } + } + return this.componentColour; + } + + if (this.componentMaterial.getRGBA()[3] <= 1) { + return this.componentColour; + } + else { + + //Mild Glow Effect + if (this.componentMaterial.getRGBA()[3] == 2) { + if (extraData == null) { + extraData = new HashMap(); + ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); + ((Map) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); + short[] er = this.componentMaterial.getRGBA(); + short value = 1; + Short[] ht = new Short[] {er[0], er[1], er[2]}; + for (int y = 0; y < 40; y++) { + if (y < 20) { + value = 1; + } + else { + value = -1; + } + short r = (short) (ht[0] + value); + short g = (short) (ht[1] + value); + short b = (short) (ht[2] + value); + Short[] qq = new Short[] {(short) Math.min(255, r), (short) Math.min(255, g), (short) Math.min(255, b)}; + ht = qq; + ((Map) extraData).put(y, qq); + } + } + if (extraData != null) { + + Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; + Short aSize = 40; + short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); + Short[] aCurrentFrameRGB = ((Map) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); + ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); + + + /*Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; + Short[] aCurrentFrameRGB = ((Map) extraData).get((int) aCurrentFrame); + short nextFrame = aCurrentFrame < 40 ? aCurrentFrame++ : 0; + ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]);*/ + } + } + + //Rainbow Hue Cycle + else if (this.componentMaterial.getRGBA()[3] == 3) { + if (extraData == null) { + extraData = new HashMap(); + ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); + ((Map) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); + int aSlot = 0; + + //Let's say you're starting with green: + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + //Slowly start adding in some red to get to yellow: + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + //Then, take out the green to get to red: + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + //Now, add blue to get to purple: + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + //Then, remove red to get to blue: + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + //Add the green back in to get to cyan: + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + //And finally remove the blue to get back to green: + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put((int) Byte.MAX_VALUE, new Short[] {(short) (((Map) extraData).size()-1)}); + + + } + if (extraData != null) { + Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; + Short aSize = (short) (((Map) extraData).size() - 3); + short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); + Short[] aCurrentFrameRGB = ((Map) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); + ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); + } + } + } + + + } + catch (Throwable t) { + + } + return this.componentColour; + + + + + + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + if (CORE.ConfigSwitches.useGregtechTextures) { + if(pass == 0) { + return this.base; + } + return this.overlay; + } + return this.base; + } + + @Override + public void registerIcons(final IIconRegister i) { + + if (CORE.ConfigSwitches.useGregtechTextures){ + this.base = i.registerIcon(getCorrectTextures()); + this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY"); + } + else { + this.base = i.registerIcon(getCorrectTextures()); + //this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY"); + } + } + + + + + public static enum ComponentTypes { + DUST("Dust", " Dust", "dust", OrePrefixes.dust), + DUSTSMALL("DustSmall", " Dust", "dustSmall", OrePrefixes.dustSmall), + DUSTTINY("DustTiny", " Dust", "dustTiny", OrePrefixes.dustTiny), + INGOT("Ingot", " Ingot", "ingot", OrePrefixes.ingot), + HOTINGOT("HotIngot", " Hot Ingot", "ingotHot", OrePrefixes.ingotHot), + PLATE("Plate", " Plate", "plate", OrePrefixes.plate), + PLATEDOUBLE("PlateDouble", " Double Plate", "plateDouble", OrePrefixes.plateDouble), + ROD("Rod", " Rod", "stick", OrePrefixes.stick), + RODLONG("RodLong", " Long Rod", "stickLong", OrePrefixes.stickLong), + GEAR("Gear", " Gear", "gearGt", OrePrefixes.gearGt), + SMALLGEAR("SmallGear", " Gear", "gearGtSmall", OrePrefixes.gearGtSmall), //TODO + SCREW("Screw", " Screw", "screw", OrePrefixes.screw), + BOLT("Bolt", " Bolt", "bolt", OrePrefixes.bolt), + ROTOR("Rotor", " Rotor", "rotor", OrePrefixes.rotor), + RING("Ring", " Ring", "ring", OrePrefixes.ring), + FOIL("Foil", " Foil", "foil", OrePrefixes.foil), + PLASMACELL("CellPlasma", " Plasma Cell", "cellPlasma", OrePrefixes.cellPlasma), + CELL("Cell", " Cell", "cell", OrePrefixes.cell), + NUGGET("Nugget", " Nugget", "nugget", OrePrefixes.nugget), + PLATEHEAVY("HeavyPlate", "Heavy@Plate", "plateHeavy", OrePrefixes.plateDense), + SPRING("Spring", " Spring", "spring", OrePrefixes.spring), + SMALLSPRING("SmallSpring", "Small@Spring", "springSmall", OrePrefixes.springSmall), + FINEWIRE("FineWire", "Fine@Wire", "wireFine", OrePrefixes.wireFine),; + + private String COMPONENT_NAME; + private String DISPLAY_NAME; + private String OREDICT_NAME; + private OrePrefixes a_GT_EQUAL; + private ComponentTypes (final String LocalName, final String DisplayName, final String OreDictName, final OrePrefixes aPrefix){ + this.COMPONENT_NAME = LocalName; + this.DISPLAY_NAME = DisplayName; + this.OREDICT_NAME = OreDictName; + this.a_GT_EQUAL = aPrefix; + } + + public String getComponent(){ + return this.COMPONENT_NAME; + } + + public String getName(){ + return this.DISPLAY_NAME; + } + + public String getOreDictName(){ + return this.OREDICT_NAME; + } + + public OrePrefixes getGtOrePrefix() { + return this.a_GT_EQUAL; + } + + } + +} + + diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java new file mode 100644 index 0000000000..4209ec0a59 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemDamageable.java @@ -0,0 +1,201 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; + +public class BaseItemDamageable extends Item { + + private final EnumRarity rarity; + private final String itemDescription; + protected String itemName; + private final boolean hasEffect; + + public BaseItemDamageable(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) + { + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(1); + this.setMaxDamage(251); + this.setNoRepair(); + this.rarity = regRarity; + this.itemDescription = description; + this.hasEffect = Effect; + GameRegistry.registerItem(this, unlocalizedName); + } + + public String getItemDescription(){ + return this.itemDescription; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + int dmg = (int) getItemDamage(stack); + if (dmg <= 3){ + list.add(EnumChatFormatting.GRAY+this.itemDescription); + } + if (dmg > 3 && dmg <= 25){ + list.add(EnumChatFormatting.GRAY+"You have discovered that smashing this against valuable stones has some function.."); + } + else if (dmg > 0){ + int maxDamage = 250; + list.add(EnumChatFormatting.GRAY+""+(maxDamage-getItemDamage(stack))+"/"+maxDamage+" gems remaining."); + } + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + int dmg = (int) getItemDamage(par1ItemStack); + if (dmg > 200){ + return EnumRarity.epic; + } + return this.rarity; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + int dmg = (int) getItemDamage(par1ItemStack); + if (dmg > 200){ + return true; + } + return this.hasEffect; + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + if ((this.itemName == null) || this.itemName.equals("")) { + return super.getItemStackDisplayName(tItem); + } + return this.itemName; + } + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Value", 0); + tagMain.setTag("Damage", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getItemDamage(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("Damage"); + if (aNBT != null) { + return aNBT.getLong("Value"); + } + } + else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setItemDamage(final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("Damage"); + if (aNBT != null) { + aNBT.setLong("Value", aDamage); + return true; + } + } + else { + createNBT(aStack); + } + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null){ + createNBT(stack); + } + double currentDamage = getItemDamage(stack); + double durabilitypercent = currentDamage / 100; + double inverse = (100-durabilitypercent); + return durabilitypercent; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + int dmg = (int) getItemDamage(stack); + if (dmg <= 20){ + return false; + } + else { + return true; + } + } + + public static ItemStack damageItem(ItemStack item){ + if (item != null){ + long currentUse = BaseItemDamageable.getItemDamage(item); + if (currentUse >= 0 && currentUse <= 250){ + BaseItemDamageable.setItemDamage(item, currentUse+1); + return item; + } + else { + return item; + } + } + return null; + } + + @Override + public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) { + Logger.INFO("Does Leave Table? "+stack.getDisplayName()); + return true; + } + + @Override + public boolean getShareTag() { + return true; + } + + @Override + public boolean hasContainerItem() { + return true; + } + + @Override + public boolean hasContainerItem(ItemStack stack) { + Logger.INFO("hasContainerItem? "+stack.getDisplayName()); + return true; + } + + @Override + public ItemStack getContainerItem(ItemStack itemStack) { + ItemStack stack = itemStack.copy(); + //stack.setItemDamage(stack.getItemDamage() + 1); + damageItem(stack); + stack.stackSize = 1; + return stack; + } + + @Override + public int getDamage(ItemStack stack) { + return (int) getItemDamage(stack); + } + +} + + + diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java new file mode 100644 index 0000000000..970d5ec0c8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java @@ -0,0 +1,28 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.lib.CORE; + +public class BaseItemGeneric extends Item +{ + public BaseItemGeneric(final String unlocalizedName, final CreativeTabs c, final int stackSize, final int maxDmg) + { + this.setUnlocalizedName(CORE.MODID + "_" + unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(c); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + super.addInformation(stack, aPlayer, list, bool); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java new file mode 100644 index 0000000000..3d9ff9fa48 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java @@ -0,0 +1,109 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.enums.Materials; + +import gtPlusPlus.api.enums.Quality; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemLoot extends Item{ + + private final String materialName; + private final String unlocalName; + private final LootTypes lootTypes; + private Quality lootQuality; + private final Materials lootMaterial; + + public BaseItemLoot(final LootTypes lootType, final Materials material) { + this.lootTypes = lootType; + this.lootMaterial = material; + this.materialName = material.mDefaultLocalName; + this.unlocalName = "item"+lootType.LOOT_TYPE+this.materialName; + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(1); + this.setTextureName(CORE.MODID + ":" + "item"+lootType.LOOT_TYPE); + } + + public ItemStack generateLootStack(){ + this.lootQuality = Quality.getRandomQuality(); + return ItemUtils.getSimpleStack(this, 1); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (this.materialName+this.lootTypes.DISPLAY_SUFFIX); + } + + public final String getMaterialName() { + return this.materialName; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(this.lootQuality.getQuality()); + + /*if (componentMaterial.isRadioactive){ + list.add(CORE.GT_Tooltip_Radioactive); + }*/ + + super.addInformation(stack, aPlayer, list, bool); + } + + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + final short[] temp = this.lootMaterial.mRGBa; + return Utils.rgbtoHexValue(temp[0], temp[1], temp[2]); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + //EntityUtils.applyRadiationDamageToEntity(lootQuality.vRadioationLevel, world, entityHolding); + } + + + + + + + + + public static enum LootTypes { + Sword("Sword", " Longsword", "sword"), + Shortsword("Sword", " Short Blade", "blade"), + Helmet("Helmet", " Medium Helm", "helmet"), + Chestplate("Platebody", " Chestplate", "platebody"), + Leggings("Platelegs", " Platelegs", "platelegs"), + Boots("Boots", " Boots", "boots"); + private String LOOT_TYPE; + private String DISPLAY_SUFFIX; + private String OREDICT_NAME; + private LootTypes (final String LocalName, final String DisplayName, final String OreDictName){ + this.LOOT_TYPE = LocalName; + this.DISPLAY_SUFFIX = DisplayName; + this.OREDICT_NAME = OreDictName; + } + public String getLootType(){ + return this.LOOT_TYPE; + } + public String getName(){ + return this.DISPLAY_SUFFIX; + } + public String getOreDictName(){ + return this.OREDICT_NAME; + } + } + +} + + diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemTCShard.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemTCShard.java new file mode 100644 index 0000000000..4f0db3e2ec --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemTCShard.java @@ -0,0 +1,82 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemTCShard extends Item{ + + public final String unlocalName; + public final String displayName; + public final String descriptionString; + public final String descriptionString2; + public final int itemColour; + + public BaseItemTCShard(final String DisplayName, final int colour) { + this(DisplayName, colour, ""); + } + + public BaseItemTCShard(final String DisplayName, final int colour, final String Description) { + this(DisplayName, colour, "", Description); + } + + public BaseItemTCShard(final String DisplayName, final int colour, final String Description, final String Description2) { + this.unlocalName = "item"+Utils.sanitizeString(DisplayName); + this.displayName = DisplayName; + this.itemColour = colour; + this.descriptionString = Description; + this.descriptionString2 = Description2; + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(64); + this.setTextureName(CORE.MODID + ":" + "itemShard"); + GameRegistry.registerItem(this, this.unlocalName); + GT_OreDictUnificator.registerOre("shard"+DisplayName, ItemUtils.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("gemInfused"+DisplayName, ItemUtils.getSimpleStack(this)); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (this.displayName+" Shard"); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if ((this.descriptionString != "") || !this.descriptionString.equals("")){ + list.add(EnumChatFormatting.GRAY+this.descriptionString); + } + if ((this.descriptionString2 != "") || !this.descriptionString2.equals("")){ + list.add(EnumChatFormatting.GRAY+this.descriptionString2); + } + } + + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return this.itemColour; + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + + } + + +} + + diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemTickable.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemTickable.java new file mode 100644 index 0000000000..eb066024e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemTickable.java @@ -0,0 +1,341 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class BaseItemTickable extends CoreItem { + + public final String[] descriptionString; + public final int itemColour; + public final int maxTicks; + public final boolean twoRenderPasses; + public final boolean ticksInContainers; + + public IIcon[] mIcon = new IIcon[2]; + + public BaseItemTickable(boolean twoPass, final String unlocalName, final int colour, final int maxTicks) { + this(false, twoPass, unlocalName, colour, maxTicks, new String[] {}); + } + + public BaseItemTickable(boolean containerTick, boolean twoPass, final String unlocalName, final int colour, final int maxTicks) { + this(containerTick, twoPass, unlocalName, colour, maxTicks, new String[] {}); + } + + public BaseItemTickable(boolean containerTick, boolean twoPass, final String unlocalName, final int colour, final int maxTicks, final String[] Description) { + super(unlocalName, AddToCreativeTab.tabMisc, 1, 999999999, Description, EnumRarity.epic, EnumChatFormatting.DARK_RED, true, null); + this.itemColour = colour; + this.descriptionString = Description; + this.maxTicks = maxTicks; + this.twoRenderPasses = twoPass; + this.ticksInContainers = containerTick; + this.maxStackSize = 1; + //setGregtechItemList(); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (world == null || iStack == null) { + return; + } + if (world.isRemote) { + return; + } + + + boolean active = isTicking(world, iStack); + if (active) { + tickItemTag(world, iStack); + } + + } + + /*private final boolean setGregtechItemList() { + ItemList.Component_LavaFilter.set(this); + return ItemList.Component_LavaFilter.get(1) != null ? true : false; + }*/ + + /** + * + * Handle Custom Rendering + * + */ + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses(){ + return this.twoRenderPasses; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int renderPass) { + if (renderPass == 1 && this.twoRenderPasses){ + return Utils.rgbtoHexValue(255, 255, 255); + } + return this.itemColour; + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + if (this.twoRenderPasses) { + if(pass == 0) { + return this.mIcon[0]; + } + return this.mIcon[1]; + } + return this.mIcon[0]; + } + + @Override + public void registerIcons(final IIconRegister i) { + + if (this.twoRenderPasses){ + this.mIcon[0] = i.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName()); + this.mIcon[1] = i.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName() + "_OVERLAY"); + } + else { + this.mIcon[0] = i.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName()); + //this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY"); + } + } + + protected int getMaxTicks(ItemStack aStack) { + return maxTicks; + } + + protected boolean createNBT(World world, ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Tick", 0); + tagNBT.setLong("maxTick", getMaxTicks(rStack)); + tagNBT.setBoolean("isActive", true); + + //Try set world time + if (world != null) { + //tagNBT.setLong("CreationDate", world.getTotalWorldTime()); + } + + tagMain.setTag("TickableItem", tagNBT); + rStack.setTagCompound(tagMain); + Logger.INFO("Created Tickable NBT data."); + return true; + } + + public final long getTicks(World world, final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + return aNBT.getLong("Tick"); + } + } + else { + createNBT(world, aStack); + } + return 0L; + } + + public final boolean setTicks(World world, final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + aNBT.setLong("Tick", aDamage); + return true; + } + } + else { + createNBT(world, aStack); + } + return false; + } + + public final boolean isTicking(World world, final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + return aNBT.getBoolean("isActive"); + } + } + else { + return createNBT(world, aStack); + } + return true; + } + + public final boolean setTicking(World world, final ItemStack aStack, final boolean active) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + aNBT.setBoolean("isActive", active); + return true; + } + } + else { + createNBT(world, aStack); + } + return false; + } + + public final boolean getTicksInContainer(World world, final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + return aNBT.getBoolean("ticksInContainer"); + } + } + else { + createNBT(world, aStack); + } + return false; + } + + public final boolean setTicksInContainer(World world, final ItemStack aStack, final boolean active) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + aNBT.setBoolean("ticksInContainer", active); + return true; + } + } + else { + createNBT(world, aStack); + } + return false; + } + + public final long getDifferenceInWorldTimeToCreationTime(World world, final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + return (world.getTotalWorldTime() - aNBT.getLong("CreationDate")); + } + } + else { + createNBT(world, aStack); + } + return 0L; + } + + public final boolean setItemStackCreationTime(final ItemStack aStack, World world) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + aNBT.setLong("CreationDate", world.getTotalWorldTime()); + return true; + } + } + else { + createNBT(world, aStack); + } + return false; + } + + public final boolean tickItemTag(World world, ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + if (aNBT.hasKey("TickableItem")) { + aNBT = aNBT.getCompoundTag("TickableItem"); + //Done Ticking + if (getMaxTicks(aStack)-getTicks(world, aStack) <= 0) { + setTicking(world, aStack, false); + return false; + } + if (isTicking(world, aStack)) { + if (aNBT != null) { + aNBT.setLong("Tick", getTicks(world, aStack)+1); + return true; + } + else { + return false; + } + } + else { + return false; + } + } + } + return createNBT(world, aStack); + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null){ + //createNBT(null, stack); + return 0; + } + double currentDamage = getTicks(null, stack); + double durabilitypercent = currentDamage / getMaxTicks(stack); + return durabilitypercent; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(ItemStack stack, EntityPlayer player, @SuppressWarnings("rawtypes") List list, boolean bool) { + World world = player.getEntityWorld(); + if (this.descriptionString.length > 0) { + list.add(EnumChatFormatting.GRAY+this.descriptionString[0]); + } + long maxTicks = getMaxTicks(stack); + long ticks = 0; + if (stack.hasTagCompound()) { + ticks = getTicks(world, stack); + } + EnumChatFormatting durability = EnumChatFormatting.GRAY; + if (maxTicks-ticks > (maxTicks*0.8)){ + durability = EnumChatFormatting.GRAY; + } + else if (maxTicks-ticks > (maxTicks*0.6)){ + durability = EnumChatFormatting.GREEN; + } + else if (maxTicks-ticks > (maxTicks*0.4)){ + durability = EnumChatFormatting.YELLOW; + } + else if (maxTicks-ticks > (maxTicks*0.2)){ + durability = EnumChatFormatting.GOLD; + } + else if (maxTicks-ticks > 0){ + durability = EnumChatFormatting.RED; + } + list.add(durability+""+((maxTicks-ticks)/20)+EnumChatFormatting.GRAY+" seconds until decay"); + + if (this.descriptionString.length > 1) { + for (int h=1;h 0 ? this.theIcon : super.getIconFromDamageForRenderPass(parDamageVal, parRenderPass); + } + + public void setColors(final int parColorBase, final int parColorSpots){ + this.colorBase = parColorBase; + this.colorSpots = parColorSpots; + } + + public int getColorBase(){ + return this.colorBase; + } + + public int getColorSpots(){ + return this.colorSpots; + } + + public final void setEntityToSpawnName(final String parEntityToSpawnName){ + this.entityToSpawnName = parEntityToSpawnName; + this.entityToSpawnNameFull = this.entityMODID+"."+this.entityToSpawnName; + } + +} + diff --git a/src/main/java/gtPlusPlus/core/item/base/CoreItem.java b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java new file mode 100644 index 0000000000..7ce96b2a88 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/CoreItem.java @@ -0,0 +1,237 @@ +package gtPlusPlus.core.item.base; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +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.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class CoreItem extends Item +{ + + private final EnumRarity rarity; + private final EnumChatFormatting descColour; + private final String[] itemDescription; + protected String itemName; + private final boolean hasEffect; + + //Replace Item - What does this item turn into when held. + private final ItemStack turnsInto; + + //0 + /* + * Name, Tab - 64 Stack, 0 Dmg + */ + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab) + { + this(unlocalizedName, creativeTab, 64, 0); //Calls 3 + } + + //0 + /* + * Name, Tab - 64 Stack, 0 Dmg + */ + public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab) + { + this(unlocalizedName, creativeTab, 64, 0); //Calls 3 + this.itemName = displayName; + } + + //0.1 + /* + * Name, Tab - 64 Stack, 0 Dmg + */ + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final ItemStack OverrideItem) + { + this(unlocalizedName, creativeTab, 64, 0, new String[] {"This item will be replaced by another when held by a player, it is old and should not be used in recipes."}, EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5 + } + //0.1 + /* + * Name, Tab - 64 Stack, 0 Dmg + */ + public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final ItemStack OverrideItem) + { + this(unlocalizedName, creativeTab, 64, 0, new String[] {"This item will be replaced by another when held by a player, it is old and should not be used in recipes."}, EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5 + this.itemName = displayName; + } + + //1 + /* + * Name, Tab, Stack - 0 Dmg + */ + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize) + { + this(unlocalizedName, creativeTab, stackSize, 0); //Calls 3 + } + //2 + /* + * Name, Tab, Stack, Description - 0 Dmg + */ + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final String[] description) + { + this(unlocalizedName, creativeTab, stackSize, 0, description); //Calls 4 + } + //3 + /* + * Name, Tab, Stack, Dmg - Description + */ + public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, String string) { + this(unlocalizedName, creativeTab, stackSize, new String[] {string}); + } + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg) + { + this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {}); //Calls 4 + } + //4 //Not Rare + basic tooltip + /* + * Name, Tab, Stack, Dmg, Description + */ + public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, String string) { + this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {string}); + } + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description) + { + this(unlocalizedName, creativeTab, stackSize, maxDmg, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null); //Calls 4.5 + } + //4.5 + /* + * Name, Tab, Stack, Dmg, Description, Text Colour - Common + */ + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumChatFormatting colour) + { + this(unlocalizedName, creativeTab, stackSize, maxDmg, description, EnumRarity.common, colour, false, null); //Calls 5 + } + + //4.75 + /* + * Name, Tab, Stack, Dmg, Description, Rarity - Gray text + */ + public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, String string, EnumRarity uncommon) { + this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {string}, uncommon); + } + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity rarity) + { + this(unlocalizedName, creativeTab, stackSize, maxDmg, description, rarity, EnumChatFormatting.GRAY, false, null); //Calls 5 + } + + //5 + /* + * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect + */ + public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) + { + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + this.rarity = regRarity; + this.itemDescription = description; + this.descColour = colour; + this.hasEffect = Effect; + this.turnsInto = OverrideItem; + GameRegistry.registerItem(this, unlocalizedName); + } + + //6 + /* + * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect + */ + public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) + { + this.setUnlocalizedName(unlocalizedName); + this.itemName = displayName; + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + this.rarity = regRarity; + this.itemDescription = description; + this.descColour = colour; + this.hasEffect = Effect; + this.turnsInto = OverrideItem; + GameRegistry.registerItem(this, unlocalizedName); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.itemDescription.length > 0) { + for (int u=0;u= this.tickCounterMax){ + entityHolding.attackEntityFrom(DamageSource.onFire, 2); + this.tickCounter = 0; + } + } + } + super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java new file mode 100644 index 0000000000..9022f864cb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java @@ -0,0 +1,145 @@ +package gtPlusPlus.core.item.base.dusts; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemDust extends BaseItemComponent { + + private BaseItemComponent[] mSizedDusts = new BaseItemComponent[2]; + + public BaseItemDust(Material aMat) { + this(aMat, true); + } + + public BaseItemDust(Material aMat, boolean generateSmallDusts) { + super(aMat, ComponentTypes.DUST); + if (generateSmallDusts) { + mSizedDusts[0] = new BaseItemComponent(aMat, ComponentTypes.DUSTSMALL); + mSizedDusts[1] = new BaseItemComponent(aMat, ComponentTypes.DUSTTINY); + } + } + + public BaseItemDust(DustState aState, Material aMat) { + super(aMat, ComponentTypes.DUST); + if (aState.generatesSmallDust()) { + mSizedDusts[0] = new BaseItemComponent(aMat, ComponentTypes.DUSTSMALL); + } + if (aState.generatesTinyDust()) { + mSizedDusts[1] = new BaseItemComponent(aMat, ComponentTypes.DUSTTINY); + } + } + + private BaseItemDust(String unlocalizedName, String materialName, Material matInfo, int colour, String pileSize, int tier, boolean addRecipes) { + super(matInfo, ComponentTypes.DUST); + } + + public static class DustState { + static final int NORMAL = (1); + static final int SMALL = (10); + static final int TINY = (100); + final int MIXTURE; + final boolean[] doesThings = new boolean[3]; + + public DustState (boolean genDust, boolean genSmallDust, boolean genDustTiny){ + int aTotal = 0; + if (genDust) { + aTotal += NORMAL; + doesThings[0] = true; + } + else { + doesThings[0] = false; + } + if (genSmallDust) { + aTotal += SMALL; + doesThings[1] = true; + } + else { + doesThings[1] = false; + } + if (genDustTiny) { + aTotal += TINY; + doesThings[2] = true; + } + else { + doesThings[2] = false; + } + MIXTURE = aTotal; + } + + public boolean generatesDust() { + return doesThings[0]; + } + public boolean generatesSmallDust() { + return doesThings[1]; + } + public boolean generatesTinyDust() { + return doesThings[2]; + } + + private DustState(int amount) { + + if (amount == 1) { + doesThings[0] = true; + doesThings[1] = false; + doesThings[2] = false; + + } + else if (amount == 10) { + doesThings[0] = false; + doesThings[1] = true; + doesThings[2] = false; + } + else if (amount == 100) { + doesThings[0] = false; + doesThings[1] = false; + doesThings[2] = true; + + } + else if (amount == 11) { + doesThings[0] = true; + doesThings[1] = true; + doesThings[2] = false; + + } + else if (amount == 101) { + doesThings[0] = true; + doesThings[1] = false; + doesThings[2] = true; + + } + else if (amount == 110) { + doesThings[0] = false; + doesThings[1] = true; + doesThings[2] = true; + + } + else if (amount == 111) { + doesThings[0] = true; + doesThings[1] = true; + doesThings[2] = true; + } + else { + doesThings[0] = false; + doesThings[1] = false; + doesThings[2] = false; + } + MIXTURE = amount; + } + + public DustState get(int a) { + if (a == 1) { + return new DustState(NORMAL); + } + else if (a == 10) { + return new DustState(SMALL); + } + else if (a == 100) { + return new DustState(TINY); + } + else { + return new DustState(MIXTURE); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java new file mode 100644 index 0000000000..8ee871e9c4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustAbstract.java @@ -0,0 +1,44 @@ +package gtPlusPlus.core.item.base.dusts; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.lib.CORE; + +public abstract class BaseItemDustAbstract extends Item{ + + protected int colour = 0; + protected String materialName; + protected String pileType; + + public BaseItemDustAbstract(final String unlocalizedName, final String materialName, final int colour, final String pileSize) { + this.setUnlocalizedName(unlocalizedName); + this.setMaxStackSize(64); + if (pileSize.equalsIgnoreCase("dust")){ + this.setTextureName(CORE.MODID + ":" + "dust"); + } + else{ + this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); + } + this.setMaxStackSize(64); + this.colour = colour; + this.materialName = materialName; + this.setUnlocalizedName(unlocalizedName); + GameRegistry.registerItem(this, unlocalizedName); + } + + @SuppressWarnings("rawtypes") + @Override + public abstract void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool); + + public abstract String getMaterialName(); + + @Override + public abstract int getColorFromItemStack(ItemStack stack, int hex); + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java new file mode 100644 index 0000000000..0757177e58 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustEx.java @@ -0,0 +1,126 @@ +package gtPlusPlus.core.item.base.dusts; + +import java.util.*; + +import org.apache.commons.lang3.StringUtils; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.TextureSet; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemDustEx extends BaseItemComponent{ + + public static Map mCachedPileLinkages = new HashMap(); + + protected IIcon[] baseAr = new IIcon[3]; + protected IIcon[] overlayAr = new IIcon[3]; + public final static ComponentTypes[] componentTypeAr = new ComponentTypes[] {ComponentTypes.DUST, ComponentTypes.DUSTSMALL, ComponentTypes.DUSTTINY}; + + public BaseItemDustEx(final Material material) { + super(material, componentTypeAr[0]); + //OreDict this beauty + GT_OreDictUnificator.registerOre(componentTypeAr[0].getOreDictName()+material.getUnlocalizedName(), ItemUtils.simpleMetaStack(this, 0, 1)); + GT_OreDictUnificator.registerOre(componentTypeAr[1].getOreDictName()+material.getUnlocalizedName(), ItemUtils.simpleMetaStack(this, 0, 1)); + GT_OreDictUnificator.registerOre(componentTypeAr[2].getOreDictName()+material.getUnlocalizedName(), ItemUtils.simpleMetaStack(this, 0, 1)); + bakeRegistry(); + } + + private void bakeRegistry() { + String unlocalName = getUnlocalizedName(); + if (unlocalName.contains("item.")) { + unlocalName = StringUtils.remove(unlocalName, "item."); + } + if (unlocalName.contains("itemDust")) { + unlocalName = StringUtils.remove(unlocalName, "itemDust"); + } + mCachedPileLinkages.put(this.getUnlocalizedName(), "itemDust"+unlocalName); + mCachedPileLinkages.put(this.getUnlocalizedName(), "itemDustSmall"+unlocalName); + mCachedPileLinkages.put(this.getUnlocalizedName(), "itemDustTiny"+unlocalName); + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 3; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public IIcon getIconFromDamageForRenderPass(int meta, int pass) { + if (CORE.ConfigSwitches.useGregtechTextures) { + if (meta == 0) { + if (pass == 0) { + return this.baseAr[0]; + } + else { + return this.overlayAr[0]; + } + } + else if (meta == 1) { + if (pass == 0) { + return this.baseAr[1]; + } + else { + return this.overlayAr[1]; + } + } + else { + if (pass == 0) { + return this.baseAr[2]; + } + else { + return this.overlayAr[2]; + } + } + } + else { + return this.baseAr[meta]; + } + } + + @Override + public void registerIcons(final IIconRegister i) { + if (CORE.ConfigSwitches.useGregtechTextures){ + this.baseAr[0] = i.registerIcon(getCorrectTextures()); + this.overlayAr[0] = i.registerIcon(getCorrectTextures() + "_OVERLAY"); + this.baseAr[1] = i.registerIcon(getCorrectTextures()+"Small"); + this.overlayAr[1] = i.registerIcon(getCorrectTextures() + "Small_OVERLAY"); + this.baseAr[2] = i.registerIcon(getCorrectTextures()+"Tiny"); + this.overlayAr[2] = i.registerIcon(getCorrectTextures() + "Tiny_OVERLAY"); + } + else { + this.baseAr[0] = i.registerIcon(getCorrectTextures()); + this.baseAr[1] = i.registerIcon(getCorrectTextures()+"Small"); + this.baseAr[2] = i.registerIcon(getCorrectTextures()+"Tiny"); + } + } + + @Override + public String getCorrectTextures(){ + if (!CORE.ConfigSwitches.useGregtechTextures){ + return CORE.MODID + ":" + "item"+this.componentType.getComponent(); + } + String metType = "9j4852jyo3rjmh3owlhw9oe"; + if (this.componentMaterial != null) { + TextureSet u = this.componentMaterial.getTextureSet(); + if (u != null) { + metType = u.mSetName; + } + } + metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType); + return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.getOreDictName(); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java new file mode 100644 index 0000000000..e4fa06c58e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java @@ -0,0 +1,162 @@ +package gtPlusPlus.core.item.base.dusts; + +import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemDustUnique extends Item{ + + protected final int colour; + protected final int sRadiation; + protected final String materialName; + protected final String name; + protected final String chemicalNotation; + + public BaseItemDustUnique(final String unlocalizedName, final String materialName, final int colour, final String pileSize) { + this(unlocalizedName, materialName, "NullFormula", colour, pileSize); + } + + public BaseItemDustUnique(final String unlocalizedName, final String materialName, final String mChemicalFormula, final int colour, final String pileSize) { + this.setUnlocalizedName(unlocalizedName); + this.setMaxStackSize(64); + this.setTextureName(this.getCorrectTexture(pileSize)); + this.setCreativeTab(tabMisc); + this.colour = colour; + this.materialName = materialName; + if (mChemicalFormula == null || mChemicalFormula.equals("") || mChemicalFormula.equals("NullFormula")){ + this.chemicalNotation = StringUtils.subscript(materialName); + } + else { + this.chemicalNotation = StringUtils.subscript(mChemicalFormula); + } + this.sRadiation = ItemUtils.getRadioactivityLevel(materialName); + GameRegistry.registerItem(this, unlocalizedName); + + if (this.getUnlocalizedName().contains("DustTiny")){ + this.name = "Tiny Pile of "+this.materialName+ " Dust"; + } + else if (this.getUnlocalizedName().contains("DustSmall")){ + this.name = "Small Pile of "+this.materialName+ " Dust"; + } + else { + this.name = this.materialName+ " Dust"; + } + + String temp = ""; + Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName()); + if (this.getUnlocalizedName().contains("item.")){ + temp = this.getUnlocalizedName().replace("item.", ""); + Logger.WARNING("Generating OreDict Name: "+temp); + } + else { + temp = this.getUnlocalizedName(); + } + if (temp.contains("DustTiny")){ + temp = temp.replace("itemD", "d"); + Logger.WARNING("Generating OreDict Name: "+temp); + } + else if (temp.contains("DustSmall")){ + temp = temp.replace("itemD", "d"); + Logger.WARNING("Generating OreDict Name: "+temp); + } + else { + temp = temp.replace("itemD", "d"); + Logger.WARNING("Generating OreDict Name: "+temp); + } + if ((temp != null) && !temp.equals("")){ + GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); + } + registerComponent(); + } + + public boolean registerComponent() { + if (this.materialName == null) { + return false; + } + String aName = materialName; + //Register Component + Map aMap = Material.mComponentMap.get(aName); + if (aMap == null) { + aMap = new HashMap(); + } + String aKey = OrePrefixes.dust.name(); + ItemStack x = aMap.get(aKey); + if (x == null) { + aMap.put(aKey, ItemUtils.getSimpleStack(this)); + Logger.MATERIALS("Registering a material component. Item: ["+aName+"] Map: ["+aKey+"]"); + Material.mComponentMap.put(aName, aMap); + return true; + } + else { + //Bad + Logger.MATERIALS("Tried to double register a material component. "); + return false; + } + } + + @Override + public String getItemStackDisplayName(final ItemStack iStack) { + return this.name; + } + + private String getCorrectTexture(final String pileSize){ + if (!CORE.ConfigSwitches.useGregtechTextures){ + if ((pileSize.equals("dust")) || (pileSize.equals("Dust"))){ + this.setTextureName(CORE.MODID + ":" + "dust");} + else{ + this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); + } + } + if (pileSize.toLowerCase().contains("small")){ + return "gregtech" + ":" + "materialicons/SHINY/dustSmall"; + } + else if (pileSize.toLowerCase().contains("tiny")){ + return "gregtech" + ":" + "materialicons/SHINY/dustTiny"; + } + return "gregtech" + ":" + "materialicons/SHINY/dust"; + } + + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.sRadiation > 0){ + list.add(CORE.GT_Tooltip_Radioactive); + } + if (this.chemicalNotation.length() > 0 && !chemicalNotation.equals("") && !chemicalNotation.equals("NullFormula")){ + list.add(this.chemicalNotation); + } + super.addInformation(stack, aPlayer, list, bool); + } + + public final String getMaterialName() { + return StringUtils.subscript(this.materialName); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.colour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.colour; + + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java b/src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java new file mode 100644 index 0000000000..c6aff85da1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemCentidust.java @@ -0,0 +1,58 @@ +package gtPlusPlus.core.item.base.dusts.decimal; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; + +public class BaseItemCentidust extends Item{ + + final Material dustMaterial; + final String materialName; + final String unlocalName; + + public BaseItemCentidust(final Material material) { + this.dustMaterial = material; + this.unlocalName = "itemCentidust"+material.getUnlocalizedName(); + this.materialName = material.getLocalizedName(); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(10); + this.setTextureName(CORE.MODID + ":" + "itemCentidust"); //TODO + GameRegistry.registerItem(this, this.unlocalName); + //GT_OreDictUnificator.registerOre(unlocalName.replace("itemR", "r"), UtilsItems.getSimpleStack(this)); //TODO + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return (this.materialName+ " Centidust"); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("")){ + list.add(EnumChatFormatting.GRAY+"1% of a " + this.materialName + " dust pile."); + } + super.addInformation(stack, aPlayer, list, bool); + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return this.dustMaterial.getRgbAsHex(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java b/src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java new file mode 100644 index 0000000000..2d1b4a8d27 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/dusts/decimal/BaseItemDecidust.java @@ -0,0 +1,58 @@ +package gtPlusPlus.core.item.base.dusts.decimal; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; + +public class BaseItemDecidust extends Item{ + + final Material dustMaterial; + final String materialName; + final String unlocalName; + + public BaseItemDecidust(final Material material) { + this.dustMaterial = material; + this.unlocalName = "itemDecidust"+material.getUnlocalizedName(); + this.materialName = material.getLocalizedName(); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(10); + this.setTextureName(CORE.MODID + ":" + "itemDecidust"); //TODO + GameRegistry.registerItem(this, this.unlocalName); + //GT_OreDictUnificator.registerOre(unlocalName.replace("itemR", "r"), UtilsItems.getSimpleStack(this)); //TODO + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return (this.materialName+ " Decidust"); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("")){ + list.add(EnumChatFormatting.GRAY+"10% of a " + this.materialName + " dust pile."); + } + super.addInformation(stack, aPlayer, list, bool); + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return this.dustMaterial.getRgbAsHex(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java b/src/main/java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java new file mode 100644 index 0000000000..3e2816bf52 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/foil/BaseItemFoil.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.base.foil; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemFoil extends BaseItemComponent{ + + public BaseItemFoil(final Material material) { + super(material, BaseItemComponent.ComponentTypes.FOIL); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/foods/BaseItemFood.java b/src/main/java/gtPlusPlus/core/item/base/foods/BaseItemFood.java new file mode 100644 index 0000000000..54aa90c03f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/foods/BaseItemFood.java @@ -0,0 +1,50 @@ +package gtPlusPlus.core.item.base.foods; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class BaseItemFood extends ItemFood { + + private final PotionEffect[] effects; + protected String localName; + + public BaseItemFood(final String unlocalizedName, final String localizedName, final int healAmount, final float saturationModifier, final boolean wolvesFavorite, final PotionEffect... effects) { + super(healAmount, saturationModifier, wolvesFavorite); + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName.replace("Hot", "")); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.effects = effects; + this.localName = localizedName; + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + protected void onFoodEaten(final ItemStack stack, final World world, final EntityPlayer player) { + super.onFoodEaten(stack, world, player); + + for (int i = 0; i < this.effects.length; i ++) { + if (!world.isRemote && (this.effects[i] != null) && (this.effects[i].getPotionID() > 0)) { + player.addPotionEffect(new PotionEffect(this.effects[i].getPotionID(), + this.effects[i].getDuration(), this.effects[i].getAmplifier(), + this.effects[i].getIsAmbient() + ) + ); + } + } + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return ("A Serving of "+this.localName); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java b/src/main/java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java new file mode 100644 index 0000000000..528b9593e6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java @@ -0,0 +1,80 @@ +package gtPlusPlus.core.item.base.foods; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemHotFood extends BaseItemFood{ + + protected String materialName; + protected String unlocalName; + protected int cooldownTime; + protected Item output; + + public BaseItemHotFood(final String unlocalizedName, final int healAmount, final float healSaturation, final String foodName, final int timeToCoolInSeconds, final Item cooledFood) { + super(unlocalizedName, "Hot "+foodName, healAmount, healSaturation, false); + this.unlocalName = unlocalizedName; + this.cooldownTime = timeToCoolInSeconds * 20; + this.materialName = foodName; + this.output = cooledFood; + this.setMaxStackSize(1); + } + + @Override + public ItemStack onEaten(final ItemStack iStack, final World world, final EntityPlayer player) { + return super.onEaten(iStack, world, player); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + //Utils.LOG_INFO("Item Damage: "+iStack.getItemDamage()+" Max Damage: "+iStack.getMaxDamage()); + if (!world.isRemote){ + if(iStack.getItemDamage() == this.cooldownTime) { + if (entityHolding instanceof EntityPlayer){ + Logger.INFO("Foods Done."); + ((EntityPlayer) entityHolding).inventory.addItemStackToInventory(ItemUtils.getSimpleStack(this.output)); + ((EntityPlayer) entityHolding).inventory.consumeInventoryItem(this); + } + }else if(iStack.getItemDamage() < this.cooldownTime){ + iStack.setItemDamage(iStack.getItemDamage() + 1); + } + if(MathUtils.divideXintoY(iStack.getItemDamage(), 150)){ + entityHolding.attackEntityFrom(DamageSource.onFire, 1); + } + + + } + super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("")){ + list.add(EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.RED+"Very hot!"+EnumChatFormatting.GRAY+" Avoid direct handling.."); + list.add(EnumChatFormatting.GRAY+"This food has "+((this.cooldownTime-stack.getItemDamage())/20)+" seconds left, until it is cool."); + } + super.addInformation(stack, aPlayer, list, bool); + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return Utils.rgbtoHexValue(230, 96, 96); + + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/gears/BaseItemGear.java b/src/main/java/gtPlusPlus/core/item/base/gears/BaseItemGear.java new file mode 100644 index 0000000000..b72ea5db15 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/gears/BaseItemGear.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.base.gears; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemGear extends BaseItemComponent{ + + public BaseItemGear(final Material material) { + super(material, BaseItemComponent.ComponentTypes.GEAR); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java b/src/main/java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java new file mode 100644 index 0000000000..5435c692c6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/gears/BaseItemSmallGear.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.base.gears; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemSmallGear extends BaseItemComponent{ + + public BaseItemSmallGear(final Material material) { + super(material, BaseItemComponent.ComponentTypes.SMALLGEAR); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java new file mode 100644 index 0000000000..ea96e2914c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java @@ -0,0 +1,21 @@ +package gtPlusPlus.core.item.base.ingots; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemIngot extends BaseItemComponent{ + + protected final String materialName; + protected final String unlocalName; + + public BaseItemIngot(final Material material) { + this(material, ComponentTypes.INGOT); + } + + public BaseItemIngot(final Material material, final ComponentTypes type) { + super(material, type); + this.materialName = material.getLocalizedName(); + this.unlocalName = material.getUnlocalizedName(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java new file mode 100644 index 0000000000..c19fecd924 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java @@ -0,0 +1,110 @@ +package gtPlusPlus.core.item.base.ingots; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemIngotHot extends BaseItemIngot{ + + private final ItemStack outputIngot; + private int tickCounter = 0; + private final int tickCounterMax = 200; + private final int mTier; + + private IIcon base; + private IIcon overlay; + + public BaseItemIngotHot(final Material material) { + super(material, ComponentTypes.HOTINGOT); + this.setTextureName(CORE.MODID + ":" + "itemIngotHot"); + this.outputIngot = material.getIngot(1); + this.mTier = material.vTier; + this.generateRecipe(); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return super.getItemStackDisplayName(p_77653_1_); + //return ("Hot "+this.materialName+ " Ingot"); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return Utils.rgbtoHexValue(225, 225, 225); + } + + private void generateRecipe(){ + Logger.WARNING("Adding Vacuum Freezer recipe for a Hot Ingot of "+this.materialName+"."); + CORE.RA.addVacuumFreezerRecipe(ItemUtils.getSimpleStack(this), this.outputIngot.copy(), (int) Math.max(this.componentMaterial.getMass() * 3L, 1L), this.componentMaterial.vVoltageMultiplier); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (this.componentMaterial != null){ + if (entityHolding != null && entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyHeatDamageToEntity(1, world, entityHolding); + } + } + } + super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses(){ + if (CORE.ConfigSwitches.useGregtechTextures){ + return true; + } + else { + return false; + } + } + + @Override + public void registerIcons(final IIconRegister i) { + + if (CORE.ConfigSwitches.useGregtechTextures){ + this.base = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot"); + this.overlay = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot_OVERLAY"); + } + else { + this.base = i.registerIcon(CORE.MODID + ":" + "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()); + //this.overlay = i.registerIcon(CORE.MODID + ":" + "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()+"_Overlay"); + } + //this.overlay = cellMaterial.getFluid(1000).getFluid().get + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + if(pass == 0 && CORE.ConfigSwitches.useGregtechTextures) { + return this.base; + } + else if(pass == 1 && CORE.ConfigSwitches.useGregtechTextures) { + return this.overlay; + } + else { + return this.overlay; + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java new file mode 100644 index 0000000000..6ad323333f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java @@ -0,0 +1,101 @@ +package gtPlusPlus.core.item.base.ingots; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemIngot_OLD extends Item{ + + protected int colour; + protected String materialName; + protected String unlocalName; + + public BaseItemIngot_OLD(final String unlocalizedName, final String materialName, final int colour, final int sRadioactivity) { + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.unlocalName = unlocalizedName; + this.setMaxStackSize(64); + this.setTextureName(CORE.MODID + ":" + "itemIngot"); + this.colour = colour; + this.materialName = materialName; + this.sRadiation = sRadioactivity; + GameRegistry.registerItem(this, unlocalizedName); + String temp = ""; + if (this.unlocalName.contains("itemIngot")){ + temp = this.unlocalName.replace("itemI", "i"); + } + else if (this.unlocalName.contains("itemHotIngot")){ + temp = this.unlocalName.replace("itemHotIngot", "ingotHot"); + } + if ((temp != null) && !temp.equals("")){ + GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); + } + //this.generateCompressorRecipe(); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return (this.materialName+ " Ingot"); + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.colour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.colour; + + } + + private void generateCompressorRecipe(){ + if (this.unlocalName.contains("itemIngot")){ + final ItemStack tempStack = ItemUtils.getSimpleStack(this, 9); + ItemStack tempOutput = null; + String temp = this.getUnlocalizedName().replace("item.itemIngot", "block"); + Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName()); + if (this.getUnlocalizedName().contains("item.")){ + temp = this.getUnlocalizedName().replace("item.", ""); + Logger.WARNING("Generating OreDict Name: "+temp); + } + temp = temp.replace("itemIngot", "block"); + Logger.WARNING("Generating OreDict Name: "+temp); + if ((temp != null) && !temp.equals("")){ + tempOutput = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1); + if (tempOutput != null){ + GT_ModHandler.addCompressionRecipe(tempStack, tempOutput); + } + + } + } + else if (this.unlocalName.contains("itemHotIngot")){ + return; + } + + + } + + + protected final int sRadiation; + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java new file mode 100644 index 0000000000..96b5425437 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/FluidItemBlock.java @@ -0,0 +1,61 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.fluids.BlockFluidBase; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class FluidItemBlock extends ItemBlock{ + + protected final int blockColour; + final BlockFluidBase baseBlock; + String name; + + public FluidItemBlock(final Block block) { + super(block); + this.baseBlock = (BlockFluidBase) block; + this.blockColour = this.baseBlock.getRenderColor(1); + this.name = this.baseBlock.getLocalizedName().replace("tile", "").replace("fluid", "").replace("name", "").replace("block", "").replace(".", ""); + //GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), UtilsItems.getSimpleStack(this)); + } + + public int getRenderColor(final int aMeta) { + return this.blockColour; + } + + @Override + public String getItemStackDisplayName(final ItemStack iStack) { + /*if (this.thisFluid != null){ + this.name = "Molten "+this.thisFluid.getLocalizedName(); + return this.name; + }*/ + this.name = "Molten "+this.baseBlock.getLocalizedName().replace("tile", "").replace("fluid", "").replace("name", "").replace("block", "").replace(".", ""); + return this.name; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.blockColour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.blockColour; + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + /*list.add("Temperature: "+MathUtils.celsiusToKelvin(this.thisFluid.getMeltingPointC())+"K"); + if (this.sRadiation > 0){ + list.add(CORE.GT_Tooltip_Radioactive); + }*/ + super.addInformation(stack, aPlayer, list, bool); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java new file mode 100644 index 0000000000..14344c1817 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java @@ -0,0 +1,71 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.interfaces.ITileTooltip; + +public class ItemBlockBasicTile extends ItemBlock { + + private final int mID; + + public ItemBlockBasicTile(final Block block) { + super(block); + this.mID = ((ITileTooltip) block).getTooltipID(); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.mID == 0) { // Fish trap + list.add("This trap catches fish faster if surrounded by more water blocks"); + list.add("Can also be placed beside upto 4 other fish traps"); + list.add("Requires at least two faces touching water"); + list.add("1/1000 chance to produce triple loot."); + } + else if (this.mID == 1) { // Modularity + list.add("Used to construct modular armour & bauble upgrades.."); + } + else if (this.mID == 2) { // Trade + list.add("Allows for SMP trade-o-mat type trading."); + } + else if (this.mID == 3) { // Project + list.add("Scan any crafting recipe in this to mass fabricate them in the Autocrafter.."); + } + else if (this.mID == 4) { // Circuit Table + list.add("Easy Circuit Configuration"); + list.add("Change default setting with a Screwdriver"); + list.add("Default is used to select slot for auto-insertion"); + } + else if (this.mID == 5) { // Decayables Chest + list.add("Chest which holds radioactive materials"); + list.add("Items which decay will tick while inside"); + list.add("Place with right click"); + } + else if (this.mID == 6) { // Butterfly Killer + list.add("Kills Forestry Butterflies, Bats and other pests"); + list.add("Use either Formaldehyde or Hydrogen cyanide"); + list.add("Be weary of your neighbours"); + } + else if (this.mID == 7) { // Egg Box + list.add("A box for holding big eggs"); + } + else if (this.mID == 8){ // Volumetric Flask Setter + list.add("Easy Flask Configuration"); + list.add("Configure default input slot with a screwdriver"); + } + else if (this.mID == 9){ + + } + + else { + list.add("Bad Tooltip ID - " + mID); + } + super.addInformation(stack, aPlayer, list, bool); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java new file mode 100644 index 0000000000..2aba494d6e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java @@ -0,0 +1,100 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class ItemBlockDoor extends ItemBlock { + @SideOnly(Side.CLIENT) + private IIcon field_150938_b; + + public ItemBlockDoor(Block p_i45328_1_) { + super(p_i45328_1_); + } + + /** + * Callback for item usage. If the item does something special on right + * clicking, he will have one of those. Return True if something happen and + * false if it don't. This is for ITEMS, not BLOCKS + */ + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, + int par5, int par6, int par7, float par8, float par9, float par10) { + if (par7 != 1) { + return false; + } else { + ++par5; + Block block; + + block = field_150939_a; + + if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) + && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)) { + if (!block.canPlaceBlockAt(par3World, par4, par5, par6)) { + return false; + } else { + int i1 = MathHelper.floor_double( + (double) ((par2EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3; + byte b0 = 0; + byte b1 = 0; + + if (i1 == 0) { + b1 = 1; + } + + if (i1 == 1) { + b0 = -1; + } + + if (i1 == 2) { + b1 = -1; + } + + if (i1 == 3) { + b0 = 1; + } + + int i2 = (par3World.getBlock(par4 - b0, par5, par6 - b1).isNormalCube() ? 1 : 0) + + (par3World.getBlock(par4 - b0, par5 + 1, par6 - b1).isNormalCube() ? 1 : 0); + int j1 = (par3World.getBlock(par4 + b0, par5, par6 + b1).isNormalCube() ? 1 : 0) + + (par3World.getBlock(par4 + b0, par5 + 1, par6 + b1).isNormalCube() ? 1 : 0); + boolean flag = par3World.getBlock(par4 - b0, par5, par6 - b1) == block + || par3World.getBlock(par4 - b0, par5 + 1, par6 - b1) == block; + boolean flag1 = par3World.getBlock(par4 + b0, par5, par6 + b1) == block + || par3World.getBlock(par4 + b0, par5 + 1, par6 + b1) == block; + boolean flag2 = false; + + if (flag && !flag1) { + flag2 = true; + } else if (j1 > i2) { + flag2 = true; + } + + par3World.setBlock(par4, par5, par6, block, i1, 2); + par3World.setBlock(par4, par5 + 1, par6, block, 8 | (flag2 ? 1 : 0), 2); + par3World.notifyBlocksOfNeighborChange(par4, par5, par6, block); + par3World.notifyBlocksOfNeighborChange(par4, par5 + 1, par6, block); + + --par1ItemStack.stackSize; + return true; + } + } else { + return false; + } + } + } + + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + p_77624_3_.add("This is a block, you can place it by right clicking"); + super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java new file mode 100644 index 0000000000..ac6740f268 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockEntityBase.java @@ -0,0 +1,41 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.block.general.BlockTankXpConverter; +import gtPlusPlus.core.creative.AddToCreativeTab; + +public class ItemBlockEntityBase extends ItemBlock { + + public ItemBlockEntityBase(final Block block) { + super(block); + this.setMaxDamage(0); + //this.setHasSubtypes(true); + this.setCreativeTab(AddToCreativeTab.tabMachines); + } + + @Override + public int getColorFromItemStack(final ItemStack p_82790_1_, final int p_82790_2_) { + return super.getColorFromItemStack(p_82790_1_, p_82790_2_); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (Block.getBlockFromItem(stack.getItem()) instanceof BlockTankXpConverter){ + /*list.add(EnumChatFormatting.GRAY+"Can convert Liquid Xp to Mob Essence and back."); + list.add(EnumChatFormatting.GRAY+"Right click with a Screwdriver to change mode."); + list.add(EnumChatFormatting.GRAY+"Shift+Right click to view tank information.");*/ + list.add(EnumChatFormatting.GRAY+"Currently disabled, Use a GT Brewery instead. (New Recipes Added!)"); + } + super.addInformation(stack, aPlayer, list, bool); + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java new file mode 100644 index 0000000000..396689ef63 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java @@ -0,0 +1,156 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.block.base.BlockBaseModular; +import gtPlusPlus.core.block.base.BlockBaseOre; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; + +public class ItemBlockGtBlock extends ItemBlock { + + protected final int blockColour; + private int sRadiation; + + private Material mMaterial; + + private final Block thisBlock; + private boolean isOre = false; + private boolean isModular = false; + + public ItemBlockGtBlock(final Block block) { + super(block); + this.thisBlock = block; + if (block instanceof BlockBaseOre) { + this.isOre = true; + } else if (block instanceof BlockBaseModular) { + this.isModular = true; + } + final BlockBaseModular baseBlock = (BlockBaseModular) block; + if (isModular) { + this.blockColour = baseBlock.getRenderColor(0); + } else if (isOre) { + this.blockColour = block.getBlockColor(); + } else { + this.blockColour = block.getBlockColor(); + } + + if (block instanceof BlockBaseModular){ + BlockBaseModular g = (BlockBaseModular) block; + this.mMaterial = g.getMaterialEx(); + } + else { + this.mMaterial = null; + } + + // GT_OreDictUnificator.registerOre("block"+block.getUnlocalizedName().replace("tile.block", + // "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block", + // "").replace("-", "").replace("_", "").replace(" ", ""), + // ItemUtils.getSimpleStack(this)); + } + + public int getRenderColor(final int aMeta) { + return this.blockColour; + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + if (this.mMaterial != null) { + list.add(this.mMaterial.vChemicalFormula); + } else { + + try { + BlockBaseModular g = (BlockBaseModular) thisBlock; + this.mMaterial = g.getMaterialEx(); + } + catch (Throwable t) { + + } + + + //list.add("Material is Null."); + } + + if (this.isOre) { + if (KeyboardUtils.isCtrlKeyDown()) { + Block b = Block.getBlockFromItem(stack.getItem()); + if (b != null) { + + String aTool = b.getHarvestTool(stack.getItemDamage()); + int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); + + if (this.mMaterial != null) { + list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); + list.add("Contains: "); + if (mMaterial.getComposites().isEmpty()) { + list.add("- " + mMaterial.getLocalizedName()); + } else { + for (MaterialStack m : mMaterial.getComposites()) { + list.add("- " + m.getStackMaterial().getLocalizedName() + " x" + m.getPartsPerOneHundred()); + } + } + } + } + } else { + list.add(EnumChatFormatting.DARK_GRAY + "Hold Ctrl to show additional info."); + } + } + else { + Block b = Block.getBlockFromItem(stack.getItem()); + if (b != null) { + String aTool = b.getHarvestTool(stack.getItemDamage()); + int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); + list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); + } + } + + if (this.mMaterial != null) { + if (this.mMaterial.vRadiationLevel > 0) { + list.add(CORE.GT_Tooltip_Radioactive); + } + } + + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, + final boolean p_77663_5_) { + + if (!isModular && !isOre) { + mMaterial = null; + } else { + if (this.mMaterial == null) { + Block b = Block.getBlockFromItem(iStack.getItem()); + if (isOre) { + mMaterial = ((BlockBaseOre) b).getMaterialEx(); + } else { + mMaterial = ((BlockBaseModular) b).getMaterialEx(); + } + if (mMaterial != null) { + this.sRadiation = mMaterial.vRadiationLevel; + } else { + this.sRadiation = 0; + } + } + if (this.sRadiation > 0) { + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); + } + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java new file mode 100644 index 0000000000..0dd125bf7b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java @@ -0,0 +1,94 @@ +package gtPlusPlus.core.item.base.itemblock; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import java.util.List; + +import gtPlusPlus.core.block.base.BlockBaseModular; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; + +public class ItemBlockGtFrameBox extends ItemBlock{ + + protected int blockColour; + private Material mMaterial; + private int sRadiation; + + public ItemBlockGtFrameBox(final Block block) { + super(block); + final BlockBaseModular baseBlock = (BlockBaseModular) block; + this.blockColour = baseBlock.getRenderColor(1); + + + + if (block instanceof BlockBaseModular){ + BlockBaseModular g = (BlockBaseModular) block; + this.mMaterial = g.getMaterialEx(); + sRadiation = mMaterial.vRadiationLevel; + } + else { + this.mMaterial = null; + sRadiation = 0; + } + + //GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), ItemUtils.getSimpleStack(this)); + } + + public int getRenderColor(final int aMeta) { + return this.blockColour; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.mMaterial != null) { + list.add(this.mMaterial.vChemicalFormula); + if (this.mMaterial.vRadiationLevel > 0) { + list.add(CORE.GT_Tooltip_Radioactive); + } + } else { + list.add("Material is Null."); + } + if (KeyboardUtils.isCtrlKeyDown()) { + Block b = Block.getBlockFromItem(stack.getItem()); + if (b != null) { + String aTool = b.getHarvestTool(stack.getItemDamage()); + int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); + list.add("Mining Level: " + Math.min(Math.max(aMiningLevel1, 0), 5)); + if (this.mMaterial != null) { + list.add("Contains: "); + if (mMaterial.getComposites().isEmpty()) { + list.add("- " + mMaterial.getLocalizedName()); + } else { + for (MaterialStack m : mMaterial.getComposites()) { + list.add("- " + m.getStackMaterial().getLocalizedName() + " x" + m.getPartsPerOneHundred()); + } + } + } + } + } else { + list.add(EnumChatFormatting.DARK_GRAY + "Hold Ctrl to show additional info."); + } + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, + final boolean p_77663_5_) { + + if (this.sRadiation > 0) { + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java new file mode 100644 index 0000000000..b26ac67225 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java @@ -0,0 +1,114 @@ +package gtPlusPlus.core.item.base.itemblock; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlockWithMetadata; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class ItemBlockMeta extends ItemBlockWithMetadata +{ + private final Block mBlock; + private HashMap> aTooltips = new LinkedHashMap>(); + + public ItemBlockMeta(final Block aBlock) + { + super(aBlock, aBlock); + this.mBlock = aBlock; + this.setMaxDamage(0); + this.setHasSubtypes(true); + if (aBlock instanceof ITileTooltip) { + ITileTooltip aTooltip = (ITileTooltip) aBlock; + //aTooltips.put(aTooltip.getTooltipID(), aTooltip.getTooltipMap()); + } + } + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + Block aThis = Block.getBlockFromItem(stack.getItem()); + if (aThis != null) { + if (!aTooltips.isEmpty()) { + AutoMap h = aTooltips.get(stack.getItemDamage()); + if (h != null && !h.isEmpty()) { + for (String s : h) { + list.add(s); + } + } + } + } + super.addInformation(stack, aPlayer, list, bool); + } + + /** + * Gets an icon index based on an item's damage value + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(final int p_77617_1_) + { + return this.mBlock.getIcon(2, p_77617_1_); + } + + /** + * Returns the metadata of the block which this Item (ItemBlock) can place + */ + @Override + public int getMetadata(final int p_77647_1_) + { + return p_77647_1_; + } + + @Override + public String getUnlocalizedName(final ItemStack stack) { + return this.getUnlocalizedName() + "." + stack.getItemDamage(); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { + return false; + } + + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + return false; + } + + @Override + public int getDisplayDamage(ItemStack stack) { + return 0; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + return 0; + } + + @Override + public int getItemEnchantability(ItemStack stack) { + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java new file mode 100644 index 0000000000..99367c5ef5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java @@ -0,0 +1,104 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.tileentities.base.TileEntityBase; +import gtPlusPlus.core.util.minecraft.PlayerUtils; + +public class ItemBlockNBT extends ItemBlock { + + + protected final int mID; + + public ItemBlockNBT(final Block block) { + super(block); + this.mID = ((ITileTooltip) block).getTooltipID(); + } + + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + //if () + + + + if (this.mID == 0){ //blockDarkWorldPortalFrame + list.add("Assembled in the same shape as the Nether Portal."); + } + } + + + + @Override + public void onCreated(ItemStack item, World world, EntityPlayer player) { + addNBT(player, item); + super.onCreated(item, world, player); + } + + @Override + public void onUpdate(ItemStack item, World world, Entity entity, int p_77663_4_, boolean p_77663_5_) { + if (entity instanceof EntityPlayerMP) { + EntityPlayerMP mPlayer = (EntityPlayerMP) entity; + + NBTTagCompound rNBT = item.getTagCompound(); + rNBT = ((rNBT == null) ? new NBTTagCompound() : rNBT); + if (!rNBT.hasKey("mOwner")){ + addNBT(mPlayer, item); + } + } + super.onUpdate(item, world, entity, p_77663_4_, p_77663_5_); + } + + private void addNBT(EntityPlayer player, ItemStack item) { + NBTTagCompound rNBT = item.getTagCompound(); + rNBT = ((rNBT == null) ? new NBTTagCompound() : rNBT); + if (player != null) { + boolean mOP = PlayerUtils.isPlayerOP(player); + rNBT.setString("mOwner", player.getDisplayName()); + rNBT.setString("mUUID", ""+player.getUniqueID()); + rNBT.setBoolean("mOP", mOP); + } + else if (player == null) { + rNBT.setString("mOwner", "fakeplayer"); + rNBT.setString("mUUID", "00000000"); + rNBT.setBoolean("mOP", false); + } + GT_Utility.ItemNBT.setNBT(item, rNBT); + } + + @Override + public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, + float hitX, float hitY, float hitZ, int aMeta) { + if (!(aWorld.setBlock(aX, aY, aZ, this.field_150939_a, 0, 3))) { + return false; + } + if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { + this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); + this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, aMeta); + } + TileEntityBase tTileEntity = (TileEntityBase) aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null && aPlayer != null) { + if (tTileEntity.isServerSide()){ + Logger.INFO("Setting Tile Entity information"); + NBTTagCompound aNBT = GT_Utility.ItemNBT.getNBT(aStack); + tTileEntity.setOwnerInformation(aNBT.getString("mOwner"), aNBT.getString("mUUID"), aNBT.getBoolean("mOP")); + } + } + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java new file mode 100644 index 0000000000..e4079521d4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java @@ -0,0 +1,161 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.block.base.BlockBaseOre; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.everglades.gen.gt.WorldGen_GT_Ore_Layer; + +public class ItemBlockOre extends ItemBlock{ + + private final BlockBaseOre mThisOre; + private final Material mThisMaterial; + private final int mThisRadiation; + private final int mThisColour; + + public ItemBlockOre(final Block block) { + super(block); + if (block instanceof BlockBaseOre){ + this.mThisOre = (BlockBaseOre) block; + this.mThisMaterial = this.mThisOre.getMaterialEx(); + this.mThisRadiation = this.mThisMaterial.vRadiationLevel; + this.mThisColour = this.mThisMaterial.getRgbAsHex(); + } + else { + this.mThisOre = null; + this.mThisMaterial = null; + this.mThisRadiation = 0; + this.mThisColour = Utils.rgbtoHexValue(255, 255, 255); + } + } + + public int getRenderColor(final int aMeta) { + return this.mThisColour; + } + + private static Map> mMapOreBlockItemToDimName = new LinkedHashMap>(); + private static boolean mInitOres_Everglades = false; + private AutoMap mDimsForThisOre = new AutoMap(); + + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + if (!mInitOres_Everglades) { + for (WorldGen_GT_Ore_Layer f : gtPlusPlus.everglades.gen.gt.WorldGen_Ores.validOreveins.values()) { + Material[] m2 = new Material[] {f.mPrimary, f.mSecondary, f.mBetween, f.mSporadic}; + for (Material m1 : m2) { + AutoMap aMap = mMapOreBlockItemToDimName.get(m1.getUnlocalizedName().toLowerCase()); + if (aMap == null) { + aMap = new AutoMap(); + } + String aDimName = "Everglades"; + if (!aMap.containsValue(aDimName)) { + aMap.put(aDimName); + } + mMapOreBlockItemToDimName.put(m1.getUnlocalizedName().toLowerCase(), aMap); + } + } + mInitOres_Everglades = true; + } + + + if (this.mThisMaterial != null){ + list.add(this.mThisMaterial.vChemicalFormula); + } + + //Radioactive? + if (this.mThisRadiation > 0){ + list.add(CORE.GT_Tooltip_Radioactive); + } + + /** + * Tooltip Handler for Ores + */ + if (this.mThisMaterial == FLUORIDES.FLUORITE){ + list.add("Mined from Sandstone with a 1/"+(CORE.ConfigSwitches.chanceToDropFluoriteOre*20)+" chance, or Limestone with a 1/"+(CORE.ConfigSwitches.chanceToDropFluoriteOre)+" chance."); + } + + if (this.mThisMaterial != null) { + list.add("Ore contains: "); + if (mThisMaterial.getComposites().isEmpty()) { + list.add("- "+mThisMaterial.getLocalizedName()); + } + else { + for (MaterialStack m : mThisMaterial.getComposites()) { + list.add("- "+m.getStackMaterial().getLocalizedName()+" x"+m.getPartsPerOneHundred()); + } + } + } + + if (KeyboardUtils.isCtrlKeyDown()) { + + Block b = Block.getBlockFromItem(stack.getItem()); + if (b != null) { + String aTool = b.getHarvestTool(stack.getItemDamage()); + int aMiningLevel1 = b.getHarvestLevel(stack.getItemDamage()); + if (aMiningLevel1 != 0) { + list.add("Mining Level: "+Math.min(Math.max(aMiningLevel1, 0), 5)); + } + } + + if (mDimsForThisOre.isEmpty()) { + AutoMap A = mMapOreBlockItemToDimName.get(this.mThisMaterial.getUnlocalizedName().toLowerCase()); + if (A != null) { + mDimsForThisOre = A; + } + } + + list.add("Found: "); + if (!mDimsForThisOre.isEmpty()) { + for (String m : mDimsForThisOre) { + list.add("- "+m); + } + } + else { + list.add("- Unknown"); + } + + } + else { + list.add(EnumChatFormatting.DARK_GRAY+"Hold Ctrl to show additional info."); + } + + + + + + + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (this.mThisMaterial != null){ + if (this.mThisRadiation > 0){ + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.mThisMaterial.vRadiationLevel, world, entityHolding); + } + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java new file mode 100644 index 0000000000..7a4222ed0f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockRoundRobinator.java @@ -0,0 +1,115 @@ +package gtPlusPlus.core.item.base.itemblock; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlockWithMetadata; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class ItemBlockRoundRobinator extends ItemBlockWithMetadata +{ + private final Block mBlock; + + public ItemBlockRoundRobinator(final Block aBlock){ + super(aBlock, aBlock); + this.mBlock = aBlock; + } + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add("Attempts to output items evenly on all four horizontal planes"); + if (stack.getItemDamage() == 0) { + list.add("1 Item per enabled side every 400 ticks"); + } + else if (stack.getItemDamage() == 1) { + list.add("1 Item per enabled side every 100 ticks"); + } + else if (stack.getItemDamage() == 2) { + list.add("1 Item per enabled side every 20 ticks"); + } + else if (stack.getItemDamage() == 3) { + list.add("1 Item per enabled side every 10 ticks"); + } + else if (stack.getItemDamage() == 4) { + list.add("1 Item per enabled side every tick"); + } + list.add("Top and bottom do not pull, so you must push items in"); + list.add("Sides can also be disabled with a screwdriver"); + list.add("Shift+RMB with empty hand to view inventory contents"); + super.addInformation(stack, aPlayer, list, bool); + } + + /** + * Gets an icon index based on an item's damage value + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(final int p_77617_1_) + { + return this.mBlock.getIcon(0, p_77617_1_); + } + + /** + * Returns the metadata of the block which this Item (ItemBlock) can place + */ + @Override + public int getMetadata(final int p_77647_1_) + { + return p_77647_1_; + } + + @Override + public String getUnlocalizedName(final ItemStack stack) { + return this.getUnlocalizedName() + "." + stack.getItemDamage(); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { + return false; + } + + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + return false; + } + + @Override + public int getDisplayDamage(ItemStack stack) { + return 0; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + return 0; + } + + @Override + public int getItemEnchantability(ItemStack stack) { + return 0; + } + + @Override + public boolean getHasSubtypes() { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java new file mode 100644 index 0000000000..53c9cdb193 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/itemblock/ItemBlockSpawner.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; +import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class ItemBlockSpawner extends ItemBlockMeta{ + + private final Block mBlock; + + public ItemBlockSpawner(Block aBlock) { + super(aBlock); + mBlock = aBlock; + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aBool) { + if (mBlock != null) { + int x = this.getMetadata(aStack.getItemDamage()); + if (x >= 0) { + try { + EntityRegistration x1 = EntityRegistry.instance().lookupModSpawn(TileEntityGenericSpawner.mSpawners.get(x), false); + if (x1 != null) { + aList.add(EnumChatFormatting.RED+x1.getEntityName()); + } + } + catch (Throwable t) {} + } + } + super.addInformation(aStack, aPlayer, aList, aBool); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java b/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java new file mode 100644 index 0000000000..25070ad817 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java @@ -0,0 +1,174 @@ +package gtPlusPlus.core.item.base.misc; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemMisc extends Item{ + + public final String displayName; + public final String unlocalName; + public final MiscTypes miscType; + public final Object componentColour; + public final String[] description; + + public BaseItemMisc( + final String displayName, + final short[] RGB, + final int maxStackSize, + final MiscTypes miscType, + String[] description) { + + //Set-up the Misc Generic Item + this.displayName = displayName; + String unlocalName = Utils.sanitizeString(displayName); + this.unlocalName = "item"+miscType.TYPE+unlocalName; + this.miscType = miscType; + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(maxStackSize); + //this.setTextureName(this.getCorrectTextures()); + if (RGB != null){ + this.componentColour = Utils.rgbtoHexValue(RGB[0], RGB[1], RGB[2]); + } + else { + this.componentColour = null; + } + this.description = description; + GameRegistry.registerItem(this, this.unlocalName); + GT_OreDictUnificator.registerOre(miscType.getOreDictPrefix()+unlocalName, ItemUtils.getSimpleStack(this)); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return this.displayName+miscType.DISPLAY_NAME_SUFFIX; + } + + private String getCorrectTextures(){ + return CORE.MODID + ":" + "item"+this.miscType.TYPE; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return this.miscType == MiscTypes.DROP; + } + + @Override + public int getRenderPasses(int meta) { + return (this.miscType == MiscTypes.DROP) ? 2 : 1; + } + + @SideOnly(Side.CLIENT) + private IIcon secondIcon; + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister par1IconRegister) { + if (this.miscType == MiscTypes.DROP && LoadedMods.Forestry){ + this.itemIcon = par1IconRegister.registerIcon("forestry:honeyDrop.0"); + this.secondIcon = par1IconRegister.registerIcon("forestry:honeyDrop.1"); + } + else { + this.itemIcon = par1IconRegister.registerIcon(getCorrectTextures()); + } + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return (pass == 0) ? itemIcon : secondIcon; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.description != null){ //Incase I don't add one + if (this.description.length > 0){ //Incase I somehow add a blank one + for (int x=0;x aColourMap = new LinkedHashMap (); + private final int aMaxCount; + + public BaseItemParticle(String aType, int aCount, EnumRarity aRarity) { + super("particle"+aType, aType, AddToCreativeTab.tabOther, 64, 0, new String[] {}, aRarity, EnumChatFormatting.DARK_AQUA, false, null); + this.setTextureName(CORE.MODID + ":" + "science/Atom"); + aMaxCount = aCount; + this.setHasSubtypes(true); + + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return aColourMap.get(stack.getItemDamage()); + } + + public int getColorFromParentClass(ItemStack stack, int aaa) { + return super.getColorFromItemStack(stack, aaa); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < aMaxCount; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + + @Override + public final String getItemStackDisplayName(final ItemStack tItem) { + String aReturnValue = super.getItemStackDisplayName(tItem); + String[] a2 = getAffixes(); + aReturnValue = (a2[0] + aReturnValue + a2[1]); + return aReturnValue; + } + + public abstract String[] getAffixes(); + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java b/src/main/java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java new file mode 100644 index 0000000000..1644856bf8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/nugget/BaseItemNugget.java @@ -0,0 +1,12 @@ +package gtPlusPlus.core.item.base.nugget; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemNugget extends BaseItemComponent{ + + public BaseItemNugget(final Material material) { + super(material, BaseItemComponent.ComponentTypes.NUGGET); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java new file mode 100644 index 0000000000..73a13f568d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCentrifugedCrushedOre.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.base.ore; + +import gtPlusPlus.core.material.Material; + +public class BaseItemCentrifugedCrushedOre extends BaseOreComponent{ + + public BaseItemCentrifugedCrushedOre(final Material material) { + super(material, BaseOreComponent.ComponentTypes.CRUSHEDCENTRIFUGED); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java new file mode 100644 index 0000000000..f2ca40334f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.base.ore; + +import gtPlusPlus.core.material.Material; + +public class BaseItemCrushedOre extends BaseOreComponent{ + + public BaseItemCrushedOre(final Material material) { + super(material, BaseOreComponent.ComponentTypes.CRUSHED); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java new file mode 100644 index 0000000000..45dc4f4402 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemImpureDust.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.base.ore; + +import gtPlusPlus.core.material.Material; + +public class BaseItemImpureDust extends BaseOreComponent{ + + public BaseItemImpureDust(final Material material) { + super(material, BaseOreComponent.ComponentTypes.DUSTIMPURE); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java new file mode 100644 index 0000000000..4edf4ae75d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java @@ -0,0 +1,25 @@ +package gtPlusPlus.core.item.base.ore; + +import gregtech.api.enums.Materials; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import net.minecraft.item.Item; + +public class BaseItemMilledOre extends BaseOreComponent{ + + public BaseItemMilledOre(final Material material, int aMaterialEU) { + super(material, BaseOreComponent.ComponentTypes.MILLED); + CORE.RA.addMillingRecipe(material, aMaterialEU); + } + + public static Item generate(Materials aMat, int aMaterialEU) { + return generate(MaterialUtils.generateMaterialFromGtENUM(aMat), aMaterialEU); + } + + public static Item generate(Material aMat, int aMaterialEU) { + return new BaseItemMilledOre(aMat, aMaterialEU); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java new file mode 100644 index 0000000000..3f2a1c23e6 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedCrushedOre.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.base.ore; + +import gtPlusPlus.core.material.Material; + +public class BaseItemPurifiedCrushedOre extends BaseOreComponent{ + + public BaseItemPurifiedCrushedOre(final Material material) { + super(material, BaseOreComponent.ComponentTypes.CRUSHEDPURIFIED); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java new file mode 100644 index 0000000000..0c9816fb56 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseItemPurifiedDust.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.base.ore; + +import gtPlusPlus.core.material.Material; + +public class BaseItemPurifiedDust extends BaseOreComponent{ + + public BaseItemPurifiedDust(final Material material) { + super(material, BaseOreComponent.ComponentTypes.DUSTPURE); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java new file mode 100644 index 0000000000..2cb23b3f97 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java @@ -0,0 +1,279 @@ +package gtPlusPlus.core.item.base.ore; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class BaseOreComponent extends Item{ + + @SideOnly(Side.CLIENT) + private IIcon base; + @SideOnly(Side.CLIENT) + private IIcon overlay; + + public final Material componentMaterial; + public final String materialName; + public final String unlocalName; + public final ComponentTypes componentType; + public final int componentColour; + public Object extraData; + + public BaseOreComponent(final Material material, final ComponentTypes componentType) { + this.componentMaterial = material; + this.unlocalName = componentType.COMPONENT_NAME+material.getUnlocalizedName(); + this.materialName = material.getLocalizedName(); + this.componentType = componentType; + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(64); + this.componentColour = material.getRgbAsHex(); + GameRegistry.registerItem(this, this.unlocalName); + registerComponent(); + GT_OreDictUnificator.registerOre(componentType.getComponent()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); + if (LoadedMods.Thaumcraft) { + //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.METALLUM.mAspect), 1); + if (componentMaterial.isRadioactive) { + //ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel); + } + } + + } + + public boolean registerComponent() { + Logger.MATERIALS("Attempting to register "+this.getUnlocalizedName()+"."); + if (this.componentMaterial == null) { + Logger.MATERIALS("Tried to register "+this.getUnlocalizedName()+" but the material was null."); + return false; + } + //Register Component + Map aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName()); + if (aMap == null) { + aMap = new HashMap(); + } + String aKey = "Invalid"; + if (componentType == ComponentTypes.CRUSHED) { + aKey = OrePrefixes.crushed.name(); + } + else if (componentType == ComponentTypes.CRUSHEDCENTRIFUGED) { + aKey = OrePrefixes.crushedCentrifuged.name(); + } + else if (componentType == ComponentTypes.CRUSHEDPURIFIED) { + aKey = OrePrefixes.crushedPurified.name(); + } + else if (componentType == ComponentTypes.DUST) { + aKey = OrePrefixes.dust.name(); + } + else if (componentType == ComponentTypes.DUSTIMPURE) { + aKey = OrePrefixes.dustImpure.name(); + } + else if (componentType == ComponentTypes.DUSTPURE) { + aKey = OrePrefixes.dustPure.name(); + } + else if (componentType == ComponentTypes.MILLED) { + aKey = CustomOrePrefix.milled.get().name(); + } + + ItemStack x = aMap.get(aKey); + if (x == null) { + aMap.put(aKey, ItemUtils.getSimpleStack(this)); + Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); + Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); + return true; + } + else { + //Bad + Logger.MATERIALS("Tried to double register a material component. "); + return false; + } + } + + /*@Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); + }*/ + + public final String getMaterialName() { + return this.materialName; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.materialName != null && !this.materialName.equals("")){ + if (this.componentMaterial != null){ + if (!this.componentMaterial.vChemicalFormula.contains("?")) { + list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula)); + } + else if (this.componentMaterial.vChemicalFormula.contains("?")) { + String temp = componentMaterial.vChemicalFormula; + temp = temp.replace(" ", ""); + temp = temp.replace("-", ""); + temp = temp.replace("_", ""); + temp = temp.replace("!", ""); + temp = temp.replace("@", ""); + temp = temp.replace("#", ""); + temp = temp.replace(" ", ""); + list.add(temp); + } + if (this.componentMaterial.isRadioactive){ + list.add(CORE.GT_Tooltip_Radioactive+" | Level: "+this.componentMaterial.vRadiationLevel); + } + } + else { + String aChemicalFormula = Material.sChemicalFormula.get(materialName.toLowerCase()); + if (aChemicalFormula != null && aChemicalFormula.length() > 0) { + list.add(Utils.sanitizeStringKeepBrackets(aChemicalFormula)); + } + } + } + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (this.componentMaterial != null){ + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.componentMaterial.vRadiationLevel, world, entityHolding); + } + } + } + } + + + + /** + * Rendering Related + * @author Alkalus + * + */ + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses(){ + if (this.componentType.hasOverlay()){ + return true; + } + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(final IIconRegister par1IconRegister){ + if (this.componentType == ComponentTypes.MILLED) { + this.base = par1IconRegister.registerIcon(CORE.MODID + ":" + "processing/MilledOre/milled"); + if (this.componentType.hasOverlay()){ + this.overlay = par1IconRegister.registerIcon(CORE.MODID + ":" + "processing/MilledOre/milled_OVERLAY"); + } + } + else if (CORE.ConfigSwitches.useGregtechTextures){ + //Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"' as the layer 0 texture path."); + this.base = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME); + if (this.componentType.hasOverlay()){ + //Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"_OVERLAY"+"' as the layer 1 texture path."); + this.overlay = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"_OVERLAY"); + } + } + else { + this.base = par1IconRegister.registerIcon(CORE.MODID + ":" + "item"+this.componentType.getComponent()); + if (this.componentType.hasOverlay()){ + this.overlay = par1IconRegister.registerIcon(CORE.MODID + ":" + "item"+this.componentType.getComponent()+"_Overlay"); + } + } + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int renderPass) { + if (this.componentType == ComponentTypes.MILLED) { + if (renderPass == 1){ + return Utils.rgbtoHexValue(230, 230, 230); + } + return this.componentColour; + } + else { + if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ + return this.componentColour; + } + if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ + return Utils.rgbtoHexValue(230, 230, 230); + } + return this.componentColour; + } + } + + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + if(pass == 0) { + return this.base; + } + return this.overlay; + } + + + + + public static enum ComponentTypes { + DUST("dust", "", " Dust", true), + DUSTIMPURE("dustImpure", "Impure ", " Dust", true), + DUSTPURE("dustPure", "Purified ", " Dust", true), + CRUSHED("crushed", "Crushed ", " Ore", true), + CRUSHEDCENTRIFUGED("crushedCentrifuged", "Centrifuged Crushed "," Ore", true), + CRUSHEDPURIFIED("crushedPurified", "Purified Crushed ", " Ore", true), + MILLED("milled", "Milled ", " Ore", true); + + private String COMPONENT_NAME; + private String PREFIX; + private String DISPLAY_NAME; + private boolean HAS_OVERLAY; + private ComponentTypes (final String LocalName, final String prefix, final String DisplayName, final boolean overlay){ + this.COMPONENT_NAME = LocalName; + this.PREFIX = prefix; + this.DISPLAY_NAME = DisplayName; + this.HAS_OVERLAY = overlay; + // dust + Dirty, Impure, Pure, Refined + // crushed + centrifuged, purified + } + + public String getComponent(){ + return this.COMPONENT_NAME; + } + + public String getName(){ + return this.DISPLAY_NAME; + } + + public boolean hasOverlay(){ + return this.HAS_OVERLAY; + } + + public String getPrefix(){ + return this.PREFIX; + } + } + +} + + diff --git a/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java new file mode 100644 index 0000000000..a810b22c70 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate.java @@ -0,0 +1,18 @@ +package gtPlusPlus.core.item.base.plates; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.minecraft.MaterialUtils; + +public class BaseItemPlate extends BaseItemComponent{ + + public BaseItemPlate(final Material material) { + super(material, BaseItemComponent.ComponentTypes.PLATE); + } + + public BaseItemPlate(final String unlocalizedName, final String materialName, final MaterialState state, final short[] colour, final int tier, final int sRadioactivity) { + this(MaterialUtils.generateQuickMaterial(materialName, state, new short[]{colour[0], colour[1], colour[2], 0}, sRadioactivity)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java new file mode 100644 index 0000000000..31f86e8ffa --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateDouble.java @@ -0,0 +1,20 @@ +package gtPlusPlus.core.item.base.plates; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemPlateDouble extends BaseItemComponent{ + + public BaseItemPlateDouble(final Material material) { + super(material, BaseItemComponent.ComponentTypes.PLATEDOUBLE); + this.setMaxStackSize(32); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return ("Double "+this.materialName+ " Plate"); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java new file mode 100644 index 0000000000..c9072b0d82 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java @@ -0,0 +1,47 @@ +package gtPlusPlus.core.item.base.plates; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; + +public class BaseItemPlateHeavy extends BaseItemComponent{ + + final static ComponentTypes HEAVY = ComponentTypes.PLATEHEAVY; + + public BaseItemPlateHeavy(final Material material) { + super(material, HEAVY); + } + + @Override + public String getCorrectTextures(){ + return CORE.MODID + ":" + "itemHeavyPlate"; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses(){ + return true; + } + + @Override + public void registerIcons(final IIconRegister i) { + this.base = i.registerIcon(CORE.MODID + ":" + "itemHeavyPlate"); + this.overlay = i.registerIcon(CORE.MODID + ":" + "itemHeavyPlate_Overlay"); + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + + if (pass == 0) { + return this.base; + } + else { + return this.overlay; + } + + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java new file mode 100644 index 0000000000..ec3f449b0a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/plates/BaseItemPlate_OLD.java @@ -0,0 +1,95 @@ +package gtPlusPlus.core.item.base.plates; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class BaseItemPlate_OLD extends Item{ + + protected final int colour; + protected final int sRadiation; + protected final String materialName; + protected final String unlocalName; + protected final String chemicalNotation; + + public BaseItemPlate_OLD(final String unlocalizedName, final String materialName, final int colour, final int sRadioactivity) { + this(unlocalizedName, materialName, "NullFormula", colour, sRadioactivity); + } + + public BaseItemPlate_OLD(final String unlocalizedName, final String materialName, final String mChemicalFormula, final int colour, final int sRadioactivity) { + this.setUnlocalizedName("itemPlate"+unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.unlocalName = "itemPlate"+unlocalizedName; + this.setMaxStackSize(64); + this.setTextureName(CORE.MODID + ":" + "itemPlate"); + this.setMaxStackSize(64); + this.colour = colour; + this.materialName = materialName; + if (mChemicalFormula.equals("") || mChemicalFormula.equals("NullFormula")){ + this.chemicalNotation = StringUtils.subscript(materialName); + } + else { + this.chemicalNotation = StringUtils.subscript(mChemicalFormula); + } + this.sRadiation = sRadioactivity; + GameRegistry.registerItem(this, "itemPlate"+unlocalizedName); + String temp; + if (this.unlocalName.toLowerCase().contains("itemplate")){ + temp = this.unlocalName.replace("itemP", "p"); + if ((temp != null) && !temp.equals("")){ + GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); + } + } + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return (this.materialName+ " plate"); + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.colour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.colour; + + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.sRadiation, world, entityHolding); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.sRadiation > 0){ + list.add(CORE.GT_Tooltip_Radioactive); + } + if (StringUtils.containsSuperOrSubScript(this.chemicalNotation)){ + list.add(this.chemicalNotation); + } + super.addInformation(stack, aPlayer, list, bool); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/rings/BaseItemRing.java b/src/main/java/gtPlusPlus/core/item/base/rings/BaseItemRing.java new file mode 100644 index 0000000000..c83ae94af1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/rings/BaseItemRing.java @@ -0,0 +1,12 @@ +package gtPlusPlus.core.item.base.rings; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemRing extends BaseItemComponent{ + + public BaseItemRing(final Material material) { + super(material, BaseItemComponent.ComponentTypes.RING); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRod.java b/src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRod.java new file mode 100644 index 0000000000..f77f846d34 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRod.java @@ -0,0 +1,12 @@ +package gtPlusPlus.core.item.base.rods; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemRod extends BaseItemComponent{ + + public BaseItemRod(final Material material) { + super(material, BaseItemComponent.ComponentTypes.ROD); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java b/src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java new file mode 100644 index 0000000000..215012817d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java @@ -0,0 +1,18 @@ +package gtPlusPlus.core.item.base.rods; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; +import net.minecraft.item.ItemStack; + +public class BaseItemRodLong extends BaseItemComponent{ + + public BaseItemRodLong(final Material material) { + super(material, BaseItemComponent.ComponentTypes.RODLONG); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return ("Long "+this.materialName+ " Rod"); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java b/src/main/java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java new file mode 100644 index 0000000000..6960e89e89 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/rotors/BaseItemRotor.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.base.rotors; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemRotor extends BaseItemComponent{ + + public BaseItemRotor(final Material material) { + super(material, BaseItemComponent.ComponentTypes.ROTOR); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java b/src/main/java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java new file mode 100644 index 0000000000..dbd817215a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java @@ -0,0 +1,12 @@ +package gtPlusPlus.core.item.base.screws; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemScrew extends BaseItemComponent{ + + public BaseItemScrew(final Material material) { + super(material, BaseItemComponent.ComponentTypes.SCREW); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java new file mode 100644 index 0000000000..fdd148b97b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/BaseBauble.java @@ -0,0 +1,190 @@ +package gtPlusPlus.core.item.bauble; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; + +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +import baubles.api.BaubleType; +import baubles.api.IBauble; +import baubles.common.container.InventoryBaubles; +import baubles.common.lib.PlayerHandler; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import net.minecraftforge.event.entity.living.LivingAttackEvent; + +@Optional.InterfaceList(value = { @Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), + @Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles") }) +public class BaseBauble extends Item implements IBauble { + + /** + * Implementation suggestions taken from Botania. + */ + + private BaubleType mThisBauble; + private final String mDisplayName; + private List damageNegations = new ArrayList(); + Multimap attributes = HashMultimap.create(); + + public BaseBauble(BaubleType type, String displayName) { + this.mThisBauble = type; + this.mDisplayName = displayName; + Utils.registerEvent(this); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(Utils.sanitizeString(displayName.toLowerCase())); + GameRegistry.registerItem(this, getUnlocalizedName()); + } + + public BaseBauble(BaubleType type, String unlocalName, int register) { + this.mThisBauble = type; + this.mDisplayName = ""; + Utils.registerEvent(this); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabMisc); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + if (this.mDisplayName == null || this.mDisplayName.length() < 1) { + return super.getItemStackDisplayName(tItem).replaceAll(".name", ""); + } + return this.mDisplayName; + } + + @SubscribeEvent + public void onPlayerAttacked(LivingAttackEvent event) { + if (event.entityLiving instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.entityLiving; + if (getCorrectBauble(player) != null && damageNegations.contains(event.source.damageType)) + event.setCanceled(true); + } + } + + public boolean addDamageNegation(DamageSource damageSource) { + return addDamageNegation(damageSource, null); + } + + public boolean addDamageNegation(DamageSource damageSource, ItemStack aStack) { + return damageNegations.add(damageSource.damageType); + } + + public void clearDamageNegation() { + damageNegations.clear(); + } + + @Override + public boolean canEquip(ItemStack arg0, EntityLivingBase arg1) { + return EntityPlayer.class.isInstance(arg1) ? true : false; + } + + @Override + public boolean canUnequip(ItemStack arg0, EntityLivingBase arg1) { + return EntityPlayer.class.isInstance(arg1) ? true : false; + } + + @Override + public BaubleType getBaubleType(ItemStack arg0) { + return mThisBauble; + } + + public boolean SetBaubleType(BT arg0) { + return SetBaubleType(arg0.getType()); + } + + public boolean SetBaubleType(BaubleType arg0) { + BaubleType temp = this.mThisBauble; + this.mThisBauble = arg0; + if (this.mThisBauble != temp) { + return true; + } + return false; + } + + @Override + public void onEquipped(ItemStack stack, EntityLivingBase entity) { + if (entity != null && EntityPlayer.class.isInstance(entity)) { + onEquippedOrLoadedIntoWorld(stack, entity); + setPlayerHashcode(stack, entity.hashCode()); + } + } + + @Override + public void onWornTick(ItemStack stack, EntityLivingBase player) { + if (getPlayerHashcode(stack) != player.hashCode()) { + onEquippedOrLoadedIntoWorld(stack, player); + setPlayerHashcode(stack, player.hashCode()); + } + } + + public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) { + attributes.clear(); + fillModifiers(attributes, stack); + player.getAttributeMap().applyAttributeModifiers(attributes); + } + + @Override + public void onUnequipped(ItemStack stack, EntityLivingBase player) { + attributes.clear(); + fillModifiers(attributes, stack); + player.getAttributeMap().removeAttributeModifiers(attributes); + } + + void fillModifiers(Multimap attributes, ItemStack stack) { + + } + + public ItemStack getCorrectBauble(EntityPlayer player) { + InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player); + ItemStack stack1 = baubles.getStackInSlot(1); + ItemStack stack2 = baubles.getStackInSlot(2); + return isCorrectBauble(stack1) ? stack1 : isCorrectBauble(stack2) ? stack2 : null; + } + + private boolean isCorrectBauble(ItemStack stack) { + return stack != null && (stack.getItem() == this); + } + + @Override + public int getEntityLifespan(ItemStack itemStack, World world) { + return Integer.MAX_VALUE; + } + + public static UUID getBaubleUUID(ItemStack stack) { + long most = NBTUtils.getLong(stack, "baubleUUIDMost"); + if (most == 0) { + UUID uuid = UUID.randomUUID(); + NBTUtils.setLong(stack, "baubleUUIDMost", uuid.getMostSignificantBits()); + NBTUtils.setLong(stack, "baubleUUIDLeast", uuid.getLeastSignificantBits()); + return getBaubleUUID(stack); + } + + long least = NBTUtils.getLong(stack, "baubleUUIDLeast"); + return new UUID(most, least); + } + + public static int getPlayerHashcode(ItemStack stack) { + return NBTUtils.getInteger(stack, "mPlayerHashcode"); + } + + public static void setPlayerHashcode(ItemStack stack, int hash) { + NBTUtils.setInteger(stack, "mPlayerHashcode", hash); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java new file mode 100644 index 0000000000..70de4603e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java @@ -0,0 +1,259 @@ +package gtPlusPlus.core.item.bauble; + +import java.util.List; + +import baubles.api.BaubleType; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + +public class BatteryPackBaseBauble extends ElectricBaseBauble { + + + public BatteryPackBaseBauble(int tier) { + super(BaubleType.BELT, tier, GT_Values.V[tier] * 20 * 300, "GTPP.BattPack.0" + tier + ".name"); + String aUnlocalName = "GTPP.BattPack.0" + tier + ".name"; + this.setCreativeTab(AddToCreativeTab.tabMachines); + if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) { + GameRegistry.registerItem(this, aUnlocalName); + } + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + ItemStack charged; + if (this.getEmptyItem(itemStack) == this) { + charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + if (this.getChargedItem(itemStack) == this) { + charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, + final boolean p_77663_5_) { + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + } + + @Override + public boolean canProvideEnergy(final ItemStack itemStack) { + double aItemCharge = ElectricItem.manager.getCharge(itemStack); + return aItemCharge > 0; + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (EnumChatFormatting.BLUE + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY); + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) { + return true; + } + + public int secondsLeft(final ItemStack stack) { + double r = 0; + r = this.getCharge(stack) / (10000 * 20); + return (int) MathUtils.decimalRounding(r); + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(""); + String aString1 = StatCollector.translateToLocal("GTPP.battpack.tooltip.1"); + String aString2 = StatCollector.translateToLocal("GTPP.battpack.tooltip.2"); + String aString3 = StatCollector.translateToLocal("GTPP.battpack.tooltip.3"); + String aString4 = StatCollector.translateToLocal("GTPP.battpack.tooltip.4"); + + String aEU = StatCollector.translateToLocal("GTPP.info.eu"); + String aEUT = aEU+"/t"; + + list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN + aString2+" " + (int) getTransferLimit(stack) + aEUT +" "+ aString3 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN + aString4 + EnumChatFormatting.GRAY); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public String getToolTip(final ItemStack stack) { + return ElectricItem.manager.getToolTip(stack); + } + + @Override + public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override // TODO + public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { + + } + + @Override // TODO + public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { + + } + + @Override // TODO + public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayer) { + if (!aPlayer.worldObj.isRemote) { + + try { + + if (this.getCharge(aBaubleStack) >= getTransferLimit(aBaubleStack)) { + // Try Iterate Armour Slots of Player + if (aPlayer instanceof EntityPlayer) { + + // amour + for (final ItemStack aInvStack : ((EntityPlayer) aPlayer).inventory.armorInventory) { + if (aInvStack != null) { + if (aInvStack == aBaubleStack) { + continue; + } + if (ChargingHelper.isItemValid(aInvStack)) { + double aTransferRate = 0; + final IElectricItem electricItem = (IElectricItem) aInvStack.getItem(); + if (electricItem != null) { + aTransferRate = electricItem.getTransferLimit(aInvStack); + double aItemCharge = ElectricItem.manager.getCharge(aInvStack); + if (aItemCharge >= 0 && aItemCharge != electricItem.getMaxCharge(aInvStack)) { + if (aItemCharge <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { + if (ElectricItem.manager.getCharge(aBaubleStack) >= aTransferRate) { + if (ElectricItem.manager.getCharge(aInvStack) <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { + double d = ElectricItem.manager.charge(aInvStack, aTransferRate * 16, mTier, false, true); + if (d > 0) { + d = ElectricItem.manager.charge(aInvStack, aTransferRate * 16, mTier, false, false); + ElectricItem.manager.discharge(aBaubleStack, d, mTier, false, true, false); + //Logger.INFO("Charging " + aInvStack.getDisplayName() + " | " + d + " | "+electricItem.getMaxCharge(aInvStack)); + } + } + else { + //Logger.INFO("5"); + } + } + else { + //Logger.INFO("4"); + } + } + else { + //Logger.INFO("3"); + } + + } + else { + //Logger.INFO("1"); + } + } + + } + } + if (this.getCharge(aBaubleStack) > 0) { + continue; + } else { + break; + } + } + + // Hotbar Slots + int aSlotCounter = 0; + for (final ItemStack aInvStack : ((EntityPlayer) aPlayer).inventory.mainInventory) { + if (aSlotCounter > (InventoryPlayer.getHotbarSize() - 1)) { + break; + } + aSlotCounter++; + if (aInvStack != null) { + if (aInvStack == aBaubleStack) { + continue; + } + if (ChargingHelper.isItemValid(aInvStack)) { + double aTransferRate = 0; + final IElectricItem electricItem = (IElectricItem) aInvStack.getItem(); + if (electricItem != null) { + aTransferRate = electricItem.getTransferLimit(aInvStack); + double aItemCharge = ElectricItem.manager.getCharge(aInvStack); + if (aItemCharge >= 0 && aItemCharge != electricItem.getMaxCharge(aInvStack)) { + if (aItemCharge <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { + if (ElectricItem.manager.getCharge(aBaubleStack) >= aTransferRate) { + if (ElectricItem.manager.getCharge(aInvStack) <= (electricItem.getMaxCharge(aInvStack) - aTransferRate)) { + double d = ElectricItem.manager.charge(aInvStack, aTransferRate, mTier, false, true); + if (d > 0) { + d = ElectricItem.manager.charge(aInvStack, aTransferRate, mTier, false, false); + ElectricItem.manager.discharge(aBaubleStack, d, mTier, false, true, false); + //Logger.INFO("Charging " + aInvStack.getDisplayName() + " | " + d + " | "+electricItem.getMaxCharge(aInvStack)); + } + } + else { + //Logger.INFO("5"); + } + } + else { + //Logger.INFO("4"); + } + } + else { + //Logger.INFO("3"); + } + + } + else { + //Logger.INFO("1"); + } + } + } + } + if (this.getCharge(aBaubleStack) > 0) { + continue; + } else { + break; + } + } + } + } + } + catch (Throwable t) { + + } + } + + + + + } + + @Override + public String getTextureNameForBauble() { + return "chargepack/"+mTier; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java new file mode 100644 index 0000000000..4316f13401 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java @@ -0,0 +1,197 @@ +package gtPlusPlus.core.item.bauble; + +import java.util.List; + +import baubles.api.BaubleType; +import baubles.api.IBauble; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IElectricItemManager; +import net.minecraft.creativetab.CreativeTabs; +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.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + +@Optional.InterfaceList(value = { @Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), +@Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles") }) +public abstract class ElectricBaseBauble extends BaseBauble implements IElectricItem, IElectricItemManager, IBauble { + + public final int mTier; + private final double maxValueEU; + private final BaubleType mType; + + public ElectricBaseBauble(BaubleType aType, int aTier, double aMaxEU, String aUnlocalName) { + super(aType, aUnlocalName, 0); + mType = aType; + mTier = aTier; + maxValueEU = aMaxEU; + this.setUnlocalizedName(aUnlocalName); + this.setTextureName(CORE.MODID + ":" + getTextureNameForBauble()); + this.setMaxDamage(27); + this.setMaxStackSize(1); + this.setNoRepair(); + this.setCreativeTab(AddToCreativeTab.tabMachines); + if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) { + GameRegistry.registerItem(this, aUnlocalName); + } + } + + public abstract String getTextureNameForBauble(); + + @SuppressWarnings("unchecked") + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + ItemStack charged; + if (this.getEmptyItem(itemStack) == this) { + charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + if (this.getChargedItem(itemStack) == this) { + charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, + final boolean p_77663_5_) { + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + } + + @Override + public boolean canProvideEnergy(final ItemStack itemStack) { + double aItemCharge = ElectricItem.manager.getCharge(itemStack); + return aItemCharge > 0; + } + + @Override + public final Item getChargedItem(final ItemStack itemStack) { + final ItemStack x = itemStack.copy(); + x.setItemDamage(27); + return x.getItem(); + } + + @Override + public final Item getEmptyItem(final ItemStack itemStack) { + final ItemStack x = itemStack.copy(); + x.setItemDamage(0); + return x.getItem(); + } + + @Override + public final double getMaxCharge(final ItemStack itemStack) { + return maxValueEU; + } + + @Override + public final int getTier(final ItemStack itemStack) { + return mTier; + } + + @Override + public final double getTransferLimit(final ItemStack itemStack) { + return GT_Values.V[mTier]; + } + + @Override + public final double getDurabilityForDisplay(final ItemStack stack) { + return 1.0D - (this.getCharge(stack) / this.getMaxCharge(stack)); + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) { + return true; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(""); + String aEuInfo = StatCollector.translateToLocal("GTPP.info.euInfo"); + String aTier = StatCollector.translateToLocal("GTPP.machines.tier"); + String aInputLimit = StatCollector.translateToLocal("GTPP.info.inputLimit"); + String aCurrentPower = StatCollector.translateToLocal("GTPP.info.currentPower"); + String aEU = StatCollector.translateToLocal("GTPP.info.eu"); + String aEUT = aEU+"/t"; + + list.add(EnumChatFormatting.GOLD + aEuInfo + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GRAY + aTier+": [" + EnumChatFormatting.YELLOW + this.getTier(stack) + + EnumChatFormatting.GRAY + "] "+aInputLimit+": [" + EnumChatFormatting.YELLOW + + this.getTransferLimit(stack) + EnumChatFormatting.GRAY + aEUT+"]"); + list.add(EnumChatFormatting.GRAY + aCurrentPower +": [" + EnumChatFormatting.YELLOW + (long) this.getCharge(stack) + + EnumChatFormatting.GRAY + aEU +"] [" + EnumChatFormatting.YELLOW + + MathUtils.findPercentage(this.getCharge(stack), this.getMaxCharge(stack)) + EnumChatFormatting.GRAY + + "%]"); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public final double charge(final ItemStack stack, final double amount, final int tier, final boolean ignoreTransferLimit, + final boolean simulate) { + /*if (!simulate) { + ElectricItem.manager.charge(stack, amount, tier, true, simulate); + }*/ + + return ElectricItem.manager.charge(stack, amount, tier, true, simulate); + } + + @Override + public final double discharge(final ItemStack stack, final double amount, final int tier, + final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) { + /*if (!simulate) { + ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); + }*/ + + return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); + } + + @Override + public final double getCharge(final ItemStack stack) { + return ElectricItem.manager.getCharge(stack); + } + + @Override + public final boolean canUse(final ItemStack stack, final double amount) { + return ElectricItem.manager.canUse(stack, amount); + } + + @Override + public final boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) { + return ElectricItem.manager.use(stack, amount, entity); + } + + @Override + public final void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) { + ElectricItem.manager.chargeFromArmor(stack, entity); + } + + @Override + public String getToolTip(final ItemStack stack) { + //return ElectricItem.manager.getToolTip(stack); + return null; + } + + @Override + public final BaubleType getBaubleType(final ItemStack arg0) { + return mType; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java new file mode 100644 index 0000000000..6a8751b682 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java @@ -0,0 +1,137 @@ +package gtPlusPlus.core.item.bauble; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.UUID; + +import baubles.api.BaubleType; +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.DevHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class FireProtectionBauble extends BaseBauble { + + public static HashMap mDataMap = new HashMap(); + public static HashSet mPlayerMap = new HashSet(); + + private static Field isImmuneToFire; + + static { + isImmuneToFire = ReflectionUtils.getField(Entity.class, DevHelper.isObfuscatedEnvironment() ? "func_70045_F" : "isImmuneToFire"); + } + + public static boolean fireImmune(Entity aEntity) { + return aEntity.isImmuneToFire(); + } + + public static boolean setEntityImmuneToFire(Entity aEntity, boolean aImmune) { + try { + return ReflectionUtils.setField(aEntity, isImmuneToFire, aImmune); + } + catch (Throwable t) {} + return false; + } + + public FireProtectionBauble() { + super(BaubleType.RING, "GTPP.bauble.fireprotection.0" + ".name", 0); + String aUnlocalName = "GTPP.bauble.fireprotection.0" + ".name"; + this.setUnlocalizedName(aUnlocalName); + this.setTextureName(CORE.MODID + ":" + getTextureNameForBauble()); + this.setMaxDamage(100); + this.setMaxStackSize(1); + this.setNoRepair(); + this.setCreativeTab(AddToCreativeTab.tabMachines); + if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) { + GameRegistry.registerItem(this, aUnlocalName); + } + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, + final boolean p_77663_5_) { + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (EnumChatFormatting.DARK_RED + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY); + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) { + return false; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public void onEquipped(final ItemStack arg0, final EntityLivingBase aPlayer) { + if (!aPlayer.worldObj.isRemote) { + if (aPlayer instanceof EntityPlayer) { + EntityPlayer bPlayer = (EntityPlayer) aPlayer; + mPlayerMap.add(bPlayer.getUniqueID()); + } + } + } + + @Override + public void onUnequipped(final ItemStack arg0, final EntityLivingBase aPlayer) { + if (!aPlayer.worldObj.isRemote) { + if (aPlayer instanceof EntityPlayer) { + EntityPlayer bPlayer = (EntityPlayer) aPlayer; + if (bPlayer.isPotionActive(Potion.fireResistance)) { + bPlayer.removePotionEffect(Potion.fireResistance.id); + } + mPlayerMap.remove(bPlayer.getUniqueID()); + setEntityImmuneToFire(bPlayer, false); + } + } + } + + @Override + public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayer) { + if (!aPlayer.worldObj.isRemote) { + if (aPlayer instanceof EntityPlayer) { + EntityPlayer bPlayer = (EntityPlayer) aPlayer; + if (!fireImmune(bPlayer)) { + setEntityImmuneToFire(bPlayer, true); + } + if (!bPlayer.isPotionActive(Potion.fireResistance)) { + bPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 100, 4)); + } + } + } + } + + public String getTextureNameForBauble() { + return "baubles/itemFireProtectGlovesBetter"; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java new file mode 100644 index 0000000000..49ce7ad715 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/HealthBoostBauble.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.item.bauble; + +import java.util.List; + +import com.google.common.collect.Multimap; + +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumChatFormatting; + +import baubles.api.BaubleType; +import gtPlusPlus.core.lib.CORE; + +public class HealthBoostBauble extends BaseBauble{ + + + public HealthBoostBauble() { + super(BaubleType.AMULET, "The Key to the City"); + addDamageNegation(DamageSource.wither); + this.setTextureName(CORE.MODID + ":" + "itemKeyGold"); + } + + @Override + void fillModifiers(Multimap attributes, ItemStack stack) { + attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "Bauble modifier", 40, 0)); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"You feel like you're on top of the world."); + list.add(EnumChatFormatting.GRAY+"Wear it around your neck like an amulet."); + super.addInformation(stack, player, list, bool); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java new file mode 100644 index 0000000000..a8d216e1bc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/ModularBauble.java @@ -0,0 +1,408 @@ +package gtPlusPlus.core.item.bauble; + +import java.util.List; + +import org.lwjgl.input.Keyboard; + +import com.google.common.collect.Multimap; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import baubles.api.BaubleType; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; + +public class ModularBauble extends BaseBauble { + + @SideOnly(Side.CLIENT) + private IIcon mTextureAmulet; + @SideOnly(Side.CLIENT) + private IIcon mTextureRing; + @SideOnly(Side.CLIENT) + private IIcon mTextureBelt; + private IIcon iconArray[] = new IIcon[3]; + @SideOnly(Side.CLIENT) + private IIcon mfallback; + + public ModularBauble() { + super(BaubleType.AMULET, "Modular Bauble"); + } + + @Override + void fillModifiers(Multimap attributes, ItemStack stack) { + + // Get Stats + int mStatlevel = 0; + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DAMAGE)) > 0) { + if (mStatlevel > 0 && mStatlevel < 20) { + attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 1, 0)); + } else if (mStatlevel > 20 && mStatlevel < 45) { + attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 2, 0)); + } else if (mStatlevel >= 45 && mStatlevel < 75) { + attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 4, 0)); + } else if (mStatlevel >= 75 && mStatlevel < 99) { + attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 8, 0)); + } else if (mStatlevel >= 100) { + attributes.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "AD" + mStatlevel, 16, 0)); + } + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DEF)) > 0) { + if (mStatlevel > 0 && mStatlevel < 20) { + attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 1, 0)); + } else if (mStatlevel > 20 && mStatlevel < 45) { + attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 2, 0)); + } else if (mStatlevel > 45 && mStatlevel < 75) { + attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 3, 0)); + } else if (mStatlevel > 75 && mStatlevel < 99) { + attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 6, 0)); + } else if (mStatlevel >= 100) { + attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "BD" + mStatlevel, 10, 0)); + } + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) { + if (mStatlevel > 0 && mStatlevel <= 100) { + int bonus = mStatlevel / 5; + attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "HP" + mStatlevel, bonus * 2, 0)); + } + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) { + if (mStatlevel > 0 && mStatlevel < 20) { + attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 1, 0)); + } else if (mStatlevel > 20 && mStatlevel < 45) { + attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 2, 0)); + } else if (mStatlevel > 45 && mStatlevel < 75) { + attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 3, 0)); + } else if (mStatlevel > 75 && mStatlevel < 99) { + attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 4, 0)); + } else if (mStatlevel >= 100) { + attributes.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(getBaubleUUID(stack), "SP" + mStatlevel, 5, 0)); + } + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_MINING)) > 0) { + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HOLY)) > 0) { + } + + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + // Bauble Type + if (ModularArmourUtils.getBaubleType(stack) == BaubleType.AMULET) { + list.add(EnumChatFormatting.GRAY + "Current Form: " + EnumChatFormatting.RED + "Amulet" + + EnumChatFormatting.GRAY + "."); + list.add(EnumChatFormatting.GRAY + "You can change this into a Ring or a Belt."); + } else if (ModularArmourUtils.getBaubleType(stack) == BaubleType.RING) { + list.add(EnumChatFormatting.GRAY + "Current Form: " + EnumChatFormatting.RED + "Ring" + + EnumChatFormatting.GRAY + "."); + list.add(EnumChatFormatting.GRAY + "You can change this into an Amulet or a Belt."); + } else if (ModularArmourUtils.getBaubleType(stack) == BaubleType.BELT) { + list.add(EnumChatFormatting.GRAY + "Current Form: " + EnumChatFormatting.RED + "Belt" + + EnumChatFormatting.GRAY + "."); + list.add(EnumChatFormatting.GRAY + "You can change this into a Ring or an Amulet."); + } + + // Get Stats + int mStatlevel = 0; + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DAMAGE)) > 0) { + list.add(EnumChatFormatting.GRAY + "Damage Boost: " + EnumChatFormatting.DARK_RED + mStatlevel + + EnumChatFormatting.GRAY + "/100."); + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) { + list.add(EnumChatFormatting.GRAY + "Health Boost: " + EnumChatFormatting.RED + mStatlevel + + EnumChatFormatting.GRAY + "/100. Bonus " + (mStatlevel / 5) + " hearts."); + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) { + list.add(EnumChatFormatting.GRAY + "Speed Boost: " + EnumChatFormatting.WHITE + mStatlevel + + EnumChatFormatting.GRAY + "/100."); + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_MINING)) > 0) { + list.add(EnumChatFormatting.GRAY + "Mining Boost: " + EnumChatFormatting.DARK_GRAY + mStatlevel + + EnumChatFormatting.GRAY + "/100."); + } + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HOLY)) > 0) { + list.add(EnumChatFormatting.GRAY + "Holy Boost: " + EnumChatFormatting.GOLD + mStatlevel + + EnumChatFormatting.GRAY + "/100."); + } + + // Defence Boost + if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_DEF)) > 0) { + list.add(EnumChatFormatting.GRAY + "Defence Boost: " + EnumChatFormatting.BLUE + mStatlevel + + EnumChatFormatting.GRAY + "/100."); + + if ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54))) { + + if (mStatlevel >= 1) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Cactus" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 10) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Falling Blocks" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 20) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Wall Suffocation" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 35) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Drowning" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 50) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Starvation" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 60) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Falling" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 75) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Lava" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 80) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Magic" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 95) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Wither" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 100) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Fire" + + EnumChatFormatting.GRAY + "."); + } + if (mStatlevel >= 100) { + list.add(EnumChatFormatting.GRAY + "Protected From: " + EnumChatFormatting.BLUE + "Void" + + EnumChatFormatting.GRAY + "."); + } + + } + else { + list.add(EnumChatFormatting.GRAY + ""); + } + } + + if (NBTUtils.getBotanicaSoulboundOwner(stack) != null) { + if (!NBTUtils.getBotanicaSoulboundOwner(stack).equals("")) { + list.add(EnumChatFormatting.GRAY + "Owner: " + EnumChatFormatting.GREEN + + NBTUtils.getBotanicaSoulboundOwner(stack) + EnumChatFormatting.GRAY + "."); + } + } + super.addInformation(stack, player, list, bool); + } + + @Override + public boolean addDamageNegation(DamageSource damageSource, ItemStack aStack) { + + this.clearDamageNegation(); + int mStatlevel = 0; + if ((mStatlevel = ModularArmourUtils.getModifierLevel(aStack, Modifiers.BOOST_HOLY)) > 0) { + if (mStatlevel >= 1) { + addDamageNegation(DamageSource.cactus); + } + if (mStatlevel >= 10) { + addDamageNegation(DamageSource.fallingBlock); + } + if (mStatlevel >= 20) { + addDamageNegation(DamageSource.inWall); + } + if (mStatlevel >= 35) { + addDamageNegation(DamageSource.drown); + } + if (mStatlevel >= 50) { + addDamageNegation(DamageSource.starve); + } + if (mStatlevel >= 60) { + addDamageNegation(DamageSource.fall); + } + if (mStatlevel >= 75) { + addDamageNegation(DamageSource.lava); + } + if (mStatlevel >= 80) { + addDamageNegation(DamageSource.magic); + } + if (mStatlevel >= 95) { + addDamageNegation(DamageSource.wither); + } + if (mStatlevel >= 100) { + addDamageNegation(DamageSource.inFire); + } + if (mStatlevel >= 100) { + addDamageNegation(DamageSource.onFire); + } + if (mStatlevel >= 100) { + addDamageNegation(DamageSource.outOfWorld); + } + } + return super.addDamageNegation(damageSource, null); + } + + @Override + public boolean canEquip(ItemStack arg0, EntityLivingBase arg1) { + if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_AMULET.getID()) { + this.SetBaubleType(BT.TYPE_AMULET); + } else if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_RING.getID()) { + this.SetBaubleType(BT.TYPE_RING); + } else if (ModularArmourUtils.getBaubleTypeID(arg0) == BT.TYPE_BELT.getID()) { + this.SetBaubleType(BT.TYPE_BELT); + } else { + this.SetBaubleType(BT.TYPE_RING); + } + if (PlayerUtils.isPlayerOP((EntityPlayer) arg1)) { + return true; // Let OPs wear other peoples shit. + } + + String mOwner; + if (NBTUtils.getBotanicaSoulboundOwner(arg0) == null || NBTUtils.getBotanicaSoulboundOwner(arg0).equals("")) { + return true; + } else if ((mOwner = NBTUtils.getBotanicaSoulboundOwner(arg0)) != null) { + String mPlayerName = arg1.getCommandSenderName(); + if (mOwner.toLowerCase().equals(mPlayerName.toLowerCase())) { + return true; + } else { + return false; + } + } else { + return false; + } + } + + @Override + public BaubleType getBaubleType(ItemStack arg0) { + return ModularArmourUtils.getBaubleType(arg0); + } + + @Override + public void onEquipped(ItemStack stack, EntityLivingBase entity) { + if (entity instanceof EntityPlayer) { + if (NBTUtils.getBotanicaSoulboundOwner(stack) == null + || NBTUtils.getBotanicaSoulboundOwner(stack).equals("")) { + NBTUtils.setBotanicaSoulboundOwner(stack, entity.getCommandSenderName()); + } + } + super.onEquipped(stack, entity); + } + + /*@Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + if (usingItem == null) { + return mfallback; + } + try { + if (stack.getItemDamage() == 0) { + return mfallback = mTextureAmulet; + } + else if (stack.getItemDamage() == 1) { + return mfallback = mTextureRing; + } + else if (stack.getItemDamage() == 2) { + return mfallback = mTextureBelt; + } else { + return mfallback = mTextureRing; + } + } catch (Throwable t) { + return mfallback = mTextureRing; + } + }*/ + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + if (meta < this.iconArray.length && this.iconArray[meta] != null){ + return this.iconArray[meta]; + } + return this.mfallback; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 3; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister register) { + this.mfallback = register.registerIcon("miscutils" + ":" + "itemAmulet"); + // you cannot initialize iconArray when declared nor in the constructor, + // as it is client-side only, so do it here: + if (LoadedMods.Thaumcraft) { + iconArray[0] = register.registerIcon("thaumcraft" + ":" + "bauble_amulet"); + iconArray[1] = register.registerIcon("thaumcraft" + ":" + "bauble_ring"); + iconArray[2] = register.registerIcon("thaumcraft" + ":" + "bauble_belt"); + } else { + iconArray[0] = register.registerIcon("miscutils" + ":" + "itemAmulet"); + iconArray[1] = register.registerIcon("miscutils" + ":" + "itemRingWearable"); + iconArray[2] = register.registerIcon("miscutils" + ":" + "itemBelt"); + } + + mTextureAmulet = iconArray[0]; + mTextureRing = iconArray[1]; + mTextureBelt = iconArray[2]; + + } + + @Override + public void onWornTick(ItemStack stack, EntityLivingBase player) { + super.onWornTick(stack, player); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public Item setFull3D() { + // TODO Auto-generated method stub + return super.setFull3D(); + } + + @Override + public boolean isFull3D() { + return true; + } + + @Override + public boolean isRepairable() { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java b/src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java new file mode 100644 index 0000000000..aab302688b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java @@ -0,0 +1,175 @@ +package gtPlusPlus.core.item.bauble; + +import java.util.List; + +import baubles.api.BaubleType; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.AABB; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import ic2.api.item.ElectricItem; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + +public class MonsterKillerBaseBauble extends ElectricBaseBauble { + + private final Class[] mTargets; + + public MonsterKillerBaseBauble(Class[] aMonsterBaseClassArray, String aMonsterTypeName, int aPowerTier) { + super(BaubleType.AMULET, aPowerTier, GT_Values.V[aPowerTier] * 20 * 300, + "GTPP.MonsterKiller." + aMonsterTypeName + ".name"); + mTargets = aMonsterBaseClassArray; + } + + @SideOnly(Side.CLIENT) + @Override + public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + ItemStack charged; + if (this.getEmptyItem(itemStack) == this) { + charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, 0.0D, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + if (this.getChargedItem(itemStack) == this) { + charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, + final boolean p_77663_5_) { + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + } + + @Override + public boolean canProvideEnergy(final ItemStack itemStack) { + double aItemCharge = ElectricItem.manager.getCharge(itemStack); + return aItemCharge > 0; + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (EnumChatFormatting.WHITE + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY); + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) { + return true; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(""); + String aString1 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.1"); + String aString2 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.2"); + String aString3 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.3"); + String aString4 = StatCollector.translateToLocal("GTPP.monsterkiller.tooltip.4"); + String aEU = StatCollector.translateToLocal("GTPP.info.eu"); + String aEUT = aEU + "/t"; + + list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN + aString2 + " " + (int) getTransferLimit(stack) + aEUT + " " + aString3 + + EnumChatFormatting.GRAY); + list.add(""); + list.add("" + EnumChatFormatting.GREEN + aString4 + " " + EnumChatFormatting.GRAY); + for (Class cz : mTargets) { + list.add("- " + EnumChatFormatting.DARK_GREEN + cz.getSimpleName().replace("Entity", "") + EnumChatFormatting.GRAY); + } + + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { + + } + + @Override + public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { + + } + + @Override // TODO + public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayerEntity) { + if (aPlayerEntity == null) { + return; + } + EntityPlayer aPlayer = (EntityPlayer) aPlayerEntity; + if (!aPlayer.worldObj.isRemote) { + if (this.getCharge(aBaubleStack) >= getTransferLimit(aBaubleStack)) { + AABB aPlayerBox = new AABB(aPlayerEntity, 5, 5, 5); + if (this.mTargets != null && this.mTargets.length > 0) { + for (Class clazz : mTargets) { + AutoMap aEnts = EntityUtils.getEntitiesWithinBoundingBox(clazz, aPlayerBox); + if (aEnts.isEmpty()) { + continue; + } else { + EntityLiving aClosest = null; + double aEntityDistance = Short.MIN_VALUE; + for (Object ent : aEnts) { + if (!EntityLiving.class.isInstance(ent)) { + continue; + } else { + double aCurEntDis = EntityUtils.getDistance(aPlayerEntity, (Entity) ent); + if (aEntityDistance == Short.MIN_VALUE || aCurEntDis < aEntityDistance) { + aEntityDistance = aCurEntDis; + aClosest = (EntityLiving) ent; + } + } + } + if (aClosest != null) { + float aEntHealth = aClosest.getHealth(); + float aEntMaxHealth = aClosest.getMaxHealth(); + double aEntHealthPerc = MathUtils.findPercentage(aEntHealth, aEntMaxHealth); + long aEuUsage = (long) (aEntHealthPerc * 50 * aEntMaxHealth); + if (this.discharge(aBaubleStack, aEuUsage, mTier, true, false, false) > 0) { + aClosest.setDead(); + PlayerUtils.messagePlayer(aPlayer, "Removed 1x "+aClosest.getCommandSenderName()); + break; + } + } else { + continue; + } + } + } + } + } else { + return; + } + } + } + + @Override + public String getTextureNameForBauble() { + return "baubles/itemAmulet"; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java new file mode 100644 index 0000000000..8e7a760195 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/AgriculturalChem.java @@ -0,0 +1,614 @@ +package gtPlusPlus.core.item.chemistry; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gtPlusPlus.api.helpers.MaterialHelper; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.plugin.agrichem.BioRecipes; +import gtPlusPlus.plugin.agrichem.item.algae.ItemAgrichemBase; +import gtPlusPlus.plugin.agrichem.item.algae.ItemAlgaeBase; +import gtPlusPlus.plugin.agrichem.item.algae.ItemBioChip; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class AgriculturalChem extends ItemPackage { + + private static boolean aBOP; + private static boolean aTiCon; + + private static AutoMap mBloodFluids = new AutoMap(); + + /** + * Fluids + */ + + // Poop Juice + public static Fluid PoopJuice; + // Manure Slurry + public static Fluid ManureSlurry; + // Fertile Manure Slurry + public static Fluid FertileManureSlurry; + // Blood + public static Fluid CustomBlood; + // Red Mud + public static Fluid RedMud; + /** + * Items + */ + + // Manure Byproducts + public static Item dustManureByproducts; + // Organic Fertilizer + public static Item dustOrganicFertilizer; + // Dirt + public static Item dustDirt; + + // Poop Juice + // vv - Centrifuge + // Manure Slurry && Manure Byproducts -> (Elements) Centrifuge to several tiny + // piles + // vv - Chem Reactor - Add Peat, Meat + // Organic Fertilizer + // vv - Dehydrate + // Fertilizer + + // Poop Juice + // vv - Mixer - Add Blood, Bone, Meat (1000L Poo, 200L Blood, x2 Bone, x3 Meat) + // Fertile Manure Slurry + // vv - Chem Reactor - Add Peat x1.5 + // Organic Fertilizer x3 + // vv - Dehydrate + // Fertilizer + + + + public static Item mAlgae; + public static Item mBioCircuit; + public static Item mAgrichemItem1; + + /* + * 0 - Algae Biomass + * 1 - Green Algae Biomass + * 2 - Brown Algae Biomass + * 3 - Golden-Brown Algae Biomass + * 4 - Red Algae Biomass + * 5 - Cellulose Fiber + * 6 - Golden-Brown Cellulose Fiber + * 7 - Red Cellulose Fiber + * 8 - Compost + * 9 - Wood Pellet + * 10 - Wood Brick + * 11 - Cellulose Pulp + * 12 - Raw Bio Resin + * 13 - Catalyst Carrier + * 14 - Green Metal Catalyst + * 15 - Alginic Acid + * 16 - Alumina + * 17 - Aluminium Pellet + * 18 - Sodium Aluminate + * 19 - Sodium Hydroxide // Exists in Newer GT + * 20 - Sodium Carbonate + * 21 - Lithium Chloride + * 22 - Pellet Mold + * 23 - Clean Aluminium Mix + * 24 - Pinecone + */ + + public static ItemStack mAlgaeBiosmass; + public static ItemStack mGreenAlgaeBiosmass; + public static ItemStack mBrownAlgaeBiosmass; + public static ItemStack mGoldenBrownAlgaeBiosmass; + public static ItemStack mRedAlgaeBiosmass; + public static ItemStack mCelluloseFiber; + public static ItemStack mGoldenBrownCelluloseFiber; + public static ItemStack mRedCelluloseFiber; + public static ItemStack mCompost; + public static ItemStack mWoodPellet; + public static ItemStack mWoodBrick; + public static ItemStack mCellulosePulp; + public static ItemStack mRawBioResin; + public static ItemStack mCatalystCarrier; + public static ItemStack mGreenCatalyst; + public static ItemStack mAlginicAcid; + public static ItemStack mAlumina; + public static ItemStack mAluminiumPellet; + public static ItemStack mSodiumAluminate; + public static ItemStack mSodiumHydroxide; + public static ItemStack mSodiumCarbonate; + public static ItemStack mLithiumChloride; + public static ItemStack mPelletMold; + public static ItemStack mCleanAluminiumMix; + public static ItemStack mPinecone; + public static ItemStack mCrushedPine; + + + @Override + public void items() { + // Nitrogen, Ammonium Nitrate, Phosphates, Calcium, Copper, Carbon + dustManureByproducts = ItemUtils.generateSpecialUseDusts("ManureByproducts", "Manure Byproduct", + "(N2H4O3)N2P2Ca3CuC8", Utils.rgbtoHexValue(110, 75, 25))[0]; + + // Basically Guano + dustOrganicFertilizer = ItemUtils.generateSpecialUseDusts("OrganicFertilizer", "Organic Fertilizer", + "Ca5(PO4)3(OH)", Utils.rgbtoHexValue(240, 240, 240))[0]; + + // Dirt Dust :) + dustDirt = ItemUtils.generateSpecialUseDusts("Dirt", "Dried Earth", Utils.rgbtoHexValue(65, 50, 15))[0]; + + mAlgae = new ItemAlgaeBase(); + mAgrichemItem1 = new ItemAgrichemBase(); + mBioCircuit = new ItemBioChip(); + GregtechItemList.Circuit_BioRecipeSelector.set(mBioCircuit); + + + + mAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 0, 1); + mGreenAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 1, 1); + mBrownAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 2, 1); + mGoldenBrownAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 3, 1); + mRedAlgaeBiosmass = ItemUtils.simpleMetaStack(mAgrichemItem1, 4, 1); + mCelluloseFiber = ItemUtils.simpleMetaStack(mAgrichemItem1, 5, 1); + mGoldenBrownCelluloseFiber = ItemUtils.simpleMetaStack(mAgrichemItem1, 6, 1); + mRedCelluloseFiber = ItemUtils.simpleMetaStack(mAgrichemItem1, 7, 1); + mCompost = ItemUtils.simpleMetaStack(mAgrichemItem1, 8, 1); + mWoodPellet = ItemUtils.simpleMetaStack(mAgrichemItem1, 9, 1); + mWoodBrick = ItemUtils.simpleMetaStack(mAgrichemItem1, 10, 1); + mCellulosePulp = ItemUtils.simpleMetaStack(mAgrichemItem1, 11, 1); + mRawBioResin = ItemUtils.simpleMetaStack(mAgrichemItem1, 12, 1); + mCatalystCarrier = ItemUtils.simpleMetaStack(mAgrichemItem1, 13, 1); + mGreenCatalyst = ItemUtils.simpleMetaStack(mAgrichemItem1, 14, 1); + mAlginicAcid = ItemUtils.simpleMetaStack(mAgrichemItem1, 15, 1); + mAlumina = ItemUtils.simpleMetaStack(mAgrichemItem1, 16, 1); + mAluminiumPellet = ItemUtils.simpleMetaStack(mAgrichemItem1, 17, 1); + mSodiumAluminate = ItemUtils.simpleMetaStack(mAgrichemItem1, 18, 1); + + /** + * If It exists, don't add a new one. + */ + if (OreDictionary.doesOreNameExist("dustSodiumHydroxide_GT5U") || OreDictionary.doesOreNameExist("dustSodiumHydroxide")) { + List aTest = OreDictionary.getOres("dustSodiumHydroxide", false); + ItemStack aTestStack; + if (aTest.isEmpty()) { + aTest = OreDictionary.getOres("dustSodiumHydroxide_GT5U", false); + if (aTest.isEmpty()) { + aTestStack = ItemUtils.simpleMetaStack(mAgrichemItem1, 19, 1); + } + else { + aTestStack = aTest.get(0); + } + } + else { + aTestStack = aTest.get(0); + } + mSodiumHydroxide = aTestStack; + } + else { + mSodiumHydroxide = ItemUtils.simpleMetaStack(mAgrichemItem1, 19, 1); + } + mSodiumCarbonate = ItemUtils.simpleMetaStack(mAgrichemItem1, 20, 1); + mLithiumChloride = ItemUtils.simpleMetaStack(mAgrichemItem1, 21, 1); + mPelletMold = ItemUtils.simpleMetaStack(mAgrichemItem1, 22, 1); + mCleanAluminiumMix = ItemUtils.simpleMetaStack(mAgrichemItem1, 23, 1); + mPinecone = ItemUtils.simpleMetaStack(mAgrichemItem1, 24, 1); + mCrushedPine = ItemUtils.simpleMetaStack(mAgrichemItem1, 25, 1); + + ItemUtils.addItemToOreDictionary(mGreenAlgaeBiosmass, "biomassGreenAlgae"); + ItemUtils.addItemToOreDictionary(mBrownAlgaeBiosmass, "biomassBrownAlgae"); + ItemUtils.addItemToOreDictionary(mGoldenBrownAlgaeBiosmass, "biomassGoldenBrownAlgae"); + ItemUtils.addItemToOreDictionary(mRedAlgaeBiosmass, "biomassRedAlgae"); + + ItemUtils.addItemToOreDictionary(mCelluloseFiber, "fiberCellulose"); + ItemUtils.addItemToOreDictionary(mGoldenBrownCelluloseFiber, "fiberCellulose"); + ItemUtils.addItemToOreDictionary(mGoldenBrownCelluloseFiber, "fiberGoldenBrownCellulose"); + ItemUtils.addItemToOreDictionary(mRedCelluloseFiber, "fiberCellulose"); + ItemUtils.addItemToOreDictionary(mRedCelluloseFiber, "fiberRedCellulose"); + + ItemUtils.addItemToOreDictionary(mWoodPellet, "pelletWood"); + ItemUtils.addItemToOreDictionary(mWoodBrick, "brickWood"); + ItemUtils.addItemToOreDictionary(mCellulosePulp, "pulpCellulose"); + + ItemUtils.addItemToOreDictionary(mCatalystCarrier, "catalystEmpty"); + ItemUtils.addItemToOreDictionary(mGreenCatalyst, "catalystAluminiumSilver"); + ItemUtils.addItemToOreDictionary(mAlginicAcid, "dustAlginicAcid"); + ItemUtils.addItemToOreDictionary(mAlumina, "dustAlumina"); + ItemUtils.addItemToOreDictionary(mAluminiumPellet, "pelletAluminium"); + + ItemUtils.addItemToOreDictionary(mSodiumAluminate, "dustSodiumAluminate"); + ItemUtils.addItemToOreDictionary(mSodiumHydroxide, "dustSodiumHydroxide"); + ItemUtils.addItemToOreDictionary(mSodiumCarbonate, "dustSodiumCarbonate"); + ItemUtils.addItemToOreDictionary(mLithiumChloride, "dustLithiumChloride"); + ItemUtils.addItemToOreDictionary(mPinecone, "pinecone"); + ItemUtils.addItemToOreDictionary(mCrushedPine, "crushedPineMaterial"); + + //Handle GT NaOH dusts + List NaOHSmall = OreDictionary.getOres("dustSmallSodiumHydroxide_GT5U", false); + if (!NaOHSmall.isEmpty()) { + ItemUtils.addItemToOreDictionary(NaOHSmall.get(0), "dustSmallSodiumHydroxide"); + } + List NaOHTiny = OreDictionary.getOres("dustTinySodiumHydroxide_GT5U", false); + if (!NaOHTiny.isEmpty()) { + ItemUtils.addItemToOreDictionary(NaOHTiny.get(0), "dustTinySodiumHydroxide"); + } + + + } + + @Override + public void blocks() { + // None yet + } + + @Override + public void fluids() { + // Sewage + PoopJuice = FluidUtils.generateFluidNonMolten("raw.waste", "Raw Animal Waste", 32 + 175, + new short[] { 100, 70, 30, 100 }, null, null, 0, true); + + // Sewage + ManureSlurry = FluidUtils.generateFluidNonMolten("manure.slurry", "Manure Slurry", 39 + 175, + new short[] { 75, 45, 15, 100 }, null, null, 0, true); + + // Sewage + FertileManureSlurry = FluidUtils.generateFluidNonMolten("fertile.manure.slurry", "Fertile Manure Slurry", + 45 + 175, new short[] { 65, 50, 15, 100 }, null, null, 0, true); + + RedMud = FluidUtils.generateFluidNoPrefix("mud.red.slurry", "Red Mud Slurry", 32 + 175, new short[] { 180, 35, 25, 100 }, true); + + } + + + + public AgriculturalChem() { + super(); + + aBOP = LoadedMods.BiomesOPlenty; + aTiCon = LoadedMods.TiCon; + + Logger.INFO("Adding Agrochemical content"); + + FluidStack aBlood; + if (aBOP) { + aBlood = FluidUtils.getFluidStack("hell_blood", 100); + if (aBlood != null) { + Logger.INFO("Found Biome's o Plenty, enabled Blood support."); + CustomBlood = aBlood.getFluid(); + mBloodFluids.put(aBlood); + } + } + + if (aTiCon) { + aBlood = FluidUtils.getFluidStack("blood", 100); + if (aBlood != null) { + Logger.INFO("Found Tinker's Construct, enabled Blood support."); + CustomBlood = aBlood.getFluid(); + mBloodFluids.put(FluidUtils.getFluidStack("blood", 100)); + } + } + + // Handle Blood Internally, Create if required. + if (mBloodFluids.isEmpty() || CustomBlood == null) { + Logger.INFO( + "Did not find any existing Blood fluids. Trying to wildcard search the fluid registry, then generate our own if that fails."); + FluidStack aTempBlood = FluidUtils.getWildcardFluidStack("blood", 100); + if (aTempBlood != null) { + CustomBlood = aTempBlood.getFluid(); + } else { + aTempBlood = FluidUtils.getWildcardFluidStack("hell_blood", 100); + if (aTempBlood == null) { + CustomBlood = FluidUtils.generateFluidNoPrefix("blood", "Blood", 32 + 175, + new short[] { 175, 25, 25, 100 }, true); + } else { + CustomBlood = aTempBlood.getFluid(); + } + } + Logger.INFO("Using " + CustomBlood.getName()); + mBloodFluids.put(FluidUtils.getFluidStack(CustomBlood, 100)); + } + + } + + private final static AutoMap mMeats = new AutoMap(); + private final static AutoMap mFish = new AutoMap(); + private final static AutoMap mFruits = new AutoMap(); + private final static AutoMap mVege = new AutoMap(); + private final static AutoMap mNuts = new AutoMap(); + private final static AutoMap mSeeds = new AutoMap(); + private final static AutoMap mPeat = new AutoMap(); + private final static AutoMap mBones = new AutoMap(); + private final static AutoMap mBoneMeal = new AutoMap(); + + private final static AutoMap mList_Master_Meats = new AutoMap(); + private final static AutoMap mList_Master_FruitVege = new AutoMap(); + private final static AutoMap mList_Master_Seeds = new AutoMap(); + private final static AutoMap mList_Master_Bones = new AutoMap(); + + private static void processAllOreDict() { + processOreDict("listAllmeatraw", mMeats); + processOreDict("listAllfishraw", mFish); + processOreDict("listAllfruit", mFruits); + processOreDict("listAllVeggie", mVege); + processOreDict("listAllnut", mNuts); + processOreDict("listAllSeed", mSeeds); + processOreDict("brickPeat", mPeat); + processOreDict("bone", mBones); + processOreDict("dustBone", mBoneMeal); + // Just make a mega list, makes life easier. + if (!mMeats.isEmpty()) { + for (ItemStack g : mMeats) { + mList_Master_Meats.put(g); + } + } + if (!mFish.isEmpty()) { + for (ItemStack g : mFish) { + mList_Master_Meats.put(g); + } + } + if (!mFruits.isEmpty()) { + for (ItemStack g : mFruits) { + mList_Master_FruitVege.put(g); + } + } + if (!mVege.isEmpty()) { + for (ItemStack g : mVege) { + mList_Master_FruitVege.put(g); + } + } + if (!mNuts.isEmpty()) { + for (ItemStack g : mNuts) { + mList_Master_FruitVege.put(g); + } + } + if (!mSeeds.isEmpty()) { + for (ItemStack g : mSeeds) { + mList_Master_Seeds.put(g); + } + } + if (!mBoneMeal.isEmpty()) { + for (ItemStack g : mBoneMeal) { + mList_Master_Bones.put(g); + } + } + if (!mBones.isEmpty()) { + for (ItemStack g : mBones) { + mList_Master_Bones.put(g); + } + } + } + + private static void processOreDict(String aOreName, AutoMap aMap) { + ArrayList aTemp = OreDictionary.getOres(aOreName); + if (!aTemp.isEmpty()) { + for (ItemStack stack : aTemp) { + aMap.put(stack); + } + } + } + + private static void addBasicSlurryRecipes() { + + ItemStack aManureByprod1 = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); + ItemStack aManureByprod2 = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); + ItemStack aDirtDust = ItemUtils.getSimpleStack(dustDirt, 1); + + // Poop Juice to Basic Slurry + GT_Values.RA.addCentrifugeRecipe(CI.getNumberedCircuit(10), null, FluidUtils.getFluidStack(PoopJuice, 1000), // In + // Fluid + FluidUtils.getFluidStack(ManureSlurry, 250), // Out Fluid + aDirtDust, aDirtDust, aManureByprod1, aManureByprod1, aManureByprod1, aManureByprod1, + new int[] { 2000, 2000, 500, 500, 250, 250 }, // Chances + 10 * 20, // Time + 30); // EU + + // More Efficient way to get byproducts, less Slurry + GT_Values.RA.addCentrifugeRecipe(CI.getNumberedCircuit(20), null, FluidUtils.getFluidStack(PoopJuice, 1000), // In + // Fluid + FluidUtils.getFluidStack(ManureSlurry, 50), // Out Fluid + aDirtDust, aDirtDust, aManureByprod1, aManureByprod1, aManureByprod2, aManureByprod2, + new int[] { 4000, 3000, 1250, 1250, 675, 675 }, // Chances + 20 * 20, // Time + 60); // EU + + } + + private static void addAdvancedSlurryRecipes() { + + ItemStack aCircuit = CI.getNumberedCircuit(10); + ItemStack aBone; + ItemStack aMeat; + ItemStack aEmptyCells = CI.emptyCells(2); + ItemStack aInputCells = ItemUtils.getItemStackOfAmountFromOreDict("cellRawAnimalWaste", 2); + FluidStack aOutput = FluidUtils.getFluidStack(FertileManureSlurry, 1000); + + for (FluidStack aBloodStack : mBloodFluids) { + for (ItemStack aBoneStack : mList_Master_Bones) { + aBone = ItemUtils.getSimpleStack(aBoneStack, 2); + for (ItemStack aMeatStack : mList_Master_Meats) { + aMeat = ItemUtils.getSimpleStack(aMeatStack, 5); + // Poop Juice to Fertile Slurry + GT_Values.RA.addMixerRecipe(aCircuit, aBone, aMeat, aInputCells, aBloodStack, // Input Fluid + aOutput, // Output Fluid + aEmptyCells, // Output Item + 20 * 8, // Time? + 60 // Eu? + ); + } + } + } + } + + private static void addBasicOrganiseFertRecipes() { + FluidStack aInputFluid = FluidUtils.getFluidStack(ManureSlurry, 1000); + ItemStack aOutputDust = ItemUtils.getSimpleStack(dustOrganicFertilizer, 3); + ItemStack aPeat; + ItemStack aMeat; + for (ItemStack aPeatStack : mPeat) { + aPeat = ItemUtils.getSimpleStack(aPeatStack, 3); + for (ItemStack aMeatStack : mList_Master_Meats) { + aMeat = ItemUtils.getSimpleStack(aMeatStack, 5); + CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 20 * 20, 120); + } + + aPeat = ItemUtils.getSimpleStack(aPeatStack, 2); + for (ItemStack aMeatStack : mList_Master_FruitVege) { + aMeat = ItemUtils.getSimpleStack(aMeatStack, 9); + CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 10 * 20, 120); + } + } + } + + private static void addAdvancedOrganiseFertRecipes() { + FluidStack aInputFluid = FluidUtils.getFluidStack(FertileManureSlurry, 1000); + ItemStack aOutputDust = ItemUtils.getSimpleStack(dustOrganicFertilizer, 7); + ItemStack aPeat; + ItemStack aMeat; + for (ItemStack aPeatStack : mPeat) { + aPeat = ItemUtils.getSimpleStack(aPeatStack, 5); + for (ItemStack aMeatStack : mList_Master_Meats) { + aMeat = ItemUtils.getSimpleStack(aMeatStack, 7); + CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 10 * 20, 140); + } + aPeat = ItemUtils.getSimpleStack(aPeatStack, 3); + for (ItemStack aMeatStack : mList_Master_FruitVege) { + aMeat = ItemUtils.getSimpleStack(aMeatStack, 12); + CORE.RA.addChemicalRecipe(aPeat, aMeat, aInputFluid, null, aOutputDust, 5 * 20, 140); + } + } + } + + public static ItemStack aFertForestry; + public static ItemStack aFertIC2; + + + private static void addMiscRecipes() { + + ItemStack aDustOrganicFert = ItemUtils.getSimpleStack(dustOrganicFertilizer, 1); + ItemStack aManureByprod = ItemUtils.getSimpleStack(dustManureByproducts, 1); + + // Dehydrate Organise Fert to Normal Fert. + + /** + * Forestry Support + */ + if (LoadedMods.Forestry) { + Field aItemField = ReflectionUtils.getField(ReflectionUtils.getClass("forestry.plugins.PluginCore"), "items"); + try { + Object aItemRegInstance = aItemField != null ? aItemField.get(aItemField) : null; + if (aItemRegInstance != null) { + Field aFertField = ReflectionUtils.getField(aItemRegInstance.getClass(), "fertilizerCompound"); + Object aItemInstance = aFertField.get(aItemRegInstance); + if (aItemInstance instanceof Item) { + aFertForestry = ItemUtils.getSimpleStack((Item) aItemInstance); + Item aForestryFert = (Item) aItemInstance; + CORE.RA.addDehydratorRecipe( + new ItemStack[] { CI.getNumberedCircuit(11), ItemUtils.getSimpleStack(aDustOrganicFert, 4) }, null, + null, new ItemStack[] { ItemUtils.getSimpleStack(aForestryFert, 3), aManureByprod, aManureByprod }, + new int[] { 10000, 2000, 2000 }, 20 * 20, 240); + } + } + } + catch (IllegalArgumentException | IllegalAccessException e) { + + } + } + + /** + * IC2 Support + */ + if (LoadedMods.IndustrialCraft2) { + aFertIC2 = ItemUtils.getItemStackFromFQRN("IC2:itemFertilizer", 1); + CORE.RA.addDehydratorRecipe( + new ItemStack[] { CI.getNumberedCircuit(12), ItemUtils.getSimpleStack(aDustOrganicFert, 4) }, null, + null, new ItemStack[] { ItemUtils.getItemStackFromFQRN("IC2:itemFertilizer", 3), aManureByprod, + aManureByprod }, + new int[] { 10000, 2000, 2000 }, 20 * 20, 240); + } + + // Dirt Production + CORE.RA.addCompressorRecipe(ItemUtils.getSimpleStack(dustDirt, 9), ItemUtils.getSimpleStack(Blocks.dirt), + 20 * 2, 8); + + // Centrifuge Byproducts + + // Ammonium Nitrate, Phosphates, Calcium, Copper, Carbon + GT_Values.RA.addCentrifugeRecipe(CI.getNumberedCircuit(20), ItemUtils.getSimpleStack(aManureByprod, 4), + FluidUtils.getFluidStack("sulfuricacid", 250), // In Fluid + FluidUtils.getFluidStack("sulfuricapatite", 50), // Out Fluid + MaterialHelper.getDustSmall(Materials.Phosphorus, 2), MaterialHelper.getDustSmall(Materials.Calcium, 2), + MaterialHelper.getDustTiny(Materials.Copper, 1), MaterialHelper.getDust(Materials.Carbon, 1), ItemUtils.getSimpleStack(dustDirt, 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAmmoniumNitrate", 1), + new int[] { 2500, 2500, 750, 1000, 5000, 250 }, // Chances + 20 * 20, // Time + 60); // EU + + // Add Fuel Usages + CORE.RA.addSemifluidFuel(FluidUtils.getFluidStack(PoopJuice, 1000), 12); + CORE.RA.addSemifluidFuel(FluidUtils.getFluidStack(ManureSlurry, 1000), 24); + CORE.RA.addSemifluidFuel(FluidUtils.getFluidStack(FertileManureSlurry, 1000), 32); + + // Red Slurry / Tailings Processing + GT_Values.RA.addCentrifugeRecipe( + CI.getNumberedBioCircuit(10), + GT_Values.NI, + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 1000), + FluidUtils.getWater(500), + ELEMENT.getInstance().IRON.getSmallDust(1), + ELEMENT.getInstance().COPPER.getSmallDust(1), + ELEMENT.getInstance().TIN.getSmallDust(1), + ELEMENT.getInstance().SULFUR.getSmallDust(1), + ELEMENT.getInstance().NICKEL.getTinyDust(1), + ELEMENT.getInstance().LEAD.getTinyDust(1), + new int[] { 3000, 3000, 2000, 2000, 1000, 1000 }, + 30 * 20, + 30); + + } + + @Override + public String errorMessage() { + return "Failed to generate recipes for AgroChem."; + } + + @Override + public boolean generateRecipes() { + if (mBloodFluids.isEmpty()) { + Logger.INFO("Could not find, nor create Blood fluid. Unable to add recipes."); + return false; + } + + // Organise OreDict + processAllOreDict(); + + // Slurry Production + addBasicSlurryRecipes(); + addAdvancedSlurryRecipes(); + + // Organic Fert. Production + addBasicOrganiseFertRecipes(); + addAdvancedOrganiseFertRecipes(); + + addMiscRecipes(); + + BioRecipes.init(); + + return true; + } +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java new file mode 100644 index 0000000000..ca9053dacb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java @@ -0,0 +1,378 @@ +package gtPlusPlus.core.item.chemistry; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.AddGregtechRecipe; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class CoalTar extends ItemPackage { + + public static Fluid Coal_Gas; + public static Fluid Coal_Oil; + public static Fluid Ethylene; + public static Fluid Ethylbenzene; + public static Fluid Anthracene; + public static Fluid Toluene; + public static Fluid Coal_Tar; + public static Fluid Coal_Tar_Oil; + public static Fluid Sulfuric_Coal_Tar_Oil; + public static Fluid Naphthalene; + public static Fluid Phthalic_Acid; + + private static void recipeEthylBenzineFuelsIntoHeavyFuel() { + CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellFuel", 9), + ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), + null, + FluidUtils.getFluidStack("nitrofuel", 7500), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 11), + 100, + CORE.GTNH ? 1000 : 500); + CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellBioDiesel", 9), + ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), + null, + FluidUtils.getFluidStack("nitrofuel", 3000), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 11), + 300, + CORE.GTNH ? 1000 : 500); + } + + public static void recipeCreateEthylene(){ + + FluidStack bioEth1 = FluidUtils.getFluidStack("fluid.bioethanol", 2000); + FluidStack bioEth2 = FluidUtils.getFluidStack("bioethanol", 2000); + + if (bioEth1 != null){ + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(17), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1) + }, + bioEth1, + FluidUtils.getWater(1000), + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("cellEthylene", 1) + }, + new int[] {10000}, + 120 * 20, + 80); + } + + if (bioEth2 != null){ + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(18), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1) + }, + bioEth2, + FluidUtils.getWater(1000), + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("cellEthylene", 1) + }, + new int[] {10000}, + 120 * 20, + 80); + } + } + + public static void recipeCreateBenzene(){ + //Create Benzene - (Toluene + Hydrogen | 95% Benzene / 5% methane) + CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("cellToluene", 10), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 10) + }, + null, + null, + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("cellMethane", 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellBenzene", 19) + }, + new int[]{10000, 10000}, + 20*100, + 90); + } + + public static void recipeCreateEthylbenzene(){ + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellEthylene", 2), + ItemUtils.getItemStackOfAmountFromOreDict("cellBenzene", 2), + null, + FluidUtils.getFluidStack("fluid.ethylbenzene", 4000), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 4), + 300); + } + + + public static void recipeCoalToCoalTar(){ + //Charcoal + AddGregtechRecipe.addCokeAndPyrolyseRecipes( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 32L), + 8, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDirt", 2), + FluidUtils.getFluidStack("fluid.coaltar", 800), + 15, + 120); + //Lignite + AddGregtechRecipe.addCokeAndPyrolyseRecipes( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 16L), + 8, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDarkAsh", 2), + FluidUtils.getFluidStack("fluid.coaltar", 800), + 45, + 60); + + //Coal + AddGregtechRecipe.addCokeAndPyrolyseRecipes( + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 12L), + 8, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDarkAsh", 2), + FluidUtils.getFluidStack("fluid.coaltar", 2200), + 30, + 120); + + //Coke + AddGregtechRecipe.addCokeAndPyrolyseRecipes( + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 8), + 8, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallAsh", 3), + FluidUtils.getFluidStack("fluid.coaltar", 3400), + 15, + 240); + + } + + private static void recipeCoalTarToCoalTarOil() { + // v - Distill (60% Tar oil/15% Naphtha/20% Ethylbenzene/5% Anthracene) + //Create Coal Tar Oil + //FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, null); + GT_Values.RA.addDistilleryRecipe( + CI.getNumberedCircuit(1), //Circuit + FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput + FluidUtils.getFluidStack("fluid.coaltaroil", 600), //aOutput + 600, //aDuration + 64,//aEUt + false //Hidden? + ); + GT_Values.RA.addDistilleryRecipe( + CI.getNumberedCircuit(2), //Circuit + FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput + FluidUtils.getFluidStack("liquid_naphtha", 150), //aOutput + 300, //aDuration + 30,//aEUt + false //Hidden? + ); + GT_Values.RA.addDistilleryRecipe( + CI.getNumberedCircuit(3), //Circuit + FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput + FluidUtils.getFluidStack("fluid.ethylbenzene", 200), //aOutput + 450, //aDuration + 86,//aEUt + false //Hidden? + ); + GT_Values.RA.addDistilleryRecipe( + CI.getNumberedCircuit(4), //Circuit + FluidUtils.getFluidStack("fluid.coaltar", 1000), //aInput + FluidUtils.getFluidStack("fluid.anthracene", 50), //aOutput + 900, //aDuration + 30,//aEUt + false //Hidden? + ); + GT_Values.RA.addDistilleryRecipe( + CI.getNumberedCircuit(5), //Circuit + FluidUtils.getFluidStack("fluid.coaltar", 1500), //aInput + FluidUtils.getFluidStack("fluid.kerosene", 600), //aOutput + 300, //aDuration + 64,//aEUt + false //Hidden? + ); + + GT_Values.RA.addDistillationTowerRecipe( + FluidUtils.getFluidStack("fluid.coaltar", 1200), + new FluidStack[]{ + FluidUtils.getFluidStack("fluid.coaltaroil", 500), //aOutput + FluidUtils.getFluidStack("liquid_naphtha", 100), //aOutput + FluidUtils.getFluidStack("fluid.ethylbenzene", 150), //aOutput + FluidUtils.getFluidStack("fluid.anthracene", 50), //aOutput + FluidUtils.getFluidStack("fluid.kerosene", 400), //aOutput + }, + null, + 900, + 60); + + } + + private static void recipeCoalTarOilToSulfuricOilToNaphthalene() { + //SulfuricCoalTarOil + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellCoalTarOil", 8), + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 8), + null, + null, + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricCoalTarOil", 16), + 20*16); + GT_Values.RA.addDistilleryRecipe( + CI.getNumberedCircuit(6), //Circuit + FluidUtils.getFluidStack("fluid.sulfuriccoaltaroil", 1000), //aInput + FluidUtils.getFluidStack("fluid.naphthalene", 1000), //aOutput + 1200, //aDuration + 30,//aEUt + false //Hidden? + ); + + } + + private static void recipeNaphthaleneToPhthalicAcid() { + //SulfuricCoalTarOil + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellNaphthalene", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 5), + null, + FluidUtils.getFluidStack("fluid.phthalicacid", 2500), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 2), + 20*16); + + } + + private static void recipePhthalicAcidToPhthalicAnhydride() { + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(15) + }, + FluidUtils.getFluidStack("fluid.phthalicacid", 144), + null, + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustPhthalicAnhydride", 1) + }, + new int[] {10000}, + 60 * 20, + 120); + } + + @Override + public String errorMessage() { + return "Bad Coal Science!"; + } + + @Override + public boolean generateRecipes() { + recipeCreateEthylene(); + recipeCreateBenzene(); + recipeCreateEthylbenzene(); + + recipeCoalToCoalTar(); + recipeCoalTarToCoalTarOil(); + recipeCoalTarOilToSulfuricOilToNaphthalene(); + recipeNaphthaleneToPhthalicAcid(); + recipePhthalicAcidToPhthalicAnhydride(); + + recipeEthylBenzineFuelsIntoHeavyFuel(); + + recipePhthalicAcidConversion(); + + //Burn the coal gas! + GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalGas", 1), null, 96, 1); + CORE.RA.addSemifluidFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricCoalTarOil", 1), 64); + CORE.RA.addSemifluidFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalTarOil", 1), 32); + CORE.RA.addSemifluidFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalTar", 1), 16); + + return true; + } + + private void recipePhthalicAcidConversion() { + FluidStack aMyAcid = FluidUtils.getFluidStack(Phthalic_Acid, 500); + FluidStack aGtAcid = FluidUtils.getFluidStack("phtalicacid", 500); + if (aMyAcid != null && aGtAcid != null) { + CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(8), aMyAcid, aGtAcid, null, 50, 16, false); + CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(9), aGtAcid, aMyAcid, null, 50, 16, false); + } + } + + @Override + public void items() { + //Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); + // v - Dehydrate at 180C+ + //Create Phthalic Anhydride + ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", "C6H4(CO)2O", Utils.rgbtoHexValue(175, 175, 175)); + + //Lithium Hydroperoxide - LiOH + H2O2 → LiOOH + 2 H2O + ItemUtils.generateSpecialUseDusts("LithiumHydroperoxide", "Lithium Hydroperoxide", "HLiO2", Utils.rgbtoHexValue(125, 125, 125)); + // v - Dehydrate + //Lithium Peroxide - 2 LiOOH → Li2O2 + H2O2 + 2 H2O + //Lithium_Peroxide = FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new short[]{135, 135, 135, 100}, null, null); + } + + @Override + public void blocks() { + + } + + @Override + public void fluids() { + + //Create Coal Gas + Coal_Gas = FluidUtils.generateFluidNonMolten("CoalGas", "Coal Gas", 500, new short[]{48, 48, 48, 100}, null, null); + //Ethanol + // v - Dehydrate cells to remove water + + + //Create Ethylene + if (!FluidUtils.doesFluidExist("ethylene")){ + Ethylene = FluidUtils.generateFluidNonMolten("ethylene", "Ethylene", -103, new short[]{255, 255, 255, 100}, null, null); + } + else { + Ethylene = FluidUtils.getWildcardFluidStack("ethylene", 1).getFluid(); + } + + //Create Ethylbenzene - Ethylbenzene is produced in on a large scale by combining benzene and ethylene in an acid-catalyzed chemical reaction + //Use Chemical Reactor + Ethylbenzene = FluidUtils.generateFluidNonMolten("Ethylbenzene", "Ethylbenzene", 136, new short[]{255, 255, 255, 100}, null, null); + //Create Anthracene + Anthracene = FluidUtils.generateFluidNonMolten("Anthracene", "Anthracene", 340, new short[]{255, 255, 255, 100}, null, null); + //Toluene + if (!FluidUtils.doesFluidExist("liquid_toluene")){ + Toluene = FluidUtils.generateFluidNonMolten("liquid_toluene", "Toluene", -95, new short[]{140, 70, 20, 100}, null, null); + } + else { + Toluene = FluidUtils.getWildcardFluidStack("liquid_toluene", 1).getFluid(); + } + + //Create Coal Tar + Coal_Tar = FluidUtils.generateFluidNonMolten("CoalTar", "Coal Tar", 450, new short[]{32, 32, 32, 100}, null, null); + // v - Distill (60% Tar oil/15% Naphtha/20% Ethylbenzene/5% Anthracene) + //Create Coal Tar Oil + Coal_Tar_Oil = FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, null); + // v - Wash With Sulfuric Acid + //Create Sulfuric Coal Tar Oil + Sulfuric_Coal_Tar_Oil = FluidUtils.generateFluidNonMolten("SulfuricCoalTarOil", "Sulfuric Coal Tar Oil", 240, new short[]{250, 170, 12, 100}, null, null); + // v - Distill (No loss, just time consuming) + //Create Naphthalene + Naphthalene = FluidUtils.generateFluidNonMolten("Naphthalene", "Naphthalene", 115, new short[]{210, 185, 135, 100}, null, null); + // v - Oxidize with mercury and nitric acid + //Create Phthalic Acid + Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); + // v - Dehydrate at 180C+ + //Create Phthalic Anhydride + //ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", "C6H4(CO)2O", Utils.rgbtoHexValue(175, 175, 175)); + + + + + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java new file mode 100644 index 0000000000..a42d179f65 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java @@ -0,0 +1,1115 @@ +package gtPlusPlus.core.item.chemistry; + +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; +import gtPlusPlus.core.item.circuit.ItemAdvancedChip; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.*; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.plugin.agrichem.BioRecipes; +import gtPlusPlus.plugin.agrichem.block.AgrichemFluids; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.*; + +public class GenericChem extends ItemPackage { + + /** + * Switches + */ + + private static boolean usingGregtechNitricOxide = false; + private static boolean usingGregtechNitrogenDioxide = false; + private static boolean usingGregtechHydricSulfur = false; + + /** + * Materials + */ + + //public static final Material BAKELITE = new Material("Bakelite", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{90, 140, 140}, 120, 240, 23, 24, true, null, 0);//Not a GT Inherited Material + //public static final Material NYLON = new Material("Nylon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{45, 45, 45}, 300, 600, 44, 48, true, null, 0);//Not a GT Inherited Material + //public static final Material CARBYNE = new Material("Carbyne", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{25, 25, 25}, 2500, 5000, 63, 52, true, null, 0);//Not a GT Inherited Material + + + //Refined PTFE + public static final Material TEFLON = new Material( + "Teflon", + MaterialState.SOLID, + TextureSet.SET_SHINY, + new short[] { 75, 45, 75 }, + 330, 640, + -1, -1, + false, + null, + 0, + new MaterialStack[] { + new MaterialStack(NONMATERIAL.PTFE, 75), + new MaterialStack(NONMATERIAL.PLASTIC, 15), + new MaterialStack(ELEMENT.getInstance().CARBON, 5), + new MaterialStack(ELEMENT.getInstance().SODIUM, 5) + }); + + /** + * Fluids + */ + + public static Fluid Benzene; + public static Fluid NitroBenzene; + public static Fluid Aniline; + public static Fluid Polyurethane; + public static Fluid Phenol; //https://en.wikipedia.org/wiki/Phenol#Uses + public static Fluid Cyclohexane; //https://en.wikipedia.org/wiki/Cyclohexane + public static Fluid Cyclohexanone; //https://en.wikipedia.org/wiki/Cyclohexanone + public static Fluid Cadaverine; //https://en.wikipedia.org/wiki/Cadaverine + public static Fluid Putrescine; //https://en.wikipedia.org/wiki/Putrescine + public static Fluid BoricAcid; + public static Fluid HydrochloricAcid; + + + public static Fluid Ethylanthraquinone2; + public static Fluid Ethylanthrahydroquinone2; + public static Fluid Hydrogen_Peroxide; + public static Fluid Lithium_Peroxide; + public static Fluid Nitric_Oxide; + public static Fluid Nitrogen_Dioxide; + public static Fluid Carbon_Disulfide; + public static Fluid Hydrogen_Sulfide; + + /** + * Items + */ + + // Phenol Byproducts + public Item PhenolicResins; //https://en.wikipedia.org/wiki/Phenol_formaldehyde_resin + public static ItemGenericChemBase mGenericChemItem1; + public static Item mAdvancedCircuit; + + private ItemStack mCatalystCarrier; + + public static ItemStack mRedCatalyst; + public static ItemStack mYellowCatalyst; + public static ItemStack mBlueCatalyst; + public static ItemStack mOrangeCatalyst; + public static ItemStack mPurpleCatalyst; + public static ItemStack mBrownCatalyst; + public static ItemStack mPinkCatalyst; + + public static ItemStack mMillingBallAlumina; + public static ItemStack mMillingBallSoapstone; + + public static ItemStack mSodiumEthoxide; + public static ItemStack mSodiumEthylXanthate; + public static ItemStack mPotassiumEthylXanthate; + public static ItemStack mPotassiumHydroxide; + + + + @Override + public void items() { + PhenolicResins = ItemUtils.generateSpecialUseDusts("phenolicresins", "Phenolic Resin", "HOC6H4CH2OH", Utils.rgbtoHexValue(80, 40, 40))[0]; + //MaterialGenerator.generate(BAKELITE, false); + //MaterialGenerator.generate(NYLON, false); + MaterialGenerator.generate(TEFLON, false); + + mGenericChemItem1 = new ItemGenericChemBase(); + mAdvancedCircuit = new ItemAdvancedChip(); + GregtechItemList.Circuit_T3RecipeSelector.set(mAdvancedCircuit); + + registerItemStacks(); + registerOreDict(); + + GregtechItemList.Milling_Ball_Alumina.set(mMillingBallAlumina); + GregtechItemList.Milling_Ball_Soapstone.set(mMillingBallSoapstone); + + } + + + public void registerItemStacks() { + + mCatalystCarrier = ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 13, 1); + + mRedCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 0, 1); + mYellowCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 1, 1); + mBlueCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 2, 1); + mOrangeCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 3, 1); + mPurpleCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 4, 1); + mBrownCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 5, 1); + mPinkCatalyst = ItemUtils.simpleMetaStack(mGenericChemItem1, 6, 1); + mMillingBallAlumina = ItemUtils.simpleMetaStack(mGenericChemItem1, 7, 1); + mMillingBallSoapstone = ItemUtils.simpleMetaStack(mGenericChemItem1, 8, 1); + mSodiumEthoxide = ItemUtils.simpleMetaStack(mGenericChemItem1, 9, 1); + mSodiumEthylXanthate = ItemUtils.simpleMetaStack(mGenericChemItem1, 10, 1); + mPotassiumEthylXanthate = ItemUtils.simpleMetaStack(mGenericChemItem1, 11, 1); + mPotassiumHydroxide = ItemUtils.simpleMetaStack(mGenericChemItem1, 12, 1); + + } + + public void registerOreDict() { + + ItemUtils.addItemToOreDictionary(mRedCatalyst, "catalystIronCopper"); + ItemUtils.addItemToOreDictionary(mYellowCatalyst, "catalystTungstenNickel"); + ItemUtils.addItemToOreDictionary(mBlueCatalyst, "catalystCobaltTitanium"); + ItemUtils.addItemToOreDictionary(mOrangeCatalyst, "catalystVanadiumPalladium"); + ItemUtils.addItemToOreDictionary(mPurpleCatalyst, "catalystIridiumRuthenium"); + ItemUtils.addItemToOreDictionary(mBrownCatalyst, "catalystNickelAluminium"); + ItemUtils.addItemToOreDictionary(mPinkCatalyst, "catalystPlatinumRhodium"); + ItemUtils.addItemToOreDictionary(mMillingBallAlumina, "millingballAlumina"); + ItemUtils.addItemToOreDictionary(mMillingBallSoapstone, "millingballSoapstone"); + ItemUtils.addItemToOreDictionary(mSodiumEthoxide, "dustSodiumEthoxide"); + ItemUtils.addItemToOreDictionary(mSodiumEthylXanthate, "dustSodiumEthylXanthate"); + ItemUtils.addItemToOreDictionary(mPotassiumEthylXanthate, "dustPotassiumEthylXanthate"); + ItemUtils.addItemToOreDictionary(mPotassiumHydroxide, "dustPotassiumHydroxide"); + + } + + @Override + public void blocks() {} + + @Override + public void fluids() { + + if (!FluidRegistry.isFluidRegistered("benzene")) { + Benzene = FluidUtils.generateFluidNoPrefix("benzene", "Benzene", 278, new short[] { 100, 70, 30, 100 }, true); + } + else { + Benzene = FluidRegistry.getFluid("benzene"); + } + + NitroBenzene = FluidUtils.generateFluidNoPrefix("nitrobenzene", "NitroBenzene", 278, new short[] { 70, 50, 40, 100 }, true); + + Aniline = FluidUtils.generateFluidNoPrefix("aniline", "Aniline", 266, new short[] { 100, 100, 30, 100 }, true); + + BoricAcid = FluidUtils.generateFluidNoPrefix("boricacid", "Boric Acid", 278, new short[] { 90, 30, 120, 100 }, true); + + Polyurethane = FluidUtils.generateFluidNoPrefix("polyurethane", "Polyurethane", 350, new short[] { 100, 70, 100, 100 }, true); + + if (!FluidRegistry.isFluidRegistered("phenol")) { + Phenol = FluidUtils.generateFluidNoPrefix("phenol", "Phenol", 313, new short[] { 100, 70, 30, 100 }, true); + } + else { + Phenol = FluidRegistry.getFluid("phenol"); + } + + // Use GT's if it exists, else make our own. + if (FluidRegistry.isFluidRegistered("hydrochloricacid_gt5u")) { + HydrochloricAcid = FluidRegistry.getFluid("hydrochloricacid_gt5u"); + } + else { + HydrochloricAcid = FluidUtils.generateFluidNoPrefix("hydrochloricacid", "Hydrochloric Acid", 285, new short[] { 183, 200, 196, 100 }, true); + } + + Cyclohexane = FluidUtils.generateFluidNoPrefix("cyclohexane", "Cyclohexane", 32 + 175, new short[] { 100, 70, 30, 100 }, true); + Cyclohexanone = FluidUtils.generateFluidNoPrefix("cyclohexanone", "Cyclohexanone", 32 + 175, new short[] { 100, 70, 30, 100 }, true); + + Cadaverine = FluidUtils.generateFluidNoPrefix("cadaverine", "Cadaverine", 32 + 175, new short[] { 100, 70, 30, 100 }, true); + Putrescine = FluidUtils.generateFluidNoPrefix("putrescine", "Putrescine", 32 + 175, new short[] { 100, 70, 30, 100 }, true); + + //Create 2-Ethylanthraquinone + //2-Ethylanthraquinone is prepared from the reaction of phthalic anhydride and ethylbenzene + Ethylanthraquinone2 = FluidUtils.generateFluidNonMolten("2Ethylanthraquinone", "2-Ethylanthraquinone", 415, new short[]{227, 255, 159, 100}, null, null); + //Create 2-Ethylanthrahydroquinone + //Palladium plate + Hydrogen(250) + 2-Ethylanthraquinone(500) = 600 Ethylanthrahydroquinone + Ethylanthrahydroquinone2 = FluidUtils.generateFluidNonMolten("2Ethylanthrahydroquinone", "2-Ethylanthrahydroquinone", 415, new short[]{207, 225, 129, 100}, null, null); + //Create Hydrogen Peroxide + //Compressed Air(1500) + Ethylanthrahydroquinone(500) + Anthracene(5) = 450 Ethylanthraquinone && 200 Peroxide + Hydrogen_Peroxide = FluidUtils.generateFluidNonMolten("HydrogenPeroxide", "Hydrogen Peroxide", 150, new short[]{210, 255, 255, 100}, null, null); + + if (FluidRegistry.isFluidRegistered("nitricoxide")) { + Nitric_Oxide = FluidRegistry.getFluid("nitricoxide"); + usingGregtechNitricOxide = true; + } + else { + Nitric_Oxide = FluidUtils.generateFluidNoPrefix("nitricoxide", "Nitric Oxide", 200, new short[] {125, 200, 240, 100}); + } + if (FluidRegistry.isFluidRegistered("nitrogendioxide")) { + Nitrogen_Dioxide = FluidRegistry.getFluid("nitrogendioxide"); + usingGregtechNitrogenDioxide = true; + } + else { + Nitrogen_Dioxide = FluidUtils.generateFluidNoPrefix("nitrogendioxide", "Nitrogen Dioxide", 200, new short[] {100, 175, 255, 100}); + } + + + + //Lithium Hydroperoxide - LiOH + H2O2 → LiOOH + 2 H2O + //ItemUtils.generateSpecialUseDusts("LithiumHydroperoxide", "Lithium Hydroperoxide", "HLiO2", Utils.rgbtoHexValue(125, 125, 125)); + // v - Dehydrate + //Lithium Peroxide - 2 LiOOH → Li2O2 + H2O2 + 2 H2O + Lithium_Peroxide = FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new short[]{135, 135, 135, 100}, null, null); + + Carbon_Disulfide = FluidUtils.generateFluidNoPrefix("CarbonDisulfide", "Carbon Disulfide", 350, new short[]{175, 175, 175, 100}); + + if (FluidRegistry.isFluidRegistered("fluid.liquid_hydricsulfur") || MaterialUtils.doesMaterialExist("HydricSulfide")) { + usingGregtechHydricSulfur = true; + Fluid aFluid = null; + if (ItemUtils.doesItemListEntryExist("sHydricSulfur")) { + ItemStack aListItem = ItemUtils.getValueOfItemList("sHydricSulfur", 1, (ItemList) null); + if (aListItem != null) { + FluidStack aFluidStack = FluidContainerRegistry.getFluidForFilledItem(aListItem); + if (aFluidStack != null) { + aFluid = aFluidStack.getFluid(); + } + + } + } + if (aFluid == null) { + aFluid = FluidUtils.getWildcardFluidStack("liquid_hydricsulfur", 1000).getFluid(); + } + Hydrogen_Sulfide = aFluid; + } + else { + Hydrogen_Sulfide = FluidUtils.generateFluidNoPrefix("HydrogenSulfide", "Hydrogen Sulfide", 446, new short[]{240, 130, 30, 100}); + } + + } + + @Override + public String errorMessage() { + return "Failed to generate recipes for GenericChem."; + } + + @Override + public boolean generateRecipes() { + + recipeAdvancedChip(); + recipeCatalystRed(); + recipeCatalystYellow(); + recipeCatalystBlue(); + recipeCatalystOrange(); + recipeCatalystPurple(); + recipeCatalystBrown(); + recipeCatalystPink(); + + recipeGrindingBallAlumina(); + recipeGrindingBallSoapstone(); + + recipeNitroBenzene(); + recipeAniline(); + recipeCadaverineAndPutrescine(); + recipeCyclohexane(); + recipeCyclohexanone(); + + recipe2Ethylanthraquinone(); + recipe2Ethylanthrahydroquinone(); + recipeHydrogenPeroxide(); + recipeLithiumHydroperoxide(); + recipeLithiumPeroxide(); + if (!usingGregtechNitricOxide) { + recipeNitricOxide(); + } + if (!usingGregtechNitrogenDioxide) { + recipeNitrogenDioxide(); + } + if (!usingGregtechHydricSulfur) { + recipeHydricSulfur(); + } + + // Add recipes if we are not using GT's fluid. + if (!FluidRegistry.isFluidRegistered("hydrochloricacid_gt5u")) { + recipeHydrochloricAcid(); + } + + recipeSodiumEthoxide(); + recipeCarbonDisulfide(); + recipeEthylXanthates(); + recipePotassiumHydroxide(); + + registerFuels(); + + return true; + } + + + private void recipeSodiumEthoxide() { + //2 C2H5OH + 2 Na → 2 C2H5ONa + H2 + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(16), + ELEMENT.getInstance().SODIUM.getDust(2) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthanol, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(mSodiumEthoxide, 2) + + }, + new FluidStack[] { + ELEMENT.getInstance().HYDROGEN.getFluidStack(2000) + }, + 20 *20, + 120, + 2); + } + + + private void recipePotassiumHydroxide() { + //Ca(OH)2 + K2CO3 → CaCO3 + 2 KOH + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(18), + ELEMENT.getInstance().POTASSIUM.getDust(4), + ELEMENT.getInstance().CARBON.getDust(2), + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 2), + }, + new FluidStack[] { + FluidUtils.getFluidStack("oxygen", 6000), + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 2), + ItemUtils.getSimpleStack(mPotassiumHydroxide, 4) + + }, + new FluidStack[] { + + }, + 20 *30, + 120, + 2); + + } + + + private void recipeEthylXanthates() { + + //Potassium ethyl xanthate - CH3CH2OH + CS2 + KOH → CH3CH2OCS2K + H2O + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(17), + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 2), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthanol, 1000), + FluidUtils.getFluidStack(Carbon_Disulfide, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(mPotassiumEthylXanthate, 1) + }, + new FluidStack[] { + FluidUtils.getWater(1000) + }, + 20 *60, + 120, + 4); + + //Sodium ethyl xanthate - CH3CH2ONa + CS2 → CH3CH2OCS2Na + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(17), + ItemUtils.getSimpleStack(mSodiumEthoxide, 1) + }, + new FluidStack[] { + FluidUtils.getFluidStack(Carbon_Disulfide, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(mSodiumEthylXanthate, 1) + }, + new FluidStack[] { + + }, + 20 *60, + 120, + 4); + + } + + + private void recipeHydricSulfur() { + + ItemStack aCellHydricSulfide = ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenSulfide", 1); + GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().SULFUR.getDust(1), GT_Utility.getIntegratedCircuit(1), ELEMENT.getInstance().HYDROGEN.getFluidStack(2000), FluidUtils.getFluidStack(Hydrogen_Sulfide, 3000), GT_Values.NI, 60, 8); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ELEMENT.getInstance().SULFUR.getDust(1), CI.emptyCells(3), ELEMENT.getInstance().HYDROGEN.getFluidStack(2000), GT_Values.NF, ItemUtils.getSimpleStack(aCellHydricSulfide, 3), GT_Values.NI, 60, 8); + + } + + + private void recipeCarbonDisulfide() { + + CORE.RA.addBlastRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 8), + ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 16) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustDarkAsh", 1) + }, + new FluidStack[] { + FluidUtils.getFluidStack(Carbon_Disulfide, 4000) + }, + 20 *60 * 10, + 30, + 1500); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(20), + ItemUtils.getSimpleStack(mBrownCatalyst, 0), + ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 4) + }, + new FluidStack[] { + FluidUtils.getFluidStack(CoalTar.Coal_Gas, 1000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Carbon_Disulfide, 2000), + FluidUtils.getFluidStack(Hydrogen_Sulfide, 4000) + }, + 20 *60 * 5, + 30, + 2); + + + } + + + private static void registerFuels() { + + // Burnables + + // Gas Fuels + GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellNitroBenzene", 1), null, 1250, 1); + + } + + private void recipeGrindingBallAlumina() { + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.getNumberedCircuit(10), + ItemUtils.getSimpleStack(AgriculturalChem.mAlumina, 64) + }, + FluidUtils.getFluidStack(GenericChem.Aniline, 4000), + ItemUtils.getSimpleStack(mMillingBallAlumina, 8), + 180 * 20, + 480); + } + private void recipeGrindingBallSoapstone() { + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.getNumberedCircuit(10), + ItemUtils.getItemStackOfAmountFromOreDict("dustSoapstone", 32) + }, + FluidUtils.getFluidStack(AgrichemFluids.mLiquidResin, 2500), + ItemUtils.getSimpleStack(mMillingBallSoapstone, 8), + 120 * 20, + 480); + } + + private void recipeNitrogenDioxide() { + ItemStack aNitricOxideCell = ItemUtils.getItemStackOfAmountFromOreDict("cellNitricOxide", 1); + ItemStack aNitrogenDioxideCell = ItemUtils.getItemStackOfAmountFromOreDict("cellNitrogenDioxide", 1); + GT_Values.RA.addChemicalRecipe( ItemUtils.getSimpleStack(aNitricOxideCell, 2), GT_Utility.getIntegratedCircuit(1), ELEMENT.getInstance().OXYGEN.getFluidStack(1000), FluidUtils.getFluidStack(Nitrogen_Dioxide, 3000), CI.emptyCells(2), 160); + GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(1), GT_Utility.getIntegratedCircuit(1), FluidUtils.getFluidStack(Nitric_Oxide, 2000), FluidUtils.getFluidStack(Nitrogen_Dioxide, 3000), CI.emptyCells(1), 160); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ItemUtils.getSimpleStack(aNitricOxideCell, 2), CI.emptyCells(1), ELEMENT.getInstance().OXYGEN.getFluidStack(1000), GT_Values.NF, ItemUtils.getSimpleStack(aNitrogenDioxideCell, 3), GT_Values.NI, 160, 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ELEMENT.getInstance().OXYGEN.getCell(1), CI.emptyCells(2), FluidUtils.getFluidStack(Nitric_Oxide, 2000), GT_Values.NF, ItemUtils.getSimpleStack(aNitrogenDioxideCell, 3), GT_Values.NI, 160, 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ItemUtils.getSimpleStack(aNitricOxideCell, 2), ELEMENT.getInstance().OXYGEN.getCell(1), GT_Values.NF, GT_Values.NF, ItemUtils.getSimpleStack(aNitrogenDioxideCell, 3), GT_Values.NI, 160, 30); + } + + + private void recipeNitricOxide() { + ItemStack aWaterCell = ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 1); + ItemStack aNitricOxideCell = ItemUtils.getItemStackOfAmountFromOreDict("cellNitricOxide", 1); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(MISC_MATERIALS.AMMONIA.getCell(8), CI.emptyCells(1), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), ItemUtils.getSimpleStack(aWaterCell, 9), GT_Values.NI, 160, 30); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(ELEMENT.getInstance().OXYGEN.getCell(5), CI.emptyCells(4), MISC_MATERIALS.AMMONIA.getFluidStack(8000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), ItemUtils.getSimpleStack(aWaterCell, 9), GT_Values.NI, 160, 30); + GT_Values.RA.addChemicalRecipe( MISC_MATERIALS.AMMONIA.getCell(8), GT_Utility.getIntegratedCircuit(11), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), FluidUtils.getWater(9000), ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(4), 160); + GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(5), GT_Utility.getIntegratedCircuit(11), MISC_MATERIALS.AMMONIA.getFluidStack(8000), FluidUtils.getWater(9000), ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(1), 160); + GT_Values.RA.addChemicalRecipe( MISC_MATERIALS.AMMONIA.getCell(8), GT_Utility.getIntegratedCircuit(2), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), CI.emptyCells(8), 320); + GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(5), GT_Utility.getIntegratedCircuit(2), MISC_MATERIALS.AMMONIA.getFluidStack(8000), FluidUtils.getFluidStack(Nitric_Oxide, 4000), CI.emptyCells(5), 320); + GT_Values.RA.addChemicalRecipe( MISC_MATERIALS.AMMONIA.getCell(8), GT_Utility.getIntegratedCircuit(12), ELEMENT.getInstance().OXYGEN.getFluidStack(5000), GT_Values.NF, ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(4), 160); + GT_Values.RA.addChemicalRecipe( ELEMENT.getInstance().OXYGEN.getCell(5), GT_Utility.getIntegratedCircuit(12), MISC_MATERIALS.AMMONIA.getFluidStack(8000), GT_Values.NF, ItemUtils.getSimpleStack(aNitricOxideCell, 4), CI.emptyCells(1), 160); + GT_Values.RA.addChemicalRecipeForBasicMachineOnly(MISC_MATERIALS.AMMONIA.getCell(8), ELEMENT.getInstance().OXYGEN.getCell(5), GT_Values.NF, GT_Values.NF, ItemUtils.getSimpleStack(aNitricOxideCell, 4), ItemUtils.getSimpleStack(aWaterCell, 9), 160, 30); + GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(1)}, new FluidStack[]{MISC_MATERIALS.AMMONIA.getFluidStack(8000), ELEMENT.getInstance().OXYGEN.getFluidStack(5000)}, new FluidStack[]{FluidUtils.getFluidStack(Nitric_Oxide, 4000), FluidUtils.getWater(9000)}, null, 160, 30); + } + + + private void recipeHydrochloricAcid() { + + ItemStack aAcidCell = ItemUtils.getItemStackOfAmountFromOreDict("cellHydrochloricAcid", 1); + + CORE.RA.addChemicalRecipe( + ELEMENT.getInstance().CHLORINE.getCell(1), + GT_Utility.getIntegratedCircuit(1), + ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), + FluidUtils.getFluidStack(HydrochloricAcid, 2000), + CI.emptyCells(1), + 60, + 8); + + CORE.RA.addChemicalRecipe( + ELEMENT.getInstance().HYDROGEN.getCell(1), + GT_Utility.getIntegratedCircuit(1), + ELEMENT.getInstance().CHLORINE.getFluidStack(1000), + FluidUtils.getFluidStack(HydrochloricAcid, 2000), + CI.emptyCells(1), + 60, + 8); + + GT_Values.RA.addElectrolyzerRecipe( + CI.emptyCells(1), + GT_Utility.getIntegratedCircuit(1), + FluidUtils.getFluidStack(HydrochloricAcid, 2000), + ELEMENT.getInstance().CHLORINE.getFluidStack(1000), + ELEMENT.getInstance().HYDROGEN.getCell(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + + GT_Values.RA.addElectrolyzerRecipe( + CI.emptyCells(1), + GT_Utility.getIntegratedCircuit(11), + FluidUtils.getFluidStack(HydrochloricAcid, 2000), + ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), + ELEMENT.getInstance().CHLORINE.getCell(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + + GT_Values.RA.addElectrolyzerRecipe( + ItemUtils.getSimpleStack(aAcidCell, 2), + GT_Values.NI, + GT_Values.NF, + GT_Values.NF, + ELEMENT.getInstance().HYDROGEN.getCell(1), + ELEMENT.getInstance().CHLORINE.getCell(1), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 720, + 30); + } + + private void recipeCyclohexane() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierTwoChip(), + ItemUtils.getSimpleStack(mBrownCatalyst, 0) + }, + new FluidStack[] { + FluidUtils.getFluidStack(Benzene, 2000), + FluidUtils.getFluidStack("hydrogen", 10000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Cyclohexane, 1000), + }, + 20 * 120, + 120, + 2); + + } + + private void recipeCyclohexanone() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierTwoChip(), + ItemUtils.getSimpleStack(mBlueCatalyst, 0) + }, + new FluidStack[] { + FluidUtils.getFluidStack(Cyclohexane, 2000), + FluidUtils.getFluidStack("air", 10000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Cyclohexanone, 2000), + }, + 20 * 120, + 120, + 2); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierTwoChip(), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Phenol, 2000), + FluidUtils.getFluidStack("oxygen", 5000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Cyclohexanone, 2000), + }, + 20 * 120, + 120, + 2); + + + + + } + + private void recipeCatalystRed() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierOneChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().IRON.getDust(2), + ELEMENT.getInstance().COPPER.getDust(2), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mRedCatalyst, 10), + 20 * 20, + 30); + + } + + private void recipeCatalystYellow() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierThreeChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().TUNGSTEN.getDust(4), + ELEMENT.getInstance().NICKEL.getDust(4), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mYellowCatalyst, 10), + 60 * 20, + 2000); + + } + + private void recipeCatalystBlue() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierTwoChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().COBALT.getDust(3), + ELEMENT.getInstance().TITANIUM.getDust(3), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mBlueCatalyst, 10), + 40 * 20, + 500); + + } + + private void recipeCatalystOrange() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierTwoChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().VANADIUM.getDust(5), + ELEMENT.getInstance().PALLADIUM.getDust(5), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mOrangeCatalyst, 10), + 40 * 20, + 500); + + } + + private void recipeCatalystPurple() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierFourChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().IRIDIUM.getDust(6), + ELEMENT.getInstance().RUTHENIUM.getDust(6), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mPurpleCatalyst, 10), + 120 * 20, + 8000); + + } + + private void recipeCatalystBrown() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierOneChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().NICKEL.getDust(4), + ELEMENT.getInstance().ALUMINIUM.getDust(4), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mBrownCatalyst, 10), + 15 * 20, + 30); + + } + + private void recipeCatalystPink() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getTierThreeChip(), + CI.getEmptyCatalyst(10), + ELEMENT.getInstance().PLATINUM.getDust(4), + ELEMENT.getInstance().RHODIUM.getDust(4), + }, + GT_Values.NF, + ItemUtils.getSimpleStack(mPinkCatalyst, 10), + 30 * 20, + 2000); + + } + + private void recipeCadaverineAndPutrescine() { + + // Basic Recipe + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierOneChip(), + ItemUtils.getSimpleStack(Items.rotten_flesh, 64) + }, + new FluidStack[] { + FluidUtils.getHotWater(2000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Cadaverine, 250), + FluidUtils.getFluidStack(Putrescine, 250), + }, + 20 * 120, + 120, + 1); + + // Advanced Recipe + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierTwoChip(), + ItemUtils.getSimpleStack(Items.rotten_flesh, 128), + ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 8, 32) + }, + new FluidStack[] { + FluidUtils.getHotWater(3000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Cadaverine, 750), + FluidUtils.getFluidStack(Putrescine, 750), + }, + 20 * 120, + 240, + 2); + + } + + private void recipeAniline() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierThreeChip(), + ItemUtils.getSimpleStack(mBlueCatalyst, 0) + }, + new FluidStack[] { + FluidUtils.getFluidStack(NitroBenzene, 2000), + FluidUtils.getFluidStack("hydrogen", 10000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Aniline, 2000), + }, + 20 * 30, + 500, + 3); + + } + + private void recipeNitroBenzene() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getTierThreeChip(), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Benzene, 5000), + FluidUtils.getFluidStack("sulfuricacid", 3000), + FluidUtils.getFluidStack("nitricacid", 3000), + FluidUtils.getDistilledWater(10000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack("dilutedsulfuricacid", 3000), + FluidUtils.getFluidStack(NitroBenzene, 5000), + }, + 20 * 30, + 500, + 4); + + } + + private void recipe2Ethylanthraquinone() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(4), + ItemUtils.getItemStackOfAmountFromOreDict("dustPhthalicAnhydride", 4), + }, + new FluidStack[] { + FluidUtils.getFluidStack(CoalTar.Ethylbenzene, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Ethylanthraquinone2, 2000+(144*4)), + }, + 20 * 15, + 120, + 2); + + /*GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustPhthalicAnhydride", 4), + ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), + null, + FluidUtils.getFluidStack("fluid.2ethylanthraquinone", 2000+(144*4)), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 2), + 20*16);*/ + + } + + private void recipe2Ethylanthrahydroquinone() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(4), + ItemUtils.getSimpleStack(mOrangeCatalyst, 0), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Ethylanthraquinone2, 4000), + FluidUtils.getFluidStack("hydrogen", 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Ethylanthrahydroquinone2, 5000), + }, + 20 * 40, + 120, + 2); + + /*GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("platePalladium", 0), + ItemUtils.getItemStackOfAmountFromOreDict("cell2Ethylanthraquinone", 1), + FluidUtils.getFluidStack("hydrogen", 500), + FluidUtils.getFluidStack("fluid.2ethylanthrahydroquinone", 1200), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1), + 20*40);*/ + + } + + private void recipeLithiumPeroxide() { + CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 2), + ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 3) + }, + null, + null, + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumPeroxide", 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 2) + }, + new int[]{10000, 10000, 10000}, + 20*100, + 120); + } + + private void recipeLithiumHydroperoxide() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(4), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 7), + }, + new FluidStack[] { + FluidUtils.getFluidStack("fluid.hydrogenperoxide", 2000), + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 14), + }, + new FluidStack[] { + + }, + 20 * 30, + 240, + 1); + + + + /*CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 7), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 1), + 20, + FluidUtils.getFluidStack("fluid.cellhydrogenperoxide", 50), + null, + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 14), + CI.emptyCells(1), + 20*30, + 240); */ + } + + private void recipeHydrogenPeroxide() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(4), + }, + new FluidStack[] { + FluidUtils.getFluidStack("air", 15000), + FluidUtils.getFluidStack(Ethylanthrahydroquinone2, 5000), + FluidUtils.getFluidStack("fluid.anthracene", 50), + }, + new ItemStack[] { + }, + new FluidStack[] { + FluidUtils.getFluidStack(Ethylanthraquinone2, 4000), + FluidUtils.getFluidStack("fluid.hydrogenperoxide", 2000), + }, + 20 * 30, + 240, + 1); + + /* CORE.RA.addChemicalRecipe( + GT_ModHandler.getAirCell(15), + ItemUtils.getItemStackOfAmountFromOreDict("cell2Ethylanthrahydroquinone", 5), + 20, + FluidUtils.getFluidStack("fluid.anthracene", 50), + FluidUtils.getFluidStack("fluid.2ethylanthrahydroquinone", 4450), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 2), + CI.emptyCells(18), + 20*30, + 240);*/ + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + private static final ItemStack getTierOneChip() { + return CI.getNumberedAdvancedCircuit(4); + } + private static final ItemStack getTierTwoChip() { + return CI.getNumberedAdvancedCircuit(8); + } + private static final ItemStack getTierThreeChip() { + return CI.getNumberedAdvancedCircuit(12); + } + private static final ItemStack getTierFourChip() { + return CI.getNumberedAdvancedCircuit(16); + } + + private static void recipeAdvancedChip() { + GT_ModHandler.addShapelessCraftingRecipe( + GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 0L), 0, new Object[]{OrePrefixes.circuit.get(Materials.Advanced)}); + + long bits = 0; + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 1L, new Object[0]), bits, + new Object[]{"d ", " P ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 2L, new Object[0]), bits, + new Object[]{" d ", " P ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 3L, new Object[0]), bits, + new Object[]{" d", " P ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 4L, new Object[0]), bits, + new Object[]{" ", " Pd", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 5L, new Object[0]), bits, + new Object[]{" ", " P ", " d", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 6L, new Object[0]), bits, + new Object[]{" ", " P ", " d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 7L, new Object[0]), bits, + new Object[]{" ", " P ", "d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 8L, new Object[0]), bits, + new Object[]{" ", "dP ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 9L, new Object[0]), bits, + new Object[]{"P d", " ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 10L, new Object[0]), bits, + new Object[]{"P ", " d", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 11L, new Object[0]), bits, + new Object[]{"P ", " ", " d", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 12L, new Object[0]), bits, + new Object[]{"P ", " ", " d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 13L, new Object[0]), bits, + new Object[]{" P", " ", " d", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 14L, new Object[0]), bits, + new Object[]{" P", " ", " d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 15L, new Object[0]), bits, + new Object[]{" P", " ", "d ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 16L, new Object[0]), bits, + new Object[]{" P", "d ", " ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 17L, new Object[0]), bits, + new Object[]{" ", " ", "d P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 18L, new Object[0]), bits, + new Object[]{" ", "d ", " P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 19L, new Object[0]), bits, + new Object[]{"d ", " ", " P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 20L, new Object[0]), bits, + new Object[]{" d ", " ", " P", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 21L, new Object[0]), bits, + new Object[]{"d ", " ", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 22L, new Object[0]), bits, + new Object[]{" d ", " ", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 23L, new Object[0]), bits, + new Object[]{" d", " ", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + BioRecipes.addCraftingRecipe(GregtechItemList.Circuit_T3RecipeSelector.getWithDamage(1L, 24L, new Object[0]), bits, + new Object[]{" ", " d", "P ", 'P', GregtechItemList.Circuit_T3RecipeSelector.getWildcard(1L, new Object[0])}); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java b/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java new file mode 100644 index 0000000000..e08a509436 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/IonParticles.java @@ -0,0 +1,165 @@ +package gtPlusPlus.core.item.chemistry; + +import java.util.HashMap; +import java.util.List; + +import gregtech.api.enums.Materials; +import gtPlusPlus.core.item.base.misc.BaseItemParticle; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.Utils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class IonParticles extends BaseItemParticle { + + public static HashMap NameToMetaMap = new HashMap(); + public static HashMap MetaToNameMap = new HashMap(); + + + public IonParticles() { + super("Ion", ELEMENT.NAMES.length, EnumRarity.rare); + } + + public static IIcon[] overlays = new IIcon[ELEMENT.NAMES.length]; + public static IIcon baseTexture; + + static { + //Generate Ions + int key = 0; + for (String s : ELEMENT.NAMES) { + //Map names to Meta + NameToMetaMap.put(Utils.sanitizeString(s.toLowerCase()), key); + MetaToNameMap.put(key, Utils.sanitizeString(s.toLowerCase())); + Materials m = Materials.get(s); + int aColour = 0; + if (m == null) { + aColour = Utils.rgbtoHexValue(128, 128, 128); + } + else { + aColour = Utils.rgbtoHexValue(m.mRGBa[0], m.mRGBa[1], m.mRGBa[2]); + } + aColourMap.put(key++, aColour); + } + + } + + @Override + public String[] getAffixes() { + return new String[] {"", ""}; + } + + @Override + public String getUnlocalizedName() { + return ""; + } + + @Override + public String getUnlocalizedName(final ItemStack itemStack) { + return "item.particle.ion" + "." + ELEMENT.NAMES[itemStack.getItemDamage()]; + } + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Charge", 0); + tagMain.setTag("Ion", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getChargeState(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("Ion"); + if (aNBT != null) { + return aNBT.getLong("Charge"); + } + } + else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setChargeState(final ItemStack aStack, final long aCharge) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("Ion"); + if (aNBT != null) { + aNBT.setLong("Charge", aCharge); + return true; + } + } + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null){ + createNBT(stack); + } + double chargeState = getChargeState(stack); + return chargeState; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + long aCharge = getChargeState(stack); + String aState = EnumChatFormatting.YELLOW+"Unknown"+EnumChatFormatting.GRAY; + //State not set + if (aCharge == 0) { + list.add(EnumChatFormatting.GRAY+"A "+MetaToNameMap.get(stack.getItemDamage())+" Ion with an "+aState+" charge state"); + } + else { + if (aCharge > 0) { + aState = EnumChatFormatting.GREEN+"Positive"+EnumChatFormatting.GRAY; + } + else { + aState = EnumChatFormatting.RED+"Negative"+EnumChatFormatting.GRAY; + } + + list.add(EnumChatFormatting.GRAY+"A "+MetaToNameMap.get(stack.getItemDamage())+" Ion with a "+aState+" charge state of "+aCharge+""); + } + super.addInformation(stack, player, list, bool); + } + + @Override + public void registerIcons(IIconRegister reg) { + for (int i = 0; i < IonParticles.overlays.length; i++) { + IonParticles.overlays[i] = reg.registerIcon(CORE.MODID + ":" + "ion/"+i); + } + IonParticles.baseTexture = reg.registerIcon(CORE.MODID + ":" + "ion/IonBase"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return IonParticles.overlays[meta]; + } + + @Override + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public IIcon getIconFromDamageForRenderPass(int aMeta, int aPass) { + if (aPass == 0) { + return IonParticles.baseTexture; + } + else { + return IonParticles.overlays[aMeta]; + } + } + + @Override + public int getRenderPasses(int metadata) { + return 2; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java b/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java new file mode 100644 index 0000000000..dfc85c533b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java @@ -0,0 +1,820 @@ +package gtPlusPlus.core.item.chemistry; + +import java.util.HashMap; + +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.data.Quad; +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.item.base.ore.BaseItemMilledOre; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.NONMATERIAL; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.*; +import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class MilledOreProcessing extends ItemPackage { + + /** + * Fluids + */ + + public static Fluid SphaleriteFlotationFroth; + public static Fluid ChalcopyriteFlotationFroth; + public static Fluid NickelFlotationFroth; + public static Fluid PlatinumFlotationFroth; + public static Fluid PentlanditeFlotationFroth; + + public static Fluid RedstoneFlotationFroth; + public static Fluid SpessartineFlotationFroth; + public static Fluid GrossularFlotationFroth; + public static Fluid AlmandineFlotationFroth; + public static Fluid PyropeFlotationFroth; + public static Fluid MonaziteFlotationFroth; + + public static Fluid PineOil; + + + /** + * Items + */ + + // Zinc, Iron, Indium, Germanium + public static Item milledSphalerite; + + // Copper, Iron, Cadmium, Indium + public static Item milledChalcopyrite; + + // Nickel, Cobalt, Rhodium, Ruthenium + public static Item milledNickel; + + // Platinum, Rhodium, Selenium, Tellurium + public static Item milledPlatinum; + + // Iron, Nickel, Promethium, Hafnium + public static Item milledPentlandite; + + + + + // Redstone, Chrome, Firestone, Dysprosium + public static Item milledRedstone; + + // Manganese, Aluminium, Osmium, Strontium + public static Item milledSpessartine; + + // Calcium, Aluminium, Tungsten, Thallium + public static Item milledGrossular; + + // Aluminium, Magnesium, Yttrium, Ytterbium + public static Item milledAlmandine; + + // Magnesium, Manganese, Borax, Rhenium + public static Item milledPyrope; + + // Erbium, Lanthanum, Praseodymium, Europium + public static Item milledMonazite; + + + @Override + public void items() { + + milledSphalerite = BaseItemMilledOre.generate(Materials.Sphalerite, MaterialUtils.getVoltageForTier(6)); + milledChalcopyrite = BaseItemMilledOre.generate(Materials.Chalcopyrite, MaterialUtils.getVoltageForTier(5)); + milledNickel = BaseItemMilledOre.generate(Materials.Nickel, MaterialUtils.getVoltageForTier(5)); + milledPlatinum = BaseItemMilledOre.generate(Materials.Platinum, MaterialUtils.getVoltageForTier(6)); + milledPentlandite = BaseItemMilledOre.generate(Materials.Pentlandite, MaterialUtils.getVoltageForTier(6)); + + milledRedstone = BaseItemMilledOre.generate(Materials.Redstone, MaterialUtils.getVoltageForTier(5)); + milledSpessartine = BaseItemMilledOre.generate(Materials.Spessartine, MaterialUtils.getVoltageForTier(6)); + milledGrossular = BaseItemMilledOre.generate(Materials.Grossular, MaterialUtils.getVoltageForTier(6)); + milledAlmandine = BaseItemMilledOre.generate(Materials.Almandine, MaterialUtils.getVoltageForTier(6)); + milledPyrope = BaseItemMilledOre.generate(Materials.Pyrope, MaterialUtils.getVoltageForTier(4)); + milledMonazite = BaseItemMilledOre.generate(Materials.Monazite, MaterialUtils.getVoltageForTier(7)); + + } + + @Override + public void blocks() { + // None yet + } + + @Override + public void fluids() { + + short[] aZincFrothRGB = Materials.Sphalerite.mRGBa; + SphaleriteFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.zincflotation", "Sphalerite Froth", 32 + 175, new short[] { aZincFrothRGB[0], aZincFrothRGB[1], aZincFrothRGB[2], 100 }, true); + short[] aCopperFrothRGB = Materials.Chalcopyrite.mRGBa; + ChalcopyriteFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.copperflotation", "Chalcopyrite Froth", 32 + 175, new short[] { aCopperFrothRGB[0], aCopperFrothRGB[1], aCopperFrothRGB[2], 100 }, true); + short[] aNickelFrothRGB = Materials.Nickel.mRGBa; + NickelFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.nickelflotation", "Nickel Froth", 32 + 175, new short[] { aNickelFrothRGB[0], aNickelFrothRGB[1], aNickelFrothRGB[2], 100 }, true); + short[] aPlatinumFrothRGB = Materials.Platinum.mRGBa; + PlatinumFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.platinumflotation", "Platinum Froth", 32 + 175, new short[] { aPlatinumFrothRGB[0], aPlatinumFrothRGB[1], aPlatinumFrothRGB[2], 100 }, true); + short[] aPentlanditeFrothRGB = Materials.Pentlandite.mRGBa; + PentlanditeFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.pentlanditeflotation", "Pentlandite Froth", 32 + 175, new short[] { aPentlanditeFrothRGB[0], aPentlanditeFrothRGB[1], aPentlanditeFrothRGB[2], 100 }, true); + + short[] aRedstoneFrothRGB = Materials.Redstone.mRGBa; + RedstoneFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.redstoneflotation", "Redstone Froth", 32 + 175, new short[] { aRedstoneFrothRGB[0], aRedstoneFrothRGB[1], aRedstoneFrothRGB[2], 100 }, true); + short[] aSpessartineFrothRGB = Materials.Spessartine.mRGBa; + SpessartineFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.spessartineflotation", "Spessartine Froth", 32 + 175, new short[] { aSpessartineFrothRGB[0], aSpessartineFrothRGB[1], aSpessartineFrothRGB[2], 100 }, true); + short[] aGrossularFrothRGB = Materials.Grossular.mRGBa; + GrossularFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.grossularflotation", "Grossular Froth", 32 + 175, new short[] { aGrossularFrothRGB[0], aGrossularFrothRGB[1], aGrossularFrothRGB[2], 100 }, true); + short[] aAlmandineFrothRGB = Materials.Almandine.mRGBa; + AlmandineFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.almandineflotation", "Almandine Froth", 32 + 175, new short[] { aAlmandineFrothRGB[0], aAlmandineFrothRGB[1], aAlmandineFrothRGB[2], 100 }, true); + short[] aPyropeFrothRGB = Materials.Pyrope.mRGBa; + PyropeFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.pyropeflotation", "Pyrope Froth", 32 + 175, new short[] { aPyropeFrothRGB[0], aPyropeFrothRGB[1], aPyropeFrothRGB[2], 100 }, true); + short[] aMonaziteFrothRGB = Materials.Monazite.mRGBa; + MonaziteFlotationFroth = FluidUtils.generateFluidNoPrefix("froth.Monaziteflotation", "Monazite Froth", 32 + 175, new short[] { aMonaziteFrothRGB[0], aMonaziteFrothRGB[1], aMonaziteFrothRGB[2], 100 }, true); + + + PineOil = FluidUtils.generateFluidNoPrefix("pineoil", "Pine Oil", 32 + 175, new short[] { 250, 200, 60, 100 }, true); + + } + + + + public MilledOreProcessing() { + super(); + Logger.INFO("Adding Ore Milling content"); + } + + private static void addMiscRecipes() { + + /* + * First 5 + */ + + //milledSphalerite + registerOreDataForMilledType( + SphaleriteFlotationFroth, + ELEMENT.getInstance().ZINC, 180, + ELEMENT.getInstance().IRON, 120, + ELEMENT.getInstance().INDIUM, 40, + ELEMENT.getInstance().GERMANIUM, 15 + ); + //milledChalcopyrite + registerOreDataForMilledType( + ChalcopyriteFlotationFroth, + ELEMENT.getInstance().COPPER, 180, + ELEMENT.getInstance().IRON, 120, + ELEMENT.getInstance().CADMIUM, 50, + ELEMENT.getInstance().INDIUM, 10 + ); + //milledNickel + registerOreDataForMilledType( + NickelFlotationFroth, + ELEMENT.getInstance().NICKEL, 150, + ELEMENT.getInstance().COBALT, 120, + ELEMENT.getInstance().RHODIUM, 32, + ELEMENT.getInstance().RUTHENIUM, 16 + ); + //milledPlatinum + registerOreDataForMilledType( + PlatinumFlotationFroth, + ELEMENT.getInstance().PLATINUM, 120, + ELEMENT.getInstance().RHODIUM, 60, + ELEMENT.getInstance().SELENIUM, 40, + ELEMENT.getInstance().TELLURIUM, 10 + ); + //milledPentlandite + registerOreDataForMilledType( + PentlanditeFlotationFroth, + ELEMENT.getInstance().IRON, 150, + ELEMENT.getInstance().NICKEL, 100, + ELEMENT.getInstance().PROMETHIUM, 20, + ELEMENT.getInstance().HAFNIUM, 10 + ); + + /* + * Second 5 + */ + //milledRedstone + registerOreDataForMilledType( + RedstoneFlotationFroth, + NONMATERIAL.REDSTONE, 300, + ELEMENT.getInstance().CHROMIUM, 60, + MaterialUtils.generateMaterialFromGtENUM(Materials.Firestone), 45, + ELEMENT.getInstance().DYSPROSIUM, 16 + ); + //milledSpessartine + registerOreDataForMilledType( + SpessartineFlotationFroth, + ELEMENT.getInstance().MANGANESE, 150, + ELEMENT.getInstance().ALUMINIUM, 90, + ELEMENT.getInstance().OSMIUM, 30, + ELEMENT.getInstance().STRONTIUM, 20 + ); + //milledGrossular + registerOreDataForMilledType( + GrossularFlotationFroth, + ELEMENT.getInstance().CALCIUM, 180, + ELEMENT.getInstance().ALUMINIUM, 110, + ELEMENT.getInstance().TUNGSTEN, 60, + ELEMENT.getInstance().THALLIUM, 15 + ); + //milledAlmandine + registerOreDataForMilledType( + AlmandineFlotationFroth, + ELEMENT.getInstance().ALUMINIUM, 150, + ELEMENT.getInstance().MAGNESIUM, 75, + ELEMENT.getInstance().YTTRIUM, 25, + ELEMENT.getInstance().YTTERBIUM, 15 + ); + //milledPyrope + registerOreDataForMilledType( + PyropeFlotationFroth, + ELEMENT.getInstance().MAGNESIUM, 110, + ELEMENT.getInstance().MANGANESE, 70, + MaterialUtils.generateMaterialFromGtENUM(Materials.Borax), 60, + ELEMENT.getInstance().RHENIUM, 20 + ); + //milledMonazite TODO + registerOreDataForMilledType( + MonaziteFlotationFroth, + ELEMENT.getInstance().ERBIUM, 96, + ELEMENT.getInstance().LANTHANUM, 96, + ELEMENT.getInstance().PRASEODYMIUM, 96, + ELEMENT.getInstance().EUROPIUM, 32 + ); + + + } + + @Override + public String errorMessage() { + return "Failed to generate recipes for OreMillingProc."; + } + + @Override + public boolean generateRecipes() { + addMiscRecipes(); + addPineOilExtraction(); + addFlotationRecipes1(); + addFlotationRecipes2(); + addVacuumFurnaceRecipes(); + return true; + } + + private void addVacuumFurnaceRecipes() { + int aCircuitID = 1; + + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(SphaleriteFlotationFroth, 4000) + }, + getOutputsFromMap(SphaleriteFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(6), + 5500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(ChalcopyriteFlotationFroth, 4000) + }, + getOutputsFromMap(ChalcopyriteFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(5), + 4500); + + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(NickelFlotationFroth, 4000) + }, + getOutputsFromMap(NickelFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(5), + 4500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PlatinumFlotationFroth, 4000) + }, + getOutputsFromMap(PlatinumFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(6), + 5500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PentlanditeFlotationFroth, 4000) + }, + getOutputsFromMap(PentlanditeFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(6), + 5500); + + + + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(RedstoneFlotationFroth, 4000) + }, + getOutputsFromMap(RedstoneFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(5), + 4500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(SpessartineFlotationFroth, 4000) + }, + getOutputsFromMap(SpessartineFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(6), + 5500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(GrossularFlotationFroth, 4000) + }, + getOutputsFromMap(GrossularFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(6), + 5500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(AlmandineFlotationFroth, 4000) + }, + getOutputsFromMap(AlmandineFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(6), + 5500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PyropeFlotationFroth, 4000) + }, + getOutputsFromMap(PyropeFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(4), + 3500); + CORE.RA.addVacuumFurnaceRecipe( + new ItemStack[] { + CI.getNumberedCircuit(aCircuitID++) + }, + new FluidStack[] { + FluidUtils.getFluidStack(MonaziteFlotationFroth, 4000) + }, + getOutputsFromMap(MonaziteFlotationFroth), + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 2000), + FluidUtils.getWater(2000) + }, + 20 * 120, + MaterialUtils.getVoltageForTier(7), + 7500); + + } + + private void addFlotationRecipes1() { + + // Sphalerite + CORE.RA.addFlotationRecipe( + Materials.Sphalerite, + ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 14000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(SphaleriteFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(6) + ); + + // Chalcopyrite + CORE.RA.addFlotationRecipe( + Materials.Chalcopyrite, + ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 12000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(ChalcopyriteFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(5) + ); + + // Nickel + CORE.RA.addFlotationRecipe( + Materials.Nickel, + ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 25000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(NickelFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(5) + ); + + // Platinum + CORE.RA.addFlotationRecipe( + Materials.Platinum, + ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 35000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(PlatinumFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(6) + ); + + + // Pentlandite + CORE.RA.addFlotationRecipe( + Materials.Pentlandite, + ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 14000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(PentlanditeFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(6) + ); + + } + + private void addFlotationRecipes2() { + + // Redstone + CORE.RA.addFlotationRecipe( + Materials.Redstone, + ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 13000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(RedstoneFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(5) + ); + + // Spessartine + CORE.RA.addFlotationRecipe( + Materials.Spessartine, + ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 35000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(SpessartineFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(6) + ); + + // Grossular + CORE.RA.addFlotationRecipe( + Materials.Grossular, + ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 28000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(GrossularFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(6) + ); + + // Almandine + CORE.RA.addFlotationRecipe( + Materials.Almandine, + ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 18000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(AlmandineFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(5) + ); + + // Pyrope + CORE.RA.addFlotationRecipe( + Materials.Pyrope, + ItemUtils.getSimpleStack(GenericChem.mSodiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 8000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(PyropeFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(4) + ); + + // Monazite + CORE.RA.addFlotationRecipe( + Materials.Monazite, + ItemUtils.getSimpleStack(GenericChem.mPotassiumEthylXanthate, 1), + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 30000), + }, + new FluidStack[] { + FluidUtils.getFluidStack(MonaziteFlotationFroth, 1000) + }, + 20 * 1200, + MaterialUtils.getVoltageForTier(6) + ); + + } + + private void addPineOilExtraction() { + AutoMap aLogs = new AutoMap(); + AutoMap aLeaves = new AutoMap(); + AutoMap aSaplings = new AutoMap(); + AutoMap aPinecones = new AutoMap(); + + ItemStack aCrushedPine = ItemUtils.getSimpleStack(AgriculturalChem.mCrushedPine, 1); + + aLogs.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.log_Pine)); + aLeaves.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.leaves_Pine)); + aSaplings.add(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine)); + aPinecones.add(ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, 1)); + + if (LoadedMods.BiomesOPlenty) { + aLogs.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.logs4, 0, 1)); + aLeaves.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.colorizedLeaves2, 1, 1)); + aSaplings.add(HANDLER_BiomesOPlenty.getStack(HANDLER_BiomesOPlenty.colorizedSaplings, 5, 1)); + aPinecones.add(ItemUtils.simpleMetaStack(HANDLER_BiomesOPlenty.mPineCone, 13, 1)); + } + if (LoadedMods.Forestry) { + ItemStack aForestryLog = ItemUtils.getItemStackFromFQRN("Forestry:logs", 1); + if (aForestryLog != null) { + aForestryLog.setItemDamage(20); // Set to Pine + aLogs.add(aForestryLog); + } + ItemStack aForestryLeaves = ItemUtils.getItemStackFromFQRN("Forestry:leaves", 1); + if (aForestryLeaves != null) { + NBTUtils.setString(aForestryLeaves, "species", "forestry.treePine"); // Set to Pine + aLeaves.add(aForestryLeaves); + } + } + + for (ItemStack aLog : aLogs) { + addRecipe(aLog, ItemUtils.getSimpleStack(aCrushedPine, 16), new int[] {10000, 7500, 5000, 2500}, 10, 120); + } + for (ItemStack aLeaf : aLeaves) { + addRecipe(aLeaf, ItemUtils.getSimpleStack(aCrushedPine, 2), new int[] {5000, 5000, 2500, 2500}, 10, 30); + } + for (ItemStack aSapling : aSaplings) { + addRecipe(aSapling, ItemUtils.getSimpleStack(aCrushedPine, 4), new int[] {7500, 7500, 2500, 2500}, 10, 60); + } + for (ItemStack aCone : aPinecones) { + addRecipe(aCone, ItemUtils.getSimpleStack(aCrushedPine, 1), new int[] {7500, 7500, 5000, 2500}, 10, 60); + } + + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ItemUtils.getSimpleStack(aCrushedPine, 64) + }, + new FluidStack[] { + FluidUtils.getSteam(5000), + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 500) + }, + new int[] { + 2000, 2000, 2000, 2000 + }, + 20 * 60, + 120, + 3); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemUtils.getSimpleStack(aCrushedPine, 64) + }, + new FluidStack[] { + FluidUtils.getSuperHeatedSteam(5000), + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 5) + }, + new FluidStack[] { + FluidUtils.getFluidStack(PineOil, 1500) + }, + new int[] { + 3000, 3000, 3000, 3000 + }, + 20 * 45, + 120, + 4); + + } + + public boolean addRecipe(ItemStack aInput, ItemStack aOutput1, int[] aChances, int aTime, int aEU) { + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + ItemStack aOutputs[] = new ItemStack[4]; + for (int i=0;i aCleanedItems = new AutoMap(); + for (ItemStack checkStack : input) { + if (ItemUtils.checkForInvalidItems(checkStack)) { + aCleanedItems.put(checkStack); + } + } + ItemStack[] aOutput = new ItemStack[aCleanedItems.size()]; + for (int i=0;i, Pair, Pair, Pair>> aMilledFluidMap = new HashMap, Pair, Pair, Pair>>(); + + public static void registerOreDataForMilledType(Fluid aMilledFluid, Materials aOutput1, int aPerc1, Materials aOutput2, int aPerc2, Materials aOutput3, int aPerc3, Materials aOutput4, int aPerc4) { + registerOreDataForMilledType(aMilledFluid, MaterialUtils.generateMaterialFromGtENUM(aOutput1), aPerc1, MaterialUtils.generateMaterialFromGtENUM(aOutput2), aPerc2, MaterialUtils.generateMaterialFromGtENUM(aOutput3), aPerc3, MaterialUtils.generateMaterialFromGtENUM(aOutput4), aPerc4); + } + + public static void registerOreDataForMilledType(Fluid aMilledFluid, Material aOutput1, int aPerc1, Material aOutput2, int aPerc2, Material aOutput3, int aPerc3, Material aOutput4, int aPerc4) { + + Pair aFluidOutput1 = new Pair(aOutput1, aPerc1); + Pair aFluidOutput2 = new Pair(aOutput2, aPerc2); + Pair aFluidOutput3 = new Pair(aOutput3, aPerc3); + Pair aFluidOutput4 = new Pair(aOutput4, aPerc4); + Quad, Pair, Pair, Pair> aDataQuad = new Quad, Pair, Pair, Pair>(aFluidOutput1, aFluidOutput2, aFluidOutput3, aFluidOutput4); + aMilledFluidMap.put(aMilledFluid.getUnlocalizedName(), aDataQuad); + + } + + private static ItemStack[] getOutputsFromMap(Fluid aFluid) { + String aKey = aFluid.getUnlocalizedName(); + return getArrayFromQuad(aMilledFluidMap.get(aKey)); + } + + private static ItemStack[] getArrayFromQuad(Quad, Pair, Pair, Pair> aData) { + AutoMap aOutputs = new AutoMap(); + for (Object aPair : aData.values()) { + if (aPair != null && Pair.class.isInstance(aPair)) { + Pair aObj = (Pair) aPair; + Material aMat = (Material) aObj.getKey(); + int aCount = (int) aObj.getValue(); + aOutputs.addAll(getItemStackFromPair(aMat, aCount)); + } + } + ItemStack[] aRealOutputArray = new ItemStack[aOutputs.size()]; + int aIndex = 0; + for (ItemStack aStack : aOutputs) { + aRealOutputArray[aIndex++] = aStack; + } + return aRealOutputArray; + } + + private static AutoMap getItemStackFromPair(Material aMat, Integer aCount) { + AutoMap aOutputs = new AutoMap(); + if (aCount > 64) { + AutoMap sizes = getStackSizes(aCount); + for (int aSplitSize : sizes) { + ItemStack aDustStack = aMat.getDust(aSplitSize); + aOutputs.put(aDustStack); + } + } + else { + ItemStack aDustStack = aMat.getDust(aCount); + aOutputs.put(aDustStack); + } + return aOutputs; + } + + private static AutoMap getStackSizes(int aBigSize){ + AutoMap aSizes = new AutoMap(); + if (aBigSize <= 64) { + aSizes.add(aBigSize); + } + else { + for (int i = aBigSize; i > 0; i -= 64) { + aSizes.add(i); + } + } + return aSizes; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java new file mode 100644 index 0000000000..f112b0d2a5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/NuclearChem.java @@ -0,0 +1,116 @@ +package gtPlusPlus.core.item.chemistry; + +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; +import gtPlusPlus.core.item.chemistry.general.ItemNuclearChemBase; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + +public class NuclearChem extends ItemPackage { + + public static Fluid Burnt_LiFBeF2ThF4UF4; + public static Fluid Burnt_LiFBeF2ZrF4UF4; + public static Fluid Burnt_LiFBeF2ZrF4U235; + + + public static Fluid Impure_LiFBeF2; + + public static Fluid GeneticMutagen; + private static boolean generateMutagenRecipe = false; + + public static ItemNuclearChemBase mNuclearChemItem1; + + public static ItemStack mResidueUranium; + public static ItemStack mResiduePlutonium; + public static ItemStack mResidueFluorides; + public static ItemStack mResidueNobles; + + @Override + public void items() { + + mNuclearChemItem1 = new ItemNuclearChemBase(); + registerItemStacks(); + registerOreDict(); + } + + + public void registerItemStacks() { + + mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 0, 1); + mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 1, 1); + mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 2, 1); + mResidueUranium = ItemUtils.simpleMetaStack(mNuclearChemItem1, 3, 1); + + } + + public void registerOreDict() { + + ItemUtils.addItemToOreDictionary(mResidueUranium, "dustResidueUranium"); + ItemUtils.addItemToOreDictionary(mResiduePlutonium, "dustResiduePlutonium"); + ItemUtils.addItemToOreDictionary(mResidueFluorides, "dustResidueFluoride"); + ItemUtils.addItemToOreDictionary(mResidueNobles, "dustResidueNoble"); + + } + + @Override + public void blocks() { + } + + @Override + public void fluids() { + //Create Used Nuclear Fuels + Burnt_LiFBeF2ThF4UF4 = FluidUtils.generateFluidNonMolten("BurntLiFBeF2ThF4UF4", "Burnt LiFBeF2ThF4UF4 Salt", 545, new short[]{48, 175, 48, 100}, null, null); + Burnt_LiFBeF2ZrF4UF4 = FluidUtils.generateFluidNonMolten("BurntLiFBeF2ZrF4UF4", "Burnt LiFBeF2ZrF4UF4 Salt", 520, new short[]{48, 168, 68, 100}, null, null); + Burnt_LiFBeF2ZrF4U235 = FluidUtils.generateFluidNonMolten("BurntLiFBeF2ZrF4U235", "Burnt LiFBeF2ZrF4U235 Salt", 533, new short[]{68, 185, 48, 100}, null, null); + Impure_LiFBeF2 = FluidUtils.generateFluidNonMolten("ImpureLiFBeF2", "Impure LiFBeF2 Salt", 533, new short[]{110, 75, 186, 100}, null, null); + if (FluidUtils.getFluidStack("fluid.Mutagen", 1) == null) { + GeneticMutagen = FluidUtils.generateFluidNonMolten("GeneticMutagen", "Genetic Mutagen", 12, new short[]{22, 148, 185, 100}, null, null); + generateMutagenRecipe = true; + } + else { + GeneticMutagen = FluidUtils.getFluidStack("fluid.Mutagen", 1).getFluid(); + } + } + + @Override + public String errorMessage() { + return "Bad Nuclear Chemistry Recipes."; + } + + @Override + public boolean generateRecipes() { + if (generateMutagenRecipe) { + chemReator_CreateMutagen(); + } + chemReactor_MutagenWithEggs(); + return true; + } + + private static void chemReator_CreateMutagen() { + CORE.RA.addChemicalRecipe( + CI.getNumberedCircuit(20), + ItemUtils.getSimpleStack(Items.nether_star, 2), + FluidUtils.getMobEssence(5000), + FluidUtils.getFluidStack(GeneticMutagen, 8000), + null, + 30*20, + 500); + } + + private static void chemReactor_MutagenWithEggs() { + CORE.RA.addChemicalRecipe( + CI.getNumberedCircuit(20), + ItemUtils.getSimpleStack(Items.egg, 2), + FluidUtils.getFluidStack(GeneticMutagen, 500), + null, + ItemUtils.getSimpleStack(ModItems.itemBigEgg, 2), + 300*20, + 500); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java new file mode 100644 index 0000000000..4406995d27 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java @@ -0,0 +1,45 @@ +package gtPlusPlus.core.item.chemistry; + +import gtPlusPlus.api.objects.minecraft.ItemPackage; + +public class OilChem extends ItemPackage { + + /** + * Fluids + */ + + + /** + * Items + */ + + + + @Override + public void items() { + + } + + @Override + public void blocks() { + // None yet + } + + @Override + public void fluids() { + + } + + + + @Override + public String errorMessage() { + return "Failed to generate recipes for OilChem."; + } + + @Override + public boolean generateRecipes() { + + return true; + } +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java b/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java new file mode 100644 index 0000000000..b96e0c76ea --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java @@ -0,0 +1,1071 @@ +package gtPlusPlus.core.item.chemistry; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; + +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class RocketFuels extends ItemPackage { + + public static HashSet mValidRocketFuelNames = new HashSet(); + public static HashMap mValidRocketFuels = new HashMap(); + + public static Fluid Oil_Heavy; + public static Fluid Diesel; + public static Fluid Kerosene; + public static Fluid RP1; + public static Fluid Nitrogen_Tetroxide; + public static Fluid Hydrazine; + public static Fluid Monomethylhydrazine; + public static Fluid Unsymmetrical_Dimethylhydrazine; + public static Fluid Nitrous_Oxide; + public static Fluid Hydrated_Ammonium_Nitrate_Slurry; + public static Fluid Liquid_Oxygen; + public static Fluid Liquid_Hydrogen; + public static Fluid Formaldehyde; + + + //Rocket Fuel Mixes + public static Fluid Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide; + public static Fluid RP1_Plus_Liquid_Oxygen; + public static Fluid Dense_Hydrazine_Mix; + public static Fluid Monomethylhydrazine_Plus_Nitric_Acid; + + public static Item Ammonium_Nitrate_Dust; + public static Item Formaldehyde_Catalyst; + public static ItemStack Formaldehyde_Catalyst_Stack; + + public RocketFuels() { + super(true); + } + + public static void createKerosene(){ + + FluidStack fuelA = FluidUtils.getFluidStack("diesel", 3000); + FluidStack fuelB = FluidUtils.getFluidStack("fuel", 3000); + + if (fuelA != null){ + //GT_Values.RA.addDistilleryRecipe(23, fuelA, FluidUtils.getFluidStack(Kerosene, 50), 200, 64, false); + GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelA, FluidUtils.getFluidStack(Kerosene, 1800), 200, 64, false); + } + if (fuelA == null && fuelB != null){ + //GT_Values.RA.addDistilleryRecipe(23, fuelB, FluidUtils.getFluidStack(Kerosene, 50), 200, 64, false); + GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelB, FluidUtils.getFluidStack(Kerosene, 1800), 200, 64, false); + } + } + + public static void createRP1(){ + FluidStack fuelA = FluidUtils.getFluidStack(Kerosene, 1000); + if (fuelA != null){ + GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelA, FluidUtils.getFluidStack(RP1, 750), 20 * 40, 120, false); + } + } + + public static void createNitrogenTetroxide(){ + /*CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 4) + }, + FluidUtils.getFluidStack("nitricacid", 2000), + FluidUtils.getFluidStack(Nitrogen_Tetroxide, 450), + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 1) + }, + new int[]{100, 50}, + 20*16, + 500);*/ + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 12), + ItemUtils.getSimpleStack(GenericChem.mOrangeCatalyst, 0), + }, + new FluidStack[] { + FluidUtils.getFluidStack("nitricacid", 4000) + }, + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallAsh", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallDarkAsh", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAsh", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyDarkAsh", 1) + }, + new FluidStack[] { + FluidUtils.getFluidStack(Nitrogen_Tetroxide, 3000), + }, + new int[]{100, 100, 50, 50}, + 20 * 30, + MaterialUtils.getVoltageForTier(3), + 3); + + + } + + public static void createHydrazine(){ + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(21) + }, + new FluidStack[] { + FluidUtils.getFluidStack("fluid.hydrogenperoxide", 2000), + FluidUtils.getFluidStack("ammonia", 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Hydrazine, 4000), + + }, + 20 * 30, + MaterialUtils.getVoltageForTier(2), + 1); + + FluidStack aBartWorksHydrogenPeroxide = FluidUtils.getWildcardFluidStack("Hydrogen Peroxide", 2000); + if (aBartWorksHydrogenPeroxide != null) { + Logger.INFO("Found BW Hydrogen Peroxide, adding compat recipe."); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(22) + }, + new FluidStack[] { + aBartWorksHydrogenPeroxide, + FluidUtils.getFluidStack("ammonia", 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Hydrazine, 4000), + + }, + 20 * 30, + MaterialUtils.getVoltageForTier(2), + 1); + } + + } + + + public static void createMonomethylhydrazine(){ + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(21), + ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 2) + }, + new FluidStack[] { + FluidUtils.getFluidStack("hydrogen", 2000), + FluidUtils.getFluidStack(Hydrazine, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Monomethylhydrazine, 4000), + + }, + 20 * 48, + 240, + 2); + + } + + private static void createLOX() { + GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidOxygen", 1), 20*16); + CORE.RA.addAdvancedFreezerRecipe(new ItemStack[] {}, new FluidStack[] {FluidUtils.getFluidStack("oxygen", 3000)}, new FluidStack[] {FluidUtils.getFluidStack(Liquid_Oxygen, 3000)}, new ItemStack[] {}, new int[] {}, 20*16, 240, 0); + } + + private static void createLOH() { + GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidHydrogen", 1), 20*16); + CORE.RA.addAdvancedFreezerRecipe(new ItemStack[] {}, new FluidStack[] {FluidUtils.getFluidStack("hydrogen", 300)}, new FluidStack[] {FluidUtils.getFluidStack(Liquid_Hydrogen, 300)}, new ItemStack[] {}, new int[] {}, 20*4, 540, 0); + } + + private static void createHydratedAmmoniumNitrateSlurry() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(21), + }, + new FluidStack[] { + FluidUtils.getFluidStack("ammonia", 4000), + FluidUtils.getFluidStack("nitricacid", 4000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Hydrated_Ammonium_Nitrate_Slurry, 8000), + + }, + 20 * 60, + 120, + 1); + + } + + private static void createAmmoniumNitrateDust() { + CORE.RA.addDehydratorRecipe( + new ItemStack[] {CI.getNumberedCircuit(8)}, + FluidUtils.getFluidStack(Hydrated_Ammonium_Nitrate_Slurry, 8*144), + FluidUtils.getWater(2000), + new ItemStack[] { + ItemUtils.getSimpleStack(Ammonium_Nitrate_Dust, 8) + }, + new int[] {10000}, + 90 * 20, + 480); + + } + + private static void createFormaldehyde() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(21), + ItemUtils.getSimpleStack(Formaldehyde_Catalyst, 0), + }, + new FluidStack[] { + FluidUtils.getFluidStack("oxygen", 16000), + FluidUtils.getFluidStack("methanol", 32000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Formaldehyde, 8000), + + }, + 20 * 90, + 120, + 1); + + } + + private static void createFormaldehydeCatalyst() { + GT_Values.RA.addMixerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 16), + ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 1), + CI.getNumberedCircuit(18), + null, + null, + null, + ItemUtils.getSimpleStack(Formaldehyde_Catalyst, 4), + 160, + 30); + + } + + private static void createUnsymmetricalDimethylhydrazine() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(21), + ItemUtils.getSimpleStack(Formaldehyde_Catalyst, 0), + }, + new FluidStack[] { + FluidUtils.getFluidStack("fluid.hydrazine", 2000), + FluidUtils.getFluidStack(Formaldehyde, 2000), + FluidUtils.getFluidStack("hydrogen", 4000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine, 2000), + FluidUtils.getWater(2000) + + }, + 20 * 60, + 120, + 3); + + } + + private static void addRocketFuelsToMap() { + HashMap mRocketFuels = new LinkedHashMap(); + mRocketFuels.put(0, new GTPP_Recipe( + true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {FluidUtils.getFluidStack(RP1_Plus_Liquid_Oxygen, 1000)}, + new FluidStack[] {}, + 0, + 0, + 512)); //Fuel Value + + mRocketFuels.put(1, new GTPP_Recipe( + true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {FluidUtils.getFluidStack(Dense_Hydrazine_Mix, 1000)}, + new FluidStack[] {}, + 0, + 0, + 1024)); //Fuel Value + + mRocketFuels.put(2, new GTPP_Recipe( + true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {FluidUtils.getFluidStack(Monomethylhydrazine_Plus_Nitric_Acid, 1000)}, + new FluidStack[] {}, + 0, + 0, + 2048)); //Fuel Value + + mRocketFuels.put(3, new GTPP_Recipe( + true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide, 1000)}, + new FluidStack[] {}, + 0, + 0, + 4196)); //Fuel Value + + + //Add in default Diesel for the Buggy + mValidRocketFuels.put(-1, Diesel); + + mValidRocketFuelNames.add(FluidRegistry.getFluidName(Diesel)); + for (int mID : mRocketFuels.keySet()) { + GTPP_Recipe aFuelRecipe = mRocketFuels.get(mID); + if (aFuelRecipe != null) { + mValidRocketFuelNames.add(FluidRegistry.getFluidName(aFuelRecipe.mFluidInputs[0].getFluid())); + mValidRocketFuels.put(mID, aFuelRecipe.mFluidInputs[0].getFluid()); + GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels.add(aFuelRecipe); + } + } + + } + + + private static void createRocketFuels() { + + // RP1_Plus_Liquid_Oxygen + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(1), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Liquid_Oxygen, 2000), + FluidUtils.getFluidStack(RP1, 500), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(RP1_Plus_Liquid_Oxygen, 1500), + + }, + 20 * 15, + 240, + 3); + + + // Dense_Hydrazine_Mix + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(2), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Hydrazine, 4000), + FluidUtils.getFluidStack("methanol", 6000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Dense_Hydrazine_Mix, 10000), + + }, + 20 * 30, + 240, + 4); + + + // Monomethylhydrazine_Plus_Nitric_Acid + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(3), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Monomethylhydrazine, 2000), + FluidUtils.getFluidStack("nitricacid", 1000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Monomethylhydrazine_Plus_Nitric_Acid, 2000), + + }, + 20 * 45, + 480, + 5); + + + // Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedCircuit(4), + }, + new FluidStack[] { + FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine, 2000), + FluidUtils.getFluidStack(Nitrogen_Tetroxide, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide, 5000), + + }, + 20 * 60, + 480, + 6); + + } + + @Override + public String errorMessage() { + return "Bad Rocket Fuel Science!"; + } + + @Override + public boolean generateRecipes() { + createKerosene(); + createRP1(); + createNitrogenTetroxide(); + createHydrazine(); + createMonomethylhydrazine(); + + if (!CORE.GTNH) { + createLOX(); + } + createLOH(); + + + createHydratedAmmoniumNitrateSlurry(); + createAmmoniumNitrateDust(); + createFormaldehyde(); + createFormaldehydeCatalyst(); + createUnsymmetricalDimethylhydrazine(); + + createRocketFuels(); + addRocketFuelsToMap(); + + return true; + } + + @Override + public void items() { + Formaldehyde_Catalyst = ItemUtils.generateSpecialUseDusts("FormaldehydeCatalyst", "Formaldehyde Catalyst", "Fe16V1", Utils.rgbtoHexValue(25, 5, 25))[0]; + Formaldehyde_Catalyst_Stack = ItemUtils.getSimpleStack(Formaldehyde_Catalyst); + } + + @Override + public void blocks() { + } + + @Override + public void fluids() { + + //Register default fluids + Diesel = MaterialUtils.getMaterial("Fuel", "Diesel").getFluid(1).getFluid(); + + // 5.08 Compat + if (!FluidUtils.doesFluidExist("liquid_heavy_oil")){ + Oil_Heavy = FluidUtils.generateFluidNoPrefix("liquid_heavy_oil", "Heavy Oil", 200, new short[]{10, 10, 10, 100}); + } + else { + Oil_Heavy = MaterialUtils.getMaterial("OilHeavy", "Oil").getFluid(1).getFluid(); + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellOilHeavy", 1) == null){ + new BaseItemComponent("OilHeavy", "Heavy Oil", new short[] {10, 10, 10}); + } + } + + + //Create Kerosene + Kerosene = FluidUtils.generateFluidNonMolten("Kerosene", "Kerosene", 233, new short[]{150, 40, 150, 100}, null, null); + CoalTar.Coal_Oil = Kerosene; + + //RP! Focket Fuel + RP1 = FluidUtils.generateFluidNonMolten("RP1Fuel", "RP-1", 500, new short[]{210, 50, 50, 100}, null, null); + + //Create Nitrogen Tetroxide + Nitrogen_Tetroxide = FluidUtils.generateFluidNonMolten("NitrogenTetroxide", "Nitrogen Tetroxide", 261, new short[]{170, 170, 0, 100}, null, null); + + //Create Hydrazine + Hydrazine = FluidUtils.generateFluidNonMolten("Hydrazine", "Hydrazine", 2, new short[]{250, 250, 250, 100}, null, null); + + //Create Monomethylhydrazine + Monomethylhydrazine = FluidUtils.generateFluidNonMolten("Monomethylhydrazine", "Monomethylhydrazine", 221, new short[]{125, 125, 125, 100}, null, null); + + //Create Anthracene + Nitrous_Oxide = FluidUtils.generateFluidNonMolten("NitrousOxide", "Nitrous Oxide", 182, new short[]{255, 255, 255, 100}, null, null); + + //Nos + if (!FluidUtils.doesFluidExist("NitrousOxide")){ + Nitrous_Oxide = FluidUtils.generateFluidNoPrefix("NitrousOxide", "Nitrous Oxide", 182, new short[]{255, 255, 255, 100}); + } + else { + Nitrous_Oxide = FluidUtils.getWildcardFluidStack("NitrousOxide", 1).getFluid(); + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellNitrousOxide", 1) == null){ + new BaseItemComponent("NitrousOxide", "Nitrous Oxide", new short[] {10, 10, 175}); + } + } + + //Unsymmetrical_Dimethylhydrazine + if (FluidUtils.getFluidStack("1,1dimethylhydrazine", 1) == null){ + Unsymmetrical_Dimethylhydrazine = FluidUtils.generateFluidNonMolten("UnsymmetricalDimethylhydrazine", "Unsymmetrical Dimethylhydrazine", 216, new short[]{70, 210, 20, 100}, null, null); + } + else { + Unsymmetrical_Dimethylhydrazine = FluidUtils.getFluidStack("1,1dimethylhydrazine", 1000).getFluid(); + } + + //Create Hydrated_Ammonium_Nitrate_Slurry + Hydrated_Ammonium_Nitrate_Slurry = FluidUtils.generateFluidNonMolten("AmmoniumNitrateSlurry", "Hydrated Ammonium Nitrate Slurry", 450, new short[]{150, 75, 150, 100}, null, null); + + //Lithium Hydroperoxide - LiOH + H2O2 → LiOOH + 2 H2O + Ammonium_Nitrate_Dust = ItemUtils.generateSpecialUseDusts("AmmoniumNitrate", "Ammonium Nitrate", "N2H4O3", Utils.rgbtoHexValue(150, 75, 150))[0]; + + //Create Liquid_Oxygen + if (FluidUtils.getFluidStack("LiquidOxygen", 1) == null && FluidUtils.getFluidStack("liquidoxygen", 1) == null){ + Liquid_Oxygen = FluidUtils.generateFluidNonMolten("LiquidOxygen", "Liquid Oxygen", 54, new short[]{75, 75, 220, 100}, null, null); + } + else { + if (FluidUtils.getFluidStack("LiquidOxygen", 1) != null ) { + Liquid_Oxygen = FluidUtils.getFluidStack("LiquidOxygen", 1).getFluid(); + } + else { + Liquid_Oxygen = FluidUtils.getFluidStack("liquidoxygen", 1).getFluid(); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellLiquidOxygen", 1) == null){ + new BaseItemComponent("LiquidOxygen", "Liquid Oxygen", new short[] {10, 10, 175}); + } + } + + //Create Liquid_Hydrogen + if (FluidUtils.getFluidStack("LiquidHydrogen", 1) == null && FluidUtils.getFluidStack("liquidhydrogen", 1) == null){ + Liquid_Hydrogen = FluidUtils.generateFluidNonMolten("LiquidHydrogen", "Liquid Hydrogen", 14, new short[]{75, 75, 220, 100}, null, null); + } + else { + if (FluidUtils.getFluidStack("LiquidHydrogen", 1) != null ) { + Liquid_Hydrogen = FluidUtils.getFluidStack("LiquidHydrogen", 1).getFluid(); + } + else { + Liquid_Hydrogen = FluidUtils.getFluidStack("liquidhydrogen", 1).getFluid(); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellLiquidHydrogen", 1) == null){ + new BaseItemComponent("LiquidHydrogen", "Liquid Hydrogen", new short[] {10, 10, 175}); + } + } + + Formaldehyde = FluidUtils.generateFluidNonMolten("Formaldehyde", "Formaldehyde", 185, new short[]{150, 75, 150, 100}, null, null); + + Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide = FluidUtils.generateFluidNonMolten("RocketFuelMixA", "H8N4C2O4 Rocket Fuel", 216, new short[]{50, 220, 50, 100}, null, null); + RP1_Plus_Liquid_Oxygen = FluidUtils.generateFluidNonMolten("RocketFuelMixB", "Rp-1 Rocket Fuel", 250, new short[]{250, 50, 50, 100}, null, null); + Monomethylhydrazine_Plus_Nitric_Acid = FluidUtils.generateFluidNonMolten("RocketFuelMixC", "CN3H7O3 Rocket Fuel", 221, new short[]{125, 75, 180, 100}, null, null); + Dense_Hydrazine_Mix = FluidUtils.generateFluidNonMolten("RocketFuelMixD", "Dense Hydrazine Fuel Mixture", 275, new short[]{175, 80, 120, 100}, null, null); + + } + + @Override + public boolean onLoadComplete(FMLLoadCompleteEvent event) { + + Logger.INFO("Trying to remove GT recipes for '1,1dimethylhydrazine' && 'rocket_fuel' if they exist."); + /*if (FluidRegistry.isFluidRegistered("1,1dimethylhydrazine")) { + + // Try Remove recipes for GT/EIO Rocket Fuel Cells + if (FluidRegistry.isFluidRegistered("rocket_fuel")) { + + // Old Recipe + if (MaterialUtils.doesMaterialExist("NitrogenDioxide")) { + GT_Recipe aOldRecipe = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellNitrogenDioxide", 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 3), + }, + new FluidStack[] { + FluidUtils.getFluidStack("air", 500) + }, + 388); + boolean aDidRemove = removeRecipe(aOldRecipe, GT_Recipe_Map.sChemicalRecipes); + Logger.INFO("Removed Old Recipe for Rocket Fuel: "+aDidRemove); + } + + // Simple Recipes + if (MaterialUtils.doesMaterialExist("Ammonia") && MaterialUtils.doesMaterialExist("Methanol")) { + + GT_Recipe aSimpleRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellAmmonia", 3), + ItemUtils.getItemStackOfAmountFromOreDict("cellMethanol", 4), + }, + new FluidStack[] { + FluidUtils.getFluidStack("chlorine", 1000) + }, + 480); + GT_Recipe aSimpleRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellChlorine", 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellMethanol", 4), + }, + new FluidStack[] { + FluidUtils.getFluidStack("ammonia", 3000) + }, + 480); + GT_Recipe aSimpleRecipe3 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellAmmonia", 3), + ItemUtils.getItemStackOfAmountFromOreDict("cellChlorine", 1), + }, + new FluidStack[] { + FluidUtils.getFluidStack("methanol", 4000) + }, + 480); + + boolean aDidRemove1 = removeRecipe(aSimpleRecipe1, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove2 = removeRecipe(aSimpleRecipe2, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove3 = removeRecipe(aSimpleRecipe3, GT_Recipe_Map.sChemicalRecipes); + Logger.INFO("Removed Simple Recipe 1 for Rocket Fuel: "+aDidRemove1); + Logger.INFO("Removed Simple Recipe 2 for Rocket Fuel: "+aDidRemove2); + Logger.INFO("Removed Simple Recipe 3 for Rocket Fuel: "+aDidRemove3); + } + + + // Complex Recipes I + if (MaterialUtils.doesMaterialExist("Dimethylhydrazine") && MaterialUtils.doesMaterialExist("DinitrogenTetroxide")) { + + GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylhydrazine", 1), + }, + new FluidStack[] { + FluidUtils.getFluidStack("dinitrogentetroxide", 1000) + }, + 16); + GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDinitrogenTetroxide", 1), + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylhydrazine", 1000) + }, + 16); + + GT_Recipe aAdvRecipe3 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylhydrazine", 2), + }, + new FluidStack[] { + FluidUtils.getFluidStack("oxygen", 1000) + }, + 16); + GT_Recipe aAdvRecipe4 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylhydrazine", 2000) + }, + 16); + + boolean aDidRemove1 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sMixerRecipes); + boolean aDidRemove2 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sMixerRecipes); + boolean aDidRemove3 = removeRecipe(aAdvRecipe3, GT_Recipe_Map.sMixerRecipes); + boolean aDidRemove4 = removeRecipe(aAdvRecipe4, GT_Recipe_Map.sMixerRecipes); + Logger.INFO("Removed Complex Recipe 1 for Rocket Fuel: "+aDidRemove1); + Logger.INFO("Removed Complex Recipe 2 for Rocket Fuel: "+aDidRemove2); + Logger.INFO("Removed Complex Recipe 3 for Rocket Fuel: "+aDidRemove3); + Logger.INFO("Removed Complex Recipe 4 for Rocket Fuel: "+aDidRemove4); + } + } + + + // Complex Recipes II + if (MaterialUtils.doesMaterialExist("Dimethylhydrazine")) { + + GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylhydrazine", 2), + }, + new FluidStack[] { + FluidUtils.getFluidStack("oxygen", 1000) + }, + 16); + GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylhydrazine", 2000) + }, + 16); + + boolean aDidRemove1 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sMixerRecipes); + boolean aDidRemove2 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sMixerRecipes); + Logger.INFO("Removed Complex Recipe 5 for Rocket Fuel: "+aDidRemove1); + Logger.INFO("Removed Complex Recipe 6 for Rocket Fuel: "+aDidRemove2); + } + + if (MaterialUtils.doesMaterialExist("Chloramine") && MaterialUtils.doesMaterialExist("Dimethylamine")) { + GT_Recipe aSimpleRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 2), + GT_Utility.getIntegratedCircuit(1) + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylamine", 5000) + }, + 480); + GT_Recipe aSimpleRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 5), + GT_Utility.getIntegratedCircuit(1) + }, + new FluidStack[] { + FluidUtils.getFluidStack("chloramine", 2000) + }, + 16); + + + + GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 2), + CI.emptyCells(4) + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylamine", 5000) + }, + 480); + GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 5), + CI.emptyCells(1) + }, + new FluidStack[] { + FluidUtils.getFluidStack("chloramine", 2000) + }, + 16); + GT_Recipe aAdvRecipe3 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 2), + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 5), + }, + new FluidStack[] { + FluidUtils.getFluidStack("chloramine", 2000) + }, + 480); + + boolean aDidRemove1 = removeRecipe(aSimpleRecipe1, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove2 = removeRecipe(aSimpleRecipe2, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove3 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove4 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove5 = removeRecipe(aAdvRecipe3, GT_Recipe_Map.sChemicalRecipes); + Logger.INFO("Removed Complex Recipe 1 for 1,1dimethylhydrazine: "+aDidRemove1); + Logger.INFO("Removed Complex Recipe 2 for 1,1dimethylhydrazine: "+aDidRemove2); + Logger.INFO("Removed Complex Recipe 3 for 1,1dimethylhydrazine: "+aDidRemove3); + Logger.INFO("Removed Complex Recipe 4 for 1,1dimethylhydrazine: "+aDidRemove4); + Logger.INFO("Removed Complex Recipe 5 for 1,1dimethylhydrazine: "+aDidRemove5); + + } + + if (MaterialUtils.doesMaterialExist("Chloramine") && MaterialUtils.doesMaterialExist("Dimethylamine")) { + GT_Recipe aSimpleRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 1), + GT_Utility.getIntegratedCircuit(1) + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylamine", 1000) + }, + 480); + GT_Recipe aSimpleRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 1), + GT_Utility.getIntegratedCircuit(1) + }, + new FluidStack[] { + FluidUtils.getFluidStack("chloramine", 1000) + }, + 16); + + + + GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellChloramine", 1), + GT_Utility.getIntegratedCircuit(11) + }, + new FluidStack[] { + FluidUtils.getFluidStack("dimethylamine", 1000) + }, + 480); + GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellDimethylamine", 1), + GT_Utility.getIntegratedCircuit(11) + }, + new FluidStack[] { + FluidUtils.getFluidStack("chloramine", 1000) + }, + 16); + + boolean aDidRemove1 = removeRecipe(aSimpleRecipe1, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove2 = removeRecipe(aSimpleRecipe2, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove3 = removeRecipe(aAdvRecipe1, GT_Recipe_Map.sChemicalRecipes); + boolean aDidRemove4 = removeRecipe(aAdvRecipe2, GT_Recipe_Map.sChemicalRecipes); + Logger.INFO("Removed Complex Recipe 5 for 1,1dimethylhydrazine: "+aDidRemove1); + Logger.INFO("Removed Complex Recipe 6 for 1,1dimethylhydrazine: "+aDidRemove2); + Logger.INFO("Removed Complex Recipe 7 for 1,1dimethylhydrazine: "+aDidRemove3); + Logger.INFO("Removed Complex Recipe 8 for 1,1dimethylhydrazine: "+aDidRemove4); + + } + + if (MaterialUtils.doesMaterialExist("HypochlorousAcid") && MaterialUtils.doesMaterialExist("Ammonia") && MaterialUtils.doesMaterialExist("Methanol")) { + + GT_Recipe aAdvRecipe1 = getHalfBakedRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(24), + }, + new FluidStack[] { + FluidUtils.getFluidStack("hypochlorousacid", 3000), + FluidUtils.getFluidStack("ammonia", 8000), + FluidUtils.getFluidStack("methanol", 12000) + }, + 480); + + GT_Recipe aAdvRecipe2 = getHalfBakedRecipe( + new ItemStack[] { + GT_Utility.getIntegratedCircuit(24), + }, + new FluidStack[] { + FluidUtils.getFluidStack("hypochlorousacid", 1000), + FluidUtils.getFluidStack("ammonia", 1000), + FluidUtils.getFluidStack("methanol", 2000) + }, + 480); + + boolean aDidRemove1 = removeRecipe(aAdvRecipe1, StaticFields59.getLargeChemicalReactorRecipeMap()); + boolean aDidRemove2 = removeRecipe(aAdvRecipe2, StaticFields59.getLargeChemicalReactorRecipeMap()); + Logger.INFO("Removed Complex Recipe 9 for 1,1dimethylhydrazine: "+aDidRemove1); + Logger.INFO("Removed Complex Recipe 10 for 1,1dimethylhydrazine: "+aDidRemove2); + + + } + }*/ + + // Try Butcher recipes manually + + //1,1Dimethylhydrazine + if (FluidRegistry.isFluidRegistered("1,1dimethylhydrazine")) { + Logger.INFO("Making sure all Chemical Reactor recipes for 1,1dimethylhydrazine have been removed."); + AutoMap aToRemoveSingle = new AutoMap(); + ItemStack aUnsymCell = ItemUtils.getItemStackOfAmountFromOreDict("cell1,1Dimethylhydrazine", 1); + FluidStack aUnsymFluid = FluidUtils.getFluidStack("1,1dimethylhydrazine", 1); + recipe : for (GT_Recipe aRecipeSingleBlock : GT_Recipe_Map.sChemicalRecipes.mRecipeList) { + if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { + if (aRecipeSingleBlock.mOutputs != null && aRecipeSingleBlock.mOutputs.length > 0) { + for (ItemStack aOutputItem : aRecipeSingleBlock.mOutputs) { + ItemStack aTemp = aOutputItem.copy(); + aTemp.stackSize = 1; + if (GT_Utility.areStacksEqual(aTemp, aUnsymCell)) { + aToRemoveSingle.add(aRecipeSingleBlock); + continue recipe; + } + } + } + if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { + for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { + if (GT_Utility.areFluidsEqual(aOutput, aUnsymFluid)) { + aToRemoveSingle.add(aRecipeSingleBlock); + continue recipe; + } + } + } + } + } + // Handle Multi Also + AutoMap aToRemoveMulti = new AutoMap(); + recipe : for (GT_Recipe aRecipeSingleBlock : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { + if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { + if (aRecipeSingleBlock.mOutputs != null && aRecipeSingleBlock.mOutputs.length > 0) { + for (ItemStack aOutputItem : aRecipeSingleBlock.mOutputs) { + ItemStack aTemp = aOutputItem.copy(); + aTemp.stackSize = 1; + if (GT_Utility.areStacksEqual(aTemp, aUnsymCell)) { + aToRemoveMulti.add(aRecipeSingleBlock); + continue recipe; + } + } + } + if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { + for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { + if (GT_Utility.areFluidsEqual(aOutput, aUnsymFluid)) { + aToRemoveMulti.add(aRecipeSingleBlock); + continue recipe; + } + } + } + } + } + if (!aToRemoveSingle.isEmpty()) { + Logger.INFO("Found "+aToRemoveSingle.size()+" single block recipes, removing by force."); + for (GT_Recipe remove : aToRemoveSingle) { + GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(remove); + } + } + if (!aToRemoveMulti.isEmpty()) { + Logger.INFO("Found "+aToRemoveSingle.size()+" multiblock recipes, removing by force."); + for (GT_Recipe remove : aToRemoveMulti) { + StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList.remove(remove); + } + } + } + + + if (FluidRegistry.isFluidRegistered("rocket_fuel")) { + Logger.INFO("Making sure all Mixer recipes for rocket_fuel have been removed."); + AutoMap aToRemoveSingle = new AutoMap(); + FluidStack aRocketFluid = FluidUtils.getFluidStack("rocket_fuel", 1); + recipe : for (GT_Recipe aRecipeSingleBlock : GT_Recipe_Map.sMixerRecipes.mRecipeList) { + if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { + if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { + for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { + if (GT_Utility.areFluidsEqual(aOutput, aRocketFluid)) { + aToRemoveSingle.add(aRecipeSingleBlock); + continue recipe; + } + } + } + } + } + if (!aToRemoveSingle.isEmpty()) { + Logger.INFO("Found "+aToRemoveSingle.size()+" recipes, removing by force."); + for (GT_Recipe remove : aToRemoveSingle) { + GT_Recipe_Map.sMixerRecipes.mRecipeList.remove(remove); + } + aToRemoveSingle.clear(); + } + + Logger.INFO("Making sure all Chemical Reactor recipes for rocket_fuel have been removed."); + recipe : for (GT_Recipe aRecipeSingleBlock : GT_Recipe_Map.sChemicalRecipes.mRecipeList) { + if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { + if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { + for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { + if (GT_Utility.areFluidsEqual(aOutput, aRocketFluid)) { + aToRemoveSingle.add(aRecipeSingleBlock); + continue recipe; + } + } + } + } + } + // Handle Multi Also + AutoMap aToRemoveMulti = new AutoMap(); + recipe : for (GT_Recipe aRecipeSingleBlock : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { + if (aRecipeSingleBlock != null && aRecipeSingleBlock.mEnabled) { + if (aRecipeSingleBlock.mFluidOutputs != null && aRecipeSingleBlock.mFluidOutputs.length > 0) { + for (FluidStack aOutput : aRecipeSingleBlock.mFluidOutputs) { + if (GT_Utility.areFluidsEqual(aOutput, aRocketFluid)) { + aToRemoveMulti.add(aRecipeSingleBlock); + continue recipe; + } + } + } + } + } + if (!aToRemoveSingle.isEmpty()) { + Logger.INFO("Found "+aToRemoveSingle.size()+" single block recipes, removing by force."); + for (GT_Recipe remove : aToRemoveSingle) { + GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(remove); + } + } + if (!aToRemoveMulti.isEmpty()) { + Logger.INFO("Found "+aToRemoveSingle.size()+" multiblock recipes, removing by force."); + for (GT_Recipe remove : aToRemoveMulti) { + StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList.remove(remove); + } + } + + } + + + + Logger.INFO("Finished clean-up of GT Rocket Fuel Recipes."); + return true; + } + + private static GTPP_Recipe getHalfBakedRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, int aEU) { + return new GTPP_Recipe(false, aInputs, null, null, null, aFluidInputs, null, 0, aEU, 0); + + } + + public static boolean removeRecipe(GT_Recipe aRecipe, GT_Recipe_Map aMap) { + if (aMap != GT_Recipe_Map.sChemicalRecipes) { + GT_Recipe aFoundRecipe = aMap.findRecipe(null, false, true, aRecipe.mEUt, aRecipe.mFluidInputs, aRecipe.mInputs); + boolean aSingle = false; + if (aFoundRecipe != null) { + Logger.INFO("Found Single Block Recipe, removing."); + aSingle = aMap.mRecipeList.remove(aFoundRecipe); + Logger.INFO("Success? "+aSingle); + } + return aSingle; + } + else { + GT_Recipe aFoundRecipe = aMap.findRecipe(null, false, true, aRecipe.mEUt, aRecipe.mFluidInputs, aRecipe.mInputs); + GT_Recipe aFoundRecipe2 = StaticFields59.getLargeChemicalReactorRecipeMap().findRecipe(null, false, true, aRecipe.mEUt, aRecipe.mFluidInputs, aRecipe.mInputs); + boolean aSingle = false; + boolean aMulti = false; + if (aFoundRecipe != null) { + Logger.INFO("Found Single Block Recipe, removing."); + aSingle = GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(aFoundRecipe); + Logger.INFO("Success? "+aSingle); + } + if (aFoundRecipe2 != null) { + Logger.INFO("Found Multiblock Recipe, removing."); + aMulti = StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList.remove(aFoundRecipe2); + Logger.INFO("Success? "+aSingle); + } + return aSingle && aMulti; + } + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java b/src/main/java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java new file mode 100644 index 0000000000..10eaaf0da9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java @@ -0,0 +1,161 @@ +package gtPlusPlus.core.item.chemistry; + +import java.util.HashMap; +import java.util.List; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.base.misc.BaseItemParticle; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Particle; +import gtPlusPlus.core.material.Particle.ElementaryGroup; +import gtPlusPlus.core.util.Utils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class StandardBaseParticles extends BaseItemParticle { + + public static HashMap NameToMetaMap = new HashMap(); + public static HashMap MetaToNameMap = new HashMap(); + + public StandardBaseParticles() { + super("Base", aTypes.length, EnumRarity.rare); + } + + private static final String[] aTypes = new String[] { "Graviton", "Up", "Down", "Charm", "Strange", "Top", + "Bottom", "Electron", "Electron Neutrino", "Muon", "Muon Neutrino", "Tau", "Tau Neutrino", "Gluon", + "Photon", "Z Boson", "W Boson", "Higgs Boson", "Proton", "Neutron", "Lambda", "Omega", "Pion", + "ETA Meson", "Unknown" }; + + public IIcon[] icons = new IIcon[aTypes.length]; + + static { + //Generate Ions + int key = 0; + + + for (String s : aTypes) { + //Map names to Meta + NameToMetaMap.put(Utils.sanitizeString(s.toLowerCase()), key); + MetaToNameMap.put(key, Utils.sanitizeString(s.toLowerCase())); + for (Particle o : Particle.aMap) { + int aColour = 0; + if (o.mParticleName.toLowerCase().equals(s.toLowerCase())) { + if (o.mParticleType == ElementaryGroup.BARYON) { + aColour = Utils.rgbtoHexValue(174, 226, 156); + aColourMap.put(key++, aColour); + } + else if (o.mParticleType == ElementaryGroup.BOSON) { + if (o == Particle.HIGGS_BOSON) { + aColour = Utils.rgbtoHexValue(226, 196, 104); + aColourMap.put(key++, aColour); + } + else { + aColour = Utils.rgbtoHexValue(226, 52, 66); + aColourMap.put(key++, aColour); + } + } + else if (o.mParticleType == ElementaryGroup.LEPTON) { + aColour = Utils.rgbtoHexValue(126, 226, 95); + aColourMap.put(key++, aColour); + } + else if (o.mParticleType == ElementaryGroup.MESON) { + aColour = Utils.rgbtoHexValue(90, 154, 226); + aColourMap.put(key++, aColour); + } + else { + aColour = Utils.rgbtoHexValue(188, 61, 226); + aColourMap.put(key++, aColour); + } + } + } + } + + } + + @Override + public String[] getAffixes() { + return new String[] {"", ""}; + } + + @Override + public String getUnlocalizedName() { + return ""; + } + + @Override + public String getUnlocalizedName(final ItemStack itemStack) { + return "item.particle.base" + "." + aTypes[itemStack.getItemDamage()]; + } + + public static Particle getParticle(ItemStack aStack) { + AutoMap g = Particle.aMap; + for (Particle p : g) { + String aPartName = Utils.sanitizeString(p.mParticleName.toLowerCase()); + String expectedPart = Utils.sanitizeString(aTypes[aStack.getItemDamage()].toLowerCase()); + if (aPartName.equals(expectedPart)) { + return p; + } + } + return Particle.UNKNOWN; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + //return Utils.rgbtoHexValue(200, 200, 200); + return super.getColorFromParentClass(stack, HEX_OxFFFFFF); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + Particle aCharge = getParticle(stack); + EnumChatFormatting aColour = EnumChatFormatting.GRAY; + String aState = aColour+"Unknown"+EnumChatFormatting.RESET; + if (aCharge != null) { + String aGroup = aCharge.mParticleType.name().toLowerCase(); + if (aGroup.toLowerCase().contains("quark")) { + aColour = EnumChatFormatting.LIGHT_PURPLE; + } + else if (aGroup.toLowerCase().contains("lepton")) { + aColour = EnumChatFormatting.GREEN; + } + else if (aCharge == Particle.HIGGS_BOSON) { + aColour = EnumChatFormatting.YELLOW; + } + else if (aGroup.toLowerCase().contains("boson")) { + aColour = EnumChatFormatting.RED; + } + else if (aGroup.toLowerCase().contains("baryon")) { + aColour = EnumChatFormatting.BLUE; + } + else if (aGroup.toLowerCase().contains("meson")) { + aColour = EnumChatFormatting.WHITE; + } + else { + aColour = EnumChatFormatting.GRAY; + } + String aFirstLet = aGroup.substring(0, 1).toUpperCase(); + aGroup = aGroup.replaceFirst(aGroup.substring(0, 1), aFirstLet); + aState = aColour+aGroup+EnumChatFormatting.RESET; + list.add(EnumChatFormatting.GRAY + "Type: "+aState); + } + super.addInformation(stack, player, list, bool); + } + + @Override + public void registerIcons(IIconRegister reg) { + for (int i = 0; i < this.icons.length; i++) { + this.icons[i] = reg.registerIcon(CORE.MODID + ":" + "particle/new/"+i); + } + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java b/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java new file mode 100644 index 0000000000..9a00b49342 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemGenericChemBase.java @@ -0,0 +1,318 @@ +package gtPlusPlus.core.item.chemistry.general; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.item.chemistry.GenericChem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemGenericChemBase extends Item { + + final protected IIcon base[]; + + final private int aMetaSize = 13; + + /* + * 0 - Red Metal Catalyst //FeCu + * 1 - Yellow Metal Catalyst //WNi + * 2 - Blue Metal Catalyst //CoTi + * 3 - Orange Metal Catalyst //Vanadium Pd + * 4 - Purple Metal Catalyst //IrIdium Ruthenium + * 5 - Brown Metal Catalyst //NiAl + * 6 - Pink Metal Catalyst //PtRh + * 7 - Alumina Grinding Ball + * 8 - Soapstone Grinding Ball + * 9 - Sodium Ethoxide // 2 Sodium + 1 Ethanol | 2 C2H5OH + 2 Na → 2 C2H5ONa + H2 + * 10 - Sodium Ethyl Xanthate //CH3CH2ONa + CS2 → CH3CH2OCS2Na + * 11 - Potassium Ethyl Xanthate //CH3CH2OH + CS2 + KOH → CH3CH2OCS2K + H2O + * 12 - Potassium Hydroxide // KOH + */ + + public ItemGenericChemBase() { + this.setHasSubtypes(true); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + base = new IIcon[aMetaSize]; + this.setUnlocalizedName("BasicGenericChemItem"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + } + + @Override + public int getItemStackLimit(ItemStack stack) { + if (ItemUtils.isMillingBall(stack)) { + return 16; + } + return super.getItemStackLimit(stack); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return super.getItemStackDisplayName(aStack); + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.common; + } + + @Override + public boolean requiresMultipleRenderPasses() { + return false; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + for (int i=0;i aDamageSegment * 3){ + durability = EnumChatFormatting.GREEN; + } + else if (aDam > aDamageSegment * 2){ + durability = EnumChatFormatting.YELLOW; + } + else if (aDam > aDamageSegment){ + durability = EnumChatFormatting.GOLD; + } + else if (aDam >= 0){ + durability = EnumChatFormatting.RED; + } + list.add(durability+""+(aDam)+EnumChatFormatting.GRAY+" / "+aMaxDamage); + } + super.addInformation(aStack, player, list, bool); + } + + @Override + public boolean showDurabilityBar(ItemStack aStack) { + if (ItemUtils.isMillingBall(aStack)) { + int aDam = getMillingBallDamage(aStack); + if (aDam > 0) { + return true; + } + } + else if (ItemUtils.isCatalyst(aStack)) { + int aDam = getCatalystDamage(aStack); + if (aDam > 0) { + return true; + } + } + return false; + } + + public static boolean createMillingBallNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Damage", 0); + tagNBT.setLong("MaxDamage", getMaxBallDurability(rStack)); + tagMain.setTag("MillingBall", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static int getMillingBallDamage(ItemStack aStack) { + if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { + createMillingBallNBT(aStack); + } + NBTTagCompound aNBT = aStack.getTagCompound(); + return aNBT.getCompoundTag("MillingBall").getInteger("Damage"); + } + + public static int getMillingBallMaxDamage(ItemStack aStack) { + if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { + createMillingBallNBT(aStack); + } + NBTTagCompound aNBT = aStack.getTagCompound(); + return aNBT.getCompoundTag("MillingBall").getInteger("MaxDamage"); + } + + public static void setMillingBallDamage(ItemStack aStack,int aAmount) { + NBTTagCompound aNBT = aStack.getTagCompound(); + aNBT = aNBT.getCompoundTag("MillingBall"); + aNBT.setInteger("Damage", aAmount); + } + + public static int getMaxBallDurability(ItemStack aStack) { + if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallAlumina, true)) { + return 100; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallSoapstone, true)) { + return 50; + } + return 0; + } + + public static boolean createCatalystNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Damage", 0); + tagNBT.setLong("MaxDamage", getMaxCatalystDurability(rStack)); + tagMain.setTag("catalyst", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static int getCatalystDamage(ItemStack aStack) { + if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { + createCatalystNBT(aStack); + } + NBTTagCompound aNBT = aStack.getTagCompound(); + return aNBT.getCompoundTag("catalyst").getInteger("Damage"); + } + + public static int getCatalystMaxDamage(ItemStack aStack) { + if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { + createCatalystNBT(aStack); + } + NBTTagCompound aNBT = aStack.getTagCompound(); + return aNBT.getCompoundTag("catalyst").getInteger("MaxDamage"); + } + + public static void setCatalystDamage(ItemStack aStack,int aAmount) { + NBTTagCompound aNBT = aStack.getTagCompound(); + aNBT = aNBT.getCompoundTag("catalyst"); + aNBT.setInteger("Damage", aAmount); + } + + public static int getMaxCatalystDurability(ItemStack aStack) { + return 50; + } +} diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java b/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java new file mode 100644 index 0000000000..cfd3fd6259 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/chemistry/general/ItemNuclearChemBase.java @@ -0,0 +1,152 @@ +package gtPlusPlus.core.item.chemistry.general; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +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.world.World; + +public class ItemNuclearChemBase extends Item { + + final protected IIcon base[]; + + final private int aMetaSize = 4; + + /* + * 0 - Uranium Residue + * 1 - Plutonium Residue + * 2 - Fluoride Reside + * 3 - Noble Gas Residue + */ + + public ItemNuclearChemBase() { + this.setHasSubtypes(true); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + base = new IIcon[aMetaSize]; + this.setUnlocalizedName("BasicNuclearChemItem"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + } + + @Override + public int getItemStackLimit(ItemStack stack) { + return super.getItemStackLimit(stack); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return super.getItemStackDisplayName(aStack); + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.common; + } + + @Override + public boolean requiresMultipleRenderPasses() { + return false; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + for (int i=0;i ALL_VARIANTS = new ArrayList<>(); + protected IIcon base; + + public ItemAdvancedChip() { + this.setHasSubtypes(true); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + this.setUnlocalizedName("T3RecipeSelector"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + ALL_VARIANTS.add(new ItemStack(this, 0, 0)); + for (int i = 1; i <= 24; i++) { + ItemStack aStack = new ItemStack(this, 0, i); + ALL_VARIANTS.add(aStack); + } + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return super.getItemStackDisplayName(aStack); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + try { + aList.add("Configuration == "+aStack.getItemDamage()); + aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.0").toString(), "Right click to reconfigure")); + aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.1").toString(), "Needs a screwdriver or circuit programming tool")); + } + catch (Throwable t) { + t.printStackTrace(); + } + super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.common; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + aList.add(ItemUtils.simpleMetaStack(aItem, 0, 1)); + } + + @Override + public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { + return false; + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + return false; + } + + @Override + public int getDisplayDamage(ItemStack stack) { + return stack.getItemDamage(); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public int getItemEnchantability(ItemStack stack) { + return 0; + } + + @Override + public void registerIcons(final IIconRegister u) { + this.base = u.registerIcon(CORE.MODID + ":" + "science/general/AdvancedCircuit"); + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + return this.base; + } + + @Override + public IIcon getIconFromDamage(int damage) { + return this.base; + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + return this.base; + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return this.base; + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return super.getUnlocalizedName(); + } + + @Override + public boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag) { + int meta = tag.hasKey("meta", Constants.NBT.TAG_BYTE) ? tag.getByte("meta") : -1; + if (meta < 0 || meta > 24) + return true; + + if (!player.capabilities.isCreativeMode) { + Pair> toolIndex = findConfiguratorInInv(player); + if (toolIndex == null) return true; + + ItemStack[] mainInventory = player.inventory.mainInventory; + mainInventory[toolIndex.getKey()] = toolIndex.getValue().apply(mainInventory[toolIndex.getKey()], player); + } + stack.setItemDamage(meta); + + return true; + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + // nothing on server side or fake player + if (player instanceof FakePlayer || !world.isRemote) return false; + // check if any screwdriver + ItemStack configuratorStack; + if (player.capabilities.isCreativeMode) { + configuratorStack = null; + } else { + Pair configurator = findConfiguratorInInv(player); + if (configurator == null) { + int count; + try { + count = Integer.parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); + } catch (NumberFormatException e) { + player.addChatComponentMessage(new ChatComponentText("Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + e.getMessage())); + count = 1; + } + player.addChatComponentMessage(new ChatComponentTranslation("GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); + return false; + } + configuratorStack = player.inventory.mainInventory[configurator.getKey()]; + } + openSelectorGui(configuratorStack, stack.getItemDamage()); + return true; + } + + private void openSelectorGui(ItemStack configurator, int meta) { + FMLCommonHandler.instance().showGuiScreen(new GT_GUIDialogSelectItem( + StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), + configurator, + null, + ItemAdvancedChip::onConfigured, + ALL_VARIANTS, + meta, + true + )); + } + + private static void onConfigured(ItemStack stack) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setByte("meta", (byte) stack.getItemDamage()); + GT_Values.NW.sendToServer(new GT_Packet_UpdateItem(tag)); + } + + private static Pair> findConfiguratorInInv(EntityPlayer player) { + ItemStack[] mainInventory = player.inventory.mainInventory; + for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { + ItemStack toolStack = mainInventory[j]; + + if (!GT_Utility.isStackValid(toolStack)) + continue; + + for (Map.Entry, BiFunction> p : GregTech_API.sCircuitProgrammerList.entrySet()) + if (p.getKey().test(toolStack)) + return Pair.of(j, p.getValue()); + } + return null; + } +} diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java new file mode 100644 index 0000000000..d8ddb26675 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -0,0 +1,114 @@ +package gtPlusPlus.core.item.crafting; + +import java.util.LinkedHashMap; +import java.util.Map; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.general.ItemGenericToken; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class ItemDummyResearch extends ItemGenericToken { + + public static enum ASSEMBLY_LINE_RESEARCH { + + + RESEARCH_1_CONTAINMENT("Containment Fields", "Advanced scientific study"), + RESEARCH_2_BASIC_CHEM("Basic Chemistry", "Time to start at the beginning"), + RESEARCH_3_ADV_CHEM("Advanced Chemistry", "Best learn more than chemical equations"), + RESEARCH_4_BASIC_PHYSICS("Basic Physics", "Fundamental laws of motion"), + RESEARCH_5_ADV_PHYSICS("Advanced Physics", "Advanced knowledge!"), + RESEARCH_6_BASIC_METALLURGY("Basic Metallurgy", "Information about material smelting"), + RESEARCH_7_ADV_METALLURGY("Advanced Metallurgy", "Advanced Material Sciences!"), + RESEARCH_8_TURBINE_AUTOMATION("Turbine Automation", "You really don't want to share this with anyone!"), + RESEARCH_9_CLOAKING("Cloaking Technologies", "Sneaking around like a mouse"), + RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"); + + + + + + + + + + + + + + + + + + + private String mName; + private String mDesc; + + private ASSEMBLY_LINE_RESEARCH(String aName, String aDesc) { + mName = aName; + mDesc = aDesc; + ModItems.itemDummyResearch.register(mName, mDesc); + } + + } + + + + + + + + + + + private static Map mInternalNameToIdMap = new LinkedHashMap(); + + public static ItemStack getResearchStack(ASSEMBLY_LINE_RESEARCH aResearchName, int aStacksize) { + Integer aMeta = mInternalNameToIdMap.get(Utils.sanitizeString(aResearchName.mName)); + if (aMeta == null) { + aMeta = 0; + } + return ItemUtils.simpleMetaStack(ModItems.itemDummyResearch, aMeta, aStacksize); + } + + private int aID = 0; + public ItemDummyResearch() { + super("dummyResearch", "Research", new String[] {"This object requires some further study"}, "research"); + + + + } + + /** + * + * @param aResearchType - What is the research for? + * @param aDescriptThe - tooltip for this research + * @return - Did we register a custom research item? + */ + public boolean register(String aResearchType, String aDescript) { + int aNewID = aID++; + mInternalNameToIdMap.put(Utils.sanitizeString(aResearchType), aNewID); + return register(aNewID, "Research on "+aResearchType, 1, aDescript); + } + + @Override + public boolean register(int id, String aLocalName, int aMaxStack, String aDescript) { + return register(id, aLocalName, 1, new String[] {aDescript, EnumChatFormatting.DARK_GRAY+"Used to further your knowledge"}, EnumRarity.common, EnumChatFormatting.LIGHT_PURPLE); + } + + @Override + @SideOnly(Side.CLIENT) + public final void registerIcons(final IIconRegister aIconRegister) { + for (int i = 0, j = mLocalNames.size(); i < j; i++) { + mIcons.put(i, aIconRegister.registerIcon(CORE.MODID + ":" + "research" + "/" + "note")); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java b/src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java new file mode 100644 index 0000000000..7cfd64a2e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java @@ -0,0 +1,42 @@ +package gtPlusPlus.core.item.effects; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +/* + * +This determines the name colour. EnumRarity can be: +EnumRarity.common - the standard white colour. +EnumRarity.uncommon - a yellow colour. +EnumRarity.rare - a light blue colour. This is used for enchanted items. +EnumRarity.epic - the purple colour used on the Golden Apple. +@SideOnly is an FML annotation. It marks the method below it for existing only on one side. Possible values are: +Side.CLIENT is probably the most common one. This marks the method as existing only on the client side. +Side.SERVER marks the method as existing only on the server side. + * + */ + +public class RarityEffect extends Item { + + public RarityEffect(final int par1){ + super(); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.common; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java b/src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java new file mode 100644 index 0000000000..74ee5ab12c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java @@ -0,0 +1,29 @@ +package gtPlusPlus.core.item.effects; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class RarityEpic extends Item { + + public RarityEpic(final int par1){ + super(); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.epic; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityRare.java b/src/main/java/gtPlusPlus/core/item/effects/RarityRare.java new file mode 100644 index 0000000000..60d5a681b9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/effects/RarityRare.java @@ -0,0 +1,29 @@ +package gtPlusPlus.core.item.effects; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class RarityRare extends Item { + + public RarityRare(){ + super(); + this.setCreativeTab(CreativeTabs.tabMaterials); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.rare; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java b/src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java new file mode 100644 index 0000000000..1ce8eec5d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java @@ -0,0 +1,23 @@ +package gtPlusPlus.core.item.effects; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class RarityUncommon extends Item { + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.uncommon; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java b/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java new file mode 100644 index 0000000000..94d5a8e80f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/food/BaseItemMetaFood.java @@ -0,0 +1,431 @@ +package gtPlusPlus.core.item.food; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class BaseItemMetaFood extends ItemFood { + + private static final HashMap mIconMap = new HashMap(); + private static int mTotalMetaItems = 0; + + /* + * 0 - Raw Human Meat + * 1 - Cooked Human Meat + * 2 - Raw Horse Meat + * 3 - Cooked Horse Meat + * 4 - Raw Wolf Meat + * 5 - Cooked Wolf Meat + * 6 - Raw Ocelot Meat + * 7 - Cooked Ocelot Meat + * 8 - Blaze Flesh + */ + + //listAllmeatraw + //listAllmeatcooked + + public static void registerMetaFoods() { + registerNewMetaFood(0, "I wouldn't eat this unless I was starving", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessModerate(80), new EffectSlownessModerate(80)), getOreDictNamesAsArrayList("listAllmeatraw")); + registerNewMetaFood(1, "Doesn't look any better cooked", 4, 1, 64, getPotionEffectPackage(new EffectWeaknessBasic(50), new EffectSlownessBasic(50)), getOreDictNamesAsArrayList("listAllmeatcooked")); + registerNewMetaFood(2, "", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessBasic(30), new EffectSlownessBasic(30)), getOreDictNamesAsArrayList("listAllmeatraw")); + registerNewMetaFood(3, "", 4, 1, 64, getOreDictNamesAsArrayList("listAllmeatcooked")); + registerNewMetaFood(4, "", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessBasic(25), new EffectSlownessBasic(30)), getOreDictNamesAsArrayList("listAllmeatraw")); + registerNewMetaFood(5, "", 4, 1, 64, getOreDictNamesAsArrayList("listAllmeatcooked")); + registerNewMetaFood(6, "", 2, 0, 64, getPotionEffectPackage(new EffectWeaknessBasic(30), new EffectSlownessBasic(25)), getOreDictNamesAsArrayList("listAllmeatraw")); + registerNewMetaFood(7, "", 4, 1, 64, getOreDictNamesAsArrayList("listAllmeatcooked")); + registerNewMetaFood(8, "Warm to the touch", EnumRarity.uncommon, 4, 1, 64, new AutoMap(), new setOnFire(), getOreDictNamesAsArrayList("listAllmeatcooked")); + } + + private static final HashMap mMaxStackSizeMap = new HashMap(); + private static final HashMap mTooltipMap = new HashMap(); + private static final HashMap mRarityMap = new HashMap(); + private static final HashMap mHealAmountMap = new HashMap(); + private static final HashMap mSaturationAmountMap = new HashMap(); + private static final HashMap> mPotionEffectsMap = new HashMap>(); + private static final HashMap mHasSpecialBehaviourMap = new HashMap(); + private static final HashMap mSpecialBehaviourMap = new HashMap(); + private static final HashMap> mOreDictNames = new HashMap>(); + + + public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize) { + registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, new AutoMap(), null, new ArrayList()); + } + + public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final ArrayList aOreDictNames) { + registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, new AutoMap(), null, aOreDictNames); + } + + + public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects) { + registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, new AutoMap(), null, new ArrayList()); + } + + public static void registerNewMetaFood(final int aMetaID, String aTooltip, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects, final ArrayList aOreDictNames) { + registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, aPotionEffects, null, aOreDictNames); + } + + public static void registerNewMetaFood(final int aMetaID, String aTooltip, EnumRarity aRarity, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects, final SpecialFoodBehaviour aSpecialBehaviour) { + registerNewMetaFood(aMetaID, aTooltip, EnumRarity.common, aHealAmount, aSaturationModifier, aMaxStacksize, aPotionEffects, null, new ArrayList()); + } + + public static void registerNewMetaFood(final int aMetaID, String aTooltip, EnumRarity aRarity, final int aHealAmount, final float aSaturationModifier, final int aMaxStacksize, final AutoMap aPotionEffects, final SpecialFoodBehaviour aSpecialBehaviour, final ArrayList aOreDictNames) { + mTotalMetaItems++; + mMaxStackSizeMap.put(aMetaID, aMaxStacksize); + mTooltipMap.put(aMetaID, aTooltip); + mRarityMap.put(aMetaID, aRarity); + mHealAmountMap.put(aMetaID, aHealAmount); + mSaturationAmountMap.put(aMetaID, aSaturationModifier); + mPotionEffectsMap.put(aMetaID, aPotionEffects); + mHasSpecialBehaviourMap.put(aMetaID, (aSpecialBehaviour != null)); + if (aSpecialBehaviour != null) { + mSpecialBehaviourMap.put(aMetaID, aSpecialBehaviour); + } + mOreDictNames.put(aMetaID, aOreDictNames); + } + + public static void registerFoodsToOreDict() { + for (int aMetaID=0; aMetaID < mTotalMetaItems; aMetaID++) { + ArrayList aOreDictNames = mOreDictNames.get(aMetaID); + if (aOreDictNames != null && !aOreDictNames.isEmpty()) { + ItemStack aFoodStack = ItemUtils.simpleMetaStack(ModItems.itemMetaFood, aMetaID, 1); + for (String aOreName : aOreDictNames) { + ItemUtils.addItemToOreDictionary(aFoodStack, aOreName); + } + } + } + } + + + public BaseItemMetaFood() { + super(0, 0, false); + this.setHasSubtypes(true); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + this.setUnlocalizedName("BasicMetaFood"); + this.setCreativeTab(AddToCreativeTab.tabMisc); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + BaseItemMetaFood.registerMetaFoods(); + } + + private static final int getMetaKey(ItemStack aStack) { + return aStack.getItemDamage(); + } + + // Heal Amount + public int func_150905_g(ItemStack aStack) { + return mHealAmountMap.get(getMetaKey(aStack)); + } + + // Saturation Amount + public float func_150906_h(ItemStack aStack) { + return mSaturationAmountMap.get(getMetaKey(aStack)); + } + + // Whether wolves like this food, sadly doesn't support meta items + public boolean isWolfsFavoriteMeat() { + return false; + } + + @Override + protected void onFoodEaten(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + //super.onFoodEaten(stack, world, player); + AutoMap aPotionEffects = mPotionEffectsMap.get(getMetaKey(aStack)); + if (!aWorld.isRemote && aPotionEffects != null && aPotionEffects.size() > 0) { + for (PotionEffectPackage aFoodEffect : aPotionEffects) { + if (MathUtils.randInt(0, 100) <= aFoodEffect.getChance() || aFoodEffect.getChance() == 100) { + PotionEffect aEffect = aFoodEffect.getEffect(); + if (aEffect != null && aEffect.getPotionID() > 0) { + aPlayer.addPotionEffect(new PotionEffect(aEffect.getPotionID(), aEffect.getDuration() * 20, aEffect.getAmplifier(), aEffect.getIsAmbient())); + } + } + } + } + + boolean aHasEpcialBehaviour = mHasSpecialBehaviourMap.get(getMetaKey(aStack)); + if (!aWorld.isRemote && aHasEpcialBehaviour) { + SpecialFoodBehaviour aBehaviour = mSpecialBehaviourMap.get(getMetaKey(aStack)); + if (aBehaviour != null) { + aBehaviour.doBehaviour(aPlayer); + } + } + } + + @Override + public ItemStack onEaten(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + return super.onEaten(aStack, aWorld, aPlayer); + } + + + @Override + public int getItemStackLimit(ItemStack aStack) { + return mMaxStackSizeMap.get(getMetaKey(aStack)); + } + + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return super.getItemStackDisplayName(aStack); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + try { + String aTooltip = mTooltipMap.get(getMetaKey(aStack)); + if (aTooltip != null && aTooltip.length() > 0) { + aList.add(aTooltip); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); + } + + @Override + public EnumRarity getRarity(ItemStack aStack) { + return mRarityMap.get(getMetaKey(aStack)); + } + + @Override + public boolean requiresMultipleRenderPasses() { + return false; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + for (int i=0;i getPotionEffectPackage(PotionEffectPackage... aEffects){ + AutoMap aPackage = new AutoMap(); + if (aEffects != null && aEffects.length > 0) { + for (PotionEffectPackage aEffect : aEffects) { + aPackage.put(aEffect); + } + } + return aPackage; + } + + private static ArrayList getOreDictNamesAsArrayList(String... aOreDictNames){ + ArrayList aPackage = new ArrayList(); + if (aOreDictNames != null && aOreDictNames.length > 0) { + for (String aEffect : aOreDictNames) { + aPackage.add(aEffect); + } + } + return aPackage; + } + + private static class EffectWeaknessBasic extends PotionEffectPackage { + + protected EffectWeaknessBasic(int aChance) { + super(new PotionEffect(Potion.weakness.getId(), 1, 20), aChance); + } + + } + + private static class EffectWeaknessModerate extends PotionEffectPackage { + + protected EffectWeaknessModerate(int aChance) { + super(new PotionEffect(Potion.weakness.getId(), 2, 40), aChance); + } + + } + + private static class EffectWeaknessSevere extends PotionEffectPackage { + + protected EffectWeaknessSevere(int aChance) { + super(new PotionEffect(Potion.weakness.getId(), 3, 60), aChance); + } + + } + + private static class EffectSlownessBasic extends PotionEffectPackage { + + protected EffectSlownessBasic(int aChance) { + super(new PotionEffect(Potion.moveSlowdown.getId(), 1, 20), aChance); + } + + } + + private static class EffectSlownessModerate extends PotionEffectPackage { + + protected EffectSlownessModerate(int aChance) { + super(new PotionEffect(Potion.moveSlowdown.getId(), 2, 40), aChance); + } + + } + + private static class EffectSlownessSevere extends PotionEffectPackage { + + protected EffectSlownessSevere(int aChance) { + super(new PotionEffect(Potion.moveSlowdown.getId(), 3, 60), aChance); + } + + } + + + + + private static abstract class SpecialFoodBehaviour { + + protected final int mChance; + + public SpecialFoodBehaviour(int aChance) { + mChance = aChance; + } + + public final void doBehaviour(EntityPlayer aPlayer) { + if (aPlayer != null && !aPlayer.worldObj.isRemote) { + if (MathUtils.randInt(0, 100) < mChance || mChance == 100) { + behaviour(aPlayer); + } + } + } + + protected abstract void behaviour(EntityPlayer aPlayer); + + } + + + private static class setOnFire extends SpecialFoodBehaviour { + + public setOnFire() { + super(100); + } + + @Override + public void behaviour(EntityPlayer aPlayer) { + EntityUtils.setEntityOnFire(aPlayer, 5); + } + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java b/src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java new file mode 100644 index 0000000000..0ff922d853 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/BaseItemGrindle.java @@ -0,0 +1,84 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.GTplusplus; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.GuiHandler; +import gtPlusPlus.core.lib.CORE; + +public class BaseItemGrindle extends Item { + + protected final String unlocalName; + + public BaseItemGrindle() { + this.unlocalName = "itemGrindleTablet"; + this.setUnlocalizedName("itemGrindleTablet"); + this.setTextureName(CORE.MODID + ":" + "itemTablet"); + GameRegistry.registerItem(this, "itemGrindleTablet"); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabOther); + } + + @Override + public int getMaxItemUseDuration(final ItemStack stack) { + return 1; + } + + @Override + public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) { + if (!world.isRemote) { + if (!player.isSneaking()) { + player.openGui(GTplusplus.instance, GuiHandler.GUI9, world, 0, 0, 0); + } + } + return itemstack; + } + + @Override + public String getItemStackDisplayName(final ItemStack aStack) { + String aName = super.getItemStackDisplayName(aStack); + if (aName.toLowerCase().contains(".name") || aName.toLowerCase().contains("git")) { + aName = "Grindle"; + } + return aName; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(final IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(CORE.MODID + ":" + "itemTablet"); + } + + @Override + public String getPotionEffect(ItemStack p_150896_1_) { + return super.getPotionEffect(p_150896_1_); + } + + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_); + aList.add("Used to read data from DataSticks & DataOrbs."); + } + + @Override + public EnumRarity getRarity(ItemStack i) { + return EnumRarity.uncommon; + } + + @Override + public boolean isRepairable() { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java b/src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java new file mode 100644 index 0000000000..5aa2e4ae9e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java @@ -0,0 +1,107 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class BedLocator_Base extends Item{ + + public int bed_X = 0; + public int bed_Y = 0; + public int bed_Z = 0; + + public BedLocator_Base(final String unlocalizedName) { + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabMachines); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + + int NBT_X = this.bed_X; + int NBT_Y = this.bed_Y; + int NBT_Z = this.bed_Z; + + + if (stack.stackTagCompound != null) { + NBT_X = stack.stackTagCompound.getInteger("pos_x"); + NBT_Y = stack.stackTagCompound.getInteger("pos_y"); + NBT_Z = stack.stackTagCompound.getInteger("pos_z"); + + final String tempX = String.valueOf(NBT_X); + final String tempY = String.valueOf(NBT_Y); + final String tempZ = String.valueOf(NBT_Z); + final String formattedX = EnumChatFormatting.DARK_RED+tempX+EnumChatFormatting.GRAY; + final String formattedY = EnumChatFormatting.RED+tempY+EnumChatFormatting.GRAY; + final String formattedZ = EnumChatFormatting.RED+tempZ+EnumChatFormatting.GRAY; + + list.add(EnumChatFormatting.GRAY+"X: "+formattedX+"."); + list.add(EnumChatFormatting.GRAY+"Y: "+formattedY+"."); + list.add(EnumChatFormatting.GRAY+"Z: "+formattedZ+"."); + super.addInformation(stack, aPlayer, list, bool); + } + } + + //Ticking and NBT Handling + /* Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and + * update it's contents. + * + * public int fuelRemaining = 0; + public int maximumFuel = 0; + public String fuelType = ""; + public float heat = 0; + public float maxHeat = 5000; + * + */ + @Override + public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) { + itemStack.stackTagCompound = new NBTTagCompound(); + this.bed_X = 0; + this.bed_Y = 0; + this.bed_Z = 0; + itemStack.stackTagCompound.setInteger("pos_x", this.bed_X); + itemStack.stackTagCompound.setInteger("pos_y", this.bed_Y); + itemStack.stackTagCompound.setInteger("pos_z", this.bed_Z); + } + + @Override + public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4, final boolean par5) { + + + } + + @Override + public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer par3Entity) { + itemStack.stackTagCompound = new NBTTagCompound(); + if (par3Entity.getBedLocation() != null){ + this.bed_X = par3Entity.getBedLocation().posX; + this.bed_Y = par3Entity.getBedLocation().posY; + this.bed_Z = par3Entity.getBedLocation().posZ; + } + else { + this.bed_X = 0; + this.bed_Y = 0; + this.bed_Z = 0; + } + itemStack.stackTagCompound.setInteger("pos_x", this.bed_X); + itemStack.stackTagCompound.setInteger("pos_y", this.bed_Y); + itemStack.stackTagCompound.setInteger("pos_z", this.bed_Z); + return super.onItemRightClick(itemStack, world, par3Entity); + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/BufferCore.java b/src/main/java/gtPlusPlus/core/item/general/BufferCore.java new file mode 100644 index 0000000000..9b00d3d034 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/BufferCore.java @@ -0,0 +1,72 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.item.base.BaseItemWithDamageValue; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; + +public class BufferCore extends BaseItemWithDamageValue{ + + public int coreTier = 0; + + public BufferCore(final String unlocalizedName, final int i) { + super(unlocalizedName+i); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(32); + this.coreTier = i; + } + + @Override + public String getItemStackDisplayName(final ItemStack stack) { + return super.getItemStackDisplayName(stack)/*+" ["+GT_Values.VN[this.coreTier-1]+"]."*/; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() + { + return true; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GRAY+"A key crafting component for "+GT_Values.VN[this.coreTier-1]+" Applicances"); + } + + public final int getCoreTier() { + return this.coreTier; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + + int[] mTierTypes = new int[] { + Utils.rgbtoHexValue(200, 180, 180), + Utils.rgbtoHexValue(142, 153, 161), + Utils.rgbtoHexValue(230, 121, 75), + Utils.rgbtoHexValue(215, 156, 70), + Utils.rgbtoHexValue(97, 97, 96), //EV + Utils.rgbtoHexValue(202, 202, 201), + Utils.rgbtoHexValue(247, 159, 157), + Utils.rgbtoHexValue(181, 223, 223), + Utils.rgbtoHexValue(187, 219, 185), + }; + + if (this.coreTier == 10){ + return Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250)); + } + + return mTierTypes[this.coreTier-1]; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java b/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java new file mode 100644 index 0000000000..a354e63fe3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemAirFilter.java @@ -0,0 +1,141 @@ +package gtPlusPlus.core.item.general; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class ItemAirFilter extends Item { + + public IIcon[] icons = new IIcon[1]; + + public ItemAirFilter() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemAirFilter"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setMaxStackSize(1); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "itemAirFilter"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[0]; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 2; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + + if (tItem == null) { + return "Air Filter"; + } + + String itemName = tItem == null ? "Air Filter" : super.getItemStackDisplayName(tItem); + String suffixName = ""; + if (tItem.getItemDamage() == 0){ + suffixName = " [Tier 1]"; + } + else if (tItem.getItemDamage() == 1){ + suffixName = " [Tier 2]"; + } + return (itemName+suffixName); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + int meta = stack.getItemDamage(); + if (meta == 1){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); + } + return HEX_OxFFFFFF; + } + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Damage", 0); + tagMain.setTag("AirFilter", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getFilterDamage(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("AirFilter"); + if (aNBT != null) { + return aNBT.getLong("Damage"); + } + } + else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("AirFilter"); + if (aNBT != null) { + aNBT.setLong("Damage", aDamage); + return true; + } + } + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null){ + createNBT(stack); + } + double currentDamage = getFilterDamage(stack); + double meta = stack.getItemDamage() == 0 ? 50 : 2500; + double durabilitypercent = currentDamage / meta; + return durabilitypercent; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"An Air filter for Atmospheric Reconditioning."); + int maxDamage = (stack.getItemDamage() == 0 ? 50 : 2500); + list.add(EnumChatFormatting.GRAY+""+(maxDamage-getFilterDamage(stack))+"/"+maxDamage+" uses left."); + super.addInformation(stack, player, list, bool); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java new file mode 100644 index 0000000000..5be184b3db --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java @@ -0,0 +1,202 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.common.blocks.GT_Block_Ores; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.block.base.BlockBaseOre; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; + +public class ItemAreaClear extends CoreItem { + + public IIcon[] mIcon = new IIcon[1]; + + public ItemAreaClear() { + super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A M C Y N A M E"}, EnumRarity.rare, + EnumChatFormatting.BOLD, false, null); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.mIcon[0] = reg.registerIcon(CORE.MODID + ":" + "itemLavaFilter"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.mIcon[0]; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 2; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String itemName = "Debug Square"; + String suffixName = ""; + if (tItem.getItemDamage() == 0){ + suffixName = " [1]"; + } + else if (tItem.getItemDamage() == 1){ + suffixName = " [2]"; + } + return (itemName+suffixName); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + String mMode = (stack.getItemDamage() == 0 ? "Clear" : "Fill"); + list.add(EnumChatFormatting.GRAY+""+("Mode: "+mMode)); + super.addInformation(stack, player, list, bool); + } + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Mode", 0); + tagMain.setTag("GTPP_DEBUG", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getFilterDamage(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GTPP_DEBUG"); + if (aNBT != null) { + return aNBT.getLong("Mode"); + } + } + else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GTPP_DEBUG"); + if (aNBT != null) { + aNBT.setLong("Mode", aDamage); + return true; + } + } + return false; + } + + public boolean removeBlocks(World world, BlockPos pos){ + int x1 = pos.xPos; + int y1 = pos.yPos; + int z1 = pos.zPos; + + int x2 = (x1-24); + int y2 = (y1-10); + int z2 = (z1-24); + + removeBlockColumn(world, new BlockPos(x2, y2, z2, world)); + return true; + } + + public boolean removeBlockColumn(World world, BlockPos pos){ + for (int i=0; i<50; i++){ + removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos-10, pos.zPos+i, world)); + removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos+i, world)); + removeBlockRow(world, new BlockPos(pos.xPos, pos.yPos+10, pos.zPos+i, world)); + } + return true; + } + + public boolean removeBlockRow(World world, BlockPos pos){ + for (int j=0; j<20; j++){ + for (int i=0; i<50; i++){ + + if (!(world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) instanceof BlockBaseOre) && + !(world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) instanceof IGregTechTileEntity) && + !(world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) instanceof GT_Block_Ores)){ + if (!world.isAirBlock(pos.xPos+i, pos.yPos+j, pos.zPos) && + world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ + int chance = MathUtils.randInt(0, 500); + if (chance <= 0){ + if (pos.yPos+j <= 50){ + world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.glowstone); + } + } + else { + if ((world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) == Blocks.glowstone && ((pos.yPos+j) > 50)) || world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.glowstone){ + world.setBlockToAir(pos.xPos+i, pos.yPos+j, pos.zPos); + } + } + } + } + } + } + return true; + } + + public boolean fillBlocks(World world, BlockPos pos){ + int x1 = pos.xPos; + int y1 = pos.yPos; + int z1 = pos.zPos; + + int x2 = (x1-10); + int y2 = (y1-1); + int z2 = (z1-10); + + fillBlockColumn(world, new BlockPos(x2, y2, z2, world)); + return true; + } + + public boolean fillBlockColumn(World world, BlockPos pos){ + for (int i=0; i<21; i++){ + fillBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos+i, world)); + } + return true; + } + + public boolean fillBlockRow(World world, BlockPos pos){ + for (int j=0; j<2; j++){ + for (int i=0; i<21; i++){ + if (world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ + world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.grass); + } + } + } + return true; + } + + @Override + public ItemStack onItemRightClick(ItemStack thisItem, World world, EntityPlayer parEntity) { + BlockPos groundBlock = EntityUtils.findBlockPosUnderEntity(parEntity); + if (thisItem.getItemDamage() == 0){ + removeBlocks(world, groundBlock); + } + else { + Logger.INFO("Filling."); + fillBlocks(world, groundBlock); + } + return super.onItemRightClick(thisItem, world, parEntity); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java b/src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java new file mode 100644 index 0000000000..ca6c5e8c8c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBasicFirestarter.java @@ -0,0 +1,85 @@ +package gtPlusPlus.core.item.general; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.core.block.general.FirePit; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; + +public class ItemBasicFirestarter extends CoreItem { + + public ItemBasicFirestarter() { + super("itemSimpleFiremaker", AddToCreativeTab.tabTools, 1, 5, "Can probably make you a fire"); + this.setTextureName(CORE.MODID+":"+"itemFireStarter"); + } + + @Override + public boolean onItemUse( + final ItemStack thisItem, final EntityPlayer thisPlayer, final World thisWorld, + int blockX, int blockY, int blockZ, + final int p_77648_7_, final float p_77648_8_, final float p_77648_9_, final float p_77648_10_) { + if (p_77648_7_ == 0) { + --blockY; + } + if (p_77648_7_ == 1) { + ++blockY; + } + if (p_77648_7_ == 2) { + --blockZ; + } + if (p_77648_7_ == 3) { + ++blockZ; + } + if (p_77648_7_ == 4) { + --blockX; + } + if (p_77648_7_ == 5) { + ++blockX; + } + if (!thisPlayer.canPlayerEdit(blockX, blockY, blockZ, p_77648_7_, thisItem)) { + return false; + } + if (thisWorld.getBlock(blockX, blockY, blockZ) instanceof FirePit){ + thisWorld.setBlockMetadataWithNotify(blockX, blockY, blockZ, 2, 4); + PlayerUtils.messagePlayer(thisPlayer, "You light the fire pit. "); + } + if (thisWorld.isAirBlock(blockX, blockY, blockZ)) + { + final int random = MathUtils.randInt(0, 3); + //Explode, lol. + if (random == 0){ + PlayerUtils.messagePlayer(thisPlayer, "You somehow managed to set yourself on fire... "); + thisWorld.playSoundEffect(thisPlayer.posX + 0.5D, thisPlayer.posY + 0.5D, thisPlayer.posZ + 0.5D, "fire.ignite", 1.0F, (itemRand.nextFloat() * 0.4F) + 0.8F); + thisPlayer.setFire(4); + thisItem.damageItem(thisItem.getMaxDamage(), thisPlayer); + } + + //Create a fire + else if (random == 2){ + PlayerUtils.messagePlayer(thisPlayer, "You created a fire!"); + thisWorld.playSoundEffect(blockX + 0.5D, blockY + 0.5D, blockZ + 0.5D, "fire.ignite", 1.0F, (itemRand.nextFloat() * 0.4F) + 0.8F); + thisWorld.setBlock(blockX, blockY, blockZ, Blocks.fire); + } + + //Do nothing + else { + PlayerUtils.messagePlayer(thisPlayer, "Your attemp does nothing."); + thisItem.damageItem(1, thisPlayer); + return false; + } + } + thisItem.damageItem(1, thisPlayer); + return true; + } + + @Override + public String getItemStackDisplayName(final ItemStack thisItem) { + return "Basic Firemaker"; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java b/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java new file mode 100644 index 0000000000..bd8159eb01 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBasicScrubberTurbine.java @@ -0,0 +1,147 @@ +package gtPlusPlus.core.item.general; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class ItemBasicScrubberTurbine extends Item { + + public IIcon[] icons = new IIcon[1]; + + public ItemBasicScrubberTurbine() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemBasicTurbine"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setMaxStackSize(1); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "itemBasicTurbine"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[0]; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 2; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + if (tItem == null) { + return "Basic Turbine"; + } + return super.getItemStackDisplayName(tItem); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + int meta = stack.getItemDamage(); + if (meta == 0){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200,200,200); + } + if (meta == 1){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(255,128,0); + } + return HEX_OxFFFFFF; + } + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Damage", 0); + tagMain.setTag("BasicTurbine", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getFilterDamage(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("BasicTurbine"); + if (aNBT != null) { + return aNBT.getLong("Damage"); + } + } + else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("BasicTurbine"); + if (aNBT != null) { + aNBT.setLong("Damage", aDamage); + return true; + } + } + return false; + } + + public int getMaxDurability(ItemStack aStack) { + if (aStack != null) { + int aMeta = aStack.getItemDamage(); + if (aMeta == 0) { + return 2500; + } + if (aMeta == 1) { + return 5000; + } + } + return 0; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null){ + createNBT(stack); + } + double currentDamage = getFilterDamage(stack); + double meta = getMaxDurability(stack); + double durabilitypercent = currentDamage / meta; + return durabilitypercent; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"An early tier Turbine for Atmospheric Reconditioning."); + int maxDamage = getMaxDurability(stack); + list.add(EnumChatFormatting.GRAY+""+(maxDamage-getFilterDamage(stack))+"/"+maxDamage+" uses left."); + super.addInformation(stack, player, list, bool); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java new file mode 100644 index 0000000000..eded4e2585 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java @@ -0,0 +1,295 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.interfaces.IItemBlueprint; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; + +public class ItemBlueprint extends Item implements IItemBlueprint{ + + public ItemBlueprint(final String unlocalizedName) { + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabMachines); + //this.bpID = MathUtils.randInt(0, 1000); + GameRegistry.registerItem(this, unlocalizedName); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack itemStack, final EntityPlayer aPlayer, final List list, final boolean bool) { + //Create some NBT if it's not there, otherwise this does nothing. + if (!itemStack.hasTagCompound()){ + this.createNBT(itemStack); + } + //Set up some default variables. + int id = -1; + String name = ""; + boolean blueprint = false; + //Get proper display vars from NBT if it's there + if (itemStack.hasTagCompound()){ + //Utils.LOG_WARNING("Found TagCompound"); + id = (int) this.getNBT(itemStack, "mID"); + name = (String) this.getNBT(itemStack, "mName"); + blueprint = (boolean) this.getNBT(itemStack, "mBlueprint"); + } + //Write to tooltip list for each viable setting. + if (itemStack.hasTagCompound()) { + if (id != -1){ + list.add(EnumChatFormatting.GRAY+"Technical Document No. "+id); + } + if(blueprint){ + list.add(EnumChatFormatting.BLUE+"Currently holding a blueprint for "+name); + } + else { + list.add(EnumChatFormatting.RED+"Currently not holding a blueprint for anything."); + } + } + else { + list.add(EnumChatFormatting.RED+"Currently not holding a blueprint for anything."); + } + super.addInformation(itemStack, aPlayer, list, bool); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return "Blueprint [I am useless]"; + } + + @Override + public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) { + this.createNBT(itemStack); + } + + @Override + public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4, final boolean par5) { + + } + + @Override + public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer par3Entity) { + //Let the player know what blueprint is held + if (itemStack.hasTagCompound()) { + PlayerUtils.messagePlayer(par3Entity, "This Blueprint holds NBT data. "+"|"+this.getNBT(itemStack, "mID")+"|"+this.getNBT(itemStack, "mBlueprint")+"|"+this.getNBT(itemStack, "mName")+"|"+ItemUtils.getArrayStackNames(this.readItemsFromNBT(itemStack))); + } + else { + this.createNBT(itemStack); + PlayerUtils.messagePlayer(par3Entity, "This is a placeholder. "+this.getNBT(itemStack, "mID")); + } + + + return super.onItemRightClick(itemStack, world, par3Entity); + } + + public ItemStack[] readItemsFromNBT(final ItemStack itemStack){ + ItemStack[] blueprint = new ItemStack[9]; + if (itemStack.hasTagCompound()){ + final NBTTagCompound nbt = itemStack.getTagCompound(); + final NBTTagList list = nbt.getTagList("Items", 10); + blueprint = new ItemStack[INV_SIZE]; + for(int i = 0;i= 0) && (slot < INV_SIZE)) + { + blueprint[slot] = ItemStack.loadItemStackFromNBT(data); + } + } + return blueprint; + } + return null; + } + + public ItemStack writeItemsToNBT(final ItemStack itemStack, final ItemStack[] craftingGrid){ + final ItemStack[] blueprint = craftingGrid; + if (itemStack.hasTagCompound()){ + final NBTTagCompound nbt = itemStack.getTagCompound(); + final NBTTagList list = new NBTTagList(); + for(int i = 0;i= 10000){ + arg1.addPotionEffect(new PotionEffect(Potion.invisibility.id, 10, 2)); + this.discharge(arg0, 10000, 5, true, true, false); + } + else { + if (arg1.isPotionActive((Potion.invisibility))){ + arg1.removePotionEffect(Potion.invisibility.id); + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java b/src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java new file mode 100644 index 0000000000..b74b7972be --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemControlCore.java @@ -0,0 +1,128 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.lib.CORE; + +public class ItemControlCore extends Item { + + public static IIcon[] icons = new IIcon[10]; + + public ItemControlCore() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemControlCore"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + //this.setCreativeTab(AddToCreativeTab.tabMisc); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + icons[0] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_0"); + icons[1] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_1"); + icons[2] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_2"); + icons[3] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_3"); + icons[4] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_4"); + icons[5] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_5"); + icons[6] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_6"); + icons[7] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_7"); + icons[8] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_8"); + icons[9] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_9"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 10; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GRAY+"Allows a Multiblock to function upto "+GT_Values.VN[stack.getItemDamage()]+""); + list.add(EnumChatFormatting.GRAY+"Required Tier is determined by the sum of the eu/t of all Energy Inputs"); + list.add(EnumChatFormatting.GRAY+"Lower tiers may be used to underclock, which is useful in some situations"); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + if (tItem == null) { + return "Control Core"; + } + String aReturnValue = super.getItemStackDisplayName(tItem); + if (tItem != null) { + try { + if (aReturnValue != null) { + if (aReturnValue.toLowerCase().contains(".name")) { + aReturnValue = "Control Core"; + } + else { + return aReturnValue; + } + } + } + catch (Throwable t) {} + } + if (aReturnValue == null || !aReturnValue.toLowerCase().contains("control core") || aReturnValue.length() <= 0) { + aReturnValue = "Error"; + } + String suffixName = ""; + if (tItem.getItemDamage() == 0){ + suffixName = " [ULV]"; + } + else if (tItem.getItemDamage() == 1){ + suffixName = " [LV]"; + } + else if (tItem.getItemDamage() == 2){ + suffixName = " [MV]"; + } + else if (tItem.getItemDamage() == 3){ + suffixName = " [HV]"; + } + else if (tItem.getItemDamage() == 4){ + suffixName = " [EV]"; + } + else if (tItem.getItemDamage() == 5){ + suffixName = " [IV]"; + } + else if (tItem.getItemDamage() == 6){ + suffixName = " [LuV]"; + } + else if (tItem.getItemDamage() == 7){ + suffixName = " [ZPM]"; + } + else if (tItem.getItemDamage() == 8){ + suffixName = " [UV]"; + } + else if (tItem.getItemDamage() == 9){ + suffixName = " [MAX]"; + } + return (aReturnValue+suffixName); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java b/src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java new file mode 100644 index 0000000000..c1a2655a03 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java @@ -0,0 +1,59 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class ItemCreativeTab extends Item { + + public IIcon[] icons = new IIcon[10]; + + public ItemCreativeTab() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemCreativeTabs"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_0"); + this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_1"); + this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_2"); + this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_3"); + this.icons[4] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_4"); + this.icons[5] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_5"); + this.icons[6] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_6"); + this.icons[7] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_7"); + this.icons[8] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_8"); + this.icons[9] = reg.registerIcon(CORE.MODID + ":" + "controlcore/Core_9"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 10; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemEmpty.java b/src/main/java/gtPlusPlus/core/item/general/ItemEmpty.java new file mode 100644 index 0000000000..c832d28bbd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemEmpty.java @@ -0,0 +1,21 @@ +package gtPlusPlus.core.item.general; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; + +public class ItemEmpty extends CoreItem{ + + public ItemEmpty() { + super("item.empty", AddToCreativeTab.tabMisc); + } + + @Override + public String getItemStackDisplayName(ItemStack tItem) { + return "Empty"; + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java b/src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java new file mode 100644 index 0000000000..5181a32bc7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemGemShards.java @@ -0,0 +1,78 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.item.base.BaseItemColourable; +import gtPlusPlus.core.util.Utils; + +public class ItemGemShards extends BaseItemColourable{ + + public ItemGemShards(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, + String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { + super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); + } + + public ItemGemShards(String unlocalizedName, String displayName, CreativeTabs creativeTab, int stackSize, + int maxDmg, String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { + super(unlocalizedName, displayName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 4; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + //0 - Diamond + //1 - Emerald + //2 - Ruby + //3 - Sapphire + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String suffix = " Shards"; + String gemType = ""; + if (tItem.getItemDamage() == 0){ + gemType = "Diamond"; + } + else if (tItem.getItemDamage() == 1){ + gemType = "Emerald"; + } + else if (tItem.getItemDamage() == 2){ + gemType = "Ruby"; + } + else if (tItem.getItemDamage() == 3){ + gemType = "Sapphire"; + } + return (gemType+suffix); + + } + + @Override + public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { + if (this.getDamage(stack)==0){ + return Utils.rgbtoHexValue(150, 150, 220); + } + else if (this.getDamage(stack)==1){ + return Utils.rgbtoHexValue(75, 182, 75); + } + else if (this.getDamage(stack)==2){ + return Utils.rgbtoHexValue(182, 77, 77); + } + else { + return Utils.rgbtoHexValue(77, 75, 182); + } + } + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemGenericToken.java b/src/main/java/gtPlusPlus/core/item/general/ItemGenericToken.java new file mode 100644 index 0000000000..21d2c6e120 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemGenericToken.java @@ -0,0 +1,182 @@ +package gtPlusPlus.core.item.general; + +import java.util.HashMap; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +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.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class ItemGenericToken extends CoreItem { + + public final HashMap mLocalNames; + public final HashMap mMaxStackSizes; + public final HashMap mDescriptionArrays; + public final HashMap mRarities; + public final HashMap mCustomNameColours; + public final HashMap mIcons; + private final String mTextureDir; + + public ItemGenericToken() { + this("itemGenericToken", "Token", new String[] { "Can be reclaimed in some way, shape or form" }, "token"); + } + + public ItemGenericToken(String aUnlocalName, String aInternalName, String[] aBaseTooltip, String aTextureDir) { + super(aUnlocalName, aInternalName, AddToCreativeTab.tabMisc, 64, 1000, aBaseTooltip, EnumRarity.common, EnumChatFormatting.RESET, false, null); + mLocalNames = new HashMap(); + mMaxStackSizes = new HashMap(); + mDescriptionArrays = new HashMap(); + mRarities = new HashMap(); + mCustomNameColours = new HashMap(); + mIcons = new HashMap(); + mTextureDir = aTextureDir; + } + + public boolean register(int id, String aLocalName, int aMaxStack, String aDescript) { + return register(id, aLocalName, aMaxStack, new String[] { aDescript }); + } + + public boolean register(int id, String aLocalName, int aMaxStack, String[] aDescript) { + return register(id, aLocalName, aMaxStack, aDescript, EnumRarity.common, EnumChatFormatting.RESET); + } + + public boolean register(int id, String aLocalName, int aMaxStack, String[] aDescript, EnumRarity aRarity, + EnumChatFormatting aCustomNameColour) { + int[][] sizes = new int[2][6]; + sizes[0][0] = mLocalNames.size(); + sizes[0][1] = mMaxStackSizes.size(); + sizes[0][2] = mDescriptionArrays.size(); + sizes[0][3] = mRarities.size(); + sizes[0][4] = mCustomNameColours.size(); + //sizes[0][5] = mIcons.size(); + mLocalNames.put(id, aLocalName); + mMaxStackSizes.put(id, aMaxStack); + mDescriptionArrays.put(id, aDescript); + mRarities.put(id, aRarity); + mCustomNameColours.put(id, aCustomNameColour); + sizes[1][0] = mLocalNames.size(); + sizes[1][1] = mMaxStackSizes.size(); + sizes[1][2] = mDescriptionArrays.size(); + sizes[1][3] = mRarities.size(); + sizes[1][4] = mCustomNameColours.size(); + //sizes[1][5] = mIcons.size(); + boolean b = sizes[0][0] > sizes[1][0] && sizes[0][1] > sizes[1][1] && sizes[0][2] > sizes[1][2] + && sizes[0][3] > sizes[1][3] && sizes[0][4] > sizes[1][4]; + return b; + } + + // Handle Sub items + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { + for (int i = 0, j = mIcons.size(); i < j; i++) { + final ItemStack tStack = new ItemStack(this, 1, i); + aList.add(tStack); + } + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { + super.addInformation(stack, aPlayer, list, bool); + for (String s : mDescriptionArrays.get(stack.getItemDamage())) { + list.add(s); + } + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + + String s = "" + mCustomNameColours.get(tItem.getItemDamage()); + String parent = super.getItemStackDisplayName(tItem); + if (mLocalNames.get(tItem.getItemDamage()).length() > 0 && parent.toLowerCase().contains(".name")) { + s = s + mLocalNames.get(tItem.getItemDamage()); + } else { + s = s + parent; + } + return s; + } + + @Override + public EnumRarity getRarity(ItemStack par1ItemStack) { + return mRarities.get(par1ItemStack.getItemDamage()); + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack) { + return false; + } + + @Override + public int getMetadata(int p_77647_1_) { + return 0; + } + + @Override + public int getDisplayDamage(ItemStack stack) { + return 0; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + return 0D; + } + + @Override + public boolean isDamaged(ItemStack stack) { + return false; + } + + @Override + public int getItemStackLimit() { + return 64; + } + + @Override + public int getItemStackLimit(ItemStack aStack) { + if (aStack == null) { + return getItemStackLimit(); + } + else { + Integer aSize = mMaxStackSizes.get(aStack.getItemDamage()); + if (aSize != null) { + return aSize; + } + else { + return getItemStackLimit(); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(final IIconRegister aIconRegister) { + for (int i = 0, j = mLocalNames.size(); i < j; i++) { + mIcons.put(i, aIconRegister.registerIcon(CORE.MODID + ":" + mTextureDir + "/" + i)); + } + } + + @Override + public final IIcon getIconFromDamage(final int aMetaData) { + if (aMetaData < 0) { + return null; + } + return mIcons.get(aMetaData); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java b/src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java new file mode 100644 index 0000000000..b3338bb681 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemGiantEgg.java @@ -0,0 +1,300 @@ +package gtPlusPlus.core.item.general; + +import static gtPlusPlus.core.lib.CORE.RANDOM; + +import java.util.List; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.entity.item.ItemEntityGiantEgg; +import gtPlusPlus.core.item.base.BaseItemTickable; +import gtPlusPlus.core.item.general.spawn.ItemCustomSpawnEgg; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class ItemGiantEgg extends BaseItemTickable { + + private static ItemStack turnsIntoItem; + private static ItemStack mCorrectEgg; + private static ItemStack mCorrectStemCells; + + public void registerFuel(int burn){ + CORE.burnables.add(new Pair(burn, ItemUtils.getSimpleStack(this, 1))); + } + + public final void registerOrdictionary(String name){ + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), name); + } + + public ItemGiantEgg() { + this(Utils.rgbtoHexValue(255, 255, 255), Short.MAX_VALUE * Byte.MAX_VALUE, new String[] {"I had best try disassemble this.. for science!"}); + } + + private ItemGiantEgg(int colour, int maxTicks, String[] desc1) { + super(true, false, "itemBigEgg", colour, maxTicks, desc1); + setTextureName(CORE.MODID + ":itemBigEgg"); + this.setMaxStackSize(1); + registerFuel(5000); + registerOrdictionary("fuelLargeChickenEgg"); + } + + public static void postInit(ItemGiantEgg aGiantEggItem) { + ItemGiantEgg.turnsIntoItem = getSpawnEggStack(); + //new DecayableRecipe(aGiantEggItem.maxTicks, getSimpleStack(aGiantEggItem), ItemUtils.getSimpleStack(ItemGiantEgg.turnsIntoItem, 1)); + } + + private static ItemStack getSpawnEggStack() { + //Set the correct egg for future hatches + if (mCorrectEgg == null) { + /*for (int g=0;g 28) { + ItemStack xl = ItemUtils.getValueOfItemList("Circuit_Chip_Stemcell", 1, ItemUtils.getSimpleStack(Items.egg, 2)); + if (xl != null) { + mCorrectStemCells = xl.copy(); + } + } + else { + mCorrectStemCells = ItemUtils.getSimpleStack(Items.egg, 2); + } + } + return mCorrectStemCells; + } + + protected int getMaxTicks(ItemStack aStack) { + if (aStack != null && aStack.hasTagCompound() && aStack.getTagCompound().hasKey("mEggAge")) { + return NBTUtils.getInteger(aStack, "mEggAge"); + } + return maxTicks; + } + + @Override + public void registerIcons(final IIconRegister i) { + this.mIcon[0] = i.registerIcon(CORE.MODID + ":" + "itemBigEgg"); + } + + + @Override + protected boolean createNBT(World world, ItemStack aStack){ + + if (aStack.getTagCompound() != null && aStack.getTagCompound().hasKey("size")) { + return false; + } + Logger.INFO("Egg: "+ReflectionUtils.getMethodName(1)); + Logger.INFO("Egg: "+ReflectionUtils.getMethodName(2)); + Logger.INFO("Egg: "+ReflectionUtils.getMethodName(3)); + Logger.INFO("Egg: "+ReflectionUtils.getMethodName(4)); + Logger.INFO("Egg: "+ReflectionUtils.getMethodName(5)); + Logger.INFO("Egg: "+ReflectionUtils.getMethodName(6)); + //Logger.INFO("Creating Egg NBT."); + boolean aSuper = super.createNBT(world, aStack); + int size = MathUtils.randInt(1, 8); + NBTUtils.setInteger(aStack, "size", size); + NBTUtils.setInteger(aStack, "mEggAge", ((MathUtils.randInt(8000, 16000)*size))); + ItemStack aStemCells = getStemCellStack(); + if (aStemCells != null) { + int mSize = NBTUtils.getInteger(aStack, "size"); + float mSizeMod = (MathUtils.randInt(-5, 5)/5); + mSize += mSizeMod; + mSize = Math.max(mSize, 1); + ItemStack eggYolks[] = new ItemStack[mSize]; + for (int u=0;u 0) { + NBTUtils.setInteger(aStack, "mExpected", mexpected); + NBTUtils.writeItemsToGtCraftingComponents(aStack, new ItemStack[]{ ItemUtils.getSimpleStack(aStemCells, mexpected)}, true); + } + } + return aSuper; + + } + + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (world == null || iStack == null) { + return; + } + if (world.isRemote) { + return; + } + if (iStack.getTagCompound() == null || !iStack.getTagCompound().hasKey("size")) { + this.createNBT(world, iStack); + Logger.INFO("Egg has no NBT, creating (onUpdate)"); + } + boolean a1, a2; + a1 = this.isTicking(world, iStack); + a2 = a1 ? tickItemTag(world, iStack) : false; + + //Logger.INFO("Is Ticking? "+a1); + //Logger.INFO("Did Tick? "+a2); + if (!a1 && !a2) { + if (entityHolding instanceof EntityPlayer){ + if (MathUtils.randInt(0, 1000) >= 990) { + if (NBTUtils.hasKey(iStack, "size")) { + if ((NBTUtils.getInteger(iStack, "size")+1) >= MathUtils.randInt(0, 9)) { + ItemStack replacement = ItemUtils.getSimpleStack(getHatchResult(), 1); + if (replacement == null) { + + } + //Logger.INFO("Replacing "+iStack.getDisplayName()+" with "+replacement.getDisplayName()+"."); + final ItemStack tempTransform = replacement.copy(); + if (iStack.stackSize > 1){ + int u = iStack.stackSize; + tempTransform.stackSize = u; + ((EntityPlayer) entityHolding).inventory.addItemStackToInventory((tempTransform)); + for (int l=0;l 0) { + list.add(EnumChatFormatting.GRAY+this.descriptionString[0]); + } + if (NBTUtils.hasKey(stack, "size")){ + size = NBTUtils.getInteger(stack, "size"); + if (size > 0 && NBTUtils.hasKey(stack, "TickableItem")){ + NBTTagCompound aNBT = stack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("TickableItem"); + if (aNBT != null) { + age = aNBT.getLong("Tick"); + } + } + } + if (NBTUtils.hasKey(stack, "mEggAge")){ + life = NBTUtils.getInteger(stack, "mEggAge"); + } + if (NBTUtils.hasKey(stack, "mExpected")){ + expected = NBTUtils.getInteger(stack, "mExpected"); + } + } + String aSize = size > 0 ? ""+size : "??"; + String aExpected = expected > 0 ? ""+expected : "??"; + String aAge = age > 0 ? ""+(age/20) : "??"; + String aLife = life > 0 ? ""+(life/20) : "??"; + list.add("Egg Size: "+aSize+" ounces"); + list.add("Expected Stem Cells: "+aExpected); + list.add("Age: "+aAge+"s"+" / "+aLife+"s"); + list.add("Larger eggs take longer to hatch,"); + list.add("but have a better chance of hatching."); + + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java b/src/main/java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java new file mode 100644 index 0000000000..ad9abc8ab2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java @@ -0,0 +1,63 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.item.base.BaseItemColourable; +import gtPlusPlus.core.util.Utils; + +public class ItemHalfCompleteCasings extends BaseItemColourable{ + + public ItemHalfCompleteCasings(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, + String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { + super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 4; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String prefix = super.getItemStackDisplayName(tItem); + String casingType = ""; + if (tItem.getItemDamage() == 0){ + casingType = " I"; + } + else if (tItem.getItemDamage() == 1){ + casingType = " II"; + } + else if (tItem.getItemDamage() == 2){ + casingType = " III"; + } + else if (tItem.getItemDamage() == 3){ + casingType = " IV"; + } + return (prefix+casingType); + } + + @Override + public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { + if (this.getDamage(stack)==0){ + return Utils.rgbtoHexValue(52, 52, 52); + } + else if (this.getDamage(stack)==1){ + return Utils.rgbtoHexValue(80, 90, 222); + } + else if (this.getDamage(stack)==2){ + return Utils.rgbtoHexValue(182, 77, 177); + } + else { + return Utils.rgbtoHexValue(77, 175, 182); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java b/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java new file mode 100644 index 0000000000..db06af8297 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemHealingDevice.java @@ -0,0 +1,432 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import baubles.api.BaubleType; +import baubles.api.IBauble; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IElectricItemManager; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + +@Optional.InterfaceList(value = {@Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), @Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles")}) +public class ItemHealingDevice extends Item implements IElectricItem, IElectricItemManager, IBauble{ + + private final String unlocalizedName = "personalHealingDevice"; + private final ItemStack thisStack; + private final static int maxValueEU = 1000000000; + protected double chargeEU = 0; + + public ItemHealingDevice(){ + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setUnlocalizedName(this.unlocalizedName); + this.setMaxStackSize(1); + this.setTextureName(CORE.MODID + ":" + "personalCloakingDevice"); + this.thisStack = ItemUtils.getSimpleStack(this); + GameRegistry.registerItem(this, this.unlocalizedName); + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, final boolean p_77663_5_) { + if (worldObj.isRemote) { + return; + } + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + } + + @Override + public boolean canProvideEnergy(final ItemStack itemStack) { + return false; + } + + @Override + public Item getChargedItem(final ItemStack itemStack) { + final ItemStack x = itemStack.copy(); + x.setItemDamage(maxValueEU); + return x.getItem(); + } + + @Override + public Item getEmptyItem(final ItemStack itemStack) { + final ItemStack x = itemStack.copy(); + x.setItemDamage(0); + return x.getItem(); + } + + @Override + public double getMaxCharge(final ItemStack itemStack) { + return maxValueEU; + } + + @Override + public int getTier(final ItemStack itemStack) { + return 5; + } + + @Override + public double getTransferLimit(final ItemStack itemStack) { + return 32784; + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return (EnumChatFormatting.BLUE+"Personal Healing NanoBooster"+EnumChatFormatting.RESET); + } + + @Override + public double getDurabilityForDisplay(final ItemStack stack) + { + //return 1.0D - getEnergyStored(stack) / this.capacity; + return 1.0D - (this.getCharge(stack) / this.getMaxCharge(stack)); + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) + { + return true; + } + + public double secondsLeft(final ItemStack stack){ + + double r = 0; + r = this.getCharge(stack)/(1638400/4); + return (int) r; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + String aString1 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.1"); + String aString2 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.2"); + String aString3 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.3"); + String aString4 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.4"); + String aString5 = StatCollector.translateToLocal("GTPP.nanohealer.tooltip.5"); + String aStringTooltip = StatCollector.translateToLocal("GTPP.nanohealer.hidden"); + String aEuInfo = StatCollector.translateToLocal("GTPP.info.euInfo"); + String aTier = StatCollector.translateToLocal("GTPP.machines.tier"); + String aInputLimit = StatCollector.translateToLocal("GTPP.info.inputLimit"); + String aCurrentPower = StatCollector.translateToLocal("GTPP.info.currentPower"); + String aEU = StatCollector.translateToLocal("GTPP.info.eu"); + String aEUT = aEU+"/t"; + boolean isShowing = getShowMessages(stack); + + list.add(""); + + list.add(EnumChatFormatting.GREEN + aString1 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN + aString2 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN + aString3 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.RED + aString4 + EnumChatFormatting.GRAY); + + list.add(""); + + list.add(EnumChatFormatting.GOLD + aEuInfo + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GRAY + aTier+": [" + EnumChatFormatting.YELLOW + this.getTier(stack) + + EnumChatFormatting.GRAY + "] "+aInputLimit+": [" + EnumChatFormatting.YELLOW + + this.getTransferLimit(stack) + EnumChatFormatting.GRAY + aEUT+"]"); + list.add(EnumChatFormatting.GRAY + aCurrentPower +": [" + EnumChatFormatting.YELLOW + (long) this.getCharge(stack) + + EnumChatFormatting.GRAY + aEU +"] [" + EnumChatFormatting.YELLOW + + MathUtils.findPercentage(this.getCharge(stack), this.getMaxCharge(stack)) + EnumChatFormatting.GRAY + + "%]"); + list.add(EnumChatFormatting.GOLD + aString5 + EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GOLD + aStringTooltip + " " + (!isShowing ? EnumChatFormatting.DARK_GREEN : EnumChatFormatting.DARK_RED) + !isShowing + EnumChatFormatting.GRAY); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public double charge(final ItemStack stack, final double amount, final int tier, + final boolean ignoreTransferLimit, final boolean simulate) { + + if (!simulate) + { + ElectricItem.manager.charge(stack, amount, tier, true, simulate); + + } + return ElectricItem.manager.charge(stack, amount, tier, true, simulate); + } + + @Override + public double discharge(final ItemStack stack, final double amount, final int tier, + final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) { + if (!simulate) + { + ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); + } + + return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); + } + + @Override + public double getCharge(final ItemStack stack) { + return ElectricItem.manager.getCharge(stack); + } + + @Override + public boolean canUse(final ItemStack stack, final double amount) { + return ElectricItem.manager.canUse(stack, amount); + } + + @Override + public boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) { + return ElectricItem.manager.use(stack, amount, entity); + } + + @Override + public void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) { + ElectricItem.manager.chargeFromArmor(stack, entity); + } + + @Override + public String getToolTip(final ItemStack stack) { + return ElectricItem.manager.getToolTip(stack); + } + + @Override + public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public BaubleType getBaubleType(final ItemStack arg0) { + return BaubleType.AMULET; + } + + @Override //TODO + public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { + + } + + @Override //TODO + public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { + + } + + @Override //TODO + public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase arg1) { + if (arg1 != null && arg1.worldObj != null && !arg1.worldObj.isRemote){ + + //Try Charge First + + //Inv Slots + for (final ItemStack aInvStack : ((EntityPlayer) arg1).inventory.mainInventory) { + if (aInvStack == aBaubleStack) { + continue; + } + + if (this.getCharge(aBaubleStack) == this.getMaxCharge(aBaubleStack)) { + break; + } + + if (aInvStack != null) { + if (ChargingHelper.isItemValid(aInvStack)) { + + + double aTransferRate; + double aCurrentChargeForThisBauble; + int mTier; + final IElectricItem electricItem = (IElectricItem) aInvStack.getItem(); + + if (electricItem != null) { + + aTransferRate = electricItem.getTransferLimit(aInvStack); + mTier = electricItem.getTier(aInvStack); + aCurrentChargeForThisBauble = ElectricItem.manager.getCharge(aBaubleStack); + + if (aCurrentChargeForThisBauble < maxValueEU) { + if ((ElectricItem.manager.getCharge(aInvStack) >= aTransferRate)) { + if (electricItem.canProvideEnergy(aInvStack)) { + double d = ElectricItem.manager.discharge(aInvStack, aTransferRate, mTier, false, true, false); + //Logger.INFO("Charging from "+aInvStack.getDisplayName() +" | "+d); + ElectricItem.manager.charge(aBaubleStack, d, mTier, true, false); + } + } + } + } + } + } + if (this.getCharge(aBaubleStack) <= (this.getMaxCharge(aBaubleStack) - getTransferLimit(aBaubleStack))) { + continue; + } + else { + break; + } + } + + + //Try Heal + if (this.getCharge(aBaubleStack) > 0){ + + //health Check + float hp = 0; + if (arg1.getHealth() < arg1.getMaxHealth()){ + final float rx = arg1.getMaxHealth()-arg1.getHealth(); + Logger.INFO("rx:"+rx); + arg1.heal(rx*2); + hp = rx; + this.discharge(aBaubleStack, (1638400)*rx, 6, true, true, false); + } + + //Hunger Check + int hunger = 0; + if (arg1 instanceof EntityPlayerMP) { + EntityPlayerMP g = (EntityPlayerMP) arg1; + if (g != null) { + hunger = 20 - g.getFoodStats().getFoodLevel(); + g.getFoodStats().setFoodLevel(g.getFoodStats().getFoodLevel() + hunger); + this.discharge(aBaubleStack, (1638400) * hunger, 6, true, true, false); + } + } + + //Saturation Check + float saturation = 0; + if (arg1 instanceof EntityPlayerMP) { + EntityPlayerMP g = (EntityPlayerMP) arg1; + if (g != null) { + saturation = 5f - g.getFoodStats().getSaturationLevel(); + g.getFoodStats().setFoodSaturationLevel(g.getFoodStats().getSaturationLevel() + saturation); + this.discharge(aBaubleStack, (1638400) * saturation, 6, true, true, false); + } + } + + + saturation = (int) saturation; + + //Only show Messages if they're enabled. + if (getShowMessages(aBaubleStack)) { + if (hp > 0 || hunger > 0 || saturation > 0) + PlayerUtils.messagePlayer((EntityPlayer) arg1, + "Your NanoBooster Whirs! Leaving you feeling stronger."); + + if (hp > 0) + PlayerUtils.messagePlayer((EntityPlayer) arg1, "Healed " + hp + " hp."); + + if (hunger > 0) + PlayerUtils.messagePlayer((EntityPlayer) arg1, "Healed " + hunger + " hunger."); + + if (saturation > 0) + PlayerUtils.messagePlayer((EntityPlayer) arg1, "Satured Hunger by " + saturation + "."); + + if (hp > 0 || hunger > 0 || saturation > 0) + PlayerUtils.messagePlayer((EntityPlayer) arg1, + "You check it's remaining uses, it has " + (int) this.secondsLeft(aBaubleStack) + "."); + + } + + + + + } + } + } + + + + + + + + + + + + + + + + + + + + + + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + tagMain.setBoolean("ShowMSG", false); + rStack.setTagCompound(tagMain); + return true; + } + + public static final boolean getShowMessages(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT == null) { + if (!createNBT(aStack)) { + return false; + } + else { + aNBT = aStack.getTagCompound(); + } + } + return aNBT.getBoolean("ShowMSG"); + + } + + public static final boolean setShowMessages(final ItemStack aStack, final boolean aShow) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT == null) { + if (!createNBT(aStack)) { + return false; + } else { + aNBT = aStack.getTagCompound(); + } + } + aNBT.setBoolean("ShowMSG", aShow); + return true; + } + + @Override + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, + int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { + // TODO Auto-generated method stub + return super.onItemUse(p_77648_1_, p_77648_2_, p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_8_, + p_77648_9_, p_77648_10_); + } + + @Override + public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + ItemStack superStack = super.onItemRightClick(aStack, aWorld, aPlayer); + boolean isShiftHeld = KeyboardUtils.isShiftKeyDown(); + if (isShiftHeld) { + boolean oldState = getShowMessages(superStack); + boolean newState = Utils.invertBoolean(oldState); + ItemHealingDevice.setShowMessages(superStack, newState); + PlayerUtils.messagePlayer(aPlayer, (!oldState ? "Showing info messages" : "Hiding info messages")); + } + return superStack; + } + + @Override + public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { + return true; + } + + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java b/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java new file mode 100644 index 0000000000..c34ad9e8d3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemLavaFilter.java @@ -0,0 +1,127 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.ItemList; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; + +public class ItemLavaFilter extends CoreItem { + + public IIcon[] mIcon = new IIcon[1]; + + public ItemLavaFilter() { + super("itemLavaFilter", AddToCreativeTab.tabMachines, 1, 100, new String[] {"Lava Filter"}, EnumRarity.common, + EnumChatFormatting.BLACK, false, null); + setGregtechItemList(); + } + + private final boolean setGregtechItemList() { + ItemList.Component_LavaFilter.set(this); + return ItemList.Component_LavaFilter.get(1) != null ? true : false; + } + + @Override + public void registerIcons(IIconRegister reg) { + this.mIcon[0] = reg.registerIcon(CORE.MODID + ":" + "itemLavaFilter"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.mIcon[0]; + } + + @Override + public String getItemStackDisplayName(ItemStack tItem) { + return "Lava Filter"; + } + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Damage", 0); + tagMain.setTag("LavaFilter", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getFilterDamage(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("LavaFilter"); + if (aNBT != null) { + return aNBT.getLong("Damage"); + } + } + else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setFilterDamage(final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("LavaFilter"); + if (aNBT != null) { + aNBT.setLong("Damage", aDamage); + return true; + } + } + else { + createNBT(aStack); + } + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null){ + createNBT(stack); + } + double currentDamage = getFilterDamage(stack); + double durabilitypercent = currentDamage / 100; + return durabilitypercent; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"Filters Lava within a Thermal Boiler."); + EnumChatFormatting durability = EnumChatFormatting.GRAY; + if (100-getFilterDamage(stack) > 80){ + durability = EnumChatFormatting.GRAY; + } + else if (100-getFilterDamage(stack) > 60){ + durability = EnumChatFormatting.GREEN; + } + else if (100-getFilterDamage(stack) > 40){ + durability = EnumChatFormatting.YELLOW; + } + else if (100-getFilterDamage(stack) > 20){ + durability = EnumChatFormatting.GOLD; + } + else if (100-getFilterDamage(stack) > 0){ + durability = EnumChatFormatting.RED; + } + list.add(durability+""+(100-getFilterDamage(stack))+EnumChatFormatting.GRAY+" / "+100); + //super.addInformation(stack, player, list, bool); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java b/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java new file mode 100644 index 0000000000..fa008bf1a3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemSlowBuildingRing.java @@ -0,0 +1,140 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import baubles.api.BaubleType; +import baubles.api.IBauble; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.events.CustomMovementHandler; +import gtPlusPlus.core.handler.events.SneakManager; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +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.EnumChatFormatting; +import net.minecraft.world.World; + +@Optional.InterfaceList(value = {@Optional.Interface(iface = "baubles.api.IBauble", modid = "Baubles"), @Optional.Interface(iface = "baubles.api.BaubleType", modid = "Baubles")}) +public class ItemSlowBuildingRing extends Item implements IBauble{ + + private final String unlocalizedName = "SlowBuildingRing"; + CustomMovementHandler x; + + public ItemSlowBuildingRing(){ + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setUnlocalizedName(this.unlocalizedName); + this.setMaxStackSize(1); + this.setTextureName(CORE.MODID + ":" + "itemSlowBuildersRing"); + ItemUtils.getSimpleStack(this); + GameRegistry.registerItem(this, this.unlocalizedName); + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, final boolean p_77663_5_) { + if (worldObj.isRemote) { + return; + } + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return (EnumChatFormatting.YELLOW+"Slow Building Ring"+EnumChatFormatting.GRAY); + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) + { + return false; + } + + @SuppressWarnings("unchecked") + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(""); + list.add(EnumChatFormatting.GREEN+"Worn as a Ring within Baubles. Prevents you from sprinting."+EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN+"Movement speed reduced to crouch speed."+EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GREEN+"Press shift while worn to toggle crouch on/off."+EnumChatFormatting.GRAY); + list.add(""); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) { + return true; + } + + @Override + public BaubleType getBaubleType(final ItemStack arg0) { + return BaubleType.RING; + } + + @Override //TODO + public void onEquipped(final ItemStack arg0, final EntityLivingBase arg1) { + try { + EntityPlayer aPlayer; + if (arg1 instanceof EntityPlayer) { + aPlayer = (EntityPlayer) arg1; + SneakManager s = SneakManager.get(aPlayer); + s.putRingOn(); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + @Override //TODO + public void onUnequipped(final ItemStack arg0, final EntityLivingBase arg1) { + try { + EntityPlayer aPlayer; + if (arg1 instanceof EntityPlayer) { + aPlayer = (EntityPlayer) arg1; + SneakManager s = SneakManager.get(aPlayer); + s.takeRingOff(); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + @Override //TODO + public void onWornTick(final ItemStack arg0, final EntityLivingBase arg1) { + doEffect(arg1); + } + + private static void doEffect(final EntityLivingBase arg1){ + try { + // Get World + World aWorld = arg1.worldObj; + if (aWorld != null && !aWorld.isRemote) { + EntityPlayer aPlayer; + if (arg1 instanceof EntityPlayer) { + aPlayer = (EntityPlayer) arg1; + SneakManager s = SneakManager.get(aPlayer); + if (!aPlayer.isSneaking()){ + aPlayer.setSneaking(true); + } + if (aPlayer.isSprinting()) { + aPlayer.setSprinting(false); + } + } + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java b/src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java new file mode 100644 index 0000000000..9feea3c91a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java @@ -0,0 +1,211 @@ +package gtPlusPlus.core.item.general; + +import cpw.mods.fml.common.eventhandler.Event; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.FillBucketEvent; + +public class NuclearFuelRodBase extends Item +{ + /** field for checking if the bucket has been filled. */ + private final Block isFull; + public NuclearFuelRodBase(final Block p_i45331_1_) + { + this.maxStackSize = 1; + this.isFull = p_i45331_1_; + this.setCreativeTab(CreativeTabs.tabMisc); + } + + /** + * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + */ + @Override + public ItemStack onItemRightClick(final ItemStack p_77659_1_, final World p_77659_2_, final EntityPlayer p_77659_3_) + { + final boolean flag = this.isFull == Blocks.air; + final MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(p_77659_2_, p_77659_3_, flag); + + if (movingobjectposition == null) + { + return p_77659_1_; + } + final FillBucketEvent event = new FillBucketEvent(p_77659_3_, p_77659_1_, p_77659_2_, movingobjectposition); + if (MinecraftForge.EVENT_BUS.post(event)) + { + return p_77659_1_; + } + + if (event.getResult() == Event.Result.ALLOW) + { + if (p_77659_3_.capabilities.isCreativeMode) + { + return p_77659_1_; + } + + if (--p_77659_1_.stackSize <= 0) + { + return event.result; + } + + if (!p_77659_3_.inventory.addItemStackToInventory(event.result)) + { + p_77659_3_.dropPlayerItemWithRandomChoice(event.result, false); + } + + return p_77659_1_; + } + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!p_77659_2_.canMineBlock(p_77659_3_, i, j, k)) + { + return p_77659_1_; + } + + if (flag) + { + if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) + { + return p_77659_1_; + } + + final Material material = p_77659_2_.getBlock(i, j, k).getMaterial(); + final int l = p_77659_2_.getBlockMetadata(i, j, k); + + if ((material == Material.water) && (l == 0)) + { + p_77659_2_.setBlockToAir(i, j, k); + return this.func_150910_a(p_77659_1_, p_77659_3_, Items.water_bucket); + } + + if ((material == Material.lava) && (l == 0)) + { + p_77659_2_.setBlockToAir(i, j, k); + return this.func_150910_a(p_77659_1_, p_77659_3_, Items.lava_bucket); + } + } + else + { + if (this.isFull == Blocks.air) + { + return new ItemStack(Items.bucket); + } + + if (movingobjectposition.sideHit == 0) + { + --j; + } + + if (movingobjectposition.sideHit == 1) + { + ++j; + } + + if (movingobjectposition.sideHit == 2) + { + --k; + } + + if (movingobjectposition.sideHit == 3) + { + ++k; + } + + if (movingobjectposition.sideHit == 4) + { + --i; + } + + if (movingobjectposition.sideHit == 5) + { + ++i; + } + + if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) + { + return p_77659_1_; + } + + if (this.tryPlaceContainedLiquid(p_77659_2_, i, j, k) && !p_77659_3_.capabilities.isCreativeMode) + { + return new ItemStack(Items.bucket); + } + } + } + + return p_77659_1_; + } + + private ItemStack func_150910_a(final ItemStack p_150910_1_, final EntityPlayer p_150910_2_, final Item p_150910_3_) + { + if (p_150910_2_.capabilities.isCreativeMode) + { + return p_150910_1_; + } + else if (--p_150910_1_.stackSize <= 0) + { + return new ItemStack(p_150910_3_); + } + else + { + if (!p_150910_2_.inventory.addItemStackToInventory(new ItemStack(p_150910_3_))) + { + p_150910_2_.dropPlayerItemWithRandomChoice(new ItemStack(p_150910_3_, 1, 0), false); + } + + return p_150910_1_; + } + } + + /** + * Attempts to place the liquid contained inside the bucket. + */ + public boolean tryPlaceContainedLiquid(final World p_77875_1_, final int p_77875_2_, final int p_77875_3_, final int p_77875_4_) + { + if (this.isFull == Blocks.air) + { + return false; + } + final Material material = p_77875_1_.getBlock(p_77875_2_, p_77875_3_, p_77875_4_).getMaterial(); + final boolean flag = !material.isSolid(); + + if (!p_77875_1_.isAirBlock(p_77875_2_, p_77875_3_, p_77875_4_) && !flag) + { + return false; + } + if (p_77875_1_.provider.isHellWorld && (this.isFull == Blocks.flowing_water)) + { + p_77875_1_.playSoundEffect(p_77875_2_ + 0.5F, p_77875_3_ + 0.5F, p_77875_4_ + 0.5F, "random.fizz", 0.5F, 2.6F + ((p_77875_1_.rand.nextFloat() - p_77875_1_.rand.nextFloat()) * 0.8F)); + + for (int l = 0; l < 8; ++l) + { + p_77875_1_.spawnParticle("largesmoke", p_77875_2_ + Math.random(), p_77875_3_ + Math.random(), p_77875_4_ + Math.random(), 0.0D, 0.0D, 0.0D); + } + } + else + { + if (!p_77875_1_.isRemote && flag && !material.isLiquid()) + { + p_77875_1_.func_147480_a(p_77875_2_, p_77875_3_, p_77875_4_, true); + } + + p_77875_1_.setBlock(p_77875_2_, p_77875_3_, p_77875_4_, this.isFull, 0, 3); + } + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java b/src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java new file mode 100644 index 0000000000..5ff5b5a62b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/RF2EU_Battery.java @@ -0,0 +1,315 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import cofh.api.energy.ItemEnergyContainer; +import cpw.mods.fml.common.IFuelHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.Minecraft; +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.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IElectricItemManager; + +public class RF2EU_Battery extends ItemEnergyContainer implements IElectricItem, IElectricItemManager, IFuelHandler{ + + public static double rfPerEU = 3.4; + private final String unlocalizedName = "rfEUBattery"; + private final ItemStack thisStack; + private final static int maxValueEU = 100000000; + private final static int maxValueRF = (int) (maxValueEU * rfPerEU); + protected double chargeEU = 0; + + public RF2EU_Battery(){ + super(maxValueRF); + GameRegistry.registerFuelHandler(this); + //this.setMaxDamage(Integer.MAX_VALUE); + //this.setDamage(UtilsItems.getSimpleStack(this), 0); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setUnlocalizedName(this.unlocalizedName); + this.setMaxStackSize(1); + this.setTextureName(CORE.MODID + ":" + "itemIngot"); + this.thisStack = ItemUtils.getSimpleStack(this); + GameRegistry.registerItem(this, this.unlocalizedName); + } + + @Override + public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_, final boolean p_77663_5_) { + this.getEnergyStored(itemStack); + if (worldObj.isRemote) { + return; + } + + if (player instanceof EntityPlayer){ + for (final ItemStack is : ((EntityPlayer) player).inventory.mainInventory) { + if (is == itemStack) { + continue; + } + if (is != null) { + if (is.getItem() instanceof IElectricItem) { + final IElectricItem electricItem = (IElectricItem) is.getItem(); + this.chargeEU = ElectricItem.manager.getCharge(is); + } + + } + } + } + + + super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_); + } + + @Override + public boolean canProvideEnergy(final ItemStack itemStack) { + return true; + } + + @Override + public Item getChargedItem(final ItemStack itemStack) { + final ItemStack x = itemStack.copy(); + x.setItemDamage(maxValueEU); + return x.getItem(); + } + + @Override + public Item getEmptyItem(final ItemStack itemStack) { + final ItemStack x = itemStack.copy(); + x.setItemDamage(0); + return x.getItem(); + } + + @Override + public double getMaxCharge(final ItemStack itemStack) { + return maxValueEU; + } + + @Override + public int getTier(final ItemStack itemStack) { + return 3; + } + + @Override + public double getTransferLimit(final ItemStack itemStack) { + return 8196; + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + + return ("Universally Chargeable Battery"); + } + + @Override + public double getDurabilityForDisplay(final ItemStack stack) + { + //return 1.0D - getEnergyStored(stack) / this.capacity; + return MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack)); + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(final ItemStack par1ItemStack, final int par2) + { + final int i = 30; + + final float f13 = (((Minecraft.getSystemTime() % 6000L) / 3000.0F) * CORE.PI * 2.0F); + + final float t = 0.9F + (0.1F * MathHelper.cos(f13)); + + final double v = 1.0D - this.getDurabilityForDisplay(par1ItemStack); + + int r = i + (int)(v * (255 - i) * t); + if (r > 255) { + r = 255; + } + final int g = i + (int)(v * (64 - i) * t); + + return (r << 16) | (g << 8) | i; + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) + { + return false; + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.YELLOW+"IC2/EU Information"+EnumChatFormatting.GRAY); + list.add(EnumChatFormatting.GRAY+"Tier: ["+EnumChatFormatting.YELLOW+this.getTier(this.thisStack)+EnumChatFormatting.GRAY+"] Current Power: ["+EnumChatFormatting.YELLOW+(long) this.getCharge(stack)+EnumChatFormatting.GRAY+"/EU]"); + list.add(EnumChatFormatting.GRAY+"Transfer Limit: ["+EnumChatFormatting.YELLOW+this.getTransferLimit(this.thisStack)+ EnumChatFormatting.GRAY +"Eu/t]" +"Burn Time: ["+EnumChatFormatting.YELLOW+(this.getBurnTime(stack)/20)+EnumChatFormatting.GRAY+"s]"); + list.add(""); + list.add(EnumChatFormatting.RED+"RF Information"); + list.add(EnumChatFormatting.GRAY+"Extraction Rate: [" +EnumChatFormatting.RED+ this.maxExtract + EnumChatFormatting.GRAY + "Rf/t]" + " Insert Rate: [" +EnumChatFormatting.RED+ this.maxReceive+EnumChatFormatting.GRAY+"Rf/t]"); + list.add(EnumChatFormatting.GRAY+"Current Charge: ["+EnumChatFormatting.RED+this.getEnergyStored(stack) + EnumChatFormatting.GRAY + "Rf / " + this.getMaxEnergyStored(stack)+"Rf] "+EnumChatFormatting.RED+MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack))+EnumChatFormatting.GRAY+"%"); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public ItemStack getContainerItem(final ItemStack itemStack) + { + final ItemStack newItem = itemStack.copy(); + newItem.stackSize = 1; + this.extractEnergy(newItem, 150000, false); + return newItem; + } + + @Override + public boolean hasContainerItem(final ItemStack stack) + { + return true; + } + + @Override + public int getBurnTime(final ItemStack fuel) { + if ((fuel == null) || (fuel.getItem() != this)) { + return 0; + } + return this.extractEnergy(fuel, 150000, true) / 50 / 100; + } + + @Override + public double charge(final ItemStack stack, final double amount, final int tier, + final boolean ignoreTransferLimit, final boolean simulate) { + if (stack.stackTagCompound == null) { + stack.stackTagCompound = new NBTTagCompound(); + } + int energy = stack.stackTagCompound.getInteger("Energy"); + final int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, this.maxReceive)); + if (!simulate) + { + energy += energyReceived; + stack.stackTagCompound.setInteger("Energy", energy); + ElectricItem.manager.discharge(stack, ElectricItem.manager.getCharge(stack), 3, true, true, false); + ElectricItem.manager.charge(stack, energy/rfPerEU, 3, true, false); + + } + return ElectricItem.manager.charge(stack, amount, tier, ignoreTransferLimit, simulate); + } + + @Override + public double discharge(final ItemStack stack, final double amount, final int tier, + final boolean ignoreTransferLimit, final boolean externally, final boolean simulate) { + if ((stack.stackTagCompound == null) || (!stack.stackTagCompound.hasKey("Energy"))) { + final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); + if ((euCharge != 0) && (euCharge >= 1)){ + return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); + } + return 0; + } + int energy = stack.stackTagCompound.getInteger("Energy"); + final int energyExtracted = Math.min(energy, Math.min(this.maxExtract, this.maxExtract)); + if (!simulate) + { + energy -= energyExtracted; + stack.stackTagCompound.setInteger("Energy", energy); + ElectricItem.manager.discharge(stack, ElectricItem.manager.getCharge(stack), 3, true, true, false); + ElectricItem.manager.charge(stack, energy/rfPerEU, 3, true, false); + } + + return ElectricItem.manager.discharge(stack, amount, tier, ignoreTransferLimit, externally, simulate); + } + + @Override + public double getCharge(final ItemStack stack) { + return ElectricItem.manager.getCharge(stack); + } + + @Override + public boolean canUse(final ItemStack stack, final double amount) { + return ElectricItem.manager.canUse(stack, amount); + } + + @Override + public boolean use(final ItemStack stack, final double amount, final EntityLivingBase entity) { + return ElectricItem.manager.use(stack, amount, entity); + } + + @Override + public void chargeFromArmor(final ItemStack stack, final EntityLivingBase entity) { + ElectricItem.manager.chargeFromArmor(stack, entity); + } + + @Override + public String getToolTip(final ItemStack stack) { + return ElectricItem.manager.getToolTip(stack); + } + + @Override + public int receiveEnergy(final ItemStack container, final int maxReceive, final boolean simulate) + { + if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) { + final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); + if ((euCharge != 0) && (euCharge >= 1)){ + return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); + } + return 0; + } + int energy = container.stackTagCompound.getInteger("Energy"); + final int energyReceived = Math.min(this.capacity - energy, Math.min(this.maxReceive, maxReceive)); + if (!simulate) + { + energy += energyReceived; + container.stackTagCompound.setInteger("Energy", energy); + ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false); + ElectricItem.manager.charge(container, energy/rfPerEU, 3, true, false); + + } + return energyReceived; + } + + @Override + public int extractEnergy(final ItemStack container, final int maxExtract, final boolean simulate) + { + if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) { + final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); + if ((euCharge != 0) && (euCharge >= 1)){ + return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); + } + return 0; + } + int energy = container.stackTagCompound.getInteger("Energy"); + final int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract)); + if (!simulate) + { + energy -= energyExtracted; + container.stackTagCompound.setInteger("Energy", energy); + ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false); + ElectricItem.manager.charge(container, energy/rfPerEU, 3, true, false); + } + return energyExtracted; + } + + @Override + public int getEnergyStored(final ItemStack container) + { + if ((container.stackTagCompound == null) || (!container.stackTagCompound.hasKey("Energy"))) { + final double euCharge = this.getCharge(ItemUtils.getSimpleStack(this)); + if ((euCharge != 0) && (euCharge >= 1)){ + return (int) (MathUtils.decimalRoundingToWholes(euCharge*rfPerEU)); + } + return 0; + } + final int energy = container.stackTagCompound.getInteger("Energy"); + ElectricItem.manager.discharge(container, ElectricItem.manager.getCharge(container), 3, true, true, false); + ElectricItem.manager.charge(container, energy/rfPerEU, 3, true, false); + return energy; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/books/ItemBaseBook.java b/src/main/java/gtPlusPlus/core/item/general/books/ItemBaseBook.java new file mode 100644 index 0000000000..9ac09b92e4 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/books/ItemBaseBook.java @@ -0,0 +1,130 @@ +package gtPlusPlus.core.item.general.books; + +import static gtPlusPlus.core.handler.BookHandler.mBookMap; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemWritableBook; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.handler.BookHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class ItemBaseBook extends ItemWritableBook{ + + public ItemBaseBook(){ + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setMaxStackSize(1); + this.setTextureName(CORE.MODID+":"+"itemBook"); + this.setUnlocalizedName("itembookgt"); + GameRegistry.registerItem(this, "bookGT"); + + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < BookHandler.mBookMap.size(); i ++) { + ItemStack bookstack = new ItemStack(item, 1, i); + + /*bookstack = Utils.getWrittenBook( + bookstack, + i, + mBookMap.get(i).mMapping, + mBookMap.get(i).mTitle, + mBookMap.get(i).mAuthor, + mBookMap.get(i).mPages);*/ + + NBTUtils.createIntegerTagCompound(bookstack, "stats", "mMeta", i); + list.add(bookstack); + } + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + if (NBTUtils.hasKey(tItem, "title")){ + return NBTUtils.getString(tItem, "title"); + } + else if (tItem.getItemDamage() > -1 && tItem.getItemDamage() <= mBookMap.size()){ + return EnumChatFormatting.ITALIC+""+mBookMap.get(tItem.getItemDamage()).mTitle; + } + //NBTUtils.tryIterateNBTData(tItem); + return "GT++ Storybook"; + } + + @Override + public void addInformation(ItemStack tItem, EntityPlayer player, List list, boolean bool) { + // TODO Auto-generated method stub + if (NBTUtils.hasKey(tItem, "author")){ + list.add(EnumChatFormatting.GRAY+"Author: "+NBTUtils.getString(tItem, "author")); + } + else if (mBookMap.get(tItem.getItemDamage()).mAuthor != null){ + list.add(EnumChatFormatting.WHITE+"Author: "+mBookMap.get(tItem.getItemDamage()).mAuthor); + } + if (NBTUtils.hasKey(tItem, "title")){ + list.add(EnumChatFormatting.GRAY+"Pages: "+NBTUtils.getString(tItem, "pages")); + } + else if (mBookMap.get(tItem.getItemDamage()).mPages != null){ + list.add(EnumChatFormatting.WHITE+"Pages: "+mBookMap.get(tItem.getItemDamage()).mPages.length); + } + //super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { + //player.displayGUIBook(item); + int i = item.getItemDamage(); + ItemStack bookstack = Utils.getWrittenBook( + null, + mBookMap.get(i).mMeta, + mBookMap.get(i).mMapping, + mBookMap.get(i).mTitle, + mBookMap.get(i).mAuthor, + mBookMap.get(i).mPages); + + if (player.worldObj.isRemote){ + try { + Class clazz = ReflectionUtils.getClass("net.minecraft.client.gui.GuiScreenBook"); + Constructor ctor = clazz.getConstructor(EntityPlayer.class, ItemStack.class, boolean.class); + Object object = ctor.newInstance(new Object[] { player, bookstack, false }); + Minecraft.getMinecraft().displayGuiScreen((GuiScreen) object); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(player, bookstack, false)); + } + return item; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java b/src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java new file mode 100644 index 0000000000..a95fab4b6c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java @@ -0,0 +1,246 @@ +package gtPlusPlus.core.item.general.capture; + +import java.util.List; +import java.util.UUID; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.*; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.api.interfaces.IEntityCatcher; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class ItemEntityCatcher extends Item implements IEntityCatcher { + + // PlayerInteractEvent.EntityInteract; + + + public ItemEntityCatcher() { + //Probably won't ever need this event handler. + //Utils.registerEvent(this); + this.setUnlocalizedName("itemDragonJar"); + this.setTextureName(CORE.MODID + ":" + getUnlocalizedName()); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setMaxStackSize(16); + this.setMaxDamage(0); + GameRegistry.registerItem(this, getUnlocalizedName()); + } + + @Override + public boolean hasEntity(ItemStack aStack) { + if (NBTUtils.hasKey(aStack, "mHasEntity")) { + return NBTUtils.getBoolean(aStack, "mHasEntity"); + } + return false; + } + + @Override + public Entity getStoredEntity(World aWorld, ItemStack aStack) { + if (aStack == null || !hasEntity(aStack)) { + Logger.INFO("Cannot get stored entity."); + return null; + } + + Entity mEntityToSpawn; + int mEntityID; + Logger.WARNING("getStoredEntity(1)"); + + mEntityID = NBTUtils.getInteger(aStack, "mEntityID"); + mEntityToSpawn = EntityList.createEntityByID(mEntityID, aWorld); + if (mEntityToSpawn != null) { + Logger.WARNING("getStoredEntity(2)"); + return mEntityToSpawn; + } + + Logger.INFO("Failed to get stored entity. - getStoredEntity()"); + return null; + } + + @Override + public boolean setStoredEntity(World aWorld, ItemStack aStack, Entity aEntity) { + if (aEntity == null) { + NBTUtils.setBoolean(aStack, "mHasEntity", false); + Logger.INFO("Bad Entity being stored."); + return false; + } + + Logger.WARNING("setStoredEntity(1)"); + + NBTTagCompound mEntityData; + Class mEntityClass; + String mClassName; + String mEntityName; + int mEntityID, mEntityHashcode; + UUID mUuidPersistent, mUuidUnique; + Logger.WARNING("setStoredEntity(2)"); + + mEntityData = aEntity.getEntityData(); + mEntityClass = aEntity.getClass(); + mClassName = mEntityClass.getName(); + mEntityName = aEntity.getCommandSenderName(); + // mEntityID = aEntity.getEntityId(); + mEntityID = EntityList.getEntityID(aEntity); + mEntityHashcode = aEntity.hashCode(); + mUuidPersistent = aEntity.getPersistentID(); + mUuidUnique = aEntity.getUniqueID(); + Logger.WARNING("setStoredEntity(3)"); + + NBTUtils.createTagCompound(aStack, "mEntityData", mEntityData); + NBTUtils.setString(aStack,"mEntityName", mEntityName); + NBTUtils.setInteger(aStack,"mEntityID", mEntityID); + NBTUtils.setString(aStack,"mClassName", mClassName); + NBTUtils.setString(aStack,"mUuidPersistent", mUuidPersistent.toString()); + NBTUtils.setString(aStack,"mUuidUnique", mUuidUnique.toString()); + NBTUtils.setInteger(aStack,"mEntityHashcode", mEntityHashcode); + NBTUtils.setBoolean(aStack,"mHasEntity", true); + Logger.WARNING("setStoredEntity(4)"); + return true; + } + + @SuppressWarnings("unchecked") + @Override + public Class getStoredEntityClass(ItemStack aStack) { + if (aStack == null || !hasEntity(aStack)) { + return null; + } + Class mEntityClass; + String mClassName; + mClassName = NBTUtils.getString(aStack, "mClassName"); + mEntityClass = (Class) ReflectionUtils.getClass(mClassName); + if (mEntityClass != null) { + return mEntityClass; + } + return null; + } + + @Override + public boolean spawnStoredEntity(World aWorld, ItemStack aStack, BlockPos aPos) { + if (aStack == null || !hasEntity(aStack)) { + Logger.INFO("Cannot release, either invalid Itemstack or no entity stored."); + return false; + } + + NBTTagCompound mEntityData = NBTUtils.getTagCompound(aStack, "mEntityData"); + + int mEntityID = NBTUtils.getInteger(aStack,"mEntityID"); + String mClassName = NBTUtils.getString(aStack,"mClassName"); + UUID mUuidPersistent = UUID.fromString(NBTUtils.getString(aStack,"mUuidPersistent")); + UUID mUuidUnique = UUID.fromString(NBTUtils.getString(aStack,"mUuidUnique")); + int mEntityHashcode = NBTUtils.getInteger(aStack,"mEntityHashcode"); + + EntityLiving mEntityToSpawn = (EntityLiving) getStoredEntity(aWorld, aStack); + Class mEntityClass = getStoredEntityClass(aStack); + + Logger.WARNING("spawnStoredEntity(1)"); + + if (mEntityToSpawn != null && mEntityClass != null) { + Logger.WARNING("spawnStoredEntity(2)"); + if (mEntityToSpawn.getEntityData() != mEntityData) { + Logger.WARNING("spawnStoredEntity(x)"); + NBTUtils.setEntityCustomData(mEntityToSpawn, mEntityData); + } + + mEntityToSpawn.setLocationAndAngles(aPos.xPos, aPos.yPos, aPos.zPos, aWorld.rand.nextFloat() * 360.0F, + 0.0F); + if (mEntityToSpawn != null) { + mEntityToSpawn.onSpawnWithEgg(null); + aWorld.spawnEntityInWorld(mEntityToSpawn); + Logger.WARNING("spawnStoredEntity(3)"); + } + if (mEntityToSpawn != null) { + mEntityToSpawn.playLivingSound(); + Logger.WARNING("spawnStoredEntity(4)"); + } + Logger.WARNING("spawnStoredEntity(5)"); + NBTUtils.setBoolean(aStack,"mHasEntity", false); + return true; + } + Logger.INFO("Failed to spawn stored entity. - spawnStoredEntity()"); + return false; + } + + @Override + public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + return super.onItemRightClick(aStack, aWorld, aPlayer); + } + + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + if (hasEntity(p_77624_1_)){ + String mName = NBTUtils.getString(p_77624_1_,"mEntityName"); + if (mName != null && !mName.equals("")){ + p_77624_3_.add(EnumChatFormatting.GRAY+"Contains a "+mName+"."); + } + } + else { + p_77624_3_.add(EnumChatFormatting.GRAY+"Does not contain anything."); + } + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side, + float xOffset, float yOffset, float zOffset) { + if (Utils.isServer()) { + Logger.WARNING("Trying to release (1)"); + if (NBTUtils.hasKey(itemstack,"mHasEntity") + && NBTUtils.getBoolean(itemstack,"mHasEntity")) { + Logger.WARNING("Trying to release (2)"); + boolean mDidSpawn = spawnStoredEntity(world, itemstack, new BlockPos(x, y+1, z, world)); + + if (!mDidSpawn){ + PlayerUtils.messagePlayer(player, "You failed to release a "+NBTUtils.getString(itemstack,"mEntityName")+"."); + } + + return mDidSpawn; + + } + } + return super.onItemUse(itemstack, player, world, x, y, z, side, xOffset, yOffset, zOffset); + + } + + @Override + public boolean itemInteractionForEntity(ItemStack aStack, EntityPlayer aPlayer, EntityLivingBase aEntity) { + if (Utils.isServer()) { + Logger.WARNING("Trying to catch (1)"); + if (!hasEntity(aStack)) { + Logger.WARNING("Trying to catch (2)"); + boolean mStored = setStoredEntity(aPlayer.worldObj, aStack, aEntity); + if (mStored) { + Logger.WARNING("Trying to catch (3)"); + aEntity.setDead(); + PlayerUtils.messagePlayer(aPlayer, "You have captured a "+NBTUtils.getString(aStack,"mEntityName")+" in the Jar."); + //NBTUtils.tryIterateNBTData(aStack); + } + } + } + return super.itemInteractionForEntity(aStack, aPlayer, aEntity); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + if (hasEntity(aStack)){ + return "Captured Dragon Jar"; + } + return "Dragon Capture Jar"; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java b/src/main/java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java new file mode 100644 index 0000000000..86c52cc048 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/chassis/ItemBoilerChassis.java @@ -0,0 +1,86 @@ +package gtPlusPlus.core.item.general.chassis; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class ItemBoilerChassis extends Item { + + public IIcon[] icons = new IIcon[1]; + + public ItemBoilerChassis() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemBoilerChassis"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "itemBoilerChassis"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[0]; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 3; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String itemName = "Advanced Boiler Chassis"; + String suffixName = ""; + if (tItem.getItemDamage() == 0){ + suffixName = " [Tier 1]"; + } + else if (tItem.getItemDamage() == 1){ + suffixName = " [Tier 2]"; + } + else if (tItem.getItemDamage() == 2){ + suffixName = " [Tier 3]"; + } + return (itemName+suffixName); + + } + + @Override //TODO + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + int meta = stack.getItemDamage(); + if (meta == 0){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(10,110,30); + } + else if (meta == 1){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); + } + else if (meta == 2){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200,85,40); + } + else if (meta == 3){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(255,100,50); + } + return HEX_OxFFFFFF; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java b/src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java new file mode 100644 index 0000000000..be1fdfc491 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoil.java @@ -0,0 +1,93 @@ +package gtPlusPlus.core.item.general.chassis; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class ItemDehydratorCoil extends Item { + + public IIcon[] icons = new IIcon[4]; + + public ItemDehydratorCoil() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemDehydratorCoil"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_0"); + this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_1"); + this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_2"); + this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoil_3"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 4; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String itemName = "Dehydrator Coil"; + String suffixName = ""; + if (tItem.getItemDamage() == 0){ + suffixName = " [EV]"; + } + else if (tItem.getItemDamage() == 1){ + suffixName = " [IV]"; + } + else if (tItem.getItemDamage() == 2){ + suffixName = " [LuV]"; + } + else if (tItem.getItemDamage() == 3){ + suffixName = " [ZPM]"; + } + return (itemName+suffixName); + + } + + /*@Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + int meta = stack.getItemDamage(); + if (meta == 0){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(10,110,30); + } + else if (meta == 1){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); + } + else if (meta == 2){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200,85,40); + } + else if (meta == 3){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(255,150,50); + } + return HEX_OxFFFFFF; + }*/ + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java b/src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java new file mode 100644 index 0000000000..99d4a139dd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/chassis/ItemDehydratorCoilWire.java @@ -0,0 +1,93 @@ +package gtPlusPlus.core.item.general.chassis; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class ItemDehydratorCoilWire extends Item { + + public IIcon[] icons = new IIcon[4]; + + public ItemDehydratorCoilWire() { + super(); + this.setHasSubtypes(true); + String unlocalizedName = "itemDehydratorCoilWire"; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public void registerIcons(IIconRegister reg) { + this.icons[0] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_0"); + this.icons[1] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_1"); + this.icons[2] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_2"); + this.icons[3] = reg.registerIcon(CORE.MODID + ":" + "dehydrator/itemDehydratorCoilWire_3"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 4; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String itemName = "Coil Wire"; + String suffixName = ""; + if (tItem.getItemDamage() == 0){ + suffixName = " [EV]"; + } + else if (tItem.getItemDamage() == 1){ + suffixName = " [IV]"; + } + else if (tItem.getItemDamage() == 2){ + suffixName = " [LuV]"; + } + else if (tItem.getItemDamage() == 3){ + suffixName = " [ZPM]"; + } + return (itemName+suffixName); + + } + +/* @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + int meta = stack.getItemDamage(); + if (meta == 0){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(10,110,30); + } + else if (meta == 1){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(150,180,35); + } + else if (meta == 2){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200,85,40); + } + else if (meta == 3){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(255,150,50); + } + return HEX_OxFFFFFF; + }*/ + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java b/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java new file mode 100644 index 0000000000..628fba9291 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java @@ -0,0 +1,223 @@ +package gtPlusPlus.core.item.general.fuelrods; + +import java.util.List; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class FuelRod_Base extends Item{ + + public int fuelRemaining = 0; + public int maximumFuel = 0; + public String fuelType = ""; + public float heat = 0; + public float maxHeat = this.getMaxHeat(); + public FuelRod_Base(final String unlocalizedName, final String type, final int fuelLeft, final int maxFuel) { + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(1); + this.setMaxDamage(maxFuel); + this.maximumFuel = maxFuel; + this.fuelRemaining = fuelLeft; + this.fuelType = type; + this.setCreativeTab(AddToCreativeTab.tabMachines); + } + + private float getMaxHeat(){ + float tempvar; + if (this.fuelType == "Thorium"){ + tempvar = 2500; + } + + else if (this.fuelType == "Uranium"){ + tempvar = 5000; + } + + else if (this.fuelType == "Plutonium"){ + tempvar = 10000; + } + + else { + tempvar = 5000; + } + return tempvar; + + } + + private void updateVars(final ItemStack stack){ + if (stack.stackTagCompound != null) { + this.heat = stack.stackTagCompound.getFloat("heat"); + this.fuelRemaining = stack.stackTagCompound.getInteger("fuelRemaining"); + } + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + Float NBT_Heat = this.heat; + Float NBT_MaxHeat = this.maxHeat; + int NBT_Fuel = this.fuelRemaining; + String NBT_Type= this.fuelType; + + if (stack.stackTagCompound != null) { + NBT_Heat = stack.stackTagCompound.getFloat("heat"); + NBT_MaxHeat = stack.stackTagCompound.getFloat("maxHeat"); + NBT_Fuel = stack.stackTagCompound.getInteger("fuelRemaining"); + NBT_Type = stack.stackTagCompound.getString("fuelType"); + } + + final String tempHeat = String.valueOf(NBT_Heat); + final String tempMaxHeat = String.valueOf(NBT_MaxHeat); + final String tempFuel = String.valueOf(NBT_Fuel); + final String formattedType = EnumChatFormatting.DARK_RED+NBT_Type+EnumChatFormatting.GRAY; + String formattedHeat = EnumChatFormatting.RED+tempHeat+EnumChatFormatting.GRAY; + final String formattedMaxHeat = EnumChatFormatting.RED+tempMaxHeat+EnumChatFormatting.GRAY; + String formattedFuelLeft = tempFuel+EnumChatFormatting.GRAY; + + final int tempMax = this.maximumFuel; + final float tempCurrentHeat = this.heat; + final int tempFuelLeft = this.fuelRemaining; + + //Fuel Usage Formatting + if (tempFuelLeft <= (this.maximumFuel/3)){ + formattedFuelLeft = EnumChatFormatting.RED+tempFuel+EnumChatFormatting.GRAY; + } + else if ((tempFuelLeft >= (this.maximumFuel/3)) && (tempFuelLeft <= ((this.maximumFuel/3)*2))){ + formattedFuelLeft = EnumChatFormatting.YELLOW+tempFuel+EnumChatFormatting.GRAY; + } + else if ((tempFuelLeft >= ((this.maximumFuel/3)*2)) && (tempFuelLeft <= this.maximumFuel)){ + formattedFuelLeft = EnumChatFormatting.GREEN+tempFuel+EnumChatFormatting.GRAY; + } + else { + formattedFuelLeft = EnumChatFormatting.GRAY+tempFuel+EnumChatFormatting.GRAY; + } + + //Heat Formatting + if ((tempCurrentHeat <= 200) && (tempCurrentHeat >= 0)){ + formattedHeat = EnumChatFormatting.GRAY+tempHeat+EnumChatFormatting.GRAY; + } + else if ((tempCurrentHeat <= (this.maxHeat/3)) && (tempCurrentHeat > 200)){ + formattedHeat = EnumChatFormatting.YELLOW+tempHeat+EnumChatFormatting.GRAY; + } + else if ((tempCurrentHeat >= (this.maxHeat/3)) && (tempMax < ((this.maxHeat/3)*2)) && (tempCurrentHeat != 0)){ + formattedHeat = EnumChatFormatting.GOLD+tempHeat+EnumChatFormatting.GRAY; + } + else if ((tempCurrentHeat >= ((this.maxHeat/3)*2)) && (tempMax <= this.maxHeat) && (tempCurrentHeat != 0)){ + formattedHeat = EnumChatFormatting.RED+tempHeat+EnumChatFormatting.GRAY; + } + else { + formattedHeat = EnumChatFormatting.BLUE+tempHeat+EnumChatFormatting.GRAY; + } + list.add(EnumChatFormatting.GRAY+"A "+formattedType+" Fuel Rod."); + list.add(EnumChatFormatting.GRAY+"Running at "+formattedHeat+"/"+formattedMaxHeat+" Kelvin."); + list.add(EnumChatFormatting.GRAY+"Fuel Remaining: "+formattedFuelLeft+"L."); + super.addInformation(stack, aPlayer, list, bool); + } + + public String getType(final ItemStack stack){ + if (stack.stackTagCompound != null){ + return stack.stackTagCompound.getString("fuelType"); + } + return this.fuelType; + } + + public int getFuelRemaining(final ItemStack stack){ + if (stack.stackTagCompound != null){ + return stack.stackTagCompound.getInteger("fuelRemaining"); + } + return 0; + } + + public int getMaxFuel(){ + return this.maximumFuel; + } + + public int getFuel(final ItemStack stack){ + if (stack != null){ + final int i = stack.getItemDamage(); + final int r = this.maximumFuel - i; + return r; + } + return 0; + } + + public boolean setFuelRemainingExplicitly(final int i){ + final int tempFuel = this.fuelRemaining; + this.fuelRemaining = i; + if (i != tempFuel){ + return true; + } + return false; + } + + public boolean addFuel(final int i){ + final int tempFuel = this.fuelRemaining; + this.fuelRemaining = tempFuel+i; + if (this.fuelRemaining != tempFuel){ + return true; + } + return false; + } + + public float getHeat(final ItemStack value){ + if (value.stackTagCompound != null){ + return value.stackTagCompound.getFloat("heat"); + } + return 0f; + } + + public boolean addHeat(final float i){ + final float tempFuel = this.heat; + this.heat = tempFuel+i; + if (this.heat != tempFuel){ + return true; + } + return false; + } + + + //Ticking and NBT Handling + /* Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and + * update it's contents. + * + * public int fuelRemaining = 0; + public int maximumFuel = 0; + public String fuelType = ""; + public float heat = 0; + public float maxHeat = 5000; + * + */ + @Override + public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) { + itemStack.stackTagCompound = new NBTTagCompound(); + itemStack.stackTagCompound.setInteger("fuelRemaining", this.getFuelRemaining(itemStack)); + itemStack.stackTagCompound.setInteger("maximumFuel", this.maximumFuel); + itemStack.stackTagCompound.setFloat("heat", this.getHeat(itemStack)); + itemStack.stackTagCompound.setFloat("maxHeat", this.getMaxHeat()); + itemStack.stackTagCompound.setString("fuelType", this.getType(itemStack)); + this.updateVars(itemStack); + } + + @Override + public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4, final boolean par5) { + itemStack.stackTagCompound = new NBTTagCompound(); + itemStack.stackTagCompound.setInteger("fuelRemaining", this.getFuelRemaining(itemStack)); + itemStack.stackTagCompound.setInteger("maximumFuel", this.maximumFuel); + itemStack.stackTagCompound.setFloat("heat", this.getHeat(itemStack)); + itemStack.stackTagCompound.setFloat("maxHeat", this.getMaxHeat()); + itemStack.stackTagCompound.setString("fuelType", this.getType(itemStack)); + this.updateVars(itemStack); + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java b/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java new file mode 100644 index 0000000000..dbf1209b50 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java @@ -0,0 +1,13 @@ +package gtPlusPlus.core.item.general.fuelrods; + +public class FuelRod_Thorium extends FuelRod_Base{ + + public FuelRod_Thorium(final String unlocalizedName, final String type, final int fuelLeft, final int maxFuel) { + super(unlocalizedName, type, fuelLeft, maxFuel); + this.setMaxDamage(maxFuel); + this.maximumFuel = maxFuel; + this.fuelRemaining = fuelLeft; + this.fuelType = type; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java b/src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java new file mode 100644 index 0000000000..238e765384 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java @@ -0,0 +1,84 @@ +package gtPlusPlus.core.item.general.rfchargingpack; + +import java.util.List; + +import cofh.api.energy.ItemEnergyContainer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.util.math.MathUtils; + +public class ChargingPackBase extends ItemEnergyContainer { + + protected final int mCapacityMax; + protected final byte mTier; + + public ChargingPackBase(byte tier) { + this(tier, (tier == 1 ? 4000000 : tier == 2 ? 8000000 : tier == 3 ? 16000000 : tier == 4 ? 32000000 : 64000000)); + } + + private ChargingPackBase(byte tier, int maxStorage) { + super(maxStorage); + mTier = tier; + mCapacityMax = maxStorage; + } + + public int getMaxEnergyInput(ItemStack container) + { + return this.maxReceive; + } + + public int getMaxEnergyExtracted(ItemStack container) + { + return this.maxExtract; + } + + @Override + public void onUpdate(ItemStack aStack, World aWorld, Entity aEnt, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(aStack, aWorld, aEnt, p_77663_4_, p_77663_5_); + + ItemEnergyContainer current = this; + int currentStored = 0; + if (current != null) { + currentStored = current.getEnergyStored(aStack); + } + if (currentStored > 0) { + if (aEnt instanceof EntityPlayer) { + if (((EntityPlayer) aEnt).inventory != null) { + for (ItemStack invStack : ((EntityPlayer) aEnt).inventory.mainInventory) { + if (invStack != null) { + if (invStack.getItem() instanceof ItemEnergyContainer) { + if (current != null) { + currentStored = current.getEnergyStored(aStack); + if (currentStored > 0) { + int mTransLimit; + int mMaxStorage; + int mCurrent; + mTransLimit = getMaxEnergyInput(invStack); + mMaxStorage = current.getMaxEnergyStored(invStack); + mCurrent = current.getEnergyStored(invStack); + if (mCurrent+mTransLimit <= mMaxStorage) { + current.extractEnergy(aStack, current.receiveEnergy(invStack, mTransLimit, false), false); + } + } + } + } + } + } + } + } + } + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) { + list.add(EnumChatFormatting.RED+"RF Information"); + list.add(EnumChatFormatting.GRAY+"Extraction Rate: [" +EnumChatFormatting.RED+ this.maxExtract + EnumChatFormatting.GRAY + "Rf/t]" + " Insert Rate: [" +EnumChatFormatting.RED+ this.maxReceive+EnumChatFormatting.GRAY+"Rf/t]"); + list.add(EnumChatFormatting.GRAY+"Current Charge: ["+EnumChatFormatting.RED+this.getEnergyStored(stack) + EnumChatFormatting.GRAY + "Rf / " + this.getMaxEnergyStored(stack)+"Rf] "+EnumChatFormatting.RED+MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack))+EnumChatFormatting.GRAY+"%"); + super.addInformation(stack, p_77624_2_, list, p_77624_4_); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java b/src/main/java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java new file mode 100644 index 0000000000..727b933fa7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/spawn/ItemCustomSpawnEgg.java @@ -0,0 +1,285 @@ +package gtPlusPlus.core.item.general.spawn; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.*; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.*; +import net.minecraft.util.*; +import net.minecraft.world.World; + +public class ItemCustomSpawnEgg extends ItemMonsterPlacer { + + private static final HashMap mIconMap = new HashMap(); + private static int mTotalMetaItems = 0; + + private static final HashMap mMaxStackSizeMap = new HashMap(); + private static final HashMap mRarityMap = new HashMap(); + private static final HashMap> mOreDictNames = new HashMap>(); + + private static final HashMap mColourBaseMap = new HashMap(); + private static final HashMap mColourSpotsMap = new HashMap(); + private static final HashMap mEntityNameMap = new HashMap(); + private static final HashMap mEntityFullNameMap = new HashMap(); + + private static final HashMap mReverseEntityMap = new HashMap(); + + protected EntityLiving entityToSpawn = null; + + public static ItemStack getSpawnEggForEntityname(String aEntityName, int aSize) { + return ItemUtils.simpleMetaStack(ModItems.itemCustomSpawnEgg, mReverseEntityMap.get(aEntityName), aSize); + } + + public static void registerEntityForSpawnEgg(final int aMetaID, String parEntityToSpawnName, int aPrimaryColor, int aSecondaryColor) { + registerEntityForSpawnEgg(aMetaID, parEntityToSpawnName, aPrimaryColor, aSecondaryColor, EnumRarity.common, new ArrayList()); + } + + public static void registerEntityForSpawnEgg(final int aMetaID, String parEntityToSpawnName, int aPrimaryColor, int aSecondaryColor, EnumRarity aRarity, final ArrayList aOreDictNames) { + mTotalMetaItems++; + mMaxStackSizeMap.put(aMetaID, 64); + mRarityMap.put(aMetaID, aRarity); + mOreDictNames.put(aMetaID, aOreDictNames); + mColourBaseMap.put(aMetaID, aPrimaryColor); + mColourSpotsMap.put(aMetaID, aSecondaryColor); + mReverseEntityMap.put(parEntityToSpawnName, aMetaID); + setEntityToSpawnName(aMetaID, parEntityToSpawnName); + } + + public static void registerEggsToOreDict() { + for (int aMetaID = 0; aMetaID < mTotalMetaItems; aMetaID++) { + ArrayList aOreDictNames = mOreDictNames.get(aMetaID); + if (aOreDictNames != null && !aOreDictNames.isEmpty()) { + ItemStack aFoodStack = ItemUtils.simpleMetaStack(ModItems.itemCustomSpawnEgg, aMetaID, 1 + ); + for (String aOreName : aOreDictNames) { + ItemUtils.addItemToOreDictionary(aFoodStack, aOreName); + } + } + } + } + + public ItemCustomSpawnEgg() { + super(); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + this.setUnlocalizedName("BasicMetaSpawnEgg"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + } + + /** + * Callback for item usage. If the item does something special on right + * clicking, + * + * he will have one of those. Return True if something happen and false if + * it don't. This is for ITEMS, not BLOCKS + */ + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){ + if (par3World.isRemote) { + return true; + } + else { + Block block = par3World.getBlock(par4, par5, par6); + par4 += Facing.offsetsXForSide[par7]; + par5 += Facing.offsetsYForSide[par7]; + par6 += Facing.offsetsZForSide[par7]; + double d0 = 0.0D; + + if (par7 == 1 && block.getRenderType() == 11) { + d0 = 0.5D; + } + + Entity entity = spawnEntity(par1ItemStack, par3World, par4 + 0.5D, par5 + d0, par6 + 0.5D); + + if (entity != null) { + if (entity instanceof EntityLivingBase + && par1ItemStack.hasDisplayName()) { + ((EntityLiving) entity).setCustomNameTag( + par1ItemStack.getDisplayName() + ); + } + + if (!par2EntityPlayer.capabilities.isCreativeMode) { + --par1ItemStack.stackSize; + } + } + + return true; + } + } + + /** + * Called whenever this item is equipped and the right mouse button is + * pressed. + * + * Args: itemStack, world, entityPlayer + */ + @Override + public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + if (par2World.isRemote) { + return par1ItemStack; + } + else { + MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); + + if (movingobjectposition == null) { + return par1ItemStack; + } + else { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!par2World.canMineBlock(par3EntityPlayer, i, j, k)) { + return par1ItemStack; + } + + if (!par3EntityPlayer.canPlayerEdit( + i, j, k, movingobjectposition + + .sideHit, par1ItemStack + )) { + return par1ItemStack; + } + + if (par2World.getBlock(i, j, k) instanceof BlockLiquid) { + Entity entity = spawnEntity(par1ItemStack, par2World, i, j, k); + + if (entity != null) { + if (entity instanceof EntityLivingBase + && par1ItemStack + + .hasDisplayName()) { + ((EntityLiving) entity).setCustomNameTag( + par1ItemStack + + .getDisplayName() + ); + } + + if (!par3EntityPlayer.capabilities.isCreativeMode) { + --par1ItemStack.stackSize; + } + } + } + } + + return par1ItemStack; + } + } + } + + /** + * Spawns the creature specified by the egg's type in the location specified + * by + * + * the last three parameters. Parameters: world, entityID, x, y, z. + * @param par1ItemStack + */ + public Entity spawnEntity(ItemStack par1ItemStack, World parWorld, double parX, double parY, double parZ) { + + if (!parWorld.isRemote) // never spawn entity on client side + { + int aDamage = par1ItemStack.getItemDamage(); + String entityToSpawnNameFull = mEntityFullNameMap.get(aDamage); + String entityToSpawnName = mEntityNameMap.get(aDamage); + //entityToSpawnNameFull = WildAnimals.MODID + "." + entityToSpawnName; + if (EntityList.stringToClassMapping.containsKey(entityToSpawnNameFull)) { + entityToSpawn = (EntityLiving) EntityList.createEntityByName(entityToSpawnNameFull, parWorld); + entityToSpawn.setLocationAndAngles(parX, parY, parZ, MathHelper.wrapAngleTo180_float(parWorld.rand.nextFloat() * 360.0F), 0.0F); + parWorld.spawnEntityInWorld(entityToSpawn); + entityToSpawn.onSpawnWithEgg((IEntityLivingData) null); + entityToSpawn.playLivingSound(); + } + else { + // DEBUG + System.out.println("Entity not found " + entityToSpawnName); + } + } + + return entityToSpawn; + } + + /** + * returns a list of items with the same ID, but different meta (eg: dye + * returns 16 items) + */ + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + for (int aMeta : mReverseEntityMap.values()) { + aList.add(ItemUtils.simpleMetaStack(aItem, aMeta, 1)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack par1ItemStack, int parColorType) { + int aID = par1ItemStack.getItemDamage(); + return (parColorType == 0) ? mColourBaseMap.get(aID) : mColourSpotsMap.get(aID); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + // Doing this override means that there is no localization for language + // unless you specifically check for localization here and convert + public String getItemStackDisplayName(ItemStack par1ItemStack) { + return "Spawn " + mEntityNameMap.get(par1ItemStack.getItemDamage()); + } + + + @Override + public void registerIcons(final IIconRegister u) { + mIconMap.put(0, u.registerIcon(CORE.MODID + ":" + "spawn_egg")); + mIconMap.put(1, u.registerIcon(CORE.MODID + ":" + "spawn_egg_overlay")); + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int renderPass) { + return mIconMap.get(renderPass); + } + + @Override + public IIcon getIconFromDamage(int damage) { + return getIconFromDamageForRenderPass(0, 0); + } + + @Override + public IIcon getIcon(ItemStack aStack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + return getIconFromDamageForRenderPass(0, renderPass); + } + + @Override + public IIcon getIcon(ItemStack aStack, int renderPass) { + return getIconFromDamageForRenderPass(0, renderPass); + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return super.getUnlocalizedName() + "." + stack.getItemDamage(); + } + + public static void setEntityToSpawnName(int aMetaID, String parEntityToSpawnName) { + mEntityNameMap.put(aMetaID, parEntityToSpawnName); + mEntityFullNameMap.put(aMetaID, CORE.MODID + "." + parEntityToSpawnName); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java new file mode 100644 index 0000000000..57cf8986fa --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.item.general.throwables; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion; +import gtPlusPlus.core.item.base.CoreItem; + +public class ItemHydrofluoricAcidPotion extends CoreItem { + + public ItemHydrofluoricAcidPotion(String unlocalizedName, String displayName, String description) { + super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, new String[] {description}, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); + } + + @Override + public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { + if (!player.capabilities.isCreativeMode) { + --item.stackSize; + } + world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityHydrofluoricAcidPotion(world, player)); + } + return item; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java new file mode 100644 index 0000000000..27b35e48d1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.item.general.throwables; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; +import gtPlusPlus.core.item.base.CoreItem; + +public class ItemSulfuricAcidPotion extends CoreItem { + + public ItemSulfuricAcidPotion(String unlocalizedName, String displayName, String description) { + super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, new String[] {description}, EnumRarity.common, EnumChatFormatting.GRAY, false, null); + } + + @Override + public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { + if (!player.capabilities.isCreativeMode) { + --item.stackSize; + } + world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntitySulfuricAcidPotion(world, player)); + } + return item; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java new file mode 100644 index 0000000000..e8f76ce64c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/throwables/ItemThrowableBomb.java @@ -0,0 +1,124 @@ +package gtPlusPlus.core.item.general.throwables; + +import java.util.List; + +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.entity.projectile.EntityThrowableBomb; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemThrowableBomb extends CoreItem { + + private static AutoMap mLighters = new AutoMap(); + public static IIcon[] icons = new IIcon[10]; + + public ItemThrowableBomb() { + super("gtpp.throwable.bomb", "Bomb", AddToCreativeTab.tabMisc, 16, 0, new String[] {"Just like Bomberman", "Have a fire source in inventory to prime"}, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); + this.setHasSubtypes(true); + } + + @Override + public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { + + if (mLighters.isEmpty()) { + mLighters.put(ItemUtils.getSimpleStack(Items.flint_and_steel)); + mLighters.put(ItemList.Tool_Lighter_Invar_Full.get(1)); + mLighters.put(ItemList.Tool_Lighter_Invar_Used.get(1)); + mLighters.put(ItemList.Tool_Lighter_Platinum_Full.get(1)); + mLighters.put(ItemList.Tool_Lighter_Platinum_Used.get(1)); + mLighters.put(ItemUtils.getSimpleStack(ModItems.itemBasicFireMaker)); + } + + //Unlit + if (item.getItemDamage() == 0) { + boolean hasLighter = false; + for (ItemStack aPlaySlot : player.inventory.mainInventory) { + if (aPlaySlot != null) { + for (ItemStack aLighter : mLighters) { + if (GT_Utility.areStacksEqual(aPlaySlot, aLighter) || (aPlaySlot.getItem() instanceof MetaGeneratedGregtechTools && aPlaySlot.getItemDamage() == MetaGeneratedGregtechTools.ELECTRIC_LIGHTER)) { + hasLighter = true; + break; + } + } + } + } + if (hasLighter) { + item.setItemDamage(1); + } + } + //Lit + else if (item.getItemDamage() == 1) { + if (!player.capabilities.isCreativeMode) { + --item.stackSize; + } + world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); + if (!world.isRemote) { + world.spawnEntityInWorld(new EntityThrowableBomb(world, player)); + } + /*if (item.stackSize <= 0) { + item = null; + }*/ + } + return item; + } + + + + @Override + public void registerIcons(IIconRegister reg) { + icons[0] = reg.registerIcon(CORE.MODID + ":" + "bomb"); + icons[1] = reg.registerIcon(CORE.MODID + ":" + "bomb_lit"); + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[meta]; + } + + @SuppressWarnings({ "unchecked" }) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 2; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { + String aLitStatus = "unlit"; + if (stack.getItemDamage() == 0) { + aLitStatus = EnumChatFormatting.BLUE+"Unlit"; + } + else if (stack.getItemDamage() == 1) { + aLitStatus = EnumChatFormatting.RED+"Lit"; + } + list.add(EnumChatFormatting.GOLD+"Fuse Status: "+aLitStatus); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public String getItemStackDisplayName(ItemStack p_77653_1_) { + // TODO Auto-generated method stub + return super.getItemStackDisplayName(p_77653_1_); + } + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java b/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java new file mode 100644 index 0000000000..e5c403c503 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/init/ItemsFoods.java @@ -0,0 +1,80 @@ +package gtPlusPlus.core.item.init; + +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.base.foods.BaseItemFood; +import gtPlusPlus.core.item.base.foods.BaseItemHotFood; +import gtPlusPlus.core.item.food.BaseItemMetaFood; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntityOcelot; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; + +public class ItemsFoods { + + public static void load(){ + run(); + } + + private static void run(){ + + //Raisin Bread + ModItems.itemIngotRaisinBread = new BaseItemFood("itemIngotRaisinBread", "Raisin Bread", 3, 1.5f, false, new PotionEffect(Potion.weakness.id, 40, 1)).setAlwaysEdible(); + GT_OreDictUnificator.registerOre("foodRaisinBread", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemIngotRaisinBread", 1)); + //Hot Raisin Bread + ModItems.itemHotIngotRaisinBread = new BaseItemHotFood("itemHotIngotRaisinBread", 1, 0.5f, "Raisin Bread", 120, ModItems.itemIngotRaisinBread); + GT_OreDictUnificator.registerOre("foodHotRaisinBread", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemHotIngotRaisinBread", 1)); + + //Raisin Bread + ModItems.itemFoodRaisinToast = new BaseItemFood("itemFoodRaisinToast", "Raisin Toast", 1, 0.5f, false).setAlwaysEdible(); + GT_OreDictUnificator.registerOre("foodRaisinToast", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemFoodRaisinToast", 1)); + //Hot Raisin Bread + ModItems.itemHotFoodRaisinToast = new BaseItemHotFood("itemHotFoodRaisinToast", 1, 0.5f, "Raisin Toast", 20, ModItems.itemFoodRaisinToast); + GT_OreDictUnificator.registerOre("foodHotRaisinToast", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemHotFoodRaisinToast", 1)); + + //Raisin Bread + ModItems.itemFoodCurriedSausages = new BaseItemFood("itemFoodCurriedSausages", "Curried Sausages", 5, 2f, false); + GT_OreDictUnificator.registerOre("foodCurriedSausages", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemFoodCurriedSausages", 1)); + //Hot Raisin Bread + ModItems.itemHotFoodCurriedSausages = new BaseItemHotFood("itemHotFoodCurriedSausages", 1, 0.5f, "Curried Sausages", 240, ModItems.itemFoodCurriedSausages); + GT_OreDictUnificator.registerOre("foodHotCurriedSausages", ItemUtils.getItemStackFromFQRN(CORE.MODID+":itemHotFoodCurriedSausages", 1)); + + ModItems.itemMetaFood = new BaseItemMetaFood(); + BaseItemMetaFood.registerFoodsToOreDict(); + addCookingRecipes(); + addFoodDropsToMobs(); + + } + + private static ItemStack getMetaFoodStack(int aID) { + return ItemUtils.simpleMetaStack(ModItems.itemMetaFood, aID, 1); + } + + private static void addCookingRecipes() { + + RecipeUtils.addSmeltingRecipe(getMetaFoodStack(0), getMetaFoodStack(1), 0.4F); + RecipeUtils.addSmeltingRecipe(getMetaFoodStack(2), getMetaFoodStack(3), 0.35F); + RecipeUtils.addSmeltingRecipe(getMetaFoodStack(4), getMetaFoodStack(5), 0.35F); + RecipeUtils.addSmeltingRecipe(getMetaFoodStack(6), getMetaFoodStack(7), 0.35F); + + } + + private static void addFoodDropsToMobs() { + + EntityUtils.registerDropsForMob(EntityVillager.class, getMetaFoodStack(0), 2, 1500); + EntityUtils.registerDropsForMob(EntityHorse.class, getMetaFoodStack(2), 4, 4000); + EntityUtils.registerDropsForMob(EntityWolf.class, getMetaFoodStack(4), 2, 4000); + EntityUtils.registerDropsForMob(EntityOcelot.class, getMetaFoodStack(6), 2, 4000); + EntityUtils.registerDropsForMob(EntityBlaze.class, getMetaFoodStack(8), 1, 500); + + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java b/src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java new file mode 100644 index 0000000000..9f87408b56 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java @@ -0,0 +1,74 @@ +package gtPlusPlus.core.item.init; + +import gregtech.api.enums.Materials; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class ItemsMultiTools { + + public static void load(){ + run(); + } + + private static void run(){ + + //Load Multitools + final boolean gtStyleTools = LoadedMods.Gregtech; + if (CORE.ConfigSwitches.enableMultiSizeTools){ + + //GT Materials + final Materials[] rm = Materials.values(); + for (final Materials m : rm){ + toolFactoryGT(m, gtStyleTools); + } + + //GT++ Materials + toolFactory(ALLOY.HASTELLOY_C276); + toolFactory(ALLOY.HASTELLOY_N); + toolFactory(ALLOY.HASTELLOY_W); + toolFactory(ALLOY.HASTELLOY_X); + toolFactory(ALLOY.INCOLOY_020); + toolFactory(ALLOY.INCOLOY_DS); + toolFactory(ALLOY.INCOLOY_MA956); + toolFactory(ALLOY.INCONEL_625); + toolFactory(ALLOY.INCONEL_690); + toolFactory(ALLOY.INCONEL_792); + toolFactory(ALLOY.LEAGRISIUM); + toolFactory(ALLOY.TANTALLOY_60); + toolFactory(ALLOY.TANTALLOY_61); + toolFactory(ALLOY.STABALLOY); + toolFactory(ALLOY.QUANTUM); + //toolFactory(ALLOY.BEDROCKIUM); + toolFactory(ALLOY.POTIN); + toolFactory(ALLOY.TUMBAGA); + toolFactory(ALLOY.TALONITE); + toolFactory(ALLOY.STELLITE); + toolFactory(ALLOY.TUNGSTEN_CARBIDE); + toolFactory(ALLOY.TANTALUM_CARBIDE); + + + } + + } + + + private static boolean toolFactoryGT(final Materials m, final boolean b){ + ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(b, m); + ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(b, m); + return true; + } + + private static boolean toolFactory(final Material m){ + Logger.WARNING("Generating Multi-Tools for "+m.getLocalizedName()); + ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(m); + ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(m); + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/materials/DustDecayable.java b/src/main/java/gtPlusPlus/core/item/materials/DustDecayable.java new file mode 100644 index 0000000000..d42ac85012 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/materials/DustDecayable.java @@ -0,0 +1,97 @@ +package gtPlusPlus.core.item.materials; + +import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.core.handler.Recipes.DecayableRecipe; +import gtPlusPlus.core.item.base.BaseItemTickable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class DustDecayable extends BaseItemTickable { + + private final Item turnsIntoItem; + private final int radLevel; + + public DustDecayable(String unlocal, int colour, int maxTicks, String[] desc1, Item turnsInto, int radLevel) { + super(true, true, unlocal, colour, (maxTicks/1), desc1); + this.turnsIntoItem = turnsInto; + this.radLevel = radLevel; + GT_OreDictUnificator.registerOre(unlocal, ItemUtils.getSimpleStack(this)); + new DecayableRecipe(maxTicks, getSimpleStack(this), getSimpleStack(turnsInto)); + } + + @Override + public void registerIcons(IIconRegister reg) { + String gt = "gregtech" + ":" + "materialicons/"+"NUCLEAR"+"/" + "dust"; + this.mIcon[0] = reg.registerIcon(gt); + String gt2 = "gregtech" + ":" + "materialicons/"+"NUCLEAR"+"/" + "dust" + "_OVERLAY"; + this.mIcon[1] = reg.registerIcon(gt2); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + super.addInformation(stack, player, list, bool); + if (this.radLevel > 0) { + list.add(CORE.GT_Tooltip_Radioactive); + } + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (world == null || iStack == null) { + return; + } + if (world.isRemote) { + return; + } + + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.radLevel, world, entityHolding); + } + } + boolean a1, a2; + + a1 = this.isTicking(world, iStack); + a2 = tickItemTag(world, iStack); + + if (!a1 && !a2) { + if (entityHolding instanceof EntityPlayer){ + ItemStack replacement = ItemUtils.getSimpleStack(getDecayResult()); + //Logger.INFO("Replacing "+iStack.getDisplayName()+" with "+replacement.getDisplayName()+"."); + final ItemStack tempTransform = replacement; + if (iStack.stackSize > 1){ + int u = iStack.stackSize; + tempTransform.stackSize = u; + ((EntityPlayer) entityHolding).inventory.addItemStackToInventory((tempTransform)); + for (int l=0;l mTotalIndex = new HashSet(); + + Set mFirstSearch = new HashSet(); + Set mSearch_A = new HashSet(); + + Set mSearch_B = new HashSet(); + Set mSearch_C = new HashSet(); + Set mSearch_D = new HashSet(); + + mFirstSearch.add(mStartPoint); + mTotalIndex.add(mStartPoint); + + + + + for (BlockPos G : mSearch_D) { + if (!world.isAirBlock(G.xPos, G.yPos, G.zPos)) { + world.setBlock(G.xPos, G.yPos, G.zPos, Blocks.diamond_ore); + } + } + + + + return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ); + } + + public Set getValidNeighboursForSet(Set set){ + Set results = set; + for (BlockPos F : set) { + results.addAll(F.getValidNeighboursAndSelf()); + } + return results; + } + + public Set getExtraNeighboursForSet(Set set){ + Set results = set; + for (BlockPos F : set) { + results.addAll(F.getValidNeighboursAndSelf()); + } + return results; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + // TODO Auto-generated method stub + return super.onItemRightClick(p_77659_1_, p_77659_2_, p_77659_3_); + } + + + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/DebugScanner.java b/src/main/java/gtPlusPlus/core/item/tool/misc/DebugScanner.java new file mode 100644 index 0000000000..0170df0dc7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/DebugScanner.java @@ -0,0 +1,104 @@ +package gtPlusPlus.core.item.tool.misc; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class DebugScanner extends CoreItem { + + public DebugScanner() { + super("gtpp.debug.scanner", AddToCreativeTab.tabTools, 1, 0, + new String[] { + "Used to obtain information from GT/GT++ content", + "Right Click to use", + }, + EnumRarity.epic); + setTextureName(CORE.MODID + ":itemStickyRubber"); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int p_77648_4_, + int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { + // TODO Auto-generated method stub + return super.onItemUse(aStack, aPlayer, aWorld, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_8_, + p_77648_9_, p_77648_10_); + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + // TODO Auto-generated method stub + return super.onItemRightClick(p_77659_1_, p_77659_2_, p_77659_3_); + } + + @Override + public float getDigSpeed(ItemStack itemstack, Block block, int metadata) { + return 0f; + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { + if (entity != null && player != null) { + PlayerUtils.messagePlayer(player, "Entity ID: "+entity.getEntityId()); + PlayerUtils.messagePlayer(player, "UUID: "+entity.getUniqueID()); + PlayerUtils.messagePlayer(player, "Invulnerable? "+entity.isEntityInvulnerable()); + PlayerUtils.messagePlayer(player, "Invisible? "+entity.isInvisible()); + PlayerUtils.messagePlayer(player, "Age: "+entity.ticksExisted); + + if (entity instanceof EntityLivingBase) { + EntityLivingBase g = (EntityLivingBase) entity; + PlayerUtils.messagePlayer(player, "Health: "+g.getHealth()+"/"+g.getMaxHealth()); + PlayerUtils.messagePlayer(player, "On ground? "+g.onGround); + PlayerUtils.messagePlayer(player, "Child? "+g.isChild()); + } + if (entity instanceof EntityLiving) { + EntityLiving g = (EntityLiving) entity; + PlayerUtils.messagePlayer(player, "Can Loot? "+g.canPickUpLoot()); + + } + if (entity instanceof EntityPlayer) { + EntityPlayer y = (EntityPlayer) entity; + PlayerUtils.messagePlayer(player, "Experience: "+y.experience); + PlayerUtils.messagePlayer(player, "Name: "+y.getCommandSenderName()); + } + + } + return true; + } + + @Override + public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) { + return false; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return true; + } + + @Override + public int getHarvestLevel(ItemStack stack, String toolClass) { + return 0; + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java b/src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java new file mode 100644 index 0000000000..47856b44c0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java @@ -0,0 +1,74 @@ +package gtPlusPlus.core.item.tool.misc; + +import java.util.List; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.Materials; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class FakeGregtechTool extends CoreItem{ + + public final int componentColour; + public Object extraData; + + protected IIcon base[] = new IIcon[6]; + protected IIcon overlay[] = new IIcon[6]; + + public FakeGregtechTool() { + super("GregeriousT's Display Tool", AddToCreativeTab.tabTools, 1); + short[] tempCol = Materials.TungstenSteel.getRGBA(); + this.componentColour = Utils.rgbtoHexValue(tempCol[0], tempCol[1], tempCol[2]); + } + + @Override + public void registerIcons(final IIconRegister i) { + //ScrewDriver + this.base[0] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadScrewdriver"); + this.overlay[0] = i.registerIcon("gregtech" + ":" + "iconsets/" + "HANDLE_SCREWDRIVER"); + //Soldering iron + this.base[1] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadSoldering"); + this.overlay[1] = i.registerIcon("gregtech" + ":" + "iconsets/" + "HANDLE_SOLDERING"); + //Mallet + this.base[2] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "handleMallet"); + this.overlay[2] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadMallet"); + //Hammer + this.base[3] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "stick"); + this.overlay[3] = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "toolHeadHammer"); + //Wrench + this.base[4] = i.registerIcon("gregtech" + ":" + "iconsets/" + "WRENCH"); + this.overlay[4] = i.registerIcon("gregtech" + ":" + "iconsets/" + "WRENCH_OVERLAY"); + //Crowbar + this.base[5] = i.registerIcon("gregtech" + ":" + "iconsets/" + "CROWBAR"); + this.overlay[5] = i.registerIcon("gregtech" + ":" + "iconsets/" + "CROWBAR_OVERLAY"); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int renderPass) { + if (renderPass == 1){ + return Utils.rgbtoHexValue(230, 230, 230); + } + return this.componentColour; + } + + @Override + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 6; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java b/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java new file mode 100644 index 0000000000..e43dc8546b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/GregtechPump.java @@ -0,0 +1,1302 @@ +package gtPlusPlus.core.item.tool.misc; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.ArrayList; +import java.util.BitSet; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import ic2.api.item.IElectricItemManager; +import ic2.api.item.ISpecialElectricItem; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidContainerItem; +import net.minecraftforge.fluids.IFluidHandler; +import net.minecraftforge.fluids.IFluidTank; + +public class GregtechPump extends Item implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { + + /** + * Right Click Functions + */ + + @Override + public boolean onItemUse(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int a4, + float p_77648_8_, float p_77648_9_, float p_77648_10_) { + if (aStack == null || aPlayer == null || aWorld == null || aWorld.isRemote) { + return false; + } + if (!aWorld.isRemote && tryDrainTile(aStack, aWorld, aPlayer, aX, aY, aZ)) { + return true; + } else { + //return super.onItemUse(aStack, aPlayer, aWorld, aX, aY, aZ, a4, p_77648_8_, p_77648_9_, p_77648_10_); + return false; + } + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + return p_77659_1_; + } + + /** + * GT Code + */ + + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + private final HashMap>> mItemBehaviors = new HashMap<>(); + public final short mOffset, mItemAmount; + public final BitSet mEnabledItems; + public final BitSet mVisibleItems; + /** The unlocalized name of this item. */ + private String unlocalizedName; + + private final HashMap mIconMap = new LinkedHashMap(); + private final HashMap rarity = new LinkedHashMap(); + private final HashMap descColour = new LinkedHashMap(); + private final HashMap itemName = new LinkedHashMap(); + private final HashMap itemDescription = new LinkedHashMap(); + private final HashMap hasEffect = new LinkedHashMap(); + + public final HashMap mElectricStats = new LinkedHashMap(); + public final HashMap mBurnValues = new LinkedHashMap(); + + public void registerPumpType(final int aID, final String aPumpName, final int aEuMax, final int aTier) { + ModItems.toolGregtechPump.registerItem(aID, // ID + aPumpName, // Name + aEuMax, // Eu Storage + (short) aTier, // Tier + "Can be used to remove fluids from GT machine input & output slots.", // Tooltip + aTier <= 0 ? EnumRarity.common : aTier == 1 ? EnumRarity.uncommon : aTier == 2 ? EnumRarity.rare : aTier == 3 ? EnumRarity.epic : EnumRarity.common, // Rarity + EnumChatFormatting.GRAY, // Desc colour + false // Effect? + ); + } + + public GregtechPump() { + this("MU-metatool.01", AddToCreativeTab.tabTools, (short) 1000, (short) 31766); + } + + public GregtechPump(final String unlocalizedName, final CreativeTabs creativeTab, final short aOffset, + final short aItemAmount) { + this.mEnabledItems = new BitSet(aItemAmount); + this.mVisibleItems = new BitSet(aItemAmount); + this.mOffset = (short) Math.min(32766, aOffset); + this.mItemAmount = (short) Math.min(aItemAmount, 32766 - this.mOffset); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(1); + if (GameRegistry.findItem(CORE.MODID, unlocalizedName) == null) { + GameRegistry.registerItem(this, unlocalizedName); + } + + } + + public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, + final String description) { + this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, + EnumChatFormatting.GRAY, false); + } + + public void registerItem(final int id, final String localizedName, final long euStorage, final int tier, + final String description, final int burnTime) { + this.registerItem(id, localizedName, euStorage, (short) tier, description, EnumRarity.common, + EnumChatFormatting.GRAY, false); + this.setBurnValue(id, burnTime); + } + + public void registerItem(final int id, final String localizedName, final long euStorage, final short tier, + final String description, final EnumRarity regRarity, final EnumChatFormatting colour, + final boolean Effect) { + this.addItem(id, localizedName, EnumChatFormatting.YELLOW + "Electric", new Object[] {}); + if (euStorage > 0 && tier > 0) + this.setElectricStats(this.mOffset + id, euStorage, GT_Values.V[tier], tier, -3L, true); + this.rarity.put(id, regRarity); + this.itemName.put(id, localizedName); + this.itemDescription.put(id, description); + this.descColour.put(id, colour); + this.hasEffect.put(id, Effect); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack) { + int h = getCorrectMetaForItemstack(par1ItemStack); + if (this.rarity.get(h) != null) { + return this.rarity.get(h); + } + return EnumRarity.common; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack) { + int h = getCorrectMetaForItemstack(par1ItemStack); + if (this.hasEffect.get(h) != null) { + return this.hasEffect.get(h); + } + return false; + } + + @SuppressWarnings({ "unchecked" }) + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, final boolean aF3_H) { + // aList.add("Meta: "+(aStack.getItemDamage()-mOffset)); + + int aOffsetMeta = getCorrectMetaForItemstack(aStack); + + if ((this.descColour.get(aOffsetMeta) != null) + && (this.itemDescription.get(aOffsetMeta) != null)) { + aList.add(this.descColour.get(aOffsetMeta) + + this.itemDescription.get(aOffsetMeta)); + } + + + if (aOffsetMeta <= 3) { + FluidStack f = getFluid(aStack); + aList.add("Cannot drain any other standard fluid container block"); + aList.add("Cannot be emptied via RMB, use inside a tank with GUI"); + aList.add(EnumChatFormatting.DARK_GRAY+"This is technically just a fancy fluid cell"); + aList.add(EnumChatFormatting.BLUE + (f != null ? f.getLocalizedName() : "No Fluids Contained")); + aList.add(EnumChatFormatting.BLUE + (f != null ? ""+f.amount : ""+0) + "L" + " / " + getCapacity(aStack) + "L"); + } + + final Long[] tStats = this.getElectricStats(aStack); + if (tStats != null) { + if (tStats[3] > 0) { + aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " + + (tStats[2] >= 0 ? tStats[2] : 0) + EnumChatFormatting.GRAY); + } else { + final long tCharge = this.getRealCharge(aStack); + if ((tStats[3] == -2) && (tCharge <= 0)) { + aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + + EnumChatFormatting.GRAY); + } else { + aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + + EnumChatFormatting.GRAY); + } + } + } + + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final IItemBehaviour tBehavior : tList) { + aList = tBehavior.getAdditionalToolTips(this, aList, aStack); + } + } + } + + @Override + public final Item getChargedItem(final ItemStack itemStack) { + return this; + } + + @Override + public final Item getEmptyItem(final ItemStack itemStack) { + return this; + } + + @Override + public final double getMaxCharge(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + return Math.abs(tStats[0]); + } + + @Override + public final double getTransferLimit(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + return Math.max(tStats[1], tStats[3]); + } + + @Override + public final int getTier(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + return (int) (tStats == null ? Integer.MAX_VALUE : tStats[2]); + } + + @Override + public final double charge(final ItemStack aStack, final double aCharge, final int aTier, + final boolean aIgnoreTransferLimit, final boolean aSimulate) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[2] > aTier) + || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) + || (aStack.stackSize != 1)) { + return 0; + } + final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE + ? Long.MAX_VALUE + : Math.min(Math.abs(tStats[0]), + tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (!aSimulate) { + this.setCharge(aStack, tNewCharge); + } + return tNewCharge - tChargeBefore; + } + + @Override + public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, + final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[2] > aTier)) { + return 0; + } + if (aBatteryAlike && !this.canProvideEnergy(aStack)) { + return 0; + } + if (tStats[3] > 0) { + if ((aCharge < tStats[3]) || (aStack.stackSize < 1)) { + return 0; + } + if (!aSimulate) { + aStack.stackSize--; + } + return tStats[3]; + } + final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math.max(0, + tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (!aSimulate) { + this.setCharge(aStack, tNewCharge); + } + return tChargeBefore - tNewCharge; + } + + @Override + public final double getCharge(final ItemStack aStack) { + return this.getRealCharge(aStack); + } + + @Override + public final boolean canUse(final ItemStack aStack, final double aAmount) { + return this.getRealCharge(aStack) >= aAmount; + } + + @Override + public final boolean use(final ItemStack aStack, final double aAmount, final EntityLivingBase aPlayer) { + this.chargeFromArmor(aStack, aPlayer); + if ((aPlayer instanceof EntityPlayer) && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) { + return true; + } + final double tTransfer = this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); + if (tTransfer == aAmount) { + this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); + this.chargeFromArmor(aStack, aPlayer); + return true; + } + this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); + this.chargeFromArmor(aStack, aPlayer); + return false; + } + + @Override + public final boolean canProvideEnergy(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return false; + } + return (tStats[3] > 0) || ((aStack.stackSize == 1) && ((tStats[3] == -2) || (tStats[3] == -3))); + } + + @Override + public final void chargeFromArmor(final ItemStack aStack, final EntityLivingBase aPlayer) { + if ((aPlayer == null) || aPlayer.worldObj.isRemote) { + return; + } + for (int i = 1; i < 5; i++) { + final ItemStack tArmor = aPlayer.getEquipmentInSlot(i); + if (GT_ModHandler.isElectricItem(tArmor)) { + final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); + if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { + final double tCharge = ElectricItem.manager.discharge(tArmor, + this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), + Integer.MAX_VALUE, true, true, false); + if (tCharge > 0) { + this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); + if (aPlayer instanceof EntityPlayer) { + final Container tContainer = ((EntityPlayer) aPlayer).openContainer; + if (tContainer != null) { + tContainer.detectAndSendChanges(); + } + } + } + } + } + } + } + + public final long getRealCharge(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + if (tStats[3] > 0) { + return (int) (long) tStats[3]; + } + final NBTTagCompound tNBT = aStack.getTagCompound(); + return tNBT == null ? 0 : tNBT.getLong("GT.ItemCharge"); + } + + public final boolean setCharge(final ItemStack aStack, long aCharge) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[3] > 0)) { + return false; + } + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + tNBT.removeTag("GT.ItemCharge"); + aCharge = Math.min(tStats[0] < 0 ? Math.abs(tStats[0] / 2) : aCharge, Math.abs(tStats[0])); + if (aCharge > 0) { + aStack.setItemDamage(this.getChargedMetaData(aStack)); + tNBT.setLong("GT.ItemCharge", aCharge); + } else { + aStack.setItemDamage(this.getEmptyMetaData(aStack)); + } + if (tNBT.hasNoTags()) { + aStack.setTagCompound(null); + } else { + aStack.setTagCompound(tNBT); + } + this.isItemStackUsable(aStack); + return true; + } + + public short getChargedMetaData(final ItemStack aStack) { + return (short) aStack.getItemDamage(); + } + + public short getEmptyMetaData(final ItemStack aStack) { + return (short) aStack.getItemDamage(); + } + + public boolean isItemStackUsable(final ItemStack aStack) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final IItemBehaviour tBehavior : tList) { + if (!tBehavior.isItemStackUsable(this, aStack)) { + return false; + } + } + } + return true; + } + + @Override + public final String getToolTip(final ItemStack aStack) { + return null; + } // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up + // at this Point + + @Override + public final IElectricItemManager getManager(final ItemStack aStack) { + return this; + } // We are our own Manager + + /** + * Sets the Furnace Burn Value for the Item. + * + * @param aMetaValue + * the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aValue + * 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU) + * @return the Item itself for convenience in constructing. + */ + public final GregtechPump setBurnValue(final int aMetaValue, final int aValue) { + if ((aMetaValue < 0) || (aValue < 0)) { + return this; + } + if (aValue == 0) { + this.mBurnValues.remove((short) aMetaValue); + } else { + this.mBurnValues.put((short) aMetaValue, aValue > Short.MAX_VALUE ? Short.MAX_VALUE : (short) aValue); + } + return this; + } + + /** + * @param aMetaValue + * the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aMaxCharge + * Maximum Charge. (if this is == 0 it will remove the Electric + * Behavior) + * @param aTransferLimit + * Transfer Limit. + * @param aTier + * The electric Tier. + * @param aSpecialData + * If this Item has a Fixed Charge, like a SingleUse Battery (if > + * 0). Use -1 if you want to make this Battery chargeable (the use + * and canUse Functions will still discharge if you just use this) + * Use -2 if you want to make this Battery dischargeable. Use -3 if + * you want to make this Battery charge/discharge-able. + * @return the Item itself for convenience in constructing. + */ + public final GregtechPump setElectricStats(final int aMetaValue, final long aMaxCharge, final long aTransferLimit, + final long aTier, final long aSpecialData, final boolean aUseAnimations) { + if (aMetaValue < 0) { + return this; + } + if (aMaxCharge == 0) { + this.mElectricStats.remove((short) aMetaValue); + } else { + this.mElectricStats.put((short) aMetaValue, + new Long[] { aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData }); + } + return this; + } + + @SuppressWarnings({ "unchecked" }) + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { + for (int i = 0, j = this.mEnabledItems.length(); i < j; i++) { + if (this.mVisibleItems.get(i) || (GT_Values.D1 && this.mEnabledItems.get(i))) { + final Long[] tStats = this.mElectricStats.get((short) (this.mOffset + i)); + if ((tStats != null) && (tStats[3] < 0)) { + final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); + this.setCharge(tStack, Math.abs(tStats[0])); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + if ((tStats == null) || (tStats[3] != -2)) { + final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public final void registerIcons(final IIconRegister aIconRegister) { + for (short i = 0, j = (short) this.mEnabledItems.length(); i < j; i++) { + if (this.mEnabledItems.get(i)) { + mIconMap.put((int) i, aIconRegister.registerIcon(CORE.MODID + ":" + (this.getUnlocalizedName() + "/" + i))); + } + } + } + + @Override + public final IIcon getIconFromDamage(final int aMetaData) { + if (aMetaData < 0) { + return null; + } + if (aMetaData < this.mOffset) { + return mIconMap.get(0); + } + else { + int newMeta = aMetaData - this.mOffset; + newMeta = (Math.max(0, Math.min(3, newMeta))); + return mIconMap.get(newMeta); + } + } + + /** + * Sets the unlocalized name of this item to the string passed as the parameter" + */ + @Override + public Item setUnlocalizedName(final String p_77655_1_) { + this.unlocalizedName = p_77655_1_; + super.setUnlocalizedName(p_77655_1_); + return this; + } + + /** + * Returns the unlocalized name of this item. + */ + @Override + public String getUnlocalizedName() { + return this.unlocalizedName; + } + + public final Long[] getElectricStats(final ItemStack aStack) { + return this.mElectricStats.get((short) aStack.getItemDamage()); + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { + return false; + } + + @Override + public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { + return false; + } + + /** + * Adds a special Item Behaviour to the Item. + *

+ * Note: the boolean Behaviours sometimes won't be executed if another boolean + * Behaviour returned true before. + * + * @param aMetaValue + * the Meta Value of the Item you want to add it to. [0 - 32765] + * @param aBehavior + * the Click Behavior you want to add. + * @return the Item itself for convenience in constructing. + */ + public final GregtechPump addItemBehavior(final int aMetaValue, final IItemBehaviour aBehavior) { + if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { + return this; + } + ArrayList> tList = this.mItemBehaviors.get((short) aMetaValue); + if (tList == null) { + tList = new ArrayList<>(1); + this.mItemBehaviors.put((short) aMetaValue, tList); + } + tList.add(aBehavior); + return this; + } + + /** + * This adds a Custom Item to the ending Range. + * + * @param aID + * The Id of the assigned Item [0 - mItemAmount] (The MetaData gets + * auto-shifted by +mOffset) + * @param aEnglish + * The Default Localized Name of the created Item + * @param aToolTip + * The Default ToolTip of the created Item, you can also insert null + * for having no ToolTip + * @param aFoodBehavior + * The Food Value of this Item. Can be null aswell. Just a + * convenience thing. + * @param aRandomData + * The OreDict Names you want to give the Item. Also used for TC + * Aspects and some other things. + * @return An ItemStack containing the newly created Item. + */ + @SuppressWarnings("unchecked") + public final ItemStack addItem(final int aID, final String aEnglish, String aToolTip, final Object... aRandomData) { + if (aToolTip == null) { + aToolTip = ""; + } + if ((aID >= 0) && (aID < this.mItemAmount)) { + final ItemStack rStack = new ItemStack(this, 1, this.mOffset + aID); + this.mEnabledItems.set(aID); + this.mVisibleItems.set(aID); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip); + final List tAspects = new ArrayList<>(); + // Important Stuff to do first + for (final Object tRandomData : aRandomData) { + if (tRandomData instanceof SubTag) { + if (tRandomData == SubTag.INVISIBLE) { + this.mVisibleItems.set(aID, false); + continue; + } + if (tRandomData == SubTag.NO_UNIFICATION) { + GT_OreDictUnificator.addToBlacklist(rStack); + continue; + } + } + } + // now check for the rest + for (final Object tRandomData : aRandomData) { + if (tRandomData != null) { + boolean tUseOreDict = true; + if (tRandomData instanceof IItemBehaviour) { + this.addItemBehavior(this.mOffset + aID, (IItemBehaviour) tRandomData); + tUseOreDict = false; + } + if (tRandomData instanceof IItemContainer) { + ((IItemContainer) tRandomData).set(rStack); + tUseOreDict = false; + } + if (tRandomData instanceof SubTag) { + continue; + } + if (tRandomData instanceof TC_AspectStack) { + ((TC_AspectStack) tRandomData).addToAspectList(tAspects); + continue; + } + if (tRandomData instanceof ItemData) { + if (GT_Utility.isStringValid(tRandomData)) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + } else { + GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); + } + continue; + } + if (tUseOreDict) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + continue; + } + } + } + if (GregTech_API.sThaumcraftCompat != null) { + GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); + } + return rStack; + } + return null; + } + + @Override + public String getItemStackDisplayName(final ItemStack aStack) { + int keyValue = (getCorrectMetaForItemstack(aStack)); + if (keyValue < 0 || keyValue > 3) { + keyValue = 0; + } + return this.itemName.get(keyValue); + } + + /** + * Fluid Handling + */ + + /* + * IFluidContainer Functions + */ + + public void emptyStoredFluid(ItemStack aStack) { + if (aStack.hasTagCompound()) { + NBTTagCompound t = aStack.getTagCompound(); + if (t.hasKey("mInit")) { + t.removeTag("mInit"); + } + if (t.hasKey("mFluid")) { + t.removeTag("mFluid"); + } + if (t.hasKey("mFluidAmount")) { + t.removeTag("mFluidAmount"); + } + } + } + + public void storeFluid(ItemStack aStack, FluidStack aFluid) { + if (aFluid == null) { + return; + } else { + String fluidname = aFluid.getFluid().getName(); + int amount = aFluid.amount; + if (fluidname != null && fluidname.length() > 0 && amount > 0) { + NBTUtils.setString(aStack, "mFluid", fluidname); + NBTUtils.setInteger(aStack, "mFluidAmount", amount); + } + } + } + + @Override + public FluidStack getFluid(ItemStack container) { + if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { + initNBT(container); + } + if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { + String fluidname; + Integer amount = 0; + fluidname = NBTUtils.getString(container, "mFluid"); + amount = NBTUtils.getInteger(container, "mFluidAmount"); + if (fluidname != null && amount != null && amount > 0) { + return FluidUtils.getFluidStack(fluidname, amount); + } else { + return null; + } + } + return null; + } + + @Override + public int getCapacity(ItemStack container) { + if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { + initNBT(container); + } + if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { + return container.getTagCompound().getInteger("mCapacity"); + } + int aMeta = this.getCorrectMetaForItemstack(container); + int aCapacity = (aMeta == 0 ? 2000 : (aMeta == 1 ? 8000 : (aMeta == 2 ? 32000 : 128000))); + return aCapacity; + } + + public int fill(ItemStack container, FluidStack resource) { + return fill(container, resource, true); + } + + @Override + public int fill(ItemStack container, FluidStack resource, boolean doFill) { + if (!doFill || resource == null) { + return 0; + } + + if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { + initNBT(container); + } + if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { + String aStored; + int aStoredAmount = 0; + int aCapacity = getCapacity(container); + FluidStack aStoredFluid = getFluid(container); + if (aStoredFluid != null) { + aStored = aStoredFluid.getFluid().getName(); + aStoredAmount = aStoredFluid.amount; + if (aStoredAmount == aCapacity) { + return 0; + } + } + // Handle no stored fluid first + if (aStoredFluid == null) { + Logger.INFO("Pump is empty, filling with tank fluids."); + FluidStack toConsume; + int amountToConsume = 0; + if (resource.amount >= aCapacity) { + amountToConsume = aCapacity; + } else { + amountToConsume = resource.amount; + } + toConsume = FluidUtils.getFluidStack(resource, amountToConsume); + if (toConsume != null && amountToConsume > 0) { + storeFluid(container, toConsume); + return amountToConsume; + } + } else { + Logger.INFO("Pump is Partially full, filling with tank fluids."); + if (aStoredFluid.isFluidEqual(resource)) { + Logger.INFO("Found matching fluids."); + int aSpaceLeft = (aCapacity - aStoredAmount); + Logger.INFO( + "Capacity: " + aCapacity + " | Stored: " + aStoredAmount + " | Space left: " + aSpaceLeft); + FluidStack toConsume; + int amountToConsume = 0; + if (resource.amount >= aSpaceLeft) { + amountToConsume = aSpaceLeft; + Logger.INFO("More or equal fluid amount to pump container space."); + } else { + amountToConsume = resource.amount; + Logger.INFO("Less fluid than container space"); + } + Logger.INFO("Amount to consume: " + amountToConsume); + toConsume = FluidUtils.getFluidStack(resource, (aStoredAmount + amountToConsume)); + if (toConsume != null && amountToConsume > 0) { + Logger.INFO("Storing Fluid"); + storeFluid(container, toConsume); + return amountToConsume; + } else { + Logger.INFO("Not storing fluid"); + } + } else { + Logger.INFO("Fluids did not match."); + } + } + } + return 0; + } + + public FluidStack drain(ItemStack container, int drainAmt) { + return drain(container, drainAmt, true); + } + + @Override + public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) { + if (!doDrain || maxDrain == 0) { + return null; + } + if (!container.hasTagCompound() || !container.getTagCompound().hasKey("mInit")) { + initNBT(container); + } + if (container.getTagCompound().hasKey("mInit") && container.getTagCompound().getBoolean("mInit")) { + + String aStored; + int aStoredAmount = 0; + FluidStack aStoredFluid = getFluid(container); + + if (aStoredFluid != null) { + aStored = aStoredFluid.getFluid().getName(); + aStoredAmount = aStoredFluid.amount; + } + // We cannot drain this if it's empty. + else if (aStoredFluid == null) { + return null; + } + + if (maxDrain >= aStoredAmount) { + emptyStoredFluid(container); + return aStoredFluid; + } else { + // Handle Partial removal + int amountRemaining = (aStoredAmount - maxDrain); + if (amountRemaining == 0) { + emptyStoredFluid(container); + } else { + FluidStack newAmount = FluidUtils.getFluidStack(aStoredFluid, amountRemaining); + FluidStack drained = FluidUtils.getFluidStack(aStoredFluid, maxDrain); + if (newAmount != null && drained != null) { + storeFluid(container, newAmount); + return drained; + } + } + } + } + return null; + } + + /* + * Handle ItemStack NBT + */ + + public void initNBT(ItemStack aStack) { + NBTTagCompound aNewNBT; + if (!aStack.hasTagCompound()) { + aNewNBT = new NBTTagCompound(); + } else { + aNewNBT = aStack.getTagCompound(); + } + + if (!aNewNBT.hasKey("mInit")) { + int aMeta = this.getCorrectMetaForItemstack(aStack); + aNewNBT.setInteger("mMeta", aMeta); + aNewNBT.setBoolean("mInit", true); + aNewNBT.setString("mFluid", "@@@@@"); + aNewNBT.setInteger("mFluidAmount", 0); + int aCapacity = (aMeta == 0 ? 2000 : (aMeta == 1 ? 8000 : (aMeta == 2 ? 32000 : 128000))); + aNewNBT.setInteger("mCapacity", aCapacity); + aStack.setTagCompound(aNewNBT); + } + } + + /** + * Tile Handling + */ + + /* + * Custom Fluid Handling for Tiles and GT Tiles. + */ + + public boolean tryDrainTile(ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ) { + try { + if (aWorld.isRemote || aStack == null) { + return false; + } else { + int aTier = (aStack.getItemDamage() - 1000); + int removal; + if (aTier == 0) { + removal = 0; + } else if (aTier == 1) { + removal = 32; + } else if (aTier == 2) { + removal = 128; + } else if (aTier == 3) { + removal = 512; + } else { + removal = 8; + } + if (!canUse(aStack, removal) && aTier > 0) { + PlayerUtils.messagePlayer(aPlayer, "Not enough power."); + Logger.INFO("No Power"); + return false; + } + + final Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity == null) { + return false; + } else { + double aCharge = this.getCharge(aStack); + boolean didDrain = false; + if (aTier > 0 && aCharge > 0) { + if (discharge(aStack, removal, aTier, true, true, false) > 0) { + didDrain = true; + } + } else if (aTier == 0) { + didDrain = true; + } else { + didDrain = false; + } + + if (didDrain) { + if ((tTileEntity instanceof IGregTechTileEntity)) { + return this.drainTankGT(tTileEntity, aStack, aWorld, aPlayer, aX, aY, aZ); + } + //Try support Standard Fluid Tanks too (May disable if dupes appear again) + else if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) { + //return this.drainIFluidTank(tTileEntity, aStack, aWorld, aPlayer, aX, aY, aZ); + return false; + } + } + } + } + } catch (Throwable t) { + } + return false; + } + + /* + * Vanilla IFluidTank + */ + + public boolean drainIFluidTank(TileEntity tTileEntity, ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, + int aY, int aZ) { + if (tTileEntity == null) { + Logger.INFO("Invalid Tile, somehow."); + return false; + } + if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) { + if (this.getFluid(aStack) == null || (this.getFluid(aStack) != null && this.getFluid(aStack).amount < this.getCapacity(aStack))) { + Logger.INFO("Trying to find Stored Fluid - Behaviour Class."); + FluidStack aStored = getStoredFluidOfVanillaTank(tTileEntity); + if (aStored != null) { + int mAmountInserted = fill(aStack, aStored); + FluidStack newStackRemainingInTank; + if (mAmountInserted > 0) { + if (mAmountInserted == aStored.amount) { + newStackRemainingInTank = null; + } else { + newStackRemainingInTank = FluidUtils.getFluidStack(aStored, (aStored.amount - mAmountInserted)); + } + boolean b = setStoredFluidOfVanillaTank(tTileEntity, newStackRemainingInTank); + Logger.INFO("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted); + Logger.INFO("Returning " + b + " - drainTankVanilla."); + if (b) { + PlayerUtils.messagePlayer(aPlayer, "Drained "+mAmountInserted+"L of "+aStored.getLocalizedName()+"."); + } + return b; + } + } else { + Logger.INFO("Found no valid Fluidstack - drainTankVanilla."); + } + } + else { + Logger.INFO("Pump is full."); + } + } + Logger.INFO("Could not drain vanilla tank."); + return false; + } + + /* + * GT Tanks + */ + + public boolean drainTankGT(TileEntity tTileEntity, ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX, + int aY, int aZ) { + if (tTileEntity == null) { + return false; + } + if ((tTileEntity instanceof IGregTechTileEntity)) { + Logger.INFO("Right Clicking on GT Tile - drainTankGT."); + if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { + Logger.INFO("Returning False - Behaviour Class. Timer < 50"); + return false; + } else if ((!aWorld.isRemote) && (!((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer))) { + Logger.INFO("Returning True - drainTankGT. NotUsable()"); + return true; + } else { + if (this.getFluid(aStack) == null || (this.getFluid(aStack) != null && this.getFluid(aStack).amount < this.getCapacity(aStack))) { + Logger.INFO("Trying to find Stored Fluid - drainTankGT."); + FluidStack aStored = getStoredFluidOfGTMachine((IGregTechTileEntity) tTileEntity); + if (aStored != null) { + int mAmountInserted = fill(aStack, aStored); + FluidStack newStackRemainingInTank; + if (mAmountInserted > 0) { + if (mAmountInserted == aStored.amount) { + newStackRemainingInTank = null; + } else { + newStackRemainingInTank = FluidUtils.getFluidStack(aStored, (aStored.amount - mAmountInserted)); + } + boolean b = setStoredFluidOfGTMachine((IGregTechTileEntity) tTileEntity, newStackRemainingInTank); + Logger.INFO("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted); + Logger.INFO("Returning " + b + " - drainTankGT."); + if (b) { + PlayerUtils.messagePlayer(aPlayer, "Drained "+mAmountInserted+"L of "+aStored.getLocalizedName()+"."); + } + return b; + } + } else { + Logger.INFO("Found no valid Fluidstack - drainTankGT."); + } + } + else { + Logger.INFO("Pump is full."); + } + } + } + Logger.INFO("Could not drain GT tank."); + return false; + } + + /* + * Vanilla Tanks + */ + + public FluidStack getStoredFluidOfVanillaTank(TileEntity aTileEntity) { + if (aTileEntity == null) { + return null; + } else if ((aTileEntity instanceof IFluidTank || aTileEntity instanceof IFluidHandler)) { + if (aTileEntity instanceof IFluidTank) { + return getStoredFluidOfVanillaTank((IFluidTank) aTileEntity); + } else { + return getStoredFluidOfVanillaTank((IFluidHandler) aTileEntity); + } + } else { + return null; + } + } + + public FluidStack getStoredFluidOfVanillaTank(IFluidTank aTileEntity) { + FluidStack f = aTileEntity.getFluid(); + Logger.INFO("Returning Fluid stack from tile. Found: " + + (f != null ? f.getLocalizedName() + " - " + f.amount + "L" : "Nothing")); + return f; + } + + public FluidStack getStoredFluidOfVanillaTank(IFluidHandler aTileEntity) { + if (aTileEntity instanceof IFluidTank) { + return getStoredFluidOfVanillaTank((IFluidTank) aTileEntity); + } + FluidStack f; + AutoMap m = new AutoMap(); + for (int i = 0; i < 6; i++) { + m.put(aTileEntity.getTankInfo(ForgeDirection.getOrientation(i))); + } + if (m.get(0) != null && m.get(0)[0] != null && m.get(0)[0].fluid != null) { + return m.get(0)[0].fluid; + } else { + return null; + } + } + + public boolean setStoredFluidOfVanillaTank(TileEntity aTileEntity, FluidStack aSetFluid) { + Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]"); + + if (aTileEntity == null) { + return false; + } + else if ((aTileEntity instanceof IFluidTank || aTileEntity instanceof IFluidHandler)) { + if (aTileEntity instanceof IFluidTank) { + Logger.INFO("Tile Was instanceof IFluidTank."); + FluidStack f = ((IFluidTank) aTileEntity).getFluid(); + if (aSetFluid == null) { + aSetFluid = f; + aSetFluid.amount = f.amount; + } + int toDrain = (f.amount - aSetFluid.amount); + FluidStack newStack; + if (toDrain <= 0) { + newStack = f; + } else { + newStack = ((IFluidTank) aTileEntity).drain(toDrain, true); + } + + if (newStack.isFluidEqual(aSetFluid) && newStack.amount == aSetFluid.amount) { + Logger.INFO("Removed fluid from vanilla IFluidTank successfully."); + return true; + } else { + Logger.INFO("Failed trying to remove fluid from vanilla IFluidTank."); + return false; + } + } + else { + + //Rewrite Fluid handling for Vanilla type tanks + if (!IFluidHandler.class.isInstance(aTileEntity)) { + Logger.INFO("Tile Was not an instance of IFluidHandler."); + return false; + } + + + IFluidHandler aTank = (IFluidHandler) aTileEntity; + FluidStack aTankContents = null; + FluidTankInfo[] a1 = aTank.getTankInfo(ForgeDirection.UNKNOWN); + if (a1 != null) { + if (a1[0] != null) { + aTankContents = a1[0].fluid; + Logger.INFO("Found Fluid in Tank. "+aTankContents.getLocalizedName()+" - "+aTankContents.amount); + } + } + if (aSetFluid == null) { + Logger.INFO("Setting fluid to tank contents, as we're going to empty it totally."); + aSetFluid = aTankContents.copy(); + } + else { + Logger.INFO("Setting fluid to tank contents, as we're going to empty it totally."); + } + Logger.INFO("Tile Was instance of IFluidHandler. Trying to Drain "+aSetFluid.getLocalizedName()+" - "+aSetFluid.amount); + + if (a1 == null || aTankContents == null) { + Logger.INFO("Tank is empty."); + return false; + } + //Found some Fluid in the tank + else { + FluidStack aDrainedStack = aTank.drain(ForgeDirection.UNKNOWN, aSetFluid, true); + if (aDrainedStack.isFluidStackIdentical(aSetFluid)) { + Logger.INFO("Drained!"); + return true; + } + else { + Logger.INFO("Partially Drained! This is probably an error."); + return true; + } + } + } + } else { + Logger.INFO("Bad Tank Tile to drain."); + return false; + } + + } + + /* + * GT Tanks + */ + + public FluidStack getStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity) { + if (aTileEntity == null) { + return null; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + ; + if (aMetaTileEntity == null) { + return null; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) { + Logger.INFO("Tile Was Instanceof BasicTank."); + return getStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity); + } else { + return null; + } + } + + public FluidStack getStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity) { + FluidStack f = aTileEntity.mFluid; + + //Let's see if this machine has output fluid too + /* + * if (f == null) { + * Logger.INFO("Could not find any input fluid, checking output if possible."); + * if (aTileEntity instanceof GT_MetaTileEntity_BasicMachine) { + * GT_MetaTileEntity_BasicMachine g = (GT_MetaTileEntity_BasicMachine) + * aTileEntity; + * Logger.INFO("Tile is a Basic Machine of some sort - "+g.mNEIName); if (g != + * null) { f = g.mOutputFluid; if (f != null) { + * Logger.INFO("Found output fluid! "+f.getLocalizedName()); } else { + * Logger.INFO("Did not find anything!"); f = g.getFluid(); if (f != null) { + * Logger.INFO("Found fluid! "+f.getLocalizedName()); } else { + * Logger.INFO("Did not find anything!"); f = g.getFluid(); } } } } } + */ + + Logger.INFO("Returning Fluid stack from tile. Found: " + + (f != null ? f.getLocalizedName() + " - " + f.amount + "L" : "Nothing")); + return f; + } + + public boolean setStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity, FluidStack aSetFluid) { + Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]"); + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) { + Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [2]"); + return setStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity, aSetFluid); + } else { + return false; + } + } + + public boolean setStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity, FluidStack aSetFluid) { + try { + + //Try Handle Outputs First + /* + * if (aTileEntity.setDrainableStack(aSetFluid) != null) { return true; } + */ + + aTileEntity.mFluid = aSetFluid; + boolean b = aTileEntity.mFluid == aSetFluid; + Logger.INFO("Trying to set Tile's tank. - Behaviour Class. [3] " + b); + return b; + } catch (Throwable t) { + Logger.INFO("Trying to clear Tile's tank. FAILED - Behaviour Class. [x]"); + return false; + } + } + + + public int getCorrectMetaForItemstack(ItemStack aStack) { + if (aStack == null) { + return 0; + } + else { + if (aStack.getItemDamage() < this.mOffset) { + return 0; + } + else { + int newMeta = aStack.getItemDamage() - this.mOffset; + newMeta = (Math.max(0, Math.min(3, newMeta))); + return newMeta; + } + } + + + + + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java b/src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java new file mode 100644 index 0000000000..555fc0f23f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/SandstoneHammer.java @@ -0,0 +1,80 @@ +package gtPlusPlus.core.item.tool.misc; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.item.base.BaseItemWithDamageValue; +import gtPlusPlus.core.lib.CORE; + +public class SandstoneHammer extends BaseItemWithDamageValue{ + + /* (non-Javadoc) + * @see net.minecraft.item.Item#getColorFromItemStack(net.minecraft.item.ItemStack, int) + */ + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + //Figure Out Damage + + + return super.getColorFromItemStack(stack, HEX_OxFFFFFF); + } + + public SandstoneHammer(final String unlocalizedName) { + super(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(1); + this.setMaxDamage(2500); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GRAY+"Allows you to craft sand from cobble, or sandstone from sand."); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public boolean doesContainerItemLeaveCraftingGrid(final ItemStack itemStack) + { + return false; + } + + @Override + public boolean getShareTag() + { + return true; + } + + @Override + public boolean hasContainerItem(final ItemStack itemStack) + { + return true; + } + @Override + public ItemStack getContainerItem(final ItemStack itemStack) + { + itemStack.setItemDamage(itemStack.getItemDamage() + 8); + + return itemStack; + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.uncommon; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return false; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java new file mode 100644 index 0000000000..baed16db03 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/AutoLunchBox.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.tool.misc.box; + +public class AutoLunchBox extends BaseBoxItem { + + public final static int SLOTS = 9; + + public AutoLunchBox(String displayName) { + super(displayName, new String[] {"Stores 9 pieces of food", "Food will automatically be eaten from slot 1, through to "+gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS}, gtPlusPlus.core.item.tool.misc.box.AutoLunchBox.SLOTS); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java new file mode 100644 index 0000000000..10a3ae5804 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/BaseBoxItem.java @@ -0,0 +1,59 @@ +package gtPlusPlus.core.item.tool.misc.box; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class BaseBoxItem extends CoreItem { + + private final int GUI; + + public BaseBoxItem(String displayName, String[] description, int GUI_ID) { + super("item." + Utils.sanitizeString(displayName), displayName, AddToCreativeTab.tabTools, 1, 0, + modifyDescriptionStringArray(description), EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null); + GUI = GUI_ID; + } + + private static String[] modifyDescriptionStringArray(String[] array) { + String[] a = new String[array.length + 1]; + for (int b = 0; b < array.length; b++) { + a[b] = array[b]; + } + a[a.length - 1] = "Right Click to open"; + return a; + } + + // Without this method, your inventory will NOT work!!! + @Override + public int getMaxItemUseDuration(ItemStack stack) { + return 1; // return any value greater than zero + } + + @Override + public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { + if (!world.isRemote) { + // If player not sneaking, open the inventory gui + if (!player.isSneaking()) { + player.openGui(GTplusplus.instance, GUI, world, (int) player.posX, (int) player.posY, + (int) player.posZ); + } + } + return itemstack; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + this.itemIcon = iconRegister.registerIcon(CORE.MODID + ":" + this.getUnlocalizedName().substring(5)); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java new file mode 100644 index 0000000000..035859c388 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/ContainerBoxBase.java @@ -0,0 +1,328 @@ +package gtPlusPlus.core.item.tool.misc.box; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import gregtech.api.enums.Materials; +import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerBoxBase extends Container { + + /* + * Finally, in your Container class, you will need to check if the currently + * opened inventory's uniqueID is equal to the itemstack's uniqueID in the + * method 'transferStackInSlot' as well as check if the itemstack is the + * currently equipped item in the method 'slotClick'. In both cases, you'll need + * to prevent the itemstack from being moved or it will cause bad things to + * happen. + */ + + /** + * Step 3: Create a custom Container for your Inventory + */ + + /* + * There's a LOT of code in this one, but read through all of the comments + * carefully and it should become clear what everything does. As a bonus, one of + * my previous tutorials is included within! + * "How to Properly Override Shift-Clicking" is here and better than ever! At + * least in my opinion. If you're like me, and you find no end of frustration + * trying to figure out which f-ing index you should use for which slots in your + * container when overriding transferStackInSlot, or if your following the + * original tutorial, then read on. + */ + + /** + * The Item Inventory for this Container, only needed if you want to reference + * isUseableByPlayer + */ + private final CustomBoxInventory inventory; + /** + * Using these will make transferStackInSlot easier to understand and implement + * INV_START is the index of the first slot in the Player's Inventory, so our + * CustomBoxInventory's number of slots (e.g. 5 slots is array indices 0-4, so + * start at 5) Notice how we don't have to remember how many slots we made? We + * can just use CustomBoxInventory.INV_SIZE and if we ever change it, the + * Container updates automatically. + */ + private final int INV_START, INV_END, HOTBAR_START, HOTBAR_END; + + // If you're planning to add armor slots, put those first like this: + // ARMOR_START = CustomBoxInventory.INV_SIZE, ARMOR_END = ARMOR_START+3, + // INV_START = ARMOR_END+1, and then carry on like above. + + private Slot generateSlot(final Constructor aClazz, final IInventory base, final int id, final int x, + final int y) { + Slot aSlot; + try { + aSlot = (Slot) aClazz.newInstance(base, id, x, y); + if (aSlot != null) { + return aSlot; + } + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + public ContainerBoxBase(EntityPlayer par1Player, InventoryPlayer inventoryPlayer, + CustomBoxInventory CustomBoxInventory, Class aClazz, int aSlotCount) { + + INV_START = aSlotCount; + INV_END = INV_START + 26; + HOTBAR_START = INV_END + 1; + HOTBAR_END = HOTBAR_START + 8; + + this.inventory = CustomBoxInventory; + try { + + Constructor constructor; + constructor = aClazz.getConstructor(IInventory.class, int.class, int.class, int.class); + + int i; + + // ITEM INVENTORY - you'll need to adjust the slot locations to match your + // texture file + // I have them set vertically in columns of 4 to the right of the player model + for (i = 0; i < CustomBoxInventory.INV_SIZE; ++i) { + // You can make a custom Slot if you need different behavior, + // such as only certain item types can be put into this slot + // We made a custom slot to prevent our inventory-storing item + // from being stored within itself, but if you want to allow that and + // you followed my advice at the end of the above step, then you + // could get away with using the vanilla Slot class + this.addSlotToContainer(generateSlot(constructor, this.getInventoryObject(), i, + 80 + (18 * (int) (i / 4)), 8 + (18 * (i % 4)))); + } + + // If you want, you can add ARMOR SLOTS here as well, but you need to + // make a public version of SlotArmor. I won't be doing that in this tutorial. + /* + * for (i = 0; i < 4; ++i) { // These are the standard positions for survival + * inventory layout this.addSlotToContainer(new SlotArmor(this.player, + * inventoryPlayer, inventoryPlayer.getSizeInventory() - 1 - i, 8, 8 + i * 18, + * i)); } + */ + + // PLAYER INVENTORY - uses default locations for standard inventory texture file + for (i = 0; i < 3; ++i) { + for (int j = 0; j < 9; ++j) { + this.addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + // PLAYER ACTION BAR - uses default locations for standard action bar texture + // file + for (i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); + } + + } catch (NoSuchMethodException | SecurityException e) { + e.printStackTrace(); + } + } + + @Override + public boolean canInteractWith(EntityPlayer entityplayer) { + // be sure to return the inventory's isUseableByPlayer method + // if you defined special behavior there: + return getInventoryObject().isUseableByPlayer(entityplayer); + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you + * will crash when someone does that. + */ + public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int index) { + ItemStack itemstack = null; + Slot slot = (Slot) this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + // If item is in our custom Inventory or armor slot + if (index < INV_START) { + // try to place in player inventory / action bar + if (!this.mergeItemStack(itemstack1, INV_START, HOTBAR_END + 1, true)) { + return null; + } + + slot.onSlotChange(itemstack1, itemstack); + } + // Item is in inventory / hotbar, try to place in custom inventory or armor + // slots + else { + /* + * If your inventory only stores certain instances of Items, you can implement + * shift-clicking to your inventory like this: + * + * // Check that the item is the right type if (itemstack1.getItem() instanceof + * ItemCustom) { // Try to merge into your custom inventory slots // We use + * 'CustomBoxInventory.INV_SIZE' instead of INV_START just in case // you also + * add armor or other custom slots if (!this.mergeItemStack(itemstack1, 0, + * CustomBoxInventory.INV_SIZE, false)) { return null; } } // If you added armor + * slots, check them here as well: // Item being shift-clicked is armor - try to + * put in armor slot if (itemstack1.getItem() instanceof ItemArmor) { int type = + * ((ItemArmor) itemstack1.getItem()).armorType; if + * (!this.mergeItemStack(itemstack1, ARMOR_START + type, ARMOR_START + type + 1, + * false)) { return null; } } Otherwise, you have basically 2 choices: 1. + * shift-clicking between player inventory and custom inventory 2. + * shift-clicking between action bar and inventory + * + * Be sure to choose only ONE of the following implementations!!! + */ + /** + * Implementation number 1: Shift-click into your custom inventory + */ + if (index >= INV_START) { + // place in custom inventory + if (!this.mergeItemStack(itemstack1, 0, INV_START, false)) { + return null; + } + } + + /** + * Implementation number 2: Shift-click items between action bar and inventory + */ + // item is in player's inventory, but not in action bar + if (index >= INV_START && index < HOTBAR_START) { + // place in action bar + if (!this.mergeItemStack(itemstack1, HOTBAR_START, HOTBAR_END + 1, false)) { + return null; + } + } + // item in action bar - place in player inventory + else if (index >= HOTBAR_START && index < HOTBAR_END + 1) { + if (!this.mergeItemStack(itemstack1, INV_START, INV_END + 1, false)) { + return null; + } + } + } + + if (itemstack1.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } + + if (itemstack1.stackSize == itemstack.stackSize) { + return null; + } + + slot.onPickupFromSlot(par1EntityPlayer, itemstack1); + } + + return itemstack; + } + + /** + * You should override this method to prevent the player from moving the stack + * that opened the inventory, otherwise if the player moves it, the inventory + * will not be able to save properly + */ + @Override + public ItemStack slotClick(int slot, int button, int flag, EntityPlayer player) { + // this will prevent the player from interacting with the item that opened the + // inventory: + if (slot >= 0 && getSlot(slot) != null && getSlot(slot).getStack() == player.getHeldItem()) { + return null; + } + return super.slotClick(slot, button, flag, player); + } + + /* + * Special note: If your custom inventory's stack limit is 1 and you allow + * shift-clicking itemstacks into it, you will need to override mergeStackInSlot + * to avoid losing all the items but one in a stack when you shift-click. + */ + /** + * Vanilla mergeItemStack method doesn't correctly handle inventories whose max + * stack size is 1 when you shift-click into the inventory. This is a modified + * method I wrote to handle such cases. Note you only need it if your slot / + * inventory's max stack size is 1 + */ + @Override + protected boolean mergeItemStack(ItemStack stack, int start, int end, boolean backwards) { + boolean flag1 = false; + int k = (backwards ? end - 1 : start); + Slot slot; + ItemStack itemstack1; + + if (stack.isStackable()) { + while (stack.stackSize > 0 && (!backwards && k < end || backwards && k >= start)) { + slot = (Slot) inventorySlots.get(k); + itemstack1 = slot.getStack(); + + if (!slot.isItemValid(stack)) { + k += (backwards ? -1 : 1); + continue; + } + + if (itemstack1 != null && itemstack1.getItem() == stack.getItem() + && (!stack.getHasSubtypes() || stack.getItemDamage() == itemstack1.getItemDamage()) + && ItemStack.areItemStackTagsEqual(stack, itemstack1)) { + int l = itemstack1.stackSize + stack.stackSize; + + if (l <= stack.getMaxStackSize() && l <= slot.getSlotStackLimit()) { + stack.stackSize = 0; + itemstack1.stackSize = l; + getInventoryObject().markDirty(); + flag1 = true; + } else if (itemstack1.stackSize < stack.getMaxStackSize() && l < slot.getSlotStackLimit()) { + stack.stackSize -= stack.getMaxStackSize() - itemstack1.stackSize; + itemstack1.stackSize = stack.getMaxStackSize(); + getInventoryObject().markDirty(); + flag1 = true; + } + } + + k += (backwards ? -1 : 1); + } + } + if (stack.stackSize > 0) { + k = (backwards ? end - 1 : start); + while (!backwards && k < end || backwards && k >= start) { + slot = (Slot) inventorySlots.get(k); + itemstack1 = slot.getStack(); + + if (!slot.isItemValid(stack)) { + k += (backwards ? -1 : 1); + continue; + } + + if (itemstack1 == null) { + int l = stack.stackSize; + if (l <= slot.getSlotStackLimit()) { + slot.putStack(stack.copy()); + stack.stackSize = 0; + getInventoryObject().markDirty(); + flag1 = true; + break; + } else { + putStackInSlot(k, + new ItemStack(stack.getItem(), slot.getSlotStackLimit(), stack.getItemDamage())); + stack.stackSize -= slot.getSlotStackLimit(); + getInventoryObject().markDirty(); + flag1 = true; + } + } + + k += (backwards ? -1 : 1); + } + } + + return flag1; + } + + public CustomBoxInventory getInventoryObject() { + return inventory; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java new file mode 100644 index 0000000000..0737e463d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/CustomBoxInventory.java @@ -0,0 +1,243 @@ +package gtPlusPlus.core.item.tool.misc.box; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.common.util.Constants; + +public abstract class CustomBoxInventory implements IInventory { + + private final String name; + protected String uniqueID; + + /** Provides NBT Tag Compound to reference */ + private final ItemStack invItem; + + /** Defining your inventory size this way is handy */ + public final int INV_SIZE; + + /** Inventory's size must be same as number of slots you add to the Container class */ + private ItemStack[] inventory; + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public CustomBoxInventory(ItemStack stack, String name2){ + this(stack, name2, 8); + } + + /** + * @param itemstack - the ItemStack to which this inventory belongs + */ + public CustomBoxInventory(ItemStack stack, String name2, int slots) + { + invItem = stack; + name = name2; + INV_SIZE = slots; + inventory = new ItemStack[INV_SIZE]; + + /** initialize variable within the constructor: */ + uniqueID = ""; + + if (!stack.hasTagCompound()) + { + stack.setTagCompound(new NBTTagCompound()); + // no tag compound means the itemstack does not yet have a UUID, so assign one: + uniqueID = UUID.randomUUID().toString(); + } + + /** When reading from NBT: */ + if ("".equals(uniqueID)) + { + // try to read unique ID from NBT + uniqueID = stack.getTagCompound().getString("uniqueID"); + // if it's still "", assign a new one: + if ("".equals(uniqueID)) + { + uniqueID = UUID.randomUUID().toString(); + } + } + + /** Writing to NBT: */ + // just add this line: + stack.getTagCompound().setString("uniqueID", this.uniqueID); + + // note that it's okay to use stack instead of invItem right there + // both reference the same memory location, so whatever you change using + // either reference will change in the other + + // Read the inventory contents from NBT + readFromNBT(stack.getTagCompound()); + } + + @Override + public int getSizeInventory() + { + return inventory.length; + } + + @Override + public ItemStack getStackInSlot(int slot) + { + return inventory[slot]; + } + + @Override + public ItemStack decrStackSize(int slot, int amount) + { + ItemStack stack = getStackInSlot(slot); + if(stack != null) + { + if(stack.stackSize > amount) + { + stack = stack.splitStack(amount); + // Don't forget this line or your inventory will not be saved! + markDirty(); + } + else + { + // this method also calls onInventoryChanged, so we don't need to call it again + setInventorySlotContents(slot, null); + } + } + return stack; + } + + @Override + public ItemStack getStackInSlotOnClosing(int slot) + { + ItemStack stack = getStackInSlot(slot); + setInventorySlotContents(slot, null); + return stack; + } + + @Override + public void setInventorySlotContents(int slot, ItemStack stack) + { + inventory[slot] = stack; + + if (stack != null && stack.stackSize > getInventoryStackLimit()) + { + stack.stackSize = getInventoryStackLimit(); + } + + // Don't forget this line or your inventory will not be saved! + markDirty(); + } + + // 1.7.2+ renamed to getInventoryName + @Override + public String getInventoryName() + { + return name; + } + + // 1.7.2+ renamed to hasCustomInventoryName + @Override + public boolean hasCustomInventoryName() + { + return name.length() > 0; + } + + @Override + public int getInventoryStackLimit() + { + return 64; + } + + /** + * This is the method that will handle saving the inventory contents, as it is called (or should be called!) + * anytime the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also + * let you change things in your inventory without ever opening a Gui, if you want. + */ + // 1.7.2+ renamed to markDirty + @Override + public void markDirty() + { + for (int i = 0; i < getSizeInventory(); ++i) + { + if (getStackInSlot(i) != null && getStackInSlot(i).stackSize == 0) { + inventory[i] = null; + } + } + + // This line here does the work: + writeToNBT(invItem.getTagCompound()); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) + { + return true; + } + + // 1.7.2+ renamed to openInventory(EntityPlayer player) + @Override + public void openInventory() {} + + // 1.7.2+ renamed to closeInventory(EntityPlayer player) + @Override + public void closeInventory() {} + + /** + * This method doesn't seem to do what it claims to do, as + * items can still be left-clicked and placed in the inventory + * even when this returns false + */ + @Override + public abstract boolean isItemValidForSlot(int slot, ItemStack itemstack); + + /** + * A custom method to read our inventory from an ItemStack's NBT compound + */ + public void readFromNBT(NBTTagCompound compound) + { + // Gets the custom taglist we wrote to this compound, if any + // 1.7.2+ change to compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); + NBTTagList items = compound.getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND); + + for (int i = 0; i < items.tagCount(); ++i) + { + // 1.7.2+ change to items.getCompoundTagAt(i) + NBTTagCompound item = (NBTTagCompound) items.getCompoundTagAt(i); + int slot = item.getInteger("Slot"); + + // Just double-checking that the saved slot index is within our inventory array bounds + if (slot >= 0 && slot < getSizeInventory()) { + inventory[slot] = ItemStack.loadItemStackFromNBT(item); + } + } + } + + /** + * A custom method to write our inventory to an ItemStack's NBT compound + */ + public void writeToNBT(NBTTagCompound tagcompound) + { + // Create a new NBT Tag List to store itemstacks as NBT Tags + NBTTagList items = new NBTTagList(); + + for (int i = 0; i < getSizeInventory(); ++i) + { + // Only write stacks that contain items + if (getStackInSlot(i) != null) + { + // Make a new NBT Tag Compound to write the itemstack and slot index to + NBTTagCompound item = new NBTTagCompound(); + item.setInteger("Slot", i); + // Writes the itemstack in slot(i) to the Tag Compound we just made + getStackInSlot(i).writeToNBT(item); + + // add the tag compound to our tag list + items.appendTag(item); + } + } + // Add the TagList to the ItemStack's Tag Compound with the name "ItemInventory" + tagcompound.setTag("ItemInventory", items); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java new file mode 100644 index 0000000000..65b884bd51 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/MagicToolBag.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.tool.misc.box; + +public class MagicToolBag extends BaseBoxItem { + + public final static int SLOTS = 24; + + public MagicToolBag(String displayName) { + super(displayName, new String[] {"Can store magic tools from TC, BM, etc", "Please ask for additional mod support on Github"}, gtPlusPlus.core.item.tool.misc.box.MagicToolBag.SLOTS); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java b/src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java new file mode 100644 index 0000000000..92b1382e01 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/misc/box/UniversalToolBox.java @@ -0,0 +1,13 @@ +package gtPlusPlus.core.item.tool.misc.box; + +import gtPlusPlus.core.handler.GuiHandler; + +public class UniversalToolBox extends BaseBoxItem { + + public final static int SLOTS = 16; + + public UniversalToolBox(String displayName) { + super(displayName, new String[] {"Can store tools from Gregtech, IC2, BC, Forestry", "Please ask for additional mod support on Github"}, GuiHandler.GUI10); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java new file mode 100644 index 0000000000..2c2441064b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java @@ -0,0 +1,311 @@ +package gtPlusPlus.core.item.tool.staballoy; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; + +public class MultiPickaxeBase extends StaballoyPickaxe{ + + /* (non-Javadoc) + * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) + */ + @Override + public double getDurabilityForDisplay(final ItemStack stack) { + if (super.getDurabilityForDisplay(stack) > 0){ + return super.getDurabilityForDisplay(stack);} + return 0; + } + + protected boolean canBreak = true; + protected final int colour; + protected final String materialName; + protected final String displayName; + public boolean isValid = true; + private final Pair enchantment; + + public MultiPickaxeBase(final String unlocalizedName, final ToolMaterial material, final long materialDurability, final int colour, final Object enchant) { + super(Utils.sanitizeString(unlocalizedName), material); + this.setUnlocalizedName(Utils.sanitizeString(unlocalizedName)); + //this.setTextureName(CORE.MODID + ":" + "itemPickaxe"); + this.setTextureName("minecraft"+":"+"iron_pickaxe"); + this.setMaxStackSize(1); + if ((materialDurability*3) <= Integer.MAX_VALUE){ + this.setMaxDamage((int) (materialDurability*3)); + } + else { + this.setMaxDamage(Integer.MAX_VALUE); + this.canBreak = false; + } + this.colour = colour; + this.materialName = material.name(); + this.displayName = unlocalizedName; + this.setCreativeTab(AddToCreativeTab.tabTools); + this.miningLevel = material.getHarvestLevel(); + + + + if (enchant != null){ + if (enchant instanceof Pair){ + this.enchantment = (Pair) enchant; + } + else { + this.enchantment = null; + } + } + else { + this.enchantment = null; + } + + try {this.isValid = this.addRecipe();} catch (final Throwable e){} + if ((colour != 0) && this.isValid && (materialDurability > 10000)){ + if (GameRegistry.findItem(CORE.MODID, Utils.sanitizeString(unlocalizedName)) == null){ + GameRegistry.registerItem(this, Utils.sanitizeString(unlocalizedName)); + } + } + + } + + /* + * + * + * + * Methods + * + * + * + */ + + private boolean addRecipe(){ + + final String cleanName = Utils.sanitizeString(this.materialName); + + final String plateDense = "plateDense"+cleanName; + final String plateDouble = "plateDouble"+cleanName; + final String rodLong = "stickLong"+cleanName; + final String toolHammer = "craftingToolHardHammer"; + final String toolWrench = "craftingToolWrench"; + final String toolFile = "craftingToolFile"; + final String toolScrewDriver = "craftingToolScrewdriver"; + + if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(rodLong, 1)){ + Logger.WARNING("stickLong of "+cleanName+" does not exist."); + return false; + } + if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDense, 1)){ + Logger.WARNING("plateDense of "+cleanName+" does not exist."); + if (null != ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDouble, 1)){ + Logger.WARNING("plateDouble of "+cleanName+" does exist. Using it instead."); + RecipeUtils.recipeBuilder( + plateDouble, plateDouble, plateDouble, + toolFile, rodLong, toolHammer, + toolWrench, rodLong, toolScrewDriver, + ItemUtils.getSimpleStack(this)); + + return true; + } + Logger.WARNING("plateDouble of "+cleanName+" does not exist."); + return false; + } + + RecipeUtils.recipeBuilder( + plateDense, plateDense, plateDense, + toolFile, rodLong, toolHammer, + toolWrench, rodLong, toolScrewDriver, + ItemUtils.getSimpleStack(this)); + + return true; + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public String getItemStackDisplayName(final ItemStack iStack) { + return this.displayName; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.colour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.colour; + + } + + private float calculateDurabilityLoss(final World world, final int X, final int Y, final int Z){ + float bDurabilityLoss = 0; + Boolean correctTool = false; + float bHardness = 0; + if (!world.isRemote){ + try { + final Block removalist = world.getBlock(X, Y, Z); + //Utils.LOG_WARNING(removalist.toString()); + + bHardness = removalist.getBlockHardness(world, X, Y, Z)*100; + Logger.INFO("Hardness: "+bHardness); + + bDurabilityLoss = 100; + //Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss); + + correctTool = this.canPickaxeBlock(removalist, world, new int[]{X,Y,Z}); + Logger.WARNING(""+correctTool); + + if (!correctTool){ + return 0; + } + + } catch (final NullPointerException e){ + + } + } + return bDurabilityLoss; + } + + //Should clear up blocks quicker if I chain it. + /*@Override + public void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){ + localWorld = world; + try { + Block block = world.getBlock(X, Y, Z); + float dur = calculateDurabilityLoss(world, X, Y, Z); + Utils.LOG_WARNING(block.toString()); + String removalTool = ""; + removalTool = block.getHarvestTool(1); + + if (removalTool.equals("pickaxe") || UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)){ + if (canPickaxeBlock(block, world, new int[]{X,Y,Z})){ + if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ + + if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){ + + block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); + world.setBlockToAir(X, Y, Z); + + } + else { + return; + } + + } + } + else { + Utils.LOG_WARNING("Incorrect Tool for mining this block."); + } + } + } catch (NullPointerException e){ + + } + }*/ + + @Override + public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer){ + if (this.canBreak){ + item.damageItem(damage, localPlayer); + } + } + + @Override + public void setItemDamage(final ItemStack item, final int damage){ + if (this.canBreak){ + item.setItemDamage(damage-1); + } + } + + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.uncommon; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return false; + } + + @Override + public void onCreated(final ItemStack mThisItem, final World mWorld, final EntityPlayer mPlayer) { + Enchantment enchant = null; + int enchantmentLevel = 0; + final Pair Y = this.enchantment; + if (Y != null){ + if (Y.getKey() != null){ + enchant = (Enchantment) this.enchantment.getKey(); + } + if (Y.getValue() != null){ + enchantmentLevel = ((Integer) this.enchantment.getValue()).intValue(); + } + } + final ItemStack itemToEnchant = mThisItem; + if ((enchant != null) && (enchantmentLevel != 0) && (enchantmentLevel >= 1)){ + itemToEnchant.addEnchantment(enchant, enchantmentLevel); + } + super.onCreated(itemToEnchant, mWorld, mPlayer); + } + + @Override + public void getSubItems(final Item mItem, final CreativeTabs mCreativeTab, final List mList) { + Enchantment enchant = null; + int enchantmentLevel = 0; + final Pair Y = this.enchantment; + if (Y != null){ + if (Y.getKey() != null){ + enchant = (Enchantment) this.enchantment.getKey(); + } + if (Y.getValue() != null){ + enchantmentLevel = ((Integer) this.enchantment.getValue()).intValue(); + } + } + + final Item thisItem = mItem; + final ItemStack itemToEnchant = ItemUtils.getSimpleStack(thisItem); + if ((enchant != null) && (enchantmentLevel != 0) && (enchantmentLevel >= 1)){ + itemToEnchant.addEnchantment(enchant, enchantmentLevel); + mList.add(itemToEnchant); + } + else { + mList.add(new ItemStack(thisItem, 1, 0)); + } + + } + + + /** + * + * Time to Override Minecraft stupid mechanics, allowing unbreakable stuff. + * + */ + + @Override + public boolean isDamageable(){ + if (this.getMaxDamage() > 0 && !this.hasSubtypes){ + if (this.canBreak){ + return true; + } + } + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java new file mode 100644 index 0000000000..d01b400fab --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/MultiSpadeBase.java @@ -0,0 +1,126 @@ +package gtPlusPlus.core.item.tool.staballoy; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; + +public class MultiSpadeBase extends StaballoySpade{ + + /* (non-Javadoc) + * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) + */ + @Override + public double getDurabilityForDisplay(final ItemStack stack) { + if (super.getDurabilityForDisplay(stack) > 0){ + return super.getDurabilityForDisplay(stack);} + return 0; + } + + protected final int colour; + protected final String materialName; + protected final String displayName; + public boolean isValid = true; + + public MultiSpadeBase(final String unlocalizedName, final ToolMaterial material, final int materialDurability, final int colour) { + super(Utils.sanitizeString(unlocalizedName), material); + this.setUnlocalizedName(Utils.sanitizeString(unlocalizedName)); + //this.setTextureName(CORE.MODID + ":" + "itemShovel"); + this.setTextureName("minecraft"+":"+"iron_shovel"); + this.setMaxStackSize(1); + this.setMaxDamage(materialDurability*3); + this.colour = colour; + this.materialName = material.name(); + this.displayName = unlocalizedName; + this.setCreativeTab(AddToCreativeTab.tabTools); + try { + this.isValid = this.addRecipe(); + } + catch (final Throwable e){} + if ((colour != 0) && this.isValid){ + if (GameRegistry.findItem(CORE.MODID, Utils.sanitizeString(unlocalizedName)) == null) { + GameRegistry.registerItem(this, Utils.sanitizeString(unlocalizedName)); + } + } + } + + private boolean addRecipe(){ + final String cleanName = Utils.sanitizeString(this.materialName); + final String plateDense = "plateDense"+cleanName; + final String plateDouble = "plateDouble"+cleanName; + final String rodLong = "stickLong"+cleanName; + final String toolHammer = "craftingToolHardHammer"; + final String toolWrench = "craftingToolWrench"; + final String toolFile = "craftingToolFile"; + final String toolScrewDriver = "craftingToolScrewdriver"; + + if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(rodLong, 1)){ + return false; + } + if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDense, 1)){ + if (null != ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDouble, 1)){ + RecipeUtils.recipeBuilder( + toolFile, plateDouble, toolHammer, + null, rodLong, null, + toolWrench, rodLong, toolScrewDriver, + ItemUtils.getSimpleStack(this)); + + return true; + } + return false; + } + + RecipeUtils.recipeBuilder( + toolFile, plateDense, toolHammer, + null, rodLong, null, + toolWrench, rodLong, toolScrewDriver, + ItemUtils.getSimpleStack(this)); + + return true; + } + + public final String getMaterialName() { + return this.materialName; + } + + @Override + public String getItemStackDisplayName(final ItemStack iStack) { + return this.displayName; + /*String name; + if (getUnlocalizedName().toLowerCase().contains("wood")){ + name = "Wooden"; + } + else { + } + return "Big "+name+" Spade";*/ + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.colour == 0){ + return MathUtils.generateSingularRandomHexValue(); + } + return this.colour; + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.uncommon; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java new file mode 100644 index 0000000000..153a417d7b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyAxe.java @@ -0,0 +1,345 @@ +package gtPlusPlus.core.item.tool.staballoy; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.*; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemAxe; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.lib.CORE; + +public class StaballoyAxe extends ItemAxe{ + public String mat; + + public StaballoyAxe(final String unlocalizedName, final ToolMaterial material) { + super(material); + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + } + + // EXPLODE TREE + byte[] tre= new byte[32000]; + byte unchecked=0; + byte needcheck=1; + byte ignore =2; + byte harvest =3; + + private boolean setcheck(final int x, final int y, final int z) { + if((x<0) || (x>19) || (z<0) || (z>19) || (y<0) || (y>79)) { + return false; + } + final int o=x+(z*20)+(y*400); + if (this.tre[o]==this.unchecked) { + this.tre[o]=this.needcheck; + } + return true; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GOLD+"Fells entire trees in a single swipe!.."); + list.add(EnumChatFormatting.GRAY+"Ask Alkalus for new trees to be supported."); + super.addInformation(stack, aPlayer, list, bool); + } + + public static boolean canIgnore(final Block bit){ + if (bit instanceof BlockAir) { + return true; + } + if (bit instanceof BlockGrass) { + return true; + } + if (bit instanceof BlockSand) { + return true; + } + if (bit instanceof BlockDirt) { + return true; + } + if (bit instanceof BlockCocoa) { + return true; + } + if (bit instanceof BlockVine) { + return true; + } + if (bit instanceof BlockMushroom) { + return true; + } + if (bit instanceof BlockSnow) { + return true; + } + if (bit instanceof BlockSnowBlock) { + return true; + } + if (bit instanceof BlockFlower) { + return true; + } + if (bit instanceof BlockTallGrass) { + return true; + } + if (bit instanceof BlockDoublePlant) { + return true; + } + + //LoonTools.log("Found uncuttable "+bit.getClass().getSimpleName()); + return false; + } + + private int check(final World par1World, final int x, final int y, final int z, final int xo, final int yo,final int zo) { + int f=0; + final int o=x+(z*20)+(y*400); + if (this.tre[o]==this.needcheck){ + this.tre[o]=this.ignore; + final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); + if ((bit instanceof BlockLog)||(bit instanceof BlockLeavesBase)||(bit instanceof BlockHugeMushroom) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ + f=1; + this.tre[o]=this.harvest; + //if (bit instanceof BlockLog){ + // LoonTools.log("^ Found log @ "+x+xo+" "+y+yo+" "+z+zo+" "); + //} + for(int xb=-1;xb<2;xb++) { + for(int yb=-1;yb<2;yb++) { + for(int zb=-1;zb<2;zb++) { + if (!this.setcheck(x+xb,y+yb,z+zb)) { + return 3; + } + } + } + } + }else{ + if (!canIgnore(bit)) { + return 2; + } + } + } + return f; + } + + public int checkTree(final World par1World,final int xo,final int yo,final int zo){ + boolean f; + for (f=true;f==true;){ + f=false; + for (int y=0;y<80;y++) { + for(int z=0;z<20;z++) { + for(int x=0;x<20;x++){ + final int r=this.check(par1World,x,y,z,xo,yo,zo); + if (r==3) { + return 3; + } + if (r==2) { + return 2; + } + if (r==1) { + f=true; + } + } + } + } + + for (int y=79;y>=0;y--) { + for(int z=19;z>=0;z--) { + for(int x=19;x>=0;x--){ + final int r=this.check(par1World,x,y,z,xo,yo,zo); + if (r==2) { + return 3; + } + //if (r==2) return 2; + if (r==1) { + f=true; + } + } + } + } + } + return 1; + } + + private int check2(final World par1World, final int x, final int y, final int z, final int xo, final int yo,final int zo) { + int f=0; + final int o=x+(z*20)+(y*400); + if (this.tre[o]==this.needcheck){ + this.tre[o]=this.ignore; + final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); + if (bit instanceof BlockLog){ + f=1; + this.tre[o]=this.harvest; + //if (bit instanceof BlockLog){ + // LoonTools.log("^ Found log @ "+x+xo+" "+y+yo+" "+z+zo+" "); + //} + for(int xb=-1;xb<2;xb++) { + for(int yb=-1;yb<2;yb++) { + for(int zb=-1;zb<2;zb++) { + if (!this.setcheck(x+xb,y+yb,z+zb)) { + return 3; + } + } + } + } + }else if (bit instanceof BlockLeavesBase){ + }else{ + if (!canIgnore(bit)) { + return 2; + } + } + } + return f; + } + + public int checkTree2(final World par1World,final int xo,final int yo,final int zo){ + boolean f; + for (f=true;f==true;){ + f=false; + for (int y=0;y<80;y++) { + for(int z=0;z<20;z++) { + for(int x=0;x<20;x++){ + final int r=this.check2(par1World,x,y,z,xo,yo,zo); + if (r==3) { + return 3; + } + if (r==2) { + return 2; + } + if (r==1) { + f=true; + } + } + } + } + + for (int y=79;y>=0;y--) { + for(int z=19;z>=0;z--) { + for(int x=19;x>=0;x--){ + final int r=this.check2(par1World,x,y,z,xo,yo,zo); + if (r==2) { + return 3; + } + //if (r==2) return 2; + if (r==1) { + f=true; + } + } + } + } + } + return 1; + } + + public void exploadTree(final World par1World,final int xo,final int yo,final int zo, final EntityPlayer plr){ + for (int y=0;y<80;y++) { + for(int z=0;z<20;z++) { + for(int x=0;x<20;x++){ + final int o=x+(z*20)+(y*400); + if (this.tre[o]==this.harvest){ + final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); + final int met = par1World.getBlockMetadata(x+xo, y+yo, z+zo); + + if ((bit instanceof BlockLog)||(bit instanceof BlockLeavesBase) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ + bit.harvestBlock(par1World, plr, x+xo, y+yo, z+zo,met); + par1World.setBlockToAir(x+xo, y+yo, z+zo); + } + } + } + } + } + } + + private static void breakMushroom(final World wld, final Block bit, final EntityPlayer plr, final boolean silk, final int x, final int y, final int z, final int met) { + if (silk){ + final ItemStack stk = null; //TODO + /*if (bit==Blocks.brown_mushroom_block) stk = new ItemStack(LoonToolItems.brown_mushroom_block,1,met); + else if (bit==Blocks.red_mushroom_block) stk = new ItemStack(LoonToolItems.red_mushroom_block,1,met); + else stk = new ItemStack(bit,1,met);*/ + final EntityItem entityitem = new EntityItem(wld, x+0.5, y+0.5, z+0.5, stk); + entityitem.delayBeforeCanPickup = 10; + wld.spawnEntityInWorld(entityitem); + }else{ + bit.harvestBlock(wld, plr, x, y, z, met); + } + wld.setBlockToAir(x, y, z); + } + + public void exploadMushroom(final World par1World,final int xo,final int yo,final int zo, final EntityPlayer plr, final boolean silk){ + for (int y=0;y<80;y++) { + for(int z=0;z<20;z++) { + for(int x=0;x<20;x++){ + final int o=x+(z*20)+(y*400); + if (this.tre[o]==this.harvest){ + final Block bit = par1World.getBlock(x+xo, y+yo, z+zo); + final int met = par1World.getBlockMetadata(x+xo, y+yo, z+zo); + if (bit instanceof BlockHugeMushroom){ + breakMushroom(par1World, bit, plr, silk, x+xo, y+yo, z+zo,met); + }else{ + bit.harvestBlock(par1World, plr, x+xo, y+yo, z+zo,met); + par1World.setBlockToAir(x+xo, y+yo, z+zo); + } + } + } + } + } + } + + + @Override + public boolean onBlockDestroyed(final ItemStack itm, final World wld,final Block blk, final int x, final int y,final int z, final EntityLivingBase plr) { + if (!wld.isRemote){ + final Block bit = wld.getBlock(x, y, z); + final boolean silk=EnchantmentHelper.getSilkTouchModifier(plr); + if ((bit instanceof BlockHugeMushroom)){ + for (int n=0;n<32000;n++) { + this.tre[n]=this.unchecked; + } + final int met = wld.getBlockMetadata(x, y, z); + breakMushroom(wld, bit, (EntityPlayer) plr, silk, x, y, z,met); + wld.setBlockToAir(x,y,z); + this.tre[2210]=this.needcheck; + if (this.checkTree(wld,x-10,y-4,z-10)==1){ + this.exploadMushroom(wld,x-10,y-4,z-10,(EntityPlayer) plr,silk); + } + } + + if ((bit instanceof BlockLog) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ + //LoonTools.log("cutting tree @ "+x+" "+y+" "+z+" "); + for (int n=0;n<32000;n++) { + this.tre[n]=this.unchecked; + } + final int met = wld.getBlockMetadata(x, y, z); + bit.harvestBlock(wld, (EntityPlayer) plr, x, y, z,met); + wld.setBlockToAir(x,y,z); + this.tre[2210]=this.needcheck; + if (this.checkTree(wld,x-10,y-4,z-10)==1){ + this.exploadTree(wld,x-10,y-4,z-10,(EntityPlayer) plr); + }else{ + for (int n=0;n<32000;n++) { + this.tre[n]=this.unchecked; + } + this.tre[2210]=this.needcheck; + if (this.checkTree2(wld,x-10,y-4,z-10)==1){ + this.exploadTree(wld,x-10,y-4,z-10,(EntityPlayer) plr); + } + } + } + } + return super.onBlockDestroyed(itm, wld, blk, x, y, z, plr); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.rare; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java new file mode 100644 index 0000000000..830c4994ba --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java @@ -0,0 +1,462 @@ +package gtPlusPlus.core.item.tool.staballoy; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemPickaxe; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.MiningUtils; + +public class StaballoyPickaxe extends ItemPickaxe{ + + /* (non-Javadoc) + * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) + */ + @Override + public double getDurabilityForDisplay(final ItemStack stack) { + return (double)stack.getItemDamageForDisplay() / (double)stack.getMaxDamage(); + } + + /** + * Creates an NBT tag for this item if it doesn't have one. + * This also set some default values. + * @param rStack + * @return + */ + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + + tagNBT.setBoolean("FACING_HORIZONTAL", true); + tagNBT.setString("FACING", "north"); + tagNBT.setString("lookingDirection", ""); + + tagMain.setTag("PickStats", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + /* + * Is the player facing horizontally? + */ + + public static final boolean isFacingHorizontal(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + return aNBT.getBoolean("FACING_HORIZONTAL"); + } + } + else { + createNBT(aStack); + } + return true; + } + + public static final boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + aNBT.setBoolean("FACING_HORIZONTAL", aFacingHorizontal); + return true; + } + } + return false; + } + + /* + * Handles the Direction the player is facing + */ + + public static final String getFacingDirection(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + return aNBT.getString("FACING"); + } + } + else { + createNBT(aStack); + } + return "north"; + } + + public static final boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + aNBT.setString("FACING", aFacingHorizontal); + return true; + } + } + return false; + } + + /* + * The Looking Direction handlers + */ + + public static final String getLookingDirection(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + return aNBT.getString("lookingDirection"); + } + } + else { + createNBT(aStack); + } + return ""; + } + + public static final boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + aNBT.setString("lookingDirection", aFacingHorizontal); + return true; + } + } + return false; + } + + protected int miningLevel; + + /* + * + * + * + * Methods + * + * + * + */ + + @Override + public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer aPlayer) { + return super.onItemRightClick(stack, world, aPlayer); + } + + + + @Override + public boolean onBlockDestroyed(final ItemStack stack, final World world, final Block block, final int X, final int Y, final int Z, final EntityLivingBase entity) { + if (!world.isRemote){ + if (entity instanceof EntityPlayer) { + this.GetDestroyOrientation((EntityPlayer) entity, block, getLookingDirection(stack), world, X, Y, Z, stack); + } + } + return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity); + } + + private float calculateDurabilityLoss(final World world, final int X, final int Y, final int Z){ + float bDurabilityLoss = 0; + Boolean correctTool = false; + float bHardness = 0; + if (!world.isRemote){ + try { + final Block removalist = world.getBlock(X, Y, Z); + //Utils.LOG_WARNING(removalist.toString()); + + bHardness = removalist.getBlockHardness(world, X, Y, Z); + Logger.WARNING("Hardness: "+bHardness); + + bDurabilityLoss = (bDurabilityLoss + bHardness); + //Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss); + + correctTool = this.canPickaxeBlock(removalist, world, new int[]{X,Y,Z}); + Logger.WARNING(""+correctTool); + + if (!correctTool){ + return 0; + } + + } catch (final NullPointerException e){ + + } + } + return 100; + } + + public Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld, final int[] xyz){ + String correctTool = ""; + if (!currentWorld.isRemote){ + try { + correctTool = currentBlock.getHarvestTool(0); + if (MiningUtils.getBlockType(currentBlock, currentWorld, xyz, this.miningLevel) || correctTool.equals("pickaxe") || correctTool.equals("null")){ + //Utils.LOG_WARNING(correctTool); + return true;} + } catch (final NullPointerException e){ + return false;} + } + return false; + } + + private void GetDestroyOrientation(EntityPlayer entity, final Block block, final String FACING, final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ + float DURABILITY_LOSS = 0; + if (!world.isRemote){ + + Logger.WARNING("hardness:"+block.getBlockHardness(world, X, Y, Z)); + if (FACING.equals("below") || FACING.equals("above")){ + DURABILITY_LOSS = 0; + for(int i = -1; i < 2; i++) { + for(int j = -1; j < 2; j++) { + final float dur = this.calculateDurabilityLoss(world, X + i, Y, Z + j); + DURABILITY_LOSS = (DURABILITY_LOSS + dur); + Logger.WARNING("Added Loss: "+dur); + this.removeBlockAndDropAsItem(world, X + i, Y, Z + j, heldItem); + } + } + } + + else if (FACING.equals("facingEast") || FACING.equals("facingWest")){ + DURABILITY_LOSS = 0; + for(int i = -1; i < 2; i++) { + for(int j = -1; j < 2; j++) { + final float dur = this.calculateDurabilityLoss(world, X, Y + i, Z + j); + DURABILITY_LOSS = (DURABILITY_LOSS + dur); + Logger.WARNING("Added Loss: "+dur); + this.removeBlockAndDropAsItem(world, X , Y + i, Z + j, heldItem); + } + } + } + + else if (FACING.equals("facingNorth") || FACING.equals("facingSouth")){ + DURABILITY_LOSS = 0; + for(int i = -1; i < 2; i++) { + for(int j = -1; j < 2; j++) { + final float dur = this.calculateDurabilityLoss(world, X + j, Y + i, Z); + DURABILITY_LOSS = (DURABILITY_LOSS + dur); + Logger.WARNING("Added Loss: "+dur); + this.removeBlockAndDropAsItem(world, X + j, Y + i, Z, heldItem); + } + } + } + + //int heldItemDurability = heldItem.getDamage(1); + Logger.WARNING("Total Loss: "+(int)DURABILITY_LOSS); + //heldItem.setDamage(heldStack, DURABILITY_LOSS); + //Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); + //Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack)); + Logger.WARNING("1x: "+(heldItem.getItemDamage())); + final int itemdmg = heldItem.getItemDamage(); + final int maxdmg = heldItem.getMaxDamage(); + final int dodmg = (int)DURABILITY_LOSS; + final int durNow = maxdmg-itemdmg; + final int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS); + + Logger.WARNING( + "Current Damage: " + itemdmg + + " Max Damage: " + maxdmg + + " Durability to be lost: " + dodmg + + " Current Durability: " + durNow + + " Remaining Durability: " + durLeft + ); + + + //Break Tool + if (((durNow-dodmg) <= (99)) && (itemdmg != 0)){ + //TODO break tool + Logger.WARNING("Breaking Tool"); + heldItem.stackSize = 0; + } + //Do Damage + else { + //setItemDamage(heldItem, durLeft); + Logger.WARNING(""+(durNow-durLeft)); + this.damageItem(heldItem, (durNow-durLeft)-1, entity); + } + + + /*if (heldItem.getItemDamage() <= ((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)){ + Utils.LOG_WARNING("2: "+DURABILITY_LOSS+" 3: "+((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)); + setItemDamage(heldItem, (int) (heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)); + } + else { + Utils.LOG_WARNING("3: "+( heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage()))); + setItemDamage(heldItem, heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())); + }*/ + //Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); + DURABILITY_LOSS = 0; + + } + } + + public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer){ + item.damageItem(damage, localPlayer); + } + + public void setItemDamage(final ItemStack item, final int damage){ + item.setItemDamage(damage-1); + } + + //Should clear up blocks quicker if I chain it. + public final void removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ + try { + final Block block = world.getBlock(X, Y, Z); + final float dur = this.calculateDurabilityLoss(world, X, Y, Z); + Logger.WARNING(block.toString()); + String removalTool = ""; + removalTool = block.getHarvestTool(1); + + Logger.WARNING("Removing.1 "+removalTool); + /*if ((removalTool.equalsIgnoreCase("pickaxe") || removalTool.equalsIgnoreCase("null") || removalTool == null)){ + Utils.LOG_WARNING("Removing.2"); + if (UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)) { + Utils.LOG_WARNING("Removing.3"); */ + if (this.canPickaxeBlock(block, world, new int[]{X,Y,Z})){ + Logger.WARNING("Removing.4"); + + if (block == Blocks.air){ + return; + } + + if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) >= 0) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ + + Logger.WARNING("Removing.5"); + if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){ + + if (X == 0 && Y == 0 && Z == 0){ + + } + else { + block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); + world.setBlockToAir(X, Y, Z); + } + + } + + } + /*} + + }*/ + } + else { + Logger.WARNING("Incorrect Tool for mining this block."); + } + } catch (final NullPointerException e){ + + } + } + + public boolean checkFacing(final ItemStack aStack, final EntityPlayer aPlayer, final World world){ + if (aPlayer != null){ + final int direction = MathHelper.floor_double((aPlayer.rotationYaw * 4F) / 360F + 0.5D) & 3; + //Utils.LOG_WARNING("Player - F: "+direction); + //Utils.LOG_WARNING("Player - getLookVec(): "+localPlayer.getLookVec().yCoord); + + /*if (localPlayer.getLookVec().yCoord > 0){ + localPlayer.getLookVec().yCoord; + }*/ + + final MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, aPlayer, false); + if (movingobjectposition != null){ + final int sideHit = movingobjectposition.sideHit; + String playerStandingPosition = ""; + if (movingobjectposition != null) { + //System.out.println("Side Hit: "+movingobjectposition.sideHit); + } + + if (sideHit == 0){ + playerStandingPosition = "above"; + setFacingHorizontal(aStack, false); + } + else if (sideHit == 1){ + playerStandingPosition = "below"; + setFacingHorizontal(aStack, false); + } + else if (sideHit == 2){ + playerStandingPosition = "facingSouth"; + setFacingHorizontal(aStack, true); + } + else if (sideHit == 3){ + playerStandingPosition = "facingNorth"; + setFacingHorizontal(aStack, true); + } + else if (sideHit == 4){ + playerStandingPosition = "facingEast"; + setFacingHorizontal(aStack, true); + } + else if (sideHit == 5){ + playerStandingPosition = "facingWest"; + setFacingHorizontal(aStack, true); + } + setLookingDirection(aStack, playerStandingPosition); + + if (direction == 0){ + setFacingDirection(aStack, "south"); + } + else if (direction == 1){ + setFacingDirection(aStack, "west"); + } + else if (direction == 2){ + setFacingDirection(aStack, "north"); + } + else if (direction == 3){ + setFacingDirection(aStack, "east"); + } + } + + + return true; + } + return false; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GRAY+"Mines a 3x3 at 100 durability per block mined."); + list.add(EnumChatFormatting.GRAY+"Durability: "+(stack.getMaxDamage()-stack.getItemDamage())+"/"+stack.getMaxDamage()); + //super.addInformation(stack, aPlayer, list, bool); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.rare; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } + + + @Override + public boolean onBlockStartBreak(final ItemStack itemstack, final int X, final int Y, final int Z, final EntityPlayer aPlayer) { + this.checkFacing(itemstack, aPlayer, aPlayer.getEntityWorld()); + return super.onBlockStartBreak(itemstack, X, Y, Z, aPlayer); + } + + public StaballoyPickaxe(final String unlocalizedName, final ToolMaterial material) { + super(material); + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(1); + this.setMaxDamage(3200); + this.miningLevel = 5; + } +} diff --git a/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java new file mode 100644 index 0000000000..6265c9f0a3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java @@ -0,0 +1,411 @@ +package gtPlusPlus.core.item.tool.staballoy; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemSpade; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.MiningUtils; + +public class StaballoySpade extends ItemSpade{ + + /* (non-Javadoc) + * @see net.minecraft.item.Item#getDurabilityForDisplay(net.minecraft.item.ItemStack) + */ + @Override + public double getDurabilityForDisplay(final ItemStack stack) { + if (super.getDurabilityForDisplay(stack) > 0){ + return super.getDurabilityForDisplay(stack);} + return 0; + } + + + /** + * Creates an NBT tag for this item if it doesn't have one. + * This also set some default values. + * @param rStack + * @return + */ + + private static boolean createNBT(ItemStack rStack){ + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + + tagNBT.setBoolean("FACING_HORIZONTAL", true); + tagNBT.setString("FACING", "north"); + tagNBT.setString("lookingDirection", ""); + + tagMain.setTag("PickStats", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + /* + * Is the player facing horizontally? + */ + + public static final boolean isFacingHorizontal(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + return aNBT.getBoolean("FACING_HORIZONTAL"); + } + } + else { + createNBT(aStack); + } + return true; + } + + public static final boolean setFacingHorizontal(final ItemStack aStack, final boolean aFacingHorizontal) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + aNBT.setBoolean("FACING_HORIZONTAL", aFacingHorizontal); + return true; + } + } + return false; + } + + /* + * Handles the Direction the player is facing + */ + + public static final String getFacingDirection(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + return aNBT.getString("FACING"); + } + } + else { + createNBT(aStack); + } + return "north"; + } + + public static final boolean setFacingDirection(final ItemStack aStack, final String aFacingHorizontal) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + aNBT.setString("FACING", aFacingHorizontal); + return true; + } + } + return false; + } + + /* + * The Looking Direction handlers + */ + + public static final String getLookingDirection(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + return aNBT.getString("lookingDirection"); + } + } + else { + createNBT(aStack); + } + return ""; + } + + public static final boolean setLookingDirection(final ItemStack aStack, final String aFacingHorizontal) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("PickStats"); + if (aNBT != null) { + aNBT.setString("lookingDirection", aFacingHorizontal); + return true; + } + } + return false; + } + + private int miningLevel; + + /* + * + * + * + * Methods + * + * + * + */ + + @Override + public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer aPlayer) { + return super.onItemRightClick(stack, world, aPlayer); + } + + + + @Override + public boolean onBlockDestroyed(final ItemStack stack, final World world, final Block block, final int X, final int Y, final int Z, final EntityLivingBase entity) { + if (!world.isRemote){ + if (entity instanceof EntityPlayer) { + this.GetDestroyOrientation((EntityPlayer) entity, getLookingDirection(stack), world, X, Y, Z, stack); + } + } + return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity); + } + + public Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld, final int[] xyz){ + String correctTool = ""; + if (!currentWorld.isRemote){ + try { + correctTool = currentBlock.getHarvestTool(0); + //Utils.LOG_WARNING(correctTool); + + Logger.WARNING("Tool for Block: "+correctTool+" | Current block: "+currentBlock.getLocalizedName()); + if (MiningUtils.getBlockType(currentBlock, currentWorld, xyz, this.miningLevel) || correctTool.equals("shovel")){ + return true;} + } catch (final NullPointerException e){ + return false;} + } + return false; + } + + private void GetDestroyOrientation(EntityPlayer player, final String FACING, final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ + float DURABILITY_LOSS = 0; + if (!world.isRemote){ + + if (FACING.equals("below") || FACING.equals("above")){ + DURABILITY_LOSS = 0; + for(int i = -1; i < 2; i++) { + for(int j = -1; j < 2; j++) { + DURABILITY_LOSS = (DURABILITY_LOSS + this.removeBlockAndDropAsItem(world, X + i, Y, Z + j, heldItem)); + } + } + } + + else if (FACING.equals("facingEast") || FACING.equals("facingWest")){ + DURABILITY_LOSS = 0; + for(int i = -1; i < 2; i++) { + for(int j = -1; j < 2; j++) { + DURABILITY_LOSS = (DURABILITY_LOSS + this.removeBlockAndDropAsItem(world, X , Y + i, Z + j, heldItem)); + } + } + } + + else if (FACING.equals("facingNorth") || FACING.equals("facingSouth")){ + DURABILITY_LOSS = 0; + for(int i = -1; i < 2; i++) { + for(int j = -1; j < 2; j++) { + DURABILITY_LOSS = (DURABILITY_LOSS + this.removeBlockAndDropAsItem(world, X + j, Y + i, Z, heldItem)); + } + } + } + + //int heldItemDurability = heldItem.getDamage(1); + Logger.WARNING("Total Loss: "+(int)DURABILITY_LOSS); + //heldItem.setDamage(heldStack, DURABILITY_LOSS); + //Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage()); + //Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack)); + Logger.WARNING("1x: "+(heldItem.getItemDamage())); + final int itemdmg = heldItem.getItemDamage(); + final int maxdmg = heldItem.getMaxDamage(); + final int dodmg = (int)DURABILITY_LOSS; + final int durNow = maxdmg-itemdmg; + final int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS); + + Logger.WARNING( + "Current Damage: " + itemdmg + + " Max Damage: " + maxdmg + + " Durability to be lost: " + dodmg + + " Current Durability: " + durNow + + " Remaining Durability: " + durLeft + ); + + + //Break Tool + if (((durNow-dodmg) <= (900)) && (itemdmg != 0)){ + //TODO break tool + Logger.WARNING("Breaking Tool"); + heldItem.stackSize = 0; + } + //Do Damage + else { + //setItemDamage(heldItem, durLeft); + Logger.WARNING(""+(durNow-durLeft)); + this.damageItem(heldItem, (durNow-durLeft)-1, player); + } + DURABILITY_LOSS = 0; + + } + } + + public void damageItem(final ItemStack item, final int damage, final EntityPlayer localPlayer){ + item.damageItem(damage, localPlayer); + } + + public void setItemDamage(final ItemStack item, final int damage){ + item.setItemDamage(damage-1); + } + + //Should clear up blocks quicker if I chain it. + public int removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z, final ItemStack heldItem){ + Logger.WARNING("Trying to drop/remove a block."); + try { + final Block block = world.getBlock(X, Y, Z); + Logger.WARNING(block.toString()); + String removalTool = ""; + removalTool = block.getHarvestTool(0); + if (removalTool != null){ + if (removalTool.equals("shovel")){ + if (this.canPickaxeBlock(block, world, new int[]{X,Y,Z})){ + if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ + + final int itemdmg = heldItem.getItemDamage(); + final int maxdmg = heldItem.getMaxDamage(); + final int dodmg = 100; + final int durNow = maxdmg-itemdmg; + final int durLeft = (maxdmg-itemdmg)-100; + + if (((durNow-dodmg) <= (900)) && (itemdmg != 0)){ + //Do Nothing, Tool is useless. + return 0; + } + block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); + world.setBlockToAir(X, Y, Z); + Logger.WARNING("Adding 100 damage to item."); + return 100; + } + Logger.WARNING("Incorrect Tool for mining this block. Wrong Block Water/lava/bedrock/blacklist"); + return 0; + } + Logger.WARNING("Incorrect Tool for mining this block. Cannot Shovel this block type."); + return 0; + } + Logger.WARNING("Incorrect Tool for mining this block. Blocks mining tool is now Shovel."); + return 0; + } + Logger.WARNING("Either the block was air or it declares an invalid mining tool."); + return 0; + } catch (final NullPointerException e){ + Logger.WARNING("Something Broke"); + e.printStackTrace(); + return 0; + } + } + + public boolean checkFacing(final ItemStack aStack, final EntityPlayer aPlayer, final World world){ + if (aPlayer != null){ + final int direction = MathHelper.floor_double((aPlayer.rotationYaw * 4F) / 360F + 0.5D) & 3; + //Utils.LOG_WARNING("Player - F: "+direction); + //Utils.LOG_WARNING("Player - getLookVec(): "+localPlayer.getLookVec().yCoord); + + /*if (localPlayer.getLookVec().yCoord > 0){ + localPlayer.getLookVec().yCoord; + }*/ + + final MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, aPlayer, false); + if (movingobjectposition != null){ + final int sideHit = movingobjectposition.sideHit; + String playerStandingPosition = ""; + if (movingobjectposition != null) { + //System.out.println("Side Hit: "+movingobjectposition.sideHit); + } + + if (sideHit == 0){ + playerStandingPosition = "above"; + setFacingHorizontal(aStack, false); + } + else if (sideHit == 1){ + playerStandingPosition = "below"; + setFacingHorizontal(aStack, false); + } + else if (sideHit == 2){ + playerStandingPosition = "facingSouth"; + setFacingHorizontal(aStack, true); + } + else if (sideHit == 3){ + playerStandingPosition = "facingNorth"; + setFacingHorizontal(aStack, true); + } + else if (sideHit == 4){ + playerStandingPosition = "facingEast"; + setFacingHorizontal(aStack, true); + } + else if (sideHit == 5){ + playerStandingPosition = "facingWest"; + setFacingHorizontal(aStack, true); + } + setLookingDirection(aStack, playerStandingPosition); + + if (direction == 0){ + setFacingDirection(aStack, "south"); + } + else if (direction == 1){ + setFacingDirection(aStack, "west"); + } + else if (direction == 2){ + setFacingDirection(aStack, "north"); + } + else if (direction == 3){ + setFacingDirection(aStack, "east"); + } + } + + + return true; + } + return false; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GOLD+"Spades a 3x3 area in the direction you are facing."); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return EnumRarity.rare; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + return true; + } + + + @Override + public boolean onBlockStartBreak(final ItemStack itemstack, final int X, final int Y, final int Z, final EntityPlayer aPlayer) { + this.checkFacing(itemstack, aPlayer, aPlayer.worldObj); + return super.onBlockStartBreak(itemstack, X, Y, Z, aPlayer); + } + public StaballoySpade(final String unlocalizedName, final ToolMaterial material) { + super(material); + this.setUnlocalizedName(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(1); + this.setMaxDamage(3200); + } +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/WearableLoader.java b/src/main/java/gtPlusPlus/core/item/wearable/WearableLoader.java new file mode 100644 index 0000000000..6912b4e771 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/WearableLoader.java @@ -0,0 +1,15 @@ +package gtPlusPlus.core.item.wearable; + +import gtPlusPlus.core.item.wearable.armour.ArmourLoader; + +public class WearableLoader { + + public static void run() { + execute(); + } + + private static void execute() { + ArmourLoader.run(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java new file mode 100644 index 0000000000..6918f2b048 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/ArmourLoader.java @@ -0,0 +1,41 @@ +package gtPlusPlus.core.item.wearable.armour; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.core.item.wearable.armour.tinfoil.ArmourTinFoilHat; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.item.Item; +import net.minecraft.item.ItemArmor.ArmorMaterial; + +import net.minecraftforge.common.util.EnumHelper; + +public class ArmourLoader { + + //Glass + public static Item ClearGlassChestplate; + public static Item ClearGlassBoots; + public static Item ClearGlassLeggings; + public static Item ClearGlassHelmet; + + //Tin Foil + public static Item TinFoilHat; + + public static ArmorMaterial ClearGlassArmour = EnumHelper.addArmorMaterial("ClearGlassArmor", 1, new int[] {1, 1, 1, 1}, 100); + public static ArmorMaterial TinFoilArmour = EnumHelper.addArmorMaterial("TINFOIL", 5, new int[]{1, 1, 1, 1}, 50); + + + public static void run() { + glassArmour(); + tinfoilArmour(); + } + + private static void glassArmour() { + //RenderingRegistry.addNewArmourRendererPrefix("ClearGlassArmor"); This needs to be client side only TODO + //ClearGlassHelmet = new ClearGlassArmor(2055, ClearGlassArmor, 5, 0).setUnlocalizedName("amethyst_helmet"); + } + + private static void tinfoilArmour() { + TinFoilHat = new ArmourTinFoilHat().setUnlocalizedName("itemHatTinFoil"); + GameRegistry.registerItem(TinFoilHat, "itemHatTinFoil", CORE.MODID); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java new file mode 100644 index 0000000000..0c6a547d34 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmour.java @@ -0,0 +1,11 @@ +package gtPlusPlus.core.item.wearable.armour.base; + +import gtPlusPlus.core.item.wearable.base.BaseItemWearable; + +public abstract class BaseArmour extends BaseItemWearable { + + public BaseArmour(ArmorMaterial material, int renderIndex, int armourType) { + super(material, renderIndex, armourType); + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java new file mode 100644 index 0000000000..2ace8919d0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.wearable.armour.base; + +public abstract class BaseArmourBoots extends BaseArmour { + + public BaseArmourBoots(ArmorMaterial material, int renderIndex) { + super(material, renderIndex, 3); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java new file mode 100644 index 0000000000..16899c4229 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.wearable.armour.base; + +public abstract class BaseArmourChest extends BaseArmour { + + public BaseArmourChest(ArmorMaterial material, int renderIndex) { + super(material, renderIndex, 1); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java new file mode 100644 index 0000000000..c3676277eb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourHelm.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.wearable.armour.base; + +public abstract class BaseArmourHelm extends BaseArmour { + + public BaseArmourHelm(ArmorMaterial material, int renderIndex) { + super(material, renderIndex, 0); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java new file mode 100644 index 0000000000..9794a713ac --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.wearable.armour.base; + +public abstract class BaseArmourLegs extends BaseArmour { + + public BaseArmourLegs(ArmorMaterial material, int renderIndex) { + super(material, renderIndex, 2); + // TODO Auto-generated constructor stub + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java new file mode 100644 index 0000000000..9fd7bf7020 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java @@ -0,0 +1,117 @@ +package gtPlusPlus.core.item.wearable.armour.hazmat; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.item.wearable.armour.ArmourLoader; +import gtPlusPlus.core.item.wearable.armour.base.BaseArmourHelm; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ArmourHazmat extends BaseArmourHelm { + + public IIcon iconHelm; + + public ArmourHazmat() { + super(ArmourLoader.TinFoilArmour, 0); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.iconHelm = ir.registerIcon(CORE.MODID + ":itemHatTinFoil"); + } + + @Override + public int getRenderIndex() { + return 0; + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.iconHelm; + } + + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return CORE.MODID + ":textures/models/TinFoil.png"; + } + + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.rare; + } + + public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { + return false; + } + + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + return super.getArmorDisplay(player, armor, slot); + } + + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + + } + + @SuppressWarnings({ "unchecked" }) + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + aList.add("DoomSquirter's protection against cosmic radiation!"); + aList.add("General paranoia makes the wearer unable to collect xp"); + aList.add("Movement speed is also reduced, to keep you safe"); + aList.add("This hat may also have other strange powers"); + } + + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, + int slot) { + return new ArmorProperties(0, 0, 0); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, + EntityLivingBase p_111207_3_) { + return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_); + } + + @Override + public void onUpdate(ItemStack aStack, World aWorld, Entity aEntity, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(aStack, aWorld, aEntity, p_77663_4_, p_77663_5_); + } + + @Override + public boolean onEntityItemUpdate(EntityItem entityItem) { + return super.onEntityItemUpdate(entityItem); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if (itemStack != null && player != null && world != null && !world.isRemote) { + if (player instanceof EntityPlayer) { + + } + } + super.onArmorTick(world, player, itemStack); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java new file mode 100644 index 0000000000..c1fe96efb5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/armour/tinfoil/ArmourTinFoilHat.java @@ -0,0 +1,183 @@ +package gtPlusPlus.core.item.wearable.armour.tinfoil; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.wearable.armour.ArmourLoader; +import gtPlusPlus.core.item.wearable.armour.base.BaseArmourHelm; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityBoat; +import net.minecraft.entity.item.EntityEnderEye; +import net.minecraft.entity.item.EntityEnderPearl; +import net.minecraft.entity.item.EntityExpBottle; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityXPOrb; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityEgg; +import net.minecraft.entity.projectile.EntityFireball; +import net.minecraft.entity.projectile.EntitySnowball; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ArmourTinFoilHat extends BaseArmourHelm { + + public IIcon iconHelm; + + public ArmourTinFoilHat() { + super(ArmourLoader.TinFoilArmour, 0); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.iconHelm = ir.registerIcon(CORE.MODID + ":itemHatTinFoil"); + } + + @Override + public int getRenderIndex() { + return 0; + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.iconHelm; + } + + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return CORE.MODID + ":textures/models/TinFoil.png"; + } + + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.uncommon; + } + + public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { + return false; + } + + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + return super.getArmorDisplay(player, armor, slot); + } + + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + aList.add("DoomSquirter's protection against cosmic radiation!"); + aList.add("General paranoia makes the wearer unable to collect xp"); + aList.add("Movement speed is also reduced, to keep you safe"); + aList.add("This hat may also have other strange powers"); + } + + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, + int slot) { + return new ArmorProperties(0, 0, 0); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, + EntityLivingBase p_111207_3_) { + return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_); + } + + @Override + public void onUpdate(ItemStack aStack, World aWorld, Entity aEntity, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(aStack, aWorld, aEntity, p_77663_4_, p_77663_5_); + } + + @Override + public boolean onEntityItemUpdate(EntityItem entityItem) { + return super.onEntityItemUpdate(entityItem); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if (itemStack != null && player != null && world != null && !world.isRemote) { + if (player instanceof EntityPlayer) { + + // Apply Slow + if (!GT_Utility.getPotion(player, Potion.moveSlowdown.id)) { + player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2, 1, true)); + } + + // Move Xp orbs away + try { + AxisAlignedBB box = player.boundingBox; + box.maxX = player.posX + 5; + box.maxY = player.posY + 5; + box.maxZ = player.posZ + 5; + box.minX = player.posX - 5; + box.minY = player.posY - 5; + box.minZ = player.posZ - 5; + @SuppressWarnings("unchecked") + List g = world.getEntitiesWithinAABBExcludingEntity(player, box); + if (g.size() > 0) { + for (Entity e : g) { + if (e != null) { + if ( + !EntityXPOrb.class.isInstance(e) && + !EntityBoat.class.isInstance(e) && + !EntitySnowball.class.isInstance(e) && + !EntityFireball.class.isInstance(e) && + !EntityEgg.class.isInstance(e) && + !EntityExpBottle.class.isInstance(e) && + !EntityEnderEye.class.isInstance(e) && + !EntityEnderPearl.class.isInstance(e) + ) { + continue; + } + else { + //Logger.INFO("Found "+e.getClass().getName()); + double distX = player.posX - e.posX; + double distZ = player.posZ - e.posZ; + double distY = e.posY + 1.5D - player.posY; + double dir = Math.atan2(distZ, distX); + double speed = 1F / e.getDistanceToEntity(player) * 0.5; + speed = -speed; + if (distY < 0) { + e.motionY += speed; + } + e.motionX = Math.cos(dir) * speed; + e.motionZ = Math.sin(dir) * speed; + } + + + } + } + } + } catch (Throwable t) { + } + } + } + + super.onArmorTick(world, player, itemStack); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java b/src/main/java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java new file mode 100644 index 0000000000..f23079bc8b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/base/BaseItemWearable.java @@ -0,0 +1,65 @@ +package gtPlusPlus.core.item.wearable.base; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; + +import net.minecraftforge.common.ISpecialArmor; + +public abstract class BaseItemWearable extends ItemArmor implements ISpecialArmor { + + public BaseItemWearable(ArmorMaterial material, int renderIndex, int armourType) { + super(material, renderIndex, armourType); + } + + public abstract int getRenderIndex(); + + + + @Override + public abstract ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, + int slot); + + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public abstract void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot); + + public void dyeArmour(ItemStack aArmour, int aColour) { + func_82813_b(aArmour, aColour); + } + + @Override + public void func_82813_b(ItemStack p_82813_1_, int p_82813_2_) { + NBTTagCompound nbttagcompound = p_82813_1_.getTagCompound(); + if (nbttagcompound == null) { + nbttagcompound = new NBTTagCompound(); + p_82813_1_.setTagCompound(nbttagcompound); + } + NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("display"); + if (!nbttagcompound.hasKey("display", 10)) { + nbttagcompound.setTag("display", nbttagcompound1); + } + nbttagcompound1.setInteger("color", p_82813_2_); + } + + @Override + public void removeColor(ItemStack p_82815_1_) { + NBTTagCompound nbttagcompound = p_82815_1_.getTagCompound(); + if (nbttagcompound != null) { + NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("display"); + if (nbttagcompound1.hasKey("color")) { + nbttagcompound1.removeTag("color"); + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java b/src/main/java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java new file mode 100644 index 0000000000..1f8009e54a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/wearable/hazmat/ItemArmorHazmatEx.java @@ -0,0 +1,31 @@ +package gtPlusPlus.core.item.wearable.hazmat; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.ic2.CustomInternalName; +import ic2.core.IC2; +import ic2.core.init.InternalName; +import ic2.core.item.armor.ItemArmorHazmat; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; + +public class ItemArmorHazmatEx extends ItemArmorHazmat { + + public static void init() { + GregtechItemList.Armour_Hazmat_Advanced_Helmet.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatHelmetEx, 0))); + GregtechItemList.Armour_Hazmat_Advanced_Chest.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatChestEx, 1))); + GregtechItemList.Armour_Hazmat_Advanced_Legs.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatLegsEx, 2))); + GregtechItemList.Armour_Hazmat_Advanced_Boots.set(new ItemStack(new ItemArmorHazmatEx(CustomInternalName.aHazmatBootsEx, 3))); + } + + private ItemArmorHazmatEx(InternalName internalName, int type) { + super(internalName, type); + this.setMaxDamage(256); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + int suffix = this.armorType == 2 ? 2 : 1; + return IC2.textureDomain + ":textures/armor/" + "hazmatEx_" + suffix + ".png"; + } + +} diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java new file mode 100644 index 0000000000..dfd536d21c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/lib/CORE.java @@ -0,0 +1,363 @@ +package gtPlusPlus.core.lib; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +import com.mojang.authlib.GameProfile; + +import cpw.mods.fml.common.FMLCommonHandler; +import gregtech.api.GregTech_API; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.util.FakePlayerFactory; + +public class CORE { + + //import cpw.mods.fml.common.Optional; + + //Analytics handler + //public static SegmentAnalytics mHelper; + + public static Map PlayerCache; + + //Math Related + public static final float PI = (float) Math.PI; + public static volatile Random RANDOM = new XSTR(); + + //Env. Variables + public static Configuration Config; + + public static boolean DEVENV = false; + public static boolean NBT_PERSISTENCY_PATCH_APPLIED = false; + //Only can be set in Dev, no config or setting elsewhere. + public static final boolean LOAD_ALL_CONTENT = false;; + + //Mod Variables + + public static final String name = "GT++"; + public static final String MODID = "miscutils"; + public static final String VERSION = "1.7.15-GTNH"; + + //Tweakables + public static int EVERGLADES_ID = 227; + public static int EVERGLADESBIOME_ID = 238; + public static int AUSTRALIA_ID = 228; + public static int AUSTRALIA_BIOME_DESERT_1_ID = 239; + public static int AUSTRALIA_BIOME_DESERT_2_ID = 240; + public static int AUSTRALIA_BIOME_DESERT_3_ID = 241; + public static int AUSTRALIA_BIOME_PLAINS_ID = 242; + public static int AUSTRALIA_BIOME_OUTBACK_ID = 243; + public static int AUSTRALIA_BIOME_OCEAN_ID = 244; + public static int AUSTRALIA_BIOME_FOREST_ID = 245; + + //GT Vars; + public static final int GREG_FIRST_ID = 760; + public static final boolean MAIN_GREGTECH_5U_EXPERIMENTAL_FORK = Meta_GT_Proxy.areWeUsingGregtech5uExperimental(); + public static final int GREGTECH_API_VERSION = GregTech_API.VERSION; + public static int turbineCutoffBase = 75000; + + //GT++ Fake Player Profile + public static final GameProfile gameProfile = new GameProfile(UUID.nameUUIDFromBytes("gtplusplus.core".getBytes()), "[GT++]"); + public static final WeakHashMap fakePlayerCache = new WeakHashMap(); + //Tooltips; + public static final String GT_Tooltip = "Added by: " + EnumChatFormatting.DARK_GREEN+"Alkalus "+EnumChatFormatting.GRAY+"- "+EnumChatFormatting.RED+"[GT++]"; + public static final String GT_Tooltip_Builder = "" + EnumChatFormatting.DARK_GREEN+"Alkalus "+EnumChatFormatting.GRAY+"- "+EnumChatFormatting.RED+"[GT++]"; + public static final String GT_Tooltip_Radioactive = EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.GREEN+"Radioactive! "+EnumChatFormatting.GOLD+" Avoid direct handling without hazmat protection."; + public static final String noItem = ""; + + //Because I want to be lazy Gregtech New Horizons Var. + public static boolean GTNH = false; + //Because I want to be lazy. Beyond Reality Classic Var. + public static boolean BRC = false; + + public static final String SEPERATOR = "/"; + + + /** + * Lists/Maps + */ + + //Burnables List + public static List> burnables = new ArrayList>(); + + + //TesseractMapss + public static final Map> sTesseractGeneratorOwnershipMap = new HashMap>(); + public static final Map> sTesseractTerminalOwnershipMap = new HashMap>(); + + //BookMap + public static final Map sBookList = new ConcurrentHashMap(); + + + + + /** + * Some Gregtech Material and Recipe Variables + */ + + @Deprecated + public static IGregtech_RecipeAdder sRecipeAdder; + public static IGregtech_RecipeAdder RA; + + public static final GT_Materials[] sMU_GeneratedMaterials = new GT_Materials[1000]; + + /** + * File Paths and Resource Paths + */ + + public static final String + TEX_DIR = "textures/", + TEX_DIR_GUI = TEX_DIR + "gui/", + TEX_DIR_ITEM = TEX_DIR + "items/", + TEX_DIR_BLOCK = TEX_DIR + "blocks/", + TEX_DIR_ENTITY = TEX_DIR + "entity/", + TEX_DIR_ASPECTS = TEX_DIR + "aspects/", + TEX_DIR_FLUIDS = TEX_DIR_BLOCK + "fluids/", + RES_PATH = MODID + ":" + TEX_DIR, + RES_PATH_GUI = MODID + ":" + TEX_DIR_GUI, + RES_PATH_ITEM = MODID + ":" + TEX_DIR_ITEM, + RES_PATH_BLOCK = MODID + ":" + TEX_DIR_BLOCK, + RES_PATH_ENTITY = MODID + ":" + TEX_DIR_ENTITY, + RES_PATH_ASPECTS = MODID + ":" + TEX_DIR_ASPECTS, + RES_PATH_FLUIDS = MODID + ":" + TEX_DIR_FLUIDS; + + + + + /** Used to create a {@link EntityPlayer} instance from {@link FakePlayerFactory}. + * If this instance already exists in the cache, we will return that instead. + * These instances are held via weak reference, if the world object is unloaded, they too will be removed. + * This is the suggested way to handle them, as suggested by Forge. + * + * @param world - The {@link World} object for which you want to check for in the cache. + * This object is used as a weak reference in a {@link WeakHashMap}. + * @return - An {@link EntityPlayerMP} instance, returned either from cache or created and cached prior to return. + */ + public static EntityPlayerMP getFakePlayer(World world) { + if (fakePlayerCache.get(world) == null) { + fakePlayerCache.put(world, FakePlayerFactory.get((WorldServer) world, CORE.gameProfile)); + } + return fakePlayerCache.get(world); + } + + + + + + + + + + + + + + + + + + /* + * Config Switch Class + */ + + public static class ConfigSwitches { + //Debug + public static boolean disableEnderIOIntegration = false; + public static boolean disableEnderIOIngotTooltips = false; + public static boolean MACHINE_INFO = true; + public static boolean showHiddenNEIItems = false; + public static boolean dumpItemAndBlockData = false; + + //Tools + public static boolean enableSkookumChoochers = true; + public static boolean enableMultiSizeTools = true; + + //Block Drops + public static int chanceToDropDrainedShard = 196; + public static int chanceToDropFluoriteOre = 32; + + //Machine Related + public static boolean enableAlternativeBatteryAlloy = false; + public static boolean enableThaumcraftShardUnification = false; + public static boolean disableIC2Recipes = false; + public static boolean enableAlternativeDivisionSigilRecipe = false; + public static int boilerSteamPerSecond = 750; + public static final boolean requireControlCores = false; + + //Feature Related + public static boolean enableCustomCapes = false; + public static boolean enableCustomCircuits = true; + public static boolean enableOldGTcircuits = false; + public static boolean disableZombieReinforcement = false; + public static int enableWatchdogBGM = CORE_Preloader.enableWatchdogBGM; + + //GT Fixes + public static boolean enableNitroFix = false; + public static boolean enableSulfuricAcidFix = false; + public static boolean enableAnimatedTurbines = true; + public static boolean enableHarderRecipesForHighTierCasings = true; + + //Single Block Machines + public static boolean enableMachine_SolarGenerators = false; + public static boolean enableMachine_Safes = true; + public static boolean enableMachine_Dehydrators = true; + public static boolean enableMachine_SteamConverter = true; + public static boolean enableMachine_FluidTanks = true; + public static boolean enableMachine_RocketEngines = true; + public static boolean enableMachine_GeothermalEngines = true; + public static boolean enableMachine_WorldAccelerators = true; + public static boolean enableMachine_Tesseracts = true; + public static boolean enableMachine_SimpleWasher = true; + public static boolean enableMachine_Pollution = true; + public static boolean enableMachine_ComponentAssemblers = false; + public static boolean enableCustom_Pipes = true; + public static boolean enableCustom_Cables = true; + public static boolean enableMachine_RF_Convetor = false; + + //Multiblocks + public static boolean enableMultiblock_AlloyBlastSmelter = true; + public static boolean enableMultiblock_IndustrialCentrifuge = true; + public static boolean enableMultiblock_IndustrialCokeOven = true; + public static boolean enableMultiblock_IndustrialElectrolyzer = true; + public static boolean enableMultiblock_IndustrialMacerationStack = true; + public static boolean enableMultiblock_IndustrialPlatePress = true; + public static boolean enableMultiblock_IndustrialWireMill = true; + public static boolean enableMultiblock_IronBlastFurnace = true; + public static boolean enableMultiblock_MatterFabricator = true; + public static boolean enableMultiblock_MultiTank = true; + public static boolean enableMultiblock_PowerSubstation = true; + public static boolean enableMultiblock_LiquidFluorideThoriumReactor = true; + public static boolean enableMultiblock_NuclearFuelRefinery = true; + public static boolean enableMultiblock_TreeFarmer = true; + public static boolean enableMultiblock_IndustrialSifter = true; + public static boolean enableMultiblock_IndustrialThermalCentrifuge = true; + public static boolean enableMultiblock_IndustrialWashPlant = true; + public static boolean enableMultiblock_LargeAutoCrafter = true; + public static boolean enableMultiblock_ThermalBoiler = true; + public static boolean enableMultiblock_IndustrialCuttingMachine = true; + public static boolean enableMultiblock_IndustrialFishingPort = true; + public static boolean enableMultiblock_IndustrialExtrudingMachine = true; + public static boolean enableMultiblock_IndustrialMultiMachine = true; + public static boolean enableMultiblock_Cyclotron = true; + + //Visuals + public static boolean enableTreeFarmerParticles = true; + public static boolean useGregtechTextures = true; + + //Pollution + public static int pollutionPerSecondMultiPackager = 40; + public static int pollutionPerSecondMultiIndustrialAlloySmelter = 300; + public static int pollutionPerSecondMultiIndustrialArcFurnace = 2400; + public static int pollutionPerSecondMultiIndustrialCentrifuge = 300; + public static int pollutionPerSecondMultiIndustrialCokeOven = 80; + public static int pollutionPerSecondMultiIndustrialCuttingMachine = 160; + public static int pollutionPerSecondMultiIndustrialDehydrator = 500; + public static int pollutionPerSecondMultiIndustrialElectrolyzer = 300; + public static int pollutionPerSecondMultiIndustrialExtruder = 1000; + public static int pollutionPerSecondMultiIndustrialMacerator = 400; + public static int pollutionPerSecondMultiIndustrialMixer = 800; + public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal = 400; + public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid = 400; + public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc = 600; + public static int pollutionPerSecondMultiIndustrialPlatePress_ModeForming = 240; + public static int pollutionPerSecondMultiIndustrialPlatePress_ModeBending = 480; + public static int pollutionPerSecondMultiIndustrialSifter = 40; + public static int pollutionPerSecondMultiIndustrialThermalCentrifuge = 1000; + public static int pollutionPerSecondMultiIndustrialVacuumFreezer = 500; + public static int pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath = 400; + public static int pollutionPerSecondMultiIndustrialWashPlant_ModeWasher = 100; + public static int pollutionPerSecondMultiIndustrialWireMill = 100; + public static int pollutionPerSecondMultiIsaMill = 1280; + public static int pollutionPerSecondMultiAdvDistillationTower_ModeDistillery = 240; + public static int pollutionPerSecondMultiAdvDistillationTower_ModeDT = 480; + public static int pollutionPerSecondMultiAdvEBF = 500; + public static int pollutionPerSecondMultiAdvImplosion = 5000; + public static int pollutionPerSecondMultiABS = 200; + public static int pollutionPerSecondMultiCyclotron = 200; + public static int pollutionPerSecondMultiIndustrialFishingPond = 20; + public static int pollutionPerSecondMultiLargeRocketEngine; + public static int pollutionPerSecondMultiLargeSemiFluidGenerator = 1280; + public static int pollutionPerSecondMultiMassFabricator = 40; + public static int pollutionPerSecondMultiRefinery = 4000; + public static int pollutionPerSecondMultiGeneratorArray; + public static int pollutionPerSecondMultiTreeFarm = 100; + public static int pollutionPerSecondMultiFrothFlotationCell = 0; + public static int pollutionPerSecondMultiAutoCrafter = 500; + public static int pollutionPerSecondMultiThermalBoiler = 700; + public static int pollutionPerSecondMultiAlgaePond = 0; + //pollution single blocks + public static int basePollutionPerSecondSemiFluidGenerator = 40; + public static double[] pollutionReleasedByTierSemiFluidGenerator = new double[]{0,2.0,4.0,8.0}; + public static int basePollutionPerSecondBoiler = 35; + public static double[] pollutionReleasedByTierBoiler = new double[]{0,1.0,1.43, 1.86}; + public static int baseMinPollutionPerSecondRocketFuelGenerator = 250; + public static int baseMaxPollutionPerSecondRocketFuelGenerator = 2000; + public static double[] pollutionReleasedByTierRocketFuelGenerator = new double[]{0,0,0,0,1,2,3}; + public static int basePollutionPerSecondGeothermalGenerator = 100; + public static double[] pollutionReleasedByTierGeothermalGenerator = new double[]{0,0,0,0,1,1,1}; + + } + + public static class Everglades{ + public static final String MODID = "ToxicEverglades"; + public static final String NAME = "GT++ Toxic Everglades"; + public static final String VERSION = "0.1"; + } + + public static class Australia{ + public static final String MODID = "Australia"; + public static final String NAME = "GT++ Australia"; + public static final String VERSION = "0.1"; + } + + + public static final void crash() { + crash("Generic Crash"); + } + + public static final void crash(String aReason) { + Logger.INFO("=========================================================="); + Logger.INFO("[GT++ CRASH]"); + Logger.INFO("=========================================================="); + Logger.INFO("Oooops..."); + Logger.INFO("This should only happy in a development environment or when something really bad happens."); + Logger.INFO("Reason: "+aReason); + Logger.INFO("=========================================================="); + Logger.INFO("Called from: "+ReflectionUtils.getMethodName(1)); + Logger.INFO(ReflectionUtils.getMethodName(2)); + Logger.INFO(ReflectionUtils.getMethodName(3)); + Logger.INFO(ReflectionUtils.getMethodName(4)); + Logger.INFO(ReflectionUtils.getMethodName(5)); + Logger.INFO(ReflectionUtils.getMethodName(6)); + Logger.INFO(ReflectionUtils.getMethodName(7)); + Logger.INFO(ReflectionUtils.getMethodName(8)); + Logger.INFO(ReflectionUtils.getMethodName(9)); + Logger.INFO(ReflectionUtils.getMethodName(10)); + Logger.INFO(ReflectionUtils.getMethodName(11)); + Logger.INFO(ReflectionUtils.getMethodName(12)); + Logger.INFO(ReflectionUtils.getMethodName(13)); + Logger.INFO(ReflectionUtils.getMethodName(14)); + Logger.INFO(ReflectionUtils.getMethodName(15)); + FMLCommonHandler.instance().exitJava(0, true); + } + + public static final void gc() { + System.gc(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/lib/LoadedMods.java b/src/main/java/gtPlusPlus/core/lib/LoadedMods.java new file mode 100644 index 0000000000..1eb8351d65 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/lib/LoadedMods.java @@ -0,0 +1,348 @@ +package gtPlusPlus.core.lib; + +import static gtPlusPlus.core.lib.CORE.*; + +import java.util.HashMap; + +import cpw.mods.fml.common.Loader; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechTextures; +import gtPlusPlus.xmod.gregtech.recipes.GregtechRecipeAdder; + +public class LoadedMods { + + //Initialize Variables + public static boolean Gregtech = false; + public static boolean PlayerAPI = false; + public static boolean BuildCraft = false; + public static boolean EnderIO = false; + public static boolean Big_Reactors = false; + public static boolean IndustrialCraft2 = false; + public static boolean IndustrialCraft2Classic = false; + public static boolean Simply_Jetpacks = false; + public static boolean RFTools = false; + public static boolean Thaumcraft = false; + public static boolean Baubles = false; + public static boolean Extra_Utils = false; + public static boolean PneumaticCraft = false; + public static boolean MorePlanets = false; + public static boolean ForbiddenMagic = false; + public static boolean CompactWindmills = false; + public static boolean Railcraft = false; + public static boolean ImmersiveEngineering = false; + public static boolean Growthcraft = false; + public static boolean CoFHCore = false; + public static boolean Forestry = false; + public static boolean MagicBees = false; + public static boolean ExtraBees = false; + public static boolean Psychedelicraft = false; + public static boolean MiscUtils = true; //Dummy For MetaData Lookups in MT Wrapper + public static boolean ThermalFoundation = false; + public static boolean IHL = false; + public static boolean OpenComputers = false; //OpenComputers + public static boolean OpenBlocks = false; + public static boolean Computronics = false; //computronics + public static boolean DreamCraft = false; //GT: New Horizons + public static boolean BeyondRealityCore = false; //Beyond Reality - Probably Classic + public static boolean BiomesOPlenty = false; + public static boolean PamsHarvestcraft = false; + public static boolean GalacticraftCore = false; + public static boolean Mekanism = false; + public static boolean RedTech = false; //RedMage's Mod + public static boolean TecTech = false; //Technus' Mod + public static boolean KekzTech = false; //KekzDealers' Mod + public static boolean TiCon = false; + public static boolean StevesCarts = false; + public static boolean Witchery = false; + public static boolean Waila = false; + public static boolean CropsPlusPlus = false; //Barts Crop Mod + public static boolean Reliquary = false; + public static boolean SpiceOfLife = false; + + + + private static int totalMods; + @SuppressWarnings("deprecation") + public static void checkLoaded(){ + Logger.INFO("Looking for optional mod prereqs."); + if (isModLoaded("gregtech") ){ + Gregtech = true; + Logger.INFO("Components enabled for: Gregtech"); + if (Gregtech){ + try { + CORE.sRecipeAdder = CORE.RA = new GregtechRecipeAdder(); + Logger.INFO("Created Gregtech recipe handler."); + GregtechTextures.BlockIcons.VOID.name(); + GregtechTextures.ItemIcons.VOID.name(); + Logger.INFO("Created Gregtech texture handler."); + } catch (final NullPointerException e){ + Logger.INFO("Could NOT create a Gregtech recipe handler."); + } + } + + totalMods++; + } + if (isModLoaded("dreamcraft")){ + DreamCraft = true; + GTNH = true; + Logger.INFO("Components enabled for: DreamCraft"); + Logger.INFO("Components enabled for: GT: New Horizons"); + totalMods++; + } + if (isModLoaded("beyondrealitycore")){ + BeyondRealityCore = true; + BRC = true; + Logger.INFO("Components enabled for: Beyond Reality"); + totalMods++; + } + if (isModLoaded("PlayerAPI")){ + PlayerAPI = true; + Logger.INFO("Components enabled for: PlayerAPI"); + totalMods++; + } + if (isModLoaded("berriespp")) { + CropsPlusPlus = true; + Logger.INFO("Components enabled for: Crops++"); + totalMods++; + } + if (isModLoaded("xreliquary")) { + Reliquary = true; + Logger.INFO("Components enabled for: Reliquary"); + totalMods++; + } + if (isModLoaded("TConstruct")){ + TiCon = true; + Logger.INFO("Components enabled for: Tinkers Construct"); + totalMods++; + } + if (isModLoaded("BuildCraft")){ + BuildCraft = true; + Logger.INFO("Components enabled for: BuildCraft"); + totalMods++; + } + if ((isModLoaded("EnderIO")) && !ConfigSwitches.disableEnderIOIntegration){ + EnderIO = true; + Logger.INFO("Components enabled for: EnderIO"); + totalMods++; + } + if (isModLoaded("BigReactors")){ + Big_Reactors = true; + Logger.INFO("Components enabled for: Big Reactors"); + totalMods++; + } + if (isModLoaded("IC2")){ + IndustrialCraft2 = true; + Logger.INFO("Components enabled for: IndustrialCraft2"); + totalMods++; + } + if (isModLoaded("IC2-Classic-Spmod")){ + IndustrialCraft2Classic = true; + Logger.INFO("Components enabled for: IndustrialCraft2-Classic"); + totalMods++; + } + if (isModLoaded("simplyjetpacks")){ + Simply_Jetpacks = true; + Logger.INFO("Components enabled for: Simply Jetpacks"); + totalMods++; + } + if (isModLoaded("rftools")){ + RFTools = true; + Logger.INFO("Components enabled for: RFTools"); + totalMods++; + } + if (isModLoaded("StevesCarts")){ + StevesCarts = true; + Logger.INFO("Components enabled for: StevesCarts"); + totalMods++; + } + if (isModLoaded("OpenBlocks")){ + OpenBlocks = true; + Logger.INFO("Components enabled for: OpenBlocks"); + totalMods++; + } + if (isModLoaded("Thaumcraft")){ + Thaumcraft = true; + Logger.INFO("Components enabled for: Thaumcraft"); + totalMods++; + } + if (isModLoaded("BiomesOPlenty")){ + BiomesOPlenty = true; + Logger.INFO("Components enabled for: BiomesOPlenty"); + totalMods++; + } + if (isModLoaded("ExtraUtilities")){ + Extra_Utils = true; + Logger.INFO("Components enabled for: Extra_Utils"); + totalMods++; + } + if (isModLoaded("harvestcraft")){ + PamsHarvestcraft = true; + Logger.INFO("Components enabled for: PamsHarvestcraft"); + totalMods++; + } + if (isModLoaded("PneumaticCraft")){ + PneumaticCraft = true; + Logger.INFO("Components enabled for: PneumaticCraft"); + totalMods++; + } + if (isModLoaded("MorePlanet")){ + MorePlanets = true; + Logger.INFO("Components enabled for: MorePlanets"); + totalMods++; + } + if (isModLoaded("ForbiddenMagic")){ + ForbiddenMagic = true; + Logger.INFO("Components enabled for: ForbiddenMagic"); + totalMods++; + } + if (isModLoaded("CompactWindmills")){ + CompactWindmills = true; + Logger.INFO("Components enabled for: CompactWindmills"); + totalMods++; + } + if (isModLoaded("Railcraft")){ + Railcraft = true; + Logger.INFO("Components enabled for: Railcraft"); + totalMods++; + } + if (isModLoaded("Waila")){ + Waila = true; + Logger.INFO("Components enabled for: WAILA"); + totalMods++; + } + if (isModLoaded("SpiceOfLife")){ + SpiceOfLife = true; + Logger.INFO("Components enabled for: Spice Of Life"); + totalMods++; + } + if (isModLoaded("Mekanism")){ + Mekanism = true; + Logger.INFO("Components enabled for: Mekanism - This feature is not configurable and balances Mekanism to suit GT."); + totalMods++; + } + if (isModLoaded("Growthcraft")){ + Logger.INFO("Growthcraft Version: "+getModVersion("Growthcraft")); + if (getModVersion("Growthcraft").equals("1.7.10-2.3.1")){ + //Load Growthcraft Compat + Growthcraft = true; + Logger.INFO("Components enabled for: Growthcraft"); + totalMods++; + } + else { + Growthcraft = false; + Logger.INFO("Growthcraft found, but the version was too new. I will update GC support eventually."); + } + } + if (isModLoaded("CoFHCore")){ + CoFHCore = true; + Logger.INFO("Components enabled for: CoFHCore"); + totalMods++; + } + if (isModLoaded("Forestry")){ + Forestry = true; + Logger.INFO("Components enabled for: Forestry"); + totalMods++; + } + if (isModLoaded("MagicBees")){ + MagicBees = true; + Logger.INFO("Components enabled for: MagicBees"); + totalMods++; + } + if (isModLoaded("psychedelicraft")){ + Psychedelicraft = true; + Logger.INFO("Components enabled for: Psychedelicraft"); + totalMods++; + } + if (isModLoaded("ImmersiveEngineering")){ + ImmersiveEngineering = true; + Logger.INFO("Components enabled for: ImmersiveEngineering"); + totalMods++; + } + if (isModLoaded("ExtraBees")){ + ExtraBees = true; + Logger.INFO("Components enabled for: ExtraBees"); + totalMods++; + } + if (isModLoaded("ThermalFoundation") == false){ + ThermalFoundation = false; + Logger.INFO("Components enabled for: ThermalFoundation - This feature will disable itself if you add TF."); + totalMods++; + } + else if (isModLoaded("ThermalFoundation")){ + ThermalFoundation = true; + Logger.INFO("Components disabled for: ThermalFoundation - This feature will enable itself if you remove TF."); + //totalMods++; + } + if (isModLoaded("ihl")){ + IHL = true; + Logger.INFO("Components enabled for: IHL"); + totalMods++; + } + if (isModLoaded("Baubles")){ + Baubles = true; + Logger.INFO("Components enabled for: Baubles"); + totalMods++; + } + if (isModLoaded("GalacticraftCore")){ + GalacticraftCore = true; + Logger.INFO("Components enabled for: Galacticraft Core"); + totalMods++; + } + if (isModLoaded("OpenComputers")){ + OpenComputers = true; + Logger.INFO("Components enabled for: OpenComputers"); + totalMods++; + } + if (isModLoaded("computronics")){ + Computronics = true; + Logger.INFO("Components disabled for: Computronics - This feature will enable itself if you remove Computronics."); + totalMods++; + } + else { + Logger.INFO("Components enabled for: Computronics - This feature will disable itself if you add Computronics."); + } + if (isModLoaded("GTRedtech")){ + RedTech = true; + Logger.INFO("Components enabled for: GTRedtech"); + totalMods++; + } + if (isModLoaded("tectech")){ + TecTech = true; + Logger.INFO("Components enabled for: TecTech"); + totalMods++; + } + if (isModLoaded("kekztech")){ + KekzTech = true; + Logger.INFO("Components enabled for: KekzTech"); + totalMods++; + } + if (isModLoaded("witchery")){ + Witchery = true; + Logger.INFO("Components enabled for: Witchery"); + totalMods++; + } + + Logger.INFO("Content found for "+totalMods+" mods"); + + } + + public static String getModVersion(final String modName){ + final String ver = cpw.mods.fml.common.FMLCommonHandler.instance().findContainerFor(modName).getVersion(); + return ver; + } + + private static final HashMap mLoadedModCache = new HashMap(); + + public static boolean isModLoaded(String aModName) { + Boolean aResult = mLoadedModCache.get(aModName); + if (aResult == null) { + boolean aTemp = Loader.isModLoaded(aModName); + mLoadedModCache.put(aModName, aTemp); + aResult = aTemp; + } + return aResult; + } + +} diff --git a/src/main/java/gtPlusPlus/core/lib/VanillaColours.java b/src/main/java/gtPlusPlus/core/lib/VanillaColours.java new file mode 100644 index 0000000000..9a7a82cb1f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/lib/VanillaColours.java @@ -0,0 +1,28 @@ +package gtPlusPlus.core.lib; + +import gtPlusPlus.core.util.Utils; + +public enum VanillaColours { + + BONE_MEAL(249, 255, 254), INK_BLACK(29, 29, 33), COCOA_BEANS(131, 84, 50), LAPIS_LAZULI(60, 68, 170), + DYE_WHITE(249, 255, 254), DYE_BLACK(29, 29, 33), DYE_RED(176, 46, 38), DYE_GREEN(94, 124, 22), + DYE_CYAN(22, 156, 156), DYE_PINK(243, 139, 170), DYE_LIME(128, 199, 31), DYE_YELLOW(254, 216, 61), + DYE_ORANGE(249, 128, 29), DYE_BROWN(131, 84, 50), DYE_LIGHT_BLUE(58, 179, 218), DYE_LIGHT_PURPLE(199, 78, 189), + DYE_LIGHT_GRAY(157, 157, 151), DYE_DARK_BLUE(60, 68, 170), DYE_DARK_PURPLE(137, 50, 184), DYE_DARK_GRAY(71, 79, 82); + + private final int r, g, b; + + private VanillaColours(int aR, int aG, int aB) { + r = aR; + g = aG; + b = aB; + } + + public short[] getAsShort() { + return new short[] { (short) r, (short) g, (short) b }; + } + + public int getAsInt() { + return Utils.rgbtoHexValue(r, g, b); + } +} diff --git a/src/main/java/gtPlusPlus/core/material/ALLOY.java b/src/main/java/gtPlusPlus/core/material/ALLOY.java new file mode 100644 index 0000000000..fd7547970c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/ALLOY.java @@ -0,0 +1,1009 @@ +package gtPlusPlus.core.material; + +import gregtech.api.enums.Materials; + +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.minecraft.MaterialUtils; + +public final class ALLOY { + + //Just some GT Alloys that I need within mine. + public static final Material BRONZE = MaterialUtils.generateMaterialFromGtENUM(Materials.Bronze); + public static final Material STEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.Steel); + public static final Material STEEL_BLACK = MaterialUtils.generateMaterialFromGtENUM(Materials.BlackSteel); + public static final Material INVAR = MaterialUtils.generateMaterialFromGtENUM(Materials.Invar); + public static final Material KANTHAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Kanthal); + public static final Material NICHROME = MaterialUtils.generateMaterialFromGtENUM(Materials.Nichrome); + public static final Material TUNGSTENSTEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.TungstenSteel); + public static final Material STAINLESS_STEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.StainlessSteel); + public static final Material OSMIRIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmiridium); + + public static final Material ENERGYCRYSTAL = new Material( + "Energy Crystal", //Material Name + MaterialState.SOLID, //State + new short[]{228, 255, 0, 0}, //Material Colour + 5660, //Melting Point in C + 7735, //Boiling Point in C + 150, //Protons + 80, //Neutrons + true, //Uses Blast furnace? + "⬟ ⯂ ⬢ ⬣ ⯃ ⯄", + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().AER, 5), + new MaterialStack(ELEMENT.getInstance().IGNIS, 5), + new MaterialStack(ELEMENT.getInstance().TERRA, 5), + new MaterialStack(ELEMENT.getInstance().AQUA, 5) + }); + + public static final Material BLOODSTEEL = new Material( + "Blood Steel", //Material Name + MaterialState.SOLID, //State + new short[]{142, 28, 0, 0}, //Material Colour + 2500, //Melting Point in C + 0, //Boiling Point in C + 100, //Protons + 100, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 5), + new MaterialStack(ELEMENT.getInstance().IGNIS, 5) + }); + + public static final Material STABALLOY = new Material( + "Staballoy", //Material Name + MaterialState.SOLID, //State + new short[]{68, 75, 66, 0}, //Material Colour + 3450, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().URANIUM238, 9), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 1) + }); + + public static final Material TANTALLOY_60 = new Material( + "Tantalloy-60", //Material Name + MaterialState.SOLID, //State + new short[]{213, 231, 237, 0}, //Material Colour + 3025, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 4), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 46) + }); + + public static final Material TANTALLOY_61 = new Material( + "Tantalloy-61", //Material Name + MaterialState.SOLID, //State + new short[]{193, 211, 217, 0}, //Material Colour + 3030, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.TANTALLOY_60, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 8) + }); + + public static final Material TUMBAGA = new Material( + "Tumbaga", //Material Name + MaterialState.SOLID, //State + new short[]{255,178,15, 0}, //Material Colour + -1, + -1, + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().GOLD, 70), + new MaterialStack(ELEMENT.getInstance().COPPER, 30) + }); + + public static final Material POTIN = new Material( + "Potin", //Material Name + MaterialState.SOLID, //State + new short[]{201,151,129, 0}, //Material Colour + -1, + -1, + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().LEAD, 40), + new MaterialStack(ALLOY.BRONZE, 40), + new MaterialStack(ELEMENT.getInstance().TIN, 20) + }); + + /*public static final Material BEDROCKIUM = new Material( + "Bedrockium", //Material Name + new short[]{32, 32, 32, 0}, //Material Colour + 7735, //Melting Point in C + 0, //Boiling Point in C + 100, //Protons + 100, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + null);*/ + + public static final Material INCONEL_625 = new Material( + "Inconel-625", //Material Name + MaterialState.SOLID, //State + new short[]{128, 200, 128, 0}, //Material Colour + 2425, //Melting Point in C + 3758, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NICKEL, 3), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 7), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 10), + new MaterialStack(INVAR, 10), + new MaterialStack(NICHROME, 13) + }); + + public static final Material INCONEL_690 = new Material( + "Inconel-690", //Material Name + MaterialState.SOLID, //State + new short[]{118, 220, 138, 0}, //Material Colour + 3425, //Melting Point in C + 4895, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 5), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 10), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 10), + new MaterialStack(NICHROME, 15) + }); + + public static final Material INCONEL_792 = new Material( + "Inconel-792", //Material Name + MaterialState.SOLID, //State + new short[]{108, 240, 118, 0}, //Material Colour + 3425, //Melting Point in C + 6200, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NICKEL, 20), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 10), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 20), + new MaterialStack(NICHROME, 10) + }); + + public static final Material NITINOL_60 = new Material( + "Nitinol 60", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 5651, //Melting Point in C + 8975, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NICKEL, 40), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 60) + }); + + + public static final Material ZERON_100 = new Material( + "Zeron-100", //Material Name + MaterialState.SOLID, //State + new short[]{180, 180, 20, 0}, //Material Colour + 6100, + 9785, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 26), + new MaterialStack(ELEMENT.getInstance().NICKEL, 6), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 4), + new MaterialStack(ELEMENT.getInstance().COPPER, 20), + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 4), + new MaterialStack(ALLOY.STEEL, 40) + }); + + public static final Material MARAGING250 = new Material( + "Maraging Steel 250", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 2413, //Melting Point in C + 4555, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 64), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 4), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), + new MaterialStack(ELEMENT.getInstance().NICKEL, 16), + new MaterialStack(ELEMENT.getInstance().COBALT, 8), + }); + + public static final Material MARAGING300 = new Material( + "Maraging Steel 300", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 2413, //Melting Point in C + 4555, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 64), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 4), + new MaterialStack(ELEMENT.getInstance().NICKEL, 16), + new MaterialStack(ELEMENT.getInstance().COBALT, 8), + }); + + public static final Material MARAGING350 = new Material( + "Maraging Steel 350", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 2413, //Melting Point in C + 4555, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 64), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 4), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 4), + new MaterialStack(ELEMENT.getInstance().NICKEL, 16), + new MaterialStack(ELEMENT.getInstance().COBALT, 8), + }); + + public static final Material AQUATIC_STEEL = new Material( + "Watertight Steel", //Material Name + MaterialState.SOLID, //State + new short[] {120, 120, 180}, //Material Colour + 2673, //Melting Point in C + 4835, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 60), + new MaterialStack(ELEMENT.getInstance().CARBON, 10), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 5), + new MaterialStack(ELEMENT.getInstance().SILICON, 10), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 5), + new MaterialStack(ELEMENT.getInstance().SULFUR, 5), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 5) + }); + + public static final Material STELLITE = new Material( + "Stellite", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 4310, //Melting Point in C + 6250, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().COBALT, 35), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 35), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 20), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 10) + }); + + public static final Material TALONITE = new Material( + "Talonite", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 3454, //Melting Point in C + 5500, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().COBALT, 40), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 30), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 20), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 10) + }); + + public static final Material HASTELLOY_W = new Material( + "Hastelloy-W", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 3350, //Melting Point in C + 5755, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 06), + new MaterialStack(ELEMENT.getInstance().COBALT, 2), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 24), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 6), + new MaterialStack(ELEMENT.getInstance().NICKEL, 62) + }); + + public static final Material HASTELLOY_X = new Material( + "Hastelloy-X", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 3350, //Melting Point in C + 5755, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 18), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 2), + new MaterialStack(ELEMENT.getInstance().SILICON, 2), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 8), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 22), + new MaterialStack(ELEMENT.getInstance().NICKEL, 48) + }); + + public static final Material HASTELLOY_N = new Material( + "Hastelloy-N", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 4350, //Melting Point in C + 6875, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 8), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 16), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 8), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 8), + new MaterialStack(ELEMENT.getInstance().NICKEL, 60) + }); + + public static final Material HASTELLOY_C276 = new Material( + "Hastelloy-C276", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 4350, //Melting Point in C + 6520, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().COBALT, 2), + new MaterialStack(ELEMENT.getInstance().MOLYBDENUM, 16), + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 2), + new MaterialStack(ELEMENT.getInstance().COPPER, 2), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 14), + new MaterialStack(ELEMENT.getInstance().NICKEL, 64) + }); + + public static final Material INCOLOY_020 = new Material( + "Incoloy-020", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 3425, //Melting Point in C + 5420, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 40), + new MaterialStack(ELEMENT.getInstance().COPPER, 4), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 20), + new MaterialStack(ELEMENT.getInstance().NICKEL, 36) + }); + + public static final Material INCOLOY_DS = new Material( + "Incoloy-DS", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 3425, //Melting Point in C + 5420, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 46), + new MaterialStack(ELEMENT.getInstance().COBALT, 18), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 18), + new MaterialStack(ELEMENT.getInstance().NICKEL, 18) + }); + + public static final Material INCOLOY_MA956 = new Material( + "Incoloy-MA956", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 4425, //Melting Point in C + 6875, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 64), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 12), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 20), + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 4) + }); + + public static final Material TUNGSTEN_CARBIDE = new Material( + "Tungsten Carbide", //Material Name + MaterialState.SOLID, //State + new short[]{44, 44, 44, 0}, //Material Colour + 3422, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + false, //Generate cells + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CARBON, 50), + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 50) + }); + + public static final Material TUNGSTEN_TITANIUM_CARBIDE = new Material( + "Tungsten Titanium Carbide", //Material Name + MaterialState.SOLID, //State + null, + 4422, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(TUNGSTEN_CARBIDE, 70), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 30) + }); + + public static final Material SILICON_CARBIDE = new Material( + "Silicon Carbide", //Material Name + MaterialState.SOLID, //State + new short[]{40, 48, 36, 0}, //Material Colour + 1414, //Melting Point in C + -1, + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SILICON, 50), + new MaterialStack(ELEMENT.getInstance().CARBON, 50) + }); + + public static final Material TANTALUM_CARBIDE = new Material( + "Tantalum Carbide", //Material Name + MaterialState.SOLID, //State + new short[]{139, 136, 120, 0}, //Material Colour + 2980, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TANTALUM, 50), + new MaterialStack(ELEMENT.getInstance().CARBON, 50) + }); + + public static final Material ZIRCONIUM_CARBIDE = new Material( + "Zirconium Carbide", //Material Name + MaterialState.SOLID, //State + new short[]{222, 202, 180, 0}, //Material Colour + 1555, //Melting Point in C + -1, + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 50), + new MaterialStack(ELEMENT.getInstance().CARBON, 50) + }); + + public static final Material NIOBIUM_CARBIDE = new Material( + "Niobium Carbide", //Material Name + MaterialState.SOLID, //State + new short[]{205, 197, 191, 0}, //Material Colour + 2477, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 50), + new MaterialStack(ELEMENT.getInstance().CARBON, 50) + }); + + public static final Material ARCANITE = new Material( + "Arcanite", //Material Name + MaterialState.SOLID, //State + null, + 5666, //Melting Point in C + 9875, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().THORIUM232, 40), + new MaterialStack(ENERGYCRYSTAL, 40), + new MaterialStack(ELEMENT.getInstance().ORDO, 10), + new MaterialStack(ELEMENT.getInstance().PERDITIO, 10) + }); + + public static final Material LEAGRISIUM = new Material( + "Grisium", //Material Name + MaterialState.SOLID, //State + new short[]{53, 93, 106, 0}, //Material Colour + 3850, //Melting Point in C + 5550, //Boiling Point in C + 96, //Protons + 128, //Neutrons + true, //Uses Blast furnace? + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TITANIUM, 18), + new MaterialStack(ELEMENT.getInstance().CARBON, 18), + new MaterialStack(ELEMENT.getInstance().POTASSIUM, 18), + new MaterialStack(ELEMENT.getInstance().LITHIUM, 18), + new MaterialStack(ELEMENT.getInstance().SULFUR, 18), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 10) + }); //Material Stacks with Percentage of required elements. + + public static final Material EGLIN_STEEL_BASE = new Material( + "Eglin Steel Base Compound", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + + new MaterialStack(ELEMENT.getInstance().IRON, 12), + new MaterialStack(KANTHAL, 3), + new MaterialStack(INVAR, 15) + }); + + public static final Material EGLIN_STEEL = new Material( + "Eglin Steel", //Material Name + MaterialState.SOLID, //State + new short[]{139,69,19, 0}, //Material Colour + 1048, //Melting Point in C + 1973, //Boiling Point in C + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.EGLIN_STEEL_BASE, 10), + new MaterialStack(ELEMENT.getInstance().SULFUR, 1), + new MaterialStack(ELEMENT.getInstance().SILICON, 4), + new MaterialStack(ELEMENT.getInstance().CARBON, 1) + }); + + public static final Material HG1223 = new Material( + "HG-1223", //Material Name + MaterialState.LIQUID, //State + new short[]{39,85,159, 0}, //Material Colour + 6357, //Melting Point in C + 8563, //Boiling Point in C + -1, + -1, + false, //Uses Blast furnace? + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().MERCURY, 1), + new MaterialStack(ELEMENT.getInstance().BARIUM, 2), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), + new MaterialStack(ELEMENT.getInstance().COPPER, 3), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) + }); + + + public static final Material HS188A = new Material( + "HS188-A", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 4870, //Melting Point in C + 7550, //Boiling Point in C + -1, //Protons + -1, //Neutrons + true, //Uses Blast furnace? + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().COBALT, 20), + new MaterialStack(ELEMENT.getInstance().HAFNIUM, 20), + new MaterialStack(TALONITE, 16), + new MaterialStack(ELEMENT.getInstance().RHENIUM, 10), + new MaterialStack(NIOBIUM_CARBIDE, 10), + new MaterialStack(HASTELLOY_X, 8), + new MaterialStack(TUNGSTENSTEEL, 8), + new MaterialStack(ZIRCONIUM_CARBIDE, 8), + }); //Material Stacks with Percentage of required elements. + + /** + * Stargate Materials - #D2FFA9 210, 255, 170 + */ + + public static final Material TRINIUM_TITANIUM = new Material( + "Trinium Titanium Alloy", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 3750, //Melting Point in C + 7210, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 3), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 7) + }); + public static final Material TRINIUM_NAQUADAH = new Material( + "Trinium Naquadah Alloy", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 4200, //Melting Point in C + 7400, //Boiling Point in C + -1, + -1, + false, //Uses Blast furnace? + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 5), + new MaterialStack(ELEMENT.getInstance().NAQUADAH, 9) + }); + public static final Material TRINIUM_NAQUADAH_CARBON = new Material( + "Trinium Naquadah Carbonite", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 6500, //Melting Point in C + 9000, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + new MaterialStack[]{ + new MaterialStack(TRINIUM_NAQUADAH, 9), + new MaterialStack(ELEMENT.getInstance().CARBON, 1) + }); + + public static final Material TRINIUM_REINFORCED_STEEL = new Material( + "Arceus Alloy 2B", //Material Name + MaterialState.SOLID, //State + new short[]{205, 197, 23, 0}, //Material Colour + 7555, //Melting Point in C + 12350, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 30), + new MaterialStack(ALLOY.MARAGING350, 40), + new MaterialStack(ALLOY.TUNGSTENSTEEL, 20), + new MaterialStack(ALLOY.OSMIRIDIUM, 10), + new MaterialStack(ELEMENT.getInstance().STRONTIUM, 10) + }); + + + + /* + * Witchery Material + */ + + public static final Material KOBOLDITE = new Material( + "Koboldite", //Material Name + MaterialState.SOLID, //State + new short[]{80, 210, 255, 0}, //Material Colour + -1, //Melting Point in C + -1, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NICKEL, 35), + new MaterialStack(ELEMENT.getInstance().THAUMIUM, 30), + new MaterialStack(ELEMENT.getInstance().IRON, 35) + }); + + + /* + * Top Tier Alloys + */ + + public static final Material HELICOPTER = new Material( + "HeLiCoPtEr", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 5763, + 8192, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().HELIUM, 20), + new MaterialStack(ELEMENT.getInstance().LITHIUM, 20), + new MaterialStack(ELEMENT.getInstance().COBALT, 20), + new MaterialStack(ELEMENT.getInstance().PLATINUM, 20), + new MaterialStack(ELEMENT.getInstance().ERBIUM, 20) + }); + + //0lafe Compound + public static final Material LAFIUM = new Material( + "Lafium Compound", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 6350, //Melting Point in C + 9865, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.HASTELLOY_N, 8), + new MaterialStack(ELEMENT.getInstance().NAQUADAH, 4), + new MaterialStack(ELEMENT.getInstance().SAMARIUM, 2), + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 4), + new MaterialStack(ELEMENT.getInstance().ARGON, 2), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 6), + new MaterialStack(ELEMENT.getInstance().NICKEL, 8), + new MaterialStack(ELEMENT.getInstance().CARBON, 2) + }); + + //Cinobi Alloy + public static final Material CINOBITE = new Material( + "Cinobite A243", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 7350, //Melting Point in C + 12565, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.ZERON_100, 16), + new MaterialStack(ELEMENT.getInstance().NAQUADRIA, 7), + new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 5), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 3), + new MaterialStack(ELEMENT.getInstance().MERCURY, 2), + new MaterialStack(ELEMENT.getInstance().TIN, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), + new MaterialStack(ALLOY.OSMIRIDIUM, 6) + }); + + //Piky Alloy + public static final Material PIKYONIUM = new Material( + "Pikyonium 64B", //Material Name + MaterialState.SOLID, //State + new short[]{52, 103, 186, 0}, //Material Colour + 6850, //Melting Point in C + 11765, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.INCONEL_792, 16), + new MaterialStack(ALLOY.EGLIN_STEEL, 10), + new MaterialStack(ELEMENT.getInstance().NAQUADAH_ENRICHED, 8), + new MaterialStack(ELEMENT.getInstance().CERIUM, 6), + new MaterialStack(ELEMENT.getInstance().ANTIMONY, 4), + new MaterialStack(ELEMENT.getInstance().PLATINUM, 4), + new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), + new MaterialStack(ALLOY.TUNGSTENSTEEL, 8) + }); + + //Piky Alloy + public static final Material ABYSSAL = new Material( + "Abyssal Alloy", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 9650, //Melting Point in C + 13765, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STAINLESS_STEEL, 10), + new MaterialStack(ALLOY.TUNGSTEN_CARBIDE, 10), + new MaterialStack(ALLOY.NICHROME, 10), + new MaterialStack(ALLOY.BRONZE, 10), + new MaterialStack(ALLOY.INCOLOY_MA956, 10), + new MaterialStack(ELEMENT.getInstance().IODINE, 2), + new MaterialStack(ELEMENT.getInstance().RADON, 2), + new MaterialStack(ELEMENT.getInstance().GERMANIUM, 2), + }); + + //Alkalus Alloy + public static final Material LAURENIUM = new Material( + "Laurenium", //Material Name + MaterialState.SOLID, //State + new short[] {244, 168, 255, 0}, //Material Colour + 6825, //Melting Point in C + 11355, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.EGLIN_STEEL, 40), + new MaterialStack(ELEMENT.getInstance().INDIUM, 10), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 20), + new MaterialStack(ELEMENT.getInstance().DYSPROSIUM, 5), + new MaterialStack(ELEMENT.getInstance().RHENIUM, 5), + }); + + + //Bot Alloy + public static final Material BOTMIUM = new Material( + "Botmium", //Material Name + MaterialState.SOLID, //State + new short[] {80, 160, 80, 0}, //Material Colour + 8220, //Melting Point in C + 10540, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.NITINOL_60, 2), + new MaterialStack(ELEMENT.getInstance().OSMIUM, 12), + new MaterialStack(ELEMENT.getInstance().RUTHENIUM, 12), + new MaterialStack(ELEMENT.getInstance().THALLIUM, 6), + }); + + //Titansteel + public static final Material TITANSTEEL = new Material( + "Titansteel", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 8250, //Melting Point in C + 11765, //Boiling Point in C + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.TUNGSTEN_TITANIUM_CARBIDE, 3), + new MaterialStack(ELEMENT.getInstance().IGNIS, 1), + new MaterialStack(ELEMENT.getInstance().TERRA, 1), + new MaterialStack(ELEMENT.getInstance().PERDITIO, 1), + }); + + + public static final Material OCTIRON = new Material( + "Octiron", //Material Name + MaterialState.SOLID, //State + null, + 9120, //Melting Point in C + 14200, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ARCANITE, 30), + new MaterialStack(TITANSTEEL, 30), + new MaterialStack(ENERGYCRYSTAL, 5), + new MaterialStack(STEEL_BLACK, 10), + new MaterialStack(ELEMENT.getInstance().THAUMIUM, 25) + }); + + + + public static final Material BLACK_TITANIUM = new Material( + "Black Titanium", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + Materials.Titanium.mMeltingPoint*4, //Melting Point in C + Materials.Titanium.mMeltingPoint*16, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TITANIUM, 55), + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 12), + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 8), + new MaterialStack(ELEMENT.getInstance().COBALT, 6), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 4), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 4), + new MaterialStack(ELEMENT.getInstance().PALLADIUM, 4), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), + new MaterialStack(ELEMENT.getInstance().ARGON, 5) + }); + + public static final Material BABBIT_ALLOY = new Material( + "Babbit Alloy", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 268, //Melting Point in C + 589, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TIN, 10), + new MaterialStack(ELEMENT.getInstance().LEAD, 72), + new MaterialStack(ELEMENT.getInstance().ANTIMONY, 16), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 2) + }); + + + + + + + + + + + + + + + + //Quantum + public static final Material QUANTUM = new Material( + "Quantum", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 10500, //Melting Point in C + 25000, //Boiling Point in C + 150, //Protons + 200, //Neutrons + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STELLITE, 15), + new MaterialStack(ALLOY.ENERGYCRYSTAL, 5), + new MaterialStack(ALLOY.SILICON_CARBIDE, 5), + new MaterialStack(ELEMENT.getInstance().GALLIUM, 5), + new MaterialStack(ELEMENT.getInstance().AMERICIUM, 5), + new MaterialStack(ELEMENT.getInstance().PALLADIUM, 5), + new MaterialStack(ELEMENT.getInstance().BISMUTH, 5), + new MaterialStack(ELEMENT.getInstance().GERMANIUM, 5) + }); + + + +} diff --git a/src/main/java/gtPlusPlus/core/material/ELEMENT.java b/src/main/java/gtPlusPlus/core/material/ELEMENT.java new file mode 100644 index 0000000000..54af01ef6e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/ELEMENT.java @@ -0,0 +1,254 @@ +package gtPlusPlus.core.material; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.TextureSet; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.client.CustomTextureSet.TextureSets; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; + +public final class ELEMENT { + + public static final String[] NAMES = new String[]{"Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium", "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttrium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium", "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium", "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum", "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium", "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium", "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Nihonium", "Flerovium", "Moscovium", "Livermorium", "Tennessine", "Oganesson"}; + + //First 50 Elements + public final Material HYDROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Hydrogen); + public final Material HELIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Helium); + public final Material LITHIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lithium); + public final Material BERYLLIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Beryllium); + public final Material BORON = MaterialUtils.generateMaterialFromGtENUM(Materials.Boron); + public final Material CARBON = MaterialUtils.generateMaterialFromGtENUM(Materials.Carbon); + public final Material NITROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Nitrogen); + public final Material OXYGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Oxygen); + public final Material FLUORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Fluorine); + public final Material NEON = new Material("Neon", MaterialState.PURE_GAS, new short[]{240, 180, 30}, -248, -246, 10, 10, false, "Ne", 0);//Not a GT Inherited Material + public final Material SODIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Sodium); + public final Material MAGNESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Magnesium); + public final Material ALUMINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Aluminium); + public final Material ALUMINIUMOXIDE = MaterialUtils.generateMaterialFromGtENUM(Materials.Aluminiumoxide); + public final Material SILICON = MaterialUtils.generateMaterialFromGtENUM(Materials.Silicon); + public final Material SILICONDIOXIDE = MaterialUtils.generateMaterialFromGtENUM(Materials.SiliconDioxide); + public final Material PHOSPHORUS = MaterialUtils.generateMaterialFromGtENUM(Materials.Phosphor); + public final Material SULFUR = MaterialUtils.generateMaterialFromGtENUM(Materials.Sulfur); + public final Material CHLORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chlorine); + public final Material ARGON = MaterialUtils.generateMaterialFromGtENUM(Materials.Argon); + public final Material POTASSIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Potassium); + public final Material CALCIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Calcium); + public final Material SCANDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Scandium); + public final Material TITANIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Titanium); + public final Material VANADIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Vanadium); + public final Material CHROMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Chrome); + public final Material MANGANESE = MaterialUtils.generateMaterialFromGtENUM(Materials.Manganese); + public final Material IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.Iron); + public final Material COBALT = MaterialUtils.generateMaterialFromGtENUM(Materials.Cobalt); + public final Material NICKEL = MaterialUtils.generateMaterialFromGtENUM(Materials.Nickel); + public final Material COPPER = MaterialUtils.generateMaterialFromGtENUM(Materials.Copper); + public final Material ZINC = MaterialUtils.generateMaterialFromGtENUM(Materials.Zinc); + public final Material GALLIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Gallium); + public final Material GERMANIUM = new Material("Germanium", MaterialState.SOLID, new short[]{200, 200, 200}, 937, 2830, 32, 41, false, "Ge", 0);//Not a GT Inherited Material + public final Material ARSENIC = MaterialUtils.generateMaterialFromGtENUM(Materials.Arsenic); + public final Material SELENIUM = new Material("Selenium", MaterialState.SOLID, new short[]{190, 190, 190}, 217, 685, 34, 45, false, "Se", 0);//Not a GT Inherited Material + public final Material BROMINE = new Material("Bromine", MaterialState.PURE_LIQUID, new short[]{200, 25, 25}, -7, 58, 35, 45, false, "Br", 0);//Not a GT Inherited Material + public final Material KRYPTON = new Material("Krypton", MaterialState.PURE_GAS, new short[]{5, 200, 220}, -157, -153, 36, 48, false, "Kr", 0);//Not a GT Inherited Material + public final Material RUBIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubidium); + public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium, new short[] {230, 210, 110}, TextureSet.SET_FLINT); + public final Material YTTRIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yttrium); + public final Material ZIRCONIUM = new Material("Zirconium", MaterialState.SOLID, new short[]{255, 250, 205}, 1855, 4377, 40, 51, false, "Zr", 0);//Not a GT Inherited Material + public final Material NIOBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Niobium); + public final Material MOLYBDENUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Molybdenum); + public final Material TECHNETIUM = new Material("Technetium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 220, 220}, 2200, 4877, 43, 55, false, "Tc", 2);//Not a GT Inherited Material + public final Material RUTHENIUM = new Material("Ruthenium", MaterialState.SOLID, new short[]{220, 220, 220}, 2250, 3900, 44, 57, false, "Ru", 0);//Not a GT Inherited Material + public final Material RHODIUM = new Material("Rhodium", MaterialState.SOLID, new short[]{220, 220, 220}, 1966, 3727, 45, 58, false, "Rh", 0);//Not a GT Inherited Material + public final Material PALLADIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Palladium); + public final Material SILVER = MaterialUtils.generateMaterialFromGtENUM(Materials.Silver); + public final Material CADMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Cadmium); + public final Material INDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Indium); + public final Material TIN = MaterialUtils.generateMaterialFromGtENUM(Materials.Tin); + public final Material ANTIMONY = MaterialUtils.generateMaterialFromGtENUM(Materials.Antimony); + public final Material TELLURIUM = new Material("Tellurium", MaterialState.SOLID, new short[]{210, 210, 210}, 449, 989, 52, 76, false, "Te", 0);//Not a GT Inherited Material + public final Material IODINE = new Material("Iodine", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{96, 96, 96}, 114, 184, 53, 74, false, "I", 0);//Not a GT Inherited Material + public final Material XENON = new Material("Xenon", MaterialState.PURE_GAS, new short[]{5, 105, 210}, -111, -108, 54, 77, false, "Xe", 0);//Not a GT Inherited Material + public final Material CAESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Caesium); + public final Material BARIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Barium); + public final Material LANTHANUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lanthanum); + public final Material CERIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Cerium); + public final Material PRASEODYMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Praseodymium); + public final Material NEODYMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Neodymium); + public final Material PROMETHIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Promethium); + public final Material SAMARIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Samarium); + public final Material EUROPIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Europium); + public final Material GADOLINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Gadolinium); + public final Material TERBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Terbium); + public final Material DYSPROSIUM = new Material("Dysprosium", MaterialState.SOLID, new short[]{180, 180, 180}, 1412, 2562, 66, 97, false, "Dy", 0);//Not a GT Inherited Material + public final Material HOLMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Holmium); + public final Material ERBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Erbium); + public final Material THULIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Thulium); + public final Material YTTERBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Ytterbium); + public final Material LUTETIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lutetium); + public final Material HAFNIUM = new Material("Hafnium", MaterialState.SOLID, new short[]{128, 128, 128}, 2150, 5400, 72, 106, false, "Hf", 0);//Not a GT Inherited Material + + //Second 50 elements + public final Material TANTALUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Tantalum); + public final Material TUNGSTEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Tungsten); + public final Material RHENIUM = new Material("Rhenium", MaterialState.SOLID, new short[]{150, 150, 150}, 3180, 3627, 75, 111, false, "Re", 0);//Not a GT Inherited Material + public final Material OSMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmium); + public final Material IRIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Iridium); + public final Material PLATINUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Platinum); + public final Material GOLD = MaterialUtils.generateMaterialFromGtENUM(Materials.Gold); + public final Material MERCURY = MaterialUtils.generateMaterialFromGtENUM(Materials.Mercury); //Mercury + public final Material THALLIUM = new Material("Thallium", MaterialState.SOLID, new short[]{175, 175, 175}, 304, 1457, 81, 123, false, "Tl", 0);//Not a GT Inherited Material + public final Material LEAD = MaterialUtils.generateMaterialFromGtENUM(Materials.Lead); + public final Material BISMUTH = MaterialUtils.generateMaterialFromGtENUM(Materials.Bismuth); + public final Material POLONIUM = new Material("Polonium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{180, 170, 180}, 254, 962, 84, 125, false, "Po", 1);//Not a GT Inherited Material + public final Material ASTATINE = new Material("Astatine", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{170, 180, 170}, 302, 337, 85, 125, false, "At", 1);//Not a GT Inherited Material + public final Material RADON = MaterialUtils.generateMaterialFromGtENUM(Materials.Radon); + public final Material FRANCIUM = new Material("Francium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{170, 160, 170}, 27, 677, 87, 136, false, "Fr", 1);//Not a GT Inherited Material + public final Material RADIUM = new Material("Radium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{165, 165, 165}, 700, 1737, 88, 138, false, "Ra", 1);//Not a GT Inherited Material + public final Material ACTINIUM = new Material("Actinium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{150, 165, 165}, 1050, 3200, 89, 138, false, "Ac", 1);//Not a GT Inherited Material + public final Material THORIUM = new Material("Thorium", MaterialState.SOLID, Materials.Thorium.mRGBa, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("Th"), 1); + public final Material PROTACTINIUM = new Material("Protactinium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{190, 150, 170}, 1568, 4027, 91, 140, false, "Pa", 1);//Not a GT Inherited Material + public final Material URANIUM238 = MaterialUtils.generateMaterialFromGtENUM(Materials.Uranium); + public final Material URANIUM235 = MaterialUtils.generateMaterialFromGtENUM(Materials.Uranium235); + public final Material NEPTUNIUM = new Material("Neptunium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{200, 220, 205}, 640, 3902, 93, 144, false, "Np", 2);//Not a GT Inherited Material + public final Material PLUTONIUM244 = MaterialUtils.generateMaterialFromGtENUM(Materials.Plutonium); + public final Material PLUTONIUM241 = MaterialUtils.generateMaterialFromGtENUM(Materials.Plutonium241); + public final Material AMERICIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Americium); //Americium + public final Material CURIUM = new Material("Curium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{175, 85, 110}, 1340, 3110, 96, 151, false, "Cm", 3);//Not a GT Inherited Material + public final Material BERKELIUM = new Material("Berkelium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{110, 250, 85}, 985, 710, 97, 150, false, "Bk", 4);//Not a GT Inherited Material + public final Material CALIFORNIUM = new Material("Californium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{85, 110, 205}, 899, 1472, 98, 153, false, "Cf", 4);//Not a GT Inherited Material + public final Material EINSTEINIUM = new Material("Einsteinium", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{255, 85, 110}, 860, 3500, 99, 153, false, "Es", 5);//Not a GT Inherited Material //Boiling Point is made up + public final Material FERMIUM = new Material("Fermium", MaterialState.LIQUID, TextureSets.NUCLEAR.get(), new short[]{75, 90, 25}, 1527, 3850, 100, 157, false, "Fm", 5);//Not a GT Inherited Material //Boiling Point is made up + + //Misc + public final Material AER = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedAir, TextureSets.GEM_A.get()); + public final Material IGNIS = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedFire, TextureSets.GEM_A.get()); + public final Material TERRA = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedEarth, TextureSets.GEM_A.get()); + public final Material AQUA = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedWater, TextureSets.GEM_A.get()); + public final Material PERDITIO = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedEntropy, TextureSets.GEM_A.get()); + public final Material ORDO = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedOrder, TextureSets.GEM_A.get()); + + //Fictional + public final Material YELLORIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yellorium, new short[] {255, 242, 10}, TextureSets.NUCLEAR.get()); + public final Material NAQUADAH = MaterialUtils.generateMaterialFromGtENUM(Materials.Naquadah); + public final Material NAQUADAH_ENRICHED = MaterialUtils.generateMaterialFromGtENUM(Materials.NaquadahEnriched); + public final Material NAQUADRIA = MaterialUtils.generateMaterialFromGtENUM(Materials.Naquadria); + public final Material TRINIUM; + public final Material TRINIUM_REFINED; + //https://github.com/Blood-Asp/GT5-Unofficial/issues/609 + + + //Custom Isotopes + public final Material LITHIUM7 = new Material("Lithium 7", MaterialState.SOLID, TextureSet.SET_SHINY, Materials.Lithium.mRGBa, Materials.Lithium.mMeltingPoint, Materials.Lithium.mBlastFurnaceTemp, Materials.Lithium.getProtons(), Materials.Lithium.getNeutrons(), Materials.Lithium.mBlastFurnaceRequired, StringUtils.superscript("7Li"), 0, false);//Not a GT Inherited Material + public final Material URANIUM232 = new Material("Uranium 232", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{88, 220, 103, 0}, 1132, 4131, 92, 140, false, StringUtils.superscript("232U"), 4);//Not a GT Inherited Material + public final Material URANIUM233 = new Material("Uranium 233", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{73, 220, 83, 0}, 1132, 4131, 92, 141, false, StringUtils.superscript("233U"), 2);//Not a GT Inherited Material + public final Material THORIUM232 = new Material("Thorium 232", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{15, 60, 15, 0}, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("232Th"), 1, true);//Not a GT Inherited Material + public final Material PLUTONIUM239 = new Material("Plutonium-239", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Plutonium.mDurability, Materials.Plutonium.mRGBa, Materials.Plutonium.mMeltingPoint, Materials.Plutonium.mBlastFurnaceTemp, 94, 145, false, StringUtils.superscript("239Pu"), 4, true);//Not a GT Inherited Material + //RTG Fuels + public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2, false);//Not a GT Inherited Material + public final Material STRONTIUM90 = new Material("Strontium-90", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Strontium.mDurability, Materials.Strontium.mRGBa, Materials.Strontium.mMeltingPoint, Materials.Strontium.mBlastFurnaceTemp, 38, 52, false, StringUtils.superscript("90Sr"), 2, false);//Not a GT Inherited Material + public final Material POLONIUM210 = new Material("Polonium-210", MaterialState.SOLID, TextureSets.NUCLEAR.get(), POLONIUM.vDurability, POLONIUM.getRGBA(), POLONIUM.getMeltingPointK(), POLONIUM.getBoilingPointK(), 84, 126, false, StringUtils.superscript("210Po"), 2, false);//Not a GT Inherited Material + public final Material AMERICIUM241 = new Material("Americium-241", MaterialState.SOLID, TextureSets.NUCLEAR.get(), Materials.Americium.mDurability, Materials.Americium.mRGBa, Materials.Americium.mMeltingPoint, Materials.Americium.mBlastFurnaceTemp, 95, 146, false, StringUtils.superscript("241Am"), 2, false);//Not a GT Inherited Material + + public final Material MAGIC = MaterialUtils.generateMaterialFromGtENUM(Materials.Magic, new short[] {10, 185, 140}); + public final Material THAUMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Thaumium); + + static { + Logger.MATERIALS("Initialising Base Elements."); + } + + private static final ELEMENT INSTANCE = new ELEMENT(); + + public ELEMENT(){ + //GTNH Trinium Handling + if (CORE.GTNH){ + //yay + Materials a1 = MaterialUtils.getMaterial("Trinium"); + Materials a2 = Materials.valueOf("Trinium"); + Materials a3 = Materials.get("Trinium"); + Materials a4; + if (a1 == null) { + Logger.INFO("[Material] First attempt to find Trinium failed, using backup method."); + if (a2 == null) { + Logger.INFO("[Material] Fallback attempt to find Trinium failed, using second fallback."); + if (a3 == null) { + Logger.INFO("[Material] Fallback attempt to find Trinium failed, dumping materials."); + for (Materials m : Materials.values()) { + Logger.INFO("[Material] Found "+MaterialUtils.getMaterialName(m)); + } + a4 = null; + } + else { + Logger.INFO("[Material] a3 Found "+MaterialUtils.getMaterialName(a3)); + a4 = a3; + } + } + else { + Logger.INFO("[Material] a2 Found "+MaterialUtils.getMaterialName(a2)); + a4 = a2; + } + TRINIUM = MaterialUtils.generateMaterialFromGtENUM(a4); + } + else { + Logger.INFO("[Material] a1 Found "+MaterialUtils.getMaterialName(a1)); + TRINIUM = MaterialUtils.generateMaterialFromGtENUM(a1); + } + + TRINIUM_REFINED = TRINIUM; + + } + else { + TRINIUM = new Material("Trinium", MaterialState.SOLID, TextureSet.SET_FINE, new short[]{70, 110, 30}, 604, 4057, 181, 133, false, "Ke", 0, false);//Not a GT Inherited Material + TRINIUM_REFINED = new Material("Refined Trinium", MaterialState.SOLID, TextureSets.REFINED.get(), new short[]{210, 255, 170}, 4304, 14057, 181, 133, false, "Ke", 0, new MaterialStack[]{new MaterialStack(TRINIUM, 1)});//Not a GT Inherited Material + } + } + + public static ELEMENT getInstance(){ + return INSTANCE; + } + + public static class STANDALONE { + + public static final Material CELESTIAL_TUNGSTEN = new Material("Celestial Tungsten", MaterialState.SOLID, TextureSets.REFINED.get(), new short[] {50, 50, 50, 2}, INSTANCE.TUNGSTEN.getMeltingPointC()+6500, INSTANCE.TUNGSTEN.getBoilingPointC()+7500, 160, 101, true, "✦◆✦", 0);//Not a GT Inherited Material + public static final Material ASTRAL_TITANIUM = new Material("Astral Titanium", MaterialState.SOLID, TextureSets.REFINED.get(), new short[] {220, 160, 240, 2}, INSTANCE.TITANIUM.getMeltingPointC()+7500, INSTANCE.TITANIUM.getBoilingPointC()+7500, 145, 133, true, "✧◇✧", 0);//Not a GT Inherited Material + public static final Material CHRONOMATIC_GLASS = new Material("Chromatic Glass", MaterialState.SOLID, new short[]{255, 255, 255, 3}, 9200, 17550, 40, 51, false, "⌘☯𓰠𓱠𓲠𓳠𓴠𓵠𓶠𓷠𓸠☯⌘ ", 0);//Not a GT Inherited Material + public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material + public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75, 2}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material + public static final Material RHUGNOR = new Material("Rhugnor", MaterialState.SOLID, TextureSets.ENRICHED.get(), new short[]{190, 0, 255, 0}, 8750, 14757, 184, 142, true, "Fs⚶", 0);//Not a GT Inherited Material //funeris + + + //Runescape materials + public static final Material BLACK_METAL = new Material("Black Metal", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0, new MaterialStack[]{new MaterialStack(getInstance().LEAD, 15), new MaterialStack(getInstance().MANGANESE, 25), new MaterialStack(getInstance().CARBON, 60)});//Not a GT Inherited Material + public static final Material WHITE_METAL = new Material("White Metal", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {255, 255, 255}, 4560, 7580, 35, 41, false, "҉", 0, new MaterialStack[]{new MaterialStack(getInstance().COPPER, 5), new MaterialStack(getInstance().ANTIMONY, 10), new MaterialStack(getInstance().PLATINUM, 10), new MaterialStack(getInstance().TIN, 75)});//Not a GT Inherited Material + + public static final Material GRANITE = new Material( + "Ancient Granite", + MaterialState.SOLID, + TextureSet.SET_SAND, + new short[] {107, 107, 107}, + 500, + 2000, + 16, + 12, + false, + "«»", + 0, + false, + new MaterialStack[]{ + new MaterialStack(getInstance().OXYGEN, 30), + new MaterialStack(getInstance().IRON, 20), + new MaterialStack(getInstance().SILICONDIOXIDE, 20), + new MaterialStack(getInstance().ALUMINIUMOXIDE, 10), + new MaterialStack(getInstance().POTASSIUM, 10), + new MaterialStack(getInstance().CALCIUM, 5), + new MaterialStack(getInstance().SODIUM, 5) + });//Not a GT Inherited Material + + public static final Material RUNITE = new Material("Runite", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {60, 200, 190}, 6750, 11550, 73, 87, true, "§", 0);//Not a GT Inherited Material + public static final Material DRAGON_METAL = new Material("Dragonblood", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20, 2}, 10160, 17850, 96, 105, true, "۞", 0);//Not a GT Inherited Material + + } + + +} diff --git a/src/main/java/gtPlusPlus/core/material/Ion.java b/src/main/java/gtPlusPlus/core/material/Ion.java new file mode 100644 index 0000000000..2b5b113b92 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/Ion.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.material; + +public class Ion { + + private final Material mElement; + private final boolean mContainsPositiveCharge; + private final int mTotalIonization; + + public Ion(Material aMat, int chargeAmount) { + mElement = aMat; + mContainsPositiveCharge = (chargeAmount >= 0); + mTotalIonization = chargeAmount; + } + + public synchronized final Material getElement() { + return mElement; + } + + public synchronized final boolean containsPositiveCharge() { + return mContainsPositiveCharge; + } + + public synchronized final int getTotalIonization() { + return mTotalIonization; + } + + public final boolean isNeutral() { + return mTotalIonization == 0; + } +} diff --git a/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java b/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java new file mode 100644 index 0000000000..aaee1cc790 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/MISC_MATERIALS.java @@ -0,0 +1,308 @@ +package gtPlusPlus.core.material; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.TextureSet; +import gtPlusPlus.core.client.CustomTextureSet.TextureSets; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; + +public final class MISC_MATERIALS { + + /* + * Some of these materials purely exist as data objects, items will most likely be assigned seperately. + * Most are just compositions which will have dusts assigned to them. + */ + + public static void run() { + MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_OXIDE, false); + MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_HYDROXIDE, false); + WATER.registerComponentForMaterial(FluidUtils.getWater(1000)); + } + + public static final Material STRONTIUM_OXIDE = new Material( + "Strontium Oxide", + MaterialState.SOLID, + TextureSet.SET_METALLIC, + null, + -1, + -1, + -1, + -1, + false, + "SrO", + 0, + false, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) + }); + + public static final Material SELENIUM_DIOXIDE = new Material( + "Selenium Dioxide", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SELENIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 2) + }); + + public static final Material SELENIOUS_ACID = new Material( + "Selenious Acid", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(SELENIUM_DIOXIDE, 1), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 8), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 4) + }); + + public static final Material HYDROGEN_CYANIDE = new Material( + "Hydrogen Cyanide", + MaterialState.PURE_GAS, //State + null, //Material Colour + 4, //Melting Point in C + 26, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1), + new MaterialStack(ELEMENT.getInstance().CARBON, 1), + new MaterialStack(ELEMENT.getInstance().NITROGEN, 1) + }); + + public static final Material CARBON_MONOXIDE = new Material( + "Carbon Monoxide", + MaterialState.PURE_GAS, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CARBON, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) + }); + + public static final Material CARBON_DIOXIDE = new Material( + "Carbon Dioxide", + MaterialState.PURE_GAS, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CARBON, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 2) + }); + + + /* + * Rare Earth Materials + */ + + public static final Material RARE_EARTH_LOW = new Material( + "Rare Earth (I)", //Material Name + MaterialState.ORE, //State + TextureSets.GEM_A.get(), //Texture Set + null, //Material Colour + 1200, + 2500, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ORES.GREENOCKITE, 1), + new MaterialStack(ORES.LANTHANITE_CE, 1), + new MaterialStack(ORES.AGARDITE_CD, 1), + new MaterialStack(ORES.XENOTIME, 1), + new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.NetherQuartz), 1), + new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Galena), 1), + new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Chalcopyrite), 1), + new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Cobaltite), 1), + new MaterialStack(ELEMENT.STANDALONE.GRANITE, 1) + }); + + public static final Material RARE_EARTH_MID = new Material( + "Rare Earth (II)", //Material Name + MaterialState.ORE, //State + TextureSets.ENRICHED.get(), //Texture Set + null, //Material Colour + 3500, + 5000, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ORES.LANTHANITE_ND, 1), + new MaterialStack(ORES.AGARDITE_ND, 1), + new MaterialStack(ORES.YTTRIAITE, 1), + new MaterialStack(ORES.CROCROITE, 1), + new MaterialStack(ORES.NICHROMITE, 1), + new MaterialStack(ORES.ZIRCON, 1), + new MaterialStack(ELEMENT.STANDALONE.GRANITE, 1), + new MaterialStack(ELEMENT.STANDALONE.BLACK_METAL, 1), + new MaterialStack(ELEMENT.STANDALONE.RUNITE, 1) + }); + + public static final Material RARE_EARTH_HIGH = new Material( + "Rare Earth (III)", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + null, //Material Colour + 5200, + 7500, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ORES.GADOLINITE_Y, 1), + new MaterialStack(ORES.LEPERSONNITE, 1), + new MaterialStack(ORES.FLORENCITE, 1), + new MaterialStack(ORES.FLUORCAPHITE, 1), + new MaterialStack(ORES.LAUTARITE, 1), + new MaterialStack(ORES.DEMICHELEITE_BR, 1), + new MaterialStack(ORES.ALBURNITE, 1), + new MaterialStack(ORES.KASHINITE, 1), + new MaterialStack(ORES.AGARDITE_LA, 1), + }); + + public static final Material WATER = new Material( + "Water", + MaterialState.PURE_LIQUID, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) + }); + + //OH + public static final Material HYDROXIDE = new Material( + "Hydroxide", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1) + }); + + //NH3 + public static final Material AMMONIA = new Material( + "Ammonia", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -77, //Melting Point in C + -33, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NITROGEN, 1), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 3) + }); + + //NH4 + public static final Material AMMONIUM = new Material( + "Ammonium", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NITROGEN, 1), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 4) + }); + + + public static final Material HYDROGEN_CHLORIDE = new Material( + "Hydrogen Chloride", + MaterialState.PURE_GAS, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1), + new MaterialStack(ELEMENT.getInstance().CHLORINE, 1), + }); + + + public static final Material SODIUM_CHLORIDE = new Material( + "Sodium Chloride", + MaterialState.PURE_GAS, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SODIUM, 1), + new MaterialStack(ELEMENT.getInstance().CHLORINE, 1), + }); + + + public static final Material SODIUM_HYDROXIDE = new Material( + "Sodium Hydroxide", + MaterialState.PURE_GAS, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SODIUM, 1), + new MaterialStack(HYDROXIDE, 1), + }); + + public static final Material SALT_WATER = new Material( + "Salt Water", + MaterialState.PURE_LIQUID, + new MaterialStack[]{ + new MaterialStack(WATER, 3), + new MaterialStack(SODIUM_CHLORIDE, 1), + }); + + public static final Material BRINE = new Material( + "Brine", + MaterialState.PURE_LIQUID, + new MaterialStack[]{ + new MaterialStack(SALT_WATER, 1), + new MaterialStack(SODIUM_CHLORIDE, 2), + }); + + public static final Material STRONTIUM_HYDROXIDE = new Material( + "Strontium Hydroxide", + MaterialState.SOLID, + TextureSet.SET_METALLIC, + null, + -1, + -1, + -1, + -1, + false, + "Sr(OH)2", + 0, + false, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1), + new MaterialStack(MISC_MATERIALS.HYDROXIDE, 2) + }); + + + +} diff --git a/src/main/java/gtPlusPlus/core/material/Material.java b/src/main/java/gtPlusPlus/core/material/Material.java new file mode 100644 index 0000000000..0e9eb9b376 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/Material.java @@ -0,0 +1,1461 @@ +package gtPlusPlus.core.material; + +import static gregtech.api.enums.GT_Values.M; +import static gtPlusPlus.core.util.math.MathUtils.safeCast_LongToInt; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TextureSet; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; +import gtPlusPlus.core.item.base.cell.BaseItemCell; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; +import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class Material { + + public static final Set mMaterialMap = new HashSet(); + public static HashMap mMaterialCache = new HashMap(); + + public static final Map> mComponentMap = new HashMap>(); + + public static HashMap sChemicalFormula = new HashMap(); + + private String unlocalizedName; + private String localizedName; + + private MaterialState materialState; + private TextureSet textureSet; + + private Fluid mFluid; + private Fluid vPlasma; + + private boolean vGenerateCells; + + protected Object dataVar = MathUtils.generateSingularRandomHexValue(); + + private ArrayList vMaterialInput = new ArrayList<>(); + public long[] vSmallestRatio; + public short vComponentCount; + + private short[] RGBA; + + private boolean usesBlastFurnace; + public boolean isRadioactive; + public byte vRadiationLevel; + + private int meltingPointK; + private int boilingPointK; + private int meltingPointC; + private int boilingPointC; + private long vProtons; + private long vNeutrons; + private long vMass; + public int smallestStackSizeWhenProcessing; //Add a check for <=0 || > 64 + public int vTier; + public int vVoltageMultiplier; + public String vChemicalFormula; + public String vChemicalSymbol; + + public long vDurability; + public int vToolQuality; + public int vHarvestLevel; + + private TC_Aspect_Wrapper[] vAspects; + + public BaseTinkersMaterial vTiConHandler; + + + public static AutoMap invalidMaterials = new AutoMap(); + + + public Material(final String materialName, final MaterialState defaultState, final MaterialStack... inputs){ + this(materialName, defaultState, null, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, final short[] rgba, final MaterialStack... inputs){ + this(materialName, defaultState, null, 0, rgba, -1, -1, -1, -1, false, "", 0, false, false, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, final short[] rgba, int radiationLevel, MaterialStack... materialStacks) { + this(materialName, defaultState, null, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks); + } + + public Material(String materialName, MaterialState defaultState, short[] rgba, int j, int k, int l, int m, int radiationLevel, MaterialStack[] materialStacks){ + this(materialName, defaultState, null, 0, rgba, j, k, l, m, false, "", radiationLevel, false, materialStacks); + } + + public Material(String materialName, MaterialState defaultState, final TextureSet set, short[] rgba, int meltingPoint, int boilingPoint, int protons, int neutrons, int radiationLevel, MaterialStack[] materialStacks){ + this(materialName, defaultState, set, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, false, "", radiationLevel, false, materialStacks); + } + + public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final MaterialStack... inputs){ + this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, inputs); + } + + public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemSymbol, final MaterialStack... inputs){ + this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemSymbol, 0, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, boolean generateCells, final MaterialStack... inputs){ + this(materialName, defaultState, null, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, generateCells, true, inputs); + } + + public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final int radiationLevel, final MaterialStack... inputs){ + this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", radiationLevel, inputs); + } + + public Material(final String materialName, final MaterialState defaultState,final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final int radiationLevel, final MaterialStack... inputs){ + this(materialName, defaultState, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", radiationLevel, inputs); + } + + public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){ + this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, inputs); + } + + public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean addCells,final MaterialStack... inputs) { + this (materialName, defaultState, null, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, addCells, true, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, TextureSet textureSet,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){ + this (materialName, defaultState, textureSet, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, TextureSet textureSet,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean addCells,final MaterialStack... inputs) { + this (materialName, defaultState, textureSet, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, addCells, true, inputs); + } + + private Material(final String materialName, final MaterialState defaultState, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){ + this (materialName, defaultState, null, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean generateCells, final MaterialStack... inputs){ + this (materialName, defaultState, set, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); + } + + public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, String chemicalSymbol, final int radiationLevel, boolean generateCells, boolean generateFluid, final MaterialStack... inputs){ + + if (mMaterialMap.add(this)) { + + } + + if (defaultState == MaterialState.ORE) { + rgba = null; + } + + mComponentMap.put(unlocalizedName, new HashMap()); + + try { + this.unlocalizedName = Utils.sanitizeString(materialName); + this.localizedName = materialName; + mMaterialCache.put(getLocalizedName().toLowerCase(), this); + Logger.INFO("Stored "+getLocalizedName()+" to cache with key: "+getLocalizedName().toLowerCase()); + + this.materialState = defaultState; + + Logger.MATERIALS(this.getLocalizedName()+" is "+defaultState.name()+"."); + + this.vGenerateCells = generateCells; + + //Add Components to an array. + if (inputs == null){ + this.vMaterialInput = null; + } + else { + if (inputs.length != 0){ + for (int i=0; i < inputs.length; i++){ + if (inputs[i] != null){ + this.vMaterialInput.add(i, inputs[i]); + } + } + } + } + + //set RGB + + if (rgba == null) { + if (vMaterialInput.size() > 0) { + + try { + Short[] mMixedRGB = new Short[3]; + AutoMap mMaterialSet = MaterialUtils.getCompoundMaterialsRecursively(this); + for (int mnh = 0; mnh < 3; mnh++) { + AutoMap aDataSet = new AutoMap(); + Set set4 = new HashSet(); + for (Material u : mMaterialSet) { + //if (u.getState() == MaterialState.ORE || u.getState() == MaterialState.SOLID) + set4.add(u); + } + for(Material e : set4){ + aDataSet.put(e.getRGB()[mnh]); + } + + Short aAverage = MathUtils.getShortAverage(aDataSet); + if (aAverage > Short.MAX_VALUE || aAverage < Short.MIN_VALUE || aAverage < 0 || aAverage > 255) { + if (aAverage > 255) { + while (aAverage > 255) { + aAverage = (short) (aAverage/2); + } + } + aAverage = (short) Math.max(Math.min(aAverage, 255), 0); + } + mMixedRGB[mnh] = aAverage; + } + + if (mMixedRGB != null && mMixedRGB[0] != null && mMixedRGB[1] != null && mMixedRGB[2] != null) { + this.RGBA = new short[] {mMixedRGB[0], mMixedRGB[1], mMixedRGB[2], 0}; + } + else { + this.RGBA = Materials.Steel.mRGBa; + } + } + catch (Throwable t) { + t.printStackTrace(); + this.RGBA = Materials.Steel.mRGBa; + } + } + else { + //Boring Grey Material + + int aValueForGen = this.getUnlocalizedName().hashCode(); + int hashSize = MathUtils.howManyPlaces(aValueForGen); + + String a = String.valueOf(aValueForGen); + String b = ""; + + if (hashSize < 9) { + int aSecondHash = this.materialState.hashCode(); + int hashSize2 = MathUtils.howManyPlaces(aSecondHash); + if (hashSize2 + hashSize >= 9) { + b = String.valueOf(aValueForGen); + } + else { + String c = b; + while (MathUtils.howManyPlaces(hashSize + c.length()) < 9) { + c = c + c.hashCode(); + } + b = c; + } + } + + String valueR; + if (b != null) { + valueR = a+b; + } + else { + valueR = a; + } + short fc[] = new short[3]; + int aIndex = 0; + for (char gg : valueR.toCharArray()) { + short ui = Short.parseShort(""+gg); + if (ui > 255 || ui < 0) { + if (ui > 255) { + while (ui > 255) { + ui = (short) (ui / 2); + } + } + else { + ui = 0; + } + } + fc[aIndex++] = ui; + + } + this.RGBA = fc; + } + } + else { + this.RGBA = rgba; + } + + //Set Melting/Boiling point, if value is -1 calculate it from compound inputs. + if (meltingPoint != -1){ + this.meltingPointC = meltingPoint; + } + else { + this.meltingPointC = this.calculateMeltingPoint(); + } + if (boilingPoint != -1){ + if (boilingPoint != 0){ + this.boilingPointC = boilingPoint; + } + else { + this.boilingPointC = meltingPoint*4; + } + } + else { + this.boilingPointC = this.calculateBoilingPoint(); + } + + this.meltingPointK = (int) MathUtils.celsiusToKelvin(this.meltingPointC); + this.boilingPointK = (int) MathUtils.celsiusToKelvin(this.boilingPointC); + + //Set Proton/Neutron count, if value is -1 calculate it from compound inputs. + if (protons != -1){ + this.vProtons = protons; + } + else { + this.vProtons = this.calculateProtons(); + } + if (boilingPoint != -1){ + this.vNeutrons = neutrons; + } + else { + this.vNeutrons = this.calculateNeutrons(); + } + + + this.vAspects = null; + + + this.vMass = this.getMass(); + + //Sets tool Durability + if (durability != 0){ + this.vDurability = durability; + } + else { + long aTempDura = 0; + for (MaterialStack g : this.getComposites()) { + if (g != null) { + aTempDura += safeCast_LongToInt(g.getStackMaterial().getMass() * 2000); + } + } + this.vDurability = aTempDura > 0 ? aTempDura : (this.getComposites().isEmpty() ? 51200 : 32000 * this.getComposites().size()); + } + + if ((this.vDurability >= 0) && (this.vDurability < 64000)){ + this.vToolQuality = 1; + this.vHarvestLevel = 2; + } + else if ((this.vDurability >= 64000) && (this.vDurability < 128000)){ + this.vToolQuality = 2; + this.vHarvestLevel = 2; + } + else if ((this.vDurability >= 128000) && (this.vDurability < 256000)){ + this.vToolQuality = 3; + this.vHarvestLevel = 2; + } + else if ((this.vDurability >= 256000) && (this.vDurability < 512000)){ + this.vToolQuality = 3; + this.vHarvestLevel = 3; + } + else if ((this.vDurability >= 512000) && (this.vDurability <= Integer.MAX_VALUE)){ + this.vToolQuality = 4; + this.vHarvestLevel = 4; + } + else { + this.vToolQuality = 1; + this.vHarvestLevel = 1; + } + + //Sets the Rad level + if (radiationLevel > 0){ + Logger.MATERIALS(this.getLocalizedName()+" is radioactive. Level: "+radiationLevel+"."); + this.isRadioactive = true; + this.vRadiationLevel = (byte) radiationLevel; + } + else { + if (vMaterialInput.size() > 0) { + AutoMap aDataSet = new AutoMap(); + for (MaterialStack m : this.vMaterialInput) { + aDataSet.put(m.getStackMaterial().vRadiationLevel); + } + byte aAverage = MathUtils.getByteAverage(aDataSet); + if (aAverage > 0) { + Logger.MATERIALS(this.getLocalizedName()+" is radioactive due to trace elements. Level: "+aAverage+"."); + this.isRadioactive = true; + this.vRadiationLevel = (byte) aAverage; + } + else { + Logger.MATERIALS(this.getLocalizedName()+" is not radioactive."); + this.isRadioactive = false; + this.vRadiationLevel = 0; + } + } + else { + Logger.MATERIALS(this.getLocalizedName()+" is not radioactive."); + this.isRadioactive = false; + this.vRadiationLevel = 0; + } + } + + /*if (vMaterialInput.size() > 0) { + AutoMap aDataSet = new AutoMap(); + + int bonus = 0; + bonus += this.vMaterialInput.size(); + bonus += MathUtils.roundToClosestInt(meltingPointC/1000); + + + + aDataSet.put(bonus); + + for (MaterialStack m : this.vMaterialInput) { + aDataSet.put(m.getStackMaterial().vTier); + } + int aAverage = MathUtils.getIntAverage(aDataSet); + if (aAverage > Integer.MAX_VALUE || aAverage < Integer.MIN_VALUE) { + aAverage = 0; + } + if (aAverage > 0) { + this.vTier = Math.min(aAverage, 10); + } + else { + this.vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint)); + } + } + else { + this.vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint)); + }*/ + this.vTier = MaterialUtils.getTierOfMaterial(meltingPoint); + + + //Sets the materials 'tier'. Will probably replace this logic. + + this.usesBlastFurnace = blastFurnace; + this.vVoltageMultiplier = MaterialUtils.getVoltageForTier(vTier); + + this.vComponentCount = this.getComponentCount(inputs); + this.vSmallestRatio = this.getSmallestRatio(this.vMaterialInput); + int tempSmallestSize = 0; + + if (this.vSmallestRatio != null){ + for (int v=0;v= 98 || this.getComposites().size() > 1 || this.getMeltingPointC() >= 3600) { + this.vTiConHandler = new BaseTinkersMaterial(this); + } + } + + sChemicalFormula.put(materialName.toLowerCase(), this.vChemicalFormula); + Logger.MATERIALS("Creating a Material instance for "+materialName); + Logger.MATERIALS("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); + Logger.MATERIALS("Protons: "+this.vProtons); + Logger.MATERIALS("Neutrons: "+this.vNeutrons); + Logger.MATERIALS("Mass: "+this.vMass+"/units"); + Logger.MATERIALS("Melting Point: "+this.meltingPointC+"C."); + Logger.MATERIALS("Boiling Point: "+this.boilingPointC+"C."); + } + catch (Throwable t){ + Logger.MATERIALS("Stack Trace for "+materialName); + t.printStackTrace(); + } + } + + private static void checkForCellAndGenerate(Material material) { + if (!material.vGenerateCells) { + return; + } + String aName = Utils.sanitizeString(material.unlocalizedName); + String aName2 = Utils.sanitizeString(material.unlocalizedName.toLowerCase()); + String aName3 = (material.localizedName == null) ? aName : material.localizedName; + ItemStack aTestCell1 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aName, 1); + ItemStack aTestCell2 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aName2, 1); + ItemStack aTestCell3 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aName3, 1); + if (aTestCell1 == null && aTestCell2 == null && aTestCell3 == null) { + Logger.INFO("Generating cell for "+ material.localizedName); + new BaseItemCell(material); + } + else { + if (aTestCell1 != null) { + Logger.INFO("Registering existing cell for "+ material.localizedName+", "+aName); + material.registerComponentForMaterial(OrePrefixes.cell, aTestCell1); + } + else if (aTestCell2 != null) { + Logger.INFO("Registering existing cell for "+ material.localizedName+", "+aName2); + material.registerComponentForMaterial(OrePrefixes.cell, aTestCell2); + } + else if (aTestCell3 != null) { + Logger.INFO("Registering existing cell for "+ material.localizedName+", "+aName3); + material.registerComponentForMaterial(OrePrefixes.cell, aTestCell3); + } + } + } + + public final TextureSet getTextureSet() { + synchronized(this) { + return textureSet; + } + } + + + public TextureSet setTextureSet(TextureSet set) { + return setTextureSet(set, vTier); + } + + public TextureSet setTextureSet(TextureSet set, int aTier) { + if (set != null) { + Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+set.mSetName+". This textureSet was supplied."); + return set; + } + + int aGem = 0; + int aShiny = 0; + TextureSet aSet = null; + + //Check Mixture Contents + for (MaterialStack m : this.getComposites()) { + + //Gems + if (m.getStackMaterial() == ELEMENT.getInstance().AER) { + aGem++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().AQUA) { + aGem++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().IGNIS) { + aGem++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().TERRA) { + aGem++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().MAGIC) { + aGem++; + } + //Shiny Materials + if (m.getStackMaterial() == ELEMENT.getInstance().GOLD) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().SILVER) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().PLATINUM) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().AMERICIUM) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().TITANIUM) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().GERMANIUM) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().GALLIUM) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().MERCURY) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().MAGIC) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().SAMARIUM) { + aShiny++; + } + else if (m.getStackMaterial() == ELEMENT.getInstance().TANTALUM) { + aShiny++; + } + } + + if (aSet == null) { + if (aGem >= this.getComposites().size()/2) { + if (MathUtils.isNumberEven(aGem)) { + Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+TextureSet.SET_GEM_HORIZONTAL.mSetName+"."); + return TextureSet.SET_GEM_HORIZONTAL; + } + else { + Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+TextureSet.SET_GEM_VERTICAL.mSetName+"."); + return TextureSet.SET_GEM_VERTICAL; + } + } + } + + if (aSet == null) { + if (aShiny >= this.getComposites().size()/3) { + Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+TextureSet.SET_SHINY.mSetName+"."); + return TextureSet.SET_SHINY; + } + } + + // build hash table with count + AutoMap sets = new AutoMap(); + if (this.vMaterialInput != null) { + for (MaterialStack r : this.vMaterialInput) { + if (r.getStackMaterial().getTextureSet().mSetName.toLowerCase().contains("fluid")) { + sets.put(ELEMENT.getInstance().GOLD); + } + else { + sets.put(r.getStackMaterial()); + } + } + TextureSet mostUsedTypeTextureSet = MaterialUtils.getMostCommonTextureSet(new ArrayList(sets.values())); + if (mostUsedTypeTextureSet != null && mostUsedTypeTextureSet instanceof TextureSet) { + Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+mostUsedTypeTextureSet.mSetName+"."); + return mostUsedTypeTextureSet; + } + } + Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+Materials.Iron.mIconSet.mSetName+". [Fallback]"); + return Materials.Gold.mIconSet; + } + + public final String getLocalizedName(){ + if (this.localizedName != null) { + return this.localizedName; + } + return "ERROR BAD LOCALIZED NAME"; + } + + public final String getUnlocalizedName(){ + if (this.unlocalizedName != null) { + return this.unlocalizedName; + } + return "ERROR.BAD.UNLOCALIZED.NAME"; + } + + final public MaterialState getState(){ + return this.materialState; + } + + final public short[] getRGB(){ + if (this.RGBA != null) { + return this.RGBA; + } + return new short[] {255,0,0}; + } + + final public short[] getRGBA(){ + if (this.RGBA != null) { + if (this.RGBA.length == 4){ + return this.RGBA; + } + else { + return new short[]{this.RGBA[0], this.RGBA[1], this.RGBA[2], 0}; + } + } + return new short[] {255,0,0, 0}; + } + + final public int getRgbAsHex(){ + + final int returnValue = Utils.rgbtoHexValue(this.RGBA[0], this.RGBA[1], this.RGBA[2]); + if (returnValue == 0){ + return (int) this.dataVar; + } + return Utils.rgbtoHexValue(this.RGBA[0], this.RGBA[1], this.RGBA[2]); + } + + final public long getProtons() { + return this.vProtons; + } + + public final long getNeutrons() { + return this.vNeutrons; + } + + final public long getMass() { + return this.vProtons + this.vNeutrons; + } + + public final int getMeltingPointC() { + return this.meltingPointC; + } + + public final int getBoilingPointC() { + return this.boilingPointC; + } + + public final int getMeltingPointK() { + return this.meltingPointK; + } + + public final int getBoilingPointK() { + return this.boilingPointK; + } + + public final boolean requiresBlastFurnace(){ + return this.usesBlastFurnace; + } + + public final ItemStack getComponentByPrefix(OrePrefixes aPrefix, int stacksize) { + String aKey = aPrefix.name(); + Map g = mComponentMap.get(this.unlocalizedName); + if (g == null) { + Map aMap = new HashMap(); + mComponentMap.put(unlocalizedName, aMap); + g = aMap; + } + ItemStack i = g.get(aKey); + if (i != null) { + return ItemUtils.getSimpleStack(i, stacksize); + } + else { + // Try get a GT Material + Materials Erf = MaterialUtils.getMaterial(this.unlocalizedName); + if (Erf != null && !MaterialUtils.isNullGregtechMaterial(Erf)) { + ItemStack Erg = ItemUtils.getOrePrefixStack(aPrefix, Erf, stacksize); + if (Erg != null && ItemUtils.checkForInvalidItems(Erg)) { + Logger.MATERIALS("Found \"" + aKey + this.unlocalizedName + "\" using backup GT Materials option."); + g.put(aKey, Erg); + mComponentMap.put(unlocalizedName, g); + return Erg; + } + else { + // Try get a molten cell + if (aPrefix == OrePrefixes.cell) { + Erg = ItemUtils.getOrePrefixStack(OrePrefixes.cellMolten, Erf, stacksize); + if (Erg != null && ItemUtils.checkForInvalidItems(Erg)) { + Logger.MATERIALS("Found \"" + OrePrefixes.cellMolten.name() + this.unlocalizedName + "\" using backup GT Materials option."); + g.put(aKey, Erg); + mComponentMap.put(unlocalizedName, g); + return Erg; + } + } + } + } else { + ItemStack u = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(aKey + this.unlocalizedName, stacksize); + if (u != null) { + g.put(aKey, u); + mComponentMap.put(unlocalizedName, g); + return u; + } + } + //Logger.MATERIALS("Unabled to find \"" + aKey + this.unlocalizedName + "\""); + return ItemUtils.getErrorStack(stacksize, (aKey + this.unlocalizedName+" x"+stacksize)); + } + + } + + final public Block getBlock(){ + Block b = Block.getBlockFromItem(getBlock(1).getItem()); + if (b == null) { + Logger.INFO("[ERROR] Tried to get invalid block for "+this.getLocalizedName()+", returning debug block instead."); + } + return b != null ? b : Blocks.lit_furnace; + } + + public final ItemStack getBlock(final int stacksize){ + ItemStack i = getComponentByPrefix(OrePrefixes.block, stacksize); + return i != null ? i : ItemUtils.getItemStackOfAmountFromOreDictNoBroken("block"+this.unlocalizedName, stacksize); + } + + public final ItemStack getDust(final int stacksize){ + ItemStack i = getComponentByPrefix(OrePrefixes.dust, stacksize); + return i != null ? i : ItemUtils.getGregtechDust("dust"+this.unlocalizedName, stacksize); + } + + public final ItemStack getSmallDust(final int stacksize){ + return getComponentByPrefix(OrePrefixes.dustSmall, stacksize); + } + + public final ItemStack getTinyDust(final int stacksize){ + return getComponentByPrefix(OrePrefixes.dustTiny, stacksize); + } + + public final ItemStack getIngot(final int stacksize){ + return getComponentByPrefix(OrePrefixes.ingot, stacksize); + } + + public final ItemStack getHotIngot(final int stacksize){ + return getComponentByPrefix(OrePrefixes.ingotHot, stacksize); + } + + public final ItemStack getPlate(final int stacksize){ + return getComponentByPrefix(OrePrefixes.plate, stacksize); + } + + public final ItemStack getPlateDouble(final int stacksize){ + return getComponentByPrefix(OrePrefixes.plateDouble, stacksize); + } + + public final ItemStack getGear(final int stacksize){ + return getComponentByPrefix(OrePrefixes.gearGt, stacksize); + } + + public final ItemStack getRod(final int stacksize){ + return getComponentByPrefix(OrePrefixes.stick, stacksize); + } + + public final ItemStack getLongRod(final int stacksize){ + return getComponentByPrefix(OrePrefixes.stickLong, stacksize); + } + + public final ItemStack getBolt(final int stacksize){ + return getComponentByPrefix(OrePrefixes.bolt, stacksize); + } + + public final ItemStack getScrew(final int stacksize){ + return getComponentByPrefix(OrePrefixes.screw, stacksize); + } + + public final ItemStack getRing(final int stacksize){ + return getComponentByPrefix(OrePrefixes.ring, stacksize); + } + + public final ItemStack getRotor(final int stacksize){ + return getComponentByPrefix(OrePrefixes.rotor, stacksize); + } + + public final ItemStack getFrameBox(final int stacksize){ + return getComponentByPrefix(OrePrefixes.frameGt, stacksize); + } + + public final ItemStack getCell(final int stacksize){ + return getComponentByPrefix(OrePrefixes.cell, stacksize); + } + + public final ItemStack getPlasmaCell(final int stacksize){ + return getComponentByPrefix(OrePrefixes.cellPlasma, stacksize); + } + + public final ItemStack getNugget(final int stacksize){ + return getComponentByPrefix(OrePrefixes.nugget, stacksize); + } + + /** + * Ore Components + * @return + */ + + public final ItemStack getOre(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.getUnlocalizedName()), stacksize); + } + public final Block getOreBlock(final int stacksize){ + //Logger.DEBUG_MATERIALS("Trying to get ore block for "+this.getLocalizedName()+". Looking for '"+"ore"+Utils.sanitizeString(this.getUnlocalizedName())+"'."); + try{ + ItemStack a1 = getOre(1); + Item a2 = a1.getItem(); + Block a3 = Block.getBlockFromItem(a2); + if (a3 != null) { + return a3; + } + + Block x = Block.getBlockFromItem(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.unlocalizedName), stacksize).getItem()); + if (x != null){ + return x; + } + } + catch (Throwable t){ + //t.printStackTrace(); + } + //Logger.MATERIALS("Failed getting the Ore Block for "+this.getLocalizedName()+"."); + return Blocks.stone; + } + public final ItemStack getCrushed(final int stacksize){ + return getComponentByPrefix(OrePrefixes.crushed, stacksize); + } + public final ItemStack getCrushedPurified(final int stacksize){ + return getComponentByPrefix(OrePrefixes.crushedPurified, stacksize); + } + public final ItemStack getCrushedCentrifuged(final int stacksize){ + return getComponentByPrefix(OrePrefixes.crushedCentrifuged, stacksize); + } + public final ItemStack getDustPurified(final int stacksize){ + return getComponentByPrefix(OrePrefixes.dustPure, stacksize); + } + public final ItemStack getDustImpure(final int stacksize){ + return getComponentByPrefix(OrePrefixes.dustImpure, stacksize); + } + public final ItemStack getMilled(final int stacksize){ + return getComponentByPrefix(CustomOrePrefix.milled.get(), stacksize); + } + + public final boolean hasSolidForm() { + if (ItemUtils.checkForInvalidItems(new ItemStack[] {getDust(1), getBlock(1), getTinyDust(1), getSmallDust(1)})) { + return true; + } + return false; + } + + final public ItemStack[] getMaterialComposites(){ + if (this.vMaterialInput != null && !this.vMaterialInput.isEmpty()){ + final ItemStack[] temp = new ItemStack[this.vMaterialInput.size()]; + for (int i=0;i getComposites(){ + return this.vMaterialInput; + } + + final public int[] getMaterialCompositeStackSizes(){ + if (!this.vMaterialInput.isEmpty()){ + final int[] temp = new int[this.vMaterialInput.size()]; + for (int i=0;i tempInput){ + if (tempInput != null){ + if (!tempInput.isEmpty()){ + Logger.MATERIALS("length: "+tempInput.size()); + Logger.MATERIALS("(inputs != null): "+(tempInput != null)); + //Utils.LOG_MATERIALS("length: "+inputs.length); + final long[] tempRatio = new long[tempInput.size()]; + for (int x=0;x 0){ + String tempRatioStringThing1 = ""; + for (int r=0;r tempInput = this.vMaterialInput; + if (tempInput != null){ + if (!tempInput.isEmpty()){ + String dummyFormula = ""; + final long[] dummyFormulaArray = this.getSmallestRatio(tempInput); + if (dummyFormulaArray != null){ + if (dummyFormulaArray.length >= 1){ + for (int e=0;e 1){ + + if (aChemFormula.length() > 3){ + dummyFormula = dummyFormula + "(" + aChemFormula + ")" + dummyFormulaArray[e]; + } + else { + dummyFormula = dummyFormula + aChemFormula + dummyFormulaArray[e]; + } + } + else if (dummyFormulaArray[e] == 1){ + if (aChemFormula.length() > 3){ + dummyFormula = dummyFormula + "(" +aChemFormula + ")"; + } + else { + dummyFormula = dummyFormula +aChemFormula; + } + } + else { + dummyFormula = dummyFormula + "??"; + } + } else { + dummyFormula = dummyFormula + "??"; + } + } else { + dummyFormula = dummyFormula + "??"; + } + } + } + return StringUtils.subscript(dummyFormula); + //return dummyFormula; + } + Logger.MATERIALS("dummyFormulaArray <= 0"); + } + Logger.MATERIALS("dummyFormulaArray == null"); + } + Logger.MATERIALS("tempInput.length <= 0"); + } + Logger.MATERIALS("tempInput == null"); + return "??"; + + } + + public final boolean queueFluidGeneration() { + return isFluidQueued = true; + } + + public final static void generateQueuedFluids() { + for (Material m : mMaterialMap) { + if (m.isFluidQueued) { + } + } + } + + //If we need a fluid, let's just queue it for later. + public boolean isFluidQueued = false; + + public final Fluid generateFluid(){ + if (this.materialState == MaterialState.ORE){ + return null; + } + + Fluid aGTBaseFluid = null; + + // Clean up Internal Fluid Generation + final Materials n1 = MaterialUtils.getMaterial(this.getLocalizedName(), Utils.sanitizeString(this.getLocalizedName())); + final Materials n2 = MaterialUtils.getMaterial(this.getUnlocalizedName(), Utils.sanitizeString(this.getUnlocalizedName())); + + FluidStack f1 = FluidUtils.getWildcardFluidStack(n1, 1); + FluidStack f2 = FluidUtils.getWildcardFluidStack(n2, 1); + FluidStack f3 = FluidUtils.getWildcardFluidStack(Utils.sanitizeString(this.getUnlocalizedName(), new char[] {'-', '_'}), 1); + FluidStack f4 = FluidUtils.getWildcardFluidStack(Utils.sanitizeString(this.getLocalizedName(), new char[] {'-', '_'}), 1); + + if (f1 != null) { + aGTBaseFluid = f1.getFluid(); + } + else if (f2 != null) { + aGTBaseFluid = f2.getFluid(); + } + else if (f3 != null) { + aGTBaseFluid = f3.getFluid(); + } + else if (f4 != null) { + aGTBaseFluid = f4.getFluid(); + } + + + ItemStack aFullCell = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1); + ItemStack aFullCell2 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getLocalizedName(), 1); + ItemStack aFullCell3 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+Utils.sanitizeString(this.getUnlocalizedName(), new char[] {'-', '_'}), 1); + ItemStack aFullCell4 = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+Utils.sanitizeString(this.getLocalizedName(), new char[] {'-', '_'}), 1); + + Logger.MATERIALS("Generating our own fluid."); + //Generate a Cell if we need to, but first validate all four searches are invalid + + if (!ItemUtils.checkForInvalidItems(new ItemStack[] {aFullCell, aFullCell2, aFullCell3, aFullCell4})){ + if (this.vGenerateCells){ + Item g = new BaseItemCell(this); + aFullCell = ItemUtils.getSimpleStack(g); + Logger.MATERIALS("Generated a cell for "+this.getUnlocalizedName()); + } + else { + Logger.MATERIALS("Did not generate a cell for "+this.getUnlocalizedName()); + } + } + else { + // One cell we searched for was valid, let's register it. + if (aFullCell != null) { + this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell); + } + else if (aFullCell2 != null) { + this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell2); + } + else if (aFullCell3 != null) { + this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell3); + } + else if (aFullCell4 != null) { + this.registerComponentForMaterial(ComponentTypes.CELL, aFullCell4); + } + } + + // We found a GT fluid, let's use it. + // Good chance we registered the cell from this material too. + if (aGTBaseFluid != null) { + return aGTBaseFluid; + } + + // This fluid does not exist at all, time to generate it. + if (this.materialState == MaterialState.SOLID){ + return FluidUtils.addGTFluid( + this.getUnlocalizedName(), + "Molten "+this.getLocalizedName(), + this.RGBA, + 4, + this.getMeltingPointK(), + aFullCell, + ItemUtils.getEmptyCell(), + 1000, + this.vGenerateCells); + } + else if (this.materialState == MaterialState.LIQUID || this.materialState == MaterialState.PURE_LIQUID){ + return FluidUtils.addGTFluid( + this.getUnlocalizedName(), + this.getLocalizedName(), + this.RGBA, + 0, + this.getMeltingPointK(), + aFullCell, + ItemUtils.getEmptyCell(), + 1000, + this.vGenerateCells); + } + else if (this.materialState == MaterialState.GAS || this.materialState == MaterialState.PURE_GAS){ + return FluidUtils.generateGas(unlocalizedName, this.getLocalizedName(), getMeltingPointK(), getRGBA(), vGenerateCells); + /*return FluidUtils.addGTFluid( + this.getUnlocalizedName(), + this.getLocalizedName()+" Gas", + this.RGBA, + 2, + this.getMeltingPointK(), + aFullCell, + ItemUtils.getEmptyCell(), + 1000, + this.vGenerateCells);*/ + } + else { //Plasma + return this.generatePlasma(); + } + } + + public final Fluid generatePlasma(){ + if (this.materialState == MaterialState.ORE){ + return null; + } + final Materials isValid = tryFindGregtechMaterialEquivalent(); + + if (!this.vGenerateCells){ + return null; + } + if (isValid != null) { + for (Materials m : invalidMaterials.values()){ + if (isValid == m){ + return null; + } + } + if (isValid.mPlasma != null){ + Logger.MATERIALS("Using a pre-defined Plasma from GT."); + return isValid.mPlasma; + } + } + Logger.MATERIALS("Generating our own Plasma."); + return FluidUtils.addGTPlasma(this); + } + + + public Fluid getFluid() { + return mFluid; + } + + final public FluidStack getFluidStack(final int fluidAmount) { + if (this.mFluid == null){ + return null; + } + final FluidStack moltenFluid = new FluidStack(this.mFluid, fluidAmount); + return moltenFluid; + } + + final public boolean setFluid(Fluid aFluid) { + if (this.mFluid == null){ + this.mFluid = aFluid; + return true; + } + return false; + } + + + final public int calculateMeltingPoint(){ + try { + AutoMap aDataSet = new AutoMap(); + for (MaterialStack m : this.vMaterialInput) { + aDataSet.put(m.getStackMaterial().getMeltingPointC()); + } + long aAverage = MathUtils.getIntAverage(aDataSet); + return MathUtils.safeInt(aAverage); + } + catch (Throwable r){ + r.printStackTrace(); + return 500; + } + } + + final public int calculateBoilingPoint(){ + try { + + AutoMap aDataSet = new AutoMap(); + for (MaterialStack m : this.vMaterialInput) { + aDataSet.put(m.getStackMaterial().getBoilingPointC()); + } + long aAverage = MathUtils.getIntAverage(aDataSet); + return MathUtils.safeInt(aAverage); + } + catch (Throwable r){ + r.printStackTrace(); + return 2500; + } + } + + final public long calculateProtons(){ + try { + + AutoMap aDataSet = new AutoMap(); + for (MaterialStack m : this.vMaterialInput) { + aDataSet.put(m.getStackMaterial().getProtons()); + } + long aAverage = MathUtils.getLongAverage(aDataSet); + return MathUtils.safeInt(aAverage); + } + catch (Throwable r){ + r.printStackTrace(); + return 50; + } + } + + final public long calculateNeutrons(){ + try { + + AutoMap aDataSet = new AutoMap(); + for (MaterialStack m : this.vMaterialInput) { + aDataSet.put(m.getStackMaterial().getNeutrons()); + } + long aAverage = MathUtils.getLongAverage(aDataSet); + return MathUtils.safeInt(aAverage); + } + catch (Throwable r){ + r.printStackTrace(); + return 75; + } + } + + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (!Material.class.isInstance(obj)) { + return false; + } + Material aObj = (Material) obj; + if (aObj.unlocalizedName.equals(this.unlocalizedName)) { + if (aObj.localizedName.equals(this.localizedName)) { + return true; + } + } + return false; + } + + public boolean registerComponentForMaterial(FluidStack aStack) { + return registerComponentForMaterial(this, aStack); + } + + private static boolean registerComponentForMaterial(Material componentMaterial, FluidStack aStack) { + if (componentMaterial != null && aStack != null && componentMaterial.mFluid == null) { + componentMaterial.mFluid = aStack.getFluid(); + return true; + } + return false; + } + + public boolean registerComponentForMaterial(ComponentTypes aPrefix, ItemStack aStack) { + return registerComponentForMaterial(this, aPrefix.getGtOrePrefix(), aStack); + } + + public boolean registerComponentForMaterial(OrePrefixes aPrefix, ItemStack aStack) { + return registerComponentForMaterial(this, aPrefix, aStack); + } + + public static boolean registerComponentForMaterial(Material componentMaterial, ComponentTypes aPrefix, ItemStack aStack) { + return registerComponentForMaterial(componentMaterial, aPrefix.getGtOrePrefix(), aStack); + } + + public static boolean registerComponentForMaterial(Material componentMaterial, OrePrefixes aPrefix, ItemStack aStack) { + if (componentMaterial == null) { + return false; + } + //Register Component + Map aMap = Material.mComponentMap.get(componentMaterial.getUnlocalizedName()); + if (aMap == null) { + aMap = new HashMap(); + } + String aKey = aPrefix.name(); + ItemStack x = aMap.get(aKey); + if (x == null) { + aMap.put(aKey, aStack); + Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); + Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); + return true; + } + else { + //Bad + Logger.MATERIALS("Tried to double register a material component. "); + return false; + } + } + + public Materials tryFindGregtechMaterialEquivalent() { + return tryFindGregtechMaterialEquivalent(this); + } + + + public static Materials tryFindGregtechMaterialEquivalent(Material aMaterial) { + String aMaterialName = aMaterial.getLocalizedName(); + Materials aGregtechMaterial = Materials.get(aMaterialName); + if (aGregtechMaterial == null || MaterialUtils.isNullGregtechMaterial(aGregtechMaterial)) { + aMaterialName = aMaterialName.replace(" ", "_"); + aGregtechMaterial = Materials.get(aMaterialName); + if (aGregtechMaterial == null || MaterialUtils.isNullGregtechMaterial(aGregtechMaterial)) { + aMaterialName = aMaterialName.replace(" ", ""); + aGregtechMaterial = Materials.get(aMaterialName); + if (aGregtechMaterial == null || MaterialUtils.isNullGregtechMaterial(aGregtechMaterial)) { + return null; + } + else { + return aGregtechMaterial; + } + } + else { + return aGregtechMaterial; + } + } + else { + return aGregtechMaterial; + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java b/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java new file mode 100644 index 0000000000..8425ed89be --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/MaterialGenerator.java @@ -0,0 +1,409 @@ +package gtPlusPlus.core.material; + +import java.util.Set; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.block.base.BasicBlock.BlockTypes; +import gtPlusPlus.core.block.base.BlockBaseModular; +import gtPlusPlus.core.block.base.BlockBaseOre; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; +import gtPlusPlus.core.item.base.bolts.BaseItemBolt; +import gtPlusPlus.core.item.base.dusts.BaseItemDust; +import gtPlusPlus.core.item.base.dusts.BaseItemDust.DustState; +import gtPlusPlus.core.item.base.gears.BaseItemGear; +import gtPlusPlus.core.item.base.ingots.BaseItemIngot; +import gtPlusPlus.core.item.base.ingots.BaseItemIngotHot; +import gtPlusPlus.core.item.base.nugget.BaseItemNugget; +import gtPlusPlus.core.item.base.ore.BaseItemCentrifugedCrushedOre; +import gtPlusPlus.core.item.base.ore.BaseItemCrushedOre; +import gtPlusPlus.core.item.base.ore.BaseItemImpureDust; +import gtPlusPlus.core.item.base.ore.BaseItemPurifiedCrushedOre; +import gtPlusPlus.core.item.base.ore.BaseItemPurifiedDust; +import gtPlusPlus.core.item.base.plates.BaseItemPlate; +import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble; +import gtPlusPlus.core.item.base.rings.BaseItemRing; +import gtPlusPlus.core.item.base.rods.BaseItemRod; +import gtPlusPlus.core.item.base.rods.BaseItemRodLong; +import gtPlusPlus.core.item.base.rotors.BaseItemRotor; +import gtPlusPlus.core.item.base.screws.BaseItemScrew; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_AlloySmelter; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Assembler; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelter; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_DustGeneration; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Extruder; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_FluidCanning; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Fluids; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MaterialProcessing; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MetalRecipe; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Ore; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Plasma; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Plates; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling; +import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_ShapedCrafting; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class MaterialGenerator { + + public static final AutoMap>> mRecipeMapsToGenerate = new AutoMap>>(); + + @SuppressWarnings("unused") + private static volatile Item temp; + @SuppressWarnings("unused") + private static volatile Block tempBlock; + + + public static boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid) { + return addFluidExtractionRecipe(aEmpty, aRemains, aFluid, null, null); + } + + /** + * Called Reflectively from CORE.RA.addFluidExtractionRecipe + * @param aSpecial + * @return + */ + public static boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid, Integer aDuration, Integer aEU) { + RecipeGen_FluidCanning g = new RecipeGen_FluidCanning(true, aEmpty, aRemains, aFluid, aDuration, aEU); + if (g != null && g.valid()) { + //Logger.INFO("[FIND] Adding Extraction recipe for "+ItemUtils.getItemName(aEmpty)+", "+ItemUtils.getItemName(aRemains)+", "+ItemUtils.getFluidName(aFluid)); + return true; + } + Logger.INFO("[ERROR] FAILED adding Extraction recipe for "+ItemUtils.getItemName(aEmpty)+", "+ItemUtils.getItemName(aRemains)+", "+ItemUtils.getFluidName(aFluid)); + return false; + } + + + public static boolean addFluidCannerRecipe(ItemStack aEmpty, ItemStack aFullContainer, FluidStack aFluidIn, FluidStack rFluidOut) { + return addFluidCannerRecipe(aEmpty, aFullContainer, aFluidIn, rFluidOut, null, null); + } + /** + * Called Reflectively from CORE.RA.addFluidCannerRecipe + * @return + */ + public static boolean addFluidCannerRecipe(ItemStack aEmpty, ItemStack aFullContainer, FluidStack aFluidIn, FluidStack rFluidOut, Integer aTime, Integer aEu) { + /*GT_Recipe r = new Recipe_GT( + true, + new ItemStack[] {aEmpty}, + new ItemStack[] {aFullContainer}, + null, + new int[] {}, + new FluidStack[] {rFluidIn}, + new FluidStack[] {rFluidOut}, + 0, 0, 0);*/ + //new RecipeGen_FluidCanning(r, false); + RecipeGen_FluidCanning g = new RecipeGen_FluidCanning(false, aEmpty, aFullContainer, aFluidIn, null, null, 0); + if (g != null && g.valid()) { + return true; + } + return false; + } + + public static void generate(final Material matInfo){ + generate(matInfo, true); + } + + + public static void generate(final Material matInfo, final boolean generateEverything){ + generate(matInfo, generateEverything, true); + } + + public static boolean generate(final Material matInfo, final boolean generateEverything, final boolean generateBlastSmelterRecipes){ + try { + final String unlocalizedName = matInfo.getUnlocalizedName(); + final String materialName = matInfo.getLocalizedName(); + final short[] C = matInfo.getRGBA(); + final int Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); + final boolean hotIngot = matInfo.requiresBlastFurnace(); + int materialTier = matInfo.vTier; //TODO + + if ((materialTier > 10) || (materialTier <= 0)){ + materialTier = 2; + } + + int sRadiation = 0; + if (ItemUtils.isRadioactive(materialName) || (matInfo.vRadiationLevel != 0)){ + sRadiation = matInfo.vRadiationLevel; + } + + if (matInfo.getState() == MaterialState.SOLID){ + if (generateEverything == true){ + if (sRadiation >= 1){ + tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); + temp = new BaseItemIngot(matInfo); + + temp = new BaseItemDust(matInfo); + temp = new BaseItemNugget(matInfo); + temp = new BaseItemPlate(matInfo); + temp = new BaseItemRod(matInfo); + temp = new BaseItemRodLong(matInfo); + } + + else { + tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); + tempBlock = new BlockBaseModular(matInfo,BlockTypes.FRAME); + temp = new BaseItemIngot(matInfo); + if (hotIngot){ + temp = new BaseItemIngotHot(matInfo); + } + temp = new BaseItemDust(matInfo); + temp = new BaseItemNugget(matInfo); + temp = new BaseItemPlate(matInfo); + temp = new BaseItemPlateDouble(matInfo); + temp = new BaseItemBolt(matInfo); + temp = new BaseItemRod(matInfo); + temp = new BaseItemRodLong(matInfo); + temp = new BaseItemRing(matInfo); + temp = new BaseItemScrew(matInfo); + temp = new BaseItemRotor(matInfo); + temp = new BaseItemGear(matInfo); + } + } else { + tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); + + temp = new BaseItemIngot(matInfo); + temp = new BaseItemDust(matInfo); + temp = new BaseItemNugget(matInfo); + temp = new BaseItemPlate(matInfo); + temp = new BaseItemPlateDouble(matInfo); + } + } + else if (matInfo.getState() == MaterialState.LIQUID){ + if (generateEverything == true){ + tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); + } + temp = new BaseItemIngot(matInfo); + temp = new BaseItemDust(matInfo); + temp = new BaseItemNugget(matInfo); + temp = new BaseItemPlate(matInfo); + temp = new BaseItemPlateDouble(matInfo); + } + else if (matInfo.getState() == MaterialState.GAS){ + temp = new BaseItemDust(matInfo); + FluidUtils.generateGas(unlocalizedName, materialName, matInfo.getMeltingPointK(), C, true); + } + else if (matInfo.getState() == MaterialState.PURE_GAS){ + FluidUtils.generateGas(unlocalizedName, materialName, matInfo.getMeltingPointK(), C, true); + return true; + } + else if (matInfo.getState() == MaterialState.PURE_LIQUID){ + FluidUtils.generateFluidNoPrefix(unlocalizedName, materialName, matInfo.getMeltingPointK(), C); + return true; + } + else if (matInfo.getState() == MaterialState.ORE){ + + } + + //Add A jillion Recipes - old code + new RecipeGen_AlloySmelter(matInfo); + new RecipeGen_Assembler(matInfo); + if (generateBlastSmelterRecipes){ + new RecipeGen_BlastSmelter(matInfo); + } + new RecipeGen_MetalRecipe(matInfo); + new RecipeGen_Extruder(matInfo); + new RecipeGen_Fluids(matInfo); + new RecipeGen_Plates(matInfo); + new RecipeGen_ShapedCrafting(matInfo); + new RecipeGen_MaterialProcessing(matInfo); + + new RecipeGen_DustGeneration(matInfo); + new RecipeGen_Recycling(matInfo); + new RecipeGen_Plasma(matInfo); + + return true; + + } catch (final Throwable t) + + { + Logger.MATERIALS(""+matInfo.getLocalizedName()+" failed to generate."); + return false; + } + } + + public static void generateDusts(final Material matInfo){ + final String unlocalizedName = matInfo.getUnlocalizedName(); + final String materialName = matInfo.getLocalizedName(); + final short[] C = matInfo.getRGBA(); + final int Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); + int materialTier = matInfo.vTier; //TODO + + if ((materialTier > 10) || (materialTier <= 0)){ + materialTier = 2; + } + + int sRadiation = 0; + if (ItemUtils.isRadioactive(materialName) || (matInfo.vRadiationLevel != 0)){ + sRadiation = matInfo.vRadiationLevel; + } + + if (matInfo.getState() == MaterialState.SOLID){ + temp = new BaseItemDust(matInfo); + } + + //Add A jillion Recipes - old code + try { + RecipeGen_DustGeneration.addMixerRecipe_Standalone(matInfo); + new RecipeGen_Fluids(matInfo); + new RecipeGen_MaterialProcessing(matInfo); + } + catch (Throwable t) { + Logger.MATERIALS("Failed to generate some recipes for "+materialName); + Logger.ERROR("Failed to generate some recipes for "+materialName); + t.printStackTrace(); + } + //RecipeGen_Recycling.generateRecipes(matInfo); + } + + public static void generateNuclearMaterial(final Material matInfo){ + generateNuclearMaterial(matInfo, true); + } + + + public static void generateNuclearDusts(final Material matInfo){ + generateNuclearDusts(matInfo, true); + } + + public static void generateNuclearDusts(final Material matInfo, boolean generateDehydratorRecipe){ + generateNuclearMaterial(matInfo, false, true, false, false, true); + if (generateDehydratorRecipe && matInfo.getFluid() != null && matInfo.getDust(0) != null) { + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(20) + }, + matInfo.getFluidStack(144), + null, + new ItemStack[] { + matInfo.getDust(1), + }, + new int[] { 10000 }, + 10*(matInfo.vVoltageMultiplier/5), // Time in ticks + matInfo.vVoltageMultiplier); // EU + } + else { + Logger.INFO("Nuclear Dehydrator: Did not generate recipe for "+matInfo.getLocalizedName()+" | Null Fluid? "+(matInfo.getFluid() == null)+" | Null Dust? "+(matInfo.getDust(0) == null)); + } + } + + public static void generateNuclearMaterial(final Material matInfo, final boolean generatePlates){ + generateNuclearMaterial(matInfo, true, true, true, generatePlates, true); + } + + public static void generateNuclearMaterial(final Material matInfo, final boolean generateBlock, + final boolean generateDusts, final boolean generateIngot, final boolean generatePlates, final boolean disableOptionalRecipes){ + try { + + if (generateBlock) { + tempBlock = new BlockBaseModular(matInfo,BlockTypes.STANDARD); + } + if (generateDusts) { + temp = new BaseItemDust(matInfo); + } + if (generateIngot) { + temp = new BaseItemIngot(matInfo); + temp = new BaseItemNugget(matInfo); + } + + if (generatePlates) { + temp = new BaseItemPlate(matInfo); + temp = new BaseItemPlateDouble(matInfo); + new RecipeGen_Plates(matInfo); + new RecipeGen_Extruder(matInfo); + new RecipeGen_Assembler(matInfo); + } + + if (!disableOptionalRecipes) { + new RecipeGen_ShapedCrafting(matInfo); + new RecipeGen_Fluids(matInfo); + new RecipeGen_MaterialProcessing(matInfo); + new RecipeGen_Recycling(matInfo); + } + + new RecipeGen_MetalRecipe(matInfo); + new RecipeGen_DustGeneration(matInfo, disableOptionalRecipes); + new RecipeGen_Plasma(matInfo); + + } catch (final Throwable t){ + Logger.MATERIALS(""+matInfo.getLocalizedName()+" failed to generate."); + } + } + + + public static void generateOreMaterial(final Material matInfo){ + generateOreMaterial(matInfo, true, true, true, matInfo.getRGBA()); + } + + @SuppressWarnings("unused") + public static void generateOreMaterial(final Material matInfo, boolean generateOre, boolean generateDust, boolean generateSmallTinyDusts, short[] customRGB){ + try { + + if (matInfo == null){ + Logger.DEBUG_MATERIALS("Invalid Material while constructing null material."); + return; + } + + final String unlocalizedName = matInfo.getUnlocalizedName(); + final String materialName = matInfo.getLocalizedName(); + final short[] C = customRGB; + final Integer Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); + + + if (Colour == null){ + Logger.DEBUG_MATERIALS("Invalid Material while constructing "+materialName+"."); + return; + } + + int sRadiation = 0; + if (matInfo.vRadiationLevel > 0){ + sRadiation = matInfo.vRadiationLevel; + } + + if (generateOre) { + tempBlock = new BlockBaseOre(matInfo, BlockTypes.ORE, Colour.intValue()); + } + + DustState aState = new DustState(generateDust, generateSmallTinyDusts, generateSmallTinyDusts); + + if (!aState.generatesDust()) { + if (aState.generatesSmallDust()) { + temp = new BaseItemComponent(matInfo, ComponentTypes.DUSTSMALL); + } + if (aState.generatesTinyDust()) { + temp = new BaseItemComponent(matInfo, ComponentTypes.DUSTTINY); + } + } + else { + temp = new BaseItemDust(aState, matInfo); + } + + temp = new BaseItemCrushedOre(matInfo); + temp = new BaseItemCentrifugedCrushedOre(matInfo); + temp = new BaseItemPurifiedCrushedOre(matInfo); + temp = new BaseItemImpureDust(matInfo); + temp = new BaseItemPurifiedDust(matInfo); + + Logger.MATERIALS("Generated all ore components for "+matInfo.getLocalizedName()+", now generating processing recipes."); + new RecipeGen_Ore(matInfo); + + } catch (final Throwable t){ + Logger.MATERIALS("[Error] "+(matInfo != null ? matInfo.getLocalizedName() : "Null Material")+" failed to generate."); + t.printStackTrace(); + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/material/MaterialStack.java b/src/main/java/gtPlusPlus/core/material/MaterialStack.java new file mode 100644 index 0000000000..63a9ccce9c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/MaterialStack.java @@ -0,0 +1,109 @@ +package gtPlusPlus.core.material; + +import java.math.BigDecimal; +import java.math.RoundingMode; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class MaterialStack { + + private final transient int[] vAmount; + private final Material stackMaterial; + private final double vPercentageToUse; + + public MaterialStack(final Material inputs, final double partOutOf100){ + this.stackMaterial = inputs; + //Logger.INFO("Tried getting MaterialStack for "+inputs.getLocalizedName()); + this.vPercentageToUse = partOutOf100; + this.vAmount = this.math(partOutOf100); + } + + private int[] math(final double val){ + double i; + //Cast to a BigDecimal to round it. + final BigDecimal bd = new BigDecimal(val).setScale(2, RoundingMode.HALF_EVEN); + i = bd.doubleValue(); + //Split the string into xx.xx + final String[] arr=String.valueOf(i).split("\\."); + final int[] intArr=new int[2]; + intArr[0]=Integer.parseInt(arr[0]); + intArr[1]=Integer.parseInt(arr[1]); + return intArr; + } + + public ItemStack getValidStack(){ + if (this.stackMaterial.getDust(1) == null){ + //if (this.stackMaterial.getCell(1) == null){ + return null; + //} + //return this.stackMaterial.getCell(this.vAmount[0]); + } + return this.stackMaterial.getDust(this.vAmount[0]); + } + + public ItemStack getDustStack(){ + return this.stackMaterial.getDust(this.vAmount[0]); + } + + public ItemStack getDustStack(final int amount){ + return this.stackMaterial.getDust(amount); + } + + public Material getStackMaterial(){ + if (this.stackMaterial == null){ + Logger.MATERIALS("Tried getStackMaterial, got an invalid material."); + Logger.MATERIALS(ReflectionUtils.getMethodName(0)); + Logger.MATERIALS(ReflectionUtils.getMethodName(1)); + Logger.MATERIALS(ReflectionUtils.getMethodName(2)); + Logger.MATERIALS(ReflectionUtils.getMethodName(3)); + return null; + } + return this.stackMaterial; + } + + public double getvPercentageToUse(){ + return this.vPercentageToUse; + } + + public long[] getSmallestStackSizes(){ + return this.stackMaterial.getSmallestRatio(this.stackMaterial.getComposites()); + } + + public int getPartsPerOneHundred(){ + if (this.vAmount != null){ + if ((this.vAmount[0] >= 1) && (this.vAmount[0] <= 100)){ + return this.vAmount[0]; + } + } + return 100; + } + public ItemStack getLeftOverStacksFromDecimalValue(){ + final int temp = this.vAmount[1]; + int getCount; + if ((temp >= 25) && (temp <=99)){ + getCount = temp/25; + return this.stackMaterial.getSmallDust(getCount); + } + else if ((temp >= 11) && (temp <= 24)){ + getCount = temp/11; + return this.stackMaterial.getTinyDust(getCount); + } + else { + return null; + } + } + + public ItemStack[] getValidItemStacks(){ + return ItemUtils.validItemsForOreDict(this.stackMaterial.getUnlocalizedName()); + } + + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/material/NONMATERIAL.java b/src/main/java/gtPlusPlus/core/material/NONMATERIAL.java new file mode 100644 index 0000000000..7ab72d50bc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/NONMATERIAL.java @@ -0,0 +1,44 @@ +package gtPlusPlus.core.material; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.TextureSet; +import gtPlusPlus.core.util.minecraft.MaterialUtils; + +public class NONMATERIAL { + + //Soul Sand + public static final Material SOULSAND = MaterialUtils.generateMaterialFromGtENUM(Materials.SoulSand); + + //Redstone + public static final Material REDSTONE = MaterialUtils.generateMaterialFromGtENUM(Materials.Redstone); + + //Glowstone Dust + public static final Material GLOWSTONE = MaterialUtils.generateMaterialFromGtENUM(Materials.Glowstone); + + //Enderpearl + public static final Material ENDERPEARL = MaterialUtils.generateMaterialFromGtENUM(Materials.EnderPearl); + + //Raw Flesh + public static final Material MEAT = MaterialUtils.generateMaterialFromGtENUM(Materials.MeatRaw); + + //Clay + public static final Material CLAY = MaterialUtils.generateMaterialFromGtENUM(Materials.Clay); + + //Wrought Iron + public static final Material WROUGHT_IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.WroughtIron); + + //PTFE + public static final Material PTFE = MaterialUtils.generateMaterialFromGtENUM(MaterialUtils.getMaterial("Polytetrafluoroethylene", "Plastic")); + + //Plastic + public static final Material PLASTIC = MaterialUtils.generateMaterialFromGtENUM(MaterialUtils.getMaterial("Plastic", "Rubber")); + + + static { + MEAT.setTextureSet(TextureSet.SET_ROUGH); + CLAY.setTextureSet(TextureSet.SET_ROUGH); + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/material/ORES.java b/src/main/java/gtPlusPlus/core/material/ORES.java new file mode 100644 index 0000000000..0186c23a07 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/ORES.java @@ -0,0 +1,849 @@ +package gtPlusPlus.core.material; + +import gregtech.api.enums.TextureSet; +import gtPlusPlus.core.client.CustomTextureSet.TextureSets; +import gtPlusPlus.core.material.state.MaterialState; + +public final class ORES { + + public static final Material AGARDITE_CD = new Material( + "Agardite (Cd)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{170, 188, 33, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (CdCa)Cu7(AsO2)4(O2H)5·3H2O + new MaterialStack(ELEMENT.getInstance().CADMIUM, 1), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().COPPER, 7), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 4), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 21), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 11) + }); + + public static final Material AGARDITE_LA = new Material( + "Agardite (La)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{206, 232, 9, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (LaCa)Cu5(AsO6)2(OH)4·3H2O + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 1), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().COPPER, 5), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 19), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 10) + }); + + public static final Material AGARDITE_ND = new Material( + "Agardite (Nd)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{225, 244, 78, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (NdCa)Cu6(As3O3)2(O2H)6·3H2O + new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 1), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().COPPER, 6), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 6), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 21), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 12) + }); + + public static final Material AGARDITE_Y = new Material( + "Agardite (Y)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{210, 232, 44, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (YCa)Cu5(As2O4)3(OH)6·3H2O + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().COPPER, 5), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 6), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 21), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 12) + }); + + //Alburnite + //Ag8GeTe2S4 + public static final Material ALBURNITE = new Material( + "Alburnite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{16, 5, 105, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().GOLD, 8), + new MaterialStack(ELEMENT.getInstance().GERMANIUM, 1), + new MaterialStack(ELEMENT.getInstance().TELLURIUM, 2), + new MaterialStack(ELEMENT.getInstance().SULFUR, 4) + }); + + public static final Material CERITE = new Material( + "Cerite", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{68, 13, 0, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (Ce,La,Ca)9(Mg,Fe+3)(SiO4)6(SiO3OH)(OH)3 + new MaterialStack(ELEMENT.getInstance().CERIUM, 9), + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 9), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 9), + new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 3), + new MaterialStack(ELEMENT.getInstance().IRON, 3), + new MaterialStack(ELEMENT.getInstance().SILICON, 7), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 20), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 4) + }); + + //Comancheite + //Hg55N24(NH2,OH)4(Cl,Br)34 + public static final Material COMANCHEITE = new Material( + "Comancheite", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{65, 205, 105, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().MERCURY, 54/4), + new MaterialStack(ELEMENT.getInstance().NITROGEN, 28/4), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 12/4), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 8/4), + new MaterialStack(ELEMENT.getInstance().CHLORINE, 34/4), + new MaterialStack(ELEMENT.getInstance().BROMINE, 34/4) + }); + + public static final Material CROCROITE = new Material( + "Crocoite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_GEM_VERTICAL, //Texture Set + new short[]{255, 143, 84, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().LEAD, 2), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), + new MaterialStack(ELEMENT.getInstance().CAESIUM, 1), + }); + + public static final Material CRYOLITE = new Material( + "Cryolite (F)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_SHINY, //Texture Set + new short[]{205, 205, 255, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().SODIUM, 3), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) + }); + + //Demicheleite-(Br) + // BiSBr + public static final Material DEMICHELEITE_BR = new Material( + "Demicheleite (Br)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_SHINY, //Texture Set + new short[]{165, 75, 75, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().BISMUTH, 13), + new MaterialStack(ELEMENT.getInstance().SULFUR, 11), + new MaterialStack(ELEMENT.getInstance().BROMINE, 1) + }); + + public static final Material FLORENCITE = new Material( + "Florencite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{249, 249, 124, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// SmAl3(PO4)2(OH)6 + new MaterialStack(ELEMENT.getInstance().SAMARIUM, 1), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 3), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 10), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 6) + }); + + public static final Material FLUORCAPHITE = new Material( + "Fluorcaphite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{255, 255, 30, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (Ca,Sr,Ce,Na)5(PO4)3F + new MaterialStack(ELEMENT.getInstance().CALCIUM, 5), + new MaterialStack(MISC_MATERIALS.STRONTIUM_OXIDE, 5), + new MaterialStack(ELEMENT.getInstance().CERIUM, 5), + new MaterialStack(ELEMENT.getInstance().SODIUM, 5), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 3), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 12), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 6), + }); + + //Gadolinite_Ce + public static final Material GADOLINITE_CE = new Material( + "Gadolinite (Ce)", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{15, 159, 59, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CERIUM, 4), + new MaterialStack(ELEMENT.getInstance().ERBIUM, 2), + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 2), + new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 2), + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), + new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 1), + new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 2), + new MaterialStack(ELEMENT.getInstance().SILICON, 7), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 14), + }); + + //Gadolinite_Y + public static final Material GADOLINITE_Y = new Material( + "Gadolinite (Y)", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{35, 189, 99, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CERIUM, 2), + new MaterialStack(ELEMENT.getInstance().ERBIUM, 2), + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 2), + new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 2), + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 4), + new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 2), + new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 3), + new MaterialStack(ELEMENT.getInstance().SILICON, 4), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 9), + }); + + public static final Material GEIKIELITE = new Material( + "Geikielite", //Material Name + MaterialState.ORE, //State + TextureSets.GEM_A.get(), //Texture Set + new short[]{187, 193, 204, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 1), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3) + }); + + public static final Material GREENOCKITE = new Material( + "Greenockite", //Material Name + MaterialState.ORE, //State + TextureSets.GEM_A.get(), //Texture Set + new short[]{110, 193, 25, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CADMIUM, 2), + new MaterialStack(ELEMENT.getInstance().SULFUR, 2), + }); + + public static final Material HIBONITE = new Material( + "Hibonite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{58, 31, 0, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// ((Ca,Ce)(Al,Ti,Mg)12O19) + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().CERIUM, 1), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 12), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), + new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 12), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 19), + }); + + //Honeaite + //Au3TlTe2 + public static final Material HONEAITE = new Material( + "Honeaite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{165, 165, 5, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().GOLD, 3), + new MaterialStack(ELEMENT.getInstance().THALLIUM, 1), + new MaterialStack(ELEMENT.getInstance().TELLURIUM, 2) + }); + + //Irarsite + //(Ir,Ru,Rh,Pt)AsS + public static final Material IRARSITE = new Material( + "Irarsite", //Material Name + MaterialState.ORE, //State + TextureSets.ENRICHED.get(), //Texture Set + new short[]{125, 105, 105, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().IRIDIUM, 1), + new MaterialStack(ELEMENT.getInstance().RUTHENIUM, 1), + new MaterialStack(ELEMENT.getInstance().RHODIUM, 1), + new MaterialStack(ELEMENT.getInstance().PLATINUM, 1), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 1), + new MaterialStack(ELEMENT.getInstance().SULFUR, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) + }); + + //Kashinite + //(Ir,Rh)2S3 + public static final Material KASHINITE = new Material( + "Kashinite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_SHINY, //Texture Set + new short[]{75, 105, 75, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().IRIDIUM, 2), + new MaterialStack(ELEMENT.getInstance().RHODIUM, 2), + new MaterialStack(ELEMENT.getInstance().SULFUR, 3) + }); + + // Tl(Cl,Br) + public static final Material LAFOSSAITE = new Material( + "Lafossaite", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{165, 105, 205, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().CHLORINE, 1), + new MaterialStack(ELEMENT.getInstance().BROMINE, 1), + new MaterialStack(ELEMENT.getInstance().THALLIUM, 1) + }); + + public static final Material LANTHANITE_CE = new Material( + "Lanthanite (Ce)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{186, 113, 179, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (Ce)2(CO3)3·8(H2O) + new MaterialStack(ELEMENT.getInstance().CERIUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 3), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), + }); + + public static final Material LANTHANITE_LA = new Material( + "Lanthanite (La)", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{219, 160, 214, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (La)2(CO3)3·8(H2O) + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 3), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), + }); + + public static final Material LANTHANITE_ND = new Material( + "Lanthanite (Nd)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{153, 76, 145, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (Nd)2(CO3)3·8(H2O) + new MaterialStack(ELEMENT.getInstance().NEODYMIUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 3), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1), + }); + + //Iodine Source + public static final Material LAUTARITE = new Material( + "Lautarite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{165, 105, 205, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().IODINE, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 6) + }); + + public static final Material LEPERSONNITE = new Material( + "Lepersonnite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_EMERALD, //Texture Set + new short[]{175, 175, 20, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().GADOLINIUM, 2), + new MaterialStack(ELEMENT.getInstance().DYSPROSIUM, 2), + new MaterialStack(ELEMENT.getInstance().URANIUM235, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN,32), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 24) + }); + + //Miessiite + //Pd11Te2Se2 + public static final Material MIESSIITE = new Material( + "Miessiite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{75, 75, 75, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().PALLADIUM, 11), + new MaterialStack(ELEMENT.getInstance().TELLURIUM, 2), + new MaterialStack(ELEMENT.getInstance().SELENIUM, 2) + }); + + public static final Material NICHROMITE = new Material( + "Nichromite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{22, 19, 19, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NICKEL, 1), + new MaterialStack(ELEMENT.getInstance().COBALT, 1), + new MaterialStack(ELEMENT.getInstance().IRON, 3), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 2), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) + }); + + //Perroudite + //Hg5Ag4S5(I,Br)2Cl2 + public static final Material PERROUDITE = new Material( + "Perroudite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{77, 165, 174, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SULFUR, 5), + new MaterialStack(ELEMENT.getInstance().SILVER, 4), + new MaterialStack(ELEMENT.getInstance().IODINE, 2), + new MaterialStack(ELEMENT.getInstance().MERCURY, 5), + new MaterialStack(ELEMENT.getInstance().BROMINE, 2), + new MaterialStack(ELEMENT.getInstance().CHLORINE, 2) + }); + + public static final Material POLYCRASE = new Material( + "Polycrase", //Material Name + MaterialState.ORE, //State + TextureSet.SET_ROUGH, //Texture Set + new short[]{51, 0, 11, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().CERIUM, 1), + new MaterialStack(ELEMENT.getInstance().URANIUM235, 1), + new MaterialStack(ELEMENT.getInstance().THORIUM, 1), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 6) + }); + + //Radiobarite + //Radium, Barium, Barite? + public static final Material RADIOBARITE = new Material( + "Barite (Rd)", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FLINT, //Texture Set + new short[]{205, 205, 205, 0}, //Material Colour + -1, + -1, + -1, + -1, + 0, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().BARIUM, 32), + new MaterialStack(ELEMENT.getInstance().RADIUM, 1), + new MaterialStack(ELEMENT.getInstance().SULFUR, 16), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 15) + }); + + //Samarskite_Y + public static final Material SAMARSKITE_Y = new Material( + "Samarskite (Y)", //Material Name + MaterialState.ORE, //State + TextureSets.ENRICHED.get(), //Texture Set + new short[]{65, 163, 164, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), //Y not YT/YB + new MaterialStack(ELEMENT.getInstance().IRON, 10), + new MaterialStack(ELEMENT.getInstance().URANIUM235, 2), + new MaterialStack(ELEMENT.getInstance().THORIUM, 3), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 3) + }); + + //Samarskite_YB + public static final Material SAMARSKITE_YB = new Material( + "Samarskite (Yb)", //Material Name + MaterialState.ORE, //State + TextureSets.ENRICHED.get(), //Texture Set + new short[]{95, 193, 194, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), //Y not YT/YB + new MaterialStack(ELEMENT.getInstance().IRON, 9), + new MaterialStack(ELEMENT.getInstance().URANIUM235, 3), + new MaterialStack(ELEMENT.getInstance().THORIUM, 2), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 3), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 2) + }); + + public static final Material TITANITE = new Material( + "Titanite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{184, 198, 105, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), + new MaterialStack(ELEMENT.getInstance().SILICON, 2), + new MaterialStack(ELEMENT.getInstance().THORIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 10) + }); + + public static final Material XENOTIME = new Material( + "Xenotime", //Material Name + MaterialState.ORE, //State + TextureSet.SET_OPAL, //Texture Set + new short[]{235, 89, 199, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), + new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), + new MaterialStack(ELEMENT.getInstance().ERBIUM, 2), + new MaterialStack(ELEMENT.getInstance().EUROPIUM, 1), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) + }); + + public static final Material YTTRIAITE = new Material( //TODO + "Yttriaite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_METALLIC, //Texture Set + new short[]{255, 143, 84, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), //Y not YT/YB + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3), + new MaterialStack(ELEMENT.getInstance().IRON, 4), + new MaterialStack(ELEMENT.getInstance().TIN, 1), + new MaterialStack(ELEMENT.getInstance().NITROGEN, 2) + }); + + public static final Material YTTRIALITE = new Material( + "Yttrialite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_RUBY, //Texture Set + new short[]{35, 189, 99, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), + new MaterialStack(ELEMENT.getInstance().THORIUM, 2), + new MaterialStack(ELEMENT.getInstance().SILICON, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 7), + }); + + public static final Material YTTROCERITE = new Material( + "Yttrocerite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_DIAMOND, //Texture Set + new short[]{35, 19, 199, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CERIUM, 1), + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 5), + new MaterialStack(ELEMENT.getInstance().YTTRIUM, 1), + }); + + public static final Material ZIMBABWEITE = new Material( + "Zimbabweite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{193, 187, 131, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), + new MaterialStack(ELEMENT.getInstance().POTASSIUM, 2), + new MaterialStack(ELEMENT.getInstance().LEAD, 1), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 4), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 4), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 4), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 18) + }); + + public static final Material ZIRCON = new Material( + "Zircon", //Material Name + MaterialState.ORE, //State + TextureSets.GEM_A.get(), //Texture Set + new short[]{195, 19, 19, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), + new MaterialStack(ELEMENT.getInstance().SILICON, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 4), + }); + + public static final Material ZIRCONILITE = new Material( + "Zirconolite", //Material Name + MaterialState.ORE, //State + TextureSet.SET_FINE, //Texture Set + new short[]{45, 26, 0, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), + new MaterialStack(ELEMENT.getInstance().CERIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 14) + }); + + public static final Material ZIRCOPHYLLITE = new Material( + "Zircophyllite", //Material Name + MaterialState.ORE, //State + TextureSets.REFINED.get(), //Texture Set + new short[]{30, 0, 6, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().POTASSIUM, 3), + new MaterialStack(ELEMENT.getInstance().SODIUM, 3), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 7), + new MaterialStack(ELEMENT.getInstance().IRON, 7), + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), + new MaterialStack(ELEMENT.getInstance().SILICON, 8), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 13), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 7), + }); + + + public static final Material ZIRKELITE = new Material( + "Zirkelite", //Material Name + MaterialState.ORE, //State + TextureSets.GEM_A.get(), //Texture Set + new short[]{229, 208, 48, 0}, //Material Colour + -1, + -1, + -1, + -1, + -1, //Radiation + new MaterialStack[]{// (Ca,Th,Ce)Zr(Ti,Nb)2O7 + new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), + new MaterialStack(ELEMENT.getInstance().THORIUM, 1), + new MaterialStack(ELEMENT.getInstance().CERIUM, 1), + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 7) + }); + + public static final Material DEEP_EARTH_REACTOR_FUEL_DEPOSIT = new Material( + "Radioactive Mineral Mix", //Material Name + MaterialState.ORE, //State + TextureSets.NUCLEAR.get(), //Texture Set + null, //Material Colour + -1, + -1, + -1, + -1, + 4, //Radiation + new MaterialStack[]{// Na3AlF6 + new MaterialStack(ELEMENT.getInstance().RADON, 2), + new MaterialStack(ELEMENT.getInstance().RADIUM, 1), + new MaterialStack(ELEMENT.getInstance().URANIUM235, 1), + new MaterialStack(ELEMENT.getInstance().URANIUM238, 10), + new MaterialStack(ELEMENT.getInstance().THORIUM, 25), + new MaterialStack(ELEMENT.getInstance().THORIUM232, 4), + new MaterialStack(FLUORCAPHITE, 6), + new MaterialStack(SAMARSKITE_Y, 8), + new MaterialStack(TITANITE, 4) + }); + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/material/Particle.java b/src/main/java/gtPlusPlus/core/material/Particle.java new file mode 100644 index 0000000000..e93129ec58 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/Particle.java @@ -0,0 +1,153 @@ +package gtPlusPlus.core.material; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.chemistry.IonParticles; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; + +public class Particle { + + public static final Particle GRAVITON; + + public static final Particle UP; + public static final Particle DOWN; + public static final Particle CHARM; + public static final Particle STRANGE; + public static final Particle TOP; + public static final Particle BOTTOM; + + public static final Particle ELECTRON; + public static final Particle ELECTRON_NEUTRINO; + public static final Particle MUON; + public static final Particle MUON_NEUTRINO; + public static final Particle TAU; + public static final Particle TAU_NEUTRINO; + + public static final Particle GLUON; + public static final Particle PHOTON; + public static final Particle Z_BOSON; + public static final Particle W_BOSON; + public static final Particle HIGGS_BOSON; + + public static final Particle PROTON; + public static final Particle NEUTRON; + public static final Particle LAMBDA; + public static final Particle OMEGA; + + public static final Particle PION; + public static final Particle ETA_MESON; + + public static final Particle UNKNOWN; + + public static final AutoMap aMap = new AutoMap(); + + static { + + /* + * Standard Model of Physics + */ + + //I exist, because I must. + GRAVITON = new Particle(ElementaryGroup.BOSON, "Graviton"); + + //Quarks + UP = new Particle(ElementaryGroup.QUARK, "Up"); + DOWN = new Particle(ElementaryGroup.QUARK, "Down"); + CHARM = new Particle(ElementaryGroup.QUARK, "Charm"); + STRANGE = new Particle(ElementaryGroup.QUARK, "Strange"); + TOP = new Particle(ElementaryGroup.QUARK, "Top"); + BOTTOM = new Particle(ElementaryGroup.QUARK, "Bottom"); + + //Leptons + ELECTRON = new Particle(ElementaryGroup.LEPTON, "Electron"); + MUON = new Particle(ElementaryGroup.LEPTON, "Muon"); + TAU = new Particle(ElementaryGroup.LEPTON, "Tau"); + ELECTRON_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Electron Neutrino"); + MUON_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Muon Neutrino"); + TAU_NEUTRINO = new Particle(ElementaryGroup.LEPTON, "Tau Neutrino"); + + //Bosons + GLUON = new Particle(ElementaryGroup.BOSON, "Gluon"); + PHOTON = new Particle(ElementaryGroup.BOSON, "Photon"); + Z_BOSON = new Particle(ElementaryGroup.BOSON, "Z Boson"); + W_BOSON = new Particle(ElementaryGroup.BOSON, "W Boson"); + HIGGS_BOSON = new Particle(ElementaryGroup.BOSON, "Higgs Boson"); + + /* + * Composite Particles + */ + + //Baryons + PROTON = new Particle(ElementaryGroup.BARYON, "Proton", new Particle[] {UP, UP, DOWN}); + NEUTRON = new Particle(ElementaryGroup.BARYON, "Neutron", new Particle[] {UP, DOWN, DOWN}); + LAMBDA = new Particle(ElementaryGroup.BARYON, "Lambda", new Particle[] {UP, DOWN, STRANGE}); + OMEGA = new Particle(ElementaryGroup.BARYON, "Omega", new Particle[] {STRANGE, STRANGE, STRANGE}); + + //Mesons + PION = new Particle(ElementaryGroup.MESON, "Pion", new Particle[] {MUON, MUON_NEUTRINO}); + ETA_MESON = new Particle(ElementaryGroup.MESON, "ETA Meson", new Particle[] {PION, PION, PION}); + + + //Wildcard + UNKNOWN = new Particle(ElementaryGroup.UNKNOWN, "Unknown"); + + } + + public static enum ElementaryGroup { + QUARK, + LEPTON, + BOSON, + BARYON, + MESON, + UNKNOWN; + } + + public final ElementaryGroup mParticleType; + public final String mParticleName; + public final Particle[] mComposition; + + public Particle(ElementaryGroup aParticleType, String aParticleName) { + this(aParticleType, aParticleName, null); + } + + public Particle(ElementaryGroup aParticleType, String aParticleName, Particle[] aComposition) { + mParticleType = aParticleType; + mParticleName = aParticleName; + mComposition = aComposition == null ? new Particle[] {this} : aComposition; + aMap.put(this); + } + + + public static ItemStack getIon(String aElementName, int aCharge) { + for (String g : gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.keySet()) { + if (g.toLowerCase().equals(Utils.sanitizeString(aElementName.toLowerCase()))){ + Integer meta = gtPlusPlus.core.item.chemistry.IonParticles.NameToMetaMap.get(Utils.sanitizeString(aElementName.toLowerCase())); + if (meta == null) { + meta = 0; + } + ItemStack aIon = ItemUtils.simpleMetaStack(ModItems.itemIonParticleBase, meta, 1); + if (aCharge != 0) { + IonParticles.setChargeState(aIon, aCharge); + } + return aIon; + } + } + return null; + } + + public static ItemStack getBaseParticle(Particle aParticle) { + String aPartName = Utils.sanitizeString(aParticle.mParticleName.toLowerCase()); + for (String g : gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.keySet()) { + if (g.toLowerCase().equals(aPartName)){ + Integer meta = gtPlusPlus.core.item.chemistry.StandardBaseParticles.NameToMetaMap.get(aPartName); + if (meta == null) { + meta = 0; + } + return ItemUtils.simpleMetaStack(ModItems.itemStandarParticleBase, meta, 1); + } + } + return null; + } +} diff --git a/src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java new file mode 100644 index 0000000000..20aebb80ed --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -0,0 +1,79 @@ +package gtPlusPlus.core.material.gregtech; + +public class CustomGTMaterials { + + //public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH, "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick, 1)).constructMaterial(); + + /**int aMetaItemSubID, + * TextureSet aIconSet, + * float aToolSpeed, + * int aDurability, + * int aToolQuality, + * boolean aUnificatable, + * String aName, String aDefaultLocalName, + * String aConfigSection, + * boolean aCustomOre, + * String aCustomID) { + + **/ + + /*public static List Custom_GT_Materials = new ArrayList(); + + public static Materials Zirconium = materialBuilder_Element(1232, TextureSet.SET_METALLIC, 6.0F, 256, 2, 1|2|8|32|64|128, 200, 200, 200, 0, "Zirconium", "Zirconium", 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Zr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 3))); + public static Materials Geikielite = materialBuilder(1234, TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); + public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); + + public static final void run(){ + Utils.LOG_INFO("[Custom] Trying to initialise custom materials."); + } + + private final static boolean registerMaterial(Materials r){ + Custom_GT_Materials.add(r); + Utils.LOG_INFO("[Custom] Registered new Gregtech material - "+r.mName); + return true; + } + + public final static Materials materialBuilder(int ID, TextureSet texture, int[] rgb, String materialName, Dyes dyeColour, List composition){ + Materials newMat = new Materials( + ID, + texture, + 1.0F, + 0, + 2, + 1 |8 , + rgb[0], rgb[1], rgb[2], 0, + materialName, materialName, + 0, 0, -1, 0, false, false, 3, 1, 1, + dyeColour, + 1, + composition + ); + registerMaterial(newMat); + return newMat; + } + + public final static Materials materialBuilder_Element( + int ID, TextureSet texture, + float a, int b, int c, + int d, int r2, int g2, int b2, int a2, + String materialName, String e, + int f, int g, int h, int i, + boolean j, boolean k, + int l, int m, int n, + Dyes dyeColour, Element o, + List aspects){ + Materials newMat = new Materials( + ID, texture, + a, b, c, + d, r2, g2, b2, a2, + materialName, e, + f, g, h, i, j, k, l, m, n, + dyeColour, o, + aspects + ); + registerMaterial(newMat); + return newMat; + } +*/ + +} diff --git a/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java b/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java new file mode 100644 index 0000000000..5872587872 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/nuclear/FLUORIDES.java @@ -0,0 +1,284 @@ +package gtPlusPlus.core.material.nuclear; + +import gregtech.api.enums.Materials; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.state.MaterialState; + +public class FLUORIDES { + + public static final Material FLUORITE = new Material( + "Fluorite", //Material Name + MaterialState.ORE, //State + null, //Material Colour + Materials.Fluorine.mMeltingPoint, //Melting Point in C + Materials.Fluorine.mBlastFurnaceTemp, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + false, //Generate cells + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 16), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 32), + new MaterialStack(ELEMENT.getInstance().IRON, 4), + new MaterialStack(ELEMENT.getInstance().CARBON, 2) + }); + + //ThF4 + public static final Material THORIUM_TETRAFLUORIDE = new Material( + "Thorium Tetrafluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().THORIUM232, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) + }); + + //ThF6 + public static final Material THORIUM_HEXAFLUORIDE = new Material( + "Thorium Hexafluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().THORIUM232, 1), + new MaterialStack(ELEMENT.getInstance().THORIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 12) + }); + + //UF4 + public static final Material URANIUM_TETRAFLUORIDE = new Material( + "Uranium Tetrafluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().URANIUM233, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) + }); + + //UF6 + public static final Material URANIUM_HEXAFLUORIDE = new Material( + "Uranium Hexafluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) + }); + + //ZrF4 + + public static final Material ZIRCONIUM_TETRAFLUORIDE = new Material( + "Zirconium Tetrafluoride", //Material Name + MaterialState.LIQUID, //State + null, //Texture Set (Autogenerated) + 0, + null, //Material Colour + -1, + -1, + -1, + -1, + false, + "ZrF4", + -1, + true, + false, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) + }); + + + +/* public static final Material ZIRCONIUM_TETRAFLUORIDE = new Material( + "Zirconium Tetrafluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 4) + });*/ + + //BeF2 + public static final Material BERYLLIUM_FLUORIDE = new Material( + "Beryllium Fluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, + -1, + -1, + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) + }); + + //LiF + public static final Material LITHIUM_FLUORIDE = new Material( + "Lithium Fluoride", //Material Name + MaterialState.LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().LITHIUM7, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 1) + }); + + + //LFTR sub components + + //(NH4)HF2 + public static final Material AMMONIUM_BIFLUORIDE = new Material( + "Ammonium Bifluoride", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + 126, //Melting Point in C + 240, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(MISC_MATERIALS.AMMONIUM, 1), + new MaterialStack(ELEMENT.getInstance().HYDROGEN, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) + }); + + //Be(OH)2 + public static final Material BERYLLIUM_HYDROXIDE = new Material( + "Beryllium Hydroxide", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().BERYLLIUM, 1), + new MaterialStack(MISC_MATERIALS.HYDROXIDE, 2) + }); + + // (NH4)2Be(OH)2 / (NH4)2BeF4 + public static final Material AMMONIUM_TETRAFLUOROBERYLLATE = new Material( + "Ammonium Tetrafluoroberyllate", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + 280, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(MISC_MATERIALS.AMMONIUM, 2), + new MaterialStack(FLUORIDES.BERYLLIUM_HYDROXIDE, 1) + }); + + + + //LFTR Output + public static final Material NEPTUNIUM_HEXAFLUORIDE = new Material( + "Neptunium Hexafluoride", //Material Name + MaterialState.GAS, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NEPTUNIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) + }); + + public static final Material TECHNETIUM_HEXAFLUORIDE = new Material( + "Technetium Hexafluoride", //Material Name + MaterialState.GAS, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TECHNETIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) + }); + + public static final Material SELENIUM_HEXAFLUORIDE = new Material( + "Selenium Hexafluoride", //Material Name + MaterialState.GAS, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SELENIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 6) + }); + + public static final Material SODIUM_FLUORIDE = new Material( + "Sodium Fluoride", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SODIUM, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 1) + }); + + private static final FLUORIDES INSTANCE = new FLUORIDES(); + public static FLUORIDES getInstance(){return INSTANCE;} + +} diff --git a/src/main/java/gtPlusPlus/core/material/nuclear/NUCLIDE.java b/src/main/java/gtPlusPlus/core/material/nuclear/NUCLIDE.java new file mode 100644 index 0000000000..9bc7459f0e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/nuclear/NUCLIDE.java @@ -0,0 +1,376 @@ +package gtPlusPlus.core.material.nuclear; + +import gtPlusPlus.core.client.CustomTextureSet.TextureSets; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.data.StringUtils; + + +public final class NUCLIDE { + + public static final Material Li2BeF4 = new Material( + "Lithium Tetrafluoroberyllate", //Material Name + MaterialState.LIQUID, //State + TextureSets.NUCLEAR.get(), + null, //Material Colour + 566, //Melting Point in C + 870, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"Li2BeF4"), //Chemical Formula + 4, //Radioactivity Level + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 2), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1) + }); + + public static final Material LiFBeF2ThF4UF4 = new Material( + "LiFBeF2ThF4UF4", //Material Name + MaterialState.LIQUID, //State + TextureSets.NUCLEAR.get(), + null, //Material Colour + 566, //Melting Point in C + 870, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ThF4UF4"), //Chemical Formula + 5, //Radioactivity Level + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 65), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 28), + new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1) + }); + + public static final Material LiFBeF2ZrF4UF4 = new Material( + "LiFBeF2ZrF4UF4", //Material Name + MaterialState.LIQUID, //State + TextureSets.NUCLEAR.get(), + null, //Material Colour + 650, //Melting Point in C + 940, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ZrF4UF4"), //Chemical Formula + 5, //Radioactivity Level + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 65), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 28), + new MaterialStack(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE, 5), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 2) + }); + + public static final Material LiFBeF2ZrF4U235 = new Material( + "LiFBeF2ZrF4U235", //Material Name + MaterialState.LIQUID, //State + TextureSets.NUCLEAR.get(), + null, //Material Colour + 590, //Melting Point in C + 890, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ZrF4")+StringUtils.superscript("235U"), //Chemical Formula + 5, //Radioactivity Level + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 55), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 25), + new MaterialStack(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE, 6), + new MaterialStack(ELEMENT.getInstance().URANIUM235, 14) + }); + + // Misc + public static final Material BurntLftrFuel_MK1 = new Material( + "Burnt Reactor Fuel I", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiBeF2UF4FP"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().LITHIUM, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) + }); + + public static final Material BurntLftrFuel_MK2 = new Material( + "Burnt Reactor Fuel II", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiBeF2UF4FP"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().LITHIUM, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) + }); + + + + // LFTR Core Fluids + public static final Material LiFBeF2UF4FP = new Material( + "LiFBeF2UF4FP", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2UF4FP"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) + }); + + public static final Material Sparged_LiFBeF2UF4FP = new Material( + "Helium Sparged LiFBeF2UF4FP", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2UF4FP"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().PROTACTINIUM, 1) + }); + + public static final Material UF6F2FP = new Material( + "UF6F2FP", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript("UF6F2FP"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.URANIUM_HEXAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 3), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 1) + }); + + public static final Material LiFBeF2 = new Material( + "LiFBeF2", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1) + }); + + public static final Material LiFBeF2UF4 = new Material( + "LiFBeF2UF4", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2UF4"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(LiFBeF2, 1), + new MaterialStack(FLUORIDES.URANIUM_TETRAFLUORIDE, 1) + }); + + + + + + + // LFTR Blanket Fluids + + // Tier 1 Fuel blanket output + public static final Material LiFThF4 = new Material( + "LiFThF4", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFThF4"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) + }); + + // Tier 2 Fuel blanket output + public static final Material LiFBeF2ThF4 = new Material( + "LiFBeF2ThF4", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ThF4"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) + }); + + // Tier 1 Fuel blanket output + public static final Material Sparged_LiFThF4 = new Material( + "Fluorine Sparged LiFThF4", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFThF4"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) + }); + + // Tier 2 Fuel blanket output + public static final Material Sparged_LiFBeF2ThF4 = new Material( + "Fluorine Sparged LiFBeF2ThF4", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript(StringUtils.superscript("7")+"LiFBeF2ThF4"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.LITHIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.BERYLLIUM_FLUORIDE, 1), + new MaterialStack(FLUORIDES.THORIUM_TETRAFLUORIDE, 1) + }); + + public static final Material UF6F2 = new Material( + "UF6F2", //Material Name + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, //Neutrons + false, //Uses Blast furnace? + StringUtils.subscript("UF6F2"), //Chemical Formula + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(FLUORIDES.URANIUM_HEXAFLUORIDE, 1), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) + }); + + + + + + + + + + + + + // Secondary material is molten metal + public static final Material NAQ_FUEL_T1 = new Material( + "Naquadah Fuel", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NAQUADAH, 2), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 3) + }); + + // Secondary material is a plasma + public static final Material NAQ_FUEL_T2 = new Material( + "Enriched Naquadah Fuel", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NAQUADAH_ENRICHED, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 3) + }); + + // Secondary material is a plasma + public static final Material NAQ_FUEL_T3 = new Material( + "Naquadria Fuel", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NAQUADRIA, 2), + new MaterialStack(ELEMENT.getInstance().AMERICIUM, 3) + }); + + + + private static final NUCLIDE INSTANCE = new NUCLIDE(); + + public static NUCLIDE getInstance(){ + return INSTANCE; + } + +} diff --git a/src/main/java/gtPlusPlus/core/material/state/MaterialState.java b/src/main/java/gtPlusPlus/core/material/state/MaterialState.java new file mode 100644 index 0000000000..460fe019dc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/material/state/MaterialState.java @@ -0,0 +1,18 @@ +package gtPlusPlus.core.material.state; + +public enum MaterialState { + SOLID(0), + LIQUID(1), + GAS(2), + PLASMA(3), + PURE_LIQUID(4), + ORE(5), + PURE_GAS(6); + private int STATE; + private MaterialState (final int State){ + this.STATE = State; + } + public int ID() { + return this.STATE; + } +} diff --git a/src/main/java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java b/src/main/java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java new file mode 100644 index 0000000000..b7ced2f7e9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/network/handler/AbstractClientMessageHandler.java @@ -0,0 +1,13 @@ +package gtPlusPlus.core.network.handler; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import net.minecraft.entity.player.EntityPlayer; + +public abstract class AbstractClientMessageHandler extends AbstractMessageHandler { + + public final IMessage handleServerMessage(EntityPlayer player, T message, MessageContext ctx) { + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java b/src/main/java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java new file mode 100644 index 0000000000..ca350f220f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/network/handler/AbstractMessageHandler.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.network.handler; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.GTplusplus; +import net.minecraft.entity.player.EntityPlayer; + +public abstract class AbstractMessageHandler implements IMessageHandler +{ + /** + * Handle a message received on the client side + * @return a message to send back to the Server, or null if no reply is necessary + */ + @SideOnly(Side.CLIENT) + public abstract IMessage handleClientMessage(EntityPlayer player, T message, MessageContext ctx); + + /** + * Handle a message received on the server side + * @return a message to send back to the Client, or null if no reply is necessary + */ + public abstract IMessage handleServerMessage(EntityPlayer player, T message, MessageContext ctx); + + @Override + public IMessage onMessage(T message, MessageContext ctx) { + if (ctx.side.isClient()) { + return handleClientMessage(GTplusplus.proxy.getPlayerEntity(ctx), message, ctx); + } else { + // server side proxy will return the server side EntityPlayer + return handleServerMessage(GTplusplus.proxy.getPlayerEntity(ctx), message, ctx); + } + } + + +} diff --git a/src/main/java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java b/src/main/java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java new file mode 100644 index 0000000000..d49e6cf350 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/network/handler/AbstractServerMessageHandler.java @@ -0,0 +1,13 @@ +package gtPlusPlus.core.network.handler; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import net.minecraft.entity.player.EntityPlayer; + +public abstract class AbstractServerMessageHandler extends AbstractMessageHandler { + + public final IMessage handleClientMessage(EntityPlayer player, T message, MessageContext ctx) { + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/core/network/packet/AbstractPacket.java b/src/main/java/gtPlusPlus/core/network/packet/AbstractPacket.java new file mode 100644 index 0000000000..d6368e3d9e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/network/packet/AbstractPacket.java @@ -0,0 +1,9 @@ +package gtPlusPlus.core.network.packet; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; + +public interface AbstractPacket extends IMessage { + + public abstract String getPacketName(); + +} diff --git a/src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java b/src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java new file mode 100644 index 0000000000..609ea729b7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui.java @@ -0,0 +1,128 @@ +package gtPlusPlus.core.network.packet; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.relauncher.Side; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.network.handler.AbstractServerMessageHandler; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; +import io.netty.buffer.ByteBuf; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class Packet_VolumetricFlaskGui extends AbstractServerMessageHandler implements AbstractPacket { + + private int x; + private int y; + private int z; + private int flaskValue; + + public Packet_VolumetricFlaskGui() { + + } + + public Packet_VolumetricFlaskGui(TileEntityVolumetricFlaskSetter tile, int aCustomValue) { + x = tile.xCoord; + y = tile.yCoord; + z = tile.zCoord; + flaskValue = aCustomValue; + Logger.INFO("Created Packet with values ("+x+", "+y+", "+z+" | "+flaskValue+")"); + } + + @Override + public void toBytes(ByteBuf buf) { + buf.writeInt(x); + buf.writeInt(y); + buf.writeInt(z); + buf.writeInt(flaskValue); + Logger.INFO("Writing to byte buffer."); + } + + @Override + public void fromBytes(ByteBuf buf) { + x = buf.readInt(); + y = buf.readInt(); + z = buf.readInt(); + flaskValue = buf.readInt(); + Logger.INFO("Reading from byte buffer."); + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getZ() { + return z; + } + + public void setZ(int z) { + this.z = z; + } + + public int getCustomValue() { + return flaskValue; + } + + public void setCustomValue(int aVal) { + this.flaskValue = aVal; + } + + protected TileEntityVolumetricFlaskSetter getTileEntity(Packet_VolumetricFlaskGui message, MessageContext ctx) { + Logger.INFO("Trying to get tile."); + World worldObj = getWorld(ctx); + if(worldObj == null) { + Logger.INFO("Bad world object."); + return null; + } + TileEntity te = worldObj.getTileEntity(message.getX(), message.getY(), message.getZ()); + if(te == null) { + Logger.INFO("Bad Tile."); + return null; + } + if(te instanceof TileEntityVolumetricFlaskSetter) { + Logger.INFO("Found Tile."); + return (TileEntityVolumetricFlaskSetter) te; + } + Logger.INFO("Error."); + return null; + } + + protected World getWorld(MessageContext ctx) { + if(ctx.side == Side.SERVER) { + return ctx.getServerHandler().playerEntity.worldObj; + } else { + return GTplusplus.proxy.getClientWorld(); + } + } + + @Override + public IMessage handleServerMessage(EntityPlayer player, Packet_VolumetricFlaskGui message, MessageContext ctx) { + TileEntityVolumetricFlaskSetter te = getTileEntity(message, ctx); + if(te != null) { + Logger.INFO("Setting value on tile. "+message.getCustomValue()); + te.setCustomValue(message.getCustomValue()); + //return new Packet_VolumetricFlaskGui2(te, message.getCustomValue()); + } + return null; + } + + @Override + public String getPacketName() { + return "Packet_VoluemtricFlaskSetter_ToServer"; + } + +} diff --git a/src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java b/src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java new file mode 100644 index 0000000000..bc6e6149d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/network/packet/Packet_VolumetricFlaskGui2.java @@ -0,0 +1,127 @@ +package gtPlusPlus.core.network.packet; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.relauncher.Side; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.network.handler.AbstractClientMessageHandler; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; +import io.netty.buffer.ByteBuf; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class Packet_VolumetricFlaskGui2 extends AbstractClientMessageHandler implements AbstractPacket { + + private int x; + private int y; + private int z; + private int flaskValue; + + public Packet_VolumetricFlaskGui2() { + + } + + public Packet_VolumetricFlaskGui2(TileEntityVolumetricFlaskSetter tile, int aCustomValue) { + x = tile.xCoord; + y = tile.yCoord; + z = tile.zCoord; + flaskValue = aCustomValue; + Logger.INFO("Created Packet with values ("+x+", "+y+", "+z+" | "+flaskValue+")"); + } + + @Override + public void toBytes(ByteBuf buf) { + buf.writeInt(x); + buf.writeInt(y); + buf.writeInt(z); + buf.writeInt(flaskValue); + Logger.INFO("Writing to byte buffer."); + } + + @Override + public void fromBytes(ByteBuf buf) { + x = buf.readInt(); + y = buf.readInt(); + z = buf.readInt(); + flaskValue = buf.readInt(); + Logger.INFO("Reading from byte buffer."); + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getZ() { + return z; + } + + public void setZ(int z) { + this.z = z; + } + + public int getCustomValue() { + return flaskValue; + } + + public void setCustomValue(int aVal) { + this.flaskValue = aVal; + } + + protected TileEntityVolumetricFlaskSetter getTileEntity(Packet_VolumetricFlaskGui2 message, MessageContext ctx) { + Logger.INFO("Trying to get tile."); + World worldObj = getWorld(ctx); + if(worldObj == null) { + Logger.INFO("Bad world object."); + return null; + } + TileEntity te = worldObj.getTileEntity(message.getX(), message.getY(), message.getZ()); + if(te == null) { + Logger.INFO("Bad Tile."); + return null; + } + if(te instanceof TileEntityVolumetricFlaskSetter) { + Logger.INFO("Found Tile."); + return (TileEntityVolumetricFlaskSetter) te; + } + Logger.INFO("Error."); + return null; + } + + protected World getWorld(MessageContext ctx) { + if(ctx.side == Side.SERVER) { + return ctx.getServerHandler().playerEntity.worldObj; + } else { + return GTplusplus.proxy.getClientWorld(); + } + } + + @Override + public String getPacketName() { + return "Packet_VoluemtricFlaskSetter_ToClient"; + } + + @Override + public IMessage handleClientMessage(EntityPlayer player, Packet_VolumetricFlaskGui2 message, MessageContext ctx) { + TileEntityVolumetricFlaskSetter te = getTileEntity(message, ctx); + if(te != null) { + Logger.INFO("Setting value on tile. "+message.getCustomValue()); + te.setCustomValue(message.getCustomValue()); + } + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/core/players/FakeFarmer.java b/src/main/java/gtPlusPlus/core/players/FakeFarmer.java new file mode 100644 index 0000000000..ef9ee3c3e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/players/FakeFarmer.java @@ -0,0 +1,86 @@ +package gtPlusPlus.core.players; + +import java.util.UUID; + +import com.mojang.authlib.GameProfile; + +import cpw.mods.fml.common.FMLCommonHandler; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.network.play.client.C15PacketClientSettings; +import net.minecraft.server.management.ItemInWorldManager; +import net.minecraft.stats.StatBase; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IChatComponent; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; + +public class FakeFarmer extends EntityPlayerMP { + private static final UUID uuid = UUID.fromString("c1ddfd7f-120a-4437-8b64-38660d3ec62d"); + + private static GameProfile FAKE_PROFILE = new GameProfile(uuid, "[GT_Farm_Manager]"); + + public FakeFarmer(final WorldServer world) { + super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, FAKE_PROFILE, new ItemInWorldManager(world)); + } + + @Override + public boolean canCommandSenderUseCommand(final int i, final String s) { + return false; + } + + @Override + public ChunkCoordinates getPlayerCoordinates() { + return new ChunkCoordinates(0, 0, 0); + } + + @Override + public void addChatComponentMessage(final IChatComponent chatmessagecomponent) { + } + + @Override + public void addChatMessage(final IChatComponent p_145747_1_) { + } + + @Override + public void addStat(final StatBase par1StatBase, final int par2) { + } + + @Override + public void openGui(final Object mod, final int modGuiId, final World world, final int x, final int y, final int z) { + } + + @Override + public boolean isEntityInvulnerable() { + return true; + } + + @Override + public boolean canAttackPlayer(final EntityPlayer player) { + return false; + } + + @Override + public void onDeath(final DamageSource source) { + } + + @Override + public void onUpdate() { + } + + @Override + public void travelToDimension(final int dim) { + } + + @Override + public void func_147100_a(final C15PacketClientSettings pkt) { + } + + @Override + public boolean canPlayerEdit(final int par1, final int par2, final int par3, final int par4, final ItemStack par5ItemStack) { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java b/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java new file mode 100644 index 0000000000..5a0c0f4ea3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/proxy/ClientProxy.java @@ -0,0 +1,271 @@ +package gtPlusPlus.core.proxy; + +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.event.*; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.australia.entity.model.ModelBoar; +import gtPlusPlus.australia.entity.model.ModelDingo; +import gtPlusPlus.australia.entity.model.ModelOctopus; +import gtPlusPlus.australia.entity.render.*; +import gtPlusPlus.australia.entity.type.*; +import gtPlusPlus.core.client.model.ModelGiantChicken; +import gtPlusPlus.core.client.renderer.*; +import gtPlusPlus.core.common.CommonProxy; +import gtPlusPlus.core.common.compat.COMPAT_PlayerAPI; +import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; +import gtPlusPlus.core.entity.EntityTeslaTowerLightning; +import gtPlusPlus.core.entity.monster.*; +import gtPlusPlus.core.entity.projectile.*; +import gtPlusPlus.core.handler.render.FirepitRender; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import gtPlusPlus.core.tileentities.general.TileEntityFirepit; +import gtPlusPlus.core.util.minecraft.particles.EntityParticleFXMysterious; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.render.GTPP_CapeRenderer; +import gtPlusPlus.xmod.gregtech.common.render.GTPP_FlaskRenderer; +import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.entity.RenderFireball; +import net.minecraft.client.renderer.entity.RenderSnowball; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.world.World; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; + +public class ClientProxy extends CommonProxy implements Runnable{ + + private final GTPP_CapeRenderer mCapeRenderer; + @SideOnly(Side.CLIENT) + public static boolean mFancyGraphics = false; + + public ClientProxy(){ + mCapeRenderer = new GTPP_CapeRenderer(); + //Get Graphics Mode. + mFancyGraphics = Minecraft.isFancyGraphicsEnabled(); + } + + @SubscribeEvent + public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) { + if (ConfigSwitches.enableCustomCapes){ + mCapeRenderer.receiveRenderSpecialsEvent(aEvent); + } + } + + @SideOnly(Side.CLIENT) + public static String playerName = ""; + + @Override + public void preInit(final FMLPreInitializationEvent e) { + super.preInit(e); + if (ConfigSwitches.enableCustomCapes){ + onPreLoad(); + } + //Do this weird things for textures. + GTplusplus.loadTextures(); + //We boot up the sneak manager. + if (LoadedMods.PlayerAPI){ + this.init_PlayerAPI_PRE(); + } + } + + @Override + public void init(final FMLInitializationEvent e) { + if (LoadedMods.PlayerAPI){ + this.init_PlayerAPI_INIT(); + } + + /** + * Custom Block Renderers + */ + new CustomOreBlockRenderer(); + new CustomItemBlockRenderer(); + new GTPP_Render_MachineBlock(); + + if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { + new GTPP_FlaskRenderer(); + } + + super.init(e); + } + + @Override + public void postInit(final FMLPostInitializationEvent e) { + super.postInit(e); + } + + @Override + public void registerRenderThings(){ + + // Standard GT++ + + /** + * Entities + */ + + RenderingRegistry.registerEntityRenderingHandler(EntityPrimedMiningExplosive.class, new RenderMiningExplosivesPrimed()); + RenderingRegistry.registerEntityRenderingHandler(EntitySickBlaze.class, new RenderSickBlaze()); + RenderingRegistry.registerEntityRenderingHandler(EntityStaballoyConstruct.class, new RenderStaballoyConstruct()); + RenderingRegistry.registerEntityRenderingHandler(EntityToxinballSmall.class, new RenderToxinball(1F)); + RenderingRegistry.registerEntityRenderingHandler(EntitySulfuricAcidPotion.class, new RenderSnowball(ModItems.itemSulfuricPotion)); + RenderingRegistry.registerEntityRenderingHandler(EntityHydrofluoricAcidPotion.class, new RenderSnowball(ModItems.itemHydrofluoricPotion)); + RenderingRegistry.registerEntityRenderingHandler(EntityTeslaTowerLightning.class, new RenderPlasmaBolt()); + RenderingRegistry.registerEntityRenderingHandler(EntityGiantChickenBase.class, new RenderGiantChicken(new ModelGiantChicken(), 1f)); + RenderingRegistry.registerEntityRenderingHandler(EntityBatKing.class, new RenderBatKing()); + RenderingRegistry.registerEntityRenderingHandler(EntityThrowableBomb.class, new RenderSnowball(ModItems.itemBomb, 1)); + RenderingRegistry.registerEntityRenderingHandler(EntityLightningAttack.class, new RenderFireball(1F)); + + /** + * Tiles + */ + + Logger.INFO("Registering Custom Renderer for the Fire Pit."); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFirepit.class, new FirepitRender()); + Logger.INFO("Registering Custom Renderer for the Lead Lined Chest."); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecayablesChest.class, new RenderDecayChest()); + Logger.INFO("Registering Custom Renderer for the Egg Box."); + //ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEggBox.class, ModelEggBox.getRenderer()); + + + //GT++ Australia + + /** + * Entities + */ + + RenderingRegistry.registerEntityRenderingHandler(EntityAustralianSpiderBase.class, new RenderAustralianSpider()); + RenderingRegistry.registerEntityRenderingHandler(EntityBoar.class, new RenderBoar(new ModelBoar(), new ModelBoar(0.5F), 0.7F)); + RenderingRegistry.registerEntityRenderingHandler(EntityDingo.class, new RenderDingo(new ModelDingo(), new ModelDingo(), 0.5F)); + RenderingRegistry.registerEntityRenderingHandler(EntityOctopus.class, new RenderOctopus(new ModelOctopus(), 0.7F)); + + + + + + + + /** + * Items + */ + for (Pair sItemRenderMappings : mItemRenderMappings) { + MinecraftForgeClient.registerItemRenderer(sItemRenderMappings.getKey(), sItemRenderMappings.getValue()); + } + + } + + @Override + public int addArmor(final String armor){ + return RenderingRegistry.addNewArmourRendererPrefix(armor); + } + + @Override + public void generateMysteriousParticles(final Entity theEntity) + { + final double motionX = theEntity.worldObj.rand.nextGaussian() * 0.02D; + final double motionY = theEntity.worldObj.rand.nextGaussian() * 0.02D; + final double motionZ = theEntity.worldObj.rand.nextGaussian() * 0.02D; + final EntityFX particleMysterious = new EntityParticleFXMysterious( + + theEntity.worldObj, + (theEntity.posX + (theEntity.worldObj.rand.nextFloat() * theEntity.width + + * 2.0F)) - theEntity.width, + theEntity.posY + 0.5D + (theEntity.worldObj.rand.nextFloat() + + * theEntity.height), + (theEntity.posZ + (theEntity.worldObj.rand.nextFloat() * theEntity.width + + * 2.0F)) - theEntity.width, + + motionX, + + motionY, + + motionZ); + Minecraft.getMinecraft().effectRenderer.addEffect(particleMysterious); + } + + @Override + public void serverStarting(final FMLServerStartingEvent e) + { + + } + + @Optional.Method(modid = "PlayerAPI") + private void init_PlayerAPI_PRE(){ + //Register player instance + COMPAT_PlayerAPI.clientProxy.initPre(); + } + + @Optional.Method(modid = "PlayerAPI") + private void init_PlayerAPI_INIT(){ + //Register player instance + COMPAT_PlayerAPI.clientProxy.Init(); + } + + + + public void onPreLoad() { + /*if (ConfigSwitches.enableCustomCapes){ + String arr$[] = { + "draknyte1", "fobius" + }; + int len$ = arr$.length; + for (int i$ = 0; i$ < len$; i$++) { + String tName = arr$[i$]; + mCapeList.add(tName.toLowerCase()); + } + (new Thread(this)).start(); + }*/ + } + + @Override + public void run() { + /*try { + if (ConfigSwitches.enableCustomCapes){ + Logger.INFO("GT++ Mod: Downloading Cape List."); + @SuppressWarnings("resource") + Scanner tScanner = new Scanner(new URL("https://github.com/draknyte1/GTplusplus/blob/master/SupporterList.txt").openStream()); + while (tScanner.hasNextLine()) { + String tName = tScanner.nextLine(); + if (!this.mCapeList.contains(tName.toLowerCase())) { + this.mCapeList.add(tName.toLowerCase()); + } + } + } + } catch (Throwable e) { + Logger.INFO("Failed to download GT++ cape list."); + }*/ + } + + @Override + public void onLoadComplete(FMLLoadCompleteEvent event) { + GTplusplus.tryPatchTurbineTextures(); + super.onLoadComplete(event); + } + + @Override + public World getClientWorld() { + return FMLClientHandler.instance().getClient().theWorld; + } + + @Override + public EntityPlayer getPlayerEntity(MessageContext ctx) { + return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : super.getPlayerEntity(ctx)); + } + +} diff --git a/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java b/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java new file mode 100644 index 0000000000..8aeeb70191 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java @@ -0,0 +1,29 @@ +package gtPlusPlus.core.proxy; + +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +import gtPlusPlus.core.common.CommonProxy; + +public class ServerProxy extends CommonProxy{ + + @Override + public void preInit(final FMLPreInitializationEvent e) { + // TODO Auto-generated method stub + super.preInit(e); + } + + @Override + public void init(final FMLInitializationEvent e) { + // TODO Auto-generated method stub + super.init(e); + } + + @Override + public void postInit(final FMLPostInitializationEvent e) { + // TODO Auto-generated method stub + super.postInit(e); + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java b/src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java new file mode 100644 index 0000000000..b5fc9c3995 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java @@ -0,0 +1,100 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class Gregtech_Recipe_Adder { + + private static int euT; + private static int ticks; + private static ItemStack inputStack1; + private static ItemStack inputStack2; + private static ItemStack outputStack1; + private static ItemStack outputStack2; + + public static void addRecipe( + final Item maceratorInput, final int maceratorInputAmount1, + final Item maceratorOutput, final int maceratorOutputAmount1, + final Item compressorInput, final int compressorInputAmount1, + final Item compressorOutput, final int compressorOutputAmount1, + final Item blastFurnaceInput, final int blastFurnaceInputAmount1, + final Item blastFurnaceOutput, final int blastFurnaceOutputAmount1, + final Item blastFurnaceInput2, final int blastFurnaceInputAmount2, + final Item blastFurnaceOutput2, final int blastFurnaceOutputAmount2, + final Item smeltingInput, final int smeltingInputAmount1, + final Item smeltingOutput, final int smeltingOutputAmount1, + + final int euPerTick, final int timeInTicks, + final boolean addMaceratorRecipe, final boolean addCompressorRecipe, final boolean addBlastFurnaceRecipe, final int blastFurnaceTemp, final boolean addSmeltingRecipe, final boolean addMixerRecipe){ + euT = euPerTick; + ticks = timeInTicks; + + resetVars(); + if (addMaceratorRecipe){ + inputStack1 = ItemUtils.getSimpleStack(maceratorInput, maceratorInputAmount1); + outputStack1 = ItemUtils.getSimpleStack(maceratorOutput, maceratorOutputAmount1); + addMaceratorRecipe(inputStack1, outputStack1); + } + resetVars(); + if (addCompressorRecipe){ + inputStack1 = ItemUtils.getSimpleStack(compressorInput, compressorInputAmount1); + outputStack1 = ItemUtils.getSimpleStack(compressorOutput, compressorOutputAmount1); + addCompressorRecipe(inputStack1, outputStack1); + } + resetVars(); + if (addBlastFurnaceRecipe){ + inputStack1 = ItemUtils.getSimpleStack(blastFurnaceInput, blastFurnaceInputAmount1); + inputStack2 = ItemUtils.getSimpleStack(blastFurnaceInput2, blastFurnaceInputAmount2); + outputStack1 = ItemUtils.getSimpleStack(blastFurnaceOutput, blastFurnaceOutputAmount1); + outputStack2 = ItemUtils.getSimpleStack(blastFurnaceOutput2, blastFurnaceOutputAmount2); + addBlastFurnaceRecipe(inputStack1, inputStack2, outputStack1, outputStack2, blastFurnaceTemp); + } + resetVars(); + if (addSmeltingRecipe){ + inputStack1 = ItemUtils.getSimpleStack(smeltingInput, smeltingInputAmount1); + outputStack1 = ItemUtils.getSimpleStack(smeltingOutput, smeltingOutputAmount1); + addSmeltingRecipe(inputStack1, outputStack1); + } + resetVars(); + + } + + private static void resetVars(){ + inputStack1 = null; + inputStack2 = null; + outputStack1 = null; + outputStack2 = null; + } + + private static void addMaceratorRecipe(final ItemStack input1, final ItemStack output1){ + GT_ModHandler.addPulverisationRecipe(input1, output1); + } + + private static void addCompressorRecipe(final ItemStack input1, final ItemStack output1){ + GT_ModHandler.addCompressionRecipe(input1, output1); + } + + private static void addBlastFurnaceRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1, final ItemStack output2, final int tempRequired){ + Logger.INFO("Registering Blast Furnace Recipes."); + GT_Values.RA.addBlastRecipe( + input1, + input2, + GT_Values.NF, GT_Values.NF, + output1, + output2, + ticks, + euT, + tempRequired); + } + + private static void addSmeltingRecipe(final ItemStack input1, final ItemStack output1){ + GT_ModHandler.addSmeltingRecipe(input1, output1); + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java b/src/main/java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java new file mode 100644 index 0000000000..460b29e802 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/LOADER_Machine_Components.java @@ -0,0 +1,216 @@ +package gtPlusPlus.core.recipe; + +import gregtech.api.enums.ItemList; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class LOADER_Machine_Components { + + public static void initialise(){ + + registerDefaultComponents(); + + if (!CORE.GTNH){ + if(CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + registerGTExperimentalComponents(); + } + else { + registerGTStandardComponents(); + } + } + else { + registerGTNHComponents(); + } + } + + private static void registerDefaultComponents(){ + //Machine Components + CI.electricMotor_LV = ItemList.Electric_Motor_LV.get(1); + CI.electricMotor_MV = ItemList.Electric_Motor_MV.get(1); + CI.electricMotor_HV = ItemList.Electric_Motor_HV.get(1); + CI.electricMotor_EV = ItemList.Electric_Motor_EV.get(1); + CI.electricMotor_IV = ItemList.Electric_Motor_IV.get(1); + CI.electricPump_LV = ItemList.Electric_Pump_LV.get(1); + CI.electricPump_MV = ItemList.Electric_Pump_MV.get(1); + CI.electricPump_HV = ItemList.Electric_Pump_HV.get(1); + CI.electricPump_EV = ItemList.Electric_Pump_EV.get(1); + CI.electricPump_IV = ItemList.Electric_Pump_IV.get(1); + CI.electricPiston_LV = ItemList.Electric_Piston_LV.get(1); + CI.electricPiston_MV = ItemList.Electric_Piston_MV.get(1); + CI.electricPiston_HV = ItemList.Electric_Piston_HV.get(1); + CI.electricPiston_EV = ItemList.Electric_Piston_EV.get(1); + CI.electricPiston_IV = ItemList.Electric_Piston_IV.get(1); + CI.robotArm_LV = ItemList.Robot_Arm_LV.get(1); + CI.robotArm_MV = ItemList.Robot_Arm_MV.get(1); + CI.robotArm_HV = ItemList.Robot_Arm_HV.get(1); + CI.robotArm_EV = ItemList.Robot_Arm_EV.get(1); + CI.robotArm_IV = ItemList.Robot_Arm_IV.get(1); + CI.conveyorModule_LV = ItemList.Conveyor_Module_LV.get(1); + CI.conveyorModule_MV = ItemList.Conveyor_Module_MV.get(1); + CI.conveyorModule_HV = ItemList.Conveyor_Module_HV.get(1); + CI.conveyorModule_EV = ItemList.Conveyor_Module_EV.get(1); + CI.conveyorModule_IV = ItemList.Conveyor_Module_IV.get(1); + CI.emitter_LV = ItemList.Emitter_LV.get(1); + CI.emitter_MV = ItemList.Emitter_MV.get(1); + CI.emitter_HV = ItemList.Emitter_HV.get(1); + CI.emitter_EV = ItemList.Emitter_EV.get(1); + CI.emitter_IV = ItemList.Emitter_IV.get(1); + CI.fieldGenerator_LV = ItemList.Field_Generator_LV.get(1); + CI.fieldGenerator_MV = ItemList.Field_Generator_MV.get(1); + CI.fieldGenerator_HV = ItemList.Field_Generator_HV.get(1); + CI.fieldGenerator_EV = ItemList.Field_Generator_EV.get(1); + CI.fieldGenerator_IV = ItemList.Field_Generator_IV.get(1); + CI.sensor_LV = ItemList.Sensor_LV.get(1); + CI.sensor_MV = ItemList.Sensor_MV.get(1); + CI.sensor_HV = ItemList.Sensor_HV.get(1); + CI.sensor_EV = ItemList.Sensor_EV.get(1); + CI.sensor_IV = ItemList.Sensor_IV.get(1); + } + + private static void registerGTExperimentalComponents(){ + //GT++ Machine Components + CI.electricMotor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32606, 1); + CI.electricMotor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32607, 1); + CI.electricMotor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32608, 1); + CI.electricPump_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32620, 1); + CI.electricPump_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32621, 1); + CI.electricPump_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32622, 1); + CI.electricPiston_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32645, 1); + CI.electricPiston_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32646, 1); + CI.electricPiston_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32647, 1); + CI.robotArm_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32655, 1); + CI.robotArm_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32656, 1); + CI.robotArm_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32657, 1); + CI.conveyorModule_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32636, 1); + CI.conveyorModule_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32637, 1); + CI.conveyorModule_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32638, 1); + CI.emitter_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32685, 1); + CI.emitter_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32686, 1); + CI.emitter_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32687, 1); + CI.fieldGenerator_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32675, 1); + CI.fieldGenerator_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32676, 1); + CI.fieldGenerator_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32677, 1); + CI.sensor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32695, 1); + CI.sensor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32696, 1); + CI.sensor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32697, 1); + + registerComponentsULV(); + registerComponentsMAX(); + } + + private static void registerGTStandardComponents(){ + CI.electricMotor_LuV = GregtechItemList.Electric_Motor_LuV.get(1); + CI.electricMotor_ZPM = GregtechItemList.Electric_Motor_ZPM.get(1); + CI.electricMotor_UV = GregtechItemList.Electric_Motor_UV.get(1); + CI.electricMotor_MAX = GregtechItemList.Electric_Motor_MAX.get(1); + CI.electricPump_LuV = GregtechItemList.Electric_Pump_LuV.get(1); + CI.electricPump_ZPM = GregtechItemList.Electric_Pump_ZPM.get(1); + CI.electricPump_UV = GregtechItemList.Electric_Pump_UV.get(1); + CI.electricPump_MAX = GregtechItemList.Electric_Pump_MAX.get(1); + CI.electricPiston_LuV = GregtechItemList.Electric_Piston_LuV.get(1); + CI.electricPiston_ZPM = GregtechItemList.Electric_Piston_ZPM.get(1); + CI.electricPiston_UV = GregtechItemList.Electric_Piston_UV.get(1); + CI.electricPiston_MAX = GregtechItemList.Electric_Piston_MAX.get(1); + CI.robotArm_LuV = GregtechItemList.Robot_Arm_LuV.get(1); + CI.robotArm_ZPM = GregtechItemList.Robot_Arm_ZPM.get(1); + CI.robotArm_UV = GregtechItemList.Robot_Arm_UV.get(1); + CI.robotArm_MAX = GregtechItemList.Robot_Arm_MAX.get(1); + CI.conveyorModule_LuV = GregtechItemList.Conveyor_Module_LuV.get(1); + CI.conveyorModule_ZPM = GregtechItemList.Conveyor_Module_ZPM.get(1); + CI.conveyorModule_UV = GregtechItemList.Conveyor_Module_UV.get(1); + CI.conveyorModule_MAX = GregtechItemList.Conveyor_Module_MAX.get(1); + CI.emitter_LuV = GregtechItemList.Emitter_LuV.get(1); + CI.emitter_ZPM = GregtechItemList.Emitter_ZPM.get(1); + CI.emitter_UV = GregtechItemList.Emitter_UV.get(1); + CI.emitter_MAX = GregtechItemList.Emitter_MAX.get(1); + CI.fieldGenerator_LuV = GregtechItemList.Field_Generator_LuV.get(1); + CI.fieldGenerator_ZPM = GregtechItemList.Field_Generator_ZPM.get(1); + CI.fieldGenerator_UV = GregtechItemList.Field_Generator_UV.get(1); + CI.fieldGenerator_MAX = GregtechItemList.Field_Generator_MAX.get(1); + CI.sensor_LuV = GregtechItemList.Sensor_LuV.get(1); + CI.sensor_ZPM = GregtechItemList.Sensor_ZPM.get(1); + CI.sensor_UV = GregtechItemList.Sensor_UV.get(1); + CI.sensor_MAX = GregtechItemList.Sensor_MAX.get(1); + + registerComponentsULV(); + } + + private static void registerGTNHComponents(){ + //Machine Components + CI.electricMotor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32606, 1); + CI.electricMotor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32607, 1); + CI.electricMotor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32608, 1); + + CI.electricPump_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32615, 1); + CI.electricPump_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32616, 1); + CI.electricPump_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32617, 1); + + CI.electricPiston_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32645, 1); + CI.electricPiston_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32646, 1); + CI.electricPiston_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32647, 1); + + CI.robotArm_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32655, 1); + CI.robotArm_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32656, 1); + CI.robotArm_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32657, 1); + + CI.conveyorModule_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32635, 1); + CI.conveyorModule_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32636, 1); + CI.conveyorModule_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32637, 1); + + CI.emitter_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32685, 1); + CI.emitter_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32686, 1); + CI.emitter_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32687, 1); + + CI.fieldGenerator_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32675, 1); + CI.fieldGenerator_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32676, 1); + CI.fieldGenerator_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32677, 1); + + CI.sensor_LuV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32695, 1); + CI.sensor_ZPM = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32696, 1); + CI.sensor_UV = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32697, 1); + + // Thanks 0lafe + CI.electricMotor_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32596, 1); + CI.electricPump_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32618, 1); + CI.electricPiston_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32648, 1); + CI.robotArm_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32658, 1); + CI.conveyorModule_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32638, 1); + CI.emitter_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32688, 1); + CI.fieldGenerator_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32678, 1); + CI.sensor_MAX = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32698, 1); + + registerComponentsULV(); + } + + private static boolean registerComponentsULV(){ + + CI.electricMotor_ULV = GregtechItemList.Electric_Motor_ULV.get(1); + CI.electricPump_ULV = GregtechItemList.Electric_Pump_ULV.get(1); + CI.electricPiston_ULV = GregtechItemList.Electric_Piston_ULV.get(1); + CI.robotArm_ULV = GregtechItemList.Robot_Arm_ULV.get(1); + CI.conveyorModule_ULV = GregtechItemList.Conveyor_Module_ULV.get(1); + CI.emitter_ULV = GregtechItemList.Emitter_ULV.get(1); + CI.fieldGenerator_ULV = GregtechItemList.Field_Generator_ULV.get(1); + CI.sensor_ULV = GregtechItemList.Sensor_ULV.get(1); + return true; + } + + private static boolean registerComponentsMAX() { + + // Max Tier Components Blood Never added... Useless, lol. + CI.electricMotor_MAX = GregtechItemList.Electric_Motor_MAX.get(1); + CI.electricPump_MAX = GregtechItemList.Electric_Pump_MAX.get(1); + CI.electricPiston_MAX = GregtechItemList.Electric_Piston_MAX.get(1); + CI.robotArm_MAX = GregtechItemList.Robot_Arm_MAX.get(1); + CI.conveyorModule_MAX = GregtechItemList.Conveyor_Module_MAX.get(1); + CI.emitter_MAX = GregtechItemList.Emitter_MAX.get(1); + CI.fieldGenerator_MAX = GregtechItemList.Field_Generator_MAX.get(1); + CI.sensor_MAX = GregtechItemList.Sensor_MAX.get(1); + + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Extruder.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Extruder.java new file mode 100644 index 0000000000..455beb2fd0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Extruder.java @@ -0,0 +1,47 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.*; +import gregtech.api.interfaces.IOreRecipeRegistrator; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class RECIPES_Extruder implements IOreRecipeRegistrator { + + public RECIPES_Extruder() { + OrePrefixes.ingot.add((IOreRecipeRegistrator) this); + OrePrefixes.dust.add((IOreRecipeRegistrator) this); + } + + public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + if (!CORE.GTNH && ((aMaterial == Materials.Glass || aMaterial == Materials.WroughtIron + || GT_OreDictUnificator.get(OrePrefixes.ingot, (Object) aMaterial, 1L) != null) + && !aMaterial.contains(SubTag.NO_SMELTING))) { + final long aMaterialMass = aMaterial.getMass(); + final int tAmount = (int) (aPrefix.mMaterialAmount / 3628800L); + if (tAmount > 0 && tAmount <= 64 && aPrefix.mMaterialAmount % 3628800L == 0L) { + int tVoltageMultiplier = (aMaterial.mBlastFurnaceTemp >= 2800) ? 64 : 16; + if (aMaterial.contains(SubTag.NO_SMASHING)) { + tVoltageMultiplier /= 4; + } else if (aPrefix.name().startsWith(OrePrefixes.dust.name())) { + return; + } + + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), + GregtechItemList.Shape_Extruder_SmallGear.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, (Object) aMaterial.mSmeltInto, (long) tAmount), + ((int) Math.max(aMaterialMass * 5L * tAmount, tAmount)/4), 8 * tVoltageMultiplier); + GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), + ItemList.Shape_Mold_Gear_Small.get(0L, new Object[0]), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, (Object) aMaterial.mSmeltInto, (long) tAmount), + ((int) Math.max(aMaterialMass * 10L * tAmount, tAmount)/4), 2 * tVoltageMultiplier); + + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java new file mode 100644 index 0000000000..5156b938db --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -0,0 +1,2270 @@ +package gtPlusPlus.core.recipe; + +import static gtPlusPlus.core.lib.CORE.GTNH; + +import java.util.ArrayList; + +import cpw.mods.fml.common.Loader; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.HotFuel; +import gregtech.api.util.ThermalFuel; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.item.chemistry.GenericChem; +import gtPlusPlus.core.item.chemistry.IonParticles; +import gtPlusPlus.core.item.chemistry.RocketFuels; +import gtPlusPlus.core.item.crafting.ItemDummyResearch; +import gtPlusPlus.core.item.crafting.ItemDummyResearch.ASSEMBLY_LINE_RESEARCH; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.material.ORES; +import gtPlusPlus.core.material.Particle; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.EnchantingUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.reflect.AddGregtechRecipe; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RECIPES_GREGTECH { + + public static void run() { + Logger.INFO("Loading Recipes through GregAPI for Industrial Multiblocks."); + execute(); + } + + private static void execute() { + cokeOvenRecipes(); + electrolyzerRecipes(); + assemblerRecipes(); + fluidcannerRecipes(); + distilleryRecipes(); + extractorRecipes(); + fluidExtractorRecipes(); + chemicalBathRecipes(); + chemicalReactorRecipes(); + dehydratorRecipes(); + blastFurnaceRecipes(); + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + largeChemReactorRecipes(); + fusionRecipes(); + } + + fissionFuelRecipes(); + autoclaveRecipes(); + compressorRecipes(); + mixerRecipes(); + macerationRecipes(); + centrifugeRecipes(); + benderRecipes(); + cyclotronRecipes(); + blastSmelterRecipes(); + //advancedMixerRecipes(); + sifterRecipes(); + electroMagneticSeperatorRecipes(); + extruderRecipes(); + cuttingSawRecipes(); + breweryRecipes(); + laserEngraverRecipes(); + assemblyLineRecipes(); + latheRecipes(); + vacuumFreezerRecipes(); + fluidheaterRecipes(); + chemplantRecipes(); + packagerRecipes(); + + + /** + * Special Recipe handlers + */ + RECIPES_SeleniumProcessing.init(); + RECIPES_RareEarthProcessing.init(); + + + + + + + addFuels(); + } + + + + private static void packagerRecipes() { + + + } + + private static void chemplantRecipes() { + + //This is subsequently absorbed in water to form nitric acid and nitric oxide. + //3 NO2 (g) + H2O (l) → 2 HNO3 (aq) + NO (g) (ΔH = −117 kJ/mol) + //The nitric oxide is cycled back for reoxidation. Alternatively, if the last step is carried out in air: + //4 NO2 (g) + O2 (g) + 2 H2O (l) → 4 HNO3 (aq) + + // Advanced method for Nitric Acid Production + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + CI.getPinkCatalyst(0), + }, + new FluidStack[] { + FluidUtils.getFluidStack(GenericChem.Nitrogen_Dioxide, 4000), + FluidUtils.getAir(4000), + FluidUtils.getWater(2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack("nitricacid", 4000), + }, + 10 * 20, + 480, + 3); + + // Advanced recipe for Fluorine Production + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + CI.getPurpleCatalyst(0), + ItemUtils.getSimpleStack(Blocks.sandstone, 64), + ItemUtils.getSimpleStack(Blocks.sandstone, 64) + }, + new FluidStack[] { + FluidUtils.getFluidStack("nitricacid", 4000), + FluidUtils.getAir(8000) + }, + new ItemStack[] { + FLUORIDES.FLUORITE.getOre(8), + FLUORIDES.FLUORITE.getOre(4), + FLUORIDES.FLUORITE.getOre(4), + FLUORIDES.FLUORITE.getOre(4), + }, + new FluidStack[] { + + }, + new int[] { + 0, 2500, 2000, 1500 + }, + 10 * 20, + 1024, + 5); + + // Advanced recipe for Fluorine Production + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + CI.getPurpleCatalyst(0), + ItemUtils.getSimpleStack(Blocks.sand, 64), + ItemUtils.getSimpleStack(Blocks.sand, 64) + }, + new FluidStack[] { + FluidUtils.getFluidStack("nitricacid", 5000), + FluidUtils.getAir(12000) + }, + new ItemStack[] { + FLUORIDES.FLUORITE.getOre(4), + FLUORIDES.FLUORITE.getOre(2), + FLUORIDES.FLUORITE.getOre(2), + FLUORIDES.FLUORITE.getOre(2), + }, + new FluidStack[] { + + }, + new int[] { + 7500, 1500, 1000, 500 + }, + 10 * 20, + 1024, + 5); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPinkCatalyst(0), + }, + new FluidStack[] { + FluidUtils.getFluidStack(GenericChem.Nitrogen_Dioxide, 3000), + FluidUtils.getDistilledWater(5000) + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack("nitricacid", 2000), + FluidUtils.getFluidStack(GenericChem.Nitric_Oxide, 1500), + }, + 10 * 20, + 480, + 2); + + // Produce Boric Acid + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(21), + ItemUtils.getItemStackOfAmountFromOreDict("dustBorax", 4), + }, + new FluidStack[] { + FluidUtils.getFluidStack(GenericChem.HydrochloricAcid, 2000) + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustSalt", 5), + }, + new FluidStack[] { + FluidUtils.getFluidStack("boricacid", 2000), + FluidUtils.getWater(5000) + + }, + 20 * 30, + MaterialUtils.getVoltageForTier(3), + 3); + + // Produce Th232 + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(22), + ELEMENT.getInstance().THORIUM.getDust(16) + }, + new FluidStack[] { + FluidUtils.getDistilledWater(2000), + FluidUtils.getFluidStack("boricacid", 1500) + }, + new ItemStack[] { + ELEMENT.getInstance().THORIUM.getSmallDust(32), + ELEMENT.getInstance().THORIUM232.getDust(2), + ELEMENT.getInstance().THORIUM232.getSmallDust(2), + ELEMENT.getInstance().URANIUM232.getDust(1), + }, + new FluidStack[] { + + }, + new int[] { + 0, 0, 1000, 250 + }, + 20 * 300, + MaterialUtils.getVoltageForTier(4), + 4); + + // Modify Sapling into Pine Sapling + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(6), + ItemUtils.getSimpleStack(Blocks.sapling, 32) + }, + new FluidStack[] { + FluidUtils.getFluidStack("fluid.geneticmutagen", 2000), + FluidUtils.getDistilledWater(8000) + }, + new ItemStack[] { + ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine, 16) + }, + new FluidStack[] { + + }, + 120 * 20, + 64, + 2); + + + // Convert GT++ Plutonium239 into normal Plutonium + if (Materials.Plutonium.mDefaultLocalName.equals("Plutonium 239")) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getSmallDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + } + + int aLaureniumTier = ALLOY.LAURENIUM.vTier; + // Adding Recipes for Casings + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(12), + CI.getTieredMachineCasing(aLaureniumTier-1), + ALLOY.LAURENIUM.getPlate(8), + CI.getGear(aLaureniumTier, 2) + }, + new FluidStack[] { + CI.getTieredFluid(aLaureniumTier, 2 * 144), + CI.getAlternativeTieredFluid(aLaureniumTier-1, 4 * 144), + CI.getTertiaryTieredFluid(aLaureniumTier-2, 6 * 144) + }, + new ItemStack[] { + GregtechItemList.Casing_Machine_Custom_3.get(1) + }, + new FluidStack[] { + + }, + 20 * 20, + MaterialUtils.getVoltageForTier(aLaureniumTier-2), + 5); + + int aBotmiumTier = ALLOY.BOTMIUM.vTier; + // Adding Recipes for Casings + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(12), + CI.getTieredMachineCasing(aBotmiumTier-1), + ALLOY.BOTMIUM.getPlate(8), + CI.getGear(aBotmiumTier, 2) + }, + new FluidStack[] { + CI.getTieredFluid(aBotmiumTier, 2 * 144), + CI.getAlternativeTieredFluid(aBotmiumTier-1, 4 * 144), + CI.getTertiaryTieredFluid(aBotmiumTier-2, 6 * 144) + }, + new ItemStack[] { + GregtechItemList.Casing_Machine_Custom_4.get(1) + }, + new FluidStack[] { + + }, + 20 * 20, + MaterialUtils.getVoltageForTier(aBotmiumTier-2), + 6); + + } + + private static void fluidheaterRecipes() { + GT_Values.RA.addFluidHeaterRecipe(CI.getNumberedCircuit(20), FluidUtils.getWater(1000), FluidUtils.getHotWater(1000), 30, 30); + + } + + private static void vacuumFreezerRecipes() { + GT_Values.RA.addVacuumFreezerRecipe(GregtechItemList.Bomb_Cast_Molten.get(1), GregtechItemList.Bomb_Cast_Set.get(1), 20 * 30); + } + + private static void latheRecipes() { + + GT_Values.RA.addLatheRecipe( + ALLOY.EGLIN_STEEL.getBlock(1), + GregtechItemList.Bomb_Cast_Mold.get(1), + null, + 20 * 60 * 15, + 120); + + GT_Values.RA.addLatheRecipe( + GregtechItemList.Bomb_Cast_Set.get(1), + GregtechItemList.Bomb_Cast_Broken.get(2), + ItemUtils.getSimpleStack(ModItems.itemBombCasing, 2), + 20 * 60 * 5, + 30); + + } + + private static void fusionRecipes() { + + /** + * Adds a Fusion reactor Recipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInput2 = second Input (not null, and respects StackSize) + * @param aOutput = Output of the Fusion (can be null, and respects StackSize) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!) + * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) + */ + + //Hydrogen Plasma + /*CORE.RA.addFusionReactorRecipe( + Particle.getIon("Hydrogen", 0), + Particle.getIon("Hydrogen", 0), + Materials.Hydrogen.getPlasma(1), + 5000, + 16, + 4096, + 40000000);*/ + + + //Hypogen Creation + GT_Values.RA.addFusionReactorRecipe( + Materials.Neutronium.getMolten(128), + ALLOY.QUANTUM.getFluidStack(256), + ELEMENT.STANDALONE.HYPOGEN.getFluidStack(4), + 2048 * 4, + (int) MaterialUtils.getVoltageForTier(9), + 600000000 * 2); + + //Rhugnor + GT_Values.RA.addFusionReactorRecipe( + GenericChem.TEFLON.getFluidStack(64), + ALLOY.PIKYONIUM.getFluidStack(128), + ELEMENT.STANDALONE.RHUGNOR.getFluidStack(8), + 2048 * 4, + (int) MaterialUtils.getVoltageForTier(7), + 150000000 * 2); + + } + + private static void assemblyLineRecipes() { + + + + ItemStack[] aCoilWire = new ItemStack[] { + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 0, GTNH ? 64 : 32), + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 1, GTNH ? 64 : 32), + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 2, GTNH ? 64 : 32), + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 3, GTNH ? 64 : 32), + }; + + + + + //Containment Casings + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1), + 20 * 60 * 30, + new Object[] { + ItemList.Field_Generator_IV.get(GTNH ? 32 : 16), + ItemList.Electric_Motor_EV.get(GTNH ? 64 : 32), + ItemList.Energy_LapotronicOrb.get(GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.cableGt12, 7, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.wireGt16, 6, GTNH ? 64 : 32), + ItemUtils.getOrePrefixStack(OrePrefixes.plate, Materials.Naquadria, GTNH ? 64 : 16), + ELEMENT.getInstance().GADOLINIUM.getDust(GTNH ? 32 : 8), + ELEMENT.getInstance().SAMARIUM.getDust(GTNH ? 16 : 4), + ALLOY.ARCANITE.getGear(GTNH ? 8 : 2), + new Object[] {CI.getTieredCircuitOreDictName(5), 64}, + new Object[] {CI.getTieredCircuitOreDictName(6), 32}, + new Object[] {CI.getTieredCircuitOreDictName(7), 16}, + GregtechItemList.Laser_Lens_Special.get(1), + aCoilWire[3] + }, + new FluidStack[] { + ALLOY.NITINOL_60.getFluidStack(144 * 9 * (GTNH ? 4 : 2)), + ALLOY.ENERGYCRYSTAL.getFluidStack(144 * 9 * (GTNH ? 8 : 4)), + ALLOY.TUMBAGA.getFluidStack(144 * 9 * (GTNH ? 32 : 8)), + ALLOY.NICHROME.getFluidStack(144 * 1 * (GTNH ? 16 : 4)), + }, + ItemUtils.getSimpleStack(ModBlocks.blockCasings3Misc, 15, 32), + 20 * 60 * 10 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(6)); + + //Slow Fusion Controller + /*CORE.RA.addAssemblylineRecipe( + GregtechItemList.COMET_Cyclotron.get(1), + 20 * 60 * 30, + new ItemStack[] { + CI.getFieldGenerator(6, GTNH ? 32 : 8), + ItemList.Electric_Motor_EV.get(GTNH ? 32 : 8), + ItemList.Tool_Scanner.get(GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.cableGt12, 6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.wireGt16, 5, GTNH ? 64 : 32), + CI.getTieredComponent(OrePrefixes.plate, 6, GTNH ? 64 : 32), + ELEMENT.getInstance().GADOLINIUM.getDust(GTNH ? 32 : 8), + ELEMENT.getInstance().SAMARIUM.getDust(GTNH ? 16 : 4), + ALLOY.INCOLOY_MA956.getGear(GTNH ? 8 : 2), + CI.getTieredComponent(OrePrefixes.circuit, 5, GTNH ? 64 : 32), + CI.getTieredComponent(OrePrefixes.circuit, 6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.circuit, 7, GTNH ? 16 : 8) + }, + new FluidStack[] { + CI.getTieredFluid(6, 144 * 9 * (GTNH ? 8 : 4)), + CI.getTertiaryTieredFluid(6, 144 * 9 * (GTNH ? 8 : 4)), + CI.getAlternativeTieredFluid(6, 144 * 9 * (GTNH ? 8 : 4)), + CI.getTieredFluid(5, 144 * 9 * (GTNH ? 16 : 8)), + }, + GregtechItemList.Miniature_Fusion.get(1), + 20 * 60 * 5 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(7));*/ + + + //Plasma Tank + /*CORE.RA.addAssemblylineRecipe( + ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, 1), + 20 * 60 * 5, + new ItemStack[] { + CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.circuit, 5, GTNH ? 16 : 4), + CI.getTieredComponent(OrePrefixes.pipeHuge, 5, GTNH ? 16 : 4), + CI.getTieredComponent(OrePrefixes.cableGt08, 7, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.gearGt, 6, GTNH ? 8 : 4), + aCoilWire[2] + }, + new FluidStack[] { + CI.getTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), + CI.getTertiaryTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), + + }, + GregtechItemList.Plasma_Tank.get(1), + 20 * 60 * 1 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(5));*/ + + // Turbine Automation Port + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_8_TURBINE_AUTOMATION, 1), + 20 * 60 * 60 * 24, + new Object[] { + CI.getTieredMachineHull(8, 4), + CI.getConveyor(8, GTNH ? 24 : 12), + CI.getElectricMotor(7, GTNH ? 32 : 16), + CI.getElectricPiston(7, GTNH ? 16 : 4), + CI.getEnergyCore(6, GTNH ? 8 : 2), + CI.getPlate(8, GTNH ? 24 : 12), + CI.getTieredComponent(OrePrefixes.screw, 8, GTNH ? 48 : 24), + CI.getTieredComponent(OrePrefixes.bolt, 7, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.rod, 6, GTNH ? 12 : 6), + new Object[] {CI.getTieredCircuitOreDictName(7), 20}, + CI.getTieredComponent(OrePrefixes.rotor, 6, GTNH ? 16 : 8), + }, + new FluidStack[] { + CI.getTieredFluid(8, 144 * 32), + CI.getAlternativeTieredFluid(7, 144 * 16), + CI.getTertiaryTieredFluid(7, 144 * 16), + ALLOY.BABBIT_ALLOY.getFluidStack(128 * 144), + ALLOY.ZERON_100.getFluidStack(144 * 64) + + }, + GregtechItemList.Hatch_Input_TurbineHousing.get(4), + 20 * 60 * 60 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(8)); + + + /* + * Contianment casings + */ + + ItemStack[] aGemCasings = new ItemStack[] { + GregtechItemList.Battery_Casing_Gem_1.get(1), + GregtechItemList.Battery_Casing_Gem_2.get(1), + GregtechItemList.Battery_Casing_Gem_3.get(1), + GregtechItemList.Battery_Casing_Gem_4.get(1), + }; + ItemStack[] aResearch = new ItemStack[] { + Particle.getBaseParticle(Particle.UNKNOWN), + GregtechItemList.Battery_Casing_Gem_1.get(1), + GregtechItemList.Battery_Casing_Gem_2.get(1), + GregtechItemList.Battery_Casing_Gem_3.get(1), + }; + + int aCasingSlot = 0; + for (int j = 6; j < 10; j++) { + CORE.RA.addAssemblylineRecipe( + aResearch[aCasingSlot], + 20 * 60 * 60, + new ItemStack[] { + CI.getTieredComponent(OrePrefixes.plate, j-1,16), + CI.getTieredComponent(OrePrefixes.cableGt08, j+1,(GTNH ? 32 : 16)), + CI.getTieredComponent(OrePrefixes.gearGt, j-1, 4), + aCoilWire[aCasingSlot] + }, + new FluidStack[] { + CI.getTieredFluid(j, 144 *(GTNH ? 8 : 4)), + CI.getTertiaryTieredFluid(j-2, 144 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(j, 144 * (GTNH ? 16 : 12)), + + }, + aGemCasings[aCasingSlot++], + 20 * 60 * 1 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(j)); + } + + /* + * Gem Battery Recipes + */ + + ItemStack[] aGemBatteries = new ItemStack[] { + GregtechItemList.Battery_Gem_1.get(1), + GregtechItemList.Battery_Gem_2.get(1), + GregtechItemList.Battery_Gem_3.get(1), + GregtechItemList.Battery_Gem_4.get(1), + }; + + ItemStack[] aExoticInputs = new ItemStack[] { + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.ELECTRON), + Particle.getBaseParticle(Particle.CHARM), + Particle.getBaseParticle(Particle.GRAVITON) + }; + aCasingSlot = 0; + for (int j = 6; j < 10; j++) { + CORE.RA.addAssemblylineRecipe( + aExoticInputs[aCasingSlot], + 20 * 60 * 60 * 5, + new Object[] { + aGemCasings[aCasingSlot], + ItemUtils.getSimpleStack(aExoticInputs[aCasingSlot], 16), + CI.getTieredComponent(OrePrefixes.plate, j, 16), + new Object[] {CI.getTieredCircuitOreDictName(j), 8}, + CI.getTieredComponent(OrePrefixes.wireGt16, j+1, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.bolt, j, GTNH ? 8 : 4), + CI.getTieredComponent(OrePrefixes.screw, j-1, GTNH ? 8 : 4), + }, + new FluidStack[] { + CI.getTieredFluid(j, 144 * 1 * (GTNH ? 16 : 8)), + CI.getTertiaryTieredFluid(j-2, 144 * 2 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(j, 144 * (GTNH ? 16 : 8)), + CI.getTertiaryTieredFluid(j-1, 144 * (GTNH ? 16 : 8)), + }, + aGemBatteries[aCasingSlot++], + 20 * 60 * 1 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(j)); + } + + + if (LoadedMods.Baubles) { + //Nano Healer + CORE.RA.addAssemblylineRecipe( + ItemUtils.simpleMetaStack(Items.golden_apple, 1, 1), + 20 * 60 * 10, + new Object[] { + ItemUtils.getSimpleStack(aGemCasings[2], GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.plate, 8, GTNH ? 32 : 16), + new Object[] {CI.getTieredCircuitOreDictName(7), 16}, + CI.getTieredComponent(OrePrefixes.cableGt02, 7, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.gearGt, 6, GTNH ? 6 : 3), + CI.getTieredComponent(OrePrefixes.screw, 7, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.bolt, 5, GTNH ? 24 : 12), + CI.getTieredComponent(OrePrefixes.frameGt, 4, GTNH ? 12 : 6), + aCoilWire[3] + }, + new FluidStack[] { + CI.getTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), + CI.getTertiaryTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(6, 144 * 18 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), + + }, + ItemUtils.getItemStackFromFQRN("miscutils:personalHealingDevice", 1), + 20 * 60 * 30 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(7)); + + + + //Charge Pack LuV-UV + + ItemStack[] aChargeResearch = new ItemStack[] { + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore7", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore8", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore9", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore10", 1), + }; + + ItemStack[] aChargeOutputs = new ItemStack[] { + ItemUtils.getSimpleStack(ModItems.itemChargePack_High_1, 1), + ItemUtils.getSimpleStack(ModItems.itemChargePack_High_2, 1), + ItemUtils.getSimpleStack(ModItems.itemChargePack_High_3, 1), + ItemUtils.getSimpleStack(ModItems.itemChargePack_High_4, 1), + }; + + int aCurrSlot = 0; + for (int h = 6; h < 10; h++) { + CORE.RA.addAssemblylineRecipe( + aChargeResearch[aCurrSlot], + 20 * 60 * 10 * (aCurrSlot + 1), + new Object[] { + ItemUtils.getSimpleStack(aGemBatteries[aCurrSlot],2), + aCoilWire[aCurrSlot], + CI.getTieredComponent(OrePrefixes.plate, h, 8), + new Object[] {CI.getTieredCircuitOreDictName(h), 4}, + new Object[] {CI.getTieredCircuitOreDictName(h-1), 8}, + CI.getTieredComponent(OrePrefixes.cableGt12, h-1, 16), + CI.getTieredComponent(OrePrefixes.screw, h, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.bolt, h-2, GTNH ? 32 : 16), + CI.getFieldGenerator(h, 1), + }, + new FluidStack[] { + CI.getTieredFluid(h, 144 * 4 * (GTNH ? 8 : 4)), + CI.getTertiaryTieredFluid(h-1, 144 * 4 * (GTNH ? 8 : 4)), + CI.getAlternativeTieredFluid(h-1, 144 * 4 * (GTNH ? 8 : 4)), + CI.getAlternativeTieredFluid(h-2, 144 * 4 * (GTNH ? 8 : 4)), + }, + aChargeOutputs[aCurrSlot], + 20 * 60 * 30 * (GTNH ? 2 : 1) * (aCurrSlot+1), + (int) MaterialUtils.getVoltageForTier(h)); + aCurrSlot++; + } + + //Cloaking device + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_9_CLOAKING, 1), + 20 * 60 * 10, + new Object[] { + ItemUtils.getSimpleStack(aGemCasings[3], GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.plate, 8, GTNH ? 32 : 16), + new Object[] {CI.getTieredCircuitOreDictName(7), 16}, + CI.getTieredComponent(OrePrefixes.cableGt04, 8, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.gearGt, 7, GTNH ? 6 : 3), + CI.getTieredComponent(OrePrefixes.screw, 8, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.bolt, 7, GTNH ? 24 : 12), + CI.getTieredComponent(OrePrefixes.frameGt, 5, GTNH ? 12 : 6), + aCoilWire[3] + }, + new FluidStack[] { + CI.getTieredFluid(8, 144 * 18 * (GTNH ? 16 : 8)), + CI.getTertiaryTieredFluid(8, 144 * 18 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), + CI.getAlternativeTieredFluid(8, 144 * 18 * (GTNH ? 16 : 8)), + + }, + ItemUtils.getItemStackFromFQRN("miscutils:personalCloakingDevice", 1), + 20 * 60 * 30 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(8)); + } + + + + + + + + + + } + + private static void laserEngraverRecipes() { + + // Laser Sensors and Emitters together + GregtechItemList[] aTransParts = new GregtechItemList[] { + GregtechItemList.TransmissionComponent_ULV, + GregtechItemList.TransmissionComponent_LV, + GregtechItemList.TransmissionComponent_MV, + GregtechItemList.TransmissionComponent_HV, + GregtechItemList.TransmissionComponent_EV, + GregtechItemList.TransmissionComponent_IV, + GregtechItemList.TransmissionComponent_LuV, + GregtechItemList.TransmissionComponent_ZPM, + GregtechItemList.TransmissionComponent_UV, + GregtechItemList.TransmissionComponent_MAX, + }; + for (int i=0;i<10;i++) { + GT_Values.RA.addLaserEngraverRecipe( + CI.getEmitter(i, 2), + CI.getSensor(i, 2), + aTransParts[i].get(1), + 20 * 5, + MaterialUtils.getVoltageForTier(i)); + } + + + + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tungsten, 6L), + GregtechItemList.Laser_Lens_Special.get(0), + ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1), + 20 * 60 * 3, + MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.vTier)); + + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 8L), + GregtechItemList.Laser_Lens_Special.get(0), + ELEMENT.STANDALONE.ASTRAL_TITANIUM.getDust(1), + 20 * 60 * 2, + MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ASTRAL_TITANIUM.vTier)); + + GT_Values.RA.addLaserEngraverRecipe( + ALLOY.NITINOL_60.getBlock(2), + GregtechItemList.Laser_Lens_Special.get(0), + ELEMENT.STANDALONE.ADVANCED_NITINOL.getBlock(1), + 20 * 60 * 1, + MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ADVANCED_NITINOL.vTier)); + + GT_Values.RA.addLaserEngraverRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 64L), + GregtechItemList.Laser_Lens_Special.get(0), + ELEMENT.STANDALONE.CHRONOMATIC_GLASS.getDust(1), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CHRONOMATIC_GLASS.vTier)); + + + GT_Values.RA.addLaserEngraverRecipe( + CI.getFieldGenerator(6, 1), + CI.getEmitter(7, 2), + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5)); + + // Distillus Upgrade Chip + GT_Values.RA.addLaserEngraverRecipe( + GregtechItemList.Laser_Lens_WoodsGlass.get(0), + ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, 20, 1), + GregtechItemList.Distillus_Upgrade_Chip.get(1), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5)); + + + + + } + + private static void breweryRecipes() { + CORE.RA.addBrewingRecipe(14, EnchantingUtils.getMobEssence(100), EnchantingUtils.getLiquidXP(1332), 100, 120, false); + CORE.RA.addBrewingRecipe(14, EnchantingUtils.getLiquidXP(1332), EnchantingUtils.getMobEssence(100), 100, 120, false); + CORE.RA.addBrewingRecipe(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest), FluidUtils.getFluidStack("water", 100), FluidUtils.getFluidStack("biomass", 100), 1200, 3, false); + CORE.RA.addBrewingRecipe(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest), FluidUtils.getFluidStack("honey", 100), FluidUtils.getFluidStack("biomass", 150), 1200, 3, false); + CORE.RA.addBrewingRecipe(ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest), FluidUtils.getFluidStack("juice", 100), FluidUtils.getFluidStack("biomass", 150), 1200, 3, false); + } + + private static void cuttingSawRecipes() { + GT_Values.RA.addCutterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), //Input + ItemUtils.getItemStackOfAmountFromOreDict("plateMeatRaw", 9), //Output + null, + 16, //Time + 8); //EU + } + + private static void electrolyzerRecipes() { + GT_Values.RA.addElectrolyzerRecipe( + ItemUtils.getSimpleStack(ModItems.dustDecayedRadium226, 1), + null, + null, + FluidUtils.getFluidStack("radon", !GTNH ? 500 : 144), + null, + null, + null, + null, + null, + null, + new int[]{}, + 20*90, + 240); + } + + private static void extruderRecipes() { + // Osmium Credits + if (GT_Values.RA.addExtruderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockOsmium", 1), + ItemList.Shape_Mold_Credit.get(0), ItemList.Credit_Greg_Osmium.get(1), + (int) Math.max(Materials.Osmium.getMass() * 2L * 20, 1), 1024)) { + Logger.WARNING("Extruder Recipe: Osmium Credit - Success"); + } + else { + Logger.WARNING("Extruder Recipe: Osmium Credit - Failed"); + } + } + + private static void blastSmelterRecipes() { + + if (!GTNH) { + // Trinium + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(8), + ELEMENT.getInstance().BISMUTH.getDust(8), + ELEMENT.getInstance().IRON.getDust(64), + ELEMENT.getInstance().CARBON.getDust(16), + ELEMENT.getInstance().GOLD.getDust(16), + ELEMENT.getInstance().SILVER.getDust(16), + ELEMENT.getInstance().OSMIUM.getDust(4), + ELEMENT.getInstance().IRIDIUM.getDust(4), + ELEMENT.getInstance().CERIUM.getDust(8) + }, + FluidUtils.getFluidStack("molten.trinium", 136 * 144), 0, 20 * 3000, + 2040*4); + } + + //Eglin Steel + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(6), + ELEMENT.getInstance().IRON.getDust(4), + ALLOY.KANTHAL.getDust(1), + ALLOY.INVAR.getDust(5), + ELEMENT.getInstance().SULFUR.getDust(1), + ELEMENT.getInstance().CARBON.getDust(1), + ELEMENT.getInstance().SILICON.getDust(4) + }, + ALLOY.EGLIN_STEEL.getFluidStack(16 * 144), + 0, + 20 * 45, + 120); + + //HG1223 + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(5), + ELEMENT.getInstance().MERCURY.getCell(1), + ELEMENT.getInstance().BARIUM.getDust(2), + ELEMENT.getInstance().CALCIUM.getDust(2), + ELEMENT.getInstance().COPPER.getDust(3), + }, + ELEMENT.getInstance().OXYGEN.getFluidStack(8000), + ALLOY.HG1223.getFluidStack(16 * 144), + new ItemStack[] { + CI.emptyCells(1) + }, + new int[] {10000}, //Output Chance + 20 * 120, + 30720); + + //NITINOL_60 + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(2), + ELEMENT.getInstance().TITANIUM.getDust(3), + ELEMENT.getInstance().NICKEL.getDust(2) + }, + ALLOY.NITINOL_60.getFluidStack(5 * 144), + 0, + 20 * 75, + 7680); + + + + + + // Germanium Roasting + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(15), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedSphalerite", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(2000), + ELEMENT.getInstance().GERMANIUM.getFluidStack(288), + 0, + 20 * 300, + 4000); + + + // Ruthenium Roasting + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(19), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIridium", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(2000), + ELEMENT.getInstance().RUTHENIUM.getFluidStack(288), + 0, + 20 * 300, + 8000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(19), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedOsmium", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(2000), + ELEMENT.getInstance().RUTHENIUM.getFluidStack(288), + 0, + 20 * 300, + 8000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(19), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPlatinum", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(2000), + ELEMENT.getInstance().RUTHENIUM.getFluidStack(288), + 0, + 20 * 300, + 8000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(19), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCooperite", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(8000), + ELEMENT.getInstance().RUTHENIUM.getFluidStack(144), + 0, + 20 * 300, + 8000); + + // Rhenium Roasting + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(20), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedScheelite", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(10000), + ELEMENT.getInstance().RHENIUM.getFluidStack(144), + 0, + 20 * 300, + 4000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(20), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMolybdenite", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(7500), + ELEMENT.getInstance().RHENIUM.getFluidStack(144), + 0, + 20 * 300, + 4000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(20), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMolybdenum", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(5000), + ELEMENT.getInstance().RHENIUM.getFluidStack(288), + 0, + 20 * 300, + 4000); + + //Thallium Roasting + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(21), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIron", 12), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPyrite", 16), + ELEMENT.getInstance().CARBON.getDust(64), + }, + Materials.SulfuricAcid.getFluid(5000), + ELEMENT.getInstance().THALLIUM.getFluidStack(288+144), + 0, + 20 * 300, + 8000); + + + + //Strontium processing + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(21), + MISC_MATERIALS.STRONTIUM_OXIDE.getDust(8), + ELEMENT.getInstance().ALUMINIUM.getDust(8), + }, + null, + ELEMENT.getInstance().OXYGEN.getFluidStack(8000), + new ItemStack[] { + ELEMENT.getInstance().ALUMINIUM.getIngot(8), + ELEMENT.getInstance().STRONTIUM.getIngot(8) + }, + new int[] {10000, 10000}, //Output Chance + 20 * 120, + 480*4); + + + //Wood's Glass Laser Lens + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(5), + ItemList.Shape_Mold_Ball.get(0), + ELEMENT.getInstance().BARIUM.getDust(1), + ELEMENT.getInstance().SODIUM.getDust(1), + ELEMENT.getInstance().SILICON.getDust(2), + ELEMENT.getInstance().NICKEL.getDust(1), + ItemUtils.getItemStackOfAmountFromOreDict("dustGlass", 5) + }, + FluidUtils.getUUM(1000), + null, + new ItemStack[] { + GregtechItemList.Laser_Lens_WoodsGlass.get(1) + }, + new int[] {10000}, + 20 * 300, + (int) GT_Values.V[3]); + + + + } + + private static void fluidcannerRecipes() { + // Sulfuric Acid + CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), + ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), + null); + CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), + ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250)); + + + + // Hydrofluoric Acid + boolean addedGtExtraction = false; + // Try use Internal GT Fluid first + if (Utils.getGregtechVersionAsInt() >= 50929) { + // Hydrofluoric Acid + CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), + ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), + FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 250), null); + addedGtExtraction = CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), + ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 250)); + } + //Add a Fill recipe for GT++ Acid + CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), + ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), + FluidUtils.getFluidStack("hydrofluoricacid", 125), null); + //Add an empty recipe, but only if we didn't for the standard GT HF. Prevents Fluid transformation exploits. + if (!addedGtExtraction) { + CORE.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 125)); + } + + //Gelid Cryotheum + CORE.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustCryotheum", 1), FluidUtils.getFluidStack("cryotheum", 250), 200, 240); + + //Ender Fluid + CORE.RA.addFluidExtractionRecipe(ItemUtils.getSimpleStack(Items.ender_pearl), FluidUtils.getFluidStack("ender", 250), 100, 30); + + //Blazing Pyrotheum + CORE.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), FluidUtils.getFluidStack("pyrotheum", 250), 200, 240); + + + } + + private static void cokeOvenRecipes() { + Logger.INFO("Loading Recipes for Industrial Coking Oven."); + // Wood to Charcoal + //Try use all woods found + ArrayList aLogData = OreDictionary.getOres("logWood"); + if (aLogData.isEmpty()) { + AddGregtechRecipe.addCokeAndPyrolyseRecipes(GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 20L), 20, + GT_ModHandler.getSteam(1000), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 24L), + FluidUtils.getFluidStack("fluid.coalgas", 1440), 60, 30); } + else { + for (ItemStack stack : aLogData) { + AddGregtechRecipe.addCokeAndPyrolyseRecipes(ItemUtils.getSimpleStack(stack, 20), 20, + GT_ModHandler.getSteam(1000), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 24L), + FluidUtils.getFluidStack("fluid.coalgas", 1440), 60, 30); + } + } + + // Coal to Coke + AddGregtechRecipe.addCokeAndPyrolyseRecipes(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16L), 22, + GT_ModHandler.getSteam(1000), ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 10), + FluidUtils.getFluidStack("fluid.coalgas", 2880), 30, 120); + + // Coke & Coal + CORE.RA.addCokeOvenRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 12L), + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 6), GT_ModHandler.getSteam(2000), + FluidUtils.getFluidStack("fluid.coalgas", 5040), + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 14), 60 * 20, 240); + + } + + private static void matterFabRecipes() { + Logger.INFO("Loading Recipes for Matter Fabricator."); + + try { + + CORE.RA.addMatterFabricatorRecipe(Materials.UUAmplifier.getFluid(1L), // Fluid + // Input + Materials.UUMatter.getFluid(1L), // Fluid Output + 800, // Time in ticks + 32); // EU + } + catch (final NullPointerException e) { + Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + try { + + CORE.RA.addMatterFabricatorRecipe(null, // Fluid Input + Materials.UUMatter.getFluid(1L), // Fluid Output + 3200, // Time in ticks + 32); // EU + } + catch (final NullPointerException e) { + Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + + } + + private static void dehydratorRecipes() { + Logger.INFO("Loading Recipes for Chemical Dehydrator."); + + + ItemStack cropGrape = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cropGrape", 1); + ItemStack foodRaisins = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foodRaisins", 1); + + if (cropGrape != null && foodRaisins != null) + CORE.RA.addDehydratorRecipe(new ItemStack[] { + CI.getNumberedBioCircuit(20), + cropGrape + }, // Item + null, // Fluid input (slot 1) + null, // Fluid output (slot 2) + new ItemStack[] { + foodRaisins + }, // Output + new int[] { 10000 }, + 10, // Time in ticks + 2); // EU + + + + // Process Waste Water + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(21) + }, + FluidUtils.getFluidStack("fluid.sludge", 1000), + FluidUtils.getFluidStack("nitricacid", 10), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyIron", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCopper", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyTin", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyNickel", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCobalt", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyAluminium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinySilver", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyGold", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyIridium", 1) }, + new int[] { 10, 5, 5, 4, 4, 3, 2, 2, 1 }, + 2 * 20, + 500); // EU + + // CaF2 + H2SO4 → CaSO4(solid) + 2 HF + FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 16000); + if (aGregtechHydro == null) { + aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid", 16000); + } + + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(5), + ItemUtils.getItemStackOfAmountFromOreDict("dustFluorite", 37), + }, + FluidUtils.getFluidStack("sulfuricacid", 56 * 144), + aGregtechHydro, // Fluid output (slot 2) + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumSulfate", 30), + ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 2) + }, + new int[] { 10000, 100, 100, 300, 200 }, + 10 * 60 * 20, + 230); // EU + + + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + CI.emptyCells(3) + }, + FluidUtils.getFluidStack("fluid.ethylbenzene", 1000), + null, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellStyrene", 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2) + }, + new int[] {10000, 10000}, + 3 * 20, + 30); + + /* + * Try Add custom Recipe for drying leather + */ + if (LoadedMods.PamsHarvestcraft && Loader.isModLoaded("Backpack")) { + ItemStack aLeather1, aLeather2; + aLeather1 = ItemUtils.getCorrectStacktype("harvestcraft:hardenedleatherItem", 1); + aLeather2 = ItemUtils.getCorrectStacktype("Backpack:tannedLeather", 1); + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + aLeather1 + }, + FluidUtils.getFluidStack("fluid.ethylbenzene", 1000), + null, + new ItemStack[] { + aLeather2 + }, + new int[] {10000}, + 5 * 20, + 180); + } + + } + + private static void largeChemReactorRecipes() { + //Styrene + CORE.RA.addMultiblockChemicalRecipe( + new ItemStack[]{CI.getNumberedCircuit(24)}, + new FluidStack[]{ + FluidUtils.getFluidStack("fluid.ethylbenzene", 1000) + }, + new FluidStack[]{ + MaterialUtils.getMaterial("Styrene").getFluid(1000), + Materials.Hydrogen.getGas(2000) + }, + null, + 30, + 30); + //Short-cut Styrene + CORE.RA.addMultiblockChemicalRecipe( + new ItemStack[]{CI.getNumberedCircuit(24)}, + new FluidStack[]{ + MaterialUtils.getMaterial("Ethylene").getGas(500), + MaterialUtils.getMaterial("Benzene").getFluid(500) + }, + new FluidStack[]{ + MaterialUtils.getMaterial("Styrene").getFluid(500), + Materials.Hydrogen.getGas(1000) + }, + null, + 240, + 120); + } + + private static void fissionFuelRecipes() { + try { + + } + catch (final NullPointerException e) { + Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + } + + private static void assemblerRecipes() { + // ItemUtils.getSimpleStack(GregtechItemList.Casing_Vanadium_Redox.get(1) + addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateVanadium", 32), + ItemUtils.getItemStackOfAmountFromOreDict("frameGtVanadiumSteel", 8), + FluidUtils.getFluidStack("oxygen", 8000), + ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 0, 4), 16, 60); + addAR(ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 0, 2), + ItemUtils.getItemStackOfAmountFromOreDict("plateVanadiumGallium", 8), + FluidUtils.getFluidStack("molten.tantalum", 144 * 4), + ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 1, 8), 32, 120); + addAR(ItemUtils.simpleMetaStack(ModItems.itemHalfCompleteCasings, 1, 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseLead", 4), FluidUtils.getFluidStack("oxygen", 16000), + ItemUtils.getSimpleStack(GregtechItemList.Casing_Vanadium_Redox.get(1), 1), 64, 240); + + //Tier 2-6 + ItemStack T1 = GregtechItemList.Casing_Vanadium_Redox.get(1); + ItemStack T2 = GregtechItemList.Casing_Vanadium_Redox_IV.get(1); + ItemStack T3 = GregtechItemList.Casing_Vanadium_Redox_LuV.get(1); + ItemStack T4 = GregtechItemList.Casing_Vanadium_Redox_ZPM.get(1); + ItemStack T5 = GregtechItemList.Casing_Vanadium_Redox_UV.get(1); + ItemStack T6 = GregtechItemList.Casing_Vanadium_Redox_MAX.get(1); + + addAR(T1, + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseTitanium", 4), + FluidUtils.getFluidStack("nitrogen", 16000), + T2, 120, 2000); + addAR(T2, + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseTungstenSteel", 4), + FluidUtils.getFluidStack("helium", 8000), + T3, 250, 8000); + addAR(T3, + ItemUtils.getItemStackOfAmountFromOreDict("plateAlloyIridium", 16), + FluidUtils.getFluidStack("argon", 4000), + T4, 500, 32000); + addAR(T4, + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseNaquadah", 4), + FluidUtils.getFluidStack("radon", 4000), + T5, 1000, 128000); + addAR(T5, + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseAmericium", 4), + FluidUtils.getFluidStack("krypton", 500), + T6, 2000, 512000); + + addAR(ItemUtils.getItemStackOfAmountFromOreDict( + "dustClay", 32), + GregtechItemList.Bomb_Cast_Mold.get(0), + FluidUtils.getWater(4000), + GregtechItemList.Bomb_Cast.get(4), + 30, 120); + addAR(ItemUtils.getSimpleStack(Items.redstone, 32), + ItemUtils.getSimpleStack(ModItems.itemRope, 16), + Materials.Glue.getFluid(500), + ItemUtils.getSimpleStack(ModItems.itemDetCable, 24), + 30, + 120); + + + + /*addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateIncoloy020", 16), + ItemUtils.getItemStackOfAmountFromOreDict("frameGtIncoloyMA956", 4), null, + GregtechItemList.Casing_Power_SubStation.get(4), 80, 120);*/ + + + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + GregtechItemList.Casing_Multi_Use.get(1), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8), + CI.sensor_HV, + CI.emitter_HV, + CI.fieldGenerator_HV, + }, + null, + ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame), + 20*20, + 2048); + + + + + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(ModItems.itemRope, 6)}, null, ItemUtils.getSimpleStack(ModBlocks.blockNet, 2), 1*20, 8); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(CI.explosiveITNT, 2), ItemUtils.getSimpleStack(CI.explosiveTNT, 4), ELEMENT.getInstance().SULFUR.getDust(2), ELEMENT.getInstance().IRON.getFrameBox(1)}, null, ItemUtils.getSimpleStack(ModBlocks.blockMiningExplosive, 3), 5*20, 60); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(Items.nether_star), ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 8), ItemUtils.getItemStackOfAmountFromOreDict("stickBlackSteel", 8)}, null, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard, 32), 30*20, 500); + + + ItemStack aFluidReg1 = ItemUtils.getValueOfItemList("FluidRegulator_LV", ItemList.Pump_LV).get(1); + ItemStack aFluidReg2 = ItemUtils.getValueOfItemList("FluidRegulator_MV", ItemList.Pump_MV).get(1); + ItemStack aFluidReg3 = ItemUtils.getValueOfItemList("FluidRegulator_HV", ItemList.Pump_HV).get(1); + ItemStack aFluidReg4 = ItemUtils.getValueOfItemList("FluidRegulator_EV", ItemList.Pump_EV).get(1); + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + aFluidReg1, + CI.electricMotor_LV, + CI.getTieredComponent(OrePrefixes.bolt, 1, GTNH ? 8 : 4), + ItemUtils.getItemStackOfAmountFromOreDict("ringBrass", 1), + ItemUtils.getItemStackOfAmountFromOreDict("stickBrass", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateSteel", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1), 10*20, 30); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + aFluidReg2, + CI.electricMotor_MV, + CI.getTieredComponent(OrePrefixes.bolt, 2, GTNH ? 8 : 4), + ItemUtils.getItemStackOfAmountFromOreDict("ringInvar", 1), + ItemUtils.getItemStackOfAmountFromOreDict("stickInvar", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateAluminium", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1), 10*20*2, 120); + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + aFluidReg3, + CI.electricMotor_HV, + CI.getTieredComponent(OrePrefixes.bolt, 3, GTNH ? 8 : 4), + ItemUtils.getItemStackOfAmountFromOreDict("ringChrome", 1), + ItemUtils.getItemStackOfAmountFromOreDict("stickChrome", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateStainlessSteel", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), 10*20*3, 480); + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + aFluidReg4, + CI.electricMotor_EV, + CI.getTieredComponent(OrePrefixes.bolt, 4, GTNH ? 8 : 4), + ItemUtils.getItemStackOfAmountFromOreDict("ringTitanium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("stickTitanium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 2) + }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), 10*20*4, 1960); + + GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1000, 1), 30, 30); + GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1001, 1), 120, 120); + GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1002, 1), 480, 480); + GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1003, 1), 1820, 1820); + + + + + + //Low tier Charge Packs + + final ItemStack[] aPackBatteries = new ItemStack[] { + ItemList.Battery_RE_LV_Lithium.get(4), + ItemList.Battery_RE_MV_Lithium.get(4), + ItemList.Battery_RE_HV_Lithium.get(4), + GregtechItemList.Battery_RE_EV_Lithium.get(4), + ItemList.Energy_LapotronicOrb.get(4), + }; + final ItemStack[] aPackPlates = new ItemStack[] { + CI.getPlate(1,8), + CI.getPlate(2,8), + CI.getPlate(3,8), + CI.getPlate(4,8), + CI.getPlate(5,8), + }; + final ItemStack[] aPackWire = new ItemStack[] { + CI.getTieredComponent(OrePrefixes.wireGt02, 1,6), + CI.getTieredComponent(OrePrefixes.wireGt04, 2,6), + CI.getTieredComponent(OrePrefixes.wireGt08, 3,6), + CI.getTieredComponent(OrePrefixes.wireGt12, 4,6), + CI.getTieredComponent(OrePrefixes.wireGt16, 5,6), + }; + final ItemStack[] aPackCircuit = new ItemStack[] { + CI.getTieredComponent(OrePrefixes.circuit, 1,4), + CI.getTieredComponent(OrePrefixes.circuit, 2,4), + CI.getTieredComponent(OrePrefixes.circuit, 3,4), + CI.getTieredComponent(OrePrefixes.circuit, 4,4), + CI.getTieredComponent(OrePrefixes.circuit, 5,4), + }; + final ItemStack[] aPackRing = new ItemStack[] { + CI.getTieredComponent(OrePrefixes.ring, 1,12), + CI.getTieredComponent(OrePrefixes.ring, 2,12), + CI.getTieredComponent(OrePrefixes.ring, 3,12), + CI.getTieredComponent(OrePrefixes.ring, 4,12), + CI.getTieredComponent(OrePrefixes.ring, 5,12), + }; + final ItemStack[] aPackOutput = new ItemStack[] { + ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_1), + ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_2), + ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_3), + ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_4), + ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_5) + }; + + for (int i = 1; i < 6; i++) { + + int aAS = i-1; + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + aPackPlates[aAS], + aPackRing[aAS], + aPackWire[aAS], + aPackCircuit[aAS], + aPackBatteries[aAS], + CI.getSensor(i, GTNH ? 4 : 2), + }, + CI.getTieredFluid(i, (144 * (GTNH ? 4 : 2))), + aPackOutput[aAS], + 30 * 20 * i, + (int) GT_Values.V[i]); + } + + + if (!GTNH) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32); + + } else { + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32); + } + } + + + if (LoadedMods.Baubles) { + + + + // Turbine Housing Research Page + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + ItemUtils.getGregtechCircuit(17), + ItemUtils.getItemStackOfAmountFromOreDict("plateRefinedTrinium", GTNH ? 64 : 32), + CI.getSensor(6, GTNH ? 6 : 3), + CI.getBolt(7, GTNH ? 64 : 32), + ItemUtils.getItemStackOfAmountFromOreDict("wireFinePlatinum", GTNH ? 64 : 32), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(7), GTNH ? 12 : 6) + }, + CI.getAlternativeTieredFluid(7, 144 * 32), + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_8_TURBINE_AUTOMATION, 1), + 20 * 60 * 5, + (int) GT_Values.V[6]); + + // Cloaking Device Research Page + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + ItemUtils.getGregtechCircuit(17), + ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR, 4), + CI.getFieldGenerator(6, GTNH ? 16 : 8), + ItemUtils.getItemStackOfAmountFromOreDict("wireFinePalladium", GTNH ? 32 : 16), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), GTNH ? 12 : 6) + }, + CI.getAlternativeTieredFluid(7, 144 * 32), + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_9_CLOAKING, 1), + 20 * 60 * 10, + (int) GT_Values.V[7]); + + + // Supreme Pizza Gloves + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + ItemUtils.getGregtechCircuit(19), + ItemUtils.getSimpleStack(ModItems.itemRope, GTNH ? 32 : 16), + ItemUtils.getItemStackOfAmountFromOreDict("gearGtSmallWroughtIron", GTNH ? 8 : 4), + ItemUtils.getItemStackOfAmountFromOreDict("wireFineCopper", GTNH ? 32 : 16), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(1), GTNH ? 2 : 1) + }, + FluidUtils.getFluidStack("molten.rubber", 2000), + ItemUtils.getSimpleStack(ModItems.itemPersonalFireProofDevice), + 20 * 60 * 5, + 30); + } + + + + + + } + + private static boolean addAR(final ItemStack inputA, final ItemStack inputB, final FluidStack inputFluidA, + final ItemStack outputA, final int seconds, final int voltage) { + // return GT_Values.RA.addAssemblerRecipe(inputA, inputB, outputA, + // seconds*20, voltage); + return GT_Values.RA.addAssemblerRecipe(inputA, inputB, inputFluidA, outputA, seconds * 20, voltage); + } + + private static void distilleryRecipes() { + Logger.INFO("Registering Distillery/Distillation Tower Recipes."); + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), + FluidUtils.getFluidStack("air", 1000), FluidUtils.getFluidStack("helium", 1), 400, 30, false); + GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("air", 20000), + FluidUtils.getFluidStackArray("helium", 25), ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob, 1), + 200, 60); + + // Apatite Distillation + /* + * so if you dissolve aparite in sulphuric acid you'll get a mixture of + * SO2, H2O, HF and HCl + */ + final FluidStack[] apatiteOutput = { FluidUtils.getFluidStack("sulfurousacid", 3800), + FluidUtils.getFluidStack("hydrogenchloride", 1000), FluidUtils.getFluidStack("hydrofluoricacid", 400) }; + GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfuricapatite", 5200), apatiteOutput, null, + 45 * 20, 256); + + final FluidStack[] sulfurousacidOutput = { FluidUtils.getFluidStack("sulfurdioxide", 500), + FluidUtils.getFluidStack("water", 500) }; + GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfurousacid", 1000), sulfurousacidOutput, + null, 10 * 20, 60); + + final FluidStack[] sulfurdioxideOutput = { FluidUtils.getFluidStack("oxygen", 144 * 2) }; + GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfurdioxide", 144 * 3), sulfurdioxideOutput, + ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), 5 * 20, 30); + } + + private static void addFuels() { + Logger.INFO("Registering New Fuels."); + + if (!GTNH) { + GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketFire_water", 0, 1), null, 120, 0); + GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketRocket_fuel", 0, 1), null, 112, 0); + GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketHootch", 0, 1), null, 36, 0); + } + + HotFuel.addNewHotFuel(GT_ModHandler.getLava(83), GT_Values.NF, + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("nuggetCopper", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetTin", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetGold", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetSilver", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetTantalum", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTungstate", 1), + ItemUtils.getSimpleStack(Blocks.obsidian) }, + new int[] { 2000, 1000, 250, 250, 250, 250, 500 }, 0); + + HotFuel.addNewHotFuel(FluidUtils.getFluidStack("ic2pahoehoelava", 83), GT_Values.NF, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("nuggetBronze", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetElectrum", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetTantalum", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTungstate", 1), + ItemUtils.getSimpleStack(Blocks.obsidian) }, + new int[] { 750, 250, 250, 250, 1850 }, 0); + + /* + * HotFuel.addNewHotFuel( FluidUtils.getFluidStack("ic2hotcoolant", + * 100), GT_Values.NF, new ItemStack[]{}, new int[]{}, 0); + */ + + ThermalFuel.addSteamTurbineFuel(FluidUtils.getFluidStack("steam", 1024)); + + // CORE.RA.addFuel(UtilsItems.simpleMetaStack("EnderIO:bucketRocket_fuel", + // 0, 1), null, 112, 0); + GT_Values.RA.addFuel(ItemUtils.getSimpleStack(Items.lava_bucket), null, 32, 2); + GT_Values.RA.addFuel(ItemUtils.getIC2Cell(2), null, 32, 2); + GT_Values.RA.addFuel(ItemUtils.getIC2Cell(11), null, 24, 2); + // System.exit(1); + } + + private static void extractorRecipes() { + Logger.INFO("Registering Extractor Recipes."); + GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Sodium.get(1L, new Object[0]), + ItemList.Battery_Hull_HV.get(4L, new Object[0])); + GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Cadmium.get(1L, new Object[0]), + ItemList.Battery_Hull_HV.get(4L, new Object[0])); + GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Lithium.get(1L, new Object[0]), + ItemList.Battery_Hull_HV.get(4L, new Object[0])); + } + + private static void fluidExtractorRecipes() { + + } + + private static void chemicalBathRecipes() { + + GT_Values.RA.addChemicalBathRecipe( + FLUORIDES.FLUORITE.getCrushed(2), + FluidUtils.getFluidStack("hydrogen", 2000), + FLUORIDES.FLUORITE.getCrushedPurified(8), + FLUORIDES.FLUORITE.getDustImpure(4), + FLUORIDES.FLUORITE.getDustPurified(2), + new int[] { 10000, 5000, 1000 }, + 30 * 20, + 240); + + } + + private static void centrifugeRecipes() { + + } + + private static void mixerRecipes() { + + GT_Values.RA.addMixerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), + null, + null, + null, + FluidUtils.getFluidStack("oxygen", 2000), + FluidUtils.getFluidStack("sulfurdioxide", 3000), + null, + 600, + 60); + + } + + private static void chemicalReactorRecipes() { + + //Bombs + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4), + ItemUtils.getSimpleStack(RocketFuels.Ammonium_Nitrate_Dust, 8), + Materials.Fuel.getFluid(1000), + null, + ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), + 300 * 20); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), + ItemUtils.getSimpleStack(ModItems.itemDetCable, 4), + FluidUtils.getFluidStack(RocketFuels.Kerosene, 100), + null, + ItemUtils.getSimpleStack(ModItems.itemBomb, 4), + 10 * 20); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 16), + null, + FluidUtils.getFluidStack("sulfuricacid", 144 * 32), + FluidUtils.getFluidStack("sulfuricapatite", 144 * 8), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 1), + 20 * 20); + + ItemStack temp_GT5u_SA = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellHydrofluoricAcid_GT5U", 5); + if (temp_GT5u_SA != null) { + //Refine GT HF into GT++ HF + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2), + temp_GT5u_SA, + null, // Fluid Input + FluidUtils.getFluidStack("hydrofluoricacid", 6000), // Fluid Output + CI.emptyCells(7), + 2 * 20); + } + + } + + private static void blastFurnaceRecipes() { + + //public boolean addBlastRecipe( + //ItemStack aInput1, ItemStack aInput2, + //FluidStack aFluidInput, FluidStack aFluidOutput, + //ItemStack aOutput1, ItemStack aOutput2, + //int aDuration, int aEUt, int aLevel) + + + //Synthetic Graphite + GT_Values.RA.addBlastRecipe( + CI.getNumberedCircuit(22), + ALLOY.SILICON_CARBIDE.getDust(16), + ELEMENT.getInstance().NITROGEN.getFluidStack(4000), + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustGraphite", 8), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSilicon", 8), + 60 * 20, + MaterialUtils.getVoltageForTier(GTNH ? 5 : 4), + 4500); + + //Bomb Casings + GT_Values.RA.addBlastRecipe( + GregtechItemList.Bomb_Cast.get(4), + ALLOY.STEEL.getDust(16), + ELEMENT.getInstance().OXYGEN.getFluidStack(2000), + GT_Values.NF, + GregtechItemList.Bomb_Cast_Molten.get(4), + null, + 4 * 60 * 20, + MaterialUtils.getVoltageForTier(GTNH ? 3 : 2), + 2800); + + //Krypton Processing + if (ModItems.itemHotTitaniumIngot != null) { + GT_Values.RA.addBlastRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("ingotTitanium", 1), + CI.getNumberedCircuit(16), + GT_Values.NF, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("ingotHotTitanium", 1), + null, + 10 * 20, + 500, + Materials.Titanium.mBlastFurnaceTemp); + } + + } + + private static void autoclaveRecipes() { + + } + + private static void benderRecipes() { + + if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation) { + GT_Values.RA.addBenderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("ingotVanadium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("plateVanadium", 1), 8, 16); + } + } + + private static void compressorRecipes() { + GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustSmallClay", 4), + ItemUtils.getItemStackOfAmountFromOreDict("plateClay", 1)); + GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustSmallMeatRaw", 4), + ItemUtils.getItemStackOfAmountFromOreDict("plateMeatRaw", 1)); + GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9), + ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1)); + + CORE.RA.addCompressorRecipe(ItemList.FusionComputer_UV.get(9), GregtechItemList.Compressed_Fusion_Reactor.get(1), (int) GT_Values.V[7], (int) GT_Values.V[8]); + } + + private static void macerationRecipes() { + + GT_ModHandler.addPulverisationRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9)); + + GT_ModHandler.addPulverisationRecipe(GregtechItemList.Bomb_Cast_Broken.get(1), + ItemUtils.getItemStackOfAmountFromOreDict("dustClay", 3)); + + if (ItemUtils.simpleMetaStack("chisel:limestone", 0, 1) != null) { + GT_ModHandler.addPulverisationRecipe(ItemUtils.getItemStackOfAmountFromOreDict("limestone", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustCalcite", 4)); + } + + } + + private static void cyclotronRecipes() { + + // Polonium + CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.bismuth", 1), + new ItemStack[] { GregtechItemList.Pellet_RTG_PO210.get(1) }, null, new int[] { 100 }, 20 * 300 * 100, 2040 * 4, + 500 * 20); + + // Americium + CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.americium", 1), + new ItemStack[] { GregtechItemList.Pellet_RTG_AM241.get(4) }, null, new int[] { 2500 }, 20 * 300 * 100, 1020 * 4, + 500 * 20); //PO Special Value + + // Strontium u235 + CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium235", 10), + new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 570 }, 20 * 300 * 100, 1020 * 4, + 500 * 20); //PO Special Value + + // Strontium u233 + CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium233", 10), + new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 660 }, 20 * 300 * 100, 1020 * 4, + 500 * 20); //PO Special Value + + // Strontium pu239 + CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium239", 10), + new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 220 }, 20 * 300 * 100, 1020 * 4, + 500 * 20); //PO Special Value + + // Plutonium + CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium238", 1), + new ItemStack[] { GregtechItemList.Pellet_RTG_PU238.get(2) }, null, new int[] { 780 }, 20 * 300 * 100, 1020 * 4, + 500 * 20); //PO Special Value + + // Neptunium + CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400), + new ItemStack[] {ItemUtils.getSimpleStack(ModItems.dustNeptunium238)}, null, new int[] { 500 }, 20 * 5, 500 * 4, + 500 * 20); //PO Special Value + + + /** + * Particle Science + */ + + + // Quark Smash + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(3), + FluidUtils.getFluidStack("plasma.hydrogen", 100), + new ItemStack[] { + Particle.getBaseParticle(Particle.UP), + Particle.getBaseParticle(Particle.DOWN), + Particle.getBaseParticle(Particle.CHARM), + Particle.getBaseParticle(Particle.STRANGE), + Particle.getBaseParticle(Particle.TOP), + Particle.getBaseParticle(Particle.BOTTOM), + }, + null, + new int[] { 50, 50, 50, 50, 50, 50 }, + 20 * 300 * 9, + (int) MaterialUtils.getVoltageForTier(7), + 750 * 20); + + // Lepton Smash + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(6), + FluidUtils.getFluidStack("plasma.helium", 1500), + new ItemStack[] { + Particle.getBaseParticle(Particle.ELECTRON), + Particle.getBaseParticle(Particle.MUON), + Particle.getBaseParticle(Particle.TAU), + Particle.getBaseParticle(Particle.ELECTRON_NEUTRINO), + Particle.getBaseParticle(Particle.MUON_NEUTRINO), + Particle.getBaseParticle(Particle.TAU_NEUTRINO), + }, + null, + new int[] { 600, 40, 20, 15, 10, 5 }, + 20 * 300 * 8, + (int) MaterialUtils.getVoltageForTier(7), + 750 * 20); + + // Boson Smash + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(9), + FluidUtils.getFluidStack("plasma.helium", 1500), + new ItemStack[] { + Particle.getBaseParticle(Particle.GLUON), + Particle.getBaseParticle(Particle.PHOTON), + Particle.getBaseParticle(Particle.Z_BOSON), + Particle.getBaseParticle(Particle.W_BOSON), + Particle.getBaseParticle(Particle.HIGGS_BOSON), + }, + null, + new int[] { 160, 260, 150, 150, 1 }, + 20 * 300 * 6, + (int) MaterialUtils.getVoltageForTier(7), + 750 * 20); + + + // Mixed Smash 1 + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(12), + FluidUtils.getFluidStack("plasma.beryllium", 2500), + new ItemStack[] { + Particle.getBaseParticle(Particle.GRAVITON), + Particle.getBaseParticle(Particle.ETA_MESON), + Particle.getBaseParticle(Particle.PION), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.NEUTRON), + Particle.getBaseParticle(Particle.LAMBDA), + Particle.getBaseParticle(Particle.OMEGA), + Particle.getBaseParticle(Particle.HIGGS_BOSON), + }, + null, + new int[] { 10, 20, 20, 10, 10, 5, 5, 2 }, + 17 * 247 * 32, + (int) MaterialUtils.getVoltageForTier(8), + 750 * 20); + + // Graviton Smash + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(15), + FluidUtils.getFluidStack("plasma.hydrogen", GTNH ? 50 : 10), + new ItemStack[] { + Particle.getBaseParticle(Particle.GRAVITON), + Particle.getBaseParticle(Particle.UNKNOWN) + }, + null, + new int[] {15, 100}, + 20 * (GTNH ? 90 : 30), + (int) MaterialUtils.getVoltageForTier(6), + 1000 * 20); + + FluidStack aPlasma = Materials.Duranium.getMolten(GTNH ? 40 : 10); + FluidStack aPlasma_NULL = Materials._NULL.getPlasma(1); + + if (aPlasma == null || aPlasma.isFluidEqual(aPlasma_NULL)) { + aPlasma = Materials.Americium.getMolten(GTNH ? 20 : 5); + } + + // Quantum Anomaly + CORE.RA.addCyclotronRecipe( + new ItemStack[] { + CI.getNumberedCircuit(24), + Particle.getBaseParticle(Particle.UNKNOWN), + }, + aPlasma, + new ItemStack[] { + GregtechItemList.Laser_Lens_Special.get(1) + }, + null, + new int[] {100}, + 20 * (GTNH ? 300 : 60), + (int) MaterialUtils.getVoltageForTier(6), + 1000 * 20); + + /* + * Ions + */ + + int IonCount = 2; + int tenCountA = (GTNH ? 2 : 1); + int tenCountB = 0; + for (String y : IonParticles.MetaToNameMap.values()) { + if (y.toLowerCase().contains("hydrogen")) { + continue; + } + FluidStack aPlasma2 = FluidUtils.getFluidStack("plasma."+y.toLowerCase(), 2); + Materials aTestMat = MaterialUtils.getMaterial(y); + FluidStack aPlasma3 = aTestMat != null ? aTestMat.getPlasma(2) : aPlasma2; + + // Ionize Plasma + if ((aPlasma2 != null && !aPlasma2.isFluidEqual(aPlasma_NULL)) || (aPlasma3 != null && !aPlasma3.isFluidEqual(aPlasma_NULL))) { + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(1+(tenCountA-1)), + aPlasma2 != null ? aPlasma2 : aPlasma3, + new ItemStack[] { + Particle.getIon(y, 1), + Particle.getIon(y, 2), + Particle.getIon(y, 3), + Particle.getIon(y, -1), + Particle.getIon(y, -2), + Particle.getIon(y, -3), + Particle.getIon(y, 1), + Particle.getIon(y, 2), + Particle.getIon(y, -1), + }, + null, + new int[] { 275, 250, 225, 275, 250, 225, 275, 250, 275}, + 20 * 20 * (IonCount++) * tenCountA, + (int) MaterialUtils.getVoltageForTier(7), + 1500 * 20 * tenCountA); + } + else { + Logger.INFO("Plasma for "+y+" does not exist, please report this to Alkalus."); + } + + if (tenCountB == 12) { + tenCountB = 0; + tenCountA++; + } + else { + tenCountB++; + } + } + + // Generate Hydrogen Ion Recipe + CORE.RA.addCyclotronRecipe( + CI.getNumberedCircuit(24), + FluidUtils.getWildcardFluidStack("hydrogen", 1000), + new ItemStack[] { + Particle.getIon("Hydrogen", 1), + Particle.getIon("Hydrogen", 2), + Particle.getIon("Hydrogen", 3), + Particle.getIon("Hydrogen", 1), + Particle.getIon("Hydrogen", 2), + Particle.getIon("Hydrogen", 3), + Particle.getIon("Hydrogen", -1), + Particle.getIon("Hydrogen", -2), + Particle.getIon("Hydrogen", -3) + }, + null, + new int[] { 125, 125, 125, 125, 125, 125, 125, 125, 125 }, + 20 * 20, + (int) MaterialUtils.getVoltageForTier(6), + 15000); + + // Generate Hydrogen Plasma Recipe + CORE.RA.addCyclotronRecipe( + new ItemStack[] { + Particle.getIon("Hydrogen", 0), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1) + }, + null, + new ItemStack[] { + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.NEUTRON), + Particle.getBaseParticle(Particle.ELECTRON), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + CI.emptyCells(1) + }, + FluidUtils.getFluidStack("plasma.hydrogen", 1), + new int[] { 250, 250, 250, 500, 500, 500, 10000 }, + 20 * 60 * 2, + (int) MaterialUtils.getVoltageForTier(6), + 750 * 20); + + + // Generate Protons Easily + CORE.RA.addCyclotronRecipe( + new ItemStack[] { + CI.getNumberedCircuit(20), + Particle.getIon("Hydrogen", 0) + }, + FluidUtils.getWildcardFluidStack("hydrogen", 100), + new ItemStack[] { + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + }, + null, + new int[] { 750, 750, 750, 750, 750, 750, 750, 750, 750 }, + 20 * 20, + (int) MaterialUtils.getVoltageForTier(6), + 15000); + + CORE.RA.addCyclotronRecipe( + new ItemStack[] { + CI.getNumberedCircuit(22), + Particle.getBaseParticle(Particle.UNKNOWN), + }, + FluidUtils.getWildcardFluidStack("hydrogen", 100), + new ItemStack[] { + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.PROTON), + }, + null, + new int[] { 375, 375, 375, 375, 375, 375, 375, 375, 375 }, + 20 * 20, + (int) MaterialUtils.getVoltageForTier(6), + 15000); + + + //Create Strange Dust + CORE.RA.addCyclotronRecipe( + new ItemStack[] { + ELEMENT.getInstance().PLUTONIUM238.getDust(1), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + Particle.getBaseParticle(Particle.UNKNOWN), + }, + FluidUtils.getFluidStack(FluidUtils.getWildcardFluidStack("ender", 1000), 1000), + new ItemStack[] { + ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT.getDust(1) + }, + null, + new int[] { 2500 }, + 20 * 60 * 15, + (int) MaterialUtils.getVoltageForTier(7), + 15000); + + + + + + } + + private static void sifterRecipes() { + + } + + private static void electroMagneticSeperatorRecipes() { + + if (!GTNH) { + // Trinium + GT_Values.RA.addElectromagneticSeparatorRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedNaquadah", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustNaquadah", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallNaquadahEnriched", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 }, + 20 * 20, 24); + + // Trinium + GT_Values.RA.addElectromagneticSeparatorRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIridium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallOsmium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 }, + 20 * 20, 24); + + // Trinium + GT_Values.RA.addElectromagneticSeparatorRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedWulfenite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustWulfenite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 3000, 3000 }, + 20 * 20, 24); + } + + } + + private static void advancedMixerRecipes() { + // HgBa2Ca2Cu3O8 + /*CORE.RA.addMixerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellMercury", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustBarium", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustCalcium", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 3), + FluidUtils.getFluidStack("oxygen", 8000), + null, CI.emptyCells(1), ALLOY.HG1223.getDust(16), null, null, + 30 * 20, 500); */ + + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java new file mode 100644 index 0000000000..08d8dda039 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java @@ -0,0 +1,509 @@ +package gtPlusPlus.core.recipe; + +import static gtPlusPlus.core.lib.CORE.GTNH; +import static gtPlusPlus.core.recipe.common.CI.bitsd; +import static gtPlusPlus.core.util.minecraft.ItemUtils.getSimpleStack; +import static gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits.generatePipeRecipes; +import static gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits.generateWireRecipes; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.*; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class RECIPES_General { + + static final ItemStack NULL = null; + static ItemStack RECIPE_Paper; + static ItemStack RECIPE_Dirt; + static ItemStack RECIPE_Snow; + static ItemStack RECIPE_Obsidian; + static String RECIPE_LapisDust = "dustLazurite"; + static ItemStack OUTPUT_Blueprint; + static ItemStack RECIPE_CraftingTable; + static String RECIPE_BronzePlate = "plateBronze"; + static ItemStack RECIPE_BasicCasingIC2; + static ItemStack OUTPUT_Workbench_Bronze; + static ItemStack RECIPE_HydrogenDust; + + public static void loadRecipes(){ + if (LoadedMods.Gregtech){ + RECIPE_Paper = ItemUtils.getSimpleStack(Items.paper); + RECIPE_Dirt = ItemUtils.getSimpleStack(Blocks.dirt); + RECIPE_Snow = ItemUtils.getSimpleStack(Blocks.snow); + RECIPE_Obsidian = ItemUtils.getSimpleStack(Blocks.obsidian); + RECIPE_CraftingTable = ItemUtils.getSimpleStack(Blocks.crafting_table); + RECIPE_HydrogenDust = ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob); + RECIPE_BasicCasingIC2 = ItemUtils.getItemStackFromFQRN("IC2:blockMachine", 1); + OUTPUT_Workbench_Bronze = ItemUtils.getSimpleStack(ModBlocks.blockWorkbench); + OUTPUT_Blueprint = ItemUtils.getSimpleStack(ModItems.itemBlueprintBase); + run(); + addCompressedObsidian(); + migratedRecipes(); + } + } + + private static void run() { + //Workbench Blueprint + /*RecipeUtils.addShapedRecipe( + RECIPE_Paper, RECIPE_LapisDust, NULL, + RECIPE_Paper, RECIPE_LapisDust, NULL, + RECIPE_LapisDust, RECIPE_LapisDust, NULL, + OUTPUT_Blueprint);*/ + + //Bronze Workbench + /*RecipeUtils.addShapedRecipe( + RECIPE_BronzePlate, RECIPE_CraftingTable, RECIPE_BronzePlate, + RECIPE_BronzePlate, RECIPE_BasicCasingIC2, RECIPE_BronzePlate, + RECIPE_BronzePlate, RECIPE_BronzePlate, RECIPE_BronzePlate, + OUTPUT_Workbench_Bronze);*/ + + //Generates recipes for the Dull shard when TC is not installed. + if (!LoadedMods.Thaumcraft) { + //Dull Shard to Aer + RecipeUtils.addShapedRecipe( + RECIPE_HydrogenDust, RECIPE_HydrogenDust, RECIPE_HydrogenDust, + RECIPE_HydrogenDust, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_HydrogenDust, + RECIPE_HydrogenDust, RECIPE_HydrogenDust, RECIPE_HydrogenDust, + ItemUtils.getSimpleStack(ModItems.shardAer)); + //Dull Shard to Ignis + RecipeUtils.addShapedRecipe( + RECIPE_Obsidian, RECIPE_Obsidian, RECIPE_Obsidian, + RECIPE_Obsidian, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_Obsidian, + RECIPE_Obsidian, RECIPE_Obsidian, RECIPE_Obsidian, + ItemUtils.getSimpleStack(ModItems.shardIgnis)); + //Dull Shard to Terra + RecipeUtils.addShapedRecipe( + RECIPE_Dirt, RECIPE_Dirt, RECIPE_Dirt, + RECIPE_Dirt, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_Dirt, + RECIPE_Dirt, RECIPE_Dirt, RECIPE_Dirt, + ItemUtils.getSimpleStack(ModItems.shardTerra)); + //Dull Shard to Aqua + RecipeUtils.addShapedRecipe( + RECIPE_LapisDust, RECIPE_LapisDust, RECIPE_LapisDust, + RECIPE_LapisDust, ItemUtils.getSimpleStack(ModItems.shardDull), RECIPE_LapisDust, + RECIPE_LapisDust, RECIPE_LapisDust, RECIPE_LapisDust, + ItemUtils.getSimpleStack(ModItems.shardAqua)); + + GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardAer), ItemUtils.getSimpleStack(ModItems.dustAer, 2)); + GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardIgnis), ItemUtils.getSimpleStack(ModItems.dustIgnis, 2)); + GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardTerra), ItemUtils.getSimpleStack(ModItems.dustTerra, 2)); + GT_ModHandler.addPulverisationRecipe(ItemUtils.getSimpleStack(ModItems.shardAqua), ItemUtils.getSimpleStack(ModItems.dustAqua, 2)); + + } + + //Rainforest oak Sapling + if (RecipeUtils.addShapedRecipe( + "stickWood", "stickWood", "stickWood", + "stickWood", "treeSapling", "stickWood", + "stickWood", "dustBone", "stickWood", + ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest))){ + Logger.INFO("Added a recipe for Rainforest oak Saplings."); + } + + //Iron bars + final ItemStack ironBars; + if (CORE.GTNH) { + ironBars = ItemUtils.getItemStackFromFQRN("dreamcraft:item.SteelBars", 1); + } else { + ironBars = ItemUtils.getItemStackFromFQRN("minecraft:iron_bars", 1); + } + + //Fish Trap + if (RecipeUtils.addShapedRecipe( + ironBars, ironBars, ironBars, + ironBars, "frameGtWroughtIron", ironBars, + ironBars, ironBars, ironBars, + ItemUtils.getSimpleStack(ModBlocks.blockFishTrap))){ + Logger.INFO("Added a recipe for the Fish Trap."); + } + + //Small Gear Extruder Shape + if (!CORE.GTNH) { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_SmallGear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Gear, Character.valueOf('X'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel)}); + + + String[] ironTypes = {"", "Wrought", "Pig", "Any"}; + for (int y=0;y= 2800) ? 64 : 16; + generatePipeRecipes(e.mDefaultLocalName, e.getMass(), tVoltageMultiplier); + } + + Materials[] h = new Materials[] { + Materials.Europium, + Materials.Tungsten, + Materials.DarkSteel, + Materials.Clay, + Materials.Lead, + + }; + + for (Materials e : h) { + if (e == Materials.DarkSteel) { + if (!LoadedMods.EnderIO) { + continue; + } + } + int tVoltageMultiplier = (e.mBlastFurnaceTemp >= 2800) ? 64 : 16; + generatePipeRecipes(e.mDefaultLocalName, e.getMass(), tVoltageMultiplier); + } + + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[4], "rotorGtStainlessSteel", CI.component_Plate[4], + CI.getTieredCircuitOreDictName(3), CI.machineHull_HV, CI.getTieredCircuitOreDictName(3), + CI.component_Plate[4], CI.electricPump_HV, CI.component_Plate[4], + GregtechItemList.Hatch_Air_Intake.get(1L, new Object[0])); + + RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[6], ALLOY.MARAGING250.getGear(1), CI.component_Plate[6], + CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_AdvancedVacuum.get(1), + CI.getTieredCircuitOreDictName(4), CI.component_Plate[5], ItemList.Hatch_Input_IV.get(1), + CI.component_Plate[5], GregtechItemList.Hatch_Input_Cryotheum.get(1L, new Object[0])); + + RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[5], ALLOY.MARAGING300.getGear(1), CI.component_Plate[5], + CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_Adv_BlastFurnace.get(1), + CI.getTieredCircuitOreDictName(4), CI.component_Plate[6], ItemList.Hatch_Input_IV.get(1), + CI.component_Plate[6], GregtechItemList.Hatch_Input_Pyrotheum.get(1L, new Object[0])); + + RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[8], ALLOY.PIKYONIUM.getGear(1), CI.component_Plate[9], + CI.getTieredCircuitOreDictName(7), GregtechItemList.Casing_Naq_Reactor_A.get(1), + CI.getTieredCircuitOreDictName(7), CI.component_Plate[9], ItemList.Hatch_Input_ZPM.get(1), + CI.component_Plate[8], GregtechItemList.Hatch_Input_Naquadah.get(1L, new Object[0])); + + + if (PollutionUtils.isPollutionEnabled()) { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_LV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_MV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_HV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_HV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_HV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_EV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_EV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_EV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_IV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_IV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_IV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LuV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LuV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_LuV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_ZPM.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_ZPM.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_ZPM.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_UV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_UV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_UV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MAX.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MAX.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_MAX.get(1) }); + } + + + + + + + + + + + } + + + + + + + + + +} + + diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java new file mode 100644 index 0000000000..76182e61d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java @@ -0,0 +1,135 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.*; +import gregtech.api.interfaces.IOreRecipeRegistrator; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class RECIPES_LaserEngraver implements IOreRecipeRegistrator { + public RECIPES_LaserEngraver() { + OrePrefixes.crafting.add(this); + } + + @Override + public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { + if (aOreDictName.equals(OreDictNames.craftingLensBlue.toString())) { + + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilYttriumBariumCuprate", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.YttriumBariumCuprate, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); + } + else { + Logger.INFO("foilYttriumBariumCuprate does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilVanadiumGallium", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.VanadiumGallium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); + } + else { + Logger.INFO("foilVanadiumGallium does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilNiobiumTitanium", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); + } + else { + Logger.INFO("foilNiobiumTitanium does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + } + + + } else if (aOreDictName.equals(OreDictNames.craftingLensYellow.toString())) { + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilOsmium", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_LuV.get(1L, new Object[0]), 64, 1024); + } + else { + Logger.INFO("foilOsmium does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + } + + } else if (aOreDictName.equals(OreDictNames.craftingLensCyan.toString())) { + } else if (aOreDictName.equals(OreDictNames.craftingLensRed.toString())) { + } else if (aOreDictName.equals(OreDictNames.craftingLensGreen.toString())) { + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilNaquadah", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadah, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(1L, new Object[0]), 64, 2000); + } + else { + Logger.INFO("foilNaquadah does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + } + } else if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) { + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lithium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getItemStackOfAmountFromOreDict("plateDoubleLithium7", 1), 4*60*20, 2000); + } + else { + Logger.INFO("plateLithium does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLithium", 1) != null){ + GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 3L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 1), 2*60*20, 2000); + } + else { + Logger.INFO("dustLithium does not exist within Gregtech, please report this issue to Blood-asp on github."); + Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself."); + } + + } + + else if (aOreDictName.equals(OreDictNames.craftingLensLime.toString())) { + //Coil Wires + ItemStack coilWire1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire", "coilWire1", 0, 1); + ItemStack coilWire2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:1", "coilWire2", 1, 1); + ItemStack coilWire3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:2", "coilWire3", 2, 1); + ItemStack coilWire4 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:3", "coilWire4", 3, 1); + + //Simple Life + String wire = "wireGt02"; + + //Wires to Laser + ItemStack wireT1a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Aluminium", 1); + ItemStack wireT1b = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Nichrome", 1); + ItemStack wireT2a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Osmium", 1); + ItemStack wireT2b = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Platinum", 1); + ItemStack wireT3a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"VanadiumGallium", 1); + ItemStack wireT3b = ItemUtils.getItemStackOfAmountFromOreDict(wire+"YttriumBariumCuprate", 1); + ItemStack wireT3c = ItemUtils.getItemStackOfAmountFromOreDict(wire+"NiobiumTitanium", 1); + ItemStack wireT4a = ItemUtils.getItemStackOfAmountFromOreDict(wire+"Naquadah", 1); + + //T1 + GT_Values.RA.addLaserEngraverRecipe(wireT1a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire1, 10*20, 500); + GT_Values.RA.addLaserEngraverRecipe(wireT1b, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire1, 10*20, 500); + //T2 + GT_Values.RA.addLaserEngraverRecipe(wireT2a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire2, 20*20, 2000); + GT_Values.RA.addLaserEngraverRecipe(wireT2b, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire2, 20*20, 2000); + //T3 + GT_Values.RA.addLaserEngraverRecipe(wireT3a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire3, 30*20, 8000); + GT_Values.RA.addLaserEngraverRecipe(wireT3b, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire3, 30*20, 8000); + GT_Values.RA.addLaserEngraverRecipe(wireT3c, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire3, 30*20, 8000); + //T4 + GT_Values.RA.addLaserEngraverRecipe(wireT4a, GT_Utility.copyAmount(0L, new Object[]{aStack}), coilWire4, 40*20, 32000); + + + } + + else if (aOreDictName.equals(OreDictNames.craftingLensOrange.toString())) { + GT_Values.RA.addLaserEngraverRecipe(ItemUtils.getSimpleStack(ModItems.itemAlkalusDisk), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getSimpleStack(Dimension_Everglades.portalItem), 360*60*20, 4096); + } + + + + } +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java new file mode 100644 index 0000000000..0d377f74de --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java @@ -0,0 +1,27 @@ +package gtPlusPlus.core.recipe; + +public class RECIPES_MTWRAPPER { + + public static int MT_RECIPES_LOADED = 0; + public static int MT_RECIPES_FAILED = 0; + + public static void run(){ + + } + + public static void addShaped(final Object item_Output, + final Object item_1, final Object item_2, final Object item_3, + final Object item_4, final Object item_5, final Object item_6, + final Object item_7, final Object item_8, final Object item_9){ + + + } + + public static void addShapeless(){ + + } + + + +} + diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java new file mode 100644 index 0000000000..71b4c4ef48 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java @@ -0,0 +1,410 @@ +package gtPlusPlus.core.recipe; + +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class RECIPES_MachineComponents { + + //Wire + public static String wireTier0 = "wireGt01Lead"; + public static String wireTier1 = "wireGt01RedAlloy"; + public static String wireTier6 = "wireGt08NiobiumTitanium"; + public static String wireTier7 = "wireGt08Osmium"; + public static String wireTier8 = "wireGt08Naquadah"; + public static String wireTier9 = "wireGt08Superconductor"; + public static String wireTier10 = "wireGt16Superconductor"; + + //Cable + public static String cableTier0 = "cableGt01Lead"; + public static String cableTier1 = "cableGt01RedAlloy"; + public static String cableTier6 = "cableGt04Tungsten"; + public static String cableTier7 = "cableGt04NiobiumTitanium"; + public static String cableTier8 = "cableGt04Osmium"; + public static String cableTier9 = "cableGt04Naquadah"; + public static String cableTier10 = "wireGt08Superconductor"; + + //Plates + public static String plateTier0 = "plateWroughtIron"; + public static String plateTier7 = "plateChrome"; + public static String plateTier8 = "plateIridium"; + public static String plateTier9 = "plateOsmium"; + public static String plateTier10 = "plateNeutronium"; + + //rods + public static String rodTier0 = "stickWroughtIron"; + public static String rodTier1 = "stickPotin"; + public static String rodTier2 = "stickIronMagnetic"; + public static String rodTier7a = "stickChrome"; + public static String rodTier8a = "stickIridium"; + public static String rodTier9a = "stickOsmium"; + public static String rodTier10a = "stickNeutronium"; + public static String rodTier7b = "stickPlatinum"; + public static String rodTier8b = "stickChrome"; + public static String rodTier9b = "stickIridium"; + public static String rodTier10b = "stickOsmium"; + public static String rodTier7c = "stickTitanium"; + public static String rodTier8c = "stickTungstenSteel"; + public static String rodTier9c = "stickNaquadah"; + public static String rodTier10c = "stickOsmium"; + + //Screws + public static String screwTier0 = "screwPotin"; + public static String screwTier7 = "screwChrome"; + public static String screwTier8 = "screwIridium"; + public static String screwTier9 = "screwOsmium"; + public static String screwTier10 = "screwNeutronium"; + + //Rotors + public static String rotorTier0 = "rotorPotin"; + public static String rotorTier7 = "rotorChrome"; + public static String rotorTier8 = "rotorIridium"; + public static String rotorTier9 = "rotorOsmium"; + public static String rotorTier10 = "rotorNeutronium"; + + //Fluid Pipe + public static String pipeTier0 = "pipeSmallLead"; + public static String pipeTier7 = "pipeHugeSteel"; + public static String pipeTier8 = "pipeHugeStainlessSteel"; + public static String pipeTier9 = "pipeHugeTitanium"; + public static String pipeTier10 = "pipeHugeTungstenSteel"; + + //Rubber Ring/Plate + public static String itemRubberRing = "ringRubber"; + public static String plateRubber = "plateRubber"; + + //Circuits + public static String circuitTier0 = "circuitPrimitive"; + public static String circuitTier1 = "circuitBasic"; + public static String circuitTier6 = "circuitMaster"; + public static String circuitTier7 = "circuitUltimate"; + public static String circuitTier8 = "circuitSuperconductor"; + public static String circuitTier9 = "circuitInfinite"; + public static String circuitTier10 = "circuitQuantum"; + + //small gears + public static String smallGearTier0 = "gearGtSmallWroughtIron"; + public static String smallGearTier7 = "gearGtSmallChrome"; + public static String smallGearTier8 = "gearGtSmallIridium"; + public static String smallGearTier9 = "gearGtSmallOsmium"; + public static String smallGearTier10 = "gearGtSmallNeutronium"; + + public static final void loadRecipes(){ + Logger.INFO("Loading Recipes for the Various Circuits and Machine components."); + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + run(); + } + else { + onlyULVComponents(); + if (!CORE.GTNH) { + onlyMaxComponents(); + } + } + gregtechMachinePhase(); + } + + private static void run(){ + //Electric Motors + RecipeUtils.addShapedGregtechRecipe( + cableTier7, wireTier7, rodTier7a, + wireTier7, rodTier7b, wireTier7, + rodTier7a, wireTier7, cableTier7, + CI.electricMotor_LuV); + RecipeUtils.addShapedGregtechRecipe( + cableTier8, wireTier8, rodTier8a, + wireTier8, rodTier8b, wireTier8, + rodTier8a, wireTier8, cableTier8, + CI.electricMotor_ZPM); + RecipeUtils.addShapedGregtechRecipe( + cableTier9, wireTier9, rodTier9a, + wireTier9, rodTier9b, wireTier9, + rodTier9a, wireTier9, cableTier9, + CI.electricMotor_UV); + RecipeUtils.addShapedGregtechRecipe( + cableTier10, wireTier10, rodTier10a, + wireTier10, rodTier10b, wireTier10, + rodTier10a, wireTier10, cableTier10, + CI.electricMotor_MAX); + + //Electric Pump + RecipeUtils.addShapedGregtechRecipe( + cableTier7, rotorTier7, itemRubberRing, + CI.craftingToolScrewdriver, pipeTier7, CI.craftingToolWrench, + itemRubberRing, CI.electricMotor_LuV, cableTier7, + CI.electricPump_LuV); + RecipeUtils.addShapedGregtechRecipe( + cableTier8, rotorTier8, itemRubberRing, + CI.craftingToolScrewdriver, pipeTier8, CI.craftingToolWrench, + itemRubberRing, CI.electricMotor_ZPM, cableTier8, + CI.electricPump_ZPM); + RecipeUtils.addShapedGregtechRecipe( + cableTier9, rotorTier9, itemRubberRing, + CI.craftingToolScrewdriver, pipeTier9, CI.craftingToolWrench, + itemRubberRing, CI.electricMotor_UV, cableTier9, + CI.electricPump_UV); + RecipeUtils.addShapedGregtechRecipe( + cableTier10, rotorTier10, itemRubberRing, + CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, + itemRubberRing, CI.electricMotor_MAX, cableTier10, + CI.electricPump_MAX); + + //Electric Pump + RecipeUtils.addShapedGregtechRecipe( + plateTier7, plateTier7, plateTier7, + cableTier7, rodTier7a, rodTier7a, + cableTier7, CI.electricMotor_LuV, smallGearTier7, + CI.electricPiston_LuV); + RecipeUtils.addShapedGregtechRecipe( + plateTier8, plateTier8, plateTier8, + cableTier8, rodTier8a, rodTier8a, + cableTier8, CI.electricMotor_ZPM, smallGearTier8, + CI.electricPiston_ZPM); + RecipeUtils.addShapedGregtechRecipe( + plateTier9, plateTier9, plateTier9, + cableTier9, rodTier9a, rodTier9a, + cableTier9, CI.electricMotor_UV, smallGearTier9, + CI.electricPiston_UV); + RecipeUtils.addShapedGregtechRecipe( + plateTier10, plateTier10, plateTier10, + cableTier10, rodTier10a, rodTier10a, + cableTier10, CI.electricMotor_MAX, smallGearTier10, + CI.electricPiston_MAX); + + //Robot Arms + RecipeUtils.addShapedGregtechRecipe( + cableTier7, cableTier7, cableTier7, + CI.electricMotor_LuV, rodTier7a, CI.electricMotor_LuV, + CI.electricPiston_LuV, circuitTier7, rodTier7a, + CI.robotArm_LuV); + RecipeUtils.addShapedGregtechRecipe( + cableTier8, cableTier8, cableTier8, + CI.electricMotor_ZPM, rodTier8a, CI.electricMotor_ZPM, + CI.electricPiston_ZPM, circuitTier8, rodTier8a, + CI.robotArm_ZPM); + RecipeUtils.addShapedGregtechRecipe( + cableTier9, cableTier9, cableTier9, + CI.electricMotor_UV, rodTier9a, CI.electricMotor_UV, + CI.electricPiston_UV, circuitTier9, rodTier9a, + CI.robotArm_UV); + RecipeUtils.addShapedGregtechRecipe( + cableTier10, cableTier10, cableTier10, + CI.electricMotor_MAX, rodTier10a, CI.electricMotor_MAX, + CI.electricPiston_MAX, circuitTier10, rodTier10a, + CI.robotArm_MAX); + + //Conveyor Modules + RecipeUtils.addShapedGregtechRecipe( + plateRubber, plateRubber, plateRubber, + CI.electricMotor_LuV, cableTier7, CI.electricMotor_LuV, + plateRubber, plateRubber, plateRubber, + CI.conveyorModule_LuV); + RecipeUtils.addShapedGregtechRecipe( + plateRubber, plateRubber, plateRubber, + CI.electricMotor_ZPM, cableTier8, CI.electricMotor_ZPM, + plateRubber, plateRubber, plateRubber, + CI.conveyorModule_ZPM); + RecipeUtils.addShapedGregtechRecipe( + plateRubber, plateRubber, plateRubber, + CI.electricMotor_UV, cableTier9, CI.electricMotor_UV, + plateRubber, plateRubber, plateRubber, + CI.conveyorModule_UV); + RecipeUtils.addShapedGregtechRecipe( + plateRubber, plateRubber, plateRubber, + CI.electricMotor_MAX, cableTier10, CI.electricMotor_MAX, + plateRubber, plateRubber, plateRubber, + CI.conveyorModule_MAX); + + //Emitter Modules + RecipeUtils.addShapedGregtechRecipe( + rodTier7c, rodTier7c, circuitTier7, + cableTier7, circuitTier6, rodTier7c, + circuitTier7, cableTier7, rodTier7c, + CI.emitter_LuV); + RecipeUtils.addShapedGregtechRecipe( + rodTier8c, rodTier8c, circuitTier8, + cableTier8, circuitTier7, rodTier8c, + circuitTier8, cableTier8, rodTier8c, + CI.emitter_ZPM); + RecipeUtils.addShapedGregtechRecipe( + rodTier9c, rodTier9c, circuitTier9, + cableTier9, circuitTier8, rodTier9c, + circuitTier9, cableTier9, rodTier9c, + CI.emitter_UV); + RecipeUtils.addShapedGregtechRecipe( + rodTier10c, rodTier10c, circuitTier10, + cableTier10, circuitTier9, rodTier10c, + circuitTier10, cableTier10, rodTier10c, + CI.emitter_MAX); + + //Field Generator Modules + RecipeUtils.addShapedGregtechRecipe( + wireTier7, circuitTier7, wireTier7, + circuitTier7, circuitTier6, circuitTier7, + wireTier7, circuitTier7, wireTier7, + CI.fieldGenerator_LuV); + RecipeUtils.addShapedGregtechRecipe( + wireTier8, circuitTier8, wireTier8, + circuitTier8, circuitTier7, circuitTier8, + wireTier8, circuitTier8, wireTier8, + CI.fieldGenerator_ZPM); + RecipeUtils.addShapedGregtechRecipe( + wireTier9, circuitTier9, wireTier9, + circuitTier9, circuitTier8, circuitTier9, + wireTier9, circuitTier9, wireTier9, + CI.fieldGenerator_UV); + RecipeUtils.addShapedGregtechRecipe( + wireTier10, circuitTier10, wireTier10, + circuitTier10, circuitTier9, circuitTier10, + wireTier10, circuitTier10, wireTier10, + CI.fieldGenerator_MAX); + + //Sensor Modules + RecipeUtils.addShapedRecipe( + plateTier7, null, circuitTier6, + plateTier7, rodTier7c, null, + circuitTier7, plateTier7, plateTier7, + CI.sensor_LuV); + RecipeUtils.addShapedRecipe( + plateTier8, null, circuitTier7, + plateTier8, rodTier8c, null, + circuitTier8, plateTier8, plateTier8, + CI.sensor_ZPM); + RecipeUtils.addShapedRecipe( + plateTier9, null, circuitTier8, + plateTier9, rodTier9c, null, + circuitTier9, plateTier9, plateTier9, + CI.sensor_UV); + RecipeUtils.addShapedRecipe( + plateTier10, null, circuitTier9, + plateTier10, rodTier10c, null, + circuitTier10, plateTier10, plateTier10, + CI.sensor_MAX); + + onlyULVComponents(); + + Logger.INFO("Done loading recipes for the Various machine components."); + + } + + private static void onlyULVComponents(){ + RecipeUtils.addShapedGregtechRecipe( + cableTier1, wireTier0, rodTier0, + wireTier0, rodTier2, wireTier0, + rodTier0, wireTier0, cableTier1, + CI.electricMotor_ULV); + + RecipeUtils.addShapedGregtechRecipe( + cableTier0, rotorTier0, itemRubberRing, + CI.craftingToolScrewdriver, pipeTier0, CI.craftingToolWrench, + itemRubberRing, CI.electricMotor_ULV, cableTier0, + CI.electricPump_ULV); + + RecipeUtils.addShapedGregtechRecipe( + plateTier0, plateTier0, plateTier0, + cableTier0, rodTier1, rodTier1, + cableTier0, CI.electricMotor_ULV, smallGearTier0, + CI.electricPiston_ULV); + + RecipeUtils.addShapedGregtechRecipe( + cableTier0, cableTier0, cableTier0, + CI.electricMotor_ULV, rodTier1, CI.electricMotor_ULV, + CI.electricPiston_ULV, circuitTier0, rodTier1, + CI.robotArm_ULV); + + RecipeUtils.addShapedGregtechRecipe( + plateRubber, plateRubber, plateRubber, + CI.electricMotor_ULV, cableTier0, CI.electricMotor_ULV, + plateRubber, plateRubber, plateRubber, + CI.conveyorModule_ULV); + + RecipeUtils.addShapedGregtechRecipe( + rodTier2, rodTier2, circuitTier0, + cableTier0, circuitTier1, rodTier2, + circuitTier0, cableTier0, rodTier2, + CI.emitter_ULV); + + RecipeUtils.addShapedGregtechRecipe( + wireTier0, circuitTier0, wireTier0, + circuitTier0, circuitTier1, circuitTier0, + wireTier0, circuitTier0, wireTier0, + CI.fieldGenerator_ULV); + + RecipeUtils.addShapedRecipe( + plateTier0, null, circuitTier1, + plateTier0, rodTier2, null, + circuitTier0, plateTier0, plateTier0, + CI.sensor_ULV); + } + + private static void onlyMaxComponents(){ + RecipeUtils.addShapedGregtechRecipe( + cableTier10, wireTier10, rodTier10a, + wireTier10, rodTier10b, wireTier10, + rodTier10a, wireTier10, cableTier10, + CI.electricMotor_MAX); + RecipeUtils.addShapedGregtechRecipe( + cableTier10, rotorTier10, itemRubberRing, + CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, + itemRubberRing, CI.electricMotor_MAX, cableTier10, + CI.electricPump_MAX); + RecipeUtils.addShapedGregtechRecipe( + plateTier10, plateTier10, plateTier10, + cableTier10, rodTier10a, rodTier10a, + cableTier10, CI.electricMotor_MAX, smallGearTier10, + CI.electricPiston_MAX); + RecipeUtils.addShapedGregtechRecipe( + cableTier10, cableTier10, cableTier10, + CI.electricMotor_MAX, rodTier10a, CI.electricMotor_MAX, + CI.electricPiston_MAX, circuitTier10, rodTier10a, + CI.robotArm_MAX); + RecipeUtils.addShapedGregtechRecipe( + plateRubber, plateRubber, plateRubber, + CI.electricMotor_MAX, cableTier10, CI.electricMotor_MAX, + plateRubber, plateRubber, plateRubber, + CI.conveyorModule_MAX); + RecipeUtils.addShapedGregtechRecipe( + rodTier10c, rodTier10c, circuitTier10, + cableTier10, circuitTier9, rodTier10c, + circuitTier10, cableTier10, rodTier10c, + CI.emitter_MAX); + RecipeUtils.addShapedGregtechRecipe( + wireTier10, circuitTier10, wireTier10, + circuitTier10, circuitTier9, circuitTier10, + wireTier10, circuitTier10, wireTier10, + CI.fieldGenerator_MAX); + RecipeUtils.addShapedRecipe( + plateTier10, null, circuitTier9, + plateTier10, rodTier10c, null, + circuitTier10, plateTier10, plateTier10, + CI.sensor_MAX); + } + + private static void gregtechMachinePhase(){ + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ + Logger.INFO("Adding Gregtech machine recipes for the circuits."); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_IV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_IV.get(1L, new Object[0]), 30, 240); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_LuV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_LuV.get(1L, new Object[0]), 60, 480); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 2L), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(4L, new Object[0]), GregtechItemList.Circuit_Board_ZPM.get(1L, new Object[0]), 90, 1000); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GregtechItemList.Circuit_Parts_Crystal_Chip_IV.get(3L, new Object[0]), GregtechItemList.Circuit_Parts_IV.get(1L, new Object[0]), 30, 480); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.get(3L, new Object[0]), GregtechItemList.Circuit_Parts_LuV.get(1L, new Object[0]), 60, 1000); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.get(3L, new Object[0]), GregtechItemList.Circuit_Parts_ZPM.get(1L, new Object[0]), 90, 2000); + GT_Values.RA.addForgeHammerRecipe(ItemList.Circuit_Master.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_Crystal_Chip_IV.get(5L, new Object[0]), 30, 256); + GT_Values.RA.addForgeHammerRecipe(GregtechItemList.Circuit_IV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.get(5L, new Object[0]), 60, 512); + GT_Values.RA.addForgeHammerRecipe(GregtechItemList.Circuit_LuV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.get(5L, new Object[0]), 120, 1024); + for (final Materials tMat : Materials.values()) { + if ((tMat.mStandardMoltenFluid != null) && (tMat.contains(SubTag.SOLDERING_MATERIAL))) { + final int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; + GT_Values.RA.addAssemblerRecipe(GregtechItemList.Circuit_Board_IV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_IV.get(1L, new Object[0]), tMat.getMolten((144L * tMultiplier) / 4L), GregtechItemList.Circuit_IV.get(1L, new Object[0]), 30, 480); + GT_Values.RA.addAssemblerRecipe(GregtechItemList.Circuit_Board_LuV.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_LuV.get(1L, new Object[0]), tMat.getMolten((144L * tMultiplier) / 4L), GregtechItemList.Circuit_LuV.get(1L, new Object[0]), 60, 1000); + GT_Values.RA.addAssemblerRecipe(GregtechItemList.Circuit_Board_ZPM.get(1L, new Object[0]), GregtechItemList.Circuit_Parts_ZPM.get(1L, new Object[0]), tMat.getMolten((144L * tMultiplier) / 4L), GregtechItemList.Circuit_ZPM.get(1L, new Object[0]), 90, 2000); + + } + } + } + } +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java new file mode 100644 index 0000000000..14001d86bd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -0,0 +1,2926 @@ +package gtPlusPlus.core.recipe; + +import static gtPlusPlus.core.lib.CORE.GTNH; + +import cpw.mods.fml.common.Loader; +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.item.crafting.ItemDummyResearch; +import gtPlusPlus.core.item.crafting.ItemDummyResearch.ASSEMBLY_LINE_RESEARCH; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.*; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.covers.CoverManager; +import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; +import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RECIPES_Machines { + + //Outputs + //static ItemStack RECIPE_BufferCore_ULV = new ItemStack(GregtechEnergyBuffer.itemBufferCore); + public static ItemStack RECIPE_SteamCondenser; + public static ItemStack RECIPE_IronBlastFurnace; + public static ItemStack RECIPE_IronPlatedBricks; + public static ItemStack RECIPE_Buffer_ULV = GregtechItemList.Energy_Buffer_1by1_ULV.get(1); + public static ItemStack RECIPE_Buffer_LV = GregtechItemList.Energy_Buffer_1by1_LV.get(1); + public static ItemStack RECIPE_Buffer_MV = GregtechItemList.Energy_Buffer_1by1_MV.get(1); + public static ItemStack RECIPE_Buffer_HV = GregtechItemList.Energy_Buffer_1by1_HV.get(1); + public static ItemStack RECIPE_Buffer_EV = GregtechItemList.Energy_Buffer_1by1_EV.get(1); + public static ItemStack RECIPE_Buffer_IV = GregtechItemList.Energy_Buffer_1by1_IV.get(1); + public static ItemStack RECIPE_Buffer_LuV = GregtechItemList.Energy_Buffer_1by1_LuV.get(1); + public static ItemStack RECIPE_Buffer_ZPM = GregtechItemList.Energy_Buffer_1by1_ZPM.get(1); + public static ItemStack RECIPE_Buffer_UV = GregtechItemList.Energy_Buffer_1by1_UV.get(1); + public static ItemStack RECIPE_Buffer_MAX = GregtechItemList.Energy_Buffer_1by1_MAX.get(1); + //Industrial Centrifuge + public static ItemStack RECIPE_IndustrialCentrifugeController; + public static ItemStack RECIPE_IndustrialCentrifugeCasing; + //Industrial Coke Oven + public static ItemStack RECIPE_IndustrialCokeOvenController; + public static ItemStack RECIPE_IndustrialCokeOvenFrame; + public static ItemStack RECIPE_IndustrialCokeOvenCasingA; + public static ItemStack RECIPE_IndustrialCokeOvenCasingB; + //Industrial Electrolyzer + public static ItemStack RECIPE_IndustrialElectrolyzerController; + public static ItemStack RECIPE_IndustrialElectrolyzerFrame; + //Industrial Material Press + public static ItemStack RECIPE_IndustrialMaterialPressController; + public static ItemStack RECIPE_IndustrialMaterialPressFrame; + //Industrial Maceration Stack + public static ItemStack RECIPE_IndustrialMacerationStackController; + public static ItemStack RECIPE_IndustrialMacerationStackFrame; + //Industrial Wire Factory + public static ItemStack RECIPE_IndustrialWireFactoryController; + public static ItemStack RECIPE_IndustrialWireFactoryFrame; + //Industrial Multi Tank + public static ItemStack RECIPE_IndustrialMultiTankController; + public static ItemStack RECIPE_IndustrialMultiTankFrame; + //Industrial Matter Fabricator + public static ItemStack RECIPE_IndustrialMatterFabController; + public static ItemStack RECIPE_IndustrialMatterFabFrame; + public static ItemStack RECIPE_IndustrialMatterFabCoil; + //Industrial Blast Smelter + public static ItemStack RECIPE_IndustrialBlastSmelterController; + public static ItemStack RECIPE_IndustrialBlastSmelterFrame; + public static ItemStack RECIPE_IndustrialBlastSmelterCoil; + //Industrial Sieve + public static ItemStack RECIPE_IndustrialSieveController; + public static ItemStack RECIPE_IndustrialSieveFrame; + public static ItemStack RECIPE_IndustrialSieveGrate; + //Industrial Tree Farmer + public static ItemStack RECIPE_TreeFarmController; + public static ItemStack RECIPE_TreeFarmFrame; + //Tesseracts + public static ItemStack RECIPE_TesseractGenerator; + public static ItemStack RECIPE_TesseractTerminal; + //Thermal Boiler + public static ItemStack RECIPE_ThermalBoilerController; + public static ItemStack RECIPE_ThermalBoilerCasing; + + //Thorium Reactor + public static ItemStack RECIPE_LFTRController; + public static ItemStack RECIPE_LFTROuterCasing; + public static ItemStack RECIPE_LFTRInnerCasing; + + //Milling + public static ItemStack RECIPE_ISAMill_Controller; + public static ItemStack RECIPE_ISAMill_Gearbox; + public static ItemStack RECIPE_ISAMill_Casing; + public static ItemStack RECIPE_ISAMill_Hatch; + public static ItemStack RECIPE_Flotation_Controller; + public static ItemStack RECIPE_Flotation_Casing; + + //Cyclotron + public static ItemStack RECIPE_CyclotronController; + public static ItemStack RECIPE_CyclotronOuterCasing; + public static ItemStack RECIPE_CyclotronInnerCoil; + + + //Buffer Cores + public static ItemStack RECIPE_BufferCore_ULV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore1", 1); + public static ItemStack RECIPE_BufferCore_LV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore2", 1); + public static ItemStack RECIPE_BufferCore_MV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore3", 1); + public static ItemStack RECIPE_BufferCore_HV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore4", 1); + public static ItemStack RECIPE_BufferCore_EV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore5", 1); + public static ItemStack RECIPE_BufferCore_IV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore6", 1); + public static ItemStack RECIPE_BufferCore_LuV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore7", 1); + public static ItemStack RECIPE_BufferCore_ZPM = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore8", 1); + public static ItemStack RECIPE_BufferCore_UV = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore9", 1); + public static ItemStack RECIPE_BufferCore_MAX = ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore10", 1); + + + //Wire + public static String wireTier1 = "wireGt08Lead"; + public static String wireTier2 = "wireGt08Tin"; + public static String wireTier3 = "wireGt08Copper"; + public static String wireTier4 = "wireGt08Gold"; + public static String wireTier5 = "wireGt08Aluminium"; + public static String wireTier6 = "wireGt08Tungsten"; + public static String wireTier7 = "wireGt08Naquadah"; + public static String wireTier8 = "wireGt08Osmium"; + public static String wireTier9 = "wireGt08Superconductor"; + public static String wireTier10 = "wireGt16Superconductor"; + + //Wire + public static String cableTier1 = "cableGt04Lead"; + public static String cableTier2 = "cableGt04Tin"; + public static String cableTier3 = "cableGt04Copper"; + public static String cableTier4 = "cableGt04Gold"; + public static String cableTier5 = "cableGt04Aluminium"; + public static String cableTier6 = "cableGt04Tungsten"; + public static String cableTier7 = "cableGt04Naquadah"; + public static String cableTier8 = "cableGt04Osmium"; + public static String cableTier9 = "cableGt04NiobiumTitanium"; + public static String cableTier10 = "cableGt08NiobiumTitanium"; + + public static String pipeTier1 = "pipeHuge"+"Clay"; + public static String pipeTier2 = "pipeHuge"+"Potin"; + public static String pipeTier3 = "pipeHuge"+"Steel"; + public static String pipeTier4 = "pipeHuge"+"StainlessSteel"; + public static String pipeTier5 = "pipeHuge"+"TungstenSteel"; + public static String pipeTier6 = "pipeHuge"+"MaragingSteel300"; + public static String pipeTier7 = "pipeHuge"+"Tantalloy60"; + public static String pipeTier8 = "pipeHuge"+"Tantalloy61"; + public static String pipeTier9 = "pipeHuge"+"Inconel792"; + public static String pipeTier10 = "pipeHuge"+"HastelloyX"; + public static String pipeTier11 = "pipeHuge"+"Europium"; + + // EV/IV MACHINES + public static ItemStack EV_MACHINE_Electrolyzer; + public static ItemStack EV_MACHINE_Centrifuge; + public static ItemStack EV_MACHINE_BendingMachine; + public static ItemStack EV_MACHINE_Wiremill; + public static ItemStack HV_MACHINE_Macerator; + public static ItemStack EV_MACHINE_Macerator; + public static ItemStack EV_MACHINE_Cutter; + public static ItemStack EV_MACHINE_MassFabricator; + public static ItemStack EV_MACHINE_Extruder; + public static ItemStack EV_MACHINE_Sifter; + public static ItemStack EV_MACHINE_ThermalCentrifuge; + public static ItemStack EV_MACHINE_OreWasher; + public static ItemStack EV_MACHINE_AlloySmelter; + public static ItemStack EV_MACHINE_Mixer; + + + //Cables + public static String cableGt02Electrum = "cableGt02Electrum"; + + + //Plates + public static String plateElectricalSteel= "plateElectricalSteel"; + public static String plateEnergeticAlloy= "plateEnergeticAlloy"; + public static String plateCobalt = "plateCobalt"; + public static String plateBronze = "plateBronze"; + public static String plateSteel = "plateSteel"; + + //Pipes + public static String pipeLargeCopper="pipeLargeCopper"; + public static String pipeHugeSteel="pipeHugeSteel"; + public static String pipeHugeStainlessSteel="pipeHugeStainlessSteel"; + public static String pipeHugeTitanium="pipeHugeTitanium"; + + //Lava Boiler + public static ItemStack boiler_Coal; + public static ItemStack blockBricks = ItemUtils.getItemStackFromFQRN("minecraft:brick_block", 1); + + //Batteries + public static String batteryBasic = "batteryBasic"; + public static String batteryAdvanced = "batteryAdvanced"; + public static String batteryElite = "batteryElite"; + public static String batteryMaster = "batteryMaster"; + public static String batteryUltimate = "batteryUltimate"; + public static ItemStack IC2MFE; + public static ItemStack IC2MFSU; + + //Misc + public static ItemStack INPUT_RCCokeOvenBlock; + public static ItemStack INPUT_IECokeOvenBlock; + + //Output Determiner + public static int Casing_Amount; + + + + public static final void loadRecipes(){ + run(); + Logger.INFO("Loading Recipes for the Various machine blocks."); + } + + private static void run(){ + + //Determines Casing Recipe Output + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !GTNH){ + Casing_Amount=2; + } + else { + Casing_Amount=1; + } + + initModItems(); + tieredMachineHulls(); + controlCores(); + energyCores(); + wirelessChargers(); + largeArcFurnace(); + industrialVacuumFurnace(); + fakeMachineCasingCovers(); + ztonesCoverRecipes(); + overflowValveCovers(); + superBuses(); + roundRobinators(); + chunkloaders(); + distillus(); + algaeFarm(); + chemPlant(); + zyngen(); + milling(); + sparging(); + + } + + private static void zyngen() { + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(6), + CI.getTieredMachineHull(4), + ItemList.Machine_EV_AlloySmelter.get(1), + CI.getGear(3, 16), + CI.getBolt(3, 64), + CI.getPlate(4, 16) + }, + CI.getAlternativeTieredFluid(4, 144 * 8), + GregtechItemList.Industrial_AlloySmelter.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(4)); + + } + + private static void chemPlant() { + + + GT_ModHandler.addCraftingRecipe( + GregtechItemList.Casing_Machine_Custom_1.get(2L, new Object[0]), + CI.bits, + new Object[]{ + "PhP", + "PFP", + "PwP", + 'P', + OrePrefixes.plate.get(Materials.Bronze), + 'F', + OrePrefixes.frameGt.get(Materials.Bronze) + } + ); + + GT_ModHandler.addCraftingRecipe( + GregtechItemList.Casing_Machine_Custom_2.get(2L, new Object[0]), + CI.bits, + new Object[]{ + "PhP", + "PFP", + "PwP", + 'P', + OrePrefixes.plate.get(Materials.Aluminium), + 'F', + OrePrefixes.frameGt.get(Materials.Aluminium) + } + ); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(19), + CI.getTieredGTPPMachineCasing(1, 6), + CI.getTieredComponentOfMaterial(Materials.Steel, OrePrefixes.gearGt, 6), + CI.getTieredComponentOfMaterial(Materials.Aluminium, OrePrefixes.plate, 32), + CI.getTieredComponentOfMaterial(Materials.CobaltBrass, OrePrefixes.dust, 16), + CI.getTieredComponent(OrePrefixes.frameGt, 2, 4), + }, + ALLOY.STEEL.getFluidStack(2 * (144 * 4)), + GregtechItemList.ChemicalPlant_Controller.get(1), + 120 * 20, + MaterialUtils.getVoltageForTier(2)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(15), + CI.getTieredGTPPMachineCasing(1, 2), + ItemList.Hatch_Input_Bus_MV.get(1), + CI.getTieredComponentOfMaterial(Materials.Bronze, OrePrefixes.gearGt, 8), + CI.getTieredComponentOfMaterial(Materials.Lead, OrePrefixes.plate, 48), + CI.getTieredComponentOfMaterial(Materials.SolderingAlloy, OrePrefixes.wireFine, 16), + }, + ALLOY.BRONZE.getFluidStack(2 * (144 * 4)), + GregtechItemList.Bus_Catalysts.get(1), + 60 * 20, + MaterialUtils.getVoltageForTier(2)); + + } + + private static void algaeFarm() { + + // Give the shitty algae a use :) + CORE.RA.addDistilleryRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 32), + null, + null, + ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 4), + 20 * 15, + 16, + false); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(21), + CI.getTieredGTPPMachineCasing(0, 4), + CI.getTieredComponentOfMaterial(Materials.Iron, OrePrefixes.rod, 12), + CI.getTieredComponentOfMaterial(Materials.Wood, OrePrefixes.plate, 32), + CI.getTieredComponentOfMaterial(Materials.Bronze, OrePrefixes.bolt, 16), + CI.getTieredComponentOfMaterial(Materials.Redstone, OrePrefixes.dust, 32), + }, + ALLOY.POTIN.getFluidStack(2 * (144 * 4)), + GregtechItemList.AlgaeFarm_Controller.get(1), + 60 * 20, + MaterialUtils.getVoltageForTier(1)); + + + } + + private static void distillus() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(19), + ItemList.Distillation_Tower.get(2), + GregtechItemList.GTPP_Casing_IV.get(16), + CI.getTieredComponent(OrePrefixes.circuit, 6, 8) + }, + new FluidStack[] { + ALLOY.AQUATIC_STEEL.getFluidStack(144 * 32), + ALLOY.BABBIT_ALLOY.getFluidStack(144 * 16), + ALLOY.BRONZE.getFluidStack(144 * 64), + ALLOY.KANTHAL.getFluidStack(144 * 16), + }, + new ItemStack[] { + GregtechItemList.Machine_Adv_DistillationTower.get(1) + }, + new FluidStack[] { + + }, + 20 * 600, + MaterialUtils.getVoltageForTier(6), + 5); + + } + + private static void chunkloaders() { + + ItemStack aOutputs[] = new ItemStack[] { + GregtechItemList.GT_Chunkloader_HV.get(1L), + GregtechItemList.GT_Chunkloader_IV.get(1L), + GregtechItemList.GT_Chunkloader_ZPM.get(1L), + }; + + int aIndex = 0; + + for (int i=3;i<8;i++) { + if (i == 4 || i == 6) { + continue; + } + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(21), + CI.getElectricPiston(i, 10), + CI.getFieldGenerator(i + 1, 6), + CI.getPlate(i, 16), + CI.getTransmissionComponent(i - 1, 8), + CI.getTieredComponent(OrePrefixes.cableGt08, i, 16) + }, + ALLOY.EGLIN_STEEL.getFluidStack(i * (144 * 4)), + aOutputs[aIndex++].copy(), + 300 * 20, + MaterialUtils.getVoltageForTier(i)); + } + + + } + + private static void overflowValveCovers() { + ItemStack aOutputs[] = new ItemStack[] { + GregtechItemList.Cover_Overflow_ULV.get(1L), + GregtechItemList.Cover_Overflow_LV.get(1L), + GregtechItemList.Cover_Overflow_MV.get(1L), + GregtechItemList.Cover_Overflow_HV.get(1L), + GregtechItemList.Cover_Overflow_EV.get(1L), + GregtechItemList.Cover_Overflow_IV.get(1L), + }; + + for (int i=0;i<6;i++) { + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(19), + CI.getElectricPump(i, 2), + CI.getElectricMotor(i, 2), + CI.getPlate(i, 4) + }, + FluidUtils.getWater((i+1) * 750), + aOutputs[i].copy(), + 20 * 20, + MaterialUtils.getVoltageForTier(i)); + } + + } + + private static void tieredMachineHulls() { + + GregtechItemList[] aHulls = new GregtechItemList[] { + GregtechItemList.GTPP_Casing_ULV, + GregtechItemList.GTPP_Casing_LV, + GregtechItemList.GTPP_Casing_MV, + GregtechItemList.GTPP_Casing_HV, + GregtechItemList.GTPP_Casing_EV, + GregtechItemList.GTPP_Casing_IV, + GregtechItemList.GTPP_Casing_LuV, + GregtechItemList.GTPP_Casing_ZPM, + GregtechItemList.GTPP_Casing_UV, + GregtechItemList.GTPP_Casing_MAX + }; + + for (int i=0;i<10;i++) { + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(20), + CI.getTieredMachineCasing(i), + CI.getPlate(i, 8), + CI.getGear(i, 2), + CI.getTieredComponent(OrePrefixes.cableGt02, i, 4), + CI.getTieredComponent(OrePrefixes.circuit, i, 2) + }, + CI.getAlternativeTieredFluid(i, 144 * (i+1) * 2), + aHulls[i].get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(i)); + } + + } + + private static void initModItems(){ + if (LoadedMods.IndustrialCraft2){ + IC2MFE = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:blockElectric", "IC2_MFE", 1, 1); + IC2MFSU = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:blockElectric", "IC2_MFSU", 2, 1); + } + if (LoadedMods.Gregtech){ + + //Lava Boiler + boiler_Coal = ItemList.Machine_Bronze_Boiler.get(1); + + //IV MACHINES + if (!GTNH){ + EV_MACHINE_Electrolyzer = ItemList.Machine_EV_Electrolyzer.get(1); + EV_MACHINE_BendingMachine= ItemList.Machine_EV_Bender.get(1); + EV_MACHINE_Wiremill= ItemList.Machine_EV_Wiremill.get(1); + HV_MACHINE_Macerator= ItemList.Machine_HV_Macerator.get(1); + EV_MACHINE_Macerator= ItemList.Machine_EV_Macerator.get(1); + EV_MACHINE_MassFabricator= ItemList.Machine_EV_Massfab.get(1); + EV_MACHINE_Centrifuge= ItemList.Machine_EV_Centrifuge.get(1); + EV_MACHINE_Cutter = ItemList.Machine_EV_Cutter.get(1); + EV_MACHINE_Extruder = ItemList.Machine_EV_Extruder.get(1); + EV_MACHINE_Sifter = ItemList.Machine_HV_Sifter.get(1); + EV_MACHINE_ThermalCentrifuge = ItemList.Machine_EV_ThermalCentrifuge.get(1); + EV_MACHINE_OreWasher = ItemList.Machine_EV_OreWasher.get(1); + EV_MACHINE_AlloySmelter = ItemList.Machine_EV_AlloySmelter.get(1); + EV_MACHINE_Mixer = ItemList.Machine_EV_Mixer.get(1); + } + //Balanced opposites + else { + EV_MACHINE_Electrolyzer = ItemList.Machine_IV_Electrolyzer.get(1); + EV_MACHINE_BendingMachine= ItemList.Machine_IV_Bender.get(1); + EV_MACHINE_Wiremill= ItemList.Machine_IV_Wiremill.get(1); + HV_MACHINE_Macerator= ItemList.Machine_EV_Macerator.get(1); + EV_MACHINE_Macerator= ItemList.Machine_IV_Macerator.get(1); + EV_MACHINE_MassFabricator= CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? ItemUtils.getValueOfItemList("Machine_LuV_Massfab", ItemList.Machine_IV_Massfab).get(1) : ItemList.Machine_IV_Massfab.get(1); + EV_MACHINE_Centrifuge= ItemList.Machine_IV_Centrifuge.get(1); + EV_MACHINE_Cutter = ItemList.Machine_IV_Cutter.get(1); + EV_MACHINE_Extruder = ItemList.Machine_IV_Extruder.get(1); + EV_MACHINE_Sifter = ItemList.Machine_HV_Sifter.get(1); + EV_MACHINE_ThermalCentrifuge = ItemList.Machine_IV_ThermalCentrifuge.get(1); + EV_MACHINE_OreWasher = ItemList.Machine_IV_OreWasher.get(1); + EV_MACHINE_AlloySmelter = ItemList.Machine_IV_AlloySmelter.get(1); + EV_MACHINE_Mixer = ItemList.Machine_IV_Mixer.get(1); + } + + + + } + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven){ + if(LoadedMods.Railcraft){ + //Misc + INPUT_RCCokeOvenBlock = ItemUtils.getItemStackWithMeta(LoadedMods.Railcraft, "Railcraft:machine.alpha", "Coke_Oven_RC", 7, 1); + } + if(LoadedMods.ImmersiveEngineering){ + //Misc + INPUT_IECokeOvenBlock = ItemUtils.getItemStackWithMeta(LoadedMods.ImmersiveEngineering, "ImmersiveEngineering:stoneDecoration", "Coke_Oven_IE", 1, 1); + } + } + runModRecipes(); + } + + private static void runModRecipes(){ + if (LoadedMods.Gregtech){ + + //Computer Cube + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(CI.getDataOrb(), 4 * (GTNH ? 2 : 1)), + ItemList.Cover_Screen.get(4), + CI.machineHull_IV, + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(7), 2) + }, + ELEMENT.getInstance().TANTALUM.getFluidStack(144 * 16), + GregtechItemList.Gregtech_Computer_Cube.get(1), + 60 * 20 * 3, + 8000); + + //Circuit programmer + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(CI.robotArm_LV, 4 * (GTNH ? 2 : 1)), + ItemList.Cover_Controller.get(1, CI.electricMotor_MV), + CI.machineHull_MV, + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(1), 2), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(2), 2) + }, + ELEMENT.getInstance().IRON.getFluidStack(144 * 4), + ItemUtils.getSimpleStack(ModBlocks.blockCircuitProgrammer), + 60 * 10 * 1, + 30); + + //Lead Lined Chest + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.machineHull_LV, + ItemUtils.getItemStackOfAmountFromOreDict("plateRubber", 32), + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseLead", 9), + ItemUtils.getSimpleStack(Blocks.chest) + }, + ELEMENT.getInstance().LEAD.getFluidStack(144 * 16), + ItemUtils.getSimpleStack(ModBlocks.blockDecayablesChest), + 60 * 10 * 3, + 60); + + //RTG + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getItemStackWithMeta(true, "IC2:blockGenerator:6", "IC2-RTG", 6, 1), + ALLOY.NITINOL_60.getPlate(GTNH ? 32 : 8), + ALLOY.MARAGING350.getGear(GTNH ? 16 : 4), + ItemUtils.getSimpleStack(GTNH ? CI.fieldGenerator_IV : CI.fieldGenerator_EV, 8 ), + ItemUtils.getItemStackOfAmountFromOreDict("wireFinePlatinum", GTNH ? 64 : 32), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 7 : 6), GTNH ? 5 : 4) + }, + ALLOY.NIOBIUM_CARBIDE.getFluidStack(144 * 16), + GregtechItemList.RTG.get(1), + 60 * 20 * 10, + 8000); + + // Super Jukebox + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.machineHull_LV, + ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 4), + ItemUtils.getItemStackOfAmountFromOreDict("plateTumbaga", 8), + ItemUtils.getSimpleStack(Blocks.jukebox) + }, + ELEMENT.getInstance().COPPER.getFluidStack(144 * 2), + ItemUtils.getSimpleStack(ModBlocks.blockCustomJukebox), + 20 * 30, + 30); + + ItemStack aFluidRegulator1 = ItemUtils.getValueOfItemList("FluidRegulator_MV",GTNH ? 4 : 2, ItemList.Electric_Pump_HV); + ItemStack aFluidRegulator2 = ItemUtils.getValueOfItemList("FluidRegulator_IV", GTNH ? 4 : 2, ItemUtils.getValueOfItemList("Electric_Pump_LuV", GTNH ? 8 : 4, ItemList.Electric_Pump_IV)); + + //Poo Collector + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.machineHull_MV, + aFluidRegulator1, + CI.getTieredComponent(OrePrefixes.pipeMedium, 2, GTNH ? 4 : 2), + ALLOY.EGLIN_STEEL.getPlate(GTNH ? 8 : 4), + ALLOY.POTIN.getScrew(GTNH ? 12 : 6) + }, + ALLOY.TUMBAGA.getFluidStack(144 * 4), + ItemUtils.getSimpleStack(ModBlocks.blockPooCollector), + 20 * 60, + 30); + + //Adv. Poo Collector + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredMachineHull(-1), + ItemUtils.getSimpleStack(ModBlocks.blockPooCollector), + aFluidRegulator2, + CI.getTieredComponent(OrePrefixes.pipeHuge, 6, GTNH ? 8 : 4), + CI.getTieredComponent(OrePrefixes.screw, 6, GTNH ? 32 : 16) + }, + CI.getAlternativeTieredFluid(5, 144 * 9), + ItemUtils.getSimpleStack(ModBlocks.blockPooCollector, 8, 1), + 20 * 60 * 5, + 500); + + + //Basic Steam Turbine + RecipeUtils.addShapedGregtechRecipe( + CI.getTieredComponent(OrePrefixes.pipeSmall, 0, 1), "circuitPrimitive", CI.getTieredComponent(OrePrefixes.pipeSmall, 0, 1), + ALLOY.TUMBAGA.getRotor(1), CI.machineCasing_ULV, ALLOY.TUMBAGA.getRotor(1), + CI.getElectricMotor(0, 1), "cableGt01RedAlloy", CI.getElectricMotor(0, 1), + GregtechItemList.Generator_Steam_Turbine_ULV.get(1)); + + //Basic Gas Turbine + RecipeUtils.addShapedGregtechRecipe( + "circuitPrimitive", ALLOY.TUMBAGA.getRotor(1), "circuitPrimitive", + ALLOY.TUMBAGA.getRotor(1), CI.machineCasing_ULV, ALLOY.TUMBAGA.getRotor(1), + CI.getElectricMotor(0, 1), "cableGt01RedAlloy", CI.getElectricMotor(0, 1), + GregtechItemList.Generator_Gas_Turbine_ULV.get(1)); + + //Basic Combustion Turbine + RecipeUtils.addShapedGregtechRecipe( + CI.getElectricPiston(0, 1), "circuitPrimitive", CI.getElectricPiston(0, 1), + CI.getElectricMotor(0, 1), CI.machineCasing_ULV, CI.getElectricMotor(0, 1), + ALLOY.TUMBAGA.getGear(1), "cableGt01RedAlloy", ALLOY.TUMBAGA.getGear(1), + GregtechItemList.Generator_Diesel_ULV.get(1)); + + + + //Steam Condenser + if (CORE.ConfigSwitches.enableMachine_SteamConverter ){ + RECIPE_SteamCondenser = GregtechItemList.Condensor_MAX.get(1); + RecipeUtils.addShapedGregtechRecipe( + pipeLargeCopper, pipeHugeSteel, pipeLargeCopper, + plateEnergeticAlloy, CI.electricPump_HV, plateEnergeticAlloy, + plateEnergeticAlloy, pipeLargeCopper, plateEnergeticAlloy, + RECIPE_SteamCondenser); + } + + ItemStack aBronzeBricks = ItemUtils.simpleMetaStack(GregTech_API.sBlockCasings1, 10, 1); + // Steam Macerator Multi + RecipeUtils.addShapedGregtechRecipe( + aBronzeBricks, ALLOY.TUMBAGA.getGear(1), aBronzeBricks, + aBronzeBricks, ALLOY.TUMBAGA.getFrameBox(1), aBronzeBricks, + aBronzeBricks, ALLOY.TUMBAGA.getGear(1), aBronzeBricks, + GregtechItemList.Controller_SteamMaceratorMulti.get(1)); + + // Steam Hatch + RecipeUtils.addShapedGregtechRecipe( + "plateBronze", "pipeMediumBronze", "plateBronze", + "plateBronze", GregtechItemList.GT_FluidTank_ULV.get(1), "plateBronze", + "plateBronze", "pipeMediumBronze", "plateBronze", + GregtechItemList.Hatch_Input_Steam.get(1)); + + // Steam Input Bus + RecipeUtils.addShapedGregtechRecipe( + "plateBronze", ALLOY.TUMBAGA.getPlate(1), "plateBronze", + "plateTin", ItemUtils.getSimpleStack(Blocks.hopper), "plateTin", + "plateBronze", ALLOY.TUMBAGA.getPlate(1), "plateBronze", + GregtechItemList.Hatch_Input_Bus_Steam.get(1)); + + // Steam Output Bus + RecipeUtils.addShapedGregtechRecipe( + "plateBronze", "plateTin", "plateBronze", + ALLOY.TUMBAGA.getPlate(1), ItemUtils.getSimpleStack(Blocks.hopper), ALLOY.TUMBAGA.getPlate(1), + "plateBronze", "plateTin", "plateBronze", + GregtechItemList.Hatch_Output_Bus_Steam.get(1)); + + + //RF Convertor + if (LoadedMods.CoFHCore && CORE.ConfigSwitches.enableMachine_RF_Convetor){ + RecipeUtils.addShapedGregtechRecipe( + CI.getPlate(4, 1), CI.getTieredCircuitOreDictName(5), CI.getPlate(4, 1), + CI.getTransmissionComponent(3, 1), CI.getTieredGTPPMachineCasing(4, 1), CI.getTransmissionComponent(3, 1), + CI.getPlate(4, 1), plateEnergeticAlloy, CI.getPlate(4, 1), + GregtechItemList.Energy_Buffer_RF_Convertor.get(1)); + } + + // Egg Box + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(8), + CI.getTieredMachineHull(3), + ItemUtils.getSimpleStack(Items.egg, 64), + ItemUtils.getSimpleStack(ModItems.itemRope, 32), + CI.getPlate(4, GTNH ? 16 : 8) + }, + FluidUtils.getFluidStack("mobessence", 4096), + ItemUtils.getSimpleStack(ModBlocks.blockEggBox, 1), + 20 * 60, + 480); + + //Flask Configurator + if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(8), + CI.getTieredMachineHull(2), + ItemUtils.getSimpleStack(ModBlocks.blockCircuitProgrammer), + VolumetricFlaskHelper.getVolumetricFlask(8), + CI.getTieredComponent(OrePrefixes.pipeSmall, 2, GTNH ? 4 : 2), + CI.getPlate(2, GTNH ? 8 : 4) + }, + CI.getAlternativeTieredFluid(1, 144 * 8), + ItemUtils.getSimpleStack(ModBlocks.blockVolumetricFlaskSetter, 1), + 20 * 60, + 120); + } + + + if (CORE.ConfigSwitches.enableMultiblock_IronBlastFurnace){ + + RECIPE_IronBlastFurnace = GregtechItemList.Machine_Iron_BlastFurnace.get(1); + RECIPE_IronPlatedBricks = GregtechItemList.Casing_IronPlatedBricks.get(Casing_Amount); + + //Iron BF + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleAnyIron", "craftingFurnace", "plateDoubleAnyIron", + boiler_Coal, CI.machineCasing_ULV, boiler_Coal, + "plateDoubleAnyIron", "bucketLava", "plateDoubleAnyIron", + RECIPE_IronBlastFurnace); + //Iron plated Bricks + RecipeUtils.addShapedGregtechRecipe( + "plateAnyIron", RECIPES_Tools.craftingToolHardHammer, "plateAnyIron", + "plateAnyIron", blockBricks, "plateAnyIron", + "plateAnyIron", RECIPES_Tools.craftingToolWrench, "plateAnyIron", + RECIPE_IronPlatedBricks); + + //Add recycle recipes for the Iron Plated Bricks + //GT_ModHandler.addPulverisationRecipe(RECIPE_IronPlatedBricks, ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIron", 6), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustClay", 2), true); + CORE.RA.addPulverisationRecipe( + RECIPE_IronPlatedBricks, + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIron", 6), + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustClay", 2), + null); + GT_Values.RA.addArcFurnaceRecipe(RECIPE_IronPlatedBricks, new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotWroughtIron", 6), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustAsh", 2)}, new int[]{0}, 32*20, 32); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCentrifuge){ + //Industrial Centrifuge + RECIPE_IndustrialCentrifugeController = GregtechItemList.Industrial_Centrifuge.get(1); + RECIPE_IndustrialCentrifugeCasing = GregtechItemList.Casing_Centrifuge1.get(Casing_Amount); + + //Industrial Centrifuge + RecipeUtils.addShapedGregtechRecipe( + CI.circuitTier5, pipeHugeStainlessSteel, CI.circuitTier5, + CI.component_Plate[6], EV_MACHINE_Centrifuge, CI.component_Plate[6], + CI.component_Plate[8], CI.machineCasing_IV, CI.component_Plate[8], + RECIPE_IndustrialCentrifugeController); + //Centrifuge Casing + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], "stickTumbaga", CI.component_Plate[6], + CI.component_Plate[8], "stickTumbaga", CI.component_Plate[8], + CI.component_Plate[6], "stickTumbaga", CI.component_Plate[6], + RECIPE_IndustrialCentrifugeCasing); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven){ + //Industrial Coke Oven + RECIPE_IndustrialCokeOvenController = GregtechItemList.Industrial_CokeOven.get(1); + RECIPE_IndustrialCokeOvenFrame = GregtechItemList.Casing_CokeOven.get(Casing_Amount); + RECIPE_IndustrialCokeOvenCasingA = GregtechItemList.Casing_CokeOven_Coil1.get(Casing_Amount); + RECIPE_IndustrialCokeOvenCasingB = GregtechItemList.Casing_CokeOven_Coil2.get(Casing_Amount); + + if (LoadedMods.Railcraft){ + //Industrial Coke Oven + RecipeUtils.addShapedGregtechRecipe( + plateCobalt, CI.circuitTier4, plateCobalt, + CI.machineCasing_HV, INPUT_RCCokeOvenBlock, CI.machineCasing_HV, + plateCobalt, CI.circuitTier5, plateCobalt, + RECIPE_IndustrialCokeOvenController); + } + if (LoadedMods.ImmersiveEngineering){ + //Industrial Coke Oven + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[8], CI.circuitTier4, CI.component_Plate[8], + CI.machineCasing_HV, INPUT_IECokeOvenBlock, CI.machineCasing_HV, + CI.component_Plate[8], CI.circuitTier3, CI.component_Plate[8], + RECIPE_IndustrialCokeOvenController); + } + //Coke Oven Frame Casing + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[7], CI.component_Rod[7], CI.component_Plate[7], + CI.component_Rod[7], "frameGtTantalloy61", CI.component_Rod[7], + CI.component_Plate[7], CI.component_Rod[7], CI.component_Plate[7], + RECIPE_IndustrialCokeOvenFrame); + //Coke Oven Coil 1 + RecipeUtils.addShapedGregtechRecipe( + plateBronze, plateBronze, plateBronze, + "frameGtBronze", CI.gearboxCasing_Tier_1, "frameGtBronze", + plateBronze, plateBronze, plateBronze, + RECIPE_IndustrialCokeOvenCasingA); + //Coke Oven Coil 2 + RecipeUtils.addShapedGregtechRecipe( + plateSteel, plateSteel, plateSteel, + "frameGtSteel", CI.gearboxCasing_Tier_2, "frameGtSteel", + plateSteel, plateSteel, plateSteel, + RECIPE_IndustrialCokeOvenCasingB); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialElectrolyzer){ + //Industrial Electrolyzer + RECIPE_IndustrialElectrolyzerController = GregtechItemList.Industrial_Electrolyzer.get(1); + RECIPE_IndustrialElectrolyzerFrame = GregtechItemList.Casing_Electrolyzer.get(Casing_Amount); + + //Electrolyzer Frame Casing + RecipeUtils.addShapedGregtechRecipe( + "platePotin", "stickLongChrome", "platePotin", + "stickLongPotin", "frameGtPotin", "stickLongPotin", + "platePotin", "stickLongPotin", "platePotin", + RECIPE_IndustrialElectrolyzerFrame); + //Industrial Electrolyzer + RecipeUtils.addShapedGregtechRecipe( + "plateStellite", CI.circuitTier5, "plateStellite", + CI.machineCasing_EV, EV_MACHINE_Electrolyzer, CI.machineCasing_EV, + "plateStellite", "rotorStellite", "plateStellite", + RECIPE_IndustrialElectrolyzerController); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress){ + //Industrial Material Press + RECIPE_IndustrialMaterialPressController = GregtechItemList.Industrial_PlatePress.get(1); + RECIPE_IndustrialMaterialPressFrame = GregtechItemList.Casing_MaterialPress.get(Casing_Amount); + + //Material Press Frame Casing + RecipeUtils.addShapedGregtechRecipe( + "plateTitanium", "stickLongTumbaga", "plateTitanium", + "stickTantalloy60", "frameGtTumbaga", "stickTantalloy60", + "plateTitanium", "stickLongTumbaga", "plateTitanium", + RECIPE_IndustrialMaterialPressFrame); + //Industrial Material Press + RecipeUtils.addShapedGregtechRecipe( + "plateTitanium", CI.circuitTier5, "plateTitanium", + CI.machineCasing_EV, EV_MACHINE_BendingMachine, CI.machineCasing_EV, + "plateTitanium", CI.circuitTier5, "plateTitanium", + RECIPE_IndustrialMaterialPressController); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialMacerationStack){ + //Industrial Maceration Stack + RECIPE_IndustrialMacerationStackController = GregtechItemList.Industrial_MacerationStack.get(1); + RECIPE_IndustrialMacerationStackFrame = GregtechItemList.Casing_MacerationStack.get(Casing_Amount); + + //Maceration Frame Casing + RecipeUtils.addShapedGregtechRecipe( + "platePalladium", "platePalladium", "platePalladium", + "stickPlatinum", "frameGtInconel625", "stickPlatinum", + "platePalladium", "stickLongPalladium", "platePalladium", + RECIPE_IndustrialMacerationStackFrame); + //Industrial Maceration stack + RecipeUtils.addShapedGregtechRecipe( + "plateTungstenCarbide", EV_MACHINE_Macerator, "plateTungstenCarbide", + HV_MACHINE_Macerator, CI.circuitTier7, HV_MACHINE_Macerator, + "plateTungstenCarbide", CI.machineCasing_IV, "plateTungstenCarbide", + RECIPE_IndustrialMacerationStackController); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialWireMill){ + //Industrial Wire Factory + RECIPE_IndustrialWireFactoryController = GregtechItemList.Industrial_WireFactory.get(1); + RECIPE_IndustrialWireFactoryFrame = GregtechItemList.Casing_WireFactory.get(Casing_Amount); + + //Wire Factory Frame Casing + RecipeUtils.addShapedGregtechRecipe( + "plateBlueSteel", "stickBlueSteel", "plateBlueSteel", + "stickBlueSteel", "frameGtBlueSteel", "stickBlueSteel", + "plateBlueSteel", "stickBlueSteel", "plateBlueSteel", + RECIPE_IndustrialWireFactoryFrame); + //Industrial Wire Factory + RecipeUtils.addShapedGregtechRecipe( + "plateZeron100", CI.machineCasing_IV, "plateZeron100", + CI.circuitTier5, EV_MACHINE_Wiremill, CI.circuitTier5, + "plateZeron100", CI.machineCasing_IV, "plateZeron100", + RECIPE_IndustrialWireFactoryController); + } + + + + //Tiered Tanks + if (CORE.ConfigSwitches.enableMachine_FluidTanks){ + Logger.WARNING("Is New Horizons Loaded? "+GTNH); + if (!GTNH){ + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], CI.component_Plate[1], CI.component_Plate[1], + CI.component_Plate[1], pipeTier1, CI.component_Plate[1], + CI.component_Plate[1], GregtechItemList.Fluid_Cell_144L.get(1), CI.component_Plate[1], + GregtechItemList.GT_FluidTank_ULV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[2], CI.component_Plate[2], CI.component_Plate[2], + CI.component_Plate[2], pipeTier2, CI.component_Plate[2], + CI.component_Plate[2], CI.electricPump_LV, CI.component_Plate[2], + GregtechItemList.GT_FluidTank_LV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[3], CI.component_Plate[3], CI.component_Plate[3], + CI.component_Plate[3], pipeTier3, CI.component_Plate[3], + CI.component_Plate[3], CI.electricPump_MV, CI.component_Plate[3], + GregtechItemList.GT_FluidTank_MV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[4], CI.component_Plate[4], CI.component_Plate[4], + CI.component_Plate[4], pipeTier4, CI.component_Plate[4], + CI.component_Plate[4], CI.electricPump_HV, CI.component_Plate[4], + GregtechItemList.GT_FluidTank_HV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[5], CI.component_Plate[5], CI.component_Plate[5], + CI.component_Plate[5], pipeTier5, CI.component_Plate[5], + CI.component_Plate[5], CI.electricPump_EV, CI.component_Plate[5], + GregtechItemList.GT_FluidTank_EV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], CI.component_Plate[6], CI.component_Plate[6], + CI.component_Plate[6], pipeTier6, CI.component_Plate[6], + CI.component_Plate[6], CI.electricPump_IV, CI.component_Plate[6], + GregtechItemList.GT_FluidTank_IV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[7], CI.component_Plate[7], CI.component_Plate[7], + CI.component_Plate[7], pipeTier7, CI.component_Plate[7], + CI.component_Plate[7], CI.electricPump_LuV, CI.component_Plate[7], + GregtechItemList.GT_FluidTank_LuV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[8], CI.component_Plate[8], CI.component_Plate[8], + CI.component_Plate[8], pipeTier8, CI.component_Plate[8], + CI.component_Plate[8], CI.electricPump_ZPM, CI.component_Plate[8], + GregtechItemList.GT_FluidTank_ZPM.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[9], CI.component_Plate[9], CI.component_Plate[9], + CI.component_Plate[9], pipeTier9, CI.component_Plate[9], + CI.component_Plate[9], CI.electricPump_UV, CI.component_Plate[9], + GregtechItemList.GT_FluidTank_UV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[10], CI.component_Plate[10], CI.component_Plate[10], + CI.component_Plate[10], pipeTier10, CI.component_Plate[10], + CI.component_Plate[10], CI.electricPump_MAX, CI.component_Plate[10], + GregtechItemList.GT_FluidTank_MAX.get(1)); + } + else { + + CI.component_Plate[1] = "plateTin"; + pipeTier1 = "pipeLargeClay"; + CI.circuitTier1 = ItemList.Circuit_Primitive.get(1); + CI.component_Plate[2] = "plateCopper"; + pipeTier2 = "pipeHugeClay"; + CI.component_Plate[3] = "plateBronze"; + pipeTier3 = "pipeMediumBronze"; + CI.component_Plate[4] = "plateIron"; + pipeTier4 = "pipeMediumSteel"; + CI.component_Plate[5] = "plateSteel"; + CI.component_Plate[6] = "plateRedstone"; + CI.component_Plate[7] = "plateAluminium"; + CI.component_Plate[8] = "plateDarkSteel"; + ItemStack waterBucket = ItemUtils.getSimpleStack(Items.water_bucket); + + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], CI.component_Plate[5], CI.component_Plate[1], + CI.component_Plate[4], pipeTier1, CI.component_Plate[4], + CI.component_Plate[4], waterBucket, CI.component_Plate[4], + GregtechItemList.GT_FluidTank_ULV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[5], CI.component_Plate[4], CI.component_Plate[5], + CI.component_Plate[3], pipeTier2, CI.component_Plate[3], + CI.component_Plate[3], CI.electricPump_LV, CI.component_Plate[3], + GregtechItemList.GT_FluidTank_LV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[8], CI.component_Plate[3], CI.component_Plate[8], + CI.component_Plate[5], pipeTier3, CI.component_Plate[5], + CI.component_Plate[5], CI.electricPump_LV, CI.component_Plate[5], + GregtechItemList.GT_FluidTank_MV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.circuitTier1, CI.component_Plate[7], CI.circuitTier1, + CI.component_Plate[8], pipeTier4, CI.component_Plate[8], + CI.circuitTier1, CI.electricPump_MV, CI.circuitTier1, + GregtechItemList.GT_FluidTank_HV.get(1)); + } + } + + if (CORE.ConfigSwitches.enableMultiblock_MultiTank){ + //Industrial Multi Tank + //RECIPE_IndustrialMultiTankController = GregtechItemList.Industrial_MultiTank.get(1); + RECIPE_IndustrialMultiTankFrame = GregtechItemList.Casing_MultitankExterior.get(Casing_Amount); + + //Industrial Multi Tank Casing + RecipeUtils.addShapedGregtechRecipe( + "stickGrisium", "plateGrisium", "stickGrisium", + "plateGrisium", "frameGtGrisium", "plateGrisium", + "plateGrisium", "plateGrisium", "plateGrisium", + RECIPE_IndustrialMultiTankFrame); + //Industrial Multi Tank + RecipeUtils.addShapedGregtechRecipe( + "pipeHugeTantalloy60", "gearGrisium", "pipeHugeTantalloy60", + CI.circuitTier4, RECIPE_IndustrialMultiTankFrame, CI.circuitTier4, + "plateDoubleGrisium", "rotorGrisium", "plateDoubleGrisium", + RECIPE_IndustrialMultiTankController); + } + //TODO + + //Semi-Fluid Generators + ItemStack[][] aSemiFluidInputs = new ItemStack[3][6]; + aSemiFluidInputs[0] = new ItemStack[]{ + CI.getNumberedBioCircuit(14), + CI.getTieredMachineHull(1, 1), + CI.getElectricPiston(1, GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.circuit, 1, GTNH ? 4 : 2), + CI.getPlate(1, GTNH ? 8 : 4), + CI.getGear(1, GTNH ? 4 : 2) + }; + aSemiFluidInputs[1] = new ItemStack[]{ + CI.getNumberedCircuit(14), + CI.getTieredMachineHull(2, 1), + CI.getElectricPiston(2, GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.circuit, 2, GTNH ? 4 : 2), + CI.getPlate(2, GTNH ? 8 : 4), + CI.getGear(2, GTNH ? 4 : 2) + }; + aSemiFluidInputs[2] = new ItemStack[]{ + CI.getNumberedAdvancedCircuit(14), + CI.getTieredMachineHull(3, 1), + CI.getElectricPiston(3, GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.circuit, 3, GTNH ? 4 : 2), + CI.getPlate(3, GTNH ? 8 : 4), + CI.getGear(3, GTNH ? 4 : 2) + }; + FluidStack[] aSemiFluidFluidInputs = new FluidStack[] { + ALLOY.BRONZE.getFluidStack(144 * 8), + ALLOY.STEEL.getFluidStack(144 * 8), + ELEMENT.getInstance().ALUMINIUM.getFluidStack(144 * 8), + }; + + //ItemUtils.simpleMetaStack("IC2:blockGenerator:7", 7, 1); + ItemStack[] aSemifluids = new ItemStack[] {GregtechItemList.Generator_SemiFluid_LV.get(1), GregtechItemList.Generator_SemiFluid_MV.get(1), GregtechItemList.Generator_SemiFluid_HV.get(1)}; + for (int o=0;o<3;o++) { + CORE.RA.addSixSlotAssemblingRecipe( + aSemiFluidInputs[o], + aSemiFluidFluidInputs[o], + aSemifluids[o], + 20 * 30, + MaterialUtils.getVoltageForTier(o+1)); + } + + if (CORE.ConfigSwitches.enableMultiblock_AlloyBlastSmelter){ + //Industrial Blast Smelter + RECIPE_IndustrialBlastSmelterController = GregtechItemList.Industrial_AlloyBlastSmelter.get(1); + RECIPE_IndustrialBlastSmelterFrame = GregtechItemList.Casing_BlastSmelter.get(Casing_Amount); + RECIPE_IndustrialBlastSmelterCoil = GregtechItemList.Casing_Coil_BlastSmelter.get(Casing_Amount); + + //Blast Smelter + RecipeUtils.addShapedGregtechRecipe( + "plateZirconiumCarbide", CI.circuitTier4, "plateZirconiumCarbide", + cableTier4, EV_MACHINE_AlloySmelter, cableTier4, + "plateZirconiumCarbide", CI.circuitTier3, "plateZirconiumCarbide", + RECIPE_IndustrialBlastSmelterController); + //Blast Smelter Frame Casing + RecipeUtils.addShapedGregtechRecipe( + "plateZirconiumCarbide", CI.component_Rod[5], "plateZirconiumCarbide", + CI.component_Rod[5], "frameGtTumbaga", CI.component_Rod[5], + "plateZirconiumCarbide", CI.component_Rod[5], "plateZirconiumCarbide", + RECIPE_IndustrialBlastSmelterFrame); + //Blast Smelter Coil + RecipeUtils.addShapedGregtechRecipe( + "plateStaballoy", "plateStaballoy", "plateStaballoy", + "frameGtStaballoy", CI.gearboxCasing_Tier_3, "frameGtStaballoy", + "plateStaballoy", "plateStaballoy", "plateStaballoy", + RECIPE_IndustrialBlastSmelterCoil); + } + + if (CORE.ConfigSwitches.enableMultiblock_MatterFabricator){ + //Industrial Matter Fabricator + RECIPE_IndustrialMatterFabController = GregtechItemList.Industrial_MassFab.get(1); + RECIPE_IndustrialMatterFabFrame = GregtechItemList.Casing_MatterFab.get(Casing_Amount); + RECIPE_IndustrialMatterFabCoil = GregtechItemList.Casing_MatterGen.get(Casing_Amount); + + //Matter Fabricator CPU + RecipeUtils.addShapedGregtechRecipe( + CI.getDoublePlate(8, 1), CI.circuitTier5, CI.getPlate(8, 1), + cableTier8, CI.machineCasing_LuV, cableTier8, + CI.getPlate(8, 1), CI.circuitTier5, CI.getPlate(8, 1), + RECIPE_IndustrialMatterFabController); + //Matter Fabricator Frame Casing + RecipeUtils.addShapedGregtechRecipe( + "plateNiobiumCarbide", CI.component_Rod[8], "plateNiobiumCarbide", + CI.component_Rod[8], "frameGtInconel690", CI.component_Rod[8], + "plateNiobiumCarbide", CI.component_Rod[8], "plateNiobiumCarbide", + RECIPE_IndustrialMatterFabFrame); + //Matter Fabricator Coil + RecipeUtils.addShapedGregtechRecipe( + CI.getPlate(6, 1), CI.getPlate(7, 1), CI.getPlate(6, 1), + "frameGtStellite", CI.machineCasing_UV, "frameGtStellite", + CI.getPlate(6, 1), CI.getPlate(7, 1), CI.getPlate(6, 1), + RECIPE_IndustrialMatterFabCoil); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter){ + //Industrial Sieve + RECIPE_IndustrialSieveController = GregtechItemList.Industrial_Sifter.get(1); + RECIPE_IndustrialSieveFrame = GregtechItemList.Casing_Sifter.get(Casing_Amount); + RECIPE_IndustrialSieveGrate = GregtechItemList.Casing_SifterGrate.get(Casing_Amount); + + //Industrial Sieve + RecipeUtils.addShapedGregtechRecipe( + "plateEglinSteel", CI.circuitTier2, "plateEglinSteel", + cableTier3, EV_MACHINE_Sifter, cableTier3, + "plateEglinSteel", CI.circuitTier2, "plateEglinSteel", + RECIPE_IndustrialSieveController); + //Industrial Sieve Casing + RecipeUtils.addShapedGregtechRecipe( + "plateEglinSteel", "plateEglinSteel", "plateEglinSteel", + "plateEglinSteel", "frameGtTumbaga", "plateEglinSteel", + "plateEglinSteel", "plateEglinSteel", "plateEglinSteel", + RECIPE_IndustrialSieveFrame); + //Industrial Sieve Grate + RecipeUtils.addShapedGregtechRecipe( + "frameGtEglinSteel", "wireFineSteel", "frameGtEglinSteel", + "wireFineSteel", "wireFineSteel", "wireFineSteel", + "frameGtEglinSteel", "wireFineSteel", "frameGtEglinSteel", + RECIPE_IndustrialSieveGrate); + } + + if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ + //Industrial Tree Farmer + RECIPE_TreeFarmController = GregtechItemList.Industrial_TreeFarm.get(1); + RECIPE_TreeFarmFrame = GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.get(Casing_Amount); + //Industrial Tree Farm Controller + if (!GTNH) { + RecipeUtils.addShapedGregtechRecipe( + "plateEglinSteel", "rotorEglinSteel", "plateEglinSteel", + "cableGt02Steel", "pipeMediumSteel", "cableGt02Steel", + "plateEglinSteel", CI.machineCasing_MV, "plateEglinSteel", + RECIPE_TreeFarmController); + } + else { + RecipeUtils.addShapedGregtechRecipe( + "plateEglinSteel", "rotorEglinSteel", "plateEglinSteel", + "cableGt02Silver", "pipeMediumStainlessSteel", "cableGt02Silver", + "plateEglinSteel", CI.machineCasing_HV, "plateEglinSteel", + RECIPE_TreeFarmController); + } + //Industrial Tree Farm Frame + RecipeUtils.addShapedGregtechRecipe( + ItemUtils.getSimpleStack(Blocks.dirt), ItemUtils.getSimpleStack(Blocks.dirt), ItemUtils.getSimpleStack(Blocks.dirt), + "plankWood", "frameGtTumbaga", "plankWood", + "plankWood", "plankWood", "plankWood", + RECIPE_TreeFarmFrame); + } + + if (CORE.ConfigSwitches.enableMachine_Tesseracts){ + //Tesseracts + RECIPE_TesseractGenerator = GregtechItemList.GT4_Tesseract_Generator.get(1); + RECIPE_TesseractTerminal = GregtechItemList.GT4_Tesseract_Terminal.get(1); + //Tesseract Generator + RecipeUtils.addShapedGregtechRecipe( + "plateTitanium","circuitMaster","plateTitanium", + "circuitMaster",ItemUtils.getSimpleStack(Blocks.ender_chest),"circuitMaster", + "plateTitanium",GregtechItemList.Gregtech_Computer_Cube.get(1),"plateTitanium", + RECIPE_TesseractGenerator); + //Tesseract Terminal + RecipeUtils.addShapedGregtechRecipe( + "plateTitanium","circuitElite","plateTitanium", + "circuitElite",ItemUtils.getSimpleStack(Blocks.ender_chest),"circuitElite", + "plateTitanium",CI.machineHull_EV,"plateTitanium", + RECIPE_TesseractTerminal); + } + + if (CORE.ConfigSwitches.enableMachine_SimpleWasher){ + ItemStack plateWrought = ItemUtils.getItemStackOfAmountFromOreDict("plateWroughtIron", 1); + ItemStack washerPipe; + + + if (CORE.ConfigSwitches.enableCustom_Pipes){ + washerPipe = ItemUtils.getItemStackOfAmountFromOreDict("pipeLargeClay", 1); + RecipeUtils.addShapedGregtechRecipe( + plateWrought, CI.electricPump_LV, plateWrought, + plateWrought, washerPipe, plateWrought, + plateWrought, CI.machineCasing_ULV, plateWrought, + GregtechItemList.SimpleDustWasher_ULV.get(1)); + } + //Add Recipe + washerPipe = ItemUtils.getItemStackOfAmountFromOreDict("pipeLargeCopper", 1); + RecipeUtils.addShapedGregtechRecipe( + plateWrought, CI.electricPump_LV, plateWrought, + plateWrought, washerPipe, plateWrought, + plateWrought, CI.machineCasing_ULV, plateWrought, + GregtechItemList.SimpleDustWasher_ULV.get(1)); + + int aSimpleWasherTier = 2; + int aSlot = 0; + ItemStack[][] aInputsForSimpleWashers = new ItemStack[4][6]; + + aInputsForSimpleWashers[0] = new ItemStack[] { + CI.getTieredMachineHull(2), + CI.getTieredComponent(OrePrefixes.screw, 2, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.plate, 1, GTNH ? 8 : 4), + CI.getTieredComponent(OrePrefixes.rod, 2, GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.circuit, 2, GTNH ? 3 : 1), + + }; + aInputsForSimpleWashers[1] = new ItemStack[] { + CI.getTieredMachineHull(4), + CI.getTieredComponent(OrePrefixes.screw, 4, GTNH ? 24 : 12), + CI.getTieredComponent(OrePrefixes.plate, 3, GTNH ? 12 : 6), + CI.getTieredComponent(OrePrefixes.rod, 4, GTNH ? 6 : 3), + CI.getTieredComponent(OrePrefixes.circuit, 4, GTNH ? 4 : 2), + + }; + aInputsForSimpleWashers[2] = new ItemStack[] { + CI.getTieredMachineHull(6), + CI.getTieredComponent(OrePrefixes.screw, 6, GTNH ? 48 : 24), + CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.rod, 6, GTNH ? 8 : 4), + CI.getTieredComponent(OrePrefixes.circuit, 6, GTNH ? 6 : 3), + + }; + aInputsForSimpleWashers[3] = new ItemStack[] { + CI.getTieredMachineHull(8), + CI.getTieredComponent(OrePrefixes.screw, 8, GTNH ? 64 : 32), + CI.getTieredComponent(OrePrefixes.plate, 7, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.rod, 8, GTNH ? 10 : 5), + CI.getTieredComponent(OrePrefixes.circuit, 8, GTNH ? 8 : 4), + + }; + + + + + + + ItemStack[] aSimpleWashers = new ItemStack[] {GregtechItemList.SimpleDustWasher_MV.get(1), GregtechItemList.SimpleDustWasher_EV.get(1), GregtechItemList.SimpleDustWasher_LuV.get(1), GregtechItemList.SimpleDustWasher_UV.get(1)}; + for (int i=0;i<4;i++) { + + CORE.RA.addSixSlotAssemblingRecipe( + aInputsForSimpleWashers[aSlot], + CI.getTieredFluid(aSimpleWasherTier, 144 * aSimpleWasherTier), + aSimpleWashers[aSlot], + 20 * 15 * aSimpleWasherTier, + (int) GT_Values.V[aSimpleWasherTier]); + + aSimpleWasherTier += 2; + aSlot++; + } + } + + if (CORE.ConfigSwitches.enableMachine_Pollution && PollutionUtils.isPollutionEnabled()){ + + RecipeUtils.addShapedGregtechRecipe( + "plateCarbon", "plateCarbon", "plateCarbon", + "dustCarbon", "dustCarbon", "dustCarbon", + "plateCarbon", "plateCarbon", "plateCarbon", + ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1)); + + RecipeUtils.addShapedGregtechRecipe( + "plateCarbon", "plateCarbon", "plateCarbon", + "cellLithiumPeroxide", "dustCarbon", "cellLithiumPeroxide", + "plateCarbon", "plateCarbon", "plateCarbon", + ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1)); + + //Pollution Detector + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], CI.sensor_MV, CI.component_Plate[1], + CI.component_Plate[2], CI.electricMotor_ULV, CI.component_Plate[2], + CI.getTieredCircuit(1), CI.machineHull_LV, CI.getTieredCircuit(0), + GregtechItemList.Pollution_Detector.get(1)); + + //ULV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[0], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[0], + CI.component_Plate[0], CI.electricMotor_ULV, CI.component_Plate[0], + CI.getTieredCircuit(0), CI.machineHull_ULV, CI.getTieredCircuit(0), + GregtechItemList.Pollution_Cleaner_ULV.get(1)); + //LV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[1], + CI.component_Plate[1], CI.electricMotor_LV, CI.component_Plate[1], + CI.getTieredCircuit(1), CI.machineHull_LV, CI.getTieredCircuit(1), + GregtechItemList.Pollution_Cleaner_LV.get(1)); + //MV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[2], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[2], + CI.component_Plate[2], CI.electricMotor_MV, CI.component_Plate[2], + CI.getTieredCircuit(2), CI.machineHull_MV, CI.getTieredCircuit(2), + GregtechItemList.Pollution_Cleaner_MV.get(1)); + //HV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[3], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[3], + CI.component_Plate[3], CI.electricMotor_HV, CI.component_Plate[3], + CI.getTieredCircuit(3), CI.machineHull_HV, CI.getTieredCircuit(3), + GregtechItemList.Pollution_Cleaner_HV.get(1)); + //EV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[4], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1), CI.component_Plate[4], + CI.component_Plate[4], CI.electricMotor_EV, CI.component_Plate[4], + CI.getTieredCircuit(4), CI.machineHull_EV, CI.getTieredCircuit(4), + GregtechItemList.Pollution_Cleaner_EV.get(1)); + //IV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[5], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[5], + CI.component_Plate[5], CI.electricMotor_IV, CI.component_Plate[5], + CI.getTieredCircuit(5), CI.machineHull_IV, CI.getTieredCircuit(5), + GregtechItemList.Pollution_Cleaner_IV.get(1)); + //LuV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[6], + CI.component_Plate[6], CI.electricMotor_LuV, CI.component_Plate[6], + CI.getTieredCircuit(6), CI.machineHull_LuV, CI.getTieredCircuit(6), + GregtechItemList.Pollution_Cleaner_LuV.get(1)); + //ZPM + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[7], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[7], + CI.component_Plate[7], CI.electricMotor_ZPM, CI.component_Plate[7], + CI.getTieredCircuit(7), CI.machineHull_ZPM, CI.getTieredCircuit(7), + GregtechItemList.Pollution_Cleaner_ZPM.get(1)); + //UV + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[8], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[8], + CI.component_Plate[8], CI.electricMotor_UV, CI.component_Plate[8], + CI.getTieredCircuit(8), CI.machineHull_UV, CI.getTieredCircuit(8), + GregtechItemList.Pollution_Cleaner_UV.get(1)); + //MAX + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[9], ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 1, 1), CI.component_Plate[9], + CI.component_Plate[9], CI.electricMotor_MAX, CI.component_Plate[9], + CI.getTieredCircuit(9), CI.machineHull_MAX, CI.getTieredCircuit(9), + GregtechItemList.Pollution_Cleaner_MAX.get(1)); + + + } + + if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){ + RECIPE_ThermalBoilerController = GregtechItemList.GT4_Thermal_Boiler.get(1); + RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(GTNH ? 1 : 2); + ItemStack centrifugeHV = GTNH ? ItemList.Machine_IV_Centrifuge.get(1) : ItemList.Machine_EV_Centrifuge.get(1); + + RecipeUtils.addShapedGregtechRecipe( + "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", + "gearGtTitanium", CI.getTieredCircuitOreDictName(6), "gearGtTitanium", + "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", + RECIPE_ThermalBoilerController); + + RecipeUtils.addShapedGregtechRecipe( + "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", + "gearGtTungstenSteel", CI.getTieredCircuitOreDictName(5), "gearGtTungstenSteel", + "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", + RECIPE_ThermalBoilerController); + + RecipeUtils.addShapedGregtechRecipe( + ALLOY.MARAGING350.getPlate(1), "plateStainlessSteel", ALLOY.MARAGING350.getPlate(1), + "circuitAdvanced", CI.machineCasing_HV, "circuitAdvanced", + ALLOY.MARAGING350.getPlate(1), ALLOY.MARAGING350.getPlate(1), ALLOY.MARAGING350.getPlate(1), + RECIPE_ThermalBoilerCasing); + + //Lava Filter Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + CI.getNumberedCircuit(18), + ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", GTNH ? 64 : 32), + ItemUtils.getItemStackOfAmountFromOreDict("wireFineSteel", GTNH ? 64 : 32), + ItemUtils.getItemStackOfAmountFromOreDict("ringTumbaga", GTNH ? 32 : 16), + ItemUtils.getItemStackOfAmountFromOreDict("foilCopper", GTNH ? 8 : 4), + ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemPartCarbonMesh", "RawCarbonMesh", 0, 64), + + }, + CI.getTieredFluid(3, 144), + ItemUtils.getSimpleStack(ModItems.itemLavaFilter, GTNH ? 8 : 16), + 1600, + 240 + ); + } + + //Air Intake Hatch + ItemList FluidRegulator_IV = ItemUtils.getValueOfItemList("FluidRegulator_IV", ItemList.Pump_IV); + ItemStack aTieredFluidRegulator = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? FluidRegulator_IV.get(1) : ItemList.Pump_IV.get(1); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], ItemList.Casing_Grate.get(1), CI.component_Plate[6], + CI.component_Plate[6], aTieredFluidRegulator, CI.component_Plate[6], + CI.getTieredCircuit(4), ItemList.Hatch_Input_IV.get(1), CI.getTieredCircuit(4), + GregtechItemList.Hatch_Air_Intake.get(1)); + + if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ + + //Thorium Reactor + RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1); + RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(1); //Zeron + RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(1); //Hastelloy + + ItemStack controlCircuit = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); + if(!GTNH) { + RecipeUtils.addShapedGregtechRecipe( + controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, + "plateDoubleHastelloyN", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDoubleHastelloyN", + "plateThorium232", CI.machineHull_EV, "plateThorium232", + RECIPE_LFTRController); + } else { + RecipeUtils.addShapedGregtechRecipe( + controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, + "plateDoubleHastelloyN", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDoubleHastelloyN", + "plateThorium232", CI.machineHull_IV, "plateThorium232", + RECIPE_LFTRController); + } + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleZeron100", CI.craftingToolScrewdriver, "plateDoubleZeron100", + "gearGtTalonite", CI.fieldGenerator_MV, "gearGtTalonite", + "plateDoubleZeron100", CI.craftingToolHammer_Hard, "plateDoubleZeron100", + RECIPE_LFTRInnerCasing); + + ItemStack IC2HeatPlate = ItemUtils.getItemStackFromFQRN("IC2:reactorPlatingHeat", 1); + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", + IC2HeatPlate, "frameGtHastelloyC276", IC2HeatPlate, + "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", + RECIPE_LFTROuterCasing); + + //LFTR Control Circuit + ItemStack circuitT5 = ItemList.Circuit_Master.get(1); + GT_Values.RA.addAssemblerRecipe(circuitT5, CI.fieldGenerator_HV, controlCircuit, 240*20, 500); + + + //Fission Fuel Plant + RecipeUtils.addShapedGregtechRecipe( + CI.getTieredCircuitOreDictName(5), CI.craftingToolSolderingIron, CI.getTieredCircuitOreDictName(5), + "plateDenseTungstenSteel", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDenseTungstenSteel", + "gearGtStellite", CI.machineHull_IV, "gearGtStellite", + GregtechItemList.Industrial_FuelRefinery.get(1)); + + ItemStack mInnerTank; + + if (GTNH || !CORE.ConfigSwitches.enableMachine_FluidTanks){ + mInnerTank = ItemList.Quantum_Tank_LV.get(1); + } + else { + mInnerTank = GregtechItemList.GT_FluidTank_EV.get(1); + } + + //Incoloy Casing + RecipeUtils.addShapedGregtechRecipe( + "plateIncoloyDS", "pipeHugeStaballoy", "plateIncoloyDS", + "gearGtIncoloyDS", mInnerTank, "gearGtIncoloyDS", + "plateIncoloyDS", "pipeHugeStaballoy", "plateIncoloyDS", + GregtechItemList.Casing_Refinery_Internal.get(Casing_Amount)); + + //Hastelloy-N Sealant Casing + RecipeUtils.addShapedGregtechRecipe( + "plateIncoloyMA956", "plateHastelloyN", "plateIncoloyMA956", + "plateHastelloyN", "frameGtHastelloyC276", "plateHastelloyN", + "plateIncoloyMA956", "plateHastelloyN", "plateIncoloyMA956", + GregtechItemList.Casing_Refinery_External.get(Casing_Amount)); + + //Hastelloy-X Structural Casing + RecipeUtils.addShapedGregtechRecipe( + "ringInconel792", "gearGtHastelloyX", CI.component_Plate[5], + CI.craftingToolHammer_Hard, "frameGtHastelloyC276", CI.craftingToolWrench, + CI.component_Plate[5], CI.getTieredMachineCasing(4), "ringInconel792", + GregtechItemList.Casing_Refinery_Structural.get(Casing_Amount)); + + RecipeUtils.addShapedGregtechRecipe( + CI.getPlate(5, 1), ALLOY.HASTELLOY_X.getPlateDouble(1), CI.getPlate(5, 1), + CI.getPlate(5, 1), CI.getTieredMachineCasing(5), CI.getPlate(5, 1), + CI.getRobotArm(5, 1), ItemList.Casing_FrostProof.get(1), CI.getRobotArm(5, 1), + GregtechItemList.ColdTrap_IV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.getPlate(7, 1), ALLOY.HS188A.getPlateDouble(1), CI.getPlate(7, 1), + CI.getPlate(7, 1), GregtechItemList.ColdTrap_IV.get(1), CI.getPlate(7, 1), + CI.getRobotArm(7, 1), ItemList.Casing_FrostProof.get(1), CI.getRobotArm(7, 1), + GregtechItemList.ColdTrap_ZPM.get(1)); + + RecipeUtils.addShapedGregtechRecipe( + CI.getFieldGenerator(3, 1), CI.getRobotArm(5, 1), CI.getPlate(5, 1), + ALLOY.HASTELLOY_N.getPlateDouble(1), ItemList.Machine_IV_ChemicalReactor.get(1), ALLOY.HASTELLOY_N.getPlateDouble(1), + CI.getPlate(5, 1), ALLOY.HASTELLOY_N.getPlateDouble(1), CI.getFieldGenerator(3, 1), + GregtechItemList.ReactorProcessingUnit_IV.get(1)); + RecipeUtils.addShapedGregtechRecipe( + CI.getFieldGenerator(5, 1), CI.getRobotArm(7, 1), CI.getPlate(7, 1), + ALLOY.HS188A.getPlateDouble(1), GregtechItemList.ReactorProcessingUnit_IV.get(1), ALLOY.HS188A.getPlateDouble(1), + CI.getPlate(7, 1), ALLOY.HS188A.getPlateDouble(1), CI.getFieldGenerator(5, 1), + GregtechItemList.ReactorProcessingUnit_ZPM.get(1)); + + } + + //Shelves + RecipeUtils.addShapedGregtechRecipe( + "screwWood", "plateWood", "screwWood", + CI.craftingToolHammer_Hard, "frameGtWood", CI.craftingToolHammer_Soft, + "plateWood", "plateWood", "plateWood", + GregtechItemList.GT4_Shelf.get(2)); + + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf.get(1)}, GregtechItemList.GT4_Shelf_Compartment.get(1)); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_Compartment.get(1)}, GregtechItemList.GT4_Shelf_Desk.get(1)); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_Desk.get(1)}, GregtechItemList.GT4_Shelf_Iron.get(1)); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_Iron.get(1)}, GregtechItemList.GT4_Shelf_FileCabinet.get(1)); + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {GregtechItemList.GT4_Shelf_FileCabinet.get(1)}, GregtechItemList.GT4_Shelf.get(1)); + + + //Cyclotron + if (CORE.ConfigSwitches.enableMultiblock_Cyclotron){ + RECIPE_CyclotronController = GregtechItemList.COMET_Cyclotron.get(1); + RECIPE_CyclotronOuterCasing = GregtechItemList.Casing_Cyclotron_External.get(Casing_Amount); + RECIPE_CyclotronInnerCoil = GregtechItemList.Casing_Cyclotron_Coil.get(1); + + //Outer Casing + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemList.Casing_FrostProof.get(1), + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 0, GTNH ? 8 : 4), + ALLOY.INCOLOY_DS.getPlate(GTNH ? 16 : 8), + ALLOY.INCONEL_690.getScrew(GTNH ? 32 : 16), + ALLOY.EGLIN_STEEL.getLongRod(GTNH ? 16 : 4), + CI.getElectricPiston(3, GTNH ? 4 : 2) + }, + ALLOY.ZIRCONIUM_CARBIDE.getFluidStack(144 * 8), //Input Fluid + RECIPE_CyclotronOuterCasing, + 30 * 20 * 2, + MaterialUtils.getVoltageForTier(4)); + + + //Inner Coil + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemList.Casing_Coil_Nichrome.get(1), + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 1, GTNH ? 32 : 8), + ALLOY.INCOLOY_MA956.getPlate(GTNH ? 16 : 8), + ALLOY.TANTALLOY_61.getBolt(GTNH ? 32 : 16), + ALLOY.INCOLOY_020.getScrew(GTNH ? 64 : 32), + CI.getFieldGenerator(4, GTNH ? 2 : 1) + }, + ALLOY.HG1223.getFluidStack(144 * 5), //Input Fluid + RECIPE_CyclotronInnerCoil, + 60 * 20 * 2, + MaterialUtils.getVoltageForTier(5)); + + + //Controller + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.machineHull_IV, + ItemUtils.getSimpleStack(RECIPE_CyclotronInnerCoil, GTNH ? 4 : 2), + ALLOY.INCOLOY_020.getPlate(GTNH ? 16 : 8), + ALLOY.TANTALLOY_61.getGear(GTNH ? 4 : 2), + ALLOY.INCOLOY_MA956.getScrew(GTNH ? 64 : 16), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 6 : 5), GTNH ? 8 : 16) + }, + ALLOY.INCOLOY_020.getFluidStack(144 * 9), //Input Fluid + RECIPE_CyclotronController, + 60 * 20 * 5, + MaterialUtils.getVoltageForTier(5)); + } + + // Mazut + GT_ModHandler.addCraftingRecipe( + GregtechItemList.Controller_LargeSemifluidGenerator.get(1L), + CI.bitsd, + new Object[]{ + "PCP", + "EME", + "GWG", + 'M', ItemList.Hull_EV, + 'P', ItemList.Electric_Piston_EV, + 'E', ItemList.Electric_Pump_EV, + 'C', OrePrefixes.circuit.get(Materials.Data), + 'W', OrePrefixes.cableGt08.get(Materials.Electrum), + 'G', ALLOY.INCONEL_792.getGear(1) + }); + + + if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation){ + RecipeUtils.addShapedRecipe( + "screwTitanium", "plateIncoloy020", "screwTitanium", + "plateIncoloy020", "frameGtIncoloyMA956", "plateIncoloy020", + "screwTitanium", "plateIncoloy020", "screwTitanium", + GregtechItemList.Casing_Power_SubStation.get(Casing_Amount)); + + ItemStack mBattery = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); + + RecipeUtils.addShapedRecipe( + "plateIncoloyMA956", mBattery, "plateIncoloyMA956", + GregtechItemList.Casing_Power_SubStation.get(1), GregtechItemList.Casing_Vanadium_Redox.get(1), GregtechItemList.Casing_Power_SubStation.get(1), + "plateIncoloy020", "plateIncoloyMA956", "plateIncoloy020", + GregtechItemList.PowerSubStation.get(1)); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialThermalCentrifuge){ + RecipeUtils.addShapedRecipe( + "plateRedSteel", CI.craftingToolHammer_Hard, "plateRedSteel", + "plateRedSteel", "frameGtBlackSteel", "plateRedSteel", + "plateRedSteel", CI.craftingToolWrench, "plateRedSteel", + GregtechItemList.Casing_ThermalCentrifuge.get(Casing_Amount)); + + RecipeUtils.addShapedRecipe( + "plateRedSteel","circuitData","plateRedSteel", + "stickTalonite",EV_MACHINE_ThermalCentrifuge,"stickTalonite", + "plateRedSteel","gearGtTalonite","plateRedSteel", + GregtechItemList.Industrial_ThermalCentrifuge.get(1)); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant){ + RecipeUtils.addShapedRecipe( + "plateGrisium", CI.craftingToolHammer_Hard, "plateGrisium", + "plateTalonite", "frameGtGrisium", "plateTalonite", + "plateGrisium", CI.craftingToolWrench, "plateGrisium", + GregtechItemList.Casing_WashPlant.get(Casing_Amount)); + + RecipeUtils.addShapedRecipe( + "plateGrisium",CI.electricPump_MV,"plateGrisium", + "plateTalonite",EV_MACHINE_OreWasher,"plateTalonite", + "plateGrisium","circuitData","plateGrisium", + GregtechItemList.Industrial_WashPlant.get(1)); + } + + if (CORE.ConfigSwitches.enableMultiblock_LargeAutoCrafter) { + + ItemStack aCoreBlock = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK + ? ItemUtils.getValueOfItemList("Block_IridiumTungstensteel", 1, ItemUtils.getItemStackOfAmountFromOreDict("blockOsmiridium", 1)) + : ItemUtils.getItemStackOfAmountFromOreDict("blockOsmiridium", 1); + + aCoreBlock.stackSize = GTNH ? 2 : 1; + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(GregtechItemList.Casing_Multi_Use.get(1), GTNH ? 2 : 1), + aCoreBlock, + CI.getTieredComponent(OrePrefixes.circuit, GTNH ? 3 : 2, 16), + CI.getTieredComponent(OrePrefixes.screw, GTNH ? 6 : 5, 32), + CI.getTieredComponent(OrePrefixes.bolt, GTNH ? 6 : 5, 12), + CI.getTieredComponent(OrePrefixes.plate, GTNH ? 7 : 6, 8), }, + CI.getTertiaryTieredFluid(6, 144 * (GTNH ? 12 : 4)), + GregtechItemList.Casing_Autocrafter.get(Casing_Amount), 20 * 60 * 2, + MaterialUtils.getVoltageForTier(GTNH ? 6 : 5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + GregtechItemList.Casing_Refinery_Structural.get(4), + ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR, GTNH ? 2 : 1), + CI.getTieredComponent(OrePrefixes.cableGt08, GTNH ? 7 : 6, GTNH ? 32 : 16), + CI.getTransmissionComponent(GTNH ? 6 : 5, 2), + GregtechItemList.Gregtech_Computer_Cube.get(1), + }, + CI.getTieredFluid(7, 144 * (GTNH ? 32 : 8)), GregtechItemList.GT4_Multi_Crafter.get(1), + 20 * 60 * 5, MaterialUtils.getVoltageForTier(GTNH ? 6 : 5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(GregtechItemList.Casing_Multi_Use.get(1), Casing_Amount), + CI.getEmitter(GTNH ? 5 : 4, GTNH ? 4 : 2), CI.getRobotArm(GTNH ? 5 : 4, GTNH ? 4 : 2), + CI.getTieredComponent(OrePrefixes.circuit, GTNH ? 3 : 2, 8), + CI.getTieredComponent(OrePrefixes.screw, GTNH ? 4 : 3, 8), + CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 16 : 4), }, + CI.getAlternativeTieredFluid(5, 144 * 4), ItemUtils.getSimpleStack(ModBlocks.blockProjectTable), + 20 * 30 * 3, MaterialUtils.getVoltageForTier(GTNH ? 5 : 4)); + + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCuttingMachine){ + ItemStack plate = ALLOY.MARAGING300.getPlate(1); + RecipeUtils.addShapedRecipe( + plate, CI.craftingToolHammer_Hard, plate, + "plateStellite", "frameGtTalonite", "plateStellite", + plate, CI.craftingToolWrench, plate, + GregtechItemList.Casing_CuttingFactoryFrame.get(Casing_Amount)); + + RecipeUtils.addShapedRecipe( + plate,CI.getTieredCircuit(3),plate, + "wireFinePlatinum", EV_MACHINE_Cutter, "wireFinePlatinum", + plate,CI.getTieredCircuit(4),plate, + GregtechItemList.Industrial_CuttingFactoryController.get(1)); + } + + //EV_MACHINE_Extruder + if (CORE.ConfigSwitches.enableMultiblock_IndustrialExtrudingMachine){ + ItemStack plate = ALLOY.INCONEL_690.getPlate(1); + RecipeUtils.addShapedRecipe( + plate, CI.craftingToolHammer_Hard, plate, + "plateTalonite", "frameGtStaballoy", "plateTalonite", + plate, CI.craftingToolWrench, plate, + GregtechItemList.Casing_Extruder.get(Casing_Amount)); + + RecipeUtils.addShapedRecipe( + plate,CI.getTieredCircuit(4),plate, + CI.electricPiston_EV, EV_MACHINE_Extruder, CI.electricPiston_EV, + plate,CI.getTieredCircuit(4),plate, + GregtechItemList.Industrial_Extruder.get(1)); + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialFishingPort){ + ItemStack plate = ALLOY.AQUATIC_STEEL.getPlate(1); + RecipeUtils.addShapedRecipe( + plate, CI.craftingToolHammer_Hard, plate, + "plateEglinSteel", "frameGtEglinSteel", "plateEglinSteel", + plate, CI.craftingToolWrench, plate, + GregtechItemList.Casing_FishPond.get(Casing_Amount)); + + RecipeUtils.addShapedRecipe( + plate,CI.getTieredCircuit(3),plate, + "wireFineElectrum", ItemUtils.getSimpleStack(ModBlocks.blockFishTrap), "wireFineElectrum", + plate,CI.getTieredCircuit(2),plate, + GregtechItemList.Industrial_FishingPond.get(1)); + } + + if (true) { + //Advanced Vacuum Freezer + ItemStack plate = ALLOY.HG1223.getPlateDouble(1); + ItemStack gear = ALLOY.INCOLOY_MA956.getGear(1); + ItemStack frame = ALLOY.LAFIUM.getFrameBox(1); + ItemStack cell1 = ItemList.Reactor_Coolant_He_6.get(1); + ItemStack cell2 = ItemList.Reactor_Coolant_NaK_6.get(1); + + RecipeUtils.addShapedRecipe( + plate, gear, plate, + cell1, frame, cell2, + plate, gear, plate, + GregtechItemList.Casing_AdvancedVacuum.get(Casing_Amount)); + RecipeUtils.addShapedRecipe( + gear,CI.getTieredCircuit(6),gear, + CI.electricPiston_IV, GregtechItemList.Casing_AdvancedVacuum.get(1), CI.electricPiston_IV, + plate, GregtechItemList.Gregtech_Computer_Cube.get(1), plate, + GregtechItemList.Industrial_Cryogenic_Freezer.get(1)); + + //Advanced Blast Furnace + plate = ALLOY.HASTELLOY_N.getPlateDouble(1); + gear = ALLOY.HASTELLOY_W.getGear(1); + frame = ALLOY.HASTELLOY_X.getFrameBox(1); + cell1 = ItemUtils.simpleMetaStack("IC2:reactorHeatSwitchDiamond:1", 1, 1); + cell2 = ItemUtils.simpleMetaStack("IC2:reactorVentGold:1", 1, 1); + ItemStack cell3 = ItemUtils.simpleMetaStack("IC2:reactorVentDiamond:1:1", 1, 1); + + RecipeUtils.addShapedRecipe( + plate, cell1, plate, + cell3, frame, cell2, + plate, gear, plate, + GregtechItemList.Casing_Adv_BlastFurnace.get(Casing_Amount)); + RecipeUtils.addShapedRecipe( + gear,CI.getTieredCircuit(6),gear, + CI.robotArm_IV, GregtechItemList.Casing_Adv_BlastFurnace.get(1), CI.robotArm_IV, + plate, GregtechItemList.Gregtech_Computer_Cube.get(1), plate, + GregtechItemList.Machine_Adv_BlastFurnace.get(1)); + + //Advanced Implosion Compressor + plate = ItemUtils.getItemStackOfAmountFromOreDict("plateAlloyIridium", 1); + gear = ALLOY.LEAGRISIUM.getGear(1); + frame = ALLOY.CINOBITE.getFrameBox(1); + cell1 = ItemUtils.simpleMetaStack("IC2:reactorHeatSwitchDiamond:1", 1, 1); + cell2 = ItemUtils.simpleMetaStack("IC2:reactorVentGold:1", 1, 1); + + RecipeUtils.addShapedRecipe( + gear,CI.getTieredCircuit(6),gear, + CI.fieldGenerator_IV, CI.machineHull_ZPM, CI.robotArm_IV, + plate, GregtechItemList.Gregtech_Computer_Cube.get(1), plate, + GregtechItemList.Machine_Adv_ImplosionCompressor.get(1)); + + + + //Supply Depot + plate = ALLOY.TUNGSTEN_CARBIDE.getPlateDouble(1); + gear = ALLOY.TRINIUM_TITANIUM.getRing(1); + frame = ALLOY.TUNGSTEN_CARBIDE.getFrameBox(1); + cell1 = CI.conveyorModule_EV; + cell2 = CI.electricMotor_IV; + ItemStack casingAmazon = GregtechItemList.Casing_AmazonWarehouse.get(1); + ItemStack aTieredUnboxinator = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? ItemUtils.getValueOfItemList("Machine_LuV_Unboxinator", 1, ItemList.Machine_IV_Unboxinator.get(1)) : ItemList.Machine_IV_Unboxinator.get(1); + + + RecipeUtils.addShapedRecipe( + plate, ItemUtils.getItemStackOfAmountFromOreDict("cableGt12VanadiumGallium", 1), plate, + cell1, frame, cell2, + plate, gear, plate, + GregtechItemList.Casing_AmazonWarehouse.get(Casing_Amount)); + RecipeUtils.addShapedRecipe( + casingAmazon, CI.getTieredCircuit(7), casingAmazon, + CI.robotArm_LuV, aTieredUnboxinator, CI.robotArm_LuV, + CI.conveyorModule_LuV, GregtechItemList.Gregtech_Computer_Cube.get(1), CI.conveyorModule_LuV, + GregtechItemList.Amazon_Warehouse_Controller.get(1)); + + + //Industrial Mixing Machine + RecipeUtils.addShapedRecipe( + "plateStaballoy",CI.getTieredCircuit(5),"plateStaballoy", + "plateZirconiumCarbide", EV_MACHINE_Mixer, "plateZirconiumCarbide", + "plateStaballoy",CI.getTieredCircuit(5),"plateStaballoy", + GregtechItemList.Industrial_Mixer.get(1)); + + } + + if (CORE.ConfigSwitches.enableMultiblock_IndustrialMultiMachine){ + ItemStack plate = ALLOY.STABALLOY.getPlate(1); + + + ItemStack o_Compressor; + ItemStack o_Lathe; + ItemStack o_Electromagnet; + ItemStack o_Fermenter; + ItemStack o_Distillery; + ItemStack o_Extractor; + if (GTNH) { + o_Compressor = ItemList.Machine_IV_Compressor.get(1); + o_Lathe = ItemList.Machine_IV_Lathe.get(1); + o_Electromagnet = ItemList.Machine_IV_Polarizer.get(1); + o_Fermenter = ItemList.Machine_IV_Fermenter.get(1); + o_Distillery = ItemList.Machine_IV_FluidExtractor.get(1); + o_Extractor = ItemList.Machine_IV_Extractor.get(1); + } + else { + o_Compressor = ItemList.Machine_EV_Compressor.get(1); + o_Lathe = ItemList.Machine_EV_Lathe.get(1); + o_Electromagnet = ItemList.Machine_EV_Polarizer.get(1); + o_Fermenter = ItemList.Machine_EV_Fermenter.get(1); + o_Distillery = ItemList.Machine_EV_FluidExtractor.get(1); + o_Extractor = ItemList.Machine_EV_Extractor.get(1); + } + RecipeUtils.addShapedRecipe( + plate, CI.craftingToolHammer_Hard, plate, + "plateStainlessSteel", "frameGtZirconiumCarbide", "plateStainlessSteel", + plate, CI.craftingToolWrench, plate, + GregtechItemList.Casing_Multi_Use.get(Casing_Amount)); + + RecipeUtils.addShapedRecipe( + o_Compressor, o_Lathe, o_Electromagnet, + plate, ItemUtils.getSimpleStack(ModBlocks.blockProjectTable), plate, + o_Fermenter, o_Distillery, o_Extractor, + GregtechItemList.Industrial_MultiMachine.get(1)); + } + + + + + /* + * 6/1/19 - Content additions + */ + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + + /* + * Fusion MK4 + */ + + //Fusion MK4 Controller + CORE.RA.addAssemblylineRecipe( + ItemList.FusionComputer_UV.get(1), + (int) GT_Values.V[5], + new Object[] { + new Object[] {CI.getTieredCircuitOreDictName(9), 4 * (GTNH ? 2 : 1)}, + new Object[] {CI.getTieredCircuitOreDictName(7), 32 * (GTNH ? 2 : 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("wireGt16Superconductor", 8 * (GTNH ? 4 : 2)), + ItemUtils.getItemStackOfAmountFromOreDict("plateDenseNeutronium", 2 * (GTNH ? 4 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.fieldGenerator_MAX : CI.fieldGenerator_ZPM), 5), + ItemList.Energy_LapotronicOrb2.get(1 * (GTNH ? 64 : 8)), + GTNH ? GregtechItemList.Compressed_Fusion_Reactor.get(1) : ItemList.FusionComputer_UV.get(1), + GregtechItemList.Casing_Fusion_Internal.get(1) + }, + new FluidStack[] { + ALLOY.PIKYONIUM.getFluidStack(32 * 144 * (GTNH ? 2 : 1)), + ALLOY.HG1223.getFluidStack(64 * 144) + }, + GregtechItemList.FusionComputer_UV2.get(1), + (int) GT_Values.V[6], + (int) GT_Values.V[8]); + + //Fusion MK4 Casing + CORE.RA.addAssemblylineRecipe( + ItemList.Casing_Fusion2.get(1), + (int) GT_Values.V[4], + new Object[] { + new Object[] {CI.getTieredCircuitOreDictName(5), 8 * (GTNH ? 2 : 1)}, + new Object[] {CI.getTieredCircuitOreDictName(4), 16 * (GTNH ? 2 : 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("blockTungstenCarbide", 4 * (GTNH ? 2 : 1)), + ItemUtils.getItemStackOfAmountFromOreDict("plateNeutronium", 2 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.electricMotor_MAX : CI.electricMotor_ZPM), 3 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.electricPiston_UV : CI.electricPiston_LuV), 4 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.machineHull_MAX : CI.machineHull_ZPM), 1 * (GTNH ? 2 : 1)), + ItemList.Casing_Fusion2.get(1) + }, + new FluidStack[] { + Materials.NaquadahAlloy.getMolten(576 * (GTNH ? 2 : 1)), + ALLOY.ZERON_100.getFluidStack(16 * 144) + }, + GregtechItemList.Casing_Fusion_External.get(1), + (int) GT_Values.V[5], + (int) GT_Values.V[7]); + + //Fusion MK4 Coil + CORE.RA.addAssemblylineRecipe( + ItemList.Casing_Fusion_Coil.get(1), + (int) GT_Values.V[4], + new Object[] { + new Object[] {CI.getTieredCircuitOreDictName(8), 4 * (GTNH ? 2 : 1)}, + new Object[] {CI.getTieredCircuitOreDictName(6), 8 * (GTNH ? 2 : 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("plateNeutronium", 2 * (GTNH ? 3 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.emitter_MAX : CI.emitter_ZPM), 2 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.sensor_MAX : CI.sensor_ZPM), 2 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.fieldGenerator_MAX : CI.fieldGenerator_LuV), 2 * (GTNH ? 2 : 1)), + new Object[] {CI.getTieredCircuitOreDictName(8), 8}, + ItemList.Energy_LapotronicOrb2.get(2 * (GTNH ? 16 : 1)), + ItemList.Casing_Fusion_Coil.get(1) + }, + new FluidStack[] { + ALLOY.CINOBITE.getFluidStack(16 * 144 * (GTNH ? 2 : 1)), + ALLOY.ABYSSAL.getFluidStack(64 * 144) + }, + GregtechItemList.Casing_Fusion_Internal.get(1), + (int) GT_Values.V[5], + (int) GT_Values.V[7]); + + + + + ItemStack aDrillController = ItemUtils.getValueOfItemList("OreDrill4", ItemList.Hull_UV).get(1); + + //Drilling Platform + /*CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + aDrillController, + ItemUtils.getItemStackOfAmountFromOreDict("frameGtTriniumNaquadahCarbonite", 3), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(9), 2 * (GTNH ? 4 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.conveyorModule_UV : CI.conveyorModule_ZPM), 2 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.electricPump_UV : CI.electricPump_ZPM), 4 * (GTNH ? 2 : 1)), + }, + ALLOY.LAFIUM.getFluid(144 * 8 * (GTNH ? 2 : 1)), + GregtechItemList.BedrockMiner_MKI.get(1), + (int) GT_Values.V[5], + (int) GT_Values.V[7]);*/ + + //Drilling Platform Casings + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("frameGtTriniumNaquadahCarbonite", 4), + ItemUtils.getItemStackOfAmountFromOreDict("plateDoubleTriniumTitaniumAlloy", 1 * (GTNH ? 2 : 1)), + ItemUtils.getItemStackOfAmountFromOreDict("gearGtPikyonium64B", 2 * (GTNH ? 2 : 1)), + ALLOY.TRINIUM_REINFORCED_STEEL.getPlateDouble(4 * (GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((GTNH ? CI.machineHull_UV : CI.machineHull_LuV), 1 * (GTNH ? 2 : 1)), + }, + ALLOY.MARAGING350.getFluidStack(144 * 16 * (GTNH ? 2 : 1)), + GregtechItemList.Casing_BedrockMiner.get(1), + (int) GT_Values.V[4], + (int) GT_Values.V[6]); + + + + + + + + + + } + + + + + + + + + + + } + + int aCostMultiplier = GTNH ? 2 : 1; + + //Mystic Frame + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + GregtechItemList.Casing_Multi_Use.get(1), + ItemList.Field_Generator_MV.get(1, CI.circuitTier7), + ItemList.Field_Generator_HV.get(1, CI.circuitTier7), + ItemList.Emitter_HV.get(1, CI.circuitTier7), + ItemList.Sensor_HV.get(1, CI.circuitTier7), + CI.getTieredComponent(OrePrefixes.plate, 7, 8 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.wireGt08, 8, 4 * aCostMultiplier), + }, + CI.getTieredFluid(6, (144 * 8)), //Input Fluid + ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 2), + 45 * 20 * 1 * (6), + MaterialUtils.getVoltageForTier(6)); + + + //Player Doors + ItemStack[] aDoorInputs = new ItemStack[] { + ItemUtils.getSimpleStack(Blocks.log2), + ItemUtils.getSimpleStack(Blocks.iron_block), + ItemUtils.getSimpleStack(Blocks.glass), + ItemUtils.getSimpleStack(Blocks.packed_ice), + ItemUtils.getSimpleStack(Blocks.cactus), + }; + ItemStack[] aDoorOutputs = new ItemStack[] { + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorWooden), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorIron), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Glass), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Ice), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Cactus), + }; + + for (int y = 0; y < aDoorInputs.length; y++) { + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(Items.iron_door), + aDoorInputs[y], + ItemList.Sensor_LV.get(1, CI.circuitTier7), + CI.getTieredComponent(OrePrefixes.plate, 1, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.wireGt02, 1, 2 * aCostMultiplier), + ItemUtils.getSimpleStack(Items.redstone, 16) + }, + CI.getTieredFluid(1, (144 * 2)), //Input Fluid + aDoorOutputs[y], + 100, + MaterialUtils.getVoltageForTier(1)); + } + + + + + + + Logger.INFO("Done loading recipes for the Various machine blocks."); + } + + + private static void controlCores() { + + Material[] aMat_A = new Material[] { + ALLOY.POTIN, + ALLOY.ZIRCONIUM_CARBIDE, + ALLOY.TANTALLOY_61, + ALLOY.INCONEL_792, + ALLOY.STABALLOY, + ALLOY.TALONITE, + ALLOY.HASTELLOY_N, + ALLOY.HG1223, + ALLOY.LAFIUM, + ALLOY.PIKYONIUM + }; + Material[] aMat_B = new Material[] { + ALLOY.TUMBAGA, + ALLOY.SILICON_CARBIDE, + ALLOY.EGLIN_STEEL, + ALLOY.NICHROME, + ALLOY.TUNGSTEN_CARBIDE, + ALLOY.STELLITE, + ALLOY.HASTELLOY_C276, + ALLOY.NITINOL_60, + ALLOY.ZERON_100, + ALLOY.CINOBITE + }; + + Item aBaseCore = ModItems.itemControlCore; + ItemStack[] aInputPrevTier = new ItemStack[] { + GTNH ? ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore3", 1) : ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore2", 1), + ItemUtils.simpleMetaStack(aBaseCore, 0, 1), + ItemUtils.simpleMetaStack(aBaseCore, 1, 1), + ItemUtils.simpleMetaStack(aBaseCore, 2, 1), + ItemUtils.simpleMetaStack(aBaseCore, 3, 1), + ItemUtils.simpleMetaStack(aBaseCore, 4, 1), + ItemUtils.simpleMetaStack(aBaseCore, 5, 1), + ItemUtils.simpleMetaStack(aBaseCore, 6, 1), + ItemUtils.simpleMetaStack(aBaseCore, 7, 1), + ItemUtils.simpleMetaStack(aBaseCore, 8, 1), + }; + ItemStack[] aOutput = new ItemStack[] { + ItemUtils.simpleMetaStack(aBaseCore, 0, 1), + ItemUtils.simpleMetaStack(aBaseCore, 1, 1), + ItemUtils.simpleMetaStack(aBaseCore, 2, 1), + ItemUtils.simpleMetaStack(aBaseCore, 3, 1), + ItemUtils.simpleMetaStack(aBaseCore, 4, 1), + ItemUtils.simpleMetaStack(aBaseCore, 5, 1), + ItemUtils.simpleMetaStack(aBaseCore, 6, 1), + ItemUtils.simpleMetaStack(aBaseCore, 7, 1), + ItemUtils.simpleMetaStack(aBaseCore, 8, 1), + ItemUtils.simpleMetaStack(aBaseCore, 9, 1), + + }; + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.machineHull_HV, + aOutput[1], + aMat_A[1].getGear(GTNH ? 4 : 2), + aMat_B[2].getPlateDouble(GTNH ? 16 : 8), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+(GTNH ? "2" : "1"), GTNH ? 4 : 2), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 3 : 2), GTNH ? 10 : 5) + }, + aMat_B[3].getFluidStack(144 * 8), //Input Fluid + GregtechItemList.Hatch_Control_Core.get(1), + 60 * 20 * 5, + MaterialUtils.getVoltageForTier(3)); + + + for (int i = 0; i < 10; i++) { + boolean aDub = false; + ItemStack aPlateStack = aMat_A[i].getPlateDouble((GTNH ? 16 : 8) * (aDub ? 2 : 1)); + ItemStack aGearStack = aMat_B[i].getGear(GTNH ? 4 : 2 * (aDub ? 2 : 1)); + ItemStack aRodStack = aMat_A[i].getLongRod(GTNH ? 16 : 8 * (aDub ? 2 : 1)); + ItemStack aScrewStack = aMat_B[i].getScrew(32 * (aDub ? 2 : 1)); + + if (!ItemUtils.checkForInvalidItems(aPlateStack)) { + aPlateStack = aMat_A[i].getPlate((GTNH ? 16 : 8) * (aDub ? 2 : 1) * 2); + if (!ItemUtils.checkForInvalidItems(aPlateStack)) { + aPlateStack = aMat_B[i].getPlateDouble((GTNH ? 16 : 8) * (aDub ? 2 : 1)); + if (!ItemUtils.checkForInvalidItems(aPlateStack)) { + aPlateStack = aMat_B[i].getPlate((GTNH ? 16 : 8) * (aDub ? 2 : 1) * 2); + } + } + } + if (!ItemUtils.checkForInvalidItems(aGearStack)) { + aGearStack = aMat_A[i].getGear(GTNH ? 8 : 4 * (aDub ? 2 : 1)); + } + if (!ItemUtils.checkForInvalidItems(aRodStack)) { + aRodStack = aMat_B[i].getLongRod(GTNH ? 32 : 16 * (aDub ? 2 : 1)); + } + if (!ItemUtils.checkForInvalidItems(aScrewStack)) { + aScrewStack = aMat_A[i].getScrew(32 * (aDub ? 2 : 1)); + } + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getEnergyCore(i, 4), + aPlateStack, + aGearStack, + aRodStack, + aScrewStack, + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName((int) (4+Math.ceil((double) i / (double) 2))), GTNH ? (i * 2 * 2) : (i * 2)) + }, + CI.getTieredFluid(i, 144 * 4 * (i+1)), //Input Fluid + aOutput[i], + 60 * 20 * 1 * (i+1), + MaterialUtils.getVoltageForTier(i)); + } + } + + private static void energyCores() { + + //Simpler Recipes for normal Players, Force assembly crafting in GTNH + if (!GTNH) { + //Buffer Core + /*RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[1], cableTier1, CI.component_Plate[1], + "circuitPrimitive", "plateStaballoy", "circuitPrimitive", + CI.component_Plate[1], cableTier1, CI.component_Plate[1], + RECIPE_BufferCore_ULV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[2], cableTier2, CI.component_Plate[2], + RECIPE_BufferCore_ULV, CI.machineHull_HV, RECIPE_BufferCore_ULV, + CI.component_Plate[2], cableTier2, CI.component_Plate[2], + RECIPE_BufferCore_LV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[3], cableTier3, CI.component_Plate[3], + RECIPE_BufferCore_LV, CI.circuitTier2, RECIPE_BufferCore_LV, + CI.component_Plate[3], cableTier3, CI.component_Plate[3], + RECIPE_BufferCore_MV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[4], cableTier4, CI.component_Plate[4], + RECIPE_BufferCore_MV, CI.circuitTier3, RECIPE_BufferCore_MV, + CI.component_Plate[4], cableTier4, CI.component_Plate[4], + RECIPE_BufferCore_HV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[5], cableTier5, CI.component_Plate[5], + RECIPE_BufferCore_HV, CI.circuitTier4, RECIPE_BufferCore_HV, + CI.component_Plate[5], cableTier5, CI.component_Plate[5], + RECIPE_BufferCore_EV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[6], cableTier6, CI.component_Plate[6], + RECIPE_BufferCore_EV, CI.circuitTier5, RECIPE_BufferCore_EV, + CI.component_Plate[6], cableTier6, CI.component_Plate[6], + RECIPE_BufferCore_IV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[7], cableTier7, CI.component_Plate[7], + RECIPE_BufferCore_IV, CI.circuitTier6, RECIPE_BufferCore_IV, + CI.component_Plate[7], cableTier7, CI.component_Plate[7], + RECIPE_BufferCore_LuV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[8], cableTier8, CI.component_Plate[8], + RECIPE_BufferCore_LuV, CI.circuitTier7, RECIPE_BufferCore_LuV, + CI.component_Plate[8], cableTier8, CI.component_Plate[8], + RECIPE_BufferCore_ZPM); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[9], cableTier9, CI.component_Plate[9], + RECIPE_BufferCore_ZPM, CI.circuitTier8, RECIPE_BufferCore_ZPM, + CI.component_Plate[9], cableTier9, CI.component_Plate[9], + RECIPE_BufferCore_UV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[10], cableTier10, CI.component_Plate[10], + RECIPE_BufferCore_UV, CI.circuitTier9, RECIPE_BufferCore_UV, + CI.component_Plate[10], cableTier10, CI.component_Plate[10], + RECIPE_BufferCore_MAX);*/ + + + /*RecipeUtils.addShapedGregtechRecipe( + wireTier1, RECIPE_BufferCore_ULV, wireTier1, + wireTier1, CI.machineCasing_ULV, wireTier1, + CI.circuitPrimitive, CI.circuitTier1, CI.circuitPrimitive, + RECIPE_Buffer_ULV); + RecipeUtils.addShapedGregtechRecipe( + wireTier2, RECIPE_BufferCore_LV, wireTier2, + wireTier2, CI.machineCasing_LV, wireTier2, + CI.circuitTier1, RECIPE_BufferCore_LV, CI.circuitTier1, + RECIPE_Buffer_LV); + RecipeUtils.addShapedGregtechRecipe( + wireTier3, RECIPE_BufferCore_MV, wireTier3, + wireTier3, CI.machineCasing_MV, wireTier3, + CI.circuitTier2, RECIPE_BufferCore_MV, CI.circuitTier2, + RECIPE_Buffer_MV); + RecipeUtils.addShapedGregtechRecipe( + wireTier4, RECIPE_BufferCore_HV, wireTier4, + wireTier4, CI.machineCasing_HV, wireTier4, + CI.circuitTier3, RECIPE_BufferCore_HV, CI.circuitTier3, + RECIPE_Buffer_HV); + RecipeUtils.addShapedGregtechRecipe( + wireTier5, RECIPE_BufferCore_EV, wireTier5, + wireTier5, CI.machineCasing_EV, wireTier5, + CI.circuitTier4, RECIPE_BufferCore_EV, CI.circuitTier4, + RECIPE_Buffer_EV); + RecipeUtils.addShapedGregtechRecipe( + wireTier6, RECIPE_BufferCore_IV, wireTier6, + wireTier6, CI.machineCasing_IV, wireTier6, + CI.circuitTier5, RECIPE_BufferCore_IV, CI.circuitTier5, + RECIPE_Buffer_IV); + RecipeUtils.addShapedGregtechRecipe( + wireTier7, RECIPE_BufferCore_LuV, wireTier7, + wireTier7, CI.machineCasing_LuV, wireTier7, + CI.circuitTier6, RECIPE_BufferCore_LuV, CI.circuitTier6, + RECIPE_Buffer_LuV); + RecipeUtils.addShapedGregtechRecipe( + wireTier8, RECIPE_BufferCore_ZPM, wireTier8, + wireTier8, CI.machineCasing_ZPM, wireTier8, + CI.circuitTier7, RECIPE_BufferCore_ZPM, CI.circuitTier7, + RECIPE_Buffer_ZPM); + RecipeUtils.addShapedGregtechRecipe( + wireTier9, RECIPE_BufferCore_UV, wireTier9, + wireTier9, CI.machineCasing_UV, wireTier9, + CI.circuitTier8, RECIPE_BufferCore_UV, CI.circuitTier8, + RECIPE_Buffer_UV); + RecipeUtils.addShapedGregtechRecipe( + CI.component_Plate[11], RECIPE_BufferCore_MAX, CI.component_Plate[11], + wireTier10, CI.machineCasing_MAX, wireTier10, + CI.circuitTier9, RECIPE_BufferCore_MAX, CI.circuitTier9, + RECIPE_Buffer_MAX);*/ + } + + + ItemStack[] aBufferOutput = new ItemStack[] { + RECIPE_Buffer_ULV, RECIPE_Buffer_LV, RECIPE_Buffer_MV, + RECIPE_Buffer_HV, RECIPE_Buffer_EV, RECIPE_Buffer_IV, + RECIPE_Buffer_LuV, RECIPE_Buffer_ZPM, RECIPE_Buffer_UV, RECIPE_Buffer_MAX }; + + + + ItemStack[] aOutput = new ItemStack[] { + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"1", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"2", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"3", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"4", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"5", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"6", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"7", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"8", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"9", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"10", 1) + }; + + int aCostMultiplier = GTNH ? 4 : 1; + + for (int i = 0; i < 10; i++) { + + ItemStack aPrevTier = (i == 0 ? CI.getTieredMachineHull(GTNH ? 2 : 1) : aOutput[i-1]); + aPrevTier.stackSize = GTNH ? 2 : 1; + int aTier = (i + 1); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + aPrevTier, + CI.getTieredComponent(OrePrefixes.plate, aTier, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.cableGt04, i, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.circuit, aTier, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.screw, aTier, 6 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.bolt, i, 12 * (GTNH ? 2 : 1)), + }, + CI.getTieredFluid(i, (144 * 4 * aTier)), //Input Fluid + aOutput[i], + 45 * 10 * 1 * (aTier), + MaterialUtils.getVoltageForTier(i)); + + //Energy Buffer + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(aOutput[i], 4), + CI.getTieredComponent(OrePrefixes.plate, aTier, 8 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.wireGt08, i, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.circuit, i, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.stickLong, aTier, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.gearGt, i, 5 * (GTNH ? 2 : 1)), + }, + CI.getTieredFluid(aTier, (144 * 16 * aTier)), //Input Fluid + aBufferOutput[i], + 45 * 20 * 1 * (aTier), + MaterialUtils.getVoltageForTier(i)); + + } + + + + + } + + private static void wirelessChargers() { + + ItemStack[] aChargers = new ItemStack[] { + null, + GregtechItemList.Charger_LV.get(1), + GregtechItemList.Charger_MV.get(1), + GregtechItemList.Charger_HV.get(1), + GregtechItemList.Charger_EV.get(1), + GregtechItemList.Charger_IV.get(1), + GregtechItemList.Charger_LuV.get(1), + GregtechItemList.Charger_ZPM.get(1), + GregtechItemList.Charger_UV.get(1), + GregtechItemList.Charger_MAX.get(1) + }; + + int aCostMultiplier = GTNH ? 2 : 1; + + for (int i = 0; i < 10; i++) { + if (i == 0) { + continue; + } + int aTier = (i + 1); + ItemStack[] aInputs = new ItemStack[] { + CI.getTieredMachineHull(i, 1 * aCostMultiplier), + CI.getTransmissionComponent(i, 2 * aCostMultiplier), + CI.getFieldGenerator(i, 1 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.plate, aTier, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.circuit, aTier, 2 * aCostMultiplier), + }; + CORE.RA.addSixSlotAssemblingRecipe( + aInputs, + CI.getAlternativeTieredFluid(i, (144 * 2 * aTier)), //Input Fluid + aChargers[i], + 45 * 10 * 1 * (aTier), + MaterialUtils.getVoltageForTier(i)); + + } + } + + private static void largeArcFurnace() { + int aCostMultiplier = GTNH ? 2 : 1; + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredMachineHull(-1, 1 * aCostMultiplier), + CI.getTransmissionComponent(2, 2 * aCostMultiplier), + CI.getElectricPiston(4, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.plate, 5, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.pipeSmall, 4, 1 * aCostMultiplier), + }, + CI.getAlternativeTieredFluid(5, (144 * 2 * 4)), //Input Fluid + GregtechItemList.Casing_Industrial_Arc_Furnace.get(Casing_Amount), + 20 * 10 * 1 * (6), + MaterialUtils.getVoltageForTier(5)); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + GregtechItemList.Casing_Industrial_Arc_Furnace.get(Casing_Amount), + CI.getFieldGenerator(4, 2 * aCostMultiplier), + CI.getRobotArm(5, 4 * aCostMultiplier), + CI.getEnergyCore(4, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.plate, 6, 8 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.circuit, 5, 8 * aCostMultiplier), + }, + CI.getAlternativeTieredFluid(6, (144 * 4 * 5)), //Input Fluid + GregtechItemList.Industrial_Arc_Furnace.get(1), + 60 * 20 * 8, + MaterialUtils.getVoltageForTier(6)); + } + + private static void industrialVacuumFurnace() { + int aCostMultiplier = GTNH ? 2 : 1; + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredMachineHull(-1, 1 * aCostMultiplier), + CI.getHeatCoil(2), + CI.getElectricPiston(3, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.plate, 6, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.gearGt, 6, 2 * aCostMultiplier), + }, + CI.getTertiaryTieredFluid(5, (144 * 2 * 4 * aCostMultiplier)), //Input Fluid + GregtechItemList.Casing_Vacuum_Furnace.get(Casing_Amount), + 20 * 10 * 6, + MaterialUtils.getVoltageForTier(6)); + + ; + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + GregtechItemList.Casing_Vacuum_Furnace.get(aCostMultiplier), + CI.getTieredComponent(OrePrefixes.wireGt16, 7, 4 * aCostMultiplier), + CI.getEnergyCore(6, 1 * aCostMultiplier), + CI.getRobotArm(4, 4 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.plate, 7, 8 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.circuit, 6, 8 * aCostMultiplier), + }, + CI.getTieredFluid(7, (144 * 4 * 5 * aCostMultiplier)), //Input Fluid + GregtechItemList.Controller_Vacuum_Furnace.get(1), + 60 * 20 * 12, + MaterialUtils.getVoltageForTier(7)); + } + + private static void milling() { + + + /*public static ItemStack RECIPE_ISAMill_Controller; + public static ItemStack RECIPE_ISAMill_Gearbox; + public static ItemStack RECIPE_ISAMill_Casing; + public static ItemStack RECIPE_ISAMill_Hatch; + public static ItemStack RECIPE_Flotation_Controller; + public static ItemStack RECIPE_Flotation_Casing;*/ + + // Isa Mill Controller + CORE.RA.addAssemblylineRecipe( + ItemList.Machine_IV_Macerator.get(1), + 20 * 60 * 20, + new Object[] { + GregtechItemList.Casing_IsaMill_Gearbox.get(4), + CI.getTieredGTPPMachineCasing(6, 4), + ItemList.Component_Grinder_Tungsten.get(16), + new Object[] {CI.getTieredCircuitOreDictName(6), 8}, + ALLOY.INCONEL_625.getGear(8), + ALLOY.INCONEL_625.getPlate(32), + ALLOY.ZERON_100.getPlateDouble(8), + ALLOY.ZERON_100.getPlateDouble(8), + ALLOY.ZERON_100.getScrew(64), + CI.getTieredComponentOfMaterial(Materials.NiobiumTitanium, OrePrefixes.wireFine, 32), + CI.getTieredComponentOfMaterial(Materials.NiobiumTitanium, OrePrefixes.wireFine, 32), + CI.getTieredComponentOfMaterial(Materials.Titanium, OrePrefixes.foil, 16), + CI.getTieredComponentOfMaterial(Materials.Titanium, OrePrefixes.foil, 16), + + }, + new FluidStack[] { + CI.getTieredFluid(6, 16 * 144), + CI.getAlternativeTieredFluid(6, 32 * 144), + CI.getTertiaryTieredFluid(6, 32 * 144) + }, + GregtechItemList.Controller_IsaMill.get(1), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(6)); + + // Isa Mill Gearbox + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(7), + ItemList.Casing_Gearbox_Titanium.get(2), + ALLOY.INCONEL_625.getGear(4), + CI.getTieredComponentOfMaterial(Materials.HSSE, OrePrefixes.gearGtSmall, 8), + ALLOY.INCONEL_625.getPlate(16), + ALLOY.ZERON_100.getBolt(16), + }, + ALLOY.TUNGSTENSTEEL.getFluidStack(8 * 144), + GregtechItemList.Casing_IsaMill_Gearbox.get(1), + 60 * 20 * 2, + MaterialUtils.getVoltageForTier(6)); + + // Isa Mill Casing + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(7), + CI.getTieredGTPPMachineCasing(5, 1), + ALLOY.INCONEL_625.getPlate(8), + ALLOY.ZERON_100.getRod(4), + CI.getTieredComponentOfMaterial(Materials.HSSG, OrePrefixes.gearGtSmall, 4), + ALLOY.ZERON_100.getScrew(8), + }, + ELEMENT.getInstance().TITANIUM.getFluidStack(4 * 144), + GregtechItemList.Casing_IsaMill_Casing.get(1), + 60 * 20 * 2, + MaterialUtils.getVoltageForTier(6)); + + // Isa Mill Pipe + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(7), + CI.getTieredGTPPMachineCasing(4, 2), + ALLOY.INCONEL_625.getPlateDouble(4), + ALLOY.INCOLOY_MA956.getRing(8), + CI.getTieredComponentOfMaterial(Materials.HSSE, OrePrefixes.plate, 8), + ALLOY.INCOLOY_MA956.getBolt(16), + }, + ELEMENT.getInstance().ALUMINIUM.getFluidStack(8 * 144), + GregtechItemList.Casing_IsaMill_Pipe.get(1), + 60 * 20 * 8, + MaterialUtils.getVoltageForTier(4)); + + // Flotation Cell Controller + CORE.RA.addAssemblylineRecipe( + ItemList.Distillation_Tower.get(1), + 20 * 60 * 20, + new Object[] { + GregtechItemList.Casing_Flotation_Cell.get(4), + CI.getTieredGTPPMachineCasing(5, 4), + ItemList.Machine_IV_Distillery.get(1), + new Object[] {CI.getTieredCircuitOreDictName(6), 8}, + ALLOY.STELLITE.getGear(8), + ALLOY.STELLITE.getPlate(32), + ALLOY.HASTELLOY_N.getPlateDouble(8), + ALLOY.HASTELLOY_N.getPlateDouble(8), + ALLOY.HASTELLOY_N.getScrew(64), + CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), + CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), + CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), + CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), + + }, + new FluidStack[] { + CI.getTieredFluid(5, 16 * 144), + CI.getAlternativeTieredFluid(4, 32 * 144), + CI.getTertiaryTieredFluid(4, 32 * 144) + }, + GregtechItemList.Controller_Flotation_Cell.get(1), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(6)); + + // Flotation Cell Casing + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(7), + CI.getTieredGTPPMachineCasing(4, 1), + ALLOY.AQUATIC_STEEL.getPlate(8), + ALLOY.STELLITE.getRing(8), + CI.getTieredComponentOfMaterial(Materials.HSSG, OrePrefixes.plateDouble, 4), + ALLOY.HASTELLOY_N.getScrew(8), + }, + ALLOY.STAINLESS_STEEL.getFluidStack(8 * 144), + GregtechItemList.Casing_Flotation_Cell.get(1), + 60 * 20 * 2, + MaterialUtils.getVoltageForTier(6)); + + // Milling Bus + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(7), + CI.getTieredGTPPMachineCasing(5, 1), + ItemList.Hatch_Input_Bus_EV.get(1), + CI.getTieredComponentOfMaterial(Materials.Titanium, OrePrefixes.gearGt, 8), + CI.getTieredComponentOfMaterial(Materials.TungstenSteel, OrePrefixes.plate, 32), + CI.getTieredComponentOfMaterial(Materials.SolderingAlloy, OrePrefixes.wireFine, 16), + }, + ELEMENT.getInstance().TUNGSTEN.getFluidStack(8 * 144), + GregtechItemList.Bus_Milling_Balls.get(1), + 60 * 20 * 4, + MaterialUtils.getVoltageForTier(5)); + + } + + private static void sparging() { + + // Sparge Tower Research + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(8), + ELEMENT.getInstance().HELIUM.getCell(8), + ELEMENT.getInstance().FLUORINE.getCell(8), + ALLOY.HS188A.getIngot(8), + ItemList.Distillation_Tower.get(1) + }, + null, + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_10_SPARGING, 1), + 60 * 20 * 5, + MaterialUtils.getVoltageForTier(5)); + + // Sparge Tower Controller + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_10_SPARGING, 1), + 20 * 60 * 20, + new Object[] { + GregtechItemList.Casing_Sparge_Tower_Exterior.get(4), + CI.getTieredGTPPMachineCasing(4, 4), + ItemList.Machine_IV_Distillery.get(1), + new Object[] {CI.getTieredCircuitOreDictName(5), 8}, + ALLOY.HS188A.getGear(8), + ALLOY.HS188A.getPlate(32), + ALLOY.HASTELLOY_N.getPlateDouble(8), + ALLOY.HASTELLOY_N.getPlateDouble(8), + ALLOY.HASTELLOY_N.getScrew(64), + CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), + CI.getTieredComponentOfMaterial(Materials.YttriumBariumCuprate, OrePrefixes.wireFine, 64), + CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), + CI.getTieredComponentOfMaterial(Materials.Platinum, OrePrefixes.foil, 32), + + }, + new FluidStack[] { + CI.getTieredFluid(4, 16 * 144), + CI.getAlternativeTieredFluid(3, 32 * 144), + CI.getTertiaryTieredFluid(3, 32 * 144) + }, + GregtechItemList.Controller_Sparge_Tower.get(1), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(6)); + + // Sparge Tower Casing + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(8), + CI.getTieredGTPPMachineCasing(3, 1), + ALLOY.HS188A.getPlate(8), + ALLOY.HASTELLOY_N.getRing(4), + CI.getTieredComponentOfMaterial(Materials.TungstenSteel, OrePrefixes.plateDouble, 4), + ALLOY.HASTELLOY_N.getScrew(4), + }, + ALLOY.STAINLESS_STEEL.getFluidStack(8 * 144), + GregtechItemList.Casing_Sparge_Tower_Exterior.get(1), + 60 * 20 * 2, + MaterialUtils.getVoltageForTier(5)); + } + + private static void fakeMachineCasingCovers() { + GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] { + GregtechItemList.FakeMachineCasingPlate_ULV, + GregtechItemList.FakeMachineCasingPlate_LV, + GregtechItemList.FakeMachineCasingPlate_MV, + GregtechItemList.FakeMachineCasingPlate_HV, + GregtechItemList.FakeMachineCasingPlate_EV, + GregtechItemList.FakeMachineCasingPlate_IV, + GregtechItemList.FakeMachineCasingPlate_LuV, + GregtechItemList.FakeMachineCasingPlate_ZPM, + GregtechItemList.FakeMachineCasingPlate_UV, + GregtechItemList.FakeMachineCasingPlate_MAX, + }; + int aMaxTier = GT_Values.VOLTAGE_NAMES.length; + if (!GTNH) { + aMaxTier = 10; + } + ItemStack aTier[] = new ItemStack[aMaxTier]; + for (int i=0;i= 30; + + setItemList(ItemList.Circuit_Primitive, GregtechItemList.Old_Circuit_Primitive); + setItemList(ItemList.Circuit_Basic, GregtechItemList.Old_Circuit_Basic); + setItemList(ItemList.Circuit_Good, GregtechItemList.Old_Circuit_Good); + setItemList(ItemList.Circuit_Advanced, GregtechItemList.Old_Circuit_Advanced); + //ItemList.Circuit_Data, GregtechItemList.Old_Circuit_Data); + setItemList(ItemList.Circuit_Elite, GregtechItemList.Old_Circuit_Elite); + setItemList(ItemList.Circuit_Master, GregtechItemList.Old_Circuit_Master); + setItemList(ItemList.Circuit_Ultimate, GregtechItemList.Old_Circuit_Ultimate); + + /** + * Try Set New circuits to have old replacements + */ + + //Basic + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Microprocessor"), GregtechItemList.Old_Circuit_Basic); //NEW + } + //Good + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Integrated_Good"), GregtechItemList.Old_Circuit_Good); //New + } + //Advanced + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Nanoprocessor"), GregtechItemList.Old_Circuit_Advanced); + } + //Data + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Quantumprocessor"), GregtechItemList.Old_Circuit_Data); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Nanocomputer"), GregtechItemList.Old_Circuit_Data); + } + //Elite + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Crystalprocessor"), GregtechItemList.Old_Circuit_Elite); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Quantumcomputer"), GregtechItemList.Old_Circuit_Elite); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Elitenanocomputer"), GregtechItemList.Old_Circuit_Elite); + } + //Master + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Neuroprocessor"), GregtechItemList.Old_Circuit_Master); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Masterquantumcomputer"), GregtechItemList.Old_Circuit_Master); + } + //Ultimate + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Wetwarecomputer"), GregtechItemList.Old_Circuit_Ultimate); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Ultimatecrystalcomputer"), GregtechItemList.Old_Circuit_Ultimate); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Quantummainframe"), GregtechItemList.Old_Circuit_Ultimate); + } + //Superconductor + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Wetwaresupercomputer"), GregtechItemList.Circuit_IV); + } + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Crystalmainframe"), GregtechItemList.Circuit_IV); + } + //Infinite + if (newVersion) { + setItemList(ItemList.valueOf("Circuit_Wetwaremainframe"), GregtechItemList.Circuit_LuV); + } + + //set data orbs and sticks to their new replacements + setItemList(ItemList.Tool_DataStick, GregtechItemList.Old_Tool_DataStick); + setItemList(ItemList.Tool_DataOrb, GregtechItemList.Old_Tool_DataOrb); + + setItemList(ItemList.Circuit_Board_Basic, GregtechItemList.Old_Circuit_Board_Basic); + setItemList(ItemList.Circuit_Board_Advanced, GregtechItemList.Old_Circuit_Board_Advanced); + setItemList(ItemList.Circuit_Board_Elite, GregtechItemList.Old_Circuit_Board_Elite); + setItemList(ItemList.Circuit_Parts_Advanced, GregtechItemList.Old_Circuit_Parts_Advanced); + setItemList(ItemList.Circuit_Parts_Wiring_Basic, GregtechItemList.Old_Circuit_Parts_Wiring_Basic); + setItemList(ItemList.Circuit_Parts_Wiring_Advanced, GregtechItemList.Old_Circuit_Parts_Wiring_Advanced); + setItemList(ItemList.Circuit_Parts_Wiring_Elite, GregtechItemList.Old_Circuit_Parts_Wiring_Elite); + setItemList(ItemList.Circuit_Parts_Crystal_Chip_Elite, GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite); + setItemList(ItemList.Circuit_Parts_Crystal_Chip_Master, GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master); + + return true; + } + + private static boolean generateTradeRecipes(){ + + //Data stick and Data orbs. + //GT Type to GT++ Type + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32708", 32708, 1), null, null, + null, null, null, + GregtechItemList.Old_Tool_DataStick.get(1)); + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32707", 32707, 1), null, null, + null, null, null, + GregtechItemList.Old_Tool_DataOrb.get(1)); + + //GT++ Type to GT Type + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + GregtechItemList.Old_Tool_DataStick.get(1), null, null, + null, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32708", 32708, 1)); + RecipeUtils.recipeBuilder( + CI.craftingToolScrewdriver, null, null, + GregtechItemList.Old_Tool_DataOrb.get(1), null, null, + null, null, null, + ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32707", 32707, 1)); + + + + //Primitive + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32700", 32700, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitPrimitive", 1)); + + //Basic + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32701", 32701, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 1)); + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32078", 32078, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitBasic", 1)); + + //Good + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32702", 32702, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 1)); + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32702", 32702, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 1)); + + //Advanced + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32703", 32703, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 1)); + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32703", 32703, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitAdvanced", 1)); + + //Data + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32704", 32704, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 1)); + + //Elite + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32705", 32705, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 1)); + + //Master + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32706", 32706, 1)}, + ItemUtils.getItemStackOfAmountFromOreDict("circuitMaster", 1)); + + + + //Components + //Green Chip + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32713", 32713, 1)}, + GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.get(1)); + //Blue Chip + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32714", 32714, 1)}, + GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.get(1)); + + //Basic Board + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32710", 32710, 1)}, + GregtechItemList.Old_Circuit_Board_Basic.get(1)); + //Advanced Board + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32711", 32711, 1)}, + GregtechItemList.Old_Circuit_Board_Advanced.get(1)); + //Elite Board + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32712", 32712, 1)}, + GregtechItemList.Old_Circuit_Board_Elite.get(1)); + + + //remove a few recipes + /*GT_ModHandler.removeRecipeByOutput(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32070", 32070, 1)); + GT_ModHandler.removeRecipeByOutput(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.03:32069", 32069, 1)); + if (LoadedMods.Extra_Utils){ + ItemStack EQU = ItemUtils.simpleMetaStack("ExtraUtilities:enderQuarryUpgrade", 0, 1); + if (EQU != null){ + GT_ModHandler.removeRecipeByOutput(EQU); + GT_Values.RA.addAssemblerRecipe( + ItemUtils.simpleMetaStack("ExtraUtilities:decorativeBlock1:12", 12, 1), + GregtechItemList.Old_Circuit_Master.get(1), + EQU, + 80*20, + 2); + } + } + if (LoadedMods.GalacticraftCore){ + ItemStack ACW = ItemUtils.simpleMetaStack("GalacticraftCore:item.basicItem:14", 14, 1); + if (ACW != null){ + GT_ModHandler.removeRecipeByOutput(ACW); + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", 1), + GregtechItemList.Old_Circuit_Board_Advanced.get(1), + ACW, + 160*20, + 4); + } + ItemStack ACW2 = ItemUtils.simpleMetaStack("GalacticraftCore:item.basicItem:13", 13, 1); + if (ACW2 != null){ + GT_ModHandler.removeRecipeByOutput(ACW2); + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("gemDiamond", 1), + GregtechItemList.Old_Circuit_Board_Basic.get(1), + ACW2, + 80*20, + 2); + } + }*/ + + return true; + } + + private static boolean hideCircuitsNEI(){ + Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); + if (isNEILoaded && !CORE.ConfigSwitches.showHiddenNEIItems){ + Logger.INFO("[Old Feature - Circuits] Hiding .28+ circuits in NEI."); + String[] CircuitToHide = { + "Circuit_Board_Basic", + "Circuit_Board_Advanced", + "Circuit_Board_Elite", + "Circuit_Parts_Advanced", + "Circuit_Parts_Wiring_Basic", + "Circuit_Parts_Wiring_Advanced", + "Circuit_Parts_Wiring_Elite", + "Circuit_Parts_Crystal_Chip_Elite", + "Circuit_Parts_Crystal_Chip_Master", + "Circuit_Primitive", + "Circuit_Basic", + "Circuit_Integrated_Good", + "Circuit_Good", + "Circuit_Advanced", + "Circuit_Data", + "Circuit_Elite", + "Circuit_Master", + "Circuit_Ultimate", + "Circuit_Board_Coated", + "Circuit_Board_Phenolic", + "Circuit_Board_Epoxy", + "Circuit_Board_Fiberglass", + "Circuit_Board_Multifiberglass", + "Circuit_Board_Wetware", + "Circuit_Parts_Resistor", + "Circuit_Parts_ResistorSMD", + "Circuit_Parts_Glass_Tube", + "Circuit_Parts_Vacuum_Tube", + "Circuit_Parts_Coil", + "Circuit_Parts_Diode", + "Circuit_Parts_DiodeSMD", + "Circuit_Parts_Transistor", + "Circuit_Parts_TransistorSMD", + "Circuit_Parts_Capacitor", + "Circuit_Parts_CapacitorSMD", + "Circuit_Silicon_Ingot", + "Circuit_Silicon_Ingot2", + "Circuit_Silicon_Ingot3", + "Circuit_Silicon_Wafer", + "Circuit_Silicon_Wafer2", + "Circuit_Silicon_Wafer3", + "Circuit_Wafer_ILC", + "Circuit_Chip_ILC", + "Circuit_Wafer_Ram", + "Circuit_Chip_Ram", + "Circuit_Wafer_NAND", + "Circuit_Chip_NAND", + "Circuit_Wafer_NOR", + "Circuit_Chip_NOR", + "Circuit_Wafer_CPU", + "Circuit_Chip_CPU", + "Circuit_Wafer_SoC", + "Circuit_Chip_SoC", + "Circuit_Wafer_SoC2", + "Circuit_Chip_SoC2", + "Circuit_Wafer_PIC", + "Circuit_Chip_PIC", + "Circuit_Wafer_HPIC", + "Circuit_Chip_HPIC", + "Circuit_Wafer_NanoCPU", + "Circuit_Chip_NanoCPU", + "Circuit_Wafer_QuantumCPU", + "Circuit_Chip_QuantumCPU", + "Circuit_Chip_CrystalCPU", + "Circuit_Chip_CrystalSoC", + "Circuit_Chip_NeuroCPU", + "Circuit_Chip_Stemcell", + "Circuit_Processor", + "Circuit_Computer", + "Circuit_Nanoprocessor", + "Circuit_Nanocomputer", + "Circuit_Elitenanocomputer", + "Circuit_Quantumprocessor", + "Circuit_Quantumcomputer", + "Circuit_Masterquantumcomputer", + "Circuit_Quantummainframe", + "Circuit_Crystalprocessor", + "Circuit_Crystalcomputer", + "Circuit_Ultimatecrystalcomputer", + "Circuit_Crystalmainframe", + "Circuit_Neuroprocessor", + "Circuit_Wetwarecomputer", + "Circuit_Wetwaresupercomputer", + "Circuit_Wetwaremainframe", + "Circuit_Parts_RawCrystalChip", + //Circuits Additions in .30/.31 + "Circuit_Board_Plastic", + "Circuit_Parts_GlassFiber", + "Circuit_Parts_PetriDish", + "Circuit_Microprocessor" + }; + + for (String component : CircuitToHide){ + try { + ItemUtils.hideItemFromNEI(ItemUtils.getValueOfItemList(component, null).get(1L, new Object[0])); + } catch (IllegalArgumentException I){ + Logger.INFO("Could not find "+component+" in the Gregtech item list."); + Logger.INFO("This is NOT an error, simply a notification."); + } + } + } + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java new file mode 100644 index 0000000000..97636e9e65 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java @@ -0,0 +1,226 @@ +package gtPlusPlus.core.recipe; + +import static gtPlusPlus.core.material.MISC_MATERIALS.BRINE; +import static gtPlusPlus.core.material.MISC_MATERIALS.HYDROGEN_CHLORIDE; +import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_HIGH; +import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_LOW; +import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_MID; +import static gtPlusPlus.core.material.MISC_MATERIALS.SALT_WATER; +import static gtPlusPlus.core.material.MISC_MATERIALS.SODIUM_CHLORIDE; +import static gtPlusPlus.core.material.MISC_MATERIALS.SODIUM_HYDROXIDE; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.ORES; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class RECIPES_RareEarthProcessing { + + private static ItemStack mDustSodiumHydroxide; + private static ItemStack mDustSalt; + private static FluidStack mSaltWater; + private static FluidStack mBrine; + private static FluidStack mHydrogenChloride; + + public static void init() { + + // Salt Check and Assignment + mDustSalt = ItemUtils.getItemStackOfAmountFromOreDict("dustSalt", 1); + if (mDustSalt == null) { + MaterialUtils.generateSpecialDustAndAssignToAMaterial(SODIUM_CHLORIDE, false); + mDustSalt = SODIUM_CHLORIDE.getDust(1); + } + else { + SODIUM_CHLORIDE.registerComponentForMaterial(OrePrefixes.dust, mDustSalt); + } + + // Salt water Check and Assignment + mSaltWater = FluidUtils.getFluidStack("saltwater", 1000); + if (mSaltWater == null) { + Fluid f = SALT_WATER.generateFluid(); + SALT_WATER.registerComponentForMaterial(FluidUtils.getFluidStack(f, 1000)); + mSaltWater = SALT_WATER.getFluidStack(1000); + } + else { + SALT_WATER.registerComponentForMaterial(FluidUtils.getFluidStack(mSaltWater, 1000)); + } + + // Brine Check and assignment + mBrine = FluidUtils.getFluidStack("brine", 1000); + if (mBrine == null) { + Fluid f = BRINE.generateFluid(); + BRINE.registerComponentForMaterial(FluidUtils.getFluidStack(f, 1000)); + mBrine = BRINE.getFluidStack(1000); + } + else { + BRINE.registerComponentForMaterial(FluidUtils.getFluidStack(mBrine, 1000)); + } + + // Check Sodium Hydroxide Exists, generate if not. + mDustSodiumHydroxide = ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1); + if (mDustSodiumHydroxide == null) { + mDustSodiumHydroxide = ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide_GT5U", 1); + if (mDustSodiumHydroxide == null) { + MaterialUtils.generateSpecialDustAndAssignToAMaterial(SODIUM_HYDROXIDE, false); + mDustSodiumHydroxide = SODIUM_HYDROXIDE.getDust(1); + } + else { + SODIUM_HYDROXIDE.registerComponentForMaterial(OrePrefixes.dust, mDustSodiumHydroxide); + } + } + else { + SODIUM_HYDROXIDE.registerComponentForMaterial(OrePrefixes.dust, mDustSodiumHydroxide); + } + + // Hydrogen Chloride Check and assignment + mHydrogenChloride = FluidUtils.getFluidStack("hydrogenchloride", 1000); + if (mHydrogenChloride == null) { + HYDROGEN_CHLORIDE.generateFluid(); + mHydrogenChloride = BRINE.getFluidStack(1000); + } + else { + HYDROGEN_CHLORIDE.registerComponentForMaterial(FluidUtils.getFluidStack(mHydrogenChloride, 1000)); + } + + + // Add Process for creating Brine + CORE.RA.addBrewingRecipe( + ItemUtils.getSimpleStack(mDustSalt, 16), + MISC_MATERIALS.SALT_WATER.getFluidStack(2000), + FluidUtils.getFluidStack(mBrine, 4000), + 20 * 20, + 120, + false); + + // Chloralkali process + GT_Values.RA.addElectrolyzerRecipe( + CI.getNumberedCircuit(16), + CI.emptyCells(4), + FluidUtils.getFluidStack(mBrine, 4000), + null, // Out + ItemUtils.getItemStackOfAmountFromOreDict("cellChlorine", 2), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2), + ItemUtils.getSimpleStack(mDustSodiumHydroxide, 2), + null, + null, + null, + new int[] {10000, 10000, 10000}, + 20 * 30, + (int) GT_Values.V[2]); + + // Generate Special Laser Recipe + CORE.RA.addUvLaserRecipe( + ELEMENT.getInstance().CHLORINE.getCell(2), + ELEMENT.getInstance().HYDROGEN.getCell(2), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 4), + 20 * 30, + 480); + + + // Set Material Tiers correctly + ORES.GREENOCKITE.vTier = 1; + RARE_EARTH_LOW.vTier = 1; + RARE_EARTH_MID.vTier = 3; + RARE_EARTH_HIGH.vTier = 5; + + // Set Material Voltages correctly + ORES.GREENOCKITE.vVoltageMultiplier = 30; + RARE_EARTH_LOW.vVoltageMultiplier = 30; + RARE_EARTH_MID.vVoltageMultiplier = 480; + RARE_EARTH_HIGH.vVoltageMultiplier = 7680; + + // Set Material Tooltips to be shorter + RARE_EARTH_LOW.vChemicalFormula = "??????"; + RARE_EARTH_MID.vChemicalFormula = "??????"; + RARE_EARTH_HIGH.vChemicalFormula = "??????"; + + // Set Material Tooltips to be shorter + RARE_EARTH_LOW.vChemicalSymbol = "??"; + RARE_EARTH_MID.vChemicalSymbol = "??"; + RARE_EARTH_HIGH.vChemicalSymbol = "??"; + + // Generate Ore Materials + MaterialGenerator.generateOreMaterial(RARE_EARTH_LOW); + MaterialGenerator.generateOreMaterial(RARE_EARTH_MID); + MaterialGenerator.generateOreMaterial(RARE_EARTH_HIGH); + + ItemStack aRareEarth = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RareEarth, 1L); + + Fluid aSulfuric = FluidUtils.getFluidStack("sulfuricacid", 1).getFluid(); + Fluid aHydrocholric = FluidUtils.getFluidStack("hydrogenchloride", 1).getFluid(); + Fluid aNitric = FluidUtils.getFluidStack("hydrofluoricacid", 1).getFluid(); + + + + // LV Rare Earth + GT_Values.RA.addChemicalBathRecipe( + ItemUtils.getSimpleStack(aRareEarth, 3), + FluidUtils.getFluidStack(aSulfuric, 1000), + RARE_EARTH_LOW.getCrushed(1), + RARE_EARTH_LOW.getCrushed(1), + RARE_EARTH_LOW.getCrushed(1), + new int[] {10000, 10000, 9000}, + 20 * 30, + (int) GT_Values.V[1]); + + // HV Rare Earth + GT_Values.RA.addChemicalBathRecipe( + ItemUtils.getSimpleStack(aRareEarth, 6), + FluidUtils.getFluidStack(aHydrocholric, 3000), + RARE_EARTH_MID.getCrushed(2), + RARE_EARTH_MID.getCrushed(2), + RARE_EARTH_MID.getCrushed(2), + new int[] {10000, 9000, 8000}, + 20 * 60, + (int) GT_Values.V[3]); + + // IV Rare Earth + GT_Values.RA.addChemicalBathRecipe( + ItemUtils.getSimpleStack(aRareEarth, 9), + FluidUtils.getFluidStack(aNitric, 6000), + RARE_EARTH_HIGH.getCrushed(3), + RARE_EARTH_HIGH.getCrushed(3), + RARE_EARTH_HIGH.getCrushed(3), + new int[] {9000, 8000, 7000}, + 20 * 90, + (int) GT_Values.V[5]); + + + } + + + public static void processCopperRecipes() { + + // Rare Earth Processing + /*GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1), + new ItemStack[] { + ELEMENT.getInstance().YTTRIUM.getSmallDust(1), + ELEMENT.getInstance().NEODYMIUM.getSmallDust(1), + ELEMENT.getInstance().LANTHANUM.getSmallDust(1), + ELEMENT.getInstance().CERIUM.getSmallDust(1), + ELEMENT.getInstance().CADMIUM.getSmallDust(1), + ELEMENT.getInstance().CAESIUM.getSmallDust(1), + ORES.SAMARSKITE_YB.getSmallDust(1), + ORES.FLORENCITE.getSmallDust(1), + ORES.FLUORCAPHITE.getSmallDust(1), + //ELEMENT.getInstance().YTTERBIUM.getTinyDust(1), + //ELEMENT.getInstance().SAMARIUM.getTinyDust(1), + //ELEMENT.getInstance().GADOLINIUM.getTinyDust(1) + }, + new int[] { 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000 }, 20 * 30, 500);*/ + + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java new file mode 100644 index 0000000000..9a2ea8bad0 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java @@ -0,0 +1,222 @@ +package gtPlusPlus.core.recipe; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.reflect.AddGregtechRecipe; +import net.minecraft.item.ItemStack; + +public class RECIPES_SeleniumProcessing { + + public static void init() { + + //We need this + MaterialUtils.generateSpecialDustAndAssignToAMaterial(MISC_MATERIALS.SELENIUM_DIOXIDE, false); + + // Makes Selenium Dioxide + processCopperRecipes(); + + //Liquify the Dried Dioxide + AddGregtechRecipe.addCokeAndPyrolyseRecipes(MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), 13, FluidUtils.getSteam(500), null, MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(1000), 20, 1024); + + // Produce Selenious Acid + AddGregtechRecipe.addCokeAndPyrolyseRecipes(MISC_MATERIALS.SELENIUM_DIOXIDE.getCell(1), 14, FluidUtils.getHotWater(4000), CI.emptyCells(1), MISC_MATERIALS.SELENIOUS_ACID.getFluidStack(1000), 20, 2048); + + // Make Selenium + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(14), + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 8), + ELEMENT.getInstance().CARBON.getDust(16), + }, + MISC_MATERIALS.SELENIOUS_ACID.getFluidStack(750), + ELEMENT.getInstance().SELENIUM.getFluidStack(144 * 1), + new ItemStack[] { + CI.emptyCells(8), + ELEMENT.getInstance().SELENIUM.getIngot(1), + ELEMENT.getInstance().SELENIUM.getIngot(1), + }, + new int[] {10000, 2000, 2000}, + 20 * 300, + 7200); + + + /*// Old recipes for Selenium Roasting + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(16), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPyrite", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(4000), + ELEMENT.getInstance().SELENIUM.getFluid(144), + 0, + 20 * 300, + 2000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(17), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedChalcopyrite", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(4000), + ELEMENT.getInstance().SELENIUM.getFluid(144), + 0, + 20 * 300, + 2000); + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(18), + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedGalena", 8), + ELEMENT.getInstance().CARBON.getDust(32), + }, + Materials.SulfuricAcid.getFluid(4000), + ELEMENT.getInstance().SELENIUM.getFluid(144), + 0, + 20 * 300, + 2000);*/ + } + + + public static void processCopperRecipes() { + + //Copper + CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + CI.getNumberedAdvancedCircuit(23), + ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Copper, 1), // Item Input + }, + FluidUtils.getHotWater(1000), // Fluid + MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(20), // Fluid + new ItemStack[] { + ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Copper, 1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + }, // Output + new int[] { + 10000, + 100, + 100, + 500, + 500, + 500, + 1000, + 1000, + 1000 + }, + 40 * 20, // Time in ticks + 1024); // EU + + //Tetra + CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + CI.getNumberedAdvancedCircuit(23), + ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Tetrahedrite, 1), // Item Input + }, + FluidUtils.getHotWater(1000), // Fluid + MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(10), // Fluid + new ItemStack[] { + ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Tetrahedrite, 1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + }, // Output + new int[] { + 10000, + 100, + 100, + 300, + 300, + 300, + 800, + 800, + 800 + }, + 40 * 20, // Time in ticks + 1024); // EU + + //Chalco + CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + CI.getNumberedAdvancedCircuit(23), + ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1), // Item Input + }, + FluidUtils.getHotWater(1000), // Fluid + MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(10), // Fluid + new ItemStack[] { + ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Chalcopyrite, 1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + }, // Output + new int[] { + 10000, + 100, + 100, + 300, + 300, + 300, + 800, + 800, + 800 + }, + 40 * 20, // Time in ticks + 1024); // EU + + //Malachite + CORE.RA.addDehydratorRecipe( + new ItemStack[]{ + CI.getNumberedAdvancedCircuit(23), + ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Malachite, 1), // Item Input + }, + FluidUtils.getHotWater(1000), // Fluid + MISC_MATERIALS.SELENIUM_DIOXIDE.getFluidStack(10), // Fluid + new ItemStack[] { + ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Malachite, 1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1), + }, // Output + new int[] { + 10000, + 100, + 100, + 300, + 300, + 300, + 800, + 800, + 800 + }, + 40 * 20, // Time in ticks + 1024); // EU + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java new file mode 100644 index 0000000000..7ffdcf295b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java @@ -0,0 +1,35 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; + +public class RECIPES_Shapeless { + + static ItemStack dustStaballoy; + + //Circuits + static String circuitPrimitive = "circuitPrimitive"; + static String circuitBasic = "circuitBasic"; + static String circuitGood = "circuitGood"; + static String circuitAdvanced = "circuitAdvanced"; + static String circuitData = "circuitData"; + static String circuitElite = "circuitElite"; + static String circuitMaster = "circuitMaster"; + static String circuitUltimate = "circuitUltimate"; + static ItemStack gearboxCasing_Tier_1; + + public static final void loadRecipes(){ + //run(); + Logger.INFO("Loading Shapeless Recipes."); + } + + private static void run(){ + //Gregtech items + if (LoadedMods.Gregtech){ + + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Tools.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Tools.java new file mode 100644 index 0000000000..42448e6b74 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Tools.java @@ -0,0 +1,181 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraftforge.oredict.OreDictionary; + +public class RECIPES_Tools { + + //Outputs + public static ItemStack RECIPE_StaballoyPickaxe = new ItemStack(ModItems.itemStaballoyPickaxe); + public static ItemStack RECIPE_StaballoyAxe = new ItemStack(ModItems.itemStaballoyAxe); + public static ItemStack RECIPE_SandstoneHammer = new ItemStack(ModItems.itemSandstoneHammer); + //public static ItemStack RECIPE_StaballoyIngot = new ItemStack(ModItems.itemIngotStaballoy); + public static ItemStack RECIPE_SandStone = new ItemStack(Blocks.sandstone, 2); + public static ItemStack RECIPE_Sand = new ItemStack(Blocks.sand, 4); + public static ItemStack RECIPE_FireStarter = ItemUtils.getSimpleStack(ModItems.itemBasicFireMaker); + + public static ItemStack RECIPE_DivisionSigil; + + //MC Items + public static Item Apple = Items.apple; + + //MC Blocks + public static Block CobbleStone = Blocks.cobblestone; + public static Block Dirt = Blocks.dirt; + public static Block Sand = Blocks.sand; + public static Block Gravel = Blocks.gravel; + public static Block Sandstone = Blocks.sandstone; + + //null + public static String empty = " "; + + //Batteries + public static String batteryBasic = "batteryBasic"; + public static String batteryAdvanced = "batteryAdvanced"; + public static String batteryElite = "batteryElite"; + public static String batteryMaster = "batteryMaster"; + public static String batteryUltimate = "batteryUltimate"; + + //Circuits + public static String circuitPrimitive = "circuitPrimitive"; + public static String circuitBasic = "circuitBasic"; + public static String circuitGood = "circuitGood"; + public static String circuitAdvanced = "circuitAdvanced"; + public static String circuitElite = "circuitElite"; + public static String circuitMaster = "circuitMaster"; + public static String circuitUltimate = "circuitUltimate"; + + //Cables + public static String cableGt01Electrum = "cableGt01Electrum"; + public static String cableGt02Electrum = "cableGt02Electrum"; + public static String cableGt01RedstoneAlloy = "cableGt01RedstoneAlloy"; + public static String cableGt02RedstoneAlloy = "cableGt02RedstoneAlloy"; + public static String cableGt01Copper = "cableGt01Copper"; + public static String cableGt02Copper = "cableGt02Copper"; + public static String cableGt01AnnealedCopper = "cableGt01AnnealedCopper"; + public static String cableGt02AnnealedCopper = "cableGt02AnnealedCopper"; + + //Rods + public static String stickWood = "stickWood"; + public static String stickStaballoy= "stickStaballoy"; + public static String stickTitanium= "stickTitanium"; + public static String stickIron= "stickIron"; + public static String stickGold= "stickGold"; + public static String stickSilver= "stickSilver"; + public static String stickSteel= "stickSteel"; + public static String stickBronze= "stickBronze"; + public static String stickTungsten= "stickTungsten"; + public static String stickRedAlloy= "stickRedAlloy"; + public static String stickInvar= "stickInvar"; + public static String stickElectrum= "stickElectrum"; + public static String stickElectricalSteel= "stickElectricalSteel"; + + //Plates + public static String plateStaballoy= "plateStaballoy"; + public static String plateTitanium= "plateTitanium"; + public static String plateIron= "plateIron"; + public static String plateGold= "plateGold"; + public static String plateSilver= "plateSilver"; + public static String plateSteel= "plateSteel"; + public static String plateBronze= "plateBronze"; + public static String plateTungsten= "plateTungsten"; + public static String plateRedAlloy= "plateRedAlloy"; + public static String plateInvar= "plateInvar"; + public static String plateElectrum= "plateElectrum"; + public static String plateElectricalSteel= "plateElectricalSteel"; + + //Ingots + public static String ingotStaballoy= "ingotStaballoy"; + public static String ingotTitanium= "ingotTitanium"; + public static String ingotIron= "ingotIron"; + public static String ingotGold= "ingotGold"; + public static String ingotSilver= "ingotSilver"; + public static String ingotSteel= "ingotSteel"; + public static String ingotBronze= "ingotBronze"; + public static String ingotTungsten= "ingotTungsten"; + public static String ingotRedAlloy= "ingotRedAlloy"; + public static String ingotInvar= "ingotInvar"; + public static String ingotElectrum= "ingotElectrum"; + public static String ingotUranium= "ingotUranium"; + public static String ingotElectricalSteel= "ingotElectricalSteel"; + + //Crafting Tools + public static String craftingToolHardHammer = "craftingToolHardHammer"; + public static String craftingToolSoftHammer = "craftingToolSoftHammer"; + public static String craftingToolFile = "craftingToolFile"; + public static String craftingToolSaw = "craftingToolSaw"; + public static String craftingToolPickaxe = "craftingToolPickaxe"; + public static String craftingToolWrench = "craftingToolWrench"; + public static String craftingToolCrowbar = "craftingToolCrowbar"; + public static String craftingToolKnife = "craftingToolKnife"; + public static String craftingToolScrewdriver = "craftingToolScrewdriver"; + + public static ItemStack sandHammer = new ItemStack (ModItems.itemSandstoneHammer, 1, OreDictionary.WILDCARD_VALUE); + public static String craftingToolSandHammer = "craftingToolSandHammer"; + + public static ItemStack personalCloakingDevice = ItemUtils.getSimpleStack(ModItems.itemPersonalCloakingDevice); + public static String plateDoubleNiChrome = "plateDoubleNichrome"; + public static String plateIridiumAlloy = "plateAlloyIridium"; + + public static final void loadRecipes(){ + + + run(); + + } + + private static void run(){ + //Staballoy Pickaxe + RecipeUtils.addShapedRecipe( + plateStaballoy, plateStaballoy, ingotStaballoy, + craftingToolFile, stickTungsten, craftingToolHardHammer, + craftingToolWrench, stickTungsten, craftingToolHardHammer, + RECIPE_StaballoyPickaxe); + + //Staballoy Axe + RecipeUtils.addShapedRecipe( + plateStaballoy, ingotStaballoy, craftingToolHardHammer, + plateStaballoy, stickTungsten, craftingToolHardHammer, + craftingToolFile, stickTungsten, craftingToolWrench, + RECIPE_StaballoyAxe); + + //Cobble to Sand + RecipeUtils.addShapedRecipe( + CobbleStone, CobbleStone, CobbleStone, + CobbleStone, sandHammer, CobbleStone, + CobbleStone, CobbleStone, CobbleStone, + RECIPE_Sand); + + //Sand to Sandstone + RecipeUtils.addShapedRecipe( + Sand, Sand, Sand, + Sand, sandHammer, Sand, + Sand, Sand, Sand, + RECIPE_SandStone); + + //Sandstone Hammer + RecipeUtils.addShapedRecipe( + plateElectrum, ingotElectrum, plateElectrum, + craftingToolScrewdriver, stickBronze, craftingToolHardHammer, + null, stickSteel, null, + RECIPE_SandstoneHammer); + + //Basic Firemaker + RecipeUtils.addShapedRecipe( + "cropWheat", "cropWheat", "cropWheat", + ItemUtils.getSimpleStack(Items.string), stickWood, ItemUtils.getSimpleStack(Items.string), + "cropWheat", "cropWheat", "cropWheat", + RECIPE_FireStarter); + + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPE_Batteries.java b/src/main/java/gtPlusPlus/core/recipe/RECIPE_Batteries.java new file mode 100644 index 0000000000..5476ef0e8d --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPE_Batteries.java @@ -0,0 +1,52 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.ItemList; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class RECIPE_Batteries { + + static ItemStack RECIPE_Battery_Sodium = GregtechItemList.Battery_RE_EV_Sodium.get(1); + static ItemStack RECIPE_Battery_Cadmium = GregtechItemList.Battery_RE_EV_Cadmium.get(1); + static ItemStack RECIPE_Battery_Lithium = GregtechItemList.Battery_RE_EV_Lithium.get(1); + static ItemStack GT_Battery_Sodium = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32539, 1); + static ItemStack GT_Battery_Cadmium = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32537, 1); + static ItemStack GT_Battery_Lithium = ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01", 32538, 1); + static ItemStack machineTransformer_EV; + + public static void loadRecipes(){ + + if (LoadedMods.Gregtech){ + machineTransformer_EV = ItemList.Transformer_EV_HV.get(1); + run(); + } + } + + private static void run(){ + + + RecipeUtils.addShapedGregtechRecipe( + GT_Battery_Sodium, RECIPES_Machines.cableTier4, GT_Battery_Sodium, + CI.circuitTier3, machineTransformer_EV, CI.circuitTier3, + GT_Battery_Sodium, RECIPES_Machines.cableTier4, GT_Battery_Sodium, + RECIPE_Battery_Sodium); + RecipeUtils.addShapedGregtechRecipe( + GT_Battery_Cadmium, RECIPES_Machines.cableTier4, GT_Battery_Cadmium, + CI.circuitTier3, machineTransformer_EV, CI.circuitTier3, + GT_Battery_Cadmium, RECIPES_Machines.cableTier4, GT_Battery_Cadmium, + RECIPE_Battery_Cadmium); + RecipeUtils.addShapedGregtechRecipe( + GT_Battery_Lithium, RECIPES_Machines.cableTier4, GT_Battery_Lithium, + CI.circuitTier3, machineTransformer_EV, CI.circuitTier3, + GT_Battery_Lithium, RECIPES_Machines.cableTier4, GT_Battery_Lithium, + RECIPE_Battery_Lithium); + + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/ShapedRecipeObject.java b/src/main/java/gtPlusPlus/core/recipe/ShapedRecipeObject.java new file mode 100644 index 0000000000..0d25d2bec9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/ShapedRecipeObject.java @@ -0,0 +1,43 @@ +package gtPlusPlus.core.recipe; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.RecipeUtils; + +public class ShapedRecipeObject { + + public Object object_A; + public Object object_B; + public Object object_C; + public Object object_D; + public Object object_E; + public Object object_F; + public Object object_G; + public Object object_H; + public Object object_I; + public ItemStack object_OUTPUT; + + public ShapedRecipeObject( + final Object input_A,final Object input_B,final Object input_C, + final Object input_D,final Object input_E,final Object input_F, + final Object input_G,final Object input_H,final Object input_I, + final ItemStack input_Output){ + this.object_A = input_A; + this.object_B = input_B; + this.object_C = input_C; + this.object_D = input_D; + this.object_E = input_E; + this.object_F = input_F; + this.object_G = input_G; + this.object_H = input_H; + this.object_I = input_I; + this.object_OUTPUT = input_Output; + Logger.SPECIFIC_WARNING("ShapedRecipeObject", "New object created.", 36); + } + + public void buildRecipe(){ + RecipeUtils.recipeBuilder(this.object_A, this.object_B, this.object_C, this.object_D, this.object_E, this.object_F, this.object_G, this.object_H, this.object_I, this.object_OUTPUT); + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/common/CI.java b/src/main/java/gtPlusPlus/core/recipe/common/CI.java new file mode 100644 index 0000000000..0a1b762a97 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/recipe/common/CI.java @@ -0,0 +1,1343 @@ +package gtPlusPlus.core.recipe.common; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.item.chemistry.GenericChem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.recipe.LOADER_Machine_Components; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import ic2.core.Ic2Items; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class CI { + + //null + public static ItemStack _NULL = ItemUtils.getErrorStack(1); + + //bits + public static long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.BUFFERED; + public static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + + //Circuits + public static Object circuitPrimitive; + public static Object circuitTier1; + public static Object circuitTier2; + public static Object circuitTier3; + public static Object circuitTier4; + public static Object circuitTier5; + public static Object circuitTier6; + public static Object circuitTier7; + public static Object circuitTier8; + public static Object circuitTier9; + + //Machine Components + public static ItemStack electricMotor_ULV; + public static ItemStack electricMotor_LV; + public static ItemStack electricMotor_MV; + public static ItemStack electricMotor_HV; + public static ItemStack electricMotor_EV; + public static ItemStack electricMotor_IV; + public static ItemStack electricMotor_LuV; + public static ItemStack electricMotor_ZPM; + public static ItemStack electricMotor_UV; + public static ItemStack electricMotor_MAX; + public static ItemStack electricPump_ULV; + public static ItemStack electricPump_LV; + public static ItemStack electricPump_MV; + public static ItemStack electricPump_HV; + public static ItemStack electricPump_EV; + public static ItemStack electricPump_IV; + public static ItemStack electricPump_LuV; + public static ItemStack electricPump_ZPM; + public static ItemStack electricPump_UV; + public static ItemStack electricPump_MAX; + public static ItemStack electricPiston_ULV; + public static ItemStack electricPiston_LV; + public static ItemStack electricPiston_MV; + public static ItemStack electricPiston_HV; + public static ItemStack electricPiston_EV; + public static ItemStack electricPiston_IV; + public static ItemStack electricPiston_LuV; + public static ItemStack electricPiston_ZPM; + public static ItemStack electricPiston_UV ; + public static ItemStack electricPiston_MAX; + public static ItemStack robotArm_ULV; + public static ItemStack robotArm_LV; + public static ItemStack robotArm_MV; + public static ItemStack robotArm_HV; + public static ItemStack robotArm_EV; + public static ItemStack robotArm_IV; + public static ItemStack robotArm_LuV; + public static ItemStack robotArm_ZPM; + public static ItemStack robotArm_UV; + public static ItemStack robotArm_MAX; + public static ItemStack conveyorModule_ULV; + public static ItemStack conveyorModule_LV; + public static ItemStack conveyorModule_MV; + public static ItemStack conveyorModule_HV; + public static ItemStack conveyorModule_EV; + public static ItemStack conveyorModule_IV; + public static ItemStack conveyorModule_LuV; + public static ItemStack conveyorModule_ZPM; + public static ItemStack conveyorModule_UV; + public static ItemStack conveyorModule_MAX; + public static ItemStack emitter_ULV; + public static ItemStack emitter_LV; + public static ItemStack emitter_MV; + public static ItemStack emitter_HV; + public static ItemStack emitter_EV; + public static ItemStack emitter_IV; + public static ItemStack emitter_LuV; + public static ItemStack emitter_ZPM; + public static ItemStack emitter_UV; + public static ItemStack emitter_MAX; + public static ItemStack fieldGenerator_ULV; + public static ItemStack fieldGenerator_LV; + public static ItemStack fieldGenerator_MV; + public static ItemStack fieldGenerator_HV; + public static ItemStack fieldGenerator_EV; + public static ItemStack fieldGenerator_IV; + public static ItemStack fieldGenerator_LuV; + public static ItemStack fieldGenerator_ZPM; + public static ItemStack fieldGenerator_UV; + public static ItemStack fieldGenerator_MAX; + public static ItemStack sensor_ULV; + public static ItemStack sensor_LV; + public static ItemStack sensor_MV; + public static ItemStack sensor_HV; + public static ItemStack sensor_EV; + public static ItemStack sensor_IV; + public static ItemStack sensor_LuV; + public static ItemStack sensor_ZPM; + public static ItemStack sensor_UV; + public static ItemStack sensor_MAX; + + //Machine Casings + public static ItemStack machineCasing_ULV; + public static ItemStack machineCasing_LV; + public static ItemStack machineCasing_MV; + public static ItemStack machineCasing_HV; + public static ItemStack machineCasing_EV; + public static ItemStack machineCasing_IV; + public static ItemStack machineCasing_LuV; + public static ItemStack machineCasing_ZPM; + public static ItemStack machineCasing_UV; + public static ItemStack machineCasing_MAX; + + //Machine Hulls + public static ItemStack machineHull_ULV; + public static ItemStack machineHull_LV; + public static ItemStack machineHull_MV; + public static ItemStack machineHull_HV; + public static ItemStack machineHull_EV; + public static ItemStack machineHull_IV; + public static ItemStack machineHull_LuV; + public static ItemStack machineHull_ZPM; + public static ItemStack machineHull_UV; + public static ItemStack machineHull_MAX; + + //Gearbox Casings + public static ItemStack gearboxCasing_Tier_1; + public static ItemStack gearboxCasing_Tier_2; + public static ItemStack gearboxCasing_Tier_3; + public static ItemStack gearboxCasing_Tier_4; + + public static String[] component_Plate; + public static String[] component_Rod; + public static String[] component_Ingot; + + //Crafting Tools + public static String craftingToolWrench = "craftingToolWrench"; + public static String craftingToolHammer_Hard = "craftingToolHardHammer"; + public static String craftingToolHammer_Soft = "craftingToolSoftHammer"; + public static String craftingToolScrewdriver = "craftingToolScrewdriver"; + public static String craftingToolFile = "craftingToolFile"; + public static String craftingToolMortar = "craftingToolMortar"; + public static String craftingToolKnife = "craftingToolKnife"; + public static String craftingToolCrowbar = "craftingToolCrowbar"; + public static String craftingToolSaw = "craftingToolSaw"; + public static String craftingToolWireCutter = "craftingToolWirecutter"; + public static String craftingToolSolderingIron = "craftingToolSolderingIron"; + + //Explosives + public static ItemStack explosivePowderKeg; + public static ItemStack explosiveTNT; + public static ItemStack explosiveITNT; + + public static void preInit(){ + + //Tiered Components + component_Plate = new String[]{ + getTieredComponent(OrePrefixes.plate, 0), + getTieredComponent(OrePrefixes.plate, 1), + getTieredComponent(OrePrefixes.plate, 2), + getTieredComponent(OrePrefixes.plate, 3), + getTieredComponent(OrePrefixes.plate, 4), + getTieredComponent(OrePrefixes.plate, 5), + getTieredComponent(OrePrefixes.plate, 6), + getTieredComponent(OrePrefixes.plate, 7), + getTieredComponent(OrePrefixes.plate, 8), + getTieredComponent(OrePrefixes.plate, 9), + getTieredComponent(OrePrefixes.plate, 10), + getTieredComponent(OrePrefixes.plate, 11) + }; + component_Rod = new String[]{ + getTieredComponent(OrePrefixes.stick, 0), + getTieredComponent(OrePrefixes.stick, 1), + getTieredComponent(OrePrefixes.stick, 2), + getTieredComponent(OrePrefixes.stick, 3), + getTieredComponent(OrePrefixes.stick, 4), + getTieredComponent(OrePrefixes.stick, 5), + getTieredComponent(OrePrefixes.stick, 6), + getTieredComponent(OrePrefixes.stick, 7), + getTieredComponent(OrePrefixes.stick, 8), + getTieredComponent(OrePrefixes.stick, 9), + getTieredComponent(OrePrefixes.stick, 10), + getTieredComponent(OrePrefixes.stick, 11) + }; + component_Ingot = new String[]{ + getTieredComponent(OrePrefixes.ingot, 0), + getTieredComponent(OrePrefixes.ingot, 1), + getTieredComponent(OrePrefixes.ingot, 2), + getTieredComponent(OrePrefixes.ingot, 3), + getTieredComponent(OrePrefixes.ingot, 4), + getTieredComponent(OrePrefixes.ingot, 5), + getTieredComponent(OrePrefixes.ingot, 6), + getTieredComponent(OrePrefixes.ingot, 7), + getTieredComponent(OrePrefixes.ingot, 8), + getTieredComponent(OrePrefixes.ingot, 9), + getTieredComponent(OrePrefixes.ingot, 10), + getTieredComponent(OrePrefixes.ingot, 11) + }; + + //Circuits + circuitPrimitive = getTieredCircuit(0); + circuitTier1 = getTieredCircuit(1); + circuitTier2 = getTieredCircuit(2); + circuitTier3 = getTieredCircuit(3); + circuitTier4 = getTieredCircuit(4); + circuitTier5 = getTieredCircuit(5); + circuitTier6 = getTieredCircuit(6); + circuitTier7 = getTieredCircuit(7); + circuitTier8 = getTieredCircuit(8); + circuitTier9 = getTieredCircuit(9); + + } + + public static Object getTieredCircuit(int tier){ + if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + if (tier == 0){ + return GregtechItemList.Old_Circuit_Primitive.get(1); + } + else if (tier == 1){ + return GregtechItemList.Old_Circuit_Basic.get(1); + } + else if (tier == 2){ + return GregtechItemList.Old_Circuit_Good.get(1); + } + else if (tier == 3){ + return GregtechItemList.Old_Circuit_Advanced.get(1); + } + else if (tier == 4){ + return GregtechItemList.Old_Circuit_Data.get(1); + } + else if (tier == 5){ + return GregtechItemList.Old_Circuit_Elite.get(1); + } + else if (tier == 6){ + return GregtechItemList.Old_Circuit_Master.get(1); + } + else if (tier == 7){ + return GregtechItemList.Old_Circuit_Ultimate.get(1); + } + else if (tier == 8){ + return GregtechItemList.Circuit_IV.get(1); + } + else if (tier == 9){ + return GregtechItemList.Circuit_LuV.get(1); + } + else if (tier == 10){ + return GregtechItemList.Circuit_ZPM.get(1); + } + } + else { + return getTieredCircuitOreDictName(tier); + } + return _NULL; + } + + public static ItemStack[] getAllCircuitsOfTier(int tier){ + return ItemUtils.getStackOfAllOreDictGroup(getTieredCircuitOreDictName(tier)); + } + + public static String getTieredCircuitOreDictName(int tier){ + if (tier == 0){ + return "circuitPrimitive"; + } + else if (tier == 1){ + return "circuitBasic"; + } + else if (tier == 2){ + return "circuitGood"; + } + else if (tier == 3){ + return "circuitAdvanced"; + } + else if (tier == 4){ + return "circuitData"; + } + else if (tier == 5){ + return "circuitElite"; + } + else if (tier == 6){ + return "circuitMaster"; + } + else if (tier == 7){ + return "circuitUltimate"; + } + else if (tier == 8){ + return "circuitSuperconductor"; + } + else if (tier == 9){ + return "circuitInfinite"; + } + else if (tier == 10){ + return "circuitQuantum"; + } + else { + return "circuitPrimitive"; + } + } + + public static ItemStack getNumberedCircuit(int Meta){ + return ItemUtils.getGregtechCircuit(Meta); + } + + private static Object getMaterialFromTier(int tier){ + if (tier == 0){ + return Materials.Wood; + } + else if (tier == 1){ + return Materials.Lead; + } + else if (tier == 2){ + return Materials.Bronze; + } + else if (tier == 3){ + return Materials.Steel; + } + else if (tier == 4){ + return ALLOY.EGLIN_STEEL; + } + else if (tier == 5){ + return Materials.Aluminium; + } + else if (tier == 6){ + return ALLOY.MARAGING250; + } + else if (tier == 7){ + return ALLOY.TANTALLOY_61; + } + else if (tier == 8){ + return ALLOY.INCONEL_792; + } + else if (tier == 9){ + return ALLOY.ZERON_100; + } + else if (tier == 10){ + return Materials.NaquadahEnriched; + } + else if (tier == 11){ + return Materials.Neutronium; + } + return Materials._NULL; + } + + @Deprecated + public static String getTieredComponent(OrePrefixes type, int tier){ + Object material = getMaterialFromTier(tier); + if (material != null){ + if (material instanceof Materials){ + //return (ItemStack) type.get(material); + String materialName = ((Materials) material).mDefaultLocalName; + Logger.INFO("Searching for a component named "+type.name()+materialName); + //return ItemUtils.getItemStackOfAmountFromOreDict(type.name()+materialName, 1); + return (type.name()+materialName); + } + else { + String materialName = (Utils.sanitizeString(((Material) material).getLocalizedName())); + Logger.INFO("Searching for a component named "+type.name()+materialName); + //return ItemUtils.getItemStackOfAmountFromOreDict(type.name()+materialName, 1); + return (type.name()+materialName); + } + } + Logger.INFO("[Components] Failed getting a tiered component. "+type.name()+" | "+tier); + return null; + } + + public static ItemStack getDataOrb(){ + if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + return GregtechItemList.Old_Tool_DataOrb.get(1); + } + else { + return ItemList.Tool_DataOrb.get(1); + } + } + + public static ItemStack getDataStick(){ + if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH){ + return GregtechItemList.Old_Tool_DataStick.get(1); + } + else { + return ItemList.Tool_DataStick.get(1); + } + } + + public static final ItemStack getTieredMachineHull(int tier){ + if (tier == 0){ + return machineHull_ULV; + } + else if (tier == 1){ + return machineHull_LV; + } + else if (tier == 2){ + return machineHull_MV; + } + else if (tier == 3){ + return machineHull_HV; + } + else if (tier == 4){ + return machineHull_EV; + } + else if (tier == 5){ + return machineHull_IV; + } + else if (tier == 6){ + return machineHull_LuV; + } + else if (tier == 7){ + return machineHull_ZPM; + } + else if (tier == 8){ + return machineHull_UV; + } + else if (tier == 9){ + return machineHull_MAX; + } + else { + return GregtechItemList.Casing_Multi_Use.get(1); + } + } + + public static final ItemStack getTieredMachineCasing(int tier){ + if (tier == 0){ + if (machineCasing_ULV == null) { + machineCasing_ULV = ItemList.Casing_ULV.get(1); + } + return machineCasing_ULV; + } + else if (tier == 1){ + return machineCasing_LV; + } + else if (tier == 2){ + return machineCasing_MV; + } + else if (tier == 3){ + return machineCasing_HV; + } + else if (tier == 4){ + return machineCasing_EV; + } + else if (tier == 5){ + return machineCasing_IV; + } + else if (tier == 6){ + return machineCasing_LuV; + } + else if (tier == 7){ + return machineCasing_ZPM; + } + else if (tier == 8){ + return machineCasing_UV; + } + else if (tier == 9){ + return machineCasing_MAX; + } + else { + return GregtechItemList.Casing_Multi_Use.get(1); + } + } + + public static void init() { + //Set Explosives + explosivePowderKeg = ItemUtils.getValueOfItemList("Block_Powderbarrel", 1, ItemUtils.getSimpleStack(Items.gunpowder, 16)); + explosiveTNT = ItemUtils.getSimpleStack(Blocks.tnt).copy(); + explosiveITNT = Ic2Items.industrialTnt.copy(); + + //Machine Casings + machineCasing_ULV = ItemList.Casing_ULV.get(1); + machineCasing_LV = ItemList.Casing_LV.get(1); + machineCasing_MV = ItemList.Casing_MV.get(1); + machineCasing_HV = ItemList.Casing_HV.get(1); + machineCasing_EV = ItemList.Casing_EV.get(1); + machineCasing_IV = ItemList.Casing_IV.get(1); + machineCasing_LuV = ItemList.Casing_LuV.get(1); + machineCasing_ZPM = ItemList.Casing_ZPM.get(1); + machineCasing_UV = ItemList.Casing_UV.get(1); + machineCasing_MAX = ItemList.Casing_MAX.get(1); + + //Machine Hulls + machineHull_ULV = ItemList.Hull_ULV.get(1); + machineHull_LV = ItemList.Hull_LV.get(1); + machineHull_MV = ItemList.Hull_MV.get(1); + machineHull_HV = ItemList.Hull_HV.get(1); + machineHull_EV = ItemList.Hull_EV.get(1); + machineHull_IV = ItemList.Hull_IV.get(1); + machineHull_LuV = ItemList.Hull_LuV.get(1); + machineHull_ZPM = ItemList.Hull_ZPM.get(1); + machineHull_UV = ItemList.Hull_UV.get(1); + machineHull_MAX = ItemList.Hull_MAX.get(1); + + //Gear box Casings + gearboxCasing_Tier_1 = ItemList.Casing_Gearbox_Bronze.get(1); + gearboxCasing_Tier_2 = ItemList.Casing_Gearbox_Steel.get(1); + gearboxCasing_Tier_3 = ItemList.Casing_Gearbox_Titanium.get(1); + gearboxCasing_Tier_4 = ItemList.Casing_Gearbox_TungstenSteel.get(1); + + //Machine Components + LOADER_Machine_Components.initialise(); + } + + public static ItemStack emptyCells(int i) { + return ItemUtils.getEmptyCell(i); + } + + private static final Material[] aMaterial_Main = new Material[] { + ALLOY.POTIN, + ALLOY.TUMBAGA, + ALLOY.EGLIN_STEEL, + ALLOY.INCONEL_792, + ALLOY.TUNGSTEN_TITANIUM_CARBIDE, + ALLOY.NITINOL_60, + ALLOY.ZERON_100, + ALLOY.PIKYONIUM, + ELEMENT.STANDALONE.ADVANCED_NITINOL, + ALLOY.ABYSSAL, + ALLOY.QUANTUM, + ELEMENT.STANDALONE.HYPOGEN + }; + + private static final Material[] aMaterial_Secondary = new Material[] { + ALLOY.STEEL, + ALLOY.SILICON_CARBIDE, + ALLOY.BABBIT_ALLOY, + ALLOY.INCONEL_690, + ALLOY.STELLITE, + ALLOY.ARCANITE, + ALLOY.LAFIUM, + ALLOY.CINOBITE, + ALLOY.TITANSTEEL, + ALLOY.OCTIRON, + ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN, + ELEMENT.STANDALONE.HYPOGEN + }; + + private static final Material[] aMaterial_Tertiary = new Material[] { + ELEMENT.getInstance().LEAD, + ELEMENT.getInstance().ALUMINIUM, + ELEMENT.STANDALONE.BLACK_METAL, + ELEMENT.getInstance().TUNGSTEN, + ALLOY.HASTELLOY_N, + ALLOY.ENERGYCRYSTAL, + ALLOY.TRINIUM_NAQUADAH_CARBON, + ALLOY.TRINIUM_REINFORCED_STEEL, //Arceus + ALLOY.TITANSTEEL, + ELEMENT.STANDALONE.ASTRAL_TITANIUM, + ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN, + ELEMENT.STANDALONE.HYPOGEN + }; + + private static final Materials[] aMaterial_Cables = new Materials[] { + !CORE.GTNH ? Materials.Lead : Materials.Tin, + Materials.Cobalt, + Materials.AnnealedCopper, + Materials.Gold, + Materials.Titanium, + Materials.Nichrome, + Materials.Platinum, + Materials.YttriumBariumCuprate, + Materials.Naquadah, + Materials.Duranium, + Materials.Superconductor, + }; + + private static final Materials[] aMaterial_Circuits = new Materials[] { + Materials.Primitive, + Materials.Basic, + Materials.Good, + Materials.Advanced, + Materials.Data, + Materials.Data, + Materials.Elite, + Materials.Master, + Materials.Ultimate, + Materials.Superconductor, + Materials.Infinite, + }; + + private static final Material[][] aMaster = new Material[][] {aMaterial_Main, aMaterial_Secondary, aMaterial_Tertiary}; + + + public static FluidStack getTieredFluid(int aTier, int aAmount) { + return getTieredFluid(aTier, aAmount, 0); + } + + public static FluidStack getAlternativeTieredFluid(int aTier, int aAmount) { + return getTieredFluid(aTier, aAmount, 1); + } + + public static FluidStack getTertiaryTieredFluid(int aTier, int aAmount) { + return getTieredFluid(aTier, aAmount, 2); + } + + public static FluidStack getTieredFluid(int aTier, int aAmount, int aType) { + // Weird Legacy handling + /*ItemStack aCell = getTieredComponent(OrePrefixes.liquid, aTier, 1); + FluidStack a = GT_Utility.getFluidForFilledItem(aCell, true); + if (a == null) { + a = aMaster[aType][aTier].getFluid(aAmount); + }*/ + + // Modern Handling + FluidStack a = aMaster[aType][aTier].getFluidStack(aAmount); + if (a == null) { + ItemStack aCell = getTieredComponent(OrePrefixes.liquid, aTier, 1); + if (aCell != null) { + a = GT_Utility.getFluidForFilledItem(aCell, true); + a.amount = aAmount; + } + } + return a; + } + + public static ItemStack getEnergyCore(int aTier, int aAmount) { + ItemStack[] aOutput = new ItemStack[] { + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"1", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"2", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"3", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"4", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"5", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"6", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"7", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"8", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"9", 1), + ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore"+"10", 1) + }; + return ItemUtils.getSimpleStack(aOutput[MathUtils.balance(aTier, 0, 9)], aAmount); + } + + public static ItemStack getPlate(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.plate, aTier, aAmount); + } + + public static ItemStack getDoublePlate(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.plateDouble, aTier, aAmount); + } + + public static ItemStack getGear(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.gearGt, aTier, aAmount); + } + + public static ItemStack getIngot(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.ingot, aTier, aAmount); + } + + public static ItemStack getBolt(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.bolt, aTier, aAmount); + } + + public static ItemStack getTieredComponent(OrePrefixes aPrefix, int aTier, int aAmount) { + aTier = Math.max(0, aTier); + + Material m = null; + + if (aPrefix == OrePrefixes.liquid) { + int aMatID = (aTier == 0 || aTier == 2 || aTier == 5 || aTier == 8 ? 0 : (aTier == 1 || aTier == 3 || aTier == 6 || aTier == 9 ? 1 : 2)); + ItemStack aCell = aMaster[aMatID][aTier].getCell(aAmount); + return aCell; + } + + if (aPrefix == OrePrefixes.circuit) { + if (aTier == 4) { + return ItemUtils.getSimpleStack(CI.getDataStick(), aAmount); + } + else if (aTier == 5) { + return ItemUtils.getSimpleStack(CI.getDataOrb(), aAmount); + } + return ItemUtils.getOrePrefixStack(OrePrefixes.circuit, aMaterial_Circuits[aTier], aAmount); + } + + //Check for Cables first, catch SuperConductor case and swap to wire. + if (aPrefix == OrePrefixes.cableGt01 || aPrefix == OrePrefixes.cableGt02 || aPrefix == OrePrefixes.cableGt04 || aPrefix == OrePrefixes.cableGt08 || aPrefix == OrePrefixes.cableGt12) { + //Special Handler + if (aTier == 10) { + if (aPrefix == OrePrefixes.cableGt01) { + aPrefix = OrePrefixes.wireGt02; + } + else if (aPrefix == OrePrefixes.cableGt02) { + aPrefix = OrePrefixes.wireGt04; + } + else if (aPrefix == OrePrefixes.cableGt04) { + aPrefix = OrePrefixes.wireGt08; + } + else if (aPrefix == OrePrefixes.cableGt08) { + aPrefix = OrePrefixes.wireGt12; + } + else if (aPrefix == OrePrefixes.cableGt12) { + aPrefix = OrePrefixes.wireGt16; + } + } + else { + return ItemUtils.getOrePrefixStack(aPrefix, aMaterial_Cables[aTier], aAmount); + } + + + } + if (aPrefix == OrePrefixes.wireGt01 || aPrefix == OrePrefixes.wireGt02 || aPrefix == OrePrefixes.wireGt04 || aPrefix == OrePrefixes.wireGt08 || aPrefix == OrePrefixes.wireGt12 || aPrefix == OrePrefixes.wireGt16) { + return ItemUtils.getOrePrefixStack(aPrefix, aMaterial_Cables[aTier], aAmount); + } + + if (aPrefix == OrePrefixes.pipeTiny || aPrefix == OrePrefixes.pipeSmall || aPrefix == OrePrefixes.pipe || aPrefix == OrePrefixes.pipeMedium || aPrefix == OrePrefixes.pipeLarge || aPrefix == OrePrefixes.pipeHuge) { + + if (aPrefix == OrePrefixes.pipe) { + aPrefix = OrePrefixes.pipeMedium; + } + + if (aTier == 0) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.Lead, aAmount); + } + else if (aTier == 1) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.Steel, aAmount); + } + else if (aTier == 2) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.StainlessSteel, aAmount); + } + else if (aTier == 3) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.Tungsten, aAmount); + } + else if (aTier == 4) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.TungstenSteel, aAmount); + } + else if (aTier == 5) { + return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.MARAGING350, aAmount); + } + else if (aTier == 6) { + return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.STABALLOY, aAmount); + } + else if (aTier == 7) { + return ItemUtils.getOrePrefixStack(aPrefix, ALLOY.HASTELLOY_X, aAmount); + } + else if (aTier == 8) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.Ultimate, aAmount); + } + else if (aTier == 9) { + return ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, aAmount); + } + else if (aTier == 10) { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.Europium, aAmount); + } + else { + return ItemUtils.getOrePrefixStack(aPrefix, Materials.Titanium, aAmount); + } + } + + if (aPrefix == OrePrefixes.rod) { + aPrefix = OrePrefixes.stick; + } + + if (aPrefix == OrePrefixes.gear || aPrefix == OrePrefixes.gearGt) { + m = aMaster[0][aTier]; + } + else if (aPrefix == OrePrefixes.rod || aPrefix == OrePrefixes.stick) { + m = aMaster[0][aTier]; + } + else if (aPrefix == OrePrefixes.stickLong) { + m = aMaster[1][aTier]; + } + else if (aPrefix == OrePrefixes.bolt) { + m = aMaster[2][aTier]; + } + else if (aPrefix == OrePrefixes.screw) { + m = aMaster[0][aTier]; + } + else if (aPrefix == OrePrefixes.rotor) { + m = aMaster[1][aTier]; + } + else if (aPrefix == OrePrefixes.frame || aPrefix == OrePrefixes.frameGt) { + m = aMaster[2][aTier]; + } + else if (aPrefix == OrePrefixes.ingot) { + m = aMaster[1][aTier]; + } + else if (aPrefix == OrePrefixes.plate) { + m = aMaster[0][aTier]; + } + else if (aPrefix == OrePrefixes.plateDouble) { + m = aMaster[0][aTier]; + } + else if (aPrefix == OrePrefixes.ring) { + m = aMaster[2][aTier]; + } + else if (aPrefix == OrePrefixes.cell) { + m = aMaster[1][aTier]; + } + else { + m = aMaterial_Main[aTier]; + } + + ItemStack aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); + + //If Invalid, Try First Material + if (!ItemUtils.checkForInvalidItems(aReturn)) { + m = aMaster[0][aTier]; + aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); + + //If Invalid, Try Second Material + if (!ItemUtils.checkForInvalidItems(aReturn)) { + m = aMaster[1][aTier]; + aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); + + //If Invalid, Try Third Material + if (!ItemUtils.checkForInvalidItems(aReturn)) { + m = aMaster[2][aTier]; + aReturn = ItemUtils.getOrePrefixStack(aPrefix, m, aAmount); + + //All Invalid? Ok, shit. + //Let's add a special error ingot. + if (!ItemUtils.checkForInvalidItems(aReturn)) { + aReturn = ItemUtils.getErrorStack(1, (aPrefix.toString()+m.getLocalizedName()+" x"+aAmount)); + } + } + } + } + + return aReturn; + + + } + + public static ItemStack getElectricMotor(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.electricMotor_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricMotor_MAX; + } + else { + aType = CI.electricMotor_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getElectricPiston(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.electricPiston_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPiston_MAX; + } + else { + aType = CI.electricPiston_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getElectricPump(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.electricPump_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.electricPump_MAX; + } + else { + aType = CI.electricPump_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getRobotArm(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.robotArm_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.robotArm_MAX; + } + else { + aType = CI.robotArm_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getConveyor(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.conveyorModule_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.conveyorModule_MAX; + } + else { + aType = CI.conveyorModule_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getEmitter(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.emitter_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.emitter_MAX; + } + else { + aType = CI.emitter_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getSensor(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.sensor_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.sensor_MAX; + } + else { + aType = CI.sensor_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getFieldGenerator(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.fieldGenerator_MAX; + } + else { + aType = CI.fieldGenerator_LV; + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + + + public static ItemStack getTieredMachineHull(int aTier, int aSize) { + ItemStack aType; + int aLazyTier = 0; + if (aTier == aLazyTier++) { + aType = CI.machineHull_ULV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_LV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_MV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_HV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_EV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_IV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_LuV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_ZPM; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_UV; + } + else if (aTier == aLazyTier++) { + aType = CI.machineHull_MAX; + } + else { + aType = GregtechItemList.Casing_Multi_Use.get(1, CI.machineHull_MV); + } + return ItemUtils.getSimpleStack(aType, aSize); + } + + public static ItemStack getHeatCoil(int i) { + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + if (i == 1) { + return ItemList.Casing_Coil_Kanthal.get(1); + } else if (i == 2) { + return ItemList.Casing_Coil_Nichrome.get(1); + } else { + return ItemList.Casing_Coil_Cupronickel.get(1); + } + } else { + if (!CORE.GTNH) { + if (i > 6) { + i = 6; + } + } else { + if (i > 8) { + i = 8; + } + } + return ItemUtils.simpleMetaStack(StaticFields59.getBlockCasings5(), i, 1); + } + + } + + public static ItemStack getNumberedBioCircuit(int i) { + return ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, i, 0); + } + + public static ItemStack getNumberedAdvancedCircuit(int i) { + return ItemUtils.simpleMetaStack(GenericChem.mAdvancedCircuit, i, 0); + } + + public static ItemStack getTieredGTPPMachineCasing(int aTier, int aAmount) { + GregtechItemList[] aHulls = new GregtechItemList[] { + GregtechItemList.GTPP_Casing_ULV, + GregtechItemList.GTPP_Casing_LV, + GregtechItemList.GTPP_Casing_MV, + GregtechItemList.GTPP_Casing_HV, + GregtechItemList.GTPP_Casing_EV, + GregtechItemList.GTPP_Casing_IV, + GregtechItemList.GTPP_Casing_LuV, + GregtechItemList.GTPP_Casing_ZPM, + GregtechItemList.GTPP_Casing_UV, + GregtechItemList.GTPP_Casing_MAX + }; + return aHulls[aTier].get(aAmount); + } + + public static ItemStack getTieredComponentOfMaterial(Materials aMaterial, OrePrefixes aPrefix, int aAmount) { + return ItemUtils.getOrePrefixStack(aPrefix, aMaterial, aAmount); + } + + public static ItemStack getTransmissionComponent(int aTier, int aAmount) { + GregtechItemList[] aTransParts = new GregtechItemList[] { + GregtechItemList.TransmissionComponent_ULV, + GregtechItemList.TransmissionComponent_LV, + GregtechItemList.TransmissionComponent_MV, + GregtechItemList.TransmissionComponent_HV, + GregtechItemList.TransmissionComponent_EV, + GregtechItemList.TransmissionComponent_IV, + GregtechItemList.TransmissionComponent_LuV, + GregtechItemList.TransmissionComponent_ZPM, + GregtechItemList.TransmissionComponent_UV, + GregtechItemList.TransmissionComponent_MAX, + }; + return aTransParts[aTier].get(aAmount); + } + + public static ItemStack getEmptyCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 13, aAmount); + } + + /** + * Aluminium + Silver Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getGreenCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(AgriculturalChem.mAgrichemItem1, 14, aAmount); + } + + /** + * Iron + Copper Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getRedCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 0, aAmount); + } + + /** + * Tungsten + Nickel Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getYellowCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 1, aAmount); + } + + /** + * Cobalt + Titanium Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getBlueCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 2, aAmount); + } + + /** + * Vanadium + Palladium Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getOrangeCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 3, aAmount); + } + + /** + * Iridium + Ruthenium Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getPurpleCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 4, aAmount); + } + + /** + * Aluminium + Nickel Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getBrownCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 5, aAmount); + } + + /** + * Platinum + Rhodium Catalyst + * @param aAmount - Stacksize + * @return - A Catalyst stack of given size + */ + public static ItemStack getPinkCatalyst(int aAmount) { + return ItemUtils.simpleMetaStack(GenericChem.mGenericChemItem1, 6, aAmount); + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotAirFilter.java b/src/main/java/gtPlusPlus/core/slots/SlotAirFilter.java new file mode 100644 index 0000000000..92e9bebe21 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotAirFilter.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.slots; + +import gtPlusPlus.core.item.general.ItemAirFilter; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotAirFilter extends Slot { + + public SlotAirFilter(final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if (itemstack == null) { + return false; + } + if (itemstack.getItem() instanceof ItemAirFilter){ + return true; + } + return false; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotBlueprint.java b/src/main/java/gtPlusPlus/core/slots/SlotBlueprint.java new file mode 100644 index 0000000000..532f2f0822 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotBlueprint.java @@ -0,0 +1,31 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.interfaces.IItemBlueprint; + +public class SlotBlueprint extends Slot { + + public SlotBlueprint(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if (itemstack.getItem() instanceof IItemBlueprint) { + Logger.WARNING(itemstack.getDisplayName() + " is a valid Blueprint."); + return true; + } + Logger.WARNING(itemstack.getDisplayName() + " is not a valid Blueprint."); + return false; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotBuzzSaw.java b/src/main/java/gtPlusPlus/core/slots/SlotBuzzSaw.java new file mode 100644 index 0000000000..94b0b9ecc7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotBuzzSaw.java @@ -0,0 +1,77 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.OrePrefixes; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.GT_MetaGenerated_Item_02; + +public class SlotBuzzSaw extends Slot { + + public SAWTOOL currentTool = SAWTOOL.NONE; + + public SlotBuzzSaw(final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + boolean isValid = false; + + if (itemstack != null) { + if ((itemstack.getItem() instanceof GT_MetaGenerated_Item_02) + || (itemstack.getItem() instanceof GT_MetaGenerated_Tool)) { + // Buzzsaw Blade //TODO + /* + * if (OrePrefixes.toolHeadBuzzSaw.contains(itemstack)){ isValid + * = false; } + */ + if (OrePrefixes.craftingTool.contains(itemstack)) { + if (itemstack.getDisplayName().toLowerCase().contains("saw") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.10") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.110") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.112") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.114") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")) { + if (itemstack.getItemDamage() == 10) { + isValid = true; + this.currentTool = SAWTOOL.SAW; + } + else if (itemstack.getItemDamage() == 110) { + isValid = true; + this.currentTool = SAWTOOL.CHAINSAW; + } + else if (itemstack.getItemDamage() == 112) { + isValid = true; + this.currentTool = SAWTOOL.CHAINSAW; + } + else if (itemstack.getItemDamage() == 114) { + isValid = true; + this.currentTool = SAWTOOL.CHAINSAW; + } + else if (itemstack.getItemDamage() == 140) { + isValid = true; + this.currentTool = SAWTOOL.BUZZSAW; + } + return isValid; + } + } + } + } + this.currentTool = SAWTOOL.NONE; + return isValid; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + + public enum SAWTOOL { + NONE, SAW, BUZZSAW, CHAINSAW + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java b/src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java new file mode 100644 index 0000000000..1029d37a78 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java @@ -0,0 +1,45 @@ +package gtPlusPlus.core.slots; + +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Recipe; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class SlotChemicalPlantInput extends Slot { + + public SlotChemicalPlantInput(final IInventory inventory, final int index, final int x, final int y) { + super(inventory, index, x, y); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return isItemValidForChemicalPlantSlot(itemstack); + } + + public static boolean isItemValidForChemicalPlantSlot(ItemStack aStack) { + boolean validItem = GTPP_Recipe_Map.sChemicalPlantRecipes.containsInput(aStack); + if (!validItem) { + for (GT_Recipe f : GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { + if (f.mFluidInputs.length > 0) { + for (FluidStack g : f.mFluidInputs) { + if (g != null) { + if (FluidContainerRegistry.containsFluid(aStack, g)) { + return true; + } + } + } + } + } + } + return validItem; + } + + @Override + public int getSlotStackLimit() { + return 64; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotCrafting.java b/src/main/java/gtPlusPlus/core/slots/SlotCrafting.java new file mode 100644 index 0000000000..42b7b585e2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotCrafting.java @@ -0,0 +1,151 @@ +package gtPlusPlus.core.slots; + +import cpw.mods.fml.common.FMLCommonHandler; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.*; +import net.minecraft.stats.AchievementList; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; + +public class SlotCrafting extends Slot { + /** The craft matrix inventory linked to this result slot. */ + private final IInventory craftMatrix; + /** The player that is using the GUI where this slot resides. */ + private final EntityPlayer thePlayer; + /** + * The number of items that have been crafted so far. Gets passed to + * ItemStack.onCrafting before being reset. + */ + private int amountCrafted; + private static final String __OBFID = "CL_00001761"; + + public SlotCrafting(final EntityPlayer p_i1823_1_, final IInventory p_i1823_2_, final IInventory p_i1823_3_, + final int p_i1823_4_, final int p_i1823_5_, final int p_i1823_6_) { + super(p_i1823_3_, p_i1823_4_, p_i1823_5_, p_i1823_6_); + this.thePlayer = p_i1823_1_; + this.craftMatrix = p_i1823_2_; + } + + /** + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. + */ + @Override + public boolean isItemValid(final ItemStack p_75214_1_) { + return false; + } + + /** + * Decrease the size of the stack in slot (first int arg) by the amount of + * the second int arg. Returns the new stack. + */ + @Override + public ItemStack decrStackSize(final int p_75209_1_) { + if (this.getHasStack()) { + this.amountCrafted += Math.min(p_75209_1_, this.getStack().stackSize); + } + + return super.decrStackSize(p_75209_1_); + } + + /** + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. Typically increases an internal count then calls + * onCrafting(item). + */ + @Override + protected void onCrafting(final ItemStack p_75210_1_, final int p_75210_2_) { + this.amountCrafted += p_75210_2_; + this.onCrafting(p_75210_1_); + } + + /** + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. + */ + @Override + protected void onCrafting(final ItemStack p_75208_1_) { + p_75208_1_.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); + this.amountCrafted = 0; + + if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) { + this.thePlayer.addStat(AchievementList.buildWorkBench, 1); + } + + if (p_75208_1_.getItem() instanceof ItemPickaxe) { + this.thePlayer.addStat(AchievementList.buildPickaxe, 1); + } + + if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.furnace)) { + this.thePlayer.addStat(AchievementList.buildFurnace, 1); + } + + if (p_75208_1_.getItem() instanceof ItemHoe) { + this.thePlayer.addStat(AchievementList.buildHoe, 1); + } + + if (p_75208_1_.getItem() == Items.bread) { + this.thePlayer.addStat(AchievementList.makeBread, 1); + } + + if (p_75208_1_.getItem() == Items.cake) { + this.thePlayer.addStat(AchievementList.bakeCake, 1); + } + + if ((p_75208_1_.getItem() instanceof ItemPickaxe) + && (((ItemPickaxe) p_75208_1_.getItem()).func_150913_i() != Item.ToolMaterial.WOOD)) { + this.thePlayer.addStat(AchievementList.buildBetterPickaxe, 1); + } + + if (p_75208_1_.getItem() instanceof ItemSword) { + this.thePlayer.addStat(AchievementList.buildSword, 1); + } + + if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) { + this.thePlayer.addStat(AchievementList.enchantments, 1); + } + + if (p_75208_1_.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) { + this.thePlayer.addStat(AchievementList.bookcase, 1); + } + } + + @Override + public void onPickupFromSlot(final EntityPlayer p_82870_1_, final ItemStack p_82870_2_) { + FMLCommonHandler.instance().firePlayerCraftingEvent(p_82870_1_, p_82870_2_, this.craftMatrix); + this.onCrafting(p_82870_2_); + + for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { + final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); + + if (itemstack1 != null) { + this.craftMatrix.decrStackSize(i, 1); + + if (itemstack1.getItem().hasContainerItem(itemstack1)) { + final ItemStack itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); + + if ((itemstack2 != null) && itemstack2.isItemStackDamageable() + && (itemstack2.getItemDamage() > itemstack2.getMaxDamage())) { + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this.thePlayer, itemstack2)); + continue; + } + + if (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1) + || !this.thePlayer.inventory.addItemStackToInventory(itemstack2)) { + if (this.craftMatrix.getStackInSlot(i) == null) { + this.craftMatrix.setInventorySlotContents(i, itemstack2); + } else { + this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java b/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java new file mode 100644 index 0000000000..3608c3724c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java @@ -0,0 +1,147 @@ +package gtPlusPlus.core.slots; + +import cpw.mods.fml.common.FMLCommonHandler; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.*; +import net.minecraft.stats.AchievementList; + +public class SlotCraftingNoCollect extends SlotCrafting { + /** The craft matrix inventory linked to this result slot. */ + private final IInventory craftMatrix; + /** The player that is using the GUI where this slot resides. */ + private EntityPlayer thePlayer; + /** + * The number of items that have been crafted so far. Gets passed to + * ItemStack.onCrafting before being reset. + */ + private int amountCrafted; + + public SlotCraftingNoCollect(EntityPlayer player, IInventory inventory, IInventory inventory2, int x, int y, + int z) { + super(player, inventory, inventory2, x, y, z); + this.thePlayer = player; + this.craftMatrix = inventory; + } + + /** + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. + */ + @Override + public boolean isItemValid(ItemStack p_75214_1_) { + return false; + } + + /** + * Decrease the size of the stack in slot (first int arg) by the amount of + * the second int arg. Returns the new stack. + */ + @Override + public ItemStack decrStackSize(int amount) { + if (this.getHasStack()) { + this.amountCrafted += Math.min(amount, this.getStack().stackSize); + } + + return super.decrStackSize(amount); + } + + /** + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. Typically increases an internal count then calls + * onCrafting(item). + */ + @Override + protected void onCrafting(ItemStack output, int amount) { + this.amountCrafted += amount; + this.onCrafting(output); + } + + /** + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. + */ + @Override + protected void onCrafting(ItemStack output) { + output.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); + this.amountCrafted = 0; + + if (output.getItem() == Item.getItemFromBlock(Blocks.crafting_table)) { + this.thePlayer.addStat(AchievementList.buildWorkBench, 1); + } + + if (output.getItem() instanceof ItemPickaxe) { + this.thePlayer.addStat(AchievementList.buildPickaxe, 1); + } + + if (output.getItem() == Item.getItemFromBlock(Blocks.furnace)) { + this.thePlayer.addStat(AchievementList.buildFurnace, 1); + } + + if (output.getItem() instanceof ItemHoe) { + this.thePlayer.addStat(AchievementList.buildHoe, 1); + } + + if (output.getItem() == Items.bread) { + this.thePlayer.addStat(AchievementList.makeBread, 1); + } + + if (output.getItem() == Items.cake) { + this.thePlayer.addStat(AchievementList.bakeCake, 1); + } + + if (output.getItem() instanceof ItemPickaxe + && ((ItemPickaxe) output.getItem()).func_150913_i() != Item.ToolMaterial.WOOD) { + this.thePlayer.addStat(AchievementList.buildBetterPickaxe, 1); + } + + if (output.getItem() instanceof ItemSword) { + this.thePlayer.addStat(AchievementList.buildSword, 1); + } + + if (output.getItem() == Item.getItemFromBlock(Blocks.enchanting_table)) { + this.thePlayer.addStat(AchievementList.enchantments, 1); + } + + if (output.getItem() == Item.getItemFromBlock(Blocks.bookshelf)) { + this.thePlayer.addStat(AchievementList.bookcase, 1); + } + } + + @Override + public void onPickupFromSlot(EntityPlayer player, ItemStack output) { + FMLCommonHandler.instance().firePlayerCraftingEvent(player, output, craftMatrix); + this.onCrafting(output); + + /* + * for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { + * ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); + * + * if (itemstack1 != null) { this.craftMatrix.decrStackSize(i, 1); + * + * if (itemstack1.getItem().hasContainerItem(itemstack1)) { ItemStack + * itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); + * + * if (itemstack2 != null && itemstack2.isItemStackDamageable() && + * itemstack2.getItemDamage() > itemstack2.getMaxDamage()) { + * MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, + * itemstack2)); continue; } + * + * if + * (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1) + * || !this.thePlayer.inventory.addItemStackToInventory(itemstack2)) { + * if (this.craftMatrix.getStackInSlot(i) == null) { + * this.craftMatrix.setInventorySlotContents(i, itemstack2); } else { + * this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false); } } + * } } } + */ + } + + @Override + public boolean canTakeStack(EntityPlayer player) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/slots/SlotDataStick.java b/src/main/java/gtPlusPlus/core/slots/SlotDataStick.java new file mode 100644 index 0000000000..ce97a2fdbf --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotDataStick.java @@ -0,0 +1,42 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.recipe.common.CI; + +public class SlotDataStick extends Slot { + + public SlotDataStick(final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + + } + + public static ItemStack[] mDataItems = new ItemStack[2]; + + @Override + public synchronized boolean isItemValid(final ItemStack itemstack) { + boolean isValid = false; + if (itemstack != null) { + if (mDataItems[0] == null) { + mDataItems[0] = CI.getDataStick(); + } + if (mDataItems[1] == null) { + mDataItems[1] = CI.getDataOrb(); + } + if (mDataItems[0] != null && mDataItems[1] != null) { + if (GT_Utility.areStacksEqual(itemstack, mDataItems[0], true) || GT_Utility.areStacksEqual(itemstack, mDataItems[1], true) ) { + isValid = true; + } + } + } + return isValid; + } + + @Override + public int getSlotStackLimit() { + return 1; + } +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotElectric.java b/src/main/java/gtPlusPlus/core/slots/SlotElectric.java new file mode 100644 index 0000000000..a747432a74 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotElectric.java @@ -0,0 +1,45 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; + +import ic2.api.info.Info; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; + +public class SlotElectric extends Slot { + + public SlotElectric(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + } + + public SlotElectric(IGregTechTileEntity mTileEntity, int i, int j, int k) { + this(mTileEntity.getIInventory(mTileEntity.getXCoord(), mTileEntity.getYCoord(), mTileEntity.getZCoord()), i, j, k); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if ((accepts(itemstack)) || (itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) { + return true; + } + return false; + } + + public boolean accepts(final ItemStack stack) { + if (stack == null) { + return false; + } + return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) + || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D); + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotFrame.java b/src/main/java/gtPlusPlus/core/slots/SlotFrame.java new file mode 100644 index 0000000000..4168ded5bc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotFrame.java @@ -0,0 +1,26 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import forestry.api.apiculture.IHiveFrame; + +public class SlotFrame extends Slot { + + public SlotFrame(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return itemstack.getItem() instanceof IHiveFrame; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java b/src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java new file mode 100644 index 0000000000..b50b679665 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java @@ -0,0 +1,55 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.ItemList; + +import ic2.core.Ic2Items; + +public class SlotFuelRod extends Slot { + + public SlotFuelRod(final IInventory inventory, final int index, final int x, final int y) { + super(inventory, index, x, y); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + boolean returnValue = false; + // Uranium Rods + if (itemstack.getItem() == Ic2Items.reactorUraniumSimple.getItem()) { + returnValue = true; + } else if (itemstack.getItem() == Ic2Items.reactorUraniumDual.getItem()) { + returnValue = true; + } else if (itemstack.getItem() == Ic2Items.reactorUraniumQuad.getItem()) { + returnValue = true; + } + + // Mox Rods + if (itemstack.getItem() == Ic2Items.reactorMOXSimple.getItem()) { + returnValue = true; + } else if (itemstack.getItem() == Ic2Items.reactorMOXDual.getItem()) { + returnValue = true; + } else if (itemstack.getItem() == Ic2Items.reactorMOXQuad.getItem()) { + returnValue = true; + } + + // Thorium Rods + if (itemstack.getItem() == ItemList.ThoriumCell_1.getItem()) { + returnValue = true; + } else if (itemstack.getItem() == ItemList.ThoriumCell_2.getItem()) { + returnValue = true; + } else if (itemstack.getItem() == ItemList.ThoriumCell_4.getItem()) { + returnValue = true; + } + return returnValue; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotGeneric.java b/src/main/java/gtPlusPlus/core/slots/SlotGeneric.java new file mode 100644 index 0000000000..533539d914 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotGeneric.java @@ -0,0 +1,23 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotGeneric extends Slot { + + public SlotGeneric(final IInventory inventory, final int aSlotID, final int x, final int y) { + super(inventory, aSlotID, x, y); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return true; + } + + @Override + public int getSlotStackLimit() { + return 64; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotGtTool.java b/src/main/java/gtPlusPlus/core/slots/SlotGtTool.java new file mode 100644 index 0000000000..54e25362db --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotGtTool.java @@ -0,0 +1,33 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.items.GT_MetaGenerated_Tool; + +import gtPlusPlus.api.objects.Logger; + +public class SlotGtTool extends Slot { + + public SlotGtTool(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) { + Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); + return true; + } + Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); + return false; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java b/src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java new file mode 100644 index 0000000000..c0e3340769 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java @@ -0,0 +1,94 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +import gregtech.api.items.GT_MetaGenerated_Tool; + +import gtPlusPlus.api.objects.Logger; +import ic2.api.info.Info; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; + +public class SlotGtToolElectric extends SlotGtTool { + public int tier; + private ItemStack content; + + public SlotGtToolElectric(final IInventory base, final int x, final int y, final int z, final int tier, + final boolean allowRedstoneDust) { + super(base, x, y, z); + this.tier = tier; + this.allowRedstoneDust = allowRedstoneDust; + } + + public boolean accepts(final ItemStack stack) { + if (stack == null) { + return false; + } + if ((stack.getItem() == Items.redstone) && (!this.allowRedstoneDust)) { + return false; + } + return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) + || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), this.tier, true, true, true) > 0.0D); + } + + public double discharge(final double amount, final boolean ignoreLimit) { + if (amount <= 0.0D) { + throw new IllegalArgumentException("Amount must be > 0."); + } + final ItemStack stack = this.get(0); + if (stack == null) { + return 0.0D; + } + double realAmount = ElectricItem.manager.discharge(stack, amount, this.tier, ignoreLimit, true, false); + if (realAmount <= 0.0D) { + realAmount = Info.itemEnergy.getEnergyValue(stack); + if (realAmount <= 0.0D) { + return 0.0D; + } + stack.stackSize -= 1; + if (stack.stackSize <= 0) { + this.put(0, null); + } + } + return realAmount; + } + + public void setTier(final int tier1) { + this.tier = tier1; + } + + public boolean allowRedstoneDust = true; + + public ItemStack get() { + return this.get(0); + } + + public ItemStack get(final int index) { + return this.content; + } + + public void put(final ItemStack content) { + this.put(0, content); + } + + public void put(final int index, final ItemStack content) { + this.content = content; + this.onChanged(); + } + + public void onChanged() { + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) { + Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); + return true; + } + Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java b/src/main/java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java new file mode 100644 index 0000000000..8c8a118abb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotIntegratedCircuit.java @@ -0,0 +1,105 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.recipe.common.CI; + +public class SlotIntegratedCircuit extends Slot { + + public static Item mCircuitItem; + public static Item mCircuitItem2; + public static Item mCircuitItem3; + private final short mCircuitLock; + + public SlotIntegratedCircuit(final IInventory inventory, final int slot, final int x, final int y) { + this(Short.MAX_VALUE+1, inventory, slot, x, y); + } + + public SlotIntegratedCircuit(int mTypeLock, final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + if (mTypeLock > Short.MAX_VALUE || mTypeLock < Short.MIN_VALUE) { + mCircuitLock = -1; + } + else { + mCircuitLock = (short) mTypeLock; + } + } + + @Override + public synchronized boolean isItemValid(final ItemStack itemstack) { + return isItemValidForSlot(mCircuitLock, itemstack); + } + + public static synchronized boolean isItemValidForSlot(final ItemStack itemstack) { + return isItemValidForSlot(-1, itemstack); + } + + public static synchronized boolean isItemValidForSlot(int aLockedCircuitNumber, final ItemStack itemstack) { + boolean isValid = false; + if (mCircuitItem == null) { + mCircuitItem = CI.getNumberedCircuit(0).getItem(); + } + if (mCircuitItem2 == null) { + mCircuitItem2 = CI.getNumberedBioCircuit(0).getItem(); + } + if (mCircuitItem3 == null) { + mCircuitItem3 = CI.getNumberedAdvancedCircuit(0).getItem(); + } + if (mCircuitItem != null && mCircuitItem2 != null && mCircuitItem3 != null) { + if (itemstack != null) { + if (itemstack.getItem() == mCircuitItem || itemstack.getItem() == mCircuitItem2 || itemstack.getItem() == mCircuitItem3) { + if (aLockedCircuitNumber == -1) { + isValid = true; + } + else { + if (itemstack.getItemDamage() == aLockedCircuitNumber) { + isValid = true; + } + } + } + } + } + return isValid; + } + + /** + * Returns the circuit type. -1 is invalid, 0 is standard, 1 is GT++ bio. + * @param itemstack - the Circuit Stack. + * @return + */ + public static synchronized int isRegularProgrammableCircuit(final ItemStack itemstack) { + if (mCircuitItem == null) { + mCircuitItem = CI.getNumberedCircuit(0).getItem(); + } + if (mCircuitItem2 == null) { + mCircuitItem2 = CI.getNumberedBioCircuit(0).getItem(); + } + if (mCircuitItem3 == null) { + mCircuitItem3 = CI.getNumberedAdvancedCircuit(0).getItem(); + } + if (mCircuitItem != null && mCircuitItem2 != null && mCircuitItem3 != null) { + if (itemstack != null) { + if (itemstack.getItem() == mCircuitItem || itemstack.getItem() == mCircuitItem2 || itemstack.getItem() == mCircuitItem3) { + if (itemstack.getItem() == mCircuitItem) { + return 0; + } + else if (itemstack.getItem() == mCircuitItem2) { + return 1; + } + else if (itemstack.getItem() == mCircuitItem3) { + return 2; + } + } + } + } + return -1; + } + + @Override + public int getSlotStackLimit() { + return 64; + } +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotItemBackpackInv.java b/src/main/java/gtPlusPlus/core/slots/SlotItemBackpackInv.java new file mode 100644 index 0000000000..3aa551f966 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotItemBackpackInv.java @@ -0,0 +1,26 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.item.base.BaseItemBackpack; + +public class SlotItemBackpackInv extends Slot { + public SlotItemBackpackInv(final IInventory inv, final int index, final int xPos, final int yPos) { + super(inv, index, xPos, yPos); + } + + // This is the only method we need to override so that + // we can't place our inventory-storing Item within + // its own inventory (thus making it permanently inaccessible) + // as well as preventing abuse of storing backpacks within backpacks + /** + * Check if the stack is a valid item for this slot. + */ + @Override + public boolean isItemValid(final ItemStack itemstack) { + // Everything returns true except an instance of our Item + return !(itemstack.getItem() instanceof BaseItemBackpack); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/slots/SlotJukebox.java b/src/main/java/gtPlusPlus/core/slots/SlotJukebox.java new file mode 100644 index 0000000000..0f8af988a1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotJukebox.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemRecord; +import net.minecraft.item.ItemStack; + +public class SlotJukebox extends SlotGeneric { + + private final boolean isDisplay; + + + public SlotJukebox(IInventory inventory, int x, int y, int z) { + this(inventory, x, y, z, false); + } + + public SlotJukebox(IInventory inventory, int x, int y, int z, boolean display) { + super(inventory, x, y, z); + isDisplay = display; + } + + @Override + public boolean isItemValid(ItemStack itemstack) { + return (itemstack != null && itemstack.getItem() instanceof ItemRecord); + } + + @Override + public int getSlotStackLimit() { + return 1; + } + + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) { + return !isDisplay; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotLockedInput.java b/src/main/java/gtPlusPlus/core/slots/SlotLockedInput.java new file mode 100644 index 0000000000..c67f8acfeb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotLockedInput.java @@ -0,0 +1,57 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; + +public class SlotLockedInput extends Slot { + + private ItemStack mLockStack; + private final IGregTechTileEntity mEntity; + private boolean mChecked = false; + + public SlotLockedInput(final IGregTechTileEntity inventory, final int index, final int x, final int y, ItemStack lockStack) { + super(inventory, index, x, y); + mLockStack = lockStack; + mEntity = inventory; + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if (mEntity == null) { + return false; + } + else { + if (!mChecked) { + try { + mLockStack = (ItemStack) ReflectionUtils.getField(this.mEntity.getMetaTileEntity().getClass(), "mItemStack").get(this.mEntity.getMetaTileEntity()); + } + catch (Throwable t) { + t.printStackTrace(); + mLockStack = null; + } + mChecked = true; + } + } + + if (mLockStack == null) { + return true; + } + else { + if (ItemStack.areItemStacksEqual(itemstack, mLockStack)) { + return true; + } + } + return false; + } + + @Override + public int getSlotStackLimit() { + return mLockStack == null ? 64 : mLockStack.getMaxStackSize(); + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java b/src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java new file mode 100644 index 0000000000..bb82a28936 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.FoodUtils; + +public class SlotLunchBox extends SlotGtTool { + + public SlotLunchBox(final IInventory base, final int x, final int y, final int z) { + super(base, x, y, z); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return isItemValid_STATIC(itemstack); + } + + public static boolean isItemValid_STATIC(final ItemStack itemstack) { + if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) { + Logger.WARNING(itemstack.getDisplayName() + " is a valid food."); + return true; + } + Logger.WARNING(itemstack.getDisplayName() + " is not a valid food."); + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java b/src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java new file mode 100644 index 0000000000..d555f10a44 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java @@ -0,0 +1,29 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.FoodUtils; + +public class SlotMagicToolBag extends SlotGtTool { + + public SlotMagicToolBag(final IInventory base, final int x, final int y, final int z) { + super(base, x, y, z); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return isItemValid_STATIC(itemstack); + } + + public static boolean isItemValid_STATIC(final ItemStack itemstack) { + if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) { + Logger.WARNING(itemstack.getDisplayName() + " is a valid food."); + return true; + } + Logger.WARNING(itemstack.getDisplayName() + " is not a valid food."); + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotModularBauble.java b/src/main/java/gtPlusPlus/core/slots/SlotModularBauble.java new file mode 100644 index 0000000000..4aef5bc877 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotModularBauble.java @@ -0,0 +1,32 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.item.bauble.ModularBauble; + +public class SlotModularBauble extends Slot { + + public SlotModularBauble(final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + boolean isValid = false; + + if (itemstack != null) { + if (itemstack.getItem() instanceof ModularBauble) { + isValid = true; + } + } + return isValid; + } + + @Override + public int getSlotStackLimit() { + return 1; + } +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java b/src/main/java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java new file mode 100644 index 0000000000..dae62f0415 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java @@ -0,0 +1,56 @@ +package gtPlusPlus.core.slots; + +import static gtPlusPlus.core.tileentities.machines.TileEntityModularityTable.*; + +import java.util.Iterator; +import java.util.Map.Entry; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; + +public class SlotModularBaubleUpgrades extends Slot { + + public SlotModularBaubleUpgrades(final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + boolean isValid = false; + if (itemstack != null) { + Logger.INFO("trying to insert " + itemstack.getDisplayName()); + Logger.INFO("Valid Upgrade count: " + mValidUpgradeList.size()); + + Iterator> it = mValidUpgradeListFormChange.entrySet().iterator(); + while (it.hasNext()) { + Entry pair = it.next(); + if (pair.getKey().getItem() == itemstack.getItem() + && pair.getKey().getItemDamage() == itemstack.getItemDamage()) { + isValid = true; + } + } + + Iterator>> it2 = mValidUpgradeList.entrySet().iterator(); + while (it2.hasNext()) { + Entry> pair = it2.next(); + if (pair.getKey().getItem() == itemstack.getItem() + && pair.getKey().getItemDamage() == itemstack.getItemDamage()) { + isValid = true; + } + } + } + return isValid; + } + + @Override + public int getSlotStackLimit() { + return 64; + } +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotNoInput.java b/src/main/java/gtPlusPlus/core/slots/SlotNoInput.java new file mode 100644 index 0000000000..1a1cf62e2b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotNoInput.java @@ -0,0 +1,23 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotNoInput extends Slot { + + public SlotNoInput(final IInventory inventory, final int index, final int x, final int y) { + super(inventory, index, x, y); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return false; + } + + @Override + public int getSlotStackLimit() { + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotNoInputLogging.java b/src/main/java/gtPlusPlus/core/slots/SlotNoInputLogging.java new file mode 100644 index 0000000000..762714ac94 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotNoInputLogging.java @@ -0,0 +1,36 @@ +package gtPlusPlus.core.slots; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class SlotNoInputLogging extends SlotNoInput { + + private final int aSlotIndex; + + public SlotNoInputLogging(final IInventory inventory, final int index, final int x, final int y) { + super(inventory, index, x, y); + aSlotIndex = index; + Logger.INFO("Slot "+index+" is doing logging"); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + if (ItemUtils.checkForInvalidItems(itemstack)) { + Logger.INFO("Tried Inserting "+ItemUtils.getItemName(itemstack)+" into slot "+aSlotIndex); + Block b = Block.getBlockFromItem(itemstack.getItem()); + Logger.INFO(""+itemstack.getUnlocalizedName()); + if (b != null) { + Logger.INFO(""+b.getLocalizedName()); + Logger.INFO(""+b.getUnlocalizedName()); + } + } + else { + Logger.INFO("Bad Itemstack"); + } + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotOutput.java b/src/main/java/gtPlusPlus/core/slots/SlotOutput.java new file mode 100644 index 0000000000..f22e0645f5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotOutput.java @@ -0,0 +1,96 @@ +package gtPlusPlus.core.slots; + +import cpw.mods.fml.common.FMLCommonHandler; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent; + +public class SlotOutput extends SlotCrafting { + + private final IInventory craftMatrix; + private final EntityPlayer thePlayer; + private int amountCrafted; + + public SlotOutput(final EntityPlayer player, final InventoryCrafting craftingInventory, + final IInventory p_i45790_3_, final int slotIndex, final int xPosition, final int yPosition) { + super(player, craftingInventory, p_i45790_3_, slotIndex, xPosition, yPosition); + this.thePlayer = player; + this.craftMatrix = craftingInventory; + } + + /** + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. + */ + @Override + public boolean isItemValid(final ItemStack par1ItemStack) { + return false; + } + + /** + * Decrease the size of the stack in slot (first int arg) by the amount of + * the second int arg. Returns the new stack. + */ + @Override + public ItemStack decrStackSize(final int par1) { + if (this.getHasStack()) { + this.amountCrafted += Math.min(par1, this.getStack().stackSize); + } + return super.decrStackSize(par1); + } + + /** + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. Typically increases an internal count then calls + * onCrafting(item). + */ + @Override + protected void onCrafting(final ItemStack par1ItemStack, final int par2) { + this.amountCrafted += par2; + this.onCrafting(par1ItemStack); + } + + /** + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. + */ + @Override + protected void onCrafting(final ItemStack stack) { + stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted); + this.amountCrafted = 0; + } + + @Override + public void onPickupFromSlot(final EntityPlayer playerIn, final ItemStack stack) { + { + FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, this.craftMatrix); + this.onCrafting(stack); + for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { + final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i); + if (itemstack1 != null) { + this.craftMatrix.decrStackSize(i, 1); + if (itemstack1.getItem().hasContainerItem(itemstack1)) { + ItemStack itemstack2 = itemstack1.getItem().getContainerItem(itemstack1); + if (itemstack2.isItemStackDamageable() + && (itemstack2.getItemDamage() > itemstack2.getMaxDamage())) { + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this.thePlayer, itemstack2)); + itemstack2 = null; + } + if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2)) { + if (this.craftMatrix.getStackInSlot(i) == null) { + this.craftMatrix.setInventorySlotContents(i, itemstack2); + } else { + this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false); + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/slots/SlotPollutionScrubber.java b/src/main/java/gtPlusPlus/core/slots/SlotPollutionScrubber.java new file mode 100644 index 0000000000..6dd3745d09 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotPollutionScrubber.java @@ -0,0 +1,66 @@ +package gtPlusPlus.core.slots; + +import java.util.HashMap; + +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.item.general.ItemAirFilter; +import gtPlusPlus.core.item.general.ItemBasicScrubberTurbine; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotPollutionScrubber extends Slot { + + private final int mType; + private final int mTier; + + private static HashMap mConveyorMap = new HashMap(); + + static { + for (int i=0; i<(CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK ? 9 : 5); i++) { + mConveyorMap.put(i, CI.getConveyor(i, 1)); + } + } + + public SlotPollutionScrubber(final int aType, final int aTier, final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + mType = aType; + mTier = aTier; + } + + @Override + public synchronized boolean isItemValid(final ItemStack itemstack) { + return isItemValidForSlot(this, itemstack); + } + + public static synchronized boolean isItemValidForSlot(final SlotPollutionScrubber aSlot, final ItemStack itemstack) { + if (aSlot.mType == 0) { + if (itemstack.getItem() instanceof ItemBasicScrubberTurbine) { + return true; + } + if (itemstack.getItem() instanceof GT_MetaGenerated_Tool && itemstack.getItemDamage() >= 170 && itemstack.getItemDamage() <= 179){ + return true; + } + } + else if (aSlot.mType == 1) { + if (itemstack.getItem() instanceof ItemAirFilter) { + return true; + } + } + else if (aSlot.mType == 2) { + ItemStack aConveyorStack = mConveyorMap.get(aSlot.mTier); + if (GT_Utility.areStacksEqual(itemstack, aConveyorStack, true)) { + return true; + } + } + return false; + } + + @Override + public int getSlotStackLimit() { + return 1; + } +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotRTG.java b/src/main/java/gtPlusPlus/core/slots/SlotRTG.java new file mode 100644 index 0000000000..181052cc57 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotRTG.java @@ -0,0 +1,26 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import ic2.core.Ic2Items; + +public class SlotRTG extends Slot { + + public SlotRTG(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return itemstack.getItem().getClass() == Ic2Items.RTGPellets.getItem().getClass(); + } + + @Override + public int getSlotStackLimit() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotToolBox.java b/src/main/java/gtPlusPlus/core/slots/SlotToolBox.java new file mode 100644 index 0000000000..87967b75b5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotToolBox.java @@ -0,0 +1,113 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemTool; +import gregtech.api.items.GT_MetaGenerated_Tool; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class SlotToolBox extends SlotGtTool { + + private static final AutoMap mSupportedCustomTools = new AutoMap(); + + static { + //Look for Supported custom tool types + Class temp; + + //IHL Pumps + temp = ReflectionUtils.getClass("ihl.handpump.IHLHandPump"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + + //IC2 Electrics + temp = ReflectionUtils.getClass("ic2.api.item.IElectricItem"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + + //IC2 Boxables + temp = ReflectionUtils.getClass(" ic2.api.item.IBoxable"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + + //Tinkers Tools + temp = ReflectionUtils.getClass("tconstruct.library.tools.Weapon"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + //BattleGear Weapons + temp = ReflectionUtils.getClass("mods.battlegear2.api.weapons.IBattlegearWeapon"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + + + //OpenMods + String[] OpenModsContent = new String[] {"openblocks.common.item.ItemDevNull", "openblocks.common.item.ItemHangGlider", "openblocks.common.item.ItemWrench", "openblocks.common.item.ItemSleepingBag"}; + for (String t : OpenModsContent) { + temp = ReflectionUtils.getClass(t); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + } + + //GC Wrench + temp = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.items.ItemUniversalWrench"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + + //EIO + String[] EioContent = new String[] {"crazypants.enderio.api.tool.ITool", "crazypants.enderio.item.ItemMagnet", "crazypants.enderio.item.ItemConduitProbe"}; + for (String t : EioContent) { + temp = ReflectionUtils.getClass(t); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + } + + //Forestry + temp = ReflectionUtils.getClass("forestry.core.items.ItemForestryTool"); + if (temp != null) { + mSupportedCustomTools.put(temp); + temp = null; + } + } + + public SlotToolBox(final IInventory base, final int x, final int y, final int z) { + super(base, x, y, z); + } + + @Override + public boolean isItemValid(final ItemStack itemstack) { + return isItemValid_STATIC(itemstack); + } + + public static boolean isItemValid_STATIC(final ItemStack itemstack) { + if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof ItemTool)) { + Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); + return true; + } + for (Class C : mSupportedCustomTools) { + if (C.isInstance(itemstack.getItem())) { + return true; + } + } + Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotVolumetricFlask.java b/src/main/java/gtPlusPlus/core/slots/SlotVolumetricFlask.java new file mode 100644 index 0000000000..b8955f6dc8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/slots/SlotVolumetricFlask.java @@ -0,0 +1,30 @@ +package gtPlusPlus.core.slots; + +import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class SlotVolumetricFlask extends Slot { + + public static Item mFlask; + + public SlotVolumetricFlask(final IInventory inventory, final int slot, final int x, final int y) { + super(inventory, slot, x, y); + } + + @Override + public synchronized boolean isItemValid(final ItemStack itemstack) { + return isItemValidForSlot(itemstack); + } + + public static synchronized boolean isItemValidForSlot(final ItemStack itemstack) { + return VolumetricFlaskHelper.isVolumetricFlask(itemstack); + } + + @Override + public int getSlotStackLimit() { + return 16; + } +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java b/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java new file mode 100644 index 0000000000..62b545c5c8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/ModTileEntities.java @@ -0,0 +1,63 @@ +package gtPlusPlus.core.tileentities; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.general.BlockSuperLight.TileEntitySuperLight; +import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.tileentities.general.*; +import gtPlusPlus.core.tileentities.machines.TileEntityAdvPooCollector; +import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; +import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; +import gtPlusPlus.core.tileentities.machines.TileEntityPooCollector; +import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; +import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; +import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; +import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; +import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; + +public class ModTileEntities { + + public static void init() { + Logger.INFO("Registering Tile Entities."); + GameRegistry.registerTileEntity(TileEntityPooCollector.class, "TileEntityPooCollector"); + GameRegistry.registerTileEntity(TileEntityAdvPooCollector.class, "TileEntityAdvPooCollector"); + GameRegistry.registerTileEntity(TileEntityWorkbench.class, "TileWorkbench"); + GameRegistry.registerTileEntity(TileEntityWorkbenchAdvanced.class, "TileWorkbenchAdvanced"); + GameRegistry.registerTileEntity(TileEntityFishTrap.class, "TileFishTrap"); + GameRegistry.registerTileEntity(TileEntityFirepit.class, "TileFirePit"); + GameRegistry.registerTileEntity(TileEntityInfiniteFluid.class, "TileInfiniteFluid"); + GameRegistry.registerTileEntity(TileEntityProjectTable.class, "TileProjectTable"); + GameRegistry.registerTileEntity(TileEntityTradeTable.class, "TileTradeTable"); + GameRegistry.registerTileEntity(TileEntityModularityTable.class, "TileEntityModularityTable"); + GameRegistry.registerTileEntity(TileEntityXpConverter.class, "TileEntityXpConverter"); + GameRegistry.registerTileEntity(TileEntityGenericSpawner.class, "TileEntityGenericSpawner"); + GameRegistry.registerTileEntity(TileEntityCircuitProgrammer.class, "TileCircuitProgrammer"); + GameRegistry.registerTileEntity(TileEntityPlayerDoorBase.class, "TilePlayerDoorBase"); + GameRegistry.registerTileEntity(TileEntityDecayablesChest.class, "TileDecayablesChest"); + GameRegistry.registerTileEntity(TileEntitySuperJukebox.class, "TileEntitySuperJukebox"); + GameRegistry.registerTileEntity(TileEntitySuperLight.class, "TileEntitySuperLight"); + GameRegistry.registerTileEntity(TileEntityPestKiller.class, "TileEntityPestKiller"); + GameRegistry.registerTileEntity(TileEntityRoundRobinator.class, "TileEntityRoundRobinator"); + GameRegistry.registerTileEntity(TileEntityEggBox.class, "TileEggBox"); + + if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { + GameRegistry.registerTileEntity(TileEntityVolumetricFlaskSetter.class, "TileEntityVolumetricFlaskSetter"); + } + + //Mod TEs + if (LoadedMods.Thaumcraft){ + + } + blacklistTilesFromAcceleration(); + } + + private static void blacklistTilesFromAcceleration() { + Meta_GT_Proxy.setTileEntityClassAsBlacklistedInWorldAccelerator("gtPlusPlus.core.tileentities.general.TileEntityFishTrap"); + Meta_GT_Proxy.setTileEntityClassAsBlacklistedInWorldAccelerator("gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest"); + Meta_GT_Proxy.setTileEntityClassAsBlacklistedInWorldAccelerator("gtPlusPlus.core.tileentities.general.TileEggBox"); + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java b/src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java new file mode 100644 index 0000000000..839bcc353a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.tileentities.base; + +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; + +public class TILE_ENTITY_BASE extends TileEntity { + + @Override + public void writeToNBT(final NBTTagCompound tag) { + super.writeToNBT(tag); + this.writeCustomNBT(tag); + } + + @Override + public void readFromNBT(final NBTTagCompound tag) { + super.readFromNBT(tag); + this.readCustomNBT(tag); + } + + public void writeCustomNBT(final NBTTagCompound tag) {} + public void readCustomNBT(final NBTTagCompound tag) {} + + @Override + public Packet getDescriptionPacket() { + final NBTTagCompound tag = new NBTTagCompound(); + this.writeCustomNBT(tag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, -999, tag); + } + + @Override + public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity packet) { + super.onDataPacket(net, packet); + this.readCustomNBT(packet.func_148857_g()); + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java new file mode 100644 index 0000000000..671a49fca5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileBasicTank.java @@ -0,0 +1,150 @@ +package gtPlusPlus.core.tileentities.base; + +import gtPlusPlus.api.objects.minecraft.BTF_FluidTank; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import net.minecraftforge.fluids.IFluidTank; + +public class TileBasicTank extends TileEntityBase implements IFluidHandler, IFluidTank { + + public final BTF_FluidTank mTank; + + public TileBasicTank(int aMaxSlots, int aFluidCapacity) { + super(aMaxSlots); + mTank = new BTF_FluidTank(aFluidCapacity); + } + + @Override + public boolean onPreTick(long aTick) { + + if (this.isServerSide()) { + if (mTank.isFluidChangingAllowed() && mTank.getFillableStack() != null + && mTank.getFillableStack().amount <= 0) { + mTank.setFillableStack((FluidStack) null); + } + } + + return super.onPreTick(aTick); + + } + + + private final boolean canFillEx(ForgeDirection aSide, Fluid aFluid) { + return this.fill(aSide, new FluidStack(aFluid, 1), false) == 1; + } + + + private final boolean canDrainEx(ForgeDirection aSide, Fluid aFluid) { + return this.drain(aSide, new FluidStack(aFluid, 1), false) != null; + } + + + private final FluidTankInfo[] getTankInfoEx(ForgeDirection aSide) { + return mTank.getCapacity() <= 0 ? new FluidTankInfo[0] + : new FluidTankInfo[]{mTank.getInfo()}; + } + + private final int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + return mTank.fill(aFluid, doFill); + } + + + private final int fillEx(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + return this.fill_default(aSide, aFluid, doFill); + } + + + private final FluidStack drainEx(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { + return mTank.getFluid() != null && aFluid != null && mTank.getFluid().isFluidEqual(aFluid) + ? mTank.drain(aFluid.amount, doDrain) + : null; + } + + + private final FluidStack drainEx(ForgeDirection aSide, int maxDrain, boolean doDrain) { + return mTank.drain(maxDrain, doDrain); + } + + + public boolean isLiquidInput(byte aSide) { + return true; + } + + public boolean isLiquidOutput(byte aSide) { + return true; + } + + @Override + public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidInput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid == null ? null : aFluid.getFluid(), this)))) + return this.fillEx(aSide, aFluid, doFill); + return 0; + } + + @Override + public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), this.getFluid() == null ? null : this.getFluid().getFluid(), this)))) + return this.drainEx(aSide, maxDrain, doDrain); + return null; + } + + @Override + public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid == null ? null : aFluid.getFluid(), this)))) + return this.drainEx(aSide, aFluid, doDrain); + return null; + } + + @Override + public boolean canFill(ForgeDirection aSide, Fluid aFluid) { + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mInputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidInput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid, this)))) + return this.canFillEx(aSide, aFluid); + return false; + } + + @Override + public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { + if (mTickTimer > 5 && canAccessData() && (mRunningThroughTick || !mOutputDisabled) && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), aFluid, this)))) + return this.canDrainEx(aSide, aFluid); + return false; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + if (canAccessData() && (aSide == ForgeDirection.UNKNOWN || (this.isLiquidInput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidIn((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), null, this)) || (this.isLiquidOutput((byte) aSide.ordinal()) && getCoverBehaviorAtSide((byte) aSide.ordinal()).letsFluidOut((byte) aSide.ordinal(), getCoverIDAtSide((byte) aSide.ordinal()), getCoverDataAtSide((byte) aSide.ordinal()), null, this)))) + return this.getTankInfoEx(aSide); + return new FluidTankInfo[]{}; + } + + @Override + public FluidStack getFluid() { + return mTank.getFluid(); + } + + @Override + public int getFluidAmount() { + return mTank.getFluidAmount(); + } + + @Override + public FluidTankInfo getInfo() { + return mTank.getInfo(); + } + + @Override + public int fill(FluidStack resource, boolean doFill) { + return mTank.fill(resource, doFill); + } + + @Override + public FluidStack drain(int maxDrain, boolean doDrain) { + return mTank.drain(maxDrain, doDrain); + } + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java new file mode 100644 index 0000000000..dba96c6ebc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java @@ -0,0 +1,1347 @@ +package gtPlusPlus.core.tileentities.base; + +import java.util.UUID; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.IDescribable; +import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.net.GT_Packet_Block_Event; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +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.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidHandler; +import gtPlusPlus.api.interfaces.ILazyCoverable; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BTF_Inventory; +import gtPlusPlus.core.util.data.ArrayUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import ic2.api.Direction; + +public class TileEntityBase extends TileEntity implements ILazyCoverable, IGregTechDeviceInformation, IDescribable { + + private String customName; + public String mOwnerName = "null"; + public String mOwnerUUID = "null"; + private boolean mIsOwnerOP = false; + + public final BTF_Inventory mInventory; + + public TileEntityBase(int aCapacity) { + mInventory = new BTF_Inventory(aCapacity, this); + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ + if(!nbt.hasKey(tag)) + { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt){ + super.writeToNBT(nbt); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + nbt.setBoolean("mIsOwnerOP", this.mIsOwnerOP); + nbt.setString("mOwnerName", this.mOwnerName); + nbt.setString("mOwnerUUID", this.mOwnerUUID); + } + + @Override + public void readFromNBT(final NBTTagCompound nbt){ + + super.readFromNBT(nbt); + + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + + this.mIsOwnerOP = nbt.getBoolean("mIsOwnerOP"); + this.mOwnerName = nbt.getString("mOwnerName"); + this.mOwnerUUID = nbt.getString("mOwnerUUID"); + } + + @Override + public void updateEntity() { + long aTick = System.currentTimeMillis(); + this.isDead = false; + if (!firstTicked) { + onFirstTick(); + } + try{ + if (this.isServerSide()){ + onPreTick(aTick); + } + } catch (Throwable t){ + Logger.ERROR("Tile Entity Encountered an error in it's pre-tick stage."); + t.printStackTrace(); + } + try{ + if (this.isServerSide()){ + onTick(aTick); + } + } catch (Throwable t){ + Logger.ERROR("Tile Entity Encountered an error in it's tick stage."); + t.printStackTrace(); + } + try{ + if (this.isServerSide()){ + onPostTick(aTick); + } + } catch (Throwable t){ + Logger.ERROR("Tile Entity Encountered an error in it's post-tick stage."); + t.printStackTrace(); + } + } + + public boolean onPreTick(long aTick) { + return true; + } + + public boolean onTick(long aTick){ + try{ + if (this.isServerSide()){ + processRecipe(); + } + } catch (Throwable t){ + Logger.ERROR("Tile Entity Encountered an error in it's processing of a recipe stage."); + t.printStackTrace(); + } + return true; + } + + public boolean onPostTick(long aTick){ + return true; + } + + public boolean processRecipe(){ + return true; + } + + @Override + public boolean canUpdate() { + return true; + } + + public String getOwner(){ + if (this.mOwnerName == null){ + return "null"; + } + return this.mOwnerName; + } + + public UUID getOwnerUUID(){ + return UUID.fromString(this.mOwnerUUID); + } + + public boolean isOwnerOP() { + return mIsOwnerOP; + } + + public void setOwnerInformation(String mName, String mUUID, boolean mOP){ + if (isServerSide()){ + if (this.mOwnerName == null || this.mOwnerUUID == null || this.mOwnerName.equals("null") || this.mOwnerUUID.equals("null")){ + this.mOwnerName = mName; + this.mOwnerUUID = mUUID; + this.mIsOwnerOP = mOP; + } + } + } + + public boolean isServerSide(){ + if (this.hasWorldObj()){ + if (!this.getWorldObj().isRemote){ + return true; + } + } + return false; + } + + public final boolean isClientSide() { + return this.worldObj.isRemote; + } + + public String getCustomName() { + return this.customName; + } + + public void setCustomName(String customName) { + this.customName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.tileentity.name"; + } + + @Override + public boolean hasCustomInventoryName() { + return this.customName != null && !this.customName.equals(""); + } + + @Override + public int getSizeInventory() { + return this.mInventory.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int aIndex) { + return this.mInventory.getStackInSlot(aIndex); + } + + @Override + public ItemStack decrStackSize(int aIndex, int aAmount) { + if (canAccessData()) { + mInventoryChanged = true; + return mInventory.decrStackSize(aIndex, aAmount); + } + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(int p_70304_1_) { + return this.mInventory.getStackInSlotOnClosing(p_70304_1_); + } + + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { + this.mInventory.setInventorySlotContents(p_70299_1_, p_70299_2_); + } + + @Override + public int getInventoryStackLimit() { + return this.mInventory.getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { + return this.mInventory.isUseableByPlayer(p_70300_1_); + } + + @Override + public void openInventory() { + this.mInventory.openInventory(); + } + + @Override + public void closeInventory() { + this.mInventory.closeInventory(); + } + + /** + * Can put aStack into Slot + */ + @Override + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + return canAccessData() && mInventory.isItemValidForSlot(aIndex, aStack); + } + + /** + * returns all valid Inventory Slots, no matter which Side (Unless it's covered). + * The Side Stuff is done in the following two Functions. + */ + @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + if (canAccessData() && (getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), -1, this) || getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), -1, this))) + return mInventory.getAccessibleSlotsFromSide(aSide); + return new int[0]; + } + + /** + * Can put aStack into Slot at Side + */ + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + return canAccessData() && (mRunningThroughTick || !mInputDisabled) && getCoverBehaviorAtSide((byte) aSide).letsItemsIn((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), aIndex, this) && mInventory.canInsertItem(aIndex, aStack, aSide); + } + + /** + * Can pull aStack out of Slot from Side + */ + @Override + public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { + return canAccessData() && (mRunningThroughTick || !mOutputDisabled) && getCoverBehaviorAtSide((byte) aSide).letsItemsOut((byte) aSide, getCoverIDAtSide((byte) aSide), getCoverDataAtSide((byte) aSide), aIndex, this) && mInventory.canExtractItem(aIndex, aStack, aSide); + } + + + @Override + public boolean isValidSlot(int aIndex) { + return this.canAccessData() ? this.mInventory.isValidSlot(aIndex) : false; + } + + + + + private final GT_CoverBehavior[] mCoverBehaviors = new GT_CoverBehavior[] { GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, GregTech_API.sNoBehavior, + GregTech_API.sNoBehavior }; + protected TileEntityBase mMetaTileEntity; + protected long mStoredEnergy = 0; + protected int mAverageEUInputIndex = 0, mAverageEUOutputIndex = 0; + protected boolean mReleaseEnergy = false; + protected int[] mAverageEUInput = new int[11], mAverageEUOutput = new int[11]; + private boolean[] mActiveEUInputs = new boolean[] { false, false, false, false, false, false }, + mActiveEUOutputs = new boolean[] { false, false, false, false, false, false }; + private byte[] mSidedRedstone = new byte[] { 15, 15, 15, 15, 15, 15 }; + private int[] mCoverSides = new int[] { 0, 0, 0, 0, 0, 0 }, mCoverData = new int[] { 0, 0, 0, 0, 0, 0 }, + mTimeStatistics = new int[GregTech_API.TICKS_FOR_LAG_AVERAGING]; + private boolean mHasEnoughEnergy = true; + protected boolean mRunningThroughTick = false; + protected boolean mInputDisabled = false; + protected boolean mOutputDisabled = false; + private boolean mMuffler = false; + private boolean mLockUpgrade = false; + private boolean mActive = false; + private boolean mRedstone = false; + private boolean mWorkUpdate = false; + private boolean mSteamConverter = false; + private boolean mInventoryChanged = false; + private boolean mWorks = true; + private boolean mNeedsUpdate = true; + private boolean mNeedsBlockUpdate = true; + private boolean mSendClientData = false; + private boolean oRedstone = false; + private boolean mEnergyStateReady = false; + private byte mColor = 0, oColor = 0, mStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, + oTexturePage = 0, oLightValueClient = -1, oLightValue = -1, mLightValue = 0, mOtherUpgrades = 0, + mFacing = 0, oFacing = 0, mWorkData = 0; + private int mDisplayErrorCode = 0, oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0, mLagWarningCount = 0; + private short mID = 0; + protected long mTickTimer = 0; + private long oOutput = 0; + private long mAcceptedAmperes = Long.MAX_VALUE; + + + /** + * Cover Support + */ + + public void issueClientUpdate() { + this.mSendClientData = true; + } + + protected final boolean canAccessData() { + return !isDead() && !this.isInvalid(); + } + + @Override + public void issueBlockUpdate() { + super.markDirty(); + } + + @Override + public void issueCoverUpdate(byte aSide) { + this.issueClientUpdate(); + } + + @Override + public void receiveCoverData(byte coverSide, int coverID, int coverData) { + if ((coverSide >= 0 && coverSide < 6) && (mCoverSides[coverSide] == coverID)) + setCoverDataAtSide(coverSide, coverData); + } + + @Override + public long getTimer() { + return this.mTickTimer; + } + + + + + + + + public long getOutputAmperage() { + return this.canAccessData() && this.mMetaTileEntity.isElectric() ? this.mMetaTileEntity.maxAmperesOut() : 0L; + } + + public long getOutputVoltage() { + return this.canAccessData() && this.mMetaTileEntity.isElectric() && this.mMetaTileEntity.isEnetOutput() + ? this.mMetaTileEntity.maxEUOutput() + : 0L; + } + + public long getInputAmperage() { + return this.canAccessData() && this.mMetaTileEntity.isElectric() ? this.mMetaTileEntity.maxAmperesIn() : 0L; + } + + public long getInputVoltage() { + return this.canAccessData() && this.mMetaTileEntity.isElectric() + ? this.mMetaTileEntity.maxEUInput() + : 2147483647L; + } + + @Override + public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { + return !this.canAccessData() ? false : (this.mHasEnoughEnergy = this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy)); + } + + @Override + public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { + if (!this.canAccessData()) { + return false; + } else if (this.getStoredEU() >= this.getEUCapacity() && !aIgnoreTooMuchEnergy) { + return false; + } else { + this.setStoredEU(this.mMetaTileEntity.getEUVar() + aEnergy); + return true; + } + } + + @Override + public boolean inputEnergyFrom(byte aSide) { + return aSide == 6 + ? true + : (!this.isServerSide() + ? this.isEnergyInputSide(aSide) + : aSide >= 0 && aSide < 6 && this.mActiveEUInputs[aSide] && !this.mReleaseEnergy); + } + + @Override + public boolean outputsEnergyTo(byte aSide) { + return aSide == 6 + ? true + : (!this.isServerSide() + ? this.isEnergyOutputSide(aSide) + : aSide >= 0 && aSide < 6 && this.mActiveEUOutputs[aSide] || this.mReleaseEnergy); + } + + private boolean isEnergyInputSide(byte aSide) { + if (aSide >= 0 && aSide < 6) { + if (!this.getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, this.getCoverIDAtSide(aSide), + this.getCoverDataAtSide(aSide), this)) { + return false; + } + + if (this.isInvalid() || this.mReleaseEnergy) { + return false; + } + + if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.mMetaTileEntity.isEnetInput()) { + return this.mMetaTileEntity.isInputFacing(aSide); + } + } + + return false; + } + + private boolean isEnergyOutputSide(byte aSide) { + if (aSide >= 0 && aSide < 6) { + if (!this.getCoverBehaviorAtSide(aSide).letsEnergyOut(aSide, this.getCoverIDAtSide(aSide), + this.getCoverDataAtSide(aSide), this)) { + return false; + } + + if (this.isInvalid() || this.mReleaseEnergy) { + return this.mReleaseEnergy; + } + + if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.mMetaTileEntity.isEnetOutput()) { + return this.mMetaTileEntity.isOutputFacing(aSide); + } + } + + return false; + } + + public boolean isOutputFacing(byte aSide) { + return false; + } + + public boolean isInputFacing(byte aSide) { + return false; + } + + private final TileEntity[] mBufferedTileEntities = new TileEntity[6]; + public boolean ignoreUnloadedChunks = true; + public boolean isDead = false; + + private final void clearNullMarkersFromTileEntityBuffer() { + for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { + if (this.mBufferedTileEntities[i] == this) { + this.mBufferedTileEntities[i] = null; + } + } + + } + + protected final void clearTileEntityBuffer() { + for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { + this.mBufferedTileEntities[i] = null; + } + + } + + public final World getWorld() { + return this.worldObj; + } + + public final int getXCoord() { + return this.xCoord; + } + + public final short getYCoord() { + return (short) this.yCoord; + } + + public final int getZCoord() { + return this.zCoord; + } + + public final int getOffsetX(byte aSide, int aMultiplier) { + return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier; + } + + public final short getOffsetY(byte aSide, int aMultiplier) { + return (short) (this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier); + } + + public final int getOffsetZ(byte aSide, int aMultiplier) { + return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier; + } + + public final boolean openGUI(EntityPlayer aPlayer) { + return this.openGUI(aPlayer, 0); + } + + public final boolean openGUI(EntityPlayer aPlayer, int aID) { + if (aPlayer == null) { + return false; + } else { + aPlayer.openGui(GT_Values.GT, aID, this.worldObj, this.xCoord, this.yCoord, this.zCoord); + return true; + } + } + + public final int getRandomNumber(int aRange) { + return this.worldObj.rand.nextInt(aRange); + } + + public final BiomeGenBase getBiome(int aX, int aZ) { + return this.worldObj.getBiomeGenForCoords(aX, aZ); + } + + public final BiomeGenBase getBiome() { + return this.getBiome(this.xCoord, this.zCoord); + } + + public final Block getBlockOffset(int aX, int aY, int aZ) { + return this.getBlock(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final Block getBlockAtSide(byte aSide) { + return this.getBlockAtSideAndDistance(aSide, 1); + } + + public final Block getBlockAtSideAndDistance(byte aSide, int aDistance) { + return this.getBlock(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final byte getMetaIDOffset(int aX, int aY, int aZ) { + return this.getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final byte getMetaIDAtSide(byte aSide) { + return this.getMetaIDAtSideAndDistance(aSide, 1); + } + + public final byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) { + return this.getMetaID(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final byte getLightLevelOffset(int aX, int aY, int aZ) { + return this.getLightLevel(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final byte getLightLevelAtSide(byte aSide) { + return this.getLightLevelAtSideAndDistance(aSide, 1); + } + + public final byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) { + return this.getLightLevel(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final boolean getOpacityOffset(int aX, int aY, int aZ) { + return this.getOpacity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final boolean getOpacityAtSide(byte aSide) { + return this.getOpacityAtSideAndDistance(aSide, 1); + } + + public final boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) { + return this.getOpacity(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final boolean getSkyOffset(int aX, int aY, int aZ) { + return this.getSky(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final boolean getSkyAtSide(byte aSide) { + return this.getSkyAtSideAndDistance(aSide, 1); + } + + public final boolean getSkyAtSideAndDistance(byte aSide, int aDistance) { + return this.getSky(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final boolean getAirOffset(int aX, int aY, int aZ) { + return this.getAir(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final boolean getAirAtSide(byte aSide) { + return this.getAirAtSideAndDistance(aSide, 1); + } + + public final boolean getAirAtSideAndDistance(byte aSide, int aDistance) { + return this.getAir(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final TileEntity getTileEntityOffset(int aX, int aY, int aZ) { + return this.getTileEntity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + public final TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) { + return aDistance == 1 + ? this.getTileEntityAtSide(aSide) + : this.getTileEntity(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + public final IInventory getIInventory(int aX, int aY, int aZ) { + TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; + } + + public final IInventory getIInventoryOffset(int aX, int aY, int aZ) { + TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); + return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; + } + + public final IInventory getIInventoryAtSide(byte aSide) { + TileEntity tTileEntity = this.getTileEntityAtSide(aSide); + return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; + } + + public final IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) { + TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); + return tTileEntity instanceof IInventory ? (IInventory) tTileEntity : null; + } + + public final IFluidHandler getITankContainer(int aX, int aY, int aZ) { + TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; + } + + public final IFluidHandler getITankContainerOffset(int aX, int aY, int aZ) { + TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); + return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; + } + + public final IFluidHandler getITankContainerAtSide(byte aSide) { + TileEntity tTileEntity = this.getTileEntityAtSide(aSide); + return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; + } + + public final IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) { + TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); + return tTileEntity instanceof IFluidHandler ? (IFluidHandler) tTileEntity : null; + } + + public final IGregTechTileEntity getIGregTechTileEntity(int aX, int aY, int aZ) { + TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; + } + + public final IGregTechTileEntity getIGregTechTileEntityOffset(int aX, int aY, int aZ) { + TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; + } + + public final IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) { + TileEntity tTileEntity = this.getTileEntityAtSide(aSide); + return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; + } + + public final IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) { + TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); + return tTileEntity instanceof IGregTechTileEntity ? (IGregTechTileEntity) tTileEntity : null; + } + + public final Block getBlock(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? Blocks.air + : this.worldObj.getBlock(aX, aY, aZ); + } + + public final byte getMetaID(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? 0 + : (byte) this.worldObj.getBlockMetadata(aX, aY, aZ); + } + + public final byte getLightLevel(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? 0 + : (byte) ((int) (this.worldObj.getLightBrightness(aX, aY, aZ) * 15.0F)); + } + + public final boolean getSky(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? true + : this.worldObj.canBlockSeeTheSky(aX, aY, aZ); + } + + public final boolean getOpacity(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? false + : GT_Utility.isOpaqueBlock(this.worldObj, aX, aY, aZ); + } + + public final boolean getAir(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? true + : GT_Utility.isBlockAir(this.worldObj, aX, aY, aZ); + } + + public final TileEntity getTileEntity(int aX, int aY, int aZ) { + return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) + ? null + : this.worldObj.getTileEntity(aX, aY, aZ); + } + + public final TileEntity getTileEntityAtSide(byte aSide) { + if (aSide >= 0 && aSide < 6 && this.mBufferedTileEntities[aSide] != this) { + int tX = this.getOffsetX(aSide, 1); + short tY = this.getOffsetY(aSide, 1); + int tZ = this.getOffsetZ(aSide, 1); + if (this.crossedChunkBorder(tX, tZ)) { + this.mBufferedTileEntities[aSide] = null; + if (this.ignoreUnloadedChunks && !this.worldObj.blockExists(tX, tY, tZ)) { + return null; + } + } + + if (this.mBufferedTileEntities[aSide] == null) { + this.mBufferedTileEntities[aSide] = this.worldObj.getTileEntity(tX, tY, tZ); + if (this.mBufferedTileEntities[aSide] == null) { + this.mBufferedTileEntities[aSide] = this; + return null; + } else { + return this.mBufferedTileEntities[aSide]; + } + } else if (this.mBufferedTileEntities[aSide].isInvalid()) { + this.mBufferedTileEntities[aSide] = null; + return this.getTileEntityAtSide(aSide); + } else { + return this.mBufferedTileEntities[aSide].xCoord == tX && this.mBufferedTileEntities[aSide].yCoord == tY + && this.mBufferedTileEntities[aSide].zCoord == tZ ? this.mBufferedTileEntities[aSide] : null; + } + } else { + return null; + } + } + + public boolean isDead() { + return this.isDead || this.isInvalidTileEntity(); + } + + public void validate() { + this.clearNullMarkersFromTileEntityBuffer(); + super.validate(); + } + + public void invalidate() { + this.clearNullMarkersFromTileEntityBuffer(); + super.invalidate(); + } + + public void onChunkUnload() { + this.clearNullMarkersFromTileEntityBuffer(); + super.onChunkUnload(); + this.isDead = true; + } + + public final void onAdjacentBlockChange(int aX, int aY, int aZ) { + this.clearNullMarkersFromTileEntityBuffer(); + } + + public final void sendBlockEvent(byte aID, byte aValue) { + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, + new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue), this.xCoord, + this.zCoord); + } + + private boolean crossedChunkBorder(int aX, int aZ) { + return aX >> 4 != this.xCoord >> 4 || aZ >> 4 != this.zCoord >> 4; + } + + public final void setOnFire() { + GT_Utility.setCoordsOnFire(this.worldObj, this.xCoord, this.yCoord, this.zCoord, false); + } + + public final void setToFire() { + this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.fire); + } + + public String trans(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); + } + + @Override + public byte getInternalInputRedstoneSignal(byte aSide) { + return (byte) (getCoverBehaviorAtSide(aSide).getRedstoneInput(aSide, getInputRedstoneSignal(aSide), getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) & 15); + } + + @Override + public byte getInputRedstoneSignal(byte aSide) { + return (byte) (worldObj.getIndirectPowerLevelTo(getOffsetX(aSide, 1), getOffsetY(aSide, 1), getOffsetZ(aSide, 1), aSide) & 15); + } + + @Override + public byte getOutputRedstoneSignal(byte aSide) { + return getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this) ? mSidedRedstone[aSide] : getGeneralRS(aSide); + } + + public boolean allowGeneralRedstoneOutput() { + return false; + } + + public byte getGeneralRS(byte aSide){ + return allowGeneralRedstoneOutput() ? mSidedRedstone[aSide] : 0; + } + + @Override + public void setInternalOutputRedstoneSignal(byte aSide, byte aStrength) { + if (!getCoverBehaviorAtSide(aSide).manipulatesSidedRedstoneOutput(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this)) + setOutputRedstoneSignal(aSide, aStrength); + } + + @Override + public void setOutputRedstoneSignal(byte aSide, byte aStrength) { + aStrength = (byte) Math.min(Math.max(0, aStrength), 15); + if (aSide >= 0 && aSide < 6 && mSidedRedstone[aSide] != aStrength) { + mSidedRedstone[aSide] = aStrength; + issueBlockUpdate(); + } + } + + @Override + public boolean hasInventoryBeenModified() { + return mInventoryChanged; + } + + @Override + public void setGenericRedstoneOutput(boolean aOnOff) { + mRedstone = aOnOff; + } + + @Override + public GT_CoverBehavior getCoverBehaviorAtSide(byte aSide) { + return aSide >= 0 && aSide < mCoverBehaviors.length ? mCoverBehaviors[aSide] : GregTech_API.sNoBehavior; + } + + @Override + public void setCoverIDAtSide(byte aSide, int aID) { + if (aSide >= 0 && aSide < 6) { + mCoverSides[aSide] = aID; + mCoverData[aSide] = 0; + mCoverBehaviors[aSide] = GregTech_API.getCoverBehavior(aID); + issueCoverUpdate(aSide); + issueBlockUpdate(); + } + } + + @Override + public void setCoverItemAtSide(byte aSide, ItemStack aCover) { + GregTech_API.getCoverBehavior(aCover).placeCover(aSide, aCover, this); + } + + @Override + public int getCoverIDAtSide(byte aSide) { + if (aSide >= 0 && aSide < 6) return mCoverSides[aSide]; + return 0; + } + + @Override + public ItemStack getCoverItemAtSide(byte aSide) { + return GT_Utility.intToStack(getCoverIDAtSide(aSide)); + } + + @Override + public boolean canPlaceCoverIDAtSide(byte aSide, int aID) { + return getCoverIDAtSide(aSide) == 0; + } + + @Override + public boolean canPlaceCoverItemAtSide(byte aSide, ItemStack aCover) { + return getCoverIDAtSide(aSide) == 0; + } + + @Override + public void setCoverDataAtSide(byte aSide, int aData) { + if (aSide >= 0 && aSide < 6) mCoverData[aSide] = aData; + } + + @Override + public int getCoverDataAtSide(byte aSide) { + if (aSide >= 0 && aSide < 6) return mCoverData[aSide]; + return 0; + } + + public byte getLightValue() { + return mLightValue; + } + + @Override + public void setLightValue(byte aLightValue) { + mLightValue = (byte) (aLightValue & 15); + } + + @Override + public long getAverageElectricInput() { + int rEU = 0; + for (int i = 0; i < mAverageEUInput.length; i++) { + if (i != mAverageEUInputIndex) + rEU += mAverageEUInput[i]; + } + return rEU / (mAverageEUInput.length - 1); + } + + @Override + public long getAverageElectricOutput() { + int rEU = 0; + for (int i = 0; i < mAverageEUOutput.length; i++) { + if (i != mAverageEUOutputIndex) + rEU += mAverageEUOutput[i]; + } + return rEU / (mAverageEUOutput.length - 1); + } + + public boolean hasSidedRedstoneOutputBehavior() { + return false; + } + + @Override + public boolean dropCover(byte aSide, byte aDroppedSide, boolean aForced) { + if (getCoverBehaviorAtSide(aSide).onCoverRemoval(aSide, getCoverIDAtSide(aSide), mCoverData[aSide], this, aForced) || aForced) { + ItemStack tStack = getCoverBehaviorAtSide(aSide).getDrop(aSide, getCoverIDAtSide(aSide), getCoverDataAtSide(aSide), this); + if (tStack != null) { + tStack.setTagCompound(null); + EntityItem tEntity = new EntityItem(worldObj, getOffsetX(aDroppedSide, 1) + 0.5, getOffsetY(aDroppedSide, 1) + 0.5, getOffsetZ(aDroppedSide, 1) + 0.5, tStack); + tEntity.motionX = 0; + tEntity.motionY = 0; + tEntity.motionZ = 0; + worldObj.spawnEntityInWorld(tEntity); + } + setCoverIDAtSide(aSide, 0); + if (mMetaTileEntity.hasSidedRedstoneOutputBehavior()) { + setOutputRedstoneSignal(aSide, (byte) 0); + } else { + setOutputRedstoneSignal(aSide, (byte) 15); + } + return true; + } + return false; + } + + public String getOwnerName() { + if (GT_Utility.isStringInvalid(mOwnerName)) return "Player"; + return mOwnerName; + } + + public String setOwnerName(String aName) { + if (GT_Utility.isStringInvalid(aName)) return mOwnerName = "Player"; + return mOwnerName = aName; + } + + @Override + public byte getComparatorValue(byte aSide) { + return canAccessData() ? mMetaTileEntity.getComparatorValue(aSide) : 0; + } + + @Override + public byte getStrongOutputRedstoneSignal(byte aSide) { + return aSide >= 0 && aSide < 6 && (mStrongRedstone & (1 << aSide)) != 0 ? (byte) (mSidedRedstone[aSide] & 15) : 0; + } + + @Override + public void setStrongOutputRedstoneSignal(byte aSide, byte aStrength) { + mStrongRedstone |= (1 << aSide); + setOutputRedstoneSignal(aSide, aStrength); + } + + @Override + public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { + if (!canAccessData() || !mMetaTileEntity.isElectric() || !inputEnergyFrom(aSide) || aAmperage <= 0 || aVoltage <= 0 || getStoredEU() >= getEUCapacity() || mMetaTileEntity.maxAmperesIn() <= mAcceptedAmperes) + return 0; + if (aVoltage > getInputVoltage()) { + doExplosion(aVoltage); + return 0; + } + if (increaseStoredEnergyUnits(aVoltage * (aAmperage = Math.min(aAmperage, Math.min(mMetaTileEntity.maxAmperesIn() - mAcceptedAmperes, 1 + ((getEUCapacity() - getStoredEU()) / aVoltage)))), true)) { + mAverageEUInput[mAverageEUInputIndex] += aVoltage * aAmperage; + mAcceptedAmperes += aAmperage; + return aAmperage; + } + return 0; + } + + @Override + public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { + if (!canAccessData() || !mMetaTileEntity.isElectric() || !outputsEnergyTo(aSide) || getStoredEU() - (aVoltage * aAmperage) < mMetaTileEntity.getMinimumStoredEU()) + return false; + if (decreaseStoredEU(aVoltage * aAmperage, false)) { + mAverageEUOutput[mAverageEUOutputIndex] += aVoltage * aAmperage; + return true; + } + return false; + } + + + public double getOutputEnergyUnitsPerTick() { + return oOutput; + } + + + public boolean isTeleporterCompatible(ForgeDirection aSide) { + return false; + } + + + public double demandedEnergyUnits() { + if (mReleaseEnergy || !canAccessData() || !mMetaTileEntity.isEnetInput()) return 0; + return getEUCapacity() - getStoredEU(); + } + + + public double injectEnergyUnits(ForgeDirection aDirection, double aAmount) { + return injectEnergyUnits((byte) aDirection.ordinal(), (int) aAmount, 1) > 0 ? 0 : aAmount; + } + + + public boolean acceptsEnergyFrom(TileEntity aEmitter, ForgeDirection aDirection) { + return inputEnergyFrom((byte) aDirection.ordinal()); + } + + + public boolean emitsEnergyTo(TileEntity aReceiver, ForgeDirection aDirection) { + return outputsEnergyTo((byte) aDirection.ordinal()); + } + + + public double getOfferedEnergy() { + return (canAccessData() && getStoredEU() - mMetaTileEntity.getMinimumStoredEU() >= oOutput) ? Math.max(0, oOutput) : 0; + } + + + public void drawEnergy(double amount) { + mAverageEUOutput[mAverageEUOutputIndex] += amount; + decreaseStoredEU((int) amount, true); + } + + + public int injectEnergy(ForgeDirection aForgeDirection, int aAmount) { + return injectEnergyUnits((byte) aForgeDirection.ordinal(), aAmount, 1) > 0 ? 0 : aAmount; + } + + + public int addEnergy(int aEnergy) { + if (!canAccessData()) return 0; + if (aEnergy > 0) + increaseStoredEnergyUnits(aEnergy, true); + else + decreaseStoredEU(-aEnergy, true); + return (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getEUVar()); + } + + + public boolean isAddedToEnergyNet() { + return false; + } + + + public int demandsEnergy() { + if (mReleaseEnergy || !canAccessData() || !mMetaTileEntity.isEnetInput()) return 0; + return getCapacity() - getStored(); + } + + + public int getCapacity() { + return (int) Math.min(Integer.MAX_VALUE, getEUCapacity()); + } + + + public int getStored() { + return (int) Math.min(Integer.MAX_VALUE, Math.min(getStoredEU(), getCapacity())); + } + + + public void setStored(int aEU) { + if (canAccessData()) setStoredEU(aEU); + } + + + public int getMaxSafeInput() { + return (int) Math.min(Integer.MAX_VALUE, getInputVoltage()); + } + + + public int getMaxEnergyOutput() { + if (mReleaseEnergy) return Integer.MAX_VALUE; + return getOutput(); + } + + + public int getOutput() { + return (int) Math.min(Integer.MAX_VALUE, oOutput); + } + + + public int injectEnergy(Direction aDirection, int aAmount) { + return injectEnergyUnits((byte) aDirection.toSideValue(), aAmount, 1) > 0 ? 0 : aAmount; + } + + public boolean acceptsEnergyFrom(TileEntity aReceiver, Direction aDirection) { + return inputEnergyFrom((byte) aDirection.toSideValue()); + } + + + public boolean emitsEnergyTo(TileEntity aReceiver, Direction aDirection) { + return outputsEnergyTo((byte) aDirection.toSideValue()); + } + + @Override + public boolean isInvalidTileEntity() { + return isInvalid(); + } + + @Override + public boolean addStackToSlot(int aIndex, ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return true; + if (aIndex < 0 || aIndex >= getSizeInventory()) return false; + ItemStack tStack = getStackInSlot(aIndex); + if (GT_Utility.isStackInvalid(tStack)) { + setInventorySlotContents(aIndex, aStack); + return true; + } + aStack = GT_OreDictUnificator.get(aStack); + if (GT_Utility.areStacksEqual(tStack, aStack) && tStack.stackSize + aStack.stackSize <= Math.min(aStack.getMaxStackSize(), getInventoryStackLimit())) { + tStack.stackSize += aStack.stackSize; + return true; + } + return false; + } + + @Override + public boolean addStackToSlot(int aIndex, ItemStack aStack, int aAmount) { + return addStackToSlot(aIndex, GT_Utility.copyAmount(aAmount, aStack)); + } + + @Override + public void markDirty() { + super.markDirty(); + mInventoryChanged = true; + } + + + + /** + * To Do + */ + + public boolean isElectric() { + return true; + } + + public boolean isEnetOutput() { + return false; + } + + public boolean isEnetInput() { + return false; + } + + public long maxEUStore() { + return 0L; + } + + public long maxEUInput() { + return 0L; + } + + public long maxEUOutput() { + return 0L; + } + + public long maxAmperesOut() { + return 1L; + } + + public long maxAmperesIn() { + return 1L; + } + + public void doEnergyExplosion() { + if (this.getUniversalEnergyCapacity() > 0L + && this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 5L) { + this.doExplosion(this.oOutput * (long) (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() + ? 4 + : (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 2L ? 2 : 1))); + GT_Mod arg9999 = GT_Mod.instance; + GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(this.mOwnerName), + "electricproblems"); + } + + } + + public void doExplosion(long aAmount) { + if (this.canAccessData()) { + if (GregTech_API.sMachineWireFire && this.mMetaTileEntity.isElectric()) { + try { + this.mReleaseEnergy = true; + Util.emitEnergyToNetwork(GT_Values.V[5], Math.max(1L, this.getStoredEU() / GT_Values.V[5]), this); + } catch (Exception arg4) { + } + } + this.mReleaseEnergy = false; + this.onExplosion(); + PollutionUtils.addPollution(this, 100000); + this.mMetaTileEntity.doExplosion(aAmount); + } + + } + + public void onExplosion() { + + } + + @Override + public String[] getDescription() { + return this.canAccessData() ? this.mMetaTileEntity.getDescription() : new String[0]; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public String[] getInfoData() { + return null; + } + + public long getEUVar() { + return this.mStoredEnergy; + } + + public void setEUVar(long aEnergy) { + this.mStoredEnergy = aEnergy; + } + + public long getStoredEU() { + return this.canAccessData() ? Math.min(this.mMetaTileEntity.getEUVar(), this.getEUCapacity()) : 0L; + } + + public long getEUCapacity() { + return this.canAccessData() ? this.mMetaTileEntity.maxEUStore() : 0L; + } + + public long getMinimumStoredEU() { + return 512L; + } + + public boolean setStoredEU(long aEnergy) { + if (!this.canAccessData()) { + return false; + } else { + if (aEnergy < 0L) { + aEnergy = 0L; + } + + this.mMetaTileEntity.setEUVar(aEnergy); + return true; + } + } + + public boolean decreaseStoredEU(long aEnergy, boolean aIgnoreTooLessEnergy) { + if (!this.canAccessData()) { + return false; + } else if (this.mMetaTileEntity.getEUVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { + return false; + } else { + this.setStoredEU(this.mMetaTileEntity.getEUVar() - aEnergy); + if (this.mMetaTileEntity.getEUVar() < 0L) { + this.setStoredEU(0L); + return false; + } else { + return true; + } + } + } + + //Required as of 5.09.32-pre5 + public boolean energyStateReady() { + return false; + } + + + private boolean firstTicked = false; + + public boolean onFirstTick() { + if (!firstTicked) { + firstTicked = true; + if (this.mInventory != null) { + this.mInventory.purgeNulls(); + return true; + } + } + return false; + } + + + /** + * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d + */ + public boolean inputEnergyFrom(byte arg0, boolean arg1) { + // TODO Auto-generated method stub + return false; + } + + + /** + * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d + */ + public boolean outputsEnergyTo(byte arg0, boolean arg1) { + // TODO Auto-generated method stub + return false; + } + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java b/src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java new file mode 100644 index 0000000000..fb599b0bae --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java @@ -0,0 +1,1168 @@ +/*package gtPlusPlus.core.tileentities.base; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.net.GT_Packet; +import gregtech.api.net.GT_Packet_Block_Event; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.interfaces.IGregtechPower; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import net.minecraftforge.common.util.ForgeDirection; + +public abstract class TilePoweredGT extends TileEntityBase implements IGregtechPower { + + public static AutoMap mPoweredEntities = new AutoMap(); + + //Base Tile Fields + public boolean ignoreUnloadedChunks; + public boolean isDead; + //Meta Tile Fields + private long mAcceptedAmperes; + + private boolean[] mActiveEUInputs; + private boolean[] mActiveEUOutputs; + protected int[] mAverageEUInput; + protected int mAverageEUInputIndex; + protected int[] mAverageEUOutput; + protected int mAverageEUOutputIndex; + private final TileEntity[] mBufferedTileEntities; + private byte mFacing = 0; + private boolean mHasEnoughEnergy; + private boolean mNeedsUpdate; + private boolean mNeedsBlockUpdate; + private boolean mRunningThroughTick; + private boolean mSendClientData; + protected boolean mReleaseEnergy; + private long mTickTimer; + protected long mStoredEnergy; + protected long mStoredSteam; + + public TilePoweredGT() { + super(); + this.mBufferedTileEntities = new TileEntity[6]; + this.ignoreUnloadedChunks = true; + this.isDead = false; + mPoweredEntities.put(this); + } + + @Override + public boolean acceptsRotationalEnergy(byte p0) { + return false; + } + + private boolean canAccessData() { + return this.isInvalid() ? false : true; + } + + private final void clearNullMarkersFromTileEntityBuffer() { + for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { + if (this.mBufferedTileEntities[i] == this) { + this.mBufferedTileEntities[i] = null; + } + } + } + + protected final void clearTileEntityBuffer() { + for (int i = 0; i < this.mBufferedTileEntities.length; ++i) { + this.mBufferedTileEntities[i] = null; + } + } + + private boolean crossedChunkBorder(final int aX, final int aZ) { + return aX >> 4 != this.xCoord >> 4 || aZ >> 4 != this.zCoord >> 4; + } + + @Override + public boolean decreaseStoredEnergyUnits(final long aEnergy, final boolean aIgnoreTooLessEnergy) { + return this.canAccessData() && (this.mHasEnoughEnergy = (this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) + || this.decreaseStoredSteam(aEnergy, false) + || (aIgnoreTooLessEnergy && this.decreaseStoredSteam(aEnergy, true)))); + } + + public boolean decreaseStoredEU(final long aEnergy, final boolean aIgnoreTooLessEnergy) { + if (!this.canAccessData()) { + return false; + } + if (this.getEUVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { + return false; + } + this.setStoredEU(this.getEUVar() - aEnergy); + if (this.getEUVar() < 0L) { + this.setStoredEU(0L); + return false; + } + return true; + } + + public boolean decreaseStoredSteam(final long aEnergy, final boolean aIgnoreTooLessEnergy) { + if (!this.canAccessData()) { + return false; + } + if (this.getSteamVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { + return false; + } + this.setStoredSteam(this.getSteamVar() - aEnergy); + if (this.getSteamVar() < 0L) { + this.setStoredSteam(0L); + return false; + } + return true; + } + + public void doExplosion(final long aExplosionPower) { + final float tStrength = (aExplosionPower < GT_Values.V[0]) + ? 1.0f + : ((aExplosionPower < GT_Values.V[1]) + ? 2.0f + : ((aExplosionPower < GT_Values.V[2]) + ? 3.0f + : ((aExplosionPower < GT_Values.V[3]) + ? 4.0f + : ((aExplosionPower < GT_Values.V[4]) + ? 5.0f + : ((aExplosionPower < GT_Values.V[4] * 2L) + ? 6.0f + : ((aExplosionPower < GT_Values.V[5]) + ? 7.0f + : ((aExplosionPower < GT_Values.V[6]) + ? 8.0f + : ((aExplosionPower < GT_Values.V[7]) + ? 9.0f + : 10.0f)))))))); + final int tX = this.getXCoord(); + final int tY = this.getYCoord(); + final int tZ = this.getZCoord(); + final World tWorld = this.getWorld(); + GT_Utility.sendSoundToPlayers(tWorld, (String) GregTech_API.sSoundList.get(209), 1.0f, -1.0f, tX, tY, tZ); + tWorld.setBlock(tX, tY, tZ, Blocks.air); + if (GregTech_API.sMachineExplosions) { + tWorld.createExplosion((Entity) null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); + } + } + + public boolean drainEnergyUnits(final byte aSide, final long aVoltage, final long aAmperage) { + if (!this.canAccessData() || !this.isElectric() || !this.outputsEnergyTo(aSide) + || this.getStoredEU() - aVoltage * aAmperage < this.getMinimumStoredEU()) { + return false; + } + if (this.decreaseStoredEU(aVoltage * aAmperage, false)) { + final int[] mAverageEUOutput = this.mAverageEUOutput; + final int mAverageEUOutputIndex = this.mAverageEUOutputIndex; + mAverageEUOutput[mAverageEUOutputIndex] += (int) (aVoltage * aAmperage); + return true; + } + return false; + } + + @Override + public final boolean getAir(final int aX, final int aY, final int aZ) { + return (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) + || GT_Utility.isBlockAir(this.worldObj, aX, aY, aZ); + } + + @Override + public final boolean getAirAtSide(final byte aSide) { + return this.getAirAtSideAndDistance(aSide, 1); + } + + @Override + public final boolean getAirAtSideAndDistance(final byte aSide, final int aDistance) { + return this.getAir(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + @Override + public final boolean getAirOffset(final int aX, final int aY, final int aZ) { + return this.getAir(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + @Override + public long getAverageElectricInput() { + int rEU = 0; + for (int i = 0; i < this.mAverageEUInput.length; ++i) { + if (i != this.mAverageEUInputIndex) { + rEU += this.mAverageEUInput[i]; + } + } + return rEU / (this.mAverageEUInput.length - 1); + } + + public long getAverageElectricOutput() { + int rEU = 0; + for (int i = 0; i < this.mAverageEUOutput.length; ++i) { + if (i != this.mAverageEUOutputIndex) { + rEU += this.mAverageEUOutput[i]; + } + } + return rEU / (this.mAverageEUOutput.length - 1); + } + + @Override + public byte getBackFacing() { + return GT_Utility.getOppositeSide((int) this.mFacing); + } + + @Override + public final Block getBlock(final int aX, final int aY, final int aZ) { + if (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) { + return Blocks.air; + } + return this.worldObj.getBlock(aX, aY, aZ); + } + + + @Override + public final Block getBlockAtSide(final byte aSide) { + return this.getBlockAtSideAndDistance(aSide, 1); + } + + @Override + public final Block getBlockAtSideAndDistance(final byte aSide, final int aDistance) { + return this.getBlock(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + @Override + public final Block getBlockOffset(final int aX, final int aY, final int aZ) { + return this.getBlock(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + @Override + public String[] getDescription() { + // TODO Auto-generated method stub + return null; + } + + + + + + + + + @Override + public long getEUCapacity() { + if (this.canAccessData()) { + return this.maxEUStore(); + } + return 0L; + } + + public long getEUVar() { + return mStoredEnergy; + } + + @Override + public byte getFrontFacing() { + return this.mFacing; + } + + @Override + public final IGregTechTileEntity getIGregTechTileEntity(final int aX, final int aY, final int aZ) { + final TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + return (IGregTechTileEntity) tTileEntity; + } + return null; + } + + @Override + public final IGregTechTileEntity getIGregTechTileEntityAtSide(final byte aSide) { + final TileEntity tTileEntity = this.getTileEntityAtSide(aSide); + if (tTileEntity instanceof IGregTechTileEntity) { + return (IGregTechTileEntity) tTileEntity; + } + return null; + } + + @Override + public final IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(final byte aSide, final int aDistance) { + final TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); + if (tTileEntity instanceof IGregTechTileEntity) { + return (IGregTechTileEntity) tTileEntity; + } + return null; + } + + @Override + public final IGregTechTileEntity getIGregTechTileEntityOffset(final int aX, final int aY, final int aZ) { + final TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + return (IGregTechTileEntity) tTileEntity; + } + return null; + } + + @Override + public final IInventory getIInventory(final int aX, final int aY, final int aZ) { + final TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IInventory) { + return (IInventory) tTileEntity; + } + return null; + } + + @Override + public final IInventory getIInventoryAtSide(final byte aSide) { + final TileEntity tTileEntity = this.getTileEntityAtSide(aSide); + if (tTileEntity instanceof IInventory) { + return (IInventory) tTileEntity; + } + return null; + } + + @Override + public final IInventory getIInventoryAtSideAndDistance(final byte aSide, final int aDistance) { + final TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); + if (tTileEntity instanceof IInventory) { + return (IInventory) tTileEntity; + } + return null; + } + + @Override + public final IInventory getIInventoryOffset(final int aX, final int aY, final int aZ) { + final TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); + if (tTileEntity instanceof IInventory) { + return (IInventory) tTileEntity; + } + return null; + } + + @Override + public String[] getInfoData() { + // TODO Auto-generated method stub + return null; + } + + @Override + public long getInputAmperage() { + if (this.canAccessData() && this.isElectric()) { + return this.maxAmperesIn(); + } + return 0L; + } + + public long getInputTier() { + return GT_Utility.getTier(this.getInputVoltage()); + } + + @Override + public long getInputVoltage() { + if (this.canAccessData() && this.isElectric()) { + return this.maxEUInput(); + } + return 2147483647L; + } + + private long getMinimumStoredEU() { + return 0; + } + + @Override + public final int getOffsetX(final byte aSide, final int aMultiplier) { + return this.xCoord + ForgeDirection.getOrientation((int) aSide).offsetX * aMultiplier; + } + + public final short getOffsetY(final byte aSide, final int aMultiplier) { + return (short) (this.yCoord + ForgeDirection.getOrientation((int) aSide).offsetY * aMultiplier); + } + + public final int getOffsetZ(final byte aSide, final int aMultiplier) { + return this.zCoord + ForgeDirection.getOrientation((int) aSide).offsetZ * aMultiplier; + } + + @Override + public long getOutputAmperage() { + if (this.canAccessData() && this.isElectric()) { + return this.maxAmperesOut(); + } + return 0L; + } + + public long getOutputTier() { + return GT_Utility.getTier(this.getOutputVoltage()); + } + + @Override + public long getOutputVoltage() { + if (this.canAccessData() && this.isElectric() && this.isEnetOutput()) { + return this.maxEUOutput(); + } + return 0L; + } + + @Override + public int getRandomNumber(int p0) { + return CORE.RANDOM.nextInt(); + } + + @Override + public long getSteamCapacity() { + if (this.canAccessData()) { + return this.maxSteamStore(); + } + return 0L; + } + + public long getSteamVar() { + return mStoredSteam; + } + + @Override + public long getStoredEU() { + if (this.canAccessData()) { + return Math.min(this.getEUVar(), this.getEUCapacity()); + } + return 0L; + } + + + + + + + + + + @Override + public long getStoredSteam() { + if (this.canAccessData()) { + return Math.min(this.getSteamVar(), this.getSteamCapacity()); + } + return 0L; + } + + @Override + public final TileEntity getTileEntity(final int aX, final int aY, final int aZ) { + if (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) { + return null; + } + return this.worldObj.getTileEntity(aX, aY, aZ); + } + + public final TileEntity getTileEntityAtSide(final byte aSide) { + if (aSide < 0 || aSide >= 6 || this.mBufferedTileEntities[aSide] == this) { + return null; + } + final int tX = this.getOffsetX(aSide, 1); + final int tY = this.getOffsetY(aSide, 1); + final int tZ = this.getOffsetZ(aSide, 1); + if (this.crossedChunkBorder(tX, tZ)) { + this.mBufferedTileEntities[aSide] = null; + if (this.ignoreUnloadedChunks && !this.worldObj.blockExists(tX, tY, tZ)) { + return null; + } + } + if (this.mBufferedTileEntities[aSide] == null) { + this.mBufferedTileEntities[aSide] = this.worldObj.getTileEntity(tX, tY, tZ); + if (this.mBufferedTileEntities[aSide] == null) { + this.mBufferedTileEntities[aSide] = this; + return null; + } + return this.mBufferedTileEntities[aSide]; + } else { + if (this.mBufferedTileEntities[aSide].isInvalid()) { + this.mBufferedTileEntities[aSide] = null; + return this.getTileEntityAtSide(aSide); + } + if (this.mBufferedTileEntities[aSide].xCoord == tX && this.mBufferedTileEntities[aSide].yCoord == tY + && this.mBufferedTileEntities[aSide].zCoord == tZ) { + return this.mBufferedTileEntities[aSide]; + } + return null; + } + } + + @Override + public final TileEntity getTileEntityAtSideAndDistance(final byte aSide, final int aDistance) { + if (aDistance == 1) { + return this.getTileEntityAtSide(aSide); + } + return this.getTileEntity(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), + this.getOffsetZ(aSide, aDistance)); + } + + + + + + + + + + + @Override + public final TileEntity getTileEntityOffset(final int aX, final int aY, final int aZ) { + return this.getTileEntity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); + } + + @Override + public long getUniversalEnergyCapacity() { + return 0; + } + + @Override + public long getUniversalEnergyStored() { + return 0; + } + + @Override + public World getWorld() { + return this.getWorldObj(); + } + + + + + + + @Override + public int getXCoord() { + return this.xCoord; + } + + + + + + @Override + public short getYCoord() { + return (short) this.yCoord; + } + + @Override + public int getZCoord() { + return this.zCoord; + } + + public boolean hasEnoughEnergy() { + return (this.getStoredEU() > 0 ? (mHasEnoughEnergy = true) : (mHasEnoughEnergy = false)); + } + + + + + @Override + public boolean increaseStoredEnergyUnits(final long aEnergy, final boolean aIgnoreTooMuchEnergy) { + if (!this.canAccessData()) { + return false; + } + if (this.getStoredEU() < this.getEUCapacity() || aIgnoreTooMuchEnergy) { + this.setStoredEU(this.getEUVar() + aEnergy); + return true; + } + return false; + } + + @Override + public boolean increaseStoredSteam(final long aEnergy, final boolean aIgnoreTooMuchEnergy) { + if (!this.canAccessData()) { + return false; + } + if (this.getSteamVar() < this.getSteamCapacity() || aIgnoreTooMuchEnergy) { + this.setStoredSteam(this.getSteamVar() + aEnergy); + return true; + } + return false; + } + + public long injectEnergyUnits(final byte aSide, final long aVoltage, long aAmperage) { + if (!this.canAccessData() || !this.isElectric() || !this.inputEnergyFrom(aSide) + || aAmperage <= 0L || aVoltage <= 0L || this.getStoredEU() >= this.getEUCapacity() + || this.maxAmperesIn() <= this.mAcceptedAmperes) { + return 0L; + } + if (aVoltage > this.getInputVoltage()) { + this.doExplosion(aVoltage); + return 0L; + } + if (this.increaseStoredEnergyUnits(aVoltage + * (aAmperage = Math.min(aAmperage, Math.min(this.maxAmperesIn() - this.mAcceptedAmperes, + 1L + (this.getEUCapacity() - this.getStoredEU()) / aVoltage))), + true)) { + final int[] mAverageEUInput = this.mAverageEUInput; + final int mAverageEUInputIndex = this.mAverageEUInputIndex; + mAverageEUInput[mAverageEUInputIndex] += (int) (aVoltage * aAmperage); + this.mAcceptedAmperes += aAmperage; + return aAmperage; + } + return 0L; + } + + @Override + public boolean injectRotationalEnergy(byte p0, long p1, long p2) { + return false; + } + + @Override + public boolean inputEnergyFrom(final byte aSide) { + if (aSide == 6) { + return true; + } + if (this.isServerSide()) { + return aSide >= 0 && aSide < 6 && this.mActiveEUInputs[aSide] && !this.mReleaseEnergy; + } + return this.isEnergyInputSide(aSide); + } + + + public final boolean isClientSide() { + return this.worldObj.isRemote; + } + + @Override + public boolean isDead() { + return this.isDead; + } + + private boolean isElectric() { + return true; + } + + private boolean isEnergyInputSide(final byte aSide) { + if (aSide >= 0 && aSide < 6) { + if (this.isInvalid() || this.mReleaseEnergy) { + return false; + } + if (this.canAccessData() && this.isElectric() && this.isEnetInput()) { + return this.isInputFacing(aSide); + } + } + return false; + } + + private boolean isEnergyOutputSide(final byte aSide) { + if (aSide >= 0 && aSide < 6) { + if (this.isInvalid() || this.mReleaseEnergy) { + return this.mReleaseEnergy; + } + if (this.canAccessData() && this.isElectric() && this.isEnetOutput()) { + return this.isOutputFacing(aSide); + } + } + return false; + } + + public boolean isEnetInput() { + return false; + } + + public boolean isEnetOutput() { + return false; + } + + @Override + public boolean isGivingInformation() { + return this.canAccessData() && this.isGivingInformation(); + } + + public boolean isInputFacing(final byte aSide) { + return false; + } + + + + + @Override + public boolean isInvalidTileEntity() { + return isDead() ? true : false; + } + + public boolean isOutputFacing(final byte aSide) { + return false; + } + + public final boolean isServerSide() { + return !this.worldObj.isRemote; + } + + public boolean isUniversalEnergyStored(final long aEnergyAmount) { + return this.getUniversalEnergyStored() >= aEnergyAmount || (this.mHasEnoughEnergy = false); + } + + @Override + public boolean isValidFacing(final byte aSide) { + return this.canAccessData(); + } + + public long maxAmperesIn() { + return 1L; + } + + public long maxAmperesOut() { + return 1L; + } + + public long maxEUInput() { + return 0L; + } + + public long maxEUOutput() { + return 0L; + } + + public long maxEUStore() { + return 0L; + } + + public long maxSteamStore() { + return 256000L; + } + + public final void onAdjacentBlockChange(final int aX, final int aY, final int aZ) { + this.clearNullMarkersFromTileEntityBuffer(); + } + + @Override + public boolean outputsEnergyTo(final byte aSide) { + if (aSide == 6) { + return true; + } + if (this.isServerSide()) { + if (aSide < 0 || aSide >= 6 || !this.mActiveEUOutputs[aSide]) { + if (!this.mReleaseEnergy) { + return false; + } + } + return true; + } + return this.isEnergyOutputSide(aSide); + } + + public final void sendBlockEvent(final byte aID, final byte aValue) { + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, + (GT_Packet) new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue), + this.xCoord, this.zCoord); + } + + public void setEUVar(final long aEnergy) { + mStoredEnergy = aEnergy; + } + + @Override + public void setFrontFacing(byte aFacing) { + if (this.isValidFacing(aFacing)) { + this.mFacing = aFacing; + //this.onFacingChange(); + //this.onMachineBlockUpdate(); + } + } + + public void setSteamVar(final long aSteam) { + mStoredSteam = aSteam; + } + + public boolean setStoredEU(long aEnergy) { + if (!this.canAccessData()) { + return false; + } + if (aEnergy < 0L) { + aEnergy = 0L; + } + this.setEUVar(aEnergy); + return true; + } + + public boolean setStoredSteam(long aEnergy) { + if (!this.canAccessData()) { + return false; + } + if (aEnergy < 0L) { + aEnergy = 0L; + } + this.setSteamVar(aEnergy); + return true; + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + // TODO Auto-generated method stub + super.writeToNBT(nbt); + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + // TODO Auto-generated method stub + super.readFromNBT(nbt); + } + + + + + @Override + public boolean onPreTick(long aTick) { + return onPreTick(this, this.mTickTimer); + } + + @Override + public boolean onTick(long aTick) { + return onTick(this, this.mTickTimer); + } + + @Override + public boolean onPostTick(long aTick) { + return onPostTick(this, this.mTickTimer); + } + + @Override + public boolean onPreTick(TilePoweredGT tilePoweredGT, long mTickTimer2) { + return super.onPreTick(mTickTimer2); + } + + @Override + public boolean onTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2) { + return super.onTick(mTickTimer2); + } + + @Override + public boolean onPostTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2) { + return super.onPostTick(mTickTimer2); + } + + @Override + public void markDirty() { + super.markDirty(); + } + + @Override + public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { + // TODO Auto-generated method stub + return super.receiveClientEvent(p_145842_1_, p_145842_2_); + } + + @Override + public void onChunkUnload() { + this.clearNullMarkersFromTileEntityBuffer(); + super.onChunkUnload(); + this.isDead = true; + } + + + public void updateEntity() { + super.updateEntity(); + this.isDead = false; + + this.mRunningThroughTick = true; + long tTime = System.currentTimeMillis(); + int tCode = 0; + final boolean aSideServer = this.isServerSide(); + final boolean aSideClient = this.isClientSide(); + try { + for (tCode = 0; this.hasValidMetaTileEntity() && tCode >= 0; tCode = -1) { + Label_1743 : { + switch (tCode) { + case 0 : { + ++tCode; + if (this.mTickTimer++ != 0L) { + break Label_1743; + } + this.oX = this.xCoord; + this.oY = this.yCoord; + this.oZ = this.zCoord; + + this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, + (TileEntity) this); + this.onFirstTick(this); + if (!this.hasValidMetaTileEntity()) { + this.mRunningThroughTick = false; + return; + } + break Label_1743; + } + case 1 : { + ++tCode; + if (!aSideClient) { + break Label_1743; + } + if (this.mNeedsUpdate) { + this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); + this.mNeedsUpdate = false; + } + break Label_1743; + } + case 2 : + case 3 : + case 4 : + case 5 : + case 6 : + case 7 : { + if (aSideServer && this.mTickTimer > 10L) { + for (byte i = (byte) (tCode - 2); i < 6; ++i) { + + } + } + } + case 8 : { + tCode = 9; + if (aSideServer) { + if (++this.mAverageEUInputIndex >= this.mAverageEUInput.length) { + this.mAverageEUInputIndex = 0; + } + if (++this.mAverageEUOutputIndex >= this.mAverageEUOutput.length) { + this.mAverageEUOutputIndex = 0; + } + this.mAverageEUInput[this.mAverageEUInputIndex] = 0; + this.mAverageEUOutput[this.mAverageEUOutputIndex] = 0; + } + } + case 9 : { + ++tCode; + this.onPreTick(this, this.mTickTimer); + if (!this.hasValidMetaTileEntity()) { + this.mRunningThroughTick = false; + return; + } + } + case 10 : { + ++tCode; + if (!aSideServer) { + break Label_1743; + } + + if (this.xCoord != this.oX || this.yCoord != this.oY || this.zCoord != this.oZ) { + this.oX = this.xCoord; + this.oY = this.yCoord; + this.oZ = this.zCoord; + this.issueClientUpdate(); + this.clearTileEntityBuffer(); + } + if (this.mFacing != this.oFacing) { + this.oFacing = this.mFacing; + this.issueBlockUpdate(); + } + if (this.mTickTimer > 20L && this.isElectric()) { + this.mAcceptedAmperes = 0L; + if (this.getOutputVoltage() != this.oOutput) { + this.oOutput = this.getOutputVoltage(); + } + if (this.isEnetOutput() || this.isEnetInput()) { + for (byte i = 0; i < 6; ++i) { + boolean temp = this.isEnergyInputSide(i); + if (temp != this.mActiveEUInputs[i]) { + this.mActiveEUInputs[i] = temp; + } + temp = this.isEnergyOutputSide(i); + if (temp != this.mActiveEUOutputs[i]) { + this.mActiveEUOutputs[i] = temp; + } + } + } + if (this.isEnetOutput() && this.oOutput > 0L) { + final long tOutputVoltage = Math.max(this.oOutput, + this.oOutput + (1 << GT_Utility.getTier(this.oOutput))); + final long tUsableAmperage = Math.min(this.getOutputAmperage(), + (this.getStoredEU() - this.getMinimumStoredEU()) + / tOutputVoltage); + if (tUsableAmperage > 0L) { + final long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork( + this.oOutput, tUsableAmperage, (IEnergyConnected) this); + final int[] mAverageEUOutput = this.mAverageEUOutput; + final int mAverageEUOutputIndex = this.mAverageEUOutputIndex; + mAverageEUOutput[mAverageEUOutputIndex] += (int) tEU; + this.decreaseStoredEU(tEU, true); + } + } + if (this.getEUCapacity() > 0L) { + if (GregTech_API.sMachineFireExplosions && this.getRandomNumber(1000) == 0) { + final Block tBlock = this.getBlockAtSide((byte) this.getRandomNumber(6)); + if (tBlock instanceof BlockFire) { + this.doEnergyExplosion(); + } + } + if (!this.hasValidMetaTileEntity()) { + this.mRunningThroughTick = false; + return; + } + } + } + if (!this.hasValidMetaTileEntity()) { + this.mRunningThroughTick = false; + return; + } + break Label_1743; + } + case 13 : { + ++tCode; + this.updateStatus(); + if (!this.hasValidMetaTileEntity()) { + this.mRunningThroughTick = false; + return; + } + } + case 14 : { + ++tCode; + this.onPostTick((IGregTechTileEntity) this, this.mTickTimer); + if (!this.hasValidMetaTileEntity()) { + this.mRunningThroughTick = false; + return; + } + } + case 15 : { + ++tCode; + if (!aSideServer) { + break; + } + if (this.mTickTimer % 10L == 0L && this.mSendClientData) { + final IGT_NetworkHandler nw = GT_Values.NW; + final World worldObj = this.worldObj; + final int xCoord = this.xCoord; + final short n = (short) this.yCoord; + final int zCoord = this.zCoord; + final short mid = this.mID; + final int n2 = this.mCoverSides[0]; + final int n3 = this.mCoverSides[1]; + final int n4 = this.mCoverSides[2]; + final int n5 = this.mCoverSides[3]; + final int n6 = this.mCoverSides[4]; + final int n7 = this.mCoverSides[5]; + final byte oTextureData = (byte) ((this.mFacing & 0x7) | (this.mActive ? 8 : 0) + | (this.mRedstone ? 16 : 0) | (this.mLockUpgrade ? 32 : 0)); + this.oTextureData = oTextureData; + final byte oTexturePage = (byte) ((this.hasValidMetaTileEntity() + && this.mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) + ? ((GT_MetaTileEntity_Hatch) this.mMetaTileEntity).getTexturePage() + : 0); + this.oTexturePage = oTexturePage; + final byte oUpdateData = (byte) (this.hasValidMetaTileEntity() + ? this.mMetaTileEntity.getUpdateData() + : 0); + this.oUpdateData = oUpdateData; + final byte oRedstoneData = (byte) (((this.mSidedRedstone[0] > 0) ? 1 : 0) + | ((this.mSidedRedstone[1] > 0) ? 2 : 0) + | ((this.mSidedRedstone[2] > 0) ? 4 : 0) + | ((this.mSidedRedstone[3] > 0) ? 8 : 0) + | ((this.mSidedRedstone[4] > 0) ? 16 : 0) + | ((this.mSidedRedstone[5] > 0) ? 32 : 0)); + this.oRedstoneData = oRedstoneData; + final byte mColor = this.mColor; + this.oColor = mColor; + nw.sendPacketToAllPlayersInRange(worldObj, + (GT_Packet) new GT_Packet_TileEntity(xCoord, n, zCoord, mid, n2, n3, n4, n5, n6, + n7, oTextureData, oTexturePage, oUpdateData, oRedstoneData, mColor), + this.xCoord, this.zCoord); + this.mSendClientData = false; + } + if (this.mTickTimer > 10L) { + byte tData = (byte) ((this.mFacing & 0x7) | (this.mActive ? 8 : 0) + | (this.mRedstone ? 16 : 0) | (this.mLockUpgrade ? 32 : 0)); + if (tData != this.oTextureData) { + this.sendBlockEvent((byte) 0, this.oTextureData = tData); + } + tData = this.mMetaTileEntity.getUpdateData(); + if (tData != this.oUpdateData) { + this.sendBlockEvent((byte) 1, this.oUpdateData = tData); + } + if (this.mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { + tData = ((GT_MetaTileEntity_Hatch) this.mMetaTileEntity).getTexturePage(); + if (tData != this.oTexturePage) { + final byte b = 1; + final byte oTexturePage2 = tData; + this.oTexturePage = oTexturePage2; + this.sendBlockEvent(b, (byte) (oTexturePage2 | 0x80)); + } + } + if (this.mColor != this.oColor) { + this.sendBlockEvent((byte) 2, this.oColor = this.mColor); + } + tData = (byte) (((this.mSidedRedstone[0] > 0) ? 1 : 0) + | ((this.mSidedRedstone[1] > 0) ? 2 : 0) + | ((this.mSidedRedstone[2] > 0) ? 4 : 0) + | ((this.mSidedRedstone[3] > 0) ? 8 : 0) + | ((this.mSidedRedstone[4] > 0) ? 16 : 0) + | ((this.mSidedRedstone[5] > 0) ? 32 : 0)); + if (tData != this.oRedstoneData) { + this.sendBlockEvent((byte) 3, this.oRedstoneData = tData); + } + if (this.mLightValue != this.oLightValue) { + this.worldObj.setLightValue(EnumSkyBlock.Block, this.xCoord, this.yCoord, + this.zCoord, (int) this.mLightValue); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, + this.zCoord); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord + 1, this.yCoord, + this.zCoord); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord - 1, this.yCoord, + this.zCoord); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord + 1, + this.zCoord); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord - 1, + this.zCoord); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, + this.zCoord + 1); + this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, + this.zCoord - 1); + this.issueTextureUpdate(); + this.sendBlockEvent((byte) 7, this.oLightValue = this.mLightValue); + } + } + if (this.mNeedsBlockUpdate) { + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, + this.getBlockOffset(0, 0, 0)); + this.mNeedsBlockUpdate = false; + break; + } + break; + } + } + } + } + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } + if (aSideServer && this.hasValidMetaTileEntity()) { + tTime = System.currentTimeMillis() - tTime; + if (this.mTimeStatistics.length > 0) { + this.mTimeStatistics[this.mTimeStatisticsIndex = (this.mTimeStatisticsIndex + 1) + % this.mTimeStatistics.length] = (int) tTime; + } + if (tTime > 0L && tTime > GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING && this.mTickTimer > 1000L + && this.getMetaTileEntity().doTickProfilingMessageDuringThisTick() + && this.mLagWarningCount++ < 10) { + System.out.println("WARNING: Possible Lag Source at [" + this.xCoord + ", " + this.yCoord + ", " + + this.zCoord + "] in Dimension " + this.worldObj.provider.dimensionId + " with " + tTime + + "ms caused by an instance of " + this.getMetaTileEntity().getClass()); + } + } + final boolean mWorkUpdate = false; + this.mRunningThroughTick = mWorkUpdate; + this.mInventoryChanged = mWorkUpdate; + this.mWorkUpdate = mWorkUpdate; + } + + private void onFirstTick(TilePoweredGT tilePoweredGT) { + // TODO Auto-generated method stub + + } + + private boolean hasValidMetaTileEntity() { + return Utils.invertBoolean(isDead()); + } + + public void issueBlockUpdate() { + this.mNeedsBlockUpdate = true; + } + + public void issueClientUpdate() { + this.mSendClientData = true; + } + + public Packet getDescriptionPacket() { + this.issueClientUpdate(); + return null; + } + +} +*/ \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java new file mode 100644 index 0000000000..835d9da2cd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityCircuitProgrammer.java @@ -0,0 +1,307 @@ +package gtPlusPlus.core.tileentities.general; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +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; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.inventories.InventoryCircuitProgrammer; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.slots.SlotIntegratedCircuit; +import gtPlusPlus.core.util.minecraft.PlayerUtils; + +public class TileEntityCircuitProgrammer extends TileEntity implements ISidedInventory { + + private int tickCount = 0; + private final InventoryCircuitProgrammer inventoryContents; + private String customName; + public int locationX; + public int locationY; + public int locationZ; + private int aCurrentMode = 0; + + public TileEntityCircuitProgrammer() { + this.inventoryContents = new InventoryCircuitProgrammer(); + this.setTileLocation(); + } + + public boolean setTileLocation() { + if (this.hasWorldObj()) { + if (!this.getWorldObj().isRemote) { + this.locationX = this.xCoord; + this.locationY = this.yCoord; + this.locationZ = this.zCoord; + return true; + } + } + return false; + } + + //Rename to hasCircuitToConfigure + public final boolean hasCircuitToConfigure() { + for (ItemStack i : this.getInventory().getInventory()) { + if (i == null) { + continue; + } + else { + return true; + } + } + return false; + } + + public InventoryCircuitProgrammer getInventory() { + return this.inventoryContents; + } + + public boolean addOutput() { + ItemStack[] aInputs = this.getInventory().getInventory().clone(); + //Check if there is output in slot. + Boolean hasOutput = false; + if (aInputs[25] != null) { + hasOutput = true; + } + AutoMap aValidSlots = new AutoMap(); + int aSlotCount = 0; + for (ItemStack i : aInputs) { + if (i != null) { + aValidSlots.put(aSlotCount); + } + aSlotCount++; + } + for (int e : aValidSlots) { + boolean doAdd = false; + ItemStack g = this.getStackInSlot(e); + int aSize = 0; + ItemStack aInputStack = null; + int aTypeInSlot = SlotIntegratedCircuit.isRegularProgrammableCircuit(g); + if (aTypeInSlot >= 0 && g != null) { + // No Existing Output + if (!hasOutput) { + aSize = g.stackSize; + doAdd = true; + } + // Existing Output + else { + ItemStack f = this.getStackInSlot(25); + int aTypeInCheckedSlot = SlotIntegratedCircuit.isRegularProgrammableCircuit(f); + // Check that the Circuit in the Output slot is not null and the same type as the circuit input. + if (aTypeInCheckedSlot >= 0 && (aTypeInSlot == aTypeInCheckedSlot) && f != null) { + if (g.getItem() == f.getItem() && f.getItemDamage() == e) { + aSize = f.stackSize + g.stackSize; + if (aSize > 64) { + aInputStack = g.copy(); + aInputStack.stackSize = (aSize-64); + } + doAdd = true; + } + } + } + if (doAdd) { + // Check Circuit Type + ItemStack aOutput; + if (aTypeInSlot == 0) { + aOutput = CI.getNumberedCircuit(e); + } + else if (aTypeInSlot == 1) { + aOutput = CI.getNumberedBioCircuit(e); + } + else if (aTypeInSlot == 2) { + aOutput = CI.getNumberedAdvancedCircuit(e); + } + else { + aOutput = null; + } + + if (aOutput != null) { + aOutput.stackSize = aSize; + this.setInventorySlotContents(e, aInputStack); + this.setInventorySlotContents(25, aOutput); + return true; + } + } + } + continue; + } + return false; + } + + @Override + public void updateEntity() { + try{ + if (!this.worldObj.isRemote) { + if (tickCount % 10 == 0) { + if (hasCircuitToConfigure()) { + this.addOutput(); + this.markDirty(); + } + } + this.tickCount++; + } + } + catch (final Throwable t){} + } + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + super.writeToNBT(nbt); + // Utils.LOG_WARNING("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + nbt.setInteger("aCurrentMode", aCurrentMode); + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + super.readFromNBT(nbt); + // Utils.LOG_WARNING("Trying to read NBT data from TE."); + this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + aCurrentMode = nbt.getInteger("aCurrentMode"); + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return this.getInventory().getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + final int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r=0; r= 0 && p_102007_1_ <= 24; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return p_102008_1_ == 25; + } + + public String getCustomName() { + return this.customName; + } + + public void setCustomName(final String customName) { + this.customName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.circuitprogrammer"; + } + + @Override + public boolean hasCustomInventoryName() { + return (this.customName != null) && !this.customName.equals(""); + } + + @Override + public Packet getDescriptionPacket() { + final NBTTagCompound tag = new NBTTagCompound(); + this.writeToNBT(tag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); + } + + @Override + public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity pkt) { + final NBTTagCompound tag = pkt.func_148857_g(); + this.readFromNBT(tag); + } + + public boolean onScrewdriverRightClick(byte side, EntityPlayer player, int x, int y, int z) { + try { + if (aCurrentMode == 24) { + aCurrentMode = 0; + } + else { + aCurrentMode++; + } + PlayerUtils.messagePlayer(player, "Now configuring units for type "+aCurrentMode+"."); + return true; + } + catch (Throwable t) { + return false; + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java new file mode 100644 index 0000000000..db93e9c4fc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityDecayablesChest.java @@ -0,0 +1,359 @@ +package gtPlusPlus.core.tileentities.general; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.inventories.Inventory_DecayablesChest; +import gtPlusPlus.core.item.materials.DustDecayable; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class TileEntityDecayablesChest extends TileEntity implements ISidedInventory { + + private final Inventory_DecayablesChest inventoryContents; + + /** Determines if the check for adjacent chests has taken place. */ + public boolean adjacentChestChecked; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityDecayablesChest adjacentChestZNeg; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityDecayablesChest adjacentChestXPos; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityDecayablesChest adjacentChestXNeg; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityDecayablesChest adjacentChestZPos; + /** The current angle of the lid (between 0 and 1) */ + public float lidAngle; + /** The angle of the lid last tick */ + public float prevLidAngle; + /** The number of players currently using this chest */ + public int numPlayersUsing; + + private String customName; + + private int cachedChestType; + private int tickCount = 0; + + public TileEntityDecayablesChest() { + this.inventoryContents = new Inventory_DecayablesChest(); + } + + public Inventory_DecayablesChest getInventory() { + return this.inventoryContents; + } + + @Override + public void updateEntity() { + + // Try do chesty stuff + try { + this.updateEntityChest(); + } catch (Throwable t) { + + } + + try { + if (!this.worldObj.isRemote) { + this.tickCount++; + if ((this.tickCount % 10) == 0) { + cachedChestType = 1; + } + + if ((this.tickCount % 20) == 0) { + for (ItemStack inv : this.getInventory().getInventory()) { + if (inv == null) { + continue; + } + if (inv.getItem() instanceof DustDecayable) { + DustDecayable D = (DustDecayable) inv.getItem(); + tryUpdateDecayable(D, inv, this.worldObj); + } + } + + } + updateSlots(); + } + } catch (final Throwable t) { + } + } + + public void tryUpdateDecayable(final DustDecayable b, ItemStack iStack, final World world) { + if (world == null || iStack == null) { + return; + } + if (world.isRemote) { + return; + } + + boolean a1, a2; + int u = 0; + a1 = b.isTicking(world, iStack); + a2 = false; + int SECONDS_TO_PROCESS = 1; + while (u < (20 * SECONDS_TO_PROCESS)) { + if (!a1) { + break; + } + a1 = b.isTicking(world, iStack); + a2 = b.tickItemTag(world, iStack); + u++; + } + Logger.MACHINE_INFO("| "+b.getUnlocalizedName()+" | "+a1+"/"+a2); + + if (!a1 && !a2) { + ItemStack replacement = ItemUtils.getSimpleStack(b.getDecayResult()); + replacement.stackSize = 1; + //iStack = replacement.copy(); + for (int fff = 0; fff < this.inventoryContents.getSizeInventory(); fff++) { + if (this.inventoryContents.getStackInSlot(fff) == iStack) { + this.inventoryContents.setInventorySlotContents(fff, replacement.copy()); + } + } + + updateSlots(); + this.inventoryContents. + markDirty(); + } + } + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + super.writeToNBT(nbt); + // Utils.LOG_WARNING("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + super.readFromNBT(nbt); + // Utils.LOG_WARNING("Trying to read NBT data from TE."); + this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return this.getInventory().getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + if (this.numPlayersUsing < 0) { + this.numPlayersUsing = 0; + } + if (!this.worldObj.isRemote) { + this.numPlayersUsing++; + cachedChestType = 1; + } + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + if (!this.worldObj.isRemote) { + this.numPlayersUsing--; + cachedChestType = 1; + } + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + final int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r = 0; r < this.getInventory().getSizeInventory(); r++) { + accessibleSides[r] = r; + } + return accessibleSides; + + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return this.getInventory().isItemValidForSlot(0, p_102007_2_); + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return this.getInventory().isItemValidForSlot(0, p_102008_2_); + } + + public String getCustomName() { + return this.customName; + } + + public void setCustomName(final String customName) { + this.customName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.DecayablesChest"; + } + + @Override + public boolean hasCustomInventoryName() { + return (this.customName != null) && !this.customName.equals(""); + } + + /** + * Causes the TileEntity to reset all it's cached values for it's container + * Block, metadata and in the case of chests, the adjacent chest check + */ + public void updateContainingBlockInfo() { + super.updateContainingBlockInfo(); + this.adjacentChestChecked = false; + } + + /** + * Performs the check for adjacent chests to determine if this chest is double + * or not. + */ + public void checkForAdjacentChests() { + if (!this.adjacentChestChecked) { + this.adjacentChestChecked = true; + this.adjacentChestZNeg = null; + this.adjacentChestXPos = null; + this.adjacentChestXNeg = null; + this.adjacentChestZPos = null; + } + } + + public void updateEntityChest() { + float f; + this.prevLidAngle = this.lidAngle; + f = 0.04F; + double d2; + if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F && this.adjacentChestZNeg == null + && this.adjacentChestXNeg == null) { + double d1 = (double) this.xCoord + 0.5D; + d2 = (double) this.zCoord + 0.5D; + this.worldObj.playSoundEffect(d1, (double) this.yCoord + 0.5D, d2, "random.chestopen", 0.5F, + this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + } + + if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F) { + float f1 = this.lidAngle; + if (this.numPlayersUsing > 0) { + //this.lidAngle += f; + this.lidAngle += (float) (f * (1 + 0.10 * 0.01)); + } else { + //this.lidAngle -= f; + this.lidAngle -= (float) (f * (1 + 0.10 * 0.01)); + } + if (this.lidAngle > 1.0F) { + this.lidAngle = 1.0F; + } + float f2 = 0.5F; + if (this.lidAngle < f2 && f1 >= f2 && this.adjacentChestZNeg == null && this.adjacentChestXNeg == null) { + d2 = (double) this.xCoord + 0.5D; + double d0 = (double) this.zCoord + 0.5D; + this.worldObj.playSoundEffect(d2, (double) this.yCoord + 0.5D, d0, "random.chestclosed", 0.5F, + this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + } + + if (this.lidAngle < 0.0F) { + this.lidAngle = 0.0F; + } + } + } + + /** + * Called when a client event is received with the event number and argument, + * see World.sendClientEvent + */ + public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { + if (p_145842_1_ == 1) + { + this.numPlayersUsing = p_145842_2_; + return true; + } + else + { + return super.receiveClientEvent(p_145842_1_, p_145842_2_); + } + } + + /** + * invalidates a tile entity + */ + public final void invalidate() { + super.invalidate(); + cachedChestType = 1; + this.updateContainingBlockInfo(); + this.checkForAdjacentChests(); + } + + private final int updateSlots() { + //Have slots changed? + if (cachedChestType == 0) { + return 0; + } + ItemUtils.organiseInventory(getInventory()); + cachedChestType = 0; + return cachedChestType; + + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java new file mode 100644 index 0000000000..0c428537cb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityEggBox.java @@ -0,0 +1,359 @@ +package gtPlusPlus.core.tileentities.general; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.inventories.Inventory_EggBox; +import gtPlusPlus.core.item.general.ItemGiantEgg; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class TileEntityEggBox extends TileEntity implements ISidedInventory { + + private final Inventory_EggBox inventoryContents; + + /** Determines if the check for adjacent chests has taken place. */ + public boolean adjacentChestChecked; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityEggBox adjacentChestZNeg; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityEggBox adjacentChestXPos; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityEggBox adjacentChestXNeg; + /** Contains the chest tile located adjacent to this one (if any) */ + public TileEntityEggBox adjacentChestZPos; + /** The current angle of the lid (between 0 and 1) */ + public float lidAngle; + /** The angle of the lid last tick */ + public float prevLidAngle; + /** The number of players currently using this chest */ + public int numPlayersUsing; + + private String customName; + + private int cachedChestType; + private int tickCount = 0; + + public TileEntityEggBox() { + this.inventoryContents = new Inventory_EggBox(); + } + + public Inventory_EggBox getInventory() { + return this.inventoryContents; + } + + @Override + public void updateEntity() { + + // Try do chesty stuff + try { + this.updateEntityChest(); + } catch (Throwable t) { + + } + + try { + if (!this.worldObj.isRemote) { + this.tickCount++; + if ((this.tickCount % 10) == 0) { + cachedChestType = 1; + } + + if ((this.tickCount % 20) == 0) { + for (ItemStack inv : this.getInventory().getInventory()) { + if (inv == null) { + continue; + } + if (inv.getItem() instanceof ItemGiantEgg) { + ItemGiantEgg D = (ItemGiantEgg) inv.getItem(); + tryUpdateDecayable(D, inv, this.worldObj); + } + } + + } + updateSlots(); + } + } catch (final Throwable t) { + } + } + + public void tryUpdateDecayable(final ItemGiantEgg d, ItemStack iStack, final World world) { + if (world == null || iStack == null) { + return; + } + if (world.isRemote) { + return; + } + + boolean a1, a2; + int u = 0; + a1 = d.isTicking(world, iStack); + a2 = false; + int SECONDS_TO_PROCESS = 1; + while (u < (20 * SECONDS_TO_PROCESS)) { + if (!a1) { + break; + } + a1 = d.isTicking(world, iStack); + a2 = d.tickItemTag(world, iStack); + u++; + } + Logger.MACHINE_INFO("| "+d.getUnlocalizedName()+" | "+a1+"/"+a2); + + if (!a1 && !a2) { + ItemStack replacement = ItemUtils.getSimpleStack(d.getHatchResult(), 1); + replacement.stackSize = 1; + //iStack = replacement.copy(); + for (int fff = 0; fff < this.inventoryContents.getSizeInventory(); fff++) { + if (this.inventoryContents.getStackInSlot(fff) == iStack) { + this.inventoryContents.setInventorySlotContents(fff, replacement.copy()); + } + } + + updateSlots(); + this.inventoryContents. + markDirty(); + } + } + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + super.writeToNBT(nbt); + // Utils.LOG_WARNING("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + super.readFromNBT(nbt); + // Utils.LOG_WARNING("Trying to read NBT data from TE."); + this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return this.getInventory().getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + if (this.numPlayersUsing < 0) { + this.numPlayersUsing = 0; + } + if (!this.worldObj.isRemote) { + this.numPlayersUsing++; + cachedChestType = 1; + } + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + if (!this.worldObj.isRemote) { + this.numPlayersUsing--; + cachedChestType = 1; + } + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, this.numPlayersUsing); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + final int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r = 0; r < this.getInventory().getSizeInventory(); r++) { + accessibleSides[r] = r; + } + return accessibleSides; + + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return this.getInventory().isItemValidForSlot(0, p_102007_2_); + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return this.getInventory().isItemValidForSlot(0, p_102008_2_); + } + + public String getCustomName() { + return this.customName; + } + + public void setCustomName(final String customName) { + this.customName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.EggBox"; + } + + @Override + public boolean hasCustomInventoryName() { + return (this.customName != null) && !this.customName.equals(""); + } + + /** + * Causes the TileEntity to reset all it's cached values for it's container + * Block, metadata and in the case of chests, the adjacent chest check + */ + public void updateContainingBlockInfo() { + super.updateContainingBlockInfo(); + this.adjacentChestChecked = false; + } + + /** + * Performs the check for adjacent chests to determine if this chest is double + * or not. + */ + public void checkForAdjacentChests() { + if (!this.adjacentChestChecked) { + this.adjacentChestChecked = true; + this.adjacentChestZNeg = null; + this.adjacentChestXPos = null; + this.adjacentChestXNeg = null; + this.adjacentChestZPos = null; + } + } + + public void updateEntityChest() { + float f; + this.prevLidAngle = this.lidAngle; + f = 0.04F; + double d2; + if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F && this.adjacentChestZNeg == null + && this.adjacentChestXNeg == null) { + double d1 = (double) this.xCoord + 0.5D; + d2 = (double) this.zCoord + 0.5D; + this.worldObj.playSoundEffect(d1, (double) this.yCoord + 0.5D, d2, "random.chestopen", 0.5F, + this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + } + + if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F) { + float f1 = this.lidAngle; + if (this.numPlayersUsing > 0) { + //this.lidAngle += f; + this.lidAngle += (float) (f * (1 + 0.10 * 0.01)); + } else { + //this.lidAngle -= f; + this.lidAngle -= (float) (f * (1 + 0.10 * 0.01)); + } + if (this.lidAngle > 1.0F) { + this.lidAngle = 1.0F; + } + float f2 = 0.5F; + if (this.lidAngle < f2 && f1 >= f2 && this.adjacentChestZNeg == null && this.adjacentChestXNeg == null) { + d2 = (double) this.xCoord + 0.5D; + double d0 = (double) this.zCoord + 0.5D; + this.worldObj.playSoundEffect(d2, (double) this.yCoord + 0.5D, d0, "random.chestclosed", 0.5F, + this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + } + + if (this.lidAngle < 0.0F) { + this.lidAngle = 0.0F; + } + } + } + + /** + * Called when a client event is received with the event number and argument, + * see World.sendClientEvent + */ + public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { + if (p_145842_1_ == 1) + { + this.numPlayersUsing = p_145842_2_; + return true; + } + else + { + return super.receiveClientEvent(p_145842_1_, p_145842_2_); + } + } + + /** + * invalidates a tile entity + */ + public final void invalidate() { + super.invalidate(); + cachedChestType = 1; + this.updateContainingBlockInfo(); + this.checkForAdjacentChests(); + } + + private final int updateSlots() { + //Have slots changed? + if (cachedChestType == 0) { + return 0; + } + ItemUtils.organiseInventory(getInventory()); + cachedChestType = 0; + return cachedChestType; + + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java new file mode 100644 index 0000000000..49fde8ee64 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFirepit.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.tileentities.general; + +import java.util.UUID; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileEntityFirepit extends TileEntity{ + + private UUID ownerUUID; + + public UUID getOwnerUUID() { + return this.ownerUUID; + } + + public void setOwnerUUID(final UUID ownerUUID) { + this.ownerUUID = ownerUUID; + this.markDirty(); + } + + @Override + public void writeToNBT(final NBTTagCompound tagCompound) { + super.writeToNBT(tagCompound); + + final UUID ownerUUID = this.getOwnerUUID(); + if (ownerUUID != null){ + tagCompound.setLong("OwnerUUIDMost", ownerUUID.getMostSignificantBits()); + tagCompound.setLong("OwnerUUIDLeast", ownerUUID.getLeastSignificantBits()); + } + } + + @Override + public void readFromNBT(final NBTTagCompound tagCompound) { + super.readFromNBT(tagCompound); + + this.setOwnerUUID(new UUID(tagCompound.getLong("OwnerUUIDMost"), tagCompound.getLong("OwnerUUIDLeast"))); + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java new file mode 100644 index 0000000000..beff269428 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java @@ -0,0 +1,410 @@ +package gtPlusPlus.core.tileentities.general; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.inventories.InventoryFishTrap; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraftforge.common.FishingHooks; + +public class TileEntityFishTrap extends TileEntity implements ISidedInventory { + + private int tickCount = 0; + private boolean isInWater = false; + private final InventoryFishTrap inventoryContents; + private String customName; + private int locationX; + private int locationY; + private int locationZ; + private int waterSides = 0; + private int baseTickRate = 600 * 5; + + public TileEntityFishTrap() { + this.inventoryContents = new InventoryFishTrap();// number of slots - + // without product + // slot + this.setTileLocation(); + } + + public boolean setTileLocation() { + if (this.hasWorldObj()) { + if (!this.getWorldObj().isRemote) { + this.locationX = this.xCoord; + this.locationY = this.yCoord; + this.locationZ = this.zCoord; + return true; + } + } + return false; + } + + public final boolean isSurroundedByWater() { + this.setTileLocation(); + final Block[] surroundingBlocks = new Block[6]; + if (this.hasWorldObj()) { + if (!this.getWorldObj().isRemote) { + surroundingBlocks[0] = this.worldObj.getBlock(this.locationX, this.locationY + 1, this.locationZ); // Above + surroundingBlocks[1] = this.worldObj.getBlock(this.locationX, this.locationY - 1, this.locationZ); // Below + surroundingBlocks[2] = this.worldObj.getBlock(this.locationX + 1, this.locationY, this.locationZ); + surroundingBlocks[3] = this.worldObj.getBlock(this.locationX - 1, this.locationY, this.locationZ); + surroundingBlocks[4] = this.worldObj.getBlock(this.locationX, this.locationY, this.locationZ + 1); + surroundingBlocks[5] = this.worldObj.getBlock(this.locationX, this.locationY, this.locationZ - 1); + int waterCount = 0; + int trapCount = 0; + for (final Block checkBlock : surroundingBlocks) { + if ((checkBlock == Blocks.water) || (checkBlock == Blocks.flowing_water) + || checkBlock.getUnlocalizedName().toLowerCase().contains("water") + || (checkBlock == ModBlocks.blockFishTrap)) { + if (checkBlock != ModBlocks.blockFishTrap) { + waterCount++; + } + else { + waterCount++; + trapCount++; + } + } + } + if ((waterCount >= 2) && (trapCount <= 4)) { + int aCheck = trapCount + waterCount; + this.waterSides = MathUtils.balance(aCheck, 0, 6); + Logger.MACHINE_INFO("Valid Trap. "+waterCount+" | "+(this.tickCount/20)+"/"+(this.baseTickRate/20)); + return true; + } + else if ((waterCount >= 2) && (trapCount > 4)) { + Logger.MACHINE_INFO("Too many fish traps surrounding this one."); + Logger.MACHINE_INFO("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY + + "] z[" + this.locationZ + "] (Ticking for loot every " + this.baseTickRate + " ticks)"); + } + } + } + // Utils.LOG_MACHINE_INFO("Error finding water"); + return false; + } + + public InventoryFishTrap getInventory() { + return this.inventoryContents; + } + + public boolean tryAddLoot() { + if (this.getInventory().getInventory() != null) { + int checkingSlot = 0; + ItemUtils.organiseInventory(getInventory()); + final ItemStack loot = this.generateLootForFishTrap().copy(); + try { + //Utils.LOG_MACHINE_INFO("Trying to add "+loot.getDisplayName()+" | "+loot.getItemDamage()); + for (final ItemStack contents : this.getInventory().getInventory()) { + + + if (GT_Utility.areStacksEqual(loot, contents)){ + if (contents.stackSize < contents.getMaxStackSize()) { + //Utils.LOG_MACHINE_INFO("3-Trying to add one more "+loot.getDisplayName()+"meta: "+loot.getItemDamage()+" to an existing stack of "+contents.getDisplayName()+" with a size of "+contents.stackSize); + contents.stackSize++; + this.markDirty(); + return true; + } + } + checkingSlot++; + } + checkingSlot = 0; + for (final ItemStack contents : this.getInventory().getInventory()) { + if (contents == null) { + //Utils.LOG_MACHINE_INFO("Adding Item To Empty Slot. "+(checkingSlot+1)); + this.getInventory().setInventorySlotContents(checkingSlot, loot); + this.markDirty(); + return true; + } + checkingSlot++; + } + } + catch (final NullPointerException n) { + } + } + this.markDirty(); + return false; + } + + private ItemStack generateLootForFishTrap() { + final int lootWeight = MathUtils.randInt(0, 100); + ItemStack loot; + if (lootWeight <= 5) { + loot = ItemUtils.getSimpleStack(Items.slime_ball); + } + else if (lootWeight <= 10) { + loot = ItemUtils.getSimpleStack(Items.bone); + } + else if (lootWeight <= 15) { + loot = ItemUtils.getSimpleStack(Blocks.sand); + } + else if (lootWeight <= 20) { + loot = ItemUtils.simpleMetaStack(Items.dye, 0, 1); + } + // Junk Loot + else if (lootWeight <= 23) { + if (LoadedMods.PamsHarvestcraft) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(seaweed, 1); + } + else { + loot = ItemUtils.getSimpleStack(Blocks.dirt); + } + } + // Pam Fish + else if (lootWeight <= 99) { + final Random xstr = new Random(); + loot = FishingHooks.getRandomFishable(xstr, 100); + } + + else if (lootWeight == 100){ + final int rareLoot = MathUtils.randInt(1, 10); + if (rareLoot <= 4) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetIron", 1); + if (loot == null){ + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotIron", 1); + } + } + else if (rareLoot <= 7) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetGold", 1); + if (loot == null){ + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotGold", 1); + } + } + else if (rareLoot <= 9){ + loot = ItemUtils.getSimpleStack(Items.emerald); + } + else { + loot = ItemUtils.getSimpleStack(Items.diamond); + } + } + else { + loot = ItemUtils.getSimpleStack(Blocks.diamond_ore); + } + loot.stackSize=1; + Logger.MACHINE_INFO("Adding x"+loot.stackSize+" "+loot.getDisplayName()+"."); + return loot; + } + + @Override + public void updateEntity() { + try{ + if (!this.worldObj.isRemote) { + this.tickCount++; + //Logger.MACHINE_INFO("Ticking "+this.tickCount); + // Check if the Tile is within water once per second. + if ((this.tickCount % 20) == 0) { + this.isInWater = this.isSurroundedByWater(); + } + + if (this.isInWater) { + this.calculateTickrate(); + } + + // Try add some loot once every 30 seconds. + if (this.tickCount >= this.baseTickRate) { + if (this.isInWater) { + // Add loot + Logger.MACHINE_INFO("Adding Loot to the fishtrap at x["+this.locationX+"] y["+this.locationY+"] z["+this.locationZ+"] (Ticking for loot every "+this.baseTickRate+" ticks)"); + + int aExtraLootChance = MathUtils.randInt(1, 1000); + if (aExtraLootChance >= 999) { + this.tryAddLoot(); + this.tryAddLoot(); + this.tryAddLoot(); + } + else { + this.tryAddLoot(); + } + + this.markDirty(); + } + else { + Logger.MACHINE_INFO("Not in water."); + this.markDirty(); + } + this.tickCount = 0; + } + if (this.tickCount >= (this.baseTickRate + 500)) { + Logger.MACHINE_INFO("Resetting tick counter"); + this.tickCount = 0; + } + + } + } + catch (final Throwable t){} + } + + public void calculateTickrate() { + int water = this.waterSides; + //int variance = (int) ((MathUtils.randInt(-200, 200)/water)*0.5); + if (water <= 1) { + this.baseTickRate = 0; + } else if (water == 2) { + this.baseTickRate = 6800; + } else if (water == 3) { + this.baseTickRate = 5600; + } else if (water == 4) { + this.baseTickRate = 4400; + } else if (water == 5) { + this.baseTickRate = 3200; + } else { + this.baseTickRate = 1750; + } + if (water > 1) { + //this.baseTickRate += variance; + } + } + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + super.writeToNBT(nbt); + // Utils.LOG_MACHINE_INFO("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + super.readFromNBT(nbt); + // Utils.LOG_MACHINE_INFO("Trying to read NBT data from TE."); + this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + } + + final static String prefix = "food"; + final static String suffix = "raw"; + final static String seaweed = "cropSeaweed"; + final static String greenheartFish = "Greenheartfish"; + private static final String[] harvestcraftFish = { "Anchovy", "Bass", "Carp", "Catfish", "Charr", "Clam", "Crab", + "Crayfish", "Eel", "Frog", "Grouper", "Herring", "Jellyfish", "Mudfish", "Octopus", "Perch", "Scallop", + "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walleye" }; + + public static void pamsHarvestCraftCompat() { + for (int i = 0; i < harvestcraftFish.length; i++) { + + } + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return this.getInventory().getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + final int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r=0; r 990){ + loot = ItemUtils.getSimpleStack(Items.slime_ball); + } + return loot; + } + + @Override + public void updateEntity(){ + if (!this.worldObj.isRemote){ + + } + } + + public void calculateTickrate(){ + int calculateTickrate = 0; + this.baseTickRate = calculateTickrate; + } + + public boolean anyPlayerInRange(){ + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ + if(!nbt.hasKey(tag)){ + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt){ + super.writeToNBT(nbt); + //Utils.LOG_INFO("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + } + + @Override + public void readFromNBT(final NBTTagCompound nbt){ + super.readFromNBT(nbt); + //Utils.LOG_INFO("Trying to read NBT data from TE."); + this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java new file mode 100644 index 0000000000..9ddf2065bc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java @@ -0,0 +1,139 @@ +package gtPlusPlus.core.tileentities.general; + +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; + +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.*; + +public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler { + + public FluidTank tank = new FluidTank(Integer.MAX_VALUE); + private boolean needsUpdate = false; + private int updateTimer = 0; + + public TileEntityInfiniteFluid() { + } + + @Override + public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + needsUpdate = true; + return this.tank.fill(resource, doFill); + } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + needsUpdate = true; + return this.tank.drain(resource.amount, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + needsUpdate = true; + FluidStack fluid = this.tank.getFluid(); + // return this.tank.drain(maxDrain, doDrain); + if (fluid == null) { + return null; + } + + int drained = maxDrain; + if (fluid.amount < drained) { + drained = fluid.amount; + } + + FluidStack stack = new FluidStack(fluid, drained); + if (doDrain) { + fluid.amount -= drained; + if (fluid.amount <= 0) { + fluid = null; + } + + if (this != null) { + FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, this.getWorldObj(), this.xCoord, + this.yCoord, this.zCoord, this.tank, 0)); + } + } + return stack; + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[] { this.tank.getInfo() }; + } + + public float getAdjustedVolume() { + needsUpdate = true; + float amount = tank.getFluidAmount(); + float capacity = tank.getCapacity(); + float volume = (amount / capacity) * 0.8F; + return volume; + } + + @Override + public void updateEntity() { + + if (this.tank.getFluid() != null){ + FluidStack bigStorage = this.tank.getFluid(); + bigStorage.amount = this.tank.getCapacity(); + this.tank.setFluid(bigStorage); + } + + if (needsUpdate) { + + if (this.tank.getFluid() != null){ + FluidStack bigStorage = this.tank.getFluid(); + bigStorage.amount = this.tank.getCapacity(); + this.tank.setFluid(bigStorage); + } + + if (updateTimer == 0) { + updateTimer = 10; // every 10 ticks it will send an update + } else { + --updateTimer; + if (updateTimer == 0) { + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + needsUpdate = false; + } + } + } + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + tank.readFromNBT(tag); + super.readFromNBT(tag); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + tank.writeToNBT(tag); + super.writeToNBT(tag); + } + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound tag = new NBTTagCompound(); + writeToNBT(tag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + NBTTagCompound tag = pkt.func_148857_g(); + readFromNBT(tag); + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java new file mode 100644 index 0000000000..48f05fe0fd --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityPlayerDoorBase.java @@ -0,0 +1,285 @@ +package gtPlusPlus.core.tileentities.general; + +import java.util.ArrayList; +import java.util.List; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockDoor; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class TileEntityPlayerDoorBase extends TileEntity { + + public boolean mIsOpen = false; + private short mMeta = 0; + private long mTickCounter = 0; + private final Block mBlockType; + private BlockPos mNeighbourDoor; + + public TileEntityPlayerDoorBase(Block aBlock, int meta) { + mBlockType = aBlock; + } + + @Override + public void readFromNBT(NBTTagCompound aNBT) { + super.readFromNBT(aNBT); + this.mIsOpen = aNBT.getBoolean("mIsOpen"); + } + + @Override + public void writeToNBT(NBTTagCompound aNBT) { + super.writeToNBT(aNBT); + aNBT.setBoolean("mIsOpen", mIsOpen); + } + + public int getNeighbourState() { + + if (mNeighbourDoor != null) { + World aWorld = this.worldObj; + if (aWorld != null) { + TileEntity t = aWorld.getTileEntity(mNeighbourDoor.xPos, mNeighbourDoor.yPos, mNeighbourDoor.zPos); + // Custom Door + if (t != null) { + if (t instanceof TileEntityPlayerDoorBase) { + TileEntityPlayerDoorBase d = (TileEntityPlayerDoorBase) t; + if (d.mIsOpen) { + return 100; + } else { + return -100; + } + } else + return -100; + } + // Vanilla Door + else { + Block aBlock = mNeighbourDoor.getBlockAtPos(); + BlockDoor aDoor = (aBlock instanceof BlockDoor ? (BlockDoor) aBlock : null); + if (aDoor != null) { + int i1 = aDoor.func_150012_g(mNeighbourDoor.world, mNeighbourDoor.xPos, mNeighbourDoor.yPos, + mNeighbourDoor.zPos); + if ((i1 & 4) != 0) { + return 100; + } else { + return -100; + } + } + } + } + } + return 0; + } + + AutoMap mNearbyEntityCache = new AutoMap(); + + @Override + public void updateEntity() { + + if (this.getWorldObj().isRemote) { + return; + } + + // Look For Neighbours + if (mTickCounter % 100 == 0 || mTickCounter == 0) { + World aWorld = this.getWorldObj(); + BlockPos aThisPos = new BlockPos(xCoord, yCoord, zCoord, aWorld); + BlockPos[] aNeighbors = new BlockPos[4]; + aNeighbors[0] = aThisPos.getXNeg(); + aNeighbors[1] = aThisPos.getXPos(); + aNeighbors[2] = aThisPos.getZNeg(); + aNeighbors[3] = aThisPos.getZPos(); + boolean aFoundDoor = false; + for (BlockPos b : aNeighbors) { + Block aBlock = aWorld.getBlock(b.xPos, b.yPos, b.zPos); + BlockDoor aDoor = (aBlock instanceof BlockDoor ? (BlockDoor) aBlock : null); + if (aDoor != null) { + mNeighbourDoor = b; + aFoundDoor = true; + if (mMeta == 0) { + TileEntity t = aWorld.getTileEntity(b.xPos, b.yPos, b.zPos); + if (t != null) { + if (t instanceof TileEntityPlayerDoorBase) { + TileEntityPlayerDoorBase d = (TileEntityPlayerDoorBase) t; + if (d.mMeta != 0) { + //Logger.INFO("Found Door with Mode set other than 0, assuming slave role."); + mMeta = -1; + } + else { + //Logger.INFO("Found door with no mode set, assuming we are master."); + mMeta = 1; + } + } + else { + //Logger.INFO("Custom door from another mod, assuming slave role."); + mMeta = -1; + } + } + else { + //Logger.INFO("No Tile Entity found, Door is probably vanilla, assuming slave role."); + mMeta = -1; + } + } + break; + } + } + if (mMeta < 1 && !aFoundDoor) { + //Logger.INFO("Found No Valid Doors around, setting this one to master mode."); + mMeta = 1; + } + } + + World aWorld = this.getWorldObj(); + Block aBlock = aWorld.getBlock(xCoord, yCoord, zCoord); + BlockPos aThisPos = new BlockPos(xCoord, yCoord, zCoord, this.worldObj); + + if (mTickCounter % 20 == 0) { + int x = 0, y = 0, z = 0; + x = this.xCoord; + y = this.yCoord; + z = this.zCoord; + //List aEntityList = aWorld.loadedEntityList; + List aEntityList = new ArrayList(); + Chunk aThisChunk = aWorld.getChunkFromBlockCoords(x, z); + for (List l : aThisChunk.entityLists) { + aEntityList.addAll(l); + } + for (Object o : aEntityList) { + if (o != null) { + if (o instanceof Entity) { + if (o instanceof EntityPlayer) { + continue; + } + else { + Entity e = (Entity) o; + BlockPos p = EntityUtils.findBlockPosUnderEntity(e); + if (p != null) { + int newY = p.yPos+1; + if (e.getDistance(xCoord, yCoord, zCoord) <= 2){ + mNearbyEntityCache.put(e); + } + else if (aThisPos.distanceFrom(p.xPos, newY, p.zPos) <= 2) { + mNearbyEntityCache.put(e); + } + } + } + } + } + } + } + + if (mTickCounter % 4 == 0) { + for (Entity y : mNearbyEntityCache) { + if (y.getDistance(xCoord, yCoord, zCoord) > 2){ + mNearbyEntityCache.remove(y); + } + } + + boolean foundMonster = mNearbyEntityCache.size() > 0; + int aNeighbourDoorState = 0; + if (mNeighbourDoor != null) { + aNeighbourDoorState = getNeighbourState(); + } + BlockDoor aDoor = (aBlock instanceof BlockDoor ? (BlockDoor) aBlock : null); + boolean aPlayers = checkForPlayers(this.getWorldObj()); + + if (aDoor != null) { + //If neighbour state != 0 and we are in slave mode + if (aNeighbourDoorState != 0 && mMeta == -1) { + if (aNeighbourDoorState == 100) { + if (!mIsOpen && !foundMonster) { + //Logger.INFO("Opening Door (Slave)"); + aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, true); + mIsOpen = true; + } + } else if (aNeighbourDoorState == -100 || foundMonster) { + if (mIsOpen) { + //Logger.INFO("Closing Door (Slave)"); + aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, false); + mIsOpen = false; + } + } + //We are master, proceed + } else { + //No redstone found, allow automatic handling + if (aDoor != null && !hasRedstone()) { + //Found a nearby player + if (aPlayers) { + //If we are closed and there are no monsters nearby, open + if (!mIsOpen && !foundMonster) { + //Logger.INFO("Opening Door (Mstr)"); + aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, true); + mIsOpen = true; + } else { + // Logger.INFO("Doing Nothing, Door is in correct state."); + } + //Did not find nearby player + } else { + //If we are open or there is a monster nearby, close. + if (mIsOpen || foundMonster) { + //Logger.INFO("Closing Door (Mstr)"); + aDoor.func_150014_a(aWorld, this.xCoord, this.yCoord, this.zCoord, false); + mIsOpen = false; + } else { + // Logger.INFO("Doing Nothing, Door is in correct state."); + } + } + } + } + } + + } + super.updateEntity(); + mTickCounter++; + } + + @Override + public int getBlockMetadata() { + return this.mMeta; + } + + public boolean hasRedstone() { + World aWorld = this.worldObj; + if (aWorld != null && !aWorld.isRemote) { + return aWorld.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) + || aWorld.isBlockIndirectlyGettingPowered(xCoord, yCoord + 1, zCoord); + } + return false; + } + + @Override + public Block getBlockType() { + return mBlockType; + } + + @Override + public boolean canUpdate() { + return true; + } + + private boolean checkForPlayers(World aWorld) { + int x = 0, y = 0, z = 0; + x = this.xCoord; + y = this.yCoord; + z = this.zCoord; + EntityPlayer aPlayer = aWorld.getClosestPlayer(x, y, z, 3.5D); + if (aPlayer != null) { + return true; + } + return false; + } + + private short getClosedMeta() { + return 0; + } + + private short getOpenMeta() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java new file mode 100644 index 0000000000..6e18834786 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java @@ -0,0 +1,312 @@ +package gtPlusPlus.core.tileentities.general; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntity; + +import gtPlusPlus.core.block.ModBlocks; + + + +public class TileEntityReverter extends TileEntity +{ + private static final int REVERT_CHANCE = 10; + public int radius = 16; + public int diameter = (8 * this.radius) + 4; + public double requiredPlayerRange = 64.0D; + public Random rand = new Random(); + private int tickCount; + private boolean slowScan; + private int ticksSinceChange; + private Block[] blockData; + private byte[] metaData; + + @Override + public boolean canUpdate(){ + return true; + } + + @Override + public void updateEntity() + { + if (this.anyPlayerInRange()) + { + this.tickCount += 1; + if (this.worldObj.isRemote) + { + final double var1 = this.xCoord + this.worldObj.rand.nextFloat(); + final double var3 = this.yCoord + this.worldObj.rand.nextFloat(); + final double var5 = this.zCoord + this.worldObj.rand.nextFloat(); + + this.worldObj.spawnParticle("enchantmenttable", var1, var3, var5, 0.0D, 0.0D, 0.0D); + if (this.rand.nextInt(5) == 0) + { + this.makeRandomOutline(); + this.makeRandomOutline(); + this.makeRandomOutline(); + } + } + else + { + if ((this.blockData == null) || (this.metaData == null)) + { + this.captureBlockData(); + this.slowScan = true; + } + if ((!this.slowScan) || ((this.tickCount % 20) == 0)) { + if (this.scanAndRevertChanges()) + { + this.slowScan = false; + this.ticksSinceChange = 0; + } + else + { + this.ticksSinceChange += 1; + if (this.ticksSinceChange > 20) { + this.slowScan = true; + } + } + } + } + } + else + { + this.blockData = null; + this.metaData = null; + + this.tickCount = 0; + } + } + + private void makeRandomOutline() + { + this.makeOutline(this.rand.nextInt(12)); + } + + private void makeOutline(final int outline) + { + double sx = this.xCoord; + double sy = this.yCoord; + double sz = this.zCoord; + + double dx = this.xCoord; + double dy = this.yCoord; + double dz = this.zCoord; + switch (outline) + { + case 0: + sx -= this.radius; + dx -= this.radius; + sz -= this.radius; + dz += this.radius + 1; + case 8: + sx -= this.radius; + dx += this.radius + 1; + sz -= this.radius; + dz -= this.radius; + break; + case 1: + case 9: + sx -= this.radius; + dx -= this.radius; + sz -= this.radius; + dz += this.radius + 1; + break; + case 2: + case 10: + sx -= this.radius; + dx += this.radius + 1; + sz += this.radius + 1; + dz += this.radius + 1; + break; + case 3: + case 11: + sx += this.radius + 1; + dx += this.radius + 1; + sz -= this.radius; + dz += this.radius + 1; + break; + case 4: + sx -= this.radius; + dx -= this.radius; + sz -= this.radius; + dz -= this.radius; + break; + case 5: + sx += this.radius + 1; + dx += this.radius + 1; + sz -= this.radius; + dz -= this.radius; + break; + case 6: + sx += this.radius + 1; + dx += this.radius + 1; + sz += this.radius + 1; + dz += this.radius + 1; + break; + case 7: + sx -= this.radius; + dx -= this.radius; + sz += this.radius + 1; + dz += this.radius + 1; + } + switch (outline) + { + case 0: + case 1: + case 2: + case 3: + sy += this.radius + 1; + dy += this.radius + 1; + break; + case 4: + case 5: + case 6: + case 7: + sy -= this.radius; + dy += this.radius + 1; + break; + case 8: + case 9: + case 10: + case 11: + sy -= this.radius; + dy -= this.radius; + } + if (this.rand.nextBoolean()) { + this.drawParticleLine(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, dx, dy, dz); + } else { + this.drawParticleLine(sx, sy, sz, this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D); + } + this.drawParticleLine(sx, sy, sz, dx, dy, dz); + } + + protected void drawParticleLine(final double srcX, final double srcY, final double srcZ, final double destX, final double destY, final double destZ) + { + final int particles = 16; + for (int i = 0; i < particles; i++) + { + final double trailFactor = i / (particles - 1.0D); + + final double tx = srcX + ((destX - srcX) * trailFactor) + (this.rand.nextFloat() * 0.005D); + final double ty = srcY + ((destY - srcY) * trailFactor) + (this.rand.nextFloat() * 0.005D); + final double tz = srcZ + ((destZ - srcZ) * trailFactor) + (this.rand.nextFloat() * 0.005D); + this.worldObj.spawnParticle("portal", tx, ty, tz, 0.0D, 0.0D, 0.0D); + } + } + + private boolean scanAndRevertChanges() + { + int index = 0; + boolean reverted = false; + for (int x = -this.radius; x <= this.radius; x++) { + for (int y = -this.radius; y <= this.radius; y++) { + for (int z = -this.radius; z <= this.radius; z++) + { + final Block blockID = this.worldObj.getBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z); + final byte meta = (byte)this.worldObj.getBlockMetadata(this.xCoord + x, this.yCoord + y, this.zCoord + z); + if (this.blockData[index] != blockID) { + if (this.revertBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z, blockID, meta, this.blockData[index], this.metaData[index])) + { + reverted = true; + } + else + { + this.blockData[index] = blockID; + this.metaData[index] = meta; + } + } + index++; + } + } + } + return reverted; + } + + private boolean revertBlock(final int x, final int y, final int z, final Block thereBlockID, final byte thereMeta, final Block replaceBlockID, byte replaceMeta) + { + /*if ((thereBlockID == Blocks.air) && (!replaceBlockID.getMaterial().blocksMovement())) + { + System.out.println("Not replacing block " + replaceBlockID + " because it doesn't block movement"); + + return false; + }*/ + if (this.isUnrevertable(thereBlockID, thereMeta, replaceBlockID, replaceMeta)) { + return false; + } + if (this.rand.nextInt(5) == 0) + { + if (replaceBlockID != Blocks.air) + { + //replaceBlockID = null; + replaceMeta = 4; + } + this.worldObj.setBlock(x, y, z, replaceBlockID, replaceMeta, 2); + if (thereBlockID == Blocks.air) + { + this.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(replaceBlockID) + (replaceMeta << 12)); + } + else if (replaceBlockID == Blocks.air) + { + this.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(thereBlockID) + (thereMeta << 12)); + thereBlockID.dropBlockAsItem(this.worldObj, x, y, z, thereMeta, 0); + } + } + return true; + } + + private boolean isUnrevertable(final Block thereBlockID, final byte thereMeta, final Block replaceBlockID, final byte replaceMeta) + { + if ((thereBlockID == ModBlocks.blockGriefSaver) || (replaceBlockID == ModBlocks.blockGriefSaver)) { + return true; + } + /*if (((thereBlockID == towerTranslucent) && (thereMeta != 4)) || ((replaceBlockID == towerTranslucent) && (replaceMeta != 4))) { + return true; + }*/ + if ((thereBlockID == Blocks.redstone_lamp) && (replaceBlockID == Blocks.lit_redstone_lamp)) { + return true; + } + if ((thereBlockID == Blocks.lit_redstone_lamp) && (replaceBlockID == Blocks.redstone_lamp)) { + return true; + } + /*if ((thereBlockID == Blocks.water) || (replaceBlockID == Blocks.flowing_water)) { + return true; + } + if ((thereBlockID == Blocks.flowing_water) || (replaceBlockID == Blocks.water)) { + return true; + }*/ + if (replaceBlockID == Blocks.tnt) { + return true; + } + return false; + } + + private void captureBlockData() + { + this.blockData = new Block[this.diameter * this.diameter * this.diameter]; + this.metaData = new byte[this.diameter * this.diameter * this.diameter]; + + int index = 0; + for (int x = -this.radius; x <= this.radius; x++) { + for (int y = -this.radius; y <= this.radius; y++) { + for (int z = -this.radius; z <= this.radius; z++) + { + final Block blockID = this.worldObj.getBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z); + final int meta = this.worldObj.getBlockMetadata(this.xCoord + x, this.yCoord + y, this.zCoord + z); + + this.blockData[index] = blockID; + this.metaData[index] = ((byte)meta); + + index++; + } + } + } + } + + public boolean anyPlayerInRange() + { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, this.requiredPlayerRange) != null; + } +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java new file mode 100644 index 0000000000..5b837397b1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityVolumetricFlaskSetter.java @@ -0,0 +1,403 @@ +package gtPlusPlus.core.tileentities.general; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; +import gtPlusPlus.core.inventories.Inventory_VolumetricFlaskSetter; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.helpers.VolumetricFlaskHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +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; +import net.minecraftforge.fluids.FluidStack; + +public class TileEntityVolumetricFlaskSetter extends TileEntity implements ISidedInventory { + + private int tickCount = 0; + private final Inventory_VolumetricFlaskSetter inventoryContents; + private String customName; + public int locationX; + public int locationY; + public int locationZ; + private int aCurrentMode = 0; + private short aCustomValue = 1000; + + public TileEntityVolumetricFlaskSetter() { + this.inventoryContents = new Inventory_VolumetricFlaskSetter(); + this.setTileLocation(); + } + + public short getCustomValue() { + //Logger.INFO("Value: "+this.aCustomValue); + return this.aCustomValue; + } + + public void setCustomValue(int aVal) { + Logger.INFO("Old Value: "+this.aCustomValue); + this.aCustomValue = (short) MathUtils.balance(aVal, 0, Short.MAX_VALUE); + Logger.INFO("New Value: "+this.aCustomValue); + markDirty(); + } + + public boolean setTileLocation() { + if (this.hasWorldObj()) { + if (!this.getWorldObj().isRemote) { + this.locationX = this.xCoord; + this.locationY = this.yCoord; + this.locationZ = this.zCoord; + return true; + } + } + return false; + } + + //Rename to hasCircuitToConfigure + public final boolean hasFlask() { + for (int i=0;i= 16) { + return false; + } + } + AutoMap aValidSlots = new AutoMap(); + int aSlotCount = 0; + for (ItemStack i : aInputs) { + if (i != null) { + aValidSlots.put(aSlotCount); + } + aSlotCount++; + } + for (int e : aValidSlots) { + + // Skip slot 7 (Custom) unless it has a value > 0 + if (e == 7 && getCustomValue() <= 0) { + Logger.INFO("Skipping Custom slot as value <= 0"); + continue; + } + if (e == Container_VolumetricFlaskSetter.SLOT_OUTPUT) { + continue; + } + + boolean doAdd = false; + ItemStack g = this.getStackInSlot(e); + FluidStack aInputFluidStack = VolumetricFlaskHelper.getFlaskFluid(g); + int aSize = 0; + ItemStack aInputStack = null; + int aTypeInSlot = getFlaskType(g); + if (aTypeInSlot > 0 && g != null) { + // No Existing Output + if (!hasOutput) { + aSize = g.stackSize; + doAdd = true; + } + // Existing Output + else { + ItemStack f = aInputs[Container_VolumetricFlaskSetter.SLOT_OUTPUT]; + FluidStack aFluidInCheckedSlot = VolumetricFlaskHelper.getFlaskFluid(f); + int aTypeInCheckedSlot = getFlaskType(f); + // Check that the Circuit in the Output slot is not null and the same type as the circuit input. + if (aTypeInCheckedSlot > 0 && (aTypeInSlot == aTypeInCheckedSlot) && f != null) { + if (g.getItem() == f.getItem() && VolumetricFlaskHelper.getFlaskCapacity(f) == getCapacityForSlot(e) && ((aInputFluidStack == null && aFluidInCheckedSlot == null) || aInputFluidStack.isFluidEqual(aFluidInCheckedSlot))) { + Logger.INFO("Input Slot Flask Contains: "+(aInputFluidStack != null ? aInputFluidStack.getLocalizedName() : "Empty")); + Logger.INFO("Output Slot Flask Contains: "+(aFluidInCheckedSlot != null ? aFluidInCheckedSlot.getLocalizedName() : "Empty")); + aSize = f.stackSize + g.stackSize; + if (aSize > 16) { + aInputStack = g.copy(); + aInputStack.stackSize = (aSize-16); + } + doAdd = true; + } + } + } + if (doAdd) { + // Check Circuit Type + ItemStack aOutput; + FluidStack aOutputFluid = null; + if (!VolumetricFlaskHelper.isFlaskEmpty(g)) { + aOutputFluid = aInputFluidStack.copy(); + } + if (aTypeInSlot == 1) { + aOutput = VolumetricFlaskHelper.getVolumetricFlask(1); + } + else if (aTypeInSlot == 2) { + aOutput = VolumetricFlaskHelper.getLargeVolumetricFlask(1); + } + else if (aTypeInSlot == 3) { + aOutput = VolumetricFlaskHelper.getGiganticVolumetricFlask(1); + } + else { + aOutput = null; + } + if (aOutput != null) { + aOutput.stackSize = aSize; + int aCapacity = getCapacityForSlot(e); + VolumetricFlaskHelper.setNewFlaskCapacity(aOutput, aCapacity); + if (aOutputFluid != null) { + if (aOutputFluid.amount > aCapacity) { + aOutputFluid.amount = aCapacity; + } + VolumetricFlaskHelper.setFluid(aOutput, aOutputFluid); + } + this.setInventorySlotContents(e, aInputStack); + this.setInventorySlotContents(Container_VolumetricFlaskSetter.SLOT_OUTPUT, aOutput); + return true; + } + } + } + continue; + } + return false; + } + + @Override + public void updateEntity() { + try{ + if (!this.worldObj.isRemote) { + if (tickCount % 10 == 0) { + if (hasFlask()) { + this.addOutput(); + this.markDirty(); + } + } + this.tickCount++; + } + } + catch (final Throwable t){} + } + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + super.writeToNBT(nbt); + // Utils.LOG_WARNING("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.inventoryContents.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + nbt.setShort("aCustomValue", aCustomValue); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + nbt.setInteger("aCurrentMode", aCurrentMode); + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + super.readFromNBT(nbt); + // Utils.LOG_WARNING("Trying to read NBT data from TE."); + this.inventoryContents.readFromNBT(nbt.getCompoundTag("ContentsChest")); + this.aCustomValue = nbt.getShort("aCustomValue"); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + aCurrentMode = nbt.getInteger("aCurrentMode"); + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return this.getInventory().getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + final int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r=0; r= 100) && (this.tankEssence.getFluidAmount() <= (this.tankEssence.getCapacity()-(100*EnchantingUtils.RATIO_MOB_ESSENCE_TO_LIQUID_XP)))){ + final FluidStack bigStorage = EnchantingUtils.getEssenceFromLiquidXp(100); + this.tankEssence.fill(bigStorage, true); + this.tankLiquidXp.drain(100, true); + return (this.tankEssence.getCapacity()-this.tankEssence.getFluidAmount()); + } + } + else { + final double rm = EnchantingUtils.RATIO_MOB_ESSENCE_TO_LIQUID_XP; + if ((this.tankEssence.getFluid() != null) && (this.tankEssence.getFluidAmount() >= rm) && (this.tankLiquidXp.getFluidAmount() <= (this.tankLiquidXp.getCapacity()-rm))){ + final FluidStack bigStorage = EnchantingUtils.getLiquidXP(1); + this.tankLiquidXp.fill(bigStorage, true); + this.tankEssence.drain((int) rm, true); + return (this.tankLiquidXp.getCapacity()-this.tankLiquidXp.getFluidAmount()); + } + } + return 0f; + } + + @Override + public void readFromNBT(final NBTTagCompound tag) { + this.tankEssence.readFromNBT(tag); + this.tankLiquidXp.readFromNBT(tag); + this.mConvertToEssence = tag.getBoolean("mConvertToEssence"); + super.readFromNBT(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound tag) { + this.tankEssence.writeToNBT(tag); + this.tankLiquidXp.writeToNBT(tag); + tag.setBoolean("mConvertToEssence", this.mConvertToEssence); + super.writeToNBT(tag); + } + + @Override + public Packet getDescriptionPacket() { + final NBTTagCompound tag = new NBTTagCompound(); + this.writeToNBT(tag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); + } + + @Override + public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity pkt) { + final NBTTagCompound tag = pkt.func_148857_g(); + this.readFromNBT(tag); + } + + public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) { + if (this.isServerSide()){ + if (this.mConvertToEssence){ + PlayerUtils.messagePlayer(aPlayer, "Converting from Mob Essence to Liquid Xp."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Converting from Liquid Xp to Mob Essence."); + } + //Mode Change + this.changeMode(); + } + } + + public void onRightClick(final byte aSide, final EntityPlayer aPlayer, final int aX, final int aY, final int aZ) { + if ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54))) { + String mInput; + String mOutput; + + if (this.mConvertToEssence){ + mInput = "Liquid Xp"; + mOutput = "Mob Essence"; + } + else { + mInput = "Mob Essence"; + mOutput = "Liquid Xp"; + } + + PlayerUtils.messagePlayer(aPlayer, "Input: "+mInput+"."); + PlayerUtils.messagePlayer(aPlayer, "Output: "+mOutput+"."); + } + } + + @Override + public boolean onPreTick(long aTick) { + boolean aSuperResult = super.onPreTick(aTick); + long aTankSpaceLeft = 0; + double aAmount = 0; + int aRuns = 0; + if (this.mConvertToEssence) { + aTankSpaceLeft = (this.tankEssence.getCapacity()-this.tankEssence.getFluidAmount()); + aAmount = EnchantingUtils.getEssenceFromLiquidXp(100).amount; + } + else { + aTankSpaceLeft = (this.tankLiquidXp.getCapacity()-this.tankLiquidXp.getFluidAmount()); + aAmount = EnchantingUtils.RATIO_MOB_ESSENCE_TO_LIQUID_XP; + } + aRuns = (int) (aTankSpaceLeft / aAmount); + for (int i=0;i getTileEntityClass(); + + protected abstract String getTileEntityNameForRegistration(); + + public Block getBlock() { + return mTilePos != null ? mTilePos.getBlockAtPos() : Blocks.redstone_block; + } + + public final boolean isLight() { + return mLightMode; + } + + public final float getLightBrightness() { + if (!isLight()) { + return 0; + } + else { + return mLightValue; + } + } + + @Override + public void readFromNBT(NBTTagCompound aNBT) { + mStartTime = aNBT.getLong("mStartTime"); + mInvName = aNBT.getString("mInvName"); + mLightValue = aNBT.getFloat("mLightValue"); + mLightMode = aNBT.getBoolean("mLightMode"); + mRedstoneLevel = aNBT.getByte("mRedstoneLevel"); + super.readFromNBT(aNBT); + } + + @Override + public void writeToNBT(NBTTagCompound aNBT) { + aNBT.setInteger("mTileType", mTileType); + aNBT.setLong("mStartTime", mStartTime); + aNBT.setString("mInvName", mInvName); + aNBT.setFloat("mLightValue", getLightBrightness()); + aNBT.setBoolean("mLightMode", isLight()); + aNBT.setByte("mRedstoneLevel", mRedstoneLevel); + super.writeToNBT(aNBT); + } + + + private boolean mHasUpdatedRecently = false; + + private final boolean init() { + if (mTilePos == null) { + try { + mTilePos = new BlockPos(this); + } catch (Throwable t) { + return false; + } + } + if (mStartTime == null) { + try { + mStartTime = System.currentTimeMillis(); + } catch (Throwable t) { + return false; + } + } + return true; + } + private Long mLastUpdate; + private String mInvName = ""; + + @Override + public void updateEntity() { + //Handle init + if (!init()) { + return; + } + if (mRequiresUpdate || mLastUpdate == null) { + mRequiresUpdate = false; + mHasUpdatedRecently = true; + mLastUpdate = System.currentTimeMillis(); + if (mTilePos.world.getBlockLightValue(xCoord, yCoord, zCoord) != getLightBrightness()/0.0625f) { + mTilePos.getBlockAtPos().setLightLevel(getLightBrightness()/0.0625f); + mTilePos.world.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, (int) (getLightBrightness()/0.0625f)); + mTilePos.world.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord); + Logger.INFO("Updating Light"); + } + mTilePos.world.scheduleBlockUpdate(xCoord, yCoord, zCoord, mTilePos.getBlockAtPos(), 1); + markDirty(); + } + if (Utils.getMillisSince(mLastUpdate, System.currentTimeMillis()) >= 5000) { + if (mHasUpdatedRecently) { + mHasUpdatedRecently = false; + this.markForUpdate(); + } + } + + if (Utils.getMillisSince(mStartTime, System.currentTimeMillis()) % 50 == 0) { + + } + + + + super.updateEntity(); + } + + public final void markForUpdate() { + mRequiresUpdate = true; + } + + public final boolean hasUpdatedRecently() { + return mHasUpdatedRecently; + } + + @Override + public int getBlockMetadata() { + return super.getBlockMetadata(); + } + + @Override + public void markDirty() { + super.markDirty(); + } + + @Override + public boolean canUpdate() { + return true; + } + + public void setRedstoneState(boolean aRedstoneActive) { + + } + + public void setCurrentTextureArray(IIcon[] aTextures) { + + } + + /** + * Used to see if one of the blocks next to you or your block is getting power from a neighboring block. Used by + * items like TNT or Doors so they don't have redstone going straight into them. Args: x, y, z + */ + public boolean isGettingIndirectlyPowered() { + if (mTilePos == null) { + return false; + } + return mTilePos.world.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); + } + + public int getStrongestIndirectPower() { + if (mTilePos == null) { + return 0; + } + return mTilePos.world.getStrongestIndirectPower(xCoord, yCoord, zCoord); + } + + /** + * Gets the power level from a certain block face. Args: x, y, z, direction + */ + public int getIndirectPowerForSide(int aSide) { + if (mTilePos == null || aSide <0 || aSide > 5) { + return 0; + } + return mTilePos.world.getIndirectPowerLevelTo(xCoord, yCoord, zCoord, aSide); + } + + /** + * Returns the highest redstone signal strength powering the given block. Args: X, Y, Z. + */ + public int getBlockPowerInput() { + if (mTilePos == null) { + return 0; + } + return mTilePos.world.getBlockPowerInput(xCoord, yCoord, zCoord); + } + + /** + * Determine if this block can make a redstone connection on the side provided, + * Useful to control which sides are inputs and outputs for redstone wires. + * + * Side: + * -1: UP + * 0: NORTH + * 1: EAST + * 2: SOUTH + * 3: WEST + * + * @param world The current world + * @param x X Position + * @param y Y Position + * @param z Z Position + * @param side The side that is trying to make the connection + * @return True to make the connection + */ + public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { + if (mTilePos == null) { + return false; + } + return canAcceptRedstoneSignal() || canSupplyRedstoneSignal(); + } + + /** + * Called to determine whether to allow the a block to handle its own indirect power rather than using the default rules. + * @param world The world + * @param x The x position of this block instance + * @param y The y position of this block instance + * @param z The z position of this block instance + * @param side The INPUT side of the block to be powered - ie the opposite of this block's output side + * @return Whether Block#isProvidingWeakPower should be called when determining indirect power + */ + public boolean shouldCheckWeakPower(IBlockAccess world, int x, int y, int z, int side) { + if (mTilePos == null) { + return false; + } + return getBlock().isNormalCube(); + } + + /** + * If this block should be notified of weak changes. + * Weak changes are changes 1 block away through a solid block. + * Similar to comparators. + * + * @param world The current world + * @param x X Position + * @param y Y position + * @param z Z position + * @param side The side to check + * @return true To be notified of changes + */ + public boolean getWeakChanges(IBlockAccess world, int x, int y, int z) { + if (mTilePos == null) { + return false; + } + return false; + } + + + /** + * Override this to change the level of redstone output. + * @return + */ + public int getRedstoneLevel() { + if (mTilePos == null || mRedstoneLevel == null) { + return 0; + } + else { + if (canSupplyRedstoneSignal()) { + if (this.hasUpdatedRecently()) { + int aInputPower = getInputPowerLevel(); + mRedstoneLevel = (byte) ((aInputPower >= 0 && aInputPower <= 127) ? aInputPower : 0); + } + return mRedstoneLevel; + } + } + return 0; + } + + + public boolean providesWeakPower() { + return isProvidingPower(); + } + + public boolean providesStrongPower() { + return isProvidingPower(); + } + + + /** + * Returns the amount of week power this block is providing to a side. + * @param world + * @param x + * @param y + * @param z + * @param side + * @return + */ + public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { + if (!providesWeakPower()) { + return 0; + } + return getOutputPowerLevel(); + } + /** + * Returns the amount of strong power this block is providing to a side. + * @param world + * @param x + * @param y + * @param z + * @param side + * @return + */ + public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { + if (!providesStrongPower()) { + return 0; + } + return getOutputPowerLevel(); + } + + + + + + + + /* + * Alk's Simplified Redstone Handling functions (Fuck redstone) + */ + + /** + * + * @return - Does this Block supply redstone signal at all? + */ + public final boolean isPowered() { + return canAcceptRedstoneSignal() && getInputPowerLevel() > 0; + } + + /** + * + * @return - Can this Block provide redstone signal at all? + */ + public final boolean isProvidingPower() { + return canSupplyRedstoneSignal() && getOutputPowerLevel() > 0; + } + + /** + * + * @return - (0-15) Redstone Output signal level + */ + public final int getOutputPowerLevel() { + return getRedstoneLevel(); + } + + /** + * + * @return (0-15) Redstone Input Signal level + */ + public final int getInputPowerLevel() { + return getBlockPowerInput(); + } + + /** + * + * @return - Does this Tile Entity support outputting redstone? + */ + public final boolean canSupplyRedstoneSignal() { + return mTileType == 1 || mTileType == 2; + } + + /** + * + * @return - Does this Tile Entity support inputting redstone? + */ + public final boolean canAcceptRedstoneSignal() { + return mTileType == 0 || mTileType == 2; + } + + + @Override + public boolean isScrewdriverable() { + return false; + } + + + @Override + public boolean onScrewdriverLMB() { + return false; + } + + + @Override + public boolean onScrewdriverRMB() { + return false; + } + + + @Override + public boolean isWrenchable() { + return false; + } + + + @Override + public boolean onWrenchLMB() { + return false; + } + + + @Override + public boolean onWrenchRMB() { + return false; + } + + + @Override + public boolean isMalletable() { + return false; + } + + + @Override + public boolean onMalletLMB() { + return false; + } + + + @Override + public boolean onMalletRMB() { + return false; + } + + + public void setCustomName(String displayName) { + this.mInvName = displayName; + } + + public String getCustomName() { + return this.mInvName; + } + + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.mInvName : "container.redstone.generic"; + } + + public boolean hasCustomInventoryName() { + return (this.mInvName != null) && !this.mInvName.equals(""); + } + + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java new file mode 100644 index 0000000000..6bb4c932dc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java @@ -0,0 +1,155 @@ +package gtPlusPlus.core.tileentities.machines; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.passive.EntityCow; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntityMooshroom; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.entity.passive.IAnimals; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; + +public class TileEntityAdvPooCollector extends TileEntityBaseFluidCollector { + + public TileEntityAdvPooCollector() { + super(18, 128000); + } + + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } + + public void onPreLogicTick() { + + } + + public boolean addDrop(V aPooMaker) { + int aChance = MathUtils.randInt(0, 50000); + if (aChance > 0) { + ItemStack aPoop; + if (aChance<= 200) { + aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); + } + else if (aChance <= 1000) { + aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); + } + else if (aChance <= 2000) { + aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); + } + else { + return false; + } + + //Add to inventory if not full, else espawn in world + if (!this.mInventory.addItemStack(aPoop)) { + EntityItem entity = new EntityItem(worldObj, xCoord, yCoord+1.5, zCoord, aPoop); + worldObj.spawnEntityInWorld(entity); + } + + } + + + return false; + } + + private static AutoMap aEntityToDrain = new AutoMap(); + + @Override + public AutoMap aThingsToLookFor() { + if (aEntityToDrain.isEmpty()) { + aEntityToDrain.add(EntityAnimal.class); + aEntityToDrain.add(IAnimals.class); + aEntityToDrain.add(EntityVillager.class); + aEntityToDrain.add(EntityPlayer.class); + } + return aEntityToDrain; + } + + @Override + public int onPostTick(V aPooMaker) { + if (this.tank.getFluidAmount() < this.tank.getCapacity()) { + int aPooAmount = 0; + // Vanilla Animals + if (aPooMaker instanceof EntityChicken) { + aPooAmount = MathUtils.randInt(1, 40); + } + else if (aPooMaker instanceof EntityHorse) { + aPooAmount = MathUtils.randInt(20, 40); + } + else if (aPooMaker instanceof EntityCow) { + aPooAmount = MathUtils.randInt(18, 45); + } + else if (aPooMaker instanceof EntityMooshroom) { + aPooAmount = 17; + } + else if (aPooMaker instanceof EntitySheep) { + aPooAmount = MathUtils.randInt(8, 30); + } + + else { + if (aPooMaker instanceof EntityAnimal || aPooMaker instanceof IAnimals) { + aPooAmount = MathUtils.randInt(5, 35); + } + else if (aPooMaker instanceof EntityVillager) { + aPooAmount = MathUtils.randInt(25, 30); + } + else if (aPooMaker instanceof EntityPlayer) { + aPooAmount = MathUtils.randInt(1, 3); + } + else { + aPooAmount = MathUtils.randInt(1, 10); + } + } + aPooAmount = Math.max(Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount), 1); + return Math.max(1, (aPooAmount * MathUtils.getRandomFromArray(new int[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4}) / 10)); + } + else { + return 0; + } + } + + @Override + public Fluid fluidToProvide() { + return AgriculturalChem.PoopJuice; + } + + @Override + public ItemStack itemToSpawnInWorldIfTankIsFull() { + int a = MathUtils.randInt(0, 75); + ItemStack aItem = null; + if (a <= 30) { + aItem = ItemUtils.getSimpleStack(AgriculturalChem.dustDirt); + } + else if (a <= 40) { + aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); + } + else if (a <= 55) { + aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); + } + return aItem; + } + + public int getBaseTickRate() { + return MathUtils.randInt(50, 200); + } + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java new file mode 100644 index 0000000000..cdae4cf829 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityBaseFluidCollector.java @@ -0,0 +1,238 @@ +package gtPlusPlus.core.tileentities.machines; + +import java.util.List; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BTF_FluidTank; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.tileentities.base.TileEntityBase; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +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.util.AxisAlignedBB; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidEvent; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public abstract class TileEntityBaseFluidCollector extends TileEntityBase implements IFluidHandler { + + public final FluidTank tank; + private boolean needsUpdate = false; + private int updateTimer = 0; + private long internalTickCounter = 0; + private BlockPos internalBlockLocation; + + public TileEntityBaseFluidCollector(int aInvSlotCount, int aTankCapcity) { + super(aInvSlotCount); + tank = new BTF_FluidTank(aTankCapcity); + } + + @Override + public final int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + needsUpdate = true; + return this.tank.fill(resource, doFill); + } + + @Override + public final FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + needsUpdate = true; + return this.tank.drain(resource.amount, doDrain); + } + + @Override + public final FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + needsUpdate = true; + FluidStack fluid = this.tank.getFluid(); + // return this.tank.drain(maxDrain, doDrain); + if (fluid == null) { + return null; + } + + int drained = maxDrain; + if (fluid.amount < drained) { + drained = fluid.amount; + } + + FluidStack stack = new FluidStack(fluid, drained); + if (doDrain) { + fluid.amount -= drained; + if (fluid.amount <= 0) { + fluid = null; + } + + if (this != null) { + FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, this.getWorldObj(), this.xCoord, + this.yCoord, this.zCoord, this.tank, 0)); + } + } + return stack; + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public final FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[] { this.tank.getInfo() }; + } + + @Override + public final void updateEntity() { + super.updateEntity(); + onPreLogicTick(); + logicTick(); + if (needsUpdate) { + if (updateTimer == 0) { + updateTimer = 10; // every 10 ticks it will send an update + } else { + --updateTimer; + if (updateTimer == 0) { + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + needsUpdate = false; + } + } + } + } + + @Override + public void readFromNBT(NBTTagCompound tag) { + tank.readFromNBT(tag); + super.readFromNBT(tag); + } + + @Override + public void writeToNBT(NBTTagCompound tag) { + tank.writeToNBT(tag); + super.writeToNBT(tag); + } + + @Override + public final Packet getDescriptionPacket() { + NBTTagCompound tag = new NBTTagCompound(); + writeToNBT(tag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); + } + + @Override + public final void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + NBTTagCompound tag = pkt.func_148857_g(); + readFromNBT(tag); + } + + public int getBaseTickRate() { + return MathUtils.randInt(200, 300); + } + + public abstract AutoMap aThingsToLookFor(); + + public abstract void onPreLogicTick(); + + public final void logicTick() { + + if (this.worldObj == null || this.worldObj.isRemote) { + return; + } + if (internalTickCounter % getBaseTickRate() == 0) { + if (internalBlockLocation == null) { + internalBlockLocation = new BlockPos(this); + } + BlockPos p = internalBlockLocation; + if (p != null) { + if (p.world != null) { + World w = this.worldObj; + if (w == null) { + return; + } + Chunk c = w.getChunkFromBlockCoords(p.xPos, p.zPos); + if (c != null) { + if (c.isChunkLoaded) { + int startX = p.xPos - 2; + int startY = p.yPos; + int startZ = p.zPos - 2; + int endX = p.xPos + 3; + int endY = p.yPos + 5; + int endZ = p.zPos + 3; + AxisAlignedBB box = AxisAlignedBB.getBoundingBox(startX, startY, startZ, endX, endY, endZ); + if (box != null) { + for (Class c2 : aThingsToLookFor()) { + tickEntityType(w, box, c2); + } + } else { + return; + } + } + } + } + } + + } + + internalTickCounter++; + } + + @SuppressWarnings("unchecked") + public final void tickEntityType(World w, AxisAlignedBB box, Class aClassToFind) { + List entities = w.getEntitiesWithinAABB(aClassToFind, box); + if (entities != null && !entities.isEmpty()) { + interactWithEntities(entities); + } + } + + public final void interactWithEntities(List entities) { + for (V aEntity : entities) { + addDrop(aEntity); + if (this.tank.getFluidAmount() < this.tank.getCapacity()) { + int aFluidAmount = onPostTick(aEntity); + aFluidAmount = Math.max(Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aFluidAmount), 1); + this.tank.fill(FluidUtils.getFluidStack(fluidToProvide(), aFluidAmount), true); + } + else { + ItemStack aDirtStack = ItemUtils.getSimpleStack(itemToSpawnInWorldIfTankIsFull(), 1); + if (!ItemUtils.checkForInvalidItems(aDirtStack)) { + return; + } + if (!this.mInventory.addItemStack(aDirtStack)) { + EntityItem entity = new EntityItem(worldObj, xCoord, yCoord+1.5, zCoord, aDirtStack); + worldObj.spawnEntityInWorld(entity); + } + } + } + } + + + /** + * Return the amount of fluid for this entity type + * @param aEntity + * @return + */ + public abstract int onPostTick(V aEntity); + + public abstract boolean addDrop(V aPooMaker); + + public abstract Fluid fluidToProvide(); + + public abstract ItemStack itemToSpawnInWorldIfTankIsFull(); + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java new file mode 100644 index 0000000000..8ba43bb197 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java @@ -0,0 +1,480 @@ +package gtPlusPlus.core.tileentities.machines; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.ItemList; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.container.Container_ModularityTable; +import gtPlusPlus.core.inventories.modulartable.InventoryModularMain; +import gtPlusPlus.core.inventories.modulartable.InventoryModularOutput; +import gtPlusPlus.core.item.bauble.ModularBauble; +import gtPlusPlus.core.tileentities.base.TileEntityBase; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; + +public class TileEntityModularityTable extends TileEntityBase implements ISidedInventory{ + + public InventoryModularMain inventoryGrid; + public InventoryModularOutput inventoryOutputs; + public InventoryModularOutput mTempRecipeStorage; + private Container_ModularityTable container; + private String customName; + private int mRecipeTimeRemaining = -1; + + public TileEntityModularityTable() { + super(16); + this.inventoryGrid = new InventoryModularMain(); + this.inventoryOutputs = new InventoryModularOutput(); + this.mTempRecipeStorage = new InventoryModularOutput(); + this.canUpdate(); + generateAllValidUpgrades(); + } + + public void setContainer(Container_ModularityTable container_ModularityTable) { + this.container = container_ModularityTable; + } + + public Container_ModularityTable getContainer() { + return this.container; + } + + public int getRecipeTime(){ + return this.mRecipeTimeRemaining; + } + + @Override + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setInteger("mRecipeTime", this.mRecipeTimeRemaining); + this.inventoryOutputs.writeToNBT(this.getTag(nbt, "ContentsOutput")); + this.inventoryGrid.writeToNBT(this.getTag(nbt, "ContentsGrid")); + this.mTempRecipeStorage.writeToNBT(this.getTag(nbt, "ContentsRecipeTemp")); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + super.readFromNBT(nbt); + this.mRecipeTimeRemaining = nbt.getInteger("mRecipeTime"); + this.inventoryOutputs.readFromNBT(nbt.getCompoundTag("ContentsOutput")); + this.inventoryGrid.readFromNBT(nbt.getCompoundTag("ContentsGrid")); + this.mTempRecipeStorage.readFromNBT(nbt.getCompoundTag("ContentsRecipeTemp")); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + } + + protected ItemStack mOutputStack; //Upgraded Bauble + protected ItemStack mInputstackA; //Bauble + protected ItemStack mInputstackB; //Upgrade + + public ItemStack getPendingOutputItem(){ + this.mRecipeTimeRemaining--; + return this.mOutputStack; + } + + public ItemStack[] getCurrentInputItems(){ + if (this.mRecipeTimeRemaining < 0){ + return null; + } + else { + return new ItemStack[]{this.mInputstackA, this.mInputstackB}; + } + } + + public boolean setInputStacks(ItemStack tBauble, ItemStack tUpgrade){ + if (tBauble != null){ + this.mInputstackA = tBauble; + } + else { + this.mInputstackA = null; + } + if (tUpgrade != null){ + this.mInputstackB = tBauble; + } + else { + this.mInputstackB = null; + } + if (this.mInputstackA != null && this.mInputstackB != null){ + return true; + } + return false; + } + + public boolean setOutputStack(ItemStack mNewBauble){ + if (mNewBauble != null){ + this.mOutputStack = mNewBauble; + return true; + } + else { + this.mOutputStack = null; + return false; + } + } + + public boolean clearRecipeData(){ + this.mInputstackA = null; + this.mInputstackB = null; + this.mOutputStack = null; + return true; + } + + @Override + public boolean canUpdate() { + return true; + } + + public static Map> mValidUpgradeList = new HashMap>(); + public static Map mValidUpgradeListFormChange = new HashMap(); + + private static boolean generateAllValidUpgrades() { + + // Form Change + generateUpgradeFormData(ItemList.Sensor_MV.get(1), BT.TYPE_RING); + generateUpgradeFormData(ItemList.Electric_Piston_MV.get(1), BT.TYPE_BELT); + generateUpgradeFormData(ItemList.Emitter_MV.get(1), BT.TYPE_AMULET); + + // Damage Boost + generateUpgradeData(ItemList.Electric_Motor_LV.get(1), Modifiers.BOOST_DAMAGE, 1); + generateUpgradeData(ItemList.Electric_Motor_MV.get(1), Modifiers.BOOST_DAMAGE, 2); + generateUpgradeData(ItemList.Electric_Motor_HV.get(1), Modifiers.BOOST_DAMAGE, 3); + generateUpgradeData(ItemList.Electric_Motor_EV.get(1), Modifiers.BOOST_DAMAGE, 4); + generateUpgradeData(ItemList.Electric_Motor_IV.get(1), Modifiers.BOOST_DAMAGE, 5); + + // Defence Boost + generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateAluminium", 1), Modifiers.BOOST_DEF, 1); + generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateStainlessSteel", 1), Modifiers.BOOST_DEF, 2); + generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateTungsten", 1), Modifiers.BOOST_DEF, 3); + generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateTungstenSteel", 1), Modifiers.BOOST_DEF, 4); + generateUpgradeData(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateNaquadah", 1), Modifiers.BOOST_DEF, 5); + + // Hp Boost + generateUpgradeData(ItemUtils.simpleMetaStack(Items.golden_apple, 0, 1), Modifiers.BOOST_HP, 1); + generateUpgradeData(ItemUtils.simpleMetaStack(Items.golden_apple, 1, 1), Modifiers.BOOST_HP, 2); + generateUpgradeData(ItemUtils.simpleMetaStack(Items.nether_star, 0, 1), Modifiers.BOOST_HP, 3); + generateUpgradeData(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32725", 32725, 1), Modifiers.BOOST_HP, + 4); + generateUpgradeData(ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:32726", 32726, 1), Modifiers.BOOST_HP, + 5); + + return true; + } + + public static boolean generateUpgradeData(ItemStack tStack, Modifiers tMod, int tLevel) { + Pair tTemp = new Pair(tMod, tLevel); + if (mValidUpgradeList.put(tStack, tTemp) != null) { + return true; + } + return false; + } + + public static boolean generateUpgradeFormData(ItemStack tStack, BT tMod) { + if (mValidUpgradeListFormChange.put(tStack, tMod) != null) { + return true; + } + return false; + } + + public static boolean addUpgrade(ItemStack tStack, ItemStack tBauble) { + + try { + Iterator> it = mValidUpgradeListFormChange.entrySet().iterator(); + while (it.hasNext()) { + Entry pair = it.next(); + if (pair.getKey().getItem() == tStack.getItem() + && pair.getKey().getItemDamage() == tStack.getItemDamage()) { + ModularArmourUtils.setBaubleType(tBauble, pair.getValue()); + tBauble.setItemDamage(ModularArmourUtils.getBaubleTypeID(tBauble)); + return true; + } + } + } catch (Throwable t) { + + } + try { + Iterator>> it2 = mValidUpgradeList.entrySet().iterator(); + while (it2.hasNext()) { + Entry> pair = it2.next(); + if (pair.getKey().getItem() == tStack.getItem() + && pair.getKey().getItemDamage() == tStack.getItemDamage()) { + Pair newPair = pair.getValue(); + ModularArmourUtils.setModifierLevel(tBauble, newPair); + return true; + } + } + } catch (Throwable t) { + + } + return false; + } + + @Override + public int getSizeInventory() { + return 11; + } + + @Override + public ItemStack getStackInSlot(int slot) { + if (slot >= this.inventoryGrid.getSizeInventory()){ + return this.inventoryOutputs.getStackInSlot(slot-9); + } + else if (slot < this.inventoryGrid.getSizeInventory()){ + return this.inventoryGrid.getStackInSlot(slot); + } + else { + return null; + } + } + + @Override + public ItemStack decrStackSize(int slot, int count) { + if (slot < this.inventoryGrid.getSizeInventory()){ + return this.inventoryGrid.decrStackSize(slot, count); + } + else if (slot >= this.inventoryGrid.getSizeInventory()){ + return this.inventoryOutputs.decrStackSize(slot-9, count); + } + else { + return null; + } + } + + @Override + public ItemStack getStackInSlotOnClosing(int slot) { + return this.getStackInSlot(slot); + } + + @Override + public void setInventorySlotContents(int slot, ItemStack stack) { + if (slot >= this.inventoryGrid.getSizeInventory()){ + this.inventoryOutputs.setInventorySlotContents(slot-9, stack); + } + else if (slot < this.inventoryGrid.getSizeInventory()){ + this.inventoryGrid.setInventorySlotContents(slot, stack); + } + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer entityplayer) { + return true; + } + + @Override + public void openInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.inventoryGrid.openInventory(); + this.inventoryOutputs.openInventory(); + } + + @Override + public void closeInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.inventoryGrid.openInventory(); + this.inventoryOutputs.openInventory(); + } + + @Override + public boolean isItemValidForSlot(int slot, ItemStack itemstack) { + if (slot >= this.inventoryGrid.getSizeInventory()){ + return this.inventoryOutputs.isItemValidForSlot(slot-9, itemstack); + } + else if (slot < this.inventoryGrid.getSizeInventory()){ + return this.inventoryGrid.isItemValidForSlot(slot, itemstack); + } + else { + return false; + } + } + + @Override + public int[] getAccessibleSlotsFromSide(int side) { + int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r=0; r= 9){ + return this.inventoryOutputs.isItemValidForSlot(slot-9, item); + } + else { + return this.inventoryGrid.isItemValidForSlot(slot, item); + } + } + + @Override + public boolean canExtractItem(int slot, ItemStack item, int side) { + Logger.INFO("Slot:"+slot+" | side? "+side); + if (slot == 11 || slot <= 8){ + return true; + } + return false; + } + + @Override + public String getCustomName() { + return this.customName; + } + + @Override + public void setCustomName(String customName) { + this.customName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.fishtrap"; + } + + @Override + public boolean hasCustomInventoryName() { + return this.customName != null && !this.customName.equals(""); + } + + @Override + public boolean onPreTick(long aTick) { + //Check for active recipe + if (this.mRecipeTimeRemaining > -1 || (this.mTempRecipeStorage != null) && (this.mTempRecipeStorage.getRecipeTime() > -1)){ + if ((this.mTempRecipeStorage != null) && this.mTempRecipeStorage.getRecipeTime() > -1){ + if (this.mRecipeTimeRemaining < this.mTempRecipeStorage.getRecipeTime()){ + this.mRecipeTimeRemaining = this.mTempRecipeStorage.getRecipeTime(); + this.markDirty(); + } + } + if (this.mInputstackA != null && this.mInputstackB != null && this.mOutputStack != null){ + this.mTempRecipeStorage.setInventorySlotContents(0, this.mInputstackA); + this.mTempRecipeStorage.setInventorySlotContents(1, this.mInputstackB); + this.mTempRecipeStorage.setInventorySlotContents(2, this.mOutputStack); + this.mTempRecipeStorage.setRecipeTime(this.mRecipeTimeRemaining); + this.markDirty(); + } + } + return true; + } + + @Override + public boolean onPostTick(long aTick) { + if (mRecipeTimeRemaining == 0){ + this.inventoryOutputs.setInventorySlotContents(2, this.getPendingOutputItem()); + clearRecipeData(); + this.mTempRecipeStorage.setRecipeTime(this.mRecipeTimeRemaining); + this.markDirty(); + } + else if (mRecipeTimeRemaining > 0){ + mRecipeTimeRemaining--; + this.mTempRecipeStorage.setRecipeTime(this.mRecipeTimeRemaining); + } + return true; + } + + @Override + public boolean processRecipe() { + boolean removeInputA = false; + boolean removeInputB = false; + // Data stick + ItemStack tBauble = this.inventoryOutputs.getStackInSlot(0); + ItemStack tUpgrade = this.inventoryOutputs.getStackInSlot(1); + if (tBauble != null && tUpgrade != null && this.container != null) { + if (tBauble.getItem() instanceof ModularBauble && this.mRecipeTimeRemaining == -1) { + if (tUpgrade != null && tBauble != null) { + removeInputA = true; + this.setInputStacks(tBauble, tUpgrade); + try { + removeInputB = addUpgrade(tUpgrade, tBauble); + if (!removeInputB) { + } + } catch (Throwable t) { + } + if (removeInputA && removeInputB) { + if (this.setOutputStack(tBauble)){ + if (this.inventoryOutputs.getStackInSlot(1).stackSize > 1) { + ItemStack mTempStack = this.inventoryOutputs.getStackInSlot(1); + mTempStack.stackSize--; + this.inventoryOutputs.setInventorySlotContents(1, mTempStack); + } else { + this.inventoryOutputs.setInventorySlotContents(1, null); + } + this.inventoryOutputs.setInventorySlotContents(0, null); + this.mRecipeTimeRemaining = 80; + this.markDirty(); + return true; + } + } + } + } + } + return false; + } + + public static boolean isValidModularPiece(final ItemStack itemstack){ + if (itemstack.getItem() instanceof ModularBauble){ + return true; + } + return false; + } + + public static boolean isValidUpgrade(final ItemStack itemstack) { + boolean isValid = false; + if (itemstack != null){ + Iterator> it = mValidUpgradeListFormChange.entrySet().iterator(); + while (it.hasNext()) { + Entry pair = it.next(); + if (pair.getKey().getItem() == itemstack.getItem() + && pair.getKey().getItemDamage() == itemstack.getItemDamage()){ + isValid = true; + } + } + Iterator>> it2 = mValidUpgradeList.entrySet().iterator(); + while (it2.hasNext()) { + Entry> pair = it2.next(); + if (pair.getKey().getItem() == itemstack.getItem() + && pair.getKey().getItemDamage() == itemstack.getItemDamage()){ + isValid = true; + } + } + } + return isValid; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java new file mode 100644 index 0000000000..012c9f4ff5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPestKiller.java @@ -0,0 +1,506 @@ +package gtPlusPlus.core.tileentities.machines; + +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BTF_FluidTank; +import gtPlusPlus.core.inventories.InventoryPestKiller; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.Entity; +import net.minecraft.entity.passive.EntityBat; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +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; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidEvent; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; +import net.minecraftforge.oredict.OreDictionary; + +public class TileEntityPestKiller extends TileEntity implements ISidedInventory, IFluidHandler { + + private final int mBaseTickRate = 20 * 30; + private final InventoryPestKiller mInventory; + private final FluidTank mTank; + private int mChunkX; + private int mChunkZ; + private boolean mSet = false; + + private int mTickCounter = 0; + private int mUpdateTick = 0; + private boolean mNeedsUpdate = false; + private String mCustomName; + + private static final AutoMap> mEntityMap = new AutoMap>(); + + static { + mEntityMap.put(EntityBat.class); + if (LoadedMods.Forestry) { + mEntityMap.put(ReflectionUtils.getClass("forestry.lepidopterology.entities.EntityButterfly")); + } + } + + public TileEntityPestKiller() { + this.mInventory = new InventoryPestKiller(); + mTank = new BTF_FluidTank(2000); + } + + public InventoryPestKiller getInventory() { + return this.mInventory; + } + + public FluidTank getTank() { + return mTank; + } + + private final void setup() { + World w = this.worldObj; + if (w != null) { + Chunk c = w.getChunkFromBlockCoords(this.xCoord, this.zCoord); + if (c != null) { + mChunkX = c.xPosition; + mChunkZ = c.zPosition; + mSet = true; + } + } + } + + @SuppressWarnings("rawtypes") + public boolean tryKillPests() { + int min = 0; + int max = 0; + switch (getTier()) { + case 1: + min = -2; + max = 3; + break; + case 2: + min = -4; + max = 5; + break; + default: + // code block + } + int aChunkCount = 0; + AutoMap entities = new AutoMap(); + if (min != 0 && max != 0) { + for (int x = min; x < max; x++) { + for (int z = min; z < max; z++) { + Chunk c = getChunkFromOffsetIfLoaded(x, z); + if (c != null) { + if (c.hasEntities) { + aChunkCount++; + List[] lists = c.entityLists; + for (List o : lists) { + for (Object e : o) { + if (e instanceof Entity) { + for (Class C : mEntityMap) { + if (e.getClass().equals(C) || C.isAssignableFrom(e.getClass())) { + entities.put((Entity) e); + } + } + } + } + } + } + } + } + } + } else { + Chunk c = getChunkFromOffsetIfLoaded(0, 0); + if (c != null) { + if (c.hasEntities) { + List[] lists = c.entityLists; + for (List o : lists) { + for (Object e : o) { + if (e instanceof Entity) { + for (Class C : mEntityMap) { + if (e.getClass().equals(C) || C.isAssignableFrom(e.getClass())) { + entities.put((Entity) e); + } + } + } + } + } + } + } + } + boolean killed = false; + if (!entities.isEmpty()) { + for (Entity e : entities) { + if (e != null) { + if (e.isEntityAlive()) { + if (this.mTank.getFluidAmount() >= 1 || getTier() == 0) { + if (getTier() > 0) { + int aChanceToUse = MathUtils.randInt(1, (100 * getTier())); + if (aChanceToUse == 1) { + this.mTank.drain(1, true); + } + } + e.performHurtAnimation(); + EntityUtils.doDamage(e, DamageSource.generic, Short.MAX_VALUE); + e.setDead(); + killed = true; + } + } + } + } + } + updateTileEntity(); + return killed; + } + + public Chunk getChunkFromOffsetIfLoaded(int x, int y) { + Chunk c = this.worldObj.getChunkFromChunkCoords(mChunkX + x, mChunkZ + y); + if (c.isChunkLoaded) { + return c; + } + return null; + } + + public int getTier() { + if (this.mTank != null) { + FluidStack f = mTank.getFluid(); + if (f != null) { + if (f.isFluidEqual(FluidUtils.getWildcardFluidStack("formaldehyde", 1))) { + return 1; + } else if (f.isFluidEqual(MISC_MATERIALS.HYDROGEN_CYANIDE.getFluidStack(1))) { + return 2; + } + } + } + return 0; + } + + @Override + public void updateEntity() { + if (worldObj.isRemote) { + return; + } + if (!mSet) { + setup(); + } + this.mTickCounter++; + if (this.mTank != null) { + if (this.hasFluidSpace()) { + handleInventory(); + } + } + if (this.mTickCounter % this.mBaseTickRate == 0) { + tryKillPests(); + } + updateTick(); + } + + public boolean anyPlayerInRange() { + return this.worldObj.getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, 32) != null; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) { + if (!nbt.hasKey(tag)) { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) { + mTank.writeToNBT(nbt); + super.writeToNBT(nbt); + // Utils.LOG_MACHINE_INFO("Trying to write NBT data to TE."); + final NBTTagCompound chestData = new NBTTagCompound(); + this.mInventory.writeToNBT(chestData); + nbt.setTag("ContentsChest", chestData); + if (this.hasCustomInventoryName()) { + nbt.setString("CustomName", this.getCustomName()); + } + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) { + mTank.readFromNBT(nbt); + super.readFromNBT(nbt); + // Utils.LOG_MACHINE_INFO("Trying to read NBT data from TE."); + this.mInventory.readFromNBT(nbt.getCompoundTag("ContentsChest")); + if (nbt.hasKey("CustomName", 8)) { + this.setCustomName(nbt.getString("CustomName")); + } + } + + @Override + public int getSizeInventory() { + return this.getInventory().getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int slot) { + return this.getInventory().getStackInSlot(slot); + } + + @Override + public ItemStack decrStackSize(final int slot, final int count) { + return this.getInventory().decrStackSize(slot, count); + } + + @Override + public ItemStack getStackInSlotOnClosing(final int slot) { + return this.getInventory().getStackInSlotOnClosing(slot); + } + + @Override + public void setInventorySlotContents(final int slot, final ItemStack stack) { + this.getInventory().setInventorySlotContents(slot, stack); + } + + @Override + public int getInventoryStackLimit() { + return this.getInventory().getInventoryStackLimit(); + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer entityplayer) { + return this.getInventory().isUseableByPlayer(entityplayer); + } + + @Override + public void openInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().openInventory(); + } + + @Override + public void closeInventory() { + this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, this.getBlockType(), 1, 1); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, this.getBlockType()); + this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord - 1, this.zCoord, this.getBlockType()); + this.getInventory().closeInventory(); + } + + @Override + public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) { + return this.getInventory().isItemValidForSlot(slot, itemstack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + final int[] accessibleSides = new int[this.getSizeInventory()]; + for (int r = 0; r < this.getInventory().getSizeInventory(); r++) { + accessibleSides[r] = r; + } + return accessibleSides; + + } + + @Override + public boolean canInsertItem(final int aSlot, final ItemStack aStack, final int p_102007_3_) { + if (this.getInventory().getInventory()[0] == null) { + return true; + } else if (GT_Utility.areStacksEqual(aStack, this.getInventory().getInventory()[0])) { + if (this.getInventory().getInventory()[0].stackSize < 64) { + int diff = 64 - this.getInventory().getInventory()[0].stackSize; + if (aStack.stackSize <= diff) { + return true; + } + } + } + return false; + } + + @Override + public boolean canExtractItem(final int aSlot, final ItemStack aStack, final int p_102008_3_) { + if (this.getInventory().getInventory()[1] == null) { + return false; + } else { + return true; + } + } + + public String getCustomName() { + return this.mCustomName; + } + + public void setCustomName(final String customName) { + this.mCustomName = customName; + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.mCustomName : "container.pestkiller"; + } + + @Override + public boolean hasCustomInventoryName() { + return (this.mCustomName != null) && !this.mCustomName.equals(""); + } + + @Override + public final int fill(ForgeDirection from, FluidStack resource, boolean doFill) { + updateTileEntity(); + return this.mTank.fill(resource, doFill); + } + + @Override + public final FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + updateTileEntity(); + return this.mTank.drain(resource.amount, doDrain); + } + + @Override + public final FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + FluidStack fluid = this.mTank.getFluid(); + // return this.tank.drain(maxDrain, doDrain); + if (fluid == null) { + return null; + } + + int drained = maxDrain; + if (fluid.amount < drained) { + drained = fluid.amount; + } + + FluidStack stack = new FluidStack(fluid, drained); + if (doDrain) { + fluid.amount -= drained; + if (fluid.amount <= 0) { + fluid = null; + } + + if (this != null) { + FluidEvent.fireEvent(new FluidEvent.FluidDrainingEvent(fluid, this.getWorldObj(), this.xCoord, + this.yCoord, this.zCoord, this.mTank, 0)); + } + } + updateTileEntity(); + return stack; + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return mTank.getFluid() == null || mTank.getFluid().getFluid().equals(fluid); + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return false; + } + + @Override + public final FluidTankInfo[] getTankInfo(ForgeDirection from) { + return new FluidTankInfo[] { this.mTank.getInfo() }; + } + + @Override + public final Packet getDescriptionPacket() { + NBTTagCompound tag = new NBTTagCompound(); + writeToNBT(tag); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.blockMetadata, tag); + } + + @Override + public final void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + NBTTagCompound tag = pkt.func_148857_g(); + readFromNBT(tag); + } + + + public boolean hasFluidSpace() { + if (this.mTank.getFluidAmount() <= 1000) { + return true; + } + return false; + } + + public boolean drainCell() { + boolean didFill = false; + ItemStack aInput = this.getStackInSlot(0); + if (aInput == null) { + return false; + } + aInput = aInput.copy(); + if (aInput != null && (this.getStackInSlot(1) == null || this.getStackInSlot(1).stackSize < 64)) { + ArrayList t1Cells = OreDictionary.getOres("cellFormaldehyde"); + ArrayList t2Cells = OreDictionary.getOres("cellHydrogenCyanide"); + didFill = addFluid(t1Cells, aInput, FluidUtils.getWildcardFluidStack("formaldehyde", 1000)); + if (!didFill) { + didFill = addFluid(t2Cells, aInput, MISC_MATERIALS.HYDROGEN_CYANIDE.getFluidStack(1000)); + } + } + + return didFill; + } + + public boolean handleInventory() { + if (this.getInventory() != null && drainCell()) { + this.decrStackSize(0, 1); + if (this.getStackInSlot(1) == null) { + this.setInventorySlotContents(1, CI.emptyCells(1)); + } else { + this.getStackInSlot(1).stackSize++; + } + this.updateTileEntity(); + return true; + } else { + return false; + } + } + + public boolean addFluid(ArrayList inputs, ItemStack aInput, FluidStack aFluidForInput) { + for (ItemStack a : inputs) { + if (GT_Utility.areStacksEqual(a, aInput)) { + if (mTank.getFluid() == null || mTank.getFluid() + .isFluidEqual(aFluidForInput)) { + boolean didFill = fill(ForgeDirection.UNKNOWN, aFluidForInput, true) > 0; + return didFill; + } + } else { + continue; + } + } + return false; + } + + public void updateTileEntity() { + this.getInventory().markDirty(); + this.markDirty(); + this.mNeedsUpdate = true; + } + + private final void updateTick() { + if (mNeedsUpdate) { + if (mUpdateTick == 0) { + mUpdateTick = 4; // every 4 ticks it will send an update + } else { + --mUpdateTick; + if (mUpdateTick == 0) { + markDirty(); + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + mNeedsUpdate = false; + } + } + } + } + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java new file mode 100644 index 0000000000..25348a31f8 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityPooCollector.java @@ -0,0 +1,147 @@ +package gtPlusPlus.core.tileentities.machines; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.passive.EntityChicken; +import net.minecraft.entity.passive.EntityCow; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntityMooshroom; +import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.passive.IAnimals; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; + +public class TileEntityPooCollector extends TileEntityBaseFluidCollector { + + public TileEntityPooCollector() { + super(9, 8000); + } + + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return false; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } + + public void onPreLogicTick() { + + } + + public boolean addDrop(V aPooMaker) { + int aChance = MathUtils.randInt(0, 50000); + if (aChance > 0) { + ItemStack aPoop; + if (aChance<= 100) { + aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); + } + else if (aChance <= 500) { + aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); + } + else if (aChance <= 1250) { + aPoop = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); + } + else { + return false; + } + if (!ItemUtils.checkForInvalidItems(aPoop)) { + return false; + } + + //Add poop to world + //Logger.INFO("Adding animal waste for "+aPooMaker.getCommandSenderName()); + + //Add to inventory if not full, else espawn in world + if (!this.mInventory.addItemStack(aPoop)) { + EntityItem entity = new EntityItem(worldObj, xCoord, yCoord+1.5, zCoord, aPoop); + worldObj.spawnEntityInWorld(entity); + } + + } + + + return false; + } + + private static AutoMap aEntityToDrain = new AutoMap(); + + @Override + public AutoMap aThingsToLookFor() { + if (aEntityToDrain.isEmpty()) { + aEntityToDrain.add(EntityAnimal.class); + aEntityToDrain.add(IAnimals.class); + } + return aEntityToDrain; + } + + @Override + public int onPostTick(V aPooMaker) { + if (this.tank.getFluidAmount() < this.tank.getCapacity()) { + int aPooAmount = 0; + // Vanilla Animals + if (aPooMaker instanceof EntityChicken) { + aPooAmount = MathUtils.randInt(1, 40); + } + else if (aPooMaker instanceof EntityHorse) { + aPooAmount = MathUtils.randInt(20, 40); + } + else if (aPooMaker instanceof EntityCow) { + aPooAmount = MathUtils.randInt(18, 45); + } + else if (aPooMaker instanceof EntityMooshroom) { + aPooAmount = 17; + } + else if (aPooMaker instanceof EntitySheep) { + aPooAmount = MathUtils.randInt(8, 30); + } + + else { + if (aPooMaker instanceof EntityAnimal || aPooMaker instanceof IAnimals) { + aPooAmount = MathUtils.randInt(5, 35); + } + else { + aPooAmount = MathUtils.randInt(1, 10); + } + } + aPooAmount = Math.max((Math.min(this.tank.getCapacity()-this.tank.getFluidAmount(), aPooAmount)/10), 1); + return aPooAmount; + } + else { + return 0; + } + } + + @Override + public Fluid fluidToProvide() { + return AgriculturalChem.PoopJuice; + } + + @Override + public ItemStack itemToSpawnInWorldIfTankIsFull() { + int a = MathUtils.randInt(0, 100); + ItemStack aItem = null; + if (a <= 30) { + aItem = ItemUtils.getSimpleStack(AgriculturalChem.dustDirt); + } + else if (a <= 40) { + aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); + } + else if (a <= 55) { + aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustTinyManureByproducts", 1); + } + return aItem; + } + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java new file mode 100644 index 0000000000..8c87baf6a9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java @@ -0,0 +1,288 @@ +package gtPlusPlus.core.tileentities.machines; + +import java.util.List; +import java.util.Vector; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +import gregtech.api.enums.ItemList; +import gregtech.common.items.GT_MetaGenerated_Item_01; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.container.Container_ProjectTable; +import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain; +import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput; +import gtPlusPlus.core.item.bauble.ModularBauble; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.BT; +import gtPlusPlus.core.util.minecraft.ModularArmourUtils.Modifiers; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; +import ic2.api.network.INetworkDataProvider; +import ic2.api.network.INetworkUpdateListener; +import ic2.api.tile.IWrenchable; +import ic2.core.IC2; + +public class TileEntityProjectTable extends TileEntity implements INetworkDataProvider, INetworkUpdateListener, IWrenchable{ + + public InventoryProjectMain inventoryGrid; + public InventoryProjectOutput inventoryOutputs; + + /** The crafting matrix inventory (3x3). */ + public InventoryCrafting craftMatrix; + public IInventory craftResult; + private Container_ProjectTable container; + + public TileEntityProjectTable(){ + this.inventoryGrid = new InventoryProjectMain();//number of slots - without product slot + this.inventoryOutputs = new InventoryProjectOutput();//number of slots - without product slot + this.canUpdate(); + } + + public void setContainer(Container_ProjectTable container){ + this.container = container; + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag){ + if(!nbt.hasKey(tag)) + { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt){ + super.writeToNBT(nbt); + nbt.setShort("facing", this.facing); + this.inventoryGrid.writeToNBT(this.getTag(nbt, "ContentsGrid")); + this.inventoryOutputs.writeToNBT(this.getTag(nbt, "ContentsOutput")); + + } + + @Override + public void readFromNBT(final NBTTagCompound nbt){ + super.readFromNBT(nbt); + this.prevFacing = (this.facing = nbt.getShort("facing")); + this.inventoryGrid.readFromNBT(nbt.getCompoundTag("ContentsGrid")); + this.inventoryOutputs.readFromNBT(nbt.getCompoundTag("ContentsOutput")); + } + + @Override + public List getNetworkedFields(){ + final List ret = new Vector(2); + ret.add("facing"); + return ret; + } + + + @Override + public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side){ + return false; + } + + private short facing = 0; + public short prevFacing = 0; + + @Override + public void setFacing(final short facing1){ + this.facing = facing1; + if (this.prevFacing != facing1) { + IC2.network.get().updateTileEntityField(this, "facing"); + } + this.prevFacing = facing1; + } + + @Override + public short getFacing(){ + return this.facing; + } + + + @Override + public boolean wrenchCanRemove(final EntityPlayer entityPlayer){ + return true; + } + + @Override + public float getWrenchDropRate(){ + return 1.0F; + } + + @Override + public ItemStack getWrenchDrop(final EntityPlayer entityPlayer){ + return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); + } + + @Override + public void onNetworkUpdate(final String field) { + this.prevFacing = this.facing; + + } + + @Override + public void updateEntity() { + if (!this.worldObj.isRemote){ + //Data stick + ItemStack dataStick = this.inventoryOutputs.getStackInSlot(0); + if (dataStick != null && this.container != null && container.getOutputContent() != null){ + if ((dataStick.getItem() instanceof GT_MetaGenerated_Item_01 && dataStick.getItemDamage() == 32708) + || (dataStick == ItemList.Tool_DataStick.get(1)) + || (dataStick == GregtechItemList.Old_Tool_DataStick.get(1)) + || (dataStick.getItem() instanceof MetaGeneratedGregtechItems && dataStick.getItemDamage() == 32208)){ + + Logger.INFO("Found Data Stick and valid container."); + + + ItemStack outputComponent = container.getOutputContent(); + ItemStack[] craftInputComponent = container.getInputComponents(); + + + ItemStack newStick = NBTUtils.writeItemsToNBT(dataStick, new ItemStack[]{outputComponent}, "Output"); + newStick = NBTUtils.writeItemsToNBT(newStick, craftInputComponent); + NBTUtils.setBookTitle(newStick, "Encrypted Project Data"); + NBTUtils.setBoolean(newStick, "mEncrypted", true); + int slotm=0; + Logger.WARNING("Uploading to Data Stick."); + for (ItemStack is : NBTUtils.readItemsFromNBT(newStick)){ + if (is != null){ + Logger.WARNING("Uploaded "+is.getDisplayName()+" into memory slot "+slotm+"."); + } + else { + Logger.WARNING("Left memory slot "+slotm+" blank."); + } + slotm++; + } + Logger.WARNING("Encrypting Data Stick."); + this.inventoryOutputs.setInventorySlotContents(1, newStick); + this.inventoryOutputs.setInventorySlotContents(0, null); + } + } + + //Utils.LOG_INFO("Doing thing 1"); + if (dataStick != null) + if (dataStick.getItem() instanceof ModularBauble){ + Logger.INFO("Doing thing 2"); + ItemStack tBauble = dataStick; + dataStick = null; + this.inventoryOutputs.setInventorySlotContents(0, dataStick); + if (this.inventoryGrid != null){ + Logger.INFO("Doing things"); + ItemStack[] tStack = container.getInputComponents(); + if (tStack != null){ + //Utils.LOG_INFO(""+tStack.length); + if (tBauble != null){ + for (int i=0;i 2222) { + aData = 2222; + } + String s = String.valueOf(aData); + StringBuilder aDataString = new StringBuilder(s); + int aIndex = aSide - 2; + if (aActive) { + aDataString.setCharAt(aIndex, '1'); + } + else { + aDataString.setCharAt(aIndex, '2'); + } + aData = Integer.valueOf(aDataString.toString()); + this.markDirty(); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + public boolean getSideActive(int aSide) { + this.markDirty(); + try { + if (aSide < 2) { + return false; + } + else { + if (aData < 1111) { + aData = 1111; + } + else if (aData > 2222) { + aData = 2222; + } + String s = String.valueOf(aData); + int aIndex = aSide - 2; + char ch = s.charAt(aIndex); + if (ch == '1') { + return true; + } + else { + return false; + } + + } + } + catch (Throwable t) { + t.printStackTrace(); + return false; + } + } + + @Override + public double getXPos() { + return this.locationX; + } + + @Override + public double getYPos() { + return this.locationY; + } + + @Override + public double getZPos() { + return this.locationZ; + } + + + + + + + + + // TODO + + + + /* + * Hopper Code + */ + + + private ItemStack[] aHopperInventory = new ItemStack[5]; + + public int getSizeInventory() { + return this.aHopperInventory.length; + } + + public ItemStack getStackInSlot(int aSlot) { + return this.aHopperInventory[aSlot]; + } + + /** + * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a + * new stack. + */ + public ItemStack decrStackSize(int aSlot, int aMinimumSizeOfExistingStack) + { + if (this.aHopperInventory[aSlot] != null) + { + ItemStack itemstack; + + if (this.aHopperInventory[aSlot].stackSize <= aMinimumSizeOfExistingStack) + { + itemstack = this.aHopperInventory[aSlot]; + this.aHopperInventory[aSlot] = null; + return itemstack; + } + else + { + itemstack = this.aHopperInventory[aSlot].splitStack(aMinimumSizeOfExistingStack); + + if (this.aHopperInventory[aSlot].stackSize == 0) + { + this.aHopperInventory[aSlot] = null; + } + + return itemstack; + } + } + else + { + return null; + } + } + + /** + * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - + * like when you close a workbench GUI. + */ + public ItemStack getStackInSlotOnClosing(int aSlot) + { + if (this.aHopperInventory[aSlot] != null) + { + ItemStack itemstack = this.aHopperInventory[aSlot]; + this.aHopperInventory[aSlot] = null; + return itemstack; + } + else + { + return null; + } + } + + /** + * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). + */ + public void setInventorySlotContents(int aSlot, ItemStack aStack) + { + this.aHopperInventory[aSlot] = aStack; + + if (aStack != null && aStack.stackSize > this.getInventoryStackLimit()) + { + aStack.stackSize = this.getInventoryStackLimit(); + } + } + + public boolean tryProcessItems() { + if (this.worldObj != null && !this.worldObj.isRemote) { + boolean didSomething = false; + if (!this.isEmpty()) { + Logger.WARNING("Has Items, Trying to push to all active directions."); + didSomething = this.tryPushItemsIntoNeighbours(); + } + if (didSomething) { + this.markDirty(); + return true; + } + } + return false; + } + + /** + * Is Empty + * @return + */ + private boolean isEmpty() { + ItemStack[] aitemstack = this.aHopperInventory; + int i = aitemstack.length; + + for (int j = 0; j < i; ++j) { + ItemStack itemstack = aitemstack[j]; + + if (itemstack != null) { + return false; + } + } + + return true; + } + + private boolean tryPushItemsIntoNeighbours() { + + boolean aDidPush = false; + + for (int u = 2; u < 6; u++) { + if (!this.getSideActive(u)) { + Logger.WARNING("Not pushing on side "+u); + continue; + } + + Logger.WARNING("Pushing on side "+u); + IInventory iinventory = this.getInventoryFromFacing(u); + + if (iinventory == null) { + Logger.WARNING("No inventory found."); + continue; + } + else { + + int i = Facing.oppositeSide[u]; + Logger.WARNING("Using Opposite direction: "+i); + + if (this.isInventoryFull(iinventory, i)) { + Logger.WARNING("Target is full, skipping."); + continue; + } + else { + Logger.WARNING("Target has space, let's move a single item."); + for (int j = 0; j < this.getSizeInventory(); ++j) { + if (this.getStackInSlot(j) != null) { + ItemStack itemstack = this.getStackInSlot(j).copy(); + ItemStack itemstack1 = setStackInNeighbour(iinventory, this.decrStackSize(j, 1), i); + if (itemstack1 == null || itemstack1.stackSize == 0) { + iinventory.markDirty(); + aDidPush = true; + continue; + } + this.setInventorySlotContents(j, itemstack); + } + } + } + } + } + + return aDidPush; + } + + private boolean isInventoryFull(IInventory aInv, int aSide) { + if (aInv instanceof ISidedInventory && aSide > -1) { + ISidedInventory isidedinventory = (ISidedInventory)aInv; + int[] aint = isidedinventory.getAccessibleSlotsFromSide(aSide); + + for (int l = 0; l < aint.length; ++l) + { + ItemStack itemstack1 = isidedinventory.getStackInSlot(aint[l]); + + if (itemstack1 == null || itemstack1.stackSize != itemstack1.getMaxStackSize()) + { + return false; + } + } + } + else { + int j = aInv.getSizeInventory(); + + for (int k = 0; k < j; ++k) + { + ItemStack itemstack = aInv.getStackInSlot(k); + + if (itemstack == null || itemstack.stackSize != itemstack.getMaxStackSize()) + { + return false; + } + } + } + return true; + } + + public static ItemStack setStackInNeighbour(IInventory aNeighbour, ItemStack aStack, int aSide) { + if (aNeighbour instanceof ISidedInventory && aSide > -1) + { + ISidedInventory isidedinventory = (ISidedInventory)aNeighbour; + int[] aint = isidedinventory.getAccessibleSlotsFromSide(aSide); + + for (int l = 0; l < aint.length && aStack != null && aStack.stackSize > 0; ++l) + { + aStack = tryMoveStack(aNeighbour, aStack, aint[l], aSide); + } + } + else + { + int j = aNeighbour.getSizeInventory(); + + for (int k = 0; k < j && aStack != null && aStack.stackSize > 0; ++k) + { + aStack = tryMoveStack(aNeighbour, aStack, k, aSide); + } + } + + if (aStack != null && aStack.stackSize == 0) + { + aStack = null; + } + + return aStack; + } + + private static boolean canInsertItemIntoNeighbour(IInventory aNeighbour, ItemStack aStack, int aSlot, int aSide) { + return !aNeighbour.isItemValidForSlot(aSlot, aStack) ? false : !(aNeighbour instanceof ISidedInventory) || ((ISidedInventory)aNeighbour).canInsertItem(aSlot, aStack, aSide); + } + + private static ItemStack tryMoveStack(IInventory aNeighbour, ItemStack aStack, int aSlot, int aSide) { + ItemStack itemstack1 = aNeighbour.getStackInSlot(aSlot); + if (canInsertItemIntoNeighbour(aNeighbour, aStack, aSlot, aSide)) { + boolean aDidSomething = false; + if (itemstack1 == null) { + //Forge: BUGFIX: Again, make things respect max stack sizes. + int max = Math.min(aStack.getMaxStackSize(), aNeighbour.getInventoryStackLimit()); + if (max >= aStack.stackSize) { + aNeighbour.setInventorySlotContents(aSlot, aStack); + aStack = null; + } + else { + aNeighbour.setInventorySlotContents(aSlot, aStack.splitStack(max)); + } + aDidSomething = true; + } + else if (areItemStacksEqual(itemstack1, aStack)) { + //Forge: BUGFIX: Again, make things respect max stack sizes. + int max = Math.min(aStack.getMaxStackSize(), aNeighbour.getInventoryStackLimit()); + if (max > itemstack1.stackSize) { + int l = Math.min(aStack.stackSize, max - itemstack1.stackSize); + aStack.stackSize -= l; + itemstack1.stackSize += l; + aDidSomething = l > 0; + } + } + if (aDidSomething){ + aNeighbour.markDirty(); + } + } + return aStack; + } + + private IInventory getInventoryFromFacing(int aSide) + { + int i = aSide; + return tryFindInvetoryAtXYZ(this.getWorldObj(), (double)(this.xCoord + Facing.offsetsXForSide[i]), (double)(this.yCoord + Facing.offsetsYForSide[i]), (double)(this.zCoord + Facing.offsetsZForSide[i])); + } + + public static IInventory tryFindInvetoryAtXYZ(World aWorld, double aX, double aY, double aZ) + { + IInventory iinventory = null; + int sX = MathHelper.floor_double(aX); + int sY = MathHelper.floor_double(aY); + int sZ = MathHelper.floor_double(aZ); + TileEntity tileentity = aWorld.getTileEntity(sX, sY, sZ); + + if (tileentity != null && tileentity instanceof IInventory) + { + iinventory = (IInventory)tileentity; + + if (iinventory instanceof TileEntityChest) + { + Block block = aWorld.getBlock(sX, sY, sZ); + + if (block instanceof BlockChest) + { + iinventory = ((BlockChest)block).func_149951_m(aWorld, sX, sY, sZ); + } + } + } + + if (iinventory == null) + { + List list = aWorld.getEntitiesWithinAABBExcludingEntity((Entity)null, AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1.0D, aY + 1.0D, aZ + 1.0D), IEntitySelector.selectInventories); + + if (list != null && list.size() > 0) + { + iinventory = (IInventory)list.get(aWorld.rand.nextInt(list.size())); + } + } + + return iinventory; + } + + private static boolean areItemStacksEqual(ItemStack aStack, ItemStack aStack2) { + return aStack.getItem() != aStack2.getItem() ? false : (aStack.getItemDamage() != aStack2.getItemDamage() ? false : (aStack.stackSize > aStack.getMaxStackSize() ? false : ItemStack.areItemStackTagsEqual(aStack, aStack2))); + } + + public void readFromNBT2(NBTTagCompound p_145839_1_) { + super.readFromNBT(p_145839_1_); + NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); + this.aHopperInventory = new ItemStack[this.getSizeInventory()]; + for (int i = 0; i < nbttaglist.tagCount(); ++i) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte b0 = nbttagcompound1.getByte("Slot"); + if (b0 >= 0 && b0 < this.aHopperInventory.length) { + this.aHopperInventory[b0] = ItemStack.loadItemStackFromNBT( + nbttagcompound1 + ); + } + } + } + + public void writeToNBT2(NBTTagCompound aNBT) { + super.writeToNBT(aNBT); + NBTTagList nbttaglist = new NBTTagList(); + for (int i = 0; i < this.aHopperInventory.length; ++i) { + if (this.aHopperInventory[i] != null) { + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + nbttagcompound1.setByte("Slot", (byte) i); + this.aHopperInventory[i].writeToNBT(nbttagcompound1); + nbttaglist.appendTag(nbttagcompound1); + } + } + aNBT.setTag("Items", nbttaglist); + } + + + + + + + +} diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java new file mode 100644 index 0000000000..ad7ec3d0b3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityTradeTable.java @@ -0,0 +1,133 @@ +package gtPlusPlus.core.tileentities.machines; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gtPlusPlus.core.container.Container_TradeTable; +import gtPlusPlus.core.inventories.tradetable.InventoryTradeMain; +import gtPlusPlus.core.inventories.tradetable.InventoryTradeOutput; +import gtPlusPlus.core.tileentities.base.TileEntityBase; +import gtPlusPlus.core.util.minecraft.NBTUtils; + +public class TileEntityTradeTable extends TileEntityBase { + + public InventoryTradeMain inventoryGrid; + public InventoryTradeOutput inventoryOutputs; + + private Container_TradeTable container; + + public TileEntityTradeTable(){ + super(2); + this.inventoryGrid = new InventoryTradeMain();//number of slots - without product slot + this.inventoryOutputs = new InventoryTradeOutput();//number of slots - without product slot + } + + public void setContainer(Container_TradeTable container_TradeTable){ + this.container = container_TradeTable; + } + + @Override + public void writeToNBT(final NBTTagCompound nbt){ + super.writeToNBT(nbt); + this.inventoryGrid.writeToNBT(this.getTag(nbt, "ContentsGrid")); + this.inventoryOutputs.writeToNBT(this.getTag(nbt, "ContentsOutput")); + + } + + @Override + public void readFromNBT(final NBTTagCompound nbt){ + this.inventoryGrid.readFromNBT(nbt); + this.inventoryOutputs.readFromNBT(nbt); + super.readFromNBT(nbt); + } + + @Override + public void updateEntity() { + if (!this.worldObj.isRemote){ + ItemStack slot0; + try{ + + slot0 = this.inventoryOutputs.getStackInSlot(0); + if (slot0 != null && slot0.hasTagCompound()){ + NBTUtils.tryIterateNBTData(slot0); + this.inventoryOutputs.setInventorySlotContents(0, null); + this.inventoryOutputs.setInventorySlotContents(1, slot0); + } + + } + catch (Throwable t){ + t.printStackTrace(); + this.inventoryOutputs.setInventorySlotContents(0, null); + } + + } + super.updateEntity(); + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { + + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { + return true; + } + + @Override + public void openInventory() { + + } + + @Override + public void closeInventory() { + + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java new file mode 100644 index 0000000000..a2db2326a9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java @@ -0,0 +1,172 @@ +package gtPlusPlus.core.tileentities.machines; + +import java.util.List; +import java.util.Vector; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCraftResult; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; + +import gtPlusPlus.core.inventories.InventoryWorkbenchChest; +import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; +import gtPlusPlus.core.inventories.InventoryWorkbenchTools; +import ic2.api.network.INetworkDataProvider; +import ic2.api.network.INetworkUpdateListener; +import ic2.api.tile.IWrenchable; +import ic2.core.IC2; + +public class TileEntityWorkbench extends TileEntity implements INetworkDataProvider, INetworkUpdateListener, IWrenchable{ + + //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. + + public InventoryWorkbenchChest inventoryChest; + public InventoryWorkbenchTools inventoryTool; + public InventoryWorkbenchHoloSlots inventoryHolo; + //public InventoryWorkbenchHoloCrafting inventoryCrafting; + + public IInventory inventoryCraftResult = new InventoryCraftResult(); + + public TileEntityWorkbench(){ + this.inventoryTool = new InventoryWorkbenchTools();//number of slots - without product slot + this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot + this.inventoryHolo = new InventoryWorkbenchHoloSlots(); + //this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); + this.canUpdate(); + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) + { + if(!nbt.hasKey(tag)) + { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) + { + super.writeToNBT(nbt); + + nbt.setShort("facing", this.facing); + + this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); + this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); + //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); + this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); + + // Write Crafting Matrix to NBT + final NBTTagList craftingTag = new NBTTagList(); + /*for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { + if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { + final NBTTagCompound tagCompound = new NBTTagCompound(); + tagCompound.setByte("Slot", (byte) currentIndex); + this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); + craftingTag.appendTag(tagCompound); + } + }*/ + + nbt.setTag("CraftingMatrix", craftingTag); + // Write craftingResult to NBT + if (this.inventoryCraftResult.getStackInSlot(0) != null) { + nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); + } + + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) + { + super.readFromNBT(nbt); + + this.prevFacing = (this.facing = nbt.getShort("facing")); + + this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); + this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); + //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); + this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); + + // Read in the Crafting Matrix from NBT + final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); + /*this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number + for (int i = 0; i < craftingTag.tagCount(); ++i) { + final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); + final byte slot = tagCompound.getByte("Slot"); + if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { + this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); + } + }*/ + + + // Read craftingResult from NBT + final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); + this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); + + } + + @Override + public List getNetworkedFields(){ + final List ret = new Vector(2); + ret.add("facing"); + return ret; + } + + + @Override + public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) + { + return false; + } + + private short facing = 0; + public short prevFacing = 0; + + @Override + public void setFacing(final short facing1) + { + this.facing = facing1; + if (this.prevFacing != facing1) { + IC2.network.get().updateTileEntityField(this, "facing"); + } + this.prevFacing = facing1; + } + + @Override + public short getFacing() + { + return this.facing; + } + + + @Override + public boolean wrenchCanRemove(final EntityPlayer entityPlayer) + { + return true; + } + + @Override + public float getWrenchDropRate() + { + return 1.0F; + } + + @Override + public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) + { + return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); + } + + @Override + public void onNetworkUpdate(final String field) { + + this.prevFacing = this.facing; + + } + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java new file mode 100644 index 0000000000..264323388f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java @@ -0,0 +1,245 @@ +package gtPlusPlus.core.tileentities.machines; + +import java.util.List; +import java.util.Vector; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryCraftResult; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; + +import gtPlusPlus.core.inventories.*; +import ic2.api.energy.event.EnergyTileLoadEvent; +import ic2.api.energy.event.EnergyTileUnloadEvent; +import ic2.api.energy.tile.IEnergySink; +import ic2.api.network.INetworkDataProvider; +import ic2.api.network.INetworkUpdateListener; +import ic2.api.tile.IWrenchable; +import ic2.core.IC2; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEntityWorkbenchAdvanced extends TileEntity implements IEnergySink, INetworkDataProvider, INetworkUpdateListener, IWrenchable{ + + //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. + + public InventoryWorkbenchChest inventoryChest; + public InventoryWorkbenchToolsElectric inventoryTool; + public InventoryWorkbenchHoloSlots inventoryHolo; + public InventoryWorkbenchHoloCrafting inventoryCrafting; + + public IInventory inventoryCraftResult = new InventoryCraftResult(); + + //Wrench Code + private short facing = 0; + public short prevFacing = 0; + + //E-Net Code + public double energy = 0.0D; + public int maxEnergy; + private boolean addedToEnergyNet = false; + private int tier; + private float guiChargeLevel; + + + public TileEntityWorkbenchAdvanced(final int maxenergy, final int tier1){ + this.inventoryTool = new InventoryWorkbenchToolsElectric();//number of slots - without product slot + this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot + this.inventoryHolo = new InventoryWorkbenchHoloSlots(); + this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); + this.canUpdate(); + + //Electric Stats + this.maxEnergy = maxenergy; + this.tier = tier1; + + } + + public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) + { + if(!nbt.hasKey(tag)) + { + nbt.setTag(tag, new NBTTagCompound()); + } + return nbt.getCompoundTag(tag); + } + + @Override + public void writeToNBT(final NBTTagCompound nbt) + { + super.writeToNBT(nbt); + nbt.setDouble("energy", this.energy); + nbt.setShort("facing", this.facing); + + this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); + this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); + //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); + this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); + + // Write Crafting Matrix to NBT + final NBTTagList craftingTag = new NBTTagList(); + for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { + if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { + final NBTTagCompound tagCompound = new NBTTagCompound(); + tagCompound.setByte("Slot", (byte) currentIndex); + this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); + craftingTag.appendTag(tagCompound); + } + } + + nbt.setTag("CraftingMatrix", craftingTag); + // Write craftingResult to NBT + if (this.inventoryCraftResult.getStackInSlot(0) != null) { + nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); + } + + } + + @Override + public void readFromNBT(final NBTTagCompound nbt) + { + super.readFromNBT(nbt); + this.energy = nbt.getDouble("energy"); + + this.prevFacing = (this.facing = nbt.getShort("facing")); + + this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); + this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); + //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); + this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); + + // Read in the Crafting Matrix from NBT + final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); + this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number + for (int i = 0; i < craftingTag.tagCount(); ++i) { + final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); + final byte slot = tagCompound.getByte("Slot"); + if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { + this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); + } + } + + + // Read craftingResult from NBT + final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); + this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); + + } + + @Override + public boolean acceptsEnergyFrom(final TileEntity emitter, final ForgeDirection direction) + { + return true; + } + + @Override + public double getDemandedEnergy() + { + return this.maxEnergy - this.energy; + } + + @Override + public int getSinkTier() + { + return this.tier; + } + + @Override + public double injectEnergy(final ForgeDirection directionFrom, final double amount, final double voltage) + { + if (this.energy >= this.maxEnergy) { + return amount; + } + this.energy += amount; + return 0.0D; + } + + public final float getChargeLevel() + { + return this.guiChargeLevel; + } + + public void setTier(final int tier1) + { + if (this.tier == tier1) { + return; + } + final boolean addedToENet = this.addedToEnergyNet; + if (addedToENet) + { + MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); + this.addedToEnergyNet = false; + } + this.tier = tier1; + + for (int i=0; i getNetworkedFields(){ + final List ret = new Vector(2); + ret.add("facing"); + return ret; + } + + + @Override + public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) + { + return false; + } + + @Override + public void setFacing(final short facing1) + { + this.facing = facing1; + if (this.prevFacing != facing1) { + IC2.network.get().updateTileEntityField(this, "facing"); + } + this.prevFacing = facing1; + } + + @Override + public short getFacing() + { + return this.facing; + } + + + @Override + public boolean wrenchCanRemove(final EntityPlayer entityPlayer) + { + return true; + } + + @Override + public float getWrenchDropRate() + { + return 1.0F; + } + + @Override + public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) + { + return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); + } + + @Override + public void onNetworkUpdate(final String field) { + + this.prevFacing = this.facing; + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/Utils.java b/src/main/java/gtPlusPlus/core/util/Utils.java new file mode 100644 index 0000000000..81b23e0b1c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/Utils.java @@ -0,0 +1,946 @@ +package gtPlusPlus.core.util; + +import java.awt.Color; +import java.awt.Graphics; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; + +import javax.xml.bind.DatatypeConverter; + +import org.apache.commons.lang3.EnumUtils; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.core.util.sys.SystemUtils; +import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; +import ic2.core.Ic2Items; +import ic2.core.init.InternalName; +import ic2.core.item.resources.ItemCell; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.IChatComponent; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.EnumHelper; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class Utils { + + public static final int WILDCARD_VALUE = Short.MAX_VALUE; + + public static final boolean isServer() { + return FMLCommonHandler.instance().getEffectiveSide().isServer(); + } + + public static final boolean isClient() { + return FMLCommonHandler.instance().getEffectiveSide().isClient(); + } + + static class ShortTimerTask extends TimerTask { + @Override + public void run() { + Logger.WARNING("Timer expired."); + } + } + + public static TC_AspectStack getTcAspectStack(final TC_Aspects aspect, final long size) { + return getTcAspectStack(aspect.name(), (int) size); + } + + public static TC_AspectStack getTcAspectStack(final String aspect, final long size) { + return getTcAspectStack(aspect, (int) size); + } + + public static TC_AspectStack getTcAspectStack(final TC_Aspects aspect, final int size) { + return getTcAspectStack(aspect.name(), size); + } + + public static TC_AspectStack getTcAspectStack(final String aspect, final int size) { + + TC_AspectStack returnValue = null; + + if (aspect.toUpperCase().equals("COGNITIO")) { + // Adds in Compat for older GT Versions which Misspell aspects. + try { + if (EnumUtils.isValidEnum(TC_Aspects.class, "COGNITIO")) { + Logger.WARNING("TC Aspect found - " + aspect); + returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITIO"), size); + } else { + Logger.INFO("Fallback TC Aspect found - " + aspect + + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); + returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITO"), size); + } + } catch (final NoSuchFieldError r) { + Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); + } + } else if (aspect.toUpperCase().equals("EXANIMUS")) { + // Adds in Compat for older GT Versions which Misspell aspects. + try { + if (EnumUtils.isValidEnum(TC_Aspects.class, "EXANIMUS")) { + Logger.WARNING("TC Aspect found - " + aspect); + returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXANIMUS"), size); + } else { + Logger.INFO("Fallback TC Aspect found - " + aspect + + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); + returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXAMINIS"), size); + } + } catch (final NoSuchFieldError r) { + Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); + } + + } else if (aspect.toUpperCase().equals("PRAECANTATIO")) { + // Adds in Compat for older GT Versions which Misspell aspects. + try { + if (EnumUtils.isValidEnum(TC_Aspects.class, "PRAECANTATIO")) { + Logger.WARNING("TC Aspect found - " + aspect); + returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTATIO"), size); + } else { + Logger.INFO("Fallback TC Aspect found - " + aspect + + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); + returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTIO"), size); + } + } catch (final NoSuchFieldError r) { + Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); + } + } else { + Logger.WARNING("TC Aspect found - " + aspect); + returnValue = new TC_AspectStack(TC_Aspects.valueOf(aspect), size); + } + + return returnValue; + } + + public static boolean containsMatch(final boolean strict, final ItemStack[] inputs, final ItemStack... targets) { + for (final ItemStack input : inputs) { + for (final ItemStack target : targets) { + if (itemMatches(target, input, strict)) { + return true; + } + } + } + return false; + } + + public static boolean itemMatches(final ItemStack target, final ItemStack input, final boolean strict) { + if ((input == null) || (target == null)) { + return false; + } + return ((target.getItem() == input.getItem()) && (((target.getItemDamage() == WILDCARD_VALUE) && !strict) + || (target.getItemDamage() == input.getItemDamage()))); + } + + //Register an event to both busses. + public static void registerEvent(Object o){ + MinecraftForge.EVENT_BUS.register(o); + FMLCommonHandler.instance().bus().register(o); + } + + public static void paintBox(final Graphics g, final int MinA, final int MinB, final int MaxA, final int MaxB) { + g.drawRect(MinA, MinB, MaxA, MaxB); + } + + // Send a message to all players on the server + public static void sendServerMessage(final String translationKey) { + sendServerMessage(new ChatComponentText(translationKey)); + } + + // Send a message to all players on the server + public static void sendServerMessage(final IChatComponent chatComponent) { + MinecraftServer.getServer().getConfigurationManager().sendChatMsg(chatComponent); + } + + /** + * Returns if that Liquid is IC2Steam. + */ + public static boolean isIC2Steam(final FluidStack aFluid) { + if (aFluid == null) { + return false; + } + return aFluid.isFluidEqual(getIC2Steam(1)); + } + + /** + * Returns a Liquid Stack with given amount of IC2Steam. + */ + public static FluidStack getIC2Steam(final long aAmount) { + return FluidRegistry.getFluidStack("ic2steam", (int) aAmount); + } + + /* + * public static void recipeBuilderBlock(ItemStack slot_1, ItemStack slot_2, + * ItemStack slot_3, ItemStack slot_4, ItemStack slot_5, ItemStack slot_6, + * ItemStack slot_7, ItemStack slot_8, ItemStack slot_9, Block resultBlock){ + * GameRegistry.addRecipe(new ItemStack(resultBlock), new Object[] {"ABC", + * "DEF", "GHI", 'A',slot_1,'B',slot_2,'C',slot_3, + * 'D',slot_4,'E',slot_5,'F',slot_6, 'G',slot_7,'H',slot_8,'I',slot_9 }); } + */ + + public static String checkCorrectMiningToolForBlock(final Block currentBlock, final World currentWorld) { + String correctTool = ""; + if (!currentWorld.isRemote) { + try { + correctTool = currentBlock.getHarvestTool(0); + Logger.WARNING(correctTool); + + } catch (final NullPointerException e) { + + } + } + + return correctTool; + } + + /** + * + * @param colourStr + * e.g. "#FFFFFF" + * @return String - formatted "rgb(0,0,0)" + */ + public static String hex2RgbFormatted(final String hexString) { + final Color c = new Color(Integer.valueOf(hexString.substring(1, 3), 16), + Integer.valueOf(hexString.substring(3, 5), 16), Integer.valueOf(hexString.substring(5, 7), 16)); + + final StringBuffer sb = new StringBuffer(); + sb.append("rgb("); + sb.append(c.getRed()); + sb.append(","); + sb.append(c.getGreen()); + sb.append(","); + sb.append(c.getBlue()); + sb.append(")"); + return sb.toString(); + } + + /** + * + * @param colourStr + * e.g. "#FFFFFF" + * @return + */ + public static Color hex2Rgb(final String colorStr) { + return new Color(Integer.valueOf(colorStr.substring(1, 3), 16), Integer.valueOf(colorStr.substring(3, 5), 16), + Integer.valueOf(colorStr.substring(5, 7), 16)); + } + + /** + * + * @param colourInt + * e.g. 0XFFFFFF + * @return Colour + */ + public static Color hex2Rgb(final int colourInt) { + return Color.decode(String.valueOf(colourInt)); + } + + /** + * + * @param colourInt + * e.g. 0XFFFFFF + * @return short[] + */ + public static short[] hex2RgbShort(final int colourInt) { + final Color rgb = Color.decode(String.valueOf(colourInt)); + final short[] rgba = { (short) rgb.getRed(), (short) rgb.getGreen(), (short) rgb.getBlue(), + (short) rgb.getAlpha() }; + return rgba; + } + + public static Timer ShortTimer(final int seconds) { + Timer timer; + timer = new Timer(); + timer.schedule(new ShortTimerTask(), seconds * 1000); + return timer; + } + + public static String byteToHex(final byte b) { + final int i = b & 0xFF; + return Integer.toHexString(i); + } + + public static Object[] convertListToArray(final List sourceList) { + final Object[] targetArray = sourceList.toArray(new Object[sourceList.size()]); + return targetArray; + } + + public static List convertArrayToFixedSizeList(final Object[] sourceArray) { + final List targetList = Arrays.asList(sourceArray); + return targetList; + } + + public static List convertArrayToList(final Object[] sourceArray) { + final List targetList = new ArrayList<>(Arrays.asList(sourceArray)); + return targetList; + } + + public static List convertArrayListToList(final ArrayList sourceArray) { + final List targetList = new ArrayList(Arrays.asList(sourceArray)); + return targetList; + } + + public static void spawnCustomParticle(final Entity entity) { + GTplusplus.proxy.generateMysteriousParticles(entity); + } + + public static void spawnFX(final World world, final int x, final int y, final int z, final String particleName, + Object particleName2) { + if (!world.isRemote) { + if ((particleName2 == null) || particleName2.equals("")) { + particleName2 = particleName; + } + final int l = MathUtils.randInt(0, 4); + final double d0 = x + 0.5F; + final double d1 = y + 0.7F; + final double d2 = z + 0.5F; + final double d3 = 0.2199999988079071D; + final double d4 = 0.27000001072883606D; + + if (l == 1) { + world.spawnParticle(particleName, d0 - d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D); + } else if (l == 2) { + world.spawnParticle((String) particleName2, d0 + d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D); + } else if (l == 3) { + world.spawnParticle(particleName, d0, d1 + d3, d2 - d4, 0.0D, 0.0D, 0.0D); + } else if (l == 4) { + world.spawnParticle((String) particleName2, d0, d1 + d3, d2 + d4, 0.0D, 0.0D, 0.0D); + } else { + world.spawnParticle(particleName, d0, d1, d2, 0.0D, 0.0D, 0.0D); + if (particleName2 != null) { + world.spawnParticle((String) particleName2, d0, d1, d2, 0.0D, 0.0D, 0.0D); + } + } + } + } + + public static int rgbtoHexValue(final int r, final int g, final int b) { + if ((r > 255) || (g > 255) || (b > 255) || (r < 0) || (g < 0) || (b < 0)) { + return 0; + } + final Color c = new Color(r, g, b); + String temp = Integer.toHexString(c.getRGB() & 0xFFFFFF).toUpperCase(); + temp = Utils.appenedHexNotationToString(String.valueOf(temp)); + Logger.WARNING("Made " + temp + " - Hopefully it's not a mess."); + Logger.WARNING("It will decode into " + Integer.decode(temp) + "."); + return Integer.decode(temp); + } + + /* + * http://javadevnotes.com/java-left-pad-string-with-zeros-examples + */ + public static String padWithZerosLefts(final String originalString, final int length) { + final StringBuilder sb = new StringBuilder(); + while ((sb.length() + originalString.length()) < length) { + sb.append('0'); + } + sb.append(originalString); + final String paddedString = sb.toString(); + return paddedString; + } + + public static String padWithZerosRight(final int value, final int length) { + String originalString = String.valueOf(value); + final StringBuilder sb = new StringBuilder(); + while ((sb.length() + originalString.length()) < length) { + sb.append('0'); + } + //sb.append(originalString); + if (sb.length() > 0) + originalString = (originalString + sb.toString()); + final String paddedString = sb.toString(); + return originalString; + } + + /* + * Original Code by Chandana Napagoda - + * https://cnapagoda.blogspot.com.au/2011/03/java-hex-color-code-generator. + * html + */ + public static Map hexColourGenerator(final int colorCount) { + final int maxColorValue = 16777215; + // this is decimal value of the "FFFFFF" + final int devidedvalue = maxColorValue / colorCount; + int countValue = 0; + final HashMap hexColorMap = new HashMap<>(); + for (int a = 0; (a < colorCount) && (maxColorValue >= countValue); a++) { + if (a != 0) { + countValue += devidedvalue; + hexColorMap.put(a, Integer.toHexString(0x10000 | countValue).substring(1).toUpperCase()); + } else { + hexColorMap.put(a, Integer.toHexString(0x10000 | countValue).substring(1).toUpperCase()); + } + } + return hexColorMap; + } + + /* + * Original Code by Chandana Napagoda - + * https://cnapagoda.blogspot.com.au/2011/03/java-hex-color-code-generator. + * html + */ + public static Map hexColourGeneratorRandom(final int colorCount) { + final HashMap hexColorMap = new HashMap<>(); + for (int a = 0; a < colorCount; a++) { + String code = "" + (int) (Math.random() * 256); + code = code + code + code; + final int i = Integer.parseInt(code); + hexColorMap.put(a, Integer.toHexString(0x1000000 | i).substring(1).toUpperCase()); + Logger.WARNING("" + Integer.toHexString(0x1000000 | i).substring(1).toUpperCase()); + } + return hexColorMap; + } + + public static String appenedHexNotationToString(final Object hexAsStringOrInt) { + final String hexChar = "0x"; + String result; + if (hexAsStringOrInt.getClass() == String.class) { + + if (((String) hexAsStringOrInt).length() != 6) { + final String temp = padWithZerosLefts((String) hexAsStringOrInt, 6); + result = temp; + } + result = hexChar + hexAsStringOrInt; + return result; + } else if (hexAsStringOrInt.getClass() == Integer.class || hexAsStringOrInt.getClass() == int.class) { + String aa = String.valueOf(hexAsStringOrInt); + if (aa.length() != 6) { + final String temp = padWithZerosLefts(aa, 6); + result = temp; + } + else { + result = hexChar + String.valueOf(hexAsStringOrInt); + } + return result; + } else { + return null; + } + } + + public static Integer appenedHexNotationToInteger(final int hexAsStringOrInt) { + final String hexChar = "0x"; + String result; + Logger.WARNING(String.valueOf(hexAsStringOrInt)); + result = hexChar + String.valueOf(hexAsStringOrInt); + return Integer.getInteger(result); + } + + public static boolean doesEntryExistAlreadyInOreDictionary(final String OreDictName) { + if (OreDictionary.getOres(OreDictName).size() != 0) { + return true; + } + return false; + } + + public static boolean invertBoolean(final boolean booleans) { + if (booleans == true) { + return false; + } + return true; + } + + public static File getMcDir() { + if (Utils.isClient()) { + if (Minecraft.getMinecraft() != null) { + return Minecraft.getMinecraft().mcDataDir; + } + } + return new File("."); + } + + private static short cellID = 15; + + public static ItemStack createInternalNameAndFluidCell(final String s) { + Logger.WARNING("1"); + final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]); + Logger.WARNING("2 " + yourName.name()); + final ItemCell item = (ItemCell) Ic2Items.cell.getItem(); + Logger.WARNING("3 " + item.getUnlocalizedName()); + try { + Logger.WARNING("4"); + final Class clz = item.getClass(); + Logger.WARNING("5 " + clz.getSimpleName()); + final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class); + Logger.WARNING("6 " + methode.getName()); + methode.setAccessible(true); + Logger.WARNING("7 " + methode.isAccessible()); + final ItemStack temp = (ItemStack) methode.invoke(item, cellID++, yourName, new Block[0]); + Logger.WARNING("Successfully created " + temp.getDisplayName() + "s."); + FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 1000), temp.copy(), + Ic2Items.cell.copy()); + ItemUtils.addItemToOreDictionary(temp.copy(), "cell" + s); + return temp; + } catch (final Exception e) { + e.printStackTrace(); + } + return null; + } + + public static ItemStack createInternalNameAndFluidCellNoOreDict(final String s) { + Logger.WARNING("1"); + final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]); + Logger.WARNING("2 " + yourName.name()); + final ItemCell item = (ItemCell) Ic2Items.cell.getItem(); + Logger.WARNING("3 " + item.getUnlocalizedName()); + try { + Logger.WARNING("4"); + final Class clz = item.getClass(); + Logger.WARNING("5 " + clz.getSimpleName()); + final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class); + Logger.WARNING("6 " + methode.getName()); + methode.setAccessible(true); + Logger.WARNING("7 " + methode.isAccessible()); + final ItemStack temp = (ItemStack) methode.invoke(item, cellID++, yourName, new Block[0]); + Logger.WARNING("Successfully created " + temp.getDisplayName() + "s."); + FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 1000), temp.copy(), + Ic2Items.cell.copy()); + // ItemUtils.addItemToOreDictionary(temp.copy(), "cell"+s); + return temp; + } catch (final Exception e) { + e.printStackTrace(); + } + return null; + } + + public static String sanitizeString(final String input, final char[] aDontRemove) { + + String output; + AutoMap aToRemoveMap = new AutoMap(); + + aToRemoveMap.put(" "); + aToRemoveMap.put("-"); + aToRemoveMap.put("_"); + aToRemoveMap.put("~"); + aToRemoveMap.put("?"); + aToRemoveMap.put("!"); + aToRemoveMap.put("@"); + aToRemoveMap.put("#"); + aToRemoveMap.put("$"); + aToRemoveMap.put("%"); + aToRemoveMap.put("^"); + aToRemoveMap.put("&"); + aToRemoveMap.put("*"); + aToRemoveMap.put("("); + aToRemoveMap.put(")"); + aToRemoveMap.put("{"); + aToRemoveMap.put("}"); + aToRemoveMap.put("["); + aToRemoveMap.put("]"); + aToRemoveMap.put(" "); + + for (String s : aToRemoveMap) { + for (char e : aDontRemove) { + if (s.charAt(0) == e) { + aToRemoveMap.remove("s"); + } + } + } + output = input; + for (String A : aToRemoveMap) { + output = output.replace(A, ""); + } + return output; + + } + + public static String sanitizeString(final String input) { + String temp; + String output; + + temp = input.replace(" ", ""); + temp = temp.replace("-", ""); + temp = temp.replace("_", ""); + temp = temp.replace("?", ""); + temp = temp.replace("!", ""); + temp = temp.replace("@", ""); + temp = temp.replace("#", ""); + temp = temp.replace("(", ""); + temp = temp.replace(")", ""); + temp = temp.replace("{", ""); + temp = temp.replace("}", ""); + temp = temp.replace("[", ""); + temp = temp.replace("]", ""); + temp = temp.replace(" ", ""); + output = temp; + return output; + + } + + public static String sanitizeStringKeepBrackets(final String input) { + String temp; + String output; + + temp = input.replace(" ", ""); + temp = temp.replace("-", ""); + temp = temp.replace("_", ""); + temp = temp.replace("?", ""); + temp = temp.replace("!", ""); + temp = temp.replace("@", ""); + temp = temp.replace("#", ""); + temp = temp.replace(" ", ""); + output = temp; + return output; + + } + + public static String[] parseVersion(final String version) { + return parseVersion(version, "//."); + } + + public static String[] parseVersion(final String version, final String delimiter) { + final String[] versionArray = version.split(delimiter); + return versionArray; + } + + public static Versioning compareModVersion(final String currentVersion, final String expectedVersion) { + return compareModVersion(currentVersion, expectedVersion, "//."); + } + + public static Versioning compareModVersion(final String currentVersion, final String expectedVersion, + final String delimiter) { + final String[] a = parseVersion(currentVersion, delimiter); + final String[] b = parseVersion(expectedVersion, delimiter); + final int[] c = new int[a.length]; + final int[] d = new int[b.length]; + for (int r = 0; r < a.length; r++) { + c[r] = Integer.parseInt(a[r]); + } + for (int r = 0; r < b.length; r++) { + d[r] = Integer.parseInt(b[r]); + } + final Versioning[] e = new Versioning[MathUtils.returnLargestNumber(c.length, d.length)]; + for (int r = 0; r < e.length; r++) { + + if (c[r] > d[r]) { + e[r] = Versioning.NEWER; + } else if (c[r] < d[r]) { + e[r] = Versioning.OLDER; + } else if (c[r] == d[r]) { + e[r] = Versioning.EQUAL; + } + } + + for (int r = 0; r < e.length; r++) { + if (e[0] == Versioning.NEWER) { + return Versioning.NEWER; + } else if (e[0] == Versioning.OLDER) { + return Versioning.OLDER; + } else { + if (e[r] == Versioning.OLDER) { + + } + + return Versioning.NEWER; + } + } + + return null; + } + + public static ToolMaterial generateToolMaterialFromGT(final Materials gtMaterial) { + final String name = Utils.sanitizeString(gtMaterial.mDefaultLocalName); + final int harvestLevel = gtMaterial.mToolQuality; + final int durability = gtMaterial.mDurability; + final float damage = gtMaterial.mToolQuality; + final int efficiency = (int) gtMaterial.mToolSpeed; + final int enchantability = gtMaterial.mEnchantmentToolsLevel; + final ToolMaterial temp = EnumHelper.addToolMaterial(name, harvestLevel, durability, efficiency, damage, + enchantability); + return temp; + + } + + public static ToolMaterial generateToolMaterial(final Material material) { + final String name = material.getLocalizedName(); + final int harvestLevel = material.vHarvestLevel; + final int durability = (int) material.vDurability; + final float damage = material.vToolQuality; + final int efficiency = material.vToolQuality; + // int enchantability = material.mEnchantmentToolsLevel; + Logger.INFO("ToolMaterial stats for " + material.getLocalizedName() + " | harvestLevel:" + harvestLevel + + " | durability:" + durability + " | toolQuality:" + damage + " | toolSpeed:" + damage); + final ToolMaterial temp = EnumHelper.addToolMaterial(name, harvestLevel, durability, efficiency, damage, 0); + return temp; + + } + + public static enum Versioning { + EQUAL(0), NEWER(1), OLDER(-1); + private final int versioningInfo; + + private Versioning(final int versionStatus) { + this.versioningInfo = versionStatus; + } + + public int getTexture() { + return this.versioningInfo; + } + } + + + public static ItemStack getWrittenBook(final ItemStack aBook, final int aID, final String aMapping, final String aTitle, final String aAuthor, + final String[] aPages) { + if (GT_Utility.isStringInvalid(aMapping)) { + return null; + } + ItemStack rStack = CORE.sBookList.get(aMapping); + if (rStack != null) { + return GT_Utility.copyAmount(1L, new Object[] { rStack }); + } + if ((GT_Utility.isStringInvalid(aTitle)) || (GT_Utility.isStringInvalid(aAuthor)) || (aPages.length <= 0)) { + return null; + } + final int vMeta = aID; + rStack = (aBook == null ? new ItemStack(ModItems.itemCustomBook, 1, vMeta) : aBook); + final NBTTagCompound tNBT = new NBTTagCompound(); + tNBT.setString("title", GT_LanguageManager.addStringLocalization( + new StringBuilder().append("Book.").append(aTitle).append(".Name").toString(), aTitle)); + tNBT.setString("author", aAuthor); + final NBTTagList tNBTList = new NBTTagList(); + for (byte i = 0; i < aPages.length; i = (byte) (i + 1)) { + aPages[i] = GT_LanguageManager + .addStringLocalization(new StringBuilder().append("Book.").append(aTitle).append(".Page") + .append((i < 10) ? new StringBuilder().append("0").append(i).toString() : Byte.valueOf(i)) + .toString(), aPages[i]); + if (i < 48) { + if (aPages[i].length() < 256) { + tNBTList.appendTag(new NBTTagString(aPages[i])); + } + else { + Logger.INFO("WARNING: String for written Book too long! -> "+aPages[i]); + GT_Log.err.println(new StringBuilder().append("WARNING: String for written Book too long! -> ") + .append(aPages[i]).toString()); + } + } else { + Logger.INFO("WARNING: Too much Pages for written Book! -> "+aTitle); + GT_Log.err.println(new StringBuilder().append("WARNING: Too much Pages for written Book! -> ") + .append(aTitle).toString()); + break; + } + } + tNBTList.appendTag(new NBTTagString(new StringBuilder().append("Credits to ").append(aAuthor) + .append(" for writing this Book. This was Book Nr. ").append(aID) + .append(" at its creation. Gotta get 'em all!").toString())); + tNBT.setTag("pages", tNBTList); + rStack.setTagCompound(tNBT); + GT_Log.out.println(new StringBuilder().append("GT++_Mod: Added Book to Book++ List - Mapping: '") + .append(aMapping).append("' - Name: '").append(aTitle).append("' - Author: '").append(aAuthor) + .append("'").toString()); + NBTUtils.createIntegerTagCompound(rStack, "stats", "mMeta", vMeta); + CORE.sBookList.put(aMapping, rStack); + Logger.INFO("Creating book: " + aTitle + " by " + aAuthor + ". Using Meta " + vMeta + "."); + return GT_Utility.copy(new Object[] { rStack }); + } + + @SuppressWarnings({ "unused", "unchecked" }) + public static Pair getGregtechVersion(){ + Pair version; + if (GT_Mod.VERSION == 509){ + Class clazz; + try { + + if (LoadedMods.BeyondRealityCore) { + //Safely assume it's Beyond Reality running .28-pre (If it's not, tough shit really?) + return new Pair(9, 28); + } + + clazz = (Class) ReflectionUtils.getClass("gregtech.GT_Mod"); + Field mSubversion = ReflectionUtils.getField(clazz, "SUBVERSION"); + if (mSubversion != null){ + int mSub = 0; + mSub = mSubversion.getInt(clazz); + if (mSub != 0){ + version = new Pair(9, mSub); + return version; + } + } + } + catch (Throwable t){ + + } + } + //5.08.33 + else if (GT_Mod.VERSION == 508){ + version = new Pair(8, 33); + return version; + + } + //5.07.07 + else if (GT_Mod.VERSION == 507){ + version = new Pair(7, 7); + return version; + + } + //Returb Bad Value + version = new Pair(0, 0); + return version; + } + + public static int getGregtechVersionAsInt(){ + Pair ver = getGregtechVersion(); + return 50000+(ver.getKey()*100)+(ver.getValue()); + } + + public static String getGregtechVersionAsString(){ + Pair ver = getGregtechVersion(); + return "5."+ver.getKey()+"."+ver.getValue(); + } + + public static int getGregtechSubVersion(){ + Pair ver = getGregtechVersion(); + return ver.getValue(); + } + + public static SecureRandom generateSecureRandom(){ + SecureRandom secRan; + String secRanType; + + if (SystemUtils.isWindows()){ + secRanType = "Windows-PRNG"; + } + else { + secRanType = "NativePRNG"; + } + try { + secRan = SecureRandom.getInstance(secRanType); + // Default constructor would have returned insecure SHA1PRNG algorithm, so make an explicit call. + byte[] b = new byte[64] ; + secRan.nextBytes(b); + return secRan; + } + catch (NoSuchAlgorithmException e) { + return null; + } + } + + + public static String calculateChecksumMD5(Object bytes) { + byte[] result = new byte[] {}; + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutput out = null; + try { + out = new ObjectOutputStream(bos); + out.writeObject(bytes); + out.flush(); + result = bos.toByteArray(); + } + catch (IOException e) { + } finally { + try { + bos.close(); + } + catch (IOException e) {} + } + return calculateChecksumMD5(result); + } + + public static String calculateChecksumMD5(byte[] bytes) { + MessageDigest md; + try { + md = MessageDigest.getInstance("MD5"); + md.update(bytes); + byte[] digest = md.digest(); + String myHash = DatatypeConverter.printHexBinary(digest).toUpperCase(); + return myHash; + } + catch (NoSuchAlgorithmException e) { + return null; + } + } + + public static boolean createNewMobSpawner(int aID, Entity aEntity) { + if (aEntity instanceof Entity) { + Class c = aEntity.getClass(); + return createNewMobSpawner(aID, c); + } + return false; + } + + public static boolean createNewMobSpawner(int aID, Class aEntity) { + Logger.INFO("[Spawn] Generating new spawner for entity with class ("+aEntity.getSimpleName()+")."); + if (TileEntityGenericSpawner.registerNewMobSpawner(aID, (Class) aEntity)) { + EntityRegistration x = EntityRegistry.instance().lookupModSpawn((Class) aEntity, true); + if (x != null) { + Logger.INFO("[Spawn] Registration for "+x.getEntityName()+" successful"); + return true; + } + else { + Logger.INFO("[Spawn] Registration for "+aEntity.getSimpleName()+" successful"); + return true; + } + } + Logger.INFO("[Spawn] Mob Spawner creation for "+aEntity.getName()+" failed"); + return false; + } + + public static long getMillisSince(long aStartTime, long aCurrentTime) { + return (aCurrentTime - aStartTime); + } + + public static long getSecondsFromMillis(long aMillis) { + return (aMillis/1000); + } + + public static long getTicksFromSeconds(long aSeconds) { + return (aSeconds*20); + } + + public static byte getTier(long l) { + byte i = -1; + do { + ++i; + if (i >= GT_Values.V.length) { + return i; + } + } while (l > GT_Values.V[i]); + i = (byte) MathUtils.getValueWithinRange(i, 0, 15); + return i; + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/data/AES.java b/src/main/java/gtPlusPlus/core/util/data/AES.java new file mode 100644 index 0000000000..1183cdd8e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/AES.java @@ -0,0 +1 @@ +\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u0020\u0067\u0074\u0050\u006c\u0075\u0073\u0050\u006c\u0075\u0073\u002e\u0063\u006f\u0072\u0065\u002e\u0075\u0074\u0069\u006c\u002e\u0064\u0061\u0074\u0061\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0069\u006f\u002e\u0055\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0045\u006e\u0063\u006f\u0064\u0069\u006e\u0067\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u006d\u0061\u0074\u0068\u002e\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u006e\u0069\u006f\u002e\u0063\u0068\u0061\u0072\u0073\u0065\u0074\u002e\u0053\u0074\u0061\u006e\u0064\u0061\u0072\u0064\u0043\u0068\u0061\u0072\u0073\u0065\u0074\u0073\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0073\u0065\u0063\u0075\u0072\u0069\u0074\u0079\u002e\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0073\u0065\u0063\u0075\u0072\u0069\u0074\u0079\u002e\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0041\u0072\u0072\u0061\u0079\u0073\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0042\u0061\u0073\u0065\u0036\u0034\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u0078\u002e\u0063\u0072\u0079\u0070\u0074\u006f\u002e\u0043\u0069\u0070\u0068\u0065\u0072\u003b\u000d\u000a\u0069\u006d\u0070\u006f\u0072\u0074\u0020\u006a\u0061\u0076\u0061\u0078\u002e\u0063\u0072\u0079\u0070\u0074\u006f\u002e\u0073\u0070\u0065\u0063\u002e\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u003b\u000d\u000a\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0041\u0045\u0053\u0020\u007b\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u003b\u003b\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u003b\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u006b\u0065\u0079\u003b\u0009\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0041\u0045\u0053\u0028\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0074\u0068\u0069\u0073\u0028\u0022\u0044\u0061\u0072\u006b\u006e\u0065\u0073\u0073\u0020\u0049\u006e\u0020\u0054\u0068\u0065\u0069\u0072\u0020\u0048\u0065\u0061\u0072\u0074\u0073\u0022\u0029\u003b\u0009\u0009\u000d\u000a\u0009\u007d\u0009\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0041\u0045\u0053\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u0053\u0065\u0063\u0072\u0065\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0073\u0065\u0063\u0072\u0065\u0074\u0020\u003d\u0020\u0061\u0053\u0065\u0063\u0072\u0065\u0074\u003b\u000d\u000a\u0009\u0009\u006b\u0065\u0079\u0020\u003d\u0020\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0067\u0065\u0074\u0048\u0061\u0073\u0068\u0065\u0064\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0073\u0065\u0063\u0072\u0065\u0074\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0020\u003d\u0020\u0067\u0065\u006e\u0065\u0072\u0061\u0074\u0065\u004b\u0065\u0079\u0028\u006b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0067\u0065\u0074\u0048\u0061\u0073\u0068\u0065\u0064\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u0053\u0074\u0072\u0069\u006e\u0067\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0074\u006f\u0048\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0067\u0065\u0074\u0053\u0048\u0041\u0028\u0061\u0053\u0074\u0072\u0069\u006e\u0067\u0029\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0067\u0065\u0074\u0053\u0048\u0041\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0069\u006e\u0070\u0075\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0020\u006d\u0064\u003b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u006d\u0064\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0053\u0048\u0041\u002d\u0032\u0035\u0036\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006d\u0064\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u0069\u006e\u0070\u0075\u0074\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0053\u0074\u0061\u006e\u0064\u0061\u0072\u0064\u0043\u0068\u0061\u0072\u0073\u0065\u0074\u0073\u002e\u0055\u0054\u0046\u005f\u0038\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u007b\u007d\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0074\u006f\u0048\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0068\u0061\u0073\u0068\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u0020\u006e\u0075\u006d\u0062\u0065\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0042\u0069\u0067\u0049\u006e\u0074\u0065\u0067\u0065\u0072\u0028\u0031\u002c\u0020\u0068\u0061\u0073\u0068\u0029\u003b\u000d\u000a\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0042\u0075\u0069\u006c\u0064\u0065\u0072\u0020\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0042\u0075\u0069\u006c\u0064\u0065\u0072\u0028\u006e\u0075\u006d\u0062\u0065\u0072\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0031\u0036\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u0077\u0068\u0069\u006c\u0065\u0020\u0028\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0028\u0029\u0020\u003c\u0020\u0033\u0032\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0069\u006e\u0073\u0065\u0072\u0074\u0028\u0030\u002c\u0020\u0027\u0030\u0027\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0068\u0065\u0078\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0061\u004b\u0065\u0079\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u003b\u000d\u000a\u0009\u0009\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u0020\u0073\u0068\u0061\u003b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0073\u0068\u0061\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0053\u0048\u0041\u002d\u0032\u0035\u0036\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0073\u0068\u0061\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u0061\u004b\u0065\u0079\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0053\u0074\u0061\u006e\u0064\u0061\u0072\u0064\u0043\u0068\u0061\u0072\u0073\u0065\u0074\u0073\u002e\u0055\u0054\u0046\u005f\u0038\u0029\u0029\u003b\u0020\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0031\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0065\u0031\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0009\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u0061\u004b\u0065\u0079\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0073\u0068\u0061\u0020\u003d\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u0044\u0069\u0067\u0065\u0073\u0074\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0053\u0048\u0041\u002d\u0031\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u0073\u0068\u0061\u002e\u0064\u0069\u0067\u0065\u0073\u0074\u0028\u006b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u0020\u003d\u0020\u0041\u0072\u0072\u0061\u0079\u0073\u002e\u0063\u006f\u0070\u0079\u004f\u0066\u0028\u006b\u0065\u0079\u002c\u0020\u0031\u0036\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0061\u004b\u0065\u0079\u0044\u0061\u0074\u0061\u003b\u000d\u000a\u0009\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u004e\u006f\u0053\u0075\u0063\u0068\u0041\u006c\u0067\u006f\u0072\u0069\u0074\u0068\u006d\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0055\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0045\u006e\u0063\u006f\u0064\u0069\u006e\u0067\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u007d\u0009\u0009\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u007b\u007d\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0072\u0069\u0076\u0061\u0074\u0065\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0020\u0067\u0065\u006e\u0065\u0072\u0061\u0074\u0065\u004b\u0065\u0079\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0061\u004b\u0065\u0079\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0053\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0053\u0070\u0065\u0063\u0028\u0061\u004b\u0065\u0079\u002c\u0020\u0022\u0041\u0045\u0053\u0022\u0029\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0065\u006e\u0063\u006f\u0064\u0065\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0074\u0072\u0054\u006f\u0045\u006e\u0063\u0072\u0079\u0070\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u0020\u003d\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0041\u0045\u0053\u002f\u0045\u0043\u0042\u002f\u0050\u004b\u0043\u0053\u0035\u0050\u0061\u0064\u0064\u0069\u006e\u0067\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0069\u006e\u0069\u0074\u0028\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0045\u004e\u0043\u0052\u0059\u0050\u0054\u005f\u004d\u004f\u0044\u0045\u002c\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0042\u0061\u0073\u0065\u0036\u0034\u002e\u0067\u0065\u0074\u0045\u006e\u0063\u006f\u0064\u0065\u0072\u0028\u0029\u002e\u0065\u006e\u0063\u006f\u0064\u0065\u0054\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0064\u006f\u0046\u0069\u006e\u0061\u006c\u0028\u0073\u0074\u0072\u0054\u006f\u0045\u006e\u0063\u0072\u0079\u0070\u0074\u002e\u0067\u0065\u0074\u0042\u0079\u0074\u0065\u0073\u0028\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0029\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0045\u0072\u0072\u006f\u0072\u0020\u0077\u0068\u0069\u006c\u0065\u0020\u0065\u006e\u0063\u0072\u0079\u0070\u0074\u0069\u006e\u0067\u003a\u0020\u0022\u0020\u002b\u0020\u0065\u002e\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0075\u006c\u006c\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u0009\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0063\u006f\u0064\u0065\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0074\u0072\u0054\u006f\u0044\u0065\u0063\u0072\u0079\u0070\u0074\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000d\u000a\u0009\u0009\u0009\u0043\u0069\u0070\u0068\u0065\u0072\u0020\u0063\u0069\u0070\u0068\u0065\u0072\u0020\u003d\u0020\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0022\u0041\u0045\u0053\u002f\u0045\u0043\u0042\u002f\u0050\u004b\u0043\u0053\u0035\u0050\u0041\u0044\u0044\u0049\u004e\u0047\u0022\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0069\u006e\u0069\u0074\u0028\u0043\u0069\u0070\u0068\u0065\u0072\u002e\u0044\u0045\u0043\u0052\u0059\u0050\u0054\u005f\u004d\u004f\u0044\u0045\u002c\u0020\u0073\u0065\u0063\u0072\u0065\u0074\u004b\u0065\u0079\u0029\u003b\u000d\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0065\u0077\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0028\u0063\u0069\u0070\u0068\u0065\u0072\u002e\u0064\u006f\u0046\u0069\u006e\u0061\u006c\u0028\u0042\u0061\u0073\u0065\u0036\u0034\u002e\u0067\u0065\u0074\u0044\u0065\u0063\u006f\u0064\u0065\u0072\u0028\u0029\u002e\u0064\u0065\u0063\u006f\u0064\u0065\u0028\u0073\u0074\u0072\u0054\u006f\u0044\u0065\u0063\u0072\u0079\u0070\u0074\u0029\u0029\u0029\u003b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u000d\u000a\u0009\u0009\u007d\u000d\u000a\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u006e\u0075\u006c\u006c\u003b\u000d\u000a\u0009\u007d\u000d\u000a\u007d \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/data/ArrayUtils.java b/src/main/java/gtPlusPlus/core/util/data/ArrayUtils.java new file mode 100644 index 0000000000..62f703f5f5 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/ArrayUtils.java @@ -0,0 +1,121 @@ +package gtPlusPlus.core.util.data; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class ArrayUtils { + + public static V[] expandArray(final V[] someArray, final V newValueToAdd) { + V[] series = someArray; + series = addElement(series, newValueToAdd); + return series; + } + + private static V[] addElement(V[] series, final V newValueToAdd) { + series = Arrays.copyOf(series, series.length + 1); + series[series.length - 1] = newValueToAdd; + return series; + } + + public static V[] insertElementAtIndex(V[] aArray, int aIndex, V aObjectToInsert) { + V[] newArray = Arrays.copyOf(aArray, aArray.length + 1); + for (int i=0;i Object getMostCommonElement(List list) { + Optional r = list.stream().map(V::getTextureSet).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().max(Map.Entry.comparingByValue()).map(Map.Entry::getKey); + return r.get(); + }*/ + + + public static Object[] removeNulls(final Object[] v) { + List list = new ArrayList(Arrays.asList(v)); + list.removeAll(Collections.singleton((Object)null)); + return list.toArray(new Object[list.size()]); + } + + public static ItemStack[] removeNulls(final ItemStack[] v) { + List list = new ArrayList(Arrays.asList(v)); + list.removeAll(Collections.singleton((ItemStack)null)); + return list.toArray(new ItemStack[list.size()]); + } + + @SuppressWarnings("unchecked") + public static Set combineSetData(Set S, Set J) { + Set mData = new HashSet(); + T[] array1 = (T[]) S.toArray(); + Collections.addAll(mData, array1); + T[] array2 = (T[]) J.toArray(); + Collections.addAll(mData, array2); + return mData; + } + + public static AutoMap mergeTwoMaps(AutoMap a, AutoMap b) { + AutoMap c = new AutoMap(); + for (A g : a.values()) { + c.put(g); + } + for (A g : b.values()) { + c.put(g); + } + return c; + } + + public static T[][] rotateArrayClockwise(T[][] mat) { + Logger.INFO("Rotating Array 90' Clockwise"); + try { + final int M = mat.length; + final int N = mat[0].length; + Logger.INFO("Dimension X: "+M); + Logger.INFO("Dimension Z: "+N); + @SuppressWarnings("unchecked") + T[][] ret = (T[][]) new Object[N][M]; + for (int r = 0; r < M; r++) { + for (int c = 0; c < N; c++) { + ret[c][M-1-r] = mat[r][c]; + } + } + Logger.INFO("Returning Rotated Array"); + return ret; + } + catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + public static String toString(Object[] aArray, String string) { + return org.apache.commons.lang3.ArrayUtils.toString(aArray, string); + } + + public static String toString(Object[] aArray) { + return org.apache.commons.lang3.ArrayUtils.toString(aArray); + } + + public static Object[] getArrayFromArrayList(ArrayList aArrayList) { + Object[] aGenericArray = new Object[aArrayList.size()]; + int aIndex = 0; + for (T object : aArrayList) { + aGenericArray[aIndex++] = object; + } + return aGenericArray; + } + +} + diff --git a/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java b/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java new file mode 100644 index 0000000000..edcc071b54 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java @@ -0,0 +1,51 @@ +package gtPlusPlus.core.util.data; + +import com.google.common.base.Enums; +import com.google.common.base.Optional; + +public class EnumUtils { + + /** + * Returns the value of an Enum if it exists. + * If value is not found, case-insensitive search will occur. + * If value still not found, an IllegalArgumentException is thrown. + **/ + public static > T getValue(Class enumeration, String name) { + Optional j = Enums.getIfPresent(enumeration, name); + T VALUE; + if (j == null || !j.isPresent()) { + VALUE = valueOfIgnoreCase(enumeration, name); + } + else { + VALUE = j.get(); + } + return VALUE; + } + + /** + * Finds the value of the given enumeration by name, case-insensitive. + * Throws an IllegalArgumentException if no match is found. + **/ + private static > T valueOfIgnoreCase(Class enumeration, String name) { + + for (T enumValue : enumeration.getEnumConstants()) { + if (enumValue.name().equalsIgnoreCase(name)) { + return enumValue; + } + } + + throw new IllegalArgumentException(String.format( + "There is no value with name '%s' in Enum %s", + name, enumeration.getName() + )); + } + + public static Object getValue(Class class1, String materialName, boolean bool) { + if (Enum.class.isInstance(class1)){ + return getValue(class1, materialName); + } + return null; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/data/FileUtils.java b/src/main/java/gtPlusPlus/core/util/data/FileUtils.java new file mode 100644 index 0000000000..bec5e0eeff --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/FileUtils.java @@ -0,0 +1,118 @@ +package gtPlusPlus.core.util.data; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.List; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.Utils; + +public class FileUtils { + + private static final Charset utf8 = StandardCharsets.UTF_8; + + public static boolean doesFileExist(File f) { + if (f != null && f.exists() && !f.isDirectory()) { + return true; + } + return false; + } + + public static File createFile(String path, String filename, String extension) { + File file = new File(Utils.getMcDir(), path + filename + extension); + return createFile(file); + } + + public static File createFile(File aFile) { + boolean blnCreated = false; + Logger.INFO("Trying to use path "+aFile.getPath()); + try { + Logger.INFO("Trying to use path "+aFile.getCanonicalPath()); + Logger.INFO("Trying to use absolute path "+aFile.getAbsolutePath()); + blnCreated = aFile.createNewFile(); + } catch (IOException ioe) { + Logger.INFO("Error while creating a new empty file :" + ioe); + return null; + } + return blnCreated ? aFile : null; + } + + public static File getFile(String filename, String extension) { + return getFile("", filename, extension); + } + + public static File getFile(String path, String filename, String extension) { + if (path == null || path.length() <= 0) { + path = ""; + } + else { + path = path + "/"; + } + if (filename == null || filename.length() <= 0) { + return null; + } + if (extension == null || extension.length() <= 0) { + extension = ".txt"; + } + else { + extension = "." + extension; + } + File file = new File(Utils.getMcDir(), path + filename + extension); + boolean doesExist = doesFileExist(file); + + if (doesExist) { + Logger.INFO("Found File: " + file.getAbsolutePath()); + return file; + } else { + Logger.INFO("Creating file, as it was not found."); + return createFile(path, filename, extension); + } + } + + public static boolean appendListToFile(File file, List content) { + try { + long oldSize; + long newSize; + if (doesFileExist(file)) { + Path p = Paths.get(file.getPath()); + if (p != null && Files.isWritable(p)) { + oldSize = Files.size(p); + try { + Files.write(p, content, utf8, StandardOpenOption.APPEND); + } catch (IOException e) { + e.printStackTrace(); + } + newSize = Files.size(p); + return newSize > oldSize; + } + } + } catch (IOException e) { + } + return false; + } + + /** + * Reads the contents of a file line by line to a List of Strings using the default encoding for the VM. + * The file is always closed. + * + * @param file the file to read, must not be {@code null} + * @return the list of Strings representing each line in the file, never {@code null} + * @throws IOException in case of an I/O error + * @since 1.3 + */ + public static List readLines(File file) { + try { + return org.apache.commons.io.FileUtils.readLines(file, utf8); + } + catch (IOException e) { + return new ArrayList(); + } + } +} diff --git a/src/main/java/gtPlusPlus/core/util/data/LocaleUtils.java b/src/main/java/gtPlusPlus/core/util/data/LocaleUtils.java new file mode 100644 index 0000000000..d1a35a661b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/LocaleUtils.java @@ -0,0 +1,90 @@ +package gtPlusPlus.core.util.data; + +import java.io.*; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.registry.GameData; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class LocaleUtils { + + public static boolean generateFakeLocaleFile() { + for (ModContainer modcontainer : Loader.instance().getModList()){ + if (modcontainer.getModId().toLowerCase().equals("miscutils")) { + String S = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; + writeToFile(S); + dumpItemsAndBlocksForModContainer(modcontainer); + } + } + return true; + } + + public static boolean dumpItemsAndBlocksForModContainer(ModContainer mod) { + writeToFile("Dumping Items from "+mod.getModId()+"."); + for (Object C : GameData.getItemRegistry()) { + + try { + + if (C != null) { + if (C instanceof Item) { + Item R = (Item) C; + ItemStack IS = ItemUtils.getSimpleStack(R); + String modid = ItemUtils.getModId(IS); + if (modid.equals("miscutils") || modid.equals("ToxicEverglades")) { + String S = "["+modid+"] "+IS.getUnlocalizedName()+".name="; + writeToFile(S); + } + } + } + + } + catch (Throwable T) {} + + } + writeToFile("Dumping Blocks from "+mod.getModId()+"."); + for (Object B : GameData.getBlockRegistry()) { + + try { + + if (B != null) { + if (B instanceof Block) { + Block R = (Block) B; + ItemStack IS = ItemUtils.getSimpleStack(R); + String modid = ItemUtils.getModId(IS); + if (modid.equals("miscutils") || modid.equals("ToxicEverglades")) { + String S = "["+modid+"] "+IS.getUnlocalizedName()+".name="; + writeToFile(S); + } + } + } + + } + catch (Throwable T) {} + + } + + + return true; + } + + public static void writeToFile(String S) { + try { + File F = new File(Utils.getMcDir(), "config/GTplusplus/en_US.lang"); + BufferedWriter writer; + writer = new BufferedWriter(new FileWriter(F, true)); + writer.write(S); + writer.newLine(); + writer.close(); + } + catch (IOException e) {} + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java b/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java new file mode 100644 index 0000000000..8415ab32fe --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java @@ -0,0 +1,49 @@ +package gtPlusPlus.core.util.data; + +import java.io.*; +import java.util.Date; + +public class LoggingUtils { + + public static void profileLog(final Object o) { + try { + String content; + final File file = new File("GregtechTimingsTC.txt"); + // if file doesnt exists, then create it + if (!file.exists()) { + file.createNewFile(); + final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); + final BufferedWriter bw = new BufferedWriter(fw); + bw.write("============================================================"); + bw.write(System.lineSeparator()); + bw.close(); + } + if (o instanceof String) { + content = (String) o; + } else { + content = o.toString(); + } + final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); + final BufferedWriter bw = new BufferedWriter(fw); + bw.write(content); + bw.write(System.lineSeparator()); + bw.close(); + System.out.println("Data Logged."); + + } catch (final IOException e) { + System.out.println("Data logging failed."); + } + } + + public static boolean logCurrentSystemTime(final String message) { + final Date date = new Date(System.currentTimeMillis()); + try { + profileLog(message + " | " + date.toString()); + return true; + } catch (final Throwable r) { + return false; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/data/StringUtils.java b/src/main/java/gtPlusPlus/core/util/data/StringUtils.java new file mode 100644 index 0000000000..2372d04c15 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/StringUtils.java @@ -0,0 +1,219 @@ +package gtPlusPlus.core.util.data; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.Utils; + +public class StringUtils { + + public static String superscript(String str) { + str = str.replaceAll("0", "\u2070"); + str = str.replaceAll("1", "\u00B9"); + str = str.replaceAll("2", "\u00B2"); + str = str.replaceAll("3", "\u00B3"); + str = str.replaceAll("4", "\u2074"); + str = str.replaceAll("5", "\u2075"); + str = str.replaceAll("6", "\u2076"); + str = str.replaceAll("7", "\u2077"); + str = str.replaceAll("8", "\u2078"); + str = str.replaceAll("9", "\u2079"); + return str; + } + + public static String subscript(String str) { + str = str.replaceAll("0", "\u2080"); + str = str.replaceAll("1", "\u2081"); + str = str.replaceAll("2", "\u2082"); + str = str.replaceAll("3", "\u2083"); + str = str.replaceAll("4", "\u2084"); + str = str.replaceAll("5", "\u2085"); + str = str.replaceAll("6", "\u2086"); + str = str.replaceAll("7", "\u2087"); + str = str.replaceAll("8", "\u2088"); + str = str.replaceAll("9", "\u2089"); + return str; + } + + public static boolean containsSuperOrSubScript(final String s){ + if (s.contains(StringUtils.superscript("0"))) { + return true; + } + else if (s.contains(StringUtils.superscript("1"))) { + return true; + } + else if (s.contains(StringUtils.superscript("2"))) { + return true; + } + else if (s.contains(StringUtils.superscript("3"))) { + return true; + } + else if (s.contains(StringUtils.superscript("4"))) { + return true; + } + else if (s.contains(StringUtils.superscript("5"))) { + return true; + } + else if (s.contains(StringUtils.superscript("6"))) { + return true; + } + else if (s.contains(StringUtils.superscript("7"))) { + return true; + } + else if (s.contains(StringUtils.superscript("8"))) { + return true; + } + else if (s.contains(StringUtils.superscript("9"))) { + return true; + } + if (s.contains(StringUtils.subscript("0"))) { + return true; + } + else if (s.contains(StringUtils.subscript("1"))) { + return true; + } + else if (s.contains(StringUtils.subscript("2"))) { + return true; + } + else if (s.contains(StringUtils.subscript("3"))) { + return true; + } + else if (s.contains(StringUtils.subscript("4"))) { + return true; + } + else if (s.contains(StringUtils.subscript("5"))) { + return true; + } + else if (s.contains(StringUtils.subscript("6"))) { + return true; + } + else if (s.contains(StringUtils.subscript("7"))) { + return true; + } + else if (s.contains(StringUtils.subscript("8"))) { + return true; + } + else if (s.contains(StringUtils.subscript("9"))) { + return true; + } + return false; + } + + //Can call this Enum for formatting. + public static enum TextUtils { + blue('1'), green('2'), teal('3'), maroon('4'), purple('5'), orange('6'), lightGray('7'), darkGray('8'), lightBlue( + '9'), black('0'), lime('a'), aqua('b'), red('c'), pink('d'), yellow('e'), white('f'); + + private char colourValue; + private TextUtils(final char value) { + this.colourValue = value; + } + public String colour() { + return getFormatter() + this.colourValue; + } + private String getFormatter() { + return "\u00A7"; // Returns §. + } + } + + public static String firstLetterCaps(String data) { + String firstLetter = data.substring(0,1).toUpperCase(); + String restLetters = data.substring(1).toLowerCase(); + return firstLetter + restLetters; + } + + public static String getDataStringFromArray(V[] parameterTypes) { + if (parameterTypes == null || parameterTypes.length == 0) { + return "empty/null"; + } + else { + String aData = ""; + for (V y : parameterTypes) { + if (y != null) { + aData += ", "+y.toString(); + } + } + return aData; + } + } + + + + /** + * Is this a special regex character for delimination? (.$|()[]{}^?*+\\) + * @param aChar - The char to test + * @return - Is this a special character? + */ + public static boolean isSpecialCharacter(char aChar) { + if (aChar == '"' || aChar == '.' || aChar == '$' || aChar == '|' || aChar == '(' || aChar == ')' || aChar == '[' + || aChar == ']' || aChar == '{' || aChar == '}' || aChar == '^' || aChar == '?' || aChar == '*' + || aChar == '+' || aChar == '\\') { + return true; + } + return false; + } + + public static boolean isEscaped(String aString) { + return aString.substring(0, 1).equals("\\"); + } + + public static String splitAndUppercase(String aInput, String aDelim) { + + if (!isEscaped(aDelim)) { + boolean isSpecial = false; + for (int o=0;o aTemp = new AutoMap(); + for (String s : aSplit) { + Logger.INFO("Found: "+s); + s = s.replace(".", ""); + s = Utils.sanitizeString(s); + s = firstLetterCaps(s); + Logger.INFO("Formatted & Captilized: "+s); + aTemp.put(s); + } + Logger.INFO("Rebuilding"); + String aReturn = ""; + for (String s : aTemp) { + aReturn += s; + Logger.INFO("Step: "+aReturn); + } + return aReturn; + } + } + + public static int characterCount(String aString, char aChar) { + return characterCount(aString, ""+aChar); + } + + public static int characterCount(String aString, String aChar) { + int aLength = aString.length(); + int aFound = 0; + if (aLength == 0 || !aString.contains(aChar)) { + return 0; + } + else { + for (int index = 0; index < aLength; index++) { + if (aString.substring(index, index+1).equals(aChar)) { + aFound++; + } + } + return aFound; + } + } +} diff --git a/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java b/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java new file mode 100644 index 0000000000..d6b32314b1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java @@ -0,0 +1,25 @@ +package gtPlusPlus.core.util.data; + +import java.nio.ByteBuffer; +import java.util.UUID; + +public class UUIDUtils { + + //UUID Methods below created by https://gist.github.com/jeffjohnson9046 + //https://gist.github.com/jeffjohnson9046/c663dd22bbe6bb0b3f5e + + public static byte[] getBytesFromUUID(UUID uuid) { + ByteBuffer bb = ByteBuffer.wrap(new byte[16]); + bb.putLong(uuid.getMostSignificantBits()); + bb.putLong(uuid.getLeastSignificantBits()); + return bb.array(); + } + + public static UUID getUUIDFromBytes(byte[] bytes) { + ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); + Long high = byteBuffer.getLong(); + Long low = byteBuffer.getLong(); + return new UUID(high, low); + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java new file mode 100644 index 0000000000..f8fc15c778 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.util.debug; + +import gtPlusPlus.preloader.CORE_Preloader; + +public class DEBUG_INIT { + + public static void registerBlocks(){ + //Debug Loading + if (CORE_Preloader.DEBUG_MODE){ + + } + } + + public static void registerItems(){ + /*ModItems.itemDebugShapeSpawner = new DEBUG_ITEM_ShapeSpawner("itemDebugShapeSpawner", AddToCreativeTab.tabMisc, 1, 500); + GameRegistry.registerItem(ModItems.itemDebugShapeSpawner, "itemDebugShapeSpawner"); + ModItems.itemBedLocator_Base = new BedLocator_Base("itemBedLocator_Base"); + GameRegistry.registerItem(ModItems.itemBedLocator_Base, "itemBedLocator_Base"); + ModItems.itemBaseItemWithCharge = new BaseItemWithCharge("itemBaseItemWithCharge", 0, 1000); + GameRegistry.registerItem(ModItems.itemBaseItemWithCharge, "itemBaseItemWithCharge");*/ + } + + public static void registerTEs(){ + + } + + public static void registerMisc(){ + + + + } + + public static void registerHandlers(){ + //MinecraftForge.EVENT_BUS.register(new DEBUG_ScreenOverlay()); + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java new file mode 100644 index 0000000000..d1e65afe3e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java @@ -0,0 +1,58 @@ +package gtPlusPlus.core.util.debug; + +import static net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK; + +import java.util.List; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.BaseItemGeneric; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; + +public class DEBUG_ITEM_ShapeSpawner extends BaseItemGeneric{ + + public DEBUG_ITEM_ShapeSpawner(String s, CreativeTabs c, int stackSize, int maxDmg) { + super(s, c, stackSize, maxDmg); + s = "itemDebugShapeSpawner"; + c = AddToCreativeTab.tabMisc; + stackSize = 1; + maxDmg = 500; + } + + @Override + public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer player){ + + if (!world.isRemote){ + Logger.INFO("Constructing the shape for the "+"VACUUM FREEZER"); + final Thread thread = new Thread(new DEBUG_TimerThread(world, player)); + thread.start(); + } + return stack; + } + + + + @SubscribeEvent + public void playerInteractEventHandler(final PlayerInteractEvent event) + { + if (event.isCanceled() || event.world.isRemote || (event.action != RIGHT_CLICK_BLOCK)) { + return; + } + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GOLD+"For Testing Gregtech Shapes!"); + super.addInformation(stack, aPlayer, list, bool); + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java new file mode 100644 index 0000000000..2e46b171f9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java @@ -0,0 +1,918 @@ +package gtPlusPlus.core.util.debug; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.ArrayList; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; + +import net.minecraftforge.fluids.FluidStack; + +public abstract class DEBUG_MULTIBLOCK_ShapeSpawner extends MetaTileEntity { + + public static boolean disableMaintenance; + public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false; + public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0; + public ItemStack[] mOutputItems = null; + public FluidStack[] mOutputFluids = null; + public ArrayList mInputHatches = new ArrayList<>(); + public ArrayList mOutputHatches = new ArrayList<>(); + public ArrayList mInputBusses = new ArrayList<>(); + public ArrayList mOutputBusses = new ArrayList<>(); + public ArrayList mDynamoHatches = new ArrayList<>(); + public ArrayList mMufflerHatches = new ArrayList<>(); + public ArrayList mEnergyHatches = new ArrayList<>(); + public ArrayList mMaintenanceHatches = new ArrayList<>(); + + public DEBUG_MULTIBLOCK_ShapeSpawner(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, 2); + DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + } + + public DEBUG_MULTIBLOCK_ShapeSpawner(final String aName) { + super(aName, 2); + DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + } + + public static boolean isValidMetaTileEntity(final MetaTileEntity aMetaTileEntity) { + return (aMetaTileEntity.getBaseMetaTileEntity() != null) && (aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity) && !aMetaTileEntity.getBaseMetaTileEntity().isDead(); + } + + @Override + public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex > 0; + } + + @Override + public int getProgresstime() { + return this.mProgresstime; + } + + @Override + public int maxProgresstime() { + return this.mMaxProgresstime; + } + + @Override + public int increaseProgress(final int aProgress) { + return aProgress; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mEUt", this.mEUt); + aNBT.setInteger("mProgresstime", this.mProgresstime); + aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime); + aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease); + aNBT.setInteger("mEfficiency", this.mEfficiency); + aNBT.setInteger("mPollution", this.mPollution); + aNBT.setInteger("mRuntime", this.mRuntime); + + if (this.mOutputItems != null) { + for (int i = 0; i < this.mOutputItems.length; i++) { + if (this.mOutputItems[i] != null) { + final NBTTagCompound tNBT = new NBTTagCompound(); + this.mOutputItems[i].writeToNBT(tNBT); + aNBT.setTag("mOutputItem" + i, tNBT); + } + } + } + if (this.mOutputFluids != null) { + for (int i = 0; i < this.mOutputFluids.length; i++) { + if (this.mOutputFluids[i] != null) { + final NBTTagCompound tNBT = new NBTTagCompound(); + this.mOutputFluids[i].writeToNBT(tNBT); + aNBT.setTag("mOutputFluids" + i, tNBT); + } + } + } + + aNBT.setBoolean("mWrench", this.mWrench); + aNBT.setBoolean("mScrewdriver", this.mScrewdriver); + aNBT.setBoolean("mSoftHammer", this.mSoftHammer); + aNBT.setBoolean("mHardHammer", this.mHardHammer); + aNBT.setBoolean("mSolderingTool", this.mSolderingTool); + aNBT.setBoolean("mCrowbar", this.mCrowbar); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mEUt = aNBT.getInteger("mEUt"); + this.mProgresstime = aNBT.getInteger("mProgresstime"); + this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); + if (this.mMaxProgresstime > 0) { + this.mRunningOnLoad = true; + } + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mEfficiency = aNBT.getInteger("mEfficiency"); + this.mPollution = aNBT.getInteger("mPollution"); + this.mRuntime = aNBT.getInteger("mRuntime"); + this.mOutputItems = new ItemStack[this.getAmountOfOutputs()]; + for (int i = 0; i < this.mOutputItems.length; i++) { + this.mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + } + this.mOutputFluids = new FluidStack[this.getAmountOfOutputs()]; + for (int i = 0; i < this.mOutputFluids.length; i++) { + this.mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i); + } + this.mWrench = aNBT.getBoolean("mWrench"); + this.mScrewdriver = aNBT.getBoolean("mScrewdriver"); + this.mSoftHammer = aNBT.getBoolean("mSoftHammer"); + this.mHardHammer = aNBT.getBoolean("mHardHammer"); + this.mSolderingTool = aNBT.getBoolean("mSolderingTool"); + this.mCrowbar = aNBT.getBoolean("mCrowbar"); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); + } + + @Override + public byte getTileEntityBaseType() { + return 2; + } + + @Override + public void onMachineBlockUpdate() { + this.mUpdate = 50; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mEfficiency < 0) { + this.mEfficiency = 0; + } + if ((--this.mUpdate == 0) || (--this.mStartUpCheck == 0)) { + this.mInputHatches.clear(); + this.mInputBusses.clear(); + this.mOutputHatches.clear(); + this.mOutputBusses.clear(); + this.mDynamoHatches.clear(); + this.mEnergyHatches.clear(); + this.mMufflerHatches.clear(); + this.mMaintenanceHatches.clear(); + this.mMachine = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]); + } + if (this.mStartUpCheck < 0) { + if (this.mMachine) { + for (final GT_MetaTileEntity_Hatch_Maintenance tHatch : this.mMaintenanceHatches) { + if (isValidMetaTileEntity(tHatch)) { + if (!DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance) { + if (tHatch.mWrench) { + this.mWrench = true; + } + if (tHatch.mScrewdriver) { + this.mScrewdriver = true; + } + if (tHatch.mSoftHammer) { + this.mSoftHammer = true; + } + if (tHatch.mHardHammer) { + this.mHardHammer = true; + } + if (tHatch.mSolderingTool) { + this.mSolderingTool = true; + } + if (tHatch.mCrowbar) { + this.mCrowbar = true; + } + } else { + this.mWrench = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mHardHammer = true; + this.mSolderingTool = true; + this.mCrowbar = true; + } + + tHatch.mWrench = false; + tHatch.mScrewdriver = false; + tHatch.mSoftHammer = false; + tHatch.mHardHammer = false; + tHatch.mSolderingTool = false; + tHatch.mCrowbar = false; + } + } + if (this.getRepairStatus() > 0) { + if ((this.mMaxProgresstime > 0) && this.doRandomMaintenanceDamage()) { + if (this.onRunningTick(this.mInventory[1])) { + if (!this.polluteEnvironment(this.getPollutionPerTick(this.mInventory[1]))) { + this.stopMachine(); + } + if ((this.mMaxProgresstime > 0) && (++this.mProgresstime >= this.mMaxProgresstime)) { + if (this.mOutputItems != null) { + for (final ItemStack tStack : this.mOutputItems) { + if (tStack != null) { + try { + GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack); + } catch (final Exception e) { + } + this.addOutput(tStack); + } + } + } + if ((this.mOutputFluids != null) && (this.mOutputFluids.length == 1)) { + for (final FluidStack tStack : this.mOutputFluids) { + if (tStack != null) { + this.addOutput(tStack); + } + } + } else if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 1)) { + this.addFluidOutputs(this.mOutputFluids); + } + this.mEfficiency = Math.max(0, Math.min(this.mEfficiency + this.mEfficiencyIncrease, this.getMaxEfficiency(this.mInventory[1]) - ((this.getIdealStatus() - this.getRepairStatus()) * 1000))); + this.mOutputItems = null; + this.mProgresstime = 0; + this.mMaxProgresstime = 0; + this.mEfficiencyIncrease = 0; + if (aBaseMetaTileEntity.isAllowedToWork()) { + this.checkRecipe(this.mInventory[1]); + } + if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 0)) { + if (this.mOutputFluids.length > 1) { + GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); + } + } + } + } + } else { + if (((aTick % 100) == 0) || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { + + if (aBaseMetaTileEntity.isAllowedToWork()) { + this.checkRecipe(this.mInventory[1]); + } + if (this.mMaxProgresstime <= 0) { + this.mEfficiency = Math.max(0, this.mEfficiency - 1000); + } + } + } + } else { + this.stopMachine(); + } + } else { + this.stopMachine(); + } + } + aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (this.mWrench ? 0 : 1) | (this.mScrewdriver ? 0 : 2) | (this.mSoftHammer ? 0 : 4) | (this.mHardHammer ? 0 : 8) | (this.mSolderingTool ? 0 : 16) | (this.mCrowbar ? 0 : 32) | (this.mMachine ? 0 : 64)); + aBaseMetaTileEntity.setActive(this.mMaxProgresstime > 0); + } + } + + public boolean polluteEnvironment(final int aPollutionLevel) { + this.mPollution += aPollutionLevel; + for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + if (this.mPollution >= 10000) { + if (tHatch.polluteEnvironment()) { + this.mPollution -= 10000; + } + } else { + break; + } + } + } + return this.mPollution < 10000; + } + + /** + * Called every tick the Machine runs + */ + public boolean onRunningTick(final ItemStack aStack) { + if (this.mEUt > 0) { + this.addEnergyOutput(((long) this.mEUt * this.mEfficiency) / 10000); + return true; + } + if (this.mEUt < 0) { + if (!this.drainEnergyInput(((long) -this.mEUt * 10000) / Math.max(1000, this.mEfficiency))) { + this.stopMachine(); + return false; + } + } + return true; + } + + /** + * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example) + */ + public abstract boolean isCorrectMachinePart(ItemStack aStack); + + /** + * Checks the Recipe + */ + public abstract boolean checkRecipe(ItemStack aStack); + + /** + * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here. + */ + public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack); + + /** + * Gets the maximum Efficiency that spare Part can get (0 - 10000) + */ + public abstract int getMaxEfficiency(ItemStack aStack); + + /** + * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block) + */ + public abstract int getPollutionPerTick(ItemStack aStack); + + /** + * Gets the damage to the ItemStack, usually 0 or 1. + */ + public abstract int getDamageToComponent(ItemStack aStack); + + /** + * Gets the Amount of possibly outputted Items for loading the Output Stack Array from NBT. + * This should be the largest Amount that can ever happen legitimately. + */ + public abstract int getAmountOfOutputs(); + + /** + * If it explodes when the Component has to be replaced. + */ + public abstract boolean explodesOnComponentBreak(ItemStack aStack); + + public void stopMachine() { + this.mOutputItems = null; + this.mEUt = 0; + this.mEfficiency = 0; + this.mProgresstime = 0; + this.mMaxProgresstime = 0; + this.mEfficiencyIncrease = 0; + this.getBaseMetaTileEntity().disableWorking(); + } + + public int getRepairStatus() { + return (this.mWrench ? 1 : 0) + (this.mScrewdriver ? 1 : 0) + (this.mSoftHammer ? 1 : 0) + (this.mHardHammer ? 1 : 0) + (this.mSolderingTool ? 1 : 0) + (this.mCrowbar ? 1 : 0); + } + + public int getIdealStatus() { + return 6; + } + + public boolean doRandomMaintenanceDamage() { + if (!this.isCorrectMachinePart(this.mInventory[1]) || (this.getRepairStatus() == 0)) { + this.stopMachine(); + return false; + } + if (this.mRuntime++ > 1000) { + this.mRuntime = 0; + if (this.getBaseMetaTileEntity().getRandomNumber(6000) == 0) { + switch (this.getBaseMetaTileEntity().getRandomNumber(6)) { + case 0: + this.mWrench = false; + break; + case 1: + this.mScrewdriver = false; + break; + case 2: + this.mSoftHammer = false; + break; + case 3: + this.mHardHammer = false; + break; + case 4: + this.mSolderingTool = false; + break; + case 5: + this.mCrowbar = false; + break; + } + } + if ((this.mInventory[1] != null) && (this.getBaseMetaTileEntity().getRandomNumber(2) == 0) && !this.mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) { + if (this.mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { + final NBTTagCompound tNBT = this.mInventory[1].getTagCompound(); + if (tNBT != null) { + NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents"); + if (!tNBT.getBoolean("mDis")) { + tNBT2 = new NBTTagCompound(); + final Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[1]); + final ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1); + final int i = this.mInventory[1].getItemDamage(); + if (i == 170) { + ItemStack tStack = GT_Utility.copyAmount(1, tTurbine); + tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); + tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1); + tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); + } else if (i == 172) { + ItemStack tStack = GT_Utility.copyAmount(1, tTurbine); + tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound())); + tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1); + tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); + } else if (i == 174) { + ItemStack tStack = GT_Utility.copyAmount(2, tTurbine); + tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound())); + tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1); + tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); + } else if (i == 176) { + ItemStack tStack = GT_Utility.copyAmount(2, tTurbine); + tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound())); + tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound())); + tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1); + tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound())); + } + tNBT.setTag("GT.CraftingComponents", tNBT2); + tNBT.setBoolean("mDis", true); + this.mInventory[1].setTagCompound(tNBT); + + } + } + + ((GT_MetaGenerated_Tool) this.mInventory[1].getItem()).doDamage(this.mInventory[1], (long) Math.min(this.mEUt / 5, Math.pow(this.mEUt, 0.7))); + if (this.mInventory[1].stackSize == 0) { + this.mInventory[1] = null; + } + } + } + } + return true; + } + + public void explodeMultiblock() { + this.mInventory[1] = null; + for (final MetaTileEntity tTileEntity : this.mInputBusses) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mOutputBusses) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mInputHatches) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mOutputHatches) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mDynamoHatches) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mMufflerHatches) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mEnergyHatches) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + for (final MetaTileEntity tTileEntity : this.mMaintenanceHatches) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]); + } + this.getBaseMetaTileEntity().doExplosion(V[8]); + } + + public boolean addEnergyOutput(final long aEU) { + if (aEU <= 0) { + return true; + } + for (final GT_MetaTileEntity_Hatch_Dynamo tHatch : this.mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) { + return true; + } + } + } + return false; + } + + public long getMaxInputVoltage() { + long rVoltage = 0; + for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); + } + } + return rVoltage; + } + + public boolean drainEnergyInput(final long aEU) { + if (aEU <= 0) { + return true; + } + for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) { + return true; + } + } + } + return false; + } + + public boolean addOutput(final FluidStack aLiquid) { + if (aLiquid == null) { + return false; + } + final FluidStack tLiquid = aLiquid.copy(); + for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { + if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { + final int tAmount = tHatch.fill(tLiquid, false); + if (tAmount >= tLiquid.amount) { + return tHatch.fill(tLiquid, true) >= tLiquid.amount; + } else if (tAmount > 0) { + tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); + } + } + } + return false; + } + + private void addFluidOutputs(final FluidStack[] mOutputFluids2) { + for (int i = 0; i < mOutputFluids2.length; i++) { + if ((this.mOutputHatches.size() > i) && (this.mOutputHatches.get(i) != null) && (mOutputFluids2[i] != null) && isValidMetaTileEntity(this.mOutputHatches.get(i))) { + this.mOutputHatches.get(i).fill(mOutputFluids2[i], true); + } + } + + } + + public boolean depleteInput(final FluidStack aLiquid) { + if (aLiquid == null) { + return false; + } + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + FluidStack tLiquid = tHatch.getFluid(); + if ((tLiquid != null) && tLiquid.isFluidEqual(aLiquid)) { + tLiquid = tHatch.drain(aLiquid.amount, false); + if ((tLiquid != null) && (tLiquid.amount >= aLiquid.amount)) { + tLiquid = tHatch.drain(aLiquid.amount, true); + return (tLiquid != null) && (tLiquid.amount >= aLiquid.amount); + } + } + } + } + return false; + } + + public boolean addOutput(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) { + return false; + } + aStack = GT_Utility.copy(aStack); + // FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); + // if (aLiquid == null) { + for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) { + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getSizeInventory() - 1; i >= 0; i--) { + if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, aStack)) { + return true; + } + } + } + } + for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { + if (isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) { + if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, aStack)) { + return true; + } + } + } + // }else { + // for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { + // if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) { + // int tAmount = tHatch.fill(aLiquid, false); + // if (tAmount >= aLiquid.amount) { + // return tHatch.fill(aLiquid, true) >= aLiquid.amount; + // } + // } + // } + // } + return false; + } + + public boolean depleteInput(final ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) { + return false; + } + final FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); + if (aLiquid != null) { + return this.depleteInput(aLiquid); + } + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { + tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); + return true; + } + } + } + } + for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { + tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); + return true; + } + } + } + } + } + return false; + } + + public ArrayList getStoredOutputs() { + final ArrayList rList = new ArrayList<>(); + for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { + if (isValidMetaTileEntity(tHatch)) { + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); + } + } + for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) { + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + return rList; + } + + public ArrayList getStoredFluids() { + final ArrayList rList = new ArrayList<>(); + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch) && (tHatch.getFillableStack() != null)) { + rList.add(tHatch.getFillableStack()); + } + } + return rList; + } + + public ArrayList getStoredInputs() { + final ArrayList rList = new ArrayList<>(); + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch) && (tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null)) { + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0)); + } + } + for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) { + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + } + return rList; + } + + public GT_Recipe_Map getRecipeMap() { + return null; + } + + public void updateSlots() { + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + if (isValidMetaTileEntity(tHatch)) { + tHatch.updateSlots(); + } + } + for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) { + if (isValidMetaTileEntity(tHatch)) { + tHatch.updateSlots(); + } + } + } + + public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { + return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); + } + return false; + } + + public boolean addMaintenanceToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); + } + return false; + } + + public boolean addEnergyInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); + } + return false; + } + + public boolean addDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity); + } + return false; + } + + public boolean addMufflerToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); + } + return false; + } + + public boolean addInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap(); + return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = this.getRecipeMap(); + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); + } + return false; + } + + public boolean addOutputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + } + return false; + } + + @Override + public String[] getInfoData() { + return new String[]{"Progress:", (this.mProgresstime / 20) + "secs", (this.mMaxProgresstime / 20) + "secs", "Efficiency:", (this.mEfficiency / 100.0F) + "%", "Problems:", "" + (this.getIdealStatus() - this.getRepairStatus())}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java new file mode 100644 index 0000000000..1c6a8e9278 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java @@ -0,0 +1,47 @@ +package gtPlusPlus.core.util.debug; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.item.Item; + +import net.minecraftforge.client.event.RenderGameOverlayEvent; + +public class DEBUG_ScreenOverlay extends Gui { + + int width, height; + Minecraft mc = Minecraft.getMinecraft(); + + @SubscribeEvent + public void eventHandler(final RenderGameOverlayEvent.Text event) + { + + //if (mc.thePlayer.getHeldItem().equals(ModItems.itemStaballoyPickaxe)){ + final ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); + final FontRenderer fontRender = this.mc.fontRenderer; + this.width = res.getScaledWidth(); + this.height = res.getScaledHeight(); + Minecraft.getMinecraft().entityRenderer.setupOverlayRendering(); + final String str = "Words"; + Item heldItem = null; + + try{heldItem = this.mc.thePlayer.getHeldItem().getItem(); + + if (heldItem != null){ + /*if (heldItem instanceof StaballoyPickaxe){ + + int dmg =((StaballoyPickaxe) heldItem).getDamage(((StaballoyPickaxe) heldItem).thisPickaxe); + + ((StaballoyPickaxe) heldItem).checkFacing(((StaballoyPickaxe) heldItem).localWorld); + str = "DAMAGE: "+ dmg +" | FACING: "+((StaballoyPickaxe) heldItem).FACING+" | FACING_HORIZONTAL: "+((StaballoyPickaxe) heldItem).FACING_HORIZONTAL+" | LOOKING DIRECTION: "+((StaballoyPickaxe) heldItem).lookingDirection; + + drawString(fontRender, str, (this.width - fontRender.getStringWidth(str)) / 2, this.height / 10, 0xFFAA00); + }*/ + } + }catch(final NullPointerException e){} + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java new file mode 100644 index 0000000000..50d12871cb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java @@ -0,0 +1,64 @@ +package gtPlusPlus.core.util.debug; + +import java.util.concurrent.TimeUnit; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import net.minecraftforge.common.util.ForgeDirection; + +public class DEBUG_TimerThread implements Runnable { + + private final World world; + private final EntityPlayer player; + + + public DEBUG_TimerThread(final World WORLD, final EntityPlayer PLAYER) { + this.world = WORLD; + this.player = PLAYER; + } + + @Override + public void run(){ + int xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX; + int zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ; + + final int stepX = Minecraft.getMinecraft().objectMouseOver.blockX; + final int stepY = Minecraft.getMinecraft().objectMouseOver.blockY; + final int stepZ = Minecraft.getMinecraft().objectMouseOver.blockZ; + Logger.INFO("Clicked on a Block @ "+"[X:"+stepX+"][Y:"+stepY+"][Z:"+stepZ+"]"+" with xDir:"+xDir+" zDir:"+zDir); + this.world.setBlock(stepX, stepY, stepZ, Blocks.bedrock,0,3); + Logger.INFO("Makng it Bedrock for future investment."); + //for (int i = -1; i <= 1; i++) { + //stepX = stepX+i; + for (int i = stepX-1; i <= (stepX+1); i++){ + for (int j = stepZ-1; j <= (stepZ+1); j++){ + for (int h = stepY-1; h <= (stepY+1); h++){ + + xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX; + zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ; + + //for (int j = -1; j <= 1; j++) { + //stepZ = stepZ+j; + //for (int h = -1; h <= 1; h++) { + //stepY = stepY+h; + Logger.INFO("Placing Block @ "+"[X:"+i+"][Y:"+h+"][Z:"+j+"]"+" with xDir:"+xDir+" zDir:"+zDir); + if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { + this.world.setBlock(i, h, j, Blocks.stone,0,3); + } + else { + Logger.INFO("Not even sure what this is for, but I got here."); + } + try { + TimeUnit.MILLISECONDS.sleep(500); + } catch (final InterruptedException e1) { + e1.printStackTrace(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java b/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java new file mode 100644 index 0000000000..7cb1054d53 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java @@ -0,0 +1,343 @@ +package gtPlusPlus.core.util.debug; + +import java.nio.ByteBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.opengl.GL11; + + +/** + * User: The Grey Ghost + * Date: 9/02/14 + */ +public class UtilityGL11Debug +{ + public class GLproperty + { + public GLproperty(final int init_gLconstant, final String init_name, final String init_description, final String init_category, final String init_fetchCommand) { + this.gLconstant = init_gLconstant; + this.name = init_name; + this.description = init_description; + this.category = init_category; + this.fetchCommand = init_fetchCommand; + } + + public int gLconstant; + public String name; + public String description; + public String category; + public String fetchCommand; + } + + public static UtilityGL11Debug instance = new UtilityGL11Debug(); + + public GLproperty[] propertyList = + + { + new GLproperty(GL11.GL_CURRENT_COLOR, "GL_CURRENT_COLOR", "Current color", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_INDEX, "GL_CURRENT_INDEX", "Current color index", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_TEXTURE_COORDS, "GL_CURRENT_TEXTURE_COORDS", "Current texture coordinates", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_NORMAL, "GL_CURRENT_NORMAL", "Current normal", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_RASTER_POSITION, "GL_CURRENT_RASTER_POSITION", "Current raster position", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_RASTER_DISTANCE, "GL_CURRENT_RASTER_DISTANCE", "Current raster distance", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_RASTER_COLOR, "GL_CURRENT_RASTER_COLOR", "Color associated with raster position", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_RASTER_INDEX, "GL_CURRENT_RASTER_INDEX", "Color index associated with raster position", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_RASTER_TEXTURE_COORDS, "GL_CURRENT_RASTER_TEXTURE_COORDS", "Texture coordinates associated with raster position", "current", "glGetFloatv()"), + new GLproperty(GL11.GL_CURRENT_RASTER_POSITION_VALID, "GL_CURRENT_RASTER_POSITION_VALID", "Raster position valid bit", "current", "glGetBooleanv()"), + new GLproperty(GL11.GL_EDGE_FLAG, "GL_EDGE_FLAG", "Edge flag", "current", "glGetBooleanv()"), + new GLproperty(GL11.GL_VERTEX_ARRAY, "GL_VERTEX_ARRAY", "Vertex array enable", "vertex-array", "glIsEnabled()"), + new GLproperty(GL11.GL_VERTEX_ARRAY_SIZE, "GL_VERTEX_ARRAY_SIZE", "Coordinates per vertex", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_VERTEX_ARRAY_TYPE, "GL_VERTEX_ARRAY_TYPE", "Type of vertex coordinates", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_VERTEX_ARRAY_STRIDE, "GL_VERTEX_ARRAY_STRIDE", "Stride between vertices", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_VERTEX_ARRAY_POINTER, "GL_VERTEX_ARRAY_POINTER", "Pointer to the vertex array", "vertex-array", "glGetPointerv()"), + new GLproperty(GL11.GL_NORMAL_ARRAY, "GL_NORMAL_ARRAY", "Normal array enable", "vertex-array", "glIsEnabled()"), + new GLproperty(GL11.GL_NORMAL_ARRAY_TYPE, "GL_NORMAL_ARRAY_TYPE", "Type of normal coordinates", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_NORMAL_ARRAY_STRIDE, "GL_NORMAL_ARRAY_STRIDE", "Stride between normals", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_NORMAL_ARRAY_POINTER, "GL_NORMAL_ARRAY_POINTER", "Pointer to the normal array", "vertex-array", "glGetPointerv()"), + new GLproperty(GL11.GL_COLOR_ARRAY, "GL_COLOR_ARRAY", "RGBA color array enable", "vertex-array", "glIsEnabled()"), + new GLproperty(GL11.GL_COLOR_ARRAY_SIZE, "GL_COLOR_ARRAY_SIZE", "Colors per vertex", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_COLOR_ARRAY_TYPE, "GL_COLOR_ARRAY_TYPE", "Type of color components", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_COLOR_ARRAY_STRIDE, "GL_COLOR_ARRAY_STRIDE", "Stride between colors", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_COLOR_ARRAY_POINTER, "GL_COLOR_ARRAY_POINTER", "Pointer to the color array", "vertex-array", "glGetPointerv()"), + new GLproperty(GL11.GL_INDEX_ARRAY, "GL_INDEX_ARRAY", "Color-index array enable", "vertex-array", "glIsEnabled()"), + new GLproperty(GL11.GL_INDEX_ARRAY_TYPE, "GL_INDEX_ARRAY_TYPE", "Type of color indices", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_INDEX_ARRAY_STRIDE, "GL_INDEX_ARRAY_STRIDE", "Stride between color indices", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_INDEX_ARRAY_POINTER, "GL_INDEX_ARRAY_POINTER", "Pointer to the index array", "vertex-array", "glGetPointerv()"), + new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY, "GL_TEXTURE_COORD_ARRAY", "Texture coordinate array enable", "vertex-array", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_SIZE, "GL_TEXTURE_COORD_ARRAY_SIZE", "Texture coordinates per element", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_TYPE, "GL_TEXTURE_COORD_ARRAY_TYPE", "Type of texture coordinates", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_STRIDE, "GL_TEXTURE_COORD_ARRAY_STRIDE", "Stride between texture coordinates", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_TEXTURE_COORD_ARRAY_POINTER, "GL_TEXTURE_COORD_ARRAY_POINTER", "Pointer to the texture coordinate array", "vertex-array", "glGetPointerv()"), + new GLproperty(GL11.GL_EDGE_FLAG_ARRAY, "GL_EDGE_FLAG_ARRAY", "Edge flag array enable", "vertex-array", "glIsEnabled()"), + new GLproperty(GL11.GL_EDGE_FLAG_ARRAY_STRIDE, "GL_EDGE_FLAG_ARRAY_STRIDE", "Stride between edge flags", "vertex-array", "glGetIntegerv()"), + new GLproperty(GL11.GL_EDGE_FLAG_ARRAY_POINTER, "GL_EDGE_FLAG_ARRAY_POINTER", "Pointer to the edge flag array", "vertex-array", "glGetPointerv()"), + new GLproperty(GL11.GL_MODELVIEW_MATRIX, "GL_MODELVIEW_MATRIX", "Modelview matrix stack", "matrix", "glGetFloatv()"), + new GLproperty(GL11.GL_PROJECTION_MATRIX, "GL_PROJECTION_MATRIX", "Projection matrix stack", "matrix", "glGetFloatv()"), + new GLproperty(GL11.GL_TEXTURE_MATRIX, "GL_TEXTURE_MATRIX", "Texture matrix stack", "matrix", "glGetFloatv()"), + new GLproperty(GL11.GL_VIEWPORT, "GL_VIEWPORT", "Viewport origin and extent", "viewport", "glGetIntegerv()"), + new GLproperty(GL11.GL_DEPTH_RANGE, "GL_DEPTH_RANGE", "Depth range near and far", "viewport", "glGetFloatv()"), + new GLproperty(GL11.GL_MODELVIEW_STACK_DEPTH, "GL_MODELVIEW_STACK_DEPTH", "Modelview matrix stack pointer", "matrix", "glGetIntegerv()"), + new GLproperty(GL11.GL_PROJECTION_STACK_DEPTH, "GL_PROJECTION_STACK_DEPTH", "Projection matrix stack pointer", "matrix", "glGetIntegerv()"), + new GLproperty(GL11.GL_TEXTURE_STACK_DEPTH, "GL_TEXTURE_STACK_DEPTH", "Texture matrix stack pointer", "matrix", "glGetIntegerv()"), + new GLproperty(GL11.GL_MATRIX_MODE, "GL_MATRIX_MODE", "Current matrix mode", "transform", "glGetIntegerv()"), + new GLproperty(GL11.GL_NORMALIZE, "GL_NORMALIZE", "Current normal normalization on/off", "transform/ enable", "glIsEnabled()"), + new GLproperty(GL11.GL_FOG_COLOR, "GL_FOG_COLOR", "Fog color", "fog", "glGetFloatv()"), + new GLproperty(GL11.GL_FOG_INDEX, "GL_FOG_INDEX", "Fog index", "fog", "glGetFloatv()"), + new GLproperty(GL11.GL_FOG_DENSITY, "GL_FOG_DENSITY", "Exponential fog density", "fog", "glGetFloatv()"), + new GLproperty(GL11.GL_FOG_START, "GL_FOG_START", "Linear fog start", "fog", "glGetFloatv()"), + new GLproperty(GL11.GL_FOG_END, "GL_FOG_END", "Linear fog end", "fog", "glGetFloatv()"), + new GLproperty(GL11.GL_FOG_MODE, "GL_FOG_MODE", "Fog mode", "fog", "glGetIntegerv()"), + new GLproperty(GL11.GL_FOG, "GL_FOG", "True if fog enabled", "fog/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_SHADE_MODEL, "GL_SHADE_MODEL", "glShadeModel() setting", "lighting", "glGetIntegerv()"), + new GLproperty(GL11.GL_LIGHTING, "GL_LIGHTING", "True if lighting is enabled", "lighting/e nable", "glIsEnabled()"), + new GLproperty(GL11.GL_COLOR_MATERIAL, "GL_COLOR_MATERIAL", "True if color tracking is enabled", "lighting", "glIsEnabled()"), + new GLproperty(GL11.GL_COLOR_MATERIAL_PARAMETER, "GL_COLOR_MATERIAL_PARAMETER", "Material properties tracking current color", "lighting", "glGetIntegerv()"), + new GLproperty(GL11.GL_COLOR_MATERIAL_FACE, "GL_COLOR_MATERIAL_FACE", "Face(s) affected by color tracking", "lighting", "glGetIntegerv()"), + new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient material color", "lighting", "glGetMaterialfv()"), + new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse material color", "lighting", "glGetMaterialfv()"), + new GLproperty(GL11.GL_SPECULAR, "GL_SPECULAR", "Specular material color", "lighting", "glGetMaterialfv()"), + new GLproperty(GL11.GL_EMISSION, "GL_EMISSION", "Emissive material color", "lighting", "glGetMaterialfv()"), + new GLproperty(GL11.GL_SHININESS, "GL_SHININESS", "Specular exponent of material", "lighting", "glGetMaterialfv()"), + new GLproperty(GL11.GL_LIGHT_MODEL_AMBIENT, "GL_LIGHT_MODEL_AMBIENT", "Ambient scene color", "lighting", "glGetFloatv()"), + new GLproperty(GL11.GL_LIGHT_MODEL_LOCAL_VIEWER, "GL_LIGHT_MODEL_LOCAL_VIEWER", "Viewer is local", "lighting", "glGetBooleanv()"), + new GLproperty(GL11.GL_LIGHT_MODEL_TWO_SIDE, "GL_LIGHT_MODEL_TWO_SIDE", "Use two-sided lighting", "lighting", "glGetBooleanv()"), + new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient intensity of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse intensity of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_SPECULAR, "GL_SPECULAR", "Specular intensity of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_POSITION, "GL_POSITION", "Position of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_CONSTANT_ATTENUATION, "GL_CONSTANT_ATTENUATION", "Constant attenuation factor", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_LINEAR_ATTENUATION, "GL_LINEAR_ATTENUATION", "Linear attenuation factor", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_QUADRATIC_ATTENUATION, "GL_QUADRATIC_ATTENUATION", "Quadratic attenuation factor", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_SPOT_DIRECTION, "GL_SPOT_DIRECTION", "Spotlight direction of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_SPOT_EXPONENT, "GL_SPOT_EXPONENT", "Spotlight exponent of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_SPOT_CUTOFF, "GL_SPOT_CUTOFF", "Spotlight angle of light i", "lighting", "glGetLightfv()"), + new GLproperty(GL11.GL_LIGHT0, "GL_LIGHT0", "True if light 0 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT1, "GL_LIGHT1", "True if light 1 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT2, "GL_LIGHT2", "True if light 2 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT3, "GL_LIGHT3", "True if light 3 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT4, "GL_LIGHT4", "True if light 4 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT5, "GL_LIGHT5", "True if light 5 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT6, "GL_LIGHT6", "True if light 6 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LIGHT7, "GL_LIGHT7", "True if light 7 enabled", "lighting/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_COLOR_INDEXES, "GL_COLOR_INDEXES", "ca, cd, and cs for color-index lighting", "lighting/e nable", "glGetMaterialfv()"), + new GLproperty(GL11.GL_POINT_SIZE, "GL_POINT_SIZE", "Point size", "point", "glGetFloatv()"), + new GLproperty(GL11.GL_POINT_SMOOTH, "GL_POINT_SMOOTH", "Point antialiasing on", "point/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LINE_WIDTH, "GL_LINE_WIDTH", "Line width", "line", "glGetFloatv()"), + new GLproperty(GL11.GL_LINE_SMOOTH, "GL_LINE_SMOOTH", "Line antialiasing on", "line/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LINE_STIPPLE_PATTERN, "GL_LINE_STIPPLE_PATTERN", "Line stipple", "line", "glGetIntegerv()"), + new GLproperty(GL11.GL_LINE_STIPPLE_REPEAT, "GL_LINE_STIPPLE_REPEAT", "Line stipple repeat", "line", "glGetIntegerv()"), + new GLproperty(GL11.GL_LINE_STIPPLE, "GL_LINE_STIPPLE", "Line stipple enable", "line/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_CULL_FACE, "GL_CULL_FACE", "Polygon culling enabled", "polygon/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_CULL_FACE_MODE, "GL_CULL_FACE_MODE", "Cull front-/back-facing polygons", "polygon", "glGetIntegerv()"), + new GLproperty(GL11.GL_FRONT_FACE, "GL_FRONT_FACE", "Polygon front-face CW/CCW indicator", "polygon", "glGetIntegerv()"), + new GLproperty(GL11.GL_POLYGON_SMOOTH, "GL_POLYGON_SMOOTH", "Polygon antialiasing on", "polygon/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_POLYGON_MODE, "GL_POLYGON_MODE", "Polygon rasterization mode (front and back)", "polygon", "glGetIntegerv()"), + new GLproperty(GL11.GL_POLYGON_OFFSET_FACTOR, "GL_POLYGON_OFFSET_FACTOR", "Polygon offset factor", "polygon", "glGetFloatv()"), + new GLproperty(GL11.GL_POLYGON_OFFSET_POINT, "GL_POLYGON_OFFSET_POINT", "Polygon offset enable for GL_POINT mode rasterization", "polygon/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_POLYGON_OFFSET_LINE, "GL_POLYGON_OFFSET_LINE", "Polygon offset enable for GL_LINE mode rasterization", "polygon/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_POLYGON_OFFSET_FILL, "GL_POLYGON_OFFSET_FILL", "Polygon offset enable for GL_FILL mode rasterization", "polygon/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_POLYGON_STIPPLE, "GL_POLYGON_STIPPLE", "Polygon stipple enable", "polygon/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_1D, "GL_TEXTURE_1D", "True if 1-D texturing enabled ", "texture/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_2D, "GL_TEXTURE_2D", "True if 2-D texturing enabled ", "texture/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_BINDING_1D, "GL_TEXTURE_BINDING_1D", "Texture object bound to GL_TEXTURE_1D", "texture", "glGetIntegerv()"), + new GLproperty(GL11.GL_TEXTURE_BINDING_2D, "GL_TEXTURE_BINDING_2D", "Texture object bound to GL_TEXTURE_2D", "texture", "glGetIntegerv()"), + new GLproperty(GL11.GL_TEXTURE, "GL_TEXTURE", "x-D texture image at level of detail i", "UNUSED", "glGetTexImage()"), + new GLproperty(GL11.GL_TEXTURE_WIDTH, "GL_TEXTURE_WIDTH", "x-D texture image i's width", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_HEIGHT, "GL_TEXTURE_HEIGHT", "x-D texture image i's height", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_BORDER, "GL_TEXTURE_BORDER", "x-D texture image i's border width", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_RED_SIZE, "GL_TEXTURE_RED_SIZE", "x-D texture image i's red resolution", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_GREEN_SIZE, "GL_TEXTURE_GREEN_SIZE", "x-D texture image i's green resolution", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_BLUE_SIZE, "GL_TEXTURE_BLUE_SIZE", "x-D texture image i's blue resolution", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_ALPHA_SIZE, "GL_TEXTURE_ALPHA_SIZE", "x-D texture image i's alpha resolution", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_LUMINANCE_SIZE, "GL_TEXTURE_LUMINANCE_SIZE", "x-D texture image i's luminance resolution", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_INTENSITY_SIZE, "GL_TEXTURE_INTENSITY_SIZE", "x-D texture image i's intensity resolution", "UNUSED", "glGetTexLevelParameter*()"), + new GLproperty(GL11.GL_TEXTURE_BORDER_COLOR, "GL_TEXTURE_BORDER_COLOR", "Texture border color", "texture", "glGetTexParameter*()"), + new GLproperty(GL11.GL_TEXTURE_MIN_FILTER, "GL_TEXTURE_MIN_FILTER", "Texture minification function", "texture", "glGetTexParameter*()"), + new GLproperty(GL11.GL_TEXTURE_MAG_FILTER, "GL_TEXTURE_MAG_FILTER", "Texture magnification function", "texture", "glGetTexParameter*()"), + new GLproperty(GL11.GL_TEXTURE_WRAP_S, "GL_TEXTURE_WRAP_S", "Texture wrap mode (x is S or T)", "texture", "glGetTexParameter*()"), + new GLproperty(GL11.GL_TEXTURE_WRAP_T, "GL_TEXTURE_WRAP_T", "Texture wrap mode (x is S or T)", "texture", "glGetTexParameter*()"), + new GLproperty(GL11.GL_TEXTURE_PRIORITY, "GL_TEXTURE_PRIORITY", "Texture object priority", "texture", "glGetTexParameter*()"), + new GLproperty(GL11.GL_TEXTURE_ENV_MODE, "GL_TEXTURE_ENV_MODE", "Texture application function", "texture", "glGetTexEnviv()"), + new GLproperty(GL11.GL_TEXTURE_ENV_COLOR, "GL_TEXTURE_ENV_COLOR", "Texture environment color", "texture", "glGetTexEnvfv()"), + new GLproperty(GL11.GL_TEXTURE_GEN_S, "GL_TEXTURE_GEN_S", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_GEN_T, "GL_TEXTURE_GEN_T", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_GEN_R, "GL_TEXTURE_GEN_R", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_TEXTURE_GEN_Q, "GL_TEXTURE_GEN_Q", "Texgen enabled (x is S, T, R, or Q)", "texture/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_EYE_PLANE, "GL_EYE_PLANE", "Texgen plane equation coefficients", "texture", "glGetTexGenfv()"), + new GLproperty(GL11.GL_OBJECT_PLANE, "GL_OBJECT_PLANE", "Texgen object linear coefficients", "texture", "glGetTexGenfv()"), + new GLproperty(GL11.GL_TEXTURE_GEN_MODE, "GL_TEXTURE_GEN_MODE", "Function used for texgen", "texture", "glGetTexGeniv()"), + new GLproperty(GL11.GL_SCISSOR_TEST, "GL_SCISSOR_TEST", "Scissoring enabled", "scissor/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_SCISSOR_BOX, "GL_SCISSOR_BOX", "Scissor box", "scissor", "glGetIntegerv()"), + new GLproperty(GL11.GL_ALPHA_TEST, "GL_ALPHA_TEST", "Alpha test enabled", "color-buffer/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_ALPHA_TEST_FUNC, "GL_ALPHA_TEST_FUNC", "Alpha test function", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_ALPHA_TEST_REF, "GL_ALPHA_TEST_REF", "Alpha test reference value", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_TEST, "GL_STENCIL_TEST", "Stenciling enabled", "stencil-buffer/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_STENCIL_FUNC, "GL_STENCIL_FUNC", "Stencil function", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_VALUE_MASK, "GL_STENCIL_VALUE_MASK", "Stencil mask", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_REF, "GL_STENCIL_REF", "Stencil reference value", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_FAIL, "GL_STENCIL_FAIL", "Stencil fail action", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_PASS_DEPTH_FAIL, "GL_STENCIL_PASS_DEPTH_FAIL", "Stencil depth buffer fail action", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_PASS_DEPTH_PASS, "GL_STENCIL_PASS_DEPTH_PASS", "Stencil depth buffer pass action", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_DEPTH_TEST, "GL_DEPTH_TEST", "Depth buffer enabled", "depth-buffer/ena ble", "glIsEnabled()"), + new GLproperty(GL11.GL_DEPTH_FUNC, "GL_DEPTH_FUNC", "Depth buffer test function", "depth-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_BLEND, "GL_BLEND", "Blending enabled", "color-buffer/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_BLEND_SRC, "GL_BLEND_SRC", "Blending source function", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_BLEND_DST, "GL_BLEND_DST", "Blending destination function", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_DITHER, "GL_DITHER", "Dithering enabled", "color-buffer/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_INDEX_LOGIC_OP, "GL_INDEX_LOGIC_OP", "Color index logical operation enabled", "color-buffer/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_COLOR_LOGIC_OP, "GL_COLOR_LOGIC_OP", "RGBA color logical operation enabled", "color-buffer/enable", "glIsEnabled()"), + new GLproperty(GL11.GL_LOGIC_OP_MODE, "GL_LOGIC_OP_MODE", "Logical operation function", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_DRAW_BUFFER, "GL_DRAW_BUFFER", "Buffers selected for drawing", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_INDEX_WRITEMASK, "GL_INDEX_WRITEMASK", "Color-index writemask", "color-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK", "Color write enables; R, G, B, or A", "color-buffer", "glGetBooleanv()"), + new GLproperty(GL11.GL_DEPTH_WRITEMASK, "GL_DEPTH_WRITEMASK", "Depth buffer enabled for writing", "depth-buffer", "glGetBooleanv()"), + new GLproperty(GL11.GL_STENCIL_WRITEMASK, "GL_STENCIL_WRITEMASK", "Stencil-buffer writemask", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_COLOR_CLEAR_VALUE, "GL_COLOR_CLEAR_VALUE", "Color-buffer clear value (RGBA mode)", "color-buffer", "glGetFloatv()"), + new GLproperty(GL11.GL_INDEX_CLEAR_VALUE, "GL_INDEX_CLEAR_VALUE", "Color-buffer clear value (color-index mode)", "color-buffer", "glGetFloatv()"), + new GLproperty(GL11.GL_DEPTH_CLEAR_VALUE, "GL_DEPTH_CLEAR_VALUE", "Depth-buffer clear value", "depth-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_CLEAR_VALUE, "GL_STENCIL_CLEAR_VALUE", "Stencil-buffer clear value", "stencil-buffer", "glGetIntegerv()"), + new GLproperty(GL11.GL_ACCUM_CLEAR_VALUE, "GL_ACCUM_CLEAR_VALUE", "Accumulation-buffer clear value", "accum-buffer", "glGetFloatv()"), + new GLproperty(GL11.GL_UNPACK_SWAP_BYTES, "GL_UNPACK_SWAP_BYTES", "Value of GL_UNPACK_SWAP_BYTES", "pixel-store", "glGetBooleanv()"), + new GLproperty(GL11.GL_UNPACK_LSB_FIRST, "GL_UNPACK_LSB_FIRST", "Value of GL_UNPACK_LSB_FIRST", "pixel-store", "glGetBooleanv()"), + new GLproperty(GL11.GL_UNPACK_ROW_LENGTH, "GL_UNPACK_ROW_LENGTH", "Value of GL_UNPACK_ROW_LENGTH", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_UNPACK_SKIP_ROWS, "GL_UNPACK_SKIP_ROWS", "Value of GL_UNPACK_SKIP_ROWS", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_UNPACK_SKIP_PIXELS, "GL_UNPACK_SKIP_PIXELS", "Value of GL_UNPACK_SKIP_PIXELS", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT", "Value of GL_UNPACK_ALIGNMENT", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_PACK_SWAP_BYTES, "GL_PACK_SWAP_BYTES", "Value of GL_PACK_SWAP_BYTES", "pixel-store", "glGetBooleanv()"), + new GLproperty(GL11.GL_PACK_LSB_FIRST, "GL_PACK_LSB_FIRST", "Value of GL_PACK_LSB_FIRST", "pixel-store", "glGetBooleanv()"), + new GLproperty(GL11.GL_PACK_ROW_LENGTH, "GL_PACK_ROW_LENGTH", "Value of GL_PACK_ROW_LENGTH", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_PACK_SKIP_ROWS, "GL_PACK_SKIP_ROWS", "Value of GL_PACK_SKIP_ROWS", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_PACK_SKIP_PIXELS, "GL_PACK_SKIP_PIXELS", "Value of GL_PACK_SKIP_PIXELS", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT", "Value of GL_PACK_ALIGNMENT", "pixel-store", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAP_COLOR, "GL_MAP_COLOR", "True if colors are mapped", "pixel", "glGetBooleanv()"), + new GLproperty(GL11.GL_MAP_STENCIL, "GL_MAP_STENCIL", "True if stencil values are mapped", "pixel", "glGetBooleanv()"), + new GLproperty(GL11.GL_INDEX_SHIFT, "GL_INDEX_SHIFT", "Value of GL_INDEX_SHIFT", "pixel", "glGetIntegerv()"), + new GLproperty(GL11.GL_INDEX_OFFSET, "GL_INDEX_OFFSET", "Value of GL_INDEX_OFFSET", "pixel", "glGetIntegerv()"), + new GLproperty(GL11.GL_ZOOM_X, "GL_ZOOM_X", "x zoom factor", "pixel", "glGetFloatv()"), + new GLproperty(GL11.GL_ZOOM_Y, "GL_ZOOM_Y", "y zoom factor", "pixel", "glGetFloatv()"), + new GLproperty(GL11.GL_READ_BUFFER, "GL_READ_BUFFER", "Read source buffer", "pixel", "glGetIntegerv()"), + new GLproperty(GL11.GL_ORDER, "GL_ORDER", "1D map order", "capability", "glGetMapiv()"), + new GLproperty(GL11.GL_ORDER, "GL_ORDER", "2D map orders", "capability", "glGetMapiv()"), + new GLproperty(GL11.GL_COEFF, "GL_COEFF", "1D control points", "capability", "glGetMapfv()"), + new GLproperty(GL11.GL_COEFF, "GL_COEFF", "2D control points", "capability", "glGetMapfv()"), + new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "1D domain endpoints", "capability", "glGetMapfv()"), + new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "2D domain endpoints", "capability", "glGetMapfv()"), + new GLproperty(GL11.GL_MAP1_GRID_DOMAIN, "GL_MAP1_GRID_DOMAIN", "1D grid endpoints", "eval", "glGetFloatv()"), + new GLproperty(GL11.GL_MAP2_GRID_DOMAIN, "GL_MAP2_GRID_DOMAIN", "2D grid endpoints", "eval", "glGetFloatv()"), + new GLproperty(GL11.GL_MAP1_GRID_SEGMENTS, "GL_MAP1_GRID_SEGMENTS", "1D grid divisions", "eval", "glGetFloatv()"), + new GLproperty(GL11.GL_MAP2_GRID_SEGMENTS, "GL_MAP2_GRID_SEGMENTS", "2D grid divisions", "eval", "glGetFloatv()"), + new GLproperty(GL11.GL_AUTO_NORMAL, "GL_AUTO_NORMAL", "True if automatic normal generation enabled", "eval", "glIsEnabled()"), + new GLproperty(GL11.GL_PERSPECTIVE_CORRECTION_HINT, "GL_PERSPECTIVE_CORRECTION_HINT", "Perspective correction hint", "hint", "glGetIntegerv()"), + new GLproperty(GL11.GL_POINT_SMOOTH_HINT, "GL_POINT_SMOOTH_HINT", "Point smooth hint", "hint", "glGetIntegerv()"), + new GLproperty(GL11.GL_LINE_SMOOTH_HINT, "GL_LINE_SMOOTH_HINT", "Line smooth hint", "hint", "glGetIntegerv()"), + new GLproperty(GL11.GL_POLYGON_SMOOTH_HINT, "GL_POLYGON_SMOOTH_HINT", "Polygon smooth hint", "hint", "glGetIntegerv()"), + new GLproperty(GL11.GL_FOG_HINT, "GL_FOG_HINT", "Fog hint", "hint", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_LIGHTS, "GL_MAX_LIGHTS", "Maximum number of lights", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_CLIP_PLANES, "GL_MAX_CLIP_PLANES", "Maximum number of user clipping planes", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_MODELVIEW_STACK_DEPTH, "GL_MAX_MODELVIEW_STACK_DEPTH", "Maximum modelview-matrix stack depth", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH", "Maximum projection-matrix stack depth", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_TEXTURE_STACK_DEPTH, "GL_MAX_TEXTURE_STACK_DEPTH", "Maximum depth of texture matrix stack", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_SUBPIXEL_BITS, "GL_SUBPIXEL_BITS", "Number of bits of subpixel precision in x and y", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_TEXTURE_SIZE, "GL_MAX_TEXTURE_SIZE", "See discussion in Texture Proxy in Chapter 9", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_PIXEL_MAP_TABLE, "GL_MAX_PIXEL_MAP_TABLE", "Maximum size of a glPixelMap() translation table", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_NAME_STACK_DEPTH, "GL_MAX_NAME_STACK_DEPTH", "Maximum selection-name stack depth", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_LIST_NESTING, "GL_MAX_LIST_NESTING", "Maximum display-list call nesting", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_EVAL_ORDER, "GL_MAX_EVAL_ORDER", "Maximum evaluator polynomial order", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_VIEWPORT_DIMS, "GL_MAX_VIEWPORT_DIMS", "Maximum viewport dimensions", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_ATTRIB_STACK_DEPTH, "GL_MAX_ATTRIB_STACK_DEPTH", "Maximum depth of the attribute stack", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH", "Maximum depth of the client attribute stack", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_AUX_BUFFERS, "GL_AUX_BUFFERS", "Number of auxiliary buffers", "capability", "glGetBooleanv()"), + new GLproperty(GL11.GL_RGBA_MODE, "GL_RGBA_MODE", "True if color buffers store RGBA", "capability", "glGetBooleanv()"), + new GLproperty(GL11.GL_INDEX_MODE, "GL_INDEX_MODE", "True if color buffers store indices", "capability", "glGetBooleanv()"), + new GLproperty(GL11.GL_DOUBLEBUFFER, "GL_DOUBLEBUFFER", "True if front and back buffers exist", "capability", "glGetBooleanv()"), + new GLproperty(GL11.GL_STEREO, "GL_STEREO", "True if left and right buffers exist", "capability", "glGetBooleanv()"), + new GLproperty(GL11.GL_POINT_SIZE_RANGE, "GL_POINT_SIZE_RANGE", "Range (low to high) of antialiased point sizes", "capability", "glGetFloatv()"), + new GLproperty(GL11.GL_POINT_SIZE_GRANULARITY, "GL_POINT_SIZE_GRANULARITY", "Antialiased point-size granularity", "capability", "glGetFloatv()"), + new GLproperty(GL11.GL_LINE_WIDTH_RANGE, "GL_LINE_WIDTH_RANGE", "Range (low to high) of antialiased line widths", "capability", "glGetFloatv()"), + new GLproperty(GL11.GL_LINE_WIDTH_GRANULARITY, "GL_LINE_WIDTH_GRANULARITY", "Antialiased line-width granularity", "capability", "glGetFloatv()"), + new GLproperty(GL11.GL_RED_BITS, "GL_RED_BITS", "Number of bits per red component in color buffers", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_GREEN_BITS, "GL_GREEN_BITS", "Number of bits per green component in color buffers", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_BLUE_BITS, "GL_BLUE_BITS", "Number of bits per blue component in color buffers", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_ALPHA_BITS, "GL_ALPHA_BITS", "Number of bits per alpha component in color buffers", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_INDEX_BITS, "GL_INDEX_BITS", "Number of bits per index in color buffers", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_DEPTH_BITS, "GL_DEPTH_BITS", "Number of depth-buffer bitplanes", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_STENCIL_BITS, "GL_STENCIL_BITS", "Number of stencil bitplanes", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_ACCUM_RED_BITS, "GL_ACCUM_RED_BITS", "Number of bits per red component in the accumulation buffer", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS", "Number of bits per green component in the accumulation buffer", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_ACCUM_BLUE_BITS, "GL_ACCUM_BLUE_BITS", "Number of bits per blue component in the accumulation buffer", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS", "Number of bits per alpha component in the accumulation buffer", "capability", "glGetIntegerv()"), + new GLproperty(GL11.GL_LIST_BASE, "GL_LIST_BASE", "Setting of glListBase()", "list", "glGetIntegerv()"), + new GLproperty(GL11.GL_LIST_INDEX, "GL_LIST_INDEX", "Number of display list under construction; 0 if none", "current", "glGetIntegerv()"), + new GLproperty(GL11.GL_LIST_MODE, "GL_LIST_MODE", "Mode of display list under construction; undefined if none", "current", "glGetIntegerv()"), + new GLproperty(GL11.GL_ATTRIB_STACK_DEPTH, "GL_ATTRIB_STACK_DEPTH", "Attribute stack pointer", "current", "glGetIntegerv()"), + new GLproperty(GL11.GL_CLIENT_ATTRIB_STACK_DEPTH, "GL_CLIENT_ATTRIB_STACK_DEPTH", "Client attribute stack pointer", "current", "glGetIntegerv()"), + new GLproperty(GL11.GL_NAME_STACK_DEPTH, "GL_NAME_STACK_DEPTH", "Name stack depth", "current", "glGetIntegerv()"), + new GLproperty(GL11.GL_RENDER_MODE, "GL_RENDER_MODE", "glRenderMode() setting", "current", "glGetIntegerv()"), + new GLproperty(GL11.GL_SELECTION_BUFFER_POINTER, "GL_SELECTION_BUFFER_POINTER", "Pointer to selection buffer", "select", "glGetPointerv()"), + new GLproperty(GL11.GL_SELECTION_BUFFER_SIZE, "GL_SELECTION_BUFFER_SIZE", "Size of selection buffer", "select", "glGetIntegerv()"), + new GLproperty(GL11.GL_FEEDBACK_BUFFER_POINTER, "GL_FEEDBACK_BUFFER_POINTER", "Pointer to feedback buffer", "feedback", "glGetPointerv()"), + new GLproperty(GL11.GL_FEEDBACK_BUFFER_SIZE, "GL_FEEDBACK_BUFFER_SIZE", "Size of feedback buffer", "feedback", "glGetIntegerv()"), + new GLproperty(GL11.GL_FEEDBACK_BUFFER_TYPE, "GL_FEEDBACK_BUFFER_TYPE", "Type of feedback buffer", "feedback", "glGetIntegerv()"), + }; + + public static void dumpOpenGLstate() + { + } + + public static void dumpAllIsEnabled() //Call This + { + for (int i = 0; i < instance.propertyList.length; ++i) + + { + if (instance.propertyList[i].fetchCommand == "glIsEnabled()") + + { + System.out.print(instance.propertyList[i].name + ":"); + System.out.print(GL11.glIsEnabled(instance.propertyList[i].gLconstant)); + System.out.println(" (" + instance.propertyList[i].description + ")"); + } + } + } + + public static void dumpAllType(final String type) + + { + for (int i = 0; i < instance.propertyList.length; ++i) + + { + if (instance.propertyList[i].category.equals(type)) + + { + System.out.print(instance.propertyList[i].name + ":"); + System.out.println(getPropertyAsString(i)); + System.out.println(" (" + instance.propertyList[i].description + ")"); + } + } + } + + private static String getPropertyAsString(final int propertyListIndex) + { + final int gLconstant = instance.propertyList[propertyListIndex].gLconstant; + if (instance.propertyList[propertyListIndex].fetchCommand.equals("glIsEnabled()")) { + return "" + GL11.glIsEnabled(gLconstant); + } + + if (instance.propertyList[propertyListIndex].fetchCommand == "glGetBooleanv()") + + { + final ByteBuffer params = BufferUtils.createByteBuffer(16); + + GL11.glGetBoolean(gLconstant, params); + String out = ""; + for (int i = 0; i < params.capacity(); ++i) + + { + out += (i == 0 ? "" : ", ") + params.get(i); + } + return out; + } + + return ""; + } +} + diff --git a/src/main/java/gtPlusPlus/core/util/math/MathUtils.java b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java new file mode 100644 index 0000000000..7573e0d51c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/math/MathUtils.java @@ -0,0 +1,787 @@ +package gtPlusPlus.core.util.math; + +import java.text.NumberFormat; +import java.util.Map; +import java.util.Random; + +import gregtech.api.enums.GT_Values; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +public class MathUtils { + + final static Random rand = CORE.RANDOM; + + /** Formats a number with group separator and at most 2 fraction digits. */ + private static final NumberFormat sNumberFormat = NumberFormat.getInstance(); + + static { + sNumberFormat.setMaximumFractionDigits(2); + } + + /** + * Returns a psuedo-random number between min and max, inclusive. + * The difference between min and max can be at most + * Integer.MAX_VALUE - 1. + * + * @param min Minimim value + * @param max Maximim value. Must be greater than min. + * @return Integer between min and max, inclusive. + * @see java.util.Random#nextInt(int) + */ + public static int randInt(final int min, final int max) { + // nextInt is normally exclusive of the top value, + // so add 1 to make it inclusive + return rand.nextInt((max - min) + 1) + min; + } + + public static double getChanceOfXOverYRuns(final double x, final double y){ + return (1-Math.pow((1-x), y)); + } + + + /** + * Returns a psuedo-random number between min and max, inclusive. + * The difference between min and max can be at most + * Long.MAX_VALUE - 1. + * + * @param min Minimim value + * @param max Maximim value. Must be greater than min. + * @return Long between min and max, inclusive. + * @see java.util.Random#nextLong(long) + */ + public static long randLong(final long min, final long max) { + // nextInt is normally exclusive of the top value, + // so add 1 to make it inclusive + return MathUtils.nextLong(rand,(max - min) + 1) + min; + } + private static long nextLong(final Random rng, final long n) { + // error checking and 2^x checking removed for simplicity. + long bits, val; + do { + bits = (rng.nextLong() << 1) >>> 1; + val = bits % n; + } while (((bits-val)+(n-1)) < 0L); + return val; + } + + + /** + * Returns a psuedo-random number between min and max, inclusive. + * The difference between min and max can be at most + * Double.MAX_VALUE - 1. + * + * @param min Minimim value + * @param max Maximim value. Must be greater than min. + * @return Double between min and max, inclusive. + * @see java.util.Random#nextDouble(double) + */ + public static double randDouble(final double min, final double max) { + // nextInt is normally exclusive of the top value, + // so add 1 to make it inclusive + return MathUtils.nextDouble(rand,(max - min) + 1) + min; + } + + private static double nextDouble(final Random rng, final double n) { + // error checking and 2^x checking removed for simplicity. + double bits, val; + do { + bits = (rng.nextLong() << 1) >>> 1; + val = bits % n; + } while (((bits-val)+(n-1)) < 0L); + return val; + } + + /** + * Returns a psuedo-random number between min and max, inclusive. + * The difference between min and max can be at most + * Float.MAX_VALUE - 1. + * + * @param min Minimim value + * @param max Maximim value. Must be greater than min. + * @return Float between min and max, inclusive. + * @see java.util.Random#nextFloat(float) + */ + public static float randFloat(final float min, final float max) { + // nextInt is normally exclusive of the top value, + // so add 1 to make it inclusive + return MathUtils.nextFloat(rand,(max - min) + 1) + min; + } + + private static float nextFloat(final Random rng, final float n) { + // error checking and 2^x checking removed for simplicity. + float bits, val; + do { + bits = (rng.nextLong() << 1) >>> 1; + val = bits % n; + } while (((bits-val)+(n-1)) < 0L); + return val; + } + + + /** + * Returns a percentage. + * The returned number is the % of X in Y. + * Supports Doubles. + * + * @param current Current value. + * @param max Maximim value. Must be greater than min. + * @return double between min and max, inclusive. + */ + public static double findPercentage(final double current, final double max){ + return Math.round(((current / max) * 100) * 100.00) / 100.00; + } + + public static int findPercentageOfInt(long input, float percentage){ + return (int)(input*(percentage/100.0f)); + } + + + //Smooth Rounding Function + /** + * Returns a double. + * The returned number is d rounded to the nearest d.01. + * Supports Doubles. + * + * @param current Current value. + * @return double Rounded value. + */ + public static double decimalRounding(final double d) { + return Math.round(d * 2) / 2.0; + } + + + //Smooth Rounding Function (Nearest 5) + /** + * Returns a double. + * The returned number is d rounded to the nearest d.5. + * Supports Doubles. + * + * @param current Current value. + * @return double Rounded value. + */ + public static double decimalRoundingToWholes(final double d) { + return 5*(Math.round(d/5)); + } + + //Smooth Rounding Function + /** + * Returns a integer. + * The returned number is d rounded to the nearest flat integer. + * Supports Doubles as input. + * + * @param current Current value. + * @return integer Rounded value. + */ + public static int roundToClosestInt(final double d) { + return (int) (Math.round(d * 2) / 2.0); + } + + public static int roundToClosestMultiple(final double number, final int multiple) { + int result = multiple; + if ((number % multiple) == 0) { + return (int) number; + } + // If not already multiple of given number + if ((number % multiple) != 0) { + final int division = (int) ((number / multiple) + 1); + result = division * multiple; + } + return result; + } + + + //Smooth Rounding Function + /** + * Returns a long. + * The returned number is d rounded to the nearest flat long. + * Supports Doubles as input. + * + * @param current Current value. + * @return long Rounded value. + */ + public static long roundToClosestLong(final double d) { + return (long) (Math.round(d * 2) / 2.0); + } + + + /** + * Returns a boolean. + * The returned boolean is wether or not X evenly fits in to Y. + * Supports ints. + * + * @param x Value A. + * @param y Value B. Must be greater than min. + * @return boolean Whether or not it divides evenly. + */ + public static boolean divideXintoY(final int x, final int y){ + if ((x % y) == 0) + { + return true; + } + return false; + } + + + /** + * Returns a boolean. + * The returned boolean is based on the odd/eveness of the input. + * Supports ints. + * + * @param x Value A. + * @return boolean Whether or not it divides evenly. + */ + public static boolean isNumberEven(final long x){ + if ((x % 2) == 0) + { + return true; + } + return false; + } + + + + /** + * Returns an int. + * The returned number is the value on i + 273.15F. + * Supports ints. + * + * @param i Temp in Celcius. + * @return int The celcius temp returned as Kelvin, rounded to the readest whole. + */ + public static float celsiusToKelvin(final int i){ + final double f = i + 273.15F; + return (int)decimalRoundingToWholes(f); + } + + + /** + * Returns a hexInteger. + * The returned number is the hex value of the input. + * Supports ints. + * + * @param input Current value. + * @return hexInteger. + */ + public static int getHexNumberFromInt(final int input){ + final String result = Integer.toHexString(input); + final int resultINT = Integer.getInteger(result); + return resultINT; + } + + + /** + * Returns a hexInteger. + * The returned value is between min and max. + * Supports ints. + * + * @param min Minimum value. + * @param max Maximium value. Must be greater than min. + * @return hexInteger between min and max, inclusive. + */ + public static int generateRandomHexValue(final int min, final int max){ + return getHexNumberFromInt(randInt(min, max)); + } + + + /** + * Returns a random hex value. + * The returned value is between 000000-ffffff. + * + * @return hexInteger between min and max, inclusive. + */ + public static int generateSingularRandomHexValue(){ + String temp; + final int randomInt = randInt(1, 5); + final Map colours = Utils.hexColourGeneratorRandom(5); + + if ((colours.get(randomInt) != null) && (colours.size() > 0)){ + temp = colours.get(randomInt); + } + else { + temp = "0F0F0F"; + } + + Logger.WARNING("Operating with "+temp); + temp = Utils.appenedHexNotationToString(String.valueOf(temp)); + Logger.WARNING("Made "+temp+" - Hopefully it's not a mess."); + Logger.WARNING("It will decode into "+Integer.decode(temp)+"."); + return Integer.decode(temp); + } + + public static long[] simplifyNumbersToSmallestForm(final long[] inputArray){ + final long GCD = gcd(inputArray); + final long[] outputArray = new long[inputArray.length]; + for (int i=0;i 0) { + return outputArray; + } + return new long[] {}; + } + + private static long gcd(long a, long b){ + while (b > 0) + { + final long temp = b; + b = a % b; // % is remainder + a = temp; + } + return a; + } + + private static long gcd(final long[] input){ + long result = input[0]; + for(int i = 1; i < input.length; i++) { + result = gcd(result, input[i]); + } + return result; + } + + final public static int getRgbAsHex(final short[] RGBA){ + final int returnValue = Utils.rgbtoHexValue(RGBA[0], RGBA[1], RGBA[2]); + return (returnValue == 0) ? 0 : returnValue; + } + + + public final static int returnLargestNumber(final int a, final int b){ + if (a > b){ + return a; + } + else if (a == b){ + return a; + } + else { + return b; + } + } + + public static byte safeByte(long number){ + return number>Byte.MAX_VALUE ? Byte.MAX_VALUE :(byte)number; + } + + public static short safeShort(long number){ + return number>Short.MAX_VALUE ? Short.MAX_VALUE :(short)number; + } + + public static int safeInt(long number, int margin){ + return number>Integer.MAX_VALUE-margin ? Integer.MAX_VALUE-margin :(int)number; + } + + public static int safeInt(long number){ + return number>GT_Values.V[GT_Values.V.length-1] ? safeInt(GT_Values.V[GT_Values.V.length-1],1) : number aDataSet) { + byte[] aNewSet = new byte[aDataSet.size()]; + for (int u=0;u aDataSet) { + short[] aNewSet = new short[aDataSet.size()]; + for (int u=0;u aDataSet) { + int[] aNewSet = new int[aDataSet.size()]; + for (int u=0;u aDataSet) { + float[] aNewSet = new float[aDataSet.size()]; + for (int u=0;u aDataSet) { + long[] aNewSet = new long[aDataSet.size()]; + for (int u=0;u aDataSet) { + double[] aNewSet = new double[aDataSet.size()]; + for (int u=0;u 0) { + return -aPositive; + } + else if (aPositive < 0) { + return +aPositive; + } + else { + return 0; + } + } + + public static V safeCast(Object aNumberType) { + long a1; + double a2; + a1 = Long.parseLong(aNumberType.toString()); + a2 = Double.parseDouble(aNumberType.toString()); + + if ((aNumberType.getClass() == byte.class) || (aNumberType instanceof Byte)){ + if (a1 >= Byte.MIN_VALUE && a1 <= Byte.MAX_VALUE) { + String s = ""+a1; + Byte s1 = Byte.valueOf(s); + return (V) s1; + } + } + else if ((aNumberType.getClass() == short.class) || (aNumberType instanceof Short)){ + if (a1 >= Short.MIN_VALUE && a1 <= Short.MAX_VALUE) { + String s = ""+a1; + Short s1 = Short.valueOf(s); + return (V) s1; + + } + } + else if ((aNumberType.getClass() == int.class) || (aNumberType instanceof Integer)){ + if (a1 >= Integer.MIN_VALUE && a1 <= Integer.MAX_VALUE) { + String s = ""+a1; + Integer s1 = Integer.valueOf(s); + return (V) s1; + + } + } + else if ((aNumberType.getClass() == long.class) || (aNumberType instanceof Long)){ + if (a1 >= Long.MIN_VALUE && a1 <= Long.MAX_VALUE) { + String s = ""+a1; + Long s1 = Long.valueOf(s); + return (V) s1; + } + } + else if ((aNumberType.getClass() == float.class) || (aNumberType instanceof Float)){ + if (a2 >= Float.MIN_VALUE && a2 <= Float.MAX_VALUE) { + String s = ""+a1; + Float s1 = Float.valueOf(s); + return (V) s1; + + } + } + else if ((aNumberType.getClass() == double.class) || (aNumberType instanceof Double)){ + if (a2 >= Double.MIN_VALUE && a2 <= Double.MAX_VALUE) { + String s = ""+a1; + Double s1 = Double.valueOf(s); + return (V) s1; + + } + } + + Integer o = 0; + return (V) o; + + } + + public static byte getSafeByte(Byte b) { + Byte a = safeCast(b); + return a.byteValue(); + } + + public static short getSafeShort(Short b) { + Short a = safeCast(b); + return a.shortValue(); + } + + public static int getSafeInt(Integer b) { + Integer a = safeCast(b); + return a.intValue(); + } + + public static long getSafeLong(Long b) { + Long a = safeCast(b); + return a.longValue(); + } + + public static float getSafeFloat(Float b) { + Float a = safeCast(b); + return a.floatValue(); + } + + public static double getSafeDouble(Double b) { + Double a = safeCast(b); + return a.doubleValue(); + } + + + public static long safeCast_IntToLong(int o) { + long i = o; + return i; + } + + public static int safeCast_LongToInt(long o) { + if (o > Integer.MAX_VALUE) { + return Integer.MAX_VALUE; + } + else { + int i = (int) o; + return i; + } + } + + public static short safeCast_IntToShort(int o) { + if (o > Short.MAX_VALUE) { + return Short.MAX_VALUE; + } + else { + short i = (short) o; + return i; + } + } + + public static int safeCast_ShortToInt(short o) { + int i = (int) o; + return i; + } + + public static byte safeCast_ShortToByte(short o) { + if (o > Byte.MAX_VALUE) { + return Byte.MAX_VALUE; + } + else { + byte i = (byte) o; + return i; + } + } + + public static short safeCast_ByteToshort(byte o) { + short i = (short) o; + return i; + } + + /** + * Balances a number within a range. + * @param aInput - The number to balance + * @param aMin - The minimum bounds + * @param aMax - The maximum bounds + * @return - An Integer which will be between the bounds, or a boundary value. + */ + public static int balance(int aInput, int aMin, int aMax) { + return Math.max(Math.min(aInput, aMax), aMin); + } + + /** + * Balances a number within a range. + * @param aInput - The number to balance + * @param aMin - The minimum bounds + * @param aMax - The maximum bounds + * @return - A Number which will be between the bounds, or a boundary value. + */ + public static Number balance(Number aInput, Number aMin, Number aMax) { + return max(min(aInput, aMax), aMin); + } + + /** + * Balances a number within a range. + * @param aInput - The number to balance + * @param aMin - The minimum bounds + * @param aMax - The maximum bounds + * @return - An Integer which will be between the bounds, or a boundary value. + */ + public static int balanceInt(Number aInput, Number aMin, Number aMax) { + return MathUtils.safeCast_LongToInt((long) balance(max(min(aInput, aMax), aMin), Integer.MIN_VALUE, Integer.MAX_VALUE)); + } + + /** + * Balances a number within a range. + * @param aInput - The number to balance + * @param aMin - The minimum bounds + * @param aMax - The maximum bounds + * @return - A Long which will be between the bounds, or a boundary value. + */ + public static long balanceLong(Number aInput, Number aMin, Number aMax) { + return (long) balance(max(min(aInput, aMax), aMin), Long.MIN_VALUE, Long.MAX_VALUE); + } + + public static int getValueWithinRange(int i, int aMin, int aMax) { + int aAmount = Math.max(Math.min(i, aMax), aMin); + return aAmount; + } + + public static Pair splitLongIntoIntegers(long aLong){ + int aIntMaxInLong = (int) Math.min(Integer.MAX_VALUE, Math.floor(aLong/Integer.MAX_VALUE)); + int aRemainder = (int) (aLong - (aIntMaxInLong * Integer.MAX_VALUE)); + return new Pair(aIntMaxInLong, aRemainder); + } + + + + + /** + * Returns the smaller of two {@code Number}s. That is, + * the result the argument closer to the value of + * {@link Long#MIN_VALUE}. If the arguments have the same + * value, the result is that same value. + * + * @param a an argument. + * @param b another argument. + * @return the smaller of {@code a} and {@code b}. + */ + public static Number min(Number a, Number b) { + return (a.longValue() <= b.longValue()) ? a : b; + } + + /** + * Returns the greater of two {@code Number}s. That is, the + * result is the argument closer to the value of + * {@link Long#MAX_VALUE}. If the arguments have the same value, + * the result is that same value. + * + * @param a an argument. + * @param b another argument. + * @return the larger of {@code a} and {@code b}. + */ + public static Number max(Number a, Number b) { + return (a.longValue() >= b.longValue()) ? a : b; + } + + public static String formatNumbers(long aNumber) { + return sNumberFormat.format(aNumber); + } + + public static String formatNumbers(double aNumber) { + return sNumberFormat.format(aNumber); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java new file mode 100644 index 0000000000..806f83d830 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java @@ -0,0 +1,18 @@ +package gtPlusPlus.core.util.minecraft; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.Side; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; + +public class ClientUtils { + + static { + if (FMLCommonHandler.instance().getSide() == Side.SERVER) { + Logger.ERROR("Something tried to access the ClientUtils class from the Server Side."); + Logger.ERROR("Soft crashing to prevent data corruption."); + CORE.crash(); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java new file mode 100644 index 0000000000..2f273d5f7f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/EnchantingUtils.java @@ -0,0 +1,102 @@ +package gtPlusPlus.core.util.minecraft; + +import gtPlusPlus.api.objects.Logger; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class EnchantingUtils { + + + public static final int XP_PER_BOTTLE = 8; + public static final int RATIO = 20; + public static final int LIQUID_PER_XP_BOTTLE = 160; + public static final double RATIO_MOB_ESSENCE_TO_LIQUID_XP = 13.32; + + public static int liquidToXpRatio(final int liquid) { + return liquid / RATIO; + } + + public static int xpToLiquidRatio(final int xp) { + return xp * RATIO; + } + + public static FluidStack getEssenceFromLiquidXp(final int xpAmount){ + if (xpAmount <= 0){ + return null; + } + return getMobEssence((int) (xpAmount*RATIO_MOB_ESSENCE_TO_LIQUID_XP)); + } + + public static FluidStack getLiquidXpFromEssence(final int essenceAmount){ + if (essenceAmount <= 0){ + return null; + } + return getLiquidXP((int) (essenceAmount/RATIO_MOB_ESSENCE_TO_LIQUID_XP)); + } + + public static int getLiquidForLevel(final int level) { + final int xp = getExperienceForLevel(level); + return xpToLiquidRatio(xp); + } + + public static int getLevelForLiquid(final int liquid) { + final int xp = liquidToXpRatio(liquid); + return getLevelForExperience(xp); + } + + public static int getExperienceForLevel(final int level) { + if (level == 0) { + return 0; + } + if ((level > 0) && (level < 16)) { + return level * 17; + } + if ((level > 15) && (level < 31)) { + return (int) (((1.5 * Math.pow(level, 2.0)) - (29.5 * level)) + 360.0); + } + return (int) (((3.5 * Math.pow(level, 2.0)) - (151.5 * level)) + 2220.0); + } + + public static int getXpToNextLevel(final int level) { + final int levelXP = getLevelForExperience(level); + final int nextXP = getExperienceForLevel(level + 1); + return nextXP - levelXP; + } + + public static int getLevelForExperience(final int experience) { + int i; + for (i = 0; getExperienceForLevel(i) <= experience; ++i) { + } + return i - 1; + } + + + + + + + + //Xp Fluids + public static FluidStack getMobEssence(final int amount){ + Logger.WARNING("Trying to get a fluid stack of Mob Essence."); + try { + return FluidRegistry.getFluidStack("mobessence", amount).copy(); + } + catch (final Throwable e){ + return null; + } + + } + + public static FluidStack getLiquidXP(final int amount){ + Logger.WARNING("Trying to get a fluid stack of Liquid XP."); + try { + return FluidRegistry.getFluidStack("xpjuice", amount).copy(); + } + catch (final Throwable e){ + return null; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java new file mode 100644 index 0000000000..8b02ea9c7c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java @@ -0,0 +1,134 @@ +package gtPlusPlus.core.util.minecraft; + +import gregtech.api.util.GT_ModHandler; +import ic2.api.item.IElectricItem; +import ic2.api.item.IElectricItemManager; +import ic2.api.item.ISpecialElectricItem; +import net.minecraft.item.ItemRedstone; +import net.minecraft.item.ItemStack; + +public class EnergyUtils { + + public static class EU { + + public static boolean isElectricItem(ItemStack aStack) { + if (aStack == null || aStack.getItem() == null || aStack.getItem() instanceof ItemRedstone) { + return false; + } + if (aStack.getItem() instanceof ISpecialElectricItem) { + return true; + } + else if (aStack.getItem() instanceof IElectricItem) { + return true; + } + else if (aStack.getItem() instanceof IElectricItemManager) { + return true; + } + else { + return GT_ModHandler.isElectricItem(aStack); + } + } + + public static boolean isChargerItem(ItemStack aStack) { + return GT_ModHandler.isChargerItem(aStack); + } + + public static boolean charge(ItemStack aStack, int aEnergyToInsert, int aTier) { + return 0 != GT_ModHandler.chargeElectricItem(aStack, aEnergyToInsert, aTier, true, false); + } + + public static boolean discharge(ItemStack aStack, int aEnergyToDrain, int aTier) { + if (isElectricItem(aStack)) { + int tTier = ((IElectricItem) aStack.getItem()).getTier(aStack); + int aDischargeValue = GT_ModHandler.dischargeElectricItem(aStack, aEnergyToDrain, tTier, true, false, false); + //Logger.INFO("Trying to drain "+aDischargeValue); + return aDischargeValue > 0; + } + else { + return false; + } + } + + public static long getMaxStorage(ItemStack aStack) { + if (isElectricItem(aStack)) { + if (aStack.getItem() instanceof ISpecialElectricItem) { + ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); + return (long) bStack.getMaxCharge(aStack); + } + if (aStack.getItem() instanceof IElectricItem) { + IElectricItem bStack = (IElectricItem) aStack.getItem(); + return (long) bStack.getMaxCharge(aStack); + } + if (aStack.getItem() instanceof IElectricItemManager) { + IElectricItemManager bStack = (IElectricItemManager) aStack.getItem(); + return (long) bStack.getCharge(aStack); + } + } + else { + return 0; + } + return 0; + } + + public static long getCharge(ItemStack aStack) { + if (isElectricItem(aStack)) { + if (aStack.getItem() instanceof ISpecialElectricItem) { + ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); + return (long) bStack.getManager(aStack).getCharge(aStack); + } + if (aStack.getItem() instanceof IElectricItemManager) { + IElectricItemManager bStack = (IElectricItemManager) aStack.getItem(); + return (long) bStack.getCharge(aStack); + } + } + else { + return 0; + } + return 0; + } + + public static boolean hasCharge(ItemStack aStack) { + if (isElectricItem(aStack)) { + if (aStack.getItem() instanceof ISpecialElectricItem) { + ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); + return bStack.canProvideEnergy(aStack); + } + if (aStack.getItem() instanceof IElectricItem) { + IElectricItem bStack = (IElectricItem) aStack.getItem(); + return bStack.canProvideEnergy(aStack); + } + if (aStack.getItem() instanceof IElectricItemManager) { + IElectricItemManager bStack = (IElectricItemManager) aStack.getItem(); + return bStack.getCharge(aStack) > 0; + } + } + else { + return false; + } + return false; + } + + public static int getTier(ItemStack aStack) { + if (isElectricItem(aStack)) { + if (aStack.getItem() instanceof ISpecialElectricItem) { + ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem(); + return bStack.getTier(aStack); + } + if (aStack.getItem() instanceof IElectricItem) { + IElectricItem bStack = (IElectricItem) aStack.getItem(); + return bStack.getTier(aStack); + } + } + else { + return 0; + } + return 0; + } + + } + + public static class RF { + + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/EntityUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/EntityUtils.java new file mode 100644 index 0000000000..fda7b0b738 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/EntityUtils.java @@ -0,0 +1,290 @@ +package gtPlusPlus.core.util.minecraft; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.EntityRegistry; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.AABB; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.handler.events.EntityDeathHandler; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import ic2.core.IC2Potion; +import ic2.core.item.armor.ItemArmorHazmat; +import net.minecraft.block.Block; +import net.minecraft.entity.*; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; + +public class EntityUtils { + + public static void setEntityOnFire(final Entity aEntity, final int length){ + if (!isEntityImmuneToFire(aEntity)) { + aEntity.setFire(length); + } + } + + public static boolean isEntityOnFire(final Entity aEntity) { + Field aIsOnFire = ReflectionUtils.getField(Entity.class, "fire"); + if (aIsOnFire != null) { + int aFireTime = (int) ReflectionUtils.getFieldValue(aIsOnFire, aEntity); + return aFireTime > 0; + } + return false; + } + + public static boolean isEntityImmuneToFire(Entity aEntity) { + return aEntity.isImmuneToFire(); + } + + public static int getFacingDirection(final Entity entity){ + final int d = MathHelper.floor_double((entity.rotationYaw * 4.0F) / 360 + 0.50) & 3; + return d; + } + + @Deprecated + public static Block findBlockUnderEntityNonBoundingBox(final Entity parEntity){ + final int blockX = MathHelper.floor_double(parEntity.posX); + final int blockY = MathHelper.floor_double(parEntity.posY-0.2D - parEntity.yOffset); + final int blockZ = MathHelper.floor_double(parEntity.posZ); + return parEntity.worldObj.getBlock(blockX, blockY, blockZ); + } + + public static Block findBlockUnderEntity(final Entity parEntity){ + final int blockX = MathHelper.floor_double(parEntity.posX); + final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1; + final int blockZ = MathHelper.floor_double(parEntity.posZ); + return parEntity.worldObj.getBlock(blockX, blockY, blockZ); + } + + public static BlockPos findBlockPosUnderEntity(final Entity parEntity){ + final int blockX = MathHelper.floor_double(parEntity.posX); + final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY)-1; + final int blockZ = MathHelper.floor_double(parEntity.posZ); + return new BlockPos(blockX, blockY, blockZ, parEntity.worldObj); + } + + public static BlockPos findBlockPosOfEntity(final Entity parEntity){ + final int blockX = MathHelper.floor_double(parEntity.posX); + final int blockY = MathHelper.floor_double(parEntity.boundingBox.minY); + final int blockZ = MathHelper.floor_double(parEntity.posZ); + return new BlockPos(blockX, blockY, blockZ, parEntity.worldObj); + } + + //TODO + public static void registerEntityToBiomeSpawns(final Class classy, final EnumCreatureType EntityType, final BiomeGenBase baseBiomeGen){ + EntityRegistry.addSpawn(classy, 6, 1, 5, EntityType, baseBiomeGen); //change the values to vary the spawn rarity, biome, etc. + } + + public static boolean applyRadiationDamageToEntity(final int stackSize, final int radiationLevel, final World world, final Entity entityHolding){ + if (!world.isRemote){ + if ((radiationLevel > 0) && (entityHolding instanceof EntityLivingBase)) { + final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding; + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) { + int duration; + if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){ + //Utils.LOG_INFO("t"); + duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration(); + } + else { + //Utils.LOG_INFO("f"); + duration = radiationLevel*30; + } + //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15); + applyRadioactivity(entityLiving, radiationLevel, stackSize); + } + } + } + return true; + } + return false; + } + + public static boolean isWearingFullFrostHazmat(EntityLivingBase aEntity) { + for (byte i = 1; i < 5; i++) + if (!HazmatUtils.providesProtetion_Frost(aEntity.getEquipmentInSlot(i))) { + return false; + } + return true; + } + + public static boolean isWearingFullHeatHazmat(EntityLivingBase aEntity) { + for (byte i = 1; i < 5; i++) + if (!HazmatUtils.providesProtetion_Fire(aEntity.getEquipmentInSlot(i))) { + return false; + } + return true; + } + + public static boolean isWearingFullBioHazmat(EntityLivingBase aEntity) { + for (byte i = 1; i < 5; i++) + if (!HazmatUtils.providesProtetion_Biohazard(aEntity.getEquipmentInSlot(i))) { + return false; + } + return true; + } + + public static boolean isWearingFullRadioHazmat(EntityLivingBase aEntity) { + for (byte i = 1; i < 5; i++) + if (!HazmatUtils.providesProtetion_Radiation(aEntity.getEquipmentInSlot(i))) { + return false; + } + return true; + } + + public static boolean isWearingFullElectroHazmat(EntityLivingBase aEntity) { + for (byte i = 1; i < 5; i++) + if (!HazmatUtils.providesProtetion_Electricity(aEntity.getEquipmentInSlot(i))) { + return false; + } + return true; + } + + public static boolean isWearingFullGasHazmat(EntityLivingBase aEntity) { + for (byte i = 1; i < 5; i++) + if (!HazmatUtils.providesProtetion_Gas(aEntity.getEquipmentInSlot(i))) { + return false; + } + return true; + } + + public static boolean applyRadioactivity(EntityLivingBase aEntity, int aLevel, int aAmountOfItems) { + if (aLevel > 0 && aEntity != null && aEntity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && aEntity.getCreatureAttribute() != EnumCreatureAttribute.ARTHROPOD && !ItemArmorHazmat.hasCompleteHazmat(aEntity)) { + PotionEffect tEffect = null; + aEntity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, aLevel * 140 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.moveSlowdown)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.digSlowdown)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect(Potion.confusion.id, aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.confusion)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect(Potion.weakness.id, aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.weakness)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect(Potion.hunger.id, aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.hunger)) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + aEntity.addPotionEffect(new PotionEffect(IC2Potion.radiation.id, aLevel * 180 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.potionTypes[24])) == null ? 0 : tEffect.getDuration())), Math.max(0, (5 * aLevel) / 7))); + return true; + } + return false; + } + + public static boolean applyHeatDamageToEntity(final int heatLevel, final World world, final Entity entityHolding){ + if (!world.isRemote){ + if ((heatLevel > 0) && (entityHolding instanceof EntityLivingBase)) { + final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding; + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + if (!GT_Utility.isWearingFullHeatHazmat(entityLiving)) { + return GT_Utility.applyHeatDamage(entityLiving, heatLevel); + } + } + } + } + return false; + } + + + /** + * Static Version of the method used in {@code doFireDamage(entity, int)} to save memory. + */ + private volatile static Method dealFireDamage = null; + + /** + * Reflective Call to do Fire Damage to an entity (Does not set entity on fire though) + */ + public synchronized static boolean doFireDamage(Entity entity, int amount){ + if (dealFireDamage == null){ + dealFireDamage = ReflectionUtils.getMethod(Entity.class, "dealFireDamage", int.class); + } + else { + try { + dealFireDamage.invoke(entity, amount); + } + catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + } + return false; + } + + public static void doDamage(Entity entity, DamageSource dmg, int i) { + entity.attackEntityFrom(dmg, i); + } + + public static boolean isTileEntityRegistered(Class aTileClass, String aTileName) { + Field aRegistry = ReflectionUtils.getField(ReflectionUtils.getClass("net.minecraft.tileentity.TileEntity"), "nameToClassMap"); + Field aRegistry2 = ReflectionUtils.getField(ReflectionUtils.getClass("net.minecraft.tileentity.TileEntity"), "classToNameMap"); + try { + Object o = aRegistry.get(null); + if (o != null) { + Map nameToClassMap = (Map) o; + if (!nameToClassMap.containsKey(aTileName)) { + o = aRegistry2.get(null); + if (o != null) { + Map classToNameMap = (Map) o; + if (!classToNameMap.containsKey(aTileClass)) { + return false; + } + else { + return true; + } + } + } + else { + return true; + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + } + return false; + } + + public static double getDistance(Entity p1, Entity p2) { + return Math.sqrt( Math.pow(p1.posX - p2.posX, 2) + Math.pow(p1.posY - p2.posY, 2) + Math.pow(p1.posZ - p2.posZ, 2)); + } + + public static AutoMap getEntitiesWithinBoundingBoxExcluding(Entity aExclusion, AABB aBoundingBox){ + if (aExclusion == null) { + return new AutoMap(); + } + else { + List aEntities = aBoundingBox.world().getEntitiesWithinAABBExcludingEntity(aExclusion, aBoundingBox.get()); + return new AutoMap(aEntities); + } + } + + public static AutoMap getEntitiesWithinBoundingBox(Class aEntityType, AABB aBoundingBox){ + if (aEntityType == null) { + return new AutoMap(); + } + else { + List aEntities = aBoundingBox.world().getEntitiesWithinAABB(aEntityType, aBoundingBox.get()); + return new AutoMap(aEntities); + } + } + + /** + * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. Simplified function with static Max drop size of 1. + * @param aMobClass - The Base Class you want to drop this item. + * @param aStack - The ItemStack, stack size is not respected. + * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok) + */ + public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aChance) { + registerDropsForMob(aMobClass, aStack, 1, aChance); + } + + /** + * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. + * @param aMobClass - The Base Class you want to drop this item. + * @param aStack - The ItemStack, stack size is not respected. + * @param aMaxAmount - The maximum size of the ItemStack which drops. + * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok) + */ + public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) { + EntityDeathHandler.registerDropsForMob(aMobClass, aStack, aMaxAmount, aChance); + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java new file mode 100644 index 0000000000..a6bd50ff17 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/FluidUtils.java @@ -0,0 +1,641 @@ +package gtPlusPlus.core.util.minecraft; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.FluidGT6; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.item.base.cell.BaseItemPlasmaCell; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; + +public class FluidUtils { + + public static FluidStack getWater(final int amount){ + return FluidUtils.getFluidStack("water", amount); + } + + public static FluidStack getDistilledWater(final int amount){ + return FluidUtils.getFluidStack("ic2distilledwater", amount); + } + + public static FluidStack getHotWater(final int amount) { + return FluidUtils.getFluidStack("ic2hotwater", amount); + } + + public static FluidStack getLava(final int amount){ + return FluidUtils.getFluidStack("lava", amount); + } + + public static FluidStack getPahoehoeLava(final int amount){ + return FluidUtils.getFluidStack("ic2pahoehoelava", amount); + } + + public static FluidStack getMilk(final int amount){ + return FluidUtils.getFluidStack("milk", amount); + } + + public static FluidStack getColdCoolant(final int amount){ + return FluidUtils.getFluidStack("ic2coolant", amount); + } + + public static FluidStack getHotCoolant(final int amount){ + return FluidUtils.getFluidStack("ic2hotcoolant", amount); + } + + public static FluidStack getSteam(final int amount){ + return FluidUtils.getFluidStack("steam", amount); + } + + public static FluidStack getIC2Steam(final int amount){ + return FluidUtils.getFluidStack("ic2steam", amount); + } + + public static FluidStack getSuperHeatedSteam(final int amount){ + return FluidUtils.getFluidStack("ic2superheatedsteam", amount); + } + + @Deprecated + /** + * Do not use - Gives third tier steam - Not implemented + * @param amount + * @return + */ + public static FluidStack getHyperSteam(final int amount){ + return FluidUtils.getFluidStack("water", amount); + } + + public static FluidStack getUUA(final int amount){ + return FluidUtils.getFluidStack("uuamplifier", amount); + } + + public static FluidStack getUUM(final int amount){ + return FluidUtils.getFluidStack("ic2uumatter", amount); + } + + public static FluidStack getFluidStack(final String fluidName, final int amount){ + Logger.WARNING("Trying to get a fluid stack of "+fluidName); + try { + FluidStack x = FluidRegistry.getFluidStack(fluidName, amount); + return x != null ? x.copy() : null; + } + catch (final Throwable e){ + return null; + } + + } + + public static FluidStack getFluidStack(final FluidStack vmoltenFluid, final int fluidAmount) { + Logger.WARNING("Trying to get a fluid stack of "+vmoltenFluid.getFluid().getName()); + try { + FluidStack x = FluidRegistry.getFluidStack(vmoltenFluid.getFluid().getName(), fluidAmount); + return x != null ? x.copy() : null; + } + catch (final Throwable e){ + return null; + } + } + + public static FluidStack getFluidStack(final Fluid vFluid, final int fluidAmount) { + Logger.WARNING("Trying to get a fluid stack of "+vFluid.getName()); + try { + FluidStack x = FluidRegistry.getFluidStack(vFluid.getName(), fluidAmount); + return x != null ? x.copy() : null; + } + catch (final Throwable e){ + return null; + } + } + + public static FluidStack[] getFluidStackArray(final String fluidName, final int amount){ + Logger.WARNING("Trying to get a fluid stack of "+fluidName); + try { + final FluidStack[] singleFluid = {FluidRegistry.getFluidStack(fluidName, amount)}; + return singleFluid; + } + catch (final Throwable e){ + return null; + } + + } + + public static FluidStack[] getFluidStackArray(final FluidStack fluidName, final int amount){ + Logger.WARNING("Trying to get a fluid stack of "+fluidName); + try { + final FluidStack[] singleFluid = {FluidRegistry.getFluidStack(fluidName.getLocalizedName(), amount)}; + return singleFluid; + } + catch (final Throwable e){ + return null; + } + + } + + public static Fluid addGtFluid(final String aName, final String aLocalized, final GT_Materials aMaterial, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount) { + return addGtFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, true); + } + + + public static Fluid addGtFluid(final String aName, final String aLocalized, final GT_Materials aMaterial, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { + Fluid g = addGTFluid(aName, "fluid.autogenerated", aLocalized, aMaterial != null ? aMaterial.mRGBa : new short[]{255, 255, 255, 0}, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); + if (g != null) { + if (aMaterial != null) { + switch (aState) { + case 1: { + aMaterial.mFluid = (g); + break; + } + case 2: { + aMaterial.mGas = (g); + break; + } + case 3: { + aMaterial.mPlasma = (g); + break; + } + } + } + return g; + } + return null; + } + + public static Fluid addGTFluid(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { + return addGTFluid("molten."+aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); + } + + public static Fluid addGTFluidNonMolten(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { + return addGTFluid("fluid."+aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); + } + + public static Fluid addGTFluidNoPrefix(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { + return addGTFluid(aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); + } + //Gass + public static Fluid addGtGas(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateCell) { + return addGTFluid(aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount, aGenerateCell); + } + + public static Fluid addGTPlasma(final Material aMaterial) { + if (aMaterial.getLocalizedName().toLowerCase().contains("clay") || (aMaterial.getComposites().size()>1) || aMaterial.getLocalizedName().toLowerCase().contains("wrought")){ + return null; + } + Logger.INFO("Generating a "+aMaterial.getLocalizedName()+" Plasma Cell"); + if (aMaterial.vComponentCount != 1){ + Logger.INFO("Compound made from: "); + for (final MaterialStack x : aMaterial.getComposites()){ + Logger.INFO(x.getStackMaterial().getLocalizedName()); + } + Logger.INFO("Material is a composite, not generating plasma."); + return null; + } + + ItemStack temp = null; + //Generate a Cell if we need to + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellPlasma"+aMaterial.getUnlocalizedName(), 1) == null){ + new BaseItemPlasmaCell(aMaterial); + temp = aMaterial.getPlasmaCell(1); + } + else { + temp = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellPlasma"+aMaterial.getUnlocalizedName(), 1); + } + if (temp != null){ + return addGTFluid( + "plasma." + Utils.sanitizeString(aMaterial.getLocalizedName().toLowerCase()), + "plasma.autogenerated", + aMaterial.getLocalizedName() + " Plasma", + aMaterial.getRGBA(), + 3, + 10000, + temp, + ItemUtils.getEmptyCell(), + 1000, + false); + } + return null; + } + + public static Fluid addGTFluid(String aName, final String aTexture, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount, final boolean aGenerateFilledCell) { + + String aNameOriginal = aName; + Logger.INFO("Generating Fluid for "+aName); + + aName = Utils.sanitizeString(aName.toLowerCase()); + + String aLocalName = (aLocalized == null) ? aName : aLocalized; + + Fluid rFluid; + Fluid gFluid = FluidRegistry.getFluid(aName); + FluidStack aCheck = FluidUtils.getWildcardFluidStack(aName.toLowerCase(), 1000); + boolean register = false; + if (aCheck != null) { + rFluid = aCheck.getFluid(); + } + else if (gFluid != null) { + rFluid = gFluid; + } + else { + rFluid = new FluidGT6(aName, aTexture, (aRGBa != null) ? aRGBa : Dyes._NULL.getRGBA()); + register = true; + + } + + if (register) { + GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalName); + if (FluidRegistry.registerFluid(rFluid)) { + switch (aState) { + case 0: { + rFluid.setGaseous(false); + rFluid.setViscosity(10000); + break; + } + case 1: + case 4: { + rFluid.setGaseous(false); + rFluid.setViscosity(1000); + break; + } + case 2: { + rFluid.setGaseous(true); + rFluid.setDensity(-100); + rFluid.setViscosity(200); + break; + } + case 3: { + rFluid.setGaseous(true); + rFluid.setDensity(-10000); + rFluid.setViscosity(10); + rFluid.setLuminosity(15); + break; + } + } + } + } + + + String aNameNonMolten = aLocalName.contains("Molten") ? aLocalName.replace("Molten", "") : aLocalName; + + if (aFullContainer == null) { + ItemStack oreStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aLocalName, 1); + aFullContainer = oreStack; + if (aFullContainer == null) { + oreStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aNameOriginal, 1); + aFullContainer = oreStack; + if (aFullContainer == null) { + oreStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+aNameNonMolten, 1); + aFullContainer = oreStack; + if (aFullContainer != null) { + Logger.INFO("Found cell for "+aNameNonMolten); + } + } + else { + Logger.INFO("Found cell for "+aNameOriginal); + } + } + else { + Logger.INFO("Found cell for "+aLocalName); + } + } + + Item tempCell = null; + //Generate a Cell if we need to + if (aGenerateFilledCell && aFullContainer == null) { + String aMatName = aNameOriginal; + if (aMatName.contains("molten.")) { + aMatName = aMatName.replace("molten.", ""); + aMatName = aMatName.substring(0, 1).toUpperCase() + aMatName.substring(1); + } + if (aMatName.contains("fluid.")) { + aMatName = aMatName.replace("fluid.", ""); + aMatName = aMatName.substring(0, 1).toUpperCase() + aMatName.substring(1); + } + Logger.INFO("Generating cell for "+aMatName+", "+aLocalName); + tempCell = new BaseItemComponent(aMatName, aLocalName, aRGBa); + aFullContainer = ItemUtils.getSimpleStack(tempCell); + } + + if ((rFluid.getTemperature() == new Fluid("test").getTemperature()) || (rFluid.getTemperature() <= 0)) { + rFluid.setTemperature((int) (aTemperatureK)); + } + if ((aFullContainer != null) && (aEmptyContainer != null) && !FluidContainerRegistry.registerFluidContainer(new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer)) { + CORE.RA.addFluidCannerRecipe(CI.emptyCells(1), aFullContainer, new FluidStack(rFluid, aFluidAmount)); + } + else { + //Utils.LOG_INFO("Failed creating recipes to fill/empty cells of "+aName+"."); + } + return rFluid; + } + + public static boolean valid(final Object aStack) { + return (aStack != null) && (aStack instanceof ItemStack) && (((ItemStack)aStack).getItem() != null) && (((ItemStack)aStack).stackSize >= 0); + } + + public static boolean invalid(final Object aStack) { + return (aStack == null) || !(aStack instanceof ItemStack) || (((ItemStack)aStack).getItem() == null) || (((ItemStack)aStack).stackSize < 0); + } + + public static boolean equal(final ItemStack aStack1, final ItemStack aStack2) { + return equal(aStack1, aStack2, false); + } + + public static boolean equal(final ItemStack aStack1, final ItemStack aStack2, final boolean aIgnoreNBT) { + return (aStack1 != null) && (aStack2 != null) && equal_(aStack1, aStack2, aIgnoreNBT); + } + + public static boolean equal_(final ItemStack aStack1, final ItemStack aStack2, final boolean aIgnoreNBT) { + return (aStack1.getItem() == aStack2.getItem()) && (aIgnoreNBT || ((aStack1.getTagCompound() == null == (aStack2.getTagCompound() == null)) && ((aStack1.getTagCompound() == null) || aStack1.getTagCompound().equals(aStack2.getTagCompound())))) && ((meta(aStack1) == meta(aStack2)) || (meta(aStack1) == 32767) || (meta(aStack2) == 32767)); + } + + public static ItemStack copy(final Object... aStacks) { + for (final Object tStack : aStacks) { + if (valid(tStack)) { + return ((ItemStack)tStack).copy(); + } + } + return null; + } + + public static ItemStack copyMeta(final long aMetaData, final Object... aStacks) { + final ItemStack rStack = copy(aStacks); + if (invalid(rStack)) { + return null; + } + return meta(rStack, aMetaData); + } + + public static short meta(final ItemStack aStack) { + return (short)Items.feather.getDamage(aStack); + } + + public static ItemStack meta(final ItemStack aStack, final long aMeta) { + Items.feather.setDamage(aStack, (short)aMeta); + return aStack; + } + + public static ItemStack amount(final long aAmount, final Object... aStacks) { + final ItemStack rStack = copy(aStacks); + if (invalid(rStack)) { + return null; + } + rStack.stackSize = (int)aAmount; + return rStack; + } + + public static ItemStack container(final ItemStack aStack, final boolean aCheckIFluidContainerItems) { + if (invalid(aStack)) { + return null; + } + if (aStack.getItem().hasContainerItem(aStack)) { + return aStack.getItem().getContainerItem(aStack); + } + if (equal(aStack, ItemUtils.getEmptyCell(), true)) { + return null; + } + if (aCheckIFluidContainerItems && (aStack.getItem() instanceof IFluidContainerItem) && (((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0)) { + final ItemStack tStack = amount(1L, aStack); + ((IFluidContainerItem)aStack.getItem()).drain(tStack, Integer.MAX_VALUE, true); + if (!equal(aStack, tStack)) { + return tStack; + } + return null; + } + if (equal(aStack, ItemList.IC2_ForgeHammer.get(1)) || equal(aStack, ItemList.IC2_WireCutter.get(1))) { + return copyMeta(meta(aStack) + 1, aStack); + } + return null; + } + + public static ItemStack container(final ItemStack aStack, final boolean aCheckIFluidContainerItems, final int aStacksize) { + return amount(aStacksize, container(aStack, aCheckIFluidContainerItems)); + } + + public final static Fluid generateFluid(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, boolean aGenerateCell){ + FluidStack aFStack = (FluidUtils.getFluidStack("molten"+"."+unlocalizedName.toLowerCase(), 1)); + if (aFStack == null){ + Logger.WARNING("Generating our own fluid."); +/* ItemStack cell = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1); + if (cell == null){ + final Item temp = new BaseItemComponent(unlocalizedName, localizedName, RGBA); + cell = ItemUtils.getSimpleStack(temp); + }*/ + final Fluid gtFluid = FluidUtils.addGTFluid( + unlocalizedName, + "Molten "+localizedName, + RGBA, + 4, + MeltingPoint, + null, + ItemUtils.getEmptyCell(), + 1000, + aGenerateCell); + + return gtFluid; + } + else { + Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName+", ALREADY EXISTS"); + return aFStack.getFluid(); + } + } + + public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell){ + return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, null, null, 0, aGenerateCell); + } + + + public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2){ + return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, dustStack, dustStack2, 144, true); + } + + public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final ItemStack dustStack, final ItemStack dustStack2, final boolean aGenerateCell){ + return generateFluidNonMolten(unlocalizedName, localizedName, MeltingPoint, RGBA, dustStack, dustStack2, 144, aGenerateCell); + } + + public final static Fluid generateFluidNonMolten(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, ItemStack dustStack, final ItemStack dustStack2, final int amountPerItem, final boolean aGenerateCell){ + if (dustStack == null){ + dustStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+Utils.sanitizeString(localizedName), 1); + } + FluidStack aFStack = (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1)); + if (aFStack == null){ + Logger.WARNING("Generating our own fluid."); + + final Fluid gtFluid = FluidUtils.addGTFluidNonMolten( + unlocalizedName, + localizedName, + RGBA, + 4, + MeltingPoint, + null, + ItemUtils.getEmptyCell(), + 1000, + aGenerateCell); + + if (dustStack != null){ + CORE.RA.addFluidExtractionRecipe( + dustStack, //Input 2 + FluidUtils.getFluidStack(gtFluid, amountPerItem), //Fluid Output + 1*20, //Duration + 16 //Eu Tick + ); + } + if (dustStack2 != null){ + CORE.RA.addFluidExtractionRecipe( + dustStack2, //Input 2 + FluidUtils.getFluidStack(gtFluid, amountPerItem), //Fluid Output + 1*20, //Duration + 16 //Eu Tick + ); + } + + return gtFluid; + } + else { + Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName+", ALREADY EXISTS"); + return aFStack.getFluid(); + } + } + + public final static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA){ + return generateFluidNoPrefix(unlocalizedName, localizedName, MeltingPoint, RGBA, true); + } + + public final static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell){ + Fluid gtFluid; + if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null){ + Logger.WARNING("Generating our own fluid."); + gtFluid = FluidUtils.addGTFluidNoPrefix( + unlocalizedName, + localizedName, + RGBA, + 4, + MeltingPoint, + null, + ItemUtils.getEmptyCell(), + 1000, + aGenerateCell); + } + else { + gtFluid = FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1).getFluid(); + } + //Generate a Cell if we need to +// if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){ +// new BaseItemCell(unlocalizedName, localizedName, RGBA, gtFluid); +// } + return gtFluid; + } + + public final static Fluid generateGas(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA, final boolean aGenerateCell){ + Fluid gtFluid; + if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null){ + Logger.WARNING("Generating our own gas."); + gtFluid = FluidUtils.addGtGas( + unlocalizedName, + localizedName, + RGBA, + 3, + MeltingPoint, + null, + ItemUtils.getEmptyCell(), + 1000, + aGenerateCell); + } + else { + gtFluid = FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1).getFluid(); + } + //Generate a Cell if we need to +/* if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){ + new BaseItemCell(unlocalizedName, localizedName, RGBA, gtFluid); + }*/ + return gtFluid; + } + + + + + public static FluidStack getMobEssence(final int amount){ + return EnchantingUtils.getMobEssence(amount); + } + + public static FluidStack getLiquidXP(final int amount){ + return EnchantingUtils.getLiquidXP(amount); + } + + public static boolean doesFluidExist(String aFluidName) { + FluidStack aFStack1 = (FluidUtils.getFluidStack("molten"+"."+aFluidName.toLowerCase(), 1)); + FluidStack aFStack2 = (FluidUtils.getFluidStack("fluid"+"."+aFluidName.toLowerCase(), 1)); + FluidStack aFStack3 = (FluidUtils.getFluidStack(aFluidName.toLowerCase(), 1)); + FluidStack aFStack4 = (FluidUtils.getFluidStack(aFluidName, 1)); + FluidStack aFStack5 = (FluidUtils.getFluidStack("liquid_"+aFluidName.toLowerCase(), 1)); + FluidStack aFStack6 = (FluidUtils.getFluidStack("liquid"+"."+aFluidName.toLowerCase(), 1)); + return aFStack1 != null || aFStack2 != null || aFStack3 != null || aFStack4 != null || aFStack5 != null || aFStack6 != null; + } + + public static FluidStack getWildcardFluidStack(String aFluidName, int amount) { + FluidStack aFStack1 = (FluidUtils.getFluidStack(aFluidName, amount)); + FluidStack aFStack2 = (FluidUtils.getFluidStack(aFluidName.toLowerCase(), amount)); + FluidStack aFStack3 = (FluidUtils.getFluidStack("molten"+"."+aFluidName.toLowerCase(), amount)); + FluidStack aFStack4 = (FluidUtils.getFluidStack("fluid"+"."+aFluidName.toLowerCase(), amount)); + FluidStack aFStack5 = (FluidUtils.getFluidStack("liquid_"+aFluidName.toLowerCase(), amount)); + FluidStack aFStack6 = (FluidUtils.getFluidStack("liquid"+"."+aFluidName.toLowerCase(), amount)); + if (aFStack1 != null) { + return aFStack1; + } + if (aFStack2 != null) { + return aFStack2; + } + if (aFStack3 != null) { + return aFStack3; + } + if (aFStack4 != null) { + return aFStack4; + } + if (aFStack5 != null) { + return aFStack5; + } + if (aFStack6 != null) { + return aFStack6; + } + return null; + } + + public static FluidStack getWildcardFluidStack(Materials aMaterial, int amount) { + FluidStack aFStack1 = aMaterial.getFluid(amount); + FluidStack aFStack2 = aMaterial.getGas(amount); + FluidStack aFStack3 = aMaterial.getMolten(amount); + FluidStack aFStack4 = aMaterial.getSolid(amount); + if (aFStack1 != null) { + return aFStack1; + } + else if (aFStack2 != null) { + return aFStack2; + } + else if (aFStack3 != null) { + return aFStack3; + } + else if (aFStack4 != null) { + return aFStack4; + } + else { + return null; + } + } + + public static FluidStack getAir(int aAmount) { + return FluidUtils.getFluidStack("air", aAmount); + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java new file mode 100644 index 0000000000..9f5d4f36ca --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java @@ -0,0 +1,60 @@ +package gtPlusPlus.core.util.minecraft; + +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.init.Items; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; + +public class FoodUtils { + + public static final Class IEdibleClass; + + static { + IEdibleClass = ReflectionUtils.getClass("squeek.applecore.api.food.IEdible"); + } + + public static boolean isFood(ItemStack food) { + + if (food == null) { + return false; + } + + Item item = food.getItem(); + + if(item == null) { + return false; + } + + EnumAction action = item.getItemUseAction(food); + + if(item instanceof ItemBlock || action == EnumAction.eat || action == EnumAction.drink) { + if(getUnmodifiedFoodValues(food) > 0) { + return true; + } + } + + return false; + } + + private static int getUnmodifiedFoodValues(ItemStack stack) { + + if (stack == null) { + return 0; + } + + Item item = stack.getItem(); + + if(item == null) { + return 0; + } + + if(IEdibleClass.isInstance(item) || item instanceof ItemFood || item == Items.cake) { + return 1; + } + + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/HazmatUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/HazmatUtils.java new file mode 100644 index 0000000000..b322036ef7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/HazmatUtils.java @@ -0,0 +1,604 @@ +package gtPlusPlus.core.util.minecraft; + +import static gregtech.api.GregTech_API.*; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.HashMap; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.objects.GT_HashSet; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.GTplusplus.INIT_PHASE; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import ic2.core.Ic2Items; +import ic2.core.item.armor.ItemArmorHazmat; +import ic2.core.item.armor.ItemArmorNanoSuit; +import ic2.core.item.armor.ItemArmorQuantumSuit; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; + +public class HazmatUtils { + + public static final GT_HashSet sHazmatList = new GT_HashSet(); + + private static final HashMap> mToolTips = new HashMap>(); + + private static boolean mInit = false; + private static HazmatUtils mInstance; + + @SuppressWarnings("rawtypes") + public static void init() { + if (mInit) { + return; + } + //doInit(); Disabled, hazmat moved to gt5u + } + public static void doInit() { + + mInstance = new HazmatUtils(); + + sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatHelmet, 1)); + sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatChestplate, 1)); + sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatLeggings, 1)); + sHazmatList.add(ItemUtils.getSimpleStack(Ic2Items.hazmatBoots, 1)); + + // Make Nano a hazmat suit + // Make Quantum a hazmat suit + + + if (LoadedMods.IndustrialCraft2 || LoadedMods.IndustrialCraft2Classic) { + AutoMap aVanillaIC2Armour = new AutoMap(); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoHelmet, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoBodyarmor, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoLeggings, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.nanoBoots, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumHelmet, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumBodyarmor, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumLeggings, 1)); + aVanillaIC2Armour.add(ItemUtils.getSimpleStack(Ic2Items.quantumBoots, 1)); + for (ItemStack aItem : aVanillaIC2Armour) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered IC2 Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("EMT")) { + AutoMap aItemFields = new AutoMap(); + Class aItemsEMT = ReflectionUtils.getClass("emt.init.EMTItems"); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "nanoThaumicHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "nanoWing")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "nanoBootsTraveller")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumThaumicHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumWing")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumArmor")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "quantumBootsTraveller")); + AutoMap aEMT = new AutoMap(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aEMT.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsEMT.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aEMT.size()+" EMT Items as hazmat gear."); + for (ItemStack aItem : aEMT) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered EMT Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("DraconicEvolution")) { + AutoMap aItemFields = new AutoMap(); + Class aItemsDE = ReflectionUtils.getClass("com.brandon3055.draconicevolution.ModItems"); + + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicChest")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicLeggs")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicBoots")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernChest")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernLeggs")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernBoots")); + AutoMap aItemMap = new AutoMap(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsDE.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Draconic Evolution Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Draconic Evolution Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("TaintedMagic")) { + AutoMap aItemFields = new AutoMap(); + Class aItemsTaintedMagic = ReflectionUtils.getClass("taintedmagic.common.registry.ItemRegistry"); + + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressChestplate")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressLeggings")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemVoidwalkerBoots")); + AutoMap aItemMap = new AutoMap(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Tainted Magic Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Tainted Magic Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("WitchingGadgets")) { + AutoMap aItemFields = new AutoMap(); + Class aItemsTaintedMagic = ReflectionUtils.getClass("witchinggadgets.common.WGContent"); + + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialChest")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialLegs")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialBoots")); + AutoMap aItemMap = new AutoMap(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Witching Gadgets Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Witching Gadgets Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("ThaumicTinkerer")) { + /* + AutoMap aItems = new AutoMap(); + Class aMainTT = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); + Class aItemRegistryTT = ReflectionUtils.getClass("thaumic.tinkerer.common.registry.TTRegistry"); + Field aRegistryInstance = ReflectionUtils.getField(aMainTT, "registry"); + Object aRegistry = ReflectionUtils.getFieldValue(aRegistryInstance); + Method aFuckingStupidMethodHandlingMethod = ReflectionUtils.getMethod(aItemRegistryTT, "getFirstItemFromClass", new Class[] {Class.class}); + Item aIchorHelm = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemHelm")}); + Item aIchorChest = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemChest")}); + Item aIchorLegs = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemLegs")}); + Item aIchorBoots = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemBoots")}); + aItems.add(aIchorHelm); + aItems.add(aIchorChest); + aItems.add(aIchorLegs); + aItems.add(aIchorBoots); + AutoMap aItemMap = new AutoMap(); + int aIndex = 0; + for (Item aItem : aItems) { + Item aItemObject = null; + if (aItem != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get item "+aIndex+" from "+aItemRegistryTT.getName()); + } + aIndex++; + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Thaumic Tinkerer Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Thaumic Tinkerer Items as hazmat gear."); + */ + Logger.INFO("[Hazmat] Did not register Thaumic Tinkerer Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("GraviSuite")) { + AutoMap aItemFields = new AutoMap(); + Class aItemsGravisuite = ReflectionUtils.getClass("gravisuite.GraviSuite"); + aItemFields.add(ReflectionUtils.getField(aItemsGravisuite, "advNanoChestPlate")); + aItemFields.add(ReflectionUtils.getField(aItemsGravisuite, "graviChestPlate")); + AutoMap aGravisuite = new AutoMap(); + for (Field aItemField : aItemFields) { + Item aItemObject = (Item) ReflectionUtils.getFieldValue(aItemField); + if (aItemObject != null) { + aGravisuite.add(ItemUtils.getSimpleStack(aItemObject)); + } + } + Logger.INFO("[Hazmat] Registering "+aGravisuite.size()+" Gravisuit Items as hazmat gear."); + for (ItemStack aItem : aGravisuite) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Gravisuit Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("AdvancedSolarPanel")) { + AutoMap aItemFields = new AutoMap(); + Class aItemsEMT = ReflectionUtils.getClass("advsolar.common.AdvancedSolarPanel"); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "advancedSolarHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "hybridSolarHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsEMT, "ultimateSolarHelmet")); + AutoMap aASP = new AutoMap(); + for (Field aItemField : aItemFields) { + Item aItemObject = (Item) ReflectionUtils.getFieldValue(aItemField); + if (aItemObject != null) { + aASP.add(ItemUtils.getSimpleStack(aItemObject)); + } + } + Logger.INFO("[Hazmat] Registering "+aASP.size()+" Adv. Solar Items as hazmat gear."); + for (ItemStack aItem : aASP) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Adv. Solar Items as hazmat gear."); + } + + Utils.registerEvent(mInstance); + Logger.INFO("[Hazmat] Registered Tooltip handler for hazmat gear."); + mInit = true; + + } + + private final static String mToolTipText = "Provides protection from:"; + + @SubscribeEvent + public void onItemTooltip(ItemTooltipEvent event) { + //Logger.INFO("Ticking Hazmat handler"); + if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { + + if (event.itemStack == null || isVanillaHazmatPiece(event.itemStack)) { + //Logger.INFO("[Hazmat] Invalid Itemstack or vanilla hazmat"); + return; + } else { + ItemStack aStackTemp = event.itemStack; + GT_ItemStack aStack = new GT_ItemStack(aStackTemp); + if (isNanoArmourPiece(aStackTemp) || isQuantumArmourPiece(aStackTemp)) { + event.toolTip.add(EnumChatFormatting.DARK_PURPLE+"Provides full hazmat protection."); + } + else { + //Logger.INFO("[Hazmat] Finding Tooltip Data"); + String[] aTooltips = getTooltips(aStack); + if (aTooltips == null || aTooltips.length == 0) { + //Logger.INFO("[Hazmat] No Info!"); + return; + } else { + //Logger.INFO("[Hazmat] Found Tooltips!"); + if (providesProtection(aStackTemp)) { + event.toolTip.add(EnumChatFormatting.LIGHT_PURPLE+"Provides full hazmat protection."); + } else { + event.toolTip.add(mToolTipText); + for (String r : aTooltips) { + event.toolTip.add(" - " + r); + } + } + } + } + } + } + } + + /** + * Static function to replace + * {@link #ic2.core.item.armor.ItemArmorHazmat.hasCompleteHazmat(EntityLivingBase)}. + * Because IC2 doesn't let us register things ourself, anything registered via + * GT/GT++ will return true. + * + * @param living - Entity Wearing Armour + * @return - Does {@link EntityLivingBase} have a full hazmat suit on? + */ + public static boolean hasCompleteHazmat(EntityLivingBase living) { + // Entity is Null, cannot have Hazmat. + if (living == null || living.isDead) { + return false; + } else { + + // Map All Player Armour slots + AutoMap aEquipment = new AutoMap(); + for (int i = 1; i < 5; ++i) { + ItemStack stack = living.getEquipmentInSlot(i); + + // Item is Null, cannot have full suit + if (stack == null) { + return false; + } else { + aEquipment.put(stack); + } + } + + // Compare Equipment to all items mapped for full hazmat. + for (ItemStack aSlotStack : aEquipment) { + if (!isHazmatPiece(aSlotStack)) { + //Logger.INFO("Found item which is not hazmat. "+ItemUtils.getItemName(aSlotStack)); + return false; + } + } + + // We are in some kind of full hazmat, huzzah! + //Logger.INFO("Has full hazmat."); + return true; + } + } + + /** + * Is this item vanilla IC2 hazmat? + * + * @param aArmour - The Armour to provide protection. + * @return + */ + public static boolean isVanillaHazmatPiece(ItemStack aArmour) { + return aArmour != null ? aArmour.getItem() instanceof ItemArmorHazmat : false; + } + + /** + * Is this item vanilla IC2 Nanosuit? + * + * @param aArmour - The Armour to provide protection. + * @return + */ + public static boolean isNanoArmourPiece(ItemStack aArmour) { + return aArmour != null ? aArmour.getItem() instanceof ItemArmorNanoSuit : false; + } + + /** + * Is this item vanilla IC2 Quantum? + * + * @param aArmour - The Armour to provide protection. + * @return + */ + public static boolean isQuantumArmourPiece(ItemStack aArmour) { + return aArmour != null ? aArmour.getItem() instanceof ItemArmorQuantumSuit : false; + } + + /** + * Is this item a registered piece of full hazmat? (Provides all 6 protections) + * + * @param aStack - The Armour to provide protection. + * @return + */ + public static boolean isHazmatPiece(ItemStack aStack) { + return isVanillaHazmatPiece(aStack) || providesProtection(aStack); + } + + /** + * Registers the {@link ItemStack} to all types of protection. Provides full + * hazmat protection. Frost, Fire, Bio, Gas, Radioaton & Electricity. + * + * @param aStack - The Armour to provide protection. + * @return - Did we register this ItemStack properly? + */ + public static boolean addProtection(ItemStack aVanStack) { + if (!ItemUtils.checkForInvalidItems(aVanStack)) { + Logger.INFO("=================Bad Hazmat Addition======================"); + Logger.INFO("Called from: "+ReflectionUtils.getMethodName(0)); + Logger.INFO(ReflectionUtils.getMethodName(1)); + Logger.INFO(ReflectionUtils.getMethodName(2)); + Logger.INFO(ReflectionUtils.getMethodName(3)); + Logger.INFO(ReflectionUtils.getMethodName(4)); + Logger.INFO(ReflectionUtils.getMethodName(5)); + Logger.INFO(ReflectionUtils.getMethodName(6)); + Logger.INFO("=========================================================="); + return false; + } + Logger.INFO("[Hazmat] Registering " + ItemUtils.getItemName(aVanStack) + " for full Hazmat protection."); + GT_ItemStack aStack = getGtStackFromVanilla(aVanStack); + AutoMap aAdded = new AutoMap(); + aAdded.put(addProtection_Frost(aStack)); + aAdded.put(addProtection_Fire(aStack)); + aAdded.put(addProtection_Biohazard(aStack)); + aAdded.put(addProtection_Gas(aStack)); + aAdded.put(addProtection_Radiation(aStack)); + aAdded.put(addProtection_Electricty(aStack)); + for (boolean b : aAdded) { + if (!b) { + return false; + } + } + Logger.INFO("[Hazmat] Protection added for all 6 damage types, registering to master Hazmat list."); + sHazmatList.add(aStack); + return true; + } + + public static boolean addProtection_Frost(GT_ItemStack aStack) { + registerTooltip(aStack, EnumChatFormatting.AQUA + "Frost"); + return addProtection_Generic(sFrostHazmatList, aStack); + } + + public static boolean addProtection_Fire(GT_ItemStack aStack) { + registerTooltip(aStack, EnumChatFormatting.DARK_RED + "Heat"); + return addProtection_Generic(sHeatHazmatList, aStack); + } + + public static boolean addProtection_Biohazard(GT_ItemStack aStack) { + registerTooltip(aStack, EnumChatFormatting.GREEN + "Biohazards"); + return addProtection_Generic(sBioHazmatList, aStack); + } + + public static boolean addProtection_Gas(GT_ItemStack aStack) { + registerTooltip(aStack, EnumChatFormatting.WHITE + "Gas"); + return addProtection_Generic(sGasHazmatList, aStack); + } + + public static boolean addProtection_Radiation(GT_ItemStack aStack) { + registerTooltip(aStack, EnumChatFormatting.DARK_GREEN + "Radiation"); + return addProtection_Generic(sRadioHazmatList, aStack); + } + + public static boolean addProtection_Electricty(GT_ItemStack aStack) { + registerTooltip(aStack, EnumChatFormatting.YELLOW + "Electricity"); + return addProtection_Generic(sElectroHazmatList, aStack); + } + + private static boolean addProtection_Generic(GT_HashSet aSet, GT_ItemStack aStack) { + int aMapSize = aSet.size(); + aSet.add(aStack); + return aMapSize < aSet.size(); + } + + /** + * Does this item provide hazmat protection? (Protection against Frost, Heat, + * Bio, Gas, Rads, Elec) An item may return false even if it protects against + * all six damage types. This is because it's not actually registered as hazmat + * correct. + * + * @param aStack - The item to check for protection + * @return + */ + public static boolean providesProtection(ItemStack aStack) { + return providesProtetion_Generic(sHazmatList, aStack); + } + + public static boolean providesProtetion_Frost(ItemStack aStack) { + return providesProtetion_Generic(sFrostHazmatList, aStack); + } + + public static boolean providesProtetion_Fire(ItemStack aStack) { + return providesProtetion_Generic(sHeatHazmatList, aStack); + } + + public static boolean providesProtetion_Biohazard(ItemStack aStack) { + return providesProtetion_Generic(sBioHazmatList, aStack); + } + + public static boolean providesProtetion_Gas(ItemStack aStack) { + return providesProtetion_Generic(sGasHazmatList, aStack); + } + + public static boolean providesProtetion_Radiation(ItemStack aStack) { + return providesProtetion_Generic(sRadioHazmatList, aStack); + } + + public static boolean providesProtetion_Electricity(ItemStack aStack) { + return providesProtetion_Generic(sElectroHazmatList, aStack); + } + + private static boolean providesProtetion_Generic(GT_HashSet aSet, ItemStack aStack) { + if (isVanillaHazmatPiece(aStack)) { + return true; + } + for (GT_ItemStack o : aSet) { + if (o != null && o.mItem != null && aStack != null && aStack.getItem() != null) { + if (GT_Utility.areStacksEqual(o.toStack(), aStack, true)) { + return true; + } + if (o.isStackEqual(aStack)){ + return true; + } + if (o.mItem == aStack.getItem() && EnergyUtils.EU.isElectricItem(aStack)) { + return true; + } + } + } + return false; + } + + private static String[] getTooltips(GT_ItemStack aStack) { + String aKey = convertGtItemstackToStringDataIgnoreDamage(aStack); + AutoMap aTempTooltipData = mToolTips.get(aKey); + if (aTempTooltipData == null || aTempTooltipData.isEmpty()) { + //Logger.INFO("[Hazmat] Item was not mapped for TTs - "+aKey); + return new String[] {}; + } else { + //Logger.INFO("[Hazmat] Item was mapped for TTs"); + //Collections.sort(aTempTooltipData); + //Logger.INFO("[Hazmat] Sorted TTs"); + + String[] mBuiltOutput = new String[aTempTooltipData.size()]; + int aIndex = 0; + for (String i : aTempTooltipData) { + mBuiltOutput[aIndex++] = i; + } + + return mBuiltOutput; + } + } + + private static void registerTooltip(GT_ItemStack aStack, String aTooltip) { + String aKey = convertGtItemstackToStringDataIgnoreDamage(aStack); + Logger.INFO("[Hazmat] Mapping " + aTooltip + " for " + aKey); + AutoMap aTempTooltipData = mToolTips.get(aKey); + if (aTempTooltipData == null) { + Logger.INFO("No data mapped yet, creating."); + aTempTooltipData = new AutoMap(); + mToolTips.put(aKey, aTempTooltipData); + } + aTempTooltipData.add(aTooltip); + } + + public static ItemStack getStackFromGtStack(GT_ItemStack aGtStack) { + return ItemUtils.simpleMetaStack(aGtStack.mItem, aGtStack.mMetaData, aGtStack.mStackSize); + } + + public static GT_ItemStack getGtStackFromVanilla(ItemStack aStack) { + return new GT_ItemStack(aStack); + } + + private static String convertGtItemstackToStringData(GT_ItemStack aStack) { + if (aStack == null) { + return "NULL"; + } else { + return aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData + "." + aStack.mStackSize; + } + } + + private static String convertGtItemstackToStringDataIgnoreDamage(GT_ItemStack aStack) { + if (aStack == null) { + return "NULL"; + } else { + return aStack.mItem.getUnlocalizedName() + "." + aStack.mStackSize; + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/InventoryUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/InventoryUtils.java new file mode 100644 index 0000000000..fe67c88d69 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/InventoryUtils.java @@ -0,0 +1,88 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.Random; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class InventoryUtils { + + private final static Random mRandom = new Random(); + + public static void dropInventoryItems(World world, int x, int y, int z, Block block) { + TileEntity tileentity = world.getTileEntity(x, y, z); + + if (tileentity != null && tileentity instanceof IInventory && ((IInventory) tileentity).getSizeInventory() > 0) { + + IInventory aTileInv = (IInventory) tileentity; + int aMinSlot = 0; + int aMaxSlot = aTileInv.getSizeInventory()-1; + + for (int i1 = aMinSlot; i1 < aMaxSlot; ++i1) { + ItemStack itemstack = aTileInv.getStackInSlot(i1); + + if (itemstack != null) { + float f = mRandom.nextFloat() * 0.8F + 0.1F; + float f1 = mRandom.nextFloat() * 0.8F + 0.1F; + EntityItem entityitem; + + for (float f2 = mRandom.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem)) { + int j1 = mRandom.nextInt(21) + 10; + + if (j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } + + itemstack.stackSize -= j1; + entityitem = new EntityItem(world, x + f, y + f1, z + f2, + new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + float f3 = 0.05F; + entityitem.motionX = (float) mRandom.nextGaussian() * f3; + entityitem.motionY = (float) mRandom.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) mRandom.nextGaussian() * f3; + + if (itemstack.hasTagCompound()) { + entityitem.getEntityItem() + .setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } + } + } + } + + world.func_147453_f(x, y, z, block); + } + + } + + public static void sortInventoryItems(MetaTileEntity aTile) { + sortInventoryItems(aTile.getBaseMetaTileEntity()); + } + + public static void sortInventoryItems(IGregTechTileEntity aBaseMetaTileEntity) { + IInventory mInv = aBaseMetaTileEntity.getIInventory(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()); + AutoMap aInvContents = new AutoMap(); + int aSize = mInv.getSizeInventory(); + for (int slot=0; slot Short.MAX_VALUE) { + meta = 0; + } + if (size < 0 || size > 64) { + size = 1; + } + //Logger.INFO("Found Metastack: " + item.getUnlocalizedName() + ":" + meta); + //Logger.INFO(""+ReflectionUtils.getMethodName(0)); + //Logger.INFO(""+ReflectionUtils.getMethodName(1)); + //Logger.INFO(""+ReflectionUtils.getMethodName(2)); + //Logger.INFO(""+ReflectionUtils.getMethodName(3)); + //Logger.INFO(""+ReflectionUtils.getMethodName(4)); + final ItemStack metaStack = new ItemStack(item, size, meta); + return metaStack; + } + + public static ItemStack simpleMetaStack(final Block block, final int meta, final int size) { + return simpleMetaStack(Item.getItemFromBlock(block), meta, size); + } + + public static ItemStack getCorrectStacktype(final String fqrn, final int stackSize) { + final String oreDict = "ore:"; + ItemStack temp; + if (fqrn.toLowerCase().contains(oreDict.toLowerCase())) { + final String sanitizedName = fqrn.replace(oreDict, ""); + temp = ItemUtils.getItemStackFromFQRN(sanitizedName, stackSize); + return temp; + } + final String[] fqrnSplit = fqrn.split(":"); + String temp1; + String temp2; + temp1 = fqrnSplit[1]; + if (fqrnSplit.length < 3) { + temp2 = "0"; + } else { + temp2 = fqrnSplit[2]; + } + temp = ItemUtils.getItemStackWithMeta(LoadedMods.MiscUtils, fqrn, temp1, Integer.parseInt(temp2), stackSize); + return temp; + } + + public static ItemStack getCorrectStacktype(final Object item_Input, final int stackSize) { + if (item_Input instanceof String) { + return getItemStackOfAmountFromOreDictNoBroken((String) item_Input, stackSize); + } else if (item_Input instanceof ItemStack) { + return (ItemStack) item_Input; + } + return null; + } + + public static Item getItemFromFQRN(final String fqrn) // fqrn = fully qualified resource name + { + final String[] fqrnSplit = fqrn.split(":"); + return GameRegistry.findItem(fqrnSplit[0], fqrnSplit[1]); + } + + public static ItemStack getItemStackFromFQRN(final String fqrn, final int Size) // fqrn = fully qualified resource name + { + Logger.INFO("Trying to split string '"+fqrn+"'."); + final String[] fqrnSplit = fqrn.split(":"); + if (fqrnSplit.length < 2) { + return null; + } + else { + if (fqrnSplit.length == 2) { + Logger.INFO("Mod: "+fqrnSplit[0]+", Item: "+fqrnSplit[1]); + return GameRegistry.findItemStack(fqrnSplit[0], fqrnSplit[1], Size); + } + else if (fqrnSplit.length == 3 && fqrnSplit[2] != null && fqrnSplit[2].length() > 0) { + Logger.INFO("Mod: "+fqrnSplit[0]+", Item: "+fqrnSplit[1]+", Meta: "+fqrnSplit[2]); + ItemStack aStack = GameRegistry.findItemStack(fqrnSplit[0], fqrnSplit[1], Size); + int aMeta = Integer.parseInt(fqrnSplit[2]); + if (aStack != null && (aMeta >= 0 && aMeta <= Short.MAX_VALUE)){ + return ItemUtils.simpleMetaStack(aStack, aMeta, Size); + } + else { + Logger.INFO("Could not find instance of Item: "+fqrnSplit[1]); + + } + } + + } + return null; + } + + public static void generateSpawnEgg(final String entityModID, final String parSpawnName, final int colourEgg, + final int colourOverlay) { + final Item itemSpawnEgg = new BasicSpawnEgg(entityModID, parSpawnName, colourEgg, colourOverlay) + .setUnlocalizedName("spawn_egg_" + parSpawnName.toLowerCase()) + .setTextureName(CORE.MODID + ":spawn_egg"); + GameRegistry.registerItem(itemSpawnEgg, "spawnEgg" + parSpawnName); + } + + public static ItemStack[] validItemsForOreDict(final String oredictName) { + final List validNames = MaterialUtils.oreDictValuesForEntry(oredictName); + final ItemStack[] inputs = new ItemStack[validNames.size()]; + for (int i = 0; i < validNames.size(); i++) { + inputs[i] = (ItemStack) validNames.get(i); + } + return inputs; + } + + public static ItemStack getItemStackOfAmountFromOreDict(String oredictName, final int amount) { + String mTemp = oredictName; + + if (oredictName.contains("-") || oredictName.contains("_")) { + mTemp = Utils.sanitizeString(mTemp, new char[] {'-', '_'}); + } + else { + mTemp = Utils.sanitizeString(mTemp); + } + + + + if (oredictName.contains("rod")) { + String s = "stick"+oredictName.substring(3); + oredictName = s; + } + + // Banned Materials and replacements for GT5.8 compat. + + if (oredictName.toLowerCase().contains("ingotclay")) { + return getSimpleStack(Items.clay_ball, amount); + } + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + if (oredictName.toLowerCase().contains("rutile")) { + mTemp = oredictName.replace("Rutile", "Titanium"); + } + if (oredictName.toLowerCase().contains("vanadiumsteel")) { + mTemp = oredictName.replace("VanadiumSteel", "StainlessSteel"); + } + } + final ArrayList oreDictList = OreDictionary.getOres(mTemp); + if (!oreDictList.isEmpty()) { + final ItemStack returnValue = oreDictList.get(0).copy(); + returnValue.stackSize = amount; + return returnValue; + } + Logger.INFO("Failed to find `" + oredictName + "` in OD."); + return getErrorStack(amount, oredictName+" x"+amount); + //return getItemStackOfAmountFromOreDictNoBroken(mTemp, amount); + } + + public static ItemStack getItemStackOfAmountFromOreDictNoBroken(String oredictName, final int amount) { + if (CORE_Preloader.DEBUG_MODE) { + Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(1)); + Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(2)); + Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(3)); + Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(4)); + Logger.WARNING("Looking up: " + oredictName + " - from method: " + ReflectionUtils.getMethodName(5)); + } + + try { + + if (oredictName.contains("-") || oredictName.contains("_")) { + oredictName = Utils.sanitizeString(oredictName, new char[] {'-', '_'}); + } + else { + oredictName = Utils.sanitizeString(oredictName); + } + + // Adds a check to grab dusts using GT methodology if possible. + ItemStack returnValue = null; + if (oredictName.toLowerCase().contains("dust")) { + final String MaterialName = oredictName.toLowerCase().replace("dust", ""); + final Materials m = Materials.get(MaterialName); + if (m != null && m != Materials._NULL) { + returnValue = getGregtechDust(m, amount); + if (checkForInvalidItems(returnValue)) { + return returnValue; + } + } + } + if (returnValue == null) { + returnValue = getItemStackOfAmountFromOreDict(oredictName, amount); + if (ItemUtils.checkForInvalidItems(returnValue)) { + return returnValue.copy(); + } + } + + Logger.RECIPE(oredictName + " was not valid."); + return null; + } catch (final Throwable t) { + return null; + } + } + + public static ItemStack getGregtechDust(final Materials material, final int amount) { + final ItemStack returnValue = GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L); + if (returnValue != null) { + if (ItemUtils.checkForInvalidItems(returnValue)) { + return returnValue.copy(); + } + } + Logger.WARNING(material + " was not valid."); + return null; + } + + // NullFormula + public static Item[] generateSpecialUseDusts(final String unlocalizedName, final String materialName, + final int Colour) { + return generateSpecialUseDusts(unlocalizedName, materialName, "NullFormula", Colour); + } + + public static Item[] generateSpecialUseDusts(final String unlocalizedName, final String materialName, + String mChemForm, final int Colour) { + final Item[] output = { + new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, mChemForm, Colour, "Dust"), + new BaseItemDustUnique("itemDustSmall" + unlocalizedName, materialName, mChemForm, Colour, "Small"), + new BaseItemDustUnique("itemDustTiny" + unlocalizedName, materialName, mChemForm, Colour, "Tiny") }; + + //Generate Shaped/Shapeless Recipes + + final ItemStack normalDust = ItemUtils.getSimpleStack(output[0]); + final ItemStack smallDust = ItemUtils.getSimpleStack(output[1]); + final ItemStack tinyDust = ItemUtils.getSimpleStack(output[2]); + + CORE.RA.addpackagerRecipe(ItemList.Schematic_Dust.get(0), smallDust, tinyDust, normalDust); + + if (ItemUtils.checkForInvalidItems(tinyDust) && ItemUtils.checkForInvalidItems(normalDust)) { + if (RecipeUtils.addShapedRecipe( + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + normalDust)){ + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+materialName+" - Success"); + } + else { + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+materialName+" - Failed"); + } + + if (RecipeUtils.addShapedRecipe( + normalDust, null, null, + null, null, null, + null, null, null, + ItemUtils.getSimpleStack(tinyDust, 9))){ + Logger.WARNING("9 Tiny dust from 1 Recipe: "+materialName+" - Success"); + } + else { + Logger.WARNING("9 Tiny dust from 1 Recipe: "+materialName+" - Failed"); + } + } + + if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(normalDust)) { + if (RecipeUtils.addShapedRecipe( + smallDust, smallDust, null, + smallDust, smallDust, null, + null, null, null, + normalDust)){ + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+materialName+" - Success"); + } + else { + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+materialName+" - Failed"); + } + if (RecipeUtils.addShapedRecipe( + null, normalDust, null, + null, null, null, + null, null, null, + ItemUtils.getSimpleStack(smallDust, 4))){ + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+materialName+" - Success"); + } + else { + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+materialName+" - Failed"); + } + } + + return output; + } + + public static Item generateSpecialUsePlate(final String internalName, final String displayName, final short[] rgb, + final int radioactivity) { + return generateSpecialUsePlate(internalName, displayName, Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2]), + radioactivity); + } + + public static Item generateSpecialUsePlate(final String internalName, final String displayName, + final String mFormula, final short[] rgb, final int radioactivity) { + return generateSpecialUsePlate(internalName, displayName, mFormula, Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2]), + radioactivity); + } + + public static Item generateSpecialUsePlate(final String internalName, final String displayName, final int rgb, + final int radioactivity) { + return new BaseItemPlate_OLD(internalName, displayName, rgb, radioactivity); + } + + public static Item generateSpecialUsePlate(final String internalName, final String displayName, + final String mFormula, final int rgb, final int radioactivity) { + return new BaseItemPlate_OLD(internalName, displayName, mFormula, rgb, radioactivity); + } + + + public static Item[] generateSpecialUseDusts(final Material material, final boolean onlyLargeDust) { + return generateSpecialUseDusts(material, onlyLargeDust, false); + } + + public static Item[] generateSpecialUseDusts(final Material material, final boolean onlyLargeDust, final boolean disableExtraRecipes) { + final String materialName = material.getLocalizedName(); + final String unlocalizedName = Utils.sanitizeString(materialName); + final int Colour = material.getRgbAsHex(); + final String aChemForm = material.vChemicalFormula; + final boolean isChemFormvalid = (aChemForm != null && aChemForm.length() > 0); + Item[] output = null; + if (onlyLargeDust == false) { + output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Dust"), + new BaseItemDustUnique("itemDustSmall" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Small"), + new BaseItemDustUnique("itemDustTiny" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Tiny") }; + } else { + output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, Colour, "Dust") }; + } + + new RecipeGen_DustGeneration(material, disableExtraRecipes); + + return output; + } + + public static MultiPickaxeBase generateMultiPick(final boolean GT_Durability, final Materials material) { + final ToolMaterial customMaterial = Utils.generateToolMaterialFromGT(material); + final int enchantLevel = material.mEnchantmentToolsLevel; + final Object enchant = new Pair(material.mEnchantmentTools, enchantLevel); + return generateMultiPick(GT_Durability, customMaterial, material.mDefaultLocalName, material.mDurability, + material.mRGBa, enchant); + } + + public static MultiPickaxeBase generateMultiPick(final Material material) { + final ToolMaterial customMaterial = Utils.generateToolMaterial(material); + return generateMultiPick(true, customMaterial, material.getLocalizedName(), (int) material.vDurability, + material.getRGBA(), null); + } + + public static MultiPickaxeBase generateMultiPick(final boolean GT_Durability, final ToolMaterial customMaterial, + final String name, final int durability, final short[] rgba, final Object enchantment) { + Logger.WARNING("Generating a Multi-Pick out of " + name); + final short[] rgb = rgba; + int dur = customMaterial.getMaxUses(); + Logger.WARNING("Determined durability for " + name + " is " + dur); + if (GT_Durability) { + dur = durability * 100; + Logger.WARNING("Using gregtech durability value, " + name + " is now " + dur + "."); + } else if (dur <= 0) { + dur = durability; + Logger.WARNING("Determined durability too low, " + name + " is now " + dur + + " based on the GT material durability."); + } + if (dur <= 0) { + Logger.WARNING("Still too low, " + name + " will now go unused."); + return null; + } + + Object enchant; + if (enchantment != null) { + if (enchantment instanceof Pair) { + enchant = enchantment; + } + } else { + enchant = null; + } + + final MultiPickaxeBase MP_Redstone = new MultiPickaxeBase(name + " Multipick", (customMaterial), dur, + Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2]), enchantment); + + if (MP_Redstone.isValid) { + return MP_Redstone; + } + Logger.WARNING("Pickaxe was not valid."); + return null; + } + + public static MultiSpadeBase generateMultiShovel(final boolean GT_Durability, final Materials material) { + final ToolMaterial customMaterial = Utils.generateToolMaterialFromGT(material); + return generateMultiShovel(GT_Durability, customMaterial, material.mDefaultLocalName, material.mDurability, + material.mRGBa); + } + + public static MultiSpadeBase generateMultiShovel(final Material material) { + final ToolMaterial customMaterial = Utils.generateToolMaterial(material); + return generateMultiShovel(true, customMaterial, material.getLocalizedName(), (int) material.vDurability, + material.getRGBA()); + } + + public static MultiSpadeBase generateMultiShovel(final boolean GT_Durability, final ToolMaterial customMaterial, + final String name, final int durability, final short[] rgba) { + Logger.WARNING("Generating a Multi-Spade out of " + name); + final short[] rgb = rgba; + int dur = customMaterial.getMaxUses(); + Logger.WARNING("Determined durability for " + name + " is " + dur); + if (GT_Durability) { + dur = durability * 100; + Logger.WARNING("Using gregtech durability value, " + name + " is now " + dur + "."); + } else if (dur <= 0) { + dur = durability; + Logger.WARNING("Determined durability too low, " + name + " is now " + dur + + " based on the GT material durability."); + } + if (dur <= 0) { + Logger.WARNING("Still too low, " + name + " will now go unused."); + return null; + } + final MultiSpadeBase MP_Redstone = new MultiSpadeBase(name + " Multispade", (customMaterial), dur, + Utils.rgbtoHexValue(rgb[0], rgb[1], rgb[2])); + + if (MP_Redstone.isValid) { + return MP_Redstone; + } + return null; + } + + public static BaseItemDecidust generateDecidust(final Materials material) { + if (GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L) != null) { + final Material placeholder = MaterialUtils.generateMaterialFromGtENUM(material); + if (placeholder != null) { + generateDecidust(placeholder); + } + } + return null; + } + + public static BaseItemDecidust generateDecidust(final Material material) { + if ((material.getDust(1) != null) && MaterialUtils.hasValidRGBA(material.getRGBA())) { + final BaseItemDecidust Decidust = new BaseItemDecidust(material); + return Decidust; + } + return null; + } + + public static BaseItemCentidust generateCentidust(final Materials material) { + if (GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L) != null) { + final Material placeholder = MaterialUtils.generateMaterialFromGtENUM(material); + if (placeholder != null) { + generateCentidust(placeholder); + } + } + return null; + } + + public static BaseItemCentidust generateCentidust(final Material material) { + if ((material.getDust(1) != null) && MaterialUtils.hasValidRGBA(material.getRGBA())) { + final BaseItemCentidust Centidust = new BaseItemCentidust(material); + return Centidust; + } + return null; + } + + public static boolean isRadioactive(final String materialName) { + int sRadiation = 0; + if (materialName.toLowerCase().contains("uranium")) { + sRadiation = 2; + } else if (materialName.toLowerCase().contains("plutonium")) { + sRadiation = 4; + } else if (materialName.toLowerCase().contains("thorium")) { + sRadiation = 1; + } + if (sRadiation >= 1) { + return true; + } + return false; + } + + public static int getRadioactivityLevel(final String materialName) { + int sRadiation = 0; + if (materialName.toLowerCase().contains("uranium")) { + sRadiation = 2; + } else if (materialName.toLowerCase().contains("plutonium")) { + sRadiation = 4; + } else if (materialName.toLowerCase().contains("thorium")) { + sRadiation = 1; + } + return sRadiation; + } + + public static String getArrayStackNames(ArrayList aStack) { + Object aType = aStack.get(0); + if (aType instanceof FluidStack) { + FluidStack[] aItems = new FluidStack[aStack.size()]; + for (int i=0;i aStack) { + Object aType = aStack.get(0); + if (aType instanceof FluidStack) { + FluidStack[] aItems = new FluidStack[aStack.size()]; + for (int i=0;i 0 ? ", " : "") + alph.getDisplayName() + " x" + alph.stackSize; + aPos++; + } + } + return itemNames; + } + + public static String[] getArrayStackNamesAsArray(final ItemStack[] aStack) { + final String[] itemNames = aStack == null ? new String[] {} : new String[aStack.length]; + if (aStack != null){ + Logger.INFO(""+aStack.length); + } + + if (aStack == null || aStack.length < 1) { + return itemNames; + } + + int arpos = 0; + for (final ItemStack alph : aStack) { + if (alph == null) { + continue; + } + try { + itemNames[arpos] = alph.getDisplayName(); + arpos++; + } + catch (Throwable t) { + t.printStackTrace(); + } + } + return itemNames; + + } + + public static String getFluidArrayStackNames(final FluidStack[] aStack) { + String itemNames = "Fluid Array: "; + for (final FluidStack alph : aStack) { + final String temp = itemNames; + itemNames = temp + ", " + alph.getFluid().getName() + " x" + alph.amount; + } + return itemNames; + + } + + public static ItemStack getGregtechCircuit(final int Meta) { + return ItemUtils.getItemStackWithMeta(LoadedMods.Gregtech, "gregtech:gt.integrated_circuit", "Gregtech Circuit", + Meta, 0); + } + + public static ItemStack[] getBlockDrops(final ArrayList blockDrops) { + if (blockDrops == null) { + return null; + } + if (blockDrops.isEmpty()) { + return null; + } + final ItemStack[] outputs = new ItemStack[blockDrops.size()]; + short forCounter = 0; + for (final ItemStack I : blockDrops) { + outputs[forCounter++] = I; + } + return outputs; + } + + private static Map mModidCache = new HashMap(); + + private static String getModId(final Item item) { + if (mModidCache.containsKey(item)) { + return mModidCache.get(item); + } + String value = ""; + try { + final GameRegistry.UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor(item); + if (id != null) { + final String modname = (id.modId == null ? id.name : id.modId); + value = ((id == null) || id.modId.equals("")) ? "minecraft" : modname; + } + } catch (final Throwable t) { + try { + final UniqueIdentifier t2 = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(item)); + if (t2 != null) { + final String modname = (t2.modId == null ? t2.name : t2.modId); + value = ((t2 == null) || t2.modId.equals("")) ? "minecraft" : modname; + } + } catch (final Throwable t3) { + t3.printStackTrace(); + value = "bad modid"; + } + } + if (!mModidCache.containsKey(item)) { + return mModidCache.put(item, value); + } + return value; + } + + public static String getModId(final ItemStack key) { + return getModId(key.getItem()); + } + + // Take 2 - GT/GT++ Dusts + public static ItemStack getGregtechDust(final String oredictName, final int amount) { + final ArrayList oreDictList = OreDictionary.getOres(oredictName); + if (!oreDictList.isEmpty()) { + ItemStack returnvalue; + for (int xrc = 0; xrc < oreDictList.size(); xrc++) { + final String modid = getModId(oreDictList.get(xrc).getItem()); + if (modid != null && (modid.equals("gregtech") || modid.equals(CORE.MODID))) { + returnvalue = oreDictList.get(xrc).copy(); + returnvalue.stackSize = amount; + return returnvalue; + } + } + } + return getNonTinkersDust(oredictName, amount); + } + + // Anything But Tinkers Dust + public static ItemStack getNonTinkersDust(final String oredictName, final int amount) { + final ArrayList oreDictList = OreDictionary.getOres(oredictName); + if (!oreDictList.isEmpty()) { + ItemStack returnvalue; + for (int xrc = 0; xrc < oreDictList.size(); xrc++) { + final String modid = getModId(oreDictList.get(xrc).getItem()); + if (modid != null && !modid.equals("tconstruct")) { + returnvalue = oreDictList.get(xrc).copy(); + returnvalue.stackSize = amount; + return returnvalue; + } + } + } + // If only Tinkers dust exists, bow down and just use it. + return getItemStackOfAmountFromOreDictNoBroken(oredictName, amount); + } + + @Deprecated + public static ItemStack getGregtechOreStack(OrePrefixes mPrefix, Materials mMat, int mAmount) { + + ItemStack aTemp = getOrePrefixStack(mPrefix, mMat, mAmount); + if (aTemp != null) { + return aTemp; + } + + String mName = MaterialUtils.getMaterialName(mMat); + + String mItemName = mPrefix.name() + mName; + // Utils.LOG_INFO("[Component Maker] Trying to get "+mItemName+"."); + ItemStack gregstack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(mItemName, mAmount); + if (gregstack == null) { + // Utils.LOG_INFO("[Component Maker] Failed to get "+mItemName+"."); + return null; + } + // Utils.LOG_INFO("[Component Maker] Found "+mItemName+"."); + return (gregstack); + } + + public static ItemStack getOrePrefixStack(OrePrefixes mPrefix, Material mMat, int mAmount) { + + String mName = Utils.sanitizeString(mMat.getLocalizedName()); + + String mItemName = mPrefix.name() + mName; + ItemStack gregstack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(mItemName, mAmount); + if (gregstack == null) { + return null; + } + return (gregstack); + } + + public static ItemStack getOrePrefixStack(OrePrefixes mPrefix, Materials mMat, int mAmount) { + if (mPrefix == OrePrefixes.rod) { + mPrefix = OrePrefixes.stick; + } + ItemStack aGtStack = GT_OreDictUnificator.get(mPrefix, mMat, mAmount); + if (aGtStack == null) { + Logger.INFO( + "Failed to find `" + mPrefix + MaterialUtils.getMaterialName(mMat) + "` in OD. [Prefix Search]"); + return getErrorStack(mAmount, (mPrefix.toString()+MaterialUtils.getMaterialName(mMat)+" x"+mAmount)); + } else { + return aGtStack; + } + } + + public static ItemStack getErrorStack(int mAmount) { + return getErrorStack(mAmount, null); + } + + public static ItemStack getErrorStack(int mAmount, String aName) { + ItemStack g = getSimpleStack(ModItems.AAA_Broken, 1); + if (aName != null) { + //NBTUtils.setString(g, "Lore", EnumChatFormatting.RED+aName); + NBTUtils.setBookTitle(g, EnumChatFormatting.RED+aName); + //NBTUtils.setBookTitle(g, EnumChatFormatting.YELLOW+"Maybe Alkalus should know about this"); + } + return g; + } + + public static ItemStack[] getStackOfAllOreDictGroup(String oredictname) { + final ArrayList oreDictList = OreDictionary.getOres(oredictname); + if (!oreDictList.isEmpty()) { + final ItemStack[] returnValues = new ItemStack[oreDictList.size()]; + for (int i = 0; i < oreDictList.size(); i++) { + if (oreDictList.get(i) != null) { + returnValues[i] = oreDictList.get(i); + } + } + return returnValues.length > 0 ? returnValues : null; + } else { + return null; + } + } + + public static boolean registerFuel(ItemStack aBurnable, int burn) { + return CORE.burnables.add(new Pair(burn, aBurnable)); + } + + public static String getLocalizedNameOfBlock(BlockPos pos) { + Block block = pos.world.getBlock(pos.xPos, pos.yPos, pos.zPos); + int metaData = pos.world.getBlockMetadata(pos.xPos, pos.yPos, pos.zPos); + return LangUtils.getLocalizedNameOfBlock(block, metaData); + } + + public static boolean checkForInvalidItems(ItemStack mInput) { + return checkForInvalidItems(new ItemStack[] { mInput }); + } + + public static boolean checkForInvalidItems(ItemStack[] mInput) { + return checkForInvalidItems(mInput, new ItemStack[] {}); + } + + /** + * + * @param mInputs + * @return {@link Boolean} - True if {@link ItemStack}[] only contains valid + * items. + */ + public static boolean checkForInvalidItems(ItemStack[] mInputs, ItemStack[] mOutputs) { + if (mInputs == null || mOutputs == null) { + return false; + } + + if (mInputs.length > 0) { + for (ItemStack stack : mInputs) { + if (stack != null) { + if (stack.getItem() != null) { + if (stack.getItem() == ModItems.AAA_Broken + || stack.getItem().getClass() == ModItems.AAA_Broken.getClass()) { + return false; + } else if (stack.getItem() == ModItems.ZZZ_Empty + || stack.getItem().getClass() == ModItems.ZZZ_Empty.getClass()) { + return false; + } else { + continue; + } + } else { + continue; + } + } else { + return false; + } + } + } + if (mOutputs.length > 0) { + for (ItemStack stack : mOutputs) { + if (stack != null) { + if (stack.getItem() != null) { + if (stack.getItem() == ModItems.AAA_Broken + || stack.getItem().getClass() == ModItems.AAA_Broken.getClass()) { + return false; + } else if (stack.getItem() == ModItems.ZZZ_Empty + || stack.getItem().getClass() == ModItems.ZZZ_Empty.getClass()) { + return false; + } else { + continue; + } + } else { + continue; + } + } else { + return false; + } + } + } + + return true; + } + + + public static IInventory organiseInventory(IInventory aInputInventory) { + ItemStack[] p = new ItemStack[aInputInventory.getSizeInventory()]; + for (int o = 0; o < aInputInventory.getSizeInventory(); o++) { + p[o] = aInputInventory.getStackInSlot(o); + } + //ItemStack[] g = organiseInventory(p); + + IInventory aTemp = aInputInventory; + for (int i = 0; i < p.length; ++i) { + for (int j = i + 1; j < p.length; ++j) { + if (p[j] != null && (p[i] == null + || GT_Utility.areStacksEqual(p[i], p[j]))) { + GT_Utility.moveStackFromSlotAToSlotB(aTemp, aTemp, j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + } + + /* + for (int o = 0; o < aInputInventory.getSizeInventory(); o++) { + aTemp.setInventorySlotContents(o, g[o]); + }*/ + return aTemp; + } + + + public static ItemStack[] organiseInventory(ItemStack[] aInputs) { + + //Update Slots + int aInvSize = aInputs.length; + ItemStack[] newArray = new ItemStack[aInvSize]; + + + //Try merge stacks + for (int i = 0; i < aInvSize; i++) { + for (int i2 = 0; i2 < aInvSize; i2++) { + if (i != i2) { + ItemStack[] t1 = new ItemStack[] {aInputs[i], aInputs[i2]}; + if (t1[0] == null || t1[1] == null) { + continue; + } + else if (!GT_Utility.areStacksEqual(t1[0], t1[1])) { + continue; + } + //Try Merge + else { + + if (GT_Utility.areStacksEqual(t1[0], t1[1])) { + while ((t1[0].stackSize < 64 && t1[1].stackSize > 0)) { + t1[0].stackSize++; + t1[1].stackSize--; + if (t1[1].stackSize <= 0) { + t1[1] = null; + break; + } + if (t1[0].stackSize == 64) { + break; + } + } + newArray[i] = t1[1]; + newArray[i2] = t1[0]; + } + } + } + } + } + + ItemStack[] newArray2 = new ItemStack[aInvSize]; + + //Move nulls to end + int count2 = 0; + for (int i = 0; i < aInvSize; i++) + if (newArray[i] != null) + newArray2[count2++] = newArray[i]; + while (count2 < aInvSize) + newArray2[count2++] = null; + + return newArray2; + + + } + + public static String getFluidName(FluidStack aFluid) { + return aFluid != null ? aFluid.getFluid().getLocalizedName(aFluid) : "NULL"; + } + + public static String getFluidName(Fluid aFluid) { + return aFluid != null ? aFluid.getLocalizedName() : "NULL"; + } + + public static String getItemName(ItemStack aStack) { + if (aStack == null) { + return "ERROR - Empty Stack"; + } + String aDisplay = null; + try { + aDisplay = ("" + StatCollector + .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name")) + .trim(); + if (aStack.hasTagCompound()) { + if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) { + NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display"); + + if (nbttagcompound.hasKey("Name", 8)) { + aDisplay = nbttagcompound.getString("Name"); + } + } + } + } catch (Throwable t) { + + } + if (aDisplay == null || aDisplay.length() <= 0) { + aDisplay = aStack.getUnlocalizedName() + ":" + aStack.getItemDamage(); + } else { + aDisplay += " | Meta: " + aStack.getItemDamage(); + } + return aDisplay; + } + + public static String getUnlocalizedItemName(ItemStack aStack) { + if (aStack == null) { + return "ERROR.Empty.Stack"; + } + String aDisplay = null; + try { + aDisplay = (aStack.getUnlocalizedName()).trim(); + } + catch (Throwable t) { + aDisplay = aStack.getItem().getUnlocalizedName(); + } + if (aDisplay == null || aDisplay.length() <= 0) { + aDisplay = aStack.getItem().getUnlocalizedNameInefficiently(aStack); + } + return aDisplay; + } + + public static boolean isItemGregtechTool(ItemStack aStack) { + if (aStack == null) { + return false; + } + final Item mItem = aStack.getItem(); + final Item aSkookum = ItemUtils.getItemFromFQRN("miscutils:gt.plusplus.metatool.01"); + final Class aSkookClass = aSkookum.getClass(); + if (aSkookClass.isInstance(mItem) || mItem instanceof GT_MetaGenerated_Tool_01 || mItem instanceof MetaGeneratedGregtechTools || mItem instanceof Gregtech_MetaTool || mItem == aSkookum) { + return true; + } + return false; + } + + public static boolean isToolWrench(ItemStack aWrench) { + if (isItemGregtechTool(aWrench) && (aWrench.getItemDamage() == 16 || aWrench.getItemDamage() == 120 || aWrench.getItemDamage() == 122 || aWrench.getItemDamage() == 124 || aWrench.getItemDamage() == 7734)) { + return true; + } + return false; + } + + public static boolean isToolMallet(ItemStack aMallet) { + if (isItemGregtechTool(aMallet) && (aMallet.getItemDamage() == 14)) { + return true; + } + return false; + } + + public static boolean isToolScrewdriver(ItemStack aScrewdriver) { + if (isItemGregtechTool(aScrewdriver) && (aScrewdriver.getItemDamage() == 22 || aScrewdriver.getItemDamage() == 150)) { + return true; + } + return false; + } + + public static boolean isToolCrowbar(ItemStack aCrowbar) { + if (isItemGregtechTool(aCrowbar) && (aCrowbar.getItemDamage() == 20)) { + return true; + } + return false; + } + + public static boolean isToolWirecutters(ItemStack aWirecutters) { + if (isItemGregtechTool(aWirecutters) && (aWirecutters.getItemDamage() == 26)) { + return true; + } + return false; + } + + public static boolean isToolHammer(ItemStack aHammer) { + if (isItemGregtechTool(aHammer) && (aHammer.getItemDamage() == 12 || aHammer.getItemDamage() == 7734)) { + return true; + } + return false; + } + + public static boolean isToolSolderingIron(ItemStack aSoldering) { + if (isItemGregtechTool(aSoldering) && (aSoldering.getItemDamage() == 160)) { + return true; + } + return false; + } + + public static ItemStack[] cleanItemStackArray(ItemStack[] input) { + int aArraySize = input.length; + ItemStack[] aOutput = new ItemStack[aArraySize]; + AutoMap aCleanedItems = new AutoMap(); + for (ItemStack checkStack : input) { + if (ItemUtils.checkForInvalidItems(checkStack)) { + aCleanedItems.put(checkStack); + } + } + for (int i=0;i= 1 && cap >= aAmount) { + ItemStack aDepStack = aStack.copy(); + aDepStack.stackSize = (MathUtils.balance((aDepStack.stackSize - 1), 0, 64)); + if (aDepStack.stackSize > 0) { + return aDepStack; + } + } + return getNullStack(); + } + + public static boolean isControlCircuit(ItemStack aStack) { + if (aStack != null) { + Item aItem = aStack.getItem(); + if (aItem == CI.getNumberedBioCircuit(0).getItem() || aItem == CI.getNumberedCircuit(0).getItem() || aItem == CI.getNumberedAdvancedCircuit(0).getItem()) { + return true; + } + } + return false; + } + + public static boolean isCatalyst(ItemStack aStack) { + if (GT_Utility.areStacksEqual(aStack, RocketFuels.Formaldehyde_Catalyst_Stack, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mBlueCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mBrownCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mOrangeCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mPurpleCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mRedCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mYellowCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mPinkCatalyst, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, AgriculturalChem.mGreenCatalyst, true)) { + return true; + } + return false; + } + + public static boolean isMillingBall(ItemStack aStack) { + if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallAlumina, true)) { + return true; + } + if (GT_Utility.areStacksEqual(aStack, GenericChem.mMillingBallSoapstone, true)) { + return true; + } + return false; + } + + public static String getLocalizedNameOfBlock(Block aBlock, int aMeta) { + return LangUtils.getLocalizedNameOfBlock(aBlock, aMeta); + } + + + + public static boolean doesItemListEntryExist(String string) { + ItemList[] aListValues = ItemList.class.getEnumConstants(); + for (ItemList aItem : aListValues) { + if (aItem != null) { + if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { + return true; + } + } + } + return false; + } + + public static ItemList getValueOfItemList(String string, ItemList aOther) { + ItemList[] aListValues = ItemList.class.getEnumConstants(); + for (ItemList aItem : aListValues) { + if (aItem != null) { + if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { + return aItem; + } + } + } + Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); + if (aOther != null) { + Logger.INFO("Using fallback option instead - "+aOther.name()); + } + return aOther; + } + + public static ItemStack getValueOfItemList(String string, int aAmount, ItemList aOther) { + return getValueOfItemList(string, aOther).get(aAmount); + } + + public static ItemStack getValueOfItemList(String string, int aAmount, ItemStack aOther) { + ItemList[] aListValues = ItemList.class.getEnumConstants(); + for (ItemList aItem : aListValues) { + if (aItem != null) { + if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { + return aItem.get(aAmount); + } + } + } + Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); + if (aOther != null) { + Logger.INFO("Using fallback option instead - "+ItemUtils.getItemName(aOther)); + } + return aOther; + } + + public static boolean areItemsEqual(ItemStack aStack1, ItemStack aStack2) { + return areItemsEqual(aStack1, aStack2, true); + } + + public static boolean areItemsEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { + return GT_Utility.areStacksEqual(aStack1, aStack2, aIgnoreNBT); + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/LangUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/LangUtils.java new file mode 100644 index 0000000000..0b24e962af --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/LangUtils.java @@ -0,0 +1,150 @@ +package gtPlusPlus.core.util.minecraft; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import cpw.mods.fml.common.registry.LanguageRegistry; +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; + +public class LangUtils { + + + public static boolean rewriteEntryForLanguageRegistry(String aKey, String aNewValue){ + return rewriteEntryForLanguageRegistry("en_US", aKey, aNewValue); + } + + @SuppressWarnings("unchecked") + public static boolean rewriteEntryForLanguageRegistry(String aLang, String aKey, String aNewValue){ + LanguageRegistry aInstance = LanguageRegistry.instance(); + Field aModLanguageData = ReflectionUtils.getField(LanguageRegistry.class, "modLanguageData"); + if (aModLanguageData != null){ + Map aProps = new HashMap(); + Object aInstanceProps; + try { + aInstanceProps = aModLanguageData.get(aInstance); + if (aInstanceProps != null){ + aProps = (Map) aInstanceProps; + Properties aLangProps = aProps.get(aLang); + if (aLangProps != null){ + if (aLangProps.containsKey(aKey)) { + aLangProps.remove(aKey); + aLangProps.put(aKey, aNewValue); + } + else { + aLangProps.put(aKey, aNewValue); + } + aProps.remove(aLang); + aProps.put(aLang, aLangProps); + ReflectionUtils.setField(aInstance, aModLanguageData, aProps); + } + } + } + catch (IllegalArgumentException | IllegalAccessException e) { + + } + } + return false; + } + + public static String trans(String aNr, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_GTPP_" + aNr, aEnglish, false); + } + + + + /** + * Quick Block Name Lookup that is friendly to servers and locale. + */ + private static final Map mLocaleCache = new HashMap(); + + public static String getLocalizedNameOfBlock(Block aBlock, int aMeta) { + if (aBlock != null) { + return getLocalizedNameOfItemStack(ItemUtils.simpleMetaStack(aBlock, aMeta, 1)); + } + return "Bad Block Name"; + } + + public static String getLocalizedNameOfItem(Item aItem, int aMeta) { + if (aItem != null) { + return getLocalizedNameOfItemStack(ItemUtils.simpleMetaStack(aItem, aMeta, 1)); + } + return "Bad Item Name"; + } + + public static String getLocalizedNameOfItemStack(ItemStack aStack) { + String aUnlocalized; + if (aStack != null) { + aUnlocalized = ItemUtils.getUnlocalizedItemName(aStack)+"."+aStack.getItemDamage()+".name"; + if (aUnlocalized == null || aUnlocalized.length() <= 0) { + return "Bad Locale Data"; + } + String mCacheKey = aUnlocalized; + if (mLocaleCache.containsKey(mCacheKey)) { + // Recache the key if it's invalid. + if (mLocaleCache.get(mCacheKey).toLowerCase().contains(".name") || mLocaleCache.get(mCacheKey).toLowerCase().contains("|")) { + mLocaleCache.remove(mCacheKey); + String mNew; + try { + mNew = ("" + StatCollector + .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name")) + .trim(); + if (aStack.hasTagCompound()) { + if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) { + NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display"); + + if (nbttagcompound.hasKey("Name", 8)) { + mNew = nbttagcompound.getString("Name"); + } + } + } + } catch (Throwable t) { + mNew = "ERROR - Empty Stack"; + } + Logger.INFO("Re-caching "+mNew+" into locale cache. Key: "+mCacheKey); + mLocaleCache.put(mCacheKey, mNew); + } + Logger.INFO("Returning Cached Value. Key: "+mCacheKey); + return mLocaleCache.get(mCacheKey); + } + else { + String unlocalizedName = aStack.getItem().getUnlocalizedName(aStack); + Logger.INFO("Cached New Value. UnlocalName: "+unlocalizedName); + String blockName = StatCollector.translateToLocal(unlocalizedName + ".name"); + Logger.INFO("Cached New Value. TranslatedName: "+unlocalizedName); + if (blockName.toLowerCase().contains(".name") || blockName.toLowerCase().contains("|")) { + try { + blockName = ("" + StatCollector + .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name")) + .trim(); + if (aStack.hasTagCompound()) { + if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) { + NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display"); + if (nbttagcompound.hasKey("Name", 8)) { + blockName = nbttagcompound.getString("Name"); + } + } + } + } catch (Throwable t) { + blockName = "ERROR - Empty Stack"; + } + } + mLocaleCache.put(mCacheKey, blockName); + Logger.INFO("Cached New Value. Key: "+mCacheKey); + return blockName; + } + + } + return "Bad ItemStack Name"; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java new file mode 100644 index 0000000000..0323bf0161 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java @@ -0,0 +1,523 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Element; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TextureSet; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.TypeCounter; +import gtPlusPlus.core.client.CustomTextureSet.TextureSets; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; +import gtPlusPlus.core.item.base.plates.BaseItemPlateHeavy; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.EnumUtils; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class MaterialUtils { + + public static short firstID = 791; + + @SuppressWarnings({ "rawtypes", "unused" }) + private static Class[][] commonTypes = +{{Materials.class, int.class, TextureSet.class, float.class, int.class, + int.class, int.class, int.class, int.class, int.class, int.class, + String.class, int.class, int.class, int.class, int.class, boolean.class, + boolean.class, int.class, int.class, int.class, Dyes.class, int.class, + List.class , List.class}}; + + public static List oreDictValuesForEntry(final String oredictName){ + List oredictItemNames; + if(OreDictionary.doesOreNameExist(oredictName)){ + final List oredictItems = OreDictionary.getOres(oredictName); + oredictItemNames = oredictItems; + return oredictItemNames; + } + return null; + } + + private static Map mGeneratedMaterialMap = new HashMap(); + + public static Material generateMaterialFromGtENUM(final Materials material){ + return generateMaterialFromGtENUM(material, null, null); + } + + public static Material generateMaterialFromGtENUM(final Materials material, TextureSet aCustomTextures){ + return generateMaterialFromGtENUM(material, null, aCustomTextures); + } + + public static Material generateMaterialFromGtENUM(final Materials material, short[] customRGB){ + return generateMaterialFromGtENUM(material, customRGB, null); + } + + public static Material generateMaterialFromGtENUM(final Materials material, short[] customRGB, TextureSet aCustomTextures){ + String aMaterialKey = getMaterialName(material).toLowerCase(); + if (mGeneratedMaterialMap.containsKey(aMaterialKey)) { + return mGeneratedMaterialMap.get(aMaterialKey); + } + + try { + @SuppressWarnings("deprecation") + String name = material.name(); + final short[] rgba = (customRGB == null ? material.mRGBa : customRGB); + final int melting = material.mMeltingPoint; + final int boiling = material.mBlastFurnaceTemp; + final long protons = material.getProtons(); + final long neutrons = material.getNeutrons(); + final boolean blastFurnace = material.mBlastFurnaceRequired; + Integer radioactivity = 0; + if (material.isRadioactive()){ + ItemStack aDustStack = ItemUtils.getOrePrefixStack(OrePrefixes.dust, material, 1); + radioactivity = aDustStack != null ? GT_Utility.getRadioactivityLevel(aDustStack) : 0; + if (radioactivity == 0) { + long aProtons = material.getProtons(); + radioactivity = (int) Math.min(Math.max((aProtons / 30), 1), 9); + } + } + Logger.MATERIALS("[Debug] Calculated Radiation level to be "+radioactivity.intValue()+"."); + TextureSet iconSet = null; + if (aCustomTextures == null) { + if (material.isRadioactive()) { + iconSet = TextureSets.NUCLEAR.get(); + } + else { + iconSet = material.mIconSet; + } + } + else { + iconSet = aCustomTextures; + } + if (iconSet == null || iconSet.mSetName.toLowerCase().contains("fluid")) { + iconSet = TextureSet.SET_METALLIC; + } + Logger.MATERIALS("[Debug] Calculated Texture Set to be "+iconSet.mSetName+"."); + + + final int durability = material.mDurability; + boolean mGenerateCell = false; + boolean mGenerateFluid = true; + MaterialState materialState; + String chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mChemicalFormula)); + final Element element = material.mElement; + + + //Weird Blacklist of Bad Chemical Strings + if (material.mElement == Element.Pb || material.mElement == Element.Na || material.mElement == Element.Ar){ + chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mElement.name())); + } + + //Determine default state + Logger.MATERIALS("[Debug] Setting State of GT generated material. "+material.mDefaultLocalName); + if (material.getMolten(1) != null || material.getSolid(1) != null){ + materialState = MaterialState.SOLID; + Logger.MATERIALS("[Debug] Molten or Solid was not null."); + if (material.getMolten(1) == null && material.getSolid(1) != null){ + Logger.MATERIALS("[Debug] Molten is Null, Solid is not. Enabling cell generation."); + mGenerateCell = true; + } + else if (material.getMolten(1) != null && material.getSolid(1) == null){ + Logger.MATERIALS("[Debug] Molten is not Null, Solid is null. Not enabling cell generation."); + //mGenerateCell = true; + } + Logger.MATERIALS("[Debug] State set as solid."); + } + else if (material.getFluid(1) != null){ + Logger.MATERIALS("[Debug] State set as liquid."); + materialState = MaterialState.LIQUID; + } + else if (material.getGas(1) != null){ + Logger.MATERIALS("[Debug] State set as gas."); + materialState = MaterialState.GAS; + }/* + else if (material.getPlasma(1) != null){ + Logger.MATERIALS("[Debug] State set as plasma."); + materialState = MaterialState.PLASMA; + }*/ + else { + Logger.MATERIALS("[Debug] State set as solid. This material has no alternative states, so for safety we wont generate anything."); + materialState = MaterialState.SOLID; + mGenerateFluid = false; + } + + + if (name.toLowerCase().contains("infused")){ + final String tempname = name.substring(7, name.length()); + name = "Infused " + tempname; + } + if (hasValidRGBA(rgba) || (element == Element.H) || ((material == Materials.InfusedAir) || (material == Materials.InfusedFire) || (material == Materials.InfusedEarth) || (material == Materials.InfusedWater))){ + //ModItems.itemBaseDecidust = UtilsItems.generateDecidust(material); + //ModItems.itemBaseCentidust = UtilsItems.generateCentidust(material); + Material M = new Material(name, materialState,iconSet, durability, rgba, melting, boiling, protons, neutrons, blastFurnace, chemicalFormula, radioactivity.intValue(), mGenerateCell, mGenerateFluid); + mGeneratedMaterialMap.put(aMaterialKey, M); + return M; + } + else { + Logger.DEBUG_MATERIALS("Failed to generate GT++ material instance for "+material.name() +" | Valid RGB? "+(hasValidRGBA(rgba))); + } + } + catch (Throwable t) { + Logger.DEBUG_MATERIALS("Failed to generate GT++ material instance for "+material.name()); + t.printStackTrace(); + } + return null; + + } + + public static Material generateQuickMaterial(final String materialName, final MaterialState defaultState, final short[] colour, final int sRadioactivity) { + String aMaterialKey = materialName.toLowerCase(); + if (mGeneratedMaterialMap.containsKey(aMaterialKey)) { + return mGeneratedMaterialMap.get(aMaterialKey); + } + + final Material temp = new Material( + materialName, + defaultState, + colour, + 1000, //melting + 3000, //boiling + 50, //Protons + 50, //Neutrons + false, + "", + sRadioactivity); + mGeneratedMaterialMap.put(aMaterialKey, temp); + return temp; + } + + public static boolean hasValidRGBA(final short[] rgba){ + if (rgba == null || rgba.length < 3 || rgba.length > 4){ + return false; + } + return true; + } + + public static int getTierOfMaterial(final double aMeltingPoint){ + + return aMeltingPoint < 1000 ? 0 : (MathUtils.roundToClosestInt(aMeltingPoint/1000f)); + + + /*if ((aMeltingPoint >= 0) && (aMeltingPoint <= 1000)){ + return 1; + } + else if((aMeltingPoint >= 1001) && (aMeltingPoint <= 2000)){ + return 2; + } + else if((aMeltingPoint >= 2001) && (aMeltingPoint <= 3000)){ + return 3; + } + else if((aMeltingPoint >= 3001) && (aMeltingPoint <= 4000)){ + return 4; + } + else if((aMeltingPoint >= 4001) && (aMeltingPoint <= 5000)){ + return 5; + } + else if((aMeltingPoint >= 5001) && (aMeltingPoint <= 6000)){ + return 6; + } + else if((aMeltingPoint >= 6001) && (aMeltingPoint <= 7000)){ + return 7; + } + else if((aMeltingPoint >= 7001) && (aMeltingPoint <= 8000)){ + return 8; + } + else if((aMeltingPoint >= 8001) && (aMeltingPoint <= 9000)){ + return 9; + } + else if((aMeltingPoint >= 9001) && (aMeltingPoint <= 9999)){ + return 10; + } + else { + return 0; + }*/ + } + + public static int getVoltageForTier(int aTier) { + //aTier += 1; - Probably some logic to this, idk. + + switch(aTier){ + case 0: + return 16; + case 1: + return 30; + case 2: + return 120; + case 3: + return 480; + case 4: + return 1920; + case 5: + return 7680; + case 6: + return 30720; + case 7: + return 122880; + case 8: + return 491520; + case 9: + return 1966080; + case 10: + return 7864320; + case 11: + return 31457280; + case 12: + return 125829120; + case 13: + return 503316480; + case 14: + return 2013265920; + default: + return Integer.MAX_VALUE; + } + + /*else { + int newTier = aTier - 1; + return (int) ((4*(Math.pow(4, newTier)))*7.5); + }*/ + } + + private static Materials getMaterialByName(String materialName) { + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + return (Materials) EnumUtils.getValue(gregtech.api.enums.Materials.class, materialName, false); + } + else { + for (Materials m : Materials.values()) { + if (MaterialUtils.getMaterialName(m).toLowerCase().equals(materialName.toLowerCase())) { + return m; + } + } + return null; + } + } + + @SuppressWarnings("deprecation") + public static String getMaterialName(Materials mat){ + + String mName = null; + + try { + mName = (String) ReflectionUtils.getField(Materials.class, "mDefaultLocalName").get(mat); + if (mName == null) { + mName = (String) ReflectionUtils.getField(Materials.class, "mName").get(mat); + } + } + catch (IllegalArgumentException | IllegalAccessException e) { + } + + + if (mName == null || mName.equals("")){ + mName = mat.name(); + } + return mName; + } + + public static TextureSet getMostCommonTextureSet(List list) { + TypeCounter aCounter = new TypeCounter(TextureSet.class); + for (Material m : list) { + TextureSet t = m.getTextureSet(); + if (t == null) { + t = Materials.Gold.mIconSet; + } + if (t != null) { + aCounter.add(t, t.mSetName); + } + } + return aCounter.getResults(); + /*Optional r = list.stream().map(Material::getTextureSet).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().max(Map.Entry.comparingByValue()).map(Map.Entry::getKey); + TextureSet o = (r != null && r.isPresent() && r.get() != null) ? r.get() : null; + return o;*/ + } + + + + public static Materials getMaterial(String aMaterialName, String aFallbackMaterialName) { + Materials g = getMaterial(aMaterialName); + if (g == null) { + g = getMaterial(aFallbackMaterialName); + } + if (g == null) { + Logger.INFO("Failed finding material '"+aMaterialName+"' & fallback '"+aFallbackMaterialName+"', returning _NULL."); + CORE.crash(); + //g = Materials._NULL; + } + return g; + } + + public static Materials getMaterial(String aMaterialName) { + Materials m = gtPlusPlus.xmod.gregtech.common.StaticFields59.getMaterial(aMaterialName); + if (m == null) { + m = getMaterialByName(aMaterialName); + } + if (m == null) { + Logger.INFO("Failed finding material '"+aMaterialName+"', returning _NULL."); + m = Materials._NULL; + } + return m; + } + + public static AutoMap getCompoundMaterialsRecursively(Material aMat){ + return getCompoundMaterialsRecursively_Speiger(aMat); + /* + AutoMap aDataSet = new AutoMap(); + final int HARD_LIMIT = 1000; + int mLoopCounter = 0; + if (aMat.getComposites().size() > 0) { + try { + List xList = Lists.newLinkedList(); + for (MaterialStack kj : aMat.getComposites()) { + xList.add(kj.getStackMaterial()); + } + if (xList.isEmpty()) { + aDataSet.put(aMat); + return aDataSet; + } + ListIterator listIterator = xList.listIterator(); + while(listIterator.hasNext()){ + Material e = listIterator.next(); + listIterator.remove(); + if (mLoopCounter > HARD_LIMIT) { + break; + } + + if (e.getComposites().isEmpty()) { + aDataSet.put(e); + } + else { + for (MaterialStack x : e.getComposites()) { + listIterator.add(x.getStackMaterial()); + } + } + mLoopCounter++; + + + }} + catch (Throwable t) { + aDataSet.put(aMat); + t.printStackTrace(); + } + } + if (aDataSet.isEmpty()) { + aDataSet.put(aMat); + return aDataSet; + } + return aDataSet; + */} + + public static AutoMap getCompoundMaterialsRecursively_Speiger(Material toSearch) { + AutoMap resultList = new AutoMap(); + if (toSearch.getComposites().isEmpty()) { + resultList.put(toSearch); + return resultList; + } + final int HARD_LIMIT = 1000; + + // Could be a Deque but i dont use the interface + // enough to use it as default. + LinkedList toCheck = new LinkedList(); + + toCheck.add(toSearch); + int processed = 0; + while (toCheck.size() > 0 && processed < HARD_LIMIT) { + Material current = toCheck.remove(); + if (current.getComposites().isEmpty()) { + resultList.put(current); + } else { + for (MaterialStack entry : current.getComposites()) { + toCheck.add(entry.getStackMaterial()); + } + } + processed++; + } + return resultList; + } + + public static void generateComponentAndAssignToAMaterial(ComponentTypes aType, Material aMaterial) { + generateComponentAndAssignToAMaterial(aType, aMaterial, true); + } + + public static void generateComponentAndAssignToAMaterial(ComponentTypes aType, Material aMaterial, boolean generateRecipes) { + Item aGC; + if (aType == ComponentTypes.PLATEHEAVY) { + aGC = new BaseItemPlateHeavy(aMaterial); + } + else { + aGC = new BaseItemComponent(aMaterial, aType); + } + if (aGC != null) { + String aFormattedLangName = aType.getName(); + + if (!aFormattedLangName.startsWith(" ")) { + if (aFormattedLangName.contains("@")) { + String[] aSplit = aFormattedLangName.split("@"); + aFormattedLangName = aSplit[0] + " " + aMaterial.getLocalizedName() + " " + aSplit[1]; + } + } + + if (aFormattedLangName.equals(aType.getName())) { + aFormattedLangName = aMaterial.getLocalizedName() + aFormattedLangName; + + } + + + + Logger.MATERIALS("[Lang] "+aGC.getUnlocalizedName()+".name="+aFormattedLangName); + aMaterial.registerComponentForMaterial(aType, ItemUtils.getSimpleStack(aGC)); + } + } + + + + + + + + + public static void generateSpecialDustAndAssignToAMaterial(Material aMaterial) { + generateSpecialDustAndAssignToAMaterial(aMaterial, true); + } + + public static void generateSpecialDustAndAssignToAMaterial(Material aMaterial, boolean generateMixerRecipes) { + Item[] aDusts = ItemUtils.generateSpecialUseDusts(aMaterial, false, Utils.invertBoolean(generateMixerRecipes)); + if (aDusts != null && aDusts.length > 0) { + aMaterial.registerComponentForMaterial(OrePrefixes.dust, ItemUtils.getSimpleStack(aDusts[0])); + aMaterial.registerComponentForMaterial(OrePrefixes.dustSmall, ItemUtils.getSimpleStack(aDusts[1])); + aMaterial.registerComponentForMaterial(OrePrefixes.dustTiny, ItemUtils.getSimpleStack(aDusts[2])); + } + + } + + public static boolean doesMaterialExist(String aMatName) { + for (Materials m : Materials.values()) { + if (m.name().toLowerCase().equals(aMatName.toLowerCase())) { + return true; + } + } + return false; + } + + public static boolean isNullGregtechMaterial(Materials aGregtechMaterial) { + if (aGregtechMaterial == Materials._NULL || aGregtechMaterial.equals(Materials._NULL) || aGregtechMaterial.name().equals(Materials._NULL.name())) { + return true; + } + return false; + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java new file mode 100644 index 0000000000..080b5665a3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MiningUtils.java @@ -0,0 +1,265 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.HashMap; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; + +import gregtech.common.GT_Worldgen_GT_Ore_Layer; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class MiningUtils { + + public static Boolean canPickaxeBlock(final Block currentBlock, final World currentWorld){ + String correctTool = ""; + if (!currentWorld.isRemote){ + try { + correctTool = currentBlock.getHarvestTool(0); + //Utils.LOG_WARNING(correctTool); + if (correctTool.equals("pickaxe")){ + return true;} + } catch (final NullPointerException e){ + return false;} + } + return false; + } + + private static void removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z){ + try { + final Block block = world.getBlock(X, Y, Z); + if (canPickaxeBlock(block, world)){ + if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){ + block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0); + world.setBlockToAir(X, Y, Z); + + } + else { + Logger.WARNING("Incorrect Tool for mining this block."); + } + } + } catch (final NullPointerException e){ + + } + } + + public static boolean getBlockType(final Block block, final World world, final int[] xyz, final int miningLevel){ + final String LIQUID = "liquid"; + final String BLOCK = "block"; + final String ORE = "ore"; + final String AIR = "air"; + String blockClass = ""; + + if (world.isRemote){ + return false; + } + + if (block == Blocks.end_stone) { + return true; + } + if (block == Blocks.stone) { + return true; + } + if (block == Blocks.sandstone) { + return true; + } + if (block == Blocks.netherrack) { + return true; + } + if (block == Blocks.nether_brick) { + return true; + } + if (block == Blocks.nether_brick_stairs) { + return true; + } + if (block == Blocks.nether_brick_fence) { + return true; + } + if (block == Blocks.glowstone) { + return true; + } + + + + try { + blockClass = block.getClass().toString().toLowerCase(); + Logger.WARNING(blockClass); + if (blockClass.toLowerCase().contains(LIQUID)){ + Logger.WARNING(block.toString()+" is a Liquid."); + return false; + } + else if (blockClass.toLowerCase().contains(ORE)){ + Logger.WARNING(block.toString()+" is an Ore."); + return true; + } + else if (block.getHarvestLevel(world.getBlockMetadata(xyz[0], xyz[1], xyz[2])) >= miningLevel){ + Logger.WARNING(block.toString()+" is minable."); + return true; + } + else if (blockClass.toLowerCase().contains(AIR)){ + Logger.WARNING(block.toString()+" is Air."); + return false; + } + else if (blockClass.toLowerCase().contains(BLOCK)){ + Logger.WARNING(block.toString()+" is a block of some kind."); + return false; + } + else { + Logger.WARNING(block.toString()+" is mystery."); + return false; + } + } + catch(final NullPointerException e){ + return false; + } + } + + public static int mMoonID =-99; + public static int mMarsID = -99; + public static int mCometsID = -99; + public static AutoMap getOresForDim(int dim) { + if (dim == -1) { + return Ores_Nether; + } + else if (dim == 1) { + return Ores_End; + } + else if (dim == mMoonID) { + return Ores_Moon; + } + else if (dim == mMarsID) { + return Ores_Mars; + } + else if (dim == mCometsID) { + return Ores_Comets; + } + else { + return Ores_Overworld; + } + + } + + public static void iterateAllOreTypes() { + HashMap M = new HashMap(); + String aTextWorldGen = null; + if (MiningUtils.findAndMapOreTypesFromGT()) { + int mapKey = 0; + for (AutoMap g : MiningUtils.mOreMaps) { + for (GT_Worldgen_GT_Ore_Layer h : g) { + + try { + aTextWorldGen = (String) ReflectionUtils.getField(GT_Worldgen_GT_Ore_Layer.class, "aTextWorldgen").get(h); + } catch (IllegalArgumentException | IllegalAccessException e) { + aTextWorldGen = h.mWorldGenName; + } + + //if (M.containsKey(h.aTextWorldgen + h.mWorldGenName)) { + M.put(aTextWorldGen + h.mWorldGenName, mapKey); + Logger.INFO("Found Vein type: " + aTextWorldGen + h.mWorldGenName + " in map with key: "+mapKey); + //} + } + mapKey++; + } + } + } + + public static AutoMap[] mOreMaps = new AutoMap[7]; + private static AutoMap Ores_Overworld = new AutoMap(); + private static AutoMap Ores_Nether = new AutoMap(); + private static AutoMap Ores_End = new AutoMap(); + private static AutoMap Ores_Moon = new AutoMap(); + private static AutoMap Ores_Mars = new AutoMap(); + private static AutoMap Ores_Comets = new AutoMap(); + private static AutoMap Ores_Misc = new AutoMap(); + + public static boolean findAndMapOreTypesFromGT() { + //Gets Moon ID + + boolean aEndAsteroids; + try { + if (ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.util.ConfigManagerCore") != null && mMoonID == -99) { + mMoonID = ReflectionUtils.getField(ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.util.ConfigManagerCore"), "idDimensionMoon").getInt(null); + } + } + catch (IllegalArgumentException | IllegalAccessException e) {} + + //Gets Mars ID + try { + if (ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.mars.ConfigManagerMars") != null && mMarsID == -99) { + mMarsID = ReflectionUtils.getField(ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.mars.ConfigManagerMars"), "dimensionIDMars").getInt(null); + } + } + catch (IllegalArgumentException | IllegalAccessException e) {} + + //Get Comets ID + try { + if (ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.asteroids.ConfigManagerAsteroids") != null && mCometsID == -99) { + mCometsID = ReflectionUtils.getField(ReflectionUtils.getClass("micdoodle8.mods.galacticraft.planets.asteroids.ConfigManagerAsteroids"), "dimensionIDAsteroids").getInt(null); + } + } + catch (IllegalArgumentException | IllegalAccessException e) {} + + //Clear Cache + Ores_Overworld.clear(); + Ores_Nether.clear(); + Ores_End.clear(); + Ores_Misc.clear(); + + for (GT_Worldgen_GT_Ore_Layer x : GT_Worldgen_GT_Ore_Layer.sList) { + if (x.mEnabled) { + + + try { + aEndAsteroids = ReflectionUtils.getField(GT_Worldgen_GT_Ore_Layer.class, "mEndAsteroid").getBoolean(x); + } + catch (IllegalArgumentException | IllegalAccessException e) { + aEndAsteroids = false; + } + + if (x.mOverworld) { + Ores_Overworld.put(x); + } + if (x.mNether) { + Ores_Nether.put(x); + } + if (x.mEnd || aEndAsteroids) { + Ores_End.put(x); + } + if (x.mOverworld || x.mNether || (x.mEnd || aEndAsteroids)) { + continue; + } + /*if (x.mMoon) { + Ores_Moon.put(x); + continue; + } + if (x.mMars) { + Ores_Mars.put(x); + continue; + } + if (x.mAsteroid) { + Ores_Comets.put(x); + continue; + }*/ + Ores_Misc.put(x); + continue; + } + else { + Ores_Comets.put(x); + } + } + + + mOreMaps[0] = Ores_Overworld; + mOreMaps[1] = Ores_Nether; + mOreMaps[2] = Ores_End; + mOreMaps[3] = Ores_Moon; + mOreMaps[4] = Ores_Mars; + mOreMaps[5] = Ores_Comets; + mOreMaps[6] = Ores_Misc; + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java new file mode 100644 index 0000000000..e3ffb5c410 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/ModularArmourUtils.java @@ -0,0 +1,161 @@ +package gtPlusPlus.core.util.minecraft; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.util.GT_Utility; + +import baubles.api.BaubleType; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; + +public class ModularArmourUtils { + + public static ItemStack addComponent(ItemStack tArmour, ItemStack[] tComponents) { + if (tArmour != null) { + ItemStack rArmour = NBTUtils.writeItemsToGtCraftingComponents(tArmour, tComponents, true); + if (rArmour != null) { + + } + } + return null; + } + + public static enum Modifiers { + BOOST_HP("skill.hpboost"), BOOST_DEF("skill.defenceboost"), BOOST_SPEED("skill.speedboost"), BOOST_MINING( + "skill.miningboost"), BOOST_DAMAGE("skill.damageboost"), BOOST_HOLY("skill.holyboost"); + private String MODIFIER_NAME; + + private Modifiers(final String mModifier) { + this.MODIFIER_NAME = mModifier; + } + + public String getModifier() { + return this.MODIFIER_NAME; + } + + public boolean isValidLevel(int i) { + if (i >= 0 && i <= 100) { + return true; + } + return false; + } + } + + public static enum BT { + TYPE_AMULET(BaubleType.AMULET, 0), TYPE_RING(BaubleType.RING, 1), TYPE_BELT(BaubleType.BELT, 2); + private final BaubleType mType; + private final int mID; + private final String mBaubleType; + + private BT(final BaubleType tType, int tID) { + this.mType = tType; + this.mID = tID; + this.mBaubleType = tType.name().toLowerCase(); + } + + public BaubleType getType() { + return this.mType; + } + + public BT getThis() { + return this; + } + + public BaubleType getBaubleByID(int tID) { + if (tID == 0) { + return BaubleType.AMULET; + } else if (tID == 1) { + return BaubleType.RING; + } else if (tID == 2) { + return BaubleType.BELT; + } else { + return BaubleType.RING; + } + } + + public int getID() { + return this.mID; + } + + public String getTypeAsString() { + return this.mBaubleType; + } + } + + public static void setModifierLevel(ItemStack aStack, Pair mPair) { + setModifierLevel(aStack, mPair.getKey(), mPair.getValue().intValue()); + } + + public static void setModifierLevel(ItemStack aStack, Modifiers aMod, Integer aInt) { + setModifierLevel(aStack, aMod, aInt.intValue()); + } + + public static void setModifierLevel(ItemStack aStack, Modifiers aMod, int aInt) { + + int mCurrentLevel = getModifierLevel(aStack, aMod); + int mNewTotalLevel = mCurrentLevel + aInt; + + NBTTagCompound tNBT = NBTUtils.getNBT(aStack); + if (aMod.isValidLevel(mNewTotalLevel)) { + tNBT.setInteger(aMod.getModifier(), mNewTotalLevel); + GT_Utility.ItemNBT.setNBT(aStack, tNBT); + } else { + if (getModifierLevel(aStack, aMod) > 100) { + setModifierLevel(aStack, aMod, 100); + } + } + } + + public static int getModifierLevel(ItemStack aStack, Pair newPair) { + return getModifierLevel(aStack, newPair.getKey()); + } + + public static int getModifierLevel(ItemStack aStack, Modifiers aMod) { + NBTTagCompound tNBT = NBTUtils.getNBT(aStack); + return tNBT.getInteger(aMod.getModifier()); + } + + public static void setBaubleType(ItemStack aStack, BT aMod) { + Logger.INFO("Changing bauble type."); + NBTTagCompound tNBT = NBTUtils.getNBT(aStack); + if (aMod != null) { + tNBT.setInteger("mBaubleType", aMod.getID()); + GT_Utility.ItemNBT.setNBT(aStack, tNBT); + } + } + + public static int getBaubleTypeID(ItemStack aStack) { + NBTTagCompound tNBT = NBTUtils.getNBT(aStack); + return tNBT.getInteger("mBaubleType"); + } + + public static BaubleType getBaubleType(ItemStack aStack) { + NBTTagCompound tNBT = NBTUtils.getNBT(aStack); + return getBaubleByID(tNBT.getInteger("mBaubleType")); + } + + public static BaubleType getBaubleByID(int tID) { + if (tID == 0) { + return BaubleType.AMULET; + } else if (tID == 1) { + return BaubleType.RING; + } else if (tID == 2) { + return BaubleType.BELT; + } else { + return BaubleType.RING; + } + } + + public static ItemStack setDefaultStats(ItemStack aStack) { + ItemStack tempStack = aStack; + setModifierLevel(tempStack, Modifiers.BOOST_DAMAGE, 0); + setModifierLevel(tempStack, Modifiers.BOOST_DEF, 0); + setModifierLevel(tempStack, Modifiers.BOOST_HOLY, 0); + setModifierLevel(tempStack, Modifiers.BOOST_HP, 0); + setModifierLevel(tempStack, Modifiers.BOOST_MINING, 0); + setModifierLevel(tempStack, Modifiers.BOOST_SPEED, 0); + return tempStack; + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/NBTUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/NBTUtils.java new file mode 100644 index 0000000000..7ed4d887cc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/NBTUtils.java @@ -0,0 +1,580 @@ +package gtPlusPlus.core.util.minecraft; + +import static gtPlusPlus.core.item.ModItems.ZZZ_Empty; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class NBTUtils { + + public static NBTTagCompound getNBT(ItemStack aStack) { + NBTTagCompound rNBT = aStack.getTagCompound(); + return ((rNBT == null) ? new NBTTagCompound() : rNBT); + } + + public static void setBookTitle(ItemStack aStack, String aTitle) { + NBTTagCompound tNBT = getNBT(aStack); + tNBT.setString("title", aTitle); + GT_Utility.ItemNBT.setNBT(aStack, tNBT); + } + + public static String getBookTitle(ItemStack aStack) { + NBTTagCompound tNBT = getNBT(aStack); + return tNBT.getString("title"); + } + + public static ItemStack[] readItemsFromNBT(ItemStack itemstack) { + NBTTagCompound tNBT = getNBT(itemstack); + final NBTTagList list = tNBT.getTagList("Items", 10); + ItemStack inventory[] = new ItemStack[list.tagCount()]; + for (int i = 0; i < list.tagCount(); i++) { + final NBTTagCompound data = list.getCompoundTagAt(i); + final int slot = data.getInteger("Slot"); + if ((slot >= 0) && (slot < list.tagCount())) { + if (ItemStack.loadItemStackFromNBT(data) == ItemUtils.getSimpleStack(ZZZ_Empty)) { + inventory[slot] = null; + } else { + inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + + } + } + return inventory; + } + + public static ItemStack[] readItemsFromNBT(ItemStack itemstack, String customkey) { + NBTTagCompound tNBT = getNBT(itemstack); + final NBTTagList list = tNBT.getTagList(customkey, 10); + ItemStack inventory[] = new ItemStack[list.tagCount()]; + for (int i = 0; i < list.tagCount(); i++) { + final NBTTagCompound data = list.getCompoundTagAt(i); + final int slot = data.getInteger("Slot"); + if ((slot >= 0) && (slot < list.tagCount())) { + if (ItemStack.loadItemStackFromNBT(data) == ItemUtils.getSimpleStack(ZZZ_Empty)) { + inventory[slot] = null; + } else { + inventory[slot] = ItemStack.loadItemStackFromNBT(data); + } + + } + } + return inventory; + } + + public static ItemStack writeItemsToNBT(ItemStack itemstack, ItemStack[] stored) { + NBTTagCompound tNBT = getNBT(itemstack); + final NBTTagList list = new NBTTagList(); + for (int i = 0; i < stored.length; i++) { + final ItemStack stack = stored[i]; + if (stack != null) { + final NBTTagCompound data = new NBTTagCompound(); + stack.writeToNBT(data); + data.setInteger("Slot", i); + list.appendTag(data); + } else { + final NBTTagCompound data = new NBTTagCompound(); + ItemStack nullstack = ItemUtils.getSimpleStack(ZZZ_Empty); + nullstack.writeToNBT(data); + data.setInteger("Slot", i); + list.appendTag(data); + } + } + tNBT.setTag("Items", list); + itemstack.setTagCompound(tNBT); + return itemstack; + } + + public static ItemStack writeItemsToNBT(ItemStack itemstack, ItemStack[] stored, String customkey) { + NBTTagCompound tNBT = getNBT(itemstack); + final NBTTagList list = new NBTTagList(); + for (int i = 0; i < stored.length; i++) { + final ItemStack stack = stored[i]; + if (stack != null) { + final NBTTagCompound data = new NBTTagCompound(); + stack.writeToNBT(data); + data.setInteger("Slot", i); + list.appendTag(data); + } + } + tNBT.setTag(customkey, list); + itemstack.setTagCompound(tNBT); + return itemstack; + } + + public static ItemStack writeItemsToGtCraftingComponents(ItemStack rStack, ItemStack[] input, boolean copyTags) { + try { + ItemStack stored[] = new ItemStack[9]; + if (input.length != 9) { + for (int e=0;e mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); + if (mInternalMap != null) { + for (Map.Entry e : mInternalMap.entrySet()) { + Logger.INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue()); + } + return true; + } else { + Logger.INFO("Data map reflected from NBTTagCompound was not valid."); + return false; + } + } + } + } catch (Throwable t) {} + return false; + } + + // Botania soulbind handling + public static boolean setBotanicaSoulboundOwner(ItemStack aStack, String aName) { + final String TAG_SOULBIND = "soulbind"; + NBTTagCompound tNBT = getNBT(aStack); + tNBT.setString(TAG_SOULBIND, aName); + GT_Utility.ItemNBT.setNBT(aStack, tNBT); + if (NBTUtils.doesStringExist(aStack, TAG_SOULBIND)) { + return true; + } else { + return false; + } + } + + public static String getBotanicaSoulboundOwner(ItemStack aStack) { + final String TAG_SOULBIND = "soulbind"; + NBTTagCompound tNBT = getNBT(aStack); + return tNBT.getString(TAG_SOULBIND); + } + + public static boolean hasKey(ItemStack stack, String key) { + final NBTTagCompound itemData = getNBT(stack); + if (itemData.hasKey(key)) { + return true; + } + return false; + } + + public static boolean createIntegerTagCompound(ItemStack rStack, String tagName, String keyName, int keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setInteger(keyName, keyValue); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static boolean createLongTagCompound(ItemStack rStack, String tagName, String keyName, long keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong(keyName, keyValue); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static boolean createStringTagCompound(ItemStack rStack, String tagName, String keyName, String keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setString(keyName, keyValue); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static boolean createFloatTagCompound(ItemStack rStack, String tagName, String keyName, float keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setFloat(keyName, keyValue); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static boolean createDoubleTagCompound(ItemStack rStack, String tagName, String keyName, double keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setDouble(keyName, keyValue); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static boolean createBooleanTagCompound(ItemStack rStack, String tagName, String keyName, boolean keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setBoolean(keyName, keyValue); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static boolean createTagCompound(ItemStack rStack, String tagName, NBTTagCompound keyValue) { + final NBTTagCompound tagMain = getNBT(rStack); + NBTTagCompound tagNBT = keyValue; + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static int getIntegerTagCompound(ItemStack aStack, String tagName, String keyName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT.getInteger(keyName); + } + } + return 0; + } + + public static long getLongTagCompound(ItemStack aStack, String tagName, String keyName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT.getLong(keyName); + } + } + return 0L; + } + + public static String getStringTagCompound(ItemStack aStack, String tagName, String keyName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT.getString(keyName); + } + } + return null; + } + + public static float getFloatTagCompound(ItemStack aStack, String tagName, String keyName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT.getFloat(keyName); + } + } + return 0; + } + + public static double getDoubleTagCompound(ItemStack aStack, String tagName, String keyName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT.getDouble(keyName); + } + } + return 0; + } + + public static boolean getBooleanTagCompound(ItemStack aStack, String tagName, String keyName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT.getBoolean(keyName); + } + } + return false; + } + + public static NBTTagCompound getTagCompound(ItemStack aStack, String tagName) { + NBTTagCompound aNBT = getNBT(aStack); + if (aNBT != null && hasKey(aStack, tagName)) { + aNBT = aNBT.getCompoundTag(tagName); + if (aNBT != null) { + return aNBT; + } + } + return null; + } + + public static boolean hasKeyInTagCompound(ItemStack stack, String tag, String key) { + NBTTagCompound aNBT = stack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag(tag); + if (aNBT.hasKey(key)) { + return true; + } + } + return false; + } + + public static Map getTagMap(NBTTagCompound aNBT) { + Map tagMap = new HashMap(); + if (!aNBT.hasNoTags()) { + Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); + if (mInternalMap != null && !mInternalMap.isEmpty()) { + tagMap.putAll(mInternalMap); + } + } + return tagMap; + } + + public static boolean isTagString(NBTTagCompound aNBT, String aTagName) { + Map aTagMap = getTagMap(aNBT); + if (aTagMap != null && !aTagMap.isEmpty()) { + for (Map.Entry e : aTagMap.entrySet()) { + if (e.getKey().equals(aTagName)) { + Object aValue = e.getValue(); + if (aValue instanceof String) { + return true; + } + } + } + } + return false; + } + + public static boolean isTagInteger(NBTTagCompound aNBT, String aTagName) { + Map aTagMap = getTagMap(aNBT); + if (aTagMap != null && !aTagMap.isEmpty()) { + for (Map.Entry e : aTagMap.entrySet()) { + if (e.getKey().equals(aTagName)) { + Object aValue = e.getValue(); + if (int.class.isInstance(aValue) || aValue instanceof Integer) { + return true; + } + } + } + } + return false; + } + + public static boolean isTagLong(NBTTagCompound aNBT, String aTagName) { + Map aTagMap = getTagMap(aNBT); + if (aTagMap != null && !aTagMap.isEmpty()) { + for (Map.Entry e : aTagMap.entrySet()) { + if (e.getKey().equals(aTagName)) { + Object aValue = e.getValue(); + if (long.class.isInstance(aValue) || aValue instanceof Long) { + return true; + } + } + } + } + return false; + } + + public static boolean isTagFloat(NBTTagCompound aNBT, String aTagName) { + Map aTagMap = getTagMap(aNBT); + if (aTagMap != null && !aTagMap.isEmpty()) { + for (Map.Entry e : aTagMap.entrySet()) { + if (e.getKey().equals(aTagName)) { + Object aValue = e.getValue(); + if (float.class.isInstance(aValue) || aValue instanceof Float) { + return true; + } + } + } + } + return false; + } + + public static boolean isTagDouble(NBTTagCompound aNBT, String aTagName) { + Map aTagMap = getTagMap(aNBT); + if (aTagMap != null && !aTagMap.isEmpty()) { + for (Map.Entry e : aTagMap.entrySet()) { + if (e.getKey().equals(aTagName)) { + Object aValue = e.getValue(); + if (double.class.isInstance(aValue) || aValue instanceof Double) { + return true; + } + } + } + } + return false; + } + + public static boolean isTagBoolean(NBTTagCompound aNBT, String aTagName) { + Map aTagMap = getTagMap(aNBT); + if (aTagMap != null && !aTagMap.isEmpty()) { + for (Map.Entry e : aTagMap.entrySet()) { + if (e.getKey().equals(aTagName)) { + Object aValue = e.getValue(); + if (boolean.class.isInstance(aValue) || aValue instanceof Boolean) { + return true; + } + } + } + } + return false; + } + + public static boolean tryCloneTagCompoundDataIntoSubTag(ItemStack aStack, NBTTagCompound aTagCompound) { + try { + NBTTagCompound aNBT = aTagCompound; + if (aNBT != null) { + if (!aNBT.hasNoTags()) { + Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); + if (mInternalMap != null) { + for (Map.Entry e : mInternalMap.entrySet()) { + Logger.INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue().toString()); + if (e.getValue().getClass() == String.class){ + createStringTagCompound(aStack, "mEntityTag", (String) e.getKey(), (String) e.getValue()); + } + else if (e.getValue().getClass() == Boolean.class || e.getValue().getClass() == boolean.class){ + createBooleanTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Boolean) e.getValue()); + } + else if (e.getValue().getClass() == Integer.class || e.getValue().getClass() == int.class){ + createIntegerTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Integer) e.getValue()); + } + else if (e.getValue().getClass() == Double.class || e.getValue().getClass() == double.class){ + createDoubleTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Double) e.getValue()); + } + else if (e.getValue().getClass() == Long.class || e.getValue().getClass() == long.class){ + createLongTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Long) e.getValue()); + } + else if (e.getValue().getClass() == Float.class || e.getValue().getClass() == float.class){ + createFloatTagCompound(aStack, "mEntityTag", (String) e.getKey(), (Float) e.getValue()); + } + else { + + + } + + } + return true; + } + } + } + return false; + } catch (Throwable t) { + return false; + } + } + + public static NBTTagCompound getEntityCustomData(Entity aEntity){ + return ReflectionUtils.getField(aEntity, "customEntityData"); + } + + public static boolean setEntityCustomData(Entity aEntity, NBTTagCompound aTag){ + return ReflectionUtils.setField(aEntity, "customEntityData", aTag); + } + + public static boolean hasTagCompound(ItemStack aStack) { + return aStack.hasTagCompound(); + } + + public static void createEmptyTagCompound(ItemStack aStack) { + if (!hasTagCompound(aStack)) { + NBTTagCompound aTag = new NBTTagCompound(); + aStack.setTagCompound(aTag); + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/OreDictUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/OreDictUtils.java new file mode 100644 index 0000000000..324d39b863 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/OreDictUtils.java @@ -0,0 +1,25 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class OreDictUtils { + + public static boolean containsValidEntries(String aOreName) { + boolean a = OreDictionary.doesOreNameExist(aOreName); + List b = OreDictionary.getOres(aOreName, false); + + if (!a) { + return false; + } + else { + if (b == null || b.isEmpty()) { + return false; + } + } + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java new file mode 100644 index 0000000000..24ffa295b7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/PlayerUtils.java @@ -0,0 +1,260 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.*; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; +import net.minecraftforge.common.util.FakePlayer; + +public class PlayerUtils { + + public static final Map mCachedFakePlayers = new WeakHashMap(); + private static final Class mThaumcraftFakePlayer; + + static { + if (ReflectionUtils.doesClassExist("thaumcraft.common.lib.FakeThaumcraftPlayer")) { + mThaumcraftFakePlayer = ReflectionUtils.getClass("thaumcraft.common.lib.FakeThaumcraftPlayer"); + } + else { + mThaumcraftFakePlayer = null; + } + } + + public static void messagePlayer(final EntityPlayer P, final String S){ + gregtech.api.util.GT_Utility.sendChatToPlayer(P, S); + } + + public static EntityPlayer getPlayer(final String name){ + try{ + final List i = new ArrayList<>(); + final Iterator iterator = MinecraftServer.getServer().getConfigurationManager().playerEntityList.iterator(); + while (iterator.hasNext()) { + i.add((iterator.next())); + } + for (final EntityPlayer temp : i) { + if (temp.getDisplayName().toLowerCase().equals(name.toLowerCase())){ + return temp; + } + } + } + catch(final Throwable e){} + return null; + } + + public static EntityPlayer getPlayerOnServerFromUUID(final UUID parUUID){ + if (parUUID == null) + { + return null; + } + final List allPlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList; + for (final EntityPlayerMP player : allPlayers) + { + if (player.getUniqueID().equals(parUUID)) + { + return player; + } + } + return null; + } + + //Not Clientside + public static EntityPlayer getPlayerInWorld(final World world, final String Name){ + final List i = world.playerEntities; + final Minecraft mc = Minecraft.getMinecraft(); + try{ + for (final EntityPlayer temp : i) { + if (temp.getDisplayName().toLowerCase().equals(Name.toLowerCase())){ + return temp; + } + } + } + catch(final NullPointerException e){} + return null; + } + + public static boolean isPlayerOP(final EntityPlayer player){ + if (player.canCommandSenderUseCommand(2, "")){ + return true; + } + return false; + } + + //Not Clientside + public static ItemStack getItemStackInPlayersHand(final World world, final String Name){ + final EntityPlayer thePlayer = getPlayer(Name); + ItemStack heldItem = null; + try{heldItem = thePlayer.getHeldItem(); + }catch(final NullPointerException e){return null;} + if (heldItem != null){ + return heldItem; + } + return null; + } + + @SideOnly(Side.CLIENT) + public static ItemStack getItemStackInPlayersHand(){ + final Minecraft mc = Minecraft.getMinecraft(); + ItemStack heldItem = null; + try{heldItem = mc.thePlayer.getHeldItem(); + }catch(final NullPointerException e){return null;} + if (heldItem != null){ + return heldItem; + } + return null; + } + + public static ItemStack getItemStackInPlayersHand(final EntityPlayer player){ + ItemStack heldItem = null; + try{ + heldItem = player.getHeldItem(); + } + catch(final NullPointerException e){ + e.printStackTrace(); + return null; + } + if (heldItem != null){ + return heldItem; + } + else { + if (Utils.isClient()) { + heldItem = player.getItemInUse(); + } + else { + heldItem = player.getCurrentEquippedItem(); + } + } + return heldItem; + } + + @SideOnly(Side.CLIENT) + public static Item getItemInPlayersHandClient(){ + final Minecraft mc = Minecraft.getMinecraft(); + Item heldItem = null; + + try{heldItem = mc.thePlayer.getHeldItem().getItem(); + }catch(final NullPointerException e){return null;} + + if (heldItem != null){ + return heldItem; + } + + return null; + } + + public static Item getItemInPlayersHand(final EntityPlayer player){ + Item heldItem = null; + try{ + heldItem = player.getHeldItem().getItem(); + }catch(final NullPointerException e){return null;} + + if (heldItem != null){ + return heldItem; + } + return null; + } + + public final static EntityPlayer getPlayerEntityByName(final String aPlayerName){ + final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName); + if (player != null){ + return player; + } + return null; + } + + public final static UUID getPlayersUUIDByName(final String aPlayerName){ + final EntityPlayer player = PlayerUtils.getPlayer(aPlayerName); + if (player != null){ + return player.getUniqueID(); + } + return null; + } + + @SideOnly(Side.CLIENT) + public static final boolean isPlayerAlkalus(){ + if (Utils.isServer()){ + return false; + } + return isPlayerAlkalus(Minecraft.getMinecraft().thePlayer); + } + + public static final boolean isPlayerAlkalus(EntityPlayer player){ + if (player != null){ + if (player.getDisplayName().toLowerCase().equals("draknyte1") || player.getDisplayName().toLowerCase().equals("alkalus")){ + return true; + } + } + return false; + } + + public static void messageAllPlayers(String string) { + Utils.sendServerMessage(string); + } + + public static boolean isCreative(EntityPlayer aPlayer) { + return aPlayer.capabilities.isCreativeMode; + } + + public static boolean canTakeDamage(EntityPlayer aPlayer) { + return !aPlayer.capabilities.disableDamage; + } + + public static void cacheFakePlayer(EntityPlayer aPlayer) { + ChunkCoordinates aChunkLocation = aPlayer.getPlayerCoordinates(); + // Cache Fake Player + if (aPlayer instanceof FakePlayer || (mThaumcraftFakePlayer != null && mThaumcraftFakePlayer.isInstance(aPlayer)) + || (aPlayer.getCommandSenderName() == null + || aPlayer.getCommandSenderName().length() <= 0) + || (aPlayer.isEntityInvulnerable() && !aPlayer.canCommandSenderUseCommand(0, "") + && (aChunkLocation == null) || (aChunkLocation.posX == 0 && aChunkLocation.posY == 0 + && aChunkLocation.posZ == 0))) { + mCachedFakePlayers.put(aPlayer.getUniqueID().toString(), aPlayer); + } + } + + public static boolean isCachedFakePlayer(String aUUID) { + return mCachedFakePlayers.containsKey(aUUID); + } + + public static boolean isRealPlayer(EntityLivingBase aEntity) { + if (aEntity instanceof EntityPlayer) { + EntityPlayer p = (EntityPlayer) aEntity; + ChunkCoordinates aChunkLocation = p.getPlayerCoordinates(); + if (p instanceof FakePlayer) { + cacheFakePlayer(p); + return false; + } + if (mThaumcraftFakePlayer != null && mThaumcraftFakePlayer.isInstance(p) ) { + cacheFakePlayer(p); + return false; + } + if (p.getCommandSenderName() == null) { + cacheFakePlayer(p); + return false; + } + if (p.getCommandSenderName().length() <= 0) { + cacheFakePlayer(p); + return false; + } + if (p.isEntityInvulnerable() && !p.canCommandSenderUseCommand(0, "") && (aChunkLocation.posX == 0 && aChunkLocation.posY == 0 && aChunkLocation.posZ == 0)) { + cacheFakePlayer(p); + return false; + } + if (!isCachedFakePlayer(p.getUniqueID().toString())) { + return true; + } + } + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java new file mode 100644 index 0000000000..da5bc071bc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/RecipeUtils.java @@ -0,0 +1,803 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.Materials; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.ShapedRecipe; +import gtPlusPlus.core.handler.COMPAT_HANDLER; +import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler; +import gtPlusPlus.core.handler.Recipes.RegistrationHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.data.ArrayUtils; +import net.minecraft.block.Block; +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.item.crafting.ShapelessRecipes; +import net.minecraftforge.oredict.OreDictionary; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; + +public class RecipeUtils { +public static int mInvalidID = 1; + public static boolean recipeBuilder(final Object slot_1, final Object slot_2, final Object slot_3, final Object slot_4, final Object slot_5, final Object slot_6, final Object slot_7, final Object slot_8, final Object slot_9, ItemStack resultItem){ + + //Old Debug Code, useful for finding recipes loading too early. + /*if (gtPlusPlus.GTplusplus.CURRENT_LOAD_PHASE != GTplusplus.INIT_PHASE.POST_INIT) { + Logger.RECIPE(ReflectionUtils.getMethodName(1)); + Logger.RECIPE(ReflectionUtils.getMethodName(2)); + Logger.RECIPE(ReflectionUtils.getMethodName(3)); + Logger.RECIPE(ReflectionUtils.getMethodName(4)); + Logger.RECIPE(ReflectionUtils.getMethodName(5)); + Logger.RECIPE(ReflectionUtils.getMethodName(6)); + Logger.RECIPE(ReflectionUtils.getMethodName(7)); + Logger.RECIPE(ReflectionUtils.getMethodName(8)); + Logger.RECIPE(ReflectionUtils.getMethodName(9)); + FMLCommonHandler.instance().exitJava(1, true); + }*/ + + if (resultItem == null){ + Logger.RECIPE("[Fix] Found a recipe with an invalid output, yet had a valid inputs. Using Dummy output so recipe can be found.."); + resultItem = ItemUtils.getItemStackOfAmountFromOreDict("givemeabrokenitem", 1); + resultItem.setItemDamage(mInvalidID++); + RegistrationHandler.recipesFailed++; + //return false; + } + else if ((slot_1 == null) && (slot_2 == null) && (slot_3 == null) && + (slot_4 == null) && (slot_5 == null) && (slot_6 == null) && + (slot_7 == null) && (slot_8 == null) && (slot_9 == null)){ + Logger.RECIPE("[Fix] Found a recipe with 0 inputs, yet had a valid output."); + Logger.RECIPE("[Fix] Error found while adding a recipe for: "+resultItem != null ? resultItem.getDisplayName() : "Bad Output Item"+" | Please report this issue on Github."); + RegistrationHandler.recipesFailed++; + return false; + } + + Object[] o = new Object[] {slot_1, slot_2, slot_3, slot_4, slot_5, slot_6, slot_7, slot_8, slot_9}; + + try { + int size = COMPAT_HANDLER.mRecipesToGenerate.size(); + COMPAT_HANDLER.mRecipesToGenerate.put(new InternalRecipeObject(o, resultItem, false)); + //Utils.LOG_WARNING("Success! Added a recipe for "+resultItem.getDisplayName()); + if (COMPAT_HANDLER.mRecipesToGenerate.size() > size) { + if (!COMPAT_HANDLER.areInitItemsLoaded){ + RegistrationHandler.recipesSuccess++; + } + else { + LateRegistrationHandler.recipesSuccess++; + } + return true; + } + return false; + } + catch(RuntimeException k){ + //k.getMessage(); + //k.getClass(); + //k.printStackTrace(); + //k.getLocalizedMessage(); + Logger.RECIPE("[Fix] Invalid Recipe detected for: "+resultItem != null ? resultItem.getUnlocalizedName() : "INVALID OUTPUT ITEM"); + if (!COMPAT_HANDLER.areInitItemsLoaded){ + RegistrationHandler.recipesFailed++; + } + else { + LateRegistrationHandler.recipesFailed++; + } + return false; + } + } + + public static void shapelessBuilder(final ItemStack Output, final Object slot_1, final Object slot_2, final Object slot_3, final Object slot_4, final Object slot_5, final Object slot_6, final Object slot_7, final Object slot_8, final Object slot_9){ + //Item output_ITEM = Output.getItem(); + + final ArrayList validSlots = new ArrayList<>(); + + Logger.WARNING("Trying to add a recipe for "+Output.toString()); + String a,b,c,d,e,f,g,h,i; + if (slot_1 == null){ a = " ";} else { a = "1";validSlots.add('1');validSlots.add(slot_1);} + Logger.WARNING(a); + if (slot_2 == null){ b = " ";} else { b = "2";validSlots.add('2');validSlots.add(slot_2);} + Logger.WARNING(b); + if (slot_3 == null){ c = " ";} else { c = "3";validSlots.add('3');validSlots.add(slot_3);} + Logger.WARNING(c); + if (slot_4 == null){ d = " ";} else { d = "4";validSlots.add('4');validSlots.add(slot_4);} + Logger.WARNING(d); + if (slot_5 == null){ e = " ";} else { e = "5";validSlots.add('5');validSlots.add(slot_5);} + Logger.WARNING(e); + if (slot_6 == null){ f = " ";} else { f = "6";validSlots.add('6');validSlots.add(slot_6);} + Logger.WARNING(f); + if (slot_7 == null){ g = " ";} else { g = "7";validSlots.add('7');validSlots.add(slot_7);} + Logger.WARNING(g); + if (slot_8 == null){ h = " ";} else { h = "8";validSlots.add('8');validSlots.add(slot_8);} + Logger.WARNING(h); + if (slot_9 == null){ i = " ";} else { i = "9";validSlots.add('9');validSlots.add(slot_9);} + Logger.WARNING(i); + + + Logger.ERROR("_______"); + Logger.ERROR("|"+a+"|"+b+"|"+c+"|"); + Logger.ERROR("_______"); + Logger.ERROR("|"+d+"|"+e+"|"+f+"|"); + Logger.ERROR("_______"); + Logger.ERROR("|"+g+"|"+h+"|"+i+"|"); + Logger.ERROR("_______"); + + validSlots.add(0, a); + validSlots.add(1, b); + validSlots.add(2, c); + validSlots.add(3, d); + validSlots.add(4, e); + validSlots.add(5, f); + validSlots.add(6, g); + validSlots.add(7, h); + validSlots.add(8, i); + + try { + //GameRegistry.addRecipe(new ShapelessOreRecipe(Output, outputAmount), (Object[]) validSlots.toArray()); + GameRegistry.addRecipe(new ShapelessOreRecipe(Output, validSlots.toArray())); + //GameRegistry.addShapelessRecipe(new ItemStack(output_ITEM, 1), new Object[] {slot_1, slot_2}); + Logger.RECIPE("Success! Added a recipe for "+Output.getDisplayName()); + RegistrationHandler.recipesSuccess++; + } + catch(final RuntimeException k){ + k.getMessage(); + k.getClass(); + k.printStackTrace(); + k.getLocalizedMessage(); + Logger.RECIPE("[Fix] Invalid Recipe detected for: "+Output.getUnlocalizedName()); + RegistrationHandler.recipesFailed++; + } + + + //GameRegistry.addShapelessRecipe(new ItemStack(output_ITEM, 1), new Object[] {slot_1, slot_2}); + } + + public static void recipeBuilder(final Object[] array, final ItemStack outPut) { + Logger.SPECIFIC_WARNING("object Array - recipeBuilder", "Attempting to build a recipe using an object array as an input, splitting it, then running the normal recipeBuilder() method.", 396); + Object a=null; + Object b=null; + Object c=null; + Object d=null; + Object e=null; + Object f=null; + Object g=null; + Object h=null; + Object i=null; + for(int z =0; z <= array.length; z++){ + array[z].toString(); + switch(z) + { + case 0: + a = array[z]; + break; + case 1: + b = array[z]; + break; + case 2: + c = array[z]; + break; + case 3: + d = array[z]; + break; + case 4: + e = array[z]; + break; + case 5: + f = array[z]; + break; + case 6: + g = array[z]; + break; + case 7: + h = array[z]; + break; + case 8: + i = array[z]; + break; + default: + break; + } + recipeBuilder(a, b, c, d, e, f, g, h, i, outPut); + } + } + + public static boolean removeCraftingRecipe(Object x){ + if (null == x){return false;} + if (x instanceof String){ + final Item R = ItemUtils.getItemFromFQRN((String) x); + if (R != null){ + x = R; + } + else { + return false; + } + } + if ((x instanceof Item) || (x instanceof ItemStack)){ + if (x instanceof Item){ + final ItemStack r = new ItemStack((Item) x); + Logger.RECIPE("Removing Recipe for "+r.getUnlocalizedName()); + } + else { + Logger.RECIPE("Removing Recipe for "+((ItemStack) x).getUnlocalizedName()); + } + if (x instanceof ItemStack){ + final Item r = ((ItemStack) x).getItem(); + if (null != r){ + x = r; + } + else { + Logger.RECIPE("Recipe removal failed - Tell Alkalus."); + return false; + } + } + if (RecipeUtils.attemptRecipeRemoval((Item) x)){ + Logger.RECIPE("Recipe removal successful"); + return true; + } + Logger.RECIPE("Recipe removal failed - Tell Alkalus."); + return false; + } + return false; + } + + private static boolean attemptRecipeRemoval(final Item I){ + Logger.RECIPE("Create list of recipes."); + final List recipes = CraftingManager.getInstance().getRecipeList(); + final Iterator items = recipes.iterator(); + Logger.RECIPE("Begin list iteration."); + while (items.hasNext()) { + final ItemStack is = items.next().getRecipeOutput(); + if ((is != null) && (is.getItem() == I)){ + items.remove(); + Logger.RECIPE("Remove a recipe with "+I.getUnlocalizedName()+" as output."); + continue; + } + } + Logger.RECIPE("All recipes should be gone?"); + if (!items.hasNext()){ + Logger.RECIPE("We iterated once, let's try again to double check."); + final Iterator items2 = recipes.iterator(); + while (items2.hasNext()) { + final ItemStack is = items2.next().getRecipeOutput(); + if ((is != null) && (is.getItem() == I)){ + items.remove(); + Logger.RECIPE("REMOVING MISSED RECIPE - RECHECK CONSTRUCTORS"); + return true; + } + } + Logger.RECIPE("Should be all gone now after double checking, so return true."); + return true; + } + Logger.RECIPE("Return false, because something went wrong."); + return false; + } + + + + public static boolean addShapedGregtechRecipeForTypes( + final Object InputItem1, final Object InputItem2, final Object InputItem3, + final Object InputItem4, final Object InputItem5, final Object InputItem6, + final Object InputItem7, final Object InputItem8, final Object InputItem9, + final ItemStack OutputItem){ + + int using = 0, recipeSlotCurrent = 0; + boolean[] hasMultiStack = new boolean[9]; + boolean inUse[] = {false, false, false}; + ItemStack array[][] = new ItemStack[3][9]; + + Object[] inputs = { + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9}; + + for (Object o : inputs){ + if (o.getClass().isArray()){ + if (inUse[using] == false){ + inUse[using] = true; + array[using] = (ItemStack[]) o; + hasMultiStack[recipeSlotCurrent] = true; + using++; + } + } + else { + hasMultiStack[recipeSlotCurrent] = false; + } + recipeSlotCurrent++; + } + + int using2 = 0; + for (boolean t : inUse){ + + if (t){ + if (array[using2] != null){ + //addShapedGregtechRecipe + } + } + using2++; + } + + + return false; + } + + + + public static boolean addShapedGregtechRecipe( + final Object InputItem1, final Object InputItem2, final Object InputItem3, + final Object InputItem4, final Object InputItem5, final Object InputItem6, + final Object InputItem7, final Object InputItem8, final Object InputItem9, + final ItemStack OutputItem){ + + Object[] o = { + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9 + }; + + + if (gtPlusPlus.GTplusplus.CURRENT_LOAD_PHASE != GTplusplus.INIT_PHASE.POST_INIT) { + CORE.crash("Load Phase "+gtPlusPlus.GTplusplus.CURRENT_LOAD_PHASE+" should be "+GTplusplus.INIT_PHASE.POST_INIT+". Unable to register recipe."); + } + + + int size = COMPAT_HANDLER.mGtRecipesToGenerate.size(); + COMPAT_HANDLER.mGtRecipesToGenerate.put(new InternalRecipeObject(o, OutputItem, true)); + + if (COMPAT_HANDLER.mGtRecipesToGenerate.size() > size) { + if (!COMPAT_HANDLER.areInitItemsLoaded){ + RegistrationHandler.recipesSuccess++; + } + else { + LateRegistrationHandler.recipesSuccess++; + } + return true; + } + return false; + + } + + public static boolean addShapedGregtechRecipe(final Object[] inputs, ItemStack output){ + + if (inputs.length != 9){ + Logger.RECIPE("[Fix] Input array for "+output.getDisplayName()+" does not equal 9. "+inputs.length+" is the actual size."); + RegistrationHandler.recipesFailed++; + return false; + } + + for (int x=0;x<9;x++){ + if (inputs[x] == null){ + inputs[x] = " "; + Logger.WARNING("Input slot "+x+" changed from NULL to a blank space."); + } + else if (!(inputs[x] instanceof ItemStack) && !(inputs[x] instanceof String) && !(inputs[x] instanceof Item)){ + if (output != null){ + Logger.RECIPE("[Fix] Invalid Item inserted into inputArray. Item:"+output.getDisplayName()+" has a bad recipe. Please report to Alkalus."); + RegistrationHandler.recipesFailed++; + return false; + } + else { + Logger.RECIPE("[Fix] Output is Null for a recipe. Report to Alkalus."); + output = ItemUtils.getItemStackOfAmountFromOreDict("sadibasdkjnad", 1); + RegistrationHandler.recipesFailed++; + } + } + } + + int size = COMPAT_HANDLER.mGtRecipesToGenerate.size(); + COMPAT_HANDLER.mGtRecipesToGenerate.put(new InternalRecipeObject(inputs, output, true)); + + if (COMPAT_HANDLER.mGtRecipesToGenerate.size() > size) { + if (!COMPAT_HANDLER.areInitItemsLoaded){ + RegistrationHandler.recipesSuccess++; + } + else { + LateRegistrationHandler.recipesSuccess++; + } + return true; + } + return false; + } + + public static boolean addShapelessGregtechRecipe( + final Object InputItem1, final Object InputItem2, final Object InputItem3, + final Object InputItem4, final Object InputItem5, final Object InputItem6, + final Object InputItem7, final Object InputItem8, final Object InputItem9, + final ItemStack OutputItem){ + + Object[] inputItems = { + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9 + }; + return addShapelessGregtechRecipe(inputItems, OutputItem); + } + + public static boolean addShapelessGregtechRecipe(final Object[] inputItems, final ItemStack OutputItem){ + //Catch Invalid Recipes + if (inputItems.length > 9 || inputItems.length < 1){ + if (OutputItem != null){ + Logger.RECIPE("[Fix] Invalid input array for shapeless recipe, which should output "+OutputItem.getDisplayName()); + } + return false; + } + //let gregtech handle shapeless recipes. + if (GT_ModHandler.addShapelessCraftingRecipe(OutputItem, inputItems)){ + return true; + } + return false; + } + + public static ItemStack getItemStackFromOreDict(final String oredictName){ + final ArrayList oreDictList = OreDictionary.getOres(oredictName); + return oreDictList.get(0); + } + + public static boolean buildShapelessRecipe(final ItemStack output, final Object[] input){ + return ShapelessUtils.addShapelessRecipe(output, input); + } + + public static boolean generateMortarRecipe(ItemStack aStack, ItemStack aOutput) { + return RecipeUtils.addShapedGregtechRecipe( + aStack, null, null, + CI.craftingToolMortar, null, null, + null, null, null, + aOutput); + } + + public static boolean doesGregtechRecipeHaveEqualCells(GT_Recipe x) { + if (x.mInputs.length == 0 && x.mOutputs.length == 0) { + return true; + } + + final int tInputAmount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(x.mInputs); + final int tOutputAmount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(x.mOutputs); + + if (tInputAmount < tOutputAmount) { + if (!Materials.Tin.contains(x.mInputs)) { + return false; + } + else { + return true; + } + } + else if (tInputAmount > tOutputAmount && !Materials.Tin.contains(x.mOutputs)) { + return false; + } + else { + return true; + } + } + + public static String[] getRecipeInfo(GT_Recipe m) { + if (m == null) { + return new String[] {}; + } + AutoMap result = new AutoMap(); + result.put(m.toString()); + result.put("Input "+ItemUtils.getArrayStackNames(m.mInputs)); + result.put("Output "+ItemUtils.getArrayStackNames(m.mOutputs)); + result.put("Input "+ItemUtils.getArrayStackNames(m.mFluidInputs)); + result.put("Output "+ItemUtils.getArrayStackNames(m.mFluidOutputs)); + result.put("Can be buffered? "+m.mCanBeBuffered); + result.put("Duration: "+m.mDuration); + result.put("EU/t: "+m.mEUt); + result.put("Is Hidden? "+m.mHidden); + result.put("Is Enabled? "+m.mEnabled); + result.put("Special Value: "+m.mSpecialValue); + result.put("====================================="); + String s[] = result.toArray(); + return s; + } + + + public static class InternalRecipeObject implements RunnableWithInfo { + final ItemStack mOutput; + final ShapedOreRecipe mRecipe; + public final boolean isValid; + + public InternalRecipeObject(Object[] aInputs, ItemStack aOutput, boolean gtRecipe) { + Logger.RECIPE("==================================="); + mOutput = aOutput != null ? aOutput.copy() : null; + Object[] aFiltered = new Object[9]; + int aValid = 0; + for (Object o : aInputs) { + if (o instanceof ItemStack) { + aFiltered[aValid++] = o; + } + else if (o instanceof Item) { + aFiltered[aValid++] = ItemUtils.getSimpleStack((Item) o); + } + else if (o instanceof Block) { + aFiltered[aValid++] = ItemUtils.getSimpleStack((Block) o); + } + else if (o instanceof String) { + aFiltered[aValid++] = o; + } + else if (o == null) { + aFiltered[aValid++] = null; + } + else { + Logger.RECIPE("Cleaned a "+o.getClass().getSimpleName()+" from recipe input."); + } + } + + int validCounter = 0, invalidCounter = 0; + for (Object p : aFiltered) { + if (p instanceof ItemStack) { + validCounter++; + } + else if (p instanceof Item) { + validCounter++; + } + else if (p instanceof Block) { + validCounter++; + } + else if (p instanceof String) { + validCounter++; + } + else if (p == null) { + validCounter++; + } + else { + invalidCounter++; + } + } + + Logger.RECIPE("Using "+validCounter+" valid inputs and "+invalidCounter+" invalid inputs."); + ShapedRecipe r = new ShapedRecipe(aFiltered, mOutput); + if (r != null && r.mRecipe != null) { + isValid = true; + } + else { + isValid = false; + } + mRecipe = r != null ? r.mRecipe : null; + } + + @Override + public void run() { + if (this.isValid) { + GameRegistry.addRecipe(mRecipe); + } + else { + Logger.RECIPE("[Fix] Invalid shapped recipe outputting "+mOutput != null ? mOutput.getDisplayName() : "Bad Output Item"); + } + } + + @Override + public String getInfoData() { + if (mOutput != null && mOutput instanceof ItemStack) { + return ((ItemStack) mOutput).getDisplayName(); + } + return ""; + } + + } + + + public static boolean removeGtRecipe(GT_Recipe aRecipeToRemove, GT_Recipe_Map aRecipeMap) { + if (aRecipeMap.mRecipeList.contains(aRecipeToRemove)) { + return aRecipeMap.mRecipeList.remove(aRecipeToRemove); + } + return false; + } + + public static boolean addGtRecipe(GT_Recipe aRecipeToAdd, GT_Recipe_Map aRecipeMap) { + if (!aRecipeMap.mRecipeList.contains(aRecipeToAdd)) { + return aRecipeMap.mRecipeList.add(aRecipeToAdd); + } + return false; + } + + public static boolean removeRecipeByOutput(ItemStack aOutput) { + return removeRecipeByOutput(aOutput, true, false, false); + } + + public static boolean removeRecipeByOutput(ItemStack aOutput, boolean aIgnoreNBT, + boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) { + if (aOutput == null) { + return false; + } else { + boolean rReturn = false; + ArrayList tList = (ArrayList) CraftingManager.getInstance().getRecipeList(); + aOutput = GT_OreDictUnificator.get(aOutput); + int tList_sS = tList.size(); + + for (int i = 0; i < tList_sS; ++i) { + IRecipe tRecipe = (IRecipe) tList.get(i); + if (!aNotRemoveShapelessRecipes + || !(tRecipe instanceof ShapelessRecipes) && !(tRecipe instanceof ShapelessOreRecipe)) { + if (aOnlyRemoveNativeHandlers) { + if (!gregtech.api.util.GT_ModHandler.sNativeRecipeClasses.contains(tRecipe.getClass().getName())) { + continue; + } + } else if (gregtech.api.util.GT_ModHandler.sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) { + continue; + } + + ItemStack tStack = tRecipe.getRecipeOutput(); + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) { + tList.remove(i--); + tList_sS = tList.size(); + rReturn = true; + } + } + } + + return rReturn; + } + } + + + public static void addSmeltingRecipe(ItemStack aStackInput, ItemStack aStackOutput) { + addSmeltingRecipe(aStackInput, aStackOutput, 0f); + } + + public static void addSmeltingRecipe(ItemStack aStackInput, ItemStack aStackOutput, float aXpGained) { + + GameRegistry.addSmelting(aStackInput, aStackOutput, aXpGained); + + } + + public static boolean addShapedRecipe( + Object Input_1, Object Input_2, Object Input_3, + Object Input_4, Object Input_5, Object Input_6, + Object Input_7, Object Input_8, Object Input_9, + ItemStack aOutputStack) { + return addShapedRecipe(new Object[] {Input_1, Input_2, Input_3, Input_4, Input_5, Input_6, Input_7, Input_8, Input_9}, aOutputStack); + } + + private static boolean addShapedRecipe(Object[] Inputs, ItemStack aOutputStack) { + Object[] Slots = new Object[9]; + + String aFullString = ""; + String aFullStringExpanded = "abcdefghi"; + + for (int i=0; i<9; i++) { + Object o = Inputs[i]; + + if (o instanceof ItemStack) { + Slots[i] = ItemUtils.getSimpleStack((ItemStack) o, 1); + aFullString += aFullStringExpanded.charAt(i); + } + else if (o instanceof Item) { + Slots[i] = ItemUtils.getSimpleStack((Item) o, 1); + aFullString += aFullStringExpanded.charAt(i); + } + else if (o instanceof Block) { + Slots[i] = ItemUtils.getSimpleStack((Block) o, 1); + aFullString += aFullStringExpanded.charAt(i); + } + else if (o instanceof String) { + Slots[i] = o; + aFullString += aFullStringExpanded.charAt(i); + } + else if (o instanceof ItemData) { + ItemData aData = (ItemData) o; + ItemStack aStackFromGT = ItemUtils.getOrePrefixStack(aData.mPrefix, aData.mMaterial.mMaterial, 1); + Slots[i] = aStackFromGT; + aFullString += aFullStringExpanded.charAt(i); + } + else if (o == null) { + Slots[i] = null; + aFullString += " "; + } + else { + Slots[i] = null; + Logger.INFO("Cleaned a "+o.getClass().getSimpleName()+" from recipe input."); + Logger.INFO("ERROR"); + CORE.crash("Bad Shaped Recipe."); + } + } + Logger.INFO("Using String: "+aFullString); + + String aRow1 = aFullString.substring(0, 3); + String aRow2 = aFullString.substring(3, 6); + String aRow3 = aFullString.substring(6, 9); + Logger.INFO(""+aRow1); + Logger.INFO(""+aRow2); + Logger.INFO(""+aRow3); + + String[] aStringData = new String[] {aRow1, aRow2, aRow3}; + Object[] aDataObject = new Object[19]; + aDataObject[0] = aStringData; + int aIndex = 0; + + + for (int u=1;u<20;u+=2) { + if (aIndex == 9) { + break; + } + if (aFullString.charAt(aIndex) != (' ')) { + aDataObject[u] = aFullString.charAt(aIndex); + aDataObject[u+1] = Slots[aIndex]; + Logger.INFO("("+aIndex+") "+aFullString.charAt(aIndex)+" | "+ (Slots[aIndex] instanceof ItemStack ? ItemUtils.getItemName((ItemStack) Slots[aIndex]) : Slots[aIndex] instanceof String ? (String) Slots[aIndex] : "Unknown")); + } + aIndex++; + } + + Logger.INFO("Data Size: "+aDataObject.length); + aDataObject = ArrayUtils.removeNulls(aDataObject); + Logger.INFO("Clean Size: "+aDataObject.length); + Logger.INFO("ArrayData: "+Arrays.toString(aDataObject)); + + ShapedOreRecipe aRecipe = new ShapedOreRecipe(aOutputStack, aDataObject); + + /*ShapedOreRecipe aRecipe = new ShapedOreRecipe(aOutputStack, + aStringData, + 'a', Slots[0], + 'b', Slots[1], + 'c', Slots[2], + 'd', Slots[3], + 'e', Slots[4], + 'f', Slots[5], + 'g', Slots[6], + 'h', Slots[7], + 'i', Slots[8]);*/ + + int size = COMPAT_HANDLER.mRecipesToGenerate.size(); + COMPAT_HANDLER.mRecipesToGenerate.put(new InternalRecipeObject2(aRecipe)); + if (COMPAT_HANDLER.mRecipesToGenerate.size() > size) { + if (!COMPAT_HANDLER.areInitItemsLoaded){ + RegistrationHandler.recipesSuccess++; + } + else { + LateRegistrationHandler.recipesSuccess++; + } + return true; + } + return false; + } + public static class InternalRecipeObject2 implements RunnableWithInfo { + + final ItemStack mOutput; + final ShapedOreRecipe mRecipe; + final boolean isValid; + + public InternalRecipeObject2(ShapedOreRecipe aRecipe) { + mRecipe = aRecipe; + mOutput = aRecipe.getRecipeOutput(); + if (mOutput != null) { + this.isValid = true; + } + else { + this.isValid = false; + } + } + + @Override + public void run() { + if (this.isValid) { + GameRegistry.addRecipe(mRecipe); + } + else { + Logger.INFO("[Fix] Invalid shapped recipe outputting "+mOutput != null ? mOutput.getDisplayName() : "Bad Output Item"); + } + } + + @Override + public String getInfoData() { + if (mOutput != null && mOutput instanceof ItemStack) { + return ((ItemStack) mOutput).getDisplayName(); + } + return ""; + } + + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java new file mode 100644 index 0000000000..3caa9d4e4f --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/ShapelessUtils.java @@ -0,0 +1,56 @@ +package gtPlusPlus.core.util.minecraft; + +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.item.crafting.ShapelessRecipes; + +import gtPlusPlus.api.objects.Logger; + +public class ShapelessUtils { + + + public static boolean addShapelessRecipe(final ItemStack output, final Object ... params) + { + final ArrayList arraylist = new ArrayList<>(); + final Object[] aobject = params; + final int i = params.length; + + for (int j = 0; j < i; ++j) + { + final Object object1 = aobject[j]; + + if (object1 instanceof ItemStack) + { + arraylist.add(((ItemStack)object1).copy()); + } + else if (object1 instanceof Item) + { + arraylist.add(new ItemStack((Item)object1)); + } + else + { + if ((object1 == null)) + { + Logger.INFO(("Invalid shapeless input, ignoring!")); + } + else if (!(object1 instanceof Block) && (object1 != null)) + { + Logger.INFO(("Invalid shapeless recipe!")); + return false; + } + else { + arraylist.add(new ItemStack((Block)object1)); + } + } + } + CraftingManager.getInstance().getRecipeList().add(new ShapelessRecipes(output, arraylist)); + //CraftingManager.getInstance().addShapelessRecipe(output, arraylist); + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java new file mode 100644 index 0000000000..2ae2a9f1de --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java @@ -0,0 +1,305 @@ +package gtPlusPlus.core.util.minecraft.gregtech; + +import static gtPlusPlus.core.lib.CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.GT_Mod; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; +import gregtech.common.GT_Proxy; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.base.cell.BaseItemCell; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.ItemStack; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.fluids.FluidStack; + +public class PollutionUtils { + + private static boolean mIsPollutionEnabled = true; + + private static Method mAddPollution; + private static Method mAddPollution2; + + private static Method mGetPollution; + private static Method mGetPollution2; + + public static AutoMap mPollutionFluidStacks = new AutoMap(); + + static { + if (MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + mIsPollutionEnabled = mPollution(); + } else { + mIsPollutionEnabled = false; + } + } + + public static boolean isPollutionEnabled() { + return mIsPollutionEnabled; + } + + public static boolean mPollution() { + try { + GT_Proxy GT_Pollution = GT_Mod.gregtechproxy; + if (GT_Pollution != null) { + Field mPollution = ReflectionUtils.getField(GT_Pollution.getClass(), "mPollution"); + if (mPollution != null) { + return mPollution.getBoolean(GT_Pollution); + } + } + } catch (SecurityException | IllegalArgumentException | IllegalAccessException e) { + } + return false; + } + + public static boolean addPollution(IGregTechTileEntity te, int pollutionValue) { + if (mIsPollutionEnabled) + try { + if (te == null) { + return false; + } + if (mAddPollution != null) { + mAddPollution.invoke(null, te, pollutionValue); + } + Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); + if (GT_Pollution != null) { + Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "addPollution", IGregTechTileEntity.class, int.class); + if (addPollution != null) { + mAddPollution = addPollution; + addPollution.invoke(null, te, pollutionValue); + return true; + } + } + } catch (SecurityException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + return false; + } + + public static boolean addPollution(IHasWorldObjectAndCoords aTileOfSomeSort, int pollutionValue) { + if (mIsPollutionEnabled) + try { + if (aTileOfSomeSort == null) { + return false; + } + IHasWorldObjectAndCoords j = (IHasWorldObjectAndCoords) aTileOfSomeSort; + Chunk c = j.getWorld().getChunkFromBlockCoords(j.getXCoord(), j.getZCoord()); + return addPollution(c, pollutionValue); + } catch (SecurityException | IllegalArgumentException e) { + } + return false; + } + + public static boolean addPollution(Chunk aChunk, int pollutionValue) { + if (mIsPollutionEnabled) + try { + if (aChunk == null) { + return false; + } + if (mAddPollution2 != null) { + mAddPollution2.invoke(null, aChunk, pollutionValue); + return true; + } + Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); + if (GT_Pollution != null) { + Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "addPollution", Chunk.class, int.class); + if (addPollution != null) { + mAddPollution2 = addPollution; + mAddPollution2.invoke(null, aChunk, pollutionValue); + return true; + } + } + } catch (SecurityException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + return false; + } + + public static boolean removePollution(IGregTechTileEntity te, int pollutionValue) { + return addPollution(te, -pollutionValue); + } + + public static boolean removePollution(IHasWorldObjectAndCoords aTileOfSomeSort, int pollutionValue) { + return addPollution(aTileOfSomeSort, -pollutionValue); + } + + public static boolean removePollution(Chunk aChunk, int pollutionValue) { + return addPollution(aChunk, -pollutionValue); + } + + public static boolean nullifyPollution(IGregTechTileEntity te) { + if (te == null) { + return false; + } + return nullifyPollution((IHasWorldObjectAndCoords) te); + } + + public static boolean nullifyPollution(IHasWorldObjectAndCoords aTileOfSomeSort) { + if (aTileOfSomeSort == null) { + return false; + } + IHasWorldObjectAndCoords j = (IHasWorldObjectAndCoords) aTileOfSomeSort; + Chunk c = j.getWorld().getChunkFromBlockCoords(j.getXCoord(), j.getZCoord()); + return nullifyPollution(c); + } + + public static boolean nullifyPollution(Chunk aChunk) { + try { + if (aChunk == null) { + return false; + } + long getCurrentPollution = getPollution(aChunk); + if (getCurrentPollution <= 0) { + return false; + } + else { + if (mAddPollution2 != null) { + mAddPollution2.invoke(null, aChunk, -getCurrentPollution); + return true; + } + else { + Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); + if (GT_Pollution != null) { + Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "addPollution", Chunk.class, int.class); + if (addPollution != null) { + mAddPollution2 = addPollution; + mAddPollution2.invoke(null, aChunk, 0); + return true; + } + } + } + } + + } catch (SecurityException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + return false; + } + + public static int getPollution(IGregTechTileEntity te) { + if (MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) + try { + if (te == null) { + return 0; + } + if (mGetPollution != null) { + mGetPollution.invoke(null, te); + } + Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); + if (GT_Pollution != null) { + Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "getPollution", IGregTechTileEntity.class); + if (addPollution != null) { + mGetPollution = addPollution; + return (int) addPollution.invoke(null, te); + } + } + } catch (SecurityException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + return 0; + } + + public static int getPollution(Chunk te) { + if (MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) + try { + if (te == null) { + return 0; + } + if (mGetPollution2 != null) { + mGetPollution2.invoke(null, te); + } + Class GT_Pollution = ReflectionUtils.getClass("gregtech.common.GT_Pollution"); + if (GT_Pollution != null) { + Method addPollution = ReflectionUtils.getMethod(GT_Pollution, "getPollution", Chunk.class); + if (addPollution != null) { + mGetPollution2 = addPollution; + return (int) addPollution.invoke(null, te); + } + } + } catch (SecurityException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + return 0; + } + + public static boolean setPollutionFluids() { + if (mPollutionFluidStacks.isEmpty()) { + FluidStack CD, CM, SD; + CD = FluidUtils.getFluidStack("carbondioxide", 1000); + CM = FluidUtils.getFluidStack("carbonmonoxide", 1000); + SD = FluidUtils.getFluidStack("sulfurdioxide", 1000); + if (PollutionUtils.mPollutionFluidStacks.size() == 0) { + if (CD != null) { + Logger.INFO("[PollutionCompat] Found carbon dioxide fluid, registering it."); + PollutionUtils.mPollutionFluidStacks.put(CD); + MISC_MATERIALS.CARBON_DIOXIDE.registerComponentForMaterial(CD); + ItemStack cellCD = ItemUtils.getItemStackOfAmountFromOreDict("cellCarbonDioxide", 1); + if (ItemUtils.checkForInvalidItems(cellCD)) { + Logger.INFO("[PollutionCompat] Found carbon dioxide cell, registering component."); + MISC_MATERIALS.CARBON_DIOXIDE.registerComponentForMaterial(OrePrefixes.cell, cellCD); + } + else { + Logger.INFO("[PollutionCompat] Did not find carbon dioxide cell, registering new component."); + new BaseItemCell(MISC_MATERIALS.CARBON_DIOXIDE); + } + } + else { + MaterialGenerator.generate(MISC_MATERIALS.CARBON_DIOXIDE, false, false); + } + + if (CM != null) { + Logger.INFO("[PollutionCompat] Found carbon monoxide fluid, registering it."); + PollutionUtils.mPollutionFluidStacks.put(CM); + MISC_MATERIALS.CARBON_MONOXIDE.registerComponentForMaterial(CM); + ItemStack cellCD = ItemUtils.getItemStackOfAmountFromOreDict("cellCarbonMonoxide", 1); + if (ItemUtils.checkForInvalidItems(cellCD)) { + Logger.INFO("[PollutionCompat] Found carbon monoxide cell, registering component."); + MISC_MATERIALS.CARBON_MONOXIDE.registerComponentForMaterial(OrePrefixes.cell, cellCD); + } + else { + Logger.INFO("[PollutionCompat] Did not find carbon monoxide cell, registering new component."); + new BaseItemCell(MISC_MATERIALS.CARBON_MONOXIDE); + } + } + else { + MaterialGenerator.generate(MISC_MATERIALS.CARBON_MONOXIDE, false, false); + } + + if (SD != null) { + Logger.INFO("[PollutionCompat] Found sulfur dioxide fluid, registering it."); + PollutionUtils.mPollutionFluidStacks.put(SD); + } + } + if (PollutionUtils.mPollutionFluidStacks.size() > 0) { + return true; + } + return false; + } + else { + if (mPollutionFluidStacks.size() != 3) { + Logger.INFO("Unable to detect all 3 pollution fluids. Found: "); + Logger.INFO(ArrayUtils.toString(mPollutionFluidStacks)); + return false; + } + else { + return true; + } + } + + + + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java new file mode 100644 index 0000000000..44c0f66732 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java @@ -0,0 +1,244 @@ +package gtPlusPlus.core.util.minecraft.gregtech.material; + +public class MaterialBuilder { + /*public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; + + private int metaItemSubID; + private TextureSet iconSet; + private float toolSpeed = 1.0f; + private int durability = 0; + private int toolQuality = 0; + private int types = 0; + private int r = 255, g = 255, b = 255, a = 0; + private String name; + private String defaultLocalName; + private int fuelType = 0; + private int fuelPower = 0; + private int meltingPoint = 0; + private int blastFurnaceTemp = 0; + private boolean blastFurnaceRequired = false; + private boolean transparent = false; + private int oreValue = 1; + private int densityMultiplier = 1; + private int densityDivider = 1; + private Dyes color = Dyes._NULL; + private int extraData = 0; + private List materialList = new ArrayList(); + private List aspects = new ArrayList(); + private boolean canBeCracked = false; + private int liquidTemperature = 300; + private int gasTemperature = 300; + + public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String defaultLocalName) { + this.metaItemSubID = metaItemSubID; + this.iconSet = iconSet; + this.name = defaultLocalName.replace(" ", "").replace("-", ""); + this.defaultLocalName = defaultLocalName; + } + + public Materials constructMaterial() { + return new Materials( + metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r, g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp, + blastFurnaceRequired, transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects); + + } + + public MaterialBuilder setName(String name){ + this.name = name; + return this; + } + + public MaterialBuilder setTypes(int types){ + this.types = types; + return this; + } + + public MaterialBuilder addDustItems(){ + types = types | 1; + return this; + } + + public MaterialBuilder addMetalItems(){ + types = types | 2; + return this; + } + + public MaterialBuilder addGemItems(){ + types = types | 4; + return this; + } + + public MaterialBuilder addOreItems(){ + types = types | 8; + return this; + } + + public MaterialBuilder addCell(){ + types = types | 16; + return this; + } + + public MaterialBuilder addPlasma(){ + types = types | 32; + return this; + } + + public MaterialBuilder addToolHeadItems(){ + types = types | 64; + return this; + } + + public MaterialBuilder addGearItems(){ + types = types | 128; + return this; + } + + public MaterialBuilder addFluid(){ + return this; + } + + public MaterialBuilder addGas(){ + return this; + } + + + public MaterialBuilder setRGBA(int r, int g, int b, int a){ + this.r = r; + this.g = g; + this.b = b; + this.a = a; + return this; + } + + public MaterialBuilder setRGB(int r, int g, int b){ + this.r = r; + this.g = g; + this.b = b; + return this; + } + + public MaterialBuilder setTransparent(boolean transparent){ + this.transparent = transparent; + return this; + } + + public MaterialBuilder setColor(Dyes color){ + this.color = color; + return this; + } + + + public MaterialBuilder setToolSpeed(float toolSpeed) { + this.toolSpeed = toolSpeed; + return this; + } + + public MaterialBuilder setDurability(int durability) { + this.durability = durability; + return this; + } + + public MaterialBuilder setToolQuality(int toolQuality) { + this.toolQuality = toolQuality; + return this; + } + + + public MaterialBuilder setFuelType(int fuelType) { + this.fuelType = fuelType; + return this; + } + + public MaterialBuilder setFuelPower(int fuelPower) { + this.fuelPower = fuelPower; + return this; + } + + public MaterialBuilder setMeltingPoint(int meltingPoint) { + this.meltingPoint = meltingPoint; + return this; + } + + public MaterialBuilder setBlastFurnaceTemp(int blastFurnaceTemp) { + this.blastFurnaceTemp = blastFurnaceTemp; + return this; + } + + public MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { + this.blastFurnaceRequired = blastFurnaceRequired; + return this; + } + + public MaterialBuilder setOreValue(int oreValue) { + this.oreValue = oreValue; + return this; + } + + public MaterialBuilder setDensityMultiplier(int densityMultiplier) { + this.densityMultiplier = densityMultiplier; + return this; + } + + public MaterialBuilder setDensityDivider(int densityDivider) { + this.densityDivider = densityDivider; + return this; + } + + public MaterialBuilder setExtraData(int extraData) { + this.extraData = extraData; + return this; + } + + public MaterialBuilder addElectrolyzerRecipe(){ + extraData = extraData | 1; + return this; + } + + public MaterialBuilder addCentrifugeRecipe(){ + extraData = extraData | 2; + return this; + } + + public MaterialBuilder setMaterialList(List materialList) { + this.materialList = materialList; + return this; + } + + public MaterialBuilder setMaterialList(MaterialStack ... materials) { + this.materialList = Arrays.asList(materials); + return this; + } + + public MaterialBuilder setAspects(List aspects) { + this.aspects = aspects; + return this; + } + + public int getLiquidTemperature() { + return liquidTemperature; + } + + public MaterialBuilder setLiquidTemperature(int liquidTemperature) { + this.liquidTemperature = liquidTemperature; + return this; + } + + public int getGasTemperature() { + return gasTemperature; + } + + public MaterialBuilder setGasTemperature(int gasTemperature) { + this.gasTemperature = gasTemperature; + return this; + } + + public boolean canBeCracked() { + return canBeCracked; + } + + public MaterialBuilder setCanBeCracked(boolean canBeCracked) { + this.canBeCracked = canBeCracked; + return this; + } +*/ +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java new file mode 100644 index 0000000000..635239bbfc --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java @@ -0,0 +1,3 @@ +package gtPlusPlus.core.util.minecraft.gregtech.recipehandlers; + +public final class GregtechRecipe {} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java new file mode 100644 index 0000000000..def836eac9 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.util.minecraft.network; + +import cpw.mods.fml.common.network.internal.FMLProxyPacket; +import io.netty.buffer.Unpooled; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import mods.railcraft.common.util.misc.Game; + +public abstract class CustomPacket { + public static final String CHANNEL_NAME = "GTPP"; + + public enum PacketType { + TILE_ENTITY, + } + + public FMLProxyPacket getPacket() { + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + DataOutputStream data = new DataOutputStream(bytes); + try { + data.writeByte(this.getID()); + this.writeData(data); + } catch (IOException var4) { + Game.logThrowable("Error constructing packet: {0}", var4, new Object[]{this.getClass()}); + } + return new FMLProxyPacket(Unpooled.wrappedBuffer(bytes.toByteArray()), "GTPP"); + } + + public abstract void writeData(DataOutputStream var1) throws IOException; + + public abstract void readData(DataInputStream var1) throws IOException; + + public abstract int getID(); + + public String toString() { + return this.getClass().getSimpleName(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java new file mode 100644 index 0000000000..edbc6aaf83 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java @@ -0,0 +1,25 @@ +package gtPlusPlus.core.util.minecraft.network; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.world.WorldServer; + +public class PacketBuilder { + + private static PacketBuilder instance; + + public static PacketBuilder instance() { + if (instance == null) { + instance = new PacketBuilder(); + } + return instance; + } + + public void sendTileEntityPacket(IGregTechTileEntity tile) { + if (tile.getWorld() instanceof WorldServer) { + WorldServer world = (WorldServer) tile.getWorld(); + PacketTileEntity pkt = new PacketTileEntity(tile); + PacketDispatcher.sendToWatchers(pkt, world, tile.getXCoord(), tile.getZCoord()); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java new file mode 100644 index 0000000000..f61a6f2b6c --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java @@ -0,0 +1,88 @@ +package gtPlusPlus.core.util.minecraft.network; + +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import cpw.mods.fml.relauncher.ReflectionHelper; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.preloader.DevHelper; + +import java.lang.reflect.Method; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.Packet; +import net.minecraft.server.management.PlayerManager; +import net.minecraft.world.WorldServer; + +@SuppressWarnings("unchecked") +public class PacketDispatcher { + private static final Class playerInstanceClass; + private static final Method getOrCreateChunkWatcher; + private static final Method sendToAllPlayersWatchingChunk; + + public static void sendToServer(CustomPacket packet) { + PacketHandler.INSTANCE.channel.sendToServer(packet.getPacket()); + } + + public static void sendToPlayer(CustomPacket packet, EntityPlayerMP player) { + PacketHandler.INSTANCE.channel.sendTo(packet.getPacket(), player); + } + + public static void sendToAll(CustomPacket packet) { + PacketHandler.INSTANCE.channel.sendToAll(packet.getPacket()); + } + + public static void sendToAllAround(CustomPacket packet, TargetPoint zone) { + PacketHandler.INSTANCE.channel.sendToAllAround(packet.getPacket(), zone); + } + + public static void sendToDimension(CustomPacket packet, int dimensionId) { + PacketHandler.INSTANCE.channel.sendToDimension(packet.getPacket(), dimensionId); + } + + public static void sendToWatchers(CustomPacket packet, WorldServer world, int worldX, int worldZ) { + try { + Object playerInstance = getOrCreateChunkWatcher.invoke(world.getPlayerManager(), worldX >> 4, worldZ >> 4, + false); + if (playerInstance != null) { + sendToAllPlayersWatchingChunk.invoke(playerInstance, packet.getPacket()); + } + + } catch (Exception var5) { + Logger.ERROR("Reflection Failure in PacketDispatcher.sendToWatchers() {0} {1}" + 20 + var5 + + new Object[]{getOrCreateChunkWatcher.getName() + sendToAllPlayersWatchingChunk.getName()}); + throw new RuntimeException(var5); + } + } + + static { + try { + playerInstanceClass = PlayerManager.class.getDeclaredClasses()[0]; + + Method a, b; + + try { + a = DevHelper.getForgeMethod(PlayerManager.class, "getOrCreateChunkWatcher", int.class, int.class, boolean.class); + } + catch (Throwable t) { + a = ReflectionHelper.findMethod(playerInstanceClass, (Object) null, + new String[]{"func_72690_a", "getOrCreateChunkWatcher"}, + new Class[]{Integer.TYPE, Integer.TYPE, Boolean.TYPE}); + } + try { + b = DevHelper.getForgeMethod(PlayerManager.class, "sendToAllPlayersWatchingChunk", Packet.class); + } + catch (Throwable t) { + b = ReflectionHelper.findMethod(playerInstanceClass, (Object) null, + new String[]{"func_151251_a", "sendToAllPlayersWatchingChunk"}, + new Class[]{Packet.class}); + } + + + getOrCreateChunkWatcher = a; + sendToAllPlayersWatchingChunk = b; + getOrCreateChunkWatcher.setAccessible(true); + sendToAllPlayersWatchingChunk.setAccessible(true); + } catch (Exception var1) { + Logger.ERROR("Reflection Failure in PacketDispatcher initalization {0} {1}" + var1); + throw new RuntimeException(var1); + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java new file mode 100644 index 0000000000..158f9f9483 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java @@ -0,0 +1,71 @@ +package gtPlusPlus.core.util.minecraft.network; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.FMLEventChannel; +import cpw.mods.fml.common.network.NetworkRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.network.CustomPacket.PacketType; +import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent; +import java.io.ByteArrayInputStream; +import java.io.DataInputStream; +import java.io.IOException; +import java.util.Arrays; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.NetHandlerPlayServer; + +public class PacketHandler { + public static final PacketHandler INSTANCE = new PacketHandler(); + private static final PacketType[] packetTypes = PacketType.values(); + final FMLEventChannel channel; + + private PacketHandler() { + this.channel = NetworkRegistry.INSTANCE.newEventDrivenChannel("GTPP"); + this.channel.register(this); + } + + public static void init() { + } + + @SubscribeEvent + public void onPacket(ServerCustomPacketEvent event) { + byte[] data = new byte[event.packet.payload().readableBytes()]; + event.packet.payload().readBytes(data); + this.onPacketData(data, ((NetHandlerPlayServer) event.handler).playerEntity); + } + + @SubscribeEvent + public void onPacket(ClientCustomPacketEvent event) { + byte[] data = new byte[event.packet.payload().readableBytes()]; + event.packet.payload().readBytes(data); + this.onPacketData(data, (EntityPlayerMP) null); + } + + public void onPacketData(byte[] bData, EntityPlayerMP player) { + DataInputStream data = new DataInputStream(new ByteArrayInputStream(bData)); + + try { + byte packetID = data.readByte(); + if (packetID < 0) { + return; + } + PacketType type = packetTypes[packetID]; + Object pkt; + + switch(type.ordinal()) { + case 0: + pkt = new PacketTileEntity(); + break; + default: + return; + } + + if (pkt != null) { + ((CustomPacket)pkt).readData(data); + } + } catch (IOException var7) { + Logger.ERROR("Exception in PacketHandler.onPacketData: {0}"+ var7 + new Object[]{Arrays.toString(bData)}); + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java new file mode 100644 index 0000000000..d59bee3c27 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java @@ -0,0 +1,79 @@ +package gtPlusPlus.core.util.minecraft.network; + +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.api.interfaces.IGregtechPacketEntity; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import mods.railcraft.common.util.misc.Game; +import net.minecraft.client.Minecraft; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class PacketTileEntity extends CustomPacket { + private IGregTechTileEntity tile; + private IGregtechPacketEntity ptile; + + public PacketTileEntity() { + } + + public PacketTileEntity(IGregTechTileEntity tile) { + this.tile = tile; + if (tile instanceof IGregtechPacketEntity) { + ptile = (IGregtechPacketEntity) tile; + } + } + + public void writeData(DataOutputStream data) throws IOException { + if (ptile != null) { + data.writeInt(this.tile.getXCoord()); + data.writeInt(this.tile.getYCoord()); + data.writeInt(this.tile.getZCoord()); + data.writeShort(this.tile.getMetaTileID()); + this.ptile.writePacketData(data); + } + } + + @SideOnly(Side.CLIENT) + public void readData(DataInputStream data) throws IOException { + Minecraft mc = FMLClientHandler.instance().getClient(); + World world = mc != null ? mc.theWorld : null; + if (world != null) { + int x = data.readInt(); + int y = data.readInt(); + int z = data.readInt(); + short id = data.readShort(); + if (id >= 0 && y >= 0 && world.blockExists(x, y, z)) { + TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof IGregTechTileEntity) { + this.tile = (IGregTechTileEntity) te; + if (this.tile.getMetaTileID() != id) { + this.tile = null; + } + } else { + this.tile = null; + } + if (this.tile != null) { + if (tile instanceof IGregtechPacketEntity) { + ptile = (IGregtechPacketEntity) tile; + try { + this.ptile.readPacketData(data); + } catch (IOException var10) { + throw var10; + } catch (RuntimeException var11) { + Game.logThrowable("Exception in PacketTileEntity.readData:", var11, new Object[0]); + } + } + } + } + } + } + + public int getID() { + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java b/src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java new file mode 100644 index 0000000000..9046a57120 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java @@ -0,0 +1,18 @@ +package gtPlusPlus.core.util.minecraft.particles; + +import net.minecraft.block.Block; +import net.minecraft.world.World; + +import gtPlusPlus.xmod.forestry.HANDLER_FR; + +public class BlockBreakParticles { + + public BlockBreakParticles(final World world, final int x, final int y, final int z, final Block block){ + try { + HANDLER_FR.createBlockBreakParticles(world, x, y, z, block); + } catch (final Throwable T){ + + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java b/src/main/java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java new file mode 100644 index 0000000000..d996cf705a --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/minecraft/particles/EntityParticleFXMysterious.java @@ -0,0 +1,17 @@ +package gtPlusPlus.core.util.minecraft.particles; + +import net.minecraft.client.particle.EntityAuraFX; +import net.minecraft.world.World; + +public class EntityParticleFXMysterious extends EntityAuraFX +{ + public EntityParticleFXMysterious(final World parWorld, + final double parX, final double parY, final double parZ, + final double parMotionX, final double parMotionY, final double parMotionZ) + { + super(parWorld, parX, parY, parZ, parMotionX, parMotionY, parMotionZ); + this.setParticleTextureIndex(82); // same as happy villager + this.particleScale = 2.0F; + this.setRBGColorF(0x88, 0x00, 0x88); + } +} diff --git a/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java b/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java new file mode 100644 index 0000000000..753124dcd7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java @@ -0,0 +1,160 @@ +package gtPlusPlus.core.util.player; + +import java.io.*; +import java.util.*; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.server.MinecraftServer; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; + +public class PlayerCache { + + private static final File cache = new File("PlayerCache.dat"); + + public static final void initCache() { + if (CORE.PlayerCache == null){ + try { + + if (cache != null){ + CORE.PlayerCache = PlayerCache.readPropertiesFileAsMap(); + Logger.INFO("Loaded PlayerCache.dat"); + } + + + } catch (final Exception e) { + Logger.INFO("Failed to initialise PlayerCache.dat"); + PlayerCache.createPropertiesFile("PLAYER_", "DATA"); + //e.printStackTrace(); + } + } + } + + public static void createPropertiesFile(final String playerName, final String playerUUIDasString) { + try { + final Properties props = new Properties(); + props.setProperty(playerName+" ", playerUUIDasString); + final OutputStream out = new FileOutputStream(cache); + props.store(out, "Player Cache."); + Logger.INFO("PlayerCache.dat created for future use."); + out.close(); + } + catch (final Exception e ) { + e.printStackTrace(); + } + } + + public static void appendParamChanges(final String playerName, final String playerUUIDasString) { + final HashMap playerInfo = new HashMap<>(); + playerInfo.put(playerName, UUID.fromString(playerUUIDasString)); + + /*try { + Utils.LOG_INFO("Attempting to load "+cache.getName()); + properties.load(new FileInputStream(cache)); + if (properties == null || properties.equals(null)){ + Utils.LOG_INFO("Please wait."); + } + else { + Utils.LOG_INFO("Loaded PlayerCache.dat"); + properties.setProperty(playerName+"_", playerUUIDasString); + FileOutputStream fr=new FileOutputStream(cache); + properties.store(fr, "Player Cache."); + fr.close(); + } + + } */ + + try + { + final FileOutputStream fos = new FileOutputStream("PlayerCache.dat"); + final ObjectOutputStream oos = new ObjectOutputStream(fos); + oos.writeObject(playerInfo); + oos.close(); + fos.close(); + Logger.INFO("Serialized Player data saved in PlayerCache.dat"); + } + + catch (final IOException e) { + Logger.INFO("No PlayerCache file found, creating one."); + createPropertiesFile(playerName, playerUUIDasString); + } + } + + /** + * Reads a "properties" file, and returns it as a Map + * (a collection of key/value pairs). + * + * Credit due to Alvin Alexander - http://alvinalexander.com/java/java-properties-file-map-example?nocache=1#comment-8215 + * Changed slightly as the filename and delimiter are constant in my case. + * + * @param filename The properties filename to read. + * @param delimiter The string (or character) that separates the key + * from the value in the properties file. + * @return The Map that contains the key/value pairs. + * @throws Exception + */ + @Deprecated + public static Map readPropertiesFileAsMapOld() throws Exception { + final String delimiter = "="; + @SuppressWarnings({ "rawtypes", "unchecked" }) + final + Map map = new HashMap<>(); + final BufferedReader reader = new BufferedReader(new FileReader(cache)); + String line; + while ((line = reader.readLine()) != null) + { + if (line.trim().length()==0) { + continue; + } + if (line.charAt(0)=='#') { + continue; + } + // assumption here is that proper lines are like "String : http://xxx.yyy.zzz/foo/bar", + // and the ":" is the delimiter + final int delimPosition = line.indexOf(delimiter); + final String key = line.substring(0, delimPosition-1).trim(); + final String value = line.substring(delimPosition+1).trim(); + map.put(key, value); + } + reader.close(); + CORE.PlayerCache = map; + return map; + } + + public static HashMap readPropertiesFileAsMap() { + HashMap map = null; + try + { + final FileInputStream fis = new FileInputStream(cache); + final ObjectInputStream ois = new ObjectInputStream(fis); + map = (HashMap) ois.readObject(); + ois.close(); + fis.close(); + }catch(final IOException ioe) + { + ioe.printStackTrace(); + return null; + }catch(final ClassNotFoundException c) + { + Logger.INFO("Class not found"); + c.printStackTrace(); + return null; + } + Logger.WARNING("Deserialized PlayerCache.."); + return map; + } + + public static String lookupPlayerByUUID(final UUID UUID){ + if (UUID == null) { + return null; + } + final List allPlayers = MinecraftServer.getServer().getConfigurationManager().playerEntityList; + for (final EntityPlayerMP player : allPlayers) { + if (player.getUniqueID().equals(UUID)) { + return player.getDisplayName(); + } + } + return "Offline Player."; + } +} diff --git a/src/main/java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java b/src/main/java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java new file mode 100644 index 0000000000..fc8e84cb61 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java @@ -0,0 +1,291 @@ +package gtPlusPlus.core.util.reflect; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.internal.IGT_RecipeAdder; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public final class AddGregtechRecipe { + + + public static boolean importPyroRecipe(GT_Recipe aRecipe) { + + int aModifiedTime = (int) (aRecipe.mDuration * 0.8); + + if (aRecipe.mInputs == null || aRecipe.mFluidInputs == null || aRecipe.mFluidOutputs == null || aRecipe.mOutputs == null) { + return false; + } + if (aRecipe.mInputs.length > 2 || aRecipe.mFluidInputs.length > 1 || aRecipe.mFluidOutputs.length > 1 || aRecipe.mOutputs.length > 9) { + return false; + } + else if (aRecipe.mInputs.length <= 0) { + return false; + } + + int aCircuitNumber = -1; + Item aCircuit = CI.getNumberedCircuit(1).getItem(); + boolean hasCircuit = false; + + for (ItemStack a : aRecipe.mInputs) { + if (a != null && a.getItem() == aCircuit) { + hasCircuit = true; + aCircuitNumber = a.getItemDamage(); + break; + } + } + + ItemStack aInputItem = null; + if (!hasCircuit || aCircuitNumber < 1) { + return false; + } + + for (ItemStack a : aRecipe.mInputs) { + if (a != null && a.getItem() != aCircuit) { + aInputItem = a; + break; + } + } + + return CORE.RA.addCokeOvenRecipe( + aCircuitNumber, + aInputItem, + aRecipe.mFluidInputs, + aRecipe.mFluidOutputs, + aRecipe.mOutputs, + aModifiedTime, + aRecipe.mEUt); + + } + + + public static boolean addCokeAndPyrolyseRecipes( + ItemStack input1, int circuitNumber, + FluidStack inputFluid1, + ItemStack output1, + FluidStack outputFluid1, + int timeInSeconds, + int euTick + ){ + //Seconds Conversion + int TIME = timeInSeconds*20; + int TIMEPYRO = TIME+(TIME/5); + CORE.RA.addCokeOvenRecipe( + input1, + ItemUtils.getGregtechCircuit(circuitNumber), + inputFluid1, + outputFluid1, + output1, + TIME, + euTick); + PyrolyseOven( + input1, + inputFluid1, + circuitNumber, + output1, + outputFluid1, + TIMEPYRO, + euTick); + + + return false; + } + + + + + public static boolean PyrolyseOven(final ItemStack p0, final FluidStack p1, final int p2, final ItemStack p3, + final FluidStack p4, final int p5, final int p6){ + + try { + IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; + if (IGT_RecipeAdder != null){ + Class classRA = IGT_RecipeAdder.getClass(); + Method addRecipe = classRA.getMethod("addPyrolyseRecipe", ItemStack.class, FluidStack.class, int.class, ItemStack.class, FluidStack.class, int.class, int.class); + if (addRecipe != null){ + return (boolean) addRecipe.invoke(IGT_RecipeAdder, p0, p1, p2, p3, p4, p5, p6); + } + } + } + catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + return false; + } + + + + public static boolean addAssemblylineRecipe( + ItemStack aResearchItem, + int aResearchTime, + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack aOutput, + int aDuration, int aEUt){ + /* + try { + IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; + if (IGT_RecipeAdder != null){ + Class classRA = IGT_RecipeAdder.getClass(); + + for(Method current : classRA.getDeclaredMethods()){ + //Utils.LOG_INFO("-----------------------------------------------"); + ////Utils.LOG_INFO("Found method: "+current.getName()); + //Utils.LOG_INFO("With Parameters: "); + //Utils.LOG_INFO("==============================================="); + for (Class P : current.getParameterTypes()){ + //Utils.LOG_INFO(""+P.getName()); + //Utils.LOG_INFO(""+P.getClass().getName()); + } + //Utils.LOG_INFO("==============================================="); + } + + try { + Method testRA = GT_Values.RA.getClass().getMethod("addAssemblylineRecipe", GT_Values.RA.getClass(), aResearchItem.getClass(), int.class, aInputs.getClass(), aFluidInputs.getClass(), aOutput.getClass(), int.class, int.class); + testRA.invoke(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); + } + catch (Throwable masndj){ + masndj.printStackTrace(); + } + + + Method addRecipe = classRA.getDeclaredMethod( + "addAssemblylineRecipe", + ItemStack.class, + int.class, + ItemStack.class, + FluidStack.class, + ItemStack.class, + int.class, + int.class); + if (addRecipe != null){ + return (boolean) addRecipe.invoke(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); + } + } + } + catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Utils.LOG_INFO("[Assembly Line] - Failed to add recipe, due to GT not being .09 branch. Research: "+aResearchItem.getDisplayName()+" | Result: "+aOutput.getDisplayName()); + e.printStackTrace(); + return false; + } + Utils.LOG_INFO("[Assembly Line] - Failed to add recipe. Research: "+aResearchItem.getDisplayName()+" | Result: "+aOutput.getDisplayName()); + */return false; + } + + public static boolean addCircuitAssemblerRecipe( + ItemStack[] aInputs, + FluidStack aFluidInput, + ItemStack aOutput, + int aDuration, + int aEUt) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + try { + IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; + if (IGT_RecipeAdder != null){ + Class classRA = IGT_RecipeAdder.getClass(); + Method addRecipe = classRA.getMethod( + "addCircuitAssemblerRecipe", + ItemStack.class, + FluidStack.class, + ItemStack.class, + int.class, + int.class); + if (addRecipe != null){ + if (aFluidInput.isFluidEqual(FluidUtils.getFluidStack("molten.tin", 1))){ + boolean[] didAdd = new boolean[3]; + FluidStack moltenMetal = FluidUtils.getFluidStack("molten.tin", 144); + //Tin + didAdd[0] = (boolean) addRecipe.invoke( + IGT_RecipeAdder, + aInputs, + moltenMetal, + aOutput, + aDuration, + aEUt); + moltenMetal = FluidUtils.getFluidStack("molten.lead", 144); + //Lead + didAdd[1] = (boolean) addRecipe.invoke( + IGT_RecipeAdder, + aInputs, + moltenMetal, + aOutput, + aDuration, + aEUt); + moltenMetal = FluidUtils.getFluidStack("molten.solderingalloy", 144/2); + //Soldering Alloy + didAdd[2] = (boolean) addRecipe.invoke( + IGT_RecipeAdder, + aInputs, + moltenMetal, + aOutput, + aDuration, + aEUt); + + if (didAdd[0] && didAdd[1] && didAdd[2]){ + return true; + } + else { + return false; + } + } + else { + return (boolean) addRecipe.invoke( + IGT_RecipeAdder, + aInputs, + aFluidInput, + aOutput, + aDuration, + aEUt); + } + } + } + } + catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + return false; + } + + + public static boolean addChemicalRecipeForBasicMachineOnly(final ItemStack p0, final ItemStack p1, final FluidStack p2, final FluidStack p3, final ItemStack p4, final ItemStack p5, final int p6, final int p7){ + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + try { + IGT_RecipeAdder IGT_RecipeAdder = GT_Values.RA; + if (IGT_RecipeAdder != null){ + Class classRA = IGT_RecipeAdder.getClass(); + //final ItemStack p0, final ItemStack p1, final FluidStack p2, final FluidStack p3, final ItemStack p4, final ItemStack p5, final int p6, final int p7 + Method addRecipe = classRA.getMethod("addChemicalRecipeForBasicMachineOnly", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class, int.class); + if (addRecipe != null){ + return (boolean) addRecipe.invoke(IGT_RecipeAdder, p0, p1, p2, p3, p4, p5, p6, p7); + } + } + } + catch (SecurityException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + + } + } + + return GT_Values.RA.addChemicalRecipe( + p0, + p1, + p2, + p3, + p4, + p6); + + } + + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/reflect/ProxyFinder.java b/src/main/java/gtPlusPlus/core/util/reflect/ProxyFinder.java new file mode 100644 index 0000000000..aaa9b2fae7 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/reflect/ProxyFinder.java @@ -0,0 +1,55 @@ +package gtPlusPlus.core.util.reflect; + +import java.lang.reflect.Field; + +import cpw.mods.fml.common.SidedProxy; + +public class ProxyFinder { + + public static Object getServerProxy(final Object modInstance) throws ReflectiveOperationException { + for(final Field field : modInstance.getClass().getDeclaredFields()) { + if(field.isAnnotationPresent(SidedProxy.class)) { + final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); + final Object fieldValue = field.get(modInstance); + try { + final Class serverSideClass = ReflectionUtils.getClass(sidedProxy.serverSide()); + if(serverSideClass.isAssignableFrom(fieldValue.getClass())) { + final Object serverProxy = serverSideClass.cast(fieldValue); + //do what you want with server proxy instance + return serverProxy; + } + + } catch (final NoClassDefFoundError err) { + //its client side + return null; + } + break; + } + } + return null; + } + + public static Object getClientProxy(final Object modInstance) throws ReflectiveOperationException { + for(final Field field : modInstance.getClass().getDeclaredFields()) { + if(field.isAnnotationPresent(SidedProxy.class)) { + final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); + final Object fieldValue = field.get(modInstance); + try { + final Class clientSideClass = ReflectionUtils.getClass(sidedProxy.clientSide()); + if(clientSideClass.isAssignableFrom(fieldValue.getClass())) { + final Object clientProxy = clientSideClass.cast(fieldValue); + //do what you want with client proxy instance + return clientProxy; + } + + } catch (final NoClassDefFoundError err) { + //its server side + return null; + } + break; + } + } + return null; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java new file mode 100644 index 0000000000..1ef925f793 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -0,0 +1,1090 @@ +package gtPlusPlus.core.util.reflect; + +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.GenericDeclaration; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.ArrayUtils; + +import com.google.common.reflect.ClassPath; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; + +public class ReflectionUtils { + + public static Map> mCachedClasses = new LinkedHashMap>(); + public static Map mCachedMethods = new LinkedHashMap(); + public static Map mCachedFields = new LinkedHashMap(); + public static Map mCachedConstructors = new LinkedHashMap(); + + private static class CachedConstructor { + + private final Constructor METHOD; + + public CachedConstructor(Constructor aCons) { + METHOD = aCons; + } + + public Constructor get() { + return METHOD; + } + + } + + private static class CachedMethod { + + private final boolean STATIC; + private final Method METHOD; + + public CachedMethod(Method aMethod, boolean isStatic) { + METHOD = aMethod; + STATIC = isStatic; + } + + public Method get() { + return METHOD; + } + + public boolean type() { + return STATIC; + } + + } + + private static class CachedField { + + private final boolean STATIC; + private final Field FIELD; + + public CachedField(Field aField, boolean isStatic) { + FIELD = aField; + STATIC = isStatic; + } + + public Field get() { + return FIELD; + } + + public boolean type() { + return STATIC; + } + + } + + private static boolean cacheClass(Class aClass) { + if (aClass == null) { + return false; + } + Class y = mCachedClasses.get(aClass.getCanonicalName()); + if (y == null) { + mCachedClasses.put(aClass.getCanonicalName(), aClass); + return true; + } + return false; + } + + private static boolean cacheMethod(Class aClass, Method aMethod) { + if (aMethod == null) { + return false; + } + boolean isStatic = Modifier.isStatic(aMethod.getModifiers()); + CachedMethod y = mCachedMethods.get(aClass.getName()+"."+aMethod.getName()+"."+ArrayUtils.toString(aMethod.getParameterTypes())); + if (y == null) { + mCachedMethods.put(aClass.getName()+"."+aMethod.getName()+"."+ArrayUtils.toString(aMethod.getParameterTypes()), new CachedMethod(aMethod, isStatic)); + return true; + } + return false; + } + + private static boolean cacheField(Class aClass, Field aField) { + if (aField == null) { + return false; + } + boolean isStatic = Modifier.isStatic(aField.getModifiers()); + CachedField y = mCachedFields.get(aClass.getName()+"."+aField.getName()); + if (y == null) { + mCachedFields.put(aClass.getName()+"."+aField.getName(), new CachedField(aField, isStatic)); + return true; + } + return false; + } + + private static boolean cacheConstructor(Class aClass, Constructor aConstructor) { + if (aConstructor == null) { + return false; + } + CachedConstructor y = mCachedConstructors.get(aClass.getName()+"."+ArrayUtils.toString(aConstructor.getParameterTypes())); + if (y == null) { + mCachedConstructors.put(aClass.getName()+"."+ArrayUtils.toString(aConstructor.getParameterTypes()), new CachedConstructor(aConstructor)); + return true; + } + return false; + } + + + /** + * Returns a cached {@link Constructor} object. + * @param aClass - Class containing the Constructor. + * @param aTypes - Varags Class Types for objects constructor. + * @return - Valid, non-final, {@link Method} object, or {@link null}. + */ + public static Constructor getConstructor(Class aClass, Class... aTypes) { + if (aClass == null || aTypes == null) { + return null; + } + + String aMethodKey = ArrayUtils.toString(aTypes); + //Logger.REFLECTION("Looking up method in cache: "+(aClass.getName()+"."+aMethodName + "." + aMethodKey)); + CachedConstructor y = mCachedConstructors.get(aClass.getName() + "." + aMethodKey); + if (y == null) { + Constructor u = getConstructor_Internal(aClass, aTypes); + if (u != null) { + Logger.REFLECTION("Caching Constructor: "+aClass.getName() + "." + aMethodKey); + cacheConstructor(aClass, u); + return u; + } else { + return null; + } + } else { + return y.get(); + } + } + + + + + /** + * Returns a cached {@link Class} object. + * @param aClassCanonicalName - The canonical name of the underlying class. + * @return - Valid, {@link Class} object, or {@link null}. + */ + public static Class getClass(String aClassCanonicalName) { + if (aClassCanonicalName == null || aClassCanonicalName.length() <= 0) { + return null; + } + Class y = mCachedClasses.get(aClassCanonicalName); + if (y == null) { + y = getClass_Internal(aClassCanonicalName); + if (y != null) { + Logger.REFLECTION("Caching Class: "+aClassCanonicalName); + cacheClass(y); + } + } + return y; + } + + + + /** + * Returns a cached {@link Method} object. Wraps {@link #getMethod(Class, String, Class...)}. + * @param aObject - Object containing the Method. + * @param aMethodName - Method's name in {@link String} form. + * @param aTypes - Class Array of Types for {@link Method}'s constructor. + * @return - Valid, non-final, {@link Method} object, or {@link null}. + */ + public static Method getMethod(Object aObject, String aMethodName, Class[] aTypes) { + return getMethod(aObject.getClass(), aMethodName, aTypes); + } + + + /** + * Returns a cached {@link Method} object. + * @param aClass - Class containing the Method. + * @param aMethodName - Method's name in {@link String} form. + * @param aTypes - Varags Class Types for {@link Method}'s constructor. + * @return - Valid, non-final, {@link Method} object, or {@link null}. + */ + public static Method getMethod(Class aClass, String aMethodName, Class... aTypes) { + if (aClass == null || aMethodName == null || aMethodName.length() <= 0) { + return null; + } + String aMethodKey = ArrayUtils.toString(aTypes); + //Logger.REFLECTION("Looking up method in cache: "+(aClass.getName()+"."+aMethodName + "." + aMethodKey)); + CachedMethod y = mCachedMethods.get(aClass.getName()+"."+aMethodName + "." + aMethodKey); + if (y == null) { + Method u = getMethod_Internal(aClass, aMethodName, aTypes); + if (u != null) { + Logger.REFLECTION("Caching Method: "+aMethodName + "." + aMethodKey); + cacheMethod(aClass, u); + return u; + } else { + return null; + } + } else { + return y.get(); + } + } + + public static boolean isStaticMethod(Class aClass, String aMethodName, Class... aTypes) { + return isStaticMethod(ReflectionUtils.getMethod(aClass, aMethodName, aTypes)); + } + + public static boolean isStaticMethod(Method aMethod) { + if (aMethod != null && Modifier.isStatic(aMethod.getModifiers())) { + return true; + } + return false; + } + + + + /** + * Returns a cached {@link Field} object. + * @param aClass - Class containing the Method. + * @param aFieldName - Field name in {@link String} form. + * @return - Valid, non-final, {@link Field} object, or {@link null}. + */ + public static Field getField(final Class aClass, final String aFieldName) { + if (aClass == null || aFieldName == null || aFieldName.length() <= 0) { + return null; + } + CachedField y = mCachedFields.get(aClass.getName()+"."+aFieldName); + if (y == null) { + Field u; + try { + u = getField_Internal(aClass, aFieldName); + if (u != null) { + Logger.REFLECTION("Caching Field '"+aFieldName+"' from "+aClass.getName()); + cacheField(aClass, u); + return u; + } + } catch (NoSuchFieldException e) { + } + return null; + + } else { + return y.get(); + } + } + + /** + * Returns a cached {@link Field} object. + * @param aInstance - {@link Object} to get the field instance from. + * @param aFieldName - Field name in {@link String} form. + * @return - Valid, non-final, {@link Field} object, or {@link null}. + */ + public static T getField(final Object aInstance, final String aFieldName) { + try { + return (T) getField(aInstance.getClass(), aFieldName).get(aInstance); + } catch (IllegalArgumentException | IllegalAccessException e) { + return null; + } + } + + + + + /* + * Utility Functions + */ + + public static boolean doesClassExist(final String classname) { + return isClassPresent(classname); + } + + + /** + * Returns the class of the objects type parameter + * @param o - Object to examine paramters on + * @return - a Class or null + */ + public static Class getTypeOfGenericObject(Object o) { + Class aTypeParam = findSuperClassParameterType(o, o.getClass(), 0); + if (aTypeParam == null) { + aTypeParam = findSubClassParameterType(o, o.getClass(), 0); + } + return aTypeParam; + } + + public static void makeFieldAccessible(final Field field) { + if (!Modifier.isPublic(field.getModifiers()) || + !Modifier.isPublic(field.getDeclaringClass().getModifiers())) + { + field.setAccessible(true); + } + } + + public static void makeMethodAccessible(final Method field) { + if (!Modifier.isPublic(field.getModifiers()) || + !Modifier.isPublic(field.getDeclaringClass().getModifiers())) + { + field.setAccessible(true); + } + } + + /** + * Get the method name for a depth in call stack.
+ * Utility function + * @param depth depth in the call stack (0 means current method, 1 means call method, ...) + * @return Method name + */ + public static String getMethodName(final int depth) { + final StackTraceElement[] ste = new Throwable().getStackTrace(); + //System. out.println(ste[ste.length-depth].getClassName()+"#"+ste[ste.length-depth].getMethodName()); + return ste[depth+1].getMethodName(); + } + + + /** + * + * @param aPackageName - The full {@link Package} name in {@link String} form. + * @return - {@link Boolean} object. True if loaded > 0 classes. + */ + public static boolean dynamicallyLoadClassesInPackage(String aPackageName) { + ClassLoader classLoader = ReflectionUtils.class.getClassLoader(); + int loaded = 0; + try { + ClassPath path = ClassPath.from(classLoader); + for (ClassPath.ClassInfo info : path.getTopLevelClassesRecursive(aPackageName)) { + Class clazz = Class.forName(info.getName(), true, classLoader); + if (clazz != null) { + loaded++; + Logger.INFO("Found "+clazz.getCanonicalName()+". ["+loaded+"]"); + } + } + } catch (ClassNotFoundException | IOException e) { + + } + + return loaded > 0; + } + + + + public static boolean setField(final Object object, final String fieldName, final Object fieldValue) { + Class clazz; + if (object instanceof Class) { + clazz = (Class) object; + } + else { + clazz = object.getClass(); + } + while (clazz != null) { + try { + final Field field = getField(clazz, fieldName); + if (field != null) { + setFieldValue_Internal(object, field, fieldValue); + return true; + } + } catch (final NoSuchFieldException e) { + Logger.REFLECTION("setField("+object.toString()+", "+fieldName+") failed."); + clazz = clazz.getSuperclass(); + } catch (final Exception e) { + Logger.REFLECTION("setField("+object.toString()+", "+fieldName+") failed."); + throw new IllegalStateException(e); + } + } + return false; + + + } + + public static boolean setField(final Object object, final Field field, final Object fieldValue) { + Class clazz; + if (object instanceof Class) { + clazz = (Class) object; + } + else { + clazz = object.getClass(); + } + while (clazz != null) { + try { + final Field field2 = getField(clazz, field.getName()); + if (field2 != null) { + setFieldValue_Internal(object, field, fieldValue); + return true; + } + } catch (final NoSuchFieldException e) { + Logger.REFLECTION("setField("+object.toString()+", "+field.getName()+") failed."); + clazz = clazz.getSuperclass(); + } catch (final Exception e) { + Logger.REFLECTION("setField("+object.toString()+", "+field.getName()+") failed."); + throw new IllegalStateException(e); + } + } + return false; + } + + + /** + * Allows to change the state of an immutable instance. Huh?!? + */ + public static void setFinalFieldValue(Class clazz, String fieldName, Object newValue) { + Field nameField = getField(clazz, fieldName); + try { + setFieldValue_Internal(clazz, nameField, newValue); + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + /** + * Allows to change the state of an immutable instance. Huh?!? + */ + public static void setFinalFieldValue(Class clazz, Field field, Object newValue) { + try { + setFieldValue_Internal(clazz, field, newValue); + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + @Deprecated + public static void setFinalStatic(Field field, Object newValue) throws Exception { + field.setAccessible(true); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); + field.set(null, newValue); + } + + + public static void setByte(Object clazz, String fieldName, byte newValue) throws Exception { + Field nameField = getField(clazz.getClass(), fieldName); + nameField.setAccessible(true); + int modifiers = nameField.getModifiers(); + Field modifierField = nameField.getClass().getDeclaredField("modifiers"); + modifiers = modifiers & ~Modifier.FINAL; + modifierField.setAccessible(true); + modifierField.setInt(nameField, modifiers); + //Utils.LOG_INFO("O-"+(byte) nameField.get(clazz) + " | "+newValue); + nameField.setByte(clazz, newValue); + //Utils.LOG_INFO("N-"+(byte) nameField.get(clazz)); + + /*final Field fieldA = getField(clazz.getClass(), fieldName); + fieldA.setAccessible(true); + fieldA.setByte(clazz, newValue);*/ + + } + + public static boolean invoke(Object objectInstance, String methodName, Class[] parameters, Object[] values){ + if (objectInstance == null || methodName == null || parameters == null || values == null){ + return false; + } + Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass()); + Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+"."); + try { + Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters); + if (mInvokingMethod != null){ + return invoke(objectInstance, mInvokingMethod, values); + } + } + catch (NoSuchMethodException | SecurityException | IllegalArgumentException e) { + Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName()); + } + + Logger.REFLECTION("Invoke failed or did something wrong."); + return false; + } + + public static boolean invoke(Object objectInstance, Method method, Object[] values){ + if (method == null || values == null || (!ReflectionUtils.isStaticMethod(method) && objectInstance == null)){ + //Logger.REFLECTION("Null value when trying to Dynamically invoke "+methodName+" on an object of type: "+objectInstance.getClass().getName()); + return false; + } + String methodName = method.getName(); + String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); + Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); + try { + Method mInvokingMethod = method; + if (mInvokingMethod != null){ + Logger.REFLECTION(methodName+" was not null."); + if ((boolean) mInvokingMethod.invoke(objectInstance, values)){ + Logger.REFLECTION("Successfully invoked "+methodName+"."); + return true; + } + else { + Logger.REFLECTION("Invocation failed for "+methodName+"."); + } + } + } + catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); + } + Logger.REFLECTION("Invoke failed or did something wrong."); + return false; + } + + public static boolean invokeVoid(Object objectInstance, Method method, Object[] values){ + if (method == null || values == null || (!ReflectionUtils.isStaticMethod(method) && objectInstance == null)){ + //Logger.REFLECTION("Null value when trying to Dynamically invoke "+methodName+" on an object of type: "+objectInstance.getClass().getName()); + return false; + } + String methodName = method.getName(); + String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); + Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); + try { + Method mInvokingMethod = method; + if (mInvokingMethod != null){ + Logger.REFLECTION(methodName+" was not null."); + mInvokingMethod.invoke(objectInstance, values); + Logger.REFLECTION("Successfully invoked "+methodName+"."); + return true; + } + } + catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); + } + Logger.REFLECTION("Invoke failed or did something wrong."); + return false; + } + + public static boolean invokeVoid(Object objectInstance, String methodName, Class[] parameters, Object[] values){ + if (objectInstance == null || methodName == null || parameters == null || values == null){ + return false; + } + Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass()); + Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+"."); + try { + Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters); + if (mInvokingMethod != null){ + Logger.REFLECTION(methodName+" was not null."); + mInvokingMethod.invoke(objectInstance, values); + Logger.REFLECTION("Successfully invoked "+methodName+"."); + return true; + } + else { + Logger.REFLECTION(methodName+" is null."); + } + } + catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName()); + } + + Logger.REFLECTION("Invoke failed or did something wrong."); + return false; + } + + + public static Object invokeNonBool(Object objectInstance, Method method, Object[] values){ + if ((!ReflectionUtils.isStaticMethod(method) && objectInstance == null) || method == null || values == null){ + return false; + } + String methodName = method.getName(); + String classname = objectInstance != null ? objectInstance.getClass().getCanonicalName() : method.getDeclaringClass().getCanonicalName(); + Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+classname+"."); + try { + return method.invoke(objectInstance, values); + } + catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+classname); + } + + Logger.REFLECTION("Invoke failed or did something wrong."); + return null; + } + + public static Object invokeNonBool(Object objectInstance, String methodName, Class[] parameters, Object[] values){ + if (objectInstance == null || methodName == null || parameters == null || values == null){ + return false; + } + Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass()); + Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+"."); + try { + Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters); + if (mInvokingMethod != null){ + Logger.REFLECTION(methodName+" was not null."); + return mInvokingMethod.invoke(objectInstance, values); + } + else { + Logger.REFLECTION(methodName+" is null."); + } + } + catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName()); + } + + Logger.REFLECTION("Invoke failed or did something wrong."); + return null; + } + + + + + + + + + + + + + + + + + + + + + + /* + * Internal Magic that probably should not get exposed. + */ + + + + + + + + + + /* + * + * Below Code block is used for determining generic types associated with type + * + */ + + + //https://xebia.com/blog/acessing-generic-types-at-runtime-in-java/ + //https://www.javacodegeeks.com/2013/12/advanced-java-generics-retreiving-generic-type-arguments.html + public static Class findSuperClassParameterType(Object instance, Class classOfInterest, int parameterIndex) { + Class subClass = instance.getClass(); + while (classOfInterest != subClass.getSuperclass()) { + // instance.getClass() is no subclass of classOfInterest or instance is a direct instance of classOfInterest + subClass = subClass.getSuperclass(); + if (subClass == null) { + return null; + } + } + ParameterizedType parameterizedType = (ParameterizedType) subClass.getGenericSuperclass(); + Class aReturn; + aReturn = (Class) parameterizedType.getActualTypeArguments()[parameterIndex]; + return aReturn; + } + + public static Class findSubClassParameterType(Object instance, Class classOfInterest, int parameterIndex) { + Map typeMap = new HashMap(); + Class instanceClass = instance.getClass(); + while (classOfInterest != instanceClass.getSuperclass()) { + extractTypeArguments(typeMap, instanceClass); + instanceClass = instanceClass.getSuperclass(); + if (instanceClass == null) { + return null; + } + } + + ParameterizedType parameterizedType = (ParameterizedType) instanceClass.getGenericSuperclass(); + Type actualType = parameterizedType.getActualTypeArguments()[parameterIndex]; + if (typeMap.containsKey(actualType)) { + actualType = typeMap.get(actualType); + } + if (actualType instanceof Class) { + return (Class) actualType; + } else if (actualType instanceof TypeVariable) { + return browseNestedTypes(instance, (TypeVariable) actualType); + } else { + return null; + } + } + + private static void extractTypeArguments(Map typeMap, Class clazz) { + Type genericSuperclass = clazz.getGenericSuperclass(); + if (!(genericSuperclass instanceof ParameterizedType)) { + return; + } + + ParameterizedType parameterizedType = (ParameterizedType) genericSuperclass; + Type[] typeParameter = ((Class) parameterizedType.getRawType()).getTypeParameters(); + Type[] actualTypeArgument = parameterizedType.getActualTypeArguments(); + for (int i = 0; i < typeParameter.length; i++) { + if(typeMap.containsKey(actualTypeArgument[i])) { + actualTypeArgument[i] = typeMap.get(actualTypeArgument[i]); + } + typeMap.put(typeParameter[i], actualTypeArgument[i]); + } + } + + private static Class browseNestedTypes(Object instance, TypeVariable actualType) { + Class instanceClass = instance.getClass(); + List> nestedOuterTypes = new LinkedList>(); + for (Class enclosingClass = instanceClass + .getEnclosingClass(); enclosingClass != null; enclosingClass = enclosingClass.getEnclosingClass()) { + try { + Field this$0 = instanceClass.getDeclaredField("this$0"); + Object outerInstance = this$0.get(instance); + Class outerClass = outerInstance.getClass(); + nestedOuterTypes.add(outerClass); + Map outerTypeMap = new HashMap(); + extractTypeArguments(outerTypeMap, outerClass); + for (Map.Entry entry : outerTypeMap.entrySet()) { + if (!(entry.getKey() instanceof TypeVariable)) { + continue; + } + TypeVariable foundType = (TypeVariable) entry.getKey(); + if (foundType.getName().equals(actualType.getName()) + && isInnerClass(foundType.getGenericDeclaration(), actualType.getGenericDeclaration())) { + if (entry.getValue() instanceof Class) { + return (Class) entry.getValue(); + } + actualType = (TypeVariable) entry.getValue(); + } + } + } catch (NoSuchFieldException | IllegalAccessException e) { + + } + + } + return null; + } + + private static boolean isInnerClass(GenericDeclaration outerDeclaration, GenericDeclaration innerDeclaration) { + if (!(outerDeclaration instanceof Class) || !(innerDeclaration instanceof Class)) { + return false; + } + Class outerClass = (Class) outerDeclaration; + Class innerClass = (Class) innerDeclaration; + while ((innerClass = innerClass.getEnclosingClass()) != null) { + if (innerClass == outerClass) { + return true; + } + } + return false; + } + + + /* + * + * End of Generics Block + * + */ + + + + private static Field getField_Internal(final Class clazz, final String fieldName) throws NoSuchFieldException { + try { + Logger.REFLECTION("Field: Internal Lookup: "+fieldName); + Field k = clazz.getDeclaredField(fieldName); + makeFieldAccessible(k); + //Logger.REFLECTION("Got Field from Class. "+fieldName+" did exist within "+clazz.getCanonicalName()+"."); + return k; + } catch (final NoSuchFieldException e) { + Logger.REFLECTION("Field: Internal Lookup Failed: "+fieldName); + final Class superClass = clazz.getSuperclass(); + if (superClass == null) { + Logger.REFLECTION("Unable to find field '"+fieldName+"'"); + //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+"."); + throw e; + } + Logger.REFLECTION("Method: Recursion Lookup: "+fieldName+" - Checking in "+superClass.getName()); + //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class."); + return getField_Internal(superClass, fieldName); + } + } + + /** + * if (isPresent("com.optionaldependency.DependencyClass")) || + * This block will never execute when the dependency is not present. There is + * therefore no more risk of code throwing NoClassDefFoundException. + */ + private static boolean isClassPresent(final String className) { + try { + Class.forName(className); + return true; + } catch (final Throwable ex) { + // Class or one of its dependencies is not present... + return false; + } + } + + @Deprecated + public static Method getMethodViaReflection(final Class lookupClass, final String methodName, + final boolean invoke) throws Exception { + final Class lookup = lookupClass.getClass(); + final Method m = lookup.getDeclaredMethod(methodName); + m.setAccessible(true);// Abracadabra + if (invoke) { + m.invoke(lookup);// now its OK + } + return m; + } + + private static Method getMethod_Internal(Class aClass, String aMethodName, Class... aTypes) { + Method m = null; + try { + Logger.REFLECTION("Method: Internal Lookup: "+aMethodName); + m = aClass.getDeclaredMethod(aMethodName, aTypes); + if (m != null) { + m.setAccessible(true); + int modifiers = m.getModifiers(); + Field modifierField = m.getClass().getDeclaredField("modifiers"); + modifiers = modifiers & ~Modifier.FINAL; + modifierField.setAccessible(true); + modifierField.setInt(m, modifiers); + } + } + catch (Throwable t) { + Logger.REFLECTION("Method: Internal Lookup Failed: "+aMethodName); + try { + m = getMethodRecursively(aClass, aMethodName); + } catch (NoSuchMethodException e) { + Logger.REFLECTION("Unable to find method '"+aMethodName+"'"); + e.printStackTrace(); + dumpClassInfo(aClass); + } + } + return m; + } + + private static Constructor getConstructor_Internal(Class aClass, Class... aTypes) { + Constructor c = null; + try { + Logger.REFLECTION("Constructor: Internal Lookup: "+aClass.getName()); + c = aClass.getDeclaredConstructor(aTypes); + if (c != null) { + c.setAccessible(true); + int modifiers = c.getModifiers(); + Field modifierField = c.getClass().getDeclaredField("modifiers"); + modifiers = modifiers & ~Modifier.FINAL; + modifierField.setAccessible(true); + modifierField.setInt(c, modifiers); + } + } + catch (Throwable t) { + Logger.REFLECTION("Constructor: Internal Lookup Failed: "+aClass.getName()); + try { + c = getConstructorRecursively(aClass, aTypes); + } catch (Exception e) { + Logger.REFLECTION("Unable to find method '"+aClass.getName()+"'"); + e.printStackTrace(); + dumpClassInfo(aClass); + } + } + return c; + } + + private static Constructor getConstructorRecursively(Class aClass, Class... aTypes) throws Exception { + try { + Logger.REFLECTION("Constructor: Recursion Lookup: "+aClass.getName()); + Constructor c = aClass.getConstructor(aTypes); + if (c != null) { + c.setAccessible(true); + int modifiers = c.getModifiers(); + Field modifierField = c.getClass().getDeclaredField("modifiers"); + modifiers = modifiers & ~Modifier.FINAL; + modifierField.setAccessible(true); + modifierField.setInt(c, modifiers); + } + return c; + } catch (final NoSuchMethodException | IllegalArgumentException | IllegalAccessException e) { + final Class superClass = aClass.getSuperclass(); + if (superClass == null || superClass == Object.class) { + throw e; + } + return getConstructor_Internal(superClass, aTypes); + } + } + + private static Method getMethodRecursively(final Class clazz, final String aMethodName) throws NoSuchMethodException { + try { + Logger.REFLECTION("Method: Recursion Lookup: "+aMethodName); + Method k = clazz.getDeclaredMethod(aMethodName); + makeMethodAccessible(k); + return k; + } catch (final NoSuchMethodException e) { + final Class superClass = clazz.getSuperclass(); + if (superClass == null || superClass == Object.class) { + throw e; + } + return getMethod_Internal(superClass, aMethodName); + } + } + + private static void dumpClassInfo(Class aClass) { + Logger.INFO("We ran into an error processing reflection in "+aClass.getName()+", dumping all data for debugging."); + // Get the methods + Method[] methods = aClass.getDeclaredMethods(); + Field[] fields = aClass.getDeclaredFields(); + Constructor[] consts = aClass.getDeclaredConstructors(); + + Logger.INFO("Dumping all Methods."); + for (Method method : methods) { + System.out.println(method.getName()+" | "+StringUtils.getDataStringFromArray(method.getParameterTypes())); + } + Logger.INFO("Dumping all Fields."); + for (Field f : fields) { + System.out.println(f.getName()); + } + Logger.INFO("Dumping all Constructors."); + for (Constructor c : consts) { + System.out.println(c.getName()+" | "+c.getParameterCount()+" | "+StringUtils.getDataStringFromArray(c.getParameterTypes())); + } + } + + private static Class getNonPublicClass(final String className) { + Class c = null; + try { + c = Class.forName(className); + } catch (final ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // full package name --------^^^^^^^^^^ + // or simpler without Class.forName: + // Class c = package1.A.class; + + if (null != c) { + // In our case we need to use + Constructor constructor = null; + try { + constructor = c.getDeclaredConstructor(); + } catch (NoSuchMethodException | SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // note: getConstructor() can return only public constructors + // so we needed to search for any Declared constructor + + // now we need to make this constructor accessible + if (null != constructor) { + constructor.setAccessible(true);// ABRACADABRA! + + try { + final Object o = constructor.newInstance(); + return (Class) o; + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + return null; + } + + private static Class getClass_Internal(String string) { + Class aClass = null; + if (ReflectionUtils.doesClassExist(string)) { + try { + aClass = Class.forName(string); + } + catch (ClassNotFoundException e) { + aClass = getNonPublicClass(string); + } + } + + if (aClass == null) { + String aClassName = ""; + Logger.REFLECTION("Splitting "+string+" to try look for hidden classes."); + String[] aData = string.split("\\."); + Logger.REFLECTION("Obtained "+aData.length+" pieces."); + for (int i=0;i<(aData.length-1);i++) { + aClassName += (i > 0) ? "."+aData[i] : ""+aData[i]; + Logger.REFLECTION("Building: "+aClassName); + } + if (aClassName != null && aClassName.length() > 0) { + Logger.REFLECTION("Trying to search '"+aClassName+"' for inner classes."); + Class clazz = ReflectionUtils.getClass(aClassName); + if (clazz != null) { + Class[] y = clazz.getDeclaredClasses(); + if (y == null || y.length <= 0) { + Logger.REFLECTION("No hidden inner classes found."); + return null; + } + else { + boolean found = false; + for (Class h : y) { + Logger.REFLECTION("Found hidden inner class: "+h.getCanonicalName()); + if (h.getSimpleName().toLowerCase().equals(aData[aData.length-1].toLowerCase())) { + Logger.REFLECTION("Found correct class. ["+aData[aData.length-1]+"] Caching at correct location: "+string); + Logger.REFLECTION("Found at location: "+h.getCanonicalName()); + ReflectionUtils.mCachedClasses.put(string, h); + aClass = h; + found = true; + break; + } + } + if (!found) { + return null; + } + } + } + else { + return null; + } + } + else { + return null; + } + } + return aClass; + } + + /** + * + * Set the value of a field reflectively. + */ + private static void setFieldValue_Internal(Object owner, Field field, Object value) throws Exception { + makeModifiable(field); + field.set(owner, value); + } + + /** + * Force the field to be modifiable and accessible. + */ + private static void makeModifiable(Field nameField) throws Exception { + nameField.setAccessible(true); + Field modifiers = getField(Field.class, "modifiers"); + modifiers.setAccessible(true); + modifiers.setInt(nameField, nameField.getModifiers() & ~Modifier.FINAL); + } + + + public static boolean doesFieldExist(String clazz, String string) { + return doesFieldExist(ReflectionUtils.getClass(clazz), string); + } + + public static boolean doesFieldExist(Class clazz, String string) { + if (clazz != null) { + if (ReflectionUtils.getField(clazz, string) != null) { + return true; + } + } + return false; + } + + public static Object getFieldValue(Field field) { + return getFieldValue(field, null); + } + + public static Object getFieldValue(Field field, Object instance) { + try { + return field.get(instance); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + return null; + } + + public static T createNewInstanceFromConstructor(Constructor aConstructor, Object[] aArgs) { + T aInstance; + try { + aInstance = (T) aConstructor.newInstance(aArgs); + if (aInstance != null) { + return aInstance; + } + } + catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + +} diff --git a/src/main/java/gtPlusPlus/core/util/sys/KeyboardUtils.java b/src/main/java/gtPlusPlus/core/util/sys/KeyboardUtils.java new file mode 100644 index 0000000000..ea87677ee2 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/sys/KeyboardUtils.java @@ -0,0 +1,39 @@ +package gtPlusPlus.core.util.sys; + +import org.lwjgl.input.Keyboard; + +import net.minecraft.client.Minecraft; + +public class KeyboardUtils { + + public static boolean isCtrlKeyDown(){ + try { + if (!Keyboard.isCreated()) { + return false; + } + // prioritize CONTROL, but allow OPTION as well on Mac (note: GuiScreen's isCtrlKeyDown only checks for the OPTION key on Mac) + boolean isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL); + if (!isCtrlKeyDown && Minecraft.isRunningOnMac) + isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LMETA) || Keyboard.isKeyDown(Keyboard.KEY_RMETA); + + return isCtrlKeyDown; + } + catch (Throwable t) { + return false; + } + } + + public static boolean isShiftKeyDown(){ + try { + if (!Keyboard.isCreated()) { + return false; + } + return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); + } + catch (Throwable t) { + return false; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/core/util/sys/Log.java b/src/main/java/gtPlusPlus/core/util/sys/Log.java new file mode 100644 index 0000000000..fcd4f34c1b --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/sys/Log.java @@ -0,0 +1,24 @@ +package gtPlusPlus.core.util.sys; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public final class Log { + public static final Logger LOGGER = LogManager.getLogger("MiscUtils"); + + public static void warn(final String msg) { + LOGGER.warn(msg); + } + + public static void error(final String msg) { + LOGGER.error(msg); + } + + public static void info(final String msg) { + LOGGER.info(msg); + } + + public static void debug(final String msg) { + LOGGER.debug(msg); + } +} diff --git a/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java b/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java new file mode 100644 index 0000000000..2788ba688e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java @@ -0,0 +1,90 @@ +package gtPlusPlus.core.util.sys; + +public class SystemUtils { + + private static OS SystemType; + + public static OS getOS(){ + if (SystemType != null){ + return SystemType; + } + else { + SystemType = getOperatingSystem(); + return SystemType; + } + } + + /** + * Try invoke the runtime's Garbage Collector. + */ + public static void invokeGC() { + try { + Runtime r = Runtime.getRuntime(); + r.gc(); + } + catch (Throwable t) { + //Do nothing. + } + } + + public static boolean isWindows() { + return (getOSString().indexOf("win") >= 0); + } + + public static boolean isMac() { + return (getOSString().indexOf("mac") >= 0); + } + + public static boolean isUnix() { + return (getOSString().indexOf("nix") >= 0 || getOSString().indexOf("nux") >= 0 || getOSString().indexOf("aix") > 0 ); + } + + public static boolean isSolaris() { + return (getOSString().indexOf("sunos") >= 0); + } + + public static String getOSString(){ + try { + return System.getProperty("os.name").toLowerCase(); + } + catch (Throwable t){ + return "other"; + } + } + + public static OS getOperatingSystem(){ + if (isMac()){ + return OS.MAC; + } + else if (isWindows()){ + return OS.WINDOWS; + } + else if (isUnix()){ + return OS.UNIX; + } + else if (isSolaris()){ + return OS.SOLARIS; + } + else { + return OS.OTHER; + } + } + + public static enum OS { + MAC(1), + WINDOWS(2), + UNIX(3), + SOLARIS(4), + OTHER(0); + + private int mID; + private OS (final int ID){ + this.mID = ID; + } + + public int getID() { + return this.mID; + } + } + +} diff --git a/src/main/java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java b/src/main/java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java new file mode 100644 index 0000000000..3778beacfb --- /dev/null +++ b/src/main/java/gtPlusPlus/core/world/damage/BaseCustomDamageSource.java @@ -0,0 +1,22 @@ +package gtPlusPlus.core.world.damage; + +import net.minecraft.entity.Entity; +import net.minecraft.util.EntityDamageSourceIndirect; + +public class BaseCustomDamageSource extends EntityDamageSourceIndirect { + + public BaseCustomDamageSource(String name, Entity transmitter, Entity indirectSource) { + super(name, transmitter, indirectSource); + this.setDifficultyScaled(); + } + + /** + * Return whether this damage source will have its damage amount scaled based on the current difficulty. + */ + public boolean isDifficultyScaled() + { + return true; + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/world/explosions/ExplosionHandler.java b/src/main/java/gtPlusPlus/core/world/explosions/ExplosionHandler.java new file mode 100644 index 0000000000..8d96aa2ff1 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/world/explosions/ExplosionHandler.java @@ -0,0 +1,31 @@ +package gtPlusPlus.core.world.explosions; + +import net.minecraft.entity.Entity; +import net.minecraft.world.World; + +public class ExplosionHandler { + + /** + * Creates an explosion. Args: entity, x, y, z, strength + */ + public MiningExplosion createExplosion(final World world, final Entity entityObj, final double x, final double y, final double z, final float size, final boolean makesFlames, final boolean makesSmoke) + { + return this.newExplosion(world, entityObj, x, y, z, size, makesFlames, makesSmoke); + } + + /** + * returns a new explosion. + */ + public MiningExplosion newExplosion(final World world, final Entity entityObj, final double x, final double y, final double z, final float size, final boolean makesFlames, final boolean makesSmoke){ + final MiningExplosion explosion = new MiningExplosion(world, entityObj, x, y, z, size); + explosion.isFlaming = makesFlames; + explosion.isSmoking = makesSmoke; + if (net.minecraftforge.event.ForgeEventFactory.onExplosionStart(world, explosion)) { + return explosion; + } + explosion.doExplosionA(); + explosion.doExplosionB(true); + return explosion; + } + +} diff --git a/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java b/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java new file mode 100644 index 0000000000..792e47085e --- /dev/null +++ b/src/main/java/gtPlusPlus/core/world/explosions/MiningExplosion.java @@ -0,0 +1,275 @@ +package gtPlusPlus.core.world.explosions; + +import java.util.*; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentProtection; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.util.*; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.Explosion; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; +import gtPlusPlus.core.util.math.MathUtils; + +public class MiningExplosion extends Explosion { + private final int field_77289_h = 16; + private final Random explosionRNG = new XSTR(); + private final World worldObj; + + private final Map field_77288_k = new HashMap<>(); + public MiningExplosion(final World worldObj, final Entity entityObj, final double x, final double y, final double z, final float size) + { + super(worldObj, entityObj, x, y, z, size); + this.worldObj = worldObj; + this.exploder = entityObj; + this.explosionSize = size; + this.explosionX = x; + this.explosionY = y; + this.explosionZ = z; + } + + /** + * Does the first part of the explosion (destroy blocks) + */ + @SuppressWarnings("unchecked") + @Override + public void doExplosionA() + { + final float f = this.explosionSize; + final HashSet hashset = new HashSet<>(); + int i; + int j; + int k; + double d5; + double d6; + double d7; + + for (i = 0; i < this.field_77289_h; ++i) + { + for (j = 0; j < this.field_77289_h; ++j) + { + for (k = 0; k < this.field_77289_h; ++k) + { + if ((i == 0) || (i == (this.field_77289_h - 1)) || (j == 0) || (j == (this.field_77289_h - 1)) || (k == 0) || (k == (this.field_77289_h - 1))) + { + double d0 = ((i / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; + double d1 = ((j / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; + double d2 = ((k / (this.field_77289_h - 1.0F)) * 2.0F) - 1.0F; + final double d3 = Math.sqrt((d0 * d0) + (d1 * d1) + (d2 * d2)); + d0 /= d3; + d1 /= d3; + d2 /= d3; + float f1 = this.explosionSize * (0.7F + (this.worldObj.rand.nextFloat() * 0.6F)); + d5 = this.explosionX; + d6 = this.explosionY; + d7 = this.explosionZ; + + for (final float f2 = 0.3F; f1 > 0.0F; f1 -= f2 * 0.75F) + { + final int j1 = MathHelper.floor_double(d5); + final int k1 = MathHelper.floor_double(d6); + final int l1 = MathHelper.floor_double(d7); + final Block block = this.worldObj.getBlock(j1, k1, l1); + + if (block.getMaterial() != Material.air) + { + final float f3 = this.exploder != null ? this.exploder.func_145772_a(this, this.worldObj, j1, k1, l1, block) : block.getExplosionResistance(this.exploder, this.worldObj, j1, k1, l1, this.explosionX, this.explosionY, this.explosionZ); + f1 -= (f3 + 0.3F) * f2; + } + + if ((f1 > 0.0F) && ((this.exploder == null) || this.exploder.func_145774_a(this, this.worldObj, j1, k1, l1, block, f1))) + { + hashset.add(new ChunkPosition(j1, k1, l1)); + } + + d5 += d0 * f2; + d6 += d1 * f2; + d7 += d2 * f2; + } + } + } + } + } + + this.affectedBlockPositions.addAll(hashset); + this.explosionSize *= 2.0F; + i = MathHelper.floor_double(this.explosionX - this.explosionSize - 1.0D); + j = MathHelper.floor_double(this.explosionX + this.explosionSize + 1.0D); + k = MathHelper.floor_double(this.explosionY - this.explosionSize - 1.0D); + final int i2 = MathHelper.floor_double(this.explosionY + this.explosionSize + 1.0D); + final int l = MathHelper.floor_double(this.explosionZ - this.explosionSize - 1.0D); + final int j2 = MathHelper.floor_double(this.explosionZ + this.explosionSize + 1.0D); + final List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); + net.minecraftforge.event.ForgeEventFactory.onExplosionDetonate(this.worldObj, this, list, this.explosionSize); + final Vec3 vec3 = Vec3.createVectorHelper(this.explosionX, this.explosionY, this.explosionZ); + + for (int i1 = 0; i1 < list.size(); ++i1) + { + final Entity entity = list.get(i1); + final double d4 = entity.getDistance(this.explosionX, this.explosionY, this.explosionZ) / this.explosionSize; + + if (d4 <= 1.0D) + { + d5 = entity.posX - this.explosionX; + d6 = (entity.posY + entity.getEyeHeight()) - this.explosionY; + d7 = entity.posZ - this.explosionZ; + final double d9 = MathHelper.sqrt_double((d5 * d5) + (d6 * d6) + (d7 * d7)); + + if (d9 != 0.0D) + { + d5 /= d9; + d6 /= d9; + d7 /= d9; + final double d10 = this.worldObj.getBlockDensity(vec3, entity.boundingBox); + final double d11 = (1.0D - d4) * d10; + entity.attackEntityFrom(DamageSource.setExplosionSource(this), ((int)(((((d11 * d11) + d11) / 2.0D) * 8.0D * this.explosionSize) + 1.0D))); + final double d8 = EnchantmentProtection.func_92092_a(entity, d11); + entity.motionX += d5 * d8; + entity.motionY += d6 * d8; + entity.motionZ += d7 * d8; + + if (entity instanceof EntityPlayer) + { + this.field_77288_k.put(entity, Vec3.createVectorHelper(d5 * d11, d6 * d11, d7 * d11)); + } + } + } + } + + this.explosionSize = f; + } + + /** + * Does the second part of the explosion (sound, particles, drop spawn) + */ + @Override + public void doExplosionB(final boolean p_77279_1_) + { + this.worldObj.playSoundEffect(this.explosionX, this.explosionY, this.explosionZ, "random.explode", 4.0F, (1.0F + ((this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F)) * 0.7F); + + if ((this.explosionSize >= 2.0F) && this.isSmoking) + { + this.worldObj.spawnParticle("hugeexplosion", this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("smoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("explode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + else + { + this.worldObj.spawnParticle("largeexplode", this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("smoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("explode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + } + + Iterator iterator; + ChunkPosition chunkposition; + int i; + int j; + int k; + Block block; + + if (this.isSmoking) + { + iterator = this.affectedBlockPositions.iterator(); + + while (iterator.hasNext()) + { + chunkposition = iterator.next(); + i = chunkposition.chunkPosX; + j = chunkposition.chunkPosY; + k = chunkposition.chunkPosZ; + block = this.worldObj.getBlock(i, j, k); + + if (p_77279_1_) + { + final double d0 = i + this.worldObj.rand.nextFloat(); + final double d1 = j + this.worldObj.rand.nextFloat(); + final double d2 = k + this.worldObj.rand.nextFloat(); + double d3 = d0 - this.explosionX; + double d4 = d1 - this.explosionY; + double d5 = d2 - this.explosionZ; + final double d6 = MathHelper.sqrt_double((d3 * d3) + (d4 * d4) + (d5 * d5)); + d3 /= d6; + d4 /= d6; + d5 /= d6; + double d7 = 0.5D / ((d6 / this.explosionSize) + 0.1D); + d7 *= (this.worldObj.rand.nextFloat() * this.worldObj.rand.nextFloat()) + 0.3F; + d3 *= d7; + d4 *= d7; + d5 *= d7; + this.worldObj.spawnParticle("explode", (d0 + (this.explosionX * 1.0D)) / 2.0D, (d1 + (this.explosionY * 1.0D)) / 2.0D, (d2 + (this.explosionZ * 1.0D)) / 2.0D, d3, d4, d5); + this.worldObj.spawnParticle("smoke", d0, d1, d2, d3, d4, d5); + this.worldObj.spawnParticle("smoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largesmoke", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("cloud", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("flame", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("explode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("largeexplode", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + this.worldObj.spawnParticle("hugeexplosion", this.explosionX+MathUtils.randDouble(0, 1), this.explosionY+MathUtils.randDouble(0, 1), this.explosionZ+MathUtils.randDouble(0, 1), 0.0D, 0.0D, 0.0D); + + } + + if (block.getMaterial() != Material.air) + { + if (block.canDropFromExplosion(this)) + { + //world, x, y, z, world.getBlockMetadata(x, y, z), dropProb, 0 + block.dropBlockAsItemWithChance(this.worldObj, i, j, k, this.worldObj.getBlockMetadata(i, j, k), 1F, 0); + } + + block.onBlockExploded(this.worldObj, i, j, k, this); + } + } + } + + if (this.isFlaming) + { + iterator = this.affectedBlockPositions.iterator(); + + while (iterator.hasNext()) + { + chunkposition = iterator.next(); + i = chunkposition.chunkPosX; + j = chunkposition.chunkPosY; + k = chunkposition.chunkPosZ; + block = this.worldObj.getBlock(i, j, k); + final Block block1 = this.worldObj.getBlock(i, j - 1, k); + + if ((block.getMaterial() == Material.air) && block1.func_149730_j() && (this.explosionRNG.nextInt(3) == 0)) + { + this.worldObj.setBlock(i, j, k, Blocks.fire); + } + } + } + } + + @Override + public Map func_77277_b() + { + return this.field_77288_k; + } + + /** + * Returns either the entity that placed the explosive block, the entity that caused the explosion or null. + */ + @Override + public EntityLivingBase getExplosivePlacedBy() + { + return this.exploder == null ? null : (this.exploder instanceof EntityPrimedMiningExplosive ? ((EntityPrimedMiningExplosive)this.exploder).getTntPlacedBy() : (this.exploder instanceof EntityLivingBase ? (EntityLivingBase)this.exploder : null)); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java b/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java new file mode 100644 index 0000000000..0709f0b1ff --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java @@ -0,0 +1,235 @@ +package gtPlusPlus.everglades; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; + +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +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.registry.GameRegistry; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.Everglades; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.ORES; +import gtPlusPlus.everglades.biome.Biome_Everglades; +import gtPlusPlus.everglades.block.DarkWorldContentLoader; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.everglades.gen.gt.WorldGen_GT_Base; +import gtPlusPlus.everglades.gen.gt.WorldGen_Ores; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.gregtech.HANDLER_GT; +import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.config.Configuration; + +@MCVersion(value = "1.7.10") +@Mod(modid = Everglades.MODID, name = Everglades.NAME, version = Everglades.VERSION, dependencies = "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") +public class GTplusplus_Everglades implements ActionListener { + + //Mod Instance + @Mod.Instance(Everglades.MODID) + public static GTplusplus_Everglades instance; + + // Dark World Handler + protected static volatile Biome_Everglades Everglades_Biome; + protected static volatile Dimension_Everglades Everglades_Dimension; + public static int globalEvergladesPortalSpawnTimer = 0; + + // Pre-Init + @Mod.EventHandler + public void preInit(final FMLPreInitializationEvent event) { + Logger.INFO("Loading " + Everglades.MODID + " V" + Everglades.VERSION); + + //Setup + setVars(event); + + setEvergladesBiome(new Biome_Everglades()); + Everglades_Dimension = new Dimension_Everglades(); + + // Load Dark World + getEvergladesBiome().instance = instance; + Everglades_Dimension.instance = instance; + getEvergladesBiome().preInit(event); + + //Load/Set Custom Ore Gen + HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); + + } + + @EventHandler + public void load(final FMLInitializationEvent e) { + Logger.INFO("Begin resource allocation for " + Everglades.MODID + " V" +Everglades.VERSION); + + //Load World and Biome + GameRegistry.registerWorldGenerator(new WorldGen_GT_Base(), Short.MAX_VALUE); + getEvergladesBiome().load(); + Everglades_Dimension.load(); + + } + + public static synchronized void GenerateOreMaterials() { + MaterialGenerator.generateOreMaterial(ORES.CROCROITE); + MaterialGenerator.generateOreMaterial(ORES.GEIKIELITE); + MaterialGenerator.generateOreMaterial(ORES.NICHROMITE); + MaterialGenerator.generateOreMaterial(ORES.TITANITE); + MaterialGenerator.generateOreMaterial(ORES.ZIMBABWEITE); + MaterialGenerator.generateOreMaterial(ORES.ZIRCONILITE); + MaterialGenerator.generateOreMaterial(ORES.GADOLINITE_CE); + MaterialGenerator.generateOreMaterial(ORES.GADOLINITE_Y); + MaterialGenerator.generateOreMaterial(ORES.LEPERSONNITE); + MaterialGenerator.generateOreMaterial(ORES.SAMARSKITE_Y); + MaterialGenerator.generateOreMaterial(ORES.SAMARSKITE_YB); + MaterialGenerator.generateOreMaterial(ORES.XENOTIME); + MaterialGenerator.generateOreMaterial(ORES.YTTRIAITE); + MaterialGenerator.generateOreMaterial(ORES.YTTRIALITE); + MaterialGenerator.generateOreMaterial(ORES.YTTROCERITE); + MaterialGenerator.generateOreMaterial(ORES.ZIRCON); + MaterialGenerator.generateOreMaterial(ORES.POLYCRASE); + MaterialGenerator.generateOreMaterial(ORES.ZIRCOPHYLLITE); + MaterialGenerator.generateOreMaterial(ORES.ZIRKELITE); + MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_LA); + MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_CE); + MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_ND); + MaterialGenerator.generateOreMaterial(ORES.AGARDITE_Y); + MaterialGenerator.generateOreMaterial(ORES.AGARDITE_CD); + MaterialGenerator.generateOreMaterial(ORES.AGARDITE_LA); + MaterialGenerator.generateOreMaterial(ORES.AGARDITE_ND); + MaterialGenerator.generateOreMaterial(ORES.HIBONITE); + MaterialGenerator.generateOreMaterial(ORES.CERITE); + MaterialGenerator.generateOreMaterial(ORES.FLUORCAPHITE); + MaterialGenerator.generateOreMaterial(ORES.FLORENCITE); + MaterialGenerator.generateOreMaterial(ORES.CRYOLITE); + + MaterialGenerator.generateOreMaterial(ORES.LAUTARITE); + MaterialGenerator.generateOreMaterial(ORES.LAFOSSAITE); + MaterialGenerator.generateOreMaterial(ORES.DEMICHELEITE_BR); + MaterialGenerator.generateOreMaterial(ORES.COMANCHEITE); + MaterialGenerator.generateOreMaterial(ORES.PERROUDITE); + MaterialGenerator.generateOreMaterial(ORES.HONEAITE); + MaterialGenerator.generateOreMaterial(ORES.ALBURNITE); + MaterialGenerator.generateOreMaterial(ORES.MIESSIITE); + MaterialGenerator.generateOreMaterial(ORES.KASHINITE); + MaterialGenerator.generateOreMaterial(ORES.IRARSITE); + MaterialGenerator.generateOreMaterial(ORES.GREENOCKITE); + MaterialGenerator.generateOreMaterial(ORES.RADIOBARITE); + MaterialGenerator.generateOreMaterial(ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT); + + //Custom Ores + if (LoadedMods.Big_Reactors) { + MaterialGenerator.generateOreMaterial(ELEMENT.getInstance().YELLORIUM, false, false, true, new short[] {255, 242, 10}); + } + + if (!CORE.GTNH) { + MaterialGenerator.generateOreMaterial( + ELEMENT.getInstance().TRINIUM, + true, + false, + false, + ELEMENT.getInstance().TRINIUM_REFINED.getRGBA()); + } + + + + /* + * OSRS Materials + */ + + MaterialGenerator.generateOreMaterial( + ELEMENT.STANDALONE.GRANITE, + true, + false, + false, + ELEMENT.STANDALONE.GRANITE.getRGBA()); + MaterialGenerator.generateOreMaterial( + ELEMENT.STANDALONE.RUNITE, + true, + false, + false, + ELEMENT.STANDALONE.RUNITE.getRGBA()); + + + + } + + protected synchronized void setVars(FMLPreInitializationEvent event){ + //Init WorldGen config. + HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); + + if (DimensionManager.isDimensionRegistered(Dimension_Everglades.DIMID)){ + Dimension_Everglades.DIMID = DimensionManager.getNextFreeDimId(); + } + + /* + * Set World Generation Values + */ + WorldGen_Ores.generateValidOreVeins(); + WorldGen_GT_Base.oreveinPercentage = 64; + WorldGen_GT_Base.oreveinAttempts = 16; + WorldGen_GT_Base.oreveinMaxPlacementAttempts = 4; + if (CORE_Preloader.DEBUG_MODE || CORE.DEVENV){ + WorldGen_GT_Base.debugWorldGen = true; + } + DarkWorldContentLoader.run(); + } + + @EventHandler + public void serverLoad(FMLServerStartingEvent event) { + getEvergladesBiome().serverLoad(event); + } + + /*@Override + public int getBurnTime(ItemStack fuel) { + if (DarkWorld_Biome.addFuel(fuel) != 0) + return DarkWorld_Biome.addFuel(fuel); + if (DarkWorld_Dimension.addFuel(fuel) != 0) + return DarkWorld_Dimension.addFuel(fuel); + return 0; + }*/ + + /*@Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + chunkX = chunkX * 16; + chunkZ = chunkZ * 16; + + if (world.provider.dimensionId == Dimension_DarkWorld.DIMID) { + DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ); + } + + //What does this even do? + if (world.provider.dimensionId == -1) { + DarkWorld_Biome.generateNether(world, random, chunkX, chunkZ); + } + if (world.provider.dimensionId == 0) { + DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ); + } + + }*/ + + @EventHandler + public static void postInit(final FMLPostInitializationEvent e) { + Logger.INFO("Finished loading Everglades plugin for GT++."); + } + + public static synchronized Biome_Everglades getEvergladesBiome() { + return Everglades_Biome; + } + + public static synchronized void setEvergladesBiome(Biome_Everglades darkWorld_Biome) { + Everglades_Biome = darkWorld_Biome; + } + + @Override + public void actionPerformed(ActionEvent arg0) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java b/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java new file mode 100644 index 0000000000..0f8acd75b4 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java @@ -0,0 +1,351 @@ +package gtPlusPlus.everglades.biome; + +import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; +import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; + +import java.util.Random; + +import net.minecraft.block.BlockFlower; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeDecorator; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.*; + +import gtPlusPlus.everglades.gen.WorldGenDeadLilly; +import gtPlusPlus.everglades.gen.WorldGenMinable_Custom; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.terraingen.DecorateBiomeEvent; +import net.minecraftforge.event.terraingen.OreGenEvent; +import net.minecraftforge.event.terraingen.TerrainGen; + +public class BiomeGenerator_Custom extends BiomeDecorator { + + public WorldGenerator fluoriteGen; + + public BiomeGenerator_Custom(){ + //Basic Blocks + this.sandGen = new WorldGenMinable_Custom(Blocks.sand, 12); + this.gravelAsSandGen = new WorldGenMinable_Custom(Blocks.gravel, 8); + this.dirtGen = new WorldGenMinable_Custom(Blocks.dirt, 32); + this.gravelGen = new WorldGenMinable_Custom(Blocks.gravel, 12); + + + //Oregen + this.coalGen = new WorldGenMinable_Custom(Blocks.coal_ore, 16); + this.ironGen = new WorldGenMinable_Custom(Blocks.iron_ore, 12); + this.goldGen = new WorldGenMinable_Custom(Blocks.gold_ore, 12); + this.redstoneGen = new WorldGenMinable_Custom(Blocks.redstone_ore, 10); + this.diamondGen = new WorldGenMinable_Custom(Blocks.diamond_ore, 12); + this.lapisGen = new WorldGenMinable_Custom(Blocks.lapis_ore, 8); + // this.fluoriteGen = new WorldGenMinable_Custom(ModBlocks.blockOreFluorite, 20); + + //Nature + this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); + this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); + this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); + this.bigMushroomGen = new WorldGenBigMushroom(); + this.reedGen = new WorldGenReed(); + this.cactusGen = new WorldGenCactus(); + this.waterlilyGen = new WorldGenDeadLilly(); + + this.flowersPerChunk = 1; + this.grassPerChunk = 5; + this.sandPerChunk = 3; + this.sandPerChunk2 = 5; + this.clayPerChunk = 7; + + this.generateLakes = true; + } + + @Override + public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_) + { + if (this.currentWorld != null) + { + throw new RuntimeException("Already decorating!!"); + } + else + { + this.currentWorld = p_150512_1_; + this.randomGenerator = p_150512_2_; + this.chunk_X = p_150512_4_; + this.chunk_Z = p_150512_5_; + this.genDecorations(p_150512_3_); + this.currentWorld = null; + this.randomGenerator = null; + } + } + + @Override + protected void genDecorations(BiomeGenBase p_150513_1_) + { + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + this.generateOres(); + int i; + int j; + int k; + + boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); + for (i = 0; doGen && i < this.sandPerChunk2; ++i) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); + for (i = 0; doGen && i < this.clayPerChunk; ++i) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); + for (i = 0; doGen && i < this.sandPerChunk; ++i) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + i = this.treesPerChunk; + + if (this.randomGenerator.nextInt(10) == 0) + { + ++i; + } + + int l; + int i1; + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); + for (j = 0; doGen && j < i; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); + worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); + + if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) + { + worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); + for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); + for (j = 0; doGen && j < this.flowersPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); + String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); + BlockFlower blockflower = BlockFlower.func_149857_e(s); + + if (blockflower.getMaterial() != Material.air) + { + this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); + this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); + for (j = 0; doGen && j < this.grassPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); + worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); + for (j = 0; doGen && j < this.deadBushPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); + for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + + for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) + { + ; + } + + this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); + for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) + { + if (this.randomGenerator.nextInt(4) == 0) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + if (this.randomGenerator.nextInt(8) == 0) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + if (doGen && this.randomGenerator.nextInt(4) == 0) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + if (doGen && this.randomGenerator.nextInt(8) == 0) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); + for (j = 0; doGen && j < this.reedsPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + for (j = 0; doGen && j < 10; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); + if (doGen && this.randomGenerator.nextInt(32) == 0) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); + for (j = 0; doGen && j < this.cactiPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); + if (doGen && this.generateLakes) + { + for (j = 0; j < 50; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + + for (j = 0; j < 20; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + } + + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + + /** + * Standard ore generation helper. Generates most ores. + */ + @Override + protected void genStandardOre1(int p_76795_1_, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_) + { + for (int l = 0; l < p_76795_1_; ++l) + { + int i1 = this.chunk_X + this.randomGenerator.nextInt(16); + int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; + int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); + p_76795_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); + } + } + + /** + * Standard ore generation helper. Generates Lapis Lazuli. + */ + @Override + protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) + { + for (int l = 0; l < p_76793_1_; ++l) + { + int i1 = this.chunk_X + this.randomGenerator.nextInt(16); + int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) + (p_76793_3_ - p_76793_4_); + int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); + p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); + } + } + + /** + * Generates ores in the current chunk + */ + @Override + protected void generateOres() + { + MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) + this.genStandardOre1(20, this.dirtGen, 0, 256); + if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) + this.genStandardOre1(10, this.gravelGen, 0, 256); + if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) + this.genStandardOre1(20, this.coalGen, 0, 128); + if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) + this.genStandardOre1(20, this.ironGen, 0, 64); + if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) + this.genStandardOre1(2, this.goldGen, 0, 32); + if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) + this.genStandardOre1(8, this.redstoneGen, 0, 16); + if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) + this.genStandardOre1(1, this.diamondGen, 0, 16); + if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) + this.genStandardOre2(1, this.lapisGen, 16, 16); + MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + + private int nextInt(int i) { + if (i <= 1) + return 0; + return this.randomGenerator.nextInt(i); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java b/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java new file mode 100644 index 0000000000..b31f6d034e --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java @@ -0,0 +1,150 @@ +package gtPlusPlus.everglades.biome; + +import java.lang.reflect.Field; +import java.util.Random; + +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.event.FMLServerStartingEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.monster.EntityPigZombie; +import net.minecraft.entity.passive.EntityBat; +import net.minecraft.entity.passive.EntitySquid; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.entity.monster.EntitySickBlaze; +import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import net.minecraftforge.common.BiomeDictionary; +import net.minecraftforge.common.BiomeManager; + +public class Biome_Everglades { + + public static BiomeGenEverglades biome = new BiomeGenEverglades(); + + public Object instance; + + public Biome_Everglades() { + } + + public void load() { + BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DEAD); + BiomeManager.addSpawnBiome(biome); + } + + public void generateNether(World world, Random random, int chunkX, int chunkZ) { + } + + public void generateSurface(World world, Random random, int chunkX, int chunkZ) { + } + + public void registerRenderers() { + } + + public int addFuel(ItemStack fuel) { + return 0; + } + + public void serverLoad(FMLServerStartingEvent event) { + } + + public void preInit(FMLPreInitializationEvent event) { + } + + static class BiomeGenEverglades extends BiomeGenBase { + @SuppressWarnings("unchecked") + public BiomeGenEverglades() { + super(CORE.EVERGLADESBIOME_ID); + //this.setBiomeID(); + this.theBiomeDecorator = new BiomeGenerator_Custom(); + this.theBiomeDecorator.treesPerChunk = 10; + //Logger.INFO("Dark World Temperature Category: "+getTempCategory()); + this.setBiomeName("Toxic Everglades"); + this.topBlock = Dimension_Everglades.blockTopLayer; + this.fillerBlock = Dimension_Everglades.blockSecondLayer; + this.enableRain = true; + this.enableSnow = false; + this.rainfall = 0.7F; + this.setHeight(new BiomeGenBase.Height(0.3F, 0.5F)); + this.heightVariation = 0.4F; + this.waterColorMultiplier = 0x17290A; + this.rootHeight = -0.25f; //Ground level + + this.spawnableMonsterList.clear(); + this.spawnableCreatureList.clear(); + this.spawnableWaterCreatureList.clear(); + this.spawnableCaveCreatureList.clear(); + + //Enemies + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySickBlaze.class, 100, 2, 6)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 75, 4, 16)); + this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityStaballoyConstruct.class, 20, 1, 2)); + + //Animals + this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 1, 1, 6)); + this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8)); + + } + + private synchronized boolean setBiomeID() { + try { + Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); + Field mClone = mInternalBiomeList; + BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); + BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; + for (int index=0;index EntityClass, int a, int b, int c){ + //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); + this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); + return true; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java b/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java new file mode 100644 index 0000000000..b69a8ea555 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java @@ -0,0 +1,31 @@ +package gtPlusPlus.everglades.biome; + +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; + +public class GenLayerBiomes extends GenLayer { + + protected BiomeGenBase[] allowedBiomes = { Biome_Everglades.biome, }; + + public GenLayerBiomes(long seed) { + super(seed); + } + + public GenLayerBiomes(long seed, GenLayer genlayer) { + super(seed); + this.parent = genlayer; + } + + @Override + public int[] getInts(int x, int z, int width, int depth) { + int[] dest = IntCache.getIntCache(width * depth); + for (int dz = 0; dz < depth; dz++) { + for (int dx = 0; dx < width; dx++) { + this.initChunkSeed(dx + x, dz + z); + dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID; + } + } + return dest; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java b/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java new file mode 100644 index 0000000000..8034921dce --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java @@ -0,0 +1,32 @@ +package gtPlusPlus.everglades.biome; + +import net.minecraft.world.WorldType; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.GenLayerVoronoiZoom; +import net.minecraft.world.gen.layer.GenLayerZoom; + +public class GenLayerEverglades extends GenLayer { + + public GenLayerEverglades(long seed) { + super(seed); + } + + public static GenLayer[] makeTheWorld(long seed, WorldType type) { + GenLayer biomes = new GenLayerBiomes(1L); + biomes = new GenLayerZoom(1000L, biomes); + biomes = new GenLayerZoom(1001L, biomes); + biomes = new GenLayerZoom(1002L, biomes); + biomes = new GenLayerZoom(1003L, biomes); + biomes = new GenLayerZoom(1004L, biomes); + biomes = new GenLayerZoom(1005L, biomes); + GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes); + biomes.initWorldGenSeed(seed); + genlayervoronoizoom.initWorldGenSeed(seed); + return new GenLayer[] { biomes, genlayervoronoizoom }; + } + + @Override + public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { + return new int[] {}; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java new file mode 100644 index 0000000000..f68c97b3c5 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java @@ -0,0 +1,25 @@ +package gtPlusPlus.everglades.block; + +import cpw.mods.fml.common.registry.LanguageRegistry; + +import net.minecraft.block.BlockGrass; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; + +public class BlockDarkWorldGround extends BlockGrass implements ITileTooltip{ + + public BlockDarkWorldGround() { + this.setCreativeTab(AddToCreativeTab.tabBOP); + this.setBlockName("blockDarkWorldGround"); + this.setHardness(1.0F); + this.setBlockTextureName("minecraft" + ":" + "grass"); + LanguageRegistry.addName(this, "Unstable Earth"); + } + + @Override + public int getTooltipID() { + return 2; + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java new file mode 100644 index 0000000000..a1fcc588b5 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java @@ -0,0 +1,74 @@ +package gtPlusPlus.everglades.block; + +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockDirt; +import net.minecraft.world.ColorizerGrass; +import net.minecraft.world.IBlockAccess; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; + +public class BlockDarkWorldPollutedDirt extends BlockDirt implements ITileTooltip{ + + public BlockDarkWorldPollutedDirt() { + this.setCreativeTab(AddToCreativeTab.tabBOP); + this.setBlockName("blockDarkWorldGround2"); + this.setHardness(0.5F); + this.setBlockTextureName("minecraft" + ":" + "dirt"); + LanguageRegistry.addName(this, "Polluted Soil"); + } + + @Override + @SideOnly(Side.CLIENT) + public int getBlockColor() + { + double d0 = 0.5D; + double d1 = 1.0D; + return ColorizerGrass.getGrassColor(d0, d1); + } + + /** + * Returns the color this block should be rendered. Used by leaves. + */ + @Override + @SideOnly(Side.CLIENT) + public int getRenderColor(int p_149741_1_) + { + return this.getBlockColor(); + } + + /** + * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called + * when first determining what to render. + */ + @Override + @SideOnly(Side.CLIENT) + public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) + { + int l = 0; + int i1 = 0; + int j1 = 0; + + for (int k1 = -1; k1 <= 1; ++k1) + { + for (int l1 = -1; l1 <= 1; ++l1) + { + int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); + l += (i2 & 16711680) >> 16; + i1 += (i2 & 65280) >> 8; + j1 += i2 & 255; + } + } + + return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; + } + + @Override + public int getTooltipID() { + return 3; + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java new file mode 100644 index 0000000000..09dea46ab1 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java @@ -0,0 +1,30 @@ +package gtPlusPlus.everglades.block; + +import cpw.mods.fml.common.registry.LanguageRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip{ + + public BlockDarkWorldPortalFrame() { + super(Material.iron); + this.setCreativeTab(AddToCreativeTab.tabBOP); + this.setBlockName("blockDarkWorldPortalFrame"); + this.setHardness(3.0F); + this.setLightLevel(0.5F); + this.setBlockTextureName(CORE.MODID + ":" + "metro/TEXTURE_TECH_PANEL_A"); + LanguageRegistry.addName(this, "Containment Frame"); + + } + + @Override + public int getTooltipID() { + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java new file mode 100644 index 0000000000..3c0445c86d --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java @@ -0,0 +1,101 @@ +package gtPlusPlus.everglades.block; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.material.MaterialLiquid; + +import net.minecraftforge.fluids.Fluid; + +public class BlockDarkWorldSludgeFluid extends Fluid { + + + public static final Material SLUDGE = new MaterialLiquid(MapColor.dirtColor); + + protected static int mapColor = 0xFFFFFFFF; + protected static float overlayAlpha = 0.2F; + //protected static SoundEvent emptySound = SoundEvents.ITEM_BUCKET_EMPTY; + //protected static SoundEvent fillSound = SoundEvents.ITEM_BUCKET_FILL; + protected static Material material = SLUDGE; + + + public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour) { + this(fluidName, rgbColour, null); + } + + public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour, Float overlayAlpha) { + super(fluidName); + setColor(rgbColour); + if (overlayAlpha != null){ + setAlpha(overlayAlpha.floatValue()); + } + else { + setAlpha(0); + } + } + + @Override + public int getColor() + { + return mapColor; + } + + public BlockDarkWorldSludgeFluid setColor(int parColor) + { + mapColor = parColor; + return this; + } + + public float getAlpha() + { + return overlayAlpha; + } + + public BlockDarkWorldSludgeFluid setAlpha(float parOverlayAlpha) + { + overlayAlpha = parOverlayAlpha; + return this; + } + + /*public blockDarkWorldSludgeFluid setEmptySound(SoundEvent parSound) + { + emptySound = parSound; + return this; + } + + public SoundEvent getEmptySound() + { + return emptySound; + } + + @Override + public blockDarkWorldSludgeFluid setFillSound(SoundEvent parSound) + { + fillSound = parSound; + return this; + } + + @Override + public SoundEvent getFillSound() + { + return fillSound; + }*/ + + public BlockDarkWorldSludgeFluid setMaterial(Material parMaterial) + { + material = parMaterial; + return this; + } + + public Material getMaterial() + { + return material; + } + + /*@Override + public boolean doesVaporize(FluidStack fluidStack) + { + if (block == null) + return false; + return block.getDefaultState().getMaterial() == getMaterial(); + }*/ +} diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java b/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java new file mode 100644 index 0000000000..e64968888d --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java @@ -0,0 +1,403 @@ +package gtPlusPlus.everglades.block; + +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockBreakable; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.everglades.world.TeleporterDimensionMod; + +public class BlockEvergladesPortal extends BlockBreakable implements ITileTooltip{ + IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null; + + public BlockEvergladesPortal() { + super("portal", Material.portal, false); + this.setTickRandomly(true); + this.setHardness(-1.0F); + this.setLightLevel(0.75F); + this.setCreativeTab(CreativeTabs.tabBlock); + this.setBlockName("blockDarkWorldPortal"); + + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(int i, int par2) { + + if (i == 0) + return gor; + + else if (i == 1) + return dol; + + else if (i == 2) + return st1; + + else if (i == 3) + return st2; + + else if (i == 4) + return st4; + + else if (i == 5) + return st3; + + else + return gor; + + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister reg) { + this.gor = reg.registerIcon("portal"); + this.dol = reg.registerIcon("portal"); + this.st1 = reg.registerIcon("portal"); + this.st2 = reg.registerIcon("portal"); + this.st3 = reg.registerIcon("portal"); + this.st4 = reg.registerIcon("portal"); + } + + /** + * Ticks the block if it's been scheduled + */ + @Override + public void updateTick(World par1World, int x, int y, int z, Random par5Random) { + super.updateTick(par1World, x, y, z, par5Random); + + int blockCount = 0; + BlockPos portal = new BlockPos(x, y, z, par1World.provider.dimensionId); + + for (BlockPos side : portal.getSurroundingBlocks()) { + Block b = side.getBlockAtPos(); + if (b == Dimension_Everglades.blockPortalFrame || b == Dimension_Everglades.portalBlock) { + blockCount++; + } + } + if (blockCount < 4) { + par1World.setBlockToAir(x, y, z); + } + + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means + * this box can change after the pool has been cleared to be reused) + */ + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { + return null; + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, + * y, z + */ + @Override + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { + float f; + float f1; + if (par1IBlockAccess.getBlock(par2 - 1, par3, par4) != this && par1IBlockAccess.getBlock(par2 + 1, par3, par4) != this) { + f = 0.125F; + f1 = 0.5F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); + } else { + f = 0.5F; + f1 = 0.125F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); + } + } + + /** + * Is this block (a) opaque and (B) a full 1m cube? This determines + * whether or not to render the shared face of two adjacent blocks and + * also whether the player can attach torches, redstone wire, etc to + * this block. + */ + @Override + public boolean isOpaqueCube() { + return false; + } + + /** + * If this block doesn't render as an ordinary block it will return + * False (examples: signs, buttons, stairs, etc) + */ + @Override + public boolean renderAsNormalBlock() { + return false; + } + + /** + * Checks to see if this location is valid to create a portal and will + * return True if it does. Args: world, x, y, z + */ + public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) { + byte b0 = 0; + byte b1 = 0; + if (par1World.getBlock(par2 - 1, par3, par4) == Dimension_Everglades.blockPortalFrame + || par1World.getBlock(par2 + 1, par3, par4) == Dimension_Everglades.blockPortalFrame) { + b0 = 1; + } + if (par1World.getBlock(par2, par3, par4 - 1) == Dimension_Everglades.blockPortalFrame + || par1World.getBlock(par2, par3, par4 + 1) == Dimension_Everglades.blockPortalFrame) { + b1 = 1; + } + if (b0 == b1) { + return false; + } else { + if (par1World.getBlock(par2 - b0, par3, par4 - b1) == Blocks.air) { + par2 -= b0; + par4 -= b1; + } + int l; + int i1; + for (l = -1; l <= 2; ++l) { + for (i1 = -1; i1 <= 3; ++i1) { + boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3; + if (l != -1 && l != 2 || i1 != -1 && i1 != 3) { + Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); + if (flag) { + if (j1 != Dimension_Everglades.blockPortalFrame) { + return false; + } + } + /* + * else if (j1 != 0 && j1 != + * Main.TutorialFire.blockID) { return false; } + */ + } + } + } + for (l = 0; l < 2; ++l) { + for (i1 = 0; i1 < 3; ++i1) { + par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, this, 0, 2); + } + } + return true; + } + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know + * which neighbor changed (coordinates passed are their own) Args: x, y, + * z, neighbor blockID + */ + public void onNeighborBlockChange(BlockPos pos) { + int x = pos.xPos, y = pos.yPos, z = pos.zPos; + Logger.INFO("Trigger"); + int blockCount = 0; + BlockPos portal = pos; + World par1World = portal.world; + for (BlockPos side : portal.getSurroundingBlocks()) { + Block b = side.getBlockAtPos(); + if (b == Dimension_Everglades.blockPortalFrame || b == Dimension_Everglades.portalBlock) { + blockCount++; + } + } + if (blockCount < 4) { + par1World.setBlockToAir(x, y, z); + par1World.scheduleBlockUpdate(x, y, z, portal.getBlockAtPos(), 0); + } + + + + byte b0 = 0; + byte b1 = 1; + if (par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this) { + b0 = 1; + b1 = 0; + } + int i1; + for (i1 = y; par1World.getBlock(x, i1 - 1, z) == this; --i1) { + ; + } + if (par1World.getBlock(x, i1 - 1, z) != Dimension_Everglades.blockPortalFrame) { + par1World.setBlockToAir(x, y, z); + } else { + int j1; + for (j1 = 1; j1 < 4 && par1World.getBlock(x, i1 + j1, z) == this; ++j1) { + ; + } + if (j1 == 3 && par1World.getBlock(x, i1 + j1, z) == Dimension_Everglades.blockPortalFrame) { + boolean flag = par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this; + boolean flag1 = par1World.getBlock(x, y, z - 1) == this || par1World.getBlock(x, y, z + 1) == this; + if (flag && flag1) { + par1World.setBlockToAir(x, y, z); + } else { + if ((par1World.getBlock(x + b0, y, z + b1) != Dimension_Everglades.blockPortalFrame || par1World + .getBlock(x - b0, y, z - b1) != this) + && (par1World.getBlock(x - b0, y, z - b1) != Dimension_Everglades.blockPortalFrame || par1World.getBlock(x + b0, y, + z + b1) != this)) { + par1World.setBlockToAir(x, y, z); + } + } + } else { + par1World.setBlockToAir(x, y, z); + } + } + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + onNeighborBlockChange(new BlockPos(x, y, z, world.provider.dimensionId)); + super.onNeighborBlockChange(world, x, y, z, block); + } + + /*@Override + public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) { + onNeighborBlockChange(new BlockPos(x, y, z, world.)); + super.onNeighborChange(world, x, y, z, tileX, tileY, tileZ); + }*/ + + @Override + @SideOnly(Side.CLIENT) + /** + * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given + * coordinates. Args: blockAccess, x, y, z, side + */ + public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { + if (par1IBlockAccess.getBlock(par2, par3, par4) == this) { + return false; + } else { + boolean flag = par1IBlockAccess.getBlock(par2 - 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 - 2, par3, par4) != this; + boolean flag1 = par1IBlockAccess.getBlock(par2 + 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 + 2, par3, par4) != this; + boolean flag2 = par1IBlockAccess.getBlock(par2, par3, par4 - 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 - 2) != this; + boolean flag3 = par1IBlockAccess.getBlock(par2, par3, par4 + 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this; + boolean flag4 = flag || flag1; + boolean flag5 = flag2 || flag3; + return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3)); + } + } + + /** + * Returns the quantity of items to drop on block destruction. + */ + @Override + public int quantityDropped(Random par1Random) { + return 0; + } + + /** + * Triggered whenever an entity collides with this block (enters into + * the block). Args: world, x, y, z, entity + */ + @Override + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { + if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { + EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity; + if (thePlayer.timeUntilPortal > 0) { + thePlayer.timeUntilPortal = 100; + } else if (thePlayer.dimension != Dimension_Everglades.DIMID) { + thePlayer.timeUntilPortal = 100; + thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, Dimension_Everglades.DIMID, + new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(Dimension_Everglades.DIMID))); + } else { + thePlayer.timeUntilPortal = 100; + thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, + new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(0))); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + /** + * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha + */ + public int getRenderBlockPass() { + return 1; + } + + @Override + @SideOnly(Side.CLIENT) + /** + * A randomly called display update to be able to add particles or other items for display + */ + public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { + if (CORE.RANDOM.nextInt(100) == 0) { + par1World.playSound(par2 + 0.5D, par3 + 0.5D, par4 + 0.5D, "portal.portal", 0.5F, + CORE.RANDOM.nextFloat() * 0.4F + 0.8F, false); + } + for (int l = 0; l < 4; ++l) { + double d0 = par2 + CORE.RANDOM.nextFloat(); + double d1 = par3 + CORE.RANDOM.nextFloat(); + double d2 = par4 + CORE.RANDOM.nextFloat(); + double d3 = 0.0D; + double d4 = 0.0D; + double d5 = 0.0D; + int i1 = CORE.RANDOM.nextInt(2) * 2 - 1; + d3 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; + d4 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; + d5 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; + if (par1World.getBlock(par2 - 1, par3, par4) != this && par1World.getBlock(par2 + 1, par3, par4) != this) { + d0 = par2 + 0.5D + 0.25D * i1; + d3 = CORE.RANDOM.nextFloat() * 2.0F * i1; + } else { + d2 = par4 + 0.5D + 0.25D * i1; + d5 = CORE.RANDOM.nextFloat() * 2.0F * i1; + } + par1World.spawnParticle("reddust", d0+0.1D, d1, d2, d3, d4, d5); + par1World.spawnParticle("smoke", d0, d1+0.1D, d2, 0, 0, 0); + + Random R = new Random(); + + if (R.nextInt(10) == 0){ + par1World.spawnParticle("largesmoke", d0, d1, d2, 0, 0+0.2D, 0); + } + else if (R.nextInt(5)==1){ + par1World.spawnParticle("flame", d0, d1, d2, 0, 0+0.1D, 0); + } + } + } + + @SideOnly(Side.CLIENT) + /** + * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) + */ + public int idPicked(World par1World, int par2, int par3, int par4) { + return 0; + } + + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + return Utils.rgbtoHexValue(0, 255, 0); + } + + @Override + public int getRenderColor(final int aMeta) { + return Utils.rgbtoHexValue(0, 255, 0); + } + + @Override + public String getLocalizedName() { + return EnumChatFormatting.OBFUSCATED+super.getLocalizedName(); + } + + @Override + public int getTooltipID() { + return 1; + } +} + + diff --git a/src/main/java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java b/src/main/java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java new file mode 100644 index 0000000000..9d0e425e3a --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java @@ -0,0 +1,71 @@ +package gtPlusPlus.everglades.block; + +import static gtPlusPlus.everglades.dimension.Dimension_Everglades.*; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.init.Blocks; + +import gtPlusPlus.core.block.base.BlockBaseFluid; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.everglades.item.ItemBlockToxicEverglades; +import gtPlusPlus.everglades.item.ItemEvergladesPortalTrigger; +import net.minecraftforge.fluids.FluidRegistry; + +public class DarkWorldContentLoader { + + //Static Vars + public static BlockDarkWorldSludgeFluid SLUDGE; + + + public synchronized static void run() { + initMisc(); + initItems(); + initBlocks(); + } + + public synchronized static boolean initMisc(){ + + //Fluids + SLUDGE = (BlockDarkWorldSludgeFluid) new BlockDarkWorldSludgeFluid( + "sludge", + Utils.rgbtoHexValue(30, 130, 30)) + .setDensity(1800) + .setGaseous(false) + .setLuminosity(2) + .setViscosity(25000) + .setTemperature(300); + FluidRegistry.registerFluid(SLUDGE); + + return true; + } + + public synchronized static boolean initItems(){ + portalItem = (ItemEvergladesPortalTrigger) (new ItemEvergladesPortalTrigger().setUnlocalizedName("everglades.trigger")); + GameRegistry.registerItem(portalItem, "everglades.trigger"); + return true; + } + + public synchronized static boolean initBlocks(){ + + //Create Block Instances + blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, BlockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("fluidSludge"); + portalBlock = new BlockEvergladesPortal(); + blockTopLayer = new BlockDarkWorldGround(); + blockSecondLayer = new BlockDarkWorldPollutedDirt(); + blockPortalFrame = new BlockDarkWorldPortalFrame(); + + //Registry + GameRegistry.registerBlock(portalBlock, ItemBlockToxicEverglades.class, "dimensionDarkWorld_portal"); + GameRegistry.registerBlock(blockTopLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround"); + GameRegistry.registerBlock(blockSecondLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround2"); + GameRegistry.registerBlock(blockPortalFrame, ItemBlockToxicEverglades.class, "blockDarkWorldPortalFrame"); + + //Make Flammable + Blocks.fire.setFireInfo(blockTopLayer, 30, 20); + + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java b/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java new file mode 100644 index 0000000000..0ff265a4ae --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java @@ -0,0 +1,510 @@ +package gtPlusPlus.everglades.chunk; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFalling; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.util.IProgressUpdate; +import net.minecraft.util.MathHelper; +import net.minecraft.world.*; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.*; +import net.minecraft.world.gen.feature.WorldGenLakes; +import net.minecraft.world.gen.structure.MapGenMineshaft; +import net.minecraft.world.gen.structure.MapGenScatteredFeature; +import net.minecraft.world.gen.structure.MapGenVillage; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.terraingen.ChunkProviderEvent; +import net.minecraftforge.event.terraingen.PopulateChunkEvent; +import net.minecraftforge.event.terraingen.TerrainGen; + +public class ChunkProviderModded implements IChunkProvider { + private Random rand; + private NoiseGeneratorOctaves field_147431_j; + private NoiseGeneratorOctaves field_147432_k; + private NoiseGeneratorOctaves field_147429_l; + private NoiseGeneratorPerlin field_147430_m; + /** + * A NoiseGeneratorOctaves used in generating terrain + */ + public NoiseGeneratorOctaves noiseGen5; + /** + * A NoiseGeneratorOctaves used in generating terrain + */ + public NoiseGeneratorOctaves noiseGen6; + public NoiseGeneratorOctaves mobSpawnerNoise; + /** + * Reference to the World object. + */ + private World worldObj; + private WorldType field_147435_p; + private final double[] field_147434_q; + private final float[] parabolicField; + private double[] stoneNoise = new double[256]; + private MapGenBase caveGenerator = new MapGenCaves(); + /** + * Holds Stronghold Generator + */ + // private MapGenStronghold strongholdGenerator = new + // MapGenStronghold(); + /** + * Holds Village Generator + */ + private MapGenVillage villageGenerator = new MapGenVillage(); + /** + * Holds Mineshaft Generator + */ + private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft(); + private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); + /** + * Holds ravine generator + */ + private MapGenBase ravineGenerator = new MapGenRavine(); + /** + * The biomes that are used to generate the chunk + */ + private BiomeGenBase[] biomesForGeneration; + double[] field_147427_d; + double[] field_147428_e; + double[] field_147425_f; + double[] field_147426_g; + int[][] field_73219_j = new int[32][32]; + { + caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); + /* + * strongholdGenerator = (MapGenStronghold) + * TerrainGen.getModdedMapGen(strongholdGenerator, + * net.minecraftforge.event.terraingen.InitMapGenEvent.EventType. + * STRONGHOLD); + */ + villageGenerator = (MapGenVillage) TerrainGen.getModdedMapGen(villageGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE); + mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT); + scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE); + ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, + net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE); + } + + public ChunkProviderModded(World par1World, long par2) { + this.worldObj = par1World; + this.field_147435_p = par1World.getWorldInfo().getTerrainType(); + this.rand = new Random(par2); + this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16); + this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16); + this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8); + this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4); + this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); + this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); + this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); + this.field_147434_q = new double[825]; + this.parabolicField = new float[25]; + + for (int j = -2; j <= 2; ++j) { + for (int k = -2; k <= 2; ++k) { + float f = 10.0F / MathHelper.sqrt_float(j * j + k * k + 0.2F); + this.parabolicField[j + 2 + (k + 2) * 5] = f; + } + } + + NoiseGenerator[] noiseGens = { field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, + noiseGen6, mobSpawnerNoise }; + noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens); + this.field_147431_j = (NoiseGeneratorOctaves) noiseGens[0]; + this.field_147432_k = (NoiseGeneratorOctaves) noiseGens[1]; + this.field_147429_l = (NoiseGeneratorOctaves) noiseGens[2]; + this.field_147430_m = (NoiseGeneratorPerlin) noiseGens[3]; + this.noiseGen5 = (NoiseGeneratorOctaves) noiseGens[4]; + this.noiseGen6 = (NoiseGeneratorOctaves) noiseGens[5]; + this.mobSpawnerNoise = (NoiseGeneratorOctaves) noiseGens[6]; + } + + public void func_147424_a(int p_147424_1_, int p_147424_2_, Block[] p_147424_3_) { + byte b0 = 63; + this.biomesForGeneration = this.worldObj.getWorldChunkManager() + .getBiomesForGeneration(this.biomesForGeneration, p_147424_1_ * 4 - 2, p_147424_2_ * 4 - 2, 10, 10); + this.func_147423_a(p_147424_1_ * 4, 0, p_147424_2_ * 4); + + for (int k = 0; k < 4; ++k) { + int l = k * 5; + int i1 = (k + 1) * 5; + + for (int j1 = 0; j1 < 4; ++j1) { + int k1 = (l + j1) * 33; + int l1 = (l + j1 + 1) * 33; + int i2 = (i1 + j1) * 33; + int j2 = (i1 + j1 + 1) * 33; + + for (int k2 = 0; k2 < 32; ++k2) { + double d0 = 0.125D; + double d1 = this.field_147434_q[k1 + k2]; + double d2 = this.field_147434_q[l1 + k2]; + double d3 = this.field_147434_q[i2 + k2]; + double d4 = this.field_147434_q[j2 + k2]; + double d5 = (this.field_147434_q[k1 + k2 + 1] - d1) * d0; + double d6 = (this.field_147434_q[l1 + k2 + 1] - d2) * d0; + double d7 = (this.field_147434_q[i2 + k2 + 1] - d3) * d0; + double d8 = (this.field_147434_q[j2 + k2 + 1] - d4) * d0; + + for (int l2 = 0; l2 < 8; ++l2) { + double d9 = 0.25D; + double d10 = d1; + double d11 = d2; + double d12 = (d3 - d1) * d9; + double d13 = (d4 - d2) * d9; + + for (int i3 = 0; i3 < 4; ++i3) { + int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2; + short short1 = 256; //TODO - wots dis do + j3 -= short1; + double d14 = 0.25D; + double d16 = (d11 - d10) * d14; + double d15 = d10 - d16; + + for (int k3 = 0; k3 < 4; ++k3) { + if ((d15 += d16) > 0.0D) { + p_147424_3_[j3 += short1] = Dimension_Everglades.blockMainFiller; + } + else if (k2 * 8 + l2 < b0) { + try { + p_147424_3_[j3 += short1] = Dimension_Everglades.blockFluidLakes; //River Fluid . + } + catch (Throwable t){ + p_147424_3_[j3 += short1] = Blocks.water; //River Fluid Fallback + } + } + else { + p_147424_3_[j3 += short1] = null; + } + } + + d10 += d12; + d11 += d13; + } + + d1 += d5; + d2 += d6; + d3 += d7; + d4 += d8; + } + } + } + } + } + + public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_) { + @SuppressWarnings("deprecation") + ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, + p_147422_2_, p_147422_3_, p_147422_5_); + MinecraftForge.EVENT_BUS.post(event); + if (event.getResult() == cpw.mods.fml.common.eventhandler.Event.Result.DENY) + return; + + double d0 = 0.03125D; + this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16, + 16, d0 * 2.0D, d0 * 2.0D, 1.0D); + + for (int k = 0; k < 16; ++k) { + for (int l = 0; l < 16; ++l) { + BiomeGenBase biomegenbase = p_147422_5_[l + k * 16]; + biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_, + p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]); + } + } + } + + /** + * loads or generates the chunk at the chunk location specified + */ + @Override + public Chunk loadChunk(int par1, int par2) { + return this.provideChunk(par1, par2); + } + + /** + * Will return back a chunk, if it doesn't exist and its not a MP client + * it will generates all the blocks for the specified chunk from the map + * seed and chunk seed + */ + @Override + public Chunk provideChunk(int par1, int par2) { + this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L); + Block[] ablock = new Block[65536]; + byte[] abyte = new byte[65536]; + this.func_147424_a(par1, par2, ablock); + this.biomesForGeneration = this.worldObj.getWorldChunkManager() + .loadBlockGeneratorData(this.biomesForGeneration, par1 * 16, par2 * 16, 16, 16); + this.replaceBlocksForBiome(par1, par2, ablock, abyte, this.biomesForGeneration); + + Chunk chunk = new Chunk(this.worldObj, ablock, abyte, par1, par2); + byte[] abyte1 = chunk.getBiomeArray(); + + for (int k = 0; k < abyte1.length; ++k) { + abyte1[k] = (byte) this.biomesForGeneration[k].biomeID; + } + + chunk.generateSkylightMap(); + return chunk; + } + + private void func_147423_a(int p_147423_1_, int p_147423_2_, int p_147423_3_) { + this.field_147426_g = this.noiseGen6.generateNoiseOctaves(this.field_147426_g, p_147423_1_, p_147423_3_, 5, + 5, 200.0D, 200.0D, 0.5D); + this.field_147427_d = this.field_147429_l.generateNoiseOctaves(this.field_147427_d, p_147423_1_, + p_147423_2_, p_147423_3_, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D); + this.field_147428_e = this.field_147431_j.generateNoiseOctaves(this.field_147428_e, p_147423_1_, + p_147423_2_, p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); + this.field_147425_f = this.field_147432_k.generateNoiseOctaves(this.field_147425_f, p_147423_1_, + p_147423_2_, p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D); + int l = 0; + int i1 = 0; + for (int j1 = 0; j1 < 5; ++j1) { + for (int k1 = 0; k1 < 5; ++k1) { + float f = 0.0F; + float f1 = 0.0F; + float f2 = 0.0F; + byte b0 = 2; + BiomeGenBase biomegenbase = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; + + for (int l1 = -b0; l1 <= b0; ++l1) { + for (int i2 = -b0; i2 <= b0; ++i2) { + BiomeGenBase biomegenbase1 = this.biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10]; + float f3 = biomegenbase1.rootHeight; + float f4 = biomegenbase1.heightVariation; + + if (this.field_147435_p == WorldType.AMPLIFIED && f3 > 0.0F) { + f3 = 1.0F + f3 * 2.0F; + f4 = 1.0F + f4 * 4.0F; + } + + float f5 = this.parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F); + + if (biomegenbase1.rootHeight > biomegenbase.rootHeight) { + f5 /= 2.0F; + } + + f += f4 * f5; + f1 += f3 * f5; + f2 += f5; + } + } + + f /= f2; + f1 /= f2; + f = f * 0.9F + 0.1F; + f1 = (f1 * 4.0F - 1.0F) / 8.0F; + double d13 = this.field_147426_g[i1] / 8000.0D; + + if (d13 < 0.0D) { + d13 = -d13 * 0.3D; + } + + d13 = d13 * 3.0D - 2.0D; + + if (d13 < 0.0D) { + d13 /= 2.0D; + + if (d13 < -1.0D) { + d13 = -1.0D; + } + + d13 /= 1.4D; + d13 /= 2.0D; + } + else { + if (d13 > 1.0D) { + d13 = 1.0D; + } + + d13 /= 8.0D; + } + + ++i1; + double d12 = f1; + double d14 = f; + d12 += d13 * 0.2D; + d12 = d12 * 8.5D / 8.0D; + double d5 = 8.5D + d12 * 4.0D; + + for (int j2 = 0; j2 < 33; ++j2) { + double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; + + if (d6 < 0.0D) { + d6 *= 4.0D; + } + + double d7 = this.field_147428_e[l] / 512.0D; + double d8 = this.field_147425_f[l] / 512.0D; + double d9 = (this.field_147427_d[l] / 10.0D + 1.0D) / 2.0D; + double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6; + + if (j2 > 29) { + double d11 = (j2 - 29) / 3.0F; + d10 = d10 * (1.0D - d11) + -10.0D * d11; + } + + this.field_147434_q[l] = d10; + ++l; + } + } + } + } + + /** + * Checks to see if a chunk exists at x, y + */ + @Override + public boolean chunkExists(int par1, int par2) { + return true; + } + + /** + * Populates chunk with ores etc etc + */ + @Override + public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { + BlockFalling.fallInstantly = false; + int k = par2 * 16; + int l = par3 * 16; + BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); + this.rand.setSeed(this.worldObj.getSeed()); + long i1 = this.rand.nextLong() / 2L * 2L + 1L; + long j1 = this.rand.nextLong() / 2L * 2L + 1L; + this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed()); + boolean flag = false; + + MinecraftForge.EVENT_BUS + .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); + + int k1; + int l1; + int i2; + + if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag + && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, + flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE)) { + k1 = k + this.rand.nextInt(16) + 8; + l1 = this.rand.nextInt(256); + i2 = l + this.rand.nextInt(16) + 8; + try { + (new WorldGenLakes(Dimension_Everglades.blockFluidLakes)).generate(this.worldObj, this.rand, k1, l1, i2); + } catch (NullPointerException n){ + n.getStackTrace(); + (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); + Logger.INFO("Error while generating DarkWorld Lake."); + } + } + + if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, + net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA) && !flag + && this.rand.nextInt(8) == 0) { + k1 = k + this.rand.nextInt(16) + 8; + l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); + i2 = l + this.rand.nextInt(16) + 8; + + if (l1 < 63 || this.rand.nextInt(10) == 0) { //Changes 63 -> 128 + try{ + (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); + } catch (NullPointerException n){ + Logger.INFO("Error while generating DarkWorld Lake. [2]"); + } + } + } + biomegenbase.decorate(this.worldObj, this.rand, k, l); + SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); + k += 8; + l += 8; + + MinecraftForge.EVENT_BUS + .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); + + BlockFalling.fallInstantly = false; + } + + /** + * Two modes of operation: if passed true, save all Chunks in one go. If + * passed false, save up to two chunks. Return true if all chunks have + * been saved. + */ + @Override + public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate) { + return true; + } + + /** + * Save extra data not associated with any Chunk. Not saved during + * autosave, only during world unload. Currently unimplemented. + */ + @Override + public void saveExtraData() { + } + + /** + * Unloads chunks that are marked to be unloaded. This is not guaranteed + * to unload every such chunk. + */ + @Override + public boolean unloadQueuedChunks() { + return false; + } + + /** + * Returns if the IChunkProvider supports saving. + */ + @Override + public boolean canSave() { + return true; + } + + /** + * Converts the instance data to a readable string. + */ + @Override + public String makeString() { + return "RandomLevelSource"; + } + + /** + * Returns a list of creatures of the specified type that can spawn at + * the given location. + */ + @SuppressWarnings("rawtypes") + @Override + public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { + BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4); + return par1EnumCreatureType == EnumCreatureType.monster + && this.scatteredFeatureGenerator.func_143030_a(par2, par3, par4) + ? this.scatteredFeatureGenerator.getScatteredFeatureSpawnList() + : biomegenbase.getSpawnableList(par1EnumCreatureType); + } + + @Override + public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, int p_147416_5_) { + return + "Village".equals(p_147416_2_) && + this.villageGenerator != null ? + this.villageGenerator.func_151545_a(p_147416_1_, + p_147416_3_, p_147416_4_, p_147416_5_) : + null; + } + + @Override + public int getLoadedChunkCount() { + return 0; + } + + @Override + public void recreateStructures(int par1, int par2) { + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java b/src/main/java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java new file mode 100644 index 0000000000..33b36a9ae0 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java @@ -0,0 +1,30 @@ +package gtPlusPlus.everglades.dimension; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.everglades.block.BlockEvergladesPortal; +import gtPlusPlus.everglades.item.ItemEvergladesPortalTrigger; +import gtPlusPlus.everglades.world.WorldProviderMod; +import net.minecraftforge.common.DimensionManager; + +public class Dimension_Everglades { + + public Object instance; + public static int DIMID = CORE.EVERGLADES_ID; + public static BlockEvergladesPortal portalBlock; + public static ItemEvergladesPortalTrigger portalItem; + public static Block blockTopLayer; + public static Block blockSecondLayer; + public static Block blockMainFiller = Blocks.stone; + public static Block blockSecondaryFiller; + public static Block blockFluidLakes; + public static Block blockPortalFrame; + + public void load() { + DimensionManager.registerProviderType(DIMID, WorldProviderMod.class, false); + DimensionManager.registerDimension(DIMID, DIMID); + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java b/src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java new file mode 100644 index 0000000000..0314f71eec --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java @@ -0,0 +1,28 @@ +package gtPlusPlus.everglades.gen; + +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenWaterlily; + +public class WorldGenDeadLilly extends WorldGenWaterlily { + + @Override + public boolean generate(World world, Random rand, int x, int y, int z) + { + for (int l = 0; l < 10; ++l) + { + int i1 = x + rand.nextInt(8) - rand.nextInt(8); + int j1 = y + rand.nextInt(4) - rand.nextInt(4); + int k1 = z + rand.nextInt(8) - rand.nextInt(8); + + if (world.isAirBlock(i1, j1, k1) && Blocks.waterlily.canPlaceBlockAt(world, i1, j1, k1)) + { + world.setBlock(i1, j1, k1, Blocks.waterlily, 0, 2); + } + } + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java b/src/main/java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java new file mode 100644 index 0000000000..303f7353f0 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java @@ -0,0 +1,90 @@ +package gtPlusPlus.everglades.gen; + +import static gtPlusPlus.core.lib.CORE.PI; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import gtPlusPlus.api.objects.Logger; + +public class WorldGenMinable_Custom extends WorldGenMinable +{ + /** The block to generate. */ + private Block oreToGenerate; + /** The number of blocks to generate. */ + private int numberOfBlocks; + /** The block to replace. */ + private Block blockToReplace; + /** The meta of the block. */ + private int mineableBlockMeta; + + public WorldGenMinable_Custom(final Block block, final int count){ + super(block, count, Blocks.stone); + } + + public WorldGenMinable_Custom(final Block block, final int count, final Block target){ + super(block, count, target); + this.oreToGenerate = block; + this.numberOfBlocks = count; + this.blockToReplace = target; + } + + public WorldGenMinable_Custom(final Block block, final int meta, final int number, final Block target){ + this(block, number, target); + this.mineableBlockMeta = meta; + } + + @Override + public boolean generate(final World world, final Random rand, final int x, final int y, final int z) + { + final float f = rand.nextFloat() * PI; + final double d0 = x + 16 + ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F); + final double d1 = (x + 16) - ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F); + final double d2 = z + 16 + ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F); + final double d3 = (z + 16) - ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F); + final double d4 = (y + rand.nextInt(8)) - 1; + final double d5 = (y + rand.nextInt(8)) - 1; + + for (int l = 0; l <= this.numberOfBlocks; ++l) + { + final double d6 = d0 + (((d1 - d0) * l) / this.numberOfBlocks); + final double d7 = d4 + (((d5 - d4) * l) / this.numberOfBlocks); + final double d8 = d2 + (((d3 - d2) * l) / this.numberOfBlocks); + final double d9 = (rand.nextDouble() * this.numberOfBlocks) / 8.0D; + final double d10 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D; + final double d11 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D; + final int i1 = MathHelper.floor_double(d6 - (d10 / 2.0D)); + final int j1 = MathHelper.floor_double(d7 - (d11 / 2.0D)); + final int k1 = MathHelper.floor_double(d8 - (d10 / 2.0D)); + final int l1 = MathHelper.floor_double(d6 + (d10 / 2.0D)); + final int i2 = MathHelper.floor_double(d7 + (d11 / 2.0D)); + final int j2 = MathHelper.floor_double(d8 + (d10 / 2.0D)); + + for (int k2 = i1; k2 <= l1; ++k2){ + final double d12 = ((k2 + 0.5D) - d6) / (d10 / 2.0D); + if ((d12 * d12) < 1.0D){ + for (int l2 = j1; l2 <= i2; ++l2){ + final double d13 = ((l2 + 0.5D) - d7) / (d11 / 2.0D); + if (((d12 * d12) + (d13 * d13)) < 1.0D){ + for (int i3 = k1; i3 <= j2; ++i3){ + final double d14 = ((i3 + 0.5D) - d8) / (d10 / 2.0D); + if ((((d12 * d12) + (d13 * d13) + (d14 * d14)) < 1.0D) && world.getBlock(k2, l2, i3).isReplaceableOreGen(world, k2, l2, i3, this.blockToReplace)) + { + world.setBlock(k2, l2, i3, this.oreToGenerate, this.mineableBlockMeta, 3); + Logger.INFO("Generated a "+this.oreToGenerate.getLocalizedName()+" at x: "+k2+" | y: "+l2+" | z: "+i3); + } + } + } + } + } + } + } + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java new file mode 100644 index 0000000000..2035cfe096 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java @@ -0,0 +1,49 @@ +package gtPlusPlus.everglades.gen.gt; + +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import gtPlusPlus.xmod.gregtech.HANDLER_GT; + +public abstract class WorldGen_GT { + public final String mWorldGenName; + public final boolean mEnabled; + private final Map mDimensionMap = new ConcurrentHashMap(); + + public WorldGen_GT(String aName, List aList, boolean aDefault) { + this.mWorldGenName = aName; + this.mEnabled = HANDLER_GT.sCustomWorldgenFile.get("worldgen", this.mWorldGenName, aDefault); + if (this.mEnabled) { + aList.add(this); + } + + } + + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, + int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + return false; + } + + public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, + int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + return false; + } + + public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { + String aDimName = aWorld.provider.getDimensionName(); + Boolean tAllowed = (Boolean) this.mDimensionMap.get(aDimName); + if (tAllowed == null) { + boolean tValue = HANDLER_GT.sCustomWorldgenFile.get("worldgen.dimensions." + this.mWorldGenName, aDimName, + aDimensionType == aAllowedDimensionType); + this.mDimensionMap.put(aDimName, Boolean.valueOf(tValue)); + return tValue; + } else { + return tAllowed.booleanValue(); + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java new file mode 100644 index 0000000000..f1d62cf58e --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java @@ -0,0 +1,471 @@ +package gtPlusPlus.everglades.gen.gt; + +import java.util.*; + +import cpw.mods.fml.common.IWorldGenerator; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; + +import gregtech.api.util.GT_Log; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.xmod.gregtech.HANDLER_GT; + +public class WorldGen_GT_Base implements IWorldGenerator { + + /** + * Class Variables + */ + + /** + * Control percentage of filled 3x3 chunks. Lower number means less oreveins + * spawn + */ + public static int oreveinPercentage; + /** + * Control number of attempts to find a valid orevein. Generally this + * maximum limit isn't hit, selecting a vein is cheap + */ + public static int oreveinAttempts; + /** + * Control number of attempts to place a valid orevein. If a vein wasn't + * placed due to height restrictions, completely in the water, etc, another + * attempt is tried. + */ + public static int oreveinMaxPlacementAttempts; + /** + * Debug parameter for world generation. Tracks chunks added/removed from + * run queue. + */ + public static boolean debugWorldGen = false; + /** + * Try re-implement Richard Hendrick's Chunk by Chunk Ore Generation from + * his GT5u fork. + */ + + public static List mList = new ArrayList(); + public static HashSet ProcChunks = new HashSet(); + // This is probably not going to work. Trying to create a fake orevein to + // put into hashtable when there will be no ores in a vein. + public static WorldGen_GT_Ore_Layer noOresInVein = new WorldGen_GT_Ore_Layer("vein0", 0, 255, 0, 0, + 0, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON); + + public static Hashtable validOreveins = new Hashtable( + 1024); + + public boolean mIsGenerating = false; + public static final Object listLock = new Object(); + // private static boolean gcAsteroids = true; + + public WorldGen_GT_Base() { + if (debugWorldGen) { + GT_Log.out.println("GTPP_Worldgenerator created"); + } + } + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, + IChunkProvider chunkProvider) { + if (world.provider.dimensionId == Dimension_Everglades.DIMID) { + generateSafely(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); + } + } + + public synchronized void generateSafely(Random random, int chunkX, int chunkZ, World world, + IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { + int xDim = Dimension_Everglades.DIMID; + switch (world.provider.dimensionId) { + case -1: // Nether + // generateNether(world, random, chunkX * 16, chunkZ * 16); + break; + case 0: // Overworld + // generateSurface(world, random, chunkX * 16, chunkZ * 16); + break; + case 1: // End + // generateEnd(world, random, chunkX * 16, chunkZ * 16); + break; + default: // Any other dimension + if (world.provider.dimensionId != xDim) { + break; + } + else { + generateEverglades(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); + break; + } + } + } + + private synchronized void generateEverglades(Random aRandom, int aX, int aZ, World aWorld, + IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + Logger.WORLD("Trying to Generate Dimension."); + synchronized (listLock) { + Logger.WORLD("Locked List addition."); + if (WorldGen_GT_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) + 1), aX, aZ, + Dimension_Everglades.DIMID, + aWorld, aChunkGenerator, aChunkProvider, + aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName))){ + Logger.WORLD("Locked List addition. Success."); + } + else { + Logger.WORLD("Locked List addition. Fail."); + } + if (debugWorldGen) + GT_Log.out.println("ADD WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId + + " chunk x:" + aX + " z:" + aZ + " SIZE: " + WorldGen_GT_Base.mList.size()); + } + + if (!this.mIsGenerating) { + Logger.WORLD("Is not generating."); + this.mIsGenerating = true; + Logger.WORLD("Setting Generation to true."); + int mList_sS = WorldGen_GT_Base.mList.size(); + mList_sS = Math.min(mList_sS, 3); // Run a maximum of 3 chunks at a + // time through worldgen. Extra + // chunks get done later. + for (int i = 0; i < mList_sS; i++) { + WorldGenContainer toRun = (WorldGenContainer) WorldGen_GT_Base.mList.get(0); + if (debugWorldGen) + GT_Log.out.println("RUN WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId + + " chunk x:" + toRun.mX + " z:" + toRun.mZ + " SIZE: " + WorldGen_GT_Base.mList.size() + + " i: " + i); + synchronized (listLock) { + Logger.WORLD("Locked List Removal."); + WorldGen_GT_Base.mList.remove(0); + } + toRun.run(); + } + this.mIsGenerating = false; + Logger.WORLD("Is Generating now set to false.."); + } + } + + public void generateOre(Block block, World world, Random random, int chunk_x, int chunk_z, int maxX, int maxZ, + int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block generateIn) { + int heightRange = maxY - minY; + WorldGenMinable worldgenminable = new WorldGenMinable(block, maxVeinSize, generateIn); + for (int k1 = 0; k1 < chancesToSpawn; ++k1) { + int xrand = random.nextInt(16); + int yrand = random.nextInt(heightRange) + minY; + int zrand = random.nextInt(16); + worldgenminable.generate(world, random, chunk_x + xrand, yrand, chunk_z + zrand); + } + } + + public static class WorldGenContainer implements Runnable { + public final Random mRandom; + public final int mX; + public final int mZ; + public final int mDimensionType; + public final World mWorld; + public final IChunkProvider mChunkGenerator; + public final IChunkProvider mChunkProvider; + public final String mBiome; + + // Local class to track which orevein seeds must be checked when doing + // chunkified worldgen + class NearbySeeds { + public int mX; + public int mZ; + + NearbySeeds(int x, int z) { + this.mX = x; + this.mZ = z; + } + }; + + public static ArrayList seedList = new ArrayList(); + + // aX and aZ are now the by-chunk X and Z for the chunk of interest + public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, + IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { + this.mRandom = aRandom; + this.mX = aX; + this.mZ = aZ; + this.mDimensionType = aDimensionType; + this.mWorld = aWorld; + this.mChunkGenerator = aChunkGenerator; + this.mChunkProvider = aChunkProvider; + this.mBiome = aBiome; + } + + public void worldGenFindVein(int oreseedX, int oreseedZ) { + // Explanation of oreveinseed implementation. + // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen + // passes, one with getSeed set to +1 the original world seed. This + // pushes that +1 off the low bits of oreseedZ, so that the hashes + // are far apart for the two passes. + // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the + // dimension in the top bits of the hash, to make sure to get unique + // hashes per dimension + // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in + // the bits 29-55. Cuts off the top few bits of the chunk so we have + // bits for dimension. + // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the + // bits 0-27. Cuts off the top few bits of the chunk so we have bits + // for dimension. + long oreveinSeed = (this.mWorld.getSeed() << 16) ^ ((this.mWorld.provider.dimensionId & 0xffL) << 56 + | ((oreseedX & 0x000000000fffffffL) << 28) | (oreseedZ & 0x000000000fffffffL)); // Use + // an + // RNG + // that + // is + // identical + // every + // time + // it + // is + // called + // for + // this + // oreseed. + XSTR oreveinRNG = new XSTR(oreveinSeed); + int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the + // dice, see + // if we get + // an + // orevein + // here at + // all + int noOrePlacedCount = 0; + String tDimensionName = ""; + if (debugWorldGen) { + tDimensionName = this.mWorld.provider.getDimensionName(); + } + + if (debugWorldGen){ + GT_Log.out.println(" Finding oreveins for oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + + this.mZ + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " worldSeed=" + + this.mWorld.getSeed()); + } + + Logger.INFO("[World Generation Debug] !validOreveins.containsKey(oreveinSeed) | oreveinSeed: "+oreveinSeed); + // Search for a valid orevein for this dimension + if (!validOreveins.containsKey(oreveinSeed)) { + + + Logger.INFO("[World Generation Debug] oreveinPercentageRoll < oreveinPercentage? "+((oreveinPercentageRoll < oreveinPercentage))); + Logger.INFO("[World Generation Debug] WorldGen_GT_Ore_Layer.sWeight > 0? "+(WorldGen_GT_Ore_Layer.sWeight > 0)); + Logger.INFO("[World Generation Debug] WorldGen_GT_Ore_Layer.sList.size() > 0? "+(WorldGen_GT_Ore_Layer.sList.size() > 0)); + if ((oreveinPercentageRoll < oreveinPercentage) && (WorldGen_GT_Ore_Layer.sWeight > 0) + && (WorldGen_GT_Ore_Layer.sList.size() > 0)) { + int placementAttempts = 0; + boolean oreveinFound = false; + int i; + for (i = 0; (i < oreveinAttempts) && (!oreveinFound) + && (placementAttempts < oreveinMaxPlacementAttempts); i++) { + Logger.INFO("[World Generation Debug] i: "+i); + Logger.INFO("[World Generation Debug] placementAttempts: "+placementAttempts); + Logger.INFO("[World Generation Debug] oreveinAttempts: "+oreveinAttempts); + Logger.INFO("[World Generation Debug] (placementAttempts < oreveinMaxPlacementAttempts): "+(placementAttempts < oreveinMaxPlacementAttempts)); + Logger.INFO("[World Generation Debug] oreveinFound: "+oreveinFound); + int tRandomWeight = oreveinRNG.nextInt(WorldGen_GT_Ore_Layer.sWeight); + for (WorldGen_GT_Ore_Layer tWorldGen : WorldGen_GT_Ore_Layer.sList) { + Logger.INFO("[World Generation Debug] Iterating sList - Size: "+WorldGen_GT_Ore_Layer.sList.size()); + tRandomWeight -= (tWorldGen).mWeight; + if (tRandomWeight <= 0) { + try { + // Adjust the seed so that this layer has a + // series of unique random numbers. + // Otherwise multiple attempts at this same + // oreseed will get the same offset and X/Z + // values. If an orevein failed, any orevein + // with the + // same minimum heights would fail as well. + // This prevents that, giving each orevein a + // unique height each pass through here. + int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, + new XSTR(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))), this.mBiome, + this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, + oreseedZ * 16, this.mChunkGenerator, this.mChunkProvider); + switch (placementResult) { + case WorldGen_GT_Ore_Layer.ORE_PLACED: + if (debugWorldGen) + GT_Log.out.println(" Added oreveinSeed=" + oreveinSeed + + " tries at oremix=" + i + " placementAttempts=" + + placementAttempts + " dimensionName=" + tDimensionName); + validOreveins.put(oreveinSeed, tWorldGen); + oreveinFound = true; + Logger.INFO("[World Generation Debug] ORE_PLACED"); + break; + case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: + placementAttempts++; + Logger.INFO("[World Generation Debug] NO_ORE_IN_BOTTOM_LAYER | Attempts: "+placementAttempts); + // SHould do retry in this case + // until out of chances + break; + case WorldGen_GT_Ore_Layer.NO_OVERLAP: + // Orevein didn't reach this chunk, + // can't add it yet to the hash + Logger.INFO("[World Generation Debug] NO_OVERLAP"); + if (debugWorldGen) GT_Log.out.println( + " Added far oreveinSeed=" + oreveinSeed + " " + + ( tWorldGen).mWorldGenName + + " tries at oremix=" + i + + " placementAttempts=" + placementAttempts + + " dimensionName=" + tDimensionName + ); + validOreveins.put(oreveinSeed, tWorldGen); + oreveinFound = true; + break; + case WorldGen_GT_Ore_Layer.NO_OVERLAP_AIR_BLOCK: + if (debugWorldGen) GT_Log.out.println( + " No overlap and air block in test spot=" + oreveinSeed + " " + + ( tWorldGen).mWorldGenName + + " tries at oremix=" + i + + " placementAttempts=" + placementAttempts + + " dimensionName=" + tDimensionName + ); + // SHould do retry in this case until out of chances + Logger.INFO("[World Generation Debug] NO_OVERLAP_AIR_BLOCK"); + placementAttempts++; + break; + } + break; // Try the next orevein + } + catch (Throwable e) { + if (debugWorldGen) + GT_Log.out.println("Exception occurred on oreVein" + tWorldGen + " oreveinSeed=" + + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + " oreseedX=" + + oreseedX + " oreseedZ=" + oreseedZ); + e.printStackTrace(GT_Log.err); + } + } + } + } + // Only add an empty orevein if are unable to place a vein + // at the oreseed chunk. + if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) { + if (debugWorldGen) + GT_Log.out.println(" Empty oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " tries at oremix=" + i + + " placementAttempts=" + placementAttempts + " dimensionName=" + tDimensionName); + validOreveins.put(oreveinSeed, noOresInVein); + } + } + else if (oreveinPercentageRoll >= oreveinPercentage) { + if (debugWorldGen) + GT_Log.out.println(" Skipped oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " RNG=" + oreveinPercentageRoll + + " %=" + oreveinPercentage + " dimensionName=" + tDimensionName); + validOreveins.put(oreveinSeed, noOresInVein); + } + } + else { + // oreseed is located in the previously processed table + if (debugWorldGen) + GT_Log.out.print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" + + validOreveins.size() + " "); + WorldGen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed); + oreveinRNG.setSeed(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))); // Reset + // RNG + // to + // only + // be + // based + // on + // oreseed + // X/Z + // and + // type + // of + // vein + int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, + this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, oreseedZ * 16, + this.mChunkGenerator, this.mChunkProvider); + switch (placementResult) { + case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER: + if (debugWorldGen) + GT_Log.out.println(" No ore in bottom layer"); + break; + case WorldGen_GT_Ore_Layer.NO_OVERLAP: + if (debugWorldGen) + GT_Log.out.println(" No overlap"); + break; + } + } + } + + @Override + public void run() { + long startTime = System.nanoTime(); + int oreveinMaxSize; + + // Determine bounding box on how far out to check for oreveins + // affecting this chunk + // For now, manually reducing oreveinMaxSize when not in the + // Underdark for performance + if (this.mWorld.provider.getDimensionName().equals("Underdark")) { + oreveinMaxSize = 24; // Leave Deep Dark/Underdark max oregen at + // 32, instead of 64 + } + else { + oreveinMaxSize = 48; + } + + int wXbox = this.mX - (oreveinMaxSize / 16); + int eXbox = this.mX + (oreveinMaxSize / 16 + 1); // Need to add 1 + // since it is + // compared + // using a < + int nZbox = this.mZ - (oreveinMaxSize / 16); + int sZbox = this.mZ + (oreveinMaxSize / 16 + 1); + + // Search for orevein seeds and add to the list; + for (int x = wXbox; x < eXbox; x++) { + for (int z = nZbox; z < sZbox; z++) { + // Determine if this X/Z is an orevein seed + if (((Math.abs(x) % 3) == 1) && ((Math.abs(z) % 3) == 1)) { + if (debugWorldGen) + GT_Log.out.println("Adding seed x=" + x + " z=" + z); + seedList.add(new NearbySeeds(x, z)); + } + } + } + + // Now process each oreseed vs this requested chunk + for (; seedList.size() != 0; seedList.remove(0)) { + if (debugWorldGen) + GT_Log.out.println("Processing seed x=" + seedList.get(0).mX + " z=" + seedList.get(0).mZ); + worldGenFindVein(seedList.get(0).mX, seedList.get(0).mZ); + } + + long oregenTime = System.nanoTime(); + + // Do leftover worldgen for this chunk (GT_Stones and GT_small_ores) + try { + for (WorldGen_GT tWorldGen : HANDLER_GT.sWorldgenListEverglades) { + /* + * if (debugWorldGen) GT_Log.out.println( + * "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); + */ + tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX * 16, + this.mZ * 16, this.mChunkGenerator, this.mChunkProvider); + } + } + catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } + + long leftOverTime = System.nanoTime(); + + Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ); + if (tChunk != null) { + tChunk.isModified = true; + } + long endTime = System.nanoTime(); + long duration = (endTime - startTime); + if (debugWorldGen) { + GT_Log.out.println(" Oregen took " + (oregenTime - startTime) + " Leftover gen took " + + (leftOverTime - oregenTime) + " Worldgen took " + duration + " nanoseconds"); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java new file mode 100644 index 0000000000..140098ee06 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java @@ -0,0 +1,514 @@ +package gtPlusPlus.everglades.gen.gt; + +import static gtPlusPlus.everglades.gen.gt.WorldGen_GT_Base.debugWorldGen; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.*; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Log; +import gregtech.common.blocks.GT_Block_Ores; +import gregtech.common.blocks.GT_TileEntity_Ores; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.xmod.gregtech.HANDLER_GT; + +public class WorldGen_GT_Ore_Layer +extends WorldGen_GT { + public static ArrayList sList = new ArrayList(); + public static int sWeight = 0; + public final short mMinY; + public final short mMaxY; + public final short mWeight; + public final short mDensity; + public final short mSize; + public Block mPrimaryMeta; + public Block mSecondaryMeta; + public Block mBetweenMeta; + public Block mSporadicMeta; + public final Material mPrimary; + public final Material mSecondary; + public final Material mBetween; + public final Material mSporadic; + + public static boolean mUpdated = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; + public static final Block mStoneTypes; + + //public final String mBiome; + public final String mRestrictBiome; + public final boolean mOverworld; + public final boolean mNether; + public final boolean mEnd; + public static final int WRONG_BIOME=0; + public static final int WRONG_DIMENSION=1; + public static final int NO_ORE_IN_BOTTOM_LAYER=2; + public static final int NO_OVERLAP=3; + public static final int ORE_PLACED=4; + public static final int NO_OVERLAP_AIR_BLOCK=5; + + //public final boolean mMoon; + //public final boolean mMars; + //public final boolean mAsteroid; + public final String aTextWorldgen = "worldgen."; + + static { + if (mUpdated) { + Object tempBlock = null; + try { + Field temp = ReflectionUtils.getField(GregTech_API.class, "sBlockStones"); + tempBlock = temp.get(null); + } + catch (IllegalArgumentException | IllegalAccessException e) {} + mStoneTypes = (Block) tempBlock; + } + else { + mStoneTypes = null; + } + } + + + public WorldGen_GT_Ore_Layer(String aName, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { + this(aName, true, aMinY, aMaxY, aWeight, aDensity, aSize, false, false, false, false, false, false, aPrimary, aSecondary, aBetween, aSporadic); + } + + + public WorldGen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) { + super(aName, sList, aDefault); + Logger.WORLD("Creating Ore Layer Object"); + this.mOverworld = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); + this.mNether = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); + this.mEnd = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); + //this.mMoon = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); + //this.mMars = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); + //this.mAsteroid = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); + this.mMinY = 5; + short mMaxY = 14; + if (mMaxY < (this.mMinY + 7)) { + GT_Log.out.println( + "Oremix " + this.mWorldGenName + + " has invalid Min/Max heights!" + ); + mMaxY = (short) (this.mMinY + 7); + } + this.mMaxY = mMaxY; + this.mWeight = ((short) HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); + this.mDensity = ((short) HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); + this.mSize = ((short) Math.max(1, HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); + this.mPrimary = aPrimary; + this.mSecondary = aSecondary; + this.mBetween = aBetween; + this.mSporadic = aSporadic; + this.mPrimaryMeta = aPrimary.getOreBlock(1); + this.mSecondaryMeta = aSecondary.getOreBlock(1); + this.mBetweenMeta = aBetween.getOreBlock(1); + this.mSporadicMeta = aSporadic.getOreBlock(1); + this.mRestrictBiome = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); + + //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); + //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); + //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist"); + //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist"); + + if (this.mEnabled) { + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd); + sWeight += this.mWeight; + } + } + + public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + + //Debug Handler + /** + * This handles Variables that are null during Init + */ + + if (this.mPrimaryMeta == Blocks.stone || this.mSecondaryMeta == Blocks.stone + || this.mBetweenMeta == Blocks.stone || this.mSporadicMeta == Blocks.stone){ + this.mPrimaryMeta = this.mPrimary.getOreBlock(1); + this.mSecondaryMeta = this.mSecondary.getOreBlock(1); + this.mBetweenMeta = this.mBetween.getOreBlock(1); + this.mSporadicMeta = this.mSporadic.getOreBlock(1); + Logger.WORLD("[Vein Generator] An Ore in a Vein had defaulted back to a default value, so they have now been reset to correct values."); + } + + if( mWorldGenName.equals("vein0") ) { + if (debugWorldGen) GT_Log.out.println( + " NoOresInVein-vein0" + ); + // This is a special empty orevein + Logger.WORLD("[World Generation Debug] Special Empty Vein placed."); + return ORE_PLACED; + } + if (aDimensionType != Dimension_Everglades.DIMID) { + /* // Debug code, but spams log + if (debugWorldGen) { + GT_Log.out.println( + "Wrong dimension" + ); + } + */ + Logger.WORLD("[World Generation Debug] Wrong dimension."); + return WRONG_DIMENSION; + } + if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { + return WRONG_BIOME; + } + int[] placeCount=new int[4]; + + int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5); + // Determine West/East ends of orevein + int wXVein = aSeedX - aRandom.nextInt(mSize); // West side + int eXVein = aSeedX + 16 + aRandom.nextInt(mSize); + // Limit Orevein to only blocks present in current chunk + int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade. + int eX = Math.min( eXVein, aChunkX + 2 + 16); + if (wX >= eX) { //No overlap between orevein and this chunk exists in X + Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); + if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_Everglades.blockSecondLayer) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_Everglades.blockMainFiller) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_Everglades.blockSecondaryFiller) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || + (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { + // Didn't reach, but could have placed. Save orevein for future use. + return NO_OVERLAP; + } else { + // Didn't reach, but couldn't place in test spot anywys, try for another orevein + return NO_OVERLAP_AIR_BLOCK; + } + } + // Determine North/Sound ends of orevein + int nZVein = aSeedZ - aRandom.nextInt(mSize); + int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize); + + int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade. + int sZ = Math.min(sZVein, aChunkZ + 2 + 16); + if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z + Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8); + if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) || + tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) || + (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) { + // Didn't reach, but could have placed. Save orevein for future use. + return NO_OVERLAP; + } else { + // Didn't reach, but couldn't place in test spot anywys, try for another orevein + return NO_OVERLAP_AIR_BLOCK; + } + + } + + if (debugWorldGen) { + String tDimensionName = aWorld.provider.getDimensionName(); + GT_Log.out.print( + "Trying Orevein:" + this.mWorldGenName + + " Dimension=" + tDimensionName + + " mX="+aChunkX/16+ + " mZ="+aChunkZ/16+ + " oreseedX="+ aSeedX/16 + + " oreseedZ="+ aSeedZ/16 + + " cY="+tMinY + ); + } + // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt(). + int localDensity = (Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))))); + + // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop + // Now we do bottom-level-first oregen, and work our way upwards. + int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure. + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { + placeCount[1]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + /*if ((placeCount[1]+placeCount[3])==0) { + if (debugWorldGen) GT_Log.out.println( + " No ore in bottom layer" + ); + return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer + }*/ + Logger.WORLD("[World Generation Debug] Trying to set Ores?"); + for (level = tMinY; level < (tMinY-1+3); level++) { + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) { + placeCount[1]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + } + // Low Middle layer is between + sporadic + // level should be = tMinY-1+3 from end of for loop + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { + placeCount[2]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + // High Middle layer is between + primary + sporadic + level++; // Increment level to next layer + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) { + placeCount[2]++; + } + } + else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { + placeCount[0]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + // Top two layers are primary + sporadic + level++; // Increment level to next layer + for( ; level < (tMinY + 6); level++){ // should do two layers + for (int tX = wX; tX < eX; tX++) { + int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity); + for (int tZ = nZ; tZ < sZ; tZ++) { + int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity); + if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) { + if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) { + placeCount[0]++; + } + } + else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate + if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false)) + placeCount[3]++; + } + } + } + } + if (debugWorldGen) { + String tDimensionName = aWorld.provider.getDimensionName(); + GT_Log.out.println( + "Generated Orevein:" + this.mWorldGenName + + " Dimension=" + tDimensionName + + " mX="+aChunkX/16+ + " mZ="+aChunkZ/16+ + " oreseedX="+ aSeedX/16 + + " oreseedZ="+ aSeedZ/16 + + " cY="+tMinY+ + " wXVein" + wXVein + + " eXVein" + eXVein + + " nZVein" + nZVein + + " sZVein" + sZVein + + " locDen=" + localDensity + + " Den=" + this.mDensity + + " Sec="+placeCount[1]+ + " Spo="+placeCount[3]+ + " Bet="+placeCount[2]+ + " Pri="+placeCount[0] + ); + } + // Something (at least the bottom layer must have 1 block) must have been placed, return true + return ORE_PLACED; + } + + private String fString = "unset", ore1String = "unset", ore2String = "unset", ore3String = "unset", ore4String = "unset"; + Map gtOreMap = new HashMap(); + + @SuppressWarnings("deprecation") + public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData, boolean isSmallOre, + boolean air) { + if (!air) { + aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); + } + + //Set GT ORE + if (aMetaData instanceof GT_Block_Ores){ + if (ore1String.equals("unset")) { + ore1String = Utils.sanitizeString(this.mPrimary.getLocalizedName().toLowerCase()); + } + if (ore2String.equals("unset")) { + ore2String = Utils.sanitizeString(this.mSecondaryMeta.getLocalizedName().toLowerCase()); + } + if (ore3String.equals("unset")) { + ore3String = Utils.sanitizeString(this.mBetweenMeta.getLocalizedName().toLowerCase()); + } + if (ore4String.equals("unset")) { + ore4String = Utils.sanitizeString(this.mSporadicMeta.getLocalizedName().toLowerCase()); + } + + if (this.mPrimaryMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore1String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + if (this.mSecondaryMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore2String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + if (this.mBetweenMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore3String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + if (this.mSporadicMeta == aMetaData){ + for (Materials f : Materials.values()){ + if (!gtOreMap.containsKey(f)) { + gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase())); + } + fString = gtOreMap.get(f); + if (fString.contains(ore4String)){ + int r = f.mMetaItemSubID; + if (setOreBlock(aWorld, aX, aY, aZ, r, false)){ + Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + } + } + + } + + Block tBlock = aWorld.getBlock(aX, aY, aZ); + Block tOreBlock = aMetaData; + int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ); + String BlockName = tBlock.getUnlocalizedName(); + if ( + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sand) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) || + (mUpdated && tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, mStoneTypes)) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondLayer) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockMainFiller) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_Everglades.blockSecondaryFiller) || + tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sandstone)) { + + if (aWorld.setBlock(aX, aY, aZ, tOreBlock, 0, 3)){ + Logger.WORLD("[World Generation Debug] Set "+tOreBlock.getLocalizedName()+" at X: "+aX+" | Y: "+aY+" | Z: "+aZ); + return true; + } + } + return false; + } + + + private boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int mMetaItemSubID, boolean useless){ + + //Get Class and Methods + Method setOres = null; + boolean is08 = !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK; + + //GT 5.08 + if (is08){ + try { + setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class); + } + catch (NoSuchMethodException | SecurityException e) { + + } + } + //GT 5.09 + else { + try { + setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class); + } + catch (NoSuchMethodException | SecurityException e) { + + } + } + + try { + if (is08 && setOres != null){ + setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID); + } + else if (!is08 && setOres != null){ + setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID, useless); + } + else { + return false; + }} + catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java new file mode 100644 index 0000000000..0715f86e01 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java @@ -0,0 +1,97 @@ +package gtPlusPlus.everglades.gen.gt; + +import java.util.Hashtable; + +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.ORES; +import gtPlusPlus.core.material.nuclear.FLUORIDES; + +public class WorldGen_Ores { + + public static WorldGen_GT_Ore_Layer BaseVein = new WorldGen_GT_Ore_Layer("veinA", 20, 40, 1, 1, 128, + ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, + ELEMENT.getInstance().IRON); + + /** + * Custom ore Veins + */ + + public static WorldGen_GT_Ore_Layer Vein1 = new WorldGen_GT_Ore_Layer("vein1", 0, 60, 30, 2, 16, ORES.AGARDITE_CD, + ORES.AGARDITE_LA, ORES.DEMICHELEITE_BR, ORES.IRARSITE); + + public static WorldGen_GT_Ore_Layer Vein2 = new WorldGen_GT_Ore_Layer("vein2", 0, 60, 30, 2, 16, ORES.AGARDITE_ND, + ORES.AGARDITE_Y, ORES.KASHINITE, ORES.CERITE); + + public static WorldGen_GT_Ore_Layer Vein3 = new WorldGen_GT_Ore_Layer("vein3", 0, 60, 30, 3, 32, ORES.CERITE, + ORES.NICHROMITE, ORES.XENOTIME, ORES.HIBONITE); + + public static WorldGen_GT_Ore_Layer Vein4 = new WorldGen_GT_Ore_Layer("vein4", 0, 60, 40, 3, 32, ORES.GEIKIELITE, + ORES.CRYOLITE, ORES.GADOLINITE_CE, ORES.AGARDITE_ND); + + public static WorldGen_GT_Ore_Layer Vein5 = new WorldGen_GT_Ore_Layer("vein5", 30, 128, 20, 2, 48, ORES.HIBONITE, + ORES.YTTRIALITE, ORES.ZIRCONILITE, ORES.CERITE); + public static WorldGen_GT_Ore_Layer Vein6 = new WorldGen_GT_Ore_Layer("vein6", 0, 40, 20, 2, 48, ORES.XENOTIME, + ORES.ZIRKELITE, ORES.CROCROITE, ORES.IRARSITE); + public static WorldGen_GT_Ore_Layer Vein7 = new WorldGen_GT_Ore_Layer("vein7", 40, 128, 20, 2, 48, ORES.HONEAITE, + ORES.MIESSIITE, ORES.SAMARSKITE_Y, ORES.SAMARSKITE_YB); + public static WorldGen_GT_Ore_Layer Vein8 = new WorldGen_GT_Ore_Layer("vein8", 0, 40, 20, 2, 48, ORES.TITANITE, + ORES.ZIMBABWEITE, ORES.ZIRCON, ORES.FLORENCITE); + + public static WorldGen_GT_Ore_Layer Vein9 = new WorldGen_GT_Ore_Layer("vein9", 10, 30, 20, 1, 48, + ORES.LANTHANITE_CE, FLUORIDES.FLUORITE, ORES.LAFOSSAITE, ORES.FLORENCITE); + public static WorldGen_GT_Ore_Layer Vein10 = new WorldGen_GT_Ore_Layer("vein10", 20, 50, 20, 2, 32, ORES.GEIKIELITE, + ORES.YTTROCERITE, ORES.LANTHANITE_LA, ORES.RADIOBARITE); + public static WorldGen_GT_Ore_Layer Vein11 = new WorldGen_GT_Ore_Layer("vein11", 30, 70, 20, 1, 48, + FLUORIDES.FLUORITE, ORES.KASHINITE, ORES.ZIRCON, ORES.CRYOLITE); + public static WorldGen_GT_Ore_Layer Vein12 = new WorldGen_GT_Ore_Layer("vein12", 40, 80, 20, 3, 32, ORES.CERITE, + ORES.ALBURNITE, ORES.MIESSIITE, ORES.HIBONITE); + + /** + * Best Rarest Veins 2017 + */ + + public static WorldGen_GT_Ore_Layer Vein13 = new WorldGen_GT_Ore_Layer("vein13", 5, 15, 5, 1, 16, ORES.CRYOLITE, + ORES.RADIOBARITE, ORES.HONEAITE, ORES.FLORENCITE); + + public static WorldGen_GT_Ore_Layer Vein14 = new WorldGen_GT_Ore_Layer("vein14", 10, 20, 8, 2, 16, + ORES.DEMICHELEITE_BR, ORES.PERROUDITE, ORES.IRARSITE, ORES.RADIOBARITE); + + public static WorldGen_GT_Ore_Layer Vein15 = new WorldGen_GT_Ore_Layer("vein15", 5, 25, 5, 3, 24, ORES.FLUORCAPHITE, + ORES.LAFOSSAITE, ORES.GADOLINITE_CE, ORES.GADOLINITE_Y); + + public static WorldGen_GT_Ore_Layer Vein16 = new WorldGen_GT_Ore_Layer("vein16", 0, 25, 4, 2, 32, ORES.YTTROCERITE, + ORES.LEPERSONNITE, ORES.LAUTARITE, FLUORIDES.FLUORITE); + + public static WorldGen_GT_Ore_Layer Vein17 = new WorldGen_GT_Ore_Layer("vein17", 10, 35, 4, 1, 32, ORES.FLORENCITE, + ORES.LAUTARITE, ORES.SAMARSKITE_YB, ORES.POLYCRASE); + public static WorldGen_GT_Ore_Layer Vein18 = new WorldGen_GT_Ore_Layer("vein18", 15, 40, 4, 1, 48, + ORES.GADOLINITE_CE, ORES.GADOLINITE_Y, ORES.AGARDITE_LA, ORES.AGARDITE_CD); + + public static Hashtable validOreveins = new Hashtable( + 1024); + + static long ID = 0; + + public static void generateValidOreVeins() { + validOreveins.put(ID++, BaseVein); + validOreveins.put(ID++, Vein1); + validOreveins.put(ID++, Vein2); + validOreveins.put(ID++, Vein3); + validOreveins.put(ID++, Vein4); + validOreveins.put(ID++, Vein5); + validOreveins.put(ID++, Vein6); + validOreveins.put(ID++, Vein7); + validOreveins.put(ID++, Vein8); + validOreveins.put(ID++, Vein9); + validOreveins.put(ID++, Vein10); + validOreveins.put(ID++, Vein11); + validOreveins.put(ID++, Vein12); + validOreveins.put(ID++, Vein13); + validOreveins.put(ID++, Vein14); + validOreveins.put(ID++, Vein15); + validOreveins.put(ID++, Vein16); + validOreveins.put(ID++, Vein17); + validOreveins.put(ID++, Vein18); + } + +} diff --git a/src/main/java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java b/src/main/java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java new file mode 100644 index 0000000000..ce4182c598 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java @@ -0,0 +1,42 @@ +package gtPlusPlus.everglades.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.interfaces.ITileTooltip; + +public class ItemBlockToxicEverglades extends ItemBlock { + + protected final int mID; + + public ItemBlockToxicEverglades(final Block block) { + super(block); + this.mID = ((ITileTooltip) block).getTooltipID(); + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.mID == 0){ //blockDarkWorldPortalFrame + list.add("Use this to access the Toxic Everglades."); + list.add("Assembled in the same shape as the Nether Portal."); + } + else if (this.mID == 1){ //blockDarkWorldPortal + list.add("Place this if you are lazy to create the portal structure, slacker."); + } + else if (this.mID == 2){ //blockDarkWorldGround + list.add("Will burn very quickly if it happens to catch fire."); + } + else if (this.mID == 3){ //blockDarkWorldPollutedDirt + list.add("Maybe you can do something with this?."); + if (stack.getItemDamage() > 0) { + list.add("This smells worse than a bean fart..."); + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java b/src/main/java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java new file mode 100644 index 0000000000..3119de19b9 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java @@ -0,0 +1,101 @@ +package gtPlusPlus.everglades.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; + +public class ItemEvergladesPortalTrigger extends Item { + public ItemEvergladesPortalTrigger() { + super(); + this.maxStackSize = 1; + setMaxDamage(64); + setCreativeTab(CreativeTabs.tabTools); + this.setTextureName(CORE.MODID + ":" + "itemAlkalusDisk"); + } + + @Override + public Item setMaxStackSize(int int1) { + return super.setMaxStackSize(1); + } + + @Override + public EnumRarity getRarity(ItemStack thisItem) { + return EnumRarity.epic; + } + + @Override + public boolean hasEffect(ItemStack par1ItemStack, int pass) { + return true; + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + return EnumChatFormatting.GOLD+"Alkalus Disk ["+EnumChatFormatting.RED+"Activated"+EnumChatFormatting.GOLD+"]"; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + list.add(EnumChatFormatting.GREEN+"Shines the way, towards the far away Everglades."); + list.add(EnumChatFormatting.GREEN+"This item produces such a temperature, that you'd hate to use it incorrectly."); + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + return Utils.rgbtoHexValue(255, 128, 0); + } + + @Override + public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, + float par8, float par9, float par10) { + if (par7 == 0) { + par5--; + } + if (par7 == 1) { + par5++; + } + if (par7 == 2) { + par6--; + } + if (par7 == 3) { + par6++; + } + if (par7 == 4) { + par4--; + } + if (par7 == 5) { + par4++; + } + if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { + return false; + } + Block i1 = par3World.getBlock(par4, par5, par6); + if (i1 == Blocks.air) { + par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); + if (Dimension_Everglades.portalBlock.tryToCreatePortal(par3World, par4, par5, par6)){ + //Make a Portal + } + else { + if (!par3World.isRemote){ + par3World.setBlock(par4, par5, par6, ModBlocks.blockHellfire, 0, 3); + } + } + } + par1ItemStack.damageItem(1, par2EntityPlayer); + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/object/BoxedQuad.java b/src/main/java/gtPlusPlus/everglades/object/BoxedQuad.java new file mode 100644 index 0000000000..d0fbc4247b --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/object/BoxedQuad.java @@ -0,0 +1,56 @@ +package gtPlusPlus.everglades.object; + +import net.minecraft.block.Block; + +import gtPlusPlus.api.objects.data.Pair; + +public class BoxedQuad { + + private final Pair key; + private final Pair value; + private final Pair value2; + private final Pair value3; + private final Pair [] mInternalPairArray; + + + public BoxedQuad(final Pair key, final Pair value, final Pair value2, final Pair value3){ + this.key = key; + this.value = value; + this.value2 = value2; + this.value3 = value3; + mInternalPairArray = new Pair[]{key, value, value2, value3}; + } + + final public Pair getKey(){ + return this.key; + } + + final public Pair getValue_1(){ + return this.value; + } + + final public Pair getValue_2(){ + return this.value2; + } + + final public Pair getValue_3(){ + return this.value3; + } + + final synchronized Pair unbox(int pos){ + return this.mInternalPairArray[pos]; + } + + final synchronized Block getBlock(int pos){ + return this.mInternalPairArray[pos].getKey(); + } + + final synchronized int getMeta(int pos){ + return this.mInternalPairArray[pos].getValue(); + } + + + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/world/CustomWorldType.java b/src/main/java/gtPlusPlus/everglades/world/CustomWorldType.java new file mode 100644 index 0000000000..5a5344ca65 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/world/CustomWorldType.java @@ -0,0 +1,59 @@ +package gtPlusPlus.everglades.world; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.minecraft.world.WorldType; + +public class CustomWorldType extends WorldType{ + + public CustomWorldType(String name) { + super(name); + } + + public CustomWorldType(int p_i1959_1_, String p_i1959_2_){ + this("test"); + try { + //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); + Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); + m.setAccessible(true); + m.invoke(this, p_i1959_1_, p_i1959_2_, 0); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public CustomWorldType(int p_i1960_1_, String p_i1960_2_, int p_i1960_3_){ + this("test2"); + try { + //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods())); + Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class[]{}); + m.setAccessible(true); + m.invoke(this, p_i1960_1_, p_i1960_2_, p_i1960_3_); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + private WorldType getMC(){ + try { + Constructor c = WorldType.class.getDeclaredConstructor(); + c.setAccessible(true); // solution + return c.newInstance(); + + // production code should handle these exceptions more gracefully + } catch (InvocationTargetException x) { + x.printStackTrace(); + } catch (NoSuchMethodException x) { + x.printStackTrace(); + } catch (InstantiationException x) { + x.printStackTrace(); + } catch (IllegalAccessException x) { + x.printStackTrace(); + } + return null; + } +} + diff --git a/src/main/java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java b/src/main/java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java new file mode 100644 index 0000000000..227d32502b --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java @@ -0,0 +1,14 @@ +package gtPlusPlus.everglades.world; + +import net.minecraft.util.ChunkCoordinates; + +public class EvergladesPortalPosition extends ChunkCoordinates { + public long field_85087_d; + final TeleporterDimensionMod field_85088_e; + + public EvergladesPortalPosition(TeleporterDimensionMod gladesTeleporter, int par2, int par3, int par4, long par5) { + super(par2, par3, par4); + this.field_85088_e = gladesTeleporter; + this.field_85087_d = par5; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java b/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java new file mode 100644 index 0000000000..e67a882638 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java @@ -0,0 +1,471 @@ +package gtPlusPlus.everglades.world; + +import java.util.*; + +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.util.*; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.Teleporter; +import net.minecraft.world.WorldServer; + +import gtPlusPlus.everglades.dimension.Dimension_Everglades; + +public class TeleporterDimensionMod extends Teleporter { + + private final WorldServer worldServerInstance; + /** + * A private Random() function in Teleporter + */ + private final Random random; + /** + * Stores successful portal placement locations for rapid lookup. + */ + private final LongHashMap destinationCoordinateCache = new LongHashMap(); + /** + * A list of valid keys for the destinationCoordainteCache. These are + * based on the X & Z of the players initial location. + */ + @SuppressWarnings("rawtypes") + private final List destinationCoordinateKeys = new ArrayList(); + + public TeleporterDimensionMod(WorldServer par1WorldServer) { + super(par1WorldServer); + this.worldServerInstance = par1WorldServer; + this.random = new Random(par1WorldServer.getSeed()); + } + + /** + * Place an entity in a nearby portal, creating one if necessary. + */ + @Override + public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { + if (this.worldServerInstance.provider.dimensionId != 1) { + if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { + this.makePortal(par1Entity); + this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); + } + } + else { + int i = MathHelper.floor_double(par1Entity.posX); + int j = MathHelper.floor_double(par1Entity.posY) - 1; + int k = MathHelper.floor_double(par1Entity.posZ); + byte b0 = 1; + byte b1 = 0; + + for (int l = -2; l <= 2; ++l) { + for (int i1 = -2; i1 <= 2; ++i1) { + for (int j1 = -1; j1 < 3; ++j1) { + int k1 = i + i1 * b0 + l * b1; + int l1 = j + j1; + int i2 = k + i1 * b1 - l * b0; + boolean flag = j1 < 0; + this.worldServerInstance.setBlock(k1, l1, i2, flag ? Dimension_Everglades.blockPortalFrame : Blocks.air); + } + } + } + + par1Entity.setLocationAndAngles(i, j, k, par1Entity.rotationYaw, 0.0F); + par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; + } + } + + /** + * Place an entity in a nearby portal which already exists. + */ + @Override + public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { + short short1 = 128; + double d3 = -1.0D; + int i = 0; + int j = 0; + int k = 0; + int l = MathHelper.floor_double(par1Entity.posX); + int i1 = MathHelper.floor_double(par1Entity.posZ); + long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1); + boolean flag = true; + double d7; + int l3; + + if (this.destinationCoordinateCache.containsItem(j1)) { + Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache + .getValueByKey(j1); + d3 = 0.0D; + i = portalposition.posX; + j = portalposition.posY; + k = portalposition.posZ; + portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); + flag = false; + } + else { + for (l3 = l - short1; l3 <= l + short1; ++l3) { + double d4 = l3 + 0.5D - par1Entity.posX; + + for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) { + double d5 = l1 + 0.5D - par1Entity.posZ; + + for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) { + if (this.worldServerInstance.getBlock(l3, i2, l1) == Dimension_Everglades.portalBlock) { + while (this.worldServerInstance.getBlock(l3, i2 - 1, l1) == Dimension_Everglades.portalBlock) { + --i2; + } + + d7 = i2 + 0.5D - par1Entity.posY; + double d8 = d4 * d4 + d7 * d7 + d5 * d5; + + if (d3 < 0.0D || d8 < d3) { + d3 = d8; + i = l3; + j = i2; + k = l1; + } + } + } + } + } + } + + if (d3 >= 0.0D) { + if (flag) { + this.destinationCoordinateCache.add(j1, + new Teleporter.PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); + this.destinationCoordinateKeys.add(Long.valueOf(j1)); + } + + double d11 = i + 0.5D; + double d6 = j + 0.5D; + d7 = k + 0.5D; + int i4 = -1; + + if (this.worldServerInstance.getBlock(i - 1, j, k) == Dimension_Everglades.portalBlock) { + i4 = 2; + } + + if (this.worldServerInstance.getBlock(i + 1, j, k) == Dimension_Everglades.portalBlock) { + i4 = 0; + } + + if (this.worldServerInstance.getBlock(i, j, k - 1) == Dimension_Everglades.portalBlock) { + i4 = 3; + } + + if (this.worldServerInstance.getBlock(i, j, k + 1) == Dimension_Everglades.portalBlock) { + i4 = 1; + } + + int j2 = par1Entity.getTeleportDirection(); + + if (i4 > -1) { + int k2 = Direction.rotateLeft[i4]; + int l2 = Direction.offsetX[i4]; + int i3 = Direction.offsetZ[i4]; + int j3 = Direction.offsetX[k2]; + int k3 = Direction.offsetZ[k2]; + boolean flag1 = !this.worldServerInstance.isAirBlock(i + l2 + j3, j, k + i3 + k3) + || !this.worldServerInstance.isAirBlock(i + l2 + j3, j + 1, k + i3 + k3); + boolean flag2 = !this.worldServerInstance.isAirBlock(i + l2, j, k + i3) + || !this.worldServerInstance.isAirBlock(i + l2, j + 1, k + i3); + + if (flag1 && flag2) { + i4 = Direction.rotateOpposite[i4]; + k2 = Direction.rotateOpposite[k2]; + l2 = Direction.offsetX[i4]; + i3 = Direction.offsetZ[i4]; + j3 = Direction.offsetX[k2]; + k3 = Direction.offsetZ[k2]; + l3 = i - j3; + d11 -= j3; + int k1 = k - k3; + d7 -= k3; + flag1 = !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j, k1 + i3 + k3) + || !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j + 1, k1 + i3 + k3); + flag2 = !this.worldServerInstance.isAirBlock(l3 + l2, j, k1 + i3) + || !this.worldServerInstance.isAirBlock(l3 + l2, j + 1, k1 + i3); + } + + float f1 = 0.5F; + float f2 = 0.5F; + + if (!flag1 && flag2) { + f1 = 1.0F; + } + else if (flag1 && !flag2) { + f1 = 0.0F; + } + else if (flag1 && flag2) { + f2 = 0.0F; + } + + d11 += j3 * f1 + f2 * l2; + d7 += k3 * f1 + f2 * i3; + float f3 = 0.0F; + float f4 = 0.0F; + float f5 = 0.0F; + float f6 = 0.0F; + + if (i4 == j2) { + f3 = 1.0F; + f4 = 1.0F; + } + else if (i4 == Direction.rotateOpposite[j2]) { + f3 = -1.0F; + f4 = -1.0F; + } + else if (i4 == Direction.rotateRight[j2]) { + f5 = 1.0F; + f6 = -1.0F; + } + else { + f5 = -1.0F; + f6 = 1.0F; + } + + double d9 = par1Entity.motionX; + double d10 = par1Entity.motionZ; + par1Entity.motionX = d9 * f3 + d10 * f6; + par1Entity.motionZ = d9 * f5 + d10 * f4; + par1Entity.rotationYaw = par8 - j2 * 90 + i4 * 90; + } + else { + par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; + } + + par1Entity.setLocationAndAngles(d11, d6, d7, par1Entity.rotationYaw, par1Entity.rotationPitch); + return true; + } + else { + return false; + } + } + + @Override + public boolean makePortal(Entity par1Entity) { + byte b0 = 16; + double d0 = -1.0D; + int i = MathHelper.floor_double(par1Entity.posX); + int j = MathHelper.floor_double(par1Entity.posY); + int k = MathHelper.floor_double(par1Entity.posZ); + int l = i; + int i1 = j; + int j1 = k; + int k1 = 0; + int l1 = this.random.nextInt(4); + int i2; + double d1; + double d2; + int k2; + int i3; + int k3; + int j3; + int i4; + int l3; + int k4; + int j4; + int i5; + int l4; + double d3; + double d4; + + for (i2 = i - b0; i2 <= i + b0; ++i2) { + d1 = i2 + 0.5D - par1Entity.posX; + + for (k2 = k - b0; k2 <= k + b0; ++k2) { + d2 = k2 + 0.5D - par1Entity.posZ; + label274: + + for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { + if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { + while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { + --i3; + } + + for (j3 = l1; j3 < l1 + 4; ++j3) { + k3 = j3 % 2; + l3 = 1 - k3; + + if (j3 % 4 >= 2) { + k3 = -k3; + l3 = -l3; + } + + for (i4 = 0; i4 < 3; ++i4) { + for (j4 = 0; j4 < 4; ++j4) { + for (k4 = -1; k4 < 4; ++k4) { + l4 = i2 + (j4 - 1) * k3 + i4 * l3; + i5 = i3 + k4; + int j5 = k2 + (j4 - 1) * l3 - i4 * k3; + + if (k4 < 0 + && !this.worldServerInstance.getBlock(l4, i5, j5).getMaterial() + .isSolid() + || k4 >= 0 && !this.worldServerInstance.isAirBlock(l4, i5, j5)) { + continue label274; + } + } + } + } + + d4 = i3 + 0.5D - par1Entity.posY; + d3 = d1 * d1 + d4 * d4 + d2 * d2; + + if (d0 < 0.0D || d3 < d0) { + d0 = d3; + l = i2; + i1 = i3; + j1 = k2; + k1 = j3 % 4; + } + } + } + } + } + } + + if (d0 < 0.0D) { + for (i2 = i - b0; i2 <= i + b0; ++i2) { + d1 = i2 + 0.5D - par1Entity.posX; + + for (k2 = k - b0; k2 <= k + b0; ++k2) { + d2 = k2 + 0.5D - par1Entity.posZ; + label222: + + for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) { + if (this.worldServerInstance.isAirBlock(i2, i3, k2)) { + while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) { + --i3; + } + + for (j3 = l1; j3 < l1 + 2; ++j3) { + k3 = j3 % 2; + l3 = 1 - k3; + + for (i4 = 0; i4 < 4; ++i4) { + for (j4 = -1; j4 < 4; ++j4) { + k4 = i2 + (i4 - 1) * k3; + l4 = i3 + j4; + i5 = k2 + (i4 - 1) * l3; + + if (j4 < 0 + && !this.worldServerInstance.getBlock(k4, l4, i5).getMaterial() + .isSolid() + || j4 >= 0 && !this.worldServerInstance.isAirBlock(k4, l4, i5)) { + continue label222; + } + } + } + + d4 = i3 + 0.5D - par1Entity.posY; + d3 = d1 * d1 + d4 * d4 + d2 * d2; + + if (d0 < 0.0D || d3 < d0) { + d0 = d3; + l = i2; + i1 = i3; + j1 = k2; + k1 = j3 % 2; + } + } + } + } + } + } + } + + int k5 = l; + int j2 = i1; + k2 = j1; + int l5 = k1 % 2; + int l2 = 1 - l5; + + if (k1 % 4 >= 2) { + l5 = -l5; + l2 = -l2; + } + + boolean flag; + + if (d0 < 0.0D) { + if (i1 < 70) { + i1 = 70; + } + + if (i1 > this.worldServerInstance.getActualHeight() - 10) { + i1 = this.worldServerInstance.getActualHeight() - 10; + } + + j2 = i1; + + for (i3 = -1; i3 <= 1; ++i3) { + for (j3 = 1; j3 < 3; ++j3) { + for (k3 = -1; k3 < 3; ++k3) { + l3 = k5 + (j3 - 1) * l5 + i3 * l2; + i4 = j2 + k3; + j4 = k2 + (j3 - 1) * l2 - i3 * l5; + flag = k3 < 0; + this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Everglades.blockPortalFrame : Blocks.air); + } + } + } + } + + for (i3 = 0; i3 < 4; ++i3) { + for (j3 = 0; j3 < 4; ++j3) { + for (k3 = -1; k3 < 4; ++k3) { + l3 = k5 + (j3 - 1) * l5; + i4 = j2 + k3; + j4 = k2 + (j3 - 1) * l2; + flag = j3 == 0 || j3 == 3 || k3 == -1 || k3 == 3; + this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_Everglades.blockPortalFrame : Dimension_Everglades.portalBlock, 0, 2); + } + } + + for (j3 = 0; j3 < 4; ++j3) { + for (k3 = -1; k3 < 4; ++k3) { + l3 = k5 + (j3 - 1) * l5; + i4 = j2 + k3; + j4 = k2 + (j3 - 1) * l2; + this.worldServerInstance.notifyBlocksOfNeighborChange(l3, i4, j4, + this.worldServerInstance.getBlock(l3, i4, j4)); + } + } + } + + return true; + } + + /** + * called periodically to remove out-of-date portal locations from the + * cache list. Argument par1 is a WorldServer.getTotalWorldTime() value. + */ + @Override + public void removeStalePortalLocations(long par1) { + if (par1 % 100L == 0L) { + @SuppressWarnings("rawtypes") + Iterator iterator = this.destinationCoordinateKeys.iterator(); + long j = par1 - 600L; + + while (iterator.hasNext()) { + Long olong = (Long) iterator.next(); + Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache + .getValueByKey(olong.longValue()); + + if (portalposition == null || portalposition.lastUpdateTime < j) { + iterator.remove(); + this.destinationCoordinateCache.remove(olong.longValue()); + } + } + } + } + + public class PortalPosition extends ChunkCoordinates { + /** + * The worldtime at which this PortalPosition was last verified + */ + public long lastUpdateTime; + + public PortalPosition(int par2, int par3, int par4, long par5) { + super(par2, par3, par4); + this.lastUpdateTime = par5; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java b/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java new file mode 100644 index 0000000000..fc1b2ac425 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java @@ -0,0 +1,263 @@ +package gtPlusPlus.everglades.world; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.crash.CrashReport; +import net.minecraft.crash.CrashReportCategory; +import net.minecraft.util.ReportedException; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.World; +import net.minecraft.world.WorldType; +import net.minecraft.world.biome.BiomeCache; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.WorldChunkManager; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; + +import gtPlusPlus.everglades.biome.GenLayerEverglades; + +public class WorldChunkManagerCustom extends WorldChunkManager { + + private GenLayer genBiomes; + /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */ + private GenLayer biomeIndexLayer; + /** The BiomeCache object for this world. */ + private BiomeCache biomeCache; + /** A list of biomes that the player can spawn in. */ + private List biomesToSpawnIn; + + @SuppressWarnings({ "rawtypes" }) + public WorldChunkManagerCustom() { + this.biomeCache = new BiomeCache(this); + this.biomesToSpawnIn = new ArrayList(); + this.biomesToSpawnIn.addAll(allowedBiomes); // TODO + } + + public WorldChunkManagerCustom(long seed, WorldType worldType) { + this(); + // i changed this to my GenLayerDarkWorld + GenLayer[] agenlayer = GenLayerEverglades.makeTheWorld(seed, worldType); + + agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer); + this.genBiomes = agenlayer[0]; + this.biomeIndexLayer = agenlayer[1]; + + } + + public WorldChunkManagerCustom(World world) { + this(world.getSeed(), world.getWorldInfo().getTerrainType()); + + } + + /** + * Gets the list of valid biomes for the player to spawn in. + */ + @Override + public List getBiomesToSpawnIn() { + return this.biomesToSpawnIn; + } + + /** + * Returns a list of rainfall values for the specified blocks. Args: + * listToReuse, x, z, width, length. + */ + @Override + public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) { + IntCache.resetIntCache(); + + if (listToReuse == null || listToReuse.length < width * length) { + listToReuse = new float[width * length]; + } + + int[] aint = this.biomeIndexLayer.getInts(x, z, width, length); + + for (int i1 = 0; i1 < width * length; ++i1) { + try { + float f = BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F; + + if (f > 1.0F) { + f = 1.0F; + } + + listToReuse[i1] = f; + } + catch (Throwable throwable) { + CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); + CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock"); + crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1)); + crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length)); + crashreportcategory.addCrashSection("x", Integer.valueOf(x)); + crashreportcategory.addCrashSection("z", Integer.valueOf(z)); + crashreportcategory.addCrashSection("w", Integer.valueOf(width)); + crashreportcategory.addCrashSection("h", Integer.valueOf(length)); + throw new ReportedException(crashreport); + } + } + + return listToReuse; + } + + /** + * Return an adjusted version of a given temperature based on the y + * height + */ + @Override + @SideOnly(Side.CLIENT) + public float getTemperatureAtHeight(float par1, int par2) { + return par1; + } + + /** + * Returns an array of biomes for the location input. + */ + @Override + public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { + IntCache.resetIntCache(); + + if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) { + par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5]; + } + + int[] aint = this.genBiomes.getInts(par2, par3, par4, par5); + + try { + for (int i = 0; i < par4 * par5; ++i) { + par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]); + } + + return par1ArrayOfBiomeGenBase; + } + catch (Throwable throwable) { + CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); + CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock"); + crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length)); + crashreportcategory.addCrashSection("x", Integer.valueOf(par2)); + crashreportcategory.addCrashSection("z", Integer.valueOf(par3)); + crashreportcategory.addCrashSection("w", Integer.valueOf(par4)); + crashreportcategory.addCrashSection("h", Integer.valueOf(par5)); + throw new ReportedException(crashreport); + } + } + + /** + * Returns biomes to use for the blocks and loads the other data like + * temperature and humidity onto the WorldChunkManager Args: + * oldBiomeList, x, z, width, depth + */ + @Override + public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth) { + return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true); + } + + /** + * Return a list of biomes for the specified blocks. Args: listToReuse, + * x, y, width, length, cacheFlag (if false, don't check biomeCache to + * avoid infinite loop in BiomeCacheBlock) + */ + @Override + public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag) { + IntCache.resetIntCache(); + + if (listToReuse == null || listToReuse.length < width * length) { + listToReuse = new BiomeGenBase[width * length]; + } + + if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (y & 15) == 0) { + BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y); + System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length); + return listToReuse; + } + else { + int[] aint = this.biomeIndexLayer.getInts(x, y, width, length); + + for (int i = 0; i < width * length; ++i) { + listToReuse[i] = BiomeGenBase.getBiome(aint[i]); + } + return listToReuse; + } + } + + /** + * checks given Chunk's Biomes against List of allowed ones + */ + @Override + @SuppressWarnings("rawtypes") + public boolean areBiomesViable(int x, int y, int z, List par4List) { + IntCache.resetIntCache(); + int l = x - z >> 2; + int i1 = y - z >> 2; + int j1 = x + z >> 2; + int k1 = y + z >> 2; + int l1 = j1 - l + 1; + int i2 = k1 - i1 + 1; + int[] aint = this.genBiomes.getInts(l, i1, l1, i2); + + try { + for (int j2 = 0; j2 < l1 * i2; ++j2) { + BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]); + + if (!par4List.contains(biomegenbase)) { + return false; + } + } + + return true; + } + catch (Throwable throwable) { + CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id"); + CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer"); + crashreportcategory.addCrashSection("Layer", this.genBiomes.toString()); + crashreportcategory.addCrashSection("x", Integer.valueOf(x)); + crashreportcategory.addCrashSection("z", Integer.valueOf(y)); + crashreportcategory.addCrashSection("radius", Integer.valueOf(z)); + crashreportcategory.addCrashSection("allowed", par4List); + throw new ReportedException(crashreport); + } + } + + /** + * Finds a valid position within a range, that is in one of the listed + * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive + * y positions. + */ + @Override + @SuppressWarnings("rawtypes") + public ChunkPosition findBiomePosition(int p_150795_1_, int p_150795_2_, int p_150795_3_, List p_150795_4_, Random p_150795_5_) { + IntCache.resetIntCache(); + int l = p_150795_1_ - p_150795_3_ >> 2; + int i1 = p_150795_2_ - p_150795_3_ >> 2; + int j1 = p_150795_1_ + p_150795_3_ >> 2; + int k1 = p_150795_2_ + p_150795_3_ >> 2; + int l1 = j1 - l + 1; + int i2 = k1 - i1 + 1; + int[] aint = this.genBiomes.getInts(l, i1, l1, i2); + ChunkPosition chunkposition = null; + int j2 = 0; + + for (int k2 = 0; k2 < l1 * i2; ++k2) { + int l2 = l + k2 % l1 << 2; + int i3 = i1 + k2 / l1 << 2; + BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]); + + if (p_150795_4_.contains(biomegenbase) && (chunkposition == null || p_150795_5_.nextInt(j2 + 1) == 0)) { + chunkposition = new ChunkPosition(l2, 0, i3); + ++j2; + } + } + + return chunkposition; + } + + /** + * Calls the WorldChunkManager's biomeCache.cleanupCache() + */ + @Override + public void cleanupCache() { + this.biomeCache.cleanupCache(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/everglades/world/WorldProviderMod.java b/src/main/java/gtPlusPlus/everglades/world/WorldProviderMod.java new file mode 100644 index 0000000000..b5945bcd21 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/world/WorldProviderMod.java @@ -0,0 +1,71 @@ +package gtPlusPlus.everglades.world; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.util.Vec3; +import net.minecraft.world.WorldProvider; +import net.minecraft.world.WorldType; +import net.minecraft.world.chunk.IChunkProvider; + +import gtPlusPlus.everglades.chunk.ChunkProviderModded; +import gtPlusPlus.everglades.dimension.Dimension_Everglades; + +public class WorldProviderMod extends WorldProvider { + + @Override + public void registerWorldChunkManager() { + this.worldChunkMgr = new WorldChunkManagerCustom(this.worldObj.getSeed(), WorldType.AMPLIFIED); + this.isHellWorld = false; + this.hasNoSky = false; + this.dimensionId = Dimension_Everglades.DIMID; + } + + @Override + @SideOnly(Side.CLIENT) + public Vec3 getFogColor(float par1, float par2) { + return Vec3.createVectorHelper(0.01568627450980392D, 0.09019607843137255D, 0.0D); + } + + @Override + public IChunkProvider createChunkGenerator() { + return new ChunkProviderModded(this.worldObj, this.worldObj.getSeed() - 1278); + } + + @Override + public boolean isSurfaceWorld() { + return true; + } + + @Override + public boolean canCoordinateBeSpawn(int par1, int par2) { + return false; + } + + @Override + public boolean canRespawnHere() { + return true; + } + + @Override + public float getSunBrightness(float par1) { + return (par1*2F); + } + + @Override + public float getStarBrightness(float par1) { + return (par1*5F); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean doesXZShowFog(int par1, int par2) { + return true; + } + + @Override + public String getDimensionName() { + return "dimensionDarkWorld"; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java b/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java new file mode 100644 index 0000000000..ce2062d12c --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java @@ -0,0 +1,264 @@ +package gtPlusPlus.nei; + +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.gui.machine.GUI_DecayablesChest; +import gtPlusPlus.core.handler.Recipes.DecayableRecipe; +import gtPlusPlus.core.item.base.dusts.BaseItemDustUnique; +import gtPlusPlus.core.item.materials.DustDecayable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.VanillaColours; +import gtPlusPlus.nei.handlers.NeiTextureHandler; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + +public class DecayableRecipeHandler extends TemplateRecipeHandler { + + public static final String mNEIName = "Decayables"; + + public String getRecipeName() { + return StatCollector.translateToLocal("GTPP.container.decaychest.name"); + } + + public String getGuiTexture() { + return CORE.MODID + ":textures/gui/nei/decayables.png"; + } + + public Class getGuiClass() { + return GUI_DecayablesChest.class; + } + + public String getOverlayIdentifier() { + return "GTPP_Decayables"; + } + + public int recipiesPerPage() { + return 1; + } + + public void loadTransferRects() { + this.transferRects.add(new RecipeTransferRect(new Rectangle(6, 3, 16, 16), "GTPP_Decayables", new Object[0])); + } + + public void loadCraftingRecipes(ItemStack result) { + if (result == null || (!DustDecayable.class.isInstance(result.getItem()) + && !BaseItemDustUnique.class.isInstance(result.getItem()))) { + return; + } + if (result != null) { + //Logger.INFO("Looking up crafting recipes for "+ItemUtils.getItemName(result)); + } + final List recipes = DecayableRecipe.mRecipes; + for (final DecayableRecipe recipe : recipes) { + if (recipe.isValid()) { + final ItemStack input = recipe.mInput.copy(); + final ItemStack output = recipe.mOutput.copy(); + if (!GT_Utility.areStacksEqual(result, output, true)) { + continue; + } + //Logger.INFO("Showing Usage result for "+ItemUtils.getItemName(result)); + final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime); + this.arecipes.add(rec); + sort(); + } + } + } + + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals(getOverlayIdentifier()) && this.getClass() == DecayableRecipeHandler.class) { + final List recipes = DecayableRecipe.mRecipes; + for (final DecayableRecipe recipe : recipes) { + if (recipe.isValid()) { + final ItemStack input = recipe.mInput.copy(); + final ItemStack output = recipe.mOutput.copy(); + final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime); + this.arecipes.add(rec); + sort(); + } + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + public void loadUsageRecipes(ItemStack ingredient) { + final List recipes = DecayableRecipe.mRecipes; + if (ingredient != null) { + //Logger.INFO("Looking up Usage results for "+ItemUtils.getItemName(ingredient)); + } + for (final DecayableRecipe recipe : recipes) { + if (recipe.isValid()) { + final ItemStack input = recipe.mInput.copy(); + final ItemStack output = recipe.mOutput.copy(); + if (!GT_Utility.areStacksEqual(ingredient, input, true)) { + continue; + } + //Logger.INFO("Showing up Usage results for "+ItemUtils.getItemName(ingredient)); + final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime); + //rec.setIngredientPermutation((Collection) rec.input, ingredient); + this.arecipes.add(rec); + sort(); + } + } + } + + private final void sort() { + List g = new ArrayList(); + for (CachedRecipe u : arecipes) { + g.add((DecayableRecipeNEI) u); + } + if (g != null && !g.isEmpty()) { + Collections.sort(g); + } + } + + public void drawExtras(int recipeIndex) { + DecayableRecipeNEI recipe = (DecayableRecipeNEI) this.arecipes.get(recipeIndex); + + //GuiDraw.drawStringC(I18n.format("GTPP.container.decaychest.result", new Object[]{}), 43, 10, 8421504, false); + + int cost = recipe.time; + if (cost > 0) { + + // NEI Strings + String s = I18n.format("GTPP.nei.info", new Object[] { cost }); + String s0 = I18n.format("GTPP.nei.timetaken", new Object[] { cost }); + + // Time Strings + String s1 = I18n.format("GTPP.time.ticks", new Object[] { cost }); + String s2 = I18n.format("GTPP.time.seconds", new Object[] { cost }); + String s3 = I18n.format("GTPP.time.minutes", new Object[] { cost }); + String s4 = I18n.format("GTPP.time.hours", new Object[] { cost }); + String s5 = I18n.format("GTPP.time.days", new Object[] { cost }); + String s6 = I18n.format("GTPP.time.months", new Object[] { cost }); + int y = 20; + + int secs = cost / 20; + int mins = secs / 60; + int hours = mins / 60; + int days = hours / 24; + int months = days / 30; + + String suffix; + int formattedTime; + if (cost <= 20) { + suffix = s1; + formattedTime = cost; + } else if (cost <= (20 * 60)) { + suffix = s2; + formattedTime = secs; + } else if (cost <= (20 * 60 * 60)) { + suffix = s3; + formattedTime = mins; + } else if (cost <= (20 * 60 * 60 * 24)) { + suffix = s4; + formattedTime = hours; + } else if (cost < (20 * 60 * 60 * 24 * 30)) { + suffix = s5; + formattedTime = days; + } else if (cost <= (20 * 60 * 60 * 24 * 30)) { + suffix = s6; + formattedTime = months; + } else { + suffix = s1; + formattedTime = cost; + } + + int x = 5; + GuiDraw.drawString(s, x, 25, VanillaColours.DYE_BLACK.getAsInt(), false); + GuiDraw.drawString(s0, x, 40, VanillaColours.DYE_BLACK.getAsInt(), false); + + GuiDraw.drawString(suffix, x + 16, y + 30, VanillaColours.DYE_BLACK.getAsInt(), false); + + //Values + GuiDraw.drawString(("" + formattedTime), x, y + 30, VanillaColours.DYE_GREEN.getAsInt(), false); + + if (hours > 1) { + int aLeftoverMinutes = (cost - (hours * (20 * 60 * 60))); + if (aLeftoverMinutes > 0) { + int secs2 = aLeftoverMinutes / 20; + int mins2 = secs2 / 60; + GuiDraw.drawString(s3, x + 16, y + 42, VanillaColours.DYE_BLACK.getAsInt(), false); + GuiDraw.drawString(("" + mins2), x, y + 42, VanillaColours.DYE_GREEN.getAsInt(), false); + + } + + } + + } + + NeiTextureHandler.RECIPE_BUTTON.renderIcon(6.0D, 3.0D, 16.0D, 16.0D, 0.0D, true); + } + + public class DecayableRecipeNEI extends TemplateRecipeHandler.CachedRecipe implements Comparable { + private PositionedStack input; + private PositionedStack output; + public int time; + + @Override + public PositionedStack getIngredient() { + return this.input; + } + + public PositionedStack getResult() { + return this.output; + } + + public DecayableRecipeNEI(final ItemStack input, final ItemStack result, final int time) { + super(); + this.input = new PositionedStack(input, 93, 24); + this.output = new PositionedStack(result, 142, 42); + this.time = time; + } + + @Override + public int compareTo(CachedRecipe o) { + boolean b = DecayableRecipeNEI.class.isInstance(o); + if (b) { + DecayableRecipeNEI p = (DecayableRecipeNEI) o; + if (p.time > this.time) { + return 1; + } else if (p.time == this.time) { + return 0; + } else { + return -1; + } + } + return 0; + } + + @Override + public boolean equals(Object obj) { + if (obj != null) { + if (DecayableRecipeNEI.class.isInstance(obj)) { + DecayableRecipeNEI p = (DecayableRecipeNEI) obj; + if (p != null) { + // Time check first to keep it simple and not unbox the Recipes. + if (p.time == this.time) { + ItemStack aInput = p.input.item; + ItemStack aOutput = p.output.item; + if (GT_Utility.areStacksEqual(aInput, this.input.item, true)) { + if (GT_Utility.areStacksEqual(aOutput, this.output.item, true)) { + return true; + } + } + } + } + + } + } + return false; + } + + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java b/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java new file mode 100644 index 0000000000..de2c29db9f --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java @@ -0,0 +1,942 @@ +package gtPlusPlus.nei; + +import java.awt.Point; +import java.awt.Rectangle; +import java.lang.ref.SoftReference; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.stream.Collectors; + +import org.lwjgl.opengl.GL11; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.PositionedStack; +import codechicken.nei.guihook.GuiContainerManager; +import codechicken.nei.guihook.IContainerInputHandler; +import codechicken.nei.guihook.IContainerTooltipHandler; +import codechicken.nei.recipe.GuiCraftingRecipe; +import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.GuiUsageRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; +import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GTPP_NEI_DefaultHandler extends TemplateRecipeHandler { + + public static final int sOffsetX = 5; + public static final int sOffsetY = 11; + private SoftReference> mCachedRecipes = null; + + private static final HashMap> mInputSlotMap = new HashMap>(); + private static final HashMap> mOutputSlotMap = new HashMap>(); + + static { + GuiContainerManager.addInputHandler(new GT_RectHandler()); + GuiContainerManager.addTooltipHandler(new GT_RectHandler()); + int[] aSlotX = new int[] {12, 30, 48}; + int[] aSlotY = new int[] {5, 23, 41, 64}; + // Input slots + int aIndex = 0; + for (int y=0; y(aSlotX[x], aSlotY[y])); + } + } + // Output slots + aSlotX = new int[] {102, 120, 138}; + aIndex = 0; + for (int y=0; y(aSlotX[x], aSlotY[y])); + } + } + } + + protected final GT_Recipe_Map mRecipeMap; + + public GTPP_NEI_DefaultHandler(final GT_Recipe_Map tMap) { + this.mRecipeMap = tMap; + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0])); + if (!NEI_GT_Config.sIsAdded) { + FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); + GuiCraftingRecipe.craftinghandlers.add(this); + GuiUsageRecipe.usagehandlers.add(this); + } + } + + public static void drawText(final int aX, final int aY, final String aString, final int aColor) { + Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GTPP_NEI_DefaultHandler(this.mRecipeMap); + } + + + public List getSortedRecipes() { + List result = new ArrayList<>(this.mRecipeMap.mRecipeList); + Collections.sort(result); + return result; + } + + public List getCache() { + List cache; + if (mCachedRecipes == null || (cache = mCachedRecipes.get()) == null) { + cache = mRecipeMap.mRecipeList.stream() // do not use parallel stream. This is already parallelized by NEI + .filter(r -> !r.mHidden) + .sorted() + .map(temp -> {return createCachedRecipe(temp);}) + .collect(Collectors.toList()); + // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model + // so we do not need any synchronization here + mCachedRecipes = new SoftReference<>(cache); + } + return cache; + } + + public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { + return new CachedDefaultRecipe(aRecipe); + } + + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals(getOverlayIdentifier())) { + arecipes.addAll(getCache()); + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + public void loadCraftingRecipes(ItemStack aResult) { + ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); + + ArrayList tResults = new ArrayList<>(); + tResults.add(aResult); + tResults.add(GT_OreDictUnificator.get(true, aResult)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); + FluidStack tFluidStack; + if (tFluid != null) { + tFluidStack = tFluid; + tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + } + else tFluidStack = GT_Utility.getFluidFromDisplayStack(aResult); + if (tFluidStack != null) { + tResults.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); + } + for (CachedDefaultRecipe recipe : getCache()) { + if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) + arecipes.add(recipe); + } + } + + public void loadUsageRecipes(ItemStack aInput) { + ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); + + ArrayList tInputs = new ArrayList<>(); + tInputs.add(aInput); + tInputs.add(GT_OreDictUnificator.get(false, aInput)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); + FluidStack tFluidStack; + if (tFluid != null) { + tFluidStack = tFluid; + tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + } + else tFluidStack = GT_Utility.getFluidFromDisplayStack(aInput); + if (tFluidStack != null) { + tInputs.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); + } + for (CachedDefaultRecipe recipe : getCache()) { + if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack))) + arecipes.add(recipe); + } + } + + @Override + public String getOverlayIdentifier() { + return this.mRecipeMap.mNEIName; + } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78); + } + + @Override + public int recipiesPerPage() { + return 1; + } + + @Override + public String getRecipeName() { + return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); + } + + @Override + public String getGuiTexture() { + return this.mRecipeMap.mNEIGUIPath; + } + + @Override + public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { + final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); + if ((tObject instanceof CachedDefaultRecipe)) { + final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; + for (final PositionedStack tStack : tRecipe.mOutputs) { + if (aStack == tStack.item) { + if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + break; + } + currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + break; + } + } + for (final PositionedStack tStack : tRecipe.mInputs) { + if (aStack == tStack.item) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || + (tStack.item.stackSize != 0)) { + break; + } + currenttip.add("Does not get consumed in the process"); + break; + } + } + } + return currenttip; + } + + @Override + public void drawExtras(final int aRecipeIndex) { + final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + final long tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + if (tEUt != 0) { + drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); + drawText(10, 83, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216); + if (this.mRecipeMap.mShowVoltageAmperageInNEI) { + drawText(10, 93, "Voltage: " + MathUtils.formatNumbers(tEUt / this.mRecipeMap.mAmperage) + " EU", -16777216); + drawText(10, 103, "Amperage: " + this.mRecipeMap.mAmperage, -16777216); + } else { + drawText(10, 93, "Voltage: unspecified", -16777216); + drawText(10, 103, "Amperage: unspecified", -16777216); + } + } + if (tDuration > 0) { + drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216); + } + if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + } + } + + public static class GT_RectHandler + implements IContainerInputHandler, IContainerTooltipHandler { + @Override + public boolean mouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { + if (this.canHandle(gui)) { + if (button == 0) { + return this.transferRect(gui, false); + } + if (button == 1) { + return this.transferRect(gui, true); + } + } + return false; + } + + @Override + public boolean lastKeyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { + return false; + } + + public boolean canHandle(final GuiContainer gui) { + return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI))); + } + + @Override + public List handleTooltip(final GuiContainer gui, final int mousex, final int mousey, final List currenttip) { + if ((this.canHandle(gui)) && (currenttip.isEmpty())) { + if ((gui instanceof GT_GUIContainer_BasicMachine) && new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { + currenttip.add("Recipes"); + } + } + return currenttip; + } + + private boolean transferRect(final GuiContainer gui, final boolean usage) { + if (gui instanceof GT_GUIContainer_BasicMachine) { + return (this.canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); + } + return false; + } + + @Override + public List handleItemDisplayName(final GuiContainer gui, final ItemStack itemstack, final List currenttip) { + return currenttip; + } + + @Override + public List handleItemTooltip(final GuiContainer gui, final ItemStack itemstack, final int mousex, final int mousey, final List currenttip) { + return currenttip; + } + + @Override + public boolean keyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { + return false; + } + + @Override + public void onKeyTyped(final GuiContainer gui, final char keyChar, final int keyID) { + } + + @Override + public void onMouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { + } + + @Override + public void onMouseUp(final GuiContainer gui, final int mousex, final int mousey, final int button) { + } + + @Override + public boolean mouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { + return false; + } + + @Override + public void onMouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { + } + + @Override + public void onMouseDragged(final GuiContainer gui, final int mousex, final int mousey, final int button, final long heldTime) { + } + } + + public class FixedPositionedStack + extends PositionedStack { + public final int mChance; + public boolean permutated = false; + + public FixedPositionedStack(final Object object, final int x, final int y) { + this(object, x, y, 0); + } + + public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) { + super(object, x, y, true); + this.mChance = aChance; + } + + @Override + public void generatePermutations() { + if (this.permutated) { + return; + } + final ArrayList tDisplayStacks = new ArrayList(); + for (final ItemStack tStack : this.items) { + if (GT_Utility.isStackValid(tStack)) { + if (tStack.getItemDamage() == 32767) { + final List permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); + if (!permutations.isEmpty()) { + ItemStack stack; + for (final Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { + stack = i$.next(); + } + } else { + final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize); + base.stackTagCompound = tStack.stackTagCompound; + tDisplayStacks.add(base); + } + } else { + tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); + } + } + } + this.items = (tDisplayStacks.toArray(new ItemStack[0])); + if (this.items.length == 0) { + this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; + } + this.permutated = true; + this.setPermutationToRender(0); + } + } + + public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe { + public final GT_Recipe mRecipe; + public final List mOutputs = new ArrayList(); + public final List mInputs = new ArrayList(); + + public CachedDefaultRecipe(final GT_Recipe aRecipe) { + super(); + this.mRecipe = aRecipe; + handleSlots(); + } + + public void handleSlots() { + int tStartIndex = 0; + switch (GTPP_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) { + case 0: + break; + case 1: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + break; + case 2: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + break; + case 3: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + break; + case 4: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + break; + case 5: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + break; + case 6: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 23)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + break; + case 7: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32)); + } + tStartIndex++; + break; + case 8: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 32)); + } + tStartIndex++; + break; + default: + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 32)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 32)); + } + tStartIndex++; + } + if (mRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); + } + tStartIndex = 0; + switch (GTPP_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount) { + case 0: + break; + case 1: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 2: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 3: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 4: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 5: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 6: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 7: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 8: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 32, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + default: + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 32, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 32, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + } + + + if ((mRecipe.mFluidInputs.length > 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 48, 52)); + if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 52)); + } + } + if (mRecipe.mFluidOutputs.length > 1) { + if (mRecipe.mFluidOutputs[0] != null && (mRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 120, 5)); + } + if (mRecipe.mFluidOutputs[1] != null && (mRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 5)); + } + if (mRecipe.mFluidOutputs.length > 2 && mRecipe.mFluidOutputs[2] != null && (mRecipe.mFluidOutputs[2].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[2], true), 102, 23)); + } + if (mRecipe.mFluidOutputs.length > 3 && mRecipe.mFluidOutputs[3] != null && (mRecipe.mFluidOutputs[3].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[3], true), 120, 23)); + } + if (mRecipe.mFluidOutputs.length > 4 && mRecipe.mFluidOutputs[4] != null && (mRecipe.mFluidOutputs[4].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[4], true), 138, 23)); + } + } else if ((mRecipe.mFluidOutputs.length > 0) && (mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 52)); + } + } + + @Override + public List getIngredients() { + return this.getCycledIngredients(GTPP_NEI_DefaultHandler.this.cycleticks / 10, this.mInputs); + } + + @Override + public PositionedStack getResult() { + return null; + } + + @Override + public List getOtherStacks() { + return this.mOutputs; + } + } + + public class NoCellMultiDefaultRecipe extends CachedDefaultRecipe { + + public NoCellMultiDefaultRecipe(final GT_Recipe aRecipe) { + super(aRecipe); + + } + + @Override + public void handleSlots() { + + int aInputItemsCount = this.mRecipe.mInputs.length; + int aInputFluidsCount = this.mRecipe.mFluidInputs.length; + int aOutputItemsCount = this.mRecipe.mOutputs.length; + int aOutputFluidsCount = this.mRecipe.mFluidOutputs.length; + int aInputSlotsUsed = 0; + int aOutputSlotsUsed = 0; + int aSlotToCheck = 0; + + // Special Slot + if (mRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); + } + + /* + * Items + */ + + // Upto 9 Inputs Slots + if (aInputItemsCount > 0) { + if (aInputItemsCount > 9) { + aInputItemsCount = 9; + } + for (int i=0;i 0) { + if (aOutputItemsCount > 9) { + aOutputItemsCount = 9; + } + for (int i=0;i 0) { + for (int i=0;i 0) { + for (int i=0;i 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 30, 52)); + if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 48, 52)); + } + } + + if (mRecipe.mFluidOutputs.length > 0) { + if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 52)); + } + if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 120, 52)); + } + } + } + + } +} diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java b/src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java new file mode 100644 index 0000000000..7ef76f68b2 --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java @@ -0,0 +1,195 @@ +package gtPlusPlus.nei; + +import java.util.List; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; + +public class GT_NEI_FluidReactor extends GTPP_NEI_DefaultHandler { + + public GT_NEI_FluidReactor() { + super(GTPP_Recipe_Map.sChemicalPlantRecipes); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GT_NEI_FluidReactor(); + } + + @Override + public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { + return new ChemPlantDefaultRecipe(aRecipe); + } + + @Override + public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { + final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); + if ((tObject instanceof ChemPlantDefaultRecipe)) { + final ChemPlantDefaultRecipe tRecipe = (ChemPlantDefaultRecipe) tObject; + for (final PositionedStack tStack : tRecipe.mOutputs) { + if (aStack == tStack.item) { + if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + break; + } + currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + break; + } + } + for (final PositionedStack tStack : tRecipe.mInputs) { + if (GT_Utility.areStacksEqual(aStack, tStack.item)) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || + (tStack.item.stackSize != 0)) { + break; + } + if (ItemUtils.isCatalyst(aStack)) { + currenttip.add("Does not always get consumed in the process"); + currenttip.add("Higher tier pipe casings allow this item to last longer"); + } + else if (ItemUtils.isControlCircuit(aStack)) { + currenttip.add("Does not get consumed in the process"); + } + break; + } + } + } + return currenttip; + } + + @Override + public void drawExtras(final int aRecipeIndex) { + final long tEUt = ((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + final int tDuration = ((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + if (tEUt != 0) { + drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); + //drawText(10, 83, "Usage: " + tEUt + " EU/t", -16777216); + if (this.mRecipeMap.mShowVoltageAmperageInNEI) { + drawText(10, 83, "Voltage: " + MathUtils.formatNumbers((tEUt / this.mRecipeMap.mAmperage)) + " EU/t", -16777216); + drawText(10, 93, "Amperage: " + this.mRecipeMap.mAmperage, -16777216); + } else { + drawText(10, 93, "Voltage: unspecified", -16777216); + drawText(10, 103, "Amperage: unspecified", -16777216); + } + } + if (tDuration > 0) { + drawText(10, 103, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); + } + if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + int aTier = (((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue); + String aTierMaterial = " - "; + if (aTier <= 0) { + aTierMaterial += "Bronze"; + } + else if (aTier == 1) { + aTierMaterial += "Steel"; + } + else if (aTier == 2) { + aTierMaterial += "Aluminium"; + } + else if (aTier == 3) { + aTierMaterial += "Stainless Steel"; + } + else if (aTier == 4) { + aTierMaterial += "Titanium"; + } + else if (aTier == 5) { + aTierMaterial += "Tungsten Steel"; + } + else if (aTier == 6) { + aTierMaterial += "Laurenium"; + } + else if (aTier == 7) { + aTierMaterial += "Botmium"; + } + + drawText(10, 113, this.mRecipeMap.mNEISpecialValuePre + (((ChemPlantDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + aTierMaterial, -16777216); + } + } + + public class ChemPlantDefaultRecipe extends CachedDefaultRecipe { + + public ChemPlantDefaultRecipe(final GT_Recipe aRecipe) { + super(aRecipe); + } + + @Override + public void handleSlots() { + int tStartIndex = 0; + + // Four Input Slots + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 3, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 21, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 39, -4)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 57, -4)); + } + tStartIndex++; + + + if (mRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); + } + tStartIndex = 0; + + //Four Output Slots + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + + + //New fluid display behaviour when 3 fluid inputs are detected. (Basically a mix of the code below for outputs an the code above for 9 input slots.) + if (mRecipe.mFluidInputs.length >= 1) { + if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 3, 31)); + } + if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 21, 31)); + } + if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 39, 31)); + } + if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 57, 31)); + } + } + + if (mRecipe.mFluidOutputs.length > 0) { + if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 138, 5)); + } + if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 23)); + } + } + + } + } +} diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java b/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java new file mode 100644 index 0000000000..dd7338eccd --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java @@ -0,0 +1,118 @@ +package gtPlusPlus.nei; + +import org.lwjgl.opengl.GL11; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.recipe.TemplateRecipeHandler; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.math.MathUtils; + +public class GT_NEI_LFTR extends GTPP_NEI_DefaultHandler { + + public GT_NEI_LFTR() { + super(GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GT_NEI_LFTR(); + } + + @Override + public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { + return new LFTRDefaultRecipe(aRecipe); + } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 89); + } + + @Override + public void drawExtras(final int aRecipeIndex) { + final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; + final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + drawText(10, 83, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); + drawText(10, 93, this.mRecipeMap.mNEISpecialValuePre + MathUtils.formatNumbers((((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier)) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + drawText(10, 103, "Dynamo: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); + drawText(10, 113, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt * 4)) + " EU", -16777216); + } + + public class LFTRDefaultRecipe extends CachedDefaultRecipe { + + public LFTRDefaultRecipe(final GT_Recipe aRecipe) { + super(aRecipe); + } + + @Override + public void handleSlots() { + int tStartIndex = 0; + if (mRecipe.mFluidInputs.length > 0) { + if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 12, 5)); + } + if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 5)); + } + if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 48, 5)); + } + if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 12, 23)); + } + if ((mRecipe.mFluidInputs.length > 4) && (mRecipe.mFluidInputs[4] != null) && (mRecipe.mFluidInputs[4].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[4], true), 30, 23)); + } + if ((mRecipe.mFluidInputs.length > 5) && (mRecipe.mFluidInputs[5] != null) && (mRecipe.mFluidInputs[5].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[5], true), 48, 23)); + } + if ((mRecipe.mFluidInputs.length > 6) && (mRecipe.mFluidInputs[6] != null) && (mRecipe.mFluidInputs[6].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[6], true), 12, 41)); + } + if ((mRecipe.mFluidInputs.length > 7) && (mRecipe.mFluidInputs[7] != null) && (mRecipe.mFluidInputs[7].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[7], true), 30, 41)); + } + if ((mRecipe.mFluidInputs.length > 8) && (mRecipe.mFluidInputs[8] != null) && (mRecipe.mFluidInputs[8].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[8], true), 48, 41)); + } + } + + tStartIndex = 0; + if (mRecipe.mFluidOutputs.length > 0) { + if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 5, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 120, 5, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 2) && (mRecipe.mFluidOutputs[2] != null) && (mRecipe.mFluidOutputs[2].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[2], true), 138, 5, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 3) && (mRecipe.mFluidOutputs[3] != null) && (mRecipe.mFluidOutputs[3].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[3], true), 102, 23, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 4) && (mRecipe.mFluidOutputs[4] != null) && (mRecipe.mFluidOutputs[4].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[4], true), 120, 23, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 5) && (mRecipe.mFluidOutputs[5] != null) && (mRecipe.mFluidOutputs[5].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[5], true), 138, 23, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 6) && (mRecipe.mFluidOutputs[6] != null) && (mRecipe.mFluidOutputs[6].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[6], true), 102, 41, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 7) && (mRecipe.mFluidOutputs[7] != null) && (mRecipe.mFluidOutputs[7].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[7], true), 120, 41, mRecipe.getOutputChance(tStartIndex++))); + } + if ((mRecipe.mFluidOutputs.length > 8) && (mRecipe.mFluidOutputs[8] != null) && (mRecipe.mFluidOutputs[8].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[8], true), 138, 41, mRecipe.getOutputChance(tStartIndex++))); + } + } + + } + + } +} diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java b/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java new file mode 100644 index 0000000000..c9f9f0722a --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java @@ -0,0 +1,372 @@ +package gtPlusPlus.nei; + +import java.awt.Rectangle; +import java.lang.ref.SoftReference; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.stream.Collectors; + +import org.lwjgl.opengl.GL11; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiCraftingRecipe; +import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.GuiUsageRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; +import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GasSpargingRecipe; +import gregtech.api.util.GasSpargingRecipeMap; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GT_NEI_LFTR_Sparging extends TemplateRecipeHandler { + + public static final String mNEIName = GasSpargingRecipeMap.mNEIDisplayName; + private SoftReference> mCachedRecipes = null; + + public GT_NEI_LFTR_Sparging() { + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0])); + if (!NEI_GT_Config.sIsAdded) { + FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); + GuiCraftingRecipe.craftinghandlers.add(this); + GuiUsageRecipe.usagehandlers.add(this); + } + } + + public String getRecipeName() { + return mNEIName; + } + + public String getGuiTexture() { + return GasSpargingRecipeMap.mNEIGUIPath; + } + + public String getOverlayIdentifier() { + return gregtech.api.util.GasSpargingRecipeMap.mUnlocalizedName; + } + + public int recipiesPerPage() { + return 1; + } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 68); + } + + public void loadTransferRects() { + this.transferRects.add(new RecipeTransferRect(new Rectangle(72, 14, 22, 16), getRecipeName(), new Object[0])); + } + + public List getCache() { + List cache; + if (mCachedRecipes == null || (cache = mCachedRecipes.get()) == null) { + cache = GasSpargingRecipeMap.mRecipes.stream() // do not use parallel stream. This is already parallelized by NEI + .sorted() + .map(temp -> {return createCachedRecipe(temp);}) + .collect(Collectors.toList()); + // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model + // so we do not need any synchronization here + mCachedRecipes = new SoftReference<>(cache); + } + return cache; + } + + public GasSpargingRecipeNEI createCachedRecipe(GasSpargingRecipe aRecipe) { + return new GasSpargingRecipeNEI(aRecipe); + } + + public void loadCraftingRecipes(String outputId, Object... results) { + if (outputId.equals(getOverlayIdentifier())) { + arecipes.addAll(getCache()); + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + public void loadCraftingRecipes(ItemStack aResult) { + ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); + + ArrayList tResults = new ArrayList<>(); + tResults.add(aResult); + tResults.add(GT_OreDictUnificator.get(true, aResult)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); + FluidStack tFluidStack; + if (tFluid != null) { + tFluidStack = tFluid; + tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + } + else tFluidStack = GT_Utility.getFluidFromDisplayStack(aResult); + if (tFluidStack != null) { + tResults.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); + } + for (GasSpargingRecipeNEI recipe : getCache()) { + if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) + arecipes.add(recipe); + } + } + + public void loadUsageRecipes(ItemStack aInput) { + ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); + + ArrayList tInputs = new ArrayList<>(); + tInputs.add(aInput); + tInputs.add(GT_OreDictUnificator.get(false, aInput)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); + FluidStack tFluidStack; + if (tFluid != null) { + tFluidStack = tFluid; + tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + } + else tFluidStack = GT_Utility.getFluidFromDisplayStack(aInput); + if (tFluidStack != null) { + tInputs.addAll(GT_Utility.getContainersFromFluid(tFluidStack)); + } + for (GasSpargingRecipeNEI recipe : getCache()) { + if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack))) + arecipes.add(recipe); + } + } + + public void drawExtras(int aRecipeIndex) { + final long tEUt = ((GasSpargingRecipeNEI) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + final long tDuration = ((GasSpargingRecipeNEI) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + GT_NEI_LFTR.drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); + GT_NEI_LFTR.drawText(10, 83, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216); + GT_NEI_LFTR.drawText(10, 93, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216); + GT_NEI_LFTR.drawText(10, 103, "Gas not used to sparge is", -16777216); + GT_NEI_LFTR.drawText(10, 113, "returned alongside outputs.", -16777216); + } + + @Override + public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { + final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); + if ((tObject instanceof GasSpargingRecipeNEI)) { + final GasSpargingRecipeNEI tRecipe = (GasSpargingRecipeNEI) tObject; + ItemStack aSpargeInput = tRecipe.mOutputs.get(0).item; + ItemStack aSpentFuel = tRecipe.mOutputs.get(1).item; + for (final PositionedStack tStack : tRecipe.mOutputs) { + if (aStack == tStack.item) { + if (ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) { + if (GT_Utility.areStacksEqual(aStack, aSpentFuel, true)) { + break; + } + if (GT_Utility.areStacksEqual(aStack, aSpargeInput, true)) { + currenttip.add("The amount returned is the remainder after all other outputs."); + } + currenttip.add("Maximum Output: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "L"); + break; + } + break; + } + } + for (final PositionedStack tStack : tRecipe.mInputs) { + if (GT_Utility.areStacksEqual(aStack, tStack.item)) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || + (tStack.item.stackSize != 0)) { + break; + } + if (ItemUtils.isControlCircuit(aStack)) { + currenttip.add("Does not get consumed in the process"); + } + break; + } + } + } + return currenttip; + } + + public class FixedPositionedStack + extends PositionedStack { + public final int mChance; + public boolean permutated = false; + + public FixedPositionedStack(final Object object, final int x, final int y) { + this(object, x, y, 0); + } + + public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) { + super(object, x, y, true); + this.mChance = aChance; + } + + @Override + public void generatePermutations() { + if (this.permutated) { + return; + } + final ArrayList tDisplayStacks = new ArrayList(); + for (final ItemStack tStack : this.items) { + if (GT_Utility.isStackValid(tStack)) { + if (tStack.getItemDamage() == 32767) { + final List permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); + if (!permutations.isEmpty()) { + ItemStack stack; + for (final Iterator i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { + stack = i$.next(); + } + } else { + final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize); + base.stackTagCompound = tStack.stackTagCompound; + tDisplayStacks.add(base); + } + } else { + tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); + } + } + } + this.items = (tDisplayStacks.toArray(new ItemStack[0])); + if (this.items.length == 0) { + this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; + } + this.permutated = true; + this.setPermutationToRender(0); + } + } + + public class GasSpargingRecipeNEI extends CachedRecipe implements Comparable { + + public final GasSpargingRecipe mRecipe; + public final List mOutputs = new ArrayList(); + public final List mInputs = new ArrayList(); + + public GasSpargingRecipeNEI(GasSpargingRecipe tRecipe) { + super(); + this.mRecipe = tRecipe; + int tStartIndex = 0; + if (tRecipe.mFluidInputs.length > 0) { + if ((tRecipe.mFluidInputs[0] != null) && (tRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[0], true), 30, 5)); + } + if ((tRecipe.mFluidInputs.length > 1) && (tRecipe.mFluidInputs[1] != null) && (tRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[1], true), 12, 5)); + } + if ((tRecipe.mFluidInputs.length > 2) && (tRecipe.mFluidInputs[2] != null) && (tRecipe.mFluidInputs[2].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[2], true), 48, 5)); + } + if ((tRecipe.mFluidInputs.length > 3) && (tRecipe.mFluidInputs[3] != null) && (tRecipe.mFluidInputs[3].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[3], true), 12, 23)); + } + if ((tRecipe.mFluidInputs.length > 4) && (tRecipe.mFluidInputs[4] != null) && (tRecipe.mFluidInputs[4].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[4], true), 30, 23)); + } + if ((tRecipe.mFluidInputs.length > 5) && (tRecipe.mFluidInputs[5] != null) && (tRecipe.mFluidInputs[5].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[5], true), 48, 23)); + } + if ((tRecipe.mFluidInputs.length > 6) && (tRecipe.mFluidInputs[6] != null) && (tRecipe.mFluidInputs[6].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[6], true), 12, 41)); + } + if ((tRecipe.mFluidInputs.length > 7) && (tRecipe.mFluidInputs[7] != null) && (tRecipe.mFluidInputs[7].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[7], true), 30, 41)); + } + if ((tRecipe.mFluidInputs.length > 8) && (tRecipe.mFluidInputs[8] != null) && (tRecipe.mFluidInputs[8].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[8], true), 48, 41)); + } + } + + tStartIndex = 0; + if (tRecipe.mFluidOutputs.length > 0) { + if ((tRecipe.mFluidOutputs[0] != null) && (tRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[0], false), 120, 5, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 1) && (tRecipe.mFluidOutputs[1] != null) && (tRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[1], true), 102, 5, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 2) && (tRecipe.mFluidOutputs[2] != null) && (tRecipe.mFluidOutputs[2].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[2], false), 138, 5, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 3) && (tRecipe.mFluidOutputs[3] != null) && (tRecipe.mFluidOutputs[3].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[3], false), 102, 23, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 4) && (tRecipe.mFluidOutputs[4] != null) && (tRecipe.mFluidOutputs[4].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[4], false), 120, 23, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 5) && (tRecipe.mFluidOutputs[5] != null) && (tRecipe.mFluidOutputs[5].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[5], false), 138, 23, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 6) && (tRecipe.mFluidOutputs[6] != null) && (tRecipe.mFluidOutputs[6].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[6], false), 102, 41, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 7) && (tRecipe.mFluidOutputs[7] != null) && (tRecipe.mFluidOutputs[7].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[7], false), 120, 41, tRecipe.getMaxOutput(tStartIndex++))); + } + if ((tRecipe.mFluidOutputs.length > 8) && (tRecipe.mFluidOutputs[8] != null) && (tRecipe.mFluidOutputs[8].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[8], false), 138, 41, tRecipe.getMaxOutput(tStartIndex++))); + } + } + } + + @Override + public int compareTo(CachedRecipe o) { + boolean b = GasSpargingRecipeNEI.class.isInstance(o); + if (b) { + GasSpargingRecipeNEI p = (GasSpargingRecipeNEI) o; + if (p.mOutputs.size() > this.mOutputs.size()) { + return 1; + } else if (p.mOutputs.size() == this.mOutputs.size()) { + return 0; + } else { + return -1; + } + } + return 0; + } + + @Override + public boolean equals(Object obj) { + if (obj != null) { + if (GasSpargingRecipeNEI.class.isInstance(obj)) { + GasSpargingRecipeNEI p = (GasSpargingRecipeNEI) obj; + if (p != null) { + if (GT_Utility.areStacksEqual(p.mInputs.get(0).item, this.mInputs.get(0).item, true)) { + if (p.mOutputs.size() == this.mOutputs.size()) { + return true; + } + } + } + } + } + return false; + } + + @Override + public List getIngredients() { + return this.getCycledIngredients(GT_NEI_LFTR_Sparging.this.cycleticks / 10, this.mInputs); + } + + @Override + public PositionedStack getResult() { + return null; + } + + @Override + public List getOtherStacks() { + return this.mOutputs; + } + + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_MillingMachine.java b/src/main/java/gtPlusPlus/nei/GT_NEI_MillingMachine.java new file mode 100644 index 0000000000..5d09b9003f --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/GT_NEI_MillingMachine.java @@ -0,0 +1,136 @@ +package gtPlusPlus.nei; + +import java.util.List; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; + +public class GT_NEI_MillingMachine extends GTPP_NEI_DefaultHandler { + + public GT_NEI_MillingMachine() { + super(GTPP_Recipe_Map.sOreMillRecipes); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GT_NEI_MillingMachine(); + } + + @Override + public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { + return new MillingDefaultRecipe(aRecipe); + } + + @Override + public List handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List currenttip, final int aRecipeIndex) { + final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); + if ((tObject instanceof CachedDefaultRecipe)) { + final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; + for (final PositionedStack tStack : tRecipe.mOutputs) { + if (aStack == tStack.item) { + if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + break; + } + currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + break; + } + } + for (final PositionedStack tStack : tRecipe.mInputs) { + if (GT_Utility.areStacksEqual(aStack, tStack.item)) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || + (tStack.item.stackSize != 0)) { + break; + } + if (ItemUtils.isMillingBall(aStack)) { + currenttip.add("Does not always get consumed in the process"); + } + else if (ItemUtils.isControlCircuit(aStack)) { + currenttip.add("Does not get consumed in the process"); + } + break; + } + } + } + return currenttip; + } + + public class MillingDefaultRecipe extends CachedDefaultRecipe { + + public MillingDefaultRecipe(final GT_Recipe aRecipe) { + super(aRecipe); + } + + @Override + public void handleSlots() { + int tStartIndex = 0; + + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (mRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + + if (mRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); + } + tStartIndex = 0; + + //Four Output Slots + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (mRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + + + //New fluid display behaviour when 3 fluid inputs are detected. (Basically a mix of the code below for outputs an the code above for 9 input slots.) + if (mRecipe.mFluidInputs.length >= 1) { + if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 3, 31)); + } + if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 21, 31)); + } + if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 39, 31)); + } + if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 57, 31)); + } + } + + if (mRecipe.mFluidOutputs.length > 0) { + if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 138, 5)); + } + if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 23)); + } + } + } + } +} diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java b/src/main/java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java new file mode 100644 index 0000000000..f4f69589b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java @@ -0,0 +1,58 @@ +package gtPlusPlus.nei; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import org.lwjgl.opengl.GL11; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.recipe.TemplateRecipeHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.math.MathUtils; + +public class GT_NEI_MultiNoCell extends GTPP_NEI_DefaultHandler { + + public GT_NEI_MultiNoCell(GT_Recipe_Map aMap) { + super(aMap); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GT_NEI_MultiNoCell(mRecipeMap); + } + + @Override + public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { + return new NoCellMultiDefaultRecipe(aRecipe); + } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 89); + } + + @Override + public String getGuiTexture() { + return RES_PATH_GUI + "basicmachines/FissionFuel.png"; + } + + @Override + public void drawExtras(final int aRecipeIndex) { + final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + if (tEUt != 0) { + drawText(10, 90, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216); + drawText(10, 100, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216); + } + if (tDuration > 0) { + drawText(10, 110, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); + } + if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText(10, 120, this.mRecipeMap.mNEISpecialValuePre + MathUtils.formatNumbers((((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier)) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + } + } + +} diff --git a/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java b/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java new file mode 100644 index 0000000000..0b3cf8e66e --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java @@ -0,0 +1,100 @@ +package gtPlusPlus.nei; + +import codechicken.nei.api.API; +import codechicken.nei.api.IConfigureNEI; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map_Internal; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class NEI_GT_Config +implements IConfigureNEI { + + public static boolean sIsAdded = false; + + private static final AutoMap mUniqueRecipeMapHandling = new AutoMap(); + + @Override + public synchronized void loadConfig() { + + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sFissionFuelProcessing.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sChemicalPlantRecipes.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sOreMillRecipes.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sFlotationCellRecipes.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sVacuumFurnaceRecipes.mUnlocalizedName); + + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mUnlocalizedName); + + // Standard GT Recipe Maps + Logger.INFO("NEI Registration: "+GTPP_Recipe_Map_Internal.sMappingsEx.size()+" sMappingEx"); + for (final GT_Recipe_Map tMap : GTPP_Recipe_Map_Internal.sMappingsEx) { + if (tMap.mNEIAllowed) { + if (!mUniqueRecipeMapHandling.contains(tMap.mUnlocalizedName)) { + Logger.INFO("NEI Registration: Registering NEI handler for "+tMap.mNEIName); + new GTPP_NEI_DefaultHandler(tMap); + } + else { + Logger.INFO("NEI Registration: Not allowed to register NEI handler for "+tMap.mNEIName); + } + } + else { + Logger.INFO("NEI Registration: Skipping registration of NEI handler for "+tMap.mNEIName); + } + } + + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sChemicalPlantRecipes.mNEIName); + new GT_NEI_FluidReactor(); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sOreMillRecipes.mNEIName); + new GT_NEI_MillingMachine(); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sFlotationCellRecipes.mNEIName); + new GT_NEI_FlotationCell(); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mNEIName); + new GT_NEI_LFTR(); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sFissionFuelProcessing.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sFissionFuelProcessing); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sVacuumFurnaceRecipes.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sVacuumFurnaceRecipes); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sAdvFreezerRecipes_GT); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sAlloyBlastSmelterRecipes); + + Logger.INFO("NEI Registration: Registering NEI handler for "+DecayableRecipeHandler.mNEIName); + API.registerRecipeHandler(new DecayableRecipeHandler()); + API.registerUsageHandler(new DecayableRecipeHandler()); + + Logger.INFO("NEI Registration: Registering NEI handler for "+GT_NEI_LFTR_Sparging.mNEIName); + new GT_NEI_LFTR_Sparging(); + + // Hide Flasks + if (Utils.isClient()) { + codechicken.nei.api.API.addItemListEntry(GregtechItemList.VOLUMETRIC_FLASK_8k.get(1)); + codechicken.nei.api.API.addItemListEntry(GregtechItemList.VOLUMETRIC_FLASK_32k.get(1)); + } + sIsAdded = true; + } + + @Override + public String getName() { + return "GT++ NEI Plugin"; + } + + @Override + public String getVersion() { + return "(1.12)"; + } +} diff --git a/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java b/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java new file mode 100644 index 0000000000..7bc2316a04 --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java @@ -0,0 +1,51 @@ +package gtPlusPlus.nei; + +import cpw.mods.fml.common.event.FMLInterModComms; +import net.minecraft.nbt.NBTTagCompound; + +public class NEI_IMC_Sender { + public static void IMCSender() { + setNBTInfoAndSendIt("gtpp.recipe.alloyblastsmelter", "gregtech:gt.blockmachines:810", 1); + setNBTInfoAndSendIt("gtpp.recipe.rocketenginefuel", "gregtech:gt.blockmachines:793"); + setNBTInfoAndSendIt("gtpp.recipe.cyclotron", "gregtech:gt.blockmachines:828"); + setNBTInfoAndSendIt("gtpp.recipe.chemicaldehydrator", "gregtech:gt.blockmachines:911", 1); + setNBTInfoAndSendIt("gtpp.recipe.slowfusionreactor", "gregtech:gt.blockmachines:31015"); + setNBTInfoAndSendIt("gtpp.recipe.RTGgenerators", "gregtech:gt.blockmachines:869"); + setNBTInfoAndSendIt("gtpp.recipe.cokeoven", "gregtech:gt.blockmachines:791"); + setNBTInfoAndSendIt("gtpp.recipe.semifluidgeneratorfuels", "gregtech:gt.blockmachines:837"); + setNBTInfoAndSendIt("gtpp.recipe.fishpond", "gregtech:gt.blockmachines:829", 1); + setNBTInfoAndSendIt("gtpp.recipe.multimixer", "gregtech:gt.blockmachines:811"); + setNBTInfoAndSendIt("gtpp.recipe.advanced.mixer", "gregtech:gt.blockmachines:811"); + setNBTInfoAndSendIt("gtpp.recipe.cryogenicfreezer", "gregtech:gt.blockmachines:910"); + setNBTInfoAndSendIt("gtpp.recipe.geothermalfuel", "gregtech:gt.blockmachines:830"); + setNBTInfoAndSendIt("gtpp.recipe.matterfab2", "gregtech:gt.blockmachines:799"); + setNBTInfoAndSendIt("gtpp.recipe.multicentrifuge", "gregtech:gt.blockmachines:790", 1); + setNBTInfoAndSendIt("gtpp.recipe.multielectro", "gregtech:gt.blockmachines:796", 1); + setNBTInfoAndSendIt("gtpp.recipe.simplewasher", "gregtech:gt.blockmachines:767"); + setNBTInfoAndSendIt("gtpp.recipe.vacfurnace", "gregtech:gt.blockmachines:995", 1); + setNBTInfoAndSendIt("gtpp.recipe.fissionfuel", "gregtech:gt.blockmachines:835", 1); + setNBTInfoAndSendIt("gtpp.recipe.lftr", "gregtech:gt.blockmachines:751", 1); + setNBTInfoAndSendIt("gtpp.recipe.lftr.sparging", "gregtech:gt.blockmachines:31035", 1); + setNBTInfoAndSendIt("gtpp.recipe.coldtrap", "gregtech:gt.blockmachines:31034"); + setNBTInfoAndSendIt("gtpp.recipe.reactorprocessingunit", "gregtech:gt.blockmachines:31032"); + } + + + private static void setNBTInfoAndSendIt(String aRecipeName, String aBlock) { + setNBTInfoAndSendIt(aRecipeName, aBlock, 2); + } + + private static void setNBTInfoAndSendIt(String aRecipeName, String aBlock, int aRecipesPerPage) { + NBTTagCompound aNBT = new NBTTagCompound(); + aNBT.setString("handler", aRecipeName); + aNBT.setString("modName", "GT++"); + aNBT.setString("modId", "miscutils"); + aNBT.setBoolean("modRequired", true); + aNBT.setString("itemName", aBlock); + aNBT.setInteger("yShift", 6); + aNBT.setInteger("handlerHeight", 135); + aNBT.setInteger("handlerWidth", 166); + aNBT.setInteger("maxRecipesPerPage", aRecipesPerPage); + FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT); + } +} diff --git a/src/main/java/gtPlusPlus/nei/handlers/NeiTextureHandler.java b/src/main/java/gtPlusPlus/nei/handlers/NeiTextureHandler.java new file mode 100644 index 0000000000..30c159ca93 --- /dev/null +++ b/src/main/java/gtPlusPlus/nei/handlers/NeiTextureHandler.java @@ -0,0 +1,164 @@ +package gtPlusPlus.nei.handlers; + +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + + +/** + * Based on crazypants.enderio.gui.IconEIO + * + * @author Original EIO Author + * + * This is free and unencumbered software released into the public + * domain. + * + * Anyone is free to copy, modify, publish, use, compile, sell, or + * distribute this software, either in source code form or as a compiled + * binary, for any purpose, commercial or non-commercial, and by any + * means. + * + * In jurisdictions that recognize copyright laws, the author or authors + * of this software dedicate any and all copyright interest in the + * software to the public domain. We make this dedication for the + * benefit of the public at large and to the detriment of our heirs and + * successors. We intend this dedication to be an overt act of + * relinquishment in perpetuity of all present and future rights to this + * software under copyright law. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * For more information, please refer to + * + * https://github.com/SleepyTrousers/EnderIO/blob/release/1.7.10/2.2/src/main/java/crazypants/render/RenderUtil.java + * + */ +public final class NeiTextureHandler { + + public static final NeiTextureHandler RECIPE = new NeiTextureHandler(16, 132, 16, 16); + public static final NeiTextureHandler RECIPE_BUTTON = new NeiTextureHandler(128, 116, 24, 24); + + public final double minU; + public final double maxU; + public final double minV; + public final double maxV; + public final double width; + public final double height; + + public static final ResourceLocation TEXTURE = new ResourceLocation(CORE.MODID + ":textures/gui/nei/widgets.png"); + + public NeiTextureHandler(int x, int y) { + this(x, y, 16, 16); + } + + public NeiTextureHandler(int x, int y, int width, int height) { + this((double) width, (double) height, (double) ((float) (0.00390625D * (double) x)), + (double) ((float) (0.00390625D * (double) (x + width))), (double) ((float) (0.00390625D * (double) y)), + (double) ((float) (0.00390625D * (double) (y + height)))); + } + + public NeiTextureHandler(double width, double height, double minU, double maxU, double minV, double maxV) { + this.width = width; + this.height = height; + this.minU = minU; + this.maxU = maxU; + this.minV = minV; + this.maxV = maxV; + } + + public void renderIcon(double x, double y) { + this.renderIcon(x, y, this.width, this.height, 0.0D, false); + } + + public void renderIcon(double x, double y, boolean doDraw) { + this.renderIcon(x, y, this.width, this.height, 0.0D, doDraw); + } + + public void renderIcon(double x, double y, double width, double height, double zLevel, boolean doDraw) { + this.renderIcon(x, y, width, height, zLevel, doDraw, false); + } + + public void renderIcon(double x, double y, double width, double height, double zLevel, boolean doDraw, + boolean flipY) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Tessellator tessellator = Tessellator.instance; + if (doDraw) { + bindTexture(TEXTURE); + tessellator.startDrawingQuads(); + } + + if (flipY) { + tessellator.addVertexWithUV(x, y + height, zLevel, this.minU, this.minV); + tessellator.addVertexWithUV(x + width, y + height, zLevel, this.maxU, this.minV); + tessellator.addVertexWithUV(x + width, y + 0.0D, zLevel, this.maxU, this.maxV); + tessellator.addVertexWithUV(x, y + 0.0D, zLevel, this.minU, this.maxV); + } else { + tessellator.addVertexWithUV(x, y + height, zLevel, this.minU, this.maxV); + tessellator.addVertexWithUV(x + width, y + height, zLevel, this.maxU, this.maxV); + tessellator.addVertexWithUV(x + width, y + 0.0D, zLevel, this.maxU, this.minV); + tessellator.addVertexWithUV(x, y + 0.0D, zLevel, this.minU, this.minV); + } + + if (doDraw) { + tessellator.draw(); + } + + } + + public static final ResourceLocation BLOCK_TEX; + public static final ResourceLocation ITEM_TEX; + public static final ResourceLocation GLINT_TEX; + public static int BRIGHTNESS_MAX; + + static { + BLOCK_TEX = TextureMap.locationBlocksTexture; + ITEM_TEX = TextureMap.locationItemsTexture; + GLINT_TEX = new ResourceLocation("textures/misc/enchanted_item_glint.png"); + BRIGHTNESS_MAX = 15728880; + } + + public static TextureManager engine() { + return Minecraft.getMinecraft().renderEngine; + } + + public static void bindItemTexture(ItemStack stack) { + engine().bindTexture(stack.getItemSpriteNumber() == 0 ? BLOCK_TEX : ITEM_TEX); + } + + public static void bindItemTexture() { + engine().bindTexture(ITEM_TEX); + } + + public static void bindBlockTexture() { + engine().bindTexture(BLOCK_TEX); + } + + public static void bindGlintTexture() { + engine().bindTexture(BLOCK_TEX); + } + + public static void bindTexture(String string) { + engine().bindTexture(new ResourceLocation(string)); + } + + public static void bindTexture(ResourceLocation tex) { + engine().bindTexture(tex); + } + + public static FontRenderer fontRenderer() { + return Minecraft.getMinecraft().fontRenderer; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java new file mode 100644 index 0000000000..c6e98581ff --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java @@ -0,0 +1,60 @@ +package gtPlusPlus.plugin.agrichem; + +public enum AlgaeDefinition { + + /* + * In general, the productivity of freshwater algae is primarily limited by + * the availability of the nutrient phosphate (PO4-3), while that of + * marine algae is limited by nitrate (NO3-) or ammonium (NH4+). + * Some algal species, however, may have unusual nutrient requirements, + * and their productivity may be limited by certain micronutrients, + * such as silica, in the case of diatoms. + */ + + Euglenophyta("Euglenophyta", "Euglenoids", true, false, getRGB(147, 168, 50)), + Chrysophyta("Chrysophyta", "Golden-Brown Algae", true, true, getRGB(186, 146, 0)), + Pyrrophyta("Pyrrophyta", "Fire Algae", true, true, getRGB(250, 118, 2)), + Chlorophyta("Chlorophyta", "Green Algae", true, true, getRGB(99, 181, 62)), + Rhodophyta("Rhodophyta", "Red Algae", false, true, getRGB(153, 5, 22)), + Paeophyta("Paeophyta", "Brown Algae", false, true, getRGB(94, 78, 47)), + Xanthophyta("Xanthophyta", "Yellow-Green Algae", true, false, getRGB(118, 138, 16)); + + public final String mScientificName; + public final String mSimpleName; + public final boolean mSaltWater; + public final boolean mFreshWater; + public final int mColour; + + AlgaeDefinition(String aScientificName, String aSimpleName, boolean aFresh, boolean aSalt, int aColour) { + mScientificName = aScientificName; + mSimpleName = aSimpleName; + mFreshWater = aFresh; + mSaltWater = aSalt; + mColour = aColour; + } + + public static AlgaeDefinition getByIndex(int aIndex) { + switch(aIndex) { + default: + case 0: + return Euglenophyta; + case 1: + return Chrysophyta; + case 2: + return Pyrrophyta; + case 3: + return Chlorophyta; + case 4: + return Rhodophyta; + case 5: + return Paeophyta; + case 6: + return Xanthophyta; + } + } + + private final static int getRGB(int r, int g, int b) { + return AlgaeUtils.rgbtoHexValue(r, g, b); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java new file mode 100644 index 0000000000..73ff23888c --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeUtils.java @@ -0,0 +1,11 @@ +package gtPlusPlus.plugin.agrichem; + +import gtPlusPlus.core.util.Utils; + +public class AlgaeUtils { + + public static int rgbtoHexValue(final int r, final int g, final int b) { + return Utils.rgbtoHexValue(r, g, b); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java new file mode 100644 index 0000000000..edfd42b5ca --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java @@ -0,0 +1,1425 @@ +package gtPlusPlus.plugin.agrichem; + +import static gtPlusPlus.core.lib.CORE.GTNH; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.OreDictUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.plugin.agrichem.block.AgrichemFluids; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.railcraft.utils.RailcraftUtils; +import ic2.core.Ic2Items; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class BioRecipes { + + private static Item mFert; + private static Item mDustDirt; + + private static Fluid mSalineWater; + private static Fluid mDistilledWater; + private static Fluid mThermalWater; + private static Fluid mAir; + private static Fluid mSulfuricWasteWater; + private static Fluid mAmmonia; + private static Fluid mMethanol; + private static Fluid mAceticAcid; + private static Fluid mPropionicAcid; + private static Fluid mLiquidPlastic; + private static Fluid mFermentationBase; + private static Fluid mCarbonDioxide; + private static Fluid mCarbonMonoxide; + private static Fluid mEthylene; + public static Fluid mEthanol; + private static Fluid mChlorine; + private static Fluid mHydrogen; + private static Fluid mDilutedSulfuricAcid; + private static Fluid mSulfuricAcid; + private static Fluid mUrea; + private static Fluid mFormaldehyde; + private static Fluid mLiquidResin; + private static Fluid mMethane; + private static Fluid mBenzene; + private static Fluid mEthylbenzene; + private static Fluid mStyrene; + private static Fluid mButanol; + private static Fluid mAcetone; + + + private static final ItemStack getGreenAlgaeRecipeChip() { + return getBioChip(4); + } + private static final ItemStack getBrownAlgaeRecipeChip() { + return getBioChip(8); + } + private static final ItemStack getGoldenBrownAlgaeRecipeChip() { + return getBioChip(12); + } + private static final ItemStack getRedAlgaeRecipeChip() { + return getBioChip(16); + } + + private static final ItemStack getBioChip(int aID) { + return ItemUtils.simpleMetaStack(AgriculturalChem.mBioCircuit, aID, 0); + } + + public static void init() { + Logger.INFO("[Bio] Setting Variables"); + initRecipeVars(); + Logger.INFO("[Bio] Generating Biochip Recipes"); + recipeBioChip(); + Logger.INFO("[Bio] Generating Recipes"); + recipeAlgaeBiomass(); + Logger.INFO("[Bio] Finished with recipes"); + } + + private static final void initRecipeVars() { + mFert = AgriculturalChem.dustOrganicFertilizer; + mDustDirt = AgriculturalChem.dustDirt; + + // 5.08 Salt Water Solution ;) + if (!FluidUtils.doesFluidExist("saltwater")){ + mSalineWater = FluidUtils.generateFluidNoPrefix("saltwater", "Salt Water", 200, new short[]{10, 30, 220, 100}); + } + else { + Materials aSaltWater = MaterialUtils.getMaterial("saltwater"); + if (aSaltWater != null) { + FluidStack aWaterStack = aSaltWater.getFluid(1); + if (aWaterStack != null) { + mSalineWater = aSaltWater.getFluid(1).getFluid(); + } + } + if (mSalineWater == null) { + mSalineWater = FluidUtils.getWildcardFluidStack("saltwater", 1).getFluid(); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellSaltWater", 1) == null){ + new BaseItemComponent("saltwater", "Salt Water", new short[] {10, 30, 220}); + } + } + + mDistilledWater = FluidUtils.getDistilledWater(1).getFluid(); + mThermalWater = FluidUtils.getFluidStack("ic2hotwater", 1).getFluid(); + mAir = FluidUtils.getFluidStack("air", 1).getFluid(); + mSulfuricWasteWater = FluidUtils.getFluidStack("sulfuricapatite", 1).getFluid(); + mAmmonia = MISC_MATERIALS.AMMONIA.getFluidStack(1).getFluid(); + mEthylene = FluidUtils.getFluidStack("ethylene", 1).getFluid(); + mEthanol = FluidUtils.getFluidStack("bioethanol", 1).getFluid(); + mDilutedSulfuricAcid = FluidUtils.getFluidStack("dilutedsulfuricacid", 1).getFluid(); + mSulfuricAcid = FluidUtils.getFluidStack("sulfuricacid", 1).getFluid(); + mFormaldehyde = FluidUtils.getFluidStack("fluid.formaldehyde", 1).getFluid(); + mMethane = FluidUtils.getFluidStack("methane", 1).getFluid(); + mBenzene = FluidUtils.getFluidStack("benzene", 1).getFluid(); + mEthylbenzene = FluidUtils.getFluidStack("fluid.ethylbenzene", 1).getFluid(); + mStyrene = FluidUtils.getFluidStack("styrene", 1).getFluid(); + mMethanol = FluidUtils.getFluidStack("methanol", 1).getFluid(); + mLiquidPlastic = FluidUtils.getWildcardFluidStack("plastic", 1).getFluid(); + mCarbonDioxide = MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(1).getFluid(); + mCarbonMonoxide = MISC_MATERIALS.CARBON_MONOXIDE.getFluidStack(1).getFluid(); + mChlorine = FluidUtils.getFluidStack("chlorine", 1).getFluid(); + mHydrogen = FluidUtils.getFluidStack("hydrogen", 1).getFluid(); + mAceticAcid = AgrichemFluids.mAceticAcid; + mPropionicAcid = AgrichemFluids.mPropionicAcid; + mUrea = AgrichemFluids.mUrea; + mLiquidResin = AgrichemFluids.mLiquidResin; + mFermentationBase = AgrichemFluids.mFermentationBase; + mButanol = AgrichemFluids.mButanol; + mAcetone = AgrichemFluids.mAcetone; + } + + private static void recipeAlgaeBiomass() { + + // TODO + // Add in recipes to get initial Biomass + + recipeGreenAlgae(); + recipeBrownAlgae(); + recipeGoldenBrownAlgae(); + recipeRedAlgae(); + recipeWoodPellets(); + recipeWoodBricks(); + recipeCellulosePulp(); + recipeCatalystCarrier(); + recipeAluminiumSilverCatalyst(); + recipeAceticAcid(); + recipePropionicAcid(); + recipeFermentationBase(); + recipeEthanol(); + recipeCelluloseFibre(); + recipeGoldenBrownCelluloseFiber(); + recipeRedCelluloseFiber(); + recipeSodiumHydroxide(); + recipeSodiumCarbonate(); + recipePelletMold(); + recipeAluminiumPellet(); + recipeAlumina(); + recipeAluminium(); + recipeCalciumCarbonate(); + recipeLithiumChloride(); + recipeAlginicAcid(); + recipeSulfuricAcid(); + recipeUrea(); + recipeRawBioResin(); + recipeLiquidResin(); + recipeCompost(); + recipeMethane(); + recipeBenzene(); + recipeStyrene(); + registerFuels(); + } + + private static void registerFuels() { + + // Burnables + ItemUtils.registerFuel(ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), 800); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 1), 4800); + + // Gas Fuels + //GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalGas", 1), null, 96, 1); + + //Combustion Fuels + GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellButanol", 1), null, 1125, 0); + + } + private static void recipeGreenAlgae() { + // Compost + GT_ModHandler.addPulverisationRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 10), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); + + // Turn into Cellulose + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getGreenAlgaeRecipeChip(), + ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 30) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 5), + 30 * 30, + 16); + + + } + + private static void recipeBrownAlgae() { + // Compost + GT_ModHandler.addPulverisationRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 10), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); + + // Alginic acid + CORE.RA.addExtractorRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 10), + ItemUtils.getSimpleStack(AgriculturalChem.mAlginicAcid, 1), + 20 * 15, + 30); + + // Lithium Chloride + GT_Values.RA.addBlastRecipe( + getBrownAlgaeRecipeChip(), + ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 20), + GT_Values.NF, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mLithiumChloride, 1), + GT_Values.NI, + 120, + 120, + 1200); + + // Sodium Carbonate + CORE.RA.addChemicalRecipe( + getBrownAlgaeRecipeChip(), + ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 20), + FluidUtils.getDistilledWater(2000), + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), + 20 * 30, + 30); + + } + + private static void recipeGoldenBrownAlgae() { + // Compost + GT_ModHandler.addPulverisationRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 10), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); + + // Turn into Cellulose + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getGoldenBrownAlgaeRecipeChip(), + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, 30) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 5), + 30 * 30, + 120); + + } + + private static void recipeRedAlgae() { + // Compost + GT_ModHandler.addPulverisationRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 10), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); + + // Turn into Cellulose + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getRedAlgaeRecipeChip(), + ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 30) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 5), + 30 * 30, + 240); + + } + + private static void recipeCelluloseFibre() { + + CORE.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 20), + ItemUtils.getSimpleStack(AgriculturalChem.mAlginicAcid, 2), + GT_Values.NF, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 10), + 45 * 20, + 16); + + // Craft into Wood Pellets + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(2), + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 12) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 2), + 20 * 4, + 8); + + // Methanol Extraction + GT_Values.RA.addFluidExtractionRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 12), + GT_Values.NI, + FluidUtils.getFluidStack(mMethanol, 50), + 10000, + 20 * 30, + 30); + + // Compost + GT_ModHandler.addPulverisationRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 5), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1)); + + // Plastic + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(16), + ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 64), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mAceticAcid, 500), + FluidUtils.getFluidStack(BioRecipes.mPropionicAcid, 500), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mLiquidPlastic, (144)), + }, + 120 * 20, + 240, + 2); + + + } + + private static void recipeWoodPellets() { + // Shapeless Recipe + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1) + }, ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 2)); + + // Extruder Recipe + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 12), + ItemUtils.getSimpleStack(AgriculturalChem.mPelletMold, 0), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 3), + 20 * 10, + 16); + + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(2), + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 8) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 2), + 20 * 5, + 8); + + // CO2 + CORE.RA.addFluidExtractionRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 1), + FluidUtils.getFluidStack(mCarbonDioxide, 70), + 10*20, + 30); + + + // Add Charcoal Recipe + if (LoadedMods.Railcraft) { + RailcraftUtils.addCokeOvenRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 2), + true, + true, + ItemUtils.getItemStackOfAmountFromOreDict("gemCharcoal", 3), + GT_Values.NF, + 1200); + } + CORE.RA.addCokeOvenRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mWoodPellet, 2), + getBioChip(3), + null, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("gemCharcoal", 3), + 120, + 16); + + + } + + private static void recipeWoodBricks() { + + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(3), + ItemUtils.getOrePrefixStack(OrePrefixes.dust, Materials.Wood, 50) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mWoodBrick, 1), + 100 * 20, + 16); + } + + private static void recipeCellulosePulp() { + + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(2), + ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 4) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(Items.paper, 1), + 60 * 20, + 16); + } + + private static void recipeCatalystCarrier() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(20), + ItemUtils.getItemStackOfAmountFromOreDict("plateSteel", GTNH ? 8 : 4), + ItemUtils.getItemStackOfAmountFromOreDict("wireFineCopper", GTNH ? 4 : 2), + ItemUtils.getItemStackOfAmountFromOreDict("screwTin", GTNH ? 6 : 3) + }, + GT_Values.NF, + CI.getEmptyCatalyst(1), + 300 * 20, + 16); + } + + private static void recipeAluminiumSilverCatalyst() { + // Assembly Recipe + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(4), + CI.getEmptyCatalyst(10), + ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4), + ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 4) + }, + GT_Values.NF, + CI.getGreenCatalyst(10), + 20 * 20, + 30); + } + + private static void recipeAceticAcid() { + + /* GT_Values.RA.addMixerRecipe( + CI.getGreenCatalyst(10), + var2, + var3, var4, + var5, // Fluid in + var6, // Fluid out + var7, // Item Out + var8, // Time + var9); // Eu + */ + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getGreenCatalyst(0) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mMethanol, 700), + FluidUtils.getFluidStack(BioRecipes.mCarbonMonoxide, 300), + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), + }, + new ItemStack[] { + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mAceticAcid, 250), + }, + 120 * 20, + 60, + 1); + + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(14), + CI.emptyCells(1) + }, + FluidUtils.getFluidStack(mFermentationBase, 4000), + null, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellAceticAcid", 1) + }, + new int[] {10000, 10000}, + 60 * 20, + 16); + + + } + + + + public final static HashSet mFruits = new HashSet(); + public final static HashSet mVege = new HashSet(); + public final static HashSet mNuts = new HashSet(); + public final static HashSet mSeeds = new HashSet(); + + public final static AutoMap mList_Master_FruitVege = new AutoMap(); + public final static AutoMap mList_Master_Seeds = new AutoMap(); + + private static void processFermentationOreDict() { + processOreDictEntry("listAllfruit", mFruits); + processOreDictEntry("listAllFruit", mFruits); + processOreDictEntry("listAllveggie", mVege); + processOreDictEntry("listAllVeggie", mVege); + processOreDictEntry("listAllnut", mNuts); + processOreDictEntry("listAllNut", mNuts); + processOreDictEntry("listAllseed", mSeeds); + processOreDictEntry("listAllSeed", mSeeds); + + if (!mFruits.isEmpty()) { + for (GT_ItemStack g : mFruits) { + mList_Master_FruitVege.put(g.toStack()); + } + } + if (!mVege.isEmpty()) { + for (GT_ItemStack g : mVege) { + mList_Master_FruitVege.put(g.toStack()); + } + } + if (!mNuts.isEmpty()) { + for (GT_ItemStack g : mNuts) { + mList_Master_FruitVege.put(g.toStack()); + } + } + if (!mSeeds.isEmpty()) { + for (GT_ItemStack g : mSeeds) { + mList_Master_Seeds.put(g.toStack()); + } + } + } + + // Make Fermentation + private static void processOreDictEntry(String aOreName, HashSet mfruits2) { + ArrayList aTemp = OreDictionary.getOres(aOreName); + if (!aTemp.isEmpty()) { + for (ItemStack stack : aTemp) { + mfruits2.add(new GT_ItemStack(stack)); + } + } + } + + + private static void recipeFermentationBase() { + processFermentationOreDict(); + AutoMap aFruitVege = mList_Master_FruitVege; + AutoMap aSeeds = mList_Master_Seeds; + ArrayList aMap = OreDictionary.getOres("cropSugarbeet"); + for (ItemStack a : aFruitVege) { + if (aMap.contains(a)) { + continue; + } + if (ItemUtils.checkForInvalidItems(a)) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(2), + ItemUtils.getSimpleStack(a, 10) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 200), + }, + 60 * 20, + 2, + 0); + } + + } + for (ItemStack a : aSeeds) { + if (ItemUtils.checkForInvalidItems(a)) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(3), + ItemUtils.getSimpleStack(a, 20) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 50), + }, + 60 * 20, + 2, + 0); + } + } + + // Sugar Cane + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(4), + ItemUtils.getSimpleStack(Items.reeds, 16) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 75), + }, + 90 * 20, + 30, + 0); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(5), + ItemUtils.getSimpleStack(Items.reeds, 32), + ItemUtils.getSimpleStack(ModItems.dustCalciumCarbonate, 4) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mThermalWater, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 150), + }, + 120 * 20, + 30, + 0); + + // Sugar Beet + if (OreDictUtils.containsValidEntries("cropSugarbeet")) { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(4), + ItemUtils.getItemStackOfAmountFromOreDict("cropSugarbeet", 8), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 75), + }, + 60 * 20, + 30, + 0); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(5), + ItemUtils.getItemStackOfAmountFromOreDict("cropSugarbeet", 16), + ItemUtils.getSimpleStack(ModItems.dustCalciumCarbonate, 4) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mThermalWater, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 150), + }, + 90 * 20, + 30, + 0); + } + + // Produce Acetone, Butanol and Ethanol + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(5), + ItemUtils.getItemStackOfAmountFromOreDict("cellFermentationBase", 48), + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 16), + ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 16), + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellButanol", 6), + ItemUtils.getItemStackOfAmountFromOreDict("cellAcetone", 3), + ItemUtils.getItemStackOfAmountFromOreDict("cellEthanol", 1), + CI.emptyCells(38) + }, + new FluidStack[] { + + }, + 450 * 20, + 32, + 1); + + + } + + private static void recipePropionicAcid() { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getGreenCatalyst(0) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthylene, 500), + FluidUtils.getFluidStack(BioRecipes.mCarbonMonoxide, 500), + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), + }, + new ItemStack[] { + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mPropionicAcid, 250), + }, + 20 * 20, + 60, + 1); + } + + private static void recipeEthanol() { + + CORE.RA.addDistilleryRecipe( + BioRecipes.getBioChip(2), + FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 1000), + FluidUtils.getFluidStack(BioRecipes.mEthanol, 100), + null, + 20 * 20, + 60, + false); + + } + + private static void recipeGoldenBrownCelluloseFiber() { + CORE.RA.addFluidExtractionRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 20), + FluidUtils.getFluidStack(BioRecipes.mAmmonia, 50), + 20 * 30, + 120); + } + + private static void recipeRedCelluloseFiber() { + CORE.RA.addExtractorRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 20), + ItemUtils.getSimpleStack(ModItems.dustCalciumCarbonate, 5), + 20 * 30, + 240); + } + + private static void recipeSodiumHydroxide() { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(4) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mSalineWater, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumHydroxide, 1) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mChlorine, 400), + FluidUtils.getFluidStack(BioRecipes.mHydrogen, 600), + }, + 300 * 20, + 120, + 1); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(5), + ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 5) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 5000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumHydroxide, 5) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mHydrogen, 5000), + }, + 60 * 20, + 60, + 1); + } + + private static void recipeSodiumCarbonate() { + + if (OreDictUtils.containsValidEntries("fuelCoke")) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(18), + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 3), + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 3), + ItemUtils.getSimpleStack(AgriculturalChem.mAluminiumPellet, 6) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumAluminate, 18) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mHydrogen, 200), + FluidUtils.getFluidStack(BioRecipes.mCarbonDioxide, 1600), + }, + 120 * 20, + 120, + 1); + + } + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(18), + ItemUtils.getItemStackOfAmountFromOreDict("dustCoal", 6), + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 4), + ItemUtils.getSimpleStack(AgriculturalChem.mAluminiumPellet, 6) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumAluminate, 16) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mHydrogen, 100), + FluidUtils.getFluidStack(BioRecipes.mCarbonDioxide, 1750), + }, + 180 * 20, + 120, + 1); + + } + + private static void recipePelletMold() { + GregtechItemList.Pellet_Mold.set(ItemUtils.getSimpleStack(AgriculturalChem.mPelletMold, 1)); + GT_Values.RA.addLatheRecipe( + ALLOY.TUMBAGA.getBlock(1), + GregtechItemList.Pellet_Mold.get(1), + null, + 20 * 30 * 15, + 90); + } + + private static void recipeAluminiumPellet() { + + // Ore Names, no prefix + AutoMap aOreNames = new AutoMap(); + + aOreNames.put("Lazurite"); + aOreNames.put("Bauxite"); + aOreNames.put("Grossular"); + aOreNames.put("Pyrope"); + aOreNames.put("Sodalite"); + aOreNames.put("Spodumene"); + aOreNames.put("Ruby"); + aOreNames.put("Sapphire"); + aOreNames.put("GreenSapphire"); + + // Voltage + HashMap aOreData1 = new HashMap(); + // Input Count + HashMap aOreData2 = new HashMap(); + // Output Count + HashMap aOreData3 = new HashMap(); + + aOreData1.put("Lazurite", 120); + aOreData1.put("Bauxite", 90); + aOreData1.put("Grossular", 90); + aOreData1.put("Pyrope", 90); + aOreData1.put("Sodalite", 90); + aOreData1.put("Spodumene", 90); + aOreData1.put("Ruby", 60); + aOreData1.put("Sapphire", 30); + aOreData1.put("GreenSapphire", 30); + aOreData2.put("Lazurite", 14); + aOreData2.put("Bauxite", 39); + aOreData2.put("Grossular", 20); + aOreData2.put("Pyrope", 20); + aOreData2.put("Sodalite", 11); + aOreData2.put("Spodumene", 10); + aOreData2.put("Ruby", 6); + aOreData2.put("Sapphire", 5); + aOreData2.put("GreenSapphire", 5); + aOreData3.put("Lazurite", 3); + aOreData3.put("Bauxite", 16); + aOreData3.put("Grossular", 2); + aOreData3.put("Pyrope", 2); + aOreData3.put("Sodalite", 3); + aOreData3.put("Spodumene", 1); + aOreData3.put("Ruby", 2); + aOreData3.put("Sapphire", 2); + aOreData3.put("GreenSapphire", 2); + + // Assemble all valid crushed ore types for making pellet mix + HashMap aOreCache = new HashMap(); + for (String aOreName : aOreNames) { + String aTemp = aOreName; + aOreName = "crushedPurified" + aOreName; + if (ItemUtils.doesOreDictHaveEntryFor(aOreName)) { + aOreCache.put(aTemp, ItemUtils.getItemStackOfAmountFromOreDict(aOreName, 1)); + } + } + + for (String aOreName : aOreNames) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(14), + ItemUtils.getSimpleStack(aOreCache.get(aOreName), aOreData2.get(aOreName)) + }, + new FluidStack[] { + FluidUtils.getSteam(2000 * aOreData2.get(aOreName)) + }, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mCleanAluminiumMix, (int) (Math.ceil(aOreData3.get(aOreName) * 1.4))) + }, + new FluidStack[] { + FluidUtils.getFluidStack(AgriculturalChem.RedMud, 100 * (int) (Math.ceil(aOreData3.get(aOreName) * 1.4))) + }, + 20 * 60, + aOreData1.get(aOreName), + aOreName.equals("Bauxite") ? 2 : 1); + } + + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mCleanAluminiumMix, 3), + ItemUtils.getSimpleStack(AgriculturalChem.mPelletMold, 0), + ItemUtils.getSimpleStack(AgriculturalChem.mAluminiumPellet, 4), + 20 * 30, + 64); + + + } + + private static void recipeAlumina() { + GT_Values.RA.addBlastRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumAluminate, 24), + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumHydroxide, 3), + FluidUtils.getFluidStack(mCarbonDioxide, 6000), + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mAlumina, 24), + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 2), + 20 * 120, + 120, + 1200); + } + + private static void recipeAluminium() { + GT_Values.RA.addBlastRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mAlumina, 24), + ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 4), + GT_Values.NF, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 24), + null, + 20 * 120, + 120, + 1600); + } + + private static void recipeCalciumCarbonate() { + + } + + private static void recipeLithiumChloride() { + + if (OreDictUtils.containsValidEntries("dustRockSalt")) { + GT_Values.RA.addElectrolyzerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustRockSalt", 8), + ItemUtils.getSimpleStack(AgriculturalChem.mLithiumChloride, 10), + FluidUtils.getFluidStack(BioRecipes.mAir, 4000), + FluidUtils.getFluidStack(BioRecipes.mChlorine, 500), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLithium", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallPotassium", 5), + new int[] {7500, 8000, 8500, 9000, 7500, 8500}, + 60 * 30, + 60); + } + if (OreDictUtils.containsValidEntries("dustPotash")) { + GT_Values.RA.addElectrolyzerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustPotash", 10), + ItemUtils.getSimpleStack(AgriculturalChem.mLithiumChloride, 16), + FluidUtils.getFluidStack(BioRecipes.mThermalWater, 2000), + FluidUtils.getFluidStack(BioRecipes.mChlorine, 250), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLithium", 7), + ItemUtils.getItemStackOfAmountFromOreDict("dustAsh", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustAsh", 2), + new int[] {7500, 8000, 8500, 9000, 9000, 9000}, + 45 * 30, + 90); + } + + } + + private static void recipeAlginicAcid() { + + /*// Turn into Cellulose Pulp + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { + getBioChip(7), + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 20), + ItemUtils.getSimpleStack(AgriculturalChem.mAlginicAcid, 5) + }, + GT_Values.NF, + ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 20), + 90 * 20, + 16);*/ + } + + private static void recipeSulfuricAcid() { + + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(7), + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 10), + ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, 30) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mSulfuricAcid, 50), + }, + 60 * 20, + 60, + 1); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(7), + ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 5), + ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, 30) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mSulfuricAcid, 250), + }, + 60 * 20, + 120, + 2); + + } + + private static void recipeUrea() { + + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(9), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mAmmonia, 600), + FluidUtils.getFluidStack(BioRecipes.mCarbonDioxide, 400), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mUrea, 400), + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 600), + }, + 120 * 20, + 30, + 1); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(9), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mUrea, 200), + FluidUtils.getFluidStack(BioRecipes.mFormaldehyde, 200), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mLiquidResin, 200) + }, + 120 * 20, + 30, + 1); + } + + private static void recipeRawBioResin() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(3), + ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 10), + ItemUtils.getSimpleStack(Blocks.dirt, 20) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 1000), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(AgriculturalChem.mRawBioResin, 1), + }, + new FluidStack[] { + + }, + 60 * 20, + 30, + 1); + } + + private static void recipeLiquidResin() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(3), + ItemUtils.getSimpleStack(AgriculturalChem.mRawBioResin, 1) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthanol, 200), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mLiquidResin, 50), + }, + 60 * 20, + 30, + 1); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(3), + ItemUtils.getSimpleStack(AgriculturalChem.mCellulosePulp, 8) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mLiquidResin, 144), + }, + new ItemStack[] { + ItemUtils.getSimpleStack(Ic2Items.resin, 1) + }, + new FluidStack[] { + + }, + 120 * 20, + 30, + 1); + + + } + + private static void recipeCompost() { + ItemStack aFert; + if (LoadedMods.Forestry) { + aFert = ItemUtils.getSimpleStack(AgriculturalChem.aFertForestry, 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(11), + ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 16), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 8) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mUrea, 500), + }, + new ItemStack[] { + aFert + }, + new FluidStack[] { + + }, + 120 * 20, + 60, + 1); + } + + aFert = ItemUtils.getSimpleStack(AgriculturalChem.aFertIC2, 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(12), + ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, 16), + ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 8) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mUrea, 500), + }, + new ItemStack[] { + aFert + }, + new FluidStack[] { + + }, + 120 * 20, + 60, + 1); + + } + + private static void recipeMethane() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(12), + ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, 20) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mDistilledWater, 500), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mMethane, 20), + }, + 20 * 20, + 8, + 1); + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(13), + ItemUtils.getSimpleStack(AgriculturalChem.mCelluloseFiber, 64), + ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 48), + ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 32) + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mMethane, 2000), + }, + new ItemStack[] { + + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthylene, 1250), + }, + 60 * 20, + 60, + 1); + } + + private static void recipeBenzene() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(19), + CI.getGreenCatalyst(0), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mMethane, 1000), + }, + new ItemStack[] { + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mBenzene, 500), + }, + 8 * 20, + 120, + 2); + } + + private static void recipeStyrene() { + + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + getBioChip(20), + CI.getGreenCatalyst(0), + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mEthylbenzene, 100), + }, + new ItemStack[] { + }, + new FluidStack[] { + FluidUtils.getFluidStack(BioRecipes.mStyrene, 25), + }, + 16 * 20, + 480, + 2); + } + + private static void recipeBioChip() { + GT_ModHandler.addShapelessCraftingRecipe( + GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 0L), 0, new Object[]{OrePrefixes.circuit.get(Materials.Primitive)}); + + long bits = 0; + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 1L, new Object[0]), bits, + new Object[]{"d ", " P ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 2L, new Object[0]), bits, + new Object[]{" d ", " P ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 3L, new Object[0]), bits, + new Object[]{" d", " P ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 4L, new Object[0]), bits, + new Object[]{" ", " Pd", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 5L, new Object[0]), bits, + new Object[]{" ", " P ", " d", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 6L, new Object[0]), bits, + new Object[]{" ", " P ", " d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 7L, new Object[0]), bits, + new Object[]{" ", " P ", "d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 8L, new Object[0]), bits, + new Object[]{" ", "dP ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 9L, new Object[0]), bits, + new Object[]{"P d", " ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 10L, new Object[0]), bits, + new Object[]{"P ", " d", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 11L, new Object[0]), bits, + new Object[]{"P ", " ", " d", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 12L, new Object[0]), bits, + new Object[]{"P ", " ", " d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 13L, new Object[0]), bits, + new Object[]{" P", " ", " d", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 14L, new Object[0]), bits, + new Object[]{" P", " ", " d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 15L, new Object[0]), bits, + new Object[]{" P", " ", "d ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 16L, new Object[0]), bits, + new Object[]{" P", "d ", " ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 17L, new Object[0]), bits, + new Object[]{" ", " ", "d P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 18L, new Object[0]), bits, + new Object[]{" ", "d ", " P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 19L, new Object[0]), bits, + new Object[]{"d ", " ", " P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 20L, new Object[0]), bits, + new Object[]{" d ", " ", " P", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 21L, new Object[0]), bits, + new Object[]{"d ", " ", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 22L, new Object[0]), bits, + new Object[]{" d ", " ", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 23L, new Object[0]), bits, + new Object[]{" d", " ", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + addCraftingRecipe(GregtechItemList.Circuit_BioRecipeSelector.getWithDamage(1L, 24L, new Object[0]), bits, + new Object[]{" ", " d", "P ", 'P', GregtechItemList.Circuit_BioRecipeSelector.getWildcard(1L, new Object[0])}); + } + + public static boolean addCraftingRecipe(ItemStack aResult, long aBitMask, Object[] aRecipe) { + Method mAddRecipe = ReflectionUtils.getMethod(GT_ModHandler.class, "addCraftingRecipe", new Class[] { + ItemStack.class, Enchantment[].class, int[].class, + boolean.class, boolean.class, boolean.class, boolean.class, + boolean.class, boolean.class, boolean.class, boolean.class, + boolean.class, boolean.class, boolean.class, boolean.class, + boolean.class, Object[].class}); + boolean didInvoke = false; + if (mAddRecipe != null) { + try { + didInvoke = (boolean) mAddRecipe.invoke(null, aResult, + new Enchantment[] {}, + new int[] {}, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + aRecipe); + } + catch (IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return didInvoke; + + + } + + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java b/src/main/java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java new file mode 100644 index 0000000000..4cf31e9335 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/Core_Agrichem.java @@ -0,0 +1,70 @@ +package gtPlusPlus.plugin.agrichem; + +import java.util.List; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.plugin.agrichem.block.AgrichemFluids; +import gtPlusPlus.plugin.agrichem.fluids.FluidLoader; +import gtPlusPlus.plugin.agrichem.item.algae.ItemAgrichemBase; +import gtPlusPlus.plugin.agrichem.item.algae.ItemAlgaeBase; +import gtPlusPlus.plugin.agrichem.item.algae.ItemBioChip; +import gtPlusPlus.plugin.manager.Core_Manager; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class Core_Agrichem implements IPlugin { + + final static Core_Agrichem mInstance; + + + static { + mInstance = new Core_Agrichem(); + Core_Manager.registerPlugin(mInstance); + mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); + } + + @Override + public boolean preInit() { + mInstance.log("Generating Fluids"); + FluidLoader.generate(); + AgrichemFluids.init(); + mInstance.log("Generating Items"); + return true; + } + + @Override + public boolean init() { + mInstance.log("Setting Items"); + return true; + } + + @Override + public boolean postInit() { + mInstance.log("Generating Recipes"); + return true; + } + + @Override + public boolean serverStart() { + return true; + } + + @Override + public boolean serverStop() { + return true; + } + + @Override + public String getPluginName() { + return "GT++ Agrichemistry Module"; + } + + @Override + public String getPluginAbbreviation() { + return "FARM"; + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/IAlgalItem.java b/src/main/java/gtPlusPlus/plugin/agrichem/IAlgalItem.java new file mode 100644 index 0000000000..fada07d062 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/IAlgalItem.java @@ -0,0 +1,12 @@ +package gtPlusPlus.plugin.agrichem; + +import gtPlusPlus.plugin.agrichem.logic.AlgaeGeneticData; +import net.minecraft.item.ItemStack; + +public interface IAlgalItem { + + public abstract AlgaeDefinition getAlgaeType(ItemStack aStack); + + public abstract AlgaeGeneticData getSpeciesData(ItemStack aStack); + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java b/src/main/java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java new file mode 100644 index 0000000000..039dd702da --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/block/AgrichemFluids.java @@ -0,0 +1,88 @@ +package gtPlusPlus.plugin.agrichem.block; + +import gtPlusPlus.core.util.minecraft.FluidUtils; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public class AgrichemFluids { + + /* + * Saline Water - saltwater + * Sulfuric Waste Water - sulfuricapatite + * Methanol - methanol + * Hot Water - ic2hotwater + * Acetic Acid + * Propionic Acid + * Fermentation Base + * Ethylene - ethylene + * Ethanol - bioethanol + * Diluted SA - filutedsulfuricacid + * Sulfuric Acid - sulfuricacid + * Urea + * Formaldehyde - fluid.formaldehyde + * Liquid Resin + * Methane - methane + * Benzene - benzene + * Ethylbenzene - fluid.ethylbenzene + * Styrene - styrene + */ + + public static Fluid mAceticAcid; + public static Fluid mPropionicAcid; + public static Fluid mFermentationBase; + public static Fluid mUrea; + public static Fluid mLiquidResin; + public static Fluid mAcetone; + public static Fluid mButanol; + + + + public static void init() { + if (!FluidRegistry.isFluidRegistered("aceticacid")) { + mAceticAcid = FluidUtils.generateFluidNoPrefix("aceticacid", "Acetic Acid", 200, new short[] { 97, 168, 96, 100 }, true); + } + else { + mAceticAcid = FluidRegistry.getFluid("aceticacid"); + } + if (!FluidRegistry.isFluidRegistered("propionicacid")) { + mPropionicAcid = FluidUtils.generateFluidNoPrefix("propionicacid", "Propionic Acid", 200, new short[] { 198, 209, 148, 100 }, true); + } + else { + mPropionicAcid = FluidRegistry.getFluid("propionicacid"); + } + if (!FluidRegistry.isFluidRegistered("fermentation.base")) { + mFermentationBase = FluidUtils.generateFluidNoPrefix("fermentation.base", "Fermentation Base", 200, new short[] { 107, 100, 63, 100 }, true); + } + else { + mFermentationBase = FluidRegistry.getFluid("fermentation.base"); + } + if (!FluidRegistry.isFluidRegistered("ureamix")) { + mUrea = FluidUtils.generateFluidNoPrefix("ureamix", "Urea Mix", 200, new short[] { 71, 55, 12, 100 }, true); + } + else { + mUrea = FluidRegistry.getFluid("ureamix"); + } + if (!FluidRegistry.isFluidRegistered("liquidresin")) { + mLiquidResin = FluidUtils.generateFluidNoPrefix("liquidresin", "Liquid Resin", 200, new short[] { 59, 58, 56, 100 }, true); + } + else { + mLiquidResin = FluidRegistry.getFluid("liquidresin"); + } + + if (!FluidRegistry.isFluidRegistered("acetone")) { + mAcetone = FluidUtils.generateFluidNoPrefix("acetone", "Acetone", 200, new short[] { 59, 58, 56, 100 }, true); + } + else { + mAcetone = FluidRegistry.getFluid("acetone"); + } + if (!FluidRegistry.isFluidRegistered("butanol")) { + mButanol = FluidUtils.generateFluidNoPrefix("butanol", "Butanol", 200, new short[] { 159, 58, 56, 100 }, true); + } + else { + mButanol = FluidRegistry.getFluid("butanol"); + } + } + + + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java b/src/main/java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java new file mode 100644 index 0000000000..a60a8c09de --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/fluids/FluidLoader.java @@ -0,0 +1,21 @@ +package gtPlusPlus.plugin.agrichem.fluids; + +import gtPlusPlus.core.fluids.FluidFactory; + +public class FluidLoader { + + private static final int ID_DIRTY_WATER = 50; + private static final int ID_RAW_SEWERAGE = 51; + private static final int ID_GUANO = 52; + private static final int ID_POOPJUICE = 53; + + public static void generate() { + + FluidFactory.generate(ID_DIRTY_WATER, "dirtywater", new short[] {25, 25, 180}); + FluidFactory.generate(ID_RAW_SEWERAGE, "sewerage", new short[] {100, 45, 25}); + FluidFactory.generate(ID_GUANO, "guano", new short[] {175, 175, 180}); + FluidFactory.generate(ID_POOPJUICE, "poo", new short[] {75, 45, 10}); + + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java b/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java new file mode 100644 index 0000000000..abeebc054d --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAgrichemBase.java @@ -0,0 +1,312 @@ +package gtPlusPlus.plugin.agrichem.item.algae; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.OreDictUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +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.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; + +public class ItemAgrichemBase extends Item { + + final protected IIcon base[]; + + /* + * 0 - Algae Biomass + * 1 - Green Algae Biomass + * 2 - Brown Algae Biomass + * 3 - Golden-Brown Algae Biomass + * 4 - Red Algae Biomass + * 5 - Cellulose Fiber + * 6 - Golden-Brown Cellulose Fiber + * 7 - Red Cellulose Fiber + * 8 - Compost + * 9 - Wood Pellet + * 10 - Wood Brick + * 11 - Cellulose Pulp + * 12 - Raw Bio Resin + * 13 - Catalyst Carrier + * 14 - Green Metal Catalyst + * 15 - Alginic Acid + * 16 - Alumina + * 17 - Aluminium Pellet + * 18 - Sodium Aluminate + * 19 - Sodium Hydroxide // Exists in Newer GT + * 20 - Sodium Carbonate + * 21 - Lithium Chloride + * 22 - Pellet Mold + * 23 - Clean Aluminium Mix + * 24 - Pinecone + * 25 - Crushed Pine + */ + + public ItemAgrichemBase() { + this.setHasSubtypes(true); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + base = new IIcon[26]; + this.setUnlocalizedName("BasicAgrichemItem"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return super.getItemStackDisplayName(aStack); + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.common; + } + + @Override + public boolean requiresMultipleRenderPasses() { + return false; + } + + private static boolean mHasCheckedForSodiumHydroxide = false; + private static boolean mShowSodiumHydroxide = true; + + private static boolean checkSodiumHydroxide() { + if (mHasCheckedForSodiumHydroxide) { + return mShowSodiumHydroxide; + } + else { + if (OreDictUtils.containsValidEntries("dustSodiumHydroxide_GT5U") + || OreDictUtils.containsValidEntries("dustSodiumHydroxide")) { + List aTest = OreDictionary.getOres( + "dustSodiumHydroxide", false + ); + if (aTest.isEmpty()) { + aTest = OreDictionary.getOres( + "dustSodiumHydroxide_GT5U", false + ); + if (!aTest.isEmpty()) { + mShowSodiumHydroxide = false; + } + } + else { + mShowSodiumHydroxide = false; + } + } + } + mHasCheckedForSodiumHydroxide = true; + return mShowSodiumHydroxide; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + for (int i=0;i aDamageSegment * 3){ + durability = EnumChatFormatting.GREEN; + } + else if (aDam > aDamageSegment * 2){ + durability = EnumChatFormatting.YELLOW; + } + else if (aDam > aDamageSegment){ + durability = EnumChatFormatting.GOLD; + } + else if (aDam >= 0){ + durability = EnumChatFormatting.RED; + } + list.add(durability+""+(aDam)+EnumChatFormatting.GRAY+" / "+aMaxDamage); + } + super.addInformation(aStack, player, list, bool); + } + + @Override + public boolean showDurabilityBar(ItemStack aStack) { + if (ItemUtils.isCatalyst(aStack)) { + int aDam = getCatalystDamage(aStack); + return aDam > 0; + } + return false; + } + + public static boolean createCatalystNBT(ItemStack rStack){ + return ItemGenericChemBase.createCatalystNBT(rStack); + } + + public static int getCatalystDamage(ItemStack aStack) { + return ItemGenericChemBase.getCatalystDamage(aStack); + } + + public static int getCatalystMaxDamage(ItemStack aStack) { + return ItemGenericChemBase.getCatalystMaxDamage(aStack); + } + + public static void setCatalystDamage(ItemStack aStack,int aAmount) { + ItemGenericChemBase.setCatalystDamage(aStack, aAmount); + } + + public static int getMaxCatalystDurability(ItemStack aStack) { + return ItemGenericChemBase.getMaxCatalystDurability(aStack); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java b/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java new file mode 100644 index 0000000000..6b31a42809 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemAlgaeBase.java @@ -0,0 +1,235 @@ +package gtPlusPlus.plugin.agrichem.item.algae; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.plugin.agrichem.AlgaeDefinition; +import gtPlusPlus.plugin.agrichem.IAlgalItem; +import gtPlusPlus.plugin.agrichem.logic.AlgaeGeneticData; +import gtPlusPlus.plugin.agrichem.logic.AlgaeGrowthRequirement; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemAlgaeBase extends Item implements IAlgalItem { + + protected IIcon base; + protected IIcon overlay; + + public ItemAlgaeBase() { + this.setHasSubtypes(true); + this.setMaxDamage(127); + this.setNoRepair(); + this.setMaxStackSize(32); + this.setUnlocalizedName("BasicAlgaeItem"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + if (!p_77663_1_.hasTagCompound() || p_77663_1_.getTagCompound().hasNoTags()) { + p_77663_1_ = initNBT(p_77663_1_); + } + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return EnumChatFormatting.UNDERLINE+super.getItemStackDisplayName(aStack); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + int aDam = aStack.getItemDamage(); + try { + aList.add(AlgaeDefinition.getByIndex(aDam).mSimpleName); + if (!aStack.hasTagCompound() || aStack.getTagCompound().hasNoTags()) { + aStack = initNBT(aStack); + } + else { + NBTTagCompound aNBT = aStack.getTagCompound(); + boolean mRequiresLight = aNBT.getBoolean("mRequiresLight"); + boolean mSaltWater = aNBT.getBoolean("mSaltWater"); + boolean mFreshWater = aNBT.getBoolean("mFreshWater"); + byte mTempTolerance = aNBT.getByte("mTempTolerance"); + float mFertility = aNBT.getFloat("mFertility"); + float mProductionSpeed = aNBT.getFloat("mProductionSpeed"); + byte mLifespan = aNBT.getByte("mLifespan"); + int mGeneration = aNBT.getInteger("mGeneration"); + + aList.add("Requires Light: "+mRequiresLight); + aList.add("Salt Water: "+mSaltWater); + aList.add("Fresh Water: "+mFreshWater); + aList.add("Temp Tolerance: "+mTempTolerance); + aList.add("Growth: "+mFertility); + aList.add("Production: "+mProductionSpeed); + aList.add("Lifespan in days: "+mLifespan); + aList.add("Generation: "+mGeneration); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.uncommon; + } + + @Override + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + for (int i=0;i 5) { + aGenes = new AlgaeGeneticData(); + aTag = aGenes.writeToNBT(); + } + else { + byte aTemp, aLifespan; + float aFert, aSpeed; + + int aDam = aStack.getItemDamage(); + aTemp = (byte) (aDam == 3 ? 0 : aDam == 4 ? 2 : 1); + aLifespan = (byte) (aDam == 3 ? 1 : aDam == 4 ? 3f : 2f); + aFert = (float) (aDam == 3 ? 2f : aDam == 4 ? 1f : 1.75f); + aSpeed = (float) (aDam == 3 ? 1f : aDam == 4 ? 1.5f : 2f); + + aGenes = new AlgaeGeneticData( + true, true, + AlgaeDefinition.getByIndex(aDam).mSaltWater, AlgaeDefinition.getByIndex(aDam).mFreshWater, + aTemp, + aFert, + aSpeed, + aLifespan, + 0, + new AutoMap()); + aTag = aGenes.writeToNBT(); + } + } + else { + aTag = aStack.getTagCompound(); + } + + + + + return new AlgaeGeneticData(aTag); + } + + + + +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java b/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java new file mode 100644 index 0000000000..f876839f5f --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/item/algae/ItemBioChip.java @@ -0,0 +1,238 @@ +package gtPlusPlus.plugin.agrichem.item.algae; + +import java.util.*; +import java.util.function.BiFunction; +import java.util.function.Predicate; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.gui.GT_GUIDialogSelectItem; +import gregtech.api.interfaces.INetworkUpdatableItem; +import gregtech.api.net.GT_Packet_UpdateItem; +import gregtech.api.objects.XSTR; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.*; +import net.minecraft.world.World; +import net.minecraftforge.common.util.Constants; +import net.minecraftforge.common.util.FakePlayer; +import org.apache.commons.lang3.tuple.Pair; + +public class ItemBioChip extends Item implements INetworkUpdatableItem { + private static final List ALL_VARIANTS = new ArrayList<>(); + + protected IIcon base; + + public ItemBioChip() { + this.setHasSubtypes(true); + this.setNoRepair(); + this.setMaxStackSize(64); + this.setMaxDamage(0); + this.setUnlocalizedName("BioRecipeSelector"); + GameRegistry.registerItem(this, this.getUnlocalizedName()); + ALL_VARIANTS.add(new ItemStack(this, 0, 0)); + for (int i = 1; i <= 24; i++) { + ItemStack aStack = new ItemStack(this, 0, i); + ALL_VARIANTS.add(aStack); + } + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean shouldRotateAroundWhenRendering() { + return super.shouldRotateAroundWhenRendering(); + } + + @Override + public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(p_77663_1_, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_); + } + + @Override + public String getItemStackDisplayName(ItemStack aStack) { + return super.getItemStackDisplayName(aStack); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + try { + aList.add("Configuration == "+aStack.getItemDamage()); + aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.0").toString(), "Right click to reconfigure")); + aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".tooltip.1").toString(), "Needs a screwdriver or circuit programming tool")); + } + catch (Throwable t) { + t.printStackTrace(); + } + super.addInformation(aStack, p_77624_2_, aList, p_77624_4_); + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.common; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs p_150895_2_, List aList) { + aList.add(ItemUtils.simpleMetaStack(aItem, 0, 1)); + } + + @Override + public boolean getIsRepairable(ItemStack p_82789_1_, ItemStack p_82789_2_) { + return false; + } + + @Override + public boolean isRepairable() { + return false; + } + + @Override + public boolean isBookEnchantable(ItemStack stack, ItemStack book) { + return false; + } + + @Override + public int getDisplayDamage(ItemStack stack) { + return stack.getItemDamage(); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public int getItemEnchantability(ItemStack stack) { + return 0; + } + + @Override + public void registerIcons(final IIconRegister u) { + this.base = u.registerIcon(CORE.MODID + ":" + "bioscience/BioCircuit"); + } + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + return this.base; + } + + @Override + public IIcon getIconFromDamage(int damage) { + return this.base; + } + + @Override + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + return this.base; + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return this.base; + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return super.getUnlocalizedName(); + } + + @Override + public boolean receive(ItemStack stack, EntityPlayerMP player, NBTTagCompound tag) { + int meta = tag.hasKey("meta", Constants.NBT.TAG_BYTE) ? tag.getByte("meta") : -1; + if (meta < 0 || meta > 24) + return true; + + if (!player.capabilities.isCreativeMode) { + Pair> toolIndex = findConfiguratorInInv(player); + if (toolIndex == null) return true; + + ItemStack[] mainInventory = player.inventory.mainInventory; + mainInventory[toolIndex.getKey()] = toolIndex.getValue().apply(mainInventory[toolIndex.getKey()], player); + } + stack.setItemDamage(meta); + + return true; + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xOffset, float yOffset, float zOffset) { + // nothing on server side or fake player + if (player instanceof FakePlayer || !world.isRemote) return false; + // check if any screwdriver + ItemStack configuratorStack; + if (player.capabilities.isCreativeMode) { + configuratorStack = null; + } else { + Pair configurator = findConfiguratorInInv(player); + if (configurator == null) { + int count; + try { + count = Integer.parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); + } catch (NumberFormatException e) { + player.addChatComponentMessage(new ChatComponentText("Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + e.getMessage())); + count = 1; + } + player.addChatComponentMessage(new ChatComponentTranslation("GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); + return false; + } + configuratorStack = player.inventory.mainInventory[configurator.getKey()]; + } + openSelectorGui(configuratorStack, stack.getItemDamage()); + return true; + } + + private void openSelectorGui(ItemStack configurator, int meta) { + FMLCommonHandler.instance().showGuiScreen(new GT_GUIDialogSelectItem( + StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), + configurator, + null, + ItemBioChip::onConfigured, + ALL_VARIANTS, + meta, + true + )); + } + + private static void onConfigured(ItemStack stack) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setByte("meta", (byte) stack.getItemDamage()); + GT_Values.NW.sendToServer(new GT_Packet_UpdateItem(tag)); + } + + private static Pair> findConfiguratorInInv(EntityPlayer player) { + ItemStack[] mainInventory = player.inventory.mainInventory; + for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { + ItemStack toolStack = mainInventory[j]; + + if (!GT_Utility.isStackValid(toolStack)) + continue; + + for (Map.Entry, BiFunction> p : GregTech_API.sCircuitProgrammerList.entrySet()) + if (p.getKey().test(toolStack)) + return Pair.of(j, p.getValue()); + } + return null; + } +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java b/src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java new file mode 100644 index 0000000000..dfe0f50b47 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGeneticData.java @@ -0,0 +1,130 @@ +package gtPlusPlus.plugin.agrichem.logic; + +import gtPlusPlus.api.objects.data.AutoMap; +import net.minecraft.nbt.NBTTagCompound; + +public class AlgaeGeneticData { + + private final int mLifespan; + + private final int mGeneration; + + private final boolean mIsDominant; + + private final boolean mRequiresLight; + + private final boolean mSaltWater; + + private final boolean mFreshWater; + + private final byte mTempTolerance; + + private final float mFertility; + + private final float mProductionSpeed; + + private final AutoMap mSpecialRequirements; + + + public AlgaeGeneticData() { + this(true, true, true, true, (byte) 0, 1f, 1f, (byte) 30, 0, new AutoMap()); + } + + public AlgaeGeneticData(boolean isDominant, boolean requiresLight, boolean isSalt, boolean isFresh, + byte aTempTolerance, float aFertility, float aSpeed, byte aLifespan, int aGeneration, AutoMap aRequirements) { + mIsDominant = isDominant; + mRequiresLight = requiresLight; + mSaltWater = isSalt; + mFreshWater = isFresh; + mTempTolerance = aTempTolerance; + mFertility = aFertility; + mProductionSpeed = aSpeed; + mLifespan = aLifespan; + mGeneration = aGeneration; + mSpecialRequirements = aRequirements; + } + + + public AlgaeGeneticData(NBTTagCompound aNBT) { + if (aNBT == null || aNBT.hasNoTags()) { + mIsDominant = true; + mRequiresLight = true; + mSaltWater = true; + mFreshWater = true; + mTempTolerance = 0; + mFertility = 1; + mProductionSpeed = 1; + mLifespan = 30; + mGeneration = 0; + } + else { + mIsDominant = aNBT.getBoolean("mIsDominant"); + mRequiresLight = aNBT.getBoolean("mRequiresLight"); + mSaltWater = aNBT.getBoolean("mSaltWater"); + mFreshWater = aNBT.getBoolean("mFreshWater"); + mTempTolerance = aNBT.getByte("mTempTolerance"); + mFertility = aNBT.getFloat("mFertility"); + mProductionSpeed = aNBT.getFloat("mProductionSpeed"); + mLifespan = aNBT.getByte("mLifespan"); + mGeneration = aNBT.getInteger("mGeneration"); + } + mSpecialRequirements = new AutoMap(); + } + + /** + * In MC Days + */ + public final int getLifespan() { + return this.mLifespan; + } + + public final boolean isDominant() { + return this.mIsDominant; + } + + public final boolean RequiresLight() { + return this.mRequiresLight; + } + + public final boolean isSaltWater() { + return this.mSaltWater; + } + + public final boolean isFreshWater() { + return this.mFreshWater; + } + + public final byte getTempTolerance() { + return this.mTempTolerance; + } + + public final float getFertility() { + return this.mFertility; + } + + public final float getProductionSpeed() { + return this.mProductionSpeed; + } + + public final int getGeneration() { + return this.mGeneration; + } + + public final AutoMap getSpecialRequirements() { + return this.mSpecialRequirements; + } + + public NBTTagCompound writeToNBT() { + NBTTagCompound aGenes = new NBTTagCompound(); + aGenes.setBoolean("mIsDominant", this.mIsDominant); + aGenes.setBoolean("mRequiresLight", this.mRequiresLight); + aGenes.setBoolean("mSaltWater", this.mSaltWater); + aGenes.setBoolean("mFreshWater", this.mFreshWater); + aGenes.setInteger("mLifespan", this.mLifespan); + aGenes.setInteger("mGeneration", this.mGeneration); + aGenes.setByte("mTempTolerance", this.mTempTolerance); + aGenes.setFloat("mFertility", this.mFertility); + aGenes.setFloat("mProductionSpeed", this.mProductionSpeed); + return aGenes; + } +} diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java b/src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java new file mode 100644 index 0000000000..6bddc9d085 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/agrichem/logic/AlgaeGrowthRequirement.java @@ -0,0 +1,5 @@ +package gtPlusPlus.plugin.agrichem.logic; + +public class AlgaeGrowthRequirement { + +} diff --git a/src/main/java/gtPlusPlus/plugin/fishing/Core_Fishing.java b/src/main/java/gtPlusPlus/plugin/fishing/Core_Fishing.java new file mode 100644 index 0000000000..48706bc986 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fishing/Core_Fishing.java @@ -0,0 +1,54 @@ +package gtPlusPlus.plugin.fishing; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.plugin.manager.Core_Manager; + +public class Core_Fishing implements IPlugin { + + final static Core_Fishing mInstance; + + static { + mInstance = new Core_Fishing(); + mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); + } + + Core_Fishing() { + Core_Manager.registerPlugin(this); + } + + @Override + public boolean preInit() { + return false; + } + + @Override + public boolean init() { + return false; + } + + @Override + public boolean postInit() { + return false; + } + + @Override + public boolean serverStart() { + return false; + } + + @Override + public boolean serverStop() { + return false; + } + + @Override + public String getPluginName() { + return "GT++ Fishing Module"; + } + + @Override + public String getPluginAbbreviation() { + return "Fish"; + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java b/src/main/java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java new file mode 100644 index 0000000000..c11d4fa333 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fishing/block/BlockFishEggs.java @@ -0,0 +1,12 @@ +package gtPlusPlus.plugin.fishing.block; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + +public class BlockFishEggs extends Block{ + + protected BlockFishEggs() { + super(Material.water); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/fishing/item/BaseFish.java b/src/main/java/gtPlusPlus/plugin/fishing/item/BaseFish.java new file mode 100644 index 0000000000..d96d8d8cfd --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fishing/item/BaseFish.java @@ -0,0 +1,119 @@ +package gtPlusPlus.plugin.fishing.item; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.potion.PotionHelper; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.plugin.fishing.misc.BaseFishTypes; + +public class BaseFish extends ItemFood +{ + private final boolean isCooked; + + public BaseFish(boolean cooked) + { + super(0, 0.0F, false); + this.isCooked = cooked; + } + + public int func_150905_g(ItemStack p_150905_1_) + { + BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(p_150905_1_); + return this.isCooked && fishtype.isCooked() ? fishtype.func_150970_e() : fishtype.func_150975_c(); + } + + public float func_150906_h(ItemStack p_150906_1_) + { + BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(p_150906_1_); + return this.isCooked && fishtype.isCooked() ? fishtype.func_150977_f() : fishtype.func_150967_d(); + } + + /** + * Returns a string representing what this item does to a potion. + */ + public String getPotionEffect(ItemStack p_150896_1_) + { + return BaseFishTypes.getFishTypeFromStackDamage(p_150896_1_) == BaseFishTypes.PUFFERFISH ? PotionHelper.field_151423_m : null; + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister p_94581_1_) + { + BaseFishTypes[] afishtype = BaseFishTypes.values(); + int i = afishtype.length; + + for (int j = 0; j < i; ++j) + { + BaseFishTypes fishtype = afishtype[j]; + fishtype.func_150968_a(p_94581_1_); + } + } + + protected void onFoodEaten(ItemStack fish, World world, EntityPlayer player) + { + BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(fish); + + if (fishtype == BaseFishTypes.PUFFERFISH) + { + player.addPotionEffect(new PotionEffect(Potion.poison.id, 1200, 3)); + player.addPotionEffect(new PotionEffect(Potion.hunger.id, 300, 2)); + player.addPotionEffect(new PotionEffect(Potion.confusion.id, 300, 1)); + } + + super.onFoodEaten(fish, world, player); + } + + /** + * Gets an icon index based on an item's damage value + */ + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int dmg) + { + BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromDamageValue(dmg); + return this.isCooked && fishtype.isCooked() ? fishtype.func_150979_h() : fishtype.func_150971_g(); + } + + /** + * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) + */ + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_) + { + BaseFishTypes[] afishtype = BaseFishTypes.values(); + int i = afishtype.length; + + for (int j = 0; j < i; ++j) + { + BaseFishTypes fishtype = afishtype[j]; + + if (!this.isCooked || fishtype.isCooked()) + { + p_150895_3_.add(new ItemStack(this, 1, fishtype.getFishID())); + } + } + } + + /** + * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have + * different names based on their damage or NBT. + */ + public String getUnlocalizedName(ItemStack p_77667_1_) + { + BaseFishTypes fishtype = BaseFishTypes.getFishTypeFromStackDamage(p_77667_1_); + return this.getUnlocalizedName() + "." + fishtype.getFishName() + "." + (this.isCooked && fishtype.isCooked() ? "cooked" : "raw"); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java b/src/main/java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java new file mode 100644 index 0000000000..ea8d04b5d3 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fishing/misc/BaseFishTypes.java @@ -0,0 +1,140 @@ +package gtPlusPlus.plugin.fishing.misc; +import java.util.Map; + +import com.google.common.collect.Maps; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gtPlusPlus.plugin.fishing.item.BaseFish; + +public enum BaseFishTypes{ + + COD(0, "cod", 2, 0.1F, 5, 0.6F), + SALMON(1, "salmon", 2, 0.1F, 6, 0.8F), + CLOWNFISH(2, "clownfish", 1, 0.1F), + PUFFERFISH(3, "pufferfish", 1, 0.1F); + + + + + private static final Map mFishMap = Maps.newHashMap(); + private final int mID; + private final String mFishName; + @SideOnly(Side.CLIENT) + private IIcon iicon; + @SideOnly(Side.CLIENT) + private IIcon iicon2; + private final int field_150991_j; + private final float field_150992_k; + private final int field_150989_l; + private final float field_150990_m; + private boolean isCooked = false; + + private BaseFishTypes(int p_i45336_3_, String p_i45336_4_, int p_i45336_5_, float p_i45336_6_, int p_i45336_7_, float p_i45336_8_) + { + this.mID = p_i45336_3_; + this.mFishName = p_i45336_4_; + this.field_150991_j = p_i45336_5_; + this.field_150992_k = p_i45336_6_; + this.field_150989_l = p_i45336_7_; + this.field_150990_m = p_i45336_8_; + this.isCooked = true; + } + + private BaseFishTypes(int p_i45337_3_, String p_i45337_4_, int p_i45337_5_, float p_i45337_6_) + { + this.mID = p_i45337_3_; + this.mFishName = p_i45337_4_; + this.field_150991_j = p_i45337_5_; + this.field_150992_k = p_i45337_6_; + this.field_150989_l = 0; + this.field_150990_m = 0.0F; + this.isCooked = false; + } + + public int getFishID() + { + return this.mID; + } + + public String getFishName() + { + return this.mFishName; + } + + public int func_150975_c() + { + return this.field_150991_j; + } + + public float func_150967_d() + { + return this.field_150992_k; + } + + public int func_150970_e() + { + return this.field_150989_l; + } + + public float func_150977_f() + { + return this.field_150990_m; + } + + @SideOnly(Side.CLIENT) + public void func_150968_a(IIconRegister p_150968_1_) + { + this.iicon = p_150968_1_.registerIcon("fish_" + this.mFishName + "_raw"); + + if (this.isCooked) + { + this.iicon2 = p_150968_1_.registerIcon("fish_" + this.mFishName + "_cooked"); + } + } + + @SideOnly(Side.CLIENT) + public IIcon func_150971_g() + { + return this.iicon; + } + + @SideOnly(Side.CLIENT) + public IIcon func_150979_h() + { + return this.iicon2; + } + + public boolean isCooked() + { + return this.isCooked; + } + + public static BaseFishTypes getFishTypeFromDamageValue(int dmg) + { + BaseFishTypes fishtype = (BaseFishTypes)mFishMap.get(Integer.valueOf(dmg)); + return fishtype == null ? COD : fishtype; + } + + public static BaseFishTypes getFishTypeFromStackDamage(ItemStack fish) + { + return fish.getItem() instanceof BaseFish ? getFishTypeFromDamageValue(fish.getItemDamage()) : COD; + } + + static + { + BaseFishTypes[] var0 = values(); + int var1 = var0.length; + + for (int var2 = 0; var2 < var1; ++var2) + { + BaseFishTypes var3 = var0[var2]; + mFishMap.put(Integer.valueOf(var3.getFishID()), var3); + } + } + } \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java b/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java new file mode 100644 index 0000000000..d67ff24d7b --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fixes/interfaces/IBugFix.java @@ -0,0 +1,7 @@ +package gtPlusPlus.plugin.fixes.interfaces; + +public interface IBugFix { + + public boolean isFixValid(); + +} diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java new file mode 100644 index 0000000000..2bfd05e5be --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java @@ -0,0 +1,95 @@ +package gtPlusPlus.plugin.fixes.vanilla; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.plugin.manager.Core_Manager; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class Core_VanillaFixes implements IPlugin { + + final static Core_VanillaFixes mInstance; + final static VanillaBedHeightFix mBedFixInstance; + final static VanillaBackgroundMusicFix mMusicFixInstance; + + static { + mInstance = new Core_VanillaFixes(); + mBedFixInstance = new VanillaBedHeightFix(mInstance); + mMusicFixInstance = new VanillaBackgroundMusicFix(mInstance); + mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); + } + + Core_VanillaFixes() { + Core_Manager.registerPlugin(this); + } + + @Override + public boolean preInit() { + return fixVanillaOD(); + } + + @Override + public boolean init() { + return true; + } + + @Override + public boolean postInit() { + return true; + } + + @Override + public boolean serverStart() { + mMusicFixInstance.manage(); + return true; + } + + @Override + public boolean serverStop() { + return true; + } + + @Override + public String getPluginName() { + return "GT++ Vanilla Fixes Module"; + } + + @Override + public String getPluginAbbreviation() { + return "VFIX"; + } + + private boolean fixVanillaOD() { + registerToOreDict(ItemUtils.getSimpleStack(Items.blaze_rod), "rodBlaze"); + registerToOreDict(ItemUtils.getSimpleStack(Items.nether_wart), "cropNetherWart"); + registerToOreDict(ItemUtils.getSimpleStack(Items.reeds), "sugarcane"); + registerToOreDict(ItemUtils.getSimpleStack(Items.paper), "paper"); + registerToOreDict(ItemUtils.getSimpleStack(Items.ender_pearl), "enderpearl"); + registerToOreDict(ItemUtils.getSimpleStack(Items.bone), "bone"); + registerToOreDict(ItemUtils.getSimpleStack(Items.gunpowder), "gunpowder"); + registerToOreDict(ItemUtils.getSimpleStack(Items.string), "string"); + registerToOreDict(ItemUtils.getSimpleStack(Items.nether_star), "netherStar"); + registerToOreDict(ItemUtils.getSimpleStack(Items.leather), "leather"); + registerToOreDict(ItemUtils.getSimpleStack(Items.feather), "feather"); + registerToOreDict(ItemUtils.getSimpleStack(Items.egg), "egg"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.end_stone), "endstone"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.vine), "vine"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.cactus), "blockCactus"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.grass), "grass"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.obsidian), "obsidian"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.crafting_table), "workbench"); + return true; + } + + private void registerToOreDict(ItemStack aStack, String aString) { + if (aStack.getItem() == Items.blaze_rod) { + mInstance.log("Registering "+aStack.getDisplayName()+" to OreDictionary under the tag '"+aString+"'."); + } + else { + mInstance.log("Registering "+aStack.getDisplayName()+" to OreDictionary under the tag '"+aString+"'. (Added to Forge in 1.8.9)"); + } + ItemUtils.addItemToOreDictionary(aStack, aString); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java new file mode 100644 index 0000000000..bfd73407f7 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBackgroundMusicFix.java @@ -0,0 +1,63 @@ +package gtPlusPlus.plugin.fixes.vanilla; + +import java.util.Timer; +import java.util.TimerTask; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.plugin.fixes.interfaces.IBugFix; +import gtPlusPlus.plugin.fixes.vanilla.music.MusicTocker; +import gtPlusPlus.preloader.CORE_Preloader; + +public class VanillaBackgroundMusicFix implements IBugFix { + + private final IPlugin mParent; + private final boolean enabled; + private MusicTocker mFixInstance; + + public VanillaBackgroundMusicFix(IPlugin minstance) { + mParent = minstance; + if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { + mParent.log("[BGM] Registering BGM delay Fix."); + enabled = true; + mFixInstance = new MusicTocker(mParent); + } else if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isServer()) { + mParent.log("[BGM] Tried registering BGM delay Fix on Server, disabling."); + enabled = false; + } else { + mParent.log("[BGM] Not registering BGM delay Fix."); + enabled = false; + } + } + + public boolean isFixValid() { + return enabled; + } + + public void manage() { + if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { + TimerTask task = new ManageTask(this.mFixInstance); + Timer timer = new Timer("BGM-WatchDog"); + long delay = 1000 * 60; + timer.scheduleAtFixedRate(task, delay, 5000); + } + } + + private static class ManageTask extends TimerTask { + private final MusicTocker A; + + public ManageTask(MusicTocker a) { + A = a; + } + + @Override + public void run() { + if (CORE_Preloader.enableWatchdogBGM > 0 && Utils.isClient()) { + if (!A.mVanillaManager) { + A.run(); + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java new file mode 100644 index 0000000000..f33cc71fc6 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java @@ -0,0 +1,82 @@ +package gtPlusPlus.plugin.fixes.vanilla; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.plugin.fixes.interfaces.IBugFix; +import gtPlusPlus.preloader.DevHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; + +public class VanillaBedHeightFix implements IBugFix { + + private final Method mSleepInBedAt; + private final IPlugin mParent; + + public VanillaBedHeightFix(IPlugin minstance) { + mParent = minstance; + if (DevHelper.isValidHelperObject()) { + Method m; + if (DevHelper.isObfuscatedEnvironment()) { + m = ReflectionUtils.getMethod(EntityPlayer.class, "func_71018_a", int.class, int.class, int.class); + } + else { + m = ReflectionUtils.getMethod(net.minecraft.entity.player.EntityPlayer.class, "sleepInBedAt", int.class, int.class, int.class); + } + if (m != null) { + mSleepInBedAt = m; + mParent.log("Registering Bed Height Fix."); + Utils.registerEvent(this); + } else { + mSleepInBedAt = null; + } + } else { + mSleepInBedAt = null; + } + } + + public boolean isFixValid() { + return mSleepInBedAt != null; + } + + /** + * Fix created by deNULL - + * https://github.com/deNULL/BugPatch/blob/master/src/main/java/ru/denull/BugPatch/mod/ClientEvents.java#L45 + * + * @param evt + * - The event where a player sleeps + */ + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void playerSleepInBed(PlayerSleepInBedEvent evt) { + Logger.WARNING("Sleep Event Detected. Player is sleeping at Y: " + evt.y); + if (evt.y <= 0 && isFixValid()) { + int correctY = 256 + evt.y; + if (correctY <= 0) { + Logger.WARNING( + "You're trying to sleep at y=" + evt.y + ", which is impossibly low. However, fixed y value is " + + correctY + ", which is still below 0. Falling back to default behavior."); + } else { + Logger.WARNING("You're trying to sleep at y=" + evt.y + + ". This is probably caused by overflow, stopping original event; retrying with y=" + correctY + + "."); + evt.result = EntityPlayer.EnumStatus.OTHER_PROBLEM; + try { + mSleepInBedAt.invoke(evt.entityPlayer, evt.x, correctY, evt.z); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.WARNING("Encountered an error trying to sleep."); + } + } + } else if (!isFixValid()) { + Logger.WARNING( + "Method sleepInBedAt was not found in EntityPlayer (wrong MC and/or Forge version?), unable to fix"); + } + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java new file mode 100644 index 0000000000..452c902e05 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/fixes/vanilla/music/MusicTocker.java @@ -0,0 +1,130 @@ +package gtPlusPlus.plugin.fixes.vanilla.music; + +import java.lang.reflect.Field; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.CORE_Preloader; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.ISound; +import net.minecraft.client.audio.MusicTicker; +import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.util.MathHelper; + +@SideOnly(Side.CLIENT) +public class MusicTocker extends MusicTicker implements Runnable { + + private final Random mRandom = new XSTR(); + private final Minecraft mMinecraft; + private final IPlugin mPlugin; + private ISound mSound; + private int mTimeUntilNextTrack = 100; + + public boolean mVanillaManager = false; + + public MusicTocker(IPlugin aPlugin) { + super(Minecraft.getMinecraft()); + mPlugin = aPlugin; + mMinecraft = Minecraft.getMinecraft(); + mPlugin.log("[BGM] Created BGM Watchdog with a delay of "+getDelay()+" ticks."); + inject(); + } + + private static int getDelay() { + return CORE_Preloader.enableWatchdogBGM; + } + + private boolean inject() { + mPlugin.log("[BGM] Inject new Watchdog into Minecraft instance."); + ReflectionUtils.setField(Minecraft.getMinecraft(), "mcMusicTicker", this); + mPlugin.log("[BGM] Verifying..."); + Field f = ReflectionUtils.getField(Minecraft.class, "mcMusicTicker"); + try { + Object m = f.get(mMinecraft); + if (m != null) { + if (m instanceof MusicTocker || m.getClass().isAssignableFrom(getClass())) { + mPlugin.log("[BGM] Success."); + return true; + } + else if (m instanceof MusicTicker || m.getClass().isAssignableFrom(MusicTicker.class)) { + mPlugin.log("[BGM] Found Vanilla MusicTicker, but may be instance of MusicTocker."); + return true; + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + + mPlugin.log("[BGM] Failed."); + return false; + } + + private final void updateInternalNumber() { + if (ReflectionUtils.doesFieldExist(getClass(), "field_147676_d")) { + ReflectionUtils.setField(this, "field_147676_d", mTimeUntilNextTrack); + } + } + + private final void updateInternalSound(ISound aSound) { + if (ReflectionUtils.doesFieldExist(getClass(), "field_147678_c")) { + ReflectionUtils.setField(this, "field_147678_c", aSound); + } + } + + /** + * Updates the JList with a new model. + */ + @Override + public void update() { + run(); + mVanillaManager = true; + } + + @Override + public void run() { + MusicType musictype = this.mMinecraft.func_147109_W(); + + if (this.mSound != null) { + if (!musictype.getMusicTickerLocation().equals(this.mSound.getPositionedSoundLocation())) { + this.mMinecraft.getSoundHandler().stopSound(this.mSound); + this.mTimeUntilNextTrack = MathHelper.getRandomIntegerInRange(this.mRandom, 0, getDelay() / 2); + updateInternalNumber(); + Logger.INFO("[BGM] Adjusted BGM delay 1"); + } + if (!this.mMinecraft.getSoundHandler().isSoundPlaying(this.mSound)) { + this.mSound = null; + updateInternalSound(null); + this.mTimeUntilNextTrack = Math.min(MathHelper.getRandomIntegerInRange(this.mRandom, getDelay(), getDelay() * 2), this.mTimeUntilNextTrack); + updateInternalNumber(); + Logger.INFO("[BGM] Adjusted BGM delay 2"); + } + } + else if (this.mSound == null && this.mTimeUntilNextTrack-- <= 0) { + this.mSound = PositionedSoundRecord.func_147673_a(musictype.getMusicTickerLocation()); + updateInternalSound(mSound); + this.mMinecraft.getSoundHandler().playSound(this.mSound); + this.mTimeUntilNextTrack = getDelay(); + updateInternalNumber(); + Logger.INFO("[BGM] Adjusted BGM 3"); + } + + /* + * try { // Get Value stored in underlying object. Integer aRealDelay = + * (Integer) ReflectionUtils.getField(getClass(), "field_147676_d").get(this); + * + * if (aRealDelay == null) { return; } else { if (aRealDelay > getDelay() || + * aRealDelay <= 0) { this.mTimeUntilNextTrack = getDelay(); + * updateInternalNumber(); } else { this.mTimeUntilNextTrack -= 5 * 20; + * updateInternalNumber(); } aRealDelay = (Integer) + * ReflectionUtils.getField(getClass(), "field_147676_d").get(this); + * Logger.INFO("[BGM] Adjusted BGM - "+aRealDelay); } + * + * } catch (IllegalArgumentException | IllegalAccessException e) { } + */ + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/plugin/manager/Core_Manager.java b/src/main/java/gtPlusPlus/plugin/manager/Core_Manager.java new file mode 100644 index 0000000000..45e85d68ac --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/manager/Core_Manager.java @@ -0,0 +1,110 @@ +package gtPlusPlus.plugin.manager; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class Core_Manager { + + public static AutoMap mPlugins = new AutoMap(); + + /** + * @param plugin - Dynamically registers the plugin for loading. + */ + public static void registerPlugin(IPlugin plugin) { + Logger.INFO("[Plugin] " + "Registered "+plugin.getPluginName()+"."); + mPlugins.put(plugin); + } + + /** + * Dynamically loads all class objects within the "gtPlusPlus.plugin" package. + */ + public static void veryEarlyInit() { + if (ReflectionUtils.dynamicallyLoadClassesInPackage("gtPlusPlus.plugin")) { + Logger.INFO("[Plugin] Plugin System loaded."); + } + } + + public static boolean preInit() { + try { + for (IPlugin h : mPlugins) { + if (h.preInit()) { + Logger.INFO("[Plugin] Completed Pre-Init Phase for "+h.getPluginName()+"."); + } + else { + Logger.INFO("[Plugin] Failed during Pre-Init Phase for "+h.getPluginName()+"."); + } + } + return true; + } + catch (Throwable t) {} + return false; + } + + public static boolean init() { + try { + for (IPlugin h : mPlugins) { + if (h.init()) { + Logger.INFO("[Plugin] Completed Init Phase for "+h.getPluginName()+"."); + } + else { + Logger.INFO("[Plugin] Failed during Init Phase for "+h.getPluginName()+"."); + } + } + return true; + } + catch (Throwable t) {} + return false; + } + + public static boolean postInit() { + try { + for (IPlugin h : mPlugins) { + if (h.postInit()) { + Logger.INFO("[Plugin] Completed Post-Init Phase for "+h.getPluginName()+"."); + } + else { + Logger.INFO("[Plugin] Failed during Post-Init Phase for "+h.getPluginName()+"."); + } + } + return true; + } + catch (Throwable t) {} + return false; + } + + public static boolean serverStart() { + try { + for (IPlugin h : mPlugins) { + if (h.serverStart()) { + Logger.INFO("[Plugin] Completed Server Start Phase for "+h.getPluginName()+"."); + } + else { + Logger.INFO("[Plugin] Failed during Server Start Phase for "+h.getPluginName()+"."); + } + } + return true; + } + catch (Throwable t) {} + return false; + } + + public static boolean serverStop() { + try { + for (IPlugin h : mPlugins) { + if (h.serverStop()) { + Logger.INFO("[Plugin] Completed Server Stop Phase for "+h.getPluginName()+"."); + } + else { + Logger.INFO("[Plugin] Failed during Server Stop Phase for "+h.getPluginName()+"."); + } + } + return true; + } + catch (Throwable t) {} + return false; + } + + +} diff --git a/src/main/java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java b/src/main/java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java new file mode 100644 index 0000000000..ed6762c69d --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/sulfurchem/Core_SulfuricChemistry.java @@ -0,0 +1,314 @@ +package gtPlusPlus.plugin.sulfurchem; + +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.plugin.manager.Core_Manager; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class Core_SulfuricChemistry implements IPlugin { + + final static Core_SulfuricChemistry mInstance; + private static boolean shouldLoad = false; + + private static AutoMap mRemovedRecipes1 = new AutoMap(); + private static AutoMap mRemovedRecipes2 = new AutoMap(); + + static { + mInstance = new Core_SulfuricChemistry(); + Core_Manager.registerPlugin(mInstance); + mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); + } + + @Override + public boolean preInit() { + if (/*CORE.ConfigSwitches.enableSulfuricAcidFix || *//*CORE.DEVENV*/false) { + shouldLoad = true; + } + if (shouldLoad) + return true; + return false; + } + + @Override + public boolean init() { + if (shouldLoad) + return true; + return false; + } + + @Override + public boolean postInit() { + if (shouldLoad) { + try { + int disabled = disableSulfurTrioxide(); + log("Disabled "+disabled+" Sulfur Trioxide Chemistry recipes."); + int disabled2 = disableSulfuricAcid(); + log("Disabled "+disabled2+" Sulfuric Acid Chemistry recipes."); + int addedNew = addRevisedGT6Recipes(); + log("Added "+addedNew+" new Sulfuric Chemistry recipes."); + + if (CORE.DEVENV || CORE_Preloader.DEBUG_MODE) { + for (int i=0;i<2;i++) { + for (GT_Recipe m : mRemovedRecipes1) { + String[] mInfo = RecipeUtils.getRecipeInfo(m); + log("Removed Recipe"); + for (int r=0;r 0 && addedNew > 0; + } + catch (Throwable t) { + t.printStackTrace(); + } + } + return false; + } + + @Override + public boolean serverStart() { + return false; + } + + @Override + public boolean serverStop() { + return false; + } + + @Override + public String getPluginName() { + return "GT++ Revised Sulfuric Chemistry Module"; + } + + public int addRevisedGT6Recipes() { + + String catalyst = "dustPlatinum"; + int mCountAdded = 0; + + /** + * Sulfur Trioxide Recipes + */ + //Air + if (CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), + ItemUtils.getItemStackOfAmountFromOreDict("cellAir", 1), + FluidUtils.getFluidStack("sulfurdioxide", 3000), + FluidUtils.getFluidStack("sulfurtrioxide", 4000), + CI.emptyCells(1), + null, + 16, + 16)) { + mCountAdded++; + } + if (CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurDioxide", 3), + FluidUtils.getFluidStack("air", 1000), + FluidUtils.getFluidStack("sulfurtrioxide", 4000), + CI.emptyCells(3), + null, + 16, + 16)) { + mCountAdded++; + } + //Oxygen + if (CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), + ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), + FluidUtils.getFluidStack("sulfurdioxide", 3000), + FluidUtils.getFluidStack("sulfurtrioxide", 4000), + CI.emptyCells(1), + null, + 16, + 16)) { + mCountAdded++; + } + if (CORE.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(catalyst, 0), + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurDioxide", 3), + FluidUtils.getFluidStack("oxygen", 1000), + FluidUtils.getFluidStack("sulfurtrioxide", 4000), + CI.emptyCells(3), + null, + 16, + 16)) { + mCountAdded++; + } + + /** + * Sulfuric Acid Recipes + */ + + if (CORE.RA.addChemicalRecipe( + CI.getNumberedCircuit(22), + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurTrioxide", 1), + FluidUtils.getFluidStack("water", 750), + Materials.SulfuricAcid.getFluid(1750), + CI.emptyCells(1), + null, + 20, + 20)) { + mCountAdded++; + } + if (CORE.RA.addChemicalRecipe( + CI.getNumberedCircuit(22), + ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 3), + FluidUtils.getFluidStack("sulfurtrioxide", 4000), + Materials.SulfuricAcid.getFluid(7000), + CI.emptyCells(3), + null, + 20, + 20)) { + mCountAdded++; + } + + return mCountAdded; + } + + + public int disableSulfurTrioxide() { + int mDisabled = 0; + FluidStack mStack = FluidUtils.getFluidStack("sulfurtrioxide", 1); + //Single Block Recipes + recipe : for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList) { + for (ItemStack i : r.mOutputs) { + i.stackSize = 1; + if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurTrioxide", 1))) { + mRemovedRecipes1.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + for (FluidStack f : r.mFluidOutputs) { + f.amount = 1; + if (FluidStack.areFluidStackTagsEqual(f, mStack)) { + mRemovedRecipes1.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + } + + //Multi Block Recipes + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + recipe : for (GT_Recipe r : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { + for (ItemStack i : r.mOutputs) { + i.stackSize = 1; + if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfurTrioxide", 1))) { + mRemovedRecipes1.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + for (FluidStack f : r.mFluidOutputs) { + f.amount = 1; + if (FluidStack.areFluidStackTagsEqual(f, mStack)) { + mRemovedRecipes1.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + } + } + + return mDisabled; + } + + public int disableSulfuricAcid() { + int mDisabled = 0; + FluidStack mStack = FluidUtils.getFluidStack("sulfuricacid", 1); + //Single Block Recipes + + recipe : for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList) { + for (ItemStack i : r.mOutputs) { + i.stackSize = 1; + if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 1))) { + mRemovedRecipes2.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + for (FluidStack f : r.mFluidOutputs) { + f.amount = 1; + if (FluidStack.areFluidStackTagsEqual(f, mStack)) { + mRemovedRecipes2.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + } + + //Multi Block Recipes + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + recipe : for (GT_Recipe r : StaticFields59.getLargeChemicalReactorRecipeMap().mRecipeList) { + for (ItemStack i : r.mOutputs) { + i.stackSize = 1; + if (ItemStack.areItemStacksEqual(i, ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 1))) { + mRemovedRecipes2.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + for (FluidStack f : r.mFluidOutputs) { + f.amount = 1; + if (FluidStack.areFluidStackTagsEqual(f, mStack)) { + mRemovedRecipes2.put(r); + r.mEnabled = false; + r.mHidden = true; + mDisabled++; + continue recipe; + } + continue; + } + } + } + + return mDisabled; + } + + @Override + public String getPluginAbbreviation() { + return "RSCM"; + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java b/src/main/java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java new file mode 100644 index 0000000000..09e4c4865f --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/Core_VillagerAdditions.java @@ -0,0 +1,130 @@ +package gtPlusPlus.plugin.villagers; + +import static gtPlusPlus.plugin.villagers.VillagerUtils.mVillagerMap; + +import java.util.HashMap; + +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.VillagerRegistry; +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.entity.EntityPrimedMiningExplosive; +import gtPlusPlus.core.entity.monster.EntityGiantChickenBase; +import gtPlusPlus.core.entity.monster.EntitySickBlaze; +import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.plugin.manager.Core_Manager; +import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner; +import gtPlusPlus.plugin.villagers.entity.EntityBaseVillager; +import gtPlusPlus.plugin.villagers.entity.EntityNativeAustralian; +import gtPlusPlus.plugin.villagers.trade.TradeHandlerAboriginal; +import gtPlusPlus.plugin.villagers.trade.TradeHandlerBanker; +import gtPlusPlus.plugin.villagers.trade.TradeHandlerTechnician; +import gtPlusPlus.plugin.villagers.trade.TradeHandlerTrader; +import net.minecraft.util.ResourceLocation; + +public class Core_VillagerAdditions implements IPlugin { + + public final static Core_VillagerAdditions mInstance; + private static boolean shouldLoad = false; + + public static final HashMap mVillagerSkins = new HashMap(); + public static final AutoMap> mVillagerTrades = new AutoMap>(); + + static { + mInstance = new Core_VillagerAdditions(); + Core_Manager.registerPlugin(mInstance); + mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); + } + + @Override + public boolean preInit() { + if (/*CORE.ConfigSwitches.enableSulfuricAcidFix || */CORE.DEVENV) { + shouldLoad = true; + } + if (shouldLoad) { + //Register Custom Villager Entity + EntityRegistry.registerGlobalEntityID(EntityBaseVillager.class, "WiseVillager", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(180, 120, 120), Utils.rgbtoHexValue(0, 0, 0)); + EntityRegistry.registerGlobalEntityID(EntityNativeAustralian.class, "Aboriginal", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(50, 50, 50), Utils.rgbtoHexValue(25, 25, 25)); + VillagerUtils.registerNewVillager(0, "Banker", "Banker", "Banker", "banker", new TradeHandlerBanker()); + VillagerUtils.registerNewVillager(1, "Technician", "Technician", "Technician", "technician", new TradeHandlerTechnician()); + VillagerUtils.registerNewVillager(2, "Trader", "Trader", "Trader", "trader", new TradeHandlerTrader()); + VillagerUtils.registerNewVillager(3, "Aboriginal", "Aboriginal", "Aboriginal", "aboriginal", new TradeHandlerAboriginal()); + + if (mVillagerMap.size() > 0) { + for (VillagerObject g : mVillagerMap.values()) { + if (g != null && g.mID >= 0) { + VillagerRegistry.instance().registerVillagerId(7735+g.mID); + log("Registered a Custom Villager with ID of "+g.mID+"."); + //Utils.createNewMobSpawner(10+g.mID, EntityBaseVillager.class); + if (mVillagerSkins.get(g.mID) != null) { + VillagerRegistry.instance().registerVillagerSkin(7735+g.mID, mVillagerSkins.get(g.mID)); + log("Registered a Custom Skin for Villager with ID of "+g.mID+"."); + } + } + } + } + + //Register all Villager ID's and their Custom Trades. + if (mVillagerTrades.size() > 0) { + for (Pair g : mVillagerTrades) { + if (g != null && g.getKey() != null) { + if (g.getValue() != null) { + VillagerRegistry.instance().registerVillageTradeHandler(g.getKey(), g.getValue()); + log("Registered a Custom Trade for Villager with ID of "+g.getKey()+"."); + } + } + } + } + return true; + } + return false; + } + + @Override + public boolean init() { + if (shouldLoad) { + return true; + } + return false; + } + + @Override + public boolean postInit() { + if (shouldLoad) { + return true; + } + return false; + } + + @Override + public boolean serverStart() { + if (shouldLoad) { + return true; + } + return false; + } + + @Override + public boolean serverStop() { + if (shouldLoad) { + return true; + } + return false; + } + + @Override + public String getPluginName() { + return "GT++ Enhanced Villagers"; + } + + @Override + public String getPluginAbbreviation() { + return "Bank"; + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/NameLists.java b/src/main/java/gtPlusPlus/plugin/villagers/NameLists.java new file mode 100644 index 0000000000..e9cd254503 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/NameLists.java @@ -0,0 +1,994 @@ +package gtPlusPlus.plugin.villagers; + +import org.apache.commons.lang3.StringUtils; + +import gtPlusPlus.core.util.math.MathUtils; + +public class NameLists { + + public static final String[] mFirstNames; + public static final String[] mLastNames; + public static final String[] mScottishFirstNames; + + static { + mFirstNames = generateFirstNames(); + mLastNames = generateLastNames(); + mScottishFirstNames = generateScottishFirstNames(); + } + + + private static final String[] generateScottishFirstNames() { + return new String[] { "Aadam", "Aadit", "Aahron", "Aaran", "Aaren", + "Aarez", "Aarman", "Aaron", "Aaron-James", "Aarron", "Aaryan", "Aaryn", "Aayan", "Aazaan", "Abaan", "Abbas", + "Abdallah", "Abdalroof", "Abdihakim", "Abdirahman", "Abdisalam", "Abdul", "Abdul-Aziz", "Abdulbasir", + "Abdulkadir", "Abdulkarem", "Abdulkhader", "Abdullah", "Abdul-Majeed", "Abdulmalik", "Abdul-Rehman", + "Abdur", "Abdurraheem", "Abdur-Rahman", "Abdur-Rehmaan", "Abel", "Abhinav", "Abhisumant", "Abid", "Abir", + "Abraham", "Abu", "Abubakar", "Ace", "Adain", "Adam", "Adam-James", "Addison", "Addisson", "Adegbola", + "Adegbolahan", "Aden", "Adenn", "Adie", "Adil", "Aditya", "Adnan", "Adrian", "Adrien", "Aedan", "Aedin", + "Aedyn", "Aeron", "Afonso", "Ahmad", "Ahmed", "Ahmed-Aziz", "Ahoua", "Ahtasham", "Aiadan", "Aidan", "Aiden", + "Aiden-Jack", "Aiden-Vee", "Aidian", "Aidy", "Ailin", "Aiman", "Ainsley", "Ainslie", "Airen", "Airidas", + "Airlie", "AJ", "Ajay", "A-Jay", "Ajayraj", "Akan", "Akram", "Al", "Ala'", "Alan", "Alanas", "Alasdair", + "Alastair", "Alber", "Albert", "Albie", "Aldred", "Alec", "Aled", "Aleem", "Aleksandar", "Aleksander", + "Aleksandr", "Aleksandrs", "Alekzander", "Alessandro", "Alessio", "Alex", "Alexander", "Alexei", "Alexx", + "Alexzander", "Alf", "Alfee", "Alfie", "Alfred", "Alfy", "Alhaji", "Al-Hassan", "Ali", "Aliekber", "Alieu", + "Alihaider", "Alisdair", "Alishan", "Alistair", "Alistar", "Alister", "Aliyaan", "Allan", "Allan-Laiton", + "Allen", "Allesandro", "Allister", "Ally", "Alphonse", "Altyiab", "Alum", "Alvern", "Alvin", "Alyas", + "Amaan", "Aman", "Amani", "Ambanimoh", "Ameer", "Amgad", "Ami", "Amin", "Amir", "Ammaar", "Ammar", "Ammer", + "Amolpreet", "Amos", "Amrinder", "Amrit", "Amro", "Anay", "Andrea", "Andreas", "Andrei", "Andrejs", + "Andrew", "Andy", "Anees", "Anesu", "Angel", "Angelo", "Angus", "Anir", "Anis", "Anish", "Anmolpreet", + "Annan", "Anndra", "Anselm", "Anthony", "Anthony-John", "Antoine", "Anton", "Antoni", "Antonio", "Antony", + "Antonyo", "Anubhav", "Aodhan", "Aon", "Aonghus", "Apisai", "Arafat", "Aran", "Arandeep", "Arann", "Aray", + "Arayan", "Archibald", "Archie", "Arda", "Ardal", "Ardeshir", "Areeb", "Areez", "Aref", "Arfin", "Argyle", + "Argyll", "Ari", "Aria", "Arian", "Arihant", "Aristomenis", "Aristotelis", "Arjuna", "Arlo", "Armaan", + "Arman", "Armen", "Arnab", "Arnav", "Arnold", "Aron", "Aronas", "Arran", "Arrham", "Arron", "Arryn", + "Arsalan", "Artem", "Arthur", "Artur", "Arturo", "Arun", "Arunas", "Arved", "Arya", "Aryan", "Aryankhan", + "Aryian", "Aryn", "Asa", "Asfhan", "Ash", "Ashlee-jay", "Ashley", "Ashton", "Ashton-Lloyd", "Ashtyn", + "Ashwin", "Asif", "Asim", "Aslam", "Asrar", "Ata", "Atal", "Atapattu", "Ateeq", "Athol", "Athon", + "Athos-Carlos", "Atli", "Atom", "Attila", "Aulay", "Aun", "Austen", "Austin", "Avani", "Averon", "Avi", + "Avinash", "Avraham", "Awais", "Awwal", "Axel", "Ayaan", "Ayan", "Aydan", "Ayden", "Aydin", "Aydon", + "Ayman", "Ayomide", "Ayren", "Ayrton", "Aytug", "Ayub", "Ayyub", "Azaan", "Azedine", "Azeem", "Azim", + "Aziz", "Azlan", "Azzam", "Azzedine", "Babatunmise", "Babur", "Bader", "Badr", "Badsha", "Bailee", "Bailey", + "Bailie", "Bailley", "Baillie", "Baley", "Balian", "Banan", "Barath", "Barkley", "Barney", "Baron", + "Barrie", "Barry", "Bartlomiej", "Bartosz", "Basher", "Basile", "Baxter", "Baye", "Bayley", "Beau", "Beinn", + "Bekim", "Believe", "Ben", "Bendeguz", "Benedict", "Benjamin", "Benjamyn", "Benji", "Benn", "Bennett", + "Benny", "Benoit", "Bentley", "Berkay", "Bernard", "Bertie", "Bevin", "Bezalel", "Bhaaldeen", "Bharath", + "Bilal", "Bill", "Billy", "Binod", "Bjorn", "Blaike", "Blaine", "Blair", "Blaire", "Blake", "Blazej", + "Blazey", "Blessing", "Blue", "Blyth", "Bo", "Boab", "Bob", "Bobby", "Bobby-Lee", "Bodhan", "Boedyn", + "Bogdan", "Bohbi", "Bony", "Bowen", "Bowie", "Boyd", "Bracken", "Brad", "Bradan", "Braden", "Bradley", + "Bradlie", "Bradly", "Brady", "Bradyn", "Braeden", "Braiden", "Brajan", "Brandan", "Branden", "Brandon", + "Brandonlee", "Brandon-Lee", "Brandyn", "Brannan", "Brayden", "Braydon", "Braydyn", "Breandan", "Brehme", + "Brendan", "Brendon", "Brendyn", "Breogan", "Bret", "Brett", "Briaddon", "Brian", "Brodi", "Brodie", + "Brody", "Brogan", "Broghan", "Brooke", "Brooklin", "Brooklyn", "Bruce", "Bruin", "Bruno", "Brunon", + "Bryan", "Bryce", "Bryden", "Brydon", "Brydon-Craig", "Bryn", "Brynmor", "Bryson", "Buddy", "Bully", + "Burak", "Burhan", "Butali", "Butchi", "Byron", "Cabhan", "Cadan", "Cade", "Caden", "Cadon", "Cadyn", + "Caedan", "Caedyn", "Cael", "Caelan", "Caelen", "Caethan", "Cahl", "Cahlum", "Cai", "Caidan", "Caiden", + "Caiden-Paul", "Caidyn", "Caie", "Cailaen", "Cailean", "Caileb-John", "Cailin", "Cain", "Caine", "Cairn", + "Cal", "Calan", "Calder", "Cale", "Calean", "Caleb", "Calen", "Caley", "Calib", "Calin", "Callahan", + "Callan", "Callan-Adam", "Calley", "Callie", "Callin", "Callum", "Callun", "Callyn", "Calum", "Calum-James", + "Calvin", "Cambell", "Camerin", "Cameron", "Campbel", "Campbell", "Camron", "Caolain", "Caolan", "Carl", + "Carlo", "Carlos", "Carrich", "Carrick", "Carson", "Carter", "Carwyn", "Casey", "Casper", "Cassy", "Cathal", + "Cator", "Cavan", "Cayden", "Cayden-Robert", "Cayden-Tiamo", "Ceejay", "Ceilan", "Ceiran", "Ceirin", + "Ceiron", "Cejay", "Celik", "Cephas", "Cesar", "Cesare", "Chad", "Chaitanya", "Chang-Ha", "Charles", + "Charley", "Charlie", "Charly", "Chase", "Che", "Chester", "Chevy", "Chi", "Chibudom", "Chidera", "Chimsom", + "Chin", "Chintu", "Chiqal", "Chiron", "Chris", "Chris-Daniel", "Chrismedi", "Christian", "Christie", + "Christoph", "Christopher", "Christopher-Lee", "Christy", "Chu", "Chukwuemeka", "Cian", "Ciann", "Ciar", + "Ciaran", "Ciarian", "Cieran", "Cillian", "Cillin", "Cinar", "CJ", "C-Jay", "Clark", "Clarke", "Clayton", + "Clement", "Clifford", "Clyde", "Cobain", "Coban", "Coben", "Cobi", "Cobie", "Coby", "Codey", "Codi", + "Codie", "Cody", "Cody-Lee", "Coel", "Cohan", "Cohen", "Colby", "Cole", "Colin", "Coll", "Colm", "Colt", + "Colton", "Colum", "Colvin", "Comghan", "Conal", "Conall", "Conan", "Conar", "Conghaile", "Conlan", + "Conley", "Conli", "Conlin", "Conlly", "Conlon", "Conlyn", "Connal", "Connall", "Connan", "Connar", + "Connel", "Connell", "Conner", "Connolly", "Connor", "Connor-David", "Conor", "Conrad", "Cooper", + "Copeland", "Coray", "Corben", "Corbin", "Corey", "Corey-James", "Corey-Jay", "Cori", "Corie", "Corin", + "Cormac", "Cormack", "Cormak", "Corran", "Corrie", "Cory", "Cosmo", "Coupar", "Craig", "Craig-James", + "Crawford", "Creag", "Crispin", "Cristian", "Crombie", "Cruiz", "Cruz", "Cuillin", "Cullen", "Cullin", + "Curtis", "Cyrus", "Daanyaal", "Daegan", "Daegyu", "Dafydd", "Dagon", "Dailey", "Daimhin", "Daithi", + "Dakota", "Daksh", "Dale", "Dalong", "Dalton", "Damian", "Damien", "Damon", "Dan", "Danar", "Dane", + "Danial", "Daniel", "Daniele", "Daniel-James", "Daniels", "Daniil", "Danish", "Daniyal", "Danniel", "Danny", + "Dante", "Danyal", "Danyil", "Danys", "Daood", "Dara", "Darach", "Daragh", "Darcy", "D'arcy", "Dareh", + "Daren", "Darien", "Darius", "Darl", "Darn", "Darrach", "Darragh", "Darrel", "Darrell", "Darren", "Darrie", + "Darrius", "Darroch", "Darryl", "Darryn", "Darwyn", "Daryl", "Daryn", "Daud", "Daumantas", "Davi", "David", + "David-Jay", "David-Lee", "Davie", "Davis", "Davy", "Dawid", "Dawson", "Dawud", "Dayem", "Daymian", + "Deacon", "Deagan", "Dean", "Deano", "Decklan", "Declain", "Declan", "Declyan", "Declyn", "Dedeniseoluwa", + "Deecan", "Deegan", "Deelan", "Deklain-Jaimes", "Del", "Demetrius", "Denis", "Deniss", "Dennan", "Dennin", + "Dennis", "Denny", "Dennys", "Denon", "Denton", "Denver", "Denzel", "Deon", "Derek", "Derick", "Derin", + "Dermot", "Derren", "Derrie", "Derrin", "Derron", "Derry", "Derryn", "Deryn", "Deshawn", "Desmond", "Dev", + "Devan", "Devin", "Devlin", "Devlyn", "Devon", "Devrin", "Devyn", "Dex", "Dexter", "Dhani", "Dharam", + "Dhavid", "Dhyia", "Diarmaid", "Diarmid", "Diarmuid", "Didier", "Diego", "Diesel", "Diesil", "Digby", + "Dilan", "Dilano", "Dillan", "Dillon", "Dilraj", "Dimitri", "Dinaras", "Dion", "Dissanayake", "Dmitri", + "Doire", "Dolan", "Domanic", "Domenico", "Domhnall", "Dominic", "Dominick", "Dominik", "Donald", "Donnacha", + "Donnie", "Dorian", "Dougal", "Douglas", "Dougray", "Drakeo", "Dre", "Dregan", "Drew", "Dugald", "Duncan", + "Duriel", "Dustin", "Dylan", "Dylan-Jack", "Dylan-James", "Dylan-John", "Dylan-Patrick", "Dylin", "Dyllan", + "Dyllan-James", "Dyllon", "Eadie", "Eagann", "Eamon", "Eamonn", "Eason", "Eassan", "Easton", "Ebow", "Ed", + "Eddie", "Eden", "Ediomi", "Edison", "Eduardo", "Eduards", "Edward", "Edwin", "Edwyn", "Eesa", "Efan", + "Efe", "Ege", "Ehsan", "Ehsen", "Eiddon", "Eidhan", "Eihli", "Eimantas", "Eisa", "Eli", "Elias", "Elijah", + "Eliot", "Elisau", "Eljay", "Eljon", "Elliot", "Elliott", "Ellis", "Ellisandro", "Elshan", "Elvin", "Elyan", + "Emanuel", "Emerson", "Emil", "Emile", "Emir", "Emlyn", "Emmanuel", "Emmet", "Eng", "Eniola", "Enis", + "Ennis", "Enrico", "Enrique", "Enzo", "Eoghain", "Eoghan", "Eoin", "Eonan", "Erdehan", "Eren", "Erencem", + "Eric", "Ericlee", "Erik", "Eriz", "Ernie-Jacks", "Eroni", "Eryk", "Eshan", "Essa", "Esteban", "Ethan", + "Etienne", "Etinosa", "Euan", "Eugene", "Evan", "Evann", "Ewan", "Ewen", "Ewing", "Exodi", "Ezekiel", + "Ezra", "Fabian", "Fahad", "Faheem", "Faisal", "Faizaan", "Famara", "Fares", "Farhaan", "Farhan", "Farren", + "Farzad", "Fauzaan", "Favour", "Fawaz", "Fawkes", "Faysal", "Fearghus", "Feden", "Felix", "Fergal", + "Fergie", "Fergus", "Ferre", "Fezaan", "Fiachra", "Fikret", "Filip", "Filippo", "Finan", "Findlay", + "Findlay-James", "Findlie", "Finlay", "Finley", "Finn", "Finnan", "Finnean", "Finnen", "Finnlay", "Finnley", + "Fintan", "Fionn", "Firaaz", "Fletcher", "Flint", "Florin", "Flyn", "Flynn", "Fodeba", "Folarinwa", + "Forbes", "Forgan", "Forrest", "Fox", "Francesco", "Francis", "Francisco", "Franciszek", "Franco", "Frank", + "Frankie", "Franklin", "Franko", "Fraser", "Frazer", "Fred", "Freddie", "Frederick", "Fruin", "Fyfe", "Fyn", + "Fynlay", "Fynn", "Gabriel", "Gallagher", "Gareth", "Garren", "Garrett", "Garry", "Gary", "Gavin", + "Gavin-Lee", "Gene", "Geoff", "Geoffrey", "Geomer", "Geordan", "Geordie", "George", "Georgia", "Georgy", + "Gerard", "Ghyll", "Giacomo", "Gian", "Giancarlo", "Gianluca", "Gianmarco", "Gideon", "Gil", "Gio", + "Girijan", "Girius", "Gjan", "Glascott", "Glen", "Glenn", "Gordon", "Grady", "Graeme", "Graham", "Grahame", + "Grant", "Grayson", "Greg", "Gregor", "Gregory", "Greig", "Griffin", "Griffyn", "Grzegorz", "Guang", + "Guerin", "Guillaume", "Gurardass", "Gurdeep", "Gursees", "Gurthar", "Gurveer", "Gurwinder", "Gus", + "Gustav", "Guthrie", "Guy", "Gytis", "Habeeb", "Hadji", "Hadyn", "Hagun", "Haiden", "Haider", "Hamad", + "Hamid", "Hamish", "Hamza", "Hamzah", "Han", "Hansen", "Hao", "Hareem", "Hari", "Harikrishna", "Haris", + "Harish", "Harjeevan", "Harjyot", "Harlee", "Harleigh", "Harley", "Harman", "Harnek", "Harold", "Haroon", + "Harper", "Harri", "Harrington", "Harris", "Harrison", "Harry", "Harvey", "Harvie", "Harvinder", "Hasan", + "Haseeb", "Hashem", "Hashim", "Hassan", "Hassanali", "Hately", "Havila", "Hayden", "Haydn", "Haydon", + "Haydyn", "Hcen", "Hector", "Heddle", "Heidar", "Heini", "Hendri", "Henri", "Henry", "Herbert", "Heyden", + "Hiro", "Hirvaansh", "Hishaam", "Hogan", "Honey", "Hong", "Hope", "Hopkin", "Hosea", "Howard", "Howie", + "Hristomir", "Hubert", "Hugh", "Hugo", "Humza", "Hunter", "Husnain", "Hussain", "Hussan", "Hussnain", + "Hussnan", "Hyden", "I", "Iagan", "Iain", "Ian", "Ibraheem", "Ibrahim", "Idahosa", "Idrees", "Idris", + "Iestyn", "Ieuan", "Igor", "Ihtisham", "Ijay", "Ikechukwu", "Ikemsinachukwu", "Ilyaas", "Ilyas", "Iman", + "Immanuel", "Inan", "Indy", "Ines", "Innes", "Ioannis", "Ireayomide", "Ireoluwa", "Irvin", "Irvine", "Isa", + "Isaa", "Isaac", "Isaiah", "Isak", "Isher", "Ishwar", "Isimeli", "Isira", "Ismaeel", "Ismail", "Israel", + "Issiaka", "Ivan", "Ivar", "Izaak", "J", "Jaay", "Jac", "Jace", "Jack", "Jacki", "Jackie", "Jack-James", + "Jackson", "Jacky", "Jacob", "Jacques", "Jad", "Jaden", "Jadon", "Jadyn", "Jae", "Jagat", "Jago", "Jaheim", + "Jahid", "Jahy", "Jai", "Jaida", "Jaiden", "Jaidyn", "Jaii", "Jaime", "Jai-Rajaram", "Jaise", "Jak", "Jake", + "Jakey", "Jakob", "Jaksyn", "Jakub", "Jamaal", "Jamal", "Jameel", "Jameil", "James", "James-Paul", "Jamey", + "Jamie", "Jan", "Jaosha", "Jardine", "Jared", "Jarell", "Jarl", "Jarno", "Jarred", "Jarvi", "Jasey-Jay", + "Jasim", "Jaskaran", "Jason", "Jasper", "Jaxon", "Jaxson", "Jay", "Jaydan", "Jayden", "Jayden-James", + "Jayden-Lee", "Jayden-Paul", "Jayden-Thomas", "Jaydn", "Jaydon", "Jaydyn", "Jayhan", "Jay-Jay", "Jayke", + "Jaymie", "Jayse", "Jayson", "Jaz", "Jazeb", "Jazib", "Jazz", "Jean", "Jean-Lewis", "Jean-Pierre", + "Jebadiah", "Jed", "Jedd", "Jedidiah", "Jeemie", "Jeevan", "Jeffrey", "Jensen", "Jenson", "Jensyn", + "Jeremy", "Jerome", "Jeronimo", "Jerrick", "Jerry", "Jesse", "Jesuseun", "Jeswin", "Jevan", "Jeyun", "Jez", + "Jia", "Jian", "Jiao", "Jimmy", "Jincheng", "JJ", "Joaquin", "Joash", "Jock", "Jody", "Joe", "Joeddy", + "Joel", "Joey", "Joey-Jack", "Johann", "Johannes", "Johansson", "John", "Johnathan", "Johndean", "Johnjay", + "John-Michael", "Johnnie", "Johnny", "Johnpaul", "John-Paul", "John-Scott", "Johnson", "Jole", "Jomuel", + "Jon", "Jonah", "Jonatan", "Jonathan", "Jonathon", "Jonny", "Jonothan", "Jon-Paul", "Jonson", "Joojo", + "Jordan", "Jordi", "Jordon", "Jordy", "Jordyn", "Jorge", "Joris", "Jorryn", "Josan", "Josef", "Joseph", + "Josese", "Josh", "Joshiah", "Joshua", "Josiah", "Joss", "Jostelle", "Joynul", "Juan", "Jubin", "Judah", + "Jude", "Jules", "Julian", "Julien", "Jun", "Junior", "Jura", "Justan", "Justin", "Justinas", "Kaan", + "Kabeer", "Kabir", "Kacey", "Kacper", "Kade", "Kaden", "Kadin", "Kadyn", "Kaeden", "Kael", "Kaelan", + "Kaelin", "Kaelum", "Kai", "Kaid", "Kaidan", "Kaiden", "Kaidinn", "Kaidyn", "Kaileb", "Kailin", "Kain", + "Kaine", "Kainin", "Kainui", "Kairn", "Kaison", "Kaiwen", "Kajally", "Kajetan", "Kalani", "Kale", "Kaleb", + "Kaleem", "Kal-el", "Kalen", "Kalin", "Kallan", "Kallin", "Kalum", "Kalvin", "Kalvyn", "Kameron", "Kames", + "Kamil", "Kamran", "Kamron", "Kane", "Karam", "Karamvir", "Karandeep", "Kareem", "Karim", "Karimas", "Karl", + "Karol", "Karson", "Karsyn", "Karthikeya", "Kasey", "Kash", "Kashif", "Kasim", "Kasper", "Kasra", "Kavin", + "Kayam", "Kaydan", "Kayden", "Kaydin", "Kaydn", "Kaydyn", "Kaydyne", "Kayleb", "Kaylem", "Kaylum", "Kayne", + "Kaywan", "Kealan", "Kealon", "Kean", "Keane", "Kearney", "Keatin", "Keaton", "Keavan", "Keayn", "Kedrick", + "Keegan", "Keelan", "Keelin", "Keeman", "Keenan", "Keenan-Lee", "Keeton", "Kehinde", "Keigan", "Keilan", + "Keir", "Keiran", "Keiren", "Keiron", "Keiryn", "Keison", "Keith", "Keivlin", "Kelam", "Kelan", "Kellan", + "Kellen", "Kelso", "Kelum", "Kelvan", "Kelvin", "Ken", "Kenan", "Kendall", "Kendyn", "Kenlin", "Kenneth", + "Kensey", "Kenton", "Kenyon", "Kenzeigh", "Kenzi", "Kenzie", "Kenzo", "Kenzy", "Keo", "Ker", "Kern", "Kerr", + "Kevan", "Kevin", "Kevyn", "Kez", "Khai", "Khalan", "Khaleel", "Khaya", "Khevien", "Khizar", "Khizer", + "Kia", "Kian", "Kian-James", "Kiaran", "Kiarash", "Kie", "Kiefer", "Kiegan", "Kienan", "Kier", "Kieran", + "Kieran-Scott", "Kieren", "Kierin", "Kiern", "Kieron", "Kieryn", "Kile", "Killian", "Kimi", "Kingston", + "Kinneil", "Kinnon", "Kinsey", "Kiran", "Kirk", "Kirwin", "Kit", "Kiya", "Kiyonari", "Kjae", "Klein", + "Klevis", "Kobe", "Kobi", "Koby", "Koddi", "Koden", "Kodi", "Kodie", "Kody", "Kofi", "Kogan", "Kohen", + "Kole", "Konan", "Konar", "Konnor", "Konrad", "Koray", "Korben", "Korbyn", "Korey", "Kori", "Korrin", + "Kory", "Koushik", "Kris", "Krish", "Krishan", "Kriss", "Kristian", "Kristin", "Kristofer", "Kristoffer", + "Kristopher", "Kruz", "Krzysiek", "Krzysztof", "Ksawery", "Ksawier", "Kuba", "Kurt", "Kurtis", "Kurtis-Jae", + "Kyaan", "Kyan", "Kyde", "Kyden", "Kye", "Kyel", "Kyhran", "Kyie", "Kylan", "Kylar", "Kyle", "Kyle-Derek", + "Kylian", "Kym", "Kynan", "Kyral", "Kyran", "Kyren", "Kyrillos", "Kyro", "Kyron", "Kyrran", "Lachlainn", + "Lachlan", "Lachlann", "Lael", "Lagan", "Laird", "Laison", "Lakshya", "Lance", "Lancelot", "Landon", "Lang", + "Lasse", "Latif", "Lauchlan", "Lauchlin", "Laughlan", "Lauren", "Laurence", "Laurie", "Lawlyn", "Lawrence", + "Lawrie", "Lawson", "Layne", "Layton", "Lee", "Leigh", "Leigham", "Leighton", "Leilan", "Leiten", "Leithen", + "Leland", "Lenin", "Lennan", "Lennen", "Lennex", "Lennon", "Lennox", "Lenny", "Leno", "Lenon", "Lenyn", + "Leo", "Leon", "Leonard", "Leonardas", "Leonardo", "Lepeng", "Leroy", "Leven", "Levi", "Levon", "Levy", + "Lewie", "Lewin", "Lewis", "Lex", "Leydon", "Leyland", "Leylann", "Leyton", "Liall", "Liam", "Liam-Stephen", + "Limo", "Lincoln", "Lincoln-John", "Lincon", "Linden", "Linton", "Lionel", "Lisandro", "Litrell", + "Liyonela-Elam", "LLeyton", "Lliam", "Lloyd", "Lloyde", "Loche", "Lochlan", "Lochlann", "Lochlan-Oliver", + "Lock", "Lockey", "Logan", "Logann", "Logan-Rhys", "Loghan", "Lokesh", "Loki", "Lomond", "Lorcan", "Lorenz", + "Lorenzo", "Lorne", "Loudon", "Loui", "Louie", "Louis", "Loukas", "Lovell", "Luc", "Luca", "Lucais", + "Lucas", "Lucca", "Lucian", "Luciano", "Lucien", "Lucus", "Luic", "Luis", "Luk", "Luka", "Lukas", "Lukasz", + "Luke", "Lukmaan", "Luqman", "Lyall", "Lyle", "Lyndsay", "Lysander", "Maanav", "Maaz", "Mac", "Macallum", + "Macaulay", "Macauley", "Macaully", "Machlan", "Maciej", "Mack", "Mackenzie", "Mackenzy", "Mackie", + "Macsen", "Macy", "Madaki", "Maddison", "Maddox", "Madison", "Madison-Jake", "Madox", "Mael", "Magnus", + "Mahan", "Mahdi", "Mahmoud", "Maias", "Maison", "Maisum", "Maitlind", "Majid", "Makensie", "Makenzie", + "Makin", "Maksim", "Maksymilian", "Malachai", "Malachi", "Malachy", "Malakai", "Malakhy", "Malcolm", + "Malik", "Malikye", "Malo", "Ma'moon", "Manas", "Maneet", "Manmohan", "Manolo", "Manson", "Mantej", + "Manuel", "Manus", "Marc", "Marc-Anthony", "Marcel", "Marcello", "Marcin", "Marco", "Marcos", "Marcous", + "Marcquis", "Marcus", "Mario", "Marios", "Marius", "Mark", "Marko", "Markus", "Marley", "Marlin", "Marlon", + "Maros", "Marshall", "Martin", "Marty", "Martyn", "Marvellous", "Marvin", "Marwan", "Maryk", "Marzuq", + "Mashhood", "Mason", "Mason-Jay", "Masood", "Masson", "Matas", "Matej", "Mateusz", "Mathew", "Mathias", + "Mathu", "Mathuyan", "Mati", "Matt", "Matteo", "Matthew", "Matthew-William", "Matthias", "Max", "Maxim", + "Maximilian", "Maximillian", "Maximus", "Maxwell", "Maxx", "Mayeul", "Mayson", "Mazin", "Mcbride", + "McCaulley", "McKade", "McKauley", "McKay", "McKenzie", "McLay", "Meftah", "Mehmet", "Mehraz", "Meko", + "Melville", "Meshach", "Meyzhward", "Micah", "Michael", "Michael-Alexander", "Michael-James", "Michal", + "Michat", "Micheal", "Michee", "Mickey", "Miguel", "Mika", "Mikael", "Mi'kael", "Mikee", "Mikey", "Mikhail", + "Mikolaj", "Miles", "Millar", "Miller", "Milo", "Milos", "Milosz", "Mir", "Mirza", "Mitch", "Mitchel", + "Mitchell", "Moad", "Moayd", "Mobeen", "Modoulamin", "Modu", "Mohamad", "Mohamed", "Mohammad", + "Mohammad-Bilal", "Mohammed", "Mohanad", "Mohd", "Momin", "Momooreoluwa", "Montague", "Montgomery", "Monty", + "Moore", "Moosa", "Moray", "Morgan", "Morgyn", "Morris", "Morton", "Moshy", "Motade", "Moyes", "Msughter", + "Mueez", "Muhamadjavad", "Muhammad", "Muhammed", "Muhsin", "Muir", "Munachi", "Muneeb", "Mungo", "Munir", + "Munmair", "Munro", "Murdo", "Murray", "Murrough", "Murry", "Musa", "Musse", "Mustafa", "Mustapha", + "Muzammil", "Muzzammil", "Mykie", "Myles", "Mylo", "Nabeel", "Nadeem", "Nader", "Nagib", "Naif", "Nairn", + "Narvic", "Nash", "Nasser", "Nassir", "Natan", "Nate", "Nathan", "Nathanael", "Nathanial", "Nathaniel", + "Nathan-Rae", "Nawfal", "Nayan", "Neco", "Neil", "Nelson", "Neo", "Neshawn", "Nevan", "Nevin", + "Ngonidzashe", "Nial", "Niall", "Nicholas", "Nick", "Nickhill", "Nicki", "Nickson", "Nicky", "Nico", + "Nicodemus", "Nicol", "Nicolae", "Nicolas", "Nidhish", "Nihaal", "Nihal", "Nikash", "Nikhil", "Niki", + "Nikita", "Nikodem", "Nikolai", "Nikos", "Nilav", "Niraj", "Niro", "Niven", "Noah", "Noel", "Nolan", "Noor", + "Norman", "Norrie", "Nuada", "Nyah", "Oakley", "Oban", "Obieluem", "Obosa", "Odhran", "Odin", "Odynn", + "Ogheneochuko", "Ogheneruno", "Ohran", "Oilibhear", "Oisin", "Ojima-Ojo", "Okeoghene", "Olaf", "Ola-Oluwa", + "Olaoluwapolorimi", "Ole", "Olie", "Oliver", "Olivier", "Oliwier", "Ollie", "Olurotimi", "Oluwadamilare", + "Oluwadamiloju", "Oluwafemi", "Oluwafikunayomi", "Oluwalayomi", "Oluwatobiloba", "Oluwatoni", "Omar", + "Omri", "Oran", "Orin", "Orlando", "Orley", "Orran", "Orrick", "Orrin", "Orson", "Oryn", "Oscar", + "Osesenagha", "Oskar", "Ossian", "Oswald", "Otto", "Owain", "Owais", "Owen", "Owyn", "Oz", "Ozzy", "Pablo", + "Pacey", "Padraig", "Paolo", "Pardeepraj", "Parkash", "Parker", "Pascoe", "Pasquale", "Patrick", + "Patrick-John", "Patrikas", "Patryk", "Paul", "Pavit", "Pawel", "Pawlo", "Pearce", "Pearse", "Pearsen", + "Pedram", "Pedro", "Peirce", "Peiyan", "Pele", "Peni", "Peregrine", "Peter", "Phani", "Philip", "Philippos", + "Phinehas", "Phoenix", "Phoevos", "Pierce", "Pierre-Antoine", "Pieter", "Pietro", "Piotr", "Porter", + "Prabhjoit", "Prabodhan", "Praise", "Pranav", "Pravin", "Precious", "Prentice", "Presley", "Preston", + "Preston-Jay", "Prinay", "Prince", "Prithvi", "Promise", "Puneetpaul", "Pushkar", "Qasim", "Qirui", + "Quinlan", "Quinn", "Radmiras", "Raees", "Raegan", "Rafael", "Rafal", "Rafferty", "Rafi", "Raheem", "Rahil", + "Rahim", "Rahman", "Raith", "Raithin", "Raja", "Rajab-Ali", "Rajan", "Ralfs", "Ralph", "Ramanas", "Ramit", + "Ramone", "Ramsay", "Ramsey", "Rana", "Ranolph", "Raphael", "Rasmus", "Rasul", "Raul", "Raunaq", "Ravin", + "Ray", "Rayaan", "Rayan", "Rayane", "Rayden", "Rayhan", "Raymond", "Rayne", "Rayyan", "Raza", "Reace", + "Reagan", "Reean", "Reece", "Reed", "Reegan", "Rees", "Reese", "Reeve", "Regan", "Regean", "Reggie", + "Rehaan", "Rehan", "Reice", "Reid", "Reigan", "Reilly", "Reily", "Reis", "Reiss", "Remigiusz", "Remo", + "Remy", "Ren", "Renars", "Reng", "Rennie", "Reno", "Reo", "Reuben", "Rexford", "Reynold", "Rhein", "Rheo", + "Rhett", "Rheyden", "Rhian", "Rhoan", "Rholmark", "Rhoridh", "Rhuairidh", "Rhuan", "Rhuaridh", "Rhudi", + "Rhy", "Rhyan", "Rhyley", "Rhyon", "Rhys", "Rhys-Bernard", "Rhyse", "Riach", "Rian", "Ricards", "Riccardo", + "Ricco", "Rice", "Richard", "Richey", "Richie", "Ricky", "Rico", "Ridley", "Ridwan", "Rihab", "Rihan", + "Rihards", "Rihonn", "Rikki", "Riley", "Rio", "Rioden", "Rishi", "Ritchie", "Rivan", "Riyadh", "Riyaj", + "Roan", "Roark", "Roary", "Rob", "Robbi", "Robbie", "Robbie-lee", "Robby", "Robert", "Robert-Gordon", + "Robertjohn", "Robi", "Robin", "Rocco", "Roddy", "Roderick", "Rodrigo", "Roen", "Rogan", "Roger", "Rohaan", + "Rohan", "Rohin", "Rohit", "Rokas", "Roman", "Ronald", "Ronan", "Ronan-Benedict", "Ronin", "Ronnie", + "Rooke", "Roray", "Rori", "Rorie", "Rory", "Roshan", "Ross", "Ross-Andrew", "Rossi", "Rowan", "Rowen", + "Roy", "Ruadhan", "Ruaidhri", "Ruairi", "Ruairidh", "Ruan", "Ruaraidh", "Ruari", "Ruaridh", "Ruben", + "Rubhan", "Rubin", "Rubyn", "Rudi", "Rudy", "Rufus", "Rui", "Ruo", "Rupert", "Ruslan", "Russel", "Russell", + "Ryaan", "Ryan", "Ryan-Lee", "Ryden", "Ryder", "Ryese", "Ryhs", "Rylan", "Rylay", "Rylee", "Ryleigh", + "Ryley", "Rylie", "Ryo", "Ryszard", "Saad", "Sabeen", "Sachkirat", "Saffi", "Saghun", "Sahaib", "Sahbian", + "Sahil", "Saif", "Saifaddine", "Saim", "Sajid", "Sajjad", "Salahudin", "Salman", "Salter", "Salvador", + "Sam", "Saman", "Samar", "Samarjit", "Samatar", "Sambrid", "Sameer", "Sami", "Samir", "Sami-Ullah", + "Samual", "Samuel", "Samuela", "Samy", "Sanaullah", "Sandro", "Sandy", "Sanfur", "Sanjay", "Santiago", + "Santino", "Satveer", "Saul", "Saunders", "Savin", "Sayad", "Sayeed", "Sayf", "Scot", "Scott", + "Scott-Alexander", "Seaan", "Seamas", "Seamus", "Sean", "Seane", "Sean-James", "Sean-Paul", "Sean-Ray", + "Seb", "Sebastian", "Sebastien", "Selasi", "Seonaidh", "Sephiroth", "Sergei", "Sergio", "Seth", "Sethu", + "Seumas", "Shaarvin", "Shadow", "Shae", "Shahmir", "Shai", "Shane", "Shannon", "Sharland", "Sharoz", + "Shaughn", "Shaun", "Shaunpaul", "Shaun-Paul", "Shaun-Thomas", "Shaurya", "Shaw", "Shawn", "Shawnpaul", + "Shay", "Shayaan", "Shayan", "Shaye", "Shayne", "Shazil", "Shea", "Sheafan", "Sheigh", "Shenuk", "Sher", + "Shergo", "Sheriff", "Sherwyn", "Shiloh", "Shiraz", "Shreeram", "Shreyas", "Shyam", "Siddhant", "Siddharth", + "Sidharth", "Sidney", "Siergiej", "Silas", "Simon", "Sinai", "Skye", "Sofian", "Sohaib", "Sohail", "Soham", + "Sohan", "Sol", "Solomon", "Sonneey", "Sonni", "Sonny", "Sorley", "Soul", "Spencer", "Spondon", "Stanislaw", + "Stanley", "Stefan", "Stefano", "Stefin", "Stephen", "Stephenjunior", "Steve", "Steven", "Steven-lee", + "Stevie", "Stewart", "Stewarty", "Strachan", "Struan", "Stuart", "Su", "Subhaan", "Sudais", "Suheyb", + "Suilven", "Sukhi", "Sukhpal", "Sukhvir", "Sulayman", "Sullivan", "Sultan", "Sung", "Sunny", "Suraj", + "Surien", "Sweyn", "Syed", "Sylvain", "Symon", "Szymon", "Tadd", "Taddy", "Tadhg", "Taegan", "Taegen", + "Tai", "Tait", "Taiwo", "Talha", "Taliesin", "Talon", "Talorcan", "Tamar", "Tamiem", "Tammam", "Tanay", + "Tane", "Tanner", "Tanvir", "Tanzeel", "Taonga", "Tarik", "Tariq-Jay", "Tate", "Taylan", "Taylar", "Tayler", + "Taylor", "Taylor-Jay", "Taylor-Lee", "Tayo", "Tayyab", "Tayye", "Tayyib", "Teagan", "Tee", "Teejay", + "Tee-jay", "Tegan", "Teighen", "Teiyib", "Te-Jay", "Temba", "Teo", "Teodor", "Teos", "Terry", "Teydren", + "Theo", "Theodore", "Thiago", "Thierry", "Thom", "Thomas", "Thomas-Jay", "Thomson", "Thorben", "Thorfinn", + "Thrinei", "Thumbiko", "Tiago", "Tian", "Tiarnan", "Tibet", "Tieran", "Tiernan", "Timothy", "Timucin", + "Tiree", "Tisloh", "Titi", "Titus", "Tiylar", "TJ", "Tjay", "T'jay", "T-Jay", "Tobey", "Tobi", "Tobias", + "Tobie", "Toby", "Todd", "Tokinaga", "Toluwalase", "Tom", "Tomas", "Tomasz", "Tommi-Lee", "Tommy", "Tomson", + "Tony", "Torin", "Torquil", "Torran", "Torrin", "Torsten", "Trafford", "Trai", "Travis", "Tre", "Trent", + "Trey", "Tristain", "Tristan", "Troy", "Tubagus", "Turki", "Turner", "Ty", "Ty-Alexander", "Tye", "Tyelor", + "Tylar", "Tyler", "Tyler-James", "Tyler-Jay", "Tyllor", "Tylor", "Tymom", "Tymon", "Tymoteusz", "Tyra", + "Tyree", "Tyrnan", "Tyrone", "Tyson", "Ubaid", "Ubayd", "Uchenna", "Uilleam", "Umair", "Umar", "Umer", + "Umut", "Urban", "Uri", "Usman", "Uzair", "Uzayr", "Valen", "Valentin", "Valentino", "Valery", "Valo", + "Vasyl", "Vedantsinh", "Veeran", "Victor", "Victory", "Vinay", "Vince", "Vincent", "Vincenzo", "Vinh", + "Vinnie", "Vithujan", "Vladimir", "Vladislav", "Vrishin", "Vuyolwethu", "Wabuya", "Wai", "Walid", "Wallace", + "Walter", "Waqaas", "Warkhas", "Warren", "Warrick", "Wasif", "Wayde", "Wayne", "Wei", "Wen", "Wesley", + "Wesley-Scott", "Wiktor", "Wilkie", "Will", "William", "William-John", "Willum", "Wilson", "Windsor", + "Wojciech", "Woyenbrakemi", "Wyatt", "Wylie", "Wynn", "Xabier", "Xander", "Xavier", "Xiao", "Xida", "Xin", + "Xue", "Yadgor", "Yago", "Yahya", "Yakup", "Yang", "Yanick", "Yann", "Yannick", "Yaseen", "Yasin", "Yasir", + "Yassin", "Yoji", "Yong", "Yoolgeun", "Yorgos", "Youcef", "Yousif", "Youssef", "Yu", "Yuanyu", "Yuri", + "Yusef", "Yusuf", "Yves", "Zaaine", "Zaak", "Zac", "Zach", "Zachariah", "Zacharias", "Zacharie", + "Zacharius", "Zachariya", "Zachary", "Zachary-Marc", "Zachery", "Zack", "Zackary", "Zaid", "Zain", "Zaine", + "Zaineddine", "Zainedin", "Zak", "Zakaria", "Zakariya", "Zakary", "Zaki", "Zakir", "Zakk", "Zamaar", + "Zander", "Zane", "Zarran", "Zayd", "Zayn", "Zayne", "Ze", "Zechariah", "Zeek", "Zeeshan", "Zeid", "Zein", + "Zen", "Zendel", "Zenith", "Zennon", "Zeph", "Zerah", "Zhen", "Zhi", "Zhong", "Zhuo", "Zi", "Zidane", + "Zijie", "Zinedine", "Zion", "Zishan", "Ziya", "Ziyaan", "Zohaib", "Zohair", "Zoubaeir", "Zubair", "Zubayr", + "Zuriel", "Jaime", "Jayden", "Josie", "Juliet", "Karys", "Kathleen", "Kendra", "Keri", "Keris", "Kirstin", + "Klaudia", "Luisa", "Lydia", "Maeve", "Marnie", "Miah", "Mirrin", "Nancy", "Nia", "Nikki", "Oliwia", + "Paris", "Piper", "Pippa", "Polly", "Rhona", "Safa", "Saira", "Sarah-Louise", "Shona", "Sorcha", "Stacey", + "Tessa", "Tiffany", "Verity", "Zarah", "Zoya", "Alexandria", "Alina", "Alison", "Angela", "Arianna", + "Chanel", "Chelsey", "Coral", "Corinne", "Danni", "Darci", "Dionne", "Eliza", "Elsie", "Fatima", "Freyja", + "Holli", "Jane", "Joanne", "Karina", "Katrina", "Kaylah", "Kaylee", "Lori", "Mila", "Nikita", "Penny", + "Sylvie", "Tammy", "Alexa", "Brooklyn", "Caragh", "Codie", "Constance", "Dana", "Demi-Lee", "Emilie", + "Esther", "Frankie", "Isabelle", "Jamie-Leigh", "Jessie", "Josephine", "Kady", "Kaila", "Kerri", "Kirstie", + "Lyla", "Macey", "Maisy", "Margaret", "Marie", "Maryam", "Mercedes", "Mischa", "Rosa", "Serena", "Sian", + "Tamzin", "Vanessa", "Violet", "Yasmine", "Aisha", "Aleisha", "Ana", "Daniella", "Elsa", "Jodi", "Karly", + "Leigha", "Lila", "Melanie", "Miriam", "Regan", "Sally", "Saskia", "Simone", "Tess", "Thea", "Zainab", + "Arwen", "Bonnie", "Eloise", "Emma-Louise", "Halle", "Hana", "Honey", "Jamie-Lee", "Karla", "Leia", "Leila", + "Madeline", "Neave", "Orlaith", "Rhea", "Sarah-Jane", "Tara", "Adele", "Alannah", "Alesha", "Annabelle", + "Ayla", "Becca", "Darcie", "Ebony", "Erica", "Georgie", "Hanna", "Julie", "Kadie", "Kelly", "Kiara", + "Lillie", "Mariam", "Mikayla", "Monica", "Roisin", "Savannah", "Sky", "Zahra", "Alanna", "Caoimhe", + "Chanelle", "Elisha", "Emilia", "Iris", "Kacie", "Lia", "Maja", "Mary", "Michelle", "Tyler", "Willow", + "Yasmin", "Becky", "Billie", "Clara", "Claudia", "Cody", "Elena", "Eryn", "Georgina", "Kayley", "Kimberley", + "Kira", "Laila", "Lauryn", "Murron", "Natalia", "Ruth", "Siobhan", "Tiana", "Bethan", "Brodie", "Cameron", + "Cassie", "Harriet", "Helen", "Kathryn", "Kyra", "Mairi", "Mckenzie", "Tilly", "Zuzanna", "April", + "Christina", "Claire", "Darcey", "Fern", "Fiona", "Joanna", "Lucia", "Charli", "Jamie", "Karis", + "Mackenzie", "Marissa", "Rihanna", "Teagan", "Tiegan", "Kaitlin", "Keeley", "Leigh", "Nadia", "Alix", + "Callie", "Carrie", "Eden", "Esme", "Hazel", "Miya", "Nieve", "Sadie", "Sasha", "Sinead", "Stella", + "Ashleigh", "Jade", "Jemma", "Michaela", "Alexis", "Aoife", "Francesca", "Lisa", "Matilda", "Annabel", + "Carmen", "Eleanor", "Faye", "Kaci", "Kasey", "Kerry", "Louisa", "Macy", "Mhairi", "Rebekah", "Teigan", + "Amie", "Brogan", "Catriona", "Scarlett", "Connie", "Katelyn", "Kenzie", "Lexi", "Nicola", "Sienna", "Abbi", + "Angel", "Martha", "Anya", "Toni", "Chantelle", "Gabriella", "Lexie", "Abbey", "Bailey", "Isobel", "Kelsie", + "Maia", "Nina", "Darcy", "Lacey", "Lana", "Sofia", "Stephanie", "Ellen", "Alicia", "Gabrielle", "Heidi", + "Jorja", "Kyla", "Rhiannon", "Tegan", "Maddison", "Madeleine", "Morven", "Rowan", "Lucie", "Milly", "Annie", + "Ashley", "Ellis", "Hope", "Mirren", "Rose", "Alexandra", "Jodie", "Kacey", "Phoebe", "Tia", "Ailsa", + "Alana", "Kirsten", "Charlie", "Katy", "Lilly", "Alyssa", "Maria", "Naomi", "Alisha", "Danielle", "Lola", + "Ciara", "Elle", "Faith", "Natasha", "Katherine", "Lois", "Mollie", "Carla", "Catherine", "Cerys", "Maisie", + "Victoria", "Amelie", "Demi", "Gracie", "Carys", "Isabella", "Leona", "Alex", "Hollie", "Sara", "Caitlyn", + "Kiera", "Lara", "Kate", "Louise", "Libby", "Rhianna", "Rosie", "Alice", "Julia", "Maya", "Natalie", + "Chelsea", "Layla", "Samantha", "Heather", "Kirsty", "Rachael", "Charley", "Imogen", "Elise", "Hayley", + "Kelsey", "Kara", "Orla", "Abi", "Gemma", "Laura", "Mya", "Bethany", "Jasmine", "Melissa", "Poppy", "Casey", + "Elizabeth", "Kaitlyn", "Carly", "Abby", "Neve", "Courtney", "Jennifer", "Sophia", "Shannon", "Georgia", + "Amber", "Robyn", "Beth", "Zara", "Amelia", "Taylor", "Daisy", "Paige", "Kayleigh", "Summer", "Madison", + "Jenna", "Morgan", "Evie", "Nicole", "Ella", "Cara", "Iona", "Eve", "Zoe", "Kayla", "Molly", "Abigail", + "Charlotte", "Millie", "Holly", "Leah", "Keira", "Lily", "Freya", "Caitlin", "Lauren", "Rachel", "Anna", + "Sarah", "Ruby", "Aimee", "Mia", "Skye", "Abbie", "Eva", "Eilidh", "Niamh", "Megan", "Brooke", "Isla", + "Rebecca", "Ava", "Grace", "Jessica", "Hannah", "Olivia", "Chloe", "Emily", "Amy", "Ellie", "Erin", "Katie", + "Lucy", "Emma", "Sophie" }; + } + + private static final String[] generateFirstNames() { + return new String[] { "AARON", "ABBIE", "ABBY", "ABEL", "ABIGAIL", "ABRAHAM", + "ADA", "ADAM", "ADAN", "ADDIE", "ADELA", "ADELAIDE", "ADELE", "ADELINE", "ADOLFO", "ADOLPH", "ADRIAN", + "ADRIANA", "ADRIENNE", "AGNES", "AGUSTIN", "AIDA", "AILEEN", "AIMEE", "AISHA", "AL", "ALAN", "ALANA", + "ALBA", "ALBERT", "ALBERTA", "ALBERTO", "ALEJANDRA", "ALEJANDRO", "ALEX", "ALEXANDER", "ALEXANDRA", + "ALEXANDRIA", "ALEXIS", "ALFONSO", "ALFRED", "ALFREDA", "ALFREDO", "ALI", "ALICE", "ALICIA", "ALINE", + "ALISA", "ALISHA", "ALISON", "ALISSA", "ALLAN", "ALLEN", "ALLENE", "ALLIE", "ALLISON", "ALLYSON", "ALMA", + "ALONZO", "ALPHONSO", "ALTA", "ALTHEA", "ALTON", "ALVARO", "ALVIN", "ALYCE", "ALYSON", "ALYSSA", "AMALIA", + "AMANDA", "AMBER", "AMELIA", "AMIE", "AMOS", "AMPARO", "AMY", "ANA", "ANASTASIA", "ANDRE", "ANDREA", + "ANDRES", "ANDREW", "ANDY", "ANGEL", "ANGELA", "ANGELIA", "ANGELICA", "ANGELINA", "ANGELINE", "ANGELIQUE", + "ANGELITA", "ANGELO", "ANGIE", "ANITA", "ANN", "ANNA", "ANNABELLE", "ANNE", "ANNETTE", "ANNIE", "ANNMARIE", + "ANTHONY", "ANTIONETTE", "ANTOINE", "ANTOINETTE", "ANTON", "ANTONIA", "ANTONIO", "ANTONY", "APRIL", + "ARACELI", "ARCHIE", "ARLENE", "ARLINE", "ARMAND", "ARMANDO", "ARNOLD", "ARRON", "ART", "ARTHUR", "ARTURO", + "ASHLEE", "ASHLEIGH", "ASHLEY", "AUBREY", "AUDRA", "AUDREY", "AUGUST", "AUGUSTA", "AURELIA", "AURELIO", + "AURORA", "AUSTIN", "AUTUMN", "AVA", "AVERY", "AVIS", "BARBARA", "BARBRA", "BARNEY", "BARRY", "BART", + "BASIL", "BEATRICE", "BEATRIZ", "BEAU", "BECKY", "BELINDA", "BEN", "BENITA", "BENITO", "BENJAMIN", + "BENNETT", "BENNIE", "BENNY", "BERNADETTE", "BERNADINE", "BERNARD", "BERNARDO", "BERNICE", "BERNIE", "BERT", + "BERTA", "BERTHA", "BERTIE", "BERYL", "BESSIE", "BETH", "BETHANY", "BETSY", "BETTE", "BETTIE", "BETTY", + "BETTYE", "BEULAH", "BEVERLEY", "BEVERLY", "BIANCA", "BILL", "BILLIE", "BILLY", "BLAINE", "BLAIR", "BLAKE", + "BLANCA", "BLANCHE", "BOB", "BOBBI", "BOBBIE", "BOBBY", "BONITA", "BONNIE", "BOOKER", "BOYD", "BRAD", + "BRADFORD", "BRADLEY", "BRADY", "BRAIN", "BRANDEN", "BRANDI", "BRANDIE", "BRANDON", "BRANDY", "BRENDA", + "BRENDAN", "BRENT", "BRET", "BRETT", "BRIAN", "BRIANA", "BRIANNA", "BRIDGET", "BRIDGETT", "BRIDGETTE", + "BRIGITTE", "BRITNEY", "BRITTANY", "BRITTNEY", "BROCK", "BROOKE", "BRUCE", "BRUNO", "BRYAN", "BRYANT", + "BRYCE", "BRYON", "BUDDY", "BUFORD", "BURTON", "BYRON", "CAITLIN", "CALEB", "CALLIE", "CALVIN", "CAMERON", + "CAMILLA", "CAMILLE", "CANDACE", "CANDICE", "CANDY", "CARA", "CAREY", "CARISSA", "CARL", "CARLA", "CARLENE", + "CARLO", "CARLOS", "CARLTON", "CARLY", "CARMELA", "CARMELLA", "CARMELO", "CARMEN", "CAROL", "CAROLE", + "CAROLINA", "CAROLINE", "CAROLYN", "CARRIE", "CARROLL", "CARSON", "CARTER", "CARY", "CARYN", "CASANDRA", + "CASEY", "CASSANDRA", "CASSIE", "CATALINA", "CATHERINE", "CATHLEEN", "CATHRYN", "CATHY", "CECELIA", "CECIL", + "CECILE", "CECILIA", "CEDRIC", "CELESTE", "CELIA", "CELINA", "CESAR", "CHAD", "CHANDRA", "CHARITY", + "CHARLENE", "CHARLES", "CHARLEY", "CHARLIE", "CHARLOTTE", "CHARMAINE", "CHASE", "CHASITY", "CHELSEA", + "CHELSEY", "CHERI", "CHERIE", "CHERRY", "CHERYL", "CHESTER", "CHRIS", "CHRISTA", "CHRISTI", "CHRISTIAN", + "CHRISTIE", "CHRISTINA", "CHRISTINE", "CHRISTOPHER", "CHRISTY", "CHRYSTAL", "CHUCK", "CINDY", "CLAIR", + "CLAIRE", "CLARA", "CLARE", "CLARENCE", "CLARICE", "CLARISSA", "CLARK", "CLAUDE", "CLAUDETTE", "CLAUDIA", + "CLAUDINE", "CLAY", "CLAYTON", "CLEMENT", "CLEO", "CLEVELAND", "CLIFF", "CLIFFORD", "CLIFTON", "CLINT", + "CLINTON", "CLYDE", "CODY", "COLBY", "COLE", "COLEEN", "COLETTE", "COLIN", "COLLEEN", "COLLIN", + "CONCEPCION", "CONCETTA", "CONNIE", "CONRAD", "CONSTANCE", "CONSUELO", "CORA", "COREY", "CORINA", "CORINE", + "CORINNE", "CORNELIA", "CORNELIUS", "CORNELL", "CORRINE", "CORTNEY", "CORY", "COURTNEY", "COY", "CRAIG", + "CRISTINA", "CRUZ", "CRYSTAL", "CURT", "CURTIS", "CYNTHIA", "DAISY", "DALE", "DALLAS", "DALTON", "DAMIAN", + "DAMIEN", "DAMON", "DAN", "DANA", "DANE", "DANIAL", "DANIEL", "DANIELLE", "DANNY", "DANTE", "DAPHNE", + "DARCY", "DAREN", "DARIN", "DARIUS", "DARLA", "DARLENE", "DARNELL", "DARREL", "DARRELL", "DARREN", "DARRIN", + "DARRYL", "DARWIN", "DARYL", "DAVE", "DAVID", "DAVIS", "DAWN", "DAYNA", "DEAN", "DEANA", "DEANN", "DEANNA", + "DEANNE", "DEBBIE", "DEBORA", "DEBORAH", "DEBRA", "DEE", "DEENA", "DEIDRA", "DEIDRE", "DEIRDRE", "DELBERT", + "DELIA", "DELLA", "DELMAR", "DELORES", "DELORIS", "DEMETRIUS", "DENA", "DENICE", "DENIS", "DENISE", + "DENNIS", "DENNY", "DENVER", "DEREK", "DERICK", "DERRICK", "DESIREE", "DESMOND", "DESSIE", "DEVIN", "DEVON", + "DEWAYNE", "DEWEY", "DEXTER", "DIANA", "DIANE", "DIANN", "DIANNA", "DIANNE", "DICK", "DIEGO", "DINA", + "DION", "DIONNE", "DIRK", "DIXIE", "DOLLIE", "DOLLY", "DOLORES", "DOMINGO", "DOMINIC", "DOMINICK", + "DOMINIQUE", "DON", "DONA", "DONALD", "DONNA", "DONNELL", "DONNIE", "DONNY", "DONOVAN", "DORA", "DOREEN", + "DORETHA", "DORIS", "DOROTHEA", "DOROTHY", "DORTHY", "DOUG", "DOUGLAS", "DOYLE", "DREW", "DUANE", "DUDLEY", + "DUSTIN", "DWAYNE", "DWIGHT", "DYLAN", "EARL", "EARLENE", "EARLINE", "EARNEST", "EARNESTINE", "EBONY", "ED", + "EDDIE", "EDDY", "EDGAR", "EDITH", "EDMOND", "EDMUND", "EDNA", "EDUARDO", "EDWARD", "EDWARDO", "EDWIN", + "EDWINA", "EDYTHE", "EFFIE", "EFRAIN", "EILEEN", "ELAINE", "ELBA", "ELBERT", "ELDA", "ELDON", "ELEANOR", + "ELENA", "ELI", "ELIAS", "ELIJAH", "ELINOR", "ELISA", "ELISABETH", "ELISE", "ELISHA", "ELIZA", "ELIZABETH", + "ELLA", "ELLEN", "ELLIOT", "ELLIOTT", "ELLIS", "ELMA", "ELMER", "ELNORA", "ELOISE", "ELSA", "ELSIE", + "ELTON", "ELVA", "ELVIA", "ELVIN", "ELVIRA", "ELVIS", "ELWOOD", "EMANUEL", "EMERSON", "EMERY", "EMIL", + "EMILIA", "EMILIE", "EMILIO", "EMILY", "EMMA", "EMMANUEL", "EMMETT", "EMORY", "ENID", "ENRIQUE", "ERIC", + "ERICA", "ERICK", "ERICKA", "ERIK", "ERIKA", "ERIN", "ERMA", "ERNA", "ERNEST", "ERNESTINE", "ERNESTO", + "ERNIE", "ERROL", "ERVIN", "ERWIN", "ESMERALDA", "ESPERANZA", "ESSIE", "ESTEBAN", "ESTELA", "ESTELLA", + "ESTELLE", "ESTER", "ESTHER", "ETHAN", "ETHEL", "ETTA", "EUGENE", "EUGENIA", "EULA", "EUNICE", "EVA", + "EVAN", "EVANGELINA", "EVANGELINE", "EVE", "EVELYN", "EVERETT", "FABIAN", "FAITH", "FANNIE", "FANNY", "FAY", + "FAYE", "FEDERICO", "FELECIA", "FELICIA", "FELIPE", "FELIX", "FERN", "FERNANDO", "FIDEL", "FLETCHER", + "FLORA", "FLORENCE", "FLORINE", "FLOSSIE", "FLOYD", "FORREST", "FRAN", "FRANCES", "FRANCESCA", "FRANCINE", + "FRANCIS", "FRANCISCA", "FRANCISCO", "FRANK", "FRANKIE", "FRANKLIN", "FRED", "FREDA", "FREDDIE", "FREDDY", + "FREDERIC", "FREDERICK", "FREDRICK", "FREIDA", "FRIEDA", "GABRIEL", "GABRIELA", "GABRIELLE", "GAIL", "GALE", + "GALEN", "GARLAND", "GARRETT", "GARRY", "GARY", "GAVIN", "GAY", "GAYLA", "GAYLE", "GENA", "GENARO", "GENE", + "GENEVA", "GENEVIEVE", "GEOFFREY", "GEORGE", "GEORGETTE", "GEORGIA", "GEORGINA", "GERALD", "GERALDINE", + "GERARD", "GERARDO", "GERI", "GERMAINE", "GERMAN", "GERRY", "GERTRUDE", "GILBERT", "GILBERTO", "GILDA", + "GINA", "GINGER", "GLADYS", "GLEN", "GLENDA", "GLENN", "GLENNA", "GLORIA", "GOLDIE", "GONZALO", "GORDON", + "GRACE", "GRACIE", "GRACIELA", "GRADY", "GRAHAM", "GRANT", "GREG", "GREGG", "GREGORIO", "GREGORY", "GRETA", + "GRETCHEN", "GROVER", "GUADALUPE", "GUILLERMO", "GUS", "GUSSIE", "GUSTAVO", "GUY", "GWEN", "GWENDOLYN", + "HAL", "HALEY", "HALLIE", "HANNAH", "HANS", "HARLAN", "HARLEY", "HAROLD", "HARRIET", "HARRIETT", "HARRIS", + "HARRISON", "HARRY", "HARVEY", "HATTIE", "HAZEL", "HEATH", "HEATHER", "HECTOR", "HEIDI", "HELEN", "HELENA", + "HELENE", "HELGA", "HENRIETTA", "HENRY", "HERBERT", "HERIBERTO", "HERMAN", "HERMINIA", "HESTER", "HILARY", + "HILDA", "HILLARY", "HIRAM", "HOLLIE", "HOLLIS", "HOLLY", "HOMER", "HOPE", "HORACE", "HOUSTON", "HOWARD", + "HUBERT", "HUGH", "HUGO", "HUMBERTO", "HUNG", "HUNTER", "IAN", "IDA", "IGNACIO", "ILA", "ILENE", "IMELDA", + "IMOGENE", "INA", "INES", "INEZ", "INGRID", "IRA", "IRENE", "IRIS", "IRMA", "IRVIN", "IRVING", "IRWIN", + "ISAAC", "ISABEL", "ISABELLA", "ISABELLE", "ISAIAH", "ISIDRO", "ISMAEL", "ISRAEL", "ISSAC", "IVA", "IVAN", + "IVY", "JACK", "JACKIE", "JACKLYN", "JACKSON", "JACLYN", "JACOB", "JACQUELINE", "JACQUELYN", "JACQUES", + "JADE", "JAIME", "JAKE", "JAMAL", "JAME", "JAMES", "JAMI", "JAMIE", "JAN", "JANA", "JANE", "JANELL", + "JANELLE", "JANET", "JANETTE", "JANICE", "JANIE", "JANINE", "JANIS", "JANNA", "JANNIE", "JARED", "JARROD", + "JARVIS", "JASMIN", "JASMINE", "JASON", "JASPER", "JAVIER", "JAY", "JAYNE", "JAYSON", "JEAN", "JEANETTE", + "JEANIE", "JEANINE", "JEANNE", "JEANNETTE", "JEANNIE", "JEANNINE", "JEFF", "JEFFERSON", "JEFFERY", + "JEFFREY", "JEFFRY", "JENIFER", "JENNA", "JENNIE", "JENNIFER", "JENNY", "JERALD", "JEREMIAH", "JEREMY", + "JERI", "JERMAINE", "JEROME", "JERRI", "JERRY", "JESS", "JESSE", "JESSICA", "JESSIE", "JESUS", "JEWEL", + "JEWELL", "JILL", "JILLIAN", "JIM", "JIMMIE", "JIMMY", "JO", "JOAN", "JOANN", "JOANNA", "JOANNE", "JOAQUIN", + "JOCELYN", "JODI", "JODIE", "JODY", "JOE", "JOEL", "JOESPH", "JOEY", "JOHANNA", "JOHN", "JOHNATHAN", + "JOHNATHON", "JOHNNIE", "JOHNNY", "JOLENE", "JON", "JONATHAN", "JONATHON", "JONI", "JORDAN", "JORGE", + "JOSE", "JOSEFA", "JOSEFINA", "JOSEPH", "JOSEPHINE", "JOSH", "JOSHUA", "JOSIE", "JOSUE", "JOY", "JOYCE", + "JUAN", "JUANA", "JUANITA", "JUDI", "JUDITH", "JUDY", "JULIA", "JULIAN", "JULIANA", "JULIANNE", "JULIE", + "JULIET", "JULIETTE", "JULIO", "JULIUS", "JUNE", "JUNIOR", "JUSTIN", "JUSTINA", "JUSTINE", "KAITLIN", + "KAITLYN", "KARA", "KAREN", "KARI", "KARIN", "KARINA", "KARL", "KARLA", "KARYN", "KASEY", "KATE", "KATELYN", + "KATHARINE", "KATHERINE", "KATHERYN", "KATHI", "KATHIE", "KATHLEEN", "KATHRINE", "KATHRYN", "KATHY", + "KATIE", "KATINA", "KATRINA", "KATY", "KAY", "KAYE", "KAYLA", "KEISHA", "KEITH", "KELLEY", "KELLI", + "KELLIE", "KELLY", "KELSEY", "KELVIN", "KEN", "KENDALL", "KENDRA", "KENDRICK", "KENNETH", "KENNY", "KENT", + "KENYA", "KERI", "KERMIT", "KERRI", "KERRY", "KEVIN", "KIM", "KIMBERLEE", "KIMBERLEY", "KIMBERLY", "KIRBY", + "KIRK", "KIRSTEN", "KITTY", "KRIS", "KRISTA", "KRISTEN", "KRISTI", "KRISTIE", "KRISTIN", "KRISTINA", + "KRISTINE", "KRISTOPHER", "KRISTY", "KRYSTAL", "KURT", "KURTIS", "KYLE", "LACEY", "LACY", "LADONNA", + "LAKEISHA", "LAKESHA", "LAKISHA", "LAMAR", "LAMONT", "LANA", "LANCE", "LANDON", "LANE", "LARA", "LARRY", + "LASHONDA", "LATANYA", "LATASHA", "LATISHA", "LATONYA", "LATOYA", "LAURA", "LAUREL", "LAUREN", "LAURENCE", + "LAURI", "LAURIE", "LAVERNE", "LAVONNE", "LAWANDA", "LAWRENCE", "LEA", "LEAH", "LEANN", "LEANNA", "LEANNE", + "LEE", "LEEANN", "LEIGH", "LEILA", "LELA", "LELAND", "LELIA", "LENA", "LENORA", "LENORE", "LEO", "LEOLA", + "LEON", "LEONA", "LEONARD", "LEONARDO", "LEONEL", "LEONOR", "LEROY", "LESA", "LESLEY", "LESLIE", "LESSIE", + "LESTER", "LETA", "LETHA", "LETICIA", "LETITIA", "LEVI", "LEWIS", "LIBBY", "LIDIA", "LILA", "LILIA", + "LILIAN", "LILIANA", "LILLIAN", "LILLIE", "LILLY", "LILY", "LINA", "LINCOLN", "LINDA", "LINDSAY", "LINDSEY", + "LINWOOD", "LIONEL", "LISA", "LIZ", "LIZA", "LIZZIE", "LLOYD", "LOGAN", "LOIS", "LOLA", "LOLITA", "LONNIE", + "LORA", "LORAINE", "LOREN", "LORENA", "LORENE", "LORENZO", "LORETTA", "LORI", "LORIE", "LORNA", "LORRAINE", + "LORRIE", "LOTTIE", "LOU", "LOUELLA", "LOUIE", "LOUIS", "LOUISA", "LOUISE", "LOURDES", "LOWELL", "LOYD", + "LUANN", "LUCAS", "LUCIA", "LUCILE", "LUCILLE", "LUCINDA", "LUCY", "LUELLA", "LUIS", "LUISA", "LUKE", + "LULA", "LUPE", "LUTHER", "LUZ", "LYDIA", "LYLE", "LYNDA", "LYNETTE", "LYNN", "LYNNE", "LYNNETTE", "MA", + "MABEL", "MABLE", "MACK", "MADELEINE", "MADELINE", "MADELYN", "MADGE", "MAE", "MAGDALENA", "MAGGIE", "MAI", + "MALCOLM", "MALINDA", "MALLORY", "MAMIE", "MANDY", "MANUEL", "MANUELA", "MARA", "MARC", "MARCEL", + "MARCELINO", "MARCELLA", "MARCI", "MARCIA", "MARCIE", "MARCO", "MARCOS", "MARCUS", "MARCY", "MARGARET", + "MARGARITA", "MARGERY", "MARGIE", "MARGO", "MARGOT", "MARGRET", "MARGUERITE", "MARI", "MARIA", "MARIAN", + "MARIANA", "MARIANNE", "MARIANO", "MARIBEL", "MARICELA", "MARIE", "MARIETTA", "MARILYN", "MARINA", "MARIO", + "MARION", "MARISA", "MARISOL", "MARISSA", "MARITZA", "MARJORIE", "MARK", "MARLA", "MARLENE", "MARLIN", + "MARLON", "MARQUITA", "MARSHA", "MARSHALL", "MARTA", "MARTHA", "MARTIN", "MARTINA", "MARTY", "MARVA", + "MARVIN", "MARY", "MARYANN", "MARYANNE", "MARYELLEN", "MARYLOU", "MASON", "MATHEW", "MATILDA", "MATT", + "MATTHEW", "MATTIE", "MAUDE", "MAURA", "MAUREEN", "MAURICE", "MAURICIO", "MAVIS", "MAX", "MAXINE", + "MAXWELL", "MAY", "MAYNARD", "MAYRA", "MEAGAN", "MEGAN", "MEGHAN", "MELANIE", "MELBA", "MELINDA", "MELISA", + "MELISSA", "MELLISA", "MELODY", "MELVA", "MELVIN", "MERCEDES", "MEREDITH", "MERLE", "MERLIN", "MERRILL", + "MIA", "MICAH", "MICHAEL", "MICHAELA", "MICHEAL", "MICHEL", "MICHELE", "MICHELL", "MICHELLE", "MICKEY", + "MIGUEL", "MIKE", "MILAGROS", "MILDRED", "MILES", "MILLARD", "MILLICENT", "MILLIE", "MILTON", "MINA", + "MINDY", "MINERVA", "MINNIE", "MIRANDA", "MIRIAM", "MISTY", "MITCHELL", "MITZI", "MOHAMMAD", "MOISES", + "MOLLIE", "MOLLY", "MONA", "MONICA", "MONIKA", "MONIQUE", "MONROE", "MONTE", "MONTY", "MORGAN", "MORRIS", + "MOSES", "MURIEL", "MURRAY", "MYRA", "MYRNA", "MYRON", "MYRTLE", "NADIA", "NADINE", "NAN", "NANCY", + "NANETTE", "NANNIE", "NAOMI", "NATALIA", "NATALIE", "NATASHA", "NATHAN", "NATHANIEL", "NEAL", "NED", "NEIL", + "NELDA", "NELL", "NELLIE", "NELLY", "NELSON", "NESTOR", "NETTIE", "NEVA", "NICHOLAS", "NICHOLE", "NICK", + "NICKOLAS", "NICOLAS", "NICOLE", "NIKKI", "NINA", "NITA", "NOAH", "NOE", "NOEL", "NOELLE", "NOEMI", "NOLA", + "NOLAN", "NONA", "NORA", "NORBERT", "NOREEN", "NORMA", "NORMAN", "NORRIS", "NUMBERS", "OCTAVIA", "OCTAVIO", + "ODELL", "ODESSA", "OFELIA", "OLA", "OLGA", "OLIVE", "OLIVER", "OLIVIA", "OLLIE", "OMAR", "OPAL", "OPHELIA", + "ORA", "ORLANDO", "ORVILLE", "OSCAR", "OTIS", "OTTO", "OWEN", "PABLO", "PAIGE", "PAM", "PAMALA", "PAMELA", + "PANSY", "PASQUALE", "PAT", "PATRICA", "PATRICE", "PATRICIA", "PATRICK", "PATSY", "PATTI", "PATTY", "PAUL", + "PAULA", "PAULETTE", "PAULINE", "PEARL", "PEARLIE", "PEDRO", "PEGGY", "PENELOPE", "PENNY", "PERCY", "PERRY", + "PETE", "PETER", "PETRA", "PHIL", "PHILIP", "PHILLIP", "PHOEBE", "PHYLLIS", "PIERRE", "POLLY", "PRESTON", + "PRISCILLA", "QUEEN", "QUENTIN", "QUINCY", "QUINTON", "RACHAEL", "RACHEL", "RACHELLE", "RAE", "RAFAEL", + "RALPH", "RAMIRO", "RAMON", "RAMONA", "RANDAL", "RANDALL", "RANDI", "RANDOLPH", "RANDY", "RAPHAEL", + "RAQUEL", "RAUL", "RAY", "RAYMOND", "RAYMUNDO", "REBA", "REBECCA", "REBEKAH", "REED", "REGGIE", "REGINA", + "REGINALD", "RENA", "RENAE", "RENE", "RENEE", "REUBEN", "REVA", "REX", "REYNA", "REYNALDO", "RHEA", "RHODA", + "RHONDA", "RICARDO", "RICHARD", "RICK", "RICKEY", "RICKIE", "RICKY", "RIGOBERTO", "RILEY", "RITA", "ROB", + "ROBBIE", "ROBBY", "ROBERT", "ROBERTA", "ROBERTO", "ROBIN", "ROBYN", "ROCCO", "ROCHELLE", "ROCIO", "ROCKY", + "ROD", "RODERICK", "RODGER", "RODNEY", "RODOLFO", "RODRIGO", "ROGELIO", "ROGER", "ROLAND", "ROLANDO", + "ROMAN", "ROMEO", "RON", "RONALD", "RONDA", "RONNIE", "ROOSEVELT", "RORY", "ROSA", "ROSALIA", "ROSALIE", + "ROSALIND", "ROSALINDA", "ROSALYN", "ROSANNA", "ROSANNE", "ROSARIO", "ROSCOE", "ROSE", "ROSEANN", "ROSELLA", + "ROSEMARIE", "ROSEMARY", "ROSETTA", "ROSIE", "ROSLYN", "ROSS", "ROWENA", "ROXANNE", "ROXIE", "ROY", "ROYCE", + "RUBEN", "RUBY", "RUDOLPH", "RUDY", "RUFUS", "RUSSEL", "RUSSELL", "RUSTY", "RUTH", "RUTHIE", "RYAN", + "SABRINA", "SADIE", "SALLIE", "SALLY", "SALVADOR", "SALVATORE", "SAM", "SAMANTHA", "SAMMIE", "SAMMY", + "SAMUEL", "SANDRA", "SANDY", "SANFORD", "SANTIAGO", "SANTOS", "SARA", "SARAH", "SASHA", "SAUL", "SAUNDRA", + "SAVANNAH", "SCOT", "SCOTT", "SCOTTY", "SEAN", "SEBASTIAN", "SELENA", "SELINA", "SELMA", "SERENA", "SERGIO", + "SETH", "SHANA", "SHANE", "SHANNA", "SHANNON", "SHARI", "SHARLENE", "SHARON", "SHARRON", "SHAUN", "SHAUNA", + "SHAWN", "SHAWNA", "SHEENA", "SHEILA", "SHELBY", "SHELDON", "SHELIA", "SHELLEY", "SHELLY", "SHELTON", + "SHEREE", "SHERI", "SHERMAN", "SHERRI", "SHERRIE", "SHERRY", "SHERYL", "SHIRLEY", "SIDNEY", "SIERRA", + "SILAS", "SILVIA", "SIMON", "SIMONE", "SOCORRO", "SOFIA", "SOLOMON", "SON", "SONDRA", "SONIA", "SONJA", + "SONNY", "SONYA", "SOPHIA", "SOPHIE", "SPENCER", "STACEY", "STACI", "STACIE", "STACY", "STAN", "STANLEY", + "STEFAN", "STEFANIE", "STELLA", "STEPHAN", "STEPHANIE", "STEPHEN", "STERLING", "STEVE", "STEVEN", "STEWART", + "STUART", "SUE", "SUMMER", "SUSAN", "SUSANA", "SUSANNA", "SUSANNE", "SUSIE", "SUZANNE", "SUZETTE", "SYBIL", + "SYDNEY", "SYLVESTER", "SYLVIA", "TABATHA", "TABITHA", "TAMARA", "TAMEKA", "TAMERA", "TAMI", "TAMIKA", + "TAMMI", "TAMMIE", "TAMMY", "TAMRA", "TANIA", "TANISHA", "TANYA", "TARA", "TASHA", "TAYLOR", "TED", "TEDDY", + "TERENCE", "TERESA", "TERI", "TERRA", "TERRANCE", "TERRELL", "TERRENCE", "TERRI", "TERRIE", "TERRY", + "TESSA", "THADDEUS", "THELMA", "THEODORE", "THERESA", "THERESE", "THERON", "THOMAS", "THURMAN", "TIA", + "TIFFANY", "TIM", "TIMMY", "TIMOTHY", "TINA", "TISHA", "TOBY", "TODD", "TOM", "TOMAS", "TOMMIE", "TOMMY", + "TONI", "TONIA", "TONY", "TONYA", "TORI", "TRACEY", "TRACI", "TRACIE", "TRACY", "TRAVIS", "TRENT", + "TRENTON", "TREVOR", "TRICIA", "TRINA", "TRISHA", "TRISTAN", "TROY", "TRUDY", "TRUMAN", "TWILA", "TY", + "TYLER", "TYRONE", "TYSON", "ULYSSES", "URSULA", "VALARIE", "VALERIA", "VALERIE", "VAN", "VANCE", "VANESSA", + "VAUGHN", "VELMA", "VERA", "VERN", "VERNA", "VERNON", "VERONICA", "VICENTE", "VICKI", "VICKIE", "VICKY", + "VICTOR", "VICTORIA", "VILMA", "VINCE", "VINCENT", "VIOLA", "VIOLET", "VIRGIE", "VIRGIL", "VIRGINIA", + "VITO", "VIVIAN", "VONDA", "WADE", "WALLACE", "WALTER", "WANDA", "WARD", "WARREN", "WAYNE", "WELDON", + "WENDELL", "WENDI", "WENDY", "WESLEY", "WHITNEY", "WILBERT", "WILBUR", "WILDA", "WILEY", "WILFORD", + "WILFRED", "WILFREDO", "WILL", "WILLA", "WILLARD", "WILLIAM", "WILLIAMS", "WILLIE", "WILLIS", "WILMA", + "WILMER", "WILSON", "WINFRED", "WINIFRED", "WINNIE", "WINSTON", "WM", "WOODROW", "XAVIER", "YESENIA", + "YOLANDA", "YOUNG", "YVETTE", "YVONNE", "ZACHARY", "ZACHERY", "ZELDA", "ZELMA" }; + } + + private static final String[] generateLastNames() { + return new String[] { "AARON", "ABBOTT", "ABEL", "ABELL", "ABERNATHY", "ABNER", + "ABNEY", "ABRAHAM", "ABRAMS", "ABREU", "ACEVEDO", "ACKER", "ACKERMAN", "ACKLEY", "ACOSTA", "ACUNA", "ADAIR", + "ADAM", "ADAME", "ADAMS", "ADAMSON", "ADCOCK", "ADDISON", "ADKINS", "ADLER", "AGEE", "AGNEW", "AGUAYO", + "AGUIAR", "AGUILAR", "AGUILERA", "AGUIRRE", "AHERN", "AHMAD", "AHMED", "AHRENS", "AIELLO", "AIKEN", + "AINSWORTH", "AKERS", "AKIN", "AKINS", "ALANIZ", "ALARCON", "ALBA", "ALBERS", "ALBERT", "ALBERTSON", + "ALBRECHT", "ALBRIGHT", "ALCALA", "ALCORN", "ALDERMAN", "ALDRICH", "ALDRIDGE", "ALEMAN", "ALEXANDER", + "ALFARO", "ALFONSO", "ALFORD", "ALFRED", "ALGER", "ALI", "ALICEA", "ALLAN", "ALLARD", "ALLEN", "ALLEY", + "ALLISON", "ALLMAN", "ALLRED", "ALMANZA", "ALMEIDA", "ALMOND", "ALONSO", "ALONZO", "ALSTON", "ALTMAN", + "ALVARADO", "ALVAREZ", "ALVES", "AMADOR", "AMARAL", "AMATO", "AMAYA", "AMBROSE", "AMES", "AMMONS", "AMOS", + "AMUNDSON", "ANAYA", "ANDERS", "ANDERSEN", "ANDERSON", "ANDRADE", "ANDRE", "ANDRES", "ANDREW", "ANDREWS", + "ANDRUS", "ANGEL", "ANGELO", "ANGLIN", "ANGULO", "ANTHONY", "ANTOINE", "ANTONIO", "APODACA", "APONTE", + "APPEL", "APPLE", "APPLEGATE", "APPLETON", "AQUINO", "ARAGON", "ARANDA", "ARAUJO", "ARCE", "ARCHER", + "ARCHIBALD", "ARCHIE", "ARCHULETA", "ARELLANO", "AREVALO", "ARIAS", "ARMENTA", "ARMIJO", "ARMSTEAD", + "ARMSTRONG", "ARNDT", "ARNETT", "ARNOLD", "ARREDONDO", "ARREOLA", "ARRIAGA", "ARRINGTON", "ARROYO", + "ARSENAULT", "ARTEAGA", "ARTHUR", "ARTIS", "ASBURY", "ASH", "ASHBY", "ASHCRAFT", "ASHE", "ASHER", "ASHFORD", + "ASHLEY", "ASHMORE", "ASHTON", "ASHWORTH", "ASKEW", "ATCHISON", "ATHERTON", "ATKINS", "ATKINSON", "ATWELL", + "ATWOOD", "AUGUST", "AUGUSTINE", "AULT", "AUSTIN", "AUTRY", "AVALOS", "AVERY", "AVILA", "AVILES", "AYALA", + "AYERS", "AYRES", "BABB", "BABCOCK", "BABIN", "BACA", "BACH", "BACHMAN", "BACK", "BACON", "BADER", "BADGER", + "BADILLO", "BAER", "BAEZ", "BAGGETT", "BAGLEY", "BAGWELL", "BAILEY", "BAIN", "BAINES", "BAIR", "BAIRD", + "BAKER", "BALDERAS", "BALDWIN", "BALES", "BALL", "BALLARD", "BANDA", "BANDY", "BANKS", "BANKSTON", + "BANNISTER", "BANUELOS", "BAPTISTE", "BARAJAS", "BARBA", "BARBEE", "BARBER", "BARBOSA", "BARBOUR", + "BARCLAY", "BARDEN", "BARELA", "BARFIELD", "BARGER", "BARHAM", "BARKER", "BARKLEY", "BARKSDALE", "BARLOW", + "BARNARD", "BARNES", "BARNETT", "BARNETTE", "BARNEY", "BARNHART", "BARNHILL", "BARON", "BARONE", "BARR", + "BARRAZA", "BARRERA", "BARRETO", "BARRETT", "BARRIENTOS", "BARRIOS", "BARRON", "BARROW", "BARROWS", "BARRY", + "BARTELS", "BARTH", "BARTHOLOMEW", "BARTLETT", "BARTLEY", "BARTON", "BASHAM", "BASKIN", "BASS", "BASSETT", + "BATCHELOR", "BATEMAN", "BATES", "BATISTA", "BATISTE", "BATSON", "BATTAGLIA", "BATTEN", "BATTLE", "BATTLES", + "BATTS", "BAUER", "BAUGH", "BAUGHMAN", "BAUM", "BAUMAN", "BAUMANN", "BAUMGARDNER", "BAUMGARTNER", + "BAUTISTA", "BAXLEY", "BAXTER", "BAYER", "BAYLOR", "BAYNE", "BAYS", "BEACH", "BEAL", "BEALE", "BEALL", + "BEALS", "BEAM", "BEAMON", "BEAN", "BEANE", "BEAR", "BEARD", "BEARDEN", "BEASLEY", "BEATTIE", "BEATTY", + "BEATY", "BEAUCHAMP", "BEAUDOIN", "BEAULIEU", "BEAUREGARD", "BEAVER", "BEAVERS", "BECERRA", "BECK", + "BECKER", "BECKETT", "BECKHAM", "BECKMAN", "BECKWITH", "BECNEL", "BEDARD", "BEDFORD", "BEEBE", "BEELER", + "BEERS", "BEESON", "BEGAY", "BEGLEY", "BEHRENS", "BELANGER", "BELCHER", "BELL", "BELLAMY", "BELLO", "BELT", + "BELTON", "BELTRAN", "BENAVIDES", "BENAVIDEZ", "BENDER", "BENEDICT", "BENEFIELD", "BENITEZ", "BENJAMIN", + "BENNER", "BENNETT", "BENOIT", "BENSON", "BENTLEY", "BENTON", "BERG", "BERGER", "BERGERON", "BERGMAN", + "BERGSTROM", "BERLIN", "BERMAN", "BERMUDEZ", "BERNAL", "BERNARD", "BERNHARDT", "BERNIER", "BERNSTEIN", + "BERRIOS", "BERRY", "BERRYMAN", "BERTRAM", "BERTRAND", "BERUBE", "BESS", "BEST", "BETANCOURT", "BETHEA", + "BETHEL", "BETTS", "BETZ", "BEVERLY", "BEVINS", "BEYER", "BIBLE", "BICKFORD", "BIDDLE", "BIGELOW", "BIGGS", + "BILLINGS", "BILLINGSLEY", "BILLIOT", "BILLS", "BILLUPS", "BILODEAU", "BINDER", "BINGHAM", "BINKLEY", + "BIRCH", "BIRD", "BISHOP", "BISSON", "BITTNER", "BIVENS", "BIVINS", "BLACK", "BLACKBURN", "BLACKMAN", + "BLACKMON", "BLACKWELL", "BLACKWOOD", "BLAINE", "BLAIR", "BLAIS", "BLAKE", "BLAKELY", "BLALOCK", + "BLANCHARD", "BLANCHETTE", "BLANCO", "BLAND", "BLANK", "BLANKENSHIP", "BLANTON", "BLAYLOCK", "BLEDSOE", + "BLEVINS", "BLISS", "BLOCK", "BLOCKER", "BLODGETT", "BLOOM", "BLOUNT", "BLUE", "BLUM", "BLUNT", "BLYTHE", + "BOATRIGHT", "BOATWRIGHT", "BOBBITT", "BOBO", "BOCK", "BOEHM", "BOETTCHER", "BOGAN", "BOGGS", "BOHANNON", + "BOHN", "BOISVERT", "BOLAND", "BOLDEN", "BOLDUC", "BOLEN", "BOLES", "BOLIN", "BOLING", "BOLLING", + "BOLLINGER", "BOLT", "BOLTON", "BOND", "BONDS", "BONE", "BONILLA", "BONNER", "BOOKER", "BOONE", "BOOTH", + "BOOTHE", "BORDELON", "BORDEN", "BORDERS", "BOREN", "BORGES", "BORREGO", "BOSS", "BOSTIC", "BOSTICK", + "BOSTON", "BOSWELL", "BOTTOMS", "BOUCHARD", "BOUCHER", "BOUDREAU", "BOUDREAUX", "BOUNDS", "BOURGEOIS", + "BOURNE", "BOURQUE", "BOWDEN", "BOWEN", "BOWENS", "BOWER", "BOWERS", "BOWIE", "BOWLES", "BOWLIN", "BOWLING", + "BOWMAN", "BOWSER", "BOX", "BOYCE", "BOYD", "BOYER", "BOYKIN", "BOYLE", "BOYLES", "BOYNTON", "BOZEMAN", + "BRACKEN", "BRACKETT", "BRADBURY", "BRADEN", "BRADFORD", "BRADLEY", "BRADSHAW", "BRADY", "BRAGG", "BRANCH", + "BRAND", "BRANDENBURG", "BRANDON", "BRANDT", "BRANHAM", "BRANNON", "BRANSON", "BRANT", "BRANTLEY", + "BRASWELL", "BRATCHER", "BRATTON", "BRAUN", "BRAVO", "BRAXTON", "BRAY", "BRAZIL", "BREAUX", "BREEDEN", + "BREEDLOVE", "BREEN", "BRENNAN", "BRENNER", "BRENT", "BREWER", "BREWSTER", "BRICE", "BRIDGES", "BRIGGS", + "BRIGHT", "BRILEY", "BRILL", "BRIM", "BRINK", "BRINKLEY", "BRINKMAN", "BRINSON", "BRIONES", "BRISCOE", + "BRISENO", "BRITO", "BRITT", "BRITTAIN", "BRITTON", "BROADNAX", "BROADWAY", "BROCK", "BROCKMAN", + "BRODERICK", "BRODY", "BROGAN", "BRONSON", "BROOKINS", "BROOKS", "BROOME", "BROTHERS", "BROUGHTON", + "BROUSSARD", "BROWDER", "BROWER", "BROWN", "BROWNE", "BROWNELL", "BROWNING", "BROWNLEE", "BROYLES", + "BRUBAKER", "BRUCE", "BRUMFIELD", "BRUNER", "BRUNNER", "BRUNO", "BRUNS", "BRUNSON", "BRUTON", "BRYAN", + "BRYANT", "BRYSON", "BUCHANAN", "BUCHER", "BUCK", "BUCKINGHAM", "BUCKLEY", "BUCKNER", "BUENO", "BUFFINGTON", + "BUFORD", "BUI", "BULL", "BULLARD", "BULLOCK", "BUMGARNER", "BUNCH", "BUNDY", "BUNKER", "BUNN", "BUNNELL", + "BUNTING", "BURCH", "BURCHETT", "BURCHFIELD", "BURDEN", "BURDETTE", "BURDICK", "BURGE", "BURGER", "BURGESS", + "BURGOS", "BURK", "BURKE", "BURKETT", "BURKHART", "BURKHOLDER", "BURKS", "BURLESON", "BURLEY", "BURNETT", + "BURNETTE", "BURNEY", "BURNHAM", "BURNS", "BURNSIDE", "BURR", "BURRELL", "BURRIS", "BURROUGHS", "BURROW", + "BURROWS", "BURT", "BURTON", "BUSBY", "BUSCH", "BUSH", "BUSS", "BUSSEY", "BUSTAMANTE", "BUSTOS", "BUTCHER", + "BUTLER", "BUTTERFIELD", "BUTTON", "BUTTS", "BUXTON", "BYARS", "BYERS", "BYNUM", "BYRD", "BYRNE", "BYRNES", + "CABALLERO", "CABAN", "CABLE", "CABRAL", "CABRERA", "CADE", "CADY", "CAGLE", "CAHILL", "CAIN", "CALABRESE", + "CALDERON", "CALDWELL", "CALHOUN", "CALKINS", "CALL", "CALLAGHAN", "CALLAHAN", "CALLAWAY", "CALLENDER", + "CALLOWAY", "CALVERT", "CALVIN", "CAMACHO", "CAMARILLO", "CAMBELL", "CAMERON", "CAMP", "CAMPBELL", "CAMPOS", + "CANADA", "CANADY", "CANALES", "CANDELARIA", "CANFIELD", "CANNON", "CANO", "CANTRELL", "CANTU", "CANTWELL", + "CANTY", "CAPPS", "CARABALLO", "CARAWAY", "CARBAJAL", "CARBONE", "CARD", "CARDEN", "CARDENAS", "CARDER", + "CARDONA", "CARDOZA", "CARDWELL", "CAREY", "CARL", "CARLIN", "CARLISLE", "CARLOS", "CARLSON", "CARLTON", + "CARMAN", "CARMICHAEL", "CARMONA", "CARNAHAN", "CARNES", "CARNEY", "CARO", "CARON", "CARPENTER", "CARR", + "CARRANZA", "CARRASCO", "CARRERA", "CARRICO", "CARRIER", "CARRILLO", "CARRINGTON", "CARRION", "CARROLL", + "CARSON", "CARSWELL", "CARTER", "CARTWRIGHT", "CARUSO", "CARVALHO", "CARVER", "CARY", "CASAS", "CASE", + "CASEY", "CASH", "CASILLAS", "CASKEY", "CASON", "CASPER", "CASS", "CASSELL", "CASSIDY", "CASTANEDA", + "CASTEEL", "CASTELLANO", "CASTELLANOS", "CASTILLO", "CASTLE", "CASTLEBERRY", "CASTRO", "CASWELL", + "CATALANO", "CATES", "CATHEY", "CATO", "CATRON", "CAUDILL", "CAUDLE", "CAUSEY", "CAVANAUGH", "CAVAZOS", + "CAVE", "CECIL", "CENTENO", "CERDA", "CERVANTES", "CHACON", "CHADWICK", "CHAFFIN", "CHALMERS", + "CHAMBERLAIN", "CHAMBERLIN", "CHAMBERS", "CHAMBLISS", "CHAMPAGNE", "CHAMPION", "CHAN", "CHANCE", "CHANDLER", + "CHANEY", "CHANG", "CHAPA", "CHAPIN", "CHAPMAN", "CHAPPELL", "CHARLES", "CHARLTON", "CHASE", "CHASTAIN", + "CHATMAN", "CHAU", "CHAVARRIA", "CHAVES", "CHAVEZ", "CHAVIS", "CHEATHAM", "CHEEK", "CHEN", "CHENEY", + "CHENG", "CHERRY", "CHESSER", "CHESTER", "CHESTNUT", "CHEUNG", "CHEW", "CHILD", "CHILDERS", "CHILDRESS", + "CHILDS", "CHILTON", "CHIN", "CHISHOLM", "CHISM", "CHISOLM", "CHITWOOD", "CHO", "CHOATE", "CHOI", "CHONG", + "CHOW", "CHRISTENSEN", "CHRISTENSON", "CHRISTIAN", "CHRISTIANSEN", "CHRISTIANSON", "CHRISTIE", "CHRISTMAN", + "CHRISTMAS", "CHRISTOPHER", "CHRISTY", "CHU", "CHUN", "CHUNG", "CHURCH", "CHURCHILL", "CINTRON", "CISNEROS", + "CLANCY", "CLANTON", "CLAPP", "CLARK", "CLARKE", "CLARKSON", "CLARY", "CLAUSEN", "CLAWSON", "CLAY", + "CLAYTON", "CLEARY", "CLEGG", "CLEM", "CLEMENS", "CLEMENT", "CLEMENTS", "CLEMMONS", "CLEMONS", "CLEVELAND", + "CLEVENGER", "CLICK", "CLIFFORD", "CLIFTON", "CLINE", "CLINTON", "CLOSE", "CLOUD", "CLOUGH", "CLOUTIER", + "COATES", "COATS", "COBB", "COBBS", "COBLE", "COBURN", "COCHRAN", "COCHRANE", "COCKRELL", "CODY", "COE", + "COFFEY", "COFFIN", "COFFMAN", "COGGINS", "COHEN", "COHN", "COKER", "COLBERT", "COLBURN", "COLBY", "COLE", + "COLEMAN", "COLES", "COLEY", "COLLADO", "COLLAZO", "COLLEY", "COLLIER", "COLLINS", "COLON", "COLSON", + "COLVIN", "COLWELL", "COMBS", "COMEAUX", "COMER", "COMPTON", "COMSTOCK", "CONAWAY", "CONCEPCION", "CONDON", + "CONE", "CONGER", "CONKLIN", "CONLEY", "CONN", "CONNELL", "CONNELLY", "CONNER", "CONNERS", "CONNOLLY", + "CONNOR", "CONNORS", "CONOVER", "CONRAD", "CONROY", "CONTE", "CONTI", "CONTRERAS", "CONWAY", "CONYERS", + "COOK", "COOKE", "COOKS", "COOKSEY", "COOLEY", "COOMBS", "COON", "COONEY", "COONS", "COOPER", "COPE", + "COPELAND", "COPLEY", "COPPOLA", "CORBETT", "CORBIN", "CORBITT", "CORCORAN", "CORDELL", "CORDERO", + "CORDOVA", "COREY", "CORLEY", "CORMIER", "CORNELIUS", "CORNELL", "CORNETT", "CORNISH", "CORNWELL", "CORONA", + "CORONADO", "CORRAL", "CORREA", "CORREIA", "CORRIGAN", "CORTES", "CORTEZ", "CORWIN", "COSBY", "COSGROVE", + "COSTA", "COSTELLO", "COTA", "COTE", "COTHRAN", "COTTER", "COTTON", "COTTRELL", "COUCH", "COUGHLIN", + "COULTER", "COUNCIL", "COUNTS", "COURTNEY", "COUSINS", "COUTURE", "COVERT", "COVEY", "COVINGTON", "COWAN", + "COWARD", "COWART", "COWELL", "COWLES", "COWLEY", "COX", "COY", "COYLE", "COYNE", "CRABTREE", "CRADDOCK", + "CRAFT", "CRAIG", "CRAIN", "CRAMER", "CRANDALL", "CRANE", "CRANFORD", "CRAVEN", "CRAWFORD", "CRAWLEY", + "CRAYTON", "CREAMER", "CREECH", "CREEL", "CREIGHTON", "CRENSHAW", "CRESPO", "CREWS", "CRIDER", "CRISP", + "CRIST", "CRISWELL", "CRITTENDEN", "CROCKER", "CROCKETT", "CROFT", "CROMER", "CROMWELL", "CRONIN", "CROOK", + "CROOKS", "CROSBY", "CROSS", "CROTEAU", "CROUCH", "CROUSE", "CROW", "CROWDER", "CROWE", "CROWELL", + "CROWLEY", "CRUM", "CRUMP", "CRUSE", "CRUTCHER", "CRUTCHFIELD", "CRUZ", "CUELLAR", "CUEVAS", "CULBERTSON", + "CULLEN", "CULP", "CULPEPPER", "CULVER", "CUMMINGS", "CUMMINS", "CUNNINGHAM", "CUPP", "CURLEY", "CURRAN", + "CURRIE", "CURRIER", "CURRY", "CURTIN", "CURTIS", "CUSHMAN", "CUSTER", "CUTLER", "CYR", "DABNEY", "DAHL", + "DAIGLE", "DAILEY", "DAILY", "DALE", "DALEY", "DALLAS", "DALTON", "DALY", "DAMICO", "DAMON", "DAMRON", + "DANCY", "DANG", "DANGELO", "DANIEL", "DANIELS", "DANIELSON", "DANNER", "DARBY", "DARDEN", "DARLING", + "DARNELL", "DASILVA", "DAUGHERTY", "DAUGHTRY", "DAVENPORT", "DAVID", "DAVIDSON", "DAVIES", "DAVILA", + "DAVIS", "DAVISON", "DAWKINS", "DAWSON", "DAY", "DAYTON", "DEAL", "DEAN", "DEATON", "DEBERRY", "DECKER", + "DEES", "DEHART", "DEJESUS", "DELACRUZ", "DELAGARZA", "DELANEY", "DELAROSA", "DELATORRE", "DELEON", + "DELGADILLO", "DELGADO", "DELL", "DELLINGER", "DELOACH", "DELONG", "DELOSSANTOS", "DELUCA", "DELVALLE", + "DEMARCO", "DEMERS", "DEMPSEY", "DENHAM", "DENNEY", "DENNING", "DENNIS", "DENNISON", "DENNY", "DENSON", + "DENT", "DENTON", "DEROSA", "DERR", "DERRICK", "DESANTIS", "DESIMONE", "DEVINE", "DEVITO", "DEVLIN", + "DEVORE", "DEVRIES", "DEW", "DEWEY", "DEWITT", "DEXTER", "DIAL", "DIAMOND", "DIAS", "DIAZ", "DICK", + "DICKENS", "DICKERSON", "DICKEY", "DICKINSON", "DICKSON", "DIEHL", "DIETRICH", "DIETZ", "DIGGS", "DILL", + "DILLARD", "DILLON", "DINKINS", "DION", "DIX", "DIXON", "DO", "DOAN", "DOBBINS", "DOBBS", "DOBSON", + "DOCKERY", "DODD", "DODDS", "DODGE", "DODSON", "DOE", "DOHERTY", "DOLAN", "DOLL", "DOLLAR", "DOMINGO", + "DOMINGUEZ", "DOMINQUEZ", "DONAHUE", "DONALD", "DONALDSON", "DONATO", "DONNELL", "DONNELLY", "DONOHUE", + "DONOVAN", "DOOLEY", "DOOLITTLE", "DORAN", "DORMAN", "DORN", "DORRIS", "DORSEY", "DORTCH", "DOSS", "DOTSON", + "DOTY", "DOUCETTE", "DOUGHERTY", "DOUGHTY", "DOUGLAS", "DOUGLASS", "DOVE", "DOVER", "DOW", "DOWD", "DOWDY", + "DOWELL", "DOWLING", "DOWNEY", "DOWNING", "DOWNS", "DOYLE", "DOZIER", "DRAKE", "DRAPER", "DRAYTON", "DREW", + "DRISCOLL", "DRIVER", "DRUMMOND", "DRURY", "DUARTE", "DUBE", "DUBOIS", "DUBOSE", "DUCKETT", "DUCKWORTH", + "DUDLEY", "DUFF", "DUFFY", "DUGAN", "DUGAS", "DUGGAN", "DUGGER", "DUKE", "DUKES", "DUMAS", "DUMONT", + "DUNAWAY", "DUNBAR", "DUNCAN", "DUNHAM", "DUNLAP", "DUNN", "DUNNE", "DUNNING", "DUONG", "DUPONT", "DUPRE", + "DUPREE", "DUPUIS", "DURAN", "DURAND", "DURANT", "DURBIN", "DURDEN", "DURHAM", "DURKIN", "DURR", "DUTTON", + "DUVAL", "DUVALL", "DWYER", "DYE", "DYER", "DYKES", "DYSON", "EAGLE", "EARL", "EARLE", "EARLEY", "EARLS", + "EARLY", "EARNEST", "EASLEY", "EASON", "EAST", "EASTER", "EASTERLING", "EASTMAN", "EASTON", "EATON", + "EAVES", "EBERT", "ECHEVARRIA", "ECHOLS", "ECKERT", "EDDY", "EDGAR", "EDGE", "EDMOND", "EDMONDS", + "EDMONDSON", "EDWARD", "EDWARDS", "EGAN", "EGGLESTON", "ELAM", "ELDER", "ELDRIDGE", "ELIAS", "ELIZONDO", + "ELKINS", "ELLER", "ELLINGTON", "ELLIOT", "ELLIOTT", "ELLIS", "ELLISON", "ELLSWORTH", "ELMORE", "ELROD", + "ELSTON", "ELY", "EMANUEL", "EMBRY", "EMERSON", "EMERY", "EMMONS", "ENG", "ENGEL", "ENGLAND", "ENGLE", + "ENGLISH", "ENNIS", "ENOS", "ENRIGHT", "ENRIQUEZ", "EPPERSON", "EPPS", "EPSTEIN", "ERDMANN", "ERICKSON", + "ERNST", "ERVIN", "ERWIN", "ESCALANTE", "ESCAMILLA", "ESCOBAR", "ESCOBEDO", "ESPARZA", "ESPINAL", "ESPINO", + "ESPINOSA", "ESPINOZA", "ESPOSITO", "ESQUIVEL", "ESTEP", "ESTES", "ESTRADA", "ESTRELLA", "ETHERIDGE", + "ETHRIDGE", "EUBANKS", "EVANS", "EVERETT", "EVERHART", "EVERS", "EVERSON", "EWING", "EZELL", "FABER", + "FABIAN", "FAGAN", "FAHEY", "FAIN", "FAIR", "FAIRBANKS", "FAIRCHILD", "FAIRLEY", "FAISON", "FAJARDO", + "FALCON", "FALK", "FALLON", "FALLS", "FANNING", "FARIAS", "FARLEY", "FARMER", "FARNSWORTH", "FARR", + "FARRAR", "FARRELL", "FARRINGTON", "FARRIS", "FARROW", "FAULK", "FAULKNER", "FAUST", "FAY", "FEENEY", + "FELDER", "FELDMAN", "FELICIANO", "FELIX", "FELLOWS", "FELTON", "FELTS", "FENNELL", "FENNER", "FENTON", + "FERGUSON", "FERNANDES", "FERNANDEZ", "FERRARA", "FERRARI", "FERRARO", "FERREIRA", "FERRELL", "FERRER", + "FERRIS", "FERRY", "FIELD", "FIELDER", "FIELDS", "FIERRO", "FIFE", "FIGUEROA", "FINCH", "FINCHER", + "FINDLEY", "FINE", "FINK", "FINLEY", "FINN", "FINNEGAN", "FINNEY", "FIORE", "FISCHER", "FISH", "FISHER", + "FISHMAN", "FISK", "FITCH", "FITE", "FITTS", "FITZGERALD", "FITZPATRICK", "FITZSIMMONS", "FLAGG", + "FLAHERTY", "FLANAGAN", "FLANDERS", "FLANIGAN", "FLANNERY", "FLECK", "FLEMING", "FLEMMING", "FLETCHER", + "FLINT", "FLOOD", "FLORA", "FLORENCE", "FLORES", "FLOREZ", "FLOURNOY", "FLOWERS", "FLOYD", "FLYNN", + "FOGARTY", "FOGG", "FOGLE", "FOLEY", "FOLSE", "FOLSOM", "FOLTZ", "FONG", "FONSECA", "FONTAINE", "FONTENOT", + "FOOTE", "FORBES", "FORD", "FOREMAN", "FOREST", "FORET", "FORMAN", "FORNEY", "FORREST", "FORRESTER", + "FORSTER", "FORSYTH", "FORSYTHE", "FORT", "FORTE", "FORTENBERRY", "FORTIER", "FORTIN", "FORTNER", "FORTUNE", + "FOSS", "FOSTER", "FOUNTAIN", "FOURNIER", "FOUST", "FOWLER", "FOX", "FOY", "FRALEY", "FRAME", "FRANCE", + "FRANCIS", "FRANCISCO", "FRANCO", "FRANCOIS", "FRANK", "FRANKLIN", "FRANKS", "FRANTZ", "FRANZ", "FRASER", + "FRASIER", "FRAZER", "FRAZIER", "FREDERICK", "FREDERICKS", "FREDRICK", "FREDRICKSON", "FREE", "FREED", + "FREEDMAN", "FREEMAN", "FREESE", "FREITAS", "FRENCH", "FREUND", "FREY", "FRIAS", "FRICK", "FRIEDMAN", + "FRIEND", "FRIERSON", "FRIES", "FRITZ", "FRIZZELL", "FROST", "FRY", "FRYE", "FRYER", "FUCHS", "FUENTES", + "FUGATE", "FULCHER", "FULLER", "FULLERTON", "FULMER", "FULTON", "FULTZ", "FUNDERBURK", "FUNK", "FUQUA", + "FURMAN", "FURR", "FUSCO", "GABLE", "GABRIEL", "GADDIS", "GADDY", "GAFFNEY", "GAGE", "GAGNE", "GAGNON", + "GAINES", "GAINEY", "GAITHER", "GALARZA", "GALBRAITH", "GALE", "GALINDO", "GALLAGHER", "GALLANT", + "GALLARDO", "GALLEGOS", "GALLO", "GALLOWAY", "GALVAN", "GALVEZ", "GALVIN", "GAMBLE", "GAMBOA", "GAMEZ", + "GANDY", "GANN", "GANNON", "GANT", "GANTT", "GARAY", "GARBER", "GARCIA", "GARDINER", "GARDNER", "GARLAND", + "GARMON", "GARNER", "GARNETT", "GARRETT", "GARRIS", "GARRISON", "GARVEY", "GARVIN", "GARY", "GARZA", + "GASKIN", "GASKINS", "GASS", "GASTON", "GATES", "GATEWOOD", "GATLIN", "GAULT", "GAUTHIER", "GAVIN", "GAY", + "GAYLORD", "GEARY", "GEE", "GEER", "GEIGER", "GENTILE", "GENTRY", "GEORGE", "GERALD", "GERARD", "GERBER", + "GERMAN", "GETZ", "GIBBONS", "GIBBS", "GIBSON", "GIFFORD", "GIL", "GILBERT", "GILBERTSON", "GILBREATH", + "GILCHRIST", "GILES", "GILL", "GILLEN", "GILLESPIE", "GILLETTE", "GILLEY", "GILLIAM", "GILLILAND", "GILLIS", + "GILMAN", "GILMER", "GILMORE", "GILSON", "GINN", "GIORDANO", "GIPSON", "GIRARD", "GIRON", "GIROUX", "GIST", + "GIVENS", "GLADDEN", "GLADNEY", "GLASER", "GLASGOW", "GLASS", "GLAZE", "GLEASON", "GLENN", "GLOVER", + "GLYNN", "GOAD", "GOBLE", "GODDARD", "GODFREY", "GODINEZ", "GODWIN", "GOEBEL", "GOETZ", "GOFF", "GOFORTH", + "GOINS", "GOLD", "GOLDBERG", "GOLDEN", "GOLDMAN", "GOLDSMITH", "GOLDSTEIN", "GOMES", "GOMEZ", "GONSALVES", + "GONZALES", "GONZALEZ", "GOOCH", "GOOD", "GOODE", "GOODEN", "GOODIN", "GOODING", "GOODMAN", "GOODRICH", + "GOODSON", "GOODWIN", "GOOLSBY", "GORDON", "GORE", "GORHAM", "GORMAN", "GOSS", "GOSSETT", "GOUGH", "GOULD", + "GOULET", "GRACE", "GRACIA", "GRADY", "GRAF", "GRAFF", "GRAGG", "GRAHAM", "GRANADOS", "GRANGER", "GRANT", + "GRANTHAM", "GRAVES", "GRAY", "GRAYSON", "GREATHOUSE", "GRECO", "GREEN", "GREENBERG", "GREENE", + "GREENFIELD", "GREENLEE", "GREENWOOD", "GREER", "GREGG", "GREGORY", "GREINER", "GRENIER", "GRESHAM", "GREY", + "GRICE", "GRIDER", "GRIER", "GRIFFIN", "GRIFFIS", "GRIFFITH", "GRIFFITHS", "GRIGGS", "GRIGSBY", "GRIMES", + "GRIMM", "GRISHAM", "GRISSOM", "GRISWOLD", "GROCE", "GROGAN", "GROOMS", "GROSS", "GROSSMAN", "GROVE", + "GROVER", "GROVES", "GRUBB", "GRUBBS", "GRUBER", "GUAJARDO", "GUENTHER", "GUERIN", "GUERRA", "GUERRERO", + "GUESS", "GUEST", "GUEVARA", "GUFFEY", "GUIDRY", "GUILLEN", "GUILLORY", "GUINN", "GULLEY", "GUNDERSON", + "GUNN", "GUNTER", "GUNTHER", "GURLEY", "GUSTAFSON", "GUTHRIE", "GUTIERREZ", "GUY", "GUYTON", "GUZMAN", "HA", + "HAAG", "HAAS", "HAASE", "HACKER", "HACKETT", "HACKNEY", "HADDEN", "HADLEY", "HAGAN", "HAGEN", "HAGER", + "HAGGARD", "HAGGERTY", "HAHN", "HAIGHT", "HAILEY", "HAINES", "HAIR", "HAIRSTON", "HALCOMB", "HALE", "HALES", + "HALEY", "HALL", "HALLER", "HALLMAN", "HALSEY", "HALSTEAD", "HALVERSON", "HAM", "HAMBLIN", "HAMBY", "HAMEL", + "HAMER", "HAMILTON", "HAMLIN", "HAMM", "HAMMER", "HAMMETT", "HAMMOND", "HAMMONDS", "HAMMONS", "HAMPTON", + "HAMRICK", "HAN", "HANCOCK", "HAND", "HANDLEY", "HANDY", "HANES", "HANEY", "HANKINS", "HANKS", "HANLEY", + "HANLON", "HANNA", "HANNAH", "HANNAN", "HANNON", "HANSEN", "HANSON", "HARBIN", "HARDAWAY", "HARDEE", + "HARDEN", "HARDER", "HARDESTY", "HARDIN", "HARDING", "HARDISON", "HARDMAN", "HARDWICK", "HARDY", "HARE", + "HARGIS", "HARGRAVE", "HARGROVE", "HARKINS", "HARLAN", "HARLEY", "HARLOW", "HARMAN", "HARMON", "HARMS", + "HARNESS", "HARP", "HARPER", "HARR", "HARRELL", "HARRINGTON", "HARRIS", "HARRISON", "HARRY", "HART", + "HARTER", "HARTLEY", "HARTMAN", "HARTMANN", "HARTWELL", "HARVEY", "HARWELL", "HARWOOD", "HASKELL", + "HASKINS", "HASS", "HASSELL", "HASTINGS", "HATCH", "HATCHER", "HATCHETT", "HATFIELD", "HATHAWAY", "HATLEY", + "HATTON", "HAUGEN", "HAUSER", "HAVENS", "HAWES", "HAWK", "HAWKINS", "HAWKS", "HAWLEY", "HAWTHORNE", "HAY", + "HAYDEN", "HAYES", "HAYNES", "HAYS", "HAYWARD", "HAYWOOD", "HAZEL", "HEAD", "HEADLEY", "HEADRICK", "HEALEY", + "HEALY", "HEARD", "HEARN", "HEATH", "HEATON", "HEBERT", "HECK", "HECKMAN", "HEDGES", "HEDRICK", "HEFFNER", + "HEFLIN", "HEFNER", "HEIM", "HEIN", "HEINRICH", "HEINZ", "HELD", "HELLER", "HELM", "HELMS", "HELTON", + "HEMBREE", "HEMPHILL", "HENDERSON", "HENDON", "HENDRICK", "HENDRICKS", "HENDRICKSON", "HENDRIX", "HENKE", + "HENLEY", "HENNESSEY", "HENNING", "HENRY", "HENSLEY", "HENSON", "HER", "HERBERT", "HEREDIA", "HERMAN", + "HERMANN", "HERNANDEZ", "HERNDON", "HERR", "HERRERA", "HERRICK", "HERRIN", "HERRING", "HERRINGTON", + "HERRMANN", "HERRON", "HERSHBERGER", "HERZOG", "HESS", "HESTER", "HEWITT", "HEYWARD", "HIATT", "HIBBARD", + "HICKEY", "HICKMAN", "HICKS", "HICKSON", "HIDALGO", "HIGDON", "HIGGINBOTHAM", "HIGGINS", "HIGGS", "HIGH", + "HIGHTOWER", "HILDEBRAND", "HILDRETH", "HILL", "HILLARD", "HILLER", "HILLIARD", "HILLMAN", "HILLS", + "HILTON", "HIMES", "HINDMAN", "HINDS", "HINES", "HINKLE", "HINOJOSA", "HINSON", "HINTON", "HIRSCH", + "HITCHCOCK", "HITE", "HITT", "HO", "HOANG", "HOBBS", "HOBSON", "HODGE", "HODGES", "HODGSON", "HOFF", + "HOFFMAN", "HOFFMANN", "HOGAN", "HOGG", "HOGUE", "HOKE", "HOLBROOK", "HOLCOMB", "HOLCOMBE", "HOLDEN", + "HOLDER", "HOLGUIN", "HOLIDAY", "HOLLAND", "HOLLENBECK", "HOLLEY", "HOLLIDAY", "HOLLINGSWORTH", "HOLLINS", + "HOLLIS", "HOLLOMAN", "HOLLOWAY", "HOLLY", "HOLM", "HOLMAN", "HOLMES", "HOLT", "HOLTON", "HOLTZ", "HOMAN", + "HOMER", "HONEYCUTT", "HONG", "HOOD", "HOOK", "HOOKER", "HOOKS", "HOOPER", "HOOVER", "HOPE", "HOPKINS", + "HOPPE", "HOPPER", "HOPSON", "HORAN", "HORN", "HORNE", "HORNER", "HORNSBY", "HOROWITZ", "HORSLEY", "HORTON", + "HORVATH", "HOSKINS", "HOSTETLER", "HOUCK", "HOUGH", "HOUGHTON", "HOULE", "HOUSE", "HOUSER", "HOUSTON", + "HOWARD", "HOWE", "HOWELL", "HOWERTON", "HOWES", "HOWLAND", "HOY", "HOYLE", "HOYT", "HSU", "HUANG", + "HUBBARD", "HUBER", "HUBERT", "HUDDLESTON", "HUDGENS", "HUDGINS", "HUDSON", "HUERTA", "HUEY", "HUFF", + "HUFFMAN", "HUGGINS", "HUGHES", "HUGHEY", "HULL", "HULSEY", "HUMES", "HUMMEL", "HUMPHREY", "HUMPHREYS", + "HUMPHRIES", "HUNDLEY", "HUNT", "HUNTER", "HUNTINGTON", "HUNTLEY", "HURD", "HURLEY", "HURST", "HURT", + "HURTADO", "HUSKEY", "HUSSEY", "HUSTON", "HUTCHENS", "HUTCHERSON", "HUTCHESON", "HUTCHINGS", "HUTCHINS", + "HUTCHINSON", "HUTCHISON", "HUTSON", "HUTTO", "HUTTON", "HUYNH", "HWANG", "HYATT", "HYDE", "HYLAND", + "HYLTON", "HYMAN", "HYNES", "IBARRA", "INGLE", "INGRAHAM", "INGRAM", "INMAN", "IRBY", "IRELAND", "IRISH", + "IRIZARRY", "IRONS", "IRVIN", "IRVINE", "IRVING", "IRWIN", "ISAAC", "ISAACS", "ISAACSON", "ISBELL", "ISOM", + "ISON", "ISRAEL", "IVERSON", "IVES", "IVEY", "IVORY", "IVY", "JACK", "JACKMAN", "JACKS", "JACKSON", "JACOB", + "JACOBS", "JACOBSEN", "JACOBSON", "JACOBY", "JACQUES", "JAEGER", "JAMES", "JAMESON", "JAMISON", "JANES", + "JANKOWSKI", "JANSEN", "JANSSEN", "JARAMILLO", "JARRELL", "JARRETT", "JARVIS", "JASPER", "JAY", "JAYNES", + "JEAN", "JEFFERIES", "JEFFERS", "JEFFERSON", "JEFFERY", "JEFFREY", "JEFFRIES", "JENKINS", "JENNINGS", + "JENSEN", "JENSON", "JERNIGAN", "JESSUP", "JETER", "JETT", "JEWELL", "JEWETT", "JIMENEZ", "JOBE", "JOE", + "JOHANSEN", "JOHN", "JOHNS", "JOHNSON", "JOHNSTON", "JOINER", "JOLLEY", "JOLLY", "JONES", "JORDAN", + "JORDON", "JORGENSEN", "JORGENSON", "JOSE", "JOSEPH", "JOY", "JOYCE", "JOYNER", "JUAREZ", "JUDD", "JUDE", + "JUDGE", "JUDKINS", "JULIAN", "JUNG", "JUSTICE", "JUSTUS", "KAHN", "KAISER", "KAMINSKI", "KANE", "KANG", + "KAPLAN", "KARR", "KASPER", "KATZ", "KAUFFMAN", "KAUFMAN", "KAY", "KAYE", "KEANE", "KEARNEY", "KEARNS", + "KEATING", "KEATON", "KECK", "KEE", "KEEFE", "KEEFER", "KEEGAN", "KEEL", "KEELER", "KEELING", "KEEN", + "KEENAN", "KEENE", "KEENER", "KEENEY", "KEETON", "KEITH", "KELLEHER", "KELLER", "KELLEY", "KELLOGG", + "KELLUM", "KELLY", "KELSEY", "KELSO", "KEMP", "KEMPER", "KENDALL", "KENDRICK", "KENNEDY", "KENNEY", "KENNY", + "KENT", "KENYON", "KERN", "KERNS", "KERR", "KESSLER", "KETCHUM", "KEY", "KEYES", "KEYS", "KEYSER", "KHAN", + "KIDD", "KIDWELL", "KIEFER", "KILGORE", "KILLIAN", "KILPATRICK", "KIM", "KIMBALL", "KIMBLE", "KIMBRELL", + "KIMBROUGH", "KIMMEL", "KINARD", "KINCAID", "KINDER", "KING", "KINGSLEY", "KINNEY", "KINSEY", "KIRBY", + "KIRCHNER", "KIRK", "KIRKLAND", "KIRKPATRICK", "KIRKWOOD", "KISER", "KISH", "KITCHEN", "KITCHENS", "KLEIN", + "KLINE", "KLINGER", "KNAPP", "KNIGHT", "KNOLL", "KNOTT", "KNOTTS", "KNOWLES", "KNOWLTON", "KNOX", "KNUDSEN", + "KNUDSON", "KNUTSON", "KOCH", "KOEHLER", "KOENIG", "KOHL", "KOHLER", "KOHN", "KOLB", "KONG", "KOONCE", + "KOONTZ", "KOPP", "KOVACH", "KOWALSKI", "KOZAK", "KOZLOWSKI", "KRAFT", "KRAMER", "KRAUS", "KRAUSE", + "KRAUSS", "KREBS", "KRIEGER", "KROLL", "KRUEGER", "KRUG", "KRUGER", "KRUSE", "KUHN", "KUNKEL", "KUNTZ", + "KUNZ", "KURTZ", "KUYKENDALL", "KYLE", "LABBE", "LABELLE", "LACEY", "LACHANCE", "LACKEY", "LACROIX", "LACY", + "LADD", "LADNER", "LAFFERTY", "LAFLAMME", "LAFLEUR", "LAI", "LAIRD", "LAKE", "LAM", "LAMAR", "LAMB", + "LAMBERT", "LAMM", "LANCASTER", "LANCE", "LAND", "LANDERS", "LANDIS", "LANDON", "LANDRUM", "LANDRY", "LANE", + "LANEY", "LANG", "LANGDON", "LANGE", "LANGER", "LANGFORD", "LANGLEY", "LANGLOIS", "LANGSTON", "LANHAM", + "LANIER", "LANKFORD", "LANNING", "LANTZ", "LAPLANTE", "LAPOINTE", "LAPORTE", "LARA", "LARGE", "LARKIN", + "LAROCHE", "LAROSE", "LARRY", "LARSEN", "LARSON", "LARUE", "LASH", "LASHLEY", "LASSITER", "LASTER", + "LATHAM", "LATIMER", "LATTIMORE", "LAU", "LAUER", "LAUGHLIN", "LAVENDER", "LAVIGNE", "LAVOIE", "LAW", + "LAWHORN", "LAWLER", "LAWLESS", "LAWRENCE", "LAWS", "LAWSON", "LAWTON", "LAY", "LAYMAN", "LAYNE", "LAYTON", + "LE", "LEA", "LEACH", "LEAHY", "LEAK", "LEAKE", "LEAL", "LEAR", "LEARY", "LEAVITT", "LEBLANC", "LEBRON", + "LECLAIR", "LEDBETTER", "LEDESMA", "LEDFORD", "LEDOUX", "LEE", "LEEPER", "LEES", "LEFEBVRE", "LEGER", + "LEGG", "LEGGETT", "LEHMAN", "LEHMANN", "LEIGH", "LEIGHTON", "LEMASTER", "LEMAY", "LEMIEUX", "LEMKE", + "LEMMON", "LEMON", "LEMONS", "LEMUS", "LENNON", "LENTZ", "LENZ", "LEON", "LEONARD", "LEONE", "LERMA", + "LERNER", "LEROY", "LESLIE", "LESSARD", "LESTER", "LEUNG", "LEVESQUE", "LEVI", "LEVIN", "LEVINE", "LEVY", + "LEW", "LEWANDOWSKI", "LEWIS", "LEYVA", "LI", "LIBBY", "LIDDELL", "LIEBERMAN", "LIGHT", "LIGHTFOOT", + "LIGHTNER", "LIGON", "LILES", "LILLEY", "LILLY", "LIM", "LIMA", "LIMON", "LIN", "LINARES", "LINCOLN", + "LIND", "LINDBERG", "LINDER", "LINDGREN", "LINDLEY", "LINDQUIST", "LINDSAY", "LINDSEY", "LINDSTROM", "LINK", + "LINKOUS", "LINN", "LINTON", "LINVILLE", "LIPSCOMB", "LIRA", "LISTER", "LITTLE", "LITTLEFIELD", + "LITTLEJOHN", "LITTLETON", "LIU", "LIVELY", "LIVINGSTON", "LLOYD", "LO", "LOCKE", "LOCKETT", "LOCKHART", + "LOCKLEAR", "LOCKWOOD", "LOERA", "LOFTIN", "LOFTIS", "LOFTON", "LOGAN", "LOGSDON", "LOGUE", "LOMAX", + "LOMBARD", "LOMBARDI", "LOMBARDO", "LONDON", "LONG", "LONGO", "LONGORIA", "LOOMIS", "LOONEY", "LOPER", + "LOPES", "LOPEZ", "LORD", "LORENZ", "LORENZO", "LOTT", "LOUIS", "LOVE", "LOVEJOY", "LOVELACE", "LOVELESS", + "LOVELL", "LOVETT", "LOVING", "LOW", "LOWE", "LOWELL", "LOWERY", "LOWMAN", "LOWRY", "LOY", "LOYA", "LOYD", + "LOZANO", "LU", "LUCAS", "LUCE", "LUCERO", "LUCIANO", "LUCKETT", "LUDWIG", "LUGO", "LUIS", "LUJAN", "LUKE", + "LUMPKIN", "LUNA", "LUND", "LUNDBERG", "LUNDY", "LUNSFORD", "LUONG", "LUSK", "LUSTER", "LUTHER", "LUTTRELL", + "LUTZ", "LY", "LYLE", "LYLES", "LYMAN", "LYNCH", "LYNN", "LYON", "LYONS", "LYTLE", "MA", "MAAS", "MABE", + "MABRY", "MACDONALD", "MACE", "MACHADO", "MACIAS", "MACK", "MACKAY", "MACKENZIE", "MACKEY", "MACKIE", + "MACKLIN", "MACLEAN", "MACLEOD", "MACON", "MADDEN", "MADDOX", "MADERA", "MADISON", "MADRID", "MADRIGAL", + "MADSEN", "MAES", "MAESTAS", "MAGANA", "MAGEE", "MAGGARD", "MAGNUSON", "MAGUIRE", "MAHAFFEY", "MAHAN", + "MAHER", "MAHON", "MAHONEY", "MAIER", "MAIN", "MAJOR", "MAJORS", "MAKI", "MALCOLM", "MALDONADO", "MALLEY", + "MALLORY", "MALLOY", "MALONE", "MALONEY", "MANCINI", "MANCUSO", "MANESS", "MANGUM", "MANLEY", "MANN", + "MANNING", "MANNS", "MANSFIELD", "MANSON", "MANUEL", "MANZO", "MAPLE", "MAPLES", "MARBLE", "MARCH", + "MARCHAND", "MARCOTTE", "MARCUM", "MARCUS", "MARES", "MARIN", "MARINO", "MARION", "MARK", "MARKHAM", + "MARKLEY", "MARKS", "MARLER", "MARLOW", "MARLOWE", "MARQUEZ", "MARQUIS", "MARR", "MARRERO", "MARROQUIN", + "MARSH", "MARSHALL", "MARTEL", "MARTELL", "MARTENS", "MARTIN", "MARTINDALE", "MARTINEZ", "MARTINO", + "MARTINS", "MARTINSON", "MARTZ", "MARVIN", "MARX", "MASON", "MASSEY", "MASSIE", "MAST", "MASTERS", + "MASTERSON", "MATA", "MATHENY", "MATHESON", "MATHEWS", "MATHIAS", "MATHIS", "MATLOCK", "MATNEY", "MATOS", + "MATSON", "MATTESON", "MATTHEW", "MATTHEWS", "MATTINGLY", "MATTISON", "MATTOS", "MATTOX", "MATTSON", + "MAULDIN", "MAUPIN", "MAURER", "MAURO", "MAXEY", "MAXFIELD", "MAXWELL", "MAY", "MAYBERRY", "MAYER", + "MAYERS", "MAYES", "MAYFIELD", "MAYHEW", "MAYNARD", "MAYO", "MAYS", "MAZZA", "MCADAMS", "MCAFEE", + "MCALISTER", "MCALLISTER", "MCARTHUR", "MCBEE", "MCBRIDE", "MCCABE", "MCCAFFREY", "MCCAIN", "MCCALL", + "MCCALLISTER", "MCCALLUM", "MCCANN", "MCCANTS", "MCCARTER", "MCCARTHY", "MCCARTNEY", "MCCARTY", "MCCASKILL", + "MCCAULEY", "MCCLAIN", "MCCLANAHAN", "MCCLARY", "MCCLEARY", "MCCLELLAN", "MCCLELLAND", "MCCLENDON", + "MCCLINTOCK", "MCCLINTON", "MCCLOSKEY", "MCCLOUD", "MCCLUNG", "MCCLURE", "MCCOLLUM", "MCCOMBS", "MCCONNELL", + "MCCOOL", "MCCORD", "MCCORKLE", "MCCORMACK", "MCCORMICK", "MCCOY", "MCCRACKEN", "MCCRARY", "MCCRAY", + "MCCREARY", "MCCUE", "MCCULLOCH", "MCCULLOUGH", "MCCUNE", "MCCURDY", "MCCURRY", "MCCUTCHEON", "MCDADE", + "MCDANIEL", "MCDANIELS", "MCDERMOTT", "MCDONALD", "MCDONNELL", "MCDONOUGH", "MCDOUGAL", "MCDOUGALL", + "MCDOWELL", "MCDUFFIE", "MCELROY", "MCEWEN", "MCFADDEN", "MCFALL", "MCFARLAND", "MCFARLANE", "MCGEE", + "MCGEHEE", "MCGHEE", "MCGILL", "MCGINNIS", "MCGOVERN", "MCGOWAN", "MCGRATH", "MCGRAW", "MCGREGOR", "MCGREW", + "MCGRIFF", "MCGUIRE", "MCHENRY", "MCHUGH", "MCINNIS", "MCINTIRE", "MCINTOSH", "MCINTYRE", "MCKAY", "MCKEE", + "MCKEEVER", "MCKENNA", "MCKENNEY", "MCKENZIE", "MCKEON", "MCKEOWN", "MCKINLEY", "MCKINNEY", "MCKINNON", + "MCKNIGHT", "MCLAIN", "MCLAUGHLIN", "MCLAURIN", "MCLEAN", "MCLEMORE", "MCLENDON", "MCLEOD", "MCMAHAN", + "MCMAHON", "MCMANUS", "MCMASTER", "MCMILLAN", "MCMILLEN", "MCMILLIAN", "MCMULLEN", "MCMURRAY", "MCNABB", + "MCNAIR", "MCNALLY", "MCNAMARA", "MCNEAL", "MCNEELY", "MCNEIL", "MCNEILL", "MCNULTY", "MCNUTT", "MCPHERSON", + "MCQUEEN", "MCRAE", "MCREYNOLDS", "MCSWAIN", "MCVAY", "MCVEY", "MCWHORTER", "MCWILLIAMS", "MEACHAM", "MEAD", + "MEADE", "MEADOR", "MEADOWS", "MEANS", "MEARS", "MEDEIROS", "MEDINA", "MEDLEY", "MEDLIN", "MEDLOCK", + "MEDRANO", "MEEHAN", "MEEK", "MEEKER", "MEEKS", "MEIER", "MEJIA", "MELANCON", "MELENDEZ", "MELLO", "MELTON", + "MELVIN", "MENA", "MENARD", "MENDENHALL", "MENDEZ", "MENDOZA", "MENENDEZ", "MERCADO", "MERCER", "MERCHANT", + "MERCIER", "MEREDITH", "MERRELL", "MERRICK", "MERRILL", "MERRIMAN", "MERRITT", "MESA", "MESSENGER", + "MESSER", "MESSINA", "METCALF", "METZ", "METZGER", "METZLER", "MEYER", "MEYERS", "MEZA", "MICHAEL", + "MICHAELS", "MICHAUD", "MICHEL", "MICKENS", "MIDDLETON", "MILAM", "MILBURN", "MILES", "MILLARD", "MILLER", + "MILLIGAN", "MILLIKEN", "MILLS", "MILNE", "MILNER", "MILTON", "MIMS", "MINER", "MINNICK", "MINOR", "MINTER", + "MINTON", "MINTZ", "MIRANDA", "MIRELES", "MITCHELL", "MIXON", "MIZE", "MOBLEY", "MOCK", "MOE", "MOELLER", + "MOEN", "MOFFETT", "MOFFITT", "MOHR", "MOJICA", "MOLINA", "MOLL", "MONACO", "MONAGHAN", "MONAHAN", "MONEY", + "MONIZ", "MONK", "MONROE", "MONSON", "MONTAGUE", "MONTALVO", "MONTANEZ", "MONTANO", "MONTEMAYOR", "MONTERO", + "MONTES", "MONTEZ", "MONTGOMERY", "MONTOYA", "MOODY", "MOON", "MOONEY", "MOORE", "MOORMAN", "MORA", + "MORALES", "MORAN", "MOREAU", "MOREHEAD", "MORELAND", "MORENO", "MOREY", "MORGAN", "MORIARTY", "MORIN", + "MORLEY", "MORRELL", "MORRILL", "MORRIS", "MORRISON", "MORRISSEY", "MORROW", "MORSE", "MORTENSEN", "MORTON", + "MOSBY", "MOSELEY", "MOSER", "MOSES", "MOSHER", "MOSIER", "MOSLEY", "MOSS", "MOTLEY", "MOTT", "MOULTON", + "MOULTRIE", "MOUNT", "MOWERY", "MOYA", "MOYE", "MOYER", "MUELLER", "MUHAMMAD", "MUIR", "MULKEY", "MULL", + "MULLEN", "MULLER", "MULLIGAN", "MULLIN", "MULLINS", "MULLIS", "MUNCY", "MUNDY", "MUNIZ", "MUNN", "MUNOZ", + "MUNSON", "MURDOCK", "MURILLO", "MURPHY", "MURRAY", "MURRELL", "MURRY", "MUSE", "MUSGROVE", "MUSSER", + "MYERS", "MYLES", "MYRICK", "NABORS", "NADEAU", "NAGEL", "NAGLE", "NAGY", "NAJERA", "NAKAMURA", "NALL", + "NANCE", "NAPIER", "NAQUIN", "NARANJO", "NARVAEZ", "NASH", "NATHAN", "NATION", "NAVA", "NAVARRETE", + "NAVARRO", "NAYLOR", "NEAL", "NEALY", "NEEDHAM", "NEEL", "NEELEY", "NEELY", "NEFF", "NEGRETE", "NEGRON", + "NEIL", "NEILL", "NELMS", "NELSON", "NESBITT", "NESMITH", "NESS", "NESTOR", "NETTLES", "NEUMAN", "NEUMANN", + "NEVAREZ", "NEVILLE", "NEW", "NEWBERRY", "NEWBY", "NEWCOMB", "NEWELL", "NEWKIRK", "NEWMAN", "NEWSOM", + "NEWSOME", "NEWTON", "NG", "NGO", "NGUYEN", "NICHOLAS", "NICHOLS", "NICHOLSON", "NICKEL", "NICKERSON", + "NIELSEN", "NIELSON", "NIETO", "NIEVES", "NILES", "NIX", "NIXON", "NOBLE", "NOBLES", "NOE", "NOEL", "NOLAN", + "NOLAND", "NOLEN", "NOLL", "NOONAN", "NORFLEET", "NORIEGA", "NORMAN", "NORRIS", "NORTH", "NORTON", + "NORWOOD", "NOVAK", "NOVOTNY", "NOWAK", "NOWLIN", "NOYES", "NUGENT", "NULL", "NUMBERS", "NUNES", "NUNEZ", + "NUNLEY", "NUNN", "NUTT", "NUTTER", "NYE", "OAKES", "OAKLEY", "OAKS", "OATES", "OBRIEN", "OBRYAN", "OCAMPO", + "OCASIO", "OCHOA", "OCHS", "OCONNELL", "OCONNER", "OCONNOR", "ODELL", "ODEN", "ODOM", "ODONNELL", "ODUM", + "OGDEN", "OGLE", "OGLESBY", "OH", "OHARA", "OJEDA", "OKEEFE", "OLDHAM", "OLDS", "OLEARY", "OLIPHANT", + "OLIVA", "OLIVARES", "OLIVAREZ", "OLIVAS", "OLIVE", "OLIVEIRA", "OLIVER", "OLIVO", "OLMSTEAD", "OLSEN", + "OLSON", "OLVERA", "OMALLEY", "ONEAL", "ONEIL", "ONEILL", "ONTIVEROS", "ORDONEZ", "OREILLY", "ORELLANA", + "ORLANDO", "ORNELAS", "OROSCO", "OROURKE", "OROZCO", "ORR", "ORTA", "ORTEGA", "ORTIZ", "OSBORN", "OSBORNE", + "OSBURN", "OSGOOD", "OSHEA", "OSORIO", "OSTEEN", "OSTRANDER", "OSULLIVAN", "OSWALD", "OSWALT", "OTERO", + "OTIS", "OTOOLE", "OTT", "OTTO", "OUELLETTE", "OUTLAW", "OVERBY", "OVERSTREET", "OVERTON", "OWEN", "OWENS", + "PACE", "PACHECO", "PACK", "PACKARD", "PACKER", "PADGETT", "PADILLA", "PAGAN", "PAGE", "PAIGE", "PAINE", + "PAINTER", "PAK", "PALACIOS", "PALMA", "PALMER", "PALUMBO", "PANNELL", "PANTOJA", "PAPE", "PAPPAS", + "PAQUETTE", "PARADIS", "PARDO", "PAREDES", "PARENT", "PARHAM", "PARIS", "PARISH", "PARK", "PARKER", + "PARKINSON", "PARKS", "PARNELL", "PARR", "PARRA", "PARRIS", "PARRISH", "PARROTT", "PARRY", "PARSON", + "PARSONS", "PARTIN", "PARTRIDGE", "PASSMORE", "PATE", "PATEL", "PATERSON", "PATINO", "PATRICK", "PATTEN", + "PATTERSON", "PATTON", "PAUL", "PAULEY", "PAULSEN", "PAULSON", "PAXTON", "PAYNE", "PAYTON", "PAZ", "PEACE", + "PEACHEY", "PEACOCK", "PEAK", "PEARCE", "PEARSON", "PEASE", "PECK", "PEDERSEN", "PEDERSON", "PEEBLES", + "PEEK", "PEEL", "PEELER", "PEEPLES", "PELLETIER", "PELTIER", "PEMBERTON", "PENA", "PENCE", "PENDER", + "PENDERGRASS", "PENDLETON", "PENN", "PENNELL", "PENNINGTON", "PENNY", "PEOPLES", "PEPPER", "PERALES", + "PERALTA", "PERDUE", "PEREA", "PEREIRA", "PEREZ", "PERKINS", "PERREAULT", "PERRIN", "PERRON", "PERRY", + "PERRYMAN", "PERSON", "PETER", "PETERMAN", "PETERS", "PETERSEN", "PETERSON", "PETIT", "PETRIE", "PETTIGREW", + "PETTIS", "PETTIT", "PETTWAY", "PETTY", "PEYTON", "PFEIFER", "PFEIFFER", "PHAM", "PHAN", "PHELAN", "PHELPS", + "PHIFER", "PHILLIPS", "PHIPPS", "PICARD", "PICKARD", "PICKENS", "PICKERING", "PICKETT", "PIERCE", "PIERRE", + "PIERSON", "PIKE", "PILCHER", "PIMENTEL", "PINA", "PINCKNEY", "PINEDA", "PINKERTON", "PINKSTON", "PINO", + "PINSON", "PINTO", "PIPER", "PIPKIN", "PIPPIN", "PITMAN", "PITRE", "PITT", "PITTMAN", "PITTS", "PLACE", + "PLANTE", "PLATT", "PLEASANT", "PLUMMER", "PLUNKETT", "POE", "POGUE", "POINDEXTER", "POINTER", "POIRIER", + "POLANCO", "POLAND", "POLING", "POLK", "POLLACK", "POLLARD", "POLLOCK", "POMEROY", "PONCE", "POND", + "PONDER", "POOL", "POOLE", "POORE", "POPE", "POPP", "PORTER", "PORTERFIELD", "PORTILLO", "POSEY", "POST", + "POSTON", "POTTER", "POTTS", "POULIN", "POUNDS", "POWELL", "POWER", "POWERS", "PRADO", "PRATER", "PRATHER", + "PRATT", "PRENTICE", "PRESCOTT", "PRESLEY", "PRESSLEY", "PRESTON", "PREWITT", "PRICE", "PRICHARD", "PRIDE", + "PRIDGEN", "PRIEST", "PRIETO", "PRINCE", "PRINGLE", "PRITCHARD", "PRITCHETT", "PROCTOR", "PROFFITT", + "PROSSER", "PROVOST", "PRUETT", "PRUITT", "PRYOR", "PUCKETT", "PUENTE", "PUGH", "PULIDO", "PULLEN", + "PULLEY", "PULLIAM", "PURCELL", "PURDY", "PURNELL", "PURVIS", "PUTMAN", "PUTNAM", "PYLE", "QUALLS", + "QUARLES", "QUEEN", "QUEZADA", "QUICK", "QUIGLEY", "QUILLEN", "QUINLAN", "QUINN", "QUINONES", "QUINONEZ", + "QUINTANA", "QUINTANILLA", "QUINTERO", "QUIROZ", "RADER", "RADFORD", "RAFFERTY", "RAGAN", "RAGLAND", + "RAGSDALE", "RAINES", "RAINEY", "RAINS", "RALEY", "RALPH", "RALSTON", "RAMEY", "RAMIREZ", "RAMON", "RAMOS", + "RAMSAY", "RAMSEY", "RAND", "RANDALL", "RANDLE", "RANDOLPH", "RANEY", "RANGEL", "RANKIN", "RANSOM", "RAPP", + "RASH", "RASMUSSEN", "RATCLIFF", "RATLIFF", "RAU", "RAUCH", "RAWLINGS", "RAWLINS", "RAWLS", "RAY", + "RAYBURN", "RAYFORD", "RAYMOND", "RAYNOR", "RAZO", "REA", "READ", "REAGAN", "REARDON", "REAVES", "RECTOR", + "REDD", "REDDEN", "REDDICK", "REDDING", "REDDY", "REDMAN", "REDMON", "REDMOND", "REECE", "REED", "REEDER", + "REEDY", "REES", "REESE", "REEVES", "REGALADO", "REGAN", "REGISTER", "REICH", "REICHERT", "REID", "REILLY", + "REINHARDT", "REINHART", "REIS", "REITER", "RENDON", "RENFRO", "RENNER", "RENO", "RENTERIA", "REUTER", + "REY", "REYES", "REYNA", "REYNOLDS", "REYNOSO", "RHEA", "RHOADES", "RHOADS", "RHODEN", "RHODES", "RICCI", + "RICE", "RICH", "RICHARD", "RICHARDS", "RICHARDSON", "RICHEY", "RICHIE", "RICHMOND", "RICHTER", "RICKARD", + "RICKER", "RICKETTS", "RICKMAN", "RICKS", "RICO", "RIDDELL", "RIDDICK", "RIDDLE", "RIDENOUR", "RIDER", + "RIDGEWAY", "RIDLEY", "RIFE", "RIGBY", "RIGGINS", "RIGGS", "RIGSBY", "RILEY", "RINALDI", "RINEHART", "RING", + "RIOS", "RIPLEY", "RITCHEY", "RITCHIE", "RITTER", "RIVAS", "RIVERA", "RIVERS", "RIZZO", "ROACH", "ROARK", + "ROBB", "ROBBINS", "ROBERGE", "ROBERSON", "ROBERT", "ROBERTS", "ROBERTSON", "ROBEY", "ROBINETTE", "ROBINS", + "ROBINSON", "ROBISON", "ROBLES", "ROBSON", "ROBY", "ROCHA", "ROCHE", "ROCK", "ROCKWELL", "RODEN", + "RODERICK", "RODGERS", "RODRIGUE", "RODRIGUES", "RODRIGUEZ", "RODRIQUEZ", "ROE", "ROGER", "ROGERS", "ROHR", + "ROJAS", "ROLAND", "ROLDAN", "ROLLER", "ROLLINS", "ROMAN", "ROMANO", "ROMEO", "ROMERO", "ROMO", "RONEY", + "ROONEY", "ROOT", "ROPER", "ROQUE", "ROSA", "ROSADO", "ROSALES", "ROSARIO", "ROSAS", "ROSE", "ROSEN", + "ROSENBAUM", "ROSENBERG", "ROSENTHAL", "ROSS", "ROSSER", "ROSSI", "ROTH", "ROUNDS", "ROUNDTREE", "ROUNTREE", + "ROUSE", "ROUSH", "ROUSSEAU", "ROUSSEL", "ROWAN", "ROWE", "ROWELL", "ROWLAND", "ROWLEY", "ROY", "ROYAL", + "ROYBAL", "ROYER", "ROYSTER", "RUBIN", "RUBIO", "RUBY", "RUCKER", "RUDD", "RUDOLPH", "RUFF", "RUFFIN", + "RUIZ", "RUNYAN", "RUNYON", "RUPERT", "RUPP", "RUSH", "RUSHING", "RUSS", "RUSSELL", "RUSSO", "RUST", "RUTH", + "RUTHERFORD", "RUTLEDGE", "RYAN", "RYDER", "SAAVEDRA", "SABO", "SACCO", "SADLER", "SAENZ", "SAGE", "SAGER", + "SALAS", "SALAZAR", "SALCEDO", "SALCIDO", "SALDANA", "SALDIVAR", "SALERNO", "SALES", "SALGADO", "SALINAS", + "SALISBURY", "SALLEE", "SALLEY", "SALMON", "SALTER", "SAM", "SAMMONS", "SAMPLE", "SAMPLES", "SAMPSON", + "SAMS", "SAMSON", "SAMUEL", "SAMUELS", "SANBORN", "SANCHES", "SANCHEZ", "SANDBERG", "SANDER", "SANDERS", + "SANDERSON", "SANDLIN", "SANDOVAL", "SANDS", "SANFORD", "SANTANA", "SANTIAGO", "SANTOS", "SAPP", "SARGENT", + "SASSER", "SATTERFIELD", "SAUCEDO", "SAUCIER", "SAUER", "SAULS", "SAUNDERS", "SAVAGE", "SAVOY", "SAWYER", + "SAWYERS", "SAXON", "SAXTON", "SAYERS", "SAYLOR", "SAYRE", "SCALES", "SCANLON", "SCARBOROUGH", "SCARBROUGH", + "SCHAEFER", "SCHAEFFER", "SCHAFER", "SCHAFFER", "SCHELL", "SCHERER", "SCHILLER", "SCHILLING", "SCHINDLER", + "SCHMID", "SCHMIDT", "SCHMITT", "SCHMITZ", "SCHNEIDER", "SCHOFIELD", "SCHOLL", "SCHOONOVER", "SCHOTT", + "SCHRADER", "SCHREIBER", "SCHREINER", "SCHROEDER", "SCHUBERT", "SCHULER", "SCHULTE", "SCHULTZ", "SCHULZ", + "SCHULZE", "SCHUMACHER", "SCHUSTER", "SCHWAB", "SCHWARTZ", "SCHWARZ", "SCHWEITZER", "SCOGGINS", "SCOTT", + "SCRIBNER", "SCROGGINS", "SCRUGGS", "SCULLY", "SEAL", "SEALS", "SEAMAN", "SEARCY", "SEARS", "SEATON", + "SEAY", "SEE", "SEELEY", "SEGURA", "SEIBERT", "SEIDEL", "SEIFERT", "SEILER", "SEITZ", "SELBY", "SELF", + "SELL", "SELLERS", "SELLS", "SENA", "SEPULVEDA", "SERNA", "SERRANO", "SESSIONS", "SETTLE", "SETTLES", + "SEVERSON", "SEWARD", "SEWELL", "SEXTON", "SEYMORE", "SEYMOUR", "SHACKELFORD", "SHADE", "SHAFER", "SHAFFER", + "SHAH", "SHANK", "SHANKS", "SHANNON", "SHAPIRO", "SHARKEY", "SHARP", "SHARPE", "SHAVER", "SHAW", "SHAY", + "SHEA", "SHEARER", "SHEEHAN", "SHEETS", "SHEFFIELD", "SHELBY", "SHELDON", "SHELL", "SHELLEY", "SHELLY", + "SHELTON", "SHEPARD", "SHEPHARD", "SHEPHERD", "SHEPPARD", "SHERIDAN", "SHERMAN", "SHERRILL", "SHERROD", + "SHERRY", "SHERWOOD", "SHIELDS", "SHIFFLETT", "SHIN", "SHINN", "SHIPLEY", "SHIPMAN", "SHIPP", "SHIRLEY", + "SHIVELY", "SHIVERS", "SHOCKLEY", "SHOEMAKER", "SHOOK", "SHORE", "SHORES", "SHORT", "SHORTER", "SHRADER", + "SHULER", "SHULL", "SHULTZ", "SHUMAKER", "SHUMAN", "SHUMATE", "SIBLEY", "SIDES", "SIEGEL", "SIERRA", + "SIGLER", "SIKES", "SILER", "SILLS", "SILVA", "SILVER", "SILVERMAN", "SILVERS", "SILVIA", "SIMMONS", + "SIMMS", "SIMON", "SIMONE", "SIMONS", "SIMONSON", "SIMPKINS", "SIMPSON", "SIMS", "SINCLAIR", "SINGER", + "SINGH", "SINGLETARY", "SINGLETON", "SIPES", "SISCO", "SISK", "SISSON", "SIZEMORE", "SKAGGS", "SKELTON", + "SKIDMORE", "SKINNER", "SKIPPER", "SLACK", "SLADE", "SLAGLE", "SLATER", "SLATON", "SLATTERY", "SLAUGHTER", + "SLAYTON", "SLEDGE", "SLOAN", "SLOCUM", "SLONE", "SMALL", "SMALLEY", "SMALLS", "SMALLWOOD", "SMART", + "SMILEY", "SMITH", "SMITHSON", "SMOOT", "SMOTHERS", "SMYTH", "SNEAD", "SNEED", "SNELL", "SNIDER", "SNIPES", + "SNODGRASS", "SNOW", "SNOWDEN", "SNYDER", "SOARES", "SOLANO", "SOLIS", "SOLIZ", "SOLOMON", "SOMERS", + "SOMERVILLE", "SOMMER", "SOMMERS", "SONG", "SORENSEN", "SORENSON", "SORIA", "SORIANO", "SORRELL", "SOSA", + "SOTELO", "SOTO", "SOUSA", "SOUTH", "SOUTHARD", "SOUTHERLAND", "SOUTHERN", "SOUZA", "SOWELL", "SOWERS", + "SPAIN", "SPALDING", "SPANGLER", "SPANN", "SPARKMAN", "SPARKS", "SPARROW", "SPAULDING", "SPEAR", "SPEARMAN", + "SPEARS", "SPEED", "SPEER", "SPEIGHT", "SPELLMAN", "SPENCE", "SPENCER", "SPERRY", "SPICER", "SPILLMAN", + "SPINKS", "SPIVEY", "SPOONER", "SPRADLIN", "SPRAGUE", "SPRIGGS", "SPRING", "SPRINGER", "SPROUSE", "SPRUILL", + "SPURGEON", "SPURLOCK", "SQUIRES", "STACEY", "STACK", "STACKHOUSE", "STACY", "STAFFORD", "STAGGS", "STAHL", + "STALEY", "STALLINGS", "STALLWORTH", "STAMM", "STAMPER", "STAMPS", "STANFIELD", "STANFORD", "STANLEY", + "STANTON", "STAPLES", "STAPLETON", "STARK", "STARKEY", "STARKS", "STARLING", "STARNES", "STARR", "STATEN", + "STATON", "STAUFFER", "STCLAIR", "STEADMAN", "STEARNS", "STEED", "STEEL", "STEELE", "STEEN", "STEFFEN", + "STEGALL", "STEIN", "STEINBERG", "STEINER", "STEPHEN", "STEPHENS", "STEPHENSON", "STEPP", "STERLING", + "STERN", "STEVENS", "STEVENSON", "STEWARD", "STEWART", "STIDHAM", "STILES", "STILL", "STILLMAN", + "STILLWELL", "STILTNER", "STINE", "STINNETT", "STINSON", "STITT", "STJOHN", "STOCK", "STOCKTON", "STODDARD", + "STOKER", "STOKES", "STOLL", "STONE", "STONER", "STOREY", "STORY", "STOTT", "STOUT", "STOVALL", "STOVER", + "STOWE", "STPIERRE", "STRAIN", "STRAND", "STRANGE", "STRATTON", "STRAUB", "STRAUSS", "STREET", "STREETER", + "STRICKLAND", "STRINGER", "STRONG", "STROTHER", "STROUD", "STROUP", "STRUNK", "STUART", "STUBBLEFIELD", + "STUBBS", "STUCKEY", "STULL", "STUMP", "STURDIVANT", "STURGEON", "STURGILL", "STURGIS", "STURM", "STYLES", + "SUAREZ", "SUGGS", "SULLIVAN", "SUMMERLIN", "SUMMERS", "SUMNER", "SUMPTER", "SUN", "SUTHERLAND", "SUTTER", + "SUTTON", "SWAFFORD", "SWAIN", "SWAN", "SWANK", "SWANN", "SWANSON", "SWARTZ", "SWEARINGEN", "SWEAT", + "SWEENEY", "SWEET", "SWENSON", "SWIFT", "SWISHER", "SWITZER", "SWOPE", "SYKES", "SYLVESTER", "TABER", + "TABOR", "TACKETT", "TAFT", "TAGGART", "TALBERT", "TALBOT", "TALBOTT", "TALLENT", "TALLEY", "TAM", "TAMAYO", + "TAN", "TANAKA", "TANG", "TANNER", "TAPIA", "TAPP", "TARVER", "TATE", "TATUM", "TAVARES", "TAYLOR", + "TEAGUE", "TEAL", "TEEL", "TEETER", "TEJADA", "TEJEDA", "TELLEZ", "TEMPLE", "TEMPLETON", "TENNANT", + "TENNEY", "TERRELL", "TERRILL", "TERRY", "THACKER", "THAMES", "THAO", "THARP", "THATCHER", "THAYER", + "THERIAULT", "THERIOT", "THIBODEAU", "THIBODEAUX", "THIEL", "THIGPEN", "THOMAS", "THOMASON", "THOMPSON", + "THOMSEN", "THOMSON", "THORN", "THORNBURG", "THORNE", "THORNHILL", "THORNTON", "THORP", "THORPE", "THORTON", + "THRASH", "THRASHER", "THURMAN", "THURSTON", "TIBBETTS", "TIBBS", "TICE", "TIDWELL", "TIERNEY", "TIJERINA", + "TILLER", "TILLERY", "TILLEY", "TILLMAN", "TILTON", "TIMM", "TIMMONS", "TINKER", "TINSLEY", "TIPTON", + "TIRADO", "TISDALE", "TITUS", "TOBIAS", "TOBIN", "TODD", "TOLBERT", "TOLEDO", "TOLER", "TOLIVER", + "TOLLIVER", "TOM", "TOMLIN", "TOMLINSON", "TOMPKINS", "TONEY", "TONG", "TORO", "TORRENCE", "TORRES", + "TORREZ", "TOTH", "TOTTEN", "TOVAR", "TOWNES", "TOWNS", "TOWNSEND", "TRACY", "TRAHAN", "TRAMMELL", "TRAN", + "TRAPP", "TRASK", "TRAVERS", "TRAVIS", "TRAYLOR", "TREADWAY", "TREADWELL", "TREJO", "TREMBLAY", "TRENT", + "TREVINO", "TRIBBLE", "TRICE", "TRIMBLE", "TRINIDAD", "TRIPLETT", "TRIPP", "TROTTER", "TROUT", "TROUTMAN", + "TROY", "TRUDEAU", "TRUE", "TRUITT", "TRUJILLO", "TRUONG", "TUBBS", "TUCK", "TUCKER", "TUGGLE", "TURK", + "TURLEY", "TURMAN", "TURNBULL", "TURNER", "TURNEY", "TURPIN", "TUTTLE", "TYLER", "TYNER", "TYREE", "TYSON", + "ULRICH", "UNDERHILL", "UNDERWOOD", "UNGER", "UPCHURCH", "UPSHAW", "UPTON", "URBAN", "URBINA", "URIBE", + "USHER", "UTLEY", "VAIL", "VALADEZ", "VALDES", "VALDEZ", "VALENCIA", "VALENTI", "VALENTIN", "VALENTINE", + "VALENZUELA", "VALERIO", "VALLE", "VALLEJO", "VALLES", "VAN", "VANBUREN", "VANCE", "VANDIVER", "VANDYKE", + "VANG", "VANHOOSE", "VANHORN", "VANMETER", "VANN", "VANOVER", "VANWINKLE", "VARELA", "VARGAS", "VARNER", + "VARNEY", "VASQUEZ", "VAUGHAN", "VAUGHN", "VAUGHT", "VAZQUEZ", "VEAL", "VEGA", "VELA", "VELASCO", + "VELASQUEZ", "VELAZQUEZ", "VELEZ", "VENABLE", "VENEGAS", "VENTURA", "VERA", "VERDIN", "VERGARA", "VERNON", + "VEST", "VETTER", "VICK", "VICKERS", "VICKERY", "VICTOR", "VIDAL", "VIEIRA", "VIERA", "VIGIL", "VILLA", + "VILLALOBOS", "VILLANUEVA", "VILLAREAL", "VILLARREAL", "VILLASENOR", "VILLEGAS", "VINCENT", "VINES", + "VINSON", "VITALE", "VO", "VOGEL", "VOGT", "VOSS", "VU", "VUE", "WADDELL", "WADE", "WADSWORTH", "WAGGONER", + "WAGNER", "WAGONER", "WAHL", "WAITE", "WAKEFIELD", "WALDEN", "WALDRON", "WALDROP", "WALKER", "WALL", + "WALLACE", "WALLEN", "WALLER", "WALLING", "WALLIS", "WALLS", "WALSH", "WALSTON", "WALTER", "WALTERS", + "WALTON", "WAMPLER", "WANG", "WARD", "WARDEN", "WARE", "WARFIELD", "WARNER", "WARREN", "WASHBURN", + "WASHINGTON", "WASSON", "WATERMAN", "WATERS", "WATKINS", "WATSON", "WATT", "WATTERS", "WATTS", "WAUGH", + "WAY", "WAYNE", "WEATHERFORD", "WEATHERLY", "WEATHERS", "WEAVER", "WEBB", "WEBBER", "WEBER", "WEBSTER", + "WEDDLE", "WEED", "WEEKS", "WEEMS", "WEINBERG", "WEINER", "WEINSTEIN", "WEIR", "WEIS", "WEISS", "WELCH", + "WELDON", "WELKER", "WELLER", "WELLMAN", "WELLS", "WELSH", "WENDT", "WENGER", "WENTWORTH", "WENTZ", + "WENZEL", "WERNER", "WERTZ", "WESLEY", "WEST", "WESTBROOK", "WESTER", "WESTFALL", "WESTMORELAND", "WESTON", + "WETZEL", "WHALEN", "WHALEY", "WHARTON", "WHATLEY", "WHEAT", "WHEATLEY", "WHEATON", "WHEELER", "WHELAN", + "WHIPPLE", "WHITAKER", "WHITCOMB", "WHITE", "WHITED", "WHITEHEAD", "WHITEHURST", "WHITEMAN", "WHITESIDE", + "WHITFIELD", "WHITING", "WHITLEY", "WHITLOCK", "WHITLOW", "WHITMAN", "WHITMIRE", "WHITMORE", "WHITNEY", + "WHITSON", "WHITT", "WHITTAKER", "WHITTEN", "WHITTINGTON", "WHITTLE", "WHITWORTH", "WHYTE", "WICK", + "WICKER", "WICKHAM", "WICKS", "WIESE", "WIGGINS", "WILBANKS", "WILBER", "WILBUR", "WILBURN", "WILCOX", + "WILD", "WILDE", "WILDER", "WILES", "WILEY", "WILHELM", "WILHITE", "WILKE", "WILKERSON", "WILKES", + "WILKINS", "WILKINSON", "WILKS", "WILL", "WILLARD", "WILLETT", "WILLEY", "WILLIAM", "WILLIAMS", + "WILLIAMSON", "WILLIFORD", "WILLINGHAM", "WILLIS", "WILLOUGHBY", "WILLS", "WILLSON", "WILMOTH", "WILSON", + "WILT", "WIMBERLY", "WINCHESTER", "WINDHAM", "WINFIELD", "WINFREY", "WING", "WINGATE", "WINGFIELD", + "WINKLER", "WINN", "WINSLOW", "WINSTEAD", "WINSTON", "WINTER", "WINTERS", "WIRTH", "WISE", "WISEMAN", + "WISNIEWSKI", "WITCHER", "WITHERS", "WITHERSPOON", "WITHROW", "WITT", "WITTE", "WOFFORD", "WOLF", "WOLFE", + "WOLFF", "WOLFORD", "WOMACK", "WONG", "WOO", "WOOD", "WOODALL", "WOODARD", "WOODBURY", "WOODCOCK", "WOODEN", + "WOODLEY", "WOODRUFF", "WOODS", "WOODSON", "WOODWARD", "WOODWORTH", "WOODY", "WOOLDRIDGE", "WOOLEY", + "WOOTEN", "WORD", "WORDEN", "WORKMAN", "WORLEY", "WORRELL", "WORSHAM", "WORTH", "WORTHAM", "WORTHINGTON", + "WORTHY", "WRAY", "WREN", "WRIGHT", "WU", "WYANT", "WYATT", "WYLIE", "WYMAN", "WYNN", "WYNNE", "XIONG", + "YAMAMOTO", "YANCEY", "YANEZ", "YANG", "YARBROUGH", "YATES", "YAZZIE", "YBARRA", "YEAGER", "YEE", "YI", + "YOCUM", "YODER", "YOO", "YOON", "YORK", "YOST", "YOUNG", "YOUNGBLOOD", "YOUNGER", "YOUNT", "YU", + "ZAMBRANO", "ZAMORA", "ZAPATA", "ZARAGOZA", "ZARATE", "ZAVALA", "ZEIGLER", "ZELLER", "ZEPEDA", "ZHANG", + "ZIEGLER", "ZIELINSKI", "ZIMMER", "ZIMMERMAN", "ZINK", "ZOOK", "ZUNIGA" }; + } + + public static String generateRandomName() { + String first, last; + + boolean isScottish = (MathUtils.randInt(0, 10) >= 9); + + if (isScottish) { + first = mScottishFirstNames[MathUtils.randInt(0, mScottishFirstNames.length - 1)].toLowerCase(); + } + else { + first = mFirstNames[MathUtils.randInt(0, mFirstNames.length - 1)].toLowerCase(); + } + + last = mLastNames[MathUtils.randInt(0, mLastNames.length - 1)].toLowerCase(); + if (first.equalsIgnoreCase(last)) { + while (first.equalsIgnoreCase(last)) + first = mFirstNames[MathUtils.randInt(0, mFirstNames.length - 1)].toLowerCase(); + } + first = StringUtils.capitalize(first); + last = StringUtils.capitalize(last); + return first + " " + last; + + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java b/src/main/java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java new file mode 100644 index 0000000000..b515f0979e --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/VillagerEventHandler.java @@ -0,0 +1,47 @@ +package gtPlusPlus.plugin.villagers; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.plugin.villagers.entity.EntityBaseVillager; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; + +public class VillagerEventHandler { + + private final static VillagerEventHandler mInstance; + + static { + mInstance = new VillagerEventHandler(); + Utils.registerEvent(mInstance); + } + + @SubscribeEvent + public void onEntityJoinWorld(EntityJoinWorldEvent event){ + + + /*try { + if (event.entity != null && event.entity instanceof EntityLivingBase && event.entity instanceof EntityVillager){ + EntityVillager entity = (EntityVillager) event.entity; + World world = entity.worldObj; + int profession = entity.getProfession(); + if (world != null && (profession >= 7735 && profession <= 7737)){ + EntityBaseVillager mNew = new EntityBaseVillager(world, profession); + mNew.copyLocationAndAnglesFrom(entity); + if (mNew != null) { + world.removeEntity(entity); + world.spawnEntityInWorld(mNew); + } + } + + } + } + catch (Throwable t) { + t.printStackTrace(); + return; + }*/ + + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/VillagerObject.java b/src/main/java/gtPlusPlus/plugin/villagers/VillagerObject.java new file mode 100644 index 0000000000..a5587a1b52 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/VillagerObject.java @@ -0,0 +1,40 @@ +package gtPlusPlus.plugin.villagers; + +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.util.ResourceLocation; + +public class VillagerObject { + + public final int mID; + public final String mName; + public final IVillageTradeHandler mCustomTrade; + + + public VillagerObject(int aID, String aName, Object aProfession, Object aCareer, Object aSkin, IVillageTradeHandler aCustomTrade) { + + mID = aID; + mName = aName; + mCustomTrade = aCustomTrade; + + //Register Custom Trade to Registry. + if (aCustomTrade != null) { + Core_VillagerAdditions.mVillagerTrades.put(new Pair(7735+aID, aCustomTrade)); + } + //Register Skin to Registry. + if (aSkin != null) { + + if (aSkin instanceof String) { + String s = (String) aSkin; + aSkin = new ResourceLocation(CORE.MODID+":"+"textures/entity/villager/"+s+".png"); + } + if (aSkin instanceof ResourceLocation) { + Core_VillagerAdditions.mVillagerSkins.put(aID, (ResourceLocation) aSkin); + } + + } + VillagerUtils.registerNewVillager(aID, this); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/VillagerUtils.java b/src/main/java/gtPlusPlus/plugin/villagers/VillagerUtils.java new file mode 100644 index 0000000000..f252ad068d --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/VillagerUtils.java @@ -0,0 +1,23 @@ +package gtPlusPlus.plugin.villagers; + +import java.util.HashMap; + +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; + +public class VillagerUtils { + + public static final HashMap mVillagerMap = new HashMap(); + + public static void registerNewVillager(int aID, String aName, Object aProfession, Object aCareer, Object aSkin, IVillageTradeHandler aCustomTrade) { + registerNewVillager(aID, new VillagerObject(aID, aName, aProfession, aCareer, aSkin, aCustomTrade)); + } + + public static void registerNewVillager(int aID, VillagerObject aVillager) { + mVillagerMap.put(aID, aVillager); + } + + + + + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java b/src/main/java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java new file mode 100644 index 0000000000..916f360012 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/block/BlockGenericSpawner.java @@ -0,0 +1,60 @@ +package gtPlusPlus.plugin.villagers.block; + +import static gtPlusPlus.core.lib.CORE.RANDOM; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.item.base.itemblock.ItemBlockSpawner; +import gtPlusPlus.plugin.villagers.Core_VillagerAdditions; +import gtPlusPlus.plugin.villagers.tile.TileEntityGenericSpawner; +import net.minecraft.block.BlockMobSpawner; +import net.minecraft.creativetab.CreativeTabs; +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; + +public class BlockGenericSpawner extends BlockMobSpawner { + + public BlockGenericSpawner() { + this.disableStats(); + this.setHardness(5.0F); + this.setStepSound(soundTypeMetal); + this.setBlockName("blockMobSpawnerEx"); + this.setBlockTextureName("mob_spawner"); + this.setResistance(2000.0F); + GameRegistry.registerBlock(this, ItemBlockSpawner.class, "blockMobSpawnerEx"); + Core_VillagerAdditions.mInstance.log("Registered Custom Spawner Block."); + } + + /** + * Returns a new instance of a block's tile entity class. Called on placing the block. + */ + @Override + public TileEntity createNewTileEntity(World world, int meta) + { + return new TileEntityGenericSpawner(meta); + } + + @Override + public int getExpDrop(IBlockAccess world, int metadata, int fortune){ + return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15); + } + + /** + * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) + */ + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) + { + for (int i = 0; i < Math.max(1,TileEntityGenericSpawner.mSpawners.size()); ++i) + { + p_149666_3_.add(new ItemStack(p_149666_1_, 1, i)); + } + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java b/src/main/java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java new file mode 100644 index 0000000000..c29aadb16b --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java @@ -0,0 +1,538 @@ +package gtPlusPlus.plugin.villagers.entity; + +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.Iterator; +import java.util.Random; + +import cpw.mods.fml.common.registry.VillagerRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.plugin.villagers.NameLists; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentData; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; +import net.minecraft.util.Tuple; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; +import net.minecraft.village.Village; +import net.minecraft.world.World; + +public class EntityBaseVillager extends EntityVillager { + + // public static final VillagerProfession mProfession; + + /* + * + * Your problem is that you are extending EntityVillager, but buyingList and + * addDefaultEquipment are both PRIVATE members of EntityVillager - you cannot + * use or override them without Reflection or ASM. + * + * What you can do, however, is override getRecipes to return your own list, but + * because you override EntityVillager, your mob is still using the villager's + * buyingList (which is NULL) when useRecipe or any other villager method is + * called. You either have to override every method from EntityVillager which + * interacts with buyingList and make it use your own list, or you need to not + * extend EntityVillager and just implement IMerchant instead. + */ + + private final int mRoleID; + + public EntityBaseVillager(World aWorld){ + this(aWorld, 0); + } + + public EntityBaseVillager(World aWorld, int aID) { + super(aWorld, aID); + mRoleID = aID; + } + + @Override + public void writeEntityToNBT(NBTTagCompound aNBT) { + if (this.hasCustomNameTag()) { + if (!aNBT.hasKey("aCustomName")) { + aNBT.setString("aCustomName", this.getCommandSenderName()); + } + } + super.writeEntityToNBT(aNBT); + } + + @Override + public void readEntityFromNBT(NBTTagCompound aNBT) { + if (aNBT.hasKey("aCustomName")) { + if (!this.getCustomNameTag().equals(aNBT.getString("aCustomName"))) { + this.setCustomNameTag(aNBT.getString("aCustomName")); + } + } + super.readEntityFromNBT(aNBT); + } + + @Override + public void writeToNBT(NBTTagCompound aNBT) { + // TODO Auto-generated method stub + super.writeToNBT(aNBT); + } + + @Override + public void readFromNBT(NBTTagCompound aNBT) { + // TODO Auto-generated method stub + super.readFromNBT(aNBT); + } + + @Override + protected boolean canDespawn() { + return !this.hasCustomNameTag(); + } + + @Override + public void setProfession(int p_70938_1_) { + super.setProfession(p_70938_1_); + } + + @Override + public int getProfession() { + int prof = super.getProfession(); + //Logger.INFO(""+mRoleID); + return prof < 7735 ? 7738 : prof; + } + + @Override + public void useRecipe(MerchantRecipe p_70933_1_) { + super.useRecipe(p_70933_1_); + } + + @Override + public void setRecipes(MerchantRecipeList p_70930_1_) { + super.setRecipes(p_70930_1_); + } + + public boolean shouldAlwaysSprint() { + return false; + }; + + @Override + public void onLivingUpdate() { + + // Set Custom Name + if (!this.hasCustomNameTag()) { + this.setCustomNameTag(NameLists.generateRandomName()); + } + + super.onLivingUpdate(); + + // Make these guys always sprint + if (shouldAlwaysSprint()) { + if (!this.isSprinting()) { + this.setSprinting(true); + } + } + else { + if (this.isSprinting()) { + this.setSprinting(false); + } + } + + } + + @Override + public Entity getEntityToAttack() { + return super.getEntityToAttack(); + } + + @Override + public boolean getAlwaysRenderNameTag() { + return hasCustomNameTag(); + } + + @Override + public Random getRNG() { + return CORE.RANDOM; + } + + @Override + public void setSprinting(boolean bool) { + super.setSprinting(bool); + } + + /** + * Custom Shit + */ + + protected float getField_82191_bN() { + Field v82191 = ReflectionUtils.getField(getClass(), "field_82191_bN"); + try { + return v82191 != null ? v82191.getFloat(this) : 0f; + } catch (IllegalArgumentException | IllegalAccessException e) { + return 0f; + } + } + + protected void setField_82191_bN(float f) { + try { + ReflectionUtils.setField(this, "field_82191_bN", f); + } catch (IllegalArgumentException e) { + } + } + + protected boolean getNeedsInitilization() { + Field v82191 = ReflectionUtils.getField(EntityVillager.class, "needsInitilization"); + try { + return v82191 != null ? v82191.getBoolean(this) : false; + } catch (IllegalArgumentException | IllegalAccessException e) { + return false; + } + } + + protected void setNeedsInitilization(boolean f) { + try { + ReflectionUtils.setField(this, "needsInitilization", f); + } catch (IllegalArgumentException e) { + } + } + + protected MerchantRecipeList getBuyingList() { + Field v82191; + MerchantRecipeList o = null; + v82191 = ReflectionUtils.getField(getClass(), "buyingList"); + try { + if (v82191 != null) + o = (MerchantRecipeList) v82191.get(this); + Logger.WARNING("Is BuyingList Valid? " + (v82191 != null)); + return v82191 != null ? o : null; + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + return null; + } + + } + + protected void setBuyingList(MerchantRecipeList f) { + try { + Logger.WARNING("set BuyingList? "+(ReflectionUtils.setField(this, "buyingList", f))); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } + } + + protected Village getVillageObject() { + Field v82191 = ReflectionUtils.getField(getClass(), "villageObj"); + try { + return v82191 != null ? (Village) v82191.get(this) : null; + } catch (IllegalArgumentException | IllegalAccessException e) { + return null; + } + } + + protected String getLastBuyingPlayer() { + Field v82191 = ReflectionUtils.getField(getClass(), "lastBuyingPlayer"); + try { + return v82191 != null ? (String) v82191.get(this) : ""; + } catch (IllegalArgumentException | IllegalAccessException e) { + return ""; + } + } + + public MerchantRecipeList getRecipes(EntityPlayer p_70934_1_) { + if (getBuyingList() == null) { + this.addDefaultEquipmentAndRecipies(1); + } + return getBuyingList(); + } + + /** + * Adjusts the probability of obtaining a given recipe being offered by a + * villager + */ + private float adjustProbability(float p_82188_1_) { + float f1 = p_82188_1_ + getField_82191_bN(); + return f1 > 0.9F ? 0.9F - (f1 - 0.9F) : f1; + } + + /** + * based on the villagers profession add items, equipment, and recipies adds + * par1 random items to the list of things that the villager wants to buy. (at + * most 1 of each wanted type is added) + */ + private void addDefaultEquipmentAndRecipies(int p_70950_1_) { + if (this.getBuyingList() != null) { + setField_82191_bN(MathHelper.sqrt_float((float) this.getBuyingList().size()) * 0.2F); + } else { + setField_82191_bN(0.0F); + } + + MerchantRecipeList merchantrecipelist; + merchantrecipelist = new MerchantRecipeList(); + VillagerRegistry.manageVillagerTrades(merchantrecipelist, this, this.getProfession(), this.rand); + int k; + label50: + + switch (this.getProfession()) { + case 0: + addPurchaseRecipe(merchantrecipelist, Items.wheat, this.rand, this.adjustProbability(0.9F)); + addPurchaseRecipe(merchantrecipelist, Item.getItemFromBlock(Blocks.wool), this.rand, + this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.chicken, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.cooked_fished, this.rand, this.adjustProbability(0.4F)); + addEmeraldTrade(merchantrecipelist, Items.bread, this.rand, this.adjustProbability(0.9F)); + addEmeraldTrade(merchantrecipelist, Items.melon, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.apple, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cookie, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.shears, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.flint_and_steel, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cooked_chicken, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.arrow, this.rand, this.adjustProbability(0.5F)); + + if (this.rand.nextFloat() < this.adjustProbability(0.5F)) { + merchantrecipelist.add(new MerchantRecipe(new ItemStack(Blocks.gravel, 10), + new ItemStack(Items.emerald), new ItemStack(Items.flint, 4 + this.rand.nextInt(2), 0))); + } + + break; + case 1: + addPurchaseRecipe(merchantrecipelist, Items.paper, this.rand, this.adjustProbability(0.8F)); + addPurchaseRecipe(merchantrecipelist, Items.book, this.rand, this.adjustProbability(0.8F)); + addPurchaseRecipe(merchantrecipelist, Items.written_book, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.bookshelf), this.rand, + this.adjustProbability(0.8F)); + addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glass), this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.compass, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.clock, this.rand, this.adjustProbability(0.2F)); + + if (this.rand.nextFloat() < this.adjustProbability(0.07F)) { + Enchantment enchantment = Enchantment.enchantmentsBookList[this.rand + .nextInt(Enchantment.enchantmentsBookList.length)]; + int i1 = MathHelper.getRandomIntegerInRange(this.rand, enchantment.getMinLevel(), + enchantment.getMaxLevel()); + ItemStack itemstack = Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(enchantment, i1)); + k = 2 + this.rand.nextInt(5 + i1 * 10) + 3 * i1; + merchantrecipelist + .add(new MerchantRecipe(new ItemStack(Items.book), new ItemStack(Items.emerald, k), itemstack)); + } + + break; + case 2: + addEmeraldTrade(merchantrecipelist, Items.ender_eye, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.experience_bottle, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.redstone, this.rand, this.adjustProbability(0.4F)); + addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glowstone), this.rand, + this.adjustProbability(0.3F)); + Item[] aitem = new Item[] { Items.iron_sword, Items.diamond_sword, Items.iron_chestplate, + Items.diamond_chestplate, Items.iron_axe, Items.diamond_axe, Items.iron_pickaxe, + Items.diamond_pickaxe }; + Item[] aitem1 = aitem; + int j = aitem.length; + k = 0; + + while (true) { + if (k >= j) { + break label50; + } + + Item item = aitem1[k]; + + if (this.rand.nextFloat() < this.adjustProbability(0.05F)) { + merchantrecipelist.add(new MerchantRecipe(new ItemStack(item, 1, 0), + new ItemStack(Items.emerald, 2 + this.rand.nextInt(3), 0), + EnchantmentHelper.addRandomEnchantment(this.rand, new ItemStack(item, 1, 0), + 5 + this.rand.nextInt(15)))); + } + + ++k; + } + case 3: + addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); + addPurchaseRecipe(merchantrecipelist, Items.iron_ingot, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.diamond, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.iron_sword, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_sword, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.iron_axe, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_axe, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.iron_pickaxe, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_pickaxe, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.iron_shovel, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_shovel, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_hoe, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_hoe, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_boots, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_boots, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_helmet, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_helmet, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_chestplate, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_chestplate, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_leggings, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_leggings, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_boots, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_helmet, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_chestplate, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_leggings, this.rand, this.adjustProbability(0.1F)); + break; + case 4: + addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); + addPurchaseRecipe(merchantrecipelist, Items.porkchop, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.beef, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.saddle, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.leather_chestplate, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.leather_boots, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.leather_helmet, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.leather_leggings, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cooked_porkchop, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cooked_beef, this.rand, this.adjustProbability(0.3F)); + } + + if (merchantrecipelist.isEmpty()) { + addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, 1.0F); + } + + Collections.shuffle(merchantrecipelist); + + if (this.getBuyingList() == null) { + this.setBuyingList(new MerchantRecipeList()); + } + + for (int l = 0; l < p_70950_1_ && l < merchantrecipelist.size(); ++l) { + try { + this.getBuyingList().addToListWithCheck((MerchantRecipe) merchantrecipelist.get(l)); + } + catch (Throwable t) { + Logger.INFO("Villager with ID "+this.entityUniqueID.toString()+" at | X: "+this.posX+" Y: "+this.posY+" Z: "+this.posZ+" may have corrupt trades, it is advised to remove/kill it."); + } + } + + try { + if (this.getBuyingList() != null) { + for (Object g : this.getBuyingList()) { + if (g != null) { + if (g instanceof MerchantRecipe) { + MerchantRecipe m = (MerchantRecipe) g; + ItemStack selling = m.getItemToSell(); + ItemStack[] buying = new ItemStack[] {m.getItemToBuy(), m.getSecondItemToBuy() != null ? m.getSecondItemToBuy() : null}; + if (selling == null) { + Logger.WARNING("Villager is Selling an invalid item"); + } + else if (buying[0] == null && buying[1] == null) { + Logger.WARNING("Villager is buying two invalid items"); + } + else { + Logger.WARNING("Villager is Selling x"+selling.stackSize+selling.getDisplayName()+" for x"+buying[0].stackSize+" "+buying[0].getDisplayName()+buying[1] != null ? " and for x"+buying[1].stackSize+" "+buying[1].getDisplayName() : ""); + } + } + else + Logger.WARNING("Found: "+g.getClass().getName()); + } + } + } + else { + + } + } + catch (Throwable t) { + + } + + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + @Override + protected void updateAITick() { + if (!this.isTrading()) { + if (this.getNeedsInitilization()) { + if (this.getBuyingList().size() > 1) { + Iterator iterator = this.getBuyingList().iterator(); + + while (iterator.hasNext()) { + MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); + + if (merchantrecipe.isRecipeDisabled()) { + merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2); + } + } + } + + this.addDefaultEquipmentAndRecipies(1); + this.setNeedsInitilization(false); + + if (this.getVillageObject() != null && this.getLastBuyingPlayer() != null) { + this.worldObj.setEntityState(this, (byte) 14); + this.getVillageObject().setReputationForPlayer(this.getLastBuyingPlayer(), 1); + } + } + } + super.updateAITick(); + } + + public static void addEmeraldTrade(MerchantRecipeList aRecipeList, Item aItem, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + int i = getLootAmount_BlacksmithSellingList(aItem, aRand); + ItemStack itemstack; + ItemStack itemstack1; + + if (i < 0) { + itemstack = new ItemStack(Items.emerald, 1, 0); + itemstack1 = new ItemStack(aItem, -i, 0); + } else { + itemstack = new ItemStack(Items.emerald, i, 0); + itemstack1 = new ItemStack(aItem, 1, 0); + } + + aRecipeList.add(new MerchantRecipe(itemstack, itemstack1)); + } + } + + public static void addCustomTrade(MerchantRecipeList aRecipeList, ItemStack aItem1, ItemStack aItem2, ItemStack aItem3, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + aRecipeList.add(new MerchantRecipe(aItem1, aItem2, aItem3)); + } + } + + private static int getLootAmount_BlacksmithSellingList(Item aItem, Random aRand) { + Tuple tuple = (Tuple) blacksmithSellingList.get(aItem); + return tuple == null ? 1 + : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() + ? ((Integer) tuple.getFirst()).intValue() + : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( + ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); + } + + public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + aTradeList.add(new MerchantRecipe(getSimpleLootStack(aItem, aRand), Items.emerald)); + } + } + + private static ItemStack getSimpleLootStack(Item aItem, Random aRand) { + return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), 0); + } + + public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, int aMeta, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + aTradeList.add(new MerchantRecipe(getComplexLootStack(aItem, aMeta, aRand), Items.emerald)); + } + } + + private static ItemStack getComplexLootStack(Item aItem, int aMeta, Random aRand) { + return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), aMeta); + } + + private static int getLootAmount_VillagerSellingList(Item aItem, Random aRand) { + Tuple tuple = (Tuple) villagersSellingList.get(aItem); + return tuple == null ? 1 + : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() + ? ((Integer) tuple.getFirst()).intValue() + : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( + ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java b/src/main/java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java new file mode 100644 index 0000000000..4f9e2954a4 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java @@ -0,0 +1,525 @@ +package gtPlusPlus.plugin.villagers.entity; + +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.Iterator; +import java.util.Random; + +import cpw.mods.fml.common.registry.VillagerRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.plugin.villagers.NameLists; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentData; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityAgeable; +import net.minecraft.entity.IEntityLivingData; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; +import net.minecraft.util.Tuple; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; +import net.minecraft.village.Village; +import net.minecraft.world.World; + +public class EntityNativeAustralian extends EntityVillager { + + // public static final VillagerProfession mProfession; + + /* + * + * Your problem is that you are extending EntityVillager, but buyingList and + * addDefaultEquipment are both PRIVATE members of EntityVillager - you cannot + * use or override them without Reflection or ASM. + * + * What you can do, however, is override getRecipes to return your own list, but + * because you override EntityVillager, your mob is still using the villager's + * buyingList (which is NULL) when useRecipe or any other villager method is + * called. You either have to override every method from EntityVillager which + * interacts with buyingList and make it use your own list, or you need to not + * extend EntityVillager and just implement IMerchant instead. + */ + + private final int mRoleID; + + public EntityNativeAustralian(World aWorld) { + super(aWorld, 7738); + mRoleID = 7738; + } + + public EntityVillager createChild(EntityAgeable p_90011_1_){ + EntityNativeAustralian entityvillager = new EntityNativeAustralian(this.worldObj); + entityvillager.onSpawnWithEgg((IEntityLivingData)null); + return entityvillager; + } + + public boolean allowLeashing() + { + return true; + } + + @Override + public void writeEntityToNBT(NBTTagCompound aNBT) { + if (this.hasCustomNameTag()) { + if (!aNBT.hasKey("aCustomName")) { + aNBT.setString("aCustomName", this.getCommandSenderName()); + } + } + super.writeEntityToNBT(aNBT); + } + + @Override + public void readEntityFromNBT(NBTTagCompound aNBT) { + if (aNBT.hasKey("aCustomName")) { + if (!this.getCustomNameTag().equals(aNBT.getString("aCustomName"))) { + this.setCustomNameTag(aNBT.getString("aCustomName")); + } + } + super.readEntityFromNBT(aNBT); + } + + @Override + public void writeToNBT(NBTTagCompound aNBT) { + // TODO Auto-generated method stub + super.writeToNBT(aNBT); + } + + @Override + public void readFromNBT(NBTTagCompound aNBT) { + // TODO Auto-generated method stub + super.readFromNBT(aNBT); + } + + @Override + protected boolean canDespawn() { + return !false; + } + + @Override + public void setProfession(int p_70938_1_) { + super.setProfession(7738); + } + + @Override + public int getProfession() { + return mRoleID; + } + + @Override + public void useRecipe(MerchantRecipe p_70933_1_) { + super.useRecipe(p_70933_1_); + } + + @Override + public void setRecipes(MerchantRecipeList p_70930_1_) { + super.setRecipes(p_70930_1_); + } + + public boolean shouldAlwaysSprint() { + return false; + }; + + @Override + public void onLivingUpdate() { + super.onLivingUpdate(); + } + + @Override + public Entity getEntityToAttack() { + return super.getEntityToAttack(); + } + + @Override + public boolean getAlwaysRenderNameTag() { + return hasCustomNameTag(); + } + + @Override + public Random getRNG() { + return CORE.RANDOM; + } + + @Override + public void setSprinting(boolean bool) { + super.setSprinting(bool); + } + + /** + * Custom Shit + */ + + protected float getField_82191_bN() { + Field v82191 = ReflectionUtils.getField(getClass(), "field_82191_bN"); + try { + return v82191 != null ? v82191.getFloat(this) : 0f; + } catch (IllegalArgumentException | IllegalAccessException e) { + return 0f; + } + } + + protected void setField_82191_bN(float f) { + try { + ReflectionUtils.setField(this, "field_82191_bN", f); + } catch (IllegalArgumentException e) { + } + } + + protected boolean getNeedsInitilization() { + Field v82191 = ReflectionUtils.getField(EntityVillager.class, "needsInitilization"); + try { + return v82191 != null ? v82191.getBoolean(this) : false; + } catch (IllegalArgumentException | IllegalAccessException e) { + return false; + } + } + + protected void setNeedsInitilization(boolean f) { + try { + ReflectionUtils.setField(this, "needsInitilization", f); + } catch (IllegalArgumentException e) { + } + } + + protected MerchantRecipeList getBuyingList() { + Field v82191; + MerchantRecipeList o = null; + v82191 = ReflectionUtils.getField(getClass(), "buyingList"); + try { + if (v82191 != null) + o = (MerchantRecipeList) v82191.get(this); + Logger.WARNING("Is BuyingList Valid? " + (v82191 != null)); + return v82191 != null ? o : null; + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + return null; + } + } + + protected void setBuyingList(MerchantRecipeList f) { + try { + Logger.WARNING("set BuyingList? "+(ReflectionUtils.setField(this, "buyingList", f))); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } + } + + protected Village getVillageObject() { + Field v82191 = ReflectionUtils.getField(getClass(), "villageObj"); + try { + return v82191 != null ? (Village) v82191.get(this) : null; + } catch (IllegalArgumentException | IllegalAccessException e) { + return null; + } + } + + protected String getLastBuyingPlayer() { + Field v82191 = ReflectionUtils.getField(getClass(), "lastBuyingPlayer"); + try { + return v82191 != null ? (String) v82191.get(this) : ""; + } catch (IllegalArgumentException | IllegalAccessException e) { + return ""; + } + } + + public MerchantRecipeList getRecipes(EntityPlayer p_70934_1_) { + if (getBuyingList() == null) { + this.addDefaultEquipmentAndRecipies(1); + } + return getBuyingList(); + } + + /** + * Adjusts the probability of obtaining a given recipe being offered by a + * villager + */ + private float adjustProbability(float p_82188_1_) { + float f1 = p_82188_1_ + getField_82191_bN(); + return f1 > 0.9F ? 0.9F - (f1 - 0.9F) : f1; + } + + /** + * based on the villagers profession add items, equipment, and recipies adds + * par1 random items to the list of things that the villager wants to buy. (at + * most 1 of each wanted type is added) + */ + private void addDefaultEquipmentAndRecipies(int p_70950_1_) { + if (this.getBuyingList() != null) { + setField_82191_bN(MathHelper.sqrt_float((float) this.getBuyingList().size()) * 0.2F); + } else { + setField_82191_bN(0.0F); + } + + MerchantRecipeList merchantrecipelist; + merchantrecipelist = new MerchantRecipeList(); + VillagerRegistry.manageVillagerTrades(merchantrecipelist, this, this.getProfession(), this.rand); + int k; + label50: + + switch (this.getProfession()) { + case 0: + addPurchaseRecipe(merchantrecipelist, Items.wheat, this.rand, this.adjustProbability(0.9F)); + addPurchaseRecipe(merchantrecipelist, Item.getItemFromBlock(Blocks.wool), this.rand, + this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.chicken, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.cooked_fished, this.rand, this.adjustProbability(0.4F)); + addEmeraldTrade(merchantrecipelist, Items.bread, this.rand, this.adjustProbability(0.9F)); + addEmeraldTrade(merchantrecipelist, Items.melon, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.apple, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cookie, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.shears, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.flint_and_steel, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cooked_chicken, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.arrow, this.rand, this.adjustProbability(0.5F)); + + if (this.rand.nextFloat() < this.adjustProbability(0.5F)) { + merchantrecipelist.add(new MerchantRecipe(new ItemStack(Blocks.gravel, 10), + new ItemStack(Items.emerald), new ItemStack(Items.flint, 4 + this.rand.nextInt(2), 0))); + } + + break; + case 1: + addPurchaseRecipe(merchantrecipelist, Items.paper, this.rand, this.adjustProbability(0.8F)); + addPurchaseRecipe(merchantrecipelist, Items.book, this.rand, this.adjustProbability(0.8F)); + addPurchaseRecipe(merchantrecipelist, Items.written_book, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.bookshelf), this.rand, + this.adjustProbability(0.8F)); + addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glass), this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.compass, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.clock, this.rand, this.adjustProbability(0.2F)); + + if (this.rand.nextFloat() < this.adjustProbability(0.07F)) { + Enchantment enchantment = Enchantment.enchantmentsBookList[this.rand + .nextInt(Enchantment.enchantmentsBookList.length)]; + int i1 = MathHelper.getRandomIntegerInRange(this.rand, enchantment.getMinLevel(), + enchantment.getMaxLevel()); + ItemStack itemstack = Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(enchantment, i1)); + k = 2 + this.rand.nextInt(5 + i1 * 10) + 3 * i1; + merchantrecipelist + .add(new MerchantRecipe(new ItemStack(Items.book), new ItemStack(Items.emerald, k), itemstack)); + } + + break; + case 2: + addEmeraldTrade(merchantrecipelist, Items.ender_eye, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.experience_bottle, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.redstone, this.rand, this.adjustProbability(0.4F)); + addEmeraldTrade(merchantrecipelist, Item.getItemFromBlock(Blocks.glowstone), this.rand, + this.adjustProbability(0.3F)); + Item[] aitem = new Item[] { Items.iron_sword, Items.diamond_sword, Items.iron_chestplate, + Items.diamond_chestplate, Items.iron_axe, Items.diamond_axe, Items.iron_pickaxe, + Items.diamond_pickaxe }; + Item[] aitem1 = aitem; + int j = aitem.length; + k = 0; + + while (true) { + if (k >= j) { + break label50; + } + + Item item = aitem1[k]; + + if (this.rand.nextFloat() < this.adjustProbability(0.05F)) { + merchantrecipelist.add(new MerchantRecipe(new ItemStack(item, 1, 0), + new ItemStack(Items.emerald, 2 + this.rand.nextInt(3), 0), + EnchantmentHelper.addRandomEnchantment(this.rand, new ItemStack(item, 1, 0), + 5 + this.rand.nextInt(15)))); + } + + ++k; + } + case 3: + addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); + addPurchaseRecipe(merchantrecipelist, Items.iron_ingot, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.diamond, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.iron_sword, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_sword, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.iron_axe, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_axe, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.iron_pickaxe, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_pickaxe, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.iron_shovel, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_shovel, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_hoe, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_hoe, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_boots, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_boots, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_helmet, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_helmet, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_chestplate, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_chestplate, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.iron_leggings, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.diamond_leggings, this.rand, this.adjustProbability(0.2F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_boots, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_helmet, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_chestplate, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.chainmail_leggings, this.rand, this.adjustProbability(0.1F)); + break; + case 4: + addPurchaseRecipe(merchantrecipelist, Items.coal, this.rand, this.adjustProbability(0.7F)); + addPurchaseRecipe(merchantrecipelist, Items.porkchop, this.rand, this.adjustProbability(0.5F)); + addPurchaseRecipe(merchantrecipelist, Items.beef, this.rand, this.adjustProbability(0.5F)); + addEmeraldTrade(merchantrecipelist, Items.saddle, this.rand, this.adjustProbability(0.1F)); + addEmeraldTrade(merchantrecipelist, Items.leather_chestplate, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.leather_boots, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.leather_helmet, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.leather_leggings, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cooked_porkchop, this.rand, this.adjustProbability(0.3F)); + addEmeraldTrade(merchantrecipelist, Items.cooked_beef, this.rand, this.adjustProbability(0.3F)); + } + + if (merchantrecipelist.isEmpty()) { + addPurchaseRecipe(merchantrecipelist, Items.gold_ingot, this.rand, 1.0F); + } + + Collections.shuffle(merchantrecipelist); + + if (this.getBuyingList() == null) { + this.setBuyingList(new MerchantRecipeList()); + } + + for (int l = 0; l < p_70950_1_ && l < merchantrecipelist.size(); ++l) { + try { + this.getBuyingList().addToListWithCheck((MerchantRecipe) merchantrecipelist.get(l)); + } + catch (Throwable t) { + Logger.INFO("Villager with ID "+this.entityUniqueID.toString()+" at | X: "+this.posX+" Y: "+this.posY+" Z: "+this.posZ+" may have corrupt trades, it is advised to remove/kill it."); + } + } + + try { + if (this.getBuyingList() != null) { + for (Object g : this.getBuyingList()) { + if (g != null) { + if (g instanceof MerchantRecipe) { + MerchantRecipe m = (MerchantRecipe) g; + ItemStack selling = m.getItemToSell(); + ItemStack[] buying = new ItemStack[] {m.getItemToBuy(), m.getSecondItemToBuy() != null ? m.getSecondItemToBuy() : null}; + if (selling == null) { + Logger.WARNING("Villager is Selling an invalid item"); + } + else if (buying[0] == null && buying[1] == null) { + Logger.WARNING("Villager is buying two invalid items"); + } + else { + Logger.WARNING("Villager is Selling x"+selling.stackSize+selling.getDisplayName()+" for x"+buying[0].stackSize+" "+buying[0].getDisplayName()+buying[1] != null ? " and for x"+buying[1].stackSize+" "+buying[1].getDisplayName() : ""); + } + } + else + Logger.WARNING("Found: "+g.getClass().getName()); + } + } + } + else { + + } + } + catch (Throwable t) { + + } + + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + @Override + protected void updateAITick() { + if (!this.isTrading()) { + if (this.getNeedsInitilization()) { + if (this.getBuyingList().size() > 1) { + Iterator iterator = this.getBuyingList().iterator(); + + while (iterator.hasNext()) { + MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); + + if (merchantrecipe.isRecipeDisabled()) { + merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2); + } + } + } + + this.addDefaultEquipmentAndRecipies(1); + this.setNeedsInitilization(false); + + if (this.getVillageObject() != null && this.getLastBuyingPlayer() != null) { + this.worldObj.setEntityState(this, (byte) 14); + this.getVillageObject().setReputationForPlayer(this.getLastBuyingPlayer(), 1); + } + } + } + super.updateAITick(); + } + + public static void addEmeraldTrade(MerchantRecipeList aRecipeList, Item aItem, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + int i = getLootAmount_BlacksmithSellingList(aItem, aRand); + ItemStack itemstack; + ItemStack itemstack1; + + if (i < 0) { + itemstack = new ItemStack(Items.emerald, 1, 0); + itemstack1 = new ItemStack(aItem, -i, 0); + } else { + itemstack = new ItemStack(Items.emerald, i, 0); + itemstack1 = new ItemStack(aItem, 1, 0); + } + + aRecipeList.add(new MerchantRecipe(itemstack, itemstack1)); + } + } + + public static void addCustomTrade(MerchantRecipeList aRecipeList, ItemStack aItem1, ItemStack aItem2, ItemStack aItem3, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + aRecipeList.add(new MerchantRecipe(aItem1, aItem2, aItem3)); + } + } + + private static int getLootAmount_BlacksmithSellingList(Item aItem, Random aRand) { + Tuple tuple = (Tuple) blacksmithSellingList.get(aItem); + return tuple == null ? 1 + : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() + ? ((Integer) tuple.getFirst()).intValue() + : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( + ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); + } + + public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + aTradeList.add(new MerchantRecipe(getSimpleLootStack(aItem, aRand), Items.emerald)); + } + } + + private static ItemStack getSimpleLootStack(Item aItem, Random aRand) { + return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), 0); + } + + public static void addPurchaseRecipe(MerchantRecipeList aTradeList, Item aItem, int aMeta, Random aRand, float aChance) { + if (aRand.nextFloat() < aChance) { + aTradeList.add(new MerchantRecipe(getComplexLootStack(aItem, aMeta, aRand), Items.emerald)); + } + } + + private static ItemStack getComplexLootStack(Item aItem, int aMeta, Random aRand) { + return new ItemStack(aItem, getLootAmount_VillagerSellingList(aItem, aRand), aMeta); + } + + private static int getLootAmount_VillagerSellingList(Item aItem, Random aRand) { + Tuple tuple = (Tuple) villagersSellingList.get(aItem); + return tuple == null ? 1 + : (((Integer) tuple.getFirst()).intValue() >= ((Integer) tuple.getSecond()).intValue() + ? ((Integer) tuple.getFirst()).intValue() + : ((Integer) tuple.getFirst()).intValue() + aRand.nextInt( + ((Integer) tuple.getSecond()).intValue() - ((Integer) tuple.getFirst()).intValue())); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java b/src/main/java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java new file mode 100644 index 0000000000..61db98e803 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/entity/trade/BaseVillagerTrade.java @@ -0,0 +1,32 @@ +package gtPlusPlus.plugin.villagers.entity.trade; + +import java.util.Random; + +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.village.MerchantRecipeList; + +public abstract class BaseVillagerTrade implements IVillageTradeHandler { + + + /* + Recently in my mod I started working on a new villager and after doing so I could not figure out to assign new trades to this villager. + Registering the villager + VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());} + VillagerRegistry.instance().registerVillagerId(8); + VillagerRegistry.instance().registerVillagerSkin(8, new ResourceLocation("chow", "textures/dealer.png")); + VillagerRegistry.instance().getRegisteredVillagers(); + In my trade handler for vanilla villagers it goes off case 0 for instance being the farmer. I thought that it being case 8 would represent the id 8 for the custom villager but it still doesn't work. Could anyone help me out with this please? + * + * + First, you'll need to make a new class that extends IVillageTradeHandler. + In the constructor, add ItemStacks of the items you want it to trade to an ArrayList, + then in the manipulateTradesForVillager method, have it make sure the villager is yours by using villager.getProfession() + and your villager ID, then in a for loop use recipeList.addToListWithCheck to add new instances of MerchantRecipe to your villager's trade list. + Then, in your mod's main class, register the trade handler with VillageRegistry.instance().registerVillagerTradeHandler(villagerId, instanceOfTradeHandler); + */ + + @Override + public abstract void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random); + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java b/src/main/java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java new file mode 100644 index 0000000000..28416793f5 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/tile/MobSpawnerCustomLogic.java @@ -0,0 +1,69 @@ +package gtPlusPlus.plugin.villagers.tile; + +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; +import gtPlusPlus.core.block.ModBlocks; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.MobSpawnerBaseLogic; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class MobSpawnerCustomLogic extends MobSpawnerBaseLogic { + + private TileEntityGenericSpawner mTile; + + public MobSpawnerCustomLogic(TileEntityGenericSpawner tile) { + if (tile != null) { + mTile = tile; + } + + if (TileEntityGenericSpawner.mSpawners.get(mTile.getID()) != null) { + Class c = TileEntityGenericSpawner.mSpawners.get(mTile.getID()); + EntityRegistration x = EntityRegistry.instance().lookupModSpawn(c, false); + if (x != null) { + this.setEntityName(x.getEntityName()); + } + } + + } + + @Override + public void func_98267_a(int eventID) { + if (mTile != null) mTile.getWorldObj().addBlockEvent(mTile.xCoord, mTile.yCoord, mTile.zCoord, ModBlocks.blockCustomMobSpawner, eventID, 0); + } + + @Override + public World getSpawnerWorld() { + if (mTile != null) return mTile.getWorldObj(); + return null; + } + + @Override + public int getSpawnerX() { + if (mTile != null) return mTile.xCoord; + return 0; + } + + @Override + public int getSpawnerY() { + if (mTile != null) return mTile.yCoord; + return 0; + } + + @Override + public int getSpawnerZ() { + if (mTile != null) return mTile.zCoord; + return 0; + } + + @Override + public void setRandomEntity(MobSpawnerBaseLogic.WeightedRandomMinecart p_98277_1_) { + super.setRandomEntity(p_98277_1_); + if (mTile != null) { + if (this.getSpawnerWorld() != null) { + this.getSpawnerWorld().markBlockForUpdate(mTile.xCoord, mTile.yCoord, mTile.zCoord); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java b/src/main/java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java new file mode 100644 index 0000000000..45b8c9941b --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java @@ -0,0 +1,245 @@ +package gtPlusPlus.plugin.villagers.tile; + +import java.util.HashMap; +import java.util.Map; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.Entity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.MobSpawnerBaseLogic; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityMobSpawner; + +public class TileEntityGenericSpawner extends TileEntityMobSpawner { + + /* + * Static Variables + */ + + /** A HashMap storing string names of classes mapping to the actual java.lang.Class type. */ + private static Map nameToClassMap_Ex = new HashMap(); + /** A HashMap storing the classes and mapping to the string names (reverse of nameToClassMap). */ + private static Map classToNameMap_Ex = new HashMap(); + + /** + * The Mob Spawner Map + */ + public static HashMap> mSpawners = new HashMap>(); + + /** + * Registers a New Mob Spawner Type + * + * @param aID + * - the Spawner type ID + * @param aEntity + * - the Entity which you'd like to spawn + */ + public static boolean registerNewMobSpawner(int aID, Class aEntity) { + int registered = mSpawners.size(); + Logger.INFO("Currently "+registered+" spawners are registered."); + if (!mSpawners.containsKey(aID) && !mSpawners.containsValue(aEntity)) { + mSpawners.put(aID, aEntity); + } + return mSpawners.size() > registered; + } + + /* + * Instance Variables + */ + + /** + * The {@link Entity} type which spawns. + */ + protected int mID; + private final Class mSpawnType; + private MobSpawnerCustomLogic spawnerLogic; + + /* + * Constructors + */ + + /** + * Constructs a new Spawner, based on an existing type registered. + * + * @param aID + * - The ID in the {@link mSpawners} map. + */ + public TileEntityGenericSpawner(int aID) { + mID = aID; + if (mSpawners.get(aID) != null) { + mSpawnType = mSpawners.get(aID); + } else { + mSpawnType = null; + } + + // Last thing to Init + generateLogicObject(); + } + + /** + * Constructs a new Spawner, then registers it. + * + * @param aID + * - The ID to be used in the {@link mSpawners} map. + * @param aEntity + * - The {@link Entity} type which will be spawned. + */ + public TileEntityGenericSpawner(int aID, Entity aEntity) { + mID = aID; + if (aEntity != null) { + mSpawnType = aEntity.getClass(); + if (mSpawners.containsKey(aID)) { + registerNewMobSpawner(aID, mSpawnType); + } + } else { + mSpawnType = null; + } + + // Last thing to Init + generateLogicObject(); + } + + public final MobSpawnerCustomLogic getLogic() { + if (spawnerLogic == null || spawnerLogic.getSpawnerWorld() == null) { + generateLogicObject(); + } + return spawnerLogic; + } + + private final void generateLogicObject() { + spawnerLogic = new MobSpawnerCustomLogic(this); + } + + public int getID() { + return this.mID; + } + + @Override + public void readFromNBT(NBTTagCompound p_145839_1_) { + if (hasInternalFieldBeenSet()) { + this.getLogic().readFromNBT(p_145839_1_); + this.xCoord = p_145839_1_.getInteger("x"); + this.yCoord = p_145839_1_.getInteger("y"); + this.zCoord = p_145839_1_.getInteger("z"); + this.mID = p_145839_1_.getInteger("mID"); + } + } + + @Override + public void writeToNBT(NBTTagCompound p_145841_1_) { + if (hasInternalFieldBeenSet()) { + String s = (String) classToNameMap_Ex.get(this.getClass()); + if (s == null){ + for (Object g : classToNameMap_Ex.values()) { + if (g instanceof String) { + Logger.INFO("Found Translation for "+((Class) nameToClassMap_Ex.get(g)).getName()+": "+g); + } + } + + //throw new RuntimeException(this.getClass() + " is missing a mapping! This is a bug!"); + s = mSpawners.containsKey(this.mID) ? mSpawners.get(this.mID).getSimpleName() : "bad.class.name"; + p_145841_1_.setString("id", s); + Logger.WARNING(this.getClass() + " is missing a mapping! This is a bug! Used key: "+s); + p_145841_1_.setInteger("x", this.xCoord); + p_145841_1_.setInteger("y", this.yCoord); + p_145841_1_.setInteger("z", this.zCoord); + p_145841_1_.setInteger("mID", this.mID); + } + else { + Logger.INFO(this.getClass() + " is not missing a mapping! Used key: "+s); + p_145841_1_.setString("id", s); + p_145841_1_.setInteger("x", this.xCoord); + p_145841_1_.setInteger("y", this.yCoord); + p_145841_1_.setInteger("z", this.zCoord); + p_145841_1_.setInteger("mID", this.mID); + } + this.getLogic().writeToNBT(p_145841_1_); + } + } + + @Override + public void updateEntity() { + if (Utils.isServer()) { + mTicks++; + if (hasInternalFieldBeenSet()) { + this.getLogic().updateSpawner(); + } + } + } + + private boolean isReady = false; + private long mTicks = 0; + + private boolean hasInternalFieldBeenSet() { + if (isReady && mTicks % 200 != 0) { + return true; + } else { + + if (Utils.isServer()) { + try { + Map a1 = (Map) ReflectionUtils.getField(TileEntity.class, "nameToClassMap").get(this); + Map a2 = (Map) ReflectionUtils.getField(TileEntity.class, "classToNameMap").get(this); + if (a1 != null) { + if (nameToClassMap_Ex == null) { + nameToClassMap_Ex = a1; + } + if (nameToClassMap_Ex != null) { + if (nameToClassMap_Ex.size() != a1.size()) { + nameToClassMap_Ex = a1; + } + } + } + if (a2 != null) { + if (classToNameMap_Ex == null) { + classToNameMap_Ex = a2; + } + if (classToNameMap_Ex != null) { + if (classToNameMap_Ex.size() != a2.size()) { + classToNameMap_Ex = a2; + } + } + if (nameToClassMap_Ex != null && classToNameMap_Ex != null) { + //Logger.INFO("nameToClassMap_Ex has a size of "+nameToClassMap_Ex.size()+"."); + //Logger.INFO("a1 has a size of "+a1.size()+"."); + //Logger.INFO("classToNameMap_Ex has a size of "+classToNameMap_Ex.size()+"."); + //Logger.INFO("a2 has a size of "+a2.size()+"."); + isReady = true; + return true; + } + } + + /*Field mInternalLogicField = ReflectionUtils.getField(getClass(), "field_145882_a"); + if (mInternalLogicField != null) { + MobSpawnerBaseLogic a = (MobSpawnerBaseLogic) mInternalLogicField.get(this); + if (a != null) { + ReflectionUtils.setField(this, "field_145882_a", getLogic()); + if (a.equals(getLogic())) { + isReady = true; + return true; + } + } + }*/ + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + return false; + } + } + + /** + * Called when a client event is received with the event number and argument, + * see World.sendClientEvent + */ + @Override + public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { + return this.spawnerLogic.setDelayToMin(p_145842_1_) ? true : super.receiveClientEvent(p_145842_1_, p_145842_2_); + } + + @Override + public MobSpawnerBaseLogic func_145881_a() { + return this.spawnerLogic; + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java new file mode 100644 index 0000000000..3baca10792 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java @@ -0,0 +1,161 @@ +package gtPlusPlus.plugin.villagers.trade; + +import static java.util.Collections.shuffle; + +import java.util.Collections; +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; + +public class TradeHandlerAboriginal extends TradeHandlerBase { + + private final static AutoMap mInputs = new AutoMap(); + private final static AutoMap mOutputs = new AutoMap(); + private static boolean initialised = false; + + public static void init() { + mOutputs.put(ItemUtils.getSimpleStack(Blocks.anvil, 1)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.bookshelf, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.cactus, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.dirt, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.cobblestone, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.mossy_cobblestone, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.pumpkin, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.hardened_clay, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.log, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.obsidian, 8)); + mOutputs.put(ItemUtils.getSimpleStack(Items.wheat, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.gravel, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Blocks.sand, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.apple, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.emerald, 1)); + mOutputs.put(ItemUtils.getSimpleStack(Items.diamond, 1)); + mOutputs.put(ItemUtils.getSimpleStack(Items.baked_potato, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.beef, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.bone, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.bread, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.carrot, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.potato, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.poisonous_potato, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.chicken, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.porkchop, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_beef, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_chicken, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_porkchop, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.fish, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.cooked_fished, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.feather, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.egg, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.gold_nugget, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.leather, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.melon_seeds, 0)); + mOutputs.put(ItemUtils.getSimpleStack(Items.reeds, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.wooden_door)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.log)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.log2)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.planks)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.sapling)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.sandstone)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.nether_brick)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.bookshelf)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.crafting_table)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.gravel)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.hardened_clay)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.cactus)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.quartz_block)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.stone)); + mInputs.put(ItemUtils.getSimpleStack(Blocks.mossy_cobblestone)); + mInputs.put(ItemUtils.getSimpleStack(Items.apple, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.emerald, 1)); + mInputs.put(ItemUtils.getSimpleStack(Items.diamond, 1)); + mInputs.put(ItemUtils.getSimpleStack(Items.baked_potato, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.beef, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.bone, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.bread, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.carrot, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.potato, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.poisonous_potato, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.chicken, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.porkchop, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.cooked_beef, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.cooked_chicken, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.cooked_porkchop, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.fish, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.cooked_fished, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.feather, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.egg, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.gold_nugget, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.leather, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.melon_seeds, 0)); + mInputs.put(ItemUtils.getSimpleStack(Items.reeds, 0)); + initialised = true; + } + + + public TradeHandlerAboriginal() { + Logger.INFO("Created Trade Manager for 'Trader' villager profession type."); + } + + @SuppressWarnings("unchecked") + @Override + public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { + if (!initialised) { + init(); + } + if (initialised) { + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + recipeList.add(new MerchantRecipe(getInput(), getInput(), getOutput())); + shuffle(recipeList); + } + } + + private ItemStack getInput() { + ItemStack input = mInputs.get(MathUtils.randInt(0, mInputs.size()-1)); + int outputSize = (input.stackSize == 0 ? (Math.max(MathUtils.randInt(1, 64), MathUtils.randInt(1, 32))) : input.stackSize); + return ItemUtils.getSimpleStack(input, outputSize); + } + + final static int MID_BOUND = 24; + private ItemStack getOutput() { + ItemStack output = mOutputs.get(MathUtils.randInt(0, mOutputs.size()-1)); + int outputSize = (output.stackSize == 0 ? (Math.min(MathUtils.randInt(MathUtils.randInt(1, MID_BOUND), MathUtils.randInt(MID_BOUND, 32)), MathUtils.randInt(MathUtils.randInt(12, MID_BOUND), MathUtils.randInt(MID_BOUND, 48)))) : output.stackSize); + return ItemUtils.getSimpleStack(output, outputSize); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java new file mode 100644 index 0000000000..215dc0683b --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java @@ -0,0 +1,27 @@ +package gtPlusPlus.plugin.villagers.trade; + +import java.util.Collections; +import java.util.Random; + +import gtPlusPlus.core.recipe.common.CI; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; + +public class TradeHandlerBanker extends TradeHandlerBase { + + + @SuppressWarnings("unchecked") + @Override + public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { + //if (villager.getProfession() == 7735) { + recipeList.add(new MerchantRecipe(CI.electricMotor_LV, CI.electricPiston_LV, CI.robotArm_LV)); + recipeList.add(new MerchantRecipe(CI.electricMotor_MV, CI.electricPiston_MV, CI.robotArm_MV)); + recipeList.add(new MerchantRecipe(CI.electricMotor_HV, CI.electricPiston_HV, CI.robotArm_HV)); + recipeList.add(new MerchantRecipe(CI.electricMotor_EV, CI.electricPiston_EV, CI.robotArm_EV)); + recipeList.add(new MerchantRecipe(CI.electricMotor_IV, CI.electricPiston_IV, CI.robotArm_IV)); + //Collections.shuffle(recipeList); + //} + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java new file mode 100644 index 0000000000..b726ebefff --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBase.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * 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 gtPlusPlus.plugin.villagers.trade; + +import java.util.Random; + +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.village.MerchantRecipeList; +import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; + +public abstract class TradeHandlerBase implements IVillageTradeHandler { + + @SuppressWarnings("unchecked") + @Override + public abstract void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random); + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java new file mode 100644 index 0000000000..922316b136 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java @@ -0,0 +1,27 @@ +package gtPlusPlus.plugin.villagers.trade; + +import java.util.Collections; +import java.util.Random; + +import gtPlusPlus.core.recipe.common.CI; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; + +public class TradeHandlerTechnician extends TradeHandlerBase { + + + @SuppressWarnings("unchecked") + @Override + public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { + //if (villager.getProfession() == 7737) { + recipeList.add(new MerchantRecipe(CI.machineHull_LV, CI.electricMotor_LV, CI.machineHull_LV)); + recipeList.add(new MerchantRecipe(CI.machineHull_MV, CI.electricMotor_MV, CI.machineHull_MV)); + recipeList.add(new MerchantRecipe(CI.machineHull_HV, CI.electricMotor_HV, CI.machineHull_HV)); + recipeList.add(new MerchantRecipe(CI.machineHull_EV, CI.electricMotor_EV, CI.machineHull_EV)); + recipeList.add(new MerchantRecipe(CI.machineHull_IV, CI.electricMotor_IV, CI.machineHull_IV)); + //Collections.shuffle(recipeList); + //} + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java new file mode 100644 index 0000000000..0025c054bd --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java @@ -0,0 +1,45 @@ +package gtPlusPlus.plugin.villagers.trade; + +import java.util.Collections; +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.entity.passive.EntityVillager; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.village.MerchantRecipe; +import net.minecraft.village.MerchantRecipeList; + +public class TradeHandlerTrader extends TradeHandlerBase { + + public TradeHandlerTrader() { + Logger.INFO("Created Trade Manager for 'Trader' villager profession type."); + } + + @SuppressWarnings("unchecked") + @Override + public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { + ItemStack Ore1 = null, Ore2 = null; + if (Ore1 == null) { + Ore1 = ELEMENT.getInstance().SILICON.getOre(1); + } + if (Ore2 == null) { + Ore2 = ELEMENT.getInstance().ALUMINIUM.getOre(1); + } + if (Ore1 == null) { + Ore1 = ELEMENT.getInstance().GOLD.getOre(1); + } + if (Ore2 == null) { + Ore2 = ELEMENT.getInstance().LEAD.getOre(1); + } + recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("logWood", 32), ELEMENT.getInstance().IRON.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 32), ELEMENT.getInstance().COPPER.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.obsidian, 6), ELEMENT.getInstance().TIN.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.glowstone, 32), Ore1)); + recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.piston, 32), Ore2)); + Collections.shuffle(recipeList); + } + +} diff --git a/src/main/java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java b/src/main/java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java new file mode 100644 index 0000000000..3317ef6a11 --- /dev/null +++ b/src/main/java/gtPlusPlus/plugin/waila/Core_WailaPlugin.java @@ -0,0 +1,59 @@ +package gtPlusPlus.plugin.waila; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.plugin.manager.Core_Manager; + +public class Core_WailaPlugin implements IPlugin { + + final static Core_WailaPlugin mInstance; + static boolean mActive = false; + + static { + mInstance = new Core_WailaPlugin(); + mInstance.log("Preparing "+mInstance.getPluginName()+" for use."); + } + + Core_WailaPlugin() { + Core_Manager.registerPlugin(this); + } + + @Override + public boolean preInit() { + if (LoadedMods.Waila) { + mActive = true; + } + return mActive; + } + + @Override + public boolean init() { + return mActive; + } + + @Override + public boolean postInit() { + return mActive; + } + + @Override + public boolean serverStart() { + return mActive; + } + + @Override + public boolean serverStop() { + return mActive; + } + + @Override + public String getPluginName() { + return "GT++ WAILA module"; + } + + @Override + public String getPluginAbbreviation() { + return "Look"; + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/CORE_Preloader.java b/src/main/java/gtPlusPlus/preloader/CORE_Preloader.java new file mode 100644 index 0000000000..49209307f7 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/CORE_Preloader.java @@ -0,0 +1,33 @@ +package gtPlusPlus.preloader; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import cpw.mods.fml.common.versioning.ArtifactVersion; + +public class CORE_Preloader { + + public static final String NAME = "GT++ Preloader"; + public static final String MODID = "GT++_Preloader"; + public static final String VERSION = "0.5-Beta"; + public static final List DEPENDENCIES; + public static final String JAVA_VERSION = System.getProperty("java.version"); + + public static File MC_DIR; + public static boolean DEV_ENVIRONMENT = false; + public static boolean DEBUG_MODE = false; + public static boolean enableOldGTcircuits = false; + public static int enableWatchdogBGM = 0; + + public static void setMinecraftDirectory(File aDir) { + MC_DIR = aDir; + } + + static { + ArrayList deps = new ArrayList(); + //deps.add("required-before:gregtech;"); + DEPENDENCIES = Collections.unmodifiableList(deps); + } +} diff --git a/src/main/java/gtPlusPlus/preloader/ChunkDebugger.java b/src/main/java/gtPlusPlus/preloader/ChunkDebugger.java new file mode 100644 index 0000000000..06964d31fa --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/ChunkDebugger.java @@ -0,0 +1,54 @@ +package gtPlusPlus.preloader; + +import java.util.LinkedHashMap; +import java.util.Map; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeChunkManager.Ticket; + +public class ChunkDebugger { + + + public static final Map> mChunkTicketsMap = new LinkedHashMap>(); + public static final Map> mChunksLoadedByModsMap = new LinkedHashMap>(); + + public static void storeTicketToCache(Ticket aTicket, World aWorld) { + mChunkTicketsMap.put(aTicket.hashCode(), new Pair(aTicket.getModId(), ""+aTicket.world.provider.dimensionId)); + Logger.REFLECTION("Ticket created by "+aTicket.getModId()+" for dimension "+aTicket.world.provider.dimensionId); + } + + public static void storeLoadChunkToCache(Ticket aTicket, ChunkCoordIntPair aChunk) { + mChunksLoadedByModsMap.put(aChunk.toString(), new Pair(aTicket.getModId(), aChunk.toString())); + Logger.REFLECTION("Chunk Loaded by "+aTicket.getModId()+" at position "+aChunk.toString()+" for dimension "+aTicket.world.provider.dimensionId); + } + + public static void removeTicketFromCache(Ticket aTicket) { + Pair aPair = mChunkTicketsMap.get(aTicket.hashCode()); + String aKey = aPair.getKey(); + if (aKey == null) { + aKey = "Invalid ModId"; + } + Logger.REFLECTION("Ticket released by "+aKey+" for dimension "+aTicket.world.provider.dimensionId); + mChunkTicketsMap.remove(aTicket.hashCode()); + } + + public static void removeLoadedChunkFromCache(ChunkCoordIntPair aChunk) { + if (aChunk == null || aChunk.toString() == null) { + return; + } + Pair aPair = mChunksLoadedByModsMap.get(aChunk.toString()); + if (aPair == null) { + return; + } + String aKey = aPair.getKey(); + String aValue = aPair.getValue(); + if (aKey != null && aValue != null) { + Logger.REFLECTION("Chunk Unloaded by "+aKey+" at position "+aChunk.toString()+""); + } + mChunksLoadedByModsMap.remove(aChunk.toString()); + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/CustomClassLoader.java b/src/main/java/gtPlusPlus/preloader/CustomClassLoader.java new file mode 100644 index 0000000000..56394c11f0 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/CustomClassLoader.java @@ -0,0 +1,57 @@ +package gtPlusPlus.preloader; + +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.Permissions; +import java.security.ProtectionDomain; +import java.security.cert.Certificate; +import java.util.HashMap; + +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.tree.ClassNode; + +public class CustomClassLoader extends ClassLoader { + + private HashMap classes = new HashMap(); + + @Override + + public Class loadClass(String name) throws ClassNotFoundException { + return findClass(name); + } + + @Override + + protected Class findClass(String name) throws ClassNotFoundException { + ClassNode node = classes.get(name.replace('.', '/')); + if (node != null) + return nodeToClass(node); + else + return super.findClass(name); + } + + public final void addNode(ClassNode node) { + classes.put(node.name, node); + } + + private final Class nodeToClass(ClassNode node) { + if (super.findLoadedClass(node.name) != null) + return findLoadedClass(node.name); + ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); + node.accept(cw); + byte[] b = cw.toByteArray(); + return defineClass(node.name.replace('/', '.'), b, 0, b.length, getDomain()); + } + + private final ProtectionDomain getDomain() { + CodeSource code = new CodeSource(null, (Certificate[]) null); + return new ProtectionDomain(code, getPermissions()); + } + + private final Permissions getPermissions() { + Permissions permissions = new Permissions(); + permissions.add(new AllPermission()); + return permissions; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/preloader/DevHelper.java b/src/main/java/gtPlusPlus/preloader/DevHelper.java new file mode 100644 index 0000000000..70a3c53073 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/DevHelper.java @@ -0,0 +1,7139 @@ +package gtPlusPlus.preloader; + +import java.io.IOException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.data.weakref.WeakAutoMap; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.launchwrapper.Launch; + +public class DevHelper { + + private static final DevHelper mInstance; + public static final boolean mIsValidHelper; + + static { + mInstance = new DevHelper(); + if (DevHelperInternals.init()) { + mIsValidHelper = true; + } + else { + mIsValidHelper = false; + } + } + + public DevHelper() { + + } + + + + public static boolean isObfuscatedEnvironment() { + // Are we in a 'decompiled' environment? + boolean deobfuscatedEnvironment = false; + byte[] bs; + try { + bs = Launch.classLoader.getClassBytes("net.minecraft.world.World"); + if (bs != null) { + deobfuscatedEnvironment = true; + } else { + deobfuscatedEnvironment = false; + } + } catch (IOException e) { + } + return !deobfuscatedEnvironment; + } + + @SuppressWarnings("rawtypes") + public static Method getForgeMethod(Class c, String s, Class... varags) { + String s1, s2; + Method a, b; + s1 = s; + s2 = getSRG(s); + try { + a = ReflectionUtils.getMethod(c, s1, varags); + if (a != null) { + return a; + } + else { + b = ReflectionUtils.getMethod(c, s2, varags); + if (b != null) { + return b; + } + } + } + catch (Exception e) {} + return null; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + private static synchronized final DevHelper getInstance() { + return mInstance; + } + + public static synchronized final boolean isValidHelperObject() { + return mIsValidHelper; + } + + public static String getSRG(String mForgeName) { + String aSRG = DevHelperInternals.forgeToSrg.get(mForgeName); + return aSRG != null ? aSRG : "BAD_SRG_NAME"; + } + + public static String getForge(String mSrgName) { + String aForgeName = DevHelperInternals.srgToForge.get(mSrgName); + return aForgeName != null ? aForgeName : "BAD_FORGE_NAME"; + } + + public static String getMinecraftClassName(String adeObName, boolean obfuscated) { + if (obfuscated) { + return getObfuscated(adeObName); + } + return adeObName; + } + + public static String getObfuscated(String mDeob) { + String obfuscatedClassname = DevHelperInternals.deObToOb.get(mDeob); + obfuscatedClassname = obfuscatedClassname != null ? obfuscatedClassname : "BAD_OBFUSCATED_CLASS_NAME"; + if (obfuscatedClassname.equals("BAD_OBFUSCATED_CLASS_NAME")) { + Preloader_Logger.INFO("[Fix] Failed to Get Deobfuscated name for "+mDeob); + } + return obfuscatedClassname; + } + + public static String getDeobfuscated(String mOb) { + String deobfuscatedClassname = DevHelperInternals.obToDeOb.get(mOb); + return deobfuscatedClassname != null ? deobfuscatedClassname : "BAD_DEOBFUSCATED_CLASS_NAME"; + } + + public static class DevHelperInternals { + public static final Map srgToForge = new HashMap(); + public static final Map forgeToSrg = new HashMap(); + private static WeakAutoMap> mInitMap = new WeakAutoMap>(); + + //Obfuscation + public static final Map obToDeOb = new HashMap(); + public static final Map deObToOb = new HashMap(); + private static WeakAutoMap> mObInitMap = new WeakAutoMap>(); + + private static boolean init() { + init1(); + init2(); + init3(); + init4(); + if (mInitMap.size() > 0) { + for (Pair p : mInitMap) { + if (p != null) { + String srg = p.getKey(); + String forge = p.getValue(); + srgToForge.put(srg, forge); + forgeToSrg.put(forge, srg); + } + } + } + + if (mObInitMap.size() > 0) { + for (Pair p : mObInitMap) { + if (p != null) { + String ob = p.getKey(); + String deOb = p.getValue(); + obToDeOb.put(ob, deOb); + deObToOb.put(deOb, ob); + } + } + } + Preloader_Logger.INFO("[DevHelper] mInitMap size: "+mInitMap.size()); + Preloader_Logger.INFO("[DevHelper] mObInitMap size: "+mObInitMap.size()); + + Preloader_Logger.INFO("[DevHelper] srgToForge size: "+srgToForge.size()); + Preloader_Logger.INFO("[DevHelper] forgeToSrg size: "+forgeToSrg.size()); + Preloader_Logger.INFO("[DevHelper] obToDeOb size: "+obToDeOb.size()); + Preloader_Logger.INFO("[DevHelper] deObToOb size: "+deObToOb.size()); + + if (srgToForge.size() > 0 && forgeToSrg.size() > 0 && obToDeOb.size() > 0 && deObToOb.size() > 0) { + if (srgToForge.size() == forgeToSrg.size() && obToDeOb.size() == deObToOb.size()) { + return true; + } + else { + if (srgToForge.size() != forgeToSrg.size()) { + int aKey1 = 0; + int aKey2 = 0; + HashMap aMissingForgeNames = new HashMap(); + HashMap aMissingSrgNames = new HashMap(); + Preloader_Logger.INFO("Mismatch between mapped Forge and Srg names, finding missing values."); + if (srgToForge.size() > forgeToSrg.size()) { + Preloader_Logger.INFO("More SRG Keys detected."); + for (String aKey : srgToForge.keySet()) { + if (!forgeToSrg.containsValue(aKey)) { + aMissingSrgNames.put(aKey1++, aKey); + } + } + } + else if (srgToForge.size() < forgeToSrg.size()) { + Preloader_Logger.INFO("More Forge Keys detected."); + for (String aKey : forgeToSrg.keySet()) { + if (!srgToForge.containsValue(aKey)) { + aMissingForgeNames.put(aKey2++, aKey); + } + } + } + if (!aMissingForgeNames.isEmpty()) { + for (String missingVal : aMissingForgeNames.values()) { + //Preloader_Logger.WARNING("Missing Forge value: "+missingVal); + } + } + if (!aMissingSrgNames.isEmpty()) { + for (String missingVal : aMissingSrgNames.values()) { + //Preloader_Logger.WARNING("Missing SRG value: "+missingVal); + } + } + } + if (obToDeOb.size() != deObToOb.size()) { + int aKey1 = 0; + int aKey2 = 0; + HashMap aMissingObfNames = new HashMap(); + HashMap aMissingDeObfNames = new HashMap(); + Preloader_Logger.INFO("Mismatch between mapped Obfuscated and Deobfuscated names, finding missing values."); + if (obToDeOb.size() > deObToOb.size()) { + Preloader_Logger.INFO("More Obfuscated Keys detected."); + for (String aKey : obToDeOb.keySet()) { + if (!deObToOb.containsValue(aKey)) { + aMissingObfNames.put(aKey1++, aKey); + } + } + } + else if (obToDeOb.size() < deObToOb.size()) { + Preloader_Logger.INFO("More Deobfuscated Keys detected."); + for (String aKey : deObToOb.keySet()) { + if (!obToDeOb.containsValue(aKey)) { + aMissingDeObfNames.put(aKey2++, aKey); + } + } + } + if (!aMissingObfNames.isEmpty()) { + for (String missingVal : aMissingObfNames.values()) { + Preloader_Logger.WARNING("Missing Obfuscated value: "+missingVal); + } + } + if (!aMissingDeObfNames.isEmpty()) { + for (String missingVal : aMissingDeObfNames.values()) { + Preloader_Logger.WARNING("Missing Deobfuscated value: "+missingVal); + } + } + } + } + } + + // return true anyway as some keys will mismatch. + return true; + } + + private static void init1() { + mInitMap.put(new Pair("func_100011_g", "getIsPotionDurationMax")); + mInitMap.put(new Pair("func_100012_b", "setPotionDurationMax")); + mInitMap.put(new Pair("func_100015_a", "isKeyDown")); + mInitMap.put(new Pair("func_102007_a", "canInsertItem")); + mInitMap.put(new Pair("func_102008_b", "canExtractItem")); + mInitMap.put(new Pair("func_104002_bU", "isNoDespawnRequired")); + mInitMap.put(new Pair("func_104055_i", "setForceGamemode")); + mInitMap.put(new Pair("func_104056_am", "getForceGamemode")); + mInitMap.put(new Pair("func_104112_b", "saveExtraData")); + mInitMap.put(new Pair("func_104140_m", "saveChunkData")); + mInitMap.put(new Pair("func_110123_P", "onChunkLoad")); + mInitMap.put(new Pair("func_110124_au", "getUniqueID")); + mInitMap.put(new Pair("func_110125_a", "setParticleIcon")); + mInitMap.put(new Pair("func_110128_b", "onBroken")); + mInitMap.put(new Pair("func_110130_b", "getKnotForBlock")); + mInitMap.put(new Pair("func_110131_b", "removeFrameFromMap")); + mInitMap.put(new Pair("func_110138_aP", "getMaxHealth")); + mInitMap.put(new Pair("func_110139_bj", "getAbsorptionAmount")); + mInitMap.put(new Pair("func_110140_aT", "getAttributeMap")); + mInitMap.put(new Pair("func_110142_aN", "getCombatTracker")); + mInitMap.put(new Pair("func_110143_aJ", "getHealth")); + mInitMap.put(new Pair("func_110144_aD", "getLastAttacker")); + mInitMap.put(new Pair("func_110145_l", "dismountEntity")); + mInitMap.put(new Pair("func_110147_ax", "applyEntityAttributes")); + mInitMap.put(new Pair("func_110148_a", "getEntityAttribute")); + mInitMap.put(new Pair("func_110149_m", "setAbsorptionAmount")); + mInitMap.put(new Pair("func_110159_bB", "updateLeashedState")); + mInitMap.put(new Pair("func_110160_i", "clearLeashed")); + mInitMap.put(new Pair("func_110161_a", "onSpawnWithEgg")); + mInitMap.put(new Pair("func_110162_b", "setLeashedToEntity")); + mInitMap.put(new Pair("func_110163_bv", "enablePersistence")); + mInitMap.put(new Pair("func_110164_bC", "allowLeashing")); + mInitMap.put(new Pair("func_110165_bF", "recreateLeash")); + mInitMap.put(new Pair("func_110166_bE", "getLeashedToEntity")); + mInitMap.put(new Pair("func_110167_bD", "getLeashed")); + mInitMap.put(new Pair("func_110171_b", "setHomeArea")); + mInitMap.put(new Pair("func_110172_bL", "getHomePosition")); + mInitMap.put(new Pair("func_110173_bK", "isWithinHomeDistanceCurrentPosition")); + mInitMap.put(new Pair("func_110174_bM", "getMaximumHomeDistance")); + mInitMap.put(new Pair("func_110175_bO", "hasHome")); + mInitMap.put(new Pair("func_110176_b", "isWithinHomeDistance")); + mInitMap.put(new Pair("func_110177_bN", "detachHome")); + mInitMap.put(new Pair("func_110195_a", "addGrowth")); + mInitMap.put(new Pair("func_110198_t", "increaseTemper")); + mInitMap.put(new Pair("func_110199_f", "openGUI")); + mInitMap.put(new Pair("func_110200_cJ", "canMate")); + mInitMap.put(new Pair("func_110202_bQ", "getHorseVariant")); + mInitMap.put(new Pair("func_110204_cc", "isEatingHaystack")); + mInitMap.put(new Pair("func_110206_u", "setJumpPower")); + mInitMap.put(new Pair("func_110207_m", "setChested")); + mInitMap.put(new Pair("func_110208_b", "setHorseWatchableBoolean")); + mInitMap.put(new Pair("func_110209_cd", "isRearing")); + mInitMap.put(new Pair("func_110212_cp", "getVariantTexturePaths")); + mInitMap.put(new Pair("func_110214_p", "setHorseType")); + mInitMap.put(new Pair("func_110215_cj", "getHorseJumpStrength")); + mInitMap.put(new Pair("func_110216_r", "spawnHorseParticles")); + mInitMap.put(new Pair("func_110217_cl", "getAngrySoundName")); + mInitMap.put(new Pair("func_110218_cm", "getMaxTemper")); + mInitMap.put(new Pair("func_110219_q", "setRearing")); + mInitMap.put(new Pair("func_110220_cK", "makeHorseRear")); + mInitMap.put(new Pair("func_110221_n", "setHasReproduced")); + mInitMap.put(new Pair("func_110222_cv", "isSterile")); + mInitMap.put(new Pair("func_110223_p", "getRearingAmount")); + mInitMap.put(new Pair("func_110224_ci", "dropChests")); + mInitMap.put(new Pair("func_110227_p", "setEatingHaystack")); + mInitMap.put(new Pair("func_110228_bR", "isAdultHorse")); + mInitMap.put(new Pair("func_110229_cs", "canCarryChest")); + mInitMap.put(new Pair("func_110231_cz", "makeHorseRearWithSound")); + mInitMap.put(new Pair("func_110233_w", "getHorseWatchableBoolean")); + mInitMap.put(new Pair("func_110234_j", "setHorseTamed")); + mInitMap.put(new Pair("func_110235_q", "setHorseVariant")); + mInitMap.put(new Pair("func_110238_s", "setTemper")); + mInitMap.put(new Pair("func_110240_a", "dropItemsInChest")); + mInitMap.put(new Pair("func_110243_cf", "getHasReproduced")); + mInitMap.put(new Pair("func_110244_cA", "dropChestItems")); + mInitMap.put(new Pair("func_110246_bZ", "isHorseJumping")); + mInitMap.put(new Pair("func_110247_cG", "setHorseTexturePaths")); + mInitMap.put(new Pair("func_110248_bS", "isTame")); + mInitMap.put(new Pair("func_110249_cI", "openHorseMouth")); + mInitMap.put(new Pair("func_110250_a", "getClosestHorse")); + mInitMap.put(new Pair("func_110251_o", "setHorseSaddled")); + mInitMap.put(new Pair("func_110252_cg", "getTemper")); + mInitMap.put(new Pair("func_110254_bY", "getHorseSize")); + mInitMap.put(new Pair("func_110255_k", "setHorseJumping")); + mInitMap.put(new Pair("func_110256_cu", "isUndead")); + mInitMap.put(new Pair("func_110257_ck", "isHorseSaddled")); + mInitMap.put(new Pair("func_110258_o", "getGrassEatingAmount")); + mInitMap.put(new Pair("func_110259_cr", "canWearArmor")); + mInitMap.put(new Pair("func_110260_d", "getHorseArmorIndex")); + mInitMap.put(new Pair("func_110261_ca", "isChested")); + mInitMap.put(new Pair("func_110262_ch", "prepareChunkForSpawn")); + mInitMap.put(new Pair("func_110263_g", "setTamedBy")); + mInitMap.put(new Pair("func_110264_co", "getHorseTexture")); + mInitMap.put(new Pair("func_110265_bP", "getHorseType")); + mInitMap.put(new Pair("func_110297_a_", "verifySellingItem")); + mInitMap.put(new Pair("func_110298_a", "displayGUIHorse")); + mInitMap.put(new Pair("func_110303_q", "getLocationCape")); + mInitMap.put(new Pair("func_110304_a", "getDownloadImageSkin")); + mInitMap.put(new Pair("func_110306_p", "getLocationSkin")); + mInitMap.put(new Pair("func_110311_f", "getLocationSkin")); + mInitMap.put(new Pair("func_110317_t", "isRidingHorse")); + mInitMap.put(new Pair("func_110318_g", "sendHorseJump")); + mInitMap.put(new Pair("func_110319_bJ", "getHorseJumpPower")); + mInitMap.put(new Pair("func_110322_i", "sendHorseInteraction")); + mInitMap.put(new Pair("func_110326_a", "setRecordPlaying")); + mInitMap.put(new Pair("func_110327_a", "renderIcons")); + mInitMap.put(new Pair("func_110430_a", "setEntityActionState")); + mInitMap.put(new Pair("func_110432_I", "getSession")); + mInitMap.put(new Pair("func_110434_K", "getTextureManager")); + mInitMap.put(new Pair("func_110435_P", "addDefaultResourcePack")); + mInitMap.put(new Pair("func_110436_a", "refreshResources")); + mInitMap.put(new Pair("func_110437_J", "getProxy")); + mInitMap.put(new Pair("func_110438_M", "getResourcePackRepository")); + mInitMap.put(new Pair("func_110441_Q", "updateDisplayMode")); + mInitMap.put(new Pair("func_110442_L", "getResourceManager")); + mInitMap.put(new Pair("func_110454_ao", "getServerProxy")); + mInitMap.put(new Pair("func_110455_j", "getOpPermissionLevel")); + mInitMap.put(new Pair("func_110462_b", "getPackFormat")); + mInitMap.put(new Pair("func_110468_c", "getFrameIndex")); + mInitMap.put(new Pair("func_110469_d", "getFrameTime")); + mInitMap.put(new Pair("func_110470_b", "frameHasTime")); + mInitMap.put(new Pair("func_110471_a", "getFrameHeight")); + mInitMap.put(new Pair("func_110472_a", "getFrameTimeSingle")); + mInitMap.put(new Pair("func_110473_c", "getFrameCount")); + mInitMap.put(new Pair("func_110474_b", "getFrameWidth")); + mInitMap.put(new Pair("func_110479_a", "getTextureBlur")); + mInitMap.put(new Pair("func_110480_b", "getTextureClamp")); + mInitMap.put(new Pair("func_110483_a", "getSectionName")); + mInitMap.put(new Pair("func_110492_a", "parseAnimationFrame")); + mInitMap.put(new Pair("func_110495_a", "hasNoTime")); + mInitMap.put(new Pair("func_110496_c", "getFrameIndex")); + mInitMap.put(new Pair("func_110497_b", "getFrameTime")); + mInitMap.put(new Pair("func_110503_a", "parseMetadataSection")); + mInitMap.put(new Pair("func_110504_a", "registerMetadataSectionType")); + mInitMap.put(new Pair("func_110505_a", "getGson")); + mInitMap.put(new Pair("func_110514_c", "getResourcePack")); + mInitMap.put(new Pair("func_110515_d", "getResourcePackName")); + mInitMap.put(new Pair("func_110516_a", "updateResourcePack")); + mInitMap.put(new Pair("func_110517_b", "closeResourcePack")); + mInitMap.put(new Pair("func_110518_a", "bindTexturePackIcon")); + mInitMap.put(new Pair("func_110519_e", "getTexturePackDescription")); + mInitMap.put(new Pair("func_110526_a", "getMetadata")); + mInitMap.put(new Pair("func_110527_b", "getInputStream")); + mInitMap.put(new Pair("func_110528_c", "hasMetadata")); + mInitMap.put(new Pair("func_110536_a", "getResource")); + mInitMap.put(new Pair("func_110537_b", "getLocationMcmeta")); + mInitMap.put(new Pair("func_110538_a", "addResourcePack")); + mInitMap.put(new Pair("func_110541_a", "reloadResources")); + mInitMap.put(new Pair("func_110542_a", "registerReloadListener")); + mInitMap.put(new Pair("func_110543_a", "clearResources")); + mInitMap.put(new Pair("func_110544_b", "notifyReloadListeners")); + mInitMap.put(new Pair("func_110545_a", "reloadResourcePack")); + mInitMap.put(new Pair("func_110549_a", "onResourceManagerReload")); + mInitMap.put(new Pair("func_110550_d", "tick")); + mInitMap.put(new Pair("func_110551_a", "loadTexture")); + mInitMap.put(new Pair("func_110552_b", "getGlTextureId")); + mInitMap.put(new Pair("func_110564_a", "updateDynamicTexture")); + mInitMap.put(new Pair("func_110565_c", "getTextureData")); + mInitMap.put(new Pair("func_110569_e", "initMissingImage")); + mInitMap.put(new Pair("func_110571_b", "loadTextureAtlas")); + mInitMap.put(new Pair("func_110572_b", "getAtlasSprite")); + mInitMap.put(new Pair("func_110573_f", "registerIcons")); + mInitMap.put(new Pair("func_110577_a", "bindTexture")); + mInitMap.put(new Pair("func_110578_a", "getDynamicTextureLocation")); + mInitMap.put(new Pair("func_110579_a", "loadTexture")); + mInitMap.put(new Pair("func_110580_a", "loadTickableTexture")); + mInitMap.put(new Pair("func_110581_b", "getTexture")); + mInitMap.put(new Pair("func_110586_a", "getPackImage")); + mInitMap.put(new Pair("func_110587_b", "getResourceDomains")); + mInitMap.put(new Pair("func_110589_b", "resourceExists")); + mInitMap.put(new Pair("func_110590_a", "getInputStream")); + mInitMap.put(new Pair("func_110591_a", "getInputStreamByName")); + mInitMap.put(new Pair("func_110592_c", "locationToName")); + mInitMap.put(new Pair("func_110593_b", "hasResourceName")); + mInitMap.put(new Pair("func_110594_c", "logNameNotLowercase")); + mInitMap.put(new Pair("func_110595_a", "getRelativeName")); + mInitMap.put(new Pair("func_110596_a", "readMetadata")); + mInitMap.put(new Pair("func_110599_c", "getResourcePackZipFile")); + mInitMap.put(new Pair("func_110605_c", "getResourceStream")); + mInitMap.put(new Pair("func_110609_b", "getRepositoryEntriesAll")); + mInitMap.put(new Pair("func_110611_a", "updateRepositoryEntriesAll")); + mInitMap.put(new Pair("func_110612_e", "getDirResourcepacks")); + mInitMap.put(new Pair("func_110613_c", "getRepositoryEntries")); + mInitMap.put(new Pair("func_110614_g", "getResourcePackFiles")); + mInitMap.put(new Pair("func_110616_f", "fixDirResourcepacks")); + mInitMap.put(new Pair("func_110623_a", "getResourcePath")); + mInitMap.put(new Pair("func_110624_b", "getResourceDomain")); + mInitMap.put(new Pair("func_110646_a", "getTextWithoutFormattingCodes")); + mInitMap.put(new Pair("func_110647_a", "getOSType")); + mInitMap.put(new Pair("func_110661_a", "parseDouble")); + mInitMap.put(new Pair("func_110662_c", "parseBoolean")); + mInitMap.put(new Pair("func_110664_a", "parseDouble")); + mInitMap.put(new Pair("func_110665_a", "clamp_double")); + mInitMap.put(new Pair("func_110666_a", "clamp_coord")); + mInitMap.put(new Pair("func_110682_a", "setBoxRotation")); + mInitMap.put(new Pair("func_110683_a", "updateHorseRotation")); + mInitMap.put(new Pair("func_110738_j", "isRidingHorse")); + mInitMap.put(new Pair("func_110775_a", "getEntityTexture")); + mInitMap.put(new Pair("func_110776_a", "bindTexture")); + mInitMap.put(new Pair("func_110777_b", "bindEntityTexture")); + mInitMap.put(new Pair("func_110813_b", "canRenderName")); + mInitMap.put(new Pair("func_110934_a", "addSprite")); + mInitMap.put(new Pair("func_110935_a", "getCurrentWidth")); + mInitMap.put(new Pair("func_110936_b", "getCurrentHeight")); + mInitMap.put(new Pair("func_110966_b", "setIconWidth")); + mInitMap.put(new Pair("func_110967_i", "getOriginY")); + mInitMap.put(new Pair("func_110968_a", "setFramesTextureData")); + mInitMap.put(new Pair("func_110969_c", "setIconHeight")); + mInitMap.put(new Pair("func_110970_k", "getFrameCount")); + mInitMap.put(new Pair("func_110971_a", "initSprite")); + mInitMap.put(new Pair("func_110985_a", "updateAnaglyph")); + mInitMap.put(new Pair("func_110986_a", "readImageData")); + mInitMap.put(new Pair("func_110987_a", "uploadTextureImage")); + mInitMap.put(new Pair("func_110988_a", "uploadTexture")); + mInitMap.put(new Pair("func_110989_a", "uploadTextureImageAllocate")); + mInitMap.put(new Pair("func_110990_a", "copyToBuffer")); + mInitMap.put(new Pair("func_110991_a", "allocateTexture")); + mInitMap.put(new Pair("func_110993_a", "uploadTextureImageSubImpl")); + mInitMap.put(new Pair("func_110994_a", "copyToBufferPos")); + mInitMap.put(new Pair("func_110995_a", "uploadTextureImageSub")); + mInitMap.put(new Pair("func_110996_a", "glGenTextures")); + mInitMap.put(new Pair("func_110997_a", "setTextureClamped")); + mInitMap.put(new Pair("func_111108_a", "getAttributeUnlocalizedName")); + mInitMap.put(new Pair("func_111109_a", "clampValue")); + mInitMap.put(new Pair("func_111110_b", "getDefaultValue")); + mInitMap.put(new Pair("func_111111_c", "getShouldWatch")); + mInitMap.put(new Pair("func_111112_a", "setShouldWatch")); + mInitMap.put(new Pair("func_111116_f", "getDescription")); + mInitMap.put(new Pair("func_111117_a", "setDescription")); + mInitMap.put(new Pair("func_111121_a", "applyModifier")); + mInitMap.put(new Pair("func_111123_a", "getAttribute")); + mInitMap.put(new Pair("func_111124_b", "removeModifier")); + mInitMap.put(new Pair("func_111125_b", "getBaseValue")); + mInitMap.put(new Pair("func_111126_e", "getAttributeValue")); + mInitMap.put(new Pair("func_111127_a", "getModifier")); + mInitMap.put(new Pair("func_111128_a", "setBaseValue")); + mInitMap.put(new Pair("func_111129_g", "computeValue")); + mInitMap.put(new Pair("func_111130_a", "getModifiersByOperation")); + mInitMap.put(new Pair("func_111131_f", "flagForUpdate")); + mInitMap.put(new Pair("func_111145_d", "getWatchableObjectFloat")); + mInitMap.put(new Pair("func_111146_a", "getAllAttributes")); + mInitMap.put(new Pair("func_111147_b", "applyAttributeModifiers")); + mInitMap.put(new Pair("func_111148_a", "removeAttributeModifiers")); + mInitMap.put(new Pair("func_111149_a", "addAttributeInstance")); + mInitMap.put(new Pair("func_111150_b", "registerAttribute")); + mInitMap.put(new Pair("func_111151_a", "getAttributeInstance")); + mInitMap.put(new Pair("func_111152_a", "getAttributeInstanceByName")); + mInitMap.put(new Pair("func_111160_c", "getWatchedAttributes")); + mInitMap.put(new Pair("func_111161_b", "getAttributeInstanceSet")); + mInitMap.put(new Pair("func_111164_d", "getAmount")); + mInitMap.put(new Pair("func_111165_e", "isSaved")); + mInitMap.put(new Pair("func_111166_b", "getName")); + mInitMap.put(new Pair("func_111167_a", "getID")); + mInitMap.put(new Pair("func_111168_a", "setSaved")); + mInitMap.put(new Pair("func_111169_c", "getOperation")); + mInitMap.put(new Pair("func_111175_f", "getTargetDistance")); + mInitMap.put(new Pair("func_111184_a", "registerPotionAttributeModifier")); + mInitMap.put(new Pair("func_111185_a", "applyAttributesModifiersToEntity")); + mInitMap.put(new Pair("func_111187_a", "removeAttributesModifiersFromEntity")); + mInitMap.put(new Pair("func_111190_b", "sendMetadataToAllAssociatedPlayers")); + mInitMap.put(new Pair("func_111194_a", "processChunk")); + mInitMap.put(new Pair("func_111196_a", "increaseInhabitedTime")); + mInitMap.put(new Pair("func_111205_h", "getItemAttributeModifiers")); + mInitMap.put(new Pair("func_111206_d", "setTextureName")); + mInitMap.put(new Pair("func_111207_a", "itemInteractionForEntity")); + mInitMap.put(new Pair("func_111208_A", "getIconString")); + mInitMap.put(new Pair("func_111225_m", "getRelevantEnchantmentTypes")); + mInitMap.put(new Pair("func_111229_a", "setRelevantEnchantmentTypes")); + mInitMap.put(new Pair("func_111238_b", "canBeHovered")); + mInitMap.put(new Pair("func_111257_a", "writeBaseAttributeMapToNBT")); + mInitMap.put(new Pair("func_111258_a", "applyModifiersToAttributeInstance")); + mInitMap.put(new Pair("func_111259_a", "readAttributeModifierFromNBT")); + mInitMap.put(new Pair("func_111261_a", "writeAttributeInstanceToNBT")); + mInitMap.put(new Pair("func_111262_a", "writeAttributeModifierToNBT")); + mInitMap.put(new Pair("func_111269_d", "getPathSearchRange")); + mInitMap.put(new Pair("func_111270_a", "union")); + mInitMap.put(new Pair("func_111271_a", "getUnicodePageLocation")); + mInitMap.put(new Pair("func_111272_d", "readFontTexture")); + mInitMap.put(new Pair("func_111282_a", "interactWithEntity")); + mInitMap.put(new Pair("func_111283_C", "getAttributeModifiers")); + mInitMap.put(new Pair("func_111285_a", "getUsername")); + mInitMap.put(new Pair("func_111286_b", "getSessionID")); + mInitMap.put(new Pair("func_120011_ar", "setGuiEnabled")); + mInitMap.put(new Pair("func_120016_a", "createServerGui")); + mInitMap.put(new Pair("func_120018_d", "getLogComponent")); + mInitMap.put(new Pair("func_120019_b", "getStatsComponent")); + mInitMap.put(new Pair("func_120020_c", "getPlayerListComponent")); + mInitMap.put(new Pair("func_130001_d", "getCurrentMoonPhaseFactor")); + mInitMap.put(new Pair("func_130002_c", "interactFirst")); + mInitMap.put(new Pair("func_130010_a", "getOriginX")); + mInitMap.put(new Pair("func_130011_c", "setLastAttacker")); + mInitMap.put(new Pair("func_130014_f_", "getEntityWorld")); + mInitMap.put(new Pair("func_130071_aq", "getCurrentTimeMillis")); + mInitMap.put(new Pair("func_130072_d", "getAnimationFrame")); + mInitMap.put(new Pair("func_130073_e", "getFrameIndexSet")); + mInitMap.put(new Pair("func_130077_b", "getPackName")); + mInitMap.put(new Pair("func_130086_a", "getTextureType")); + mInitMap.put(new Pair("func_130087_a", "getResourceLocation")); + mInitMap.put(new Pair("func_130088_a", "loadTextureMap")); + mInitMap.put(new Pair("func_130098_m", "hasAnimationMetadata")); + mInitMap.put(new Pair("func_130099_d", "allocateFrameTextureData")); + mInitMap.put(new Pair("func_130102_n", "resetSprite")); + mInitMap.put(new Pair("func_130103_l", "clearFramesTextureData")); + mInitMap.put(new Pair("func_130105_g", "getMinecraftStartTimeMillis")); + mInitMap.put(new Pair("func_135016_M", "getLanguageManager")); + mInitMap.put(new Pair("func_135018_a", "getLanguages")); + mInitMap.put(new Pair("func_135021_a", "loadLocaleData")); + mInitMap.put(new Pair("func_135022_a", "loadLocaleDataFiles")); + mInitMap.put(new Pair("func_135023_a", "formatMessage")); + mInitMap.put(new Pair("func_135024_b", "checkUnicode")); + mInitMap.put(new Pair("func_135025_a", "isUnicode")); + mInitMap.put(new Pair("func_135026_c", "translateKeyPrivate")); + mInitMap.put(new Pair("func_135028_a", "loadLocaleData")); + mInitMap.put(new Pair("func_135034_a", "getLanguageCode")); + mInitMap.put(new Pair("func_135035_b", "isBidirectional")); + mInitMap.put(new Pair("func_135040_d", "getLanguages")); + mInitMap.put(new Pair("func_135041_c", "getCurrentLanguage")); + mInitMap.put(new Pair("func_135042_a", "isCurrentLocaleUnicode")); + mInitMap.put(new Pair("func_135043_a", "parseLanguageMetadata")); + mInitMap.put(new Pair("func_135044_b", "isCurrentLanguageBidirectional")); + mInitMap.put(new Pair("func_135045_a", "setCurrentLanguage")); + mInitMap.put(new Pair("func_135051_a", "setLocale")); + mInitMap.put(new Pair("func_135052_a", "format")); + mInitMap.put(new Pair("func_135055_a", "getResourceDomains")); + mInitMap.put(new Pair("func_135056_b", "getAllResources")); + mInitMap.put(new Pair("func_135058_a", "getPackMetadata")); + mInitMap.put(new Pair("func_135063_a", "replaceWith")); + mInitMap.put(new Pair("func_135064_c", "tryTranslateKey")); + mInitMap.put(new Pair("func_140005_i", "switchToRealms")); + mInitMap.put(new Pair("func_142008_O", "shouldSetPosAfterLoading")); + mInitMap.put(new Pair("func_142012_a", "isOnTeam")); + mInitMap.put(new Pair("func_142013_aG", "getLastAttackerTime")); + mInitMap.put(new Pair("func_142014_c", "isOnSameTeam")); + mInitMap.put(new Pair("func_142015_aE", "getRevengeTimer")); + mInitMap.put(new Pair("func_142020_c", "setClientBrand")); + mInitMap.put(new Pair("func_142021_k", "getClientBrand")); + mInitMap.put(new Pair("func_142049_d", "removeAllModifiers")); + mInitMap.put(new Pair("func_142053_d", "formatString")); + mInitMap.put(new Pair("func_142054_a", "isSameTeam")); + mInitMap.put(new Pair("func_143004_u", "markPlayerActive")); + mInitMap.put(new Pair("func_143006_e", "setPlayerIdleTimeout")); + mInitMap.put(new Pair("func_143007_ar", "getMaxPlayerIdleMinutes")); + mInitMap.put(new Pair("func_143011_b", "readStructureFromNBT")); + mInitMap.put(new Pair("func_143012_a", "writeStructureToNBT")); + mInitMap.put(new Pair("func_143016_a", "registerVillagePieces")); + mInitMap.put(new Pair("func_143025_a", "getStructureName")); + mInitMap.put(new Pair("func_143031_a", "registerStructureComponent")); + mInitMap.put(new Pair("func_143034_b", "registerStructure")); + mInitMap.put(new Pair("func_143045_a", "registerScatteredFeaturePieces")); + mInitMap.put(new Pair("func_143046_a", "registerStrongholdPieces")); + mInitMap.put(new Pair("func_143048_a", "registerStructurePieces")); + mInitMap.put(new Pair("func_143049_a", "registerNetherFortressPieces")); + mInitMap.put(new Pair("func_145747_a", "addChatMessage")); + mInitMap.put(new Pair("func_145748_c_", "getFormattedCommandSenderName")); + mInitMap.put(new Pair("func_145749_h", "getLastOutput")); + mInitMap.put(new Pair("func_145752_a", "setCommand")); + mInitMap.put(new Pair("func_145753_i", "getCustomName")); + mInitMap.put(new Pair("func_145758_a", "writeDataToNBT")); + mInitMap.put(new Pair("func_145759_b", "readDataFromNBT")); + mInitMap.put(new Pair("func_145760_g", "getSuccessCount")); + mInitMap.put(new Pair("func_145769_d", "setEntityId")); + mInitMap.put(new Pair("func_145770_h", "isInRangeToRender3d")); + mInitMap.put(new Pair("func_145771_j", "pushOutOfBlocks")); + mInitMap.put(new Pair("func_145772_a", "getExplosionResistance")); + mInitMap.put(new Pair("func_145773_az", "doesEntityNotTriggerPressurePlate")); + mInitMap.put(new Pair("func_145775_I", "doBlockCollisions")); + mInitMap.put(new Pair("func_145776_H", "getSwimSound")); + mInitMap.put(new Pair("func_145777_O", "getSplashSound")); + mInitMap.put(new Pair("func_145778_a", "dropItemWithOffset")); + mInitMap.put(new Pair("func_145779_a", "dropItem")); + mInitMap.put(new Pair("func_145780_a", "playStepSound")); + mInitMap.put(new Pair("func_145782_y", "getEntityId")); + mInitMap.put(new Pair("func_145797_a", "setOwner")); + mInitMap.put(new Pair("func_145798_i", "getOwner")); + mInitMap.put(new Pair("func_145799_b", "setThrower")); + mInitMap.put(new Pair("func_145800_j", "getThrower")); + mInitMap.put(new Pair("func_145805_f", "getBlock")); + mInitMap.put(new Pair("func_145806_a", "setHurtEntities")); + mInitMap.put(new Pair("func_145807_e", "getWorldObj")); + mInitMap.put(new Pair("func_145817_o", "getDefaultDisplayTile")); + mInitMap.put(new Pair("func_145818_k_", "isCustomInventoryName")); + mInitMap.put(new Pair("func_145820_n", "getDisplayTile")); + mInitMap.put(new Pair("func_145825_b", "getInventoryName")); + mInitMap.put(new Pair("func_145826_a", "addMapping")); + mInitMap.put(new Pair("func_145827_c", "createAndLoadEntity")); + mInitMap.put(new Pair("func_145828_a", "addInfoToCrashReport")); + mInitMap.put(new Pair("func_145829_t", "validate")); + mInitMap.put(new Pair("func_145830_o", "hasWorldObj")); + mInitMap.put(new Pair("func_145831_w", "getWorld")); + mInitMap.put(new Pair("func_145832_p", "getBlockMetadata")); + mInitMap.put(new Pair("func_145833_n", "getMaxRenderDistanceSquared")); + mInitMap.put(new Pair("func_145834_a", "setWorldObj")); + mInitMap.put(new Pair("func_145835_a", "getDistanceSq")); + mInitMap.put(new Pair("func_145836_u", "updateContainingBlockInfo")); + mInitMap.put(new Pair("func_145837_r", "isInvalid")); + mInitMap.put(new Pair("func_145838_q", "getBlockType")); + mInitMap.put(new Pair("func_145839_a", "readFromNBT")); + mInitMap.put(new Pair("func_145841_b", "writeToNBT")); + mInitMap.put(new Pair("func_145842_c", "receiveClientEvent")); + mInitMap.put(new Pair("func_145843_s", "invalidate")); + mInitMap.put(new Pair("func_145844_m", "getDescriptionPacket")); + mInitMap.put(new Pair("func_145845_h", "updateEntity")); + mInitMap.put(new Pair("func_145861_a", "getStoredBlockID")); + mInitMap.put(new Pair("func_145864_c", "getPistonOrientation")); + mInitMap.put(new Pair("func_145866_f", "clearPistonTileEntity")); + mInitMap.put(new Pair("func_145867_d", "shouldPistonHeadBeRendered")); + mInitMap.put(new Pair("func_145868_b", "isExtending")); + mInitMap.put(new Pair("func_145877_a", "changePitch")); + mInitMap.put(new Pair("func_145878_a", "triggerNote")); + mInitMap.put(new Pair("func_145888_j", "isOnTransferCooldown")); + mInitMap.put(new Pair("func_145896_c", "setTransferCooldown")); + mInitMap.put(new Pair("func_145903_a", "setSkullRotation")); + mInitMap.put(new Pair("func_145904_a", "getSkullType")); + mInitMap.put(new Pair("func_145906_b", "getSkullRotation")); + mInitMap.put(new Pair("func_145913_a", "setEditable")); + mInitMap.put(new Pair("func_145914_a", "getIsEditable")); + mInitMap.put(new Pair("func_145934_k", "canBrew")); + mInitMap.put(new Pair("func_145935_i", "getBrewTime")); + mInitMap.put(new Pair("func_145938_d", "setBrewTime")); + mInitMap.put(new Pair("func_145939_j", "getFilledSlots")); + mInitMap.put(new Pair("func_145940_l", "brewPotions")); + mInitMap.put(new Pair("func_145948_k", "canSmelt")); + mInitMap.put(new Pair("func_145949_j", "smeltItem")); + mInitMap.put(new Pair("func_145950_i", "isBurning")); + mInitMap.put(new Pair("func_145951_a", "setCustomInventoryName")); + mInitMap.put(new Pair("func_145952_a", "getItemBurnTime")); + mInitMap.put(new Pair("func_145953_d", "getCookProgressScaled")); + mInitMap.put(new Pair("func_145954_b", "isItemFuel")); + mInitMap.put(new Pair("func_145955_e", "getBurnTimeRemainingScaled")); + mInitMap.put(new Pair("func_145965_a", "getFlowerPotItem")); + mInitMap.put(new Pair("func_145966_b", "getFlowerPotData")); + mInitMap.put(new Pair("func_145976_a", "setCustomName")); + mInitMap.put(new Pair("func_145977_a", "isSameTypeChestAt")); + mInitMap.put(new Pair("func_145979_i", "checkForAdjacentChests")); + mInitMap.put(new Pair("func_145980_j", "getChestType")); + mInitMap.put(new Pair("func_145995_a", "setOutputSignal")); + mInitMap.put(new Pair("func_145996_a", "getOutputSignal")); + mInitMap.put(new Pair("func_145998_l", "getLevels")); + mInitMap.put(new Pair("func_146001_d", "setPrimaryEffect")); + mInitMap.put(new Pair("func_146002_i", "shouldBeamRender")); + mInitMap.put(new Pair("func_146004_e", "setSecondaryEffect")); + mInitMap.put(new Pair("func_146006_k", "getSecondaryEffect")); + mInitMap.put(new Pair("func_146007_j", "getPrimaryEffect")); + mInitMap.put(new Pair("func_146023_a", "getStrVsBlock")); + mInitMap.put(new Pair("func_146024_c", "getInventorySlotContainItemAndDamage")); + mInitMap.put(new Pair("func_146026_a", "consumeInventoryItem")); + mInitMap.put(new Pair("func_146027_a", "clearInventory")); + mInitMap.put(new Pair("func_146028_b", "hasItem")); + mInitMap.put(new Pair("func_146029_c", "getInventorySlotContainItem")); + mInitMap.put(new Pair("func_146030_a", "setCurrentItem")); + mInitMap.put(new Pair("func_146031_a", "setChestTileEntity")); + mInitMap.put(new Pair("func_146034_e", "handleHookRetraction")); + mInitMap.put(new Pair("func_146035_c", "handleHookCasting")); + mInitMap.put(new Pair("func_146068_u", "getDropItem")); + mInitMap.put(new Pair("func_146080_bZ", "getCarriedBlock")); + mInitMap.put(new Pair("func_146081_a", "setCarriedBlock")); + mInitMap.put(new Pair("func_146082_f", "setInLove")); + mInitMap.put(new Pair("func_146086_d", "setHorseArmorStack")); + mInitMap.put(new Pair("func_146094_a", "getUUID")); + mInitMap.put(new Pair("func_146096_a", "getBreakSpeed")); + mInitMap.put(new Pair("func_146099_a", "canHarvestBlock")); + mInitMap.put(new Pair("func_146100_a", "displayGUIEditSign")); + mInitMap.put(new Pair("func_146103_bH", "getGameProfile")); + mInitMap.put(new Pair("func_146105_b", "addChatComponentMessage")); + mInitMap.put(new Pair("func_146107_m", "getStatFileWriter")); + mInitMap.put(new Pair("func_146110_a", "drawModalRectWithCustomSizedTexture")); + mInitMap.put(new Pair("func_146111_b", "drawButtonForegroundLayer")); + mInitMap.put(new Pair("func_146112_a", "drawButton")); + mInitMap.put(new Pair("func_146113_a", "playPressSound")); + mInitMap.put(new Pair("func_146114_a", "getHoverState")); + mInitMap.put(new Pair("func_146115_a", "isMouseOver")); + mInitMap.put(new Pair("func_146116_c", "mousePressed")); + mInitMap.put(new Pair("func_146117_b", "getButtonWidth")); + mInitMap.put(new Pair("func_146118_a", "mouseReleased")); + mInitMap.put(new Pair("func_146119_b", "mouseDragged")); + mInitMap.put(new Pair("func_146136_c", "returnEnumOptions")); + mInitMap.put(new Pair("func_146158_b", "getChatGUI")); + mInitMap.put(new Pair("func_146159_a", "drawLabel")); + mInitMap.put(new Pair("func_146160_b", "drawLabelBackground")); + mInitMap.put(new Pair("func_146175_b", "deleteFromCursor")); + mInitMap.put(new Pair("func_146176_q", "getVisible")); + mInitMap.put(new Pair("func_146177_a", "deleteWords")); + mInitMap.put(new Pair("func_146178_a", "updateCursorCounter")); + mInitMap.put(new Pair("func_146179_b", "getText")); + mInitMap.put(new Pair("func_146180_a", "setText")); + mInitMap.put(new Pair("func_146181_i", "getEnableBackgroundDrawing")); + mInitMap.put(new Pair("func_146182_d", "moveCursorBy")); + mInitMap.put(new Pair("func_146183_a", "getNthWordFromPos")); + mInitMap.put(new Pair("func_146184_c", "setEnabled")); + mInitMap.put(new Pair("func_146185_a", "setEnableBackgroundDrawing")); + mInitMap.put(new Pair("func_146186_n", "getSelectionEnd")); + mInitMap.put(new Pair("func_146187_c", "getNthWordFromCursor")); + mInitMap.put(new Pair("func_146188_c", "drawCursorVertical")); + mInitMap.put(new Pair("func_146189_e", "setVisible")); + mInitMap.put(new Pair("func_146190_e", "setCursorPosition")); + mInitMap.put(new Pair("func_146191_b", "writeText")); + mInitMap.put(new Pair("func_146192_a", "mouseClicked")); + mInitMap.put(new Pair("func_146193_g", "setTextColor")); + mInitMap.put(new Pair("func_146194_f", "drawTextBox")); + mInitMap.put(new Pair("func_146195_b", "setFocused")); + mInitMap.put(new Pair("func_146196_d", "setCursorPositionZero")); + mInitMap.put(new Pair("func_146198_h", "getCursorPosition")); + mInitMap.put(new Pair("func_146199_i", "setSelectionPos")); + mInitMap.put(new Pair("func_146200_o", "getWidth")); + mInitMap.put(new Pair("func_146201_a", "textboxKeyTyped")); + mInitMap.put(new Pair("func_146202_e", "setCursorPositionEnd")); + mInitMap.put(new Pair("func_146203_f", "setMaxStringLength")); + mInitMap.put(new Pair("func_146204_h", "setDisabledTextColour")); + mInitMap.put(new Pair("func_146205_d", "setCanLoseFocus")); + mInitMap.put(new Pair("func_146206_l", "isFocused")); + mInitMap.put(new Pair("func_146207_c", "getSelectedText")); + mInitMap.put(new Pair("func_146208_g", "getMaxStringLength")); + mInitMap.put(new Pair("func_146227_a", "printChatMessage")); + mInitMap.put(new Pair("func_146228_f", "getChatWidth")); + mInitMap.put(new Pair("func_146229_b", "scroll")); + mInitMap.put(new Pair("func_146230_a", "drawChat")); + mInitMap.put(new Pair("func_146231_a", "clearChatMessages")); + mInitMap.put(new Pair("func_146232_i", "getLineCount")); + mInitMap.put(new Pair("func_146233_a", "calculateChatboxWidth")); + mInitMap.put(new Pair("func_146234_a", "printChatMessageWithOptionalDeletion")); + mInitMap.put(new Pair("func_146235_b", "formatColors")); + mInitMap.put(new Pair("func_146236_a", "getChatComponent")); + mInitMap.put(new Pair("func_146237_a", "setChatLine")); + mInitMap.put(new Pair("func_146238_c", "getSentMessages")); + mInitMap.put(new Pair("func_146239_a", "addToSentMessages")); + mInitMap.put(new Pair("func_146240_d", "resetScroll")); + mInitMap.put(new Pair("func_146241_e", "getChatOpen")); + mInitMap.put(new Pair("func_146242_c", "deleteChatLine")); + mInitMap.put(new Pair("func_146243_b", "calculateChatboxHeight")); + mInitMap.put(new Pair("func_146244_h", "getChatScale")); + mInitMap.put(new Pair("func_146245_b", "refreshChat")); + mInitMap.put(new Pair("func_146246_g", "getChatHeight")); + mInitMap.put(new Pair("func_146254_a", "updateAchievementWindow")); + mInitMap.put(new Pair("func_146255_b", "displayUnformattedAchievement")); + mInitMap.put(new Pair("func_146256_a", "displayAchievement")); + mInitMap.put(new Pair("func_146257_b", "clearAchievements")); + mInitMap.put(new Pair("func_146258_c", "updateAchievementWindowScale")); + mInitMap.put(new Pair("func_146269_k", "handleInput")); + mInitMap.put(new Pair("func_146270_b", "drawWorldBackground")); + mInitMap.put(new Pair("func_146271_m", "isCtrlKeyDown")); + mInitMap.put(new Pair("func_146272_n", "isShiftKeyDown")); + mInitMap.put(new Pair("func_146273_a", "mouseClickMove")); + mInitMap.put(new Pair("func_146274_d", "handleMouseInput")); + mInitMap.put(new Pair("func_146275_d", "setClipboardString")); + mInitMap.put(new Pair("func_146276_q_", "drawDefaultBackground")); + mInitMap.put(new Pair("func_146277_j", "getClipboardString")); + mInitMap.put(new Pair("func_146278_c", "drawBackground")); + mInitMap.put(new Pair("func_146279_a", "drawCreativeTabHoveringText")); + mInitMap.put(new Pair("func_146280_a", "setWorldAndResolution")); + mInitMap.put(new Pair("func_146281_b", "onGuiClosed")); + mInitMap.put(new Pair("func_146282_l", "handleKeyboardInput")); + mInitMap.put(new Pair("func_146283_a", "drawHoveringText")); + mInitMap.put(new Pair("func_146284_a", "actionPerformed")); + mInitMap.put(new Pair("func_146285_a", "renderToolTip")); + mInitMap.put(new Pair("func_146286_b", "mouseReleased")); + mInitMap.put(new Pair("func_146350_a", "setButtonDelay")); + mInitMap.put(new Pair("func_146358_g", "disableSecurityWarning")); + mInitMap.put(new Pair("func_146359_e", "copyLinkToClipboard")); + mInitMap.put(new Pair("func_146367_a", "connect")); + mInitMap.put(new Pair("func_146402_a", "getSentHistory")); + mInitMap.put(new Pair("func_146403_a", "submitChatMessage")); + mInitMap.put(new Pair("func_146404_p_", "autocompletePlayerNames")); + mInitMap.put(new Pair("func_146405_a", "sendAutocompleteRequest")); + mInitMap.put(new Pair("func_146406_a", "onAutocompleteResponse")); + mInitMap.put(new Pair("func_146407_a", "openLink")); + mInitMap.put(new Pair("func_146418_g", "wakeFromSleep")); + mInitMap.put(new Pair("func_146456_p", "pageGetCurrent")); + mInitMap.put(new Pair("func_146457_a", "pageSetCurrent")); + mInitMap.put(new Pair("func_146459_b", "pageInsertIntoCurrent")); + mInitMap.put(new Pair("func_146460_c", "keyTypedInTitle")); + mInitMap.put(new Pair("func_146461_i", "addmInitMap.put(newPage")); + mInitMap.put(new Pair("func_146462_a", "sendBookToServer")); + mInitMap.put(new Pair("func_146463_b", "keyTypedInBook")); + mInitMap.put(new Pair("func_146464_h", "updateButtons")); + mInitMap.put(new Pair("func_146504_a", "getSoundVolume")); + mInitMap.put(new Pair("func_146509_g", "doneLoading")); + mInitMap.put(new Pair("func_146521_a", "drawStatsScreen")); + mInitMap.put(new Pair("func_146527_c", "drawSprite")); + mInitMap.put(new Pair("func_146531_b", "drawButtonBackground")); + mInitMap.put(new Pair("func_146541_h", "createButtons")); + mInitMap.put(new Pair("func_146552_b", "drawAchievementScreen")); + mInitMap.put(new Pair("func_146553_h", "drawTitle")); + mInitMap.put(new Pair("func_146574_g", "sendRespawnPacket")); + mInitMap.put(new Pair("func_146575_b", "drawWinGameScreen")); + mInitMap.put(new Pair("func_146586_a", "setDomInitMap.put(neworking")); + mInitMap.put(new Pair("func_146789_i", "getOldServerPinger")); + mInitMap.put(new Pair("func_146790_a", "selectServer")); + mInitMap.put(new Pair("func_146791_a", "connectToServer")); + mInitMap.put(new Pair("func_146792_q", "refreshServerList")); + mInitMap.put(new Pair("func_146794_g", "createButtons")); + mInitMap.put(new Pair("func_146795_p", "getServerList")); + mInitMap.put(new Pair("func_146796_h", "connectToSelected")); + mInitMap.put(new Pair("func_146961_a", "hasResourcePackEntry")); + mInitMap.put(new Pair("func_146975_c", "getSlotAtPosition")); + mInitMap.put(new Pair("func_146976_a", "drawGuiContainerBackgroundLayer")); + mInitMap.put(new Pair("func_146977_a", "drawSlot")); + mInitMap.put(new Pair("func_146978_c", "isPointInRegion")); + mInitMap.put(new Pair("func_146979_b", "drawGuiContainerForegroundLayer")); + mInitMap.put(new Pair("func_146980_g", "updateDragSplitting")); + mInitMap.put(new Pair("func_146981_a", "isMouseOverSlot")); + mInitMap.put(new Pair("func_146982_a", "drawItemStack")); + mInitMap.put(new Pair("func_146983_a", "checkHotbarKeys")); + mInitMap.put(new Pair("func_146984_a", "handleMouseClick")); + mInitMap.put(new Pair("func_147035_g", "getMerchant")); + mInitMap.put(new Pair("func_147044_g", "drawActivePotionEffects")); + mInitMap.put(new Pair("func_147046_a", "drawEntityOnScreen")); + mInitMap.put(new Pair("func_147050_b", "setCurrentCreativeTab")); + mInitMap.put(new Pair("func_147052_b", "renderCreativeInventoryHoveringText")); + mInitMap.put(new Pair("func_147053_i", "updateCreativeSearch")); + mInitMap.put(new Pair("func_147055_p", "needsScrollBars")); + mInitMap.put(new Pair("func_147090_g", "renameItem")); + mInitMap.put(new Pair("func_147095_a", "requestTexturePackLoad")); + mInitMap.put(new Pair("func_147099_x", "getStatFile")); + mInitMap.put(new Pair("func_147104_D", "getCurrentServerData")); + mInitMap.put(new Pair("func_147106_B", "scheduleResourcesRefresh")); + mInitMap.put(new Pair("func_147107_h", "isFramerateLimitBelowMax")); + mInitMap.put(new Pair("func_147108_a", "displayGuiScreen")); + mInitMap.put(new Pair("func_147109_W", "getAmbientMusicType")); + mInitMap.put(new Pair("func_147110_a", "getFramebuffer")); + mInitMap.put(new Pair("func_147111_S", "isJava64bit")); + mInitMap.put(new Pair("func_147112_ai", "middleClickMouse")); + mInitMap.put(new Pair("func_147113_T", "isGamePaused")); + mInitMap.put(new Pair("func_147114_u", "getNetHandler")); + mInitMap.put(new Pair("func_147115_a", "sendClickBlockToController")); + mInitMap.put(new Pair("func_147116_af", "clickMouse")); + mInitMap.put(new Pair("func_147117_R", "getTextureMapBlocks")); + mInitMap.put(new Pair("func_147118_V", "getSoundHandler")); + mInitMap.put(new Pair("func_147119_ah", "updateFramebufferSize")); + mInitMap.put(new Pair("func_147120_f", "resetSize")); + mInitMap.put(new Pair("func_147121_ag", "rightClickMouse")); + mInitMap.put(new Pair("func_147122_X", "isJvm64bit")); + mInitMap.put(new Pair("func_147130_as", "getMinecraftSessionService")); + mInitMap.put(new Pair("func_147132_au", "refreshStatusNextTick")); + mInitMap.put(new Pair("func_147133_T", "getTexturePack")); + mInitMap.put(new Pair("func_147134_at", "getServerStatusResponse")); + mInitMap.put(new Pair("func_147135_j", "getDifficulty")); + mInitMap.put(new Pair("func_147136_ar", "isAnnouncingPlayerAchievements")); + mInitMap.put(new Pair("func_147137_ag", "getNetworkSystem")); + mInitMap.put(new Pair("func_147138_a", "addFaviconToStatusResponse")); + mInitMap.put(new Pair("func_147139_a", "setDifficultyForAllWorlds")); + mInitMap.put(new Pair("func_147149_a", "saveToFile")); + mInitMap.put(new Pair("func_147153_a", "addBlockInfo")); + mInitMap.put(new Pair("func_147155_a", "getCategoryName")); + mInitMap.put(new Pair("func_147156_b", "getCategoryId")); + mInitMap.put(new Pair("func_147176_a", "getChatComponentFromNthArg")); + mInitMap.put(new Pair("func_147177_a", "joinNiceString")); + mInitMap.put(new Pair("func_147178_a", "getChatComponentFromNthArg")); + mInitMap.put(new Pair("func_147179_f", "getItemByText")); + mInitMap.put(new Pair("func_147180_g", "getBlockByText")); + mInitMap.put(new Pair("func_147185_d", "addTeam")); + mInitMap.put(new Pair("func_147186_g", "listTeams")); + mInitMap.put(new Pair("func_147187_n", "resetPlayers")); + mInitMap.put(new Pair("func_147188_j", "emptyTeam")); + mInitMap.put(new Pair("func_147190_h", "joinTeam")); + mInitMap.put(new Pair("func_147191_h", "removeObjective")); + mInitMap.put(new Pair("func_147192_d", "getScoreboard")); + mInitMap.put(new Pair("func_147193_c", "addObjective")); + mInitMap.put(new Pair("func_147194_f", "removeTeam")); + mInitMap.put(new Pair("func_147195_l", "listPlayers")); + mInitMap.put(new Pair("func_147196_d", "listObjectives")); + mInitMap.put(new Pair("func_147197_m", "setPlayer")); + mInitMap.put(new Pair("func_147198_k", "setObjectiveDisplay")); + mInitMap.put(new Pair("func_147199_i", "leaveTeam")); + mInitMap.put(new Pair("func_147200_e", "setTeamOption")); + mInitMap.put(new Pair("func_147215_a", "addBlockDestroyEffects")); + mInitMap.put(new Pair("func_147223_a", "pingPendingNetworks")); + mInitMap.put(new Pair("func_147224_a", "ping")); + mInitMap.put(new Pair("func_147225_b", "tryCompatibilityPing")); + mInitMap.put(new Pair("func_147226_b", "clearPendingNetworks")); + mInitMap.put(new Pair("func_147231_a", "onDisconnect")); + mInitMap.put(new Pair("func_147232_a", "onConnectionStateTransition")); + mInitMap.put(new Pair("func_147233_a", "onNetworkTick")); + mInitMap.put(new Pair("func_147234_a", "handleBlockChange")); + mInitMap.put(new Pair("func_147235_a", "handleSpawnObject")); + mInitMap.put(new Pair("func_147236_a", "handleEntityStatus")); + mInitMap.put(new Pair("func_147237_a", "handleSpawnPlayer")); + mInitMap.put(new Pair("func_147238_a", "handleDestroyEntities")); + mInitMap.put(new Pair("func_147239_a", "handleConfirmTransaction")); + mInitMap.put(new Pair("func_147240_a", "handleCustomPayload")); + mInitMap.put(new Pair("func_147241_a", "handleWindowItems")); + mInitMap.put(new Pair("func_147242_a", "handleEntityEquipment")); + mInitMap.put(new Pair("func_147243_a", "handleEntityAttach")); + mInitMap.put(new Pair("func_147244_a", "handleEntityVelocity")); + mInitMap.put(new Pair("func_147245_a", "handleWindowProperty")); + mInitMap.put(new Pair("func_147246_a", "handleCollectItem")); + mInitMap.put(new Pair("func_147247_a", "handleTeams")); + mInitMap.put(new Pair("func_147248_a", "handleUpdateSign")); + mInitMap.put(new Pair("func_147249_a", "handleUpdateHealth")); + mInitMap.put(new Pair("func_147250_a", "handleUpdateScore")); + mInitMap.put(new Pair("func_147251_a", "handleChat")); + mInitMap.put(new Pair("func_147252_a", "handleChangeGameState")); + mInitMap.put(new Pair("func_147253_a", "handleDisconnect")); + mInitMap.put(new Pair("func_147254_a", "handleDisplayScoreboard")); + mInitMap.put(new Pair("func_147255_a", "handleSoundEffect")); + mInitMap.put(new Pair("func_147256_a", "handlePlayerListItem")); + mInitMap.put(new Pair("func_147257_a", "handleHeldItemChange")); + mInitMap.put(new Pair("func_147258_a", "handlePlayerPosLook")); + mInitMap.put(new Pair("func_147259_a", "handleEntityMovement")); + mInitMap.put(new Pair("func_147260_a", "handleEntityEffect")); + mInitMap.put(new Pair("func_147261_a", "handleBlockAction")); + mInitMap.put(new Pair("func_147262_a", "handleRemoveEntityEffect")); + mInitMap.put(new Pair("func_147263_a", "handleChunkData")); + mInitMap.put(new Pair("func_147264_a", "handleMaps")); + mInitMap.put(new Pair("func_147265_a", "handleOpenWindow")); + mInitMap.put(new Pair("func_147266_a", "handleSetSlot")); + mInitMap.put(new Pair("func_147267_a", "handleEntityHeadLook")); + mInitMap.put(new Pair("func_147268_a", "handleSignEditorOpen")); + mInitMap.put(new Pair("func_147269_a", "handleMapChunkBulk")); + mInitMap.put(new Pair("func_147270_a", "handlePlayerAbilities")); + mInitMap.put(new Pair("func_147271_a", "handleSpawnPosition")); + mInitMap.put(new Pair("func_147272_a", "handleKeepAlive")); + mInitMap.put(new Pair("func_147273_a", "handleUpdateTileEntity")); + mInitMap.put(new Pair("func_147274_a", "handleTabComplete")); + mInitMap.put(new Pair("func_147275_a", "handleEntityTeleport")); + mInitMap.put(new Pair("func_147276_a", "handleCloseWindow")); + mInitMap.put(new Pair("func_147277_a", "handleEffect")); + mInitMap.put(new Pair("func_147278_a", "handleUseBed")); + mInitMap.put(new Pair("func_147279_a", "handleAnimation")); + mInitMap.put(new Pair("func_147280_a", "handleRespawn")); + mInitMap.put(new Pair("func_147281_a", "handleSpawnMob")); + mInitMap.put(new Pair("func_147282_a", "handleJoinGame")); + mInitMap.put(new Pair("func_147283_a", "handleExplosion")); + mInitMap.put(new Pair("func_147284_a", "handleEntityMetadata")); + mInitMap.put(new Pair("func_147285_a", "handleTimeUpdate")); + mInitMap.put(new Pair("func_147286_a", "handleSpawnExperienceOrb")); + mInitMap.put(new Pair("func_147287_a", "handleMultiBlockChange")); + mInitMap.put(new Pair("func_147288_a", "handleSpawnPainting")); + mInitMap.put(new Pair("func_147289_a", "handleParticles")); + mInitMap.put(new Pair("func_147290_a", "handleEntityProperties")); + mInitMap.put(new Pair("func_147291_a", "handleScoreboardObjective")); + mInitMap.put(new Pair("func_147292_a", "handleSpawnGlobalEntity")); + mInitMap.put(new Pair("func_147293_a", "handleStatistics")); + mInitMap.put(new Pair("func_147294_a", "handleBlockBreakAnim")); + mInitMap.put(new Pair("func_147295_a", "handleSetExperience")); + mInitMap.put(new Pair("func_147296_c", "cleanup")); + mInitMap.put(new Pair("func_147297_a", "addToSendQueue")); + mInitMap.put(new Pair("func_147298_b", "getNetworkManager")); + mInitMap.put(new Pair("func_147311_a", "processPing")); + mInitMap.put(new Pair("func_147312_a", "processServerQuery")); + mInitMap.put(new Pair("func_147315_a", "processEncryptionResponse")); + mInitMap.put(new Pair("func_147316_a", "processLoginStart")); + mInitMap.put(new Pair("func_147322_a", "closeConnection")); + mInitMap.put(new Pair("func_147338_a", "processEnchantItem")); + mInitMap.put(new Pair("func_147339_a", "processConfirmTransaction")); + mInitMap.put(new Pair("func_147340_a", "processUseEntity")); + mInitMap.put(new Pair("func_147341_a", "processTabComplete")); + mInitMap.put(new Pair("func_147342_a", "processClientStatus")); + mInitMap.put(new Pair("func_147343_a", "processUpdateSign")); + mInitMap.put(new Pair("func_147344_a", "processCreativeInventoryAction")); + mInitMap.put(new Pair("func_147345_a", "processPlayerDigging")); + mInitMap.put(new Pair("func_147346_a", "processPlayerBlockPlacement")); + mInitMap.put(new Pair("func_147347_a", "processPlayer")); + mInitMap.put(new Pair("func_147348_a", "processPlayerAbilities")); + mInitMap.put(new Pair("func_147349_a", "processVanilla250Packet")); + mInitMap.put(new Pair("func_147350_a", "processAnimation")); + mInitMap.put(new Pair("func_147351_a", "processClickWindow")); + mInitMap.put(new Pair("func_147352_a", "processClientSettings")); + mInitMap.put(new Pair("func_147353_a", "processKeepAlive")); + mInitMap.put(new Pair("func_147354_a", "processChatMessage")); + mInitMap.put(new Pair("func_147355_a", "processHeldItemChange")); + mInitMap.put(new Pair("func_147356_a", "processCloseWindow")); + mInitMap.put(new Pair("func_147357_a", "processEntityAction")); + mInitMap.put(new Pair("func_147358_a", "processInput")); + mInitMap.put(new Pair("func_147359_a", "sendPacket")); + mInitMap.put(new Pair("func_147360_c", "kickPlayerFromServer")); + mInitMap.put(new Pair("func_147361_d", "handleSlashCommand")); + mInitMap.put(new Pair("func_147362_b", "getNetworkManager")); + mInitMap.put(new Pair("func_147363_d", "currentTimeMillis")); + mInitMap.put(new Pair("func_147364_a", "setPlayerLocation")); + mInitMap.put(new Pair("func_147383_a", "processHandshake")); + mInitMap.put(new Pair("func_147388_a", "handleDisconnect")); + mInitMap.put(new Pair("func_147389_a", "handleEncryptionRequest")); + mInitMap.put(new Pair("func_147390_a", "handleLoginSuccess")); + mInitMap.put(new Pair("func_147397_a", "handleServerInfo")); + mInitMap.put(new Pair("func_147398_a", "handlePong")); + mInitMap.put(new Pair("func_147407_a", "setBase64EncodedIconData")); + mInitMap.put(new Pair("func_147409_e", "getBase64EncodedIconData")); + mInitMap.put(new Pair("func_147416_a", "findClosestStructure")); + mInitMap.put(new Pair("func_147422_a", "replaceBlocksForBiome")); + mInitMap.put(new Pair("func_147437_c", "isAirBlock")); + mInitMap.put(new Pair("func_147438_o", "getTileEntity")); + mInitMap.put(new Pair("func_147439_a", "getBlock")); + mInitMap.put(new Pair("func_147440_b", "findClosestStructure")); + mInitMap.put(new Pair("func_147441_b", "notifyBlocksOfNeighborChange")); + mInitMap.put(new Pair("func_147442_i", "setThunderStrength")); + mInitMap.put(new Pair("func_147443_d", "destroyBlockInWorldPartially")); + mInitMap.put(new Pair("func_147444_c", "notifyBlockChange")); + mInitMap.put(new Pair("func_147445_c", "isBlockNormalCubeDefault")); + mInitMap.put(new Pair("func_147447_a", "rayTraceBlocks")); + mInitMap.put(new Pair("func_147449_b", "setBlock")); + mInitMap.put(new Pair("func_147451_t", "updateAllLightTypes")); + mInitMap.put(new Pair("func_147452_c", "addBlockEvent")); + mInitMap.put(new Pair("func_147453_f", "updateNeighborsAboutBlockChange")); + mInitMap.put(new Pair("func_147454_a", "scheduleBlockUpdateWithPriority")); + mInitMap.put(new Pair("func_147455_a", "setTileEntity")); + mInitMap.put(new Pair("func_147457_a", "markTileEntityForRemoval")); + mInitMap.put(new Pair("func_147458_c", "markBlockRangeForRenderUpdate")); + mInitMap.put(new Pair("func_147459_d", "notifyBlocksOfNeighborChange")); + mInitMap.put(new Pair("func_147460_e", "notifyBlockOfNeighborChange")); + mInitMap.put(new Pair("func_147462_b", "getTensionFactorForBlock")); + mInitMap.put(new Pair("func_147463_c", "updateLightByType")); + mInitMap.put(new Pair("func_147464_a", "scheduleBlockUpdate")); + mInitMap.put(new Pair("func_147465_d", "setBlock")); + mInitMap.put(new Pair("func_147466_a", "doesBlockHaveSolidTopSurface")); + mInitMap.put(new Pair("func_147468_f", "setBlockToAir")); + mInitMap.put(new Pair("func_147469_q", "isBlockFullCube")); + mInitMap.put(new Pair("func_147471_g", "markBlockForUpdate")); + mInitMap.put(new Pair("func_147472_a", "canPlaceEntityOnSide")); + mInitMap.put(new Pair("func_147474_b", "getTopBlock")); + mInitMap.put(new Pair("func_147475_p", "removeTileEntity")); + mInitMap.put(new Pair("func_147476_b", "markTileEntityChunkModified")); + mInitMap.put(new Pair("func_147477_a", "isBlockTickScheduledThisTick")); + mInitMap.put(new Pair("func_147478_e", "canSnowAt")); + mInitMap.put(new Pair("func_147479_m", "markBlockForRenderUpdate")); + mInitMap.put(new Pair("func_147480_a", "breakBlock")); + mInitMap.put(new Pair("func_147493_a", "createPlayer")); + mInitMap.put(new Pair("func_147496_a", "onWorldChange")); + mInitMap.put(new Pair("func_147499_a", "bindTexture")); + mInitMap.put(new Pair("func_147500_a", "renderTileEntityAt")); + mInitMap.put(new Pair("func_147542_a", "cacheActiveRenderInfo")); + mInitMap.put(new Pair("func_147544_a", "renderTileEntity")); + mInitMap.put(new Pair("func_147545_a", "hasSpecialRenderer")); + mInitMap.put(new Pair("func_147546_a", "getSpecialRendererByClass")); + mInitMap.put(new Pair("func_147547_b", "getSpecialRenderer")); + mInitMap.put(new Pair("func_147548_a", "getFontRenderer")); + mInitMap.put(new Pair("func_147549_a", "renderTileEntityAt")); + mInitMap.put(new Pair("func_147564_a", "getVertexState")); + mInitMap.put(new Pair("func_147565_a", "setVertexState")); + mInitMap.put(new Pair("func_147570_f", "getHasNormals")); + mInitMap.put(new Pair("func_147571_e", "getHasBrightness")); + mInitMap.put(new Pair("func_147572_a", "getRawBuffer")); + mInitMap.put(new Pair("func_147573_d", "getHasTexture")); + mInitMap.put(new Pair("func_147574_g", "getHasColor")); + mInitMap.put(new Pair("func_147575_c", "getVertexCount")); + mInitMap.put(new Pair("func_147576_b", "getRawBufferIndex")); + mInitMap.put(new Pair("func_147584_b", "onStaticEntitiesChanged")); + mInitMap.put(new Pair("func_147585_a", "markBlockRangeForRenderUpdate")); + mInitMap.put(new Pair("func_147586_a", "markBlockForUpdate")); + mInitMap.put(new Pair("func_147587_b", "destroyBlockPartially")); + mInitMap.put(new Pair("func_147588_b", "markBlockForRenderUpdate")); + mInitMap.put(new Pair("func_147589_a", "renderEntities")); + mInitMap.put(new Pair("func_147590_a", "drawOutlinedBoundingBox")); + mInitMap.put(new Pair("func_147591_f", "rebuildDisplayListEntities")); + mInitMap.put(new Pair("func_147604_a", "setFramebufferColor")); + mInitMap.put(new Pair("func_147605_b", "createFramebuffer")); + mInitMap.put(new Pair("func_147606_d", "unbindFramebufferTexture")); + mInitMap.put(new Pair("func_147607_a", "setFramebufferFilter")); + mInitMap.put(new Pair("func_147608_a", "deleteFramebuffer")); + mInitMap.put(new Pair("func_147609_e", "unbindFramebuffer")); + mInitMap.put(new Pair("func_147610_a", "bindFramebuffer")); + mInitMap.put(new Pair("func_147611_b", "checkFramebufferComplete")); + mInitMap.put(new Pair("func_147612_c", "bindFramebufferTexture")); + mInitMap.put(new Pair("func_147613_a", "createBindFramebuffer")); + mInitMap.put(new Pair("func_147614_f", "framebufferClear")); + mInitMap.put(new Pair("func_147615_c", "framebufferRender")); + mInitMap.put(new Pair("func_147631_c", "deleteGlTexture")); + mInitMap.put(new Pair("func_147632_b", "setAnisotropicFiltering")); + mInitMap.put(new Pair("func_147633_a", "setMipmapLevels")); + mInitMap.put(new Pair("func_147634_a", "completeResourceLocation")); + mInitMap.put(new Pair("func_147640_e", "checkTextureUploaded")); + mInitMap.put(new Pair("func_147641_a", "setBufferedImage")); + mInitMap.put(new Pair("func_147645_c", "deleteTexture")); + mInitMap.put(new Pair("func_147647_b", "bidiReorder")); + mInitMap.put(new Pair("func_147649_g", "getXPosF")); + mInitMap.put(new Pair("func_147650_b", "getSoundLocation")); + mInitMap.put(new Pair("func_147651_i", "getZPosF")); + mInitMap.put(new Pair("func_147652_d", "getRepeatDelay")); + mInitMap.put(new Pair("func_147653_e", "getVolume")); + mInitMap.put(new Pair("func_147654_h", "getYPosF")); + mInitMap.put(new Pair("func_147655_f", "getPitch")); + mInitMap.put(new Pair("func_147656_j", "getAttenuationType")); + mInitMap.put(new Pair("func_147657_c", "canRepeat")); + mInitMap.put(new Pair("func_147667_k", "isDonePlaying")); + mInitMap.put(new Pair("func_147673_a", "createPositionedSoundRecord")); + mInitMap.put(new Pair("func_147674_a", "createPositionedSoundRecord")); + mInitMap.put(new Pair("func_147675_a", "createRecordSoundAtPosition")); + mInitMap.put(new Pair("func_147680_a", "getSound")); + mInitMap.put(new Pair("func_147681_a", "playDelayedSound")); + mInitMap.put(new Pair("func_147682_a", "playSound")); + mInitMap.put(new Pair("func_147683_b", "stopSound")); + mInitMap.put(new Pair("func_147684_a", "setSoundLevel")); + mInitMap.put(new Pair("func_147685_d", "unloadSounds")); + mInitMap.put(new Pair("func_147686_a", "getRandomSoundFromCategories")); + mInitMap.put(new Pair("func_147687_e", "resumeSounds")); + mInitMap.put(new Pair("func_147689_b", "pauseSounds")); + mInitMap.put(new Pair("func_147690_c", "stopSounds")); + mInitMap.put(new Pair("func_147691_a", "setListener")); + mInitMap.put(new Pair("func_147692_c", "isSoundPlaying")); + mInitMap.put(new Pair("func_147693_a", "loadSoundResource")); + mInitMap.put(new Pair("func_147701_i", "getMapItemRenderer")); + mInitMap.put(new Pair("func_147702_a", "isShaderActive")); + mInitMap.put(new Pair("func_147703_b", "deactivateShader")); + mInitMap.put(new Pair("func_147704_a", "updateShaderGroupSize")); + mInitMap.put(new Pair("func_147705_c", "activateNextShader")); + mInitMap.put(new Pair("func_147706_e", "getShaderGroup")); + mInitMap.put(new Pair("func_147715_a", "renderChest")); + mInitMap.put(new Pair("func_147721_p", "renderBlockLiquid")); + mInitMap.put(new Pair("func_147722_a", "renderBlockStairs")); + mInitMap.put(new Pair("func_147723_f", "renderBlockTripWireSource")); + mInitMap.put(new Pair("func_147724_m", "renderBlockStem")); + mInitMap.put(new Pair("func_147725_a", "renderBlockAnvil")); + mInitMap.put(new Pair("func_147726_j", "renderBlockVine")); + mInitMap.put(new Pair("func_147727_a", "mixAoBrightness")); + mInitMap.put(new Pair("func_147728_a", "renderBlockAnvilOrient")); + mInitMap.put(new Pair("func_147729_a", "getLiquidHeight")); + mInitMap.put(new Pair("func_147730_a", "renderBlockStemSmall")); + mInitMap.put(new Pair("func_147731_b", "renderPistonBase")); + mInitMap.put(new Pair("func_147732_a", "renderBlockRedstoneDiodeMetadata")); + mInitMap.put(new Pair("func_147733_k", "renderBlockStainedGlassPane")); + mInitMap.put(new Pair("func_147734_d", "renderFaceZPos")); + mInitMap.put(new Pair("func_147735_a", "renderBlockFence")); + mInitMap.put(new Pair("func_147736_d", "renderStandardBlockWithColorMultiplier")); + mInitMap.put(new Pair("func_147737_a", "renderBlockAnvilRotate")); + mInitMap.put(new Pair("func_147738_c", "renderPistonRodEW")); + mInitMap.put(new Pair("func_147739_a", "renderItemIn3d")); + mInitMap.put(new Pair("func_147740_a", "renderBlockStemBig")); + mInitMap.put(new Pair("func_147741_a", "renderBlockBrewingStand")); + mInitMap.put(new Pair("func_147742_r", "renderBlockLog")); + mInitMap.put(new Pair("func_147743_a", "renderBlockEndPortalFrame")); + mInitMap.put(new Pair("func_147744_b", "hasOverrideBlockTexture")); + mInitMap.put(new Pair("func_147745_b", "getBlockIcon")); + mInitMap.put(new Pair("func_147746_l", "renderCrossedSquares")); + mInitMap.put(new Pair("func_147747_a", "renderTorchAtAngle")); + mInitMap.put(new Pair("func_147748_a", "renderBlockRedstoneDiode")); + mInitMap.put(new Pair("func_147749_a", "renderBlockSandFalling")); + mInitMap.put(new Pair("func_147750_a", "renderPistonExtensionAllFaces")); + mInitMap.put(new Pair("func_147751_a", "renderStandardBlockWithAmbientOcclusion")); + mInitMap.put(new Pair("func_147752_a", "renderBlockFlowerpot")); + mInitMap.put(new Pair("func_147753_b", "setRenderAllFaces")); + mInitMap.put(new Pair("func_147754_e", "renderBlockCactusImpl")); + mInitMap.put(new Pair("func_147755_t", "renderBlockCactus")); + mInitMap.put(new Pair("func_147756_g", "renderBlockTripWire")); + mInitMap.put(new Pair("func_147757_a", "setOverrideBlockTexture")); + mInitMap.put(new Pair("func_147758_b", "getIconSafe")); + mInitMap.put(new Pair("func_147759_a", "renderBlockRepeater")); + mInitMap.put(new Pair("func_147760_u", "renderBlockDoor")); + mInitMap.put(new Pair("func_147761_c", "renderFaceZNeg")); + mInitMap.put(new Pair("func_147762_c", "unlockBlockBounds")); + mInitMap.put(new Pair("func_147763_a", "renderPistonRodUD")); + mInitMap.put(new Pair("func_147764_f", "renderFaceXPos")); + mInitMap.put(new Pair("func_147765_a", "drawCrossedSquares")); + mInitMap.put(new Pair("func_147766_a", "renderBlockMinecartTrack")); + mInitMap.put(new Pair("func_147767_a", "renderBlockPane")); + mInitMap.put(new Pair("func_147768_a", "renderFaceYNeg")); + mInitMap.put(new Pair("func_147769_a", "renderBlockAllFaces")); + mInitMap.put(new Pair("func_147770_b", "overrideBlockBounds")); + mInitMap.put(new Pair("func_147771_a", "clearOverrideBlockTexture")); + mInitMap.put(new Pair("func_147772_a", "renderBlockCocoa")); + mInitMap.put(new Pair("func_147773_v", "renderBlockBed")); + mInitMap.put(new Pair("func_147774_a", "renderBlockDoublePlant")); + mInitMap.put(new Pair("func_147775_a", "setRenderBoundsFromBlock")); + mInitMap.put(new Pair("func_147776_a", "renderBlockFenceGate")); + mInitMap.put(new Pair("func_147777_a", "getBlockIconFromSide")); + mInitMap.put(new Pair("func_147778_a", "getAoBrightness")); + mInitMap.put(new Pair("func_147779_s", "renderBlockQuartz")); + mInitMap.put(new Pair("func_147780_a", "renderBlockAnvilMetadata")); + mInitMap.put(new Pair("func_147781_a", "renderBlockRedstoneComparator")); + mInitMap.put(new Pair("func_147782_a", "setRenderBounds")); + mInitMap.put(new Pair("func_147783_o", "renderBlockLilyPad")); + mInitMap.put(new Pair("func_147784_q", "renderStandardBlock")); + mInitMap.put(new Pair("func_147785_a", "renderBlockCauldron")); + mInitMap.put(new Pair("func_147786_a", "setRenderFromInside")); + mInitMap.put(new Pair("func_147787_a", "getBlockIconFromSideAndMetadata")); + mInitMap.put(new Pair("func_147788_h", "renderBlockRedstomInitMap.put(newire")); + mInitMap.put(new Pair("func_147789_b", "renderPistonRodSN")); + mInitMap.put(new Pair("func_147790_e", "renderBlockLever")); + mInitMap.put(new Pair("func_147791_c", "renderBlockTorch")); + mInitMap.put(new Pair("func_147792_a", "renderBlockUsingTexture")); + mInitMap.put(new Pair("func_147793_a", "getBlockIcon")); + mInitMap.put(new Pair("func_147794_i", "renderBlockLadder")); + mInitMap.put(new Pair("func_147795_a", "renderBlockCropsImpl")); + mInitMap.put(new Pair("func_147796_n", "renderBlockCrops")); + mInitMap.put(new Pair("func_147797_a", "renderBlockBeacon")); + mInitMap.put(new Pair("func_147798_e", "renderFaceXNeg")); + mInitMap.put(new Pair("func_147799_a", "renderBlockHopperMetadata")); + mInitMap.put(new Pair("func_147800_a", "renderBlockAsItem")); + mInitMap.put(new Pair("func_147801_a", "renderBlockFire")); + mInitMap.put(new Pair("func_147802_a", "renderBlockDragonEgg")); + mInitMap.put(new Pair("func_147803_a", "renderBlockHopper")); + mInitMap.put(new Pair("func_147804_d", "renderPistonBaseAllFaces")); + mInitMap.put(new Pair("func_147805_b", "renderBlockByRenderType")); + mInitMap.put(new Pair("func_147806_b", "renderFaceYPos")); + mInitMap.put(new Pair("func_147807_a", "renderBlockWall")); + mInitMap.put(new Pair("func_147808_b", "renderStandardBlockWithAmbientOcclusionPartial")); + mInitMap.put(new Pair("func_147809_c", "renderPistonExtension")); + mInitMap.put(new Pair("func_147889_b", "updateRendererSort")); + mInitMap.put(new Pair("func_147890_b", "preRenderBlocks")); + mInitMap.put(new Pair("func_147891_a", "postRenderBlocks")); + mInitMap.put(new Pair("func_147892_a", "updateRenderer")); + mInitMap.put(new Pair("func_147905_a", "isStaticEntity")); + mInitMap.put(new Pair("func_147906_a", "renderLivingLabel")); + mInitMap.put(new Pair("func_147936_a", "renderEntityStatic")); + mInitMap.put(new Pair("func_147937_a", "renderEntitySimple")); + mInitMap.put(new Pair("func_147938_a", "cacheActiveRenderInfo")); + mInitMap.put(new Pair("func_147939_a", "doRenderEntity")); + mInitMap.put(new Pair("func_147940_a", "renderEntityWithPosYaw")); + mInitMap.put(new Pair("func_147942_a", "deleteTexture")); + mInitMap.put(new Pair("func_147946_a", "allocateTextureImpl")); + mInitMap.put(new Pair("func_147947_a", "uploadTextureSub")); + mInitMap.put(new Pair("func_147948_a", "prepareAnisotropicData")); + mInitMap.put(new Pair("func_147949_a", "generateMipmapData")); + } + + private static void init2() { + mInitMap.put(new Pair("func_147951_b", "setTextureBlurred")); + mInitMap.put(new Pair("func_147955_a", "uploadTextureMipmap")); + mInitMap.put(new Pair("func_147960_a", "prepareAnisotropicFiltering")); + mInitMap.put(new Pair("func_147961_a", "fixTransparentPixels")); + mInitMap.put(new Pair("func_147962_a", "getFrameTextureData")); + mInitMap.put(new Pair("func_147963_d", "generateMipmaps")); + mInitMap.put(new Pair("func_147964_a", "loadSprite")); + mInitMap.put(new Pair("func_147965_a", "getFrameTextureData")); + mInitMap.put(new Pair("func_147969_b", "getMipmapDimension")); + mInitMap.put(new Pair("func_147984_b", "getShaderUniformOrDefault")); + mInitMap.put(new Pair("func_147985_d", "markDirty")); + mInitMap.put(new Pair("func_147986_h", "getProgram")); + mInitMap.put(new Pair("func_147987_b", "parseUniform")); + mInitMap.put(new Pair("func_147988_a", "deleteShader")); + mInitMap.put(new Pair("func_147989_e", "getVertexShaderLoader")); + mInitMap.put(new Pair("func_147990_i", "setupUniforms")); + mInitMap.put(new Pair("func_147991_a", "getShaderUniform")); + mInitMap.put(new Pair("func_147992_a", "addSamplerTexture")); + mInitMap.put(new Pair("func_147993_b", "endShader")); + mInitMap.put(new Pair("func_147994_f", "getFragmentShaderLoader")); + mInitMap.put(new Pair("func_147995_c", "useShader")); + mInitMap.put(new Pair("func_147996_a", "parseSampler")); + mInitMap.put(new Pair("func_148017_a", "getFramebuffer")); + mInitMap.put(new Pair("func_148018_a", "loadShaderGroup")); + mInitMap.put(new Pair("func_148020_a", "addFramebuffer")); + mInitMap.put(new Pair("func_148021_a", "deleteShaderGroup")); + mInitMap.put(new Pair("func_148022_b", "getShaderGroupName")); + mInitMap.put(new Pair("func_148023_a", "addShader")); + mInitMap.put(new Pair("func_148024_c", "resetProjectionMatrix")); + mInitMap.put(new Pair("func_148026_a", "createBindFramebuffers")); + mInitMap.put(new Pair("func_148027_a", "initTarget")); + mInitMap.put(new Pair("func_148028_c", "initUniform")); + mInitMap.put(new Pair("func_148040_d", "preLoadShader")); + mInitMap.put(new Pair("func_148041_a", "addAuxFramebuffer")); + mInitMap.put(new Pair("func_148042_a", "loadShader")); + mInitMap.put(new Pair("func_148043_c", "getShaderManager")); + mInitMap.put(new Pair("func_148044_b", "deleteShader")); + mInitMap.put(new Pair("func_148045_a", "setProjectionMatrix")); + mInitMap.put(new Pair("func_148054_b", "deleteShader")); + mInitMap.put(new Pair("func_148055_a", "getShaderFilename")); + mInitMap.put(new Pair("func_148056_a", "attachShader")); + mInitMap.put(new Pair("func_148057_a", "loadShader")); + mInitMap.put(new Pair("func_148062_a", "getShaderName")); + mInitMap.put(new Pair("func_148063_b", "getShaderExtension")); + mInitMap.put(new Pair("func_148064_d", "getLoadedShaders")); + mInitMap.put(new Pair("func_148065_c", "getShaderMode")); + mInitMap.put(new Pair("func_148074_b", "getStaticShaderLinkHelper")); + mInitMap.put(new Pair("func_148075_b", "linkProgram")); + mInitMap.put(new Pair("func_148076_a", "setmInitMap.put(newStaticShaderLinkHelper")); + mInitMap.put(new Pair("func_148077_a", "deleteShader")); + mInitMap.put(new Pair("func_148078_c", "createProgram")); + mInitMap.put(new Pair("func_148081_a", "set")); + mInitMap.put(new Pair("func_148082_k", "uploadFloatMatrix")); + mInitMap.put(new Pair("func_148083_a", "set")); + mInitMap.put(new Pair("func_148084_b", "setUniformLocation")); + mInitMap.put(new Pair("func_148085_a", "parseType")); + mInitMap.put(new Pair("func_148086_a", "getShaderName")); + mInitMap.put(new Pair("func_148087_a", "set")); + mInitMap.put(new Pair("func_148088_a", "set")); + mInitMap.put(new Pair("func_148089_j", "uploadFloat")); + mInitMap.put(new Pair("func_148090_a", "set")); + mInitMap.put(new Pair("func_148091_i", "uploadInt")); + mInitMap.put(new Pair("func_148093_b", "upload")); + mInitMap.put(new Pair("func_148094_a", "set")); + mInitMap.put(new Pair("func_148095_a", "set")); + mInitMap.put(new Pair("func_148096_h", "markDirty")); + mInitMap.put(new Pair("func_148097_a", "set")); + mInitMap.put(new Pair("func_148120_b", "drawSelectionBox")); + mInitMap.put(new Pair("func_148121_k", "bindAmountScrolled")); + mInitMap.put(new Pair("func_148122_a", "setDimensions")); + mInitMap.put(new Pair("func_148123_a", "drawBackground")); + mInitMap.put(new Pair("func_148124_c", "getSlotIndexFromScreenCoords")); + mInitMap.put(new Pair("func_148125_i", "getEnabled")); + mInitMap.put(new Pair("func_148126_a", "drawSlot")); + mInitMap.put(new Pair("func_148127_b", "getSize")); + mInitMap.put(new Pair("func_148128_a", "drawScreen")); + mInitMap.put(new Pair("func_148129_a", "drawListHeader")); + mInitMap.put(new Pair("func_148130_a", "setShowSelectionBox")); + mInitMap.put(new Pair("func_148131_a", "isSelected")); + mInitMap.put(new Pair("func_148133_a", "setHasListHeader")); + mInitMap.put(new Pair("func_148134_d", "registerScrollButtons")); + mInitMap.put(new Pair("func_148136_c", "overlayBackground")); + mInitMap.put(new Pair("func_148137_d", "getScrollBarX")); + mInitMap.put(new Pair("func_148138_e", "getContentHeight")); + mInitMap.put(new Pair("func_148139_c", "getListWidth")); + mInitMap.put(new Pair("func_148140_g", "setSlotXBoundsFromLeft")); + mInitMap.put(new Pair("func_148141_e", "isMouseYWithinSlotBounds")); + mInitMap.put(new Pair("func_148143_b", "setEnabled")); + mInitMap.put(new Pair("func_148144_a", "elementClicked")); + mInitMap.put(new Pair("func_148145_f", "scrollBy")); + mInitMap.put(new Pair("func_148146_j", "getSlotHeight")); + mInitMap.put(new Pair("func_148147_a", "actionPerformed")); + mInitMap.put(new Pair("func_148148_g", "getAmountScrolled")); + mInitMap.put(new Pair("func_148180_b", "getListEntry")); + mInitMap.put(new Pair("func_148201_l", "getList")); + mInitMap.put(new Pair("func_148202_k", "getListHeader")); + mInitMap.put(new Pair("func_148254_d", "getToken")); + mInitMap.put(new Pair("func_148255_b", "getPlayerID")); + mInitMap.put(new Pair("func_148256_e", "getProfile")); + mInitMap.put(new Pair("func_148259_a", "saveScreenshot")); + mInitMap.put(new Pair("func_148260_a", "saveScreenshot")); + mInitMap.put(new Pair("func_148262_d", "denormalizeValue")); + mInitMap.put(new Pair("func_148263_a", "setValueMax")); + mInitMap.put(new Pair("func_148264_f", "snapToStep")); + mInitMap.put(new Pair("func_148266_c", "normalizeValue")); + mInitMap.put(new Pair("func_148267_f", "getValueMax")); + mInitMap.put(new Pair("func_148268_e", "snapToStepClamp")); + mInitMap.put(new Pair("func_148277_b", "mouseReleased")); + mInitMap.put(new Pair("func_148278_a", "mousePressed")); + mInitMap.put(new Pair("func_148279_a", "drawEntry")); + mInitMap.put(new Pair("func_148289_a", "getLanServer")); + mInitMap.put(new Pair("func_148296_a", "getServerData")); + mInitMap.put(new Pair("func_148297_b", "prepareServerIcon")); + mInitMap.put(new Pair("func_148329_a", "scrollTo")); + mInitMap.put(new Pair("func_148334_a", "generatemInitMap.put(newRandomName")); + mInitMap.put(new Pair("func_148335_a", "reseedRandomGenerator")); + mInitMap.put(new Pair("func_148522_a", "onDownloadComplete")); + mInitMap.put(new Pair("func_148526_a", "obtainResourcePack")); + mInitMap.put(new Pair("func_148530_e", "getResourcePackInstance")); + mInitMap.put(new Pair("func_148535_c", "getListMipmaps")); + mInitMap.put(new Pair("func_148537_a", "sendPacketToAllPlayersInDimension")); + mInitMap.put(new Pair("func_148539_a", "sendChatMsg")); + mInitMap.put(new Pair("func_148540_a", "sendPacketToAllPlayers")); + mInitMap.put(new Pair("func_148541_a", "sendToAllNear")); + mInitMap.put(new Pair("func_148542_a", "allowUserToConnect")); + mInitMap.put(new Pair("func_148543_a", "sendToAllNearExcept")); + mInitMap.put(new Pair("func_148544_a", "sendChatMsgImpl")); + mInitMap.put(new Pair("func_148545_a", "createPlayerForUser")); + mInitMap.put(new Pair("func_148552_f", "isStreaming")); + mInitMap.put(new Pair("func_148553_a", "setSoundEntryVolume")); + mInitMap.put(new Pair("func_148554_a", "setSoundEntryWeight")); + mInitMap.put(new Pair("func_148555_d", "getSoundEntryWeight")); + mInitMap.put(new Pair("func_148556_a", "getSoundEntryName")); + mInitMap.put(new Pair("func_148557_a", "setStreaming")); + mInitMap.put(new Pair("func_148558_b", "getSoundEntryVolume")); + mInitMap.put(new Pair("func_148559_b", "setSoundEntryPitch")); + mInitMap.put(new Pair("func_148560_c", "getSoundEntryPitch")); + mInitMap.put(new Pair("func_148561_a", "setSoundEntryName")); + mInitMap.put(new Pair("func_148562_a", "setSoundEntryType")); + mInitMap.put(new Pair("func_148563_e", "getSoundEntryType")); + mInitMap.put(new Pair("func_148570_a", "getSoundList")); + mInitMap.put(new Pair("func_148571_a", "setSoundCategory")); + mInitMap.put(new Pair("func_148572_a", "setReplaceExisting")); + mInitMap.put(new Pair("func_148573_c", "getSoundCategory")); + mInitMap.put(new Pair("func_148574_b", "canReplaceExisting")); + mInitMap.put(new Pair("func_148580_a", "getType")); + mInitMap.put(new Pair("func_148586_a", "getTypeInt")); + mInitMap.put(new Pair("func_148594_a", "getNormalizedVolume")); + mInitMap.put(new Pair("func_148595_a", "getSoundCategoryVolume")); + mInitMap.put(new Pair("func_148596_a", "reloadSoundSystem")); + mInitMap.put(new Pair("func_148597_a", "isSoundPlaying")); + mInitMap.put(new Pair("func_148599_a", "playDelayedSound")); + mInitMap.put(new Pair("func_148601_a", "setSoundCategoryVolume")); + mInitMap.put(new Pair("func_148602_b", "stopSound")); + mInitMap.put(new Pair("func_148604_f", "resumeAllSounds")); + mInitMap.put(new Pair("func_148605_d", "updateAllSounds")); + mInitMap.put(new Pair("func_148606_a", "getNormalizedPitch")); + mInitMap.put(new Pair("func_148608_i", "loadSoundSystem")); + mInitMap.put(new Pair("func_148610_e", "pauseAllSounds")); + mInitMap.put(new Pair("func_148611_c", "playSound")); + mInitMap.put(new Pair("func_148612_a", "getURLForSoundResource")); + mInitMap.put(new Pair("func_148613_b", "unloadSoundSystem")); + mInitMap.put(new Pair("func_148614_c", "stopAllSounds")); + mInitMap.put(new Pair("func_148615_a", "setListener")); + mInitMap.put(new Pair("func_148633_c", "getMaxDelay")); + mInitMap.put(new Pair("func_148634_b", "getMinDelay")); + mInitMap.put(new Pair("func_148635_a", "getMusicTickerLocation")); + mInitMap.put(new Pair("func_148647_b", "setVolume")); + mInitMap.put(new Pair("func_148648_d", "isStreamingSound")); + mInitMap.put(new Pair("func_148649_c", "getVolume")); + mInitMap.put(new Pair("func_148650_b", "getPitch")); + mInitMap.put(new Pair("func_148651_a", "setPitch")); + mInitMap.put(new Pair("func_148652_a", "getSoundPoolEntryLocation")); + mInitMap.put(new Pair("func_148727_a", "addSoundToEventPool")); + mInitMap.put(new Pair("func_148728_d", "getSoundCategory")); + mInitMap.put(new Pair("func_148729_c", "getSoundEventLocation")); + mInitMap.put(new Pair("func_148740_a", "createUnderlyingMap")); + mInitMap.put(new Pair("func_148741_d", "containsKey")); + mInitMap.put(new Pair("func_148742_b", "getKeys")); + mInitMap.put(new Pair("func_148750_c", "getNameForObject")); + mInitMap.put(new Pair("func_148753_b", "containsId")); + mInitMap.put(new Pair("func_148754_a", "getObjectById")); + mInitMap.put(new Pair("func_148755_c", "ensureNamespaced")); + mInitMap.put(new Pair("func_148756_a", "addObject")); + mInitMap.put(new Pair("func_148757_b", "getIDForObject")); + mInitMap.put(new Pair("func_148762_a", "registerSound")); + mInitMap.put(new Pair("func_148763_c", "clearMap")); + mInitMap.put(new Pair("func_148821_a", "glBlendFunc")); + mInitMap.put(new Pair("func_148822_b", "isFramebufferEnabled")); + mInitMap.put(new Pair("func_148833_a", "processPacket")); + mInitMap.put(new Pair("func_148834_a", "readBlob")); + mInitMap.put(new Pair("func_148835_b", "serialize")); + mInitMap.put(new Pair("func_148836_a", "hasPriority")); + mInitMap.put(new Pair("func_148837_a", "readPacketData")); + mInitMap.put(new Pair("func_148838_a", "writeBlob")); + mInitMap.put(new Pair("func_148839_a", "generatePacket")); + mInitMap.put(new Pair("func_148840_b", "writePacketData")); + mInitMap.put(new Pair("func_148853_f", "getTileEntityType")); + mInitMap.put(new Pair("func_148854_e", "getZ")); + mInitMap.put(new Pair("func_148855_d", "getY")); + mInitMap.put(new Pair("func_148856_c", "getX")); + mInitMap.put(new Pair("func_148857_g", "getNbtCompound")); + mInitMap.put(new Pair("func_148864_h", "getData2")); + mInitMap.put(new Pair("func_148865_f", "getZ")); + mInitMap.put(new Pair("func_148866_e", "getY")); + mInitMap.put(new Pair("func_148867_d", "getX")); + mInitMap.put(new Pair("func_148868_c", "getBlockType")); + mInitMap.put(new Pair("func_148869_g", "getData1")); + mInitMap.put(new Pair("func_148916_d", "isChat")); + mInitMap.put(new Pair("func_149089_e", "getZ")); + mInitMap.put(new Pair("func_149090_d", "getY")); + mInitMap.put(new Pair("func_149091_a", "getPlayer")); + mInitMap.put(new Pair("func_149092_c", "getX")); + mInitMap.put(new Pair("func_149101_g", "getFlySpeed")); + mInitMap.put(new Pair("func_149102_b", "setFlying")); + mInitMap.put(new Pair("func_149103_f", "isCreativeMode")); + mInitMap.put(new Pair("func_149104_a", "setFlySpeed")); + mInitMap.put(new Pair("func_149105_e", "isAllowFlying")); + mInitMap.put(new Pair("func_149106_d", "isFlying")); + mInitMap.put(new Pair("func_149107_h", "getWalkSpeed")); + mInitMap.put(new Pair("func_149108_a", "setInvulnerable")); + mInitMap.put(new Pair("func_149109_c", "setAllowFlying")); + mInitMap.put(new Pair("func_149110_b", "setWalkSpeed")); + mInitMap.put(new Pair("func_149111_d", "setCreativeMode")); + mInitMap.put(new Pair("func_149112_c", "isInvulnerable")); + mInitMap.put(new Pair("func_149187_d", "getData")); + mInitMap.put(new Pair("func_149188_c", "getMapId")); + mInitMap.put(new Pair("func_149239_h", "getPosZ")); + mInitMap.put(new Pair("func_149240_f", "getPosX")); + mInitMap.put(new Pair("func_149241_e", "getSoundData")); + mInitMap.put(new Pair("func_149242_d", "getSoundType")); + mInitMap.put(new Pair("func_149243_g", "getPosY")); + mInitMap.put(new Pair("func_149244_c", "isSoundServerwide")); + mInitMap.put(new Pair("func_149289_c", "getClientTime")); + mInitMap.put(new Pair("func_149304_c", "getProfile")); + mInitMap.put(new Pair("func_149330_d", "getFoodLevel")); + mInitMap.put(new Pair("func_149331_e", "getSaturationLevel")); + mInitMap.put(new Pair("func_149332_c", "getHealth")); + mInitMap.put(new Pair("func_149419_c", "getMessage")); + mInitMap.put(new Pair("func_149421_d", "getType")); + mInitMap.put(new Pair("func_149435_c", "getStatus")); + mInitMap.put(new Pair("func_149439_c", "getMessage")); + mInitMap.put(new Pair("func_149460_c", "getKey")); + mInitMap.put(new Pair("func_149462_g", "getYaw")); + mInitMap.put(new Pair("func_149463_k", "getRotating")); + mInitMap.put(new Pair("func_149464_c", "getPositionX")); + mInitMap.put(new Pair("func_149467_d", "getPositionY")); + mInitMap.put(new Pair("func_149470_h", "getPitch")); + mInitMap.put(new Pair("func_149471_f", "getStance")); + mInitMap.put(new Pair("func_149472_e", "getPositionZ")); + mInitMap.put(new Pair("func_149482_g", "getFlySpeed")); + mInitMap.put(new Pair("func_149483_b", "setFlying")); + mInitMap.put(new Pair("func_149484_f", "isCreativeMode")); + mInitMap.put(new Pair("func_149485_a", "setFlySpeed")); + mInitMap.put(new Pair("func_149486_e", "isAllowFlying")); + mInitMap.put(new Pair("func_149488_d", "isFlying")); + mInitMap.put(new Pair("func_149489_h", "getWalkSpeed")); + mInitMap.put(new Pair("func_149490_a", "setInvulnerable")); + mInitMap.put(new Pair("func_149491_c", "setAllowFlying")); + mInitMap.put(new Pair("func_149492_b", "setWalkSpeed")); + mInitMap.put(new Pair("func_149493_d", "setCreativeMode")); + mInitMap.put(new Pair("func_149494_c", "isInvulnerable")); + mInitMap.put(new Pair("func_149501_f", "getDiggingBlockFace")); + mInitMap.put(new Pair("func_149502_e", "getDiggedBlockZ")); + mInitMap.put(new Pair("func_149503_d", "getDiggedBlockY")); + mInitMap.put(new Pair("func_149505_c", "getDiggedBlockX")); + mInitMap.put(new Pair("func_149506_g", "getDiggedBlockStatus")); + mInitMap.put(new Pair("func_149518_g", "getDifficulty")); + mInitMap.put(new Pair("func_149519_h", "isShowCape")); + mInitMap.put(new Pair("func_149520_f", "isColorsEnabled")); + mInitMap.put(new Pair("func_149521_d", "getView")); + mInitMap.put(new Pair("func_149523_e", "getChatVisibility")); + mInitMap.put(new Pair("func_149524_c", "getLang")); + mInitMap.put(new Pair("func_149532_c", "getId")); + mInitMap.put(new Pair("func_149533_d", "getUid")); + mInitMap.put(new Pair("func_149537_d", "getButton")); + mInitMap.put(new Pair("func_149539_c", "getId")); + mInitMap.put(new Pair("func_149542_h", "getMode")); + mInitMap.put(new Pair("func_149543_e", "getUsedButton")); + mInitMap.put(new Pair("func_149544_d", "getSlotId")); + mInitMap.put(new Pair("func_149546_g", "getClickedItem")); + mInitMap.put(new Pair("func_149547_f", "getActionNumber")); + mInitMap.put(new Pair("func_149548_c", "getWindowId")); + mInitMap.put(new Pair("func_149558_e", "getData")); + mInitMap.put(new Pair("func_149559_c", "getChannel")); + mInitMap.put(new Pair("func_149564_a", "getEntityFromWorld")); + mInitMap.put(new Pair("func_149565_c", "getAction")); + mInitMap.put(new Pair("func_149568_f", "getPlacedBlockDirection")); + mInitMap.put(new Pair("func_149569_i", "getPlacedBlockOffsetY")); + mInitMap.put(new Pair("func_149570_e", "getPlacedBlockZ")); + mInitMap.put(new Pair("func_149571_d", "getPlacedBlockY")); + mInitMap.put(new Pair("func_149573_h", "getPlacedBlockOffsetX")); + mInitMap.put(new Pair("func_149574_g", "getStack")); + mInitMap.put(new Pair("func_149575_j", "getPlacedBlockOffsetZ")); + mInitMap.put(new Pair("func_149576_c", "getPlacedBlockX")); + mInitMap.put(new Pair("func_149585_e", "getZ")); + mInitMap.put(new Pair("func_149586_d", "getY")); + mInitMap.put(new Pair("func_149588_c", "getX")); + mInitMap.put(new Pair("func_149589_f", "getLines")); + mInitMap.put(new Pair("func_149594_c", "getRequestedState")); + mInitMap.put(new Pair("func_149595_d", "getProtocolVersion")); + mInitMap.put(new Pair("func_149614_c", "getSlotId")); + mInitMap.put(new Pair("func_149616_d", "getForwardSpeed")); + mInitMap.put(new Pair("func_149617_f", "isSneaking")); + mInitMap.put(new Pair("func_149618_e", "isJumping")); + mInitMap.put(new Pair("func_149620_c", "getStrafeSpeed")); + mInitMap.put(new Pair("func_149625_d", "getStack")); + mInitMap.put(new Pair("func_149627_c", "getSlotId")); + mInitMap.put(new Pair("func_149633_g", "getSelectedBoundingBoxFromPool")); + mInitMap.put(new Pair("func_149634_a", "getBlockFromItem")); + mInitMap.put(new Pair("func_149635_D", "getBlockColor")); + mInitMap.put(new Pair("func_149636_a", "harvestBlock")); + mInitMap.put(new Pair("func_149637_q", "isBlockNormalCube")); + mInitMap.put(new Pair("func_149638_a", "getExplosionResistance")); + mInitMap.put(new Pair("func_149639_l", "fillWithRain")); + mInitMap.put(new Pair("func_149640_a", "modifyEntityVelocity")); + mInitMap.put(new Pair("func_149641_N", "getTextureName")); + mInitMap.put(new Pair("func_149642_a", "dropBlockAsItem")); + mInitMap.put(new Pair("func_149643_k", "getDamageValue")); + mInitMap.put(new Pair("func_149644_j", "createStackedBlock")); + mInitMap.put(new Pair("func_149645_b", "getRenderType")); + mInitMap.put(new Pair("func_149646_a", "shouldSideBeRendered")); + mInitMap.put(new Pair("func_149647_a", "setCreativeTab")); + mInitMap.put(new Pair("func_149648_K", "isFlowerPot")); + mInitMap.put(new Pair("func_149649_H", "disableStats")); + mInitMap.put(new Pair("func_149650_a", "getItemDropped")); + mInitMap.put(new Pair("func_149651_a", "registerIcons")); + mInitMap.put(new Pair("func_149652_G", "getEnableStats")); + mInitMap.put(new Pair("func_149653_t", "getTickRandomly")); + mInitMap.put(new Pair("func_149654_a", "isVecInsideYZBounds")); + mInitMap.put(new Pair("func_149655_b", "isPassable")); + mInitMap.put(new Pair("func_149656_h", "getMobilityFlag")); + mInitMap.put(new Pair("func_149657_c", "dropXpOnBlockBreak")); + mInitMap.put(new Pair("func_149658_d", "setTextureName")); + mInitMap.put(new Pair("func_149659_a", "canDropFromExplosion")); + mInitMap.put(new Pair("func_149660_a", "onBlockPlaced")); + mInitMap.put(new Pair("func_149661_c", "isVecInsideXYBounds")); + mInitMap.put(new Pair("func_149662_c", "isOpaqueCube")); + mInitMap.put(new Pair("func_149663_c", "setUnlocalizedName")); + mInitMap.put(new Pair("func_149664_b", "onBlockDestroyedByPlayer")); + mInitMap.put(new Pair("func_149665_z", "getBlockBoundsMinY")); + mInitMap.put(new Pair("func_149666_a", "getSubBlocks")); + mInitMap.put(new Pair("func_149667_c", "isAssociatedBlock")); + mInitMap.put(new Pair("func_149668_a", "getCollisionBoundingBoxFromPool")); + mInitMap.put(new Pair("func_149669_A", "getBlockBoundsMaxY")); + mInitMap.put(new Pair("func_149670_a", "onEntityCollidedWithBlock")); + mInitMap.put(new Pair("func_149671_p", "registerBlocks")); + mInitMap.put(new Pair("func_149672_a", "setStepSound")); + mInitMap.put(new Pair("func_149673_e", "getIcon")); + mInitMap.put(new Pair("func_149674_a", "updateTick")); + mInitMap.put(new Pair("func_149675_a", "setTickRandomly")); + mInitMap.put(new Pair("func_149676_a", "setBlockBounds")); + mInitMap.put(new Pair("func_149677_c", "getMixedBrightnessForBlock")); + mInitMap.put(new Pair("func_149678_a", "canStopRayTrace")); + mInitMap.put(new Pair("func_149679_a", "quantityDroppedWithBonus")); + mInitMap.put(new Pair("func_149680_a", "isEqualTo")); + mInitMap.put(new Pair("func_149681_a", "onBlockHarvested")); + mInitMap.put(new Pair("func_149682_b", "getIdFromBlock")); + mInitMap.put(new Pair("func_149683_g", "setBlockBoundsForItemRender")); + mInitMap.put(new Pair("func_149684_b", "getBlockFromName")); + mInitMap.put(new Pair("func_149685_I", "getAmbientOcclusionLightValue")); + mInitMap.put(new Pair("func_149686_d", "renderAsNormalBlock")); + mInitMap.put(new Pair("func_149687_b", "isVecInsideXZBounds")); + mInitMap.put(new Pair("func_149688_o", "getMaterial")); + mInitMap.put(new Pair("func_149689_a", "onBlockPlacedBy")); + mInitMap.put(new Pair("func_149690_a", "dropBlockAsItemWithChance")); + mInitMap.put(new Pair("func_149691_a", "getIcon")); + mInitMap.put(new Pair("func_149692_a", "damageDropped")); + mInitMap.put(new Pair("func_149693_C", "getBlockBoundsMaxZ")); + mInitMap.put(new Pair("func_149694_d", "getItem")); + mInitMap.put(new Pair("func_149695_a", "onNeighborBlockChange")); + mInitMap.put(new Pair("func_149696_a", "onBlockEventReceived")); + mInitMap.put(new Pair("func_149697_b", "dropBlockAsItem")); + mInitMap.put(new Pair("func_149698_L", "requiresUpdates")); + mInitMap.put(new Pair("func_149699_a", "onBlockClicked")); + mInitMap.put(new Pair("func_149700_E", "canSilkHarvest")); + mInitMap.put(new Pair("func_149701_w", "getRenderBlockPass")); + mInitMap.put(new Pair("func_149702_O", "getItemIconName")); + mInitMap.put(new Pair("func_149703_v", "isCollidable")); + mInitMap.put(new Pair("func_149704_x", "getBlockBoundsMinX")); + mInitMap.put(new Pair("func_149705_a", "canReplace")); + mInitMap.put(new Pair("func_149706_B", "getBlockBoundsMinZ")); + mInitMap.put(new Pair("func_149707_d", "canPlaceBlockOnSide")); + mInitMap.put(new Pair("func_149708_J", "getCreativeTabToDisplayOn")); + mInitMap.put(new Pair("func_149709_b", "isProvidingWeakPower")); + mInitMap.put(new Pair("func_149710_n", "getUseNeighborBrightness")); + mInitMap.put(new Pair("func_149711_c", "setHardness")); + mInitMap.put(new Pair("func_149712_f", "getBlockHardness")); + mInitMap.put(new Pair("func_149713_g", "setLightOpacity")); + mInitMap.put(new Pair("func_149714_e", "onPostBlockPlaced")); + mInitMap.put(new Pair("func_149715_a", "setLightLevel")); + mInitMap.put(new Pair("func_149716_u", "hasTileEntity")); + mInitMap.put(new Pair("func_149717_k", "getLightOpacity")); + mInitMap.put(new Pair("func_149718_j", "canBlockStay")); + mInitMap.put(new Pair("func_149719_a", "setBlockBoundsBasedOnState")); + mInitMap.put(new Pair("func_149720_d", "colorMultiplier")); + mInitMap.put(new Pair("func_149721_r", "isNormalCube")); + mInitMap.put(new Pair("func_149722_s", "setBlockUnbreakable")); + mInitMap.put(new Pair("func_149723_a", "onBlockDestroyedByExplosion")); + mInitMap.put(new Pair("func_149724_b", "onEntityWalking")); + mInitMap.put(new Pair("func_149725_f", "onBlockPreDestroy")); + mInitMap.put(new Pair("func_149726_b", "onBlockAdded")); + mInitMap.put(new Pair("func_149727_a", "onBlockActivated")); + mInitMap.put(new Pair("func_149728_f", "getMapColor")); + mInitMap.put(new Pair("func_149729_e", "getBlockById")); + mInitMap.put(new Pair("func_149730_j", "isFullBlock")); + mInitMap.put(new Pair("func_149731_a", "collisionRayTrace")); + mInitMap.put(new Pair("func_149732_F", "getLocalizedName")); + mInitMap.put(new Pair("func_149733_h", "getBlockTextureFromSide")); + mInitMap.put(new Pair("func_149734_b", "randomDisplayTick")); + mInitMap.put(new Pair("func_149735_b", "getItemIcon")); + mInitMap.put(new Pair("func_149736_g", "getComparatorInputOverride")); + mInitMap.put(new Pair("func_149737_a", "getPlayerRelativeBlockHardness")); + mInitMap.put(new Pair("func_149738_a", "tickRate")); + mInitMap.put(new Pair("func_149739_a", "getUnlocalizedName")); + mInitMap.put(new Pair("func_149740_M", "hasComparatorInputOverride")); + mInitMap.put(new Pair("func_149741_i", "getRenderColor")); + mInitMap.put(new Pair("func_149742_c", "canPlaceBlockAt")); + mInitMap.put(new Pair("func_149743_a", "addCollisionBoxesToList")); + mInitMap.put(new Pair("func_149744_f", "canProvidePower")); + mInitMap.put(new Pair("func_149745_a", "quantityDropped")); + mInitMap.put(new Pair("func_149746_a", "onFallenUpon")); + mInitMap.put(new Pair("func_149747_d", "isBlockSolid")); + mInitMap.put(new Pair("func_149748_c", "isProvidingStrongPower")); + mInitMap.put(new Pair("func_149749_a", "breakBlock")); + mInitMap.put(new Pair("func_149750_m", "getLightValue")); + mInitMap.put(new Pair("func_149751_l", "isTranslucent")); + mInitMap.put(new Pair("func_149752_b", "setResistance")); + mInitMap.put(new Pair("func_149753_y", "getBlockBoundsMaxX")); + mInitMap.put(new Pair("func_149798_e", "getEffectiveFlowDecay")); + mInitMap.put(new Pair("func_149800_f", "getFlowVector")); + mInitMap.put(new Pair("func_149801_b", "getLiquidHeightPercent")); + mInitMap.put(new Pair("func_149802_a", "getFlowDirection")); + mInitMap.put(new Pair("func_149803_e", "getLiquidIcon")); + mInitMap.put(new Pair("func_149817_o", "isFlammable")); + mInitMap.put(new Pair("func_149818_n", "setNotStationary")); + mInitMap.put(new Pair("func_149819_b", "invertMetadata")); + mInitMap.put(new Pair("func_149825_a", "isFence")); + mInitMap.put(new Pair("func_149826_e", "canConnectFenceTo")); + mInitMap.put(new Pair("func_149828_a", "playSoundWhenFallen")); + mInitMap.put(new Pair("func_149829_a", "onStartFalling")); + mInitMap.put(new Pair("func_149831_e", "canFallBelow")); + mInitMap.put(new Pair("func_149840_c", "getFireIcon")); + mInitMap.put(new Pair("func_149841_a", "tryCatchFire")); + mInitMap.put(new Pair("func_149844_e", "canBlockCatchFire")); + mInitMap.put(new Pair("func_149845_m", "getChanceOfNeighborsEncouragingFire")); + mInitMap.put(new Pair("func_149847_e", "canNeighborBurn")); + mInitMap.put(new Pair("func_149851_a", "canFertilize")); + mInitMap.put(new Pair("func_149852_a", "shouldFertilize")); + mInitMap.put(new Pair("func_149853_b", "fertilize")); + mInitMap.put(new Pair("func_149854_a", "canPlaceBlockOn")); + mInitMap.put(new Pair("func_149855_e", "checkAndDropBlock")); + mInitMap.put(new Pair("func_149863_m", "fertilize")); + mInitMap.put(new Pair("func_149865_P", "getCrop")); + mInitMap.put(new Pair("func_149866_i", "getSeed")); + mInitMap.put(new Pair("func_149872_i", "getStemIcon")); + mInitMap.put(new Pair("func_149873_e", "getState")); + mInitMap.put(new Pair("func_149874_m", "fertilizeStem")); + mInitMap.put(new Pair("func_149878_d", "growTree")); + mInitMap.put(new Pair("func_149879_c", "markOrGrowMarked")); + mInitMap.put(new Pair("func_149884_c", "fertilizeMushroom")); + mInitMap.put(new Pair("func_149895_l", "getDirection")); + mInitMap.put(new Pair("func_149896_b", "isFenceGateOpen")); + mInitMap.put(new Pair("func_149898_i", "getBlockUnpowered")); + mInitMap.put(new Pair("func_149900_a", "isGettingInput")); + mInitMap.put(new Pair("func_149903_h", "getInputStrength")); + mInitMap.put(new Pair("func_149906_e", "getBlockPowered")); + mInitMap.put(new Pair("func_149909_d", "isRedstoneRepeaterBlockID")); + mInitMap.put(new Pair("func_149915_a", "createmInitMap.put(newTileEntity")); + mInitMap.put(new Pair("func_149916_e", "getHopperIcon")); + mInitMap.put(new Pair("func_149917_c", "getActiveStateFromMetadata")); + mInitMap.put(new Pair("func_149918_b", "getDirectionFromMetadata")); + mInitMap.put(new Pair("func_149919_e", "updateBlockData")); + mInitMap.put(new Pair("func_149931_a", "updateFurnaceBlockState")); + mInitMap.put(new Pair("func_149937_b", "getFacingDirection")); + mInitMap.put(new Pair("func_149939_a", "getIPositionFromBlockSource")); + mInitMap.put(new Pair("func_149951_m", "getInventory")); + mInitMap.put(new Pair("func_149952_n", "isDoubleChest")); + mInitMap.put(new Pair("func_149953_o", "isOcelotSittingOnTop")); + mInitMap.put(new Pair("func_149954_e", "initMetadata")); + mInitMap.put(new Pair("func_149959_e", "getIconBrewingStandBase")); + mInitMap.put(new Pair("func_149962_a", "getTileEntity")); + mInitMap.put(new Pair("func_149965_a", "makeWither")); + mInitMap.put(new Pair("func_149970_j", "getOutputStrength")); + mInitMap.put(new Pair("func_149971_e", "getTileEntityComparator")); + mInitMap.put(new Pair("func_149975_b", "isBlockHeadOfBed")); + mInitMap.put(new Pair("func_149976_c", "isBedOccupied")); + mInitMap.put(new Pair("func_149977_a", "getSafeExitLocation")); + mInitMap.put(new Pair("func_149978_e", "setBedBounds")); + mInitMap.put(new Pair("func_149979_a", "setBedOccupied")); + mInitMap.put(new Pair("func_149988_b", "getCocoaIcon")); + mInitMap.put(new Pair("func_149990_e", "getIconSideOverlay")); + mInitMap.put(new Pair("func_150000_e", "tryToCreatePortal")); + mInitMap.put(new Pair("func_150002_b", "getFullSlabName")); + mInitMap.put(new Pair("func_150012_g", "getFullMetadata")); + mInitMap.put(new Pair("func_150020_b", "isEnderEyeInserted")); + mInitMap.put(new Pair("func_150021_e", "getIconEndPortalFrameEye")); + mInitMap.put(new Pair("func_150024_a", "setWaterLevel")); + mInitMap.put(new Pair("func_150025_c", "getRenderLiquidLevel")); + mInitMap.put(new Pair("func_150026_e", "getCauldronIcon")); + mInitMap.put(new Pair("func_150027_b", "getPowerFromMeta")); + mInitMap.put(new Pair("func_150042_a", "updateNeighbor")); + mInitMap.put(new Pair("func_150043_b", "setBlockBoundsFromMeta")); + mInitMap.put(new Pair("func_150044_m", "canStay")); + mInitMap.put(new Pair("func_150045_e", "findSolidSide")); + mInitMap.put(new Pair("func_150046_n", "activateButton")); + mInitMap.put(new Pair("func_150048_a", "onRedstoneSignal")); + mInitMap.put(new Pair("func_150049_b_", "isRailBlockAt")); + mInitMap.put(new Pair("func_150050_e", "isPowered")); + mInitMap.put(new Pair("func_150051_a", "isRailBlock")); + mInitMap.put(new Pair("func_150052_a", "refreshTrackShape")); + mInitMap.put(new Pair("func_150060_c", "getPowerFromMeta")); + mInitMap.put(new Pair("func_150061_a", "getSensitiveAABB")); + mInitMap.put(new Pair("func_150062_a", "setStateIfMobInteractsWithPlate")); + mInitMap.put(new Pair("func_150063_b", "setBlockBoundsFromMeta")); + mInitMap.put(new Pair("func_150064_a_", "updateNeighbors")); + mInitMap.put(new Pair("func_150065_e", "getPlateState")); + mInitMap.put(new Pair("func_150066_d", "getMetaFromPower")); + mInitMap.put(new Pair("func_150071_a", "determineOrientation")); + mInitMap.put(new Pair("func_150072_a", "isIndirectlyPowered")); + mInitMap.put(new Pair("func_150073_e", "getPistonExtensionTexture")); + mInitMap.put(new Pair("func_150074_e", "getPistonBaseIcon")); + mInitMap.put(new Pair("func_150075_c", "isExtended")); + mInitMap.put(new Pair("func_150076_b", "getPistonOrientation")); + mInitMap.put(new Pair("func_150077_h", "canExtend")); + mInitMap.put(new Pair("func_150078_e", "updatePistonState")); + mInitMap.put(new Pair("func_150079_i", "tryExtend")); + mInitMap.put(new Pair("func_150080_a", "canPushBlock")); + mInitMap.put(new Pair("func_150085_b", "getDirectionMeta")); + mInitMap.put(new Pair("func_150089_b", "setBlockBoundsFromMeta")); + mInitMap.put(new Pair("func_150091_e", "canConnectWallTo")); + mInitMap.put(new Pair("func_150098_a", "canPaneConnectToBlock")); + mInitMap.put(new Pair("func_150107_m", "canPlaceTorchOn")); + mInitMap.put(new Pair("func_150109_e", "dropTorchIfCantStay")); + mInitMap.put(new Pair("func_150118_d", "isTrapdoorOpen")); + mInitMap.put(new Pair("func_150119_a", "isValidSupportBlock")); + mInitMap.put(new Pair("func_150122_b", "setGraphicsLevel")); + mInitMap.put(new Pair("func_150126_e", "removeLeaves")); + mInitMap.put(new Pair("func_150147_e", "setBaseBounds")); + mInitMap.put(new Pair("func_150148_a", "isBlockStairs")); + mInitMap.put(new Pair("func_150161_d", "getTopIcon")); + mInitMap.put(new Pair("func_150163_b", "getSideIcon")); + mInitMap.put(new Pair("func_150173_e", "getRedstomInitMap.put(newireIcon")); + mInitMap.put(new Pair("func_150174_f", "isPowerProviderOrWire")); + mInitMap.put(new Pair("func_150206_m", "createDeepCopy")); + mInitMap.put(new Pair("func_150209_a", "setChatHoverEvent")); + mInitMap.put(new Pair("func_150210_i", "getChatHoverEvent")); + mInitMap.put(new Pair("func_150215_a", "getColor")); + mInitMap.put(new Pair("func_150217_b", "setItalic")); + mInitMap.put(new Pair("func_150218_j", "getFormattingCode")); + mInitMap.put(new Pair("func_150221_a", "setParentStyle")); + mInitMap.put(new Pair("func_150223_b", "getBold")); + mInitMap.put(new Pair("func_150224_n", "getParent")); + mInitMap.put(new Pair("func_150225_c", "setStrikethrough")); + mInitMap.put(new Pair("func_150227_a", "setBold")); + mInitMap.put(new Pair("func_150228_d", "setUnderlined")); + mInitMap.put(new Pair("func_150229_g", "isEmpty")); + mInitMap.put(new Pair("func_150232_l", "createShallowCopy")); + mInitMap.put(new Pair("func_150233_f", "getObfuscated")); + mInitMap.put(new Pair("func_150234_e", "getUnderlined")); + mInitMap.put(new Pair("func_150235_h", "getChatClickEvent")); + mInitMap.put(new Pair("func_150236_d", "getStrikethrough")); + mInitMap.put(new Pair("func_150237_e", "setObfuscated")); + mInitMap.put(new Pair("func_150238_a", "setColor")); + mInitMap.put(new Pair("func_150241_a", "setChatClickEvent")); + mInitMap.put(new Pair("func_150242_c", "getItalic")); + mInitMap.put(new Pair("func_150253_a", "getSiblings")); + mInitMap.put(new Pair("func_150254_d", "getFormattedText")); + mInitMap.put(new Pair("func_150255_a", "setChatStyle")); + mInitMap.put(new Pair("func_150256_b", "getChatStyle")); + mInitMap.put(new Pair("func_150257_a", "appendSibling")); + mInitMap.put(new Pair("func_150258_a", "appendText")); + mInitMap.put(new Pair("func_150259_f", "createCopy")); + mInitMap.put(new Pair("func_150260_c", "getUnformattedText")); + mInitMap.put(new Pair("func_150261_e", "getUnformattedTextForChat")); + mInitMap.put(new Pair("func_150262_a", "createDeepCopyIterator")); + mInitMap.put(new Pair("func_150265_g", "getChatComponentText_TextValue")); + mInitMap.put(new Pair("func_150268_i", "getKey")); + mInitMap.put(new Pair("func_150269_b", "initializeFromFormat")); + mInitMap.put(new Pair("func_150270_g", "ensureInitialized")); + mInitMap.put(new Pair("func_150271_j", "getFormatArgs")); + mInitMap.put(new Pair("func_150272_a", "getFormatArgumentAsComponent")); + mInitMap.put(new Pair("func_150284_a", "createmInitMap.put(newByType")); + mInitMap.put(new Pair("func_150285_a_", "getString")); + mInitMap.put(new Pair("func_150286_g", "getDouble")); + mInitMap.put(new Pair("func_150287_d", "getInt")); + mInitMap.put(new Pair("func_150288_h", "getFloat")); + mInitMap.put(new Pair("func_150289_e", "getShort")); + mInitMap.put(new Pair("func_150290_f", "getByte")); + mInitMap.put(new Pair("func_150291_c", "getLong")); + mInitMap.put(new Pair("func_150292_c", "getByteArray")); + mInitMap.put(new Pair("func_150295_c", "getTagList")); + mInitMap.put(new Pair("func_150296_c", "getKeySet")); + mInitMap.put(new Pair("func_150297_b", "hasKey")); + mInitMap.put(new Pair("func_150298_a", "writeEntry")); + mInitMap.put(new Pair("func_150299_b", "getTagId")); + mInitMap.put(new Pair("func_150302_c", "getIntArray")); + mInitMap.put(new Pair("func_150303_d", "getTagType")); + mInitMap.put(new Pair("func_150304_a", "setTag")); + mInitMap.put(new Pair("func_150305_b", "getCompoundTagAt")); + mInitMap.put(new Pair("func_150306_c", "getIntArrayAt")); + mInitMap.put(new Pair("func_150307_f", "getStringTagAt")); + mInitMap.put(new Pair("func_150308_e", "getFloatAt")); + mInitMap.put(new Pair("func_150309_d", "getDoubleAt")); + mInitMap.put(new Pair("func_150494_d", "getFrequency")); + mInitMap.put(new Pair("func_150495_a", "getDigResourcePath")); + mInitMap.put(new Pair("func_150496_b", "getPlaceSound")); + mInitMap.put(new Pair("func_150497_c", "getVolume")); + mInitMap.put(new Pair("func_150498_e", "getStepSound")); + mInitMap.put(new Pair("func_150503_a", "decipher")); + mInitMap.put(new Pair("func_150504_a", "cipher")); + mInitMap.put(new Pair("func_150510_c", "getLastUpdateTimeInMilliseconds")); + mInitMap.put(new Pair("func_150512_a", "decorateChunk")); + mInitMap.put(new Pair("func_150513_a", "genDecorations")); + mInitMap.put(new Pair("func_150516_a", "setBlockAndNotifyAdequately")); + mInitMap.put(new Pair("func_150558_b", "getBiomeGrassColor")); + mInitMap.put(new Pair("func_150560_b", "genBiomeTerrain")); + mInitMap.put(new Pair("func_150561_m", "getTempCategory")); + mInitMap.put(new Pair("func_150562_l", "getBiomeClass")); + mInitMap.put(new Pair("func_150564_a", "getFloatTemperature")); + mInitMap.put(new Pair("func_150565_n", "getBiomeGenArray")); + mInitMap.put(new Pair("func_150566_k", "createMutation")); + mInitMap.put(new Pair("func_150568_d", "getBiome")); + mInitMap.put(new Pair("func_150569_a", "isEqualTo")); + mInitMap.put(new Pair("func_150570_a", "setHeight")); + mInitMap.put(new Pair("func_150571_c", "getBiomeFoliageColor")); + mInitMap.put(new Pair("func_150573_a", "genTerrainBlocks")); + mInitMap.put(new Pair("func_150633_b", "mutateHills")); + mInitMap.put(new Pair("func_150646_a", "isRailBlockAt")); + mInitMap.put(new Pair("func_150650_a", "countAdjacentRails")); + mInitMap.put(new Pair("func_150663_a", "writeTag")); + mInitMap.put(new Pair("func_150668_b", "getValue")); + mInitMap.put(new Pair("func_150669_a", "getAction")); + mInitMap.put(new Pair("func_150672_a", "getValueByCanonicalName")); + mInitMap.put(new Pair("func_150673_b", "getCanonicalName")); + mInitMap.put(new Pair("func_150674_a", "shouldAllowInChat")); + mInitMap.put(new Pair("func_150684_a", "getValueByCanonicalName")); + mInitMap.put(new Pair("func_150685_b", "getCanonicalName")); + mInitMap.put(new Pair("func_150686_a", "shouldAllowInChat")); + mInitMap.put(new Pair("func_150695_a", "serializeChatStyle")); + mInitMap.put(new Pair("func_150696_a", "componentToJson")); + mInitMap.put(new Pair("func_150699_a", "jsonToComponent")); + mInitMap.put(new Pair("func_150701_a", "getAction")); + mInitMap.put(new Pair("func_150702_b", "getValue")); + mInitMap.put(new Pair("func_150706_a", "generateDispenserContents")); + mInitMap.put(new Pair("func_150707_a", "setEnchantable")); + mInitMap.put(new Pair("func_150708_a", "getItemStack")); + mInitMap.put(new Pair("func_150709_a", "setMaxDamagePercent")); + mInitMap.put(new Pair("func_150718_a", "closeChannel")); + mInitMap.put(new Pair("func_150719_a", "setNetHandler")); + mInitMap.put(new Pair("func_150721_g", "disableAutoRead")); + mInitMap.put(new Pair("func_150722_a", "provideLocalClient")); + mInitMap.put(new Pair("func_150723_a", "setConnectionState")); + mInitMap.put(new Pair("func_150724_d", "isChannelOpen")); + mInitMap.put(new Pair("func_150725_a", "scheduleOutboundPacket")); + mInitMap.put(new Pair("func_150726_a", "provideLanClient")); + mInitMap.put(new Pair("func_150727_a", "enableEncryption")); + mInitMap.put(new Pair("func_150729_e", "getNetHandler")); + mInitMap.put(new Pair("func_150730_f", "getExitMessage")); + mInitMap.put(new Pair("func_150731_c", "isLocalChannel")); + mInitMap.put(new Pair("func_150732_b", "dispatchPacket")); + mInitMap.put(new Pair("func_150733_h", "flushOutboundQueue")); + mInitMap.put(new Pair("func_150752_a", "getFromPacket")); + mInitMap.put(new Pair("func_150759_c", "getId")); + mInitMap.put(new Pair("func_150760_a", "getById")); + mInitMap.put(new Pair("func_150775_a", "attenuate")); + mInitMap.put(new Pair("func_150785_a", "writeStringToBuffer")); + mInitMap.put(new Pair("func_150786_a", "writeNBTTagCompoundToBuffer")); + mInitMap.put(new Pair("func_150787_b", "writeVarIntToBuffer")); + mInitMap.put(new Pair("func_150788_a", "writeItemStackToBuffer")); + mInitMap.put(new Pair("func_150789_c", "readStringFromBuffer")); + mInitMap.put(new Pair("func_150790_a", "getVarIntSize")); + mInitMap.put(new Pair("func_150791_c", "readItemStackFromBuffer")); + mInitMap.put(new Pair("func_150792_a", "readVarIntFromBuffer")); + mInitMap.put(new Pair("func_150793_b", "readNBTTagCompoundFromBuffer")); + mInitMap.put(new Pair("func_150795_a", "findBiomePosition")); + mInitMap.put(new Pair("func_150803_c", "recheckGaps")); + mInitMap.put(new Pair("func_150805_f", "removeTileEntity")); + mInitMap.put(new Pair("func_150806_e", "getBlockTileEntityInChunk")); + mInitMap.put(new Pair("func_150807_a", "setBlockIDWithMetadata")); + mInitMap.put(new Pair("func_150808_b", "getBlockLightOpacity")); + mInitMap.put(new Pair("func_150810_a", "getBlock")); + mInitMap.put(new Pair("func_150812_a", "setBlockTileEntityInChunk")); + mInitMap.put(new Pair("func_150813_a", "addTileEntity")); + mInitMap.put(new Pair("func_150818_a", "setExtBlockID")); + mInitMap.put(new Pair("func_150819_a", "getBlockByExtId")); + mInitMap.put(new Pair("func_150826_b", "translateToFallback")); + mInitMap.put(new Pair("func_150827_a", "getLastTranslationUpdateTimeInMilliseconds")); + mInitMap.put(new Pair("func_150835_j", "getBlockTileEntity")); + mInitMap.put(new Pair("func_150891_b", "getIdFromItem")); + mInitMap.put(new Pair("func_150892_m", "isPotionIngredient")); + mInitMap.put(new Pair("func_150893_a", "getStrVsBlock")); + mInitMap.put(new Pair("func_150894_a", "onBlockDestroyed")); + mInitMap.put(new Pair("func_150895_a", "getSubItems")); + mInitMap.put(new Pair("func_150896_i", "getPotionEffect")); + mInitMap.put(new Pair("func_150897_b", "canItemHarvestBlock")); + mInitMap.put(new Pair("func_150898_a", "getItemFromBlock")); + mInitMap.put(new Pair("func_150899_d", "getItemById")); + mInitMap.put(new Pair("func_150900_l", "registerItems")); + mInitMap.put(new Pair("func_150905_g", "getHealAmount")); + mInitMap.put(new Pair("func_150906_h", "getSaturationModifier")); + mInitMap.put(new Pair("func_150911_c", "createMapDataPacket")); + mInitMap.put(new Pair("func_150912_a", "loadMapData")); + mInitMap.put(new Pair("func_150913_i", "getToolMaterial")); + mInitMap.put(new Pair("func_150924_a", "placeDoorBlock")); + mInitMap.put(new Pair("func_150926_b", "getRecord")); + mInitMap.put(new Pair("func_150927_i", "getRecordNameLocal")); + mInitMap.put(new Pair("func_150930_a", "validBookPageTagContents")); + mInitMap.put(new Pair("func_150932_j", "getToolMaterialName")); + mInitMap.put(new Pair("func_150951_e", "getStatName")); + mInitMap.put(new Pair("func_150967_d", "getUncookedSaturationModifier")); + mInitMap.put(new Pair("func_150968_a", "registerIcon")); + mInitMap.put(new Pair("func_150970_e", "getCookedHealAmount")); + mInitMap.put(new Pair("func_150971_g", "getUncookedIcon")); + mInitMap.put(new Pair("func_150972_b", "getUnlocalizedNamePart")); + mInitMap.put(new Pair("func_150973_i", "getCookable")); + mInitMap.put(new Pair("func_150974_a", "getFishTypeForItemDamage")); + mInitMap.put(new Pair("func_150975_c", "getUncookedHealAmount")); + mInitMap.put(new Pair("func_150976_a", "getItemDamage")); + mInitMap.put(new Pair("func_150977_f", "getCookedSaturationModifier")); + mInitMap.put(new Pair("func_150978_a", "getFishTypeForItemStack")); + mInitMap.put(new Pair("func_150979_h", "getCookedIcon")); + mInitMap.put(new Pair("func_150995_f", "getBaseItemForRepair")); + mInitMap.put(new Pair("func_150996_a", "setItem")); + mInitMap.put(new Pair("func_150997_a", "getStrVsBlock")); + mInitMap.put(new Pair("func_150998_b", "canItemHarvestBlock")); + mInitMap.put(new Pair("func_150999_a", "onBlockDestroyed")); + mInitMap.put(new Pair("func_151001_c", "setStackDisplayName")); + mInitMap.put(new Pair("func_151003_a", "getSerializableElement")); + mInitMap.put(new Pair("func_151177_a", "getOneShotStat")); + mInitMap.put(new Pair("func_151187_b", "getJsonSerializableValue")); + mInitMap.put(new Pair("func_151188_a", "setIntegerValue")); + mInitMap.put(new Pair("func_151189_a", "getIntegerValue")); + mInitMap.put(new Pair("func_151190_a", "setJsonSerializableValue")); + mInitMap.put(new Pair("func_151200_h", "getJsonObjectStringFieldValue")); + mInitMap.put(new Pair("func_151201_f", "jsonObjectFieldTypeIsPrimitive")); + mInitMap.put(new Pair("func_151202_d", "jsonObjectFieldTypeIsArray")); + mInitMap.put(new Pair("func_151203_m", "getJsonObjectIntegerFieldValue")); + mInitMap.put(new Pair("func_151204_g", "jsonObjectHasNamedField")); + mInitMap.put(new Pair("func_151205_a", "jsonObjectFieldTypeIsString")); + mInitMap.put(new Pair("func_151206_a", "getJsonElementStringValue")); + mInitMap.put(new Pair("func_151207_m", "getJsonElementAsJsonArray")); + mInitMap.put(new Pair("func_151208_a", "getJsonObjectIntegerFieldValueOrDefault")); + mInitMap.put(new Pair("func_151209_a", "getJsonObjectBooleanFieldValueOrDefault")); + mInitMap.put(new Pair("func_151210_l", "getElementAsJsonObject")); + mInitMap.put(new Pair("func_151211_a", "jsonElementTypeIsString")); + mInitMap.put(new Pair("func_151212_i", "getJsonObjectBooleanFieldValue")); + mInitMap.put(new Pair("func_151213_a", "getJsonObjectJsonArrayFieldOrDefault")); + mInitMap.put(new Pair("func_151214_t", "getJsonObjectJsonArrayField")); + mInitMap.put(new Pair("func_151215_f", "getJsonElementIntegerValue")); + mInitMap.put(new Pair("func_151216_b", "getJsonElementBooleanValue")); + mInitMap.put(new Pair("func_151217_k", "getJsonObjectFloatFieldValue")); + mInitMap.put(new Pair("func_151218_a", "getJsonObjectFieldOrDefault")); + mInitMap.put(new Pair("func_151219_a", "getJsonObjectStringFieldValueOrDefault")); + mInitMap.put(new Pair("func_151220_d", "getJsonElementFloatValue")); + mInitMap.put(new Pair("func_151221_a", "getJsonObjectFloatFieldValueOrDefault")); + mInitMap.put(new Pair("func_151222_d", "getJsonElementTypeDescription")); + mInitMap.put(new Pair("func_151223_a", "downloadResourcePack")); + mInitMap.put(new Pair("func_151225_a", "post")); + mInitMap.put(new Pair("func_151226_a", "postMap")); + mInitMap.put(new Pair("func_151235_d", "isPowerOfTwo")); + mInitMap.put(new Pair("func_151236_b", "roundUpToPowerOfTwo")); + mInitMap.put(new Pair("func_151237_a", "clamp_double")); + mInitMap.put(new Pair("func_151238_b", "denormalizeClamp")); + mInitMap.put(new Pair("func_151239_c", "calculateLogBaseTwo")); + mInitMap.put(new Pair("func_151240_a", "randomFloatClamp")); + mInitMap.put(new Pair("func_151241_e", "calculateLogBaseTwoDeBruijn")); + mInitMap.put(new Pair("func_151243_f", "getIconItemDamage")); + mInitMap.put(new Pair("func_151244_d", "getIconItemStack")); + mInitMap.put(new Pair("func_151246_b", "isNullOrEmpty")); + mInitMap.put(new Pair("func_151247_a", "sendToAllTrackingEntity")); + mInitMap.put(new Pair("func_151250_a", "markBlockForUpdate")); + mInitMap.put(new Pair("func_151251_a", "sendToAllPlayersWatchingChunk")); + mInitMap.put(new Pair("func_151252_a", "sendTileToAllPlayersWatchingChunk")); + mInitMap.put(new Pair("func_151253_a", "flagChunkForUpdate")); + mInitMap.put(new Pair("func_151255_a", "getStringBuffer")); + mInitMap.put(new Pair("func_151256_a", "writeAndFlush")); + mInitMap.put(new Pair("func_151265_a", "addLanEndpoint")); + mInitMap.put(new Pair("func_151267_d", "getServer")); + mInitMap.put(new Pair("func_151268_b", "terminateEndpoints")); + mInitMap.put(new Pair("func_151269_c", "networkTick")); + mInitMap.put(new Pair("func_151270_a", "addLocalEndpoint")); + mInitMap.put(new Pair("func_151303_a", "getName")); + mInitMap.put(new Pair("func_151304_b", "getProtocol")); + mInitMap.put(new Pair("func_151315_a", "setServerDescription")); + mInitMap.put(new Pair("func_151316_d", "getFavicon")); + mInitMap.put(new Pair("func_151317_a", "getServerDescription")); + mInitMap.put(new Pair("func_151318_b", "getPlayerCountData")); + mInitMap.put(new Pair("func_151319_a", "setPlayerCountData")); + mInitMap.put(new Pair("func_151320_a", "setFavicon")); + mInitMap.put(new Pair("func_151321_a", "setProtocolVersionInfo")); + mInitMap.put(new Pair("func_151322_c", "getProtocolVersionInfo")); + mInitMap.put(new Pair("func_151330_a", "setPlayers")); + mInitMap.put(new Pair("func_151331_c", "getPlayers")); + mInitMap.put(new Pair("func_151332_a", "getMaxPlayers")); + mInitMap.put(new Pair("func_151333_b", "getOnlinePlayerCount")); + mInitMap.put(new Pair("func_151337_f", "getBlock")); + mInitMap.put(new Pair("func_151338_e", "getEventParameter")); + mInitMap.put(new Pair("func_151339_d", "getEventID")); + mInitMap.put(new Pair("func_151353_a", "registerDispenserBehaviors")); + mInitMap.put(new Pair("func_151354_b", "register")); + mInitMap.put(new Pair("func_151357_h", "showWorldInfoNotice")); + mInitMap.put(new Pair("func_151358_j", "setNotificationData")); + mInitMap.put(new Pair("func_151393_a", "addSmeltingRecipeForBlock")); + mInitMap.put(new Pair("func_151394_a", "addSmeltingRecipe")); + mInitMap.put(new Pair("func_151395_a", "getSmeltingResult")); + mInitMap.put(new Pair("func_151396_a", "addSmelting")); + mInitMap.put(new Pair("func_151398_b", "getSmeltingExperience")); + mInitMap.put(new Pair("func_151426_a", "getEnumChatVisibility")); + mInitMap.put(new Pair("func_151428_a", "getChatVisibility")); + mInitMap.put(new Pair("func_151429_b", "getResourceKey")); + mInitMap.put(new Pair("func_151438_a", "getSoundLevel")); + mInitMap.put(new Pair("func_151439_a", "setSoundLevel")); + mInitMap.put(new Pair("func_151440_a", "setOptionKeyBinding")); + mInitMap.put(new Pair("func_151460_a", "getBlockAtEntityViewpoint")); + mInitMap.put(new Pair("func_151461_a", "getChatComponent")); + mInitMap.put(new Pair("func_151462_b", "setKeyCode")); + mInitMap.put(new Pair("func_151463_i", "getKeyCode")); + mInitMap.put(new Pair("func_151464_g", "getKeyDescription")); + mInitMap.put(new Pair("func_151466_e", "getKeyCategory")); + mInitMap.put(new Pair("func_151467_c", "getKeybinds")); + mInitMap.put(new Pair("func_151468_f", "isPressed")); + mInitMap.put(new Pair("func_151469_h", "getKeyCodeDefault")); + mInitMap.put(new Pair("func_151470_d", "getIsKeyPressed")); + mInitMap.put(new Pair("func_151498_a", "isStairOrSlab")); + mInitMap.put(new Pair("func_151499_f", "getEatingGrassTimer")); + mInitMap.put(new Pair("func_151503_a", "getWoodenDoorBlock")); + mInitMap.put(new Pair("func_151507_a", "writeWatchedListToPacketBuffer")); + mInitMap.put(new Pair("func_151508_b", "readWatchedListFromPacketBuffer")); + mInitMap.put(new Pair("func_151510_a", "writeWatchableObjectToPacketBuffer")); + mInitMap.put(new Pair("func_151517_h", "isDamageAbsolute")); + mInitMap.put(new Pair("func_151518_m", "setDamageIsAbsolute")); + mInitMap.put(new Pair("func_151519_b", "getDeathMessage")); + mInitMap.put(new Pair("func_151523_a", "getDifficultyEnum")); + mInitMap.put(new Pair("func_151525_a", "getDifficultyId")); + mInitMap.put(new Pair("func_151526_b", "getDifficultyResourceKey")); + mInitMap.put(new Pair("func_151539_a", "generate")); + mInitMap.put(new Pair("func_151545_a", "getNearestInstance")); + mInitMap.put(new Pair("func_151548_a", "getBlockAtCurrentPosition")); + mInitMap.put(new Pair("func_151549_a", "fillWithBlocks")); + mInitMap.put(new Pair("func_151550_a", "placeBlockAtCurrentPosition")); + mInitMap.put(new Pair("func_151551_a", "randomlyFillWithBlocks")); + mInitMap.put(new Pair("func_151555_a", "getMetadataWithOffset")); + mInitMap.put(new Pair("func_151556_a", "fillWithMetadataBlocks")); + mInitMap.put(new Pair("func_151565_r", "getMaterialMapColor")); + mInitMap.put(new Pair("func_151616_a", "biomesEqualOrMesaPlateau")); + mInitMap.put(new Pair("func_151617_b", "selectModeOrRandom")); + mInitMap.put(new Pair("func_151618_b", "isBiomeOceanic")); + mInitMap.put(new Pair("func_151619_a", "selectRandom")); + mInitMap.put(new Pair("func_151624_d", "getIntsHeatIce")); + mInitMap.put(new Pair("func_151625_e", "getIntsSpecial")); + mInitMap.put(new Pair("func_151626_c", "getIntsCoolWarm")); + mInitMap.put(new Pair("func_151634_b", "canBiomesBeNeighbors")); + mInitMap.put(new Pair("func_151635_b", "replaceBiomeEdge")); + mInitMap.put(new Pair("func_151636_a", "replaceBiomeEdgeIfNecessary")); + mInitMap.put(new Pair("func_151644_a", "getMapColorForBlockColored")); + mInitMap.put(new Pair("func_151685_b", "getBaseItemForRepair")); + mInitMap.put(new Pair("func_151686_a", "addStats")); + mInitMap.put(new Pair("func_152121_a", "onSkinAvailable")); + mInitMap.put(new Pair("func_152122_n", "hasCape")); + mInitMap.put(new Pair("func_152123_o", "hasSkin")); + mInitMap.put(new Pair("func_152125_a", "drawScaledCustomSizeModalRect")); + mInitMap.put(new Pair("func_152126_a", "renderStreamIndicator")); + mInitMap.put(new Pair("func_152340_a", "readImageToBuffer")); + mInitMap.put(new Pair("func_152341_N", "getTwitchDetails")); + mInitMap.put(new Pair("func_152342_ad", "getSkinManager")); + mInitMap.put(new Pair("func_152343_a", "addScheduledTask")); + mInitMap.put(new Pair("func_152344_a", "addScheduledTask")); + mInitMap.put(new Pair("func_152345_ab", "isCallingFromMinecraftThread")); + mInitMap.put(new Pair("func_152346_Z", "getTwitchStream")); + mInitMap.put(new Pair("func_152347_ac", "getSessionService")); + mInitMap.put(new Pair("func_152348_aa", "dispatchKeypresses")); + mInitMap.put(new Pair("func_152349_b", "isUnicode")); + mInitMap.put(new Pair("func_152357_F", "getGameProfiles")); + mInitMap.put(new Pair("func_152358_ax", "getPlayerProfileCache")); + mInitMap.put(new Pair("func_152359_aw", "getGameProfileRepository")); + mInitMap.put(new Pair("func_152361_a", "setConfigManager")); + mInitMap.put(new Pair("func_152368_aE", "convertFiles")); + mInitMap.put(new Pair("func_152369_aG", "sleepFiveSeconds")); + mInitMap.put(new Pair("func_152372_a", "notifyOperators")); + mInitMap.put(new Pair("func_152373_a", "notifyOperators")); + mInitMap.put(new Pair("func_152374_a", "notifyOperators")); + mInitMap.put(new Pair("func_152378_a", "getPlayerEntityByUUID")); + mInitMap.put(new Pair("func_152379_p", "getRenderDistanceChunks")); + mInitMap.put(new Pair("func_152421_a", "setSessionType")); + mInitMap.put(new Pair("func_152428_f", "getSessionType")); + mInitMap.put(new Pair("func_152436_a", "render")); + mInitMap.put(new Pair("func_152437_a", "render")); + mInitMap.put(new Pair("func_152446_a", "read")); + mInitMap.put(new Pair("func_152447_a", "readType")); + mInitMap.put(new Pair("func_152448_b", "readKey")); + mInitMap.put(new Pair("func_152449_a", "readNBT")); + mInitMap.put(new Pair("func_152450_a", "addSpaceRead")); + mInitMap.put(new Pair("func_152457_a", "decompress")); + mInitMap.put(new Pair("func_152458_a", "readFromFile")); + mInitMap.put(new Pair("func_152459_a", "readGameProfileFromNBT")); + mInitMap.put(new Pair("func_152460_a", "writeGameProfileToNBT")); + mInitMap.put(new Pair("func_152493_a", "getTotalBytes")); + mInitMap.put(new Pair("func_152495_b", "getCount")); + mInitMap.put(new Pair("func_152506_a", "getOfflineProfile")); + mInitMap.put(new Pair("func_152583_a", "copyFrom")); + mInitMap.put(new Pair("func_152584_a", "setResourceMode")); + mInitMap.put(new Pair("func_152585_d", "isLanServer")); + mInitMap.put(new Pair("func_152586_b", "getResourceMode")); + mInitMap.put(new Pair("func_152589_a", "getMotd")); + mInitMap.put(new Pair("func_152596_g", "canSendCommands")); + mInitMap.put(new Pair("func_152597_c", "removePlayerFromWhitelist")); + mInitMap.put(new Pair("func_152598_l", "getWhitelistedPlayerNames")); + mInitMap.put(new Pair("func_152599_k", "getWhitelistedPlayers")); + mInitMap.put(new Pair("func_152600_g", "getAllProfiles")); + mInitMap.put(new Pair("func_152601_d", "addWhitelistedPlayer")); + mInitMap.put(new Pair("func_152602_a", "getPlayerStatsFile")); + mInitMap.put(new Pair("func_152603_m", "getOppedPlayers")); + mInitMap.put(new Pair("func_152605_a", "addOp")); + mInitMap.put(new Pair("func_152606_n", "getOppedPlayerNames")); + mInitMap.put(new Pair("func_152607_e", "canJoin")); + mInitMap.put(new Pair("func_152608_h", "getBannedPlayers")); + mInitMap.put(new Pair("func_152609_b", "getPlayerNamesString")); + mInitMap.put(new Pair("func_152610_b", "removeOp")); + mInitMap.put(new Pair("func_152611_a", "setViewDistance")); + mInitMap.put(new Pair("func_152612_a", "getPlayerByUsername")); + mInitMap.put(new Pair("func_152617_w", "saveUserBanList")); + mInitMap.put(new Pair("func_152618_v", "saveIpBanList")); + mInitMap.put(new Pair("func_152619_x", "loadIpBanList")); + mInitMap.put(new Pair("func_152620_y", "loadUserBansList")); + mInitMap.put(new Pair("func_152640_f", "getValue")); + mInitMap.put(new Pair("func_152641_a", "onSerialization")); + mInitMap.put(new Pair("func_152655_a", "getGameProfileForUsername")); + mInitMap.put(new Pair("func_152678_f", "writeChanges")); + mInitMap.put(new Pair("func_152679_g", "readSavedFile")); + mInitMap.put(new Pair("func_152680_h", "removeExpired")); + mInitMap.put(new Pair("func_152681_a", "getObjectKey")); + mInitMap.put(new Pair("func_152682_a", "createEntry")); + mInitMap.put(new Pair("func_152683_b", "getEntry")); + mInitMap.put(new Pair("func_152684_c", "removeEntry")); + mInitMap.put(new Pair("func_152685_a", "getKeys")); + mInitMap.put(new Pair("func_152686_a", "setLanServer")); + mInitMap.put(new Pair("func_152687_a", "addEntry")); + mInitMap.put(new Pair("func_152688_e", "getValues")); + mInitMap.put(new Pair("func_152689_b", "isLanServer")); + mInitMap.put(new Pair("func_152690_d", "hasEntries")); + mInitMap.put(new Pair("func_152691_c", "getSaveFile")); + mInitMap.put(new Pair("func_152692_d", "hasEntry")); + mInitMap.put(new Pair("func_152700_a", "getGameProfileFromName")); + mInitMap.put(new Pair("func_152701_b", "getProfileId")); + mInitMap.put(new Pair("func_152702_a", "isBanned")); + mInitMap.put(new Pair("func_152703_a", "isUsernameBanned")); + mInitMap.put(new Pair("func_152707_c", "addressToString")); + mInitMap.put(new Pair("func_152708_a", "isBanned")); + mInitMap.put(new Pair("func_152709_b", "getBanEntry")); + mInitMap.put(new Pair("func_152710_d", "convertWhitelist")); + mInitMap.put(new Pair("func_152711_b", "mkdir")); + mInitMap.put(new Pair("func_152712_b", "hasUnconvertableFiles")); + mInitMap.put(new Pair("func_152713_b", "parseDate")); + mInitMap.put(new Pair("func_152714_a", "tryConvert")); + mInitMap.put(new Pair("func_152715_c", "hasUnconvertablePlayerFiles")); + mInitMap.put(new Pair("func_152717_a", "lookupNames")); + mInitMap.put(new Pair("func_152718_c", "convertOplist")); + mInitMap.put(new Pair("func_152721_a", "readFile")); + mInitMap.put(new Pair("func_152722_b", "convertIpBanlist")); + mInitMap.put(new Pair("func_152723_a", "convertSaveFiles")); + mInitMap.put(new Pair("func_152724_a", "convertUserBanlist")); + mInitMap.put(new Pair("func_152725_d", "getPlayersDirectory")); + mInitMap.put(new Pair("func_152727_c", "backupConverted")); + mInitMap.put(new Pair("func_152750_a", "deserializeEntry")); + mInitMap.put(new Pair("func_152751_a", "serializeEntry")); + mInitMap.put(new Pair("func_152754_s", "getJsonObject")); + mInitMap.put(new Pair("func_152755_a", "get")); + mInitMap.put(new Pair("func_152764_a", "parsePass")); + mInitMap.put(new Pair("func_152765_a", "parseGroup")); + mInitMap.put(new Pair("func_152767_b", "addStatToSnooper")); + mInitMap.put(new Pair("func_152768_a", "addClientStat")); + mInitMap.put(new Pair("func_152788_a", "loadSkinFromCache")); + mInitMap.put(new Pair("func_152789_a", "loadSkin")); + mInitMap.put(new Pair("func_152792_a", "loadSkin")); + mInitMap.put(new Pair("func_152825_o", "isIngestTesting")); + mInitMap.put(new Pair("func_152839_p", "isBroadcastPaused")); + mInitMap.put(new Pair("func_152850_m", "isBroadcasting")); + mInitMap.put(new Pair("func_152856_w", "isReady")); + mInitMap.put(new Pair("func_152919_o", "isPaused")); + mInitMap.put(new Pair("func_152923_i", "shutdownStream")); + mInitMap.put(new Pair("func_153157_c", "glGetShaderi")); + mInitMap.put(new Pair("func_153158_d", "glGetShaderInfoLog")); + mInitMap.put(new Pair("func_153159_d", "glUniform4")); + mInitMap.put(new Pair("func_153160_c", "glUniformMatrix4")); + mInitMap.put(new Pair("func_153161_d", "glUseProgram")); + mInitMap.put(new Pair("func_153162_d", "glUniform4")); + mInitMap.put(new Pair("func_153163_f", "glUniform1i")); + mInitMap.put(new Pair("func_153164_b", "glGetAttribLocation")); + mInitMap.put(new Pair("func_153166_e", "glGetProgramInfoLog")); + mInitMap.put(new Pair("func_153168_a", "glUniform1")); + mInitMap.put(new Pair("func_153169_a", "glShaderSource")); + mInitMap.put(new Pair("func_153170_c", "glCompileShader")); + mInitMap.put(new Pair("func_153173_a", "glUniformMatrix2")); + mInitMap.put(new Pair("func_153175_a", "glGetProgrami")); + mInitMap.put(new Pair("func_153177_b", "glUniform2")); + mInitMap.put(new Pair("func_153178_b", "glAttachShader")); + mInitMap.put(new Pair("func_153179_f", "glLinkProgram")); + mInitMap.put(new Pair("func_153180_a", "glDeleteShader")); + mInitMap.put(new Pair("func_153181_a", "glUniform1")); + mInitMap.put(new Pair("func_153182_b", "glUniform2")); + } + + + private static void init3() { + mInitMap.put(new Pair("func_153183_d", "glCreateProgram")); + mInitMap.put(new Pair("func_153187_e", "glDeleteProgram")); + mInitMap.put(new Pair("func_153189_b", "glUniformMatrix3")); + mInitMap.put(new Pair("func_153191_c", "glUniform3")); + mInitMap.put(new Pair("func_153192_c", "glUniform3")); + mInitMap.put(new Pair("func_153194_a", "glGetUniformLocation")); + mInitMap.put(new Pair("func_153195_b", "glCreateShader")); + mInitMap.put(new Pair("func_154310_c", "getButtonHeight")); + mInitMap.put(new Pair("func_154311_a", "setText")); + mInitMap.put(new Pair("func_154313_b", "setEnabled")); + mInitMap.put(new Pair("func_154314_d", "getId")); + mInitMap.put(new Pair("func_154315_e", "getEnabled")); + mInitMap.put(new Pair("func_154316_f", "getPositionY")); + mInitMap.put(new Pair("func_154317_g", "getRealmsButton")); + mInitMap.put(new Pair("func_154331_x", "getLastActiveTime")); + mInitMap.put(new Pair("func_154346_a", "hasAcceptedEULA")); + mInitMap.put(new Pair("func_154347_a", "loadEULAFile")); + mInitMap.put(new Pair("func_154348_b", "createEULAFile")); + mInitMap.put(new Pair("func_155759_m", "setServerResourcePack")); + mInitMap.put(new Pair("func_70000_a", "addServerStatsToSnooper")); + mInitMap.put(new Pair("func_70001_b", "addServerTypeToSnooper")); + mInitMap.put(new Pair("func_70002_Q", "isSnooperEnabled")); + mInitMap.put(new Pair("func_70003_b", "canCommandSenderUseCommand")); + mInitMap.put(new Pair("func_70005_c_", "getCommandSenderName")); + mInitMap.put(new Pair("func_70007_b", "resetLog")); + mInitMap.put(new Pair("func_70008_c", "getLogContents")); + mInitMap.put(new Pair("func_70011_f", "getDistance")); + mInitMap.put(new Pair("func_70012_b", "setLocationAndAngles")); + mInitMap.put(new Pair("func_70013_c", "getBrightness")); + mInitMap.put(new Pair("func_70014_b", "writeEntityToNBT")); + mInitMap.put(new Pair("func_70015_d", "setFire")); + mInitMap.put(new Pair("func_70016_h", "setVelocity")); + mInitMap.put(new Pair("func_70018_K", "setBeenAttacked")); + mInitMap.put(new Pair("func_70019_c", "setEating")); + mInitMap.put(new Pair("func_70020_e", "readFromNBT")); + mInitMap.put(new Pair("func_70021_al", "getParts")); + mInitMap.put(new Pair("func_70022_Q", "getEntityString")); + mInitMap.put(new Pair("func_70024_g", "addVelocity")); + mInitMap.put(new Pair("func_70026_G", "isWet")); + mInitMap.put(new Pair("func_70027_ad", "isBurning")); + mInitMap.put(new Pair("func_70028_i", "isEntityEqual")); + mInitMap.put(new Pair("func_70029_a", "setWorld")); + mInitMap.put(new Pair("func_70030_z", "onEntityUpdate")); + mInitMap.put(new Pair("func_70031_b", "setSprinting")); + mInitMap.put(new Pair("func_70032_d", "getDistanceToEntity")); + mInitMap.put(new Pair("func_70033_W", "getYOffset")); + mInitMap.put(new Pair("func_70034_d", "setRotationYawHead")); + mInitMap.put(new Pair("func_70035_c", "getInventory")); + mInitMap.put(new Pair("func_70037_a", "readEntityFromNBT")); + mInitMap.put(new Pair("func_70038_c", "isOffsetPositionInLiquid")); + mInitMap.put(new Pair("func_70039_c", "writeToNBTOptional")); + mInitMap.put(new Pair("func_70040_Z", "getLookVec")); + mInitMap.put(new Pair("func_70041_e_", "canTriggerWalking")); + mInitMap.put(new Pair("func_70042_X", "getMountedYOffset")); + mInitMap.put(new Pair("func_70043_V", "updateRiderPosition")); + mInitMap.put(new Pair("func_70044_A", "setOnFireFromLava")); + mInitMap.put(new Pair("func_70045_F", "isImmuneToFire")); + mInitMap.put(new Pair("func_70046_E", "getBoundingBox")); + mInitMap.put(new Pair("func_70047_e", "getEyeHeight")); + mInitMap.put(new Pair("func_70049_a", "mInitMap.put(newFloatNBTList")); + mInitMap.put(new Pair("func_70050_g", "setAir")); + mInitMap.put(new Pair("func_70051_ag", "isSprinting")); + mInitMap.put(new Pair("func_70052_a", "setFlag")); + mInitMap.put(new Pair("func_70053_R", "getShadowSize")); + mInitMap.put(new Pair("func_70055_a", "isInsideOfMaterial")); + mInitMap.put(new Pair("func_70056_a", "setPositionAndRotation2")); + mInitMap.put(new Pair("func_70057_ab", "performHurtAnimation")); + mInitMap.put(new Pair("func_70058_J", "handleLavaMovement")); + mInitMap.put(new Pair("func_70060_a", "moveFlying")); + mInitMap.put(new Pair("func_70062_b", "setCurrentItemOrArmor")); + mInitMap.put(new Pair("func_70063_aa", "setInPortal")); + mInitMap.put(new Pair("func_70064_a", "updateFallState")); + mInitMap.put(new Pair("func_70065_x", "preparePlayerToSpawn")); + mInitMap.put(new Pair("func_70066_B", "extinguish")); + mInitMap.put(new Pair("func_70067_L", "canBeCollidedWith")); + mInitMap.put(new Pair("func_70068_e", "getDistanceSqToEntity")); + mInitMap.put(new Pair("func_70069_a", "fall")); + mInitMap.put(new Pair("func_70070_b", "getBrightnessForRender")); + mInitMap.put(new Pair("func_70071_h_", "onUpdate")); + mInitMap.put(new Pair("func_70072_I", "handleWaterMovement")); + mInitMap.put(new Pair("func_70074_a", "onKillEntity")); + mInitMap.put(new Pair("func_70075_an", "canAttackWithItem")); + mInitMap.put(new Pair("func_70076_C", "kill")); + mInitMap.put(new Pair("func_70077_a", "onStruckByLightning")); + mInitMap.put(new Pair("func_70078_a", "mountEntity")); + mInitMap.put(new Pair("func_70079_am", "getRotationYawHead")); + mInitMap.put(new Pair("func_70080_a", "setPositionAndRotation")); + mInitMap.put(new Pair("func_70081_e", "dealFireDamage")); + mInitMap.put(new Pair("func_70082_c", "setAngles")); + mInitMap.put(new Pair("func_70083_f", "getFlag")); + mInitMap.put(new Pair("func_70084_c", "addToPlayerScore")); + mInitMap.put(new Pair("func_70085_c", "interact")); + mInitMap.put(new Pair("func_70086_ai", "getAir")); + mInitMap.put(new Pair("func_70087_a", "mInitMap.put(newDoubleNBTList")); + mInitMap.put(new Pair("func_70088_a", "entityInit")); + mInitMap.put(new Pair("func_70089_S", "isEntityAlive")); + mInitMap.put(new Pair("func_70090_H", "isInWater")); + mInitMap.put(new Pair("func_70091_d", "moveEntity")); + mInitMap.put(new Pair("func_70092_e", "getDistanceSq")); + mInitMap.put(new Pair("func_70093_af", "isSneaking")); + mInitMap.put(new Pair("func_70094_T", "isEntityInsideOpaqueBlock")); + mInitMap.put(new Pair("func_70095_a", "setSneaking")); + mInitMap.put(new Pair("func_70096_w", "getDataWatcher")); + mInitMap.put(new Pair("func_70097_a", "attackEntityFrom")); + mInitMap.put(new Pair("func_70098_U", "updateRidden")); + mInitMap.put(new Pair("func_70099_a", "entityDropItem")); + mInitMap.put(new Pair("func_70100_b_", "onCollideWithPlayer")); + mInitMap.put(new Pair("func_70101_b", "setRotation")); + mInitMap.put(new Pair("func_70103_a", "handleHealthUpdate")); + mInitMap.put(new Pair("func_70104_M", "canBePushed")); + mInitMap.put(new Pair("func_70105_a", "setSize")); + mInitMap.put(new Pair("func_70106_y", "setDead")); + mInitMap.put(new Pair("func_70107_b", "setPosition")); + mInitMap.put(new Pair("func_70108_f", "applyEntityCollision")); + mInitMap.put(new Pair("func_70109_d", "writeToNBT")); + mInitMap.put(new Pair("func_70110_aj", "setInWeb")); + mInitMap.put(new Pair("func_70111_Y", "getCollisionBorderSize")); + mInitMap.put(new Pair("func_70112_a", "isInRangeToRenderDist")); + mInitMap.put(new Pair("func_70113_ah", "isEating")); + mInitMap.put(new Pair("func_70114_g", "getCollisionBox")); + mInitMap.put(new Pair("func_70115_ae", "isRiding")); + mInitMap.put(new Pair("func_70184_a", "onImpact")); + mInitMap.put(new Pair("func_70185_h", "getGravityVelocity")); + mInitMap.put(new Pair("func_70186_c", "setThrowableHeading")); + mInitMap.put(new Pair("func_70196_i", "getPotionDamage")); + mInitMap.put(new Pair("func_70220_a", "moveTowards")); + mInitMap.put(new Pair("func_70227_a", "onImpact")); + mInitMap.put(new Pair("func_70239_b", "setDamage")); + mInitMap.put(new Pair("func_70240_a", "setKnockbackStrength")); + mInitMap.put(new Pair("func_70241_g", "getIsCritical")); + mInitMap.put(new Pair("func_70242_d", "getDamage")); + mInitMap.put(new Pair("func_70243_d", "setIsCritical")); + mInitMap.put(new Pair("func_70265_b", "setTimeSinceHit")); + mInitMap.put(new Pair("func_70266_a", "setDamageTaken")); + mInitMap.put(new Pair("func_70267_i", "getForwardDirection")); + mInitMap.put(new Pair("func_70268_h", "getTimeSinceHit")); + mInitMap.put(new Pair("func_70269_c", "setForwardDirection")); + mInitMap.put(new Pair("func_70270_d", "setIsBoatEmpty")); + mInitMap.put(new Pair("func_70271_g", "getDamageTaken")); + mInitMap.put(new Pair("func_70288_d", "setAgeToCreativeDespawnTime")); + mInitMap.put(new Pair("func_70289_a", "combineItems")); + mInitMap.put(new Pair("func_70295_k_", "openChest")); + mInitMap.put(new Pair("func_70296_d", "markDirty")); + mInitMap.put(new Pair("func_70297_j_", "getInventoryStackLimit")); + mInitMap.put(new Pair("func_70298_a", "decrStackSize")); + mInitMap.put(new Pair("func_70299_a", "setInventorySlotContents")); + mInitMap.put(new Pair("func_70300_a", "isUseableByPlayer")); + mInitMap.put(new Pair("func_70301_a", "getStackInSlot")); + mInitMap.put(new Pair("func_70302_i_", "getSizeInventory")); + mInitMap.put(new Pair("func_70304_b", "getStackInSlotOnClosing")); + mInitMap.put(new Pair("func_70305_f", "closeChest")); + mInitMap.put(new Pair("func_70429_k", "decrementAnimations")); + mInitMap.put(new Pair("func_70430_l", "getTotalArmorValue")); + mInitMap.put(new Pair("func_70431_c", "hasItemStack")); + mInitMap.put(new Pair("func_70432_d", "storeItemStack")); + mInitMap.put(new Pair("func_70436_m", "dropAllItems")); + mInitMap.put(new Pair("func_70437_b", "setItemStack")); + mInitMap.put(new Pair("func_70440_f", "armorItemInSlot")); + mInitMap.put(new Pair("func_70441_a", "addItemStackToInventory")); + mInitMap.put(new Pair("func_70442_a", "writeToNBT")); + mInitMap.put(new Pair("func_70443_b", "readFromNBT")); + mInitMap.put(new Pair("func_70445_o", "getItemStack")); + mInitMap.put(new Pair("func_70447_i", "getFirstEmptyStack")); + mInitMap.put(new Pair("func_70448_g", "getCurrentItem")); + mInitMap.put(new Pair("func_70449_g", "damageArmor")); + mInitMap.put(new Pair("func_70451_h", "getHotbarSize")); + mInitMap.put(new Pair("func_70452_e", "storePartialItemStack")); + mInitMap.put(new Pair("func_70453_c", "changeCurrentItem")); + mInitMap.put(new Pair("func_70455_b", "copyInventory")); + mInitMap.put(new Pair("func_70463_b", "getStackInRowAndColumn")); + mInitMap.put(new Pair("func_70468_h", "getCurrentRecipe")); + mInitMap.put(new Pair("func_70469_d", "inventoryResetNeededOnSlotChange")); + mInitMap.put(new Pair("func_70470_g", "resetRecipeAndSlots")); + mInitMap.put(new Pair("func_70471_c", "setCurrentRecipeIndex")); + mInitMap.put(new Pair("func_70486_a", "loadInventoryFromNBT")); + mInitMap.put(new Pair("func_70487_g", "saveInventoryToNBT")); + mInitMap.put(new Pair("func_70491_i", "getDamage")); + mInitMap.put(new Pair("func_70492_c", "setDamage")); + mInitMap.put(new Pair("func_70493_k", "getRollingDirection")); + mInitMap.put(new Pair("func_70494_i", "setRollingDirection")); + mInitMap.put(new Pair("func_70496_j", "getRollingAmplitude")); + mInitMap.put(new Pair("func_70497_h", "setRollingAmplitude")); + mInitMap.put(new Pair("func_70515_d", "explode")); + mInitMap.put(new Pair("func_70518_d", "onValidSurface")); + mInitMap.put(new Pair("func_70526_d", "getXpValue")); + mInitMap.put(new Pair("func_70527_a", "getXPSplit")); + mInitMap.put(new Pair("func_70528_g", "getTextureByXP")); + mInitMap.put(new Pair("func_70534_d", "getRedColorF")); + mInitMap.put(new Pair("func_70535_g", "getBlueColorF")); + mInitMap.put(new Pair("func_70536_a", "setParticleTextureIndex")); + mInitMap.put(new Pair("func_70537_b", "getFXLayer")); + mInitMap.put(new Pair("func_70538_b", "setRBGColorF")); + mInitMap.put(new Pair("func_70539_a", "renderParticle")); + mInitMap.put(new Pair("func_70541_f", "multipleParticleScaleBy")); + mInitMap.put(new Pair("func_70542_f", "getGreenColorF")); + mInitMap.put(new Pair("func_70543_e", "multiplyVelocity")); + mInitMap.put(new Pair("func_70589_b", "setBaseSpellTextureIndex")); + mInitMap.put(new Pair("func_70596_a", "applyColourMultiplier")); + mInitMap.put(new Pair("func_70599_aP", "getSoundVolume")); + mInitMap.put(new Pair("func_70600_l", "dropRareDrop")); + mInitMap.put(new Pair("func_70601_bi", "getCanSpawnHere")); + mInitMap.put(new Pair("func_70603_bj", "getRenderSizeModifier")); + mInitMap.put(new Pair("func_70604_c", "setRevengeTarget")); + mInitMap.put(new Pair("func_70605_aq", "getMoveHelper")); + mInitMap.put(new Pair("func_70606_j", "setHealth")); + mInitMap.put(new Pair("func_70608_bn", "isPlayerSleeping")); + mInitMap.put(new Pair("func_70609_aI", "onDeathUpdate")); + mInitMap.put(new Pair("func_70610_aX", "isMovementBlocked")); + mInitMap.put(new Pair("func_70612_e", "moveEntityWithHeading")); + mInitMap.put(new Pair("func_70613_aW", "isServerWorld")); + mInitMap.put(new Pair("func_70614_a", "rayTrace")); + mInitMap.put(new Pair("func_70615_aA", "eatGrassBonus")); + mInitMap.put(new Pair("func_70617_f_", "isOnLadder")); + mInitMap.put(new Pair("func_70618_n", "removePotionEffectClient")); + mInitMap.put(new Pair("func_70619_bc", "updateAITasks")); + mInitMap.put(new Pair("func_70620_b", "getItemIcon")); + mInitMap.put(new Pair("func_70621_aR", "getHurtSound")); + mInitMap.put(new Pair("func_70623_bb", "despawnEntity")); + mInitMap.put(new Pair("func_70624_b", "setAttackTarget")); + mInitMap.put(new Pair("func_70625_a", "faceEntity")); + mInitMap.put(new Pair("func_70626_be", "updateEntityActionState")); + mInitMap.put(new Pair("func_70627_aG", "getTalkInterval")); + mInitMap.put(new Pair("func_70628_a", "dropFewItems")); + mInitMap.put(new Pair("func_70629_bd", "updateAITick")); + mInitMap.put(new Pair("func_70631_g_", "isChild")); + mInitMap.put(new Pair("func_70632_aY", "isBlocking")); + mInitMap.put(new Pair("func_70634_a", "setPositionAndUpdate")); + mInitMap.put(new Pair("func_70635_at", "getEntitySenses")); + mInitMap.put(new Pair("func_70636_d", "onLivingUpdate")); + mInitMap.put(new Pair("func_70637_d", "setJumping")); + mInitMap.put(new Pair("func_70638_az", "getAttackTarget")); + mInitMap.put(new Pair("func_70639_aQ", "getLivingSound")); + mInitMap.put(new Pair("func_70641_bl", "getMaxSpawnedInChunk")); + mInitMap.put(new Pair("func_70642_aH", "playLivingSound")); + mInitMap.put(new Pair("func_70643_av", "getAITarget")); + mInitMap.put(new Pair("func_70644_a", "isPotionActive")); + mInitMap.put(new Pair("func_70645_a", "onDeath")); + mInitMap.put(new Pair("func_70646_bf", "getVerticalFaceSpeed")); + mInitMap.put(new Pair("func_70647_i", "getSoundPitch")); + mInitMap.put(new Pair("func_70648_aU", "canBreatheUnderwater")); + mInitMap.put(new Pair("func_70650_aV", "isAIEnabled")); + mInitMap.put(new Pair("func_70651_bq", "getActivePotionEffects")); + mInitMap.put(new Pair("func_70652_k", "attackEntityAsMob")); + mInitMap.put(new Pair("func_70653_a", "knockBack")); + mInitMap.put(new Pair("func_70654_ax", "getAge")); + mInitMap.put(new Pair("func_70655_b", "applyArmorCalculations")); + mInitMap.put(new Pair("func_70656_aK", "spawnExplosionParticle")); + mInitMap.put(new Pair("func_70657_f", "setMoveForward")); + mInitMap.put(new Pair("func_70658_aO", "getTotalArmorValue")); + mInitMap.put(new Pair("func_70659_e", "setAIMoveSpeed")); + mInitMap.put(new Pair("func_70660_b", "getActivePotionEffect")); + mInitMap.put(new Pair("func_70661_as", "getNavigator")); + mInitMap.put(new Pair("func_70662_br", "isEntityUndead")); + mInitMap.put(new Pair("func_70663_b", "updateRotation")); + mInitMap.put(new Pair("func_70664_aZ", "jump")); + mInitMap.put(new Pair("func_70665_d", "damageEntity")); + mInitMap.put(new Pair("func_70666_h", "getPosition")); + mInitMap.put(new Pair("func_70668_bt", "getCreatureAttribute")); + mInitMap.put(new Pair("func_70669_a", "renderBrokenItemStack")); + mInitMap.put(new Pair("func_70670_a", "onmInitMap.put(newPotionEffect")); + mInitMap.put(new Pair("func_70671_ap", "getLookHelper")); + mInitMap.put(new Pair("func_70672_c", "applyPotionDamageCalculations")); + mInitMap.put(new Pair("func_70673_aS", "getDeathSound")); + mInitMap.put(new Pair("func_70674_bp", "clearActivePotions")); + mInitMap.put(new Pair("func_70675_k", "damageArmor")); + mInitMap.put(new Pair("func_70676_i", "getLook")); + mInitMap.put(new Pair("func_70678_g", "getSwingProgress")); + mInitMap.put(new Pair("func_70679_bo", "updatePotionEffects")); + mInitMap.put(new Pair("func_70681_au", "getRNG")); + mInitMap.put(new Pair("func_70682_h", "decreaseAirSupply")); + mInitMap.put(new Pair("func_70683_ar", "getJumpHelper")); + mInitMap.put(new Pair("func_70684_aJ", "isPlayer")); + mInitMap.put(new Pair("func_70685_l", "canEntityBeSeen")); + mInitMap.put(new Pair("func_70686_a", "canAttackClass")); + mInitMap.put(new Pair("func_70687_e", "isPotionApplicable")); + mInitMap.put(new Pair("func_70688_c", "onFinishedPotionEffect")); + mInitMap.put(new Pair("func_70689_ay", "getAIMoveSpeed")); + mInitMap.put(new Pair("func_70690_d", "addPotionEffect")); + mInitMap.put(new Pair("func_70691_i", "heal")); + mInitMap.put(new Pair("func_70692_ba", "canDespawn")); + mInitMap.put(new Pair("func_70693_a", "getExperiencePoints")); + mInitMap.put(new Pair("func_70694_bm", "getHeldItem")); + mInitMap.put(new Pair("func_70695_b", "onChangedPotionEffect")); + mInitMap.put(new Pair("func_70777_m", "getEntityToAttack")); + mInitMap.put(new Pair("func_70778_a", "setPathToEntity")); + mInitMap.put(new Pair("func_70779_j", "updateWanderPath")); + mInitMap.put(new Pair("func_70780_i", "isMovementCeased")); + mInitMap.put(new Pair("func_70781_l", "hasPath")); + mInitMap.put(new Pair("func_70782_k", "findPlayerToAttack")); + mInitMap.put(new Pair("func_70783_a", "getBlockPathWeight")); + mInitMap.put(new Pair("func_70784_b", "setTarget")); + mInitMap.put(new Pair("func_70785_a", "attackEntity")); + mInitMap.put(new Pair("func_70790_a", "isCourseTraversable")); + mInitMap.put(new Pair("func_70799_a", "setSlimeSize")); + mInitMap.put(new Pair("func_70800_m", "canDamagePlayer")); + mInitMap.put(new Pair("func_70801_i", "getSlimeParticle")); + mInitMap.put(new Pair("func_70802_j", "createInstance")); + mInitMap.put(new Pair("func_70803_o", "getJumpSound")); + mInitMap.put(new Pair("func_70804_p", "makesSoundOnLand")); + mInitMap.put(new Pair("func_70805_n", "getAttackStrength")); + mInitMap.put(new Pair("func_70806_k", "getJumpDelay")); + mInitMap.put(new Pair("func_70807_r", "makesSoundOnJump")); + mInitMap.put(new Pair("func_70808_l", "alterSquishAmount")); + mInitMap.put(new Pair("func_70809_q", "getSlimeSize")); + mInitMap.put(new Pair("func_70814_o", "isValidLightLevel")); + mInitMap.put(new Pair("func_70816_c", "teleportToEntity")); + mInitMap.put(new Pair("func_70817_b", "setCarryingData")); + mInitMap.put(new Pair("func_70819_e", "setScreaming")); + mInitMap.put(new Pair("func_70820_n", "teleportRandomly")); + mInitMap.put(new Pair("func_70821_d", "shouldAttackPlayer")); + mInitMap.put(new Pair("func_70823_r", "isScreaming")); + mInitMap.put(new Pair("func_70824_q", "getCarryingData")); + mInitMap.put(new Pair("func_70825_j", "teleportTo")); + mInitMap.put(new Pair("func_70829_a", "setCreeperState")); + mInitMap.put(new Pair("func_70830_n", "getPowered")); + mInitMap.put(new Pair("func_70831_j", "getCreeperFlashIntensity")); + mInitMap.put(new Pair("func_70832_p", "getCreeperState")); + mInitMap.put(new Pair("func_70835_c", "becomeAngryAt")); + mInitMap.put(new Pair("func_70839_e", "setBesideClimbableBlock")); + mInitMap.put(new Pair("func_70841_p", "isBesideClimbableBlock")); + mInitMap.put(new Pair("func_70849_f", "setPlayerCreated")); + mInitMap.put(new Pair("func_70850_q", "isPlayerCreated")); + mInitMap.put(new Pair("func_70851_e", "setHoldingRose")); + mInitMap.put(new Pair("func_70852_n", "getVillage")); + mInitMap.put(new Pair("func_70853_p", "getHoldRoseTick")); + mInitMap.put(new Pair("func_70854_o", "getAttackTimer")); + mInitMap.put(new Pair("func_70873_a", "setGrowingAge")); + mInitMap.put(new Pair("func_70874_b", "getGrowingAge")); + mInitMap.put(new Pair("func_70875_t", "resetInLove")); + mInitMap.put(new Pair("func_70876_c", "procreate")); + mInitMap.put(new Pair("func_70877_b", "isBreedingItem")); + mInitMap.put(new Pair("func_70878_b", "canMateWith")); + mInitMap.put(new Pair("func_70880_s", "isInLove")); + mInitMap.put(new Pair("func_70890_k", "getHeadRotationAngleX")); + mInitMap.put(new Pair("func_70891_b", "setFleeceColor")); + mInitMap.put(new Pair("func_70892_o", "getSheared")); + mInitMap.put(new Pair("func_70893_e", "setSheared")); + mInitMap.put(new Pair("func_70894_j", "getHeadRotationPointY")); + mInitMap.put(new Pair("func_70895_a", "getRandomFleeceColor")); + mInitMap.put(new Pair("func_70896_n", "getFleeceColor")); + mInitMap.put(new Pair("func_70900_e", "setSaddled")); + mInitMap.put(new Pair("func_70901_n", "getSaddled")); + mInitMap.put(new Pair("func_70902_q", "getOwner")); + mInitMap.put(new Pair("func_70903_f", "setTamed")); + mInitMap.put(new Pair("func_70904_g", "setSitting")); + mInitMap.put(new Pair("func_70906_o", "isSitting")); + mInitMap.put(new Pair("func_70907_r", "getAISit")); + mInitMap.put(new Pair("func_70908_e", "playTameEffect")); + mInitMap.put(new Pair("func_70909_n", "isTamed")); + mInitMap.put(new Pair("func_70912_b", "setTameSkin")); + mInitMap.put(new Pair("func_70913_u", "getTameSkin")); + mInitMap.put(new Pair("func_70915_j", "getShadingWhileWet")); + mInitMap.put(new Pair("func_70916_h", "setAngry")); + mInitMap.put(new Pair("func_70917_k", "getInterestedAngle")); + mInitMap.put(new Pair("func_70919_bu", "isAngry")); + mInitMap.put(new Pair("func_70920_v", "getTailRotation")); + mInitMap.put(new Pair("func_70921_u", "isWolfWet")); + mInitMap.put(new Pair("func_70923_f", "getShakeAngle")); + mInitMap.put(new Pair("func_70930_a", "setRecipes")); + mInitMap.put(new Pair("func_70931_l_", "getCustomer")); + mInitMap.put(new Pair("func_70932_a_", "setCustomer")); + mInitMap.put(new Pair("func_70933_a", "useRecipe")); + mInitMap.put(new Pair("func_70934_b", "getRecipes")); + mInitMap.put(new Pair("func_70938_b", "setProfession")); + mInitMap.put(new Pair("func_70939_f", "setPlaying")); + mInitMap.put(new Pair("func_70940_q", "isTrading")); + mInitMap.put(new Pair("func_70941_o", "isMating")); + mInitMap.put(new Pair("func_70942_a", "generateRandomParticles")); + mInitMap.put(new Pair("func_70945_p", "isPlaying")); + mInitMap.put(new Pair("func_70946_n", "getProfession")); + mInitMap.put(new Pair("func_70947_e", "setMating")); + mInitMap.put(new Pair("func_70950_c", "addDefaultEquipmentAndRecipies")); + mInitMap.put(new Pair("func_70965_a", "attackEntityFromPart")); + mInitMap.put(new Pair("func_70967_k", "setmInitMap.put(newTarget")); + mInitMap.put(new Pair("func_70969_j", "updateDragonEnderCrystal")); + mInitMap.put(new Pair("func_70970_a", "collideWithEntities")); + mInitMap.put(new Pair("func_70971_b", "attackEntitiesInList")); + mInitMap.put(new Pair("func_70972_a", "destroyBlocksInAABB")); + mInitMap.put(new Pair("func_70973_b", "simplifyAngle")); + mInitMap.put(new Pair("func_70974_a", "getMovementOffsets")); + mInitMap.put(new Pair("func_70975_a", "createEnderPortal")); + mInitMap.put(new Pair("func_70996_bM", "shouldHeal")); + mInitMap.put(new Pair("func_70997_bJ", "getBedLocation")); + mInitMap.put(new Pair("func_70998_m", "interactWith")); + mInitMap.put(new Pair("func_70999_a", "wakeUpPlayer")); + mInitMap.put(new Pair("func_71000_j", "addMovementStat")); + mInitMap.put(new Pair("func_71001_a", "onItemPickup")); + mInitMap.put(new Pair("func_71002_c", "displayGUIEnchantment")); + mInitMap.put(new Pair("func_71004_bE", "respawnPlayer")); + mInitMap.put(new Pair("func_71005_bN", "getInventoryEnderChest")); + mInitMap.put(new Pair("func_71007_a", "displayGUIChest")); + mInitMap.put(new Pair("func_71008_a", "setItemInUse")); + mInitMap.put(new Pair("func_71009_b", "onCriticalHit")); + mInitMap.put(new Pair("func_71010_c", "updateItemUse")); + mInitMap.put(new Pair("func_71011_bu", "getItemInUse")); + mInitMap.put(new Pair("func_71012_a", "joinEntityItemWithWorld")); + mInitMap.put(new Pair("func_71015_k", "addMountedMovementStat")); + mInitMap.put(new Pair("func_71016_p", "sendPlayerAbilities")); + mInitMap.put(new Pair("func_71018_a", "sleepInBedAt")); + mInitMap.put(new Pair("func_71019_a", "dropPlayerItemWithRandomChoice")); + mInitMap.put(new Pair("func_71020_j", "addExhaustion")); + mInitMap.put(new Pair("func_71023_q", "addExperience")); + mInitMap.put(new Pair("func_71024_bL", "getFoodStats")); + mInitMap.put(new Pair("func_71026_bH", "isPlayerFullyAsleep")); + mInitMap.put(new Pair("func_71027_c", "travelToDimension")); + mInitMap.put(new Pair("func_71028_bD", "destroyCurrentEquippedItem")); + mInitMap.put(new Pair("func_71029_a", "triggerAchievement")); + mInitMap.put(new Pair("func_71030_a", "displayGUIMerchant")); + mInitMap.put(new Pair("func_71033_a", "setGameType")); + mInitMap.put(new Pair("func_71034_by", "stopUsingItem")); + mInitMap.put(new Pair("func_71036_o", "onItemUseFinish")); + mInitMap.put(new Pair("func_71037_bA", "getScore")); + mInitMap.put(new Pair("func_71038_i", "swingItem")); + mInitMap.put(new Pair("func_71039_bw", "isUsingItem")); + mInitMap.put(new Pair("func_71040_bB", "dropOneItem")); + mInitMap.put(new Pair("func_71041_bz", "clearItemInUse")); + mInitMap.put(new Pair("func_71043_e", "canEat")); + mInitMap.put(new Pair("func_71044_o", "collideWithPlayer")); + mInitMap.put(new Pair("func_71045_bC", "getCurrentEquippedItem")); + mInitMap.put(new Pair("func_71047_c", "onEnchantmentCritical")); + mInitMap.put(new Pair("func_71048_c", "displayGUIBook")); + mInitMap.put(new Pair("func_71049_a", "clonePlayer")); + mInitMap.put(new Pair("func_71050_bK", "xpBarCap")); + mInitMap.put(new Pair("func_71051_bG", "getBedOrientationInDegrees")); + mInitMap.put(new Pair("func_71052_bv", "getItemInUseCount")); + mInitMap.put(new Pair("func_71053_j", "closeScreen")); + mInitMap.put(new Pair("func_71056_a", "verifyRespawnCoordinates")); + mInitMap.put(new Pair("func_71057_bx", "getItemInUseDuration")); + mInitMap.put(new Pair("func_71058_b", "displayGUIWorkbench")); + mInitMap.put(new Pair("func_71059_n", "attackTargetEntityWithCurrentItem")); + mInitMap.put(new Pair("func_71060_bI", "getSleepTimer")); + mInitMap.put(new Pair("func_71061_d_", "resetHeight")); + mInitMap.put(new Pair("func_71063_a", "setSpawnChunk")); + mInitMap.put(new Pair("func_71064_a", "addStat")); + mInitMap.put(new Pair("func_71065_l", "isInBed")); + mInitMap.put(new Pair("func_71110_a", "updateCraftingInventory")); + mInitMap.put(new Pair("func_71111_a", "sendSlotContents")); + mInitMap.put(new Pair("func_71112_a", "sendProgressBarUpdate")); + mInitMap.put(new Pair("func_71113_k", "updateHeldItem")); + mInitMap.put(new Pair("func_71114_r", "getPlayerIP")); + mInitMap.put(new Pair("func_71116_b", "addSelfToInternalCraftingInventory")); + mInitMap.put(new Pair("func_71117_bO", "getNextWindowId")); + mInitMap.put(new Pair("func_71118_n", "setPlayerHealthUpdated")); + mInitMap.put(new Pair("func_71120_a", "sendContainerToPlayer")); + mInitMap.put(new Pair("func_71121_q", "getServerForPlayer")); + mInitMap.put(new Pair("func_71122_b", "handleFalling")); + mInitMap.put(new Pair("func_71123_m", "mountEntityAndWakeUp")); + mInitMap.put(new Pair("func_71124_b", "getEquipmentInSlot")); + mInitMap.put(new Pair("func_71127_g", "onUpdateEntity")); + mInitMap.put(new Pair("func_71128_l", "closeContainer")); + mInitMap.put(new Pair("func_71150_b", "setPlayerSPHealth")); + mInitMap.put(new Pair("func_71151_f", "getFOVMultiplier")); + mInitMap.put(new Pair("func_71152_a", "setXPStats")); + mInitMap.put(new Pair("func_71153_f", "isBlockNormal")); + mInitMap.put(new Pair("func_71165_d", "sendChatMessage")); + mInitMap.put(new Pair("func_71166_b", "sendMotionUpdates")); + mInitMap.put(new Pair("func_71187_D", "getCommandManager")); + mInitMap.put(new Pair("func_71188_g", "setAllowPvp")); + mInitMap.put(new Pair("func_71189_e", "setHostname")); + mInitMap.put(new Pair("func_71190_q", "updateTimeLightAndEntities")); + mInitMap.put(new Pair("func_71191_d", "setBuildLimit")); + mInitMap.put(new Pair("func_71192_d", "setUserMessage")); + mInitMap.put(new Pair("func_71193_K", "allowSpawnMonsters")); + mInitMap.put(new Pair("func_71194_c", "canCreateBonusChest")); + mInitMap.put(new Pair("func_71195_b_", "getUserMessage")); + mInitMap.put(new Pair("func_71197_b", "startServer")); + mInitMap.put(new Pair("func_71198_k", "logDebug")); + mInitMap.put(new Pair("func_71199_h", "isHardcore")); + mInitMap.put(new Pair("func_71200_ad", "serverIsInRunLoop")); + mInitMap.put(new Pair("func_71201_j", "logSevere")); + mInitMap.put(new Pair("func_71203_ab", "getConfigurationManager")); + mInitMap.put(new Pair("func_71204_b", "setDemo")); + mInitMap.put(new Pair("func_71205_p", "setMOTD")); + mInitMap.put(new Pair("func_71206_a", "shareToLAN")); + mInitMap.put(new Pair("func_71207_Z", "getBuildLimit")); + mInitMap.put(new Pair("func_71208_b", "setServerPort")); + mInitMap.put(new Pair("func_71209_f", "getFile")); + mInitMap.put(new Pair("func_71211_k", "getServerHostname")); + mInitMap.put(new Pair("func_71213_z", "getAllUsernames")); + mInitMap.put(new Pair("func_71214_G", "getServerOwner")); + mInitMap.put(new Pair("func_71215_F", "getServerPort")); + mInitMap.put(new Pair("func_71216_a_", "outputPercentRemaining")); + mInitMap.put(new Pair("func_71217_p", "tick")); + mInitMap.put(new Pair("func_71218_a", "worldServerForDimension")); + mInitMap.put(new Pair("func_71219_W", "isPVPEnabled")); + mInitMap.put(new Pair("func_71220_V", "getCanSpawnNPCs")); + mInitMap.put(new Pair("func_71221_J", "getWorldName")); + mInitMap.put(new Pair("func_71222_d", "initialWorldChunkLoad")); + mInitMap.put(new Pair("func_71223_ag", "enableProfiling")); + mInitMap.put(new Pair("func_71224_l", "setServerOwner")); + mInitMap.put(new Pair("func_71225_e", "canStructuresSpawn")); + mInitMap.put(new Pair("func_71228_a", "finalTick")); + mInitMap.put(new Pair("func_71229_d", "setOnlineMode")); + mInitMap.put(new Pair("func_71230_b", "addServerInfoToCrashReport")); + mInitMap.put(new Pair("func_71231_X", "isFlightAllowed")); + mInitMap.put(new Pair("func_71233_x", "getCurrentPlayerCount")); + mInitMap.put(new Pair("func_71234_u", "getPort")); + mInitMap.put(new Pair("func_71235_a", "setGameType")); + mInitMap.put(new Pair("func_71236_h", "logWarning")); + mInitMap.put(new Pair("func_71237_c", "convertMapIfNeeded")); + mInitMap.put(new Pair("func_71238_n", "getDataDirectory")); + mInitMap.put(new Pair("func_71239_B", "isDebuggingEnabled")); + mInitMap.put(new Pair("func_71240_o", "systemExitNow")); + mInitMap.put(new Pair("func_71241_aa", "isServerStopped")); + mInitMap.put(new Pair("func_71242_L", "isDemo")); + mInitMap.put(new Pair("func_71243_i", "clearCurrentTask")); + mInitMap.put(new Pair("func_71244_g", "logInfo")); + mInitMap.put(new Pair("func_71245_h", "setAllowFlight")); + mInitMap.put(new Pair("func_71246_n", "setWorldName")); + mInitMap.put(new Pair("func_71247_a", "loadAllWorlds")); + mInitMap.put(new Pair("func_71248_a", "getPossibleCompletions")); + mInitMap.put(new Pair("func_71249_w", "getMinecraftVersion")); + mInitMap.put(new Pair("func_71250_E", "getKeyPair")); + mInitMap.put(new Pair("func_71251_e", "setCanSpawnAnimals")); + mInitMap.put(new Pair("func_71252_i", "handleRConCommand")); + mInitMap.put(new Pair("func_71253_a", "setKeyPair")); + mInitMap.put(new Pair("func_71254_M", "getActiveAnvilConverter")); + mInitMap.put(new Pair("func_71255_r", "getAllowNether")); + mInitMap.put(new Pair("func_71256_s", "startServerThread")); + mInitMap.put(new Pair("func_71257_f", "setCanSpawnNPCs")); + mInitMap.put(new Pair("func_71258_A", "getPlugins")); + mInitMap.put(new Pair("func_71259_af", "getTickCounter")); + mInitMap.put(new Pair("func_71260_j", "stopServer")); + mInitMap.put(new Pair("func_71261_m", "setFolderName")); + mInitMap.put(new Pair("func_71262_S", "isDedicatedServer")); + mInitMap.put(new Pair("func_71263_m", "initiateShutdown")); + mInitMap.put(new Pair("func_71264_H", "isSinglePlayer")); + mInitMap.put(new Pair("func_71265_f", "getGameType")); + mInitMap.put(new Pair("func_71266_T", "isServerInOnlineMode")); + mInitMap.put(new Pair("func_71267_a", "saveAllWorlds")); + mInitMap.put(new Pair("func_71268_U", "getCanSpawnAnimals")); + mInitMap.put(new Pair("func_71270_I", "getFolderName")); + mInitMap.put(new Pair("func_71272_O", "deleteWorldAndStopServer")); + mInitMap.put(new Pair("func_71273_Y", "getMOTD")); + mInitMap.put(new Pair("func_71274_v", "getMotd")); + mInitMap.put(new Pair("func_71275_y", "getMaxPlayers")); + mInitMap.put(new Pair("func_71276_C", "getServer")); + mInitMap.put(new Pair("func_71277_t", "getHostname")); + mInitMap.put(new Pair("func_71278_l", "isServerRunning")); + mInitMap.put(new Pair("func_71279_ae", "getGuiEnabled")); + mInitMap.put(new Pair("func_71326_a", "saveProperties")); + mInitMap.put(new Pair("func_71327_a", "getIntProperty")); + mInitMap.put(new Pair("func_71328_a", "setProperty")); + mInitMap.put(new Pair("func_71329_c", "getSettingsFilename")); + mInitMap.put(new Pair("func_71330_a", "getStringProperty")); + mInitMap.put(new Pair("func_71331_a", "addPendingCommand")); + mInitMap.put(new Pair("func_71332_a", "getBooleanProperty")); + mInitMap.put(new Pair("func_71333_ah", "executePendingCommands")); + mInitMap.put(new Pair("func_71344_c", "getPublic")); + mInitMap.put(new Pair("func_71351_a", "setServerData")); + mInitMap.put(new Pair("func_71352_k", "toggleFullscreen")); + mInitMap.put(new Pair("func_71353_a", "loadWorld")); + mInitMap.put(new Pair("func_71354_a", "setDimensionAndSpawnPlayer")); + mInitMap.put(new Pair("func_71355_q", "isDemo")); + mInitMap.put(new Pair("func_71356_B", "isSingleplayer")); + mInitMap.put(new Pair("func_71357_I", "loadScreen")); + mInitMap.put(new Pair("func_71359_d", "getSaveLoader")); + mInitMap.put(new Pair("func_71361_d", "checkGLError")); + mInitMap.put(new Pair("func_71363_D", "stopIntegratedServer")); + mInitMap.put(new Pair("func_71364_i", "setIngameNotInFocus")); + mInitMap.put(new Pair("func_71366_a", "displayDebugInfo")); + mInitMap.put(new Pair("func_71367_a", "setServer")); + mInitMap.put(new Pair("func_71369_N", "getGLMaximumTextureSize")); + mInitMap.put(new Pair("func_71370_a", "resize")); + mInitMap.put(new Pair("func_71371_a", "launchIntegratedServer")); + mInitMap.put(new Pair("func_71372_G", "isFullScreen")); + mInitMap.put(new Pair("func_71374_p", "debugInfoEntities")); + mInitMap.put(new Pair("func_71375_t", "isFancyGraphicsEnabled")); + mInitMap.put(new Pair("func_71377_b", "displayCrashReport")); + mInitMap.put(new Pair("func_71378_E", "getPlayerUsageSnooper")); + mInitMap.put(new Pair("func_71379_u", "isAmbientOcclusionEnabled")); + mInitMap.put(new Pair("func_71381_h", "setIngameFocus")); + mInitMap.put(new Pair("func_71382_s", "isGuiEnabled")); + mInitMap.put(new Pair("func_71383_b", "updateDebugProfilerName")); + mInitMap.put(new Pair("func_71384_a", "startGame")); + mInitMap.put(new Pair("func_71385_j", "displayInGameMenu")); + mInitMap.put(new Pair("func_71386_F", "getSystemTime")); + mInitMap.put(new Pair("func_71387_A", "isIntegratedServerRunning")); + mInitMap.put(new Pair("func_71388_o", "getWorldProviderName")); + mInitMap.put(new Pair("func_71389_H", "startTimerHackThread")); + mInitMap.put(new Pair("func_71392_a", "scaledTessellator")); + mInitMap.put(new Pair("func_71393_m", "debugInfoRenders")); + mInitMap.put(new Pair("func_71396_d", "addGraphicsAndWorldToCrashReport")); + mInitMap.put(new Pair("func_71398_f", "freeMemory")); + mInitMap.put(new Pair("func_71400_g", "shutdown")); + mInitMap.put(new Pair("func_71401_C", "getIntegratedServer")); + mInitMap.put(new Pair("func_71403_a", "loadWorld")); + mInitMap.put(new Pair("func_71404_a", "crashed")); + mInitMap.put(new Pair("func_71405_e", "shutdownMinecraftApplet")); + mInitMap.put(new Pair("func_71407_l", "runTick")); + mInitMap.put(new Pair("func_71408_n", "getEntityDebug")); + mInitMap.put(new Pair("func_71410_x", "getMinecraft")); + mInitMap.put(new Pair("func_71411_J", "runGameLoop")); + mInitMap.put(new Pair("func_71497_f", "getFile")); + mInitMap.put(new Pair("func_71498_d", "getCauseStackTraceOrString")); + mInitMap.put(new Pair("func_71499_a", "addCrashSectionThrowable")); + mInitMap.put(new Pair("func_71500_a", "addCrashSectionCallable")); + mInitMap.put(new Pair("func_71501_a", "getDescription")); + mInitMap.put(new Pair("func_71502_e", "getCompleteReport")); + mInitMap.put(new Pair("func_71503_h", "getWittyComment")); + mInitMap.put(new Pair("func_71504_g", "populateEnvironment")); + mInitMap.put(new Pair("func_71505_b", "getCrashCause")); + mInitMap.put(new Pair("func_71506_a", "getSectionsInStringBuilder")); + mInitMap.put(new Pair("func_71507_a", "addCrashSection")); + mInitMap.put(new Pair("func_71514_a", "getCommandAliases")); + mInitMap.put(new Pair("func_71515_b", "processCommand")); + mInitMap.put(new Pair("func_71516_a", "addTabCompletionOptions")); + mInitMap.put(new Pair("func_71517_b", "getCommandName")); + mInitMap.put(new Pair("func_71518_a", "getCommandUsage")); + mInitMap.put(new Pair("func_71519_b", "canCommandSenderUseCommand")); + mInitMap.put(new Pair("func_71521_c", "getCommandSenderAsPlayer")); + mInitMap.put(new Pair("func_71523_a", "doesStringStartWith")); + mInitMap.put(new Pair("func_71526_a", "parseInt")); + mInitMap.put(new Pair("func_71527_a", "joinNiceString")); + mInitMap.put(new Pair("func_71528_a", "parseIntWithMin")); + mInitMap.put(new Pair("func_71529_a", "setAdminCommander")); + mInitMap.put(new Pair("func_71530_a", "getListOfStringsMatchingLastWord")); + mInitMap.put(new Pair("func_71531_a", "getListOfStringsFromIterableMatchingLastWord")); + mInitMap.put(new Pair("func_71532_a", "parseIntBounded")); + mInitMap.put(new Pair("func_71534_d", "getSortedPossibleCommands")); + mInitMap.put(new Pair("func_71535_c", "getCommands")); + mInitMap.put(new Pair("func_71536_c", "getPlayers")); + mInitMap.put(new Pair("func_71538_c", "getListOfPlayerUsernames")); + mInitMap.put(new Pair("func_71539_b", "getGameModeFromCommand")); + mInitMap.put(new Pair("func_71541_a", "setGameType")); + mInitMap.put(new Pair("func_71542_c", "getAllUsernames")); + mInitMap.put(new Pair("func_71552_a", "setTime")); + mInitMap.put(new Pair("func_71553_b", "addTime")); + mInitMap.put(new Pair("func_71554_c", "toggleDownfall")); + mInitMap.put(new Pair("func_71555_a", "getCommands")); + mInitMap.put(new Pair("func_71556_a", "executeCommand")); + mInitMap.put(new Pair("func_71557_a", "getPossibleCommands")); + mInitMap.put(new Pair("func_71558_b", "getPossibleCommands")); + mInitMap.put(new Pair("func_71559_a", "dropFirstString")); + mInitMap.put(new Pair("func_71560_a", "registerCommand")); + mInitMap.put(new Pair("func_71565_a", "filterAllowedCharacters")); + mInitMap.put(new Pair("func_71566_a", "isAllowedCharacter")); + mInitMap.put(new Pair("func_71569_e", "getDistanceSquared")); + mInitMap.put(new Pair("func_71571_b", "set")); + mInitMap.put(new Pair("func_71575_a", "getCrashReport")); + mInitMap.put(new Pair("func_72314_b", "expand")); + mInitMap.put(new Pair("func_72315_c", "isVecInXZ")); + mInitMap.put(new Pair("func_72316_a", "calculateXOffset")); + mInitMap.put(new Pair("func_72317_d", "offset")); + mInitMap.put(new Pair("func_72318_a", "isVecInside")); + mInitMap.put(new Pair("func_72319_d", "isVecInXY")); + mInitMap.put(new Pair("func_72320_b", "getAverageEdgeLength")); + mInitMap.put(new Pair("func_72321_a", "addCoord")); + mInitMap.put(new Pair("func_72322_c", "calculateZOffset")); + mInitMap.put(new Pair("func_72323_b", "calculateYOffset")); + mInitMap.put(new Pair("func_72324_b", "setBounds")); + mInitMap.put(new Pair("func_72325_c", "getOffsetBoundingBox")); + mInitMap.put(new Pair("func_72326_a", "intersectsWith")); + mInitMap.put(new Pair("func_72327_a", "calculateIntercept")); + mInitMap.put(new Pair("func_72328_c", "setBB")); + mInitMap.put(new Pair("func_72329_c", "copy")); + mInitMap.put(new Pair("func_72330_a", "getBoundingBox")); + mInitMap.put(new Pair("func_72331_e", "contract")); + mInitMap.put(new Pair("func_72333_b", "isVecInYZ")); + mInitMap.put(new Pair("func_72352_l", "getMaxPlayers")); + mInitMap.put(new Pair("func_72354_b", "updateTimeAndWeatherForPlayer")); + mInitMap.put(new Pair("func_72355_a", "initializeConnectionToPlayer")); + mInitMap.put(new Pair("func_72356_a", "transferPlayerToDimension")); + mInitMap.put(new Pair("func_72358_d", "serverUpdateMountedMovingPlayer")); + mInitMap.put(new Pair("func_72362_j", "loadWhiteList")); + mInitMap.put(new Pair("func_72363_f", "getBannedIPs")); + mInitMap.put(new Pair("func_72364_a", "setPlayerManager")); + mInitMap.put(new Pair("func_72365_p", "getServerInstance")); + mInitMap.put(new Pair("func_72367_e", "playerLoggedOut")); + mInitMap.put(new Pair("func_72368_a", "recreatePlayerEntity")); + mInitMap.put(new Pair("func_72369_d", "getAllUsernames")); + mInitMap.put(new Pair("func_72371_a", "setWhiteListEnabled")); + mInitMap.put(new Pair("func_72372_a", "getEntityViewDistance")); + mInitMap.put(new Pair("func_72373_m", "getAvailablePlayerDat")); + mInitMap.put(new Pair("func_72374_b", "onTick")); + mInitMap.put(new Pair("func_72377_c", "playerLoggedIn")); + mInitMap.put(new Pair("func_72378_q", "getHostPlayerData")); + mInitMap.put(new Pair("func_72380_a", "readPlayerDataFromFile")); + mInitMap.put(new Pair("func_72382_j", "getPlayersMatchingAddress")); + mInitMap.put(new Pair("func_72383_n", "isWhiteListEnabled")); + mInitMap.put(new Pair("func_72385_f", "syncPlayerInventory")); + mInitMap.put(new Pair("func_72387_b", "setCommandsAllowedForAll")); + mInitMap.put(new Pair("func_72389_g", "saveAllPlayerData")); + mInitMap.put(new Pair("func_72391_b", "writePlayerData")); + mInitMap.put(new Pair("func_72392_r", "removeAllPlayers")); + mInitMap.put(new Pair("func_72394_k", "getCurrentPlayerCount")); + mInitMap.put(new Pair("func_72395_o", "getViewDistance")); + mInitMap.put(new Pair("func_72417_t", "loadOpsList")); + mInitMap.put(new Pair("func_72418_v", "readWhiteList")); + mInitMap.put(new Pair("func_72419_u", "saveOpsList")); + mInitMap.put(new Pair("func_72421_w", "saveWhiteList")); + mInitMap.put(new Pair("func_72429_b", "getIntermediateWithXValue")); + mInitMap.put(new Pair("func_72430_b", "dotProduct")); + mInitMap.put(new Pair("func_72431_c", "crossProduct")); + mInitMap.put(new Pair("func_72432_b", "normalize")); + mInitMap.put(new Pair("func_72433_c", "lengthVector")); + mInitMap.put(new Pair("func_72434_d", "getIntermediateWithZValue")); + mInitMap.put(new Pair("func_72435_c", "getIntermediateWithYValue")); + mInitMap.put(new Pair("func_72436_e", "squareDistanceTo")); + mInitMap.put(new Pair("func_72438_d", "distanceTo")); + mInitMap.put(new Pair("func_72439_b", "setComponents")); + mInitMap.put(new Pair("func_72440_a", "rotateAroundX")); + mInitMap.put(new Pair("func_72441_c", "addVector")); + mInitMap.put(new Pair("func_72442_b", "rotateAroundY")); + mInitMap.put(new Pair("func_72443_a", "createVectorHelper")); + mInitMap.put(new Pair("func_72444_a", "subtract")); + mInitMap.put(new Pair("func_72445_d", "squareDistanceTo")); + mInitMap.put(new Pair("func_72446_c", "rotateAroundZ")); + mInitMap.put(new Pair("func_72591_c", "getRequestId")); + mInitMap.put(new Pair("func_72592_a", "getRandomChallenge")); + mInitMap.put(new Pair("func_72593_a", "hasExpired")); + mInitMap.put(new Pair("func_72594_b", "getChallengeValue")); + mInitMap.put(new Pair("func_72601_a", "registerSocket")); + mInitMap.put(new Pair("func_72602_a", "startThread")); + mInitMap.put(new Pair("func_72603_d", "getNumberOfPlayers")); + mInitMap.put(new Pair("func_72604_a", "closeSocket")); + mInitMap.put(new Pair("func_72605_a", "closeServerSocket_do")); + mInitMap.put(new Pair("func_72606_c", "logWarning")); + mInitMap.put(new Pair("func_72607_a", "logDebug")); + mInitMap.put(new Pair("func_72608_b", "closeServerSocket")); + mInitMap.put(new Pair("func_72609_b", "logInfo")); + mInitMap.put(new Pair("func_72610_d", "logSevere")); + mInitMap.put(new Pair("func_72611_e", "closeAllSockets")); + mInitMap.put(new Pair("func_72612_a", "closeAllSockets_do")); + mInitMap.put(new Pair("func_72613_c", "isRunning")); + mInitMap.put(new Pair("func_72620_a", "sendResponsePacket")); + mInitMap.put(new Pair("func_72621_a", "parseIncomingPacket")); + mInitMap.put(new Pair("func_72622_d", "sendAuthChallenge")); + mInitMap.put(new Pair("func_72623_a", "stopWithException")); + mInitMap.put(new Pair("func_72624_b", "createQueryResponse")); + mInitMap.put(new Pair("func_72625_a", "getRequestID")); + mInitMap.put(new Pair("func_72626_g", "initQuerySystem")); + mInitMap.put(new Pair("func_72627_c", "verifyClientAuth")); + mInitMap.put(new Pair("func_72628_f", "cleanQueryClientsMap")); + mInitMap.put(new Pair("func_72645_g", "cleanClientThreadsMap")); + mInitMap.put(new Pair("func_72646_f", "initClientThreadList")); + mInitMap.put(new Pair("func_72653_g", "closeSocket")); + mInitMap.put(new Pair("func_72654_a", "sendResponse")); + mInitMap.put(new Pair("func_72655_a", "sendMultipacketResponse")); + mInitMap.put(new Pair("func_72656_f", "sendLoginFailedResponse")); + mInitMap.put(new Pair("func_72661_a", "getBytesAsString")); + mInitMap.put(new Pair("func_72662_b", "getRemainingBytesAsLEInt")); + mInitMap.put(new Pair("func_72663_a", "getByteAsHexString")); + mInitMap.put(new Pair("func_72664_c", "getBytesAsBEint")); + mInitMap.put(new Pair("func_72665_b", "getBytesAsLEInt")); + mInitMap.put(new Pair("func_72667_a", "writeInt")); + mInitMap.put(new Pair("func_72668_a", "writeShort")); + mInitMap.put(new Pair("func_72669_b", "reset")); + mInitMap.put(new Pair("func_72670_a", "writeByteArray")); + mInitMap.put(new Pair("func_72671_a", "writeString")); + mInitMap.put(new Pair("func_72672_a", "toByteArray")); + mInitMap.put(new Pair("func_72683_a", "addPlayer")); + mInitMap.put(new Pair("func_72684_a", "overlaps")); + mInitMap.put(new Pair("func_72685_d", "updateMountedMovingPlayer")); + mInitMap.put(new Pair("func_72686_a", "getFurthestViewableBlock")); + mInitMap.put(new Pair("func_72688_a", "getMinecraftServer")); + mInitMap.put(new Pair("func_72690_a", "getPlayerInstance")); + mInitMap.put(new Pair("func_72691_b", "filterChunkLoadQueue")); + mInitMap.put(new Pair("func_72693_b", "updatePlayerInstances")); + mInitMap.put(new Pair("func_72694_a", "isPlayerWatchingChunk")); + mInitMap.put(new Pair("func_72695_c", "removePlayer")); + mInitMap.put(new Pair("func_72702_a", "playRecord")); + mInitMap.put(new Pair("func_72703_a", "onEntityCreate")); + mInitMap.put(new Pair("func_72704_a", "playSound")); + mInitMap.put(new Pair("func_72706_a", "playAuxSFX")); + mInitMap.put(new Pair("func_72708_a", "spawnParticle")); + mInitMap.put(new Pair("func_72709_b", "onEntityDestroy")); + mInitMap.put(new Pair("func_72712_a", "loadRenderers")); + mInitMap.put(new Pair("func_72714_a", "renderSky")); + mInitMap.put(new Pair("func_72716_a", "updateRenderers")); + mInitMap.put(new Pair("func_72717_a", "drawBlockDamageTexture")); + mInitMap.put(new Pair("func_72718_b", "renderClouds")); + mInitMap.put(new Pair("func_72719_a", "sortAndRender")); + mInitMap.put(new Pair("func_72720_a", "checkOcclusionQueryResult")); + mInitMap.put(new Pair("func_72721_a", "hasCloudFog")); + mInitMap.put(new Pair("func_72722_c", "markRenderersFormInitMap.put(newPosition")); + mInitMap.put(new Pair("func_72723_d", "getDebugInfoEntities")); + mInitMap.put(new Pair("func_72724_a", "renderSortedRenderers")); + mInitMap.put(new Pair("func_72725_b", "markBlocksForUpdate")); + mInitMap.put(new Pair("func_72726_b", "doSpawnParticle")); + mInitMap.put(new Pair("func_72728_f", "deleteAllDisplayLists")); + mInitMap.put(new Pair("func_72729_a", "clipRenderersByFrustum")); + mInitMap.put(new Pair("func_72730_g", "renderStars")); + mInitMap.put(new Pair("func_72731_b", "drawSelectionBox")); + mInitMap.put(new Pair("func_72732_a", "setWorldAndLoadRenderers")); + mInitMap.put(new Pair("func_72733_a", "renderAllRenderLists")); + mInitMap.put(new Pair("func_72734_e", "updateClouds")); + mInitMap.put(new Pair("func_72735_c", "getDebugInfoRenders")); + mInitMap.put(new Pair("func_72736_c", "renderCloudsFancy")); + mInitMap.put(new Pair("func_72785_a", "addEntityToTracker")); + mInitMap.put(new Pair("func_72786_a", "trackEntity")); + mInitMap.put(new Pair("func_72787_a", "removePlayerFromTrackers")); + mInitMap.put(new Pair("func_72788_a", "updateTrackedEntities")); + mInitMap.put(new Pair("func_72790_b", "untrackEntity")); + mInitMap.put(new Pair("func_72791_a", "trackEntity")); + mInitMap.put(new Pair("func_72800_K", "getHeight")); + mInitMap.put(new Pair("func_72801_o", "getLightBrightness")); + mInitMap.put(new Pair("func_72802_i", "getLightBrightnessForSkyBlocks")); + mInitMap.put(new Pair("func_72805_g", "getBlockMetadata")); + mInitMap.put(new Pair("func_72806_N", "extendedLevelsInChunkCache")); + mInitMap.put(new Pair("func_72807_a", "getBiomeGenForCoords")); + mInitMap.put(new Pair("func_72810_a", "getSkyBlockTypeBrightness")); + mInitMap.put(new Pair("func_72812_b", "getSpecialBlockBrightness")); + mInitMap.put(new Pair("func_72819_i", "getWeightedThunderStrength")); + mInitMap.put(new Pair("func_72820_D", "getWorldTime")); + mInitMap.put(new Pair("func_72823_a", "setItemData")); + mInitMap.put(new Pair("func_72824_f", "getCloudColour")); + mInitMap.put(new Pair("func_72825_h", "getTopSolidOrLiquidBlock")); + mInitMap.put(new Pair("func_72826_c", "getCelestialAngle")); + mInitMap.put(new Pair("func_72827_u", "getProviderName")); + mInitMap.put(new Pair("func_72828_b", "unloadEntities")); + mInitMap.put(new Pair("func_72829_c", "checkBlockCollision")); + mInitMap.put(new Pair("func_72830_b", "isAABBInMaterial")); + mInitMap.put(new Pair("func_72833_a", "getSkyColor")); + mInitMap.put(new Pair("func_72834_c", "canBlockFreeze")); + mInitMap.put(new Pair("func_72835_b", "tick")); + mInitMap.put(new Pair("func_72838_d", "spawnEntityInWorld")); + mInitMap.put(new Pair("func_72839_b", "getEntitiesWithinAABBExcludingEntity")); + mInitMap.put(new Pair("func_72841_b", "getUniqueDataId")); + mInitMap.put(new Pair("func_72842_a", "getBlockDensity")); + mInitMap.put(new Pair("func_72843_D", "setRandomSeed")); + mInitMap.put(new Pair("func_72844_a", "getEntityPathToXYZ")); + mInitMap.put(new Pair("func_72846_b", "getClosestVulnerablePlayer")); + mInitMap.put(new Pair("func_72847_b", "onEntityRemoved")); + mInitMap.put(new Pair("func_72848_b", "removeWorldAccess")); + mInitMap.put(new Pair("func_72849_a", "getBlockLightValue_do")); + mInitMap.put(new Pair("func_72850_v", "isBlockFreezableNaturally")); + mInitMap.put(new Pair("func_72853_d", "getMoonPhase")); + mInitMap.put(new Pair("func_72854_c", "updateAllPlayersSleepingFlag")); + mInitMap.put(new Pair("func_72855_b", "checkNoEntityCollision")); + mInitMap.put(new Pair("func_72856_b", "getClosestVulnerablePlayerToEntity")); + mInitMap.put(new Pair("func_72857_a", "findNearestEntityWithinAABB")); + mInitMap.put(new Pair("func_72860_G", "getSaveHandler")); + mInitMap.put(new Pair("func_72861_E", "getSpawnPoint")); + mInitMap.put(new Pair("func_72863_F", "getChunkProvider")); + mInitMap.put(new Pair("func_72864_z", "isBlockIndirectlyGettingPowered")); + mInitMap.put(new Pair("func_72865_a", "getPathEntityToEntity")); + mInitMap.put(new Pair("func_72866_a", "updateEntityWithOptionalForce")); + mInitMap.put(new Pair("func_72867_j", "getRainStrength")); + mInitMap.put(new Pair("func_72868_a", "addLoadedEntities")); + mInitMap.put(new Pair("func_72869_a", "spawnParticle")); + mInitMap.put(new Pair("func_72870_g", "updateEntity")); + mInitMap.put(new Pair("func_72872_a", "getEntitiesWithinAABB")); + mInitMap.put(new Pair("func_72873_a", "doChunksNearChunkExist")); + mInitMap.put(new Pair("func_72874_g", "getPrecipitationHeight")); + mInitMap.put(new Pair("func_72875_a", "isMaterialInBB")); + mInitMap.put(new Pair("func_72876_a", "createExplosion")); + mInitMap.put(new Pair("func_72877_b", "setWorldTime")); + mInitMap.put(new Pair("func_72878_l", "getIndirectPowerLevelTo")); + mInitMap.put(new Pair("func_72879_k", "isBlockProvidingPowerTo")); + mInitMap.put(new Pair("func_72880_h", "getStarBrightness")); + mInitMap.put(new Pair("func_72882_A", "sendQuittingDisconnectingPacket")); + mInitMap.put(new Pair("func_72883_k", "getFullBlockLightValue")); + mInitMap.put(new Pair("func_72884_u", "isBlockFreezable")); + mInitMap.put(new Pair("func_72885_a", "mInitMap.put(newExplosion")); + mInitMap.put(new Pair("func_72886_a", "extinguishFire")); + mInitMap.put(new Pair("func_72889_a", "playAuxSFXAtEntity")); + mInitMap.put(new Pair("func_72890_a", "getClosestPlayerToEntity")); + mInitMap.put(new Pair("func_72891_a", "setAllowedSpawnTypes")); + mInitMap.put(new Pair("func_72894_k", "setRainStrength")); + mInitMap.put(new Pair("func_72896_J", "isRaining")); + mInitMap.put(new Pair("func_72897_h", "joinEntityInSurroundings")); + mInitMap.put(new Pair("func_72899_e", "blockExists")); + mInitMap.put(new Pair("func_72900_e", "removeEntity")); + mInitMap.put(new Pair("func_72901_a", "rayTraceBlocks")); + mInitMap.put(new Pair("func_72903_x", "setActivePlayerChunksAndCheckLight")); + mInitMap.put(new Pair("func_72904_c", "checkChunksExist")); + mInitMap.put(new Pair("func_72905_C", "getSeed")); + mInitMap.put(new Pair("func_72906_B", "checkSessionLock")); + mInitMap.put(new Pair("func_72907_a", "countEntities")); + mInitMap.put(new Pair("func_72908_a", "playSoundEffect")); + mInitMap.put(new Pair("func_72910_y", "getLoadedEntityList")); + mInitMap.put(new Pair("func_72911_I", "isThundering")); + mInitMap.put(new Pair("func_72912_H", "getWorldInfo")); + mInitMap.put(new Pair("func_72914_a", "addWorldInfoToCrashReport")); + mInitMap.put(new Pair("func_72915_b", "setLightValue")); + mInitMap.put(new Pair("func_72916_c", "chunkExists")); + mInitMap.put(new Pair("func_72917_a", "checkNoEntityCollision")); + mInitMap.put(new Pair("func_72918_a", "handleMaterialAcceleration")); + mInitMap.put(new Pair("func_72919_O", "getHorizon")); + mInitMap.put(new Pair("func_72920_a", "getPendingBlockUpdates")); + mInitMap.put(new Pair("func_72921_c", "setBlockMetadataWithNotify")); + mInitMap.put(new Pair("func_72923_a", "onEntityAdded")); + mInitMap.put(new Pair("func_72924_a", "getPlayerEntityByName")); + mInitMap.put(new Pair("func_72925_a", "getSkyBlockTypeBrightness")); + mInitMap.put(new Pair("func_72926_e", "playAuxSFX")); + mInitMap.put(new Pair("func_72929_e", "getCelestialAngleRadians")); + mInitMap.put(new Pair("func_72933_a", "rayTraceBlocks")); + mInitMap.put(new Pair("func_72934_a", "playRecord")); + mInitMap.put(new Pair("func_72935_r", "isDaytime")); + mInitMap.put(new Pair("func_72937_j", "canBlockSeeTheSky")); + mInitMap.put(new Pair("func_72938_d", "getChunkFromBlockCoords")); + mInitMap.put(new Pair("func_72939_s", "updateEntities")); + mInitMap.put(new Pair("func_72940_L", "getActualHeight")); + mInitMap.put(new Pair("func_72942_c", "addWeatherEffect")); + mInitMap.put(new Pair("func_72943_a", "loadItemData")); + mInitMap.put(new Pair("func_72945_a", "getCollidingBoundingBoxes")); + mInitMap.put(new Pair("func_72947_a", "calculateInitialWeather")); + mInitMap.put(new Pair("func_72948_g", "getFogColor")); + mInitMap.put(new Pair("func_72950_A", "setSpawnLocation")); + mInitMap.put(new Pair("func_72951_B", "isRainingAt")); + mInitMap.put(new Pair("func_72953_d", "isAnyLiquid")); + mInitMap.put(new Pair("func_72954_a", "addWorldAccess")); + mInitMap.put(new Pair("func_72955_a", "tickUpdates")); + mInitMap.put(new Pair("func_72956_a", "playSoundAtEntity")); + mInitMap.put(new Pair("func_72957_l", "getBlockLightValue")); + mInitMap.put(new Pair("func_72958_C", "isBlockHighHumidity")); + mInitMap.put(new Pair("func_72959_q", "getWorldChunkManager")); + mInitMap.put(new Pair("func_72960_a", "setEntityState")); + mInitMap.put(new Pair("func_72962_a", "canMineBlock")); + mInitMap.put(new Pair("func_72963_a", "initialize")); + mInitMap.put(new Pair("func_72964_e", "getChunkFromChunkCoords")); + mInitMap.put(new Pair("func_72966_v", "calculateInitialSkylight")); + mInitMap.put(new Pair("func_72967_a", "calculateSkylightSubtracted")); + mInitMap.put(new Pair("func_72970_h", "createChunkProvider")); + mInitMap.put(new Pair("func_72971_b", "getSunBrightness")); + mInitMap.put(new Pair("func_72972_b", "getSavedLightValue")); + mInitMap.put(new Pair("func_72973_f", "removePlayerEntityDangerously")); + mInitMap.put(new Pair("func_72974_f", "setSpawnLocation")); + mInitMap.put(new Pair("func_72975_g", "markBlocksDirtyVertical")); + mInitMap.put(new Pair("func_72976_f", "getHeightValue")); + mInitMap.put(new Pair("func_72977_a", "getClosestPlayer")); + mInitMap.put(new Pair("func_72979_l", "updateWeather")); + mInitMap.put(new Pair("func_72980_b", "playSound")); + mInitMap.put(new Pair("func_72981_t", "getDebugLoadedEntities")); + mInitMap.put(new Pair("func_73022_a", "removeAllEntities")); + mInitMap.put(new Pair("func_73025_a", "doPreChunk")); + mInitMap.put(new Pair("func_73027_a", "addEntityToWorld")); + mInitMap.put(new Pair("func_73028_b", "removeEntityFromWorld")); + mInitMap.put(new Pair("func_73029_E", "doVoidFogParticles")); + mInitMap.put(new Pair("func_73031_a", "invalidateBlockReceiveRegion")); + mInitMap.put(new Pair("func_73039_n", "getEntityTracker")); + mInitMap.put(new Pair("func_73040_p", "getPlayerManager")); + mInitMap.put(new Pair("func_73041_k", "flush")); + mInitMap.put(new Pair("func_73042_a", "saveLevel")); + mInitMap.put(new Pair("func_73044_a", "saveAllChunks")); + mInitMap.put(new Pair("func_73045_a", "getEntityByID")); + mInitMap.put(new Pair("func_73047_i", "createBonusChest")); + mInitMap.put(new Pair("func_73051_P", "resetRainAndThunder")); + mInitMap.put(new Pair("func_73052_b", "createSpawnPosition")); + mInitMap.put(new Pair("func_73053_d", "wakeAllPlayers")); + mInitMap.put(new Pair("func_73054_j", "getEntrancePortalLocation")); + mInitMap.put(new Pair("func_73056_e", "areAllPlayersAsleep")); + mInitMap.put(new Pair("func_73057_a", "spawnRandomCreature")); + mInitMap.put(new Pair("func_73073_c", "cancelDestroyingBlock")); + mInitMap.put(new Pair("func_73074_a", "onBlockClicked")); + mInitMap.put(new Pair("func_73075_a", "updateBlockRemoving")); + mInitMap.put(new Pair("func_73076_a", "setGameType")); + mInitMap.put(new Pair("func_73077_b", "initializeGameType")); + mInitMap.put(new Pair("func_73078_a", "activateBlockOrUseItem")); + mInitMap.put(new Pair("func_73079_d", "removeBlock")); + mInitMap.put(new Pair("func_73080_a", "setWorld")); + mInitMap.put(new Pair("func_73081_b", "getGameType")); + mInitMap.put(new Pair("func_73082_a", "blockRemoving")); + mInitMap.put(new Pair("func_73083_d", "isCreative")); + mInitMap.put(new Pair("func_73084_b", "tryHarvestBlock")); + mInitMap.put(new Pair("func_73085_a", "tryUseItem")); + mInitMap.put(new Pair("func_73101_e", "sendDemoReminder")); + mInitMap.put(new Pair("func_73106_e", "getPartialBlockDamage")); + mInitMap.put(new Pair("func_73107_a", "setPartialBlockDamage")); + mInitMap.put(new Pair("func_73108_d", "getPartialBlockZ")); + mInitMap.put(new Pair("func_73109_c", "getPartialBlockY")); + mInitMap.put(new Pair("func_73110_b", "getPartialBlockX")); + mInitMap.put(new Pair("func_73117_b", "updatePlayerEntity")); + mInitMap.put(new Pair("func_73118_a", "removeFromTrackedPlayers")); + mInitMap.put(new Pair("func_73119_a", "sendDestroyEntityPacketToTrackedPlayers")); + mInitMap.put(new Pair("func_73121_d", "isPlayerWatchingThisChunk")); + mInitMap.put(new Pair("func_73122_a", "updatePlayerList")); + mInitMap.put(new Pair("func_73123_c", "removeTrackedPlayerSymmetric")); + mInitMap.put(new Pair("func_73125_b", "updatePlayerEntities")); + mInitMap.put(new Pair("func_73148_d", "makeString")); + mInitMap.put(new Pair("func_73149_a", "chunkExists")); + mInitMap.put(new Pair("func_73151_a", "saveChunks")); + mInitMap.put(new Pair("func_73152_e", "getLoadedChunkCount")); + mInitMap.put(new Pair("func_73153_a", "populate")); + mInitMap.put(new Pair("func_73154_d", "provideChunk")); + mInitMap.put(new Pair("func_73155_a", "getPossibleCreatures")); + mInitMap.put(new Pair("func_73156_b", "unloadQueuedChunks")); + mInitMap.put(new Pair("func_73157_c", "canSave")); + mInitMap.put(new Pair("func_73158_c", "loadChunk")); + mInitMap.put(new Pair("func_73164_a", "initializeNoiseField")); + mInitMap.put(new Pair("func_73187_a", "initializeNoiseField")); + mInitMap.put(new Pair("func_73234_b", "unloadChunk")); + mInitMap.put(new Pair("func_73239_e", "loadChunkFromFile")); + mInitMap.put(new Pair("func_73240_a", "unloadAllChunks")); + mInitMap.put(new Pair("func_73241_b", "dropChunk")); + mInitMap.put(new Pair("func_73242_b", "saveChunkData")); + mInitMap.put(new Pair("func_73243_a", "saveChunkExtraData")); + mInitMap.put(new Pair("func_73252_b", "removePlayer")); + mInitMap.put(new Pair("func_73254_a", "onUpdate")); + mInitMap.put(new Pair("func_73255_a", "addPlayer")); + mInitMap.put(new Pair("func_73660_a", "update")); + mInitMap.put(new Pair("func_73665_c", "getPropertiesFile")); + mInitMap.put(new Pair("func_73666_a", "generatemInitMap.put(newProperties")); + mInitMap.put(new Pair("func_73667_a", "setProperty")); + mInitMap.put(new Pair("func_73668_b", "saveProperties")); + mInitMap.put(new Pair("func_73669_a", "getIntProperty")); + mInitMap.put(new Pair("func_73670_a", "getBooleanProperty")); + mInitMap.put(new Pair("func_73671_a", "getStringProperty")); + mInitMap.put(new Pair("func_73680_d", "getBanEndDate")); + mInitMap.put(new Pair("func_73682_e", "hasBanExpired")); + mInitMap.put(new Pair("func_73686_f", "getBanReason")); + mInitMap.put(new Pair("func_73718_a", "setLoadingProgress")); + mInitMap.put(new Pair("func_73719_c", "displayLoadingString")); + mInitMap.put(new Pair("func_73720_a", "displaySavingString")); + mInitMap.put(new Pair("func_73721_b", "resetProgressAndMessage")); + mInitMap.put(new Pair("func_73728_b", "drawVerticalLine")); + mInitMap.put(new Pair("func_73729_b", "drawTexturedModalRect")); + mInitMap.put(new Pair("func_73730_a", "drawHorizontalLine")); + mInitMap.put(new Pair("func_73731_b", "drawString")); + mInitMap.put(new Pair("func_73732_a", "drawCenteredString")); + mInitMap.put(new Pair("func_73733_a", "drawGradientRect")); + mInitMap.put(new Pair("func_73734_a", "drawRect")); + mInitMap.put(new Pair("func_73828_d", "renderBossHealth")); + mInitMap.put(new Pair("func_73829_a", "renderVignette")); + mInitMap.put(new Pair("func_73830_a", "renderGameOverlay")); + mInitMap.put(new Pair("func_73831_a", "updateTick")); + mInitMap.put(new Pair("func_73832_a", "renderInventorySlot")); + mInitMap.put(new Pair("func_73833_a", "setRecordPlayingMessage")); + mInitMap.put(new Pair("func_73834_c", "getUpdateCounter")); + mInitMap.put(new Pair("func_73836_a", "renderPumpkinBlur")); + mInitMap.put(new Pair("func_73863_a", "drawScreen")); + mInitMap.put(new Pair("func_73864_a", "mouseClicked")); + mInitMap.put(new Pair("func_73866_w_", "initGui")); + mInitMap.put(new Pair("func_73868_f", "doesGuiPauseGame")); + mInitMap.put(new Pair("func_73869_a", "keyTyped")); + mInitMap.put(new Pair("func_73876_c", "updateScreen")); + mInitMap.put(new Pair("func_73878_a", "confirmClicked")); + mInitMap.put(new Pair("func_73968_a", "rotateAndBlurSkybox")); + mInitMap.put(new Pair("func_73969_a", "addSingleplayerMultiplayerButtons")); + mInitMap.put(new Pair("func_73970_b", "drawPanorama")); + mInitMap.put(new Pair("func_73971_c", "renderSkybox")); + mInitMap.put(new Pair("func_73972_b", "addDemoButtons")); + mInitMap.put(new Pair("func_74275_a", "updateTimer")); + mInitMap.put(new Pair("func_74290_a", "getTimestampedPNGFileForDirectory")); + mInitMap.put(new Pair("func_74296_a", "getOptionFloatValue")); + mInitMap.put(new Pair("func_74297_c", "getKeyBinding")); + mInitMap.put(new Pair("func_74298_c", "getKeyDisplayString")); + mInitMap.put(new Pair("func_74299_a", "getTranslation")); + mInitMap.put(new Pair("func_74300_a", "loadOptions")); + mInitMap.put(new Pair("func_74303_b", "saveOptions")); + mInitMap.put(new Pair("func_74304_a", "setOptionFloatValue")); + mInitMap.put(new Pair("func_74305_a", "parseFloat")); + mInitMap.put(new Pair("func_74306_a", "setOptionValue")); + mInitMap.put(new Pair("func_74308_b", "getOptionOrdinalValue")); + mInitMap.put(new Pair("func_74309_c", "shouldRenderClouds")); + mInitMap.put(new Pair("func_74371_a", "checkARBOcclusion")); + mInitMap.put(new Pair("func_74372_a", "grabMouseCursor")); + mInitMap.put(new Pair("func_74373_b", "ungrabMouseCursor")); + mInitMap.put(new Pair("func_74374_c", "mouseXYChange")); + mInitMap.put(new Pair("func_74378_d", "getEnumString")); + mInitMap.put(new Pair("func_74379_a", "getEnumOptions")); + mInitMap.put(new Pair("func_74380_a", "getEnumFloat")); + mInitMap.put(new Pair("func_74381_c", "returnEnumOrdinal")); + mInitMap.put(new Pair("func_74382_b", "getEnumBoolean")); + mInitMap.put(new Pair("func_74428_b", "processReceivedPackets")); + mInitMap.put(new Pair("func_74430_c", "getRemoteAddress")); + mInitMap.put(new Pair("func_74505_d", "unpressKey")); + mInitMap.put(new Pair("func_74506_a", "unPressAllKeys")); + mInitMap.put(new Pair("func_74507_a", "onTick")); + mInitMap.put(new Pair("func_74508_b", "resetKeyBindingArrayAndHash")); + mInitMap.put(new Pair("func_74510_a", "setKeyBindState")); + mInitMap.put(new Pair("func_74517_a", "setColorBuffer")); + mInitMap.put(new Pair("func_74518_a", "disableStandardItemLighting")); + mInitMap.put(new Pair("func_74519_b", "enableStandardItemLighting")); + mInitMap.put(new Pair("func_74520_c", "enableGUIStandardItemLighting")); + mInitMap.put(new Pair("func_74521_a", "setColorBuffer")); + mInitMap.put(new Pair("func_74523_b", "deleteDisplayLists")); + mInitMap.put(new Pair("func_74524_c", "createDirectByteBuffer")); + mInitMap.put(new Pair("func_74525_a", "deleteTexturesAndDisplayLists")); + mInitMap.put(new Pair("func_74526_a", "generateDisplayLists")); + mInitMap.put(new Pair("func_74527_f", "createDirectIntBuffer")); + mInitMap.put(new Pair("func_74529_h", "createDirectFloatBuffer")); + mInitMap.put(new Pair("func_74535_a", "formatString")); + mInitMap.put(new Pair("func_74539_c", "getChatLineID")); + mInitMap.put(new Pair("func_74540_b", "getUpdatedCounter")); + mInitMap.put(new Pair("func_74583_a", "updateRenderInfo")); + mInitMap.put(new Pair("func_74585_b", "projectViewFromEntity")); + mInitMap.put(new Pair("func_74732_a", "getId")); + mInitMap.put(new Pair("func_74734_a", "write")); + mInitMap.put(new Pair("func_74737_b", "copy")); + mInitMap.put(new Pair("func_74742_a", "appendTag")); + mInitMap.put(new Pair("func_74744_a", "removeTag")); + mInitMap.put(new Pair("func_74745_c", "tagCount")); + mInitMap.put(new Pair("func_74757_a", "setBoolean")); + mInitMap.put(new Pair("func_74759_k", "getIntArray")); + mInitMap.put(new Pair("func_74760_g", "getFloat")); + mInitMap.put(new Pair("func_74762_e", "getInteger")); + mInitMap.put(new Pair("func_74763_f", "getLong")); + mInitMap.put(new Pair("func_74764_b", "hasKey")); + mInitMap.put(new Pair("func_74765_d", "getShort")); + mInitMap.put(new Pair("func_74767_n", "getBoolean")); + mInitMap.put(new Pair("func_74768_a", "setInteger")); + mInitMap.put(new Pair("func_74769_h", "getDouble")); + mInitMap.put(new Pair("func_74770_j", "getByteArray")); + mInitMap.put(new Pair("func_74771_c", "getByte")); + mInitMap.put(new Pair("func_74772_a", "setLong")); + mInitMap.put(new Pair("func_74773_a", "setByteArray")); + mInitMap.put(new Pair("func_74774_a", "setByte")); + mInitMap.put(new Pair("func_74775_l", "getCompoundTag")); + mInitMap.put(new Pair("func_74776_a", "setFloat")); + mInitMap.put(new Pair("func_74777_a", "setShort")); + mInitMap.put(new Pair("func_74778_a", "setString")); + mInitMap.put(new Pair("func_74779_i", "getString")); + mInitMap.put(new Pair("func_74780_a", "setDouble")); + mInitMap.put(new Pair("func_74781_a", "getTag")); + mInitMap.put(new Pair("func_74782_a", "setTag")); + mInitMap.put(new Pair("func_74783_a", "setIntArray")); + mInitMap.put(new Pair("func_74793_a", "safeWrite")); + mInitMap.put(new Pair("func_74794_a", "read")); + mInitMap.put(new Pair("func_74795_b", "write")); + mInitMap.put(new Pair("func_74796_a", "readCompressed")); + mInitMap.put(new Pair("func_74797_a", "read")); + mInitMap.put(new Pair("func_74798_a", "compress")); + mInitMap.put(new Pair("func_74799_a", "writeCompressed")); + mInitMap.put(new Pair("func_74800_a", "write")); + mInitMap.put(new Pair("func_74803_a", "translateKeyFormat")); + mInitMap.put(new Pair("func_74805_b", "translateKey")); + mInitMap.put(new Pair("func_74808_a", "getInstance")); + mInitMap.put(new Pair("func_74837_a", "translateToLocalFormatted")); + mInitMap.put(new Pair("func_74838_a", "translateToLocal")); + mInitMap.put(new Pair("func_74844_a", "getErrorOjbects")); + mInitMap.put(new Pair("func_74860_a", "isLiquidInStructureBoundingBox")); + mInitMap.put(new Pair("func_74861_a", "buildComponent")); + mInitMap.put(new Pair("func_74862_a", "getYWithOffset")); + mInitMap.put(new Pair("func_74865_a", "getXWithOffset")); + mInitMap.put(new Pair("func_74869_a", "generateStructureDispenserContents")); + mInitMap.put(new Pair("func_74871_b", "clearCurrentPositionBlocksUpwards")); + mInitMap.put(new Pair("func_74873_b", "getZWithOffset")); + mInitMap.put(new Pair("func_74874_b", "getBoundingBox")); + mInitMap.put(new Pair("func_74875_a", "addComponentParts")); + mInitMap.put(new Pair("func_74877_c", "getComponentType")); + mInitMap.put(new Pair("func_74878_a", "fillWithAir")); + mInitMap.put(new Pair("func_74879_a", "generateStructureChestContents")); + mInitMap.put(new Pair("func_74881_a", "placeDoorAtCurrentPosition")); + mInitMap.put(new Pair("func_74882_a", "fillWithRandomizedBlocks")); + mInitMap.put(new Pair("func_74883_a", "findIntersecting")); + mInitMap.put(new Pair("func_74888_b", "getVillagerType")); + mInitMap.put(new Pair("func_74889_b", "getAverageGroundLevel")); + mInitMap.put(new Pair("func_74891_a", "getNextComponentNN")); + mInitMap.put(new Pair("func_74893_a", "spawnVillagers")); + mInitMap.put(new Pair("func_74894_b", "getNextComponentPP")); + mInitMap.put(new Pair("func_74895_a", "canVillageGoDeeper")); + mInitMap.put(new Pair("func_74925_d", "getWorldChunkManager")); + mInitMap.put(new Pair("func_74950_a", "findValidPlacement")); + mInitMap.put(new Pair("func_74951_a", "findValidPlacement")); + mInitMap.put(new Pair("func_74954_a", "findValidPlacement")); + mInitMap.put(new Pair("func_74959_a", "getNextComponent")); + mInitMap.put(new Pair("func_74960_a", "getTotalWeight")); + mInitMap.put(new Pair("func_74961_b", "getNextComponentX")); + mInitMap.put(new Pair("func_74962_a", "getNextComponent")); + mInitMap.put(new Pair("func_74963_a", "getNextComponentNormal")); + mInitMap.put(new Pair("func_74964_a", "isAboveGround")); + mInitMap.put(new Pair("func_74965_c", "getNextComponentZ")); + mInitMap.put(new Pair("func_74966_a", "createValidComponent")); + mInitMap.put(new Pair("func_74973_a", "createValidComponent")); + mInitMap.put(new Pair("func_74974_a", "createValidComponent")); + mInitMap.put(new Pair("func_74975_a", "createValidComponent")); + mInitMap.put(new Pair("func_74977_a", "createValidComponent")); + mInitMap.put(new Pair("func_74978_a", "createValidComponent")); + mInitMap.put(new Pair("func_74979_a", "createValidComponent")); + mInitMap.put(new Pair("func_74980_a", "createValidComponent")); + mInitMap.put(new Pair("func_74981_a", "createValidComponent")); + mInitMap.put(new Pair("func_74982_a", "createValidComponent")); + mInitMap.put(new Pair("func_74983_a", "createValidComponent")); + mInitMap.put(new Pair("func_74984_a", "createValidComponent")); + mInitMap.put(new Pair("func_74985_a", "createValidComponent")); + mInitMap.put(new Pair("func_74986_a", "getNextComponentNormal")); + mInitMap.put(new Pair("func_74987_c", "getNextComponentZ")); + mInitMap.put(new Pair("func_74988_a", "getRandomDoor")); + mInitMap.put(new Pair("func_74989_b", "getNextComponentX")); + mInitMap.put(new Pair("func_74990_a", "placeDoor")); + mInitMap.put(new Pair("func_74991_a", "canStrongholdGoDeeper")); + mInitMap.put(new Pair("func_74994_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75000_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75004_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75006_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75010_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75012_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75016_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75018_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75022_a", "getStrongholdStairsComponent")); + mInitMap.put(new Pair("func_75028_a", "findValidPlacement")); + mInitMap.put(new Pair("func_75047_a", "canSpawnStructureAtCoords")); + mInitMap.put(new Pair("func_75048_a", "hasStructureAt")); + mInitMap.put(new Pair("func_75049_b", "getStructureStart")); + mInitMap.put(new Pair("func_75051_a", "generateStructuresInChunk")); + mInitMap.put(new Pair("func_75052_o_", "getCoordList")); + mInitMap.put(new Pair("func_75059_a", "getSpawnList")); + mInitMap.put(new Pair("func_75062_a", "selectBlocks")); + mInitMap.put(new Pair("func_75064_b", "getSelectedBlockMetaData")); + mInitMap.put(new Pair("func_75067_a", "markAvailableHeight")); + mInitMap.put(new Pair("func_75068_a", "generateStructure")); + mInitMap.put(new Pair("func_75069_d", "isSizeableStructure")); + mInitMap.put(new Pair("func_75070_a", "setRandomHeight")); + mInitMap.put(new Pair("func_75071_a", "getBoundingBox")); + mInitMap.put(new Pair("func_75072_c", "updateBoundingBox")); + mInitMap.put(new Pair("func_75073_b", "getComponents")); + mInitMap.put(new Pair("func_75077_d", "getNextVillageStructureComponent")); + mInitMap.put(new Pair("func_75080_e", "getNextComponentVillagePath")); + mInitMap.put(new Pair("func_75081_c", "getNextVillageComponent")); + mInitMap.put(new Pair("func_75084_a", "getStructureVillageWeightedPieceList")); + mInitMap.put(new Pair("func_75085_a", "canSpawnMoreVillagePiecesOfType")); + mInitMap.put(new Pair("func_75086_a", "canSpawnMoreVillagePieces")); + mInitMap.put(new Pair("func_75091_a", "writeCapabilitiesToNBT")); + mInitMap.put(new Pair("func_75092_a", "setFlySpeed")); + mInitMap.put(new Pair("func_75093_a", "getFlySpeed")); + mInitMap.put(new Pair("func_75094_b", "getWalkSpeed")); + mInitMap.put(new Pair("func_75095_b", "readCapabilitiesFromNBT")); + mInitMap.put(new Pair("func_75112_a", "readNBT")); + mInitMap.put(new Pair("func_75113_a", "addExhaustion")); + mInitMap.put(new Pair("func_75114_a", "setFoodLevel")); + mInitMap.put(new Pair("func_75115_e", "getSaturationLevel")); + mInitMap.put(new Pair("func_75116_a", "getFoodLevel")); + mInitMap.put(new Pair("func_75117_b", "writeNBT")); + mInitMap.put(new Pair("func_75118_a", "onUpdate")); + mInitMap.put(new Pair("func_75119_b", "setFoodSaturationLevel")); + mInitMap.put(new Pair("func_75120_b", "getPrevFoodLevel")); + mInitMap.put(new Pair("func_75121_c", "needFood")); + mInitMap.put(new Pair("func_75122_a", "addStats")); + mInitMap.put(new Pair("func_75128_a", "setCanCraft")); + mInitMap.put(new Pair("func_75129_b", "getCanCraft")); + mInitMap.put(new Pair("func_75130_a", "onCraftMatrixChanged")); + mInitMap.put(new Pair("func_75131_a", "putStacksInSlots")); + mInitMap.put(new Pair("func_75132_a", "onCraftGuiOpened")); + mInitMap.put(new Pair("func_75133_b", "retrySlotClick")); + mInitMap.put(new Pair("func_75134_a", "onContainerClosed")); + mInitMap.put(new Pair("func_75135_a", "mergeItemStack")); + mInitMap.put(new Pair("func_75136_a", "getNextTransactionID")); + mInitMap.put(new Pair("func_75137_b", "updateProgressBar")); + mInitMap.put(new Pair("func_75138_a", "getInventory")); + mInitMap.put(new Pair("func_75139_a", "getSlot")); + mInitMap.put(new Pair("func_75140_a", "enchantItem")); + mInitMap.put(new Pair("func_75141_a", "putStackInSlot")); + mInitMap.put(new Pair("func_75142_b", "detectAndSendChanges")); + mInitMap.put(new Pair("func_75144_a", "slotClick")); + mInitMap.put(new Pair("func_75145_c", "canInteractWith")); + mInitMap.put(new Pair("func_75146_a", "addSlotToContainer")); + mInitMap.put(new Pair("func_75147_a", "getSlotFromInventory")); + mInitMap.put(new Pair("func_75174_d", "getMerchantInventory")); + mInitMap.put(new Pair("func_75175_c", "setCurrentRecipeIndex")); + mInitMap.put(new Pair("func_75189_a", "canSpawnMoreStructuresOfType")); + mInitMap.put(new Pair("func_75190_a", "canSpawnMoreStructures")); + mInitMap.put(new Pair("func_75196_c", "getNextValidComponent")); + mInitMap.put(new Pair("func_75198_a", "prepareStructurePieces")); + mInitMap.put(new Pair("func_75200_a", "getStrongholdComponentFromWeightedPiece")); + mInitMap.put(new Pair("func_75201_b", "getNextComponent")); + mInitMap.put(new Pair("func_75202_c", "canAddStructurePieces")); + mInitMap.put(new Pair("func_75208_c", "onCrafting")); + mInitMap.put(new Pair("func_75209_a", "decrStackSize")); + mInitMap.put(new Pair("func_75210_a", "onCrafting")); + mInitMap.put(new Pair("func_75211_c", "getStack")); + mInitMap.put(new Pair("func_75212_b", "getBackgroundIconIndex")); + mInitMap.put(new Pair("func_75214_a", "isItemValid")); + mInitMap.put(new Pair("func_75215_d", "putStack")); + mInitMap.put(new Pair("func_75216_d", "getHasStack")); + mInitMap.put(new Pair("func_75217_a", "isHere")); + mInitMap.put(new Pair("func_75218_e", "onSlotChanged")); + mInitMap.put(new Pair("func_75219_a", "getSlotStackLimit")); + mInitMap.put(new Pair("func_75220_a", "onSlotChange")); + mInitMap.put(new Pair("func_75230_a", "doTrade")); + mInitMap.put(new Pair("func_75243_a_", "canHoldPotion")); + mInitMap.put(new Pair("func_75246_d", "updateTask")); + mInitMap.put(new Pair("func_75247_h", "getMutexBits")); + mInitMap.put(new Pair("func_75248_a", "setMutexBits")); + mInitMap.put(new Pair("func_75249_e", "startExecuting")); + mInitMap.put(new Pair("func_75250_a", "shouldExecute")); + mInitMap.put(new Pair("func_75251_c", "resetTask")); + mInitMap.put(new Pair("func_75252_g", "isInterruptible")); + mInitMap.put(new Pair("func_75253_b", "continueExecuting")); + mInitMap.put(new Pair("func_75270_a", "setSitting")); + mInitMap.put(new Pair("func_75277_f", "isRunning")); + mInitMap.put(new Pair("func_75295_a", "canEasilyReach")); + mInitMap.put(new Pair("func_75296_a", "isSuitableTarget")); + mInitMap.put(new Pair("func_75366_f", "findPossibleShelter")); + mInitMap.put(new Pair("func_75382_a", "hasPlayerGotBoneInHand")); + mInitMap.put(new Pair("func_75388_i", "spawnBaby")); + mInitMap.put(new Pair("func_75389_f", "getNearbyMate")); + mInitMap.put(new Pair("func_75446_f", "checkSufficientDoorsPresentFormInitMap.put(newVillager")); + mInitMap.put(new Pair("func_75447_i", "giveBirth")); + mInitMap.put(new Pair("func_75461_b", "findRandomTargetBlockAwayFrom")); + mInitMap.put(new Pair("func_75462_c", "findRandomTargetBlock")); + mInitMap.put(new Pair("func_75463_a", "findRandomTarget")); + mInitMap.put(new Pair("func_75464_a", "findRandomTargetBlockTowards")); + mInitMap.put(new Pair("func_75466_d", "resetDoorOpeningRestrictionCounter")); + mInitMap.put(new Pair("func_75467_a", "isInside")); + mInitMap.put(new Pair("func_75468_f", "getDoorOpeningRestrictionCounter")); + mInitMap.put(new Pair("func_75469_c", "getInsideDistanceSquare")); + mInitMap.put(new Pair("func_75470_e", "incrementDoorOpeningRestrictionCounter")); + mInitMap.put(new Pair("func_75471_a", "getInsidePosX")); + mInitMap.put(new Pair("func_75472_c", "getInsidePosZ")); + mInitMap.put(new Pair("func_75473_b", "getInsidePosY")); + mInitMap.put(new Pair("func_75474_b", "getDistanceSquared")); + mInitMap.put(new Pair("func_75483_a", "isSafeToStandAt")); + mInitMap.put(new Pair("func_75484_a", "setPath")); + mInitMap.put(new Pair("func_75485_k", "canNavigate")); + mInitMap.put(new Pair("func_75486_a", "getAvoidsWater")); + mInitMap.put(new Pair("func_75487_m", "removeSunnyPath")); + mInitMap.put(new Pair("func_75488_a", "getPathToXYZ")); + mInitMap.put(new Pair("func_75489_a", "setSpeed")); + mInitMap.put(new Pair("func_75490_c", "setEnterDoors")); + mInitMap.put(new Pair("func_75491_a", "setAvoidsWater")); + mInitMap.put(new Pair("func_75492_a", "tryMoveToXYZ")); + mInitMap.put(new Pair("func_75493_a", "isDirectPathBetweenPoints")); + mInitMap.put(new Pair("func_75494_a", "getPathToEntityLiving")); + mInitMap.put(new Pair("func_75495_e", "setCanSwim")); + mInitMap.put(new Pair("func_75496_b", "isPositionClear")); + mInitMap.put(new Pair("func_75497_a", "tryMoveToEntityLiving")); + mInitMap.put(new Pair("func_75498_b", "setBreakDoors")); + mInitMap.put(new Pair("func_75499_g", "clearPathEntity")); + mInitMap.put(new Pair("func_75500_f", "noPath")); + mInitMap.put(new Pair("func_75501_e", "onUpdateNavigation")); + mInitMap.put(new Pair("func_75502_i", "getEntityPosition")); + mInitMap.put(new Pair("func_75503_j", "getPathableYPos")); + mInitMap.put(new Pair("func_75504_d", "setAvoidSun")); + mInitMap.put(new Pair("func_75505_d", "getPath")); + mInitMap.put(new Pair("func_75506_l", "isInLiquid")); + mInitMap.put(new Pair("func_75507_c", "getCanBreakDoors")); + mInitMap.put(new Pair("func_75508_h", "pathFollow")); + mInitMap.put(new Pair("func_75522_a", "canSee")); + mInitMap.put(new Pair("func_75523_a", "clearSensingCache")); + mInitMap.put(new Pair("func_75528_a", "tick")); + mInitMap.put(new Pair("func_75530_c", "spawnZombie")); + mInitMap.put(new Pair("func_75540_b", "getVillageList")); + mInitMap.put(new Pair("func_75541_e", "isWoodenDoorAt")); + mInitMap.put(new Pair("func_75542_c", "addDoorTomInitMap.put(newListIfAppropriate")); + mInitMap.put(new Pair("func_75543_d", "dropOldestVillagerPosition")); + mInitMap.put(new Pair("func_75544_a", "tick")); + mInitMap.put(new Pair("func_75545_e", "addmInitMap.put(newDoorsToVillageOrCreateVillage")); + mInitMap.put(new Pair("func_75546_a", "addUnassignedWoodenDoorsAroundTomInitMap.put(newDoorsList")); + mInitMap.put(new Pair("func_75547_b", "getVillageDoorAt")); + mInitMap.put(new Pair("func_75548_d", "isVillagerPositionPresent")); + mInitMap.put(new Pair("func_75549_c", "removeAnnihilatedVillages")); + mInitMap.put(new Pair("func_75550_a", "findNearestVillage")); + mInitMap.put(new Pair("func_75551_a", "addVillagerPosition")); + mInitMap.put(new Pair("func_75557_k", "removeDeadAndOutOfRangeDoors")); + mInitMap.put(new Pair("func_75558_f", "getVillageDoorInfoList")); + mInitMap.put(new Pair("func_75559_a", "tryGetIronGolemSpawningLocation")); + mInitMap.put(new Pair("func_75560_a", "tick")); + mInitMap.put(new Pair("func_75561_d", "getTicksSinceLastDoorAdding")); + mInitMap.put(new Pair("func_75562_e", "getNumVillagers")); + mInitMap.put(new Pair("func_75563_b", "isValidIronGolemSpawningLocation")); + mInitMap.put(new Pair("func_75564_b", "findNearestDoor")); + mInitMap.put(new Pair("func_75565_j", "removeDeadAndOldAgressors")); + mInitMap.put(new Pair("func_75566_g", "isAnnihilated")); + mInitMap.put(new Pair("func_75567_c", "getNumVillageDoors")); + mInitMap.put(new Pair("func_75568_b", "getVillageRadius")); + mInitMap.put(new Pair("func_75569_c", "findNearestDoorUnrestricted")); + mInitMap.put(new Pair("func_75570_a", "isInRange")); + mInitMap.put(new Pair("func_75571_b", "findNearestVillageAggressor")); + mInitMap.put(new Pair("func_75572_i", "updateNumVillagers")); + mInitMap.put(new Pair("func_75573_l", "updateVillageRadiusAndCenter")); + mInitMap.put(new Pair("func_75574_f", "isBlockDoor")); + mInitMap.put(new Pair("func_75575_a", "addOrRemInitMap.put(newAgressor")); + mInitMap.put(new Pair("func_75576_a", "addVillageDoorInfo")); + mInitMap.put(new Pair("func_75577_a", "getCenter")); + mInitMap.put(new Pair("func_75578_e", "getVillageDoorAt")); + mInitMap.put(new Pair("func_75579_h", "updateNumIronGolems")); + mInitMap.put(new Pair("func_75598_a", "getCreatureClass")); + mInitMap.put(new Pair("func_75599_d", "getPeacefulCreature")); + mInitMap.put(new Pair("func_75600_c", "getCreatureMaterial")); + mInitMap.put(new Pair("func_75601_b", "getMaxNumberOfCreature")); + mInitMap.put(new Pair("func_75614_a", "addMapping")); + mInitMap.put(new Pair("func_75615_a", "createEntityFromNBT")); + mInitMap.put(new Pair("func_75616_a", "createEntityByID")); + mInitMap.put(new Pair("func_75617_a", "getStringFromID")); + mInitMap.put(new Pair("func_75618_a", "addMapping")); + mInitMap.put(new Pair("func_75619_a", "getEntityID")); + mInitMap.put(new Pair("func_75620_a", "createEntityByName")); + mInitMap.put(new Pair("func_75621_b", "getEntityString")); + mInitMap.put(new Pair("func_75630_a", "multiplyBy32AndRound")); + mInitMap.put(new Pair("func_75638_b", "getSpeed")); + mInitMap.put(new Pair("func_75639_a", "limitAngle")); + mInitMap.put(new Pair("func_75640_a", "isUpdating")); + mInitMap.put(new Pair("func_75641_c", "onUpdateMoveHelper")); + mInitMap.put(new Pair("func_75642_a", "setMoveTo")); + mInitMap.put(new Pair("func_75649_a", "onUpdateLook")); + mInitMap.put(new Pair("func_75650_a", "setLookPosition")); + mInitMap.put(new Pair("func_75651_a", "setLookPositionWithEntity")); + mInitMap.put(new Pair("func_75652_a", "updateRotation")); + mInitMap.put(new Pair("func_75660_a", "setJumping")); + mInitMap.put(new Pair("func_75661_b", "doJump")); + mInitMap.put(new Pair("func_75664_a", "updateRenderAngles")); + mInitMap.put(new Pair("func_75665_a", "computeAngleWithBound")); + mInitMap.put(new Pair("func_75669_b", "getObject")); + mInitMap.put(new Pair("func_75670_d", "isWatched")); + mInitMap.put(new Pair("func_75671_a", "setWatched")); + mInitMap.put(new Pair("func_75672_a", "getDataValueId")); + mInitMap.put(new Pair("func_75673_a", "setObject")); + mInitMap.put(new Pair("func_75674_c", "getObjectType")); + mInitMap.put(new Pair("func_75679_c", "getWatchableObjectInt")); + mInitMap.put(new Pair("func_75681_e", "getWatchableObjectString")); + mInitMap.put(new Pair("func_75682_a", "addObject")); + mInitMap.put(new Pair("func_75683_a", "getWatchableObjectByte")); + mInitMap.put(new Pair("func_75684_a", "hasObjectChanged")); + mInitMap.put(new Pair("func_75685_c", "getAllWatched")); + mInitMap.put(new Pair("func_75687_a", "updateWatchedObjectsFromList")); + mInitMap.put(new Pair("func_75688_b", "getChanged")); + mInitMap.put(new Pair("func_75691_i", "getWatchedObject")); + mInitMap.put(new Pair("func_75692_b", "updateObject")); + mInitMap.put(new Pair("func_75693_b", "getWatchableObjectShort")); + mInitMap.put(new Pair("func_75734_a", "waitForFinish")); + mInitMap.put(new Pair("func_75735_a", "queueIO")); + mInitMap.put(new Pair("func_75736_b", "processQueue")); + mInitMap.put(new Pair("func_75742_a", "loadData")); + mInitMap.put(new Pair("func_75743_a", "getUniqueDataId")); + mInitMap.put(new Pair("func_75744_a", "saveAllData")); + mInitMap.put(new Pair("func_75745_a", "setData")); + mInitMap.put(new Pair("func_75746_b", "loadIdCounts")); + mInitMap.put(new Pair("func_75747_a", "saveData")); + mInitMap.put(new Pair("func_75752_b", "readPlayerData")); + mInitMap.put(new Pair("func_75753_a", "writePlayerData")); + mInitMap.put(new Pair("func_75754_f", "getAvailablePlayerDat")); + mInitMap.put(new Pair("func_75755_a", "saveWorldInfoWithPlayer")); + mInitMap.put(new Pair("func_75756_e", "getPlayerNBTManager")); + mInitMap.put(new Pair("func_75757_d", "loadWorldInfo")); + mInitMap.put(new Pair("func_75758_b", "getMapFileFromName")); + mInitMap.put(new Pair("func_75759_a", "flush")); + mInitMap.put(new Pair("func_75760_g", "getWorldDirectoryName")); + mInitMap.put(new Pair("func_75761_a", "saveWorldInfo")); + mInitMap.put(new Pair("func_75762_c", "checkSessionLock")); + mInitMap.put(new Pair("func_75763_a", "getChunkLoader")); + mInitMap.put(new Pair("func_75765_b", "getWorldDirectory")); + mInitMap.put(new Pair("func_75766_h", "setSessionLock")); + mInitMap.put(new Pair("func_75773_a", "canContinue")); + mInitMap.put(new Pair("func_75774_a", "onUpdateTasks")); + mInitMap.put(new Pair("func_75775_b", "canUse")); + mInitMap.put(new Pair("func_75776_a", "addTask")); + mInitMap.put(new Pair("func_75777_a", "areTasksCompatible")); + mInitMap.put(new Pair("func_75783_h", "getCheatsEnabled")); + mInitMap.put(new Pair("func_75784_e", "getLastTimePlayed")); + mInitMap.put(new Pair("func_75785_d", "requiresConversion")); + mInitMap.put(new Pair("func_75786_a", "getFileName")); + mInitMap.put(new Pair("func_75788_b", "getDisplayName")); + mInitMap.put(new Pair("func_75789_g", "isHardcoreModeEnabled")); + mInitMap.put(new Pair("func_75790_f", "getEnumGameType")); + mInitMap.put(new Pair("func_75799_b", "getSaveList")); + mInitMap.put(new Pair("func_75800_d", "flushCache")); + mInitMap.put(new Pair("func_75801_b", "isOldMapFormat")); + mInitMap.put(new Pair("func_75802_e", "deleteWorldDirectory")); + mInitMap.put(new Pair("func_75803_c", "getWorldInfo")); + mInitMap.put(new Pair("func_75804_a", "getSaveLoader")); + mInitMap.put(new Pair("func_75805_a", "convertMapFormat")); + mInitMap.put(new Pair("func_75806_a", "renameWorld")); + mInitMap.put(new Pair("func_75807_a", "deleteFiles")); + mInitMap.put(new Pair("func_75809_f", "createFile")); + mInitMap.put(new Pair("func_75810_a", "addRegionFilesToCollection")); + mInitMap.put(new Pair("func_75811_a", "convertChunks")); + mInitMap.put(new Pair("func_75812_c", "getSaveVersion")); + mInitMap.put(new Pair("func_75813_a", "convertFile")); + mInitMap.put(new Pair("func_75814_c", "writeNextIO")); + mInitMap.put(new Pair("func_75815_a", "loadChunk")); + mInitMap.put(new Pair("func_75816_a", "saveChunk")); + mInitMap.put(new Pair("func_75817_a", "chunkTick")); + mInitMap.put(new Pair("func_75818_b", "saveExtraData")); + mInitMap.put(new Pair("func_75819_b", "saveExtraChunkData")); + mInitMap.put(new Pair("func_75820_a", "writeChunkToNBT")); + mInitMap.put(new Pair("func_75821_a", "writeChunkNBTTags")); + mInitMap.put(new Pair("func_75822_a", "checkedReadChunkFromNBT")); + mInitMap.put(new Pair("func_75823_a", "readChunkFromNBT")); + mInitMap.put(new Pair("func_75824_a", "addChunkToPending")); + mInitMap.put(new Pair("func_75829_a", "distanceTo")); + mInitMap.put(new Pair("func_75830_a", "makeHash")); + mInitMap.put(new Pair("func_75831_a", "isAssigned")); + mInitMap.put(new Pair("func_75832_b", "distanceToSquared")); + mInitMap.put(new Pair("func_75843_a", "format")); + mInitMap.put(new Pair("func_75844_c", "dequeue")); + mInitMap.put(new Pair("func_75845_e", "isPathEmpty")); + mInitMap.put(new Pair("func_75846_b", "sortForward")); + mInitMap.put(new Pair("func_75847_a", "sortBack")); + mInitMap.put(new Pair("func_75848_a", "clearPath")); + mInitMap.put(new Pair("func_75849_a", "addPoint")); + mInitMap.put(new Pair("func_75850_a", "changeDistance")); + mInitMap.put(new Pair("func_75853_a", "createEntityPath")); + mInitMap.put(new Pair("func_75854_a", "openPoint")); + mInitMap.put(new Pair("func_75855_a", "canEntityStandAt")); + mInitMap.put(new Pair("func_75856_a", "createEntityPathTo")); + mInitMap.put(new Pair("func_75857_a", "createEntityPathTo")); + mInitMap.put(new Pair("func_75858_a", "getSafePoint")); + mInitMap.put(new Pair("func_75859_a", "createEntityPathTo")); + mInitMap.put(new Pair("func_75860_b", "findPathOptions")); + mInitMap.put(new Pair("func_75861_a", "addToPath")); + mInitMap.put(new Pair("func_75870_c", "getFinalPathPoint")); + mInitMap.put(new Pair("func_75871_b", "setCurrentPathLength")); + mInitMap.put(new Pair("func_75872_c", "setCurrentPathIndex")); + mInitMap.put(new Pair("func_75873_e", "getCurrentPathIndex")); + mInitMap.put(new Pair("func_75874_d", "getCurrentPathLength")); + mInitMap.put(new Pair("func_75875_a", "incrementPathIndex")); + mInitMap.put(new Pair("func_75876_a", "isSamePath")); + mInitMap.put(new Pair("func_75877_a", "getPathPointFromIndex")); + mInitMap.put(new Pair("func_75878_a", "getPosition")); + mInitMap.put(new Pair("func_75879_b", "isFinished")); + mInitMap.put(new Pair("func_75880_b", "isDestinationSame")); + mInitMap.put(new Pair("func_75881_a", "getVectorFromIndex")); + mInitMap.put(new Pair("func_75885_a", "cipherOperation")); + mInitMap.put(new Pair("func_75886_a", "createTheCipherInstance")); + mInitMap.put(new Pair("func_75887_a", "decryptSharedKey")); + mInitMap.put(new Pair("func_75889_b", "decryptData")); + mInitMap.put(new Pair("func_75890_a", "createmInitMap.put(newSharedKey")); + mInitMap.put(new Pair("func_75891_b", "generateKeyPair")); + mInitMap.put(new Pair("func_75893_a", "digestOperation")); + mInitMap.put(new Pair("func_75894_a", "encryptData")); + mInitMap.put(new Pair("func_75895_a", "getServerIdHash")); + mInitMap.put(new Pair("func_75896_a", "decodePublicKey")); + mInitMap.put(new Pair("func_75901_a", "initializeAllBiomeGenerators")); + mInitMap.put(new Pair("func_75902_a", "nextInt")); + mInitMap.put(new Pair("func_75903_a", "initChunkSeed")); + mInitMap.put(new Pair("func_75904_a", "getInts")); + mInitMap.put(new Pair("func_75905_a", "initWorldGenSeed")); + mInitMap.put(new Pair("func_75915_a", "magnify")); + mInitMap.put(new Pair("func_75918_d", "initCraftableStats")); + mInitMap.put(new Pair("func_75924_a", "replaceAllSimilarBlocks")); + mInitMap.put(new Pair("func_75925_c", "initStats")); + mInitMap.put(new Pair("func_75966_h", "initIndependentStat")); + mInitMap.put(new Pair("func_75967_d", "isAchievement")); + mInitMap.put(new Pair("func_75971_g", "registerStat")); + mInitMap.put(new Pair("func_75984_f", "getSpecial")); + mInitMap.put(new Pair("func_75987_b", "setSpecial")); + mInitMap.put(new Pair("func_75988_a", "setStatStringFormatter")); + mInitMap.put(new Pair("func_75989_e", "getDescription")); + mInitMap.put(new Pair("func_75997_a", "init")); + mInitMap.put(new Pair("func_76030_b", "getValue")); + mInitMap.put(new Pair("func_76031_a", "getHash")); + mInitMap.put(new Pair("func_76036_e", "removeEntry")); + mInitMap.put(new Pair("func_76037_b", "containsItem")); + mInitMap.put(new Pair("func_76038_a", "addKey")); + mInitMap.put(new Pair("func_76040_a", "insert")); + mInitMap.put(new Pair("func_76041_a", "lookup")); + mInitMap.put(new Pair("func_76043_a", "getSlotIndex")); + mInitMap.put(new Pair("func_76044_g", "computeHash")); + mInitMap.put(new Pair("func_76045_c", "lookupEntry")); + mInitMap.put(new Pair("func_76046_c", "clearMap")); + mInitMap.put(new Pair("func_76047_h", "grow")); + mInitMap.put(new Pair("func_76048_a", "copyTo")); + mInitMap.put(new Pair("func_76049_d", "removeObject")); + mInitMap.put(new Pair("func_76056_b", "setSpawnY")); + mInitMap.put(new Pair("func_76057_l", "getLastTimePlayed")); + mInitMap.put(new Pair("func_76058_a", "setSpawnX")); + mInitMap.put(new Pair("func_76059_o", "isRaining")); + mInitMap.put(new Pair("func_76060_a", "setGameType")); + mInitMap.put(new Pair("func_76061_m", "isThundering")); + mInitMap.put(new Pair("func_76062_a", "setWorldName")); + mInitMap.put(new Pair("func_76063_b", "getSeed")); + mInitMap.put(new Pair("func_76064_a", "updateTagCompound")); + mInitMap.put(new Pair("func_76065_j", "getWorldName")); + mInitMap.put(new Pair("func_76066_a", "getNBTTagCompound")); + mInitMap.put(new Pair("func_76067_t", "getTerrainType")); + mInitMap.put(new Pair("func_76068_b", "setWorldTime")); + mInitMap.put(new Pair("func_76069_a", "setThundering")); + mInitMap.put(new Pair("func_76070_v", "isInitialized")); + mInitMap.put(new Pair("func_76071_n", "getThunderTime")); + mInitMap.put(new Pair("func_76072_h", "getPlayerNBTTagCompound")); + mInitMap.put(new Pair("func_76073_f", "getWorldTime")); + mInitMap.put(new Pair("func_76074_e", "getSpawnZ")); + mInitMap.put(new Pair("func_76075_d", "getSpawnY")); + mInitMap.put(new Pair("func_76076_i", "getDimension")); + mInitMap.put(new Pair("func_76077_q", "getGameType")); + mInitMap.put(new Pair("func_76078_e", "setSaveVersion")); + mInitMap.put(new Pair("func_76079_c", "getSpawnX")); + mInitMap.put(new Pair("func_76080_g", "setRainTime")); + mInitMap.put(new Pair("func_76081_a", "setSpawnPosition")); + mInitMap.put(new Pair("func_76082_a", "cloneNBTCompound")); + mInitMap.put(new Pair("func_76083_p", "getRainTime")); + mInitMap.put(new Pair("func_76084_b", "setRaining")); + mInitMap.put(new Pair("func_76085_a", "setTerrainType")); + mInitMap.put(new Pair("func_76086_u", "areCommandsAllowed")); + mInitMap.put(new Pair("func_76087_c", "setSpawnZ")); + mInitMap.put(new Pair("func_76088_k", "getSaveVersion")); + mInitMap.put(new Pair("func_76089_r", "isMapFeaturesEnabled")); + mInitMap.put(new Pair("func_76090_f", "setThunderTime")); + mInitMap.put(new Pair("func_76091_d", "setServerInitialized")); + mInitMap.put(new Pair("func_76092_g", "getSizeOnDisk")); + mInitMap.put(new Pair("func_76093_s", "isHardcoreModeEnabled")); + mInitMap.put(new Pair("func_76123_f", "ceiling_float_int")); + mInitMap.put(new Pair("func_76124_d", "floor_double_long")); + mInitMap.put(new Pair("func_76125_a", "clamp_int")); + mInitMap.put(new Pair("func_76126_a", "sin")); + mInitMap.put(new Pair("func_76127_a", "average")); + mInitMap.put(new Pair("func_76128_c", "floor_double")); + mInitMap.put(new Pair("func_76129_c", "sqrt_float")); + mInitMap.put(new Pair("func_76130_a", "abs_int")); + mInitMap.put(new Pair("func_76131_a", "clamp_float")); + mInitMap.put(new Pair("func_76132_a", "abs_max")); + mInitMap.put(new Pair("func_76133_a", "sqrt_double")); + mInitMap.put(new Pair("func_76134_b", "cos")); + mInitMap.put(new Pair("func_76135_e", "abs")); + mInitMap.put(new Pair("func_76136_a", "getRandomIntegerInRange")); + mInitMap.put(new Pair("func_76137_a", "bucketInt")); + mInitMap.put(new Pair("func_76138_g", "wrapAngleTo180_double")); + mInitMap.put(new Pair("func_76139_a", "stringNullOrLengthZero")); + mInitMap.put(new Pair("func_76140_b", "truncateDoubleToInt")); + mInitMap.put(new Pair("func_76141_d", "floor_float")); + mInitMap.put(new Pair("func_76142_g", "wrapAngleTo180_float")); + mInitMap.put(new Pair("func_76143_f", "ceiling_double_int")); + mInitMap.put(new Pair("func_76145_b", "getValue")); + mInitMap.put(new Pair("func_76146_a", "getKey")); + mInitMap.put(new Pair("func_76152_e", "removeKey")); + mInitMap.put(new Pair("func_76153_b", "resizeTable")); + mInitMap.put(new Pair("func_76154_a", "copyHashTableTo")); + mInitMap.put(new Pair("func_76155_g", "getHashedKey")); + mInitMap.put(new Pair("func_76156_a", "createKey")); + mInitMap.put(new Pair("func_76157_a", "hash")); + mInitMap.put(new Pair("func_76158_a", "getHashIndex")); + mInitMap.put(new Pair("func_76159_d", "remove")); + mInitMap.put(new Pair("func_76160_c", "getEntry")); + mInitMap.put(new Pair("func_76161_b", "containsItem")); + mInitMap.put(new Pair("func_76162_a", "getNumHashElements")); + mInitMap.put(new Pair("func_76163_a", "add")); + mInitMap.put(new Pair("func_76164_a", "getValueByKey")); + mInitMap.put(new Pair("func_76179_a", "buildPostString")); + mInitMap.put(new Pair("func_76181_a", "getSuitableLanPort")); + mInitMap.put(new Pair("func_76184_a", "readFromNBT")); + mInitMap.put(new Pair("func_76185_a", "markDirty")); + mInitMap.put(new Pair("func_76186_a", "setDirty")); + mInitMap.put(new Pair("func_76187_b", "writeToNBT")); + mInitMap.put(new Pair("func_76188_b", "isDirty")); + mInitMap.put(new Pair("func_76191_a", "updateVisiblePlayers")); + mInitMap.put(new Pair("func_76192_a", "updateMPMapData")); + mInitMap.put(new Pair("func_76193_a", "getUpdatePacketData")); + mInitMap.put(new Pair("func_76194_a", "setColumnDirty")); + mInitMap.put(new Pair("func_76204_a", "getPlayersOnMap")); + mInitMap.put(new Pair("func_76217_h", "getCanBurn")); + mInitMap.put(new Pair("func_76218_k", "isOpaque")); + mInitMap.put(new Pair("func_76219_n", "setNoPushMobility")); + mInitMap.put(new Pair("func_76220_a", "isSolid")); + mInitMap.put(new Pair("func_76221_f", "setRequiresTool")); + mInitMap.put(new Pair("func_76222_j", "isReplaceable")); + mInitMap.put(new Pair("func_76223_p", "setTranslucent")); + mInitMap.put(new Pair("func_76224_d", "isLiquid")); + mInitMap.put(new Pair("func_76225_o", "setImmovableMobility")); + mInitMap.put(new Pair("func_76226_g", "setBurning")); + mInitMap.put(new Pair("func_76227_m", "getMaterialMobility")); + mInitMap.put(new Pair("func_76228_b", "blocksLight")); + mInitMap.put(new Pair("func_76229_l", "isToolNotRequired")); + mInitMap.put(new Pair("func_76230_c", "blocksMovement")); + mInitMap.put(new Pair("func_76231_i", "setReplaceable")); + mInitMap.put(new Pair("func_76269_a", "getRandomItem")); + mInitMap.put(new Pair("func_76270_a", "getTotalWeight")); + mInitMap.put(new Pair("func_76271_a", "getRandomItem")); + mInitMap.put(new Pair("func_76272_a", "getTotalWeight")); + mInitMap.put(new Pair("func_76273_a", "getRandomItem")); + mInitMap.put(new Pair("func_76274_a", "getRandomItem")); + mInitMap.put(new Pair("func_76293_a", "generateChestContents")); + mInitMap.put(new Pair("func_76304_a", "generateNoiseOctaves")); + mInitMap.put(new Pair("func_76305_a", "generateNoiseOctaves")); + mInitMap.put(new Pair("func_76308_a", "populateNoiseArray")); + mInitMap.put(new Pair("func_76310_a", "grad")); + mInitMap.put(new Pair("func_76311_b", "lerp")); + mInitMap.put(new Pair("func_76316_a", "onInventoryChanged")); + mInitMap.put(new Pair("func_76317_a", "clearProfiling")); + mInitMap.put(new Pair("func_76318_c", "endStartSection")); + mInitMap.put(new Pair("func_76319_b", "endSection")); + mInitMap.put(new Pair("func_76320_a", "startSection")); + mInitMap.put(new Pair("func_76321_b", "getProfilingData")); + mInitMap.put(new Pair("func_76322_c", "getNameOfLastSection")); + mInitMap.put(new Pair("func_76333_a", "smooth")); + mInitMap.put(new Pair("func_76337_a", "ticksToElapsedTime")); + mInitMap.put(new Pair("func_76338_a", "stripControlCodes")); + mInitMap.put(new Pair("func_76340_b", "getSecond")); + mInitMap.put(new Pair("func_76341_a", "getFirst")); + mInitMap.put(new Pair("func_76345_d", "getHungerDamage")); + mInitMap.put(new Pair("func_76346_g", "getEntity")); + mInitMap.put(new Pair("func_76347_k", "isFireDamage")); + mInitMap.put(new Pair("func_76348_h", "setDamageBypassesArmor")); + mInitMap.put(new Pair("func_76349_b", "setProjectile")); + mInitMap.put(new Pair("func_76350_n", "isDifficultyScaled")); + mInitMap.put(new Pair("func_76351_m", "setDifficultyScaled")); + mInitMap.put(new Pair("func_76352_a", "isProjectile")); + mInitMap.put(new Pair("func_76353_a", "causeArrowDamage")); + mInitMap.put(new Pair("func_76354_b", "causeIndirectMagicDamage")); + mInitMap.put(new Pair("func_76355_l", "getDamageType")); + mInitMap.put(new Pair("func_76356_a", "causeThrownDamage")); + mInitMap.put(new Pair("func_76357_e", "canHarmInCreative")); + mInitMap.put(new Pair("func_76358_a", "causeMobDamage")); + mInitMap.put(new Pair("func_76359_i", "setDamageAllowedInCreativeMode")); + mInitMap.put(new Pair("func_76361_j", "setFireDamage")); + mInitMap.put(new Pair("func_76362_a", "causeFireballDamage")); + mInitMap.put(new Pair("func_76363_c", "isUnblockable")); + mInitMap.put(new Pair("func_76364_f", "getSourceOfDamage")); + mInitMap.put(new Pair("func_76365_a", "causePlayerDamage")); + mInitMap.put(new Pair("func_76388_g", "getEffectiveness")); + mInitMap.put(new Pair("func_76389_a", "getDurationString")); + mInitMap.put(new Pair("func_76390_b", "setPotionName")); + mInitMap.put(new Pair("func_76392_e", "getStatusIconIndex")); + mInitMap.put(new Pair("func_76393_a", "getName")); + mInitMap.put(new Pair("func_76394_a", "performEffect")); + mInitMap.put(new Pair("func_76395_i", "isUsable")); + mInitMap.put(new Pair("func_76396_c", "getId")); + mInitMap.put(new Pair("func_76397_a", "isReady")); + mInitMap.put(new Pair("func_76398_f", "isBadEffect")); + mInitMap.put(new Pair("func_76399_b", "setIconIndex")); + mInitMap.put(new Pair("func_76400_d", "hasStatusIcon")); + mInitMap.put(new Pair("func_76401_j", "getLiquidColor")); + mInitMap.put(new Pair("func_76402_a", "affectEntity")); + mInitMap.put(new Pair("func_76403_b", "isInstant")); + mInitMap.put(new Pair("func_76404_a", "setEffectiveness")); + mInitMap.put(new Pair("func_76445_a", "getIntCache")); + mInitMap.put(new Pair("func_76446_a", "resetIntCache")); + mInitMap.put(new Pair("func_76452_a", "combine")); + mInitMap.put(new Pair("func_76453_d", "getEffectName")); + mInitMap.put(new Pair("func_76454_e", "deincrementDuration")); + mInitMap.put(new Pair("func_76455_a", "onUpdate")); + mInitMap.put(new Pair("func_76456_a", "getPotionID")); + mInitMap.put(new Pair("func_76457_b", "performEffect")); + mInitMap.put(new Pair("func_76458_c", "getAmplifier")); + mInitMap.put(new Pair("func_76459_b", "getDuration")); + mInitMap.put(new Pair("func_76463_a", "startSnooper")); + mInitMap.put(new Pair("func_76465_c", "getCurrentStats")); + mInitMap.put(new Pair("func_76467_g", "addJvmArgsToSnooper")); + mInitMap.put(new Pair("func_76468_d", "isSnooperRunning")); + mInitMap.put(new Pair("func_76470_e", "stopSnooper")); + mInitMap.put(new Pair("func_76471_b", "addMemoryStatsToSnooper")); + mInitMap.put(new Pair("func_76484_a", "generate")); + mInitMap.put(new Pair("func_76487_a", "setScale")); + mInitMap.put(new Pair("func_76489_a", "generateLeafNodeList")); + mInitMap.put(new Pair("func_76490_a", "layerSize")); + mInitMap.put(new Pair("func_76491_a", "generateLeafNode")); + mInitMap.put(new Pair("func_76493_c", "leafNodeNeedsBase")); + mInitMap.put(new Pair("func_76494_d", "generateLeafNodeBases")); + mInitMap.put(new Pair("func_76495_b", "leafSize")); + mInitMap.put(new Pair("func_76496_a", "checkBlockLine")); + mInitMap.put(new Pair("func_76497_e", "validTreeLocation")); + mInitMap.put(new Pair("func_76498_b", "generateLeaves")); + mInitMap.put(new Pair("func_76499_c", "generateTrunk")); + mInitMap.put(new Pair("func_76529_b", "growVines")); + mInitMap.put(new Pair("func_76536_b", "generateVines")); + mInitMap.put(new Pair("func_76543_b", "pickMobSpawner")); + mInitMap.put(new Pair("func_76549_c", "getChunkInputStream")); + mInitMap.put(new Pair("func_76550_a", "createOrLoadRegionFile")); + mInitMap.put(new Pair("func_76551_a", "clearRegionFileReferences")); + mInitMap.put(new Pair("func_76552_d", "getChunkOutputStream")); + mInitMap.put(new Pair("func_76554_h", "getEntrancePortalLocation")); + mInitMap.put(new Pair("func_76555_c", "createChunkGenerator")); + mInitMap.put(new Pair("func_76556_a", "generateLightBrightnessTable")); + mInitMap.put(new Pair("func_76557_i", "getAverageGroundLevel")); + mInitMap.put(new Pair("func_76558_a", "registerWorld")); + mInitMap.put(new Pair("func_76559_b", "getMoonPhase")); + mInitMap.put(new Pair("func_76560_a", "calcSunriseSunsetColors")); + mInitMap.put(new Pair("func_76561_g", "isSkyColored")); + mInitMap.put(new Pair("func_76562_b", "getFogColor")); + mInitMap.put(new Pair("func_76563_a", "calculateCelestialAngle")); + mInitMap.put(new Pair("func_76564_j", "getWorldHasVoidParticles")); + mInitMap.put(new Pair("func_76565_k", "getVoidFogYFactor")); + mInitMap.put(new Pair("func_76566_a", "canCoordinateBeSpawn")); + mInitMap.put(new Pair("func_76567_e", "canRespawnHere")); + mInitMap.put(new Pair("func_76568_b", "doesXZShowFog")); + mInitMap.put(new Pair("func_76569_d", "isSurfaceWorld")); + mInitMap.put(new Pair("func_76570_a", "getProviderForDimension")); + mInitMap.put(new Pair("func_76571_f", "getCloudHeight")); + mInitMap.put(new Pair("func_76572_b", "registerWorldChunkManager")); + mInitMap.put(new Pair("func_76581_a", "set")); + mInitMap.put(new Pair("func_76582_a", "get")); + mInitMap.put(new Pair("func_76587_i", "getBlockStorageArray")); + mInitMap.put(new Pair("func_76588_a", "getEntitiesWithinAABBForEntity")); + mInitMap.put(new Pair("func_76589_b", "setBlockMetadata")); + mInitMap.put(new Pair("func_76590_a", "generateHeightMap")); + mInitMap.put(new Pair("func_76591_a", "getBiomeGenForWorldCoords")); + mInitMap.put(new Pair("func_76594_o", "enqueueRelightChecks")); + mInitMap.put(new Pair("func_76595_e", "propagateSkylightOcclusion")); + mInitMap.put(new Pair("func_76599_g", "checkSkylightNeighborHeight")); + mInitMap.put(new Pair("func_76600_a", "isAtLocation")); + mInitMap.put(new Pair("func_76601_a", "needsSaving")); + mInitMap.put(new Pair("func_76602_a", "setStorageArrays")); + mInitMap.put(new Pair("func_76603_b", "generateSkylightMap")); + mInitMap.put(new Pair("func_76605_m", "getBiomeArray")); + mInitMap.put(new Pair("func_76606_c", "getAreLevelsEmpty")); + mInitMap.put(new Pair("func_76607_a", "fillChunk")); + mInitMap.put(new Pair("func_76608_a", "removeEntityAtIndex")); + mInitMap.put(new Pair("func_76609_d", "updateSkylightNeighborHeight")); + mInitMap.put(new Pair("func_76611_b", "getHeightValue")); + mInitMap.put(new Pair("func_76612_a", "addEntity")); + mInitMap.put(new Pair("func_76613_n", "resetRelightChecks")); + mInitMap.put(new Pair("func_76614_a", "getSavedLightValue")); + mInitMap.put(new Pair("func_76615_h", "relightBlock")); + mInitMap.put(new Pair("func_76616_a", "setBiomeArray")); + mInitMap.put(new Pair("func_76617_a", "getRandomWithSeed")); + mInitMap.put(new Pair("func_76618_a", "getEntitiesOfTypeWithinAAAB")); + mInitMap.put(new Pair("func_76619_d", "canBlockSeeTheSky")); + mInitMap.put(new Pair("func_76621_g", "isEmpty")); + mInitMap.put(new Pair("func_76622_b", "removeEntity")); + mInitMap.put(new Pair("func_76623_d", "onChunkUnload")); + mInitMap.put(new Pair("func_76624_a", "populateChunk")); + mInitMap.put(new Pair("func_76625_h", "getTopFilledSegment")); + mInitMap.put(new Pair("func_76626_d", "getPrecipitationHeight")); + mInitMap.put(new Pair("func_76628_c", "getBlockMetadata")); + mInitMap.put(new Pair("func_76629_c", "getBlockLightValue")); + mInitMap.put(new Pair("func_76630_e", "setChunkModified")); + mInitMap.put(new Pair("func_76631_c", "onChunkLoad")); + mInitMap.put(new Pair("func_76632_l", "getChunkCoordIntPair")); + mInitMap.put(new Pair("func_76633_a", "setLightValue")); + mInitMap.put(new Pair("func_76654_b", "setExtBlockMetadata")); + mInitMap.put(new Pair("func_76657_c", "setExtSkylightValue")); + mInitMap.put(new Pair("func_76658_g", "getBlockLSBArray")); + mInitMap.put(new Pair("func_76659_c", "setBlocklightArray")); + mInitMap.put(new Pair("func_76660_i", "getBlockMSBArray")); + mInitMap.put(new Pair("func_76661_k", "getBlocklightArray")); + mInitMap.put(new Pair("func_76662_d", "getYLocation")); + mInitMap.put(new Pair("func_76663_a", "isEmpty")); + mInitMap.put(new Pair("func_76664_a", "setBlockLSBArray")); + mInitMap.put(new Pair("func_76665_b", "getExtBlockMetadata")); + mInitMap.put(new Pair("func_76666_d", "setSkylightArray")); + mInitMap.put(new Pair("func_76667_m", "createBlockMSBArray")); + mInitMap.put(new Pair("func_76668_b", "setBlockMetadataArray")); + mInitMap.put(new Pair("func_76669_j", "getMetadataArray")); + mInitMap.put(new Pair("func_76670_c", "getExtSkylightValue")); + mInitMap.put(new Pair("func_76671_l", "getSkylightArray")); + mInitMap.put(new Pair("func_76672_e", "removeInvalidBlocks")); + mInitMap.put(new Pair("func_76673_a", "setBlockMSBArray")); + mInitMap.put(new Pair("func_76674_d", "getExtBlocklightValue")); + mInitMap.put(new Pair("func_76675_b", "getNeedsRandomTick")); + mInitMap.put(new Pair("func_76676_h", "clearMSBArray")); + mInitMap.put(new Pair("func_76677_d", "setExtBlocklightValue")); + mInitMap.put(new Pair("func_76686_a", "get")); + mInitMap.put(new Pair("func_76690_a", "convertToAnvilFormat")); + mInitMap.put(new Pair("func_76691_a", "load")); + mInitMap.put(new Pair("func_76704_a", "getChunkDataInputStream")); + mInitMap.put(new Pair("func_76705_d", "outOfBounds")); + mInitMap.put(new Pair("func_76706_a", "write")); + mInitMap.put(new Pair("func_76707_e", "getOffset")); + mInitMap.put(new Pair("func_76708_c", "close")); + mInitMap.put(new Pair("func_76709_c", "isChunkSaved")); + mInitMap.put(new Pair("func_76710_b", "getChunkDataOutputStream")); + mInitMap.put(new Pair("func_76711_a", "setOffset")); + mInitMap.put(new Pair("func_76712_a", "write")); + mInitMap.put(new Pair("func_76713_b", "setChunkTimestamp")); + mInitMap.put(new Pair("func_76727_i", "getFloatRainfall")); + mInitMap.put(new Pair("func_76728_a", "decorate")); + mInitMap.put(new Pair("func_76729_a", "createBiomeDecorator")); + mInitMap.put(new Pair("func_76730_b", "getRandomWorldGenForGrass")); + mInitMap.put(new Pair("func_76731_a", "getSkyColorByTemp")); + mInitMap.put(new Pair("func_76732_a", "setTemperatureRainfall")); + mInitMap.put(new Pair("func_76735_a", "setBiomeName")); + mInitMap.put(new Pair("func_76736_e", "isHighHumidity")); + mInitMap.put(new Pair("func_76738_d", "canSpawnLightningBolt")); + mInitMap.put(new Pair("func_76739_b", "setColor")); + mInitMap.put(new Pair("func_76741_f", "getSpawningChance")); + mInitMap.put(new Pair("func_76742_b", "setEnableSnow")); + mInitMap.put(new Pair("func_76744_g", "getIntRainfall")); + mInitMap.put(new Pair("func_76745_m", "setDisableRain")); + mInitMap.put(new Pair("func_76746_c", "getEnableSnow")); + mInitMap.put(new Pair("func_76747_a", "getSpawnableList")); + mInitMap.put(new Pair("func_76793_b", "genStandardOre2")); + mInitMap.put(new Pair("func_76795_a", "genStandardOre1")); + mInitMap.put(new Pair("func_76797_b", "generateOres")); + mInitMap.put(new Pair("func_76837_b", "getBiomeGenAt")); + mInitMap.put(new Pair("func_76838_a", "cleanupCache")); + mInitMap.put(new Pair("func_76839_e", "getCachedBiomes")); + mInitMap.put(new Pair("func_76840_a", "getBiomeCacheBlock")); + mInitMap.put(new Pair("func_76885_a", "getBiomeGenAt")); + mInitMap.put(new Pair("func_76931_a", "getBiomeGenAt")); + mInitMap.put(new Pair("func_76932_a", "getBiomesToSpawnIn")); + mInitMap.put(new Pair("func_76933_b", "loadBlockGeneratorData")); + mInitMap.put(new Pair("func_76935_a", "getBiomeGenAt")); + mInitMap.put(new Pair("func_76936_a", "getRainfall")); + mInitMap.put(new Pair("func_76937_a", "getBiomesForGeneration")); + mInitMap.put(new Pair("func_76938_b", "cleanupCache")); + mInitMap.put(new Pair("func_76939_a", "getTemperatureAtHeight")); + mInitMap.put(new Pair("func_76940_a", "areBiomesViable")); + mInitMap.put(new Pair("func_76975_c", "renderShadow")); + mInitMap.put(new Pair("func_76976_a", "setRenderManager")); + mInitMap.put(new Pair("func_76977_a", "renderEntityOnFire")); + mInitMap.put(new Pair("func_76978_a", "renderOffsetAABB")); + mInitMap.put(new Pair("func_76979_b", "doRenderShadowAndFire")); + mInitMap.put(new Pair("func_76980_a", "renderAABB")); + mInitMap.put(new Pair("func_76982_b", "getWorldFromRenderManager")); + mInitMap.put(new Pair("func_76983_a", "getFontRendererFromRenderManager")); + mInitMap.put(new Pair("func_76986_a", "doRender")); + mInitMap.put(new Pair("func_77015_a", "renderItemIntoGUI")); + mInitMap.put(new Pair("func_77017_a", "renderQuad")); + mInitMap.put(new Pair("func_77018_a", "renderGlint")); + mInitMap.put(new Pair("func_77020_a", "renderDroppedItem")); + mInitMap.put(new Pair("func_77021_b", "renderItemOverlayIntoGUI")); + mInitMap.put(new Pair("func_77026_a", "renderEntity")); + mInitMap.put(new Pair("func_77029_c", "renderEquippedItems")); + mInitMap.put(new Pair("func_77030_a", "getColorMultiplier")); + mInitMap.put(new Pair("func_77032_a", "shouldRenderPass")); + mInitMap.put(new Pair("func_77033_b", "passSpecialRender")); + mInitMap.put(new Pair("func_77034_a", "interpolateRotation")); + mInitMap.put(new Pair("func_77035_b", "inheritRenderPass")); + mInitMap.put(new Pair("func_77036_a", "renderModel")); + mInitMap.put(new Pair("func_77037_a", "getDeathMaxRotation")); + mInitMap.put(new Pair("func_77039_a", "renderLivingAt")); + mInitMap.put(new Pair("func_77040_d", "getSwingProgress")); + mInitMap.put(new Pair("func_77041_b", "preRenderCallback")); + mInitMap.put(new Pair("func_77042_a", "setRenderPassModel")); + mInitMap.put(new Pair("func_77043_a", "rotateCorpse")); + mInitMap.put(new Pair("func_77044_a", "handleRotationFloat")); + mInitMap.put(new Pair("func_77124_a", "setCanBeCreated")); + mInitMap.put(new Pair("func_77125_e", "isVersioned")); + mInitMap.put(new Pair("func_77126_d", "getCanBeCreated")); + mInitMap.put(new Pair("func_77127_a", "getWorldTypeName")); + mInitMap.put(new Pair("func_77128_b", "getTranslateName")); + mInitMap.put(new Pair("func_77129_f", "setVersioned")); + mInitMap.put(new Pair("func_77130_a", "parseWorldType")); + mInitMap.put(new Pair("func_77131_c", "getGeneratorVersion")); + mInitMap.put(new Pair("func_77132_a", "getWorldTypeForGeneratorVersion")); + mInitMap.put(new Pair("func_77142_a", "getByName")); + mInitMap.put(new Pair("func_77144_e", "isSurvivalOrAdventure")); + mInitMap.put(new Pair("func_77145_d", "isCreative")); + mInitMap.put(new Pair("func_77146_a", "getByID")); + mInitMap.put(new Pair("func_77147_a", "configurePlayerCapabilities")); + mInitMap.put(new Pair("func_77148_a", "getID")); + mInitMap.put(new Pair("func_77149_b", "getName")); + mInitMap.put(new Pair("func_77158_f", "getHardcoreEnabled")); + mInitMap.put(new Pair("func_77159_a", "enableBonusChest")); + mInitMap.put(new Pair("func_77160_d", "getSeed")); + mInitMap.put(new Pair("func_77161_a", "getGameTypeById")); + mInitMap.put(new Pair("func_77162_e", "getGameType")); + mInitMap.put(new Pair("func_77163_i", "areCommandsAllowed")); + mInitMap.put(new Pair("func_77164_g", "isMapFeaturesEnabled")); + mInitMap.put(new Pair("func_77165_h", "getTerrainType")); + mInitMap.put(new Pair("func_77166_b", "enableCommands")); + mInitMap.put(new Pair("func_77167_c", "isBonusChestEnabled")); + mInitMap.put(new Pair("func_77176_a", "setScheduledTime")); + mInitMap.put(new Pair("func_77184_b", "placeInExistingPortal")); + mInitMap.put(new Pair("func_77185_a", "placeInPortal")); + mInitMap.put(new Pair("func_77190_a", "canCreatureTypeSpawnAtLocation")); + mInitMap.put(new Pair("func_77191_a", "performWorldGenSpawning")); + mInitMap.put(new Pair("func_77192_a", "findChunksForSpawning")); + mInitMap.put(new Pair("func_77201_a", "readRecipiesFromTags")); + mInitMap.put(new Pair("func_77202_a", "getRecipiesAsTags")); + mInitMap.put(new Pair("func_77203_a", "canRecipeBeUsed")); + mInitMap.put(new Pair("func_77205_a", "addToListWithCheck")); + mInitMap.put(new Pair("func_77272_a", "chunkXZ2Int")); + mInitMap.put(new Pair("func_77273_a", "getCenterXPos")); + mInitMap.put(new Pair("func_77274_b", "getCenterZPosition")); + mInitMap.put(new Pair("func_77278_a", "doExplosionA")); + mInitMap.put(new Pair("func_77279_a", "doExplosionB")); + mInitMap.put(new Pair("func_77316_c", "getTranslatedName")); + mInitMap.put(new Pair("func_77317_b", "getMaxEnchantability")); + mInitMap.put(new Pair("func_77318_a", "calcModifierDamage")); + mInitMap.put(new Pair("func_77319_d", "getMinLevel")); + mInitMap.put(new Pair("func_77320_a", "getName")); + mInitMap.put(new Pair("func_77321_a", "getMinEnchantability")); + mInitMap.put(new Pair("func_77322_b", "setName")); + mInitMap.put(new Pair("func_77324_c", "getWeight")); + mInitMap.put(new Pair("func_77325_b", "getMaxLevel")); + mInitMap.put(new Pair("func_77326_a", "canApplyTogether")); + mInitMap.put(new Pair("func_77390_a", "readFromTags")); + mInitMap.put(new Pair("func_77391_b", "hasSameItemsAs")); + mInitMap.put(new Pair("func_77393_a", "hasSameIDsAs")); + mInitMap.put(new Pair("func_77394_a", "getItemToBuy")); + mInitMap.put(new Pair("func_77395_g", "writeToTags")); + mInitMap.put(new Pair("func_77396_b", "getSecondItemToBuy")); + mInitMap.put(new Pair("func_77397_d", "getItemToSell")); + mInitMap.put(new Pair("func_77398_c", "hasSecondItemToBuy")); + mInitMap.put(new Pair("func_77399_f", "incrementToolUses")); + mInitMap.put(new Pair("func_77442_b", "canUnlockAchievement")); + mInitMap.put(new Pair("func_77443_a", "hasAchievementUnlocked")); + mInitMap.put(new Pair("func_77444_a", "writeStat")); + mInitMap.put(new Pair("func_77466_a", "getFoliageColorPine")); + mInitMap.put(new Pair("func_77467_a", "setFoliageBiomeColorizer")); + mInitMap.put(new Pair("func_77468_c", "getFoliageColorBasic")); + mInitMap.put(new Pair("func_77469_b", "getFoliageColorBirch")); + mInitMap.put(new Pair("func_77470_a", "getFoliageColor")); + mInitMap.put(new Pair("func_77472_b", "setClientActiveTexture")); + mInitMap.put(new Pair("func_77473_a", "setActiveTexture")); + mInitMap.put(new Pair("func_77474_a", "initializeTextures")); + mInitMap.put(new Pair("func_77475_a", "setLightmapTextureCoords")); + mInitMap.put(new Pair("func_77479_a", "setGrassBiomeColorizer")); + mInitMap.put(new Pair("func_77480_a", "getGrassColor")); + mInitMap.put(new Pair("func_77487_a", "getServerMotd")); + mInitMap.put(new Pair("func_77488_b", "getServerIpPort")); + mInitMap.put(new Pair("func_77489_c", "updateLastSeen")); + mInitMap.put(new Pair("func_77493_a", "calculateModifier")); + mInitMap.put(new Pair("func_77501_a", "getRespiration")); + mInitMap.put(new Pair("func_77502_d", "getSilkTouchModifier")); + mInitMap.put(new Pair("func_77504_a", "addRandomEnchantment")); + mInitMap.put(new Pair("func_77505_b", "mapEnchantmentData")); + mInitMap.put(new Pair("func_77506_a", "getEnchantmentLevel")); + mInitMap.put(new Pair("func_77507_b", "getKnockbackModifier")); + mInitMap.put(new Pair("func_77508_a", "getEnchantmentModifierDamage")); + mInitMap.put(new Pair("func_77509_b", "getEfficiencyModifier")); + mInitMap.put(new Pair("func_77510_g", "getAquaAffinityModifier")); + mInitMap.put(new Pair("func_77511_a", "getMaxEnchantmentLevel")); + mInitMap.put(new Pair("func_77512_a", "getEnchantmentModifierLiving")); + mInitMap.put(new Pair("func_77513_b", "buildEnchantmentList")); + mInitMap.put(new Pair("func_77514_a", "calcItemStackEnchantability")); + mInitMap.put(new Pair("func_77516_a", "applyEnchantmentModifierArray")); + mInitMap.put(new Pair("func_77517_e", "getFortuneModifier")); + mInitMap.put(new Pair("func_77518_a", "applyEnchantmentModifier")); + mInitMap.put(new Pair("func_77519_f", "getLootingModifier")); + mInitMap.put(new Pair("func_77523_b", "getAdFromPingResponse")); + mInitMap.put(new Pair("func_77524_a", "getMotdFromPingResponse")); + mInitMap.put(new Pair("func_77525_a", "getPingResponse")); + mInitMap.put(new Pair("func_77552_b", "setWasNotUpdated")); + mInitMap.put(new Pair("func_77553_a", "getWasUpdated")); + mInitMap.put(new Pair("func_77554_c", "getLanServers")); + mInitMap.put(new Pair("func_77557_a", "canEnchantItem")); + mInitMap.put(new Pair("func_77569_a", "matches")); + mInitMap.put(new Pair("func_77570_a", "getRecipeSize")); + mInitMap.put(new Pair("func_77571_b", "getRecipeOutput")); + mInitMap.put(new Pair("func_77572_b", "getCraftingResult")); + mInitMap.put(new Pair("func_77573_a", "checkMatch")); + mInitMap.put(new Pair("func_77583_a", "addRecipes")); + mInitMap.put(new Pair("func_77586_a", "addRecipes")); + mInitMap.put(new Pair("func_77589_a", "addRecipes")); + mInitMap.put(new Pair("func_77590_a", "addRecipes")); + mInitMap.put(new Pair("func_77592_b", "getRecipeList")); + mInitMap.put(new Pair("func_77594_a", "getInstance")); + mInitMap.put(new Pair("func_77596_b", "addShapelessRecipe")); + mInitMap.put(new Pair("func_77599_b", "getSmeltingList")); + mInitMap.put(new Pair("func_77602_a", "instance")); + mInitMap.put(new Pair("func_77607_a", "addRecipes")); + mInitMap.put(new Pair("func_77608_a", "addRecipes")); + mInitMap.put(new Pair("func_77609_a", "addRecipes")); + mInitMap.put(new Pair("func_77612_l", "getMaxDurability")); + mInitMap.put(new Pair("func_77613_e", "getRarity")); + mInitMap.put(new Pair("func_77614_k", "getHasSubtypes")); + mInitMap.put(new Pair("func_77615_a", "onPlayerStoppedUsing")); + mInitMap.put(new Pair("func_77616_k", "isItemTool")); + mInitMap.put(new Pair("func_77617_a", "getIconFromDamage")); + mInitMap.put(new Pair("func_77618_c", "getIconFromDamageForRenderPass")); + mInitMap.put(new Pair("func_77619_b", "getItemEnchantability")); + mInitMap.put(new Pair("func_77620_a", "getColorFromDamage")); + mInitMap.put(new Pair("func_77621_a", "getMovingObjectPositionFromPlayer")); + mInitMap.put(new Pair("func_77622_d", "onCreated")); + mInitMap.put(new Pair("func_77623_v", "requiresMultipleRenderPasses")); + mInitMap.put(new Pair("func_77624_a", "addInformation")); + mInitMap.put(new Pair("func_77625_d", "setMaxStackSize")); + mInitMap.put(new Pair("func_77626_a", "getMaxItemUseDuration")); + mInitMap.put(new Pair("func_77627_a", "setHasSubtypes")); + mInitMap.put(new Pair("func_77629_n_", "shouldRotateAroundWhenRendering")); + mInitMap.put(new Pair("func_77630_h", "doesContainerItemLeaveCraftingGrid")); + mInitMap.put(new Pair("func_77631_c", "setPotionEffect")); + mInitMap.put(new Pair("func_77634_r", "hasContainerItem")); + mInitMap.put(new Pair("func_77636_d", "hasEffect")); + mInitMap.put(new Pair("func_77637_a", "setCreativeTab")); + mInitMap.put(new Pair("func_77639_j", "getItemStackLimit")); + mInitMap.put(new Pair("func_77640_w", "getCreativeTab")); + mInitMap.put(new Pair("func_77642_a", "setContainerItem")); + mInitMap.put(new Pair("func_77643_m_", "isMap")); + mInitMap.put(new Pair("func_77644_a", "hitEntity")); + mInitMap.put(new Pair("func_77645_m", "isDamageable")); + mInitMap.put(new Pair("func_77647_b", "getMetadata")); + mInitMap.put(new Pair("func_77648_a", "onItemUse")); + mInitMap.put(new Pair("func_77650_f", "getIconIndex")); + mInitMap.put(new Pair("func_77651_p", "getShareTag")); + mInitMap.put(new Pair("func_77653_i", "getItemStackDisplayName")); + mInitMap.put(new Pair("func_77654_b", "onItemUseFinish")); + mInitMap.put(new Pair("func_77655_b", "setUnlocalizedName")); + mInitMap.put(new Pair("func_77656_e", "setMaxDurability")); + mInitMap.put(new Pair("func_77657_g", "getUnlocalizedNameInefficiently")); + mInitMap.put(new Pair("func_77658_a", "getUnlocalizedName")); + mInitMap.put(new Pair("func_77659_a", "onItemRightClick")); + mInitMap.put(new Pair("func_77661_b", "getItemUseAction")); + mInitMap.put(new Pair("func_77662_d", "isFull3D")); + mInitMap.put(new Pair("func_77663_a", "onUpdate")); + mInitMap.put(new Pair("func_77664_n", "setFull3D")); + mInitMap.put(new Pair("func_77667_c", "getUnlocalizedName")); + mInitMap.put(new Pair("func_77668_q", "getContainerItem")); + mInitMap.put(new Pair("func_77828_a", "validBookTagContents")); + mInitMap.put(new Pair("func_77831_g", "isSplash")); + mInitMap.put(new Pair("func_77832_l", "getEffects")); + mInitMap.put(new Pair("func_77833_h", "isEffectInstant")); + mInitMap.put(new Pair("func_77834_f", "getEffects")); + mInitMap.put(new Pair("func_77840_a", "spawnCreature")); + mInitMap.put(new Pair("func_77842_f", "getMaterialName")); + mInitMap.put(new Pair("func_77844_a", "setPotionEffect")); + mInitMap.put(new Pair("func_77845_h", "isWolfsFavoriteMeat")); + mInitMap.put(new Pair("func_77848_i", "setAlwaysEdible")); + mInitMap.put(new Pair("func_77849_c", "onFoodEaten")); + mInitMap.put(new Pair("func_77861_e", "getToolMaterialName")); + mInitMap.put(new Pair("func_77872_a", "updateMapData")); + mInitMap.put(new Pair("func_77873_a", "getMapData")); + mInitMap.put(new Pair("func_77875_a", "tryPlaceContainedLiquid")); + mInitMap.put(new Pair("func_77906_a", "brewBitOperations")); + mInitMap.put(new Pair("func_77907_h", "countSetFlags")); + mInitMap.put(new Pair("func_77910_c", "isFlagSet")); + mInitMap.put(new Pair("func_77911_a", "calcPotionLiquidColor")); + mInitMap.put(new Pair("func_77912_a", "parsePotionEffects")); + mInitMap.put(new Pair("func_77913_a", "applyIngredient")); + mInitMap.put(new Pair("func_77914_a", "checkFlag")); + mInitMap.put(new Pair("func_77916_d", "isFlagUnset")); + mInitMap.put(new Pair("func_77917_b", "getPotionEffects")); + mInitMap.put(new Pair("func_77942_o", "hasTagCompound")); + mInitMap.put(new Pair("func_77943_a", "tryPlaceItemIntoWorld")); + mInitMap.put(new Pair("func_77944_b", "copyItemStack")); + mInitMap.put(new Pair("func_77945_a", "updateAnimation")); + mInitMap.put(new Pair("func_77946_l", "copy")); + mInitMap.put(new Pair("func_77948_v", "isItemEnchanted")); + mInitMap.put(new Pair("func_77949_a", "loadItemStackFromNBT")); + mInitMap.put(new Pair("func_77950_b", "onItemUseFinish")); + mInitMap.put(new Pair("func_77951_h", "isItemDamaged")); + mInitMap.put(new Pair("func_77952_i", "getCurrentDurability")); + mInitMap.put(new Pair("func_77953_t", "getRarity")); + mInitMap.put(new Pair("func_77954_c", "getIconIndex")); + mInitMap.put(new Pair("func_77955_b", "writeToNBT")); + mInitMap.put(new Pair("func_77956_u", "isItemEnchantable")); + mInitMap.put(new Pair("func_77957_a", "useItemRightClick")); + mInitMap.put(new Pair("func_77958_k", "getMaxDurability")); + mInitMap.put(new Pair("func_77959_d", "isItemStackEqual")); + mInitMap.put(new Pair("func_77960_j", "getMetadata")); + mInitMap.put(new Pair("func_77961_a", "hitEntity")); + mInitMap.put(new Pair("func_77962_s", "hasEffect")); + mInitMap.put(new Pair("func_77963_c", "readFromNBT")); + mInitMap.put(new Pair("func_77964_b", "setMetadata")); + mInitMap.put(new Pair("func_77966_a", "addEnchantment")); + mInitMap.put(new Pair("func_77969_a", "isItemEqual")); + mInitMap.put(new Pair("func_77970_a", "areItemStackTagsEqual")); + mInitMap.put(new Pair("func_77972_a", "damageItem")); + mInitMap.put(new Pair("func_77973_b", "getItem")); + mInitMap.put(new Pair("func_77974_b", "onPlayerStoppedUsing")); + mInitMap.put(new Pair("func_77975_n", "getItemUseAction")); + mInitMap.put(new Pair("func_77976_d", "getMaxStackSize")); + mInitMap.put(new Pair("func_77977_a", "getUnlocalizedName")); + mInitMap.put(new Pair("func_77978_p", "getTagCompound")); + mInitMap.put(new Pair("func_77979_a", "splitStack")); + mInitMap.put(new Pair("func_77980_a", "onCrafting")); + mInitMap.put(new Pair("func_77981_g", "getHasSubtypes")); + mInitMap.put(new Pair("func_77982_d", "setTagCompound")); + mInitMap.put(new Pair("func_77983_a", "setTagInfo")); + mInitMap.put(new Pair("func_77984_f", "isItemStackDamageable")); + mInitMap.put(new Pair("func_77985_e", "isStackable")); + mInitMap.put(new Pair("func_77986_q", "getEnchantmentTagList")); + mInitMap.put(new Pair("func_77988_m", "getMaxItemUseDuration")); + mInitMap.put(new Pair("func_77989_b", "areItemStacksEqual")); + mInitMap.put(new Pair("func_77995_e", "getEnchantability")); + mInitMap.put(new Pair("func_77996_d", "getHarvestLevel")); + mInitMap.put(new Pair("func_77997_a", "getMaxUses")); + mInitMap.put(new Pair("func_77998_b", "getEfficiencyOnProperMaterial")); + mInitMap.put(new Pair("func_78000_c", "getDamageVsEntity")); + mInitMap.put(new Pair("func_78013_b", "getTabLabel")); + mInitMap.put(new Pair("func_78014_h", "setNoTitle")); + mInitMap.put(new Pair("func_78015_f", "getBackgroundImageName")); + mInitMap.put(new Pair("func_78016_d", "getTabIconItem")); + mInitMap.put(new Pair("func_78017_i", "shouldHidePlayerInventory")); + mInitMap.put(new Pair("func_78018_a", "displayAllReleventItems")); + mInitMap.put(new Pair("func_78019_g", "drawInForegroundOfTab")); + mInitMap.put(new Pair("func_78020_k", "getTabColumn")); + mInitMap.put(new Pair("func_78021_a", "getTabIndex")); + mInitMap.put(new Pair("func_78022_j", "setNoScrollbar")); + mInitMap.put(new Pair("func_78023_l", "isTabInFirstRow")); + mInitMap.put(new Pair("func_78024_c", "getTranslatedTabLabel")); + mInitMap.put(new Pair("func_78025_a", "setBackgroundImageName")); + mInitMap.put(new Pair("func_78044_b", "getDamageReductionAmount")); + mInitMap.put(new Pair("func_78045_a", "getEnchantability")); + mInitMap.put(new Pair("func_78046_a", "getDurability")); + mInitMap.put(new Pair("func_78084_a", "getTextureOffset")); + mInitMap.put(new Pair("func_78085_a", "setTextureOffset")); + mInitMap.put(new Pair("func_78086_a", "setLivingAnimations")); + mInitMap.put(new Pair("func_78087_a", "setRotationAngles")); + mInitMap.put(new Pair("func_78088_a", "render")); + mInitMap.put(new Pair("func_78110_b", "renderEars")); + mInitMap.put(new Pair("func_78111_c", "renderCloak")); + mInitMap.put(new Pair("func_78164_a", "renderSign")); + mInitMap.put(new Pair("func_78214_a", "updateRotations")); + mInitMap.put(new Pair("func_78231_a", "renderAll")); + mInitMap.put(new Pair("func_78235_a", "flipFace")); + mInitMap.put(new Pair("func_78236_a", "draw")); + mInitMap.put(new Pair("func_78240_a", "setTexturePosition")); + mInitMap.put(new Pair("func_78245_a", "render")); + mInitMap.put(new Pair("func_78255_a", "renderStringAtPos")); + mInitMap.put(new Pair("func_78256_a", "getStringWidth")); + mInitMap.put(new Pair("func_78257_a", "loadGlyphTexture")); + mInitMap.put(new Pair("func_78258_a", "renderString")); + mInitMap.put(new Pair("func_78259_e", "sizeStringToWidth")); + mInitMap.put(new Pair("func_78260_a", "getBidiFlag")); + mInitMap.put(new Pair("func_78261_a", "drawStringWithShadow")); + mInitMap.put(new Pair("func_78262_a", "trimStringToWidth")); + mInitMap.put(new Pair("func_78263_a", "getCharWidth")); + mInitMap.put(new Pair("func_78264_a", "setUnicodeFlag")); + mInitMap.put(new Pair("func_78265_b", "resetStyles")); + mInitMap.put(new Pair("func_78266_a", "renderDefaultChar")); + mInitMap.put(new Pair("func_78267_b", "splitStringWidth")); + mInitMap.put(new Pair("func_78268_b", "renderSplitString")); + mInitMap.put(new Pair("func_78269_a", "trimStringToWidth")); + mInitMap.put(new Pair("func_78270_c", "isFormatSpecial")); + mInitMap.put(new Pair("func_78271_c", "listFormattedStringToWidth")); + mInitMap.put(new Pair("func_78272_b", "isFormatColor")); + mInitMap.put(new Pair("func_78273_d", "trimStringmInitMap.put(newline")); + mInitMap.put(new Pair("func_78274_b", "renderStringAligned")); + mInitMap.put(new Pair("func_78275_b", "setBidiFlag")); + mInitMap.put(new Pair("func_78276_b", "drawString")); + mInitMap.put(new Pair("func_78277_a", "renderUnicodeChar")); + mInitMap.put(new Pair("func_78278_a", "renderCharAtPos")); + mInitMap.put(new Pair("func_78279_b", "drawSplitString")); + mInitMap.put(new Pair("func_78280_d", "wrapFormattedStringToWidth")); + mInitMap.put(new Pair("func_78282_e", "getFormatFromString")); + mInitMap.put(new Pair("func_78324_d", "getScaledHeight_double")); + mInitMap.put(new Pair("func_78325_e", "getScaleFactor")); + mInitMap.put(new Pair("func_78326_a", "getScaledWidth")); + mInitMap.put(new Pair("func_78327_c", "getScaledWidth_double")); + mInitMap.put(new Pair("func_78328_b", "getScaledHeight")); + mInitMap.put(new Pair("func_78369_a", "setColorRGBA_F")); + mInitMap.put(new Pair("func_78370_a", "setColorRGBA")); + mInitMap.put(new Pair("func_78371_b", "startDrawing")); + mInitMap.put(new Pair("func_78372_c", "addTranslation")); + mInitMap.put(new Pair("func_78373_b", "setTranslation")); + mInitMap.put(new Pair("func_78374_a", "addVertexWithUV")); + mInitMap.put(new Pair("func_78375_b", "setNormal")); + mInitMap.put(new Pair("func_78376_a", "setColorOpaque")); + mInitMap.put(new Pair("func_78377_a", "addVertex")); + mInitMap.put(new Pair("func_78378_d", "setColorOpaque_I")); + mInitMap.put(new Pair("func_78379_d", "reset")); + mInitMap.put(new Pair("func_78380_c", "setBrightness")); + mInitMap.put(new Pair("func_78381_a", "draw")); + mInitMap.put(new Pair("func_78382_b", "startDrawingQuads")); + mInitMap.put(new Pair("func_78383_c", "disableColor")); + mInitMap.put(new Pair("func_78384_a", "setColorRGBA_I")); + mInitMap.put(new Pair("func_78385_a", "setTextureUV")); + mInitMap.put(new Pair("func_78386_a", "setColorOpaque_F")); + mInitMap.put(new Pair("func_78418_a", "rendersChunk")); + mInitMap.put(new Pair("func_78419_a", "callLists")); + mInitMap.put(new Pair("func_78420_a", "addGLRenderList")); + mInitMap.put(new Pair("func_78421_b", "resetList")); + mInitMap.put(new Pair("func_78422_a", "setupRenderList")); + mInitMap.put(new Pair("func_78432_a", "parseUserSkin")); + mInitMap.put(new Pair("func_78433_b", "setAreaOpaque")); + mInitMap.put(new Pair("func_78434_a", "setAreaTransparent")); + mInitMap.put(new Pair("func_78435_c", "hasTransparency")); + mInitMap.put(new Pair("func_78439_a", "renderItemIn2D")); + mInitMap.put(new Pair("func_78440_a", "renderItemInFirstPerson")); + mInitMap.put(new Pair("func_78441_a", "updateEquippedItem")); + mInitMap.put(new Pair("func_78442_d", "renderFireInFirstPerson")); + mInitMap.put(new Pair("func_78443_a", "renderItem")); + mInitMap.put(new Pair("func_78444_b", "resetEquippedProgress")); + mInitMap.put(new Pair("func_78445_c", "resetEquippedProgress2")); + mInitMap.put(new Pair("func_78446_a", "renderInsideOfBlock")); + mInitMap.put(new Pair("func_78447_b", "renderOverlays")); + mInitMap.put(new Pair("func_78448_c", "renderWaterOverlayTexture")); + mInitMap.put(new Pair("func_78463_b", "enableLightmap")); + mInitMap.put(new Pair("func_78464_a", "updateRenderer")); + mInitMap.put(new Pair("func_78466_h", "updateFogColor")); + mInitMap.put(new Pair("func_78467_g", "orientCamera")); + mInitMap.put(new Pair("func_78468_a", "setupFog")); + mInitMap.put(new Pair("func_78469_a", "setFogColorBuffer")); + mInitMap.put(new Pair("func_78470_f", "updateTorchFlicker")); + mInitMap.put(new Pair("func_78471_a", "renderWorld")); + mInitMap.put(new Pair("func_78472_g", "updateLightmap")); + mInitMap.put(new Pair("func_78473_a", "getMouseOver")); + mInitMap.put(new Pair("func_78474_d", "renderRainSnow")); + mInitMap.put(new Pair("func_78475_f", "setupViewBobbing")); + mInitMap.put(new Pair("func_78476_b", "renderHand")); + mInitMap.put(new Pair("func_78477_e", "updateFovModifierHand")); + mInitMap.put(new Pair("func_78478_c", "setupOverlayRendering")); + mInitMap.put(new Pair("func_78479_a", "setupCameraTransform")); + mInitMap.put(new Pair("func_78480_b", "updateCameraAndRender")); + mInitMap.put(new Pair("func_78481_a", "getFOVModifier")); + mInitMap.put(new Pair("func_78482_e", "hurtCameraEffect")); + mInitMap.put(new Pair("func_78483_a", "disableLightmap")); + mInitMap.put(new Pair("func_78484_h", "addRainParticles")); + mInitMap.put(new Pair("func_78546_a", "isBoundingBoxInFrustum")); + mInitMap.put(new Pair("func_78547_a", "setPosition")); + mInitMap.put(new Pair("func_78548_b", "isBoxInFrustum")); + mInitMap.put(new Pair("func_78553_b", "isBoxInFrustum")); + mInitMap.put(new Pair("func_78558_a", "getInstance")); + mInitMap.put(new Pair("func_78559_a", "normalize")); + mInitMap.put(new Pair("func_78560_b", "init")); + mInitMap.put(new Pair("func_78713_a", "getEntityRenderObject")); + mInitMap.put(new Pair("func_78714_a", "getDistanceToCamera")); + mInitMap.put(new Pair("func_78715_a", "getEntityClassRenderObject")); + mInitMap.put(new Pair("func_78716_a", "getFontRenderer")); + mInitMap.put(new Pair("func_78717_a", "set")); + mInitMap.put(new Pair("func_78738_b", "createNextComponentRandom")); + mInitMap.put(new Pair("func_78743_b", "clickBlock")); + mInitMap.put(new Pair("func_78744_a", "clickBlockCreative")); + mInitMap.put(new Pair("func_78745_b", "flipPlayer")); + mInitMap.put(new Pair("func_78746_a", "setGameType")); + mInitMap.put(new Pair("func_78747_a", "enableEverythingIsScrewedUpMode")); + mInitMap.put(new Pair("func_78748_a", "setPlayerCapabilities")); + mInitMap.put(new Pair("func_78749_i", "extendedReach")); + mInitMap.put(new Pair("func_78750_j", "syncCurrentPlayItem")); + mInitMap.put(new Pair("func_78751_a", "onPlayerDestroyBlock")); + mInitMap.put(new Pair("func_78752_a", "sendPacketDropItem")); + mInitMap.put(new Pair("func_78753_a", "windowClick")); + mInitMap.put(new Pair("func_78755_b", "shouldDrawHUD")); + mInitMap.put(new Pair("func_78756_a", "sendEnchantPacket")); + mInitMap.put(new Pair("func_78757_d", "getBlockReachDistance")); + mInitMap.put(new Pair("func_78758_h", "isInCreativeMode")); + mInitMap.put(new Pair("func_78759_c", "onPlayerDamageBlock")); + mInitMap.put(new Pair("func_78760_a", "onPlayerRightClick")); + mInitMap.put(new Pair("func_78761_a", "sendSlotPacket")); + mInitMap.put(new Pair("func_78762_g", "isNotCreative")); + mInitMap.put(new Pair("func_78763_f", "gameIsSurvivalOrAdventure")); + mInitMap.put(new Pair("func_78764_a", "attackEntity")); + mInitMap.put(new Pair("func_78765_e", "updateController")); + mInitMap.put(new Pair("func_78766_c", "onStoppedUsingItem")); + mInitMap.put(new Pair("func_78767_c", "resetBlockRemoving")); + mInitMap.put(new Pair("func_78768_b", "interactWithEntitySendPacket")); + mInitMap.put(new Pair("func_78769_a", "sendUseItem")); + mInitMap.put(new Pair("func_78784_a", "setTextureOffset")); + mInitMap.put(new Pair("func_78785_a", "render")); + mInitMap.put(new Pair("func_78786_a", "addBox")); + mInitMap.put(new Pair("func_78787_b", "setTextureSize")); + mInitMap.put(new Pair("func_78788_d", "compileDisplayList")); + mInitMap.put(new Pair("func_78789_a", "addBox")); + mInitMap.put(new Pair("func_78790_a", "addBox")); + mInitMap.put(new Pair("func_78791_b", "renderWithRotation")); + mInitMap.put(new Pair("func_78792_a", "addChild")); + mInitMap.put(new Pair("func_78793_a", "setRotationPoint")); + mInitMap.put(new Pair("func_78794_c", "postRender")); + mInitMap.put(new Pair("func_78815_a", "getRandomComponent")); + mInitMap.put(new Pair("func_78817_b", "getNextMineShaftComponent")); + mInitMap.put(new Pair("func_78836_a", "getNBTCompound")); + mInitMap.put(new Pair("func_78837_a", "getServerDataFromNBTCompound")); + mInitMap.put(new Pair("func_78849_a", "addServerData")); + mInitMap.put(new Pair("func_78850_a", "getServerData")); + mInitMap.put(new Pair("func_78851_b", "removeServerData")); + mInitMap.put(new Pair("func_78853_a", "loadServerList")); + mInitMap.put(new Pair("func_78855_b", "saveServerList")); + mInitMap.put(new Pair("func_78856_c", "countServers")); + mInitMap.put(new Pair("func_78857_a", "swapServers")); + mInitMap.put(new Pair("func_78861_a", "getIP")); + mInitMap.put(new Pair("func_78862_a", "parseIntWithDefault")); + mInitMap.put(new Pair("func_78863_b", "getServerAddress")); + mInitMap.put(new Pair("func_78864_b", "getPort")); + mInitMap.put(new Pair("func_78867_a", "addBlockHitEffects")); + mInitMap.put(new Pair("func_78868_a", "updateEffects")); + mInitMap.put(new Pair("func_78869_b", "getStatistics")); + mInitMap.put(new Pair("func_78870_a", "clearEffects")); + mInitMap.put(new Pair("func_78872_b", "renderLitParticles")); + mInitMap.put(new Pair("func_78873_a", "addEffect")); + mInitMap.put(new Pair("func_78874_a", "renderParticles")); + mInitMap.put(new Pair("func_78879_f", "getCenterY")); + mInitMap.put(new Pair("func_78880_d", "getZSize")); + mInitMap.put(new Pair("func_78881_e", "getCenterX")); + mInitMap.put(new Pair("func_78882_c", "getYSize")); + mInitMap.put(new Pair("func_78883_b", "getXSize")); + mInitMap.put(new Pair("func_78884_a", "intersectsWith")); + mInitMap.put(new Pair("func_78885_a", "intersectsWith")); + mInitMap.put(new Pair("func_78886_a", "offset")); + mInitMap.put(new Pair("func_78887_a", "getmInitMap.put(newBoundingBox")); + mInitMap.put(new Pair("func_78888_b", "expandTo")); + mInitMap.put(new Pair("func_78889_a", "getComponentToAddBoundingBox")); + mInitMap.put(new Pair("func_78890_b", "isVecInside")); + mInitMap.put(new Pair("func_78891_g", "getCenterZ")); + mInitMap.put(new Pair("func_78898_a", "updatePlayerMoveState")); + mInitMap.put(new Pair("func_78904_d", "callOcclusionQueryList")); + mInitMap.put(new Pair("func_78905_g", "setupGLTranslation")); + mInitMap.put(new Pair("func_78906_e", "skipAllRenderPasses")); + mInitMap.put(new Pair("func_78908_a", "updateInFrustum")); + mInitMap.put(new Pair("func_78909_a", "getGLCallListForPass")); + mInitMap.put(new Pair("func_78910_b", "setDontDraw")); + mInitMap.put(new Pair("func_78911_c", "stopRendering")); + mInitMap.put(new Pair("func_78912_a", "distanceToEntitySquared")); + mInitMap.put(new Pair("func_78913_a", "setPosition")); + mInitMap.put(new Pair("func_78914_f", "markDirty")); + mInitMap.put(new Pair("func_80003_ah", "getPlayerUsageSnooper")); + mInitMap.put(new Pair("func_80006_f", "getUniqueID")); + mInitMap.put(new Pair("func_80007_l", "getDimensionName")); + mInitMap.put(new Pair("func_82114_b", "getCommandSenderPosition")); + mInitMap.put(new Pair("func_82141_a", "copyDataFrom")); + mInitMap.put(new Pair("func_82142_c", "setInvisible")); + mInitMap.put(new Pair("func_82143_as", "getMaxFallHeight")); + mInitMap.put(new Pair("func_82145_z", "getMaxInPortalTime")); + mInitMap.put(new Pair("func_82147_ab", "getPortalCooldown")); + mInitMap.put(new Pair("func_82148_at", "getTeleportDirection")); + mInitMap.put(new Pair("func_82149_j", "copyLocationAndAnglesFrom")); + mInitMap.put(new Pair("func_82150_aj", "isInvisible")); + mInitMap.put(new Pair("func_82159_b", "getArmorPosition")); + mInitMap.put(new Pair("func_82160_b", "dropEquipment")); + mInitMap.put(new Pair("func_82161_a", "getArmorItemForSlot")); + mInitMap.put(new Pair("func_82162_bC", "enchantEquipment")); + mInitMap.put(new Pair("func_82164_bB", "addRandomArmor")); + mInitMap.put(new Pair("func_82165_m", "isPotionActive")); + mInitMap.put(new Pair("func_82166_i", "getArmSwingAnimationEnd")); + mInitMap.put(new Pair("func_82167_n", "collideWithEntity")); + mInitMap.put(new Pair("func_82168_bl", "updateArmSwingProgress")); + mInitMap.put(new Pair("func_82169_q", "getCurrentArmor")); + mInitMap.put(new Pair("func_82170_o", "removePotionEffect")); + mInitMap.put(new Pair("func_82171_bF", "canBeSteered")); + mInitMap.put(new Pair("func_82183_n", "getAIControlledByPlayer")); + mInitMap.put(new Pair("func_82185_r", "setCollarColor")); + mInitMap.put(new Pair("func_82186_bH", "getCollarColor")); + mInitMap.put(new Pair("func_82187_q", "setLookingForHome")); + mInitMap.put(new Pair("func_82188_j", "adjustProbability")); + mInitMap.put(new Pair("func_82196_d", "attackEntityWithRangedAttack")); + mInitMap.put(new Pair("func_82197_f", "setAggressive")); + mInitMap.put(new Pair("func_82198_m", "getAggressive")); + mInitMap.put(new Pair("func_82201_a", "setSkeletonType")); + mInitMap.put(new Pair("func_82202_m", "getSkeletonType")); + mInitMap.put(new Pair("func_82203_t", "getWatchedTargetId")); + mInitMap.put(new Pair("func_82205_o", "isArmored")); + mInitMap.put(new Pair("func_82209_a", "launchWitherSkullToCoords")); + mInitMap.put(new Pair("func_82212_n", "getInvulTime")); + mInitMap.put(new Pair("func_82215_s", "setInvulTime")); + mInitMap.put(new Pair("func_82216_a", "launchWitherSkullToEntity")); + mInitMap.put(new Pair("func_82227_f", "setChild")); + mInitMap.put(new Pair("func_82228_a", "startConversion")); + mInitMap.put(new Pair("func_82229_g", "setVillager")); + mInitMap.put(new Pair("func_82230_o", "isConverting")); + mInitMap.put(new Pair("func_82231_m", "isVillager")); + mInitMap.put(new Pair("func_82232_p", "convertToVillager")); + mInitMap.put(new Pair("func_82233_q", "getConversionTimeBoost")); + mInitMap.put(new Pair("func_82235_h", "getIsBatHanging")); + mInitMap.put(new Pair("func_82236_f", "setIsBatHanging")); + mInitMap.put(new Pair("func_82238_cc", "getHideCape")); + mInitMap.put(new Pair("func_82239_b", "setHideCape")); + mInitMap.put(new Pair("func_82241_s", "getHideCape")); + mInitMap.put(new Pair("func_82242_a", "addExperienceLevel")); + mInitMap.put(new Pair("func_82243_bO", "getArmorVisibility")); + mInitMap.put(new Pair("func_82244_d", "displayGUIAnvil")); + mInitMap.put(new Pair("func_82245_bX", "isSpawnForced")); + mInitMap.put(new Pair("func_82246_f", "isCurrentToolAdventureModeExempt")); + mInitMap.put(new Pair("func_82247_a", "canPlayerEdit")); + mInitMap.put(new Pair("func_82328_a", "setDirection")); + mInitMap.put(new Pair("func_82329_d", "getWidthPixels")); + mInitMap.put(new Pair("func_82330_g", "getHeightPixels")); + mInitMap.put(new Pair("func_82333_j", "getRotation")); + mInitMap.put(new Pair("func_82334_a", "setDisplayedItem")); + mInitMap.put(new Pair("func_82335_i", "getDisplayedItem")); + mInitMap.put(new Pair("func_82336_g", "setItemRotation")); + mInitMap.put(new Pair("func_82338_g", "setAlphaF")); + mInitMap.put(new Pair("func_82340_a", "setPotionDamage")); + mInitMap.put(new Pair("func_82341_c", "getMotionFactor")); + mInitMap.put(new Pair("func_82342_d", "isInvulnerable")); + mInitMap.put(new Pair("func_82343_e", "setInvulnerable")); + mInitMap.put(new Pair("func_82356_Z", "isCommandBlockEnabled")); + mInitMap.put(new Pair("func_82357_ak", "getSpawnProtectionSize")); + mInitMap.put(new Pair("func_82358_a", "isUsernameIndex")); + mInitMap.put(new Pair("func_82359_c", "getPlayer")); + mInitMap.put(new Pair("func_82360_a", "getStringFromNthArg")); + mInitMap.put(new Pair("func_82362_a", "getRequiredPermissionLevel")); + mInitMap.put(new Pair("func_82363_b", "parseDouble")); + mInitMap.put(new Pair("func_82366_d", "getGameRules")); + mInitMap.put(new Pair("func_82370_a", "getUsernameIndex")); + mInitMap.put(new Pair("func_82371_e", "getDistanceSquaredToChunkCoordinates")); + mInitMap.put(new Pair("func_82372_a", "getMovementDirection")); + mInitMap.put(new Pair("func_82375_f", "getDefaultMinimumLevel")); + mInitMap.put(new Pair("func_82376_e", "getDefaultMaximumLevel")); + mInitMap.put(new Pair("func_82377_a", "matchesMultiplePlayers")); + mInitMap.put(new Pair("func_82378_b", "hasArguments")); + mInitMap.put(new Pair("func_82379_d", "getDefaultMaximumRange")); + mInitMap.put(new Pair("func_82380_c", "matchPlayers")); + mInitMap.put(new Pair("func_82381_h", "getArgumentMap")); + mInitMap.put(new Pair("func_82382_g", "getDefaultCount")); + mInitMap.put(new Pair("func_82383_a", "hasTheseArguments")); + mInitMap.put(new Pair("func_82384_c", "getDefaultMinimumRange")); + mInitMap.put(new Pair("func_82386_a", "matchOnePlayer")); + mInitMap.put(new Pair("func_82403_a", "renderFrameItemAsBlock")); + mInitMap.put(new Pair("func_82406_b", "renderItemAndEffectIntoGUI")); + mInitMap.put(new Pair("func_82441_a", "renderFirstPersonArm")); + mInitMap.put(new Pair("func_82448_a", "transferEntityToWorld")); + mInitMap.put(new Pair("func_82449_a", "findPlayers")); + mInitMap.put(new Pair("func_82482_a", "dispense")); + mInitMap.put(new Pair("func_82485_a", "playDispenseSound")); + mInitMap.put(new Pair("func_82486_a", "doDispense")); + mInitMap.put(new Pair("func_82487_b", "dispenseStack")); + mInitMap.put(new Pair("func_82489_a", "spawnDispenseParticles")); + mInitMap.put(new Pair("func_82499_a", "getProjectileEntity")); + mInitMap.put(new Pair("func_82565_a", "canEntityStandAt")); + mInitMap.put(new Pair("func_82571_y", "getGeneratorOptions")); + mInitMap.put(new Pair("func_82572_b", "incrementTotalWorldTime")); + mInitMap.put(new Pair("func_82573_f", "getWorldTotalTime")); + mInitMap.put(new Pair("func_82574_x", "getGameRulesInstance")); + mInitMap.put(new Pair("func_82580_o", "removeTag")); + mInitMap.put(new Pair("func_82581_a", "createCrashReport")); + mInitMap.put(new Pair("func_82582_d", "hasNoTags")); + mInitMap.put(new Pair("func_82594_a", "getObject")); + mInitMap.put(new Pair("func_82595_a", "putObject")); + mInitMap.put(new Pair("func_82599_e", "getFrontOffsetZ")); + mInitMap.put(new Pair("func_82600_a", "getFront")); + mInitMap.put(new Pair("func_82601_c", "getFrontOffsetX")); + mInitMap.put(new Pair("func_82615_a", "getX")); + mInitMap.put(new Pair("func_82616_c", "getZ")); + mInitMap.put(new Pair("func_82617_b", "getY")); + mInitMap.put(new Pair("func_82618_k", "getWorld")); + mInitMap.put(new Pair("func_82620_h", "getBlockMetadata")); + mInitMap.put(new Pair("func_82621_f", "getZInt")); + mInitMap.put(new Pair("func_82622_e", "getYInt")); + mInitMap.put(new Pair("func_82623_d", "getXInt")); + mInitMap.put(new Pair("func_82632_g", "boostSpeed")); + mInitMap.put(new Pair("func_82633_h", "isControlledByPlayer")); + mInitMap.put(new Pair("func_82634_f", "isSpeedBoosted")); + mInitMap.put(new Pair("func_82644_b", "getWorldFeatures")); + mInitMap.put(new Pair("func_82647_a", "setBiome")); + mInitMap.put(new Pair("func_82648_a", "getBiome")); + mInitMap.put(new Pair("func_82649_e", "getDefaultFlatGenerator")); + mInitMap.put(new Pair("func_82650_c", "getFlatLayers")); + mInitMap.put(new Pair("func_82651_a", "createFlatGeneratorFromString")); + mInitMap.put(new Pair("func_82656_d", "getMinY")); + mInitMap.put(new Pair("func_82657_a", "getLayerCount")); + mInitMap.put(new Pair("func_82658_c", "getFillBlockMeta")); + mInitMap.put(new Pair("func_82660_d", "setMinY")); + mInitMap.put(new Pair("func_82667_a", "getScatteredFeatureSpawnList")); + mInitMap.put(new Pair("func_82683_b", "setDefaultPlayerReputation")); + mInitMap.put(new Pair("func_82684_a", "getReputationForPlayer")); + mInitMap.put(new Pair("func_82686_i", "isMatingSeason")); + mInitMap.put(new Pair("func_82687_d", "isPlayerReputationTooLow")); + mInitMap.put(new Pair("func_82688_a", "setReputationForPlayer")); + mInitMap.put(new Pair("func_82689_b", "writeVillageDataToNBT")); + mInitMap.put(new Pair("func_82690_a", "readVillageDataFromNBT")); + mInitMap.put(new Pair("func_82692_h", "endMatingSeason")); + mInitMap.put(new Pair("func_82695_e", "recreateStructures")); + mInitMap.put(new Pair("func_82704_a", "isEntityApplicable")); + mInitMap.put(new Pair("func_82705_e", "getAnimal")); + mInitMap.put(new Pair("func_82708_h", "setObjectWatched")); + mInitMap.put(new Pair("func_82709_a", "addObjectByDataType")); + mInitMap.put(new Pair("func_82710_f", "getWatchableObjectItemStack")); + mInitMap.put(new Pair("func_82712_a", "parseDoubleWithDefault")); + mInitMap.put(new Pair("func_82713_a", "parseDoubleWithDefaultAndMax")); + mInitMap.put(new Pair("func_82714_a", "parseIntWithDefaultAndMax")); + mInitMap.put(new Pair("func_82715_a", "parseIntWithDefault")); + mInitMap.put(new Pair("func_82716_a", "getRandomDoubleInRange")); + mInitMap.put(new Pair("func_82719_a", "writeCustomPotionEffectToNBT")); + mInitMap.put(new Pair("func_82720_e", "getIsAmbient")); + mInitMap.put(new Pair("func_82721_a", "setSplashPotion")); + mInitMap.put(new Pair("func_82722_b", "readCustomPotionEffectFromNBT")); + mInitMap.put(new Pair("func_82725_o", "isMagicDamage")); + mInitMap.put(new Pair("func_82726_p", "setMagicDamage")); + mInitMap.put(new Pair("func_82733_a", "selectEntitiesWithinAABB")); + mInitMap.put(new Pair("func_82734_g", "getChunkHeightMapMinimum")); + mInitMap.put(new Pair("func_82736_K", "getGameRules")); + mInitMap.put(new Pair("func_82737_E", "getTotalWorldTime")); + mInitMap.put(new Pair("func_82739_e", "playBroadcastSound")); + mInitMap.put(new Pair("func_82742_i", "resetUpdateEntityTick")); + mInitMap.put(new Pair("func_82743_f", "getCreationCloudUpdateTick")); + mInitMap.put(new Pair("func_82744_b", "setCloudUpdateTick")); + mInitMap.put(new Pair("func_82746_a", "broadcastSound")); + mInitMap.put(new Pair("func_82747_f", "getWorldTypeID")); + mInitMap.put(new Pair("func_82750_a", "setWorldName")); + mInitMap.put(new Pair("func_82752_c", "isAdventure")); + mInitMap.put(new Pair("func_82753_a", "setPriority")); + mInitMap.put(new Pair("func_82756_a", "getGameRuleStringValue")); + mInitMap.put(new Pair("func_82757_a", "setValue")); + mInitMap.put(new Pair("func_82758_b", "getGameRuleBooleanValue")); + mInitMap.put(new Pair("func_82763_b", "getRules")); + mInitMap.put(new Pair("func_82764_b", "setOrCreateGameRule")); + mInitMap.put(new Pair("func_82765_e", "hasRule")); + mInitMap.put(new Pair("func_82766_b", "getGameRuleBooleanValue")); + mInitMap.put(new Pair("func_82767_a", "getGameRuleStringValue")); + mInitMap.put(new Pair("func_82768_a", "readGameRulesFromNBT")); + mInitMap.put(new Pair("func_82769_a", "addGameRule")); + mInitMap.put(new Pair("func_82770_a", "writeGameRulesToNBT")); + mInitMap.put(new Pair("func_82781_a", "getEnchantments")); + mInitMap.put(new Pair("func_82782_a", "setEnchantments")); + mInitMap.put(new Pair("func_82784_g", "isRecipeDisabled")); + mInitMap.put(new Pair("func_82787_a", "findMatchingRecipe")); + mInitMap.put(new Pair("func_82788_x", "canItemEditBlocks")); + mInitMap.put(new Pair("func_82789_a", "getIsRepairable")); + mInitMap.put(new Pair("func_82790_a", "getColorFromItemStack")); + mInitMap.put(new Pair("func_82810_a", "createHangingEntity")); + mInitMap.put(new Pair("func_82812_d", "getArmorMaterial")); + mInitMap.put(new Pair("func_82814_b", "getColor")); + mInitMap.put(new Pair("func_82815_c", "removeColor")); + mInitMap.put(new Pair("func_82816_b_", "hasColor")); + mInitMap.put(new Pair("func_82824_a", "setBossStatus")); + mInitMap.put(new Pair("func_82829_a", "renderCloudsCheck")); + mInitMap.put(new Pair("func_82830_a", "getNightVisionBrightness")); + mInitMap.put(new Pair("func_82833_r", "getDisplayName")); + mInitMap.put(new Pair("func_82835_x", "canEditBlocks")); + mInitMap.put(new Pair("func_82836_z", "getItemFrame")); + mInitMap.put(new Pair("func_82837_s", "hasDisplayName")); + mInitMap.put(new Pair("func_82838_A", "getRepairCost")); + mInitMap.put(new Pair("func_82839_y", "isOnItemFrame")); + mInitMap.put(new Pair("func_82840_a", "getTooltip")); + mInitMap.put(new Pair("func_82841_c", "setRepairCost")); + mInitMap.put(new Pair("func_82842_a", "setItemFrame")); + mInitMap.put(new Pair("func_82846_b", "transferStackInSlot")); + mInitMap.put(new Pair("func_82847_b", "removeCraftingFromCrafters")); + mInitMap.put(new Pair("func_82848_d", "updateRepairOutput")); + mInitMap.put(new Pair("func_82850_a", "updateItemName")); + mInitMap.put(new Pair("func_82869_a", "canTakeStack")); + mInitMap.put(new Pair("func_82870_a", "onPickupFromSlot")); + mInitMap.put(new Pair("func_82877_b", "setPlayerWalkSpeed")); + mInitMap.put(new Pair("func_82879_c", "sendSettingsToServer")); + mInitMap.put(new Pair("func_82883_a", "getUnicodeFlag")); + mInitMap.put(new Pair("func_82889_a", "getBatSize")); + mInitMap.put(new Pair("func_83015_S", "getCurrentDate")); + mInitMap.put(new Pair("func_85029_a", "addEntityCrashInfo")); + mInitMap.put(new Pair("func_85030_a", "playSound")); + mInitMap.put(new Pair("func_85031_j", "hitByEntity")); + mInitMap.put(new Pair("func_85032_ar", "isEntityInvulnerable")); + mInitMap.put(new Pair("func_85033_bc", "collideWithNearbyEntities")); + mInitMap.put(new Pair("func_85034_r", "setArrowCountInEntity")); + mInitMap.put(new Pair("func_85035_bI", "getArrowCountInEntity")); + mInitMap.put(new Pair("func_85036_m", "setCombatTask")); + mInitMap.put(new Pair("func_85039_t", "addScore")); + mInitMap.put(new Pair("func_85040_s", "setScore")); + mInitMap.put(new Pair("func_85052_h", "getThrower")); + mInitMap.put(new Pair("func_85054_d", "searchForOtherItemsNearby")); + mInitMap.put(new Pair("func_85055_a", "makeCrashReport")); + mInitMap.put(new Pair("func_85056_g", "getCategory")); + mInitMap.put(new Pair("func_85057_a", "makeCategoryDepth")); + mInitMap.put(new Pair("func_85058_a", "makeCategory")); + mInitMap.put(new Pair("func_85069_a", "firstTwoElementsOfStackTraceMatch")); + mInitMap.put(new Pair("func_85070_b", "trimStackTraceEntriesFromBottom")); + mInitMap.put(new Pair("func_85071_a", "getLocationInfo")); + mInitMap.put(new Pair("func_85072_a", "appendToStringBuilder")); + mInitMap.put(new Pair("func_85073_a", "getPrunedStackTrace")); + mInitMap.put(new Pair("func_85093_e", "renderArrowsStuckInEntity")); + mInitMap.put(new Pair("func_85094_b", "renderDebugBoundingBox")); + mInitMap.put(new Pair("func_85102_a", "playSoundToNearExcept")); + mInitMap.put(new Pair("func_85118_a", "addToCrashReport")); + mInitMap.put(new Pair("func_85144_b", "getCacheSizes")); + mInitMap.put(new Pair("func_85151_d", "getLowerChestInventory")); + mInitMap.put(new Pair("func_85156_a", "removeTask")); + mInitMap.put(new Pair("func_85157_q", "isAdventureModeExempt")); + mInitMap.put(new Pair("func_85158_p", "setAdventureModeExempt")); + mInitMap.put(new Pair("func_85173_a", "playSoundToNearExcept")); + mInitMap.put(new Pair("func_85176_s", "getDefaultTeleporter")); + mInitMap.put(new Pair("func_85181_a", "getRandomModelBox")); + mInitMap.put(new Pair("func_85182_a", "sameToolAndBlock")); + mInitMap.put(new Pair("func_85187_a", "drawString")); + mInitMap.put(new Pair("func_85188_a", "makePortal")); + mInitMap.put(new Pair("func_85189_a", "removeStalePortalLocations")); + mInitMap.put(new Pair("func_90010_a", "isPartOfLargeChest")); + mInitMap.put(new Pair("func_90011_a", "createChild")); + mInitMap.put(new Pair("func_90013_b", "getDyeFromFleeceColor")); + mInitMap.put(new Pair("func_90014_a", "getDyeBasedOnParents")); + mInitMap.put(new Pair("func_90019_g", "applyRenderColor")); + mInitMap.put(new Pair("func_90020_K", "getLimitFramerate")); + mInitMap.put(new Pair("func_90022_d", "getListOfPlayers")); + mInitMap.put(new Pair("func_90033_f", "canLoadWorld")); + mInitMap.put(new Pair("func_90035_a", "getClassFromID")); + mInitMap.put(new Pair("func_90036_a", "getFireAspectModifier")); + mInitMap.put(new Pair("func_90999_ad", "canRenderOnFire")); + mInitMap.put(new Pair("func_92015_f", "closeScreenNoPacket")); + mInitMap.put(new Pair("func_92034_a", "createParticle")); + mInitMap.put(new Pair("func_92035_a", "createBall")); + mInitMap.put(new Pair("func_92036_a", "createBurst")); + mInitMap.put(new Pair("func_92038_a", "createShaped")); + mInitMap.put(new Pair("func_92043_f", "setTwinkle")); + mInitMap.put(new Pair("func_92044_a", "setColour")); + mInitMap.put(new Pair("func_92045_e", "setTrail")); + mInitMap.put(new Pair("func_92046_g", "setFadeColour")); + mInitMap.put(new Pair("func_92058_a", "setEntityItemStack")); + mInitMap.put(new Pair("func_92059_d", "getEntityItem")); + mInitMap.put(new Pair("func_92085_d", "getIsBlank")); + mInitMap.put(new Pair("func_92087_a", "causeThornsDamage")); + mInitMap.put(new Pair("func_92088_a", "makeFireworks")); + mInitMap.put(new Pair("func_92089_a", "canApply")); + mInitMap.put(new Pair("func_92093_a", "getFireTimeForEntity")); + mInitMap.put(new Pair("func_92097_a", "negateDamage")); + mInitMap.put(new Pair("func_92103_a", "addRecipe")); + mInitMap.put(new Pair("func_92111_a", "getEnchantedItemStack")); + mInitMap.put(new Pair("func_92115_a", "addEnchantment")); + mInitMap.put(new Pair("func_92116_a", "addEnchantmentBooksToList")); + mInitMap.put(new Pair("func_94041_b", "isItemValidForSlot")); + mInitMap.put(new Pair("func_94053_h", "nextTextureIndexX")); + mInitMap.put(new Pair("func_94056_bM", "hasCustomNameTag")); + mInitMap.put(new Pair("func_94057_bL", "getCustomNameTag")); + mInitMap.put(new Pair("func_94058_c", "setCustomNameTag")); + mInitMap.put(new Pair("func_94059_bO", "getAlwaysRenderNameTagForRender")); + mInitMap.put(new Pair("func_94061_f", "setAlwaysRenderNameTag")); + mInitMap.put(new Pair("func_94062_bN", "getAlwaysRenderNameTag")); + mInitMap.put(new Pair("func_94065_a", "drawTexturedModelRectFromIcon")); + mInitMap.put(new Pair("func_94083_c", "getTntPlacedBy")); + mInitMap.put(new Pair("func_94085_r", "getDefaultDisplayTileOffset")); + mInitMap.put(new Pair("func_94086_l", "setDisplayTileOffset")); + mInitMap.put(new Pair("func_94087_l", "getMinecartType")); + mInitMap.put(new Pair("func_94090_a", "createMinecart")); + mInitMap.put(new Pair("func_94092_k", "setDisplayTileData")); + mInitMap.put(new Pair("func_94095_a", "killMinecart")); + mInitMap.put(new Pair("func_94096_e", "setHasDisplayTile")); + mInitMap.put(new Pair("func_94097_p", "getDefaultDisplayTileData")); + mInitMap.put(new Pair("func_94098_o", "getDisplayTileData")); + mInitMap.put(new Pair("func_94099_q", "getDisplayTileOffset")); + mInitMap.put(new Pair("func_94100_s", "hasDisplayTile")); + mInitMap.put(new Pair("func_94101_h", "applyDrag")); + mInitMap.put(new Pair("func_94103_c", "explodeCart")); + mInitMap.put(new Pair("func_94105_c", "ignite")); + mInitMap.put(new Pair("func_94107_f", "setMinecartPowered")); + mInitMap.put(new Pair("func_94108_c", "isMinecartPowered")); + mInitMap.put(new Pair("func_94128_d", "getSlotsForFace")); + mInitMap.put(new Pair("func_94140_a", "registerDestroyBlockIcons")); + mInitMap.put(new Pair("func_94143_a", "updateIcons")); + mInitMap.put(new Pair("func_94148_a", "renderItemOverlayIntoGUI")); + mInitMap.put(new Pair("func_94149_a", "renderIcon")); + mInitMap.put(new Pair("func_94178_a", "updateIcons")); + mInitMap.put(new Pair("func_94182_a", "addSlot")); + mInitMap.put(new Pair("func_94183_a", "getStitchHolder")); + mInitMap.put(new Pair("func_94184_a", "getAllStitchSlots")); + mInitMap.put(new Pair("func_94185_c", "getOriginY")); + mInitMap.put(new Pair("func_94186_b", "getOriginX")); + mInitMap.put(new Pair("func_94194_d", "rotate")); + mInitMap.put(new Pair("func_94195_e", "isRotated")); + mInitMap.put(new Pair("func_94196_a", "setmInitMap.put(newDimension")); + mInitMap.put(new Pair("func_94197_a", "getWidth")); + mInitMap.put(new Pair("func_94199_b", "getHeight")); + mInitMap.put(new Pair("func_94206_g", "getMinV")); + mInitMap.put(new Pair("func_94207_b", "getInterpolatedV")); + mInitMap.put(new Pair("func_94209_e", "getMinU")); + mInitMap.put(new Pair("func_94210_h", "getMaxV")); + mInitMap.put(new Pair("func_94211_a", "getIconWidth")); + mInitMap.put(new Pair("func_94212_f", "getMaxU")); + mInitMap.put(new Pair("func_94214_a", "getInterpolatedU")); + mInitMap.put(new Pair("func_94215_i", "getIconName")); + mInitMap.put(new Pair("func_94216_b", "getIconHeight")); + mInitMap.put(new Pair("func_94217_a", "copyFrom")); + mInitMap.put(new Pair("func_94219_l", "updateAnimation")); + mInitMap.put(new Pair("func_94241_a", "updateCompass")); + mInitMap.put(new Pair("func_94245_a", "registerIcon")); + mInitMap.put(new Pair("func_94248_c", "updateAnimations")); + mInitMap.put(new Pair("func_94277_a", "bindTexture")); + mInitMap.put(new Pair("func_94305_f", "doStitch")); + mInitMap.put(new Pair("func_94309_g", "getStichSlots")); + mInitMap.put(new Pair("func_94310_b", "allocateSlot")); + mInitMap.put(new Pair("func_94311_c", "expandAndAllocateSlot")); + mInitMap.put(new Pair("func_94520_b", "isKeyTranslated")); + mInitMap.put(new Pair("func_94522_b", "canTranslate")); + mInitMap.put(new Pair("func_94525_a", "computeStackSize")); + mInitMap.put(new Pair("func_94526_b", "calcRedstoneFromInventory")); + mInitMap.put(new Pair("func_94527_a", "canAddItemToSlot")); + mInitMap.put(new Pair("func_94528_d", "isValidDragMode")); + mInitMap.put(new Pair("func_94529_b", "extractDragMode")); + mInitMap.put(new Pair("func_94531_b", "canDragIntoSlot")); + mInitMap.put(new Pair("func_94532_c", "getDragEvent")); + mInitMap.put(new Pair("func_94533_d", "resetDrag")); + mInitMap.put(new Pair("func_94539_a", "setExplosionSource")); + mInitMap.put(new Pair("func_94540_d", "setExplosion")); + mInitMap.put(new Pair("func_94541_c", "isExplosion")); + mInitMap.put(new Pair("func_94560_a", "getDamageSrc")); + mInitMap.put(new Pair("func_94572_D", "getStrongestIndirectPower")); + mInitMap.put(new Pair("func_94574_k", "getIndirectPowerOutput")); + mInitMap.put(new Pair("func_94576_a", "getEntitiesWithinAABBExcludingEntity")); + mInitMap.put(new Pair("func_94577_B", "getBlockPowerInput")); + mInitMap.put(new Pair("func_94581_a", "registerIcons")); + mInitMap.put(new Pair("func_94599_c", "getItemIconForUseDuration")); + mInitMap.put(new Pair("func_94602_b", "getBackgroundIcon")); + mInitMap.put(new Pair("func_94608_d", "getItemSpriteNumber")); + mInitMap.put(new Pair("func_94613_c", "getExplosivePlacedBy")); + mInitMap.put(new Pair("func_94901_k", "getSpriteNumber")); + mInitMap.put(new Pair("func_96092_aw", "isPushedByWater")); + mInitMap.put(new Pair("func_96094_a", "setMinecartName")); + mInitMap.put(new Pair("func_96095_a", "onActivatorRailPass")); + mInitMap.put(new Pair("func_96096_ay", "isIgnited")); + mInitMap.put(new Pair("func_96107_aA", "getXPos")); + mInitMap.put(new Pair("func_96108_aC", "getZPos")); + mInitMap.put(new Pair("func_96109_aB", "getYPos")); + mInitMap.put(new Pair("func_96110_f", "setBlocked")); + mInitMap.put(new Pair("func_96111_ay", "getBlocked")); + mInitMap.put(new Pair("func_96120_a", "setEquipmentDropChance")); + mInitMap.put(new Pair("func_96122_a", "canAttackPlayer")); + mInitMap.put(new Pair("func_96123_co", "getWorldScoreboard")); + mInitMap.put(new Pair("func_96124_cp", "getTeam")); + mInitMap.put(new Pair("func_96125_a", "displayGUIHopperMinecart")); + mInitMap.put(new Pair("func_96136_a", "renderScoreboard")); + mInitMap.put(new Pair("func_96290_a", "isBlockProtected")); + mInitMap.put(new Pair("func_96296_a", "getValidValues")); + mInitMap.put(new Pair("func_96297_d", "getFriendlyName")); + mInitMap.put(new Pair("func_96298_a", "getFormattingCode")); + mInitMap.put(new Pair("func_96300_b", "getValueByName")); + mInitMap.put(new Pair("func_96301_b", "isFancyStyling")); + mInitMap.put(new Pair("func_96302_c", "isColor")); + mInitMap.put(new Pair("func_96332_d", "getPlayerName")); + mInitMap.put(new Pair("func_96333_a", "joinNiceStringFromCollection")); + mInitMap.put(new Pair("func_96441_U", "getScoreboard")); + mInitMap.put(new Pair("func_96443_a", "setWorldScoreboard")); + mInitMap.put(new Pair("func_96449_a", "renderOffsetLivingLabel")); + mInitMap.put(new Pair("func_96457_a", "matchesScoreboardCriteria")); + mInitMap.put(new Pair("func_96508_e", "getTeam")); + mInitMap.put(new Pair("func_96509_i", "getPlayersTeam")); + mInitMap.put(new Pair("func_96511_d", "removeTeam")); + mInitMap.put(new Pair("func_96512_b", "removePlayerFromTeam")); + mInitMap.put(new Pair("func_96514_c", "getScoreObjectives")); + mInitMap.put(new Pair("func_96517_b", "getObjectiveDisplaySlot")); + mInitMap.put(new Pair("func_96518_b", "getObjective")); + mInitMap.put(new Pair("func_96523_a", "broadcastTeamCreated")); + mInitMap.put(new Pair("func_96524_g", "removePlayerFromTeams")); + mInitMap.put(new Pair("func_96525_g", "getTeams")); + mInitMap.put(new Pair("func_96526_d", "getObjectiveNames")); + mInitMap.put(new Pair("func_96527_f", "createTeam")); + mInitMap.put(new Pair("func_96529_a", "getValueFromObjective")); + mInitMap.put(new Pair("func_96530_a", "setObjectiveInDisplaySlot")); + mInitMap.put(new Pair("func_96531_f", "getTeamNames")); + mInitMap.put(new Pair("func_96534_i", "getSortedScores")); + mInitMap.put(new Pair("func_96535_a", "addScoreObjective")); + mInitMap.put(new Pair("func_96537_j", "getObjectiveDisplaySlotNumber")); + mInitMap.put(new Pair("func_96538_b", "broadcastTeamRemoved")); + mInitMap.put(new Pair("func_96539_a", "getObjectiveInDisplaySlot")); + mInitMap.put(new Pair("func_96559_d", "getFrontOffsetY")); + mInitMap.put(new Pair("func_96631_a", "attemptDamageItem")); + mInitMap.put(new Pair("func_96636_a", "getName")); + mInitMap.put(new Pair("func_96637_b", "isReadOnly")); + mInitMap.put(new Pair("func_96646_b", "decreaseScore")); + mInitMap.put(new Pair("func_96647_c", "setScorePoints")); + mInitMap.put(new Pair("func_96649_a", "increseScore")); + mInitMap.put(new Pair("func_96650_f", "getScoreScoreboard")); + mInitMap.put(new Pair("func_96652_c", "getScorePoints")); + mInitMap.put(new Pair("func_96653_e", "getPlayerName")); + mInitMap.put(new Pair("func_96660_a", "setAllowFriendlyFire")); + mInitMap.put(new Pair("func_96661_b", "getRegisteredName")); + mInitMap.put(new Pair("func_96662_c", "setNameSuffix")); + mInitMap.put(new Pair("func_96663_f", "getColorSuffix")); + mInitMap.put(new Pair("func_96664_a", "setTeamName")); + mInitMap.put(new Pair("func_96665_g", "getAllowFriendlyFire")); + mInitMap.put(new Pair("func_96666_b", "setNamePrefix")); + mInitMap.put(new Pair("func_96667_a", "formatPlayerName")); + mInitMap.put(new Pair("func_96668_e", "getColorPrefix")); + mInitMap.put(new Pair("func_96670_d", "getMembershipCollection")); + mInitMap.put(new Pair("func_96678_d", "getDisplayName")); + mInitMap.put(new Pair("func_96679_b", "getName")); + mInitMap.put(new Pair("func_96680_c", "getCriteria")); + mInitMap.put(new Pair("func_96681_a", "setDisplayName")); + mInitMap.put(new Pair("func_96682_a", "getScoreboard")); + mInitMap.put(new Pair("func_98034_c", "isInvisibleToPlayer")); + mInitMap.put(new Pair("func_98035_c", "writeMountToNBT")); + mInitMap.put(new Pair("func_98042_n", "setTransferTicker")); + mInitMap.put(new Pair("func_98043_aE", "canTransfer")); + mInitMap.put(new Pair("func_98052_bS", "canPickUpLoot")); + mInitMap.put(new Pair("func_98053_h", "setCanPickUpLoot")); + mInitMap.put(new Pair("func_98054_a", "setScaleForAge")); + mInitMap.put(new Pair("func_98055_j", "setScale")); + mInitMap.put(new Pair("func_98150_a", "getAtlasSprite")); + mInitMap.put(new Pair("func_98152_d", "getAllUsernames")); + mInitMap.put(new Pair("func_98179_a", "computeLightValue")); + mInitMap.put(new Pair("func_98265_a", "spawnEntity")); + mInitMap.put(new Pair("func_98266_d", "getSpawnerZ")); + mInitMap.put(new Pair("func_98268_b", "setDelayToMin")); + mInitMap.put(new Pair("func_98269_i", "getRandomEntity")); + mInitMap.put(new Pair("func_98270_a", "readFromNBT")); + mInitMap.put(new Pair("func_98271_a", "getSpawnerWorld")); + mInitMap.put(new Pair("func_98272_a", "setEntityName")); + mInitMap.put(new Pair("func_98273_j", "resetTimer")); + mInitMap.put(new Pair("func_98274_c", "getSpawnerY")); + mInitMap.put(new Pair("func_98275_b", "getSpawnerX")); + mInitMap.put(new Pair("func_98276_e", "getEntityNameToSpawn")); + mInitMap.put(new Pair("func_98277_a", "setRandomEntity")); + mInitMap.put(new Pair("func_98278_g", "updateSpawner")); + mInitMap.put(new Pair("func_98279_f", "isActivated")); + mInitMap.put(new Pair("func_98280_b", "writeToNBT")); + mInitMap.put(new Pair("func_98281_h", "getEntityToRender")); + mInitMap.put(new Pair("func_98300_b", "setSeeFriendlyInvisiblesEnabled")); + mInitMap.put(new Pair("func_98306_d", "readGlyphSizes")); + mInitMap.put(new Pair("func_99999_d", "run")); + } + + public static void init4() { + mObInitMap.put(new Pair("aqc", "net/minecraft/world/chunk/storage/IChunkLoader")); + mObInitMap.put(new Pair("amd", "net/minecraft/block/BlockMycelium")); + mObInitMap.put(new Pair("aag", "net/minecraft/inventory/ContainerEnchantment")); + mObInitMap.put(new Pair("aie", "net/minecraft/world/biome/WorldChunkManagerHell")); + mObInitMap.put(new Pair("aub", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$DesertPyramid")); + mObInitMap.put(new Pair("bue", "net/minecraft/client/stream/ChatController")); + mObInitMap.put(new Pair("bqf", "net/minecraft/client/renderer/texture/TextureManager")); + mObInitMap.put(new Pair("bei", "net/minecraft/client/gui/achievement/GuiAchievements")); + mObInitMap.put(new Pair("bih", "net/minecraft/client/model/ModelSquid")); + mObInitMap.put(new Pair("bmg", "net/minecraft/client/shader/Framebuffer")); + mObInitMap.put(new Pair("na", "net/minecraft/client/network/NetHandlerHandshakeMemory")); + mObInitMap + .put(new Pair("jb", "net/minecraft/network/play/client/C02PacketUseEntity$Action")); + mObInitMap.put(new Pair("fc", "net/minecraft/util/MessageDeserializer2")); + mObInitMap.put(new Pair("bd", "net/minecraft/command/server/CommandPardonIp")); + mObInitMap.put(new Pair("amw", "net/minecraft/block/BlockPumpkin")); + mObInitMap.put(new Pair("aey", "net/minecraft/item/crafting/RecipeFireworks")); + mObInitMap.put(new Pair("aaz", "net/minecraft/inventory/ContainerDispenser")); + mObInitMap.put(new Pair("aix", "net/minecraft/world/biome/BiomeGenEnd")); + mObInitMap.put(new Pair("z", "net/minecraft/command/CommandHandler")); + mObInitMap.put(new Pair("bqy", "net/minecraft/client/resources/IResourceManager")); + mObInitMap.put(new Pair("nt", "net/minecraft/server/management/PlayerProfileCache$1")); + mObInitMap.put(new Pair("ju", "net/minecraft/network/login/server/S00PacketDisconnect")); + mObInitMap.put(new Pair("fv", "net/minecraft/network/play/INetHandlerPlayClient")); + mObInitMap.put(new Pair("abn", "net/minecraft/item/ItemSoup")); + mObInitMap.put(new Pair("afm", "net/minecraft/enchantment/EnchantmentArrowDamage")); + mObInitMap.put(new Pair("brm", "net/minecraft/client/resources/SkinManager$3")); + mObInitMap.put(new Pair("aqu", "net/minecraft/world/gen/ChunkProviderFlat")); + mObInitMap.put(new Pair("aut", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Prison")); + mObInitMap.put(new Pair("ays", "net/minecraft/world/storage/WorldInfo")); + mObInitMap.put(new Pair("bbq", "net/minecraft/util/MinecraftError")); + mObInitMap.put(new Pair("bfp", "net/minecraft/util/EnchantmentNameParts")); + mObInitMap.put( + new Pair("bjo", "net/minecraft/client/multiplayer/ServerData$ServerResourceMode")); + mObInitMap.put(new Pair("bnn", "net/minecraft/client/renderer/entity/RenderManager")); + mObInitMap.put(new Pair("ck", "net/minecraft/dispenser/IBlockSource")); + mObInitMap.put(new Pair("zp", "net/minecraft/entity/projectile/EntityWitherSkull")); + mObInitMap.put( + new Pair("vq", "net/minecraft/entity/ai/EntityAINearestAttackableTarget$Sorter")); + mObInitMap.put(new Pair("rr", "net/minecraft/potion/PotionAbsoption")); + mObInitMap.put(new Pair("ns", "net/minecraft/server/management/PlayerProfileCache")); + mObInitMap.put(new Pair("anj", "net/minecraft/block/BlockSapling")); + mObInitMap.put(new Pair("afl", "net/minecraft/item/crafting/RecipesWeapons")); + mObInitMap.put(new Pair("ajk", "net/minecraft/block/Block$2")); + mObInitMap.put(new Pair("avh", "net/minecraft/world/gen/structure/MapGenStructure$3")); + mObInitMap.put(new Pair("bce", "net/minecraft/client/gui/GuiLabel")); + mObInitMap.put(new Pair("bgd", "net/minecraft/client/gui/ServerListEntryNormal$1")); + mObInitMap.put(new Pair("brl", "net/minecraft/client/resources/SkinManager$2")); + mObInitMap.put(new Pair("we", "net/minecraft/entity/passive/EntityBat")); + mObInitMap.put(new Pair("og", "net/minecraft/server/management/PreYggdrasilConverter$7")); + mObInitMap.put(new Pair("kh", "net/minecraft/network/status/INetHandlerStatusServer")); + mObInitMap.put(new Pair("gi", "net/minecraft/network/play/server/S3APacketTabComplete")); + mObInitMap.put(new Pair("aca", "net/minecraft/creativetab/CreativeTabs$4")); + mObInitMap.put(new Pair("azz", "net/minecraft/scoreboard/Score")); + mObInitMap.put(new Pair("bgc", "net/minecraft/client/gui/ServerListEntryNormal")); + mObInitMap.put(new Pair("boa", "net/minecraft/client/renderer/entity/RenderItem$2")); + mObInitMap.put(new Pair("wx", "net/minecraft/entity/IEntityMultiPart")); + mObInitMap.put(new Pair("sy", "net/minecraft/entity/IEntityLivingData")); + mObInitMap.put(new Pair("oz", "net/minecraft/network/rcon/RConThreadClient")); + mObInitMap.put(new Pair("aoq", "net/minecraft/tileentity/TileEntityBeacon")); + mObInitMap.put(new Pair("akr", "net/minecraft/block/BlockDynamicLiquid")); + mObInitMap.put(new Pair("act", "net/minecraft/item/ItemFishFood")); + mObInitMap.put(new Pair("ags", "net/minecraft/block/BlockEventData")); + mObInitMap.put(new Pair("bss", "net/minecraft/client/audio/SoundListSerializer")); + mObInitMap.put(new Pair("bot", "net/minecraft/client/renderer/entity/RenderSlime")); + mObInitMap.put(new Pair("azy", "net/minecraft/scoreboard/ScorePlayerTeam")); + mObInitMap.put(new Pair("bcw", "net/minecraft/client/gui/GuiYesNo")); + mObInitMap.put(new Pair("bgv", "net/minecraft/client/main/Main$2")); + mObInitMap.put(new Pair("bku", "net/minecraft/client/particle/EntityReddustFX")); + mObInitMap.put(new Pair("pn", "net/minecraft/util/TupleIntJsonSerializable")); + mObInitMap.put(new Pair("lo", "net/minecraft/network/rcon/IServer")); + mObInitMap.put(new Pair("hp", "net/minecraft/network/play/server/S0APacketUseBed")); + mObInitMap.put(new Pair("dq", "net/minecraft/nbt/NBTTagList")); + mObInitMap.put(new Pair("adh", "net/minecraft/item/ItemMap")); + mObInitMap.put(new Pair("bph", "net/minecraft/client/shader/ShaderDefault")); + mObInitMap.put(new Pair("aso", "net/minecraft/world/gen/feature/WorldGenSwamp")); + mObInitMap.put(new Pair("aop", "net/minecraft/block/BlockCarpet")); + mObInitMap.put(new Pair("bdk", "net/minecraft/client/gui/GuiLanguage$List")); + mObInitMap.put(new Pair("bhj", "net/minecraft/client/model/ModelCreeper")); + mObInitMap.put(new Pair("bli", "net/minecraft/util/MovementInput")); + mObInitMap.put(new Pair("ee", "net/minecraft/nbt/JsonToNBT$List")); + mObInitMap.put(new Pair("af", "net/minecraft/command/server/CommandBanIp")); + mObInitMap.put(new Pair("xk", "net/minecraft/entity/item/EntityItem")); + mObInitMap.put(new Pair("tl", "net/minecraft/entity/ai/attributes/BaseAttributeMap")); + mObInitMap.put(new Pair("pm", "net/minecraft/stats/IStatType")); + mObInitMap + .put(new Pair("atc", "net/minecraft/world/gen/structure/StructureMineshaftStart")); + mObInitMap.put(new Pair("apd", "net/minecraft/tileentity/TileEntityEnchantmentTable")); + mObInitMap.put(new Pair("ale", "net/minecraft/block/BlockFurnace")); + mObInitMap.put(new Pair("adg", "net/minecraft/item/ItemLeaves")); + mObInitMap.put(new Pair("ahf", "net/minecraft/world/World$4")); + mObInitMap.put(new Pair("axb", "net/minecraft/world/gen/layer/GenLayerAddIsland")); + mObInitMap.put(new Pair("bpg", "net/minecraft/client/util/JsonBlendingMode")); + mObInitMap + .put(new Pair("net/minecraft/realms/RealmsMth", "net/minecraft/realms/RealmsMth")); + mObInitMap.put(new Pair("qa", "net/minecraft/util/IntHashMap$Entry")); + mObInitMap.put(new Pair("mb", "net/minecraft/server/gui/MinecraftServerGui$3")); + mObInitMap.put( + new Pair("ic", "net/minecraft/network/play/server/S3BPacketScoreboardObjective")); + mObInitMap.put(new Pair("ed", "net/minecraft/nbt/JsonToNBT$Compound")); + mObInitMap.put(new Pair("net/minecraft/realms/RendererUtility", + "net/minecraft/realms/RendererUtility")); + mObInitMap.put(new Pair("atv", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Stairs")); + mObInitMap.put(new Pair("apw", "net/minecraft/world/chunk/EmptyChunk")); + mObInitMap.put(new Pair("alx", "net/minecraft/block/BlockLog")); + mObInitMap.put(new Pair("adz", "net/minecraft/item/ItemSign")); + mObInitMap.put(new Pair("ahy", "net/minecraft/world/biome/BiomeCache")); + mObInitMap.put(new Pair("axu", "net/minecraft/world/gen/layer/GenLayerRiver")); + mObInitMap.put(new Pair("bpz", "net/minecraft/client/renderer/texture/TextureMap")); + mObInitMap.put(new Pair("yr", "net/minecraft/entity/monster/EntityZombie$1")); + mObInitMap.put(new Pair("us", "net/minecraft/entity/ai/EntityAIMoveThroughVillage")); + mObInitMap.put(new Pair("mu", "net/minecraft/world/WorldServer$1")); + mObInitMap.put( + new Pair("iv", "net/minecraft/network/play/client/C0FPacketConfirmTransaction")); + mObInitMap.put(new Pair("ew", "net/minecraft/network/NetworkStatistics$PacketStat")); + mObInitMap.put(new Pair("ax", "net/minecraft/command/server/CommandListBans")); + mObInitMap.put( + new Pair("net/minecraft/realms/ServerPing", "net/minecraft/realms/ServerPing")); + mObInitMap.put(new Pair("aqk", "net/minecraft/world/chunk/storage/AnvilChunkLoader")); + mObInitMap.put(new Pair("aml", "net/minecraft/block/BlockOldLeaf")); + mObInitMap.put(new Pair("aen", "net/minecraft/potion/PotionHelper")); + mObInitMap.put(new Pair("aao", "net/minecraft/inventory/ContainerHorseInventory$2")); + mObInitMap.put(new Pair("aim", "net/minecraft/world/biome/BiomeGenMushroomIsland")); + mObInitMap.put(new Pair("o", "net/minecraft/crash/CrashReportCategory$Entry")); + mObInitMap.put(new Pair("bum", "net/minecraft/client/stream/IStream")); + mObInitMap.put(new Pair("bqn", "net/minecraft/client/resources/AbstractResourcePack")); + mObInitMap.put(new Pair("bar", "net/minecraft/client/Minecraft$11")); + mObInitMap.put(new Pair("beq", "net/minecraft/client/gui/achievement/GuiStats$Stats")); + mObInitMap.put(new Pair("bip", "net/minecraft/client/model/ModelZombie")); + mObInitMap.put(new Pair("bmo", + "net/minecraft/client/renderer/tileentity/TileEntityEnderChestRenderer")); + mObInitMap.put(new Pair("ni", "net/minecraft/network/NetHandlerPlayServer$1")); + mObInitMap.put(new Pair("jj", "net/minecraft/network/play/client/C0BPacketEntityAction")); + mObInitMap.put(new Pair("fk", "net/minecraft/util/IChatComponent$Serializer")); + mObInitMap.put(new Pair("bl", "net/minecraft/command/ServerCommandManager")); + mObInitMap.put(new Pair("yq", "net/minecraft/entity/monster/EntityZombie")); + mObInitMap.put(new Pair("abc", "net/minecraft/item/ItemArmor$1")); + mObInitMap.put(new Pair("afb", "net/minecraft/item/crafting/RecipesMapCloning")); + mObInitMap.put(new Pair("brb", + "net/minecraft/client/resources/ResourcePackFileNotFoundException")); + mObInitMap.put(new Pair("aqj", "net/minecraft/world/chunk/storage/RegionFileCache")); + mObInitMap.put( + new Pair("aui", "net/minecraft/world/gen/structure/StructureStrongholdPieces")); + mObInitMap.put(new Pair("bbf", "net/minecraft/client/Minecraft$9")); + mObInitMap.put(new Pair("bfe", "net/minecraft/client/gui/GuiScreenBook")); + mObInitMap.put(new Pair("bjd", "net/minecraft/client/multiplayer/ChunkProviderClient")); + mObInitMap.put(new Pair("bnc", "net/minecraft/client/renderer/entity/RenderBat")); + mObInitMap.put(new Pair("ze", "net/minecraft/entity/projectile/EntityFireball")); + mObInitMap.put(new Pair("vf", "net/minecraft/entity/ai/EntityAIRestrictSun")); + mObInitMap.put(new Pair("rg", "net/minecraft/client/renderer/texture/IIconRegister")); + mObInitMap.put(new Pair("afa", "net/minecraft/item/crafting/FurnaceRecipes")); + mObInitMap.put(new Pair("bby", "net/minecraft/client/gui/MapItemRenderer$1")); + mObInitMap.put(new Pair("bfx", "net/minecraft/client/gui/inventory/GuiEditSign")); + mObInitMap.put(new Pair("bra", "net/minecraft/client/resources/IResourcePack")); + mObInitMap.put(new Pair("zx", "net/minecraft/inventory/ContainerBeacon")); + mObInitMap.put(new Pair("vy", "net/minecraft/village/VillageDoorInfo")); + mObInitMap.put(new Pair("arq", "net/minecraft/world/gen/feature/WorldGenFire")); + mObInitMap.put(new Pair("anr", "net/minecraft/block/BlockStainedGlassPane")); + mObInitMap.put(new Pair("abu", "net/minecraft/creativetab/CreativeTabs$1")); + mObInitMap.put(new Pair("aft", "net/minecraft/enchantment/Enchantment")); + mObInitMap.put(new Pair("ajs", "net/minecraft/block/BlockButton")); + mObInitMap.put(new Pair("avp", "net/minecraft/world/gen/structure/StructureVillagePieces")); + mObInitMap.put(new Pair("azo", "net/minecraft/world/storage/SaveHandlerMP")); + mObInitMap.put(new Pair("brt", + "net/minecraft/client/resources/data/BaseMetadataSectionSerializer")); + mObInitMap.put(new Pair("bfw", "net/minecraft/client/gui/GuiMerchant$MerchantButton")); + mObInitMap.put(new Pair("bjv", "net/minecraft/client/particle/EntityBubbleFX")); + mObInitMap.put(new Pair("bnu", "net/minecraft/client/renderer/entity/RenderGiantZombie")); + mObInitMap.put(new Pair("wm", "net/minecraft/entity/passive/EntityMooshroom")); + mObInitMap.put(new Pair("oo", "net/minecraft/server/management/UserList$Serializer")); + mObInitMap.put(new Pair("kp", "net/minecraft/init/Bootstrap$12")); + mObInitMap.put(new Pair("gq", "net/minecraft/network/play/server/S2FPacketSetSlot")); + mObInitMap.put(new Pair("cr", "net/minecraft/util/EnumFacing")); + mObInitMap.put(new Pair("aof", "net/minecraft/block/BlockTripWire")); + mObInitMap.put(new Pair("akg", "net/minecraft/block/BlockDaylightDetector")); + mObInitMap.put(new Pair("aci", "net/minecraft/item/ItemDoublePlant")); + mObInitMap.put(new Pair("agh", "net/minecraft/enchantment/EnchantmentOxygen")); + mObInitMap.put(new Pair("bsh", + "net/minecraft/client/resources/data/PackMetadataSectionSerializer")); + mObInitMap.put(new Pair("bcl", "net/minecraft/client/gui/GuiOptionsRowList$Row")); + mObInitMap.put(new Pair("bgk", "net/minecraft/client/gui/GuiResourcePackList")); + mObInitMap.put(new Pair("bkj", "net/minecraft/client/particle/EntityHugeExplodeFX")); + mObInitMap.put(new Pair("boi", "net/minecraft/client/renderer/entity/RenderMinecart")); + mObInitMap.put(new Pair("pc", "net/minecraft/stats/AchievementList")); + mObInitMap.put(new Pair("ld", "net/minecraft/client/util/JsonException$Entry")); + mObInitMap.put(new Pair("he", "net/minecraft/network/play/server/S34PacketMaps")); + mObInitMap.put(new Pair("df", "net/minecraft/nbt/NBTTagByteArray")); + mObInitMap.put(new Pair("asd", "net/minecraft/world/gen/feature/WorldGenDungeons")); + mObInitMap.put( + new Pair("awc", "net/minecraft/world/gen/structure/StructureVillagePieces$House3")); + mObInitMap.put(new Pair("dy", "net/minecraft/nbt/NBTBase")); + mObInitMap.put(new Pair("ta", "net/minecraft/entity/IEntityOwnable")); + mObInitMap.put(new Pair("pb", "net/minecraft/stats/Achievement")); + mObInitMap.put(new Pair("asw", "net/minecraft/world/gen/structure/MapGenMineshaft")); + mObInitMap.put(new Pair("aox", "net/minecraft/tileentity/TileEntityCommandBlock")); + mObInitMap.put(new Pair("aky", "net/minecraft/block/BlockFarmland")); + mObInitMap.put(new Pair("agz", "net/minecraft/world/GameRules$Value")); + mObInitMap.put(new Pair("awv", "net/minecraft/block/material/MapColor")); + mObInitMap.put(new Pair("bds", "net/minecraft/client/gui/GuiFlatPresets$ListSlot")); + mObInitMap.put(new Pair("bhr", "net/minecraft/client/model/ModelBase")); + mObInitMap.put(new Pair("bsz", "net/minecraft/server/integrated/IntegratedServer$2")); + mObInitMap.put(new Pair("xs", "net/minecraft/entity/item/EntityMinecartEmpty")); + mObInitMap.put(new Pair("tt", "net/minecraft/entity/ai/EntityJumpHelper")); + mObInitMap.put(new Pair("pu", "net/minecraft/util/JsonUtils")); + mObInitMap.put(new Pair("lv", "net/minecraft/server/dedicated/DedicatedServer$2")); + mObInitMap.put(new Pair("hw", "net/minecraft/network/play/server/S1CPacketEntityMetadata")); + mObInitMap.put(new Pair("dx", "net/minecraft/nbt/NBTTagString")); + mObInitMap.put(new Pair("atk", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor4")); + mObInitMap.put(new Pair("apl", "net/minecraft/tileentity/TileEntityNote")); + mObInitMap.put(new Pair("alm", "net/minecraft/block/BlockHay")); + mObInitMap.put(new Pair("ado", "net/minecraft/item/ItemPiston")); + mObInitMap.put(new Pair("ahn", "net/minecraft/world/EnumSkyBlock")); + mObInitMap.put(new Pair("axj", "net/minecraft/world/gen/layer/GenLayerFuzzyZoom")); + mObInitMap.put(new Pair("btn", + "net/minecraft/client/audio/SoundManager$SoundSystemStarterThread")); + mObInitMap.put(new Pair("bpo", "net/minecraft/client/shader/ShaderUniform")); + mObInitMap.put(new Pair("bhq", "net/minecraft/client/model/ModelMinecart")); + mObInitMap.put(new Pair("blp", "net/minecraft/client/renderer/RenderSorter")); + mObInitMap.put(new Pair("yg", "net/minecraft/entity/monster/EntityMob")); + mObInitMap.put(new Pair("uh", "net/minecraft/entity/ai/EntityAIFollowParent")); + mObInitMap.put(new Pair("qi", "net/minecraft/profiler/Profiler")); + mObInitMap.put(new Pair("mj", "net/minecraft/client/renderer/DestroyBlockProgress")); + mObInitMap.put(new Pair("ik", "net/minecraft/network/play/server/S18PacketEntityTeleport")); + mObInitMap.put(new Pair("el", "net/minecraft/network/NetworkManager$2")); + mObInitMap.put(new Pair("am", "net/minecraft/command/CommandEffect")); + mObInitMap.put(new Pair("ama", "net/minecraft/block/BlockMobSpawner")); + mObInitMap.put(new Pair("aec", "net/minecraft/item/ItemSnow")); + mObInitMap.put(new Pair("aad", "net/minecraft/inventory/ContainerChest")); + mObInitMap.put(new Pair("aib", "net/minecraft/world/biome/WorldChunkManager")); + mObInitMap.put(new Pair("d", "net/minecraft/crash/CrashReport$2")); + mObInitMap.put(new Pair("bub", + "net/minecraft/client/stream/BroadcastController$SwitchBroadcastState")); + mObInitMap.put(new Pair("bqc", "net/minecraft/client/renderer/texture/TextureMap$3")); + mObInitMap.put(new Pair("bag", "net/minecraft/scoreboard/ScoreHealthCriteria")); + mObInitMap.put(new Pair("bef", "net/minecraft/client/gui/GuiVideoSettings")); + mObInitMap.put(new Pair("bie", "net/minecraft/client/model/ModelSlime")); + mObInitMap.put(new Pair("bmd", "net/minecraft/client/renderer/RenderList")); + mObInitMap.put(new Pair("ba", "net/minecraft/command/server/CommandMessageRaw")); + mObInitMap.put(new Pair("aev", "net/minecraft/item/crafting/RecipesArmor")); + mObInitMap.put(new Pair("aaw", "net/minecraft/inventory/InventoryCraftResult")); + mObInitMap.put(new Pair("w", "net/minecraft/client/audio/SoundCategory")); + mObInitMap + .put(new Pair("bqv", "net/minecraft/client/resources/IReloadableResourceManager")); + mObInitMap.put(new Pair("baz", "net/minecraft/client/Minecraft$3")); + mObInitMap.put(new Pair("bey", "net/minecraft/client/gui/GuiRepair")); + mObInitMap.put(new Pair("bix", "net/minecraft/client/model/ModelRenderer")); + mObInitMap.put(new Pair("bmw", "net/minecraft/client/renderer/culling/ClippingHelperImpl")); + mObInitMap + .put(new Pair("fs", "net/minecraft/util/ChatComponentTranslationFormatException")); + mObInitMap.put(new Pair("bt", "net/minecraft/command/server/CommandStop")); + mObInitMap.put(new Pair("yy", "net/minecraft/entity/player/InventoryPlayer$1")); + mObInitMap.put(new Pair("uz", "net/minecraft/entity/ai/EntityAIPanic")); + mObInitMap.put(new Pair("aqr", "net/minecraft/world/WorldProviderEnd")); + mObInitMap.put(new Pair("ams", "net/minecraft/block/BlockCompressedPowered")); + mObInitMap.put(new Pair("aeu", "net/minecraft/item/crafting/RecipesArmorDyes")); + mObInitMap.put(new Pair("ait", "net/minecraft/world/biome/BiomeGenSavanna$Mutated")); + mObInitMap.put(new Pair("auq", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Library")); + mObInitMap.put(new Pair("ayp", "net/minecraft/world/storage/DerivedWorldInfo")); + mObInitMap.put(new Pair("bbn", "net/minecraft/client/settings/GameSettings$Options$1")); + mObInitMap.put(new Pair("bfm", + "net/minecraft/client/gui/inventory/GuiContainerCreative$ContainerCreative")); + mObInitMap.put(new Pair("but", "net/minecraft/realms/RealmsServerStatusPinger$1")); + mObInitMap.put(new Pair("bqu", "net/minecraft/client/resources/GrassColorReloadListener")); + mObInitMap.put(new Pair("zm", "net/minecraft/entity/item/EntityEnderPearl")); + mObInitMap.put(new Pair("vn", "net/minecraft/entity/ai/EntityAIHurtByTarget")); + mObInitMap.put(new Pair("ro", "net/minecraft/util/DamageSource")); + mObInitMap.put( + new Pair("np", "net/minecraft/server/network/NetHandlerLoginServer$LoginState")); + mObInitMap + .put(new Pair("jq", "net/minecraft/network/handshake/INetHandlerHandshakeServer")); + mObInitMap.put(new Pair("fr", "net/minecraft/util/ChatComponentTranslation")); + mObInitMap.put(new Pair("arf", "net/minecraft/world/gen/feature/WorldGenBlockBlob")); + mObInitMap.put(new Pair("ang", "net/minecraft/block/BlockRotatedPillar")); + mObInitMap.put(new Pair("abj", "net/minecraft/item/ItemBoat")); + mObInitMap.put(new Pair("afi", "net/minecraft/item/crafting/ShapelessRecipes")); + mObInitMap.put(new Pair("ajh", "net/minecraft/block/BlockBed")); + mObInitMap.put(new Pair("ave", "net/minecraft/world/gen/structure/MapGenStructure")); + mObInitMap.put(new Pair("azd", "net/minecraft/client/AnvilConverterException")); + mObInitMap + .put(new Pair("net/minecraft/client/main/Main", "net/minecraft/client/main/Main")); + mObInitMap.put(new Pair("bri", "net/minecraft/client/resources/SimpleResource")); + mObInitMap.put(new Pair("bfl", "net/minecraft/client/gui/inventory/GuiContainerCreative")); + mObInitMap.put(new Pair("bjk", "net/minecraft/client/entity/EntityClientPlayerMP")); + mObInitMap.put(new Pair("bnj", "net/minecraft/client/renderer/entity/RenderEntity")); + mObInitMap.put(new Pair("wb", "net/minecraft/village/VillageSiege")); + mObInitMap.put(new Pair("sc", "net/minecraft/entity/Entity$2")); + mObInitMap.put(new Pair("od", "net/minecraft/server/management/PreYggdrasilConverter$4")); + mObInitMap.put(new Pair("ke", "net/minecraft/network/ServerStatusResponse$Serializer")); + mObInitMap + .put(new Pair("gf", "net/minecraft/network/play/server/S35PacketUpdateTileEntity")); + mObInitMap.put(new Pair("cg", "net/minecraft/command/PlayerNotFoundException")); + mObInitMap.put(new Pair("ary", "net/minecraft/world/gen/feature/WorldGenGlowStone1")); + mObInitMap.put(new Pair("anz", "net/minecraft/block/BlockTallGrass")); + mObInitMap.put(new Pair("bca", "net/minecraft/client/gui/ScaledResolution")); + mObInitMap.put(new Pair("ow", "net/minecraft/network/rcon/RConThreadBase")); + mObInitMap.put(new Pair("kx", "net/minecraft/init/Bootstrap$6")); + mObInitMap.put( + new Pair("gy", "net/minecraft/network/play/server/S21PacketChunkData$Extracted")); + mObInitMap.put(new Pair("cz", "net/minecraft/util/IRegistry")); + mObInitMap.put(new Pair("acq", "net/minecraft/item/ItemFireball")); + mObInitMap.put(new Pair("agp", "net/minecraft/command/server/CommandBlockLogic")); + mObInitMap.put(new Pair("bsp", "net/minecraft/client/audio/SoundList")); + mObInitMap.put(new Pair("boq", "net/minecraft/client/renderer/entity/RenderSheep")); + mObInitMap.put(new Pair("arx", "net/minecraft/world/gen/feature/WorldGenLakes")); + mObInitMap.put(new Pair("avw", + "net/minecraft/world/gen/structure/StructureVillagePieces$House4Garden")); + mObInitMap.put(new Pair("azv", "net/minecraft/util/MovingObjectPosition$MovingObjectType")); + mObInitMap.put(new Pair("bct", "net/minecraft/client/gui/GuiChat")); + mObInitMap.put(new Pair("bgs", "net/minecraft/client/gui/stream/GuiTwitchUserMode")); + mObInitMap.put(new Pair("bkr", "net/minecraft/client/particle/EffectRenderer$4")); + mObInitMap.put(new Pair("dn", "net/minecraft/nbt/NBTTagIntArray")); + mObInitMap.put(new Pair("wt", "net/minecraft/entity/monster/EntityIronGolem")); + mObInitMap.put(new Pair("su", "net/minecraft/entity/EntityLeashKnot")); + mObInitMap.put(new Pair("asl", "net/minecraft/world/gen/feature/WorldGenSpikes")); + mObInitMap.put(new Pair("aom", "net/minecraft/block/BlockWood")); + mObInitMap.put(new Pair("akn", "net/minecraft/block/BlockDoor")); + mObInitMap.put(new Pair("ago", "net/minecraft/village/MerchantRecipeList")); + mObInitMap.put(new Pair("awk", "net/minecraft/world/gen/NoiseGeneratorOctaves")); + mObInitMap.put(new Pair("bdh", "net/minecraft/client/gui/GuiErrorScreen")); + mObInitMap.put(new Pair("bhg", "net/minecraft/client/model/ModelChest")); + mObInitMap.put(new Pair("bso", "net/minecraft/client/audio/PositionedSoundRecord")); + mObInitMap.put(new Pair("xh", "net/minecraft/entity/effect/EntityLightningBolt")); + mObInitMap.put(new Pair("ti", "net/minecraft/entity/ai/attributes/IAttributeInstance")); + mObInitMap.put(new Pair("pj", "net/minecraft/stats/StatBase$2")); + mObInitMap.put(new Pair("lk", "net/minecraft/server/MinecraftServer$4")); + mObInitMap.put(new Pair("apa", "net/minecraft/tileentity/TileEntityDaylightDetector")); + mObInitMap.put(new Pair("alb", "net/minecraft/block/BlockFire")); + mObInitMap.put(new Pair("add", "net/minecraft/item/ItemStack")); + mObInitMap.put(new Pair("ahc", "net/minecraft/world/World$1")); + mObInitMap.put(new Pair("btc", + "net/minecraft/client/network/LanServerDetector$ThreadLanServerFind")); + mObInitMap + .put(new Pair("bpd", "net/minecraft/client/renderer/tileentity/RenderWitherSkull")); + mObInitMap.put(new Pair("bhf", "net/minecraft/client/model/ModelBook")); + mObInitMap.put(new Pair("ble", "net/minecraft/client/particle/EntityFishWakeFX")); + mObInitMap.put(new Pair("ea", "net/minecraft/nbt/NBTException")); + mObInitMap.put(new Pair("ab", "net/minecraft/command/ICommandManager")); + mObInitMap.put(new Pair("adw", "net/minecraft/item/ItemSeeds")); + mObInitMap.put(new Pair("ahv", "net/minecraft/world/biome/BiomeGenBase$Height")); + mObInitMap.put(new Pair("btv", "net/minecraft/client/audio/SoundEventAccessor")); + mObInitMap.put(new Pair("bpw", "net/minecraft/client/renderer/texture/Stitcher$Holder")); + mObInitMap.put(new Pair("bdz", "net/minecraft/client/gui/GuiShareToLan")); + mObInitMap.put(new Pair("bhy", "net/minecraft/client/model/ModelSheep2")); + mObInitMap.put(new Pair("blx", "net/minecraft/client/renderer/IImageBuffer")); + mObInitMap.put( + new Pair("mr", "net/minecraft/server/management/PlayerManager$PlayerInstance")); + mObInitMap.put(new Pair("is", "net/minecraft/network/play/client/C16PacketClientStatus")); + mObInitMap.put(new Pair("et", "net/minecraft/network/PacketBuffer")); + mObInitMap.put(new Pair("au", "net/minecraft/command/CommandHelp")); + mObInitMap.put(new Pair("aek", "net/minecraft/item/ItemCloth")); + mObInitMap.put(new Pair("aal", "net/minecraft/inventory/ContainerHopper")); + mObInitMap.put(new Pair("l", "net/minecraft/crash/CrashReportCategory$1")); + mObInitMap.put( + new Pair("bqk", "net/minecraft/client/renderer/texture/ITickableTextureObject")); + mObInitMap.put(new Pair("atr", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Throne")); + mObInitMap.put(new Pair("aps", "net/minecraft/tileentity/TileEntityPiston")); + mObInitMap.put(new Pair("axq", "net/minecraft/world/gen/layer/GenLayerRareBiome")); + mObInitMap.put(new Pair("bao", "net/minecraft/client/Minecraft")); + mObInitMap.put(new Pair("ben", "net/minecraft/client/gui/achievement/GuiStats$StatsItem")); + mObInitMap.put(new Pair("bim", "net/minecraft/client/model/ModelWitch")); + mObInitMap.put(new Pair("bml", + "net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer")); + mObInitMap.put(new Pair("fh", "net/minecraft/event/ClickEvent")); + mObInitMap.put(new Pair("bi", "net/minecraft/command/server/CommandSaveOff")); + mObInitMap.put(new Pair("yn", "net/minecraft/entity/monster/EntitySpider")); + mObInitMap.put(new Pair("uo", "net/minecraft/entity/ai/EntityAILookAtTradePlayer")); + mObInitMap.put(new Pair("aqg", + "net/minecraft/world/chunk/storage/ChunkLoader$AnvilConverterData")); + mObInitMap.put(new Pair("amh", "net/minecraft/block/BlockNewLeaf")); + mObInitMap.put(new Pair("aii", "net/minecraft/world/biome/BiomeGenHell")); + mObInitMap.put(new Pair("auf", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$SwampHut")); + mObInitMap.put(new Pair("aye", "net/minecraft/pathfinding/PathPoint")); + mObInitMap.put(new Pair("bbc", "net/minecraft/client/Minecraft$6")); + mObInitMap + .put(new Pair("bfb", "net/minecraft/client/gui/inventory/GuiBeacon$ConfirmButton")); + mObInitMap.put(new Pair("bui", "net/minecraft/client/stream/IngestServerTester")); + mObInitMap.put(new Pair("bqj", "net/minecraft/client/renderer/texture/ITickable")); + mObInitMap + .put(new Pair("zb", "net/minecraft/entity/player/EntityPlayer$EnumChatVisibility")); + mObInitMap.put(new Pair("vc", "net/minecraft/entity/ai/EntityAIWander")); + mObInitMap.put(new Pair("rd", "net/minecraft/world/EnumDifficulty")); + mObInitMap.put(new Pair("ne", "net/minecraft/network/NetworkSystem$2")); + mObInitMap.put(new Pair("jf", + "net/minecraft/network/play/client/C03PacketPlayer$C06PacketPlayerPosLook")); + mObInitMap.put(new Pair("fg", "net/minecraft/util/ChatComponentStyle$2")); + mObInitMap.put(new Pair("aqz", "net/minecraft/world/gen/ChunkProviderGenerate")); + mObInitMap.put(new Pair("auy", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stairs")); + mObInitMap.put(new Pair("ayx", "net/minecraft/world/storage/WorldInfo$5")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsSliderButton", + "net/minecraft/realms/RealmsSliderButton")); + mObInitMap.put(new Pair("zu", "net/minecraft/inventory/ContainerRepair")); + mObInitMap.put(new Pair("vv", "net/minecraft/pathfinding/PathNavigate")); + mObInitMap.put(new Pair("rw", "net/minecraft/potion/PotionEffect")); + mObInitMap.put(new Pair("nx", "net/minecraft/server/management/BanList")); + mObInitMap.put(new Pair("jy", "net/minecraft/network/status/INetHandlerStatusClient")); + mObInitMap.put(new Pair("fz", "net/minecraft/network/play/server/S0FPacketSpawnMob")); + mObInitMap.put(new Pair("arn", "net/minecraft/world/gen/feature/WorldGenerator")); + mObInitMap.put(new Pair("ano", "net/minecraft/block/BlockSoulSand")); + mObInitMap.put(new Pair("abr", "net/minecraft/item/ItemColored")); + mObInitMap.put(new Pair("afq", "net/minecraft/enchantment/EnchantmentDamage")); + mObInitMap.put(new Pair("ajp", "net/minecraft/block/BlockBookshelf")); + mObInitMap.put(new Pair("brq", "net/minecraft/client/resources/Language")); + mObInitMap.put(new Pair("bbu", "net/minecraft/client/gui/FontRenderer")); + mObInitMap + .put(new Pair("bft", "net/minecraft/client/gui/inventory/GuiScreenHorseInventory")); + mObInitMap.put(new Pair("bjs", "net/minecraft/client/network/OldServerPinger$2")); + mObInitMap.put(new Pair("bnr", "net/minecraft/client/renderer/entity/RenderFireball")); + mObInitMap.put(new Pair("sk", "net/minecraft/command/IEntitySelector$1")); + mObInitMap.put(new Pair("ol", "net/minecraft/server/management/UserListEntry")); + mObInitMap.put(new Pair("km", "net/minecraft/init/Bootstrap$1")); + mObInitMap.put(new Pair("gn", "net/minecraft/network/play/server/S2DPacketOpenWindow")); + mObInitMap.put(new Pair("co", "net/minecraft/util/RegistryDefaulted")); + mObInitMap.put(new Pair("acf", "net/minecraft/creativetab/CreativeTabs$9")); + mObInitMap.put(new Pair("age", "net/minecraft/enchantment/EnchantmentFishingSpeed")); + mObInitMap.put( + new Pair("bse", "net/minecraft/client/resources/data/LanguageMetadataSection")); + mObInitMap.put(new Pair("arm", "net/minecraft/world/gen/feature/WorldGenDoublePlant")); + mObInitMap.put(new Pair("avl", + "net/minecraft/world/gen/structure/StructureComponent$BlockSelector")); + mObInitMap.put(new Pair("bci", "net/minecraft/client/gui/GuiListExtended$IGuiListEntry")); + mObInitMap.put( + new Pair("bgh", "net/minecraft/client/resources/ResourcePackListEntryDefault")); + mObInitMap.put(new Pair("bkg", "net/minecraft/client/particle/EntityFootStepFX")); + mObInitMap.put(new Pair("bof", "net/minecraft/client/renderer/entity/RenderLeashKnot")); + mObInitMap.put(new Pair("net/minecraft/server/MinecraftServer", + "net/minecraft/server/MinecraftServer")); + mObInitMap.put(new Pair("hb", "net/minecraft/network/play/server/S2APacketParticles")); + mObInitMap.put(new Pair("wi", "net/minecraft/entity/passive/EntityHorse")); + mObInitMap.put(new Pair("sj", "net/minecraft/command/IEntitySelector")); + mObInitMap.put(new Pair("asa", "net/minecraft/world/gen/feature/WorldGenMegaPineTree")); + mObInitMap.put(new Pair("aob", "net/minecraft/block/BlockTNT")); + mObInitMap.put(new Pair("akc", "net/minecraft/block/BlockRedstoneComparator")); + mObInitMap.put(new Pair("agd", "net/minecraft/enchantment/EnchantmentFireAspect")); + mObInitMap.put(new Pair("bsd", + "net/minecraft/client/resources/data/FontMetadataSectionSerializer")); + mObInitMap.put(new Pair("ha", "net/minecraft/network/play/server/S28PacketEffect")); + mObInitMap.put(new Pair("ast", "net/minecraft/world/gen/FlatLayerInfo")); + mObInitMap.put(new Pair("aou", "net/minecraft/tileentity/TileEntity$3")); + mObInitMap.put(new Pair("akv", "net/minecraft/block/BlockEnderChest")); + mObInitMap.put(new Pair("acx", "net/minecraft/item/ItemFood")); + mObInitMap.put(new Pair("agw", "net/minecraft/world/Explosion")); + mObInitMap.put(new Pair("aws", "net/minecraft/block/material/MaterialLiquid")); + mObInitMap.put(new Pair("bsw", "net/minecraft/server/integrated/IntegratedPlayerList")); + mObInitMap.put(new Pair("box", "net/minecraft/client/renderer/entity/RenderTntMinecart")); + mObInitMap.put(new Pair("bky", "net/minecraft/client/particle/EntitySplashFX")); + mObInitMap.put(new Pair("xp", "net/minecraft/entity/item/EntityMinecartContainer")); + mObInitMap.put(new Pair("tq", "net/minecraft/entity/ai/attributes/ServersideAttributeMap")); + mObInitMap.put(new Pair("pr", "net/minecraft/util/JsonSerializableSet")); + mObInitMap.put(new Pair("ls", "net/minecraft/server/dedicated/DedicatedPlayerList")); + mObInitMap.put(new Pair("ht", "net/minecraft/network/play/server/S19PacketEntityHeadLook")); + mObInitMap.put(new Pair("du", "net/minecraft/nbt/CompressedStreamTools")); + mObInitMap.put(new Pair("api", "net/minecraft/tileentity/TileEntityHopper")); + mObInitMap.put(new Pair("alj", "net/minecraft/block/BlockSlab")); + mObInitMap.put(new Pair("adl", "net/minecraft/item/ItemMultiTexture")); + mObInitMap.put(new Pair("ahk", "net/minecraft/world/WorldSettings$GameType")); + mObInitMap.put(new Pair("btk", "net/minecraft/client/audio/SoundManager$1")); + mObInitMap.put(new Pair("bpl", "net/minecraft/client/shader/ShaderLoader")); + mObInitMap.put(new Pair("bdo", "net/minecraft/client/gui/GuiMemoryErrorScreen")); + mObInitMap.put(new Pair("bhn", "net/minecraft/client/model/ModelLargeChest")); + mObInitMap.put(new Pair("blm", "net/minecraft/client/renderer/RenderBlocks")); + mObInitMap.put(new Pair("qf", "net/minecraft/util/EnumTypeAdapterFactory")); + mObInitMap.put(new Pair("mg", "net/minecraft/server/gui/StatsComponent$1")); + mObInitMap.put(new Pair("ih", "net/minecraft/network/play/server/S03PacketTimeUpdate")); + mObInitMap.put(new Pair("ei", "net/minecraft/network/NettyEncryptingEncoder")); + mObInitMap.put(new Pair("aj", "net/minecraft/command/server/CommandDeOp")); + mObInitMap.put(new Pair("aaa", "net/minecraft/inventory/ContainerBrewingStand$Ingredient")); + mObInitMap.put(new Pair("a", "net/minecraft/util/EnumChatFormatting")); + mObInitMap.put(new Pair("atg", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Crossing3")); + mObInitMap.put(new Pair("axf", "net/minecraft/world/gen/layer/GenLayerBiome")); + mObInitMap.put(new Pair("bad", "net/minecraft/scoreboard/ScoreboardSaveData")); + mObInitMap.put(new Pair("bec", "net/minecraft/client/gui/GuiScreenOptionsSounds")); + mObInitMap.put(new Pair("bib", "net/minecraft/client/model/ModelSkeletonHead")); + mObInitMap.put(new Pair("bma", "net/minecraft/client/renderer/RenderGlobal")); + mObInitMap.put(new Pair("yc", "net/minecraft/entity/monster/IMob$1")); + mObInitMap.put(new Pair("ud", "net/minecraft/entity/ai/EntityAIEatGrass")); + mObInitMap.put(new Pair("qe", "net/minecraft/util/LongHashMap$Entry")); + mObInitMap.put(new Pair("t", "net/minecraft/util/ChatAllowedCharacters")); + mObInitMap.put(new Pair("atz", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces")); + mObInitMap.put(new Pair("baw", "net/minecraft/client/Minecraft$16")); + mObInitMap.put(new Pair("bev", "net/minecraft/client/gui/GuiKeyBindingList$KeyEntry")); + mObInitMap.put(new Pair("yv", "net/minecraft/entity/passive/EntityVillager")); + mObInitMap.put(new Pair("uw", "net/minecraft/entity/ai/EntityAIOcelotSit")); + mObInitMap.put(new Pair("qx", "net/minecraft/util/WeightedRandomChestContent")); + mObInitMap.put(new Pair("my", "net/minecraft/entity/EntityTrackerEntry")); + mObInitMap.put(new Pair("iz", "net/minecraft/network/play/client/C17PacketCustomPayload")); + mObInitMap.put(new Pair("aqo", "net/minecraft/world/WorldProvider")); + mObInitMap.put(new Pair("amp", "net/minecraft/block/BlockPortal")); + mObInitMap.put(new Pair("aas", "net/minecraft/inventory/InventoryMerchant")); + mObInitMap.put(new Pair("aun", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Corridor")); + mObInitMap.put(new Pair("aym", "net/minecraft/world/chunk/storage/AnvilSaveHandler")); + mObInitMap.put(new Pair("buq", "net/minecraft/client/stream/TwitchStream$1$1")); + mObInitMap.put(new Pair("bqr", "net/minecraft/client/resources/FileResourcePack")); + mObInitMap.put(new Pair("bms", + "net/minecraft/client/renderer/tileentity/TileEntitySkullRenderer")); + mObInitMap.put(new Pair("zj", "net/minecraft/entity/projectile/EntitySnowball")); + mObInitMap.put(new Pair("vk", "net/minecraft/entity/ai/EntityAITempt")); + mObInitMap.put(new Pair("rl", "net/minecraft/inventory/ISidedInventory")); + mObInitMap.put(new Pair("nm", + "net/minecraft/server/network/NetHandlerHandshakeTCP$SwitchEnumConnectionState")); + mObInitMap.put(new Pair("jn", "net/minecraft/network/play/client/C12PacketUpdateSign")); + mObInitMap.put(new Pair("fo", "net/minecraft/util/ChatStyle$1")); + mObInitMap.put(new Pair("bp", "net/minecraft/command/CommandSetSpawnpoint")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsServerAddress", + "net/minecraft/realms/RealmsServerAddress")); + mObInitMap.put(new Pair("arc", "net/minecraft/world/gen/feature/WorldGenAbstractTree")); + mObInitMap.put(new Pair("and", "net/minecraft/block/BlockRedstoneTorch$Toggle")); + mObInitMap.put(new Pair("abg", "net/minecraft/item/ItemBed")); + mObInitMap.put(new Pair("aff", "net/minecraft/item/crafting/CraftingManager$1")); + mObInitMap.put(new Pair("aje", "net/minecraft/block/BlockRailBase")); + mObInitMap.put( + new Pair("brf", "net/minecraft/client/resources/ResourcePackRepository$Entry")); + mObInitMap.put(new Pair("bbj", "net/minecraft/client/settings/GameSettings")); + mObInitMap.put(new Pair("bfi", "net/minecraft/client/gui/inventory/GuiChest")); + mObInitMap.put(new Pair("bjh", "net/minecraft/client/multiplayer/WorldClient$2")); + mObInitMap.put(new Pair("bng", "net/minecraft/client/renderer/entity/RenderChicken")); + mObInitMap.put(new Pair("oa", "net/minecraft/server/management/PreYggdrasilConverter$1")); + mObInitMap.put(new Pair("kb", "net/minecraft/network/ServerStatusResponse")); + mObInitMap.put(new Pair("gc", "net/minecraft/network/play/server/S0BPacketAnimation")); + mObInitMap.put(new Pair("cd", "net/minecraft/command/CommandException")); + mObInitMap.put(new Pair("abz", "net/minecraft/creativetab/CreativeTabs$3")); + mObInitMap.put(new Pair("afy", "net/minecraft/enchantment/EnchantmentHelper$HurtIterator")); + mObInitMap.put(new Pair("bry", + "net/minecraft/client/resources/data/IMetadataSerializer$Registration")); + mObInitMap.put(new Pair("ava", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Straight")); + mObInitMap.put(new Pair("bnz", "net/minecraft/client/renderer/entity/RenderItem$1")); + mObInitMap + .put(new Pair("gv", "net/minecraft/network/play/server/S2BPacketChangeGameState")); + mObInitMap.put(new Pair("cw", "net/minecraft/util/RegistryNamespaced")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsScrolledSelectionList", + "net/minecraft/realms/RealmsScrolledSelectionList")); + mObInitMap.put(new Pair("aru", "net/minecraft/world/gen/feature/WorldGenBigMushroom")); + mObInitMap.put(new Pair("anv", "net/minecraft/block/BlockStone")); + mObInitMap + .put(new Pair("afx", "net/minecraft/enchantment/EnchantmentHelper$DamageIterator")); + mObInitMap.put(new Pair("ajw", "net/minecraft/block/BlockCauldron")); + mObInitMap.put( + new Pair("avt", "net/minecraft/world/gen/structure/StructureVillagePieces$Torch")); + mObInitMap.put(new Pair("azs", "net/minecraft/world/storage/IThreadedFileIO")); + mObInitMap.put(new Pair("bcq", "net/minecraft/client/gui/GuiScreenRealmsProxy")); + mObInitMap.put(new Pair("bgp", "net/minecraft/client/gui/stream/GuiStreamUnavailable")); + mObInitMap + .put(new Pair("brx", "net/minecraft/client/resources/data/IMetadataSerializer$1")); + mObInitMap.put(new Pair("wq", "net/minecraft/entity/passive/EntitySheep$1")); + mObInitMap.put(new Pair("sr", "net/minecraft/entity/EntityFlying")); + mObInitMap.put(new Pair("os", "net/minecraft/server/management/UserListWhitelistEntry")); + mObInitMap.put(new Pair("kt", "net/minecraft/init/Bootstrap$3")); + mObInitMap.put(new Pair("gu", "net/minecraft/network/play/server/S27PacketExplosion")); + mObInitMap.put(new Pair("asi", "net/minecraft/world/gen/feature/WorldGenCanopyTree")); + mObInitMap.put(new Pair("aoj", "net/minecraft/block/BlockLilyPad")); + mObInitMap.put(new Pair("akk", "net/minecraft/block/BlockDirectional")); + mObInitMap.put(new Pair("acm", "net/minecraft/item/ItemEnchantedBook")); + mObInitMap.put(new Pair("agl", "net/minecraft/enchantment/EnchantmentWaterWorker")); + mObInitMap.put(new Pair("bsl", "net/minecraft/client/audio/MovingSound")); + mObInitMap.put(new Pair("bom", "net/minecraft/client/renderer/entity/RenderOcelot")); + mObInitMap.put(new Pair("bgo", "net/minecraft/client/gui/stream/GuiStreamOptions")); + mObInitMap.put(new Pair("bkn", "net/minecraft/client/particle/EffectRenderer")); + mObInitMap.put( + new Pair("net/minecraft/realms/RealmsScreen", "net/minecraft/realms/RealmsScreen")); + mObInitMap.put(new Pair("xe", "net/minecraft/entity/projectile/EntityFishHook")); + mObInitMap.put(new Pair("tf", "net/minecraft/entity/DataWatcher$WatchableObject")); + mObInitMap.put(new Pair("pg", "net/minecraft/stats/StatisticsFile")); + mObInitMap.put(new Pair("lh", "net/minecraft/server/MinecraftServer$1")); + mObInitMap.put(new Pair("hi", + "net/minecraft/network/play/server/S14PacketEntity$S16PacketEntityLook")); + mObInitMap.put(new Pair("dj", "net/minecraft/nbt/NBTTagCompound$2")); + mObInitMap.put(new Pair("ada", "net/minecraft/item/ItemHoe")); + mObInitMap.put(new Pair("bpa", "net/minecraft/client/renderer/entity/RenderVillager")); + mObInitMap.put(new Pair("bdd", "net/minecraft/client/gui/GuiScreenDemo")); + mObInitMap.put(new Pair("bhc", "net/minecraft/client/model/ModelBat")); + mObInitMap.put(new Pair("blb", "net/minecraft/client/particle/EntityPickupFX")); + mObInitMap.put(new Pair("pz", "net/minecraft/util/IntHashMap")); + mObInitMap.put(new Pair("adt", "net/minecraft/item/ItemSaddle")); + mObInitMap.put(new Pair("ahs", "net/minecraft/world/NextTickListEntry")); + mObInitMap.put(new Pair("bts", "net/minecraft/client/audio/SoundHandler$SwitchType")); + mObInitMap.put(new Pair("bpt", "net/minecraft/client/renderer/texture/LayeredTexture")); + mObInitMap.put(new Pair("awz", "net/minecraft/world/gen/layer/GenLayerEdge$SwitchMode")); + mObInitMap.put(new Pair("bdw", "net/minecraft/client/gui/GuiScreen")); + mObInitMap.put(new Pair("bhv", "net/minecraft/client/model/TexturedQuad")); + mObInitMap.put(new Pair("blu", "net/minecraft/client/renderer/EntityRenderer$1")); + mObInitMap.put(new Pair("ip", "net/minecraft/network/play/client/C0APacketAnimation")); + mObInitMap.put(new Pair("eq", "net/minecraft/network/EnumConnectionState$4")); + mObInitMap.put(new Pair("ar", "net/minecraft/command/CommandGameMode")); + mObInitMap.put(new Pair("xw", "net/minecraft/entity/item/EntityTNTPrimed")); + mObInitMap.put(new Pair("tx", "net/minecraft/entity/ai/EntityAIAvoidEntity$1")); + mObInitMap.put(new Pair("i", "net/minecraft/crash/CrashReport$7")); + mObInitMap.put(new Pair("ato", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor5")); + mObInitMap.put(new Pair("app", "net/minecraft/block/BlockPistonBase")); + mObInitMap.put(new Pair("alq", "net/minecraft/block/BlockJukebox")); + mObInitMap.put(new Pair("ahr", "net/minecraft/world/ChunkCache")); + mObInitMap.put(new Pair("axn", "net/minecraft/world/gen/layer/GenLayer")); + mObInitMap.put(new Pair("bal", "net/minecraft/client/settings/KeyBinding")); + mObInitMap.put(new Pair("bek", "net/minecraft/client/gui/achievement/GuiStats$StatsBlock")); + mObInitMap.put(new Pair("bij", "net/minecraft/client/model/ModelIronGolem")); + mObInitMap.put(new Pair("btr", "net/minecraft/client/audio/SoundHandler$2")); + mObInitMap.put(new Pair("yk", "net/minecraft/entity/monster/EntitySilverfish")); + mObInitMap.put(new Pair("ul", "net/minecraft/entity/ai/EntityAIWatchClosest2")); + mObInitMap.put(new Pair("qm", "net/minecraft/util/MouseFilter")); + mObInitMap.put(new Pair("mn", "net/minecraft/entity/EntityTracker")); + mObInitMap.put(new Pair("io", "net/minecraft/network/play/INetHandlerPlayServer")); + mObInitMap.put(new Pair("aeg", "net/minecraft/item/ItemSlab")); + mObInitMap.put(new Pair("aah", "net/minecraft/inventory/ContainerEnchantment$1")); + mObInitMap.put(new Pair("aif", "net/minecraft/world/biome/BiomeGenForest")); + mObInitMap.put(new Pair("auc", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$JunglePyramid")); + mObInitMap.put(new Pair("ayb", "net/minecraft/world/gen/layer/GenLayerVoronoiZoom")); + mObInitMap + .put(new Pair("buf", "net/minecraft/client/stream/ChatController$SwitchChatState")); + mObInitMap.put(new Pair("bqg", "net/minecraft/client/renderer/texture/TextureManager$1")); + mObInitMap.put(new Pair("bii", "net/minecraft/client/model/PositionTextureVertex")); + mObInitMap.put(new Pair("bmh", "net/minecraft/client/renderer/Tessellator")); + mObInitMap.put(new Pair("ra", "net/minecraft/inventory/InventoryLargeChest")); + mObInitMap.put(new Pair("nb", + "net/minecraft/client/network/NetHandlerHandshakeMemory$SwitchEnumConnectionState")); + mObInitMap.put(new Pair("jc", "net/minecraft/network/play/client/C00PacketKeepAlive")); + mObInitMap.put(new Pair("fd", "net/minecraft/util/MessageSerializer2")); + mObInitMap.put(new Pair("be", "net/minecraft/command/server/CommandPardonPlayer")); + mObInitMap.put(new Pair("aqw", "net/minecraft/world/gen/MapGenCaves")); + mObInitMap.put(new Pair("amx", "net/minecraft/block/BlockQuartz")); + mObInitMap.put(new Pair("aez", "net/minecraft/item/crafting/RecipesFood")); + mObInitMap.put(new Pair("aiy", "net/minecraft/world/biome/BiomeEndDecorator")); + mObInitMap.put( + new Pair("bqz", "net/minecraft/client/resources/IResourceManagerReloadListener")); + mObInitMap.put(new Pair("rt", "net/minecraft/potion/PotionHealthBoost")); + mObInitMap.put(new Pair("nu", "net/minecraft/server/management/PlayerProfileCache$2")); + mObInitMap.put(new Pair("jv", "net/minecraft/network/login/INetHandlerLoginServer")); + mObInitMap.put(new Pair("fw", "net/minecraft/network/play/server/S0EPacketSpawnObject")); + mObInitMap.put(new Pair("bx", "net/minecraft/command/server/CommandTestForBlock")); + mObInitMap.put(new Pair("abo", "net/minecraft/item/ItemBucket")); + mObInitMap.put(new Pair("afn", "net/minecraft/enchantment/EnchantmentArrowFire")); + mObInitMap.put(new Pair("brn", "net/minecraft/client/resources/SkinManager$3$1")); + mObInitMap.put(new Pair("aqv", "net/minecraft/world/gen/ChunkProviderHell")); + mObInitMap.put(new Pair("auu", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$RightTurn")); + mObInitMap.put(new Pair("ayt", "net/minecraft/world/storage/WorldInfo$1")); + mObInitMap.put(new Pair("bbr", "net/minecraft/util/Timer")); + mObInitMap.put(new Pair("bfq", "net/minecraft/client/gui/GuiEnchantment")); + mObInitMap.put(new Pair("bjp", "net/minecraft/client/multiplayer/ServerList")); + mObInitMap.put(new Pair("bno", "net/minecraft/client/renderer/entity/Render")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsLevelSummary", + "net/minecraft/realms/RealmsLevelSummary")); + mObInitMap + .put(new Pair("gk", "net/minecraft/network/play/server/S22PacketMultiBlockChange")); + mObInitMap.put(new Pair("cl", "net/minecraft/block/BlockSourceImpl")); + mObInitMap.put(new Pair("vr", "net/minecraft/entity/ai/EntityAITargetNonTamed")); + mObInitMap.put(new Pair("rs", "net/minecraft/potion/PotionAttackDamage")); + mObInitMap.put(new Pair("arj", "net/minecraft/world/gen/feature/WorldGenClay")); + mObInitMap.put(new Pair("ank", "net/minecraft/block/BlockSign")); + mObInitMap.put(new Pair("ajl", "net/minecraft/block/Block$3")); + mObInitMap.put(new Pair("avi", "net/minecraft/world/gen/structure/MapGenStructureIO")); + mObInitMap.put(new Pair("bcf", "net/minecraft/client/gui/GuiButtonLanguage")); + mObInitMap.put(new Pair("bge", "net/minecraft/client/gui/ServerSelectionList")); + mObInitMap.put(new Pair("wf", "net/minecraft/entity/passive/EntityAnimal")); + mObInitMap.put(new Pair("sg", "net/minecraft/entity/EntityList")); + mObInitMap.put(new Pair("oh", + "net/minecraft/server/management/PreYggdrasilConverter$ConversionError")); + mObInitMap.put(new Pair("ki", "net/minecraft/network/status/client/C01PacketPing")); + mObInitMap.put(new Pair("gj", "net/minecraft/network/play/server/S02PacketChat")); + mObInitMap.put(new Pair("acb", "net/minecraft/creativetab/CreativeTabs$5")); + mObInitMap + .put(new Pair("aga", "net/minecraft/enchantment/EnchantmentHelper$ModifierLiving")); + mObInitMap.put( + new Pair("bsa", "net/minecraft/client/resources/data/AnimationMetadataSection")); + mObInitMap.put(new Pair("bkc", "net/minecraft/client/particle/EntityFireworkOverlayFX")); + mObInitMap.put(new Pair("bob", "net/minecraft/client/renderer/entity/RenderItem$3")); + mObInitMap.put(new Pair("wy", "net/minecraft/entity/boss/EntityDragonPart")); + mObInitMap.put(new Pair("sz", "net/minecraft/entity/EnumCreatureAttribute")); + mObInitMap.put(new Pair("asq", "net/minecraft/world/gen/feature/WorldGenTrees")); + mObInitMap.put(new Pair("aor", "net/minecraft/tileentity/TileEntity")); + mObInitMap.put(new Pair("aks", "net/minecraft/block/BlockEnchantmentTable")); + mObInitMap.put(new Pair("acu", "net/minecraft/item/ItemFishFood$FishType")); + mObInitMap.put(new Pair("agt", "net/minecraft/world/ChunkPosition")); + mObInitMap.put(new Pair("bst", "net/minecraft/client/audio/ISound")); + mObInitMap.put(new Pair("bou", "net/minecraft/client/renderer/entity/RenderSnowMan")); + mObInitMap.put(new Pair("bcx", "net/minecraft/client/multiplayer/GuiConnecting")); + mObInitMap.put(new Pair("bgw", "net/minecraft/client/main/Main$3")); + mObInitMap.put(new Pair("bkv", "net/minecraft/client/particle/EntitySmokeFX")); + mObInitMap.put( + new Pair("tn", "net/minecraft/entity/ai/attributes/ModifiableAttributeInstance")); + mObInitMap.put(new Pair("po", "net/minecraft/util/IJsonSerializable")); + mObInitMap.put(new Pair("lp", "net/minecraft/scoreboard/ServerScoreboard")); + mObInitMap + .put(new Pair("hq", "net/minecraft/network/play/server/S13PacketDestroyEntities")); + mObInitMap.put(new Pair("dr", "net/minecraft/nbt/NBTTagLong")); + mObInitMap.put(new Pair("adi", "net/minecraft/item/ItemBucketMilk")); + mObInitMap.put(new Pair("ahh", "net/minecraft/world/IWorldAccess")); + mObInitMap.put(new Pair("bth", "net/minecraft/client/audio/MusicTicker$MusicType")); + mObInitMap.put(new Pair("bpi", "net/minecraft/client/shader/ShaderManager")); + mObInitMap.put(new Pair("asp", "net/minecraft/world/gen/feature/WorldGenTallGrass")); + mObInitMap.put(new Pair("awo", "net/minecraft/world/gen/NoiseGeneratorSimplex")); + mObInitMap.put(new Pair("bhk", "net/minecraft/client/model/ModelEnderman")); + mObInitMap.put(new Pair("blj", "net/minecraft/util/MovementInputFromOptions")); + mObInitMap.put(new Pair("ie", "net/minecraft/network/play/server/S3CPacketUpdateScore")); + mObInitMap.put(new Pair("ef", "net/minecraft/nbt/JsonToNBT$Primitive")); + mObInitMap.put(new Pair("ag", "net/minecraft/command/server/CommandBanPlayer")); + mObInitMap.put(new Pair("xl", "net/minecraft/entity/item/EntityMinecart")); + mObInitMap.put(new Pair("atd", "net/minecraft/world/gen/structure/MapGenNetherBridge")); + mObInitMap.put(new Pair("ape", "net/minecraft/tileentity/TileEntityEnderChest")); + mObInitMap.put(new Pair("alf", "net/minecraft/block/BlockGlass")); + mObInitMap.put(new Pair("ahg", "net/minecraft/world/MinecraftException")); + mObInitMap.put(new Pair("axc", "net/minecraft/world/gen/layer/GenLayerAddMushroomIsland")); + mObInitMap.put(new Pair("baa", "net/minecraft/scoreboard/Score$1")); + mObInitMap.put(new Pair("net/minecraft/realms/DisconnectedOnlineScreen", + "net/minecraft/realms/DisconnectedOnlineScreen")); + mObInitMap.put(new Pair("btg", "net/minecraft/client/audio/MusicTicker")); + mObInitMap.put(new Pair("ua", "net/minecraft/entity/ai/EntityAIMate")); + mObInitMap.put(new Pair("mc", "net/minecraft/server/gui/MinecraftServerGui$4")); + mObInitMap.put(new Pair("id", "net/minecraft/network/play/server/S3EPacketTeams")); + mObInitMap.put(new Pair("q", "net/minecraft/util/Facing")); + mObInitMap.put(new Pair("atw", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Start")); + mObInitMap.put(new Pair("apx", "net/minecraft/world/chunk/Chunk")); + mObInitMap.put(new Pair("aly", "net/minecraft/block/BlockMelon")); + mObInitMap.put(new Pair("ahz", "net/minecraft/world/biome/BiomeCache$Block")); + mObInitMap.put(new Pair("axv", "net/minecraft/world/gen/layer/GenLayerRiverMix")); + mObInitMap.put(new Pair("btz", "net/minecraft/client/stream/Metadata")); + mObInitMap.put(new Pair("ys", "net/minecraft/entity/monster/EntityZombie$GroupData")); + mObInitMap.put(new Pair("ut", "net/minecraft/entity/ai/EntityAIMoveTowardsRestriction")); + mObInitMap.put(new Pair("qu", "net/minecraft/util/Tuple")); + mObInitMap.put(new Pair("mv", "net/minecraft/world/WorldServer$ServerBlockEventList")); + mObInitMap.put(new Pair("iw", "net/minecraft/network/play/client/C11PacketEnchantItem")); + mObInitMap.put(new Pair("ex", "net/minecraft/network/NetworkStatistics$Tracker")); + mObInitMap.put(new Pair("ay", "net/minecraft/command/server/CommandListPlayers")); + mObInitMap.put( + new Pair("aql", "net/minecraft/world/chunk/storage/AnvilChunkLoader$PendingChunk")); + mObInitMap.put(new Pair("amm", "net/minecraft/block/BlockOldLog")); + mObInitMap.put(new Pair("aap", "net/minecraft/inventory/ContainerPlayer")); + mObInitMap.put(new Pair("ain", "net/minecraft/world/biome/BiomeGenMutated")); + mObInitMap.put(new Pair("p", "net/minecraft/util/Direction")); + mObInitMap.put(new Pair("bun", "net/minecraft/client/stream/IStream$AuthFailureReason")); + mObInitMap.put(new Pair("bqo", "net/minecraft/client/resources/ResourceIndex")); + mObInitMap.put(new Pair("bas", "net/minecraft/client/Minecraft$12")); + mObInitMap.put(new Pair("ber", "net/minecraft/client/gui/IProgressMeter")); + mObInitMap.put(new Pair("biq", "net/minecraft/client/model/ModelDragon")); + mObInitMap.put(new Pair("bmp", + "net/minecraft/client/renderer/tileentity/TileEntityMobSpawnerRenderer")); + mObInitMap.put(new Pair("ri", "net/minecraft/profiler/PlayerUsageSnooper")); + mObInitMap.put(new Pair("nj", "net/minecraft/network/NetHandlerPlayServer$2")); + mObInitMap.put(new Pair("jk", "net/minecraft/network/play/client/C0CPacketInput")); + mObInitMap.put(new Pair("fl", "net/minecraft/event/HoverEvent")); + mObInitMap.put(new Pair("bm", "net/minecraft/command/server/CommandSetBlock")); + mObInitMap.put(new Pair("abd", "net/minecraft/item/ItemArmor$ArmorMaterial")); + mObInitMap.put(new Pair("afc", "net/minecraft/item/crafting/RecipesMapExtending")); + mObInitMap.put(new Pair("ajb", "net/minecraft/block/BlockAnvil")); + mObInitMap.put(new Pair("brc", "net/minecraft/client/resources/ResourcePackRepository")); + mObInitMap.put( + new Pair("auj", "net/minecraft/world/gen/structure/StructureStrongholdPieces$1")); + mObInitMap.put(new Pair("ayi", "net/minecraft/world/storage/MapData")); + mObInitMap.put(new Pair("bbg", "net/minecraft/util/MouseHelper")); + mObInitMap.put(new Pair("bff", "net/minecraft/client/gui/GuiScreenBook$NextPageButton")); + mObInitMap.put(new Pair("bje", "net/minecraft/client/multiplayer/PlayerControllerMP")); + mObInitMap.put(new Pair("bnd", "net/minecraft/client/renderer/entity/RenderBlaze")); + mObInitMap.put(new Pair("ca", "net/minecraft/command/CommandToggleDownfall")); + mObInitMap.put(new Pair("zf", "net/minecraft/entity/item/EntityFireworkRocket")); + mObInitMap.put(new Pair("vg", "net/minecraft/entity/ai/EntityAIRunAroundLikeCrazy")); + mObInitMap.put(new Pair("rh", "net/minecraft/inventory/InventoryBasic")); + mObInitMap.put(new Pair("aja", "net/minecraft/block/BlockAir")); + mObInitMap.put(new Pair("bbz", "net/minecraft/client/gui/MapItemRenderer$Instance")); + mObInitMap.put(new Pair("bfy", "net/minecraft/client/gui/inventory/GuiDispenser")); + mObInitMap.put(new Pair("bjx", "net/minecraft/client/particle/EntityCritFX")); + mObInitMap.put(new Pair("zy", "net/minecraft/inventory/ContainerBeacon$BeaconSlot")); + mObInitMap.put(new Pair("vz", "net/minecraft/village/Village")); + mObInitMap.put(new Pair("arr", "net/minecraft/world/gen/feature/WorldGenGlowStone2")); + mObInitMap.put(new Pair("ans", "net/minecraft/block/BlockStairs")); + mObInitMap.put(new Pair("abv", "net/minecraft/creativetab/CreativeTabs$10")); + mObInitMap.put(new Pair("afu", "net/minecraft/enchantment/EnumEnchantmentType")); + mObInitMap.put(new Pair("ajt", "net/minecraft/block/BlockCactus")); + mObInitMap.put( + new Pair("avq", "net/minecraft/world/gen/structure/StructureVillagePieces$House1")); + mObInitMap.put(new Pair("azp", "net/minecraft/world/storage/IPlayerFileData")); + mObInitMap.put(new Pair("bru", "net/minecraft/client/resources/data/IMetadataSection")); + mObInitMap.put(new Pair("bjw", "net/minecraft/client/particle/EntityCrit2FX")); + mObInitMap.put(new Pair("bnv", "net/minecraft/client/renderer/entity/RenderHorse")); + mObInitMap.put(new Pair("wn", "net/minecraft/entity/passive/EntityOcelot")); + mObInitMap.put(new Pair("op", "net/minecraft/server/management/UserListBans")); + mObInitMap.put(new Pair("kq", "net/minecraft/init/Bootstrap$13")); + mObInitMap.put(new Pair("gr", "net/minecraft/network/play/server/S3FPacketCustomPayload")); + mObInitMap.put(new Pair("cs", "net/minecraft/util/IObjectIntIterable")); + mObInitMap.put(new Pair("asf", "net/minecraft/world/gen/feature/WorldGenTaiga1")); + mObInitMap.put(new Pair("aog", "net/minecraft/block/BlockTripWireHook")); + mObInitMap.put(new Pair("akh", "net/minecraft/block/BlockDeadBush")); + mObInitMap.put(new Pair("acj", "net/minecraft/item/ItemDye")); + mObInitMap.put(new Pair("agi", "net/minecraft/enchantment/EnchantmentProtection")); + mObInitMap + .put(new Pair("bsi", "net/minecraft/client/resources/data/TextureMetadataSection")); + mObInitMap.put(new Pair("bcm", "net/minecraft/client/gui/GuiSlot")); + mObInitMap.put(new Pair("bgl", "net/minecraft/client/gui/GuiResourcePackSelected")); + mObInitMap.put(new Pair("bkk", "net/minecraft/client/particle/EntityLavaFX")); + mObInitMap.put( + new Pair("boj", "net/minecraft/client/renderer/entity/RenderMinecartMobSpawner")); + mObInitMap.put(new Pair("tc", "net/minecraft/entity/item/EntityPainting$EnumArt")); + mObInitMap.put(new Pair("pd", "net/minecraft/stats/IStatStringFormat")); + mObInitMap.put(new Pair("le", "net/minecraft/command/ServerCommand")); + mObInitMap.put(new Pair("hf", "net/minecraft/network/play/server/S14PacketEntity")); + mObInitMap.put(new Pair("dg", "net/minecraft/nbt/NBTTagByte")); + mObInitMap.put(new Pair("ase", "net/minecraft/world/gen/feature/WorldGenMinable")); + mObInitMap.put(new Pair("awd", + "net/minecraft/world/gen/structure/StructureVillagePieces$Village")); + mObInitMap.put(new Pair("bda", "net/minecraft/client/gui/GuiCreateFlatWorld$Details")); + mObInitMap.put(new Pair("hy", "net/minecraft/network/play/server/S12PacketEntityVelocity")); + mObInitMap.put(new Pair("dz", "net/minecraft/nbt/NBTBase$NBTPrimitive")); + mObInitMap.put(new Pair("xa", "net/minecraft/entity/boss/EntityDragon")); + mObInitMap.put(new Pair("tb", "net/minecraft/entity/item/EntityPainting")); + mObInitMap + .put(new Pair("asx", "net/minecraft/world/gen/structure/StructureMineshaftPieces")); + mObInitMap.put(new Pair("aoy", "net/minecraft/tileentity/TileEntityCommandBlock$1")); + mObInitMap.put(new Pair("akz", "net/minecraft/block/BlockFence")); + mObInitMap.put(new Pair("aww", "net/minecraft/block/material/MaterialPortal")); + mObInitMap.put(new Pair("bdt", "net/minecraft/client/gui/GuiScreenWorking")); + mObInitMap.put(new Pair("bhs", "net/minecraft/client/model/ModelHorse")); + mObInitMap.put(new Pair("xt", "net/minecraft/entity/ai/EntityMinecartMobSpawner")); + mObInitMap.put(new Pair("tu", "net/minecraft/entity/ai/EntityLookHelper")); + mObInitMap.put(new Pair("pv", "net/minecraft/util/HttpUtil")); + mObInitMap.put(new Pair("lw", "net/minecraft/server/dedicated/DedicatedServer$3")); + mObInitMap.put(new Pair("hx", "net/minecraft/network/play/server/S1BPacketEntityAttach")); + mObInitMap.put(new Pair("f", "net/minecraft/crash/CrashReport$4")); + mObInitMap.put(new Pair("atl", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Entrance")); + mObInitMap.put(new Pair("apm", "net/minecraft/tileentity/TileEntitySign")); + mObInitMap.put(new Pair("aln", "net/minecraft/block/BlockHopper")); + mObInitMap.put(new Pair("adp", "net/minecraft/item/ItemPotion")); + mObInitMap.put(new Pair("aho", "net/minecraft/world/SpawnerAnimals")); + mObInitMap.put(new Pair("bai", "net/minecraft/stats/ObjectiveStat")); + mObInitMap.put(new Pair("bto", "net/minecraft/client/audio/SoundEventAccessorComposite")); + mObInitMap.put(new Pair("bpp", "net/minecraft/client/renderer/texture/AbstractTexture")); + mObInitMap.put(new Pair("blq", "net/minecraft/client/renderer/EntitySorter")); + mObInitMap.put(new Pair("yh", "net/minecraft/entity/monster/EntityPigZombie")); + mObInitMap.put(new Pair("ui", "net/minecraft/entity/ai/EntityAIBase")); + mObInitMap.put(new Pair("qj", "net/minecraft/profiler/Profiler$Result")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsServerStatusPinger", + "net/minecraft/realms/RealmsServerStatusPinger")); + mObInitMap.put(new Pair("mk", "net/minecraft/world/demo/DemoWorldServer")); + mObInitMap + .put(new Pair("il", "net/minecraft/network/play/server/S20PacketEntityProperties")); + mObInitMap.put(new Pair("em", "net/minecraft/network/NetworkManager$3")); + mObInitMap.put(new Pair("an", "net/minecraft/command/server/CommandEmote")); + mObInitMap.put(new Pair("aqa", "net/minecraft/world/chunk/storage/NibbleArrayReader")); + mObInitMap.put(new Pair("amb", "net/minecraft/block/BlockSilverfish")); + mObInitMap.put(new Pair("aed", "net/minecraft/item/ItemSnowball")); + mObInitMap.put(new Pair("aae", "net/minecraft/inventory/InventoryCrafting")); + mObInitMap.put(new Pair("aic", "net/minecraft/world/biome/BiomeGenDesert")); + mObInitMap.put(new Pair("e", "net/minecraft/crash/CrashReport$3")); + mObInitMap.put( + new Pair("buc", "net/minecraft/client/stream/BroadcastController$BroadcastState")); + mObInitMap.put(new Pair("bqd", "net/minecraft/client/renderer/texture/TextureAtlasSprite")); + mObInitMap.put(new Pair("bah", "net/minecraft/scoreboard/IScoreObjectiveCriteria")); + mObInitMap.put(new Pair("beg", "net/minecraft/client/gui/GuiWinGame")); + mObInitMap.put(new Pair("bif", "net/minecraft/client/model/ModelSnowMan")); + mObInitMap.put(new Pair("bme", "net/minecraft/client/util/QuadComparator")); + mObInitMap.put(new Pair("fa", "net/minecraft/util/MessageSerializer")); + mObInitMap.put(new Pair("bb", "net/minecraft/command/server/CommandNetstat")); + mObInitMap.put(new Pair("aew", "net/minecraft/item/crafting/RecipeBookCloning")); + mObInitMap.put(new Pair("aax", "net/minecraft/inventory/SlotCrafting")); + mObInitMap.put(new Pair("aiv", "net/minecraft/world/biome/BiomeGenSwamp")); + mObInitMap.put(new Pair("x", "net/minecraft/command/IAdminCommand")); + mObInitMap.put(new Pair("bqw", "net/minecraft/client/resources/IResource")); + mObInitMap.put(new Pair("bez", "net/minecraft/client/gui/inventory/GuiBeacon")); + mObInitMap.put(new Pair("biy", "net/minecraft/client/model/TextureOffset")); + mObInitMap.put(new Pair("bmx", "net/minecraft/client/renderer/culling/Frustrum")); + mObInitMap.put(new Pair("js", "net/minecraft/network/login/server/S02PacketLoginSuccess")); + mObInitMap.put(new Pair("ft", "net/minecraft/network/Packet")); + mObInitMap.put(new Pair("bu", "net/minecraft/command/server/CommandSummon")); + mObInitMap.put(new Pair("yz", "net/minecraft/entity/player/EntityPlayer")); + mObInitMap.put(new Pair("aqs", "net/minecraft/world/gen/MapGenRavine")); + mObInitMap.put(new Pair("amt", "net/minecraft/block/BlockRailPowered")); + mObInitMap.put(new Pair("aiu", "net/minecraft/world/biome/BiomeGenStoneBeach")); + mObInitMap.put(new Pair("aur", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$PieceWeight")); + mObInitMap.put(new Pair("ayq", "net/minecraft/world/storage/SaveHandler")); + mObInitMap.put(new Pair("bbo", "net/minecraft/client/LoadingScreenRenderer")); + mObInitMap.put(new Pair("bfn", + "net/minecraft/client/gui/inventory/GuiContainerCreative$CreativeSlot")); + mObInitMap.put(new Pair("bjm", "net/minecraft/client/multiplayer/ServerAddress")); + mObInitMap.put(new Pair("buu", "net/minecraft/client/renderer/OpenGlHelper")); + mObInitMap.put(new Pair("zn", "net/minecraft/entity/item/EntityExpBottle")); + mObInitMap.put(new Pair("vo", "net/minecraft/entity/ai/EntityAINearestAttackableTarget")); + mObInitMap.put(new Pair("rp", "net/minecraft/util/EntityDamageSource")); + mObInitMap.put(new Pair("nq", "net/minecraft/server/network/NetHandlerStatusServer")); + mObInitMap.put(new Pair("jr", "net/minecraft/network/login/INetHandlerLoginClient")); + mObInitMap.put(new Pair("arg", "net/minecraft/world/gen/feature/WorldGeneratorBonusChest")); + mObInitMap.put(new Pair("anh", "net/minecraft/block/BlockSand")); + mObInitMap.put(new Pair("abk", "net/minecraft/item/ItemBook")); + mObInitMap.put(new Pair("afj", "net/minecraft/item/crafting/RecipesCrafting")); + mObInitMap.put(new Pair("aji", "net/minecraft/block/Block")); + mObInitMap.put(new Pair("avf", "net/minecraft/world/gen/structure/MapGenStructure$1")); + mObInitMap.put(new Pair("aze", "net/minecraft/world/storage/ISaveFormat")); + mObInitMap.put(new Pair("brj", "net/minecraft/client/resources/SkinManager")); + mObInitMap.put(new Pair("bjl", "net/minecraft/client/gui/GuiPlayerInfo")); + mObInitMap.put( + new Pair("bnk", "net/minecraft/client/renderer/tileentity/RenderEnderCrystal")); + mObInitMap.put(new Pair("wc", "net/minecraft/village/VillageCollection")); + mObInitMap.put(new Pair("sd", "net/minecraft/entity/Entity$SwitchEnumEntitySize")); + mObInitMap.put(new Pair("oe", "net/minecraft/server/management/PreYggdrasilConverter$5")); + mObInitMap.put(new Pair("kf", + "net/minecraft/network/ServerStatusResponse$MinecraftProtocolVersionIdentifier")); + mObInitMap.put(new Pair("gg", "net/minecraft/network/play/server/S24PacketBlockAction")); + mObInitMap.put(new Pair("ch", "net/minecraft/command/CommandNotFoundException")); + mObInitMap.put(new Pair("arz", "net/minecraft/world/gen/feature/WorldGenMegaJungle")); + mObInitMap.put(new Pair("bcb", "net/minecraft/client/gui/GuiButton")); + mObInitMap.put(new Pair("bga", "net/minecraft/client/gui/ServerListEntryLanScan")); + mObInitMap.put(new Pair("sw", "net/minecraft/entity/EntityLiving")); + mObInitMap.put(new Pair("ox", "net/minecraft/network/rcon/RConThreadQuery")); + mObInitMap.put(new Pair("ky", "net/minecraft/init/Bootstrap$7")); + mObInitMap.put(new Pair("gz", "net/minecraft/network/play/server/S26PacketMapChunkBulk")); + mObInitMap.put(new Pair("akp", "net/minecraft/block/BlockDragonEgg")); + mObInitMap.put(new Pair("acr", "net/minecraft/item/ItemFireworkCharge")); + mObInitMap.put(new Pair("agq", "net/minecraft/tileentity/MobSpawnerBaseLogic")); + mObInitMap.put(new Pair("bsq", "net/minecraft/client/audio/SoundList$SoundEntry")); + mObInitMap.put(new Pair("bor", "net/minecraft/client/renderer/entity/RenderSilverfish")); + mObInitMap.put(new Pair("avx", + "net/minecraft/world/gen/structure/StructureVillagePieces$WoodHut")); + mObInitMap.put(new Pair("azw", "net/minecraft/util/Vec3")); + mObInitMap.put(new Pair("bcu", "net/minecraft/client/gui/GuiConfirmOpenLink")); + mObInitMap.put(new Pair("bgt", "net/minecraft/client/main/Main$1")); + mObInitMap.put(new Pair("bks", "net/minecraft/client/particle/EntityCloudFX")); + mObInitMap.put(new Pair("wu", "net/minecraft/entity/passive/EntityWaterMob")); + mObInitMap.put(new Pair("sv", "net/minecraft/entity/EntityLivingBase")); + mObInitMap.put(new Pair("asm", "net/minecraft/world/gen/feature/WorldGenLiquids")); + mObInitMap.put(new Pair("aon", "net/minecraft/block/BlockButtonWood")); + mObInitMap.put(new Pair("ako", "net/minecraft/block/BlockDoublePlant")); + mObInitMap.put(new Pair("awl", "net/minecraft/world/gen/NoiseGeneratorPerlin")); + mObInitMap.put(new Pair("bdi", "net/minecraft/client/gui/GuiSleepMP")); + mObInitMap.put(new Pair("bhh", "net/minecraft/client/model/ModelChicken")); + mObInitMap.put(new Pair("blg", "net/minecraft/client/entity/AbstractClientPlayer")); + mObInitMap.put(new Pair("xi", "net/minecraft/entity/item/EntityBoat")); + mObInitMap.put(new Pair("tj", "net/minecraft/entity/ai/attributes/AttributeModifier")); + mObInitMap.put(new Pair("pk", "net/minecraft/stats/StatBase$3")); + mObInitMap.put(new Pair("ll", "net/minecraft/server/MinecraftServer$5")); + mObInitMap.put( + new Pair("ata", "net/minecraft/world/gen/structure/StructureMineshaftPieces$Room")); + mObInitMap.put(new Pair("apb", "net/minecraft/tileentity/TileEntityDispenser")); + mObInitMap.put(new Pair("alc", "net/minecraft/block/BlockFlower")); + mObInitMap.put(new Pair("ade", "net/minecraft/init/Items")); + mObInitMap.put(new Pair("ahd", "net/minecraft/world/World$2")); + mObInitMap.put( + new Pair("btd", "net/minecraft/client/network/LanServerDetector$LanServerList")); + mObInitMap.put(new Pair("bpe", "net/minecraft/client/renderer/entity/RenderWolf")); + mObInitMap.put(new Pair("blf", "net/minecraft/client/particle/EntityRainFX")); + mObInitMap.put(new Pair("ia", "net/minecraft/network/play/server/S1FPacketSetExperience")); + mObInitMap.put(new Pair("eb", "net/minecraft/nbt/JsonToNBT")); + mObInitMap.put(new Pair("ac", "net/minecraft/command/ICommandSender")); + mObInitMap.put(new Pair("att", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$PieceWeight")); + mObInitMap.put(new Pair("apu", "net/minecraft/world/chunk/IChunkProvider")); + mObInitMap.put(new Pair("alv", "net/minecraft/block/BlockLever")); + mObInitMap.put(new Pair("adx", "net/minecraft/item/ItemShears")); + mObInitMap.put(new Pair("ahw", "net/minecraft/world/biome/BiomeGenBase$TempCategory")); + mObInitMap.put(new Pair("btw", "net/minecraft/client/stream/MetadataAchievement")); + mObInitMap.put(new Pair("bpx", "net/minecraft/client/renderer/texture/Stitcher$Slot")); + mObInitMap.put(new Pair("bhz", "net/minecraft/client/model/ModelSign")); + mObInitMap.put(new Pair("bly", "net/minecraft/client/renderer/ItemRenderer")); + mObInitMap.put(new Pair("uq", "net/minecraft/entity/ai/EntityAIAttackOnCollide")); + mObInitMap.put(new Pair("ms", "net/minecraft/world/gen/ChunkProviderServer")); + mObInitMap.put(new Pair("it", + "net/minecraft/network/play/client/C16PacketClientStatus$EnumState")); + mObInitMap.put(new Pair("eu", "net/minecraft/network/NetworkStatistics")); + mObInitMap.put(new Pair("av", "net/minecraft/command/CommandServerKick")); + mObInitMap.put(new Pair("ael", "net/minecraft/item/ItemWritableBook")); + mObInitMap.put(new Pair("aam", "net/minecraft/inventory/ContainerHorseInventory")); + mObInitMap.put(new Pair("aik", "net/minecraft/world/biome/BiomeGenJungle")); + mObInitMap.put(new Pair("m", "net/minecraft/crash/CrashReportCategory$2")); + mObInitMap.put(new Pair("buk", + "net/minecraft/client/stream/IngestServerTester$IngestTestListener")); + mObInitMap.put(new Pair("bql", "net/minecraft/client/renderer/texture/TextureClock")); + mObInitMap.put(new Pair("ats", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Piece")); + mObInitMap.put(new Pair("axr", "net/minecraft/world/gen/layer/GenLayerHills")); + mObInitMap.put(new Pair("bap", "net/minecraft/client/Minecraft$1")); + mObInitMap + .put(new Pair("beo", "net/minecraft/client/gui/achievement/GuiStats$StatsItem$1")); + mObInitMap.put(new Pair("bin", "net/minecraft/client/model/ModelWither")); + mObInitMap.put(new Pair("bmm", + "net/minecraft/client/renderer/tileentity/TileEntityChestRenderer")); + mObInitMap + .put(new Pair("jh", "net/minecraft/network/play/client/C13PacketPlayerAbilities")); + mObInitMap.put(new Pair("fi", "net/minecraft/event/ClickEvent$Action")); + mObInitMap.put(new Pair("bj", "net/minecraft/command/server/CommandSaveOn")); + mObInitMap.put(new Pair("yo", "net/minecraft/entity/monster/EntitySpider$GroupData")); + mObInitMap.put(new Pair("up", "net/minecraft/entity/ai/EntityAIVillagerMate")); + mObInitMap.put(new Pair("aqh", "net/minecraft/world/chunk/storage/RegionFile")); + mObInitMap.put(new Pair("ami", "net/minecraft/block/BlockNewLog")); + mObInitMap.put(new Pair("aij", "net/minecraft/world/biome/BiomeGenSnow")); + mObInitMap.put(new Pair("aug", "net/minecraft/world/gen/structure/MapGenStronghold")); + mObInitMap.put(new Pair("ayf", "net/minecraft/pathfinding/PathEntity")); + mObInitMap.put(new Pair("bbd", "net/minecraft/client/Minecraft$7")); + mObInitMap.put(new Pair("bfc", "net/minecraft/client/gui/inventory/GuiBeacon$PowerButton")); + mObInitMap.put(new Pair("bjb", "net/minecraft/client/network/NetHandlerPlayClient")); + mObInitMap.put( + new Pair("buj", "net/minecraft/client/stream/IngestServerTester$SwitchStatType")); + mObInitMap.put(new Pair("zc", "net/minecraft/entity/projectile/EntityArrow")); + mObInitMap.put(new Pair("vd", "net/minecraft/entity/ai/EntityAIArrowAttack")); + mObInitMap.put(new Pair("re", "net/minecraft/client/renderer/IconFlipped")); + mObInitMap.put(new Pair("nf", "net/minecraft/network/NetworkSystem$3")); + mObInitMap.put(new Pair("jg", + "net/minecraft/network/play/client/C03PacketPlayer$C05PacketPlayerLook")); + mObInitMap.put(new Pair("auz", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stairs2")); + mObInitMap.put(new Pair("ayy", "net/minecraft/world/storage/WorldInfo$6")); + mObInitMap.put(new Pair("bja", "net/minecraft/client/network/NetHandlerLoginClient$1")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsSharedConstants", + "net/minecraft/realms/RealmsSharedConstants")); + mObInitMap.put(new Pair("zv", "net/minecraft/inventory/ContainerRepair$1")); + mObInitMap.put(new Pair("vw", "net/minecraft/entity/ai/EntitySenses")); + mObInitMap.put(new Pair("rx", "net/minecraft/entity/EntityAgeable")); + mObInitMap.put(new Pair("ny", "net/minecraft/server/management/IPBanEntry")); + mObInitMap.put(new Pair("jz", "net/minecraft/network/status/server/S01PacketPong")); + mObInitMap.put(new Pair("aro", "net/minecraft/world/gen/feature/WorldGenFlowers")); + mObInitMap.put(new Pair("anp", "net/minecraft/block/BlockSponge")); + mObInitMap.put(new Pair("abs", "net/minecraft/item/ItemMapBase")); + mObInitMap.put(new Pair("afr", "net/minecraft/enchantment/EnchantmentDurability")); + mObInitMap.put(new Pair("ajq", "net/minecraft/block/BlockBrewingStand")); + mObInitMap.put(new Pair("avn", "net/minecraft/world/gen/structure/MapGenVillage")); + mObInitMap.put(new Pair("brr", "net/minecraft/client/resources/LanguageManager")); + mObInitMap.put(new Pair("bbv", "net/minecraft/client/gui/GuiIngame")); + mObInitMap.put(new Pair("bfu", "net/minecraft/client/gui/inventory/GuiInventory")); + mObInitMap.put(new Pair("bjt", "net/minecraft/client/network/OldServerPinger$2$1")); + mObInitMap.put(new Pair("bns", "net/minecraft/client/renderer/entity/RenderFish")); + mObInitMap.put(new Pair("sl", "net/minecraft/command/IEntitySelector$2")); + mObInitMap.put(new Pair("om", "net/minecraft/server/management/UserList")); + mObInitMap.put(new Pair("kn", "net/minecraft/init/Bootstrap$10")); + mObInitMap.put(new Pair("go", "net/minecraft/network/play/server/S30PacketWindowItems")); + mObInitMap.put(new Pair("cp", "net/minecraft/dispenser/IBehaviorDispenseItem")); + mObInitMap.put(new Pair("ake", "net/minecraft/block/BlockWorkbench")); + mObInitMap.put(new Pair("acg", "net/minecraft/item/ItemTool")); + mObInitMap.put(new Pair("agf", "net/minecraft/enchantment/EnchantmentKnockback")); + mObInitMap.put(new Pair("bsf", + "net/minecraft/client/resources/data/LanguageMetadataSectionSerializer")); + mObInitMap.put(new Pair("avm", "net/minecraft/world/gen/structure/StructureStart")); + mObInitMap.put(new Pair("bcj", "net/minecraft/client/gui/GuiOptionButton")); + mObInitMap + .put(new Pair("bgi", "net/minecraft/client/resources/ResourcePackListEntryFound")); + mObInitMap.put(new Pair("bkh", "net/minecraft/client/particle/EntityHeartFX")); + mObInitMap.put(new Pair("bog", "net/minecraft/client/renderer/entity/RenderLightningBolt")); + mObInitMap.put(new Pair("lb", "net/minecraft/client/util/JsonException")); + mObInitMap.put(new Pair("hc", "net/minecraft/network/play/server/S29PacketSoundEffect")); + mObInitMap.put(new Pair("dd", "net/minecraft/util/StatCollector")); + mObInitMap.put(new Pair("wj", "net/minecraft/entity/passive/EntityHorse$1")); + mObInitMap.put(new Pair("asb", "net/minecraft/world/gen/feature/WorldGenHugeTrees")); + mObInitMap.put(new Pair("aoc", "net/minecraft/block/BlockTorch")); + mObInitMap.put( + new Pair("awa", "net/minecraft/world/gen/structure/StructureVillagePieces$Start")); + mObInitMap.put(new Pair("la", "net/minecraft/init/Bootstrap$9")); + mObInitMap.put(new Pair("aov", "net/minecraft/tileentity/TileEntityBrewingStand")); + mObInitMap.put(new Pair("akw", "net/minecraft/block/ITileEntityProvider")); + mObInitMap.put(new Pair("acy", "net/minecraft/item/ItemAppleGold")); + mObInitMap.put(new Pair("agx", "net/minecraft/world/ColorizerFoliage")); + mObInitMap.put(new Pair("awt", "net/minecraft/block/material/Material")); + mObInitMap.put(new Pair("bsx", "net/minecraft/server/integrated/IntegratedServer")); + mObInitMap.put(new Pair("boy", "net/minecraft/client/renderer/entity/RenderTNTPrimed")); + mObInitMap.put(new Pair("bkz", "net/minecraft/client/particle/EntitySuspendFX")); + mObInitMap.put(new Pair("xq", "net/minecraft/entity/item/EntityMinecartFurnace")); + mObInitMap.put(new Pair("tr", "net/minecraft/entity/EntityBodyHelper")); + mObInitMap.put(new Pair("lt", "net/minecraft/server/dedicated/DedicatedServer")); + mObInitMap.put(new Pair("hu", "net/minecraft/network/play/server/S09PacketHeldItemChange")); + mObInitMap.put(new Pair("dv", "net/minecraft/nbt/NBTUtil")); + mObInitMap.put(new Pair("ati", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Straight")); + mObInitMap.put(new Pair("apj", "net/minecraft/tileentity/TileEntityMobSpawner")); + mObInitMap.put(new Pair("alk", "net/minecraft/block/BlockBreakable")); + mObInitMap.put(new Pair("adm", "net/minecraft/item/ItemNameTag")); + mObInitMap.put(new Pair("ahl", "net/minecraft/world/IBlockAccess")); + mObInitMap.put(new Pair("btl", "net/minecraft/client/audio/SoundManager$2")); + mObInitMap.put(new Pair("bpm", "net/minecraft/client/shader/ShaderLoader$ShaderType")); + mObInitMap.put(new Pair("bdp", "net/minecraft/client/gui/GuiIngameMenu")); + mObInitMap.put(new Pair("bho", "net/minecraft/client/model/ModelMagmaCube")); + mObInitMap.put(new Pair("bln", "net/minecraft/entity/boss/BossStatus")); + mObInitMap.put(new Pair("uf", "net/minecraft/entity/ai/EntityAISwimming")); + mObInitMap.put(new Pair("qg", "net/minecraft/util/EnumTypeAdapterFactory$1")); + mObInitMap.put(new Pair("ii", "net/minecraft/network/play/server/S33PacketUpdateSign")); + mObInitMap.put(new Pair("ej", "net/minecraft/network/NetworkManager")); + mObInitMap.put(new Pair("ak", "net/minecraft/command/CommandDebug")); + mObInitMap.put(new Pair("aea", "net/minecraft/item/ItemSimpleFoiled")); + mObInitMap.put(new Pair("aab", "net/minecraft/inventory/ContainerBrewingStand$Potion")); + mObInitMap.put(new Pair("b", "net/minecraft/crash/CrashReport")); + mObInitMap.put(new Pair("bqa", "net/minecraft/client/renderer/texture/TextureMap$1")); + mObInitMap.put(new Pair("ath", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$End")); + mObInitMap.put(new Pair("bae", "net/minecraft/scoreboard/Team")); + mObInitMap.put(new Pair("bed", "net/minecraft/client/gui/GuiScreenOptionsSounds$Button")); + mObInitMap.put(new Pair("bic", "net/minecraft/client/model/ModelSkeleton")); + mObInitMap.put(new Pair("bmb", "net/minecraft/client/renderer/RenderGlobal$1")); + mObInitMap.put(new Pair("yd", "net/minecraft/entity/monster/EntityGhast")); + mObInitMap.put(new Pair("ue", "net/minecraft/entity/ai/EntityAIFleeSun")); + mObInitMap.put(new Pair("aau", "net/minecraft/inventory/SlotMerchantResult")); + mObInitMap.put(new Pair("u", "net/minecraft/util/Util")); + mObInitMap.put(new Pair("bax", "net/minecraft/client/Minecraft$SwitchMovingObjectType")); + mObInitMap.put(new Pair("bew", "net/minecraft/client/gui/GuiControls")); + mObInitMap.put(new Pair("yw", "net/minecraft/entity/player/PlayerCapabilities")); + mObInitMap.put(new Pair("ux", "net/minecraft/entity/ai/EntityAILookAtVillager")); + mObInitMap.put(new Pair("mz", "net/minecraft/network/PingResponseHandler")); + mObInitMap.put(new Pair("aqp", "net/minecraft/world/WorldProviderHell")); + mObInitMap.put(new Pair("amq", "net/minecraft/block/BlockPortal$Size")); + mObInitMap.put(new Pair("aat", "net/minecraft/inventory/ContainerMerchant")); + mObInitMap.put(new Pair("air", "net/minecraft/world/biome/BiomeGenRiver")); + mObInitMap.put(new Pair("auo", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Crossing")); + mObInitMap.put(new Pair("ayn", "net/minecraft/world/chunk/storage/AnvilSaveConverter")); + mObInitMap.put(new Pair("bbl", "net/minecraft/client/settings/GameSettings$SwitchOptions")); + mObInitMap.put(new Pair("bur", "net/minecraft/client/stream/NullStream")); + mObInitMap.put(new Pair("bqs", "net/minecraft/client/resources/FolderResourcePack")); + mObInitMap.put(new Pair("bmt", "net/minecraft/client/renderer/tileentity/RenderEndPortal")); + mObInitMap.put(new Pair("zk", "net/minecraft/entity/projectile/EntityThrowable")); + mObInitMap.put(new Pair("vl", "net/minecraft/entity/ai/EntityAITradePlayer")); + mObInitMap.put(new Pair("rm", "net/minecraft/util/CombatEntry")); + mObInitMap.put(new Pair("nn", "net/minecraft/server/network/NetHandlerLoginServer")); + mObInitMap.put( + new Pair("jo", "net/minecraft/network/play/client/C08PacketPlayerBlockPlacement")); + mObInitMap.put(new Pair("fp", "net/minecraft/util/ChatStyle$Serializer")); + mObInitMap.put(new Pair("bq", "net/minecraft/command/CommandShowSeed")); + mObInitMap.put(new Pair("ard", "net/minecraft/world/gen/feature/WorldGenBigTree")); + mObInitMap.put(new Pair("ane", "net/minecraft/block/BlockReed")); + mObInitMap.put(new Pair("abh", "net/minecraft/item/ItemBlock")); + mObInitMap.put(new Pair("afg", "net/minecraft/item/crafting/IRecipe")); + mObInitMap.put(new Pair("ajf", "net/minecraft/block/BlockRailBase$Rail")); + mObInitMap.put(new Pair("avc", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stronghold")); + mObInitMap.put( + new Pair("brg", "net/minecraft/client/resources/SimpleReloadableResourceManager")); + mObInitMap.put(new Pair("bbk", "net/minecraft/client/settings/GameSettings$1")); + mObInitMap.put(new Pair("bfj", "net/minecraft/client/gui/inventory/GuiCrafting")); + mObInitMap.put(new Pair("bji", "net/minecraft/client/multiplayer/WorldClient$3")); + mObInitMap.put(new Pair("bnh", "net/minecraft/client/renderer/entity/RenderCow")); + mObInitMap.put(new Pair("sa", "net/minecraft/entity/Entity")); + mObInitMap.put(new Pair("ob", "net/minecraft/server/management/PreYggdrasilConverter$2")); + mObInitMap + .put(new Pair("kc", "net/minecraft/network/ServerStatusResponse$PlayerCountData")); + mObInitMap.put(new Pair("gd", "net/minecraft/network/play/server/S37PacketStatistics")); + mObInitMap.put(new Pair("ce", "net/minecraft/command/NumberInvalidException")); + mObInitMap.put(new Pair("net/minecraft/realms/Realms", "net/minecraft/realms/Realms")); + mObInitMap.put(new Pair("ajy", "net/minecraft/block/BlockClay")); + mObInitMap.put(new Pair("afz", "net/minecraft/enchantment/EnchantmentHelper$IModifier")); + mObInitMap.put(new Pair("brz", "net/minecraft/client/resources/data/AnimationFrame")); + mObInitMap.put(new Pair("avb", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$StairsStraight")); + mObInitMap.put(new Pair("aza", "net/minecraft/world/storage/WorldInfo$8")); + mObInitMap.put(new Pair("kv", "net/minecraft/init/Bootstrap$5")); + mObInitMap.put(new Pair("gw", "net/minecraft/network/play/server/S00PacketKeepAlive")); + mObInitMap.put(new Pair("cx", "net/minecraft/dispenser/IPosition")); + mObInitMap.put(new Pair("arv", "net/minecraft/world/gen/feature/WorldGenIcePath")); + mObInitMap.put(new Pair("anw", "net/minecraft/block/BlockStoneBrick")); + mObInitMap.put(new Pair("ajx", "net/minecraft/block/BlockChest")); + mObInitMap.put(new Pair("avu", + "net/minecraft/world/gen/structure/StructureVillagePieces$PieceWeight")); + mObInitMap.put(new Pair("azt", "net/minecraft/util/AxisAlignedBB")); + mObInitMap.put(new Pair("bcr", "net/minecraft/client/gui/GuiSlotRealmsProxy")); + mObInitMap.put(new Pair("bgq", + "net/minecraft/client/gui/stream/GuiStreamUnavailable$SwitchReason")); + mObInitMap.put(new Pair("bkp", "net/minecraft/client/particle/EffectRenderer$2")); + mObInitMap.put(new Pair("wr", "net/minecraft/entity/monster/EntitySnowman")); + mObInitMap.put(new Pair("ss", "net/minecraft/entity/EntityHanging")); + mObInitMap.put(new Pair("ot", "net/minecraft/network/rcon/RConOutputStream")); + mObInitMap.put(new Pair("ku", "net/minecraft/init/Bootstrap$4")); + mObInitMap.put(new Pair("asj", "net/minecraft/world/gen/feature/WorldGenSand")); + mObInitMap.put(new Pair("aok", "net/minecraft/block/BlockWeb")); + mObInitMap.put(new Pair("akl", "net/minecraft/block/BlockDirt")); + mObInitMap.put(new Pair("acn", "net/minecraft/item/ItemEnderEye")); + mObInitMap.put(new Pair("agm", "net/minecraft/entity/IMerchant")); + mObInitMap.put(new Pair("bsm", "net/minecraft/client/audio/MovingSoundMinecart")); + mObInitMap.put(new Pair("bon", "net/minecraft/client/renderer/entity/RenderPainting")); + mObInitMap.put(new Pair("bko", "net/minecraft/client/particle/EffectRenderer$1")); + mObInitMap.put(new Pair("xf", "net/minecraft/util/WeightedRandomFishable")); + mObInitMap.put(new Pair("tg", "net/minecraft/entity/passive/EntityTameable")); + mObInitMap.put(new Pair("ph", "net/minecraft/stats/StatBase")); + mObInitMap.put(new Pair("li", "net/minecraft/server/MinecraftServer$2")); + mObInitMap.put(new Pair("hj", "net/minecraft/network/play/server/S36PacketSignEditorOpen")); + mObInitMap.put(new Pair("dk", "net/minecraft/nbt/NBTTagDouble")); + mObInitMap.put(new Pair("adb", "net/minecraft/item/Item")); + mObInitMap.put(new Pair("aha", "net/minecraft/world/ColorizerGrass")); + mObInitMap.put(new Pair("bta", "net/minecraft/client/network/LanServerDetector")); + mObInitMap.put(new Pair("bpb", "net/minecraft/client/renderer/entity/RenderWitch")); + mObInitMap.put(new Pair("bde", "net/minecraft/client/gui/GuiScreenServerList")); + mObInitMap.put(new Pair("bhd", "net/minecraft/client/model/ModelBlaze")); + mObInitMap.put(new Pair("blc", "net/minecraft/client/particle/EntityBlockDustFX")); + mObInitMap.put(new Pair("tz", "net/minecraft/entity/ai/EntityAIBreakDoor")); + mObInitMap.put(new Pair("als", "net/minecraft/block/BlockLadder")); + mObInitMap.put(new Pair("aht", "net/minecraft/world/biome/BiomeGenBeach")); + mObInitMap.put(new Pair("btt", "net/minecraft/client/audio/SoundRegistry")); + mObInitMap.put(new Pair("bpu", "net/minecraft/client/renderer/texture/SimpleTexture")); + mObInitMap.put(new Pair("bdx", "net/minecraft/client/gui/GuiSelectWorld")); + mObInitMap.put(new Pair("bhw", "net/minecraft/client/model/ModelQuadruped")); + mObInitMap.put(new Pair("blv", "net/minecraft/client/renderer/EntityRenderer$2")); + mObInitMap.put(new Pair("iq", "net/minecraft/network/play/client/C14PacketTabComplete")); + mObInitMap.put(new Pair("er", "net/minecraft/network/EnumConnectionState$3")); + mObInitMap.put(new Pair("as", "net/minecraft/command/CommandGameRule")); + mObInitMap.put(new Pair("xx", "net/minecraft/entity/monster/EntityBlaze")); + mObInitMap.put(new Pair("ty", "net/minecraft/entity/ai/EntityAIBeg")); + mObInitMap.put(new Pair("aaj", "net/minecraft/inventory/ContainerFurnace")); + mObInitMap.put(new Pair("j", "net/minecraft/crash/CrashReport$8")); + mObInitMap.put(new Pair("atp", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor2")); + mObInitMap.put(new Pair("apq", "net/minecraft/block/BlockPistonExtension")); + mObInitMap.put(new Pair("alr", "net/minecraft/block/BlockJukebox$TileEntityJukebox")); + mObInitMap.put(new Pair("axo", "net/minecraft/world/gen/layer/GenLayer$1")); + mObInitMap.put(new Pair("bam", "net/minecraft/client/renderer/RenderHelper")); + mObInitMap + .put(new Pair("bel", "net/minecraft/client/gui/achievement/GuiStats$StatsBlock$1")); + mObInitMap.put(new Pair("bik", "net/minecraft/client/model/ModelVillager")); + mObInitMap.put(new Pair("bmj", + "net/minecraft/client/renderer/tileentity/TileEntityBeaconRenderer")); + mObInitMap.put(new Pair("bg", "net/minecraft/command/server/CommandPublishLocalServer")); + mObInitMap.put(new Pair("yl", "net/minecraft/entity/monster/EntitySkeleton")); + mObInitMap.put(new Pair("um", "net/minecraft/entity/ai/EntityAILeapAtTarget")); + mObInitMap.put(new Pair("qn", "net/minecraft/util/StringUtils")); + mObInitMap.put(new Pair("mo", "net/minecraft/entity/EntityTracker$1")); + mObInitMap.put(new Pair("amf", "net/minecraft/block/BlockNetherWart")); + mObInitMap.put(new Pair("aeh", "net/minecraft/item/ItemSword")); + mObInitMap.put(new Pair("aai", "net/minecraft/inventory/ContainerEnchantment$2")); + mObInitMap.put(new Pair("aig", "net/minecraft/world/biome/BiomeGenForest$1")); + mObInitMap.put(new Pair("aud", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$JunglePyramid$Stones")); + mObInitMap.put(new Pair("ayc", "net/minecraft/world/gen/layer/GenLayerZoom")); + mObInitMap.put(new Pair("bba", "net/minecraft/client/Minecraft$4")); + mObInitMap.put(new Pair("bug", "net/minecraft/client/stream/ChatController$ChatState")); + mObInitMap.put(new Pair("bqh", "net/minecraft/client/renderer/texture/ITextureObject")); + mObInitMap.put(new Pair("bmi", "net/minecraft/client/shader/TesselatorVertexState")); + mObInitMap.put(new Pair("va", "net/minecraft/entity/ai/EntityAIPlay")); + mObInitMap.put(new Pair("rb", "net/minecraft/inventory/IInventory")); + mObInitMap.put(new Pair("nc", "net/minecraft/network/NetworkSystem")); + mObInitMap.put(new Pair("jd", "net/minecraft/network/play/client/C03PacketPlayer")); + mObInitMap.put(new Pair("fe", "net/minecraft/util/ChatComponentStyle")); + mObInitMap.put(new Pair("bf", "net/minecraft/command/CommandPlaySound")); + mObInitMap.put(new Pair("aqx", "net/minecraft/world/gen/MapGenBase")); + mObInitMap.put(new Pair("amy", "net/minecraft/block/BlockRail")); + mObInitMap.put(new Pair("aiz", "net/minecraft/world/gen/feature/WorldGenWaterlily")); + mObInitMap.put(new Pair("auw", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stones")); + mObInitMap.put(new Pair("vt", "net/minecraft/entity/ai/EntityAIOwnerHurtTarget")); + mObInitMap.put(new Pair("ru", "net/minecraft/potion/PotionHealth")); + mObInitMap.put( + new Pair("nv", "net/minecraft/server/management/PlayerProfileCache$ProfileEntry")); + mObInitMap.put(new Pair("jw", "net/minecraft/network/login/client/C00PacketLoginStart")); + mObInitMap.put( + new Pair("fx", "net/minecraft/network/play/server/S11PacketSpawnExperienceOrb")); + mObInitMap.put(new Pair("by", "net/minecraft/command/server/CommandTestFor")); + mObInitMap.put(new Pair("abp", "net/minecraft/item/ItemCarrotOnAStick")); + mObInitMap.put(new Pair("afo", "net/minecraft/enchantment/EnchantmentArrowInfinite")); + mObInitMap.put(new Pair("ajn", "net/minecraft/init/Blocks")); + mObInitMap.put(new Pair("bro", + "net/minecraft/client/resources/SkinManager$SkinAvailableCallback")); + mObInitMap.put(new Pair("auv", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$RoomCrossing")); + mObInitMap.put(new Pair("ayu", "net/minecraft/world/storage/WorldInfo$2")); + mObInitMap.put(new Pair("bbs", "net/minecraft/util/Session")); + mObInitMap.put(new Pair("bfr", "net/minecraft/client/gui/inventory/GuiFurnace")); + mObInitMap.put(new Pair("bjq", "net/minecraft/client/network/OldServerPinger")); + mObInitMap.put(new Pair("bnp", "net/minecraft/client/renderer/entity/RenderXPOrb")); + mObInitMap.put(new Pair("kk", "net/minecraft/dispenser/BehaviorProjectileDispense")); + mObInitMap.put( + new Pair("gl", "net/minecraft/network/play/server/S32PacketConfirmTransaction")); + mObInitMap.put(new Pair("cm", "net/minecraft/dispenser/BehaviorDefaultDispenseItem")); + mObInitMap.put(new Pair("zr", "net/minecraft/util/FoodStats")); + mObInitMap.put(new Pair("vs", "net/minecraft/entity/ai/EntityAIOwnerHurtByTarget")); + mObInitMap.put(new Pair("ark", "net/minecraft/world/gen/feature/WorldGenDeadBush")); + mObInitMap.put(new Pair("anl", "net/minecraft/block/BlockSkull")); + mObInitMap.put(new Pair("ajm", "net/minecraft/block/Block$SoundType")); + mObInitMap.put(new Pair("avj", "net/minecraft/world/gen/structure/MapGenStructureData")); + mObInitMap.put(new Pair("bgf", "net/minecraft/client/gui/GuiScreenResourcePacks")); + mObInitMap.put(new Pair("bke", "net/minecraft/client/particle/EntityFireworkStarterFX")); + mObInitMap.put(new Pair("wg", "net/minecraft/entity/passive/EntityChicken")); + mObInitMap.put(new Pair("sh", "net/minecraft/entity/EntityList$EntityEggInfo")); + mObInitMap + .put(new Pair("oi", "net/minecraft/server/management/ServerConfigurationManager")); + mObInitMap.put(new Pair("kj", "net/minecraft/network/status/client/C00PacketServerQuery")); + mObInitMap.put(new Pair("aka", "net/minecraft/block/BlockColored")); + mObInitMap.put(new Pair("acc", "net/minecraft/creativetab/CreativeTabs$6")); + mObInitMap + .put(new Pair("agb", "net/minecraft/enchantment/EnchantmentHelper$ModifierDamage")); + mObInitMap.put(new Pair("bsb", + "net/minecraft/client/resources/data/AnimationMetadataSectionSerializer")); + mObInitMap.put(new Pair("bkd", "net/minecraft/client/particle/EntityFireworkSparkFX")); + mObInitMap.put(new Pair("boc", "net/minecraft/client/renderer/entity/RenderItem$4")); + mObInitMap.put(new Pair("wz", "net/minecraft/entity/item/EntityEnderCrystal")); + mObInitMap.put(new Pair("asr", "net/minecraft/world/gen/feature/WorldGenVines")); + mObInitMap.put(new Pair("aos", "net/minecraft/tileentity/TileEntity$1")); + mObInitMap.put(new Pair("akt", "net/minecraft/block/BlockEndPortal")); + mObInitMap.put(new Pair("acv", "net/minecraft/item/ItemFishingRod")); + mObInitMap.put(new Pair("agu", "net/minecraft/world/ChunkCoordIntPair")); + mObInitMap.put(new Pair("awq", "net/minecraft/block/material/MaterialLogic")); + mObInitMap.put(new Pair("bsu", "net/minecraft/client/audio/ISound$AttenuationType")); + mObInitMap.put(new Pair("bov", "net/minecraft/client/renderer/entity/RenderSpider")); + mObInitMap.put(new Pair("bcy", "net/minecraft/client/multiplayer/GuiConnecting$1")); + mObInitMap.put(new Pair("bkw", "net/minecraft/client/particle/EntitySnowShovelFX")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsAnvilLevelStorageSource", + "net/minecraft/realms/RealmsAnvilLevelStorageSource")); + mObInitMap.put(new Pair("to", "net/minecraft/entity/ai/attributes/RangedAttribute")); + mObInitMap.put(new Pair("pp", "net/minecraft/stats/StatList")); + mObInitMap.put(new Pair("lq", "net/minecraft/server/dedicated/PropertyManager")); + mObInitMap.put( + new Pair("hr", "net/minecraft/network/play/server/S1EPacketRemoveEntityEffect")); + mObInitMap.put(new Pair("ds", "net/minecraft/nbt/NBTSizeTracker")); + mObInitMap.put(new Pair("alh", "net/minecraft/block/BlockGrass")); + mObInitMap.put(new Pair("adj", "net/minecraft/item/ItemMinecart")); + mObInitMap.put(new Pair("bti", "net/minecraft/client/audio/SoundPoolEntry")); + mObInitMap.put(new Pair("bpj", "net/minecraft/client/shader/ShaderGroup")); + mObInitMap.put(new Pair("awp", "net/minecraft/world/gen/NoiseGenerator")); + mObInitMap.put(new Pair("bdm", "net/minecraft/client/gui/GuiOptions")); + mObInitMap.put(new Pair("bhl", "net/minecraft/client/model/ModelGhast")); + mObInitMap.put(new Pair("blk", "net/minecraft/client/entity/EntityPlayerSP")); + mObInitMap.put(new Pair("me", "net/minecraft/server/gui/PlayerListComponent")); + mObInitMap.put(new Pair("eg", "net/minecraft/network/NettyEncryptionTranslator")); + mObInitMap.put(new Pair("ah", "net/minecraft/command/server/CommandBroadcast")); + mObInitMap.put(new Pair("xm", "net/minecraft/entity/item/EntityMinecartChest")); + mObInitMap.put( + new Pair("net/minecraft/realms/Tezzelator", "net/minecraft/realms/Tezzelator")); + mObInitMap + .put(new Pair("ate", "net/minecraft/world/gen/structure/MapGenNetherBridge$Start")); + mObInitMap.put(new Pair("apf", "net/minecraft/tileentity/TileEntityFlowerPot")); + mObInitMap.put(new Pair("alg", "net/minecraft/block/BlockGlowstone")); + mObInitMap.put(new Pair("axd", "net/minecraft/world/gen/layer/GenLayerAddSnow")); + mObInitMap.put(new Pair("bea", "net/minecraft/client/gui/GuiSnooper")); + mObInitMap.put(new Pair("ya", "net/minecraft/entity/monster/EntityEnderman")); + mObInitMap.put(new Pair("ub", "net/minecraft/entity/ai/EntityAIControlledByPlayer")); + mObInitMap.put(new Pair("qc", "net/minecraft/util/ThreadSafeBoundList")); + mObInitMap.put(new Pair("md", "net/minecraft/server/gui/MinecraftServerGui$5")); + mObInitMap.put(new Pair("r", "net/minecraft/util/ChunkCoordinates")); + mObInitMap.put(new Pair("atx", "net/minecraft/world/gen/structure/MapGenScatteredFeature")); + mObInitMap.put(new Pair("apy", "net/minecraft/world/chunk/Chunk$1")); + mObInitMap.put(new Pair("alz", "net/minecraft/block/BlockCompressed")); + mObInitMap.put(new Pair("axw", "net/minecraft/world/gen/layer/GenLayerShore")); + mObInitMap.put(new Pair("bau", "net/minecraft/client/Minecraft$14")); + mObInitMap.put(new Pair("yt", "net/minecraft/entity/NpcMerchant")); + mObInitMap.put(new Pair("uu", "net/minecraft/entity/ai/EntityAIMoveTowardsTarget")); + mObInitMap.put(new Pair("qv", "net/minecraft/util/WeightedRandom")); + mObInitMap.put(new Pair("mw", "net/minecraft/entity/player/EntityPlayerMP")); + mObInitMap.put(new Pair("ix", "net/minecraft/network/play/client/C0EPacketClickWindow")); + mObInitMap.put(new Pair("ey", "net/minecraft/network/NetworkStatistics$PacketStatData")); + mObInitMap.put(new Pair("az", "net/minecraft/command/server/CommandMessage")); + mObInitMap.put(new Pair("amn", "net/minecraft/block/BlockOre")); + mObInitMap.put(new Pair("aaq", "net/minecraft/inventory/ContainerPlayer$1")); + mObInitMap.put(new Pair("aio", "net/minecraft/world/biome/BiomeGenOcean")); + mObInitMap.put(new Pair("aul", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$SwitchDoor")); + mObInitMap.put(new Pair("buo", "net/minecraft/client/stream/TwitchStream")); + mObInitMap.put(new Pair("bqp", "net/minecraft/client/resources/DefaultResourcePack")); + mObInitMap.put(new Pair("bat", "net/minecraft/client/Minecraft$13")); + mObInitMap.put(new Pair("bes", "net/minecraft/client/gui/GuiKeyBindingList")); + mObInitMap.put(new Pair("bir", "net/minecraft/client/model/ModelEnderCrystal")); + mObInitMap.put(new Pair("bmq", + "net/minecraft/client/renderer/tileentity/TileEntityRendererPiston")); + mObInitMap.put(new Pair("vi", "net/minecraft/entity/ai/EntityAICreeperSwell")); + mObInitMap.put(new Pair("rj", "net/minecraft/profiler/PlayerUsageSnooper$1")); + mObInitMap + .put(new Pair("nk", "net/minecraft/network/NetHandlerPlayServer$SwitchEnumState")); + mObInitMap.put(new Pair("jl", "net/minecraft/network/play/client/C09PacketHeldItemChange")); + mObInitMap.put(new Pair("fm", "net/minecraft/event/HoverEvent$Action")); + mObInitMap.put(new Pair("bn", "net/minecraft/command/server/CommandSetDefaultSpawnpoint")); + mObInitMap.put(new Pair("abe", "net/minecraft/item/ItemBlockWithMetadata")); + mObInitMap.put(new Pair("afd", "net/minecraft/item/crafting/RecipesIngots")); + mObInitMap.put(new Pair("ajc", "net/minecraft/block/BlockContainer")); + mObInitMap.put(new Pair("brd", "net/minecraft/client/resources/ResourcePackRepository$1")); + mObInitMap.put( + new Pair("auk", "net/minecraft/world/gen/structure/StructureStrongholdPieces$2")); + mObInitMap.put(new Pair("ayj", "net/minecraft/world/storage/MapData$MapInfo")); + mObInitMap.put(new Pair("bbh", "net/minecraft/client/renderer/OpenGlCapsChecker")); + mObInitMap.put(new Pair("bfg", "net/minecraft/client/gui/inventory/GuiBrewingStand")); + mObInitMap.put(new Pair("bjf", "net/minecraft/client/multiplayer/WorldClient")); + mObInitMap.put(new Pair("bne", "net/minecraft/client/renderer/entity/RenderBoat")); + mObInitMap.put(new Pair("ga", "net/minecraft/network/play/server/S10PacketSpawnPainting")); + mObInitMap.put(new Pair("cb", "net/minecraft/command/CommandWeather")); + mObInitMap.put(new Pair("zg", "net/minecraft/entity/projectile/EntityLargeFireball")); + mObInitMap.put(new Pair("vh", "net/minecraft/entity/ai/EntityAISit")); + mObInitMap.put(new Pair("abx", "net/minecraft/creativetab/CreativeTabs$12")); + mObInitMap.put(new Pair("ana", "net/minecraft/block/BlockRedstoneWire")); + mObInitMap.put(new Pair("bfz", "net/minecraft/client/gui/GuiMultiplayer")); + mObInitMap.put(new Pair("bjy", "net/minecraft/client/particle/EntityDropParticleFX")); + mObInitMap.put(new Pair("zz", "net/minecraft/inventory/ContainerBrewingStand")); + mObInitMap.put(new Pair("ars", "net/minecraft/world/gen/feature/WorldGenHellLava")); + mObInitMap.put(new Pair("ant", "net/minecraft/block/BlockStaticLiquid")); + mObInitMap.put(new Pair("abw", "net/minecraft/creativetab/CreativeTabs$11")); + mObInitMap.put(new Pair("afv", "net/minecraft/enchantment/EnchantmentHelper")); + mObInitMap.put(new Pair("aju", "net/minecraft/block/BlockCake")); + mObInitMap.put( + new Pair("avr", "net/minecraft/world/gen/structure/StructureVillagePieces$Field1")); + mObInitMap.put(new Pair("azq", "net/minecraft/world/storage/MapStorage")); + mObInitMap.put(new Pair("bco", "net/minecraft/client/gui/GuiStreamIndicator")); + mObInitMap.put( + new Pair("brv", "net/minecraft/client/resources/data/IMetadataSectionSerializer")); + mObInitMap.put(new Pair("bnw", "net/minecraft/client/renderer/entity/RenderBiped")); + mObInitMap.put(new Pair("wo", "net/minecraft/entity/passive/EntityPig")); + mObInitMap.put(new Pair("sp", "net/minecraft/command/IEntitySelector$ArmoredMob")); + mObInitMap.put(new Pair("oq", "net/minecraft/server/management/UserListBansEntry")); + mObInitMap.put(new Pair("kr", "net/minecraft/init/Bootstrap$14")); + mObInitMap.put(new Pair("gs", "net/minecraft/network/play/server/S40PacketDisconnect")); + mObInitMap.put(new Pair("ct", "net/minecraft/util/ObjectIntIdentityMap")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsEditBox", + "net/minecraft/realms/RealmsEditBox")); + mObInitMap.put(new Pair("asg", "net/minecraft/world/gen/feature/WorldGenPumpkin")); + mObInitMap.put(new Pair("aoh", "net/minecraft/block/BlockVine")); + mObInitMap.put(new Pair("aki", "net/minecraft/block/BlockRailDetector")); + mObInitMap.put(new Pair("ack", "net/minecraft/item/ItemEgg")); + mObInitMap.put(new Pair("agj", "net/minecraft/enchantment/EnchantmentThorns")); + mObInitMap.put( + new Pair("awf", "net/minecraft/world/gen/structure/StructureVillagePieces$Well")); + mObInitMap.put(new Pair("bsj", + "net/minecraft/client/resources/data/TextureMetadataSectionSerializer")); + mObInitMap.put(new Pair("bok", "net/minecraft/client/renderer/entity/RenderLiving")); + mObInitMap.put(new Pair("bcn", "net/minecraft/client/gui/GuiOptionSlider")); + mObInitMap.put(new Pair("bgm", "net/minecraft/client/gui/stream/GuiIngestServers")); + mObInitMap.put(new Pair("bkl", "net/minecraft/client/particle/EntityNoteFX")); + mObInitMap.put(new Pair("xc", "net/minecraft/entity/boss/EntityWither")); + mObInitMap.put(new Pair("td", "net/minecraft/entity/EntityCreature")); + mObInitMap.put(new Pair("pe", "net/minecraft/stats/StatBasic")); + mObInitMap.put(new Pair("hg", + "net/minecraft/network/play/server/S14PacketEntity$S15PacketEntityRelMove")); + mObInitMap.put(new Pair("dh", "net/minecraft/nbt/NBTTagCompound")); + mObInitMap.put( + new Pair("awe", "net/minecraft/world/gen/structure/StructureVillagePieces$Road")); + mObInitMap.put(new Pair("bdb", "net/minecraft/client/gui/GuiCreateWorld")); + mObInitMap.put(new Pair("ly", "net/minecraft/server/gui/MinecraftServerGui")); + mObInitMap + .put(new Pair("hz", "net/minecraft/network/play/server/S04PacketEntityEquipment")); + mObInitMap.put(new Pair("asy", + "net/minecraft/world/gen/structure/StructureMineshaftPieces$Corridor")); + mObInitMap.put(new Pair("aoz", "net/minecraft/tileentity/TileEntityComparator")); + mObInitMap.put(new Pair("awx", "net/minecraft/world/gen/layer/GenLayerDeepOcean")); + mObInitMap.put(new Pair("bdu", "net/minecraft/client/gui/GuiDownloadTerrain")); + mObInitMap.put(new Pair("bht", "net/minecraft/client/model/ModelOcelot")); + mObInitMap.put(new Pair("bls", + "net/minecraft/client/renderer/tileentity/TileEntityRendererChestHelper")); + mObInitMap.put(new Pair("ap", "net/minecraft/command/CommandXP")); + mObInitMap.put(new Pair("xu", "net/minecraft/entity/ai/EntityMinecartMobSpawner$1")); + mObInitMap.put(new Pair("tv", "net/minecraft/entity/ai/EntityMoveHelper")); + mObInitMap.put(new Pair("pw", "net/minecraft/util/HttpUtil$1")); + mObInitMap.put(new Pair("lx", "net/minecraft/server/dedicated/DedicatedServer$4")); + mObInitMap.put(new Pair("g", "net/minecraft/crash/CrashReport$5")); + mObInitMap.put(new Pair("atm", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Crossing2")); + mObInitMap.put(new Pair("apn", "net/minecraft/tileentity/TileEntitySkull")); + mObInitMap.put(new Pair("alo", "net/minecraft/block/BlockHugeMushroom")); + mObInitMap.put(new Pair("adq", "net/minecraft/item/EnumRarity")); + mObInitMap.put(new Pair("ahp", "net/minecraft/world/Teleporter")); + mObInitMap.put(new Pair("axl", "net/minecraft/world/gen/layer/IntCache")); + mObInitMap.put(new Pair("baj", "net/minecraft/client/renderer/ActiveRenderInfo")); + mObInitMap.put(new Pair("btp", "net/minecraft/client/audio/SoundHandler")); + mObInitMap.put(new Pair("bpq", "net/minecraft/client/renderer/texture/DynamicTexture")); + mObInitMap.put(new Pair("blr", "net/minecraft/client/util/RenderDistanceSorter")); + mObInitMap.put(new Pair("yi", "net/minecraft/entity/IRangedAttackMob")); + mObInitMap.put(new Pair("uj", "net/minecraft/entity/ai/EntityAITasks")); + mObInitMap.put(new Pair("qk", "net/minecraft/util/IProgressUpdate")); + mObInitMap.put(new Pair("ml", "net/minecraft/world/demo/DemoWorldManager")); + mObInitMap.put(new Pair("im", + "net/minecraft/network/play/server/S20PacketEntityProperties$Snapshot")); + mObInitMap.put(new Pair("en", + "net/minecraft/network/NetworkManager$InboundHandlerTuplePacketListener")); + mObInitMap.put(new Pair("ao", "net/minecraft/command/CommandEnchant")); + mObInitMap.put(new Pair("amc", "net/minecraft/block/BlockMushroom")); + mObInitMap.put(new Pair("aee", "net/minecraft/item/ItemMonsterPlacer")); + mObInitMap.put(new Pair("aaf", "net/minecraft/inventory/ContainerWorkbench")); + mObInitMap.put(new Pair("aid", "net/minecraft/world/biome/BiomeGenHills")); + mObInitMap.put(new Pair("aua", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$1")); + mObInitMap.put(new Pair("bud", + "net/minecraft/client/stream/BroadcastController$BroadcastListener")); + mObInitMap + .put(new Pair("bqe", "net/minecraft/client/renderer/texture/TextureAtlasSprite$1")); + mObInitMap.put(new Pair("beh", "net/minecraft/client/gui/achievement/GuiAchievement")); + mObInitMap.put(new Pair("big", "net/minecraft/client/model/ModelSpider")); + mObInitMap.put(new Pair("ja", "net/minecraft/network/play/client/C02PacketUseEntity")); + mObInitMap.put(new Pair("fb", "net/minecraft/network/INetHandler")); + mObInitMap.put(new Pair("bc", "net/minecraft/command/server/CommandOp")); + mObInitMap.put(new Pair("amv", "net/minecraft/block/BlockPressurePlate$Sensitivity")); + mObInitMap.put(new Pair("aex", "net/minecraft/item/crafting/RecipesDyes")); + mObInitMap.put(new Pair("aay", "net/minecraft/inventory/Slot")); + mObInitMap.put(new Pair("aiw", "net/minecraft/world/biome/BiomeGenTaiga")); + mObInitMap.put(new Pair("y", "net/minecraft/command/CommandBase")); + mObInitMap.put(new Pair("bqx", "net/minecraft/util/ResourceLocation")); + mObInitMap.put(new Pair("biz", "net/minecraft/client/network/NetHandlerLoginClient")); + mObInitMap.put(new Pair("bmy", "net/minecraft/client/renderer/culling/ClippingHelper")); + mObInitMap.put( + new Pair("jt", "net/minecraft/network/login/server/S01PacketEncryptionRequest")); + mObInitMap.put(new Pair("fu", "net/minecraft/network/play/server/S08PacketPlayerPosLook")); + mObInitMap.put(new Pair("bv", "net/minecraft/command/server/CommandTeleport")); + mObInitMap.put(new Pair("net/minecraft/realms/RealmsConnect", + "net/minecraft/realms/RealmsConnect")); + mObInitMap.put(new Pair("abm", "net/minecraft/item/ItemBow")); + mObInitMap.put(new Pair("amu", "net/minecraft/block/BlockPressurePlate")); + mObInitMap.put(new Pair("aus", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$PortalRoom")); + mObInitMap.put(new Pair("ayr", "net/minecraft/world/storage/SaveFormatOld")); + mObInitMap.put(new Pair("bbp", "net/minecraft/util/ScreenShotHelper")); + mObInitMap.put(new Pair("bfo", "net/minecraft/client/renderer/InventoryEffectRenderer")); + mObInitMap.put(new Pair("bjn", "net/minecraft/client/multiplayer/ServerData")); + mObInitMap.put(new Pair("bnm", "net/minecraft/client/renderer/entity/RenderEnderman")); + mObInitMap.put(new Pair("zo", "net/minecraft/entity/projectile/EntityPotion")); + mObInitMap.put(new Pair("vp", "net/minecraft/entity/ai/EntityAINearestAttackableTarget$1")); + mObInitMap.put(new Pair("rq", "net/minecraft/util/EntityDamageSourceIndirect")); + mObInitMap.put(new Pair("nr", "net/minecraft/server/management/BanEntry")); + mObInitMap.put(new Pair("arh", "net/minecraft/world/gen/feature/WorldGenCactus")); + mObInitMap.put(new Pair("ani", "net/minecraft/block/BlockSandStone")); + mObInitMap.put(new Pair("abl", "net/minecraft/item/ItemGlassBottle")); + mObInitMap.put(new Pair("afk", "net/minecraft/item/crafting/RecipesTools")); + mObInitMap.put(new Pair("ajj", "net/minecraft/block/Block$1")); + mObInitMap.put(new Pair("avg", "net/minecraft/world/gen/structure/MapGenStructure$2")); + mObInitMap.put(new Pair("azf", "net/minecraft/world/storage/SaveFormatComparator")); + mObInitMap.put(new Pair("bcd", "net/minecraft/client/gui/GuiTextField")); + mObInitMap.put(new Pair("brk", "net/minecraft/client/resources/SkinManager$1")); + mObInitMap.put(new Pair("bnl", "net/minecraft/client/renderer/entity/RenderDragon")); + mObInitMap.put(new Pair("wd", "net/minecraft/entity/passive/EntityAmbientCreature")); + mObInitMap.put(new Pair("se", "net/minecraft/entity/Entity$EnumEntitySize")); + mObInitMap.put(new Pair("of", "net/minecraft/server/management/PreYggdrasilConverter$6")); + mObInitMap.put(new Pair("kg", + "net/minecraft/network/ServerStatusResponse$MinecraftProtocolVersionIdentifier$Serializer")); + mObInitMap.put(new Pair("gh", "net/minecraft/network/play/server/S23PacketBlockChange")); + mObInitMap.put(new Pair("ci", "net/minecraft/command/WrongUsageException")); + mObInitMap.put( + new Pair("avz", "net/minecraft/world/gen/structure/StructureVillagePieces$House2")); + mObInitMap.put( + new Pair("net/minecraft/realms/RealmsButton", "net/minecraft/realms/RealmsButton")); + mObInitMap.put(new Pair("bcc", "net/minecraft/client/gui/GuiNewChat")); + mObInitMap.put(new Pair("bgb", "net/minecraft/client/gui/ServerListEntryLanDetected")); + mObInitMap.put(new Pair("bka", "net/minecraft/client/particle/EntityExplodeFX")); + mObInitMap.put(new Pair("ww", "net/minecraft/entity/boss/IBossDisplayData")); + mObInitMap.put(new Pair("sx", "net/minecraft/entity/EnumCreatureType")); + mObInitMap.put(new Pair("oy", "net/minecraft/network/rcon/RConThreadQuery$Auth")); + mObInitMap.put(new Pair("kz", "net/minecraft/init/Bootstrap$8")); + mObInitMap.put(new Pair("akq", "net/minecraft/block/BlockDropper")); + mObInitMap.put(new Pair("acs", "net/minecraft/item/ItemFirework")); + mObInitMap.put(new Pair("agr", + "net/minecraft/tileentity/MobSpawnerBaseLogic$WeightedRandomMinecart")); + mObInitMap.put(new Pair("bsr", "net/minecraft/client/audio/SoundList$SoundEntry$Type")); + mObInitMap.put(new Pair("bos", "net/minecraft/client/renderer/entity/RenderSkeleton")); + mObInitMap.put( + new Pair("avy", "net/minecraft/world/gen/structure/StructureVillagePieces$Church")); + mObInitMap.put(new Pair("azx", "net/minecraft/scoreboard/ScoreObjective")); + mObInitMap.put(new Pair("bcv", "net/minecraft/client/gui/GuiYesNoCallback")); + mObInitMap.put(new Pair("bgu", "net/minecraft/client/main/Main$1$1")); + mObInitMap.put(new Pair("bkt", "net/minecraft/client/particle/EntityPortalFX")); + mObInitMap.put(new Pair("ln", "net/minecraft/server/management/PlayerPositionComparator")); + mObInitMap.put(new Pair("ho", "net/minecraft/network/play/server/S38PacketPlayerListItem")); + mObInitMap.put(new Pair("dp", "net/minecraft/nbt/NBTTagInt")); + mObInitMap.put(new Pair("wv", "net/minecraft/entity/passive/EntityWolf")); + mObInitMap.put(new Pair("asn", "net/minecraft/world/gen/feature/WorldGenTaiga2")); + mObInitMap.put(new Pair("aoo", "net/minecraft/block/BlockWoodSlab")); + mObInitMap.put(new Pair("bdj", "net/minecraft/client/gui/GuiLanguage")); + mObInitMap.put(new Pair("bhi", "net/minecraft/client/model/ModelCow")); + mObInitMap.put( + new Pair("blh", "net/minecraft/client/entity/AbstractClientPlayer$SwitchType")); + mObInitMap.put(new Pair("ae", "net/minecraft/command/server/CommandAchievement")); + mObInitMap.put(new Pair("xj", "net/minecraft/entity/item/EntityFallingBlock")); + mObInitMap.put(new Pair("tk", "net/minecraft/entity/ai/attributes/BaseAttribute")); + mObInitMap.put(new Pair("pl", "net/minecraft/stats/StatBase$4")); + mObInitMap.put(new Pair("lm", "net/minecraft/server/MinecraftServer$6")); + mObInitMap.put(new Pair("atb", + "net/minecraft/world/gen/structure/StructureMineshaftPieces$Stairs")); + mObInitMap.put(new Pair("apc", "net/minecraft/tileentity/TileEntityDropper")); + mObInitMap.put(new Pair("ald", "net/minecraft/block/BlockFlowerPot")); + mObInitMap.put(new Pair("adf", "net/minecraft/item/ItemLead")); + mObInitMap.put(new Pair("ahe", "net/minecraft/world/World$3")); + mObInitMap.put(new Pair("axa", "net/minecraft/world/gen/layer/GenLayerEdge$Mode")); + mObInitMap.put(new Pair("bte", "net/minecraft/client/multiplayer/ThreadLanServerPing")); + mObInitMap.put(new Pair("bpf", "net/minecraft/client/renderer/entity/RenderZombie")); + mObInitMap.put(new Pair("ma", "net/minecraft/server/gui/MinecraftServerGui$2")); + mObInitMap.put(new Pair("ib", "net/minecraft/network/play/server/S06PacketUpdateHealth")); + mObInitMap.put(new Pair("ec", "net/minecraft/nbt/JsonToNBT$Any")); + mObInitMap.put(new Pair("ad", "net/minecraft/command/PlayerSelector")); + mObInitMap.put(new Pair("atu", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Crossing")); + mObInitMap.put(new Pair("apv", "net/minecraft/world/chunk/NibbleArray")); + mObInitMap.put(new Pair("alw", "net/minecraft/block/BlockLiquid")); + mObInitMap.put(new Pair("ady", "net/minecraft/item/ItemSpade")); + mObInitMap.put(new Pair("ahx", "net/minecraft/world/biome/BiomeGenBase$SpawnListEntry")); + mObInitMap.put(new Pair("axt", "net/minecraft/world/gen/layer/GenLayerRiverInit")); + mObInitMap.put(new Pair("bpy", "net/minecraft/client/renderer/StitcherException")); + mObInitMap.put(new Pair("ur", "net/minecraft/entity/ai/EntityAIMoveIndoors")); + mObInitMap.put(new Pair("mt", "net/minecraft/world/WorldServer")); + mObInitMap.put(new Pair("iu", "net/minecraft/network/play/client/C15PacketClientSettings")); + mObInitMap.put(new Pair("ev", "net/minecraft/network/NetworkStatistics$1")); + mObInitMap.put(new Pair("aw", "net/minecraft/command/CommandKill")); + mObInitMap.put(new Pair("amk", "net/minecraft/block/BlockObsidian")); + mObInitMap.put(new Pair("aem", "net/minecraft/item/ItemEditableBook")); + mObInitMap.put(new Pair("aan", "net/minecraft/inventory/ContainerHorseInventory$1")); + mObInitMap.put(new Pair("ail", "net/minecraft/world/biome/BiomeGenMesa")); + mObInitMap.put(new Pair("n", "net/minecraft/crash/CrashReportCategory$3")); + mObInitMap.put( + new Pair("bul", "net/minecraft/client/stream/IngestServerTester$IngestTestState")); + mObInitMap.put(new Pair("bqm", "net/minecraft/client/renderer/texture/TextureCompass")); + mObInitMap.put(new Pair("axs", "net/minecraft/world/gen/layer/GenLayerRemoveTooMuchOcean")); + mObInitMap.put(new Pair("baq", "net/minecraft/client/Minecraft$10")); + mObInitMap.put( + new Pair("bep", "net/minecraft/client/gui/achievement/GuiStats$StatsMobsList")); + mObInitMap.put(new Pair("bio", "net/minecraft/client/model/ModelWolf")); + mObInitMap.put( + new Pair("bmn", "net/minecraft/client/renderer/entity/RenderEnchantmentTable")); + mObInitMap.put(new Pair("nh", "net/minecraft/network/NetHandlerPlayServer")); + mObInitMap.put(new Pair("ji", "net/minecraft/network/play/client/C07PacketPlayerDigging")); + mObInitMap.put(new Pair("fj", "net/minecraft/util/IChatComponent")); + mObInitMap.put(new Pair("bk", "net/minecraft/command/server/CommandScoreboard")); + mObInitMap.put(new Pair("yp", "net/minecraft/entity/monster/EntityWitch")); + mObInitMap.put(new Pair("abb", "net/minecraft/item/ItemArmor")); + mObInitMap.put(new Pair("aqi", "net/minecraft/world/chunk/storage/RegionFile$ChunkBuffer")); + mObInitMap.put(new Pair("amj", "net/minecraft/block/BlockNote")); + mObInitMap.put(new Pair("auh", "net/minecraft/world/gen/structure/MapGenStronghold$Start")); + mObInitMap.put(new Pair("ayg", "net/minecraft/pathfinding/PathFinder")); + mObInitMap.put(new Pair("bbe", "net/minecraft/client/Minecraft$8")); + mObInitMap.put(new Pair("bfd", "net/minecraft/client/gui/inventory/GuiBeacon$Button")); + mObInitMap.put(new Pair("bjc", "net/minecraft/client/network/NetHandlerPlayClient$1")); + mObInitMap.put(new Pair("bnb", "net/minecraft/client/renderer/entity/RenderArrow")); + mObInitMap.put(new Pair("zd", "net/minecraft/entity/item/EntityEnderEye")); + mObInitMap.put(new Pair("ve", "net/minecraft/entity/ai/EntityAIRestrictOpenDoor")); + mObInitMap.put(new Pair("rf", "net/minecraft/util/IIcon")); + mObInitMap.put(new Pair("ng", "net/minecraft/network/NetworkSystem$4")); + mObInitMap.put(new Pair("aba", "net/minecraft/item/ItemAnvilBlock")); + mObInitMap.put(new Pair("ayz", "net/minecraft/world/storage/WorldInfo$7")); + mObInitMap.put(new Pair("bbx", "net/minecraft/client/gui/MapItemRenderer")); + mObInitMap.put(new Pair("zw", "net/minecraft/inventory/ContainerRepair$2")); + mObInitMap.put(new Pair("vx", "net/minecraft/entity/ai/RandomPositionGenerator")); + mObInitMap.put(new Pair("ry", "net/minecraft/entity/passive/IAnimals")); + mObInitMap.put(new Pair("nz", "net/minecraft/server/management/PreYggdrasilConverter")); + mObInitMap.put(new Pair("arp", "net/minecraft/world/gen/feature/WorldGenShrub")); + mObInitMap.put(new Pair("anq", "net/minecraft/block/BlockStainedGlass")); + mObInitMap.put(new Pair("abt", "net/minecraft/creativetab/CreativeTabs")); + mObInitMap.put(new Pair("afs", "net/minecraft/enchantment/EnchantmentDigging")); + mObInitMap.put(new Pair("ajr", "net/minecraft/block/BlockBush")); + mObInitMap.put(new Pair("avo", "net/minecraft/world/gen/structure/MapGenVillage$Start")); + mObInitMap.put(new Pair("brs", "net/minecraft/client/resources/Locale")); + mObInitMap.put(new Pair("bbw", "net/minecraft/client/gui/Gui")); + mObInitMap.put(new Pair("bfv", "net/minecraft/client/gui/GuiMerchant")); + mObInitMap.put(new Pair("bju", "net/minecraft/client/particle/EntityBreakingFX")); + mObInitMap.put(new Pair("bnt", "net/minecraft/client/renderer/entity/RenderGhast")); + mObInitMap.put(new Pair("wl", "net/minecraft/entity/monster/EntityGolem")); + mObInitMap.put(new Pair("sm", "net/minecraft/command/IEntitySelector$3")); + mObInitMap.put(new Pair("on", "net/minecraft/server/management/UserList$1")); + mObInitMap.put(new Pair("ko", "net/minecraft/init/Bootstrap$11")); + mObInitMap.put(new Pair("gp", "net/minecraft/network/play/server/S31PacketWindowProperty")); + mObInitMap.put(new Pair("cq", "net/minecraft/dispenser/IBehaviorDispenseItem$1")); + mObInitMap.put(new Pair("aoe", "net/minecraft/block/BlockTrapDoor")); + mObInitMap.put(new Pair("akf", "net/minecraft/block/BlockCrops")); + mObInitMap.put(new Pair("ach", "net/minecraft/item/ItemDoor")); + mObInitMap.put(new Pair("agg", "net/minecraft/enchantment/EnchantmentLootBonus")); + mObInitMap.put(new Pair("bsg", "net/minecraft/client/resources/data/PackMetadataSection")); + mObInitMap.put(new Pair("bck", "net/minecraft/client/gui/GuiOptionsRowList")); + mObInitMap.put(new Pair("bgj", "net/minecraft/client/gui/GuiResourcePackAvailable")); + mObInitMap.put(new Pair("bki", "net/minecraft/client/particle/EntityLargeExplodeFX")); + mObInitMap + .put(new Pair("boh", "net/minecraft/client/renderer/entity/RendererLivingEntity")); + mObInitMap.put(new Pair("lc", "net/minecraft/client/util/JsonException$1")); + mObInitMap.put(new Pair("hd", "net/minecraft/network/play/server/S01PacketJoinGame")); + mObInitMap.put(new Pair("de", "net/minecraft/util/StringTranslate")); + mObInitMap.put(new Pair("wk", "net/minecraft/entity/passive/EntityHorse$GroupData")); + mObInitMap.put(new Pair("asc", "net/minecraft/world/gen/feature/WorldGenMelon")); + mObInitMap.put(new Pair("aod", "net/minecraft/block/BlockLeavesBase")); + mObInitMap.put( + new Pair("awb", "net/minecraft/world/gen/structure/StructureVillagePieces$Path")); + mObInitMap.put(new Pair("pa", "net/minecraft/network/rcon/RConThreadMain")); + mObInitMap.put(new Pair("asv", "net/minecraft/world/gen/structure/StructureBoundingBox")); + mObInitMap.put(new Pair("aow", "net/minecraft/tileentity/TileEntityChest")); + mObInitMap.put(new Pair("akx", "net/minecraft/block/BlockFalling")); + mObInitMap.put(new Pair("acz", "net/minecraft/item/ItemHangingEntity")); + mObInitMap.put(new Pair("agy", "net/minecraft/world/GameRules")); + mObInitMap.put(new Pair("awu", "net/minecraft/block/material/Material$1")); + mObInitMap.put(new Pair("bdr", "net/minecraft/client/gui/GuiFlatPresets$LayerItem")); + mObInitMap.put(new Pair("bsy", "net/minecraft/server/integrated/IntegratedServer$1")); + mObInitMap.put(new Pair("boz", "net/minecraft/client/renderer/entity/RenderIronGolem")); + mObInitMap.put(new Pair("xr", "net/minecraft/entity/item/EntityMinecartHopper")); + mObInitMap.put(new Pair("pt", "net/minecraft/util/CryptManager")); + mObInitMap.put(new Pair("lu", "net/minecraft/server/dedicated/DedicatedServer$1")); + mObInitMap.put( + new Pair("hv", "net/minecraft/network/play/server/S3DPacketDisplayScoreboard")); + mObInitMap.put(new Pair("dw", "net/minecraft/nbt/NBTTagShort")); + mObInitMap.put(new Pair("atj", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor3")); + mObInitMap.put(new Pair("apk", "net/minecraft/tileentity/TileEntityMobSpawner$1")); + mObInitMap.put(new Pair("all", "net/minecraft/block/BlockHardenedClay")); + mObInitMap.put(new Pair("adn", "net/minecraft/item/ItemPickaxe")); + mObInitMap.put(new Pair("ahm", "net/minecraft/world/WorldType")); + mObInitMap.put(new Pair("btm", "net/minecraft/client/audio/SoundManager$2$1")); + mObInitMap.put(new Pair("bpn", "net/minecraft/client/shader/ShaderLinkHelper")); + mObInitMap.put(new Pair("bdq", "net/minecraft/client/gui/GuiFlatPresets")); + mObInitMap.put(new Pair("bhp", "net/minecraft/client/model/ModelLeashKnot")); + mObInitMap.put(new Pair("blo", "net/minecraft/client/renderer/WorldRenderer")); + mObInitMap.put(new Pair("yf", "net/minecraft/entity/monster/EntityMagmaCube")); + mObInitMap.put(new Pair("ug", "net/minecraft/entity/ai/EntityAIFollowOwner")); + mObInitMap.put(new Pair("qh", "net/minecraft/util/MathHelper")); + mObInitMap.put(new Pair("ij", "net/minecraft/network/play/server/S0DPacketCollectItem")); + mObInitMap.put(new Pair("ek", "net/minecraft/network/NetworkManager$1")); + mObInitMap.put(new Pair("al", "net/minecraft/command/CommandDefaultGameMode")); + mObInitMap.put(new Pair("aeb", "net/minecraft/item/ItemSkull")); + mObInitMap.put(new Pair("aac", "net/minecraft/inventory/ICrafting")); + mObInitMap.put(new Pair("aia", "net/minecraft/world/biome/BiomeDecorator")); + mObInitMap.put(new Pair("c", "net/minecraft/crash/CrashReport$1")); + mObInitMap.put(new Pair("bua", "net/minecraft/client/stream/BroadcastController")); + mObInitMap.put(new Pair("bqb", "net/minecraft/client/renderer/texture/TextureMap$2")); + mObInitMap.put(new Pair("baf", "net/minecraft/scoreboard/ScoreDummyCriteria")); + mObInitMap.put(new Pair("bee", "net/minecraft/client/gui/GuiMainMenu")); + mObInitMap.put(new Pair("bmc", "net/minecraft/client/renderer/ImageBufferDownload")); + mObInitMap.put(new Pair("ye", "net/minecraft/entity/monster/EntityGiantZombie")); + mObInitMap.put(new Pair("aav", "net/minecraft/inventory/InventoryEnderChest")); + mObInitMap.put(new Pair("v", "net/minecraft/util/Util$EnumOS")); + mObInitMap.put(new Pair("bay", "net/minecraft/client/Minecraft$2")); + mObInitMap.put(new Pair("bex", "net/minecraft/client/gui/inventory/GuiContainer")); + mObInitMap.put(new Pair("bmv", "net/minecraft/client/renderer/culling/ICamera")); + mObInitMap.put(new Pair("bs", "net/minecraft/command/CommandSpreadPlayers$Position")); + mObInitMap.put(new Pair("yx", "net/minecraft/entity/player/InventoryPlayer")); + mObInitMap.put(new Pair("uy", "net/minecraft/entity/ai/EntityAIOpenDoor")); + mObInitMap.put(new Pair("aqq", "net/minecraft/world/WorldProviderSurface")); + mObInitMap.put(new Pair("amr", "net/minecraft/block/BlockPotato")); + mObInitMap.put(new Pair("ais", "net/minecraft/world/biome/BiomeGenSavanna")); + mObInitMap.put(new Pair("aup", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$LeftTurn")); + mObInitMap.put(new Pair("ayo", "net/minecraft/world/chunk/storage/AnvilSaveConverter$1")); + mObInitMap.put(new Pair("bbm", "net/minecraft/client/settings/GameSettings$Options")); + mObInitMap.put(new Pair("bus", "net/minecraft/realms/RealmsConnect$1")); + mObInitMap + .put(new Pair("bqt", "net/minecraft/client/resources/FoliageColorReloadListener")); + mObInitMap.put(new Pair("zl", "net/minecraft/entity/projectile/EntityEgg")); + mObInitMap.put(new Pair("vm", "net/minecraft/entity/ai/EntityAIDefendVillage")); + mObInitMap.put(new Pair("rn", "net/minecraft/util/CombatTracker")); + mObInitMap.put(new Pair("no", "net/minecraft/server/network/NetHandlerLoginServer$1")); + mObInitMap.put(new Pair("jp", "net/minecraft/network/handshake/client/C00Handshake")); + mObInitMap.put(new Pair("fq", "net/minecraft/util/ChatComponentText")); + mObInitMap.put(new Pair("br", "net/minecraft/command/CommandSpreadPlayers")); + mObInitMap.put(new Pair("are", "net/minecraft/world/gen/feature/WorldGenForest")); + mObInitMap.put(new Pair("anf", "net/minecraft/block/BlockRedstoneRepeater")); + mObInitMap.put(new Pair("abi", "net/minecraft/item/ItemReed")); + mObInitMap.put(new Pair("afh", "net/minecraft/item/crafting/ShapedRecipes")); + mObInitMap.put(new Pair("ajg", "net/minecraft/block/BlockBeacon")); + mObInitMap.put(new Pair("avd", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$Stronghold$Door")); + mObInitMap.put(new Pair("azc", "net/minecraft/world/storage/ISaveHandler")); + mObInitMap.put(new Pair("brh", + "net/minecraft/client/resources/SimpleReloadableResourceManager$1")); + mObInitMap.put(new Pair("bfk", "net/minecraft/client/gui/inventory/CreativeCrafting")); + mObInitMap.put(new Pair("bjj", "net/minecraft/client/multiplayer/WorldClient$4")); + mObInitMap.put(new Pair("bni", "net/minecraft/client/renderer/entity/RenderCreeper")); + mObInitMap.put(new Pair("wa", "net/minecraft/village/Village$VillageAgressor")); + mObInitMap.put(new Pair("sb", "net/minecraft/entity/Entity$1")); + mObInitMap.put(new Pair("oc", "net/minecraft/server/management/PreYggdrasilConverter$3")); + mObInitMap.put(new Pair("kd", + "net/minecraft/network/ServerStatusResponse$PlayerCountData$Serializer")); + mObInitMap.put(new Pair("ge", "net/minecraft/network/play/server/S25PacketBlockBreakAnim")); + mObInitMap.put(new Pair("cf", "net/minecraft/command/SyntaxErrorException")); + mObInitMap.put(new Pair("any", "net/minecraft/block/BlockStoneSlab")); + mObInitMap.put(new Pair("ajz", "net/minecraft/block/BlockCocoa")); + mObInitMap.put(new Pair("azb", "net/minecraft/world/storage/WorldInfo$9")); + mObInitMap.put(new Pair("ov", "net/minecraft/network/rcon/RConConsoleSource")); + mObInitMap.put(new Pair("kw", "net/minecraft/init/Bootstrap$5$1")); + mObInitMap.put(new Pair("gx", "net/minecraft/network/play/server/S21PacketChunkData")); + mObInitMap.put(new Pair("cy", "net/minecraft/dispenser/PositionImpl")); + mObInitMap.put(new Pair("acp", "net/minecraft/item/ItemExpBottle")); + mObInitMap.put(new Pair("bop", "net/minecraft/client/renderer/entity/RenderPlayer")); + mObInitMap.put(new Pair("arw", "net/minecraft/world/gen/feature/WorldGenIceSpike")); + mObInitMap.put(new Pair("anx", "net/minecraft/block/BlockButtonStone")); + mObInitMap.put( + new Pair("avv", "net/minecraft/world/gen/structure/StructureVillagePieces$Hall")); + mObInitMap.put(new Pair("azu", "net/minecraft/util/MovingObjectPosition")); + mObInitMap.put(new Pair("bcs", "net/minecraft/client/gui/ScreenChatOptions")); + mObInitMap.put( + new Pair("bgr", "net/minecraft/client/gui/stream/GuiStreamUnavailable$Reason")); + mObInitMap.put(new Pair("bkq", "net/minecraft/client/particle/EffectRenderer$3")); + mObInitMap.put(new Pair("dm", "net/minecraft/nbt/NBTTagFloat")); + mObInitMap.put(new Pair("ws", "net/minecraft/entity/passive/EntitySquid")); + mObInitMap.put(new Pair("st", "net/minecraft/entity/item/EntityItemFrame")); + mObInitMap.put(new Pair("ou", "net/minecraft/network/rcon/RConUtils")); + mObInitMap.put(new Pair("ask", "net/minecraft/world/gen/feature/WorldGenSavannaTree")); + mObInitMap.put(new Pair("aol", "net/minecraft/block/BlockPressurePlateWeighted")); + mObInitMap.put(new Pair("akm", "net/minecraft/block/BlockDispenser")); + mObInitMap.put(new Pair("aco", "net/minecraft/item/ItemEnderPearl")); + mObInitMap.put(new Pair("agn", "net/minecraft/village/MerchantRecipe")); + mObInitMap.put(new Pair("awj", "net/minecraft/world/gen/NoiseGeneratorImproved")); + mObInitMap.put(new Pair("bdg", "net/minecraft/client/gui/GuiScreenAddServer")); + mObInitMap.put(new Pair("bsn", "net/minecraft/client/audio/MovingSoundMinecartRiding")); + mObInitMap.put(new Pair("boo", "net/minecraft/client/renderer/entity/RenderPig")); + mObInitMap.put(new Pair("xg", "net/minecraft/entity/effect/EntityWeatherEffect")); + mObInitMap.put(new Pair("th", "net/minecraft/entity/ai/attributes/IAttribute")); + mObInitMap.put(new Pair("pi", "net/minecraft/stats/StatBase$1")); + mObInitMap.put(new Pair("lj", "net/minecraft/server/MinecraftServer$3")); + mObInitMap + .put(new Pair("hk", "net/minecraft/network/play/server/S39PacketPlayerAbilities")); + mObInitMap.put(new Pair("dl", "net/minecraft/nbt/NBTTagEnd")); + mObInitMap.put(new Pair("ala", "net/minecraft/block/BlockFenceGate")); + mObInitMap.put(new Pair("adc", "net/minecraft/item/Item$ToolMaterial")); + mObInitMap.put(new Pair("ahb", "net/minecraft/world/World")); + mObInitMap.put(new Pair("btb", "net/minecraft/client/network/LanServerDetector$LanServer")); + mObInitMap.put(new Pair("bpc", "net/minecraft/client/renderer/entity/RenderWither")); + mObInitMap.put(new Pair("bdf", "net/minecraft/client/gui/GuiDisconnected")); + mObInitMap.put(new Pair("bhe", "net/minecraft/client/model/ModelBoat")); + mObInitMap.put(new Pair("bld", "net/minecraft/client/particle/EntityDiggingFX")); + mObInitMap.put(new Pair("xz", "net/minecraft/entity/monster/EntityCreeper")); + mObInitMap.put(new Pair("aa", "net/minecraft/command/ICommand")); + mObInitMap.put(new Pair("alt", "net/minecraft/block/BlockLeaves")); + mObInitMap.put(new Pair("adv", "net/minecraft/item/ItemSeedFood")); + mObInitMap.put(new Pair("ahu", "net/minecraft/world/biome/BiomeGenBase")); + mObInitMap.put(new Pair("btu", "net/minecraft/client/audio/ISoundEventAccessor")); + mObInitMap.put(new Pair("bpv", "net/minecraft/client/renderer/texture/Stitcher")); + mObInitMap.put(new Pair("bdy", "net/minecraft/client/gui/GuiSelectWorld$List")); + mObInitMap.put(new Pair("bhx", "net/minecraft/client/model/ModelSheep1")); + mObInitMap.put(new Pair("blw", "net/minecraft/client/renderer/EntityRenderer$3")); + mObInitMap.put(new Pair("mq", "net/minecraft/server/management/PlayerManager")); + mObInitMap.put(new Pair("ir", "net/minecraft/network/play/client/C01PacketChatMessage")); + mObInitMap.put(new Pair("es", "net/minecraft/network/EnumConnectionState$1")); + mObInitMap.put(new Pair("at", "net/minecraft/command/CommandGive")); + mObInitMap.put(new Pair("xy", "net/minecraft/entity/monster/EntityCaveSpider")); + mObInitMap.put(new Pair("aej", "net/minecraft/item/ItemLilyPad")); + mObInitMap.put(new Pair("aak", "net/minecraft/inventory/SlotFurnace")); + mObInitMap.put(new Pair("k", "net/minecraft/crash/CrashReportCategory")); + mObInitMap.put(new Pair("atq", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$NetherStalkRoom")); + mObInitMap.put(new Pair("apr", "net/minecraft/block/BlockPistonMoving")); + mObInitMap.put(new Pair("axp", "net/minecraft/world/gen/layer/GenLayer$2")); + mObInitMap.put(new Pair("ban", "net/minecraft/client/renderer/GLAllocation")); + mObInitMap + .put(new Pair("bem", "net/minecraft/client/gui/achievement/GuiStats$StatsGeneral")); + mObInitMap.put(new Pair("bil", "net/minecraft/client/model/ModelZombieVillager")); + mObInitMap.put(new Pair("bmk", + "net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher")); + mObInitMap.put(new Pair("bh", "net/minecraft/command/server/CommandSaveAll")); + mObInitMap.put(new Pair("ym", "net/minecraft/entity/monster/EntitySlime")); + mObInitMap.put(new Pair("un", "net/minecraft/entity/ai/EntityAIWatchClosest")); + mObInitMap.put(new Pair("mp", "net/minecraft/world/WorldManager")); + mObInitMap.put(new Pair("aqf", "net/minecraft/world/chunk/storage/ChunkLoader")); + mObInitMap.put(new Pair("amg", "net/minecraft/block/BlockNetherrack")); + mObInitMap.put(new Pair("aei", "net/minecraft/item/EnumAction")); + mObInitMap.put(new Pair("aih", "net/minecraft/world/biome/BiomeGenForest$2")); + mObInitMap.put(new Pair("aue", + "net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces$Feature")); + mObInitMap.put(new Pair("ayd", "net/minecraft/pathfinding/Path")); + mObInitMap.put(new Pair("bbb", "net/minecraft/client/Minecraft$5")); + mObInitMap + .put(new Pair("bfa", "net/minecraft/client/gui/inventory/GuiBeacon$CancelButton")); + mObInitMap.put(new Pair("buh", "net/minecraft/client/stream/ChatController$ChatListener")); + mObInitMap.put(new Pair("bqi", "net/minecraft/client/renderer/texture/TextureUtil")); + mObInitMap.put(new Pair("za", "net/minecraft/entity/player/EntityPlayer$EnumStatus")); + mObInitMap.put(new Pair("vb", "net/minecraft/entity/ai/EntityAILookIdle")); + mObInitMap.put(new Pair("rc", "net/minecraft/inventory/IInvBasic")); + mObInitMap.put(new Pair("nd", "net/minecraft/network/NetworkSystem$1")); + mObInitMap.put(new Pair("je", + "net/minecraft/network/play/client/C03PacketPlayer$C04PacketPlayerPosition")); + mObInitMap.put(new Pair("ff", "net/minecraft/util/ChatComponentStyle$1")); + mObInitMap.put(new Pair("aqy", "net/minecraft/world/gen/MapGenCavesHell")); + mObInitMap.put(new Pair("amz", "net/minecraft/block/BlockRedstoneOre")); + mObInitMap.put(new Pair("ayw", "net/minecraft/world/storage/WorldInfo$4")); + mObInitMap.put(new Pair("zt", "net/minecraft/inventory/AnimalChest")); + mObInitMap.put(new Pair("vu", "net/minecraft/entity/ai/EntityAITarget")); + mObInitMap.put(new Pair("rv", "net/minecraft/potion/Potion")); + mObInitMap.put( + new Pair("nw", "net/minecraft/server/management/PlayerProfileCache$Serializer")); + mObInitMap.put( + new Pair("jx", "net/minecraft/network/login/client/C01PacketEncryptionResponse")); + mObInitMap.put( + new Pair("fy", "net/minecraft/network/play/server/S2CPacketSpawnGlobalEntity")); + mObInitMap.put(new Pair("bz", "net/minecraft/command/CommandTime")); + mObInitMap.put(new Pair("ann", "net/minecraft/block/BlockSnow")); + mObInitMap.put(new Pair("abq", "net/minecraft/item/ItemCoal")); + mObInitMap.put(new Pair("afp", "net/minecraft/enchantment/EnchantmentArrowKnockback")); + mObInitMap.put(new Pair("ajo", "net/minecraft/block/IGrowable")); + mObInitMap.put(new Pair("brp", "net/minecraft/client/resources/I18n")); + mObInitMap.put(new Pair("ayv", "net/minecraft/world/storage/WorldInfo$3")); + mObInitMap.put(new Pair("bbt", "net/minecraft/util/Session$Type")); + mObInitMap.put(new Pair("bfs", "net/minecraft/client/gui/GuiHopper")); + mObInitMap.put(new Pair("bjr", "net/minecraft/client/network/OldServerPinger$1")); + mObInitMap.put(new Pair("bnq", "net/minecraft/client/renderer/entity/RenderFallingBlock")); + mObInitMap.put(new Pair("ok", "net/minecraft/server/management/UserListOpsEntry")); + mObInitMap.put(new Pair("kl", "net/minecraft/init/Bootstrap")); + mObInitMap.put(new Pair("gm", "net/minecraft/network/play/server/S2EPacketCloseWindow")); + mObInitMap.put(new Pair("cn", "net/minecraft/util/RegistryNamespacedDefaultedByKey")); + mObInitMap.put(new Pair("zs", "net/minecraft/inventory/Container")); + mObInitMap.put(new Pair("ace", "net/minecraft/creativetab/CreativeTabs$8")); + mObInitMap.put(new Pair("arl", "net/minecraft/world/gen/feature/WorldGenDesertWells")); + mObInitMap.put(new Pair("anm", "net/minecraft/block/BlockSnowBlock")); + mObInitMap.put(new Pair("avk", "net/minecraft/world/gen/structure/StructureComponent")); + mObInitMap.put(new Pair("bch", "net/minecraft/client/gui/GuiListExtended")); + mObInitMap.put(new Pair("bgg", "net/minecraft/client/resources/ResourcePackListEntry")); + mObInitMap.put(new Pair("bkf", "net/minecraft/client/particle/EntityFlameFX")); + mObInitMap.put(new Pair("boe", "net/minecraft/client/renderer/entity/RenderMagmaCube")); + mObInitMap.put(new Pair("wh", "net/minecraft/entity/passive/EntityCow")); + mObInitMap.put(new Pair("oj", "net/minecraft/server/management/UserListOps")); + mObInitMap.put(new Pair("aoa", "net/minecraft/block/BlockPane")); + mObInitMap.put(new Pair("akb", "net/minecraft/block/BlockCommandBlock")); + mObInitMap.put(new Pair("acd", "net/minecraft/creativetab/CreativeTabs$7")); + mObInitMap.put(new Pair("agc", "net/minecraft/enchantment/EnchantmentData")); + mObInitMap.put(new Pair("bsc", "net/minecraft/client/resources/data/FontMetadataSection")); + mObInitMap.put(new Pair("bod", "net/minecraft/client/renderer/entity/RenderSnowball")); + mObInitMap.put( + new Pair("net/minecraft/realms/RealmsBridge", "net/minecraft/realms/RealmsBridge")); + mObInitMap.put(new Pair("da", "net/minecraft/util/RegistrySimple")); + mObInitMap.put(new Pair("ass", "net/minecraft/world/gen/FlatGeneratorInfo")); + mObInitMap.put(new Pair("aot", "net/minecraft/tileentity/TileEntity$2")); + mObInitMap.put(new Pair("aku", "net/minecraft/block/BlockEndPortalFrame")); + mObInitMap.put(new Pair("acw", "net/minecraft/item/ItemFlintAndSteel")); + mObInitMap.put(new Pair("awr", "net/minecraft/block/material/MaterialTransparent")); + mObInitMap.put(new Pair("bsv", "net/minecraft/client/audio/ITickableSound")); + mObInitMap.put(new Pair("bow", "net/minecraft/client/renderer/entity/RenderSquid")); + mObInitMap.put(new Pair("bcz", "net/minecraft/client/gui/GuiCreateFlatWorld")); + mObInitMap.put(new Pair("bkx", "net/minecraft/client/particle/EntitySpellParticleFX")); + mObInitMap.put(new Pair("xo", "net/minecraft/entity/EntityMinecartCommandBlock$1")); + mObInitMap.put(new Pair("pq", "net/minecraft/stats/StatFileWriter")); + mObInitMap.put(new Pair("lr", "net/minecraft/server/gui/IUpdatePlayerListBox")); + mObInitMap.put(new Pair("hs", "net/minecraft/network/play/server/S07PacketRespawn")); + mObInitMap.put(new Pair("dt", "net/minecraft/nbt/NBTSizeTracker$1")); + mObInitMap.put(new Pair("aph", "net/minecraft/tileentity/IHopper")); + mObInitMap.put(new Pair("ali", "net/minecraft/block/BlockGravel")); + mObInitMap.put(new Pair("adk", "net/minecraft/item/ItemMinecart$1")); + mObInitMap.put(new Pair("ahj", "net/minecraft/world/WorldSettings")); + mObInitMap.put(new Pair("btj", "net/minecraft/client/audio/SoundManager")); + mObInitMap.put(new Pair("bpk", "net/minecraft/client/shader/Shader")); + mObInitMap.put(new Pair("bdn", "net/minecraft/client/gui/GuiOptions$1")); + mObInitMap.put(new Pair("bhm", "net/minecraft/client/model/ModelBiped")); + mObInitMap.put(new Pair("bll", "net/minecraft/client/entity/EntityOtherPlayerMP")); + mObInitMap.put(new Pair("mf", "net/minecraft/server/gui/StatsComponent")); + mObInitMap.put(new Pair("ig", "net/minecraft/network/play/server/S05PacketSpawnPosition")); + mObInitMap.put(new Pair("eh", "net/minecraft/network/NettyEncryptingDecoder")); + mObInitMap.put(new Pair("ai", "net/minecraft/command/CommandClearInventory")); + mObInitMap.put(new Pair("xn", "net/minecraft/entity/EntityMinecartCommandBlock")); + mObInitMap.put( + new Pair("atf", "net/minecraft/world/gen/structure/StructureNetherBridgePieces")); + mObInitMap.put(new Pair("apg", "net/minecraft/tileentity/TileEntityFurnace")); + mObInitMap.put(new Pair("axe", "net/minecraft/world/gen/layer/GenLayerBiomeEdge")); + mObInitMap.put(new Pair("bac", "net/minecraft/scoreboard/Scoreboard")); + mObInitMap.put(new Pair("beb", "net/minecraft/client/gui/GuiSnooper$List")); + mObInitMap.put(new Pair("bia", "net/minecraft/client/model/ModelSilverfish")); + mObInitMap.put(new Pair("yb", "net/minecraft/entity/monster/IMob")); + mObInitMap.put(new Pair("uc", "net/minecraft/entity/ai/EntityAIDoorInteract")); + mObInitMap.put(new Pair("qd", "net/minecraft/util/LongHashMap")); + mObInitMap.put(new Pair("s", "net/minecraft/util/ReportedException")); + mObInitMap.put(new Pair("net/minecraft/client/ClientBrandRetriever", + "net/minecraft/client/ClientBrandRetriever")); + mObInitMap.put(new Pair("apz", "net/minecraft/world/chunk/storage/ExtendedBlockStorage")); + mObInitMap.put( + new Pair("aty", "net/minecraft/world/gen/structure/MapGenScatteredFeature$Start")); + mObInitMap.put(new Pair("axx", "net/minecraft/world/gen/layer/GenLayerSmooth")); + mObInitMap.put(new Pair("bav", "net/minecraft/client/Minecraft$15")); + mObInitMap.put(new Pair("beu", "net/minecraft/client/gui/GuiKeyBindingList$CategoryEntry")); + mObInitMap.put(new Pair("yu", "net/minecraft/entity/INpc")); + mObInitMap.put(new Pair("uv", "net/minecraft/entity/ai/EntityAIOcelotAttack")); + mObInitMap.put(new Pair("qw", "net/minecraft/util/WeightedRandom$Item")); + mObInitMap.put(new Pair("mx", "net/minecraft/server/management/ItemInWorldManager")); + mObInitMap.put(new Pair("iy", "net/minecraft/network/play/client/C0DPacketCloseWindow")); + mObInitMap.put(new Pair("ez", "net/minecraft/util/MessageDeserializer")); + mObInitMap.put(new Pair("amo", "net/minecraft/block/BlockPackedIce")); + mObInitMap.put(new Pair("aip", "net/minecraft/world/biome/BiomeGenPlains")); + mObInitMap.put(new Pair("aum", + "net/minecraft/world/gen/structure/StructureStrongholdPieces$ChestCorridor")); + mObInitMap.put(new Pair("ayl", "net/minecraft/world/WorldSavedData")); + mObInitMap.put(new Pair("bup", "net/minecraft/client/stream/TwitchStream$1")); + mObInitMap.put(new Pair("bqq", "net/minecraft/client/resources/FallbackResourceManager")); + mObInitMap.put(new Pair("bet", "net/minecraft/client/gui/GuiKeyBindingList$1")); + mObInitMap.put(new Pair("bis", "net/minecraft/client/model/ModelBox")); + mObInitMap.put( + new Pair("bmr", "net/minecraft/client/renderer/tileentity/TileEntitySignRenderer")); + mObInitMap.put(new Pair("zi", "net/minecraft/entity/projectile/EntitySmallFireball")); + mObInitMap.put(new Pair("vj", "net/minecraft/entity/ai/EntityAIFollowGolem")); + mObInitMap.put(new Pair("rk", "net/minecraft/profiler/IPlayerUsage")); + mObInitMap.put(new Pair("nl", "net/minecraft/server/network/NetHandlerHandshakeTCP")); + mObInitMap.put(new Pair("jm", + "net/minecraft/network/play/client/C10PacketCreativeInventoryAction")); + mObInitMap.put(new Pair("fn", "net/minecraft/util/ChatStyle")); + mObInitMap.put(new Pair("bo", "net/minecraft/command/CommandSetPlayerTimeout")); + mObInitMap.put(new Pair("anc", "net/minecraft/block/BlockRedstoneTorch")); + mObInitMap.put(new Pair("abf", "net/minecraft/item/ItemAxe")); + mObInitMap.put(new Pair("afe", "net/minecraft/item/crafting/CraftingManager")); + mObInitMap.put(new Pair("ajd", "net/minecraft/block/BlockBasePressurePlate")); + mObInitMap.put(new Pair("bre", "net/minecraft/client/resources/ResourcePackRepository$2")); + mObInitMap.put(new Pair("ayk", "net/minecraft/world/storage/MapData$MapCoord")); + mObInitMap.put(new Pair("bfh", "net/minecraft/client/gui/GuiCommandBlock")); + mObInitMap.put(new Pair("bjg", "net/minecraft/client/multiplayer/WorldClient$1")); + mObInitMap.put(new Pair("bnf", "net/minecraft/client/renderer/entity/RenderCaveSpider")); + mObInitMap.put(new Pair("ka", "net/minecraft/network/status/server/S00PacketServerInfo")); + mObInitMap.put(new Pair("gb", "net/minecraft/network/play/server/S0CPacketSpawnPlayer")); + mObInitMap.put(new Pair("cc", "net/minecraft/command/server/CommandWhitelist")); + mObInitMap.put(new Pair("zh", "net/minecraft/entity/IProjectile")); + mObInitMap.put(new Pair("aby", "net/minecraft/creativetab/CreativeTabs$2")); + mObInitMap.put(new Pair("ara", "net/minecraft/world/gen/ChunkProviderEnd")); + mObInitMap.put(new Pair("anb", "net/minecraft/block/BlockRedstoneLight")); + mObInitMap.put( + new Pair("bjz", "net/minecraft/client/particle/EntityEnchantmentTableParticleFX")); + mObInitMap.put(new Pair("bny", "net/minecraft/client/renderer/entity/RenderItem")); + mObInitMap.put(new Pair("cv", "net/minecraft/dispenser/ILocation")); + mObInitMap.put(new Pair("anu", "net/minecraft/block/BlockStem")); + mObInitMap.put(new Pair("afw", "net/minecraft/enchantment/EnchantmentHelper$1")); + mObInitMap.put(new Pair("ajv", "net/minecraft/block/BlockCarrot")); + mObInitMap.put( + new Pair("avs", "net/minecraft/world/gen/structure/StructureVillagePieces$Field2")); + mObInitMap.put(new Pair("azr", "net/minecraft/world/storage/ThreadedFileIOBase")); + mObInitMap.put(new Pair("bcp", "net/minecraft/client/gui/GuiButtonRealmsProxy")); + mObInitMap.put(new Pair("brw", "net/minecraft/client/resources/data/IMetadataSerializer")); + mObInitMap.put(new Pair("bnx", "net/minecraft/client/renderer/tileentity/RenderItemFrame")); + mObInitMap.put(new Pair("wp", "net/minecraft/entity/passive/EntitySheep")); + mObInitMap.put(new Pair("sq", "net/minecraft/entity/item/EntityXPOrb")); + mObInitMap.put(new Pair("or", "net/minecraft/server/management/UserListWhitelist")); + mObInitMap.put(new Pair("ks", "net/minecraft/init/Bootstrap$2")); + mObInitMap.put(new Pair("gt", "net/minecraft/network/play/server/S19PacketEntityStatus")); + mObInitMap.put(new Pair("cu", "net/minecraft/dispenser/ILocatableSource")); + mObInitMap.put(new Pair("ash", "net/minecraft/world/gen/feature/WorldGenReed")); + mObInitMap.put(new Pair("aoi", "net/minecraft/block/BlockWall")); + mObInitMap.put(new Pair("akj", "net/minecraft/block/BlockRedstoneDiode")); + mObInitMap.put(new Pair("acl", "net/minecraft/item/ItemEmptyMap")); + mObInitMap.put(new Pair("agk", "net/minecraft/enchantment/EnchantmentUntouching")); + mObInitMap.put(new Pair("bsk", "net/minecraft/client/audio/PositionedSound")); + mObInitMap.put(new Pair("bol", "net/minecraft/client/renderer/entity/RenderMooshroom")); + mObInitMap.put( + new Pair("bgn", "net/minecraft/client/gui/stream/GuiIngestServers$ServerList")); + mObInitMap.put(new Pair("bkm", "net/minecraft/client/particle/EntityFX")); + mObInitMap.put(new Pair("xd", "net/minecraft/entity/boss/EntityWither$1")); + mObInitMap.put(new Pair("te", "net/minecraft/entity/DataWatcher")); + mObInitMap.put(new Pair("pf", "net/minecraft/stats/StatCrafting")); + mObInitMap.put(new Pair("lg", "net/minecraft/server/ServerEula")); + mObInitMap.put(new Pair("hh", + "net/minecraft/network/play/server/S14PacketEntity$S17PacketEntityLookMove")); + mObInitMap.put(new Pair("di", "net/minecraft/nbt/NBTTagCompound$1")); + mObInitMap.put(new Pair("bdc", "net/minecraft/client/gui/GuiGameOver")); + mObInitMap.put(new Pair("bla", "net/minecraft/client/particle/EntityAuraFX")); + mObInitMap.put(new Pair("py", "net/minecraft/server/management/LowerStringMap")); + mObInitMap.put(new Pair("lz", "net/minecraft/server/gui/MinecraftServerGui$1")); + mObInitMap.put(new Pair("ads", "net/minecraft/item/ItemRedstone")); + mObInitMap.put(new Pair("bps", "net/minecraft/client/renderer/ThreadDownloadImageData$1")); + mObInitMap.put(new Pair("asz", + "net/minecraft/world/gen/structure/StructureMineshaftPieces$Cross")); + mObInitMap.put(new Pair("awy", "net/minecraft/world/gen/layer/GenLayerEdge")); + mObInitMap.put(new Pair("bdv", "net/minecraft/client/gui/GuiRenameWorld")); + mObInitMap.put(new Pair("bhu", "net/minecraft/client/model/ModelPig")); + mObInitMap.put(new Pair("blt", "net/minecraft/client/renderer/EntityRenderer")); + mObInitMap.put(new Pair("ep", "net/minecraft/network/EnumConnectionState$2")); + mObInitMap.put(new Pair("aq", "net/minecraft/command/CommandDifficulty")); + mObInitMap.put(new Pair("xv", "net/minecraft/entity/item/EntityMinecartTNT")); + mObInitMap.put(new Pair("tw", "net/minecraft/entity/ai/EntityAIAvoidEntity")); + mObInitMap.put(new Pair("px", "net/minecraft/util/HttpUtil$DownloadListener")); + mObInitMap.put(new Pair("h", "net/minecraft/crash/CrashReport$6")); + mObInitMap.put(new Pair("atn", + "net/minecraft/world/gen/structure/StructureNetherBridgePieces$Corridor")); + mObInitMap.put(new Pair("apo", "net/minecraft/tileentity/TileEntityEndPortal")); + mObInitMap.put(new Pair("alp", "net/minecraft/block/BlockIce")); + mObInitMap.put(new Pair("adr", "net/minecraft/item/ItemRecord")); + mObInitMap.put(new Pair("ahq", "net/minecraft/world/Teleporter$PortalPosition")); + mObInitMap.put(new Pair("axm", "net/minecraft/world/gen/layer/GenLayerIsland")); + mObInitMap.put(new Pair("bak", "net/minecraft/client/gui/ChatLine")); + mObInitMap.put(new Pair("bej", "net/minecraft/client/gui/achievement/GuiStats")); + mObInitMap.put(new Pair("btq", "net/minecraft/client/audio/SoundHandler$1")); + mObInitMap.put(new Pair("bpr", "net/minecraft/client/renderer/ThreadDownloadImageData")); + mObInitMap.put(new Pair("yj", "net/minecraft/entity/SharedMonsterAttributes")); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/Preloader_GT_OreDict.java b/src/main/java/gtPlusPlus/preloader/Preloader_GT_OreDict.java new file mode 100644 index 0000000000..8e7001903d --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/Preloader_GT_OreDict.java @@ -0,0 +1,173 @@ +package gtPlusPlus.preloader; + +import org.apache.logging.log4j.Level; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; + +import net.minecraft.item.ItemStack; + +import gregtech.common.items.GT_MetaGenerated_Item_01; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class Preloader_GT_OreDict { + + public static boolean shouldPreventRegistration(final String string, final ItemStack bannedItem) { + + if (bannedItem == null) { + return false; + } + else if (!CORE_Preloader.enableOldGTcircuits && !LoadedMods.Mekanism){ + return false; + } + + try { + if (CORE_Preloader.enableOldGTcircuits){ + if ((bannedItem != null) && ItemUtils.getModId(bannedItem).toLowerCase().equals("gregtech")){ + final int damageValue = bannedItem.getItemDamage() - 32000; + if (bannedItem.getItem() instanceof GT_MetaGenerated_Item_01) { // 700-720 + if ((damageValue >= 700) && (damageValue <= 720)) { + return true; + } + } + else { + if (ReflectionUtils.doesClassExist("gregtech.common.items.GT_MetaGenerated_Item_03")) { // 6/11/12/14/16/20/30-57/69-73/79-96 + final Class MetaItem03 = ReflectionUtils.getClass("gregtech.common.items.GT_MetaGenerated_Item_03"); + if (isInstanceOf(MetaItem03, bannedItem.getItem())) { + if ((damageValue == 6) || (damageValue == 7) || (damageValue == 11) || (damageValue == 12) || (damageValue == 14) + || (damageValue == 16) || (damageValue == 20) || (damageValue == 21) || (damageValue == 22)) { + return true; + } + else if ((damageValue >= 30) && (damageValue <= 57)) { + return true; + } + else if ((damageValue >= 69) && (damageValue <= 73)) { + return true; + } + else if ((damageValue >= 78) && (damageValue <= 96)) { + return true; + } + } + } + } + } + } + + //Mekanism Support - Let's not make Mek Osmium useful in GT anymore. + if ((((bannedItem != null) && !LoadedMods.RedTech && (ItemUtils.getModId(bannedItem).toLowerCase().equals("mekanism"))) || (LoadedMods.Mekanism)) && !LoadedMods.RedTech){ + //Circuits + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemControlCircuit")) { + final Class MekCircuit = ReflectionUtils.getClass("mekanism.common.item.ItemControlCircuit"); + if (isInstanceOf(MekCircuit, bannedItem.getItem())) { + for (int r=0;r<4;r++){ + if (bannedItem.getItemDamage() == r){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + } + //Ingots + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemIngot")) { + final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemIngot"); + if (isInstanceOf(MekIngot, bannedItem.getItem())) { + if (bannedItem.getItemDamage() == 1){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + //Dirty Dust + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemDirtyDust")) { + final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemDirtyDust"); + if (isInstanceOf(MekIngot, bannedItem.getItem())) { + if (bannedItem.getItemDamage() == 2){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + //Dust + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemDust")) { + final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemDust"); + if (isInstanceOf(MekIngot, bannedItem.getItem())) { + if (bannedItem.getItemDamage() == 2){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + //Crystal + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemCrystal")) { + final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemCrystal"); + if (isInstanceOf(MekIngot, bannedItem.getItem())) { + if (bannedItem.getItemDamage() == 2){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + //Shard + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemShard")) { + final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemShard"); + if (isInstanceOf(MekIngot, bannedItem.getItem())) { + if (bannedItem.getItemDamage() == 2){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + //Clump + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemClump")) { + final Class MekIngot = ReflectionUtils.getClass("mekanism.common.item.ItemClump"); + if (isInstanceOf(MekIngot, bannedItem.getItem())) { + if (bannedItem.getItemDamage() == 2){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + //Ores + if (ReflectionUtils.doesClassExist("mekanism.common.item.ItemBlockOre")) { + final Class MekOre = ReflectionUtils.getClass("mekanism.common.item.ItemBlockOre"); + if (isInstanceOf(MekOre, bannedItem.getItem()) || (bannedItem == ItemUtils.simpleMetaStack("Mekanism:OreBlock", 0, 1))) { + if (bannedItem.getItemDamage() == 0){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing %s from the OreDictionary to balance Mekanism.", bannedItem.getDisplayName()); + return true; + } + } + } + } + + } catch (final Throwable e) { + if (CORE.ConfigSwitches.showHiddenNEIItems) { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "A mod tried to register an invalid item with the OreDictionary."); + if (bannedItem != null){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Please report this issue to the authors of %s", ItemUtils.getModId(bannedItem)); + try { + if (bannedItem.getItemDamage() <= Short.MAX_VALUE-1) { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Item was not null, but still invalidly registering: %s", bannedItem.getDisplayName() != null ? bannedItem.getDisplayName() : "INVALID ITEM FOUND"); + } + else { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Item was not null, but still invalidly registering: %s", "Found Wildcard item that is being registered too early."); + } + } + catch (Exception h) { + h.printStackTrace(); + } + } + } + //FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "%s", e.getMessage()); + } + return false; + } + + // Simplification of Life. + private static boolean isInstanceOf(final Class clazz, final Object obj) { + return clazz.isInstance(obj); + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java b/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java new file mode 100644 index 0000000000..84f0fab012 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/Preloader_Logger.java @@ -0,0 +1,60 @@ +package gtPlusPlus.preloader; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class Preloader_Logger { + + private Preloader_Logger() { + + } + + // Logging Functions + public static final Logger MODLOGGER = Preloader_Logger.makeLogger(); + + // Generate GT++ Logger + public static Logger makeLogger() { + final Logger gtPlusPlusLogger = LogManager.getLogger("GT++ ASM"); + return gtPlusPlusLogger; + } + + public static final org.apache.logging.log4j.Logger getLogger(){ + return MODLOGGER; + } + + // Non-Dev Comments + + public static void INFO(final String s, final String s2) { + INFO(s); + INFO(s2); + } + + public static void INFO(final String s) { + MODLOGGER.info(s); + } + + // Developer Comments + public static void WARNING(final String s) { + MODLOGGER.warn(s); + } + + // Errors + public static void ERROR(final String s) { + MODLOGGER.fatal(s); + } + + public static void LOG(String string, Level info, String string2) { + if (info.equals(Level.INFO)) { + INFO("["+string+"] "+string2); + } + if (info.equals(Level.WARN)) { + WARNING("["+string+"] "+string2); + } + if (info.equals(Level.ERROR)) { + ERROR("["+string+"] "+string2); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/AsmConfig.java b/src/main/java/gtPlusPlus/preloader/asm/AsmConfig.java new file mode 100644 index 0000000000..a5981b15d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/AsmConfig.java @@ -0,0 +1,211 @@ +package gtPlusPlus.preloader.asm; + +import cpw.mods.fml.common.FMLLog; +import gtPlusPlus.preloader.Preloader_Logger; + +import java.io.File; +import java.util.ArrayList; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; +import org.apache.logging.log4j.Level; + +public class AsmConfig { + + public static boolean loaded; + public static Configuration config; + + public static boolean enableOreDictPatch; + public static boolean enableTiConFluidLighting; + public static boolean enableGtTooltipFix; + public static boolean enableGtNbtFix; + public static boolean enableGtCharcoalPitFix; + public static boolean enableChunkDebugging; + public static boolean enableCofhPatch; + public static boolean enableGcFuelChanges; + public static boolean enableRcFlowFix; + public static int maxRailcraftTankProcessVolume; + public static int maxRailcraftFluidLoaderFlow; + public static int maxRailcraftFluidUnloaderFlow; + public static boolean enableRcItemDupeFix; + public static boolean enableTcAspectSafety; + public static boolean enabledLwjglKeybindingFix; + public static boolean enabledFixEntitySetHealth; + public static boolean enableThaumicTinkererRepairFix; + + public static boolean disableAllLogging; + public static boolean debugMode; + + public AsmConfig(File file) { + if (!loaded) { + config = new Configuration(file); + syncConfig(true); + } + + } + + public static void syncConfig(boolean load) { + ArrayList propOrder = new ArrayList(); + ArrayList propOrderDebug = new ArrayList(); + + try { + if (!config.isChild && load) { + config.load(); + } + + Property prop; + + //Debug + prop = config.get("debug", "disableAllLogging", false); + prop.comment = "Disables ALL logging from GT++."; + prop.setLanguageKey("gtpp.disableAllLogging").setRequiresMcRestart(false); + disableAllLogging = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "debugMode", false); + prop.comment = "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)"; + prop.setLanguageKey("gtpp.debugMode").setRequiresMcRestart(false); + debugMode = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "enabledFixEntitySetHealth", false); + prop.comment = "Enable/Disable entity setHealth() fix."; + prop.setLanguageKey("gtpp.enabledFixEntitySetHealth").setRequiresMcRestart(true); + enabledFixEntitySetHealth = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "enableChunkDebugging", false); + prop.comment = "Enable/Disable Chunk Debugging Features, Must Be enabled on Client and Server."; + prop.setLanguageKey("gtpp.enableChunkDebugging").setRequiresMcRestart(true); + enableChunkDebugging = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "enableGtNbtFix", true); + prop.comment = "Enable/Disable GT NBT Persistency Fix"; + prop.setLanguageKey("gtpp.enableGtNbtFix").setRequiresMcRestart(true); + enableGtNbtFix = prop.getBoolean(true); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "enableCofhPatch", false); + prop.comment = "Enable/Disable COFH OreDictionaryArbiter Patch (Useful for Development)"; + prop.setLanguageKey("gtpp.enableCofhPatch").setRequiresMcRestart(true); + enableCofhPatch = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "enableOreDictPatch", false); + prop.comment = "Enable/Disable Forge OreDictionary Patch (Useful for Development)"; + prop.setLanguageKey("gtpp.enableOreDictPatch").setRequiresMcRestart(true); + enableOreDictPatch = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + prop = config.get("debug", "enableThaumicTinkererRepairFix", false); + prop.comment = "Enable/Disable Patch for Thaumic Repairer"; + prop.setLanguageKey("gtpp.enableThaumicTinkererRepairFix").setRequiresMcRestart(true); + enableThaumicTinkererRepairFix = prop.getBoolean(false); + propOrderDebug.add(prop.getName()); + + + + + + + //General Features + prop = config.get("general", "enableTiConFluidLighting", true); + prop.comment = "Enable/Disable Brightness Visuals for Tinkers Fluids, only required on the Client."; + prop.setLanguageKey("gtpp.enableTiConFluidLighting").setRequiresMcRestart(true); + enableTiConFluidLighting = prop.getBoolean(true); + propOrder.add(prop.getName()); + + prop = config.get("general", "enabledLwjglKeybindingFix", true); + prop.comment = "Prevents the game crashing from having invalid keybinds. https://github.com/alkcorp/GTplusplus/issues/544"; + prop.setLanguageKey("gtpp.enabledLwjglKeybindingFix").setRequiresMcRestart(true); + enabledLwjglKeybindingFix = prop.getBoolean(true); + propOrder.add(prop.getName()); + + prop = config.get("general", "enableGtTooltipFix", true); + prop.comment = "Enable/Disable Custom GT Tooltips"; + prop.setLanguageKey("gtpp.enableGtTooltipFix").setRequiresMcRestart(true); + enableGtTooltipFix = prop.getBoolean(true); + propOrder.add(prop.getName()); + + + + prop = config.get("general", "enableGtCharcoalPitFix", true); + prop.comment = "Makes the Charcoal Pile Igniter work better."; + prop.setLanguageKey("gtpp.enableGtCharcoalPitFix").setRequiresMcRestart(true); + enableGtCharcoalPitFix = prop.getBoolean(true); + propOrder.add(prop.getName()); + + prop = config.get("general", "enableGcFuelChanges", true); + prop.comment = "Enable/Disable changes to Galacticraft Rocket Fuels."; + prop.setLanguageKey("gtpp.enableGcFuelChanges").setRequiresMcRestart(true); + //Disabled because Broken + //enableGcFuelChanges = prop.getBoolean(true); + enableGcFuelChanges = false; + propOrder.add(prop.getName()); + + + //Railcraft Tank fix + prop = config.get("general", "enableRcFlowFix", true); + prop.comment = "Allows Custom max IO rates on RC tanks"; + prop.setLanguageKey("gtpp.enableRcFlowFix").setRequiresMcRestart(true); + enableRcFlowFix = prop.getBoolean(true); + propOrder.add(prop.getName()); + + prop = config.get("general", "maxRailcraftTankProcessVolume", 4000); + prop.comment = "Max IO for RC fluid tanks (Not Carts). 'enableRcFlowFix' Must be enabled."; + prop.setLanguageKey("gtpp.maxRailcraftTankProcessVolume").setRequiresMcRestart(true); + maxRailcraftTankProcessVolume = prop.getInt(4000); + propOrder.add(prop.getName()); + + // Railcraft Loader Max flowrate + prop = config.get("general", "maxRailcraftFluidLoaderFlow", 20); + prop.comment = "Max Output rate for RC Fluid Loaders"; + prop.setLanguageKey("gtpp.maxRailcraftFluidLoaderFlow").setRequiresMcRestart(true); + maxRailcraftFluidLoaderFlow = prop.getInt(20); + propOrder.add(prop.getName()); + + // Railcraft Unloader Max flowrate + prop = config.get("general", "maxRailcraftFluidUnloaderFlow", 80); + prop.comment = "Max Output rate for RC Fluid Unloaders"; + prop.setLanguageKey("gtpp.maxRailcraftFluidUnloaderFlow").setRequiresMcRestart(true); + maxRailcraftFluidUnloaderFlow = prop.getInt(80); + propOrder.add(prop.getName()); + + //Railcraft Dupe Fix + prop = config.get("general", "enableRcItemDupeFix", true); + prop.comment = "Fixes possible negative itemstacks"; + prop.setLanguageKey("gtpp.enableRcItemDupeFix").setRequiresMcRestart(true); + enableRcItemDupeFix = prop.getBoolean(true); + propOrder.add(prop.getName()); + + + //TC Aspect Safety + prop = config.get("general", "enableTcAspectSafety", true); + prop.comment = "Fixes small oversights in Thaumcraft 4."; + prop.setLanguageKey("gtpp.enableTcAspectSafety").setRequiresMcRestart(true); + enableTcAspectSafety = prop.getBoolean(true); + propOrder.add(prop.getName()); + + + config.setCategoryPropertyOrder("general", propOrder); + config.setCategoryPropertyOrder("debug", propOrderDebug); + if (config.hasChanged()) { + config.save(); + } + + Preloader_Logger.INFO("Chunk Debugging - Enabled: "+enableChunkDebugging); + Preloader_Logger.INFO("Gt Nbt Fix - Enabled: "+enableGtNbtFix); + Preloader_Logger.INFO("TiCon Fluid Lighting - Enabled: "+enableTiConFluidLighting); + Preloader_Logger.INFO("Gt Tooltip Fix - Enabled: "+enableGtTooltipFix); + Preloader_Logger.INFO("COFH Patch - Enabled: "+enableCofhPatch); + Preloader_Logger.INFO("Gc Fuel Changes Patch - Enabled: "+enableGcFuelChanges); + Preloader_Logger.INFO("Railcraft Fluid Flow Patch - Enabled: "+enableRcFlowFix); + Preloader_Logger.INFO("Thaumcraft Aspect Safety Patch - Enabled: "+enableTcAspectSafety); + Preloader_Logger.INFO("Fix bad usage of EntityLivingBase.setHealth Patch - Enabled: "+enabledFixEntitySetHealth); + + } catch (Exception var3) { + FMLLog.log(Level.ERROR, var3, "GT++ ASM had a problem loading it's config", new Object[0]); + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/preloader/asm/ClassesToTransform.java b/src/main/java/gtPlusPlus/preloader/asm/ClassesToTransform.java new file mode 100644 index 0000000000..1dcbff439f --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/ClassesToTransform.java @@ -0,0 +1,74 @@ +package gtPlusPlus.preloader.asm; + +public class ClassesToTransform { + + + public static final String LWJGL_KEYBOARD = "org.lwjgl.input.Keyboard"; + + + public static final String MINECRAFT_GAMESETTINGS = "net.minecraft.client.settings.GameSettings"; + public static final String MINECRAFT_GAMESETTINGS_OBF = "bbj"; + + + public static final String FORGE_CHUNK_MANAGER = "net.minecraftforge.common.ForgeChunkManager"; + public static final String FORGE_ORE_DICTIONARY = "net.minecraftforge.oredict.OreDictionary"; + + + public static final String COFH_ORE_DICTIONARY_ARBITER = "cofh.core.util.oredict.OreDictionaryArbiter"; + + + public static final String TINKERS_FLUID_BLOCK = "tconstruct.smeltery.blocks.TConstructFluid"; + + + public static final String RAILCRAFT_FLUID_HELPER = "mods.railcraft.common.fluids.FluidHelper"; + public static final String RAILCRAFT_TILE_FLUID_LOADER = "mods.railcraft.common.blocks.machine.gamma.TileFluidLoader"; + public static final String RAILCRAFT_INVENTORY_TOOLS = "mods.railcraft.common.util.inventory.InvTools"; + + + public static final String GALACTICRAFT_FLUID_UTILS = "micdoodle8.mods.galacticraft.core.util.FluidUtil"; + public static final String GALACTICRAFT_TILE_ENTITY_FUEL_LOADER = "micdoodle8.mods.galacticraft.core.tile.TileEntityFuelLoader"; + public static final String GALACTICRAFT_ENTITY_AUTO_ROCKET = "micdoodle8.mods.galacticraft.api.prefab.entity.EntityAutoRocket"; + + + public static final String GT_UTILITY = "gregtech.api.util.GT_Utility"; + public static final String GT_ACHIEVEMENTS = "gregtech.loaders.misc.GT_Achievements"; + public static final String GT_CLIENT_PROXY = "gregtech.common.GT_Client"; + public static final String GT_PACKET_TILE_ENTITY = "gregtech.api.net.GT_Packet_TileEntity"; + public static final String GT_BASE_META_TILE_ENTITY = "gregtech.api.metatileentity.BaseMetaTileEntity"; + public static final String GT_MTE_CHARCOAL_PIT = "gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Charcoal_Pit"; + public static final String GT_ITEM_MACHINES = "gregtech.common.blocks.GT_Item_Machines"; + public static final String GT_METAGENERATED_TOOL = "gregtech.api.items.GT_MetaGenerated_Tool"; + public static final String GT_BLOCK_MACHINES = "gregtech.common.blocks.GT_Block_Machines"; + public static final String GT_MTE_HATCH_ENERGY = "gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy"; + public static final String GT_METAPIPE_ITEM = "gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Item"; + public static final String GT_METAPIPE_FLUID = "gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid"; + public static final String GT_METAPIPE_FRAME = "gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Frame"; + + + public static final String GTPP_MTE_HATCH_RTG = "gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG"; + + + public static final String THAUMCRAFT_ITEM_WISP_ESSENCE = "thaumcraft.common.items.ItemWispEssence"; + public static final String THAUMCRAFT_CRAFTING_MANAGER = "thaumcraft.common.lib.crafting.ThaumcraftCraftingManager"; + public static final String THAUMCRAFT_TILE_ALCHEMY_FURNACE = "thaumcraft.common.tiles.TileAlchemyFurnace"; + public static final String THAUMICTINKERER_TILE_REPAIRER = "thaumic.tinkerer.common.block.tile.TileRepairer"; + + public static final String IC2_ITEM_ARMOUR_HAZMAT = "ic2.core.item.armor.ItemArmorHazmat"; + public static final String IC2_BLOCK_BASE_TILE_ENTITY = "ic2.core.block.BlockTileEntity"; + public static final String IC2_BLOCK_MACHINE1 = "ic2.core.block.machine.BlockMachine"; + public static final String IC2_BLOCK_MACHINE2 = "ic2.core.block.machine.BlockMachine2"; + public static final String IC2_BLOCK_MACHINE3 = "ic2.core.block.machine.BlockMachine3"; + public static final String IC2_BLOCK_KINETIC_GENERATOR = "ic2.core.block.kineticgenerator.block.BlockKineticGenerator"; + public static final String IC2_BLOCK_HEAT_GENERATOR = "ic2.core.block.heatgenerator.block.BlockHeatGenerator"; + public static final String IC2_BLOCK_GENERATOR = "ic2.core.block.generator.block.BlockGenerator"; + public static final String IC2_BLOCK_REACTOR_ACCESS_HATCH = "ic2.core.block.reactor.block.BlockReactorAccessHatch"; + public static final String IC2_BLOCK_REACTOR_CHAMBER = "ic2.core.block.reactor.block.BlockReactorChamber"; + public static final String IC2_BLOCK_REACTOR_FLUID_PORT = "ic2.core.block.reactor.block.BlockReactorFluidPort"; + public static final String IC2_BLOCK_REACTOR_REDSTONE_PORT = "ic2.core.block.reactor.block.BlockReactorRedstonePort"; + public static final String IC2_BLOCK_REACTOR_VESSEL = "ic2.core.block.reactor.block.BlockReactorVessel"; + public static final String IC2_BLOCK_PERSONAL = "ic2.core.block.personal.BlockPersonal.class"; + public static final String IC2_BLOCK_CHARGEPAD = "ic2.core.block.wiring.BlockChargepad.class"; + public static final String IC2_BLOCK_ELECTRIC = "ic2.core.block.wiring.BlockElectric.class"; + public static final String IC2_BLOCK_LUMINATOR = "ic2.core.block.wiring.BlockLuminator.class"; + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java b/src/main/java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java new file mode 100644 index 0000000000..2a0082754a --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java @@ -0,0 +1,95 @@ +package gtPlusPlus.preloader.asm; + +import java.io.File; +import java.util.Arrays; + +import com.google.common.eventbus.EventBus; +import com.google.common.eventbus.Subscribe; + +import cpw.mods.fml.common.DummyModContainer; +import cpw.mods.fml.common.LoadController; +import cpw.mods.fml.common.ModMetadata; +import cpw.mods.fml.common.event.FMLConstructionEvent; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.preloader.Preloader_Logger; +import net.minecraftforge.common.config.Configuration; + +public class Preloader_DummyContainer extends DummyModContainer { + + public Preloader_DummyContainer() { + super(new ModMetadata()); + ModMetadata meta = getMetadata(); + meta.modId = CORE_Preloader.MODID; + meta.name = CORE_Preloader.NAME; + meta.version = CORE_Preloader.VERSION; + meta.credits = "Roll Credits ..."; + meta.authorList = Arrays.asList("Alkalus"); + meta.description = ""; + meta.url = ""; + meta.updateUrl = ""; + meta.screenshots = new String[0]; + meta.logoFile = ""; + //meta.dependencies = (List) CORE_Preloader.DEPENDENCIES; + Preloader_Logger.INFO("Initializing DummyModContainer"); + + } + + @Override + public boolean registerBus(EventBus bus, LoadController controller) { + bus.register(this); + return true; + } + + @Subscribe + public void modConstruction(FMLConstructionEvent evt){ + Preloader_Logger.INFO("Constructing DummyModContainer"); + + } + + @Subscribe + public void preInit(FMLPreInitializationEvent event) { + Preloader_Logger.INFO("Loading " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION); + // Handle GT++ Config + handleConfigFile(event); + } + + @Subscribe + public void init(FMLInitializationEvent evt) { + Preloader_Logger.INFO("Begin resource allocation for " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION); + + } + + @Subscribe + public void postInit(FMLPostInitializationEvent evt) { + Preloader_Logger.INFO("Finished loading."); + } + + public static void handleConfigFile(final FMLPreInitializationEvent event) { + final Configuration config = new Configuration(new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); + config.load(); + + //BGM Watchdog + CORE_Preloader.enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); + + // Circuits + CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times."); + } + + public static boolean getConfig(){ + final Configuration config = new Configuration( new File(gtPlusPlus.preloader.CORE_Preloader.MC_DIR, "config/GTplusplus/GTplusplus.cfg")); + if (config != null){ + config.load(); + // Circuits + CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, "Restores circuits and their recipes from Pre-5.09.28 times."); + CORE_Preloader.enableWatchdogBGM = config.getInt("enableWatchdogBGM", "features", 0, 0, Short.MAX_VALUE, "Set to a value greater than 0 to reduce the ticks taken to delay between BGM tracks. Acceptable Values are 1-32767, where 0 is disabled. Vanilla Uses 12,000 & 24,000. 200 is 10s."); + + Preloader_Logger.INFO("Loaded the configuration file."); + return true; + } + Preloader_Logger.INFO("Failed loading the configuration file."); + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java b/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java new file mode 100644 index 0000000000..22568e6de7 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java @@ -0,0 +1,84 @@ +package gtPlusPlus.preloader.asm; + +import java.io.File; +import java.text.NumberFormat; +import java.util.Locale; +import java.util.Map; + +import cpw.mods.fml.relauncher.IFMLLoadingPlugin; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.preloader.Preloader_Logger; +import gtPlusPlus.preloader.asm.transformers.Preloader_Transformer_Handler; +import net.minecraft.launchwrapper.Launch; + +@SortingIndex(10097) +@MCVersion(value = "1.7.10") +@IFMLLoadingPlugin.TransformerExclusions("gtPlusPlus.preloader") +@IFMLLoadingPlugin.Name(CORE_Preloader.NAME) +public class Preloader_FMLLoadingPlugin implements IFMLLoadingPlugin { + + //-Dfml.coreMods.load=gtPlusPlus.preloader.asm.Preloader_FMLLoadingPlugin + + static { + Preloader_Logger.INFO("Initializing IFMLLoadingPlugin"); + } + + @Override + public String getAccessTransformerClass() { + return null; + } + + @Override + public String[] getASMTransformerClass() { + //This will return the name of the class + return new String[]{ + Preloader_Transformer_Handler.class.getName() + }; + } + + @Override + public String getModContainerClass() { + //This is the name of our dummy container + return Preloader_DummyContainer.class.getName(); + } + + @Override + public String getSetupClass() { + //return Preloader_SetupClass.class.getName(); + return null; + } + + @Override + public void injectData(Map data) { + boolean isDeObf = (boolean) data.get("runtimeDeobfuscationEnabled"); + File mcDir = (File) data.get("mcLocation"); + //LaunchClassLoader classLoader = (LaunchClassLoader) data.get("classLoader"); + File coremodLocation = (File) data.get("coremodLocation"); + String deobfuscationFileName = (String) data.get("deobfuscationFileName"); + if (mcDir != null && mcDir.exists()) { + CORE_Preloader.setMinecraftDirectory(mcDir); + Preloader_Logger.INFO("Set McDir via Preloader_SetupClass"); + } + Preloader_Logger.INFO("runtimeDeobfuscationEnabled: "+isDeObf); + Preloader_Logger.INFO("deobfuscationFileName: "+deobfuscationFileName); + if (coremodLocation != null && coremodLocation.exists()) { + Preloader_Logger.INFO("coremodLocation: "+coremodLocation.getPath()); + } + else { + Preloader_Logger.INFO("coremodLocation: null"); + Preloader_Logger.ERROR("Unable to determine CoreMod location"); + } + CORE_Preloader.DEV_ENVIRONMENT = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); + CORE_Preloader.DEBUG_MODE = AsmConfig.debugMode; + Preloader_Logger.INFO("Running on "+gtPlusPlus.preloader.CORE_Preloader.JAVA_VERSION+" | Development Environment: "+CORE_Preloader.DEV_ENVIRONMENT); + Locale aDefaultLocale = Locale.getDefault(); + NumberFormat aFormat = NumberFormat.getInstance(); + Locale aDisplayLocale = (Locale) ReflectionUtils.getFieldValue(ReflectionUtils.getField(Locale.class, "defaultDisplayLocale")); + Locale aFormatLocale = (Locale) ReflectionUtils.getFieldValue(ReflectionUtils.getField(Locale.class, "defaultFormatLocale")); + Preloader_Logger.INFO("Locale: "+aDefaultLocale+" | Test: "+aFormat.format(1000000000)+" | Display: "+aDisplayLocale+" | Format: "+aFormatLocale); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java b/src/main/java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java new file mode 100644 index 0000000000..a6d2b6c863 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/Preloader_SetupClass.java @@ -0,0 +1,23 @@ +package gtPlusPlus.preloader.asm; + +import java.io.File; +import java.util.Map; + +import cpw.mods.fml.relauncher.IFMLCallHook; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.preloader.Preloader_Logger; + +public class Preloader_SetupClass implements IFMLCallHook { + + @Override + public Void call() throws Exception { + Preloader_Logger.INFO("Executing IFMLCallHook"); + return null; + } + + @Override + public void injectData(Map data) { + + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java b/src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java new file mode 100644 index 0000000000..664ffe7b2d --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_CC.java @@ -0,0 +1,28 @@ +package gtPlusPlus.preloader.asm.helpers; + +import codechicken.nei.guihook.GuiContainerManager; +import codechicken.nei.guihook.IContainerInputHandler; +import net.minecraft.client.gui.inventory.GuiContainer; + +public class MethodHelper_CC { + + + public void mouseUp2(int mousex, int mousey, int button) { + MethodHelper_CC.mouseUp(mousex, mousey, button); + } + + public static void mouseUp(int mousex, int mousey, int button) { + GuiContainerManager aManager = codechicken.nei.guihook.GuiContainerManager.getManager(); + if (aManager != null) { + GuiContainer aWindow = aManager.window; + for (IContainerInputHandler inputhander : GuiContainerManager.inputHandlers) { + //Preloader_Logger.INFO("Found Handler: "+aWindow.getClass().getName() + " | "+inputhander.getClass().getName()); + } + for (IContainerInputHandler inputhander : GuiContainerManager.inputHandlers) { + //Preloader_Logger.INFO("Trying to handle events for "+aWindow.getClass().getName() + " | "+inputhander.getClass().getName()); + inputhander.onMouseUp(aWindow, mousex, mousey, button); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java b/src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java new file mode 100644 index 0000000000..8120df81fa --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/helpers/MethodHelper_GT.java @@ -0,0 +1,25 @@ +package gtPlusPlus.preloader.asm.helpers; + +import java.util.List; + +import gregtech.api.enums.Materials; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class MethodHelper_GT { + + public static final void getSubItems(GT_MetaGenerated_Tool aTool, Item var1, CreativeTabs aCreativeTab, List aList) { + for (int i = 0; i < 32766; i += 2) { + if (aTool.getToolStats(new ItemStack(aTool, 1, i)) != null) { + ItemStack tStack = new ItemStack(aTool, 1, i); + aTool.isItemStackUsable(tStack); + aList.add(tStack); + aList.add(aTool.getToolWithStats(i,1,Materials.TungstenSteel,Materials.TungstenSteel,null)); + aList.add(aTool.getToolWithStats(i,1,Materials.Neutronium,Materials.Neutronium,null)); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java new file mode 100644 index 0000000000..8791d401c8 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_CC_GuiContainerManager.java @@ -0,0 +1,121 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.*; + +import gtPlusPlus.preloader.Preloader_Logger; + +public class ClassTransformer_CC_GuiContainerManager { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public ClassTransformer_CC_GuiContainerManager(byte[] basicClass) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + localClassVisitor aTempMethodRemover = new localClassVisitor(aTempWriter); + aTempReader.accept(aTempMethodRemover, 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } else { + isValid = false; + } + + Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Valid patch? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Attempting Method Injection."); + injectMethod("mouseUp"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + String aClassName = "codechicken/nei/guihook/GuiContainerManager"; + ClassWriter cw = getWriter(); + if (aMethodName.equals("mouseUp")) { + Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Injecting " + aMethodName + ", static replacement call to "+aClassName+"."); + mv = cw.visitMethod(ACC_PUBLIC, "mouseUp", "(III)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(12, l0); + mv.visitVarInsn(ILOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/helpers/MethodHelper_CC", "mouseUp", "(III)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(13, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "L+aClassName+;", null, l0, l2, 0); + mv.visitLocalVariable("mousex", "I", null, l0, l2, 1); + mv.visitLocalVariable("mousey", "I", null, l0, l2, 2); + mv.visitLocalVariable("button", "I", null, l0, l2, 3); + mv.visitMaxs(3, 4); + mv.visitEnd(); + didInject = true; + } + + Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + boolean obfuscated = false; + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + public boolean getObfuscatedRemoval() { + return obfuscated; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + + if (name.equals("mouseUp")) { + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + + if (methodVisitor == null) { + Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Found method " + name + ", removing."); + Preloader_Logger.LOG("CodeChicken GuiContainerManager Patch", Level.INFO, "Descriptor: "+desc); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java new file mode 100644 index 0000000000..6f08dc4ff5 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter.java @@ -0,0 +1,185 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ACC_STATIC; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.RETURN; + +import java.util.ArrayList; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import com.google.common.base.Strings; +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + +import cofh.core.util.oredict.OreDictionaryArbiter; +import cofh.lib.util.ItemWrapper; +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gnu.trove.map.TMap; +import gnu.trove.map.hash.THashMap; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.DevHelper; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class ClassTransformer_COFH_OreDictionaryArbiter { + + //The qualified name of the class we plan to transform. + private static final String className = "cofh.core.util.oredict.OreDictionaryArbiter"; + //cofh/core/util/oredict/OreDictionaryArbiter + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public ClassTransformer_COFH_OreDictionaryArbiter(byte[] basicClass) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + injectMethod("registerOreDictionaryEntry"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod(String aMethodName) { + + boolean isObfuscated; + try { + isObfuscated = Class.forName("net.minecraft.item.ItemStack") != null ? false : true; + } catch (ClassNotFoundException e) { + isObfuscated = true; + } + String aItemStack = isObfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; + MethodVisitor mv; + if (aMethodName.equals("registerOreDictionaryEntry")) { + FMLRelaunchLog.log("[GT++ ASM] COFH OreDictionaryArbiter Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+". ItemStack: "+aItemStack); + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "registerOreDictionaryEntry", "(L"+aItemStack+";Ljava/lang/String;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(61, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_COFH_OreDictionaryArbiter$FixCOFH", "registerOreDictionaryEntry", "(L"+aItemStack+";Ljava/lang/String;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(62, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("arg", "L"+aItemStack+";", null, l0, l2, 0); + mv.visitLocalVariable("arg0", "Ljava/lang/String;", null, l0, l2, 1); + mv.visitMaxs(2, 2); + mv.visitEnd(); + } + FMLRelaunchLog.log("[GT++ ASM] COFH OreDictionaryArbiter Patch", Level.INFO, "Method injection complete."); + + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("registerOreDictionaryEntry")) { + FMLRelaunchLog.log("[GT++ ASM] COFH OreDictionaryArbiter Patch", Level.INFO, "Removing method "+name); + return null; + } + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + + + + + @SuppressWarnings("unchecked") + public static class FixCOFH{ + + private static BiMap oreIDs; + private static TMap> oreStacks; + private static TMap> stackIDs; + private static TMap> stackNames; + + static { + try { + oreIDs = (BiMap) ReflectionUtils.getField(OreDictionaryArbiter.class, "oreIDs").get(null); + oreStacks = (TMap>) ReflectionUtils.getField(OreDictionaryArbiter.class, "oreStacks").get(null); + stackIDs = (TMap>) ReflectionUtils.getField(OreDictionaryArbiter.class, "stackIDs").get(null); + stackNames = (TMap>) ReflectionUtils.getField(OreDictionaryArbiter.class, "stackNames").get(null); + } + catch (Throwable t) { + oreIDs = HashBiMap.create(); + oreStacks = new THashMap>(); + stackIDs = new THashMap>(); + stackNames = new THashMap>(); + } + } + + public static void registerOreDictionaryEntry(ItemStack arg, String arg0) { + try { + if (arg == null) { + return; + } + if (arg.getItem() != null && !Strings.isNullOrEmpty(arg0)) { + int arg1 = OreDictionary.getOreID(arg0); + oreIDs.put(arg0, Integer.valueOf(arg1)); + if (!oreStacks.containsKey(Integer.valueOf(arg1))) { + oreStacks.put(Integer.valueOf(arg1), new ArrayList()); + } + ((ArrayList) oreStacks.get(Integer.valueOf(arg1))).add(arg); + ItemWrapper arg2 = ItemWrapper.fromItemStack(arg); + if (!stackIDs.containsKey(arg2)) { + stackIDs.put(arg2, new ArrayList()); + stackNames.put(arg2, new ArrayList()); + } + ((ArrayList) stackIDs.get(arg2)).add(Integer.valueOf(arg1)); + ((ArrayList) stackNames.get(arg2)).add(arg0); + } + } + catch (Throwable t) { + return; + } + } + } + + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java new file mode 100644 index 0000000000..19648ae60c --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_ChunkLoading.java @@ -0,0 +1,684 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + +public class ClassTransformer_Forge_ChunkLoading { + + //The qualified name of the class we plan to transform. + private static final String className = "net.minecraftforge.common.ForgeChunkManager"; + //net/minecraftforge/common/ForgeChunkManager + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + String aChunkCoordIntPair; + String aItemStack; + String aWorld; + String aEntity; + + private static boolean doesMethodAlreadyExist = false; + + public ClassTransformer_Forge_ChunkLoading(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null && !doesMethodAlreadyExist) { + + aChunkCoordIntPair = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/ChunkCoordIntPair") : "net/minecraft/world/ChunkCoordIntPair"; + aWorld = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; + aEntity = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/Entity") : "net/minecraft/entity/Entity"; + + injectMethod("forceChunk"); + injectMethod("unforceChunk"); + injectMethod("requestTicket"); + injectMethod("releaseTicket"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod(String aMethodName) { + MethodVisitor mv; + FMLRelaunchLog.log("[GT++ ASM] Chunkloading Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); + if (aMethodName.equals("forceChunk")) { + + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "forceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(730, l0); + mv.visitVarInsn(ALOAD, 0); + Label l1 = new Label(); + mv.visitJumpInsn(IFNULL, l1); + mv.visitVarInsn(ALOAD, 1); + Label l2 = new Label(); + mv.visitJumpInsn(IFNONNULL, l2); + mv.visitLabel(l1); + mv.visitLineNumber(732, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + mv.visitLabel(l2); + mv.visitLineNumber(734, l2); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$500", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Lnet/minecraftforge/common/ForgeChunkManager$Type;", false); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager$Type", "ENTITY", "Lnet/minecraftforge/common/ForgeChunkManager$Type;"); + Label l3 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l3); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$600", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)L"+aEntity+";", false); + mv.visitJumpInsn(IFNONNULL, l3); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(736, l4); + mv.visitTypeInsn(NEW, "java/lang/RuntimeException"); + mv.visitInsn(DUP); + mv.visitLdcInsn("Attempted to use an entity ticket to force a chunk, without an entity"); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/RuntimeException", "", "(Ljava/lang/String;)V", false); + mv.visitInsn(ATHROW); + mv.visitLabel(l3); + mv.visitLineNumber(738, l3); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "isPlayerTicket", "()Z", false); + Label l5 = new Label(); + mv.visitJumpInsn(IFEQ, l5); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "playerTickets", "Lcom/google/common/collect/SetMultimap;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/SetMultimap", "containsValue", "(Ljava/lang/Object;)Z", true); + Label l6 = new Label(); + mv.visitJumpInsn(IFNE, l6); + Label l7 = new Label(); + mv.visitJumpInsn(GOTO, l7); + mv.visitLabel(l5); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "containsEntry", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); + mv.visitJumpInsn(IFNE, l6); + mv.visitLabel(l7); + mv.visitLineNumber(740, l7); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitLdcInsn("The mod %s attempted to force load a chunk with an invalid ticket. This is not permitted."); + mv.visitInsn(ICONST_1); + mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); + mv.visitInsn(AASTORE); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "severe", "(Ljava/lang/String;[Ljava/lang/Object;)V", false); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(741, l8); + mv.visitInsn(RETURN); + mv.visitLabel(l6); + mv.visitLineNumber(743, l6); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "add", "(Ljava/lang/Object;)Z", false); + mv.visitInsn(POP); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(744, l9); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "storeLoadChunkToCache", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(745, l10); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/MinecraftForge", "EVENT_BUS", "Lcpw/mods/fml/common/eventhandler/EventBus;"); + mv.visitTypeInsn(NEW, "net/minecraftforge/common/ForgeChunkManager$ForceChunkEvent"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/common/ForgeChunkManager$ForceChunkEvent", "", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/common/eventhandler/EventBus", "post", "(Lcpw/mods/fml/common/eventhandler/Event;)Z", false); + mv.visitInsn(POP); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(747, l11); + mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/ImmutableSetMultimap", "builder", "()Lcom/google/common/collect/ImmutableSetMultimap$Builder;", false); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSetMultimap$Builder", "putAll", "(Lcom/google/common/collect/Multimap;)Lcom/google/common/collect/ImmutableSetMultimap$Builder;", false); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSetMultimap$Builder", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSetMultimap$Builder;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSetMultimap$Builder", "build", "()Lcom/google/common/collect/ImmutableSetMultimap;", false); + mv.visitVarInsn(ASTORE, 2); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(748, l12); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitInsn(POP); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(749, l13); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$800", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)I", false); + Label l14 = new Label(); + mv.visitJumpInsn(IFLE, l14); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "size", "()I", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$800", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)I", false); + mv.visitJumpInsn(IF_ICMPLE, l14); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(751, l15); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "iterator", "()Ljava/util/Iterator;", false); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, ""+aChunkCoordIntPair+""); + mv.visitVarInsn(ASTORE, 3); + Label l16 = new Label(); + mv.visitLabel(l16); + mv.visitLineNumber(752, l16); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "unforceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); + mv.visitLabel(l14); + mv.visitLineNumber(754, l14); + mv.visitFrame(F_APPEND,1, new Object[] {"com/google/common/collect/ImmutableSetMultimap"}, 0, null); + mv.visitInsn(RETURN); + Label l17 = new Label(); + mv.visitLabel(l17); + mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l0, l17, 0); + mv.visitLocalVariable("chunk", "L"+aChunkCoordIntPair+";", null, l0, l17, 1); + mv.visitLocalVariable("newMap", "Lcom/google/common/collect/ImmutableSetMultimap;", "Lcom/google/common/collect/ImmutableSetMultimap;", l12, l17, 2); + mv.visitLocalVariable("removed", "L"+aChunkCoordIntPair+";", null, l16, l14, 3); + mv.visitMaxs(5, 4); + mv.visitEnd(); + + } + else if (aMethodName.equals("unforceChunk")) { + + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "unforceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(781, l0); + mv.visitVarInsn(ALOAD, 0); + Label l1 = new Label(); + mv.visitJumpInsn(IFNULL, l1); + mv.visitVarInsn(ALOAD, 1); + Label l2 = new Label(); + mv.visitJumpInsn(IFNONNULL, l2); + mv.visitLabel(l1); + mv.visitLineNumber(783, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + mv.visitLabel(l2); + mv.visitLineNumber(785, l2); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/LinkedHashSet", "remove", "(Ljava/lang/Object;)Z", false); + mv.visitInsn(POP); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(786, l3); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "removeLoadedChunkFromCache", "(L"+aChunkCoordIntPair+";)V", false); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(787, l4); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/MinecraftForge", "EVENT_BUS", "Lcpw/mods/fml/common/eventhandler/EventBus;"); + mv.visitTypeInsn(NEW, "net/minecraftforge/common/ForgeChunkManager$UnforceChunkEvent"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/common/ForgeChunkManager$UnforceChunkEvent", "", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/common/eventhandler/EventBus", "post", "(Lcpw/mods/fml/common/eventhandler/Event;)Z", false); + mv.visitInsn(POP); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(788, l5); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/LinkedHashMultimap", "create", "(Lcom/google/common/collect/Multimap;)Lcom/google/common/collect/LinkedHashMultimap;", false); + mv.visitVarInsn(ASTORE, 2); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(789, l6); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/LinkedHashMultimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", false); + mv.visitInsn(POP); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(790, l7); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/ImmutableSetMultimap", "copyOf", "(Lcom/google/common/collect/Multimap;)Lcom/google/common/collect/ImmutableSetMultimap;", false); + mv.visitVarInsn(ASTORE, 3); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(791, l8); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "forcedChunks", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitInsn(POP); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(792, l9); + mv.visitInsn(RETURN); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l0, l10, 0); + mv.visitLocalVariable("chunk", "L"+aChunkCoordIntPair+";", null, l0, l10, 1); + mv.visitLocalVariable("copy", "Lcom/google/common/collect/LinkedHashMultimap;", "Lcom/google/common/collect/LinkedHashMultimap;", l6, l10, 2); + mv.visitLocalVariable("newMap", "Lcom/google/common/collect/ImmutableSetMultimap;", "Lcom/google/common/collect/ImmutableSetMultimap;", l8, l10, 3); + mv.visitMaxs(5, 4); + mv.visitEnd(); + + } + + else if (aMethodName.equals("requestTicket")) { + + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "requestTicket", "(Ljava/lang/Object;L"+aWorld+";Lnet/minecraftforge/common/ForgeChunkManager$Type;)Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(656, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "getContainer", "(Ljava/lang/Object;)Lcpw/mods/fml/common/ModContainer;", false); + mv.visitVarInsn(ASTORE, 3); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(657, l1); + mv.visitVarInsn(ALOAD, 3); + Label l2 = new Label(); + mv.visitJumpInsn(IFNONNULL, l2); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(659, l3); + mv.visitFieldInsn(GETSTATIC, "org/apache/logging/log4j/Level", "ERROR", "Lorg/apache/logging/log4j/Level;"); + mv.visitLdcInsn("Failed to locate the container for mod instance %s (%s : %x)"); + mv.visitInsn(ICONST_3); + mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(AASTORE); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_1); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getName", "()Ljava/lang/String;", false); + mv.visitInsn(AASTORE); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_2); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "identityHashCode", "(Ljava/lang/Object;)I", false); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); + mv.visitInsn(AASTORE); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "log", "(Lorg/apache/logging/log4j/Level;Ljava/lang/String;[Ljava/lang/Object;)V", false); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(660, l4); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l2); + mv.visitLineNumber(662, l2); + mv.visitFrame(F_APPEND,1, new Object[] {"cpw/mods/fml/common/ModContainer"}, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEINTERFACE, "cpw/mods/fml/common/ModContainer", "getModId", "()Ljava/lang/String;", true); + mv.visitVarInsn(ASTORE, 4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(663, l5); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "callbacks", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "containsKey", "(Ljava/lang/Object;)Z", true); + Label l6 = new Label(); + mv.visitJumpInsn(IFNE, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(665, l7); + mv.visitLdcInsn("The mod %s has attempted to request a ticket without a listener in place"); + mv.visitInsn(ICONST_1); + mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ALOAD, 4); + mv.visitInsn(AASTORE); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "severe", "(Ljava/lang/String;[Ljava/lang/Object;)V", false); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(666, l8); + mv.visitTypeInsn(NEW, "java/lang/RuntimeException"); + mv.visitInsn(DUP); + mv.visitLdcInsn("Invalid ticket request"); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/RuntimeException", "", "(Ljava/lang/String;)V", false); + mv.visitInsn(ATHROW); + mv.visitLabel(l6); + mv.visitLineNumber(669, l6); + mv.visitFrame(F_APPEND,1, new Object[] {"java/lang/String"}, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "getMaxTicketLengthFor", "(Ljava/lang/String;)I", false); + mv.visitVarInsn(ISTORE, 5); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(671, l9); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "get", "(Ljava/lang/Object;)Ljava/util/Collection;", true); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "size", "()I", true); + mv.visitVarInsn(ILOAD, 5); + Label l10 = new Label(); + mv.visitJumpInsn(IF_ICMPLT, l10); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(673, l11); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "warnedMods", "Ljava/util/Set;"); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "contains", "(Ljava/lang/Object;)Z", true); + Label l12 = new Label(); + mv.visitJumpInsn(IFNE, l12); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(675, l13); + mv.visitLdcInsn("The mod %s has attempted to allocate a chunkloading ticket beyond it's currently allocated maximum : %d"); + mv.visitInsn(ICONST_2); + mv.visitTypeInsn(ANEWARRAY, "java/lang/Object"); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ALOAD, 4); + mv.visitInsn(AASTORE); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_1); + mv.visitVarInsn(ILOAD, 5); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false); + mv.visitInsn(AASTORE); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/FMLLog", "info", "(Ljava/lang/String;[Ljava/lang/Object;)V", false); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(676, l14); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "warnedMods", "Ljava/util/Set;"); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "add", "(Ljava/lang/Object;)Z", true); + mv.visitInsn(POP); + mv.visitLabel(l12); + mv.visitLineNumber(678, l12); + mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l10); + mv.visitLineNumber(680, l10); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitTypeInsn(NEW, "net/minecraftforge/common/ForgeChunkManager$Ticket"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "", "(Ljava/lang/String;Lnet/minecraftforge/common/ForgeChunkManager$Type;L"+aWorld+";)V", false); + mv.visitVarInsn(ASTORE, 6); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(681, l15); + mv.visitVarInsn(ALOAD, 6); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "storeTicketToCache", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aWorld+";)V", false); + Label l16 = new Label(); + mv.visitLabel(l16); + mv.visitLineNumber(682, l16); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 6); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); + mv.visitInsn(POP); + Label l17 = new Label(); + mv.visitLabel(l17); + mv.visitLineNumber(683, l17); + mv.visitVarInsn(ALOAD, 6); + mv.visitInsn(ARETURN); + Label l18 = new Label(); + mv.visitLabel(l18); + mv.visitLocalVariable("mod", "Ljava/lang/Object;", null, l0, l18, 0); + mv.visitLocalVariable("world", "L"+aWorld+";", null, l0, l18, 1); + mv.visitLocalVariable("type", "Lnet/minecraftforge/common/ForgeChunkManager$Type;", null, l0, l18, 2); + mv.visitLocalVariable("container", "Lcpw/mods/fml/common/ModContainer;", null, l1, l18, 3); + mv.visitLocalVariable("modId", "Ljava/lang/String;", null, l5, l18, 4); + mv.visitLocalVariable("allowedCount", "I", null, l9, l18, 5); + mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l15, l18, 6); + mv.visitMaxs(6, 7); + mv.visitEnd(); + + } + + + else if (aMethodName.equals("releaseTicket")) { + + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "releaseTicket", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(693, l0); + mv.visitVarInsn(ALOAD, 0); + Label l1 = new Label(); + mv.visitJumpInsn(IFNONNULL, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(695, l2); + mv.visitInsn(RETURN); + mv.visitLabel(l1); + mv.visitLineNumber(697, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "isPlayerTicket", "()Z", false); + Label l3 = new Label(); + mv.visitJumpInsn(IFEQ, l3); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "playerTickets", "Lcom/google/common/collect/SetMultimap;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/SetMultimap", "containsValue", "(Ljava/lang/Object;)Z", true); + Label l4 = new Label(); + mv.visitJumpInsn(IFNE, l4); + Label l5 = new Label(); + mv.visitJumpInsn(GOTO, l5); + mv.visitLabel(l3); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "containsEntry", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); + mv.visitJumpInsn(IFNE, l4); + mv.visitLabel(l5); + mv.visitLineNumber(699, l5); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + mv.visitLabel(l4); + mv.visitLineNumber(701, l4); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(703, l7); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$700", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/util/LinkedHashSet;", false); + mv.visitMethodInsn(INVOKESTATIC, "com/google/common/collect/ImmutableSet", "copyOf", "(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "com/google/common/collect/ImmutableSet", "iterator", "()Ljava/util/Iterator;", false); + mv.visitVarInsn(ASTORE, 2); + Label l8 = new Label(); + mv.visitJumpInsn(GOTO, l8); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitFrame(F_FULL, 3, new Object[] {"net/minecraftforge/common/ForgeChunkManager$Ticket", TOP, "java/util/Iterator"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, ""+aChunkCoordIntPair+""); + mv.visitVarInsn(ASTORE, 1); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(705, l10); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager", "unforceChunk", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;L"+aChunkCoordIntPair+";)V", false); + mv.visitLabel(l8); + mv.visitLineNumber(703, l8); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); + mv.visitJumpInsn(IFNE, l9); + mv.visitLabel(l6); + mv.visitLineNumber(708, l6); + mv.visitFrame(F_FULL, 1, new Object[] {"net/minecraftforge/common/ForgeChunkManager$Ticket"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/ChunkDebugger", "removeTicketFromCache", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)V", false); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(709, l11); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/common/ForgeChunkManager$Ticket", "isPlayerTicket", "()Z", false); + Label l12 = new Label(); + mv.visitJumpInsn(IFEQ, l12); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(711, l13); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "playerTickets", "Lcom/google/common/collect/SetMultimap;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$100", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/SetMultimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); + mv.visitInsn(POP); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(712, l14); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitLdcInsn("Forge"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); + mv.visitInsn(POP); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(713, l15); + Label l16 = new Label(); + mv.visitJumpInsn(GOTO, l16); + mv.visitLabel(l12); + mv.visitLineNumber(716, l12); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/ForgeChunkManager", "tickets", "Ljava/util/Map;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/common/ForgeChunkManager$Ticket", "world", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "com/google/common/collect/Multimap"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/common/ForgeChunkManager$Ticket", "access$200", "(Lnet/minecraftforge/common/ForgeChunkManager$Ticket;)Ljava/lang/String;", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEINTERFACE, "com/google/common/collect/Multimap", "remove", "(Ljava/lang/Object;Ljava/lang/Object;)Z", true); + mv.visitInsn(POP); + mv.visitLabel(l16); + mv.visitLineNumber(718, l16); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + Label l17 = new Label(); + mv.visitLabel(l17); + mv.visitLocalVariable("ticket", "Lnet/minecraftforge/common/ForgeChunkManager$Ticket;", null, l0, l17, 0); + mv.visitLocalVariable("chunk", "L"+aChunkCoordIntPair+";", null, l10, l8, 1); + mv.visitMaxs(3, 3); + mv.visitEnd(); + + } + + + FMLRelaunchLog.log("[GT++ ASM] Chunkloading Patch", Level.INFO, "Method injection complete."); + + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("forceChunk") || name.equals("unforceChunk") || name.equals("requestTicket") || name.equals("releaseTicket")) { + FMLRelaunchLog.log("[GT++ ASM] Chunkloading Patch", Level.INFO, "Found method "+name+", Patching."); + return null; + } + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java new file mode 100644 index 0000000000..d56b9de059 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Forge_EntityLivingBase_SetHealth.java @@ -0,0 +1,130 @@ +package gtPlusPlus.preloader.asm.transformers; + +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.MethodVisitor; +import org.objectweb.asm.Opcodes; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; + +public class ClassTransformer_Forge_EntityLivingBase_SetHealth { + + private boolean isValid = false; + private ClassReader mReader = null; + private ClassWriter mWriter = null; + private boolean didPatch = false; + + public ClassTransformer_Forge_EntityLivingBase_SetHealth(String aClassName, byte[] basicClass) { + if (basicClass == null) { + return; + } + + ClassReader reader = new ClassReader(basicClass); + ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_MAXS); + ClassVisitor visitor = writer; + SetHealthVisitor aVisitor = new SetHealthVisitor(visitor); + visitor = aVisitor; + reader.accept(visitor, 0); + if (reader != null && writer != null) { + isValid = true; + } + else { + isValid = false; + } + mReader = reader; + mWriter = writer; + didPatch = aVisitor.didPatchInternal; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return mReader; + } + + public ClassWriter getWriter() { + return mWriter; + } + + + public static class SetHealthVisitor extends ClassVisitor { + private String clsName = null; + private boolean didPatchInternal = false; + private static final String callbackOwner = org.objectweb.asm.Type.getInternalName(SetHealthVisitor.class); + + private SetHealthVisitor(ClassVisitor cv) { + super(Opcodes.ASM5, cv); + } + + @Override + public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { + super.visit( + version, access, name, signature, superName, interfaces + ); + this.clsName = name; + } + + @Override + public MethodVisitor visitMethod( + int mAccess, final String mName, final String mDesc, String mSignature, String[] mExceptions) { + final boolean warn = !(clsName.equals( + "net/minecraft/entity/EntityLivingBase" + )); + + return new MethodVisitor(Opcodes.ASM5, super.visitMethod(mAccess, mName, mDesc, mSignature, mExceptions)) { + @Override + public void visitMethodInsn( + int opcode, String owner, String name, String desc, boolean isIntf + ) { + if (owner.equals( + "net/minecraft/entity/EntityLivingBase" + ) && name.equals("setHealth") && desc.equals("(F)V")) { + if (warn) { + FMLRelaunchLog.warning( + "=============================================================" + ); + FMLRelaunchLog.warning( + "MOD HAS DIRECT REFERENCE Entity.setHealth() THIS IS NOT ALLOWED!" + ); + FMLRelaunchLog.warning( + "Offendor: %s.%s%s", SetHealthVisitor.this.clsName, mName, mDesc + ); + FMLRelaunchLog.warning( + "Use EntityLiving.attackEntityFrom(DamageSource, damageDealt) instead" + ); + FMLRelaunchLog.warning( + "=============================================================" + ); + } + didPatchInternal = true; + //opcode = Opcodes.INVOKESTATIC; // Set it static + //owner = SetHealthVisitor.callbackOwner; + //name = "setHealthGeneric"; // Replace the method name + //desc = "(Lnet/minecraft/entity/EntityLivingBase;F)V"; // Replace the method desc + + } + super.visitMethodInsn(opcode, owner, name, desc, isIntf); + } + }; + } + + + private final static DamageSource mGenericDamageSource = new DamageSource("gtpp.generic"); + + public static void setHealthGeneric(EntityLivingBase aEntity, float aValue) { + aEntity.attackEntityFrom(mGenericDamageSource, aValue); + } + + } + + + public boolean didPatchClass() { + return didPatch; + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java new file mode 100644 index 0000000000..1e58cbbe9b --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_EntityAutoRocket.java @@ -0,0 +1,527 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + + +public class ClassTransformer_GC_EntityAutoRocket { + + //The qualified name of the class we plan to transform. + private static final String className = "micdoodle8.mods.galacticraft.api.prefab.entity.EntityAutoRocket"; + //micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private final boolean isObfuscated; + + public ClassTransformer_GC_EntityAutoRocket(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + isObfuscated = obfuscated; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + injectMethod(); + } + else { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Failed to Inject new code."); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod() { + + String aEntityPlayer = isObfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayer") : "net/minecraft/entity/player/EntityPlayer"; + String aEntityPlayerMP = isObfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayerMP") : "net/minecraft/entity/player/EntityPlayerMP"; + String aWorld = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; + String aItemStack = isObfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; + String aEntity = isObfuscated ? DevHelper.getObfuscated("net/minecraft/entity/Entity") : "net/minecraft/entity/Entity"; + String aWorldClient = isObfuscated ? DevHelper.getObfuscated("net/minecraft/client/multiplayer/WorldClient") : "net/minecraft/client/multiplayer/WorldClient"; + String aDifficultyEnum = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/EnumDifficulty") : "net/minecraft/world/EnumDifficulty"; + String aWorldInfo = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/storage/WorldInfo") : "net/minecraft/world/storage/WorldInfo"; + String aItemInWorldManager = isObfuscated ? DevHelper.getObfuscated("net/minecraft/server/management/ItemInWorldManager") : "net/minecraft/server/management/ItemInWorldManager"; + String aWorldType = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/WorldType") : "net/minecraft/world/WorldType"; + String aGameType = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/WorldSettings$GameType") : "net/minecraft/world/WorldSettings$GameType"; + + if (isValidTransformer()) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Injecting decodePacketdata into "+className+"."); + MethodVisitor mv = getWriter().visitMethod(ACC_PUBLIC, "decodePacketdata", "(Lio/netty/buffer/ByteBuf;)V", null, null); + + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1027, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/api/prefab/entity/EntitySpaceshipBase", "decodePacketdata", "(Lio/netty/buffer/ByteBuf;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(1029, l1); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/galacticraft/util/GalacticUtils", "getValidFuelForTier", "(L"+aEntity+";)Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitVarInsn(ASTORE, 2); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(1030, l2); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitVarInsn(ISTORE, 3); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(1031, l3); + mv.visitVarInsn(ALOAD, 2); + Label l4 = new Label(); + mv.visitJumpInsn(IFNULL, l4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(1032, l5); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); + mv.visitVarInsn(ASTORE, 4); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(1033, l6); + mv.visitVarInsn(ALOAD, 4); + mv.visitJumpInsn(IFNULL, l4); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(1034, l7); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "setFluid", "(Lnet/minecraftforge/fluids/FluidStack;)V", false); + mv.visitLabel(l4); + mv.visitLineNumber(1038, l4); + mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraftforge/fluids/FluidStack", INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "landing", "Z"); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(1039, l8); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "destinationFrequency", "I"); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(1041, l9); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); + Label l10 = new Label(); + mv.visitJumpInsn(IFEQ, l10); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(1043, l11); + mv.visitVarInsn(ALOAD, 0); + mv.visitTypeInsn(NEW, "micdoodle8/mods/galacticraft/api/vector/BlockVec3"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/api/vector/BlockVec3", "", "(III)V", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "targetVec", "Lmicdoodle8/mods/galacticraft/api/vector/BlockVec3;"); + mv.visitLabel(l10); + mv.visitLineNumber(1046, l10); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); + mv.visitLdcInsn(new Double("8000.0")); + mv.visitInsn(DDIV); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "motionX", "D"); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(1047, l12); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); + mv.visitLdcInsn(new Double("8000.0")); + mv.visitInsn(DDIV); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "motionY", "D"); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(1048, l13); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); + mv.visitLdcInsn(new Double("8000.0")); + mv.visitInsn(DDIV); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "motionZ", "D"); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(1049, l14); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); + mv.visitLdcInsn(new Double("8000.0")); + mv.visitInsn(DDIV); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "lastMotionY", "D"); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(1050, l15); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readDouble", "()D", false); + mv.visitLdcInsn(new Double("8000.0")); + mv.visitInsn(DDIV); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "lastLastMotionY", "D"); + Label l16 = new Label(); + mv.visitLabel(l16); + mv.visitLineNumber(1052, l16); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "cargoItems", "[L"+aItemStack+";"); + Label l17 = new Label(); + mv.visitJumpInsn(IFNONNULL, l17); + Label l18 = new Label(); + mv.visitLabel(l18); + mv.visitLineNumber(1054, l18); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "getSizeInventory", "()I", false); + mv.visitTypeInsn(ANEWARRAY, aItemStack); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "cargoItems", "[L"+aItemStack+";"); + mv.visitLabel(l17); + mv.visitLineNumber(1057, l17); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "setWaitForPlayer", "(Z)V", false); + Label l19 = new Label(); + mv.visitLabel(l19); + mv.visitLineNumber(1059, l19); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/network/ByteBufUtils", "readUTF8String", "(Lio/netty/buffer/ByteBuf;)Ljava/lang/String;", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); + Label l20 = new Label(); + mv.visitLabel(l20); + mv.visitLineNumber(1060, l20); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); + mv.visitLdcInsn(""); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l21 = new Label(); + mv.visitJumpInsn(IFEQ, l21); + mv.visitInsn(ACONST_NULL); + Label l22 = new Label(); + mv.visitJumpInsn(GOTO, l22); + mv.visitLabel(l21); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket"}); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); + mv.visitLabel(l22); + mv.visitFrame(F_FULL, 4, new Object[] {"micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "io/netty/buffer/ByteBuf", "net/minecraftforge/fluids/FluidStack", INTEGER}, 2, new Object[] {"micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "java/lang/String"}); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessage", "Ljava/lang/String;"); + Label l23 = new Label(); + mv.visitLabel(l23); + mv.visitLineNumber(1061, l23); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusMessageCooldown", "I"); + Label l24 = new Label(); + mv.visitLabel(l24); + mv.visitLineNumber(1062, l24); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "lastStatusMessageCooldown", "I"); + Label l25 = new Label(); + mv.visitLabel(l25); + mv.visitLineNumber(1063, l25); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readBoolean", "()Z", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusValid", "Z"); + Label l26 = new Label(); + mv.visitLabel(l26); + mv.visitLineNumber(1066, l26); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "worldObj", "L"+aWorld+";"); + mv.visitFieldInsn(GETFIELD, aWorld, "isRemote", "Z"); + Label l27 = new Label(); + mv.visitJumpInsn(IFEQ, l27); + Label l28 = new Label(); + mv.visitLabel(l28); + mv.visitLineNumber(1068, l28); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "io/netty/buffer/ByteBuf", "readInt", "()I", false); + mv.visitVarInsn(ISTORE, 4); + Label l29 = new Label(); + mv.visitLabel(l29); + mv.visitLineNumber(1069, l29); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "riddenByEntity", "L"+aEntity+";"); + Label l30 = new Label(); + mv.visitJumpInsn(IFNONNULL, l30); + Label l31 = new Label(); + mv.visitLabel(l31); + mv.visitLineNumber(1071, l31); + mv.visitVarInsn(ILOAD, 4); + mv.visitInsn(ICONST_M1); + mv.visitJumpInsn(IF_ICMPLE, l27); + Label l32 = new Label(); + mv.visitLabel(l32); + mv.visitLineNumber(1073, l32); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/client/FMLClientHandler", "instance", "()Lcpw/mods/fml/client/FMLClientHandler;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/client/FMLClientHandler", "getWorldClient", "()L"+aWorldClient+";", false); + mv.visitVarInsn(ILOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldClient+"", "getEntityByID", "(I)L"+aEntity+";", false); + mv.visitVarInsn(ASTORE, 5); + Label l33 = new Label(); + mv.visitLabel(l33); + mv.visitLineNumber(1074, l33); + mv.visitVarInsn(ALOAD, 5); + mv.visitJumpInsn(IFNULL, l27); + Label l34 = new Label(); + mv.visitLabel(l34); + mv.visitLineNumber(1076, l34); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "dimension", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); + Label l35 = new Label(); + mv.visitJumpInsn(IF_ICMPEQ, l35); + Label l36 = new Label(); + mv.visitLabel(l36); + mv.visitLineNumber(1078, l36); + mv.visitVarInsn(ALOAD, 5); + mv.visitTypeInsn(INSTANCEOF, ""+aEntityPlayer+""); + mv.visitJumpInsn(IFEQ, l27); + Label l37 = new Label(); + mv.visitLabel(l37); + mv.visitLineNumber(1080, l37); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); + mv.visitFieldInsn(GETFIELD, aWorld, "difficultySetting", "L"+aDifficultyEnum+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aDifficultyEnum+"", "getDifficultyId", "()I", false); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, aWorld, "getWorldInfo", "()L"+aWorldInfo+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldInfo+"", "getTerrainType", "()L"+aWorldType+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, aWorldType, "getWorldTypeName", "()Ljava/lang/String;", false); + mv.visitVarInsn(ALOAD, 5); + mv.visitTypeInsn(CHECKCAST, ""+aEntityPlayerMP+""); + mv.visitFieldInsn(GETFIELD, ""+aEntityPlayerMP+"", "theItemInWorldManager", "L"+aItemInWorldManager+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemInWorldManager+"", "getGameType", "()L"+aGameType+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aGameType+"", "getID", "()I", false); + mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/WorldUtil", "forceRespawnClient", "(IILjava/lang/String;I)L"+aEntityPlayer+";", false); + mv.visitVarInsn(ASTORE, 5); + Label l38 = new Label(); + mv.visitLabel(l38); + mv.visitLineNumber(1081, l38); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); + Label l39 = new Label(); + mv.visitLabel(l39); + mv.visitLineNumber(1083, l39); + mv.visitJumpInsn(GOTO, l27); + mv.visitLabel(l35); + mv.visitLineNumber(1085, l35); + mv.visitFrame(F_APPEND,2, new Object[] {INTEGER, ""+aEntity+""}, 0, null); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); + Label l40 = new Label(); + mv.visitLabel(l40); + mv.visitLineNumber(1088, l40); + mv.visitJumpInsn(GOTO, l27); + mv.visitLabel(l30); + mv.visitLineNumber(1089, l30); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "riddenByEntity", "L"+aEntity+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "getEntityId", "()I", false); + mv.visitVarInsn(ILOAD, 4); + mv.visitJumpInsn(IF_ICMPEQ, l27); + Label l41 = new Label(); + mv.visitLabel(l41); + mv.visitLineNumber(1091, l41); + mv.visitVarInsn(ILOAD, 4); + mv.visitInsn(ICONST_M1); + Label l42 = new Label(); + mv.visitJumpInsn(IF_ICMPNE, l42); + Label l43 = new Label(); + mv.visitLabel(l43); + mv.visitLineNumber(1093, l43); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "riddenByEntity", "L"+aEntity+";"); + mv.visitInsn(ACONST_NULL); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); + Label l44 = new Label(); + mv.visitLabel(l44); + mv.visitLineNumber(1094, l44); + mv.visitJumpInsn(GOTO, l27); + mv.visitLabel(l42); + mv.visitLineNumber(1097, l42); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/client/FMLClientHandler", "instance", "()Lcpw/mods/fml/client/FMLClientHandler;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "cpw/mods/fml/client/FMLClientHandler", "getWorldClient", "()L"+aWorldClient+";", false); + mv.visitVarInsn(ILOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldClient+"", "getEntityByID", "(I)L"+aEntity+";", false); + mv.visitVarInsn(ASTORE, 5); + Label l45 = new Label(); + mv.visitLabel(l45); + mv.visitLineNumber(1098, l45); + mv.visitVarInsn(ALOAD, 5); + mv.visitJumpInsn(IFNULL, l27); + Label l46 = new Label(); + mv.visitLabel(l46); + mv.visitLineNumber(1100, l46); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "dimension", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); + Label l47 = new Label(); + mv.visitJumpInsn(IF_ICMPEQ, l47); + Label l48 = new Label(); + mv.visitLabel(l48); + mv.visitLineNumber(1102, l48); + mv.visitVarInsn(ALOAD, 5); + mv.visitTypeInsn(INSTANCEOF, ""+aEntityPlayer+""); + mv.visitJumpInsn(IFEQ, l27); + Label l49 = new Label(); + mv.visitLabel(l49); + mv.visitLineNumber(1104, l49); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "dimension", "I"); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); + mv.visitFieldInsn(GETFIELD, aWorld, "difficultySetting", "L"+aDifficultyEnum+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aDifficultyEnum+"", "getDifficultyId", "()I", false); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, ""+aEntity+"", "worldObj", "L"+aWorld+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, aWorld, "getWorldInfo", "()L"+aWorldInfo+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorldInfo+"", "getTerrainType", "()L"+aWorldType+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, aWorldType, "getWorldTypeName", "()Ljava/lang/String;", false); + mv.visitVarInsn(ALOAD, 5); + mv.visitTypeInsn(CHECKCAST, ""+aEntityPlayerMP+""); + mv.visitFieldInsn(GETFIELD, ""+aEntityPlayerMP+"", "theItemInWorldManager", "L"+aItemInWorldManager+";"); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemInWorldManager+"", "getGameType", "()L"+aGameType+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aGameType+"", "getID", "()I", false); + mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/WorldUtil", "forceRespawnClient", "(IILjava/lang/String;I)L"+aEntityPlayer+";", false); + mv.visitVarInsn(ASTORE, 5); + Label l50 = new Label(); + mv.visitLabel(l50); + mv.visitLineNumber(1105, l50); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); + Label l51 = new Label(); + mv.visitLabel(l51); + mv.visitLineNumber(1107, l51); + mv.visitJumpInsn(GOTO, l27); + mv.visitLabel(l47); + mv.visitLineNumber(1109, l47); + mv.visitFrame(F_APPEND,1, new Object[] {""+aEntity+""}, 0, null); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aEntity+"", "mountEntity", "(L"+aEntity+";)V", false); + mv.visitLabel(l27); + mv.visitLineNumber(1114, l27); + mv.visitFrame(F_CHOP,2, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/network/ByteBufUtils", "readUTF8String", "(Lio/netty/buffer/ByteBuf;)Ljava/lang/String;", false); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusColour", "Ljava/lang/String;"); + Label l52 = new Label(); + mv.visitLabel(l52); + mv.visitLineNumber(1115, l52); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusColour", "Ljava/lang/String;"); + mv.visitLdcInsn(""); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l53 = new Label(); + mv.visitJumpInsn(IFEQ, l53); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ACONST_NULL); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket", "statusColour", "Ljava/lang/String;"); + mv.visitLabel(l53); + mv.visitLineNumber(1116, l53); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + Label l54 = new Label(); + mv.visitLabel(l54); + mv.visitLocalVariable("this", "Lmicdoodle8/mods/galacticraft/api/prefab/entity/EntityAutoRocket;", null, l0, l54, 0); + mv.visitLocalVariable("buffer", "Lio/netty/buffer/ByteBuf;", null, l0, l54, 1); + mv.visitLocalVariable("g", "Lnet/minecraftforge/fluids/FluidStack;", null, l2, l54, 2); + mv.visitLocalVariable("aBufferData", "I", null, l3, l54, 3); + mv.visitLocalVariable("s", "Lnet/minecraftforge/fluids/FluidStack;", null, l6, l4, 4); + mv.visitLocalVariable("shouldBeMountedId", "I", null, l29, l27, 4); + mv.visitLocalVariable("e", "L"+aEntity+";", null, l33, l40, 5); + mv.visitLocalVariable("e", "L"+aEntity+";", null, l45, l27, 5); + mv.visitMaxs(6, 6); + mv.visitEnd(); + + } + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Inspecting Class "+className); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("decodePacketdata")) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft EntityAutoRocket Patch", Level.INFO, "Removing method "+name); + return null; + } + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java new file mode 100644 index 0000000000..13681e7e3a --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FluidUtil.java @@ -0,0 +1,242 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; + + +public class ClassTransformer_GC_FluidUtil { + + //The qualified name of the class we plan to transform. + private static final String className = "micdoodle8.mods.galacticraft.core.util.FluidUtil"; + //"micdoodle8/mods/galacticraft/core/util/FluidUtil + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public ClassTransformer_GC_FluidUtil(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + injectMethod("testFuel"); + injectMethod("fillWithGCFuel"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod(String aMethodName) { + MethodVisitor mv; + if (aMethodName.equals("testFuel")) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "testFuel", "(Ljava/lang/String;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(37, l0); + mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuelNames", "Ljava/util/HashSet;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashSet", "iterator", "()Ljava/util/Iterator;", false); + mv.visitVarInsn(ASTORE, 2); + Label l1 = new Label(); + mv.visitJumpInsn(GOTO, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitFrame(F_FULL, 3, new Object[] {"java/lang/String", TOP, "java/util/Iterator"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "java/lang/String"); + mv.visitVarInsn(ASTORE, 1); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(38, l3); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + mv.visitJumpInsn(IFEQ, l1); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(39, l4); + mv.visitInsn(ICONST_1); + mv.visitInsn(IRETURN); + mv.visitLabel(l1); + mv.visitLineNumber(37, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); + mv.visitJumpInsn(IFNE, l2); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(42, l5); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLocalVariable("name", "Ljava/lang/String;", null, l0, l6, 0); + mv.visitLocalVariable("aFuelname", "Ljava/lang/String;", null, l3, l1, 1); + mv.visitMaxs(2, 3); + mv.visitEnd(); + } + else if (aMethodName.equals("fillWithGCFuel")) { + mv = getWriter().visitMethod(ACC_PUBLIC + ACC_STATIC, "fillWithGCFuel", "(Lnet/minecraftforge/fluids/FluidTank;Lnet/minecraftforge/fluids/FluidStack;Z)I", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(46, l0); + mv.visitVarInsn(ALOAD, 1); + Label l1 = new Label(); + mv.visitJumpInsn(IFNULL, l1); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/fluids/FluidRegistry", "getFluidName", "(Lnet/minecraftforge/fluids/FluidStack;)Ljava/lang/String;", false); + mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/FluidUtil", "testFuel", "(Ljava/lang/String;)Z", false); + mv.visitJumpInsn(IFEQ, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(47, l2); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitVarInsn(ASTORE, 3); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(48, l3); + mv.visitVarInsn(ALOAD, 3); + Label l4 = new Label(); + mv.visitJumpInsn(IFNONNULL, l4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(49, l5); + mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuels", "Ljava/util/HashMap;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashMap", "values", "()Ljava/util/Collection;", false); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "iterator", "()Ljava/util/Iterator;", true); + mv.visitVarInsn(ASTORE, 5); + Label l6 = new Label(); + mv.visitJumpInsn(GOTO, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitFrame(F_FULL, 6, new Object[] {"net/minecraftforge/fluids/FluidTank", "net/minecraftforge/fluids/FluidStack", INTEGER, "net/minecraftforge/fluids/FluidStack", TOP, "java/util/Iterator"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "net/minecraftforge/fluids/Fluid"); + mv.visitVarInsn(ASTORE, 4); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(50, l8); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "getFluid", "()Lnet/minecraftforge/fluids/Fluid;", false); + mv.visitVarInsn(ALOAD, 4); + mv.visitJumpInsn(IF_ACMPNE, l6); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(51, l9); + mv.visitVarInsn(ALOAD, 0); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); + mv.visitInsn(IRETURN); + mv.visitLabel(l6); + mv.visitLineNumber(49, l6); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); + mv.visitJumpInsn(IFNE, l7); + mv.visitLabel(l4); + mv.visitLineNumber(55, l4); + mv.visitFrame(F_FULL, 4, new Object[] {"net/minecraftforge/fluids/FluidTank", "net/minecraftforge/fluids/FluidStack", INTEGER, "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 3); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); + mv.visitJumpInsn(IF_ICMPGE, l1); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(56, l10); + mv.visitVarInsn(ALOAD, 0); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 3); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); + mv.visitInsn(IRETURN); + mv.visitLabel(l1); + mv.visitLineNumber(59, l1); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLocalVariable("tank", "Lnet/minecraftforge/fluids/FluidTank;", null, l0, l11, 0); + mv.visitLocalVariable("liquid", "Lnet/minecraftforge/fluids/FluidStack;", null, l0, l11, 1); + mv.visitLocalVariable("doFill", "Z", null, l0, l11, 2); + mv.visitLocalVariable("liquidInTank", "Lnet/minecraftforge/fluids/FluidStack;", null, l3, l1, 3); + mv.visitLocalVariable("aFuelType", "Lnet/minecraftforge/fluids/Fluid;", null, l8, l6, 4); + mv.visitMaxs(5, 6); + mv.visitEnd(); + } + FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Method injection complete."); + + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("testFuel")) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Removing method "+name); + return null; + } + if (name.equals("fillWithGCFuel")) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft FluidUtils Patch", Level.INFO, "Removing method "+name); + return null; + } + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java new file mode 100644 index 0000000000..5ef5b75505 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GC_FuelLoader.java @@ -0,0 +1,622 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + + +public class ClassTransformer_GC_FuelLoader { + + //The qualified name of the class we plan to transform. + private static final String className = "micdoodle8.mods.galacticraft.core.tile.TileEntityFuelLoader"; + //micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private final boolean isObfuscated; + + public ClassTransformer_GC_FuelLoader(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + isObfuscated = obfuscated; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + injectMethod(); + } + else { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Failed to Inject new code."); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod() { + String aWorld = isObfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; + String aItemStack = isObfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; + String aTileEntity = isObfuscated ? DevHelper.getObfuscated("net/minecraft/tileentity/TileEntity") : "net/minecraft/tileentity/TileEntity"; + + if (isValidTransformer()) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Injecting updateEntity into "+className+"."); + MethodVisitor mv = getWriter().visitMethod(ACC_PUBLIC, "updateEntity", "()V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(60, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/core/energy/tile/TileBaseElectricBlockWithInventory", "updateEntity", "()V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(61, l1); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "worldObj", "L"+aWorld+";"); + mv.visitFieldInsn(GETFIELD, ""+aWorld+"", "isRemote", "Z"); + Label l2 = new Label(); + mv.visitJumpInsn(IFNE, l2); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(62, l3); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_0); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "loadedFuelLastTick", "Z"); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(63, l4); + mv.visitInsn(ACONST_NULL); + mv.visitVarInsn(ASTORE, 1); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(66, l5); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_1); + mv.visitInsn(AALOAD); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(67, l7); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_1); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/fluids/FluidContainerRegistry", "getFluidForFilledItem", "(L"+aItemStack+";)Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitVarInsn(ASTORE, 1); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(68, l8); + mv.visitVarInsn(ALOAD, 1); + mv.visitJumpInsn(IFNULL, l6); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(69, l9); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "net/minecraftforge/fluids/FluidRegistry", "getFluidName", "(Lnet/minecraftforge/fluids/FluidStack;)Ljava/lang/String;", false); + mv.visitMethodInsn(INVOKESTATIC, "micdoodle8/mods/galacticraft/core/util/FluidUtil", "testFuel", "(Ljava/lang/String;)Z", false); + mv.visitVarInsn(ISTORE, 4); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(70, l10); + mv.visitVarInsn(ILOAD, 4); + mv.visitJumpInsn(IFEQ, l6); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + Label l11 = new Label(); + mv.visitJumpInsn(IFNULL, l11); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(71, l12); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitInsn(IADD); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); + mv.visitJumpInsn(IF_ICMPGT, l6); + mv.visitLabel(l11); + mv.visitLineNumber(73, l11); + mv.visitFrame(F_FULL, 5, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitVarInsn(ASTORE, 5); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(74, l13); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ISTORE, 6); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(75, l14); + mv.visitVarInsn(ALOAD, 5); + Label l15 = new Label(); + mv.visitJumpInsn(IFNONNULL, l15); + Label l16 = new Label(); + mv.visitLabel(l16); + mv.visitLineNumber(76, l16); + mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuels", "Ljava/util/HashMap;"); + Label l17 = new Label(); + mv.visitLabel(l17); + mv.visitLineNumber(77, l17); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashMap", "values", "()Ljava/util/Collection;", false); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "iterator", "()Ljava/util/Iterator;", true); + mv.visitVarInsn(ASTORE, 8); + Label l18 = new Label(); + mv.visitJumpInsn(GOTO, l18); + Label l19 = new Label(); + mv.visitLabel(l19); + mv.visitFrame(F_FULL, 9, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER, TOP, "java/util/Iterator"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 8); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "net/minecraftforge/fluids/Fluid"); + mv.visitVarInsn(ASTORE, 7); + Label l20 = new Label(); + mv.visitLabel(l20); + mv.visitLineNumber(78, l20); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "getFluid", "()Lnet/minecraftforge/fluids/Fluid;", false); + mv.visitVarInsn(ALOAD, 7); + mv.visitJumpInsn(IF_ACMPNE, l18); + Label l21 = new Label(); + mv.visitLabel(l21); + mv.visitLineNumber(79, l21); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 7); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); + Label l22 = new Label(); + mv.visitJumpInsn(IFLE, l22); + mv.visitInsn(ICONST_1); + Label l23 = new Label(); + mv.visitJumpInsn(GOTO, l23); + mv.visitLabel(l22); + mv.visitFrame(F_FULL, 9, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER, "net/minecraftforge/fluids/Fluid", "java/util/Iterator"}, 0, new Object[] {}); + mv.visitInsn(ICONST_0); + mv.visitLabel(l23); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {INTEGER}); + mv.visitVarInsn(ISTORE, 6); + mv.visitLabel(l18); + mv.visitLineNumber(76, l18); + mv.visitFrame(F_FULL, 9, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER, TOP, "java/util/Iterator"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 8); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); + mv.visitJumpInsn(IFNE, l19); + Label l24 = new Label(); + mv.visitLabel(l24); + mv.visitLineNumber(82, l24); + Label l25 = new Label(); + mv.visitJumpInsn(GOTO, l25); + mv.visitLabel(l15); + mv.visitLineNumber(84, l15); + mv.visitFrame(F_FULL, 7, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); + mv.visitJumpInsn(IF_ICMPGE, l25); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "isFluidEqual", "(Lnet/minecraftforge/fluids/FluidStack;)Z", false); + mv.visitJumpInsn(IFEQ, l25); + Label l26 = new Label(); + mv.visitLabel(l26); + mv.visitLineNumber(85, l26); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "fill", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", false); + Label l27 = new Label(); + mv.visitJumpInsn(IFLE, l27); + mv.visitInsn(ICONST_1); + Label l28 = new Label(); + mv.visitJumpInsn(GOTO, l28); + mv.visitLabel(l27); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitLabel(l28); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {INTEGER}); + mv.visitVarInsn(ISTORE, 6); + mv.visitLabel(l25); + mv.visitLineNumber(88, l25); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ILOAD, 6); + mv.visitJumpInsn(IFEQ, l6); + Label l29 = new Label(); + mv.visitLabel(l29); + mv.visitLineNumber(89, l29); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_1); + mv.visitInsn(AALOAD); + mv.visitInsn(DUP); + mv.visitFieldInsn(GETFIELD, ""+aItemStack+"", "stackSize", "I"); + mv.visitInsn(ICONST_1); + mv.visitInsn(ISUB); + mv.visitFieldInsn(PUTFIELD, ""+aItemStack+"", "stackSize", "I"); + Label l30 = new Label(); + mv.visitLabel(l30); + mv.visitLineNumber(90, l30); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_1); + mv.visitInsn(AALOAD); + mv.visitFieldInsn(GETFIELD, ""+aItemStack+"", "stackSize", "I"); + mv.visitJumpInsn(IFNE, l6); + Label l31 = new Label(); + mv.visitLabel(l31); + mv.visitLineNumber(91, l31); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "containingItems", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_1); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(AASTORE); + mv.visitLabel(l6); + mv.visitLineNumber(97, l6); + mv.visitFrame(F_FULL, 2, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "ticks", "I"); + mv.visitIntInsn(BIPUSH, 100); + mv.visitInsn(IREM); + Label l32 = new Label(); + mv.visitJumpInsn(IFNE, l32); + Label l33 = new Label(); + mv.visitLabel(l33); + mv.visitLineNumber(98, l33); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ACONST_NULL); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); + Label l34 = new Label(); + mv.visitLabel(l34); + mv.visitLineNumber(99, l34); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "VALID_DIRECTIONS", "[Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ASTORE, 4); + Label l35 = new Label(); + mv.visitLabel(l35); + mv.visitLineNumber(100, l35); + mv.visitVarInsn(ALOAD, 4); + mv.visitInsn(ARRAYLENGTH); + mv.visitVarInsn(ISTORE, 3); + Label l36 = new Label(); + mv.visitLabel(l36); + mv.visitLineNumber(102, l36); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ISTORE, 2); + Label l37 = new Label(); + mv.visitLabel(l37); + Label l38 = new Label(); + mv.visitJumpInsn(GOTO, l38); + Label l39 = new Label(); + mv.visitLabel(l39); + mv.visitLineNumber(103, l39); + mv.visitFrame(F_APPEND,3, new Object[] {INTEGER, INTEGER, "[Lnet/minecraftforge/common/util/ForgeDirection;"}, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ILOAD, 2); + mv.visitInsn(AALOAD); + mv.visitVarInsn(ASTORE, 5); + Label l40 = new Label(); + mv.visitLabel(l40); + mv.visitLineNumber(104, l40); + mv.visitTypeInsn(NEW, "micdoodle8/mods/galacticraft/api/vector/BlockVec3"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "micdoodle8/mods/galacticraft/api/vector/BlockVec3", "", "(L"+aTileEntity+";)V", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "worldObj", "L"+aWorld+";"); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/api/vector/BlockVec3", "getTileEntityOnSide", "(L"+aWorld+";Lnet/minecraftforge/common/util/ForgeDirection;)L"+aTileEntity+";", false); + mv.visitVarInsn(ASTORE, 6); + Label l41 = new Label(); + mv.visitLabel(l41); + mv.visitLineNumber(105, l41); + mv.visitVarInsn(ALOAD, 6); + mv.visitTypeInsn(INSTANCEOF, "micdoodle8/mods/galacticraft/core/tile/TileEntityMulti"); + Label l42 = new Label(); + mv.visitJumpInsn(IFEQ, l42); + Label l43 = new Label(); + mv.visitLabel(l43); + mv.visitLineNumber(106, l43); + mv.visitVarInsn(ALOAD, 6); + mv.visitTypeInsn(CHECKCAST, "micdoodle8/mods/galacticraft/core/tile/TileEntityMulti"); + mv.visitMethodInsn(INVOKEVIRTUAL, "micdoodle8/mods/galacticraft/core/tile/TileEntityMulti", "getMainBlockTile", "()L"+aTileEntity+";", false); + mv.visitVarInsn(ASTORE, 7); + Label l44 = new Label(); + mv.visitLabel(l44); + mv.visitLineNumber(107, l44); + mv.visitVarInsn(ALOAD, 7); + mv.visitTypeInsn(INSTANCEOF, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); + Label l45 = new Label(); + mv.visitJumpInsn(IFEQ, l45); + Label l46 = new Label(); + mv.visitLabel(l46); + mv.visitLineNumber(108, l46); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 7); + mv.visitTypeInsn(CHECKCAST, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); + Label l47 = new Label(); + mv.visitLabel(l47); + mv.visitLineNumber(109, l47); + mv.visitJumpInsn(GOTO, l32); + mv.visitLabel(l42); + mv.visitLineNumber(111, l42); + mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraftforge/common/util/ForgeDirection", ""+aTileEntity+""}, 0, null); + mv.visitVarInsn(ALOAD, 6); + mv.visitTypeInsn(INSTANCEOF, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); + mv.visitJumpInsn(IFEQ, l45); + Label l48 = new Label(); + mv.visitLabel(l48); + mv.visitLineNumber(112, l48); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 6); + mv.visitTypeInsn(CHECKCAST, "micdoodle8/mods/galacticraft/api/entity/IFuelable"); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); + Label l49 = new Label(); + mv.visitLabel(l49); + mv.visitLineNumber(113, l49); + mv.visitJumpInsn(GOTO, l32); + mv.visitLabel(l45); + mv.visitLineNumber(102, l45); + mv.visitFrame(F_CHOP,2, null, 0, null); + mv.visitIincInsn(2, 1); + mv.visitLabel(l38); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitJumpInsn(IF_ICMPLT, l39); + mv.visitLabel(l32); + mv.visitLineNumber(117, l32); + mv.visitFrame(F_CHOP,3, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitJumpInsn(IFNULL, l2); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitJumpInsn(IFNULL, l2); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitJumpInsn(IFLE, l2); + Label l50 = new Label(); + mv.visitLabel(l50); + mv.visitLineNumber(118, l50); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitVarInsn(ASTORE, 4); + Label l51 = new Label(); + mv.visitLabel(l51); + mv.visitLineNumber(119, l51); + mv.visitVarInsn(ALOAD, 4); + Label l52 = new Label(); + mv.visitJumpInsn(IFNONNULL, l52); + Label l53 = new Label(); + mv.visitLabel(l53); + mv.visitLineNumber(120, l53); + mv.visitFieldInsn(GETSTATIC, "gtPlusPlus/core/item/chemistry/RocketFuels", "mValidRocketFuels", "Ljava/util/HashMap;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/HashMap", "values", "()Ljava/util/Collection;", false); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Collection", "iterator", "()Ljava/util/Iterator;", true); + mv.visitVarInsn(ASTORE, 6); + Label l54 = new Label(); + mv.visitJumpInsn(GOTO, l54); + Label l55 = new Label(); + mv.visitLabel(l55); + mv.visitFrame(F_FULL, 7, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, "net/minecraftforge/fluids/FluidStack", TOP, "java/util/Iterator"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 6); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); + mv.visitTypeInsn(CHECKCAST, "net/minecraftforge/fluids/Fluid"); + mv.visitVarInsn(ASTORE, 5); + Label l56 = new Label(); + mv.visitLabel(l56); + mv.visitLineNumber(121, l56); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getFluid", "()Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidStack", "getFluid", "()Lnet/minecraftforge/fluids/Fluid;", false); + mv.visitVarInsn(ALOAD, 5); + mv.visitJumpInsn(IF_ACMPNE, l54); + Label l57 = new Label(); + mv.visitLabel(l57); + mv.visitLineNumber(122, l57); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 5); + mv.visitInsn(ICONST_2); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); + mv.visitVarInsn(ASTORE, 1); + mv.visitLabel(l54); + mv.visitLineNumber(120, l54); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 6); + mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); + mv.visitJumpInsn(IFNE, l55); + mv.visitLabel(l52); + mv.visitLineNumber(126, l52); + mv.visitFrame(F_FULL, 5, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, TOP, "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "getCapacity", "()I", false); + Label l58 = new Label(); + mv.visitJumpInsn(IF_ICMPGE, l58); + Label l59 = new Label(); + mv.visitLabel(l59); + mv.visitLineNumber(127, l59); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 4); + mv.visitInsn(ICONST_2); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/FluidStack;I)V", false); + mv.visitVarInsn(ASTORE, 1); + mv.visitLabel(l58); + mv.visitLineNumber(130, l58); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitJumpInsn(IFNULL, l2); + Label l60 = new Label(); + mv.visitLabel(l60); + mv.visitLineNumber(131, l60); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); + mv.visitJumpInsn(IFNULL, l2); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "hasEnoughEnergyToRun", "Z"); + mv.visitJumpInsn(IFEQ, l2); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "disabled", "Z"); + mv.visitJumpInsn(IFNE, l2); + Label l61 = new Label(); + mv.visitLabel(l61); + mv.visitLineNumber(132, l61); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/galacticraft/util/GalacticUtils", "getRocketTier", "(Ljava/lang/Object;)I", false); + mv.visitVarInsn(ISTORE, 5); + Label l62 = new Label(); + mv.visitLabel(l62); + mv.visitLineNumber(133, l62); + mv.visitVarInsn(ILOAD, 5); + mv.visitJumpInsn(IFLE, l2); + Label l63 = new Label(); + mv.visitLabel(l63); + mv.visitLineNumber(134, l63); + mv.visitVarInsn(ILOAD, 5); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/galacticraft/util/GalacticUtils", "isFuelValidForTier", "(ILnet/minecraftforge/fluids/FluidStack;)Z", false); + mv.visitJumpInsn(IFEQ, l2); + Label l64 = new Label(); + mv.visitLabel(l64); + mv.visitLineNumber(135, l64); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "attachedFuelable", "Lmicdoodle8/mods/galacticraft/api/entity/IFuelable;"); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEINTERFACE, "micdoodle8/mods/galacticraft/api/entity/IFuelable", "addFuel", "(Lnet/minecraftforge/fluids/FluidStack;Z)I", true); + mv.visitVarInsn(ISTORE, 3); + Label l65 = new Label(); + mv.visitLabel(l65); + mv.visitLineNumber(136, l65); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 3); + Label l66 = new Label(); + mv.visitJumpInsn(IFLE, l66); + mv.visitInsn(ICONST_1); + Label l67 = new Label(); + mv.visitJumpInsn(GOTO, l67); + mv.visitLabel(l66); + mv.visitFrame(F_FULL, 6, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER}, 1, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader"}); + mv.visitInsn(ICONST_0); + mv.visitLabel(l67); + mv.visitFrame(F_FULL, 6, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "net/minecraftforge/fluids/FluidStack", TOP, INTEGER, "net/minecraftforge/fluids/FluidStack", INTEGER}, 2, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", INTEGER}); + mv.visitFieldInsn(PUTFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "loadedFuelLastTick", "Z"); + Label l68 = new Label(); + mv.visitLabel(l68); + mv.visitLineNumber(137, l68); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader", "fuelTank", "Lnet/minecraftforge/fluids/FluidTank;"); + mv.visitVarInsn(ILOAD, 3); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/fluids/FluidTank", "drain", "(IZ)Lnet/minecraftforge/fluids/FluidStack;", false); + mv.visitInsn(POP); + mv.visitLabel(l2); + mv.visitLineNumber(144, l2); + mv.visitFrame(F_FULL, 1, new Object[] {"micdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader"}, 0, new Object[] {}); + mv.visitInsn(RETURN); + Label l69 = new Label(); + mv.visitLabel(l69); + mv.visitLocalVariable("this", "Lmicdoodle8/mods/galacticraft/core/tile/TileEntityFuelLoader;", null, l0, l69, 0); + mv.visitLocalVariable("liquid", "Lnet/minecraftforge/fluids/FluidStack;", null, l5, l2, 1); + mv.visitLocalVariable("amount", "I", null, l37, l32, 2); + mv.visitLocalVariable("filled", "I", null, l36, l32, 3); + mv.visitLocalVariable("filled", "I", null, l65, l2, 3); + mv.visitLocalVariable("isFuel", "Z", null, l10, l6, 4); + mv.visitLocalVariable("liquidInTank", "Lnet/minecraftforge/fluids/FluidStack;", null, l13, l6, 5); + mv.visitLocalVariable("didFill", "Z", null, l14, l6, 6); + mv.visitLocalVariable("aFuelType", "Lnet/minecraftforge/fluids/Fluid;", null, l20, l18, 7); + mv.visitLocalVariable("var8", "[Lnet/minecraftforge/common/util/ForgeDirection;", null, l35, l32, 4); + mv.visitLocalVariable("dir", "Lnet/minecraftforge/common/util/ForgeDirection;", null, l40, l45, 5); + mv.visitLocalVariable("pad", "L"+aTileEntity+";", null, l41, l45, 6); + mv.visitLocalVariable("mainTile", "L"+aTileEntity+";", null, l44, l42, 7); + mv.visitLocalVariable("liquidInTank", "Lnet/minecraftforge/fluids/FluidStack;", null, l51, l2, 4); + mv.visitLocalVariable("aFuelType", "Lnet/minecraftforge/fluids/Fluid;", null, l56, l54, 5); + mv.visitLocalVariable("aTier", "I", null, l62, l2, 5); + mv.visitMaxs(5, 9); + mv.visitEnd(); + } + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Inspecting Class "+className); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("updateEntity")) { + FMLRelaunchLog.log("[GT++ ASM] Galacticraft Fuel_Loader Patch", Level.INFO, "Removing method "+name); + return null; + } + + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java new file mode 100644 index 0000000000..2b9729a8a3 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements.java @@ -0,0 +1,1896 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.AnnotationVisitor; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import net.minecraftforge.common.MinecraftForge; + +public class ClassTransformer_GT_Achievements { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private static boolean mDidRemoveAssLineRecipeAdder = false; + + public ClassTransformer_GT_Achievements(byte[] basicClass) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + + aTempReader.accept(new MethodAdaptor(aTempWriter), 0); + + if (mDidRemoveAssLineRecipeAdder) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patching GT .09"); + injectMethod(aTempWriter); + patchOnItemPickup09(aTempWriter); + } + else { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patching GT .08"); + patchOnItemPickup08(aTempWriter); + } + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Valid? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "registerAssAchievement" + "."); + + /** + * Inject new, safer code + */ + + + /*mv = cw.visitMethod(ACC_PUBLIC, "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", null, null); + mv.visitCode(); + Label l0 = new Label(); + Label l1 = new Label(); + Label l2 = new Label(); + mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(291, l3); + mv.visitVarInsn(ALOAD, 1); + Label l4 = new Label(); + mv.visitJumpInsn(IFNONNULL, l4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(292, l5); + mv.visitLdcInsn("Someone tried to register an achievement for an invalid recipe. Please report this to Alkalus."); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/api/objects/Logger", "INFO", "(Ljava/lang/String;)V", false); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(293, l6); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l4); + mv.visitLineNumber(295, l4); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); + Label l7 = new Label(); + mv.visitJumpInsn(IFNONNULL, l7); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(296, l8); + mv.visitLdcInsn("Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/api/objects/Logger", "INFO", "(Ljava/lang/String;)V", false); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(297, l9); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l7); + mv.visitLineNumber(299, l7); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); + mv.visitVarInsn(ASTORE, 3); + mv.visitLabel(l0); + mv.visitLineNumber(301, l0); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitVarInsn(ASTORE, 2); + mv.visitLabel(l1); + mv.visitLineNumber(302, l1); + Label l10 = new Label(); + mv.visitJumpInsn(GOTO, l10); + mv.visitLabel(l2); + mv.visitLineNumber(303, l2); + mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/loaders/misc/GT_Achievements", "gregtech/api/util/GT_Recipe", TOP, "net/minecraft/item/ItemStack"}, 1, new Object[] {"java/lang/Throwable"}); + mv.visitVarInsn(ASTORE, 4); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(304, l11); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/ItemUtils", "getUnlocalizedItemName", "(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;", false); + mv.visitVarInsn(ASTORE, 2); + mv.visitLabel(l10); + mv.visitLineNumber(306, l10); + mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/loaders/misc/GT_Achievements", "gregtech/api/util/GT_Recipe", "java/lang/String", "net/minecraft/item/ItemStack"}, 0, new Object[] {}); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/loaders/misc/GT_Achievements", "achievementList", "Ljava/util/concurrent/ConcurrentHashMap;"); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/concurrent/ConcurrentHashMap", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false); + Label l12 = new Label(); + mv.visitJumpInsn(IFNONNULL, l12); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(307, l13); + mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + mv.visitInsn(ICONST_1); + mv.visitInsn(IADD); + mv.visitFieldInsn(PUTSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(308, l14); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitIntInsn(BIPUSH, 11); + mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + mv.visitInsn(ICONST_5); + mv.visitInsn(IREM); + mv.visitInsn(IADD); + mv.visitInsn(INEG); + mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + mv.visitInsn(ICONST_5); + mv.visitInsn(IDIV); + mv.visitIntInsn(BIPUSH, 8); + mv.visitInsn(ISUB); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); + mv.visitFieldInsn(GETSTATIC, "net/minecraft/stats/AchievementList", "openInventory", "Lnet/minecraft/stats/Achievement;"); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "registerAchievement", "(Ljava/lang/String;IILnet/minecraft/item/ItemStack;Lnet/minecraft/stats/Achievement;Z)Lnet/minecraft/stats/Achievement;", false); + mv.visitInsn(ARETURN); + mv.visitLabel(l12); + mv.visitLineNumber(310, l12); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l3, l15, 0); + mv.visitLocalVariable("recipe", "Lgregtech/api/util/GT_Recipe;", null, l3, l15, 1); + mv.visitLocalVariable("aSafeUnlocalName", "Ljava/lang/String;", null, l1, l2, 2); + mv.visitLocalVariable("aSafeUnlocalName", "Ljava/lang/String;", null, l10, l15, 2); + mv.visitLocalVariable("aStack", "Lnet/minecraft/item/ItemStack;", null, l0, l15, 3); + mv.visitLocalVariable("t", "Ljava/lang/Throwable;", null, l11, l10, 4); + mv.visitMaxs(7, 5); + mv.visitEnd();*/ + + //Lets just static call my replacement function + mv = cw.visitMethod(ACC_PUBLIC, "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(291, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/gregtech/loaders/misc/AssLineAchievements", "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l1, 0); + mv.visitLocalVariable("recipe", "Lgregtech/api/util/GT_Recipe;", null, l0, l1, 1); + mv.visitMaxs(1, 2); + mv.visitEnd(); + + didInject = true; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + + + public boolean patchOnItemPickup08(ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "onItemPickup" + "."); + + AnnotationVisitor av0; + mv = cw.visitMethod(ACC_PUBLIC, "onItemPickup", "(Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;)V", null, null); + av0 = mv.visitAnnotation("Lcpw/mods/fml/common/eventhandler/SubscribeEvent;", true); + av0.visitEnd(); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(418, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "entityPlayer", "Lnet/minecraft/entity/player/EntityPlayer;"); + mv.visitVarInsn(ASTORE, 2); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(419, l1); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "item", "Lnet/minecraft/entity/item/EntityItem;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/item/EntityItem", "getEntityItem", "()Lnet/minecraft/item/ItemStack;", false); + mv.visitVarInsn(ASTORE, 3); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(420, l2); + mv.visitVarInsn(ALOAD, 2); + Label l3 = new Label(); + mv.visitJumpInsn(IFNULL, l3); + mv.visitVarInsn(ALOAD, 3); + Label l4 = new Label(); + mv.visitJumpInsn(IFNONNULL, l4); + mv.visitLabel(l3); + mv.visitLineNumber(421, l3); + mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraft/entity/player/EntityPlayer", "net/minecraft/item/ItemStack"}, 0, null); + mv.visitInsn(RETURN); + mv.visitLabel(l4); + mv.visitLineNumber(424, l4); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gregtech/api/util/GT_OreDictUnificator", "getItemData", "(Lnet/minecraft/item/ItemStack;)Lgregtech/api/objects/ItemData;", false); + mv.visitVarInsn(ASTORE, 4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(425, l5); + mv.visitVarInsn(ALOAD, 4); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(426, l7); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "dust", "Lgregtech/api/enums/OrePrefixes;"); + Label l8 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l8); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(427, l9); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Lutetium", "Lgregtech/api/enums/Materials;"); + Label l10 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l10); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(428, l11); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("newmetal"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l10); + mv.visitLineNumber(430, l10); + mv.visitFrame(F_APPEND,1, new Object[] {"gregtech/api/objects/ItemData"}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("cleandust"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(431, l12); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l8); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "ore", "Lgregtech/api/enums/OrePrefixes;"); + Label l13 = new Label(); + mv.visitJumpInsn(IF_ACMPEQ, l13); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreBlackgranite", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IF_ACMPEQ, l13); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreEndstone", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IF_ACMPEQ, l13); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(432, l14); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreNetherrack", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IF_ACMPEQ, l13); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "oreRedgranite", "Lgregtech/api/enums/OrePrefixes;"); + Label l15 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l15); + mv.visitLabel(l13); + mv.visitLineNumber(433, l13); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ISTORE, 5); + Label l16 = new Label(); + mv.visitLabel(l16); + Label l17 = new Label(); + mv.visitJumpInsn(GOTO, l17); + Label l18 = new Label(); + mv.visitLabel(l18); + mv.visitLineNumber(434, l18); + mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitVarInsn(ILOAD, 5); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/enums/Materials", "name", "()Ljava/lang/String;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l19 = new Label(); + mv.visitLabel(l19); + mv.visitLineNumber(435, l19); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitVarInsn(ILOAD, 5); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "AnyIron", "Lgregtech/api/enums/Materials;"); + Label l20 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l20); + Label l21 = new Label(); + mv.visitLabel(l21); + mv.visitLineNumber(436, l21); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("iron"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l20); + mv.visitLineNumber(433, l20); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitIincInsn(5, 1); + mv.visitLabel(l17); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ILOAD, 5); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "size", "()I", false); + mv.visitJumpInsn(IF_ICMPLT, l18); + Label l22 = new Label(); + mv.visitLabel(l22); + mv.visitLineNumber(439, l22); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l15); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushed", "Lgregtech/api/enums/OrePrefixes;"); + Label l23 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l23); + Label l24 = new Label(); + mv.visitLabel(l24); + mv.visitLineNumber(440, l24); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("crushed"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l25 = new Label(); + mv.visitLabel(l25); + mv.visitLineNumber(441, l25); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l23); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedPurified", "Lgregtech/api/enums/OrePrefixes;"); + Label l26 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l26); + Label l27 = new Label(); + mv.visitLabel(l27); + mv.visitLineNumber(442, l27); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("washing"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l28 = new Label(); + mv.visitLabel(l28); + mv.visitLineNumber(443, l28); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l26); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedCentrifuged", "Lgregtech/api/enums/OrePrefixes;"); + Label l29 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l29); + Label l30 = new Label(); + mv.visitLabel(l30); + mv.visitLineNumber(444, l30); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("spinit"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l31 = new Label(); + mv.visitLabel(l31); + mv.visitLineNumber(445, l31); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l29); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Steel", "Lgregtech/api/enums/Materials;"); + Label l32 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l32); + Label l33 = new Label(); + mv.visitLabel(l33); + mv.visitLineNumber(446, l33); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "ingot", "Lgregtech/api/enums/OrePrefixes;"); + Label l34 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l34); + mv.visitVarInsn(ALOAD, 3); + mv.visitFieldInsn(GETFIELD, "net/minecraft/item/ItemStack", "stackSize", "I"); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getMaxStackSize", "()I", false); + mv.visitJumpInsn(IF_ICMPNE, l34); + Label l35 = new Label(); + mv.visitLabel(l35); + mv.visitLineNumber(447, l35); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("steel"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l36 = new Label(); + mv.visitLabel(l36); + mv.visitLineNumber(448, l36); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l34); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "nugget", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IF_ACMPNE, l6); + mv.visitLdcInsn("Thaumcraft"); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/Loader", "isModLoaded", "(Ljava/lang/String;)Z", false); + mv.visitJumpInsn(IFEQ, l6); + Label l37 = new Label(); + mv.visitLabel(l37); + mv.visitLineNumber(449, l37); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/player/EntityPlayer", "getDisplayName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("GT_IRON_TO_STEEL"); + mv.visitMethodInsn(INVOKESTATIC, "thaumcraft/api/ThaumcraftApiHelper", "isResearchComplete", "(Ljava/lang/String;Ljava/lang/String;)Z", false); + mv.visitJumpInsn(IFEQ, l6); + Label l38 = new Label(); + mv.visitLabel(l38); + mv.visitLineNumber(450, l38); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("steel"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l39 = new Label(); + mv.visitLabel(l39); + mv.visitLineNumber(453, l39); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l32); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "circuit", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IF_ACMPNE, l6); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Advanced", "Lgregtech/api/enums/Materials;"); + mv.visitJumpInsn(IF_ACMPNE, l6); + Label l40 = new Label(); + mv.visitLabel(l40); + mv.visitLineNumber(454, l40); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("stepforward"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l6); + mv.visitLineNumber(457, l6); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem."); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "startsWith", "(Ljava/lang/String;)Z", false); + Label l41 = new Label(); + mv.visitJumpInsn(IFEQ, l41); + Label l42 = new Label(); + mv.visitLabel(l42); + mv.visitLineNumber(458, l42); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32500"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l43 = new Label(); + mv.visitJumpInsn(IFEQ, l43); + Label l44 = new Label(); + mv.visitLabel(l44); + mv.visitLineNumber(459, l44); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestlead"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l45 = new Label(); + mv.visitLabel(l45); + mv.visitLineNumber(460, l45); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l43); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32501"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l46 = new Label(); + mv.visitJumpInsn(IFEQ, l46); + Label l47 = new Label(); + mv.visitLabel(l47); + mv.visitLineNumber(461, l47); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestsilver"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l48 = new Label(); + mv.visitLabel(l48); + mv.visitLineNumber(462, l48); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l46); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32503"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l49 = new Label(); + mv.visitJumpInsn(IFEQ, l49); + Label l50 = new Label(); + mv.visitLabel(l50); + mv.visitLineNumber(463, l50); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestiron"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l51 = new Label(); + mv.visitLabel(l51); + mv.visitLineNumber(464, l51); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l49); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32504"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l52 = new Label(); + mv.visitJumpInsn(IFEQ, l52); + Label l53 = new Label(); + mv.visitLabel(l53); + mv.visitLineNumber(465, l53); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestgold"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l54 = new Label(); + mv.visitLabel(l54); + mv.visitLineNumber(466, l54); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l52); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32530"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l55 = new Label(); + mv.visitJumpInsn(IFEQ, l55); + Label l56 = new Label(); + mv.visitLabel(l56); + mv.visitLineNumber(467, l56); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestcopper"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l57 = new Label(); + mv.visitLabel(l57); + mv.visitLineNumber(468, l57); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l55); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32540"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l58 = new Label(); + mv.visitJumpInsn(IFEQ, l58); + Label l59 = new Label(); + mv.visitLabel(l59); + mv.visitLineNumber(469, l59); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havesttin"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l60 = new Label(); + mv.visitLabel(l60); + mv.visitLineNumber(470, l60); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l58); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32510"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l61 = new Label(); + mv.visitJumpInsn(IFEQ, l61); + Label l62 = new Label(); + mv.visitLabel(l62); + mv.visitLineNumber(471, l62); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestoil"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l63 = new Label(); + mv.visitLabel(l63); + mv.visitLineNumber(472, l63); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l61); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32511"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l64 = new Label(); + mv.visitJumpInsn(IFEQ, l64); + Label l65 = new Label(); + mv.visitLabel(l65); + mv.visitLineNumber(473, l65); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestemeralds"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l66 = new Label(); + mv.visitLabel(l66); + mv.visitLineNumber(474, l66); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l64); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32706"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l67 = new Label(); + mv.visitJumpInsn(IFEQ, l67); + Label l68 = new Label(); + mv.visitLabel(l68); + mv.visitLineNumber(475, l68); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("energyflow"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l69 = new Label(); + mv.visitLabel(l69); + mv.visitLineNumber(476, l69); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l67); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32702"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l70 = new Label(); + mv.visitJumpInsn(IFEQ, l70); + Label l71 = new Label(); + mv.visitLabel(l71); + mv.visitLineNumber(477, l71); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("bettercircuits"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l72 = new Label(); + mv.visitLabel(l72); + mv.visitLineNumber(478, l72); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l70); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32707"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l73 = new Label(); + mv.visitJumpInsn(IFEQ, l73); + Label l74 = new Label(); + mv.visitLabel(l74); + mv.visitLineNumber(479, l74); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("datasaving"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l75 = new Label(); + mv.visitLabel(l75); + mv.visitLineNumber(480, l75); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l73); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32597"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l76 = new Label(); + mv.visitJumpInsn(IFEQ, l76); + Label l77 = new Label(); + mv.visitLabel(l77); + mv.visitLineNumber(481, l77); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("orbs"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l78 = new Label(); + mv.visitLabel(l78); + mv.visitLineNumber(482, l78); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l76); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32599"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l79 = new Label(); + mv.visitJumpInsn(IFEQ, l79); + Label l80 = new Label(); + mv.visitLabel(l80); + mv.visitLineNumber(483, l80); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("thatspower"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l81 = new Label(); + mv.visitLabel(l81); + mv.visitLineNumber(484, l81); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l79); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32598"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l82 = new Label(); + mv.visitJumpInsn(IFEQ, l82); + Label l83 = new Label(); + mv.visitLabel(l83); + mv.visitLineNumber(485, l83); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("luck"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l84 = new Label(); + mv.visitLabel(l84); + mv.visitLineNumber(486, l84); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l82); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32749"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l85 = new Label(); + mv.visitJumpInsn(IFEQ, l85); + Label l86 = new Label(); + mv.visitLabel(l86); + mv.visitLineNumber(487, l86); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("closeit"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l87 = new Label(); + mv.visitLabel(l87); + mv.visitLineNumber(488, l87); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l85); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32730"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l88 = new Label(); + mv.visitJumpInsn(IFEQ, l88); + Label l89 = new Label(); + mv.visitLabel(l89); + mv.visitLineNumber(489, l89); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("manipulation"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l90 = new Label(); + mv.visitLabel(l90); + mv.visitLineNumber(490, l90); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l88); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32729"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l91 = new Label(); + mv.visitJumpInsn(IFEQ, l91); + Label l92 = new Label(); + mv.visitLabel(l92); + mv.visitLineNumber(491, l92); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("filterregulate"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l93 = new Label(); + mv.visitLabel(l93); + mv.visitLineNumber(492, l93); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l91); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32605"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l94 = new Label(); + mv.visitJumpInsn(IFEQ, l94); + Label l95 = new Label(); + mv.visitLabel(l95); + mv.visitLineNumber(493, l95); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("whatnow"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l96 = new Label(); + mv.visitLabel(l96); + mv.visitLineNumber(494, l96); + mv.visitJumpInsn(GOTO, l41); + mv.visitLabel(l94); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.Thoriumcell"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + mv.visitJumpInsn(IFEQ, l41); + Label l97 = new Label(); + mv.visitLabel(l97); + mv.visitLineNumber(495, l97); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("newfuel"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l41); + mv.visitLineNumber(498, l41); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + Label l98 = new Label(); + mv.visitLabel(l98); + mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l98, 0); + mv.visitLocalVariable("event", "Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;", null, l0, l98, 1); + mv.visitLocalVariable("player", "Lnet/minecraft/entity/player/EntityPlayer;", null, l1, l98, 2); + mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l2, l98, 3); + mv.visitLocalVariable("data", "Lgregtech/api/objects/ItemData;", null, l5, l98, 4); + mv.visitLocalVariable("i", "I", null, l16, l22, 5); + mv.visitMaxs(4, 6); + mv.visitEnd(); + + + didInject = true; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + + public boolean patchOnItemPickup09(ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "onItemPickup" + "."); + + /** + * Inject new, safer code + */ + AnnotationVisitor av0; + mv = cw.visitMethod(ACC_PUBLIC, "onItemPickup", "(Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;)V", null, null); + av0 = mv.visitAnnotation("Lcpw/mods/fml/common/eventhandler/SubscribeEvent;", true); + av0.visitEnd(); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(546, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "entityPlayer", "Lnet/minecraft/entity/player/EntityPlayer;"); + mv.visitVarInsn(ASTORE, 2); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(547, l1); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "item", "Lnet/minecraft/entity/item/EntityItem;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/item/EntityItem", "getEntityItem", "()Lnet/minecraft/item/ItemStack;", false); + mv.visitVarInsn(ASTORE, 3); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(548, l2); + mv.visitVarInsn(ALOAD, 2); + Label l3 = new Label(); + mv.visitJumpInsn(IFNULL, l3); + mv.visitVarInsn(ALOAD, 3); + Label l4 = new Label(); + mv.visitJumpInsn(IFNONNULL, l4); + mv.visitLabel(l3); + mv.visitLineNumber(549, l3); + mv.visitFrame(F_APPEND,2, new Object[] {"net/minecraft/entity/player/EntityPlayer", "net/minecraft/item/ItemStack"}, 0, null); + mv.visitInsn(RETURN); + mv.visitLabel(l4); + mv.visitLineNumber(551, l4); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gregtech/api/util/GT_OreDictUnificator", "getItemData", "(Lnet/minecraft/item/ItemStack;)Lgregtech/api/objects/ItemData;", false); + mv.visitVarInsn(ASTORE, 4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(552, l5); + mv.visitVarInsn(ALOAD, 4); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IFNULL, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(553, l7); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "dust", "Lgregtech/api/enums/OrePrefixes;"); + Label l8 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l8); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(554, l9); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Lutetium", "Lgregtech/api/enums/Materials;"); + Label l10 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l10); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(555, l11); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("newmetal"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l10); + mv.visitLineNumber(557, l10); + mv.visitFrame(F_APPEND,1, new Object[] {"gregtech/api/objects/ItemData"}, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Gunpowder", "Lgregtech/api/enums/Materials;"); + mv.visitJumpInsn(IF_ACMPEQ, l6); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(558, l12); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("cleandust"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(560, l13); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l8); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/enums/OrePrefixes", "name", "()Ljava/lang/String;", false); + mv.visitLdcInsn("ore"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "startsWith", "(Ljava/lang/String;)Z", false); + Label l14 = new Label(); + mv.visitJumpInsn(IFEQ, l14); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(561, l15); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "size", "()I", false); + mv.visitVarInsn(ISTORE, 5); + Label l16 = new Label(); + mv.visitLabel(l16); + mv.visitLineNumber(562, l16); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ISTORE, 6); + Label l17 = new Label(); + mv.visitLabel(l17); + Label l18 = new Label(); + mv.visitJumpInsn(GOTO, l18); + Label l19 = new Label(); + mv.visitLabel(l19); + mv.visitLineNumber(563, l19); + mv.visitFrame(F_APPEND,2, new Object[] {INTEGER, INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitVarInsn(ILOAD, 6); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/enums/Materials", "mName", "Ljava/lang/String;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l20 = new Label(); + mv.visitLabel(l20); + mv.visitLineNumber(564, l20); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitVarInsn(ILOAD, 6); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Iron", "Lgregtech/api/enums/Materials;"); + Label l21 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l21); + Label l22 = new Label(); + mv.visitLabel(l22); + mv.visitLineNumber(565, l22); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("iron"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l21); + mv.visitLineNumber(567, l21); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitVarInsn(ILOAD, 6); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Copper", "Lgregtech/api/enums/Materials;"); + Label l23 = new Label(); + mv.visitJumpInsn(IF_ACMPEQ, l23); + mv.visitVarInsn(ALOAD, 4); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/objects/ItemData", "getAllMaterialStacks", "()Ljava/util/ArrayList;", false); + mv.visitVarInsn(ILOAD, 6); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "get", "(I)Ljava/lang/Object;", false); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/objects/MaterialStack"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Tin", "Lgregtech/api/enums/Materials;"); + Label l24 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l24); + mv.visitLabel(l23); + mv.visitLineNumber(568, l23); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/event/entity/player/EntityItemPickupEvent", "entityPlayer", "Lnet/minecraft/entity/player/EntityPlayer;"); + mv.visitLdcInsn("mineOre"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l24); + mv.visitLineNumber(562, l24); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitIincInsn(6, 1); + mv.visitLabel(l18); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ILOAD, 6); + mv.visitVarInsn(ILOAD, 5); + mv.visitJumpInsn(IF_ICMPLT, l19); + Label l25 = new Label(); + mv.visitLabel(l25); + mv.visitLineNumber(572, l25); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l14); + mv.visitFrame(F_CHOP,2, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushed", "Lgregtech/api/enums/OrePrefixes;"); + Label l26 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l26); + Label l27 = new Label(); + mv.visitLabel(l27); + mv.visitLineNumber(573, l27); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("crushed"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l28 = new Label(); + mv.visitLabel(l28); + mv.visitLineNumber(574, l28); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l26); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedPurified", "Lgregtech/api/enums/OrePrefixes;"); + Label l29 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l29); + Label l30 = new Label(); + mv.visitLabel(l30); + mv.visitLineNumber(575, l30); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("washing"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l31 = new Label(); + mv.visitLabel(l31); + mv.visitLineNumber(576, l31); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l29); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "crushedCentrifuged", "Lgregtech/api/enums/OrePrefixes;"); + Label l32 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l32); + Label l33 = new Label(); + mv.visitLabel(l33); + mv.visitLineNumber(577, l33); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("spinit"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l34 = new Label(); + mv.visitLabel(l34); + mv.visitLineNumber(578, l34); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l32); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mMaterial", "Lgregtech/api/objects/MaterialStack;"); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/MaterialStack", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/Materials", "Steel", "Lgregtech/api/enums/Materials;"); + mv.visitJumpInsn(IF_ACMPNE, l6); + Label l35 = new Label(); + mv.visitLabel(l35); + mv.visitLineNumber(579, l35); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "ingot", "Lgregtech/api/enums/OrePrefixes;"); + Label l36 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l36); + mv.visitVarInsn(ALOAD, 3); + mv.visitFieldInsn(GETFIELD, "net/minecraft/item/ItemStack", "stackSize", "I"); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getMaxStackSize", "()I", false); + mv.visitJumpInsn(IF_ICMPNE, l36); + Label l37 = new Label(); + mv.visitLabel(l37); + mv.visitLineNumber(580, l37); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("steel"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l38 = new Label(); + mv.visitLabel(l38); + mv.visitLineNumber(581, l38); + mv.visitJumpInsn(GOTO, l6); + mv.visitLabel(l36); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitFieldInsn(GETFIELD, "gregtech/api/objects/ItemData", "mPrefix", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/enums/OrePrefixes", "nugget", "Lgregtech/api/enums/OrePrefixes;"); + mv.visitJumpInsn(IF_ACMPNE, l6); + mv.visitLdcInsn("Thaumcraft"); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/Loader", "isModLoaded", "(Ljava/lang/String;)Z", false); + mv.visitJumpInsn(IFEQ, l6); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/entity/player/EntityPlayer", "getDisplayName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("GT_IRON_TO_STEEL"); + mv.visitMethodInsn(INVOKESTATIC, "thaumcraft/api/ThaumcraftApiHelper", "isResearchComplete", "(Ljava/lang/String;Ljava/lang/String;)Z", false); + mv.visitJumpInsn(IFEQ, l6); + Label l39 = new Label(); + mv.visitLabel(l39); + mv.visitLineNumber(582, l39); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("steel"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l6); + mv.visitLineNumber(589, l6); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem."); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "startsWith", "(Ljava/lang/String;)Z", false); + Label l40 = new Label(); + mv.visitJumpInsn(IFEQ, l40); + Label l41 = new Label(); + mv.visitLabel(l41); + mv.visitLineNumber(590, l41); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32500"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l42 = new Label(); + mv.visitJumpInsn(IFEQ, l42); + Label l43 = new Label(); + mv.visitLabel(l43); + mv.visitLineNumber(591, l43); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestlead"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l44 = new Label(); + mv.visitLabel(l44); + mv.visitLineNumber(592, l44); + Label l45 = new Label(); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l42); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32501"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l46 = new Label(); + mv.visitJumpInsn(IFEQ, l46); + Label l47 = new Label(); + mv.visitLabel(l47); + mv.visitLineNumber(593, l47); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestsilver"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l48 = new Label(); + mv.visitLabel(l48); + mv.visitLineNumber(594, l48); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l46); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32503"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l49 = new Label(); + mv.visitJumpInsn(IFEQ, l49); + Label l50 = new Label(); + mv.visitLabel(l50); + mv.visitLineNumber(595, l50); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestiron"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l51 = new Label(); + mv.visitLabel(l51); + mv.visitLineNumber(596, l51); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l49); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32504"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l52 = new Label(); + mv.visitJumpInsn(IFEQ, l52); + Label l53 = new Label(); + mv.visitLabel(l53); + mv.visitLineNumber(597, l53); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestgold"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l54 = new Label(); + mv.visitLabel(l54); + mv.visitLineNumber(598, l54); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l52); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32530"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l55 = new Label(); + mv.visitJumpInsn(IFEQ, l55); + Label l56 = new Label(); + mv.visitLabel(l56); + mv.visitLineNumber(599, l56); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestcopper"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l57 = new Label(); + mv.visitLabel(l57); + mv.visitLineNumber(600, l57); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l55); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32540"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l58 = new Label(); + mv.visitJumpInsn(IFEQ, l58); + Label l59 = new Label(); + mv.visitLabel(l59); + mv.visitLineNumber(601, l59); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havesttin"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l60 = new Label(); + mv.visitLabel(l60); + mv.visitLineNumber(602, l60); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l58); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32510"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l61 = new Label(); + mv.visitJumpInsn(IFEQ, l61); + Label l62 = new Label(); + mv.visitLabel(l62); + mv.visitLineNumber(603, l62); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestoil"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l63 = new Label(); + mv.visitLabel(l63); + mv.visitLineNumber(604, l63); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l61); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.02.32511"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l64 = new Label(); + mv.visitJumpInsn(IFEQ, l64); + Label l65 = new Label(); + mv.visitLabel(l65); + mv.visitLineNumber(605, l65); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("havestemeralds"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l66 = new Label(); + mv.visitLabel(l66); + mv.visitLineNumber(606, l66); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l64); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32082"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l67 = new Label(); + mv.visitJumpInsn(IFEQ, l67); + Label l68 = new Label(); + mv.visitLabel(l68); + mv.visitLineNumber(607, l68); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("energyflow"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l69 = new Label(); + mv.visitLabel(l69); + mv.visitLineNumber(608, l69); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l67); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32702"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l70 = new Label(); + mv.visitJumpInsn(IFEQ, l70); + Label l71 = new Label(); + mv.visitLabel(l71); + mv.visitLineNumber(609, l71); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("bettercircuits"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l72 = new Label(); + mv.visitLabel(l72); + mv.visitLineNumber(610, l72); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l70); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32707"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l73 = new Label(); + mv.visitJumpInsn(IFEQ, l73); + Label l74 = new Label(); + mv.visitLabel(l74); + mv.visitLineNumber(611, l74); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("datasaving"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l75 = new Label(); + mv.visitLabel(l75); + mv.visitLineNumber(612, l75); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l73); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32597"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l76 = new Label(); + mv.visitJumpInsn(IFEQ, l76); + Label l77 = new Label(); + mv.visitLabel(l77); + mv.visitLineNumber(613, l77); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("orbs"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l78 = new Label(); + mv.visitLabel(l78); + mv.visitLineNumber(614, l78); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l76); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32599"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l79 = new Label(); + mv.visitJumpInsn(IFEQ, l79); + Label l80 = new Label(); + mv.visitLabel(l80); + mv.visitLineNumber(615, l80); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("thatspower"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l81 = new Label(); + mv.visitLabel(l81); + mv.visitLineNumber(616, l81); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l79); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32598"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l82 = new Label(); + mv.visitJumpInsn(IFEQ, l82); + Label l83 = new Label(); + mv.visitLabel(l83); + mv.visitLineNumber(617, l83); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("luck"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l84 = new Label(); + mv.visitLabel(l84); + mv.visitLineNumber(618, l84); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l82); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32749"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l85 = new Label(); + mv.visitJumpInsn(IFEQ, l85); + Label l86 = new Label(); + mv.visitLabel(l86); + mv.visitLineNumber(619, l86); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("closeit"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l87 = new Label(); + mv.visitLabel(l87); + mv.visitLineNumber(620, l87); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l85); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32730"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l88 = new Label(); + mv.visitJumpInsn(IFEQ, l88); + Label l89 = new Label(); + mv.visitLabel(l89); + mv.visitLineNumber(621, l89); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("manipulation"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l90 = new Label(); + mv.visitLabel(l90); + mv.visitLineNumber(622, l90); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l88); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32729"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l91 = new Label(); + mv.visitJumpInsn(IFEQ, l91); + Label l92 = new Label(); + mv.visitLabel(l92); + mv.visitLineNumber(623, l92); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("filterregulate"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l93 = new Label(); + mv.visitLabel(l93); + mv.visitLineNumber(624, l93); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l91); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32605"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l94 = new Label(); + mv.visitJumpInsn(IFEQ, l94); + Label l95 = new Label(); + mv.visitLabel(l95); + mv.visitLineNumber(625, l95); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("whatnow"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l96 = new Label(); + mv.visitLabel(l96); + mv.visitLineNumber(626, l96); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l94); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32736"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l97 = new Label(); + mv.visitJumpInsn(IFEQ, l97); + Label l98 = new Label(); + mv.visitLabel(l98); + mv.visitLineNumber(627, l98); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("zpmage"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l99 = new Label(); + mv.visitLabel(l99); + mv.visitLineNumber(628, l99); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l97); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32737"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l100 = new Label(); + mv.visitJumpInsn(IFEQ, l100); + Label l101 = new Label(); + mv.visitLabel(l101); + mv.visitLineNumber(629, l101); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("uvage"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l102 = new Label(); + mv.visitLabel(l102); + mv.visitLineNumber(630, l102); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l100); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32030"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l103 = new Label(); + mv.visitJumpInsn(IFEQ, l103); + Label l104 = new Label(); + mv.visitLabel(l104); + mv.visitLineNumber(631, l104); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtmonosilicon"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l105 = new Label(); + mv.visitLabel(l105); + mv.visitLineNumber(632, l105); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l103); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32036"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l106 = new Label(); + mv.visitJumpInsn(IFEQ, l106); + Label l107 = new Label(); + mv.visitLabel(l107); + mv.visitLineNumber(633, l107); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtlogicwafer"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l108 = new Label(); + mv.visitLabel(l108); + mv.visitLineNumber(634, l108); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l106); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32701"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l109 = new Label(); + mv.visitJumpInsn(IFEQ, l109); + Label l110 = new Label(); + mv.visitLabel(l110); + mv.visitLineNumber(635, l110); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtlogiccircuit"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l111 = new Label(); + mv.visitLabel(l111); + mv.visitLineNumber(636, l111); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l109); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32085"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l112 = new Label(); + mv.visitJumpInsn(IFEQ, l112); + Label l113 = new Label(); + mv.visitLabel(l113); + mv.visitLineNumber(637, l113); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtquantumprocessor"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l114 = new Label(); + mv.visitLabel(l114); + mv.visitLineNumber(638, l114); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l112); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32089"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l115 = new Label(); + mv.visitJumpInsn(IFEQ, l115); + Label l116 = new Label(); + mv.visitLabel(l116); + mv.visitLineNumber(639, l116); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtcrystalprocessor"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l117 = new Label(); + mv.visitLabel(l117); + mv.visitLineNumber(640, l117); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l115); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32092"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l118 = new Label(); + mv.visitJumpInsn(IFEQ, l118); + Label l119 = new Label(); + mv.visitLabel(l119); + mv.visitLineNumber(641, l119); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtwetware"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l120 = new Label(); + mv.visitLabel(l120); + mv.visitLineNumber(642, l120); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l118); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.03.32095"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l121 = new Label(); + mv.visitJumpInsn(IFEQ, l121); + Label l122 = new Label(); + mv.visitLabel(l122); + mv.visitLineNumber(643, l122); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("gtwetmain"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l123 = new Label(); + mv.visitLabel(l123); + mv.visitLineNumber(644, l123); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l121); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32736"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l124 = new Label(); + mv.visitJumpInsn(IFEQ, l124); + Label l125 = new Label(); + mv.visitLabel(l125); + mv.visitLineNumber(645, l125); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("zpmage"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l126 = new Label(); + mv.visitLabel(l126); + mv.visitLineNumber(646, l126); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l124); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.metaitem.01.32737"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + mv.visitJumpInsn(IFEQ, l45); + Label l127 = new Label(); + mv.visitLabel(l127); + mv.visitLineNumber(647, l127); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("uvage"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l128 = new Label(); + mv.visitLabel(l128); + mv.visitLineNumber(649, l128); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l40); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("gt.Thoriumcell"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + Label l129 = new Label(); + mv.visitJumpInsn(IFEQ, l129); + Label l130 = new Label(); + mv.visitLabel(l130); + mv.visitLineNumber(650, l130); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("newfuel"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l131 = new Label(); + mv.visitLabel(l131); + mv.visitLineNumber(651, l131); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l129); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumBodyarmor", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + Label l132 = new Label(); + mv.visitJumpInsn(IF_ACMPEQ, l132); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumBoots", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + mv.visitJumpInsn(IF_ACMPEQ, l132); + Label l133 = new Label(); + mv.visitLabel(l133); + mv.visitLineNumber(652, l133); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumHelmet", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + mv.visitJumpInsn(IF_ACMPEQ, l132); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + mv.visitFieldInsn(GETSTATIC, "ic2/core/Ic2Items", "quantumLeggings", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getItem", "()Lnet/minecraft/item/Item;", false); + Label l134 = new Label(); + mv.visitJumpInsn(IF_ACMPNE, l134); + mv.visitLabel(l132); + mv.visitLineNumber(653, l132); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("buildQArmor"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + Label l135 = new Label(); + mv.visitLabel(l135); + mv.visitLineNumber(654, l135); + mv.visitJumpInsn(GOTO, l45); + mv.visitLabel(l134); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", "getUnlocalizedName", "()Ljava/lang/String;", false); + mv.visitLdcInsn("ic2.itemPartCircuitAdv"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false); + mv.visitJumpInsn(IFEQ, l45); + Label l136 = new Label(); + mv.visitLabel(l136); + mv.visitLineNumber(655, l136); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitLdcInsn("stepforward"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "issueAchievement", "(Lnet/minecraft/entity/player/EntityPlayer;Ljava/lang/String;)V", false); + mv.visitLabel(l45); + mv.visitLineNumber(657, l45); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + Label l137 = new Label(); + mv.visitLabel(l137); + mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l137, 0); + mv.visitLocalVariable("event", "Lnet/minecraftforge/event/entity/player/EntityItemPickupEvent;", null, l0, l137, 1); + mv.visitLocalVariable("player", "Lnet/minecraft/entity/player/EntityPlayer;", null, l1, l137, 2); + mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l2, l137, 3); + mv.visitLocalVariable("data", "Lgregtech/api/objects/ItemData;", null, l5, l137, 4); + mv.visitLocalVariable("data_getAllMaterialStacks_sS", "I", null, l16, l25, 5); + mv.visitLocalVariable("i", "I", null, l17, l25, 6); + mv.visitMaxs(4, 7); + mv.visitEnd(); + + didInject = true; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + + + + + + + + public class MethodAdaptor extends ClassVisitor { + + public MethodAdaptor(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (name.equals("registerAssAchievement") || name.equals("onItemPickup")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, + "Found method " + name + ", removing."); + methodVisitor = null; + if (name.equals("registerAssAchievement")) { + mDidRemoveAssLineRecipeAdder = true; + } + } else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java new file mode 100644 index 0000000000..fb297ed76e --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Achievements_CrashFix.java @@ -0,0 +1,218 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + +public class ClassTransformer_GT_Achievements_CrashFix { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private final boolean mObfuscated; + private static boolean mDidRemoveAssLineRecipeAdder = false; + + public ClassTransformer_GT_Achievements_CrashFix(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + mObfuscated = obfuscated; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + + aTempReader.accept(new MethodAdaptor(aTempWriter), 0); + + if (mDidRemoveAssLineRecipeAdder) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patching GT .09"); + injectMethod(aTempWriter); + } + else { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Patch not required, skipping."); + } + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Valid? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Injecting " + "registerAssAchievement" + ". Obfuscated? "+mObfuscated); + + /** + * Inject new, safer code + */ + + mv = cw.visitMethod(ACC_PUBLIC, "registerAssAchievement", "(Lgregtech/api/util/GT_Recipe;)Lnet/minecraft/stats/Achievement;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(293, l0); + mv.visitVarInsn(ALOAD, 1); + Label l1 = new Label(); + mv.visitJumpInsn(IFNONNULL, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(294, l2); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("GTPP_MOD: Someone tried to register an achievement for an invalid recipe. Please report this to Alkalus."); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(295, l3); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l1); + mv.visitLineNumber(297, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); + Label l4 = new Label(); + mv.visitJumpInsn(IFNONNULL, l4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(298, l5); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("GTPP_MOD: Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(299, l6); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l4); + mv.visitLineNumber(301, l4); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); + mv.visitVarInsn(ASTORE, 3); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(302, l7); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/ItemUtils", "getUnlocalizedItemName", "(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;", false); + mv.visitVarInsn(ASTORE, 2); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(304, l8); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/loaders/misc/GT_Achievements", "achievementList", "Ljava/util/concurrent/ConcurrentHashMap;"); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/concurrent/ConcurrentHashMap", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false); + Label l9 = new Label(); + mv.visitJumpInsn(IFNONNULL, l9); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(305, l10); + mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + mv.visitInsn(ICONST_1); + mv.visitInsn(IADD); + mv.visitFieldInsn(PUTSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(306, l11); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 2); + mv.visitIntInsn(BIPUSH, 11); + mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + mv.visitInsn(ICONST_5); + mv.visitInsn(IREM); + mv.visitInsn(IADD); + mv.visitInsn(INEG); + mv.visitFieldInsn(GETSTATIC, "gregtech/loaders/misc/GT_Achievements", "assReg", "I"); + mv.visitInsn(ICONST_5); + mv.visitInsn(IDIV); + mv.visitIntInsn(BIPUSH, 8); + mv.visitInsn(ISUB); + mv.visitVarInsn(ALOAD, 1); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/util/GT_Recipe", "getOutput", "(I)Lnet/minecraft/item/ItemStack;", false); + mv.visitLdcInsn("NO_REQUIREMENT"); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/loaders/misc/GT_Achievements", "registerAchievement", "(Ljava/lang/String;IILnet/minecraft/item/ItemStack;Ljava/lang/String;Z)Lnet/minecraft/stats/Achievement;", false); + mv.visitVarInsn(ASTORE, 4); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(307, l12); + Label l13 = new Label(); + mv.visitJumpInsn(GOTO, l13); + mv.visitLabel(l9); + mv.visitLineNumber(309, l9); + mv.visitFrame(F_APPEND,2, new Object[] {"java/lang/String", "net/minecraft/item/ItemStack"}, 0, null); + mv.visitInsn(ACONST_NULL); + mv.visitVarInsn(ASTORE, 4); + mv.visitLabel(l13); + mv.visitLineNumber(311, l13); + mv.visitFrame(F_APPEND,1, new Object[] {"net/minecraft/stats/Achievement"}, 0, null); + mv.visitVarInsn(ALOAD, 4); + mv.visitInsn(ARETURN); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLocalVariable("this", "Lgregtech/loaders/misc/GT_Achievements;", null, l0, l14, 0); + mv.visitLocalVariable("recipe", "Lgregtech/api/util/GT_Recipe;", null, l0, l14, 1); + mv.visitLocalVariable("aSafeUnlocalName", "Ljava/lang/String;", null, l8, l14, 2); + mv.visitLocalVariable("aStack", "Lnet/minecraft/item/ItemStack;", null, l7, l14, 3); + mv.visitLocalVariable("aYouDidSomethingInGT", "Lnet/minecraft/stats/Achievement;", null, l12, l9, 4); + mv.visitLocalVariable("aYouDidSomethingInGT", "Lnet/minecraft/stats/Achievement;", null, l13, l14, 4); + mv.visitMaxs(7, 5); + mv.visitEnd(); + + didInject = true; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + + + public class MethodAdaptor extends ClassVisitor { + + public MethodAdaptor(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (name.equals("registerAssAchievement")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Achievements Patch", Level.INFO, "Found method " + name + ", removing."); + methodVisitor = null; + mDidRemoveAssLineRecipeAdder = true; + } else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java new file mode 100644 index 0000000000..da5859eb55 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BaseMetaTileEntity.java @@ -0,0 +1,158 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; + +public class ClassTransformer_GT_BaseMetaTileEntity { + + //The qualified name of the class we plan to transform. + //gregtech/common/blocks/GT_Block_Machines + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + + public ClassTransformer_GT_BaseMetaTileEntity(byte[] basicClass) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Attempting to make setMetaTileEntity(IMetaTileEntity) safer."); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Valid patch? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + + + if (reader != null && writer != null) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Attempting Method Injection."); + injectMethod("setMetaTileEntity"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Injecting "+aMethodName+"."); + if (aMethodName.equals("setMetaTileEntity")) { + + mv = getWriter().visitMethod(ACC_PUBLIC, "setMetaTileEntity", "(Lgregtech/api/interfaces/metatileentity/IMetaTileEntity;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + Label l1 = new Label(); + Label l2 = new Label(); + mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); + mv.visitLabel(l0); + mv.visitLineNumber(1568, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/metatileentity/MetaTileEntity"); + mv.visitFieldInsn(PUTFIELD, "gregtech/api/metatileentity/BaseMetaTileEntity", "mMetaTileEntity", "Lgregtech/api/metatileentity/MetaTileEntity;"); + mv.visitLabel(l1); + mv.visitLineNumber(1569, l1); + Label l3 = new Label(); + mv.visitJumpInsn(GOTO, l3); + mv.visitLabel(l2); + mv.visitLineNumber(1570, l2); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"}); + mv.visitVarInsn(ASTORE, 2); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(1571, l4); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("[BMTE] Bad Tile Entity set in world, your game would have crashed if not for me!"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(1572, l5); + mv.visitVarInsn(ALOAD, 1); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(1573, l7); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); + mv.visitInsn(DUP); + mv.visitLdcInsn("Tile was of type: "); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "", "(Ljava/lang/String;)V", false); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEINTERFACE, "gregtech/api/interfaces/metatileentity/IMetaTileEntity", "getInventoryName", "()Ljava/lang/String;", true); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + mv.visitLabel(l6); + mv.visitLineNumber(1574, l6); + mv.visitFrame(F_APPEND,1, new Object[] {"java/lang/Throwable"}, 0, null); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace", "()V", false); + mv.visitLabel(l3); + mv.visitLineNumber(1576, l3); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitInsn(RETURN); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/BaseMetaTileEntity;", null, l0, l8, 0); + mv.visitLocalVariable("aMetaTileEntity", "Lgregtech/api/interfaces/metatileentity/IMetaTileEntity;", null, l0, l8, 1); + mv.visitLocalVariable("t", "Ljava/lang/Throwable;", null, l4, l3, 2); + mv.visitMaxs(4, 3); + mv.visitEnd(); + + didInject = true; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (name.equals("setMetaTileEntity")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech setMetaTileEntity Patch", Level.INFO, "Found method "+name+", removing."); + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java new file mode 100644 index 0000000000..dce1fa15d2 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity.java @@ -0,0 +1,286 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ARETURN; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.GETFIELD; +import static org.objectweb.asm.Opcodes.ILOAD; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.IRETURN; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.SubTag; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class ClassTransformer_GT_BlockMachines_MetaPipeEntity { + + //The qualified name of the class we plan to transform. + //gregtech/common/blocks/GT_Block_Machines + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + /** + * Utility Functions + */ + + public static String getHarvestTool(int aMeta) { + //FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting to call getHarvestTool. Meta: "+aMeta); + if (aMeta >= 8 && aMeta <= 11) { + return "cutter"; + } + return "wrench"; + } + + /* + * Used to patch the method in Fluid pipes, Frame Boxes and Item Pipes + */ + /** + * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. + *

+ * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle + * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle + *

+ * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle + * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle + *

+ * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle + * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle + *

+ * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle + * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle + *

+ * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle + * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle + *

+ * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle + * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle + *

+ * == Reserved For Alkalus (Was previously used to allow axes on wooden blocks, but that's fucking stupid.) + *

+ * 12 = BaseCustomPower_MTE, Wrench lvl 0 to dismantle + * 13 = BaseCustomTileEntity, Wrench lvl 1 to dismantle + *

+ * 14 = BaseCustomTileEntity, Wrench lvl 2 to dismantle + * 15 = BaseCustomTileEntity, Wrench lvl 3 to dismantle + */ + public static byte getTileEntityBaseType(Materials mMaterial) { + byte mMetaID; + //Modified code that should never return 12-15 for Wooden items. + //mMetaID = (byte) (mMaterial == null ? 4 : (byte) (4) + Math.max(0, Math.min(3, mMaterial.mToolQuality))); + //Original Code for debug purposes + mMetaID = mMaterial == null ? 4 : (byte) ((mMaterial.contains(SubTag.WOOD) ? 4 : 4) + Math.max(0, Math.min(3, mMaterial.mToolQuality))); + //FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting to call getTileEntityBaseType. Using Meta: "+mMetaID); + return mMetaID; + } + + + + /** + * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. + *

+ * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantle + * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle + *

+ * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle + * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle + *

+ * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle + * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle + *

+ * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle + * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle + *

+ * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle + * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle + *

+ * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle + * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle + *

+ * == Reserved For Alkalus (Was previously used to allow axes on wooden blocks, but that's fucking stupid.) + *

+ * 12 = BaseCustomPower_MTE, Wrench lvl 2 to dismantle + * 13 = BaseCustomTileEntity, Wrench lvl 2 to dismantle + *

+ * 14 = BaseCustomTileEntity, Wrench lvl 3 to dismantle + * 15 = BaseCustomTileEntity, Wrench lvl 3 to dismantle + */ + public static TileEntity createTileEntity(World aWorld, int aMeta) { + //Logger.INFO("Creating Tile Entity with Meta of "+aMeta); + if (aMeta < 4) { + return GregTech_API.constructBaseMetaTileEntity(); + } else if (aMeta < 12) { + return new BaseMetaPipeEntity(); + } else { + //Because Wooden pipes/frames may exist in world, we try cast to the GT++ tile first, if tht fails, we cast a pipe.. + try { + return Meta_GT_Proxy.constructCustomGregtechMetaTileEntityByMeta(aMeta); + } + catch (Throwable c) { + //Returns a pipe entity, once this returns, it should correct itself and no longer error in future. + return new BaseMetaPipeEntity(); + } + } + } + + public static TileEntity createTileEntity_Original(World aWorld, int aMeta) { + // Logger.INFO("Creating Tile Entity with Meta of "+aMeta); + if (aMeta < 4) { + return GregTech_API.constructBaseMetaTileEntity(); + } else { + return new BaseMetaPipeEntity(); + } + } + + int mMode; + + public ClassTransformer_GT_BlockMachines_MetaPipeEntity(byte[] basicClass, int aMode) { + mMode = aMode; + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting to patch in mode "+aMode+"."); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter, mMode), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Valid patch? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + + + if (reader != null && writer != null) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Attempting Method Injection."); + if (aMode == 0) { + injectMethod("getHarvestTool"); + injectMethod("createTileEntity"); + } + else { + injectMethod("getTileEntityBaseType"); + } + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Injecting "+aMethodName+"."); + if (aMethodName.equals("getHarvestTool")) { + mv = getWriter().visitMethod(ACC_PUBLIC, "getHarvestTool", "(I)Ljava/lang/String;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(63, l0); + mv.visitVarInsn(ILOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity", "getHarvestTool", "(I)Ljava/lang/String;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l1, 0); + mv.visitLocalVariable("aMeta", "I", null, l0, l1, 1); + mv.visitMaxs(1, 2); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals("createTileEntity")) { + mv = getWriter().visitMethod(ACC_PUBLIC, "createTileEntity", "(Lnet/minecraft/world/World;I)Lnet/minecraft/tileentity/TileEntity;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(442, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity", "createTileEntity", "(Lnet/minecraft/world/World;I)Lnet/minecraft/tileentity/TileEntity;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l1, 0); + mv.visitLocalVariable("aWorld", "Lnet/minecraft/world/World;", null, l0, l1, 1); + mv.visitLocalVariable("aMeta", "I", null, l0, l1, 2); + mv.visitMaxs(2, 3); + mv.visitEnd(); + didInject = true; + + } + else if (aMethodName.equals("getTileEntityBaseType")) { + + String aClassName = mMode == 1 ? "gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item" : mMode == 2 ? "gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame" : "gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid"; + mv = getWriter().visitMethod(ACC_PUBLIC, "getTileEntityBaseType", "()B", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(37, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, ""+aClassName+"", "mMaterial", "Lgregtech/api/enums/Materials;"); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_MetaPipeEntity", "getTileEntityBaseType", "(Lgregtech/api/enums/Materials;)B", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "L"+aClassName+";", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + private final int mMode; + + public localClassVisitor(ClassVisitor cv, int aMode) { + super(ASM5, cv); + mMode = aMode; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if ((mMode == 0 && (name.equals("createTileEntity") || name.equals("getHarvestTool"))) || (mMode > 0 && name.equals("getTileEntityBaseType"))) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech getTileEntityBaseType Patch", Level.INFO, "Found method "+name+", removing."); + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java new file mode 100644 index 0000000000..349bdc3e88 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_BlockMachines_NBT.java @@ -0,0 +1,193 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.preloader.DevHelper; +import gtPlusPlus.preloader.asm.AsmConfig; + +public class ClassTransformer_GT_BlockMachines_NBT { + + //The qualified name of the class we plan to transform. + private static final String className = "gregtech.common.blocks.GT_Block_Machines"; + //gregtech/common/blocks/GT_Block_Machines + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + String aEntityPlayer; + String aEntityPlayerMP; + String aWorld; + + public static boolean isNbtPersistencyPatchAlreadyApplied = false; + + public ClassTransformer_GT_BlockMachines_NBT(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Attempting to patch "+className+"."); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Valid patch? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + + CORE.NBT_PERSISTENCY_PATCH_APPLIED = isNbtPersistencyPatchAlreadyApplied; + + if (reader != null && writer != null && !isNbtPersistencyPatchAlreadyApplied && AsmConfig.enableGtNbtFix) { + aEntityPlayer = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayer") : "net/minecraft/entity/player/EntityPlayer"; + aEntityPlayerMP = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayerMP") : "net/minecraft/entity/player/EntityPlayerMP"; + aWorld = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Attempting Method Injection."); + if (injectMethod("removedByPlayer") && injectMethod("harvestBlock")) { + CORE.NBT_PERSISTENCY_PATCH_APPLIED = true; + } + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); + if (aMethodName.equals("removedByPlayer")) { + + mv = getWriter().visitMethod(ACC_PUBLIC, "removedByPlayer", "(L"+aWorld+";L"+aEntityPlayer+";IIIZ)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(535, l0); + mv.visitVarInsn(ILOAD, 6); + Label l1 = new Label(); + mv.visitJumpInsn(IFEQ, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(536, l2); + mv.visitInsn(ICONST_1); + mv.visitInsn(IRETURN); + mv.visitLabel(l1); + mv.visitLineNumber(538, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ILOAD, 4); + mv.visitVarInsn(ILOAD, 5); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/items/GT_Generic_Block", "removedByPlayer", "(L"+aWorld+";L"+aEntityPlayer+";IIIZ)Z", false); + mv.visitInsn(IRETURN); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l3, 0); + mv.visitLocalVariable("aWorld", "L"+aWorld+";", null, l0, l3, 1); + mv.visitLocalVariable("aPlayer", "L"+aEntityPlayer+";", null, l0, l3, 2); + mv.visitLocalVariable("aX", "I", null, l0, l3, 3); + mv.visitLocalVariable("aY", "I", null, l0, l3, 4); + mv.visitLocalVariable("aZ", "I", null, l0, l3, 5); + mv.visitLocalVariable("aWillHarvest", "Z", null, l0, l3, 6); + mv.visitMaxs(7, 7); + mv.visitEnd(); + didInject = true; + + } + else if (aMethodName.equals("harvestBlock")) { + + mv = getWriter().visitMethod(ACC_PUBLIC, "harvestBlock", "(L"+aWorld+";L"+aEntityPlayer+";IIII)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(544, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ILOAD, 4); + mv.visitVarInsn(ILOAD, 5); + mv.visitVarInsn(ILOAD, 6); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/items/GT_Generic_Block", "harvestBlock", "(L"+aWorld+";L"+aEntityPlayer+";IIII)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(545, l1); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ILOAD, 4); + mv.visitVarInsn(ILOAD, 5); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aWorld+"", "setBlockToAir", "(III)Z", false); + mv.visitInsn(POP); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(546, l2); + mv.visitInsn(RETURN); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Block_Machines;", null, l0, l3, 0); + mv.visitLocalVariable("aWorld", "L"+aWorld+";", null, l0, l3, 1); + mv.visitLocalVariable("aPlayer", "L"+aEntityPlayer+";", null, l0, l3, 2); + mv.visitLocalVariable("aX", "I", null, l0, l3, 3); + mv.visitLocalVariable("aY", "I", null, l0, l3, 4); + mv.visitLocalVariable("aZ", "I", null, l0, l3, 5); + mv.visitLocalVariable("aMeta", "I", null, l0, l3, 6); + mv.visitMaxs(7, 7); + mv.visitEnd(); + didInject = true; + + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("removedByPlayer")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Found method "+name+", skipping patch."); + isNbtPersistencyPatchAlreadyApplied = true; + } + if (name.equals("harvestBlock")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech NBT Persistency Patch", Level.INFO, "Found method "+name+", skipping patch."); + isNbtPersistencyPatchAlreadyApplied = true; + } + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java new file mode 100644 index 0000000000..1e54bd3632 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit.java @@ -0,0 +1,184 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.util.ArrayList; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class ClassTransformer_GT_CharcoalPit { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public static boolean isWoodLog(Block log) { + return isWoodLog(log, Short.MAX_VALUE); + } + + public static boolean isWoodLog(Block log, int meta) { + ItemStack aLogStack = ItemUtils.getSimpleStack(log, meta, 1); + ArrayList aData = OrePrefixes.log.mPrefixedItems; + for (ItemStack aStack : aData) { + if (GT_Utility.areStacksEqual(aStack, aLogStack)) { + return true; + } + } + aData.clear(); + aData = OreDictionary.getOres("logWood"); + for (ItemStack aStack : aData) { + if (GT_Utility.areStacksEqual(aStack, aLogStack)) { + return true; + } + } + return false; + } + + public ClassTransformer_GT_CharcoalPit(byte[] basicClass, boolean obfuscated) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + boolean aBadTime = false; + if (ReflectionUtils.doesClassExist("aji")) { + obfuscated = true; + } + else { + if (ReflectionUtils.doesClassExist("net.minecraft.block.Block")) { + obfuscated = false; + } + else { + // Bad... Like.. very bad.. + FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Unable to find Block.class/aji.class, this is BAD. Not Patching."); + } + } + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + if (!aBadTime) { + aTempReader.accept(new CustomClassVisitor(aTempWriter), 0); + injectMethod("isWoodLog", obfuscated, aTempWriter); + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } else { + isValid = false; + } + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Valid? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName, boolean obfuscated, ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Injecting " + aMethodName + "."); + + String aBlockClassName = "net/minecraft/block/Block"; + if (obfuscated) { + aBlockClassName = "aji"; + } + if (aMethodName.equals("isWoodLog")) { + + // Inject original Method with only block arg. + mv = cw.visitMethod(ACC_PUBLIC, "isWoodLog", "(L"+aBlockClassName+";)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(197, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit", "isWoodLog", "(L"+aBlockClassName+";)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "Lgregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit;", null, l0, l1, 0); + mv.visitLocalVariable("log", "L"+aBlockClassName+";", null, l0, l1, 1); + mv.visitMaxs(1, 2); + mv.visitEnd(); + + + // Inject better Method with block & meta arg. + mv = cw.visitMethod(ACC_PUBLIC, "isWoodLog", "(L"+aBlockClassName+";I)Z", null, null); + mv.visitCode(); + Label label0 = new Label(); + mv.visitLabel(label0); + mv.visitLineNumber(201, label0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_CharcoalPit", "isWoodLog", "(L"+aBlockClassName+";I)Z", false); + mv.visitInsn(IRETURN); + Label label1 = new Label(); + mv.visitLabel(label1); + mv.visitLocalVariable("this", "Lgregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit;", null, label0, label1, 0); + mv.visitLocalVariable("log", "L"+aBlockClassName+";", null, label0, label1, 1); + mv.visitLocalVariable("meta", "I", null, label0, label1, 2); + mv.visitMaxs(2, 3); + mv.visitEnd(); + + didInject = true; + + } + FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Method injection complete."); + return didInject; + } + + public class CustomClassVisitor extends ClassVisitor { + + public CustomClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + private final String[] aMethodsToStrip = new String[] { "isWoodLog" }; + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + found = true; + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } else { + methodVisitor = null; + } + if (found) { + FMLRelaunchLog.log("[GT++ ASM] GT Charcoal Pit Fix", Level.INFO, "Found method " + name + ", removing."); + } + return methodVisitor; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java new file mode 100644 index 0000000000..e2d34c38e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client.java @@ -0,0 +1,410 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.INVOKESPECIAL; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.RETURN; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.UUID; +import java.util.jar.JarEntry; +import java.util.jar.JarInputStream; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.AnnotationVisitor; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; +import com.google.common.reflect.ClassPath; +import com.google.common.reflect.ClassPath.ClassInfo; + +import cpw.mods.fml.common.gameevent.TickEvent.Phase; +import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent; +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_PlayedSound; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.loaders.misc.AssLineAchievements; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.StatFileWriter; + +public class ClassTransformer_GT_Client { + + private final boolean valid; + private final ClassReader read; + private final ClassWriter write; + private boolean mModern = true; + private boolean mObfuscated = true; + private byte[] mTooledClass; + + public ClassTransformer_GT_Client(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + mObfuscated = obfuscated; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + + /** + * Let's just read the GT archive for some info + */ + //mModern = findAssemblyLineClass(); + //FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Found Assembly Line? "+mModern+"."); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Fixing Issues in vanilla GT."); + if (mModern) { + aTempReader.accept(new MethodAdaptor2(aTempWriter), 0); + //FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Patching Client handling of Assembly Line recipe visibility for GT 5.09"); + //injectMethod(aTempWriter, "onPlayerTickEventClient"); + injectMethod(aTempWriter, "onPostLoad"); + if (aTempReader != null && aTempWriter != null) { + valid = true; + mTooledClass = aTempWriter.toByteArray(); + } + else { + valid = false; + } + } + else { + mTooledClass = basicClass; + valid = true; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Valid? "+valid+"."); + read = aTempReader; + write = aTempWriter; + } + + public boolean isValidTransformer() { + return valid; + } + + public ClassReader getReader() { + return read; + } + + public ClassWriter getWriter() { + return write; + } + + public boolean findAssemblyLineClass() { + ClassLoader cl = getClass().getClassLoader(); + try { + Set classesInPackage = ClassPath.from(cl).getTopLevelClassesRecursive("gregtech"); + if (classesInPackage != null && classesInPackage.size() > 0) { + for (ClassInfo x : classesInPackage) { + if (x.getResourceName().contains("GT_MetaTileEntity_AssemblyLine")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, + "Patchable class | " + x.getResourceName()); + return true; + } + } + } + } catch (IOException e) { + } + + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Failed to find Gregtech classes using prefered method, using backup."); + + cl = ClassLoader.getSystemClassLoader(); + ImmutableMap g = getClassPathEntries(cl); + File aGregtech = null; + if (g.size() > 0) { + for (int i = 0; i < g.size(); i++) { + String aName; + try { + File aF = g.keySet().asList().get(i); + aName = aF.getName(); + if (aName != null && aName.length() > 0) { + if (aName.toLowerCase().contains("gregtech")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Patchable class | "+aName); + aGregtech = aF; + } + } + } + catch (Throwable t) {} + } + } + + if (aGregtech != null) { + File file = aGregtech; + FileInputStream fis; + JarInputStream jis; + try { + fis = new FileInputStream(file); + jis = new JarInputStream(fis); + System.out.println(jis.markSupported()); + JarEntry je; + while((je=jis.getNextJarEntry())!=null){ + if (je.getName().contains("GT_MetaTileEntity_AssemblyLine")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Patchable class | "+je.getName()); + jis.close(); + return true; + } + } + if (jis != null) { + jis.close(); + } + return true; + } catch (IOException e1) { + } + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Failed to find Gregtech classes using backup method, probably using GT 5.08"); + + return false; + } + + static ImmutableMap getClassPathEntries(ClassLoader classloader) { + LinkedHashMap entries = Maps.newLinkedHashMap(); + // Search parent first, since it's the order ClassLoader#loadClass() uses. + ClassLoader parent = classloader.getParent(); + if (parent != null) { + entries.putAll(getClassPathEntries(parent)); + } + if (classloader instanceof URLClassLoader) { + URLClassLoader urlClassLoader = (URLClassLoader) classloader; + for (URL entry : urlClassLoader.getURLs()) { + if (entry.getProtocol().equals("file")) { + File file = new File(entry.getFile()); + if (!entries.containsKey(file)) { + entries.put(file, classloader); + } + } + } + } + return ImmutableMap.copyOf(entries); + } + + public boolean injectMethod(ClassWriter cw, String string) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Injecting " + string + ". Obfuscated? "+mObfuscated); + + if (string.equals("onPlayerTickEventClient")) { + /** + * Inject new, safer code + */ + AnnotationVisitor av0; + /** + * Static invocation of custom handler instead + */ + mv = cw.visitMethod(ACC_PUBLIC, "onPlayerTickEventClient", "(Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;)V", null, null); + av0 = mv.visitAnnotation("Lcpw/mods/fml/common/eventhandler/SubscribeEvent;", true); + av0.visitEnd(); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(371, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client", "onPlayerTickEventClient", "(Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(372, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "Lgregtech/common/GT_Client;", null, l0, l2, 0); + mv.visitLocalVariable("aEvent", "Lcpw/mods/fml/common/gameevent/TickEvent$PlayerTickEvent;", null, l0, l2, 1); + mv.visitMaxs(1, 2); + mv.visitEnd(); + didInject = true; + } + else if (string.equals("onPostLoad")) { + mv = cw.visitMethod(ACC_PUBLIC, "onPostLoad", "()V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(315, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/common/GT_Proxy", "onPostLoad", "()V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(316, l1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Client", "onPostLoad", "()V", false); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(317, l2); + mv.visitInsn(RETURN); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLocalVariable("this", "Lgregtech/common/GT_Client;", null, l0, l3, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + + + + + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, "Method injection complete."); + return didInject; + + } + + public class MethodAdaptor2 extends ClassVisitor { + + public MethodAdaptor2(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (/*name.equals("onPlayerTickEventClient") || */name.equals("onPostLoad")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Client Proxy Patch", Level.INFO, + "Found method " + name + ", removing."); + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + + public byte[] getByteArray() { + if (mTooledClass != null) { + return mTooledClass; + } + return getWriter().toByteArray(); + } + + + private static final Map aTimeMap = new HashMap(); + + + public static void onPlayerTickEventClient(PlayerTickEvent aEvent) { + if (aEvent.side.isClient() && aEvent.phase == Phase.END && !aEvent.player.isDead) { + long aTime = 0; + if (aTimeMap.get(aEvent.player.getUniqueID()) == null) { + aTimeMap.put(aEvent.player.getUniqueID(), 0l); + } + else { + aTime = aTimeMap.get(aEvent.player.getUniqueID()) + 1; + aTimeMap.put(aEvent.player.getUniqueID(), aTime); + } + if (aTime >= 100L) { + aTimeMap.put(aEvent.player.getUniqueID(), 0l); + /** + * Remove original handling + */ + if (StaticFields59.mAssLineVisualMapNEI != null) { + StatFileWriter tList = Minecraft.getMinecraft().thePlayer.getStatFileWriter(); + GT_Recipe_Map aAssLineNei; + try { + aAssLineNei = (GT_Recipe_Map) StaticFields59.mAssLineVisualMapNEI.get(null); + for (GT_Recipe aFakeAssLineRecipe : aAssLineNei.mRecipeList) { + String aSafeUnlocalName; + if (aFakeAssLineRecipe.getOutput(0) == null) { + Logger.INFO( + "Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); + continue; + } + ItemStack aStack = aFakeAssLineRecipe.getOutput(0); + try { + aSafeUnlocalName = aStack.getUnlocalizedName(); + } catch (Throwable t) { + aSafeUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); + } + boolean aHidden = true; + try { + aHidden = tList.hasAchievementUnlocked(AssLineAchievements.getAchievement(aSafeUnlocalName)); + Logger.INFO("Found achievement for "+aSafeUnlocalName); + } + catch (NullPointerException rrr) { + aHidden = true; + //Logger.INFO("Exception handling achievement for "+aSafeUnlocalName); + //rrr.printStackTrace(); + } + aFakeAssLineRecipe.mHidden = !aHidden; + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + } + + Iterator tKey; + ArrayList arg5 = new ArrayList(); + tKey = GT_Utility.sPlayedSoundMap.entrySet().iterator(); + + while (tKey.hasNext()) { + Entry arg7 = (Entry) tKey.next(); + if (((Integer) arg7.getValue()).intValue() < 0) { + arg5.add(arg7.getKey()); + } else { + arg7.setValue(Integer.valueOf(((Integer) arg7.getValue()).intValue() - 1)); + } + } + + Iterator arg8 = arg5.iterator(); + + while (arg8.hasNext()) { + GT_PlayedSound arg6 = (GT_PlayedSound) arg8.next(); + GT_Utility.sPlayedSoundMap.remove(arg6); + } + + if (!GregTech_API.mServerStarted) { + GregTech_API.mServerStarted = true; + } + } + } + + + + + /** + * GT_Client's onPostLoad + */ + + public static void onPostLoad() { + try { + for (int i = 0; i < GregTech_API.METATILEENTITIES.length; i++) { + try { + if (GregTech_API.METATILEENTITIES[i] != null) { + GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip((EntityPlayer) null, true); + } + } + catch (Throwable t) { + GT_Log.err.println("Error in MetaTileEntity with ID of "+i); + t.printStackTrace(GT_Log.err); + } + } + } catch (Throwable var2) { + var2.printStackTrace(); + } + } + + + + + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java new file mode 100644 index 0000000000..83560eb6c3 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_EnergyHatchPatch.java @@ -0,0 +1,317 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.*; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.asm.ClassesToTransform; + +public class ClassTransformer_GT_EnergyHatchPatch { + + private static final String aRtgInputFormatted = ClassesToTransform.GTPP_MTE_HATCH_RTG.replace(".", "/"); + private static final String aEnergyFormatted = ClassesToTransform.GT_MTE_HATCH_ENERGY.replace(".", "/"); + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + + public ClassTransformer_GT_EnergyHatchPatch(byte[] basicClass, String aClassName) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Attempting to add slots capabilities to GT Energy Hatches."); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Patching "+aClassName+"."); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter, aClassName), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Valid patch? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + + + if (reader != null && writer != null) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Attempting Method Injection."); + injectMethod(aClassName); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + + public boolean injectMethod(String aClassName) { + + boolean didInject = false; + MethodVisitor mv; + ClassWriter cw = getWriter(); + int aConID = 1; + + //GT_MetaTileEntity_Hatch_Energy + //Constructor + if (aClassName.equals(ClassesToTransform.GT_MTE_HATCH_ENERGY)){ + + + //Constructor 1 + { + mv = cw.visitMethod(ACC_PUBLIC, "", "(ILjava/lang/String;Ljava/lang/String;II[Ljava/lang/String;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(26, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 3); + mv.visitVarInsn(ILOAD, 4); + mv.visitVarInsn(ILOAD, 5); + mv.visitVarInsn(ALOAD, 6); + mv.visitInsn(ICONST_0); + mv.visitTypeInsn(ANEWARRAY, "gregtech/api/interfaces/ITexture"); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch", "", "(ILjava/lang/String;Ljava/lang/String;II[Ljava/lang/String;[Lgregtech/api/interfaces/ITexture;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(27, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy;", null, l0, l2, 0); + mv.visitLocalVariable("aID", "I", null, l0, l2, 1); + mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 2); + mv.visitLocalVariable("aNameRegional", "Ljava/lang/String;", null, l0, l2, 3); + mv.visitLocalVariable("aTier", "I", null, l0, l2, 4); + mv.visitLocalVariable("aSlots", "I", null, l0, l2, 5); + mv.visitLocalVariable("aDesc", "[Ljava/lang/String;", null, l0, l2, 6); + mv.visitMaxs(8, 7); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); + } + + //Constructor 2 + { + mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(30, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch", "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(31, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy;", null, l0, l2, 0); + mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); + mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); + mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); + mv.visitLocalVariable("aDescription", "Ljava/lang/String;", null, l0, l2, 4); + mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); + mv.visitMaxs(6, 6); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); + } + + //Third constructor with String[] for GT 5.09 + { + mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(34, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch", "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(35, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "Lgregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy;", null, l0, l2, 0); + mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); + mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); + mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); + mv.visitLocalVariable("aDescription", "[Ljava/lang/String;", null, l0, l2, 4); + mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); + mv.visitMaxs(6, 6); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); + } + didInject = true; + } + + //GT_MetaTileEntity_Hatch_Energy_RTG + //Constructor + if (aClassName.equals(ClassesToTransform.GTPP_MTE_HATCH_RTG)){ + + { + mv = cw.visitMethod(ACC_PUBLIC, "", "(ILjava/lang/String;Ljava/lang/String;II)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(38, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 3); + mv.visitVarInsn(ILOAD, 4); + mv.visitVarInsn(ILOAD, 5); + mv.visitInsn(ICONST_2); + mv.visitTypeInsn(ANEWARRAY, "java/lang/String"); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_0); + mv.visitLdcInsn("Energy Injector for Multiblocks"); + mv.visitInsn(AASTORE); + mv.visitInsn(DUP); + mv.visitInsn(ICONST_1); + mv.visitLdcInsn("Accepts RTG pellets for Fuel"); + mv.visitInsn(AASTORE); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy", "", "(ILjava/lang/String;Ljava/lang/String;II[Ljava/lang/String;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(39, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "LgtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG;", null, l0, l2, 0); + mv.visitLocalVariable("aID", "I", null, l0, l2, 1); + mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 2); + mv.visitLocalVariable("aNameRegional", "Ljava/lang/String;", null, l0, l2, 3); + mv.visitLocalVariable("aTier", "I", null, l0, l2, 4); + mv.visitLocalVariable("aSlots", "I", null, l0, l2, 5); + mv.visitMaxs(10, 6); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); + } + { + mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(42, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy", "", "(Ljava/lang/String;IILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(43, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "LgtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG;", null, l0, l2, 0); + mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); + mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); + mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); + mv.visitLocalVariable("aDescription", "Ljava/lang/String;", null, l0, l2, 4); + mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); + mv.visitMaxs(6, 6); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); + } + { + mv = cw.visitMethod(ACC_PUBLIC, "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(46, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 4); + mv.visitVarInsn(ALOAD, 5); + mv.visitMethodInsn(INVOKESPECIAL, "gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy", "", "(Ljava/lang/String;II[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(47, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "LgtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG;", null, l0, l2, 0); + mv.visitLocalVariable("aName", "Ljava/lang/String;", null, l0, l2, 1); + mv.visitLocalVariable("aTier", "I", null, l0, l2, 2); + mv.visitLocalVariable("aSlots", "I", null, l0, l2, 3); + mv.visitLocalVariable("aDescription", "[Ljava/lang/String;", null, l0, l2, 4); + mv.visitLocalVariable("aTextures", "[[[Lgregtech/api/interfaces/ITexture;", null, l0, l2, 5); + mv.visitMaxs(6, 6); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Injection new constructor "+(aConID++)); + } + + + didInject = true; + } + + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Method injection complete. Successful? "+didInject); + return didInject; + + } + + public final class localClassVisitor extends ClassVisitor { + + private final String mClassName; + + public localClassVisitor(ClassVisitor cv, String aClassName) { + super(ASM5, cv); + mClassName = aClassName; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor = null; + if ((mClassName.equals(ClassesToTransform.GTPP_MTE_HATCH_RTG)) && access == ACC_PUBLIC && name.equals("") && (desc.equals("(Ljava/lang/String;ILjava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V") || desc.equals("(Ljava/lang/String;I[Ljava/lang/String;[[[Lgregtech/api/interfaces/ITexture;)V"))) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Found Constructor, "+"'"+access+"', "+"'"+name+"', "+"'"+desc+"', "+"'"+signature+"'"); + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + if (methodVisitor == null) { + if (mClassName.equals(ClassesToTransform.GT_MTE_HATCH_ENERGY)){ + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Removed method from "+mClassName); + } + else { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Energy Hatch Patch", Level.INFO, "Removed Constructor with descriptor '"+desc+"' from "+mClassName); + } + } + return methodVisitor; + } + } + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java new file mode 100644 index 0000000000..4b2a10df07 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_ItemMachines_Tooltip.java @@ -0,0 +1,139 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + +public class ClassTransformer_GT_ItemMachines_Tooltip { + + //The qualified name of the class we plan to transform. + private static final String className = "gregtech.common.blocks.GT_Item_Machines"; + //gregtech/common/blocks/GT_Item_Machines + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + String aEntityPlayer; + String aItemStack; + String aWorld; + + private static boolean doesMethodAlreadyExist = false; + + public ClassTransformer_GT_ItemMachines_Tooltip(byte[] basicClass, boolean obfuscated) { + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null && !doesMethodAlreadyExist) { + aEntityPlayer = obfuscated ? DevHelper.getObfuscated("net/minecraft/entity/player/EntityPlayer") : "net/minecraft/entity/player/EntityPlayer"; + aItemStack = obfuscated ? DevHelper.getObfuscated("net/minecraft/item/ItemStack") : "net/minecraft/item/ItemStack"; + aWorld = obfuscated ? DevHelper.getObfuscated("net/minecraft/world/World") : "net/minecraft/world/World"; + + injectMethod("addInformation"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod(String aMethodName) { + MethodVisitor mv; + FMLRelaunchLog.log("[GT++ ASM] Gregtech Tooltip Patch", Level.INFO, "Injecting "+aMethodName+" into "+className+"."); + if (aMethodName.equals("addInformation")) { + + mv = getWriter().visitMethod(ACC_PUBLIC, "addInformation", "(L"+aItemStack+";L"+aEntityPlayer+";Ljava/util/List;Z)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + Label l1 = new Label(); + Label l2 = new Label(); + mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); + mv.visitLabel(l0); + mv.visitLineNumber(120, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 3); + mv.visitVarInsn(ILOAD, 4); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy", "conStructGtTileBlockTooltip", "(L"+aItemStack+";L"+aEntityPlayer+";Ljava/util/List;Z)V", false); + mv.visitLabel(l1); + mv.visitLineNumber(121, l1); + Label l3 = new Label(); + mv.visitJumpInsn(GOTO, l3); + mv.visitLabel(l2); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"}); + mv.visitVarInsn(ASTORE, 5); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(122, l4); + mv.visitVarInsn(ALOAD, 5); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace", "(Ljava/io/PrintStream;)V", false); + mv.visitLabel(l3); + mv.visitLineNumber(124, l3); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLocalVariable("this", "Lgregtech/common/blocks/GT_Item_Machines;", null, l0, l5, 0); + mv.visitLocalVariable("aStack", "L"+aItemStack+";", null, l0, l5, 1); + mv.visitLocalVariable("aPlayer", "L"+aEntityPlayer+";", null, l0, l5, 2); + mv.visitLocalVariable("aList", "Ljava/util/List;", null, l0, l5, 3); + mv.visitLocalVariable("par4", "Z", null, l0, l5, 4); + mv.visitLocalVariable("e", "Ljava/lang/Throwable;", null, l4, l3, 5); + mv.visitMaxs(4, 6); + mv.visitEnd(); +} + FMLRelaunchLog.log("[GT++ ASM] Gregtech Tooltip Patch", Level.INFO, "Method injection complete."); + + } + + public static final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + if (name.equals("addInformation")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech Tooltip Patch", Level.INFO, "Found method "+name+", Patching."); + return null; + } + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java new file mode 100644 index 0000000000..b6cd9c8d67 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_MetaGenerated_Tool.java @@ -0,0 +1,116 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_FINAL; +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.RETURN; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.AnnotationVisitor; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import gtPlusPlus.preloader.Preloader_Logger; + +public class ClassTransformer_GT_MetaGenerated_Tool { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public ClassTransformer_GT_MetaGenerated_Tool(byte[] basicClass) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new LocalClassVisitor(aTempWriter), 0); + boolean completed = injectMethod("getSubItems", aTempWriter); + if (aTempReader != null && aTempWriter != null && completed) { + isValid = true; + } else { + isValid = false; + } + Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Valid? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName, ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Injecting " + aMethodName + "."); + if (aMethodName.equals("getSubItems")) { + { + mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "getSubItems", "(Lnet/minecraft/item/Item;Lnet/minecraft/creativetab/CreativeTabs;Ljava/util/List;)V", null, null); + { + AnnotationVisitor av0 = mv.visitAnnotation("Lcpw/mods/fml/relauncher/SideOnly;", true); + av0.visitEnum("value", "Lcpw/mods/fml/relauncher/Side;", "CLIENT"); + av0.visitEnd(); + } + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(321, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/helpers/MethodHelper_GT", "getSubItems", "(Lgregtech/api/items/GT_MetaGenerated_Tool;Lnet/minecraft/item/Item;Lnet/minecraft/creativetab/CreativeTabs;Ljava/util/List;)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(322, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "Lgregtech/api/items/GT_MetaGenerated_Tool;", null, l0, l2, 0); + mv.visitLocalVariable("var1", "Lnet/minecraft/item/Item;", null, l0, l2, 1); + mv.visitLocalVariable("aCreativeTab", "Lnet/minecraft/creativetab/CreativeTabs;", null, l0, l2, 2); + mv.visitLocalVariable("aList", "Ljava/util/List;", null, l0, l2, 3); + mv.visitMaxs(4, 4); + mv.visitEnd(); + didInject = true; + } + + } + Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class LocalClassVisitor extends ClassVisitor { + + public LocalClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (name.equals("getSubItems") && desc.equals("(Lnet/minecraft/item/Item;Lnet/minecraft/creativetab/CreativeTabs;Ljava/util/List;)V")) { + methodVisitor = null; + Preloader_Logger.LOG("GT Tool Fix", Level.INFO, "Found method "+name+", removing."); + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java new file mode 100644 index 0000000000..1f281ce492 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Packet_TileEntity.java @@ -0,0 +1,319 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; + +public class ClassTransformer_GT_Packet_TileEntity { + + //The qualified name of the class we plan to transform. + //gregtech/common/blocks/GT_Block_Machines + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + + public ClassTransformer_GT_Packet_TileEntity(byte[] basicClass, boolean obfuscated) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Attempting to make GT Packets safer."); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Valid patch? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + + + if (reader != null && writer != null) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Attempting Method Injection."); + injectMethod("process", obfuscated); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName, boolean obfuscated) { + MethodVisitor mv; + boolean didInject = false; + String aGetTile = obfuscated ? "func_147438_o" : "getTileEntity"; + + FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Injecting "+aMethodName+"."); + if (aMethodName.equals("process")) { + mv = getWriter().visitMethod(ACC_PUBLIC, "process", "(Lnet/minecraft/world/IBlockAccess;)V", null, null); + mv.visitCode(); + Label l0 = new Label(); + Label l1 = new Label(); + Label l2 = new Label(); + mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Throwable"); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(93, l3); + mv.visitVarInsn(ALOAD, 1); + Label l4 = new Label(); + mv.visitJumpInsn(IFNULL, l4); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(94, l5); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mX", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mY", "S"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mZ", "I"); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/world/IBlockAccess", ""+aGetTile+"", "(III)Lnet/minecraft/tileentity/TileEntity;", true); + mv.visitVarInsn(ASTORE, 2); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(95, l6); + mv.visitVarInsn(ALOAD, 2); + mv.visitJumpInsn(IFNULL, l4); + mv.visitLabel(l0); + mv.visitLineNumber(97, l0); + mv.visitVarInsn(ALOAD, 2); + mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaTileEntity"); + Label l7 = new Label(); + mv.visitJumpInsn(IFEQ, l7); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(98, l8); + mv.visitVarInsn(ALOAD, 2); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/metatileentity/BaseMetaTileEntity"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mID", "S"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC0", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC1", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC2", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC3", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC4", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC5", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mTexture", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mTexturePage", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mUpdate", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mRedstone", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mColor", "B"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/metatileentity/BaseMetaTileEntity", "receiveMetaTileEntityData", "(SIIIIIIBBBBB)V", false); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(99, l9); + mv.visitJumpInsn(GOTO, l4); + mv.visitLabel(l7); + mv.visitLineNumber(101, l7); + mv.visitFrame(F_APPEND,1, new Object[] {"net/minecraft/tileentity/TileEntity"}, 0, null); + mv.visitVarInsn(ALOAD, 2); + mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaPipeEntity"); + mv.visitJumpInsn(IFEQ, l4); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(102, l10); + mv.visitVarInsn(ALOAD, 2); + mv.visitTypeInsn(CHECKCAST, "gregtech/api/metatileentity/BaseMetaPipeEntity"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mID", "S"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC0", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC1", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC2", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC3", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC4", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mC5", "I"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mTexture", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mUpdate", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mRedstone", "B"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mColor", "B"); + mv.visitMethodInsn(INVOKEVIRTUAL, "gregtech/api/metatileentity/BaseMetaPipeEntity", "receiveMetaTileEntityData", "(SIIIIIIBBBB)V", false); + mv.visitLabel(l1); + mv.visitLineNumber(104, l1); + mv.visitJumpInsn(GOTO, l4); + mv.visitLabel(l2); + mv.visitLineNumber(105, l2); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"java/lang/Throwable"}); + mv.visitVarInsn(ASTORE, 3); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(106, l11); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); + mv.visitInsn(DUP); + mv.visitLdcInsn("[GTPTE] Bad Tile Entity set in world, your game would have crashed if not for me! Was Null? "); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "", "(Ljava/lang/String;)V", false); + mv.visitVarInsn(ALOAD, 2); + Label l12 = new Label(); + mv.visitJumpInsn(IFNONNULL, l12); + mv.visitInsn(ICONST_1); + Label l13 = new Label(); + mv.visitJumpInsn(GOTO, l13); + mv.visitLabel(l12); + mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/api/net/GT_Packet_TileEntity", "net/minecraft/world/IBlockAccess", "net/minecraft/tileentity/TileEntity", "java/lang/Throwable"}, 2, new Object[] {"java/io/PrintStream", "java/lang/StringBuilder"}); + mv.visitInsn(ICONST_0); + mv.visitLabel(l13); + mv.visitFrame(F_FULL, 4, new Object[] {"gregtech/api/net/GT_Packet_TileEntity", "net/minecraft/world/IBlockAccess", "net/minecraft/tileentity/TileEntity", "java/lang/Throwable"}, 3, new Object[] {"java/io/PrintStream", "java/lang/StringBuilder", INTEGER}); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Z)Ljava/lang/StringBuilder;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(107, l14); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitTypeInsn(NEW, "java/lang/StringBuilder"); + mv.visitInsn(DUP); + mv.visitLdcInsn("Tile location ["); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "", "(Ljava/lang/String;)V", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mX", "I"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(I)Ljava/lang/StringBuilder;", false); + mv.visitLdcInsn("]["); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mY", "S"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(I)Ljava/lang/StringBuilder;", false); + mv.visitLdcInsn("]["); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "gregtech/api/net/GT_Packet_TileEntity", "mZ", "I"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(I)Ljava/lang/StringBuilder;", false); + mv.visitLdcInsn("]"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(108, l15); + mv.visitVarInsn(ALOAD, 2); + Label l16 = new Label(); + mv.visitJumpInsn(IFNULL, l16); + Label l17 = new Label(); + mv.visitLabel(l17); + mv.visitLineNumber(109, l17); + mv.visitVarInsn(ALOAD, 2); + mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaPipeEntity"); + Label l18 = new Label(); + mv.visitJumpInsn(IFEQ, l18); + Label l19 = new Label(); + mv.visitLabel(l19); + mv.visitLineNumber(110, l19); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("Type: Pipe"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l20 = new Label(); + mv.visitLabel(l20); + mv.visitLineNumber(111, l20); + mv.visitJumpInsn(GOTO, l16); + mv.visitLabel(l18); + mv.visitLineNumber(112, l18); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 2); + mv.visitTypeInsn(INSTANCEOF, "gregtech/api/metatileentity/BaseMetaTileEntity"); + Label l21 = new Label(); + mv.visitJumpInsn(IFEQ, l21); + Label l22 = new Label(); + mv.visitLabel(l22); + mv.visitLineNumber(113, l22); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("Type: Machine"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + Label l23 = new Label(); + mv.visitLabel(l23); + mv.visitLineNumber(114, l23); + mv.visitJumpInsn(GOTO, l16); + mv.visitLabel(l21); + mv.visitLineNumber(116, l21); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitFieldInsn(GETSTATIC, "gregtech/api/util/GT_Log", "err", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("Type: Non-GT (Could be GT++/TT/BW)"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false); + mv.visitLabel(l16); + mv.visitLineNumber(119, l16); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 3); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Throwable", "printStackTrace", "()V", false); + mv.visitLabel(l4); + mv.visitLineNumber(123, l4); + mv.visitFrame(F_CHOP,2, null, 0, null); + mv.visitInsn(RETURN); + Label l24 = new Label(); + mv.visitLabel(l24); + mv.visitLocalVariable("this", "Lgregtech/api/net/GT_Packet_TileEntity;", null, l3, l24, 0); + mv.visitLocalVariable("aWorld", "Lnet/minecraft/world/IBlockAccess;", null, l3, l24, 1); + mv.visitLocalVariable("tTileEntity", "Lnet/minecraft/tileentity/TileEntity;", null, l6, l4, 2); + mv.visitLocalVariable("t", "Ljava/lang/Throwable;", null, l11, l4, 3); + mv.visitMaxs(13, 4); + mv.visitEnd(); + + + didInject = true; + } + FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + public localClassVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (name.equals("process")) { + FMLRelaunchLog.log("[GT++ ASM] Gregtech GT_Packet_TileEntity Patch", Level.INFO, "Found method "+name+", removing."); + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java new file mode 100644 index 0000000000..fa711e5693 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_GT_Utility.java @@ -0,0 +1,283 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.preloader.Preloader_Logger; +import ic2.core.IC2Potion; +import ic2.core.item.armor.ItemArmorHazmat; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureAttribute; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; + +public class ClassTransformer_GT_Utility { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private final String className; + + + + public ClassTransformer_GT_Utility(byte[] basicClass, String aClassName) { + + className = aClassName; + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter, className), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } else { + isValid = false; + } + + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Valid patch? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Attempting Method Injection."); + injectMethod("getTier"); + injectMethod("applyRadioactivity"); + injectMethod("isWearingFullFrostHazmat"); + injectMethod("isWearingFullHeatHazmat"); + injectMethod("isWearingFullBioHazmat"); + injectMethod("isWearingFullRadioHazmat"); + injectMethod("isWearingFullElectroHazmat"); + injectMethod("isWearingFullGasHazmat"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + ClassWriter cw = getWriter(); + String aClassNameFormatted = Utils.class.getName().replace(".", "/"); + + if (aMethodName.equals("isWearingFullFrostHazmat")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullFrostHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1273, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullFrostHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("isWearingFullHeatHazmat")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullHeatHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1277, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullHeatHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("isWearingFullBioHazmat")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullBioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1281, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullBioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("isWearingFullRadioHazmat")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullRadioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1285, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullRadioHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("isWearingFullElectroHazmat")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullElectroHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1289, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullElectroHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("isWearingFullGasHazmat")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "isWearingFullGasHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1293, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "isWearingFullGasHazmat", "(Lnet/minecraft/entity/EntityLivingBase;)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("getTier")) { + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + ", static replacement call to "+aClassNameFormatted+"."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "getTier", "(J)B", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(23, l0); + mv.visitVarInsn(LLOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, aClassNameFormatted, "getTier", "(J)B", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("l", "J", null, l0, l1, 0); + mv.visitMaxs(2, 2); + mv.visitEnd(); + didInject = true; + } + + if (aMethodName.equals("applyRadioactivity")){ + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "applyRadioactivity", "(Lnet/minecraft/entity/EntityLivingBase;II)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(1342, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/EntityUtils", "applyRadioactivity", "(Lnet/minecraft/entity/EntityLivingBase;II)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("aEntity", "Lnet/minecraft/entity/EntityLivingBase;", null, l0, l1, 0); + mv.visitLocalVariable("aLevel", "I", null, l0, l1, 1); + mv.visitLocalVariable("aAmountOfItems", "I", null, l0, l1, 2); + mv.visitMaxs(3, 3); + mv.visitEnd(); + didInject = true; + } + + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + String aClassName; + + public localClassVisitor(ClassVisitor cv, String aName) { + super(ASM5, cv); + aClassName = aName; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + + if (name.equals("getTier")) { + methodVisitor = null; + } + else if (name.equals("applyRadioactivity")){ + methodVisitor = null; + } + else if (name.equals("isWearingFullFrostHazmat")){ + methodVisitor = null; + } + else if (name.equals("isWearingFullHeatHazmat")){ + methodVisitor = null; + } + else if (name.equals("isWearingFullBioHazmat")){ + methodVisitor = null; + } + else if (name.equals("isWearingFullRadioHazmat")){ + methodVisitor = null; + } + else if (name.equals("isWearingFullElectroHazmat")){ + methodVisitor = null; + } + else if (name.equals("isWearingFullGasHazmat")){ + methodVisitor = null; + } + else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + + if (methodVisitor == null) { + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Found method " + name + ", removing."); + Preloader_Logger.LOG("Gregtech Utilities Patch", Level.INFO, "Descriptor: "+desc); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java new file mode 100644 index 0000000000..6aad6831cb --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool.java @@ -0,0 +1,214 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.util.Random; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import net.minecraft.block.Block; +import net.minecraft.item.Item; + +public class ClassTransformer_IC2_GetHarvestTool { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private final String className; + + private final String aName_getItemDropped; + private final String aName_damageDropped; + + public static String getHarvestTool(int aMeta) { + return "wrench"; + } + + public static Item getItemDropped(Block aBlock, int meta, Random random, int fortune) { + return Item.getItemFromBlock(aBlock); + } + + public static int damageDropped(int aMeta) { + return aMeta; + } + + public ClassTransformer_IC2_GetHarvestTool(byte[] basicClass, boolean obfuscated, String aClassName) { + className = aClassName; + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aName_getItemDropped = obfuscated ? "func_149650_a" : "getItemDropped"; + aName_damageDropped = obfuscated ? "func_149692_a" : "damageDropped"; + + FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, + "Attempting to patch in mode " + className + ". Obfuscated? "+obfuscated); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter, className), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } else { + isValid = false; + } + + FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Valid patch? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Attempting Method Injection."); + injectMethod("getHarvestTool"); + if (aClassName.equals("ic2.core.block.machine.BlockMachine2") + || aClassName.equals("ic2.core.block.machine.BlockMachine3") + || aClassName.equals("ic2.core.block.wiring.BlockElectric")) { + injectMethod(aName_getItemDropped); + injectMethod(aName_damageDropped); + } + else if (aClassName.equals("ic2.core.block.generator.block.BlockGenerator") + || aClassName.equals("ic2.core.block.machine.BlockMachine")) { + injectMethod(aName_damageDropped); + } + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + String aFormattedClassName = className.replace('.', '/'); + ClassWriter cw = getWriter(); + + + FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Injecting " + aMethodName + "."); + if (aMethodName.equals("getHarvestTool")) { + mv = getWriter().visitMethod(ACC_PUBLIC, "getHarvestTool", "(I)Ljava/lang/String;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(63, l0); + mv.visitVarInsn(ILOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, + "gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool", "getHarvestTool", + "(I)Ljava/lang/String;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "L" + aFormattedClassName + ";", null, l0, l1, 0); + mv.visitLocalVariable("aMeta", "I", null, l0, l1, 1); + mv.visitMaxs(1, 2); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals(aName_getItemDropped)) { + mv = cw.visitMethod(ACC_PUBLIC, aName_getItemDropped, "(ILjava/util/Random;I)Lnet/minecraft/item/Item;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(44, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool", "getItemDropped", "(Lnet/minecraft/block/Block;ILjava/util/Random;I)Lnet/minecraft/item/Item;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "L"+aFormattedClassName+";", null, l0, l1, 0); + mv.visitLocalVariable("meta", "I", null, l0, l1, 1); + mv.visitLocalVariable("random", "Ljava/util/Random;", null, l0, l1, 2); + mv.visitLocalVariable("fortune", "I", null, l0, l1, 3); + mv.visitMaxs(4, 4); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals(aName_damageDropped)) { + mv = cw.visitMethod(ACC_PUBLIC, aName_damageDropped, "(I)I", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(48, l0); + mv.visitVarInsn(ILOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_GetHarvestTool", "damageDropped", "(I)I", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "L"+aFormattedClassName+";", null, l0, l1, 0); + mv.visitLocalVariable("meta", "I", null, l0, l1, 1); + mv.visitMaxs(1, 2); + mv.visitEnd(); + didInject = true; + } + FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + String aClassName; + + public localClassVisitor(ClassVisitor cv, String aName) { + super(ASM5, cv); + aClassName = aName; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + if (aClassName.equals("ic2.core.block.machine.BlockMachine2") + || aClassName.equals("ic2.core.block.machine.BlockMachine3") + || aClassName.equals("ic2.core.block.wiring.BlockElectric")) { + if (name.equals(aName_getItemDropped)) { + methodVisitor = null; + } else if (name.equals(aName_damageDropped)) { + methodVisitor = null; + } else if (name.equals("getHarvestTool")) { + methodVisitor = null; + } else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + } + else if (aClassName.equals("ic2.core.block.generator.block.BlockGenerator") + || aClassName.equals("ic2.core.block.machine.BlockMachine")) { + if (name.equals(aName_damageDropped)) { + methodVisitor = null; + } else if (name.equals("getHarvestTool")) { + methodVisitor = null; + } else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + } + else { + if (name.equals("getHarvestTool")) { + methodVisitor = null; + } else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + } + if (methodVisitor == null) { + FMLRelaunchLog.log("[GT++ ASM] IC2 getHarvestTool Patch", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java new file mode 100644 index 0000000000..10f04e7a48 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_IC2_Hazmat.java @@ -0,0 +1,147 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.*; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.core.util.minecraft.HazmatUtils; +import net.minecraft.entity.EntityLivingBase; + +public class ClassTransformer_IC2_Hazmat { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private final String className; + + public static boolean hasCompleteHazmat(EntityLivingBase living) { + return HazmatUtils.hasCompleteHazmat(living); + } + + public ClassTransformer_IC2_Hazmat(byte[] basicClass, String aClassName) { + className = aClassName; + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Attempting to patch in mode " + className + "."); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitor(aTempWriter, className), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } else { + isValid = false; + } + + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Valid patch? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Attempting Method Injection."); + injectMethod("hasCompleteHazmat"); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName) { + MethodVisitor mv; + boolean didInject = false; + ClassWriter cw = getWriter(); + + boolean isObf; + try { + isObf = Class.forName("net.minecraft.entity.EntityLivingBase") == null; + } catch (ClassNotFoundException e) { + isObf = true; + } + String aEntityLivingBase = "net/minecraft/entity/EntityLivingBase"; + if (isObf) { + aEntityLivingBase = "sv"; + } + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Method Handler: "+aEntityLivingBase); + + + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Injecting " + aMethodName + "."); + if (aMethodName.equals("hasCompleteHazmat")) { + + //Bad Local Variable - https://pastebin.com/TUCfdHqS + /*mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(23, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/HazmatUtils", "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("this", "Lic2/core/item/armor/ItemArmorHazmat;", null, l0, l1, 0); + mv.visitLocalVariable("living", "L"+aEntityLivingBase+";", null, l0, l1, 1); + mv.visitMaxs(1, 2); + mv.visitEnd();*/ + + + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(24, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/core/util/minecraft/HazmatUtils", "hasCompleteHazmat", "(L"+aEntityLivingBase+";)Z", false); + mv.visitInsn(IRETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("living", "L"+aEntityLivingBase+";", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, "Method injection complete."); + return didInject; + } + + public final class localClassVisitor extends ClassVisitor { + + String aClassName; + + public localClassVisitor(ClassVisitor cv, String aName) { + super(ASM5, cv); + aClassName = aName; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + + if (name.equals("hasCompleteHazmat")) { + methodVisitor = null; + } else { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + + if (methodVisitor == null) { + FMLRelaunchLog.log("[GT++ ASM] IC2 Hazmat Patch", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java new file mode 100644 index 0000000000..3ec4426ec1 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard.java @@ -0,0 +1,278 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ACC_STATIC; +import static org.objectweb.asm.Opcodes.ACC_SYNCHRONIZED; +import static org.objectweb.asm.Opcodes.ARETURN; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.ILOAD; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; + +import java.lang.reflect.Field; +import java.util.HashMap; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.settings.GameSettings; +import net.minecraft.client.settings.KeyBinding; + +public class ClassTransformer_LWJGL_Keyboard { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + private static final HashMap mBadKeyCache = new HashMap(); + + /** + * Gets a key's name + * + * @param key The key + * @return a String with the key's human readable name in it or null if the key + * is unnamed + */ + public static synchronized String getKeyName(int key) { + if (init()) { + String[] aTemp = getKeyName(); + if (key < aTemp.length && key >= 0) { + return aTemp[key]; + } + } + String aCachedValue = mBadKeyCache.get("key-"+key); + if (aCachedValue == null) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Unable to map key code "+key+" to LWJGL keymap."); + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Caching key value to be empty."); + //mBadKeyCache.put("key-"+key, getKeyName()[0x00]); + aCachedValue = "FIX!"; + mBadKeyCache.put("key-"+key, aCachedValue); + trySetClientKey(key); + } + return aCachedValue; // Return nothing + } + + public static void trySetClientKey(int aKey) { + if (Utils.isClient() && ReflectionUtils.doesClassExist("net.minecraft.client.Minecraft")) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Trying to set key value to be empty."); + GameSettings options = Minecraft.getMinecraft().gameSettings; + KeyBinding[] akeybinding = Minecraft.getMinecraft().gameSettings.keyBindings; + int i = akeybinding.length; + for (int j = 0; j < i; ++j) { + KeyBinding keybinding = akeybinding[j]; + if (keybinding != null && keybinding.getKeyCode() == aKey) { + options.setOptionKeyBinding(keybinding, 0); + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Set keybind "+aKey+" to 0."); + break; + } + } + } + } + + @SuppressWarnings("rawtypes") + private static Class mKeyboard; + private static Field mKeyName; + + @SuppressWarnings("rawtypes") + private static boolean init() { + if (mKeyName != null) { + return true; + } + Class aKeyboard = ReflectionUtils.getClass("org.lwjgl.input.Keyboard"); + if (aKeyboard != null) { + mKeyboard = aKeyboard; + Field aKeyName = ReflectionUtils.getField(mKeyboard, "keyName"); + if (aKeyName != null) { + mKeyName = aKeyName; + } + } + return mKeyName != null; + } + + private static String[] getKeyName() { + if (init()) { + try { + Object o = mKeyName.get(null); + if (o instanceof String[]) { + String[] y = (String[]) o; + return y; + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + return new String[] {}; + } + + public ClassTransformer_LWJGL_Keyboard(byte[] basicClass, boolean isClientSettings) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + if (!isClientSettings) { + //gtPlusPlus.preloader.keyboard.BetterKeyboard.init(); + aTempReader.accept(new PatchLWJGL(aTempWriter), 0); + injectLWJGLPatch(aTempWriter); + } + else { + //gtPlusPlus.preloader.keyboard.BetterKeyboard.init(); + aTempReader.accept(new PatchClientSettings(aTempWriter), 0); + injectClientSettingPatch(aTempWriter); + } + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Valid? " + isValid + "."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + private boolean isClientSettingsObfuscated = false; + + + public boolean injectLWJGLPatch(ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, + "Injecting " + "getKeyName" + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC + ACC_SYNCHRONIZED, "getKeyName", "(I)Ljava/lang/String;", null, + null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(49, l0); + mv.visitVarInsn(ILOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_LWJGL_Keyboard", + "getKeyName", "(I)Ljava/lang/String;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("key", "I", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Method injection complete."); + return didInject; + } + + + public boolean injectClientSettingPatch(ClassWriter cw) { + MethodVisitor mv; + boolean didInject = false; + String aMethodName = this.isClientSettingsObfuscated ? "func_74298_c" : "getKeyDisplayString"; + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Injecting " + aMethodName + "."); + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, aMethodName, "(I)Ljava/lang/String;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(130, l0); + mv.visitVarInsn(ILOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/keyboard/BetterKeyboard", "getKeyDisplayString", "(I)Ljava/lang/String;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("p_74298_0_", "I", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Method injection complete."); + return didInject; + } + + + + public class PatchClientSettings extends ClassVisitor { + + public PatchClientSettings(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + private final String[] aMethodsToStrip = new String[] { "func_74298_c", "getKeyDisplayString" }; + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + if (name.equals(aMethodsToStrip[0])) { + isClientSettingsObfuscated = true; + } + else { + isClientSettingsObfuscated = false; + } + found = true; + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } else { + methodVisitor = null; + } + if (found) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Found method " + name + ", removing."); + } + return methodVisitor; + } + + } + + public class PatchLWJGL extends ClassVisitor { + + public PatchLWJGL(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + private final String[] aMethodsToStrip = new String[] { "getKeyName" }; + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + found = true; + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } else { + methodVisitor = null; + } + if (found) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java new file mode 100644 index 0000000000..bf71582ae7 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidCartHandling.java @@ -0,0 +1,117 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_FINAL; +import static org.objectweb.asm.Opcodes.ACC_PRIVATE; +import static org.objectweb.asm.Opcodes.ACC_STATIC; +import static org.objectweb.asm.Opcodes.ASM5; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.FieldVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.asm.AsmConfig; + +public class ClassTransformer_Railcraft_FluidCartHandling { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + //mods.railcraft.common.blocks.machine.gamma.TileFluidLoader + //mods.railcraft.common.blocks.machine.gamma.TileFluidLoader.TRANSFER_RATE + + //mods.railcraft.common.blocks.machine.gamma.TileFluidUnloader + //mods.railcraft.common.blocks.machine.gamma.TileFluidUnloader.TRANSFER_RATE + + public static final int TileFluidLoader_RATE = 20; + public static final int TileFluidUnloader_RATE = 80; + + private static final int TYPE_LOADER = 0; + private static final int TYPE_UNLOADER = 1; + + public ClassTransformer_Railcraft_FluidCartHandling(byte[] basicClass, boolean obfuscated, String aClassName) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + boolean aLoader = aClassName.equals("mods.railcraft.common.blocks.machine.gamma.TileFluidLoader"); + + FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Attempting to patch field TRANSFER_RATE in "+aClassName+", default value is "+(aLoader ? 20 : 80)); + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + + if (aLoader) { + aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); + addField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, "TRANSFER_RATE", aTempWriter, TYPE_LOADER); + } + else { + aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); + addField(ACC_PRIVATE + ACC_FINAL + ACC_STATIC, "TRANSFER_RATE", aTempWriter, TYPE_UNLOADER); + } + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Valid? "+isValid+"."); + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean addField(int access, String fieldName, ClassWriter cv, int aType) { + int aValue = (aType == TYPE_LOADER ? AsmConfig.maxRailcraftFluidLoaderFlow : AsmConfig.maxRailcraftFluidUnloaderFlow); + FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Injecting " + fieldName + " with new value: "+aValue); + FieldVisitor fv = cv.visitField(access, fieldName, "I", null, new Integer(aValue)); + if (fv != null) { + fv.visitEnd(); + return true; + } + return false; + } + + + + + public class AddFieldAdapter extends ClassVisitor { + + public AddFieldAdapter(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + @Override + public FieldVisitor visitField( + int access, String name, String desc, String signature, Object value) { + if (name.equals("TRANSFER_RATE") && desc.equals("I")) { + FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Removing "+"TRANSFER_RATE"+"."); + return null; + } + else { + FMLRelaunchLog.log("[GT++ ASM] Railcraft TRANSFER_RATE Patch", Level.INFO, "Found Field "+name+" | "+desc); + } + return cv.visitField(access, name, desc, signature, value); + } + + } + + + + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java new file mode 100644 index 0000000000..1249df0777 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_FluidHelper.java @@ -0,0 +1,695 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.lang.reflect.Method; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.FieldVisitor; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.asm.AsmConfig; +import net.minecraft.inventory.IInventory; + +public class ClassTransformer_Railcraft_FluidHelper { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public static int PROCESS_VOLUME; + + public ClassTransformer_Railcraft_FluidHelper(byte[] basicClass, boolean obfuscated2) { + + PROCESS_VOLUME = AsmConfig.maxRailcraftTankProcessVolume; + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Attempting to patch field PROCESS_VOLUME in mods.railcraft.common.fluids.FluidHelper with new value: "+PROCESS_VOLUME); + + boolean obfuscated = false; + boolean a1 = false; + boolean a2 = false; + + //Find Non-Obf method + try { + Method aGetStackInSlot = IInventory.class.getDeclaredMethod("getStackInSlot", int.class); + if (aGetStackInSlot != null) { + a1 = true; + } + } catch (NoSuchMethodException | SecurityException e) {} + + //Find Obf method + try { + Method aGetStackInSlotObf = IInventory.class.getDeclaredMethod("func_70301_a", int.class); + if (aGetStackInSlotObf != null) { + a2 = true; + } + } catch (NoSuchMethodException | SecurityException e) {} + + + if (a1) { + obfuscated = false; + } + else if (a2) { + obfuscated = true; + } + else { + //Fallback + obfuscated = false; + } + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Are we patching obfuscated methods? "+obfuscated); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); + + addField(ACC_PUBLIC + ACC_FINAL + ACC_STATIC, "PROCESS_VOLUME", aTempWriter); + injectMethod("fillContainers", aTempWriter, obfuscated); + injectMethod("drainContainers", aTempWriter, obfuscated); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Valid? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean addField(int access, String fieldName, ClassWriter cv) { + FMLRelaunchLog.log( + "[GT++ ASM] Railcraft PROCESS_VOLUME Patch", + Level.INFO, + "Injecting " + fieldName + " with new value."); + FieldVisitor fv = cv.visitField(access, fieldName, "I", null, PROCESS_VOLUME); + if (fv != null) { + fv.visitEnd(); + return true; + } + return false; + } + + public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Injecting " + aMethodName + "."); + + if (aMethodName.equals("fillContainers") && !obfuscated) { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "fillContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;IILnet/minecraftforge/fluids/Fluid;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(126, l0); + mv.visitVarInsn(ALOAD, 4); + Label l1 = new Label(); + mv.visitJumpInsn(IFNONNULL, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(127, l2); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + mv.visitLabel(l1); + mv.visitLineNumber(128, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 5); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(129, l3); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 6); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(130, l4); + mv.visitVarInsn(ALOAD, 5); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 4); + mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); + mv.visitVarInsn(ASTORE, 7); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(131, l5); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 6); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); + mv.visitJumpInsn(IFEQ, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(132, l7); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); + mv.visitVarInsn(ASTORE, 8); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(133, l8); + mv.visitVarInsn(ALOAD, 8); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 8); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitJumpInsn(IF_ICMPNE, l6); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(134, l9); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 8); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); + mv.visitVarInsn(ASTORE, 7); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(135, l10); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + Label l11 = new Label(); + mv.visitJumpInsn(IFNULL, l11); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitVarInsn(ALOAD, 8); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitJumpInsn(IF_ICMPNE, l11); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(136, l12); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); + mv.visitInsn(POP); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(137, l13); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); + mv.visitLabel(l11); + mv.visitLineNumber(139, l11); + mv.visitFrame(F_FULL, 9, new Object[] {"net/minecraftforge/fluids/IFluidHandler", "net/minecraft/inventory/IInventory", INTEGER, INTEGER, "net/minecraftforge/fluids/Fluid", "net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); + mv.visitInsn(ICONST_1); + mv.visitInsn(IRETURN); + mv.visitLabel(l6); + mv.visitLineNumber(142, l6); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLocalVariable("drain", "Lnet/minecraftforge/fluids/FluidStack;", null, l8, l6, 8); + mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l14, 0); + mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l14, 1); + mv.visitLocalVariable("inputSlot", "I", null, l0, l14, 2); + mv.visitLocalVariable("outputSlot", "I", null, l0, l14, 3); + mv.visitLocalVariable("fluidToFill", "Lnet/minecraftforge/fluids/Fluid;", null, l0, l14, 4); + mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l3, l14, 5); + mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l4, l14, 6); + mv.visitLocalVariable("fill", "Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", null, l5, l14, 7); + mv.visitMaxs(5, 9); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals("fillContainers") && obfuscated) { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "fillContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;IILnet/minecraftforge/fluids/Fluid;)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(126, l0); + mv.visitVarInsn(ALOAD, 4); + Label l1 = new Label(); + mv.visitJumpInsn(IFNONNULL, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(127, l2); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + mv.visitLabel(l1); + mv.visitLineNumber(128, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 5); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(129, l3); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 6); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(130, l4); + mv.visitVarInsn(ALOAD, 5); + mv.visitTypeInsn(NEW, "net/minecraftforge/fluids/FluidStack"); + mv.visitInsn(DUP); + mv.visitVarInsn(ALOAD, 4); + mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/FluidStack", "", "(Lnet/minecraftforge/fluids/Fluid;I)V", false); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); + mv.visitVarInsn(ASTORE, 7); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(131, l5); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 6); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); + mv.visitJumpInsn(IFEQ, l6); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(132, l7); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); + mv.visitVarInsn(ASTORE, 8); + Label l8 = new Label(); + mv.visitLabel(l8); + mv.visitLineNumber(133, l8); + mv.visitVarInsn(ALOAD, 8); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 8); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitJumpInsn(IF_ICMPNE, l6); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(134, l9); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 8); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "fillContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraftforge/fluids/FluidStack;)Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", false); + mv.visitVarInsn(ASTORE, 7); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(135, l10); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + Label l11 = new Label(); + mv.visitJumpInsn(IFNULL, l11); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitVarInsn(ALOAD, 8); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitJumpInsn(IF_ICMPNE, l11); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(136, l12); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "amount", "I"); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "drain", "(Lnet/minecraftforge/common/util/ForgeDirection;IZ)Lnet/minecraftforge/fluids/FluidStack;", true); + mv.visitInsn(POP); + Label l13 = new Label(); + mv.visitLabel(l13); + mv.visitLineNumber(137, l13); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 7); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); + mv.visitLabel(l11); + mv.visitLineNumber(139, l11); + mv.visitFrame(F_FULL, 9, new Object[] {"net/minecraftforge/fluids/IFluidHandler", "net/minecraft/inventory/IInventory", INTEGER, INTEGER, "net/minecraftforge/fluids/Fluid", "net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$FillReturn", "net/minecraftforge/fluids/FluidStack"}, 0, new Object[] {}); + mv.visitInsn(ICONST_1); + mv.visitInsn(IRETURN); + mv.visitLabel(l6); + mv.visitLineNumber(142, l6); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLocalVariable("drain", "Lnet/minecraftforge/fluids/FluidStack;", null, l8, l6, 8); + mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l14, 0); + mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l14, 1); + mv.visitLocalVariable("inputSlot", "I", null, l0, l14, 2); + mv.visitLocalVariable("outputSlot", "I", null, l0, l14, 3); + mv.visitLocalVariable("fluidToFill", "Lnet/minecraftforge/fluids/Fluid;", null, l0, l14, 4); + mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l3, l14, 5); + mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l4, l14, 6); + mv.visitLocalVariable("fill", "Lmods/railcraft/common/fluids/FluidItemHelper$FillReturn;", null, l5, l14, 7); + mv.visitMaxs(5, 9); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals("drainContainers") && !obfuscated) { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "drainContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;II)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(146, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 4); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(147, l1); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "getStackInSlot", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 5); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(148, l2); + mv.visitVarInsn(ALOAD, 4); + Label l3 = new Label(); + mv.visitJumpInsn(IFNULL, l3); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(149, l4); + mv.visitVarInsn(ALOAD, 4); + mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "drainContainer", "(Lnet/minecraft/item/ItemStack;I)Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", false); + mv.visitVarInsn(ASTORE, 6); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(150, l5); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitJumpInsn(IFNULL, l3); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); + mv.visitJumpInsn(IFEQ, l3); + mv.visitLabel(l6); + mv.visitLineNumber(151, l6); + mv.visitFrame(F_APPEND,3, new Object[] {"net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn"}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); + mv.visitVarInsn(ISTORE, 7); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(152, l7); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); + Label l8 = new Label(); + mv.visitJumpInsn(IFEQ, l8); + mv.visitVarInsn(ILOAD, 7); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + Label l9 = new Label(); + mv.visitJumpInsn(IF_ICMPEQ, l9); + mv.visitLabel(l8); + mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); + mv.visitJumpInsn(IFNE, l3); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitJumpInsn(IFLE, l3); + mv.visitLabel(l9); + mv.visitLineNumber(153, l9); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); + mv.visitInsn(POP); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(154, l10); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(155, l11); + mv.visitInsn(ICONST_1); + mv.visitInsn(IRETURN); + mv.visitLabel(l3); + mv.visitLineNumber(159, l3); + mv.visitFrame(F_CHOP,2, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLocalVariable("used", "I", null, l7, l3, 7); + mv.visitLocalVariable("drain", "Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", null, l5, l3, 6); + mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l12, 0); + mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l12, 1); + mv.visitLocalVariable("inputSlot", "I", null, l0, l12, 2); + mv.visitLocalVariable("outputSlot", "I", null, l0, l12, 3); + mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l1, l12, 4); + mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l2, l12, 5); + mv.visitMaxs(4, 8); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals("drainContainers") && obfuscated) { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "drainContainers", "(Lnet/minecraftforge/fluids/IFluidHandler;Lnet/minecraft/inventory/IInventory;II)Z", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(146, l0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 4); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(147, l1); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 3); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraft/inventory/IInventory", "func_70301_a", "(I)Lnet/minecraft/item/ItemStack;", true); + mv.visitVarInsn(ASTORE, 5); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(148, l2); + mv.visitVarInsn(ALOAD, 4); + Label l3 = new Label(); + mv.visitJumpInsn(IFNULL, l3); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(149, l4); + mv.visitVarInsn(ALOAD, 4); + mv.visitIntInsn(SIPUSH, PROCESS_VOLUME); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidItemHelper", "drainContainer", "(Lnet/minecraft/item/ItemStack;I)Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", false); + mv.visitVarInsn(ASTORE, 6); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(150, l5); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitJumpInsn(IFNULL, l3); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); + Label l6 = new Label(); + mv.visitJumpInsn(IFNULL, l6); + mv.visitVarInsn(ALOAD, 5); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "hasPlaceToPutContainer", "(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z", false); + mv.visitJumpInsn(IFEQ, l3); + mv.visitLabel(l6); + mv.visitLineNumber(151, l6); + mv.visitFrame(F_APPEND,3, new Object[] {"net/minecraft/item/ItemStack", "net/minecraft/item/ItemStack", "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn"}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); + mv.visitVarInsn(ISTORE, 7); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(152, l7); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); + Label l8 = new Label(); + mv.visitJumpInsn(IFEQ, l8); + mv.visitVarInsn(ILOAD, 7); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + Label l9 = new Label(); + mv.visitJumpInsn(IF_ICMPEQ, l9); + mv.visitLabel(l8); + mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "isAtomic", "Z"); + mv.visitJumpInsn(IFNE, l3); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitFieldInsn(GETFIELD, "net/minecraftforge/fluids/FluidStack", "amount", "I"); + mv.visitJumpInsn(IFLE, l3); + mv.visitLabel(l9); + mv.visitLineNumber(153, l9); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/util/ForgeDirection", "UNKNOWN", "Lnet/minecraftforge/common/util/ForgeDirection;"); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "fluidDrained", "Lnet/minecraftforge/fluids/FluidStack;"); + mv.visitInsn(ICONST_1); + mv.visitMethodInsn(INVOKEINTERFACE, "net/minecraftforge/fluids/IFluidHandler", "fill", "(Lnet/minecraftforge/common/util/ForgeDirection;Lnet/minecraftforge/fluids/FluidStack;Z)I", true); + mv.visitInsn(POP); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(154, l10); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ALOAD, 6); + mv.visitFieldInsn(GETFIELD, "mods/railcraft/common/fluids/FluidItemHelper$DrainReturn", "container", "Lnet/minecraft/item/ItemStack;"); + mv.visitMethodInsn(INVOKESTATIC, "mods/railcraft/common/fluids/FluidHelper", "storeContainer", "(Lnet/minecraft/inventory/IInventory;IILnet/minecraft/item/ItemStack;)V", false); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(155, l11); + mv.visitInsn(ICONST_1); + mv.visitInsn(IRETURN); + mv.visitLabel(l3); + mv.visitLineNumber(159, l3); + mv.visitFrame(F_CHOP,2, null, 0, null); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLocalVariable("used", "I", null, l7, l3, 7); + mv.visitLocalVariable("drain", "Lmods/railcraft/common/fluids/FluidItemHelper$DrainReturn;", null, l5, l3, 6); + mv.visitLocalVariable("fluidHandler", "Lnet/minecraftforge/fluids/IFluidHandler;", null, l0, l12, 0); + mv.visitLocalVariable("inv", "Lnet/minecraft/inventory/IInventory;", null, l0, l12, 1); + mv.visitLocalVariable("inputSlot", "I", null, l0, l12, 2); + mv.visitLocalVariable("outputSlot", "I", null, l0, l12, 3); + mv.visitLocalVariable("input", "Lnet/minecraft/item/ItemStack;", null, l1, l12, 4); + mv.visitLocalVariable("output", "Lnet/minecraft/item/ItemStack;", null, l2, l12, 5); + mv.visitMaxs(4, 8); + mv.visitEnd(); + didInject = true; + } + + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); + return didInject; + } + + + + + + + + + + public class AddFieldAdapter extends ClassVisitor { + + public AddFieldAdapter(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + @Override + public FieldVisitor visitField( + int access, String name, String desc, String signature, Object value) { + if (name.equals("PROCESS_VOLUME") && desc.equals("I")) { + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, "Removing "+"PROCESS_VOLUME"+"."); + return null; + } + return cv.visitField(access, name, desc, signature, value); + } + + + private final String[] aMethodsToStrip = new String[] {"fillContainers", "drainContainers"}; + + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + found = true; + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + else { + methodVisitor = null; + } + + if (found) { + FMLRelaunchLog.log("[GT++ ASM] Railcraft PROCESS_VOLUME Patch", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + + + } + + + + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java new file mode 100644 index 0000000000..75896c1c0f --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools.java @@ -0,0 +1,235 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ACC_STATIC; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ARETURN; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; + +import java.lang.reflect.Method; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gregtech.api.enums.GT_Values; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; + +public class ClassTransformer_Railcraft_InvTools { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + private boolean obfuscated = true; + + + public static ItemStack depleteItem(ItemStack stack) { + if (stack == null) { + return GT_Values.NI; + } else { + if (stack.stackSize == 0) { + return GT_Values.NI; + } + else if (stack.stackSize == 1) { + ItemStack container = stack.getItem().getContainerItem(stack); + if (container != null) { + return container; + } else { + return GT_Values.NI; + } + } + else { + return ItemUtils.depleteStack(stack); + } + } + } + + public ClassTransformer_Railcraft_InvTools(byte[] basicClass, boolean obfuscated2) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + boolean devEnv = false; + boolean a1 = false; + boolean a2 = false; + + //Find Non-Obf method + try { + Method aGetStackInSlot = IInventory.class.getDeclaredMethod("getStackInSlot", int.class); + if (aGetStackInSlot != null) { + a1 = true; + } + } catch (NoSuchMethodException | SecurityException e) {} + + //Find Obf method + try { + Method aGetStackInSlotObf = IInventory.class.getDeclaredMethod("func_70301_a", int.class); + if (aGetStackInSlotObf != null) { + a2 = true; + } + } catch (NoSuchMethodException | SecurityException e) {} + + + if (a1) { + devEnv = false; + } + else if (a2) { + devEnv = true; + } + else { + //Fallback + devEnv = false; + } + + if (obfuscated && devEnv) { + + } + else { + + + } + + + + FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Are we patching obfuscated method? "+obfuscated); + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new AddFieldAdapter(aTempWriter), 0); + + injectMethod("depleteItem", aTempWriter, obfuscated); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + + FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Valid? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Injecting " + aMethodName + "."); + if (aMethodName.equals("depleteItem") && !obfuscated) { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "depleteItem", "(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(36, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools", "depleteItem", "(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals("depleteItem") && obfuscated) { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "depleteItem", "(Ladd;)Ladd;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(36, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_Railcraft_InvTools", "depleteItem", "(Ladd;)Ladd;", false); + mv.visitInsn(ARETURN); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLocalVariable("stack", "Ladd;", null, l0, l1, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + } + FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); + return didInject; + } + + + + + + + + + + public class AddFieldAdapter extends ClassVisitor { + + public AddFieldAdapter(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + private final String[] aMethodsToStrip = new String[] {"depleteItem"}; + + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + found = true; + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + else { + if (desc.equals("(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;")) { + obfuscated = false; + } + else if (desc.equals("(Ladd;)Ladd;")) { + obfuscated = true; + } + else { + obfuscated = false; + } + FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, + "Method desc " + desc + ", using "+(obfuscated ? "obfuscated method handler" : "deobfuscated method handler")); + methodVisitor = null; + } + + if (found) { + FMLRelaunchLog.log("[GT++ ASM] Railcraft negative ItemStack Fix", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + + + } + + + + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java new file mode 100644 index 0000000000..8f65709478 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence.java @@ -0,0 +1,278 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.AALOAD; +import static org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static org.objectweb.asm.Opcodes.ACONST_NULL; +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ARETURN; +import static org.objectweb.asm.Opcodes.ARRAYLENGTH; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.ASTORE; +import static org.objectweb.asm.Opcodes.DUP; +import static org.objectweb.asm.Opcodes.F_APPEND; +import static org.objectweb.asm.Opcodes.F_CHOP; +import static org.objectweb.asm.Opcodes.F_SAME; +import static org.objectweb.asm.Opcodes.F_SAME1; +import static org.objectweb.asm.Opcodes.GETSTATIC; +import static org.objectweb.asm.Opcodes.GOTO; +import static org.objectweb.asm.Opcodes.I2L; +import static org.objectweb.asm.Opcodes.ICONST_0; +import static org.objectweb.asm.Opcodes.IFEQ; +import static org.objectweb.asm.Opcodes.IFLE; +import static org.objectweb.asm.Opcodes.IFNONNULL; +import static org.objectweb.asm.Opcodes.IFNULL; +import static org.objectweb.asm.Opcodes.ILOAD; +import static org.objectweb.asm.Opcodes.INVOKESPECIAL; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL; +import static org.objectweb.asm.Opcodes.IRETURN; +import static org.objectweb.asm.Opcodes.ISTORE; +import static org.objectweb.asm.Opcodes.L2I; +import static org.objectweb.asm.Opcodes.LDIV; +import static org.objectweb.asm.Opcodes.LREM; +import static org.objectweb.asm.Opcodes.NEW; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.AnnotationVisitor; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + +public class ClassTransformer_TC_ItemWispEssence { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + public ClassTransformer_TC_ItemWispEssence(byte[] basicClass, boolean obfuscated2) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + boolean obfuscated = obfuscated2; + FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Are we patching obfuscated methods? "+obfuscated); + String aGetColour = obfuscated ? DevHelper.getSRG("getColorFromItemStack") : "getColorFromItemStack"; + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new AddAdapter(aTempWriter, new String[] {"getAspects", aGetColour}), 0); + injectMethod("getAspects", aTempWriter, obfuscated); + injectMethod(aGetColour, aTempWriter, obfuscated); + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Valid? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { + MethodVisitor mv; + boolean didInject = false; + FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Injecting " + aMethodName + "."); + + String aGetColour = obfuscated ? "func_82790_a" : "getColorFromItemStack"; + String aHasTagCompound = obfuscated ? "func_77942_o" : "hasTagCompound"; + String aGetTagCompound = obfuscated ? "func_77978_p" : "getTagCompound"; + + if (aMethodName.equals("getAspects")) { + mv = cw.visitMethod(ACC_PUBLIC, "getAspects", "(Lnet/minecraft/item/ItemStack;)Lthaumcraft/api/aspects/AspectList;", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(141, l0); + mv.visitVarInsn(ALOAD, 1); + Label l1 = new Label(); + mv.visitJumpInsn(IFNONNULL, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(142, l2); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + mv.visitLabel(l1); + mv.visitLineNumber(144, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", aHasTagCompound, "()Z", false); + Label l3 = new Label(); + mv.visitJumpInsn(IFEQ, l3); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(145, l4); + mv.visitTypeInsn(NEW, "thaumcraft/api/aspects/AspectList"); + mv.visitInsn(DUP); + mv.visitMethodInsn(INVOKESPECIAL, "thaumcraft/api/aspects/AspectList", "", "()V", false); + mv.visitVarInsn(ASTORE, 2); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(146, l5); + mv.visitVarInsn(ALOAD, 2); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/item/ItemStack", aGetTagCompound, "()Lnet/minecraft/nbt/NBTTagCompound;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/AspectList", "readFromNBT", "(Lnet/minecraft/nbt/NBTTagCompound;)V", false); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(147, l6); + mv.visitVarInsn(ALOAD, 2); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/AspectList", "size", "()I", false); + Label l7 = new Label(); + mv.visitJumpInsn(IFLE, l7); + mv.visitVarInsn(ALOAD, 2); + Label l8 = new Label(); + mv.visitJumpInsn(GOTO, l8); + mv.visitLabel(l7); + mv.visitFrame(F_APPEND,1, new Object[] {"thaumcraft/api/aspects/AspectList"}, 0, null); + mv.visitInsn(ACONST_NULL); + mv.visitLabel(l8); + mv.visitFrame(F_SAME1, 0, null, 1, new Object[] {"thaumcraft/api/aspects/AspectList"}); + mv.visitInsn(ARETURN); + mv.visitLabel(l3); + mv.visitLineNumber(149, l3); + mv.visitFrame(F_CHOP,1, null, 0, null); + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLocalVariable("this", "LgtPlusPlus/preloader/asm/transformers/ClassTransformer_TC_ItemWispEssence;", null, l0, l9, 0); + mv.visitLocalVariable("itemstack", "Lnet/minecraft/item/ItemStack;", null, l0, l9, 1); + mv.visitLocalVariable("aspects", "Lthaumcraft/api/aspects/AspectList;", null, l5, l3, 2); + mv.visitMaxs(2, 3); + mv.visitEnd(); + didInject = true; + } + else if (aMethodName.equals(aGetColour)) { + + //thaumcraft/common/items/ItemWispEssence + mv = cw.visitMethod(ACC_PUBLIC, aGetColour, "(Lnet/minecraft/item/ItemStack;I)I", null, null); + AnnotationVisitor av0; + { + av0 = mv.visitAnnotation("Lcpw/mods/fml/relauncher/SideOnly;", true); + av0.visitEnum("value", "Lcpw/mods/fml/relauncher/Side;", "CLIENT"); + av0.visitEnd(); + } + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(197, l0); + mv.visitVarInsn(ALOAD, 1); + Label l1 = new Label(); + mv.visitJumpInsn(IFNONNULL, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(198, l2); + mv.visitInsn(ICONST_0); + mv.visitInsn(IRETURN); + mv.visitLabel(l1); + mv.visitLineNumber(200, l1); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/items/ItemWispEssence", "getAspects", "(Lnet/minecraft/item/ItemStack;)Lthaumcraft/api/aspects/AspectList;", false); + Label l3 = new Label(); + mv.visitJumpInsn(IFNULL, l3); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(201, l4); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/items/ItemWispEssence", "getAspects", "(Lnet/minecraft/item/ItemStack;)Lthaumcraft/api/aspects/AspectList;", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/AspectList", "getAspects", "()[Lthaumcraft/api/aspects/Aspect;", false); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/Aspect", "getColor", "()I", false); + mv.visitInsn(IRETURN); + mv.visitLabel(l3); + mv.visitLineNumber(203, l3); + mv.visitFrame(F_SAME, 0, null, 0, null); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "currentTimeMillis", "()J", false); + mv.visitLdcInsn(new Long(500L)); + mv.visitInsn(LDIV); + mv.visitFieldInsn(GETSTATIC, "thaumcraft/common/items/ItemWispEssence", "displayAspects", "[Lthaumcraft/api/aspects/Aspect;"); + mv.visitInsn(ARRAYLENGTH); + mv.visitInsn(I2L); + mv.visitInsn(LREM); + mv.visitInsn(L2I); + mv.visitVarInsn(ISTORE, 3); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(204, l5); + mv.visitFieldInsn(GETSTATIC, "thaumcraft/common/items/ItemWispEssence", "displayAspects", "[Lthaumcraft/api/aspects/Aspect;"); + mv.visitVarInsn(ILOAD, 3); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/api/aspects/Aspect", "getColor", "()I", false); + mv.visitInsn(IRETURN); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLocalVariable("this", "Lthaumcraft/common/items/ItemWispEssence;", null, l0, l6, 0); + mv.visitLocalVariable("stack", "Lnet/minecraft/item/ItemStack;", null, l0, l6, 1); + mv.visitLocalVariable("par2", "I", null, l0, l6, 2); + mv.visitLocalVariable("idx", "I", null, l5, l6, 3); + mv.visitMaxs(4, 4); + mv.visitEnd(); + didInject = true; + } + + FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); + return didInject; + } + + public class AddAdapter extends ClassVisitor { + + public AddAdapter(ClassVisitor cv, String[] aMethods) { + super(ASM5, cv); + this.cv = cv; + this.aMethodsToStrip = aMethods; + } + + private final String[] aMethodsToStrip; + + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + found = true; + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + else { + methodVisitor = null; + } + + if (found) { + FMLRelaunchLog.log("[GT++ ASM] Thaumcraft WispEssence_Patch", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + + } + + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java new file mode 100644 index 0000000000..05b8054ff8 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer.java @@ -0,0 +1,611 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.*; + +import cpw.mods.fml.common.Loader; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.Preloader_Logger; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +public class ClassTransformer_TT_ThaumicRestorer { + + private final boolean isValid; + private final ClassReader reader; + private final ClassWriter writer; + + private static boolean mInit = false; + + private static Class mTileRepairerClass; + private static Class mTTConfigHandler; + private static Class mTinkersConstructCompat; + private static Class mThaumicTinkerer; + private static Class mTCProxy; + + private static Method mIsTcTool; + private static Method mGetTcDamage; + private static Method mFixTcDamage; + private static Method mSparkle; + private static Method mDrawEssentia; + + private static Field mRepairTiconTools; + private static Field mTicksExisted; + private static Field mInventory; + private static Field mTookLastTick; + private static Field mDamageLastTick; + private static Field mProxyTC; + + private static boolean repairTConTools = false; + + // thaumic.tinkerer.common.block.tile.TileRepairer + + private static final boolean isTConstructTool(ItemStack aStack) { + return ReflectionUtils.invoke(null, mIsTcTool, new Object[] {aStack}); + } + private static final int getDamage(ItemStack aStack) { + return (int) ReflectionUtils.invokeNonBool(null, mGetTcDamage, new Object[] {aStack}); + } + private static final boolean fixDamage(ItemStack aStack, int aAmount) { + return ReflectionUtils.invoke(null, mFixTcDamage, new Object[] {aStack, aAmount}); + } + private static final int drawEssentia(TileEntity aTile) { + return (int) ReflectionUtils.invokeNonBool(aTile, mDrawEssentia, new Object[] {}); + } + private static final void sparkle(float a, float b, float c, int d) { + ReflectionUtils.invokeVoid(ReflectionUtils.getFieldValue(mProxyTC), mSparkle, new Object[] {a, b, c, d}); + } + + public static void updateEntity(TileEntity aTile) { + if (!mInit) { + // Set the classes we need + mTileRepairerClass = ReflectionUtils.getClass("thaumic.tinkerer.common.block.tile.TileRepairer"); + mTTConfigHandler = ReflectionUtils.getClass("thaumic.tinkerer.common.core.handler.ConfigHandler"); + mTinkersConstructCompat = ReflectionUtils.getClass("thaumic.tinkerer.common.compat.TinkersConstructCompat"); + mThaumicTinkerer = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); + mTCProxy = ReflectionUtils.getClass("thaumcraft.common.CommonProxy"); + // Set the methods we need + mIsTcTool = ReflectionUtils.getMethod(mTinkersConstructCompat, "isTConstructTool", new Class[] {ItemStack.class}); + mGetTcDamage = ReflectionUtils.getMethod(mTinkersConstructCompat, "getDamage", new Class[] {ItemStack.class}); + mFixTcDamage = ReflectionUtils.getMethod(mTinkersConstructCompat, "fixDamage", new Class[] {ItemStack.class, int.class}); + mSparkle = ReflectionUtils.getMethod(mTCProxy, "sparkle", new Class[] {float.class, float.class, float.class, int.class}); + mDrawEssentia = ReflectionUtils.getMethod(mTileRepairerClass, "drawEssentia", new Class[] {}); + // Set the fields we need + mRepairTiconTools = ReflectionUtils.getField(mTTConfigHandler, "repairTConTools"); + mTicksExisted = ReflectionUtils.getField(mTileRepairerClass, "ticksExisted"); + mInventory = ReflectionUtils.getField(mTileRepairerClass, "inventorySlots"); + mTookLastTick = ReflectionUtils.getField(mTileRepairerClass, "tookLastTick"); + mDamageLastTick = ReflectionUtils.getField(mTileRepairerClass, "dmgLastTick"); + mProxyTC = ReflectionUtils.getField(mThaumicTinkerer, "tcProxy"); + repairTConTools = (boolean) ReflectionUtils.getFieldValue(mRepairTiconTools); + mInit = true; + } + if (mInit) { + if (mTileRepairerClass.isInstance(aTile)) { + int ticksExisted = (int) ReflectionUtils.getFieldValue(mTicksExisted, aTile); + ItemStack[] inventorySlots = (ItemStack[]) ReflectionUtils.getFieldValue(mInventory, aTile); + boolean tookLastTick = (boolean) ReflectionUtils.getFieldValue(mTookLastTick, aTile); + int dmgLastTick = (int) ReflectionUtils.getFieldValue(mDamageLastTick, aTile); + ticksExisted++; + ReflectionUtils.setField(aTile, mTicksExisted, ticksExisted); + boolean aDidRun = false; + if (ticksExisted % 10 == 0) { + if (Loader.isModLoaded("TConstruct") && repairTConTools && inventorySlots[0] != null && isTConstructTool(inventorySlots[0])) { + final int dmg = getDamage(inventorySlots[0]); + if (dmg > 0) { + final int essentia = drawEssentia(aTile); + fixDamage(inventorySlots[0], essentia); + aTile.markDirty(); + if (dmgLastTick != 0 && dmgLastTick != dmg) { + sparkle((float)(aTile.xCoord + 0.25 + Math.random() / 2.0), (float)(aTile.yCoord + 1 + Math.random() / 2.0), (float)(aTile.zCoord + 0.25 + Math.random() / 2.0), 0); + tookLastTick = true; + } + else { + tookLastTick = false; + } + } + else { + tookLastTick = false; + } + dmgLastTick = ((inventorySlots[0] == null) ? 0 : getDamage(inventorySlots[0])); + aDidRun = true; + } + if (inventorySlots[0] != null && inventorySlots[0].getItemDamage() > 0 && inventorySlots[0].getItem().isRepairable()) { + final int essentia2 = drawEssentia(aTile); + final int dmg2 = inventorySlots[0].getItemDamage(); + inventorySlots[0].setItemDamage(Math.max(0, dmg2 - essentia2)); + aTile.markDirty(); + if (dmgLastTick != 0 && dmgLastTick != dmg2) { + sparkle((float)(aTile.xCoord + 0.25 + Math.random() / 2.0), (float)(aTile.yCoord + 1 + Math.random() / 2.0), (float)(aTile.zCoord + 0.25 + Math.random() / 2.0), 0); + tookLastTick = true; + } + else { + tookLastTick = false; + } + } + else { + tookLastTick = false; + } + dmgLastTick = ((inventorySlots[0] == null) ? 0 : inventorySlots[0].getItemDamage()); + aDidRun = true; + } + if (aDidRun) { + ReflectionUtils.setField(aTile, mInventory, inventorySlots); + ReflectionUtils.setField(aTile, mTookLastTick, tookLastTick); + ReflectionUtils.setField(aTile, mDamageLastTick, dmgLastTick); + } + } + } + } + + public ClassTransformer_TT_ThaumicRestorer(byte[] basicClass) { + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + boolean obfuscated = false; + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + AddAdapter aMethodStripper = new AddAdapter(aTempWriter); + aTempReader.accept(aMethodStripper, 0); + obfuscated = aMethodStripper.isObfuscated; + String aUpdateEntity = obfuscated ? "func_145845_h" : "updateEntity"; + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Patching: "+aUpdateEntity+", Are we patching obfuscated methods? "+obfuscated); + //injectMethod(aUpdateEntity, aTempWriter, obfuscated); + injectMethodNew(aTempWriter, obfuscated); + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Valid? "+isValid+"."); + reader = aTempReader; + writer = aTempWriter; + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public boolean injectMethodNew(ClassWriter cw, boolean obfuscated) { + MethodVisitor mv; + boolean didInject = false; + String aUpdateEntity = obfuscated ? "func_145845_h" : "updateEntity"; + String aTileEntity = obfuscated ? "aor" : "net/minecraft/tileentity/TileEntity"; + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Injecting " + aUpdateEntity + "."); + mv = cw.visitMethod(ACC_PUBLIC, aUpdateEntity, "()V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(60, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, "gtPlusPlus/preloader/asm/transformers/ClassTransformer_TT_ThaumicRestorer", "updateEntity", "(L"+aTileEntity+";)V", false); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(61, l1); + mv.visitInsn(RETURN); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLocalVariable("this", "Lthaumic/tinkerer/common/block/tile/TileRepairer;", null, l0, l2, 0); + mv.visitMaxs(1, 1); + mv.visitEnd(); + didInject = true; + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); + return didInject; + } + + public boolean injectMethod(String aMethodName, ClassWriter cw, boolean obfuscated) { + MethodVisitor mv; + boolean didInject = false; + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Injecting " + aMethodName + "."); + + String aItemStack = obfuscated ? "add" : "net/minecraft/item/ItemStack"; + String aItem = obfuscated ? "adb" : "net/minecraft/item/Item"; + String aGetItemDamage = obfuscated ? "func_150976_a" : "getItemDamage"; + String aGetItem = obfuscated ? "func_77973_b" : "getItem"; + String aSetItemDamage = obfuscated ? "func_77964_b" : "setItemDamage"; + String aIsRepairable = obfuscated ? "func_82789_a" : "isRepairable"; + + mv = cw.visitMethod(ACC_PUBLIC, aMethodName, "()V", null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(59, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(DUP); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "ticksExisted", "I"); + mv.visitInsn(ICONST_1); + mv.visitInsn(IADD); + mv.visitInsn(DUP_X1); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "ticksExisted", "I"); + mv.visitIntInsn(BIPUSH, 10); + mv.visitInsn(IREM); + Label l1 = new Label(); + mv.visitJumpInsn(IFNE, l1); + Label l2 = new Label(); + mv.visitLabel(l2); + mv.visitLineNumber(60, l2); + mv.visitLdcInsn("TConstruct"); + mv.visitMethodInsn(INVOKESTATIC, "cpw/mods/fml/common/Loader", "isModLoaded", "(Ljava/lang/String;)Z", false); + Label l3 = new Label(); + mv.visitJumpInsn(IFEQ, l3); + mv.visitFieldInsn(GETSTATIC, "thaumic/tinkerer/common/core/handler/ConfigHandler", "repairTConTools", "Z"); + mv.visitJumpInsn(IFEQ, l3); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLineNumber(61, l4); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitJumpInsn(IFNULL, l3); + Label l5 = new Label(); + mv.visitLabel(l5); + mv.visitLineNumber(62, l5); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "isTConstructTool", "(L"+aItemStack+";)Z", false); + mv.visitJumpInsn(IFEQ, l3); + Label l6 = new Label(); + mv.visitLabel(l6); + mv.visitLineNumber(63, l6); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "getDamage", "(L"+aItemStack+";)I", false); + mv.visitVarInsn(ISTORE, 1); + Label l7 = new Label(); + mv.visitLabel(l7); + mv.visitLineNumber(64, l7); + mv.visitVarInsn(ILOAD, 1); + Label l8 = new Label(); + mv.visitJumpInsn(IFLE, l8); + Label l9 = new Label(); + mv.visitLabel(l9); + mv.visitLineNumber(65, l9); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "drawEssentia", "()I", false); + mv.visitVarInsn(ISTORE, 2); + Label l10 = new Label(); + mv.visitLabel(l10); + mv.visitLineNumber(66, l10); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitVarInsn(ILOAD, 2); + mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "fixDamage", "(L"+aItemStack+";I)Z", false); + mv.visitInsn(POP); + Label l11 = new Label(); + mv.visitLabel(l11); + mv.visitLineNumber(67, l11); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "markDirty", "()V", false); + Label l12 = new Label(); + mv.visitLabel(l12); + mv.visitLineNumber(68, l12); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); + Label l13 = new Label(); + mv.visitJumpInsn(IFEQ, l13); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); + mv.visitVarInsn(ILOAD, 1); + mv.visitJumpInsn(IF_ICMPEQ, l13); + Label l14 = new Label(); + mv.visitLabel(l14); + mv.visitLineNumber(69, l14); + mv.visitFieldInsn(GETSTATIC, "thaumic/tinkerer/common/ThaumicTinkerer", "tcProxy", "Lthaumcraft/common/CommonProxy;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "xCoord", "I"); + mv.visitInsn(I2D); + mv.visitLdcInsn(new Double("0.25")); + mv.visitInsn(DADD); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); + mv.visitLdcInsn(new Double("2.0")); + mv.visitInsn(DDIV); + mv.visitInsn(DADD); + mv.visitInsn(D2F); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "yCoord", "I"); + mv.visitInsn(ICONST_1); + mv.visitInsn(IADD); + mv.visitInsn(I2D); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); + mv.visitLdcInsn(new Double("2.0")); + mv.visitInsn(DDIV); + mv.visitInsn(DADD); + mv.visitInsn(D2F); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "zCoord", "I"); + mv.visitInsn(I2D); + mv.visitLdcInsn(new Double("0.25")); + mv.visitInsn(DADD); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); + mv.visitLdcInsn(new Double("2.0")); + mv.visitInsn(DDIV); + mv.visitInsn(DADD); + mv.visitInsn(D2F); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/CommonProxy", "sparkle", "(FFFI)V", false); + Label l15 = new Label(); + mv.visitLabel(l15); + mv.visitLineNumber(70, l15); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_1); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); + Label l16 = new Label(); + mv.visitLabel(l16); + mv.visitLineNumber(71, l16); + Label l17 = new Label(); + mv.visitJumpInsn(GOTO, l17); + mv.visitLabel(l13); + mv.visitFrame(Opcodes.F_APPEND,2, new Object[] {Opcodes.INTEGER, Opcodes.INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_0); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); + Label l18 = new Label(); + mv.visitLabel(l18); + mv.visitLineNumber(72, l18); + mv.visitJumpInsn(GOTO, l17); + mv.visitLabel(l8); + mv.visitFrame(Opcodes.F_CHOP,1, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_0); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); + mv.visitLabel(l17); + mv.visitLineNumber(73, l17); + mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + Label l19 = new Label(); + mv.visitJumpInsn(IFNONNULL, l19); + mv.visitInsn(ICONST_0); + Label l20 = new Label(); + mv.visitJumpInsn(GOTO, l20); + mv.visitLabel(l19); + mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer"}); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKESTATIC, "thaumic/tinkerer/common/compat/TinkersConstructCompat", "getDamage", "(L"+aItemStack+";)I", false); + mv.visitLabel(l20); + mv.visitFrame(Opcodes.F_FULL, 2, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer", Opcodes.INTEGER}, 2, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer", Opcodes.INTEGER}); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); + Label l21 = new Label(); + mv.visitLabel(l21); + mv.visitLineNumber(74, l21); + mv.visitInsn(RETURN); + mv.visitLabel(l3); + mv.visitLineNumber(78, l3); + mv.visitFrame(Opcodes.F_CHOP,1, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + Label l22 = new Label(); + mv.visitJumpInsn(IFNULL, l22); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItemDamage+"", "()I", false); + mv.visitJumpInsn(IFLE, l22); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItem+"", "()L"+aItem+";", false); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItem+"", ""+aIsRepairable+"", "()Z", false); + mv.visitJumpInsn(IFEQ, l22); + Label l23 = new Label(); + mv.visitLabel(l23); + mv.visitLineNumber(79, l23); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "drawEssentia", "()I", false); + mv.visitVarInsn(ISTORE, 1); + Label l24 = new Label(); + mv.visitLabel(l24); + mv.visitLineNumber(80, l24); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItemDamage+"", "()I", false); + mv.visitVarInsn(ISTORE, 2); + Label l25 = new Label(); + mv.visitLabel(l25); + mv.visitLineNumber(81, l25); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitInsn(ICONST_0); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 1); + mv.visitInsn(ISUB); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "max", "(II)I", false); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aSetItemDamage+"", "(I)V", false); + Label l26 = new Label(); + mv.visitLabel(l26); + mv.visitLineNumber(82, l26); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumic/tinkerer/common/block/tile/TileRepairer", "markDirty", "()V", false); + Label l27 = new Label(); + mv.visitLabel(l27); + mv.visitLineNumber(84, l27); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); + Label l28 = new Label(); + mv.visitJumpInsn(IFEQ, l28); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); + mv.visitVarInsn(ILOAD, 2); + mv.visitJumpInsn(IF_ICMPEQ, l28); + Label l29 = new Label(); + mv.visitLabel(l29); + mv.visitLineNumber(85, l29); + mv.visitFieldInsn(GETSTATIC, "thaumic/tinkerer/common/ThaumicTinkerer", "tcProxy", "Lthaumcraft/common/CommonProxy;"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "xCoord", "I"); + mv.visitInsn(I2D); + mv.visitLdcInsn(new Double("0.25")); + mv.visitInsn(DADD); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); + mv.visitLdcInsn(new Double("2.0")); + mv.visitInsn(DDIV); + mv.visitInsn(DADD); + mv.visitInsn(D2F); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "yCoord", "I"); + mv.visitInsn(ICONST_1); + mv.visitInsn(IADD); + mv.visitInsn(I2D); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); + mv.visitLdcInsn(new Double("2.0")); + mv.visitInsn(DDIV); + mv.visitInsn(DADD); + mv.visitInsn(D2F); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "zCoord", "I"); + mv.visitInsn(I2D); + mv.visitLdcInsn(new Double("0.25")); + mv.visitInsn(DADD); + mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "random", "()D", false); + mv.visitLdcInsn(new Double("2.0")); + mv.visitInsn(DDIV); + mv.visitInsn(DADD); + mv.visitInsn(D2F); + mv.visitInsn(ICONST_0); + mv.visitMethodInsn(INVOKEVIRTUAL, "thaumcraft/common/CommonProxy", "sparkle", "(FFFI)V", false); + Label l30 = new Label(); + mv.visitLabel(l30); + mv.visitLineNumber(86, l30); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_1); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); + Label l31 = new Label(); + mv.visitLabel(l31); + mv.visitLineNumber(87, l31); + Label l32 = new Label(); + mv.visitJumpInsn(GOTO, l32); + mv.visitLabel(l28); + mv.visitFrame(Opcodes.F_APPEND,2, new Object[] {Opcodes.INTEGER, Opcodes.INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_0); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); + Label l33 = new Label(); + mv.visitLabel(l33); + mv.visitLineNumber(88, l33); + mv.visitJumpInsn(GOTO, l32); + mv.visitLabel(l22); + mv.visitFrame(Opcodes.F_CHOP,2, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(ICONST_0); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "tookLastTick", "Z"); + mv.visitLabel(l32); + mv.visitLineNumber(90, l32); + mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + Label l34 = new Label(); + mv.visitJumpInsn(IFNONNULL, l34); + mv.visitInsn(ICONST_0); + Label l35 = new Label(); + mv.visitJumpInsn(GOTO, l35); + mv.visitLabel(l34); + mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer"}); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "inventorySlots", "[L"+aItemStack+";"); + mv.visitInsn(ICONST_0); + mv.visitInsn(AALOAD); + mv.visitMethodInsn(INVOKEVIRTUAL, ""+aItemStack+"", ""+aGetItemDamage+"", "()I", false); + mv.visitLabel(l35); + mv.visitFrame(Opcodes.F_FULL, 1, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer"}, 2, new Object[] {"thaumic/tinkerer/common/block/tile/TileRepairer", Opcodes.INTEGER}); + mv.visitFieldInsn(PUTFIELD, "thaumic/tinkerer/common/block/tile/TileRepairer", "dmgLastTick", "I"); + mv.visitLabel(l1); + mv.visitLineNumber(92, l1); + mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null); + mv.visitInsn(RETURN); + Label l36 = new Label(); + mv.visitLabel(l36); + mv.visitLocalVariable("this", "Lthaumic/tinkerer/common/block/tile/TileRepairer;", null, l0, l36, 0); + mv.visitLocalVariable("dmg", "I", null, l7, l3, 1); + mv.visitLocalVariable("essentia", "I", null, l10, l18, 2); + mv.visitLocalVariable("essentia", "I", null, l24, l33, 1); + mv.visitLocalVariable("dmg", "I", null, l25, l33, 2); + mv.visitMaxs(9, 3); + mv.visitEnd(); + didInject = true; + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, "Method injection complete. "+(obfuscated ? "Obfuscated" : "Non-Obfuscated")); + return didInject; + } + + public class AddAdapter extends ClassVisitor { + + public AddAdapter(ClassVisitor cv) { + super(ASM5, cv); + this.cv = cv; + } + + private final String[] aMethodsToStrip = new String[] {"updateEntity", "func_145845_h"}; + public boolean isObfuscated = false; + + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + + MethodVisitor methodVisitor; + boolean found = false; + + for (String s : aMethodsToStrip) { + if (name.equals(s)) { + found = true; + if (s.equals(aMethodsToStrip[1])) { + isObfuscated = true; + } + break; + } + } + if (!found) { + methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + } + else { + methodVisitor = null; + } + + if (found) { + Preloader_Logger.LOG("Thaumic Tinkerer RepairItem Patch", Level.INFO, + "Found method " + name + ", removing."); + } + return methodVisitor; + } + + } + + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java new file mode 100644 index 0000000000..083041050d --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/ClassTransformer_TiConFluids.java @@ -0,0 +1,164 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.*; + +import java.io.IOException; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.ClassWriter; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.preloader.DevHelper; + + +public class ClassTransformer_TiConFluids { + + + //Leftover Code, in case I ever want to inject interfaces. + //private static final String cloneableInterface = "java/lang/Cloneable"; + + //The qualified name of the class we plan to transform. + private static final String className = "tconstruct.smeltery.blocks.TConstructFluid"; + + private final boolean isValid; + private final boolean isObfuscated; + private final String methodName; + private final ClassReader reader; + private final ClassWriter writer; + + public ClassTransformer_TiConFluids(String aMethodName, boolean obfuscated, byte[] basicClass) { + isObfuscated = obfuscated; + + methodName = obfuscated ? DevHelper.getSRG(aMethodName) : aMethodName; + + ClassReader aTempReader = null; + ClassWriter aTempWriter = null; + + aTempReader = new ClassReader(basicClass); + aTempWriter = new ClassWriter(aTempReader, ClassWriter.COMPUTE_FRAMES); + aTempReader.accept(new localClassVisitir(aTempWriter, isObfuscated), 0); + + if (aTempReader != null && aTempWriter != null) { + isValid = true; + } + else { + isValid = false; + } + reader = aTempReader; + writer = aTempWriter; + + if (reader != null && writer != null) { + injectMethod(); + } + + } + + public boolean isValidTransformer() { + return isValid; + } + + public ClassReader getReader() { + return reader; + } + + public ClassWriter getWriter() { + return writer; + } + + public void injectMethod() { + if (isValidTransformer()) { + FMLRelaunchLog.log("[GT++ ASM] Bright Fluids", Level.INFO, "Injecting "+methodName+" into "+className+". ["+(isObfuscated ? "Obfuscated" : "Unobfuscated")+"]"); + //Account for Obfuscated constructor args. + String IBlockAccessName = isObfuscated ? "ahl" : "net/minecraft/world/IBlockAccess"; + String aConstructorTypes = "(L"+IBlockAccessName+";III)I"; + + MethodVisitor mv = getWriter().visitMethod(ACC_PUBLIC, methodName, aConstructorTypes, null, null); + mv.visitCode(); + Label l0 = new Label(); + mv.visitLabel(l0); + mv.visitLineNumber(17, l0); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, "tconstruct/smeltery/blocks/TConstructFluid", "maxScaledLight", "I"); + mv.visitVarInsn(ISTORE, 5); + Label l1 = new Label(); + mv.visitLabel(l1); + mv.visitLineNumber(18, l1); + mv.visitVarInsn(ILOAD, 5); + Label l2 = new Label(); + mv.visitJumpInsn(IFLE, l2); + Label l3 = new Label(); + mv.visitLabel(l3); + mv.visitLineNumber(19, l3); + mv.visitVarInsn(ILOAD, 5); + mv.visitInsn(IRETURN); + mv.visitLabel(l2); + mv.visitLineNumber(21, l2); + mv.visitFrame(F_APPEND,1, new Object[] {INTEGER}, 0, null); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitVarInsn(ILOAD, 2); + mv.visitVarInsn(ILOAD, 3); + mv.visitVarInsn(ILOAD, 4); + //net.minecraftforge.fluids.BlockFluidClassic.getLightValue(IBlockAccess, int, int, int) + mv.visitMethodInsn(INVOKESPECIAL, "net/minecraftforge/fluids/BlockFluidClassic", methodName, aConstructorTypes, false); + mv.visitInsn(IRETURN); + Label l4 = new Label(); + mv.visitLabel(l4); + mv.visitLocalVariable("this", "Ltconstruct/smeltery/blocks/TConstructFluid;", null, l0, l4, 0); + mv.visitLocalVariable("world", "L"+IBlockAccessName+";", null, l0, l4, 1); + mv.visitLocalVariable("x", "I", null, l0, l4, 2); + mv.visitLocalVariable("y", "I", null, l0, l4, 3); + mv.visitLocalVariable("z", "I", null, l0, l4, 4); + mv.visitLocalVariable("maxLight", "I", null, l1, l4, 5); + mv.visitMaxs(5, 6); + mv.visitEnd(); + FMLRelaunchLog.log("[GT++ ASM] Bright Fluids", Level.INFO, "Method injection complete."); + + } + } + + public final class localClassVisitir extends ClassVisitor { + + private final boolean mIsObfuscated; + + public localClassVisitir(ClassVisitor cv, boolean obfuscated) { + super(ASM5, cv); + mIsObfuscated = obfuscated; + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + String IBlockAccessName = isObfuscated ? "ahl" : "net/minecraft/world/IBlockAccess"; + String aConstructorTypes = "(L"+IBlockAccessName+";III)I"; + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + if(name.equals(methodName) && desc.equals(aConstructorTypes)) { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Found target method. ["+mIsObfuscated+"]"); + return new localMethodVisitor(methodVisitor, mIsObfuscated); + } + return methodVisitor; + } + + } + + private final class localMethodVisitor extends MethodVisitor { + + private final boolean mObfuscated; + + public localMethodVisitor(MethodVisitor mv, boolean obfuscated) { + super(ASM5, mv); + this.mObfuscated = obfuscated; + } + + @Override + public void visitCode() { + + } + + } + + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java new file mode 100644 index 0000000000..05a476c1c8 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer.java @@ -0,0 +1,79 @@ +package gtPlusPlus.preloader.asm.transformers; + +import static org.objectweb.asm.Opcodes.ALOAD; +import static org.objectweb.asm.Opcodes.ASM5; +import static org.objectweb.asm.Opcodes.IFEQ; +import static org.objectweb.asm.Opcodes.INVOKESTATIC; +import static org.objectweb.asm.Opcodes.RETURN; + +import org.apache.logging.log4j.Level; +import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.Label; +import org.objectweb.asm.MethodVisitor; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; + +public class Preloader_ClassTransformer { + + public static final class OreDictionaryVisitor extends ClassVisitor { + + public OreDictionaryVisitor(ClassVisitor cv) { + super(ASM5, cv); + } + + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + MethodVisitor methodVisitor = super.visitMethod(access, name, desc, signature, exceptions); + if(name.equals("registerOreImpl") && desc.equals("(Ljava/lang/String;Lnet/minecraft/item/ItemStack;)V")) { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Found target method. [Unobfuscated]"); + return new RegisterOreImplVisitor(methodVisitor, false); + } + else if(name.equals("registerOreImpl") && desc.equals("(Ljava/lang/String;Ladd;)V")) { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Found target method. [Obfuscated]"); + return new RegisterOreImplVisitor(methodVisitor, true); + } + return methodVisitor; + } + + } + + private static final class RegisterOreImplVisitor extends MethodVisitor { + + private final boolean mObfuscated; + + public RegisterOreImplVisitor(MethodVisitor mv, boolean obfuscated) { + super(ASM5, mv); + this.mObfuscated = obfuscated; + } + + @Override + public void visitCode() { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Fixing Forge's poor attempt at an oreDictionary."); + super.visitCode(); + super.visitVarInsn(ALOAD, 0); + super.visitVarInsn(ALOAD, 1); + if (!mObfuscated){ + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Injecting target method. [Unobfuscated]"); + super.visitMethodInsn(INVOKESTATIC, + "gtPlusPlus/preloader/Preloader_GT_OreDict", + "shouldPreventRegistration", + "(Ljava/lang/String;Lnet/minecraft/item/ItemStack;)Z", + false); + } + else { + FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Injecting target method. [Obfuscated]"); + super.visitMethodInsn(INVOKESTATIC, + "gtPlusPlus/preloader/Preloader_GT_OreDict", + "shouldPreventRegistration", + "(Ljava/lang/String;Ladd;)Z", + false); + } + Label endLabel = new Label(); + super.visitJumpInsn(IFEQ, endLabel); + super.visitInsn(RETURN); + super.visitLabel(endLabel); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java new file mode 100644 index 0000000000..443337bd35 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_ClassTransformer2.java @@ -0,0 +1,16 @@ +package gtPlusPlus.preloader.asm.transformers; + +public class Preloader_ClassTransformer2 { + + /** + * + * So what I'd try is something like patch a new field into BaseMetaTileEntity to hold the ItemNBT, + * then patch GT_Block_Machines.breakBlock to store the ItemNBT into that field by calling setItemNBT, + * and then patch BaseMetaTileEntity.getDrops to retrieve that field instead of calling setItemNBT + * But there's probably a simpler solution if all you want to do is fix this + * for your super tanks rather than for all GT machines + * (which would only include saving the output count for chest buffers and item distributors...) + * + */ + +} diff --git a/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java b/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java new file mode 100644 index 0000000000..5cb2eef066 --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java @@ -0,0 +1,286 @@ +package gtPlusPlus.preloader.asm.transformers; + +import cpw.mods.fml.relauncher.CoreModManager; +import cpw.mods.fml.relauncher.ReflectionHelper; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.preloader.DevHelper; +import gtPlusPlus.preloader.Preloader_Logger; +import gtPlusPlus.preloader.asm.AsmConfig; +import gtPlusPlus.preloader.asm.transformers.Preloader_ClassTransformer.OreDictionaryVisitor; +import net.minecraft.launchwrapper.IClassTransformer; +import net.minecraft.launchwrapper.Launch; +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.ClassWriter; + +import java.io.File; +import java.io.IOException; + +import static gtPlusPlus.preloader.asm.ClassesToTransform.*; + +public class Preloader_Transformer_Handler implements IClassTransformer { + + public static final AsmConfig mConfig; + public static final AutoMap IC2_WRENCH_PATCH_CLASS_NAMES = new AutoMap(); + + static { + mConfig = new AsmConfig(new File("config/GTplusplus/asm.cfg")); + Preloader_Logger.INFO("Config Location: "+AsmConfig.config.getConfigFile().getAbsolutePath()); + Preloader_Logger.INFO("Is DevHelper Valid? "+DevHelper.mIsValidHelper); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_BASE_TILE_ENTITY); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_MACHINE1); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_MACHINE2); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_MACHINE3); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_KINETIC_GENERATOR); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_HEAT_GENERATOR); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_GENERATOR); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_ACCESS_HATCH); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_CHAMBER); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_FLUID_PORT); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_REDSTONE_PORT); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_REACTOR_VESSEL); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_PERSONAL); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_CHARGEPAD); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_ELECTRIC); + IC2_WRENCH_PATCH_CLASS_NAMES.add(IC2_BLOCK_LUMINATOR); + } + + private static Boolean mObf = null; + + public boolean checkObfuscated() { + if (mObf != null) { + return mObf; + } + boolean obfuscated = false; + try { + obfuscated = !(boolean) ReflectionHelper.findField(CoreModManager.class, "deobfuscatedEnvironment").get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + byte[] bs; + try { + bs = Launch.classLoader.getClassBytes("net.minecraft.world.World"); + if (bs != null) { + obfuscated = false; + } else { + obfuscated = true; + } + } catch (IOException e1) { + e1.printStackTrace(); + obfuscated = false; + } + } + mObf = obfuscated; + return obfuscated; + } + + public byte[] transform(String name, String transformedName, byte[] basicClass) { + /* + * Here we patch all instances of entity.setHealth and replace them with a static function. + * Only EntityLivingBase is left untouched, as nothing else truly needs to be calling this method and avoiding forge hooks. + * May exclude all vanilla/forge class if this causes issues though. + */ + /* PatchForge : if (AsmConfig.enabledFixEntitySetHealth && !transformedName.contains("gtPlusPlus.preloader")) { + + //Skip Vanilla/Forge Classes + if (transformedName.contains("net.minecraft.") || transformedName.contains("cpw.")) { + //break PatchForge; + } + + ClassTransformer_Forge_EntityLivingBase_SetHealth aForgeHealthFix = new ClassTransformer_Forge_EntityLivingBase_SetHealth(transformedName, basicClass); + if (aForgeHealthFix.isValidTransformer() && aForgeHealthFix.didPatchClass()) { + Preloader_Logger.INFO("Fix EntityLivingBase.setHealth misuse", "Transforming "+transformedName); + basicClass = aForgeHealthFix.getWriter().toByteArray(); + } + }*/ + + // Is this environment obfuscated? (Extra checks just in case some weird shit happens during the check) + final boolean obfuscated = checkObfuscated(); + + // Fix LWJGL index array out of bounds on keybinding IDs + if ((transformedName.equals(LWJGL_KEYBOARD) || transformedName.equals(MINECRAFT_GAMESETTINGS_OBF) || transformedName.equals(MINECRAFT_GAMESETTINGS)) && AsmConfig.enabledLwjglKeybindingFix) { + boolean isClientSettingsClass = false; + if (!transformedName.equals("org.lwjgl.input.Keyboard")) { + isClientSettingsClass = true; + } + Preloader_Logger.INFO("LWJGL Keybinding index out of bounds fix", "Transforming "+transformedName); + return new ClassTransformer_LWJGL_Keyboard(basicClass, isClientSettingsClass).getWriter().toByteArray(); + } + + //Enable mapping of Tickets and loaded chunks. - Forge + if (transformedName.equals(FORGE_CHUNK_MANAGER) && AsmConfig.enableChunkDebugging) { + Preloader_Logger.INFO("Chunkloading Patch", "Transforming "+transformedName); + return new ClassTransformer_Forge_ChunkLoading(basicClass, false).getWriter().toByteArray(); + } + + // Fix the OreDictionary - Forge + if (transformedName.equals(FORGE_ORE_DICTIONARY) && AsmConfig.enableOreDictPatch) { + Preloader_Logger.INFO("OreDictTransformer", "Transforming "+transformedName); + ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES); + new ClassReader(basicClass).accept(new OreDictionaryVisitor(classWriter), 0); + return classWriter.toByteArray(); + } + + // Log Handling of CodeChicken + if (transformedName.equals("codechicken.nei.guihook.GuiContainerManager")) { + //Preloader_Logger.INFO("CodeChicken GuiContainerManager Patch", "Transforming "+transformedName); + //return new ClassTransformer_CC_GuiContainerManager(basicClass).getWriter().toByteArray(); + } + // Fix the OreDictionary COFH + if (transformedName.equals(COFH_ORE_DICTIONARY_ARBITER) && (AsmConfig.enableCofhPatch || !obfuscated)) { + Preloader_Logger.INFO("COFH", "Transforming "+transformedName); + return new ClassTransformer_COFH_OreDictionaryArbiter(basicClass).getWriter().toByteArray(); + } + + // Fix Tinkers Fluids + if (transformedName.equals(TINKERS_FLUID_BLOCK) && AsmConfig.enableTiConFluidLighting) { + Preloader_Logger.INFO("Bright Fluids", "Transforming "+transformedName); + return new ClassTransformer_TiConFluids("getLightValue", obfuscated, basicClass).getWriter().toByteArray(); + } + + //Fix RC stuff + //Patching PROCESS_VOLUME to allow more transfer limits + if (transformedName.equals(RAILCRAFT_FLUID_HELPER) && (AsmConfig.enableRcFlowFix && AsmConfig.maxRailcraftTankProcessVolume != 4000)) { + Preloader_Logger.INFO("Railcraft PROCESS_VOLUME Patch", "Transforming "+transformedName); + return new ClassTransformer_Railcraft_FluidHelper(basicClass, obfuscated).getWriter().toByteArray(); + } + //Patching TRANSFER_RATE in Fluid Loaders/Unloaders + if ((transformedName.equals(RAILCRAFT_TILE_FLUID_LOADER) && AsmConfig.maxRailcraftFluidLoaderFlow != 20) || (transformedName.equals("mods.railcraft.common.blocks.machine.gamma.TileFluidUnloader") && AsmConfig.maxRailcraftFluidUnloaderFlow != 80)) { + Preloader_Logger.INFO("Railcraft TRANSFER_RATE Patch", "Transforming "+transformedName); + return new ClassTransformer_Railcraft_FluidCartHandling(basicClass, obfuscated, transformedName).getWriter().toByteArray(); + } + //Fix Weird glitch involving negative itemstacks. + if (transformedName.equals(RAILCRAFT_INVENTORY_TOOLS) && AsmConfig.enableRcItemDupeFix) { + Preloader_Logger.INFO("Railcraft negative ItemStack Fix", "Transforming "+transformedName); + return new ClassTransformer_Railcraft_InvTools(basicClass, obfuscated).getWriter().toByteArray(); + } + + //Fix GC stuff + if (AsmConfig.enableGcFuelChanges) { + if (transformedName.equals(GALACTICRAFT_FLUID_UTILS)) { + Preloader_Logger.INFO("Galacticraft FluidUtils Patch", "Transforming "+transformedName); + return new ClassTransformer_GC_FluidUtil(basicClass, false).getWriter().toByteArray(); + } + if (transformedName.equals(GALACTICRAFT_TILE_ENTITY_FUEL_LOADER)) { + Preloader_Logger.INFO("Galacticraft Fuel_Loader Patch", "Transforming "+transformedName); + return new ClassTransformer_GC_FuelLoader(basicClass, false).getWriter().toByteArray(); + } + if (transformedName.equals(GALACTICRAFT_ENTITY_AUTO_ROCKET)) { + Preloader_Logger.INFO("Galacticraft EntityAutoRocket Patch", "Transforming "+transformedName); + return new ClassTransformer_GC_EntityAutoRocket(basicClass, false).getWriter().toByteArray(); + } + } + + + /** + * Gregtech ASM Patches + */ + +// if (transformedName.equals(GT_UTILITY)) { +// Preloader_Logger.INFO("Gregtech Utilities Patch", "Transforming "+transformedName); +// return new ClassTransformer_GT_Utility(basicClass, transformedName).getWriter().toByteArray(); +// } + //Inject Custom constructors for RTG Hatches + if (transformedName.equals(GT_MTE_HATCH_ENERGY) || transformedName.equals(GTPP_MTE_HATCH_RTG)) { + Preloader_Logger.INFO("Gregtech RTG Patch", "Transforming " + transformedName); + return new ClassTransformer_GT_EnergyHatchPatch(basicClass, transformedName).getWriter().toByteArray(); + } + //Try patch achievements + if (transformedName.equals(GT_ACHIEVEMENTS)) { + Preloader_Logger.INFO("Gregtech Achievements Patch", "Transforming " + transformedName); + return new ClassTransformer_GT_Achievements_CrashFix(basicClass, obfuscated).getWriter().toByteArray(); + } + + //Fix bad handling of a loop left from original decompilation + //Also Fix Achievements, although currently disabled. + if (transformedName.equals(GT_CLIENT_PROXY)) { + Preloader_Logger.INFO("Gregtech Client Proxy Patch", "Transforming " + transformedName); + return new ClassTransformer_GT_Client(basicClass, obfuscated).getByteArray(); + } + + //Make GT packets safer, fill them with debug info. + if (transformedName.equals(GT_PACKET_TILE_ENTITY)) { + Preloader_Logger.INFO("Gregtech GT_Packet_TileEntity Patch", "Transforming "+transformedName); + return new ClassTransformer_GT_Packet_TileEntity(basicClass, obfuscated).getWriter().toByteArray(); + } + //Make the setting of GT Tiles safer, so as not to crash the client. + if (transformedName.equals(GT_BASE_META_TILE_ENTITY)) { + Preloader_Logger.INFO("Gregtech setMetaTileEntity Patch", "Transforming "+transformedName); + return new ClassTransformer_GT_BaseMetaTileEntity(basicClass).getWriter().toByteArray(); + } + //Add extra tools if we're in a dev environment. + if (transformedName.equals(GT_METAGENERATED_TOOL) && CORE_Preloader.DEV_ENVIRONMENT) { + Preloader_Logger.INFO("Gregtech Additional Tools Patch", "Transforming "+transformedName); + return new ClassTransformer_GT_MetaGenerated_Tool(basicClass).getWriter().toByteArray(); + } + //Fix log handling on the charcoal pit + if (transformedName.equals(GT_MTE_CHARCOAL_PIT) && AsmConfig.enableGtCharcoalPitFix) { + Preloader_Logger.INFO("GT Charcoal Pit Fix", "Transforming "+transformedName); + return new ClassTransformer_GT_CharcoalPit(basicClass, obfuscated).getWriter().toByteArray(); + } + + + + + //Patching Meta Tile Tooltips + if (transformedName.equals(GT_ITEM_MACHINES) && AsmConfig.enableGtTooltipFix) { + //Preloader_Logger.INFO("Gregtech Tooltip Patch", "Transforming "+transformedName); + //return new ClassTransformer_GT_ItemMachines_Tooltip(basicClass, false).getWriter().toByteArray(); + } + + + if (transformedName.equals(GT_BLOCK_MACHINES)) { + //Fix GT NBT Persistency issue + Preloader_Logger.INFO("Gregtech NBT Persistency Patch", "Transforming "+transformedName); + byte[] g = new ClassTransformer_GT_BlockMachines_NBT(basicClass, false).getWriter().toByteArray(); + Preloader_Logger.INFO("Gregtech getTileEntityBaseType Patch", "Transforming "+transformedName); + return new ClassTransformer_GT_BlockMachines_MetaPipeEntity(g, 0).getWriter().toByteArray(); + } + if (transformedName.equals(GT_METAPIPE_ITEM) || transformedName.equals(GT_METAPIPE_FRAME) || transformedName.equals(GT_METAPIPE_FLUID)) { + Preloader_Logger.INFO("Gregtech getTileEntityBaseType Patch", "Transforming "+transformedName); + int mode = 0; + if (transformedName.equals(GT_METAPIPE_ITEM)) { + mode = 1; + } + else if (transformedName.equals(GT_METAPIPE_FRAME)) { + mode = 2; + } + else { + mode = 3; + } + return new ClassTransformer_GT_BlockMachines_MetaPipeEntity(basicClass, mode).getWriter().toByteArray(); + } + + + //Fix IC2 Wrench Harvesting + for (String y : IC2_WRENCH_PATCH_CLASS_NAMES) { + if (transformedName.equals(y)) { + Preloader_Logger.INFO("IC2 getHarvestTool Patch", "Transforming "+transformedName); + return new ClassTransformer_IC2_GetHarvestTool(basicClass, obfuscated, transformedName).getWriter().toByteArray(); + } + } + + //This is breaking IC2 Hazmat, moved to hodgepodge +// if (transformedName.equals(IC2_ITEM_ARMOUR_HAZMAT)) { +// Preloader_Logger.INFO("IC2 Hazmat Patch", "Transforming "+transformedName); +// return new ClassTransformer_IC2_Hazmat(basicClass, transformedName).getWriter().toByteArray(); +// } + + //Fix Thaumcraft Shit + //Patching ItemWispEssence to allow invalid item handling + if (transformedName.equals(THAUMCRAFT_ITEM_WISP_ESSENCE) && AsmConfig.enableTcAspectSafety) { + Preloader_Logger.INFO("Thaumcraft WispEssence_Patch", "Transforming "+transformedName); + return new ClassTransformer_TC_ItemWispEssence(basicClass, obfuscated).getWriter().toByteArray(); + } + //Fix Thaumic Tinkerer Shit + if (transformedName.equals(THAUMICTINKERER_TILE_REPAIRER) && AsmConfig.enableThaumicTinkererRepairFix) { + //Preloader_Logger.INFO("Thaumic Tinkerer RepairItem Patch", "Transforming "+transformedName); + //return new ClassTransformer_TT_ThaumicRestorer(basicClass).getWriter().toByteArray(); + } + + + return basicClass; + } + + + +} diff --git a/src/main/java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java b/src/main/java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java new file mode 100644 index 0000000000..e25c06653c --- /dev/null +++ b/src/main/java/gtPlusPlus/preloader/keyboard/BetterKeyboard.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package gtPlusPlus.preloader.keyboard; + +import java.lang.reflect.Field; +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Map; + +import org.apache.logging.log4j.Level; +import org.lwjgl.BufferUtils; +import org.lwjgl.input.Keyboard; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.asm.transformers.ClassTransformer_LWJGL_Keyboard; +import net.minecraft.client.resources.I18n; + +/** + *
+ * A raw Keyboard interface. This can be used to poll the current state of the + * keys, or read all the keyboard presses / releases since the last read. + * + * @author cix_foo + * @author elias_naur + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class BetterKeyboard { + + public static final int KEYBOARD_SIZE = Short.MAX_VALUE; + + private static boolean init = false; + + public static void init() { + if (!init) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Trying to patch out LWJGL internal arrays with larger ones."); + Field aKeyNameSize = ReflectionUtils.getField(Keyboard.class, "keyName"); + Field aKeyMapSize = ReflectionUtils.getField(Keyboard.class, "keyMap"); + Field aKeyDownBuffer = ReflectionUtils.getField(Keyboard.class, "keyDownBuffer"); + String[] aOldKeyNameArray = (String[]) ReflectionUtils.getFieldValue(aKeyNameSize); + if (aOldKeyNameArray != null && aOldKeyNameArray.length < Short.MAX_VALUE) { + String[] aNewKeyNameArray = new String[Short.MAX_VALUE]; + for (int i=0;i aOldKeyMapArray = (Map) ReflectionUtils.getFieldValue(aKeyMapSize); + if (aOldKeyNameArray != null && aOldKeyMapArray.size() < Short.MAX_VALUE) { + Map aNewKeyMapArray = new HashMap(Short.MAX_VALUE); + aNewKeyMapArray.putAll(aOldKeyMapArray); + try { + ReflectionUtils.setFinalFieldValue(Keyboard.class, aKeyMapSize.getName(), aNewKeyMapArray); + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Patched Field: "+aKeyMapSize.getName()); + } + catch (Throwable t) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Failed Patching Field: "+aKeyDownBuffer.getName()); + } + } + ByteBuffer aOldByteBuffer = (ByteBuffer) ReflectionUtils.getFieldValue(aKeyDownBuffer); + if (aOldByteBuffer != null && aOldByteBuffer.capacity() == Keyboard.KEYBOARD_SIZE) { + ByteBuffer aNewByteBuffer = BufferUtils.createByteBuffer(Short.MAX_VALUE); + try { + ReflectionUtils.setFinalFieldValue(Keyboard.class, aKeyDownBuffer.getName(), aNewByteBuffer); + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Patched Field: "+aKeyDownBuffer.getName()); + } + catch (Throwable t) { + FMLRelaunchLog.log("[GT++ ASM] LWJGL Keybinding index out of bounds fix", Level.INFO, "Failed Patching Field: "+aKeyDownBuffer.getName()); + } + } + init = true; + } + } + + + /** + * Gets a key's name + * @param key The key + * @return a String with the key's human readable name in it or null if the key is unnamed + */ + public static synchronized String getKeyName(int key) { + return ClassTransformer_LWJGL_Keyboard.getKeyName(key); + } + + + + + /** + * Represents a key or mouse button as a string. Args: key + */ + public static String getKeyDisplayString(int aKeyValue) { + return aKeyValue < 0 ? I18n.format("key.mouseButton", new Object[] {Integer.valueOf(aKeyValue + 101)}): getKeyName(aKeyValue); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java b/src/main/java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java new file mode 100644 index 0000000000..ce7d919431 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/HANDLER_CropsPlusPlus.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.bartcrops; + +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; + +public class HANDLER_CropsPlusPlus { + + public static void preInit(FMLPreInitializationEvent preinit) { + LoaderOfTheCrops.load(preinit); + } + + public static void init(FMLInitializationEvent init) { + //registerItems(); + } + + public static void postInit(FMLPostInitializationEvent postinit) { + LoaderOfTheCrops.register(); + LoaderOfTheCrops.registerBaseSeed(); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java new file mode 100644 index 0000000000..48813310d2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/LoaderOfTheCrops.java @@ -0,0 +1,109 @@ +package gtPlusPlus.xmod.bartcrops; + +import java.util.ArrayList; +import java.util.List; + +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.bartcrops.crops.Crop_Hemp; +import ic2.api.crops.CropCard; +import ic2.api.crops.Crops; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +/** + * Mostly borrowed from the Crops++ Crop Loader. + * @author Alkalus + */ + +public class LoaderOfTheCrops { + + private static List mHasCropObj = new ArrayList(); + private CropCard mCropObj; + private ItemStack mBaseSeed; + private static List mCropList = cropLoader(); + + public LoaderOfTheCrops(CropCard cropObj) { + this.mCropObj = cropObj; + } + + public LoaderOfTheCrops(CropCard cropObj, ItemStack baseseed) { + this.mCropObj = cropObj; + this.mBaseSeed = baseseed; + } + + public static CropCard cropUnpackerCC(LoaderOfTheCrops inp) { + return inp.mCropObj; + } + + private static ItemStack cropUnpackerCG(LoaderOfTheCrops inp) { + return inp.mBaseSeed; + } + + private static LoaderOfTheCrops cropHelper(CropCard cropObj) { + return new LoaderOfTheCrops(cropObj, ItemUtils.getItemStackOfAmountFromOreDict("crop" + cropObj.name(), 0)); + } + + public static final List cropLoader() { + List p = new ArrayList(); + + p.add(new LoaderOfTheCrops(new Crop_Hemp(), new ItemStack(Item.getItemById(111), 3))); + + return p; + } + + private static final List cropObjs() { + List p = new ArrayList(); + + for (int i = 0; i < mCropList.size(); ++i) { + p.add(cropUnpackerCC((LoaderOfTheCrops) mCropList.get(i))); + } + + return p; + } + + private static final List setBaseSeed() { + List p = new ArrayList(); + + for (int i = 0; i < mCropList.size(); ++i) { + p.add(cropUnpackerCG((LoaderOfTheCrops) mCropList.get(i))); + } + + return p; + } + + private static final List setnames() { + List s = new ArrayList(); + + for (int i = 0; i < mCropList.size(); ++i) { + s.add(((CropCard) cropObjs().get(i)).name()); + } + + return s; + } + + public static void load(FMLPreInitializationEvent preinit) { + for (int i = 0; i < mCropList.size(); ++i) { + mHasCropObj.add(true); + } + } + + public static void register() { + for (int i = 0; i < mCropList.size(); ++i) { + if ((Boolean) mHasCropObj.get(i) && cropObjs().get(i) != null) { + Crops.instance.registerCrop((CropCard) cropObjs().get(i)); + } + } + } + + public static void registerBaseSeed() { + List baseseed = new ArrayList(setBaseSeed()); + + for (int i = 0; i < mCropList.size(); ++i) { + if (baseseed.get(i) != null && cropObjs().get(i) != null) { + Crops.instance.registerBaseSeed((ItemStack) baseseed.get(i), (CropCard) cropObjs().get(i), 1, 1, 1, 1); + } + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java new file mode 100644 index 0000000000..f62b429acb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseAestheticCrop.java @@ -0,0 +1,37 @@ +package gtPlusPlus.xmod.bartcrops.abstracts; + +import gtPlusPlus.preloader.CORE_Preloader; +import ic2.api.crops.ICropTile; + +public abstract class BaseAestheticCrop extends BaseHarvestableCrop { + + public int tier() { + return 1; + } + + public int stat(int n) { + switch (n) { + case 0 : + return 0; + case 1 : + return 0; + case 2 : + return 0; + case 3 : + return 4; + case 4 : + return 0; + default : + return 0; + } + } + + public int growthDuration(ICropTile crop) { + return CORE_Preloader.DEBUG_MODE ? 1 : 225; + } + + public byte getSizeAfterHarvest(ICropTile crop) { + return 1; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java new file mode 100644 index 0000000000..ca2a044564 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseCrop.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.bartcrops.abstracts; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import ic2.api.crops.CropCard; +import ic2.api.crops.ICropTile; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import speiger.src.crops.api.ICropCardInfo; + +public abstract class BaseCrop extends CropCard implements ICropCardInfo { + @SideOnly(Side.CLIENT) + public void registerSprites(IIconRegister iconRegister) { + this.textures = new IIcon[this.maxSize()]; + + for (int i = 1; i <= this.textures.length; ++i) { + this.textures[i - 1] = iconRegister.registerIcon(CORE.MODID+":crop/blockCrop." + this.name() + "." + i); + } + + } + + public float dropGainChance() { + return (float) (Math.pow(0.95D, (double) ((float) this.tier())) * (double) 1f); + } + + public boolean canCross(ICropTile crop) { + return crop.getSize() == this.maxSize(); + } + + public int getrootslength(ICropTile crop) { + return 3; + } + + public String discoveredBy() { + return "Alkalus"; + } + + public String owner() { + return "Gtplusplus"; + } + + public List getCropInformation() { + List ret = new ArrayList(); + ret.add(this.attributes().toString()); + return ret; + } + + public ItemStack getDisplayItem(CropCard card) { + return ItemUtils.getItemStackOfAmountFromOreDict("crop" + this.name(), 0); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java new file mode 100644 index 0000000000..e877233c67 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/abstracts/BaseHarvestableCrop.java @@ -0,0 +1,69 @@ +package gtPlusPlus.xmod.bartcrops.abstracts; + +import gtPlusPlus.preloader.CORE_Preloader; +import ic2.api.crops.ICropTile; + +public abstract class BaseHarvestableCrop extends BaseCrop { + + public int tier() { + return 2; + } + + public int stat(int n) { + switch (n) { + case 0 : + return 0; + case 1 : + return 4; + case 2 : + return 0; + case 3 : + return 4; + case 4 : + return 0; + default : + return 0; + } + } + + public boolean canGrow(ICropTile crop) { + return crop.getSize() < 3; + } + + public int getOptimalHavestSize(ICropTile crop) { + return 3; + } + + public boolean canBeHarvested(ICropTile crop) { + return crop.getSize() == 3; + } + + public int weightInfluences(ICropTile crop, float humidity, float nutrients, float air) { + return (int) ((double) humidity * 1.2D + (double) nutrients * 0.9D + (double) air * 0.9D); + } + + public int growthDuration(ICropTile crop) { + short r; + if (CORE_Preloader.DEBUG_MODE) { + r = 1; + } else if (crop.getSize() == 2) { + r = 200; + } else { + r = 700; + } + + return r; + } + + public byte getSizeAfterHarvest(ICropTile crop) { + return 2; + } + + public int maxSize() { + return 3; + } + + public String discoveredBy() { + return "Alkalus"; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java new file mode 100644 index 0000000000..95e2766aae --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bartcrops/crops/Crop_Hemp.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.bartcrops.crops; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.preloader.CORE_Preloader; +import gtPlusPlus.xmod.bartcrops.abstracts.BaseAestheticCrop; +import ic2.api.crops.ICropTile; +import net.minecraft.item.ItemStack; + +public class Crop_Hemp extends BaseAestheticCrop { + + public int tier() { + return 2; + } + + public String name() { + return "Hemp"; + } + + public String discoveredBy() { + return "Alkalus"; + } + + public int growthDuration(ICropTile crop) { + int ret = 550; + + /*if (crop.isBlockBelow(Blocks.dirt) || crop.isBlockBelow(Blocks.flowing_water)) { + ret = 225; + }*/ + + if (CORE_Preloader.DEBUG_MODE) { + ret = 1; + } + + return ret; + } + + public String[] attributes() { + return new String[]{"Green", "Soil", "Orange"}; + } + + public ItemStack getGain(ICropTile crop) { + + ItemStack ret = this.getDisplayItem(); + if (MathUtils.randInt(0, 10) > 8) { + ret = ItemUtils.getSimpleStack(ModItems.itemRope, MathUtils.randInt(1, 3)); + } + + return ret; + } + + public ItemStack getDisplayItem() { + return ItemUtils.getSimpleStack(ModItems.itemRope, 0); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java new file mode 100644 index 0000000000..95067300c8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java @@ -0,0 +1,181 @@ +package gtPlusPlus.xmod.bop; + +import java.lang.reflect.Field; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class HANDLER_BiomesOPlenty { + + + public static Item mPineCone; + + public static Block logs1; + public static Block logs2; + public static Block logs3; + public static Block logs4; + + public static Block leaves1; + public static Block leaves2; + public static Block leaves3; + public static Block leaves4; + + public static Block colorizedLeaves1; + public static Block colorizedLeaves2; + + public static Block saplings; + public static Block colorizedSaplings; + + public static void preInit(){ + BOP_Block_Registrator.run(); + if (LoadedMods.BiomesOPlenty){ + setFields(); + registerPineconeToOreDict(); + } + + } + + public static void init(){ + if (LoadedMods.BiomesOPlenty){ + + } + } + + public static void postInit(){ + BOP_Block_Registrator.recipes(); + if (LoadedMods.BiomesOPlenty){ + + } + } + + private static void registerPineconeToOreDict() { + if (mPineCone != null) { + ItemStack aPinecone = ItemUtils.simpleMetaStack(mPineCone, 13, 1); + if (aPinecone != null) { + ItemUtils.addItemToOreDictionary(aPinecone, "pinecone"); + } + } + } + + public static ItemStack getStack(Block aBlock, int aMeta, int aSize) { + return ItemUtils.simpleMetaStack(aBlock, aMeta, aSize); + } + + + + //BOPCBlocks.logs4 - 0 + //BOPCBlocks.colorizedLeaves2 - 1 + + private static void setFields() { + Field aBopMiscItem = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCItems"), "misc"); + + Field aBopBlock1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs1"); + Field aBopBlock2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs2"); + Field aBopBlock3 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs3"); + Field aBopBlock4 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "logs4"); + + Field aBopLeaves1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves1"); + Field aBopLeaves2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves2"); + Field aBopLeaves3 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves3"); + Field aBopLeaves4 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "leaves4"); + + Field aBopColouredLeaves1 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedLeaves1"); + Field aBopColouredLeaves2 = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedLeaves2"); + + Field aBopSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "saplings"); + Field aBopColouredSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedSaplings"); + + if (aBopMiscItem != null) { + Item aMiscItem = (Item) ReflectionUtils.getFieldValue(aBopMiscItem); + if (aMiscItem != null) { + mPineCone = aMiscItem; + } + } + + + if (aBopBlock1 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock1); + if (aBlock != null) { + logs1 = aBlock; + } + } + if (aBopBlock2 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock2); + if (aBlock != null) { + logs2 = aBlock; + } + } + if (aBopBlock3 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock3); + if (aBlock != null) { + logs3 = aBlock; + } + } + if (aBopBlock4 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock4); + if (aBlock != null) { + logs4 = aBlock; + } + } + + + if (aBopLeaves1 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves1); + if (aBlock != null) { + leaves1 = aBlock; + } + } + if (aBopLeaves2 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves2); + if (aBlock != null) { + leaves2 = aBlock; + } + } + if (aBopLeaves3 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves3); + if (aBlock != null) { + leaves3 = aBlock; + } + } + if (aBopLeaves4 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves4); + if (aBlock != null) { + leaves4 = aBlock; + } + } + + + if (aBopColouredLeaves1 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves1); + if (aBlock != null) { + colorizedLeaves1 = aBlock; + } + } + if (aBopColouredLeaves2 != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves2); + if (aBlock != null) { + colorizedLeaves2 = aBlock; + } + } + + + if (aBopSapling != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopSapling); + if (aBlock != null) { + saplings = aBlock; + } + } + if (aBopColouredSapling != null) { + Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredSapling); + if (aBlock != null) { + colorizedSaplings = aBlock; + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java new file mode 100644 index 0000000000..3716359d7a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java @@ -0,0 +1,198 @@ +package gtPlusPlus.xmod.bop.blocks; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.helpers.MaterialHelper; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.bop.blocks.pine.LeavesPineTree; +import gtPlusPlus.xmod.bop.blocks.pine.LogPineTree; +import gtPlusPlus.xmod.bop.blocks.pine.SaplingPineTree; +import gtPlusPlus.xmod.bop.blocks.rainforest.LeavesRainforestTree; +import gtPlusPlus.xmod.bop.blocks.rainforest.LogRainforestTree; +import gtPlusPlus.xmod.bop.blocks.rainforest.SaplingRainforestTree; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class BOP_Block_Registrator { + + public static Block log_Rainforest; + public static Block leaves_Rainforest; + public static Block sapling_Rainforest; + public static Block log_Pine; + public static Block leaves_Pine; + public static Block sapling_Pine; + + //Runs Each tree Type separately + public static final void run(){ + registerTree_Rainforest(); + registerTree_Pine(); + } + + + private static final boolean registerTree_Rainforest(){ + log_Rainforest = new LogRainforestTree(); + leaves_Rainforest = new LeavesRainforestTree(); + sapling_Rainforest = new SaplingRainforestTree(); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Rainforest), "logWood", true); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Rainforest), "treeLeaves", true); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Rainforest), "treeSapling", true); + return true; + } + + private static final boolean registerTree_Pine(){ + log_Pine = new LogPineTree(); + leaves_Pine = new LeavesPineTree(); + sapling_Pine = new SaplingPineTree(); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(log_Pine), "logWood", true); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(leaves_Pine), "treeLeaves", true); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(sapling_Pine), "treeSapling", true); + return true; + } + + public static final void recipes() { + // Rainforest Oak + addLogRecipes(ItemUtils.getSimpleStack(log_Rainforest)); + addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Rainforest)); + // Pine + addLogRecipes(ItemUtils.getSimpleStack(log_Pine)); + addSaplingRecipes(ItemUtils.getSimpleStack(sapling_Pine)); + + } + + public static final void addLogRecipes(final ItemStack aStack) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {aStack}, ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 4)); + RecipeUtils.recipeBuilder( + CI.craftingToolSaw, null, null, + aStack, null, null, + null, null, null, + ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), 4)); + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "sLf", 'L', GT_Utility.copyAmount(1L, aStack) }); + GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 4L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 160, 8); + + if (!CORE.GTNH) { + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), Materials.SeedOil.getFluid(50L), ItemList.FR_Stick.get(1L, new Object[0]), 16, 8); + GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), Materials.SeedOil.getFluid(250L), ItemList.FR_Casing_Impregnated.get(1L, new Object[0]), 64, 16); + GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Creosote.getFluid(1000L), GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), null, null, null, 16, 16); + } + + final short aMeta = (short)aStack.getItemDamage(); + if (aMeta == 32767) { + if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1))) { + addPyrolyeOvenRecipes(aStack); + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); + } + } + for (int i = 0; i < 32767; ++i) { + if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1))) { + addPyrolyeOvenRecipes(aStack); + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); + } + } + final ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i)); + if (tStack == null) { + if (i >= 16) { + break; + } + } + else { + final ItemStack tPlanks = GT_Utility.copy(tStack); + tPlanks.stackSize = tPlanks.stackSize * 3 / 2; + GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); + GT_Values.RA.addCutterRecipe(new ItemStack(aStack.getItem(), 1, i), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack.stackSize) : ((long)(tStack.stackSize * 5 / 4)), tStack), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); + GT_ModHandler.addSawmillRecipe(new ItemStack(aStack.getItem(), 1, i), tPlanks, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); + GT_ModHandler.removeRecipe(new ItemStack(aStack.getItem(), 1, i)); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack.stackSize) : ((long)(tStack.stackSize * 5 / 4)), tStack), new Object[] { "s", "L", 'L', new ItemStack(aStack.getItem(), 1, i) }); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), new Object[] { new ItemStack(aStack.getItem(), 1, i) }); + } + } + } + else { + if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1))) { + addPyrolyeOvenRecipes(aStack); + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); + } + } + final ItemStack tStack2 = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1L, aStack)); + if (tStack2 != null) { + final ItemStack tPlanks2 = GT_Utility.copy(tStack2); + tPlanks2.stackSize = tPlanks2.stackSize * 3 / 2; + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), Materials.Lubricant.getFluid(1L), GT_Utility.copy(tPlanks2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 200, 8); + GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, aStack), GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack2.stackSize) : ((long)(tStack2.stackSize * 5 / 4)), tStack2), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), 200, 8); + GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, aStack), tPlanks2, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)); + GT_ModHandler.removeRecipe(GT_Utility.copyAmount(1L, aStack)); + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.gregtechproxy.mNerfedWoodPlank ? ((long)tStack2.stackSize) : ((long)(tStack2.stackSize * 5 / 4)), tStack2), new Object[] { "s", "L", 'L', GT_Utility.copyAmount(1L, aStack) }); + GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(tStack2.stackSize / (GT_Mod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack2), new Object[] { GT_Utility.copyAmount(1L, aStack) }); + } + } + if (GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null), new ItemStack(Items.coal, 1, 1))) { + addPyrolyeOvenRecipes(aStack); + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { + GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack)); + } + } + } + + public static void addSaplingRecipes(final ItemStack aStack) { + GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), null, 0, false); + GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(8L, aStack), ItemList.IC2_Plantball.get(1L, new Object[0])); + GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Wood, 1L), 16, 8); + } + + public static void addPyrolyeOvenRecipes(final ItemStack logStack) { + + Materials aOilHeavy = MaterialUtils.getMaterial("OilHeavy"); + Materials aCharcoalByproducts = MaterialUtils.getMaterial("CharcoalByproducts"); + Materials aWoodGas = MaterialUtils.getMaterial("WoodGas"); + Materials aWoodVinegar = MaterialUtils.getMaterial("WoodVinegar"); + Materials aWoodTar = MaterialUtils.getMaterial("WoodTar"); + + + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 1, MaterialHelper.getGems(Materials.Charcoal, 20), Materials.Creosote.getFluid(4000L), 640, 64); + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 2, MaterialHelper.getGems(Materials.Charcoal, 20), Materials.Creosote.getFluid(4000L), 320, 96); + + if (aOilHeavy != null) { + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, MaterialHelper.getDust(Materials.Ash, 4), aOilHeavy.getFluid(200L), 320, 192); + + } + if (aCharcoalByproducts != null) { + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 3, MaterialHelper.getGems(Materials.Charcoal, 20), aCharcoalByproducts.getGas(4000L), 640, 64); + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 4, MaterialHelper.getGems(Materials.Charcoal, 20), aCharcoalByproducts.getGas(4000L), 320, 96); + + } + if (aWoodGas != null) { + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 5, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodGas.getGas(1500L), 640, 64); + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 6, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodGas.getGas(1500L), 320, 96); + + } + if (aWoodVinegar != null) { + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 7, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodVinegar.getFluid(3000L), 640, 64); + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 8, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodVinegar.getFluid(3000L), 320, 96); + + } + if (aWoodTar != null) { + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), GT_Values.NF, 9, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodTar.getFluid(1500L), 640, 64); + CORE.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, logStack), Materials.Nitrogen.getGas(1000L), 10, MaterialHelper.getGems(Materials.Charcoal, 20), aWoodTar.getFluid(1500L), 320, 96); + + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java new file mode 100644 index 0000000000..5c86c45591 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java @@ -0,0 +1,109 @@ +package gtPlusPlus.xmod.bop.blocks.base; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockLeaves; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class LeavesBase extends BlockLeaves { + + protected IIcon[][] leafTextures = new IIcon[2][]; + protected String[][] leafType = new String[][] {{}, {}}; + protected String[] treeType = new String[] {}; + protected ItemStack[] bonusDrops; + + @SuppressWarnings("deprecation") + public LeavesBase(String blockNameLocalized, String blockNameUnlocalized, ItemStack[] bonusDrops){ + this.bonusDrops = bonusDrops; + String blockName = "block"+Utils.sanitizeString(blockNameLocalized)+"Leaves"; + GameRegistry.registerBlock(this, ItemBlock.class, blockName); + this.setBlockName(blockName); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "treeLeaves", true); + this.setCreativeTab(AddToCreativeTab.tabBOP); + LanguageRegistry.addName(this, blockNameLocalized+" Leaves"); + Blocks.fire.setFireInfo(this, 80, 150); + } + + private final void setVanillaVariable(Object toSet, Object value){ + toSet = value; + } + + @Override + public int quantityDropped(Random p_149745_1_){ + return p_149745_1_.nextInt(20) == 0 ? 1 : 0; + } + + + @Override//Drops when Leaf is broken + protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){ + Logger.INFO("Dropping Bonus Drops"); + for (int i = 0; i < this.bonusDrops.length; ++i){ + if (this.bonusDrops[i] != null && world.rand.nextInt(randomChance) == 0){ + this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(this.bonusDrops[i], 1)); + } + } + } + + /** + * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) + */ + @SuppressWarnings("unchecked") + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, @SuppressWarnings("rawtypes") List metaList){ + for (int i = 0; i < this.treeType.length; ++i){ + metaList.add(new ItemStack(item, 1, i)); + } + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int metaID){ + return (metaID & 3) == 1 ? this.leafTextures[this.field_150127_b][1] : this.leafTextures[this.field_150127_b][0]; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iIcon){ + for (int i = 0; i < leafType.length; ++i){ + this.leafTextures[i] = new IIcon[leafType[i].length]; + for (int j = 0; j < leafType[i].length; ++j){ + this.leafTextures[i][j] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "leaves/" + "leaves_" + leafType[i][j]); + } + } + setVanillaVariable(this.field_150129_M, this.leafTextures); + } + + @Override + public String[] func_150125_e() + { + return treeType; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java new file mode 100644 index 0000000000..8e8ca0ed0a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java @@ -0,0 +1,86 @@ +package gtPlusPlus.xmod.bop.blocks.base; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockLog; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public abstract class LogBase extends BlockLog +{ + public String[] treeType = new String[] {}; + protected IIcon[] textureSide; + protected IIcon[] textureTop; + + @SuppressWarnings("deprecation") + public LogBase(String blockNameLocalized, String blockNameUnlocalized, String[] treeTypes){ + this.treeType = treeTypes; + String blockName = "block"+Utils.sanitizeString(blockNameLocalized)+"Log"; + GameRegistry.registerBlock(this, ItemBlock.class, blockName); + this.setBlockName(blockName); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "log"+Utils.sanitizeString(blockNameLocalized), true); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "logWood", true); + this.setCreativeTab(AddToCreativeTab.tabBOP); + LanguageRegistry.addName(this, blockNameLocalized); + Blocks.fire.setFireInfo(this, 20, 100); + } + + private final void setVanillaVariable(Object toSet, Object value){ + toSet = value; + } + + /** + * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) + */ + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List metaList){ + for (int i = 0; i < this.textureSide.length; ++i){ + metaList.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + protected IIcon getTopIcon(int meta){ + return this.textureTop[meta % this.textureTop.length]; + } + + @Override + @SideOnly(Side.CLIENT) + protected IIcon getSideIcon(int metaID){ + return this.textureSide[metaID % this.textureSide.length]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iIcon) + { + this.textureSide = new IIcon[treeType.length]; + this.textureTop = new IIcon[treeType.length]; + + for (int i = 0; i < this.textureSide.length; ++i){ + this.textureSide[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i]); + this.textureTop[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "logs/" + "log_" + treeType[i] + "_top"); + } + + setVanillaVariable(this.field_150167_a, this.textureSide); + setVanillaVariable(this.field_150166_b, this.textureTop); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java new file mode 100644 index 0000000000..c039e1ebac --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java @@ -0,0 +1,198 @@ +package gtPlusPlus.xmod.bop.blocks.base; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenBigTree; +import net.minecraft.world.gen.feature.WorldGenTrees; +import net.minecraft.world.gen.feature.WorldGenerator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class SaplingBase extends BlockSapling +{ + protected String[] saplingTypes = new String[] {}; + protected IIcon[] saplingTextures = new IIcon[] {}; + + //Sapling types - field_149882_a + //Iicons - field_149881_b + + protected SaplingBase(String blockNameLocalized, String blockNameUnlocalized, String[] saplingTypes){ + float f = 0.4F; + this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f); + this.saplingTypes = saplingTypes; + this.saplingTextures = new IIcon[saplingTypes.length]; + String blockName = "block"+Utils.sanitizeString(blockNameLocalized); + GameRegistry.registerBlock(this, ItemBlock.class, blockName); + this.setBlockName(blockName); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(this), "treeSapling", true); + this.setCreativeTab(AddToCreativeTab.tabBOP); + LanguageRegistry.addName(this, blockNameLocalized); + } + + private final void setVanillaVariable(Object toSet, Object value){ + toSet = value; + } + + /** + * Gets the block's texture. Args: side, meta + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int someInt, int meta){ + /* p_149691_2_ &= 7; + return saplingTextures[MathHelper.clamp_int(p_149691_2_, 0, 5)];*/ + //return this.saplingTextures[meta % this.saplingTextures.length]; + try { + return this.saplingTextures[meta]; + }catch(Throwable T){ + Logger.WARNING("Invalid Sapling meta is "+meta); + return this.saplingTextures[0]; + } + } + + /** + * Ticks the block if it's been scheduled + */ + @Override + public void updateTick(World world, int x, int y, int z, Random rand){ + if (!world.isRemote){ + super.updateTick(world, x, y, z, rand); + if (world.getBlockLightValue(x, y + 1, z) >= 9 && rand.nextInt(7) == 0){ + Logger.WARNING("Update Tick"); + this.updateMeta(world, x, y, z, rand); + } + else { + Logger.WARNING("Tried to Tick."); + } + } + } + + //Dunno - Think it is doGrow || doGrowthTick + @Override + public void func_149853_b(World world, Random rand, int x, int y, int z){ + Logger.WARNING("Please find what calls me - func_149853_b"); + this.updateMeta(world, x, y, z, rand); + } + + public void updateMeta(World world, int x, int y, int z, Random rand){ + func_149879_c(world, x, y, z, rand); + } + + @Override + public void func_149879_c(World world, int x, int y, int z, Random rand){ + Logger.WARNING("func_149879_c - 1"); + int l = world.getBlockMetadata(x, y, z); + + if ((l & 8) == 0){ + Logger.WARNING("func_149879_c - 2"); + world.setBlockMetadataWithNotify(x, y, z, l | 8, 4); + } + else{ + Logger.WARNING("func_149879_c - 3"); + this.func_149878_d(world, x, y, z, rand); + } + } + + @Override + public void func_149878_d(World world, int x, int y, int z, Random rand){ + Logger.WARNING("func_149878_d - 1"); + if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; + int l = world.getBlockMetadata(x, y, z) & 7; + Object object = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true); + int i1 = 0; + int j1 = 0; + boolean flag = false; + + switch (l) + { + case 0: + default: + Logger.WARNING("Case 0 - Grow Tree"); + break; + + } + + Block block = Blocks.air; + + if (flag) + { + world.setBlock(x + i1, y, z + j1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); + world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); + } + else + { + world.setBlock(x, y, z, block, 0, 4); + } + + if (!((WorldGenerator)object).generate(world, rand, x + i1, y, z + j1)) + { + if (flag) + { + world.setBlock(x + i1, y, z + j1, this, l, 4); + world.setBlock(x + i1 + 1, y, z + j1, this, l, 4); + world.setBlock(x + i1, y, z + j1 + 1, this, l, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, this, l, 4); + } + else + { + world.setBlock(x, y, z, this, l, 4); + } + } + } + + @Override + public boolean func_149880_a(World world, int p_149880_2_, int p_149880_3_, int p_149880_4_, int p_149880_5_){ + return world.getBlock(p_149880_2_, p_149880_3_, p_149880_4_) == this && (world.getBlockMetadata(p_149880_2_, p_149880_3_, p_149880_4_) & 7) == p_149880_5_; + } + + /** + * Determines the damage on the item the block drops. Used in cloth and wood. + */ + @Override + public int damageDropped(int meta){ + return MathHelper.clamp_int(meta & 7, 0, 5); + } + + /** + * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) + */ + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item item, CreativeTabs tab, List metaList){ + for (int i = 0; i < this.saplingTextures.length; ++i){ + metaList.add(new ItemStack(item, 1, i)); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iIcon){ + for (int i = 0; i < saplingTextures.length; ++i){ + saplingTextures[i] = iIcon.registerIcon(CORE.MODID + ":" + "trees/" + "saplings/" + "sapling_" + saplingTypes[i]); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java new file mode 100644 index 0000000000..c942db14cf --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LeavesPineTree.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.bop.blocks.pine; + +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import gtPlusPlus.xmod.bop.blocks.base.LeavesBase; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class LeavesPineTree extends LeavesBase { + + public LeavesPineTree(){ + super("Pine", "pine", new ItemStack[]{}); + this.treeType = new String[] {"pine"}; + this.leafType = new String[][] {{"pine"},{"pine_opaque"}}; + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_){ + return Item.getItemFromBlock(BOP_Block_Registrator.sapling_Pine); + } + + @Override//Drops when Leaf is broken + protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance){ + Logger.INFO("Dropping Bonus Drops"); + if (MathUtils.randInt(0, 10) >= 9) { + this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(AgriculturalChem.mPinecone, MathUtils.randInt(1, 4))); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java new file mode 100644 index 0000000000..dee5bf02fd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/LogPineTree.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.bop.blocks.pine; + +import gtPlusPlus.xmod.bop.blocks.base.LogBase; + +public class LogPineTree extends LogBase { + + public LogPineTree(){ + super("Pine Log", "pine", new String[]{"pine"}); + this.treeType = new String[] {"pine"}; + } + + /*@Override + @SideOnly(Side.CLIENT) + protected IIcon getSideIcon(int metaID){ + return this.textureSide[metaID % this.textureSide.length]; + } + + @Override + @SideOnly(Side.CLIENT) + protected IIcon getTopIcon(int metaID){ + return this.textureTop[metaID % this.textureTop.length]; + }*/ + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java new file mode 100644 index 0000000000..0ee04de899 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/pine/SaplingPineTree.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.bop.blocks.pine; + +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.bop.blocks.base.SaplingBase; +import gtPlusPlus.xmod.bop.world.features.trees.WorldGenPineTree; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenBigTree; +import net.minecraft.world.gen.feature.WorldGenTrees; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class SaplingPineTree extends SaplingBase { + + public SaplingPineTree(){ + super("Pine Sapling", "pine", new String[]{"pine"}); + } + + @Override + public void func_149878_d(World world, int x, int y, int z, Random rand){ + Logger.WARNING("func_149878_d - 1"); + if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; + rand.nextInt(10); + new WorldGenBigTree(true); + new WorldGenTrees(true); + int i1 = 0; + int j1 = 0; + boolean flag = false; + + Block block = Blocks.air; + + if (flag) + { + world.setBlock(x + i1, y, z + j1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); + world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); + } + else + { + world.setBlock(x, y, z, block, 0, 4); + } + Object obj = new WorldGenPineTree(); + if (obj != null) { + world.setBlockToAir(x, y, z); + if (!((WorldGenerator) obj).generate(world, CORE.RANDOM, x, y, z)) { + world.setBlock(x, y, z, this, 0, 2); + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java new file mode 100644 index 0000000000..39e434243a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LeavesRainforestTree.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.bop.blocks.rainforest; + +import java.util.Random; + +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import gtPlusPlus.xmod.bop.blocks.base.LeavesBase; + +public class LeavesRainforestTree extends LeavesBase { + + public LeavesRainforestTree(){ + super("Rainforest Oak", "rainforestoak", new ItemStack[]{ItemUtils.getSimpleStack(Items.apple)}); + this.treeType = new String[] {"rainforest"}; + this.leafType = new String[][] {{"rainforest"},{"rainforest_opaque"}}; + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_){ + return Item.getItemFromBlock(BOP_Block_Registrator.sapling_Rainforest); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java new file mode 100644 index 0000000000..6d30caafb7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/LogRainforestTree.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.bop.blocks.rainforest; + +import gtPlusPlus.xmod.bop.blocks.base.LogBase; + +public class LogRainforestTree extends LogBase { + + public LogRainforestTree(){ + super("Rainforest Oak", "rainforestoak", new String[]{"rainforest"}); + this.treeType = new String[] {"rainforest"}; + } + + /*@Override + @SideOnly(Side.CLIENT) + protected IIcon getSideIcon(int metaID){ + return this.textureSide[metaID % this.textureSide.length]; + } + + @Override + @SideOnly(Side.CLIENT) + protected IIcon getTopIcon(int metaID){ + return this.textureTop[metaID % this.textureTop.length]; + }*/ + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java new file mode 100644 index 0000000000..73b916d383 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java @@ -0,0 +1,66 @@ +package gtPlusPlus.xmod.bop.blocks.rainforest; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenBigTree; +import net.minecraft.world.gen.feature.WorldGenTrees; +import net.minecraft.world.gen.feature.WorldGenerator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import gtPlusPlus.xmod.bop.blocks.base.SaplingBase; +import gtPlusPlus.xmod.bop.world.features.trees.WorldGenRainForestTree_Ex; + +public class SaplingRainforestTree extends SaplingBase { + + public SaplingRainforestTree(){ + super("Rainforest Oak Sapling", "rainforestoak", new String[]{"rainforest"}); + } + + @Override + public void func_149878_d(World world, int x, int y, int z, Random rand){ + Logger.WARNING("func_149878_d - 1"); + if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return; + int l = world.getBlockMetadata(x, y, z) & 7; + rand.nextInt(10); + new WorldGenBigTree(true); + new WorldGenTrees(true); + int i1 = 0; + int j1 = 0; + boolean flag = false; + + Block block = Blocks.air; + + if (flag) + { + world.setBlock(x + i1, y, z + j1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4); + world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4); + } + else + { + world.setBlock(x, y, z, block, 0, 4); + } + Object o = new WorldGenRainForestTree_Ex(BOP_Block_Registrator.log_Rainforest, BOP_Block_Registrator.leaves_Rainforest, 0, 0, true, 50, 75); + + if (!((WorldGenerator)o).generate(world, rand, x + i1, y, z + j1)) + { + if (flag) + { + world.setBlock(x + i1, y, z + j1, this, l, 4); + world.setBlock(x + i1 + 1, y, z + j1, this, l, 4); + world.setBlock(x + i1, y, z + j1 + 1, this, l, 4); + world.setBlock(x + i1 + 1, y, z + j1 + 1, this, l, 4); + } + else + { + world.setBlock(x, y, z, this, l, 4); + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java b/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java new file mode 100644 index 0000000000..d33b19aaf9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/creative/MiscUtilsBOPTab.java @@ -0,0 +1,20 @@ +package gtPlusPlus.xmod.bop.creative; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; + +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; + +public class MiscUtilsBOPTab extends CreativeTabs { + + public MiscUtilsBOPTab(final String lable) { + super(lable); + } + + @Override + public Item getTabIconItem() { + return ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest).getItem(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java new file mode 100644 index 0000000000..831108ec99 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenPineTree.java @@ -0,0 +1,171 @@ +package gtPlusPlus.xmod.bop.world.features.trees; + +import java.util.Random; + +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraftforge.common.util.ForgeDirection; + +public class WorldGenPineTree extends WorldGenAbstractTree{ + + public WorldGenPineTree() { + super(true); + } + + @Override + public boolean generate(World world, Random random, int x, int y, int z) { + while (world.isAirBlock(x, y, z) && y > 2) { + --y; + } + + Block aSoilBlock = world.getBlock(x, y, z); + + if (!canBlockSustainSapling(world, aSoilBlock, x, y, z)) { + return false; + } else { + int height; + int branches; + for (height = -2; height <= 2; ++height) { + for (branches = -2; branches <= 2; ++branches) { + if (world.isAirBlock(x + height, y - 1, z + branches) + && world.isAirBlock(x + height, y - 2, z + branches) + && !world.isAirBlock(x + height, y, z + branches)) { + return false; + } + } + } + + height = 2 + MathUtils.randInt(8, 16); + branches = 2 + MathUtils.randInt(6, 18); + int h = 1; + aSoilBlock.onPlantGrow(world, x, y - 1, z, x, y, z); + + int c; + int r = MathUtils.randInt(1, 3); + for (c = 0; c < height; ++c) { + this.buildBlock(world, x, y + h, z, BOP_Block_Registrator.log_Pine, 0); + h++; + if (c >= r && c % 2 == 0) { + this.generateBranch(world, random, x, y + h, z, c); + } + } + + this.generateTop(world, x, y + h, z); + return true; + } + } + + public void generateTop(World world, int x, int y, int z) { + for (int i = -1; i < 2; ++i) { + for (int j = -1; j < 2; ++j) { + this.buildBlock(world, x + i, y, z + j, BOP_Block_Registrator.leaves_Pine, 0); + } + } + + this.buildBlock(world, x, y, z, BOP_Block_Registrator.log_Pine, 0); + this.buildBlock(world, x + 1, y + 1, z, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x, y + 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x, y + 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x - 1, y + 1, z, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x, y + 2, z, BOP_Block_Registrator.leaves_Pine, 0); + } + + public void generateBranch(World world, Random rand, int x, int y, int z, int n) { + int var99999; + int var99998; + for (var99999 = -1; var99999 < 2; ++var99999) { + for (var99998 = -1; var99998 < 2; ++var99998) { + this.buildBlock(world, x + var99999, y, z + var99998, BOP_Block_Registrator.leaves_Pine, 0); + } + } + + var99999 = rand.nextInt(2); + var99998 = rand.nextInt(2); + int var99997 = rand.nextInt(2); + int var99996 = rand.nextInt(2); + if (n % 2 == 0) { + if (var99998 == 0) { + this.buildBlock(world, x + 1, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x + 2, y - 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0); + if (var99999 == 0) { + this.buildBlock(world, x + 2, y - 2, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } else { + this.buildBlock(world, x + 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } else { + this.buildBlock(world, x + 1, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x + 2, y, z - 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x + 2, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } + + if (var99997 == 0) { + this.buildBlock(world, x - 2, y - 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x - 1, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + if (var99996 == 0) { + this.buildBlock(world, x - 2, y - 2, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } else { + this.buildBlock(world, x - 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } else { + this.buildBlock(world, x - 2, y, z + 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x - 1, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x - 2, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } else { + if (var99998 == 0) { + this.buildBlock(world, x + 2, y - 1, z + 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x + 1, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + if (var99999 == 0) { + this.buildBlock(world, x + 2, y - 2, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } else { + this.buildBlock(world, x + 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } else { + this.buildBlock(world, x + 2, y, z + 1, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x + 1, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + if (var99999 == 0) { + this.buildBlock(world, x + 2, y - 1, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } else { + this.buildBlock(world, x + 2, y, z + 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } + + if (var99997 == 0) { + this.buildBlock(world, x - 1, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x - 2, y - 1, z - 1, BOP_Block_Registrator.leaves_Pine, 0); + if (var99996 == 0) { + this.buildBlock(world, x - 2, y - 2, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } else { + this.buildBlock(world, x - 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } else { + this.buildBlock(world, x - 1, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + this.buildBlock(world, x - 2, y, z - 1, BOP_Block_Registrator.leaves_Pine, 0); + if (var99996 == 0) { + this.buildBlock(world, x - 2, y - 1, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } else { + this.buildBlock(world, x - 2, y, z - 2, BOP_Block_Registrator.leaves_Pine, 0); + } + } + } + + this.buildBlock(world, x, y, z, BOP_Block_Registrator.log_Pine, 0); + this.buildBlock(world, x, y + 1, z, BOP_Block_Registrator.log_Pine, 0); + } + + public void buildBlock(World world, int x, int y, int z, Block block, int meta) { + if (world.isAirBlock(x, y, z) || world.getBlock(x, y, z).isLeaves(world, x, y, z)) { + world.setBlock(x, y, z, block, meta, 2); + } + } + + public boolean canBlockSustainSapling(World world, Block block, int x, int y, int z) { + return block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (BlockSapling)Blocks.sapling); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java new file mode 100644 index 0000000000..fa29f99655 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java @@ -0,0 +1,246 @@ +package gtPlusPlus.xmod.bop.world.features.trees; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; + +import gtPlusPlus.api.objects.Logger; +import net.minecraftforge.common.util.ForgeDirection; + +public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{ + + private final int minTreeHeight; + private final int randomTreeHeight; + private final Block wood; + private final Block leaves; + private final int woodMeta; + private final int leavesMeta; + + // return random.nextInt(5) == 0 ? new WorldGenTrees(false, 4 + random.nextInt(7), 3, 3, true) : new WorldGenRainforestTree1(BOPCBlocks.logs4, BOPCBlocks.colorizedLeaves2, 3, 2, false, 8, 8); + + public WorldGenRainForestTree_Ex(Block wood, Block leaves, int woodMeta, int leavesMeta, boolean doBlockNotify, int minTreeHeight, int randomTreeHeight) { + super(doBlockNotify); + this.wood = wood; + this.leaves = leaves; + this.woodMeta = woodMeta; + this.leavesMeta = leavesMeta; + this.minTreeHeight = minTreeHeight; + this.randomTreeHeight = randomTreeHeight; + } + + @Override + public boolean generate(World world, Random random, int x, int y, int z) + { + int treeHeight = random.nextInt(this.randomTreeHeight) + this.minTreeHeight; + boolean flag = true; + if ((y >= 1) && (y + treeHeight + 1 <= 256)) + { + for (int i1 = y; i1 <= y + 1 + treeHeight; i1++) + { + byte b0 = 1; + if (i1 == y) { + b0 = 0; + } + if (i1 >= y + 1 + treeHeight - 2) { + b0 = 2; + } + for (int j1 = x - b0; (j1 <= x + b0) && (flag); j1++) { + for (int k1 = z - b0; (k1 <= z + b0) && (flag); k1++) { + if ((i1 >= 0) && (i1 < 256)) + { + Block block = world.getBlock(j1, i1, k1); + if (!isReplaceable(world, j1, i1, k1)) { + flag = false; + } + } + else + { + flag = false; + } + } + } + } + if (!flag) { + return false; + } + Block block2 = world.getBlock(x, y - 1, z); + + boolean isSoil = block2.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, (BlockSapling)Blocks.sapling); + if ((isSoil) && (y < 256 - treeHeight - 1)) + { + block2.onPlantGrow(world, x, y - 1, z, x, y, z); + byte b0 = 3; + byte b1 = 0; + Logger.WARNING("Sapling located at X:"+x+" | Y:"+y+" | Z:"+z); + for (int k1 = y - b0 + treeHeight; k1 <= y + treeHeight; k1++) + { + Logger.WARNING("[1]| k1 = "+k1+" | y = "+y+" | b0 = "+b0+" | l = "+treeHeight+" | "); + int i3 = k1 - (y + treeHeight); + int l1 = b1 + 1 - i3; + for (int i2 = x - l1; i2 <= x + l1; i2++){ + int j2 = i2 - x; + Logger.WARNING("[2]| i2 = "+i2+" | x = "+x+" | l1 = "+l1+" | j2 = "+j2+" | "); + for (int k2 = z - l1; k2 <= z + l1; k2++){ + int l2 = k2 - z; + Logger.WARNING("[3]| k2 = "+k2+" | z = "+z+" | l1 = "+l1+" | l2 = "+l2+" | "); + if ((Math.abs(j2) != l1) || (Math.abs(l2) != l1) || ((random.nextInt(2) != 0) && (i3 != 0))) + { + Block block1 = world.getBlock(i2, k1, k2); + if ((block1.isAir(world, i2, k1, k2)) || (block1.isLeaves(world, i2, k1, k2))) { + Logger.WARNING("Setting something as leaves?"); + setBlockAndNotifyAdequately(world, i2, k1, k2, this.leaves, this.leavesMeta); + } + } + } + } + } + for (int k1 = 0; k1 < treeHeight; k1++) + { + Logger.WARNING("Building tree - Layer "+k1+" | Max height is "+treeHeight); + Block block = world.getBlock(x, y + k1, z); + if ((block.isAir(world, x, y + k1, z)) || (block.isLeaves(world, x, y + k1, z))){ + setBlockAndNotifyAdequately(world, x, y + k1, z, this.wood, this.woodMeta); + + //Trying this to make trunk + setBlockAndNotifyAdequately(world, x, y + k1, z+1, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + k1, z-1, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x+1, y + k1, z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x-1, y + k1, z, this.wood, this.woodMeta); + + + if (k1 >= 5){ + if (k1 % 5 == 0){ + //Bottom layer + Block block5 = world.getBlock(x, y + k1, z); + for (int xDir = -5; xDir <= 5; xDir++){ + for (int zDir = -5; zDir <= 5; zDir++){ + if (canRemoveLeafBlockLayer2(-5, 5, xDir, -5, 5, zDir)){ + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+" z="+zDir); + } + else { + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+" z="+zDir); + block5 = world.getBlock(x+xDir, y+k1, z+zDir); + if (block5.isAir(world, x+xDir, y+k1, x+zDir)){ + setBlockAndNotifyAdequately(world, x+xDir, y + k1, z+zDir, this.leaves, this.leavesMeta); + } + } + } + } + //Next Layer + for (int xDir = -4; xDir <= 4; xDir++){ + for (int zDir = -4; zDir <= 4; zDir++){ + if (canRemoveLeafBlockLayer2(-4, 4, xDir, -4, 4, zDir)){ + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+1+" z="+zDir); + } + else { + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y + k1 + 1+" z="+zDir); + block5 = world.getBlock(x+xDir, y+k1 + 1, z+zDir); + if (block5.isAir(world, x+xDir, y+k1 + 1, x+zDir)){ + setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 1, z+zDir, this.leaves, this.leavesMeta); + } + } + } + } + + //Third Layer + for (int xDir = -3; xDir <= 3; xDir++){ + for (int zDir = -3; zDir <= 3; zDir++){ + if (canRemoveLeafBlockLayer2(-3, 3, xDir, -3, 3, zDir)){ + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); + } + else { + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir); + block5 = world.getBlock(x+xDir, y+k1+2, z+zDir); + if (block5.isAir(world, x+xDir, y+k1+2, x+zDir)){ + setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 2, z+zDir, this.leaves, this.leavesMeta); + } + } + } + } + + //Fourth Layer + for (int xDir = -2; xDir <= 2; xDir++){ + for (int zDir = -2; zDir <= 2; zDir++){ + if (canRemoveLeafBlockLayer2(-2, 2, xDir, -2, 2, zDir)){ + Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); + } + else { + Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir); + block5 = world.getBlock(x+xDir, y+k1+3, z+zDir); + if (block5.isAir(world, x+xDir, y+k1+3, x+zDir)){ + setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 3, z+zDir, this.leaves, this.leavesMeta); + } + } + } + } + } + else { + + } + } + + setBlockAndNotifyAdequately(world, x - 3, y + (treeHeight - 3), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x + 3, y + (treeHeight - 3), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z - 3, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z + 3, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x - 2, y + (treeHeight - 4), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x + 2, y + (treeHeight - 4), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 4), z - 2, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 4), z + 2, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x - 2, y + (treeHeight - 5), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x + 2, y + (treeHeight - 5), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 5), z - 2, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 5), z + 2, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x - 1, y + (treeHeight - 6), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x + 1, y + (treeHeight - 6), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 6), z - 1, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 6), z + 1, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z, this.leaves, this.leavesMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 2), z, this.leaves, this.leavesMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 1), z, this.leaves, this.leavesMeta); + setBlockAndNotifyAdequately(world, x, y + treeHeight, z, this.leaves, this.leavesMeta); + func_150515_a(world, x, y + (treeHeight - 4), z, Blocks.air); + func_150515_a(world, x, y + (treeHeight - 5), z, Blocks.air); + setBlockAndNotifyAdequately(world, x - 1, y + (treeHeight - 3), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x + 1, y + (treeHeight - 3), z, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z - 1, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 3), z + 1, this.wood, this.woodMeta); + setBlockAndNotifyAdequately(world, x, y + (treeHeight - 2), z, this.wood, this.woodMeta); + } + } + return true; + } + return false; + } + return false; + } + + private boolean canRemoveLeafBlockLayer2(int xDirMin, int xDirMax, int xDir, int zDirMin, int zDirMax, int zDir){ + if (xDir == xDirMin || xDir == xDirMin +1 || xDir == xDirMax || xDir == xDirMax - 1){ + if (zDir == zDirMin || zDir == zDirMin + 1 || zDir == zDirMax || zDir == zDirMax - 1){ + if (xDir == xDirMin + 1 && zDir == zDirMin + 1){ + return false; + } + else if (xDir == xDirMin + 1 && zDir == zDirMax - 1){ + return false; + } + else if (xDir == xDirMax - 1 && zDir == zDirMin + 1){ + return false; + } + else if (xDir == xDirMax - 1 && zDir == zDirMax - 1){ + return false; + } + return true; + } + return false; + } + else { + return false; + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java b/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java new file mode 100644 index 0000000000..7bce4ab173 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java @@ -0,0 +1,15 @@ +package gtPlusPlus.xmod.cofh; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.general.RF2EU_Battery; +import gtPlusPlus.core.lib.LoadedMods; + +public class HANDLER_COFH { + + public static void initItems() { + if (LoadedMods.CoFHCore && (LoadedMods.IndustrialCraft2 || LoadedMods.IndustrialCraft2Classic)) { + ModItems.RfEuBattery = new RF2EU_Battery(); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java b/src/main/java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java new file mode 100644 index 0000000000..9647465711 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/computronics/HANDLER_Computronics.java @@ -0,0 +1,39 @@ +package gtPlusPlus.xmod.computronics; + +import gregtech.GT_Mod; +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.core.lib.LoadedMods; + +public class HANDLER_Computronics { + + public static void preInit(){ + if (LoadedMods.Computronics){ + + } + + } + + public static void init(){ + if (LoadedMods.Computronics){ + + } + else { + GT_Mod.gregtechproxy.addFluid("Argon", "Argon", Materials.Argon, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Argon, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), 1000); + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L), Materials.Air.getGas(1000L), Materials.Nitrogen.getGas(780L), 1600, 32, false); + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 2L), Materials.Air.getGas(1000L), Materials.Oxygen.getGas(210L), 1600, 128, false); + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 3L), Materials.Air.getGas(1000L), Materials.Argon.getGas(5L), 6000, 512, false); + GT_Values.RA.addElectrolyzerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Air, 1L), null, null, Materials.Air.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), null, null, null, null, null, null, 800, 30); + } + } + + public static void postInit(){ + if (LoadedMods.Computronics){ + + } + + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java b/src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java new file mode 100644 index 0000000000..5b3210d58a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java @@ -0,0 +1,87 @@ +package gtPlusPlus.xmod.eio.handler; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.disableEnderIOIngotTooltips; + +import java.lang.reflect.Field; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import gregtech.api.enums.Materials; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.eio.material.MaterialEIO; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; + +public class HandlerTooltip_EIO { + + private static Item mIngot; + Class oMainClass; + Class oIngotClass; + + @SubscribeEvent + public void onItemTooltip(ItemTooltipEvent event){ + //Is EIO loaded? + if (!disableEnderIOIngotTooltips && LoadedMods.EnderIO){ + + //Is the EIO Ingot Item null? + //If it is, reflect in. + if (mIngot == null){ + try { + oMainClass = ReflectionUtils.getClass("crazypants.enderio.EnderIO"); + oIngotClass = ReflectionUtils.getClass("crazypants.enderio.material.ItemAlloy"); + if (oMainClass != null && oIngotClass != null){ + Field oAlloyField = ReflectionUtils.getField(oMainClass, "itemAlloy"); + Object oAlloy = oAlloyField.get(oMainClass); + if (oAlloy != null){ + if (oIngotClass.isInstance(oAlloy) || Item.class.isInstance(oAlloy)){ + mIngot = (Item) oAlloy; + } + } + } + } + catch (Throwable e) { + } + } + + if (mIngot != null){ + //If the Item is an instance of ItemAlloy.class then proceed + if (event.itemStack.getItem() == mIngot || oIngotClass.isInstance(event.itemStack.getItem()) || event.itemStack.getUnlocalizedName().toLowerCase().contains("item.itemAlloy")){ + + //If stacks match, add a tooltip. + if (mIngot != null){ + if (event.itemStack.getItem() == mIngot){ + if (event.itemStack.getItemDamage() == 0){ + event.toolTip.add(MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 1){ + event.toolTip.add(MaterialEIO.ENERGETIC_ALLOY.vChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 2){ + event.toolTip.add(MaterialEIO.VIBRANT_ALLOY.vChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 3){ + event.toolTip.add(MaterialEIO.REDSTONE_ALLOY.vChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 4){ + event.toolTip.add(MaterialEIO.CONDUCTIVE_IRON.vChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 5){ + event.toolTip.add(MaterialEIO.PULSATING_IRON.vChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 6){ + event.toolTip.add(Materials.DarkSteel.mChemicalFormula); + } + else if (event.itemStack.getItemDamage() == 7){ + event.toolTip.add(MaterialEIO.SOULARIUM.vChemicalFormula); + } + } + } + } + } + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java b/src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java new file mode 100644 index 0000000000..a5c87342e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/eio/material/MaterialEIO.java @@ -0,0 +1,121 @@ +package gtPlusPlus.xmod.eio.material; + +import gtPlusPlus.core.material.*; +import gtPlusPlus.core.material.state.MaterialState; + +public class MaterialEIO { + + public static final Material SOULARIUM = new Material( + "Soularium", //Material Name + MaterialState.SOLID, //State + new short[]{95,90,54, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + false, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().GOLD, 1), + new MaterialStack(NONMATERIAL.SOULSAND, 1) + }); + + public static final Material CONDUCTIVE_IRON = new Material( + "Conductive Iron", //Material Name + MaterialState.SOLID, //State + new short[]{164,109,100, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + false, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 1), + new MaterialStack(NONMATERIAL.REDSTONE, 1) + }); + + public static final Material PULSATING_IRON = new Material( + "Pulsating Iron", //Material Name + MaterialState.SOLID, //State + new short[]{50,91,21, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + false, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().IRON, 1), + new MaterialStack(NONMATERIAL.ENDERPEARL, 1) + }); + + public static final Material ELECTRICAL_STEEL = new Material( + "Electrical Steel", //Material Name + MaterialState.SOLID, //State + new short[]{194,194,194, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + true, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 3), + new MaterialStack(ELEMENT.getInstance().SILICON, 1) + }); + + public static final Material ENERGETIC_ALLOY = new Material( + "Energetic Alloy", //Material Name + MaterialState.SOLID, //State + new short[]{252,151,45, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + true, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().GOLD, 1), + new MaterialStack(NONMATERIAL.REDSTONE, 1), + new MaterialStack(NONMATERIAL.GLOWSTONE, 1) + }); + + public static final Material VIBRANT_ALLOY = new Material( + "Vibrant Alloy", //Material Name + MaterialState.SOLID, //State + new short[]{204,242,142, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + true, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ENERGETIC_ALLOY, 1), + new MaterialStack(NONMATERIAL.ENDERPEARL, 1) + }); + + public static final Material REDSTONE_ALLOY = new Material( + "Redstone Alloy", //Material Name + MaterialState.SOLID, //State + new short[]{178,34,34, 0}, //Material Colour + 10, //Melting Point in C + 10, + 10, + 10, + false, //Uses Blast furnace? + false, //Generates a cell + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SILICON, 1), + new MaterialStack(NONMATERIAL.REDSTONE, 1) + }); + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java new file mode 100644 index 0000000000..05d00b06d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/HANDLER_FR.java @@ -0,0 +1,61 @@ +package gtPlusPlus.xmod.forestry; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import cpw.mods.fml.common.Optional; + +import net.minecraft.block.Block; +import net.minecraft.world.World; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry; +import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes; + +public class HANDLER_FR { + + public static void preInit(){ + if (LoadedMods.Forestry){ + FR_ItemRegistry.Register(); + } + } + + public static void Init(){ + if (LoadedMods.Forestry){ + //new GTPP_Bees(); TODO- Will Investigate this properly later. + } + } + + public static void postInit(){ + if (LoadedMods.Forestry){ + FR_Gregtech_Recipes.registerItems(); + } + } + + public static boolean createBlockBreakParticles(final World world, final int x, final int y, final int z, final Block block){ + if (LoadedMods.Forestry){ + createBlockBreakParticles_INTERNAL(world, x, y, z, block); + } + return false; + } + + @Optional.Method(modid = "Forestry") + private static void createBlockBreakParticles_INTERNAL(final World world, final int x, final int y, final int z, final Block block){ + if (LoadedMods.Forestry){ + Class oClass; + try { + oClass = ReflectionUtils.getClass("forestry.core.proxy.ProxyCommon"); + Object oProxy = ReflectionUtils.getField(oClass, "common"); + if (oProxy != null && oClass.isInstance(oProxy)){ + Method mParticles = ReflectionUtils.getMethod(oClass, "addBlockDestroyEffects", World.class, int.class, int.class, int.class, Block.class, int.class); + mParticles.invoke(oProxy, world, x, y, z, block, 0); + } + } + catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java new file mode 100644 index 0000000000..77ee15c5d5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java @@ -0,0 +1,24 @@ + +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.blocks; + +import forestry.apiculture.blocks.BlockApicultureType; +import forestry.core.blocks.BlockBase; +import gtPlusPlus.core.creative.AddToCreativeTab; + +public class BlockDenseBeeHouse extends BlockBase { + public BlockDenseBeeHouse() { + super(); + setCreativeTab(AddToCreativeTab.tabBOP); + setHarvestLevel("axe", 0); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java new file mode 100644 index 0000000000..fa36732cb6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.forestry.bees.blocks; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import forestry.core.utils.StringUtil; +import forestry.plugins.PluginManager; +import net.minecraftforge.oredict.OreDictionary; + +public abstract class FR_BlockRegistry { + protected static T registerBlock(T block, Class itemClass, String name) { + if (PluginManager.getStage() != PluginManager.Stage.SETUP) { + throw new RuntimeException("Tried to register Block outside of Setup"); + } + block.setBlockName("for." + name); + GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block)); + return block; + } + + protected static void registerOreDictWildcard(String oreDictName, Block block) { + OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, 32767)); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java new file mode 100644 index 0000000000..b4d6e4c2fc --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/CustomCombs.java @@ -0,0 +1,119 @@ +package gtPlusPlus.xmod.forestry.bees.custom; + +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_LanguageManager; + +import gtPlusPlus.core.util.Utils; + +public enum CustomCombs { + //Custom Bees + + //Rubbers & Silicons + SILICON("silicon", true, Materials.Silicon, 100), + RUBBER("rubber", true, Materials.Rubber, 100), + PLASTIC("polyethylene", true, Materials.Plastic, 75), + PTFE("polytetrafluoroethylene", true, GTPP_Bees.PTFE, 50), + PBS("styrene-butadiene", true, GTPP_Bees.PBS, 25), + + //Fuels + BIOMASS("biomass", true, Materials.Biomass, 100), + ETHANOL("ethanol", true, Materials.Ethanol, 75), + DIESEL("diesel", true, Materials.Fuel, 50), + NITRO("nitro", true, Materials.NitroFuel, 25), + HOOTCH("hootch", true, Materials.Silicon, 50), + ROCKETFUEL("rocket", true, Materials.Silicon, 25), + + + //Materials which are hard, if not impossible to obtain. + FLUORINE("fluorine", true, Materials.Fluorine, 25), + COKE("coke", true, Materials._NULL, 50), + FORCE("force", true, Materials.Force, 50), + NIKOLITE("nikolite", true, Materials.Nikolite, 75), + MITHRIL("mithril", true, Materials.Mithril, 10), + ADAMANTIUM("adamantium", true, Materials.Adamantium, 5), + + //Trash + SALT("salt", true, Materials.Salt, 75), + SAND("sand", true, Materials.Sand, 100), + + ; + + private static int[][] colours = new int[][]{ + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, //SILICON + {Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)}, //RUBBER + {Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)}, //PLASTIC + {Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)}, //PTFE + {Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)}, //PBS + //Unused + {Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)}, //Biofuel + {Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)}, //Ethanol + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(30, 230, 230), Utils.rgbtoHexValue(10, 150, 150)}, // Fluorine + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)}, // Force + {Utils.rgbtoHexValue(60, 180, 200), Utils.rgbtoHexValue(40, 150, 170)}, // Nikolite + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, // + {Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)}, + {0x666666, 0x525252}, + {0x2E8F5B, 0xDCC289}, + {0x4C4C4C, 0x333333}, + {0x808080, 0x999999}, + {0x57CFFB, 0xBBEEFF}, + {0x7D0F0F, 0xD11919}, + {0x1947D1, 0x476CDA}, + {0xE6005C, 0xCC0052}, + {0x0033CC, 0x00248F}, + {0xCCFFFF, 0xA3CCCC}, + {0x248F24, 0xCCFFCC}, + {0x248F24, 0x2EB82E}, + {0xD4D4D4, 0x58300B}, + {0xFF6600, 0xE65C00}, + {0xD4D4D4, 0xDDDDDD}, + {0x666699, 0xA3A3CC}, + {0xDA9147, 0xDE9C59}, + {0x808080, 0x999999}, + {0x8585AD, 0x9D9DBD}, + {0xF0DEF0, 0xF2E1F2}, + {0xC2C2D6, 0xCECEDE}, + {0xE6B800, 0xCFA600}, + {0x008AB8, 0xD6D6FF}, + {0xD5D5D5, 0xAAAAAA}, + {0xCC99FF, 0xDBB8FF}, + {0xEBA1EB, 0xF2C3F2}, + {0x62626D, 0x161620}, + {0xE6E6E6, 0xFFFFCC}, + {0xDADADA, 0xD1D1E0}, + {0x19AF19, 0x169E16}, + {0x335C33, 0x6B8F00}, + {0x003300, 0x002400}, + }; + public boolean showInList; + public Materials material; + public int chance; + private String name; + private CustomCombs(String pName, boolean show, Materials material, int chance) { + this.name = pName; + this.material = material; + this.chance = chance; + this.showInList = show; + } + + public void setHidden() { + this.showInList = false; + } + + public String getName() { +// return "gt.comb."+this.name; + return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb"); + } + + public int[] getColours() { + return colours[this.ordinal()]; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java new file mode 100644 index 0000000000..b36508f6aa --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java @@ -0,0 +1,876 @@ +package gtPlusPlus.xmod.forestry.bees.custom; + +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.Locale; + +import org.apache.commons.lang3.reflect.FieldUtils; +import org.apache.commons.lang3.text.WordUtils; + +import net.minecraft.item.ItemStack; + +import forestry.api.apiculture.*; +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAllele; +import forestry.apiculture.genetics.*; +import forestry.core.genetics.alleles.AlleleHelper; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraftforge.common.BiomeDictionary.Type; + +public enum GTPP_Bee_Definition implements IBeeDefinition { + + + SILICON(GTPP_Branch_Definition.ORGANIC, "Silicon", true, Utils.rgbtoHexValue(75, 75, 75), Utils.rgbtoHexValue(125, 125, 125)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getSlagComb(), 0.10f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILICON), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10); + } + }, + + RUBBER(GTPP_Branch_Definition.ORGANIC, "Rubber", true, Utils.rgbtoHexValue(55, 55, 55), Utils.rgbtoHexValue(75, 75, 75)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getSlagComb(), 0.10f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBBER), 0.30f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("SLIMEBALL"), getGregtechBeeType("STICKYRESIN"), 10); + } + }, + + PLASTIC(GTPP_Branch_Definition.ORGANIC, "Plastic", true, Utils.rgbtoHexValue(245, 245, 245), Utils.rgbtoHexValue(175, 175, 175)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getStoneComb(), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PLASTIC), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(RUBBER.species, getGregtechBeeType("OIL"), 10); + } + }, + + PTFE(GTPP_Branch_Definition.ORGANIC, "Ptfe", true, Utils.rgbtoHexValue(150, 150, 150), Utils.rgbtoHexValue(75, 75, 75)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getStoneComb(), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PTFE), 0.10f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(RUBBER.species, PLASTIC.species, 10); + } + }, + + PBS(GTPP_Branch_Definition.ORGANIC, "Pbs", true, Utils.rgbtoHexValue(33, 26, 24), Utils.rgbtoHexValue(23, 16, 14)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getStoneComb(), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.PBS), 0.10f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(PTFE.species, PLASTIC.species, 10); + } + }, + + + + + /** + * Fuels + */ + + BIOMASS(GTPP_Branch_Definition.ORGANIC, "Biomass", true, Utils.rgbtoHexValue(33, 225, 24), Utils.rgbtoHexValue(23, 175, 14)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.BIOMASS), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Rural"), 10); + tMutation.restrictBiomeType(Type.FOREST); + } + }, + + ETHANOL(GTPP_Branch_Definition.ORGANIC, "Ethanol", true, Utils.rgbtoHexValue(255, 128, 0), Utils.rgbtoHexValue(220, 156, 32)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.40f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ETHANOL), 0.20f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(BIOMASS.species, getSpecies("Farmerly"), 5); + tMutation.restrictBiomeType(Type.FOREST); + } + }, + + + + + + + + + + + + + + + + + + + + + + /** + * Materials + */ + + + FLUORINE(GTPP_Branch_Definition.ORGANIC, "Fluorine", true, Utils.rgbtoHexValue(30, 230, 230), Utils.rgbtoHexValue(10, 150, 150)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getStoneComb(), 0.40f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FLUORINE), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.COLD); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("LAPIS"), getGregtechBeeType("SAPPHIRE"), 5); + tMutation.restrictBiomeType(Type.COLD); + } + }, + + //Coke + + + + //Force + FORCE(GTPP_Branch_Definition.METAL, "Force", true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getStoneComb(), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAND), 0.25f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.FORCE), 0.25f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SALT), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.HOT); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("STEEL"), getGregtechBeeType("GOLD"), 10); + tMutation.restrictBiomeType(Type.HOT); + } + }, + + //Nikolite + NIKOLITE(GTPP_Branch_Definition.METAL, "Nikolite", true, Utils.rgbtoHexValue(60, 180, 200), Utils.rgbtoHexValue(40, 150, 170)) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(getStoneComb(), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NIKOLITE), 0.05f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.HOT); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getGregtechBeeType("ALUMINIUM"), getGregtechBeeType("SILVER"), 8); + tMutation.restrictBiomeType(Type.HOT); + } + }, + + + + + + + + /* + + + CLAY(GTPP_Branch_Definition.ORGANIC, "Clay", true, 0x19d0ec, 0xffdc16) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); + beeSpecies.addProduct(new ItemStack(Items.clay_ball, 1), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MEADOWS.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Diligent"), 20); + } + }, + SLIMEBALL(GTPP_Branch_Definition.ORGANIC, "SlimeBall", true, 0x4E9E55, 0x00FF15) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 15), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STICKY), 0.30f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MARSHY.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Marshy"), CLAY.species, 15); + } + }, + PEAT(GTPP_Branch_Definition.ORGANIC, "Peat", true, 0x906237, 0x58300B) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f); + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.RURAL.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Rural"), CLAY.species, 20); + } + }, + STICKYRESIN(GTPP_Branch_Definition.ORGANIC, "StickyResin", true, 0x2E8F5B, 0xDCC289) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); + beeSpecies.addProduct(ItemList.IC2_Resin.get(1, new Object[0]), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MEADOWS.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(SLIMEBALL.species, PEAT.species, 25); + } + }, + COAL(GTPP_Branch_Definition.ORGANIC, "Coal", true, 0x666666, 0x525252) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LIGNIE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COAL), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.AUSTERE.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), PEAT.species, 18); + } + }, + OIL(GTPP_Branch_Definition.ORGANIC, "Oil", true, 0x4C4C4C, 0x333333) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_ModHandler.getModItem(GT_Values.MOD_ID_FR, "beeCombs", 1, 0), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OIL), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + beeSpecies.setNocturnal(); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MEADOWS.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(COAL.species, STICKYRESIN.species, 8); + } + }, + REDSTONE(GTPP_Branch_Definition.GEM, "Redstone", true, 0x7D0F0F, 0xD11919) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.REDSTONE), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Industrious"), getSpecies("Demonic"), 20); + } + }, + LAPIS(GTPP_Branch_Definition.GEM, "Lapis", true, 0x1947D1, 0x476CDA) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LAPIS), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Demonic"), getSpecies("Imperial"), 20); + } + }, + CERTUS(GTPP_Branch_Definition.GEM, "CertusQuartz", true, 0x57CFFB, 0xBBEEFF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.CERTUS), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Hermitic"), LAPIS.species, 20); + } + }, + RUBY(GTPP_Branch_Definition.GEM, "Ruby", true, 0xE6005C, 0xCC0052) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.RUBY), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, DIAMOND.species, 10); + } + }, + SAPPHIRE(GTPP_Branch_Definition.GEM, "Sapphire", true, 0x0033CC, 0x00248F) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SAPPHIRE), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(CERTUS.species, LAPIS.species, 10); + } + }, + DIAMOND(GTPP_Branch_Definition.GEM, "Diamond", true, 0xCCFFFF, 0xA3CCCC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.DIAMOND), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(CERTUS.species, COAL.species, 6); + } + }, + OLIVINE(GTPP_Branch_Definition.GEM, "Olivine", true, 0x248F24, 0xCCFFCC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.OLIVINE), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(CERTUS.species, getSpecies("Ended"), 10); + } + }, + EMERALD(GTPP_Branch_Definition.GEM, "Emerald", true, 0x248F24, 0x2EB82E) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STONE), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.EMERALD), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.COLD); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(OLIVINE.species, DIAMOND.species, 8); + } + }, + COPPER(GTPP_Branch_Definition.METAL, "Copper", true, 0xFF6600, 0xE65C00) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.COPPER), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(getSpecies("Majestic"), CLAY.species, 25); + } + }, + TIN(GTPP_Branch_Definition.METAL, "Tin", true, 0xD4D4D4, 0xDDDDDD) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TIN), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(CLAY.species, getSpecies("Diligent"), 25); + } + }, + LEAD(GTPP_Branch_Definition.METAL, "Lead", true, 0x666699, 0xA3A3CC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.LEAD), 0.15f); + beeSpecies.setHumidity(EnumHumidity.DAMP); + beeSpecies.setTemperature(EnumTemperature.WARM); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(COAL.species, COPPER.species, 25); + } + }, + IRON(GTPP_Branch_Definition.METAL, "Iron", true, 0xDA9147, 0xDE9C59) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.IRON), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(TIN.species, COPPER.species, 25); + } + }, + STEEL(GTPP_Branch_Definition.METAL, "Steel", true, 0x808080, 0x999999) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.STEEL), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(IRON.species, COAL.species, 20); + } + }, + NICKEL(GTPP_Branch_Definition.METAL, "Nickel", true, 0x8585AD, 0x8585AD) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.NICKEL), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(IRON.species, COPPER.species, 25); + } + }, + ZINC(GTPP_Branch_Definition.METAL, "Zinc", true, 0xF0DEF0, 0xF2E1F2) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ZINC), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(IRON.species, TIN.species, 20); + } + }, + SILVER(GTPP_Branch_Definition.METAL, "Silver", true, 0xC2C2D6, 0xCECEDE) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SILVER), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(LEAD.species, TIN.species, 20); + } + }, + GOLD(GTPP_Branch_Definition.METAL, "Gold", true, 0xEBC633, 0xEDCC47) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.GOLD), 0.15f); + beeSpecies.setHumidity(EnumHumidity.NORMAL); + beeSpecies.setTemperature(EnumTemperature.NORMAL); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(LEAD.species, COPPER.species, 20); + } + }, + ALUMINIUM(GTPP_Branch_Definition.RAREMETAL, "Aluminium", true, 0xB8B8FF, 0xD6D6FF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.ALUMINIUM), 0.15f); + beeSpecies.setHumidity(EnumHumidity.ARID); + beeSpecies.setTemperature(EnumTemperature.HOT); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(NICKEL.species, ZINC.species, 18); + } + }, + TITANIUM(GTPP_Branch_Definition.RAREMETAL, "Titanium", true, 0xCC99FF, 0xDBB8FF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.SLAG), 0.30f); + beeSpecies.addProduct(GTPP_Bees.combs.getStackForType(CustomCombs.TITANIUM), 0.15f); + beeSpecies.setHumidity(EnumHumidity.ARID); + beeSpecies.setTemperature(EnumTemperature.HOT); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + IBeeMutationCustom tMutation = registerMutation(REDSTONE.species, ALUMINIUM.species, 5); + } + }*/ + + ; + + + private final GTPP_Branch_Definition branch; + private final IAlleleBeeSpeciesCustom species; + + private IAllele[] template; + private IBeeGenome genome; + + GTPP_Bee_Definition(GTPP_Branch_Definition branch, String binomial, boolean dominant, int primary, int secondary) { + String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH); + String species = "species" + WordUtils.capitalize(lowercaseName); + + String uid = "forestry." + species; + String description = "for.description." + species; + String name = "for.bees.species." + lowercaseName; + + this.branch = branch; + this.species = BeeManager.beeFactory.createSpecies(uid, dominant, "Sengir", name, description, branch.getBranch(), binomial, primary, secondary); + } + + public static void initBees() { + for (GTPP_Bee_Definition bee : values()) { + bee.init(); + } + for (GTPP_Bee_Definition bee : values()) { + bee.registerMutations(); + } + } + + private static IAlleleBeeSpecies getSpecies(String name) { + return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString()); + } + + protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies); + + protected abstract void setAlleles(IAllele[] template); + + protected abstract void registerMutations(); + + private void init() { + setSpeciesProperties(species); + + template = branch.getTemplate(); + AlleleHelper.instance.set(template, EnumBeeChromosome.SPECIES, species); + setAlleles(template); + + genome = BeeManager.beeRoot.templateAsGenome(template); + + BeeManager.beeRoot.registerTemplate(template); + } + + protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) { + IAllele[] template = getTemplate(); + Logger.DEBUG_BEES("parent1: "+(parent1 != null)); + Logger.DEBUG_BEES("parent2: "+(parent2 != null)); + Logger.DEBUG_BEES("chance: "+(chance)); + Logger.DEBUG_BEES("template: "+(template != null)); + return BeeManager.beeMutationFactory.createMutation(parent1, parent2, template, chance); + } + + @Override + public final IAllele[] getTemplate() { + return Arrays.copyOf(template, template.length); + } + + @Override + public final IBeeGenome getGenome() { + return genome; + } + + @Override + public final IBee getIndividual() { + return new Bee(genome); + } + + @Override + public final ItemStack getMemberStack(EnumBeeType beeType) { + IBee bee = getIndividual(); + return BeeManager.beeRoot.getMemberStack(bee, beeType.ordinal()); + } + + public final IBeeDefinition getRainResist() { + return new BeeVariation.RainResist(this); + } + + private static ItemStack getSlagComb(){ + return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Slag, 1)); + } + private static ItemStack getStoneComb(){ + return issStackValid(ItemUtils.getSimpleStack(GTPP_Bees.Comb_Stone, 1)); + } + + private static ItemStack issStackValid(ItemStack result){ + if (result == null){ + return ItemUtils.getErrorStack(1); + } + return result; + } + + public static IAlleleBeeSpecies getGregtechBeeType(String name){ + Class gtBees; + try { + Class gtBeeTypes = Class.forName("gregtech.loaders.misc.GT_BeeDefinition"); + Enum gtBeeEnumObject = Enum.valueOf(gtBeeTypes, name); + Field gtBeesField = FieldUtils.getDeclaredField(gtBeeTypes, "species", true); + gtBeesField.setAccessible(true); + ReflectionUtils.makeFieldAccessible(gtBeesField); + Object beeType = gtBeesField.get(gtBeeEnumObject); + return (IAlleleBeeSpecies) beeType; + } + catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java new file mode 100644 index 0000000000..49b8da0d1b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java @@ -0,0 +1,195 @@ +package gtPlusPlus.xmod.forestry.bees.custom; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import cpw.mods.fml.common.Loader; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAllele; +import gregtech.GT_Mod; +import gregtech.api.enums.Materials; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD; +import gtPlusPlus.core.item.base.misc.BaseItemMisc; +import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GTPP_Bees { + + //Custom Comb Drop Base Items + public static Item dropForceGem; + public static Item dropBiomassBlob; + public static Item dropEthanolBlob; + public static Item dropNikoliteDust; + public static Item dropFluorineBlob; + + //Base Comb Item + public static ItemCustomComb combs; + + //Combs obtained via reflection + public static ItemStack Comb_Slag; + public static ItemStack Comb_Stone; + + //Materials obtained via reflection + public static Materials PTFE; + public static Materials PBS; + + //public static GTPP_Branch_Definition definition; + + + public GTPP_Bees() { + if (Loader.isModLoaded("Forestry") /*&& tryGetBeesBoolean()*/) { + + for (IAllele o : AlleleManager.alleleRegistry.getRegisteredAlleles().values()){ + //Utils.LOG_DEBUG_BEES(" =================================================="); + //Utils.LOG_DEBUG_BEES(" Name: "+o.getName()); + //Utils.LOG_DEBUG_BEES(" Name: "+o.getUnlocalizedName()); + //Utils.LOG_DEBUG_BEES(" getUID: "+o.getUID()); + //Utils.LOG_DEBUG_BEES(" isDominant: "+o.isDominant()); + } + + //Set Materials and Comb stacks from GT via Reflection + setMaterials(); + setCustomItems(); + + try { + combs = new ItemCustomComb(); + combs.initCombsRecipes(); + GTPP_Bee_Definition.initBees(); + } + catch (Throwable t){ + Logger.BEES("Failed to load bees, probably due to an ancient forestry version"); + t.printStackTrace(); + } + } + } + + private void setCustomItems() { + dropForceGem = new BaseItemMisc("Force", new short[]{250, 250, 20}, 64, MiscTypes.GEM, null); + //mGregMatLoader.enableMaterial(Materials.Force); + //MaterialUtils.tryEnableMaterial(Materials.Force); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force); + dropBiomassBlob = new BaseItemMisc("Biomass", new short[]{33, 225, 24}, 64, MiscTypes.DROP, null); + dropEthanolBlob = new BaseItemMisc("Ethanol", new short[]{255, 128, 0}, 64, MiscTypes.DROP, null); + + //Nikolite may not exist, so lets make it. + dropNikoliteDust = ItemUtils.generateSpecialUseDusts("Nikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200))[2]; + //mGregMatLoader.enableMaterial(Materials.BlueAlloy); + //mGregMatLoader.enableMaterial(Materials.Nikolite); + //MaterialUtils.tryEnableMaterial(Materials.Nikolite); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite); + //MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite); + //MaterialUtils.tryEnableMaterial(Materials.BlueAlloy); + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotNikolite", 1) == null){ + new BaseItemIngot_OLD("itemIngotNikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200), 0); + } + + dropFluorineBlob = new BaseItemMisc("Fluorine", new short[]{30, 230, 230}, 64, MiscTypes.DROP, null); + addRecipes(); + } + + private void addRecipes(){ + addExtractorRecipe(ItemUtils.getSimpleStack(dropBiomassBlob), FluidUtils.getFluidStack("biomass", 30)); + addExtractorRecipe(ItemUtils.getSimpleStack(dropEthanolBlob), FluidUtils.getFluidStack("ethanol", 6)); + addExtractorRecipe(ItemUtils.getSimpleStack(dropFluorineBlob), FluidUtils.getFluidStack("fluorine", 4)); + } + + private void addExtractorRecipe(ItemStack input, FluidStack output){ + CORE.RA.addFluidExtractionRecipe( + input, + output, + 30, + 8); + } + + + private static boolean tryGetBeesBoolean(){ + try { + Class mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy"); + Field mNerf = FieldUtils.getDeclaredField(mProxy, "mGTBees", true); + boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy); + return returnValue; + } + catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) { + return false; + } + } + + private void setMaterials(){ + try { + + Class gtBees = Class.forName("gregtech.loaders.misc.GT_Bees"); + Class gtCombItemClass = Class.forName("gregtech.common.items.ItemComb"); + Class gtCombEnumClass = Class.forName("gregtech.common.items.CombType"); + Field gtCombs = FieldUtils.getDeclaredField(gtBees, "combs", true); + gtCombs.setAccessible(true); + ReflectionUtils.makeFieldAccessible(gtCombs); + Enum gtCombTypeSlag = Enum.valueOf(gtCombEnumClass, "SLAG"); + Enum gtCombTypeStone = Enum.valueOf(gtCombEnumClass, "STONE"); + Object oCombObject = gtCombs.get(null); + + Logger.DEBUG_BEES("Field getModifiers: "+gtCombs.getModifiers()); + Logger.DEBUG_BEES("Field toGenericString: "+gtCombs.toGenericString()); + Logger.DEBUG_BEES("Field getClass: "+gtCombs.getClass()); + Logger.DEBUG_BEES("Field isEnumConstant: "+gtCombs.isEnumConstant()); + Logger.DEBUG_BEES("Field isSynthetic: "+gtCombs.isSynthetic()); + Logger.DEBUG_BEES("Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null)); + Logger.DEBUG_BEES("Field isAccessible: "+gtCombs.isAccessible()); + + + Logger.BEES("gtBees: "+(gtBees != null)); + Logger.BEES("gtCombItemClass: "+(gtCombItemClass != null)); + Logger.BEES("gtCombEnumClass: "+(gtCombEnumClass != null)); + Logger.BEES("gtCombs: "+(gtCombs != null)); + Logger.BEES("gtCombTypeSlag: "+(gtCombTypeSlag != null)); + Logger.BEES("gtCombTypeStone: "+(gtCombTypeStone != null)); + Logger.BEES("oCombObject: "+(oCombObject != null)); + + + //if (gtCombItemClass.isInstance(oCombObject)){ + Method getStackForType; + getStackForType = gtCombItemClass.getDeclaredMethod("getStackForType", gtCombEnumClass); + + if (getStackForType != null) { + Logger.BEES("Found Method: getStackForType"); + } + if (Comb_Slag == null){ + Comb_Slag = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeSlag); + } + if (Comb_Stone == null){ + Comb_Stone = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeStone); + } + /*} + else { + Utils.LOG_BEES("oCombObject was not an instance of gregtech.common.items.ItemComb"); + }*/ + + } + catch (NullPointerException | ClassNotFoundException | IllegalArgumentException | IllegalAccessException | NoSuchMethodException | SecurityException | InvocationTargetException e){ + Logger.BEES("Bad Reflection. setMaterials()"); + } + + PTFE = trySetValue("Polytetrafluoroethylene"); + PBS = trySetValue("StyreneButadieneRubber"); + } + + private Materials trySetValue(String material){ + Materials mTemp = Materials.valueOf(material); + if (mTemp != null){ + return mTemp; + } + return Materials._NULL; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java new file mode 100644 index 0000000000..f59f0c537f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java @@ -0,0 +1,80 @@ +package gtPlusPlus.xmod.forestry.bees.custom; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IClassification; +import gtPlusPlus.api.objects.Logger; + +public enum GTPP_Branch_Definition { + + ORGANIC("ORGANIC"), + GEM("GEM"), + METAL("METAL"), + RAREMETAL("RAREMETAL"), + RADIOACTIVE("RADIOACTIVE"); + + final String mFieldName; + final Enum mActualValues; + GTPP_Branch_Definition(String mValue){ + this.mFieldName = mValue; + this.mActualValues = setEnumVar(mValue); + } + + public final IAllele[] getTemplate() { + Class gtBranchDefClass; + try { + gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition"); + Enum enumA = mActualValues; + Method methodMyMethod = gtBranchDefClass.getMethod("getTemplate"); + + Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); + Logger.INFO("[Bees] enumA: "+(enumA != null)); + Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); + + return (IAllele[]) methodMyMethod.invoke(enumA); + } + catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.INFO("[Bees] Bad Reflection. getTemplate()"); + e.printStackTrace(); + //gregtech.loaders.misc.GT_BranchDefinition.getTemplate() + return null; + } + } + + public final IClassification getBranch() { + Class gtBranchDefClass; + try { + gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition"); + Enum enum_MY_SAMPLE_ENUM = mActualValues; + Method methodMyMethod = gtBranchDefClass.getMethod("getBranch"); + + + Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null)); + Logger.INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null)); + Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null)); + + return (IClassification) methodMyMethod.invoke(enum_MY_SAMPLE_ENUM); + } + catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.INFO("[Bees] Bad Reflection. getBranch()"); + e.printStackTrace(); + return null; + } + } + + private Enum setEnumVar(String value){ + try { + Class gtBranchDefClass = Class.forName("gregtech.loaders.misc.GT_BranchDefinition"); + Enum branchDef = Enum.valueOf(gtBranchDefClass, value); + return branchDef; + } + catch (ClassNotFoundException e){ + return null; + } + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java new file mode 100644 index 0000000000..813ebcbe25 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java @@ -0,0 +1,181 @@ +package gtPlusPlus.xmod.forestry.bees.custom; + +import java.lang.reflect.Field; +import java.util.List; + +import org.apache.commons.lang3.reflect.FieldUtils; + + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.GT_Mod; +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import forestry.api.core.Tabs; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class ItemCustomComb extends Item { + @SideOnly(Side.CLIENT) + private IIcon secondIcon; + + public ItemCustomComb() { + super(); + this.setCreativeTab(Tabs.tabApiculture); + this.setHasSubtypes(true); + this.setUnlocalizedName("gtpp.comb"); + GameRegistry.registerItem(this, "gtpp.comb", CORE.MODID); + } + + public ItemStack getStackForType(CustomCombs type) { + return new ItemStack(this, 1, type.ordinal()); + } + + public ItemStack getStackForType(CustomCombs type, int count) { + return new ItemStack(this, count, type.ordinal()); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for (CustomCombs type : CustomCombs.values()) { + if (type.showInList) { + list.add(this.getStackForType(type)); + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public int getRenderPasses(int meta) { + return 2; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister par1IconRegister) { + this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0"); + this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1"); + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return (pass == 0) ? itemIcon : secondIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int pass) { + int meta = Math.max(0, Math.min(CustomCombs.values().length - 1, stack.getItemDamage())); + int colour = CustomCombs.values()[meta].getColours()[0]; + + if (pass >= 1) { + colour = CustomCombs.values()[meta].getColours()[1]; + } + + return colour; + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return CustomCombs.values()[stack.getItemDamage()].getName(); + } + + public void initCombsRecipes() { + ItemStack tComb; + + tComb = getStackForType(CustomCombs.SILICON); + addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silicon, 1), 30); + //addProcess(tComb, Materials.Silver, 100); + //addProcess(tComb, Materials.Galena, 100); + + //Rubbers + tComb = getStackForType(CustomCombs.RUBBER); + addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rubber, 1), 30); + tComb = getStackForType(CustomCombs.PLASTIC); + addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), 20); + tComb = getStackForType(CustomCombs.PTFE); + addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PTFE, 1), 10); + tComb = getStackForType(CustomCombs.PBS); + addSpecialCent(tComb, GT_OreDictUnificator.get(OrePrefixes.dustTiny, GTPP_Bees.PBS, 1), 5); + + + //Fuels + tComb = getStackForType(CustomCombs.BIOMASS); + addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropBiomassBlob), 5); + tComb = getStackForType(CustomCombs.PBS); + addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropEthanolBlob), 5); + + //Misc Materials + tComb = getStackForType(CustomCombs.FORCE); + addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropForceGem), 5); + tComb = getStackForType(CustomCombs.FLUORINE); + addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropFluorineBlob), 5); + tComb = getStackForType(CustomCombs.NIKOLITE); + addSpecialCent(tComb, ItemUtils.getSimpleStack(GTPP_Bees.dropNikoliteDust), 5); + + } + public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance){ + GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); + //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); + } + + public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2){ + GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000, chance2 * 100 }, 128, 5); + //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f)); + } + + public void addSpecialCent(ItemStack tComb, ItemStack aOutput, int chance, ItemStack aOutput2, int chance2, ItemStack aOutput3, int chance3){ + GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, aOutput, ItemList.FR_Wax.get(1, new Object[0]), aOutput2, aOutput3, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000, chance2 * 100, chance3*100 }, 128, 5); + //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(aOutput, chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f,aOutput2,chance2 * 0.01f,aOutput3,chance3*0.01f)); + } + + public void addProcess(ItemStack tComb, Materials aMaterial, int chance){ + if(tryGetNerfBoolean()){ + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tComb), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + }else{ + GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); + //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); + } + } + + public void addProcess(ItemStack tComb, Materials aInMaterial, Materials aOutMaterial, int chance){ + if(tryGetNerfBoolean()){ + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tComb), GT_OreDictUnificator.get(OrePrefixes.crushed, aInMaterial, 1), Materials.Water.getFluid(1000), aInMaterial.mOreByProducts.isEmpty() ? null : aInMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 4), 96); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tComb), Materials.UUMatter.getFluid(Math.max(1, ((aOutMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aOutMaterial, 1), 10000, (int) (aOutMaterial.getMass() * 128), 384); + }else{ + GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { chance * 100, 3000 }, 128, 5); + //RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aOutMaterial, 1), chance * 0.01f, ItemList.FR_Wax.get(1, new Object[0]), 0.3f)); + } + } + + private static boolean tryGetNerfBoolean(){ + try { + Class mProxy = Class.forName("gregtech.GT_Mod.gregtechproxy"); + Field mNerf = FieldUtils.getDeclaredField(mProxy, "mNerfedCombs", true); + boolean returnValue = (boolean) mNerf.get(GT_Mod.gregtechproxy); + return returnValue; + } + catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException e) { + return false; + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java new file mode 100644 index 0000000000..4aa9de8220 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.gui; + +import net.minecraft.entity.player.InventoryPlayer; + +import forestry.apiculture.gui.ContainerBeeHelper; +import forestry.apiculture.gui.IContainerBeeHousing; +import forestry.apiculture.tiles.TileBeeHousingBase; +import forestry.core.gui.ContainerTile; +import forestry.core.network.IForestryPacketClient; +import forestry.core.network.packets.PacketGuiUpdate; + +public class ContainerBeeHouse extends ContainerTile implements IContainerBeeHousing { + + public ContainerBeeHouse(InventoryPlayer player, TileBeeHousingBase tile, boolean hasFrames) { + super(tile, player, 8, 108); + ContainerBeeHelper.addSlots(this, tile, hasFrames); + } + + private int beeProgress = 0; + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + int beeProgress = tile.getBeekeepingLogic().getBeeProgressPercent(); + if (this.beeProgress != beeProgress) { + this.beeProgress = beeProgress; + IForestryPacketClient packet = new PacketGuiUpdate(tile); + sendPacketToCrafters(packet); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java new file mode 100644 index 0000000000..89a2f121d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.gui; + +import net.minecraft.inventory.Container; + +import forestry.apiculture.gui.IContainerBeeHousing; +import forestry.apiculture.gui.IGuiBeeHousingInventory; +import forestry.core.config.Constants; +import forestry.core.gui.GuiForestryTitled; +import forestry.core.render.EnumTankLevel; + +public class GuiBeeHouse extends GuiForestryTitled { + + public enum Icon { + APIARY("/apiary.png"), + BEE_HOUSE("/alveary.png"); + + private final String path; + + Icon(String path) { + this.path = path; + } + } + + public GuiBeeHouse(IGuiBeeHousingInventory tile, C container, Icon icon) { + super(Constants.TEXTURE_PATH_GUI + icon.path, container, tile); + ySize = 190; + } + + @Override + protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) { + super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY); + + drawHealthMeter(guiLeft + 20, guiTop + 37, inventory.getHealthScaled(46), EnumTankLevel.rateTankLevel(inventory.getHealthScaled(100))); + } + + private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) { + int i = 176 + rated.getLevelScaled(16); + int k = 0; + + this.drawTexturedModalRect(x, y + 46 - height, i, k + 46 - height, 4, height); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java new file mode 100644 index 0000000000..47c380fdfe --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.inventory; + +import java.util.ArrayList; +import java.util.Collection; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import forestry.api.apiculture.*; +import forestry.apiculture.InventoryBeeHousing; +import forestry.apiculture.inventory.IApiaryInventory; +import forestry.core.access.IAccessHandler; +import forestry.core.utils.SlotUtil; + +public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApiaryInventory { + public static final int SLOT_FRAMES_1 = 9; + public static final int SLOT_FRAMES_COUNT = 3; + + public InventoryDenseBeeHouse(IAccessHandler accessHandler) { + super(12, accessHandler); + } + + @Override + public boolean canSlotAccept(int slotIndex, ItemStack itemStack) { + if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) { + return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null); + } + + return super.canSlotAccept(slotIndex, itemStack); + } + + // override for pipe automation + @Override + public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) { + if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) { + return false; + } + return super.isItemValidForSlot(slotIndex, itemStack); + } + + public Collection getFrames() { + Collection hiveFrames = new ArrayList<>(SLOT_FRAMES_COUNT); + + for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) { + ItemStack stackInSlot = getStackInSlot(i); + if (stackInSlot == null) { + continue; + } + + Item itemInSlot = stackInSlot.getItem(); + if (itemInSlot instanceof IHiveFrame) { + hiveFrames.add((IHiveFrame) itemInSlot); + } + } + + return hiveFrames; + } + + @Override + public void wearOutFrames(IBeeHousing beeHousing, int amount) { + IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld()); + int wear = Math.round(amount * beekeepingMode.getWearModifier()); + + for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) { + ItemStack hiveFrameStack = getStackInSlot(i); + if (hiveFrameStack == null) { + continue; + } + + Item hiveFrameItem = hiveFrameStack.getItem(); + if (!(hiveFrameItem instanceof IHiveFrame)) { + continue; + } + + IHiveFrame hiveFrame = (IHiveFrame) hiveFrameItem; + + ItemStack queenStack = getQueen(); + IBee queen = BeeManager.beeRoot.getMember(queenStack); + ItemStack usedFrame = hiveFrame.frameUsed(beeHousing, hiveFrameStack, queen, wear); + + setInventorySlotContents(i, usedFrame); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java new file mode 100644 index 0000000000..7d9a9e231b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java @@ -0,0 +1,5 @@ +package gtPlusPlus.xmod.forestry.bees.items; + +public class FR_CustomBee { + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java new file mode 100644 index 0000000000..e1d37ab463 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java @@ -0,0 +1,107 @@ +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.items; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomChestContent; + +import forestry.core.utils.StringUtil; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import net.minecraftforge.common.ChestGenHooks; + +public class FR_ItemRegistry { + + + //----- Apiary Frames ---------------------- + //public static FR_ItemHiveFrame frameUntreated; + //public static FR_ItemHiveFrame frameImpregnated; + //public static FR_ItemHiveFrame frameProven; + + //Magic Bee Frame Items + public static MB_ItemFrame hiveFrameAccelerated; + public static MB_ItemFrame hiveFrameVoid; + public static MB_ItemFrame hiveFrameMutagenic; + public static MB_ItemFrame hiveFrameBusy; + + //Extra Bee Frame Items + public static MB_ItemFrame hiveFrameCocoa; + public static MB_ItemFrame hiveFrameCaged; + public static MB_ItemFrame hiveFrameSoul; + public static MB_ItemFrame hiveFrameClay; + public static MB_ItemFrame hiveFrameNova; + + // Frame Items added by bartimaeusnek + public static MB_ItemFrame hiveFrameDecay; + public static MB_ItemFrame hiveFrameSlow; + public static MB_ItemFrame hiveFrameStalilize; + public static MB_ItemFrame hiveFrameArborist; + + @Optional.Method(modid = "Forestry") + public static void Register() { + + //Forestry Frames + //frameUntreated = registerItem(new FR_ItemHiveFrame(80, 0.9f), "frameUntreated"); + //frameImpregnated = registerItem(new FR_ItemHiveFrame(240, 0.4f), "frameImpregnated"); + //frameProven = registerItem(new FR_ItemHiveFrame(720, 0.3f), "frameProven"); + + //Magic Bee like Frames + + if (!CORE.GTNH) { + hiveFrameVoid = new MB_ItemFrame(MB_FrameType.VOID, EnumRarity.rare, "Makes your bee die in the blink of an eye."); + } + else { + hiveFrameVoid = new MB_ItemFrame(MB_FrameType.USELESS, EnumRarity.common, "No more cheaty frames for GTNH players."); + } + + hiveFrameAccelerated = new MB_ItemFrame(MB_FrameType.ACCELERATED, "Longevity for bees isn't very common, especially if they're working harder."); + hiveFrameMutagenic = new MB_ItemFrame(MB_FrameType.MUTAGENIC, EnumRarity.epic, "Evolution of the fittest, finest and fastest."); + hiveFrameBusy = new MB_ItemFrame(MB_FrameType.BUSY, "Your bee will work harder and longer than you expected."); + ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14)); + ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 3, 18)); + ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 14)); + ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 9)); + ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 1, 9)); + ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12)); + ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 8)); + ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameMutagenic), 1, 3, 12)); + + //Extra Bee like Frames + if (!LoadedMods.ExtraBees){ + hiveFrameCocoa = new MB_ItemFrame(MB_FrameType.COCOA, EnumRarity.common, ""); + hiveFrameCaged = new MB_ItemFrame(MB_FrameType.CAGE, EnumRarity.common, ""); + hiveFrameSoul = new MB_ItemFrame(MB_FrameType.SOUL, EnumRarity.common, ""); + hiveFrameClay = new MB_ItemFrame(MB_FrameType.CLAY, EnumRarity.common, ""); + hiveFrameNova = new MB_ItemFrame(MB_FrameType.NOVA, EnumRarity.epic, "A Creative Only Frame."); + } + + // Frame Items added by bartimaeusnek + hiveFrameDecay = new MB_ItemFrame(MB_FrameType.DECAYING, EnumRarity.uncommon, "Who really needs stable genetics?"); + hiveFrameSlow = new MB_ItemFrame(MB_FrameType.SLOWING, EnumRarity.common, "The journey is its own reward."); + hiveFrameStalilize = new MB_ItemFrame(MB_FrameType.STABILIZING, EnumRarity.rare, "If you wish your bees to keep their form."); + hiveFrameArborist = new MB_ItemFrame(MB_FrameType.ARBORISTS, EnumRarity.common, "Who need Bees when you can have Trees?"); + ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(hiveFrameArborist), 1, 4, 24)); + ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameSlow), 1, 4, 24)); + } + + protected static T registerItem(final T item, final String name) { + item.setUnlocalizedName(name); + GameRegistry.registerItem(item, StringUtil.cleanItemName(item)); + return item; + } + +} + + diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java new file mode 100644 index 0000000000..e075bf1eda --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_StringUtil.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.forestry.bees.items; + +import net.minecraft.util.StatCollector; + +public class FR_StringUtil +{ + public static String getLocalizedString(final String key) + { + if(StatCollector.canTranslate(key)) + { + return StatCollector.translateToLocal(key); + } + return StatCollector.translateToFallback(key); + } + + public static String getLocalizedString(final String key, final Object... objects) + { + if(StatCollector.canTranslate(key)) + { + return String.format(StatCollector.translateToLocal(key), objects); + } + return String.format(StatCollector.translateToFallback(key), objects); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java new file mode 100644 index 0000000000..1016021e44 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_FrameType.java @@ -0,0 +1,126 @@ +package gtPlusPlus.xmod.forestry.bees.items; + +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeModifier; + +public enum MB_FrameType implements IBeeModifier +{ + //ExtraBees Clone Frames + //Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f) + COCOA("Chocolate", 240, 1.0f, 1.0f, 0.50f, 1.50f, 1f), + CAGE("Restraint", 240, 0.5f, 1.0f, 0.75f, 0.75f, 1f), + SOUL("Soul", 80, 1.0f, 1.5f, 0.75f, 0.25f, 1f), + CLAY("Healing", 240, 1.0f, 0.5f, 1.50f, 0.75f, 1f), + NOVA("Nova", 240, 1.0f, 100.0f, 0.0001f, 1.00f, 1f), + + + //Name, FrameHP, territory (1f), Mutation rate, lifespan rate, production rate, genetic decay (1f) + ACCELERATED("Accelerated", 175, 1f, 1.2f, 0.9f, 1.8f, 1f), + VOID("Void", 20, 1f, 1f, 0.0001f, 10f, 1f), + MUTAGENIC("Mutagenic", 3, 1f, 5f, 0.0001f, 10f, 1f), + BUSY("Busy", 2000, 1f, 0f, 3f, 4f, 1f), + USELESS("Useless", 100, 1f, 0f, 1f, 1f, 1f), + + // Frame Items added by bartimaeusnek + DECAYING("Decaying", 240, 1f, 1f, 1f, 1f, 10f), //enhanches decay to 10x + SLOWING("Slowing", 175, 1f, 0.5f, 2f, 0.5f, 1f), //reduces mutation, production rate and enhanches lifespan + STABILIZING("Stabilizing", 60, 1f, 0.1f, 1f, 0.1f, 0.5f), //reduces mutation, production and decay + ARBORISTS("Arborists", 240, 3f, 0f, 3f, 0f, 1f); //3x territory and lifespan, sets mutation and production to zero + + private final String frameName; + public final int maxDamage; + + private final float territoryMod; + private final float mutationMod; + private final float lifespanMod; + private final float productionMod; + private final float floweringMod; + private final float geneticDecayMod; + private final boolean isSealed; + private final boolean isLit; + private final boolean isSunlit; + private final boolean isHellish; + + MB_FrameType(final String name, final int damage, final float territory, final float mutation, final float lifespan, final float production, final float geneticDecay) { + this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false); + } + + MB_FrameType(final String name, final int damage, + final float territory, final float mutation, final float lifespan, final float production, final float flowering, final float geneticDecay, + final boolean sealed, final boolean lit, final boolean sunlit, final boolean hellish) + { + this.frameName = name; + this.maxDamage = damage; + + this.territoryMod = territory; + this.mutationMod = mutation; + this.lifespanMod = lifespan; + this.productionMod = production; + this.floweringMod = flowering; + this.geneticDecayMod = geneticDecay; + this.isSealed = sealed; + this.isLit = lit; + this.isSunlit = sunlit; + this.isHellish = hellish; + } + + public String getName() + { + return this.frameName; + } + + public String getLocalizedName() + { + return FR_StringUtil.getLocalizedString("frame." + this.frameName); + } + + @Override + public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) { + return this.territoryMod; + } + + @Override + public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { + return this.mutationMod; + } + + @Override + public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { + return this.lifespanMod; + } + + @Override + public float getProductionModifier(final IBeeGenome genome, final float currentModifier) { + return this.productionMod; + } + + @Override + public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) { + return this.floweringMod; + } + + @Override + public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) { + return this.geneticDecayMod; + } + + @Override + public boolean isSealed() { + return this.isSealed; + } + + @Override + public boolean isSelfLighted() { + return this.isLit; + } + + @Override + public boolean isSunlightSimulated() { + return this.isSunlit; + } + + @Override + public boolean isHellish() { + return this.isHellish; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java new file mode 100644 index 0000000000..65b6977b8a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/MB_ItemFrame.java @@ -0,0 +1,143 @@ +package gtPlusPlus.xmod.forestry.bees.items; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import forestry.api.apiculture.*; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class MB_ItemFrame extends Item implements IHiveFrame +{ + private final MB_FrameType type; + private EnumRarity rarity_value = EnumRarity.uncommon; + private final String toolTip; + + public MB_ItemFrame(final MB_FrameType frameType, final String description) + { + this(frameType, EnumRarity.uncommon, description); + } + + public MB_ItemFrame(final MB_FrameType frameType, final EnumRarity rarity, final String description) + { + super(); + this.type = frameType; + this.setMaxDamage(this.type.maxDamage); + this.setMaxStackSize(1); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName("frame" + frameType.getName()); + this.rarity_value = rarity; + this.toolTip = description; + GameRegistry.registerItem(this, "frame" + frameType.getName()); + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if ((this.toolTip != "") || !this.toolTip.equals("")){ + list.add(EnumChatFormatting.GRAY+this.toolTip); + } + super.addInformation(stack, aPlayer, list, bool); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(final IIconRegister par1IconRegister) + { + this.itemIcon = par1IconRegister.registerIcon(CORE.MODID + ":frame" + this.type.getName()); + } + + // --------- IHiveFrame functions ----------------------------------------- + + @Override + public ItemStack frameUsed(final IBeeHousing housing, ItemStack frame, final IBee queen, final int wear) { + frame.setItemDamage(frame.getItemDamage() + wear); + + if (frame.getItemDamage() >= frame.getMaxDamage()) { + // Break the frame. + frame = null; + } + + return frame; + } + + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack par1ItemStack){ + return this.rarity_value; + } + + @Override + public boolean hasEffect(final ItemStack par1ItemStack){ + if ((this.rarity_value == EnumRarity.uncommon) || (this.rarity_value == EnumRarity.common)){ + return false; + } + return true; + } + + @Override + public IBeeModifier getBeeModifier() { + return this.type; + } + + @Override + public boolean isBookEnchantable(final ItemStack itemstack1, final ItemStack itemstack2) { + return false; + } + + @Override + public boolean isRepairable() { + return false; + } + + public float getTerritoryModifier(final IBeeGenome genome, final float currentModifier) { + return this.type.getTerritoryModifier(genome, currentModifier); + } + + public float getMutationModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { + return this.type.getMutationModifier(genome, mate, currentModifier); + } + + public float getLifespanModifier(final IBeeGenome genome, final IBeeGenome mate, final float currentModifier) { + return this.type.getLifespanModifier(genome, mate, currentModifier); + } + + public float getProductionModifier(final IBeeGenome genome, final float currentModifier) { + return this.type.getProductionModifier(genome, currentModifier); + } + + public float getFloweringModifier(final IBeeGenome genome, final float currentModifier) { + return this.type.getFloweringModifier(genome, currentModifier); + } + + public float getGeneticDecay(final IBeeGenome genome, final float currentModifier) { + return this.type.getGeneticDecay(genome, currentModifier); + } + + public boolean isSealed() { + return this.type.isSealed(); + } + + public boolean isSelfLighted() { + return this.type.isSelfLighted(); + } + + public boolean isSunlightSimulated() { + return this.type.isSunlightSimulated(); + } + + public boolean isHellish(){ + return this.type.isHellish(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java new file mode 100644 index 0000000000..ddc401f752 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java @@ -0,0 +1,129 @@ +package gtPlusPlus.xmod.forestry.bees.recipe; + +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry; + +public class FR_Gregtech_Recipes { + + private static String rod_Electrum = "stickElectrum"; + private static String rod_LongElectrum = "stickLongElectrum"; + private static String foil_Electrum = "foilElectrum"; + private static String rod_Uranium = "stickUranium"; + private static String rod_LongUranium = "stickLongUranium"; + private static String foil_Uranium235 = "foilUranium235"; + private static ItemStack hiveFrameAccelerated = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameAccelerated); + private static ItemStack hiveFrameMutagenic = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameMutagenic); + private static ItemStack hiveFrameVoid = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameVoid); + private static ItemStack hiveFrameBusy = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameBusy); + + private static ItemStack hiveFrameCocoa = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCocoa); + private static ItemStack hiveFrameCaged = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameCaged); + private static ItemStack hiveFrameSoul = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSoul); + private static ItemStack hiveFrameClay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameClay); + private static ItemStack hiveFrameNova = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameNova); + + private static ItemStack hiveFrameImpregnated = ItemUtils.getItemStackFromFQRN("Forestry:frameImpregnated", 1); + private static ItemStack blockSoulSand = new ItemStack(Blocks.soul_sand, 1); + private static ItemStack blockIronBars = new ItemStack (Blocks.iron_bars, 1); + private static ItemStack itemClayDust = new ItemStack(Items.clay_ball, 1); + private static ItemStack itemCocoaBeans = new ItemStack(Items.dye, 1, 3); + + private static ItemStack hiveFrameDecay = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameDecay); + private static ItemStack hiveFrameSlow = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameSlow); + private static ItemStack hiveFrameStalilize = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameStalilize); + private static ItemStack hiveFrameArborist = ItemUtils.getSimpleStack(FR_ItemRegistry.hiveFrameArborist); + + public static void registerItems(){ + //Magic Bee Like Frames + RecipeUtils.addShapedGregtechRecipe( + rod_LongElectrum, rod_Electrum, rod_LongElectrum, + rod_LongElectrum, foil_Electrum, rod_LongElectrum, + rod_Electrum, rod_Electrum, rod_Electrum, + hiveFrameAccelerated); + + RecipeUtils.addShapedGregtechRecipe( + rod_LongUranium, rod_Uranium, rod_LongUranium, + rod_LongUranium, foil_Uranium235, rod_LongUranium, + rod_Uranium, rod_Uranium, rod_Uranium, + hiveFrameMutagenic); + if (!CORE.GTNH) { + RecipeUtils.addShapedGregtechRecipe( + "stickLongThaumium", "stickThaumium", "stickLongThaumium", + "stickLongThaumium", ItemUtils.getSimpleStack(Items.ender_pearl), "stickLongThaumium", + "stickThaumium", "stickThaumium", "stickThaumium", + hiveFrameVoid); + } + else { + if (LoadedMods.MagicBees) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[] {hiveFrameVoid}, ItemUtils.getCorrectStacktype("MagicBees:frameOblivion", 1)); + } + } + RecipeUtils.addShapedGregtechRecipe( + "stickLongBlueSteel", "stickBlueSteel", "stickLongBlueSteel", + "stickLongBlueSteel", ItemUtils.getSimpleStack(Items.nether_star), "stickLongBlueSteel", + "stickBlueSteel", "stickBlueSteel", "stickBlueSteel", + hiveFrameBusy); + + if (!LoadedMods.ExtraBees){ + //Extra Bee Like Frames + RecipeUtils.addShapedRecipe( + null, itemCocoaBeans, null, + itemCocoaBeans, hiveFrameImpregnated, itemCocoaBeans, + null, itemCocoaBeans, null, + hiveFrameCocoa); + + RecipeUtils.addShapedRecipe( + hiveFrameImpregnated, blockIronBars, null, + null, null, null, + null, null, null, + hiveFrameCaged); + + RecipeUtils.addShapedRecipe( + hiveFrameImpregnated, blockSoulSand, null, + null, null, null, + null, null, null, + hiveFrameSoul); + + RecipeUtils.addShapedRecipe( + null, itemClayDust, null, + itemClayDust, hiveFrameImpregnated, itemClayDust, + null, itemClayDust, null, + hiveFrameClay); + } + + // Frame Items added by bartimaeusnek + RecipeUtils.addShapedGregtechRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1), + ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1),foil_Electrum,ItemUtils.getItemStackOfAmountFromOreDict("stickLongTumbaga", 1), + ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1),ItemUtils.getItemStackOfAmountFromOreDict("stickTumbaga", 1), + hiveFrameSlow); + + RecipeUtils.addShapedGregtechRecipe( + "stickLongWroughtIron","stickWroughtIron","stickLongWroughtIron", + "stickLongWroughtIron","foilZinc","stickLongWroughtIron", + "stickWroughtIron","stickWroughtIron","stickWroughtIron", + hiveFrameDecay); + + RecipeUtils.addShapedGregtechRecipe( + "stickLongOsmiridium","stickOsmiridium","stickLongOsmiridium", + "stickLongOsmiridium","foilOsmiridium","stickLongOsmiridium", + "stickOsmiridium","stickOsmiridium","stickOsmiridium", + hiveFrameStalilize); + + RecipeUtils.addShapedGregtechRecipe( + "stickLongWoodSealed","stickWoodSealed","stickLongWoodSealed", + "stickLongWoodSealed",Items.paper,"stickLongWoodSealed", + "stickWoodSealed","stickWoodSealed","stickWoodSealed", + hiveFrameArborist); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java new file mode 100644 index 0000000000..9b3424ef08 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.tileentities; + +import java.util.*; + +import cpw.mods.fml.common.Optional; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; + +import buildcraft.api.statements.ITriggerExternal; +import forestry.api.apiculture.*; +import forestry.apiculture.ApiaryBeeListener; +import forestry.apiculture.ApiaryBeeModifier; +import forestry.apiculture.IApiary; +import forestry.apiculture.inventory.IApiaryInventory; +import forestry.apiculture.inventory.InventoryApiary; +import forestry.apiculture.tiles.TileBeeHousingBase; +import forestry.apiculture.trigger.ApicultureTriggers; +import gtPlusPlus.xmod.forestry.bees.gui.ContainerBeeHouse; +import gtPlusPlus.xmod.forestry.bees.gui.GuiBeeHouse; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileDenseBeeHouse extends TileBeeHousingBase implements IApiary { + private final IBeeModifier beeModifier = new ApiaryBeeModifier(); + private final IBeeListener beeListener = new ApiaryBeeListener(this); + private final InventoryApiary inventory = new InventoryApiary(getAccessHandler()); + + public TileDenseBeeHouse() { + super("apiary2"); + setInternalInventory(inventory); + } + + @Override + public IBeeHousingInventory getBeeInventory() { + return inventory; + } + + @Override + public IApiaryInventory getApiaryInventory() { + return inventory; + } + + @Override + public Collection getBeeModifiers() { + List beeModifiers = new ArrayList<>(); + + beeModifiers.add(beeModifier); + + for (IHiveFrame frame : inventory.getFrames()) { + beeModifiers.add(frame.getBeeModifier()); + } + + return beeModifiers; + } + + @Override + public Iterable getBeeListeners() { + return Collections.singleton(beeListener); + } + + /* ITRIGGERPROVIDER */ + @Optional.Method(modid = "BuildCraftAPI|statements") + @Override + public Collection getExternalTriggers(ForgeDirection side, TileEntity tile) { + LinkedList res = new LinkedList<>(); + res.add(ApicultureTriggers.missingQueen); + res.add(ApicultureTriggers.missingDrone); + res.add(ApicultureTriggers.noFrames); + return res; + } + + @Override + public Object getGui(EntityPlayer player, int data) { + ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true); + return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY); + } + + @Override + public Object getContainer(EntityPlayer player, int data) { + return new ContainerBeeHouse(player.inventory, this, true); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java b/src/main/java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java new file mode 100644 index 0000000000..d5c7a7e4e5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/galacticraft/HANDLER_GalactiCraft.java @@ -0,0 +1,34 @@ +package gtPlusPlus.xmod.galacticraft; + +import gtPlusPlus.core.lib.LoadedMods; + +public class HANDLER_GalactiCraft { + + //private static final HashMap mSystemsCache = new HashMap(); + + public static void preInit(){ + if (LoadedMods.GalacticraftCore){ + //mSystemsCache.put("HD10180", new SystemHD10180()); + /*for (BaseSolarSystem solar : mSystemsCache.values()) { + Logger.SPACE("Running 'pre-init' for "+solar.mSystemName); + solar.preInit(); + }*/ + } + } + + public static void init(){ + if (LoadedMods.GalacticraftCore){ + /*for (BaseSolarSystem solar : mSystemsCache.values()) { + Logger.SPACE("Running 'init' for "+solar.mSystemName); + solar.init(); + }*/ + } + } + + public static void postInit(){ + if (LoadedMods.GalacticraftCore){ + + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java b/src/main/java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java new file mode 100644 index 0000000000..3b59b58cab --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/galacticraft/handler/HandlerTooltip_GC.java @@ -0,0 +1,83 @@ +package gtPlusPlus.xmod.galacticraft.handler; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.LinkedHashMap; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import gtPlusPlus.core.item.chemistry.RocketFuels; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.asm.AsmConfig; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.fluids.Fluid; + +public class HandlerTooltip_GC { + + private static Item mItemBlock; + private static Block mBlock; + private static Class oMainClass; + private static Class oFuelLoaderClass; + private static HashMap mFuelNames; + + static { + mFuelNames = new LinkedHashMap(); + } + + @SubscribeEvent + public void onItemTooltip(ItemTooltipEvent event) { + if (LoadedMods.GalacticraftCore && AsmConfig.enableGcFuelChanges) { + + if (mBlock == null) { + try { + Class GCBlocks = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.blocks.GCBlocks"); + if (GCBlocks != null) { + oMainClass = GCBlocks; + + Class GCFuelLoader = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.blocks.BlockFuelLoader"); + + if (GCFuelLoader != null) { + oFuelLoaderClass = GCFuelLoader; + } + + Field aField = ReflectionUtils.getField(oMainClass, "fuelLoader"); + if (aField != null) { + Block aBlock = (Block) aField.get(null); + if (aBlock != null) { + mBlock = aBlock; + mItemBlock = Item.getItemFromBlock(mBlock); + } + } + } + } catch (Throwable t) { + } + } + if (mFuelNames == null) { + mFuelNames = new LinkedHashMap(); + } + + if (mFuelNames.isEmpty()) { + for (int aMapKey : RocketFuels.mValidRocketFuels.keySet()) { + Fluid aFuel = RocketFuels.mValidRocketFuels.get(aMapKey); + if (aFuel != null) { + mFuelNames.put(aMapKey, aFuel.getLocalizedName()); + } + } + } + if (mItemBlock != null && !mFuelNames.isEmpty()) { + Item aTempItem = event.itemStack.getItem(); + Block aTempBlock = Block.getBlockFromItem(aTempItem); + if (aTempItem == mItemBlock || oFuelLoaderClass.isInstance(aTempBlock) || event.itemStack.getUnlocalizedName().toLowerCase().contains("fuelloader")) { + for (int aMapKey : mFuelNames.keySet()) { + String aFuel = mFuelNames.get(aMapKey); + if (aFuel != null) { + event.toolTip.add("Tier "+(aMapKey+1)+": "+aFuel); + } + } + } + } + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java b/src/main/java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java new file mode 100644 index 0000000000..f237aed335 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/galacticraft/util/GalacticUtils.java @@ -0,0 +1,169 @@ +package gtPlusPlus.xmod.galacticraft.util; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import gregtech.api.enums.Materials; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.chemistry.RocketFuels; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.Entity; +import net.minecraftforge.fluids.FluidStack; + +public class GalacticUtils { + + static final private Class aTieredRocket; + static final private Class aLandingPad; + static final private Class aBuggyPad; + static final private Class aIDockable; + static final private Class aIFuelable; + static final private Method getRocketTier; + static final private Method getRocket; + static final private Method getBuggy; + + static { + Class a1, a2, a3, a4, a5; + Method m1, m2, m3; + try { + a1 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.api.prefab.entity.EntityTieredRocket"); + a2 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.tile.TileEntityLandingPad"); + a3 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.tile.TileEntityBuggyFueler"); + a4 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.api.entity.IDockable"); + a5 = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.api.entity.IFuelable"); + m1 = ReflectionUtils.getMethod(a1, "getRocketTier"); + m2 = ReflectionUtils.getMethod(a2, "getDockedEntity"); + m3 = ReflectionUtils.getMethod(a3, "getDockedEntity"); + } + catch (Throwable t) { + a1 = null; + a2 = null; + a3 = null; + a4 = null; + a5 = null; + m1 = null; + m2 = null; + m3 = null; + } + aTieredRocket = a1; + aLandingPad = a2; + aBuggyPad = a3; + aIDockable = a4; + aIFuelable = a5; + getRocketTier = m1; + getRocket = m2; + getBuggy = m3; + if (a1 != null && a2 != null && a3 != null && a4 != null && a5 != null && m1 != null && m2 != null && m3 != null) { + Logger.SPACE("Successfully relfected into 5 classes and 3 methods."); + } + else { + Logger.SPACE("Failed to relfect into Galacticraft classes and methods."); + if (a1 == null) { + Logger.SPACE("micdoodle8.mods.galacticraft.api.prefab.entity.EntityTieredRocket was null.."); + } + if (a2 == null) { + Logger.SPACE("micdoodle8.mods.galacticraft.core.tile.TileEntityLandingPad was null.."); + } + if (a3 == null) { + Logger.SPACE("micdoodle8.mods.galacticraft.core.tile.TileEntityBuggyFueler was null.."); + } + if (a4 == null) { + Logger.SPACE("micdoodle8.mods.galacticraft.api.entity.IDockable was null.."); + } + if (a5 == null) { + Logger.SPACE("micdoodle8.mods.galacticraft.api.entity.IFuelable was null.."); + } + if (m1 == null) { + Logger.SPACE("getRocketTier was null.."); + } + if (m2 == null) { + Logger.SPACE("getDockedEntity was null.."); + } + if (m3 == null) { + Logger.SPACE("getDockedEntity(buggy) was null.."); + } + } + } + + + public static int getRocketTier(Entity aEntity) { + if (aTieredRocket.isInstance(aEntity)) { + if (getRocketTier != null) { + try { + return (int) getRocketTier.invoke(aEntity, new Object[] {}); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + } + return -1; + } + + public static int getRocketTier(Object aEntity) { + if (aIFuelable.isInstance(aEntity)) { + if (aLandingPad.isInstance(aEntity)) { + Object rocket; + try { + rocket = getRocket.invoke(aLandingPad, new Object[] {}); + if (aIDockable.isInstance(rocket) && rocket != null) { + return getRocketTier((Entity) rocket); + } + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + else if (aBuggyPad.isInstance(aEntity)) { + Object buggy; + try { + buggy = getBuggy.invoke(aBuggyPad, new Object[] {}); + if (aIDockable.isInstance(buggy) && buggy != null) { + return 0; + } + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + } + return -1; + } + + public static boolean isFuelValidForTier(int aTier, FluidStack aFuel) { + FluidStack aValidForThisTier = getValidFuelForTier(aTier); + if (aFuel.isFluidEqual(aValidForThisTier)) { + return true; + } + return false; + } + + + + public static FluidStack getValidFuelForTier(Entity aEntity) { + if (aTieredRocket.isInstance(aEntity)) { + return getValidFuelForTier(getRocketTier(aEntity)); + } + else { + Logger.SPACE("Failed to get valid rocket fuel for "+aEntity.getClass().getCanonicalName()); + return getValidFuelForTier(0); + } + } + + public static FluidStack getValidFuelForTier(int aTier) { + if (aTier > 0 && aTier <= 2) { + return FluidUtils.getFluidStack(RocketFuels.RP1_Plus_Liquid_Oxygen, 1000); + } + else if (aTier >= 3 && aTier <= 5) { + return FluidUtils.getFluidStack(RocketFuels.Dense_Hydrazine_Mix, 1000); + } + else if (aTier >= 6 && aTier <= 7) { + return FluidUtils.getFluidStack(RocketFuels.Monomethylhydrazine_Plus_Nitric_Acid, 1000); + } + else if (aTier >= 8 && aTier <= 10) { + return FluidUtils.getFluidStack(RocketFuels.Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide, 1000); + } + else { + if (aTier == 0) { + return Materials.Fuel.getFluid(1000); + } + return null; + } + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java new file mode 100644 index 0000000000..a375f77cda --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -0,0 +1,612 @@ +package gtPlusPlus.xmod.gregtech; + +import static gtPlusPlus.core.recipe.common.CI.bits; +import static gtPlusPlus.core.util.minecraft.MaterialUtils.getMaterialName; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_ModHandler.RecipeBits; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.helpers.GregtechPlusPlus_API.Multiblock_API; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.minecraft.multi.NoEUBonusMultiBehaviour; +import gtPlusPlus.api.objects.minecraft.multi.NoOutputBonusMultiBehaviour; +import gtPlusPlus.api.objects.minecraft.multi.NoSpeedBonusMultiBehaviour; +import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia; +import gtPlusPlus.core.handler.COMPAT_HANDLER; +import gtPlusPlus.core.handler.OldCircuitHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.core.util.reflect.AddGregtechRecipe; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.everglades.gen.gt.WorldGen_GT; +import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; +import gtPlusPlus.xmod.gregtech.api.world.GTPP_Worldgen; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import gtPlusPlus.xmod.gregtech.loaders.Gregtech_Blocks; +import gtPlusPlus.xmod.gregtech.loaders.ProcessingAngleGrinder; +import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricButcherKnife; +import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricLighter; +import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricSnips; +import gtPlusPlus.xmod.gregtech.loaders.ProcessingToolHeadChoocher; +import gtPlusPlus.xmod.gregtech.loaders.misc.AddCustomMachineToPA; +import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_AlgaeFarm; +import gtPlusPlus.xmod.gregtech.recipes.RecipesToRemove; +import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits; +import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechNitroDieselFix; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class HANDLER_GT { + + public static GT_Config mMaterialProperties = null; + + public static GTPP_Config sCustomWorldgenFile = null; + public static final List sWorldgenListEverglades = new ArrayList(); + public static final List sWorldgenListAustralia = new ArrayList(); + public static final List sCustomWorldgenList = new ArrayList(); + public static GT_MetaGenerated_Tool sMetaGeneratedToolInstance; + + public static void preInit(){ + + if (mMaterialProperties != null){ + GT_Materials.init(mMaterialProperties); + } + + if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ + OldCircuitHandler.preInit(); + } + + GregtechFluidHandler.run(); + } + + public static void init(){ + + //Load General Blocks and set up some Basic Meta Tile Entity states + Gregtech_Blocks.run(); + + //Add Custom Pipes, Wires and Cables. + GregtechConduits.run(); + + //Register Tile Entities + COMPAT_HANDLER.registerGregtechMachines(); + + + //Only loads if the config option is true (default: true) + if (CORE.ConfigSwitches.enableSkookumChoochers){ + sMetaGeneratedToolInstance= MetaGeneratedGregtechTools.getInstance(); + } + + if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ + OldCircuitHandler.init(); + } + + //Generates recipes for all gregtech smelting and alloy smelting combinations. + //RecipeGen_BlastSmelterGT.generateRecipes(); + //new RecipeGen_BlastSmelterGT_Ex(); + + } + + public static void postInit(){ + + //Only loads if the config option is true (default: true) + if (CORE.ConfigSwitches.enableSkookumChoochers){ + new ProcessingToolHeadChoocher().run(); + } + new ProcessingAngleGrinder().run(); + new ProcessingElectricSnips().run(); + new ProcessingElectricButcherKnife().run(); + new ProcessingElectricLighter().run(); + + if (CORE.ConfigSwitches.enableNitroFix){ + GregtechNitroDieselFix.run(); + } + + if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ + OldCircuitHandler.postInit(); + } + + // Register custom singles to the PA + AddCustomMachineToPA.register(); + + + // Register the No-Bonus Special Behaviour. + Multiblock_API.registerSpecialMultiBehaviour(new NoOutputBonusMultiBehaviour()); + Multiblock_API.registerSpecialMultiBehaviour(new NoSpeedBonusMultiBehaviour()); + Multiblock_API.registerSpecialMultiBehaviour(new NoEUBonusMultiBehaviour()); + + //Register some custom recipe maps for any enabled multiblocks. + //MultiblockRecipeMapHandler.run(); + + if (GregtechItemList.Circuit_BioRecipeSelector.hasBeenSet()) { + for (int i = 1; i <= 24; i++) { + GregTech_API.registerConfigurationCircuit(CI.getNumberedBioCircuit(i), 0); + } + } + + if (GregtechItemList.Circuit_T3RecipeSelector.hasBeenSet()) { + for (int i = 1; i <= 24; i++) { + GregTech_API.registerConfigurationCircuit(CI.getNumberedAdvancedCircuit(i), 3); + } + } + } + + public static void onLoadComplete(FMLLoadCompleteEvent event) { + removeCrudeTurbineRotors(); + //cleanAssemblyLineRecipeMap(); + if (ConfigSwitches.enableHarderRecipesForHighTierCasings) { + removeOldHighTierCasingRecipes(); + } + RecipesToRemove.go(); + convertPyroToCokeOven(); + Meta_GT_Proxy.fixIC2FluidNames(); + RecipeLoader_AlgaeFarm.generateRecipes(); + } + + public static void addNewOrePrefixes() { + for (CustomOrePrefix aPrefixTest : CustomOrePrefix.values()) { + Logger.INFO("Adding "+aPrefixTest.name()+" to OrePrefixes Enum."); + Logger.INFO("Injecting: "+aPrefixTest.addToEnum()); + } + } + + private static void convertPyroToCokeOven() { + if (ReflectionUtils.doesFieldExist(GT_Recipe.GT_Recipe_Map.class, "sPyrolyseRecipes")) { + int aCount = 0; + GT_Recipe_Map aMap = StaticFields59.getPyrolyseRecipeMap(); + if (aMap != null) { + for (GT_Recipe g : aMap.mRecipeList) { + if (AddGregtechRecipe.importPyroRecipe(g)) { + aCount++; + } + } + Logger.INFO("Converted "+aCount+" Pyrolyse recipes into Industrial Coke Oven recipes."); + } + } + } + + private static GT_Recipe replaceItemInRecipeWithAnother(GT_Recipe aRecipe, ItemStack aExisting, ItemStack aNewItem) { + ItemStack[] aInputItemsCopy = aRecipe.mInputs; + String aOutputName = ItemUtils.getItemName(aRecipe.mOutputs[0]); + boolean aDidChange = false; + Logger.INFO("Attempting to Modify Recipe for "+aOutputName); + for (int i=0;i> aDataToModify = new AutoMap>(); + + + Outer :for (final GT_Recipe r : GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList) { + + if (r != null && r.mOutputs != null && r.mOutputs.length > 0) { + + GT_Recipe aOldRecipeCopy = r; + GT_Recipe aNewRecipe = r.copy(); + + //Casings + Inner : for (ItemStack aCasingObject : aCasings) { + if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasingObject)) { + String aOutputName = ItemUtils.getItemName(aOldRecipeCopy.mOutputs[0]); + Logger.INFO("Attempting to Modify Assembly Recipe for "+aOutputName); + //Replace Chrome + if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_LUV)) { + aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 1), ELEMENT.getInstance().SELENIUM.getPlate(1)); + aDataToModify.put(new Pair(r, aNewRecipe)); + aUpdateCount++; + continue Outer; + } + //Replace Iridium + else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_ZPM)) { + aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateIridium", 1), CI.getPlate(aTier_ZPM, 1)); + aDataToModify.put(new Pair(r, aNewRecipe)); + aUpdateCount++; + continue Outer; + } + //Replace Osmium + else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_UV)) { + aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateOsmium", 1), CI.getPlate(aTier_UV, 1)); + aDataToModify.put(new Pair(r, aNewRecipe)); + aUpdateCount++; + continue Outer; + } + //else if (aOldRecipeCopy.mOutputs[0] == aCasing_LUV) { + // aOldRecipeCopy = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 8), CI.getPlate(aTier_MAX, 8)); + // updateRecipeMap(aOldRecipeCopy, aNewRecipe, GT_Recipe.GT_Recipe_Map.sAssemblerRecipes); + //} + else { + continue Inner; + } + } + } + + //Hulls + Inner : for (ItemStack aHullObject : aHulls) { + if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHullObject)) { + String aOutputName = ItemUtils.getItemName(aOldRecipeCopy.mOutputs[0]); + Logger.INFO("Attempting to Modify Assembly Recipe for "+aOutputName); + //Replace Chrome + if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_LUV)) { + aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 1), ELEMENT.getInstance().SELENIUM.getPlate(1)); + aDataToModify.put(new Pair(r, aNewRecipe)); + aUpdateCount++; + continue Outer; + } + //Replace Iridium + else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_ZPM)) { + aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateIridium", 1), CI.getPlate(aTier_ZPM, 1)); + aDataToModify.put(new Pair(r, aNewRecipe)); + aUpdateCount++; + continue Outer; + } + //Replace Osmium + else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_UV)) { + aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateOsmium", 1), CI.getPlate(aTier_UV, 1)); + aDataToModify.put(new Pair(r, aNewRecipe)); + aUpdateCount++; + continue Outer; + } + //else if (aOldRecipeCopy.mOutputs[0] == aHull_LUV) { + // aOldRecipeCopy = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 8), CI.getPlate(aTier_MAX, 8)); + // updateRecipeMap(aOldRecipeCopy, aNewRecipe, GT_Recipe.GT_Recipe_Map.sAssemblerRecipes); + //} + else { + continue Inner; + } + } + } + } + } + + Logger.INFO("There is "+aUpdateCount+" recipes flagged for update."); + + if (aUpdateCount > 0) { + for (Pair g : aDataToModify) { + updateRecipeMap(g.getKey(), g.getValue(), GT_Recipe.GT_Recipe_Map.sAssemblerRecipes); + } + Logger.INFO("Modified "+aUpdateCount+" recipes."); + } + + + + Logger.INFO("Adding new Shaped recipes for Casings."); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_LuV.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', ELEMENT.getInstance().SELENIUM.getPlate(1)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_ZPM.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', CI.getPlate(aTier_ZPM, 1)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_UV.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', CI.getPlate(aTier_UV, 1)}); + //GT_ModHandler.addCraftingRecipe(ItemList.Casing_MAX.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', OrePrefixes.plate.get(Materials.Neutronium)}); + + if (!aHardCasings) { + Logger.INFO("Adding new easy Shaped recipes for Hulls."); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_LuV, 'C', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium)}); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, + new Object[]{"CMC", 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah)}); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_UV, 'C', + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy)}); + /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_MAX, 'C', + OrePrefixes.wireGt01.get(Materials.Superconductor)});*/ + } + else { + + + Materials aPolytetrafluoroethylene = MaterialUtils.getMaterial("Polytetrafluoroethylene", "Plastic"); + + Logger.INFO("Adding new hard Shaped recipes for Hulls."); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, + new Object[]{"PHP", "CMC", 'M', ItemList.Casing_LuV, 'C', + OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'H', + ELEMENT.getInstance().SELENIUM.getPlate(1), 'P', OrePrefixes.plate.get(Materials.Plastic)}); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, + new Object[]{"PHP", "CMC", 'M', ItemList.Casing_ZPM, 'C', + OrePrefixes.cableGt01.get(Materials.Naquadah), 'H', + CI.getPlate(aTier_ZPM, 1), 'P', + OrePrefixes.plate.get(aPolytetrafluoroethylene)}); + GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, + new Object[]{"PHP", "CMC", 'M', ItemList.Casing_UV, 'C', + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), 'H', + CI.getPlate(aTier_UV, 1), 'P', + OrePrefixes.plate.get(aPolytetrafluoroethylene)}); + /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1), + RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, + new Object[]{"PHP", "CMC", 'M', ItemList.Casing_MAX, 'C', + OrePrefixes.wireGt01.get(Materials.Superconductor), 'H', + OrePrefixes.plate.get(Materials.Neutronium), 'P', + OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)});*/ + } + + + + //Casings + + /*GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), + ItemList.Casing_LuV.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), + ItemList.Casing_ZPM.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), + ItemList.Casing_UV.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), + ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), + ItemList.Casing_MAX.get(1), 50, 16); */ + + + + //Hulls + + //Hard Hulls + /*GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), + ItemList.Casing_LuV.get(1), Materials.Plastic.getMolten(288L), + ItemList.Hull_LuV.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), + ItemList.Casing_ZPM.get(1), Materials.Polytetrafluoroethylene.getMolten(288L), + ItemList.Hull_ZPM.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), + ItemList.Casing_UV.get(1), Materials.Polytetrafluoroethylene.getMolten(288L), + ItemList.Hull_UV.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L), + ItemList.Casing_MAX.get(1), Materials.Polytetrafluoroethylene.getMolten(288L), + ItemList.Hull_MAX.get(1), 50, 16);*/ + + //Easy Hulls + /*GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L), + ItemList.Casing_LuV.get(1), ItemList.Hull_LuV.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L), + ItemList.Casing_ZPM.get(1), ItemList.Hull_ZPM.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L), + ItemList.Casing_UV.get(1), ItemList.Hull_UV.get(1), 50, 16); + GT_Values.RA.addAssemblerRecipe( + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L), + ItemList.Casing_MAX.get(1), ItemList.Hull_MAX.get(1), 50, 16);*/ + } + + private static int removeCrudeTurbineRotors() { + int aRemoved = 0; + int CUT = CORE.turbineCutoffBase; + Item aU; + Collection aAssRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList; + //170, 172, 174, 176 + if (aAssRecipes.size() > 0 && (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH)) { + recipe: for (GT_Recipe aG : aAssRecipes) { + if (aG.mOutputs != null && aG.mOutputs.length > 0) { + outputs: for (ItemStack aI : aG.mOutputs) { + if (aI == null) { + continue; + } + aU = aI.getItem(); + if (aU == null) { + continue; + } + if (aU instanceof GT_MetaGenerated_Tool_01) { + int aMeta = aI.getItemDamage(); + //Logger.INFO("Found assembler recipe outputting a GT Tool with a meta value of "+aMeta); + if (aMeta >= 170 && aMeta <= 176) { + //Found a Turbine + int aCutoff = aMeta == 170 ? CUT : (aMeta == 172 ? CUT*2 : (aMeta == 174 ? CUT*3 : CUT*4)); + String aType = aMeta == 170 ? "Small " : (aMeta == 172 ? "" : (aMeta == 174 ? "Large " : "Huge ")); + Materials aMainMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(aI); + Materials aSecondaryMaterial = GT_MetaGenerated_Tool.getSecondaryMaterial(aI); + long rotorDurabilityMax = GT_MetaGenerated_Tool.getToolMaxDamage(aI); + //Logger.INFO("Found "+aType+"Turbine made out of "+getMaterialName(aMainMaterial)+", using "+getMaterialName(aSecondaryMaterial)); + if (rotorDurabilityMax < aCutoff) { + Logger.WARNING("[Turbine Cleanup] "+getMaterialName(aMainMaterial)+" "+aType+"Turbines have "+rotorDurabilityMax+", which is below the cutoff durability of "+aCutoff+", disabling."); + aG.mEnabled = false; + aG.mHidden = true; + aG.mCanBeBuffered = false; + aRemoved++; + } + else { + break outputs; + } + + } + else { + continue outputs; + } + } + else { + continue outputs; + } + } + } + else { + continue recipe; + } + } + } + + Logger.INFO("Removed "+aRemoved+" useless Turbines."); + + return aRemoved; + } + + /** + * Should clean out any invalid Assembly Line recipes, if the map actually exists. + * Prevents NPE's being thrown by GT's AL handler. (Fucking Annoying) + * @return - Amount of Recipes removed, which were invalid in some way. + */ + private static int cleanAssemblyLineRecipeMap() { + GT_Recipe_Map g = StaticFields59.sAssemblylineVisualRecipes; + if (g == null) { + return 0; + } + else { + AutoMap aNewMap = new AutoMap(); + AutoMap aBadRecipeTempMap = new AutoMap(); + for (GT_Recipe r : g.mRecipeList) { + if (r != null) { + if (r.mOutputs == null || r.mOutputs.length == 0 || r.mOutputs[0] == null) { + aBadRecipeTempMap.put(r.copy()); + continue; + } + else { + aNewMap.put(r.copy()); + } + } + } + if (aNewMap.size() > 0) { + g.mRecipeList.clear(); + for (GT_Recipe i : aNewMap) { + g.add(i); + } + } + if (aBadRecipeTempMap.size() > 0) { + Logger.INFO("Found "+aBadRecipeTempMap.size()+" bad Assembly Line Recipes, attempting to dump all data about them."); + Logger.INFO("This data should be given to the mod author for the recipe in question."); + for (GT_Recipe i : aBadRecipeTempMap) { + if (i == null) { + Logger.INFO("Found NULL recipe. Impossible to determine who added this one. Please Report to Alkalus on Github."); + } + else { + if (i.mOutputs == null || i.mOutputs.length == 0 || i.mOutputs[0] == null) { + Logger.INFO("Found recipe with NULL output array, this will cause some issues. Attempting to determine other info about recipe."); + if (i.mInputs != null && i.mInputs.length > 0) { + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(i.mInputs)); + } + else { + Logger.INFO("Recipe had no valid inputs."); + } + Logger.INFO("Time: "+i.mDuration); + Logger.INFO("EU/T: "+i.mEUt); + Logger.INFO("Special: "+i.mSpecialValue); + } + else { + Logger.INFO("Found bad recipe, Attempting to determine other info."); + if (i.mInputs != null && i.mInputs.length > 0) { + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(i.mInputs)); + } + else { + Logger.INFO("Recipe had no valid inputs."); + } + if (i.mOutputs != null && i.mOutputs.length > 0) { + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(i.mOutputs)); + } + else { + Logger.INFO("Recipe had no valid outputs."); + } + Logger.INFO("Time: "+i.mDuration); + Logger.INFO("EU/T: "+i.mEUt); + Logger.INFO("Special: "+i.mSpecialValue); + } + } + } + } + else { + Logger.INFO("No bad Assembly Line recipes found, this is great news!"); + } + return aBadRecipeTempMap.size(); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java new file mode 100644 index 0000000000..4ec4589c03 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.gregtech.api.energy; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +/** + * Provides the ability to store energy on the implementing item. + * + * The item should have a maximum damage of 13. + */ +public interface IC2ElectricItem { + /** + * Determine if the item can be used in a machine or as an armor part to supply energy. + * + * @return Whether the item can supply energy + */ + boolean canProvideEnergy(ItemStack itemStack); + + /** + * Get the item ID to use for a charge energy greater than 0. + * + * @return Item ID to use + */ + Item getChargedItem(ItemStack itemStack); + + /** + * Get the item ID to use for a charge energy of 0. + * + * @return Item ID to use + */ + Item getEmptyItem(ItemStack itemStack); + + /** + * Get the item's maximum charge energy in EU. + * + * @return Maximum charge energy + */ + double getMaxCharge(ItemStack itemStack); + + /** + * Get the item's tier, lower tiers can't send energy to higher ones. + * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. + * + * @return Item's tier + */ + int getTier(ItemStack itemStack); + + /** + * Get the item's transfer limit in EU per transfer operation. + * + * @return Transfer limit + */ + double getTransferLimit(ItemStack itemStack); +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java new file mode 100644 index 0000000000..8bf42578cc --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java @@ -0,0 +1,95 @@ +package gtPlusPlus.xmod.gregtech.api.energy; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +/** + * This interface specifies a manager to handle the various tasks for electric items. + * + * The default implementation does the following: + * - store and retrieve the charge + * - handle charging, taking amount, tier, transfer limit, canProvideEnergy and simulate into account + * - replace item IDs if appropriate (getChargedItemId() and getEmptyItemId()) + * - update and manage the damage value for the visual charge indicator + * + * @note If you're implementing your own variant (ISpecialElectricItem), you can delegate to the + * default implementations through ElectricItem.rawManager. The default implementation is designed + * to minimize its dependency on its own constraints/structure and delegates most work back to the + * more atomic features in the gateway manager. + */ +public interface IC2ElectricItemManager { + /** + * Charge an item with a specified amount of energy. + * + * @param itemStack electric item's stack + * @param amount amount of energy to charge in EU + * @param tier tier of the charging device, has to be at least as high as the item to charge + * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() + * @param simulate don't actually change the item, just determine the return value + * @return Energy transferred into the electric item + */ + double charge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean simulate); + + /** + * Discharge an item by a specified amount of energy + * + * @param itemStack electric item's stack + * @param amount amount of energy to discharge in EU + * @param tier tier of the discharging device, has to be at least as high as the item to discharge + * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() + * @param externally use the supplied item externally, i.e. to power something else as if it was a battery + * @param simulate don't actually discharge the item, just determine the return value + * @return Energy retrieved from the electric item + */ + double discharge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean externally, boolean simulate); + + /** + * Determine the charge level for the specified item. + * + * @param itemStack ItemStack containing the electric item + * @return charge level in EU + */ + double getCharge(ItemStack stack); + + /** + * Determine if the specified electric item has at least a specific amount of EU. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * BatPacks are not taken into account. + * + * @param itemStack electric item's stack + * @param amount minimum amount of energy required + * @return true if there's enough energy + */ + boolean canUse(ItemStack stack, double amount); + + /** + * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * + * @param itemStack electric item's stack + * @param amount amount of energy to discharge in EU + * @param entity entity holding the item + * @return true if the operation succeeded + */ + boolean use(ItemStack stack, double amount, EntityLivingBase entity); + + /** + * Charge an item from the BatPack a player is wearing. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * use() already contains this functionality. + * + * @param itemStack electric item's stack + * @param entity entity holding the item + */ + void chargeFromArmor(ItemStack stack, EntityLivingBase entity); + + /** + * Get the tool tip to display for electric items. + * + * @param itemStack ItemStack to determine the tooltip for + * @return tool tip string or null for none + */ + String getToolTip(ItemStack stack); + + // TODO: add tier getter +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java new file mode 100644 index 0000000000..554983c41c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java @@ -0,0 +1,81 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.core.lib.CORE; + +public class CustomGtTextures { + public enum ItemIcons implements IIconContainer, Runnable { + VOID, // The Empty Texture + RENDERING_ERROR, + PUMP, + SKOOKUMCHOOCHER; + + public static final ITexture[] ERROR_RENDERING = new ITexture[]{new GT_RenderedTexture(RENDERING_ERROR)}; + + protected IIcon mIcon, mOverlay; + + private ItemIcons() { + GregTech_API.sGTItemIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return this.mOverlay; + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + "iconsets/" + this); + this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + "iconsets/" + this + "_OVERLAY"); + } + + public static class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon, mOverlay; + protected String mIconName; + + public CustomIcon(final String aIconName) { + this.mIconName = aIconName; + GregTech_API.sGTItemIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return this.mOverlay; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + this.mIconName); + this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + this.mIconName + "_OVERLAY"); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java new file mode 100644 index 0000000000..9647b00578 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomOrePrefix.java @@ -0,0 +1,112 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +import static gregtech.api.enums.GT_Values.B; + +import gregtech.api.enums.OrePrefixes; +import net.minecraftforge.common.util.EnumHelper; + +public enum CustomOrePrefix { + + milled("Milled Ores", "Milled ", " Ore", true, true, false, false, false, false, false, false, false, true, B[3], -1, 64, -1); + + private final String mRegularLocalName; + private final String mLocalizedMaterialPre; + private final String mLocalizedMaterialPost; + private final boolean mIsUnificatable; + private final boolean mIsMaterialBased; + private final boolean mIsSelfReferencing; + private final boolean mIsContainer; + private final boolean mDontUnificateActively; + private final boolean mIsUsedForBlocks; + private final boolean mAllowNormalRecycling; + private final boolean mGenerateDefaultItem; + private final boolean mIsEnchantable; + private final boolean mIsUsedForOreProcessing; + private final int mMaterialGenerationBits; + private final long mMaterialAmount; + private final int mDefaultStackSize; + private final int mTextureindex; + + private OrePrefixes mSelfReference; + + private CustomOrePrefix( + String aRegularLocalName, + String aLocalizedMaterialPre, + String aLocalizedMaterialPost, + boolean aIsUnificatable, + boolean aIsMaterialBased, + boolean aIsSelfReferencing, + boolean aIsContainer, + boolean aDontUnificateActively, + boolean aIsUsedForBlocks, + boolean aAllowNormalRecycling, + boolean aGenerateDefaultItem, + boolean aIsEnchantable, + boolean aIsUsedForOreProcessing, + int aMaterialGenerationBits, + long aMaterialAmount, + int aDefaultStackSize, + int aTextureindex) { + + mRegularLocalName = aRegularLocalName; + mLocalizedMaterialPre = aLocalizedMaterialPre; + mLocalizedMaterialPost = aLocalizedMaterialPost; + mIsUnificatable = aIsUnificatable; + mIsMaterialBased = aIsMaterialBased; + mIsSelfReferencing = aIsSelfReferencing; + mIsContainer = aIsContainer; + mDontUnificateActively = aDontUnificateActively; + mIsUsedForBlocks = aIsUsedForBlocks; + mAllowNormalRecycling = aAllowNormalRecycling; + mGenerateDefaultItem = aGenerateDefaultItem; + mIsEnchantable = aIsEnchantable; + mIsUsedForOreProcessing = aIsUsedForOreProcessing; + mMaterialGenerationBits = aMaterialGenerationBits; + mMaterialAmount = aMaterialAmount; + mDefaultStackSize = aDefaultStackSize; + mTextureindex = aTextureindex; + + } + + public final boolean addToEnum() { + + mSelfReference = EnumHelper.addEnum(OrePrefixes.class, this.name(), + new Class[] { + String.class, + String.class, String.class, boolean.class, + boolean.class, boolean.class, boolean.class, + boolean.class, boolean.class, boolean.class, + boolean.class, boolean.class, boolean.class, + int.class, long.class, int.class, int.class + }, + new Object[] { + mRegularLocalName, + mLocalizedMaterialPre, + mLocalizedMaterialPost, + mIsUnificatable, + mIsMaterialBased, + mIsSelfReferencing, + mIsContainer, + mDontUnificateActively, + mIsUsedForBlocks, + mAllowNormalRecycling, + mGenerateDefaultItem, + mIsEnchantable, + mIsUsedForOreProcessing, + mMaterialGenerationBits, + mMaterialAmount, + mDefaultStackSize, + mTextureindex}); + + return mSelfReference != null; + } + + public static final boolean checkEntryWasAdded(CustomOrePrefix aCustomPrefixObject) { + return aCustomPrefixObject.mSelfReference != null; + } + + public OrePrefixes get() { + return mSelfReference; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java new file mode 100644 index 0000000000..8c814489f2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -0,0 +1,903 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +import static gregtech.api.enums.GT_Values.W; + +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.api.interfaces.GregtechItemContainer; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +/** + * Class containing all non-OreDict Items of GregTech. + */ +public enum GregtechItemList implements GregtechItemContainer { + + /** + * Items + */ + + // Advanced Hazmat Suit + Armour_Hazmat_Advanced_Helmet, + Armour_Hazmat_Advanced_Chest, + Armour_Hazmat_Advanced_Legs, + Armour_Hazmat_Advanced_Boots, + + //Gregtech Machine Parts + Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV, Electric_Motor_MAX, + Electric_Pump_LuV, Electric_Pump_ZPM, Electric_Pump_UV, Electric_Pump_MAX, + Conveyor_Module_LuV, Conveyor_Module_ZPM, Conveyor_Module_UV, Conveyor_Module_MAX, + Electric_Piston_LuV, Electric_Piston_ZPM, Electric_Piston_UV, Electric_Piston_MAX, + Robot_Arm_LuV, Robot_Arm_ZPM, Robot_Arm_UV, Robot_Arm_MAX, + Field_Generator_LuV, Field_Generator_ZPM, Field_Generator_UV, Field_Generator_MAX, + Emitter_LuV, Emitter_ZPM, Emitter_UV, Emitter_MAX, + Sensor_LuV, Sensor_ZPM, Sensor_UV, Sensor_MAX, + + //ULV Components + Electric_Motor_ULV, + Electric_Pump_ULV, + Conveyor_Module_ULV, + Electric_Piston_ULV, + Robot_Arm_ULV, + Field_Generator_ULV, + Emitter_ULV, + Sensor_ULV, + + // Mixed Components + TransmissionComponent_ULV, TransmissionComponent_LV, + TransmissionComponent_MV, TransmissionComponent_HV, + TransmissionComponent_EV, TransmissionComponent_IV, + TransmissionComponent_LuV, TransmissionComponent_ZPM, + TransmissionComponent_UV, TransmissionComponent_MAX, + + //Recipe Circuit + Circuit_BioRecipeSelector, + Circuit_T3RecipeSelector, + + //Circuits + Old_Circuit_Primitive, Old_Circuit_Basic, Old_Circuit_Good, + Old_Circuit_Advanced, Old_Circuit_Data, Old_Circuit_Elite, + Old_Circuit_Master, Old_Tool_DataOrb, Old_Circuit_Ultimate, Old_Tool_DataStick, + Circuit_IV, Circuit_LuV, Circuit_ZPM, + + //Circuit Parts + Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM, + Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM, + Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM, + Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM, + + //Old Style Circuits + Old_Circuit_Board_Basic, Old_Circuit_Board_Advanced, Old_Circuit_Board_Elite, + Old_Circuit_Parts_Crystal_Chip_Elite, Old_Circuit_Parts_Crystal_Chip_Master, Old_Circuit_Parts_Advanced, + Old_Circuit_Parts_Wiring_Basic, Old_Circuit_Parts_Wiring_Advanced, Old_Circuit_Parts_Wiring_Elite, + Old_Empty_Board_Basic, Old_Empty_Board_Elite, + + //Batteries + Battery_RE_EV_Sodium, + Battery_RE_EV_Cadmium, + Battery_RE_EV_Lithium, + + //Shapes for Extruder + Shape_Extruder_WindmillShaft, + Shape_Extruder_SmallGear, + + //Cooked Raisin Toast for ImQ009 + Food_Baked_Raisin_Bread, + + + //Fluid Cells to regulate flows. + Fluid_Cell_1L, Fluid_Cell_16L, + Fluid_Cell_36L, Fluid_Cell_144L, + + //Debug + TESTITEM, + + // Larger Volumetric Flasks + VOLUMETRIC_FLASK_8k, + VOLUMETRIC_FLASK_32k, + + //RTG Fuels + Pellet_RTG_PU238, Pellet_RTG_SR90, + Pellet_RTG_PO210, Pellet_RTG_AM241, + + //Computer Cube + Gregtech_Computer_Cube, + + //Casings for batteries + Battery_Casing_Gem_1, Battery_Casing_Gem_2, + Battery_Casing_Gem_3, Battery_Casing_Gem_4, + + //Custom Batteries + Battery_Gem_1, Battery_Gem_2, + Battery_Gem_3, Battery_Gem_4, + + //Compressed Fusion MK3 + Compressed_Fusion_Reactor, + + //Carbon Materials + NanoTube_Base_Substrate, + NanoTube_Finished, + Carbyne_Tube_Finished, + Carbyne_Sheet_Finished, + + //End Game Laser Engraver Lens + Laser_Lens_WoodsGlass, + Laser_Lens_Special, + + //Bombs + Bomb_Cast, Bomb_Cast_Molten, + Bomb_Cast_Set, Bomb_Cast_Broken, + Bomb_Cast_Mold, + + // Pellet Mold + Pellet_Mold, + + //Charged Items for Tree Farms + Farm_Processor_EV, + Farm_Processor_IV, + Farm_Processor_LuV, + Farm_Processor_ZPM, + Farm_Processor_UV, + + // Upgrade chip for Distillus + Distillus_Upgrade_Chip, + + + // Chips used to nerf my multis via custom behavioural attachments + Chip_MultiNerf_NoOutputBonus, + Chip_MultiNerf_NoSpeedBonus, + Chip_MultiNerf_NoEuBonus, + + // Milling Balls + Milling_Ball_Alumina, + Milling_Ball_Soapstone, + + + //---------------------------------------------------------------------------- + + + + /** + * MultiBlocks + */ + + + // Tier GT++ Casings + GTPP_Casing_ULV, GTPP_Casing_LV, + GTPP_Casing_MV, GTPP_Casing_HV, + GTPP_Casing_EV, GTPP_Casing_IV, + GTPP_Casing_LuV, GTPP_Casing_ZPM, + GTPP_Casing_UV, GTPP_Casing_MAX, + + //IronBlastFurnace Machine_Bronze_BlastFurnace + Machine_Iron_BlastFurnace, + Casing_IronPlatedBricks, + + //Large Centrifuge + Industrial_Centrifuge, + Casing_Centrifuge1, + + // Large Alloy Smelter + Industrial_AlloySmelter, + + //Coke Oven + Industrial_CokeOven, + Casing_CokeOven, + Casing_CokeOven_Coil1, + Casing_CokeOven_Coil2, + + //Bending Maching // Plate Press // Press + Industrial_PlatePress, + Casing_MaterialPress, + + //Matter Fab + Industrial_MassFab, + Casing_MatterGen, + Casing_MatterFab, + + //ABS + Industrial_AlloyBlastSmelter, + Casing_Coil_BlastSmelter, + Casing_BlastSmelter, + + //Industrial Electrolyzer + Industrial_Electrolyzer, + Casing_Electrolyzer, + + //Industrial Maceration Stack + Industrial_MacerationStack, + Casing_MacerationStack, + + //Industrial Wire Factory + Industrial_WireFactory, + Casing_WireFactory, + + //Power sub-station for mass storage. 3 hatches for input and output, whatever voltages you desire. + PowerSubStation, + Casing_Vanadium_Redox, + Casing_Vanadium_Redox_IV, + Casing_Vanadium_Redox_LuV, + Casing_Vanadium_Redox_ZPM, + Casing_Vanadium_Redox_UV, + Casing_Vanadium_Redox_MAX, + Casing_Power_SubStation, + + + //LFTR + ThoriumReactor, + Casing_Reactor_I, + Casing_Reactor_II, + + //Multitank + /*Industrial_MultiTank,*/ + Industrial_MultiTankDense, + Casing_MultitankExterior, + + + //Fission Fuel Refinery + Industrial_FuelRefinery, + Casing_Refinery_External, + Casing_Refinery_Structural, + Casing_Refinery_Internal, + + + //Industrial Sifter + Industrial_Sifter, + Casing_Sifter, + Casing_SifterGrate, + + + //Large Thermal Centrifuge + Industrial_ThermalCentrifuge, + Casing_ThermalCentrifuge, + + + //Cyclotron + COMET_Cyclotron, + Casing_Cyclotron_Coil, + Casing_Cyclotron_External, + + //Thermal Boiler + GT4_Thermal_Boiler, + Casing_ThermalContainment, + + + //Tree Farm + Industrial_TreeFarm, + TreeFarmer_Structural, + Casing_PLACEHOLDER_TreeFarmer, + + + //Fish Pond + Industrial_FishingPond, + Casing_FishPond, + + //Algae + AlgaeFarm_Controller, + + //Chemical Plant + ChemicalPlant_Controller, + + //GT4 autoCrafter + GT4_Multi_Crafter, + Casing_Autocrafter, + + + //industrial Ore-Washer + Industrial_WashPlant, + Casing_WashPlant, + + + //Generator Array + Generator_Array_Controller, + + + //Cutting Factory Controller + Industrial_CuttingFactoryController, + Casing_CuttingFactoryFrame, + + + //Tesla Tower + /*TelsaTower,*/ + Casing_TeslaTower, + + + //Large Extruder + Industrial_Extruder, + Casing_Extruder, + + + //Multi-Machine + Industrial_MultiMachine, + Casing_Multi_Use, + + + //Bedrock Mining Platforms + /*BedrockMiner_MKI, */ + /*BedrockMiner_MKII, */ + /*BedrockMiner_MKIII, */ + Casing_BedrockMiner, + + + //Large Packager + Amazon_Warehouse_Controller, + Casing_AmazonWarehouse, + + + //Advanced GT vanilla Multis + Machine_Adv_BlastFurnace, + Casing_Adv_BlastFurnace, + Machine_Adv_ImplosionCompressor, + Machine_Adv_DistillationTower, + + //Advanced Assembly Line + /*Machine_Adv_AssemblyLine,*/ + + //Advanced Vacuum Freezer + Industrial_Cryogenic_Freezer, + Casing_AdvancedVacuum, + + + //FusionTek MK IV + FusionComputer_UV2, + Casing_Fusion_External, + Casing_Fusion_Internal, + + + //large mixer + Industrial_Mixer, + + + //Naq Reactor + Casing_Naq_Reactor_A, + Casing_Naq_Reactor_B, + Casing_Naq_Reactor_C, + /*Controller_Naq_Reactor, */ + Casing_Containment, + + //Arc Furnace + Industrial_Arc_Furnace, + Casing_Industrial_Arc_Furnace, + + //Solar Tower + /*Industrial_Solar_Tower,*/ + Casing_SolarTower_Structural, + Casing_SolarTower_SaltContainment, + Casing_SolarTower_HeatContainment, + + //Larger Turbines + /*Large_Steam_Turbine, Large_HPSteam_Turbine, */ + Casing_Turbine_Shaft, + Casing_Turbine_LP, Casing_Turbine_HP, + Casing_Turbine_Gas, Casing_Turbine_Plasma, + + // Large Engine + Casing_Reinforced_Engine_Casing, + + //Large Vacuum Furnace + Casing_Vacuum_Furnace, + Controller_Vacuum_Furnace, + + // Large Rocket Engine + Casing_RocketEngine, + Controller_RocketEngine, + + // Large Semi-Fluid + Controller_LargeSemifluidGenerator, + + // IsaMill + Controller_IsaMill, + Casing_IsaMill_Casing, + Casing_IsaMill_Gearbox, + Casing_IsaMill_Pipe, + + // Flotation Cell + Controller_Flotation_Cell, + Casing_Flotation_Cell, + + // Sparge Tower + Controller_Sparge_Tower, + Casing_Sparge_Tower_Exterior, + Casing_Sparge_Tower_Interior, + + // Elemental Duplicator + Controller_ElementalDuplicator, + Casing_ElementalDuplicator, + + // Big Steam Macerator + Controller_SteamMaceratorMulti, + + // Custom Machine Casings + Casing_Machine_Custom_1, + Casing_Machine_Custom_2, + Casing_Machine_Custom_3, + Casing_Machine_Custom_4, + Casing_Machine_Custom_5, + Casing_Machine_Custom_6, + + + //---------------------------------------------------------------------------- + + /** + * Custom hatches/Busses + */ + + //Buffer Dynamos + Hatch_Buffer_Dynamo_ULV, Hatch_Buffer_Dynamo_LV, Hatch_Buffer_Dynamo_MV, Hatch_Buffer_Dynamo_HV, Hatch_Buffer_Dynamo_EV, + Hatch_Buffer_Dynamo_IV, Hatch_Buffer_Dynamo_LuV, Hatch_Buffer_Dynamo_ZPM, Hatch_Buffer_Dynamo_UV, Hatch_Buffer_Dynamo_MAX, + + //Air Intake hatch + Hatch_Air_Intake, + + //XL Turbine Rotor Hatch + /*Hatch_Turbine_Rotor,*/ + + //Standard Turbine Rotor Hatch + Hatch_Input_TurbineHousing, + + //Control Core + Hatch_Control_Core, + + // Milling Ball Bus + Bus_Milling_Balls, + + // Catalyst Bus + Bus_Catalysts, + + //Custom Fluid Hatches + Hatch_Input_Cryotheum, + Hatch_Input_Pyrotheum, + Hatch_Input_Naquadah, + Hatch_Input_Steam, + + //Steam Multi Buses + Hatch_Input_Bus_Steam, + Hatch_Output_Bus_Steam, + + //Elemental Duplicator Data Orb Bus + Hatch_Input_Elemental_Duplicator, + + //RTG Hatch + Hatch_RTG_LV, + Hatch_RTG_MV, + Hatch_RTG_HV, + + //Battery hatches for PSS + Hatch_Input_Battery_MV, + Hatch_Input_Battery_EV, + Hatch_Output_Battery_MV, + Hatch_Output_Battery_EV, + + //Advanced Mufflers + Hatch_Muffler_Adv_LV, Hatch_Muffler_Adv_MV, Hatch_Muffler_Adv_HV, + Hatch_Muffler_Adv_EV, Hatch_Muffler_Adv_IV, Hatch_Muffler_Adv_LuV, + Hatch_Muffler_Adv_ZPM, Hatch_Muffler_Adv_UV, Hatch_Muffler_Adv_MAX, + + //Super Input Busses + Hatch_SuperBus_Input_ULV, Hatch_SuperBus_Input_LV, Hatch_SuperBus_Input_MV, + Hatch_SuperBus_Input_HV, Hatch_SuperBus_Input_EV, Hatch_SuperBus_Input_IV, + Hatch_SuperBus_Input_LuV, Hatch_SuperBus_Input_ZPM, Hatch_SuperBus_Input_UV, + Hatch_SuperBus_Input_MAX, + + //Super Output Busses + Hatch_SuperBus_Output_ULV, Hatch_SuperBus_Output_LV, Hatch_SuperBus_Output_MV, + Hatch_SuperBus_Output_HV, Hatch_SuperBus_Output_EV, Hatch_SuperBus_Output_IV, + Hatch_SuperBus_Output_LuV, Hatch_SuperBus_Output_ZPM, Hatch_SuperBus_Output_UV, + Hatch_SuperBus_Output_MAX, + + + + + //---------------------------------------------------------------------------- + + + + + + /** + * Single Block Tile Entities + */ + + //ULV Generators + Generator_Diesel_ULV, Generator_Gas_Turbine_ULV, Generator_Steam_Turbine_ULV, + + //Crate Box + CrateStorage, + + //Auto TC Research Creator + Thaumcraft_Researcher, + + //Threaded Buffers + Automation_Threaded_SuperBuffer_ULV, Automation_Threaded_SuperBuffer_LV, Automation_Threaded_SuperBuffer_MV, Automation_Threaded_SuperBuffer_HV, Automation_Threaded_SuperBuffer_EV, + Automation_Threaded_SuperBuffer_IV, Automation_Threaded_SuperBuffer_LuV, Automation_Threaded_SuperBuffer_ZPM, Automation_Threaded_SuperBuffer_UV, Automation_Threaded_SuperBuffer_MAX, + + //infinite Items + Infinite_Item_Chest, + + + //Gt4 Workbenches + GT4_Workbench_Bronze, + GT4_Workbench_Advanced, + + + //Geothermal Engines + Geothermal_Engine_EV, + Geothermal_Engine_IV, + Geothermal_Engine_LuV, + + + //Tesseracts + GT4_Tesseract_Generator, + GT4_Tesseract_Terminal, + + + //Advanced Boilers + Boiler_Advanced_LV, + Boiler_Advanced_MV, + Boiler_Advanced_HV, + + + //Fancy Pollution Devices + Pollution_Detector, + Pollution_Cleaner_ULV, Pollution_Cleaner_LV, + Pollution_Cleaner_MV, Pollution_Cleaner_HV, + Pollution_Cleaner_EV, Pollution_Cleaner_IV, + Pollution_Cleaner_LuV, Pollution_Cleaner_ZPM, + Pollution_Cleaner_UV, Pollution_Cleaner_MAX, + + + //Debug machine + Pollution_Creator, + Garbage_Collector_Debug_Machine, + + + //Basically is an automatic Cauldron + SimpleDustWasher_ULV, + SimpleDustWasher_MV, + SimpleDustWasher_EV, + SimpleDustWasher_LuV, + SimpleDustWasher_UV, + + //Solar Tower Reflector + /*Solar_Tower_Reflector,*/ + + //Super Tier Chests + Super_Chest_LV, Super_Chest_MV, Super_Chest_HV, Super_Chest_EV, Super_Chest_IV, + + //Chunkloader + GT_Chunkloader_HV, GT_Chunkloader_ZPM, GT_Chunkloader_IV, + + + //Wireless Chargers + Charger_LV, Charger_MV, Charger_HV, + Charger_EV, Charger_IV, Charger_LuV, + Charger_ZPM, Charger_UV, Charger_MAX, + + + //Tiny Fusion + /*Miniature_Fusion, */ + + + //Component Makers + Machine_LV_Component_Maker, + Machine_MV_Component_Maker, + Machine_HV_Component_Maker, + Machine_EV_Component_Maker, + Machine_IV_Component_Maker, + Machine_LuV_Component_Maker, + Machine_ZPM_Component_Maker, + Machine_UV_Component_Maker, + + // Reactor Processing Unit + ReactorProcessingUnit_IV, + ReactorProcessingUnit_ZPM, + + // Cold Trap + ColdTrap_IV, + ColdTrap_ZPM, + + //Breakers + BreakerBox_ULV, BreakerBox_LV, BreakerBox_MV, + BreakerBox_HV, BreakerBox_EV, BreakerBox_IV, + BreakerBox_LuV, BreakerBox_ZPM, BreakerBox_UV, + BreakerBox_MAX, + + + //Solar Generators + GT_Solar_ULV, GT_Solar_LV, GT_Solar_MV, + GT_Solar_HV, GT_Solar_EV, GT_Solar_IV, + GT_Solar_LuV, GT_Solar_ZPM, GT_Solar_UV, GT_Solar_MAX, + + + //512v Creative Buffer + Energy_Buffer_CREATIVE, + //Variable voltage RF convertor + Energy_Buffer_RF_Convertor, + //Energy Buffers + Energy_Buffer_1by1_ULV, Energy_Buffer_1by1_LV, + Energy_Buffer_1by1_MV, Energy_Buffer_1by1_HV, + Energy_Buffer_1by1_EV, Energy_Buffer_1by1_IV, + Energy_Buffer_1by1_LuV, Energy_Buffer_1by1_ZPM, + Energy_Buffer_1by1_UV, Energy_Buffer_1by1_MAX, + + + //Cobble Generators + Cobble_Generator_ULV, Cobble_Generator_LV, + Cobble_Generator_MV, Cobble_Generator_HV, + Cobble_Generator_EV, Cobble_Generator_IV, + Cobble_Generator_LuV, Cobble_Generator_ZPM, + Cobble_Generator_UV, Cobble_Generator_MAX, + + + //The max Steam condenser + Condensor_MAX, + + + //Player owned Safes + GT_Safe_ULV, GT_Safe_LV, + GT_Safe_MV, GT_Safe_HV, + GT_Safe_EV, GT_Safe_IV, + GT_Safe_LuV, GT_Safe_ZPM, + GT_Safe_UV, GT_Safe_MAX, + + + //Rocket Engines + Rocket_Engine_EV, + Rocket_Engine_IV, + Rocket_Engine_LuV, + + + //GT4 Shelves + GT4_Shelf, GT4_Shelf_Iron, + GT4_Shelf_FileCabinet, GT4_Shelf_Desk, + GT4_Shelf_Compartment, GT4_Shelf_Large, + + + //Hi Amp Transformers + Transformer_HA_LV_ULV, Transformer_HA_MV_LV, Transformer_HA_HV_MV, + Transformer_HA_EV_HV, Transformer_HA_IV_EV, Transformer_HA_LuV_IV, + Transformer_HA_ZPM_LuV, Transformer_HA_UV_ZPM, Transformer_HA_MAX_UV, + + + //Semi-Fluid generators + Generator_SemiFluid_LV, + Generator_SemiFluid_MV, + Generator_SemiFluid_HV, + + + //Advanced Mixer 4x4 + Machine_Advanced_LV_Mixer, Machine_Advanced_MV_Mixer, Machine_Advanced_HV_Mixer, + Machine_Advanced_EV_Mixer, Machine_Advanced_IV_Mixer, Machine_Advanced_LuV_Mixer, + Machine_Advanced_ZPM_Mixer, Machine_Advanced_UV_Mixer, + + + //Block that enables uplink to a superconductor network + SuperConductorInputNode, + + //Heat Pipes + HeatPipe_Tier_1, + HeatPipe_Tier_2, + HeatPipe_Tier_3, + + + //Chemical Dehydrators for nuclear fuels + GT_Dehydrator_MV, GT_Dehydrator_HV, + GT_Dehydrator_EV, GT_Dehydrator_IV, + GT_Dehydrator_LuV, GT_Dehydrator_ZPM, + + + //Fluid Storage Tanks + GT_FluidTank_ULV, GT_FluidTank_LV, + GT_FluidTank_MV, GT_FluidTank_HV, + GT_FluidTank_EV, GT_FluidTank_IV, + GT_FluidTank_LuV, GT_FluidTank_ZPM, + GT_FluidTank_UV, GT_FluidTank_MAX, + + //Tick Accelerators from GTNH + AcceleratorLV, AcceleratorMV, + AcceleratorHV, AcceleratorEV, + AcceleratorIV, AcceleratorLuV, + AcceleratorZPM, AcceleratorUV, + + //GT RTG + RTG, + + //Plasma Tank + /*Plasma_Tank,*/ + + + //---------------------------------------------------------------------------- + + + /** + * Covers + */ + + //Fluid Void Covers + Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV, + + //Item Void Covers + Cover_Overflow_Item_ULV, Cover_Overflow_Item_LV, Cover_Overflow_Item_MV, Cover_Overflow_Item_HV, Cover_Overflow_Item_EV, Cover_Overflow_Item_IV, + + //Fake Hull Covers + FakeMachineCasingPlate_ULV, FakeMachineCasingPlate_LV, + FakeMachineCasingPlate_MV, FakeMachineCasingPlate_HV, + FakeMachineCasingPlate_EV, FakeMachineCasingPlate_IV, + FakeMachineCasingPlate_LuV, FakeMachineCasingPlate_ZPM, + FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX, + + + + + //---------------------------------------------------------------------------- + + ; + + public static final GregtechItemList[] + DYE_ONLY_ITEMS = { + Energy_Buffer_1by1_EV, Energy_Buffer_1by1_EV }; + private ItemStack mStack; + private boolean mHasNotBeenSet = true; + + + @Override + public GregtechItemList set(final Item aItem) { + this.mHasNotBeenSet = false; + if (aItem == null) { + return this; + } + final ItemStack aStack = new ItemStack(aItem, 1, 0); + this.mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public GregtechItemList set(final ItemStack aStack) { + this.mHasNotBeenSet = false; + this.mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public Item getItem() { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(this.mStack)) { + return null; + } + return this.mStack.getItem(); + } + + @Override + public Block getBlock() { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + return getBlockFromStack(this.getItem()); + } + + @Override + public final boolean hasBeenSet() { + return !this.mHasNotBeenSet; + } + + @Override + public boolean isStackEqual(final Object aStack) { + return this.isStackEqual(aStack, false, false); + } + + @Override + public boolean isStackEqual(final Object aStack, final boolean aWildcard, final boolean aIgnoreNBT) { + if (GT_Utility.isStackInvalid(aStack)) { + return false; + } + return GT_Utility.areUnificationsEqual((ItemStack)aStack, aWildcard?this.getWildcard(1):this.get(1), aIgnoreNBT); + } + + public static Block getBlockFromStack(Object aStack) { + if (GT_Utility.isStackInvalid(aStack)) + return Blocks.air; + return Block.getBlockFromItem(((ItemStack) aStack).getItem()); + } + + @Override + public ItemStack get(final long aAmount, final Object... aReplacements) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(this.mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(this.mStack)); + } + + @Override + public ItemStack getWildcard(final long aAmount, final Object... aReplacements) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(this.mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(this.mStack)); + } + + @Override + public ItemStack getUndamaged(final long aAmount, final Object... aReplacements) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(this.mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(this.mStack)); + } + + @Override + public ItemStack getAlmostBroken(final long aAmount, final Object... aReplacements) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(this.mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage()-1, GT_OreDictUnificator.get(this.mStack)); + } + + @Override + public ItemStack getWithName(final long aAmount, final String aDisplayName, final Object... aReplacements) { + final ItemStack rStack = this.get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) { + return null; + } + rStack.setStackDisplayName(aDisplayName); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithCharge(final long aAmount, final int aEnergy, final Object... aReplacements) { + final ItemStack rStack = this.get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) { + return null; + } + GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithDamage(final long aAmount, final long aMetaValue, final Object... aReplacements) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(this.mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(this.mStack)); + } + + @Override + public GregtechItemList registerOre(final Object... aOreNames) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + for (final Object tOreName : aOreNames) { + GT_OreDictUnificator.registerOre(tOreName, this.get(1)); + } + return this; + } + + @Override + public GregtechItemList registerWildcardAsOre(final Object... aOreNames) { + if (this.mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + this.name() + "' has not been set to an Item at this time!"); + } + for (final Object tOreName : aOreNames) { + GT_OreDictUnificator.registerOre(tOreName, this.getWildcard(1)); + } + return this; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java new file mode 100644 index 0000000000..7ef6b5701e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOreDictNames.java @@ -0,0 +1,39 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +/* Electric Components. + * + * usual Materials for this are: + * Primitive (Tier 1) + * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery + * Good (Tier 3) + * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery + * Data (Tier 5) : Data Storage Circuit + * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit + * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal + * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb + * Infinite (Cheaty) + * +Circuits + Circuit_Primitive, Circuit_Basic, Circuit_Good, Circuit_Advanced, + Circuit_Data, Circuit_Elite, Circuit_Master, Tool_DataOrb, Circuit_Ultimate, Tool_DataStick, + Circuit_IV, Circuit_LuV, Circuit_ZPM, +Circuit Parts + Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM, + Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM, + Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM, + Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM; + */ +public enum GregtechOreDictNames { + buffer_core, itemGregConduit, Circuit_IV, Circuit_LuV, Circuit_ZPM, + Circuit_Board_IV, Circuit_Board_LuV, Circuit_Board_ZPM, + Circuit_Parts_Crystal_Chip_IV, Circuit_Parts_Crystal_Chip_LuV, Circuit_Parts_Crystal_Chip_ZPM, + Circuit_Parts_IV, Circuit_Parts_LuV, Circuit_Parts_ZPM, + Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM; + + public String unlocalisedName; + + private void ModObject() { + this.unlocalisedName = this.name(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java new file mode 100644 index 0000000000..b17b4a26ff --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java @@ -0,0 +1,941 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +import static gregtech.api.enums.GT_Values.*; +import static gtPlusPlus.core.util.Utils.getTcAspectStack; + +import java.util.*; + +import gregtech.api.enums.*; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.interfaces.*; +import gregtech.api.objects.GT_FluidStack; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.*; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; +import gtPlusPlus.xmod.gregtech.api.objects.GregtechItemData; +import gtPlusPlus.xmod.gregtech.api.objects.GregtechMaterialStack; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public enum GregtechOrePrefixes { + /* Electric Components. + * + * usual Materials for this are: + * Primitive (Tier 1) + * Basic (Tier 2) as used by UE as well : IC2 Circuit and RE-Battery + * Good (Tier 3) + * Advanced (Tier 4) as used by UE as well : Advanced Circuit, Advanced Battery and Lithium Battery + * Data (Tier 5) : Data Storage Circuit + * Elite (Tier 6) as used by UE as well : Energy Crystal and Data Control Circuit + * Master (Tier 7) : Energy Flow Circuit and Lapotron Crystal + * Ultimate (Tier 8) : Data Orb and Lapotronic Energy Orb + * Infinite (Cheaty) + */ + ingotHot("Hot Ingots", "Hot ", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. + ingot("Ingots", "", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, 11), // A regular Ingot. Introduced by Eloraam + dustTiny("Tiny Dusts", "Tiny Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. + dustSmall("Small Dusts", "Small Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. + dustImpure("Impure Dusts", "Impure Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary Material + dustRefined("Refined Dusts", "Refined Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 2), + dustPure("Purified Dusts", "Purified Pile of ", " Dust", true, true, false, false, false, false, false, true, false, true, B[3], M * 1, 64, 4), + dust("Dusts", "", " Dust", true, true, false, false, false, false, false, true, false, false, B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. + nugget("Nuggets", "", " Nugget", true, true, false, false, false, false, false, true, false, false, B[1], M / 9, 64, 9), // A Nugget. Introduced by Eloraam + plate("Plates", "", " Plate", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia + block("Storage Blocks", "Block of ", "", true, true, false, false, false, true, true, false, false, false, 0, M * 9, 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar + gem("Gemstones", "", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 1, 64, 8), // A regular Gem worth one Dust. Introduced by Eloraam + gemChipped("Chipped Gemstones", "Chipped ", "", true, true, true, false, false, false, true, true, false, false, B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft + gemFlawed("Flawed Gemstones", "Flawed ", "", true, true, true, false, false, false, true, true, false, false, B[2], M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft + gemFlawless("Flawless Gemstones", "Flawless ", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft + gemExquisite("Exquisite Gemstones", "Exquisite ", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft + stick("Sticks/Rods", "", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam + type2("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, -1), + + toolSkookumChoocher("Skookum Choocher", "", " Skookum Choocher", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + toolAngleGrinder("Angle Grinder", "", "Angle Grinder", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + toolElectricSnips("Electric Snips", "", "Electric Snips", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + toolElectricLighter("Electric Lighter", "", "Electric Lighter", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + toolElectricButcherKnife("Electric Butcher Knife", "", "Electric Butcher Knife", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + + + + batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia + circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Calclavia + chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced by Buildcraft + computer("Computers", "", "", true, true, false, false, true, false, false, false, false, false, 0, -1, 64, -1),; // A whole Computer. "computerMaster" = ComputerCube + + public static volatile int VERSION = 508; + + static { + + ingotHot.mHeatDamage = 3.0F; + + } + + public final ArrayList mPrefixedItems = new ArrayList<>(); + public final short mTextureIndex; + public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost; + public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; + public final List mAspects = new ArrayList<>(); + public final Collection mFamiliarPrefixes = new HashSet<>(); + /** + * Used to determine the amount of Material this Prefix contains. + * Multiply or Divide GregTech_API.MATERIAL_UNIT to get the Amounts in comparision to one Ingot. + * 0 = Null + * Negative = Undefined Amount + */ + public final long mMaterialAmount; + private final Collection mNotGeneratedItems = new HashSet<>(), mIgnoredMaterials = new HashSet<>(), mGeneratedItems = new HashSet<>(); + private final ArrayList mOreProcessing = new ArrayList<>(); + private final ArrayList mOreProcessingFake = new ArrayList<>(); + public ItemStack mContainerItem = null; + public ICondition mCondition = null; + public byte mDefaultStackSize = 64; + public GregtechMaterialStack mSecondaryMaterial = null; + public GregtechOrePrefixes mPrefixInto = this; + public float mHeatDamage = 0.0F; // Negative for Frost Damage + /** + * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check. + */ + public int mMaterialGenerationBits = 0; + private GregtechOrePrefixes(final String aRegularLocalName, final String aLocalizedMaterialPre, final String aLocalizedMaterialPost, final boolean aIsUnificatable, final boolean aIsMaterialBased, final boolean aIsSelfReferencing, final boolean aIsContainer, final boolean aDontUnificateActively, final boolean aIsUsedForBlocks, final boolean aAllowNormalRecycling, final boolean aGenerateDefaultItem, final boolean aIsEnchantable, final boolean aIsUsedForOreProcessing, final int aMaterialGenerationBits, final long aMaterialAmount, final int aDefaultStackSize, final int aTextureindex) { + this.mIsUnificatable = aIsUnificatable; + this.mIsMaterialBased = aIsMaterialBased; + this.mIsSelfReferencing = aIsSelfReferencing; + this.mIsContainer = aIsContainer; + this.mDontUnificateActively = aDontUnificateActively; + this.mIsUsedForBlocks = aIsUsedForBlocks; + this.mAllowNormalRecycling = aAllowNormalRecycling; + this.mGenerateDefaultItem = aGenerateDefaultItem; + this.mIsEnchantable = aIsEnchantable; + this.mIsUsedForOreProcessing = aIsUsedForOreProcessing; + this.mMaterialGenerationBits = aMaterialGenerationBits; + this.mMaterialAmount = aMaterialAmount; + this.mRegularLocalName = aRegularLocalName; + this.mLocalizedMaterialPre = aLocalizedMaterialPre; + this.mLocalizedMaterialPost = aLocalizedMaterialPost; + this.mDefaultStackSize = (byte) aDefaultStackSize; + this.mTextureIndex = (short) aTextureindex; + + + //TODO - Utilise some form of way to check if it's gt 5.9 if so, use string switch. + if (this.name().startsWith("ore")) { + getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("wire") || this.name().startsWith("cable")) { + getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("dust")) { + getTcAspectStack(TC_Aspects.PERDITIO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("crushed")) { + getTcAspectStack(TC_Aspects.PERFODIO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("ingot") || this.name().startsWith("nugget")) { + getTcAspectStack(TC_Aspects.METALLUM.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("armor")) { + getTcAspectStack(TC_Aspects.TUTAMEN.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("stone")) { + getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("pipe")) { + getTcAspectStack(TC_Aspects.ITER.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("gear")) { + getTcAspectStack(TC_Aspects.MOTUS.name(), 1).addToAspectList(this.mAspects); + getTcAspectStack(TC_Aspects.MACHINA.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("frame") || this.name().startsWith("plate")) { + getTcAspectStack(TC_Aspects.FABRICO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("tool")) { + getTcAspectStack(TC_Aspects.INSTRUMENTUM.name(), 2).addToAspectList(this.mAspects); + } else if (this.name().startsWith("gem") || this.name().startsWith("crystal") || this.name().startsWith("lens")) { + getTcAspectStack(TC_Aspects.VITREUS.name(), 1).addToAspectList(this.mAspects); + } else if (this.name().startsWith("crate")) { + getTcAspectStack(TC_Aspects.ITER.name(), 2).addToAspectList(this.mAspects); + } else if (this.name().startsWith("circuit")) { + getTcAspectStack("COGNITIO", 1); + } else if (this.name().startsWith("computer")) { + getTcAspectStack("COGNITIO", 4).addToAspectList(this.mAspects); + } else if (this.name().startsWith("battery")) { + getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); + } + } + + public static GregtechOrePrefixes getOrePrefix(final String aOre) { + for (final GregtechOrePrefixes tPrefix : values()) { + if (aOre.startsWith(tPrefix.toString())) { + return tPrefix; + } + } + return null; + } + + public static String stripPrefix(final String aOre) { + for (final GregtechOrePrefixes tPrefix : values()) { + if (aOre.startsWith(tPrefix.toString())) { + return aOre.replaceFirst(tPrefix.toString(), ""); + } + } + return aOre; + } + + public static String replacePrefix(final String aOre, final GregtechOrePrefixes aPrefix) { + for (final GregtechOrePrefixes tPrefix : values()) { + if (aOre.startsWith(tPrefix.toString())) { + return aOre.replaceFirst(tPrefix.toString(), aPrefix.toString()); + } + } + return ""; + } + + public static GregtechOrePrefixes getPrefix(final String aPrefixName) { + return getPrefix(aPrefixName, null); + } + + public static GregtechOrePrefixes getPrefix(final String aPrefixName, final GregtechOrePrefixes aReplacement) { + final Object tObject = GT_Utility.getFieldContent(GregtechOrePrefixes.class, aPrefixName, false, false); + if ((tObject != null) && (tObject instanceof GregtechOrePrefixes)) { + return (GregtechOrePrefixes) tObject; + } + return aReplacement; + } + + public static Materials getMaterial(final String aOre) { + return Materials.get(stripPrefix(aOre)); + } + + public static Materials getMaterial(final String aOre, final GregtechOrePrefixes aPrefix) { + return Materials.get(aOre.replaceFirst(aPrefix.toString(), "")); + } + + public static Materials getRealMaterial(final String aOre, final GregtechOrePrefixes aPrefix) { + return Materials.getRealMaterial(aOre.replaceFirst(aPrefix.toString(), "")); + } + + public static boolean isInstanceOf(final String aName, final GregtechOrePrefixes aPrefix) { + return aName == null ? false : aName.startsWith(aPrefix.toString()); + } + + public boolean add(final ItemStack aStack) { + if (aStack == null) { + return false; + } + if (!this.contains(aStack)) { + this.mPrefixedItems.add(aStack); + } + while (this.mPrefixedItems.contains(null)) { + this.mPrefixedItems.remove(null); + } + return true; + } + + + public boolean contains(final ItemStack aStack) { + if (aStack == null) { + return false; + } + for (final ItemStack tStack : this.mPrefixedItems) { + if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) { + return true; + } + } + return false; + } + + public boolean doGenerateItem(final Materials aMaterial) { + return (aMaterial != null) && (aMaterial != Materials._NULL) && (((aMaterial.mTypes & this.mMaterialGenerationBits) != 0) || this.mGeneratedItems.contains(aMaterial)) && !this.mNotGeneratedItems.contains(aMaterial) && ((this.mCondition == null) || this.mCondition.isTrue(aMaterial)); + } + + public boolean ignoreMaterials(final Materials... aMaterials) { + for (final Materials tMaterial : aMaterials) { + if (tMaterial != null) { + this.mIgnoredMaterials.add(tMaterial); + } + } + return true; + } + + public boolean addFamiliarPrefix(final GregtechOrePrefixes aPrefix) { + if ((aPrefix == null) || this.mFamiliarPrefixes.contains(aPrefix) || (aPrefix == this)) { + return false; + } + return this.mFamiliarPrefixes.add(aPrefix); + } + + public boolean add(final Interface_OreRecipeRegistrator aRegistrator) { + if (aRegistrator == null) { + return false; + } + return this.mOreProcessing.add(aRegistrator); + } + + public void processOre(final GT_Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { + if ((aMaterial != null) && ((aMaterial != GT_Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) && GT_Utility.isStackValid(aStack)) { + for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessing) { + if (D2) { + GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + this.name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator)); + } + tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); + } + } + } + + //TODO + public void processOre(final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { + if ((aMaterial != null) && ((aMaterial != Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) && GT_Utility.isStackValid(aStack)) { + for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessingFake) { + if (D2) { + GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + this.name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator)); + } + tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); + } + } + } + + public Object get(final Object aMaterial) { + if (aMaterial instanceof GT_Materials) { + return new GregtechItemData(this, (GT_Materials) aMaterial); + } + return this.name() + aMaterial; + } + + public String getDefaultLocalNameForItem(final Materials aMaterial) { + + + // Use Standard Localization + return this.mLocalizedMaterialPre + aMaterial.mDefaultLocalName + this.mLocalizedMaterialPost; + } + + public enum GT_Materials implements IColorModulationContainer, ISubTagContainer { + + + + /** + * This is the Default Material returned in case no Material has been found or a NullPointer has been inserted at a location where it shouldn't happen. + *

+ * Mainly for preventing NullPointer Exceptions and providing Default Values. + * + * Unknown Material Components. Dead End Section. + * + * Alkalus Range 730-799 & 970-998 + * (aMetaItemSubID, TextureSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, R, G, B, Alpha, aLocalName, + * aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor + * this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true); + * + */ + _NULL(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "NULL", 0, 0, 0, 0, false, false, 1, 1, 1, Dyes._NULL, Element._NULL, Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS.name(), 1))), + + + //Lapis(526, TextureSet.SET_LAPIS, 1.0F, 0, 1, 1 | 4 | 8, 70, 70, 220, 0, "Lapis", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue, 2, Arrays.asList(new MaterialStack(Materials.Lazurite, 12), new MaterialStack(Materials.Sodalite, 2), new MaterialStack(Materials.Pyrite, 1), new MaterialStack(Materials.Calcite, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.SENSUS, 1))), + Pyrotheum(20, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 255, 128, 0, 0, "Pyrotheum", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeYellow, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1)), Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.IGNIS, 1))), + Cryotheum(21, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 102, 178, 255, 0, "Cryotheum", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Blizz, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Snow, 1), new MaterialStack(Materials.Niter, 1)), Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.GELUM, 1))), + Ender(22, TextureSet.SET_FLUID, 1.0F, 0, 2, 1, 255, 255, 255, 0, "Ender", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen), + + /** + * Circuitry, Batteries and other Technical things + */ + Symbiotic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "IV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 4), getTcAspectStack(TC_Aspects.MACHINA, 4))), + Neutronic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "LuV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 6), getTcAspectStack(TC_Aspects.MACHINA, 6))), + Quantum(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "ZPM Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8), getTcAspectStack(TC_Aspects.MACHINA, 8))), + + Superconductor(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 190, 240, 190, 0, "Superconductor", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8))), + + Staballoy(30, TextureSet.SET_ROUGH, 10.0F, 5120, 4, 1 | 2 | 16 | 32 | 64 | 128, 68, 75, 66, 0, "Staballoy", 0, 0, 1500, 2800, true, false, 1, 3, 1, Dyes.dyeGreen, 2, Arrays.asList(new MaterialStack(Materials.Titanium, 1), new MaterialStack(Materials.Uranium, 9)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + Bedrockium(31, TextureSet.SET_FINE, 8.0F, 8196, 3, 1 | 2 | 16 | 32 | 64 | 128, 39, 39, 39, 0, "Bedrockium", 0, 0, -1, 0, false, false, 1, 5, 1, Dyes.dyeLightGray, 2, Arrays.asList(new MaterialStack(Materials.Carbon, 63), new MaterialStack(Materials.Carbon, 56)), Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS, 8), getTcAspectStack(TC_Aspects.TUTAMEN, 3))), + BloodSteel(32, TextureSet.SET_METALLIC, 11.0F, 768, 4, 1 | 2 | 16 | 32 | 64 | 128, 142, 28, 0, 0, "Blood Steel", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Steel, 3)), Arrays.asList(getTcAspectStack(TC_Aspects.VICTUS, 8), getTcAspectStack(TC_Aspects.IGNIS, 3))), + Void(33, TextureSet.SET_METALLIC, 6.0F, 1280, 3, 1 | 2 | 16 | 32 | 64 | 128, 82, 17, 82, 0, "Void Metal", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack, Arrays.asList(getTcAspectStack("PRAECANTATIO", 5), getTcAspectStack(TC_Aspects.VACUOS, 7))), + ConductiveIron(34, TextureSet.SET_METALLIC, 5.0F, 256, 2, 1 | 2, 164, 109, 100, 0, "Conductive Iron", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Iron, 6), new MaterialStack(Materials.Redstone, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 2), getTcAspectStack(TC_Aspects.METALLUM, 2))), + ElectricalSteel(35, TextureSet.SET_METALLIC, 7.0F, 768, 3, 1 | 2 | 64 | 128, 194, 194, 194, 0, "Electrical Steel", 0, 0, 1811, 1000, true, false, 3, 1, 1, Dyes.dyeLightGray, 2, Arrays.asList(new MaterialStack(Materials.Iron, 3), new MaterialStack(Materials.Coal, 2), new MaterialStack(Materials.Silicon, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.MAGNETO, 2), getTcAspectStack(TC_Aspects.ELECTRUM, 5))), + EnergeticAlloy(36, TextureSet.SET_SHINY, 5.0F, 512, 3, 1 | 2 | 64 | 128, 252, 152, 45, 0, "Energetic Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange, 2, Arrays.asList(new MaterialStack(Materials.Gold, 3), new MaterialStack(Materials.Glowstone, 2), new MaterialStack(Materials.Redstone, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 4), getTcAspectStack(TC_Aspects.LUX, 3))), + VibrantAlloy(37, TextureSet.SET_SHINY, 7.0F, 1280, 4, 1 | 2 | 64 | 128, 204, 242, 142, 0, "Vibrant Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLime, 2, Arrays.asList(new MaterialStack(Materials.EnergeticAlloy, 1), new MaterialStack(Materials.EnderPearl, 3)), Arrays.asList(getTcAspectStack(TC_Aspects.MACHINA, 5), getTcAspectStack(TC_Aspects.TELUM, 4))), + PulsatingIron(38, TextureSet.SET_SHINY, 5.0F, 256, 2, 1 | 2 | 64 | 128, 50, 91, 21, 0, "Pulsating Iron", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen, 2, Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.EnderPearl, 2)), Arrays.asList(getTcAspectStack(TC_Aspects.ALIENIS, 3), getTcAspectStack(TC_Aspects.METALLUM, 3))), + /* TODO*/ RedstoneAlloy(39, TextureSet.SET_METALLIC, 1.0F, 256, 2, 1|2|16|32|64, 178,34,34, 0, "Redstone Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.Redstone, 4))), + + //Needs more Use, I think. + Tantalloy60(40, TextureSet.SET_DULL, 8.0F, 5120, 3, 1 | 2 | 16 | 32 | 64 | 128, 68, 75, 166, 0, "Tantalloy-60", 0, 0, 3035, 2200, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + Tantalloy61(41, TextureSet.SET_DULL, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 122, 135, 196, 0, "Tantalloy-61", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + + Potin(42, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 201,151,129, 0, "Potin", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + Inconel792(43, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 108, 240, 118, 0, "Inconel-792", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + Inconel690(44, TextureSet.SET_DULL, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 118, 220, 138, 0, "Inconel-690", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + MaragingSteel300(45, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 150, 150, 150, 0, "Maraging Steel 300", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + MaragingSteel350(46, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 160, 160, 160, 0, "Maraging Steel 350", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + HastelloyX(47, TextureSet.SET_SHINY, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 255, 193, 37, 0, "Hastelloy-X", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + + TriniumNaquadahCarbonite(48, TextureSet.SET_SHINY, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 255, 233, 0, 0, "Trinium Naquadah Carbonite", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9), new MaterialStack(Materials.Titanium, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + + + //Radioactive Materials + HydrofluoricAcid(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 200, 200, 200, 0, "Hydrofluoric Acid", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + UraniumHexaFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 73, 220, 83, 0, "Uranium Hexafluoride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + UraniumTetraFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 73, 220, 83, 0, "Uranium Tetrafluoride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + ThoriumTetraFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 15, 120, 15, 0, "Thorium Tetrafluoride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeGreen, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + + SulfurousAcid(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 110, 220, 30, 0, "Sulfurous Acid", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + SulfurDioxide(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 150, 200, 50, 0, "Sulfur Dioxide", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + HydrogenChloride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 150, 240, 90, 0, "Hydrogen Chloride", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + SulfuricApatite(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Sulfuric Apatite Solution", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + + SulfuricLithium(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Sulfuric Lithium Solution", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + LithiumHydroxide(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Lithium Hydroxide", 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, Arrays.asList(new MaterialStack(Materials.Coal, 1), new MaterialStack(Materials.Redstone, 1), new MaterialStack(Materials.Blaze, 1), new MaterialStack(Materials.Sulfur, 1))), + + ; + + + + + /** + * List of all Materials. + */ + public static final Collection VALUES = new HashSet<>(Arrays.asList(values())); + + + static { + /*Primitive.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Basic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Good.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Advanced.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Data.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Elite.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Master.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Ultimate.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Superconductor.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Infinite.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING);*/ + Symbiotic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Neutronic.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + Quantum.add(SubTag.NO_SMASHING, SubTag.NO_SMELTING); + } + + + /** + * This Array can be changed dynamically by a Tick Handler in order to get a glowing Effect on all GT Meta Items out of this Material. + */ + public final short[] mRGBa = new short[]{255, 255, 255, 0}, mMoltenRGBa = new short[]{255, 255, 255, 0}; + public final TextureSet mIconSet; + public final int mMetaItemSubID; + public final boolean mUnificatable; + public final GT_Materials mMaterialInto; + public final List mMaterialList = new ArrayList<>(); + public final List mOreByProducts = new ArrayList<>(), mOreReRegistrations = new ArrayList<>(); + public final List mAspects = new ArrayList<>(); + private final ArrayList mMaterialItems = new ArrayList<>(); + private final Collection mSubTags = new HashSet<>(); + public Enchantment mEnchantmentTools = null, mEnchantmentArmors = null; + public byte mEnchantmentToolsLevel = 0, mEnchantmentArmorsLevel = 0; + public boolean mBlastFurnaceRequired = false; + public float mToolSpeed = 1.0F, mHeatDamage = 0.0F; + public String mChemicalFormula = "?", mDefaultLocalName = "null"; + public Dyes mColor = Dyes._NULL; + public short mMeltingPoint = 0, mBlastFurnaceTemp = 0; + public int mTypes = 0, mDurability = 16, mFuelPower = 0, mFuelType = 0, mExtraData = 0, mOreValue = 0, mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1; + public long mDensity = M; + public Element mElement = null; + public GT_Materials mDirectSmelting = this, mOreReplacement = this, mMacerateInto = this, mSmeltInto = this, mArcSmeltInto = this, mHandleMaterial = this; + public byte mToolQuality = 0; + public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null; + /** + * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, what means 144 is one Material Unit worth + */ + public Fluid mStandardMoltenFluid = null; + + private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final boolean aUnificatable) { + this.mUnificatable = aUnificatable; + this.mMaterialInto = this; + this.mMetaItemSubID = aMetaItemSubID; + this.mToolQuality = (byte) aToolQuality; + this.mDurability = aToolDurability; + this.mToolSpeed = aToolSpeed; + this.mIconSet = aIconSet; + if (aMetaItemSubID >= 0) { + if (CORE.sMU_GeneratedMaterials[aMetaItemSubID] == null) { + CORE.sMU_GeneratedMaterials[aMetaItemSubID] = this; + } else { + throw new IllegalArgumentException("The Index " + aMetaItemSubID + " is already used!"); + } + } + } + + private GT_Materials(final GT_Materials aMaterialInto, final boolean aReRegisterIntoThis) { + this.mUnificatable = false; + this.mDefaultLocalName = aMaterialInto.mDefaultLocalName; + this.mMaterialInto = aMaterialInto.mMaterialInto; + if (aReRegisterIntoThis) { + this.mMaterialInto.mOreReRegistrations.add(this); + } + this.mChemicalFormula = aMaterialInto.mChemicalFormula; + this.mMetaItemSubID = -1; + this.mIconSet = TextureSet.SET_NONE; + } + + /** + * @param aMetaItemSubID the Sub-ID used in my own MetaItems. Range 0-1000. -1 for no Material + * @param aTypes which kind of Items should be generated. Bitmask as follows: + * 1 = Dusts of all kinds. + * 2 = Dusts, Ingots, Plates, Rods/Sticks, Machine Components and other Metal specific things. + * 4 = Dusts, Gems, Plates, Lenses (if transparent). + * 8 = Dusts, Impure Dusts, crushed Ores, purified Ores, centrifuged Ores etc. + * 16 = Cells + * 32 = Plasma Cells + * 64 = Tool Heads + * 128 = Gears + * @param aR, aG, aB Color of the Material 0-255 each. + * @param aA transparency of the Material Texture. 0 = fully visible, 255 = Invisible. + * @param aLocalName The Name used as Default for localization. + * @param aFuelType Type of Generator to get Energy from this Material. + * @param aFuelPower EU generated. Will be multiplied by 1000, also additionally multiplied by 2 for Gems. + * @param aAmplificationValue Amount of UUM amplifier gotten from this. + * @param aUUMEnergy Amount of EU needed to shape the UUM into this Material. + * @param aMeltingPoint Used to determine the smelting Costs in Furnii. + * @param aBlastFurnaceTemp Used to determine the needed Heat capactiy Costs in Blast Furnii. + * @param aBlastFurnaceRequired If this requires a Blast Furnace. + * @param aColor Vanilla MC Wool Color which comes the closest to this. + */ + private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor) { + this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true); + this.mDefaultLocalName = aLocalName; + this.mMeltingPoint = (short) aMeltingPoint; + this.mBlastFurnaceTemp = (short) aBlastFurnaceTemp; + this.mBlastFurnaceRequired = aBlastFurnaceRequired; + if (aTransparent) { + this.add(SubTag.TRANSPARENT); + } + this.mFuelPower = aFuelPower; + this.mFuelType = aFuelType; + this.mOreValue = aOreValue; + this.mDensity = (M * aDensityMultiplier) / aDensityDivider; + this.mColor = aColor == null ? Dyes._NULL : aColor; + if (this.mColor != null) { + this.add(SubTag.HAS_COLOR); + } + this.mRGBa[0] = this.mMoltenRGBa[0] = (short) aR; + this.mRGBa[1] = this.mMoltenRGBa[1] = (short) aG; + this.mRGBa[2] = this.mMoltenRGBa[2] = (short) aB; + this.mRGBa[3] = this.mMoltenRGBa[3] = (short) aA; + this.mTypes = aTypes; + if ((this.mTypes & 2) != 0) { + this.add(SubTag.SMELTING_TO_FLUID); + } + } + + private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final List aAspects) { + this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); + this.mAspects.addAll(aAspects); + } + + /** + * @param aElement The Element Enum represented by this Material + */ + private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final Element aElement, final List aAspects) { + this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); + this.mElement = aElement; + //mElement.mLinkedMaterials.add(this); + if (aElement == Element._NULL) { + this.mChemicalFormula = "Empty"; + } else { + this.mChemicalFormula = aElement.toString(); + this.mChemicalFormula = this.mChemicalFormula.replaceAll("_", "-"); + } + this.mAspects.addAll(aAspects); + } + + private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final int aExtraData, final List aMaterialList) { + this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor, aExtraData, aMaterialList, null); + } + + private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, final Dyes aColor, final int aExtraData, final List aMaterialList, final List aAspects) { + this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, aTypes, aR, aG, aB, aA, aLocalName, aFuelType, aFuelPower, aMeltingPoint, aBlastFurnaceTemp, aBlastFurnaceRequired, aTransparent, aOreValue, aDensityMultiplier, aDensityDivider, aColor); + this.mExtraData = aExtraData; + this.mMaterialList.addAll(aMaterialList); + this.mChemicalFormula = ""; + for (final MaterialStack tMaterial : this.mMaterialList) { + this.mChemicalFormula += tMaterial.toString(); + } + this.mChemicalFormula = this.mChemicalFormula.replaceAll("_", "-"); + + int tAmountOfComponents = 0, tMeltingPoint = 0; + for (final MaterialStack tMaterial : this.mMaterialList) { + tAmountOfComponents += tMaterial.mAmount; + if (tMaterial.mMaterial.mMeltingPoint > 0) { + tMeltingPoint += tMaterial.mMaterial.mMeltingPoint * tMaterial.mAmount; + } + if (aAspects == null) { + for (final TC_AspectStack tAspect : tMaterial.mMaterial.mAspects) { + tAspect.addToAspectList(this.mAspects); + } + } + } + + if (this.mMeltingPoint < 0) { + this.mMeltingPoint = (short) (tMeltingPoint / tAmountOfComponents); + } + + tAmountOfComponents *= aDensityMultiplier; + tAmountOfComponents /= aDensityDivider; + if (aAspects == null) { + for (final TC_AspectStack tAspect : this.mAspects) { + tAspect.mAmount = Math.max(1, tAspect.mAmount / Math.max(1, tAmountOfComponents)); + } + } else { + this.mAspects.addAll(aAspects); + } + } + + public static GT_Materials get(final String aMaterialName) { + final Object tObject = GT_Utility.getFieldContent(GT_Materials.class, aMaterialName, false, false); + if ((tObject != null) && (tObject instanceof GT_Materials)) { + return (GT_Materials) tObject; + } + return _NULL; + } + + public static GT_Materials getRealMaterial(final String aMaterialName) { + return get(aMaterialName).mMaterialInto; + } + + /** + * Called in preInit with the Config to set Values. + * + * @param aConfiguration + */ + public static void init(final GT_Config aConfiguration) { + for (final GT_Materials tMaterial : VALUES) { + final String tString = tMaterial.toString().toLowerCase(); + tMaterial.mHeatDamage = (float) aConfiguration.get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage); + if (tMaterial.mBlastFurnaceRequired) { + tMaterial.mBlastFurnaceRequired = aConfiguration.get(ConfigCategories.Materials.blastfurnacerequirements, tString, true); + } + if (tMaterial.mBlastFurnaceRequired && aConfiguration.get(ConfigCategories.Materials.blastinductionsmelter, tString, tMaterial.mBlastFurnaceTemp < 1500)){} + //GT_ModHandler.ThermalExpansion.addSmelterBlastOre(tMaterial); + //tMaterial.mHandleMaterial = (tMaterial == Desh ? tMaterial.mHandleMaterial : tMaterial == Diamond || tMaterial == Thaumium ? Wood : tMaterial.contains(SubTag.BURNING) ? Blaze : tMaterial.contains(SubTag.MAGICAL) && tMaterial.contains(SubTag.CRYSTAL) && Loader.isModLoaded(MOD_ID_TC) ? Thaumium : tMaterial.getMass() > Element.Tc.getMass() * 2 ? TungstenSteel : tMaterial.getMass() > Element.Tc.getMass() ? Steel : Wood); + } + } + + public boolean isRadioactive() { + if (this.mElement != null) { + return this.mElement.mHalfLifeSeconds >= 0; + } + for (final MaterialStack tMaterial : this.mMaterialList) { + if (tMaterial.mMaterial.isRadioactive()) { + return true; + } + } + return false; + } + + public long getProtons() { + if (this.mElement != null) { + return this.mElement.getProtons(); + } + if (this.mMaterialList.size() <= 0) { + return Element.Tc.getProtons(); + } + long rAmount = 0, tAmount = 0; + for (final MaterialStack tMaterial : this.mMaterialList) { + tAmount += tMaterial.mAmount; + rAmount += tMaterial.mAmount * tMaterial.mMaterial.getProtons(); + } + return (this.getDensity() * rAmount) / (tAmount * M); + } + + public long getNeutrons() { + if (this.mElement != null) { + return this.mElement.getNeutrons(); + } + if (this.mMaterialList.size() <= 0) { + return Element.Tc.getNeutrons(); + } + long rAmount = 0, tAmount = 0; + for (final MaterialStack tMaterial : this.mMaterialList) { + tAmount += tMaterial.mAmount; + rAmount += tMaterial.mAmount * tMaterial.mMaterial.getNeutrons(); + } + return (this.getDensity() * rAmount) / (tAmount * M); + } + + public long getMass() { + if (this.mElement != null) { + return this.mElement.getMass(); + } + if (this.mMaterialList.size() <= 0) { + return Element.Tc.getMass(); + } + long rAmount = 0, tAmount = 0; + for (final MaterialStack tMaterial : this.mMaterialList) { + tAmount += tMaterial.mAmount; + rAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass(); + } + return (this.getDensity() * rAmount) / (tAmount * M); + } + + public long getDensity() { + return this.mDensity; + } + + public String getToolTip() { + return this.getToolTip(1, false); + } + + public String getToolTip(final boolean aShowQuestionMarks) { + return this.getToolTip(1, aShowQuestionMarks); + } + + public String getToolTip(final long aMultiplier) { + return this.getToolTip(aMultiplier, false); + } + + public String getToolTip(final long aMultiplier, final boolean aShowQuestionMarks) { + if (!aShowQuestionMarks && this.mChemicalFormula.equals("?")) { + return ""; + } + if ((aMultiplier >= (M * 2)) && !this.mMaterialList.isEmpty()) { + return (((this.mElement != null) || ((this.mMaterialList.size() < 2) && (this.mMaterialList.get(0).mAmount == 1))) ? this.mChemicalFormula : "(" + this.mChemicalFormula + ")") + aMultiplier; + } + return this.mChemicalFormula; + } + + /** + * Adds an ItemStack to this Material. + */ + public GT_Materials add(final ItemStack aStack) { + if ((aStack != null) && !this.contains(aStack)) { + this.mMaterialItems.add(aStack); + } + return this; + } + + /** + * This is used to determine if any of the ItemStacks belongs to this Material. + */ + public boolean contains(final ItemStack... aStacks) { + if ((aStacks == null) || (aStacks.length <= 0)) { + return false; + } + for (final ItemStack tStack : this.mMaterialItems) { + for (final ItemStack aStack : aStacks) { + if (GT_Utility.areStacksEqual(aStack, tStack, !tStack.hasTagCompound())) { + return true; + } + } + } + return false; + } + + /** + * This is used to determine if an ItemStack belongs to this Material. + */ + public boolean remove(final ItemStack aStack) { + if (aStack == null) { + return false; + } + boolean temp = false; + for (int i = 0; i < this.mMaterialItems.size(); i++) { + if (GT_Utility.areStacksEqual(aStack, this.mMaterialItems.get(i))) { + this.mMaterialItems.remove(i--); + temp = true; + } + } + return temp; + } + + /** + * Adds a SubTag to this Material + */ + @Override + public ISubTagContainer add(final SubTag... aTags) { + if (aTags != null) { + for (final SubTag aTag : aTags) { + if ((aTag != null) && !this.contains(aTag)) { + aTag.addContainerToList(this); + this.mSubTags.add(aTag); + } + } + } + return this; + } + + /** + * If this Material has this exact SubTag + */ + @Override + public boolean contains(final SubTag aTag) { + return this.mSubTags.contains(aTag); + } + + /** + * Removes a SubTag from this Material + */ + @Override + public boolean remove(final SubTag aTag) { + return this.mSubTags.remove(aTag); + } + + /** + * Sets the Heat Damage for this Material (negative = frost) + */ + public GT_Materials setHeatDamage(final float aHeatDamage) { + this.mHeatDamage = aHeatDamage; + return this; + } + + /** + * Adds a Material to the List of Byproducts when grinding this Ore. + * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. + */ + public GT_Materials addOreByProduct(final GT_Materials aMaterial) { + if (!this.mOreByProducts.contains(aMaterial.mMaterialInto)) { + this.mOreByProducts.add(aMaterial.mMaterialInto); + } + return this; + } + + /** + * Adds multiple Materials to the List of Byproducts when grinding this Ore. + * Is used for more precise Ore grinding, so that it is possible to choose between certain kinds of Materials. + */ + public GT_Materials addOreByProducts(final GT_Materials... aMaterials) { + for (final GT_Materials tMaterial : aMaterials) { + if (tMaterial != null) { + this.addOreByProduct(tMaterial); + } + } + return this; + } + + /** + * If this Ore gives multiple drops of its Main Material. + * Lapis Ore for example gives about 6 drops. + */ + public GT_Materials setOreMultiplier(final int aOreMultiplier) { + if (aOreMultiplier > 0) { + this.mOreMultiplier = aOreMultiplier; + } + return this; + } + + /** + * If this Ore gives multiple drops of its Byproduct Material. + */ + public GT_Materials setByProductMultiplier(final int aByProductMultiplier) { + if (aByProductMultiplier > 0) { + this.mByProductMultiplier = aByProductMultiplier; + } + return this; + } + + /** + * If this Ore gives multiple drops of its Main Material. + * Lapis Ore for example gives about 6 drops. + */ + public GT_Materials setSmeltingMultiplier(final int aSmeltingMultiplier) { + if (aSmeltingMultiplier > 0) { + this.mSmeltingMultiplier = aSmeltingMultiplier; + } + return this; + } + + /** + * This Ore should be smolten directly into an Ingot of this Material instead of an Ingot of itself. + */ + public GT_Materials setDirectSmelting(final GT_Materials aMaterial) { + if (aMaterial != null) { + this.mDirectSmelting = aMaterial.mMaterialInto.mDirectSmelting; + } + return this; + } + + /** + * This Material should be the Main Material this Ore gets ground into. + * Example, Chromite giving Chrome or Tungstate giving Tungsten. + */ + public GT_Materials setOreReplacement(final GT_Materials aMaterial) { + if (aMaterial != null) { + this.mOreReplacement = aMaterial.mMaterialInto.mOreReplacement; + } + return this; + } + + /** + * This Material smelts always into an instance of aMaterial. Used for Magnets. + */ + public GT_Materials setSmeltingInto(final GT_Materials aMaterial) { + if (aMaterial != null) { + this.mSmeltInto = aMaterial.mMaterialInto.mSmeltInto; + } + return this; + } + + /** + * This Material arc smelts always into an instance of aMaterial. Used for Wrought Iron. + */ + public GT_Materials setArcSmeltingInto(final GT_Materials aMaterial) { + if (aMaterial != null) { + this.mArcSmeltInto = aMaterial.mMaterialInto.mArcSmeltInto; + } + return this; + } + + /** + * This Material macerates always into an instance of aMaterial. + */ + public GT_Materials setMaceratingInto(final GT_Materials aMaterial) { + if (aMaterial != null) { + this.mMacerateInto = aMaterial.mMaterialInto.mMacerateInto; + } + return this; + } + + public GT_Materials setEnchantmentForTools(final Enchantment aEnchantment, final int aEnchantmentLevel) { + this.mEnchantmentTools = aEnchantment; + this.mEnchantmentToolsLevel = (byte) aEnchantmentLevel; + return this; + } + + public GT_Materials setEnchantmentForArmors(final Enchantment aEnchantment, final int aEnchantmentLevel) { + this.mEnchantmentArmors = aEnchantment; + this.mEnchantmentArmorsLevel = (byte) aEnchantmentLevel; + return this; + } + + public FluidStack getSolid(final long aAmount) { + if (this.mSolid == null) { + return null; + } + return new GT_FluidStack(this.mSolid, (int) aAmount); + } + + public FluidStack getFluid(final long aAmount) { + if (this.mFluid == null) { + return null; + } + return new GT_FluidStack(this.mFluid, (int) aAmount); + } + + public FluidStack getGas(final long aAmount) { + if (this.mGas == null) { + return null; + } + return new GT_FluidStack(this.mGas, (int) aAmount); + } + + public FluidStack getPlasma(final long aAmount) { + if (this.mPlasma == null) { + return null; + } + return new GT_FluidStack(this.mPlasma, (int) aAmount); + } + + public FluidStack getMolten(final long aAmount) { + if (this.mStandardMoltenFluid == null) { + return null; + } + return new GT_FluidStack(this.mStandardMoltenFluid, (int) aAmount); + } + + @Override + public short[] getRGBA() { + return this.mRGBa; + } + + public static volatile int VERSION = 508; + + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java new file mode 100644 index 0000000000..26ee2bd401 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextureSet.java @@ -0,0 +1,144 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; + +public class GregtechTextureSet { + public static final GregtechTextureSet + SET_NONE = new GregtechTextureSet("NONE"), SET_DULL = new GregtechTextureSet("DULL"), SET_RUBY = new GregtechTextureSet("RUBY"), SET_OPAL = new GregtechTextureSet("OPAL"), SET_LEAF = new GregtechTextureSet("LEAF"), SET_WOOD = new GregtechTextureSet("WOOD"), SET_SAND = new GregtechTextureSet("SAND"), SET_FINE = new GregtechTextureSet("FINE"), SET_FIERY = new GregtechTextureSet("FIERY"), SET_FLUID = new GregtechTextureSet("FLUID"), SET_ROUGH = new GregtechTextureSet("ROUGH"), SET_PAPER = new GregtechTextureSet("PAPER"), SET_GLASS = new GregtechTextureSet("GLASS"), SET_FLINT = new GregtechTextureSet("FLINT"), SET_LAPIS = new GregtechTextureSet("LAPIS"), SET_SHINY = new GregtechTextureSet("SHINY"), SET_SHARDS = new GregtechTextureSet("SHARDS"), SET_POWDER = new GregtechTextureSet("POWDER"), SET_QUARTZ = new GregtechTextureSet("QUARTZ"), SET_EMERALD = new GregtechTextureSet("EMERALD"), SET_DIAMOND = new GregtechTextureSet("DIAMOND"), SET_LIGNITE = new GregtechTextureSet("LIGNITE"), SET_MAGNETIC = new GregtechTextureSet("MAGNETIC"), SET_METALLIC = new GregtechTextureSet("METALLIC"), SET_NETHERSTAR = new GregtechTextureSet("NETHERSTAR"), SET_GEM_VERTICAL = new GregtechTextureSet("GEM_VERTICAL"), SET_GEM_HORIZONTAL = new GregtechTextureSet("GEM_HORIZONTAL"); + + public final IIconContainer[] mTextures = new IIconContainer[128]; + public final String mSetName; + + public GregtechTextureSet(final String aSetName) { + this.mSetName = aSetName; + this.mTextures[0] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/turbineBlade"); + this.mTextures[1] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/toolHeadSkookumChoocher"); + this.mTextures[2] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[3] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[4] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[5] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[6] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[7] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[8] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[9] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[10] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[11] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[12] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[13] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[14] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[15] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[16] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[17] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[18] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[19] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[20] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[21] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[22] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[23] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[24] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[25] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[26] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[27] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[28] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[29] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[30] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[31] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[32] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[33] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[34] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[35] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[36] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[37] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[38] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[39] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[40] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[41] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[42] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[43] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[44] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[45] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[46] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[47] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[48] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[49] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[50] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[51] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[52] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[53] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[54] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[55] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[56] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[57] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[58] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[59] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[60] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[61] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[62] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[63] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[64] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[65] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[66] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[67] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[68] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[69] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[70] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[71] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[72] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[73] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[74] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[75] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[76] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[77] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[78] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[79] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[80] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[81] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[82] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[83] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[84] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[85] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[86] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[87] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[88] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[89] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[90] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[91] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[92] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[93] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[94] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[95] = new Textures.BlockIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[96] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[97] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[98] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[99] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[100] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[101] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[102] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[103] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[104] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[105] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[106] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[107] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[108] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[109] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[110] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[111] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[112] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[113] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[114] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[115] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[116] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[117] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[118] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[119] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[120] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[121] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[122] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[123] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[124] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[125] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[126] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + this.mTextures[127] = new Textures.ItemIcons.CustomIcon("materialicons/" + this.mSetName + "/void"); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java new file mode 100644 index 0000000000..5b1a34590f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechTextures.java @@ -0,0 +1,203 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_IconContainer; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_Texture; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; + +public class GregtechTextures { + public enum BlockIcons implements Interface_IconContainer, Runnable { + + VOID, + + LARGECENTRIFUGE1, LARGECENTRIFUGE2, LARGECENTRIFUGE3, + LARGECENTRIFUGE4, LARGECENTRIFUGE5, LARGECENTRIFUGE6, + LARGECENTRIFUGE7, LARGECENTRIFUGE8, LARGECENTRIFUGE9, + LARGECENTRIFUGE_ACTIVE1, LARGECENTRIFUGE_ACTIVE2, LARGECENTRIFUGE_ACTIVE3, + LARGECENTRIFUGE_ACTIVE4, LARGECENTRIFUGE_ACTIVE5, LARGECENTRIFUGE_ACTIVE6, + LARGECENTRIFUGE_ACTIVE7, LARGECENTRIFUGE_ACTIVE8, LARGECENTRIFUGE_ACTIVE9; + + public static final Interface_IconContainer[] + + CENTRIFUGE = new Interface_IconContainer[]{ + LARGECENTRIFUGE1, + LARGECENTRIFUGE2, + LARGECENTRIFUGE3, + LARGECENTRIFUGE4, + LARGECENTRIFUGE5, + LARGECENTRIFUGE6, + LARGECENTRIFUGE7, + LARGECENTRIFUGE8, + LARGECENTRIFUGE9 + }, + CENTRIFUGE_ACTIVE = new Interface_IconContainer[]{ + LARGECENTRIFUGE_ACTIVE1, + LARGECENTRIFUGE_ACTIVE2, + LARGECENTRIFUGE_ACTIVE3, + LARGECENTRIFUGE_ACTIVE4, + LARGECENTRIFUGE_ACTIVE5, + LARGECENTRIFUGE_ACTIVE6, + LARGECENTRIFUGE_ACTIVE7, + LARGECENTRIFUGE_ACTIVE8, + LARGECENTRIFUGE_ACTIVE9 + }; + + public static Interface_Texture[] + GT_CASING_BLOCKS = new Interface_Texture[64]; + + protected IIcon mIcon; + + private BlockIcons() { + Meta_GT_Proxy.GT_BlockIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public void run() { + this.mIcon = Meta_GT_Proxy.sBlockIcons.registerIcon(CORE.MODID + ":" + "iconsets/" + this); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + + public static class CustomIcon implements Interface_IconContainer, Runnable { + protected IIcon mIcon; + protected String mIconName; + + public CustomIcon(final String aIconName) { + this.mIconName = aIconName; + Meta_GT_Proxy.GT_BlockIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public void run() { + this.mIcon = Meta_GT_Proxy.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + } + } + + + public enum ItemIcons implements Interface_IconContainer, Runnable { + VOID, // The Empty Texture + RENDERING_ERROR, //The Purple/Black Texture + SKOOKUMCHOOCHER, //The Skookum Tool Texture + PUMP, // The Hand Pump Texture + TURBINE_SMALL, TURBINE_LARGE, TURBINE_HUGE; + + /* public static final Interface_IconContainer[] + DURABILITY_BAR = new Interface_IconContainer[]{ + DURABILITY_BAR_0, + DURABILITY_BAR_1, + DURABILITY_BAR_2, + DURABILITY_BAR_3, + DURABILITY_BAR_4, + DURABILITY_BAR_5, + DURABILITY_BAR_6, + DURABILITY_BAR_7, + DURABILITY_BAR_8, + }, + ENERGY_BAR = new Interface_IconContainer[]{ + ENERGY_BAR_0, + ENERGY_BAR_1, + ENERGY_BAR_2, + ENERGY_BAR_3, + ENERGY_BAR_4, + ENERGY_BAR_5, + ENERGY_BAR_6, + ENERGY_BAR_7, + ENERGY_BAR_8, + };*/ + + //public static final Interface_Texture[] ERROR_RENDERING = new Interface_Texture[]{new GregtechRenderedTexture(RENDERING_ERROR)}; + + protected IIcon mIcon, mOverlay; + + private ItemIcons() { + Meta_GT_Proxy.GT_ItemIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return this.mOverlay; + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; + } + + @Override + public void run() { + this.mIcon = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + "iconsets/" + this); + this.mOverlay = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + "iconsets/" + this + "_OVERLAY"); + } + + public static class CustomIcon implements Interface_IconContainer, Runnable { + protected IIcon mIcon, mOverlay; + protected String mIconName; + + public CustomIcon(final String aIconName) { + this.mIconName = aIconName; + Meta_GT_Proxy.GT_ItemIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return this.mOverlay; + } + + @Override + public void run() { + this.mIcon = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + this.mIconName); + this.mOverlay = Meta_GT_Proxy.sItemIcons.registerIcon(CORE.MODID+ ":" + this.mIconName + "_OVERLAY"); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; + } + } + } + +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java new file mode 100644 index 0000000000..105023065c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechToolDictNames.java @@ -0,0 +1,7 @@ +package gtPlusPlus.xmod.gregtech.api.enums; + +public enum GregtechToolDictNames { + + craftingToolSkookumChoocher, craftingToolHandPump, craftingToolAngleGrinder, craftingToolElectricSnips, craftingToolElectricLighter, craftingToolElectricButcherKnife; + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java new file mode 100644 index 0000000000..04d8d91201 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java @@ -0,0 +1,93 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_Base; + +public class CONTAINER_AdvancedBoiler + extends GT_ContainerMetaTile_Machine { + public int mWaterAmount = 0; + public int mSteamAmount = 0; + public int mProcessingEnergy = 0; + public int mTemperature = 2; + + public CONTAINER_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); + addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); + addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); + addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); + } + + @Override + public int getSlotCount() { + return 4; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { + return; + } + + int steamCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getSteamCapacity(); + int waterCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getCapacity(); + this.mTemperature = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mTemperature; + this.mProcessingEnergy = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; + this.mSteamAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam.amount); + this.mWaterAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid.amount); + + this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (steamCapacity - 100))); + this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / (waterCapacity - 100))); + this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mTemperature); + var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); + var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); + var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100: + this.mTemperature = par2; + break; + case 101: + this.mProcessingEnergy = par2; + break; + case 102: + this.mSteamAmount = par2; + break; + case 103: + this.mWaterAmount = par2; + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java new file mode 100644 index 0000000000..6d0eb6b14c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java @@ -0,0 +1,37 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The Container I use for all my Basic Machines + */ +public class CONTAINER_Cyclotron extends GT_ContainerMetaTile_Machine { + + public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + //this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); + } + + @Override + public int getSlotCount() { + return 0; + } + + @Override + public int getShiftClickSlotCount() { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java new file mode 100644 index 0000000000..a4508781aa --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java @@ -0,0 +1,80 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_Container_BasicTank; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.gui.GT_Slot_Render; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The Container I use for all my Basic Tanks + */ +public class CONTAINER_DeluxeTank extends GT_Container_BasicTank { + + public CONTAINER_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 41, 42)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 3, 59, 42)); + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (this.mTileEntity.isClientSide() || (this.mTileEntity.getMetaTileEntity() == null)) { + return; + } + if (((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) { + this.mContent = ((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount; + } else { + this.mContent = 0; + } + final Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + final ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mContent & 65535); + var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(final int par1, final int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100: + this.mContent = (this.mContent & -65536) | par2; + break; + case 101: + this.mContent = (this.mContent & 65535) | (par2 << 16); + break; + } + } + + @Override + public int getSlotCount() { + return 2; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java new file mode 100644 index 0000000000..17226a399e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java @@ -0,0 +1,51 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.slots.SlotAirFilter; +import net.minecraft.entity.player.InventoryPlayer; + + +public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine { + + public long maxEU = 0; + public long storedEU = 0; + + public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new SlotAirFilter(this.mTileEntity, 0, 80, 35)); + } + + @Override + public int getSlotCount() { + return 1; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } + + @Override + public void updateProgressBar(final int id, final int value) { + super.updateProgressBar(id, value); + switch (id) { + default: + break; + } + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java new file mode 100644 index 0000000000..df8df2f775 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java @@ -0,0 +1,39 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The Container I use for all my Basic Machines + */ +public class CONTAINER_IndustrialCentrifuge extends GT_ContainerMetaTile_Machine { + + public CONTAINER_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); + } + + @Override + public int getSlotCount() { + return 1; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java new file mode 100644 index 0000000000..78150aedbe --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java @@ -0,0 +1,32 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class CONTAINER_IronBlastFurnace extends GT_ContainerMetaTile_Machine { + public CONTAINER_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16)); + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25)); + } + + @Override + public int getSlotCount() { + return 4; + } + + @Override + public int getShiftClickSlotCount() { + return 2; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java new file mode 100644 index 0000000000..808eb90728 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java @@ -0,0 +1,42 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_MassFabricator; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The Container I use for all my Basic Machines + */ +public class CONTAINER_MatterFab extends GT_ContainerMetaTile_Machine { + + public int mUUA_USED = ((GregtechMetaTileEntity_MassFabricator)this.mTileEntity.getMetaTileEntity()).getAmplifierUsed(); + public int mUUM_MADE = ((GregtechMetaTileEntity_MassFabricator)this.mTileEntity.getMetaTileEntity()).getMatterProduced(); + + public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + //addSlotToContainer(new SlotNoInput(mTileEntity, 1, 152, 5)); + } + + @Override + public int getSlotCount() { + return 0; + } + + @Override + public int getShiftClickSlotCount() { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java new file mode 100644 index 0000000000..6a3322ab2e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java @@ -0,0 +1,244 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import gregtech.api.gui.GT_Container; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_LanguageManager; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; + +import java.util.Iterator; + +public class CONTAINER_MetaTileMachineLong extends GT_Container { + + public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mSteam = 0, mSteamStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; + private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oSteam = 0, oSteamStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0; + + public long pEnergy, pStorage; + private long nEnergy, nStorage; + + public short pIntMaxCountCurrent, pIntMaxCountMax; + private short nIntMaxCountCurrent, nIntMaxCountMax; + + public CONTAINER_MetaTileMachineLong(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + + mTileEntity = aTileEntity; + + if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { + addSlots(aInventoryPlayer); + if (doesBindPlayerInventory()) bindPlayerInventory(aInventoryPlayer); + detectAndSendChanges(); + } else { + aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; + } + } + public CONTAINER_MetaTileMachineLong(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory) { + super(aInventoryPlayer, aTileEntity); + mTileEntity = aTileEntity; + + if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { + addSlots(aInventoryPlayer); + if (doesBindPlayerInventory() && doesBindInventory) bindPlayerInventory(aInventoryPlayer); + detectAndSendChanges(); + } else { + aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; + } + } + + private Pair getPowerStored(){ + final long mStoredPower = this.pEnergy; + long mMaxInts = (mStoredPower/Integer.MAX_VALUE); + long mLeftOver = (mStoredPower % Integer.MAX_VALUE); + if (mMaxInts < 0 || mMaxInts >= /*4294967298L*/ Integer.MAX_VALUE) { + return new Pair(-1, 0); + } + if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) { + mLeftOver = 0; + } + Pair power = new Pair((int) mMaxInts, (int) mLeftOver); + return power; + } + + private Pair getMaxPowerStored(){ + final long mMaxStoredPower = this.pStorage; + long mMaxInts = (mMaxStoredPower/Integer.MAX_VALUE); + long mLeftOver = (mMaxStoredPower % Integer.MAX_VALUE); + if (mMaxInts < 0 || mMaxInts >= /*4294967298L*/ Integer.MAX_VALUE) { + return new Pair(-1, 0); + } + if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) { + mLeftOver = 0; + } + Pair power = new Pair((int) mMaxInts, (int) mLeftOver); + return power; + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; + pStorage = Math.min(Long.MAX_VALUE, mTileEntity.getEUCapacity()); + pEnergy = Math.min(Long.MAX_VALUE, mTileEntity.getStoredEU()); + mSteamStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity()); + mSteam = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam()); + mOutput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage()); + mInput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage()); + mDisplayErrorCode = mTileEntity.getErrorDisplayID(); + mProgressTime = mTileEntity.getProgress(); + mMaxProgressTime = mTileEntity.getMaxProgress(); + mActive = mTileEntity.isActive() ? 1 : 0; + mTimer++; + + Pair powerPacket = getPowerStored(); + Pair maxPowerPacket = getMaxPowerStored(); + + int mPacketsToSend = powerPacket.getKey(); + int mLeftOverPowerStored = powerPacket.getValue(); + + int mMaxStorageA = maxPowerPacket.getKey(); + int mMaxStorageB = maxPowerPacket.getValue(); + + //Someone has a VERY FULL power supply. + if (mPacketsToSend == -1) { + Logger.INFO("TOO MUCH MATH - USE BIGINTEGER - GAME BREAKING BUG MAY OCCUR"); + return; + } + + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + if (mTimer % 500 == 10 || nEnergy != pEnergy) { + var1.sendProgressBarUpdate(this, 0, mLeftOverPowerStored & 65535); + var1.sendProgressBarUpdate(this, 1, mLeftOverPowerStored >>> 16); + var1.sendProgressBarUpdate(this, 7730, mPacketsToSend); + } + if (mTimer % 500 == 10 || nStorage != pStorage) { + var1.sendProgressBarUpdate(this, 2, mMaxStorageB & 65535); + var1.sendProgressBarUpdate(this, 3, mMaxStorageB >>> 16); + var1.sendProgressBarUpdate(this, 7731, mMaxStorageA); + } + if (mTimer % 500 == 10 || oOutput != mOutput) { + var1.sendProgressBarUpdate(this, 4, mOutput); + } + if (mTimer % 500 == 10 || oInput != mInput) { + var1.sendProgressBarUpdate(this, 5, mInput); + } + if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) { + var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode); + } + if (mTimer % 500 == 10 || oProgressTime != mProgressTime) { + var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535); + var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16); + } + if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) { + var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535); + var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16); + } + if (mTimer % 500 == 10 || oID != mID) { + var1.sendProgressBarUpdate(this, 15, mID); + } + if (mTimer % 500 == 10 || oActive != mActive) { + var1.sendProgressBarUpdate(this, 16, mActive); + } + if (mTimer % 500 == 10 || oSteam != mSteam) { + var1.sendProgressBarUpdate(this, 17, mSteam & 65535); + var1.sendProgressBarUpdate(this, 18, mSteam >>> 16); + } + if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) { + var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535); + var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16); + } + } + + oID = mID; + oSteam = mSteam; + oInput = mInput; + oActive = mActive; + oOutput = mOutput; + nEnergy = pEnergy; + nStorage = pStorage; + oSteamStorage = mSteamStorage; + oProgressTime = mProgressTime; + oMaxProgressTime = mMaxProgressTime; + oDisplayErrorCode = mDisplayErrorCode; + } + + @SideOnly(Side.CLIENT) + @Override + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + /*case 7730: + pIntMaxCountCurrent = par2;*/ + case 0: + pEnergy = pEnergy & -65536 | par2; + break; + case 1: + pEnergy = pEnergy & 65535 | par2 << 16; + break; + case 2: + pStorage = pStorage & -65536 | par2; + break; + case 3: + pStorage = pStorage & 65535 | par2 << 16; + break; + case 4: + mOutput = par2; + break; + case 5: + mInput = par2; + break; + case 6: + mDisplayErrorCode = par2; + break; + case 11: + mProgressTime = mProgressTime & -65536 | par2; + break; + case 12: + mProgressTime = mProgressTime & 65535 | par2 << 16; + break; + case 13: + mMaxProgressTime = mMaxProgressTime & -65536 | par2; + break; + case 14: + mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16; + break; + case 15: + mID = par2; + break; + case 16: + mActive = par2; + break; + case 17: + mSteam = mSteam & -65536 | par2; + break; + case 18: + mSteam = mSteam & 65535 | par2 << 16; + break; + case 19: + mSteamStorage = mSteamStorage & -65536 | par2; + break; + case 20: + mSteamStorage = mSteamStorage & 65535 | par2 << 16; + break; + } + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return mTileEntity.isUseableByPlayer(player); + } + + public String trans(String aKey, String aEnglish){ + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java new file mode 100644 index 0000000000..88b9661c95 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java @@ -0,0 +1,283 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The Container I use for all my Basic Machines + */ +public class CONTAINER_MultiMachine extends GT_ContainerMetaTile_Machine { + + public String[] mTileDescription; + private String[] oTileDescription; + + private GregtechMeta_MultiBlockBase mMCTEI; + private boolean mControllerSet = false; + + + public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + public static void setControllerInstance(CONTAINER_MultiMachine aContainer, IGregTechTileEntity aTile) { + if (aTile == null) { + return; + } + final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return; + } + if (aMetaTileEntity instanceof GregtechMeta_MultiBlockBase) { + aContainer.mMCTEI = (GregtechMeta_MultiBlockBase) aMetaTileEntity; + } + } + + public int aTotalTickTime = 0; + public int aMaxParallel = 0; + public int aPollutionTick = 0; + public int aMaxInputVoltage = 0; + public int aInputTier = 0; + public int aOutputTier = 0; + public int aRecipeDuration = 0; + public int aRecipeEU = 0; + public int aRecipeSpecial = 0; + public int aPollutionReduction = 0; + public int aStoredEnergy = 0; + public int aMaxEnergy = 0; + public int aEfficiency = 0; + + private int oTotalTickTime = 0; + private int oMaxParallel = 0; + private int oPollutionTick = 0; + private int oMaxInputVoltage = 0; + private int oInputTier = 0; + private int oOutputTier = 0; + private int oRecipeDuration = 0; + private int oRecipeEU = 0; + private int oRecipeSpecial = 0; + private int oPollutionReduction = 0; + private int oStoredEnergy = 0; + private int oMaxEnergy = 0; + private int oEfficiency = 0; + + private static Field timer; + //private static Field crafters; + + @Override + public final void detectAndSendChanges() { + super.detectAndSendChanges(); + if (this.mTileEntity.isClientSide() || this.mTileEntity.getMetaTileEntity() == null) { + return; + } + if (!mControllerSet) { + setControllerInstance(this, this.mTileEntity); + } + mControllerSet = (mMCTEI != null); + if (timer == null) { + timer = ReflectionUtils.getField(getClass(), "mTimer"); + } + if (crafters == null) { + //crafters = ReflectionUtils.getField(getClass(), "crafters"); + } + if (timer != null && crafters != null && mControllerSet) { + //Logger.INFO("Trying to update clientside GUI data"); + try { + //Logger.INFO("0"); + int aTimer = (int) ReflectionUtils.getFieldValue(timer, this); + + //List crafters1List = (List) crafters1; + List crafters2 = new ArrayList(); + //Logger.INFO("1"); + for (Object o : crafters) { + if (o instanceof ICrafting) { + crafters2.add((ICrafting) o); + } + } + //Logger.INFO("2"); + if (!crafters2.isEmpty()) { + //Logger.INFO("3"); + handleInitialFieldSetting(); + + try { + //Logger.INFO("4"); + for (final ICrafting var3 : crafters2) { + handleCraftingEvent(aTimer, var3); + } + //Logger.INFO("5"); + handleInternalFieldSetting(); + //Logger.INFO("6"); + } catch (Throwable t) { + + } + } + } catch (Throwable t) { + t.printStackTrace(); + } + } + else { + Logger.INFO("Failed."); + } + } + + public void handleInitialFieldSetting() { + this.aTotalTickTime = MathUtils.balance((int) mMCTEI.getTotalRuntimeInTicks(), Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aMaxParallel = mMCTEI.getMaxParallelRecipes(); + this.aPollutionTick = mMCTEI.getPollutionPerTick(null); + this.aMaxInputVoltage = MathUtils.balance((int) mMCTEI.getMaxInputVoltage(), Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aInputTier = MathUtils.balance((int) mMCTEI.getInputTier(), Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aOutputTier = MathUtils.balance((int) mMCTEI.getOutputTier(), Integer.MIN_VALUE, Integer.MAX_VALUE); + if (mMCTEI.mLastRecipe != null) { + GT_Recipe aRecipe = mMCTEI.mLastRecipe; + this.aRecipeDuration = MathUtils.balance(aRecipe.mDuration, Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aRecipeEU = MathUtils.balance(aRecipe.mEUt, Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aRecipeSpecial = MathUtils.balance(aRecipe.mSpecialValue, Integer.MIN_VALUE, Integer.MAX_VALUE); + } + this.aPollutionReduction = mMCTEI.getPollutionReductionForAllMufflers(); + + this.aStoredEnergy = MathUtils.balance((int) mMCTEI.getStoredEnergyInAllEnergyHatches(), Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aMaxEnergy = MathUtils.balance((int) mMCTEI.getMaxEnergyStorageOfAllEnergyHatches(), Integer.MIN_VALUE, Integer.MAX_VALUE); + this.aEfficiency = MathUtils.balance(mMCTEI.mEfficiency, Integer.MIN_VALUE, Integer.MAX_VALUE); + } + + public void handleCraftingEvent(int aTimer, ICrafting aCrafter) { + int aID = 750; + if (aTimer % 500 == 10 || this.oTotalTickTime != this.aTotalTickTime) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aTotalTickTime); + } + if (aTimer % 500 == 10 || this.oMaxParallel != this.aMaxParallel) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxParallel); + } + if (aTimer % 500 == 10 || this.oPollutionTick != this.aPollutionTick) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aPollutionTick); + } + if (aTimer % 500 == 10 || this.oMaxInputVoltage != this.aMaxInputVoltage) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxInputVoltage); + } + if (aTimer % 500 == 10 || this.oInputTier != this.aInputTier) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aInputTier); + } + if (aTimer % 500 == 10 || this.oOutputTier != this.aOutputTier) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aOutputTier); + } + if (aTimer % 500 == 10 || this.oRecipeDuration != this.aRecipeDuration) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeDuration); + } + if (aTimer % 500 == 10 || this.oRecipeEU != this.aRecipeEU) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeEU); + } + if (aTimer % 500 == 10 || this.oRecipeSpecial != this.aRecipeSpecial) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeSpecial); + } + if (aTimer % 500 == 10 || this.oPollutionReduction != this.aPollutionReduction) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aPollutionReduction); + } + if (aTimer % 500 == 10 || this.oStoredEnergy != this.aStoredEnergy) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aStoredEnergy); + } + if (aTimer % 500 == 10 || this.oMaxEnergy != this.aMaxEnergy) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxEnergy); + } + if (aTimer % 500 == 10 || this.oEfficiency != this.aEfficiency) { + aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aEfficiency); + } + } + + public void handleInternalFieldSetting() { + this.oTotalTickTime = this.aTotalTickTime; + this.oMaxParallel = this.aMaxParallel; + this.oPollutionTick = this.aPollutionTick; + this.oMaxInputVoltage = this.aMaxInputVoltage; + this.oInputTier = this.aInputTier; + this.oOutputTier = this.aOutputTier; + this.oRecipeDuration = this.aRecipeDuration; + this.oRecipeEU = this.aRecipeEU; + this.oRecipeSpecial = this.aRecipeSpecial; + this.oPollutionReduction = this.aPollutionReduction; + this.oStoredEnergy = this.aStoredEnergy; + this.oMaxEnergy = this.aMaxEnergy; + this.oEfficiency = this.aEfficiency; + } + + @SideOnly(Side.CLIENT) + @Override + public void updateProgressBar(final int par1, final int par2) { + super.updateProgressBar(par1, par2); + int shiftedSwitch = par1 - 750; + switch (shiftedSwitch) { + case 0: { + this.aTotalTickTime = par2; + break; + } + case 1: { + this.aMaxParallel = par2; + break; + } + case 2: { + this.aPollutionTick = par2; + break; + } + case 3: { + this.aMaxInputVoltage = par2; + break; + } + case 4: { + this.aInputTier = par2; + break; + } + case 5: { + this.aOutputTier = par2; + break; + } + case 6: { + this.aRecipeDuration = par2; + break; + } + case 7: { + this.aRecipeEU = par2; + break; + } + case 8: { + this.aRecipeSpecial = par2; + break; + } + case 9: { + this.aPollutionReduction = par2; + break; + } + case 10: { + this.aStoredEnergy = par2; + break; + } + case 11: { + this.aMaxEnergy = par2; + break; + } + case 12: { + this.aEfficiency = par2; + break; + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java new file mode 100644 index 0000000000..2d63a13d60 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java @@ -0,0 +1,27 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +public class CONTAINER_MultiMachine_NoPlayerInventory extends CONTAINER_MultiMachine { + + public CONTAINER_MultiMachine_NoPlayerInventory(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_MultiMachine_NoPlayerInventory(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + public boolean doesBindPlayerInventory() { + return false; + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) { + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java new file mode 100644 index 0000000000..937513751b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java @@ -0,0 +1,41 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.slots.SlotNoInput; + +import net.minecraft.entity.player.InventoryPlayer; + +public class CONTAINER_PowerSubStation extends GT_Container_MultiMachine { + + public CONTAINER_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, + final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot((IInventory) this.mTileEntity, 1, 155, 5)); + this.addSlotToContainer(new SlotNoInput((IInventory) this.mTileEntity, 2, 155, 23)); + + for (int i = 0; i < 9; ++i) { + this.addSlotToContainer(new Slot((IInventory) aInventoryPlayer, i, 8 + i * 18, 167)); + } + + } + + public int getSlotCount() { + return 10; + } + + public int getShiftClickSlotCount() { + return 1; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java new file mode 100644 index 0000000000..9a84ba66ab --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java @@ -0,0 +1,124 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.util.player.PlayerCache; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock; + +public class CONTAINER_SafeBlock +extends GT_ContainerMetaTile_Machine { + public CONTAINER_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + //public String UUID = ((BaseMetaTileEntity)mTileEntity).getMetaTileEntity().getBaseMetaTileEntity().getOwnerName(); + public UUID ownerUUID = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).ownerUUID; + public String tempPlayer = PlayerCache.lookupPlayerByUUID(this.ownerUUID); + public boolean blockStatus = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable; + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 9; x++) { + this.addSlotToContainer(new Slot(this.mTileEntity, x + (y * 9), 8 + (x * 18), 5 + (y * 18))); + } + } + this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1)); + this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1)); + this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1)); + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) { + final int runs = 0; + if (aSlotIndex < 27) { + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + final Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (this.mTileEntity.getMetaTileEntity() == null) { + return null; + } + if (aSlotIndex == 27) { + + + /*((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput); + if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput) { + if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bOutput != false)) { + + Utils.LOG_INFO(String.valueOf(Sys.is64Bit())); + Utils.messagePlayer(aPlayer, "Salmon"); + } + + GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); + } + return null;*/ + + + } + if (aSlotIndex == 28) {} + /* ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); + if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { + GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free"); + } else { + GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone"); + } + return null; + }*/ + if (aSlotIndex == 29) /*{ + if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) { + if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) { + makeIndestructible(aPlayer); + } + else { + + } + } else { + makeIndestructible(aPlayer); + } + return null; + }*/ + + { + ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable); + this.blockStatus = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable; + this.ownerUUID = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).ownerUUID; + //Utils.messagePlayer(aPlayer, "Is the safe locked? "+String.valueOf(((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable).toUpperCase()); + /*if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable != false)) { + UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); + Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer); + } + else { + UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); + Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer); + }*/ + return null; + } + + + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public int getSlotCount() { + return 27; + } + + @Override + public int getShiftClickSlotCount() { + return 27; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java new file mode 100644 index 0000000000..a3f58836e3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java @@ -0,0 +1,85 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntitySolarGenerator; + +public class CONTAINER_SolarGenerator +extends GT_ContainerMetaTile_Machine { + public int mWaterAmount = 0; + public int mSteamAmount = 0; + public int mProcessingEnergy = 0; + public int mTemperature = 2; + public CONTAINER_SolarGenerator(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + //addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); + //addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); + //addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); + //addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); + } + + @Override + public int getSlotCount() { + return 0; + } + + @Override + public int getShiftClickSlotCount() { + return 0; + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { + return; + } + this.mTemperature = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mSolarCharge; + this.mProcessingEnergy = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; + + this.mTemperature = Math.min(54, Math.max(0, (this.mTemperature * 54) / (((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + this.mEnergy = (int) Math.min(Integer.MAX_VALUE, this.mTileEntity.getStoredEU()); + this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, (this.mProcessingEnergy * 14) / 1000)); + + final Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + final ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mTemperature); + var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); + var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); + var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(final int par1, final int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100: + this.mTemperature = par2; + break; + case 101: + this.mProcessingEnergy = par2; + break; + case 102: + this.mSteamAmount = par2; + break; + case 103: + this.mWaterAmount = par2; + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java new file mode 100644 index 0000000000..6fcd53b139 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java @@ -0,0 +1,99 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase; + +public class CONTAINER_SteamCondenser extends GT_ContainerMetaTile_Machine +{ + public CONTAINER_SteamCondenser(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) + { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) + { + this.addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); + } + + @Override + public int getSlotCount() + { + return 4; + } + + @Override + public int getShiftClickSlotCount() + { + return 1; + } + + public int mWaterAmount = 0; + public int mSteamAmount = 0; + public int mProcessingEnergy = 0; + public int mTemperature = 2; + public long mTickingTime = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).RI; + + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { + return; + } + int steamCapacity = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).getSteamCapacity(); + int waterCapacity = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).getCapacity(); + this.mTemperature = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mTemperature; + this.mProcessingEnergy = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; + this.mSteamAmount = (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mSteam.amount); + this.mWaterAmount = (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mFluid.amount); + this.mTickingTime = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).RI; + + this.mTemperature = Math.min(54, Math.max(0, (this.mTemperature * 54) / (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + this.mSteamAmount = Math.min(54, Math.max(0, (this.mSteamAmount * 54) / (steamCapacity - 100))); + this.mWaterAmount = Math.min(54, Math.max(0, (this.mWaterAmount * 54) / (waterCapacity - 100))); + this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, (this.mProcessingEnergy * 14) / 1000)); + + final Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) + { + final ICrafting var1 = (ICrafting)var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mTemperature); + var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); + var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); + var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); + } + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(final int par1, final int par2) + { + super.updateProgressBar(par1, par2); + switch (par1) + { + case 100: + this.mTemperature = par2; break; + case 101: + this.mProcessingEnergy = par2; break; + case 102: + this.mSteamAmount = par2; break; + case 103: + this.mWaterAmount = par2; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java new file mode 100644 index 0000000000..dcab57c380 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java @@ -0,0 +1,78 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.gui.GT_Slot_Render; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.slots.SlotLockedInput; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.ItemStack; + +public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine { + + public int mContent = 0; + private ItemStack mLockedSlotStack = null; + + public CONTAINER_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new SlotLockedInput(this.mTileEntity, 0, 80, 17, mLockedSlotStack)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42)); + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { + if (this.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_TieredChest) { + this.mContent = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemCount; + mLockedSlotStack = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemStack; + } + if (this.mTileEntity.getMetaTileEntity() instanceof GT4Entity_Shelf_Large) { + this.mContent = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemCount; + mLockedSlotStack = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemStack; + } + else { + this.mContent = 0; + } + + Iterator var2 = this.crafters.iterator(); + + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mContent & 65535); + var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); + } + } + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100 : + this.mContent = this.mContent & -65536 | par2; + break; + case 101 : + this.mContent = this.mContent & 65535 | par2 << 16; + } + + } + + public int getSlotCount() { + return 2; + } + + public int getShiftClickSlotCount() { + return 1; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java new file mode 100644 index 0000000000..bf4dffb904 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java @@ -0,0 +1,71 @@ + +package gtPlusPlus.xmod.gregtech.api.gui; + +import java.util.List; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.slots.SlotBuzzSaw; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityTreeFarm; + +public class CONTAINER_TreeFarmer extends GT_ContainerMetaTile_Machine { + + public long maxEU = 0; + public long storedEU = 0; + + public CONTAINER_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new SlotBuzzSaw(this.mTileEntity, 1, 80, 17)); + } + + @Override + public int getSlotCount() { + return 1; + } + + @Override + public int getShiftClickSlotCount() { + return 1; + } + + @Override + public void updateProgressBar(final int id, final int value) { + super.updateProgressBar(id, value); + switch (id) { + case 100: + this.maxEU = value; + return; + case 101: + this.storedEU = value; + break; + default: + break; + } + } + + @SuppressWarnings("unchecked") + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + for(final ICrafting crafting : (List)this.crafters) { + crafting.sendProgressBarUpdate(this, 100, (int) ((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).maxEUStore()); + crafting.sendProgressBarUpdate(this, 101, (int) ((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).getEUVar()); + if (((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).isCorrectMachinePart(this.mTileEntity.getStackInSlot(1))){ + this.mTileEntity.markDirty(); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java new file mode 100644 index 0000000000..d532a98030 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java @@ -0,0 +1,44 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GUI_AdvancedBoiler + extends GT_GUIContainerMetaTile_Machine { + public GUI_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName) { + super(new CONTAINER_AdvancedBoiler(aInventoryPlayer, aTileEntity), "miscutils:textures/gui/" + aTextureName); + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString("Advanced Boiler", 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + int tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mSteamAmount; + if (tScale > 0) { + drawTexturedModalRect(x + 70, y + 25 + 54 - tScale, 194, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mWaterAmount; + if (tScale > 0) { + drawTexturedModalRect(x + 83, y + 25 + 54 - tScale, 204, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mTemperature; + if (tScale > 0) { + drawTexturedModalRect(x + 96, y + 25 + 54 - tScale, 214, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mProcessingEnergy; + if (tScale > 0) { + drawTexturedModalRect(x + 117, y + 44 + 14 - tScale, 177, 14 - tScale, 15, tScale + 1); + } + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java new file mode 100644 index 0000000000..0be44fa616 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java @@ -0,0 +1,44 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +public class GUI_Cyclotron extends GT_GUIContainerMetaTile_Machine +{ + public final String mNEI; + public final String mName; + + public GUI_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aNEI) { + super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), "gregtech:textures/gui/multimachines/" + "FusionComputer.png"); + this.mName = aName; + this.mNEI = aNEI; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 8, -10, 16448255); + if (this.mContainer != null) { + if ((((GT_Container_MultiMachine)this.mContainer).mDisplayErrorCode & 0x40) != 0x0) { + this.fontRendererObj.drawString("Incomplete Structure.", 10, 8, 16448255); + } + if (((GT_Container_MultiMachine)this.mContainer).mDisplayErrorCode == 0) { + if (((GT_Container_MultiMachine)this.mContainer).mActive == 0) { + this.fontRendererObj.drawString("Hit with Soft Hammer to (re-)start the Machine if it doesn't start.", -70, 170, 16448255); + } + else { + this.fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255); + } + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java new file mode 100644 index 0000000000..c6d8d4ef7e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java @@ -0,0 +1,37 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.StatCollector; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GUI_DeluxeTank extends GT_GUIContainerMetaTile_Machine { + + private final String mName; + + public GUI_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName) { + super(new CONTAINER_DeluxeTank(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "BasicTank.png"); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, (this.ySize - 96) + 2, 4210752); + this.fontRendererObj.drawString(this.mName, 8, 6, 4210752); + if (this.mContainer != null) { + this.fontRendererObj.drawString("Fuel | A | B |", 10, 20, 16448255); + //fontRendererObj.drawString(GT_Utility.parseNumberToString(((CONTAINER_DeluxeTank) mContainer).mContent), 10, 30, 16448255); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java new file mode 100644 index 0000000000..4b998f6487 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java @@ -0,0 +1,46 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + long maxPower = 0; + long storedPower = 0; + + public GUI_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_Hatch_Muffler_Advanced(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 8, 8, 16448255); + /* + * ReflectionUtils.setField(this.fontRendererObj, "underlineStyle", true); + * ReflectionUtils.setField(this.fontRendererObj, "italicStyle", true); + * ReflectionUtils.setField(this.fontRendererObj, "boldStyle", true); boolean + * isBold = ReflectionUtils.getField(this.fontRendererObj, "boldStyle"); + * this.fontRendererObj.drawString("Insert Air Filters - Bold: "+isBold, 8, 18, + * 16448255); + */ + if (this.mContainer != null) { + //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java new file mode 100644 index 0000000000..2e1f76f362 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java @@ -0,0 +1,73 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.lib.CORE; + + +public class GUI_IndustrialCentrifuge extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + private short counter = 0; + + public GUI_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_IndustrialCentrifuge(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 10, 8, 16448255); + if (this.counter >= 100){ + this.counter = 0; + } + else { + this.counter++; + } + if (this.mContainer != null) { + if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 1) != 0) { + this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); + } + if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 2) != 0) { + this.fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); + } + if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 4) != 0) { + this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); + } + if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 8) != 0) { + this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); + } + if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 32) != 0) { + this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); + } + if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 64) != 0) { + this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); + } + + if (((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode == 0) { + if (((CONTAINER_IndustrialCentrifuge) this.mContainer).mActive == 0) { + this.fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); + this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); + this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); + } else { + this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); + /*if (CORE.DEBUG){ + fontRendererObj.drawString("Debug Counter: "+counter, 10, 56, 16448255); + }*/ + } + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java new file mode 100644 index 0000000000..b44ad916b7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java @@ -0,0 +1,32 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.lib.CORE; + +public class GUI_IronBlastFurnace +extends GT_GUIContainerMetaTile_Machine { + public GUI_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(new CONTAINER_IronBlastFurnace(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI+"IronBlastFurnace.png"); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString("Iron Blast Furnace", 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if ((this.mContainer != null) && + (this.mContainer.mProgressTime > 0)) { + this.drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, 1 + ((this.mContainer.mProgressTime * 20) / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime)))), 11); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java new file mode 100644 index 0000000000..95bde9fd9f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java @@ -0,0 +1,81 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.lib.CORE; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The GUI-Container I use for all my Basic Machines + *

+ * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class + */ +public class GUI_MatterFab extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + int uuaUsed = 0; + int uumMade = 0; + + public GUI_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_MatterFab(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 10, 8, 16448255); + + + + if (this.mContainer != null) { + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 1) != 0) { + this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); + } + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 2) != 0) { + this.fontRendererObj.drawString("Screws are missing.", 10, 24, 16448255); + } + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 4) != 0) { + this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255); + } + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 8) != 0) { + this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255); + } + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 16) != 0) { + this.fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255); + } + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 32) != 0) { + this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255); + } + if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 64) != 0) { + this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255); + } + + if (((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode == 0) { + if (((CONTAINER_MatterFab) this.mContainer).mActive == 0) { + this.fontRendererObj.drawString("Hit with Soft Hammer", 10, 16, 16448255); + this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255); + this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255); + } else { + this.uuaUsed = ((CONTAINER_MatterFab) this.mContainer).mUUA_USED; + this.uumMade = ((CONTAINER_MatterFab) this.mContainer).mUUM_MADE; + this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255); + this.fontRendererObj.drawString("UU-Amplifier Used: "+this.uuaUsed, 10, 24, 16448255); + this.fontRendererObj.drawString("UU-Matter Fabricated: "+this.uumMade, 10, 32, 16448255); + } + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java new file mode 100644 index 0000000000..c78e7789b8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java @@ -0,0 +1,296 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The GUI-Container I use for all my Basic Machines + *

+ * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class + */ +public class GUI_MultiMachine extends GT_GUIContainerMetaTile_Machine { + + private final static Materials GOOD; + private final static Materials BAD; + private final String mName; + + private final static ConcurrentHashMap mToolStacks = new ConcurrentHashMap(); + + //net.minecraft.client.gui.inventory.GuiContainer.drawItemStack(ItemStack, int, int, String) + private final static Method mDrawItemStack; + + static { + GOOD = Materials.Uranium; + BAD = Materials.Plutonium; + + //net.minecraft.client.gui.inventory.GuiContainer.drawItemStack(ItemStack, int, int, String) + mDrawItemStack = ReflectionUtils.getMethod(GuiContainer.class, "drawItemStack", new Class[] {ItemStack.class, int.class, int.class, String.class}); + } + + public GUI_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_MultiMachine_NoPlayerInventory(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName != null ? aName : ""; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + if (this.mContainer != null) { + drawGuiInfoTextLayer(par1, par2); + drawGuiRepairStatusLayer(par1, par2); + } + } + + + protected void drawGuiInfoTextLayer(final float par1, final int par2) { + + if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 64) != 0) { + this.fontRendererObj.drawString(mName, 6, 7, 16448255); // Move down 8px + this.fontRendererObj.drawString("Incomplete Structure.", 6, 15, 16448255); // Move down 8px + } + else { + int aTotalTickTime = ((CONTAINER_MultiMachine) this.mContainer).aTotalTickTime; + int aMaxParallel = ((CONTAINER_MultiMachine) this.mContainer).aMaxParallel; + int aPollutionTick = ((CONTAINER_MultiMachine) this.mContainer).aPollutionTick; + int aMaxInputVoltage = ((CONTAINER_MultiMachine) this.mContainer).aMaxInputVoltage; + int aInputTier = ((CONTAINER_MultiMachine) this.mContainer).aInputTier; + int aOutputTier = ((CONTAINER_MultiMachine) this.mContainer).aOutputTier; + int aRecipeDuration = ((CONTAINER_MultiMachine) this.mContainer).aRecipeDuration; + int aRecipeEU = ((CONTAINER_MultiMachine) this.mContainer).aRecipeEU; + int aRecipeSpecial = ((CONTAINER_MultiMachine) this.mContainer).aRecipeSpecial; + int aEfficiency = ((CONTAINER_MultiMachine) this.mContainer).aEfficiency; + + int aPollutionReduction = ((CONTAINER_MultiMachine) this.mContainer).aPollutionReduction; + + + long aStoredEnergy = ((CONTAINER_MultiMachine) this.mContainer).aStoredEnergy; + long aMaxEnergy = ((CONTAINER_MultiMachine) this.mContainer).aMaxEnergy; + + /* + * Logic Block + */ + + long seconds = (aTotalTickTime/20); + int weeks = (int) (TimeUnit.SECONDS.toDays(seconds) / 7); + int days = (int) (TimeUnit.SECONDS.toDays(seconds) - 7 * weeks); + long hours = TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days) - TimeUnit.DAYS.toHours(7*weeks); + long minutes = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60); + long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) *60); + + ArrayList mInfo = new ArrayList(); + + String EU = StatCollector.translateToLocal("GTPP.info.eu"); + + //GTPP.machines.tier + + mInfo.add(mName); + + if (aInputTier > 0) { + mInfo.add(StatCollector.translateToLocal("GTPP.machines.input")+" "+StatCollector.translateToLocal("GTPP.machines.tier")+": "+ EnumChatFormatting.GREEN +GT_Values.VOLTAGE_NAMES[aInputTier]); + } + if (aOutputTier > 0) { + mInfo.add(StatCollector.translateToLocal("GTPP.machines.output")+" "+StatCollector.translateToLocal("GTPP.machines.tier")+": "+ EnumChatFormatting.GREEN +GT_Values.VOLTAGE_NAMES[aOutputTier]); + } + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.progress")+": "+ + EnumChatFormatting.GREEN + Integer.toString(((CONTAINER_MultiMachine) this.mContainer).mProgressTime/20) + EnumChatFormatting.RESET +" s / "+ + EnumChatFormatting.YELLOW + Integer.toString(((CONTAINER_MultiMachine) this.mContainer).mMaxProgressTime/20) + EnumChatFormatting.RESET +" s"); + + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.energy")+": "+ + EnumChatFormatting.GREEN + Long.toString(aStoredEnergy) + EnumChatFormatting.RESET +" "+EU+" / "+ + EnumChatFormatting.YELLOW + Long.toString(aMaxEnergy) + EnumChatFormatting.RESET +" "+EU+""); + + if (aRecipeEU != 0 && aRecipeDuration > 0) { + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage")+": "+ + EnumChatFormatting.RED + Integer.toString(-aRecipeEU) + EnumChatFormatting.RESET + " "+EU+"/t"); + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.duration")+": "+ + EnumChatFormatting.RED + Integer.toString(aRecipeDuration) + EnumChatFormatting.RESET + " ticks"); + if (aRecipeSpecial > 0) { + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.specialvalue")+": "+ + EnumChatFormatting.RED + Integer.toString(aRecipeEU) + EnumChatFormatting.RESET + ""); + } + } + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.mei")+": "+ + EnumChatFormatting.YELLOW+Long.toString(aMaxInputVoltage)+EnumChatFormatting.RESET+ " "+EU+"/t"+EnumChatFormatting.RESET); + + mInfo.add(StatCollector.translateToLocal(StatCollector.translateToLocal("GTPP.machines.tier")+": "+ + EnumChatFormatting.YELLOW+GT_Values.VN[GT_Utility.getTier(aMaxInputVoltage)]+ EnumChatFormatting.RESET)); + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.efficiency")+": "+ EnumChatFormatting.YELLOW+Float.toString(aEfficiency / 100.0F)+EnumChatFormatting.RESET + " %"); + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollution")+": "+ EnumChatFormatting.RED + (aPollutionTick*20)+ EnumChatFormatting.RESET+"/sec"); + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced")+": "+ EnumChatFormatting.GREEN + aPollutionReduction + EnumChatFormatting.RESET+" %"); + + mInfo.add(StatCollector.translateToLocal("GTPP.CC.parallel")+": "+EnumChatFormatting.GREEN+(aMaxParallel)+EnumChatFormatting.RESET); + + mInfo.add("Total Time Since Built: "); + mInfo.add("" + EnumChatFormatting.DARK_GREEN + Integer.toString(weeks)+EnumChatFormatting.RESET+" Weeks,"); + mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Integer.toString(days) +EnumChatFormatting.RESET+ " Days,"); + mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Long.toString(hours) +EnumChatFormatting.RESET+ " Hours,"); + mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Long.toString(minutes) +EnumChatFormatting.RESET+ " Minutes,"); + mInfo.add("" + EnumChatFormatting.DARK_GREEN+ Long.toString(second) +EnumChatFormatting.RESET+ " Seconds"); + + + + // Machine Name + //fontRendererObj.drawString(this.mName, 6, 7, 16448255); + + for (int i=0;i 177) { + this.fontRendererObj.drawString(this.trans("144", "Missing Turbine Rotor"), 10, + ((GT_Container_MultiMachine) this.mContainer).mActive == 0 ? 40 : 24, 16448255); + } + } + } + } + + } + + public String trans(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java new file mode 100644 index 0000000000..65ba8610dd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java @@ -0,0 +1,175 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; + +public class GUI_PowerSubStation extends GT_GUIContainerMetaTile_Machine { + public String mNEI; + String mName; + boolean[] mRepairStatus = new boolean[6]; + private static IIcon[] mGregToolIcons = new IIcon[6]; + + public GUI_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aNEI) { + super(new CONTAINER_PowerSubStation(aInventoryPlayer, aTileEntity, false), CORE.RES_PATH_GUI + "PowerSubStation.png"); + this.mName = aName; + this.mNEI = aNEI; + /** The X size of the inventory window in pixels. */ + this.xSize = 196; + /** The Y size of the inventory window in pixels. */ + this.ySize = 191; + for (IIcon g : mGregToolIcons) { + if (g == null) { + getToolTextures(); + } + } + } + + private static final boolean getToolTextures() { + mGregToolIcons[0] = Textures.ItemIcons.WRENCH.getIcon(); + mGregToolIcons[1] = Textures.ItemIcons.HANDLE_SCREWDRIVER.getIcon(); + mGregToolIcons[2] = Textures.ItemIcons.MORTAR.getIcon(); + mGregToolIcons[3] = Textures.ItemIcons.JACKHAMMER.getIcon(); + mGregToolIcons[4] = Textures.ItemIcons.HANDLE_SOLDERING.getIcon(); + mGregToolIcons[5] = Textures.ItemIcons.CROWBAR.getIcon(); + return true; + } + + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 8, -10, 16448255); + if (this.mContainer != null) { + + this.fontRendererObj.drawString("Error Code: "+((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode, 10, 142, 16448255); + + this.fontRendererObj.drawString("In", 178, 10, 16448255); + this.fontRendererObj.drawString("Out", 176, 28, 16448255); + + if (((this.mContainer).mDisplayErrorCode & 1) != 0) { + this.fontRendererObj.drawString("Pipe is loose.", 10, 8, 16448255); + mRepairStatus[0] = false; + } + else { + mRepairStatus[0] = true; + } + if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 2) != 0) { + this.fontRendererObj.drawString("Screws are missing.", 10, 16, 16448255); + mRepairStatus[1] = false; + } + else { + mRepairStatus[1] = true; + } + if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 4) != 0) { + this.fontRendererObj.drawString("Something is stuck.", 10, 24, 16448255); + mRepairStatus[2] = false; + } + else { + mRepairStatus[2] = true; + } + if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 8) != 0) { + this.fontRendererObj.drawString("Platings are dented.", 10, 32, 16448255); + mRepairStatus[3] = false; + } + else { + mRepairStatus[3] = true; + } + if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 16) != 0) { + this.fontRendererObj.drawString("Circuitry burned out.", 10, 40, 16448255); + mRepairStatus[4] = false; + } + else { + mRepairStatus[4] = true; + } + if ((((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode & 32) != 0) { + this.fontRendererObj.drawString("That doesn't belong there.", 10, 48, 16448255); + mRepairStatus[5] = false; + } + else { + mRepairStatus[5] = true; + } + if (((CONTAINER_PowerSubStation) this.mContainer).mDisplayErrorCode == 0) { + if (((CONTAINER_PowerSubStation) this.mContainer).mActive == 0) { + this.fontRendererObj.drawString( + "Hit with Soft Hammer to (re-)start the Machine if it doesn't start.", -70, 8, 16448255); + } else { + this.fontRendererObj.drawString("Running perfectly.", 10, 8, 16448255); + } + } + if (this.mContainer.mEnergy > 160000000 && this.mContainer.mEnergy < 160010000) { + this.fontRendererObj.drawString("160,000,000 EU", 50, 155, 16711680); + } else if (this.mContainer.mEnergy > 320000000 && this.mContainer.mEnergy < 320010000) { + this.fontRendererObj.drawString("320,000,000 EU", 50, 155, 16711680); + } else if (this.mContainer.mEnergy > 640000000 && this.mContainer.mEnergy < 640010000) { + this.fontRendererObj.drawString("640,000,000 EU", 50, 155, 16711680); + } else { + this.fontRendererObj.drawString(GT_Utility.formatNumbers((long) this.mContainer.mEnergy) + " EU", + 50, 155, 16711680); + } + } + } + + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + /** The X size of the inventory window in pixels. */ + if (this.xSize != 196) + this.xSize = 196; + /** The Y size of the inventory window in pixels. */ + if (this.ySize != 191) + this.ySize = 191; + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + final double tScale = this.mContainer.mEnergy / this.mContainer.mStorage; + this.drawTexturedModalRect(x + 5, y + 156, 0, 251, Math.min(147, (int) (tScale * 148.0)), 5); + + + //A1 + this.drawTexturedModalRect(x + 154, y + 76, 238, (!mRepairStatus[0] ? 0 : 18), 18, 18); + //A2 + this.drawTexturedModalRect(x + 154 + 20, y + 76, 238, (!mRepairStatus[1] ? 0 : 18), 18, 18); + //B1 + this.drawTexturedModalRect(x + 154, y + 76 + 18, 238, (!mRepairStatus[2] ? 0 : 18), 18, 18); + //B2 + this.drawTexturedModalRect(x + 154 + 20, y + 76 + 18, 238, (!mRepairStatus[3] ? 0 : 18), 18, 18); + //C1 + this.drawTexturedModalRect(x + 154, y + 76 + 36, 238, (!mRepairStatus[4] ? 0 : 18), 18, 18); + //C2 + this.drawTexturedModalRect(x + 154 + 20, y + 76 + 36, 238, (!mRepairStatus[5] ? 0 : 18), 18, 18); + + + if (mGregToolIcons[0] != null) { + //this.drawTexturedModelRectFromIcon(x + 154, y + 76, mGregToolIcons[0], 18, 18); + } + if (mGregToolIcons[1] != null) { + //this.drawTexturedModelRectFromIcon(x + 154 + 20, y + 76, mGregToolIcons[1], 18, 18); + } + if (mGregToolIcons[2] != null) { + //this.drawTexturedModelRectFromIcon(x + 154, y + 76 + 18, mGregToolIcons[2], 9, 9); + } + if (mGregToolIcons[3] != null) { + //this.drawTexturedModelRectFromIcon(x + 154 + 20, y + 76 + 18, mGregToolIcons[3], 9, 9); + } + if (mGregToolIcons[4] != null) { + //this.drawTexturedModelRectFromIcon(x + 154, y + 76 + 36, mGregToolIcons[4], 9, 9); + } + if (mGregToolIcons[5] != null) { + //this.drawTexturedModelRectFromIcon(x + 154 + 20, y + 76 + 36, mGregToolIcons[5], 9, 9); + } + + /*//Maint Done + this.drawTexturedModalRect(x + 154, y + 76, 238, 0, 18, 18); + //Maint Required + this.drawTexturedModalRect(x + 154 + 20, y + 76, 238, 18, 18, 18);*/ + + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java new file mode 100644 index 0000000000..c18d58b4b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java @@ -0,0 +1,51 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.lib.CORE; + +public class GUI_SafeBlock +extends GT_GUIContainerMetaTile_Machine { + public GUI_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(new CONTAINER_SafeBlock(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "SafeBlock.png"); + } + + //String UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID.toString(); + boolean blockStatus = ((CONTAINER_SafeBlock)this.mContainer).blockStatus; + //String tempPlayer; + + private void updateVars(){ + //UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID; + this.blockStatus = ((CONTAINER_SafeBlock)this.mContainer).blockStatus; + // tempPlayer = PlayerCache.lookupPlayerByUUID(UUID); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) + { + this.updateVars(); + //this.fontRendererObj.drawString("Owner: "+ tempPlayer, 64, 72, 4210752); + //this.fontRendererObj.drawString(": "+ UUID.toLowerCase(), 44, 82, 4210752); + this.fontRendererObj.drawString("Safe Status", 76, 61, 4210752); + if (this.blockStatus){ + this.fontRendererObj.drawString("Locked", 88, 73, 4210752); + } + else { + this.fontRendererObj.drawString("Unlocked", 82, 73, 4210752); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + /*String UUID = ((CONTAINER_SafeBlock)this.mContainer).UUID; + this.fontRendererObj.drawString("Owner UUID: "+ UUID, 8, 12, 4210752);*/ + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java new file mode 100644 index 0000000000..f0b3a0c879 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java @@ -0,0 +1,44 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GUI_SolarGenerator +extends GT_GUIContainerMetaTile_Machine { + public GUI_SolarGenerator(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aTextureName) { + super(new CONTAINER_SolarGenerator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aTextureName); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString("Solar Generator", 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + int tScale = ((CONTAINER_SolarGenerator) this.mContainer).mProcessingEnergy; + if (tScale > 0) { + this.drawTexturedModalRect(x + 70, (y + 25 + 54) - tScale, 194, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_SolarGenerator) this.mContainer).mEnergy; + if (tScale > 0) { + this.drawTexturedModalRect(x + 83, (y + 25 + 54) - tScale, 204, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_SolarGenerator) this.mContainer).mTemperature; + if (tScale > 0) { + this.drawTexturedModalRect(x + 96, (y + 25 + 54) - tScale, 214, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_SolarGenerator) this.mContainer).mProcessingEnergy; + if (tScale > 0) { + this.drawTexturedModalRect(x + 117, (y + 44 + 14) - tScale, 177, 14 - tScale, 15, tScale + 1); + } + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java new file mode 100644 index 0000000000..88a3e00bb5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.preloader.CORE_Preloader; +import net.minecraft.entity.player.InventoryPlayer; + +public class GUI_SteamCondenser extends GT_GUIContainerMetaTile_Machine +{ + long tickTime = 0; + + public GUI_SteamCondenser(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aTextureName) + { + super(new CONTAINER_SteamCondenser(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + aTextureName); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) + { + this.fontRendererObj.drawString("Condenser", 8, 4, 4210752); + if (CORE_Preloader.DEBUG_MODE){ + this.tickTime = ((CONTAINER_SteamCondenser)this.mContainer).mTickingTime; + this.fontRendererObj.drawString("Tick Time: "+this.tickTime, 8, 12, 4210752); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) + { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) + { + + int tScale = ((CONTAINER_SteamCondenser)this.mContainer).mSteamAmount; + if (tScale > 0) { + this.drawTexturedModalRect(x + 70, (y + 25 + 54) - tScale, 194, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_SteamCondenser)this.mContainer).mWaterAmount; + if (tScale > 0) { + this.drawTexturedModalRect(x + 83, (y + 25 + 54) - tScale, 204, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_SteamCondenser)this.mContainer).mTemperature; + if (tScale > 0) { + this.drawTexturedModalRect(x + 96, (y + 25 + 54) - tScale, 214, 54 - tScale, 10, tScale); + } + tScale = ((CONTAINER_SteamCondenser)this.mContainer).mProcessingEnergy; + if (tScale > 0) { + this.drawTexturedModalRect(x + 115, y + 44 + 2/* - tScale*/, 177, 14 - tScale, 15, 1+tScale); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java new file mode 100644 index 0000000000..d324c50dd0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java @@ -0,0 +1,38 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.StatCollector; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; + +public class GUI_SuperChest extends GT_GUIContainerMetaTile_Machine { + private final String mName; + + public GUI_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, + String aName) { + super(new CONTAINER_SuperChest(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png"); + this.mName = aName; + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, + 4210752); + this.fontRendererObj.drawString(this.mName, 8, 6, 4210752); + if (this.mContainer != null) { + this.fontRendererObj.drawString("Item Amount", 10, 20, 16448255); + this.fontRendererObj.drawString( + GT_Utility.parseNumberToString(((CONTAINER_SuperChest) this.mContainer).mContent), 10, 30, + 16448255); + } + + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java new file mode 100644 index 0000000000..b236b0ff32 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java @@ -0,0 +1,46 @@ + +package gtPlusPlus.xmod.gregtech.api.gui; + + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.lib.CORE; + +public class GUI_TreeFarmer extends GT_GUIContainerMetaTile_Machine { + + String mName = ""; + long maxPower = 0; + long storedPower = 0; + + public GUI_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) { + super(new CONTAINER_TreeFarmer(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + this.mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 64, 6, 16448255); + if (this.mContainer != null) { + this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + if (((CONTAINER_TreeFarmer) this.mContainer).mDisplayErrorCode == 0) { + this.fontRendererObj.drawString("Current Power: "+this.storedPower+"EU", 8, 52, 16448255); + this.fontRendererObj.drawString("Max Power: "+this.maxPower+"EU", 8, 60, 16448255); + this.fontRendererObj.drawString("Current operations left: "+(this.storedPower/32), 8, 68, 16448255); + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU; + this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU; + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java new file mode 100644 index 0000000000..79d1033bd0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java @@ -0,0 +1,105 @@ +package gtPlusPlus.xmod.gregtech.api.gui.basic; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +import gregtech.api.gui.*; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.slots.SlotPollutionScrubber; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * The Container I use for all my Basic Machines + */ +public class CONTAINER_PollutionCleaner extends GT_Container_BasicTank { + + public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false; + public int mReduction = 0; + + public CONTAINER_PollutionCleaner(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + + int tStartIndex = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).getInputSlot(); + int aTier = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mTier; + + + //Add 2 Item Slots + addSlotToContainer(new SlotPollutionScrubber(0, aTier, mTileEntity, tStartIndex++, 53, 25)); + addSlotToContainer(new SlotPollutionScrubber(1, aTier, mTileEntity, tStartIndex++, 107, 25)); + // Upgrade Slot + addSlotToContainer(new SlotPollutionScrubber(2, aTier, mTileEntity, tStartIndex++, 125, 63)); + + } + + @Override + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + Logger.INFO("Clicked on slot "+aSlotIndex); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; + + mReduction = ((GregtechMetaAtmosphericReconditioner) mTileEntity.getMetaTileEntity()).mPollutionReduction; + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 105, mReduction); + } + } + + @Override + public void addCraftingToCrafters(ICrafting par1ICrafting) { + super.addCraftingToCrafters(par1ICrafting); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 105: + mReduction = (par2); + break; + } + } + + @Override + public int getSlotStartIndex() { + return 0; + } + + @Override + public int getShiftClickStartIndex() { + return 0; + } + + @Override + public int getSlotCount() { + return getShiftClickSlotCount(); + } + + @Override + public int getShiftClickSlotCount() { + return 3; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java new file mode 100644 index 0000000000..7a9417eeb6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java @@ -0,0 +1,65 @@ +package gtPlusPlus.xmod.gregtech.api.gui.basic; + +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GUI_PollutionCleaner extends GT_GUIContainerMetaTile_Machine { + public final String mName; + public final String mNEI; + public final byte mProgressBarDirection; + public final byte mProgressBarAmount; + public int mReduction; + + public GUI_PollutionCleaner(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, + final String aName, final String aTextureFile) { + this(aInventoryPlayer, aTileEntity, aName, aTextureFile, "PollutionCleaner",(byte) 0, (byte) 1); + } + + public GUI_PollutionCleaner(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, + final String aName, final String aTextureFile, final String aNEI, final byte aProgressBarDirection, + final byte aProgressBarAmount) { + super(new CONTAINER_PollutionCleaner(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "PollutionCleaner.png"); + this.mProgressBarDirection = aProgressBarDirection; + this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); + this.mName = aName; + this.mNEI = aNEI; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { + this.fontRendererObj.drawString(this.mName, 8, 4, 4210752); + this.drawTooltip(par1, par2); + } + + private void drawTooltip(final int x2, final int y2) { + final int xStart = (this.width - this.xSize) / 2; + final int yStart = (this.height - this.ySize) / 2; + final int x3 = x2 - xStart; + final int y3 = y2 - yStart + 5; + final List list = new ArrayList(); + if (y3 >= 67 && y3 <= 84) { + if (x3 >= 77 && x3 <= 95) { + //Do Dumb shit + CONTAINER_PollutionCleaner aContainerCast = (CONTAINER_PollutionCleaner) this.mContainer; + mReduction = aContainerCast.mReduction; + list.add("Reduction: "+mReduction); + } + } + if (!list.isEmpty()) { + this.drawHoveringText(list, x3, y3, this.fontRendererObj); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java new file mode 100644 index 0000000000..cdca065e60 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java @@ -0,0 +1,184 @@ +package gtPlusPlus.xmod.gregtech.api.gui.fluidreactor; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_Container_BasicMachine; +import gregtech.api.gui.GT_Slot_Render; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.slots.SlotChemicalPlantInput; +import gtPlusPlus.core.slots.SlotNoInput; +import gtPlusPlus.core.slots.SlotNoInputLogging; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ChemicalReactor; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.ItemStack; + +public class Container_FluidReactor extends GT_Container_BasicMachine { + + public boolean mFluidTransfer_1 = false; + public boolean mFluidTransfer_2 = false; + public boolean oFluidTransfer_1 = false; + public boolean oFluidTransfer_2 = false; + + public Container_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + + // Gui Buttons + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 0, 8, 63)); // Fluid 1 + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 1, 44, 63)); + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 2, 26, 63)); // Fluid 2 + + int tStartIndex = 3; + // Input Slots + this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 8, 7)); + this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 26, 7)); + this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 44, 7)); + this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 62, 7)); + + // Output Slots + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 107, 16)); + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 125, 16)); + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 107, 34)); + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 125, 34)); + + // Cell Collector Slot + this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 116, 63)); + + + // Inputs Fluids + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 8, 42)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 26, 42)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 44, 42)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 62, 42)); + + // Output Fluids + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 143, 16)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 143, 34)); + + + + + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex == 0 || aSlotIndex == 2) { + if (this.mTileEntity != null && this.mTileEntity.isServerSide()) { + try { + final IMetaTileEntity aMetaTileEntity = this.mTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return null; + } + if (aMetaTileEntity instanceof GregtechMetaTileEntity_ChemicalReactor) { + //Set Tile + if (aSlotIndex == 0) { + ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_1 = !((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_1; + } + else if (aSlotIndex == 2) { + ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_2 = !((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_2; + } + return null; + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + } + //Logger.INFO("Clicked slot "+aSlotIndex); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (this.mTileEntity != null && this.mTileEntity.isServerSide()) { + try { + Iterator var2 = this.crafters.iterator(); + final IMetaTileEntity aMetaTileEntity = this.mTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + Logger.INFO("bad"); + return; + } + if (aMetaTileEntity instanceof GregtechMetaTileEntity_ChemicalReactor) { + //Read from Tile + this.mFluidTransfer_1 = ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_1; + this.mFluidTransfer_2 = ((GregtechMetaTileEntity_ChemicalReactor)aMetaTileEntity).mFluidTransfer_2; + int mTimer; + mTimer = (int) ReflectionUtils.getField(this.getClass(), "mTimer").get(this); + while (true) { + ICrafting var1; + do { + if (!var2.hasNext()) { + this.oFluidTransfer_1 = this.mFluidTransfer_1; + this.oFluidTransfer_2 = this.mFluidTransfer_2; + return; + } + var1 = (ICrafting) var2.next(); + if (mTimer % 500 == 10 || this.oFluidTransfer_1 != this.mFluidTransfer_1) { + var1.sendProgressBarUpdate(this, -50, this.mFluidTransfer_1 ? 1 : 0); + } + if (mTimer % 500 == 10 || this.oFluidTransfer_2 != this.mFluidTransfer_2) { + var1.sendProgressBarUpdate(this, -51, this.mFluidTransfer_2 ? 1 : 0); + } + } while (mTimer % 500 != 10); + } + } + else { + Logger.INFO("bad cast"); + } + } + catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + } + } + + } + + public void addCraftingToCrafters(ICrafting par1ICrafting) { + super.addCraftingToCrafters(par1ICrafting); + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + if (par1 > 0) { + super.updateProgressBar(par1, par2); + } + else { + switch (par1) { + case -50 : + this.mFluidTransfer_1 = par2 != 0; + break; + case -51 : + this.mFluidTransfer_2 = par2 != 0; + break; + default : + break; + } + } + } + + public int getSlotStartIndex() { + return 3; + } + + public int getShiftClickStartIndex() { + return 3; + } + + public int getSlotCount() { + return this.getShiftClickSlotCount() + 5 + 2; + } + + public int getShiftClickSlotCount() { + return 4; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java new file mode 100644 index 0000000000..1be79b40cc --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java @@ -0,0 +1,122 @@ +package gtPlusPlus.xmod.gregtech.api.gui.fluidreactor; + +import gregtech.api.gui.GT_Container_BasicMachine; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; + +import java.util.ArrayList; +import java.util.List; +import net.minecraft.entity.player.InventoryPlayer; + +public class GUI_FluidReactor extends GT_GUIContainerMetaTile_Machine { + public final String mName; + public final String mNEI; + public final byte mProgressBarDirection; + public final byte mProgressBarAmount; + + public GUI_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, + String aTextureFile, String aNEI) { + this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte) 0, (byte) 1); + } + + public GUI_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, + String aTextureFile, String aNEI, byte aProgressBarDirection, byte aProgressBarAmount) { + super(new Container_FluidReactor(aInventoryPlayer, aTileEntity), CORE.MODID+":textures/gui/FluidReactor.png"); + this.mProgressBarDirection = aProgressBarDirection; + this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount); + this.mName = aName; + this.mNEI = aNEI; + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(this.mName, 82, 5, 4210752); + this.drawTooltip(par1, par2); + } + + private void drawTooltip(int x2, int y2) { + int xStart = (this.width - this.xSize) / 2; + int yStart = (this.height - this.ySize) / 2; + int x = x2 - xStart; + int y = y2 - yStart + 5; + List list = new ArrayList(); + if (y >= 67 && y <= 84) { + if (x >= 7 && x <= 24) { + list.add("Fluid 1 Auto-Output"); + } + if (x >= 25 && x <= 42) { + list.add("Fluid 2 Auto-Output"); + } + if (x >= 43 && x <= 61) { + list.add("Item Auto-Output"); + } + } + + if (!list.isEmpty()) { + this.drawHoveringText(list, x, y, this.fontRendererObj); + } + + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + if (this.mContainer != null) { + if (((Container_FluidReactor) this.mContainer).mFluidTransfer_1) { + this.drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18); + } + if (((Container_FluidReactor) this.mContainer).mFluidTransfer_2) { + this.drawTexturedModalRect(x + 25, y + 62, 194, 18, 18, 18); + } + if (((GT_Container_BasicMachine) this.mContainer).mItemTransfer) { + this.drawTexturedModalRect(x + 43, y + 62, 176, 36, 18, 18); + } + + if (((GT_Container_BasicMachine) this.mContainer).mStuttering) { + this.drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18); + } + + if (this.mContainer.mMaxProgressTime > 0) { + int tSize = this.mProgressBarDirection < 2 ? 20 : 18; + int tProgress = Math + .max(1, Math + .min(tSize * this.mProgressBarAmount, + (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime + * tSize * this.mProgressBarAmount / this.mContainer.mMaxProgressTime)) + % (tSize + 1); + switch (this.mProgressBarDirection) { + case 0 : + this.drawTexturedModalRect(x + 82, y + 24, 176, 0, tProgress, 18); + break; + case 1 : + this.drawTexturedModalRect(x + 82 + 20 - tProgress, y + 24, 196 - tProgress, 0, tProgress, 18); + break; + case 2 : + this.drawTexturedModalRect(x + 82, y + 24, 176, 0, 20, tProgress); + break; + case 3 : + this.drawTexturedModalRect(x + 82, y + 24 + 18 - tProgress, 176, 18 - tProgress, 20, tProgress); + break; + case 4 : + tProgress = 20 - tProgress; + this.drawTexturedModalRect(x + 82, y + 24, 176, 0, tProgress, 18); + break; + case 5 : + tProgress = 20 - tProgress; + this.drawTexturedModalRect(x + 82 + 20 - tProgress, y + 24, 196 - tProgress, 0, tProgress, 18); + break; + case 6 : + tProgress = 18 - tProgress; + this.drawTexturedModalRect(x + 82, y + 24, 176, 0, 20, tProgress); + break; + case 7 : + tProgress = 18 - tProgress; + this.drawTexturedModalRect(x + 82, y + 24 + 18 - tProgress, 176, 18 - tProgress, 20, tProgress); + } + } + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java new file mode 100644 index 0000000000..e6203823b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java @@ -0,0 +1,60 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import gregtech.api.gui.GT_Container_1by1; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class CONTAINER_1by1_Turbine extends GT_Container_1by1 { + + public CONTAINER_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new SlotTurbine(mTileEntity, 0, 80, 35)); + } + + @Override + public int getShiftClickSlotCount() { + return 0; + } + + @Override + public boolean canDragIntoSlot(Slot par1Slot) { + return false; + } + + public class SlotTurbine extends Slot { + public SlotTurbine(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + } + @Override + public boolean isItemValid(final ItemStack itemstack) { + if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) { + if (itemstack.getItemDamage() >= 170 && itemstack.getItemDamage() <= 176) { + return true; + } + } + return false; + } + @Override + public int getSlotStackLimit() { + return 1; + } + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) { + return false; + } + @Override + public void putStack(ItemStack p_75215_1_) { + // TODO Auto-generated method stub + super.putStack(p_75215_1_); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java new file mode 100644 index 0000000000..1d396811c1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java @@ -0,0 +1,32 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class CONTAINER_2by2 extends GT_ContainerMetaTile_Machine { + + public CONTAINER_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 71, 26)); + addSlotToContainer(new Slot(mTileEntity, 1, 89, 26)); + addSlotToContainer(new Slot(mTileEntity, 2, 71, 44)); + addSlotToContainer(new Slot(mTileEntity, 3, 89, 44)); + } + + @Override + public int getSlotCount() { + return 4; + } + + @Override + public int getShiftClickSlotCount() { + return 4; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java new file mode 100644 index 0000000000..8efe60a06e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java @@ -0,0 +1,44 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class CONTAINER_4by4 extends GT_ContainerMetaTile_Machine { + + public CONTAINER_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 53, 8)); + addSlotToContainer(new Slot(mTileEntity, 1, 71, 8)); + addSlotToContainer(new Slot(mTileEntity, 2, 89, 8)); + addSlotToContainer(new Slot(mTileEntity, 3, 107, 8)); + addSlotToContainer(new Slot(mTileEntity, 4, 53, 26)); + addSlotToContainer(new Slot(mTileEntity, 5, 71, 26)); + addSlotToContainer(new Slot(mTileEntity, 6, 89, 26)); + addSlotToContainer(new Slot(mTileEntity, 7, 107, 26)); + addSlotToContainer(new Slot(mTileEntity, 8, 53, 44)); + addSlotToContainer(new Slot(mTileEntity, 9, 71, 44)); + addSlotToContainer(new Slot(mTileEntity, 10, 89, 44)); + addSlotToContainer(new Slot(mTileEntity, 11, 107, 44)); + addSlotToContainer(new Slot(mTileEntity, 12, 53, 62)); + addSlotToContainer(new Slot(mTileEntity, 13, 71, 62)); + addSlotToContainer(new Slot(mTileEntity, 14, 89, 62)); + addSlotToContainer(new Slot(mTileEntity, 15, 107, 62)); + } + + @Override + public int getSlotCount() { + return 16; + } + + @Override + public int getShiftClickSlotCount() { + return 16; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java new file mode 100644 index 0000000000..9596d41387 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java @@ -0,0 +1,282 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_Container; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.core.slots.SlotNoInput; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class CONTAINER_HatchNbtConsumable extends GT_Container { + + public final int mInputslotCount; + private final int mTotalSlotCount; + + public CONTAINER_HatchNbtConsumable(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aInputslotCount) { + super(aInventoryPlayer, aTileEntity); + mInputslotCount = aInputslotCount; + mTotalSlotCount = aInputslotCount*2; + mTileEntity = aTileEntity; + if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) { + addSlots(aInventoryPlayer); + if (doesBindPlayerInventory()) { + bindPlayerInventory(aInventoryPlayer); + } + detectAndSendChanges(); + } else { + aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; + } + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + if (mTotalSlotCount == 8) { + final int aSlotYStart = 26; + final int aSlotYFinish = aSlotYStart + (18*2); + final int aSlotXStart1 = 26; + final int aSlotXFinish1 = aSlotXStart1 + (18*2); + final int aSlotXStart2 = 116; + final int aSlotXFinish2 = aSlotXStart2 + (18*2); + int aSlotID = 0; + for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { + for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) { + addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y)); + } + } + for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { + for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) { + addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y)); + } + } + } + else if (mTotalSlotCount == 18) { + int aSlotYStart = 20; + int aSlotYFinish = aSlotYStart + (18*3); + int aSlotXStart1 = 26; + int aSlotXFinish1 = aSlotXStart1 + (18*3); + int aSlotXStart2 = 98; + int aSlotXFinish2 = aSlotXStart2 + (18*3); + int aSlotID = 0; + for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { + for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) { + addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y)); + } + } + for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { + for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) { + addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y)); + } + } + } + else if (mTotalSlotCount == 32) { + int aSlotYStart = 8; + int aSlotYFinish = aSlotYStart + (18*4); + int aSlotXStart1 = 8; + int aSlotXFinish1 = aSlotXStart1 + (18*4); + int aSlotXStart2 = 97; + int aSlotXFinish2 = aSlotXStart2 + (18*4); + int aSlotID = 0; + for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { + for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) { + addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y)); + } + } + for (int y = aSlotYStart; y < aSlotYFinish; y += 18) { + for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) { + addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y)); + } + } + } + } + + @Override + public int getSlotCount() { + return mTotalSlotCount; + } + + @Override + public int getShiftClickSlotCount() { + return mInputslotCount; + } + + /* + * Uselss stuff copied from GT + */ + + + public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0; + private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0; + + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; + mStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getEUCapacity()); + mEnergy = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU()); + mSteamStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity()); + mSteam = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam()); + mOutput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage()); + mInput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage()); + mDisplayErrorCode = mTileEntity.getErrorDisplayID(); + mProgressTime = mTileEntity.getProgress(); + mMaxProgressTime = mTileEntity.getMaxProgress(); + mActive = mTileEntity.isActive() ? 1 : 0; + mTimer++; + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + if (mTimer % 500 == 10 || oEnergy != mEnergy) { + var1.sendProgressBarUpdate(this, 0, mEnergy & 65535); + var1.sendProgressBarUpdate(this, 1, mEnergy >>> 16); + } + if (mTimer % 500 == 10 || oStorage != mStorage) { + var1.sendProgressBarUpdate(this, 2, mStorage & 65535); + var1.sendProgressBarUpdate(this, 3, mStorage >>> 16); + } + if (mTimer % 500 == 10 || oOutput != mOutput) { + var1.sendProgressBarUpdate(this, 4, mOutput); + } + if (mTimer % 500 == 10 || oInput != mInput) { + var1.sendProgressBarUpdate(this, 5, mInput); + } + if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) { + var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode); + } + if (mTimer % 500 == 10 || oProgressTime != mProgressTime) { + var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535); + var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16); + } + if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) { + var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535); + var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16); + } + if (mTimer % 500 == 10 || oID != mID) { + var1.sendProgressBarUpdate(this, 15, mID); + } + if (mTimer % 500 == 10 || oActive != mActive) { + var1.sendProgressBarUpdate(this, 16, mActive); + } + if (mTimer % 500 == 10 || oSteam != mSteam) { + var1.sendProgressBarUpdate(this, 17, mSteam & 65535); + var1.sendProgressBarUpdate(this, 18, mSteam >>> 16); + } + if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) { + var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535); + var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16); + } + } + + oID = mID; + oSteam = mSteam; + oInput = mInput; + oActive = mActive; + oOutput = mOutput; + oEnergy = mEnergy; + oStorage = mStorage; + oSteamStorage = mSteamStorage; + oProgressTime = mProgressTime; + oMaxProgressTime = mMaxProgressTime; + oDisplayErrorCode = mDisplayErrorCode; + } + + @SideOnly(Side.CLIENT) + @Override + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 0: + mEnergy = mEnergy & -65536 | par2; + break; + case 1: + mEnergy = mEnergy & 65535 | par2 << 16; + break; + case 2: + mStorage = mStorage & -65536 | par2; + break; + case 3: + mStorage = mStorage & 65535 | par2 << 16; + break; + case 4: + mOutput = par2; + break; + case 5: + mInput = par2; + break; + case 6: + mDisplayErrorCode = par2; + break; + case 11: + mProgressTime = mProgressTime & -65536 | par2; + break; + case 12: + mProgressTime = mProgressTime & 65535 | par2 << 16; + break; + case 13: + mMaxProgressTime = mMaxProgressTime & -65536 | par2; + break; + case 14: + mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16; + break; + case 15: + mID = par2; + break; + case 16: + mActive = par2; + break; + case 17: + mSteam = mSteam & -65536 | par2; + break; + case 18: + mSteam = mSteam & 65535 | par2 << 16; + break; + case 19: + mSteamStorage = mSteamStorage & -65536 | par2; + break; + case 20: + mSteamStorage = mSteamStorage & 65535 | par2 << 16; + break; + } + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return mTileEntity.isUseableByPlayer(player); + } + + public String trans(String aKey, String aEnglish){ + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); + } + + private static class ViewingSlot extends SlotNoInput { + + public ViewingSlot(IInventory inventory, int index, int x, int y) { + super(inventory, index, x, y); + } + + @Override + public boolean isItemValid(ItemStack itemstack) { + return false; + } + + @Override + public int getSlotStackLimit() { + return 1; + } + + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) { + return true; + } + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java new file mode 100644 index 0000000000..5623f0e224 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; + +public class GUI_1by1_Turbine extends GT_GUIContainerMetaTile_Machine { + + private final String mName; + + public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "1by1.png"); + mName = aName; + } + + public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "1by1.png"); + mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java new file mode 100644 index 0000000000..b427a632f7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GUI_2by2 extends GT_GUIContainerMetaTile_Machine { + + private final String mName; + + public GUI_2by2(CONTAINER_2by2 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(containerType, RES_PATH_GUI + "2by2.png"); + mName = aName; + } + + public GUI_2by2(CONTAINER_2by2 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(containerType, RES_PATH_GUI + aBackground + "2by2.png"); + mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java new file mode 100644 index 0000000000..aced4342b3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GUI_4by4 extends GT_GUIContainerMetaTile_Machine { + + private final String mName; + + public GUI_4by4(CONTAINER_4by4 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(containerType, RES_PATH_GUI + "4by4.png"); + mName = aName; + } + + public GUI_4by4(CONTAINER_4by4 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(containerType, RES_PATH_GUI + aBackground + "4by4.png"); + mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java new file mode 100644 index 0000000000..dd19571646 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java @@ -0,0 +1,59 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import gregtech.api.gui.GT_GUIContainer; + +public class GUI_HatchNbtConsumable extends GT_GUIContainer { + + private final String mName; + private final int mTotalSlotCount; + public final CONTAINER_HatchNbtConsumable mContainer; + + public GUI_HatchNbtConsumable(CONTAINER_HatchNbtConsumable aContainer, String aName) { + super(aContainer, RES_PATH_GUI + getTextureForGUI(aContainer.mInputslotCount*2)+".png"); + mContainer = aContainer; + mName = aName; + mTotalSlotCount = aContainer.mInputslotCount*2; + } + + private static final String getTextureForGUI(int aTotalSlotCOunt) { + if (aTotalSlotCOunt == 18) { + return "HatchNbtConsumable_3By3"; + } + else if (aTotalSlotCOunt == 32) { + return "HatchNbtConsumable_4By4"; + } + else { + return "HatchNbtConsumable_2By2"; + } + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + if (mTotalSlotCount == 18) { + fontRendererObj.drawString(mName, 8, 4, 4210752); + fontRendererObj.drawString("Stock", 25, 14, 4210752); + fontRendererObj.drawString("Active", 115, 14, 4210752); + } + else if (mTotalSlotCount == 32) { + //fontRendererObj.drawString("Slots: "+mTotalSlotCount, 8, 4, 4210752); + //fontRendererObj.drawString(mName, 8, 4, 4210752); + //fontRendererObj.drawString("Stock", 25, 16, 4210752); + //fontRendererObj.drawString("Active", 115, 16, 4210752); + } + else { + fontRendererObj.drawString(mName, 8, 4, 4210752); + fontRendererObj.drawString("Stock", 25, 16, 4210752); + fontRendererObj.drawString("Active", 115, 16, 4210752); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java new file mode 100644 index 0000000000..00d022c481 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.slots.SlotElectric; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_2by2; + +public class CONTAINER_Electric_2by2 extends CONTAINER_2by2{ + + public CONTAINER_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new SlotElectric(mTileEntity, 0, 71, 26)); + addSlotToContainer(new SlotElectric(mTileEntity, 1, 89, 26)); + addSlotToContainer(new SlotElectric(mTileEntity, 2, 71, 44)); + addSlotToContainer(new SlotElectric(mTileEntity, 3, 89, 44)); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java new file mode 100644 index 0000000000..1f833eb3cb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java @@ -0,0 +1,37 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.slots.SlotElectric; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_4by4; + +public class CONTAINER_Electric_4by4 extends CONTAINER_4by4{ + + public CONTAINER_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new SlotElectric(mTileEntity, 0, 53, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 1, 71, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 2, 89, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 3, 107, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 4, 53, 26)); + addSlotToContainer(new SlotElectric(mTileEntity, 5, 71, 26)); + addSlotToContainer(new SlotElectric(mTileEntity, 6, 89, 26)); + addSlotToContainer(new SlotElectric(mTileEntity, 7, 107, 26)); + addSlotToContainer(new SlotElectric(mTileEntity, 8, 53, 44)); + addSlotToContainer(new SlotElectric(mTileEntity, 9, 71, 44)); + addSlotToContainer(new SlotElectric(mTileEntity, 10, 89, 44)); + addSlotToContainer(new SlotElectric(mTileEntity, 11, 107, 44)); + addSlotToContainer(new SlotElectric(mTileEntity, 12, 53, 62)); + addSlotToContainer(new SlotElectric(mTileEntity, 13, 71, 62)); + addSlotToContainer(new SlotElectric(mTileEntity, 14, 89, 62)); + addSlotToContainer(new SlotElectric(mTileEntity, 15, 107, 62)); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java new file mode 100644 index 0000000000..9be7104bbc --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_2by2; + +public class GUI_Electric_2by2 extends GUI_2by2{ + + public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName); + } + + public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, RES_PATH_GUI + aBackground + "2by2.png"); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java new file mode 100644 index 0000000000..ed3fce5e2c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_4by4; + +public class GUI_Electric_4by4 extends GUI_4by4{ + + public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName); + } + + public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, RES_PATH_GUI + aBackground + "4by4.png"); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java new file mode 100644 index 0000000000..9a58e74ec4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java @@ -0,0 +1,69 @@ +package gtPlusPlus.xmod.gregtech.api.gui.power; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.gui.GT_Slot_Render; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_BasicTank; + +import java.util.Iterator; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; + +public class CONTAINER_BasicTank extends GT_ContainerMetaTile_Machine { + public int mContent = 0; + + public CONTAINER_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42)); + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { + if (((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) { + this.mContent = ((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount; + } else { + this.mContent = 0; + } + + Iterator var2 = this.crafters.iterator(); + + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mContent & 'ï¿¿'); + var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); + } + + } + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100 : + this.mContent = this.mContent & -65536 | par2; + break; + case 101 : + this.mContent = this.mContent & 'ï¿¿' | par2 << 16; + } + + } + + public int getSlotCount() { + return 2; + } + + public int getShiftClickSlotCount() { + return 1; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java new file mode 100644 index 0000000000..a03aac346b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.api.gui.power; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.StatCollector; + +public class GUI_BasicTank extends GT_GUIContainerMetaTile_Machine { + private final String mName; + + public GUI_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(new CONTAINER_BasicTank(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png"); + this.mName = aName; + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, + 4210752); + this.fontRendererObj.drawString(this.mName, 8, 6, 4210752); + if (this.mContainer != null) { + this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255); + this.fontRendererObj.drawString( + GT_Utility.parseNumberToString(((CONTAINER_BasicTank) this.mContainer).mContent), 10, 30, + 16448255); + } + + } + + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java new file mode 100644 index 0000000000..3c29b34e27 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/GregtechItemContainer.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public interface GregtechItemContainer { + public Item getItem(); + public Block getBlock(); + public boolean isStackEqual(Object aStack); + public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT); + public ItemStack get(long aAmount, Object... aReplacements); + public ItemStack getWildcard(long aAmount, Object... aReplacements); + public ItemStack getUndamaged(long aAmount, Object... aReplacements); + public ItemStack getAlmostBroken(long aAmount, Object... aReplacements); + public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements); + public GregtechItemContainer set(Item aItem); + public GregtechItemContainer set(ItemStack aStack); + public GregtechItemContainer registerOre(Object... aOreNames); + public GregtechItemContainer registerWildcardAsOre(Object... aOreNames); + public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements); + public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); + public boolean hasBeenSet(); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java new file mode 100644 index 0000000000..824bb258d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatEntity.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces; + +import ic2.api.energy.tile.IHeatSource; +import net.minecraftforge.common.util.ForgeDirection; + +public interface IHeatEntity extends IHeatSource, IHeatSink { + + public int getHeatBuffer(); + + public void setHeatBuffer(int HeatBuffer); + + public void addtoHeatBuffer(int heat); + + public int getTransmitHeat(); + + public int fillHeatBuffer(int maxAmount); + + public int getMaxHeatEmittedPerTick(); + + public void updateHeatEntity(); + + public int maxrequestHeatTick(ForgeDirection directionFrom); + + public int requestHeat(ForgeDirection directionFrom, int requestheat); + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java new file mode 100644 index 0000000000..80adcf0d51 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IHeatSink.java @@ -0,0 +1,13 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IHeatSink { + + + int maxHeatInPerTick(ForgeDirection var1); + + int addHeat(ForgeDirection var1, int var2); + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java new file mode 100644 index 0000000000..770f249648 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/IMetaTileEntityHeatPipe.java @@ -0,0 +1,14 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces; + +import java.util.ArrayList; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import net.minecraft.tileentity.TileEntity; + +public interface IMetaTileEntityHeatPipe extends IMetaTileEntity { + + + long transferHeat(byte var1, long var2, long var4, ArrayList var6); + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java new file mode 100644 index 0000000000..6bf048320f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java @@ -0,0 +1,343 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.material.Material; +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +public interface IGregtech_RecipeAdder { + /** + * Adds a Coke Oven Recipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInputb = second Input (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Creosote (not null, and respects StackSize) + * @param aFluidInput = fluid Input (can be null, and respects StackSize) + * @param aOutput = Output of the Coal/coke (can be null, and respects StackSize) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + //public boolean addCokeOvenRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue); + public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); + + + public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt); + + + public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt); + + + public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType); + + + /** + * Adds a Matter Fabricator Recipe + * + * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize) + * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addMatterFabricatorRecipe(FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt); + + /** + * Adds a Matter Fabricator Recipe + * + * @param aItemInput = ItemStack Input, can be null I assume. + * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) + * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addMatterFabricatorRecipe(ItemStack aItemInput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt); + + + + + /** + * Adds a Recipe for the Dehydrator. (up to 9 Outputs) + * + * @param aInput = Input itemstack (not null, and respects StackSize) + * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) + * @param aOutputItems = Itemstack[] (not null, and respects StackSize) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + + //public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt); + /*public boolean addDehydratorRecipe(FluidStack aFluid, FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);*/ + /*public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt); + public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt);*/ + + /** + * Adds a Recipe for the Dehydrator. (up to 9 Outputs) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize) + * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize) + * @param aOutputItems = ItemStack[] (not null, and respects StackSize) + * @param aChances = Output Change (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addDehydratorRecipe(ItemStack[] aInput, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt); + + + /** + * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aOutput, int aChance, int aDuration, int aEUt); + + /** + * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt); + + /** + * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) + * @param aOutputStack = Item Output (Can be null) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt); + + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt, int aSpecialValue); + + /** + * Adds a Recipe for the LFTRr. (up to 9 Inputs) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Salts (not null, and respects StackSize) + * @param aOutputStack = Item Output (Can be null) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @param aSpecialValue = Power produced in EU/t per dynamo + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue); + + + public boolean addLFTRRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); + public boolean addLFTRRecipe(ItemStack aInput1, FluidStack aInput2, ItemStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt); + public boolean addLFTRRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt); + + + /** + * Adds a custom Semifluid fuel for the GT++ SemiFluid Generators. + * @param aFuelItem - A Fluidstack to be consumed. + * @param aFuelValue - Fuel value in thousands (1 = 1000) + * @return - Was the Fuel added? + */ + public boolean addSemifluidFuel(FluidStack aFuelItem, int aFuelValue); + + /** + * Adds a custom Semifluid fuel for the GT++ SemiFluid Generators. + * @param aFuelItem - A Fluidstack to be consumed. + * @param aFuelValue - Fuel value in thousands (1 = 1000) + * @return - Was the Fuel added? + */ + public boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue); + + public boolean addFissionFuel( + FluidStack aInput1, FluidStack aInput2, FluidStack aInput3, + FluidStack aInput4, FluidStack aInput5, FluidStack aInput6, + FluidStack aInput7, FluidStack aInput8, FluidStack aInput9, + FluidStack aOutput1, FluidStack aOutput2, + int aDuration, int aEUt); + + public boolean addFissionFuel( + boolean aOptimise, + FluidStack aInput1, FluidStack aInput2, FluidStack aInput3, + FluidStack aInput4, FluidStack aInput5, FluidStack aInput6, + FluidStack aInput7, FluidStack aInput8, FluidStack aInput9, + FluidStack aOutput1, FluidStack aOutput2, + int aDuration, int aEUt); + + public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, + FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue); + + boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput, FluidStack aFluidOutput, + int[] aChances, int aDuration, int aEUt, int aSpecialValue); + + public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); + + + /** + * Adds a Recipe for the Machine Component Assembler. (up to 6 Inputs) + * + * @param aInputs = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = Input of a fluid (can be null, and respects StackSize) + * @param aOutput1 = Output ItemStack (not null, and respects StackSize) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + + public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); + + public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); + + public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); + + + public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2); + public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2); + + public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt); + /** + * Adds an Assemblyline Recipe + * + * @param aInputs must be != null, 4-16 inputs + * @param aFluidInputs 0-4 fluids + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt); + + /** + * Adds a Assemblyline Recipe + * + * @param aInputs elements should be: ItemStack for single item; + * ItemStack[] for multiple equivalent items; + * {OreDict, amount} for oredict. + */ + boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); + + + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu); + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu); + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack object, int time); + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, int aCircuit, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time, int eu); + + public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu); + + public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); + + public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); + + public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); + + public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput); + + public boolean addFluidExtractionRecipe(ItemStack input, FluidStack output, int aTime, int aEu); + + public boolean addFluidExtractionRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidOut, int aTime, int aEu); + + public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn); + + public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, FluidStack rFluidOut); + + public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, FluidStack rFluidOut, int aTime, int aEu); + + /** + * Adds a Fusion reactor Recipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInput2 = second Input (not null, and respects StackSize) + * @param plasma = Output of the Fusion (can be null, and respects StackSize) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aEu = The EU generated per Tick (can even be negative!) + * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) + */ + public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aFusionDurationInTicks, int aEu, int aSpecial); + /** + * Adds a Fusion reactor Recipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInput2 = second Input (not null, and respects StackSize) + * @param plasma = Output of the Fusion (can be null, and respects StackSize) + * @param aOutputChance = chance to output plasma (can be 0) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aEu = The EU generated per Tick (can even be negative!) + * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) + */ + public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial); + /** + * Adds a Fusion reactor Recipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInput2 = second Input (not null, and respects StackSize) + * @param plasma = Output of the Fusion (can be null, and respects StackSize) + * @param aOutputChance = chance to output plasma (can be 0) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aEu = The EU generated per Tick (can even be negative!) + * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) + */ + public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial); + + + public boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2, + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, + ItemStack aOutput2, int aDuration, int aEUt, int aLevel); + + public boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel); + + public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu); + public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu); + + public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier); + public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier); + + public boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aHeat); + + public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt); + + public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); + + public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden); + + public boolean addPulverisationRecipe(final ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, final ItemStack aOutput3); + + public boolean addMillingRecipe(Materials aMat, int aEU); + public boolean addMillingRecipe(Material aMat, int aEU); + + public boolean addFlotationRecipe(Materials aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU); + public boolean addFlotationRecipe(Material aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU); + + public boolean addpackagerRecipe(ItemStack aRecipeType, ItemStack aInput1, ItemStack aInput2, ItemStack aOutputStack1); + + public boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage); + + public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); + + public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); + + public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); + + public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU); + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java new file mode 100644 index 0000000000..b6c36483af --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_IconContainer.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +public interface Interface_IconContainer { + /** + * @return A regular Icon. + */ + public IIcon getIcon(); + + /** + * @return Icon of the Overlay (or null if there is no Icon) + */ + public IIcon getOverlayIcon(); + + /** + * @return the Default Texture File for this Icon. + */ + public ResourceLocation getTextureFile(); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java new file mode 100644 index 0000000000..e874258a7a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java @@ -0,0 +1,42 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import java.util.List; + +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.enums.SubTag; + +import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_Base; + +public interface Interface_ItemBehaviour { + public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); + + public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + + public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + + public ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); + + public List getAdditionalToolTips(E aItem, List aList, ItemStack aStack); + + public void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand); + + public boolean isItemStackUsable(E aItem, ItemStack aStack); + + public boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack); + + public ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack); + + public boolean hasProjectile(Gregtech_MetaItem_Base aItem, SubTag aProjectileType, ItemStack aStack); + + public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + + public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java new file mode 100644 index 0000000000..c997f14c9e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.Materials; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; + +public interface Interface_OreRecipeRegistrator { + /** + * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. + * + * @param aPrefix always != null + * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! + * @param aStack always != null + */ + public void registerOre(GregtechOrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); + + public void registerOre(GregtechOrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack copyAmount); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java new file mode 100644 index 0000000000..6037424d1f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator_GT.java @@ -0,0 +1,18 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.OrePrefixes; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; + +public interface Interface_OreRecipeRegistrator_GT { + /** + * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. + * + * @param aPrefix always != null + * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! + * @param aStack always != null + */ + public void registerOre(OrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java new file mode 100644 index 0000000000..74c996d116 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_Texture.java @@ -0,0 +1,20 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; + +public interface Interface_Texture { + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public boolean isValidTexture(); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java new file mode 100644 index 0000000000..ca167e4c7f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java @@ -0,0 +1,193 @@ +package gtPlusPlus.xmod.gregtech.api.interfaces.internal; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; + +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; + +import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool; +import net.minecraftforge.event.world.BlockEvent; + +/** + * The Stats for GT Tools. Not including any Material Modifiers. + *

+ * And this is supposed to not have any ItemStack Parameters as these are generic Stats. + */ +public interface Interface_ToolStats extends IToolStats{ + /** + * Called when aPlayer crafts this Tool + */ + @Override + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer); + + /** + * Called when this gets added to a Tool Item + */ + public void onStatsAddedToTool(Gregtech_MetaTool gregtech_MetaTool, int aID); + + /** + * @return Damage the Tool receives when breaking a Block. 100 is one Damage Point (or 100 EU). + */ + @Override + public int getToolDamagePerBlockBreak(); + + /** + * @return Damage the Tool receives when converting the drops of a Block. 100 is one Damage Point (or 100 EU). + */ + @Override + public int getToolDamagePerDropConversion(); + + /** + * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal. + */ + @Override + public int getToolDamagePerContainerCraft(); + + /** + * @return Damage the Tool receives when being used as Weapon, 200 is the normal Value, 100 for actual Weapons. + */ + @Override + public int getToolDamagePerEntityAttack(); + + /** + * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible. + */ + @Override + public int getBaseQuality(); + + /** + * @return The Damage Bonus for this Type of Tool against Mobs. 1.0F is normal punch. + */ + @Override + public float getBaseDamage(); + + /** + * @return This gets the Hurt Resistance time for Entities getting hit. (always does 1 as minimum) + */ + @Override + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity); + + /** + * @return This is a multiplier for the Tool Speed. 1.0F = no special Speed. + */ + @Override + public float getSpeedMultiplier(); + + /** + * @return This is a multiplier for the Tool Speed. 1.0F = no special Durability. + */ + @Override + public float getMaxDurabilityMultiplier(); + + @Override + public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity); + + @Override + public String getMiningSound(); + + @Override + public String getCraftingSound(); + + @Override + public String getEntityHitSound(); + + @Override + public String getBreakingSound(); + + @Override + public Enchantment[] getEnchantments(ItemStack aStack); + + @Override + public int[] getEnchantmentLevels(ItemStack aStack); + + /** + * @return If this Tool can be used for blocking Damage like a Sword. + */ + @Override + public boolean canBlock(); + + /** + * @return If this Tool can be used as an RC Crowbar. + */ + @Override + public boolean isCrowbar(); + + /** + * @return If this Tool can be used as an BC Wrench. + */ + public boolean isWrench(); + + /** + * @return If this Tool can be used as Weapon i.e. if that is the main purpose. + */ + @Override + public boolean isWeapon(); + + /** + * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something + */ + @Override + public boolean isRangedWeapon(); + + /** + * @return If this Tool can be used as Weapon i.e. if that is the main purpose. + */ + @Override + public boolean isMiningTool(); + + /** + * aBlock.getHarvestTool(aMetaData) can return the following Values for example. + * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" + * + * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check. + */ + @Override + public boolean isMinableBlock(Block aBlock, byte aMetaData); + + /** + * This lets you modify the Drop List, when this type of Tool has been used. + * + * @return the Amount of modified Items. + */ + @Override + public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + + /** + * @return Returns a broken Version of the Item. + */ + @Override + public ItemStack getBrokenItem(ItemStack aStack); + + /** + * @return the Damage actually done to the Mob. + */ + @Override + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); + + /** + * @return the Damage actually done to the Mob. + */ + @Override + public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); + + @Override + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack); + + @Override + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack); + + /** + * Called when this gets added to a Tool Item + */ + @Override + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java new file mode 100644 index 0000000000..43998577c9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java @@ -0,0 +1,192 @@ +package gtPlusPlus.xmod.gregtech.api.items; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.BlockDispenser; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.dispenser.*; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.IProjectileItem; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; + +/** + * Extended by most Items, also used as a fallback Item, to prevent the accidental deletion when Errors occur. + */ +public class Gregtech_Generic_Item extends Item implements IProjectileItem { + private final String mName, mTooltip; + protected IIcon mIcon; + + public Gregtech_Generic_Item(final String aUnlocalized, final String aEnglish, final String aEnglishTooltip) { + this(aUnlocalized, aEnglish, aEnglishTooltip, true); + } + + public Gregtech_Generic_Item(final String aUnlocalized, final String aEnglish, final String aEnglishTooltip, final boolean aWriteToolTipIntoLangFile) { + super(); + this.mName = aUnlocalized; + GT_LanguageManager.addStringLocalization(this.mName + ".name", aEnglish); + if (GT_Utility.isStringValid(aEnglishTooltip)) { + GT_LanguageManager.addStringLocalization(this.mTooltip = this.mName + ".tooltip_main", aEnglishTooltip, aWriteToolTipIntoLangFile); + } else { + this.mTooltip = null; + } + this.setCreativeTab(AddToCreativeTab.tabMachines); + GameRegistry.registerItem(this, this.mName, CORE.MODID); + BlockDispenser.dispenseBehaviorRegistry.putObject(this, new GT_Item_Dispense()); + } + + @Override + public final Item setUnlocalizedName(final String aName) { + return this; + } + + @Override + public final String getUnlocalizedName() { + return this.mName; + } + + @Override + public String getUnlocalizedName(final ItemStack aStack) { + return this.getHasSubtypes() ? this.mName + "." + this.getDamage(aStack) : this.mName; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(final IIconRegister aIconRegister) { + this.mIcon = aIconRegister.registerIcon(CORE.MODID+":"+this.mName); + } + + @Override + public boolean doesSneakBypassUse(final World aWorld, final int aX, final int aY, final int aZ, final EntityPlayer aPlayer) { + return true; + } + + @Override + public IIcon getIconFromDamage(final int par1) { + return this.mIcon; + } + + public int getTier(final ItemStack aStack) { + return 0; + } + + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + if ((this.getMaxDamage() > 0) && !this.getHasSubtypes()) { + aList.add((aStack.getMaxDamage() - this.getDamage(aStack)) + " / " + aStack.getMaxDamage()); + } + if (this.mTooltip != null) { + aList.add(GT_LanguageManager.getTranslation(this.mTooltip)); + } + if (GT_ModHandler.isElectricItem(aStack)) { + aList.add("Tier: " + this.getTier(aStack)); + } + this.addAdditionalToolTips(aList, aStack); + } + + protected void addAdditionalToolTips(final List aList, final ItemStack aStack) { + // + } + + @Override + public void onCreated(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + this.isItemStackUsable(aStack); + } + + public boolean isItemStackUsable(final ItemStack aStack) { + return true; + } + + public ItemStack onDispense(final IBlockSource aSource, final ItemStack aStack) { + final EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); + final IPosition iposition = BlockDispenser.func_149939_a(aSource); + final ItemStack itemstack1 = aStack.splitStack(1); + BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition); + return aStack; + } + + @Override + public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final double aX, final double aY, final double aZ) { + return null; + } + + @Override + public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final EntityLivingBase aEntity, final float aSpeed) { + return null; + } + + @Override + public boolean hasProjectile(final SubTag aProjectileType, final ItemStack aStack) { + return false; + } + + @Override + public ItemStack getContainerItem(final ItemStack aStack) { + return null; + } + + @Override + public boolean hasContainerItem(final ItemStack aStack) { + return this.getContainerItem(aStack) != null; + } + + public static class GT_Item_Dispense extends BehaviorProjectileDispense { + @Override + public ItemStack dispenseStack(final IBlockSource aSource, final ItemStack aStack) { + return ((Gregtech_Generic_Item) aStack.getItem()).onDispense(aSource, aStack); + } + + @Override + protected IProjectile getProjectileEntity(final World aWorld, final IPosition aPosition) { + return null; + } + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + if (stack.getDisplayName().contains("LuV")){ + HEX_OxFFFFFF = 0xffffcc; + } + else if (stack.getDisplayName().contains("ZPM")){ + HEX_OxFFFFFF = 0xace600; + } + else if (stack.getDisplayName().contains("UV")){ + HEX_OxFFFFFF = 0xffff00; + } + else if (stack.getDisplayName().contains("MAX")){ + HEX_OxFFFFFF = 0xff0000; + } + else if (stack.getDisplayName().contains("Sodium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); + } + else if (stack.getDisplayName().contains("Cadmium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); + } + else if (stack.getDisplayName().contains("Lithium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); + } + else { + HEX_OxFFFFFF = 0xffffff; + } + return HEX_OxFFFFFF; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java new file mode 100644 index 0000000000..12b90c9a6c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java @@ -0,0 +1,345 @@ +package gtPlusPlus.xmod.gregtech.api.items; + +import static gregtech.api.enums.GT_Values.D1; + +import java.util.*; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.interfaces.IFoodStat; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ItemBehaviour; + +public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { + /** + * All instances of this Item Class are listed here. + * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. + *

+ * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. + */ + public static final HashMap sInstances = new HashMap<>(); + + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + + public final short mOffset, mItemAmount; + public final BitSet mEnabledItems; + public final BitSet mVisibleItems; + public final IIcon[][] mIconList; + + public final HashMap mFoodStats = new HashMap<>(); + public final HashMap mElectricStats = new HashMap<>(); + public final HashMap mFluidContainerStats = new HashMap<>(); + public final HashMap mBurnValues = new HashMap<>(); + + /** + * Creates the Item using these Parameters. + * + * @param aUnlocalized The Unlocalized Name of this Item. + */ + public Gregtech_MetaItem(final String aUnlocalized, final short aOffset, final short aItemAmount) { + super(aUnlocalized); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setHasSubtypes(true); + this.setMaxDamage(0); + this.mEnabledItems = new BitSet(aItemAmount); + this.mVisibleItems = new BitSet(aItemAmount); + + this.mOffset = (short) Math.min(32766, aOffset); + this.mItemAmount = (short) Math.min(aItemAmount, 32766 - this.mOffset); + this.mIconList = new IIcon[aItemAmount][1]; + + sInstances.put(this.getUnlocalizedName(), this); + } + + /** + * This adds a Custom Item to the ending Range. + * + * @param aID The Id of the assigned Item [0 - mItemAmount] (The MetaData gets auto-shifted by +mOffset) + * @param aEnglish The Default Localized Name of the created Item + * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip + * @param aFoodBehavior The Food Value of this Item. Can be null aswell. Just a convenience thing. + * @param aRandomData The OreDict Names you want to give the Item. Also used for TC Aspects and some other things. + * @return An ItemStack containing the newly created Item. + */ + public final ItemStack addItem(final int aID, final String aEnglish, String aToolTip, final Object... aRandomData) { + if (aToolTip == null) { + aToolTip = ""; + } + if ((aID >= 0) && (aID < this.mItemAmount)) { + final ItemStack rStack = new ItemStack(this, 1, this.mOffset + aID); + this.mEnabledItems.set(aID); + this.mVisibleItems.set(aID); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".name", aEnglish); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(rStack) + ".tooltip", aToolTip); + final List tAspects = new ArrayList<>(); + // Important Stuff to do first + for (final Object tRandomData : aRandomData) { + if (tRandomData instanceof SubTag) { + if (tRandomData == SubTag.INVISIBLE) { + this.mVisibleItems.set(aID, false); + continue; + } + if (tRandomData == SubTag.NO_UNIFICATION) { + GT_OreDictUnificator.addToBlacklist(rStack); + continue; + } + } + } + // now check for the rest + for (final Object tRandomData : aRandomData) { + if (tRandomData != null) { + boolean tUseOreDict = true; + + if (tRandomData instanceof Interface_ItemBehaviour) { + this.addItemBehavior(this.mOffset + aID, (Interface_ItemBehaviour) tRandomData); + tUseOreDict = false; + } + if (tRandomData instanceof IItemContainer) { + ((IItemContainer) tRandomData).set(rStack); + tUseOreDict = false; + } + if (tRandomData instanceof SubTag) { + continue; + } + if (tRandomData instanceof TC_AspectStack) { + ((TC_AspectStack) tRandomData).addToAspectList(tAspects); + continue; + } + if (tRandomData instanceof ItemData) { + if (GT_Utility.isStringValid(tRandomData)) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + } else { + GT_OreDictUnificator.addItemData(rStack, (ItemData) tRandomData); + } + continue; + } + if (tUseOreDict) { + GT_OreDictUnificator.registerOre(tRandomData, rStack); + continue; + } + } + } + if (GregTech_API.sThaumcraftCompat != null) { + GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); + } + return rStack; + } + return null; + } + + /** + * Sets the Furnace Burn Value for the Item. + * + * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aValue 200 = 1 Burn Process = 500 EU, max = 32767 (that is 81917.5 EU) + * @return the Item itself for convenience in constructing. + */ + public final Gregtech_MetaItem setBurnValue(final int aMetaValue, final int aValue) { + if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length())) || (aValue < 0)) { + return this; + } + if (aValue == 0) { + this.mBurnValues.remove((short) aMetaValue); + } else { + this.mBurnValues.put((short) aMetaValue, aValue > Short.MAX_VALUE ? Short.MAX_VALUE : (short) aValue); + } + return this; + } + + /** + * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) + * @param aTransferLimit Transfer Limit. + * @param aTier The electric Tier. + * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). + * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) + * Use -2 if you want to make this Battery dischargeable. + * Use -3 if you want to make this Battery charge/discharge-able. + * @return the Item itself for convenience in constructing. + */ + public final Gregtech_MetaItem setElectricStats(final int aMetaValue, final long aMaxCharge, final long aTransferLimit, final long aTier, final long aSpecialData, final boolean aUseAnimations) { + if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length()))) { + return this; + } + if (aMaxCharge == 0) { + this.mElectricStats.remove((short) aMetaValue); + } else { + this.mElectricStats.put((short) aMetaValue, new Long[]{aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData}); + if ((aMetaValue >= this.mOffset) && aUseAnimations) { + this.mIconList[aMetaValue - this.mOffset] = Arrays.copyOf(this.mIconList[aMetaValue - this.mOffset], Math.max(9, this.mIconList[aMetaValue - this.mOffset].length)); + } + } + return this; + } + + /** + * @param aMetaValue the Meta Value of the Item you want to set it to. [0 - 32765] + * @param aMaxCharge Maximum Charge. (if this is == 0 it will remove the Electric Behavior) + * @param aTransferLimit Transfer Limit. + * @param aTier The electric Tier. + * @param aSpecialData If this Item has a Fixed Charge, like a SingleUse Battery (if > 0). + * Use -1 if you want to make this Battery chargeable (the use and canUse Functions will still discharge if you just use this) + * Use -2 if you want to make this Battery dischargeable. + * Use -3 if you want to make this Battery charge/discharge-able. + * @return the Item itself for convenience in constructing. + */ + public final Gregtech_MetaItem setFluidContainerStats(final int aMetaValue, final long aCapacity, final long aStacksize) { + if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length()))) { + return this; + } + if (aCapacity < 0) { + this.mElectricStats.remove((short) aMetaValue); + } else { + this.mFluidContainerStats.put((short) aMetaValue, new Long[]{aCapacity, Math.max(1, aStacksize)}); + } + return this; + } + + /** + * @return if this MetaGenerated Item should use my Default Renderer System. + */ + public boolean useStandardMetaItemRenderer() { + return true; + } + + /** + * @return the Color Modulation the Material is going to be rendered with. + */ + public short[] getRGBa(final ItemStack aStack) { + return Materials._NULL.getRGBA(); + } + + /** + * @return the Icon the Material is going to be rendered with. + */ + public IIconContainer getIconContainer(final int aMetaData) { + return null; + } + + /* ---------- INTERNAL OVERRIDES ---------- */ + + @Override + public ItemStack onItemRightClick(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + return super.onItemRightClick(aStack, aWorld, aPlayer); + } + + @Override + public int getMaxItemUseDuration(final ItemStack aStack) { + return this.mFoodStats.get((short) this.getDamage(aStack)) == null ? 0 : 32; + } + + @Override + public EnumAction getItemUseAction(final ItemStack aStack) { + return EnumAction.none; + } + + @Override + public final ItemStack onEaten(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + final IFoodStat tStat = this.mFoodStats.get((short) this.getDamage(aStack)); + if (tStat != null) { + + } + return aStack; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { + for (int i = 0, j = this.mEnabledItems.length(); i < j; i++) { + if (this.mVisibleItems.get(i) || (D1 && this.mEnabledItems.get(i))) { + final Long[] tStats = this.mElectricStats.get((short) (this.mOffset + i)); + if ((tStats != null) && (tStats[3] < 0)) { + final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); + this.setCharge(tStack, Math.abs(tStats[0])); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + if ((tStats == null) || (tStats[3] != -2)) { + final ItemStack tStack = new ItemStack(this, 1, this.mOffset + i); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + } + } + } + + @Override + @SideOnly(Side.CLIENT) + public final void registerIcons(final IIconRegister aIconRegister) { + for (short i = 0, j = (short) this.mEnabledItems.length(); i < j; i++) { + if (this.mEnabledItems.get(i)) { + for (byte k = 1; k < this.mIconList[i].length; k++) { + this.mIconList[i][k] = aIconRegister.registerIcon(CORE.MODID+":"+this.getUnlocalizedName() + "/" + i + "/" + k); + } + this.mIconList[i][0] = aIconRegister.registerIcon(CORE.MODID+":"+this.getUnlocalizedName() + "/" + i); + } + } + } + + @Override + public final Long[] getElectricStats(final ItemStack aStack) { + return this.mElectricStats.get((short) aStack.getItemDamage()); + } + + @Override + public final Long[] getFluidContainerStats(final ItemStack aStack) { + return this.mFluidContainerStats.get((short) aStack.getItemDamage()); + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { + return false; + } + + @Override + public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { + return false; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + if (stack.getDisplayName().contains("LuV")){ + HEX_OxFFFFFF = 0xffffcc; + } + else if (stack.getDisplayName().contains("ZPM")){ + HEX_OxFFFFFF = 0xace600; + } + else if (stack.getDisplayName().contains("UV")){ + HEX_OxFFFFFF = 0xffff00; + } + else if (stack.getDisplayName().contains("MAX")){ + HEX_OxFFFFFF = 0xff0000; + } + else { + HEX_OxFFFFFF = 0xffffff; + } + return HEX_OxFFFFFF; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java new file mode 100644 index 0000000000..ec1c90186a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java @@ -0,0 +1,675 @@ +package gtPlusPlus.xmod.gregtech.api.items; + +import static gregtech.api.enums.GT_Values.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.inventory.Container; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gregtech.api.enums.SubTag; +import gregtech.api.util.*; + +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ItemBehaviour; +import ic2.api.item.*; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; + +public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + private final HashMap>> mItemBehaviors = new HashMap<>(); + + /** + * Creates the Item using these Parameters. + * + * @param aUnlocalized The Unlocalized Name of this Item. + * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated. + */ + public Gregtech_MetaItem_Base(final String aUnlocalized) { + super(aUnlocalized, "Generated Item", null, false); + this.setHasSubtypes(true); + this.setMaxDamage(0); + } + + /** + * Adds a special Item Behaviour to the Item. + *

+ * Note: the boolean Behaviours sometimes won't be executed if another boolean Behaviour returned true before. + * + * @param aMetaValue the Meta Value of the Item you want to add it to. [0 - 32765] + * @param aBehavior the Click Behavior you want to add. + * @return the Item itself for convenience in constructing. + */ + public final Gregtech_MetaItem_Base addItemBehavior(final int aMetaValue, final Interface_ItemBehaviour aBehavior) { + if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { + return this; + } + ArrayList> tList = this.mItemBehaviors.get((short) aMetaValue); + if (tList == null) { + tList = new ArrayList<>(1); + this.mItemBehaviors.put((short) aMetaValue, tList); + } + tList.add(aBehavior); + return this; + } + + public abstract Long[] getElectricStats(ItemStack aStack); + + public abstract Long[] getFluidContainerStats(ItemStack aStack); + + @Override + public boolean hasProjectile(final SubTag aProjectileType, final ItemStack aStack) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + if (tBehavior.hasProjectile(this, aProjectileType, aStack)) { + return true; + } + } + } + return super.hasProjectile(aProjectileType, aStack); + } + + @Override + public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final double aX, final double aY, final double aZ) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + final EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ); + if (rArrow != null) { + return rArrow; + } + } + } + return super.getProjectile(aProjectileType, aStack, aWorld, aX, aY, aZ); + } + + @Override + public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final EntityLivingBase aEntity, final float aSpeed) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + final EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); + if (rArrow != null) { + return rArrow; + } + } + } + return super.getProjectile(aProjectileType, aStack, aWorld, aEntity, aSpeed); + } + + @Override + public ItemStack onDispense(final IBlockSource aSource, final ItemStack aStack) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + if (tBehavior.canDispense(this, aSource, aStack)) { + return tBehavior.onDispense(this, aSource, aStack); + } + } + } + return super.onDispense(aSource, aStack); + } + + @Override + public boolean isItemStackUsable(final ItemStack aStack) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + if (!tBehavior.isItemStackUsable(this, aStack)) { + return false; + } + } + } + return super.isItemStackUsable(aStack); + } + + @Override + public boolean onLeftClickEntity(final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { + this.use(aStack, 0, aPlayer); + this.isItemStackUsable(aStack); + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + try { + if (tBehavior.onLeftClickEntity(this, aStack, aPlayer, aEntity)) { + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + } + return true; + } + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + return false; + } + } catch (final Throwable e) { + if (D1) { + e.printStackTrace(GT_Log.err); + } + } + } + } + return false; + } + + @Override + public boolean onItemUse(final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + this.use(aStack, 0, aPlayer); + this.isItemStackUsable(aStack); + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + try { + if (tBehavior.onItemUse(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + } + return true; + } + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + return false; + } + } catch (final Throwable e) { + if (D1) { + e.printStackTrace(GT_Log.err); + } + } + } + } + return false; + } + + @Override + public boolean onItemUseFirst(final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + this.use(aStack, 0, aPlayer); + this.isItemStackUsable(aStack); + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + try { + if (tBehavior.onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ)) { + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + } + return true; + } + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + return false; + } + } catch (final Throwable e) { + if (D1) { + e.printStackTrace(GT_Log.err); + } + } + } + } + return false; + } + + @Override + public ItemStack onItemRightClick(ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + this.use(aStack, 0, aPlayer); + this.isItemStackUsable(aStack); + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + try { + aStack = tBehavior.onItemRightClick(this, aStack, aWorld, aPlayer); + } catch (final Throwable e) { + if (D1) { + e.printStackTrace(GT_Log.err); + } + } + } + } + return aStack; + } + + @Override + public final void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, final boolean aF3_H) { + final String tKey = this.getUnlocalizedName(aStack) + ".tooltip", tString = GT_LanguageManager.getTranslation(tKey); + if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) { + aList.add(tString); + } + + Long[] + tStats = this.getElectricStats(aStack); + if (tStats != null) { + if (tStats[3] > 0) { + aList.add(EnumChatFormatting.AQUA + "Contains " + GT_Utility.formatNumbers(tStats[3]) + " EU Tier: " + (tStats[2] >= 0 ? tStats[2] : 0) + EnumChatFormatting.GRAY); + } else { + final long tCharge = this.getRealCharge(aStack); + if ((tStats[3] == -2) && (tCharge <= 0)) { + aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY); + } else { + aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY); + } + } + } + + tStats = this.getFluidContainerStats(aStack); + if ((tStats != null) && (tStats[0] > 0)) { + final FluidStack tFluid = this.getFluidContent(aStack); + aList.add(EnumChatFormatting.BLUE + ((tFluid == null ? "No Fluids Contained" : GT_Utility.getFluidName(tFluid, true))) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.BLUE + ((tFluid == null ? 0 : tFluid.amount) + "L / " + tStats[0] + "L") + EnumChatFormatting.GRAY); + } + + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + aList = tBehavior.getAdditionalToolTips(this, aList, aStack); + } + } + + this.addAdditionalToolTips(aList, aStack); + } + + @Override + public void onUpdate(final ItemStack aStack, final World aWorld, final Entity aPlayer, final int aTimer, final boolean aIsInHand) { + final ArrayList> tList = this.mItemBehaviors.get((short) this.getDamage(aStack)); + if (tList != null) { + for (final Interface_ItemBehaviour tBehavior : tList) { + tBehavior.onUpdate(this, aStack, aWorld, aPlayer, aTimer, aIsInHand); + } + } + } + + @Override + public final boolean canProvideEnergy(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return false; + } + return (tStats[3] > 0) || ((aStack.stackSize == 1) && ((tStats[3] == -2) || (tStats[3] == -3))); + } + + @Override + public final double getMaxCharge(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + return Math.abs(tStats[0]); + } + + @Override + public final double getTransferLimit(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + return Math.max(tStats[1], tStats[3]); + } + + @Override + public final double charge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aSimulate) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[2] > aTier) || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) || (aStack.stackSize != 1)) { + return 0; + } + final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min(Math.abs(tStats[0]), tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (!aSimulate) { + this.setCharge(aStack, tNewCharge); + } + return tNewCharge - tChargeBefore; + } + + @Override + public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[2] > aTier)) { + return 0; + } + if (aBatteryAlike && !this.canProvideEnergy(aStack)) { + return 0; + } + if (tStats[3] > 0) { + if ((aCharge < tStats[3]) || (aStack.stackSize < 1)) { + return 0; + } + if (!aSimulate) { + aStack.stackSize--; + } + return tStats[3]; + } + final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math.max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + if (!aSimulate) { + this.setCharge(aStack, tNewCharge); + } + return tChargeBefore - tNewCharge; + } + + @Override + public final double getCharge(final ItemStack aStack) { + return this.getRealCharge(aStack); + } + + @Override + public final boolean canUse(final ItemStack aStack, final double aAmount) { + return this.getRealCharge(aStack) >= aAmount; + } + + @Override + public final boolean use(final ItemStack aStack, final double aAmount, final EntityLivingBase aPlayer) { + this.chargeFromArmor(aStack, aPlayer); + if ((aPlayer instanceof EntityPlayer) && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) { + return true; + } + final double tTransfer = this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); + if (tTransfer == aAmount) { + this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); + this.chargeFromArmor(aStack, aPlayer); + return true; + } + this.discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); + this.chargeFromArmor(aStack, aPlayer); + return false; + } + + @Override + public final void chargeFromArmor(final ItemStack aStack, final EntityLivingBase aPlayer) { + if ((aPlayer == null) || aPlayer.worldObj.isRemote) { + return; + } + for (int i = 1; i < 5; i++) { + final ItemStack tArmor = aPlayer.getEquipmentInSlot(i); + if (GT_ModHandler.isElectricItem(tArmor)) { + final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); + if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { + final double tCharge = ElectricItem.manager.discharge(tArmor, this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false); + if (tCharge > 0) { + this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); + if (aPlayer instanceof EntityPlayer) { + final Container tContainer = ((EntityPlayer) aPlayer).openContainer; + if (tContainer != null) { + tContainer.detectAndSendChanges(); + } + } + } + } + } + } + } + + public final long getRealCharge(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + if (tStats == null) { + return 0; + } + if (tStats[3] > 0) { + return (int) (long) tStats[3]; + } + final NBTTagCompound tNBT = aStack.getTagCompound(); + return tNBT == null ? 0 : tNBT.getLong("GT.ItemCharge"); + } + + public final boolean setCharge(final ItemStack aStack, long aCharge) { + final Long[] tStats = this.getElectricStats(aStack); + if ((tStats == null) || (tStats[3] > 0)) { + return false; + } + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + tNBT.removeTag("GT.ItemCharge"); + aCharge = Math.min(tStats[0] < 0 ? Math.abs(tStats[0] / 2) : aCharge, Math.abs(tStats[0])); + if (aCharge > 0) { + aStack.setItemDamage(this.getChargedMetaData(aStack)); + tNBT.setLong("GT.ItemCharge", aCharge); + } else { + aStack.setItemDamage(this.getEmptyMetaData(aStack)); + } + if (tNBT.hasNoTags()) { + aStack.setTagCompound(null); + } else { + aStack.setTagCompound(tNBT); + } + this.isItemStackUsable(aStack); + return true; + } + + public short getChargedMetaData(final ItemStack aStack) { + return (short) aStack.getItemDamage(); + } + + public short getEmptyMetaData(final ItemStack aStack) { + return (short) aStack.getItemDamage(); + } + + @Override + public FluidStack getFluid(final ItemStack aStack) { + return this.getFluidContent(aStack); + } + + @Override + public int getCapacity(final ItemStack aStack) { + final Long[] tStats = this.getFluidContainerStats(aStack); + return tStats == null ? 0 : (int) Math.max(0, tStats[0]); + } + + @Override + public int fill(final ItemStack aStack, final FluidStack aFluid, final boolean doFill) { + if ((aStack == null) || (aStack.stackSize != 1)) { + return 0; + } + + final ItemStack tStack = GT_Utility.fillFluidContainer(aFluid, aStack, false, false); + if (tStack != null) { + aStack.setItemDamage(tStack.getItemDamage()); + aStack.func_150996_a(tStack.getItem()); + return GT_Utility.getFluidForFilledItem(tStack, false).amount; + } + + final Long[] tStats = this.getFluidContainerStats(aStack); + if ((tStats == null) || (tStats[0] <= 0) || (aFluid == null) || (aFluid.getFluid().getID() <= 0) || (aFluid.amount <= 0)) { + return 0; + } + + FluidStack tFluid = this.getFluidContent(aStack); + + if ((tFluid == null) || (tFluid.getFluid().getID() <= 0)) { + if (aFluid.amount <= tStats[0]) { + if (doFill) { + this.setFluidContent(aStack, aFluid); + } + return aFluid.amount; + } + if (doFill) { + tFluid = aFluid.copy(); + tFluid.amount = (int) (long) tStats[0]; + this.setFluidContent(aStack, tFluid); + } + return (int) (long) tStats[0]; + } + + if (!tFluid.isFluidEqual(aFluid)) { + return 0; + } + + final int space = (int) (long) tStats[0] - tFluid.amount; + if (aFluid.amount <= space) { + if (doFill) { + tFluid.amount += aFluid.amount; + this.setFluidContent(aStack, tFluid); + } + return aFluid.amount; + } + if (doFill) { + tFluid.amount = (int) (long) tStats[0]; + this.setFluidContent(aStack, tFluid); + } + return space; + } + + @Override + public FluidStack drain(final ItemStack aStack, final int maxDrain, final boolean doDrain) { + if ((aStack == null) || (aStack.stackSize != 1)) { + return null; + } + + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aStack, false); + if ((tFluid != null) && (maxDrain >= tFluid.amount)) { + final ItemStack tStack = GT_Utility.getContainerItem(aStack, false); + if (tStack == null) { + aStack.stackSize = 0; + return tFluid; + } + aStack.setItemDamage(tStack.getItemDamage()); + aStack.func_150996_a(tStack.getItem()); + return tFluid; + } + + final Long[] tStats = this.getFluidContainerStats(aStack); + if ((tStats == null) || (tStats[0] <= 0)) { + return null; + } + + tFluid = this.getFluidContent(aStack); + if (tFluid == null) { + return null; + } + + int used = maxDrain; + if (tFluid.amount < used) { + used = tFluid.amount; + } + if (doDrain) { + tFluid.amount -= used; + this.setFluidContent(aStack, tFluid); + } + + final FluidStack drained = tFluid.copy(); + drained.amount = used; + return drained; + } + + public FluidStack getFluidContent(final ItemStack aStack) { + final Long[] tStats = this.getFluidContainerStats(aStack); + if ((tStats == null) || (tStats[0] <= 0)) { + return GT_Utility.getFluidForFilledItem(aStack, false); + } + final NBTTagCompound tNBT = aStack.getTagCompound(); + return tNBT == null ? null : FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("GT.FluidContent")); + } + + public void setFluidContent(final ItemStack aStack, final FluidStack aFluid) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } else { + tNBT.removeTag("GT.FluidContent"); + } + if ((aFluid != null) && (aFluid.amount > 0)) { + tNBT.setTag("GT.FluidContent", aFluid.writeToNBT(new NBTTagCompound())); + } + if (tNBT.hasNoTags()) { + aStack.setTagCompound(null); + } else { + aStack.setTagCompound(tNBT); + } + this.isItemStackUsable(aStack); + } + + @Override + public int getItemStackLimit(final ItemStack aStack) { + Long[] tStats = this.getElectricStats(aStack); + if ((tStats != null) && ((tStats[3] == -1) || (tStats[3] == -3)) && (this.getRealCharge(aStack) > 0)) { + return 1; + } + tStats = this.getFluidContainerStats(aStack); + if (tStats != null) { + return (int) (long) tStats[1]; + } + return 64; + } + + @Override + public final Item getChargedItem(final ItemStack itemStack) { + return this; + } + + @Override + public final Item getEmptyItem(final ItemStack itemStack) { + return this; + } + + @Override + public final int getTier(final ItemStack aStack) { + final Long[] tStats = this.getElectricStats(aStack); + return (int) (tStats == null ? Integer.MAX_VALUE : tStats[2]); + } + + @Override + public final String getToolTip(final ItemStack aStack) { + return null; + } // This has its own ToolTip Handler, no need to let the IC2 Handler screw us up at this Point + + @Override + public final IElectricItemManager getManager(final ItemStack aStack) { + return this; + } // We are our own Manager + + @Override + public final boolean getShareTag() { + return true; + } // just to be sure. + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { + return false; + } + + @Override + public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { + return false; + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + if (stack.getDisplayName().contains("LuV")){ + HEX_OxFFFFFF = 0xffffcc; + } + else if (stack.getDisplayName().contains("ZPM")){ + HEX_OxFFFFFF = 0xace600; + } + else if (stack.getDisplayName().contains("UV")){ + HEX_OxFFFFFF = 0xffff00; + } + else if (stack.getDisplayName().contains("MAX")){ + HEX_OxFFFFFF = 0xff0000; + } + else if (stack.getDisplayName().contains("Sodium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); + } + else if (stack.getDisplayName().contains("Cadmium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); + } + else if (stack.getDisplayName().contains("Lithium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); + } + else { + HEX_OxFFFFFF = 0xffffff; + } + return HEX_OxFFFFFF; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java new file mode 100644 index 0000000000..a5430846a9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java @@ -0,0 +1,243 @@ +package gtPlusPlus.xmod.gregtech.api.items; + +import java.util.Arrays; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; + +/** + * @author Gregorius Techneticies + *

+ * One Item for everything! + *

+ * This brilliant Item Class is used for automatically generating all possible variations of Material Items, like Dusts, Ingots, Gems, Plates and similar. + * It saves me a ton of work, when adding Items, because I always have to make a new Item SubType for each OreDict Prefix, when adding a new Material. + *

+ * As you can see, up to 32766 Items can be generated using this Class. And the last 766 Items can be custom defined, just to save space and MetaData. + *

+ * These Items can also have special RightClick abilities, electric Charge or even be set to become a Food alike Item. + */ +public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { + + protected final OrePrefixes[] mGeneratedPrefixList; + + /** + * Creates the Item using these Parameters. + * + * @param aUnlocalized The Unlocalized Name of this Item. + * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated. + */ + public Gregtech_MetaItem_X32(final String aUnlocalized, final OrePrefixes... aGeneratedPrefixList) { + super(aUnlocalized, (short) 32000, (short) 766); + this.mGeneratedPrefixList = Arrays.copyOf(aGeneratedPrefixList, 32); + + for (int i = 0; i < 32000; i++) { + final OrePrefixes tPrefix = this.mGeneratedPrefixList[i / 1000]; + if (tPrefix == null) { + continue; + } + final Materials tMaterial = GregTech_API.sGeneratedMaterials[i % 1000]; + if (tMaterial == null) { + continue; + } + if (this.doesMaterialAllowGeneration(tPrefix, tMaterial)) { + final ItemStack tStack = new ItemStack(this, 1, i); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", this.getDefaultLocalization(tPrefix, tMaterial, i)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / GT_Values.M)); + if (tPrefix.mIsUnificatable) { + GT_OreDictUnificator.set(tPrefix, tMaterial, tStack); + } else { + GT_OreDictUnificator.registerOre(tPrefix.get(tMaterial), tStack); + } + if (((tPrefix == OrePrefixes.stick) || (tPrefix == OrePrefixes.wireFine)) && ((tMaterial == Materials.Lead) || (tMaterial == Materials.Tin) || (tMaterial == Materials.SolderingAlloy))) { + GregTech_API.sSolderingMetalList.add(tStack); + } + } + } + } + + /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ + + /** + * @return the Color Modulation the Material is going to be rendered with. + */ + @Override + public short[] getRGBa(final ItemStack aStack) { + final Materials tMaterial = GregTech_API.sGeneratedMaterials[this.getDamage(aStack) % 1000]; + return tMaterial == null ? Materials._NULL.mRGBa : tMaterial.mRGBa; + } + + /** + * @param aPrefix this can be null, you have to return false in that case + * @param aMaterial this can be null, you have to return false in that case + * @return if this Item should be generated and visible. + */ + public boolean doesMaterialAllowGeneration(final OrePrefixes aPrefix, final Materials aMaterial) { + // You have to check for at least these Conditions in every Case! So add a super Call like the following for this before executing your Code: + // if (!super.doesMaterialAllowGeneration(aPrefix, aMaterial)) return false; + return (aPrefix != null) && (aMaterial != null) && aPrefix.doGenerateItem(aMaterial); + } + + /* ---------- OVERRIDEABLE FUNCTIONS ---------- */ + + /** + * @param aPrefix the OreDict Prefix + * @param aMaterial the Material + * @param aMetaData a Index from [0 - 31999] + * @return the Localized Name when default LangFiles are used. + */ + public String getDefaultLocalization(final OrePrefixes aPrefix, final Materials aMaterial, final int aMetaData) { + return aPrefix.getDefaultLocalNameForItem(aMaterial); + } + + /** + * @param aMetaData a Index from [0 - 31999] + * @param aMaterial the Material + * @return an Icon Container for the Item Display. + */ + public final IIconContainer getIconContainer(final int aMetaData, final Materials aMaterial) { + return (this.mGeneratedPrefixList[aMetaData / 1000] != null) && (this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0) ? aMaterial.mIconSet.mTextures[this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] : null; + } + + /** + * @param aPrefix always != null + * @param aMaterial always != null + * @param aDoShowAllItems this is the Configuration Setting of the User, if he wants to see all the Stuff like Tiny Dusts or Crushed Ores as well. + * @return if this Item should be visible in NEI or Creative + */ + public boolean doesShowInCreative(final OrePrefixes aPrefix, final Materials aMaterial, final boolean aDoShowAllItems) { + return true; + } + + /* ---------- INTERNAL OVERRIDES ---------- */ + + @Override + public ItemStack getContainerItem(final ItemStack aStack) { + final int aDamage = aStack.getItemDamage(); + if ((aDamage < 32000) && (aDamage >= 0)) { + final Materials aMaterial = GregTech_API.sGeneratedMaterials[aDamage % 1000]; + if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) { + final OrePrefixes aPrefix = this.mGeneratedPrefixList[aDamage / 1000]; + if (aPrefix != null) { + return GT_Utility.copyAmount(1, aPrefix.mContainerItem); + } + } + } + return null; + } + + @Override + public final IIconContainer getIconContainer(final int aMetaData) { + return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null : this.getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]); + } + + @Override + @SideOnly(Side.CLIENT) + public final void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { + for (int i = 0; i < 32000; i++) { + if (this.doesMaterialAllowGeneration(this.mGeneratedPrefixList[i / 1000], GregTech_API.sGeneratedMaterials[i % 1000]) && this.doesShowInCreative(this.mGeneratedPrefixList[i / 1000], GregTech_API.sGeneratedMaterials[i % 1000], GregTech_API.sDoShowAllItemsInCreative)) { + final ItemStack tStack = new ItemStack(this, 1, i); + this.isItemStackUsable(tStack); + aList.add(tStack); + } + } + super.getSubItems(var1, aCreativeTab, aList); + } + + @Override + public final IIcon getIconFromDamage(final int aMetaData) { + if (aMetaData < 0) { + return null; + } + if (aMetaData < 32000) { + final Materials tMaterial = GregTech_API.sGeneratedMaterials[aMetaData % 1000]; + if (tMaterial == null) { + return null; + } + final IIconContainer tIcon = this.getIconContainer(aMetaData, tMaterial); + if (tIcon != null) { + return tIcon.getIcon(); + } + return null; + } + return (aMetaData - 32000) < this.mIconList.length ? this.mIconList[aMetaData - 32000][0] : null; + } + + @Override + public int getItemStackLimit(final ItemStack aStack) { + final int tDamage = this.getDamage(aStack); + if ((tDamage < 32000) && (this.mGeneratedPrefixList[tDamage / 1000] != null)) { + return Math.min(super.getItemStackLimit(aStack), this.mGeneratedPrefixList[tDamage / 1000].mDefaultStackSize); + } + return super.getItemStackLimit(aStack); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { + + int aMeta = stack.getItemDamage(); + if (stack.getDisplayName().contains("Sodium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(90, 90, 255); + } + else if (stack.getDisplayName().contains("Cadmium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(150, 150, 80); + } + else if (stack.getDisplayName().contains("Lithium")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); + } + else if (stack.getDisplayName().contains("Wrought")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); + } + else if (stack.getDisplayName().contains("Bronze")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 128, 0); + } + else if (stack.getDisplayName().contains("Brass")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 180, 0); + } + else if (stack.getDisplayName().contains("Invar")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(180, 180, 120); + } + else { + if (aMeta > 50 && aMeta != 150) { + HEX_OxFFFFFF = 0xffffff; + } + else if (stack.getDisplayName().contains("ULV")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); + } + else if (stack.getDisplayName().contains("LuV")){ + HEX_OxFFFFFF = 0xffffcc; + } + else if (stack.getDisplayName().contains("ZPM")){ + HEX_OxFFFFFF = 0xffe600; + } + else if (stack.getDisplayName().contains("UV")){ + HEX_OxFFFFFF = 0xffb300; + } + else if (stack.getDisplayName().contains("MAX")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250)); + } + else { + HEX_OxFFFFFF = 0xffffff; + } + } + return HEX_OxFFFFFF; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java new file mode 100644 index 0000000000..ae84afb056 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java @@ -0,0 +1,503 @@ +package gtPlusPlus.xmod.gregtech.api.items; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import cpw.mods.fml.common.Optional; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.stats.AchievementList; +import net.minecraft.stats.StatList; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import gregtech.api.enchants.Enchantment_Radioactivity; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.IDamagableItem; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + +import buildcraft.api.tools.IToolWrench; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; +import mods.railcraft.api.core.items.IToolCrowbar; +import net.minecraftforge.event.world.BlockEvent; + +/** + * This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench: + * GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(16, 1, Materials.Bismuth, Materials.Bismuth, null); + */ +@Optional.InterfaceList({@Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = "Forestry"), + @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "Railcraft"), + @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"), + @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO")}) +public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements IDamagableItem, IToolCrowbar, IToolWrench { + /** + * All instances of this Item Class are listed here. + * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. + *

+ * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. + */ + public static final HashMap sInstances = new HashMap<>(); + + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + + public final HashMap mToolStats = new HashMap<>(); + + /** + * Creates the Item using these Parameters. + * + * @param aUnlocalized The Unlocalized Name of this Item. + */ + public Gregtech_MetaTool(final String aUnlocalized) { + super(aUnlocalized); + GT_ModHandler.registerBoxableItemToToolBox(this); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setMaxStackSize(1); + sInstances.put(this.getUnlocalizedName(), this); + } + + /** + * Called by the Block Harvesting Event within the GT_Proxy + */ + @Override + public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { + final IToolStats tStats = this.getToolStats(aStack); + if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { + this.doDamage(aStack, tStats.convertBlockDrops(aDrops, aStack, aPlayer, aBlock, aX, aY, aZ, aMetaData, aFortune, aSilkTouch, aEvent) * tStats.getToolDamagePerDropConversion()); + } + } + + @Override + public boolean onLeftClickEntity(final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats == null) || !this.isItemStackUsable(aStack)) { + return true; + } + GT_Utility.doSoundAtClient(tStats.getEntityHitSound(), 1, 1.0F); + if (super.onLeftClickEntity(aStack, aPlayer, aEntity)) { + return true; + } + if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) { + final float tMagicDamage = tStats.getMagicDamageAgainstEntity(aEntity instanceof EntityLivingBase ? EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) : 0.0F, aEntity, aStack, aPlayer); + float tDamage = tStats.getNormalDamageAgainstEntity((float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + this.getToolCombatDamage(aStack), aEntity, aStack, aPlayer); + if ((tDamage + tMagicDamage) > 0.0F) { + final boolean tCriticalHit = (aPlayer.fallDistance > 0.0F) && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) && (aPlayer.ridingEntity == null) && (aEntity instanceof EntityLivingBase); + if (tCriticalHit && (tDamage > 0.0F)) { + tDamage *= 1.5F; + } + tDamage += tMagicDamage; + if (aEntity.attackEntityFrom(tStats.getDamageSource(aPlayer, aEntity), tDamage)) { + if (aEntity instanceof EntityLivingBase) { + aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4); + } + final int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + (aEntity instanceof EntityLivingBase ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) : 0); + if (tKnockcack > 0) { + aEntity.addVelocity(-MathHelper.sin((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F, 0.1D, MathHelper.cos((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F); + aPlayer.motionX *= 0.6D; + aPlayer.motionZ *= 0.6D; + aPlayer.setSprinting(false); + } + if (tCriticalHit) { + aPlayer.onCriticalHit(aEntity); + } + if (tMagicDamage > 0.0F) { + aPlayer.onEnchantmentCritical(aEntity); + } + if (tDamage >= 18.0F) { + aPlayer.triggerAchievement(AchievementList.overkill); + } + aPlayer.setLastAttacker(aEntity); + if (aEntity instanceof EntityLivingBase) { + EnchantmentHelper.func_151384_a((EntityLivingBase) aEntity, aPlayer); + } + EnchantmentHelper.func_151385_b(aPlayer, aEntity); + if (aEntity instanceof EntityLivingBase) { + aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F)); + } + aEntity.hurtResistantTime = Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); + aPlayer.addExhaustion(0.3F); + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + } + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + } + return true; + } + + @Override + public ItemStack onItemRightClick(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats != null) && tStats.canBlock()) { + aPlayer.setItemInUse(aStack, 72000); + } + return super.onItemRightClick(aStack, aWorld, aPlayer); + } + + + @SuppressWarnings("unchecked") + public void addAdditionalToolTips(final List aList, final ItemStack aStack) { + final long tMaxDamage = getToolMaxDamage(aStack); + final Materials tMaterial = getPrimaryMaterial(aStack); + final IToolStats tStats = this.getToolStats(aStack); + final int tOffset = this.getElectricStats(aStack) != null ? 2 : 1; + if (tStats != null) { + final String name = aStack.getUnlocalizedName(); + if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") || name.equals("gt.metatool.01.174") || name.equals("gt.metatool.01.176")) { + aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); + aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); + aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficency: " + EnumChatFormatting.BLUE + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Steam flow: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "L/sec"); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 25) + EnumChatFormatting.GRAY + "EU/t"); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "EU/t"); + + } else { + aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); + aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); + aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Attack Damage: " + EnumChatFormatting.BLUE + this.getToolCombatDamage(aStack) + EnumChatFormatting.GRAY); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Mining Speed: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + EnumChatFormatting.GRAY); + } + } + } + + @SuppressWarnings("unchecked") + public void addAdditionalToolTips(final List aList, final ItemStack aStack, final EntityPlayer aPlayer) { + final long tMaxDamage = getToolMaxDamage(aStack); + final Materials tMaterial = getPrimaryMaterial(aStack); + final IToolStats tStats = this.getToolStats(aStack); + final int tOffset = this.getElectricStats(aStack) != null ? 2 : 1; + if (tStats != null) { + final String name = aStack.getUnlocalizedName(); + if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") || name.equals("gt.metatool.01.174") || name.equals("gt.metatool.01.176")) { + aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); + aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); + aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficency: " + EnumChatFormatting.BLUE + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Steam flow: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "L/sec"); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 50) + EnumChatFormatting.GRAY + "EU/t"); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "EU/t"); + + } else { + aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); + aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + this.getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); + aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Attack Damage: " + EnumChatFormatting.BLUE + this.getToolCombatDamage(aStack) + EnumChatFormatting.GRAY); + aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Mining Speed: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + EnumChatFormatting.GRAY); + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if ((aNBT != null) && aNBT.hasKey("Heat")){ + int tHeat = aNBT.getInteger("Heat"); + final long tWorldTime = aPlayer.getEntityWorld().getWorldTime(); + if(aNBT.hasKey("HeatTime")){ + final long tHeatTime = aNBT.getLong("HeatTime"); + if(tWorldTime>(tHeatTime+10)){ + tHeat = (int) (tHeat - ((tWorldTime-tHeatTime)/10)); + if((tHeat<300)&&(tHeat>-10000)) { + tHeat=300; + } + } + aNBT.setLong("HeatTime", tWorldTime); + if(tHeat>-10000) { + aNBT.setInteger("Heat", tHeat); + } + } + + aList.add(tOffset + 3, EnumChatFormatting.RED + "Heat: " + aNBT.getInteger("Heat")+" K" + EnumChatFormatting.GRAY); + } + } + } + } + } + + @Override + public Long[] getFluidContainerStats(final ItemStack aStack) { + return null; + } + + @Override + public Long[] getElectricStats(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if ((aNBT != null) && aNBT.getBoolean("Electric")) { + return new Long[]{aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData")}; + } + } + return new Long[] {}; + } + + @Override + public float getToolCombatDamage(final ItemStack aStack) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats == null) { + return 0; + } + return tStats.getBaseDamage() + getPrimaryMaterial(aStack).mToolQuality; + } + + @Override + public float getDigSpeed(final ItemStack aStack, final Block aBlock, final int aMetaData) { + if (!this.isItemStackUsable(aStack)) { + return 0.0F; + } + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats == null) || (Math.max(0, this.getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))) { + return 0.0F; + } + return tStats.isMinableBlock(aBlock, (byte) aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; + } + + @Override + public boolean onBlockDestroyed(final ItemStack aStack, final World aWorld, final Block aBlock, final int aX, final int aY, final int aZ, final EntityLivingBase aPlayer) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + if (tStats == null) { + return false; + } + GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F); + this.doDamage(aStack, (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); + return this.getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F; + } + + private ItemStack getContainerItem(ItemStack aStack, final boolean playSound) { + if (!this.isItemStackUsable(aStack)) { + return null; + } + aStack = GT_Utility.copyAmount(1, aStack); + final IToolStats tStats = this.getToolStats(aStack); + if (tStats == null) { + return null; + } + this.doDamage(aStack, tStats.getToolDamagePerContainerCraft()); + aStack = aStack.stackSize > 0 ? aStack : null; + if (playSound) { + //String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound(); + //GT_Utility.doSoundAtClient(sound, 1, 1.0F); + } + return aStack; + } + + @Override + public Interface_ToolStats getToolStats(final ItemStack aStack) { + this.isItemStackUsable(aStack); + return this.getToolStatsInternal(aStack); + } + + private Interface_ToolStats getToolStatsInternal(final ItemStack aStack) { + return (Interface_ToolStats) (aStack == null ? null : this.mToolStats.get((short) aStack.getItemDamage())); + } + + @Override + public boolean canWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isCrowbar(); + } + + @Override + public void onWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats != null) { + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + + @Override + public boolean canWrench(final EntityPlayer player, final int x, final int y, final int z) { + //System.out.println("canWrench"); + if(player==null) { + return false; + } + if(player.getCurrentEquippedItem()==null) { + return false; + } + if (!this.isItemStackUsable(player.getCurrentEquippedItem())) { + return false; + } + final Interface_ToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); + return (tStats != null) && tStats.isWrench(); + } + + @Override + public void wrenchUsed(final EntityPlayer player, final int x, final int y, final int z) { + if(player==null) { + return; + } + if(player.getCurrentEquippedItem()==null) { + return; + } + final IToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); + if (tStats != null) { + this.doDamage(player.getCurrentEquippedItem(), tStats.getToolDamagePerEntityAttack()); + } + } + + @Override + public boolean canLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isCrowbar(); + } + + @Override + public void onLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats != null) { + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + + @Override + public boolean canBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isCrowbar(); + } + + @Override + public void onBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats != null) { + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + + @Override + public void onCreated(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats != null) && (aPlayer != null)) { + tStats.onToolCrafted(aStack, aPlayer); + } + super.onCreated(aStack, aWorld, aPlayer); + } + + @Override + public boolean isFull3D() { + return true; + } + + @Override + public boolean isItemStackUsable(final ItemStack aStack) { + final IToolStats tStats = this.getToolStatsInternal(aStack); + if (((aStack.getItemDamage() % 2) == 1) || (tStats == null)) { + final NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT.removeTag("ench"); + } + return false; + } + final Materials aMaterial = getPrimaryMaterial(aStack); + final HashMap tMap = new HashMap<>(), tResult = new HashMap<>(); + if (aMaterial.mEnchantmentTools != null) { + tMap.put(aMaterial.mEnchantmentTools.effectId, (int) aMaterial.mEnchantmentToolsLevel); + if (aMaterial.mEnchantmentTools == Enchantment.fortune) { + tMap.put(Enchantment.looting.effectId, (int) aMaterial.mEnchantmentToolsLevel); + } + if (aMaterial.mEnchantmentTools == Enchantment.knockback) { + tMap.put(Enchantment.power.effectId, (int) aMaterial.mEnchantmentToolsLevel); + } + if (aMaterial.mEnchantmentTools == Enchantment.fireAspect) { + tMap.put(Enchantment.flame.effectId, (int) aMaterial.mEnchantmentToolsLevel); + } + } + final Enchantment[] tEnchants = tStats.getEnchantments(aStack); + final int[] tLevels = tStats.getEnchantmentLevels(aStack); + for (int i = 0; i < tEnchants.length; i++) { + if (tLevels[i] > 0) { + final Integer tLevel = tMap.get(tEnchants[i].effectId); + tMap.put(tEnchants[i].effectId, tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); + } + } + for (final Entry tEntry : tMap.entrySet()) { + if ((tEntry.getKey() == 33) || ((tEntry.getKey() == 20) && (tEntry.getValue() > 2)) || (tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId)) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } else { + switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { + case weapon: + if (tStats.isWeapon()) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } + break; + case all: + tResult.put(tEntry.getKey(), tEntry.getValue()); + break; + case armor: + case armor_feet: + case armor_head: + case armor_legs: + case armor_torso: + break; + case bow: + if (tStats.isRangedWeapon()) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } + break; + case breakable: + break; + case fishing_rod: + break; + case digger: + if (tStats.isMiningTool()) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } + break; + } + } + } + EnchantmentHelper.setEnchantments(tResult, aStack); + return true; + } + + @Override + public short getChargedMetaData(final ItemStack aStack) { + return (short) (aStack.getItemDamage() - (aStack.getItemDamage() % 2)); + } + + @Override + public short getEmptyMetaData(final ItemStack aStack) { + final NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT.removeTag("ench"); + } + return (short) ((aStack.getItemDamage() + 1) - (aStack.getItemDamage() % 2)); + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { + return false; + } + + @Override + public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java new file mode 100644 index 0000000000..6f4202fdd8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java @@ -0,0 +1,546 @@ +package gtPlusPlus.xmod.gregtech.api.items.tools; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.stats.AchievementList; +import net.minecraft.stats.StatList; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.enchants.Enchantment_Radioactivity; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TC_Aspects.TC_AspectStack; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.*; + +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; +import net.minecraftforge.event.world.BlockEvent; + +/** + * This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench: + * GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(16, 1, Materials.Bismuth, Materials.Bismuth, null); + */ +public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool { + /** + * All instances of this Item Class are listed here. + * This gets used to register the Renderer to all Items of this Type, if useStandardMetaItemRenderer() returns true. + *

+ * You can also use the unlocalized Name gotten from getUnlocalizedName() as Key if you want to get a specific Item. + */ + public static final HashMap sInstances = new HashMap<>(); + + /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ + + public final HashMap mToolStats = new HashMap<>(); + + /** + * Creates the Item using these Parameters. + * + * @param aUnlocalized The Unlocalized Name of this Item. + */ + public GT_MetaGenTool(final String aUnlocalized) { + super(aUnlocalized); + GT_ModHandler.registerBoxableItemToToolBox(this); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + this.setMaxStackSize(1); + sInstances.put(this.getUnlocalizedName(), this); + } + + /* ---------- FOR ADDING CUSTOM ITEMS INTO THE REMAINING 766 RANGE ---------- */ + + public static final Materials getPrimaryMaterialEx(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if (aNBT != null) { + return Materials.getRealMaterial(aNBT.getString("PrimaryMaterial")); + } + } + return Materials._NULL; + } + + public static final Materials getSecondaryMaterialEx(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if (aNBT != null) { + return Materials.getRealMaterial(aNBT.getString("SecondaryMaterial")); + } + } + return Materials._NULL; + } + + /** + * This adds a Custom Item to the ending Range. + * + * @param aID The Id of the assigned Tool Class [0 - 32765] (only even Numbers allowed! Uneven ID's are empty electric Items) + * @param aEnglish The Default Localized Name of the created Item + * @param aToolTip The Default ToolTip of the created Item, you can also insert null for having no ToolTip + * @param aToolStats The Food Value of this Item. Can be null as well. + * @param aOreDictNamesAndAspects The OreDict Names you want to give the Item. Also used to assign Thaumcraft Aspects. + * @return An ItemStack containing the newly created Item, but without specific Stats. + */ + public final ItemStack addToolEx(final int aID, final String aEnglish, String aToolTip, final IToolStats aToolStats, final Object... aOreDictNamesAndAspects) { + if (aToolTip == null) { + aToolTip = ""; + } + if ((aID >= 0) && (aID < 32766) && ((aID % 2) == 0)) { + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + aID + ".name", aEnglish); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + aID + ".tooltip", aToolTip); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + (aID + 1) + ".name", aEnglish + " (Empty)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + (aID + 1) + ".tooltip", "You need to recharge it"); + this.mToolStats.put((short) aID, aToolStats); + this.mToolStats.put((short) (aID + 1), aToolStats); + aToolStats.onStatsAddedToTool(this, aID); + final ItemStack rStack = new ItemStack(this, 1, aID); + final List tAspects = new ArrayList<>(); + for (final Object tOreDictNameOrAspect : aOreDictNamesAndAspects) { + if (tOreDictNameOrAspect instanceof TC_AspectStack) { + ((TC_AspectStack) tOreDictNameOrAspect).addToAspectList(tAspects); + } else { + GT_OreDictUnificator.registerOre(tOreDictNameOrAspect, rStack); + } + } + if (GregTech_API.sThaumcraftCompat != null) { + GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(rStack, tAspects, false); + } + return rStack; + } + return null; + } + + /** + * This Function gets an ItemStack Version of this Tool + * + * @param aToolID the ID of the Tool Class + * @param aAmount Amount of Items (well normally you only need 1) + * @param aPrimaryMaterial Primary Material of this Tool + * @param aSecondaryMaterial Secondary (Rod/Handle) Material of this Tool + * @param aElectricArray The Electric Stats of this Tool (or null if not electric) + */ + public final ItemStack getToolWithStatsEx(final int aToolID, final int aAmount, final Materials aPrimaryMaterial, final Materials aSecondaryMaterial, final long[] aElectricArray) { + final ItemStack rStack = new ItemStack(this, aAmount, aToolID); + final IToolStats tToolStats = this.getToolStats(rStack); + if (tToolStats != null) { + final NBTTagCompound tMainNBT = new NBTTagCompound(), tToolNBT = new NBTTagCompound(); + if (aPrimaryMaterial != null) { + tToolNBT.setString("PrimaryMaterial", aPrimaryMaterial.toString()); + tToolNBT.setLong("MaxDamage", 100L * (long) (aPrimaryMaterial.mDurability * tToolStats.getMaxDurabilityMultiplier())); + } + if (aSecondaryMaterial != null) { + tToolNBT.setString("SecondaryMaterial", aSecondaryMaterial.toString()); + } + + if (aElectricArray != null) { + tToolNBT.setBoolean("Electric", true); + tToolNBT.setLong("MaxCharge", aElectricArray[0]); + tToolNBT.setLong("Voltage", aElectricArray[1]); + tToolNBT.setLong("Tier", aElectricArray[2]); + tToolNBT.setLong("SpecialData", aElectricArray[3]); + } + + tMainNBT.setTag("GT.ToolStats", tToolNBT); + rStack.setTagCompound(tMainNBT); + } + this.isItemStackUsable(rStack); + return rStack; + } + + /** + * Called by the Block Harvesting Event within the GT_Proxy + */ + @Override + public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { + final IToolStats tStats = this.getToolStats(aStack); + if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { + this.doDamage(aStack, tStats.convertBlockDrops(aDrops, aStack, aPlayer, aBlock, aX, aY, aZ, aMetaData, aFortune, aSilkTouch, aEvent) * tStats.getToolDamagePerDropConversion()); + } + } + + @Override + public boolean onLeftClickEntity(final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats == null) || !this.isItemStackUsable(aStack)) { + return true; + } + GT_Utility.doSoundAtClient(tStats.getEntityHitSound(), 1, 1.0F); + if (super.onLeftClickEntity(aStack, aPlayer, aEntity)) { + return true; + } + if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) { + final float tMagicDamage = tStats.getMagicDamageAgainstEntity(aEntity instanceof EntityLivingBase ? EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) : 0.0F, aEntity, aStack, aPlayer); + float tDamage = tStats.getNormalDamageAgainstEntity((float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() + this.getToolCombatDamage(aStack), aEntity, aStack, aPlayer); + if ((tDamage + tMagicDamage) > 0.0F) { + final boolean tCriticalHit = (aPlayer.fallDistance > 0.0F) && !aPlayer.onGround && !aPlayer.isOnLadder() && !aPlayer.isInWater() && !aPlayer.isPotionActive(Potion.blindness) && (aPlayer.ridingEntity == null) && (aEntity instanceof EntityLivingBase); + if (tCriticalHit && (tDamage > 0.0F)) { + tDamage *= 1.5F; + } + tDamage += tMagicDamage; + if (aEntity.attackEntityFrom(tStats.getDamageSource(aPlayer, aEntity), tDamage)) { + if (aEntity instanceof EntityLivingBase) { + aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4); + } + final int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + (aEntity instanceof EntityLivingBase ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) : 0); + if (tKnockcack > 0) { + aEntity.addVelocity(-MathHelper.sin((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F, 0.1D, MathHelper.cos((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F); + aPlayer.motionX *= 0.6D; + aPlayer.motionZ *= 0.6D; + aPlayer.setSprinting(false); + } + if (tCriticalHit) { + aPlayer.onCriticalHit(aEntity); + } + if (tMagicDamage > 0.0F) { + aPlayer.onEnchantmentCritical(aEntity); + } + if (tDamage >= 18.0F) { + aPlayer.triggerAchievement(AchievementList.overkill); + } + aPlayer.setLastAttacker(aEntity); + if (aEntity instanceof EntityLivingBase) { + EnchantmentHelper.func_151384_a((EntityLivingBase) aEntity, aPlayer); + } + EnchantmentHelper.func_151385_b(aPlayer, aEntity); + if (aEntity instanceof EntityLivingBase) { + aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F)); + } + aEntity.hurtResistantTime = Math.max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); + aPlayer.addExhaustion(0.3F); + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + } + if (aStack.stackSize <= 0) { + aPlayer.destroyCurrentEquippedItem(); + } + return true; + } + + @Override + public ItemStack onItemRightClick(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats != null) && tStats.canBlock()) { + aPlayer.setItemInUse(aStack, 72000); + } + return super.onItemRightClick(aStack, aWorld, aPlayer); + } + + + @Override + public Long[] getFluidContainerStats(final ItemStack aStack) { + return null; + } + + @Override + public Long[] getElectricStats(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if ((aNBT != null) && aNBT.getBoolean("Electric")) { + return new Long[]{aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), aNBT.getLong("SpecialData")}; + } + } + return null; + } + + @Override + public float getToolCombatDamage(final ItemStack aStack) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats == null) { + return 0; + } + return tStats.getBaseDamage() + getPrimaryMaterial(aStack).mToolQuality; + } + + @Override + public float getDigSpeed(final ItemStack aStack, final Block aBlock, final int aMetaData) { + if (!this.isItemStackUsable(aStack)) { + return 0.0F; + } + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats == null) || (Math.max(0, this.getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))) { + return 0.0F; + } + return tStats.isMinableBlock(aBlock, (byte) aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; + } + + @Override + public boolean onBlockDestroyed(final ItemStack aStack, final World aWorld, final Block aBlock, final int aX, final int aY, final int aZ, final EntityLivingBase aPlayer) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + if (tStats == null) { + return false; + } + GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F); + this.doDamage(aStack, (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); + return this.getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F; + } + + private ItemStack getContainerItem(ItemStack aStack, final boolean playSound) { + if (!this.isItemStackUsable(aStack)) { + return null; + } + aStack = GT_Utility.copyAmount(1, aStack); + final IToolStats tStats = this.getToolStats(aStack); + if (tStats == null) { + return null; + } + this.doDamage(aStack, tStats.getToolDamagePerContainerCraft()); + aStack = aStack.stackSize > 0 ? aStack : null; + if (playSound) { + //String sound = (aStack == null) ? tStats.getBreakingSound() : tStats.getCraftingSound(); + //GT_Utility.doSoundAtClient(sound, 1, 1.0F); + } + return aStack; + } + + @Override + public Interface_ToolStats getToolStats(final ItemStack aStack) { + this.isItemStackUsable(aStack); + return this.getToolStatsInternal(aStack); + } + + private Interface_ToolStats getToolStatsInternal(final ItemStack aStack) { + return (Interface_ToolStats) (aStack == null ? null : this.mToolStats.get((short) aStack.getItemDamage())); + } + + @Override + public float getSaplingModifier(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer, final int aX, final int aY, final int aZ) { + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isGrafter() ? Math.min(100.0F, (1 + this.getHarvestLevel(aStack, "")) * 20.0F) : 0.0F; + } + + @Override + public boolean canWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isCrowbar(); + } + + @Override + public void onWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, final int aZ) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats != null) { + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + + public boolean canWrench(final EntityPlayer player, final int x, final int y, final int z) { + System.out.println("canWrench"); + if(player==null) { + return false; + } + if(player.getCurrentEquippedItem()==null) { + return false; + } + if (!this.isItemStackUsable(player.getCurrentEquippedItem())) { + return false; + } + final Interface_ToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); + return (tStats != null) && tStats.isWrench(); + } + + public void wrenchUsed(final EntityPlayer player, final int x, final int y, final int z) { + if(player==null) { + return; + } + if(player.getCurrentEquippedItem()==null) { + return; + } + final IToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); + if (tStats != null) { + this.doDamage(player.getCurrentEquippedItem(), tStats.getToolDamagePerEntityAttack()); + } + } + + public boolean canUse(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){ + return this.canWrench(player, x, y, z); + } + + public void used(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){ + this.wrenchUsed(player, x, y, z); + } + + public boolean shouldHideFacades(final ItemStack stack, final EntityPlayer player) { + if(player==null) { + return false; + } + if(player.getCurrentEquippedItem()==null) { + return false; + } + if (!this.isItemStackUsable(player.getCurrentEquippedItem())) { + return false; + } + final Interface_ToolStats tStats = this.getToolStats(player.getCurrentEquippedItem()); + return tStats.isWrench(); + } + + @Override + public boolean canLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isCrowbar(); + } + + @Override + public void onLink(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats != null) { + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + + @Override + public boolean canBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + if (!this.isItemStackUsable(aStack)) { + return false; + } + final IToolStats tStats = this.getToolStats(aStack); + return (tStats != null) && tStats.isCrowbar(); + } + + @Override + public void onBoost(final EntityPlayer aPlayer, final ItemStack aStack, final EntityMinecart cart) { + final IToolStats tStats = this.getToolStats(aStack); + if (tStats != null) { + this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); + } + } + + @Override + public void onCreated(final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + final IToolStats tStats = this.getToolStats(aStack); + if ((tStats != null) && (aPlayer != null)) { + tStats.onToolCrafted(aStack, aPlayer); + } + super.onCreated(aStack, aWorld, aPlayer); + } + + @Override + public boolean isFull3D() { + return true; + } + + @Override + public boolean isItemStackUsable(final ItemStack aStack) { + final IToolStats tStats = this.getToolStatsInternal(aStack); + if (((aStack.getItemDamage() % 2) == 1) || (tStats == null)) { + final NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT.removeTag("ench"); + } + return false; + } + final Materials aMaterial = getPrimaryMaterial(aStack); + final HashMap tMap = new HashMap<>(), tResult = new HashMap<>(); + if (aMaterial.mEnchantmentTools != null) { + tMap.put(aMaterial.mEnchantmentTools.effectId, (int) aMaterial.mEnchantmentToolsLevel); + if (aMaterial.mEnchantmentTools == Enchantment.fortune) { + tMap.put(Enchantment.looting.effectId, (int) aMaterial.mEnchantmentToolsLevel); + } + if (aMaterial.mEnchantmentTools == Enchantment.knockback) { + tMap.put(Enchantment.power.effectId, (int) aMaterial.mEnchantmentToolsLevel); + } + if (aMaterial.mEnchantmentTools == Enchantment.fireAspect) { + tMap.put(Enchantment.flame.effectId, (int) aMaterial.mEnchantmentToolsLevel); + } + } + final Enchantment[] tEnchants = tStats.getEnchantments(aStack); + final int[] tLevels = tStats.getEnchantmentLevels(aStack); + for (int i = 0; i < tEnchants.length; i++) { + if (tLevels[i] > 0) { + final Integer tLevel = tMap.get(tEnchants[i].effectId); + tMap.put(tEnchants[i].effectId, tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); + } + } + for (final Entry tEntry : tMap.entrySet()) { + if ((tEntry.getKey() == 33) || ((tEntry.getKey() == 20) && (tEntry.getValue() > 2)) || (tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId)) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } else { + switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { + case weapon: + if (tStats.isWeapon()) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } + break; + case all: + tResult.put(tEntry.getKey(), tEntry.getValue()); + break; + case armor: + case armor_feet: + case armor_head: + case armor_legs: + case armor_torso: + break; + case bow: + if (tStats.isRangedWeapon()) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } + break; + case breakable: + break; + case fishing_rod: + break; + case digger: + if (tStats.isMiningTool()) { + tResult.put(tEntry.getKey(), tEntry.getValue()); + } + break; + } + } + } + EnchantmentHelper.setEnchantments(tResult, aStack); + return true; + } + + @Override + public short getChargedMetaData(final ItemStack aStack) { + return (short) (aStack.getItemDamage() - (aStack.getItemDamage() % 2)); + } + + @Override + public short getEmptyMetaData(final ItemStack aStack) { + final NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT.removeTag("ench"); + } + return (short) ((aStack.getItemDamage() + 1) - (aStack.getItemDamage() % 2)); + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public boolean isBookEnchantable(final ItemStack aStack, final ItemStack aBook) { + return false; + } + + @Override + public boolean getIsRepairable(final ItemStack aStack, final ItemStack aMaterial) { + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java new file mode 100644 index 0000000000..cefd72332b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Base.java @@ -0,0 +1,85 @@ +package gtPlusPlus.xmod.gregtech.api.items.types; + +import java.util.List; + +import net.minecraft.block.BlockDispenser; +import net.minecraft.dispenser.BehaviorDefaultDispenseItem; +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.dispenser.IPosition; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.world.World; + +import gregtech.api.enums.SubTag; + +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ItemBehaviour; +import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_Base; + +public class ToolType_Base implements Interface_ItemBehaviour { + @Override + public boolean onLeftClickEntity(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final EntityPlayer aPlayer, final Entity aEntity) { + return false; + } + + @Override + public boolean onItemUse(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + return false; + } + + @Override + public boolean onItemUseFirst(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + return false; + } + + @Override + public ItemStack onItemRightClick(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final World aWorld, final EntityPlayer aPlayer) { + return aStack; + } + + @Override + public List getAdditionalToolTips(final Gregtech_MetaItem_Base aItem, final List aList, final ItemStack aStack) { + return aList; + } + + @Override + public void onUpdate(final Gregtech_MetaItem_Base aItem, final ItemStack aStack, final World aWorld, final Entity aPlayer, final int aTimer, final boolean aIsInHand) { + } + + @Override + public boolean isItemStackUsable(final Gregtech_MetaItem_Base aItem, final ItemStack aStack) { + return true; + } + + @Override + public boolean canDispense(final Gregtech_MetaItem_Base aItem, final IBlockSource aSource, final ItemStack aStack) { + return false; + } + + @Override + public ItemStack onDispense(final Gregtech_MetaItem_Base aItem, final IBlockSource aSource, final ItemStack aStack) { + final EnumFacing enumfacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); + final IPosition iposition = BlockDispenser.func_149939_a(aSource); + final ItemStack itemstack1 = aStack.splitStack(1); + BehaviorDefaultDispenseItem.doDispense(aSource.getWorld(), itemstack1, 6, enumfacing, iposition); + return aStack; + } + + @Override + public boolean hasProjectile(final Gregtech_MetaItem_Base aItem, final SubTag aProjectileType, final ItemStack aStack) { + return false; + } + + @Override + public EntityArrow getProjectile(final Gregtech_MetaItem_Base aItem, final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final double aX, final double aY, final double aZ) { + return null; + } + + @Override + public EntityArrow getProjectile(final Gregtech_MetaItem_Base aItem, final SubTag aProjectileType, final ItemStack aStack, final World aWorld, final EntityLivingBase aEntity, final float aSpeed) { + return null; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java new file mode 100644 index 0000000000..d4f5a87006 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_HardHammer.java @@ -0,0 +1,125 @@ +package gtPlusPlus.xmod.gregtech.api.items.types; + +import java.util.List; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.ItemData; +import gregtech.api.util.*; +import gregtech.common.blocks.GT_Block_Ores; +import gregtech.common.blocks.GT_TileEntity_Ores; + +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidBlock; + +public class ToolType_HardHammer +extends ToolType_Base { + private final int mVanillaCosts; + private final int mEUCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting"); + + public ToolType_HardHammer(final int aVanillaCosts, final int aEUCosts) { + this.mVanillaCosts = aVanillaCosts; + this.mEUCosts = aEUCosts; + } + + public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + if (aWorld.isRemote) { + return false; + } + final Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + + + ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + return true; + } + if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone))) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + int tX = aX; + int tY = aY; + int tZ = aZ; + int tMetaID = 0; + final int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0; + + int i = 0; + for (final int j = 6 + tQuality; i < j; i++) { + tX -= ForgeDirection.getOrientation(aSide).offsetX; + tY -= ForgeDirection.getOrientation(aSide).offsetY; + tZ -= ForgeDirection.getOrientation(aSide).offsetZ; + + final Block tBlock = aWorld.getBlock(tX, tY, tZ); + if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) { + GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Rock."); + break; + } + if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) { + GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Rock."); + break; + } + if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) { + GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Rock."); + break; + } + if (tBlock != aBlock) { + if (i >= 4) { + break; + } + GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Rock."); + break; + } + } + final Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide); + i = 0; + for (final int j = 9 + (2 * tQuality); i < j; i++) { + tX = (aX - 4 - tQuality) + tRandom.nextInt(j); + tY = (aY - 4 - tQuality) + tRandom.nextInt(j); + tZ = (aZ - 4 - tQuality) + tRandom.nextInt(j); + final Block tBlock = aWorld.getBlock(tX, tY, tZ); + if ((tBlock instanceof GT_Block_Ores)) { + final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) { + final Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; + if ((tMaterial != null) && (tMaterial != Materials._NULL)) { + GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore."); + return true; + } + } + } else { + tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); + tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); + return true; + } + } + } + GT_Utility.sendChatToPlayer(aPlayer, "No Ores found."); + } + return true; + } + return false; + } + + public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java new file mode 100644 index 0000000000..f62d9e5cfa --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Pump.java @@ -0,0 +1,150 @@ +package gtPlusPlus.xmod.gregtech.api.items.types; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + +import ic2.api.tile.IWrenchable; +import net.minecraftforge.common.util.ForgeDirection; + +public class ToolType_Pump +extends ToolType_Base { + private final int mCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.pump", "Sucks in Machine Input Fluid tank contents on Rightclick"); + + public ToolType_Pump(final int aCosts) { + this.mCosts = aCosts; + } + + public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + if (aWorld.isRemote) { + return false; + } + final Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + final byte aTargetSide = GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ); + final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); + /*try { + if ((aTileEntity != null) && ((aTileEntity instanceof IWrenchable))) { + if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + ((IWrenchable) aTileEntity).setFacing(aTargetSide); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (((IWrenchable) aTileEntity).wrenchCanRemove(aPlayer)) { + final int tDamage = ((IWrenchable) aTileEntity).getWrenchDropRate() < 1.0F ? 10 : 3; + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, tDamage * this.mCosts))) { + ItemStack tOutput = ((IWrenchable) aTileEntity).getWrenchDrop(aPlayer); + for (final ItemStack tStack : aBlock.getDrops(aWorld, aX, aY, aZ, aMeta, 0)) { + if (tOutput == null) { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); + } else { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); + tOutput = null; + } + } + aWorld.setBlockToAir(aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + return true; + } + } catch (final Throwable e) { + } + if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.crafting_table) || (aBlock == Blocks.bookshelf)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); + aWorld.setBlockToAir(aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aMeta == aTargetSide) { + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.hopper)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); + aWorld.setBlockToAir(aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + } else { + if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { + if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.trapped_chest)) { + if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aBlock == Blocks.hopper) { + if ((aTargetSide != 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + } + if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)).contains(ForgeDirection.getOrientation(aTargetSide))) && + ((aPlayer.capabilities.isCreativeMode) || (!GT_ModHandler.isElectricItem(aStack)) || (GT_ModHandler.canUseElectricItem(aStack, this.mCosts))) && + (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) { + if (!aPlayer.capabilities.isCreativeMode) { + ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); + } + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + }*/ + return false; + } + + public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java new file mode 100644 index 0000000000..d0ef6a535c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/types/ToolType_Wrench.java @@ -0,0 +1,150 @@ +package gtPlusPlus.xmod.gregtech.api.items.types; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + +import ic2.api.tile.IWrenchable; +import net.minecraftforge.common.util.ForgeDirection; + +public class ToolType_Wrench +extends ToolType_Base { + private final int mCosts; + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick"); + + public ToolType_Wrench(final int aCosts) { + this.mCosts = aCosts; + } + + public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + if (aWorld.isRemote) { + return false; + } + final Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + final byte aTargetSide = GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ); + final TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); + try { + if ((aTileEntity != null) && ((aTileEntity instanceof IWrenchable))) { + if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + ((IWrenchable) aTileEntity).setFacing(aTargetSide); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (((IWrenchable) aTileEntity).wrenchCanRemove(aPlayer)) { + final int tDamage = ((IWrenchable) aTileEntity).getWrenchDropRate() < 1.0F ? 10 : 3; + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, tDamage * this.mCosts))) { + ItemStack tOutput = ((IWrenchable) aTileEntity).getWrenchDrop(aPlayer); + for (final ItemStack tStack : aBlock.getDrops(aWorld, aX, aY, aZ, aMeta, 0)) { + if (tOutput == null) { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); + } else { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); + tOutput = null; + } + } + aWorld.setBlockToAir(aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + return true; + } + } catch (final Throwable e) { + } + if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, ((aMeta / 4) * 4) + (((aMeta % 4) + 1) % 4), 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.crafting_table) || (aBlock == Blocks.bookshelf)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); + aWorld.setBlockToAir(aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aMeta == aTargetSide) { + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.trapped_chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.hopper)) { + if ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + aWorld.spawnEntityInWorld(new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); + aWorld.setBlockToAir(aX, aY, aZ); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + } else { + if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper)) { + if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) || (aBlock == Blocks.furnace) || (aBlock == Blocks.lit_furnace) || (aBlock == Blocks.chest) || (aBlock == Blocks.ender_chest) || (aBlock == Blocks.trapped_chest)) { + if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + if (aBlock == Blocks.hopper) { + if ((aTargetSide != 1) && ((aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return true; + } + } + if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)).contains(ForgeDirection.getOrientation(aTargetSide))) && + ((aPlayer.capabilities.isCreativeMode) || (!GT_ModHandler.isElectricItem(aStack)) || (GT_ModHandler.canUseElectricItem(aStack, this.mCosts))) && + (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) { + if (!aPlayer.capabilities.isCreativeMode) { + ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); + } + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(100)), 1.0F, -1.0F, aX, aY, aZ); + } + return false; + } + + public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { + aList.add(this.mTooltip); + return aList; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java new file mode 100644 index 0000000000..6967c8eb33 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java @@ -0,0 +1,197 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Random; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import ic2.api.Direction; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class BaseCustomTileEntity extends BaseMetaTileEntity { + + protected NBTTagCompound mRecipeStuff2; + private static final Field ENTITY_ITEM_HEALTH_FIELD_2; + + static { + Field f = null; + try { + f = EntityItem.class.getDeclaredField("field_70291_e"); + f.setAccessible(true); + } catch (Exception var4) { + try { + f = EntityItem.class.getDeclaredField("health"); + f.setAccessible(true); + } catch (Exception var3) { + var4.printStackTrace(); + var3.printStackTrace(); + } + } + + ENTITY_ITEM_HEALTH_FIELD_2 = f; + } + + public BaseCustomTileEntity() { + super(); + Logger.MACHINE_INFO("Created new BaseCustomTileEntity"); + } + + public void writeToNBT(NBTTagCompound aNBT) { + try { + super.writeToNBT(aNBT); + } catch (Throwable arg7) { + GT_Log.err.println( + "Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould\'ve been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!"); + arg7.printStackTrace(GT_Log.err); + } + + try { + if (!aNBT.hasKey("ModVersion")) + aNBT.setString("ModVersion", CORE.VERSION); + } catch (Throwable arg6) { + GT_Log.err.println( + "Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould\'ve been corrupted by now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!"); + arg6.printStackTrace(GT_Log.err); + } + } + + public void doEnergyExplosion() { + if (this.getUniversalEnergyCapacity() > 0L + && this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 5L) { + this.doExplosion( + this.getOutput() * (long) (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() ? 4 + : (this.getUniversalEnergyStored() >= this.getUniversalEnergyCapacity() / 2L ? 2 : 1))); + GT_Mod arg9999 = GT_Mod.instance; + GT_Mod.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(this.getOwnerName()), + "electricproblems"); + } + + } + + public void doExplosion(long aAmount) { + if (this.canAccessData()) { + if (GregTech_API.sMachineWireFire && this.mMetaTileEntity.isElectric()) { + try { + this.mReleaseEnergy = true; + Util.emitEnergyToNetwork(GT_Values.V[5], Math.max(1L, this.getStoredEU() / GT_Values.V[5]), this); + } catch (Exception arg4) { + ; + } + } + + this.mReleaseEnergy = false; + this.mMetaTileEntity.onExplosion(); + int i; + + boolean aExplosionDropItem = false; + Object aProxyField = StaticFields59.getFieldFromGregtechProxy(false, "mExplosionItemDrop"); + if (boolean.class.isInstance(aProxyField) || Boolean.class.isInstance(aProxyField)) { + aExplosionDropItem = (boolean) aProxyField; + } + + if (aExplosionDropItem) { + for (i = 0; i < this.getSizeInventory(); ++i) { + ItemStack tItem = this.getStackInSlot(i); + if (tItem != null && tItem.stackSize > 0 && this.isValidSlot(i)) { + this.dropItems(tItem); + this.setInventorySlotContents(i, (ItemStack) null); + } + } + } + + if (this.mRecipeStuff2 != null) { + for (i = 0; i < 9; ++i) { + this.dropItems(GT_Utility.loadItem(this.mRecipeStuff2, "Ingredient." + i)); + } + } + + PollutionUtils.addPollution(this, 100000); + this.mMetaTileEntity.doExplosion(aAmount); + } + + } + + + public void dropItems(ItemStack tItem) { + if (tItem != null) { + Random tRandom = new Random(); + EntityItem tItemEntity = new EntityItem(this.worldObj, + (double) ((float) this.xCoord + tRandom.nextFloat() * 0.8F + 0.1F), + (double) ((float) this.yCoord + tRandom.nextFloat() * 0.8F + 0.1F), + (double) ((float) this.zCoord + tRandom.nextFloat() * 0.8F + 0.1F), + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + } + + tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; + tItemEntity.motionY = tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D; + tItemEntity.motionZ = tRandom.nextGaussian() * 0.0500000007450581D; + tItemEntity.hurtResistantTime = 999999; + tItemEntity.lifespan = 60000; + + try { + if (ENTITY_ITEM_HEALTH_FIELD_2 != null) { + ENTITY_ITEM_HEALTH_FIELD_2.setInt(tItemEntity, 99999999); + } + } catch (Exception var5) { + ; + } + + this.worldObj.spawnEntityInWorld(tItemEntity); + tItem.stackSize = 0; + } + } + + public ArrayList getDrops() { + ArrayList aDrops = new ArrayList(); + ItemStack rStack = new ItemStack(GregTech_API.sBlockMachines, 1, this.getMetaTileID()); + // Currently not using my custom block. + // ItemStack rStack = new ItemStack(Meta_GT_Proxy.sBlockMachines, 1, + // this.getMetaTileID()); + boolean fail = true; + + ArrayList aSuperDrops = super.getDrops(); + if (aSuperDrops != null && !aSuperDrops.isEmpty()) { + ItemStack aSuperStack = super.getDrops().get(0); + if (aSuperStack != null && aSuperStack.hasTagCompound()) { + NBTTagCompound aSuperNBT = aSuperStack.getTagCompound(); + if (aSuperNBT != null && !aSuperNBT.hasNoTags()) { + NBTTagCompound tNBT = (NBTTagCompound) aSuperNBT.copy(); + if (tNBT != null && !tNBT.hasNoTags()) { + if (this.hasValidMetaTileEntity()) { + this.mMetaTileEntity.setItemNBT(tNBT); + rStack.setTagCompound(tNBT); + fail = false; + aDrops.add(rStack); + } + } + } + + } + } + if (fail) { + aDrops.add(rStack); + } + return aDrops; + } + + public boolean isTeleporterCompatible(Direction aSide) { + return this.canAccessData() && this.mMetaTileEntity.isTeleporterCompatible(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java new file mode 100644 index 0000000000..a4440114e8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java @@ -0,0 +1,280 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.metatileentity.BaseCustomTileEntity; +import ic2.api.Direction; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class BaseCustomPower_MTE extends BaseCustomTileEntity { + + public BaseCustomPower_MTE() { + super(); + Logger.MACHINE_INFO("Created new BaseCustomPower_MTE"); + } + + public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) { + if (mMetaTileEntity == null) { + Logger.MACHINE_INFO("Bad Tile"); + } + if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.inputEnergyFrom(aSide) && aAmperage > 0L + && aVoltage > 0L && this.getStoredEU() < this.getEUCapacity() + && this.mMetaTileEntity.maxAmperesIn() >= this.getInputAmperage()) { + Logger.MACHINE_INFO("Injecting Energy Units"); + return super.injectEnergyUnits(aSide, aVoltage, aAmperage); + } else { + Logger.MACHINE_INFO("canAccessData(): "+canAccessData()); + Logger.MACHINE_INFO("isElectric(): "+this.mMetaTileEntity.isElectric()); + Logger.MACHINE_INFO("InputEnergyFromSide("+aSide+"): "+this.inputEnergyFrom(aSide)); + Logger.MACHINE_INFO("aAmperage: "+aAmperage); + Logger.MACHINE_INFO("aVoltage: "+aVoltage); + Logger.MACHINE_INFO("this.getStoredEU() < this.getEUCapacity(): "+(this.getStoredEU() < this.getEUCapacity())); + Logger.MACHINE_INFO("this.mMetaTileEntity.maxAmperesIn() >= this.mAcceptedAmperes: "+(this.mMetaTileEntity.maxAmperesIn() >= this.getInputAmperage())); + Logger.MACHINE_INFO("this.mMetaTileEntity.maxAmperesIn(): "+(this.mMetaTileEntity.maxAmperesIn())); + Logger.MACHINE_INFO("this.mAcceptedAmperes: "+(this.getInputAmperage())); + return 0L; + } + } + + public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) { + Logger.MACHINE_INFO("Draining Energy Units 4"); + if (this.canAccessData() && this.mMetaTileEntity.isElectric() && this.outputsEnergyTo(aSide) + && this.getStoredEU() - aVoltage * aAmperage >= this.mMetaTileEntity.getMinimumStoredEU()) { + if (this.decreaseStoredEU(aVoltage * aAmperage, false)) { + this.mAverageEUOutput[this.mAverageEUOutputIndex] = (int) ((long) this.mAverageEUOutput[this.mAverageEUOutputIndex] + + aVoltage * aAmperage); + return true; + } else { + return false; + } + } else { + return false; + } + } + + @Override + public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) { + Logger.MACHINE_INFO("Draining Energy Units 3"); + // TODO Auto-generated method stub + return super.decreaseStoredEnergyUnits(aEnergy, aIgnoreTooLessEnergy); + } + + @Override + public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) { + // TODO Auto-generated method stub + return super.increaseStoredEnergyUnits(aEnergy, aIgnoreTooMuchEnergy); + } + + @Override + public boolean inputEnergyFrom(byte aSide) { + // TODO Auto-generated method stub + return super.inputEnergyFrom(aSide); + } + + @Override + public boolean outputsEnergyTo(byte aSide) { + Logger.MACHINE_INFO("Draining Energy Units 2"); + // TODO Auto-generated method stub + return super.outputsEnergyTo(aSide); + } + + @Override + public long getOutputAmperage() { + // TODO Auto-generated method stub + return super.getOutputAmperage(); + } + + @Override + public long getOutputVoltage() { + // TODO Auto-generated method stub + return super.getOutputVoltage(); + } + + @Override + public long getInputAmperage() { + // TODO Auto-generated method stub + return super.getInputAmperage(); + } + + @Override + public long getInputVoltage() { + // TODO Auto-generated method stub + return super.getInputVoltage(); + } + + @Override + public long getUniversalEnergyStored() { + // TODO Auto-generated method stub + return super.getUniversalEnergyStored(); + } + + @Override + public long getUniversalEnergyCapacity() { + // TODO Auto-generated method stub + return super.getUniversalEnergyCapacity(); + } + + @Override + public long getStoredEU() { + // TODO Auto-generated method stub + return super.getStoredEU(); + } + + @Override + public long getEUCapacity() { + // TODO Auto-generated method stub + return super.getEUCapacity(); + } + + @Override + public boolean setStoredEU(long aEnergy) { + // TODO Auto-generated method stub + return super.setStoredEU(aEnergy); + } + + @Override + public boolean decreaseStoredEU(long aEnergy, boolean aIgnoreTooLessEnergy) { + Logger.MACHINE_INFO("Draining Energy Units 1"); + // TODO Auto-generated method stub + return super.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy); + } + + @Override + public boolean decreaseStoredSteam(long aEnergy, boolean aIgnoreTooLessEnergy) { + // TODO Auto-generated method stub + return super.decreaseStoredSteam(aEnergy, aIgnoreTooLessEnergy); + } + + @Override + public void doEnergyExplosion() { + // TODO Auto-generated method stub + super.doEnergyExplosion(); + } + + @Override + public void doExplosion(long aAmount) { + // TODO Auto-generated method stub + super.doExplosion(aAmount); + } + + @Override + public byte getLightValue() { + // TODO Auto-generated method stub + return super.getLightValue(); + } + + @Override + public long getAverageElectricInput() { + // TODO Auto-generated method stub + return super.getAverageElectricInput(); + } + + @Override + public long getAverageElectricOutput() { + // TODO Auto-generated method stub + return super.getAverageElectricOutput(); + } + + @Override + public double getOutputEnergyUnitsPerTick() { + // TODO Auto-generated method stub + return super.getOutputEnergyUnitsPerTick(); + } + + @Override + public double demandedEnergyUnits() { + // TODO Auto-generated method stub + return super.demandedEnergyUnits(); + } + + @Override + public double injectEnergyUnits(ForgeDirection aDirection, double aAmount) { + // TODO Auto-generated method stub + return super.injectEnergyUnits(aDirection, aAmount); + } + + @Override + public boolean acceptsEnergyFrom(TileEntity aEmitter, ForgeDirection aDirection) { + // TODO Auto-generated method stub + return super.acceptsEnergyFrom(aEmitter, aDirection); + } + + @Override + public boolean emitsEnergyTo(TileEntity aReceiver, ForgeDirection aDirection) { + // TODO Auto-generated method stub + return super.emitsEnergyTo(aReceiver, aDirection); + } + + @Override + public double getOfferedEnergy() { + // TODO Auto-generated method stub + return super.getOfferedEnergy(); + } + + @Override + public void drawEnergy(double amount) { + // TODO Auto-generated method stub + super.drawEnergy(amount); + } + + @Override + public int injectEnergy(ForgeDirection aForgeDirection, int aAmount) { + // TODO Auto-generated method stub + return super.injectEnergy(aForgeDirection, aAmount); + } + + @Override + public int addEnergy(int aEnergy) { + // TODO Auto-generated method stub + return super.addEnergy(aEnergy); + } + + @Override + public boolean isAddedToEnergyNet() { + // TODO Auto-generated method stub + return super.isAddedToEnergyNet(); + } + + @Override + public int demandsEnergy() { + // TODO Auto-generated method stub + return super.demandsEnergy(); + } + + @Override + public int getMaxSafeInput() { + // TODO Auto-generated method stub + return super.getMaxSafeInput(); + } + + @Override + public int getMaxEnergyOutput() { + // TODO Auto-generated method stub + return super.getMaxEnergyOutput(); + } + + @Override + public int injectEnergy(Direction aDirection, int aAmount) { + // TODO Auto-generated method stub + return super.injectEnergy(aDirection, aAmount); + } + + @Override + public boolean acceptsEnergyFrom(TileEntity aReceiver, Direction aDirection) { + // TODO Auto-generated method stub + return super.acceptsEnergyFrom(aReceiver, aDirection); + } + + @Override + public boolean emitsEnergyTo(TileEntity aReceiver, Direction aDirection) { + // TODO Auto-generated method stub + return super.emitsEnergyTo(aReceiver, aDirection); + } + + @Override + public boolean isUniversalEnergyStored(long aEnergyAmount) { + // TODO Auto-generated method stub + return super.isUniversalEnergyStored(aEnergyAmount); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java new file mode 100644 index 0000000000..e1b329c07f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicLosslessGenerator.java @@ -0,0 +1,313 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import java.util.Collection; +import java.util.Iterator; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public abstract class GTPP_MTE_BasicLosslessGenerator extends GTPP_MTE_BasicTank { + public GTPP_MTE_BasicLosslessGenerator(int aID, String aName, String aNameRegional, int aTier, String aDescription, + ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); + } + + public GTPP_MTE_BasicLosslessGenerator(int aID, String aName, String aNameRegional, int aTier, + String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); + } + + public GTPP_MTE_BasicLosslessGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + public GTPP_MTE_BasicLosslessGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[10][17][]; + + for (byte i = -1; i < 16; ++i) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + + return rTextures; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing + ? 0 + : (aSide == GT_Utility.getOppositeSide(aFacing) + ? 1 + : (aSide == 0 ? 2 : (aSide == 1 ? 3 : 4))))][aColorIndex + 1]; + } + + public String[] getDescription() { + String[] desc = new String[this.mDescriptionArray.length + 1]; + System.arraycopy(this.mDescriptionArray, 0, desc, 0, this.mDescriptionArray.length); + desc[this.mDescriptionArray.length] = "Fuel Efficiency: " + this.getEfficiency() + "%"; + return desc; + } + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + Logger.WARNING("Right Clicked"); + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } else { + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + } + + public ITexture[] getFront(byte aColor) { + return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBack(byte aColor) { + return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getTop(byte aColor) { + return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getSides(byte aColor) { + return new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getFrontActive(byte aColor) { + return this.getFront(aColor); + } + + public ITexture[] getBackActive(byte aColor) { + return this.getBack(aColor); + } + + public ITexture[] getBottomActive(byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(byte aColor) { + return this.getSides(aColor); + } + + public boolean isFacingValid(byte aSide) { + return aSide > 1; + } + + public boolean isSimpleMachine() { + return false; + } + + public boolean isValidSlot(int aIndex) { + return aIndex < 2; + } + + public boolean isEnetOutput() { + return true; + } + + public boolean isOutputFacing(byte aSide) { + return true; + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public long maxEUOutput() { + return this.getBaseMetaTileEntity().isAllowedToWork() ? GT_Values.V[this.mTier] : 0L; + } + + public long maxEUStore() { + return Math.max(this.getEUVar(), GT_Values.V[this.mTier] * 40L + this.getMinimumStoredEU()); + } + + public boolean doesFillContainers() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + public boolean doesEmptyContainers() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + public boolean canTankBeFilled() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + public boolean canTankBeEmptied() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + public boolean displaysItemStack() { + return true; + } + + public boolean displaysStackSize() { + return false; + } + + public boolean isFluidInputAllowed(FluidStack aFluid) { + int aVal = this.getFuelValue(aFluid); + Logger.WARNING("Fuel Value: "+aVal); + return aVal > 0; + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) { + int tFuelValue; + if (this.mFluid == null) { + if (aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() + this.getMinimumStoredEU()) { + this.mInventory[this.getStackDisplaySlot()] = null; + } else { + if (this.mInventory[this.getStackDisplaySlot()] == null) { + this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); + } + + this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " + + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); + } + } else { + tFuelValue = this.getFuelValue(this.mFluid); + int tConsumed = this.consumedFluidPerOperation(this.mFluid); + if (tFuelValue > 0 && tConsumed > 0 && this.mFluid.amount > tConsumed) { + long tFluidAmountToUse = Math.min((long) (this.mFluid.amount / tConsumed), + (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); + if (tFluidAmountToUse > 0L && aBaseMetaTileEntity + .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); + this.mFluid.amount = (int) ((long) this.mFluid.amount - tFluidAmountToUse * (long) tConsumed); + } + } + } + + if (this.mInventory[this.getInputSlot()] != null + && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L + + this.getMinimumStoredEU() + && GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null) { + tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); + if (tFuelValue > 0) { + ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); + } + } + } + } + + if (aBaseMetaTileEntity.isServerSide()) { + Logger.WARNING("Ticking Servside"); + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity + .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU()); + } + + } + + public abstract int getPollution(); + + public abstract GT_Recipe_Map getRecipes(); + + public abstract int getEfficiency(); + + public int consumedFluidPerOperation(FluidStack aLiquid) { + return 1; + } + + public int getFuelValue(FluidStack aLiquid) { + if (aLiquid != null && this.getRecipes() != null) { + Collection tRecipeList = this.getRecipes().mRecipeList; + if (tRecipeList != null) { + Logger.WARNING("Fuels: "+tRecipeList.size()); + Iterator var4 = tRecipeList.iterator(); + + while (var4.hasNext()) { + GT_Recipe tFuel = (GT_Recipe) var4.next(); + FluidStack tLiquid; + if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null + && aLiquid.isFluidEqual(tLiquid)) { + Logger.WARNING("Fuel Ok"); + return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency() + * (long) this.consumedFluidPerOperation(tLiquid) / 100L); + } + if ((tLiquid = tFuel.getRepresentativeFluidInput(0)) != null + && aLiquid.isFluidEqual(tLiquid)) { + Logger.WARNING("Fuel Ok"); + return (int) ((long) tFuel.mSpecialValue * (long) this.getEfficiency() + * (long) this.consumedFluidPerOperation(tLiquid) / 100L); + } + } + } + + return 0; + } else { + return 0; + } + } + + public int getFuelValue(ItemStack aStack) { + if (!GT_Utility.isStackInvalid(aStack) && this.getRecipes() != null) { + Logger.WARNING("Fuel Item OK"); + GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, + (FluidStack[]) null, new ItemStack[]{aStack}); + return tFuel != null ? (int) ((long) tFuel.mSpecialValue * 1000L * (long) this.getEfficiency() / 100L) : 0; + } else { + return 0; + } + } + + public ItemStack getEmptyContainer(ItemStack aStack) { + if (!GT_Utility.isStackInvalid(aStack) && this.getRecipes() != null) { + GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, + (FluidStack[]) null, new ItemStack[]{aStack}); + return tFuel != null + ? GT_Utility.copy(new Object[]{tFuel.getOutput(0)}) + : GT_Utility.getContainerItem(aStack, true); + } else { + return null; + } + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && (this.getFuelValue(aStack) > 0 + || this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0); + } + + public int getCapacity() { + return 16000; + } + + public int getTankPressure() { + return -100; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java new file mode 100644 index 0000000000..2eb1d36791 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java @@ -0,0 +1,860 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_BasicMachine; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.random.XSTR; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +import java.util.Arrays; + +import static gregtech.api.enums.GT_Values.V; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * This is the main construct for my Basic Machines such as the Automatic Extractor + * Extend this class to make a simple Machine + */ +public abstract class GTPP_MTE_BasicMachine extends GTPP_MTE_BasicTank { + /** + * return values for checkRecipe() + */ + protected static final int + DID_NOT_FIND_RECIPE = 0, + FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, + FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; + public static final int OTHER_SLOT_COUNT = 4; + public final ItemStack[] mOutputItems; + public final int mInputSlotCount, mAmperage; + public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false; + public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; + public FluidStack mOutputFluid; + public String mGUIName = "", mNEIName = ""; + public GT_MetaTileEntity_MultiBlockBase mCleanroom; + /** + * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered + */ + protected GT_Recipe mLastRecipe = null; + private FluidStack mFluidOut; + + /** + * @param aOverlays 0 = SideFacingActive + * 1 = SideFacingInactive + * 2 = FrontFacingActive + * 3 = FrontFacingInactive + * 4 = TopFacingActive + * 5 = TopFacingInactive + * 6 = BottomFacingActive + * 7 = BottomFacingInactive + * ----- Not all Array Elements have to be initialised, you can also just use 8 Parameters for the Default Pipe Texture Overlays ----- + * 8 = BottomFacingPipeActive + * 9 = BottomFacingPipeInactive + * 10 = TopFacingPipeActive + * 11 = TopFacingPipeInactive + * 12 = SideFacingPipeActive + * 13 = SideFacingPipeInactive + */ + public GTPP_MTE_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { + super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + + public GTPP_MTE_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String[] aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { + super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + + public GTPP_MTE_BasicMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { + super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + + public GTPP_MTE_BasicMachine(String aName, int aTier, int aAmperage, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { + super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + + protected boolean isValidMainFacing(byte aSide) { + return aSide > 1; + } + + public boolean setMainFacing(byte aSide){ + if (!isValidMainFacing(aSide)) return false; + mMainFacing = aSide; + if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ + getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aSide)); + } + onFacingChange(); + onMachineBlockUpdate(); + return true; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[14][17][]; + aTextures = Arrays.copyOf(aTextures, 14); + + for (int i = 0; i < aTextures.length; i++) + if (aTextures[i] != null) for (byte c = -1; c < 16; c++) { + if (rTextures[i][c + 1] == null) + rTextures[i][c + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; + } + + for (byte c = -1; c < 16; c++) { + if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); + if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); + if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); + if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); + if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); + if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); + if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); + if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); + if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); + if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); + if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); + if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); + if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); + if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return mTextures[mMainFacing < 2 ? aSide == aFacing ? aActive ? 2 : 3 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1 : aSide == mMainFacing ? aActive ? 2 : 3 : (showPipeFacing() && aSide == aFacing) ? aSide == 0 ? aActive ? 8 : 9 : aSide == 1 ? aActive ? 10 : 11 : aActive ? 12 : 13 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1][aColorIndex + 1]; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public boolean isElectric() { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return mMainFacing > 1 || aFacing > 1; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return aSide != mMainFacing; + } + + @Override + public boolean isOutputFacing(byte aSide) { + return false; + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public boolean isLiquidInput(byte aSide) { + return aSide != mMainFacing && (mAllowInputFromOutputSide || aSide != getBaseMetaTileEntity().getFrontFacing()); + } + + @Override + public boolean isLiquidOutput(byte aSide) { + return aSide != mMainFacing; + } + + @Override + public long getMinimumStoredEU() { + return V[mTier] * 16; + } + + @Override + public long maxEUStore() { + return V[mTier] * 64; + } + + @Override + public long maxEUInput() { + return V[mTier]; + } + + @Override + public long maxSteamStore() { + return maxEUStore(); + } + + @Override + public long maxAmperesIn() { + return (mEUt * 2) / V[mTier] + 1; + } + + @Override + public int getInputSlot() { + return OTHER_SLOT_COUNT; + } + + @Override + public int getOutputSlot() { + return OTHER_SLOT_COUNT + mInputSlotCount; + } + + @Override + public int getStackDisplaySlot() { + return 2; + } + + @Override + public int rechargerSlotStartIndex() { + return 1; + } + + @Override + public int dechargerSlotStartIndex() { + return 1; + } + + @Override + public int rechargerSlotCount() { + return mCharge ? 1 : 0; + } + + @Override + public int dechargerSlotCount() { + return mDecharge ? 1 : 0; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public int getProgresstime() { + return mProgresstime; + } + + @Override + public int maxProgresstime() { + return mMaxProgresstime; + } + + @Override + public int increaseProgress(int aProgress) { + mProgresstime += aProgress; + return mMaxProgresstime - mProgresstime; + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return getFillableStack() != null || (getRecipeList() != null && getRecipeList().containsInput(aFluid)); + } + + @Override + public boolean isFluidChangingAllowed() { + return true; + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return true; + } + + @Override + public boolean displaysItemStack() { + return true; + } + + @Override + public boolean displaysStackSize() { + return true; + } + + @Override + public FluidStack getDisplayedFluid() { + return displaysOutputFluid() ? getDrainableStack() : null; + } + + @Override + public FluidStack getDrainableStack() { + return mFluidOut; + } + + @Override + public FluidStack setDrainableStack(FluidStack aFluid) { + mFluidOut = aFluid; + return mFluidOut; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_BasicMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); + } + + @Override + public void initDefaultModes(NBTTagCompound aNBT) { + mMainFacing = -1; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mFluidTransfer", mFluidTransfer); + aNBT.setBoolean("mItemTransfer", mItemTransfer); + aNBT.setBoolean("mHasBeenUpdated", mHasBeenUpdated); + aNBT.setBoolean("mAllowInputFromOutputSide", mAllowInputFromOutputSide); + aNBT.setInteger("mEUt", mEUt); + aNBT.setInteger("mMainFacing", mMainFacing); + aNBT.setInteger("mProgresstime", mProgresstime); + aNBT.setInteger("mMaxProgresstime", mMaxProgresstime); + if (mOutputFluid != null) aNBT.setTag("mOutputFluid", mOutputFluid.writeToNBT(new NBTTagCompound())); + if (mFluidOut != null) aNBT.setTag("mFluidOut", mFluidOut.writeToNBT(new NBTTagCompound())); + + for (int i = 0; i < mOutputItems.length; i++) + if (mOutputItems[i] != null) + aNBT.setTag("mOutputItem" + i, mOutputItems[i].writeToNBT(new NBTTagCompound())); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mFluidTransfer = aNBT.getBoolean("mFluidTransfer"); + mItemTransfer = aNBT.getBoolean("mItemTransfer"); + mHasBeenUpdated = aNBT.getBoolean("mHasBeenUpdated"); + mAllowInputFromOutputSide = aNBT.getBoolean("mAllowInputFromOutputSide"); + mEUt = aNBT.getInteger("mEUt"); + mMainFacing = aNBT.getInteger("mMainFacing"); + mProgresstime = aNBT.getInteger("mProgresstime"); + mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); + mOutputFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid")); + mFluidOut = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluidOut")); + + for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + if (aBaseMetaTileEntity.isServerSide()) { + mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3; + mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3; + + doDisplayThings(); + + boolean tSucceeded = false; + + if (mMaxProgresstime > 0 && (mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) { + aBaseMetaTileEntity.setActive(true); + if (mProgresstime < 0 || drainEnergyForProcess(mEUt)) { + if (++mProgresstime >= mMaxProgresstime) { + for (int i = 0; i < mOutputItems.length; i++) + for (int j = 0; j < mOutputItems.length; j++) + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) + break; + if (mOutputFluid != null) + if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy()); + else if (mOutputFluid.isFluidEqual(getDrainableStack())) + getDrainableStack().amount += mOutputFluid.amount; + for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; + mOutputFluid = null; + mEUt = 0; + mProgresstime = 0; + mMaxProgresstime = 0; + mStuttering = false; + tSucceeded = true; + endProcess(); + } + if (mProgresstime > 5) mStuttering = false; + XSTR aXSTR = new XSTR(); + //Dumb April Fools Shit + // if(GT_Mod.gregtechproxy.mAprilFool && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); + } else { + if (!mStuttering) { + stutterProcess(); + if (canHaveInsufficientEnergy()) mProgresstime = -100; + mStuttering = true; + } + } + } else { + aBaseMetaTileEntity.setActive(false); + } + + boolean tRemovedOutputFluid = false; + + if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { + IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); + if (tTank != null) { + FluidStack tDrained = drain(1000, false); + if (tDrained != null) { + int tFilledAmount = tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); + if (tFilledAmount > 0) + tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), drain(tFilledAmount, true), true); + } + } + if (getDrainableStack() == null) tRemovedOutputFluid = true; + } + + if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) { + TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); + for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { + tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); + } + } + + if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; + else mOutputBlocked++; + + if (allowToCheckRecipe()) { + if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { + if (checkRecipe() == 2) { + if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null; + for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + for (int i = 0; i < mOutputItems.length; i++) { + mOutputItems[i] = GT_Utility.copy(mOutputItems[i]); + if (mOutputItems[i] != null && mOutputItems[i].stackSize > 64) + mOutputItems[i].stackSize = 64; + mOutputItems[i] = GT_OreDictUnificator.get(true, mOutputItems[i]); + } + if (mFluid != null && mFluid.amount <= 0) mFluid = null; + mMaxProgresstime = Math.max(1, mMaxProgresstime); + if (GT_Utility.isDebugItem(mInventory[dechargerSlotStartIndex()])) { + mEUt = mMaxProgresstime = 1; + } + startProcess(); + } else { + mMaxProgresstime = 0; + for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; + mOutputFluid = null; + } + } + } else { + if (!mStuttering) { + stutterProcess(); + mStuttering = true; + } + } + } + } + + protected void doDisplayThings() { + if (mMainFacing < 2 && getBaseMetaTileEntity().getFrontFacing() > 1) { + mMainFacing = getBaseMetaTileEntity().getFrontFacing(); + } + if (mMainFacing >= 2 && !mHasBeenUpdated) { + mHasBeenUpdated = true; + getBaseMetaTileEntity().setFrontFacing(getBaseMetaTileEntity().getBackFacing()); + } + + if (displaysInputFluid()) { + int tDisplayStackSlot = OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; + if (getFillableStack() == null) { + if (ItemList.Display_Fluid.isStackEqual(mInventory[tDisplayStackSlot], true, true)) + mInventory[tDisplayStackSlot] = null; + } else { + mInventory[tDisplayStackSlot] = GT_Utility.getFluidDisplayStack(getFillableStack(), displaysStackSize()); + } + } + } + + protected boolean hasEnoughEnergyToCheckRecipe() { + return getBaseMetaTileEntity().isUniversalEnergyStored(getMinimumStoredEU() / 2); + } + + protected boolean drainEnergyForProcess(long aEUt) { + return getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEUt, false); + } + + protected void calculateOverclockedNess(GT_Recipe aRecipe) { + calculateOverclockedNess(aRecipe.mEUt, aRecipe.mDuration); + } + + protected void calculateOverclockedNess(int aEUt, int aDuration) { + if (aEUt <= 16) { + mEUt = aEUt * (1 << (mTier - 1)) * (1 << (mTier - 1)); + mMaxProgresstime = aDuration / (1 << (mTier - 1)); + } else { + mEUt = aEUt; + mMaxProgresstime = aDuration; + while (mEUt <= V[mTier - 1] * mAmperage) { + mEUt *= 4; + mMaxProgresstime /= 2; + } + } + } + + protected ItemStack getSpecialSlot() { + return mInventory[3]; + } + + protected ItemStack getOutputAt(int aIndex) { + return mInventory[getOutputSlot() + aIndex]; + } + + protected ItemStack[] getAllOutputs() { + ItemStack[] rOutputs = new ItemStack[mOutputItems.length]; + for (int i = 0; i < mOutputItems.length; i++) rOutputs[i] = getOutputAt(i); + return rOutputs; + } + + protected boolean canOutput(GT_Recipe aRecipe) { + return aRecipe != null && (aRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs)); + } + + protected boolean canOutput(ItemStack... aOutputs) { + if (aOutputs == null) return true; + ItemStack[] tOutputSlots = getAllOutputs(); + for (int i = 0; i < tOutputSlots.length && i < aOutputs.length; i++) + if (tOutputSlots[i] != null && aOutputs[i] != null && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) { + mOutputBlocked++; + return false; + } + return true; + } + + protected boolean canOutput(FluidStack aOutput) { + return getDrainableStack() == null || aOutput == null || (getDrainableStack().isFluidEqual(aOutput) && (getDrainableStack().amount <= 0 || getDrainableStack().amount + aOutput.amount <= getCapacity())); + } + + protected ItemStack getInputAt(int aIndex) { + return mInventory[getInputSlot() + aIndex]; + } + + protected ItemStack[] getAllInputs() { + ItemStack[] rInputs = new ItemStack[mInputSlotCount]; + for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i); + return rInputs; + } + + protected boolean isOutputEmpty() { + boolean rIsEmpty = true; + for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) rIsEmpty = false; + return rIsEmpty; + } + + protected boolean displaysInputFluid() { + return true; + } + + protected boolean displaysOutputFluid() { + return true; + } + + @Override + public void onValueUpdate(byte aValue) { + mMainFacing = aValue; + } + + @Override + public byte getUpdateData() { + return (byte) mMainFacing; + } + + @Override + public void doSound(byte aIndex, double aX, double aY, double aZ) { + super.doSound(aIndex, aX, aY, aZ); + if (aIndex == 8) GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(210), 100, 1.0F, aX, aY, aZ); + } + + public boolean doesAutoOutput() { + return mItemTransfer; + } + + public boolean doesAutoOutputFluids() { + return mFluidTransfer; + } + + public boolean allowToCheckRecipe() { + return true; + } + + public boolean showPipeFacing() { + return true; + } + + /** + * Called whenever the Machine successfully started a Process, useful for Sound Effects + */ + public void startProcess() { + // + } + + /** + * Called whenever the Machine successfully finished a Process, useful for Sound Effects + */ + public void endProcess() { + // + } + + /** + * Called whenever the Machine aborted a Process, useful for Sound Effects + */ + public void abortProcess() { + // + } + + /** + * Called whenever the Machine aborted a Process but still works on it, useful for Sound Effects + */ + public void stutterProcess() { + if (useStandardStutterSound()) sendSound((byte) 8); + } + + /** + * If this Machine can have the Insufficient Energy Line Problem + */ + public boolean canHaveInsufficientEnergy() { + return true; + } + + public boolean useStandardStutterSound() { + return true; + } + + @Override + public String[] getInfoData() { + return new String[]{ + mNEIName, + "Progress:", (mProgresstime / 20) + " secs", + (mMaxProgresstime / 20) + " secs", + "Stored Energy:", + getBaseMetaTileEntity().getStoredEU() + "EU", + getBaseMetaTileEntity().getEUCapacity() + "EU"}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) { + mAllowInputFromOutputSide = !mAllowInputFromOutputSide; + GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? "Input from Output Side allowed" : "Input from Output Side forbidden"); + } + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { + return (aSide != mMainFacing || GregTech_API.getCoverBehavior(aCoverID.toStack()).isGUIClickable(aSide, GT_Utility.stackToInt(aCoverID.toStack()), 0, getBaseMetaTileEntity())); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide != mMainFacing && aIndex >= getOutputSlot() && aIndex < getOutputSlot() + mOutputItems.length; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (aSide == mMainFacing || aIndex < getInputSlot() || aIndex >= getInputSlot() + mInputSlotCount || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) + return false; + for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i])) return i == aIndex; + return true; + } + + /** + * @return the Recipe List which is used for this Machine, this is a useful Default Handler + */ + public GT_Recipe_Map getRecipeList() { + return null; + } + + /** + * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a special case + *

+ * I thought about Enum too, but Enum doesn't add support for people adding other return Systems. + *

+ * Funny how Eclipse marks the word Enum as not correctly spelled. + * + * @return see constants above + */ + public int checkRecipe() { + return checkRecipe(false); + } + + public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId){ + return //TODO check or get a better solution + DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") || + DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); + } + + + /** + * + * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... + * @return + */ + public int checkRecipe(boolean skipOC){ + GT_Recipe_Map tMap = getRecipeList(); + if (tMap == null) return DID_NOT_FIND_RECIPE; + GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); + if (tRecipe == null) return DID_NOT_FIND_RECIPE; + + if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; + if (!canOutput(tRecipe)) { + mOutputBlocked++; + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } + if (tRecipe.mSpecialValue == -200 && (mCleanroom == null || mCleanroom.mEfficiency == 0)) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + for (int i = 0; i < mOutputItems.length; i++) + if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) + mOutputItems[i] = tRecipe.getOutput(i); + if (tRecipe.mSpecialValue == -200) + for (int i = 0; i < mOutputItems.length; i++) + if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) + mOutputItems[i] = null; + mOutputFluid = tRecipe.getFluidOutput(0); + calculateOverclockedNess(tRecipe); + return FOUND_AND_SUCCESSFULLY_USED_RECIPE; + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getBottomFacingPipeActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getBottomFacingPipeInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java new file mode 100644 index 0000000000..9c6840e33c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicTank.java @@ -0,0 +1,266 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; + +import gregtech.api.enums.ItemList; +import gregtech.api.gui.GT_Container_BasicTank; +import gregtech.api.gui.GT_GUIContainer_BasicTank; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.api.gui.power.CONTAINER_BasicTank; +import gtPlusPlus.xmod.gregtech.api.gui.power.GUI_BasicTank; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually + */ +public abstract class GTPP_MTE_BasicTank extends GTPP_MTE_TieredMachineBlock { + + public FluidStack mFluid; + + /** + * @param aInvSlotCount should be 3 + */ + public GTPP_MTE_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GTPP_MTE_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GTPP_MTE_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GTPP_MTE_BasicTank(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(int aIndex) { + return aIndex != getStackDisplaySlot(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); + } + + public abstract boolean doesFillContainers(); + + public abstract boolean doesEmptyContainers(); + + public abstract boolean canTankBeFilled(); + + public abstract boolean canTankBeEmptied(); + + public abstract boolean displaysItemStack(); + + public abstract boolean displaysStackSize(); + + public int getInputSlot() { + return 0; + } + + public int getOutputSlot() { + return 1; + } + + public int getStackDisplaySlot() { + return 2; + } + + public boolean isFluidInputAllowed(FluidStack aFluid) { + return true; + } + + public boolean isFluidChangingAllowed() { + return true; + } + + public FluidStack getFillableStack() { + return mFluid; + } + + public FluidStack setFillableStack(FluidStack aFluid) { + mFluid = aFluid; + return mFluid; + } + + public FluidStack getDrainableStack() { + return mFluid; + } + + public FluidStack setDrainableStack(FluidStack aFluid) { + mFluid = aFluid; + return mFluid; + } + + public FluidStack getDisplayedFluid() { + return getDrainableStack(); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_BasicTank(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (isFluidChangingAllowed() && getFillableStack() != null && getFillableStack().amount <= 0) + setFillableStack(null); + + if (displaysItemStack() && getStackDisplaySlot() >= 0 && getStackDisplaySlot() < mInventory.length) { + if (getDisplayedFluid() == null) { + if (ItemList.Display_Fluid.isStackEqual(mInventory[getStackDisplaySlot()], true, true)) + mInventory[getStackDisplaySlot()] = null; + } else { + mInventory[getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(getDisplayedFluid(), displaysStackSize()); + } + } + + if (doesEmptyContainers()) { + FluidStack tFluid = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true); + if (tFluid != null && isFluidInputAllowed(tFluid)) { + if (getFillableStack() == null) { + if (isFluidInputAllowed(tFluid) && tFluid.amount <= getCapacity()) { + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { + setFillableStack(tFluid.copy()); + this.onEmptyingContainerWhenEmpty(); + aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); + } + } + } else { + if (tFluid.isFluidEqual(getFillableStack()) && tFluid.amount + getFillableStack().amount <= getCapacity()) { + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), GT_Utility.getContainerItem(mInventory[getInputSlot()], true), 1)) { + getFillableStack().amount += tFluid.amount; + aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); + } + } + } + } + } + + if (doesFillContainers()) { + ItemStack tOutput = GT_Utility.fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true); + if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) { + FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); + aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); + if (tFluid != null) getDrainableStack().amount -= tFluid.amount; + if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) setDrainableStack(null); + } + } + } + } + + @Override + public FluidStack getFluid() { + return getDrainableStack(); + } + + @Override + public int getFluidAmount() { + return getDrainableStack() != null ? getDrainableStack().amount : 0; + } + + @Override + public int fill(FluidStack aFluid, boolean doFill) { + if (aFluid == null || aFluid.getFluid().getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) + return 0; + + if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) { + if (aFluid.amount <= getCapacity()) { + if (doFill) { + setFillableStack(aFluid.copy()); + getBaseMetaTileEntity().markDirty(); + } + return aFluid.amount; + } + if (doFill) { + setFillableStack(aFluid.copy()); + getFillableStack().amount = getCapacity(); + getBaseMetaTileEntity().markDirty(); + } + return getCapacity(); + } + + if (!getFillableStack().isFluidEqual(aFluid)) + return 0; + + int space = getCapacity() - getFillableStack().amount; + if (aFluid.amount <= space) { + if (doFill) { + getFillableStack().amount += aFluid.amount; + getBaseMetaTileEntity().markDirty(); + } + return aFluid.amount; + } + if (doFill) + getFillableStack().amount = getCapacity(); + return space; + } + + @Override + public FluidStack drain(int maxDrain, boolean doDrain) { + if (getDrainableStack() == null || !canTankBeEmptied()) return null; + if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) { + setDrainableStack(null); + getBaseMetaTileEntity().markDirty(); + return null; + } + + int used = maxDrain; + if (getDrainableStack().amount < used) + used = getDrainableStack().amount; + + if (doDrain) { + getDrainableStack().amount -= used; + getBaseMetaTileEntity().markDirty(); + } + + FluidStack drained = getDrainableStack().copy(); + drained.amount = used; + + if (getDrainableStack().amount <= 0 && isFluidChangingAllowed()) { + setDrainableStack(null); + getBaseMetaTileEntity().markDirty(); + } + + return drained; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == getOutputSlot(); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == getInputSlot(); + } + + protected void onEmptyingContainerWhenEmpty(){ + //Do nothing + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java new file mode 100644 index 0000000000..785c4698db --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_TieredMachineBlock.java @@ -0,0 +1,100 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; + +import static gregtech.api.enums.GT_Values.GT; + +import gregtech.api.interfaces.ITexture; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; + +public abstract class GTPP_MTE_TieredMachineBlock extends MetaTileEntityCustomPower { + /** + * Value between [0 - 9] to describe the Tier of this Machine. + */ + public final byte mTier; + + @Deprecated + public final String mDescription; + + /** + * A simple Description. + */ + public final String[] mDescriptionArray; + + /** + * Contains all Textures used by this Block. + */ + public final ITexture[][][] mTextures; + + public GTPP_MTE_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aInvSlotCount); + mTier = (byte) Math.max(0, Math.min(aTier, 9)); + mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; + // must always be the last call! + if (GT.isClientSide()) mTextures = getTextureSet(aTextures); + else mTextures = null; + } + + public GTPP_MTE_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aInvSlotCount); + mTier = (byte) Math.max(0, Math.min(aTier, 9)); + mDescriptionArray = aDescription == null ? new String[0] : aDescription; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; + + // must always be the last call! + if (GT.isClientSide()) mTextures = getTextureSet(aTextures); + else mTextures = null; + } + + public GTPP_MTE_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aInvSlotCount); + mTier = (byte) aTier; + mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; + mTextures = aTextures; + } + + public GTPP_MTE_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aInvSlotCount); + mTier = (byte) aTier; + mDescriptionArray = aDescription == null ? new String[0] : aDescription; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; + mTextures = aTextures; + } + + @Override + public byte getTileEntityBaseType() { + return 12; + } + + @Override + public long getInputTier() { + return mTier; + } + + @Override + public long getOutputTier() { + return mTier; + } + + @Override + public String[] getDescription() { + + AutoMap aTooltip = new AutoMap(); + String []s1 = null; + s1 = new String[aTooltip.size()]; + int u = 0; + for (String s : aTooltip) { + s1[u] = s; + } + return s1; + } + + /** + * Used Client Side to get a Texture Set for this Block. + * Called after setting the Tier and the Description so that those two are accessible. + * + * @param aTextures is the optional Array you can give to the Constructor. + */ + public abstract ITexture[][][] getTextureSet(ITexture[] aTextures); +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java new file mode 100644 index 0000000000..8b7ccc202a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java @@ -0,0 +1,91 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.CustomMetaTileBase; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import net.minecraft.entity.Entity; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; + +public abstract class MetaTileEntityCustomPower extends CustomMetaTileBase { + + public MetaTileEntityCustomPower(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { + super(aID, aBasicName, aRegionalName, aInvSlotCount); + this.setBaseMetaTileEntity(Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); + } + + public MetaTileEntityCustomPower(String aStack, int aInvSlotCount) { + super(aStack, aInvSlotCount); + } + + public long getMinimumStoredEU() { + return 0L; + } + + public void doExplosion(long aExplosionPower) { + + if (MathUtils.randInt(1, 10) > 0) { + //Logger.INFO("Machine tried to explode, let's stop that. xo"); + return; + } + + float tStrength = aExplosionPower < GT_Values.V[0] + ? 1.0F + : (aExplosionPower < GT_Values.V[1] + ? 2.0F + : (aExplosionPower < GT_Values.V[2] + ? 3.0F + : (aExplosionPower < GT_Values.V[3] + ? 4.0F + : (aExplosionPower < GT_Values.V[4] + ? 5.0F + : (aExplosionPower < GT_Values.V[4] * 2L + ? 6.0F + : (aExplosionPower < GT_Values.V[5] + ? 7.0F + : (aExplosionPower < GT_Values.V[6] + ? 8.0F + : (aExplosionPower < GT_Values.V[7] + ? 9.0F + : 10.0F)))))))); + int tX = this.getBaseMetaTileEntity().getXCoord(); + short tY = this.getBaseMetaTileEntity().getYCoord(); + int tZ = this.getBaseMetaTileEntity().getZCoord(); + World tWorld = this.getBaseMetaTileEntity().getWorld(); + GT_Utility.sendSoundToPlayers(tWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(209)), 1.0F, -1.0F, + tX, tY, tZ); + tWorld.setBlock(tX, tY, tZ, Blocks.air); + if (GregTech_API.sMachineExplosions) { + tWorld.createExplosion((Entity) null, (double) tX + 0.5D, (double) tY + 0.5D, (double) tZ + 0.5D, tStrength, + true); + } + + } + + @Override + public void onExplosion() { + + if (MathUtils.randInt(1, 10) > 0) { + //Logger.INFO("Machine tried to explode, let's stop that. xo"); + return; + } + // TODO Auto-generated method stub + super.onExplosion(); + } + + @Override + public boolean isElectric() { + return true; + } + + @Override + public long getEUVar() { + // TODO Auto-generated method stub + return super.getEUVar(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java new file mode 100644 index 0000000000..e6bf4b8486 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java @@ -0,0 +1,283 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.gui.GT_Container_4by4; +import gregtech.api.gui.GT_GUIContainer_4by4; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_TieredMachineBlock; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock { + + public boolean mCharge = false; + public boolean mDecharge = false; + public int mBatteryCount = 0; + public int mChargeableCount = 0; + private long count = 0L; + private long mStored = 0L; + private long mMax = 0L; + + public GT_MetaTileEntity_BasicBreaker(int aID, String aName, String aNameRegional, int aTier, + String aDescription, int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription, new ITexture[0]); + } + + public GT_MetaTileEntity_BasicBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, + int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + public GT_MetaTileEntity_BasicBreaker(String aName, int aTier, String[] aDescription, + ITexture[][][] aTextures, int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + public String[] getDescription() { + String []s1 = super.getDescription(); + s1 = new String[0]; + return s1; + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[2][17][]; + + for (byte i = -1; i < 16; ++i) { + rTextures[0][i + 1] = new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], + this.mInventory.length > 4 + ? BlockIcons.OVERLAYS_ENERGY_IN_MULTI[Math.min(12, mTier)] + : BlockIcons.OVERLAYS_ENERGY_IN[Math.min(12, mTier)]}; + + rTextures[1][i + 1] = new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], + this.mInventory.length > 4 + ? BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] + : BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + } + + return rTextures; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + return this.mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1]; + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BasicBreaker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, + this.mInventory.length); + } + + public boolean isSimpleMachine() { + return false; + } + + public boolean isElectric() { + return true; + } + + public boolean isValidSlot(int aIndex) { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return true; + } + + public boolean isEnetInput() { + return true; + } + + public boolean isEnetOutput() { + return true; + } + + public boolean isInputFacing(byte aSide) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + public boolean isOutputFacing(byte aSide) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + public boolean isTeleporterCompatible() { + return false; + } + + public long getMinimumStoredEU() { + return GT_Values.V[this.mTier] * 16L * 16; + } + + public long maxEUStore() { + return GT_Values.V[this.mTier] * 64L * 16; + } + + public long maxEUInput() { + return GT_Values.V[this.mTier] * 16; + } + + public long maxEUOutput() { + return GT_Values.V[this.mTier]; + } + + public long maxAmperesIn() { + return (long) (1); + } + + public long maxAmperesOut() { + return (long) 16; + } + + public int rechargerSlotStartIndex() { + return 0; + } + + public int dechargerSlotStartIndex() { + return 0; + } + + public int rechargerSlotCount() { + return 0; + } + + public int dechargerSlotCount() { + return 0; + } + + public int getProgresstime() { + return (int) this.getBaseMetaTileEntity().getUniversalEnergyStored(); + } + + public int maxProgresstime() { + return (int) this.getBaseMetaTileEntity().getUniversalEnergyCapacity(); + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public void saveNBTData(NBTTagCompound aNBT) { + } + + public void loadNBTData(NBTTagCompound aNBT) { + } + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } else { + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + /*this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; + this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; + this.mBatteryCount = 0; + this.mChargeableCount = 0; + ItemStack[] arg3 = this.mInventory; + int arg4 = arg3.length; + + for (int arg5 = 0; arg5 < arg4; ++arg5) { + ItemStack tStack = arg3[arg5]; + if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { + if (GT_ModHandler.isChargerItem(tStack)) { + ++this.mBatteryCount; + } + + ++this.mChargeableCount; + } + }*/ + } + + } + + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return true; + } + + public int getInventoryStackLimit() { + return 1; + } + + public long[] getStoredEnergy() { + boolean scaleOverflow = false; + boolean storedOverflow = false; + long tScale = this.getBaseMetaTileEntity().getEUCapacity(); + long tStored = this.getBaseMetaTileEntity().getStoredEU(); + long tStep = 0L; + if (this.mInventory != null) { + ItemStack[] arg8 = this.mInventory; + int arg9 = arg8.length; + + for (int arg10 = 0; arg10 < arg9; ++arg10) { + ItemStack aStack = arg8[arg10]; + if (GT_ModHandler.isElectricItem(aStack)) { + if (aStack.getItem() instanceof GT_MetaBase_Item) { + Long[] stats = ((GT_MetaBase_Item) aStack.getItem()).getElectricStats(aStack); + if (stats != null) { + if (stats[0].longValue() > 4611686018427387903L) { + scaleOverflow = true; + } + + tScale += stats[0].longValue(); + tStep = ((GT_MetaBase_Item) aStack.getItem()).getRealCharge(aStack); + if (tStep > 4611686018427387903L) { + storedOverflow = true; + } + + tStored += tStep; + } + } else if (aStack.getItem() instanceof IElectricItem) { + tStored += (long) ElectricItem.manager.getCharge(aStack); + tScale += (long) ((IElectricItem) aStack.getItem()).getMaxCharge(aStack); + } + } + } + } + + if (scaleOverflow) { + tScale = Long.MAX_VALUE; + } + + if (storedOverflow) { + tStored = Long.MAX_VALUE; + } + + return new long[]{tStored, tScale}; + } + + public String[] getInfoData() { + return new String[]{}; + } + + public boolean isGivingInformation() { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java new file mode 100644 index 0000000000..18665538d0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java @@ -0,0 +1,38 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; + +public class GT_MetaTileEntity_BasicMachine_GTPP_Recipe extends GT_MetaTileEntity_BasicMachine_GT_Recipe { + + public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(int aID, String aName, String aNameRegional, int aTier, + String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, + int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, + boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) { + super(aID, aName, aNameRegional, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity, + aGUIParameterA, aGUIParameterB, aGUIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect, + aOverlays, aRecipe); + } + + public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String aDescription, + GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, + int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, + String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { + super(aName, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity, aAmperage, aGUIParameterA, + aGUIParameterB, aTextures, aGUIName, aNEIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect); + } + + public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String[] aDescription, + GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, + int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, + String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { + super(aName, aTier, aDescription[0], aRecipes, aInputSlots, aOutputSlots, aTankCapacity, aAmperage, aGUIParameterA, + aGUIParameterB, aTextures, aGUIName, aNEIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect); + } + + + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java new file mode 100644 index 0000000000..aebf188fc0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java @@ -0,0 +1,163 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT; + +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons.CustomIcon; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.core.lib.CORE; + +@SuppressWarnings("deprecation") +public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine_GT_Recipe { + + private static final CustomIcon[] sDehydratorOverlays = new CustomIcon[10]; + static { + sDehydratorOverlays[0] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT"); + sDehydratorOverlays[2] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM"); + sDehydratorOverlays[3] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE"); + sDehydratorOverlays[4] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT"); + sDehydratorOverlays[5] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE"); + sDehydratorOverlays[7] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM_ACTIVE"); + sDehydratorOverlays[8] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE_ACTIVE"); + sDehydratorOverlays[9] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT_ACTIVE"); + //3 8 + } + + private GT_Recipe_Map xRecipes; + private int xTankCapacity; + + public GT_MetaTileEntity_Dehydrator(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aTankCapacity) { + super(aID, aName, aNameRegional, aTier, aDescription, GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, aTankCapacity, 2, 5, "Dehydrator.png", "UNBOXINATOR", false, false, 0, "", null); + xRecipes = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes; + xTankCapacity = aTankCapacity; + } + + public GT_MetaTileEntity_Dehydrator(String aName, int aTier, String[] aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aTankCapacity, int aAmperage, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, aDescription, aRecipes, 2, 9, aTankCapacity, aAmperage, 2, 5, aTextures, aGUIName, aNEIName, "", false, false, 0); + + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Dehydrator(this.mName, this.mTier, this.mDescriptionArray, this.xRecipes, this.xTankCapacity, this.mAmperage, this.mTextures, this.mGUIName, this.mNEIName); + } + + @Override + public String[] getDescription() { + String[] S = super.getDescription(); + final String[] desc = new String[S.length + 1]; + System.arraycopy(S, 0, desc, 0, S.length); + desc[S.length] = CORE.GT_Tooltip; + return desc; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[15][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = getSideFacingActive(i); + rTextures[1][i + 1] = getSideFacingInactive(i); + rTextures[2][i + 1] = getFrontFacingActive(i); + rTextures[3][i + 1] = getFrontFacingInactive(i); + rTextures[4][i + 1] = getTopFacingActive(i); + rTextures[5][i + 1] = getTopFacingInactive(i); + rTextures[6][i + 1] = getBottomFacingActive(i); + rTextures[7][i + 1] = getBottomFacingInactive(i); + rTextures[8][i + 1] = getBottomFacingPipeActive(i); + rTextures[9][i + 1] = getBottomFacingPipeInactive(i); + rTextures[10][i + 1] = getTopFacingPipeActive(i); + rTextures[11][i + 1] = getTopFacingPipeInactive(i); + rTextures[12][i + 1] = getSideFacingPipeActive(i); + rTextures[13][i + 1] = getSideFacingPipeInactive(i); + } + return rTextures; + } + + + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return super.getTexture(aBaseMetaTileEntity, aSide, aFacing, aColorIndex, aActive, aRedstone); + //return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + @Override + public ITexture[] getFrontFacingInactive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[0])}; + } + + @Override + public ITexture[] getBottomFacingInactive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2])}; + } + + @Override + public ITexture[] getTopFacingInactive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3])}; + } + + @Override + public ITexture[] getSideFacingInactive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4])}; + } + + @Override + public ITexture[] getFrontFacingActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5])}; + } + + @Override + public ITexture[] getBottomFacingActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7])}; + } + + @Override + public ITexture[] getTopFacingActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8])}; + } + + @Override + public ITexture[] getSideFacingActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9])}; + } + + @Override + public ITexture[] getBottomFacingPipeActive(byte aColor) { + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + } + + @Override + public ITexture[] getBottomFacingPipeInactive(byte aColor) { + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + } + + @Override + public ITexture[] getTopFacingPipeActive(byte aColor) { + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + } + + @Override + public ITexture[] getTopFacingPipeInactive(byte aColor) { + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + } + + @Override + public ITexture[] getSideFacingPipeActive(byte aColor) { + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + } + + @Override + public ITexture[] getSideFacingPipeInactive(byte aColor) { + return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java new file mode 100644 index 0000000000..79238240d2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java @@ -0,0 +1,862 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.Arrays; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_BasicMachine; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * This is the main construct for my Basic Machines such as the Automatic Extractor + * Extend this class to make a simple Machine + */ +public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_DeluxeTank { + /** + * return values for checkRecipe() + */ + protected static final int + DID_NOT_FIND_RECIPE = 0, + FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, + FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; + public static final int OTHER_SLOT_COUNT = 4; + public final ItemStack[] mOutputItems; + public final int mInputSlotCount, mAmperage; + public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false; + public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; + public FluidStack mOutputFluid; + public String mGUIName = "", mNEIName = ""; + /** + * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered + */ + protected GT_Recipe mLastRecipe = null; + private FluidStack mFluidOut; + + /** + * @param aOverlays 0 = SideFacingActive + * 1 = SideFacingInactive + * 2 = FrontFacingActive + * 3 = FrontFacingInactive + * 4 = TopFacingActive + * 5 = TopFacingInactive + * 6 = BottomFacingActive + * 7 = BottomFacingInactive + * ----- Not all Array Elements have to be initialised, you can also just use 8 Parameters for the Default Pipe Texture Overlays ----- + * 8 = BottomFacingPipeActive + * 9 = BottomFacingPipeInactive + * 10 = TopFacingPipeActive + * 11 = TopFacingPipeInactive + * 12 = SideFacingPipeActive + * 13 = SideFacingPipeInactive + */ + public GT_MetaTileEntity_DeluxeMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) { + super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + + public GT_MetaTileEntity_DeluxeMachine(String aName, int aTier, int aAmperage, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { + super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + + public boolean setMainFacing(byte aDirection){ + mMainFacing = aDirection; + if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ + getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aDirection)); + } + onFacingChange(); + onMachineBlockUpdate(); + return true; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[14][17][]; + aTextures = Arrays.copyOf(aTextures, 14); + + for (int i = 0; i < aTextures.length; i++) + if (aTextures[i] != null) for (byte c = -1; c < 16; c++) { + if (rTextures[i][c + 1] == null) + rTextures[i][c + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][c + 1], aTextures[i]}; + } + + for (byte c = -1; c < 16; c++) { + if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); + if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); + if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); + if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); + if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); + if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); + if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); + if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); + if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); + if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); + if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); + if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); + if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); + if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return mTextures[mMainFacing < 2 ? aSide == aFacing ? aActive ? 2 : 3 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1 : aSide == mMainFacing ? aActive ? 2 : 3 : (showPipeFacing() && aSide == aFacing) ? aSide == 0 ? aActive ? 8 : 9 : aSide == 1 ? aActive ? 10 : 11 : aActive ? 12 : 13 : aSide == 0 ? aActive ? 6 : 7 : aSide == 1 ? aActive ? 4 : 5 : aActive ? 0 : 1][aColorIndex + 1]; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public boolean isElectric() { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return aIndex > 0 && super.isValidSlot(aIndex) && aIndex != OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return mMainFacing > 1 || aFacing > 1; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return aSide != mMainFacing; + } + + @Override + public boolean isOutputFacing(byte aSide) { + return false; + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public boolean isLiquidInput(byte aSide) { + return aSide != mMainFacing && (mAllowInputFromOutputSide || aSide != getBaseMetaTileEntity().getFrontFacing()); + } + + @Override + public boolean isLiquidOutput(byte aSide) { + return aSide != mMainFacing; + } + + @Override + public long getMinimumStoredEU() { + return V[mTier] * 16; + } + + @Override + public long maxEUStore() { + return V[mTier] * 64; + } + + @Override + public long maxEUInput() { + return V[mTier]; + } + + @Override + public long maxSteamStore() { + return maxEUStore(); + } + + @Override + public long maxAmperesIn() { + return (mEUt * 2) / V[mTier] + 1; + } + + @Override + public int getInputSlot() { + return OTHER_SLOT_COUNT; + } + + @Override + public int getOutputSlot() { + return OTHER_SLOT_COUNT + mInputSlotCount; + } + + @Override + public int getStackDisplaySlot() { + return 2; + } + + @Override + public int rechargerSlotStartIndex() { + return 1; + } + + @Override + public int dechargerSlotStartIndex() { + return 1; + } + + @Override + public int rechargerSlotCount() { + return mCharge ? 1 : 0; + } + + @Override + public int dechargerSlotCount() { + return mDecharge ? 1 : 0; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public int getProgresstime() { + return mProgresstime; + } + + @Override + public int maxProgresstime() { + return mMaxProgresstime; + } + + @Override + public int increaseProgress(int aProgress) { + mProgresstime += aProgress; + return mMaxProgresstime - mProgresstime; + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return getFillableStack() != null || (getRecipeList() != null && getRecipeList().containsInput(aFluid)); + } + + @Override + public boolean isFluidChangingAllowed() { + return true; + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return true; + } + + @Override + public boolean displaysItemStack() { + return true; + } + + @Override + public boolean displaysStackSize() { + return true; + } + + @Override + public FluidStack getDisplayedFluid() { + return displaysOutputFluid() ? getDrainableStack() : null; + } + + @Override + public FluidStack getDrainableStack() { + return mFluidOut; + } + + @Override + public FluidStack setDrainableStack(FluidStack aFluid) { + mFluidOut = aFluid; + return mFluidOut; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + if(!false) { + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + for(byte i=0;i < 6; i++){ + if(aBaseMetaTileEntity.getAirAtSide(i)){ + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + } + GT_Utility.sendChatToPlayer(aPlayer,"No free Side!"); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_BasicMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : ""); + } + + @Override + public void initDefaultModes(NBTTagCompound aNBT) { + mMainFacing = -1; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mFluidTransfer", mFluidTransfer); + aNBT.setBoolean("mItemTransfer", mItemTransfer); + aNBT.setBoolean("mHasBeenUpdated", mHasBeenUpdated); + aNBT.setBoolean("mAllowInputFromOutputSide", mAllowInputFromOutputSide); + aNBT.setInteger("mEUt", mEUt); + aNBT.setInteger("mMainFacing", mMainFacing); + aNBT.setInteger("mProgresstime", mProgresstime); + aNBT.setInteger("mMaxProgresstime", mMaxProgresstime); + if (mOutputFluid != null) aNBT.setTag("mOutputFluid", mOutputFluid.writeToNBT(new NBTTagCompound())); + if (mFluidOut != null) aNBT.setTag("mFluidOut", mFluidOut.writeToNBT(new NBTTagCompound())); + + for (int i = 0; i < mOutputItems.length; i++) + if (mOutputItems[i] != null) + aNBT.setTag("mOutputItem" + i, mOutputItems[i].writeToNBT(new NBTTagCompound())); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mFluidTransfer = aNBT.getBoolean("mFluidTransfer"); + mItemTransfer = aNBT.getBoolean("mItemTransfer"); + mHasBeenUpdated = aNBT.getBoolean("mHasBeenUpdated"); + mAllowInputFromOutputSide = aNBT.getBoolean("mAllowInputFromOutputSide"); + mEUt = aNBT.getInteger("mEUt"); + mMainFacing = aNBT.getInteger("mMainFacing"); + mProgresstime = aNBT.getInteger("mProgresstime"); + mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); + mOutputFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid")); + mFluidOut = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluidOut")); + + for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + if (aBaseMetaTileEntity.isServerSide()) { + + //Utils.LOG_WARNING("Ticking Tank."); + mCharge = aBaseMetaTileEntity.getStoredEU() / 2 > aBaseMetaTileEntity.getEUCapacity() / 3; + mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3; + + doDisplayThings(); + + boolean tSucceeded = false; + + if (mMaxProgresstime > 0 && (mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) { + aBaseMetaTileEntity.setActive(true); + if (mProgresstime < 0 || drainEnergyForProcess(mEUt)) { + if (++mProgresstime >= mMaxProgresstime) { + for (int i = 0; i < mOutputItems.length; i++) + for (int j = 0; j < mOutputItems.length; j++) + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i])) + break; + if (mOutputFluid != null) + if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy()); + else if (mOutputFluid.isFluidEqual(getDrainableStack())) + getDrainableStack().amount += mOutputFluid.amount; + for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; + mOutputFluid = null; + mEUt = 0; + mProgresstime = 0; + mMaxProgresstime = 0; + mStuttering = false; + tSucceeded = true; + endProcess(); + } + if (mProgresstime > 5) mStuttering = false; + XSTR aXSTR = new XSTR(); + if(false && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); + } else { + if (!mStuttering) { + stutterProcess(); + if (canHaveInsufficientEnergy()) mProgresstime = -100; + mStuttering = true; + } + } + } else { + aBaseMetaTileEntity.setActive(false); + } + + boolean tRemovedOutputFluid = false; + Logger.WARNING("R0"); + + if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) { + IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); + if (tTank != null) { + FluidStack tDrained = drain(1000, false); + if (tDrained != null) { + int tFilledAmount = tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); + if (tFilledAmount > 0) + tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), drain(tFilledAmount, true), true); + } + } + if (getDrainableStack() == null) tRemovedOutputFluid = true; + } + + if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) { + TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); + for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) { + tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true); + } + } + + if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0; + else mOutputBlocked++; + Logger.WARNING("R1"); + if (allowToCheckRecipe()) { + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2: (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe())"); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2-mMaxProgresstime: "+mMaxProgresstime); + Logger.WARNING("R2-isAllowedToWork(): "+aBaseMetaTileEntity.isAllowedToWork()); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2-tRemovedOutputFluid: "+tRemovedOutputFluid); + Logger.WARNING("R2-tSucceeded: "+tSucceeded); + Logger.WARNING("R2-hasInventoryBeenModified(): "+aBaseMetaTileEntity.hasInventoryBeenModified()); + Logger.WARNING("R2-(aTick % 600 == 0): "+(aTick % 600 == 0)); + Logger.WARNING("R2-hasWorkJustBeenEnabled(): "+aBaseMetaTileEntity.hasWorkJustBeenEnabled()); + Logger.WARNING("R2--------------------------------------------------"); + Logger.WARNING("R2-hasEnoughEnergyToCheckRecipe(): "+hasEnoughEnergyToCheckRecipe()); + Logger.WARNING("R2--------------------------------------------------"); + if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) { + Logger.WARNING("R3"); + if (checkRecipe() == 2) { + if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null; + Logger.WARNING("R4"); + for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + for (int i = 0; i < mOutputItems.length; i++) { + mOutputItems[i] = GT_Utility.copy(mOutputItems[i]); + if (mOutputItems[i] != null && mOutputItems[i].stackSize > 64) + mOutputItems[i].stackSize = 64; + mOutputItems[i] = GT_OreDictUnificator.get(true, mOutputItems[i]); + } + if (mFluid != null && mFluid.amount <= 0) mFluid = null; + mMaxProgresstime = Math.max(1, mMaxProgresstime); + if (GT_Utility.isDebugItem(mInventory[dechargerSlotStartIndex()])) { + mEUt = mMaxProgresstime = 1; + } + startProcess(); + } else { + mMaxProgresstime = 0; + for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null; + mOutputFluid = null; + } + } + } else { + if (!mStuttering) { + stutterProcess(); + mStuttering = true; + } + } + } + } + + protected void doDisplayThings() { + if (mMainFacing < 2 && getBaseMetaTileEntity().getFrontFacing() > 1) { + mMainFacing = getBaseMetaTileEntity().getFrontFacing(); + } + if (mMainFacing >= 2 && !mHasBeenUpdated) { + mHasBeenUpdated = true; + //getBaseMetaTileEntity().setFrontFacing(getBaseMetaTileEntity().getBackFacing()); + } + + if (displaysInputFluid()) { + int tDisplayStackSlot = OTHER_SLOT_COUNT + mInputSlotCount + mOutputItems.length; + if (getFillableStack() == null) { + if (ItemList.Display_Fluid.isStackEqual(mInventory[tDisplayStackSlot], true, true)) + mInventory[tDisplayStackSlot] = null; + } else { + mInventory[tDisplayStackSlot] = GT_Utility.getFluidDisplayStack(getFillableStack(), displaysStackSize()); + } + } + } + + protected boolean hasEnoughEnergyToCheckRecipe() { + return getBaseMetaTileEntity().isUniversalEnergyStored(getMinimumStoredEU() / 2); + } + + protected boolean drainEnergyForProcess(long aEUt) { + return getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEUt, false); + } + + protected void calculateOverclockedNess(GT_Recipe aRecipe) { + calculateOverclockedNess(aRecipe.mEUt, aRecipe.mDuration); + } + + protected void calculateOverclockedNess(int aEUt, int aDuration) { + if (aEUt <= 16) { + mEUt = aEUt * (1 << (mTier - 1)) * (1 << (mTier - 1)); + mMaxProgresstime = aDuration / (1 << (mTier - 1)); + } else { + mEUt = aEUt; + mMaxProgresstime = aDuration; + while (mEUt <= V[mTier - 1] * mAmperage) { + mEUt *= 4; + mMaxProgresstime /= 2; + } + } + } + + protected ItemStack getSpecialSlot() { + return mInventory[3]; + } + + protected ItemStack getOutputAt(int aIndex) { + return mInventory[getOutputSlot() + aIndex]; + } + + protected ItemStack[] getAllOutputs() { + ItemStack[] rOutputs = new ItemStack[mOutputItems.length]; + for (int i = 0; i < mOutputItems.length; i++) rOutputs[i] = getOutputAt(i); + return rOutputs; + } + + protected boolean canOutput(GT_Recipe aRecipe) { + return aRecipe != null && (aRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(aRecipe.getFluidOutput(0)) && canOutput(aRecipe.mOutputs)); + } + + protected boolean canOutput(ItemStack... aOutputs) { + if (aOutputs == null) return true; + ItemStack[] tOutputSlots = getAllOutputs(); + for (int i = 0; i < tOutputSlots.length && i < aOutputs.length; i++) + if (tOutputSlots[i] != null && aOutputs[i] != null && (!GT_Utility.areStacksEqual(tOutputSlots[i], aOutputs[i], false) || tOutputSlots[i].stackSize + aOutputs[i].stackSize > tOutputSlots[i].getMaxStackSize())) { + mOutputBlocked++; + return false; + } + return true; + } + + protected boolean canOutput(FluidStack aOutput) { + return getDrainableStack() == null || aOutput == null || (getDrainableStack().isFluidEqual(aOutput) && (getDrainableStack().amount <= 0 || getDrainableStack().amount + aOutput.amount <= getCapacity())); + } + + protected ItemStack getInputAt(int aIndex) { + return mInventory[getInputSlot() + aIndex]; + } + + protected ItemStack[] getAllInputs() { + ItemStack[] rInputs = new ItemStack[mInputSlotCount]; + for (int i = 0; i < mInputSlotCount; i++) rInputs[i] = getInputAt(i); + return rInputs; + } + + protected boolean isOutputEmpty() { + boolean rIsEmpty = true; + for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) rIsEmpty = false; + return rIsEmpty; + } + + protected boolean displaysInputFluid() { + return true; + } + + protected boolean displaysOutputFluid() { + return true; + } + + @Override + public void onValueUpdate(byte aValue) { + mMainFacing = aValue; + } + + @Override + public byte getUpdateData() { + return (byte) mMainFacing; + } + + @Override + public void doSound(byte aIndex, double aX, double aY, double aZ) { + super.doSound(aIndex, aX, aY, aZ); + if (aIndex == 8) GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(210), 100, 1.0F, aX, aY, aZ); + } + + public boolean doesAutoOutput() { + return mItemTransfer; + } + + public boolean doesAutoOutputFluids() { + return mFluidTransfer; + } + + public boolean allowToCheckRecipe() { + return true; + } + + public boolean showPipeFacing() { + return true; + } + + /** + * Called whenever the Machine successfully started a Process, useful for Sound Effects + */ + public void startProcess() { + // + } + + /** + * Called whenever the Machine successfully finished a Process, useful for Sound Effects + */ + public void endProcess() { + // + } + + /** + * Called whenever the Machine aborted a Process, useful for Sound Effects + */ + public void abortProcess() { + // + } + + /** + * Called whenever the Machine aborted a Process but still works on it, useful for Sound Effects + */ + public void stutterProcess() { + if (useStandardStutterSound()) sendSound((byte) 8); + } + + /** + * If this Machine can have the Insufficient Energy Line Problem + */ + public boolean canHaveInsufficientEnergy() { + return true; + } + + public boolean useStandardStutterSound() { + return true; + } + + @Override + public String[] getInfoData() { + return new String[]{ + mNEIName, + "Progress:", (mProgresstime / 20) + " secs", + (mMaxProgresstime / 20) + " secs", + "Stored Energy:", + getBaseMetaTileEntity().getStoredEU() + "EU", + getBaseMetaTileEntity().getEUCapacity() + "EU"}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) { + mAllowInputFromOutputSide = !mAllowInputFromOutputSide; + GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? ("Input from Output Side allowed") : ("Input from Output Side forbidden")); + } + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { + return (aSide != mMainFacing || GregTech_API.getCoverBehavior(aCoverID.toStack()).isGUIClickable(aSide, GT_Utility.stackToInt(aCoverID.toStack()), 0, getBaseMetaTileEntity())); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide != mMainFacing && aIndex >= getOutputSlot() && aIndex < getOutputSlot() + mOutputItems.length; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (aSide == mMainFacing || aIndex < getInputSlot() || aIndex >= getInputSlot() + mInputSlotCount || (!mAllowInputFromOutputSide && aSide == aBaseMetaTileEntity.getFrontFacing())) + return false; + for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++) + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(aStack), mInventory[i])) return i == aIndex; + return true; + } + + /** + * @return the Recipe List which is used for this Machine, this is a useful Default Handler + */ + public GT_Recipe_Map getRecipeList() { + return null; + } + + /** + * Override this to check the Recipes yourself, super calls to this could be useful if you just want to add a special case + *

+ * I thought about Enum too, but Enum doesn't add support for people adding other return Systems. + *

+ * Funny how Eclipse marks the word Enum as not correctly spelled. + * + * @return see constants above + */ + public int checkRecipe() { + return checkRecipe(false); + } + + public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId){ + return //TODO check or get a better solution + DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") || + DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); + } + + + /** + * + * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... + * @return + */ + public int checkRecipe(boolean skipOC){ + GT_Recipe_Map tMap = getRecipeList(); + if (tMap == null) return DID_NOT_FIND_RECIPE; + GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); + if (tRecipe == null) return DID_NOT_FIND_RECIPE; + + if (false && tRecipe.mSpecialValue == -100 && + !isValidForLowGravity(tRecipe,getBaseMetaTileEntity().getWorld().provider.dimensionId)) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; + if (!canOutput(tRecipe)) { + mOutputBlocked++; + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + for (int i = 0; i < mOutputItems.length; i++) + if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) + mOutputItems[i] = tRecipe.getOutput(i); + mOutputFluid = tRecipe.getFluidOutput(0); + calculateOverclockedNess(tRecipe); + return FOUND_AND_SUCCESSFULLY_USED_RECIPE; + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getBottomFacingPipeActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getBottomFacingPipeInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeActive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeInactive(byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java new file mode 100644 index 0000000000..1e367d4f15 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java @@ -0,0 +1,345 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.ItemList; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_DeluxeTank; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_DeluxeTank; +import net.minecraftforge.fluids.FluidStack; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + *

+ * This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually + */ +public abstract class GT_MetaTileEntity_DeluxeTank extends GT_MetaTileEntity_BasicTank { + + public FluidStack mFluid2; + + /** + * @param aInvSlotCount should be 3 + */ + public GT_MetaTileEntity_DeluxeTank(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GT_MetaTileEntity_DeluxeTank(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex != this.getStackDisplaySlot(); + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + if (this.mFluid != null) { + aNBT.setTag("mFluid", this.mFluid.writeToNBT(new NBTTagCompound())); + } + if (this.mFluid2 != null) { + aNBT.setTag("mFluid2", this.mFluid2.writeToNBT(new NBTTagCompound())); + } + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); + this.mFluid2 = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid2")); + } + + @Override + public abstract boolean doesFillContainers(); + + @Override + public abstract boolean doesEmptyContainers(); + + @Override + public abstract boolean canTankBeFilled(); + + @Override + public abstract boolean canTankBeEmptied(); + + @Override + public abstract boolean displaysItemStack(); + + @Override + public abstract boolean displaysStackSize(); + + @Override + public int getInputSlot() { + return 0; + } + + @Override + public int getOutputSlot() { + return 1; + } + + @Override + public int getStackDisplaySlot() { + return 2; + } + + public int getStackDisplaySlot2() { + return 3; + } + + @Override + public boolean isFluidInputAllowed(final FluidStack aFluid) { + return true; + } + + @Override + public boolean isFluidChangingAllowed() { + return true; + } + + @Override + public FluidStack getFillableStack() { + return this.getFillableStackEx(1); + } + + public FluidStack getFillableStackEx(final int stackID) { + if (stackID <= 1){ + return this.mFluid; + } + return this.mFluid2; + } + + @Override + public FluidStack setFillableStack(final FluidStack aFluid) { + this.mFluid = aFluid; + return this.mFluid; + } + + public FluidStack setFillableStack2(final FluidStack aFluid) { + this.mFluid2 = aFluid; + return this.mFluid2; + } + + @Override + public FluidStack getDrainableStack() { + return this.getDrainableStackEx(1); + } + + public FluidStack getDrainableStackEx(final int stackID) { + if (stackID <= 1){ + return this.mFluid; + } + return this.mFluid2; + } + + @Override + public FluidStack setDrainableStack(final FluidStack aFluid) { + this.mFluid = aFluid; + return this.mFluid; + } + + @Override + public FluidStack getDisplayedFluid() { + return this.getDrainableStack(); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_DeluxeTank(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_DeluxeTank(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); + } + + @Override + public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (this.isFluidChangingAllowed() && (this.getFillableStack() != null) && (this.getFillableStack().amount <= 0)) { + this.setFillableStack(null); + } + + if (this.displaysItemStack() && (this.getStackDisplaySlot() >= 0) && (this.getStackDisplaySlot() < this.mInventory.length)) { + if (this.getDisplayedFluid() == null) { + if (ItemList.Display_Fluid.isStackEqual(this.mInventory[this.getStackDisplaySlot()], true, true)) { + this.mInventory[this.getStackDisplaySlot()] = null; + } + } else { + this.mInventory[this.getStackDisplaySlot()] = GT_Utility.getFluidDisplayStack(this.getDisplayedFluid(), this.displaysStackSize()); + } + } + + if (this.displaysItemStack() && (this.getStackDisplaySlot2() >= 0) && (this.getStackDisplaySlot2() < this.mInventory.length)) { + if (this.getDrainableStackEx(2) == null) { + if (ItemList.Display_Fluid.isStackEqual(this.mInventory[this.getStackDisplaySlot2()], true, true)) { + this.mInventory[this.getStackDisplaySlot2()] = null; + } + } else { + this.mInventory[this.getStackDisplaySlot2()] = GT_Utility.getFluidDisplayStack(this.getDrainableStackEx(2), this.displaysStackSize()); + } + } + + if (this.doesEmptyContainers()) { + final FluidStack tFluid = GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true); + if ((tFluid != null) && this.isFluidInputAllowed(tFluid)) { + + if (tFluid.isFluidEqual(this.getDrainableStackEx(1)) || (this.getDrainableStackEx(1) == null)){ + if (this.getFillableStackEx(1) == null) { + if (this.isFluidInputAllowed(tFluid) && (tFluid.amount <= this.getCapacity())) { + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { + this.setFillableStack(tFluid.copy()); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + } + } + } else { + if (tFluid.isFluidEqual(this.getFillableStack()) && ((tFluid.amount + this.getFillableStack().amount) <= this.getCapacity())) { + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { + this.getFillableStack().amount += tFluid.amount; + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + } + } + } + } + else if (tFluid.isFluidEqual(this.getDrainableStackEx(2)) || (this.getDrainableStackEx(2) == null)){ + if (this.getFillableStackEx(2) == null) { + if (this.isFluidInputAllowed(tFluid) && (tFluid.amount <= this.getCapacity())) { + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { + this.setFillableStack2(tFluid.copy()); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + } + } + } else { + if (tFluid.isFluidEqual(this.getFillableStackEx(2)) && ((tFluid.amount + this.getFillableStackEx(2).amount) <= this.getCapacity())) { + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), GT_Utility.getContainerItem(this.mInventory[this.getInputSlot()], true), 1)) { + this.getFillableStackEx(2).amount += tFluid.amount; + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + } + } + } + } + else { + Logger.INFO("Something broke when trying to empty cells between two fluid tank areas."); + } + } + } + + if (this.doesFillContainers()) { + final ItemStack tOutput = GT_Utility.fillFluidContainer(this.getDrainableStack(), this.mInventory[this.getInputSlot()], false, true); + if ((tOutput != null) && aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tOutput, 1)) { + final FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + if (tFluid != null) { + this.getDrainableStack().amount -= tFluid.amount; + } + if ((this.getDrainableStack().amount <= 0) && this.isFluidChangingAllowed()) { + this.setDrainableStack(null); + } + } + } + } + } + + @Override + public FluidStack getFluid() { + return this.getDrainableStack(); + } + + @Override + public int getFluidAmount() { + return this.getDrainableStack() != null ? this.getDrainableStack().amount : 0; + } + + @Override + public int fill(final FluidStack aFluid, final boolean doFill) { + if ((aFluid == null) || (aFluid.getFluid().getID() <= 0) || (aFluid.amount <= 0) || !this.canTankBeFilled() || !this.isFluidInputAllowed(aFluid)) { + return 0; + } + + if ((this.getFillableStack() == null) || (this.getFillableStack().getFluid().getID() <= 0)) { + if (aFluid.amount <= this.getCapacity()) { + if (doFill) { + this.setFillableStack(aFluid.copy()); + this.getBaseMetaTileEntity().markDirty(); + } + return aFluid.amount; + } + if (doFill) { + this.setFillableStack(aFluid.copy()); + this.getFillableStack().amount = this.getCapacity(); + this.getBaseMetaTileEntity().markDirty(); + } + return this.getCapacity(); + } + + if (!this.getFillableStack().isFluidEqual(aFluid)) { + return 0; + } + + final int space = this.getCapacity() - this.getFillableStack().amount; + if (aFluid.amount <= space) { + if (doFill) { + this.getFillableStack().amount += aFluid.amount; + this.getBaseMetaTileEntity().markDirty(); + } + return aFluid.amount; + } + if (doFill) { + this.getFillableStack().amount = this.getCapacity(); + } + return space; + } + + @Override + public FluidStack drain(final int maxDrain, final boolean doDrain) { + if ((this.getDrainableStack() == null) || !this.canTankBeEmptied()) { + return null; + } + if ((this.getDrainableStack().amount <= 0) && this.isFluidChangingAllowed()) { + this.setDrainableStack(null); + this.getBaseMetaTileEntity().markDirty(); + return null; + } + + int used = maxDrain; + if (this.getDrainableStack().amount < used) { + used = this.getDrainableStack().amount; + } + + if (doDrain) { + this.getDrainableStack().amount -= used; + this.getBaseMetaTileEntity().markDirty(); + } + + final FluidStack drained = this.getDrainableStack().copy(); + drained.amount = used; + + if ((this.getDrainableStack().amount <= 0) && this.isFluidChangingAllowed()) { + this.setDrainableStack(null); + this.getBaseMetaTileEntity().markDirty(); + } + + return drained; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return aIndex == this.getOutputSlot(); + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return aIndex == this.getInputSlot(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java new file mode 100644 index 0000000000..e6fd5dc797 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java @@ -0,0 +1,290 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraft.world.World; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import java.lang.reflect.Field; + +import net.minecraft.entity.player.EntityPlayer; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; + +public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_Input { + private static XSTR floatGen; + + public GT_MetaTileEntity_Hatch_AirIntake(final int aID, final String aName, final String aNameRegional, + final int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + /*public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String[] aDescription, + final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + }*/ + + private static String[] S; + private static Field F; + + public synchronized String[] getDescription() { + try { + if (F == null || S == null) { + Field t = ReflectionUtils.getField(this.getClass(), "mDescriptionArray"); + if (t != null) { + F = t; + } + else { + F = ReflectionUtils.getField(this.getClass(), "mDescription"); + } + if (S == null && F != null) { + Object o = F.get(this); + if (o instanceof String[]) { + S = (String[]) o; + } + else if (o instanceof String) { + S = new String[] {(String) o}; + } + } + + } + } + catch (Throwable t) { + + } + if (S != null) { + final String[] desc = new String[S.length + 4]; + System.arraycopy(S, 0, desc, 0, S.length); + desc[S.length] = "DO NOT OBSTRUCT THE INPUT!"; + desc[S.length + 1] = "Draws in Air from the surrounding environment"; + desc[S.length + 2] = "Creates 1000L of Air every 4 ticks"; + desc[S.length + 3] = CORE.GT_Tooltip; + return desc; + } + else { + return new String[] {"DO NOT OBSTRUCT THE INPUT!", "Draws in Air from the surrounding environment", "Creates 1000L of Air every 4 ticks", CORE.GT_Tooltip}; + } + + + } + + public ITexture[] getTexturesActive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; + } + + public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; + } + + public boolean isSimpleMachine() { + return true; + } + + public boolean isFacingValid(final byte aFacing) { + return true; + } + + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + public boolean isValidSlot(final int aIndex) { + return false; + } + + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_AirIntake(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return false; + } + + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return false; + } + + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.getBaseMetaTileEntity().isActive() && addAirToHatch(aTick)) { + if (aTick % 8 == 0) { + if (aBaseMetaTileEntity.isClientSide()) { + this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "cloud"); + } + } + } + } + + public void pollutionParticles(final World aWorld, final String name) { + + final float ran1 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); + float ran2 = 0.0f; + float ran3 = 0.0f; + ran2 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); + ran3 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); + + final IGregTechTileEntity aMuffler = this.getBaseMetaTileEntity(); + final ForgeDirection aDir = ForgeDirection.getOrientation((int) aMuffler.getFrontFacing()); + final float xPos = aDir.offsetX * 0.76f + aMuffler.getXCoord() + 0.25f; + float yPos = aDir.offsetY * 0.76f + aMuffler.getYCoord() + 0.65f; + final float zPos = aDir.offsetZ * 0.76f + aMuffler.getZCoord() + 0.25f; + float ySpd = aDir.offsetY * 0.1f + 0.2f + 0.1f * GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); + float xSpd; + float zSpd; + if (aDir.offsetY == -1) { + //Logger.INFO("Y = -1"); + final float temp = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 2.0f * CORE.PI; + xSpd = (float) Math.sin(temp) * 0.1f; + zSpd = (float) Math.cos(temp) * 0.1f; + ySpd = -ySpd; + yPos = yPos - 0.8f; + } else { + xSpd = aDir.offsetX * (0.1f + 0.2f * GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat()); + zSpd = aDir.offsetZ * (0.1f + 0.2f * GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat()); + + xSpd = -xSpd; + zSpd = -zSpd; + + + } + + aWorld.spawnParticle(name, (double) (xPos + ran1 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), (double) xSpd, + (double) -ySpd, (double) zSpd); + aWorld.spawnParticle(name, (double) (xPos + ran2 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), (double) xSpd, + (double) -ySpd, (double) zSpd); + aWorld.spawnParticle(name, (double) (xPos + ran3 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), (double) xSpd, + (double) -ySpd, (double) zSpd); + } + + static { + GT_MetaTileEntity_Hatch_AirIntake.floatGen = new XSTR(); + } + + public int getTankPressure() { + return 100; + } + + public int getCapacity() { + return 128000; + } + + @Override + public boolean canTankBeEmptied() { + return true; + } + + private static Fluid AIR; + + public boolean isAirInHatch() { + if (this.mFluid != null) { + if (AIR == null) { + AIR = FluidUtils.getAir(1).getFluid(); + } + if (AIR == this.mFluid.getFluid()) { + return true; + } + else return false; + } + return true; + } + + public boolean addAirToHatch(long aTick) { + if (!this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing())) { + return false; + } + boolean a1 = canTankBeFilled(); + if (aTick % 4 != 0 && a1) { + return true; + } + else if (aTick % 4 != 0 && !a1) { + return false; + } + else { + if (!isAirInHatch()) { + return false; + } + if (this.mFluid != null && a1) { + this.mFluid.amount += 1000; + return true; + } + else if (this.mFluid != null && !a1) { + return false; + } + else { + if (this.mFluid == null) { + this.mFluid = FluidUtils.getFluidStack("air", 1000); + return true; + } + else { + //Not sure how any other fluid got in here + return false; + } + } + } + } + + @Override + public boolean canTankBeFilled() { + if (this.mFluid == null || (this.mFluid != null && ((this.mFluid.amount+1000) <= this.getCapacity()))) { + return true; + } + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public int fill(FluidStack aFluid, boolean doFill) { + return 0; + } + + @Override + public boolean canFill(ForgeDirection aSide, Fluid aFluid) { + return false; + } + + @Override + public int fill(ForgeDirection arg0, FluidStack arg1, boolean arg2) { + return 0; + } + + @Override + public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java new file mode 100644 index 0000000000..5347b2e4f7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java @@ -0,0 +1,148 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.gui.*; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.item.general.ItemControlCore; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +public class GT_MetaTileEntity_Hatch_ControlCore extends GT_MetaTileEntity_Hatch { + + public GT_Recipe_Map mRecipeMap = null; + + public BlockPos mControllerLocation; + + public GT_MetaTileEntity_Hatch_ControlCore(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Core determines maximum tier machine will operate at"); + } + + public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription[0], aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip}; + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_ControlCore(mName, mTier, StaticFields59.getDescriptionArray(this), mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, "Control Core Module"); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + fillStacksIntoFirstSlots(); + } + } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < mInventory.length; i++) + for (int j = i + 1; j < mInventory.length; j++) + if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == getBaseMetaTileEntity().getFrontFacing() && (aStack != null && aStack.getItem() instanceof ItemControlCore); + } + + public boolean setOwner(TileEntity aTileEntity) { + if (mControllerLocation != null) { + return false; + } + else { + mControllerLocation = new BlockPos(aTileEntity); + return true; + } + } + + public boolean setOwner(IGregTechTileEntity aTileEntity) { + if (mControllerLocation != null) { + return false; + } + else { + mControllerLocation = new BlockPos(aTileEntity); + return true; + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java new file mode 100644 index 0000000000..39f477b173 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java @@ -0,0 +1,84 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.ITexture; + +public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatch_Dynamo { + public GT_MetaTileEntity_Hatch_DynamoBuffer(final int aID, final String aName, final String aNameRegional, + final int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_Hatch_DynamoBuffer(final String aName, final int aTier, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + /*public GT_MetaTileEntity_Hatch_DynamoBuffer(final String aName, final int aTier, final String[] aDescription, + final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + }*/ + + public ITexture[] getTexturesActive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, TexturesGtBlock.OVERLAYS_ENERGY_OUT_MULTI_BUFFER[this.mTier]}; + } + + public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, TexturesGtBlock.OVERLAYS_ENERGY_OUT_MULTI_BUFFER[this.mTier]}; + } + + @Override + public long getMinimumStoredEU() { + return 0L; + } + + @Override + public long maxEUStore() { + return 512L + GT_Values.V[this.mTier + 1] * 2048L; + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (MetaTileEntity) new GT_MetaTileEntity_Hatch_DynamoBuffer(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public String[] getDescription() { + String[] g; + if (CORE.GTNH || (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechVersionAsInt() >= 50932)) { + g = new String[]{ + "Dynamo with internal storage and additional Amp capacity", + "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input", + CORE.GT_Tooltip}; + + } + else { + g = new String[]{ + "Dynamo with internal storage and additional Amp capacity", + "Stores "+maxEUStore()+"EU", + "Amperage In: 4", + "Amperage Out: 4", + "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input", + "Large Turbines only supply 1A to this, other Multiblocks can inject more amps", + CORE.GT_Tooltip}; + } + return g; + } + + @Override + public long maxAmperesIn() { + return 4; + } + + @Override + public long maxAmperesOut() { + return 4; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java new file mode 100644 index 0000000000..a892346463 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java @@ -0,0 +1,149 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import java.util.ArrayList; + +import gregtech.api.gui.GT_Container_4by4; +import gregtech.api.gui.GT_GUIContainer_4by4; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileEntity_Hatch { + public GT_Recipe_Map mRecipeMap = null; + + public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 16, new String[]{ + "Holds Data Orbs for the Elemental Duplicator", + CORE.GT_Tooltip + }); + } + + public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 16, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 16, aDescription, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Cyber_Interface)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Cyber_Interface)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(mName, mTier, mDescriptionArray, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Orb Repository"); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + fillStacksIntoFirstSlots(); + } + } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] != null && mInventory[i].stackSize <= 0) { + mInventory[i] = null; + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + + } + + public String trans(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return true; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + } + + public ArrayList getInventory(){ + ArrayList aContents = new ArrayList(); + for (int i=0;i mFuelInstanceMap = new HashMap(); + private static final HashMap mFuelValueMap = new HashMap(); + private static final HashMap mFuelTypeMap = new HashMap(); + private static final HashMap mFuelTypeMapReverse = new HashMap(); + + public static boolean registerPelletForHatch(ItemStack aStack, long aFuelValue) { + if (!ItemUtils.checkForInvalidItems(aStack)) { + return false; + } + ItemStack aTemp = aStack.copy(); + aTemp.stackSize = 1; + Dat aDat = new Dat(aTemp); + String aKey = aDat.mUniqueDataTag; + mFuelInstanceMap.put(aKey, aTemp); + mFuelValueMap.put(aKey, aFuelValue); + mFuelTypeMap.put(aKey, aDat.getKey()); + mFuelTypeMapReverse.put(aDat.getKey(), aKey); + Logger.INFO("RTG Hatch: Registered Fuel Pellet: "+ItemUtils.getItemName(aTemp)+", Fuel Value: "+aFuelValue+", Key: "+aKey+", Key2: "+aDat.getKey()); + return true; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + InventoryUtils.sortInventoryItems(this); + } + if (aTimer % 100 == 0 && aBaseMetaTileEntity.isServerSide()) { + if (hasPellet(this)) { + Logger.INFO("Has Pellet"); + tryConsumePellet(this); + } + } + } + + private static void tryConsumePellet(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { + ItemStack aPellet = getPelletToConsume(aTile); + if (aPellet != null) { + Logger.INFO("Found Pellet"); + long aFuel = getFuelValueOfPellet(aPellet); + if (aFuel > 0) { + Logger.INFO("Has Fuel Value: "+aFuel); + if (hasSpaceForEnergy(aTile, aFuel)) { + Logger.INFO("Can buffer"); + aPellet.stackSize = 0; + Logger.INFO("Stack set to 0"); + aPellet = null; + Logger.INFO("null stack"); + addEnergyToInternalStorage(aTile, aFuel); + Logger.INFO("Consumed"); + } + } + } + aTile.updateSlots(); + Logger.INFO("updating slots"); + } + + private static void addEnergyToInternalStorage(GT_MetaTileEntity_Hatch_Energy_RTG aTile, long aFuel) { + aTile.getBaseMetaTileEntity().increaseStoredEnergyUnits(aFuel, true); + } + + public static boolean hasSpaceForEnergy(GT_MetaTileEntity_Hatch_Energy_RTG aTile, long aAmount) { + long aMax = aTile.maxEUStore(); + long aCurrent = aTile.getEUVar(); + if ((aMax - aCurrent) >= aAmount) { + return true; + } + return false; + } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] != null && mInventory[i].stackSize <= 0) { + mInventory[i] = null; + } + } + InventoryUtils.sortInventoryItems(this); + } + + public static boolean hasPellet(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { + for (ItemStack o : aTile.mInventory) { + if (o != null ) { + for (ItemStack i : mFuelInstanceMap.values()) { + if (ItemUtils.areItemsEqual(o, i)) { + return true; + } + } + } + } + return false; + } + + public static String getPelletType(ItemStack o) { + if (o == null) { + return "error"; + } + Dat aDat = new Dat(o); + return mFuelTypeMapReverse.get(aDat.getKey()); + } + + public static long getFuelValueOfPellet(ItemStack aPellet) { + String aType = getPelletType(aPellet); + if (mFuelValueMap.containsKey(aType)) { + return mFuelValueMap.get(aType); + } + return 0; + } + + public static ItemStack getPelletToConsume(GT_MetaTileEntity_Hatch_Energy_RTG aTile) { + for (ItemStack o : aTile.mInventory) { + if (o != null ) { + for (ItemStack i : mFuelInstanceMap.values()) { + if (ItemUtils.areItemsEqual(o, i)) { + return o; + } + } + } + } + return null; + } + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java new file mode 100644 index 0000000000..57f8b722c3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java @@ -0,0 +1,258 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import static gregtech.api.enums.GT_Values.V; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_Hatch_InputBattery +extends +GT_MetaTileEntity_Hatch { + public final GT_Recipe_Map mRecipeMap = null; + + public GT_MetaTileEntity_Hatch_InputBattery(int aID, String aName, + String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, getSlots(aTier), "Chargeable Item Bus for Multiblocks"); + } + + public GT_MetaTileEntity_Hatch_InputBattery(String aName, int aTier, + String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, + aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 4 : 16, + aDescription, aTextures); + } + + @Override + public String[] getDescription() { + int mSlots = 0; + if (this.mTier == 2) { + mSlots = 4; + } + else if (this.mTier == 4) { + mSlots = 16; + } + else { + mSlots = 16; + } + return new String[]{ + this.mDescription, + "Capacity: " + mSlots + " slots", + CORE.GT_Tooltip}; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); + } + + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public long maxEUInput() { + return V[mTier]; + } + + @Override + public long maxEUStore() { + return 512 + V[mTier + 1] * 16; + } + + @Override + public long maxAmperesIn() { + return 4; + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_InputBattery(mName, mTier, + mDescription, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, + EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, + IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + case 2 : + return new CONTAINER_Electric_2by2(aPlayerInventory, + aBaseMetaTileEntity); + case 4 : + return new CONTAINER_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity); + default : + return new CONTAINER_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity); + } + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, + IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + case 2 : + return new GUI_Electric_2by2(aPlayerInventory, + aBaseMetaTileEntity, "Charging Bus"); + case 4 : + return new GUI_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity, "Charging Bus"); + default : + return new GUI_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity, "Charging Bus"); + } + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() + && aBaseMetaTileEntity.hasInventoryBeenModified()) { + fillStacksIntoFirstSlots(); + } + if (aBaseMetaTileEntity.isServerSide()){ + if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) { + MetaTileEntity mMetaTileEntity = (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity(); + if (mMetaTileEntity.rechargerSlotCount() > 0 && aBaseMetaTileEntity.getStoredEU() > 0) { + for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + if (aBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { + for (int u=0;u<10;u++){ + aBaseMetaTileEntity.decreaseStoredEnergyUnits(GT_ModHandler.chargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[this.mTier] * 15, aBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, GT_Values.V[u]), false, false), true); + if (mMetaTileEntity.mInventory[i].stackSize <= 0){ + mMetaTileEntity.mInventory[i] = null; + } + } + } + } + } + else { + //Utils.LOG_INFO("reCharger Slot Count = "+mMetaTileEntity.rechargerSlotCount()); + //Utils.LOG_INFO("getStoredEU = "+aBaseMetaTileEntity.getStoredEU()); + //Utils.LOG_INFO("getEUVar = "+mMetaTileEntity.getEUVar()); + } + } + } + super.onPostTick(aBaseMetaTileEntity, aTimer); + } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) + mInventory[i] = null; + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < mInventory.length; i++) + for (int j = i + 1; j < mInventory.length; j++) + if (mInventory[j] != null + && (mInventory[i] == null || GT_Utility.areStacksEqual( + mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, + i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, + int aIndex, byte aSide, ItemStack aStack) { + return aSide == getBaseMetaTileEntity().getFrontFacing() + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, + int aIndex, byte aSide, ItemStack aStack) { + return aSide == getBaseMetaTileEntity().getFrontFacing() + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + } + + @Override + public int rechargerSlotStartIndex() { + return 0; + } + + @Override + public int rechargerSlotCount() { + switch (mTier) { + case 2 : + return 4; + case 4 : + return 16; + default : + return 16; + } + } + + @Override + public int dechargerSlotStartIndex() { + return 0; + } + + @Override + public int dechargerSlotCount() { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java new file mode 100644 index 0000000000..ba4e394114 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -0,0 +1,329 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Config; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.general.ItemAirFilter; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_Hatch_Muffler_Advanced; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_Hatch_Muffler_Advanced; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch_Muffler { + + protected int SLOT_FILTER = 0; + + @Override + public void onConfigLoad(GT_Config aConfig) { + super.onConfigLoad(aConfig); + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + try { + Integer a1 = (int) StaticFields59.getFieldFromGregtechProxy("mPollutionSmogLimit"); + if (a1 != null && a1 > 0) { + mPollutionSmogLimit = a1; + } + } + catch (Throwable t) { + mPollutionSmogLimit = 500000; + } + } + } + + private int mPollutionSmogLimit = 500000; + + public GT_MetaTileEntity_Hatch_Muffler_Adv(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); + } + + public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); + } + + public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription[0], aTextures); + ReflectionUtils.setField(this, "mInventory", new ItemStack[1]); + } + + public String[] getDescription() { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + String[] mDescArray = StaticFields59.getDescriptionArray(this); + String[] desc = new String[mDescArray.length + 7]; + System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length); + desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; + desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face"; + desc[mDescArray.length + 2] = "Requires Air Filters"; + desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-"+GT_Values.VN[9]; + desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) + "%"; + desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) + "% of CO2/CO/SO2"; + desc[mDescArray.length + 6] = CORE.GT_Tooltip; + return desc; + } + else { + return new String[] {}; + } + } + + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + } + + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + } + + public boolean isValidSlot(int aIndex) { + return aIndex == SLOT_FILTER; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_Muffler_Adv(this.mName, this.mTier, StaticFields59.getDescriptionArray(this), this.mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, + EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity, "Advanced Muffler", "machine_Charger.png"); + } + + private boolean airCheck() { + if ( + this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) && + this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1) && + this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 2) + ) { + return true; + } + return false; + } + + public boolean polluteEnvironment() { + if (airCheck() && damageAirFilter()) { + int aEmission = this.calculatePollutionReduction(10000); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), aEmission); + //Logger.INFO("Outputting "+aEmission+"gbl"); + return true; + } else { + //Logger.INFO("Failed to output pollution"); + return false; + } + } + + + public int calculatePollutionReductionForTooltip(int aPollution) { + return (int) (aPollution * Math.pow(0.64D, (double) (this.mTier - 1))); + } + + public int calculatePollutionReduction(int aPollution) { + double aVal1 = aPollution * Math.pow(0.64D, (double) (this.mTier - 1)); + int aVal2 = (int) aVal1; + if (!hasValidFilter()) { + aVal2 = (int) ((double) aPollution * Math.pow(0.7D, (double) (this.mTier - 1)));; + } + return aVal2; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (aIndex == this.SLOT_FILTER) { + if (isAirFilter(aStack)) { + return true; + } + } + return false; + } + + private ItemStack getInventoryStack() { + if (this.mInventory != null && this.mInventory.length > 0) { + if (this.mInventory.length-1 >= this.SLOT_FILTER) { + return this.mInventory[this.SLOT_FILTER]; + } + } + return null; + } + + private void breakAirFilter() { + if (this.mInventory != null && this.mInventory.length > 0) { + if (this.mInventory.length-1 >= this.SLOT_FILTER) { + Logger.INFO("Breaking Filter"); + this.mInventory[this.SLOT_FILTER] = null; + } + } + } + + public boolean hasValidFilter() { + return isAirFilter(getInventoryStack()); + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + + //Logger.INFO("A1"); + + super.onPostTick(aBaseMetaTileEntity, aTick); + + //Logger.INFO("A2"); + + String aParticleName; + if ((aTick % 2) == 0){ + aParticleName = "cloud"; + } + else { + aParticleName = "smoke"; + } + + //Logger.INFO("A3"); + + if (aBaseMetaTileEntity.isClientSide()) { + //Logger.INFO("B1"); + if (this.getBaseMetaTileEntity().isActive()) { + //Logger.INFO("C1"); + this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); + } + //return; + } + else { + //Logger.INFO("B2"); + if (this.getInventoryStack() == null) { + //Logger.INFO("D1"); + //Logger.INFO("Empty - "+this.mInventory.length); + } + else { + //Logger.INFO("D2"); + } + } + //Logger.INFO("A4"); + + + + } + + public boolean isAirFilter(ItemStack filter){ + if (filter == null) { + return false; + } + if (filter.getItem() instanceof ItemAirFilter){ + + if (this.mTier < 5) { + return true; + } + else { + if (filter.getItemDamage() == 1) { + return true; + } + } + } + return false; + } + + public boolean damageAirFilter(){ + ItemStack filter = getInventoryStack(); + if (filter == null) { + return false; + } + + if (isAirFilter(filter)){ + long currentUse = ItemAirFilter.getFilterDamage(filter); + Logger.INFO("Filter Damage: "+currentUse); + //Remove broken Filter + if ((filter.getItemDamage() == 0 && currentUse >= 50-1) || (filter.getItemDamage() == 1 && currentUse >= 2500-1)){ + breakAirFilter(); + return true; + } + else { + //Do Damage + ItemAirFilter.setFilterDamage(filter, currentUse+1); + Logger.INFO("Filter Damage now: "+currentUse); + return true; + } + } + return false; + } + + public void pollutionParticles(World aWorld, String name) { + float ran1 = CORE.RANDOM.nextFloat(); + float ran2 = 0.0F; + float ran3 = 0.0F; + boolean chk1 = ran1 * 100.0F < (float) this.calculatePollutionReduction(100); + boolean chk2; + boolean chk3; + int aPollutionAmount = PollutionUtils.getPollution(getBaseMetaTileEntity()); + if (aPollutionAmount >= mPollutionSmogLimit) { + ran2 = CORE.RANDOM.nextFloat(); + ran3 = CORE.RANDOM.nextFloat(); + chk2 = ran2 * 100.0F < (float) this.calculatePollutionReduction(100); + chk3 = ran3 * 100.0F < (float) this.calculatePollutionReduction(100); + if (!chk1 && !chk2 && !chk3) { + return; + } + } else { + if (!chk1) { + return; + } + + chk3 = false; + chk2 = false; + } + + IGregTechTileEntity aMuffler = this.getBaseMetaTileEntity(); + ForgeDirection aDir = ForgeDirection.getOrientation(aMuffler.getFrontFacing()); + float xPos = (float) aDir.offsetX * 0.76F + (float) aMuffler.getXCoord() + 0.25F; + float yPos = (float) aDir.offsetY * 0.76F + (float) aMuffler.getYCoord() + 0.25F; + float zPos = (float) aDir.offsetZ * 0.76F + (float) aMuffler.getZCoord() + 0.25F; + float ySpd = (float) aDir.offsetY * 0.1F + 0.2F + 0.1F * CORE.RANDOM.nextFloat(); + float xSpd; + float zSpd; + if (aDir.offsetY == -1) { + float temp = CORE.RANDOM.nextFloat() * 2.0F * CORE.PI; + xSpd = (float) Math.sin((double) temp) * 0.1F; + zSpd = (float) Math.cos((double) temp) * 0.1F; + } else { + xSpd = (float) aDir.offsetX * (0.1F + 0.2F * CORE.RANDOM.nextFloat()); + zSpd = (float) aDir.offsetZ * (0.1F + 0.2F * CORE.RANDOM.nextFloat()); + } + + if (chk1) { + aWorld.spawnParticle(name, (double) (xPos + ran1 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); + } + + if (chk2) { + aWorld.spawnParticle(name, (double) (xPos + ran2 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); + } + + if (chk3) { + aWorld.spawnParticle(name, (double) (xPos + ran3 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); + } + + } + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java new file mode 100644 index 0000000000..d0f1d8e03f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java @@ -0,0 +1,208 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import java.lang.reflect.Field; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_Input { + + public final FluidStack[] mFluidsToUse = new FluidStack[3]; + public final int mFluidCapacity; + + public GT_MetaTileEntity_Hatch_Naquadah(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, 6); + mFluidCapacity = 32000; + initHatch(); + } + + public GT_MetaTileEntity_Hatch_Naquadah(final String aName, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, 6, aDescription, aTextures); + mFluidCapacity = 32000; + initHatch(); + } + + public GT_MetaTileEntity_Hatch_Naquadah(final String aName, final String[] aDescription, + final ITexture[][][] aTextures) { + super(aName, 6, aDescription[0], aTextures); + mFluidCapacity = 32000; + initHatch(); + } + + private void initHatch() { + if (mFluidsToUse[0] == null) { + mFluidsToUse[0] = Materials.Naquadah.getMolten(1); + } + if (mFluidsToUse[1] == null) { + mFluidsToUse[1] = Materials.NaquadahEnriched.getMolten(1); + } + if (mFluidsToUse[2] == null) { + mFluidsToUse[2] = Materials.Naquadria.getMolten(1); + } + } + + public ITexture[] getTexturesActive(final ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; + } + + public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; + } + + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { + for (FluidStack f : mFluidsToUse) { + if (f != null) { + if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f.getFluid()) { + return true; + } + } + } + } + return false; + } + + public boolean isFluidInputAllowed(final FluidStack aFluid) { + for (FluidStack f : mFluidsToUse) { + if (f != null) { + if (aFluid.getFluid() == f.getFluid()) { + return true; + } + } + } + return false; + } + + public int getCapacity() { + return this.mFluidCapacity; + } + + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Naquadah(this.mName, this.mDescription, this.mTextures); + } + + @Override + public String[] getDescription() { + if (aDescCache[0] == null || aDescCache[0].contains(".name") || aDescCache[0].contains("fluid.")) { + aDescCache[0] = formatFluidString(this.mFluidsToUse[0]); + } + if (aDescCache[1] == null || aDescCache[1].contains(".name") || aDescCache[1].contains("fluid.")) { + aDescCache[1] = formatFluidString(this.mFluidsToUse[1]); + } + if (aDescCache[2] == null || aDescCache[2].contains(".name") || aDescCache[2].contains("fluid.")) { + aDescCache[2] = formatFluidString(this.mFluidsToUse[2]); + } + String aNaq = aDescCache[0]; + String aEnrNaq = aDescCache[1]; + String aNaquad = aDescCache[2]; + String[] s2 = new String[]{ + "Fluid Input for Multiblocks", + "Capacity: " + getCapacity()+"L", + "Accepted Fluid: " + aNaq, + "Accepted Fluid: " + aEnrNaq, + "Accepted Fluid: " + aNaquad, + CORE.GT_Tooltip + }; + return s2; + } + + private static String[] aDescCache = new String[3]; + private String formatFluidString(FluidStack f) { + FluidStack mLockedStack = f; + Integer mLockedTemp = 0;; + String mTempMod = ""+EnumChatFormatting.RESET; + mLockedTemp = mLockedStack.getFluid().getTemperature(); + if (mLockedTemp != null) { + if (mLockedTemp <= -3000) { + mTempMod = ""+EnumChatFormatting.DARK_PURPLE; + } + else if (mLockedTemp >= -2999 && mLockedTemp <= -500) { + mTempMod = ""+EnumChatFormatting.DARK_BLUE; + } + else if (mLockedTemp >= -499 && mLockedTemp <= -50) { + mTempMod = ""+EnumChatFormatting.BLUE; + } + else if (mLockedTemp >= 30 && mLockedTemp <= 300) { + mTempMod = ""+EnumChatFormatting.AQUA; + } + else if (mLockedTemp >= 301 && mLockedTemp <= 800) { + mTempMod = ""+EnumChatFormatting.YELLOW; + } + else if (mLockedTemp >= 801 && mLockedTemp <= 1500) { + mTempMod = ""+EnumChatFormatting.GOLD; + } + else if (mLockedTemp >= 1501) { + mTempMod = ""+EnumChatFormatting.RED; + } + } + return mTempMod + mLockedStack.getLocalizedName(); + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + // TODO Auto-generated method stub + return super.getTextureSet(aTextures); + } + + private Field F1, F2; + + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + byte a1 = 0, a2 = 0; + try { + if (F1 == null) { + F1 = ReflectionUtils.getField(getClass(), "actualTexture"); + } + if (F2 == null) { + F2 = ReflectionUtils.getField(getClass(), "mTexturePage"); + } + + if (F1 != null) { + a1 = F1.getByte(this); + } + if (F2 != null) { + a2 = F2.getByte(this); + } + } + catch (IllegalArgumentException | IllegalAccessException n) {} + + int textureIndex = a1 | a2 << 7; + byte texturePointer = (byte) (a1 & 127); + + + + if (aSide == 1 || aSide == 0) { + ITexture g = textureIndex > 0 ? StaticFields59.getCasingTexturePages(a2, texturePointer) : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; + + return new ITexture[] {g, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; + } + + return aSide != aFacing ? + (textureIndex > 0 ? new ITexture[] { StaticFields59.getCasingTexturePages(a2, texturePointer) } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) + : (textureIndex > 0 ? (aActive ? this.getTexturesActive(StaticFields59.getCasingTexturePages(a2, texturePointer)) : this.getTexturesInactive(StaticFields59.getCasingTexturePages(a2, texturePointer))) + : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java new file mode 100644 index 0000000000..ba97cc38eb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java @@ -0,0 +1,236 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import static gregtech.api.enums.GT_Values.V; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_Hatch_OutputBattery +extends +GT_MetaTileEntity_Hatch { + public GT_MetaTileEntity_Hatch_OutputBattery(int aID, String aName, + String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, getSlots(aTier), + "Dischargeable Item Bus for Multiblocks"); + } + + public GT_MetaTileEntity_Hatch_OutputBattery(String aName, int aTier, + String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, + aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, + aDescription, aTextures); + } + + + @Override + public String[] getDescription() { + int mSlots = 0; + if (this.mTier == 2) { + mSlots = 4; + } + else if (this.mTier == 4) { + mSlots = 16; + } + else { + mSlots = 16; + } + return new String[]{ + this.mDescription, + "Capacity: " + mSlots + " slots", + CORE.GT_Tooltip}; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public long maxEUOutput() { + return V[mTier]; + } + + @Override + public long maxEUStore() { + return 512 + V[mTier + 1] * 8; + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_OutputBattery(mName, mTier, + mDescription, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, + EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, + IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + case 2 : + return new CONTAINER_Electric_2by2(aPlayerInventory, + aBaseMetaTileEntity); + case 4 : + return new CONTAINER_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity); + default : + return new CONTAINER_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity); + } + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, + IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + case 2 : + return new GUI_Electric_2by2(aPlayerInventory, + aBaseMetaTileEntity, "Discharging Bus"); + case 4 : + return new GUI_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity, "Discharging Bus"); + default : + return new GUI_Electric_4by4(aPlayerInventory, + aBaseMetaTileEntity, "Discharging Bus"); + } + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, + int aIndex, byte aSide, ItemStack aStack) { + return aSide == aBaseMetaTileEntity.getFrontFacing(); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, + int aIndex, byte aSide, ItemStack aStack) { + return aSide == aBaseMetaTileEntity.getFrontFacing(); + } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) + mInventory[i] = null; + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < mInventory.length; i++) + for (int j = i + 1; j < mInventory.length; j++) + if (mInventory[j] != null + && (mInventory[i] == null || GT_Utility.areStacksEqual( + mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, + i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + + @Override + public int rechargerSlotStartIndex() { + return 0; + } + + @Override + public int rechargerSlotCount() { + return 0; + } + + @Override + public int dechargerSlotStartIndex() { + return 0; + } + + @Override + public int dechargerSlotCount() { + return mTier == 2 ? 4 : 16; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() + && aBaseMetaTileEntity.hasInventoryBeenModified()) { + fillStacksIntoFirstSlots(); + } + + if (aBaseMetaTileEntity.isServerSide()){ + if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) { + MetaTileEntity mMetaTileEntity = (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity(); + if (mMetaTileEntity.dechargerSlotCount() > 0 && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { + for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { + if (mMetaTileEntity.mInventory[i] != null && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { + aBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[mTier] * 15, aBaseMetaTileEntity.getEUCapacity() - aBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true); + if (mMetaTileEntity.mInventory[i].stackSize <= 0) + mMetaTileEntity.mInventory[i] = null; + } + } + } + } + } + super.onPostTick(aBaseMetaTileEntity, aTimer); + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java new file mode 100644 index 0000000000..1251c42ae3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java @@ -0,0 +1,219 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import java.lang.reflect.Field; + +import com.google.common.collect.BiMap; + +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_Hatch_Plasma extends GT_MetaTileEntity_Hatch_Output { + + public final AutoMap mFluidsToUse = new AutoMap(); + public final int mFluidCapacity; + private int mTotalPlasmaSupported = -1; + + public GT_MetaTileEntity_Hatch_Plasma(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, 6); + mFluidCapacity = 256000; + initHatch(); + } + + public GT_MetaTileEntity_Hatch_Plasma(final String aName, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, 6, aDescription, aTextures); + mFluidCapacity = 256000; + initHatch(); + } + + public GT_MetaTileEntity_Hatch_Plasma(final String aName, final String[] aDescription, + final ITexture[][][] aTextures) { + super(aName, 6, aDescription[0], aTextures); + mFluidCapacity = 256000; + initHatch(); + } + + private void initHatch() { + + //Get all Plasmas, but the easiest way to do this is to just ask the Fluid Registry what exists and filter through them lazily. + Field fluidNameCache; + + fluidNameCache = ReflectionUtils.getField(FluidRegistry.class, "fluidNames"); + + AutoMap mValidPlasmaNameCache = new AutoMap(); + if (fluidNameCache != null) { + try { + Object fluidNames = fluidNameCache.get(null); + if (fluidNames != null) { + try { + @SuppressWarnings("unchecked") + BiMap fluidNamesMap = (BiMap) fluidNames; + if (fluidNamesMap != null) { + for (String g : fluidNamesMap.values()) { + if (g.toLowerCase().contains("plasma")) { + mValidPlasmaNameCache.put(g); + } + } + } + } catch (ClassCastException e) { + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + + AutoMap mPlasmaCache = new AutoMap(); + if (!mValidPlasmaNameCache.isEmpty()) { + for (String y : mValidPlasmaNameCache) { + Fluid t = FluidRegistry.getFluid(y); + if (t != null) { + if (t.getTemperature() > 1000) { + mPlasmaCache.put(t); + } + } + } + } + + if (!mPlasmaCache.isEmpty()) { + for (Fluid w : mPlasmaCache) { + mFluidsToUse.put(w); + } + } + + + + + + } + + public ITexture[] getTexturesActive(final ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture }; + } + + public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture }; + } + + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { + for (Fluid f : mFluidsToUse) { + if (f != null) { + if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f) { + return true; + } + } + } + } + return false; + } + + public boolean isFluidInputAllowed(final FluidStack aFluid) { + for (Fluid f : mFluidsToUse) { + if (f != null) { + if (aFluid.getFluid() == f) { + return true; + } + } + } + return false; + } + + public int getCapacity() { + return this.mFluidCapacity; + } + + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Plasma(this.mName, this.mDescription, this.mTextures); + } + + @Override + public String[] getDescription() { + + if (mTotalPlasmaSupported < 0) { + if (mFluidsToUse.isEmpty()) { + mTotalPlasmaSupported = 0; + } + else { + mTotalPlasmaSupported = mFluidsToUse.size(); + } + } + + String aX = EnumChatFormatting.GRAY+""; + String a1 = EnumChatFormatting.GOLD+"Refined containment"+aX; + String a2 = EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.DARK_AQUA+getCapacity()+"L"+aX; + String a3 = EnumChatFormatting.GOLD+"Supports "+EnumChatFormatting.DARK_RED+mTotalPlasmaSupported+EnumChatFormatting.GOLD+" types of plasma"+aX; + + + + String[] s2 = new String[]{ + a1, a2, a3, CORE.GT_Tooltip + }; + return s2; + } + + @Override + public boolean doesFillContainers() { + return true; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + // TODO Auto-generated method stub + return super.getTextureSet(aTextures); + } + + private Field F1, F2; + + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + byte a1 = 0, a2 = 0; + try { + if (F1 == null) { + F1 = ReflectionUtils.getField(getClass(), "actualTexture"); + } + if (F2 == null) { + F2 = ReflectionUtils.getField(getClass(), "mTexturePage"); + } + + if (F1 != null) { + a1 = F1.getByte(this); + } + if (F2 != null) { + a2 = F2.getByte(this); + } + } + catch (IllegalArgumentException | IllegalAccessException n) {} + + int textureIndex = a1 | a2 << 7; + byte texturePointer = (byte) (a1 & 127); + + + + if (aSide == 1 || aSide == 0) { + ITexture g = textureIndex > 0 ? StaticFields59.getCasingTexturePages(a2, texturePointer) : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; + + return new ITexture[] {g}; + } + + return aSide != aFacing ? + (textureIndex > 0 ? new ITexture[] { StaticFields59.getCasingTexturePages(a2, texturePointer) } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) + : (textureIndex > 0 ? (aActive ? this.getTexturesActive(StaticFields59.getCasingTexturePages(a2, texturePointer)) : this.getTexturesInactive(StaticFields59.getCasingTexturePages(a2, texturePointer))) + : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java new file mode 100644 index 0000000000..f1dd131a67 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java @@ -0,0 +1,234 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_2by2; +import gregtech.api.gui.GT_GUIContainer_2by2; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.core.lib.CORE; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Hatch { + public GT_Recipe_Map mRecipeMap = null; + public boolean disableSort; + + public GT_MetaTileEntity_Hatch_Steam_BusInput(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, getSlots(aTier), new String[]{ + "Item Input for Steam Multiblocks", + "Shift + right click with screwdriver to toggle automatic item shuffling", + "Capacity: 4 stacks", + "Does not work with non-steam multiblocks", + CORE.GT_Tooltip}); + } + + public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_Steam_BusInput(mName, mTier, mDescriptionArray, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Steam Input Bus"); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + fillStacksIntoFirstSlots(); + } + } + + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + if (disableSort) { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) + mInventory[i] = null; + } else { + for (int i = 0; i < mInventory.length; i++) + for (int j = i + 1; j < mInventory.length; j++) + if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) + GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("disableSort", disableSort); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + disableSort = aNBT.getBoolean("disableSort"); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aPlayer.isSneaking()) { + disableSort = !disableSort; + GT_Utility.sendChatToPlayer(aPlayer, trans("200", "Automatic Item Shuffling: " + (disableSort ? "Disabled" : "Enabled"))); + } + } + + public String trans(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + } + + + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[14][17][]; + for (byte c = -1; c < 16; c++) { + if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); + if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); + if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); + if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); + if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); + if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); + if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); + if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); + if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); + if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); + if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); + if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); + if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); + if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); + } + return rTextures; + } + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; + } + + public ITexture[] getBottomFacingPipeActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getBottomFacingPipeInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java new file mode 100644 index 0000000000..2fb3fea084 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java @@ -0,0 +1,175 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_2by2; +import gregtech.api.gui.GT_GUIContainer_2by2; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_Hatch { + public GT_MetaTileEntity_Hatch_Steam_BusOutput(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 4, new String[]{"Item Output for Steam Multiblocks", + "Capacity: 4 stacks", + "Does not work with non-steam multiblocks", + CORE.GT_Tooltip}); + } + + public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_Steam_BusOutput(mName, mTier, mDescriptionArray, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Steam Output Bus"); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == aBaseMetaTileEntity.getFrontFacing(); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[14][17][]; + for (byte c = -1; c < 16; c++) { + if (rTextures[0][c + 1] == null) rTextures[0][c + 1] = getSideFacingActive(c); + if (rTextures[1][c + 1] == null) rTextures[1][c + 1] = getSideFacingInactive(c); + if (rTextures[2][c + 1] == null) rTextures[2][c + 1] = getFrontFacingActive(c); + if (rTextures[3][c + 1] == null) rTextures[3][c + 1] = getFrontFacingInactive(c); + if (rTextures[4][c + 1] == null) rTextures[4][c + 1] = getTopFacingActive(c); + if (rTextures[5][c + 1] == null) rTextures[5][c + 1] = getTopFacingInactive(c); + if (rTextures[6][c + 1] == null) rTextures[6][c + 1] = getBottomFacingActive(c); + if (rTextures[7][c + 1] == null) rTextures[7][c + 1] = getBottomFacingInactive(c); + if (rTextures[8][c + 1] == null) rTextures[8][c + 1] = getBottomFacingPipeActive(c); + if (rTextures[9][c + 1] == null) rTextures[9][c + 1] = getBottomFacingPipeInactive(c); + if (rTextures[10][c + 1] == null) rTextures[10][c + 1] = getTopFacingPipeActive(c); + if (rTextures[11][c + 1] == null) rTextures[11][c + 1] = getTopFacingPipeInactive(c); + if (rTextures[12][c + 1] == null) rTextures[12][c + 1] = getSideFacingPipeActive(c); + if (rTextures[13][c + 1] == null) rTextures[13][c + 1] = getSideFacingPipeInactive(c); + } + return rTextures; + } + + + + public ITexture[] getSideFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getSideFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getFrontFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getFrontFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE)}; + } + + public ITexture[] getTopFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; + } + + public ITexture[] getTopFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP)}; + } + + public ITexture[] getBottomFacingActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; + } + + public ITexture[] getBottomFacingInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM)}; + } + + public ITexture[] getBottomFacingPipeActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getBottomFacingPipeInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getTopFacingPipeInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeActive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + + public ITexture[] getSideFacingPipeInactive(byte aColor) { + return new ITexture[]{new GT_RenderedTexture(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java new file mode 100644 index 0000000000..a9cd179214 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -0,0 +1,316 @@ +/* +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_1by1_Turbine; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_1by1_Turbine; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GregtechMetaTileEntity_LargerTurbineBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { + + public boolean mHasController = false; + public boolean mUsingAnimation = true; + private String mControllerLocation; + + public GT_MetaTileEntity_Hatch_Turbine(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 16, "Turbine Rotor holder for XL Turbines"); + } + + public GT_MetaTileEntity_Hatch_Turbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_Turbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription[0], aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, getFrontFacingTurbineTexture()}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, getFrontFacingTurbineTexture()}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return false; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_Turbine(mName, mTier, StaticFields59.getDescriptionArray(this), mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + //aBaseMetaTileEntity.openGUI(aPlayer); + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Using Animations? "+usingAnimations()); + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Has Controller? "+this.mHasController); + if (mHasController) { + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Controller Location: "+BlockPos.generateBlockPos(mControllerLocation).getLocationString()); + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Controller Active? "+this.isControllerActive()); + } + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Is Active? "+this.getBaseMetaTileEntity().isActive()); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + default: + return new CONTAINER_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity); + } + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + default: + return new GUI_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity, "Turbine Rotor Hatch"); + } + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mHasController", mHasController); + aNBT.setBoolean("mUsingAnimation", mUsingAnimation); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mHasController = aNBT.getBoolean("mHasController"); + mUsingAnimation = aNBT.getBoolean("mUsingAnimation"); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + this.mUsingAnimation = Utils.invertBoolean(mUsingAnimation); + if (this.mUsingAnimation) { + PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); + } + PlayerUtils.messagePlayer(aPlayer, "Has Controller: "+this.mHasController); + if (mHasController) { + PlayerUtils.messagePlayer(aPlayer, "Controller Location: "+this.mControllerLocation); + } + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.mHasController) { + if (aTick % 20 == 0) { + if (isControllerActive()) { + this.getBaseMetaTileEntity().setActive(true); + } + else { + this.getBaseMetaTileEntity().setActive(false); + } + } + } + else if (!this.mHasController && this.mControllerLocation != null) { + //Weird Invalid State + if (setController(BlockPos.generateBlockPos(mControllerLocation))) { + //Valid + } + } + else { + //No Controller + } + } + + public boolean isControllerActive() { + GregtechMetaTileEntity_LargerTurbineBase x = getController(); + if (x != null) { + Logger.INFO("Checking Status of Controller."); + return x.isMachineRunning(); + } + Logger.INFO("Status of Controller failed, controller is null."); + return false; + } + + public GregtechMetaTileEntity_LargerTurbineBase getController() { + if (this.mHasController && this.mControllerLocation != null && this.mControllerLocation.length() > 0) { + BlockPos p = BlockPos.generateBlockPos(mControllerLocation); + if (p != null) { + //Logger.INFO(p.getLocationString()); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(p.xPos, p.yPos, + p.zPos); + if (tTileEntity != null && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_LargerTurbineBase) { + return (GregtechMetaTileEntity_LargerTurbineBase) tTileEntity.getMetaTileEntity(); + } + else { + if (tTileEntity == null) { + Logger.INFO("Controller MTE is null, somehow?"); + } + else { + Logger.INFO("Controller is a different MTE to expected"); + } + } + } + } + //Logger.INFO("Failed to Get Controller."); + return null; + } + + public boolean canSetNewController() { + if ((mControllerLocation != null && mControllerLocation.length() > 0) || this.mHasController) { + return false; + } + return true; + } + + public boolean setController(BlockPos aPos) { + clearController(); + if (canSetNewController()) { + mControllerLocation = aPos.getUniqueIdentifier(); + mHasController = true; + Logger.INFO("Successfully injected controller into this Turbine Assembly Hatch."); + } + return mHasController; + } + + public void clearController() { + this.mControllerLocation = null; + this.mHasController = false; + } + + public boolean usingAnimations() { + return mUsingAnimation; + } + + private ITexture getFrontFacingTurbineTexture() { + if (!mHasController) { + return this.getBaseMetaTileEntity().isActive() ? new GT_RenderedTexture(LargeTurbineTextureHandler.frontFaceHPActive_4) : new GT_RenderedTexture(LargeTurbineTextureHandler.frontFace_4 ); + } + else { + if (usingAnimations()) { + if (isControllerActive()) { + return getController().frontFaceActive; + } + } + return getController().frontFace; + } + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + return false; + } + + @Override + public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, + float aZ) { + // TODO Auto-generated method stub + return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + //Do Super + boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + // Do Things + if (this.getBaseMetaTileEntity().isServerSide()) { + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem != null) { + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) { + if (mControllerLocation != null && mControllerLocation.length() > 0) { + if (setController(BlockPos.generateBlockPos(mControllerLocation))) { + if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { + String tChat = "Trying to Reset linked Controller"; + IGregTechTileEntity g = this.getBaseMetaTileEntity(); + GT_Utility.sendChatToPlayer(aPlayer, tChat); + GT_Utility.sendSoundToPlayers(g.getWorld(), GregTech_API.sSoundList.get(101), 1.0F, -1, + g.getXCoord(), g.getYCoord(), g.getZCoord()); + } + } + } + } + } + } + return aSuper; + } + + public void setActive(boolean b) { + this.getBaseMetaTileEntity().setActive(b); + } + + + + + +}*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java new file mode 100644 index 0000000000..0b84f676f4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java @@ -0,0 +1,220 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_1by1_Turbine; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_1by1_Turbine; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_Hatch_InputBus { + + public GT_MetaTileEntity_Hatch_TurbineProvider(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_Hatch_TurbineProvider(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_TurbineProvider(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription[0], aTextures); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_TurbineProvider(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity, "Turbine Housing"); + } + + @Override + public String[] getDescription() { + return new String[]{ + "An automation port for Large Turbines", + "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine", + "You may adjust this with a screwdriver", + "Hold shift to adjust in finer amounts", + "Hold control to adjust direction", + "Left Click with Screwdriver to reset", + "This module assumes the entire turbine is in the same Chunk", + CORE.GT_Tooltip}; + } + + + private GT_MetaTileEntity_LargeTurbine mParent = null; + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + super.onPostTick(aBaseMetaTileEntity, aTimer); + if (aTimer % mRefreshTime == 0 && this.getBaseMetaTileEntity().isServerSide()) { + tryRefillTurbine(); + } + } + + private final void tryFindParentTurbine() { + Logger.INFO("This turbine housing has no parent, searching world."); + IGregTechTileEntity T = this.getBaseMetaTileEntity(); + World W = T.getWorld(); + Chunk C = W.getChunkFromBlockCoords(T.getXCoord(), T.getZCoord()); + for (Object o : C.chunkTileEntityMap.values()) { + if (o instanceof IGregTechTileEntity) { + IGregTechTileEntity G = (IGregTechTileEntity) o; + final IMetaTileEntity aMetaTileEntity = G.getMetaTileEntity(); + if (aMetaTileEntity == null) { + continue; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_LargeTurbine) { + GT_MetaTileEntity_LargeTurbine aTurb = (GT_MetaTileEntity_LargeTurbine) aMetaTileEntity; + for (GT_MetaTileEntity_Hatch_InputBus ee : aTurb.mInputBusses) { + if (ee.equals(this)) { + mParent = aTurb; + Logger.INFO("Found a Parent to attach to this housing."); + return; + } + } + } + } + } + } + + private final void tryRefillTurbine() { + if (mParent == null) { + tryFindParentTurbine(); + } + if (mParent != null && mParent.mInventory[1] == null) { + for (ItemStack aStack : this.mInventory) { + if (isItemStackTurbine(aStack)) { + setGUIItemStack(aStack); + } + } + } + } + + protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) { + boolean result = false; + if (mParent.mInventory[1] == null) { + mParent.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null; + mParent.depleteInput(aNewGuiSlotContents); + mParent.updateSlots(); + this.updateSlots(); + result = true; + } + return result; + } + + public boolean isItemStackTurbine(ItemStack aStack) { + if (aStack.getItem() instanceof GT_MetaGenerated_Tool) { + if (aStack.getItemDamage() >= 170 && aStack.getItemDamage() <= 176) { + return true; + } + } + return false; + } + + public boolean isItemStackScrewdriver(ItemStack aStack) { + if (aStack.getItem() instanceof GT_MetaGenerated_Tool) { + if (aStack.getItemDamage() == 22 || aStack.getItemDamage() == 150) { + return true; + } + } + return false; + } + + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return isItemStackTurbine(aStack); + } + + private int mRefreshTime = 1200; + private boolean mDescending = true; + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mRefreshTime", mRefreshTime); + aNBT.setBoolean("mDescending", mDescending); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mRefreshTime = aNBT.getInteger("mRefreshTime"); + mDescending = aNBT.getBoolean("mDescending"); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aPlayer != null) { + if (KeyboardUtils.isCtrlKeyDown()) { + mDescending = Utils.invertBoolean(mDescending); + PlayerUtils.messagePlayer(aPlayer, "Direction: "+(mDescending ? "DOWN" : "UP")); + } + else { + int aAmount = 0; + if (KeyboardUtils.isShiftKeyDown()) { + aAmount = 10; + } + else { + aAmount = 100; + } + if (mDescending) { + mRefreshTime -= aAmount; + if (mRefreshTime < 0) { + mRefreshTime = 1200; + } + } + else { + mRefreshTime += aAmount; + if (mRefreshTime > 1200) { + mRefreshTime = 0; + } + } + PlayerUtils.messagePlayer(aPlayer, "Set check time to be every "+mRefreshTime+" ticks."); + } + } + } + + @Override + public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + boolean aDidScrewdriver = false; + if (aPlayer != null) { + if (aPlayer.getHeldItem() != null) { + if (isItemStackScrewdriver(aPlayer.getHeldItem())) { + aDidScrewdriver = true; + mRefreshTime = 1200; + PlayerUtils.messagePlayer(aPlayer, "Reset check time to "+mRefreshTime+" ticks."); + } + } + } + if (!aDidScrewdriver) { + super.onLeftclick(aBaseMetaTileEntity, aPlayer); + } + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java new file mode 100644 index 0000000000..b27cb95ca4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java @@ -0,0 +1,230 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.extensions.ArrayExt; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_InputBus { + public GT_MetaTileEntity_SuperBus_Input(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, getSlots(aTier)); + } + + public GT_MetaTileEntity_SuperBus_Input(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, getSlots(aTier), aDescription, aTextures); + } + + /** + * Returns a factor of 16 based on tier. + * + * @param aTier The tier of this bus. + * @return (1 + aTier) * 16 + */ + public static int getSlots(int aTier) { + return (1 + aTier) * 16; + } + + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE_IN)}; + } + + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE_IN)}; + } + + public boolean isSimpleMachine() { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return true; + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public boolean isValidSlot(int aIndex) { + return true; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperBus_Input(this.mName, this.mTier, ArrayExt.of(this.mDescription), this.mTextures); + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + this.fillStacksIntoFirstSlots(); + } + + } + + public void updateSlots() { + for (int i = 0; i < this.mInventory.length; ++i) { + if (this.mInventory[i] != null && this.mInventory[i].stackSize <= 0) { + this.mInventory[i] = null; + } + } + + this.fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < this.mInventory.length; ++i) { + for (int j = i + 1; j < this.mInventory.length; ++j) { + if (this.mInventory[j] != null && (this.mInventory[i] == null + || GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB((IInventory) this.getBaseMetaTileEntity(), (IInventory) this.getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + } + + } + + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing() + && (this.mRecipeMap == null || this.mRecipeMap.containsInput(aStack)); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public String[] getDescription() { + String[] aDesc = new String[] { + "Item Input for Multiblocks", + "This bus has no GUI, but can have items extracted", + ""+getSlots(this.mTier)+" Slots", + CORE.GT_Tooltip + }; + return aDesc; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + } + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } else { + //Logger.INFO("Trying to display Super Input Bus contents."); + displayBusContents(aPlayer); + return true; + } + } + + public void displayBusContents(EntityPlayer aPlayer) { + String STRIP = "Item Array: "; + String aNameString = ItemUtils.getArrayStackNames(getRealInventory()); + aNameString = aNameString.replace(STRIP, ""); + + String[] aNames; + if (aNameString.length() < 1) { + aNames = null; + } + else { + aNames = aNameString.split(","); + } + + if (aNames == null || aNames.length <= 0) { + PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) is Empty. Total Slots: "+getSlots(this.mTier)); + return; + } + + PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) contains: ["+getRealInventory().length+"]"); + + if (aNames.length <= 12) { + for (String s : aNames) { + if (s.startsWith(" ")) { + s = s.substring(1); + } + //Logger.INFO("Trying to display Super Input Bus contents. "+s); + PlayerUtils.messagePlayer(aPlayer, s); + } + } + else { + + String superString = ""; + + for (String s : aNames) { + if (s.startsWith(" ")) { + s = s.substring(1); + } + superString += (s+", "); + } + PlayerUtils.messagePlayer(aPlayer, superString); + } + + + } + + @Override + public int getMaxItemCount() { + // TODO Auto-generated method stub + return super.getMaxItemCount(); + } + + @Override + public int getSizeInventory() { + // TODO Auto-generated method stub + return super.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int aIndex) { + // TODO Auto-generated method stub + return super.getStackInSlot(aIndex); + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + // TODO Auto-generated method stub + return super.canInsertItem(aIndex, aStack, aSide); + } + + @Override + public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { + // TODO Auto-generated method stub + return super.canExtractItem(aIndex, aStack, aSide); + } + + @Override + public ItemStack[] getRealInventory() { + // TODO Auto-generated method stub + return super.getRealInventory(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java new file mode 100644 index 0000000000..37aa57298a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java @@ -0,0 +1,180 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.extensions.ArrayExt; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_OutputBus { + + public GT_MetaTileEntity_SuperBus_Output(int id, String name, String nameRegional, int tier) { + super(id, name, nameRegional, tier, getSlots(tier)); + } + + public GT_MetaTileEntity_SuperBus_Output(String name, int tier, String[] description, ITexture[][][] textures) { + super(name, tier, getSlots(tier), description, textures); + } + + /** + * Returns a factor of 16 based on tier. + * + * @param aTier The tier of this bus. + * @return (1 + aTier) * 16 + */ + public static int getSlots(int aTier) { + return (1 + aTier) * 16; + } + + public boolean isValidSlot(int aIndex) { + return true; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SuperBus_Output(this.mName, this.mTier, ArrayExt.of(this.mDescription), this.mTextures); + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + this.fillStacksIntoFirstSlots(); + } + super.onPostTick(aBaseMetaTileEntity, aTimer); + } + + public void updateSlots() { + for (int i = 0; i < this.mInventory.length; ++i) { + if (this.mInventory[i] != null && this.mInventory[i].stackSize <= 0) { + this.mInventory[i] = null; + } + } + this.fillStacksIntoFirstSlots(); + } + + protected void fillStacksIntoFirstSlots() { + for (int i = 0; i < this.mInventory.length; ++i) { + for (int j = i + 1; j < this.mInventory.length; ++j) { + if (this.mInventory[j] != null && (this.mInventory[i] == null + || GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB((IInventory) this.getBaseMetaTileEntity(), (IInventory) this.getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public String[] getDescription() { + String[] aDesc = new String[] { + "Item Output for Multiblocks", + "This bus has no GUI", + ""+getSlots(this.mTier)+" Slots", + CORE.GT_Tooltip + }; + return aDesc; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + } + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } else { + displayBusContents(aPlayer); + return true; + } + } + + public void displayBusContents(EntityPlayer aPlayer) { + String STRIP = "Item Array: "; + String aNameString = ItemUtils.getArrayStackNames(getRealInventory()); + aNameString = aNameString.replace(STRIP, ""); + + String[] aNames; + if (aNameString.length() < 1) { + aNames = null; + } + else { + aNames = aNameString.split(","); + } + + if (aNames == null || aNames.length <= 0) { + PlayerUtils.messagePlayer(aPlayer, "This Super Bus (O) is Empty. Total Slots: "+getSlots(this.mTier)); + return; + } + + PlayerUtils.messagePlayer(aPlayer, "This Super Bus (O) contains:"); + for (String s : aNames) { + if (s.startsWith(" ")) { + s = s.substring(1); + } + //Logger.INFO("Trying to display Super Output Bus contents. "+s); + PlayerUtils.messagePlayer(aPlayer, s); + } + } + + @Override + public int getMaxItemCount() { + // TODO Auto-generated method stub + return super.getMaxItemCount(); + } + + @Override + public int getSizeInventory() { + // TODO Auto-generated method stub + return super.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(int aIndex) { + // TODO Auto-generated method stub + return super.getStackInSlot(aIndex); + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + // TODO Auto-generated method stub + return super.canInsertItem(aIndex, aStack, aSide); + } + + @Override + public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { + // TODO Auto-generated method stub + return super.canExtractItem(aIndex, aStack, aSide); + } + + @Override + public ItemStack[] getRealInventory() { + // TODO Auto-generated method stub + return super.getRealInventory(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java new file mode 100644 index 0000000000..f6e778f989 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java @@ -0,0 +1,119 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; +import gregtech.api.render.TextureFactory; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.util.EnumChatFormatting; + +public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid { + + + public static final boolean mGt6Pipe; + + static { + mGt6Pipe = StaticFields59.mGT6StylePipes; + } + + public final GT_Materials mMaterial; + private boolean mCheckConnections; + + + public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, GT_Materials aMaterial, + int aCapacity, int aHeatResistance, boolean aGasProof) { + this(aID, aName, aNameRegional, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); + } + + public GregtechMetaPipeEntityFluid(final String aName, final float aThickNess, final GT_Materials aMaterial, final int aCapacity, final int aHeatResistance, final boolean aGasProof) { + this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); + } + + public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, GT_Materials aMaterial, + int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { + super(aID, aName, aNameRegional, aThickNess, null, aCapacity, aHeatResistance, aGasProof); + this.mLastReceivedFrom = 0; + this.oLastReceivedFrom = 0; + this.mCheckConnections = !mGt6Pipe; + this.mMaterial = aMaterial; + } + + + + public GregtechMetaPipeEntityFluid(String aName, float aThickNess, GT_Materials aMaterial, int aCapacity, + int aHeatResistance, boolean aGasProof, int aFluidTypes) { + super(aName, aThickNess, null, aCapacity, aHeatResistance, aGasProof); + this.mLastReceivedFrom = 0; + this.oLastReceivedFrom = 0; + this.mCheckConnections = !mGt6Pipe; + this.mMaterial = aMaterial; + } + + + @Override + public byte getTileEntityBaseType() { + return this.mMaterial == null ? 4 : (byte) ((this.mMaterial.contains(SubTag.WOOD) ? 12 : 4) + Math.max(0, Math.min(3, this.mMaterial.mToolQuality))); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaPipeEntityFluid(this.mName, this.mThickNess, this.mMaterial, this.mCapacity, this.mHeatResistance, this.mGasProof); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + float tThickNess = getThickNess(); + if (mDisableInput == 0) + return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + byte tMask = 0; + byte[][] sRestrictionArray = { + {2, 3, 5, 4}, + {2, 3, 4, 5}, + {1, 0, 4, 5}, + {1, 0, 4, 5}, + {1, 0, 2, 3}, + {1, 0, 2, 3} + }; + if (aSide >= 0 && aSide < 6) { + for (byte i = 0; i < 4; i++) if (isInputDisabledAtSide(sRestrictionArray[aSide][i])) tMask |= 1 << i; + //Full block size renderer flips side 5 and 2 textures, flip restrictor textures to compensate + if (aSide == 5 || aSide == 2) + if (tMask > 3 && tMask < 12) + tMask = (byte) (tMask ^ 12); + } + return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : TextureFactory.of(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)}; + } + + protected static ITexture getBaseTexture(float aThickNess, int aPipeAmount, GT_Materials aMaterial, byte aColorIndex) { + if (aPipeAmount >= 9) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aPipeAmount >= 4) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.124F) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.374F) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.499F) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.749F) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + if (aThickNess < 0.874F) + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + return TextureFactory.of(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + } + + @Override + public String[] getDescription() { + return new String[]{ + EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY, + EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY, + EnumChatFormatting.DARK_GREEN + "Gas Proof: " + (this.mGasProof) + EnumChatFormatting.GRAY, + //CORE.GT_Tooltip + }; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java new file mode 100644 index 0000000000..98722a2b96 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java @@ -0,0 +1,165 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import static gregtech.api.enums.GT_Values.VN; +import static gtPlusPlus.core.lib.CORE.GTNH; + +import net.minecraft.util.EnumChatFormatting; + +import gregtech.api.enums.*; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; + +public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implements IMetaTileEntityCable { + private static Textures.BlockIcons INSULATION_MEDIUM_PLUS; + static{ + if(GTNH) { + try { + INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GT_Utility.getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS").get(null); + } catch (IllegalAccessException | NullPointerException e) { + throw new Error(e); + } + } + } + + private short[] vRGB = null; + + public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { + super(aID, aName, aNameRegional, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); + this.vRGB = aRGB==null || aRGB.length!=4?Materials.Iron.mRGBa:aRGB; + } + + public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { + super(aName, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); + this.vRGB = aRGB==null || aRGB.length!=4?Materials.Iron.mRGBa:aRGB; + } + + public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { + this(aID, aName, aNameRegional, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock,aRGB); + } + + public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { + this(aName, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock,aRGB); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaPipeEntity_Cable(this.mName, this.mThickNess, this.mMaterial, this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock, this.vRGB); + } + + @Override + public String[] getDescription() { + return new String[]{ + "Max Voltage: %%%" + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY, + "Max Amperage: %%%" + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY, + "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + "%%% EU-Volt", + //CORE.GT_Tooltip + }; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + return GTNH? + getTextureGTNH(aBaseMetaTileEntity,aSide,aConnections,aColorIndex,aConnected,aRedstone): + getTexturePure(aBaseMetaTileEntity,aSide,aConnections,aColorIndex,aConnected,aRedstone); + } + + private ITexture[] getTextureGTNH(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, + byte aColorIndex, boolean aConnected, boolean aRedstone) { + + Materials wireMaterial=mMaterial; + if (wireMaterial == null){ + wireMaterial = Materials.Iron; + } + + if (!mInsulated) + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, vRGB) )}; + if (aConnected) { + float tThickNess = getThickNess(); + if (tThickNess < 0.124F) + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.374F)//0.375 x1 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.499F)//0.500 x2 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.624F)//0.625 x4 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.749F)//0.750 x8 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.874F)//0.825 x12 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + } + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + } + + private ITexture[] getTexturePure(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, + byte aColorIndex, boolean aConnected, boolean aRedstone) { + + //if (this.vRGB == null || this.vRGB.length < 3 || this.vRGB.length > 4){ + // this.vRGB = new short[]{200, 0, 200, 0}; + //} + //if (this.vRGB.length != 4){ + // short[] tempRGB = this.vRGB; + // this.vRGB = new short[]{tempRGB[0], tempRGB[1], tempRGB[2], 0}; + //} + // + //Materials wireMaterial = this.mMaterial; + // + //if (wireMaterial == null){ + // wireMaterial = Materials.Iron; + //} + + //With the code in constructors it should work + Materials wireMaterial=mMaterial; + if (wireMaterial == null){ + wireMaterial = Materials.Iron; + } + + if (!(this.mInsulated)) + return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], + Dyes.getModulation(aColorIndex, this.vRGB)) }; + if (aConnected) { + float tThickNess = getThickNess(); + if (tThickNess < 0.124F) + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + if (tThickNess < 0.374F) + return new ITexture[] { + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + if (tThickNess < 0.499F) + return new ITexture[] { + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + if (tThickNess < 0.624F) + return new ITexture[] { + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + if (tThickNess < 0.749F) + return new ITexture[] { + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + if (tThickNess < 0.874F) + return new ITexture[] { + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java new file mode 100644 index 0000000000..d05a254bf7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaTreeFarmerBase; + +public class GregtechMetaTreeFarmerStructural +extends GregtechMetaTreeFarmerBase { + + @Override + public String[] getDescription() { + return new String[] {this.mDescription}; + } + + public GregtechMetaTreeFarmerStructural(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, 0, "Structural Blocks for the Tree Farmer."); + } + + public GregtechMetaTreeFarmerStructural(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + } + + public GregtechMetaTreeFarmerStructural(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTreeFarmerStructural(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + } + + @Override + public ITexture getOverlayIcon() { + return new GT_RenderedTexture(Textures.BlockIcons.VOID); + } + + @Override + public boolean isValidSlot(final int aIndex) { + return false; + } + + @Override + public void saveNBTData(final NBTTagCompound paramNBTTagCompound) { + } + + @Override + public void loadNBTData(final NBTTagCompound paramNBTTagCompound) { + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java new file mode 100644 index 0000000000..422837fa46 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/CustomMetaTileBase.java @@ -0,0 +1,60 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; + +import java.util.Locale; + +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import net.minecraft.item.ItemStack; + +public abstract class CustomMetaTileBase extends MetaTileEntity { + + public CustomMetaTileBase(int aID, String aBasicName, String aRegionalName, int aInvSlotCount) { + super(aID, aBasicName, aRegionalName, aInvSlotCount); + GT_LanguageManager.addStringLocalization("gtpp.blockmachines." + aBasicName.replaceAll(" ", "_").toLowerCase(Locale.ENGLISH) + ".name", aRegionalName); + this.setBaseMetaTileEntity(Meta_GT_Proxy.constructBaseMetaTileEntity()); + this.getBaseMetaTileEntity().setMetaTileID((short) aID); + } + + public CustomMetaTileBase(String aName, int aInvSlotCount) { + super(aName, aInvSlotCount); + } + + public ItemStack getStackForm(long aAmount) { + return new ItemStack(Meta_GT_Proxy.sBlockMachines, (int) aAmount, this.getBaseMetaTileEntity().getMetaTileID()); + } + + public String getLocalName() { + return GT_LanguageManager.getTranslation("gtpp.blockmachines." + this.mName + ".name"); + } + + /** + * This determines the BaseMetaTileEntity belonging to this MetaTileEntity by using the Meta ID of the Block itself. + *

+ * 0 = BaseMetaTileEntity, Wrench lvl 0 to dismantlee + * 1 = BaseMetaTileEntity, Wrench lvl 1 to dismantle + * 2 = BaseMetaTileEntity, Wrench lvl 2 to dismantle + * 3 = BaseMetaTileEntity, Wrench lvl 3 to dismantle + * 4 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle + * 5 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle + * 6 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle + * 7 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle + * 8 = BaseMetaPipeEntity, Cutter lvl 0 to dismantle + * 9 = BaseMetaPipeEntity, Cutter lvl 1 to dismantle + * 10 = BaseMetaPipeEntity, Cutter lvl 2 to dismantle + * 11 = BaseMetaPipeEntity, Cutter lvl 3 to dismantle + * + * == Reserved for Alk now + * + * 12 = BaseMetaPipeEntity, Wrench lvl 0 to dismantle + * 13 = BaseMetaPipeEntity, Wrench lvl 1 to dismantle + * 14 = BaseMetaPipeEntity, Wrench lvl 2 to dismantle + * 15 = BaseMetaPipeEntity, Wrench lvl 3 to dismantle + */ + @Override + public byte getTileEntityBaseType() { + return 12; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java new file mode 100644 index 0000000000..124f8695f5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java @@ -0,0 +1,131 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; + +public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_Hatch_Input { + + public final Fluid mLockedFluid; + public final int mFluidCapacity; + + public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, 6); + this.mRecipeMap = null; + this.mLockedFluid = aFluid; + this.mFluidCapacity = aAmount; + } + + public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, 6, aDescription, aTextures); + this.mRecipeMap = null; + this.mLockedFluid = aFluid; + this.mFluidCapacity = aAmount; + } + + public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, final String[] aDescription, final ITexture[][][] aTextures) { + super(aName, 6, aDescription[0], aTextures); + this.mRecipeMap = null; + this.mLockedFluid = aFluid; + this.mFluidCapacity = aAmount; + } + + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { + if (this.mRecipeMap == null) + return true; + FluidStack fs = GT_Utility.getFluidForFilledItem(aStack, true); + if (fs != null && fs.getFluid() == this.mLockedFluid) + return true; + } + return false; + } + + public ITexture[] getTexturesActive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_PUMP)}; + } + + public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_PUMP)}; + } + + public int getCapacity() { + return this.mFluidCapacity; + } + + protected FluidStack mLockedStack = null; + protected Integer mLockedTemp = null; + protected String mTempMod = null; + + @Override + public String[] getDescription() { + if (mLockedStack == null) { + mLockedStack = FluidUtils.getFluidStack(mLockedFluid, 1); + } + int aFluidTemp = 0; + boolean isSteam = false; + if (mLockedFluid != null) { + aFluidTemp = mLockedFluid.getTemperature(); + mTempMod = mLockedFluid.getName(); + } + if (mTempMod.toLowerCase().equals("steam")) { + isSteam = true; + } + + + EnumChatFormatting aColour = EnumChatFormatting.BLUE; + if (aFluidTemp <= -3000) { + aColour = EnumChatFormatting.DARK_PURPLE; + } + else if (aFluidTemp >= -2999 && aFluidTemp <= -500) { + aColour = EnumChatFormatting.DARK_BLUE; + } + else if (aFluidTemp >= -499 && aFluidTemp <= -50) { + aColour = EnumChatFormatting.BLUE; + } + else if (aFluidTemp >= 30 && aFluidTemp <= 300) { + aColour = EnumChatFormatting.AQUA; + } + else if (aFluidTemp >= 301 && aFluidTemp <= 800) { + aColour = EnumChatFormatting.YELLOW; + } + else if (aFluidTemp >= 801 && aFluidTemp <= 1500) { + aColour = EnumChatFormatting.GOLD; + } + else if (aFluidTemp >= 1501) { + aColour = EnumChatFormatting.RED; + } + String aFluidName = "Accepted Fluid: " + aColour + (mLockedStack != null ? mLockedStack.getLocalizedName() : "Empty") + EnumChatFormatting.RESET; + String[] s2 = new String[]{ + "Fluid Input for "+(isSteam ? "Steam " : "")+"Multiblocks", + "Capacity: " + getCapacity()+"L", + aFluidName, + CORE.GT_Tooltip + }; + return s2; + } + + public boolean isFluidInputAllowed(final FluidStack aFluid) { + return aFluid.getFluid() == this.mLockedFluid; + } + + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (MetaTileEntity) new GT_MetaTileEntity_Hatch_CustomFluidBase(this.mLockedFluid, this.mFluidCapacity, this.mName, this.mDescription, this.mTextures); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java new file mode 100644 index 0000000000..4dd5bf25d6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java @@ -0,0 +1,468 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; + +import static gregtech.api.enums.GT_Values.VN; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; + +import cofh.api.energy.IEnergyReceiver; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.TextureSet; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; +import gregtech.api.interfaces.tileentity.IColoredTileEntity; +import gregtech.api.interfaces.tileentity.IEnergyConnected; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.MetaPipeEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Proxy; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import ic2.api.energy.tile.IEnergySink; +import net.minecraftforge.common.util.ForgeDirection; + +public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements IMetaTileEntityCable { + public final float mThickNess; + public final GT_Materials mMaterial; + public final long mCableLossPerMeter, mAmperage, mVoltage; + public final boolean mInsulated, mCanShock; + public long mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredVoltageLast20 = 0; + public long mRestRF; + public short mOverheat; + public final int mWireHeatingTicks; + + public GregtechMetaPipeEntityBase_Cable(final int aID, final String aName, final String aNameRegional, + final float aThickNess, final GT_Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, + final long aVoltage, final boolean aInsulated, final boolean aCanShock) { + super(aID, aName, aNameRegional, 0); + this.mThickNess = aThickNess; + this.mMaterial = aMaterial; + this.mAmperage = aAmperage; + this.mVoltage = aVoltage; + this.mInsulated = aInsulated; + this.mCanShock = aCanShock; + this.mCableLossPerMeter = aCableLossPerMeter; + this.mWireHeatingTicks = this.getGT5Var(); + } + + public GregtechMetaPipeEntityBase_Cable(final String aName, final float aThickNess, final GT_Materials aMaterial, + final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, + final boolean aCanShock) { + super(aName, 0); + this.mThickNess = aThickNess; + this.mMaterial = aMaterial; + this.mAmperage = aAmperage; + this.mVoltage = aVoltage; + this.mInsulated = aInsulated; + this.mCanShock = aCanShock; + this.mCableLossPerMeter = aCableLossPerMeter; + this.mWireHeatingTicks = this.getGT5Var(); + } + + private int getGT5Var() { + final Class clazz = GT_Mod.gregtechproxy.getClass(); + final String lookingForValue = "mWireHeatingTicks"; + int temp = 4; + Field field; + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + try { + field = clazz.getClass().getField(lookingForValue); + final Class clazzType = field.getType(); + if (clazzType.toString().equals("int")) { + temp = (field.getInt(clazz)); + } else { + temp = 4; + } + } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { + // Utils.LOG_INFO("FATAL ERROR - REFLECTION FAILED FOR GT CABLES + // - PLEASE REPORT THIS."); + Logger.WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + Logger.ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + temp = 4; + } + } + return temp; + } + + @Override + public byte getTileEntityBaseType() { + return (byte) (this.mInsulated ? 9 : 8); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaPipeEntityBase_Cable(this.mName, this.mThickNess, this.mMaterial, + this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, + final byte aConnections, final byte aColorIndex, final boolean aConnected, final boolean aRedstone) { + if (!this.mInsulated) { + return new ITexture[] { new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + this.mMaterial.mRGBa) }; + } + if (aConnected) { + final float tThickNess = this.getThickNess(); + if (tThickNess < 0.37F) { + return new ITexture[] { + new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + this.mMaterial.mRGBa), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + if (tThickNess < 0.49F) { + return new ITexture[] { + new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + this.mMaterial.mRGBa), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + if (tThickNess < 0.74F) { + return new ITexture[] { + new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + this.mMaterial.mRGBa), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + if (tThickNess < 0.99F) { + return new ITexture[] { + new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + this.mMaterial.mRGBa), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + return new ITexture[] { + new GT_RenderedTexture(this.mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + this.mMaterial.mRGBa), + new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + } + + @Override + public void onEntityCollidedWithBlock(final World aWorld, final int aX, final int aY, final int aZ, + final Entity aEntity) { + if (this.mCanShock && ((((BaseMetaPipeEntity) this.getBaseMetaTileEntity()).mConnections & -128) == 0) + && (aEntity instanceof EntityLivingBase)) { + GT_Utility.applyElectricityDamage((EntityLivingBase) aEntity, this.mTransferredVoltageLast20, + this.mTransferredAmperageLast20); + } + } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(final World aWorld, final int aX, final int aY, final int aZ) { + if (!this.mCanShock) { + return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + return AxisAlignedBB.getBoundingBox(aX + 0.125D, aY + 0.125D, aZ + 0.125D, aX + 0.875D, aY + 0.875D, + aZ + 0.875D); + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return true; + } + + @Override + public final boolean renderInside(final byte aSide) { + return false; + } + + @Override + public int getProgresstime() { + return (int) this.mTransferredAmperage * 64; + } + + @Override + public int maxProgresstime() { + return (int) this.mAmperage * 64; + } + + @Override + public long injectEnergyUnits(final byte aSide, final long aVoltage, final long aAmperage) { + if (!this.getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide).letsEnergyIn(aSide, + this.getBaseMetaTileEntity().getCoverIDAtSide(aSide), + this.getBaseMetaTileEntity().getCoverDataAtSide(aSide), this.getBaseMetaTileEntity())) { + return 0; + } + return this.transferElectricity(aSide, aVoltage, aAmperage, + new ArrayList<>(Arrays.asList((TileEntity) this.getBaseMetaTileEntity()))); + } + + + /** + * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d + */ + public long transferElectricity(byte arg0, long arg1, long arg2, HashSet arg3) { + ArrayList aTiles = new ArrayList(); + for (TileEntity y : arg3) { + aTiles.add(y); + } + return transferElectricity(arg0, arg1, arg2, aTiles); + } + + @Override + public long transferElectricity(final byte aSide, long aVoltage, final long aAmperage, + final ArrayList aAlreadyPassedTileEntityList) { + long rUsedAmperes = 0; + aVoltage -= this.mCableLossPerMeter; + if (aVoltage > 0) { + for (byte i = 0; (i < 6) && (aAmperage > rUsedAmperes); i++) { + if ((i != aSide) && ((this.mConnections & (1 << i)) != 0) + && this.getBaseMetaTileEntity().getCoverBehaviorAtSide(i).letsEnergyOut(i, + this.getBaseMetaTileEntity().getCoverIDAtSide(i), + this.getBaseMetaTileEntity().getCoverDataAtSide(i), this.getBaseMetaTileEntity())) { + final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(i); + if (!aAlreadyPassedTileEntityList.contains(tTileEntity)) { + aAlreadyPassedTileEntityList.add(tTileEntity); + if (tTileEntity instanceof IEnergyConnected) { + if (this.getBaseMetaTileEntity().getColorization() >= 0) { + final byte tColor = ((IEnergyConnected) tTileEntity).getColorization(); + if ((tColor >= 0) && (tColor != this.getBaseMetaTileEntity().getColorization())) { + continue; + } + } + if ((tTileEntity instanceof IGregTechTileEntity) + && (((IGregTechTileEntity) tTileEntity) + .getMetaTileEntity() instanceof IMetaTileEntityCable) + && ((IGregTechTileEntity) tTileEntity) + .getCoverBehaviorAtSide(GT_Utility.getOppositeSide(i)) + .letsEnergyIn(GT_Utility.getOppositeSide(i), + ((IGregTechTileEntity) tTileEntity) + .getCoverIDAtSide(GT_Utility.getOppositeSide(i)), + ((IGregTechTileEntity) tTileEntity) + .getCoverDataAtSide(GT_Utility.getOppositeSide(i)), + ((IGregTechTileEntity) tTileEntity))) { + if (((IGregTechTileEntity) tTileEntity).getTimer() > 50) { + rUsedAmperes += ((IMetaTileEntityCable) ((IGregTechTileEntity) tTileEntity) + .getMetaTileEntity()).transferElectricity(GT_Utility.getOppositeSide(i), + aVoltage, aAmperage - rUsedAmperes, aAlreadyPassedTileEntityList); + } + } else { + rUsedAmperes += ((IEnergyConnected) tTileEntity).injectEnergyUnits( + GT_Utility.getOppositeSide(i), aVoltage, aAmperage - rUsedAmperes); + } + // } else if (tTileEntity instanceof IEnergySink) { + // ForgeDirection tDirection = + // ForgeDirection.getOrientation(i).getOpposite(); + // if + // (((IEnergySink)tTileEntity).acceptsEnergyFrom((TileEntity)getBaseMetaTileEntity(), + // tDirection)) { + // if + // (((IEnergySink)tTileEntity).demandedEnergyUnits() + // > 0 && + // ((IEnergySink)tTileEntity).injectEnergyUnits(tDirection, + // aVoltage) < aVoltage) rUsedAmperes++; + // } + } else if (tTileEntity instanceof IEnergySink) { + final ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite(); + if (((IEnergySink) tTileEntity).acceptsEnergyFrom((TileEntity) this.getBaseMetaTileEntity(), + tDirection)) { + if ((((IEnergySink) tTileEntity).getDemandedEnergy() > 0) + && (((IEnergySink) tTileEntity).injectEnergy(tDirection, aVoltage, + aVoltage) < aVoltage)) { + rUsedAmperes++; + } + } + } else if (GregTech_API.mOutputRF && (tTileEntity instanceof IEnergyReceiver)) { + final ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite(); + final int rfOut = (int) ((aVoltage * GregTech_API.mEUtoRF) / 100); + if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) == rfOut) { + ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, false); + rUsedAmperes++; + } else if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) > 0) { + if (this.mRestRF == 0) { + final int RFtrans = ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, + false); + rUsedAmperes++; + this.mRestRF = rfOut - RFtrans; + } else { + final int RFtrans = ((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, + (int) this.mRestRF, false); + this.mRestRF = this.mRestRF - RFtrans; + } + } + if (GregTech_API.mRFExplosions && (((IEnergyReceiver) tTileEntity) + .getMaxEnergyStored(tDirection) < (rfOut * 600))) { + if (rfOut > ((32 * GregTech_API.mEUtoRF) / 100)) { + this.doExplosion(rfOut); + } + } + } + } + } + } + } + + this.mTransferredAmperage += rUsedAmperes; + this.mTransferredVoltageLast20 = Math.max(this.mTransferredVoltageLast20, aVoltage); + this.mTransferredAmperageLast20 = Math.max(this.mTransferredAmperageLast20, this.mTransferredAmperage); + + if ((aVoltage > this.mVoltage) || (this.mTransferredAmperage > this.mAmperage)) { + // GT 5.09 + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + if (this.mOverheat > (this.mWireHeatingTicks * 100)) { + this.getBaseMetaTileEntity().setToFire(); + } else { + this.mOverheat += 100; + } + return aAmperage; + } + // GT 5.08 + else { + this.getBaseMetaTileEntity().setToFire(); + return aAmperage; + } + } + + return rUsedAmperes; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + this.mTransferredAmperage = 0; + if (this.mOverheat > 0) { + this.mOverheat--; + } + + if ((aTick % 20) == 0) { + this.mTransferredVoltageLast20 = 0; + this.mTransferredAmperageLast20 = 0; + this.mConnections = 0; + for (byte i = 0, j = 0; i < 6; i++) { + j = GT_Utility.getOppositeSide(i); + if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).alwaysLookConnected(i, + aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), + aBaseMetaTileEntity) + || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyIn(i, + aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), + aBaseMetaTileEntity) + || aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsEnergyOut(i, + aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), + aBaseMetaTileEntity)) { + final TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i); + if (tTileEntity instanceof IColoredTileEntity) { + if (aBaseMetaTileEntity.getColorization() >= 0) { + final byte tColor = ((IColoredTileEntity) tTileEntity).getColorization(); + if ((tColor >= 0) && (tColor != aBaseMetaTileEntity.getColorization())) { + continue; + } + } + } + if ((tTileEntity instanceof IEnergyConnected) + && (((IEnergyConnected) tTileEntity).inputEnergyFrom(j) + || ((IEnergyConnected) tTileEntity).outputsEnergyTo(j))) { + this.mConnections |= (1 << i); + continue; + } + if ((tTileEntity instanceof IGregTechTileEntity) && (((IGregTechTileEntity) tTileEntity) + .getMetaTileEntity() instanceof IMetaTileEntityCable)) { + if (((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).alwaysLookConnected(j, + ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), + ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), + ((IGregTechTileEntity) tTileEntity)) + || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).letsEnergyIn(j, + ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), + ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), + ((IGregTechTileEntity) tTileEntity)) + || ((IGregTechTileEntity) tTileEntity).getCoverBehaviorAtSide(j).letsEnergyOut(j, + ((IGregTechTileEntity) tTileEntity).getCoverIDAtSide(j), + ((IGregTechTileEntity) tTileEntity).getCoverDataAtSide(j), + ((IGregTechTileEntity) tTileEntity))) { + this.mConnections |= (1 << i); + continue; + } + } + if ((tTileEntity instanceof IEnergySink) && ((IEnergySink) tTileEntity).acceptsEnergyFrom( + (TileEntity) aBaseMetaTileEntity, ForgeDirection.getOrientation(j))) { + this.mConnections |= (1 << i); + continue; + } + if (GregTech_API.mOutputRF && (tTileEntity instanceof IEnergyReceiver) + && ((IEnergyReceiver) tTileEntity).canConnectEnergy(ForgeDirection.getOrientation(j))) { + this.mConnections |= (1 << i); + continue; + } + /* + * if (tTileEntity instanceof IEnergyEmitter && + * ((IEnergyEmitter)tTileEntity).emitsEnergyTo(( + * TileEntity)aBaseMetaTileEntity, + * ForgeDirection.getOrientation(j))) { mConnections |= + * (1< as it should have been +// so any method in GregtechMetaTileEntity_IndustrialDehydrator would see generic field declared in GregtechMeta_MultiBlockBase without generic parameter + +public abstract class GregtechMeta_MultiBlockBase> extends GT_MetaTileEntity_EnhancedMultiBlockBase { + + public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; + + static { + + Method a08 = findRecipe08 = ReflectionUtils.getMethod(GT_Recipe_Map.class, "findRecipe", IHasWorldObjectAndCoords.class, GT_Recipe.class, boolean.class, long.class, FluidStack[].class, ItemStack.class, ItemStack[].class); + Method a09 = findRecipe09 = ReflectionUtils.getMethod(GT_Recipe_Map.class, "findRecipe", IHasWorldObjectAndCoords.class, GT_Recipe.class, boolean.class, boolean.class, long.class, FluidStack[].class, ItemStack.class, ItemStack[].class); + Logger.MACHINE_INFO("Found .08 findRecipe method? "+(a08 != null)); + Logger.MACHINE_INFO("Found .09 findRecipe method? "+(a09 != null)); + + try { + calculatePollutionReduction = GT_MetaTileEntity_Hatch_Muffler.class.getDeclaredMethod("calculatePollutionReduction", int.class); + } + catch (NoSuchMethodException | SecurityException e) {} + + } + + //Find Recipe Methods + private static final Method findRecipe08; + private static final Method findRecipe09; + + public GT_Recipe mLastRecipe; + private MultiblockRequirements mRequirements; + private boolean mInternalCircuit = false; + protected long mTotalRunTime = 0; + protected boolean mVoidExcess = false; + + public ArrayList mControlCoreBus = new ArrayList(); + public ArrayList mAirIntakes = new ArrayList(); + public ArrayList mChargeHatches = new ArrayList(); + public ArrayList mDischargeHatches = new ArrayList(); + public ArrayList mAllEnergyHatches = new ArrayList(); + public ArrayList mAllDynamoHatches = new ArrayList(); + + // Custom Behaviour Map + private static final HashMap mCustomBehviours = new HashMap(); + + + public GregtechMeta_MultiBlockBase(final int aID, final String aName, + final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMeta_MultiBlockBase(final String aName) { + super(aName); + } + + public static boolean isValidMetaTileEntity( + final MetaTileEntity aMetaTileEntity) { + return (aMetaTileEntity.getBaseMetaTileEntity() != null) + && (aMetaTileEntity.getBaseMetaTileEntity() + .getMetaTileEntity() == aMetaTileEntity) + && !aMetaTileEntity.getBaseMetaTileEntity().isDead(); + } + + public abstract boolean hasSlotInGUI(); + + public long getTotalRuntimeInTicks() { + return this.mTotalRunTime; + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + if (hasSlotInGUI()) { + return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + else { + String aCustomGUI = getCustomGUIResourceName(); + if (aCustomGUI == null) { + return new CONTAINER_MultiMachine_NoPlayerInventory(aPlayerInventory, aBaseMetaTileEntity); + } + else { + return new CONTAINER_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + } + } + + public abstract String getCustomGUIResourceName(); + + public boolean requiresVanillaGtGUI() { + return false; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + String aCustomGUI = getCustomGUIResourceName(); + aCustomGUI = aCustomGUI != null ? aCustomGUI : hasSlotInGUI() ? "MultiblockDisplay" : "MultiblockDisplay_Generic"; + aCustomGUI = aCustomGUI + ".png"; + if (hasSlotInGUI()) { + if (!requiresVanillaGtGUI()) { + return new GUI_Multi_Basic_Slotted(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); + } + else { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); + } + } + else { + if (getCustomGUIResourceName() == null && !hasSlotInGUI()) { + return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); + } + else { + return new GUI_MultiMachine_Default(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), aCustomGUI); + } + } + } + + public abstract String getMachineType(); + + public String getMachineTooltip() { + return "Machine Type: " + EnumChatFormatting.YELLOW + getMachineType() + EnumChatFormatting.RESET; + } + + public String[] getExtraInfoData() { + return new String[0]; + }; + + @Override + public final String[] getInfoData() { + ArrayList mInfo = new ArrayList(); + if (!this.getMetaName().equals("")) { + mInfo.add(this.getMetaName()); + } + + String[] extra = getExtraInfoData(); + + if (extra == null) { + extra = new String[0]; + } + if (extra.length > 0) { + for (String s : extra) { + mInfo.add(s); + } + } + + long seconds = (this.mTotalRunTime/20); + int weeks = (int) (TimeUnit.SECONDS.toDays(seconds) / 7); + int days = (int) (TimeUnit.SECONDS.toDays(seconds) - 7 * weeks); + long hours = TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days) - TimeUnit.DAYS.toHours(7*weeks); + long minutes = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60); + long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) *60); + + int mPollutionReduction = getPollutionReductionForAllMufflers(); + long storedEnergy = getStoredEnergyInAllEnergyHatches(); + long maxEnergy = getMaxEnergyStorageOfAllEnergyHatches(); + int tTier = this.getControlCoreTier(); + mInfo.add(getMachineTooltip()); + + + + //Lets borrow the GTNH handling + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.progress")+": "+ + EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ + EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s"); + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.energy")+": "+ + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU"); + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage")+": "+ + EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t"); + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.mei")+": "+ + EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t(*2A) "+StatCollector.translateToLocal("GTPP.machines.tier")+": "+ + EnumChatFormatting.YELLOW+GT_Values.VN[GT_Utility.getTier(getMaxInputVoltage())]+ EnumChatFormatting.RESET); + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.problems")+": "+ + EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+ + " "+StatCollector.translateToLocal("GTPP.multiblock.efficiency")+": "+ + EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %"); + + + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollution")+": "+ EnumChatFormatting.RED + this.getPollutionPerTick(null)*20+ EnumChatFormatting.RESET+"/sec"); + mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced")+": "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %"); + + + mInfo.add(StatCollector.translateToLocal("GTPP.CC.machinetier")+": "+ + EnumChatFormatting.GREEN+tTier+EnumChatFormatting.RESET); + + mInfo.add(StatCollector.translateToLocal("GTPP.CC.discount")+": "+ + EnumChatFormatting.GREEN+(getEuDiscountForParallelism())+EnumChatFormatting.RESET + "%"); + + mInfo.add(StatCollector.translateToLocal("GTPP.CC.parallel")+": "+EnumChatFormatting.GREEN+(getMaxParallelRecipes())+EnumChatFormatting.RESET); + + + mInfo.add("Total Time Since Built: " + EnumChatFormatting.DARK_GREEN + Integer.toString(weeks)+EnumChatFormatting.RESET+" Weeks, " + EnumChatFormatting.DARK_GREEN+ Integer.toString(days) +EnumChatFormatting.RESET+ " Days, "); + mInfo.add(EnumChatFormatting.DARK_GREEN + Long.toString(hours) +EnumChatFormatting.RESET + " Hours, " + EnumChatFormatting.DARK_GREEN+ Long.toString(minutes) +EnumChatFormatting.RESET+ " Minutes, " + EnumChatFormatting.DARK_GREEN+ Long.toString(second) +EnumChatFormatting.RESET+ " Seconds."); + mInfo.add("Total Time in ticks: " + EnumChatFormatting.DARK_GREEN + Long.toString(this.mTotalRunTime)); + + + String[] mInfo2 = new String[mInfo.size()]; + mInfo.toArray(mInfo2); + return mInfo2; + + + + } + + public int getPollutionReductionForAllMufflers() { + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(calculatePollutionReductionForHatch(tHatch, 100),mPollutionReduction); + } + } + return mPollutionReduction; + } + + public long getStoredEnergyInAllEnergyHatches() { + long storedEnergy=0; + for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + } + } + return storedEnergy; + } + + public long getMaxEnergyStorageOfAllEnergyHatches() { + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (isValidMetaTileEntity(tHatch)) { + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + return maxEnergy; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + private String[] aCachedToolTip; + + /*private final String aRequiresMuffler = "1x Muffler Hatch"; + private final String aRequiresCoreModule = "1x Core Module"; + private final String aRequiresMaint = "1x Maintanence Hatch";*/ + + public final static String TAG_HIDE_HATCHES = "TAG_HIDE_HATCHES"; + public final static String TAG_HIDE_MAINT = "TAG_HIDE_MAINT"; + public final static String TAG_HIDE_POLLUTION = "TAG_HIDE_POLLUTION"; + public final static String TAG_HIDE_MACHINE_TYPE = "TAG_HIDE_MACHINE_TYPE"; + + public synchronized final MultiblockRequirements getRequirements() { + return mRequirements; + } + + //public abstract MultiblockRequirements setRequirements(); + + public synchronized final void setRequirementsInternal() { + //this.mRequirements = setRequirements(); + this.mRequirements = null; + } + + public int getAmountOfOutputs() { + return 1; + } + + public abstract int getMaxParallelRecipes(); + public abstract int getEuDiscountForParallelism(); + + @Override + public boolean isCorrectMachinePart(final ItemStack paramItemStack) { + return true; + } + + @Override + public int getDamageToComponent(final ItemStack paramItemStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack p0) { + return false; + } + + @Override + public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient(getSound(), 10, 1.0F, aX, aY, aZ); + } + } + + public void startProcess() { + if(GT_Utility.isStringValid(getSound())) this.sendLoopStart((byte) 1); + } + + public String getSound() { return ""; } + + + public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes) { + return canBufferOutputs(aRecipe, aParallelRecipes, true); + } + + public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes, boolean aAllow16SlotWithoutCheck) { + if (mVoidExcess) return aParallelRecipes; + log("Determining if we have space to buffer outputs. Parallel: "+aParallelRecipes); + + // Null recipe or a recipe with lots of outputs? + // E.G. Gendustry custom comb with a billion centrifuge outputs? + // Do it anyway, provided the multi allows it. Default behaviour is aAllow16SlotWithoutCheck = true. + if (aRecipe == null || aRecipe.mOutputs.length > 16) { + if (aRecipe == null) { + return 0; + } + else if (aRecipe.mOutputs.length > 16) { + if (aAllow16SlotWithoutCheck) { + return aParallelRecipes; + } + else { + // Do nothing, we want to check this recipe properly. + } + } + } + + // Do we even need to check for item outputs? + boolean aDoesOutputItems = aRecipe.mOutputs.length > 0; + // Do we even need to check for fluid outputs? + boolean aDoesOutputFluids = aRecipe.mFluidOutputs.length > 0; + + + + /* ======================================== + * Item Management + * ======================================== + */ + + if (aDoesOutputItems) { + log("We have items to output."); + + // How many slots are free across all the output buses? + int aInputBusSlotsFree = 0; + + /* + * Create Variables for Item Output + */ + + AutoMap> aItemMap = new AutoMap>(); + AutoMap aOutputs = new AutoMap(aRecipe.mOutputs); + + for (final GT_MetaTileEntity_Hatch_OutputBus tBus : this.mOutputBusses) { + if (!isValidMetaTileEntity(tBus)) { + continue; + } + final IInventory tBusInv = tBus.getBaseMetaTileEntity(); + for (int i = 0; i < tBusInv.getSizeInventory(); i++) { + if (tBus.getStackInSlot(i) == null) { + aInputBusSlotsFree++; + } + else { + ItemStack aT = tBus.getStackInSlot(i); + int aSize = aT.stackSize; + aT = aT.copy(); + aT.stackSize = 0; + aItemMap.put(new FlexiblePair(aT, aSize)); + } + } + } + + // Count the slots we need, later we can check if any are able to merge with existing stacks + int aRecipeSlotsRequired = 0; + + // A map to hold the items we will be 'inputting' into the output buses. These itemstacks are actually the recipe outputs. + ConcurrentSet> aInputMap = new ConcurrentHashSet>(); + + // Iterate over the outputs, calculating require stack spacing they will require. + for (int i=0;i 64) { + int aSlotsNeedsForThisStack = (int) Math.ceil((double) ((float) aStackSize / 64f)); + // Should round up and add as many stacks as required nicely. + aRecipeSlotsRequired += aSlotsNeedsForThisStack; + for (int o=0;o 64 ? 64 : aStackSize; + aY = aY.copy(); + aY.stackSize = 0; + aInputMap.add(new FlexiblePair(aY, aStackToRemove)); + } + } + else { + // Only requires one slot + aRecipeSlotsRequired++; + aY = aY.copy(); + aY.stackSize = 0; + aInputMap.add(new FlexiblePair(aY, aStackSize)); + } + } + } + + // We have items to add to the output buses. See if any are not full stacks and see if we can make them full. + if (aInputMap.size() > 0) { + // Iterate over the current stored items in the Output busses, if any match and are not full, we can try account for merging. + busItems: for (FlexiblePair y : aItemMap) { + // Iterate over the 'inputs', we can safely remove these as we go. + outputItems: for (FlexiblePair u : aInputMap) { + // Create local vars for readability. + ItemStack aOutputBusStack = y.getKey(); + ItemStack aOutputStack = u.getKey(); + // Stacks match, including NBT. + if (GT_Utility.areStacksEqual(aOutputBusStack, aOutputStack, false)) { + // Stack Matches, but it's full, continue. + if (aOutputBusStack.stackSize >= 64) { + // This stack is full, no point checking it. + continue busItems; + } + else { + // We can merge these two stacks without any hassle. + if ((aOutputBusStack.stackSize + aOutputStack.stackSize) <= 64) { + // Update the stack size in the bus storage map. + y.setValue(aOutputBusStack.stackSize + aOutputStack.stackSize); + // Remove the 'input' stack from the recipe outputs, so we don't try count it again. + aInputMap.remove(u); + continue outputItems; + } + // Stack merging is too much, so we fill this stack, leave the remainder. + else { + int aRemainder = (aOutputBusStack.stackSize + aOutputStack.stackSize) - 64; + // Update the stack size in the bus storage map. + y.setValue(64); + // Create a new object to iterate over later, with the remainder data; + FlexiblePair t = new FlexiblePair(u.getKey(), aRemainder); + // Remove the 'input' stack from the recipe outputs, so we don't try count it again. + aInputMap.remove(u); + // Add the remainder stack. + aInputMap.add(t); + continue outputItems; + } + } + } + else { + continue outputItems; + } + } + } + } + + // We have stacks that did not merge, do we have space for them? + if (aInputMap.size() > 0) { + if (aInputMap.size() > aInputBusSlotsFree) { + aParallelRecipes = (int) Math.floor((double) aInputBusSlotsFree/aInputMap.size() * aParallelRecipes); + // We do not have enough free slots in total to accommodate the remaining managed stacks. + log(" Free: "+aInputBusSlotsFree+", Required: "+aInputMap.size()); + if(aParallelRecipes == 0) { + log("Failed to find enough space for all item outputs."); + return 0; + } + + } + } + + /* + * End Item Management + */ + + } + + + + + + /* ======================================== + * Fluid Management + * ======================================== + */ + + + + if (aDoesOutputFluids) { + log("We have Fluids to output."); + // How many slots are free across all the output buses? + int aFluidHatches = 0; + int aEmptyFluidHatches = 0; + int aFullFluidHatches = 0; + // Create Map for Fluid Output + ArrayList> aOutputHatches = new ArrayList>(); + for (final GT_MetaTileEntity_Hatch_Output tBus : this.mOutputHatches) { + if (!isValidMetaTileEntity(tBus)) { + continue; + } + aFluidHatches++; + // Map the Hatch with the space left for easy checking later. + if (tBus.getFluid() == null) { + aOutputHatches.add(new Triplet(tBus, null, tBus.getCapacity())); + } + else { + int aSpaceLeft = tBus.getCapacity() - tBus.getFluidAmount(); + aOutputHatches.add(new Triplet(tBus, tBus.getFluid(), aSpaceLeft)); + } + } + // Create a map of all the fluids we would like to output, we can iterate over this and see how many we can merge into existing hatch stacks. + ArrayList aOutputFluids = new ArrayList(); + // Ugly ass boxing + aOutputFluids.addAll(new AutoMap(aRecipe.mFluidOutputs)); + // Iterate the Hatches, updating their 'stored' data. + //for (Triplet aHatchData : aOutputHatches) { + for (int i = 0;i aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); + //aOutputHatches.add(aNewHatchData); + break; + } + // We can fill this hatch perfectly (rare case), may as well add it directly to the full list. + else if (aSpaceLeftInHatch == aFluidToPutIntoHatch) { + // Copy Old Stack + FluidStack aNewHatchStack = aHatchStack.copy(); + // Add in amount from output stack + aNewHatchStack.amount += aFluidToPutIntoHatch; + // Remove fluid from output list, merge success + aOutputFluids.remove(aOutputFluids.get(j)); + j--; + // Remove hatch from hatch list, data is now invalid. + aOutputHatches.remove(aOutputHatches.get(i)); + i--; + // Re-add hatch to hatch list, with new data. + Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); + aOutputHatches.add(aNewHatchData); + break; + } + // We have more space than we need to merge, so we remove the stack from the output list and update the hatch list. + else { + // Copy Old Stack + FluidStack aNewHatchStack = aHatchStack.copy(); + // Add in amount from output stack + aNewHatchStack.amount += aFluidToPutIntoHatch; + // Remove fluid from output list, merge success + aOutputFluids.remove(aOutputFluids.get(j)); + j--; + // Remove hatch from hatch list, data is now invalid. + aOutputHatches.remove(aOutputHatches.get(i)); + i--; + // Re-add hatch to hatch list, with new data. + Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); + aOutputHatches.add(aNewHatchData); + // Check next fluid + continue; + } + + } + else { + continue; + } + } + } + } + + for (Triplet aFreeHatchCheck : aOutputHatches) { + // Free Hatch + if (aFreeHatchCheck.getValue_2() == null || aFreeHatchCheck.getValue_3() == 0 || aFreeHatchCheck.getValue_1().getFluid() == null) { + aEmptyFluidHatches++; + } + } + + // We have Fluid Stacks we did not merge. Do we have space? + log("fluids to output "+aOutputFluids.size()+" empty hatches "+aEmptyFluidHatches); + if (aOutputFluids.size() > 0) { + // Not enough space to add fluids. + if (aOutputFluids.size() > aEmptyFluidHatches) { + aParallelRecipes = (int) Math.floor((double) aEmptyFluidHatches/aOutputFluids.size() * aParallelRecipes); + log("Failed to find enough space for all fluid outputs. Free: "+aEmptyFluidHatches+", Required: "+aOutputFluids.size()); + return 0; + + } + } + + /* + * End Fluid Management + */ + } + + return aParallelRecipes; + } + + /** + * A Static {@link Method} object which holds the current status of logging. + */ + public static Method aLogger = null; + + public void log(String s) { + if (!AsmConfig.disableAllLogging) { + if (CORE_Preloader.DEBUG_MODE) { + Logger.INFO(s); + } else { + Logger.MACHINE_INFO(s); + } + } + } + + public boolean checkRecipeGeneric() { + return checkRecipeGeneric(1, 100, 0); + } + + public boolean checkRecipeGeneric(int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent) { + return checkRecipeGeneric(aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, 10000); + } + + public boolean checkRecipeGeneric(int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll); + } + + public boolean checkRecipeGeneric(GT_Recipe aRecipe, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { + if (aRecipe == null) { + return false; + } + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, isPerfectOC); + } + + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll) { + return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, false); + } + + public boolean checkRecipeGeneric(GT_Recipe aRecipe, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll) { + if (aRecipe == null) { + return false; + } + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, false); + } + + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { + return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, isPerfectOC); + } + + + /* + * public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] + * aFluidInputs, int aMaxParallelRecipes, int aEUPercent, int + * aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { // Based on + * the Processing Array. A bit overkill, but very flexible. + * + * + * if (this.doesMachineBoostOutput()) { log("Boosting."); return + * checkRecipeBoostedOutputs(aItemInputs, aFluidInputs, aMaxParallelRecipes, + * aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe); } + * + * + * //Control Core to control the Multiblocks behaviour. int aControlCoreTier = + * getControlCoreTier(); + * + * //If no core, return false; if (aControlCoreTier > 0) { + * log("Control core found."); } + * + * + * // Reset outputs and progress stats this.mEUt = 0; this.mMaxProgresstime = 0; + * this.mOutputItems = new ItemStack[]{}; this.mOutputFluids = new + * FluidStack[]{}; + * + * long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, + * GT_Utility.getTier(tVoltage)); log("Running checkRecipeGeneric(0)"); + * + * //Check to see if Voltage Tier > Control Core Tier if (tTier > + * aControlCoreTier) { + * log("Control core found is lower tier than power tier. OK"); tTier = (byte) + * aControlCoreTier; } + * + * tTier = (byte) MathUtils.getValueWithinRange(tTier, 0, 9); + * + * GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe( + * getBaseMetaTileEntity(), mLastRecipe, false, + * gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + * + * log("Running checkRecipeGeneric(1)"); // Remember last recipe - an + * optimization for findRecipe() this.mLastRecipe = tRecipe; + * + * if (tRecipe == null) { log("BAD RETURN - 1"); return false; } + * + * if (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) { + * log("BAD RETURN - 2"); return false; } + * + * // EU discount float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; float + * tTotalEUt = 0.0f; + * + * int parallelRecipes = 0; + * + * log("parallelRecipes: "+parallelRecipes); + * log("aMaxParallelRecipes: "+aMaxParallelRecipes); + * log("tTotalEUt: "+tTotalEUt); log("tVoltage: "+tVoltage); + * log("tRecipeEUt: "+tRecipeEUt); log("EU1: "+tRecipeEUt); // Count + * recipes to do in parallel, consuming input items and fluids and considering + * input voltage limits for (; parallelRecipes < aMaxParallelRecipes && + * tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { if + * (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + * log("Broke at "+parallelRecipes+"."); break; } + * log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); tTotalEUt + * += tRecipeEUt; log("EU2: "+tTotalEUt); } + * + * if (parallelRecipes == 0) { log("BAD RETURN - 3"); return false; } + * + * log("EU3: "+tTotalEUt); + * + * // -- Try not to fail after this point - inputs have already been consumed! + * -- + * + * + * // Convert speed bonus to duration multiplier // e.g. 100% speed bonus = 200% + * speed = 100%/200% = 50% recipe duration. aSpeedBonusPercent = Math.max(-99, + * aSpeedBonusPercent); float tTimeFactor = 100.0f / (100.0f + + * aSpeedBonusPercent); this.mMaxProgresstime = (int)(tRecipe.mDuration * + * tTimeFactor * 10000); + * + * int aTempEu = (int) Math.floor(tTotalEUt); log("EU4: "+aTempEu); + * this.mEUt = (int) aTempEu; + * + * + * this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + * this.mEfficiencyIncrease = 10000; + * + * // Overclock if (this.mEUt <= 16) { this.mEUt = (this.mEUt * (1 << tTier - 1) + * * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << + * tTier - 1)); } else { while (this.mEUt <= + * gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.mEUt *= 4; + * this.mMaxProgresstime /= 2; } } + * + * if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } + * + * this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + * + * // Collect fluid outputs FluidStack[] tOutputFluids = new + * FluidStack[tRecipe.mFluidOutputs.length]; for (int h = 0; h < + * tRecipe.mFluidOutputs.length; h++) { if (tRecipe.getFluidOutput(h) != null) { + * tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); tOutputFluids[h].amount + * *= parallelRecipes; } } + * + * // Collect output item types ItemStack[] tOutputItems = new + * ItemStack[tRecipe.mOutputs.length]; for (int h = 0; h < + * tRecipe.mOutputs.length; h++) { if (tRecipe.getOutput(h) != null) { + * tOutputItems[h] = tRecipe.getOutput(h).copy(); tOutputItems[h].stackSize = 0; + * } } + * + * // Set output item stack sizes (taking output chance into account) for (int f + * = 0; f < tOutputItems.length; f++) { if (tRecipe.mOutputs[f] != null && + * tOutputItems[f] != null) { for (int g = 0; g < parallelRecipes; g++) { if + * (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < + * tRecipe.getOutputChance(f)) tOutputItems[f].stackSize += + * tRecipe.mOutputs[f].stackSize; } } } + * + * tOutputItems = removeNulls(tOutputItems); + * + * // Sanitize item stack size, splitting any stacks greater than max stack size + * List splitStacks = new ArrayList(); for (ItemStack + * tItem : tOutputItems) { while (tItem.getMaxStackSize() < tItem.stackSize) { + * ItemStack tmp = tItem.copy(); tmp.stackSize = tmp.getMaxStackSize(); + * tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + * splitStacks.add(tmp); } } + * + * if (splitStacks.size() > 0) { ItemStack[] tmp = new + * ItemStack[splitStacks.size()]; tmp = splitStacks.toArray(tmp); tOutputItems = + * ArrayUtils.addAll(tOutputItems, tmp); } + * + * // Strip empty stacks List tSList = new ArrayList(); + * for (ItemStack tS : tOutputItems) { if (tS.stackSize > 0) tSList.add(tS); } + * tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + * + * // Commit outputs this.mOutputItems = tOutputItems; this.mOutputFluids = + * tOutputFluids; updateSlots(); + * + * // Play sounds (GT++ addition - GT multiblocks play no sounds) + * startProcess(); + * + * log("GOOD RETURN - 1"); return true; } + */ + + public long getMaxInputEnergy() { + long rEnergy = 0; + if (mEnergyHatches.size() < 2) // so it only takes 1 amp is only 1 hatch is present so it works like most gt multies + return mEnergyHatches.get(0).getBaseMetaTileEntity().getInputVoltage(); + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) + if (isValidMetaTileEntity(tHatch)) rEnergy += tHatch.getBaseMetaTileEntity().getInputVoltage() * tHatch.getBaseMetaTileEntity().getInputAmperage(); + return rEnergy; + } + + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isPerpectOC) { + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + log("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = findRecipe( + getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + log("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe == null) { + log("BAD RETURN - 1"); + return false; + } + + + /* + * Check for Special Behaviours + */ + + // First populate the map if we need to. + if (mCustomBehviours.isEmpty()) { + mCustomBehviours.putAll(Multiblock_API.getSpecialBehaviourItemMap()); + } + + // We have a special slot object in the recipe + if (tRecipe.mSpecialItems != null) { + // The special slot is an item + if (tRecipe.mSpecialItems instanceof ItemStack) { + // Make an Itemstack instance of this. + ItemStack aSpecialStack = (ItemStack) tRecipe.mSpecialItems; + // Check if this item is in an input bus. + boolean aDidFindMatch = false; + for (ItemStack aInputItemsToCheck : aItemInputs) { + // If we find a matching stack, continue. + if (GT_Utility.areStacksEqual(aSpecialStack, aInputItemsToCheck, false)) { + // Iterate all special behaviour items, to see if we need to utilise one. + aDidFindMatch = true; + break; + } + } + // Try prevent needless iteration loops if we don't have the required inputs at all. + if (aDidFindMatch) { + // Iterate all special behaviour items, to see if we need to utilise one. + for (SpecialMultiBehaviour aBehaviours : mCustomBehviours.values()) { + // Found a match, let's adjust this recipe now. + if (aBehaviours.isTriggerItem(aSpecialStack)) { + // Adjust this recipe to suit special item + aMaxParallelRecipes = aBehaviours.getMaxParallelRecipes(); + aEUPercent = aBehaviours.getEUPercent(); + aSpeedBonusPercent = aBehaviours.getSpeedBonusPercent(); + aOutputChanceRoll = aBehaviours.getOutputChanceRoll(); + break; + } + } + } + } + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + log("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+aMaxParallelRecipes); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + if (isPerpectOC) this.mMaxProgresstime /= 4; + else this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; + } + + + + + + /* + * Here we handle recipe boosting, which grants additional output %'s to recipes that do not have 100%. + */ + + private boolean mHasBoostedCurrentRecipe = false; + private GT_Recipe mBoostedRecipe = null; + private ItemStack[] mInputVerificationForBoosting = null; + + /** + * Does this machine boost it's output? + * @return - if true, gives additional % to output chances. + */ + protected boolean doesMachineBoostOutput() { + return false; + } + + + + private int boostOutput(int aAmount) { + if (aAmount <= 0) { + return 10000; + } + if (aAmount <= 250) { + aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); + } + else if (aAmount <= 500) { + aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); + } + else if (aAmount <= 750) { + aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); + } + else if (aAmount <= 1000) { + aAmount = (aAmount*2); + } + else if (aAmount <= 1500) { + aAmount = (aAmount*2); + } + else if (aAmount <= 2000) { + aAmount = (int) (aAmount*1.5); + } + else if (aAmount <= 3000) { + aAmount = (int) (aAmount*1.5); + } + else if (aAmount <= 4000) { + aAmount = (int) (aAmount*1.2); + } + else if (aAmount <= 5000) { + aAmount = (int) (aAmount*1.2); + } + else if (aAmount <= 7000) { + aAmount = (int) (aAmount*1.2); + } + else if (aAmount <= 9000) { + aAmount = (int) (aAmount*1.1); + } + return Math.min(10000, aAmount); + } + + public GT_Recipe generateAdditionalOutputForRecipe(GT_Recipe aRecipe) { + AutoMap aNewChances = new AutoMap(); + for (int chance : aRecipe.mChances) { + aNewChances.put(boostOutput(chance)); + } + GT_Recipe aClone = aRecipe.copy(); + int[] aTemp = new int[aNewChances.size()]; + int slot = 0; + for (int g : aNewChances) { + aTemp[slot] = g; + slot++; + } + aClone.mChances = aTemp; + return aClone; + } + + + /** + * Processes recipes but provides a bonus to the output % of items if they are < 100%. + * + * @param aItemInputs + * @param aFluidInputs + * @param aMaxParallelRecipes + * @param aEUPercent + * @param aSpeedBonusPercent + * @param aOutputChanceRoll + * @param aRecipe + * @return + */ + public boolean checkRecipeBoostedOutputs( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + log("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe( + getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + log("Running checkRecipeGeneric(1)"); + + //First we check whether or not we have an input cached for boosting. + //If not, we set it to the current recipe. + //If we do, we compare it against the current recipe, if thy are the same, we try return a boosted recipe, if not, we boost a new recipe. + boolean isRecipeInputTheSame = false; + + //No cached recipe inputs, assume first run. + if (mInputVerificationForBoosting == null) { + mInputVerificationForBoosting = tRecipe.mInputs; + isRecipeInputTheSame = true; + } + //If the inputs match, we are good. + else { + if (tRecipe.mInputs == mInputVerificationForBoosting) { + isRecipeInputTheSame = true; + } + else { + isRecipeInputTheSame = false; + } + } + + //Inputs are the same, let's see if there's a boosted version. + if (isRecipeInputTheSame) { + //Yes, let's just set that as the recipe + if (mHasBoostedCurrentRecipe && mBoostedRecipe != null) { + tRecipe = mBoostedRecipe; + } + //We have yet to generate a new boosted recipe + else { + GT_Recipe aBoostedRecipe = this.generateAdditionalOutputForRecipe(tRecipe); + if (aBoostedRecipe != null) { + mBoostedRecipe = aBoostedRecipe; + mHasBoostedCurrentRecipe = true; + tRecipe = mBoostedRecipe; + } + //Bad boost + else { + mBoostedRecipe = null; + mHasBoostedCurrentRecipe = false; + } + } + } + //We have changed inputs, so we should generate a new boosted recipe + else { + GT_Recipe aBoostedRecipe = this.generateAdditionalOutputForRecipe(tRecipe); + if (aBoostedRecipe != null) { + mBoostedRecipe = aBoostedRecipe; + mHasBoostedCurrentRecipe = true; + tRecipe = mBoostedRecipe; + } + //Bad boost + else { + mBoostedRecipe = null; + mHasBoostedCurrentRecipe = false; + } + } + + //Bad modify, let's just use the original recipe. + if (!mHasBoostedCurrentRecipe || mBoostedRecipe == null) { + tRecipe = aRecipe != null ? aRecipe : findRecipe( + getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + } + + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe == null) { + log("BAD RETURN - 1"); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + log("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+aMaxParallelRecipes); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + public boolean isMachineRunning() { + boolean aRunning = this.getBaseMetaTileEntity().isActive(); + log("Queried Multiblock is currently running: "+aRunning); + return aRunning; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, + final long aTick) { + + //Time Counter + if (aBaseMetaTileEntity.isServerSide()){ + this.mTotalRunTime++; + } + + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate == 1 || this.mStartUpCheck == 1) { + this.mChargeHatches.clear(); + this.mDischargeHatches.clear(); + this.mControlCoreBus.clear(); + this.mAirIntakes.clear(); + this.mTecTechEnergyHatches.clear(); + this.mTecTechDynamoHatches.clear(); + this.mAllEnergyHatches.clear(); + this.mAllDynamoHatches.clear(); + } + } + + + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void explodeMultiblock() { + MetaTileEntity tTileEntity; + for (final Iterator localIterator = this.mChargeHatches + .iterator(); localIterator.hasNext(); tTileEntity + .getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + tTileEntity = localIterator.next(); + } + tTileEntity = null; + for (final Iterator localIterator = this.mDischargeHatches + .iterator(); localIterator.hasNext(); tTileEntity + .getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + tTileEntity = localIterator.next(); + } + tTileEntity = null; + for (final Iterator localIterator = this.mTecTechDynamoHatches + .iterator(); localIterator.hasNext(); tTileEntity + .getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + tTileEntity = localIterator.next(); + } + tTileEntity = null; + for (final Iterator localIterator = this.mTecTechEnergyHatches + .iterator(); localIterator.hasNext(); tTileEntity + .getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + tTileEntity = localIterator.next(); + } + + + + super.explodeMultiblock(); + } + + protected int getGUICircuit(ItemStack[] t) { + Item g = CI.getNumberedCircuit(0).getItem(); + ItemStack guiSlot = this.mInventory[1]; + int mMode = -1; + if (guiSlot != null && guiSlot.getItem() == g) { + this.mInternalCircuit = true; + return guiSlot.getItemDamage(); + } + else { + this.mInternalCircuit = false; + } + + if (!this.mInternalCircuit) { + for (ItemStack j : t) { + if (j.getItem() == g) { + mMode = j.getItemDamage(); + break; + } + } + } + return mMode; + } + + protected ItemStack getGUIItemStack() { + ItemStack guiSlot = this.mInventory[1]; + return guiSlot; + } + + protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) { + boolean result = false; + if (this.mInventory[1] == null) { + this.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null; + this.depleteInput(aNewGuiSlotContents); + this.updateSlots(); + result = true; + } + return result; + } + + protected boolean clearGUIItemSlot() { + return setGUIItemStack(null); + } + + + public ItemStack findItemInInventory(Item aSearchStack) { + return findItemInInventory(aSearchStack, 0); + } + + public ItemStack findItemInInventory(Item aSearchStack, int aMeta) { + return findItemInInventory(ItemUtils.simpleMetaStack(aSearchStack, aMeta, 1)); + } + + public ItemStack findItemInInventory(ItemStack aSearchStack) { + if (aSearchStack != null && this.mInputBusses.size() > 0) { + for (GT_MetaTileEntity_Hatch_InputBus bus : this.mInputBusses) { + if (bus != null) { + for (ItemStack uStack : bus.mInventory) { + if (uStack != null) { + if (aSearchStack.getClass().isInstance(uStack.getItem())) { + return uStack; + } + } + } + } + } + } + return null; + } + + @Override + public void updateSlots() { + for (final GT_MetaTileEntity_Hatch_InputBattery tHatch : this.mChargeHatches) { + if (isValidMetaTileEntity(tHatch)) { + tHatch.updateSlots(); + } + } + for (final GT_MetaTileEntity_Hatch_OutputBattery tHatch : this.mDischargeHatches) { + if (isValidMetaTileEntity(tHatch)) { + tHatch.updateSlots(); + } + } + super.updateSlots(); + } + + public boolean isToolCreative(ItemStack mStack){ + Materials t1 = GT_MetaGenerated_Tool.getPrimaryMaterial(mStack); + Materials t2 = GT_MetaGenerated_Tool.getSecondaryMaterial(mStack); + if (t1 == Materials._NULL && t2 == Materials._NULL){ + return true; + } + return false; + } + + /** + * Causes a Random Maint. Issue. + * @return {@link boolean} - Returns whether or not an issue was caused, should always be true. + */ + public boolean causeMaintenanceIssue() { + boolean b = false; + switch (this.getBaseMetaTileEntity().getRandomNumber(6)) { + case 0 : { + this.mWrench = false; + b = true; + break; + } + case 1 : { + this.mScrewdriver = false; + b = true; + break; + } + case 2 : { + this.mSoftHammer = false; + b = true; + break; + } + case 3 : { + this.mHardHammer = false; + b = true; + break; + } + case 4 : { + this.mSolderingTool = false; + b = true; + break; + } + case 5 : { + this.mCrowbar = false; + b = true; + break; + } + } + return b; + } + + public void fixAllMaintenanceIssue() { + this.mCrowbar = true; + this.mWrench = true; + this.mHardHammer = true; + this.mSoftHammer = true; + this.mSolderingTool = true; + this.mScrewdriver = true; + } + + public boolean checkHatch() { + return mMaintenanceHatches.size() <= 1 && !mMufflerHatches.isEmpty(); + } + + public boolean addToMachineListInternal(ArrayList aList, final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + return addToMachineListInternal(aList, getMetaTileEntity(aTileEntity), aBaseCasingIndex); + } + + public boolean addToMachineListInternal(ArrayList aList, final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + + //Check type + /* + * Class aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if + * (!aHatchType.isInstance(aTileEntity)) { return false; } + */ + + // Try setRecipeMap + + if (aTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + ((GT_MetaTileEntity_Hatch_Input) aTileEntity).mRecipeMap = getRecipeMap(); + } + if (aTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap(); + } + + if (aList.isEmpty()) { + if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { + if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { + log("Adding " + aTileEntity.getInventoryName() + " at " + new BlockPos(aTileEntity.getBaseMetaTileEntity()).getLocationString()); + } + updateTexture(aTileEntity, aBaseCasingIndex); + return aList.add((E) aTileEntity); + } + } else { + IGregTechTileEntity aCur = aTileEntity.getBaseMetaTileEntity(); + BlockPos aCurPos = new BlockPos(aCur); + boolean aExists = false; + for (E m : aList) { + IGregTechTileEntity b = ((IMetaTileEntity) m).getBaseMetaTileEntity(); + if (b != null) { + BlockPos aPos = new BlockPos(b); + if (aPos != null) { + if (aCurPos.equals(aPos)) { + if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { + log("Found Duplicate "+b.getInventoryName()+" at " + aPos.getLocationString()); + } + return false; + } + } + } + } + if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { + if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { + log("Adding " + aCur.getInventoryName() + " at " + aCurPos.getLocationString()); + } + updateTexture(aTileEntity, aBaseCasingIndex); + return aList.add((E) aTileEntity); + } + } + return false; + } + + public int getControlCoreTier() { + + //Always return best tier if config is off. + /*boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores; + if (!aCoresConfig) { + return 10; + }*/ + + if (mControlCoreBus.isEmpty()) { + log("No Control Core Modules Found."); + return 0; + } + GT_MetaTileEntity_Hatch_ControlCore i = getControlCoreBus(); + if (i != null) { + ItemStack x = i.mInventory[0]; + if (x != null) { + return x.getItemDamage(); + } + } + log("Control Core Module was null."); + return 0; + } + + public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() { + if (this.mControlCoreBus == null || this.mControlCoreBus.isEmpty()) { + return null; + } + GT_MetaTileEntity_Hatch_ControlCore x = this.mControlCoreBus.get(0); + if (x != null) { + log("getControlCore(ok)"); + return x; + } + log("getControlCore(bad)"); + return null; + } + + //mControlCoreBus + public boolean addControlCoreToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (!mControlCoreBus.isEmpty()) { + log("Tried to add a secondary control core module."); + return false; + } + GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) getMetaTileEntity(aTileEntity); + if (Module != null) { + if (Module.setOwner(aTileEntity)) { + log("Adding control core module."); + return addToMachineListInternal(mControlCoreBus, Module, aBaseCasingIndex); + } + } + return false; + } + + private IMetaTileEntity getMetaTileEntity(final IGregTechTileEntity aTileEntity) { + if (aTileEntity == null) { + return null; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + return aMetaTileEntity; + } + + + @Override + public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + return addToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex); + } + + public boolean addToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) { + if (aMetaTileEntity == null) { + return false; + } + + //Use this to determine the correct value, then update the hatch texture after. + boolean aDidAdd = false; + + //Handle Custom Hatches + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ControlCore) { + log("Found GT_MetaTileEntity_Hatch_ControlCore"); + if (!mControlCoreBus.isEmpty()) { + log("Tried to add a secondary control core module."); + return false; + } + aDidAdd = addToMachineListInternal(this.mControlCoreBus, aMetaTileEntity, aBaseCasingIndex); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBattery) { + log("Found GT_MetaTileEntity_Hatch_InputBattery"); + aDidAdd = addToMachineListInternal(mChargeHatches, aMetaTileEntity, aBaseCasingIndex); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBattery) { + log("Found GT_MetaTileEntity_Hatch_OutputBattery"); + aDidAdd = addToMachineListInternal(mDischargeHatches, aMetaTileEntity, aBaseCasingIndex); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) { + aDidAdd = addToMachineListInternal(mAirIntakes, aMetaTileEntity, aBaseCasingIndex); + } + + //Handle TT Multi-A Energy Hatches + else if (LoadedMods.TecTech && isThisHatchMultiEnergy(aMetaTileEntity)) { + log("Found isThisHatchMultiEnergy"); + aDidAdd = addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex); + updateMasterEnergyHatchList(aMetaTileEntity); + } + + //Handle TT Multi-A Dynamos + else if (LoadedMods.TecTech && isThisHatchMultiDynamo(aMetaTileEntity)) { + log("Found isThisHatchMultiDynamo"); + aDidAdd = addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex); + updateMasterDynamoHatchList(aMetaTileEntity); + } + + //Handle Fluid Hatches using seperate logic + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) + aDidAdd = addToMachineListInternal(mInputHatches, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) + aDidAdd = addToMachineListInternal(mOutputHatches, aMetaTileEntity, aBaseCasingIndex); + + //Process Remaining hatches using Vanilla GT Logic + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) + aDidAdd = addToMachineListInternal(mInputBusses, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) + aDidAdd = addToMachineListInternal(mOutputBusses, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { + aDidAdd = addToMachineListInternal(mEnergyHatches, aMetaTileEntity, aBaseCasingIndex); + updateMasterEnergyHatchList(aMetaTileEntity); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { + aDidAdd = addToMachineListInternal(mDynamoHatches, aMetaTileEntity, aBaseCasingIndex); + updateMasterDynamoHatchList(aMetaTileEntity); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) + aDidAdd = addToMachineListInternal(mMaintenanceHatches, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) + aDidAdd = addToMachineListInternal(mMufflerHatches, aMetaTileEntity, aBaseCasingIndex); + + //return super.addToMachineList(aTileEntity, aBaseCasingIndex); + return aDidAdd; + } + + + + @Override + public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + @Override + public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + @Override + public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + @Override + public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + public boolean addAirIntakeToMachineList(final IGregTechTileEntity aMetaTileEntity, final int aBaseCasingIndex) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + public boolean addFluidInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + return addFluidInputToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex); + } + + public boolean addFluidInputToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + public boolean clearRecipeMapForAllInputHatches() { + return resetRecipeMapForAllInputHatches(null); + } + + public boolean resetRecipeMapForAllInputHatches() { + return resetRecipeMapForAllInputHatches(this.getRecipeMap()); + } + + public boolean resetRecipeMapForAllInputHatches(GT_Recipe_Map aMap) { + int cleared = 0; + for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { + if (resetRecipeMapForHatch(g, aMap)) { + cleared++; + } + } + for (GT_MetaTileEntity_Hatch_InputBus g : this.mInputBusses) { + if (resetRecipeMapForHatch(g, aMap)) { + cleared++; + } + } + return cleared > 0; + } + public boolean resetRecipeMapForHatch(IGregTechTileEntity aTileEntity, GT_Recipe_Map aMap) { + try { + final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + return resetRecipeMapForHatch((GT_MetaTileEntity_Hatch)aMetaTileEntity, aMap); + } + else { + return false; + } + } + catch (Throwable t) { + return false; + } + } + + public boolean resetRecipeMapForHatch(GT_MetaTileEntity_Hatch aTileEntity, GT_Recipe_Map aMap) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity; + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input){ + ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = null; + ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = aMap; + if (aMap != null && aMap.mNEIName != null) { + log("Remapped Input Hatch to "+aMap.mNEIName+"."); + } + else { + log("Cleared Input Hatch."); + } + } + else { + ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = null; + ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = aMap; + if (aMap != null && aMap.mNEIName != null) { + log("Remapped Input Bus to "+aMap.mNEIName+"."); + } + else { + log("Cleared Input Bus."); + } + } + return true; + } + else { + return false; + } + } + + @Override + public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + clearRecipeMapForAllInputHatches(); + onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); + resetRecipeMapForAllInputHatches(); + } + + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + + } + + + + + + /** + * Enable Texture Casing Support if found in GT 5.09 + */ + + public boolean updateTexture(final IGregTechTileEntity aTileEntity, int aCasingID){ + return updateTexture(getMetaTileEntity(aTileEntity), aCasingID); + } + + /** + * Enable Texture Casing Support if found in GT 5.09 + */ + + @SuppressWarnings("deprecation") + public boolean updateTexture(final IMetaTileEntity aTileEntity, int aCasingID){ + try { //gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch.updateTexture(int) + + final IMetaTileEntity aMetaTileEntity = aTileEntity; + if (aMetaTileEntity == null) { + return false; + } + Method mProper = ReflectionUtils.getMethod(GT_MetaTileEntity_Hatch.class, "updateTexture", int.class); + if (mProper != null){ + if (GT_MetaTileEntity_Hatch.class.isInstance(aMetaTileEntity)){ + mProper.setAccessible(true); + mProper.invoke(aMetaTileEntity, aCasingID); + log("Good Method Call for updateTexture."); + return true; + } + } + else { + log("Bad Method Call for updateTexture."); + if (GT_MetaTileEntity_Hatch.class.isInstance(aMetaTileEntity)){ + if (aCasingID <= Byte.MAX_VALUE) { + ((GT_MetaTileEntity_Hatch) aTileEntity).mMachineBlock = (byte) aCasingID; + log("Good Method Call for updateTexture. Used fallback method of setting mMachineBlock as casing id was <= 128."); + return true; + } + else { + log("updateTexture returning false. 1.2"); + } + } + else { + log("updateTexture returning false. 1.3"); + } + } + log("updateTexture returning false. 1"); + return false; + } + catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + log("updateTexture returning false."); + log("updateTexture returning false. 2"); + e.printStackTrace(); + return false; + } + + } + + + + + + + + + + /** + * TecTech Support + */ + + + /** + * This is the array Used to Store the Tectech Multi-Amp Dynamo hatches. + */ + + public ArrayList mTecTechDynamoHatches = new ArrayList(); + + /** + * This is the array Used to Store the Tectech Multi-Amp Energy hatches. + */ + + public ArrayList mTecTechEnergyHatches = new ArrayList(); + + /** + * TecTech Multi-Amp Dynamo Support + * @param aTileEntity - The Dynamo Hatch + * @param aBaseCasingIndex - Casing Texture + * @return + */ + + public boolean addMultiAmpDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){ + final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity == null) { + return false; + } + if (isThisHatchMultiDynamo(aTileEntity)) { + return addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + public boolean isThisHatchMultiDynamo(IGregTechTileEntity aTileEntity){ + return isThisHatchMultiDynamo(getMetaTileEntity(aTileEntity)); + } + + public boolean isThisHatchMultiDynamo(IMetaTileEntity aMetaTileEntity){ + Class mDynamoClass; + mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti"); + if (mDynamoClass != null){ + if (mDynamoClass.isInstance(aMetaTileEntity)){ + return true; + } + } + return false; + } + + @Override + public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || isThisHatchMultiDynamo(aMetaTileEntity)) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + private boolean updateMasterDynamoHatchList(IMetaTileEntity aMetaTileEntity) { + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { + GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity; + return mAllDynamoHatches.add(aHatch); + } + return false; + } + + + /** + * TecTech Multi-Amp Energy Hatch Support + * @param aTileEntity - The Energy Hatch + * @param aBaseCasingIndex - Casing Texture + * @return + */ + + public boolean addMultiAmpEnergyToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){ + final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity == null) { + return false; + } + if (isThisHatchMultiEnergy(aMetaTileEntity)) { + return addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + public boolean isThisHatchMultiEnergy(IGregTechTileEntity aTileEntity){ + return isThisHatchMultiEnergy(getMetaTileEntity(aTileEntity)); + } + + public boolean isThisHatchMultiEnergy(IMetaTileEntity aMetaTileEntity){ + Class mDynamoClass; + mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti"); + if (mDynamoClass != null){ + if (mDynamoClass.isInstance(aMetaTileEntity)){ + return true; + } + } + return false; + } + + @Override + public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy || isThisHatchMultiEnergy(aMetaTileEntity)) { + return addToMachineList(aMetaTileEntity, aBaseCasingIndex); + } + return false; + } + + private boolean updateMasterEnergyHatchList(IMetaTileEntity aMetaTileEntity) { + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { + GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity; + return mAllEnergyHatches.add(aHatch); + } + return false; + } + + + /** + * Pollution Management + */ + + private static Method calculatePollutionReduction = null; + public int calculatePollutionReductionForHatch(GT_MetaTileEntity_Hatch_Muffler i , int g) { + if (calculatePollutionReduction != null) { + try { + return (int) calculatePollutionReduction.invoke(i, g); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + + } + } + return 0; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setLong("mTotalRunTime", this.mTotalRunTime); + aNBT.setBoolean("mVoidExcess", this.mVoidExcess); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + this.mTotalRunTime = aNBT.getLong("mTotalRunTime"); + this.mVoidExcess = aNBT.getBoolean("mVoidExcess"); + super.loadNBTData(aNBT); + } + + + + + + + + + + + + + + /** + * Custom Find Recipe with Debugging + */ + + + public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final boolean aNotUnificated, + final boolean aDontCheckStackSizes, final long aVoltage, final FluidStack[] aFluids, + final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, null, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, + (ItemStack) null, aInputs); + } + + public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final boolean aNotUnificated, + final long aVoltage, final FluidStack[] aFluids, final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, (ItemStack) null, aInputs); + } + + public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, + final boolean aNotUnificated, final boolean aDontCheckStackSizes, final long aVoltage, + final FluidStack[] aFluids, final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, + (ItemStack) null, aInputs); + } + + public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, + final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, + final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, (ItemStack) null, aInputs); + } + + public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, + final boolean aNotUnificated, final long aVoltage, final FluidStack[] aFluids, + final ItemStack aSpecialSlot, final ItemStack... aInputs) { + return this.findRecipe(aTileEntity, aRecipe, aNotUnificated, true, aVoltage, aFluids, aSpecialSlot, + aInputs); + } + + public GT_Recipe findRecipe(final IHasWorldObjectAndCoords aTileEntity, final GT_Recipe aRecipe, + final boolean aNotUnificated, final boolean aDontCheckStackSizes, final long aVoltage, + final FluidStack[] aFluids, final ItemStack aSpecialSlot, ItemStack... aInputs) { + if (this.getRecipeMap().mRecipeList.isEmpty()) { + log("No Recipes in Map to search through."); + return null; + } + GT_Recipe mRecipeResult = null; + try { + if (GregTech_API.sPostloadFinished) { + if (this.getRecipeMap().mMinimalInputFluids > 0) { + if (aFluids == null) { + log("aFluids == null && minFluids > 0"); + return null; + } + int tAmount = 0; + for (final FluidStack aFluid : aFluids) { + if (aFluid != null) { + ++tAmount; + } + } + if (tAmount < this.getRecipeMap().mMinimalInputFluids) { + log("Not enough fluids?"); + return null; + } + } + if (this.getRecipeMap().mMinimalInputItems > 0) { + if (aInputs == null) { + log("No inputs and minItems > 0"); + return null; + } + int tAmount = 0; + for (final ItemStack aInput : aInputs) { + if (aInput != null) { + ++tAmount; + } + } + if (tAmount < this.getRecipeMap().mMinimalInputItems) { + log("Not enough items?"); + return null; + } + } + } + else { + log("Game Not Loaded properly for recipe lookup."); + } + if (aNotUnificated) { + aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs); + } + if (aRecipe != null && !aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered + && aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { + mRecipeResult = (aRecipe.mEnabled/* && aVoltage * this.getRecipeMap().mAmperage >= aRecipe.mEUt*/) ? aRecipe : null; + log("x) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); + if (mRecipeResult != null) { + return mRecipeResult; + } + } + if (mRecipeResult == null && this.getRecipeMap().mUsualInputCount >= 0 && aInputs != null && aInputs.length > 0) { + for (final ItemStack tStack : aInputs) { + if (tStack != null) { + Collection tRecipes = this.getRecipeMap().mRecipeItemMap.get(new GT_ItemStack(tStack)); + if (tRecipes != null) { + for (final GT_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { + mRecipeResult = (tRecipe.mEnabled/* && aVoltage * this.getRecipeMap().mAmperage >= tRecipe.mEUt*/) + ? tRecipe + : null; + log("1) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); + //return mRecipeResult; + } + } + } + + //TODO - Investigate if this requires to be in it's own block + tRecipes = this.getRecipeMap().mRecipeItemMap + .get(new GT_ItemStack(GT_Utility.copyMetaData(32767L, new Object[]{tStack}))); + if (tRecipes != null) { + for (final GT_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe + && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { + mRecipeResult = (tRecipe.mEnabled /*&& aVoltage * this.getRecipeMap().mAmperage >= tRecipe.mEUt*/) + ? tRecipe + : null; + log("2) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); + //return mRecipeResult; + } + } + } + } + } + } + if (mRecipeResult == null && this.getRecipeMap().mMinimalInputItems == 0 && aFluids != null && aFluids.length > 0) { + for (final FluidStack aFluid2 : aFluids) { + if (aFluid2 != null) { + final Collection tRecipes = this.getRecipeMap().mRecipeFluidMap.get(aFluid2.getFluid()); + if (tRecipes != null) { + for (final GT_Recipe tRecipe : tRecipes) { + if (!tRecipe.mFakeRecipe + && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { + mRecipeResult = (tRecipe.mEnabled/* && aVoltage * this.getRecipeMap().mAmperage >= tRecipe.mEUt*/) + ? tRecipe + : null; + log("3) Found Recipe? "+(mRecipeResult != null ? "true" : "false")); + //return mRecipeResult; + } + } + } + } + } + } + } + catch (Throwable t) { + log("Invalid recipe lookup."); + } + + + if (mRecipeResult == null) { + log("Invalid recipe, Fallback lookup. "+this.getRecipeMap().mRecipeList.size()+" | "+this.getRecipeMap().mNEIName); + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + try { + return (GT_Recipe) findRecipe08.invoke(getRecipeMap(), aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + return null; + } + } + else { + try { + return (GT_Recipe) findRecipe09.invoke(getRecipeMap(), aTileEntity, aRecipe, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, aSpecialSlot, aInputs); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + return null; + } + } + } + else { + return mRecipeResult; + } + + + + + } + + + + + /** + * Custom Tool Handling + */ + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + // Do Things + if (this.getBaseMetaTileEntity().isServerSide()) { + //Logger.INFO("Right Clicked Controller."); + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem != null) { + //Logger.INFO("Holding Item."); + if (tCurrentItem.getItem() instanceof GT_MetaGenerated_Tool) { + //Logger.INFO("Is GT_MetaGenerated_Tool."); + int[] aOreID = OreDictionary.getOreIDs(tCurrentItem); + for (int id : aOreID) { + // Plunger + if (OreDictionary.getOreName(id).equals("craftingToolPlunger")) { + //Logger.INFO("Is Plunger."); + return onPlungerRightClick(aPlayer, aSide, aX, aY, aZ); + } + } + } + } + } + //Do Super + boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + return aSuper; + } + + public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + int aHatchIndex = 0; + PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatches.size()+" output hatches."); + for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { + if (hatch.mFluid != null) { + PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+"."); + hatch.mFluid = null; + } + aHatchIndex++; + } + return aHatchIndex > 0; + } + + @Override + public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + boolean tSuper = super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + if (aPlayer.isSneaking()) + return tSuper; + mVoidExcess = !mVoidExcess; + aPlayer.addChatMessage(new ChatComponentTranslation(mVoidExcess ? "interaction.voidexcess.enabled" : "interaction.voidexcess.disabled")); + return true; + } + + public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, + Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) { + boolean isHatch = false; + if (aBaseMetaTileEntity != null) { + + // Unsure why this check exists? + /*if (aCasingID < 64) { + aCasingID = TAE.GTPP_INDEX(aCasingID); + }*/ + + isHatch = this.addToMachineList(aBaseMetaTileEntity, aCasingID); + if (isHatch) { + return true; + } + else { + int aMetaTileID = aBaseMetaTileEntity.getMetaTileID(); + //Found a controller + if (aMetaTileID >= 750 && aMetaTileID < 1000 && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + //Vanilla Hatches/Busses + else if (aMetaTileID >= 10 && aMetaTileID <= 99 && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + //Adv Mufflers + else if (aMetaTileID >= 30001 && aMetaTileID <= 30009 && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + //Control Core, Super IO + else if (aMetaTileID >= 30020 && aMetaTileID <= 30040 && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + //Auto maint + else if (aMetaTileID == 111 && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + //Data Ports + else if ((aMetaTileID == 131 || aMetaTileID == 132) && aFoundBlock == GregTech_API.sBlockMachines) { + return true; + } + else { + log("Found meta Tile: "+aMetaTileID); + } + } + } + if (!isHatch) { + if (aFoundBlock == aExpectedBlock && aFoundMeta == aExpectedMeta) { + return true; + } + else if (aFoundBlock != aExpectedBlock) { + if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { + log("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta); + //log("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString())); + } + return false; + } + else if (aFoundMeta != aExpectedMeta) { + log("A2"); + return false; + } + + } + log("A3"); + return false; + } + + @Override + public boolean depleteInput(final FluidStack aLiquid) { + if (aLiquid == null) { + return false; + } + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + tHatch.mRecipeMap = this.getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + FluidStack tLiquid = tHatch.getFluid(); + if (tLiquid == null || !tLiquid.isFluidEqual(aLiquid) || tLiquid.amount < aLiquid.amount) { + continue; + } + tLiquid = tHatch.drain(aLiquid.amount, false); + if (tLiquid != null && tLiquid.amount >= aLiquid.amount) { + tLiquid = tHatch.drain(aLiquid.amount, true); + return tLiquid != null && tLiquid.amount >= aLiquid.amount; + } + continue; + } + } + return false; + } + + @Override + public void onServerStart() { + super.onServerStart(); + tryTickWaitTimerDown(); + } + + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + tryTickWaitTimerDown(); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + tryTickWaitTimerDown(); + } + + @Override + public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + super.onCreated(aStack, aWorld, aPlayer); + tryTickWaitTimerDown(); + } + + private final void tryTickWaitTimerDown() { + /*if (mStartUpCheck > 10) { + mStartUpCheck = 10; + }*/ + } + + //Only support to use meta to tier + public static IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheFuckingMeta, Function aGetTheFuckingMeta, int maxMeta) { + return addTieredBlock(aBlock, (t, i) -> { + aSetTheFuckingMeta.accept(t, i); + return true; + }, aGetTheFuckingMeta, 0, maxMeta + ); + } + + public static IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheFuckingMeta, Function aGetTheFuckingMeta, int minMeta, int maxMeta) { + return addTieredBlock(aBlock, (t, i) -> { + aSetTheFuckingMeta.accept(t, i); + return true; + }, aGetTheFuckingMeta, minMeta, maxMeta + ); + } + + public static IStructureElement addTieredBlock(Block aBlock, BiPredicate aSetTheFuckingMeta, Function aGetTheFuckingMeta, int minMeta, int maxMeta) { + + return new IStructureElement() { + @Override + public boolean check(T t, World world, int x, int y, int z) { + Block tBlock = world.getBlock(x, y, z); + if (aBlock == tBlock) { + Integer currentMeta = aGetTheFuckingMeta.apply(t); + int newMeta = tBlock.getDamageValue(world, x, y, z) + 1; + if (newMeta > maxMeta || newMeta < minMeta + 1) return false; + if (currentMeta == 0) { + return aSetTheFuckingMeta.test(t, newMeta); + } else { + return currentMeta == newMeta; + } + } + return false; + } + + @Override + public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { + StructureLibAPI.hintParticle(world, x, y, z, aBlock, getMeta(trigger)); + return true; + } + + @Override + public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { + return world.setBlock(x, y, z, aBlock, getMeta(trigger), 3); + } + + private int getMeta(ItemStack trigger) { + int meta = trigger.stackSize; + if (meta <= 0) meta = minMeta; + if (meta + minMeta >= maxMeta) meta = maxMeta - 1 - minMeta; + return meta + minMeta; + } + }; + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java new file mode 100644 index 0000000000..21b0efff99 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java @@ -0,0 +1,796 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; + +import static gregtech.api.enums.GT_Values.V; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.*; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public abstract class GregtechMeta_SteamMultiBase extends GregtechMeta_MultiBlockBase { + + public ArrayList mSteamInputs = new ArrayList(); + public ArrayList mSteamOutputs = new ArrayList(); + public ArrayList mSteamInputFluids = new ArrayList(); + + public GregtechMeta_SteamMultiBase(String aName) { + super(aName); + } + + public GregtechMeta_SteamMultiBase(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), aActive ? getFrontOverlayActive() : getFrontOverlay()}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; + } + + protected abstract GT_RenderedTexture getFrontOverlay(); + + protected abstract GT_RenderedTexture getFrontOverlayActive(); + + private int getCasingTextureIndex() { + return 10; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public boolean checkRecipe(ItemStack arg0) { + + + log("Running checkRecipeGeneric(0)"); + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + GT_Recipe_Map tMap = this.getRecipeMap(); + if (tMap == null) { + return false; + } + ItemStack[] aItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] aFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[1], null, null, aItemInputs); + if (tRecipe == null) { + log("BAD RETURN - 1"); + return false; + } + + int aEUPercent = 100; + int aSpeedBonusPercent = 0; + int aOutputChanceRoll = 10000; + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + + log("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + + int aMaxParallelRecipes = canBufferOutputs(tRecipe.mOutputs, tRecipe.mFluidOutputs, this.getMaxParallelRecipes()); + if (aMaxParallelRecipes == 0) { + log("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+aMaxParallelRecipes); + log("tTotalEUt: "+tTotalEUt); + log("tRecipeEUt: "+tRecipeEUt); + + + + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (32 - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor * 1.5f); + + this.mEUt = (int)Math.ceil(tTotalEUt*1.33f); + + //this.mEUt = (3 * tRecipe.mEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = getOutputFluids(tRecipe, parallelRecipes); + + // Collect output item types + ItemStack[] tOutputItems = getOutputItems(tRecipe); + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; + + } + + public ArrayList getAllSteamStacks(){ + ArrayList aFluids = new ArrayList(); + FluidStack aSteam = FluidUtils.getSteam(1); + for (FluidStack aFluid : this.getStoredFluids()) { + if (aFluid.isFluidEqual(aSteam)) { + aFluids.add(aFluid); + } + } + return aFluids; + } + + public int getTotalSteamStored() { + int aSteam = 0; + for (FluidStack aFluid : getAllSteamStacks()) { + aSteam += aFluid.amount; + } + return aSteam; + } + + public boolean tryConsumeSteam(int aAmount) { + if (getTotalSteamStored() <= 0) { + return false; + } + else { + return this.depleteInput(FluidUtils.getSteam(aAmount)); + } + } + + @Override + public int getMaxEfficiency(ItemStack arg0) { + return 0; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate == 1 || this.mStartUpCheck == 1) { + this.mSteamInputs.clear(); + this.mSteamOutputs.clear(); + this.mSteamInputFluids.clear(); + } + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + /** + * Called every tick the Machine runs + */ + public boolean onRunningTick(ItemStack aStack) { + fixAllMaintenanceIssue(); + if (mEUt < 0) { + long aSteamVal = (((long) -mEUt * 10000) / Math.max(1000, mEfficiency)); + //Logger.INFO("Trying to drain "+aSteamVal+" steam per tick."); + if (!tryConsumeSteam((int) aSteamVal)) { + stopMachine(); + return false; + } + } + return true; + } + + @Override + public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + + //Use this to determine the correct value, then update the hatch texture after. + boolean aDidAdd = false; + + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase) { + aDidAdd = addToMachineListInternal(mSteamInputFluids, aMetaTileEntity, aBaseCasingIndex); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput) { + ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap(); + aDidAdd = addToMachineListInternal(mSteamInputs, aMetaTileEntity, aBaseCasingIndex); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput) { + aDidAdd = addToMachineListInternal(mSteamOutputs, aMetaTileEntity, aBaseCasingIndex); + } + + return aDidAdd; + } + + + + + @Override + public void stopMachine() { + super.stopMachine(); + } + + public FluidStack[] getOutputFluids(GT_Recipe aRecipe, int parallelRecipes) { + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[aRecipe.mFluidOutputs.length]; + for (int h = 0; h < aRecipe.mFluidOutputs.length; h++) { + if (aRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = aRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + return tOutputFluids; + } + + public ItemStack[] getOutputItems(GT_Recipe aRecipe) { + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[aRecipe.mOutputs.length]; + for (int h = 0; h < aRecipe.mOutputs.length; h++) { + if (aRecipe.getOutput(h) != null) { + tOutputItems[h] = aRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + return tOutputItems; + } + + public int getOutputCount(ItemStack[] aOutputs) { + return aOutputs.length; + } + public int getOutputFluidCount(FluidStack[] aOutputs) { + return aOutputs.length; + } + + public int canBufferOutputs(final ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aParallelRecipes) { + + log("Determining if we have space to buffer outputs. Parallel: "+aParallelRecipes); + + // Null recipe or a recipe with lots of outputs? + // E.G. Gendustry custom comb with a billion centrifuge outputs? + // Do it anyway, provided the multi allows it. Default behaviour is aAllow16SlotWithoutCheck = true. + if (aOutputs == null && aFluidOutputs == null) { + return 0; + } + + // Do we even need to check for item outputs? + boolean aDoesOutputItems = aOutputs != null ? aOutputs.length > 0 : false; + // Do we even need to check for fluid outputs? + boolean aDoesOutputFluids = aFluidOutputs != null ? aFluidOutputs.length > 0 : false; + + if (!aDoesOutputItems && !aDoesOutputFluids) { + return 0; + } + + /* ======================================== + * Item Management + * ======================================== + */ + + if (aDoesOutputItems) { + log("We have items to output."); + + // How many slots are free across all the output buses? + int aInputBusSlotsFree = 0; + + /* + * Create Variables for Item Output + */ + + AutoMap> aItemMap = new AutoMap>(); + AutoMap aItemOutputs = new AutoMap(aOutputs); + + for (final GT_MetaTileEntity_Hatch_Steam_BusOutput tBus : this.mSteamOutputs) { + if (!isValidMetaTileEntity(tBus)) { + continue; + } + final IInventory tBusInv = tBus.getBaseMetaTileEntity(); + for (int i = 0; i < tBusInv.getSizeInventory(); i++) { + if (tBus.getStackInSlot(i) == null) { + aInputBusSlotsFree++; + } + else { + ItemStack aT = tBus.getStackInSlot(i); + int aSize = aT.stackSize; + aT = aT.copy(); + aT.stackSize = 0; + aItemMap.put(new FlexiblePair(aT, aSize)); + } + } + } + + // Count the slots we need, later we can check if any are able to merge with existing stacks + int aRecipeSlotsRequired = 0; + + // A map to hold the items we will be 'inputting' into the output buses. These itemstacks are actually the recipe outputs. + ConcurrentSet> aInputMap = new ConcurrentHashSet>(); + + // Iterate over the outputs, calculating require stack spacing they will require. + for (int i=0;i 64) { + int aSlotsNeedsForThisStack = (int) Math.ceil((double) ((float) aStackSize / 64f)); + // Should round up and add as many stacks as required nicely. + aRecipeSlotsRequired += aSlotsNeedsForThisStack; + for (int o=0;o 64 ? 64 : aStackSize; + aY = aY.copy(); + aY.stackSize = 0; + aInputMap.add(new FlexiblePair(aY, aStackToRemove)); + } + } + else { + // Only requires one slot + aRecipeSlotsRequired++; + aY = aY.copy(); + aY.stackSize = 0; + aInputMap.add(new FlexiblePair(aY, aStackSize)); + } + } + } + + // We have items to add to the output buses. See if any are not full stacks and see if we can make them full. + if (aInputMap.size() > 0) { + // Iterate over the current stored items in the Output busses, if any match and are not full, we can try account for merging. + busItems: for (FlexiblePair y : aItemMap) { + // Iterate over the 'inputs', we can safely remove these as we go. + outputItems: for (FlexiblePair u : aInputMap) { + // Create local vars for readability. + ItemStack aOutputBusStack = y.getKey(); + ItemStack aOutputStack = u.getKey(); + // Stacks match, including NBT. + if (GT_Utility.areStacksEqual(aOutputBusStack, aOutputStack, false)) { + // Stack Matches, but it's full, continue. + if (aOutputBusStack.stackSize >= 64) { + // This stack is full, no point checking it. + continue busItems; + } + else { + // We can merge these two stacks without any hassle. + if ((aOutputBusStack.stackSize + aOutputStack.stackSize) <= 64) { + // Update the stack size in the bus storage map. + y.setValue(aOutputBusStack.stackSize + aOutputStack.stackSize); + // Remove the 'input' stack from the recipe outputs, so we don't try count it again. + aInputMap.remove(u); + continue outputItems; + } + // Stack merging is too much, so we fill this stack, leave the remainder. + else { + int aRemainder = (aOutputBusStack.stackSize + aOutputStack.stackSize) - 64; + // Update the stack size in the bus storage map. + y.setValue(64); + // Create a new object to iterate over later, with the remainder data; + FlexiblePair t = new FlexiblePair(u.getKey(), aRemainder); + // Remove the 'input' stack from the recipe outputs, so we don't try count it again. + aInputMap.remove(u); + // Add the remainder stack. + aInputMap.add(t); + continue outputItems; + } + } + } + else { + continue outputItems; + } + } + } + } + + // We have stacks that did not merge, do we have space for them? + if (aInputMap.size() > 0) { + if (aInputMap.size() > aInputBusSlotsFree) { + aParallelRecipes = (int) Math.floor((double) aInputBusSlotsFree/aInputMap.size() * aParallelRecipes); + // We do not have enough free slots in total to accommodate the remaining managed stacks. + log(" Free: "+aInputBusSlotsFree+", Required: "+aInputMap.size()); + if(aParallelRecipes == 0) { + log("Failed to find enough space for all item outputs."); + return 0; + } + + } + } + + /* + * End Item Management + */ + + } + + + + + + /* ======================================== + * Fluid Management + * ======================================== + */ + + + + if (aDoesOutputFluids) { + log("We have Fluids to output."); + // How many slots are free across all the output buses? + int aFluidHatches = 0; + int aEmptyFluidHatches = 0; + int aFullFluidHatches = 0; + // Create Map for Fluid Output + ArrayList> aOutputHatches = new ArrayList>(); + for (final GT_MetaTileEntity_Hatch_Output tBus : this.mOutputHatches) { + if (!isValidMetaTileEntity(tBus)) { + continue; + } + aFluidHatches++; + // Map the Hatch with the space left for easy checking later. + if (tBus.getFluid() == null) { + aOutputHatches.add(new Triplet(tBus, null, tBus.getCapacity())); + } + else { + int aSpaceLeft = tBus.getCapacity() - tBus.getFluidAmount(); + aOutputHatches.add(new Triplet(tBus, tBus.getFluid(), aSpaceLeft)); + } + } + // Create a map of all the fluids we would like to output, we can iterate over this and see how many we can merge into existing hatch stacks. + ArrayList aOutputFluids = new ArrayList(); + // Ugly ass boxing + aOutputFluids.addAll(new AutoMap(aFluidOutputs)); + // Iterate the Hatches, updating their 'stored' data. + //for (Triplet aHatchData : aOutputHatches) { + for (int i = 0;i aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); + //aOutputHatches.add(aNewHatchData); + break; + } + // We can fill this hatch perfectly (rare case), may as well add it directly to the full list. + else if (aSpaceLeftInHatch == aFluidToPutIntoHatch) { + // Copy Old Stack + FluidStack aNewHatchStack = aHatchStack.copy(); + // Add in amount from output stack + aNewHatchStack.amount += aFluidToPutIntoHatch; + // Remove fluid from output list, merge success + aOutputFluids.remove(aOutputFluids.get(j)); + j--; + // Remove hatch from hatch list, data is now invalid. + aOutputHatches.remove(aOutputHatches.get(i)); + i--; + // Re-add hatch to hatch list, with new data. + Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); + aOutputHatches.add(aNewHatchData); + break; + } + // We have more space than we need to merge, so we remove the stack from the output list and update the hatch list. + else { + // Copy Old Stack + FluidStack aNewHatchStack = aHatchStack.copy(); + // Add in amount from output stack + aNewHatchStack.amount += aFluidToPutIntoHatch; + // Remove fluid from output list, merge success + aOutputFluids.remove(aOutputFluids.get(j)); + j--; + // Remove hatch from hatch list, data is now invalid. + aOutputHatches.remove(aOutputHatches.get(i)); + i--; + // Re-add hatch to hatch list, with new data. + Triplet aNewHatchData = new Triplet(aHatch, aNewHatchStack, aNewHatchStack.amount); + aOutputHatches.add(aNewHatchData); + // Check next fluid + continue; + } + + } + else { + continue; + } + } + } + } + + for (Triplet aFreeHatchCheck : aOutputHatches) { + // Free Hatch + if (aFreeHatchCheck.getValue_2() == null || aFreeHatchCheck.getValue_3() == 0 || aFreeHatchCheck.getValue_1().getFluid() == null) { + aEmptyFluidHatches++; + } + } + + // We have Fluid Stacks we did not merge. Do we have space? + log("fluids to output "+aOutputFluids.size()+" empty hatches "+aEmptyFluidHatches); + if (aOutputFluids.size() > 0) { + // Not enough space to add fluids. + if (aOutputFluids.size() > aEmptyFluidHatches) { + aParallelRecipes = (int) Math.floor((double) aEmptyFluidHatches/aOutputFluids.size() * aParallelRecipes); + log("Failed to find enough space for all fluid outputs. Free: "+aEmptyFluidHatches+", Required: "+aOutputFluids.size()); + return 0; + + } + } + + /* + * End Fluid Management + */ + } + + return aParallelRecipes; + } + + + /* + * Handle I/O with custom hatches + */ + + @Override + public boolean depleteInput(FluidStack aLiquid) { + if (aLiquid == null) return false; + for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + FluidStack tLiquid = tHatch.getFluid(); + if (tLiquid != null && tLiquid.isFluidEqual(aLiquid)) { + tLiquid = tHatch.drain(aLiquid.amount, false); + if (tLiquid != null && tLiquid.amount >= aLiquid.amount) { + tLiquid = tHatch.drain(aLiquid.amount, true); + return tLiquid != null && tLiquid.amount >= aLiquid.amount; + } + } + } + } + return false; + } + + @Override + public boolean depleteInput(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return false; + FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true); + if (aLiquid != null) return depleteInput(aLiquid); + for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { + tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); + return true; + } + } + } + } + for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : mSteamInputs) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { + tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); + return true; + } + } + } + } + } + return false; + } + + @Override + public ArrayList getStoredFluids() { + ArrayList rList = new ArrayList(); + for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { + rList.add(tHatch.getFillableStack()); + } + } + return rList; + } + + @Override + public ArrayList getStoredInputs() { + ArrayList rList = new ArrayList(); + for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : mSteamInputs) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) { + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + } + return rList; + } + + @Override + public boolean addOutput(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return false; + aStack = GT_Utility.copy(aStack); + boolean outputSuccess = true; + while (outputSuccess && aStack.stackSize > 0) { + outputSuccess = false; + ItemStack single = aStack.splitStack(1); + for (GT_MetaTileEntity_Hatch_Steam_BusOutput tHatch : mSteamOutputs) { + if (!outputSuccess && isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getSizeInventory() - 1; i >= 0 && !outputSuccess; i--) { + if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, single)) outputSuccess = true; + } + } + } + for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { + if (!outputSuccess && isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) { + if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, single)) outputSuccess = true; + } + } + } + return outputSuccess; + } + + @Override + public ArrayList getStoredOutputs() { + ArrayList rList = new ArrayList(); + for (GT_MetaTileEntity_Hatch_Steam_BusOutput tHatch : mSteamOutputs) { + if (isValidMetaTileEntity(tHatch)) { + for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + return rList; + } + + @Override + public void updateSlots() { + for (GT_MetaTileEntity_Hatch_Input tHatch : mSteamInputFluids) + if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots(); + for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : mSteamInputs) + if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots(); + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java new file mode 100644 index 0000000000..287d2105ac --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java @@ -0,0 +1,428 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.Collection; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; +import net.minecraftforge.fluids.FluidStack; + +public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_DeluxeTank { + + private boolean useFuel = false; + + public GregtechDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, 4, aDescription, aTextures); + } + + public GregtechDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, "Fuel Efficiency: " + this.getEfficiency() + "%"}; + } + + + /* @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + }*/ + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()){ + Logger.WARNING("Entity is Client side, simply returning true"); + return true; + } + Logger.WARNING("Entity is not Client side, opening entity Container and by extension, it's GUI, then returning true"); + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getFrontActive(final byte aColor) { + return this.getFront(aColor); + } + + public ITexture[] getBackActive(final byte aColor) { + return this.getBack(aColor); + } + + public ITexture[] getBottomActive(final byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(final byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(final byte aColor) { + return this.getSides(aColor); + } + + @Override + public boolean isFacingValid(final byte aSide) { + return aSide > 1; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex < 2; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return true; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public long maxEUOutput() { + return this.getBaseMetaTileEntity().isAllowedToWork() ? V[this.mTier] : 0; + } + + @Override + public long maxEUStore() { + return Math.max(this.getEUVar(), (V[this.mTier] * 115) + this.getMinimumStoredEU()); + } + + @Override + public boolean doesFillContainers() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + @Override + public boolean doesEmptyContainers() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + @Override + public boolean canTankBeFilled() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + @Override + public boolean canTankBeEmptied() { + return this.getBaseMetaTileEntity().isAllowedToWork(); + } + + @Override + public boolean displaysItemStack() { + return true; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public boolean isFluidInputAllowed(final FluidStack aFluid) { + return this.getFuelValue(aFluid) > 0; + } + + @Override + public long getMinimumStoredEU() { + return 512; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && ((aTick % 10) == 0)) { + if (this.mFluid == null) { + if (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + this.getMinimumStoredEU())) { + this.mInventory[this.getStackDisplaySlot()] = null; + } else { + if (this.mInventory[this.getStackDisplaySlot()] == null) { + this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); + } + this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); + } + } else { + if ((this.mFluid != null) && (this.mFluid2 != null)){ + final int tFuelValue = this.getFuelValue(this.mFluid), tConsumed = this.consumedFluidPerOperation(this.mFluid); + final int tFuelValue2 = this.getFuelValue(this.mFluid2), tConsumed2 = this.consumedFluidPerOperation(this.mFluid2); + if (((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount > tConsumed))/* && (tFuelValue2 > 0 && tConsumed2 > 0 && mFluid2.amount > tConsumed2)*/) { + + Logger.WARNING("tFuelValue: "+tFuelValue); + Logger.WARNING("tConsumed: "+tConsumed); + Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); + Logger.WARNING("mFluid.amount: "+this.mFluid.amount); + Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); + + Logger.WARNING("========================================================="); + + Logger.WARNING("tFuelValue2: "+tFuelValue2); + Logger.WARNING("tConsumed2: "+tConsumed2); + Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); + Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount); + Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); + long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); + long tFluidAmountToUse2 = Math.min(this.mFluid2.amount / tConsumed2, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2); + + if (tFluidAmountToUse <= 0){ + /*if ((mFluid.amount / tConsumed) == getCapacity()){ + tFluidAmountToUse = 1; + }*/ + + if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){ + tFluidAmountToUse = 1; + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse - Updated: "+tFluidAmountToUse); + Logger.WARNING("========================================================="); + } + } + + if (tFluidAmountToUse2 <= 0){ + /*if ((mFluid2.amount / tConsumed) == getCapacity()){ + tFluidAmountToUse2 = 1; + }*/ + if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){ + tFluidAmountToUse2 = 1; + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse2 - Updated: "+tFluidAmountToUse2); + Logger.WARNING("========================================================="); + } + } + + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse: "+tFluidAmountToUse); + Logger.WARNING("========================================================="); + + /*Utils.LOG_WARNING("mFluid.amount / tConsumed: "+("fluidAmount:"+mFluid.amount)+(" tConsumed:"+tConsumed)+" | "+(mFluid.amount / tConsumed)); + Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU())); + Utils.LOG_WARNING("maxEUOutput(): "+maxEUOutput()); + Utils.LOG_WARNING("maxEUOutput() * 20: "+(maxEUOutput() * 30)); + Utils.LOG_WARNING("getMinimumStoredEU(): "+(getMinimumStoredEU())); + Utils.LOG_WARNING("aBaseMetaTileEntity.getUniversalEnergyStored(): "+(aBaseMetaTileEntity.getUniversalEnergyStored())); + Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()))); + Utils.LOG_WARNING("tFuelValue: "+(tFuelValue)); + Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue)); + */ + + Logger.WARNING("========================================================="); + Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); + Logger.WARNING("========================================================="); + + /*Utils.LOG_WARNING("mFluid2.amount / tConsumed2: "+("fluidAmount2:"+mFluid2.amount)+(" tConsumed2:"+tConsumed2)+" | "+(mFluid2.amount / tConsumed2)); + Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU())); + Utils.LOG_WARNING("maxEUOutput(): "+maxEUOutput()); + Utils.LOG_WARNING("maxEUOutput() * 20: "+(maxEUOutput() * 30)); + Utils.LOG_WARNING("getMinimumStoredEU(): "+(getMinimumStoredEU())); + Utils.LOG_WARNING("aBaseMetaTileEntity.getUniversalEnergyStored(): "+(aBaseMetaTileEntity.getUniversalEnergyStored())); + Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()))); + Utils.LOG_WARNING("tFuelValue2: "+(tFuelValue2)); + Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2)); + */ + if (((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) && ((tFluidAmountToUse2 > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse2 * tFuelValue2, true))){ + + Logger.WARNING("tFuelValue: "+tFuelValue); + Logger.WARNING("tConsumed: "+tConsumed); + Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName()); + Logger.WARNING("mFluid.amount: "+this.mFluid.amount); + Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed)); + + Logger.WARNING("========================================================="); + + Logger.WARNING("tFuelValue2: "+tFuelValue2); + Logger.WARNING("tConsumed2: "+tConsumed2); + Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName()); + Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount); + Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2)); + + if (this.useFuel){ + this.mFluid.amount -= tFluidAmountToUse * tConsumed; + this.mFluid2.amount -= tFluidAmountToUse2 * tConsumed2; + this.useFuel = false; + } + else { + this.useFuel = true; + } + + } + else { + Logger.WARNING("========================================================="); + Logger.WARNING("Either tFluidAmountToUse1 <= 0, power cannot be increased of tFluidAmountToUse2 <= 0"); + Logger.WARNING("tFluidAmountToUse1: "+tFluidAmountToUse); + Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2); + } + } + else { + /*Utils.LOG_WARNING("(tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) && (tFuelValue2 > 0 && tConsumed2 > 0 && mFluid2.amount > tConsumed2)"); + Utils.LOG_WARNING("tFuelValue: "+tFuelValue); + Utils.LOG_WARNING("tConsumed: "+tConsumed); + Utils.LOG_WARNING("mFluid.amount: "+mFluid.amount); + Utils.LOG_WARNING("mFluid.amount > tConsumed: "+(mFluid.amount > tConsumed)); + + Utils.LOG_WARNING("========================================================="); + + Utils.LOG_WARNING("tFuelValue2: "+tFuelValue2); + Utils.LOG_WARNING("tConsumed2: "+tConsumed2); + Utils.LOG_WARNING("mFluid2.amount: "+mFluid2.amount); + Utils.LOG_WARNING("mFluid2.amount > tConsumed2: "+(mFluid2.amount > tConsumed2)); */ + } + } + else { + Logger.WARNING("One mFluid is null"); + if (this.mFluid != null) { + Logger.WARNING("mFluid1 is not null"); + } + if (this.mFluid2 != null) { + Logger.WARNING("mFluid2 is not null"); + } + } + } + if ((this.mInventory[this.getInputSlot()] != null) && (aBaseMetaTileEntity.getUniversalEnergyStored() < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())) && (GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null)) { + final int tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); + if (tFuelValue > 0) { + final ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + } + } + } + } + + if (aBaseMetaTileEntity.isServerSide()) { + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); + } + } + + public abstract GT_Recipe_Map getRecipes(); + + public abstract int getEfficiency(); + + public int consumedFluidPerOperation(final FluidStack aLiquid) { + return 1; + } + + public int getFuelValue(final FluidStack aLiquid) { + if ((aLiquid == null) || (this.getRecipes() == null)) { + return 0; + } + FluidStack tLiquid; + final Collection tRecipeList = this.getRecipes().mRecipeList; + if (tRecipeList != null) { + for (final GT_Recipe tFuel : tRecipeList) { + if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null) { + if (aLiquid.isFluidEqual(tLiquid)) { + return (int) (((long) tFuel.mSpecialValue * this.getEfficiency() * this.consumedFluidPerOperation(tLiquid)) / 100); + } + } + } + } + return 0; + } + + public int getFuelValue(final ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { + return 0; + } + final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + if (tFuel != null) { + return (int) ((tFuel.mSpecialValue * 1000L * this.getEfficiency()) / 100); + } + return 0; + } + + public ItemStack getEmptyContainer(final ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { + return null; + } + final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + if (tFuel != null) { + return GT_Utility.copy(tFuel.getOutput(0)); + } + return GT_Utility.getContainerItem(aStack, true); + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && ((this.getFuelValue(aStack) > 0) || (this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0)); + } + + @Override + public int getCapacity() { + return 32000; + } + + @Override + public int getTankPressure() { + return -100; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java new file mode 100644 index 0000000000..99ad81a4a9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java @@ -0,0 +1,382 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank +{ + public int mTemperature = 20; + public int mProcessingEnergy = 0; + public int mLossTimer = 0; + public FluidStack mSteam = null; + public boolean mHadNoWater = false; + public long RI = MathUtils.randLong(5L, 30L); + + public GregtechMetaBoilerBase(final int aID, final String aName, final String aNameRegional, final String aDescription, final ITexture... aTextures) + { + super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); + } + + public GregtechMetaBoilerBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) + { + super(aName, aTier, 4, aDescription, aTextures); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) + { + ITexture[] tmp = this.mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte)(aActive ? 4 : 3)) : aSide][aColorIndex + 1]; + //mTextures[(aSide==aFacing?(aActive?4:3):aSide==GT_Utility.getOppositeSide(aFacing)?2:aSide==0?0:aSide==1?1:2)][aColorIndex+1]; + if((aSide!=aFacing)&&(tmp.length==2)){ + tmp = new ITexture[]{tmp[0]}; + } + return tmp; + } + + @Override + public boolean isElectric() + { + return false; + } + + @Override + public boolean isPneumatic() + { + return false; + } + + @Override + public boolean isSteampowered() + { + return false; + } + + @Override + public boolean isSimpleMachine() + { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) + { + return aFacing > 1; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) + { + return true; + } + + @Override + public boolean isValidSlot(final int aIndex) + { + return true; + } + + @Override + public int getProgresstime() + { + return this.mTemperature; + } + + @Override + public int maxProgresstime() + { + return 500; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) + { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + if (aPlayer != null) { + if (GT_Utility.areStacksEqual(aPlayer.getCurrentEquippedItem(), new ItemStack(Items.water_bucket, 1))) + { + this.fill(Materials.Water.getFluid(1000 * aPlayer.getCurrentEquippedItem().stackSize), true); + aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket); + } + else + { + aBaseMetaTileEntity.openGUI(aPlayer); + } + } + return true; + } + + @Override + public boolean doesFillContainers() + { + return true; + } + + @Override + public boolean doesEmptyContainers() + { + return true; + } + + @Override + public boolean canTankBeFilled() + { + return true; + } + + @Override + public boolean canTankBeEmptied() + { + return true; + } + + @Override + public boolean displaysItemStack() + { + return false; + } + + @Override + public boolean displaysStackSize() + { + return false; + } + + @Override + public boolean isFluidInputAllowed(final FluidStack aFluid) + { + return GT_ModHandler.isWater(aFluid); + } + + @Override + public FluidStack getDrainableStack() + { + return this.mSteam; + } + + @Override + public FluidStack setDrainableStack(final FluidStack aFluid) + { + this.mSteam = aFluid; + return this.mSteam; + } + + @Override + public boolean isDrainableStackSeparate() { + return true; + } + + @Override + public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCover) + { + return GregTech_API.getCoverBehavior(aCover.toStack()).isSimpleCover(); + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) + { + super.saveNBTData(aNBT); + aNBT.setInteger("mLossTimer", this.mLossTimer); + aNBT.setInteger("mTemperature", this.mTemperature); + aNBT.setInteger("mProcessingEnergy", this.mProcessingEnergy); + if (this.mSteam != null) { + try + { + aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound())); + } + catch (final Throwable e) {} + } + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) + { + super.loadNBTData(aNBT); + this.mLossTimer = aNBT.getInteger("mLossTimer"); + this.mTemperature = aNBT.getInteger("mTemperature"); + this.mProcessingEnergy = aNBT.getInteger("mProcessingEnergy"); + this.mSteam = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mSteam")); + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) + { + if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) + { + if (this.mTemperature <= 20) + { + this.mTemperature = 20; + this.mLossTimer = 0; + } + if (++this.mLossTimer > 40) + { + this.mTemperature -= 1; + this.mLossTimer = 0; + } + for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) { + if (i != aBaseMetaTileEntity.getFrontFacing()) + { + final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); + if (tTileEntity != null) + { + final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); + if (tDrained != null) + { + final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); + if (tFilledAmount > 0) { + tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); + } + } + } + } + } + if ((aTick % 10L) == 0L) { + if (this.mTemperature > 100) + { + if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) + { + this.mHadNoWater = true; + } + else + { + if (this.mHadNoWater) + { + aBaseMetaTileEntity.doExplosion(2048L); + return; + } + this.mFluid.amount -= 1; + if (this.mSteam == null) { + this.mSteam = GT_ModHandler.getSteam(150L); + } else if (GT_ModHandler.isSteam(this.mSteam)) { + this.mSteam.amount += 150; + } else { + this.mSteam = GT_ModHandler.getSteam(150L); + } + } + } + else { + this.mHadNoWater = false; + } + } + if ((this.mSteam != null) && + (this.mSteam.amount > getSteamCapacity())) + { + this.sendSound((byte)1); + this.mSteam.amount = getSteamCapacity() * 3 / 4; + } + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && + (this.mInventory[2] != null)) { + if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal)))) + { + this.mProcessingEnergy += 160; + aBaseMetaTileEntity.decrStackSize(2, 1); + if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + } + } + else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) + { + this.mProcessingEnergy += 160; + aBaseMetaTileEntity.decrStackSize(2, 1); + if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); + } + } + else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke")) + { + this.mProcessingEnergy += 640; + aBaseMetaTileEntity.decrStackSize(2, 1); + if (aBaseMetaTileEntity.getRandomNumber(2) == 0) { + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); + } + } + else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) + { + this.mProcessingEnergy += 40; + aBaseMetaTileEntity.decrStackSize(2, 1); + if (aBaseMetaTileEntity.getRandomNumber(8) == 0) { + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + } + } + } + if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) + { + this.mProcessingEnergy -= 2; + this.mTemperature += 1; + } + aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } + } + + @Override + // Since this type of machine can have different water and steam capacities, we need to override getTankInfo() to + // support returning those different capacities. + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + return new FluidTankInfo[]{ + new FluidTankInfo(this.mFluid, getCapacity()), + new FluidTankInfo(this.mSteam, getSteamCapacity()) + }; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) + { + return (aIndex == 1) || (aIndex == 3); + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) + { + return aIndex == 2; + } + + @Override + public void doSound(final byte aIndex, final double aX, final double aY, final double aZ) + { + if (aIndex == 1) + { + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(4)), 2, 1.0F, aX, aY, aZ); + for (int l = 0; l < 8; l++) { + this.getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", (aX - 0.5D) + Math.random(), aY, (aZ - 0.5D) + Math.random(), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public int getCapacity() + { + return 16000; + } + + // This type of machine can have different water and steam capacities. + public int getSteamCapacity() + { + return 32000; + } + + @Override + public int getTankPressure() + { + return 100; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java new file mode 100644 index 0000000000..e692530963 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java @@ -0,0 +1,215 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; + +import static gregtech.api.enums.GT_Values.V; + +import net.minecraft.entity.player.EntityPlayer; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.util.GT_Utility; + +public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_BasicTank { + + public int mEfficiency; + public int mProcessingEnergy = 0; + public int mSolarCharge = 20; + public int mLossTimer = 0; + public static int sEnergyPerTick = 16; + + public GregtechMetaSolarGenerator(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); + } + + public GregtechMetaSolarGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, "Efficiency: " + this.getEfficiency() + "%"}; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getFrontActive(final byte aColor) { + return this.getFront(aColor); + } + + public ITexture[] getBackActive(final byte aColor) { + return this.getBack(aColor); + } + + public ITexture[] getBottomActive(final byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(final byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(final byte aColor) { + return this.getSides(aColor); + } + + @Override + public boolean isFacingValid(final byte aSide) { + return aSide > 1; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex < 2; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return true; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public long maxEUOutput() { + return this.getBaseMetaTileEntity().isAllowedToWork() ? V[this.mTier] : 0; + } + + @Override + public long maxEUStore() { + return Math.max(this.getEUVar(), (V[this.mTier] * 40) + this.getMinimumStoredEU()); + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick > 20L) + && (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) { + + if (this.mSolarCharge <= 20) { + this.mSolarCharge = 20; + this.mLossTimer = 0; + } + if (++this.mLossTimer > 45) { + this.mSolarCharge -= 1; + this.mLossTimer = 0; + } + + if ((aTick % 25L) == 0L) { + if (this.mSolarCharge > 100) { + if ((this.mProcessingEnergy > 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering() && (aBaseMetaTileEntity.getUniversalEnergyStored() < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())))) { + this.getBaseMetaTileEntity().increaseStoredEnergyUnits((sEnergyPerTick * this.getEfficiency()) / 10, false); + } + } + } + + if ((this.mSolarCharge < 500) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) { + this.mProcessingEnergy -= 1; + this.mSolarCharge += 1; + } + + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { + final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); + this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; + } + + if (aBaseMetaTileEntity.isServerSide()){ + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); + } + } + } + + public abstract int getEfficiency(); + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return false; + } + + @Override + public boolean canTankBeEmptied() { + return false; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean displaysStackSize() { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java new file mode 100644 index 0000000000..f9105dceb1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java @@ -0,0 +1,372 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.Collection; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_BasicTank { + + private boolean useFuel = false; + protected int pollMin, pollMax; + + public GregtechRocketFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); + int pollMin = (int)(CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + int pollMax = (int)(CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + } + + public GregtechRocketFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + int pollMin = (int)(CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + int pollMax = (int)(CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + @Override + public String[] getDescription() { + String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second"; + return new String[]{ + this.mDescription, + "Fuel Efficiency: " + this.getEfficiency() + "%", + aPollution, + CORE.GT_Tooltip}; + } + + + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1]}; + } + + public ITexture[] getFrontActive(final byte aColor) { + return this.getFront(aColor); + } + + public ITexture[] getBackActive(final byte aColor) { + return this.getBack(aColor); + } + + public ITexture[] getBottomActive(final byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(final byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(final byte aColor) { + return this.getSides(aColor); + } + + @Override + public boolean isFacingValid(final byte aSide) { + return aSide > 1; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex < 2; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return this.getBaseMetaTileEntity().getFrontFacing() == aSide; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public long maxEUOutput() { + return V[this.mTier]; + } + + @Override + public long maxEUStore() { + return Math.max(this.getEUVar(), (V[this.mTier] * 500) + this.getMinimumStoredEU()); + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return true; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return false; + } + + @Override + public boolean displaysItemStack() { + return true; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public boolean isFluidInputAllowed(final FluidStack aFluid) { + return this.getFuelValue(aFluid) > 0; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + + + //super.onPostTick(aBaseMetaTileEntity, aTick); + + /*if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) { + int tFuelValue; + if (this.mFluid == null) { + if (aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() + this.getMinimumStoredEU()) { + this.mInventory[this.getStackDisplaySlot()] = null; + } else { + if (this.mInventory[this.getStackDisplaySlot()] == null) { + this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); + } + + this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " + + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); + } + } else { + tFuelValue = this.getFuelValue(this.mFluid); + int tConsumed = this.consumedFluidPerOperation(this.mFluid); + if (tFuelValue > 0 && tConsumed > 0 && this.mFluid.amount > tConsumed) { + long tFluidAmountToUse = Math.min((long) (this.mFluid.amount / tConsumed), + (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); + if (tFluidAmountToUse > 0L && aBaseMetaTileEntity + .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); + this.mFluid.amount = (int) ((long) this.mFluid.amount - tFluidAmountToUse * (long) tConsumed); + } + } + } + + if (this.mInventory[this.getInputSlot()] != null + && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L + + this.getMinimumStoredEU() + && GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null) { + tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); + if (tFuelValue > 0) { + ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollution()); + } + } + } + } + + if (aBaseMetaTileEntity.isServerSide()) { + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity + .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU()); + }*/ + + + + + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && ((aTick % 10) == 0)) { + if (this.mFluid == null) { + if (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + this.getMinimumStoredEU())) { + this.mInventory[this.getStackDisplaySlot()] = null; + } else { + if (this.mInventory[this.getStackDisplaySlot()] == null) { + this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); + } + this.mInventory[this.getStackDisplaySlot()].setStackDisplayName("Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + " EU"); + } + } else { + final int tFuelValue = this.getFuelValue(this.mFluid), tConsumed = this.consumedFluidPerOperation(this.mFluid); + if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount >= tConsumed)) { + final long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 20) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); + if ((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)){ + int aSafeFloor = (int) Math.max(((tFluidAmountToUse * tConsumed)/3), 1); + this.mFluid.amount -= (int) aSafeFloor; + PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution()); + } + } + } + if ((this.mInventory[this.getInputSlot()] != null) && (aBaseMetaTileEntity.getUniversalEnergyStored() < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())) && (GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null)) { + final int tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); + if (tFuelValue > 0) { + final ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); + if (aBaseMetaTileEntity.addStackToSlot(this.getOutputSlot(), tEmptyContainer)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); + aBaseMetaTileEntity.decrStackSize(this.getInputSlot(), 1); + PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution()); + } + } + } + } + + if (aBaseMetaTileEntity.isServerSide()) { + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); + } + } + + public int getPollution() { + return MathUtils.randInt(pollMin, pollMax); + } + + public abstract GT_Recipe_Map getRecipes(); + + public abstract int getEfficiency(); + + public int consumedFluidPerOperation(final FluidStack aLiquid) { + return 1; + } + + public int getFuelValue(final FluidStack aLiquid) { + if ((aLiquid == null) || (this.getRecipes() == null)) { + return 0; + } + FluidStack tLiquid; + final Collection tRecipeList = this.getRecipes().mRecipeList; + if (tRecipeList != null) { + //Logger.INFO("Step A"); + for (final GT_Recipe tFuel : tRecipeList) { + //Logger.INFO("Step B"); + if ((tLiquid = tFuel.mFluidInputs[0]) != null) { + //Logger.INFO("Step C"); + if (aLiquid.isFluidEqual(tLiquid)) { + //Logger.INFO("Found some fuel?"); + int aperOp = this.consumedFluidPerOperation(tLiquid); + int aConsume = (int) (((long) tFuel.mSpecialValue * this.getEfficiency() * aperOp) / 100); + //Logger.INFO("Fuel Value: "+tFuel.mSpecialValue); + //Logger.INFO("Efficiency: "+getEfficiency()); + //Logger.INFO("Consumed per op: "+aperOp); + //Logger.INFO("Consuming "+aConsume); + return aConsume; + } + } + } + } + //Logger.INFO("No Fuel Value | Valid? "+(aLiquid != null)); + return 0; + } + + public int getFuelValue(final ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { + return 0; + } + final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + if (tFuel != null) { + return (int) ((tFuel.mSpecialValue * 1000L * this.getEfficiency()) / 100); + } + return 0; + } + + public ItemStack getEmptyContainer(final ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack) || (this.getRecipes() == null)) { + return null; + } + final GT_Recipe tFuel = this.getRecipes().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + if (tFuel != null) { + return GT_Utility.copy(tFuel.getOutput(0)); + } + return GT_Utility.getContainerItem(aStack, true); + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && ((this.getFuelValue(aStack) > 0) || (this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0)); + } + + @Override + public int getCapacity() { + return 32000; + } + + @Override + public int getTankPressure() { + return -100; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java new file mode 100644 index 0000000000..34b3e86c70 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java @@ -0,0 +1,291 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.player.PlayerCache; + +public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_TieredMachineBlock { + public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bUnbreakable = false; + public int mSuccess = 0, mTargetStackSize = 0; + public UUID ownerUUID; + //UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); + private boolean value_last = false, value_current = false; + + public GregtechMetaSafeBlockBase(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + } + + public GregtechMetaSafeBlockBase(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[6][17][]; + final ITexture tIcon = this.getOverlayIcon(), tOut = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_QCHEST), tUp = new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT); + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tUp, tIcon}; //Back + rTextures[1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Right, Strangely The top side as well when facing East? + rTextures[2][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Top And Bottom, When Facing South (What the hell?) + rTextures[3][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Left, Top if facing West and Bottom if facing east? + rTextures[4][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tIcon}; // Top and Bottom when Facing North.. + rTextures[5][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], tOut}; // Front + } + return rTextures; + + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return this.mTextures[5][aColorIndex + 1]; + } + if (GT_Utility.getOppositeSide(aSide) == aFacing) { + return this.mTextures[0][aColorIndex + 1]; + } + switch (aFacing) { + case 0: + return this.mTextures[4][aColorIndex + 1]; + case 1: + return this.mTextures[2][aColorIndex + 1]; + case 2: + switch (aSide) { + case 0: + return this.mTextures[2][aColorIndex + 1]; + case 1: + return this.mTextures[2][aColorIndex + 1]; + case 4: + return this.mTextures[1][aColorIndex + 1]; + case 5: + return this.mTextures[3][aColorIndex + 1]; + } + case 3: + switch (aSide) { + case 0: + return this.mTextures[4][aColorIndex + 1]; + case 1: + return this.mTextures[4][aColorIndex + 1]; + case 4: + return this.mTextures[3][aColorIndex + 1]; + case 5: + return this.mTextures[1][aColorIndex + 1]; + } + case 4: + switch (aSide) { + case 0: + return this.mTextures[3][aColorIndex + 1]; + case 1: + return this.mTextures[1][aColorIndex + 1]; + case 2: + return this.mTextures[3][aColorIndex + 1]; + case 3: + return this.mTextures[1][aColorIndex + 1]; + } + case 5: + switch (aSide) { + case 0: + return this.mTextures[1][aColorIndex + 1]; + case 1: + return this.mTextures[3][aColorIndex + 1]; + case 2: + return this.mTextures[1][aColorIndex + 1]; + case 3: + return this.mTextures[3][aColorIndex + 1]; + } + } + return this.mTextures[5][aColorIndex + 1]; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex < (this.mInventory.length - 1); + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isInputFacing(final byte aSide) { + return !this.isOutputFacing(aSide); + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return this.getBaseMetaTileEntity().getBackFacing() == aSide; + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public long getMinimumStoredEU() { + return 512; + } + + @Override + public long maxEUStore() { + return 512 + (V[this.mTier] * 50); + } + + @Override + public long maxEUInput() { + return V[this.mTier]; + } + + @Override + public long maxEUOutput() { + return this.bOutput ? V[this.mTier] : 0; + } + + @Override + public long maxAmperesIn() { + return 1; + } + + @Override + public long maxAmperesOut() { + return 1; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + public abstract ITexture getOverlayIcon(); + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + + if (aBaseMetaTileEntity.isClientSide()) { + //Utils.LOG_WARNING("Clicky Clicky."); + return true; + + } + if (aPlayer != null) { + final UUID tempUUID = aPlayer.getUniqueID(); + /*if (!aPlayer.worldObj.isRemote){ + //PlayerCache.appendParamChanges(aPlayer.getDisplayName(), aPlayer.getUniqueID().toString()); + }*/ + //Utils.LOG_INFO("test"); + if (this.ownerUUID == null){ + Logger.INFO("No owner yet for this block."); + } + else { + //Utils.LOG_INFO("test"); + Logger.INFO("Current Owner: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)+" - UUID: "+this.ownerUUID); + } + Logger.WARNING("Is ownerUUID Null"); + if (this.ownerUUID == null){ + Logger.WARNING("OwnerUUID is Null, let's set it."); + Logger.WARNING("Accessing Players UUID is: "+tempUUID); + this.ownerUUID = tempUUID; + //Utils.messagePlayer(aPlayer, "Owner of this safe, now set. Try accessing it again."); + Logger.WARNING("Block Owner is now set to: "+this.ownerUUID); + } + Logger.WARNING("No, it is not."); + Logger.WARNING("Checking ownerUUID."); + if (this.ownerUUID != null){ + Logger.WARNING("ownerUUID != Null, if accessor == owner."); + Logger.WARNING("Accessing is: "+PlayerCache.lookupPlayerByUUID(tempUUID)); + if (this.ownerUUID.equals(tempUUID)){ + Logger.WARNING("Owner's UUID: "+this.ownerUUID); + aBaseMetaTileEntity.openGUI(aPlayer); + //Utils.LOG_WARNING("GUI should now be open for you sir."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Access Denied, This does not belong to you."); + PlayerUtils.messagePlayer(aPlayer, "it is owned by: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); + Logger.WARNING("Expecting Player : "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)); + Logger.ERROR("Access Denied."); + return true; + } + + } + + /*else { + Utils.LOG_ERROR("This is NOT good. Tell Draknyte1 your safe broke."); + }*/ + /*Utils.LOG_WARNING("Clicky Clicky."); + Utils.messagePlayer(aPlayer, "Owner of this safe, now set."); + aBaseMetaTileEntity.openGUI(aPlayer); */ + + } + return true; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setBoolean("bUnbreakable", this.bUnbreakable); + aNBT.setBoolean("bOutput", this.bOutput); + aNBT.setBoolean("bRedstoneIfFull", this.bRedstoneIfFull); + aNBT.setInteger("mTargetStackSize", this.mTargetStackSize); + if (this.ownerUUID != null) { + aNBT.setString("ownerUUID", this.ownerUUID.toString()); + } + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.bUnbreakable = aNBT.getBoolean("bUnbreakable"); + this.bOutput = aNBT.getBoolean("bOutput"); + this.bRedstoneIfFull = aNBT.getBoolean("bRedstoneIfFull"); + this.mTargetStackSize = aNBT.getInteger("mTargetStackSize"); + if (aNBT.hasKey("ownerUUID")) { + this.ownerUUID = UUID.fromString(aNBT.getString("ownerUUID")); + } + } + + @Override + public void setItemNBT(final NBTTagCompound aNBT) { + super.setItemNBT(aNBT); + if (this.mTargetStackSize > 0) { + aNBT.setInteger("mTargetStackSize", this.mTargetStackSize); + } + } + + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return aSide != aBaseMetaTileEntity.getBackFacing(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java new file mode 100644 index 0000000000..df838f012a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java @@ -0,0 +1,176 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public abstract class GregtechMetaTreeFarmerBase extends GT_MetaTileEntity_TieredMachineBlock { + public boolean bOutput = false, bRedstoneIfFull = false, bInvert = false, bUnbreakable = false; + public int mSuccess = 0, mTargetStackSize = 0; + + public GregtechMetaTreeFarmerBase(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + } + + public GregtechMetaTreeFarmerBase(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return true; + } + + @Override + public boolean isEnetInput() { + return false; + } + + @Override + public boolean isEnetOutput() { + return false; + } + + @Override + public boolean isInputFacing(final byte aSide) { + return !this.isOutputFacing(aSide); + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return this.getBaseMetaTileEntity().getBackFacing() == aSide; + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public long maxEUStore() { + return 0; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return false; + } + + public abstract ITexture getOverlayIcon(); + + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log)}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Podzol)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)}; + } + + public ITexture[] getFrontActive(final byte aColor) { + return this.getFront(aColor); + } + + public ITexture[] getBackActive(final byte aColor) { + return this.getBack(aColor); + } + + public ITexture[] getBottomActive(final byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(final byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(final byte aColor) { + return this.getSides(aColor); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java new file mode 100644 index 0000000000..5e0918059d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java @@ -0,0 +1,71 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Hatch_Catalysts extends GT_MetaTileEntity_Hatch_NbtConsumable { + + public GT_MetaTileEntity_Hatch_Catalysts(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, 0, 16, "Dedicated Catalyst Storage", false); + } + + public GT_MetaTileEntity_Hatch_Catalysts(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, 0, 16, aDescription, false, aTextures); + } + + public GT_MetaTileEntity_Hatch_Catalysts(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, 0, 16, aDescription[0], false, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst)}; + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip}; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public Class getHatchEntityClass() { + return GT_MetaTileEntity_Hatch_Catalysts.class; + } + + @Override + public String getNameGUI() { + return "Catalyst Container"; + } + + @Override + public AutoMap getItemsValidForUsageSlots() { + return new AutoMap(); + } + + @Override + public boolean isItemValidForUsageSlot(ItemStack aStack) { + return ItemUtils.isCatalyst(aStack); + } + + @Override + public int getInputSlotCount() { + return 16; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java new file mode 100644 index 0000000000..7514855a2c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java @@ -0,0 +1,71 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Hatch_MillingBalls extends GT_MetaTileEntity_Hatch_NbtConsumable { + + public GT_MetaTileEntity_Hatch_MillingBalls(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, 6, 4, "Dedicated Milling Ball Storage", true); + } + + public GT_MetaTileEntity_Hatch_MillingBalls(String aName, String aDescription, ITexture[][][] aTextures) { + super(aName, 6, 4, aDescription, true, aTextures); + } + + public GT_MetaTileEntity_Hatch_MillingBalls(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, 6, 4, aDescription[0], true, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls)}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls)}; + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip}; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public Class getHatchEntityClass() { + return GT_MetaTileEntity_Hatch_MillingBalls.class; + } + + @Override + public String getNameGUI() { + return "Ball Housing"; + } + + @Override + public AutoMap getItemsValidForUsageSlots() { + return new AutoMap(); + } + + @Override + public boolean isItemValidForUsageSlot(ItemStack aStack) { + return ItemUtils.isMillingBall(aStack); + } + + @Override + public int getInputSlotCount() { + return 4; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java new file mode 100644 index 0000000000..56dff1b1e3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java @@ -0,0 +1,273 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers; + +import java.lang.reflect.Constructor; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_HatchNbtConsumable; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_HatchNbtConsumable; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileEntity_Hatch { + + public GT_Recipe_Map mRecipeMap = null; + private final int mInputslotCount; + private final int mTotalSlotCount; + private final boolean mAllowDuplicateUsageTypes; + + public GT_MetaTileEntity_Hatch_NbtConsumable(int aID, String aName, String aNameRegional, int aTier, int aInputSlots, String aDescription, boolean aAllowDuplicateTypes) { + super(aID, aName, aNameRegional, aTier, aInputSlots*2, aDescription); + mInputslotCount = getInputSlotCount(); + mTotalSlotCount = getInputSlotCount()*2; + mAllowDuplicateUsageTypes = aAllowDuplicateTypes; + } + + public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String aDescription, boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { + super(aName, aTier, aInputSlots*2, aDescription, aTextures); + mInputslotCount = getInputSlotCount(); + mTotalSlotCount = getInputSlotCount()*2; + mAllowDuplicateUsageTypes = aAllowDuplicateTypes; + } + + public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String[] aDescription, boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { + super(aName, aTier, aInputSlots*2, aDescription, aTextures); + mInputslotCount = getInputSlotCount(); + mTotalSlotCount = getInputSlotCount()*2; + mAllowDuplicateUsageTypes = aAllowDuplicateTypes; + } + + @Override + public abstract ITexture[] getTexturesActive(ITexture aBaseTexture); + + @Override + public abstract ITexture[] getTexturesInactive(ITexture aBaseTexture); + + public abstract int getInputSlotCount(); + + @Override + public final boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public final boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public final boolean isValidSlot(int aIndex) { + return aIndex < mInputslotCount; + } + + @Override + public final MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + Constructor aConstructor = ReflectionUtils.getConstructor(getHatchEntityClass(), new Class[] {String.class, String[].class, ITexture[][][].class}); + GT_MetaTileEntity_Hatch_NbtConsumable aInstance = ReflectionUtils.createNewInstanceFromConstructor(aConstructor, new Object[] {mName, StaticFields59.getDescriptionArray(this), mTextures}); + if (aInstance instanceof GT_MetaTileEntity_Hatch_NbtConsumable) { + GT_MetaTileEntity_Hatch_NbtConsumable aMetaTile = (GT_MetaTileEntity_Hatch_NbtConsumable) aInstance; + return aMetaTile; + } + return null; + } + + public abstract Class getHatchEntityClass(); + + @Override + public final boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public final Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_HatchNbtConsumable(aPlayerInventory, aBaseMetaTileEntity, mInputslotCount); + } + + @Override + public final Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + CONTAINER_HatchNbtConsumable aContainer = new CONTAINER_HatchNbtConsumable(aPlayerInventory, aBaseMetaTileEntity, mInputslotCount); + return new GUI_HatchNbtConsumable(aContainer, getNameGUI()); + } + + public abstract String getNameGUI(); + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.hasInventoryBeenModified()) { + fillStacksIntoFirstSlots(); + tryFillUsageSlots(); + } + } + + public final void updateSlots() { + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] != null && mInventory[i].stackSize <= 0) { + mInventory[i] = null; + } + // Only moves items in the first four slots + if (i <= getSlotID_LastInput()) { + fillStacksIntoFirstSlots(); + } + } + } + + // Only moves items in the first four slots + protected final void fillStacksIntoFirstSlots() { + for (int i = 0; i <= getSlotID_LastInput() ; i++) { + for (int j = i + 1; j <= getSlotID_LastInput(); j++) { + if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + } + } + + public final void tryFillUsageSlots() { + int aSlotSpace = (mInputslotCount - getContentUsageSlots().size()); + if (aSlotSpace > 0) { + Logger.INFO("We have empty usage slots. "+aSlotSpace); + for (int i=getSlotID_FirstInput();i<=getSlotID_LastInput();i++) { + ItemStack aStackToTryMove = mInventory[i]; + if (aStackToTryMove != null && isItemValidForUsageSlot(aStackToTryMove)) { + Logger.INFO("Trying to move stack from input slot "+i); + if (moveItemFromStockToUsageSlots(aStackToTryMove)) { + Logger.INFO("Updating Slots."); + updateSlots(); + } + } + } + } + } + + private int getSlotID_FirstInput() { + return 0; + } + private int getSlotID_LastInput() { + return mInputslotCount-1; + } + private int getSlotID_FirstUsage() { + return mInputslotCount; + } + private int getSlotID_LastUsage() { + return mTotalSlotCount-1; + } + + + public final AutoMap getContentUsageSlots() { + AutoMap aItems = new AutoMap(); + for (int i=mInputslotCount;i 0) { + + if (!isItemValidForUsageSlot(aStack)) { + Logger.INFO("Stack not valid: "+ItemUtils.getItemName(aStack)); + return false; + } + + // Copy the input stack into a new object + ItemStack aStackToMove = aStack.copy(); + // Set stack size of stack to move to 1. + aStackToMove.stackSize = 1; + // Did we set a stack in the usage slots? + boolean aDidSet = false; + // Did we find another of this item already in the usage slots? + boolean aFoundMatching = false; + // Continue processing with our new stack + // First check for duplicates + for (int i = getSlotID_FirstUsage(); i <= getSlotID_LastUsage(); i++) { + if (mInventory[i] != null) { + if (GT_Utility.areStacksEqual(aStackToMove, mInventory[i], true)) { + Logger.INFO("Found matching stack in slot "+i+"."); + aFoundMatching = true; + break; + } + } + } + // Then Move stack to Usage slots + for (int i = getSlotID_FirstUsage(); i <= getSlotID_LastUsage(); i++) { + if (mInventory[i] == null) { + if ((aFoundMatching && aAllowMultiOfSameTypeInUsageSlots) || !aFoundMatching) { + mInventory[i] = aStackToMove; + aDidSet = true; + Logger.INFO("Moving new stack to usage slots."); + break; + } + } + } + if (aDidSet) { + Logger.INFO("Depleting input stack size by 1."); + // Depleted one from the original input stack + aStack.stackSize--; + } + return aDidSet; + } + } + return false; + } + + @Override + public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aSide == getBaseMetaTileEntity().getFrontFacing() && isItemValidForUsageSlot(aStack); + } + + /** + * Items that get compared when checking for Usage Slot validity. + * Can return an empty map if isItemValidForUsageSlot() is overridden. + * @return + */ + public abstract AutoMap getItemsValidForUsageSlots(); + + /** + * Checks if the given item is valid for Usage Slots. + * Can be overridden for easier handling if you already have methods to check this. + * @param aStack + * @return + */ + public boolean isItemValidForUsageSlot(ItemStack aStack) { + if (aStack != null) { + for (ItemStack aValid : getItemsValidForUsageSlots()) { + if (GT_Utility.areStacksEqual(aStack, aValid, true)) { + return true; + } + } + } + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java new file mode 100644 index 0000000000..9cc0e3a315 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechFluid.java @@ -0,0 +1,28 @@ +package gtPlusPlus.xmod.gregtech.api.objects; + +import gregtech.api.GregTech_API; + +import gtPlusPlus.core.lib.CORE; +import net.minecraftforge.fluids.Fluid; + +public class GregtechFluid extends Fluid implements Runnable { + public final String mTextureName; + private final short[] mRGBa; + + public GregtechFluid(final String aName, final String aTextureName, final short[] aRGBa) { + super(aName); + this.mRGBa = aRGBa; + this.mTextureName = aTextureName; + GregTech_API.sGTBlockIconload.add(this); + } + + @Override + public int getColor() { + return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2])); + } + + @Override + public void run() { + this.setIcons(GregTech_API.sBlockIcons.registerIcon(CORE.MODID+ ":" + "fluids/fluid." + this.mTextureName)); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java new file mode 100644 index 0000000000..eb5939caca --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java @@ -0,0 +1,144 @@ +package gtPlusPlus.xmod.gregtech.api.objects; + +import java.util.*; + +import net.minecraft.item.ItemStack; + +import gregtech.api.objects.GT_ArrayList; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; + +public class GregtechItemData { + private static final GregtechMaterialStack[] EMPTY_GT_MaterialStack_ARRAY = new GregtechMaterialStack[0]; + + public final List mExtraData = new GT_ArrayList<>(false, 1); + public final GregtechOrePrefixes mPrefix; + public final GregtechMaterialStack mMaterial; + public final GregtechMaterialStack[] mByProducts; + public boolean mBlackListed = false; + public ItemStack mUnificationTarget = null; + + public GregtechItemData(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final boolean aBlackListed) { + this.mPrefix = aPrefix; + this.mMaterial = aMaterial == null ? null : new GregtechMaterialStack(aMaterial, aPrefix.mMaterialAmount); + this.mBlackListed = aBlackListed; + this.mByProducts = (aPrefix.mSecondaryMaterial == null) || (aPrefix.mSecondaryMaterial.mMaterial == null) ? EMPTY_GT_MaterialStack_ARRAY : new GregtechMaterialStack[]{aPrefix.mSecondaryMaterial.clone()}; + } + + public GregtechItemData(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial) { + this(aPrefix, aMaterial, false); + } + + public GregtechItemData(final GregtechMaterialStack aMaterial, final GregtechMaterialStack... aByProducts) { + this.mPrefix = null; + this.mMaterial = aMaterial.mMaterial == null ? null : aMaterial.clone(); + this.mBlackListed = true; + if (aByProducts == null) { + this.mByProducts = EMPTY_GT_MaterialStack_ARRAY; + } else { + final GregtechMaterialStack[] tByProducts = aByProducts.length < 1 ? EMPTY_GT_MaterialStack_ARRAY : new GregtechMaterialStack[aByProducts.length]; + int j = 0; + for (int i = 0; i < aByProducts.length; i++) { + if ((aByProducts[i] != null) && (aByProducts[i].mMaterial != null)) { + tByProducts[j++] = aByProducts[i].clone(); + } + } + this.mByProducts = j > 0 ? new GregtechMaterialStack[j] : EMPTY_GT_MaterialStack_ARRAY; + for (int i = 0; i < this.mByProducts.length; i++) { + this.mByProducts[i] = tByProducts[i]; + } + } + } + + public GregtechItemData(final GT_Materials aMaterial, final long aAmount, final GregtechMaterialStack... aByProducts) { + this(new GregtechMaterialStack(aMaterial, aAmount), aByProducts); + } + + public GregtechItemData(final GT_Materials aMaterial, final long aAmount, final GT_Materials aByProduct, final long aByProductAmount) { + this(new GregtechMaterialStack(aMaterial, aAmount), new GregtechMaterialStack(aByProduct, aByProductAmount)); + } + + public GregtechItemData(final GregtechItemData... aData) { + this.mPrefix = null; + this.mBlackListed = true; + + final ArrayList aList = new ArrayList<>(), rList = new ArrayList<>(); + + for (final GregtechItemData tData : aData) { + if (tData != null) { + if (tData.hasValidMaterialData() && (tData.mMaterial.mAmount > 0)) { + aList.add(tData.mMaterial.clone()); + } + for (final GregtechMaterialStack tMaterial : tData.mByProducts) { + if (tMaterial.mAmount > 0) { + aList.add(tMaterial.clone()); + } + } + } + } + + for (final GregtechMaterialStack aMaterial : aList) { + boolean temp = true; + for (final GregtechMaterialStack tMaterial : rList) { + if (aMaterial.mMaterial == tMaterial.mMaterial) { + tMaterial.mAmount += aMaterial.mAmount; + temp = false; + break; + } + } + if (temp) { + rList.add(aMaterial.clone()); + } + } + + Collections.sort(rList, new Comparator() { + @Override + public int compare(final GregtechMaterialStack a, final GregtechMaterialStack b) { + return a.mAmount == b.mAmount ? 0 : a.mAmount > b.mAmount ? -1 : +1; + } + }); + + if (rList.isEmpty()) { + this.mMaterial = null; + } else { + this.mMaterial = rList.get(0); + rList.remove(0); + } + + this.mByProducts = rList.toArray(new GregtechMaterialStack[rList.size()]); + } + + public boolean hasValidPrefixMaterialData() { + return (this.mPrefix != null) && (this.mMaterial != null) && (this.mMaterial.mMaterial != null); + } + + public boolean hasValidPrefixData() { + return this.mPrefix != null; + } + + public boolean hasValidMaterialData() { + return (this.mMaterial != null) && (this.mMaterial.mMaterial != null); + } + + public ArrayList getAllGT_MaterialStacks() { + final ArrayList rList = new ArrayList(); + if (this.hasValidMaterialData()) { + rList.add(this.mMaterial); + } + rList.addAll(Arrays.asList(this.mByProducts)); + return rList; + } + + public GregtechMaterialStack getByProduct(final int aIndex) { + return (aIndex >= 0) && (aIndex < this.mByProducts.length) ? this.mByProducts[aIndex] : null; + } + + @Override + public String toString() { + if ((this.mPrefix == null) || (this.mMaterial == null) || (this.mMaterial.mMaterial == null)) { + return ""; + } + return this.mPrefix.name() + this.mMaterial.mMaterial.name(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java new file mode 100644 index 0000000000..6ec5907256 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java @@ -0,0 +1,49 @@ +package gtPlusPlus.xmod.gregtech.api.objects; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; + +public class GregtechMaterialStack implements Cloneable { + public long mAmount; + public GT_Materials mMaterial; + + public GregtechMaterialStack(final GT_Materials aMaterial, final long aAmount) { + this.mMaterial = aMaterial == null ? GT_Materials._NULL : aMaterial; + this.mAmount = aAmount; + } + + public GregtechMaterialStack copy(final long aAmount) { + return new GregtechMaterialStack(this.mMaterial, aAmount); + } + + @Override + public GregtechMaterialStack clone() { + return new GregtechMaterialStack(this.mMaterial, this.mAmount); + } + + @Override + public boolean equals(final Object aObject) { + if (aObject == this) { + return true; + } + if (aObject == null) { + return false; + } + if (aObject instanceof GT_Materials) { + return aObject == this.mMaterial; + } + if (aObject instanceof GregtechMaterialStack) { + return (((GregtechMaterialStack) aObject).mMaterial == this.mMaterial) && ((this.mAmount < 0) || (((GregtechMaterialStack) aObject).mAmount < 0) || (((GregtechMaterialStack) aObject).mAmount == this.mAmount)); + } + return false; + } + + @Override + public String toString() { + return ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? "(" : "") + this.mMaterial.getToolTip(true) + ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? ")" : "") + (this.mAmount > 1 ? this.mAmount : ""); + } + + @Override + public int hashCode() { + return this.mMaterial.hashCode(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java new file mode 100644 index 0000000000..7af6af2ffd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockBlueprint.java @@ -0,0 +1,469 @@ +package gtPlusPlus.xmod.gregtech.api.objects; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.data.Triplet; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer.LayerBlockData; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraftforge.common.util.ForgeDirection; + +public abstract class MultiblockBlueprint { + + private final MultiblockLayer[] mBlueprintData; + + public final int height; + public final int width; + public final int depth; + public final int mMinimumCasingCount; + public final int mTextureID; + + /** + * Cached Matrix of the Multiblock, which makes future structural checks far quicker. + */ + private final BlockPos[][][] StructureMatrix; + + /** + * Has {@value StructureMatrix} been set yet? + */ + @SuppressWarnings("unused") + private boolean mGeneratedMatrix = false; + + /** + * A detailed class which will contain blueprints for a Multiblock. + * Values are not relative to the controller, but in total. + * @param x - Overall width + * @param y - Overall height + * @param z - Overall depth + * @param aMinimumCasings - The lowest amount of casings required + * @param aTextureID - The texture ID used by hatches. + */ + public MultiblockBlueprint(final int x, final int y, final int z, final int aMinimumCasings, final int aTextureID) { + mBlueprintData = new MultiblockLayer[y]; + height = y; + width = x; + depth = z; + mMinimumCasingCount = aMinimumCasings; + mTextureID = aTextureID; + StructureMatrix = new BlockPos[width][height][depth]; + //Logger.INFO("Created new Blueprint."); + } + + /** + * + * @param aY - The Y level of the layer to return, where 0 is the bottom and N is the top. + * @return - A {@link MultiblockLayer} object. + */ + public MultiblockLayer getLayer(int aY) { + return mBlueprintData[aY]; + } + + /** + * + * @param aLayer - A {@link MultiblockLayer} object. + * @param aY - The Y level of the layer, where 0 is the bottom and N is the top. + * + */ + public void setLayer(MultiblockLayer aLayer, int aY) { + mBlueprintData[aY] = aLayer; + } + + public MultiblockLayer getControllerLayer() { + for (MultiblockLayer u : mBlueprintData) { + if (u.hasController()) { + return u; + } + } + return null; + } + + public int getControllerY() { + int i = 0; + for (MultiblockLayer u : mBlueprintData) { + if (u.hasController()) { + return i; + } + i++; + } + return 0; + } + + @SuppressWarnings({ "unused", "rawtypes" }) + public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity) { + //Check for Nulls + if (aBaseMetaTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + GT_MetaTileEntity_MultiBlockBase aControllerObject = null; + if (aMetaTileEntity instanceof GT_MetaTileEntity_MultiBlockBase) { + aControllerObject = (GT_MetaTileEntity_MultiBlockBase) aMetaTileEntity; + } + if (aControllerObject == null) { + return false; + } + + //Get some Vars + int xOffSetMulti = ((this.getControllerLayer().width-1)/2); + int zOffSetMulti = ((this.getControllerLayer().depth-1)/2); + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * xOffSetMulti; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * zOffSetMulti; + ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); + int tAmount = 0; + + int contX = aControllerObject.getBaseMetaTileEntity().getXCoord(), contY = aControllerObject.getBaseMetaTileEntity().getYCoord(), contZ = aControllerObject.getBaseMetaTileEntity().getZCoord(); + + Logger.INFO("Controller is located at ["+contX+", "+contY+", "+contZ+"]"); + + boolean debugCacheDataVisually = true; + + + if (/*!mGeneratedMatrix || StructureMatrix == null*/ true) { + //Try Fancy Cache Stuff + BlockPos aPos = getOffsetRelativeToGridPosition(aBaseMetaTileEntity, 0, 0, 0); + for (int Y = 0; Y < height; Y++) { + for (int Z = 0; Z < depth; Z++) { + for (int X = 0; X < width; X++) { + int offsetX, offsetZ; + Pair j = MultiblockLayer.rotateOffsetValues(aDir, X, Z); + offsetX = j.getKey(); + offsetZ = j.getValue(); + + Logger.INFO("Pre-Rotated Offsets ["+X+", "+(aPos.yPos + Y)+", "+Z+"] | "+aDir.name()); + Logger.INFO("Rotated Offsets ["+offsetX+", "+(aPos.yPos + Y)+", "+offsetZ+"]"); + + // Resolve Negatives + int negTestX, negTestZ; + if (aPos.xPos < 0) { + int testA = aPos.xPos; + testA -= -offsetX; + negTestX = testA; + } else { + negTestX = offsetX + aPos.xPos; + } + if (aPos.zPos < 0) { + int testA = aPos.zPos; + testA -= -offsetZ; + negTestZ = testA; + } else { + negTestZ = offsetZ + aPos.zPos; + } + Logger.INFO("Caching With Offset ["+negTestX+", "+(aPos.yPos + Y)+", "+negTestZ+"]"); + StructureMatrix[X][Y][Z] = new BlockPos(negTestX, (aPos.yPos + Y), negTestZ, aPos.world); + + if (debugCacheDataVisually) { + aBaseMetaTileEntity.getWorld().setBlock(negTestX, (aPos.yPos + Y), negTestZ, Blocks.glass); + } + } + } + } + Logger.INFO("Cached blueprint matrix."); + mGeneratedMatrix = true; + } + else { + Logger.INFO("Found cached blueprint matrix."); + } + + if (StructureMatrix == null) { + Logger.INFO("Error caching blueprint matrix."); + return false; + } + + + int a1, a2, a3; + a1 = StructureMatrix.length; + a2 = StructureMatrix[0].length; + a3 = StructureMatrix[0][0].length; + + Logger.INFO("Matrix Size ["+a1+", "+a2+", "+a3+"]"); + + for (int H = 0; H < a2; H++) { + + MultiblockLayer currentLayer = this.getLayer(H); + for (int W = 0; W < a1; W++) { + for (int D = 0; D < a3; D++) { + + BlockPos aToCheck = StructureMatrix[W][H][D]; + if (aToCheck == null) { + Logger.INFO("Found bad data stored at X: "+W+", Y: "+H+", Z: "+D); + continue; + } + else { + //Logger.INFO("Found data stored at X: "+W+", Y: "+H+", Z: "+D); + Logger.INFO("Checking "+aToCheck.getLocationString()); + } + + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntity(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos); + final Block tBlock = aBaseMetaTileEntity.getBlock(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos); + final int tMeta = aBaseMetaTileEntity.getMetaID(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos); + + + LayerBlockData g1 = currentLayer.getDataFromCoordsWithDirection(aDir, W, D); + if (g1 == null) { + Logger.INFO("Failed to find LayerBlockData. Using AIR_FALLBACK"); + //return false;*/ + g1 = LayerBlockData.FALLBACK_AIR_CHECK; + } + else { + if (g1.isController) { + Logger.INFO("Controller is at X: "+W+", Y: "+H+", Z: "+D); + } + } + + boolean isMatch = g1.match(tBlock, tMeta); + + + if (!isMatch) { + Logger.INFO("Checking ["+aToCheck.xPos+", "+ aToCheck.yPos +", "+ aToCheck.zPos+"]"); + Logger.INFO("Checking Position relative to Grid. X: "+W+", Y: "+H+", Z: "+D); + Logger.INFO("Found "+tBlock.getLocalizedName()+" : "+tMeta + " | Bad ["+W+", "+D+"]"); + + LayerBlockData g = currentLayer.getDataFromCoordsWithDirection(aDir, W, D); + + if (g == null) { + Logger.INFO("Expected "+" BAD DATA - Possibly Unset Area in Blueprint."); + + } + else { + Logger.INFO("Expected "+g.mBlock.getLocalizedName()+" : "+g.mMeta + ""); + } + aBaseMetaTileEntity.getWorld().setBlock(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos, g.mBlock); + aBaseMetaTileEntity.getWorld().setBlockMetadataWithNotify(aToCheck.xPos, aToCheck.yPos, aToCheck.zPos, g.mMeta, 4); + //return false; + } + else { + + LayerBlockData g = currentLayer.getDataFromCoordsWithDirection(aDir, W, D); + + + + + + + + + + + + + + + + + + + + boolean isHatchValidType = false; + if (g != null) { + if (g.canBeHatch && !g.isController && tTileEntity != null) { + IMetaTileEntity aMetaTileEntity2 = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity2 != null) { + if (aMetaTileEntity2 instanceof GT_MetaTileEntity_MultiBlockBase) { + isHatchValidType = true; + break; + } + else { + for (Class c : g.mHatchClass) { + if (c != null) { + if (c.isInstance(aMetaTileEntity2)) { + isHatchValidType = true; + break; + } + } + } + } + } + } + } + + if (!isHatchValidType && !g.isController && tTileEntity != null) { + Logger.INFO("Checking ["+aToCheck.xPos+", "+ aToCheck.yPos +", "+ aToCheck.zPos+"]"); + Logger.INFO("Hatch Type did not match allowed types. "+tTileEntity.getClass().getSimpleName()); + return false; + } + if (!aControllerObject.addToMachineList(tTileEntity, mTextureID)) { + tAmount++; + } + + + } + } + } + } + + boolean hasCorrectHatches = ( + aControllerObject.mInputBusses.size() >= this.getMinimumInputBus() && + aControllerObject.mOutputBusses.size() >= this.getMinimumOutputBus() && + aControllerObject.mInputHatches.size() >= this.getMinimumInputHatch() && + aControllerObject.mOutputHatches.size() >= this.getMinimumOutputHatch() && + aControllerObject.mDynamoHatches.size() >= this.getMinimumOutputEnergy() && + aControllerObject.mEnergyHatches.size() >= this.getMinimumInputEnergy() && + aControllerObject.mMaintenanceHatches.size() >= this.getMinimumMaintHatch() && + aControllerObject.mMufflerHatches.size() >= this.getMinimumMufflers()); + + + Logger.INFO("mInputBusses: "+aControllerObject.mInputBusses.size()); + Logger.INFO("mOutputBusses: "+aControllerObject.mOutputBusses.size()); + Logger.INFO("mInputHatches: "+aControllerObject.mInputHatches.size()); + Logger.INFO("mOutputHatches: "+aControllerObject.mOutputHatches.size()); + Logger.INFO("mEnergyHatches: "+aControllerObject.mEnergyHatches.size()); + Logger.INFO("mDynamoHatches: "+aControllerObject.mDynamoHatches.size()); + Logger.INFO("mMaintenanceHatches: "+aControllerObject.mMaintenanceHatches.size()); + Logger.INFO("mMufflerHatches: "+aControllerObject.mMufflerHatches.size()); + + boolean built = hasCorrectHatches && tAmount >= mMinimumCasingCount; + Logger.INFO("Built? "+built); + Logger.INFO("hasCorrectHatches? "+hasCorrectHatches); + Logger.INFO("tAmount? "+tAmount); + return built; + } + + public BlockPos getOffsetRelativeToGridPosition(final IGregTechTileEntity aBaseMetaTileEntity, final int x, final int y, final int z) { + + if (aBaseMetaTileEntity == null) { + return null; + } + + int controllerX, controllerY, controllerZ; + MultiblockLayer layerController = this.getControllerLayer(); + + if (layerController == null) { + return null; + } + + int controllerYRelative = this.getControllerY(); + Pair controllerLocationRelativeToGrid = layerController.getControllerLocation(); + + if (controllerLocationRelativeToGrid == null) { + return null; + } + + controllerX = aBaseMetaTileEntity.getXCoord(); + controllerY = aBaseMetaTileEntity.getYCoord(); + controllerZ = aBaseMetaTileEntity.getZCoord(); + + Logger.INFO("Controller is at ["+controllerX+", "+controllerY+", "+controllerZ+"]"); + + ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); + Logger.INFO("Controller is facing "+aDir.name()); + + //Find Bottom Left corner of Structure + // 0, 0, 0 + + int offsetX, offsetY, offsetZ; + int X = controllerLocationRelativeToGrid.getKey(), Z = controllerLocationRelativeToGrid.getValue(); + Logger.INFO("Attempting to translate offsets ["+X+", "+Z+"]"); + if (aDir == ForgeDirection.NORTH) { + offsetX = -X; + offsetZ = -Z; + } + + else if (aDir == ForgeDirection.EAST) { + offsetX = Z; + offsetZ = -X; + } + + else if (aDir == ForgeDirection.SOUTH) { + offsetX = X; + offsetZ = Z; + } + + else if (aDir == ForgeDirection.WEST) { + offsetX = -Z; + offsetZ = X; + } + else { + offsetX = -X; + offsetZ = -Z; + } + + offsetY = -controllerYRelative; + + Logger.INFO("Attempting to use offsets ["+offsetX+", "+offsetY+", "+offsetZ+"]"); + + //Resolve Negatives + int negTestX, negTestZ; + if (controllerX < 0) { + Logger.INFO("Found Negative X Pos."); + int testA = controllerX; + testA -= offsetX; + Logger.INFO("Adding Inverted Offset of "+offsetX+", making "+testA); + negTestX = testA; + } + else { + negTestX = offsetX + controllerX; + } + if (controllerZ < 0) { + Logger.INFO("Found Negative Z Pos."); + int testA = controllerZ; + testA -= -offsetZ; + Logger.INFO("Adding Inverted Offset of "+offsetZ+", making "+testA); + negTestZ = testA; + } + else { + negTestZ = offsetZ + controllerZ; + } + + + //} + //Bottom left Corner position + BlockPos p = new BlockPos(negTestX, offsetY+controllerY, negTestZ, aBaseMetaTileEntity.getWorld()); + + Logger.INFO("World XYZ for Bottom left Corner Block of structure ["+p.xPos+", "+p.yPos+", "+p.zPos+"]"); + + //Add the xyz relative to the grid. + BlockPos offsetPos = new BlockPos(p.xPos+x, p.yPos+y, p.zPos+z, aBaseMetaTileEntity.getWorld()); + Logger.INFO("World XYZ for Target Check Block in structure ["+offsetPos.xPos+", "+offsetPos.yPos+", "+offsetPos.zPos+"]"); + + return p; + } + + + public IGregTechTileEntity getTileAtOffset(final IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z){ + BlockPos aPos = getOffsetRelativeToGridPosition(aBaseMetaTileEntity, x, y, z); + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(aPos.xPos, aPos.yPos, aPos.zPos); + //aBaseMetaTileEntity.getWorld().setBlock(xh, yh, zh, Blocks.gold_ore); + return tTileEntity; + } + + public Pair getBlockAtOffset(final IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z){ + BlockPos aPos = getOffsetRelativeToGridPosition(aBaseMetaTileEntity, x, y, z); + final Block tBlock = aBaseMetaTileEntity.getBlockOffset(aPos.xPos, aPos.yPos, aPos.zPos); + final int tMeta = aBaseMetaTileEntity.getMetaIDOffset(aPos.xPos, aPos.yPos, aPos.zPos); + return new Pair(tBlock, tMeta); + } + + public Triplet getOffsetFromControllerTo00(){ + MultiblockLayer l = this.getControllerLayer(); + if (l == null) { + return null; + } + int yOffset = this.getControllerY(); + Pair cl = l.getControllerLocation(); + + if (cl == null) { + return null; + } + + return new Triplet (cl.getKey(), yOffset, cl.getValue()); + //return new Triplet (cl.getKey(), yOffset, cl.getValue()); + + } + + public abstract int getMinimumInputBus(); + public abstract int getMinimumInputHatch(); + public abstract int getMinimumOutputBus(); + public abstract int getMinimumOutputHatch(); + public abstract int getMinimumInputEnergy(); + public abstract int getMinimumOutputEnergy(); + public abstract int getMinimumMaintHatch(); + public abstract int getMinimumMufflers(); + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java new file mode 100644 index 0000000000..c5554a6679 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockLayer.java @@ -0,0 +1,643 @@ +package gtPlusPlus.xmod.gregtech.api.objects; + +import java.util.HashMap; + +import gregtech.api.GregTech_API; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; +import net.minecraft.init.Blocks; +import net.minecraftforge.common.util.ForgeDirection; + +public class MultiblockLayer { + + public final int width; + public final int depth; + + private boolean mFinalised; + + + /** + * WARNING!! May be {@link null}. + */ + private Pair mControllerLocation; + + /** + * Holds the North facing Orientation data. + */ + public final LayerBlockData[][] mLayerData; + public final AutoMap mVariantOrientations = new AutoMap(); + + /** + * A detailed class which will contain a single x/z Layer for a {@link MultiblockBlueprint}. + * Values are not relative, but in total. + * @param x - Overall width + * @param z - Overall depth + */ + public MultiblockLayer(final int x, final int z) { + width = x; + depth = z; + mLayerData = new LayerBlockData[x][z]; + //Logger.INFO("Created new Blueprint Layer."); + } + + /** + * A detailed class which will contain a single x/z Layer for a {@link MultiblockBlueprint}. + * Values are not relative, but in total. + */ + public MultiblockLayer(final LayerBlockData[][] aData) { + width = aData.length; + depth = aData[0].length; + mLayerData = aData; + } + + /** + * + * @param aBlock - The block expected as this location. + * @param aMeta - The meta for the block above. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @param canBeHatch - is this location able to be substituted for any hatch? + * @return - Is this data added to the layer data map? + */ + public boolean addBlockForPos(Block aBlock, int aMeta, int x, int z, boolean canBeHatch) { + return addBlockForPos(aBlock, aMeta, x, z, canBeHatch, new Class[] {}); + } + + /** + * + * @param aBlock - The block expected as this location. + * @param aMeta - The meta for the block above. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @param canBeHatch - is this location able to be substituted for a hatch? + * @param aHatchTypeClass - Specify the class for the hatch if you want it explicit. Use base classes to allow custom hatches which extend. + * @return - Is this data added to the layer data map? + */ + public boolean addBlockForPos(Block aBlock, int aMeta, int x, int z, boolean canBeHatch, Class aHatchTypeClass) { + return addBlockForPos(aBlock, aMeta, x, z, canBeHatch, new Class[] {aHatchTypeClass}); + } + + /** + * + * @param aBlock - The block expected as this location. + * @param aMeta - The meta for the block above. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @param canBeHatch - is this location able to be substituted for a hatch? + * @param aHatchTypeClass - Specify the class for the hatch if you want it explicit. Use base classes to allow custom hatches which extend. + * @return - Is this data added to the layer data map? + */ + public boolean addBlockForPos(Block aBlock, int aMeta, int x, int z, boolean canBeHatch, Class[] aHatchTypeClass) { + if (x > width -1) { + return false; + } + if (z > depth - 1) { + return false; + } + + if (canBeHatch && (aHatchTypeClass == null || aHatchTypeClass.length <= 0)){ + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + aHatchTypeClass = new Class[] { + GT_MetaTileEntity_Hatch_Dynamo.class, + GT_MetaTileEntity_Hatch_Energy.class, + GT_MetaTileEntity_Hatch_Input.class, + GT_MetaTileEntity_Hatch_InputBus.class, + GT_MetaTileEntity_Hatch_Maintenance.class, + GT_MetaTileEntity_Hatch_Muffler.class, + GT_MetaTileEntity_Hatch_Output.class, + GT_MetaTileEntity_Hatch_OutputBus.class, + GT_MetaTileEntity_Hatch.class + }; + } + else { + Class aDataHatch = ReflectionUtils.getClass("gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess"); + if (aDataHatch != null) { + aHatchTypeClass = new Class[] { + aDataHatch, + GT_MetaTileEntity_Hatch_Dynamo.class, + GT_MetaTileEntity_Hatch_Energy.class, + GT_MetaTileEntity_Hatch_Input.class, + GT_MetaTileEntity_Hatch_InputBus.class, + GT_MetaTileEntity_Hatch_Maintenance.class, + GT_MetaTileEntity_Hatch_Muffler.class, + GT_MetaTileEntity_Hatch_Output.class, + GT_MetaTileEntity_Hatch_OutputBus.class, + GT_MetaTileEntity_Hatch.class + }; + } else { + aHatchTypeClass = new Class[] { + GT_MetaTileEntity_Hatch_Dynamo.class, + GT_MetaTileEntity_Hatch_Energy.class, + GT_MetaTileEntity_Hatch_Input.class, + GT_MetaTileEntity_Hatch_InputBus.class, + GT_MetaTileEntity_Hatch_Maintenance.class, + GT_MetaTileEntity_Hatch_Muffler.class, + GT_MetaTileEntity_Hatch_Output.class, + GT_MetaTileEntity_Hatch_OutputBus.class, + GT_MetaTileEntity_Hatch.class + }; + } + } + } + + + + mLayerData[x][z] = new LayerBlockData(aBlock, aMeta, canBeHatch, aHatchTypeClass); + return true; + } + + /** + * Adds a controller to the layer at the designated location, Details about the controller do not need to be specified. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addController(int x, int z) { + setControllerLocation(new Pair(x, z)); + return addBlockForPos(GregTech_API.sBlockMachines, 0, x, z, true, GT_MetaTileEntity_MultiBlockBase.class); + } + + + /** + * Adds a Muffler to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addMuffler(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Muffler.class); + } + + + /** + * Adds a Maint Hatch to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addMaintHatch(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Maintenance.class); + } + + + /** + * Adds ah Input to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addInputBus(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_InputBus.class); + } + + + /** + * Adds an Output to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addOutputBus(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_OutputBus.class); + } + + /** + * Adds ah Input to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addInputHatch(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Input.class); + } + + + /** + * Adds an Output to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addOutputHatch(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Output.class); + } + + /** + * Adds ah Input to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addInput(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, new Class[] {GT_MetaTileEntity_Hatch_Input.class, GT_MetaTileEntity_Hatch_InputBus.class}); + } + + + /** + * Adds an Output to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addOutput(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, new Class[] {GT_MetaTileEntity_Hatch_Output.class, GT_MetaTileEntity_Hatch_OutputBus.class}); + } + + /** + * Adds ah Input to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addEnergyInput(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Energy.class); + } + + + /** + * Adds an Output to the layer at the designated location. + * @param x - The X location, where 0 is the top left corner & counts upwards, moving right. + * @param z - The Z location, where 0 is the top left corner & counts upwards, moving down. + * @return - Is this controller added to the layer data map? + */ + public boolean addEnergyOutput(Block aBlock, int aMeta, int x, int z) { + return addBlockForPos(aBlock, aMeta, x, z, true, GT_MetaTileEntity_Hatch_Dynamo.class); + } + + /** + * + * @param aBlock - The block you expect. + * @param aMeta - The meta you expect. + * @param x - the non-relative x location you expect it. + * @param z - the non-relative z location you expect it. + * @param aDir - The direction the controller is facing. + * @return - True if the correct Block was found. May also return true if a hatch is found when allowed or it's the controller. + */ + public boolean getBlockForPos(Block aBlock, int aMeta, int x, int z, ForgeDirection aDir) { + //Logger.INFO("Grid Index X: "+x+" | Z: "+z + " | "+aDir.name()); + LayerBlockData g; + if (aDir == ForgeDirection.SOUTH) { + g = mVariantOrientations.get(2)[x][z]; + } + else if (aDir == ForgeDirection.WEST) { + g = mVariantOrientations.get(3)[x][z]; + } + else if (aDir == ForgeDirection.NORTH) { + LayerBlockData[][] aData = mVariantOrientations.get(0); + if (aData != null) { + //Logger.INFO("Found Valid Orientation Data. "+aData.length + ", "+aData[0].length); + g = aData[x][z]; + } + else { + //Logger.INFO("Did not find valid orientation data."); + g = null; + } + } + else if (aDir == ForgeDirection.EAST) { + g = mVariantOrientations.get(1)[x][z]; + } + else { + g = mLayerData[x][z]; + } + if (g == null) { + Logger.INFO("Failed to find LayerBlockData. Using AIR_FALLBACK"); + //return false;*/ + g = LayerBlockData.FALLBACK_AIR_CHECK; + } + + return g.match(aBlock, aMeta); + } + + + + /** + * Is this layer final? + * @return - If true, layer data cannot be edited. + */ + public final boolean isLocked() { + return mFinalised; + } + + /** + * Used to finalize the layer, after which all four Orientations are then generated. + * Cannot be set to false, useful for not locking the layer if an error occurs. + * @param lockData + */ + public final void lock(boolean lockData) { + if (!lockData) { + Logger.INFO("Failed to lock layer"); + return; + } + //Logger.INFO("Trying to lock layer"); + this.mFinalised = true; + generateOrientations(); + //Logger.INFO("Trying to Build Blueprint Layer [Constructed orietations & finalized]"); + } + + private void generateOrientations() { + try { + + //Logger.INFO("Trying to gen orients for layer"); + //North + mVariantOrientations.put(mLayerData); + LayerBlockData[][] val; + //Logger.INFO("1 done"); + //East + val = rotateArrayClockwise(mLayerData); + mVariantOrientations.put((LayerBlockData[][]) val); + //Logger.INFO("2 done"); + //South + val = rotateArrayClockwise(mLayerData); + mVariantOrientations.put((LayerBlockData[][]) val); + //Logger.INFO("3 done"); + //West + val = rotateArrayClockwise(mLayerData); + mVariantOrientations.put((LayerBlockData[][]) val); + //Logger.INFO("4 done"); + + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + public static LayerBlockData[][] rotateArrayClockwise(LayerBlockData[][] mat) { + //Logger.INFO("Rotating Layer 90' Clockwise"); + try { + final int M = mat.length; + final int N = mat[0].length; + //Logger.INFO("Dimension X: "+M); + //Logger.INFO("Dimension Z: "+N); + LayerBlockData[][] ret = new LayerBlockData[N][M]; + for (int r = 0; r < M; r++) { + for (int c = 0; c < N; c++) { + ret[c][M-1-r] = mat[r][c]; + } + } + //Logger.INFO("Returning Rotated Layer"); + return ret; + } + catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + public boolean hasController() { + if (getControllerLocation() == null) { + return false; + } + return true; + } + + public Pair getControllerLocation() { + return mControllerLocation; + } + + public void setControllerLocation(Pair mControllerLocation) { + if (hasController()) { + return; + } + this.mControllerLocation = mControllerLocation; + } + + public LayerBlockData getDataFromCoordsWithDirection(ForgeDirection aDir, int W, int D) { + LayerBlockData g; + if (aDir == ForgeDirection.SOUTH) { + g = this.mVariantOrientations.get(2)[W][D]; + } + else if (aDir == ForgeDirection.WEST) { + g = this.mVariantOrientations.get(3)[W][D]; + } + else if (aDir == ForgeDirection.NORTH) { + g = this.mVariantOrientations.get(0)[W][D]; + } + else if (aDir == ForgeDirection.EAST) { + g = this.mVariantOrientations.get(1)[W][D]; + } + else { + g = this.mLayerData[W][D]; + } + return g; + } + + public static Pair rotateOffsetValues(ForgeDirection aDir, int X, int Z) { + int offsetX, offsetZ; + + if (aDir == ForgeDirection.NORTH) { + offsetX = X; + offsetZ = Z; + } + + else if (aDir == ForgeDirection.EAST) { + offsetX = -X; + offsetZ = Z; + } + + else if (aDir == ForgeDirection.SOUTH) { + offsetX = -X; + offsetZ = -Z; + } + + else if (aDir == ForgeDirection.WEST) { + offsetX = X; + offsetZ = -Z; + } + else { + offsetX = X; + offsetZ = Z; + } + + return new Pair(offsetX, offsetZ); + } + + + + + + + + + + + + + + + + /** + * Generates a complete {@link MultiblockLayer} from String data. + * @param aDataMap - A {@link HashMap} containing single character {@link String}s, which map to {@link Pair}<{@link Block}, {@link Integer}>s contains pairs of Blocks & Meta. + * @param aHorizontalStringRows - The horizontal rows used to map blocks to a grid. Each array slot is one vertical row going downwards as the index increases. + * @return + */ + public static MultiblockLayer generateLayerFromData(HashMap> aDataMap, String[] aHorizontalStringRows) { + AutoMap>> x = new AutoMap>>(); + + for (String u : aDataMap.keySet()) { + Pair r = aDataMap.get(u); + if (r != null) { + x.put(new Pair>(u, r)); + } + } + + //String aFreeLetters = "abdefgijklmnopqrstuvwxyz"; + /*for (Pair h : aDataMap.values()) { + String y = aFreeLetters.substring(0, 0); + aFreeLetters = aFreeLetters.replace(y.toLowerCase(), ""); + Pair> t = new Pair>(y, h); + x.put(t); + }*/ + return generateLayerFromData(x, aHorizontalStringRows); + } + + + /** + * Generates a complete {@link MultiblockLayer} from String data. + * @param aDataMap - An {@link AutoMap} which contains {@link Pair}s. These Pairs hold a single character {@link String} and another Pair. This inner pair holds a {@link Block} and an {@link Integer}. + * @param aHorizontalStringRows - An array which holds the horizontal (X/Width) string data for the layer. + * @return A complete Multiblock Layer. + */ + public static MultiblockLayer generateLayerFromData(AutoMap>> aDataMap, String[] aHorizontalStringRows) { + int width = aHorizontalStringRows[0].length(); + int depth = aHorizontalStringRows.length; + MultiblockLayer L = new MultiblockLayer(width, depth); + HashMap> K = new HashMap>(); + + //24 Free Letters + //C = Controller + //H = Hatch + String aFreeLetters = "abdefgijklmnopqrstuvwxyz"; + AutoMap>> j = new AutoMap>>(); + + //Map the keys to a Hashmap + for (Pair> t : aDataMap) { + String aKeyTemp = t.getKey(); + if (aKeyTemp.toUpperCase().equals("C")){ + j.put(t); + } + else if (aKeyTemp.toUpperCase().equals("H")){ + j.put(t); + } + else { + K.put(aKeyTemp.toLowerCase(), t.getValue()); + aFreeLetters.replace(aKeyTemp.toLowerCase(), ""); + } + } + + //Map any Invalid Characters to new ones, in case someone uses C/H. + if (j.size() > 0) { + for (Pair> h : j) { + String newKey = aFreeLetters.substring(0, 0); + K.put(newKey.toLowerCase(), h.getValue()); + aFreeLetters.replace(newKey.toLowerCase(), ""); + } + } + + int xPos = 0; + int zPos = 0; + + //Vertical Iterator + for (String s : aHorizontalStringRows) { + //Horizontal Iterator + for (int q = 0; q < s.length(); q++) { + //Get char as a String at index q. + String c = s.substring(q, q); + //if the character at c matches the character in this row, we add it to the map. + if (c.toLowerCase().equals(s.toLowerCase())) { + Pair p = K.get(c); + if (c.toLowerCase().equals("c")) { + L.addController(xPos, zPos); + } + else if (c.toLowerCase().equals("h")) { + L.addBlockForPos(p.getKey(), p.getValue(), xPos, zPos, true); + } + else { + L.addBlockForPos(p.getKey(), p.getValue(), xPos, zPos, false); + } + } + xPos++; + } + xPos = 0; + zPos++; + } + L.lock(true); + return L; + } + + + + + public static class LayerBlockData{ + + public static final LayerBlockData FALLBACK_AIR_CHECK = new LayerBlockData(Blocks.air, 0, false); + + public final Block mBlock; + public final int mMeta; + public final boolean canBeHatch; + public final Class[] mHatchClass; + + public final boolean isController; + + + public LayerBlockData(Block aBlock, int aMeta, boolean aHatch) { + this(aBlock, aMeta, aHatch, new Class[] {}); + } + + public LayerBlockData(Block aBlock, int aMeta, boolean aHatch, Class clazz) { + this(aBlock, aMeta, aHatch, new Class[] {clazz}); + } + + public LayerBlockData(Block aBlock, int aMeta, boolean aHatch, Class[] clazz) { + mBlock = aBlock; + mMeta = aMeta; + canBeHatch = aHatch; + mHatchClass = clazz; + if (clazz != null && clazz.length > 0 && clazz[0].equals(GT_MetaTileEntity_MultiBlockBase.class)) { + isController = true; + } + else { + isController = false; + } + } + + public boolean match(Block blockToTest, int metaToTest) { + + //If Both are some kind of Air Block, good enough. + if (blockToTest instanceof BlockAir && mBlock instanceof BlockAir) { + return true; + } + + if (isController && blockToTest == GregTech_API.sBlockMachines) { + return true; + } + + if (canBeHatch && blockToTest == GregTech_API.sBlockMachines) { + return true; + } + + if (blockToTest == mBlock && metaToTest == mMeta) { + return true; + } + + return false; + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java new file mode 100644 index 0000000000..10909081d1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/MultiblockRequirements.java @@ -0,0 +1,108 @@ +package gtPlusPlus.xmod.gregtech.api.objects; + +public class MultiblockRequirements { + + public int mInputBusMinimum = 0; + public int mInputHatchMinimum = 0; + + public int mOutputBusMinimum = 0; + public int mOutputHatchMinimum = 0; + + public int mMaintMinimum = 1; + + public int mEnergyHatchMinimum = 1; + public int mDynamoHatchMinimum = 0; + + public final int mMinimumCasingCount; + + public final MultiblockBlueprint mBlueprint; + + //public static final int mControlCoreMinimum = 1; + /** + * + * @param aInputBusses + * @param aOutputBusses + * @param aInputHatches + * @param aOutputHatches + * @param aEnergyHatches + * @param aDynamoHatches + * @param aMaintHatches + * @param aBlueprint - A data object containing the structural data for this Multiblock + */ + public MultiblockRequirements(int aCasingCount, MultiblockBlueprint aBlueprint) { + mMinimumCasingCount = aCasingCount; + mBlueprint = aBlueprint; + } + + public final int getInputBusMinimum() { + return this.mInputBusMinimum; + } + + public final MultiblockRequirements setInputBusMinimum(int mInputBusMinimum) { + this.mInputBusMinimum = mInputBusMinimum; + return this; + } + + public final int getInputHatchMinimum() { + return this.mInputHatchMinimum; + } + + public final MultiblockRequirements setInputHatchMinimum(int mInputHatchMinimum) { + this.mInputHatchMinimum = mInputHatchMinimum; + return this; + } + + public final int getOutputBusMinimum() { + return this.mOutputBusMinimum; + } + + public final MultiblockRequirements setOutputBusMinimum(int mOutputBusMinimum) { + this.mOutputBusMinimum = mOutputBusMinimum; + return this; + } + + public final int getOutputHatchMinimum() { + return this.mOutputHatchMinimum; + } + + public final MultiblockRequirements setOutputHatchMinimum(int mOutputHatchMinimum) { + this.mOutputHatchMinimum = mOutputHatchMinimum; + return this; + } + + public final int getMaintMinimum() { + return this.mMaintMinimum; + } + + public final MultiblockRequirements setMaintMinimum(int mMaintMinimum) { + this.mMaintMinimum = mMaintMinimum; + return this; + } + + public final int getEnergyHatchMinimum() { + return this.mEnergyHatchMinimum; + } + + public final MultiblockRequirements setEnergyHatchMinimum(int mEnergyHatchMinimum) { + this.mEnergyHatchMinimum = mEnergyHatchMinimum; + return this; + } + + public final int getDynamoHatchMinimum() { + return this.mDynamoHatchMinimum; + } + + public final MultiblockRequirements setDynamoHatchMinimum(int mDynamoHatchMinimum) { + this.mDynamoHatchMinimum = mDynamoHatchMinimum; + return this; + } + + public final MultiblockBlueprint getBlueprint() { + return this.mBlueprint; + } + + public final int getMinimumCasingCount() { + return this.mMinimumCasingCount; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java new file mode 100644 index 0000000000..976f21c329 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/recipe/ProcessingSkookumChoocherToolRecipes.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.api.recipe; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.ToolDictNames; +import gregtech.api.interfaces.IOreRecipeRegistrator; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; + +public class ProcessingSkookumChoocherToolRecipes implements IOreRecipeRegistrator { + public ProcessingSkookumChoocherToolRecipes() { + //GregtechOrePrefixes.toolSkookumChoocher.add(this); + } + + @Override + public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { + GT_ModHandler.addShapelessCraftingRecipe(MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(7734, 1, aMaterial, aMaterial, null), new Object[]{aOreDictName, OrePrefixes.stick.get(aMaterial), OrePrefixes.screw.get(aMaterial), ToolDictNames.craftingToolScrewdriver}); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java new file mode 100644 index 0000000000..dcdc1220d0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java @@ -0,0 +1,100 @@ +package gtPlusPlus.xmod.gregtech.api.util; + +import static gregtech.api.enums.GT_Values.E; + +import net.minecraft.item.ItemStack; + +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.config.Property; + +public class GTPP_Config implements Runnable { + public static boolean troll = false; + + public static Configuration sConfigFileIDs; + public final Configuration mConfig; + + public GTPP_Config(Configuration aConfig) { + mConfig = aConfig; + mConfig.load(); + mConfig.save(); + } + + public static int addIDConfig(Object aCategory, String aName, int aDefault) { + if (GT_Utility.isStringInvalid(aName)) return aDefault; + Property tProperty = sConfigFileIDs.get(aCategory.toString().replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault); + int rResult = tProperty.getInt(aDefault); + if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sConfigFileIDs.save(); + return rResult; + } + + public static String getStackConfigName(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return E; + Object rName = GT_OreDictUnificator.getAssociation(aStack); + if (rName != null) return rName.toString(); + try { + if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString(); + } catch (Throwable e) {/*Do nothing*/} + String sName = aStack.getItem().toString(); + String[] tmp = sName.split("@"); + if (tmp.length > 0) sName = tmp[0]; + return sName + "." + aStack.getItemDamage(); + } + + public boolean get(Object aCategory, ItemStack aStack, boolean aDefault) { + String aName = getStackConfigName(aStack); + return get(aCategory, aName, aDefault); + } + + public boolean get(Object aCategory, String aName, boolean aDefault) { + if (GT_Utility.isStringInvalid(aName)) return aDefault; + Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + boolean rResult = tProperty.getBoolean(aDefault); + if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + return rResult; + } + + public int get(Object aCategory, ItemStack aStack, int aDefault) { + return get(aCategory, getStackConfigName(aStack), aDefault); + } + + public int get(Object aCategory, String aName, int aDefault) { + if (GT_Utility.isStringInvalid(aName)) return aDefault; + Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + int rResult = tProperty.getInt(aDefault); + if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + return rResult; + } + + public double get(Object aCategory, ItemStack aStack, double aDefault) { + return get(aCategory, getStackConfigName(aStack), aDefault); + } + + public double get(Object aCategory, String aName, double aDefault) { + if (GT_Utility.isStringInvalid(aName)) return aDefault; + Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + double rResult = tProperty.getDouble(aDefault); + if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + return rResult; + } + + public String get(Object aCategory, ItemStack aStack, String aDefault) { + return get(aCategory, getStackConfigName(aStack), aDefault); + } + + public String get(Object aCategory, String aName, String aDefault) { + if (GT_Utility.isStringInvalid(aName)) return aDefault; + Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + String rResult = tProperty.getString(); + if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + return rResult; + } + + @Override + public void run() { + mConfig.save(); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java new file mode 100644 index 0000000000..3e0084139e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GregtechOreDictUnificator.java @@ -0,0 +1,402 @@ +package gtPlusPlus.xmod.gregtech.api.util; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.objects.GT_HashSet; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.*; + +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import static gregtech.api.enums.GT_Values.*; + +public class GregtechOreDictUnificator { + + + private static final Map sName2StackMap = new HashMap(); + private static final Map sItemStack2DataMap = new HashMap(); + private static final Map> sUnificationTable = new HashMap>(); + private static final GT_HashSet sNoUnificationList = new GT_HashSet(); + + + private static int isRegisteringOre = 0, isAddingOre = 0; + private static boolean mRunThroughTheList = true; + + static { + if (ReflectionUtils.getField(GT_OreDictUnificator.class, "sUnificationTable") == null) { + GregTech_API.sItemStackMappings.add(sUnificationTable); + } + } + + /** + * The Blacklist just prevents the Item from being unificated into something else. + * Useful if you have things like the Industrial Diamond, which is better than regular Diamond, but also usable in absolutely all Diamond Recipes. + */ + public static void addToBlacklist(ItemStack aStack) { + if (GT_Utility.isStackValid(aStack) && !GT_Utility.isStackInList(aStack, sNoUnificationList)) + sNoUnificationList.add(aStack); + } + + public static boolean isBlacklisted(ItemStack aStack) { + return GT_Utility.isStackInList(aStack, sNoUnificationList); + } + + public static void add(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack) { + set(aPrefix, aMaterial, aStack, false, false); + } + + public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack) { + set(aPrefix, aMaterial, aStack, true, false); + } + + public static void set(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aOverwrite, boolean aAlreadyRegistered) { + if (aMaterial == null || aPrefix == null || GT_Utility.isStackInvalid(aStack) || Items.feather.getDamage(aStack) == W) + return; + isAddingOre++; + aStack = GT_Utility.copyAmount(1, aStack); + if (!aAlreadyRegistered) registerOre(aPrefix.get(aMaterial), aStack); + addAssociation(aPrefix, aMaterial, aStack, isBlacklisted(aStack)); + if (aOverwrite || GT_Utility.isStackInvalid(sName2StackMap.get(aPrefix.get(aMaterial).toString()))) + sName2StackMap.put(aPrefix.get(aMaterial).toString(), aStack); + isAddingOre--; + } + + public static ItemStack getFirstOre(Object aName, long aAmount) { + if (GT_Utility.isStringInvalid(aName)) return null; + ItemStack tStack = sName2StackMap.get(aName.toString()); + if (GT_Utility.isStackValid(tStack)) return GT_Utility.copyAmount(aAmount, tStack); + return GT_Utility.copyAmount(aAmount, getOres(aName).toArray()); + } + + public static ItemStack get(Object aName, long aAmount) { + return get(aName, null, aAmount, true, true); + } + + public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount) { + return get(aName, aReplacement, aAmount, true, true); + } + + public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, long aAmount) { + return get(aPrefix, aMaterial, null, aAmount); + } + + public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, ItemStack aReplacement, long aAmount) { + //if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) aPrefix.mDynamicItems.add((Materials) aMaterial); + if (StaticFields59.geOrePrefixesBooleanPreventableComponents().contains(aPrefix) && StaticFields59.getOrePrefixesBooleanDisabledItems().contains(aMaterial)) return aReplacement; + return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true); + } + + public static ItemStack get(Object aName, ItemStack aReplacement, long aAmount, boolean aMentionPossibleTypos, boolean aNoInvalidAmounts) { + if (aNoInvalidAmounts && aAmount < 1) return null; + if (!sName2StackMap.containsKey(aName.toString()) && aMentionPossibleTypos) + GT_Log.err.println("Unknown Key for Unification, Typo? " + aName); + return GT_Utility.copyAmount(aAmount, sName2StackMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement); + } + + public static ItemStack[] setStackArray(boolean aUseBlackList, ItemStack... aStacks) { + for (int i = 0; i < aStacks.length; i++) aStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i])); + return aStacks; + } + + public static ItemStack[] getStackArray(boolean aUseBlackList, Object... aStacks) { + ItemStack[] rStacks = new ItemStack[aStacks.length]; + for (int i = 0; i < aStacks.length; i++) rStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i])); + return rStacks; + } + + public static ItemStack setStack(ItemStack aStack) { + return setStack(true, aStack); + } + + public static ItemStack setStack(boolean aUseBlackList, ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return aStack; + ItemStack tStack = get(aUseBlackList, aStack); + if (GT_Utility.areStacksEqual(aStack, tStack)) return aStack; + aStack.func_150996_a(tStack.getItem()); + Items.feather.setDamage(aStack, Items.feather.getDamage(tStack)); + return aStack; + } + + public static ItemStack get(ItemStack aStack) { + return get(true, aStack); + } + + public static ItemStack get(boolean aUseBlackList, ItemStack aStack) { + return get(aUseBlackList, aStack, false); + } + + public static ItemStack get(boolean aUseBlackList, ItemStack aStack, boolean aOnUnificationTableCreation) { + if (GT_Utility.isStackInvalid(aStack)) return null; + ItemData tPrefixMaterial = getAssociation(aStack); + ItemStack rStack = null; + if (tPrefixMaterial == null || !tPrefixMaterial.hasValidPrefixMaterialData() || (aUseBlackList && tPrefixMaterial.mBlackListed)) + return GT_Utility.copy(aStack); + if (aUseBlackList && !GregTech_API.sUnificationEntriesRegistered && isBlacklisted(aStack)) { + tPrefixMaterial.mBlackListed = true; + return GT_Utility.copy(aStack); + } + if (tPrefixMaterial.mUnificationTarget == null) { + tPrefixMaterial.mUnificationTarget = sName2StackMap.get(tPrefixMaterial.toString()); + if (!aOnUnificationTableCreation) sUnificationTable.clear(); + } + rStack = tPrefixMaterial.mUnificationTarget; + if (GT_Utility.isStackInvalid(rStack)) return GT_Utility.copy(aStack); + assert rStack != null; + rStack.setTagCompound(aStack.getTagCompound()); + return GT_Utility.copyAmount(aStack.stackSize, rStack); + } + + public static List getNonUnifiedStacks(Object obj) { + synchronized (sUnificationTable) { + if (sUnificationTable.isEmpty() && !sItemStack2DataMap.isEmpty()) { + for (GT_ItemStack tGTStack0 : sItemStack2DataMap.keySet()) { + ItemStack tStack0 = tGTStack0.toStack(); + ItemStack tStack1 = get(false, tStack0, true); + if (tStack0 != null && tStack1 != null && !GT_Utility.areStacksEqual(tStack0, tStack1)) { + GT_ItemStack tGTStack1 = new GT_ItemStack(tStack1); + List list = sUnificationTable.get(tGTStack1); + if (list == null) sUnificationTable.put(tGTStack1, list = new ArrayList()); + if (!list.contains(tStack0)) list.add(tStack0); + } + } + } + } + ItemStack[] aStacks = {}; + if (obj instanceof ItemStack) aStacks = new ItemStack[]{(ItemStack) obj}; + else if (obj instanceof ItemStack[]) aStacks = (ItemStack[]) obj; + else if (obj instanceof List) aStacks = (ItemStack[]) ((List)obj).toArray(new ItemStack[0]); + List rList = new ArrayList(); + for (ItemStack aStack : aStacks) { + rList.add(aStack); + List tList = sUnificationTable.get(new GT_ItemStack(aStack)); + if (tList != null) { + for (ItemStack tStack : tList) { + ItemStack tStack1 = GT_Utility.copyAmount(aStack.stackSize, tStack); + tStack1.setTagCompound(aStack.getTagCompound()); + rList.add(tStack1); + } + } + } + return rList; + } + + public static void addItemData(ItemStack aStack, ItemData aData) { + if (GT_Utility.isStackValid(aStack) && getItemData(aStack) == null && aData != null) setItemData(aStack, aData); + } + + public static void setItemData(ItemStack aStack, ItemData aData) { + if (GT_Utility.isStackInvalid(aStack) || aData == null) return; + ItemData tData = getItemData(aStack); + if (tData == null || !tData.hasValidPrefixMaterialData()) { + if (tData != null) for (Object tObject : tData.mExtraData) + if (!aData.mExtraData.contains(tObject)) aData.mExtraData.add(tObject); + if (aStack.stackSize > 1) { + if (aData.mMaterial != null) aData.mMaterial.mAmount /= aStack.stackSize; + for (MaterialStack tMaterial : aData.mByProducts) tMaterial.mAmount /= aStack.stackSize; + aStack = GT_Utility.copyAmount(1, aStack); + } + sItemStack2DataMap.put(new GT_ItemStack(aStack), aData); + if (aData.hasValidMaterialData()) { + long tValidMaterialAmount = aData.mMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : aData.mMaterial.mAmount >= 0 ? aData.mMaterial.mAmount : M; + for (MaterialStack tMaterial : aData.mByProducts) + tValidMaterialAmount += tMaterial.mMaterial.contains(SubTag.NO_RECYCLING) ? 0 : tMaterial.mAmount >= 0 ? tMaterial.mAmount : M; + if (tValidMaterialAmount < M) GT_ModHandler.addToRecyclerBlackList(aStack); + } + if (mRunThroughTheList) { + if (GregTech_API.sLoadStarted) { + mRunThroughTheList = false; + for (Entry tEntry : sItemStack2DataMap.entrySet()) + if (!tEntry.getValue().hasValidPrefixData() || tEntry.getValue().mPrefix.mAllowNormalRecycling) + GT_RecipeRegistrator.registerMaterialRecycling(tEntry.getKey().toStack(), tEntry.getValue()); + } + } else { + if (!aData.hasValidPrefixData() || aData.mPrefix.mAllowNormalRecycling) + GT_RecipeRegistrator.registerMaterialRecycling(aStack, aData); + } + } else { + for (Object tObject : aData.mExtraData) + if (!tData.mExtraData.contains(tObject)) tData.mExtraData.add(tObject); + } + } + + public static void addAssociation(OrePrefixes aPrefix, Materials aMaterial, ItemStack aStack, boolean aBlackListed) { + if (aPrefix == null || aMaterial == null || GT_Utility.isStackInvalid(aStack)) return; + if (Items.feather.getDamage(aStack) == W) for (byte i = 0; i < 16; i++) + setItemData(GT_Utility.copyAmountAndMetaData(1, i, aStack), new ItemData(aPrefix, aMaterial, aBlackListed)); + setItemData(aStack, new ItemData(aPrefix, aMaterial, aBlackListed)); + } + + public static ItemData getItemData(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return null; + ItemData rData = sItemStack2DataMap.get(new GT_ItemStack(aStack)); + if (rData == null) rData = sItemStack2DataMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, aStack))); + return rData; + } + + public static ItemData getAssociation(ItemStack aStack) { + ItemData rData = getItemData(aStack); + return rData != null && rData.hasValidPrefixMaterialData() ? rData : null; + } + + public static boolean isItemStackInstanceOf(ItemStack aStack, Object aName) { + if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false; + for (ItemStack tOreStack : getOres(aName.toString())) + if (GT_Utility.areStacksEqual(tOreStack, aStack, true)) return true; + return false; + } + + public static boolean isItemStackDye(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) return false; + for (Dyes tDye : Dyes.VALUES) if (isItemStackInstanceOf(aStack, tDye.toString())) return true; + return false; + } + + public static boolean registerOre(OrePrefixes aPrefix, Object aMaterial, ItemStack aStack) { + return registerOre(aPrefix.get(aMaterial), aStack); + } + + public static boolean registerOre(Object aName, ItemStack aStack) { + if (aName == null || GT_Utility.isStackInvalid(aStack)) return false; + String tName = aName.toString(); + if (GT_Utility.isStringInvalid(tName)) return false; + ArrayList tList = getOres(tName); + for (int i = 0; i < tList.size(); i++) if (GT_Utility.areStacksEqual(tList.get(i), aStack, true)) return false; + isRegisteringOre++; + OreDictionary.registerOre(tName, GT_Utility.copyAmount(1, aStack)); + isRegisteringOre--; + return true; + } + + public static boolean isRegisteringOres() { + return isRegisteringOre > 0; + } + + public static boolean isAddingOres() { + return isAddingOre > 0; + } + + public static void resetUnificationEntries() { + for (ItemData tPrefixMaterial : sItemStack2DataMap.values()) tPrefixMaterial.mUnificationTarget = null; + sUnificationTable.clear(); + } + + public static ItemStack getGem(MaterialStack aMaterial) { + return aMaterial == null ? null : getGem(aMaterial.mMaterial, aMaterial.mAmount); + } + + public static ItemStack getGem(Materials aMaterial, OrePrefixes aPrefix) { + return aMaterial == null ? null : getGem(aMaterial, aPrefix.mMaterialAmount); + } + + public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) { + ItemStack rStack = null; + if (((aMaterialAmount >= M))) + rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M); + if (rStack == null) { + if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16)) + rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M); + if ((((aMaterialAmount * 4) >= M))) + rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M); + } + return rStack; + } + + public static ItemStack getDust(MaterialStack aMaterial) { + return aMaterial == null ? null : getDust(aMaterial.mMaterial, aMaterial.mAmount); + } + + public static ItemStack getDust(Materials aMaterial, OrePrefixes aPrefix) { + return aMaterial == null ? null : getDust(aMaterial, aPrefix.mMaterialAmount); + } + + public static ItemStack getDust(Materials aMaterial, long aMaterialAmount) { + if (aMaterialAmount <= 0) return null; + ItemStack rStack = null; + if (((aMaterialAmount % M == 0) || aMaterialAmount >= M * 16)) + rStack = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); + if (rStack == null && (((aMaterialAmount * 4) % M == 0) || aMaterialAmount >= M * 8)) + rStack = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); + if (rStack == null && (((aMaterialAmount * 9) >= M))) + rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); + return rStack; + } + + public static ItemStack getIngot(MaterialStack aMaterial) { + return aMaterial == null ? null : getIngot(aMaterial.mMaterial, aMaterial.mAmount); + } + + public static ItemStack getIngot(Materials aMaterial, OrePrefixes aPrefix) { + return aMaterial == null ? null : getIngot(aMaterial, aPrefix.mMaterialAmount); + } + + public static ItemStack getIngot(Materials aMaterial, long aMaterialAmount) { + if (aMaterialAmount <= 0) return null; + ItemStack rStack = null; + if (((aMaterialAmount % (M * 9) == 0 && aMaterialAmount / (M * 9) > 1) || aMaterialAmount >= M * 72)) + rStack = get(OrePrefixes.block, aMaterial, aMaterialAmount / (M * 9)); + if (rStack == null && ((aMaterialAmount % M == 0) || aMaterialAmount >= M * 8)) + rStack = get(OrePrefixes.ingot, aMaterial, aMaterialAmount / M); + if (rStack == null && (((aMaterialAmount * 9) >= M))) + rStack = get(OrePrefixes.nugget, aMaterial, (aMaterialAmount * 9) / M); + return rStack; + } + + public static ItemStack getIngotOrDust(Materials aMaterial, long aMaterialAmount) { + if (aMaterialAmount <= 0) return null; + ItemStack rStack = getIngot(aMaterial, aMaterialAmount); + if (rStack == null) rStack = getDust(aMaterial, aMaterialAmount); + return rStack; + } + + public static ItemStack getIngotOrDust(MaterialStack aMaterial) { + ItemStack rStack = getIngot(aMaterial); + if(aMaterial!=null&&aMaterial.mMaterial!=null&&(aMaterial.mMaterial==Materials.Naquadah||aMaterial.mMaterial==Materials.NaquadahEnriched))rStack = getDust(aMaterial); + if (rStack == null) rStack = getDust(aMaterial); + return rStack; + } + + public static ItemStack getDustOrIngot(Materials aMaterial, long aMaterialAmount) { + if (aMaterialAmount <= 0) return null; + ItemStack rStack = getDust(aMaterial, aMaterialAmount); + if (rStack == null) rStack = getIngot(aMaterial, aMaterialAmount); + return rStack; + } + + public static ItemStack getDustOrIngot(MaterialStack aMaterial) { + ItemStack rStack = getDust(aMaterial); + if (rStack == null) rStack = getIngot(aMaterial); + return rStack; + } + + /** + * @return a Copy of the OreDictionary.getOres() List + */ + public static ArrayList getOres(OrePrefixes aPrefix, Object aMaterial) { + return getOres(aPrefix.get(aMaterial)); + } + + /** + * @return a Copy of the OreDictionary.getOres() List + */ + public static ArrayList getOres(Object aOreName) { + String aName = aOreName == null ? E : aOreName.toString(); + ArrayList rList = new ArrayList(); + if (GT_Utility.isStringValid(aName)) rList.addAll(OreDictionary.getOres(aName)); + return rList; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java new file mode 100644 index 0000000000..74655fb744 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java @@ -0,0 +1,35 @@ +package gtPlusPlus.xmod.gregtech.api.util; + +import java.util.HashMap; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; + +public class SpecialBehaviourTooltipHandler { + + private static final HashMap mTooltipCache = new HashMap(); + + public static void addTooltipForItem(ItemStack aStack, String aTooltip) { + mTooltipCache.put(aStack, aTooltip); + } + + @SubscribeEvent + public void onItemTooltip(ItemTooltipEvent event){ + if (event != null) { + if (event.itemStack != null) { + for (ItemStack aKey : mTooltipCache.keySet()) { + if (GT_Utility.areStacksEqual(aKey, event.itemStack, false)) { + String s = mTooltipCache.get(aKey); + if (s != null && s.length() > 0) { + event.toolTip.add(EnumChatFormatting.RED+s); + } + } + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java new file mode 100644 index 0000000000..795fd18826 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen.java @@ -0,0 +1,61 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; + +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +public abstract class GTPP_Worldgen{ + + public final String mWorldGenName; + public final boolean mEnabled; + private final Map mDimensionMap = new ConcurrentHashMap(); + + public GTPP_Worldgen(String aName, List aList, boolean aDefault) { + mWorldGenName = aName; + mEnabled = sCustomWorldgenFile.get("worldgen", mWorldGenName, aDefault); + if (mEnabled) aList.add(this); + } + + /** + * @param aWorld The World Object + * @param aRandom The Random Generator to use + * @param aBiome The Name of the Biome (always != null) + * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End + * @param aChunkX xCoord of the Chunk + * @param aChunkZ zCoord of the Chunk + * @return if the Worldgeneration has been successfully completed + */ + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + return false; + } + + /** + * @param aWorld The World Object + * @param aRandom The Random Generator to use + * @param aBiome The Name of the Biome (always != null) + * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End + * @param aChunkX xCoord of the Chunk + * @param aChunkZ zCoord of the Chunk + * @return if the Worldgeneration has been successfully completed + */ + public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + return false; + } + + public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) { + String aDimName = aWorld.provider.getDimensionName(); + Boolean tAllowed = mDimensionMap.get(aDimName); + if (tAllowed == null) { + boolean tValue = sCustomWorldgenFile.get("worldgen.dimensions." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType); + mDimensionMap.put(aDimName, tValue); + return tValue; + } + return tAllowed; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java new file mode 100644 index 0000000000..ca78a72e04 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java @@ -0,0 +1,77 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import java.util.Collection; +import java.util.Random; + +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +public class GTPP_Worldgen_Boulder extends GTPP_Worldgen_Ore { + public GTPP_Worldgen_Boulder(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, boolean aAllowToGenerateinVoid) { + super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); + } + + @Override + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { + for (int i = 0; i < mAmount; i++) { + int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); + Block tBlock = aWorld.getBlock(tX, tY - 7, tZ); + if (tBlock != null && tBlock.isOpaqueCube() && aWorld.getBlock(tX, tY - 6, tZ).isAir(aWorld, tX, tY - 6, tZ)) { + float math_pi = CORE.PI; + float var6 = aRandom.nextFloat() * math_pi; + float var1b = mSize / 8.0F; + float var3b = MathHelper.sin(var6) * var1b; float var4b = MathHelper.cos(var6) * var1b; + float var8b = -2*var3b;float var9b = -2*var4b; + int var10b = (tX + 8);int var11b = (tZ + 8); + float var7 = (var10b + var3b); + float var11 = (var11b + var4b); + int var5b = aRandom.nextInt(3);int var6b = aRandom.nextInt(3);int var7b = var6b - var5b; + float var15 = (tY + var5b - 2); + float var12b = math_pi / mSize; + + for (int var19 = 0; var19 <= mSize; ++var19) { + float var2b = var19 / mSize; + float var20 = var7 + var8b * var2b; + float var22 = var15 + var7b * var2b; + float var24 = var11 + var9b * var2b; + float var26 = aRandom.nextFloat() * mSize / 16.0F; + float var28 = ((MathHelper.sin(var19 * var12b) + 1.0F) * var26 + 1.0F) / 2.0F; + int var32 = MathHelper.floor_float(var20 - var28); + int var33 = MathHelper.floor_float(var22 - var28); + int var34 = MathHelper.floor_float(var24 - var28); + int var35 = MathHelper.floor_float(var20 + var28); + int var36 = MathHelper.floor_float(var22 + var28); + int var37 = MathHelper.floor_float(var24 + var28); + + for (int var38 = var32; var38 <= var35; ++var38) { + float var39 = (var38 + 0.5F - var20) / (var28); + float var13b = var39 * var39; + if (var13b < 1.0F) { + for (int var41 = var33; var41 <= var36; ++var41) { + float var42 = (var41 + 0.5F - var22) / (var28); + float var14b = var13b + var42 * var42; + if (var14b < 1.0F) { + for (int var44 = var34; var44 <= var37; ++var44) { + float var45 = (var44 + 0.5F - var24) / (var28); + Block block = aWorld.getBlock(var38, var41, var44); + if (var14b + var45 * var45 < 1.0F && ((mAllowToGenerateinVoid && aWorld.getBlock(var38, var41, var44).isAir(aWorld, var38, var41, var44)) || (block != null && !(block instanceof BlockContainer)))) { + aWorld.setBlock(var38, var41, var44, mBlock, mBlockMeta, 0); + } + } + } + } + } + } + } + } + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java new file mode 100644 index 0000000000..7cd215aa4e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java @@ -0,0 +1,167 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.common.blocks.GT_TileEntity_Ores; +import gregtech.loaders.misc.GT_Achievements; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; + +public class GTPP_Worldgen_GT_Ore_Layer +extends GTPP_Worldgen { + public static ArrayList sList = new ArrayList(); + public static int sWeight = 0; + public final short mMinY; + public final short mMaxY; + public final short mWeight; + public final short mDensity; + public final short mSize; + public short mPrimaryMeta; + public short mSecondaryMeta; + public short mBetweenMeta; + public short mSporadicMeta; + public final String mRestrictBiome; + public final boolean mDarkWorld; + public final String aTextWorldgen = "worldgen.gtpp."; + + public GTPP_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { + super(aName, sList, aDefault); + this.mDarkWorld = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); + this.mMinY = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); + this.mMaxY = ((short) Math.max(this.mMinY + 5, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); + this.mWeight = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); + this.mDensity = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); + this.mSize = ((short) Math.max(1, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); + this.mPrimaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); + this.mSecondaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); + this.mBetweenMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); + this.mSporadicMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); + this.mRestrictBiome = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); + + if (this.mEnabled) { + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + sWeight += this.mWeight; + } + } + + public GTPP_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, + int aSize, Material aPrimary, Material aSecondary, Material aBetween, + Material aSporadic) { + super(aName, sList, aDefault); + this.mDarkWorld = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Darkworld", true); + this.mMinY = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); + this.mMaxY = ((short) Math.max(this.mMinY + 5, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY))); + this.mWeight = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight)); + this.mDensity = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity)); + this.mSize = ((short) Math.max(1, sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize))); + /*this.mPrimaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); + this.mSecondaryMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); + this.mBetweenMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); + this.mSporadicMeta = ((short) sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); + */this.mRestrictBiome = sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None"); + + if (this.mEnabled) { + /* GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, false, false, false); + */ sWeight += this.mWeight; + } + } + + @Override + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { + return false; //Not the correct biome for ore mix + } + if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (false)) || ((aDimensionType == 0) && (this.mDarkWorld)) || ((aDimensionType == 1) && (false)) || ((aWorld.provider.getDimensionName().equals("Moon")) && (false)) || ((aWorld.provider.getDimensionName().equals("Mars")) && (false)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + return false; + } + int tMinY = this.mMinY + aRandom.nextInt(this.mMaxY - this.mMinY - 5); + + int cX = aChunkX - aRandom.nextInt(this.mSize); + int eX = aChunkX + 16 + aRandom.nextInt(this.mSize); + for (int tX = cX; tX <= eX; tX++) { + int cZ = aChunkZ - aRandom.nextInt(this.mSize); + int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize); + for (int tZ = cZ; tZ <= eZ; tZ++) { + if (this.mSecondaryMeta > 0) { + for (int i = tMinY - 1; i < tMinY + 2; i++) { + if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) { + setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false); + } + } + } + if ((this.mBetweenMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) { + setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false); + } + if (this.mPrimaryMeta > 0) { + for (int i = tMinY + 3; i < tMinY + 6; i++) { + if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) { + setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false); + } + } + } + if ((this.mSporadicMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) { + setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false); + } + } + } + if (GT_Values.D1) { + System.out.println("Generated Orevein: " + this.mWorldGenName+" "+aChunkX +" "+ aChunkZ); + } + return true; + } + private Method mSetOre = null; + private boolean setOreBlock(World world, int x, int y, int z, int secondarymeta, boolean bool){ + + if (mSetOre == null){ + try { + mSetOre = GT_TileEntity_Ores.class.getMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class); + } + catch (SecurityException | NoSuchMethodException e) { + try { + mSetOre = GT_TileEntity_Ores.class.getMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class); + } + catch (SecurityException | NoSuchMethodException r) {} + } + } + + if (mSetOre != null) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + try { + return (boolean) mSetOre.invoke(world, x, y, z, secondarymeta, bool); + } + catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException t) { + return false; + } + } + else { + try { + return (boolean) mSetOre.invoke(world, x, y, z, secondarymeta); + } + catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException t) { + return false;} + } + } + else { + return false; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java new file mode 100644 index 0000000000..aae3bdd48a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Handler.java @@ -0,0 +1,41 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import static gtPlusPlus.xmod.gregtech.api.world.WorldGenUtils.mOresToRegister; + +import gtPlusPlus.core.material.Material; + +public class GTPP_Worldgen_Handler implements Runnable{ + + + + @Override + public void run() { + + for (GT_OreVein_Object ore : mOresToRegister){ + generateNewVein(ore); + } + + } + + + + private final GTPP_Worldgen_GT_Ore_Layer generateNewVein(final GT_OreVein_Object ore){ + return generateNewVein(ore.mOreMixName, ore.minY, ore.maxY, ore.weight, ore.density, ore.size, ore.aPrimary, ore.aSecondary, ore.aBetween, ore.aSporadic); + } + + private final GTPP_Worldgen_GT_Ore_Layer generateNewVein(String mOreMixName, int minY, int maxY, int weight, int density, int size, + Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic){ + return new GTPP_Worldgen_GT_Ore_Layer( + "ore.mix."+mOreMixName, //String aName, + true, //boolean aDefault, + minY, maxY, //int aMinY, int aMaxY, + weight, //int aWeight, + density, //int aDensity, + size, //int aSize, + aPrimary, //Materials aPrimary, + aSecondary, //Materials aSecondary, + aBetween, //Materials aBetween, + aSporadic); //Materials aSporadic + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java new file mode 100644 index 0000000000..2d7f817060 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore.java @@ -0,0 +1,33 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile; + +import java.util.ArrayList; +import java.util.Collection; + +import net.minecraft.block.Block; + +import gtPlusPlus.xmod.gregtech.HANDLER_GT; + +public abstract class GTPP_Worldgen_Ore extends GTPP_Worldgen { + public final int mBlockMeta, mAmount, mSize, mMinY, mMaxY, mProbability, mDimensionType; + public final Block mBlock; + public final Collection mBiomeList; + public final boolean mAllowToGenerateinVoid; + private final String aTextWorldgen = "worldgen."; + + public GTPP_Worldgen_Ore(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, boolean aAllowToGenerateinVoid) { + super(aName, HANDLER_GT.sCustomWorldgenList, aDefault); + mDimensionType = aDimensionType; + mBlock = aBlock; + mBlockMeta = Math.min(Math.max(aBlockMeta, 0), 15); + mProbability = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "Probability", aProbability); + mAmount = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "Amount", aAmount); + mSize = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "Size", aSize); + mMinY = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "MinHeight", aMinY); + mMaxY = sCustomWorldgenFile.get(aTextWorldgen + mWorldGenName, "MaxHeight", aMaxY); + if (aBiomeList == null) mBiomeList = new ArrayList(); + else mBiomeList = aBiomeList; + mAllowToGenerateinVoid = aAllowToGenerateinVoid; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java new file mode 100644 index 0000000000..e66106ad4a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java @@ -0,0 +1,75 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import java.util.Collection; +import java.util.Random; + +import gtPlusPlus.core.lib.CORE; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; + +public class GTPP_Worldgen_Ore_Normal extends GTPP_Worldgen_Ore { + public GTPP_Worldgen_Ore_Normal(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, boolean aAllowToGenerateinVoid) { + super(aName, aDefault, aBlock, aBlockMeta, aDimensionType, aAmount, aSize, aProbability, aMinY, aMaxY, aBiomeList, aAllowToGenerateinVoid); + } + + @Override + public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + if (isGenerationAllowed(aWorld, aDimensionType, mDimensionType) && (mBiomeList.isEmpty() || mBiomeList.contains(aBiome)) && (mProbability <= 1 || aRandom.nextInt(mProbability) == 0)) { + for (int i = 0; i < mAmount; i++) { + int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16); + if (mAllowToGenerateinVoid || aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) { + float math_pi = CORE.PI;float var1b = mSize / 8.0F; + float var6 = aRandom.nextFloat() * math_pi; + float var3b = MathHelper.sin(var6) * var1b; float var4b = MathHelper.cos(var6) * var1b; + float var8b = -2*var3b;float var9b = -2*var4b; + int var10b = (tX + 8);int var11b = (tZ + 8); + float var7 = (var10b + var3b); + float var11 = (var11b + var4b); + int var5b = aRandom.nextInt(3);int var6b = aRandom.nextInt(3);int var7b = var6b - var5b; + float var15 = (tY + var5b - 2); + float var12b = math_pi / mSize; + + for (int var19 = 0; var19 <= mSize; ++var19) { + float var2b = var19 / mSize; + float var20 = var7 + var8b * var2b; + float var22 = var15 + var7b * var2b; + float var24 = var11 + var9b * var2b; + float var26 = aRandom.nextFloat() * mSize / 16.0F; + float var28 = ((MathHelper.sin(var19 * var12b) + 1.0F) * var26 + 1.0F) / 2.0F; + int var32 = MathHelper.floor_float(var20 - var28); + int var33 = MathHelper.floor_float(var22 - var28); + int var34 = MathHelper.floor_float(var24 - var28); + int var35 = MathHelper.floor_float(var20 + var28); + int var36 = MathHelper.floor_float(var22 + var28); + int var37 = MathHelper.floor_float(var24 + var28); + + for (int var38 = var32; var38 <= var35; ++var38) { + float var39 = (var38 + 0.5F - var20) / (var28); + float var13b = var39 * var39; + if (var13b < 1.0F) { + for (int var41 = var33; var41 <= var36; ++var41) { + float var42 = (var41 + 0.5F - var22) / (var28); + float var14b = var13b + var42 * var42; + if (var14b < 1.0F) { + for (int var44 = var34; var44 <= var37; ++var44) { + float var45 = (var44 + 0.5F - var24) / (var28); + Block block = aWorld.getBlock(var38, var41, var44); + if (var14b + var45 * var45 < 1.0F && ((mAllowToGenerateinVoid && aWorld.getBlock(var38, var41, var44).isAir(aWorld, var38, var41, var44)) || (block != null && (block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.stone) || block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.end_stone) || block.isReplaceableOreGen(aWorld, var38, var41, var44, Blocks.netherrack))))) { + aWorld.setBlock(var38, var41, var44, mBlock, mBlockMeta, 0); + } + } + } + } + } + } + } + } + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java new file mode 100644 index 0000000000..770083fee8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/GT_OreVein_Object.java @@ -0,0 +1,31 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import gtPlusPlus.core.material.Material; + +public class GT_OreVein_Object { + + final String mOreMixName; //String aName, + final int minY, maxY; //int aMinY, int aMaxY, + final int weight; //int aWeight, + final int density; //int aDensity, + final int size; //int aSize, + final Material aPrimary; //Materials aPrimary, + final Material aSecondary; //Materials aSecondary, + final Material aBetween; //Materials aBetween, + final Material aSporadic; //Materials aSporadic + + GT_OreVein_Object(String mOreMixName, int minY, int maxY, int weight, int density, int size, + Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic){ + this.mOreMixName = mOreMixName; + this.minY = minY; + this.maxY = maxY; + this.weight = weight; + this.density = density; + this.size = size; + this.aPrimary = aPrimary; + this.aSecondary = aSecondary; + this.aBetween = aBetween; + this.aSporadic = aSporadic; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java new file mode 100644 index 0000000000..fd0738596a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/world/WorldGenUtils.java @@ -0,0 +1,23 @@ +package gtPlusPlus.xmod.gregtech.api.world; + +import java.util.ArrayList; +import java.util.List; + +import gtPlusPlus.core.material.Material; + +public class WorldGenUtils { + + static List mOresToRegister = new ArrayList(); + + public static final void addNewOreMixForWorldgen(GT_OreVein_Object newVein){ + mOresToRegister.add(newVein); + } + + public static boolean generateNewOreVeinObject(String mOreMixName, int minY, int maxY, int weight, int density, int size, + Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic){ + GT_OreVein_Object newVein = new GT_OreVein_Object(mOreMixName, minY, maxY, weight, density, size, aPrimary, aSecondary, aBetween, aSporadic); + addNewOreMixForWorldgen(newVein); + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java new file mode 100644 index 0000000000..091ee734e6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java @@ -0,0 +1,631 @@ +package gtPlusPlus.xmod.gregtech.common; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.util.*; + +import org.apache.commons.lang3.ArrayUtils; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.util.*; +import gregtech.common.GT_Proxy; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.FormattedTooltipString; +import gtPlusPlus.core.handler.AchievementHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.*; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.BaseCustomTileEntity; +import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.BaseCustomPower_MTE; +import gtPlusPlus.xmod.gregtech.common.covers.CoverManager; +import gtPlusPlus.xmod.gregtech.common.helpers.MachineUpdateHandler; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator; +import ic2.core.init.BlocksItems; +import ic2.core.init.InternalName; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class Meta_GT_Proxy { + + static { + Logger.INFO("GT_PROXY - initialized."); + sDoesVolumetricFlaskExist = ReflectionUtils.doesClassExist("gregtech.common.items.GT_VolumetricFlask"); + } + + public static List GT_BlockIconload = new ArrayList<>(); + public static List GT_ItemIconload = new ArrayList<>(); + + public static AutoMap GT_ValidHeatingCoilMetas = new AutoMap(); + + private static Class sBaseMetaTileEntityClass; + private static Class sBaseMetaTileEntityClass2; + + public static AchievementHandler mAssemblyAchievements; + + public static final Map mCustomGregtechMetaTooltips = new LinkedHashMap(); + + /** + * Does this feature exist within GT? Saves loading useless content if not. + */ + public static final boolean sDoesVolumetricFlaskExist; + + @SideOnly(Side.CLIENT) + public static IIconRegister sBlockIcons, sItemIcons; + + public Meta_GT_Proxy() { + + } + + public static Block sBlockMachines; + + public static void preInit() { + + //New GT++ Block, yay! (Progress) + //sBlockMachines = new GTPP_Block_Machines(); + fixIC2FluidNames(); + + GT_Log.out.println("GT++ Mod: Register TileEntities."); + BaseMetaTileEntity tBaseMetaTileEntity = constructBaseMetaTileEntity(); + BaseMetaTileEntity tBaseMetaTileEntity2 = constructBaseMetaTileEntityCustomPower(); + + GT_Log.out.println("GT++ Mod: Testing BaseMetaTileEntity."); + if (tBaseMetaTileEntity == null || tBaseMetaTileEntity2 == null) { + GT_Log.out.println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft."); + throw new RuntimeException(""); + } + + //Gotta set it here so that we don't try call gregtech too early. + //Must set on the correct side + + if (ReflectionUtils.doesFieldExist(GT_Proxy.class, "gt6Pipe")) { + StaticFields59.mGT6StylePipes = (boolean) StaticFields59.getFieldFromGregtechProxy("gt6Pipe"); + } + else { + StaticFields59.mGT6StylePipes = false; + } + + GT_Log.out.println("GT++ Mod: Registering the BaseMetaTileEntity."); + GameRegistry.registerTileEntity(tBaseMetaTileEntity.getClass(), "BaseMetaTileEntity_GTPP"); + GameRegistry.registerTileEntity(tBaseMetaTileEntity2.getClass(), "BaseMetaTileEntity_GTPP2"); + CoverManager.generateCustomCovers(); + } + + public static void init() { + setValidHeatingCoilMetas(); + PollutionUtils.setPollutionFluids(); + fixIC2FluidNames(); + Utils.registerEvent(new MachineUpdateHandler()); + } + + public static void postInit() { + mAssemblyAchievements = new AchievementHandler(); + fixIC2FluidNames(); + + // Finalise TAE + TAE.finalizeTAE(); + } + + @SuppressWarnings("deprecation") + public static void fixIC2FluidNames() { + //Fix IC2 Hot Water name + try { + String aNewHeatedWaterName = "Heated Water"; + Logger.INFO("Renaming [IC2 Hotspring Water] --> ["+aNewHeatedWaterName+"].");LanguageRegistry.instance().addStringLocalization("fluidHotWater", "Heated Water"); + LanguageRegistry.instance().addStringLocalization("fluidHotWater", aNewHeatedWaterName); + LanguageRegistry.instance().addStringLocalization("ic2.fluidHotWater", aNewHeatedWaterName); + GT_LanguageManager.addStringLocalization("fluidHotWater", aNewHeatedWaterName); + GT_LanguageManager.addStringLocalization("ic2.fluidHotWater", aNewHeatedWaterName); + + Block b = BlocksItems.getFluidBlock(InternalName.fluidHotWater); + if (b != null) { + LanguageRegistry.addName(ItemUtils.getSimpleStack(b), aNewHeatedWaterName); + LanguageRegistry.instance().addStringLocalization(b.getUnlocalizedName(), aNewHeatedWaterName); + GT_LanguageManager.addStringLocalization(b.getUnlocalizedName(), aNewHeatedWaterName); + } + Fluid f = BlocksItems.getFluid(InternalName.fluidHotWater); + if (f != null) { + LanguageRegistry.instance().addStringLocalization(f.getUnlocalizedName(), aNewHeatedWaterName); + GT_LanguageManager.addStringLocalization(f.getUnlocalizedName(), aNewHeatedWaterName); + int aDam = FluidRegistry.getFluidID(f); + ItemStack s = ItemList.Display_Fluid.getWithDamage(1, aDam); + if (s != null) { + LanguageRegistry.addName(s, aNewHeatedWaterName); + } + } + + String[] aLangs = new String[] { + "de_DE", + "en_US", + "en_GB", + "en_IC", + "es_AR", + "es_ES", + "es_MX", + "es_UY", + "es_VE", + "fr_CA", + "fr_FR", + "it_IT", + "ko_KR", + "pt_BR", + "pt_PT", + "ru_RU", + "sv_SE", + "tr_TR", + "zh_CN", + "zh_TW", + }; + String[] aLangValues = new String[] { + "Erhitztes Wasser", + "Heated Water", + "Heated Water", + "Heated Water", + "Agua caliente", + "Agua caliente", + "Agua caliente", + "Agua caliente", + "Agua caliente", + "Eau chauffée", + "Eau chauffée", + "Acqua riscaldata", + "온수", + "Ãgua aquecida", + "Ãgua aquecida", + "Вода Ñ Ð¿Ð¾Ð´Ð¾Ð³Ñ€ÐµÐ²Ð¾Ð¼", + "Uppvärmt vatten", + "Isıtılmış Su", + "热水", + "热水", + + }; + for (int i=0;i aFreezerMapRebaked = new AutoMap(); + AutoMap aRemovedRecipes = new AutoMap(); + + //Find recipes containing Plasma and map them + for (GT_Recipe y : GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList) { + if (y.mFluidInputs.length > 0) { + for (FluidStack r : y.mFluidInputs) { + if (r.getUnlocalizedName().toLowerCase().contains("plasma")) { + aRemovedRecipes.put(y); + continue; + } + } + aFreezerMapRebaked.put(y); + } + } + + AutoMap aNewRecipes = new AutoMap(); + int aAtomicMass = 0; + int aAtomicTier = 0; + + final FluidStack NULL_PLASMA = Materials._NULL.getPlasma(1); + + for (String s : ELEMENT.NAMES) { + + aAtomicMass++; + aAtomicTier = (aAtomicMass/30)+1; + FluidStack aMoltenFluid = null; + FluidStack aPlasma = null; + + //Try Get Material via Gregtech + Materials aGregMaterial = MaterialUtils.getMaterial(s); + if (aGregMaterial != null) { + aMoltenFluid = aGregMaterial.getMolten(1); + if (aMoltenFluid == null) { + aMoltenFluid = aGregMaterial.getFluid(1); + if (aMoltenFluid == null) { + aMoltenFluid = aGregMaterial.getGas(1); + if (aMoltenFluid == null) { + aMoltenFluid = aGregMaterial.getSolid(1); + } + } + } + aPlasma = aGregMaterial.getPlasma(100); + } + + //Just wildcard values + if (aMoltenFluid == null || aPlasma == null) { + if (aMoltenFluid == null) { + aMoltenFluid = FluidUtils.getWildcardFluidStack(s, 1); + } + if (aPlasma == null) { + aPlasma = FluidUtils.getFluidStack("plasma."+s.toLowerCase(), 1); + } + } + + //Skip this material + if (aMoltenFluid == null || aPlasma == null || aPlasma.isFluidEqual(NULL_PLASMA)) { + Logger.INFO("Could not generate Advanced Vacuum Freezer recipe. Cooling "+s+" plasma. Molten Form Exists? "+(aMoltenFluid != null)+" | Plasma Exists? "+(aPlasma != null)); + continue; + } + else { + //Build a new plasma recipe + int aTotalTickTime = (20 * 1 + (aAtomicMass)); + GTPP_Recipe aTempRecipe = new GTPP_Recipe(true, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {10000}, + new FluidStack[] { + aPlasma, + FluidUtils.getFluidStack("cryotheum", aTotalTickTime) + }, + new FluidStack[] { + aMoltenFluid + }, + aTotalTickTime, + (int) GT_Values.V[4+aAtomicTier], + aAtomicMass); + + //Add it to the map if it's valid + if (aTempRecipe != null) { + aNewRecipes.put(aTempRecipe); + } + } + + } + + + //Add the new recipes to the map we will rebake over the original + for (GTPP_Recipe w : aNewRecipes) { + aFreezerMapRebaked.put(w); + } + + //Best not touch the original map if we don't have a valid map to override it with. + if (aFreezerMapRebaked.size() > 0) { + + int aOriginalCount = GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.size(); + + //Empty the original map + GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.clear(); + + //Rebake the real map + for (GT_Recipe w : aFreezerMapRebaked) { + GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.add(w); + } + + return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mRecipeList.size() >= aOriginalCount; + } + + return false; + } + + public static TileEntity constructCustomGregtechMetaTileEntityByMeta(int aMeta) { + if (aMeta == 12) { + return Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower(); + } + else { + return Meta_GT_Proxy.constructBaseMetaTileEntity(); + } + } + + public static BaseCustomTileEntity constructBaseMetaTileEntity() { + if (sBaseMetaTileEntityClass == null) { + try { + sBaseMetaTileEntityClass = BaseCustomTileEntity.class; + return (BaseCustomTileEntity) BaseCustomTileEntity.class.newInstance(); + } catch (Throwable arg1) { + try { + Constructor g = BaseCustomTileEntity.class.getConstructors()[0]; + g.setAccessible(true); + return (BaseCustomTileEntity) g.newInstance(); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException | SecurityException e) { + } + } + } + try { + return (BaseCustomTileEntity) ((BaseCustomTileEntity) sBaseMetaTileEntityClass.newInstance()); + } catch (Throwable arg0) { + arg0.printStackTrace(GT_Log.err); + try { + Constructor g = BaseCustomTileEntity.class.getConstructors()[0]; + g.setAccessible(true); + return (BaseCustomTileEntity) g.newInstance(); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException | SecurityException e) { + GT_Log.err + .println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft."); + e.printStackTrace(GT_Log.err); + throw new RuntimeException(e); + } + } + } + + public static BaseCustomPower_MTE constructBaseMetaTileEntityCustomPower() { + if (sBaseMetaTileEntityClass2 == null) { + try { + sBaseMetaTileEntityClass2 = BaseCustomPower_MTE.class; + return (BaseCustomPower_MTE) BaseCustomPower_MTE.class.newInstance(); + } catch (Throwable arg1) { + try { + Constructor g = BaseCustomPower_MTE.class.getConstructors()[0]; + g.setAccessible(true); + return (BaseCustomPower_MTE) g.newInstance(); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException | SecurityException e) { + // e.printStackTrace(); + } + } + } + + try { + return (BaseCustomPower_MTE) ((BaseCustomPower_MTE) sBaseMetaTileEntityClass2.newInstance()); + } catch (Throwable arg0) { + arg0.printStackTrace(GT_Log.err); + try { + Constructor g = BaseCustomPower_MTE.class.getConstructors()[0]; + g.setAccessible(true); + return (BaseCustomPower_MTE) g.newInstance(); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException | SecurityException e) { + GT_Log.err + .println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft."); + e.printStackTrace(GT_Log.err); + throw new RuntimeException(e); + } + } + } + + + + + + public static boolean setTileEntityClassAsBlacklistedInWorldAccelerator(String aClassName) { + if (CORE.GTNH) { + Class aMainModClass = ReflectionUtils.getClass("com.dreammaster.main.MainRegistry"); + Class aCoreModConfig = ReflectionUtils.getClass("com.dreammaster.config"); + if (aMainModClass != null && aCoreModConfig != null) { + Field aCoreConfig = ReflectionUtils.getField(aMainModClass, "CoreConfig"); + if (aCoreConfig != null) { + Field aBlackList = ReflectionUtils.getField(aCoreModConfig, "BlacklistedTileEntiyClassNames"); + Object aInstance = ReflectionUtils.getFieldValue(aCoreConfig); + if (aBlackList != null && aInstance != null) { + String[] aBlackListValue = (String[]) ReflectionUtils.getFieldValue(aBlackList, aInstance); + if (aBlackListValue != null) { + aBlackListValue = ArrayUtils.add(aBlackListValue, aClassName); + ReflectionUtils.setField(aInstance, aBlackList, aBlackListValue); + return true; + } + } + } + } + } + else { + GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames = ArrayUtils.add(GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames, aClassName); + return true; + } + return false; + } + + + + public static void setValidHeatingCoilMetas() { + for (int i = 0; i <= 6; i++ ) { + GT_ValidHeatingCoilMetas.put(i); + } + if (CORE.GTNH) { + for (int i = 7; i <= 8; i++ ) { + GT_ValidHeatingCoilMetas.put(i); + } + } + } + + public static boolean areWeUsingGregtech5uExperimental(){ + final int version = GregTech_API.VERSION; + if ((version == 508) || (version == 507)){ + return false; + } + else if (version == 509){ + return true; + } + else { + return false; + } + } + + static GT_Proxy[] mProxies = new GT_Proxy[2]; + + /** + * @deprecated Use {@link StaticFields59#getFieldFromGregtechProxy(boolean,String)} instead + */ + public static Object getFieldFromGregtechProxy(boolean client, String fieldName) { + return StaticFields59.getFieldFromGregtechProxy(client, fieldName); + } + + public static void setCustomGregtechTooltip(String aNbtTagName, FormattedTooltipString aData) { + mCustomGregtechMetaTooltips.put(aNbtTagName, aData); + } + + public static void conStructGtTileBlockTooltip(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { + try { + int tDamage = aStack.getItemDamage(); + if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) { + return; + } + + if (GregTech_API.METATILEENTITIES[tDamage] != null) { + IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); + if (tTileEntity.getDescription() != null) { + int i = 0; + for (String tDescription : tTileEntity.getDescription()) { + if (GT_Utility.isStringValid(tDescription)) { + if(tDescription.contains("%%%")){ + String[] tString = tDescription.split("%%%"); + if(tString.length>=2){ + StringBuffer tBuffer = new StringBuffer(); + Object tRep[] = new String[tString.length / 2]; + for (int j = 0; j < tString.length; j++) + if (j % 2 == 0) tBuffer.append(tString[j]); + else {tBuffer.append(" %s"); tRep[j / 2] = tString[j];} + aList.add(String.format(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tBuffer.toString(), !GregTech_API.sPostloadFinished), tRep)); + } + }else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished ); + aList.add(tTranslated.equals("") ? tDescription : tTranslated);} + }else i++; + } + } + + + + if (tTileEntity.getEUCapacity() > 0L) { + + final long tVoltage = tTileEntity.getInputVoltage(); + byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); + + //Custom handling + if (tDamage < 30500 && tDamage >= 30400) { + int aOffset = tDamage - 30400; + if ((aOffset) <= 10) { + tTier -= 2; + aList.add(EnumChatFormatting.BOLD+"16"+" Fuse Slots"+EnumChatFormatting.GRAY); + aList.add("Per each fuse, you may insert "+EnumChatFormatting.YELLOW+(GT_Values.V[tTier])+EnumChatFormatting.GRAY+" EU/t"); + aList.add("However this "+EnumChatFormatting.ITALIC+EnumChatFormatting.RED+"MUST"+EnumChatFormatting.GRAY+" be in a single Amp"); + aList.add("This machine can accept upto a single amp of "+GT_Values.VN[Math.min(tTier+2, 12)]+" as a result"); + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Breaker_Loss", "Breaker Loss: "+EnumChatFormatting.RED+""+(GT_Values.V[Math.max(tTier-1, 0)]/10)+EnumChatFormatting.GRAY+" EU/t", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + } + + + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Special_Power_1", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + } + + + if (tTileEntity.getInputVoltage() > 0L) { + String inA = "0"; + if (tTileEntity.getInputAmperage() >= 1L) { + inA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + else { + inA = " at " + EnumChatFormatting.WHITE + tTileEntity.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + String a1 = "Voltage IN: "+EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + + EnumChatFormatting.GRAY + inA; + aList.add(a1); + } + + if (tTileEntity.getOutputVoltage() > 0L) { + String outA = "0"; + if (tTileEntity.getOutputAmperage() >= 1L) { + outA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + else { + outA = " at " + EnumChatFormatting.WHITE + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + String a1 = "Voltage OUT: "+EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + + EnumChatFormatting.GRAY + outA; + aList.add(a1); + } + + + if (tTileEntity.getOutputVoltage() > 0L) { + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Lossess_EU", "Transmission Loss: "+EnumChatFormatting.DARK_BLUE+""+(tDamage < 30500 && tDamage >= 30400 ? 0 : 1), !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + } + + if (tTileEntity.getEUCapacity() > 0) { + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE2", + "Internal Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY + " EU"); + } + } + + /*if (tTileEntity.getEUCapacity() > 0L) { + if (tTileEntity.getInputVoltage() > 0L) { + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY); + } + if (tTileEntity.getOutputVoltage() > 0L) { + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY); + } + if (tTileEntity.getOutputAmperage() > 1L) { + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY); + } + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY); + }*/ + + } + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + if (aNBT.getBoolean("mMuffler")) { + aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished )); + } + if (aNBT.getBoolean("mSteamConverter")) { + aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished )); + } + int tAmount = 0; + if ((tAmount = aNBT.getByte("mSteamTanks")) > 0) { + aList.add(tAmount + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMTANKS", "Steam Tank Upgrades", !GregTech_API.sPostloadFinished )); + } + + FluidStack afluid = net.minecraftforge.fluids.FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid")); + if (afluid != null) { + int tFluidAmount = afluid.amount; + if (tFluidAmount > 0) { + aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_FLUIDTANK", "Tank Fluid: "+tFluidAmount+"L "+afluid.getLocalizedName()+"", !GregTech_API.sPostloadFinished )); + } + } + + } + + //Add Custom Here + + //Add Custom Tooltips + for (String s : mCustomGregtechMetaTooltips.keySet()) { + if (aNBT.hasKey(s)) { + String aTip = mCustomGregtechMetaTooltips.get(s).getTooltip(aNBT.getString(s)); + aList.add(aTip); + } + } + + //Add GT++ Stuff + + if (tDamage >= 30400 && tDamage < 30500) { + aList.add(EnumChatFormatting.UNDERLINE+"Special GT++ Machine"); + } + if ((tDamage >= 750 && tDamage < 1000) || (tDamage >= 30000 && tDamage < 31000)) { + aList.add(CORE.GT_Tooltip); + } + + + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java new file mode 100644 index 0000000000..44c580fe4f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java @@ -0,0 +1,303 @@ +package gtPlusPlus.xmod.gregtech.common; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.common.GT_Proxy; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ProxyFinder; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +public class StaticFields59 { + + + public static boolean mGT6StylePipes; + + public static final Field mGtBlockCasings5; + public static final Field mPreventableComponents; + public static final Field mDisabledItems; + public static final Field mMultiblockChemicalRecipes; + public static final Field mPyrolyseRecipes; + public static final Field mDescriptionArray; + public static final Field mCasingTexturePages; + public static final Field mAssLineVisualMapNEI; + public static final GT_Recipe_Map sAssemblylineVisualRecipes; + + public static final Method mCalculatePollutionReduction; + public static final Method mAddFurnaceRecipe; + + private static final Map mMaterialCache = new LinkedHashMap(); + + + //OrePrefixes + + static { + Logger.INFO("[SH] Creating Static Helper for various fields which require reflective access."); + + mGtBlockCasings5 = getField(GregTech_API.class, "sBlockCasings5"); + Logger.INFO("[SH] Got Field: sBlockCasings5"); + mPreventableComponents = getField(OrePrefixes.class, "mPreventableComponents"); + Logger.INFO("[SH] Got Field: mPreventableComponents"); + mDisabledItems = getField(OrePrefixes.class, "mDisabledItems"); + Logger.INFO("[SH] Got Field: mDisabledItems"); + mDescriptionArray = getField(GT_MetaTileEntity_TieredMachineBlock.class, "mDescriptionArray"); + Logger.INFO("[SH] Got Field: mDescriptionArray"); + mCasingTexturePages = getField(BlockIcons.class, "casingTexturePages"); + Logger.INFO("[SH] Got Field: casingTexturePages"); + + mAssLineVisualMapNEI = getField(GT_Recipe_Map.class, "sAssemblylineVisualRecipes"); + Logger.INFO("[SH] Got Field: mAssLineVisualMapNEI"); + GT_Recipe_Map aTemp; + if (mAssLineVisualMapNEI != null) { + try { + aTemp = (GT_Recipe_Map) mAssLineVisualMapNEI.get(null); + Logger.INFO("[SH] Got Field: sAssemblylineVisualRecipes"); + } catch (IllegalArgumentException | IllegalAccessException e) { + aTemp = null; + } + } else { + aTemp = null; + } + + sAssemblylineVisualRecipes = aTemp; + + mMultiblockChemicalRecipes = getField(GT_Recipe_Map.class, "sMultiblockChemicalRecipes"); + Logger.INFO("[SH] Got Field: sMultiblockChemicalRecipes"); + if (ReflectionUtils.doesFieldExist(GT_Recipe.GT_Recipe_Map.class, "sPyrolyseRecipes")) { + mPyrolyseRecipes = getField(GT_Recipe_Map.class, "sPyrolyseRecipes"); + Logger.INFO("[SH] Got Field: sPyrolyseRecipes"); + } + else { + mPyrolyseRecipes = null; + } + + mCalculatePollutionReduction = getMethod(GT_MetaTileEntity_Hatch_Muffler.class, "calculatePollutionReduction", + int.class); + Logger.INFO("[SH] Got Method: calculatePollutionReduction"); + + // Yep... + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, + ItemStack.class); + Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe"); + } else { + mAddFurnaceRecipe = getMethod(GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, + ItemStack.class, boolean.class); + Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe"); + } + + } + + public static synchronized final Block getBlockCasings5() { + try { + return (Block) mGtBlockCasings5.get(GregTech_API.class); + } catch (IllegalArgumentException | IllegalAccessException e) { + return null; + } + } + + public static int calculatePollutionReducation(GT_MetaTileEntity_Hatch_Muffler h, int i) { + try { + return (int) mCalculatePollutionReduction.invoke(h, i); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return 0; + } + } + + public static Field getField(Class a, String b) { + return ReflectionUtils.getField(a, b); + } + + public static Method getMethod(Class a, String b, Class... params) { + return ReflectionUtils.getMethod(a, b, params); + } + + public static synchronized final Collection getOrePrefixesBooleanDisabledItems() { + try { + return (Collection) mDisabledItems.get(OrePrefixes.class); + } catch (IllegalArgumentException | IllegalAccessException e) { + return new ArrayList(); + } + } + + + public static synchronized final List geOrePrefixesBooleanPreventableComponents() { + try { + return (List) mPreventableComponents.get(OrePrefixes.class); + } catch (IllegalArgumentException | IllegalAccessException e) { + return new ArrayList(); + } + } + + public static synchronized final GT_Recipe_Map getLargeChemicalReactorRecipeMap() { + try { + return (GT_Recipe_Map) mMultiblockChemicalRecipes.get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + return null; + } + } + + public static synchronized final GT_Recipe_Map getPyrolyseRecipeMap() { + try { + return mPyrolyseRecipes != null ? (GT_Recipe_Map) mPyrolyseRecipes.get(null) : null; + } catch (IllegalArgumentException | IllegalAccessException e) { + return null; + } + } + + public static Materials getMaterial(String aMaterialName) { + Materials m = mMaterialCache.get(aMaterialName); + if (m != null) { + return m; + } + else { + m = Materials.get(aMaterialName); + if (m != null) { + mMaterialCache.put(aMaterialName, m); + return m; + } + return null; + } + } + + public static String[] getDescriptionArray(GT_MetaTileEntity_TieredMachineBlock aTile) { + try { + return (String[]) mDescriptionArray.get(aTile); + } catch (IllegalArgumentException | IllegalAccessException e) { + return new String[] {aTile.mDescription}; + } + } + + public static ITexture getCasingTexturePages(int a, int b) { + try { + ITexture[][] g = (ITexture[][]) mCasingTexturePages.get(null); + if (g != null) { + return g[a][b]; + } + } + catch (Throwable t) { + + } + return null; + } + + + public static Object getFieldFromGregtechProxy(String fieldName) { + return getFieldFromGregtechProxy(Utils.isServer() ? false : true, fieldName); + } + + public static Object getFieldFromGregtechProxy(boolean client, String fieldName) { + Object proxyGT; + + if (Meta_GT_Proxy.mProxies[0] != null && client) { + proxyGT = Meta_GT_Proxy.mProxies[0]; + } else if (Meta_GT_Proxy.mProxies[1] != null && !client) { + proxyGT = Meta_GT_Proxy.mProxies[1]; + } else { + try { + proxyGT = (client ? ProxyFinder.getClientProxy(GT_Mod.instance) + : ProxyFinder.getServerProxy(GT_Mod.instance)); + } catch (final ReflectiveOperationException e1) { + proxyGT = null; + Logger.INFO("Failed to obtain instance of GT " + (client ? "Client" : "Server") + " proxy."); + } + if (Meta_GT_Proxy.mProxies[0] == null && client) { + Meta_GT_Proxy.mProxies[0] = (GT_Proxy) proxyGT; + } else if (Meta_GT_Proxy.mProxies[1] == null && !client) { + Meta_GT_Proxy.mProxies[1] = (GT_Proxy) proxyGT; + } + } + + if (proxyGT != null && proxyGT instanceof GT_Proxy) { + try { + return ReflectionUtils.getField(proxyGT.getClass(), fieldName).get(proxyGT); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + return null; + } + + + + public static int getTierForCoil(Block aBlock, int aMeta) { + if (aBlock == GregTech_API.sBlockCasings1 && (aMeta >= 12 && aMeta <= 14)) { + return aMeta == 12 ? 1 : aMeta == 13 ? 2 : 3; + } + else if (aBlock == getBlockCasings5() && (aMeta >= 0 && aMeta <= 10)) { + return aMeta; + } + return 0; + } + + public static int getHeatingCapacityForCoil(Block aBlock, int aMeta) { + int aTier = getTierForCoil(aBlock, aMeta); + return aTier > 0 ? getHeatingCapacityForCoilTier(aTier) : 0; + } + + public static int getHeatingCapacityForCoilTier(int aCoilTier) { + int mHeatingCapacity = 0; + switch (aCoilTier) { + case 0: + mHeatingCapacity = 1800; + break; + case 1: + mHeatingCapacity = 2700; + break; + case 2: + mHeatingCapacity = 3600; + break; + case 3: + mHeatingCapacity = 4500; + break; + case 4: + mHeatingCapacity = 5400; + break; + case 5: + mHeatingCapacity = 7200; + break; + case 6: + mHeatingCapacity = 9000; + break; + case 7: + mHeatingCapacity = 9900; + break; + case 8: + mHeatingCapacity = 10800; + break; + case 9: + mHeatingCapacity = 6300; + break; + case 10: + mHeatingCapacity = 9000; + break; + default: + Logger.INFO("Heating Coils are bad."); + mHeatingCapacity = 0; + } + if (CORE.GTNH && aCoilTier <= 10) { + mHeatingCapacity += 1; + } + return mHeatingCapacity; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java new file mode 100644 index 0000000000..01f655c355 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java @@ -0,0 +1,534 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.ArrayList; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.IDebugableBlock; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_Generic_Block; +import gregtech.api.metatileentity.BaseMetaPipeEntity; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.metatileentity.BaseTileEntity; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Item_Machines; +import gregtech.common.blocks.GT_Material_Machines; +import gregtech.common.render.GT_Renderer_Block; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.StatCollector; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider { + public static ThreadLocal mTemporaryTileEntity = new ThreadLocal(); + + public GTPP_Block_Machines() { + super(GTPP_Item_Machines.class, "gtpp.blockmachines", new GT_Material_Machines()); + GregTech_API.registerMachineBlock(this, -1); + this.setHardness(1.0F); + this.setResistance(10.0F); + this.setStepSound(soundTypeMetal); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + this.isBlockContainer = true; + } + + public String getHarvestTool(int aMeta) { + switch (aMeta / 4) { + case 0 : + return "wrench"; + case 1 : + return "wrench"; + case 2 : + return "cutter"; + case 3 : + return "axe"; + default : + return "wrench"; + } + } + + public int getHarvestLevel(int aMeta) { + return aMeta % 4; + } + + protected boolean canSilkHarvest() { + return false; + } + + public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof BaseTileEntity) { + ((BaseTileEntity) tTileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); + } + + } + + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + super.onBlockAdded(aWorld, aX, aY, aZ); + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + + } + + public String getUnlocalizedName() { + int tDamage = 0; + String aUnlocalName = (tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length) + ? (GregTech_API.METATILEENTITIES[tDamage] != null + ? ("gtpp.blockmachines.name" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName()) + : ("gtpp.blockmachines.name")) : ""; + + Logger.INFO("Unlocal Name: "+aUnlocalName); + return aUnlocalName; + } + + public String getLocalizedName() { + String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");; + if (aName.toLowerCase().contains(".name")) { + aName = StatCollector.translateToLocal(getUnlocalizedName() + ".name"); + } + if (aName.toLowerCase().contains(".name")) { + aName = StatCollector.translateToLocal("gt.blockmachines" + ".name"); + } + if (aName.toLowerCase().contains(".name")) { + aName = "BAD"; + } + Logger.INFO("Name: "+aName); + return aName; + } + + public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { + return 0; + } + + public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { + return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 100 : 0; + } + + public int getRenderType() { + return GTPP_Render_MachineBlock.INSTANCE == null ? super.getRenderType() : GTPP_Render_MachineBlock.INSTANCE.mRenderID; + } + + public boolean isFireSource(World aWorld, int aX, int aY, int aZ, ForgeDirection side) { + return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; + } + + public boolean isFlammable(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { + return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; + } + + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + public boolean canConnectRedstone(IBlockAccess var1, int var2, int var3, int var4, int var5) { + return true; + } + + public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + public boolean hasTileEntity(int aMeta) { + return true; + } + + public boolean hasComparatorInputOverride() { + return true; + } + + public boolean renderAsNormalBlock() { + return false; + } + + public boolean canProvidePower() { + return true; + } + + public boolean isOpaqueCube() { + return false; + } + + public TileEntity createNewTileEntity(World aWorld, int aMeta) { + return this.createTileEntity(aWorld, aMeta); + } + + public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { + return BlockIcons.MACHINE_LV_SIDE.getIcon(); + } + + public IIcon getIcon(int aSide, int aMeta) { + return BlockIcons.MACHINE_LV_SIDE.getIcon(); + } + + public boolean onBlockEventReceived(World aWorld, int aX, int aY, int aZ, int aData1, int aData2) { + super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; + } + + public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, + Entity collider) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity).addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, + collider); + } else { + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + } + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null + ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) + : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null + ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) + : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { + TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) + .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); + this.minX = bbb.minX; + this.minY = bbb.minY; + this.minZ = bbb.minZ; + this.maxX = bbb.maxX; + this.maxY = bbb.maxY; + this.maxZ = bbb.maxZ; + } else { + super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ); + } + } + + public void setBlockBoundsForItemRender() { + super.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); + } else { + super.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); + } + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister aIconRegister) { + + } + + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return super.getBlockHardness(aWorld, aX, aY, aZ); + } + + public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess() + && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) + ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + } + + public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, + float par2, float par3) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity == null) { + return false; + } else { + if (aPlayer.isSneaking()) { + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem == null) { + return false; + } + + if (!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { + return false; + } + } + + return tTileEntity instanceof IGregTechTileEntity + ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L + ? false + : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) + ? true + : ((IGregTechTileEntity) tTileEntity).onRightclick(aPlayer, (byte) aSide, par1, + par2, par3))) + : false; + } + } + + public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + ((IGregTechTileEntity) tTileEntity).onLeftclick(aPlayer); + } + + } + + public int getDamageValue(World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileID() : 0; + } + + public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof BaseMetaTileEntity) { + ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); + } + + super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); + } + + public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity; + XSTR tRandom = new XSTR(); + mTemporaryTileEntity.set(tGregTechTileEntity); + + for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); ++i) { + ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); + if (tItem != null && tItem.stackSize > 0 && tGregTechTileEntity.isValidSlot(i)) { + EntityItem tItemEntity = new EntityItem(aWorld, + (double) ((float) aX + tRandom.nextFloat() * 0.8F + 0.1F), + (double) ((float) aY + tRandom.nextFloat() * 0.8F + 0.1F), + (double) ((float) aZ + tRandom.nextFloat() * 0.8F + 0.1F), + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + } + + tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; + tItemEntity.motionY = tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D; + tItemEntity.motionZ = tRandom.nextGaussian() * 0.0500000007450581D; + aWorld.spawnEntityInWorld(tItemEntity); + tItem.stackSize = 0; + tGregTechTileEntity.setInventorySlotContents(i, (ItemStack) null); + } + } + } + + super.breakBlock(aWorld, aX, aY, aZ, par5, par6); + aWorld.removeTileEntity(aX, aY, aZ); + } + + public ArrayList getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getDrops() + : (mTemporaryTileEntity.get() == null + ? new ArrayList() + : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops()); + } + + public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getComparatorValue((byte) aSide) + : 0; + } + + public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + if (aSide >= 0 && aSide <= 5) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) + : 0; + } else { + return 0; + } + } + + public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + if (aSide >= 0 && aSide <= 5) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity) + .getStrongOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) + : 0; + } else { + return 0; + } + } + + public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) { + if (!aWorld.isRemote) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null && chance < 1.0F) { + if (tTileEntity instanceof BaseMetaTileEntity && GregTech_API.sMachineNonWrenchExplosions) { + ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); + } + } else { + super.dropBlockAsItemWithChance(aWorld, aX, aY, aZ, par5, chance, par7); + } + } + + } + + public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) { + if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) { + return true; + } else { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null) { + if (tTileEntity instanceof BaseMetaTileEntity) { + return true; + } + + if (tTileEntity instanceof BaseMetaPipeEntity + && (((BaseMetaPipeEntity) tTileEntity).mConnections & -64) != 0) { + return true; + } + + if (tTileEntity instanceof ICoverable + && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0) { + return true; + } + } + + return false; + } + } + + public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity == null + ? 0 + : (tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getLightOpacity() + : (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0)); + } + + public int getLightValue(IBlockAccess aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity ? ((BaseMetaTileEntity) tTileEntity).getLightValue() : 0; + } + + public TileEntity createTileEntity(World aWorld, int aMeta) { + return (TileEntity) (aMeta >= 4 ? Meta_GT_Proxy.constructBaseMetaTileEntity() : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); + } + + public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, + double explosionY, double explosionZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6) + : 10.0F; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int i = 0; i < 100; ++i) { + if (GregTech_API.METATILEENTITIES[(30400 + i)] != null) { + par3List.add(new ItemStack(par1, 1, i)); + } + } + + } + + public void onBlockPlacedBy(World aWorld, int aX, int aY, int aZ, EntityLivingBase aPlayer, ItemStack aStack) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null) { + if (tTileEntity instanceof IGregTechTileEntity) { + IGregTechTileEntity var6 = (IGregTechTileEntity) tTileEntity; + if (aPlayer == null) { + var6.setFrontFacing((byte) 1); + } else { + int var7 = MathHelper.floor_double((double) (aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int var8 = Math.round(aPlayer.rotationPitch); + if (var8 >= 65 && var6.isValidFacing((byte) 1)) { + var6.setFrontFacing((byte) 1); + } else if (var8 <= -65 && var6.isValidFacing((byte) 0)) { + var6.setFrontFacing((byte) 0); + } else { + switch (var7) { + case 0 : + var6.setFrontFacing((byte) 2); + break; + case 1 : + var6.setFrontFacing((byte) 5); + break; + case 2 : + var6.setFrontFacing((byte) 3); + break; + case 3 : + var6.setFrontFacing((byte) 4); + } + } + } + } + + } + } + + public ArrayList getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) { + TileEntity tTileEntity = aPlayer.worldObj.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity + ? ((BaseMetaTileEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) + : (tTileEntity instanceof BaseMetaPipeEntity + ? ((BaseMetaPipeEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) + : null); + } + + public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + if (((IGregTechTileEntity) tTileEntity).getColorization() == (byte) (~aColor & 15)) { + return false; + } else { + ((IGregTechTileEntity) tTileEntity).setColorization((byte) (~aColor & 15)); + return true; + } + } else { + return false; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java new file mode 100644 index 0000000000..ba3b05ff8e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java @@ -0,0 +1,229 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ItsNotMyFaultException; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; + +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class GTPP_Item_Machines extends ItemBlock { + public GTPP_Item_Machines(Block par1) { + super(par1); + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + } + + @SuppressWarnings("unchecked") + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { + try { + int e = this.getDamage(aStack) + 30400; //Add Offset + if (e <= 0 || e >= GregTech_API.METATILEENTITIES.length) { + return; + } + + if (GregTech_API.METATILEENTITIES[e] != null) { + + IGregTechTileEntity aNBT = GregTech_API.METATILEENTITIES[e].getBaseMetaTileEntity(); + + final long tVoltage = aNBT.getInputVoltage(); + byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); + + /*if (aNBT.getDescription() != null) { + int tAmount = 0; + String[] arg7 = aNBT.getDescription(); + int arg8 = arg7.length-1; + + if (arg7 != null && arg7.length > 0) { + for (String t : arg7) { + aList.add(t); + } + + } + else { + aList.add("ERROR"); + } + + for (int y = 0; y < arg8; y++) { + String tDescription = arg7[y]; + + if (tDescription != null) { + aList.add(tDescription+"|"+arg8); + continue; + } + else { + continue; + } + } + }*/ + + if (aNBT.getEUCapacity() > 0L) { + + //Custom handling + if ((e - 30400) <= 100) { + + + if ((e - 30400) <= 10) { + tTier -= 2; + aList.add(EnumChatFormatting.BOLD+"16"+" Fuse Slots"+EnumChatFormatting.GRAY); + aList.add("Per each fuse, you may insert "+EnumChatFormatting.YELLOW+(GT_Values.V[tTier])+EnumChatFormatting.GRAY+" EU/t"); + aList.add("However this "+EnumChatFormatting.ITALIC+EnumChatFormatting.RED+"MUST"+EnumChatFormatting.GRAY+" be in a single Amp"); + aList.add("This machine can accept upto a single amp of "+GT_Values.VN[Math.min(tTier+2, 12)]+" as a result"); + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Breaker_Loss", "Breaker Loss: "+EnumChatFormatting.RED+""+(GT_Values.V[Math.max(tTier-1, 0)]/10)+EnumChatFormatting.GRAY+" EU/t", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + } + + + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Special_Power_1", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + } + + + if (aNBT.getInputVoltage() > 0L) { + String inA = "0"; + if (aNBT.getInputAmperage() >= 1L) { + inA = " at " + EnumChatFormatting.YELLOW + aNBT.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + else { + inA = " at " + EnumChatFormatting.WHITE + aNBT.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + String a1 = "Voltage IN: "+EnumChatFormatting.GREEN + aNBT.getInputVoltage() + + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + ")" + + EnumChatFormatting.GRAY + inA; + aList.add(a1); + } + + if (aNBT.getOutputVoltage() > 0L) { + String outA = "0"; + if (aNBT.getOutputAmperage() >= 1L) { + outA = " at " + EnumChatFormatting.YELLOW + aNBT.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + else { + outA = " at " + EnumChatFormatting.WHITE + aNBT.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; + } + String a1 = "Voltage OUT: "+EnumChatFormatting.GREEN + aNBT.getOutputVoltage() + + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + ")" + + EnumChatFormatting.GRAY + outA; + aList.add(a1); + } + + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Lossess_EU", "Transmission Loss: "+EnumChatFormatting.DARK_BLUE+"0", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE2", "Internal Capacity: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + aNBT.getEUCapacity() + + EnumChatFormatting.GRAY + " EU"); + } + } + + NBTTagCompound arg16 = aStack.getTagCompound(); + if (arg16 != null) { + if (arg16.getBoolean("mMuffler")) { + aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_MUFFLER", "has Muffler Upgrade", + !GregTech_API.sPostloadFinished)); + } + + if (arg16.getBoolean("mSteamConverter")) { + aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMCONVERTER", + "has Steam Upgrade", !GregTech_API.sPostloadFinished)); + } + + boolean arg17 = false; + byte arg18; + if ((arg18 = arg16.getByte("mSteamTanks")) > 0) { + aList.add(arg18 + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMTANKS", + "Steam Tank Upgrades", !GregTech_API.sPostloadFinished)); + } + } + + + aList.add(EnumChatFormatting.UNDERLINE+"Special GT++ Machine"); + + } catch (Throwable arg15) { + arg15.printStackTrace(GT_Log.err); + } + + } + + public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, + float hitX, float hitY, float hitZ) { + return false; + } + + public String getUnlocalizedName(ItemStack aStack) { + short tDamage = (short) (this.getDamage(aStack) + 30400); //Add Offset; + return tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length + ? (GregTech_API.METATILEENTITIES[tDamage] != null + ? "gtpp.blockmachines" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName() + : "") + : ""; + } + + public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + super.onCreated(aStack, aWorld, aPlayer); + short tDamage = (short) ((short) this.getDamage(aStack) + 30400); //Add Offset; + if (tDamage < 0 + || tDamage >= GregTech_API.METATILEENTITIES.length && GregTech_API.METATILEENTITIES[tDamage] != null) { + GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); + } + + } + + public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, + float hitX, float hitY, float hitZ, int aMeta) { + short tDamage = (short) ((short) this.getDamage(aStack) + 30400); //Add Offset; + if (tDamage > 0) { + if (GregTech_API.METATILEENTITIES[tDamage] == null) { + return false; + } + + byte tMetaData = 32; + //byte tMetaData = GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType(); + Logger.INFO("Using Meta: "+tMetaData+" for ID "+tDamage+" | "+GregTech_API.METATILEENTITIES[tDamage].getInventoryName()); + if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tMetaData, 3)) { + return false; + } + + if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { + throw new GT_ItsNotMyFaultException( + "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); + } + + if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { + throw new GT_ItsNotMyFaultException( + "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); + } + + IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null) { + tTileEntity.setInitialValuesAsNBT(tTileEntity.isServerSide() ? aStack.getTagCompound() : null, tDamage); + if (aPlayer != null) { + tTileEntity.setOwnerName(aPlayer.getDisplayName()); + } + + tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound()); + } + } else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) { + return false; + } + + if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { + this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); + this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, tDamage); + } + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java new file mode 100644 index 0000000000..c4b2e4f738 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java @@ -0,0 +1,78 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.enums.TAE; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; + +public class GregtechMetaCasingBlocks +extends GregtechMetaCasingBlocksAbstract { + + CasingTextureHandler TextureHandler = new CasingTextureHandler(); + + public GregtechMetaCasingBlocks() { + super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + if (i == 2 || i == 3 || i == 4) { + continue; + } + TAE.registerTexture(0, i, new GT_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60 + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Matter Generation Coil"); //65 + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Matter Fabricator Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Iron Plated Bricks"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil "); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block"); + GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_CokeOven_Coil1.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_CokeOven_Coil2.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_MaterialPress.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Electrolyzer.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_WireFactory.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_MacerationStack.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_MatterGen.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_MatterFab.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_IronPlatedBricks.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_MultitankExterior.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Reactor_I.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Reactor_II.set(new ItemStack(this, 1, 13)); + GregtechItemList.Casing_Coil_BlastSmelter.set(new ItemStack(this, 1, 14)); + GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15)); + } + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] + return CasingTextureHandler.getIcon(aSide, aMeta); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks i = this; + return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java new file mode 100644 index 0000000000..596643e06c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -0,0 +1,89 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import gregtech.api.enums.TAE; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2; + +import java.util.List; + +public class GregtechMetaCasingBlocks2 +extends GregtechMetaCasingBlocksAbstract { + + CasingTextureHandler2 TextureHandler = new CasingTextureHandler2(); + + public static class GregtechMetaCasingItemBlocks2 extends GregtechMetaCasingItems { + + public GregtechMetaCasingItemBlocks2(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int meta = aStack.getItemDamage(); + int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); + if (meta == 7 && tier > 0) { + long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); + aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaCasingBlocks2() { + super(GregtechMetaCasingItemBlocks2.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + if (i == 4 || i == 10 || i == 11 || i == 12 || i == 14) { + continue; + } + TAE.registerTexture(1, i, new GT_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); //Tree Farmer Textures + GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Refinery_Internal.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_Power_SubStation.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_Cyclotron_Coil.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); + //GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); + GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); //Tree Farmer Textures + } + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return CasingTextureHandler2.getIcon(aSide, aMeta); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java new file mode 100644 index 0000000000..8cd6dd0ca8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -0,0 +1,366 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.TAE; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class GregtechMetaCasingBlocks3 +extends GregtechMetaCasingBlocksAbstract { + + public static boolean mConnectedMachineTextures = false; + CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); + + public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { + + public GregtechMetaCasingItemBlocks3(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int meta = aStack.getItemDamage(); + int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); + if (tier > 0) { + long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); + aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaCasingBlocks3() { + super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + TAE.registerTexture(2, i, new GT_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Supply Depot Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Advanced Cryogenic Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Volcanus Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4) + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing"); + GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Multi_Use.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_BedrockMiner.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Vanadium_Redox_IV.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Vanadium_Redox_LuV.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_Vanadium_Redox_ZPM.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_Vanadium_Redox_UV.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_Vanadium_Redox_MAX.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_AmazonWarehouse.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_AdvancedVacuum.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_Adv_BlastFurnace.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Fusion_External.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Fusion_Internal.set(new ItemStack(this, 1, 13)); + GregtechItemList.Casing_Containment.set(new ItemStack(this, 1, 15)); + } + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return CasingTextureHandler3.getIcon(aSide, aMeta); + } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, + final int aSide) { + final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord); + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if ((tMeta != 12)|| !GregtechMetaCasingBlocks3.mConnectedMachineTextures) { + return getIcon(aSide, tMeta); + } + final int tStartIndex = 0; + if (tMeta == 12) { + final boolean[] tConnectedSides = { + aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta, + aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta, + aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta, + aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta, + aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock + && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta, + aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock + && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta}; + switch (aSide) { + case 0 : { + if (tConnectedSides[0]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[2]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[5] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 1 : { + if (tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 2 : { + if (tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 3 : { + if (tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 4 : { + if (tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + } + case 5 : { + if (tConnectedSides[2]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + break; + } + } + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + return CasingTextureHandler3.getIcon(aSide, tMeta); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java new file mode 100644 index 0000000000..419b5f3d30 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -0,0 +1,115 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + + +public class GregtechMetaCasingBlocks4 +extends GregtechMetaCasingBlocksAbstract { + + public GregtechMetaCasingBlocks4() { + super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.4", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + if (i == 2 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 12 || i == 13 || i == 14 || i == 15) { + continue; + } + TAE.registerTexture(3, i, new GT_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); //48 + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Industrial_Arc_Furnace.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Vacuum_Furnace.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11)); + } + + //private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); + + /*@Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks4 i = this; + return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + }*/ + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon((byte) aSide, (byte) aMeta); + } + + public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + //Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Trinium_Titanium.getIcon(); + case 1: + return TexturesGtBlock.TEXTURE_TECH_C.getIcon(); + case 2: + return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); + case 3: + return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon(); + case 4: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 5: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 6: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 7: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 8: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 9: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 10: + if (aSide <2) { + return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon(); + } + else { + return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon(); + } + case 11: + return TexturesGtBlock.TEXTURE_CASING_ROCKETDYNE.getIcon(); + case 12: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 13: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + default: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java new file mode 100644 index 0000000000..c594ee0e5d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java @@ -0,0 +1,83 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGrinderMultiblock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + + +public class GregtechMetaCasingBlocks5 +extends GregtechMetaCasingBlocksAbstract { + + //Free Indexes within TAE: 90, 91, 92, 94, 114, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127 + private static final TexturesGrinderMultiblock mGrinderOverlayHandler = new TexturesGrinderMultiblock(); + + public GregtechMetaCasingBlocks5() { + super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", GT_Material_Casings.INSTANCE); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill Casing + TAE.registerTexture(0, 2, new GT_CopiedBlockTexture(this, 6, 0)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill Pipe + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing + TAE.registerTexture(0, 3, new GT_CopiedBlockTexture(this, 6, 3)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing + TAE.registerTexture(0, 4, new GT_CopiedBlockTexture(this, 6, 4)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + + GregtechItemList.Casing_IsaMill_Casing.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_IsaMill_Pipe.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_IsaMill_Gearbox.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_ElementalDuplicator.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Sparge_Tower_Exterior.set(new ItemStack(this, 1, 4)); + } + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon(aSide, aMeta); + } + + + public static IIcon getStaticIcon(final int aSide, final int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); + case 1: + return TexturesGtBlock.TEXTURE_PIPE_GRINDING_MILL.getIcon(); + case 2: + return TexturesGtBlock.TEXTURE_GEARBOX_GRINDING_MILL.getIcon(); + case 3: + return TexturesGtBlock.TEXTURE_TECH_PANEL_D.getIcon(); + case 4: + return TexturesGtBlock.Casing_Machine_Metal_Sheet_H.getIcon(); + } + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks5 i = this; + return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java new file mode 100644 index 0000000000..ea59eb50ba --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java @@ -0,0 +1,150 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; + +import gtPlusPlus.core.creative.AddToCreativeTab; + +public abstract class GregtechMetaCasingBlocksAbstract +extends GT_Block_Casings_Abstract { + public GregtechMetaCasingBlocksAbstract(final Class aItemClass, final String aName, final Material aMaterial) { + super(aItemClass, aName, aMaterial); + this.setStepSound(soundTypeMetal); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GregTech_API.registerMachineBlock(this, -1); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); + } + + @Override + public String getHarvestTool(final int aMeta) { + return "wrench"; + } + + @Override + public int getHarvestLevel(final int aMeta) { + return 2; + } + + @Override + public float getBlockHardness(final World aWorld, final int aX, final int aY, final int aZ) { + return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); + } + + @Override + public float getExplosionResistance(final Entity aTNT) { + return Blocks.iron_block.getExplosionResistance(aTNT); + } + + @Override + protected boolean canSilkHarvest() { + return false; + } + + @Override + public void onBlockAdded(final World aWorld, final int aX, final int aY, final int aZ) { + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + + @Override + public String getUnlocalizedName() { + return this.mUnlocalizedName; + } + + @Override + public String getLocalizedName() { + return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); + } + + @Override + public boolean canBeReplacedByLeaves(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { + return false; + } + + @Override + public boolean isNormalCube(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return true; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderBlockPass() { + return 0; + } + + @Override + public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) { + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + + @Override + public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public int damageDropped(final int par1) { + return par1; + } + + @Override + public int getDamageValue(final World par1World, final int par2, final int par3, final int par4) { + return par1World.getBlockMetadata(par2, par3, par4); + } + + @Override + public int quantityDropped(final Random par1Random) { + return 1; + } + + @Override + public Item getItemDropped(final int par1, final Random par2Random, final int par3) { + return Item.getItemFromBlock(this); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister aIconRegister) { + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(final Item aItem, final CreativeTabs par2CreativeTabs, final List aList) { + for (int i = 0; i < 16; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java new file mode 100644 index 0000000000..de51cb164b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java @@ -0,0 +1,10 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GregtechMetaCasingItems +extends GregtechMetaItemCasingsAbstract { + public GregtechMetaCasingItems(final Block par1) { + super(par1); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java new file mode 100644 index 0000000000..7fb344a4ec --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +public class GregtechMetaItemCasings1 +extends GregtechMetaItemCasingsAbstract { + public GregtechMetaItemCasings1(final Block par1) { + super(par1); + } + + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + switch (this.getDamage(aStack)) { + case 0: + aList.add(this.mCasing_Centrifuge); + break; + case 1: + aList.add(this.mCasing_CokeOven); + break; + case 2: + aList.add(this.mCasing_CokeCoil1); + break; + case 3: + aList.add(this.mCasing_CokeCoil2); + break; + default: + aList.add(this.mCasing_CokeCoil2); + break; + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java new file mode 100644 index 0000000000..62e0f0acdf --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java @@ -0,0 +1,61 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_LanguageManager; + +public abstract class GregtechMetaItemCasingsAbstract +extends ItemBlock { + + protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization("mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended"); + protected final String mCasing_CokeOven = GT_LanguageManager.addStringLocalization("mu.cokeoven", "Sturdy and Strong"); + protected final String mCasing_CokeCoil1 = GT_LanguageManager.addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin"); + protected final String mCasing_CokeCoil2 = GT_LanguageManager.addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin"); + protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + + public GregtechMetaItemCasingsAbstract(final Block par1) { + super(par1); + this.setMaxDamage(0); + this.setHasSubtypes(true); + //setCreativeTab(AddToCreativeTab.tabMachines); + } + + @Override + public int getMetadata(final int aMeta) { + return aMeta; + } + + @Override + public String getUnlocalizedName(final ItemStack aStack) { + return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack); + } + + @Override + public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + switch (this.getDamage(aStack)) { + case 0: + //aList.add(this.mCasing_Centrifuge); + break; + case 1: + //aList.add(this.mCasing_CokeOven); + break; + case 2: + //aList.add(this.mCasing_CokeCoil1); + break; + case 3: + //aList.add(this.mCasing_CokeCoil2); + break; + default: + break; + } + aList.add(this.mNoMobsToolTip); + aList.add(this.mNoTileEntityToolTip); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java new file mode 100644 index 0000000000..8f5dff592a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java @@ -0,0 +1,81 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + + +public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksAbstract { + + + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + + public SpecialCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + //aList.add("Tier: "+GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaSpecialMachineCasings() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.2", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Strong Bronze Machine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing"); + TAE.registerTexture(84, new GT_CopiedBlockTexture(this, 6, 2)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + + GregtechItemList.Casing_Machine_Custom_1.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Machine_Custom_2.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Machine_Custom_3.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Machine_Custom_4.set(new ItemStack(this, 1, 3)); + } + + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon(); + case 2: + return TexturesGtBlock.Casing_Material_Laurenium.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java new file mode 100644 index 0000000000..5a5c923d10 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -0,0 +1,103 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + + +public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbstract { + + + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + + public SpecialCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + //aList.add("Tier: "+GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaSpecialMultiCasings() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.1", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Turbine Shaft"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Tesla Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Structural Solar Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Salt Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + + GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Turbine_Gas.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Turbine_Plasma.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10)); + } + + public IIcon getIcon(int aSide, int aMeta) { + + switch (aMeta) { + + case 0: + return TexturesGtBlock.Casing_Redox_1.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + case 5: + return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + case 6: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + case 7: + return TexturesGtBlock.Casing_Material_Stellite.getIcon(); + case 8: + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + case 9: + return TexturesGtBlock.TEXTURE_CASING_FLOTATION.getIcon(); + case 10: + return TexturesGtBlock.Casing_Material_Talonite.getIcon(); + + } + + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java new file mode 100644 index 0000000000..cbd585e50d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java @@ -0,0 +1,110 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Material_Casings; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; + + +public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbstract { + + + public static class TieredCasingItemBlock extends GregtechMetaCasingItems { + + public TieredCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + aList.add("Tier: "+GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaTieredCasingBlocks1() { + super(TieredCasingItemBlock.class, "gtplusplus.blocktieredcasings.1", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, Hatches should never need to use their Textures. + } + int aIndex = 0; + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Integral Encasement I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Integral Encasement II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Integral Encasement III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Integral Encasement IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Integral Encasement V"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Integral Framework I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Integral Framework II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Integral Framework III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Integral Framework IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Integral Framework V"); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Block"); + + GregtechItemList.GTPP_Casing_ULV.set(new ItemStack(this, 1, 0)); + GregtechItemList.GTPP_Casing_LV.set(new ItemStack(this, 1, 1)); + GregtechItemList.GTPP_Casing_MV.set(new ItemStack(this, 1, 2)); + GregtechItemList.GTPP_Casing_HV.set(new ItemStack(this, 1, 3)); + GregtechItemList.GTPP_Casing_EV.set(new ItemStack(this, 1, 4)); + GregtechItemList.GTPP_Casing_IV.set(new ItemStack(this, 1, 5)); + GregtechItemList.GTPP_Casing_LuV.set(new ItemStack(this, 1, 6)); + GregtechItemList.GTPP_Casing_ZPM.set(new ItemStack(this, 1, 7)); + GregtechItemList.GTPP_Casing_UV.set(new ItemStack(this, 1, 8)); + GregtechItemList.GTPP_Casing_MAX.set(new ItemStack(this, 1, 9)); + + //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 10)); + //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 11)); + //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 12)); + //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 13)); + //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 14)); + //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 15)); + } + + public IIcon getIcon(int aSide, int aMeta) { + if (aMeta < 10) { + return TexturesGtBlock.TIERED_MACHINE_HULLS[aMeta].getIcon(); + } + switch (aMeta) { + case 10: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 11: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 12: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 13: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java new file mode 100644 index 0000000000..3e4b9a3fee --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java @@ -0,0 +1,111 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.fluid; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; + +public class GregtechFluidHandler { + + protected static int cellID = 0; + + public static void run(){ + start(); + } + + private static void start(){ + + /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemUtils.getEmptyCell(), 1000); + */ + + if (!LoadedMods.ThermalFoundation){ + + Logger.INFO("Adding in our own GT versions of Thermal Foundation Fluids if they do not already exist."); + if (!FluidRegistry.isFluidRegistered("cryotheum")) { + FluidUtils.addGtFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemUtils.getEmptyCell(), 1000); + } + if (!FluidRegistry.isFluidRegistered("pyrotheum")) { + FluidUtils.addGtFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemUtils.getEmptyCell(), 1000); + } + if (!FluidRegistry.isFluidRegistered("ender")) { + FluidUtils.addGtFluid("ender", "Resonant Ender", GT_Materials.Ender, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Ender, 1L), ItemUtils.getEmptyCell(), 1000); + } + + } + + if (LoadedMods.IndustrialCraft2){ + Logger.INFO("Adding in GT Fluids for various nuclear related content."); + + FluidUtils.addGtFluid("hydrofluoricAcid", "Industrial Strength Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemUtils.getEmptyCell(), 1000, false); + generateIC2FluidCell("HydrofluoricAcid"); + + FluidUtils.generateFluidNoPrefix("SulfurDioxide", "High Quality Sulfur Dioxide", 263, GT_Materials.SulfurDioxide.mRGBa); + + FluidUtils.addGtFluid("sulfurousAcid", "Sulfurous Acid", GT_Materials.SulfurousAcid, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurousAcid, 1L), ItemUtils.getEmptyCell(), 1000, false); + generateIC2FluidCell("SulfurousAcid"); + + FluidUtils.addGtFluid("sulfuricApatite", "Sulfuric Apatite Mix", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemUtils.getEmptyCell(), 1000, false); + generateIC2FluidCell("SulfuricApatite"); + + + //Check for IHL Hydrogen Chloride + if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)){ + if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){ + if (LoadedMods.IHL){ + Logger.INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); + } + else { + Logger.INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); + } + FluidUtils.addGtFluid("hydrogenChloride", "Industrial Strength Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), ItemUtils.getEmptyCell(), 1000, false); + generateIC2FluidCell("HydrogenChloride"); + } + } + + + FluidUtils.addGtFluid("sulfuricLithium", "Sulfuric Lithium Mix", GT_Materials.SulfuricLithium, 4, 280, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L), ItemUtils.getEmptyCell(), 1000, false); + generateIC2FluidCell("SulfuricLithium"); + + FluidUtils.addGtFluid("lithiumHydroxide", "Lithium Hydroxide", GT_Materials.LithiumHydroxide, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.LithiumHydroxide, 1L), ItemUtils.getEmptyCell(), 1000, false); + generateIC2FluidCell("LithiumHydroxide"); + + + } + } + + private static ItemStack generateIC2FluidCell(final String fluidNameWithCaps){ + Logger.INFO("Adding a Cell for "+fluidNameWithCaps); + if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic){ + return Utils.createInternalNameAndFluidCell(fluidNameWithCaps); + } + return null; + } + + private static ItemStack generateIC2FluidCellNoOreDict(final String fluidNameWithCaps){ + Logger.INFO("Adding a Cell for "+fluidNameWithCaps); + if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic){ + return Utils.createInternalNameAndFluidCellNoOreDict(fluidNameWithCaps); + } + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java new file mode 100644 index 0000000000..123df8fe0f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java @@ -0,0 +1,82 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.enums.Textures; + +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; + +public class CasingTextureHandler { + + //private static final TexturesGregtech59 gregtech59 = new TexturesGregtech59(); + //private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58(); + private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock(); + + public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + //Centrifuge + case 0: + return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); + //Coke Oven Frame + case 1: + return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); + //Coke Oven Casing Tier 1 + case 2: + return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon(); + //Coke Oven Casing Tier 2 + case 3: + return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon(); + //Material Press Casings + case 4: + return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + //Electrolyzer Casings + case 5: + return TexturesGtBlock.Casing_Material_Potin.getIcon(); + //Broken Blue Fusion Casings + case 6: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + //Maceration Stack Casings + case 7: + return TexturesGtBlock.Casing_Material_Tumbaga.getIcon(); + //Broken Pink Fusion Casings + case 8: + return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); + //Matter Fabricator Casings + case 9: + return TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon(); + //Iron Blast Fuance Textures + case 10: + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + //Multitank Exterior Casing + case 11: + return TexturesGtBlock.Casing_Material_Grisium.getIcon(); + //Reactor Casing I + case 12: + return TexturesGtBlock.Casing_Material_Stellite.getIcon(); + //Reactor Casing II + case 13: + return TexturesGtBlock.Casing_Material_Zeron100.getIcon(); + case 14: + return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon(); + case 15: + return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon(); + + default: + return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon(); + + } + } + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); + } + + + public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);*/ + return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java new file mode 100644 index 0000000000..c980997c64 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java @@ -0,0 +1,57 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.util.IIcon; + +import gregtech.api.enums.Textures; + +public class CasingTextureHandler2 { + + public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + case 1: + return TexturesGtBlock.Casing_Material_HastelloyX.getIcon(); + case 2: + return TexturesGtBlock.Casing_Material_HastelloyN.getIcon(); + case 3: + return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon(); + case 4: + return TexturesGtBlock.Casing_Material_Grisium.getIcon(); + case 5: + return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon(); + case 6: + return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon(); + case 7: + return TexturesGtBlock.Casing_Redox_1.getIcon(); + case 8: + return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon(); + case 9: + return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon(); + case 10: + return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); + case 11: + return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); + case 12: + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + case 13: + if (aSide <2) { + return TexturesGtBlock.TEXTURE_TECH_A.getIcon(); + } + else { + return TexturesGtBlock.TEXTURE_TECH_B.getIcon(); + } + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); + default: + return TexturesGtBlock.Overlay_UU_Matter.getIcon(); + + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java new file mode 100644 index 0000000000..019a432013 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java @@ -0,0 +1,68 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.util.IIcon; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3; + +public class CasingTextureHandler3 { + + public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + //Aquatic Casing + return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon(); + case 1: + //Inconel Reinforced Casing + return TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon(); + case 2: + //Multi-Use Casing + return TexturesGtBlock.TEXTURE_METAL_PANEL_C.getIcon(); + case 3: + //Trinium Plated Mining Platform Casing + return TexturesGtBlock.Casing_Trinium_Naquadah_Vent.getIcon(); + case 4: + //Vanadium Redox IV + return TexturesGtBlock.Casing_Redox_2.getIcon(); + case 5: + //Vanadium Redox LuV + return TexturesGtBlock.Casing_Redox_3.getIcon(); + case 6: + //Vanadium Redox ZPM + return TexturesGtBlock.Casing_Redox_4.getIcon(); + case 7: + //Vanadium Redox UV + return TexturesGtBlock.Casing_Redox_5.getIcon(); + case 8: + //Vanadium Redox MAX + return TexturesGtBlock.Casing_Redox_6.getIcon(); + case 9: + //Amazon Warehouse Casing + return TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon(); + case 10: + //Adv. Vac. Freezer + return TexturesGtBlock.TEXTURE_CASING_ADVANCED_CRYOGENIC.getIcon(); + case 11: + //Adv. EBF + return TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon(); + case 12: + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon(); + case 13: + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon(); + case 14: + return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon(); + case 15: + return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); + + default: + return TexturesGtBlock._PlaceHolder.getIcon(); + + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } + + static { + GregtechMetaCasingBlocks3.mConnectedMachineTextures = true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java new file mode 100644 index 0000000000..6326dd2c29 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java @@ -0,0 +1,166 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class TexturesCentrifugeMultiblock { + + private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1"); + private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1"); + private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2"); + private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2"); + private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3"); + private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3"); + private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4"); + private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4"); + private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); + private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); + private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6"); + private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6"); + private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7"); + private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7"); + private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8"); + private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8"); + private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9"); + private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9"); + + private static CustomIcon frontFace_0 = (GT8_1); + private static CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static CustomIcon frontFace_1 = (GT8_2); + private static CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static CustomIcon frontFace_2 = (GT8_3); + private static CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static CustomIcon frontFace_3 = (GT8_4); + private static CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static CustomIcon frontFace_4 = (GT8_5); + private static CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static CustomIcon frontFace_5 = (GT8_6); + private static CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static CustomIcon frontFace_6 = (GT8_7); + private static CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static CustomIcon frontFace_7 = (GT8_8); + private static CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static CustomIcon frontFace_8 = (GT8_9); + private static CustomIcon frontFaceActive_8 = (GT8_9_Active); + + CustomIcon[] CENTRIFUGE = new CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + + private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; + IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; + if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge && tTile.getFrontFacing() == aSide) + return tTile.isActive() ? 1 : 2; + return 0; + } + + public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (tMeta != 0) { + return CasingTextureHandler.getIcon(aSide, tMeta); + } + int tInvertLeftRightMod = aSide % 2 * 2 - 1; + switch (aSide / 2) { + case 0: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) + continue; + if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); + } + } + } + break; + case 1: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) + continue; + if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); + } + } + } + break; + case 2: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) + continue; + if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); + } + } + } + break; + } + return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); + } + + public boolean isCentrifugeRunning(IMetaTileEntity aTile) { + if (aTile == null) { + return false; + } + else { + return aTile.getBaseMetaTileEntity().isActive(); + } + + + } + + public boolean isUsingAnimatedTexture(IMetaTileEntity aMetaTileEntity) { + if (aMetaTileEntity != null) { + if (aMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) { + return ((GregtechMetaTileEntity_IndustrialCentrifuge) aMetaTileEntity).usingAnimations(); + } + } + return false; + } + + public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { + if (isUsingAnimatedTexture(aMetaTileEntity)) { + if (isCentrifugeRunning(aMetaTileEntity)) { + return this.CENTRIFUGE_ACTIVE[aIndex].getIcon(); + } + } + return this.CENTRIFUGE[aIndex].getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java new file mode 100644 index 0000000000..e772f0f48c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java @@ -0,0 +1,443 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; + +public class TexturesGregtech58 { + + private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE1"); + private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1"); + private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE2"); + private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2"); + private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE3"); + private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3"); + private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE4"); + private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4"); + private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5"); + private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE6"); + private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6"); + private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE7"); + private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7"); + private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE8"); + private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8"); + private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE9"); + private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9"); + + private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1); + private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2); + private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3); + private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4); + private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5); + private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6); + private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7); + private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8); + private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9); + private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active); + + Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + + public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + + + public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { + return CasingTextureHandler.getIcon(aSide, tMeta); + } + final int tStartIndex = tMeta == 6 ? 1 : 13; + if (tMeta == 0) { + if ((aSide == 2) || (aSide == 3)) { + TileEntity tTileEntity; + IMetaTileEntity tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.TURBINE[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.TURBINE[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.TURBINE[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.TURBINE[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.TURBINE[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.TURBINE[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.TURBINE[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.TURBINE[2].getIcon(); + } + } else if ((aSide == 4) || (aSide == 5)) { + TileEntity tTileEntity; + Object tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.TURBINE[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.TURBINE[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.TURBINE[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.TURBINE[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.TURBINE[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.TURBINE[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.TURBINE[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.TURBINE[2].getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)}; + switch (aSide) { + case 0: + if (tConnectedSides[0]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[2])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[5]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 1: + if (tConnectedSides[1]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 2: + if (tConnectedSides[5]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 3: + if (tConnectedSides[3]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 4: + if (tConnectedSides[4]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + case 5: + if (tConnectedSides[2]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + break; + } + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java new file mode 100644 index 0000000000..ac721d81c3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java @@ -0,0 +1,444 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; + +public class TexturesGregtech59 { + + private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1"); + private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1"); + private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2"); + private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2"); + private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3"); + private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3"); + private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4"); + private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4"); + private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5"); + private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6"); + private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6"); + private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7"); + private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7"); + private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8"); + private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8"); + private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9"); + private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9"); + + private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1); + private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2); + private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3); + private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4); + private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5); + private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6); + private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7); + private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8); + private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9); + private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active); + + Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + + public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + + + public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { + return CasingTextureHandler.getIcon(aSide, tMeta); + } + final int tStartIndex = tMeta == 6 ? 1 : 13; + if (tMeta == 0) { + if ((aSide == 2) || (aSide == 3)) { + TileEntity tTileEntity; + IMetaTileEntity tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.TURBINE[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.TURBINE[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.TURBINE[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.TURBINE[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.TURBINE[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.TURBINE[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.TURBINE[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.TURBINE[2].getIcon(); + } + } else if ((aSide == 4) || (aSide == 5)) { + TileEntity tTileEntity; + Object tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.TURBINE[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.TURBINE[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.TURBINE[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.TURBINE[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.TURBINE[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.TURBINE[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.TURBINE[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.TURBINE[2].getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)}; + switch (aSide) { + case 0: + if (tConnectedSides[0]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[2])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[5]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 1: + if (tConnectedSides[1]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 2: + if (tConnectedSides[5]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 3: + if (tConnectedSides[3]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 4: + if (tConnectedSides[4]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + case 5: + if (tConnectedSides[2]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + break; + } + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java new file mode 100644 index 0000000000..962f981d3b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java @@ -0,0 +1,150 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks5; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IsaMill; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class TexturesGrinderMultiblock { + + private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE1"); + private static CustomIcon GT8_1 = new CustomIcon("iconsets/Grinder/GRINDER1"); + private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE2"); + private static CustomIcon GT8_2 = new CustomIcon("iconsets/Grinder/GRINDER2"); + private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE3"); + private static CustomIcon GT8_3 = new CustomIcon("iconsets/Grinder/GRINDER3"); + private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE4"); + private static CustomIcon GT8_4 = new CustomIcon("iconsets/Grinder/GRINDER4"); + private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5"); + private static CustomIcon GT8_5 = new CustomIcon("iconsets/Grinder/GRINDER5"); + private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE6"); + private static CustomIcon GT8_6 = new CustomIcon("iconsets/Grinder/GRINDER6"); + private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE7"); + private static CustomIcon GT8_7 = new CustomIcon("iconsets/Grinder/GRINDER7"); + private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE8"); + private static CustomIcon GT8_8 = new CustomIcon("iconsets/Grinder/GRINDER8"); + private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE9"); + private static CustomIcon GT8_9 = new CustomIcon("iconsets/Grinder/GRINDER9"); + + private static CustomIcon frontFace_0 = (GT8_1); + private static CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static CustomIcon frontFace_1 = (GT8_2); + private static CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static CustomIcon frontFace_2 = (GT8_3); + private static CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static CustomIcon frontFace_3 = (GT8_4); + private static CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static CustomIcon frontFace_4 = (GT8_5); + private static CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static CustomIcon frontFace_5 = (GT8_6); + private static CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static CustomIcon frontFace_6 = (GT8_7); + private static CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static CustomIcon frontFace_7 = (GT8_8); + private static CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static CustomIcon frontFace_8 = (GT8_9); + private static CustomIcon frontFaceActive_8 = (GT8_9_Active); + + CustomIcon[] GRINDER = new CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + CustomIcon[] GRINDER_ACTIVE = new CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; + IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; + if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == aSide) + return tTile.isActive() ? 1 : 2; + return 0; + } + + public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks5 ii) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (tMeta != 0) { + return GregtechMetaCasingBlocks5.getStaticIcon(aSide, tMeta); + } + int tInvertLeftRightMod = aSide % 2 * 2 - 1; + switch (aSide / 2) { + case 0: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) + continue; + if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); + } + } + } + break; + case 1: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) + continue; + if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); + } + } + } + break; + case 2: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) + continue; + if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); + } + } + } + break; + } + return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); + } + + public boolean isCentrifugeRunning(IMetaTileEntity aTile) { + if (aTile == null) { + return false; + } + else { + return aTile.getBaseMetaTileEntity().isActive(); + } + } + + public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { + if (isCentrifugeRunning(aMetaTileEntity)) { + return this.GRINDER_ACTIVE[aIndex].getIcon(); + } + + return this.GRINDER[aIndex].getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java new file mode 100644 index 0000000000..518ffe0eae --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -0,0 +1,652 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; + +public class TexturesGtBlock { + + private static AutoMap mCustomiconMap = new AutoMap(); + + static { + + } + + //public static ITexture[] CASING_BLOCKS_GTPP = new ITexture[256]; + + /* + * Handles Custom Textures. + */ + + public static class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon; + protected String mIconName; + protected String mModID; + + public CustomIcon(final String aIconName) { + this(CORE.MODID, aIconName); + } + + public CustomIcon(final String aModID, final String aIconName) { + this.mIconName = aIconName; + this.mModID = aModID; + mCustomiconMap.put(this); + Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); + GregTech_API.sGTBlockIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sBlockIcons.registerIcon(this.mModID + ":" + this.mIconName); + Logger.WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath()); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + } + + + public static class VanillaIcon implements IIconContainer, Runnable { + protected IIcon mIcon; + protected String mIconName; + + public VanillaIcon(final String aIconName) { + this.mIconName = aIconName; + mCustomiconMap.put(this); + Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); + GregTech_API.sGTBlockIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sBlockIcons.registerIcon("minecraft" + ":" + this.mIconName); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + } + + public static GT_RenderedTexture getTextureFromIcon(CustomIcon aIcon, short[] aRGB) { + return new GT_RenderedTexture(aIcon, aRGB); + } + + /* + * Add Some Custom Textures below. + * I am not sure whether or not I need to declare them as such, but better to be safe than sorry. + * Right? + */ + + //Vanilla Textures + public static final VanillaIcon VanillaIcon_OakPlanks = new VanillaIcon("planks_oak"); + + + + //PlaceHolder Texture + private static final CustomIcon Internal_PlaceHolder = new CustomIcon("TileEntities/_PlaceHolder"); + public static final CustomIcon _PlaceHolder = Internal_PlaceHolder; + + //Energy overlays + public static final CustomIcon OVERLAY_ENERGY_OUT_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_BUFFER"); + public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER"); + + //Wooden Shelf and Compartment Overlays + public static final CustomIcon OVERLAY_WOODEN_SHELF_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf"); + public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_cans"); + public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_paper"); + public static final CustomIcon OVERLAY_CABINET_1 = new CustomIcon("TileEntities/Compartment/0"); + public static final CustomIcon OVERLAY_CABINET_2 = new CustomIcon("TileEntities/Compartment/1"); + public static final CustomIcon OVERLAY_CABINET_3 = new CustomIcon("TileEntities/Compartment/2"); + public static final CustomIcon OVERLAY_CABINET_4 = new CustomIcon("TileEntities/Compartment/3"); + public static final CustomIcon OVERLAY_CABINET_5 = new CustomIcon("TileEntities/Compartment/4"); + public static final CustomIcon OVERLAY_CABINET_6 = new CustomIcon("TileEntities/Compartment/5"); + public static final CustomIcon OVERLAY_CABINET_7 = new CustomIcon("TileEntities/Compartment/6"); + public static final CustomIcon OVERLAY_CABINET_8 = new CustomIcon("TileEntities/Compartment/7"); + public static final CustomIcon OVERLAY_CABINET_9 = new CustomIcon("TileEntities/Compartment/8"); + public static final CustomIcon OVERLAY_CABINET_10 = new CustomIcon("TileEntities/Compartment/9"); + public static final CustomIcon OVERLAY_CABINET_11 = new CustomIcon("TileEntities/Compartment/10"); + public static final CustomIcon OVERLAY_CABINET_12 = new CustomIcon("TileEntities/Compartment/11"); + public static final CustomIcon OVERLAY_CABINET_13 = new CustomIcon("TileEntities/Compartment/12"); + public static final CustomIcon OVERLAY_CABINET_14 = new CustomIcon("TileEntities/Compartment/13"); + public static final CustomIcon OVERLAY_CABINET_15 = new CustomIcon("TileEntities/Compartment/14"); + public static final CustomIcon OVERLAY_CABINET_16 = new CustomIcon("TileEntities/Compartment/15"); + public static final CustomIcon OVERLAY_COMPARTMENT_1 = new CustomIcon("TileEntities/Compartment/16"); + public static final CustomIcon OVERLAY_COMPARTMENT_2 = new CustomIcon("TileEntities/Compartment/17"); + public static final CustomIcon OVERLAY_COMPARTMENT_3 = new CustomIcon("TileEntities/Compartment/18"); + public static final CustomIcon OVERLAY_COMPARTMENT_4 = new CustomIcon("TileEntities/Compartment/19"); + public static final CustomIcon OVERLAY_COMPARTMENT_5 = new CustomIcon("TileEntities/Compartment/20"); + public static final CustomIcon OVERLAY_COMPARTMENT_6 = new CustomIcon("TileEntities/Compartment/21"); + public static final CustomIcon OVERLAY_COMPARTMENT_7 = new CustomIcon("TileEntities/Compartment/22"); + public static final CustomIcon OVERLAY_COMPARTMENT_8 = new CustomIcon("TileEntities/Compartment/23"); + public static final CustomIcon OVERLAY_COMPARTMENT_9 = new CustomIcon("TileEntities/Compartment/24"); + public static final CustomIcon OVERLAY_COMPARTMENT_10 = new CustomIcon("TileEntities/Compartment/25"); + public static final CustomIcon OVERLAY_COMPARTMENT_11 = new CustomIcon("TileEntities/Compartment/26"); + public static final CustomIcon OVERLAY_COMPARTMENT_12 = new CustomIcon("TileEntities/Compartment/27"); + public static final CustomIcon OVERLAY_COMPARTMENT_13 = new CustomIcon("TileEntities/Compartment/28"); + public static final CustomIcon OVERLAY_COMPARTMENT_14 = new CustomIcon("TileEntities/Compartment/29"); + public static final CustomIcon OVERLAY_COMPARTMENT_15 = new CustomIcon("TileEntities/Compartment/30"); + public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31"); + + //Controllers + private static final CustomIcon Internal_Casing_Fusion_Simple_Front = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT"); + public static final CustomIcon Casing_Fusion_Simple_Front = Internal_Casing_Fusion_Simple_Front; + private static final CustomIcon Internal_Casing_Fusion_Simple_Front_Active = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE"); + public static final CustomIcon Casing_Fusion_Simple_Front_Active = Internal_Casing_Fusion_Simple_Front_Active; + + //Machine Casings + //Simple + private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top"); + public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top; + private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon("TileEntities/machine_bottom"); + public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom; + //Advanced and Ultra + private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine"); + public static final CustomIcon Casing_Machine_Advanced = Internal_Casing_Machine_Advanced; + private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu"); + public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra; + //Dimensional - Non Overlay + private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon("TileEntities/adv_machine_dimensional"); + public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional; + private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon("TileEntities/high_adv_machine_dimensional"); + public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv; + + //Material Casings + private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61"); + public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61; + private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL"); + public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel; + private static final CustomIcon Internal_Casing_Stellite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE"); + public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite; + private static final CustomIcon Internal_Casing_Talonite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE"); + public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite; + private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA"); + public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga; + private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100"); + public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100; + private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN"); + public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin; + + private static final CustomIcon Internal_Casing_Grisium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM"); + public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium; + private static final CustomIcon Internal_Casing_RedSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_RED_STEEL"); + public static final CustomIcon Casing_Material_RedSteel = Internal_Casing_RedSteel; + private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020"); + public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020; + private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS"); + public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS; + private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956"); + public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956; + private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE"); + public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide; + + + private static final CustomIcon Internal_Casing_HastelloyX = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X"); + public static final CustomIcon Casing_Material_HastelloyX = Internal_Casing_HastelloyX; + private static final CustomIcon Internal_Casing_HastelloyN = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N"); + public static final CustomIcon Casing_Material_HastelloyN = Internal_Casing_HastelloyN; + private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS"); + public static final CustomIcon Casing_Material_Fluid_IncoloyDS = Internal_Casing_Fluid_IncoloyDS; + + private static final CustomIcon Internal_Casing_Laurenium = new CustomIcon("TileEntities/MACHINE_CASING_LAURENIUM"); + public static final CustomIcon Casing_Material_Laurenium = Internal_Casing_Laurenium; + + //Trinium Alloys + public static final CustomIcon Casing_Trinium_Titanium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM"); + public static final CustomIcon Casing_Trinium_Naquadah = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH"); + public static final CustomIcon Casing_Trinium_Naquadah_Vent = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT"); + public static final CustomIcon Casing_Trinium_Naquadah_Carbon = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON"); + + //Material Machine/Firebox Casings + private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY"); + public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox; + + //Misc Casings + private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon("TileEntities/cover_redstone_conductor"); + public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off; + private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon("TileEntities/cover_redstone_emitter"); + public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On; + + //Redox Cells + public static final CustomIcon Casing_Redox_1 = new CustomIcon("redox/redox1"); + public static final CustomIcon Casing_Redox_2 = new CustomIcon("redox/redox2"); + public static final CustomIcon Casing_Redox_3 = new CustomIcon("redox/redox3"); + public static final CustomIcon Casing_Redox_4 = new CustomIcon("redox/redox4"); + public static final CustomIcon Casing_Redox_5 = new CustomIcon("redox/redox5"); + public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6"); + //public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7"); + //public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8"); + + //Centrifuge Casing + private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE"); + public static final CustomIcon Casing_Material_Centrifuge = Internal_Casing_Centrifuge; + + //MACHINE_CASING_FARM_MANAGER_STRUCTURAL + //Farm Manager Casings + private static final CustomIcon Internal_Casing_Machine_Farm_Manager = new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); + public static final CustomIcon Casing_Machine_Farm_Manager = Internal_Casing_Machine_Farm_Manager; + //Acacia_Log + private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top"); + public static final CustomIcon Casing_Machine_Acacia_Log = Internal_Casing_Machine_Acacia_Log; + //Podzol Top + private static final CustomIcon Internal_Casing_Machine_Podzol = new CustomIcon("TileEntities/dirt_podzol_top"); + public static final CustomIcon Casing_Machine_Podzol = Internal_Casing_Machine_Podzol; + + //Structural Blocks + private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A = new CustomIcon("chrono/MetalGrate"); + public static final CustomIcon Casing_Machine_Metal_Grate_A = Internal_Casing_Machine_Metal_Grate_A; + private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A_Solid = new CustomIcon("chrono/MetalGrateA_Solid"); + public static final CustomIcon Casing_Machine_Metal_Grate_A_Solid = Internal_Casing_Machine_Metal_Grate_A_Solid; + private static final CustomIcon Internal_Casing_Machine_Metal_Grate_B = new CustomIcon("chrono/MetalGrate2"); + public static final CustomIcon Casing_Machine_Metal_Grate_B = Internal_Casing_Machine_Metal_Grate_B; + private static final CustomIcon Internal_Casing_Machine_Metal_Panel_A = new CustomIcon("chrono/MetalPanel"); + public static final CustomIcon Casing_Machine_Metal_Panel_A = Internal_Casing_Machine_Metal_Panel_A; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_A = new CustomIcon("chrono/MetalSheet"); + public static final CustomIcon Casing_Machine_Metal_Sheet_A = Internal_Casing_Machine_Metal_Sheet_A; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_B = new CustomIcon("chrono/MetalSheet2"); + public static final CustomIcon Casing_Machine_Metal_Sheet_B = Internal_Casing_Machine_Metal_Sheet_B; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_C = new CustomIcon("chrono/MetalSheet3"); + public static final CustomIcon Casing_Machine_Metal_Sheet_C = Internal_Casing_Machine_Metal_Sheet_C; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_D = new CustomIcon("chrono/MetalSheet4"); + public static final CustomIcon Casing_Machine_Metal_Sheet_D = Internal_Casing_Machine_Metal_Sheet_D; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_E = new CustomIcon("chrono/MetalSheet5"); + public static final CustomIcon Casing_Machine_Metal_Sheet_E = Internal_Casing_Machine_Metal_Sheet_E; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_F = new CustomIcon("chrono/MetalSheet6"); + public static final CustomIcon Casing_Machine_Metal_Sheet_F = Internal_Casing_Machine_Metal_Sheet_F; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_G = new CustomIcon("chrono/MetalSheet7"); + public static final CustomIcon Casing_Machine_Metal_Sheet_G = Internal_Casing_Machine_Metal_Sheet_G; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_H = new CustomIcon("chrono/MetalSheet8"); + public static final CustomIcon Casing_Machine_Metal_Sheet_H = Internal_Casing_Machine_Metal_Sheet_H; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_I = new CustomIcon("chrono/MetalSheet9"); + public static final CustomIcon Casing_Machine_Metal_Sheet_I = Internal_Casing_Machine_Metal_Sheet_I; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_J = new CustomIcon("chrono/MetalSheet10"); + public static final CustomIcon Casing_Machine_Metal_Sheet_J = Internal_Casing_Machine_Metal_Sheet_J; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_K = new CustomIcon("chrono/MetalSheet11"); + public static final CustomIcon Casing_Machine_Metal_Sheet_K = Internal_Casing_Machine_Metal_Sheet_K; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_L = new CustomIcon("chrono/MetalSheet12"); + public static final CustomIcon Casing_Machine_Metal_Sheet_L = Internal_Casing_Machine_Metal_Sheet_L; + private static final CustomIcon Internal_Overlay_Machine_Cyber_A = new CustomIcon("chrono/CyberPanel"); + public static final CustomIcon Overlay_Machine_Cyber_A = Internal_Overlay_Machine_Cyber_A; + private static final CustomIcon Internal_Overlay_Machine_Cyber_B = new CustomIcon("chrono/CyberPanel2"); + public static final CustomIcon Overlay_Machine_Cyber_B = Internal_Overlay_Machine_Cyber_B; + + + public static final CustomIcon TEXTURE_CASING_AMAZON = new CustomIcon("TileEntities/CASING_AMAZON"); + public static final CustomIcon TEXTURE_CASING_ADVANCED_CRYOGENIC = new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC"); + public static final CustomIcon TEXTURE_CASING_ADVANCED_VOLCNUS = new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS"); + public static final CustomIcon TEXTURE_CASING_ROCKETDYNE = new CustomIcon("TileEntities/MACHINE_CASING_ROCKETDYNE"); + public static final CustomIcon TEXTURE_CASING_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_GRINDING_FACTORY"); + public static final CustomIcon TEXTURE_CASING_FLOTATION = new CustomIcon("TileEntities/MACHINE_CASING_FLOTATION"); + + // Custom Pipes + public static final CustomIcon TEXTURE_PIPE_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_PIPE_T1"); + + // Custom Gearboxes + public static final CustomIcon TEXTURE_GEARBOX_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_GEARBOX_T1"); + + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II = new CustomIcon("iconsets/MACHINE_CASING_FUSION_3"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_INNER = new CustomIcon("iconsets/MACHINE_CASING_FUSION_COIL_II"); + public static final CustomIcon TEXTURE_CASING_FUSION_CASING_ULTRA = new CustomIcon("iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA"); + // + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_1 = new CustomIcon("iconsets/FUSIONIII_1"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_2 = new CustomIcon("iconsets/FUSIONIII_2"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_3 = new CustomIcon("iconsets/FUSIONIII_3"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_4 = new CustomIcon("iconsets/FUSIONIII_4"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_5 = new CustomIcon("iconsets/FUSIONIII_5"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_6 = new CustomIcon("iconsets/FUSIONIII_6"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_7 = new CustomIcon("iconsets/FUSIONIII_7"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_8 = new CustomIcon("iconsets/FUSIONIII_8"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_9 = new CustomIcon("iconsets/FUSIONIII_9"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_10 = new CustomIcon("iconsets/FUSIONIII_10"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_11 = new CustomIcon("iconsets/FUSIONIII_11"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_12 = new CustomIcon("iconsets/FUSIONIII_12"); + + //Overlays + //Fan Textures + private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon("TileEntities/machine_top_vent_rotating"); + public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent; + private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon("TileEntities/machine_top_vent_rotating_fast"); + public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast; + private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon("TileEntities/adv_machine_vent_rotating"); + public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv; + private static final CustomIcon Internal_Overlay_Machine_Turbine_Active = new CustomIcon("TileEntities/STEAM_TURBINE_SIDE_ACTIVE"); + public static final CustomIcon Overlay_Machine_Turbine_Active = Internal_Overlay_Machine_Turbine_Active; + //Grate Texture + public static final CustomIcon OVERLAY_GRATE_A = new CustomIcon("metro/OVERLAY_GRATE_A"); + //Speaker Texture + private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out"); + public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound; + private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon("TileEntities/audio_out_active"); + public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active; + //Diesel Engines + private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon("TileEntities/machine_top_dieselmotor"); + public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical; + private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon("TileEntities/machine_top_dieselmotor2"); + public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal; + private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon("TileEntities/machine_top_dieselmotor_active"); + public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = Internal_Overlay_Machine_Diesel_Vertical_Active; + private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon("TileEntities/machine_top_dieselmotor2_active"); + public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = Internal_Overlay_Machine_Diesel_Horizontal_Active; + //Computer Screens + private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon("TileEntities/adv_machine_screen_random1"); + public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1; + private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon("TileEntities/adv_machine_screen_random2"); + public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2; + private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon("TileEntities/adv_machine_screen_random3"); + public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3; + private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon("TileEntities/adv_machine_screen_frequency"); + public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency; + private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon("TileEntities/adv_machine_screen_logo"); + public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo; + private static final CustomIcon Internal_Overlay_Machine_Cyber_Interface = new CustomIcon("chrono/Overlay_Cyber"); + public static final CustomIcon Overlay_Machine_Cyber_Interface = Internal_Overlay_Machine_Cyber_Interface; + + //Machine Controller Overlays + private static final CustomIcon Internal_Overlay_Machine_Controller_Default = new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED"); + public static final CustomIcon Overlay_Machine_Controller_Default = Internal_Overlay_Machine_Controller_Default; + private static final CustomIcon Internal_Overlay_Machine_Controller_Default_Active = new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE"); + public static final CustomIcon Overlay_Machine_Controller_Default_Active = Internal_Overlay_Machine_Controller_Default_Active; + + private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced = new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED"); + public static final CustomIcon Overlay_Machine_Controller_Advanced = Internal_Overlay_Machine_Controller_Advanced; + private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced_Active = new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE"); + public static final CustomIcon Overlay_Machine_Controller_Advanced_Active = Internal_Overlay_Machine_Controller_Advanced_Active; + + //Fluid Reactor Overlays + public static final CustomIcon Overlay_FluidReactor_Front = new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT"); + public static final CustomIcon Overlay_FluidReactor_Side = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE"); + public static final CustomIcon Overlay_FluidReactor_Top = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP"); + public static final CustomIcon Overlay_FluidReactor_Front_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE"); + public static final CustomIcon Overlay_FluidReactor_Side_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE"); + public static final CustomIcon Overlay_FluidReactor_Top_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE"); + + //Crafting Overlays + private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); + public static final CustomIcon Overlay_Crafting_Bronze = Internal_Overlay_Crafting_Bronze; + private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); + public static final CustomIcon Overlay_Crafting_Steel = Internal_Overlay_Crafting_Steel; + + //Covers + private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); + public static final CustomIcon Overlay_Overflow_Valve = Internal_Overlay_Overflow_Valve; + + + //Hatch Overlays + //Charger Texture + private static final CustomIcon Internal_Overlay_Hatch_Charger = new CustomIcon("TileEntities/cover_charger"); + public static final CustomIcon Overlay_Hatch_Charger = Internal_Overlay_Hatch_Charger; + //Discharger Texture + private static final CustomIcon Internal_Overlay_Hatch_Discharger = new CustomIcon("TileEntities/cover_discharge"); + public static final CustomIcon Overlay_Hatch_Discharger = Internal_Overlay_Hatch_Discharger; + //Advanced Muffler + private static final CustomIcon Internal_Overlay_Hatch_Muffler_Adv = new CustomIcon("iconsets/OVERLAY_MUFFLER_ADV"); + public static final CustomIcon Overlay_Hatch_Muffler_Adv = Internal_Overlay_Hatch_Muffler_Adv; + //Control Core Bus + private static final CustomIcon Internal_Overlay_Hatch_Control_Core = new CustomIcon("iconsets/OVERLAY_CONTROL_CORE_BUS"); + public static final CustomIcon Overlay_Hatch_Control_Core = Internal_Overlay_Hatch_Control_Core; + // Milling Ball Bus + private static final CustomIcon Internal_Overlay_Bus_Milling_Balls = new CustomIcon("iconsets/OVERLAY_MILLING_BALL_BUS"); + public static final CustomIcon Overlay_Bus_Milling_Balls = Internal_Overlay_Bus_Milling_Balls; + // Catalyst Bus + private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS"); + public static final CustomIcon Overlay_Bus_Catalyst = Internal_Overlay_Bus_Catalyst; + // RTG Hatch + private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); + public static final CustomIcon Overlay_Hatch_RTG_Off = Internal_Overlay_Hatch_RTG_Off; + private static final CustomIcon Internal_Overlay_Hatch_RTG_On = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_ON"); + public static final CustomIcon Overlay_Hatch_RTG_On = Internal_Overlay_Hatch_RTG_On; + + //Dimensional + private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue"); + public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue; + private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange"); + public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange; + //Icons + private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab"); + public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab; + private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon("TileEntities/adv_machine_matterfab_active"); + public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active; + + private static final CustomIcon Internal_Overlay_MatterFab_Animated = new CustomIcon("TileEntities/adv_machine_matterfab_animated"); + public static final CustomIcon Overlay_MatterFab_Animated = Internal_Overlay_MatterFab_Animated; + private static final CustomIcon Internal_Overlay_MatterFab_Active_Animated = new CustomIcon("TileEntities/adv_machine_matterfab_active_animated"); + public static final CustomIcon Overlay_MatterFab_Active_Animated = Internal_Overlay_MatterFab_Active_Animated; + + private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil"); + public static final CustomIcon Overlay_Oil = Internal_Overlay_Oil; + private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum"); + public static final CustomIcon Overlay_UU_Matter = Internal_Overlay_UU_Matter; + + // GT++ Tiered Hulls + public static final CustomIcon TEXTURE_CASING_TIERED_ULV = new CustomIcon("iconsets/TieredHulls/CASING_ULV"); + public static final CustomIcon TEXTURE_CASING_TIERED_LV = new CustomIcon("iconsets/TieredHulls/CASING_LV"); + public static final CustomIcon TEXTURE_CASING_TIERED_MV = new CustomIcon("iconsets/TieredHulls/CASING_MV"); + public static final CustomIcon TEXTURE_CASING_TIERED_HV = new CustomIcon("iconsets/TieredHulls/CASING_HV"); + public static final CustomIcon TEXTURE_CASING_TIERED_EV = new CustomIcon("iconsets/TieredHulls/CASING_EV"); + public static final CustomIcon TEXTURE_CASING_TIERED_IV = new CustomIcon("iconsets/TieredHulls/CASING_IV"); + public static final CustomIcon TEXTURE_CASING_TIERED_LuV = new CustomIcon("iconsets/TieredHulls/CASING_LuV"); + public static final CustomIcon TEXTURE_CASING_TIERED_ZPM = new CustomIcon("iconsets/TieredHulls/CASING_ZPM"); + public static final CustomIcon TEXTURE_CASING_TIERED_UV = new CustomIcon("iconsets/TieredHulls/CASING_UV"); + public static final CustomIcon TEXTURE_CASING_TIERED_MAX = new CustomIcon("iconsets/TieredHulls/CASING_MAX"); + + //Metroid related + public static final CustomIcon TEXTURE_METAL_PANEL_A = new CustomIcon("metro/TEXTURE_METAL_PANEL_A"); + public static final CustomIcon TEXTURE_METAL_PANEL_B = new CustomIcon("metro/TEXTURE_METAL_PANEL_B"); + public static final CustomIcon TEXTURE_METAL_PANEL_C = new CustomIcon("metro/TEXTURE_METAL_PANEL_C"); + public static final CustomIcon TEXTURE_METAL_PANEL_D = new CustomIcon("metro/TEXTURE_METAL_PANEL_D"); + public static final CustomIcon TEXTURE_METAL_PANEL_E = new CustomIcon("metro/TEXTURE_METAL_PANEL_E"); + public static final CustomIcon TEXTURE_METAL_PANEL_F = new CustomIcon("metro/TEXTURE_METAL_PANEL_F"); + public static final CustomIcon TEXTURE_METAL_PANEL_G = new CustomIcon("metro/TEXTURE_METAL_PANEL_G"); + public static final CustomIcon TEXTURE_METAL_PANEL_H = new CustomIcon("metro/TEXTURE_METAL_PANEL_H"); + public static final CustomIcon TEXTURE_METAL_PANEL_I = new CustomIcon("metro/TEXTURE_METAL_PANEL_I"); + + public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); + + public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); + public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); + + public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A"); + public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT"); + public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT"); + public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A"); + public static final CustomIcon TEXTURE_STONE_RED_B = new CustomIcon("metro/TEXTURE_STONE_RED_B"); + public static final CustomIcon TEXTURE_STONE_BLUE_A = new CustomIcon("metro/TEXTURE_STONE_BLUE_A"); + public static final CustomIcon TEXTURE_STONE_GREEN_A = new CustomIcon("metro/TEXTURE_STONE_GREEN_A"); + public static final CustomIcon TEXTURE_STONE_TABLET_A = new CustomIcon("metro/TEXTURE_STONE_TABLET_A"); + public static final CustomIcon TEXTURE_STONE_TABLET_B = new CustomIcon("metro/TEXTURE_STONE_TABLET_B"); + + public static final CustomIcon TEXTURE_TECH_A = new CustomIcon("metro/TEXTURE_TECH_A"); + public static final CustomIcon TEXTURE_TECH_B = new CustomIcon("metro/TEXTURE_TECH_B"); + public static final CustomIcon TEXTURE_TECH_C = new CustomIcon("metro/TEXTURE_TECH_C"); + + public static final CustomIcon TEXTURE_TECH_PANEL_A = new CustomIcon("metro/TEXTURE_TECH_PANEL_A"); + public static final CustomIcon TEXTURE_TECH_PANEL_B = new CustomIcon("metro/TEXTURE_TECH_PANEL_B"); + public static final CustomIcon TEXTURE_TECH_PANEL_C = new CustomIcon("metro/TEXTURE_TECH_PANEL_C"); + public static final CustomIcon TEXTURE_TECH_PANEL_D = new CustomIcon("metro/TEXTURE_TECH_PANEL_D"); + + public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE = new CustomIcon("TileEntities/DecayablesChest_bottom"); + public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT = new CustomIcon("TileEntities/DecayablesChest_top"); + + // LFTR Single blocks + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE"); + + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE"); + + + //Overlay Arrays + public static ITexture[] OVERLAYS_ENERGY_OUT_BUFFER = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{255, 100, 0, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{255, 255, 30, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{128, 128, 128, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0})}; + + public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{255, 100, 0, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{255, 255, 30, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{128, 128, 128, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0})}; + + public static ITexture[] OVERLAYS_CABINET_FRONT = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16, + new short[]{255, 255, 255, 0}),}; + + public static ITexture[] OVERLAYS_COMPARTMENT_FRONT = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_7, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_8, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_9, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_10, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_11, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_12, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_13, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_14, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_15, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_16, + new short[]{255, 255, 255, 0}),}; + + public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[]{ + TEXTURE_CASING_FUSION_COIL_II_1, TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3, + TEXTURE_CASING_FUSION_COIL_II_4, TEXTURE_CASING_FUSION_COIL_II_5, TEXTURE_CASING_FUSION_COIL_II_6, + TEXTURE_CASING_FUSION_COIL_II_7, TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9, + TEXTURE_CASING_FUSION_COIL_II_10, TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12}; + + public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[]{ + TEXTURE_CASING_TIERED_ULV, + TEXTURE_CASING_TIERED_LV, + TEXTURE_CASING_TIERED_MV, + TEXTURE_CASING_TIERED_HV, + TEXTURE_CASING_TIERED_EV, + TEXTURE_CASING_TIERED_IV, + TEXTURE_CASING_TIERED_LuV, + TEXTURE_CASING_TIERED_ZPM, + TEXTURE_CASING_TIERED_UV, + TEXTURE_CASING_TIERED_MAX}; + + + public static Object Casing_Material_Turbine; + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java new file mode 100644 index 0000000000..cc5cf3d55e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java @@ -0,0 +1,32 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; + +public class TexturesGtCutomCovers { + + public static final CustomIcon[] TEXTURE_ZTONES_AGON = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_ISZM = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_KORP = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_JELT = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_BITT = new CustomIcon[16]; + + public static void init() { + generateZTones(); + } + + private static void generateZTones() { + // ZTONES + String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; + int aArrayIndex = 0; + CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, + TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; + + for (CustomIcon[] t : aArrays) { + for (int s = 0; s < 16; s++) { + t[s] = new CustomIcon("Ztones", "sets/" + aZtoneCoverTextureNames[aArrayIndex] + "/"+aZtoneCoverTextureNames[aArrayIndex]+"_ (" + s + ")"); + } + aArrayIndex++; + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java new file mode 100644 index 0000000000..ee104eaca3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java @@ -0,0 +1,61 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; + +public final class TexturesGtTools { + + public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER"); + public final static CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER"); + public final static CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS"); + public final static CustomIcon ELECTRIC_LIGHTER = new CustomIcon("iconsets/ELECTRIC_LIGHTER"); + public final static CustomIcon ELECTRIC_BUTCHER_KNIFE = new CustomIcon("iconsets/ELECTRIC_BUTCHER_KNIFE"); + + + + + + + + + public final static class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon, mOverlay; + protected final String mIconName; + + public CustomIcon(final String aIconName) { + this.mIconName = aIconName; + Logger.INFO("Constructing a Custom Texture. " + this.mIconName); + GregTech_API.sGTItemIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return this.mOverlay; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName); + //Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g); + this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName + "_OVERLAY"); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java new file mode 100644 index 0000000000..c3d6a655c3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java @@ -0,0 +1,318 @@ +/* +package gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks4; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; + +public class LargeTurbineTextureHandler { + + */ +/** + * LP Turbines + *//* + + private static CustomIcon aTex1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1"); + private static CustomIcon aTex1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_1"); + private static CustomIcon aTex2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2"); + private static CustomIcon aTex2 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_2"); + private static CustomIcon aTex3_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3"); + private static CustomIcon aTex3 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_3"); + private static CustomIcon aTex4_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4"); + private static CustomIcon aTex4 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_4"); + private static CustomIcon aTex5_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5"); + private static CustomIcon aTex5 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_5"); + private static CustomIcon aTex6_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6"); + private static CustomIcon aTex6 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_6"); + private static CustomIcon aTex7_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7"); + private static CustomIcon aTex7 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_7"); + private static CustomIcon aTex8_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8"); + private static CustomIcon aTex8 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_8"); + private static CustomIcon aTex9_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9"); + private static CustomIcon aTex9 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_9"); + + private static CustomIcon frontFace_0 = (aTex1); + private static CustomIcon frontFaceActive_0 = (aTex1_Active); + private static CustomIcon frontFace_1 = (aTex2); + private static CustomIcon frontFaceActive_1 = (aTex2_Active); + private static CustomIcon frontFace_2 = (aTex3); + private static CustomIcon frontFaceActive_2 = (aTex3_Active); + private static CustomIcon frontFace_3 = (aTex4); + private static CustomIcon frontFaceActive_3 = (aTex4_Active); + public static CustomIcon frontFace_4 = (aTex5); + public static CustomIcon frontFaceActive_4 = (aTex5_Active); + private static CustomIcon frontFace_5 = (aTex6); + private static CustomIcon frontFaceActive_5 = (aTex6_Active); + private static CustomIcon frontFace_6 = (aTex7); + private static CustomIcon frontFaceActive_6 = (aTex7_Active); + private static CustomIcon frontFace_7 = (aTex8); + private static CustomIcon frontFaceActive_7 = (aTex8_Active); + private static CustomIcon frontFace_8 = (aTex9); + private static CustomIcon frontFaceActive_8 = (aTex9_Active); + + CustomIcon[] OVERLAY_LP_TURBINE = new CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + CustomIcon[] OVERLAY_LP_TURBINE_ACTIVE = new CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + + */ +/** + * HP Turbines + *//* + + private static CustomIcon aTexHP1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1"); + private static CustomIcon aTexHP1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_1"); + private static CustomIcon aTexHP2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2"); + private static CustomIcon aTexHP2 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_2"); + private static CustomIcon aTexHP3_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3"); + private static CustomIcon aTexHP3 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_3"); + private static CustomIcon aTexHP4_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4"); + private static CustomIcon aTexHP4 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_4"); + private static CustomIcon aTexHP5_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5"); + private static CustomIcon aTexHP5 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_5"); + private static CustomIcon aTexHP6_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6"); + private static CustomIcon aTexHP6 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_6"); + private static CustomIcon aTexHP7_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7"); + private static CustomIcon aTexHP7 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_7"); + private static CustomIcon aTexHP8_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8"); + private static CustomIcon aTexHP8 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_8"); + private static CustomIcon aTexHP9_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9"); + private static CustomIcon aTexHP9 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_9"); + + private static CustomIcon frontFaceHP_0 = (aTexHP1); + private static CustomIcon frontFaceHPActive_0 = (aTexHP1_Active); + private static CustomIcon frontFaceHP_1 = (aTexHP2); + private static CustomIcon frontFaceHPActive_1 = (aTexHP2_Active); + private static CustomIcon frontFaceHP_2 = (aTexHP3); + private static CustomIcon frontFaceHPActive_2 = (aTexHP3_Active); + private static CustomIcon frontFaceHP_3 = (aTexHP4); + private static CustomIcon frontFaceHPActive_3 = (aTexHP4_Active); + public static CustomIcon frontFaceHP_4 = (aTexHP5); + public static CustomIcon frontFaceHPActive_4 = (aTexHP5_Active); + private static CustomIcon frontFaceHP_5 = (aTexHP6); + private static CustomIcon frontFaceHPActive_5 = (aTexHP6_Active); + private static CustomIcon frontFaceHP_6 = (aTexHP7); + private static CustomIcon frontFaceHPActive_6 = (aTexHP7_Active); + private static CustomIcon frontFaceHP_7 = (aTexHP8); + private static CustomIcon frontFaceHPActive_7 = (aTexHP8_Active); + private static CustomIcon frontFaceHP_8 = (aTexHP9); + private static CustomIcon frontFaceHPActive_8 = (aTexHP9_Active); + + CustomIcon[] OVERLAY_HP_TURBINE = new CustomIcon[]{ + frontFaceHP_0, + frontFaceHP_1, + frontFaceHP_2, + frontFaceHP_3, + frontFaceHP_4, + frontFaceHP_5, + frontFaceHP_6, + frontFaceHP_7, + frontFaceHP_8 + }; + + CustomIcon[] OVERLAY_HP_TURBINE_ACTIVE = new CustomIcon[]{ + frontFaceHPActive_0, + frontFaceHPActive_1, + frontFaceHPActive_2, + frontFaceHPActive_3, + frontFaceHPActive_4, + frontFaceHPActive_5, + frontFaceHPActive_6, + frontFaceHPActive_7, + frontFaceHPActive_8 + }; + + + + public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks4 thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + + //7 - shaft + //8 LP + //9 HP + + CustomIcon[] mGetCurrentTextureSet = null, mGetCurrentTextureSet_ACTIVE = null; + + + if (tMeta <= 6 || tMeta >= 10) { + return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); + } + else { + if (tMeta == 8) { + mGetCurrentTextureSet = OVERLAY_LP_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_LP_TURBINE_ACTIVE; + } + else if (tMeta == 9) { + mGetCurrentTextureSet = OVERLAY_HP_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_HP_TURBINE_ACTIVE; + } + if (mGetCurrentTextureSet == null || mGetCurrentTextureSet_ACTIVE == null) { + return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); + } + + + + if ((aSide == 2) || (aSide == 3)) { + TileEntity tTileEntity; + IMetaTileEntity tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[0].getIcon(); + } + return mGetCurrentTextureSet[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[3].getIcon(); + } + return mGetCurrentTextureSet[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[6].getIcon(); + } + return mGetCurrentTextureSet[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[1].getIcon(); + } + return mGetCurrentTextureSet[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[7].getIcon(); + } + return mGetCurrentTextureSet[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[8].getIcon(); + } + return mGetCurrentTextureSet[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[5].getIcon(); + } + return mGetCurrentTextureSet[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[2].getIcon(); + } + return mGetCurrentTextureSet[2].getIcon(); + } + } else if ((aSide == 4) || (aSide == 5)) { + TileEntity tTileEntity; + Object tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[0].getIcon(); + } + return mGetCurrentTextureSet[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[3].getIcon(); + } + return mGetCurrentTextureSet[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[6].getIcon(); + } + return mGetCurrentTextureSet[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[1].getIcon(); + } + return mGetCurrentTextureSet[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[7].getIcon(); + } + return mGetCurrentTextureSet[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[8].getIcon(); + } + return mGetCurrentTextureSet[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[5].getIcon(); + } + return mGetCurrentTextureSet[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[2].getIcon(); + } + return mGetCurrentTextureSet[2].getIcon(); + } + } + } + return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); + } + + public boolean isUsingAnimatedTexture(TileEntity tTileEntity) { + boolean aVal = true; + */ +/*IGregTechTileEntity aTile; + if (tTileEntity instanceof IGregTechTileEntity) { + aTile = (IGregTechTileEntity) tTileEntity; + if (aTile != null) { + final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity).isControllerActive(); + Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status"); + } + } + } *//* + + return aVal; + } + + public GT_MetaTileEntity_Hatch_Turbine isTurbineHatch(final IGregTechTileEntity aTileEntity) { + if (aTileEntity != null) { + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + return (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; + } + } + return null; + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java new file mode 100644 index 0000000000..ca7cbca5f8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_Generic_3x3.java @@ -0,0 +1,87 @@ +package gtPlusPlus.xmod.gregtech.common.blueprint; + +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.xmod.gregtech.api.objects.MultiblockBlueprint; +import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; + +public class Blueprint_Generic_3x3 extends MultiblockBlueprint { + + public Blueprint_Generic_3x3(Pair aCasing, int aTextureID) { + super(3, 3, 3, 10, aTextureID); + + // Top/Bottom + MultiblockLayer a0 = new MultiblockLayer(3, 3); + Block aCasingBlock_1 = aCasing.getKey(); + int aMeta = aCasing.getValue(); + a0.addBlockForPos(aCasingBlock_1, aMeta, 0, 0, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 0, 1, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 0, 2, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 1, 0, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 1, 1, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 1, 2, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 2, 0, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 2, 1, true); + a0.addBlockForPos(aCasingBlock_1, aMeta, 2, 2, true); + a0.lock(true); + + //Layer one + MultiblockLayer a1 = new MultiblockLayer(3, 3); + a1.addBlockForPos(aCasingBlock_1, aMeta, 0, 0, true); + a1.addBlockForPos(aCasingBlock_1, aMeta, 0, 1, true); + a1.addBlockForPos(aCasingBlock_1, aMeta, 0, 2, true); + a1.addBlockForPos(aCasingBlock_1, aMeta, 1, 0, true); + a1.addBlockForPos(Blocks.air, 0, 1, 1, true); + a1.addController(1, 2); + a1.addBlockForPos(aCasingBlock_1, aMeta, 2, 0, true); + a1.addBlockForPos(aCasingBlock_1, aMeta, 2, 1, true); + a1.addBlockForPos(aCasingBlock_1, aMeta, 2, 2, true); + a1.lock(true); + + this.setLayer(a0, 0); + this.setLayer(a1, 1); + this.setLayer(a0, 2); + } + + @Override + public int getMinimumInputBus() { + return 0; + } + + @Override + public int getMinimumInputHatch() { + return 0; + } + + @Override + public int getMinimumOutputBus() { + return 0; + } + + @Override + public int getMinimumOutputHatch() { + return 0; + } + + @Override + public int getMinimumInputEnergy() { + return 1; + } + + @Override + public int getMinimumOutputEnergy() { + return 0; + } + + @Override + public int getMinimumMaintHatch() { + return 1; + } + + @Override + public int getMinimumMufflers() { + return 1; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java new file mode 100644 index 0000000000..3551172904 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blueprint/Blueprint_LFTR.java @@ -0,0 +1,137 @@ +package gtPlusPlus.xmod.gregtech.common.blueprint; + +import gregtech.api.enums.TAE; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.xmod.gregtech.api.objects.MultiblockBlueprint; +import gtPlusPlus.xmod.gregtech.api.objects.MultiblockLayer; +import net.minecraft.block.Block; + +public class Blueprint_LFTR extends MultiblockBlueprint { + + public Blueprint_LFTR() { + super(7, 4, 7, 10, TAE.GTPP_INDEX(12)); + + + Block aCasingMain = ModBlocks.blockCasingsMisc; + int aMetaCasingMain = 12; + int aMetaCasingSecondary = 13; + + + + /** + * First Layer (All edges can be Hatches, controller is centered in the front) + */ + + MultiblockLayer a0 = new MultiblockLayer(7, 7); + for (int i = 0; i < 7; i++) { + a0.addBlockForPos(aCasingMain, aMetaCasingMain, i, 0, true); + } + for (int i = 0; i < 7; i++) { + for (int u = 1; u < 6; u++) { + a0.addBlockForPos(aCasingMain, aMetaCasingMain, i, u, i == 0 ? true : i == 6 ? true : false); + } + } + for (int i = 0; i < 7; i++) { + if (i != 3) { + a0.addBlockForPos(aCasingMain, aMetaCasingMain, i, 6, true); + } + else { + a0.addController(i, 6); + } + } + a0.lock(true); + + + + + /** + * Middle Layer(s) + */ + + MultiblockLayer a1 = new MultiblockLayer(7, 7); + for (int i = 0; i < 7; i++) { + a1.addBlockForPos(aCasingMain, aMetaCasingSecondary, i, 0, false); + } + for (int i = 0; i < 7; i++) { + for (int u = 1; u < 6; u++) { + if (i == 0 || i == 6) + a1.addBlockForPos(aCasingMain, aMetaCasingSecondary, i, u, false); + } + } + for (int i = 0; i < 7; i++) { + a1.addBlockForPos(aCasingMain, aMetaCasingSecondary, i, 6, false); + + } + a1.lock(true); + + + /** + * Top Layer (All edges can be Hatches, Mufflers required in inner 3x3) + */ + + MultiblockLayer a2 = new MultiblockLayer(7, 7); + for (int i = 0; i < 7; i++) { + a2.addBlockForPos(aCasingMain, aMetaCasingMain, i, 0, true); + } + for (int i = 0; i < 7; i++) { + for (int u = 1; u < 6; u++) { + if ((i == 2 || i == 3 || i == 4) && (u == 2 || u ==3 || u == 4)) { + a2.addMuffler(aCasingMain, aMetaCasingMain, i, u); + } + else { + a2.addBlockForPos(aCasingMain, aMetaCasingMain, i, u, true); + } + } + } + for (int i = 0; i < 7; i++) { + a2.addBlockForPos(aCasingMain, aMetaCasingMain, i, 6, true); + } + a2.lock(true); + + this.setLayer(a0, 0); + this.setLayer(a1, 1); + this.setLayer(a1, 2); + this.setLayer(a2, 3); + } + + @Override + public int getMinimumInputBus() { + return 0; + } + + @Override + public int getMinimumInputHatch() { + return 4; + } + + @Override + public int getMinimumOutputBus() { + return 0; + } + + @Override + public int getMinimumOutputHatch() { + return 4; + } + + @Override + public int getMinimumInputEnergy() { + return 0; + } + + @Override + public int getMinimumOutputEnergy() { + return 4; + } + + @Override + public int getMinimumMaintHatch() { + return 1; + } + + @Override + public int getMinimumMufflers() { + return 4; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java new file mode 100644 index 0000000000..2fba1b0448 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java @@ -0,0 +1,102 @@ +package gtPlusPlus.xmod.gregtech.common.covers; + +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_AGON; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_BITT; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_ISZM; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_JELT; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_KORP; + +import cpw.mods.fml.common.Loader; +import gtPlusPlus.core.lib.VanillaColours; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers; +import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; +import gtPlusPlus.xmod.gregtech.common.items.covers.MetaItemCoverCasings; + +public class CoverManager { + + // ZTones + public static MetaCustomCoverItem Cover_Agon; + public static MetaCustomCoverItem Cover_Iszm; + public static MetaCustomCoverItem Cover_Korp; + public static MetaCustomCoverItem Cover_Jelt; + public static MetaCustomCoverItem Cover_Bitt; + + // GT + public static MetaItemCoverCasings Cover_Gt_Machine_Casing; + + public static void generateCustomCovers() { + + // init textures + TexturesGtCutomCovers.init(); + + // GT Machine Casings + Cover_Gt_Machine_Casing = new MetaItemCoverCasings(); + + if (Loader.isModLoaded("Ztones")) { + String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; + MetaCustomCoverItem[] aZtoneCoverItems = new MetaCustomCoverItem[] { Cover_Agon, Cover_Iszm, Cover_Korp, + Cover_Jelt, Cover_Bitt }; + CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, + TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; + short[][][] aRGB = new short[][][] { ZTONES.RGB_AGON, ZTONES.RGB_ISZM, ZTONES.RGB_KORP, ZTONES.RGB_JELT, + ZTONES.RGB_BITT }; + for (int y = 0; y < aZtoneCoverTextureNames.length; y++) { + aZtoneCoverItems[y] = new MetaCustomCoverItem("Ztones", 16, aZtoneCoverTextureNames[y], aArrays[y], + aRGB[y]); + } + } + + } + + final static class ZTONES { + + private static final short[][] RGB_AGON = new short[][] { VanillaColours.DYE_WHITE.getAsShort(), + VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_LIME.getAsShort(), + VanillaColours.DYE_GREEN.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(), + VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(), + VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(), + VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_BROWN.getAsShort(), + VanillaColours.DYE_BLACK.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_LIGHT_GRAY.getAsShort(), }; + private static final short[][] RGB_ISZM = new short[][] { VanillaColours.DYE_LIGHT_GRAY.getAsShort(), + VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(), + VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_RED.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(), + VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_RED.getAsShort(), + VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(), + VanillaColours.DYE_DARK_PURPLE.getAsShort(), + }; + private static final short[][] RGB_KORP = new short[][] { new short[] { 125, 125, 125 }, + VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), + VanillaColours.DYE_DARK_GRAY.getAsShort(), new short[] { 22, 156, 156 }, new short[] { 22, 156, 156 }, + VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), }; + private static final short[][] RGB_JELT = new short[][] { VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_ORANGE.getAsShort(), }; + private static final short[][] RGB_BITT = new short[][] { VanillaColours.DYE_BLACK.getAsShort(), + VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(), + VanillaColours.DYE_LIME.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(), + VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(), + VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(), + VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(), + VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(), + VanillaColours.DYE_RED.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(), + VanillaColours.DYE_BROWN.getAsShort(), }; + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java new file mode 100644 index 0000000000..a88fbc0d66 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java @@ -0,0 +1,247 @@ +package gtPlusPlus.xmod.gregtech.common.covers; + +import gregtech.api.gui.GT_GUICover; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.minecraft.LangUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; +import gregtech.api.gui.widgets.GT_GuiIntegerTextBox; +import gregtech.api.enums.GT_Values; +import gregtech.api.net.GT_Packet_TileEntityCover; + + +public class GTPP_Cover_Overflow extends GT_CoverBehavior { + + public final int mTransferRate; + public final int mInitialTransferRate; + public final int mMaxTransferRate; + + public GTPP_Cover_Overflow(int aTransferRate) { + this.mTransferRate = aTransferRate * 1000 / 10; + this.mInitialTransferRate = aTransferRate; + this.mMaxTransferRate = aTransferRate * 1000; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + if (aCoverVariable == 0) { + return aCoverVariable; + } + if ((aTileEntity instanceof IFluidHandler)) { + //Logger.INFO("Trying to Void via Overflow."); + IFluidHandler tTank1; + ForgeDirection directionFrom; + directionFrom = ForgeDirection.UNKNOWN; + tTank1 = (IFluidHandler) aTileEntity; + if (tTank1 != null) { + //Logger.INFO("Found Self. "+aSide); + //FluidStack aTankStack = tTank1.drain(ForgeDirection.UNKNOWN, 1, false); + FluidStack aTankStack = tTank1.getTankInfo(directionFrom)[0].fluid; + if (aTankStack != null) { + //Logger.INFO("Found Fluid inside self - "+aTankStack.getLocalizedName()+", overflow point set at "+aCoverVariable+"L and we have "+aTankStack.amount+"L inside."); + if (aTankStack.amount > aCoverVariable) { + int aAmountToDrain = aTankStack.amount - aCoverVariable; + //Logger.INFO("There is "+aAmountToDrain+" more fluid in the tank than we would like."); + if (aAmountToDrain > 0) { + FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aAmountToDrain), true); + if (tLiquid != null) { + //Logger.INFO("Drained "+aAmountToDrain+"L."); + } + } + } + } + else { + //Logger.INFO("Could not simulate drain on self."); + } + } + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += (mMaxTransferRate * (aPlayer.isSneaking() ? 0.1f : 0.01f)); + } else { + aCoverVariable -= (mMaxTransferRate * (aPlayer.isSneaking() ? 0.1f : 0.01f)); + } + if (aCoverVariable > mMaxTransferRate) { + aCoverVariable = mInitialTransferRate; + } + if (aCoverVariable <= 0) { + aCoverVariable = mMaxTransferRate; + } + GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); + return aCoverVariable; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + boolean aShift = aPlayer.isSneaking(); + int aAmount = aShift ? 128 : 8; + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += aAmount; + } else { + aCoverVariable -= aAmount; + } + if (aCoverVariable > mMaxTransferRate) { + aCoverVariable = mInitialTransferRate; + } + if (aCoverVariable <= 0) { + aCoverVariable = mMaxTransferRate; + } + GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + return true; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 5; + } + + //GUI + @Override + public boolean hasCoverGUI() { + return true; + } + + @Override + public Object getClientGUI(byte aSide, int aCoverID, int coverData, ICoverable aTileEntity) { + return new GTPP_Cover_Overflow.GUI(aSide, aCoverID, coverData, aTileEntity); + } + + private class GUI extends GT_GUICover { + private final byte side; + private final int coverID; + private GT_GuiIntegerTextBox tBox; + private int coverVariable; + + private static final int startX = 10; + private static final int startY = 25; + private static final int spaceX = 18; + private static final int spaceY = 18; + + private boolean warn = false; + + public GUI(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + super(aTileEntity, 176, 107, GT_Utility.intToStack(aCoverID)); + this.side = aSide; + this.coverID = aCoverID; + this.coverVariable = aCoverVariable; + + tBox = new GT_GuiIntegerTextBox(this, 2, startX + spaceX * 0, startY + spaceY * 0 + 8, spaceX * 4 - 3, 12); + tBox.setText(String.valueOf(this.coverVariable)); + tBox.setMaxStringLength(10); + } + + @Override + protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) { + tBox.setFocused(true); + } + + @Override + public void drawExtras(int mouseX, int mouseY, float parTicks) { + super.drawExtras(mouseX, mouseY, parTicks); + this.getFontRenderer().drawString(trans("010", "L"), startX + spaceX * 4, 4 + startY + spaceY * 0 + 8, 0xFF555555); + if (warn) + this.getFontRenderer().drawString(trans("011","Max")+": "+coverVariable+"/"+mMaxTransferRate+" "+trans("010", "L"), startX + spaceX * 0, 4 + startY + spaceY * 1 + 6, 0xffff0000); + else + this.getFontRenderer().drawString(trans("011","Now")+": "+coverVariable+"/"+mMaxTransferRate+" "+trans("010", "L"), startX + spaceX * 0, 4 + startY + spaceY * 1 + 6, 0xFF555555); + } + @Override + public void onMouseWheel(int x, int y, int delta) { + for (GT_GuiIntegerTextBox box : textBoxes){ + if (box.isFocused()) { + int step = Math.max(1, Math.abs(delta / 120)); + step = (isShiftKeyDown() ? 50 : isCtrlKeyDown() ? 5 : 1) * (delta > 0 ? step : -step); + long i; + try { + i = Long.parseLong(box.getText()); + } catch (NumberFormatException e) { + return; + } + if (i > (Long.MAX_VALUE-1000)) + break; + + i = i + step; + if (i <= 0) + i = 0; + box.setText(String.valueOf(i)); + break; + } + } + } + + @Override + public void applyTextBox(GT_GuiIntegerTextBox box) { + long i; + String s = box.getText().trim(); + try { + i = Long.parseLong(s); + } catch (NumberFormatException e) { + resetTextBox(box); + return; + } + + warn = false; + if (box.id == 2) { + if (i > (long) mMaxTransferRate) { + i = mMaxTransferRate; + warn = true; + } else if (i < 0) { + i = 0; + } + coverVariable = (int) i; + } + box.setText(String.valueOf(i)); + GT_Values.NW.sendToServer(new GT_Packet_TileEntityCover(side, coverID, coverVariable, tile)); + } + + @Override + public void resetTextBox(GT_GuiIntegerTextBox box) { + if (box.id == 2) + box.setText(String.valueOf(coverVariable)); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java new file mode 100644 index 0000000000..0299447694 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java @@ -0,0 +1,182 @@ +package gtPlusPlus.xmod.gregtech.common.covers; + +import java.lang.reflect.Field; +import java.util.HashMap; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.LangUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + +public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior { + + public final int mInitialCapacity; + public final int mMaxItemCapacity; + + public static final Class sQuantumChest; + public static final Class sSuperChestGTPP; + public static final Class sSuperChestGTNH; + public static HashMap mItemAmountFields = new HashMap(); + public static HashMap mItemTypeFields = new HashMap(); + + static { + sQuantumChest = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest"); + sSuperChestGTPP = ReflectionUtils.getClass("gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest"); + if (CORE.GTNH) { + sSuperChestGTNH = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest"); + } + else { + sSuperChestGTNH = null; + } + if (sQuantumChest != null) { + mItemAmountFields.put(0, ReflectionUtils.getField(sQuantumChest, "mItemCount")); + mItemTypeFields.put(0, ReflectionUtils.getField(sQuantumChest, "mItemStack")); + } + if (sSuperChestGTPP != null) { + mItemAmountFields.put(1, ReflectionUtils.getField(sSuperChestGTPP, "mItemCount")); + mItemTypeFields.put(1, ReflectionUtils.getField(sSuperChestGTPP, "mItemStack")); + } + if (sSuperChestGTNH != null) { + mItemAmountFields.put(2, ReflectionUtils.getField(sSuperChestGTNH, "mItemCount")); + mItemTypeFields.put(2, ReflectionUtils.getField(sSuperChestGTNH, "mItemStack")); + } + } + + public GTPP_Cover_Overflow_Item(int aCapacity) { + this.mInitialCapacity = aCapacity; + this.mMaxItemCapacity = aCapacity * 1000; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + if (aCoverVariable == 0) { + return aCoverVariable; + } + + // Get the IGTTile + IGregTechTileEntity aGtTileEntity = aTileEntity.getIGregTechTileEntity(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()); + if (aGtTileEntity == null) { + return aCoverVariable; + } + + // Get the MetaTile + final IMetaTileEntity aMetaTileEntity = aGtTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return aCoverVariable; + } + boolean didHandle = false; + // Special Case for everything I want to support. /facepalm + if (sQuantumChest != null && sQuantumChest.isInstance(aMetaTileEntity)) { + didHandle = handleDigitalChest(aMetaTileEntity, 0); + } + else if (sSuperChestGTPP.isInstance(aMetaTileEntity)) { + didHandle = handleDigitalChest(aMetaTileEntity, 1); + + } + else if (CORE.GTNH && sSuperChestGTNH != null && sSuperChestGTNH.isInstance(aMetaTileEntity)) { + didHandle = handleDigitalChest(aMetaTileEntity, 2); + } + + return aCoverVariable; + } + + private boolean handleDigitalChest(IMetaTileEntity aTile, int aType) { + int aItemAmount = (int) ReflectionUtils.getFieldValue(mItemAmountFields.get(aType), aTile); + ItemStack aItemType = (ItemStack) ReflectionUtils.getFieldValue(mItemTypeFields.get(aType), aTile); + + if (aItemType == null || aItemAmount <= 0) { + return false; + } + else { + if (aItemAmount > mInitialCapacity) { + int aNewItemAmount = mInitialCapacity; + ReflectionUtils.setField(aTile, mItemAmountFields.get(aType), aNewItemAmount); + } + } + return true; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f)); + } else { + aCoverVariable -= (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f)); + } + if (aCoverVariable > mMaxItemCapacity) { + aCoverVariable = mInitialCapacity; + } + if (aCoverVariable <= 0) { + aCoverVariable = mMaxItemCapacity; + } + GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); + return aCoverVariable; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + boolean aShift = aPlayer.isSneaking(); + int aAmount = aShift ? 128 : 8; + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += aAmount; + } else { + aCoverVariable -= aAmount; + } + if (aCoverVariable > mMaxItemCapacity) { + aCoverVariable = mInitialCapacity; + } + if (aCoverVariable <= 0) { + aCoverVariable = mMaxItemCapacity; + } + GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + return true; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 5; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java new file mode 100644 index 0000000000..65b59ce151 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java @@ -0,0 +1,186 @@ +package gtPlusPlus.xmod.gregtech.common.covers; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_CoverBehavior; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.util.minecraft.LangUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; + +public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { + + private static final Map sConnectionStateForEntityMap = new ConcurrentHashMap(); + private static final Map sPrefixMap = new ConcurrentHashMap(); + private static final int VALUE_OFF = 0; + private static final int VALUE_ON = 1; + + public static String generateUniqueKey(byte aSide, ICoverable aEntity) { + try { + BlockPos aPos = new BlockPos(aEntity.getIGregTechTileEntity(aEntity.getXCoord(), aEntity.getYCoord(), aEntity.getZCoord())); + ForgeDirection aDir = ForgeDirection.getOrientation(aSide); + String s = aEntity.getInventoryName()+"."+aPos.getUniqueIdentifier()+aDir.name(); + return s; + } + catch (Throwable t) {} + XSTR x = new XSTR(); + return "ERROR."+x.getSeed()+x.hashCode()+x.nextDouble()+".ID"; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + PlayerUtils.messagePlayer(aPlayer, LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable)); + return super.onCoverRightclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + return super.onCoverScrewdriverclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable); + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } + + @Override + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + try { + String aKey = generateUniqueKey(aSide, aTileEntity); + Integer b = sConnectionStateForEntityMap.get(aKey); + //Logger.INFO("Val: "+aCoverVariable); + if (b != null && aCoverVariable != b) { + aCoverVariable = b; + } + if (b == null) { + b = aCoverVariable; + sConnectionStateForEntityMap.put(aKey, b); + trySetState(aSide, b == VALUE_ON ? VALUE_ON : VALUE_OFF, aTileEntity); + } + } + catch (Throwable t) { + + } + return aCoverVariable; + } + + @Override + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + @Override + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aCoverVariable); + } + + @Override + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return super.alwaysLookConnected(aSide, aCoverID, aCoverVariable, aTileEntity); + } + + @Override + public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, + ICoverable aTileEntity) { + if (!getConnectionState(aCoverVariable)) { + return 0; + } + return super.getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity); + } + + @Override + public void placeCover(byte aSide, ItemStack aCover, ICoverable aTileEntity) { + String aKey = generateUniqueKey(aSide, aTileEntity); + boolean state = getCoverConnections(aCover); + sPrefixMap.put(aKey, aCover.getUnlocalizedName()); + Logger.INFO("Mapping key "+aKey+" to "+state); + sConnectionStateForEntityMap.put(aKey, state ? VALUE_ON : VALUE_OFF); + Logger.INFO("Key Value: "+(state ? VALUE_ON : VALUE_OFF)); + //Try set cover state directly + //trySetState(aSide, state ? VALUE_ON : VALUE_OFF, aTileEntity); + super.placeCover(aSide, aCover, aTileEntity); + } + + @Override + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + boolean aForced) { + String aKey = generateUniqueKey(aSide, aTileEntity); + sConnectionStateForEntityMap.remove(aKey); + //Logger.INFO("Unmapping key "+aKey+"."); + return true; + } + + public static boolean getConnectionState(int aCoverVar) { + return aCoverVar == VALUE_ON; + } + + private static final void trySetState(byte aSide, int aState, ICoverable aTile) { + //Try set cover state directly + if (aTile instanceof IGregTechTileEntity) { + IGregTechTileEntity gTileEntity = (IGregTechTileEntity) aTile; + if (gTileEntity != null) { + gTileEntity.setCoverDataAtSide(aSide, aState); + } + } + } + + + public static boolean getConnectionState(byte aSide, ICoverable aTile) { + String aKey = generateUniqueKey(aSide, aTile); + return getConnectionState(aKey); + } + + public static boolean getConnectionState(String aKey) { + Integer b = sConnectionStateForEntityMap.get(aKey); + //Logger.INFO("Get State: "+b+" | "+aKey); + return b != null ? b == VALUE_ON : false; + } + + public static final boolean getCoverConnections(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("CustomCoverMeta"); + if (aNBT != null) { + return aNBT.getBoolean("AllowConnections"); + } + } + return false; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java new file mode 100644 index 0000000000..70c7b2da23 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java @@ -0,0 +1,429 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_ModHandler; +import gregtech.common.items.GT_MetaGenerated_Item_01; +import gregtech.common.items.GT_MetaGenerated_Item_02; +import gregtech.common.items.GT_MetaGenerated_Tool_01; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaWirelessCharger; +import ic2.api.info.Info; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; + +public class ChargingHelper { + + private static Map> mValidPlayers = new HashMap>(); + protected static Map mChargerMap = new HashMap(); + private int mTickTimer = 0; + private final int mTickMultiplier = 20; + + //Called whenever the player is updated or ticked. + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onPlayerTick(LivingUpdateEvent event) { + try { + if (event.entity != null && event.entityLiving != null){ + if (event.entityLiving instanceof EntityPlayer){ + EntityPlayer mPlayerMan = (EntityPlayer) event.entityLiving; + + + if (mPlayerMan != null){ + //Utils.LOG_WARNING("Found Player."); + + if (Utils.isServer()){ + //Utils.LOG_WARNING("Found Server-Side."); + + mTickTimer++; + if (mTickTimer % mTickMultiplier == 0){ + + long mVoltage = 0; + long mEuStored = 0; + + if (!mChargerMap.isEmpty() && mValidPlayers.containsKey(mPlayerMan)){ + InventoryPlayer mPlayerInventory = mPlayerMan.inventory; + ItemStack[] mArmourContents = mPlayerInventory.armorInventory.clone(); + ItemStack[] mInventoryContents = mPlayerInventory.mainInventory.clone(); + + for (GregtechMetaWirelessCharger mEntityTemp : mChargerMap.values()){ + if (mEntityTemp != null){ + if (mPlayerMan.getEntityWorld().provider.dimensionId == mEntityTemp.getDimensionID()){ + mVoltage = mEntityTemp.maxEUInput(); + mEuStored = mEntityTemp.getEUVar(); + if (mVoltage > 0 && mEuStored >= mVoltage){ + + Map LR = mEntityTemp.getLongRangeMap(); + Map LO = mEntityTemp.getLocalMap(); + + long mStartingEu = mEntityTemp.getEUVar(); + long mCurrentEu = mEntityTemp.getEUVar(); + long mEuUsed = 0; + if (mEntityTemp.getMode() == 0){ + if (!LR.isEmpty() && LR.containsKey(mPlayerMan)){ + mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); + mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); + } + } + else if (mEntityTemp.getMode() == 1){ + if (!LO.isEmpty() && LO.containsValue(mPlayerMan)){ + mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); + mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); + } + } + else { + if (!LR.isEmpty() && LR.containsKey(mPlayerMan)){ + mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); + mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); + } + if (!LO.isEmpty() && LO.containsValue(mPlayerMan)){ + mCurrentEu = chargeItems(mEntityTemp, mArmourContents, mPlayerMan); + mCurrentEu = chargeItems(mEntityTemp, mInventoryContents, mPlayerMan); + } + } + + if ((mEuUsed = (mStartingEu - mCurrentEu)) <= 0 && mEntityTemp != null){ + long mMaxDistance; + if (mEntityTemp.getMode() == 0){ + mMaxDistance = (4*GT_Values.V[mEntityTemp.getTier()]); + } + else if (mEntityTemp.getMode() == 1){ + mMaxDistance = (mEntityTemp.getTier()*10); + } + else { + mMaxDistance = (4*GT_Values.V[mEntityTemp.getTier()]/2); + } + double mDistance = calculateDistance(mEntityTemp, mPlayerMan); + long mVoltageCost = MathUtils.findPercentageOfInt(mMaxDistance, (float) mDistance); + + if (mVoltageCost > 0){ + if (mVoltageCost > mEntityTemp.maxEUInput()){ + mEntityTemp.setEUVar((mEntityTemp.getEUVar()-mEntityTemp.maxEUInput())); + } + else { + mEntityTemp.setEUVar((mEntityTemp.getEUVar()-mVoltageCost)); + } + } + } + } + } + } + } + } + } + } + } + } + } + } + + catch (Throwable t){ + //Utils.LOG_WARNING("State of Wireless Charger changed in an invalid way, this prevented a crash."); + + if (!mChargerMap.isEmpty()){ + for (GregtechMetaWirelessCharger r : mChargerMap.values()){ + if (r == null){ + mChargerMap.remove(r); + } + } + } + //t.printStackTrace(); + } + + + } + + public static boolean addEntry(BlockPos mPos, GregtechMetaWirelessCharger mEntity){ + if (mEntity == null){ + return false; + } + if (!mChargerMap.containsKey(mPos)){ + if (mChargerMap.put(mPos, mEntity) == null){ + return true; + } + else { + return false; + } + } + else { + return false; + } + } + + public static boolean removeEntry(BlockPos mPos, GregtechMetaWirelessCharger mEntity){ + if (mEntity == null){ + return false; + } + if (mChargerMap.containsKey(mPos)){ + if (mChargerMap.remove(mPos, mEntity)){ + return true; + } + else { + return false; + } + } + else { + return false; + } + } + + public static boolean addValidPlayer(EntityPlayer mPlayer, GregtechMetaWirelessCharger mEntity){ + if (mEntity == null){ + return false; + } + Logger.WARNING("trying to map new player"); + if (mValidPlayers.containsKey(mPlayer)){ + Logger.WARNING("Key contains player already?"); + return false; + } + else { + Logger.WARNING("key not found, adding"); + Pair mEntry = new Pair(mEntity, (byte) mEntity.getMode()); + if (mValidPlayers.put(mPlayer, mEntry) == null){ + Logger.WARNING("Added a Player to the Tick Map."); + return true; + } + else { + Logger.WARNING("Tried to add player but it was already there?"); + return false; + } + } + } + + public static boolean removeValidPlayer(EntityPlayer mPlayer, GregtechMetaWirelessCharger mEntity){ + if (mEntity == null){ + return false; + } + Logger.WARNING("trying to remove player from map"); + if (mValidPlayers.containsKey(mPlayer)){ + Logger.WARNING("key found, removing"); + Pair mEntry = new Pair(mEntity, (byte) mEntity.getMode()); + if (mValidPlayers.remove(mPlayer, mEntry)){ + Logger.WARNING("Removed a Player to the Tick Map."); + return true; + } + else { + Logger.WARNING("Tried to remove player but it was not there?"); + return false; + } + } + else { + Logger.WARNING("Key does not contain player?"); + return false; + } + } + + public double calculateDistance(GregtechMetaWirelessCharger mEntityTemp, EntityPlayer mPlayerMan){ + if (mEntityTemp == null || mPlayerMan == null){ + return 0; + } + return mEntityTemp.getDistanceBetweenTwoPositions(mEntityTemp.getTileEntityPosition(), mEntityTemp.getPositionOfEntity(mPlayerMan)); + } + + public long chargeItems(GregtechMetaWirelessCharger mEntity, ItemStack[] mItems, EntityPlayer mPlayer){ + if (mEntity == null){ + return -100; + } + if (mItems == null || mItems.length == 0){ + return mEntity.getEUVar(); + } + long mInitialValue = mEntity.getEUVar(); + long mReturnValue = chargeItemsEx(mEntity, mItems, mPlayer); + return ((mReturnValue < mInitialValue) ? mReturnValue : mInitialValue); + } + + public long chargeItemsEx(GregtechMetaWirelessCharger mEntity, ItemStack[] mItems, EntityPlayer mPlayer){ + + //Bad Entity + if (mEntity == null){ + return -100; + } + //Bad Inventory + if (mItems == null || mItems.length == 0){ + return mEntity.getEUVar(); + } + //Set Variables to Charge + int mChargedItems = 0; + final int mTier = mEntity.getTier(); + final long mVoltage = mEntity.maxEUInput(); + long mEuStored = mEntity.getEUVar(); + final long mEuStoredOriginal = mEntity.getEUVar(); + //For Inventory Contents + + int mItemSlot = 0; + + for (ItemStack mTemp : mItems){ + mItemSlot++; + if (mTemp != null){ + Logger.WARNING("Slot "+mItemSlot+" contains "+mTemp.getDisplayName()); + } + //Is item Electrical + if (isItemValid(mTemp)){ + Logger.WARNING("1"); + + //Transfer Limit + double mItemEuTLimit = ((IElectricItem) mTemp.getItem()).getTransferLimit(mTemp); + //Check if Tile has more or equal EU to what can be transferred into the item. + if (mEuStored >= mItemEuTLimit){ + Logger.WARNING("2"); + + double mItemMaxCharge = ((IElectricItem) mTemp.getItem()).getMaxCharge(mTemp); + double mitemCurrentCharge = ElectricItem.manager.getCharge(mTemp); + + if (mitemCurrentCharge >= mItemMaxCharge){ + continue; + } + + //Try get charge direct from NBT for GT and IC2 stacks + Logger.WARNING("3"); + if (mTemp.getItem() instanceof GT_MetaGenerated_Tool_01 + || mTemp.getItem() instanceof GT_MetaGenerated_Item_01 + || mTemp.getItem() instanceof GT_MetaGenerated_Item_02 + || ReflectionUtils.getClass("gregtech.common.items.GT_MetaGenerated_Item_03").isInstance(mTemp.getItem()) + || mTemp.getItem().getClass().getName().toLowerCase().equals(("gregtech.common.items.GT_MetaGenerated_Tool_01").toLowerCase())){ + if (!NBTUtils.hasKey(mTemp, "GT.ItemCharge")){ + if (!mTemp.getDisplayName().toLowerCase().contains("battery")){ + if (!GT_ModHandler.isElectricItem(mTemp)){ + continue; + } + } + else { + mitemCurrentCharge = 0; + } + } + else { + mitemCurrentCharge = NBTUtils.getLong(mTemp, "GT.ItemCharge"); + } + } + else if (mTemp.getItem() instanceof IElectricItem){ + mitemCurrentCharge = NBTUtils.getLong(mTemp, "charge"); + } + + double mVoltageIncrease; + if (mItemEuTLimit >= mVoltage){ + mVoltageIncrease = mVoltage; + } + else if (mItemEuTLimit < mVoltage){ + mVoltageIncrease = mItemEuTLimit; + } + else { + mVoltageIncrease = mItemEuTLimit; + } + + Logger.WARNING("4"); + + int mMulti; + if ((mitemCurrentCharge + (mVoltageIncrease*20)) <= (mItemMaxCharge - (mVoltageIncrease*20))){ + mMulti = 20; + } + else if ((mitemCurrentCharge + (mVoltageIncrease*10)) <= (mItemMaxCharge - (mVoltageIncrease*10))){ + mMulti = 10; + } + else if ((mitemCurrentCharge + (mVoltageIncrease*5)) <= (mItemMaxCharge - (mVoltageIncrease*5))){ + mMulti = 5; + } + else { + mMulti = 1; + } + Logger.WARNING("5"); + + + int mMultiVoltage = (int) (mMulti*mVoltageIncrease); + + if ((mitemCurrentCharge + mMultiVoltage) <= mItemMaxCharge){ + Logger.WARNING("6"); + int g = 0; + if ((g = GT_ModHandler.chargeElectricItem(mTemp, mMultiVoltage, Integer.MAX_VALUE, true, false)) > 0){ + Logger.WARNING("6.5 - "+g+" - "+mMulti); + for (int i=0; i 0){ + continue; + } + } + } + if (ElectricItem.manager.getCharge(mTemp) > mitemCurrentCharge){ + Logger.WARNING("7"); + mEntity.setEUVar(mEuStored-(mVoltage*mMulti)); + mEuStored = mEntity.getEUVar(); + Logger.WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp)); + mChargedItems++; + } + } + + //Try top up Item Chrage + mitemCurrentCharge = ElectricItem.manager.getCharge(mTemp); + if (mitemCurrentCharge < mItemMaxCharge && mitemCurrentCharge >= (mItemMaxCharge-mVoltage)){ + int xDif = (int) (mItemMaxCharge - mitemCurrentCharge); + Logger.WARNING("8 - "+xDif); + int g = 0; + if ((g = GT_ModHandler.chargeElectricItem(mTemp, xDif, Integer.MAX_VALUE, true, false)) >= 0){ + Logger.WARNING("8.5 - "+g); + if (ElectricItem.manager.getCharge(mTemp) >= mItemMaxCharge){ + Logger.WARNING("9"); + mEntity.setEUVar(mEntity.getEUVar()-(xDif)); + mEuStored = mEntity.getEUVar(); + Logger.WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp)); + mChargedItems++; + } + } + } + + + } + } + else { + if (mTemp != null){ + Logger.WARNING("Found Non-Valid item. "+mTemp.getDisplayName()); + } + } + } + + //Return Values + if (mChargedItems < 1){ + return mEuStoredOriginal; + } + + return mEntity.getEUVar(); + } + + public static boolean isItemValid(final ItemStack itemstack) { + if (itemstack == null){ + return false; + } + if (GT_ModHandler.isElectricItem(itemstack)){ + return true; + } + if ((accepts(itemstack)) || (itemstack.getItem() instanceof IElectricItem)) { + return true; + } + return false; + } + + public static boolean accepts(final ItemStack stack) { + if (stack == null) { + return false; + } + else { + return false; + } + //return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java new file mode 100644 index 0000000000..e06636e168 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java @@ -0,0 +1,42 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Container; +import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; +import net.minecraftforge.common.util.FakePlayerFactory; + +public class CraftingHelper{ + + public final String mInventoryName; + public final int mPosX; + public final int mPosY; + public final int mPosZ; + public final GT4Entity_AutoCrafter crafter; + public final World world; + public final EntityPlayerMP player; + public final AC_Helper_Container inventory; + + public CraftingHelper(GT4Entity_AutoCrafter AC){ + Logger.INFO("[A-C] Created a crafting helper."); + crafter = AC; + AC_Helper_Utils.addCrafter(AC); + //Get some variables. + world = AC.getBaseMetaTileEntity().getWorld(); + mPosX = AC.getBaseMetaTileEntity().getXCoord(); + mPosY = AC.getBaseMetaTileEntity().getYCoord(); + mPosZ = AC.getBaseMetaTileEntity().getZCoord(); + //Create Fake player to handle crating. + + player = CORE.getFakePlayer(world); + //Set storage container + inventory = new AC_Helper_Container(player.inventory, world, mPosX, mPosY, mPosZ); + mInventoryName = inventory.getMatrix().getInventoryName(); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java new file mode 100644 index 0000000000..333939d800 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java @@ -0,0 +1,79 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import java.util.HashMap; + +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.data.AES; +import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; +import net.minecraft.item.ItemStack; + +public class FlotationRecipeHandler { + + private static HashMap sMaterialMap = new HashMap(); + private static HashMap sMilledMap = new HashMap(); + private static final AES sEncodingHandler = new AES(); + + public static boolean registerOreType(Material aMaterial) { + String aMaterialKey = sEncodingHandler.encode(aMaterial.getUnlocalizedName()); + if (sMaterialMap.containsKey(aMaterialKey)) { + CORE.crash("Tried to register a Flotation material to an ID already in use. ID: "+aMaterialKey); + return false; + } + else { + sMaterialMap.put(aMaterialKey, aMaterial); + sMilledMap.put(aMaterialKey, aMaterial.getMilled(1)); + } + return true; + } + + public static int getHashForMaterial(Material aMaterial) { + return getMaterialsID(aMaterial).hashCode(); + } + + public static String getMaterialsID(Material aMaterial) { + for (String aKey : sMaterialMap.keySet()) { + if (sMaterialMap.get(aKey).equals(aMaterial)) { + return aKey; + } + } + return "BAD_MATERIAL_ID"; + } + + public static Material getMaterialOfMilledProduct(ItemStack aMilled) { + for (String aKey : sMilledMap.keySet()) { + ItemStack aTempMilledStack = sMilledMap.get(aKey); + if (GT_Utility.areStacksEqual(aTempMilledStack, aMilled, true)) { + return sMaterialMap.get(aKey); + } + } + return null; + } + + public static ItemStack findMilledStack(GT_Recipe aRecipe) { + if (aRecipe == null || aRecipe.mInputs == null || aRecipe.mInputs.length <= 0) { + return null; + } + return findMilledStack(aRecipe.mInputs); + } + + public static ItemStack findMilledStack(ItemStack[] aInputs) { + if (aInputs == null || aInputs.length <= 0) { + return null; + } + for (ItemStack aStack : aInputs) { + if (CustomOrePrefix.milled.get().contains(aStack)) { + return aStack; + } + } + return null; + } + + public static AES getEncoder() { + return sEncodingHandler; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java new file mode 100644 index 0000000000..d51107bbf0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java @@ -0,0 +1,80 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.metatileentity.BaseMetaTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; + +public class GT_MethodHelper { + + private static final Method mGetTexture; + private static final Class mITexturedTileEntity; + + static { + Class clazz = null; + Method aMeth = null; + if (ReflectionUtils.doesClassExist("gregtech.api.interfaces.tileentity.ITexturedTileEntity")) { + clazz = ReflectionUtils.getClass("gregtech.api.interfaces.tileentity.ITexturedTileEntity"); + aMeth = ReflectionUtils.getMethod(clazz, "getTexture", Block.class, byte.class); + } + mITexturedTileEntity = clazz; + mGetTexture = aMeth; + } + + + public static ITexture[] getTexture(TileEntity tTileEntity, Block aBlock, byte aSide) { + + if (mITexturedTileEntity.isInstance(tTileEntity)) { + + if (mGetTexture != null) { + try { + mGetTexture.invoke(tTileEntity, aBlock, aSide); + } + catch (IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + e.printStackTrace(); + } + } + else { + if (tTileEntity instanceof BaseMetaTileEntity) { + try { + BaseMetaTileEntity aTile = (BaseMetaTileEntity) tTileEntity; + ITexture rIcon = aTile.getCoverTexture(aSide); + Field aFacing = ReflectionUtils.getField(BaseMetaTileEntity.class, "mFacing"); + Field aColor = ReflectionUtils.getField(BaseMetaTileEntity.class, "mColor"); + Field aActive = ReflectionUtils.getField(BaseMetaTileEntity.class, "mActive"); + Field aMetaTile = ReflectionUtils.getField(BaseMetaTileEntity.class, "mMetaTileEntity"); + Method aHasValidTile = ReflectionUtils.getMethod(BaseMetaTileEntity.class, "hasValidMetaTileEntity", new Class[] {}); + + boolean hasValidTileObj = (boolean) aHasValidTile.invoke(aTile, new Object[] {}); + boolean aActiveObj = aActive.getBoolean(aTile); + byte aFacingObj = aFacing.getByte(aTile); + byte aColorObj = aColor.getByte(aTile);; + MetaTileEntity aMetaTileObj = (MetaTileEntity) aMetaTile.get(aTile); + + if (rIcon != null) { + return new ITexture[]{rIcon}; + } else { + return hasValidTileObj + ? aMetaTileObj.getTexture(aTile, aSide, aFacingObj, (byte) (aColorObj - 1), aActiveObj, + aTile.getOutputRedstoneSignal(aSide) > 0) + : BlockIcons.ERROR_RENDERING; + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + } + } + return BlockIcons.ERROR_RENDERING; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java new file mode 100644 index 0000000000..0b52560e0d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java @@ -0,0 +1,42 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import java.util.HashMap; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gregtech.api.GregTech_API; +import net.minecraft.block.Block; +import net.minecraftforge.event.world.BlockEvent; + +public class MachineUpdateHandler { + + private static final HashMap mBlockCache = new HashMap(); + + public static void registerBlockToCauseMachineUpdate(String aUnlocalName, Block aBlock) { + mBlockCache.put(aUnlocalName, aBlock); + } + + @SubscribeEvent + public void onBlockEvent(BlockEvent event) { + Block aBlock = event.block; + String aUnlocalName = aBlock != null ? aBlock.getUnlocalizedName() : "NULL"; + boolean aDoUpdate = false; + if (aBlock != null && aUnlocalName != null && !aUnlocalName.equals("NULL")) { + for (String aCachedName : mBlockCache.keySet()) { + if (aCachedName.equals(aUnlocalName)) { + aDoUpdate = true; + break; + } + else { + if (aBlock == mBlockCache.get(aCachedName)) { + aDoUpdate = true; + break; + } + } + } + if (aDoUpdate) { + GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java new file mode 100644 index 0000000000..2ff2712952 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java @@ -0,0 +1,1033 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableTreeFarmerParticles; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +import com.google.common.collect.Lists; + +import gnu.trove.set.hash.THashSet; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; + +import gregtech.api.enums.*; +import net.minecraft.block.Block; +import net.minecraft.block.BlockAir; +import net.minecraft.block.IGrowable; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.network.play.server.S23PacketBlockChange; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.World; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.GT_MetaGenerated_Item_02; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.players.FakeFarmer; +import gtPlusPlus.core.slots.SlotBuzzSaw.SAWTOOL; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.particles.BlockBreakParticles; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems; +import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.BonemealEvent; +import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class TreeFarmHelper { + + public static final FluidStack fertT1 = FluidUtils.getFluidStack("fluid.fertiliser", 3); + public static final FluidStack fertT2 = FluidUtils.getFluidStack("fluid.un18fertiliser", 2); + public static final FluidStack fertT3 = FluidUtils.getFluidStack("fluid.un32fertiliser", 1); + private static final int sawOreId = OreDictionary.getOreID(ToolDictNames.craftingToolSaw.name()); + + public static ITexture[][][] getTextureSet() { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = TreeFarmHelper.getFront(i); + rTextures[1][i + 1] = TreeFarmHelper.getBack(i); + rTextures[2][i + 1] = TreeFarmHelper.getBottom(i); + rTextures[3][i + 1] = TreeFarmHelper.getTop(i); + rTextures[4][i + 1] = TreeFarmHelper.getSides(i); + rTextures[5][i + 1] = TreeFarmHelper.getFrontActive(i); + rTextures[6][i + 1] = TreeFarmHelper.getBackActive(i); + rTextures[7][i + 1] = TreeFarmHelper.getBottomActive(i); + rTextures[8][i + 1] = TreeFarmHelper.getTopActive(i); + rTextures[9][i + 1] = TreeFarmHelper.getSidesActive(i); + } + return rTextures; + } + + public static ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; + } + + public static ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; + } + + public static ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; + } + + public static ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; + } + + public static ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]}; + } + + public static ITexture[] getFrontActive(final byte aColor) { + return getFront(aColor); + } + + public static ITexture[] getBackActive(final byte aColor) { + return getBack(aColor); + } + + public static ITexture[] getBottomActive(final byte aColor) { + return getBottom(aColor); + } + + public static ITexture[] getTopActive(final byte aColor) { + return getTop(aColor); + } + + public static ITexture[] getSidesActive(final byte aColor) { + return getSides(aColor); + } + + public static boolean applyBonemeal(final EntityPlayer player, final World world, final int intX, final int intY, final int intZ, final short multiplier){ + final Block block = world.getBlock(intX, intY, intZ); + + + int roll; + int rollNeeded; + + if (multiplier==1){ + roll = MathUtils.randInt(1, 15); + rollNeeded = 15; + } + else if (multiplier==2){ + roll = MathUtils.randInt(1, 10); + rollNeeded = 10; + } + else { + roll = MathUtils.randInt(1, 5); + rollNeeded = 5; + } + + if (roll != rollNeeded){ + return false; + } + + //EntityPlayer player = FakePlayerFactory.getMinecraft((WorldServer)world); + if (!world.isRemote){ + if (enableTreeFarmerParticles){ + world.playAuxSFX(2005, intX, intY, intZ, 0); + } + } + final BonemealEvent event = new BonemealEvent(player, world, block, intX, intY, intZ); + if (MinecraftForge.EVENT_BUS.post(event)){ + Logger.MACHINE_INFO("Not sure why this returned false"); + return false; + } + if (event.getResult() == Result.ALLOW){ + if (!world.isRemote){ + world.playAuxSFX(2005, intX, intY, intZ, 0); + } + return true; + } + if (block instanceof IGrowable){ + final IGrowable igrowable = (IGrowable)block; + if (igrowable.func_149851_a(world, intX, intY, intZ, world.isRemote)){ + if (!world.isRemote){ + if (igrowable.func_149852_a(world, CORE.RANDOM, intX, intY, intZ)){ + igrowable.func_149853_b(world, CORE.RANDOM, intX, intY, intZ); + } + } + return true; + } + } + return false; + } + + public static boolean cleanUp(final IGregTechTileEntity aBaseMetaTileEntity){ + Logger.MACHINE_INFO("called cleanUp()"); + int cleanedUp = 0; + final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11; + final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 11; + + for (int h=1;h<175;h++){ + for (int i = -11; i <= 11; i++) { + for (int j = -11; j <= 11; j++) { + + final Block testBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + + + if + (( + ((i == -8) || (i == 8)) || + ((i == -9) || (i == 9)) || + ((i == -10) || (i == 10)) || + ((i == -11) || (i == 11)) + ) + && + ( + ((j == -8) || (j == 8)) || + ((j == -9) || (j == 9)) || + ((j == -10) || (j == 10)) || + ((j == -11) || (j == 11)) + )){ + + if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) { + //Logger.WARNING("5:"+testBlock.getUnlocalizedName()); + } else { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.bookshelf); + } + } + + + //If not in the middle - don't know how else to check this one without lots of != + if ( + (i != 7) && (i != -7) && (j != 7) && (j != -7) && + (i != 6) && (i != -6) && (j != 6) && (j != -6) && + (i != 5) && (i != -5) && (j != 5) && (j != -5) && + (i != 4) && (i != -4) && (j != 4) && (j != -4) && + (i != 3) && (i != -3) && (j != 3) && (j != -3) && + (i != 2) && (i != -2) && (j != 2) && (j != -2) && + (i != 1) && (i != -1) && (j != 1) && (j != -1) && + (i != 0) && (j != 0) + ){ + + if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) { + //Logger.WARNING("0:"+testBlock.getUnlocalizedName()); + } else { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.melon_block); + } + + + if (isLeaves(testBlock) || isWoodLog(testBlock)){ + //Logger.WARNING("1:"+testBlock.getUnlocalizedName()); + int posiX, posiY, posiZ; + posiX = aBaseMetaTileEntity.getXCoord()+xDir+i; + posiY = aBaseMetaTileEntity.getYCoord()+h; + posiZ = aBaseMetaTileEntity.getZCoord()+zDir+j; + //Utils.LOG_MACHINE_INFO("Cleaning Up some leftovers."); + cleanedUp++; + aBaseMetaTileEntity.getWorld().setBlockToAir(posiX, posiY, posiZ); + new BlockBreakParticles(aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, Blocks.dirt); + } + else { + //Utils.LOG_WARNING("2:"+testBlock.getUnlocalizedName()); + } + } + else { + //Utils.LOG_WARNING("1"); + } + + + } + + } + } + Logger.MACHINE_INFO("cleaning up | "+cleanedUp ); + return true; + } + + public static SAWTOOL isCorrectMachinePart(final ItemStack aStack) { + if (aStack != null){ + //Utils.LOG_WARNING("Found "+aStack.getDisplayName()+" in the GUI slot."); + if ((aStack.getItem() instanceof GT_MetaGenerated_Item_02) || (aStack.getItem() instanceof GT_MetaGenerated_Tool)){ + if (OrePrefixes.craftingTool.contains(aStack)){ + if (aStack.getDisplayName().toLowerCase().contains("saw") || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01")){ + if (aStack.getItemDamage() == 10){ + return SAWTOOL.SAW; + } + else if (aStack.getItemDamage() == 140 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")){ + return SAWTOOL.BUZZSAW; + } + else if (aStack.getItemDamage() == 110 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.110")){ + return SAWTOOL.CHAINSAW; + } + else if (aStack.getItemDamage() == 112 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.112")){ + return SAWTOOL.CHAINSAW; + } + else if (aStack.getItemDamage() == 114 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.114")){ + return SAWTOOL.CHAINSAW; + } + else { + return SAWTOOL.NONE; + } + } + } + } + } + return SAWTOOL.NONE; + } + + public static ToolType getPartType(final ItemStack aStack) { + if (aStack != null){ + //Utils.LOG_WARNING("Found "+aStack.getDisplayName()+" in the GUI slot."); + + if (aStack.getItem() == MetaGeneratedGregtechItems.INSTANCE) { + int aDmg = aStack.getItemDamage(); + if (aDmg >= 32120 && aDmg <= 32128) { + return ToolType.Unbreakable; + } + Logger.INFO("bad Tool in Slot 2 | "+aStack.getUnlocalizedName().toLowerCase() + " | "+aDmg); + return null; + } + + if (aStack.getItem() instanceof GT_MetaGenerated_Tool) { + if (Arrays.stream(OreDictionary.getOreIDs(aStack)).anyMatch(i -> i == sawOreId)) + return ToolType.Breakable; + } + } + Logger.INFO("bad Tool in Slot 4"); + return null; + } + + public static boolean isHumusLoaded = false; + public static boolean isForestryLogsLoaded = false; + public static boolean isForestryFenceLoaded = false; + public static boolean isForestrySaplingsLoaded = false; + public static boolean isForestryLeavesLoaded = false; + public static Block blockHumus; + + public static boolean isForestryValid(){ + if (!LoadedMods.Forestry){ + return false; + } + if (ReflectionUtils.doesClassExist("forestry.core.blocks.BlockSoil")){ + isHumusLoaded = true; + } + if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockLog")){ + isForestryLogsLoaded = true; + } + if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockArbFence")){ + isForestryFenceLoaded = true; + } + if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockSapling")){ + isForestrySaplingsLoaded = true; + } + if (ReflectionUtils.doesClassExist("forestry.arboriculture.blocks.BlockForestryLeaves")){ + isForestryLeavesLoaded = true; + } + return true; + } + + @Optional.Method(modid = "Forestry") + public static Block getHumus(){ + if(blockHumus != null){ + return blockHumus; + } + else if (isHumusLoaded){ + final Class humusClass = ReflectionUtils.getClass("forestry.core.blocks.BlockSoil"); + final ItemStack humusStack = ItemUtils.getCorrectStacktype("Forestry:soil", 1); + if (humusClass != null){ + blockHumus = Block.getBlockFromItem(humusStack.getItem()); + return Block.getBlockFromItem(humusStack.getItem()); + } + } + return null; + } + + public static boolean isWoodLog(final Block log){ + final String tTool = log.getHarvestTool(0); + + if ((log == Blocks.log) || (log == Blocks.log2)){ + return true; + } + + //Forestry/General Compat + if (log.getClass().getName().toLowerCase().contains("blocklog")){ + return true; + } + + //IC2 Rubber Tree Compat + if (log.getClass().getName().toLowerCase().contains("rubwood") || log.getClass().getName().toLowerCase().contains("rubleaves")){ + return true; + } + + return (OrePrefixes.log.contains(new ItemStack(log, 1))&& ((tTool != null) && (tTool.equals("axe")))) || (log.getMaterial() != Material.wood) ? false : (OrePrefixes.fence.contains(new ItemStack(log, 1)) ? false : true); + } + + public static boolean isLeaves(final Block log){ + if (log.getUnlocalizedName().toLowerCase().contains("leaf")){ + return true; + } + if (log.getUnlocalizedName().toLowerCase().contains("leaves")){ + return true; + } + if (log.getLocalizedName().toLowerCase().contains("leaf")){ + return true; + } + if (log.getLocalizedName().toLowerCase().contains("leaves")){ + return true; + } + return OrePrefixes.leaves.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.leaves || OrePrefixes.treeLeaves.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.vine || OrePrefixes.mushroom.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.cactus; + } + + public static boolean isSapling(final Block log){ + if (log != null){ + if (OrePrefixes.sapling.contains(new ItemStack(log, 1))){ + //Logger.WARNING(""+log.getLocalizedName()); + } + if (log.getLocalizedName().toLowerCase().contains("sapling")){ + //Logger.WARNING(""+log.getLocalizedName()); + return true; + } + } + return OrePrefixes.sapling.contains(new ItemStack(log, 1)); + } + + public static boolean isDirtBlock(final Block dirt){ + return (dirt == Blocks.dirt ? true : (dirt == Blocks.grass ? true : (getHumus() == null ? false : (dirt == blockHumus ? true : false)))); + } + + public static boolean isFenceBlock(final Block fence){ + return (fence == Blocks.fence ? true : (fence == Blocks.fence_gate ? true : (fence == Blocks.nether_brick_fence ? true : (OrePrefixes.fence.contains(new ItemStack(fence, 1)) ? true : false)))); + } + + public static boolean isAirBlock(final Block air){ + if (air.getLocalizedName().toLowerCase().contains("air")){ + return true; + } + if (air.getClass().getName().toLowerCase().contains("residual") || air.getClass().getName().toLowerCase().contains("heat")){ + return true; + } + return (air == Blocks.air ? true : (air instanceof BlockAir ? true : false)); + } + + /*public static boolean isSaplingBlock(Block sapling){ + return (sapling == Blocks.sapling ? true : (sapling == Blocks.)) + }*/ + + public static BlockPos checkForLogsInGrowArea(final IGregTechTileEntity aBaseMetaTileEntity) { + final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7; + final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7; + for (int i = -7; i <= 7; i++) { + for (int j = -7; j <= 7; j++) { + for (int h = 0; h <= 1; h++) { + //Farm Floor inner 14x14 + if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) { + if (h == 1) { + if (TreeFarmHelper.isWoodLog(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) { + Logger.INFO("Found a Log"); + return new BlockPos(aBaseMetaTileEntity.getXCoord()+xDir + i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir + j, aBaseMetaTileEntity.getWorld()); + } + } + } + } + } + } + return null; + } + + public static ItemStack[] findTreeFromBase(World world, BlockPos h) { + int HARD_LIMIT = 10000; + int mCount = 0; + Logger.INFO("Finding Rest of Tree."); + BlockPos mFirstSpot = h; + Set mSearchedSpaces = new HashSet(); + Set mTreeSet = getConnectedBlocks(world, mFirstSpot, mSearchedSpaces); + Set> mTreeSet2 = new HashSet>(); + Set mFinalTree = new HashSet(); + Iterator it = mTreeSet.iterator(); + + + Logger.INFO("Running first iteration."); + while(it.hasNext()){ + BlockPos G = it.next(); + mSearchedSpaces.add(G); + mTreeSet2.add(getConnectedBlocks(world, G, mSearchedSpaces)); + mCount++; + Logger.INFO("First Search: "+G.getLocationString()); + if (mCount > HARD_LIMIT) { + break; + } + } + + mCount = 0; + Iterator> it2 = mTreeSet2.iterator(); + Iterator it3; + Logger.INFO("Running second iteration."); + while(it2.hasNext()){ + Set G = it2.next(); + it3 = G.iterator(); + while(it3.hasNext()){ + BlockPos G2 = it3.next(); + mSearchedSpaces.add(G2); + mFinalTree.add(G2); + mCount++; + Logger.INFO("Second Search: "+G2.getLocationString()); + if (mCount > HARD_LIMIT) { + break; + } + } + if (mCount > HARD_LIMIT) { + break; + } + } + + + if (mFinalTree.size() > 0) { + Logger.INFO("Queuing "+mFinalTree.size()+" to Harvest Manager."); + TreeCutter harvestManager = new TreeCutter(world); + + Iterator ith = mFinalTree.iterator(); + while(ith.hasNext()){ + BlockPos G = ith.next(); + harvestManager.queue(G); + mCount++; + Logger.INFO("Queued: "+G.getLocationString()); + if (mCount > HARD_LIMIT) { + break; + } + } + + if (harvestManager.isValid) { + ItemStack[] loot = harvestManager.getDrops(); + if (loot.length > 0) { + //Logger.INFO("Returning Drops from harvestManager Queue."); + return loot; + } + } + } + return new ItemStack[] {}; + } + + + public static Set getConnectedBlocks(World W, BlockPos P, Set checkedSpaces) { + int HARD_LIMIT = 1000; + int mCount = 0; + Logger.INFO("Finding blocks connected to "+P.getLocationString()+"."); + Set mCheckedSpaces = checkedSpaces; + Set mStartSearch = searchSixFaces(W, P, mCheckedSpaces, false); + Set mSecondSearch = new HashSet(); + Set mThirdSearch = new HashSet(); + Iterator it = mStartSearch.iterator(); + while(it.hasNext()){ + Logger.INFO("Running first iteration. [II]"); + BlockPos G = it.next(); + mCheckedSpaces.add(G); + Set mBranchSearch = searchSixFaces(W, G, mCheckedSpaces, true); + Iterator it2 = mBranchSearch.iterator(); + while(it2.hasNext()){ + Logger.INFO("Running second iteration. [II]"); + BlockPos G2 = it2.next(); + mCheckedSpaces.add(G2); + mSecondSearch.add(G2); + mCount++; + if (mCount > HARD_LIMIT) { + break; + } + } + if (mCount > HARD_LIMIT) { + break; + } + } + mCount = 0; + Iterator itx = mSecondSearch.iterator(); + while(itx.hasNext()){ + BlockPos G = itx.next(); + mCheckedSpaces.add(G); + Set mBranchSearch = searchSixFaces(W, G, mCheckedSpaces, true); + Iterator it2 = mBranchSearch.iterator(); + while(it2.hasNext()){ + BlockPos G2 = it2.next(); + mCheckedSpaces.add(G2); + mThirdSearch.add(G2); + mCount++; + if (mCount > HARD_LIMIT) { + break; + } + } + if (mCount > HARD_LIMIT) { + break; + } + } + return mThirdSearch; + } + + public static Set searchSixFaces(World W, BlockPos P, Set checkedSpaces, boolean checkLeaves) { + Set mConnected = new HashSet(); + int x = P.xPos; + int y = P.yPos; + int z = P.zPos; + if (checkLeaves) { + if (isWoodLog(W.getBlock(x-1, y, z)) || isLeaves(W.getBlock(x-1, y, z))) { + BlockPos L = new BlockPos(x-1, y, z, W); + if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + } + } + if (isWoodLog(W.getBlock(x+1, y, z)) || isLeaves(W.getBlock(x+1, y, z))) { + BlockPos L = new BlockPos(x+1, y, z, W); + if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + } + } + if (isWoodLog(W.getBlock(x, y-1, z)) || isLeaves(W.getBlock(x, y-1, z))) { + BlockPos L = new BlockPos(x, y-1, z, W); + if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + } + } + if (isWoodLog(W.getBlock(x, y+1, z)) || isLeaves(W.getBlock(x, y+1, z))) { + BlockPos L = new BlockPos(x, y+1, z, W); + if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + } + } + if (isWoodLog(W.getBlock(x, y, z-1)) || isLeaves(W.getBlock(x, y, z-1))) { + BlockPos L = new BlockPos(x, y, z-1, W); + if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + } + } + if (isWoodLog(W.getBlock(x, y, z+1)) || isLeaves(W.getBlock(x, y, z+1))) { + BlockPos L = new BlockPos(x, y, z+1, W); + if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + } + } + } + else { + if (isWoodLog(W.getBlock(x-1, y, z))) { + BlockPos L = new BlockPos(x-1, y, z, W); + //if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + //} + } + if (isWoodLog(W.getBlock(x+1, y, z))) { + BlockPos L = new BlockPos(x+1, y, z, W); + //if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + //} + } + if (isWoodLog(W.getBlock(x, y-1, z))) { + BlockPos L = new BlockPos(x, y-1, z, W); + //if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + //} + } + if (isWoodLog(W.getBlock(x, y+1, z))) { + BlockPos L = new BlockPos(x, y+1, z, W); + //if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + //} + } + if (isWoodLog(W.getBlock(x, y, z-1))) { + BlockPos L = new BlockPos(x, y, z-1, W); + //if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + //} + } + if (isWoodLog(W.getBlock(x, y, z+1))) { + BlockPos L = new BlockPos(x, y, z+1, W); + //if (!checkedSpaces.contains(L)) { + mConnected.add(L); + Logger.INFO("Found Connected. [III]"); + //} + } + } + return mConnected; + } + + + public enum ToolType { + Unbreakable, + Breakable + } + + + /** + * Tree Cutting + */ + + public static class TreeCutter { + + private final World mWorld; + private Map mQueue = new ConcurrentHashMap(); + private AutoMap mDrops = new AutoMap(); + private boolean isValid = true; + + public TreeCutter(World world) { + this.mWorld = world; + } + + public boolean queue(BlockPos pos) { + if (isValid && pos != null) { + //Logger.INFO("Queued: "+pos.getLocationString()); + String hash = Utils.calculateChecksumMD5(pos); + if (hash != null && !mQueue.containsKey(hash)) { + mQueue.put(hash, pos); + return true; + } + } + return false; + } + + private boolean emptyQueue() { + if (isValid) { + Logger.INFO("Emptying Queue."); + if (this.mQueue.size() > 0) { + int totalRemoved = 0; + for (BlockPos h : mQueue.values()) { + final Block block = mWorld.getBlock(h.xPos, h.yPos, h.zPos); + if (block != null) { + final int dropMeta = mWorld.getBlockMetadata(h.xPos, h.yPos, h.zPos); + final ArrayList blockDrops = block.getDrops(mWorld, h.xPos, h.yPos, h.zPos, dropMeta, 0); + final ItemStack[] drops = ItemUtils.getBlockDrops(blockDrops); + mDrops.put(drops); + //Remove drop that was added to the bus. + mWorld.setBlockToAir(h.xPos, h.yPos, h.zPos); + //new BlockBreakParticles(mWorld, h.xPos, h.yPos, h.zPos, block); + totalRemoved++; + } + } + if (totalRemoved > 0 && mDrops.size() > 0) { + return true; + } + } + } + return false; + } + + public ItemStack[] getDrops() { + //If Queue is successfully cleared and drops are created, let us continue. + if (isValid && emptyQueue()) { + AutoMap mCollective = new AutoMap(); + //Iterate ALL of the arrays, add output to a collective. + for (ItemStack[] i : this.mDrops) { + //Array is not null. + if (i != null) { + //Iterate this array. + for (int d=0;d 0) { + mCollective.put(i[d]); + } + } + } + } + //Build an ItemStack array. + ItemStack[] drops = new ItemStack[mCollective.size()]; + for (int m=0;m 0) { + isValid = false; + return drops; + } + } + //Invalid or no drops, return empty array. + isValid = false; + return new ItemStack[] {}; + } + + } + + + /** + * Farm AI + */ + private static EntityPlayerMP farmerAI; + public EntityPlayerMP getFakePlayer(World world) { + return farmerAI = checkFakePlayer(world); + } + + public static EntityPlayerMP checkFakePlayer(World world) { + if (farmerAI == null) { + return new FakeFarmer(MinecraftServer.getServer().worldServerForDimension(world.provider.dimensionId)); + } + return farmerAI; + } + + public static boolean onBlockStartBreak (int x, int y, int z, World world){ + final Block wood = world.getBlock(x, y, z); + if (wood == null){ + return false; + } + if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge) + if(detectTree(world, x,y,z)) { + TreeChopTask chopper = new TreeChopTask(new ChunkPosition(x, y, z), checkFakePlayer(world), 128); + FMLCommonHandler.instance().bus().register(chopper); + // custom block breaking code, don't call vanilla code + return true; + } + //return onBlockStartBreak(stack, x, y, z, player); + return false; + } + + public static boolean detectTree(World world, int pX, int pY, int pZ) { + ChunkPosition pos = null; + Stack candidates = new Stack<>(); + candidates.add(new ChunkPosition(pX, pY, pZ)); + + while (!candidates.isEmpty()) { + ChunkPosition candidate = candidates.pop(); + int curX = candidate.chunkPosX, curY = candidate.chunkPosY, curZ = candidate.chunkPosZ; + + Block block = world.getBlock(curX, curY, curZ); + if ((pos == null || candidate.chunkPosY > pos.chunkPosY) && block.isWood(world, curX, curY, curZ)) { + pos = new ChunkPosition(curX, candidate.chunkPosY + 1, curZ); + // go up + while (world.getBlock(curX, pos.chunkPosY, curZ).isWood(world, curX, pos.chunkPosY, curZ)) { + pos = new ChunkPosition(curX, pos.chunkPosY + 1, curZ); + } + // check if we still have a way diagonally up + candidates.add(new ChunkPosition(curX + 1, pos.chunkPosY + 1, curZ )); + candidates.add(new ChunkPosition(curX , pos.chunkPosY + 1, curZ + 1)); + candidates.add(new ChunkPosition(curX - 1, pos.chunkPosY + 1, curZ )); + candidates.add(new ChunkPosition(curX , pos.chunkPosY + 1, curZ - 1)); + } + } + + // not even one match, so there were no logs. + if (pos == null) { + return false; + } + + // check if there were enough leaves around the last position + // pos now contains the block above the topmost log + // we want at least 5 leaves in the surrounding 26 blocks + int d = 3; + int leaves = 0; + for (int offX = 0; offX < d; offX++) { + for (int offY = 0; offY < d; offY++) { + for (int offZ = 0; offZ < d; offZ++) { + int xPos = pos.chunkPosX -1 + offX, yPos = pos.chunkPosY - 1 + offY, zPos = pos.chunkPosZ - 1 + offZ; + Block leaf = world.getBlock(xPos, yPos, zPos); + if (leaf != null && leaf.isLeaves(world, xPos, yPos, zPos)) { + if (++leaves >= 5) { + return true; + } + } + } + } + } + + // not enough leaves. sorreh + return false; + } + + public static class TreeChopTask { + + public final World world; + public final EntityPlayer player; + public final int blocksPerTick; + + public Queue blocks = Lists.newLinkedList(); + public Set visited = new THashSet<>(); + + public TreeChopTask(ChunkPosition start, EntityPlayer player, int blocksPerTick) { + this.world = player.getEntityWorld(); + this.player = player; + this.blocksPerTick = blocksPerTick; + + this.blocks.add(start); + } + + private void queueCoordinate(int x, int y, int z) { + ChunkPosition pos = new ChunkPosition(x, y, z); + if (!visited.contains(pos)) { + blocks.add(pos); + } + } + + @SubscribeEvent + public void onWorldTick(TickEvent.WorldTickEvent event) { + if (event.side.isClient()) { + finish(); + return; + } + // only if same dimension + if (event.world.provider.dimensionId != world.provider.dimensionId) { + return; + } + + // setup + int left = blocksPerTick; + //NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + + // continue running + ChunkPosition pos; + while (left > 0) { + // completely done or can't do our job anymore?! + if (blocks.isEmpty()/* || tags.getBoolean("Broken")*/) { + finish(); + return; + } + + pos = blocks.remove(); + if (!visited.add(pos)) { + continue; + } + int x = pos.chunkPosX, y = pos.chunkPosY, z = pos.chunkPosZ; + + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + + // can we harvest the block and is effective? + if (!block.isWood(world, x, y, z) || !isWoodLog(block)) { + continue; + } + + // save its neighbors + queueCoordinate(x + 1, y, z ); + queueCoordinate(x, y, z + 1); + queueCoordinate(x - 1, y, z ); + queueCoordinate(x, y, z - 1); + + // also add the layer above.. stupid acacia trees + for (int offX = 0; offX < 3; offX++) { + for (int offZ = 0; offZ < 3; offZ++) { + queueCoordinate(x - 1 + offX, y + 1, z - 1 + offZ); + } + } + + // break it, wooo! + breakExtraBlock(player.worldObj, x, y, z, 0, player, x, y, z); + left--; + } + } + + private void finish() { + // goodbye cruel world + FMLCommonHandler.instance().bus().unregister(this); + } + } + + + public static void breakExtraBlock(World world, int x, int y, int z, int sidehit, EntityPlayer playerEntity, int refX, int refY, int refZ) { + // prevent calling that stuff for air blocks, could lead to unexpected behaviour since it fires events + if (world.isAirBlock(x, y, z)) + return; + + // what? + if(!(playerEntity instanceof EntityPlayerMP)) + return; + EntityPlayerMP player = (EntityPlayerMP) playerEntity; + + // check if the block can be broken, since extra block breaks shouldn't instantly break stuff like obsidian + // or precious ores you can't harvest while mining stone + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + + // only effective materials + if (!isWoodLog(block)) + return; + + Block refBlock = world.getBlock(refX, refY, refZ); + float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ); + float strength = ForgeHooks.blockStrength(block, player, world, x,y,z); + + // only harvestable blocks that aren't impossibly slow to harvest + if (!ForgeHooks.canHarvestBlock(block, player, meta) || refStrength/strength > 10f) + return; + + // send the blockbreak event + BlockEvent.BreakEvent event = ForgeHooks.onBlockBreakEvent(world, player.theItemInWorldManager.getGameType(), player, x,y,z); + if(event.isCanceled()) + return; + + if (player.capabilities.isCreativeMode) { + block.onBlockHarvested(world, x, y, z, meta, player); + if (block.removedByPlayer(world, player, x, y, z, false)) + block.onBlockDestroyedByPlayer(world, x, y, z, meta); + + // send update to client + if (!world.isRemote) { + player.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world)); + } + return; + } + + // callback to the tool the player uses. Called on both sides. This damages the tool n stuff. + player.getCurrentEquippedItem().func_150999_a(world, block, x, y, z, player); + + // server sided handling + if (!world.isRemote) { + // serverside we reproduce ItemInWorldManager.tryHarvestBlock + + // ItemInWorldManager.removeBlock + block.onBlockHarvested(world, x,y,z, meta, player); + + if(block.removedByPlayer(world, player, x,y,z, true)) // boolean is if block can be harvested, checked above + { + block.onBlockDestroyedByPlayer( world, x,y,z, meta); + block.harvestBlock(world, player, x,y,z, meta); + block.dropXpOnBlockBreak(world, x,y,z, event.getExpToDrop()); + } + + // always send block update to client + player.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world)); + } + // client sided handling + else { + //PlayerControllerMP pcmp = Minecraft.getMinecraft().playerController; + // clientside we do a "this clock has been clicked on long enough to be broken" call. This should not send any new packets + // the code above, executed on the server, sends a block-updates that give us the correct state of the block we destroy. + + // following code can be found in PlayerControllerMP.onPlayerDestroyBlock + world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); + if(block.removedByPlayer(world, player, x,y,z, true)) + { + block.onBlockDestroyedByPlayer(world, x,y,z, meta); + } + // callback to the tool + ItemStack itemstack = player.getCurrentEquippedItem(); + if (itemstack != null) + { + itemstack.func_150999_a(world, block, x, y, z, player); + + if (itemstack.stackSize == 0) + { + player.destroyCurrentEquippedItem(); + } + } + + // send an update to the server, so we get an update back + //if(PHConstruct.extraBlockUpdates) + //Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(2, x,y,z, Minecraft.getMinecraft().objectMouseOver.sideHit)); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java new file mode 100644 index 0000000000..575e094696 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java @@ -0,0 +1,188 @@ +package gtPlusPlus.xmod.gregtech.common.helpers; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class VolumetricFlaskHelper { + + private static final Class sClassVolumetricFlask; + private static final Method sMethodGetFlaskMaxCapacity; + private static Item mFlask; + + static { + if (Meta_GT_Proxy.sDoesVolumetricFlaskExist) { + sClassVolumetricFlask = ReflectionUtils.getClass("gregtech.common.items.GT_VolumetricFlask"); + Method aMaxCapacity = null; + try { + aMaxCapacity = sClassVolumetricFlask.getDeclaredMethod("getMaxCapacity", new Class[] {}); + } + catch (NoSuchMethodException e) { + e.printStackTrace(); + CORE.crash("Secondary Error Obtaining instance of 'getMaxCapacity' from 'GT_VolumetricFlask'. Crashing."); + } + sMethodGetFlaskMaxCapacity = aMaxCapacity; + } + else { + sClassVolumetricFlask = null; + sMethodGetFlaskMaxCapacity = null; + } + } + + public static ItemStack getVolumetricFlask(int aAmount) { + ItemStack aFlask = ItemUtils.getValueOfItemList("VOLUMETRIC_FLASK", aAmount, (ItemStack) null); + return aFlask; + } + + public static ItemStack getLargeVolumetricFlask(int aAmount) { + ItemStack aFlask = GregtechItemList.VOLUMETRIC_FLASK_8k.get(aAmount); + return aFlask; + } + + public static ItemStack getGiganticVolumetricFlask(int aAmount) { + ItemStack aFlask = GregtechItemList.VOLUMETRIC_FLASK_32k.get(aAmount); + return aFlask; + } + + public static boolean isVolumetricFlask(ItemStack aStack) { + if (isNormalVolumetricFlask(aStack) || isLargeVolumetricFlask(aStack) || isGiganticVolumetricFlask(aStack)) { + return true; + } + return false; + } + + public static boolean isNormalVolumetricFlask(ItemStack aStack) { + if (mFlask == null) { + ItemStack aFlask = ItemUtils.getValueOfItemList("VOLUMETRIC_FLASK", 1, (ItemStack) null); + if (aFlask != null) { + mFlask = aFlask.getItem(); + } + } + if (aStack.getItem() == mFlask) { + return true; + } + return false; + } + + public static boolean isLargeVolumetricFlask(ItemStack aStack) { + if (GregtechItemList.VOLUMETRIC_FLASK_8k.getItem() == aStack.getItem()) { + return true; + } + return false; + } + + public static boolean isGiganticVolumetricFlask(ItemStack aStack) { + if (GregtechItemList.VOLUMETRIC_FLASK_32k.getItem() == aStack.getItem()) { + return true; + } + return false; + } + + public static int getMaxFlaskCapacity(ItemStack aStack) { + if (aStack != null && sMethodGetFlaskMaxCapacity != null) { + Item aItem = aStack.getItem(); + if (sClassVolumetricFlask.isInstance(aItem)) { + int aMaxCapacity = (int) ReflectionUtils.invokeNonBool(aItem, sMethodGetFlaskMaxCapacity, new Object[] {}); + return aMaxCapacity; + } + } + return 0; + } + + public static boolean isFlaskEmpty(ItemStack aStack) { + return getFlaskFluid(aStack) == null; + } + + public static FluidStack getFlaskFluid(ItemStack aStack) { + if (aStack.hasTagCompound()) { + NBTTagCompound nbt = aStack.getTagCompound(); + if (nbt.hasKey("Fluid", 10)) + return FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("Fluid")); + } + return null; + } + + public static void setFluid(ItemStack stack, FluidStack fluidStack) { + boolean removeFluid = (fluidStack == null) || (fluidStack.amount <= 0); + NBTTagCompound nbt = stack.getTagCompound(); + if (nbt == null) { + if (removeFluid) + return; + stack.setTagCompound(nbt = new NBTTagCompound()); + } + if (removeFluid) { + nbt.removeTag("Fluid"); + if (nbt.hasNoTags()) { + stack.setTagCompound(null); + } + } else { + nbt.setTag("Fluid", fluidStack.writeToNBT(new NBTTagCompound())); + } + } + + public static int getFlaskCapacity(ItemStack aStack) { + int capacity = 1000; + if (aStack.hasTagCompound()) { + NBTTagCompound nbt = aStack.getTagCompound(); + if (nbt.hasKey("Capacity", 3)) + capacity = nbt.getInteger("Capacity"); + } + return Math.min(getMaxFlaskCapacity(aStack), capacity); + } + + public static boolean setNewFlaskCapacity(ItemStack aStack, int aCapacity) { + if (aStack == null || aCapacity <= 0) { + return false; + } + aCapacity = Math.min(aCapacity, getMaxFlaskCapacity(aStack)); + NBTTagCompound nbt = aStack.getTagCompound(); + if (nbt == null) { + aStack.setTagCompound(nbt = new NBTTagCompound()); + } + nbt.setInteger("Capacity", aCapacity); + return true; + } + + public static int fillFlask(ItemStack stack, FluidStack resource, boolean doFill) { + if (stack.stackSize != 1) + return 0; + if ((resource == null) || (resource.amount <= 0)) { + return 0; + } + FluidStack fluidStack = getFlaskFluid(stack); + if (fluidStack == null) { + fluidStack = new FluidStack(resource, 0); + } else if (!fluidStack.isFluidEqual(resource)) { + return 0; + } + int amount = Math.min(getMaxFlaskCapacity(stack) - fluidStack.amount, resource.amount); + if ((doFill) && (amount > 0)) { + fluidStack.amount += amount; + setFluid(stack, fluidStack); + } + return amount; + } + + public static Item generateNewFlask(String unlocalized, String english, int maxCapacity) { + Constructor aFlask = ReflectionUtils.getConstructor(sClassVolumetricFlask, new Class[] {String.class, String.class, int.class}); + if (aFlask != null) { + Object aInstance = ReflectionUtils.createNewInstanceFromConstructor(aFlask, new Object[] {unlocalized, english, maxCapacity}); + if (aInstance != null && aInstance instanceof Item) { + Item aNewFlaskItem = (Item) aInstance; + return aNewFlaskItem; + } + } + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java new file mode 100644 index 0000000000..29dabaf084 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java @@ -0,0 +1,118 @@ +package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.*; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; +import net.minecraft.world.World; + +import gtPlusPlus.api.objects.Logger; + +public class AC_Helper_Container extends Container +{ + /** The crafting matrix inventory (3x3). */ + public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); + public IInventory craftResult = new InventoryCraftResult(); + private World worldObj; + + public InventoryCrafting getMatrix(){ + return this.craftMatrix; + } + + public boolean putItemsIntoGrid(ItemStack[] inputs){ + if (inputs.length < 9){ + return false; + } + for (int i=0;i<9;i++){ + this.putStackInSlot(i, inputs[i]); + } + this.onCraftMatrixChanged(this.craftMatrix); + return true; + } + + public AC_Helper_Container(InventoryPlayer playerInventory, World world, int x, int y, int z) + { + this.worldObj = world; + this.addSlotToContainer(new SlotCrafting(playerInventory.player, this.craftMatrix, this.craftResult, 0, 124, 35)); + int l; + int i1; + + for (l = 0; l < 3; ++l) + { + for (i1 = 0; i1 < 3; ++i1) + { + this.addSlotToContainer(new Slot(this.craftMatrix, i1 + l * 3, 30 + i1 * 18, 17 + l * 18)); + } + } + + for (l = 0; l < 3; ++l) + { + for (i1 = 0; i1 < 9; ++i1) + { + this.addSlotToContainer(new Slot(playerInventory, i1 + l * 9 + 9, 8 + i1 * 18, 84 + l * 18)); + } + } + + for (l = 0; l < 9; ++l) + { + this.addSlotToContainer(new Slot(playerInventory, l, 8 + l * 18, 142)); + } + + this.onCraftMatrixChanged(this.craftMatrix); + } + + /** + * Callback for when the crafting matrix is changed. + */ + @Override + public void onCraftMatrixChanged(IInventory p_75130_1_) + { + this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); + Logger.INFO("Crafted "+this.craftResult.getStackInSlot(0)); + + } + + /** + * Called when the container is closed. + */ + @Override + public void onContainerClosed(EntityPlayer p_75134_1_) + { + super.onContainerClosed(p_75134_1_); + + if (!this.worldObj.isRemote) + { + for (int i = 0; i < 9; ++i) + { + ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); + + if (itemstack != null) + { + p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); + } + } + } + } + + @Override + public boolean canInteractWith(EntityPlayer p_75145_1_) + { + return true; + } + + /** + * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + */ + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_){ + ItemStack itemstack = null; + return itemstack; + } + + @Override + public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_) + { + return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java new file mode 100644 index 0000000000..772ece96aa --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java @@ -0,0 +1,80 @@ +package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter; + +import java.util.*; +import java.util.Map.Entry; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; + +public class AC_Helper_Utils { + + //AC maps + public static final Map sAutocrafterMap = new HashMap(); + + //Add Crafter + public final static int addCrafter(GT4Entity_AutoCrafter AC) { + if (!sAutocrafterMap.containsValue(AC)){ + int increase = sAutocrafterMap.size()+1; + sAutocrafterMap.put(increase, AC); + Logger.INFO("[A-C] "+"Added Auto-Crafter to index on position "+increase+"."); + return increase; + } + else { + Logger.INFO("[A-C] Tried adding an Auto-Crafter to Index, but found one already there."); + } + return 0; + } + + //Remove Crafter + public final static boolean removeCrafter(int frequency) { + if (!sAutocrafterMap.isEmpty()){ + if (sAutocrafterMap.containsKey(frequency)){ + sAutocrafterMap.remove(frequency); + return true; + } + } + return false; + } + + public final static boolean removeCrafter(GT4Entity_AutoCrafter AC) { + if (!sAutocrafterMap.isEmpty()){ + if (sAutocrafterMap.containsValue(AC)){ + sAutocrafterMap.remove(getIDByCrafter(AC)); + return true; + } + } + return false; + } + + //Get Crafter + public final static GT4Entity_AutoCrafter getCrafterByID(int ID) { + if (!sAutocrafterMap.isEmpty()) { + Set> players = sAutocrafterMap.entrySet(); + Iterator> i = players.iterator(); + while (i.hasNext()) { + Entry current = i.next(); + if (current.getKey().equals(ID)) { + return current.getValue(); + } + } + } + Logger.WARNING("Failed. [getCrafterByID]"); + return null; + } + + public final static int getIDByCrafter(GT4Entity_AutoCrafter AC) { + if (!sAutocrafterMap.isEmpty()) { + Set> players = sAutocrafterMap.entrySet(); + Iterator> i = players.iterator(); + while (i.hasNext()) { + Entry current = i.next(); + if (current.getValue().equals(AC)) { + return current.getKey(); + } + } + } + Logger.WARNING("Failed. [getIDByCrafter]"); + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java new file mode 100644 index 0000000000..a3a116fea6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java @@ -0,0 +1,263 @@ +package gtPlusPlus.xmod.gregtech.common.helpers.tesseract; + +import static gtPlusPlus.core.lib.CORE.*; + +import java.util.*; +import java.util.Map.Entry; + +import net.minecraft.entity.player.EntityPlayer; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; + +public class TesseractHelper { + + /** + * Tesseract Generator Helpers + * + * @param player + * @return + */ + + //Checks if a Generator is owned by a player. + public final static boolean isGeneratorOwnedByPlayer(EntityPlayer player, + GT_MetaTileEntity_TesseractGenerator generator) { + if (player == null){ + Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]"); + return false; + } + //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 1"); + UUID playerIdentifier = player.getUniqueID(); + if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { + //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 2"); + Map generators = getGeneratorOwnershipByPlayer(player); + Set> players = generators.entrySet(); + Iterator> i = players.iterator(); + while (i.hasNext()) { + //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 3"); + Entry current = i.next(); + if (current.getValue().equals(generator)) { + //Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 4"); + return true; + } + } + } + Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]"); + return false; + } + + //Saves A Generator to the Players UUID map along with the Freq. + public final static boolean setGeneratorOwnershipByPlayer(EntityPlayer player, int freq, + GT_MetaTileEntity_TesseractGenerator generator) { + if (player == null){ + return false; + } + UUID playerIdentifier = player.getUniqueID(); + Logger.WARNING("Setting Generator on "+freq+" for "+player.getDisplayName()+"."); + if (playerIdentifier != null) { + Map playerOwned = sTesseractGeneratorOwnershipMap + .get(playerIdentifier); + if (playerOwned == null || playerOwned.isEmpty()) { + Map newOwnershipMap = new HashMap(); + newOwnershipMap.put(freq, generator); + sTesseractGeneratorOwnershipMap.put(playerIdentifier, newOwnershipMap); + Logger.WARNING("Success! [Empty Map]"); + return true; + } else if (sTesseractGeneratorOwnershipMap.containsKey(playerIdentifier)) { + Map ownershipMap = sTesseractGeneratorOwnershipMap + .get(playerIdentifier); + if (!ownershipMap.containsKey(freq)){ + ownershipMap.put(freq, generator); + } + ownershipMap.put(freq, generator); + sTesseractGeneratorOwnershipMap.put(playerIdentifier, ownershipMap); + Logger.WARNING("Success!"); + return true; + } + } + Logger.WARNING("Failed. [setGeneratorOwnershipByPlayer]"); + return false; + } + + //Gets Generator based on Frequency. + public final static GT_MetaTileEntity_TesseractGenerator getGeneratorByFrequency(EntityPlayer player, + int freq) { + if (player == null){ + return null; + } + UUID playerIdentifier = player.getUniqueID(); + Logger.WARNING("Getting Generator on "+freq+" for "+player.getDisplayName()+"."); + if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { + //Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 1"); + Map generators = getGeneratorOwnershipByPlayer(player); + Set> players = generators.entrySet(); + Iterator> i = players.iterator(); + while (i.hasNext()) { + //Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 2"); + Entry current = i.next(); + if (current.getKey().equals(freq)) { + //Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 3"); + Logger.WARNING("Success!"); + return current.getValue(); + } + } + } + Logger.WARNING("Failed. [getGeneratorByFrequency]"); + return null; + } + + //Remove Tesseract Generator + public final static boolean removeGenerator(EntityPlayer player, int frequency) { + if (player == null){ + return false; + } + UUID playerIdentifier = player.getUniqueID(); + if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { + sTesseractGeneratorOwnershipMap.get(playerIdentifier).remove(frequency); + return true; + } + return false; + } + + /** + * + * Tesseract Terminal Helpers + * + * @param player + * @return + */ + + //Checks if a Terminal is owned by a player. + public final static boolean isTerminalOwnedByPlayer(EntityPlayer player, + GT_MetaTileEntity_TesseractTerminal generator) { + if (player == null){ + return false; + } + UUID playerIdentifier = player.getUniqueID(); + if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { + Map generators = getTerminalOwnershipByPlayer(player); + Set> players = generators.entrySet(); + Iterator> i = players.iterator(); + while (i.hasNext()) { + Entry current = i.next(); + if (current.getValue().equals(generator)) { + return true; + } + } + } + return false; + } + + //Saves A Terminal to the Players UUID map along with the Freq. + public final static boolean setTerminalOwnershipByPlayer(EntityPlayer player, int freq, + GT_MetaTileEntity_TesseractTerminal generator) { + if (player == null){ + return false; + } + UUID playerIdentifier = player.getUniqueID(); + if (playerIdentifier != null) { + Logger.WARNING("Setting Terminal on "+freq+" for "+player.getDisplayName()+"."); + Map playerOwned = sTesseractTerminalOwnershipMap + .get(playerIdentifier); + if (playerOwned == null || playerOwned.isEmpty()) { + Map newOwnershipMap = new HashMap(); + newOwnershipMap.put(freq, generator); + sTesseractTerminalOwnershipMap.put(playerIdentifier, newOwnershipMap); + Logger.WARNING("Success! [Empty Map]"); + return true; + } else if (sTesseractTerminalOwnershipMap.containsKey(playerIdentifier)) { + Map ownershipMap = sTesseractTerminalOwnershipMap + .get(playerIdentifier); + if (!ownershipMap.containsKey(freq)){ + ownershipMap.put(freq, generator); + } + sTesseractTerminalOwnershipMap.put(playerIdentifier, ownershipMap); + Logger.WARNING("Success!"); + return true; + } + } + Logger.WARNING("Failed. [setTerminalOwnershipByPlayer]"); + return false; + } + + //Gets Terminal based on Frequency. + public final static GT_MetaTileEntity_TesseractTerminal getTerminalByFrequency(EntityPlayer player, + int freq) { + if (player == null){ + return null; + } + UUID playerIdentifier = player.getUniqueID(); + Logger.WARNING("Getting Terminal on "+freq+" for "+player.getDisplayName()+"."); + if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { + Map generators = getTerminalOwnershipByPlayer(player); + Set> players = generators.entrySet(); + Iterator> i = players.iterator(); + while (i.hasNext()) { + Entry current = i.next(); + if (current.getKey().equals(freq)) { + Logger.WARNING("Success!"); + return current.getValue(); + } + } + } + Logger.WARNING("Failed. [getTerminalByFrequency]"); + return null; + } + + //Remove Tesseract Terminal + public final static boolean removeTerminal(EntityPlayer player, int frequency) { + if (player == null){ + return false; + } + UUID playerIdentifier = player.getUniqueID(); + if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { + sTesseractTerminalOwnershipMap.get(playerIdentifier).remove(frequency); + return true; + } + return false; + } + + /** + * + * Internal Methods + * + */ + + private final static Map getGeneratorOwnershipByPlayer( + EntityPlayer player) { + UUID playerIdentifier = player.getUniqueID(); + if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) { + Set>> players = sTesseractGeneratorOwnershipMap + .entrySet(); + Iterator>> i = players.iterator(); + while (i.hasNext()) { + Entry> current = i.next(); + if (current.getKey().compareTo(playerIdentifier) == 0) { + return current.getValue(); + } + + } + } + return null; + } + + private final static Map getTerminalOwnershipByPlayer( + EntityPlayer player) { + UUID playerIdentifier = player.getUniqueID(); + if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) { + Set>> players = sTesseractTerminalOwnershipMap + .entrySet(); + Iterator>> i = players.iterator(); + while (i.hasNext()) { + Entry> current = i.next(); + if (current.getKey().compareTo(playerIdentifier) == 0) { + return current.getValue(); + } + + } + } + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java new file mode 100644 index 0000000000..bb40c9b379 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java @@ -0,0 +1,386 @@ +package gtPlusPlus.xmod.gregtech.common.helpers.treefarm; + +import java.util.Random; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.FakeBlockPos; +import gtPlusPlus.api.objects.minecraft.FakeWorld; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.block.Block; +import net.minecraft.block.BlockSapling; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Direction; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenAbstractTree; +import net.minecraftforge.common.util.ForgeDirection; + +public class TreeGenerator { + + private static final FakeTreeInFakeWorldGenerator mTreeData; + + static { + Logger.WARNING("Created Fake Tree Generator."); + mTreeData = new FakeTreeInFakeWorldGenerator(); + } + + + public TreeGenerator() { + if (!mTreeData.hasGenerated) { + mTreeData.generate(null, CORE.RANDOM, 0, 0, 0); + } + } + + public AutoMap generateOutput(int aTreeSize){ + AutoMap aOutputMap = mTreeData.getOutputFromTree(); + if (aOutputMap != null && aOutputMap.size() > 0) { + Logger.WARNING("Valid tree data output"); + return aOutputMap; + } + Logger.WARNING("Invalid tree data output"); + return new AutoMap(); + } + + public static class FakeTreeInFakeWorldGenerator extends WorldGenAbstractTree + { + /** The minimum height of a generated tree. */ + private final int minTreeHeight; + /** True if this tree should grow Vines. */ + private final boolean vinesGrow; + /** The metadata value of the wood to use in tree generation. */ + private final int metaWood; + /** The metadata value of the leaves to use in tree generation. */ + private final int metaLeaves; + + private final AutoMap mFakeWorld; + private final int mTreesToGenerate; + + private int mCurrentGeneratorIteration = 0; + + private boolean hasGenerated = false; + private AutoMap aOutputsFromGenerator = new AutoMap(); + + public FakeTreeInFakeWorldGenerator() + { + this(4, 0, 0, false, 5000); + } + + public FakeTreeInFakeWorldGenerator(int aMinHeight, int aWoodMeta, int aLeafMeta, boolean aVines, int aTreeCount) + { + super(false); + this.minTreeHeight = aMinHeight; + this.metaWood = aWoodMeta; + this.metaLeaves = aLeafMeta; + this.vinesGrow = aVines; + this.mFakeWorld = new AutoMap(); + this.mTreesToGenerate = aTreeCount; + Logger.WARNING("Created Fake Tree In Fake World Instance."); + } + + + public AutoMap getOutputFromTree(){ + if (!hasGenerated) { + Logger.WARNING("Generating Tree sample data"); + generate(null, CORE.RANDOM, 0, 0, 0); + } + AutoMap aOutputMap = new AutoMap(); + int aRandomTreeID = MathUtils.randInt(0, this.mFakeWorld.size()-1); + FakeWorld aWorld = this.mFakeWorld.get(aRandomTreeID); + if (aWorld != null) { + //Logger.WARNING("Getting all block data from fake world"); + aOutputMap = aWorld.getAllBlocksStoredInFakeWorld(); + } + return aOutputMap; + + } + + @Override + protected boolean func_150523_a(Block p_150523_1_) + { + return p_150523_1_.getMaterial() == Material.air || p_150523_1_.getMaterial() == Material.leaves || p_150523_1_ == Blocks.grass || p_150523_1_ == Blocks.dirt || p_150523_1_ == Blocks.log || p_150523_1_ == Blocks.log2 || p_150523_1_ == Blocks.sapling || p_150523_1_ == Blocks.vine; + } + + @Override + protected boolean isReplaceable(World world, int x, int y, int z) + { + FakeWorld aWorld = getWorld(); + Block block = aWorld.getBlock(x, y, z); + return block.isAir(null, x, y, z) || block.isLeaves(null, x, y, z) || block.isWood(null, x, y, z) || func_150523_a(block); + } + + @Override + public boolean generate(World world, Random aRand, int aWorldX, int aWorldRealY, int aWorldZ){ + //Only Generate Once - This object is Cached + if (hasGenerated) { + return hasGenerated; + } + else { + for (int yy=0;yy 0) { + for (FakeWorld aWorld : this.mFakeWorld) { + for (ItemStack aBlockInFakeWorld : aWorld.getAllBlocksStoredInFakeWorld()) { + aOutputsFromGenerator.add(aBlockInFakeWorld); + } + } + return true; + } + else { + return false; + } + } + } + + private FakeWorld aFakeWorld; + + public FakeWorld getWorld() { + FakeWorld aWorld = this.mFakeWorld.get(mCurrentGeneratorIteration); + if (aWorld == null) { + this.mFakeWorld.set(mCurrentGeneratorIteration, new FakeWorld(200)); + aWorld = this.mFakeWorld.get(mCurrentGeneratorIteration); + } + return aWorld; + } + + public boolean generateTree(int aWorldX, int aWorldRealY, int aWorldZ) { + FakeWorld aWorld = getWorld(); + + //Set some static values + + Logger.WARNING("Stepping through generateTree [0]"); + //Dummy Value + int aWorldY = 10; + + int l = CORE.RANDOM.nextInt(3) + this.minTreeHeight; + boolean flag = true; + + if (aWorldY >= 1 && aWorldY + l + 1 <= 256) + { + Logger.WARNING("Stepping through generateTree [1]"); + byte b0; + int k1; + Block block; + + for (int i1 = aWorldY; i1 <= aWorldY + 1 + l; ++i1) + { + b0 = 1; + + if (i1 == aWorldY) + { + b0 = 0; + } + + if (i1 >= aWorldY + 1 + l - 2) + { + b0 = 2; + } + + for (int j1 = aWorldX - b0; j1 <= aWorldX + b0 && flag; ++j1) + { + for (k1 = aWorldZ - b0; k1 <= aWorldZ + b0 && flag; ++k1) + { + if (i1 >= 0 && i1 < 256) + { + block = aWorld.getBlock(j1, i1, k1); + + if (!this.isReplaceable(null, j1, i1, k1)) + { + flag = false; + } + } + else + { + flag = false; + } + } + } + } + + if (!flag) + { + Logger.WARNING("Stepping through generateTree [2]"); + return false; + } + else + { + Logger.WARNING("Stepping through generateTree [3]"); + Block block2 = aWorld.getBlock(aWorldX, aWorldY - 1, aWorldZ); + FakeBlockPos aBlockToGrowPlantOn = aWorld.getBlockAtCoords(aWorldX, aWorldY-1, aWorldZ); + + boolean isSoil = block2.canSustainPlant(aWorld, aWorldX, aWorldY - 1, aWorldZ, ForgeDirection.UP, (BlockSapling)Blocks.sapling); + if (/*isSoil &&*/ aWorldY < 256 - l - 1) + { + Logger.WARNING("Stepping through generateTree [4]"); + aBlockToGrowPlantOn.onPlantGrow(aWorld, aWorldX, aWorldY - 1, aWorldZ, aWorldX, aWorldY, aWorldZ); + b0 = 3; + byte b1 = 0; + int l1; + int i2; + int j2; + int i3; + + for (k1 = aWorldY - b0 + l; k1 <= aWorldY + l; ++k1) + { + i3 = k1 - (aWorldY + l); + l1 = b1 + 1 - i3 / 2; + + for (i2 = aWorldX - l1; i2 <= aWorldX + l1; ++i2) + { + j2 = i2 - aWorldX; + + for (int k2 = aWorldZ - l1; k2 <= aWorldZ + l1; ++k2) + { + int l2 = k2 - aWorldZ; + + if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || CORE.RANDOM.nextInt(2) != 0 && i3 != 0) + { + Block block1 = aWorld.getBlock(i2, k1, k2); + + if (block1.isAir(null, i2, k1, k2) || block1.isLeaves(null, i2, k1, k2)) + { + this.setBlockAndNotifyAdequately(aWorld, i2, k1, k2, Blocks.leaves, this.metaLeaves); + } + } + } + } + } + Logger.WARNING("Stepping through generateTree [5]"); + + for (k1 = 0; k1 < l; ++k1) + { + block = aWorld.getBlock(aWorldX, aWorldY + k1, aWorldZ); + + if (block.isAir(null, aWorldX, aWorldY + k1, aWorldZ) || block.isLeaves(null, aWorldX, aWorldY + k1, aWorldZ)) + { + this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ, Blocks.log, this.metaWood); + + if (this.vinesGrow && k1 > 0) + { + if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX - 1, aWorldY + k1, aWorldZ)) + { + this.setBlockAndNotifyAdequately(aWorld, aWorldX - 1, aWorldY + k1, aWorldZ, Blocks.vine, 8); + } + + if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX + 1, aWorldY + k1, aWorldZ)) + { + this.setBlockAndNotifyAdequately(aWorld, aWorldX + 1, aWorldY + k1, aWorldZ, Blocks.vine, 2); + } + + if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ - 1)) + { + this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ - 1, Blocks.vine, 1); + } + + if (CORE.RANDOM.nextInt(3) > 0 && aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ + 1)) + { + this.setBlockAndNotifyAdequately(aWorld, aWorldX, aWorldY + k1, aWorldZ + 1, Blocks.vine, 4); + } + } + } + } + Logger.WARNING("Stepping through generateTree [6]"); + + if (this.vinesGrow) + { + Logger.WARNING("Stepping through generateTree [7]"); + for (k1 = aWorldY - 3 + l; k1 <= aWorldY + l; ++k1) + { + i3 = k1 - (aWorldY + l); + l1 = 2 - i3 / 2; + + for (i2 = aWorldX - l1; i2 <= aWorldX + l1; ++i2) + { + for (j2 = aWorldZ - l1; j2 <= aWorldZ + l1; ++j2) + { + if (aWorld.getBlock(i2, k1, j2).isLeaves(null, i2, k1, j2)) + { + if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2 - 1, k1, j2).isAir(null, i2 - 1, k1, j2)) + { + this.growVines(aWorld, i2 - 1, k1, j2, 8); + } + + if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2 + 1, k1, j2).isAir(null, i2 + 1, k1, j2)) + { + this.growVines(aWorld, i2 + 1, k1, j2, 2); + } + + if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2, k1, j2 - 1).isAir(null, i2, k1, j2 - 1)) + { + this.growVines(aWorld, i2, k1, j2 - 1, 1); + } + + if (CORE.RANDOM.nextInt(4) == 0 && aWorld.getBlock(i2, k1, j2 + 1).isAir(null, i2, k1, j2 + 1)) + { + this.growVines(aWorld, i2, k1, j2 + 1, 4); + } + } + } + } + } + Logger.WARNING("Stepping through generateTree [8]"); + + if (CORE.RANDOM.nextInt(5) == 0 && l > 5) + { + for (k1 = 0; k1 < 2; ++k1) + { + for (i3 = 0; i3 < 4; ++i3) + { + if (CORE.RANDOM.nextInt(4 - k1) == 0) + { + l1 = CORE.RANDOM.nextInt(3); + this.setBlockAndNotifyAdequately(aWorld, aWorldX + Direction.offsetX[Direction.rotateOpposite[i3]], aWorldY + l - 5 + k1, aWorldZ + Direction.offsetZ[Direction.rotateOpposite[i3]], Blocks.cocoa, l1 << 2 | i3); + } + } + } + } + } + Logger.WARNING("Stepping through generateTree [9]"); + return true; + } + else + { + Logger.WARNING("Stepping through generateTree [10]"); + return false; + } + } + } + else + { + Logger.WARNING("Stepping through generateTree [11]"); + return false; + } + } + + /** + * Grows vines downward from the given block for a given length. Args: World, x, starty, z, vine-length + */ + private void growVines(FakeWorld aWorld, int aX, int aY, int aZ, int aMeta) + { + int aLoopSize = vinesGrow ? MathUtils.randInt(0, 4) : 0; + for (int i=0;i= 0 && aMeta <= Short.MAX_VALUE)) { + Logger.WARNING("Setting block "+aX+", "+aY+", "+aZ+" | "+aBlock.getLocalizedName()+" | "+aMeta); + aWorld.setBlockAtCoords(aX, aY, aZ, aBlock, aMeta); + //aOutputsFromGenerator.put(ItemUtils.simpleMetaStack(aBlock, aMeta, 1)); + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java new file mode 100644 index 0000000000..7c3f764794 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java @@ -0,0 +1,225 @@ +package gtPlusPlus.xmod.gregtech.common.items; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import cofh.core.render.IconRegistry; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_MultiTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.client.renderer.CustomItemBlockRenderer; +import gtPlusPlus.core.common.CommonProxy; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class MetaCustomCoverItem extends Item { + + protected final IIcon[] icons; + private final String mModID; + private final String mTextureSetName; + protected final IIconContainer[] mTextures; + private final short[][] mRGB; + + public MetaCustomCoverItem(String aModId, int aTextureCount, String aTextureSetName, IIconContainer[] aTextures, short[][] aRGB) { + super(); + icons = new IIcon[aTextureCount]; + mModID = aModId; + mTextureSetName = Utils.sanitizeString(aTextureSetName); + mTextures = aTextures; + mRGB = aRGB; + this.setTextureName(CORE.MODID + ":" + "itemPlate"); + this.setHasSubtypes(true); + String unlocalizedName = "itemCustomMetaCover." + mModID + "." + mTextureSetName; + this.setUnlocalizedName(unlocalizedName); + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setMaxStackSize(1); + GameRegistry.registerItem(this, unlocalizedName); + registerCover(); + Logger.INFO("[Covers] Generated Custom covers for "+mModID+" using "+aTextureCount+" textures from "+mTextureSetName+"."); + } + + public boolean hide() { + return true; + } + + private final void registerCover() { + //CommonProxy.registerItemRendererGlobal(this, new CustomItemBlockRenderer()); + for (int i=0;i 0 && hide()) { + ItemUtils.hideItemFromNEI(thisStack); + } + GregTech_API.registerCover( + thisStack, + new GT_MultiTexture( + new ITexture[]{ + new GT_RenderedTexture(mTextures[i]) + }), + new GTPP_Cover_ToggleVisual()); + } + } + + /* + * @Override public void registerIcons(IIconRegister reg) { for (int i = 0; i < + * icons.length; i++) { this.icons[i] = mTextures[i].getIcon(); } } + * + * @Override public IIcon getIconFromDamage(int meta) { return this.icons[meta]; + * } + */ + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < icons.length; i++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return this.getUnlocalizedName() + "_" + stack.getItemDamage(); + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + return StringUtils.capitalize(mTextureSetName) + " (" + tItem.getItemDamage() + ")"; //super.getItemStackDisplayName(tItem); + } + + private static boolean createNBT(ItemStack rStack) { + final NBTTagCompound tagMain = new NBTTagCompound(); + final NBTTagCompound tagNBT = new NBTTagCompound(); + tagNBT.setLong("Damage", 0); + tagNBT.setBoolean("AllowConnections", false); + tagMain.setTag("CustomCoverMeta", tagNBT); + rStack.setTagCompound(tagMain); + return true; + } + + public static final long getCoverDamage(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("CustomCoverMeta"); + if (aNBT != null) { + return aNBT.getLong("Damage"); + } + } else { + createNBT(aStack); + } + return 0L; + } + + public static final boolean setCoverDamage(final ItemStack aStack, final long aDamage) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("CustomCoverMeta"); + if (aNBT != null) { + aNBT.setLong("Damage", aDamage); + return true; + } + } + return false; + } + + public static final boolean getCoverConnections(final ItemStack aStack) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("CustomCoverMeta"); + if (aNBT != null) { + return aNBT.getBoolean("AllowConnections"); + } + } else { + createNBT(aStack); + } + return false; + } + + public static final boolean setCoverConnections(final ItemStack aStack, final boolean aConnections) { + NBTTagCompound aNBT = aStack.getTagCompound(); + if (aNBT != null) { + aNBT = aNBT.getCompoundTag("CustomCoverMeta"); + if (aNBT != null) { + aNBT.setBoolean("AllowConnections", aConnections); + return true; + } + } + return false; + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + if (stack.getTagCompound() == null) { + createNBT(stack); + } + double currentDamage = getCoverDamage(stack); + double meta = stack.getItemDamage() == 0 ? 50 : 2500; + double durabilitypercent = currentDamage / meta; + return durabilitypercent; + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if (KeyboardUtils.isShiftKeyDown()) { + boolean con = getCoverConnections(stack); + if (con) { + setCoverConnections(stack, false); + } else { + setCoverConnections(stack, true); + } + } + return stack; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + boolean cons = getCoverConnections(stack); + list.add(EnumChatFormatting.GRAY + "Allows Connections: "+cons); + list.add(EnumChatFormatting.GRAY + "Shift Rmb to change state before applying"); + super.addInformation(stack, player, list, bool); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + + @Override + public Item setFull3D() { + // TODO Auto-generated method stub + return super.setFull3D(); + } + + @Override + public boolean isFull3D() { + // TODO Auto-generated method stub + return super.isFull3D(); + } + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + if (this.mRGB == null){ + return super.getColorFromItemStack(stack, HEX_OxFFFFFF); + } + int aMeta = stack.getItemDamage(); + return Utils.rgbtoHexValue(mRGB[aMeta][0], mRGB[aMeta][1], mRGB[aMeta][2]); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java new file mode 100644 index 0000000000..ce8b6eaf62 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -0,0 +1,453 @@ +package gtPlusPlus.xmod.gregtech.common.items; + +import static gtPlusPlus.core.util.Utils.getTcAspectStack; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.objects.GT_MultiTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.GT_FoodStat; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GTPP_Recipe; +import gregtech.common.covers.GT_Cover_Arm; +import gregtech.common.covers.GT_Cover_Conveyor; +import gregtech.common.covers.GT_Cover_Pump; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import gregtech.common.items.behaviors.Behaviour_DataStick; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.handler.OldCircuitHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.StringUtils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow; +import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow_Item; +import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; + +public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { + + public final static MetaGeneratedGregtechItems INSTANCE; + + static { + INSTANCE = new MetaGeneratedGregtechItems(); + } + + public MetaGeneratedGregtechItems() { + super("MU-metaitem.01", new OrePrefixes[]{null}); + } + + public void generateMetaItems() { + int tLastID = 0; + + registerCustomCircuits(); + OldCircuitHandler.addCircuitItems(); + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + Logger.INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)"); + GregtechItemList.Electric_Pump_LuV.set(this.addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Electric_Pump_ZPM.set(this.addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L), getTcAspectStack(TC_Aspects.AQUA, 2L)})); + GregtechItemList.Electric_Pump_UV.set(this.addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L), getTcAspectStack(TC_Aspects.AQUA, 4L)})); + GregtechItemList.Electric_Pump_MAX.set(this.addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)})); + GregTech_API.registerCover(GregtechItemList.Electric_Pump_LuV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8196)); + GregTech_API.registerCover(GregtechItemList.Electric_Pump_ZPM.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768)); + GregTech_API.registerCover(GregtechItemList.Electric_Pump_UV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072)); + GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288)); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Bronze)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Steel)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.StainlessSteel)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Titanium)}); + tLastID = 4; + GregtechItemList.Electric_Motor_LuV.set(this.addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); + GregtechItemList.Electric_Motor_ZPM.set(this.addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 2L)})); + GregtechItemList.Electric_Motor_UV.set(this.addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 4L)})); + GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.IronMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.AnyIron), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.AnyCopper), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Silver)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Cupronickel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.NeodymiumMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.TungstenSteel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Nichrome)}); + + tLastID = 8; + GregtechItemList.Conveyor_Module_LuV.set(this.addItem(tLastID = 8, "Conveyor Module (LuV)", "1 Stack every 20 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)})); + GregtechItemList.Conveyor_Module_ZPM.set(this.addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L)})); + GregtechItemList.Conveyor_Module_UV.set(this.addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L)})); + GregtechItemList.Conveyor_Module_MAX.set(this.addItem(tLastID = 11, "Conveyor Module (MAX)", "1 Stack every 1/5 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)}); + GregTech_API.registerCover(GregtechItemList.Conveyor_Module_LuV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400)); + GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ZPM.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100)); + GregTech_API.registerCover(GregtechItemList.Conveyor_Module_UV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20)); + GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4)); + tLastID = 12; + GregtechItemList.Electric_Piston_LuV.set(this.addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); + GregtechItemList.Electric_Piston_ZPM.set(this.addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L)})); + GregtechItemList.Electric_Piston_UV.set(this.addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L)})); + GregtechItemList.Electric_Piston_MAX.set(this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)}); + tLastID = 16; + GregtechItemList.Robot_Arm_LuV.set(this.addItem(tLastID = 16, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)})); + GregtechItemList.Robot_Arm_ZPM.set(this.addItem(tLastID = 17, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L), getTcAspectStack("COGNITIO", 2L)})); + GregtechItemList.Robot_Arm_UV.set(this.addItem(tLastID = 18, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L), getTcAspectStack("COGNITIO", 4L)})); + GregtechItemList.Robot_Arm_MAX.set(this.addItem(tLastID = 19, "Robot Arm (MAX)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('P'), GregtechItemList.Electric_Piston_LuV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('P'), GregtechItemList.Electric_Piston_ZPM, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('P'), GregtechItemList.Electric_Piston_UV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('P'), GregtechItemList.Electric_Piston_MAX, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)}); + GregTech_API.registerCover(GregtechItemList.Robot_Arm_LuV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400)); + GregTech_API.registerCover(GregtechItemList.Robot_Arm_ZPM.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100)); + GregTech_API.registerCover(GregtechItemList.Robot_Arm_UV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20)); + GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4)); + tLastID = 20; + GregtechItemList.Field_Generator_LuV.set(this.addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)})); + GregtechItemList.Field_Generator_ZPM.set(this.addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.TUTAMEN, 2L)})); + GregtechItemList.Field_Generator_UV.set(this.addItem(tLastID = 22, "Field Generator (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.TUTAMEN, 4L)})); + GregtechItemList.Field_Generator_MAX.set(this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium)}); + tLastID = 24; + GregtechItemList.Emitter_LuV.set(this.addItem(tLastID = 24, "Emitter (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)})); + GregtechItemList.Emitter_ZPM.set(this.addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.LUX, 2L)})); + GregtechItemList.Emitter_UV.set(this.addItem(tLastID = 26, "Emitter (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.LUX, 4L)})); + GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium)}); + tLastID = 28; + GregtechItemList.Sensor_LuV.set(this.addItem(tLastID = 28, "Sensor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)})); + GregtechItemList.Sensor_ZPM.set(this.addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.SENSUS, 2L)})); + GregtechItemList.Sensor_UV.set(this.addItem(tLastID = 30, "Sensor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.SENSUS, 4L)})); + GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)})); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_ZPM.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_UV.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced)}); + //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_MAX.get(1L), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite)}); + + //Handler for ULV Components + registerComponents_ULV(); + + + } + + else { + //Simplify life. + registerComponents_ULV(); + registerComponents_MAX(); + } + + //Extruder Shape + GregtechItemList.Shape_Extruder_WindmillShaft.set(this.addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts")); + + //GTNH Already adds this. + if (!CORE.GTNH) { + GregtechItemList.Shape_Extruder_SmallGear.set(this.addItem(221, "Extruder Shape (Small Gear)", "Extruder Shape for making small gears")); + } + + //Batteries + GregtechItemList.Battery_RE_EV_Sodium.set(this.addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L), getTcAspectStack(TC_Aspects.POTENTIA, 2L)})); + this.setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true); + + GregtechItemList.Battery_RE_EV_Cadmium.set(this.addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); + this.setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true); + + GregtechItemList.Battery_RE_EV_Lithium.set(this.addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 3L), getTcAspectStack(TC_Aspects.METALLUM, 3L), getTcAspectStack(TC_Aspects.POTENTIA, 3L)})); + this.setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true); + + /** + * Power Gems + */ + + GregtechItemList.Battery_Gem_1.set(this.addItem(tLastID = 66, "Proton Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 24L), getTcAspectStack(TC_Aspects.POTENTIA, 16L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 20 * 300 / 4, GT_Values.V[6], 6L, -3L, false); + GregtechItemList.Battery_Gem_2.set(this.addItem(tLastID = 68, "Electron Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.METALLUM, 32L), getTcAspectStack(TC_Aspects.POTENTIA, 32L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[7] * 20 * 300 / 4, GT_Values.V[7], 7L, -3L, false); + GregtechItemList.Battery_Gem_3.set(this.addItem(tLastID = 70, "Quark Entanglement", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 32L), getTcAspectStack(TC_Aspects.METALLUM, 48L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 20 * 300 / 4, GT_Values.V[8], 8L, -3L, false); + //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_1.get(1), "batteryFutureBasic"); + //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_2.get(1), "batteryFutureGood"); + //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_3.get(1), "batteryFutureAdvanced"); + + + /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); + setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true); + + GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Mercury Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); + setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);*/ + + //RTG Pellet + GregtechItemList.Pellet_RTG_PU238.set(this.addItem(41, StringUtils.superscript("238")+"Pu Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); + GregtechItemList.Pellet_RTG_SR90.set(this.addItem(42, StringUtils.superscript("90")+"Sr Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); + GregtechItemList.Pellet_RTG_PO210.set(this.addItem(43, StringUtils.superscript("210")+"Po Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); + GregtechItemList.Pellet_RTG_AM241.set(this.addItem(44, StringUtils.superscript("241")+"Am Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)})); + + CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_PU238.get(1), MathUtils.roundToClosestInt(87.7f), 64); + CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_SR90.get(1), MathUtils.roundToClosestInt(28.8f), 32); + CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_PO210.get(1), 1, 512); + CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_AM241.get(1), MathUtils.roundToClosestInt(432/2), 16); + CORE.RA.addFuelForRTG(GT_ModHandler.getIC2Item("RTGPellets", 1), MathUtils.roundToClosestInt(2.6f), 8); + + //Computer Cube + GregtechItemList.Gregtech_Computer_Cube.set(this.addItem(tLastID = 55, "Gregtech Computer Cube", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[6]* 10 * 60 * 20, GT_Values.V[5], 5L, -3L, true); + + //FOOOOOOOOOOOOOOD + GregtechItemList.Food_Baked_Raisin_Bread.set(this.addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[]{new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]), getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L), getTcAspectStack(TC_Aspects.IGNIS, 1L)})); + + if (!CORE.GTNH) { + GregtechItemList.Fluid_Cell_144L.set(this.addItem(tLastID = 61, "144L Invar Fluid Cell", "Holds exactly one dust worth of liquid.", new Object[]{new ItemData(Materials.Invar, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + this.setFluidContainerStats(32000 + tLastID, 144L, 64L); + + GregtechItemList.Fluid_Cell_36L.set(this.addItem(tLastID = 62, "36L Brass Fluid Cell", "Holds exactly one small dust worth of liquid.", new Object[]{new ItemData(Materials.Brass, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + this.setFluidContainerStats(32000 + tLastID, 36L, 64L); + + GregtechItemList.Fluid_Cell_16L.set(this.addItem(tLastID = 63, "16L Bronze Fluid Cell", "Holds exactly one tiny dust / nugget worth of liquid.", new Object[]{new ItemData(Materials.Bronze, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + this.setFluidContainerStats(32000 + tLastID, 16L, 64L); + + GregtechItemList.Fluid_Cell_1L.set(this.addItem(tLastID = 64, "1L Wrought Iron Fluid Cell", "Holds exactly one litre worth of liquid.", new Object[]{new ItemData(Materials.WroughtIron, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + this.setFluidContainerStats(32000 + tLastID, 1L, 64L); + } + + + + GregtechItemList.Cover_Overflow_ULV.set(this.addItem(71, "Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_LV.set(this.addItem(72, "Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_MV.set(this.addItem(73, "Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_HV.set(this.addItem(74, "Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_EV.set(this.addItem(75, "Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_IV.set(this.addItem(76, "Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(8)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(64)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(512)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(4096)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(32768)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(262144)); + + //Fusion Reactor MK4 Singularity + GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)")); + + + //NanoTubes + GregtechItemList.NanoTube_Base_Substrate.set(this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes")); + GregtechItemList.NanoTube_Finished.set(this.addItem(102, "Carbon Nanotubes", "Multi-walled Zigzag nanotubes, possibly Carbon's final form")); + GregtechItemList.Carbyne_Tube_Finished.set(this.addItem(103, "Linear Acetylenic Carbon (LAC/Carbyne)", "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable")); + GregtechItemList.Carbyne_Sheet_Finished.set(this.addItem(104, "Carbyne Composite Panel", "Nanotubes which contain LAC, arranged side by side and compressed further")); + GregtechItemList.Laser_Lens_Special.set(this.addItem(105, "Quantum Anomaly", "Probably should shoot it with lasers")); + + GregtechItemList.Battery_Casing_Gem_1.set(this.addItem(106, "Containment Unit I", "Used in crafting")); + GregtechItemList.Battery_Casing_Gem_2.set(this.addItem(107, "Containment Unit II", "Used in crafting")); + GregtechItemList.Battery_Casing_Gem_3.set(this.addItem(108, "Advanced Containment Unit", "Used in crafting")); + GregtechItemList.Battery_Casing_Gem_4.set(this.addItem(109, "Exotic Containment Unit", "Used in crafting")); + + GregtechItemList.Battery_Gem_4.set(this.addItem(tLastID = 110, "Graviton Anomaly", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 64L), getTcAspectStack(TC_Aspects.METALLUM, 64L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); + this.setElectricStats(32000 + tLastID, (64000000000L*16), GT_Values.V[9], 9L, -3L, false); + + + + /* + * Bombs + */ + GregtechItemList.Bomb_Cast.set(this.addItem(111, "Bomb Cast", "Used in the production of Bombs")); + GregtechItemList.Bomb_Cast_Molten.set(this.addItem(112, "Bomb Cast (Hot)", "Consider cooling this off")); + GregtechItemList.Bomb_Cast_Set.set(this.addItem(113, "Bomb Cast (Set)", "Break it open for the goodies inside!")); + GregtechItemList.Bomb_Cast_Broken.set(this.addItem(114, "Bomb Cast (Broken)", "This is probably just junk")); + GregtechItemList.Bomb_Cast_Mold.set(this.addItem(115, "Mold (Bomb Cast)", "Used in the production of Bombs")); + + /* + * High Tier 'Saws' for the tree Farm + */ + GregtechItemList.Farm_Processor_EV.set(this.addItem(tLastID = 120, "Farm Processor [EV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[5]* 10 * 60 * 20, GT_Values.V[4], 4L, -3L, false); + GregtechItemList.Farm_Processor_IV.set(this.addItem(tLastID = 122, "Farm Processor [IV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[6]* 10 * 60 * 20, GT_Values.V[5], 5L, -3L, false); + GregtechItemList.Farm_Processor_LuV.set(this.addItem(tLastID = 124, "Farm Processor [LuV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[7]* 10 * 60 * 20, GT_Values.V[6], 6L, -3L, false); + GregtechItemList.Farm_Processor_ZPM.set(this.addItem(tLastID = 126, "Farm Processor [ZPM]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[8]* 10 * 60 * 20, GT_Values.V[7], 7L, -3L, false); + GregtechItemList.Farm_Processor_UV.set(this.addItem(tLastID = 128, "Farm Processor [UV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)})); + this.setElectricStats(32000 + tLastID, GT_Values.V[9]* 10 * 60 * 20, GT_Values.V[8], 8L, -3L, false); + + String aTierName; + int aFirstMachineCasingID = 130; + GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] { + GregtechItemList.FakeMachineCasingPlate_ULV, + GregtechItemList.FakeMachineCasingPlate_LV, + GregtechItemList.FakeMachineCasingPlate_MV, + GregtechItemList.FakeMachineCasingPlate_HV, + GregtechItemList.FakeMachineCasingPlate_EV, + GregtechItemList.FakeMachineCasingPlate_IV, + GregtechItemList.FakeMachineCasingPlate_LuV, + GregtechItemList.FakeMachineCasingPlate_ZPM, + GregtechItemList.FakeMachineCasingPlate_UV, + GregtechItemList.FakeMachineCasingPlate_MAX, + }; + for (int i=0;i<10;i++) { + if (i==10) { + break; + } + else { + aTierName = GT_Values.VN[i]; + mMachineCasingCovers[i].set(this.addItem(aFirstMachineCasingID++, aTierName+" Machine Plate Cover", "Deprecated - Shapeless Craft to new version", new Object[]{})); + GregTech_API.registerCover(mMachineCasingCovers[i].get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[i][0]}), new GTPP_Cover_ToggleVisual()); + } + } + GregtechItemList.Laser_Lens_WoodsGlass.set(this.addItem(140, "Wood's Glass Lens", "Allows UV & IF to pass through, blocks visible light spectrums")); + + int aStartID = 141; + GregtechItemList[] aTransParts = new GregtechItemList[] { + GregtechItemList.TransmissionComponent_ULV, + GregtechItemList.TransmissionComponent_LV, + GregtechItemList.TransmissionComponent_MV, + GregtechItemList.TransmissionComponent_HV, + GregtechItemList.TransmissionComponent_EV, + GregtechItemList.TransmissionComponent_IV, + GregtechItemList.TransmissionComponent_LuV, + GregtechItemList.TransmissionComponent_ZPM, + GregtechItemList.TransmissionComponent_UV, + GregtechItemList.TransmissionComponent_MAX, + }; + for (int aIndex=0;aIndex<10;aIndex++){ + aTransParts[aIndex].set(this.addItem(aStartID++, "Transmission Component ("+GT_Values.VN[aIndex]+")", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, aIndex), getTcAspectStack(TC_Aspects.MACHINA, aIndex), getTcAspectStack(TC_Aspects.MAGNETO, aIndex)})); + } + + // Distillus Chip + GregtechItemList.Distillus_Upgrade_Chip.set(this.addItem(151, "Upgrade Chip", "Used to upgrade Distillus to Tier 2")); + + + GregtechItemList.Chip_MultiNerf_NoOutputBonus.set(this.addItem(160, "No-Bonus Chip", "You won't like using this")); + GregtechItemList.Chip_MultiNerf_NoSpeedBonus.set(this.addItem(161, "No-Bonus Chip", "You won't like using this")); + GregtechItemList.Chip_MultiNerf_NoEuBonus.set(this.addItem(162, "No-Bonus Chip", "You won't like using this")); + + + /* + GregtechItemList.Cover_Overflow_Item_ULV.set(this.addItem(165, "Item Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_Item_LV.set(this.addItem(166, "Item Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_Item_MV.set(this.addItem(167, "Item Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_Item_HV.set(this.addItem(168, "Item Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_Item_EV.set(this.addItem(169, "Item Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Cover_Overflow_Item_IV.set(this.addItem(170, "Item Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(8)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(64)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(512)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(4096)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(32768)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(262144)); + */ + } + + private boolean registerComponents_ULV(){ + GregtechItemList.Electric_Pump_ULV.set(this.addItem(32, "Electric Pump (ULV)", "160 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); + GregtechItemList.Electric_Motor_ULV.set(this.addItem(33, "Electric Motor (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); + GregtechItemList.Conveyor_Module_ULV.set(this.addItem(34, "Conveyor Module (ULV)", "1 Stack every 80 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)})); + GregtechItemList.Electric_Piston_ULV.set(this.addItem(35, "Electric Piston (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)})); + GregtechItemList.Robot_Arm_ULV.set(this.addItem(36, "Robot Arm (ULV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)})); + GregtechItemList.Field_Generator_ULV.set(this.addItem(37, "Field Generator (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)})); + GregtechItemList.Emitter_ULV.set(this.addItem(38, "Emitter (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)})); + GregtechItemList.Sensor_ULV.set(this.addItem(39, "Sensor (ULV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)})); + + GregTech_API.registerCover(GregtechItemList.Electric_Pump_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8)); + GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(1600)); + GregTech_API.registerCover(GregtechItemList.Robot_Arm_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(1600)); + + return true; + } + + private boolean registerComponents_MAX(){ + GregtechItemList.Electric_Pump_MAX.set(this.addItem(3, "Electric Pump (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)})); + GregtechItemList.Electric_Motor_MAX.set(this.addItem(7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); + GregtechItemList.Conveyor_Module_MAX.set(this.addItem(11, "Conveyor Module (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)})); + GregtechItemList.Electric_Piston_MAX.set(this.addItem(15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)})); + GregtechItemList.Robot_Arm_MAX.set(this.addItem(19, "Robot Arm (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)})); + GregtechItemList.Field_Generator_MAX.set(this.addItem(23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)})); + GregtechItemList.Emitter_MAX.set(this.addItem(27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)})); + GregtechItemList.Sensor_MAX.set(this.addItem(31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)})); + + GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288)); + GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4)); + GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4)); + + + return true; + } + + public boolean registerOldCircuits(){ + //Enable Old Circuits + Logger.INFO("[Old Feature - Circuits] Enabling Pre-5.09.28 Circuits and Data Storage."); + + GregtechItemList.Old_Circuit_Primitive.set(this.addItem(200, "NAND Chip", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive)})); + GregtechItemList.Old_Circuit_Basic.set(this.addItem(201, "Basic Electronic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic)})); + GregtechItemList.Old_Circuit_Good.set(this.addItem(202, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good)})); + GregtechItemList.Old_Circuit_Advanced.set(this.addItem(203, "Advanced Circuit", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced)})); + GregtechItemList.Old_Circuit_Data.set(this.addItem(204, "Data Storage Circuit", "A Data Storage Chip", new Object[]{OrePrefixes.circuit.get(Materials.Data)})); + GregtechItemList.Old_Circuit_Elite.set(this.addItem(205, "Data Control Circuit", "A Processor", new Object[]{OrePrefixes.circuit.get(Materials.Elite)})); + GregtechItemList.Old_Circuit_Master.set(this.addItem(206, "Energy Flow Circuit", "A High Voltage Processor", new Object[]{OrePrefixes.circuit.get(Materials.Master)})); + + GregtechItemList.Old_Tool_DataOrb.set(this.addItem(207, "Data Orb [GT++]", "A High Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); + GregtechItemList.Old_Circuit_Ultimate.set(GregtechItemList.Old_Tool_DataOrb.get(1L)); + GT_ModHandler.addShapelessCraftingRecipe(GregtechItemList.Old_Tool_DataOrb.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{GregtechItemList.Old_Tool_DataOrb.get(1L)}); + + GregtechItemList.Old_Tool_DataStick.set(this.addItem(208, "Data Stick [GT++]", "A Low Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); + GT_ModHandler.addShapelessCraftingRecipe(GregtechItemList.Old_Tool_DataStick.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{GregtechItemList.Old_Tool_DataStick.get(1L)}); + + GregtechItemList.Old_Circuit_Board_Basic.set(this.addItem(210, "Basic Circuit Board", "A basic Board")); + GregtechItemList.Old_Circuit_Board_Advanced.set(this.addItem(211, "Advanced Circuit Board", "An advanced Board")); + GregtechItemList.Old_Circuit_Board_Elite.set(this.addItem(212, "Processor Board", "A Processor Board")); + GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.set(this.addItem(213, "Engraved Crystal Chip", "Needed for Circuits")); + GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.set(this.addItem(214, "Engraved Lapotron Chip", "Needed for Circuits")); + GregtechItemList.Old_Circuit_Parts_Advanced.set(this.addItem(215, "Advanced Circuit Parts", "Advanced Circuit Parts")); + GregtechItemList.Old_Circuit_Parts_Wiring_Basic.set(this.addItem(216, "Etched Medium Voltage Wiring", "Part of Circuit Boards")); + GregtechItemList.Old_Circuit_Parts_Wiring_Advanced.set(this.addItem(217, "Etched High Voltage Wiring", "Part of Circuit Boards")); + GregtechItemList.Old_Circuit_Parts_Wiring_Elite.set(this.addItem(218, "Etched Extreme Voltage Wiring", "Part of Circuit Boards")); + GregtechItemList.Old_Empty_Board_Basic.set(this.addItem(219, "Empty Circuit Board", "A Board Part")); + GregtechItemList.Old_Empty_Board_Elite.set(this.addItem(220, "Empty Processor Board", "A Processor Board Part")); + + return true; + } + + public boolean registerCustomCircuits() { + if (CORE.ConfigSwitches.enableCustomCircuits){ + GregtechItemList.Circuit_IV.set(this.addItem(704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)})); + GregtechItemList.Circuit_LuV.set(this.addItem(705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)})); + GregtechItemList.Circuit_ZPM.set(this.addItem(706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)})); + GregtechItemList.Circuit_Board_IV.set(this.addItem(710, "IV Circuit Board", "An IV Voltage Rated Circuit Board")); + GregtechItemList.Circuit_Board_LuV.set(this.addItem(711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board")); + GregtechItemList.Circuit_Board_ZPM.set(this.addItem(712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board")); + GregtechItemList.Circuit_Parts_Crystal_Chip_IV.set(this.addItem(713, "(IV) Energized Crystal Chip", "Needed for Circuits")); + GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(this.addItem(714, "(LuV) Neutron based Microchip", "Needed for Circuits")); + GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.set(this.addItem(715, "(ZPM) Quantum Chip", "Needed for Circuits")); + GregtechItemList.Circuit_Parts_IV.set(this.addItem(716, "(IV) Energized Circuit Parts", "Circuit Parts")); + GregtechItemList.Circuit_Parts_LuV.set(this.addItem(717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts")); + GregtechItemList.Circuit_Parts_ZPM.set(this.addItem(718, "(ZPM) Quantum Circuit Parts", "Circuit Parts")); + GregtechItemList.Circuit_Parts_Wiring_IV.set(this.addItem(719, "Etched IV Voltage Wiring", "Part of Circuit Boards")); + GregtechItemList.Circuit_Parts_Wiring_LuV.set(this.addItem(720, "Etched LuV Voltage Wiring", "Part of Circuit Boards")); + GregtechItemList.Circuit_Parts_Wiring_ZPM.set(this.addItem(721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards")); + ItemUtils.addItemToOreDictionary(GregtechItemList.Circuit_IV.get(1), "circuitSuperconductor"); + ItemUtils.addItemToOreDictionary(GregtechItemList.Circuit_LuV.get(1), "circuitInfinite"); + return true; + } + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java new file mode 100644 index 0000000000..14100d1599 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java @@ -0,0 +1,101 @@ +package gtPlusPlus.xmod.gregtech.common.items; + +import java.lang.reflect.Field; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.ToolDictNames; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.GT_HashSet; +import gregtech.api.objects.GT_ItemStack; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames; +import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_AngleGrinder; +import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher; +import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricButcherKnife; +import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricLighter; +import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricSnips; + +public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool { + + public static final short ELECTRIC_LIGHTER = 7534; + public static final short ELECTRIC_BUTCHER_KNIFE = 7634; + public static final short SKOOKUM_CHOOCHER = 7734; + public static final short ANGLE_GRINDER = 7834; + public static final short ELECTRIC_SNIPS = 7934; + public static GT_MetaGenerated_Tool INSTANCE; + + static { + INSTANCE = new MetaGeneratedGregtechTools(); + } + + public static GT_MetaGenerated_Tool getInstance() { + return INSTANCE; + } + + + private MetaGeneratedGregtechTools() { + super("plusplus.metatool.01"); + // Skookum Choocher + GregTech_API.registerTool(this.addTool(SKOOKUM_CHOOCHER, "Skookum Choocher", + "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.", new TOOL_Gregtech_Choocher(), + new Object[] { GregtechToolDictNames.craftingToolSkookumChoocher, ToolDictNames.craftingToolHardHammer, + ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }), + GregTech_API.sWrenchList); + + // Electric File + this.addTool(ANGLE_GRINDER, "Angle Grinder", "Hand-held electric filing device", + new TOOL_Gregtech_AngleGrinder(), + new Object[] { GregtechToolDictNames.craftingToolAngleGrinder, ToolDictNames.craftingToolFile, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); + + GT_HashSet aWireCutterList = new GT_HashSet(); + //Does not exist prior to 5.09.32, use an empty field if we can't find the existing one. + if (ReflectionUtils.doesFieldExist(GregTech_API.class, "sWireCutterList")) { + Field sWireCutterList = ReflectionUtils.getField(GregTech_API.class, "sWireCutterList"); + try { + if (sWireCutterList != null) { + Object val = sWireCutterList.get(null); + if (val != null && val instanceof GT_HashSet) { + aWireCutterList = (GT_HashSet) val; + } + } + + } + catch (IllegalArgumentException | IllegalAccessException e) { + // Not found, so it's GT 5.09.31 or earlier. + } + } + + // Electric Wire Cutter + GregTech_API.registerTool( + this.addTool(ELECTRIC_SNIPS, "Automatic Snips", "Hand-held electric wire cutter", + new TOOL_Gregtech_ElectricSnips(), + new Object[] { GregtechToolDictNames.craftingToolElectricSnips, ToolDictNames.craftingToolWireCutter, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L) }), aWireCutterList); + + + // Electric Lighter + this.addTool(ELECTRIC_LIGHTER, "Pyromatic 9k", "Electric Fire!", + new TOOL_Gregtech_ElectricLighter(), + new Object[] { GregtechToolDictNames.craftingToolElectricLighter, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); + + // Electric Butcher Knife + this.addTool(ELECTRIC_BUTCHER_KNIFE, "Meat-o-matic", "Electric butcher knife", + new TOOL_Gregtech_ElectricButcherKnife(), + new Object[] { GregtechToolDictNames.craftingToolElectricButcherKnife, ToolDictNames.craftingToolKnife, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java new file mode 100644 index 0000000000..f82e0e5cb0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java @@ -0,0 +1,88 @@ +package gtPlusPlus.xmod.gregtech.common.items.behaviours; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.items.behaviors.Behaviour_None; +import gregtech.common.items.behaviors.Behaviour_Wrench; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; + +public class Behaviour_Choocher +extends Behaviour_None { + private boolean isWrench = true; + private final Behaviour_Wrench wrench = new Behaviour_Wrench(150); + private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250); + private final String mTooltip1 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering1", "Current tool mode: "); + private final String mTooltip2 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick."); + private final String mTooltipH = GT_LanguageManager.addStringLocalization("gt.behaviour.prospectingEx", "Usable for Prospecting large areas."); + private final String mTooltipW = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick."); + + public Behaviour_Choocher() { + + } + + @Override + public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + if (aWorld.isRemote) { + return false; + } + + boolean inWrenchMode; + if (NBTUtils.hasKey(aStack, "aMode")) { + inWrenchMode = NBTUtils.getBoolean(aStack, "aMode"); + } + else { + aStack.getTagCompound().setBoolean("aMode", true); + inWrenchMode = true; + } + + if (aPlayer.isSneaking()){ + boolean aModeNew = Utils.invertBoolean(inWrenchMode); + aStack.getTagCompound().setBoolean("aMode", aModeNew); + PlayerUtils.messagePlayer(aPlayer, "Mode: "+(aModeNew ? "Wrench" : "Hammer")); + return true; + } + else { + if (inWrenchMode){ + return this.wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ); + } + else { + return this.prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ); + } + } + } + + @Override + public List getAdditionalToolTips(final GT_MetaBase_Item aItem, final List aList, final ItemStack aStack) { + + boolean inWrenchMode; + if (NBTUtils.hasKey(aStack, "aMode")) { + inWrenchMode = NBTUtils.getBoolean(aStack, "aMode"); + } + else { + NBTUtils.setBoolean(aStack, "aMode", true); + aStack.getTagCompound().setBoolean("aMode", true); + inWrenchMode = true; + } + + + if (inWrenchMode){ + aList.add(this.mTooltip1+"Wrench"); + aList.add(this.mTooltipW); + } + else { + aList.add(this.mTooltip1+"Prospecting"); + aList.add(this.mTooltipH); + } + aList.add(this.mTooltip2); + + return aList; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java new file mode 100644 index 0000000000..422a29c34e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java @@ -0,0 +1,220 @@ +package gtPlusPlus.xmod.gregtech.common.items.behaviours; + +import java.util.List; + +import codechicken.lib.math.MathHelper; +import gregtech.api.GregTech_API; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_None; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.entity.projectile.EntityLightningAttack; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import ic2.api.item.IElectricItemManager; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class Behaviour_Electric_Lighter extends Behaviour_None { + + private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", + "Can light things on Fire"); + private final String mTooltipUses = GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", + "Remaining Uses:"); + private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", + "Not usable when stacked!"); + + public Behaviour_Electric_Lighter() { + + } + + public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) { + if (!aPlayer.worldObj.isRemote && aStack != null && aStack.stackSize == 1) { + boolean rOutput = false; + if (aEntity instanceof EntityCreeper) { + if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { + GT_Utility.sendSoundToPlayers(aPlayer.worldObj, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, + MathHelper.floor_double(aEntity.posX), MathHelper.floor_double(aEntity.posY), + MathHelper.floor_double(aEntity.posZ)); + ((EntityCreeper) aEntity).func_146079_cb(); + rOutput = true; + } + } + return rOutput; + } else { + return false; + } + } + + public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { + if (aPlayer.isSneaking()) { + Logger.INFO("Changing Mode"); + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); + Logger.INFO("Is currently in Fireball mode? "+aCurrentMode); + boolean aNewMode = Utils.invertBoolean(aCurrentMode); + Logger.INFO("Is now set to Fireball mode? "+aNewMode); + aStack.getTagCompound().setBoolean("aFireballMod", aNewMode); + //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode); + PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter")); + } + else { + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); + if (aCurrentMode) { + //Shoot Lightning Attack + aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F)); + if (!aWorld.isRemote) { + aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ)); + } + } + else { + //Lights Fires Mode + Logger.WARNING("Preparing Lighter a"); + boolean rOutput = false; + ForgeDirection tDirection = ForgeDirection.getOrientation(aSide); + aX += tDirection.offsetX; + aY += tDirection.offsetY; + aZ += tDirection.offsetZ; + if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { + Logger.WARNING("Preparing Lighter b"); + if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { + Logger.WARNING("Preparing Lighter c"); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, + aZ); + aWorld.setBlock(aX, aY, aZ, Blocks.fire); + rOutput = true; + // ItemNBT.setLighterFuel(aStack, tFuelAmount); + return rOutput; + } + } + } + } + } + Logger.WARNING("Preparing Lighter z"); + return false; + } + + public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) { + if (aPlayer.isSneaking()) { + Logger.INFO("Changing Mode"); + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); + Logger.INFO("Is currently in Fireball mode? "+aCurrentMode); + boolean aNewMode = Utils.invertBoolean(aCurrentMode); + Logger.INFO("Is now set to Fireball mode? "+aNewMode); + aStack.getTagCompound().setBoolean("aFireballMode", aNewMode); + //NBTUtils.setBoolean(aStack, "aFireballMode", aNewMode); + PlayerUtils.messagePlayer(aPlayer, "Current Mode: "+EnumChatFormatting.RED+(aNewMode ? "Projectile" : "Fire Starter")); + } + else { + boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); + if (aCurrentMode) { + //Shoot Lightning Attack + aWorld.playSoundAtEntity(aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F)); + if (!aWorld.isRemote) { + aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ)); + } + } + else { + //Lights Fires Mode + Logger.WARNING("Preparing Lighter a"); + boolean rOutput = false; + ForgeDirection tDirection = ForgeDirection.getOrientation(aSide); + aX += tDirection.offsetX; + aY += tDirection.offsetY; + aZ += tDirection.offsetZ; + if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { + Logger.WARNING("Preparing Lighter b"); + if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) { + Logger.WARNING("Preparing Lighter c"); + GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, + aZ); + aWorld.setBlock(aX, aY, aZ, Blocks.fire); + rOutput = true; + // ItemNBT.setLighterFuel(aStack, tFuelAmount); + return rOutput; + } + } + } + } + } + Logger.WARNING("Preparing Lighter z"); + return false; + } + + private boolean prepare(ItemStack aStack) { + if (aStack != null) { + Logger.WARNING("Preparing Lighter 1"); + if (aStack.getItem() instanceof MetaGeneratedGregtechTools) { + Logger.WARNING("Preparing Lighter 2"); + if (ChargingHelper.isItemValid(aStack)) { + Logger.WARNING("Preparing Lighter 3"); + if (aStack.getItem() instanceof IElectricItemManager) { + Logger.WARNING("Preparing Lighter 4"); + IElectricItemManager aItemElec = (IElectricItemManager) aStack.getItem(); + double aCharge = aItemElec.getCharge(aStack); + long aEuCost = 4096 * 2; + if (aCharge >= aEuCost) { + Logger.WARNING("Preparing Lighter 5"); + aItemElec.discharge(aStack, aEuCost, 3, true, true, false); + return true; + } + } + } + } + } + Logger.WARNING("Preparing Lighter 0"); + return false; + } + + private void useUp(ItemStack aStack) { + + } + + public List getAdditionalToolTips(GT_MetaBase_Item aItem, List aList, ItemStack aStack) { + aList.add(this.mTooltip); + int aUses = 0; + if (aStack != null) { + if (aStack.getItem() instanceof MetaGeneratedGregtechTools) { + if (ChargingHelper.isItemValid(aStack)) { + if (aStack.getItem() instanceof IElectricItemManager) { + IElectricItemManager aItemElec = (IElectricItemManager) aStack.getItem(); + double aCharge = aItemElec.getCharge(aStack); + long aEuCost = 4096 * 2; + aUses = (int) (aCharge / aEuCost); + } + } + boolean aCurrentMode; + if (!NBTUtils.hasTagCompound(aStack)) { + NBTUtils.createEmptyTagCompound(aStack); + } + if (NBTUtils.hasKey(aStack, "aFireballMode")) { + aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMode"); + } + else { + aStack.getTagCompound().setBoolean("aFireballMode", false); + aCurrentMode = false; + } + aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter")); + } + + } + + aList.add(this.mTooltipUses + " " + aUses); + aList.add(this.mTooltipUnstackable); + return aList; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java new file mode 100644 index 0000000000..9012bb8cd8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java @@ -0,0 +1,94 @@ +package gtPlusPlus.xmod.gregtech.common.items.behaviours; + +import java.util.List; + +import gregtech.api.enums.SubTag; +import gregtech.api.interfaces.IItemBehaviour; +import gregtech.api.items.GT_MetaBase_Item; +import net.minecraft.dispenser.IBlockSource; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class Behaviour_Grinder implements IItemBehaviour { + + @Override + public boolean onLeftClickEntity(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, Entity var4) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean onItemUse(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, World var4, int var5, int var6, + int var7, int var8, float var9, float var10, float var11) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean onItemUseFirst(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, World var4, int var5, + int var6, int var7, int var8, float var9, float var10, float var11) { + // TODO Auto-generated method stub + return false; + } + + @Override + public ItemStack onItemRightClick(GT_MetaBase_Item var1, ItemStack var2, World var3, EntityPlayer var4) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List getAdditionalToolTips(GT_MetaBase_Item var1, List var2, ItemStack var3) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void onUpdate(GT_MetaBase_Item var1, ItemStack var2, World var3, Entity var4, int var5, boolean var6) { + // TODO Auto-generated method stub + + } + + @Override + public boolean isItemStackUsable(GT_MetaBase_Item var1, ItemStack var2) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean canDispense(GT_MetaBase_Item var1, IBlockSource var2, ItemStack var3) { + // TODO Auto-generated method stub + return false; + } + + @Override + public ItemStack onDispense(GT_MetaBase_Item var1, IBlockSource var2, ItemStack var3) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean hasProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3) { + // TODO Auto-generated method stub + return false; + } + + @Override + public EntityArrow getProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, double var5, + double var7, double var9) { + // TODO Auto-generated method stub + return null; + } + + @Override + public EntityArrow getProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, + EntityLivingBase var5, float var6) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java new file mode 100644 index 0000000000..f320bfc77d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java @@ -0,0 +1,123 @@ +package gtPlusPlus.xmod.gregtech.common.items.behaviours; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.items.GT_MetaBase_Item; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Block_Ores; +import gregtech.common.blocks.GT_TileEntity_Ores; +import gregtech.common.items.behaviors.Behaviour_Prospecting; + +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.IFluidBlock; + +public class Behaviour_Prospecting_Ex +extends Behaviour_Prospecting { + private final int mVanillaCosts; + private final int mEUCosts; + + public Behaviour_Prospecting_Ex(final int aVanillaCosts, final int aEUCosts) { + super(aVanillaCosts, aEUCosts); + this.mVanillaCosts = aVanillaCosts; + this.mEUCosts = aEUCosts; + } + + @Override + public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) { + if (aWorld.isRemote) { + return false; + } + final Block aBlock = aWorld.getBlock(aX, aY, aZ); + if (aBlock == null) { + return false; + } + final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + + + ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + return true; + } + if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt)) ||(aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass)) ) { + if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { + GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ); + int tX = aX; + int tY = aY; + int tZ = aZ; + int tMetaID = 0; + final int tQuality = ((aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0)*3; + + int i = 0; + for (final int j = 6 + tQuality; i < j; i++) { + tX -= ForgeDirection.getOrientation(aSide).offsetX; + tY -= ForgeDirection.getOrientation(aSide).offsetY; + tZ -= ForgeDirection.getOrientation(aSide).offsetZ; + + final Block tBlock = aWorld.getBlock(tX, tY, tZ); + if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) { + GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block."); + break; + } + if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) { + GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block."); + break; + } + if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) { + GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Block."); + break; + } + if (tBlock != aBlock) { + if (i >= 4) { + break; + } + GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Block."); + break; + } + } + final Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide); + i = 0; + for (final int j = 9 + (2 * tQuality); i < j; i++) { + tX = (aX - 4 - tQuality) + tRandom.nextInt(j); + tY = (aY - 4 - tQuality) + tRandom.nextInt(j); + tZ = (aZ - 4 - tQuality) + tRandom.nextInt(j); + final Block tBlock = aWorld.getBlock(tX, tY, tZ); + if ((tBlock instanceof GT_Block_Ores)) { + final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) { + final Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; + if ((tMaterial != null) && (tMaterial != Materials._NULL)) { + GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore."); + return true; + } + } + } else { + tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); + tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { + GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore."); + return true; + } + } + } + GT_Utility.sendChatToPlayer(aPlayer, "No Ores found."); + } + return true; + } + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java new file mode 100644 index 0000000000..7af057bc59 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java @@ -0,0 +1,40 @@ +package gtPlusPlus.xmod.gregtech.common.items.covers; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class MetaItemCoverCasings extends MetaCustomCoverItem { + + public MetaItemCoverCasings() { + super(CORE.MODID, Textures.BlockIcons.MACHINECASINGS_SIDE.length, "Gt Machine Casings", Textures.BlockIcons.MACHINECASINGS_SIDE, null); + } + + @Override + public void registerIcons(IIconRegister reg) { + for (int i = 0; i < icons.length; i++) { + this.icons[i] = reg.registerIcon(CORE.MODID+":"+"covers/"+i); + } + } + + public boolean hide() { + return false; + } + + @Override + public IIcon getIconFromDamage(int meta) { + return this.icons[MathUtils.balance(meta, 0, 15)]; + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + return EnumChatFormatting.LIGHT_PURPLE + GT_Values.VOLTAGE_NAMES[MathUtils.balance(tItem.getItemDamage(), 0, GT_Values.VOLTAGE_NAMES.length-1)]+" Machine Plate Cover"; //super.getItemStackDisplayName(tItem); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java new file mode 100644 index 0000000000..49537ab559 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -0,0 +1,517 @@ +package gtPlusPlus.xmod.gregtech.common.render; + +import java.io.*; +import java.net.URL; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +import org.apache.commons.io.IOUtils; +import org.lwjgl.opengl.GL11; + +import com.mojang.authlib.GameProfile; + +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.proxy.ClientProxy; +import gtPlusPlus.core.util.data.AES; +import gtPlusPlus.core.util.data.FileUtils; +import gtPlusPlus.core.util.math.MathUtils; +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.entity.RenderPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.RenderPlayerEvent; + +public class GTPP_CapeRenderer extends RenderPlayer { + + private static final ResourceLocation[] mCapes = { + new ResourceLocation("miscutils:textures/OrangeHD.png"), + new ResourceLocation("miscutils:textures/FancyCapeHD.png"), + new ResourceLocation("miscutils:textures/TesterCapeHD.png"), + new ResourceLocation("miscutils:textures/PatreonCapeHD.png"), + new ResourceLocation("miscutils:textures/DevCapeHD.png"), + }; + + private final boolean mInit; + + public GTPP_CapeRenderer() { + mInit = init(); + } + + private final boolean init() { + if (mInit) { + return false; + } + return CapeUtils.init(); + } + + private static boolean hasResourceChecked = false; + private static boolean hasSetRenderer = false; + private boolean hasCape = false; + private ResourceLocation tResource = null; + + public synchronized void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) { + + // Check we have set Render Manager + if (this.renderManager == null) { + hasSetRenderer = false; + } + + // Set Render Manager + if (!hasSetRenderer) { + if (RenderManager.instance != null) { + setRenderManager(RenderManager.instance); + hasSetRenderer = true; + } + } + + // Actually Render + if (hasSetRenderer) { + + // We have capes turned off, so let's not render. + if (!ConfigSwitches.enableCustomCapes) { + return; + } + + // We have already checked if this player has a cape, but since they do not, we best not render. + if (hasResourceChecked) { + if (!hasCape && !CORE.DEVENV) { + return; + } + } + + // Allocate client player object + AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer; + + // Make sure we don't keep checking on clients who dont have capes. + if (!hasResourceChecked) { + + // Get players UUID + String aPlayerUUID = aPlayer != null ? aPlayer.getGameProfile().getId().toString() : "BAD"; + + // If for whatever reason this fails, we just exit early. + if (aPlayerUUID.equals("BAD")) { + return; + } + + // Automatically allocate a Dev cape while in Dev mode. + if (tResource == null && CORE.DEVENV) { + tResource = mCapes[4]; + hasCape = true; + } + + String aPlayerName = ClientProxy.playerName; + + // Check cape lists for the cape this player owns. + if (!hasCape) { + for (Pair aData : CapeUtils.mOrangeCapes) { + if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { + tResource = mCapes[0]; + hasCape = true; + break; + } + } + } + if (!hasCape) { + for (Pair aData : CapeUtils.mMiscCapes) { + if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { + tResource = mCapes[1]; + hasCape = true; + break; + } + } + } + if (!hasCape) { + for (Pair aData : CapeUtils.mBetaTestCapes) { + if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { + tResource = mCapes[2]; + hasCape = true; + break; + } + } + } + if (!hasCape) { + for (Pair aData : CapeUtils.mPatreonCapes) { + if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { + tResource = mCapes[3]; + hasCape = true; + break; + } + } + } + if (!hasCape) { + for (Pair aData : CapeUtils.mDevCapes) { + if (aData.getKey().equals(aPlayerUUID) || aPlayerName .equals(aData.getValue())) { + tResource = mCapes[4]; + hasCape = true; + break; + } + } + } + hasResourceChecked = true; + } + + if (hasResourceChecked) { + // We have met all the conditions, let's render that cape. + renderCapeOnPlayer(aEvent, aPlayer); + } + } + + } + + private final boolean renderCapeOnPlayer(RenderPlayerEvent.Specials.Pre aEvent, AbstractClientPlayer aPlayer) { + float aPartialTicks = aEvent.partialRenderTick; + try { + if (tResource == null && CORE.DEVENV) { + tResource = mCapes[3]; + } + + // If player is invisible, don't render. + if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible() + || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) { + aEvent.setCanceled(true); + return false; + } + + if ((tResource != null) && (!aPlayer.getHideCape())) { + bindTexture(tResource); + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 0.0F, 0.125F); + double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks + - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); + double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks + - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); + double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks + - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); + float f6 = aPlayer.prevRenderYawOffset + + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; + double d3 = MathHelper.sin(f6 * CORE.PI / 180.0F); + double d4 = -MathHelper.cos(f6 * CORE.PI / 180.0F); + float f7 = (float) d1 * 10.0F; + float f8 = (float) (d0 * d3 + d2 * d4) * 100.0F; + float f9 = (float) (d0 * d4 - d2 * d3) * 100.0F; + if (f7 < -6.0F) { + f7 = -6.0F; + } + if (f7 > 32.0F) { + f7 = 32.0F; + } + if (f8 < 0.0F) { + f8 = 0.0F; + } + float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks; + f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) + * 32.0F * f10; + if (aPlayer.isSneaking()) { + f7 += 25.0F; + } + GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + ((ModelBiped) this.mainModel).renderCloak(0.0625F); + GL11.glPopMatrix(); + return true; + } + } catch (Throwable e) { + + } + return false; + } + + @SuppressWarnings("unused") + @Deprecated + /** + * Should be able to get the username from a UUID + * @param name - Players Name + * @param uuid - Players known UUID + * @return - The newest Player name + */ + private String getPlayerName(String name, String uuid) { + try { + Logger.WORLD("[Capes++] Trying to UUID check " + name + "."); + if (uuid != null) { + if (uuid.length() > 0) { + UUID g = UUID.fromString(uuid); + if (g != null) { + Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); + GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g); + if (profile != null) { + Logger.WARNING("[Capes++] Found for UUID check: " + profile.getName() + "."); + return profile.getName(); + } + } else { + g = UUID.fromString(uuid.replace("-", "")); + if (g != null) { + Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); + GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g); + if (profile != null) { + Logger.WARNING("[Capes++] Found for UUID check 2: " + profile.getName() + "."); + return profile.getName(); + } + } + } + } + } + if (name != null) { + if (name.length() > 0) { + Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + "."); + GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name); + if (profile != null) { + Logger.WARNING("[Capes++] Found for name check: " + profile.getName() + "."); + return profile.getName(); + } + } + } + Logger.WORLD("[Capes++] Failed UUID check for " + name + "."); + } catch (Throwable t) { + } + return name; + } + + + + private static class CapeUtils { + + private static char SPLIT_CHARACTER = '§'; + private static AES sAES; + + // UUID - Username + private static final AutoMap> mOrangeCapes = new AutoMap>(); + private static final AutoMap> mMiscCapes = new AutoMap>(); + private static final AutoMap> mBetaTestCapes = new AutoMap>(); + private static final AutoMap> mPatreonCapes = new AutoMap>(); + private static final AutoMap> mDevCapes = new AutoMap>(); + + private static final boolean init() { + CapeUtils.handleOldCapeCache(); + if (CORE.DEVENV) { + return true; + } + try { + if (shouldDownloadCapeList()) { + downloadCapeList(); + } + } + catch (Exception e) { + return false; + } + writeCacheToMaps(); + return true; + } + + + private static boolean shouldDownloadCapeList() { + if (!doesCapeCacheExistLocally()) { + return true; + } + if (isCapeCacheWeekOld()) { + return true; + } + return false; + } + + private static final boolean isCapeCacheWeekOld() { + if (!doesCapeCacheExistLocally()) { + return true; + } + else { + File dat = CapeUtils.getCapeCache(); + Date dateLastMod = new Date(dat.lastModified()); + Date dateNow = new Date(System.currentTimeMillis() - (7l * 24 * 60 * 60 * 1000)); + if (dateLastMod.before(dateNow)) { + return true; + } + } + return false; + } + + private static final void downloadCapeList() { + try { + File dat = getCapeCache(); + File temp = allocateTempFile(); + InputStream inputStream = new URL("https://alkcorp.overminddl1.com/CapeCache.dat").openStream(); + FileOutputStream fileOS = new FileOutputStream(temp); + IOUtils.copy(inputStream, fileOS); + if (isDownloadedCapeListBigger(temp)) { + fileOS = new FileOutputStream(dat); + IOUtils.copy(inputStream, fileOS); + } + } catch (Throwable t) { + Logger.INFO("Unable to download GT++ cape list."); + } + } + + private static final boolean isDownloadedCapeListBigger(File aFile) { + double aExistingFileSize = (doesCapeCacheExistLocally() ? getCapeCache().length() : 0); + double aNewFileSize = aFile.length(); + if (aNewFileSize > aExistingFileSize) { + return true; + } + return false; + } + + private static void handleOldCapeCache() { + File aCacheFile = FileUtils.getFile("GTPP", "dat"); + if (FileUtils.doesFileExist(aCacheFile)) { + aCacheFile.delete(); + } + } + + private static final boolean doesCapeCacheExistLocally() { + File aCacheFile = FileUtils.getFile("CapeCache", "dat"); + if (FileUtils.doesFileExist(aCacheFile)) { + return true; + } + return false; + } + + private static final File getCapeCache() { + File aCacheFile = FileUtils.getFile("CapeCache", "dat"); + if (FileUtils.doesFileExist(aCacheFile)) { + FileUtils.createFile(aCacheFile); + } + return aCacheFile; + } + + public static final List getDataFromCache(){ + File aCacheFile = getCapeCache(); + List aCache = FileUtils.readLines(aCacheFile); + if (aCache != null && !aCache.isEmpty()) { + return aCache; + } + return new AutoMap(); + } + + private static final File allocateTempFile() { + File tempFile = null; + try { + tempFile = File.createTempFile("gtpp-", null); + } + catch (IOException e) { + e.printStackTrace(); + } + if (tempFile == null) { + tempFile = FileUtils.createFile("", "gtpp-"+MathUtils.randInt(Short.MAX_VALUE, (Integer.MAX_VALUE/2)), "tmp"); + } + tempFile.deleteOnExit(); + return tempFile; + } + + + public static final void writeCacheToMaps() { + List aCacheData = getDataFromCache(); + if (aCacheData != null && !aCacheData.isEmpty()) { + if (sAES == null) { + sAES = new AES(); + } + AutoMap aDecodedData = new AutoMap(); + for (String aToDecode : aCacheData) { + aDecodedData.put(sAES.decode(aToDecode)); + } + if (!aDecodedData.isEmpty()) { + AutoMap> aCapeType1 = new AutoMap>(); + AutoMap> aCapeType2 = new AutoMap>(); + AutoMap> aCapeType3 = new AutoMap>(); + AutoMap> aCapeType4 = new AutoMap>(); + AutoMap> aCapeType5 = new AutoMap>(); + boolean didProcessStringData = false; + Logger.INFO("Decoded String Count: "+aDecodedData.size()); + for (String aToSplit : aDecodedData) { + String[] aSplitData = aToSplit.split(""+SPLIT_CHARACTER); + if (aSplitData != null && aSplitData.length >= 2) { + if (aSplitData[0] != null) { + Integer aCapeTypeID2 = Integer.parseInt(aSplitData[0]); + if (aCapeTypeID2 != null) { + int aCapeTypeID = aCapeTypeID2; + Pair aFinalString = new Pair("UUID: "+aSplitData[1], "Username: "+(aSplitData[2] != null && aSplitData[0].length() > 0 ? aSplitData[2] : "Not Specified")); + Logger.INFO("Cape Type: "+aCapeTypeID); + switch (aCapeTypeID) { + case 0: + aCapeType1.add(aFinalString); + Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType1.size()+" users."); + break; + case 1: + aCapeType2.add(aFinalString); + Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType2.size()+" users."); + break; + case 2: + aCapeType3.add(aFinalString); + Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType3.size()+" users."); + break; + case 3: + aCapeType4.add(aFinalString); + Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType4.size()+" users."); + break; + case 4: + aCapeType5.add(aFinalString); + Logger.INFO("Added user to map "+aCapeTypeID+", map now holds "+aCapeType5.size()+" users."); + break; + default: + break; + } + } + } + } + } + if (!aCapeType1.isEmpty() || !aCapeType2.isEmpty() || !aCapeType3.isEmpty() || !aCapeType4.isEmpty() || !aCapeType5.isEmpty()) { + didProcessStringData = true; + } + else { + // did not process any data + } + if (didProcessStringData) { + if (!aCapeType1.isEmpty()) { + for (Pair aUser : aCapeType1) { + Logger.INFO("Adding Generic cape for "+aUser.getKey()); + mOrangeCapes.add(aUser); + } + } + if (!aCapeType2.isEmpty()) { + for (Pair aUser : aCapeType2) { + Logger.INFO("Adding Blue cape for "+aUser.getKey()); + mMiscCapes.add(aUser); + } + } + if (!aCapeType3.isEmpty()) { + for (Pair aUser : aCapeType3) { + Logger.INFO("Adding Beta cape for "+aUser.getKey()); + mBetaTestCapes.add(aUser); + } + } + if (!aCapeType4.isEmpty()) { + for (Pair aUser : aCapeType4) { + Logger.INFO("Adding Patreon cape for "+aUser.getKey()); + mPatreonCapes.add(aUser); + } + } + if (!aCapeType5.isEmpty()) { + for (Pair aUser : aCapeType5) { + Logger.INFO("Adding Dev cape for "+aUser.getKey()); + mDevCapes.add(aUser); + } + } + } + } + else { + // No data decoded + } + } + else { + // Nothing was cached? + } + } + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java new file mode 100644 index 0000000000..1561ba9f73 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java @@ -0,0 +1,94 @@ +package gtPlusPlus.xmod.gregtech.common.render; + +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; +import gregtech.common.items.GT_VolumetricFlask; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import ic2.core.util.DrawUtil; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.fluids.FluidStack; +import org.lwjgl.opengl.GL11; + +@SideOnly(cpw.mods.fml.relauncher.Side.CLIENT) +public final class GTPP_FlaskRenderer implements net.minecraftforge.client.IItemRenderer { + + public GTPP_FlaskRenderer() { + MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_8k.getItem(), this); + MinecraftForgeClient.registerItemRenderer(GregtechItemList.VOLUMETRIC_FLASK_32k.getItem(), this); + } + + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + return type != ItemRenderType.FIRST_PERSON_MAP; + } + + + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) { + return type == ItemRenderType.ENTITY; + } + + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + GT_VolumetricFlask cell = (GT_VolumetricFlask) item.getItem(); + + int aType = cell.getMaxCapacity() == 8000 ? 0 : 1; + IIcon icon = item.getIconIndex(); + GL11.glEnable(3042); + GL11.glEnable(3008); + if (type.equals(ItemRenderType.ENTITY)) { + GL11.glRotated(180.0D, 0.0D, 0.0D, 1.0D); + GL11.glRotated(90.0D, 0.0D, 1.0D, 0.0D); + GL11.glTranslated(-0.5D, -0.6D, 0.0D); + } else if (type.equals(ItemRenderType.EQUIPPED_FIRST_PERSON)) { + GL11.glTranslated(1.0D, 1.0D, 0.0D); + GL11.glRotated(180.0D, 0.0D, 0.0D, 1.0D); + } else if (type.equals(ItemRenderType.EQUIPPED)) { + GL11.glRotated(180.0D, 0.0D, 0.0D, 1.0D); + GL11.glTranslated(-1.0D, -1.0D, 0.0D); + } + + FluidStack fs = cell.getFluid(item); + if (fs != null) { + IIcon iconWindow = cell.iconWindow; + IIcon fluidicon = fs.getFluid().getIcon(fs); + int fluidColor = fs.getFluid().getColor(fs); + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); + GL11.glBlendFunc(0, 1); + if (type.equals(ItemRenderType.INVENTORY)) { + DrawUtil.renderIcon(iconWindow, 16.0D, 0.0D, 0.0F, 0.0F, -1.0F); + } else { + DrawUtil.renderIcon(iconWindow, 1.0D, -0.001D, 0.0F, 0.0F, 1.0F); + DrawUtil.renderIcon(iconWindow, 1.0D, -0.0615D, 0.0F, 0.0F, -1.0F); + } + + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); + GL11.glBlendFunc(770, 771); + GL11.glDepthFunc(514); + GL11.glColor3ub((byte) (fluidColor >> 16), (byte) (fluidColor >> 8), (byte) fluidColor); + if (type.equals(ItemRenderType.INVENTORY)) { + DrawUtil.renderIcon(fluidicon, 16.0D, 0.0D, 0.0F, 0.0F, -1.0F); + } else { + DrawUtil.renderIcon(fluidicon, 1.0D, -0.001D, 0.0F, 0.0F, 1.0F); + DrawUtil.renderIcon(fluidicon, 1.0D, -0.0615D, 0.0F, 0.0F, -1.0F); + } + + GL11.glColor3ub((byte) -1, (byte) -1, (byte) -1); + GL11.glDepthFunc(515); + } + + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); + GL11.glBlendFunc(770, 771); + if (type.equals(ItemRenderType.INVENTORY)) { + DrawUtil.renderIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); + } else { + ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 0.0625F); + } + GL11.glDisable(3008); + GL11.glDisable(3042); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java new file mode 100644 index 0000000000..35d78008c5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java @@ -0,0 +1,659 @@ +package gtPlusPlus.xmod.gregtech.common.render; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.client.registry.RenderingRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity; +import gregtech.api.interfaces.tileentity.ITexturedTileEntity; +import gregtech.common.blocks.GT_Block_Machines; +import gregtech.common.render.GT_Renderer_Block; +import gtPlusPlus.xmod.gregtech.common.blocks.GTPP_Block_Machines; +import gtPlusPlus.xmod.gregtech.common.helpers.GT_MethodHelper; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; + +public class GTPP_Render_MachineBlock extends GT_Renderer_Block { + + public static GTPP_Render_MachineBlock INSTANCE; + public final int mRenderID = RenderingRegistry.getNextAvailableRenderId(); + + public GTPP_Render_MachineBlock() { + INSTANCE = this; + RenderingRegistry.registerBlockHandler(this); + } + + private static ITexture[] getTexture(IMetaTileEntity arg0, int arg1, int arg2, int arg3, boolean arg4, boolean arg5) { + IGregTechTileEntity arg0b = arg0.getBaseMetaTileEntity(); + return arg0.getTexture(arg0b, (byte) arg1, (byte) arg2, (byte) arg3, arg4, arg5); + } + + private static void renderNormalInventoryMetaTileEntity(Block aBlock, int aMeta, RenderBlocks aRenderer) { + if (aMeta > 0 && aMeta < GregTech_API.METATILEENTITIES.length) { + IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aMeta]; + if (tMetaTileEntity != null) { + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + if (tMetaTileEntity.getBaseMetaTileEntity() instanceof IPipeRenderedTileEntity) { + float tThickness = ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity()) + .getThickNess(); + float sp = (1.0F - tThickness) / 2.0F; + aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); + renderNegativeYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 0, 9, -1, false, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); + renderPositiveYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 1, 9, -1, false, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); + renderNegativeZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 2, 9, -1, false, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); + renderPositiveZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 3, 9, -1, false, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); + renderNegativeXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 4, 9, -1, true, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); + renderPositiveXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 5, 9, -1, true, false), + true); + Tessellator.instance.draw(); + } else { + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); + renderNegativeYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 0, 4, -1, true, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); + renderPositiveYFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 1, 4, -1, true, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); + renderNegativeZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 2, 4, -1, true, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); + renderPositiveZFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 3, 4, -1, true, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); + renderNegativeXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 4, 4, -1, true, false), + true); + Tessellator.instance.draw(); + Tessellator.instance.startDrawingQuads(); + Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); + renderPositiveXFacing((IBlockAccess) null, aRenderer, aBlock, 0, 0, 0, + getTexture(tMetaTileEntity, 5, 4, -1, true, false), + true); + Tessellator.instance.draw(); + } + + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } + } + } + + public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, + RenderBlocks aRenderer) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + + return tTileEntity instanceof ITexturedTileEntity + ? renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, + new ITexture[][]{GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 0), + GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 1), + GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 2), + GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 3), + GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 4), + GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 5)}) + : false; + } + + public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, + RenderBlocks aRenderer, ITexture[][] aTextures) { + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); + return true; + } + + public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, + IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) { + byte aConnections = aTileEntity.getConnections(); + if ((aConnections & 192) != 0) { + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); + } else { + float tThickness = aTileEntity.getThickNess(); + if (tThickness >= 0.99F) { + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); + } else { + float sp = (1.0F - tThickness) / 2.0F; + byte tConnections = 0; + + for (byte tIsCovered = 0; tIsCovered < 6; ++tIsCovered) { + if ((aConnections & 1 << tIsCovered) != 0) { + tConnections = (byte) (tConnections | 1 << (tIsCovered + 2) % 6); + } + } + + boolean[] arg14 = new boolean[6]; + + for (byte tIcons = 0; tIcons < 6; ++tIcons) { + arg14[tIcons] = aTileEntity.getCoverIDAtSide(tIcons) != 0; + } + + if (arg14[0] && arg14[1] && arg14[2] && arg14[3] && arg14[4] && arg14[5]) { + return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); + } else { + ITexture[][] arg15 = new ITexture[6][]; + ITexture[][] tCovers = new ITexture[6][]; + + for (byte i = 0; i < 6; ++i) { + tCovers[i] = GT_MethodHelper.getTexture((TileEntity) aTileEntity, aBlock, i); + arg15[i] = aTileEntity.getTextureUncovered(i); + } + + if (tConnections == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + } else if (tConnections == 3) { + aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + if (!arg14[4]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + } + + if (!arg14[5]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + } + } else if (tConnections == 12) { + aBlock.setBlockBounds(sp, 0.0F, sp, sp + tThickness, 1.0F, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + if (!arg14[0]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + } + + if (!arg14[1]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + } + } else if (tConnections == 48) { + aBlock.setBlockBounds(sp, sp, 0.0F, sp + tThickness, sp + tThickness, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + if (!arg14[2]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + } + + if (!arg14[3]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + } + } else { + if ((tConnections & 1) == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + } else { + aBlock.setBlockBounds(0.0F, sp, sp, sp, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + if (!arg14[4]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + } + } + + if ((tConnections & 2) == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + } else { + aBlock.setBlockBounds(sp + tThickness, sp, sp, 1.0F, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + if (!arg14[5]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + } + } + + if ((tConnections & 4) == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + } else { + aBlock.setBlockBounds(sp, 0.0F, sp, sp + tThickness, sp, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + if (!arg14[0]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + } + } + + if ((tConnections & 8) == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + } else { + aBlock.setBlockBounds(sp, sp + tThickness, sp, sp + tThickness, 1.0F, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + if (!arg14[1]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + } + } + + if ((tConnections & 16) == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + } else { + aBlock.setBlockBounds(sp, sp, 0.0F, sp + tThickness, sp + tThickness, sp); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + if (!arg14[2]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[2], false); + } + } + + if ((tConnections & 32) == 0) { + aBlock.setBlockBounds(sp, sp, sp, sp + tThickness, sp + tThickness, sp + tThickness); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + } else { + aBlock.setBlockBounds(sp, sp, sp + tThickness, sp + tThickness, sp + tThickness, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[1], false); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[5], false); + if (!arg14[3]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, arg15[3], false); + } + } + } + + if (arg14[0]) { + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); + if (!arg14[2]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); + } + + if (!arg14[3]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); + } + + if (!arg14[4]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); + } + + if (!arg14[5]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[0], false); + } + } + + if (arg14[1]) { + aBlock.setBlockBounds(0.0F, 0.875F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); + if (!arg14[2]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); + } + + if (!arg14[3]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); + } + + if (!arg14[4]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); + } + + if (!arg14[5]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[1], false); + } + } + + if (arg14[2]) { + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.125F); + aRenderer.setRenderBoundsFromBlock(aBlock); + if (!arg14[0]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); + } + + if (!arg14[1]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); + } + + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); + if (!arg14[4]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); + } + + if (!arg14[5]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[2], false); + } + } + + if (arg14[3]) { + aBlock.setBlockBounds(0.0F, 0.0F, 0.875F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + if (!arg14[0]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); + } + + if (!arg14[1]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); + } + + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); + if (!arg14[4]) { + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); + } + + if (!arg14[5]) { + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[3], false); + } + } + + if (arg14[4]) { + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 0.125F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + if (!arg14[0]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); + } + + if (!arg14[1]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); + } + + if (!arg14[2]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); + } + + if (!arg14[3]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); + } + + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[4], false); + } + + if (arg14[5]) { + aBlock.setBlockBounds(0.875F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + if (!arg14[0]) { + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + } + + if (!arg14[1]) { + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + } + + if (!arg14[2]) { + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + } + + if (!arg14[3]) { + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + } + + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, tCovers[5], false); + } + + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + return true; + } + } + } + } + + public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, + int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0)) { + return; + } + + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); + } + + if (aIcon != null) { + for (int i = 0; i < aIcon.length; ++i) { + if (aIcon[i] != null) { + aIcon[i].renderYNeg(aRenderer, aBlock, aX, aY, aZ); + } + } + } + + aRenderer.flipTexture = false; + } + + public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, + int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1)) { + return; + } + + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); + } + + if (aIcon != null) { + for (int i = 0; i < aIcon.length; ++i) { + if (aIcon[i] != null) { + aIcon[i].renderYPos(aRenderer, aBlock, aX, aY, aZ); + } + } + } + + aRenderer.flipTexture = false; + } + + public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, + int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2)) { + return; + } + + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); + } + + aRenderer.flipTexture = !aFullBlock; + if (aIcon != null) { + for (int i = 0; i < aIcon.length; ++i) { + if (aIcon[i] != null) { + aIcon[i].renderZNeg(aRenderer, aBlock, aX, aY, aZ); + } + } + } + + aRenderer.flipTexture = false; + } + + public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, + int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3)) { + return; + } + + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); + } + + if (aIcon != null) { + for (int i = 0; i < aIcon.length; ++i) { + if (aIcon[i] != null) { + aIcon[i].renderZPos(aRenderer, aBlock, aX, aY, aZ); + } + } + } + + aRenderer.flipTexture = false; + } + + public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, + int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4)) { + return; + } + + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); + } + + if (aIcon != null) { + for (int i = 0; i < aIcon.length; ++i) { + if (aIcon[i] != null) { + aIcon[i].renderXNeg(aRenderer, aBlock, aX, aY, aZ); + } + } + } + + aRenderer.flipTexture = false; + } + + public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, + int aZ, ITexture[] aIcon, boolean aFullBlock) { + if (aWorld != null) { + if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5)) { + return; + } + + Tessellator.instance + .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); + } + + aRenderer.flipTexture = !aFullBlock; + if (aIcon != null) { + for (int i = 0; i < aIcon.length; ++i) { + if (aIcon[i] != null) { + aIcon[i].renderXPos(aRenderer, aBlock, aX, aY, aZ); + } + } + } + + aRenderer.flipTexture = false; + } + + public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { + aMeta += 30400; + if (aBlock instanceof GT_Block_Machines || aBlock instanceof GTPP_Block_Machines) { + if (aMeta > 0 && aMeta < GregTech_API.METATILEENTITIES.length + && GregTech_API.METATILEENTITIES[aMeta] != null + && !GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer)) { + renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); + } + } + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + } + + public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, + RenderBlocks aRenderer) { + TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return aTileEntity == null + ? false + : (aTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null + && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity().renderInWorld(aWorld, aX, aY, aZ, + aBlock, aRenderer) + ? true + : (aTileEntity instanceof IPipeRenderedTileEntity + ? renderPipeBlock(aWorld, aX, aY, aZ, aBlock, + (IPipeRenderedTileEntity) aTileEntity, aRenderer) + : renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer))); + } + + public boolean shouldRender3DInInventory(int aModel) { + return true; + } + + public int getRenderId() { + return this.mRenderID; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java new file mode 100644 index 0000000000..e53a7e4738 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/requirements/RequirementsBasicCubic.java @@ -0,0 +1,11 @@ +package gtPlusPlus.xmod.gregtech.common.requirements; + +import gtPlusPlus.xmod.gregtech.api.objects.MultiblockRequirements; + +public class RequirementsBasicCubic extends MultiblockRequirements { + + public RequirementsBasicCubic( ) { + super(0, null); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java new file mode 100644 index 0000000000..9c856840b0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java @@ -0,0 +1,730 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.automation; + +import static gtPlusPlus.core.lib.CORE.*; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IDigitalChest; +import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.*; + +public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_BasicTank { + + public static int TESSERACT_ENERGY_COST_DIMENSIONAL = 512; + public static int TESSERACT_ENERGY_COST = 128; + public byte isWorking = 0; + public int oFrequency = 0; + public int mNeededEnergy = 0; + public int mFrequency = 0; + public UUID mOwner; + + public GT_MetaTileEntity_TesseractGenerator(final int aID, final String aName, final String aNameRegional, + final int aTier) { + super(aID, aName, aNameRegional, aTier, 3, ""); + } + + public GT_MetaTileEntity_TesseractGenerator(final String aName, final int aTier, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_TesseractGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public boolean isTransformerUpgradable() { + return true; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isEnetOutput() { + return false; + } + + @Override + public boolean isInputFacing(final byte aSide) { + return true; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean isValidSlot(final int aIndex) { + return false; + } + + @Override + public long getMinimumStoredEU() { + return this.getBaseMetaTileEntity().getEUCapacity() / 2; + } + + @Override + public long maxEUInput() { + return 512; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxEUStore() { + return 512 * 32; + } + + @Override + public long maxSteamStore() { + return this.maxEUStore(); + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean ownerControl() { + return true; + } + + @Override + public int getProgresstime() { + return (TesseractHelper.getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), + this.mFrequency) == this) && (this.isWorking >= 20) ? 999 : 0; + } + + @Override + public int maxProgresstime() { + return 1000; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mFrequency", this.mFrequency); + if (mOwner != null) + aNBT.setString("mOwner", mOwner.toString()); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mFrequency = aNBT.getInteger("mFrequency"); + try { + this.mOwner = UUID.fromString(aNBT.getString("mOnwer")); + } + catch (IllegalArgumentException i){ + + } + } + + @Override + public void onConfigLoad(final GT_Config aConfig) { + int J = 1; + if (CORE.GTNH) { + J = 4; + } + TESSERACT_ENERGY_COST = 128*J; + TESSERACT_ENERGY_COST_DIMENSIONAL = 512*J; + } + + @Override + public void onServerStart() { + sTesseractGeneratorOwnershipMap.clear(); + sTesseractTerminalOwnershipMap.clear(); + } + + public void onServerStop() { + sTesseractGeneratorOwnershipMap.clear(); + sTesseractTerminalOwnershipMap.clear(); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer, + final byte aSide, final float aX, final float aY, final float aZ) { + + if (this.mOwner == null) { + if (this.getBaseMetaTileEntity().getOwnerName() != null + && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { + if (this.getBaseMetaTileEntity().getOwnerName().toLowerCase() + .equals(aPlayer.getDisplayName().toLowerCase())) { + this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + } + } + } + + if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { + if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { + final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { + case 0: + Logger.WARNING("Freq. -1 | " + this.mFrequency); + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency -= 1; + + break; + case 1: + Logger.WARNING("Freq. +1 | " + this.mFrequency); + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency += 1; + default: + // Utils.LOG_WARNING("Did not click the correct place."); + break; + } + if (getGeneratorEntity(this.mFrequency) != null && getGeneratorEntity(this.mFrequency) != this){ + GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)"); + } + else { + GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency); + } + } else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0){ + GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Generator to configure."); + } + } + + return true; + } + + @Override + public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, + final float aZ) { + if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { + if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { + final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { + case 0: + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency -= 64; + break; + case 1: + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency += 64; + break; + case 2: + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency -= 512; + break; + case 3: + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency += 512; + } + if (getGeneratorEntity(this.mFrequency) != null && getGeneratorEntity(this.mFrequency) != this){ + GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)"); + } + else { + GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency); + } + } + } else { + GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Generator to configure."); + } + } + + public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public String[] getInfoData() { + final TileEntity tTileEntity = this.getBaseMetaTileEntity() + .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((tTileEntity instanceof IGregTechDeviceInformation)) + && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + return ((IGregTechDeviceInformation) tTileEntity).getInfoData(); + } + return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, + (getGeneratorEntity() == this) && (this.isWorking >= 20) ? "Active" : "Inactive" }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + public boolean isSendingInformation() { + final TileEntity tTileEntity = this.getBaseMetaTileEntity() + .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((tTileEntity instanceof IGregTechDeviceInformation))) { + return ((IGregTechDeviceInformation) tTileEntity).isGivingInformation(); + } + return false; + } + + @Override + public boolean isDigitalChest() { + final TileEntity tTileEntity = this.getBaseMetaTileEntity() + .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((tTileEntity instanceof IDigitalChest))) { + return ((IDigitalChest) tTileEntity).isDigitalChest(); + } + return false; + } + + @Override + public ItemStack[] getStoredItemData() { + final TileEntity tTileEntity = this.getBaseMetaTileEntity() + .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((tTileEntity instanceof IDigitalChest))) { + return ((IDigitalChest) tTileEntity).getStoredItemData(); + } + return new ItemStack[] {}; + } + + @Override + public void setItemCount(final int aCount) { + final TileEntity tTileEntity = this.getBaseMetaTileEntity() + .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((tTileEntity instanceof IDigitalChest))) { + ((IDigitalChest) tTileEntity).setItemCount(aCount); + } + } + + @Override + public int getMaxItemCount() { + final TileEntity tTileEntity = this.getBaseMetaTileEntity() + .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((tTileEntity instanceof IDigitalChest))) { + return ((IDigitalChest) tTileEntity).getMaxItemCount(); + } + return 0; + } + + @Override + public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.isItemValidForSlot(aIndex, aStack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int aSide) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return new int[0]; + } + if ((tTileEntity instanceof ISidedInventory)) { + return ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(aSide); + } + final int[] rArray = new int[this.getSizeInventory()]; + for (int i = 0; i < this.getSizeInventory(); i++) { + rArray[i] = i; + } + return rArray; + } + + @Override + public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + if ((tTileEntity instanceof ISidedInventory)) { + return ((ISidedInventory) tTileEntity).canInsertItem(aIndex, aStack, aSide); + } + return true; + } + + @Override + public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + if ((tTileEntity instanceof ISidedInventory)) { + return ((ISidedInventory) tTileEntity).canExtractItem(aIndex, aStack, aSide); + } + return true; + } + + @Override + public int getSizeInventory() { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int aIndex) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.getStackInSlot(aIndex); + } + + @Override + public void setInventorySlotContents(final int aIndex, final ItemStack aStack) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return; + } + tTileEntity.setInventorySlotContents(aIndex, aStack); + } + + @Override + public ItemStack decrStackSize(final int aIndex, final int aAmount) { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.decrStackSize(aIndex, aAmount); + } + + @Override + public String getInventoryName() { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return ""; + } + return tTileEntity.getInventoryName(); + } + + @Override + public int getInventoryStackLimit() { + final IInventory tTileEntity = this.getBaseMetaTileEntity() + .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.getInventoryStackLimit(); + } + + @Override + public boolean canFill(final ForgeDirection aSide, final Fluid aFluid) { + final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() + .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.canFill(aSide, aFluid); + } + + @Override + public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid) { + final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() + .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.canDrain(aSide, aFluid); + } + + @Override + public FluidTankInfo[] getTankInfo(final ForgeDirection aSide) { + final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() + .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return new FluidTankInfo[0]; + } + return tTileEntity.getTankInfo(aSide); + } + + @Override + public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill) { + final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() + .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.fill(aDirection, aFluid, doFill); + } + + @Override + public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain) { + final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() + .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.drain(aDirection, maxDrain, doDrain); + } + + @Override + public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) { + final IFluidHandler tTileEntity = this.getBaseMetaTileEntity() + .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing()); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.drain(aSide, aFluid, doDrain); + } + + public boolean addEnergyConsumption(final GT_MetaTileEntity_TesseractTerminal aTerminal) { + if (!this.getBaseMetaTileEntity().isAllowedToWork()) { + return false; + } + int J = (aTerminal.getBaseMetaTileEntity().getWorld() == this.getBaseMetaTileEntity().getWorld() + ? TESSERACT_ENERGY_COST : TESSERACT_ENERGY_COST_DIMENSIONAL); + + if (CORE.GTNH) { + J *= 4; + } + + this.mNeededEnergy += J; + + return true; + } + + public boolean isValidTesseractGenerator(final String aOwnerName, final boolean aWorkIrrelevant) { + return (this.getBaseMetaTileEntity() != null) && (!this.getBaseMetaTileEntity().isInvalidTileEntity()) + && (this.getBaseMetaTileEntity().isAllowedToWork()) + && ((aOwnerName == null) || (this.getBaseMetaTileEntity().getOwnerName().equals(aOwnerName))) + && ((aWorkIrrelevant) || (this.isWorking >= 20)); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + // TODO Auto-generated method stub + super.onPreTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + //Utils.LOG_WARNING("Ticking Generator. 0"); + if (this.getBaseMetaTileEntity().isServerSide()) { + //Utils.LOG_WARNING("Ticking Generator."); + // Set owner + if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) { + if (this.mOwner == null) { + Logger.WARNING("Setting Generators Owner. 1"); + this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + } + } + + if (this.mFrequency != this.oFrequency) { + + Logger.WARNING("mFreq != oFreq"); + + if (getGeneratorEntity() == this) { + getGeneratorEntity(this.oFrequency); + this.getBaseMetaTileEntity().issueBlockUpdate(); + Logger.WARNING("this Gen == oFreq on map - do block update"); + } + Logger.WARNING("mFreq will be set to oFreq"); + this.oFrequency = this.mFrequency; + } + if ((this.getBaseMetaTileEntity().isAllowedToWork()) + && (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mNeededEnergy, false))) { + //Utils.LOG_WARNING("Can Work & Has Energy"); + if ((getGeneratorEntity(Integer.valueOf(this.mFrequency)) == null) + || (!getGeneratorEntity(Integer.valueOf(this.mFrequency)).isValidTesseractGenerator(null, + true))) { + //Utils.LOG_WARNING("storing TE I think to mFreq map?"); + TesseractHelper.setGeneratorOwnershipByPlayer(PlayerUtils.getPlayerOnServerFromUUID(mOwner), + this.mFrequency, this); + } + } else { + if (getGeneratorEntity(Integer.valueOf(this.mFrequency)) == this) { + Logger.WARNING("this gen == mFreq on map - do block update"); + TesseractHelper.removeGenerator(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency); + this.getBaseMetaTileEntity().issueBlockUpdate(); + } + this.isWorking = 0; + } + if (getGeneratorEntity(Integer.valueOf(this.mFrequency)) == this) { + //Utils.LOG_WARNING("mFreq == this - do work related things"); + if (this.isWorking < 20) { + this.isWorking = ((byte) (this.isWorking + 1)); + } + if (this.isWorking == 20) { + this.getBaseMetaTileEntity().issueBlockUpdate(); + this.isWorking = ((byte) (this.isWorking + 1)); + } + } else { + this.isWorking = 0; + } + this.mNeededEnergy = 0; + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public String[] getDescription() { + return new String[] { this.mDescription, + "Generates a Tesseract for the attached Inventory", + "Connect with pipes to insert items", + "Consumes "+TESSERACT_ENERGY_COST+"EU/t for same dimension transfers", + "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers", + CORE.GT_Tooltip}; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return false; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return aSide == aFacing + ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), + new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } + : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), + new GT_RenderedTexture(Textures.BlockIcons.VOID) }; + } + + // To-Do? + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return false; + } + + @Override + public boolean canTankBeEmptied() { + return false; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + private GT_MetaTileEntity_TesseractGenerator getGeneratorEntity() { + GT_MetaTileEntity_TesseractGenerator thisGenerator = TesseractHelper + .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency); + if (thisGenerator != null) { + return thisGenerator; + } + return null; + } + + private GT_MetaTileEntity_TesseractGenerator getGeneratorEntity(int frequency) { + GT_MetaTileEntity_TesseractGenerator thisGenerator = TesseractHelper + .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), frequency); + if (thisGenerator != null) { + return thisGenerator; + } + return null; + } + + @Override + public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + if (this.getBaseMetaTileEntity().getOwnerName() != null + && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { + this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + Logger.WARNING("Setting Generators Owner. 2"); + } + super.onCreated(aStack, aWorld, aPlayer); + } + + @Override + public void onRemoval() { + try { + CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + super.onRemoval(); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java new file mode 100644 index 0000000000..088a596410 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java @@ -0,0 +1,581 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.automation; + +import java.util.UUID; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Config; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; + +public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_BasicTank { + public int mFrequency = 0; + public UUID mOwner; + public boolean mDidWork = false; + public static boolean sInterDimensionalTesseractAllowed = true; + private static int TESSERACT_ENERGY_COST = 128; + private static int TESSERACT_ENERGY_COST_DIMENSIONAL = 512; + + public GT_MetaTileEntity_TesseractTerminal(final int aID, final String aName, final String aNameRegional, + final int aTier) { + super(aID, aName, aNameRegional, aTier, 3, ""); + } + + public GT_MetaTileEntity_TesseractTerminal(final String aName, final int aTier, final String aDescription, + final ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_TesseractTerminal(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return true; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean isValidSlot(final int aIndex) { + return false; + } + + @Override + public long getMinimumStoredEU() { + return (this.getBaseMetaTileEntity().getEUCapacity() / 100); + } + + @Override + public long maxEUInput() { + return TESSERACT_ENERGY_COST_DIMENSIONAL; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public long maxEUStore() { + return TESSERACT_ENERGY_COST_DIMENSIONAL * 8 * 32; + } + + @Override + public long maxSteamStore() { + return this.maxEUStore(); + } + + @Override + public boolean ownerControl() { + return true; + } + + @Override + public int getProgresstime() { + return this.getTesseract(this.mFrequency, false) != null ? 999 : 0; + } + + @Override + public int maxProgresstime() { + return 1000; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mFrequency", this.mFrequency); + aNBT.setString("mOwner", mOwner.toString()); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mFrequency = aNBT.getInteger("mFrequency"); + this.mOwner = UUID.fromString(aNBT.getString("mOnwer")); + } + + @Override + public void onConfigLoad(final GT_Config aConfig) { + sInterDimensionalTesseractAllowed = true; + if (CORE.GTNH) { + TESSERACT_ENERGY_COST = 512; + TESSERACT_ENERGY_COST_DIMENSIONAL = 2048; + } + else { + TESSERACT_ENERGY_COST = 128; + TESSERACT_ENERGY_COST_DIMENSIONAL = 512; + } + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer, + final byte aSide, final float aX, final float aY, final float aZ) { + + if (this.mOwner == null) { + if (this.getBaseMetaTileEntity().getOwnerName() != null + && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { + if (this.getBaseMetaTileEntity().getOwnerName().toLowerCase() + .equals(aPlayer.getDisplayName().toLowerCase())) { + this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + } + } + } + + if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { + if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { + final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { + case 0: + //Utils.LOG_WARNING("Freq. -1 | " + this.mFrequency); + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency -= 1; + break; + case 1: + //Utils.LOG_WARNING("Freq. +1 | " + this.mFrequency); + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency += 1; + default: + // Utils.LOG_WARNING("Did not click the correct place."); + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + break; + } + PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency); + if (this.getTesseract(this.mFrequency, false) != null) { + PlayerUtils.messagePlayer(aPlayer, + new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()); + } + } + } else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0){ + GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Terminal to configure."); + } + return true; + } + + @Override + public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, + final float aZ) { + if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) { + if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { + final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { + case 0: + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency -= 64; + break; + case 1: + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency += 64; + break; + case 2: + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency -= 512; + break; + case 3: + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + this.mFrequency += 512; + } + GT_Utility.sendChatToPlayer(aPlayer, + "Frequency: " + this.mFrequency + + (this.getTesseract(this.mFrequency, false) == null ? "" + : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)") + .toString())); + } + } else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0){ + GT_Utility.sendChatToPlayer(aPlayer, "This is not your Tesseract Terminal to configure."); + } + } + + public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + public GT_MetaTileEntity_TesseractGenerator getTesseract(final int aFrequency, final boolean aWorkIrrelevant) { + final GT_MetaTileEntity_TesseractGenerator rTesseract = TesseractHelper + .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), aFrequency); + if (rTesseract == null) { + return null; + } + if (!TesseractHelper.isGeneratorOwnedByPlayer(PlayerUtils.getPlayerOnServerFromUUID(mOwner), rTesseract)) { + return null; + } + if (rTesseract.mFrequency != aFrequency) { + TesseractHelper.setTerminalOwnershipByPlayer(PlayerUtils.getPlayerOnServerFromUUID(mOwner), + Integer.valueOf(aFrequency), null); + return null; + } + if (!rTesseract.isValidTesseractGenerator(this.getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) { + return null; + } + if ((!sInterDimensionalTesseractAllowed) + && (rTesseract.getBaseMetaTileEntity().getWorld() != this.getBaseMetaTileEntity().getWorld())) { + return null; + } + return rTesseract; + } + + @Override + public String[] getInfoData() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) + && (tTileEntity.isSendingInformation())) { + return tTileEntity.getInfoData(); + } + return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, + this.getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive" }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean isDigitalChest() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.isDigitalChest(); + } + + @Override + public ItemStack[] getStoredItemData() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.getStoredItemData(); + } + + @Override + public void setItemCount(final int aCount) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return; + } + tTileEntity.setItemCount(aCount); + } + + @Override + public int getMaxItemCount() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.getMaxItemCount(); + } + + @Override + public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.isItemValidForSlot(aIndex, aStack); + } + + @Override + public int[] getAccessibleSlotsFromSide(final int aSide) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return new int[0]; + } + return tTileEntity.getAccessibleSlotsFromSide(aSide); + } + + @Override + public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.canInsertItem(aIndex, aStack, aSide); + } + + @Override + public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.canExtractItem(aIndex, aStack, aSide); + } + + @Override + public int getSizeInventory() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.getSizeInventory(); + } + + @Override + public ItemStack getStackInSlot(final int aIndex) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.getStackInSlot(aIndex); + } + + @Override + public void setInventorySlotContents(final int aIndex, final ItemStack aStack) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return; + } + tTileEntity.setInventorySlotContents(aIndex, aStack); + } + + @Override + public ItemStack decrStackSize(final int aIndex, final int aAmount) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.decrStackSize(aIndex, aAmount); + } + + @Override + public String getInventoryName() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return ""; + } + return tTileEntity.getInventoryName(); + } + + @Override + public int getInventoryStackLimit() { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.getInventoryStackLimit(); + } + + @Override + public boolean canFill(final ForgeDirection aSide, final Fluid aFluid) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.canFill(aSide, aFluid); + } + + @Override + public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return false; + } + return tTileEntity.canDrain(aSide, aFluid); + } + + @Override + public FluidTankInfo[] getTankInfo(final ForgeDirection aSide) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return new FluidTankInfo[0]; + } + return tTileEntity.getTankInfo(aSide); + } + + @Override + public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return 0; + } + return tTileEntity.fill(aDirection, aFluid, doFill); + } + + @Override + public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.drain(aDirection, maxDrain, doDrain); + } + + @Override + public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) { + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false); + if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) { + return null; + } + return tTileEntity.drain(aSide, aFluid, doDrain); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if ((this.getBaseMetaTileEntity().isServerSide()) && (this.getBaseMetaTileEntity().isAllowedToWork())) { + // Set owner + if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) { + if (this.mOwner == null) { + this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + } + } + final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, true); + if (tTileEntity != null) { + tTileEntity.addEnergyConsumption(this); + if ((!this.mDidWork) && (this.getTesseract(this.mFrequency, false) != null)) { + this.mDidWork = true; + this.getBaseMetaTileEntity().issueBlockUpdate(); + this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(128, false); + } + } else if (this.mDidWork == true) { + this.mDidWork = false; + this.getBaseMetaTileEntity().issueBlockUpdate(); + } + } + } + + @Override + public String[] getDescription() { + return new String[] { this.mDescription, + "Accesses Tesseract Generators remotely", + "Connect with pipes to extract items or fluids", + "Outputs from the back face", + "Consumes "+TESSERACT_ENERGY_COST+"EU/t for same dimension transfers", + "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers", + CORE.GT_Tooltip}; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return false; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return aSide == aFacing + ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), + new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } + : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), + new GT_RenderedTexture(Textures.BlockIcons.VOID) }; + } + + // To-Do? + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return false; + } + + @Override + public boolean canTankBeEmptied() { + return false; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + if (this.getBaseMetaTileEntity().getOwnerName() != null + && !this.getBaseMetaTileEntity().getOwnerName().equals("")) { + this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + } + super.onCreated(aStack, aWorld, aPlayer); + } + + @Override + public void onRemoval() { + try { + CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency); + } catch (Throwable t) { + } + super.onRemoval(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java new file mode 100644 index 0000000000..4173489be6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java @@ -0,0 +1,296 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_AdvancedBoiler; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_AdvancedBoiler; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntityFurnace; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidTankInfo; + +public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { + + private final int steamPerSecond; + private final int tier; + + public GT_MetaTileEntity_Boiler_Base(int aID, String aNameRegional, int tier) { + super(aID, "electricboiler." + tier + ".tier.single", aNameRegional, + "Produces " + (CORE.ConfigSwitches.boilerSteamPerSecond * tier) + "L of Steam per second"); + this.steamPerSecond = (CORE.ConfigSwitches.boilerSteamPerSecond * tier); + this.tier = tier; + } + + public GT_MetaTileEntity_Boiler_Base(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + this.steamPerSecond = (CORE.ConfigSwitches.boilerSteamPerSecond * aTier); + this.tier = aTier; + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Produces " + getPollution() + " pollution/sec", + "Consumes fuel only when temperature is less than 100C", + "Fuel with burn time greater than 500 is more efficient.", + "Doesn't explode if there's no water", + CORE.GT_Tooltip + }; + } + + public ITexture getOverlayIcon() { + return new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + protected GT_RenderedTexture getCasingTexture() { + if (this.tier == 1) { + return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_LV_SIDE); + } else if (this.tier == 2) { + return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_MV_SIDE); + } else { + return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); + } + // return new + // GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], + this.getCasingTexture() }; + } + + public ITexture[] getBack(final byte aColor) { + return this.getSides(aColor); + } + + public ITexture[] getBottom(final byte aColor) { + return this.getSides(aColor); + } + + public ITexture[] getTop(final byte aColor) { + return this.getSides(aColor); + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], + this.getCasingTexture() }; + } + + public ITexture[] getFrontActive(final byte aColor) { + return this.getFront(aColor); + } + + public ITexture[] getBackActive(final byte aColor) { + return this.getSides(aColor); + } + + public ITexture[] getBottomActive(final byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(final byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(final byte aColor) { + return this.getSides(aColor); + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public boolean isFacingValid(final byte aSide) { + return aSide > 1; + } + + // Please find out what I do. + // I do stuff within the GUI. + // this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + @Override + public int maxProgresstime() { + return 1000 + (250 * tier); + } + + @Override + public boolean isElectric() { + return false; + } + + @Override + public int getCapacity() { + return (16000 + (16000 * tier)); + } + + // This type of machine can have different water and steam capacities. + public int getSteamCapacity() { + return 2 * getCapacity(); + } + + @Override + protected int getProductionPerSecond() { + return steamPerSecond; + } + + @Override + protected int getMaxTemperature() { + return maxProgresstime(); + } + + @Override + protected int getEnergyConsumption() { + return 2; + } + + @Override + protected int getCooldownInterval() { + return 40; + } + + @Override + protected int getHeatUpRate() { + return 10; + } + + @Override + protected void updateFuel(IGregTechTileEntity tile, long ticks) { + ItemStack fuelStack = this.mInventory[2]; + if(fuelStack == null) return; + + int burnTime = getBurnTime(fuelStack); + if (burnTime > 0 && this.mTemperature <= 101) { + consumeFuel(tile, fuelStack, burnTime); + } + } + + @Override + protected void produceSteam(int aAmount) { + super.produceSteam(aAmount); + + if(mSteam.amount > getSteamCapacity()) { + sendSound(SOUND_EVENT_LET_OFF_EXCESS_STEAM); + + mSteam.amount = getSteamCapacity(); + } + } + + @Override + // Since this type of machine can have different water and steam capacities, we need to override getTankInfo() to + // support returning those different capacities. + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + return new FluidTankInfo[]{ + new FluidTankInfo(this.mFluid, getCapacity()), + new FluidTankInfo(this.mSteam, getSteamCapacity()) + }; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 1 || aIndex == 3; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 2; + } + + @Override + protected int getPollution() { + return (int) (CORE.ConfigSwitches.basePollutionPerSecondBoiler*CORE.ConfigSwitches.pollutionReleasedByTierBoiler[this.tier]); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity, "AdvancedBoiler.png"); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_Base(this.mName, tier, this.mDescription, this.mTextures); + } + + @Override + protected void onDangerousWaterLack(IGregTechTileEntity tile, long ticks) { + // Smart boilers don't explode! + } + + /** + * Returns burn time if the stack is a valid fuel, otherwise return 0. + */ + private static int getBurnTime(ItemStack stack) { + int burnTime = GameRegistry.getFuelValue(stack); + if (burnTime <= 0) { + burnTime = TileEntityFurnace.getItemBurnTime(stack); + } + + return burnTime; + } + + public void consumeFuel(IGregTechTileEntity tile, ItemStack fuel, int burnTime) { + this.mProcessingEnergy += burnTime / 10; + this.mTemperature += burnTime / 500; // will add bonus temperature points if the burn time is pretty high + + tile.decrStackSize(2, 1); + if (tile.getRandomNumber(3) == 0) { + if (fuel.getDisplayName().toLowerCase().contains("charcoal") + || fuel.getDisplayName().toLowerCase().contains("coke")) { + tile.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); + } else { + tile.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + } + } + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { + return true; + } + return super.allowCoverOnSide(aSide, aCover); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java new file mode 100644 index 0000000000..dfbd254897 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_Boiler_HV + extends GT_MetaTileEntity_Boiler_Base { + + public GT_MetaTileEntity_Boiler_HV(int aID, String aNameRegional, int aBoilerTier) { + super(aID, aNameRegional, aBoilerTier); + } + + public GT_MetaTileEntity_Boiler_HV(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_HV(this.mName, 3, this.mDescription, this.mTextures); + } + + + @Override + protected GT_RenderedTexture getCasingTexture(){ + return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); + } + + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Talonite)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return getTop(aColor); + } + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java new file mode 100644 index 0000000000..e2b9046c68 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java @@ -0,0 +1,52 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_Boiler_LV +extends GT_MetaTileEntity_Boiler_Base { + + public GT_MetaTileEntity_Boiler_LV(int aID, String aNameRegional, int aBoilerTier) { + super(aID, aNameRegional, aBoilerTier); + } + + public GT_MetaTileEntity_Boiler_LV(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_LV(this.mName, 1, this.mDescription, this.mTextures); + } + + + @Override + protected GT_RenderedTexture getCasingTexture(){ + return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_LV_SIDE); + } + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Potin)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return getTop(aColor); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java new file mode 100644 index 0000000000..7ef781da17 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java @@ -0,0 +1,52 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_Boiler_MV +extends GT_MetaTileEntity_Boiler_Base { + + public GT_MetaTileEntity_Boiler_MV(int aID, String aNameRegional, int aBoilerTier) { + super(aID, aNameRegional, aBoilerTier); + } + + public GT_MetaTileEntity_Boiler_MV(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_MV(this.mName, 2, this.mDescription, this.mTextures); + } + + @Override + protected GT_RenderedTexture getCasingTexture(){ + return new GT_RenderedTexture(Textures.BlockIcons.MACHINE_MV_SIDE); + } + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Tumbaga)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return getTop(aColor); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java new file mode 100644 index 0000000000..f9cf904cc2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java @@ -0,0 +1,194 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_AdvancedBoiler; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_AdvancedBoiler; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.common.gui.GT_Container_Boiler; +import gregtech.common.gui.GT_GUIContainer_Boiler; +import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler; + +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +public class GT_MetaTileEntity_Boiler_Solar +extends GT_MetaTileEntity_Boiler { + public GT_MetaTileEntity_Boiler_Solar(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, "Steam Power by the Sun"); + } + + public GT_MetaTileEntity_Boiler_Solar(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Produces "+(this.getPollution()*20)+" pollution/sec", + CORE.GT_Tooltip}; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[4][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + final ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[0][(i + 1)] = tmp0; + final ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)}; + rTextures[1][(i + 1)] = tmp1; + final ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))}; + rTextures[2][(i + 1)] = tmp2; + final ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)}; + rTextures[3][(i + 1)] = tmp3; + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1]; + } + + @Override + public int maxProgresstime() { + return 500; + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_AdvancedBoiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png"); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + private int mRunTime = 0; + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mRunTime", this.mRunTime); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.mRunTime = aNBT.getInteger("mRunTime"); + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { + if (this.mTemperature <= 20) { + this.mTemperature = 20; + this.mLossTimer = 0; + } + if (++this.mLossTimer > 45) { + this.mTemperature -= 1; + this.mLossTimer = 0; + } + if (this.mSteam != null) { + final byte i = aBaseMetaTileEntity.getFrontFacing(); + final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); + if (tTileEntity != null) { + final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); + if (tDrained != null) { + final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); + if (tFilledAmount > 0) { + tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); + } + } + } + } + if ((aTick % 25L) == 0L) { + if (this.mTemperature > 100) { + if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) { + this.mHadNoWater = true; + } else { + if (this.mHadNoWater) { + aBaseMetaTileEntity.doExplosion(2048L); + return; + } + this.mFluid.amount -= 1; + this.mRunTime += 1; + int tOutput = 150; + if(this.mRunTime > 10000){ + tOutput = Math.max(50, 150 - ((this.mRunTime-10000)/100)); + } + if (this.mSteam == null) { + this.mSteam = GT_ModHandler.getSteam(tOutput); + } else if (GT_ModHandler.isSteam(this.mSteam)) { + this.mSteam.amount += tOutput; + } else { + this.mSteam = GT_ModHandler.getSteam(tOutput); + } + } + } else { + this.mHadNoWater = false; + } + } + if ((this.mSteam != null) && + (this.mSteam.amount > 16000)) { + this.sendSound((byte) 1); + this.mSteam.amount = 12000; + } + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { + final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); + this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; + } + if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) { + this.mProcessingEnergy -= 1; + this.mTemperature += 1; + } + aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } + } + + @Override + protected int getPollution() { + return 0; + } + + @Override + protected int getProductionPerSecond() { + return 0; + } + + @Override + protected int getMaxTemperature() { + return 0; + } + + @Override + protected int getEnergyConsumption() { + return 0; + } + + @Override + protected int getCooldownInterval() { + return 0; + } + + @Override + protected void updateFuel(IGregTechTileEntity iGregTechTileEntity, long l) { + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java new file mode 100644 index 0000000000..c6f368f0c0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java @@ -0,0 +1,348 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import static gregtech.api.enums.GT_Values.V; + +import cofh.api.energy.IEnergyConnection; +import cofh.api.energy.IEnergyHandler; +import cofh.api.energy.IEnergyProvider; +import cofh.api.energy.IEnergyReceiver; +import cofh.api.energy.IEnergyStorage; +import crazypants.enderio.machine.capbank.TileCapBank; +import crazypants.enderio.machine.capbank.network.ICapBankNetwork; +import crazypants.enderio.power.IPowerContainer; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + * + * This is the main construct for my Basic Machines such as the Automatic Extractor + * Extend this class to make a simple Machine + */ +public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer implements IEnergyReceiver { + + + public GT_MetaTileEntity_RfConvertor(final String aName, final int aTier, + final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aDescription, aTextures, aSlotCount); + } + + public GT_MetaTileEntity_RfConvertor(final int aID, final String aName, + final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); + } + + @Override + public String[] getDescription() { + return new String[] { + "Use Screwdriver to change voltage", + "Hold Shift while using Screwdriver to change amperage", + EnumChatFormatting.DARK_AQUA+"Variable Output Voltage", + CORE.GT_Tooltip}; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[12][17][]; + GT_RenderedTexture aTex = new GT_RenderedTexture(TexturesGtBlock.Casing_Material_ZirconiumCarbide); + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; + rTextures[1][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; + rTextures[2][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]}; + rTextures[3][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; + rTextures[4][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; + rTextures[5][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; + rTextures[6][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]}; + rTextures[7][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]}; + rTextures[8][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]}; + rTextures[9][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; + rTextures[10][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; + rTextures[11][i + 1] = new ITexture[]{aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; + } + return rTextures; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aActive ? 0 : 6)][aColorIndex + 1]; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RfConvertor(this.mName, this.mTier, this.mDescription, + this.mTextures, this.mInventory.length); + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public long maxEUStore() { + return Integer.MAX_VALUE; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return V[this.mTier]; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public boolean isEnetInput() { + return false; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return !isOutputFacing(aSide); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); + } + + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (!aBaseMetaTileEntity.isActive()) { + aBaseMetaTileEntity.setActive(true); + } + if (this.getEUVar() < this.maxEUStore()) { + for (byte i = 0; i < 6 && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity(); i++) { + if (isInputFacing(i)) { + receiveEnergy(ForgeDirection.getOrientation(i), Integer.MAX_VALUE, false); + } + } + } + return; + } + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public String[] getInfoData() { + String[] infoData = super.getInfoData(); + return new String[] { + infoData[0], + "Converts RF -> GTEU | Tier: "+this.mTier, + infoData[1], + infoData[2] + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setByte("mTier", this.mTier); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.mTier = aNBT.getByte("mTier"); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aPlayer.isSneaking()) { + byte aTest = (byte) (aCurrentOutputAmperage + 1); + if (aTest > 16 || aTest <= 0 ) { + aTest = 1; + } + aCurrentOutputAmperage = aTest; + PlayerUtils.messagePlayer(aPlayer, "Now handling "+maxAmperesOut()+" Amps."); + } + else { + if (this.mTier < (CORE.GTNH ? GT_Values.V.length : 9)) { + this.mTier++; + } + else { + this.mTier = 0; + } + PlayerUtils.messagePlayer(aPlayer, "Now running at "+GT_Values.VOLTAGE_NAMES[this.mTier]+"."); + } + + } + + @Override + public boolean canConnectEnergy(ForgeDirection from) { + if (isOutputFacing((byte) from.ordinal())) { + return false; + } + return true; + } + + @Override + public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) { + + // Cannot accept power on the output face. + if (!canConnectEnergy(from) || isOutputFacing((byte) from.ordinal())) { + return 0; + } + + TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide((byte) from.ordinal()); + if (tTileEntity == null) { + return 0; + } + + Logger.WARNING("Someone is trying to inject RF from "+from+". Type:"+tTileEntity.getClass().getName()); + + // Calculate maximum RF we need to consume + int aInputRF = MathUtils.safeInt(this.maxEUOutput() * GregTech_API.mEUtoRF / 100); + + // Make sure we only consume the correct amount of RF that is pushed into this Tile. + if (aInputRF > maxReceive) { + aInputRF = maxReceive; + } + + int aInjectedRF = 0; + boolean aVal = false; + + long aStoredEU = this.getEUVar(); + long aMaxEU = this.maxEUStore(); + Logger.WARNING("Stored: "+aStoredEU+", Capacity: "+aMaxEU+""); + if (aStoredEU < aMaxEU) { + Logger.WARNING("StoredEU < MaxEU"); + long aRemainingSpace = aMaxEU - aStoredEU; + if (aRemainingSpace > 0) { + long tEU = 0; + byte aSide = (byte) from.ordinal(); + Logger.WARNING("Free: "+aRemainingSpace+"EU"); + if (tTileEntity instanceof IEnergyProvider && ((IEnergyProvider) tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)), 1, true) == 1) { + tEU = (long) ((IEnergyProvider) tTileEntity).extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)), (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU, false); + Logger.WARNING("Drained from IEnergyProvider Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); + tEU = tEU * GregTech_API.mRFtoEU / 100; + } + else if (tTileEntity instanceof IEnergyStorage && ((IEnergyStorage) tTileEntity).extractEnergy(1, true) == 1) { + tEU = (long) ((IEnergyStorage) tTileEntity).extractEnergy((int) maxEUOutput() * 100 / GregTech_API.mRFtoEU, false); + Logger.WARNING("Drained from IEnergyStorage Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); + tEU = tEU * GregTech_API.mRFtoEU / 100; + } + else if (GregTech_API.meIOLoaded && tTileEntity instanceof IPowerContainer && ((IPowerContainer) tTileEntity).getEnergyStored() > 0) { + int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored(); + int extractRF = (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU; + tEU = 0; + if (tTileEntity instanceof TileCapBank) { + ICapBankNetwork network = ((TileCapBank) tTileEntity).getNetwork(); + if (network != null && network.getEnergyStoredL() > 0) { + tEU = Math.min((Math.min(Math.min(network.getEnergyStoredL(), storedRF - extractRF), network.getMaxOutput())) * GregTech_API.mRFtoEU / 100, maxEUOutput()); + Logger.WARNING("Drained from EIO CapBank Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); + network.addEnergy((int) -(tEU * 100 / GregTech_API.mRFtoEU)); + } + } else { + if (storedRF > extractRF) { + ((IPowerContainer) tTileEntity).setEnergyStored(storedRF - extractRF); + tEU = maxEUOutput(); + Logger.WARNING("Drained from EIO Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); + } else { + ((IPowerContainer) tTileEntity).setEnergyStored(0); + tEU = storedRF * GregTech_API.mRFtoEU / 100; + Logger.WARNING("Drained from EIO Tile: "+(tEU * 100 / GregTech_API.mRFtoEU)+""); + } + } + } + Logger.WARNING("EU to inject: "+tEU+"EU"); + if (!simulate) { + aVal = this.getBaseMetaTileEntity().increaseStoredEnergyUnits(tEU, true); + } + if (tEU > 0) { + Logger.WARNING("Tried injecting "+tEU+" eu into self. Success? "+aVal); + } + } + } + return aInjectedRF; + } + + @Override + public int getEnergyStored(ForgeDirection from) { + long aStoredEU = this.getEUVar(); + long aMaxEU = this.maxEUStore(); + if (aStoredEU == 0) { + return 0; + } + if (aStoredEU < aMaxEU) { + long aRemainingSpace = aMaxEU - aStoredEU; + if (aRemainingSpace > 0) { + if (aRemainingSpace > (this.maxEUOutput() / (GregTech_API.mEUtoRF / 100))) { + int aCalculatedFreeSpace = 0; + int aRfPer10Eu = GregTech_API.mEUtoRF / 10; + // Calculate how many lots of '10 + aCalculatedFreeSpace = (int) Math.floor(aRemainingSpace / 10); + // Return value equal to how many lots of '10eu' packets we can fit in. + return Integer.MAX_VALUE - MathUtils.balance(aCalculatedFreeSpace * aRfPer10Eu, 0, Integer.MAX_VALUE); + } + } + } + return Integer.MAX_VALUE; + } + + @Override + public int getMaxEnergyStored(ForgeDirection from) { + return Integer.MAX_VALUE; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java new file mode 100644 index 0000000000..d1628bdb59 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java @@ -0,0 +1,171 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_BasicGenerator { + + public int mEfficiency; + + /*public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + onConfigLoad(); + }*/ + + public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, + "Requires semi-fluid Fuel", + new ITexture[0]); + onConfigLoad(); + } + + public GT_MetaTileEntity_SemiFluidGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + + public int getPollution() { + return (int) (CORE.ConfigSwitches.basePollutionPerSecondSemiFluidGenerator * CORE.ConfigSwitches.pollutionReleasedByTierSemiFluidGenerator[this.mTier]); + } + + @Override + public int getCapacity() { + return 4000 * this.mTier; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, + "SemiFluidGenerator.efficiency.tier." + this.mTier, 100 - (this.mTier * 5)); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_SemiFluidGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipes() { + //Logger.WARNING("Fuel Count: "+Gregtech_Recipe_Map.sSemiFluidLiquidFuels.mRecipeList.size()); + return GTPP_Recipe_Map.sSemiFluidLiquidFuels; + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Produces "+(this.getPollution())+" pollution/sec", + "Fuel Efficiency: "+this.getEfficiency() + "%", + CORE.GT_Tooltip}; + } + + @Override + public int getEfficiency() { + return this.mEfficiency; + } + + @Override + public boolean isOutputFacing(byte aSide) { + return (aSide == getBaseMetaTileEntity().getFrontFacing()); + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { + return true; + } + return super.allowCoverOnSide(aSide, aCover); + } + + @Override + public int getFuelValue(ItemStack aStack) { + if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) { + Logger.WARNING("Bad Fuel?"); + return 0; + } + int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); + if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { + rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); + } + Logger.WARNING("Good Fuel: "+rValue); + return rValue; + } + + @Override + public ITexture[] getFront(byte aColor) { + return new ITexture[] { super.getFront(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; + } + + @Override + public ITexture[] getBack(byte aColor) { + return new ITexture[] { super.getBack(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; + } + + @Override + public ITexture[] getBottom(byte aColor) { + return new ITexture[] { super.getBottom(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; + } + + @Override + public ITexture[] getTop(byte aColor) { + return new ITexture[] { super.getTop(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) }; + } + + @Override + public ITexture[] getSides(byte aColor) { + return new ITexture[] { super.getSides(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; + } + + @Override + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[] { super.getFrontActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; + } + + @Override + public ITexture[] getBackActive(byte aColor) { + return new ITexture[] { super.getBackActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; + } + + @Override + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[] { super.getBottomActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; + } + + @Override + public ITexture[] getTopActive(byte aColor) { + return new ITexture[] { super.getTopActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) }; + } + + @Override + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[] { super.getSidesActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java new file mode 100644 index 0000000000..2a0133245e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java @@ -0,0 +1,153 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.item.ItemStack; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaTileEntityDoubleFuelGeneratorBase +extends GregtechRocketFuelGeneratorBase { + + public int mEfficiency; + + public GregtechMetaTileEntityDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires two liquid Fuels. Fuel A is Fastburn, Fuel B is slowburn.", new ITexture[0]); + this.onConfigLoad(); + } + + public GregtechMetaTileEntityDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + this.onConfigLoad(); + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, + "Generates power at " + this.getEfficiency() + "% Efficiency per tick", + "Output Voltage: "+this.getOutputTier()+" EU/t", + CORE.GT_Tooltip + }; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityDoubleFuelGeneratorBase(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sDieselFuels; + } + + @Override + public int getCapacity() { + return 32000; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - (this.mTier * 8))); + } + + @Override + public int getEfficiency() { + return this.mEfficiency; + } + + @Override + public int getFuelValue(final ItemStack aStack) { + int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack)); + if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { + rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); + } + return rValue; + } + + private GT_RenderedTexture getCasingTexture(){ + if (this.mTier <= 4){ + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + } + else if (this.mTier == 5){ + + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); + } + else { + + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); + } + //return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + } + + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)}; + } + + @Override + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)}; + } + + @Override + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)}; + } + + @Override + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)}; + } + + @Override + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)}; + } + + @Override + public int getPollution() { + return 250; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java new file mode 100644 index 0000000000..a392ae5a58 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java @@ -0,0 +1,151 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaTileEntityGeothermalGenerator +extends GT_MetaTileEntity_BasicGenerator +{ + + public int mEfficiency; + + public GregtechMetaTileEntityGeothermalGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires Pahoehoe Lava or Normal Lava as Fuel", new ITexture[0]); + this.onConfigLoad(); + } + + public GregtechMetaTileEntityGeothermalGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + this.onConfigLoad(); + } + + @Override + public String[] getDescription() { + String aPollution = "Causes "+this.getPollution()+ " Pollution per second"; + return new String[]{ + this.mDescription, + "Generates power at " + this.getEfficiency() + "% Efficiency per tick", + aPollution, + CORE.GT_Tooltip}; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()){ + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public int getCapacity() { + //return MathUtils.roundToClosestMultiple(32000*(this.mTier/2), 25000); + return 5000*this.mTier; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "ThermalGenerator.efficiency.tier." + this.mTier, (100 - (this.mTier * 7))); + } + + @Override + public int getEfficiency() { + return this.mEfficiency; + } + + @Override + public int getFuelValue(final ItemStack aStack) { + int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack)); + if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { + rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); + } + return rValue; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityGeothermalGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical)}; + } + + @Override + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)}; + } + + @Override + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active)}; + } + + @Override + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)}; + } + + @Override + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)}; + } + + @Override + public GT_Recipe_Map getRecipes() + { + return GT_Recipe_Map.sHotFuels; + } + + public int getPollution() { + return (int) (CORE.ConfigSwitches.basePollutionPerSecondGeothermalGenerator * CORE.ConfigSwitches.pollutionReleasedByTierGeothermalGenerator[mTier]); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java new file mode 100644 index 0000000000..c05c7ae3ff --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java @@ -0,0 +1,142 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +public class GregtechMetaTileEntityRocketFuelGenerator +extends GregtechRocketFuelGeneratorBase { + + public int mEfficiency; + + public GregtechMetaTileEntityRocketFuelGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires GT++ Rocket Fuels", new ITexture[0]); + this.onConfigLoad(); + } + + public GregtechMetaTileEntityRocketFuelGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + this.onConfigLoad(); + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + //Logger.INFO("Valid Fuels: "+Recipe_GT.Gregtech_Recipe_Map.sRocketFuels.mRecipeList.size()); + return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels; + } + + @Override + public int getCapacity() { + return 32000; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, 80 - (10 * (this.mTier - 4))); + } + + @Override + public int getEfficiency() { + int eff = 80 - (10 * (this.mTier - 4)); + return eff; + + } + + @Override + public int getFuelValue(final ItemStack aStack) { + int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack)); + if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { + rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); + } + return rValue; + } + + private GT_RenderedTexture getCasingTexture(){ + if (this.mTier <= 4){ + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + } + else if (this.mTier == 5){ + + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); + } + else{ + + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); + } + //return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + } + + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)}; + } + + @Override + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)}; + } + + @Override + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)}; + } + + @Override + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)}; + } + + @Override + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java new file mode 100644 index 0000000000..68dbc4fb61 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java @@ -0,0 +1,187 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import static gregtech.api.enums.GT_Values.V; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SolarGenerator; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_SolarGenerator; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaSolarGenerator; + +public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGenerator { + + public GregtechMetaTileEntitySolarGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, "Feasts on the power of the Sun!", new ITexture[0]); + this.onConfigLoad(); + } + + public GregtechMetaTileEntitySolarGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + this.onConfigLoad(); + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, + "Generates power at " + this.getEfficiency() + "% Efficiency per tick", + "Output Voltage: "+this.getOutputTier()+" EU/t", + CORE.GT_Tooltip + }; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png"); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntitySolarGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SunAbsorber.efficiency.tier." + this.mTier, 100 - (this.mTier * 10)); + + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() + && (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) { + + if (this.mSolarCharge <= 20) { + //Utils.LOG_WARNING("1."); + this.mSolarCharge = 20; + this.mLossTimer = 0; + } + if (++this.mLossTimer > 45) { + //Utils.LOG_WARNING("2."); + this.mSolarCharge -= 1; + this.mLossTimer = 0; + } + + if ((aTick % 10L) == 0L) { + + Logger.WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())); + + if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) && + (!aBaseMetaTileEntity.getWorld().isThundering()) && + (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUStore() - this.getMinimumStoredEU()))) { + this.getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * this.getEfficiency(), true); + } + } + + if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && ((aTick % 32L) == 0L)) { + Logger.WARNING("Adding Solar Charge. Currently "+this.mSolarCharge); + this.mProcessingEnergy -= 1; + this.mSolarCharge += 1; + } + + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 64L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { + Logger.WARNING("Adding Processing Energy. Currently "+this.mProcessingEnergy); + final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); + this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; + } + + if (aBaseMetaTileEntity.isServerSide()){ + //Utils.LOG_WARNING("6."); + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU()))); + } + } + } + + @Override + public void inValidate() { + + } + + @Override + public int getEfficiency() { + return this.mEfficiency; + } + + @Override + public long maxEUStore() { + return Math.max(this.getEUVar(), (V[this.mTier] * 16000) + this.getMinimumStoredEU()); + } + + + ITexture SolarArray[] = {new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; + + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + @Override + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + } + + @Override + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + } + + @Override + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; + } + + @Override + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)}; + } + + @Override + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + } + + @Override + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + } + + @Override + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + } + + @Override + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; + } + + @Override + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java new file mode 100644 index 0000000000..ab000b98d4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java @@ -0,0 +1,390 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator { + public int mEfficiency; + private int mDays; + private long mTicksToBurnFor; + private int mVoltage = 0; + private GT_Recipe mCurrentRecipe; + private int mDaysRemaining = 0; + private int mDayTick = 0; + private byte mNewTier = 0; + + public int removeDayOfTime(){ + if (this.mDaysRemaining > 0){ + return this.mDaysRemaining--; + } + return this.mDaysRemaining; + } + + //Generates fuel value based on MC days + public static int convertDaysToTicks(float days){ + int value = 0; + value = MathUtils.roundToClosestInt(20*86400*days); + return value; + } + + public static long getTotalEUGenerated(int ticks, int voltage){ + return ticks*voltage; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setLong("mTicksToBurnFor", this.mTicksToBurnFor); + aNBT.setInteger("mVoltage", this.mVoltage); + aNBT.setInteger("mDaysRemaining", this.mDaysRemaining); + aNBT.setInteger("mDayTick", this.mDayTick); + aNBT.setByte("mNewTier", this.mNewTier); + + + if (this.mCurrentRecipe != null){ + final NBTTagList list = new NBTTagList(); + final ItemStack stack = this.mCurrentRecipe.mInputs[0]; + if(stack != null){ + final NBTTagCompound data = new NBTTagCompound(); + stack.writeToNBT(data); + data.setInteger("mSlot", 0); + list.appendTag(data); + } + aNBT.setTag("mRecipeItem", list); + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + //this.mMachineBlock = aNBT.getByte("mMachineBlock"); + this.mTicksToBurnFor = aNBT.getLong("mTicksToBurnFor"); + this.mVoltage = aNBT.getInteger("mVoltage"); + this.mDaysRemaining = aNBT.getInteger("mDaysRemaining"); + this.mDayTick = aNBT.getInteger("mDayTick"); + this.mNewTier = aNBT.getByte("mNewTier"); + + try { + ReflectionUtils.setByte(this, "mTier", this.mNewTier); + } + catch (Exception e) { + if (this.getBaseMetaTileEntity() != null){ + IGregTechTileEntity thisTile = this.getBaseMetaTileEntity(); + if (thisTile.isAllowedToWork() || thisTile.isActive()){ + thisTile.setActive(false); + } + } + } + + + final NBTTagList list = aNBT.getTagList("mRecipeItem", 10); + final NBTTagCompound data = list.getCompoundTagAt(0); + ItemStack lastUsedFuel = ItemStack.loadItemStackFromNBT(data); + if (lastUsedFuel != null){ + this.mCurrentRecipe = getRecipes().findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, new ItemStack[] { lastUsedFuel }); + } + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()){ + if (this.mDayTick < 24000){ + this.mDayTick++; + } + else if (this.mDayTick >= 24000){ + this.mDayTick = 0; + this.mDaysRemaining = this.removeDayOfTime(); + } + } + + + if ((aBaseMetaTileEntity.isServerSide()) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 10L == 0L)) { + long tProducedEU = 0L; + if (this.mFluid == null) { + if (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + getMinimumStoredEU()) { + this.mInventory[getStackDisplaySlot()] = null; + } else { + if (this.mInventory[getStackDisplaySlot()] == null) + this.mInventory[getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); + this.mInventory[getStackDisplaySlot()].setStackDisplayName("Generating: " + + (aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + " EU"); + } + } else { + int tFuelValue = getFuelValue(this.mFluid); + int tConsumed = consumedFluidPerOperation(this.mFluid); + if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount > tConsumed)) { + long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, + (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); + if ((tFluidAmountToUse > 0L) + && (aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true))) { + tProducedEU = tFluidAmountToUse * tFuelValue; + FluidStack tmp260_257 = this.mFluid; + tmp260_257.amount = (int) (tmp260_257.amount - (tFluidAmountToUse * tConsumed)); + } + } + } + if ((this.mInventory[getInputSlot()] != null) + && (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() * 20L + getMinimumStoredEU()) + && (GT_Utility.getFluidForFilledItem(this.mInventory[getInputSlot()], true) == null)) { + int tFuelValue = getFuelValue(this.mInventory[getInputSlot()]); + if (tFuelValue > 0) { + ItemStack tEmptyContainer = getEmptyContainer(this.mInventory[getInputSlot()]); + if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); + aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); + tProducedEU = tFuelValue; + } + } + } + if ((tProducedEU > 0L) && (getPollution() > 0)) { + PollutionUtils.addPollution(aBaseMetaTileEntity, (int) (tProducedEU * getPollution() / 500 * this.mTier + 1L)); + } + } + + if (aBaseMetaTileEntity.isServerSide()) + aBaseMetaTileEntity.setActive((aBaseMetaTileEntity.isAllowedToWork()) + && (aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU())); + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, + "Fuel is measured in minecraft days (Check with Scanner)", + "RTG changes output voltage depending on fuel", + "Generates power at " + this.getEfficiency() + "% Efficiency per tick", + "Output Voltage: "+this.getOutputTier()+" EU/t", + CORE.GT_Tooltip + }; + } + + public GregtechMetaTileEntity_RTG(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires RTG Pellets", new ITexture[0]); + } + + private byte getTier(){ + int voltage = this.mVoltage; + if (voltage >= 512){ + return 4; + } + else if (voltage >= 128){ + return 3; + } + else if (voltage >= 32){ + return 2; + } + else if (voltage >= 8){ + return 1; + } + return 0; + } + + public GregtechMetaTileEntity_RTG(String aName, int aTier, String aDescription, + ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return ((aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) + && (aSide != getBaseMetaTileEntity().getBackFacing())); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_RTG(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels; + } + + @Override + public int getCapacity() { + return 0; + } + + @Override + public int getEfficiency() { + return this.mEfficiency = 100; + } + + @Override + public ITexture[] getFront(byte aColor) { + return new ITexture[] { super.getFront(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB) }; + } + + @Override + public ITexture[] getBack(byte aColor) { + return new ITexture[] { super.getBack(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; + } + + @Override + public ITexture[] getBottom(byte aColor) { + return new ITexture[] { super.getBottom(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; + } + + @Override + public ITexture[] getTop(byte aColor) { + return new ITexture[] { super.getTop(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; + } + + @Override + public ITexture[] getSides(byte aColor) { + return new ITexture[]{ + gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()]}; + } + + @Override + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[] { super.getFrontActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE) }; + } + + @Override + public ITexture[] getBackActive(byte aColor) { + return new ITexture[] { super.getBackActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; + } + + @Override + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[] { super.getBottomActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; + } + + @Override + public ITexture[] getTopActive(byte aColor) { + return new ITexture[] { super.getTopActive(aColor)[0], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; + } + + @Override + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[]{ + gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)], + new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()]}; + } + + + public int getPollution() { + return 0; + } + + @Override + public int getFuelValue(ItemStack aStack) { + if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) + return 0; + GT_Recipe tFuel = getRecipes().findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, + new ItemStack[] { aStack }); + if (tFuel != null){ + this.mCurrentRecipe = tFuel; + int voltage = tFuel.mEUt; + this.mVoltage = voltage; + int sfsf = this.mTier; + //this.mDaysRemaining = tFuel.mSpecialValue*365; + + //Do some voodoo. + byte mTier2; + //mTier2 = ReflectionUtils.getField(this.getClass(), "mTier"); + try { + if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_AM241.get(1))){ + mTier2 = 1; + } + else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PO210.get(1))){ + mTier2 = 3; + } + else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PU238.get(1))){ + mTier2 = 2; + } + else if (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_SR90.get(1))){ + mTier2 = 1; + } + else { + //Utils.LOG_INFO("test:"+tFuel.mInputs[0].getDisplayName() + " | " + (ItemStack.areItemStacksEqual(tFuel.mInputs[0], GregtechItemList.Pellet_RTG_PU238.get(1)))); + mTier2 = 0; + } + ReflectionUtils.setByte(this, "mTier", mTier2); + this.mNewTier = mTier2; + //ReflectionUtils.setFinalStatic(mTier2, GT_Values.V[0]); + } catch (Exception e) { + Logger.WARNING("Failed setting mTier."); + e.printStackTrace(); + } + + this.mTicksToBurnFor = getTotalEUGenerated(convertDaysToTicks(tFuel.mSpecialValue), voltage); + if (mTicksToBurnFor >= Integer.MAX_VALUE){ + mTicksToBurnFor = Integer.MAX_VALUE; + Logger.WARNING("Fuel went over Int limit, setting to MAX_VALUE."); + } + this.mDaysRemaining = MathUtils.roundToClosestInt(mTicksToBurnFor/20/60/3); + Logger.WARNING("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L)); + return (int) (mTicksToBurnFor * getEfficiency() / 100L); + //return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L); + //return tFuel.mEUt; + } + Logger.WARNING("Not sure"); + return 0; + } + + @Override + public long maxEUOutput() { + return ((getBaseMetaTileEntity().isAllowedToWork()) ? this.mVoltage : 0L); + } + + @Override + public long getOutputTier() { + if (this.mCurrentRecipe != null){ + return this.mVoltage = this.mCurrentRecipe.mEUt; + } + return 0; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public String[] getInfoData() { + return new String[] { "RTG - Running at tier "+this.mTier, + "Active: "+this.getBaseMetaTileEntity().isActive(), "Current Output: " + this.mVoltage + " EU/t", + "Days of Fuel remaining: "+(mTicksToBurnFor/20/60/20), + "Hours of Fuel remaining: "+(mTicksToBurnFor/20/60/60), + "Ticks of "+this.mVoltage+"v remaining: "+(mTicksToBurnFor), + "Current Recipe input: "+ this.mCurrentRecipe != null ? this.mCurrentRecipe.mInputs[0].getDisplayName() + " x1" : "NUll" + }; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java new file mode 100644 index 0000000000..58919f0954 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java @@ -0,0 +1,50 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV; + +import static gregtech.api.enums.GT_Values.V; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.common.tileentities.generators.GT_MetaTileEntity_DieselGenerator; +import gtPlusPlus.core.lib.CORE; + +public class GT_MetaTileEntity_ULV_CombustionGenerator extends GT_MetaTileEntity_DieselGenerator { + public GT_MetaTileEntity_ULV_CombustionGenerator(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_ULV_CombustionGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Produces "+(this.getPollution()*20)+" pollution/sec", + "Fuel Efficiency: "+this.getEfficiency() + "%", + CORE.GT_Tooltip}; + } + + @Override + public long maxEUStore() { + return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU()); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ULV_CombustionGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public int getCapacity() { + return 16000; + } + + @Override + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, 95); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java new file mode 100644 index 0000000000..17bb4463c4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java @@ -0,0 +1,59 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV; + +import static gregtech.api.enums.GT_Values.V; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.common.tileentities.generators.GT_MetaTileEntity_GasTurbine; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbine { + public GT_MetaTileEntity_ULV_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_ULV_GasTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Produces "+(this.getPollution()*20)+" pollution/sec", + "Fuel Efficiency: "+this.getEfficiency() + "%", + CORE.GT_Tooltip}; + } + + @Override + public long maxEUStore() { + return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU()); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ULV_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public int getCapacity() { + return 16000; + } + + @Override + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, 95); + } + + @Override + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], + new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active)}; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java new file mode 100644 index 0000000000..ef3310c6fc --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java @@ -0,0 +1,58 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV; + +import static gregtech.api.enums.GT_Values.V; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.common.tileentities.generators.GT_MetaTileEntity_SteamTurbine; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamTurbine { + public GT_MetaTileEntity_ULV_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_ULV_SteamTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Produces "+(this.getPollution()*20)+" pollution/sec", + "Fuel Efficiency: "+this.getEfficiency() + "%", + CORE.GT_Tooltip}; + } + + @Override + public long maxEUStore() { + return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU()); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ULV_SteamTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public int getCapacity() { + return 16000; + } + + @Override + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + 1); + } + + @Override + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], + new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active)}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java new file mode 100644 index 0000000000..a62a5d16c8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java @@ -0,0 +1,229 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative; + +import static gregtech.api.enums.GT_Values.V; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer; + +/** + * NEVER INCLUDE THIS FILE IN YOUR MOD!!! + * + * This is the main construct for my Basic Machines such as the Automatic Extractor + * Extend this class to make a simple Machine + */ +public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer { + + + public GregtechMetaCreativeEnergyBuffer(final String aName, final int aTier, + final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aDescription, aTextures, aSlotCount); + // TODO Auto-generated constructor stub + } + + public GregtechMetaCreativeEnergyBuffer(final int aID, final String aName, + final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, + "Use Screwdriver to change voltage", + "Hold Shift while using Screwdriver to change amperage", + EnumChatFormatting.GREEN+"CREATIVE MACHINE", + CORE.GT_Tooltip}; + } + + /* + * MACHINE_STEEL_SIDE + */ + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + CustomIcon h = TexturesGtBlock.Casing_Material_RedSteel; + CustomIcon g = TexturesGtBlock.Casing_Material_Grisium; + CustomIcon k; + boolean j = MathUtils.isNumberEven(this.mTier); + final ITexture[][][] rTextures = new ITexture[2][17][]; + k = j ? g : h; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture(k) }; + rTextures[1][i + 1] = new ITexture[] { + new GT_RenderedTexture(k), this.mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] + : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, + final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, + final boolean aRedstone) { + return this.mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1]; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaCreativeEnergyBuffer(this.mName, this.mTier, this.mDescription, + this.mTextures, this.mInventory.length); + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public long maxEUStore() { + return Long.MAX_VALUE; + } + + @Override + public long maxEUInput() { + return V[this.mTier]; + } + + @Override + public long maxEUOutput() { + return V[this.mTier]; + } + + @Override + public long maxAmperesIn() { + return 16; + } + + @Override + public long maxAmperesOut() { + return 16; + } + + @Override public int getProgresstime() {return Integer.MAX_VALUE;} + @Override public int maxProgresstime() {return Integer.MAX_VALUE;} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + this.getBaseMetaTileEntity().increaseStoredEnergyUnits(Integer.MAX_VALUE, true); + if (aBaseMetaTileEntity.isServerSide()) { + aBaseMetaTileEntity.increaseStoredEnergyUnits(Integer.MAX_VALUE, true); + } + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public String[] getInfoData() { + String[] infoData = super.getInfoData(); + return new String[] { + infoData[0], + "THIS IS A CREATIVE ITEM - FOR TESTING | Tier: "+this.mTier, + infoData[1], + infoData[2] + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setByte("mTier", this.mTier); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.mTier = aNBT.getByte("mTier"); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (KeyboardUtils.isShiftKeyDown()) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + else { + if (this.mTier < (CORE.GTNH ? GT_Values.V.length-1 : 9)) { + this.mTier++; + } + else { + this.mTier = 0; + } + this.markDirty(); + try { + Field field = ReflectionUtils.getField(this.getClass(), "mTextures"); + field.setAccessible(true); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); + ITexture[][][] V = getTextureSet(null); + if (V != null) { + Logger.REFLECTION("Got Valid Textures."); + if (this.getBaseMetaTileEntity().isClientSide()) { + Logger.REFLECTION("Clientside Call."); + Logger.REFLECTION("Refreshing Textures on buffer."); + field.set(this, V); + Logger.REFLECTION("Refreshed Textures on buffer."); + } + else { + Logger.REFLECTION("Serverside Call."); + } + } + else { + Logger.REFLECTION("Bad mTextures setter."); + } + } + catch (Throwable t) { + //Bad refresh. + t.printStackTrace(); + Logger.REFLECTION("Bad mTextures setter."); + } + PlayerUtils.messagePlayer(aPlayer, "Now running at "+GT_Values.VOLTAGE_NAMES[this.mTier]+"."); + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java new file mode 100644 index 0000000000..129446c40d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java @@ -0,0 +1,328 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons.CustomIcon; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import net.minecraftforge.common.util.ForgeDirection; + +public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_TieredMachineBlock { + + public static String[] BlacklistedTileEntiyClassNames; + + private byte mMode = 0; // 0: RandomTicks around 1: TileEntities with range + // 1 + private static CustomIcon _mGTIco_Norm_Idle; + private static CustomIcon _mGTIco_Norm_Active; + private static CustomIcon _mGTIco_TE_Idle; + private static CustomIcon _mGTIco_TE_Active; + private static int[] mAccelerateStatic = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, 512, 512, 512, 512, 512 }; + + @Override + public void registerIcons(IIconRegister aBlockIconRegister) { + super.registerIcons(aBlockIconRegister); + _mGTIco_Norm_Idle = new CustomIcon("iconsets/OVERLAY_ACCELERATOR"); + _mGTIco_Norm_Active = new CustomIcon("iconsets/OVERLAY_ACCELERATOR_ACTIVE"); + _mGTIco_TE_Idle = new CustomIcon("iconsets/OVERLAY_ACCELERATOR_TE"); + _mGTIco_TE_Active = new CustomIcon("iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE"); + } + + @SideOnly(Side.CLIENT) + @Override + public void onValueUpdate(byte aValue) { + mMode = aValue; + } + + @Override + public byte getUpdateData() { + return mMode; + } + + public GT_MetaTileEntity_WorldAccelerator(int pID, String pName, String pNameRegional, int pTier) { + super(pID, pName, pNameRegional, pTier, 0, ""); + } + + @Override + public String[] getDescription() { + return new String[] { + String.format("Accelerating things (Radius: %d EU/t: %d Speed Bonus: x%d)", mTier, + getEnergyDemand(mTier, false), mAccelerateStatic[mTier]), + "Use a screwdriver to change mode", "To accelerate TileEntities, this machine has to be adjacent to it", + "This machine accepts up to 8 Amps", "Accelerating TileEntities doubles Energy-Demand"}; + + } + + public GT_MetaTileEntity_WorldAccelerator(String pName, int pTier, int pInvSlotCount, String pDescription, + ITexture[][][] pTextures) { + super(pName, pTier, pInvSlotCount, pDescription, pTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity pTileEntity) { + return new GT_MetaTileEntity_WorldAccelerator(mName, mTier, mInventory.length, mDescription, mTextures); + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] pTextures) { + return new ITexture[0][0][0]; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity pBaseMetaTileEntity, byte pSide, byte pFacing, byte pColorIndex, + boolean pActive, boolean pRedstone) { + if (mMode == 0) + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1], + (pSide < 2) ? null + : pActive ? new GT_RenderedTexture(_mGTIco_Norm_Active) + : new GT_RenderedTexture(_mGTIco_Norm_Idle) }; + else + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1], (pSide < 2) ? null + : pActive ? new GT_RenderedTexture(_mGTIco_TE_Active) : new GT_RenderedTexture(_mGTIco_TE_Idle) }; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity pBaseMetaTileEntity, int pIndex, byte pSide, ItemStack pStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity pBaseMetaTileEntity, int pIndex, byte pSide, ItemStack pStack) { + return false; + } + + @Override + public void saveNBTData(NBTTagCompound pNBT) { + pNBT.setByte("mAccelMode", mMode); + } + + public static long getEnergyDemand(int pTier, boolean pIsAcceleratingTEs) { + return V[pTier] * (pIsAcceleratingTEs ? 6 : 3); + } + + @Override + public void loadNBTData(NBTTagCompound pNBT) { + mMode = pNBT.getByte("mAccelMode"); + } + + @Override + public boolean isAccessAllowed(EntityPlayer pPlayer) { + return true; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return true; + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public long getMinimumStoredEU() { + return 512; + } + + @Override + public long maxEUStore() { + return 512 + V[mTier] * 50; + } + + @Override + public long maxEUInput() { + return V[mTier]; + } + + @Override + public long maxAmperesIn() { + return 8; + } + + private static String[] mModeStr = { "Blocks", "TileEntities" }; + + @Override + public void onScrewdriverRightClick(byte pSide, EntityPlayer pPlayer, float pX, float pY, float pZ) { + mMode = (byte) (mMode == 0x00 ? 0x01 : 0x00); + markDirty(); + PlayerUtils.messagePlayer(pPlayer, String.format("Switched mode to: %s", mModeStr[mMode])); + } + + @Override + public void onPostTick(IGregTechTileEntity pBaseMetaTileEntity, long pTick) { + try { + if (!pBaseMetaTileEntity.isServerSide()) + return; + + long tEnergyDemand = getEnergyDemand(mTier, (mMode == 1)); + + // Do we have enough energy to run? Or are we not allowed to run? + if (pBaseMetaTileEntity.getStoredEU() < tEnergyDemand || !pBaseMetaTileEntity.isAllowedToWork()) { + // Check if machine was active before + if (pBaseMetaTileEntity.isActive()) + pBaseMetaTileEntity.setActive(false); // Then disable it now + } else { + // Continue to drain power + if (pBaseMetaTileEntity.decreaseStoredEnergyUnits(tEnergyDemand, false)) { + World tWorld = pBaseMetaTileEntity.getWorld(); + // Limit the random ticks to once per second + if (mMode == 0) { + if (pTick % 20 == 0) + doAccelerateNormalBlocks(pBaseMetaTileEntity, tWorld); + } else + doAccelerateTileEntities(pBaseMetaTileEntity, tWorld); + + } else { + // Energy drain failed. Disable machine + if (pBaseMetaTileEntity.isActive()) + pBaseMetaTileEntity.setActive(false); + } + } + } catch (Exception e) { + Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash"); + Logger.ERROR(e.getMessage()); + } + } + + private void doAccelerateTileEntities(IGregTechTileEntity pBaseMetaTileEntity, World pWorld) { + try { + if (!pBaseMetaTileEntity.isActive()) + getBaseMetaTileEntity().setActive(true); + + for (ForgeDirection tDir : ForgeDirection.VALID_DIRECTIONS) { + TileEntity tTile = pBaseMetaTileEntity.getTileEntityAtSide((byte) tDir.ordinal()); + if (isTEBlackListed(tTile)) + continue; + + long tMaxTime = System.nanoTime() + 1000000; + for (int j = 0; j < mAccelerateStatic[mTier]; j++) { + tTile.updateEntity(); + if (System.nanoTime() > tMaxTime) + break; + } + } + } catch (Exception e) { + Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash"); + Logger.ERROR(e.getMessage()); + } + } + + private static List _mBlacklistedTileEntities = new ArrayList(); + + // Inspired by ChromatiCraft's TileAccelerator + private boolean isTEBlackListed(TileEntity pTile) { + if (pTile == null) + return true; // Obvious + if (!pTile.canUpdate()) + return true; // Skip if TE can't update at all + if (pTile.isInvalid()) + return true; // Obvious + + String tSimpleClassName = pTile.getClass().getSimpleName().toLowerCase(); + String tCanonicalName = pTile.getClass().getCanonicalName().toLowerCase(); + if (tSimpleClassName.contains("conduit") || tSimpleClassName.contains("wire") + || tSimpleClassName.contains("cable")) + return true; + if (tCanonicalName.contains("appeng") || tCanonicalName.contains("gregtech")) + // Don't accelerate ANY Gregtech machines! + return true; + for (String tS : BlacklistedTileEntiyClassNames) { + if (tCanonicalName.equalsIgnoreCase(tS)) + return true; + } + + return false; + } + + /** + * Accelerate normal blocks. Eats some power and adds randomTicks to every + * block within its working area (Tier-Number = radius) This does only + * affect blocks that implement the "RandomTick" method; Which is mostly + * used for grass growth and plants. + * + * @param pBaseMetaTileEntity + */ + private void doAccelerateNormalBlocks(IGregTechTileEntity pBaseMetaTileEntity, World pWorld) { + if (!pBaseMetaTileEntity.isActive()) + getBaseMetaTileEntity().setActive(true); + + Random rnd = new Random(); + int tX = pBaseMetaTileEntity.getXCoord(); + int tY = pBaseMetaTileEntity.getYCoord(); + int tZ = pBaseMetaTileEntity.getZCoord(); + + int tX1 = tX - mTier; + int tX2 = tX + mTier; + int tY1 = Math.max(tY - mTier, 0); // Limit to bedrock + int tY2 = Math.min(tY + mTier, 255); // Limit to build height + int tZ1 = tZ - mTier; + int tZ2 = tZ + mTier; + + for (int xi = tX1; xi <= tX2; xi++) + for (int yi = tY1; yi <= tY2; yi++) + for (int zi = tZ1; zi <= tZ2; zi++) + tryTickBlock(pWorld, xi, yi, zi, rnd); + + } + + /** + * Send a tick to the target block + * + * @param pWorld + * @param pX + * @param pY + * @param pZ + * @param pRnd + */ + private void tryTickBlock(World pWorld, int pX, int pY, int pZ, Random pRnd) { + try { + for (int j = 0; j < mTier; j++) { + Block tBlock = pWorld.getBlock(pX, pY, pZ); + if (tBlock.getTickRandomly()) + tBlock.updateTick(pWorld, pX, pY, pZ, pRnd); + } + } catch (Exception e) { + Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash"); + Logger.ERROR(e.getMessage()); + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java new file mode 100644 index 0000000000..eb01823151 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java @@ -0,0 +1,789 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import static gregtech.api.enums.GT_Values.V; +import static gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils.mPollution; + +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.item.general.ItemAirFilter; +import gtPlusPlus.core.item.general.ItemBasicScrubberTurbine; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.gui.basic.CONTAINER_PollutionCleaner; +import gtPlusPlus.xmod.gregtech.api.gui.basic.GUI_PollutionCleaner; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_BasicMachine { + + public int mPollutionReduction = 0; + protected int mBaseEff = 2500; + protected int mOptimalAirFlow = 0; + protected boolean mHasPollution = false; + protected int SLOT_ROTOR = 4; + protected int SLOT_FILTER = 5; + protected static boolean mPollutionEnabled = true; + + protected boolean mSaveRotor = false; + + public GregtechMetaAtmosphericReconditioner(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 2, "Making sure you don't live in Gwalior - Uses 2A", 2, 0, "Recycler.png", "", + new ITexture[]{ + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), + new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active), + new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab), + new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast), + new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB) + }); + mPollutionEnabled = PollutionUtils.mPollution(); + } + + public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName); + mPollutionEnabled = PollutionUtils.mPollution(); + } + + /*public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName); + }*/ + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaAtmosphericReconditioner(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + @Override + public String[] getDescription() { + + boolean highTier = this.mTier >= 7; + + String[] A = new String[]{ + this.mDescription, + highTier ? "Will attempt to remove 1/4 pollution from 8 surrounding chunks" : "", + highTier ? "If these chunks are not loaded, they will be ignored" : "", + "Requires a turbine rotor and an Air Filter [T1/T2] to run.", + "The turbine rotor must be manually inserted/replaced", + "Can be configured with a soldering iron to change modes", + "Low Efficiency: Removes half pollution, Turbine takes 50% dmg", + "High Efficiency: Removes full pollution, Turbine takes 100% dmg", + "Turbine Rotor will not break in LE mode", + "Insert an equal tier Conveyor Module to enable automation" + }; + if (!mPollutionEnabled) { + String[] B = new String[] { + "===============================================", + "Pollution is disabled, scrubbers will now have a bonus use", + "They are now able to remove ALL lingering pollution as GT ignores it", + "and it will linger forever!", + "===============================================", + }; + A = ArrayUtils.addAll(A, B); + } + return A; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mOptimalAirFlow", this.mOptimalAirFlow); + aNBT.setBoolean("mSaveRotor", mSaveRotor); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.mOptimalAirFlow = aNBT.getInteger("mOptimalAirFlow"); + this.mSaveRotor = aNBT.getBoolean("mSaveRotor"); + } + + @Override + public long maxAmperesIn() { + return 2; + } + + @Override + public long getMinimumStoredEU() { + return V[mTier] * 2; + } + + @Override + public long maxEUStore() { + return V[mTier] * 256; + } + + @Override + public long maxEUInput() { + return V[mTier]; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + + //Get Current Pollution Amount. + int mCurrentPollution = getCurrentChunkPollution(); + boolean isIdle = true; + + //Get Inventory Item + ItemStack stackRotor = this.mInventory[SLOT_ROTOR]; + ItemStack stackFilter = this.mInventory[SLOT_FILTER]; + + //Power Drain + long drainEU = maxEUInput() * maxAmperesIn(); + if (aBaseMetaTileEntity.isActive() && aBaseMetaTileEntity.getStoredEU() >= drainEU){ + if(aBaseMetaTileEntity.decreaseStoredEnergyUnits(drainEU, false)){ + isIdle = false; + } + else { + aBaseMetaTileEntity.setActive(false); + this.sendSound((byte) -122); + } + } + else if (!aBaseMetaTileEntity.isActive() && aBaseMetaTileEntity.getStoredEU() >= drainEU/4){ + if(aBaseMetaTileEntity.decreaseStoredEnergyUnits((drainEU/4), false)){ + isIdle = false; + } + else { + aBaseMetaTileEntity.setActive(false); + this.sendSound((byte) -122); + } + } + else { + aBaseMetaTileEntity.setActive(false); + this.sendSound((byte) -122); + } + + //Only try once/sec. + if (!isIdle && aTick % 20L == 0L){ + + //Check if machine can work. + if ((aBaseMetaTileEntity.isAllowedToWork())){ + + //Enable machine animation/graphic + if (hasRotor(stackRotor) && hasAirFilter(stackFilter) && this.mHasPollution){ + if (!this.getBaseMetaTileEntity().isActive()) { + aBaseMetaTileEntity.setActive(true); + } + } + else if (!this.mHasPollution || mCurrentPollution <= 0 || stackRotor == null || stackFilter == null || !hasRotor(stackRotor) || !hasAirFilter(stackFilter)){ + if (!this.getBaseMetaTileEntity().isActive()) { + aBaseMetaTileEntity.setActive(false); + this.sendSound((byte) -122); + } + } + + //If Active. + if (aBaseMetaTileEntity.isActive()){ + + //Do nothing if there is no pollution. + if(this.mHasPollution && mCurrentPollution > 0){ + + //Only check every 30s. + if (!isIdle && aTick % (20L * 30) == 0L){ + mPollutionEnabled = PollutionUtils.mPollution(); + //Clear out pollution if it's disabled, because I am a nice gal. + if (!mPollution()) { + PollutionUtils.nullifyPollution(this.getBaseMetaTileEntity()); + } + } + + + + + //Use a Turbine + if(hasRotor(stackRotor) && hasAirFilter(stackFilter)){ + Logger.WARNING("Found Turbine."); + mBaseEff = (int) ((50.0F + (10.0F * ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolCombatDamage(stackRotor))) * 100); + mOptimalAirFlow = (int) Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolStats(stackRotor).getSpeedMultiplier() + * GT_MetaGenerated_Tool.getPrimaryMaterial(stackRotor).mToolSpeed * 50); + + //Make sure we have a valid Turbine and Eff/Airflow + if (this.mBaseEff > 0 && this.mOptimalAirFlow > 0){ + //Utils.LOG_WARNING("Pollution Cleaner [5]"); + + //Log Debug information. + Logger.WARNING("mBaseEff[1]:"+mBaseEff); + Logger.WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow); + + //Calculate The Voltage we are running + long tVoltage = drainEU; + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + //Check Sides for Air, + //More air means more pollution processing. + int mAirSides = getFreeSpaces(); + + int reduction = 0; + + //If no sides are free, how will you process the atmosphere? + if (mAirSides > 0){ + reduction += (((Math.max((tTier-2), 1)*2)*50)*mAirSides); //Was originally *100 + Logger.WARNING("mPollutionReduction[1]:"+reduction); + + //I stole this code + reduction = (MathUtils.safeInt((long)reduction*this.mBaseEff)/100000)*mAirSides*Math.max((tTier-2), 1); + Logger.WARNING("reduction[2]:"+reduction); + reduction = MathUtils.safeInt(((long)reduction/100)*this.mOptimalAirFlow); + Logger.WARNING("reduction[3]:"+reduction); + + mPollutionReduction = reduction; + + //Set a temp to remove variable to aleviate duplicate code. + int toRemove = 0; + + Logger.WARNING("mCurrentPollution[4]:"+mCurrentPollution); + if (reduction <= mCurrentPollution){ + //Clean some Air. + toRemove = reduction; + } + else { + //Makes sure we don't get negative pollution. + toRemove = mCurrentPollution; + } + + //We are good to clean + if (toRemove > 0){ + if (damageTurbineRotor() && damageAirFilter()){ + Logger.INFO("Removing "+toRemove+" pollution"); + removePollution(mSaveRotor ? (toRemove/2) : toRemove); + Logger.WARNING("mNewPollution[4]:"+getCurrentChunkPollution()); + } + else { + Logger.WARNING("Could not damage turbine rotor or Air Filter."); + aBaseMetaTileEntity.setActive(false); + } + } //End of pollution removal block. + } //End of valid air sides block. + } //End of valid toolstats block. + } //End of correct inventory item block. + else { + //Utils.LOG_WARNING("Wrong Tool metaitem Found."); + } + } + } + else if (!aBaseMetaTileEntity.isActive()) { + return; + } + } //End of can work block. + else { //Disable Machine. + //aBaseMetaTileEntity.setActive(false); + } + } //End of 1/sec action block. + else { + + if (hasRotor(stackRotor) && hasAirFilter(stackFilter) && this.mHasPollution && !isIdle && aBaseMetaTileEntity.isAllowedToWork()){ + aBaseMetaTileEntity.setActive(true); + } + else if (isIdle || !this.mHasPollution || mCurrentPollution <= 0 || stackRotor == null || stackFilter == null || !hasRotor(stackRotor) || !hasAirFilter(stackFilter)){ + aBaseMetaTileEntity.setActive(false); + } + + } + if (this.getBaseMetaTileEntity().isActive()) { + if (MathUtils.randInt(0, 5) <= 2) { + this.sendSound((byte) -120); + } + } + + } //End of is serverside block. + } + + + public int getCurrentChunkPollution(){ + int mCurrentChunkPollution = 0; + if (this.mTier < 7) { + mCurrentChunkPollution = PollutionUtils.getPollution(getBaseMetaTileEntity()); + } + else { + AutoMap aSurrounding = new AutoMap(); + World aWorld = this.getBaseMetaTileEntity().getWorld(); + int xPos = this.getBaseMetaTileEntity().getXCoord(); + int zPos = this.getBaseMetaTileEntity().getZCoord(); + Chunk a1 = aWorld.getChunkFromBlockCoords(xPos-32, zPos-32); + Chunk a2 = aWorld.getChunkFromBlockCoords(xPos-32, zPos); + Chunk a3 = aWorld.getChunkFromBlockCoords(xPos-32, zPos+32); + Chunk b1 = aWorld.getChunkFromBlockCoords(xPos, zPos-32); + Chunk b2 = aWorld.getChunkFromBlockCoords(xPos, zPos); + Chunk b3 = aWorld.getChunkFromBlockCoords(xPos, zPos+32); + Chunk c1 = aWorld.getChunkFromBlockCoords(xPos+32, zPos-32); + Chunk c2 = aWorld.getChunkFromBlockCoords(xPos+32, zPos); + Chunk c3 = aWorld.getChunkFromBlockCoords(xPos+32, zPos+32); + aSurrounding.put(a1); + aSurrounding.put(a2); + aSurrounding.put(a3); + aSurrounding.put(b1); + aSurrounding.put(b2); + aSurrounding.put(b3); + aSurrounding.put(c1); + aSurrounding.put(c2); + aSurrounding.put(c3); + for (Chunk r : aSurrounding) { + mCurrentChunkPollution += getPollutionInChunk(r); + } + } + if (mCurrentChunkPollution > 0){ + mHasPollution = true; + } + else { + mHasPollution = false; + } + return mCurrentChunkPollution; + } + + public int getPollutionInChunk(Chunk aChunk){ + int mCurrentChunkPollution = PollutionUtils.getPollution(aChunk); + if (mCurrentChunkPollution > 0){ + mHasPollution = true; + } + else { + mHasPollution = false; + } + return mCurrentChunkPollution; + } + + public boolean hasRotor(ItemStack rotorStack){ + if(rotorStack != null){ + if (rotorStack.getItem() instanceof ItemBasicScrubberTurbine) { + return true; + } + if (rotorStack.getItem() instanceof GT_MetaGenerated_Tool && rotorStack.getItemDamage() >= 170 && rotorStack.getItemDamage() <= 179){ + return true; + } + } + return false; + } + + public boolean damageTurbineRotor(){ + try{ + + boolean creativeRotor = false; + ItemStack rotorStack = this.mInventory[SLOT_ROTOR]; + if (rotorStack == null) { + return false; + } + else { + if(rotorStack.getItem() instanceof GT_MetaGenerated_Tool_01) { + Materials t1 = GT_MetaGenerated_Tool.getPrimaryMaterial(rotorStack); + Materials t2 = GT_MetaGenerated_Tool.getSecondaryMaterial(rotorStack); + if (t1 == Materials._NULL && t2 == Materials._NULL){ + creativeRotor = true; + } + } + } + + if (rotorStack.getItem() instanceof ItemBasicScrubberTurbine) { + long currentUse = ItemBasicScrubberTurbine.getFilterDamage(rotorStack); + //Remove broken Filter + if (rotorStack.getItemDamage() == 0 && currentUse >= 2500-10){ + this.mInventory[this.SLOT_FILTER] = null; + return false; + } + else if (rotorStack.getItemDamage() == 1 && currentUse >= 5000-10){ + this.mInventory[this.SLOT_FILTER] = null; + return false; + } + else { + //Do Damage + ItemAirFilter.setFilterDamage(rotorStack, currentUse+10); + Logger.WARNING("Rotor Damage: "+currentUse); + return true; + } + } + + if(mInventory[SLOT_ROTOR].getItem() instanceof GT_MetaGenerated_Tool_01 && + ((GT_MetaGenerated_Tool) mInventory[SLOT_ROTOR].getItem()).getToolStats(mInventory[SLOT_ROTOR]).getSpeedMultiplier()>0 && + GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[SLOT_ROTOR]).mToolSpeed>0 ) { + + long damageValue = (long) Math.floor(Math.abs(MathUtils.randFloat(1, 2) - MathUtils.randFloat(1, 3)) * (1 + 3 - 1) + 1); + double fDam = Math.floor(Math.abs(MathUtils.randFloat(1f, 2f) - MathUtils.randFloat(1f, 2f)) * (1f + 2f - 1f) + 1f); + damageValue -= fDam; + + //Logger.WARNING("Trying to do "+damageValue+" damage to the rotor. ["+fDam+"]"); + /*Materials M1 = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[this.SLOT_ROTOR]); + Materials M2 = GT_MetaGenerated_Tool.getSecondaryMaterial(this.mInventory[this.SLOT_ROTOR]); + + Logger.WARNING("Trying to do "+damageValue+" damage to the rotor. [2]");*/ + + //Damage Rotor + //int rotorDurability = this.mInventory[this.SLOT_ROTOR].getItemDamage(); + long rotorDamage = creativeRotor ? 0 : GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); + long rotorDurabilityMax = creativeRotor ? Integer.MAX_VALUE : GT_MetaGenerated_Tool.getToolMaxDamage(this.mInventory[this.SLOT_ROTOR]); + long rotorDurability = (rotorDurabilityMax - rotorDamage); + Logger.WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability); + if (rotorDurability >= damageValue){ + + + if (!mSaveRotor){ + Logger.WARNING("Damaging Rotor."); + + if (!creativeRotor) + GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null); + + long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); + if (tempDur < rotorDurabilityMax){ + return true; + } + else { + rotorDurability = 0; + } + } + else { + Logger.WARNING("Damaging Rotor."); + if (rotorDurability > 1000){ + if (!creativeRotor) + GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue/2, 0, null); + long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]); + if (tempDur < rotorDurabilityMax){ + return true; + } + else { + rotorDurability = 0; + } + } + } + + + } + + if (rotorDurability <= 0 && !mSaveRotor && !creativeRotor) { + Logger.WARNING("Destroying Rotor."); + this.mInventory[this.SLOT_ROTOR] = null; + return false; + } + else if (rotorDurability <= 0 && mSaveRotor) { + Logger.WARNING("Saving Rotor."); + return false; + } + + + }else { + Logger.WARNING("Bad Rotor."); + return false; + } + } + catch (Throwable t){} + return false; + } + + public int getFreeSpaces(){ + int mAir = 0; + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + int x = aBaseMetaTileEntity.getXCoord(); + int y = aBaseMetaTileEntity.getYCoord(); + int z = aBaseMetaTileEntity.getZCoord(); + if(aBaseMetaTileEntity.getAirOffset(x+1, y, z)){ + mAir++; + } + if(aBaseMetaTileEntity.getAirOffset(x-1, y, z)){ + mAir++; + } + if(aBaseMetaTileEntity.getAirOffset(x, y, z+1)){ + mAir++; + } + if(aBaseMetaTileEntity.getAirOffset(x, y, z-1)){ + mAir++; + } + if(aBaseMetaTileEntity.getAirOffset(x, y+1, z)){ + mAir++; + } + if(aBaseMetaTileEntity.getAirOffset(x, y-1, z)){ + mAir++; + } + return mAir; + } + + public boolean removePollution(int toRemove){ + + if (this == null || this.getBaseMetaTileEntity() == null || this.getBaseMetaTileEntity().getWorld() == null) { + return false; + } + + if (this.mTier < 7) { + int startPollution = getCurrentChunkPollution(); + PollutionUtils.removePollution(this.getBaseMetaTileEntity(), toRemove); + int after = getCurrentChunkPollution(); + return (after aSurrounding = new AutoMap(); + Chunk aThisChunk = this.getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord()); + int mainChunkX = aThisChunk.xPosition; + int mainChunkZ = aThisChunk.zPosition; + + World aWorld = this.getBaseMetaTileEntity().getWorld(); + int xPos = this.getBaseMetaTileEntity().getXCoord(); + int zPos = this.getBaseMetaTileEntity().getZCoord(); + + Chunk a1 = aWorld.getChunkFromBlockCoords(xPos-32, zPos-32); + Chunk a2 = aWorld.getChunkFromBlockCoords(xPos-32, zPos); + Chunk a3 = aWorld.getChunkFromBlockCoords(xPos-32, zPos+32); + Chunk b1 = aWorld.getChunkFromBlockCoords(xPos, zPos-32); + Chunk b2 = aWorld.getChunkFromBlockCoords(xPos, zPos); + Chunk b3 = aWorld.getChunkFromBlockCoords(xPos, zPos+32); + Chunk c1 = aWorld.getChunkFromBlockCoords(xPos+32, zPos-32); + Chunk c2 = aWorld.getChunkFromBlockCoords(xPos+32, zPos); + Chunk c3 = aWorld.getChunkFromBlockCoords(xPos+32, zPos+32); + + aSurrounding.put(a1); + aSurrounding.put(a2); + aSurrounding.put(a3); + aSurrounding.put(b1); + aSurrounding.put(b2); + aSurrounding.put(b3); + aSurrounding.put(c1); + aSurrounding.put(c2); + aSurrounding.put(c3); + + for (Chunk r : aSurrounding) { + if (!r.isChunkLoaded) { + continue; + } + + int startPollution = getPollutionInChunk(r); + if (startPollution == 0) { + continue; + } + + Logger.WARNING("Trying to remove pollution from chunk "+r.xPosition+", "+r.zPosition+" | "+startPollution); + int after = 0; + boolean isMainChunk = r.isAtLocation(mainChunkX, mainChunkZ); + + int removal = Math.max(0, !isMainChunk ? (toRemove/4) : toRemove); + if (removePollution(r, removal)) { + chunksWithRemoval++; + after = getPollutionInChunk(r); + } + else { + after = 0; + } + if (startPollution - after > 0) { + totalRemoved += (startPollution - after); + } + Logger.WARNING("Removed "+(startPollution - after)+" pollution from chunk "+r.xPosition+", "+r.zPosition+" | "+after); + } + return totalRemoved > 0 && chunksWithRemoval > 0; + } + } + + public boolean removePollution(Chunk aChunk, int toRemove){ + int before = getCurrentChunkPollution(); + PollutionUtils.removePollution(aChunk, toRemove); + int after = getCurrentChunkPollution(); + return (after= 50-1){ + this.mInventory[this.SLOT_FILTER] = null; + return false; + } + else if (filter.getItemDamage() == 1 && currentUse >= 2500-1){ + this.mInventory[this.SLOT_FILTER] = null; + return false; + } + else { + //Do Damage + ItemAirFilter.setFilterDamage(filter, currentUse+1); + Logger.WARNING("Filter Damage: "+currentUse); + return true; + } + } + return false; + } + + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_PollutionCleaner(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_PollutionCleaner(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), this.mGUIName); + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + if (aIndex == 5) { + if (aStack.getItem() instanceof ItemAirFilter) { + Logger.INFO("Inserting Air Filter into "+aIndex); + return true; + } + } + if (aIndex == 4) { + if (this.mInventory[6] != null) { + Logger.INFO("Found conveyor, can automate turbines. Inserting into "+aIndex); + if (aStack.getItem() instanceof ItemBasicScrubberTurbine) { + return true; + } + if (aStack.getItem() instanceof GT_MetaGenerated_Tool && aStack.getItemDamage() >= 170 && aStack.getItemDamage() <= 179){ + return true; + } + } + } + //return super.canInsertItem(aIndex, aStack, aSide); + return false; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, + float aZ) { + this.mSaveRotor = Utils.invertBoolean(mSaveRotor); + if (mSaveRotor){ + PlayerUtils.messagePlayer(aPlayer, "Running in low efficiency mode, rotors will not break."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Running in high efficiency mode, rotors will break."); + } + return true; + } + + @Override + public void doSound(byte aIndex, double aX, double aY, double aZ) { + if (aIndex == -120) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(103)), MathUtils.randInt(5, 50), 0.05F, aX, aY, aZ); + } else if (aIndex == -121 || aIndex == -122) { + //GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(108)), 0, 0.5F, aX, aY, aZ); + } /*else if (aIndex == -122) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 100, 1.0F, aX, aY, aZ); + }*/ else { + super.doSound((byte) 0, aX, aY, aZ); + } + } + + @Override + public boolean canHaveInsufficientEnergy() { + // TODO Auto-generated method stub + return super.canHaveInsufficientEnergy(); + } + + @Override + public String[] getInfoData() { + AutoMap aTooltipSuper = new AutoMap(); + for (String s : super.getInfoData()) { + aTooltipSuper.put(s); + } + int mAirSides = getFreeSpaces(); + int reduction = 0; + + try { + long tVoltage = maxEUInput(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + reduction += (((Math.max((tTier-2), 1)*2)*50)*mAirSides); + reduction = (MathUtils.safeInt((long)reduction*this.mBaseEff)/100000)*mAirSides*Math.max((tTier-2), 1); + reduction = MathUtils.safeInt(((long)reduction/100)*this.mOptimalAirFlow); + + aTooltipSuper.put("Maximum pollution removed per second: "+reduction); + } + catch (Throwable t) { + aTooltipSuper.put("Maximum pollution removed per second: "+mPollutionReduction); + } + aTooltipSuper.put("Air Sides: "+mAirSides); + + String[] mBuiltOutput = new String[aTooltipSuper.size()]; + int aIndex = 0; + for (String i : aTooltipSuper) { + mBuiltOutput[aIndex++] = i; + } + + + + return mBuiltOutput; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { + if (aSide <= 1) { + return false; + } + return super.allowCoverOnSide(aSide, aCoverID); + } + + @Override + public ITexture[] getTopFacingInactive(byte aColor) { + return super.getTopFacingInactive(aColor); + } + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + aNBT.setInteger("mOptimalAirFlow", this.mOptimalAirFlow); + aNBT.setBoolean("mSaveRotor", mSaveRotor); + super.setItemNBT(aNBT); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java new file mode 100644 index 0000000000..0f7edd062d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java @@ -0,0 +1,174 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SteamCondenser; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_SteamCondenser; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +public class GregtechMetaCondensor extends GregtechMetaBoilerBase{ + + public GregtechMetaCondensor(final int aID, final String aName, final String aNameRegional) + { + super(aID, aName, aNameRegional, "A Steam condenser - [IC2->Steam]", new ITexture[0]); + } + + public GregtechMetaCondensor(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) + { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, "IC2 Steam + Water = Normal Steam.", "Requires no power to run, although it's not very fast.", CORE.GT_Tooltip}; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) + { + final ITexture[][][] rTextures = new ITexture[5][17][]; + for (byte i = -1; i < 16; i++){ + rTextures[0][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa))}; + rTextures[1][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; + rTextures[2][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; + rTextures[3][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER) }; + rTextures[4][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE) }; + } + return rTextures; + } + + @Override + public int maxProgresstime() + { + return 1000; + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) + { + return new CONTAINER_SteamCondenser(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) + { + return new GUI_SteamCondenser(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png"); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) + { + return new GregtechMetaCondensor(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) + { + this.RI = MathUtils.randLong(5L, 30L); + if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) + { + if (this.mTemperature <= 5) + { + this.mTemperature = 5; + this.mLossTimer = 0; + } + if (++this.mLossTimer > 10) + { + this.mTemperature -= 1; + this.mLossTimer = 0; + } + for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) { + if (i != aBaseMetaTileEntity.getFrontFacing()) + { + final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i); + if (tTileEntity != null) + { + final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false); + if (tDrained != null) + { + final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false); + if (tFilledAmount > 0) { + tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true); + } + } + } + } + } + if ((aTick % 10L) == 0L) { + if (this.mTemperature > 5) + { + if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) + { + this.mHadNoWater = true; + } + else + { + if (this.mHadNoWater) + { + aBaseMetaTileEntity.doExplosion(2048L); + return; + } + this.mFluid.amount -= 1; + if (this.mSteam == null) { + this.mSteam = GT_ModHandler.getSteam(30L); + } else if (GT_ModHandler.isSteam(this.mSteam)) { + this.mSteam.amount += 30; + } else { + this.mSteam = GT_ModHandler.getSteam(30L); + } + } + } + else { + this.mHadNoWater = false; + } + } + if ((this.mSteam != null) && + (this.mSteam.amount > getSteamCapacity())) + { + this.sendSound((byte)1); + this.mSteam.amount = getSteamCapacity() * 3 / 4; + } + /*if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && + (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(IC2.getItemFromBlock(p_150898_0_))))) + { + this.mProcessingEnergy += 1000; + aBaseMetaTileEntity.decrStackSize(2, 1); + aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L)); + }*/ + if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && ((aTick % this.RI) == 0L)) + { + this.mProcessingEnergy -= 40; + this.mTemperature += 2; + } + aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } + } + + @Override + public final int fill(final FluidStack aFluid, final boolean doFill) + { + if ((Utils.isIC2Steam(aFluid)) && (this.mProcessingEnergy < 50)) + { + final int tFilledAmount = Math.min(50, aFluid.amount); + if (doFill) { + this.mProcessingEnergy += tFilledAmount; + } + return tFilledAmount; + } + return super.fill(aFluid, doFill); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java new file mode 100644 index 0000000000..88658c399d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java @@ -0,0 +1,323 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity { + + long mLastCleanup = 0; + long mLocalTickVar = 0; + int mFrequency = 5; + + public GregtechMetaGarbageCollector(final String aName, final String aNameRegional, final String aDescription) { + super(991, aName, aNameRegional, 5, 0, aDescription); + } + + public GregtechMetaGarbageCollector(final String aName, final String aDescription, final ITexture[][][] aTextures) { + super(aName, 5, 0, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, + "Can request the JVM to perform garbage collection", + "Configurable to run once every 5 minute interval (5-180)", + "This Machine has no recipe", + "Admin Tool, Limit one per world if possible", + CORE.GT_Tooltip}; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (mFrequency < 180){ + mFrequency += 5; + } + else { + mFrequency = 5; + } + PlayerUtils.messagePlayer(aPlayer, "Running every "+mFrequency+" minutes."); + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaGarbageCollector(this.mName, this.mDescription, this.mTextures); + } + + @Override public boolean isSimpleMachine() {return true;} + @Override public boolean isElectric() {return false;} + @Override public boolean isValidSlot(final int aIndex) {return false;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return false;} + @Override public boolean isEnetOutput() {return false;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 0;} + @Override public long maxEUStore() {return 0;} + + @Override + public int getCapacity() { + return 0; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} + @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + } + this.showPollution(aPlayer.getEntityWorld(), aPlayer); + return true; + } + + private void showPollution(final World worldIn, final EntityPlayer playerIn){ + PlayerUtils.messagePlayer(playerIn, "Running every "+mFrequency+" minutes. Owner: "+this.getBaseMetaTileEntity().getOwnerName()); + long aDiff = mLocalTickVar - this.mLastCleanup; + PlayerUtils.messagePlayer(playerIn, "Last run: "+Utils.getSecondsFromMillis(aDiff)+" seconds ago."); + + + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName() + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { + } + + @Override + public String getInventoryName() { + return null; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return true; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.getBaseMetaTileEntity().isServerSide()) { + mLocalTickVar = System.currentTimeMillis(); + long aDiff = mLocalTickVar - this.mLastCleanup; + if (Utils.getSecondsFromMillis(aDiff) >= (this.mFrequency * 60)) { + CORE.gc(); + this.mLastCleanup = mLocalTickVar; + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java new file mode 100644 index 0000000000..5f55e080ad --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java @@ -0,0 +1,386 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity { + + int mCurrentPollution; + int mAveragePollution; + int mAveragePollutionArray[] = new int[10]; + private int mArrayPos = 0; + private int mTickTimer = 0; + private int mSecondTimer = 0; + + public GregtechMetaPollutionCreator(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); + } + + public GregtechMetaPollutionCreator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, "A useful debug machine to create pollution.", CORE.GT_Tooltip}; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (pollutionMultiplier > 99){ + pollutionMultiplier = 1; + } + else { + pollutionMultiplier++; + } + PlayerUtils.messagePlayer(aPlayer, "Pollution Mutliplier is now "+pollutionMultiplier+"."); + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaPollutionCreator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); + } + + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isElectric() {return true;} + @Override public boolean isValidSlot(final int aIndex) {return true;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isEnetOutput() {return false;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 0;} + @Override public long maxEUStore() {return 0;} + + @Override + public int getCapacity() { + return 0; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} + @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + } + this.showPollution(aPlayer.getEntityWorld(), aPlayer); + return true; + } + + public int pollutionMultiplier = 1; + + private void showPollution(final World worldIn, final EntityPlayer playerIn){ + if(!PollutionUtils.mPollution()){ + PlayerUtils.messagePlayer(playerIn, "This block is useless, Pollution is disabled."); + } + else { + addPollution(); + PlayerUtils.messagePlayer(playerIn, "This chunk now contains "+getCurrentChunkPollution()+" pollution."); + //PlayerUtils.messagePlayer(playerIn, "Average over last ten minutes: "+getAveragePollutionOverLastTen()+" pollution."); + } + } + + private boolean addPollution(){ + PollutionUtils.addPollution(getBaseMetaTileEntity(), 100000*pollutionMultiplier); + return true; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + public int getCurrentChunkPollution(){ + return getCurrentChunkPollution(this.getBaseMetaTileEntity()); + } + + public int getCurrentChunkPollution(IGregTechTileEntity aBaseMetaTileEntity){ + return PollutionUtils.getPollution(aBaseMetaTileEntity); + } + + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName(), + "Current Pollution: "+this.mCurrentPollution, + "Average/10 minutes:"+getAveragePollutionOverLastTen()}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { + } + + @Override + public String getInventoryName() { + return null; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return false; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + //int mCurrentPollution; + //int mAveragePollution; + //int mAveragePollutionArray[] = new int[10]; + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); + aNBT.setInteger("mAveragePollution", this.mAveragePollution); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mCurrentPollution = aNBT.getInteger("mCurrentPollution"); + this.mAveragePollution = aNBT.getInteger("mAveragePollution"); + } + + @Override + public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { + if (this.getBaseMetaTileEntity().isServerSide()) { + if (this.mCurrentPollution == 0) { + this.mCurrentPollution = getCurrentChunkPollution(); + } + if (this.mArrayPos < 0 || this.mArrayPos > 9) { + this.mArrayPos = 0; + } + this.mTickTimer = 0; + } + } + + + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.getBaseMetaTileEntity().isServerSide()) { + //TickTimer - 20 times a second + this.mTickTimer++; + if (mTickTimer % 20 == 0){ + this.mCurrentPollution = getCurrentChunkPollution(); + } + } + } + + public int getAveragePollutionOverLastTen(){ + int counter = 0; + int total = 0; + + for (int i=0;i 0 && counter > 0){ + returnValue = (total/counter); + this.mAveragePollution = returnValue; + } + else { + returnValue = getCurrentChunkPollution(); + } + //Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); + return returnValue; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java new file mode 100644 index 0000000000..10319f2269 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java @@ -0,0 +1,439 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity { + + int mCurrentPollution; + int mAveragePollution; + int mAveragePollutionArray[] = new int[10]; + private int mArrayPos = 0; + private int mTickTimer = 0; + private int mSecondTimer = 0; + private long mRedstoneLevel = 0; + + public GregtechMetaPollutionDetector(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); + } + + public GregtechMetaPollutionDetector(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, "Right click to check pollution levels.", + "Configure with screwdriver to set redstone output amount.", + "Does not use power.", + CORE.GT_Tooltip}; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return aSide == aFacing + ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), + new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } + : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), + new GT_RenderedTexture(Textures.BlockIcons.VOID) }; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + /*@Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + }*/ + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaPollutionDetector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); + } + + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isElectric() {return true;} + @Override public boolean isValidSlot(final int aIndex) {return true;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isEnetOutput() {return false;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 0;} + @Override public long maxEUStore() {return 0;} + + @Override + public int getCapacity() { + return 0; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} + @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + } + this.showPollution(aPlayer.getEntityWorld(), aPlayer); + return true; + } + + private void showPollution(final World worldIn, final EntityPlayer playerIn){ + if(!PollutionUtils.mPollution()){ + PlayerUtils.messagePlayer(playerIn, "This block is useless, Pollution is disabled."); + } + else { + PlayerUtils.messagePlayer(playerIn, "This chunk contains "+getCurrentChunkPollution()+" pollution."); + PlayerUtils.messagePlayer(playerIn, "Emit Redstone at pollution level: "+this.mRedstoneLevel); + } + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + public int getCurrentChunkPollution(){ + return getCurrentChunkPollution(this.getBaseMetaTileEntity()); + } + + public int getCurrentChunkPollution(IGregTechTileEntity aBaseMetaTileEntity){ + return PollutionUtils.getPollution(aBaseMetaTileEntity); + } + + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName(), + "Current Pollution: "+this.mCurrentPollution, + "Average/10 Sec: "+this.mAveragePollution, + "Emit Redstone at pollution level: "+this.mRedstoneLevel}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { + } + + @Override + public String getInventoryName() { + return null; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return false; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + //int mCurrentPollution; + //int mAveragePollution; + //int mAveragePollutionArray[] = new int[10]; + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); + aNBT.setInteger("mAveragePollution", this.mAveragePollution); + aNBT.setLong("mRedstoneLevel", this.mRedstoneLevel); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mCurrentPollution = aNBT.getInteger("mCurrentPollution"); + this.mAveragePollution = aNBT.getInteger("mAveragePollution"); + this.mRedstoneLevel = aNBT.getLong("mRedstoneLevel"); + } + + @Override + public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + } + + public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + //Only Calc server-side + if (!this.getBaseMetaTileEntity().isServerSide()) { + return; + } + //Emit Redstone + if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ + for (int i=0;i<6;i++){ + this.getBaseMetaTileEntity().setStrongOutputRedstoneSignal((byte) i, (byte) 16); + } + this.markDirty(); + } + else { + for (int i=0;i<6;i++){ + this.getBaseMetaTileEntity().setStrongOutputRedstoneSignal((byte) i, (byte) 0); + } + this.markDirty(); + } + + //Do Math for stats + if (this.mTickTimer % 20 == 0) { + mCurrentPollution = this.getCurrentChunkPollution(); + if (mArrayPos > mAveragePollutionArray.length-1) { + mArrayPos = 0; + } + mAveragePollutionArray[mArrayPos] = mCurrentPollution; + mAveragePollution = getAveragePollutionOverLastTen(); + mArrayPos++; + } + this.mTickTimer++; + + } + + public int getAveragePollutionOverLastTen(){ + return MathUtils.getIntAverage(mAveragePollutionArray); + + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, + float aX, float aY, float aZ) { + + if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) { + final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); + switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) { + case 0: + this.mRedstoneLevel -= 5000; + break; + case 1: + this.mRedstoneLevel += 5000; + break; + case 2: + this.mRedstoneLevel -= 50000; + break; + case 3: + this.mRedstoneLevel += 50000; + } + this.markDirty(); + GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone at Pollution Level: " + this.mRedstoneLevel); + } + + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + public boolean allowGeneralRedstoneOutput() { + if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ + this.markDirty(); + return true; + } + return false; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, + EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + } + + @Override + public void onMachineBlockUpdate() { + super.onMachineBlockUpdate(); + } + + @Override + public boolean hasSidedRedstoneOutputBehavior() { + if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){ + this.markDirty(); + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java new file mode 100644 index 0000000000..140f1d9cd5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java @@ -0,0 +1,394 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.interfaces.IChunkLoader; +import gtPlusPlus.core.chunkloading.GTPP_ChunkManager; +import gtPlusPlus.core.chunkloading.StaticChunkFunctions; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; + +public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMachine implements IChunkLoader { + + public GregtechMetaTileEntityChunkLoader(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 2, "Loads " + getMaxChunksToLoadForTier(aTier) + " chunks when powered", 0, 0, "Recycler.png", "", new ITexture[]{}); + } + + public GregtechMetaTileEntityChunkLoader(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 2, aDescription, aTextures, 0, 0, aGUIName, aNEIName); + } + + public static int getMaxChunksToLoadForTier(int aTier) { + if (aTier < 4) { + return 3 * 3; + } + if (aTier < 6) { + return 7 * 7; + } + if (aTier < 8) { + return 15 * 15; + } + else { + return 0; + } + } + + @Override + public String[] getDescription() { + return new String[] { + "Loads " + getMaxChunksToLoadForTier(this.mTier) + " chunks when powered", + "Consumes 2A", + "Behaves Identically to a Railcraft World Anchor", + CORE.GT_Tooltip + }; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()){ + return true; + } + this.showPollution(aPlayer.getEntityWorld(), aPlayer); + return true; + } + + private void showPollution(final World worldIn, final EntityPlayer playerIn){ + //PlayerUtils.messagePlayer(playerIn, "Running every "+mFrequency+" minutes. Owner: "+this.getBaseMetaTileEntity().getOwnerName()); + //PlayerUtils.messagePlayer(playerIn, "Last run: "+Utils.getSecondsFromMillis(aDiff)+" seconds ago."); + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + + @Override + public String[] getInfoData() { + return super.getInfoData(); + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return true; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + // Have we set the Chunk this Tile resides in yet? + if (mCurrentChunk == null) { + int xTile = getBaseMetaTileEntity().getXCoord(); + int zTile = getBaseMetaTileEntity().getZCoord(); + createInitialWorkingChunk(aBaseMetaTileEntity, xTile, zTile); + } + + // Try unload all chunks if fail to meet global chunkloading conditions. + if (StaticChunkFunctions.onPostTick(aBaseMetaTileEntity, aTick)) { + // Can this tile actively chunkload? + if (getChunkLoadingActive()) { + // Consume some power + this.setEUVar(this.getEUVar() - (maxEUInput() * maxAmperesIn())); + + // Do we need to re-request tickets? + if (getDoesWorkChunkNeedReload()) { + // Request ticket for current chunk. + GTPP_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), mCurrentChunk); + // Request a ticket for each chunk we have mapped out in a spiral pattern. + if (!mLoadedChunks.isEmpty()) { + for (ChunkCoordIntPair Y : mLoadedChunks) { + GTPP_ChunkManager.requestChunkLoad((TileEntity)getBaseMetaTileEntity(), Y); + } + } + setDoesWorkChunkNeedReload(false); + } + + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + StaticChunkFunctions.saveNBTDataForTileEntity(this.getBaseMetaTileEntity(), aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + StaticChunkFunctions.loadNBTDataForTileEntity(this.getBaseMetaTileEntity(), aNBT); + } + + @Override + public long maxAmperesIn() { + return 2; + } + + @Override + public long getMinimumStoredEU() { + return V[mTier] * 2; + } + + @Override + public long maxEUStore() { + return V[mTier] * 256; + } + + @Override + public long maxEUInput() { + return V[mTier]; + } + + + /* + * Chunkloading Vars + */ + + private long mTicksRemainingForChunkloading = -1; + private ChunkCoordIntPair mCurrentChunk; + private Set mLoadedChunks = new HashSet(); + private boolean mRefreshChunkTickets = false; + + @Override + public long getTicksRemaining() { + return -1; + } + + @Override + public void setTicksRemaining(long aTicks) { + mTicksRemainingForChunkloading = aTicks; + } + + @Override + public ChunkCoordIntPair getResidingChunk() { + return mCurrentChunk; + } + + @Override + public void setResidingChunk(ChunkCoordIntPair aCurrentChunk) { + mCurrentChunk = aCurrentChunk; + } + + @Override + public boolean getChunkLoadingActive() { + return this.getEUVar() >= maxEUInput() * maxAmperesIn(); + } + + @Override + public void setChunkLoadingActive(boolean aActive) { + + } + + @Override + public boolean getDoesWorkChunkNeedReload() { + return mRefreshChunkTickets; + } + + @Override + public void setDoesWorkChunkNeedReload(boolean aActive) { + mRefreshChunkTickets = aActive; + } + + @Override + public boolean addChunkToLoadedList(ChunkCoordIntPair aActiveChunk) { + return mLoadedChunks.add(aActiveChunk); + } + + @Override + public boolean removeChunkFromLoadedList(ChunkCoordIntPair aActiveChunk) { + return mLoadedChunks.remove(aActiveChunk); + } + + @Override + public Set getManagedChunks() { + return mLoadedChunks; + } + + @Override + public void onRemoval() { + StaticChunkFunctions.onRemoval(getBaseMetaTileEntity()); + super.onRemoval(); + } + + public static Set spiralChunks(final IGregTechTileEntity aBaseMetaTileEntity, int X, int Z) { + World w = aBaseMetaTileEntity.getWorld(); + HashSet aSet = new HashSet(); + if (w == null) { + return aSet; + } + Chunk thisChunk = w.getChunkFromBlockCoords(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getZCoord()); + ChunkCoordIntPair aChunkCo = new ChunkCoordIntPair(thisChunk.xPosition, thisChunk.zPosition); + int x,z,dx,dz; + x = z = dx =0; + dz = -1; + int t = Math.max(X,Z); + int maxI = t*t; + for(int i =0; i < maxI; i++){ + if ((-X/2 <= x) && (x <= X/2) && (-Z/2 <= z) && (z <= Z/2)){ + Chunk C = w.getChunkFromChunkCoords(aChunkCo.chunkXPos + x, aChunkCo.chunkZPos + z); + if (C != null) { + aSet.add(new ChunkCoordIntPair(C.xPosition, C.zPosition)); + } + } + if( (x == z) || ((x < 0) && (x == -z)) || ((x > 0) && (x == 1-z))){ + t = dx; + dx = -dz; + dz = t; + } + x += dx; + z += dz; + } + return aSet; + } + + @Override + public int getChunkloaderTier() { + return mTier; + } + + public void createInitialWorkingChunk(IGregTechTileEntity aBaseMetaTileEntity, int aTileX, int aTileZ) { + final int centerX = aTileX >> 4; + final int centerZ = aTileZ >> 4; + addChunkToLoadedList(new ChunkCoordIntPair(centerX, centerZ)); + GTPP_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity.getMetaTileEntity(), getResidingChunk()); + // If this surrounding chunk map for this tile is empty, we spiral out and map chunks to keep loaded. + if (getManagedChunks().isEmpty()) { + int aChunks = GregtechMetaTileEntityChunkLoader.getMaxChunksToLoadForTier(getChunkloaderTier()); + mLoadedChunks.addAll(spiralChunks(aBaseMetaTileEntity, getChunkloaderTier(), getChunkloaderTier())); + } + if (!mLoadedChunks.isEmpty()) { + for (ChunkCoordIntPair Y : mLoadedChunks) { + GTPP_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity.getMetaTileEntity(), Y); + } + } + setDoesWorkChunkNeedReload(false); + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java new file mode 100644 index 0000000000..8456f40797 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java @@ -0,0 +1,204 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTileEntity { + + public GregtechMetaTileEntityThaumcraftResearcher(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); + } + + public GregtechMetaTileEntityThaumcraftResearcher(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, "Generates Thaumcraft research notes, because it's magic."}; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_A)}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_B)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{getSides(aColor)[0]}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return getFront(aColor); + } + + + public ITexture[] getBackActive(final byte aColor) { + return getBack(aColor); + } + + + public ITexture[] getBottomActive(final byte aColor) { + return getBottom(aColor); + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return getSides(aColor); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityThaumcraftResearcher(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); + } + + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isElectric() {return true;} + @Override public boolean isValidSlot(final int aIndex) {return true;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isEnetOutput() {return false;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getBackFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 0;} + @Override public long maxEUStore() {return 512000;} + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public int getCapacity() { + return 128000; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + } + return true; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return aSide==this.getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return true; + } + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName(), + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int getSizeInventory() { + return 2; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + //aNBT.setInteger("mCurrentPollution", this.mCurrentPollution); + //aNBT.setInteger("mAveragePollution", this.mAveragePollution); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + //this.mCurrentPollution = aNBT.getInteger("mCurrentPollution"); + //this.mAveragePollution = aNBT.getInteger("mAveragePollution"); + } + + @Override + public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java new file mode 100644 index 0000000000..99b3faa7d4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java @@ -0,0 +1,71 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gregtech.api.util.GTPP_Recipe; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_BasicWasher extends GT_MetaTileEntity_BasicMachine { + + public GregtechMetaTileEntity_BasicWasher(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, + "It's like an automatic Cauldron for washing dusts.", 1, 1, "PotionBrewer.png", "", + new ITexture[]{ + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) + } + ); + } + + public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + /*public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + }*/ + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, "Grants no byproducts, but it is fast.", CORE.GT_Tooltip}; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_BasicWasher(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return (aFluid.getFluid().getName().equals("water")) || (super.isFluidInputAllowed(aFluid)); + } + + @Override + public int getCapacity() { + return 8000 * Math.max(1, this.mTier); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java new file mode 100644 index 0000000000..c872e5c912 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java @@ -0,0 +1,666 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import static gregtech.api.enums.GT_Values.E; + +import java.util.HashSet; +import java.util.List; + +import cpw.mods.fml.common.registry.LanguageRegistry; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.slots.SlotChemicalPlantInput; +import gtPlusPlus.xmod.gregtech.api.gui.fluidreactor.Container_FluidReactor; +import gtPlusPlus.xmod.gregtech.api.gui.fluidreactor.GUI_FluidReactor; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; + +public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_BasicMachine { + + public boolean mFluidTransfer_1 = false; + public boolean mFluidTransfer_2 = false; + + public FluidStack[] mInputFluids = new FluidStack[4]; + public FluidStack[] mOutputFluids = new FluidStack[2]; + + public GregtechMetaTileEntity_ChemicalReactor(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, + "For mixing fluids", 4, 4, "ChemicalReactor.png", "", + new ITexture[]{ + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side_Active), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front_Active), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active), + new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top) + } + ); + } + + public GregtechMetaTileEntity_ChemicalReactor(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + /*public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + }*/ + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, "Because why not?", CORE.GT_Tooltip}; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + try { + GregtechMetaTileEntity_ChemicalReactor y = new GregtechMetaTileEntity_ChemicalReactor(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return y; + } + catch(Throwable t) { + t.printStackTrace(); + } + return null; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + try { + Container_FluidReactor y = new Container_FluidReactor(aPlayerInventory, aBaseMetaTileEntity); + return y; + } + catch(Throwable t) { + t.printStackTrace(); + } + return null; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_FluidReactor(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), + this.mGUIName, + GT_Utility.isStringValid(this.mNEIName) + ? this.mNEIName + : (this.getRecipeList() != null ? this.getRecipeList().mUnlocalizedName : "")); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return null; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return (super.isFluidInputAllowed(aFluid)); + } + + @Override + public int getCapacity() { + return 32000 * Math.max(1, this.mTier) / 4; + } + + @Override + public int getInputSlot() { + return 3; + } + + @Override + public boolean isLiquidInput(byte aSide) { + return aSide > 1; + } + + @Override + public boolean isLiquidOutput(byte aSide) { + return aSide < 2; + } + + @Override + public int getOutputSlot() { + return super.getOutputSlot(); + } + + @Override + public int getStackDisplaySlot() { + return super.getStackDisplaySlot(); + } + + @Override + public boolean doesEmptyContainers() { + return true; + } + + @Override + public boolean canTankBeFilled() { + return super.canTankBeFilled(); + } + + @Override + public boolean canTankBeEmptied() { + return super.canTankBeEmptied(); + } + + @Override + public FluidStack getDisplayedFluid() { + return super.getDisplayedFluid(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mFluidTransfer_1", mFluidTransfer_1); + aNBT.setBoolean("mFluidTransfer_2", mFluidTransfer_2); + for (int i=0;i<4;i++) { + if (this.mInputFluids[i] != null) { + aNBT.setTag("mInputFluid"+i, this.mInputFluids[i].writeToNBT(new NBTTagCompound())); + } + } + for (int i=0;i<2;i++) { + if (this.mOutputFluids[i] != null) { + aNBT.setTag("mOutputFluid"+i, this.mOutputFluids[i].writeToNBT(new NBTTagCompound())); + } + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mFluidTransfer_1 = aNBT.getBoolean("mFluidTransfer_1"); + mFluidTransfer_2 = aNBT.getBoolean("mFluidTransfer_2"); + for (int i=0;i<4;i++) { + if (this.mInputFluids[i] == null) { + this.mInputFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mInputFluid"+i)); + } + } + for (int i=0;i<2;i++) { + if (this.mOutputFluids[i] == null) { + this.mOutputFluids[i] = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mOutputFluid"+i)); + } + } + } + + /* + * Custom Fluid Handling - TODO + */ + + public FluidStack getFillableStack() { + return this.mFluid; + } + + public FluidStack setFillableStack(FluidStack aFluid) { + this.mFluid = aFluid; + return this.mFluid; + } + + public FluidStack getDrainableStack() { + return this.mFluid; + } + + public FluidStack setDrainableStack(FluidStack aFluid) { + this.mFluid = aFluid; + return this.mFluid; + } + + + + + + + + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + // Re-implement basic machine logic from the ground up.= + + if (aBaseMetaTileEntity.isServerSide()) { + this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; + this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; + this.doDisplayThings(); + boolean tSucceeded = false; + int i; + if (this.mMaxProgresstime > 0 && (this.mProgresstime >= 0 || aBaseMetaTileEntity.isAllowedToWork())) { + aBaseMetaTileEntity.setActive(true); + if (this.mProgresstime >= 0 && !this.drainEnergyForProcess((long) this.mEUt)) { + if (!this.mStuttering) { + this.stutterProcess(); + if (this.canHaveInsufficientEnergy()) { + this.mProgresstime = -100; + } + + this.mStuttering = true; + } + } else { + if (++this.mProgresstime >= this.mMaxProgresstime) { + for (i = 0; i < this.mOutputItems.length; ++i) { + for (i = 0; i < this.mOutputItems.length && !aBaseMetaTileEntity.addStackToSlot( + this.getOutputSlot() + (i + i) % this.mOutputItems.length, + this.mOutputItems[i]); ++i) { + ; + } + } + + if (this.mOutputFluid != null) { + if (this.getDrainableStack() == null) { + this.setDrainableStack(this.mOutputFluid.copy()); + } else if (this.mOutputFluid.isFluidEqual(this.getDrainableStack())) { + FluidStack var10000 = this.getDrainableStack(); + var10000.amount += this.mOutputFluid.amount; + } + } + + for (i = 0; i < this.mOutputItems.length; ++i) { + this.mOutputItems[i] = null; + } + + this.mOutputFluid = null; + this.mEUt = 0; + this.mProgresstime = 0; + this.mMaxProgresstime = 0; + this.mStuttering = false; + tSucceeded = true; + this.endProcess(); + } + + if (this.mProgresstime > 5) { + this.mStuttering = false; + } + } + } else { + aBaseMetaTileEntity.setActive(false); + } + + boolean tRemovedOutputFluid = false; + if (this.doesAutoOutputFluids() && this.getDrainableStack() != null + && aBaseMetaTileEntity.getFrontFacing() != this.mMainFacing && (tSucceeded || aTick % 20L == 0L)) { + IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing()); + if (tTank != null) { + FluidStack tDrained = this.drain(1000, false); + if (tDrained != null) { + int tFilledAmount = tTank.fill( + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); + if (tFilledAmount > 0) { + tTank.fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + this.drain(tFilledAmount, true), true); + } + } + } + + if (this.getDrainableStack() == null) { + tRemovedOutputFluid = true; + } + } + + int j; + if (this.doesAutoOutput() && !this.isOutputEmpty() + && aBaseMetaTileEntity.getFrontFacing() != this.mMainFacing + && (tSucceeded || this.mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() + || aTick % 600L == 0L)) { + TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing()); + j = 0; + + for (byte tCosts = 1; j < this.mOutputItems.length && tCosts > 0 + && aBaseMetaTileEntity.isUniversalEnergyStored(128L); ++j) { + tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, + aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), (List) null, + false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + if (tCosts > 0) { + aBaseMetaTileEntity.decreaseStoredEnergyUnits((long) tCosts, true); + } + } + } + + if (this.mOutputBlocked != 0) { + if (this.isOutputEmpty()) { + this.mOutputBlocked = 0; + } else { + ++this.mOutputBlocked; + } + } + + if (this.allowToCheckRecipe()) { + if (this.mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() + && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() + || aTick % 600L == 0L || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) + && this.hasEnoughEnergyToCheckRecipe()) { + if (this.checkRecipe() == 2) { + if (this.mInventory[3] != null && this.mInventory[3].stackSize <= 0) { + this.mInventory[3] = null; + } + + i = this.getInputSlot(); + + for (j = i + this.mInputSlotCount; i < j; ++i) { + if (this.mInventory[i] != null && this.mInventory[i].stackSize <= 0) { + this.mInventory[i] = null; + } + } + + for (i = 0; i < this.mOutputItems.length; ++i) { + this.mOutputItems[i] = GT_Utility.copy(new Object[]{this.mOutputItems[i]}); + if (this.mOutputItems[i] != null && this.mOutputItems[i].stackSize > 64) { + this.mOutputItems[i].stackSize = 64; + } + + this.mOutputItems[i] = GT_OreDictUnificator.get(true, this.mOutputItems[i]); + } + + if (this.mFluid != null && this.mFluid.amount <= 0) { + this.mFluid = null; + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + if (GT_Utility.isDebugItem(this.mInventory[this.dechargerSlotStartIndex()])) { + this.mEUt = this.mMaxProgresstime = 1; + } + + this.startProcess(); + } else { + this.mMaxProgresstime = 0; + + for (i = 0; i < this.mOutputItems.length; ++i) { + this.mOutputItems[i] = null; + } + + this.mOutputFluid = null; + } + } + } else if (!this.mStuttering) { + this.stutterProcess(); + this.mStuttering = true; + } + } + + + + } + + @Override + protected void doDisplayThings() { + // TODO Auto-generated method stub + super.doDisplayThings(); + } + + @Override + protected ItemStack getSpecialSlot() { + // TODO Auto-generated method stub + return super.getSpecialSlot(); + } + + @Override + protected ItemStack getOutputAt(int aIndex) { + // TODO Auto-generated method stub + return super.getOutputAt(aIndex); + } + + @Override + protected ItemStack[] getAllOutputs() { + // TODO Auto-generated method stub + return super.getAllOutputs(); + } + + @Override + protected ItemStack getInputAt(int aIndex) { + // TODO Auto-generated method stub + return super.getInputAt(aIndex); + } + + @Override + protected ItemStack[] getAllInputs() { + // TODO Auto-generated method stub + return super.getAllInputs(); + } + + @Override + protected boolean displaysInputFluid() { + return true; + } + + @Override + protected boolean displaysOutputFluid() { + return true; + } + + @Override + public boolean doesAutoOutput() { + return super.doesAutoOutput(); + } + + @Override + public boolean doesAutoOutputFluids() { + return this.mFluidTransfer_1 && this.mFluidTransfer_2; + } + + @Override + public void startProcess() { + super.startProcess(); + } + + @Override + public void endProcess() { + super.endProcess(); + } + + @Override + public String[] getInfoData() { + return super.getInfoData(); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return super.allowPullStack(aBaseMetaTileEntity, aIndex, aSide, aStack); + } + + @Override + public int checkRecipe() { + return super.checkRecipe(); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + + /* if (aBaseMetaTileEntity != null) { + if (!aBaseMetaTileEntity.getWorld().isRemote) { + itemslots : for (int i=3;i<7;i++) { + ItemStack aStack = aBaseMetaTileEntity.getStackInSlot(i); + if (aStack != null) { + if (FluidContainerRegistry.isContainer(aStack)) { + if (this.isItemValidForSlot(i, aStack)) { + // Add Fluid + FluidStack aContainerFluid = FluidContainerRegistry.getFluidForFilledItem(aStack); + if (aContainerFluid != null) { + fluidslots : for (FluidStack u : mInputFluids) { + if (u != null && u.isFluidEqual(aContainerFluid)) { + if (u.amount <= (this.getCapacity() - aContainerFluid.amount)) { + + // Matching, not full, let's fill, then continue + u.amount += aContainerFluid.amount; + + // Update stack size + if (aStack.stackSize > 1) { + aStack.stackSize--; + } + else { + aStack = null; + } + + // Add Output container + // TODO + + continue itemslots; + } + else { + // Too full + break fluidslots; + } + } + else { + if (u == null ) { + + // Empty, let's fill, then continue + u = aContainerFluid.copy(); + + // Update stack size + if (aStack.stackSize > 1) { + aStack.stackSize--; + } + else { + aStack = null; + } + + // Add Output container + // TODO + + continue itemslots; + + } + else { + // Not empty, doesn't match, check next slot. + continue fluidslots; + } + } + } + + + + } + // Eat Input + + // Add Container to Output + } + } + } + } + } + }*/ + + } + + @Override + public FluidStack getFluid() { + return super.getFluid(); + } + + @Override + public int getFluidAmount() { + return super.getFluidAmount(); + } + + @Override + public int fill(FluidStack aFluid, boolean doFill) { + return super.fill(aFluid, doFill); + } + + @Override + public FluidStack drain(int maxDrain, boolean doDrain) { + return super.drain(maxDrain, doDrain); + } + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + super.setItemNBT(aNBT); + } + + @Override + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + if (aIndex >= 3 && aIndex <= 6) { + return SlotChemicalPlantInput.isItemValidForChemicalPlantSlot(aStack); + } + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + return super.getAccessibleSlotsFromSide(aSide); + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + if (aIndex >= 3 && aIndex <= 6) { + return super.canInsertItem(aIndex, aStack, aSide); + } + return false; + } + + @Override + public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide) { + if (aIndex >= 7 && aIndex <= 11) { + return super.canExtractItem(aIndex, aStack, aSide); + } + return false; + } + + @Override + public boolean canFill(ForgeDirection aSide, Fluid aFluid) { + // TODO Auto-generated method stub + return super.canFill(aSide, aFluid); + } + + @Override + public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { + // TODO Auto-generated method stub + return super.canDrain(aSide, aFluid); + } + + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { + // TODO Auto-generated method stub + return super.getTankInfo(aSide); + } + + @Override + public int fill_default( + ForgeDirection aSide, FluidStack aFluid, boolean doFill + ) { + // TODO Auto-generated method stub + return super.fill_default(aSide, aFluid, doFill); + } + + @Override + public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + // TODO Auto-generated method stub + return super.fill(aSide, aFluid, doFill); + } + + @Override + public FluidStack drain( + ForgeDirection aSide, FluidStack aFluid, boolean doDrain + ) { + // TODO Auto-generated method stub + return super.drain(aSide, aFluid, doDrain); + } + + @Override + public FluidStack drain( + ForgeDirection aSide, int maxDrain, boolean doDrain + ) { + // TODO Auto-generated method stub + return super.drain(aSide, maxDrain, doDrain); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java new file mode 100644 index 0000000000..2197ce193d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java @@ -0,0 +1,702 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEntity_DeluxeMachine { + + private boolean mCanProcessRecipe = false; + private boolean mCharging = false; + private long mChargeConsumed = 0; + + private GT_Recipe mLastRecipe; + private long mEUStore; + private boolean mRunningOnLoad = false; + private boolean mMachine = false; + private int mEfficiency, mEfficiencyIncrease, mEfficiencyMax = 0; + private int mStartUpCheck = 100, mUpdate = 0; + private FluidStack[] mOutputFluids = null; + + public GregtechMetaTileEntity_CompactFusionReactor(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "It's like a midget Ra.", 1, 1, "PotionBrewer.png", ""); + } + + public GregtechMetaTileEntity_CompactFusionReactor(String aName, int aTier, String aDescription, + ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + @Override + public String[] getDescription() { + return new String[] { this.mDescription, "Not Very Fast, but not very big either.", + "Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.", + "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2." }; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_CompactFusionReactor(this.mName, this.mTier, this.mDescription, + this.mTextures, this.mGUIName, this.mNEIName); + } + + public int tier() { + return this.mTier; + } + + public int tierOverclock() { + return this.mTier == 6 ? 0 : this.mTier == 7 ? 1 : 2; + } + + private GT_RenderedTexture getCasingTexture() { + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1]; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return (aFluid.getFluid().getName().contains("plasma")) || (super.isFluidInputAllowed(aFluid)); + } + + @Override + public int getCapacity() { + return 32000; + } + + @Override + public void abortProcess() { + super.abortProcess(); + } + + long mFusionPoint = 20000000L; + + @Override + public int checkRecipe() { + Logger.MACHINE_INFO("Recipe Tick 1."); + if (!this.mCanProcessRecipe) { + Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); + if (this.mChargeConsumed < mFusionPoint) { + Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + this.mCharging = true; + this.mCanProcessRecipe = false; + if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { + Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + + mFusionPoint); + mChargeConsumed += (mFusionPoint / 100); + } + } + else { + mChargeConsumed = 0; + this.mCharging = false; + this.mCanProcessRecipe = true; + + } + } + else { + Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); + if (checkRecipeMulti()) { + Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); + return 2; + } + } + Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); + return 0; + } + + public ArrayList getStoredFluids() { + ArrayList mList = new ArrayList(); + mList.add(this.mFluid); + mList.add(this.mFluid2); + return mList; + } + + public boolean checkRecipeMulti() { + ArrayList tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } + else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + } + if (tFluidList.size() > 1) { + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); + GT_Recipe tRecipe = getRecipeList().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, + GT_Values.V[8], tFluids, new ItemStack[] {}); + if (tRecipe == null) { + return false; + } + if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { + this.mLastRecipe = null; + Logger.MACHINE_INFO("Just plain bad."); + return false; + } + if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { + this.mLastRecipe = tRecipe; + this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); + this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); + + this.mEfficiencyIncrease = 10000; + + this.mOutputFluids = this.mLastRecipe.mFluidOutputs; + mRunningOnLoad = false; + return true; + } + } + return false; + } + + public int overclock(int mStartEnergy) { + if (tierOverclock() == 1) { + return 1; + } + if (tierOverclock() == 2) { + return mStartEnergy < 160000000 ? 2 : 1; + } + return mStartEnergy < 160000000 ? 4 : mStartEnergy < 320000000 ? 2 : 1; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean doesAutoOutputFluids() { + return true; + } + + @Override + public boolean doesEmptyContainers() { + return true; + } + + @Override + public boolean doesFillContainers() { + return true; + } + + @Override + public long maxAmperesIn() { + return 16L; + } + + @Override + public long maxEUStore() { + return Long.MAX_VALUE; + } + + @Override + public void doExplosion(long aExplosionPower) { + super.doExplosion(aExplosionPower * 2); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + onRunningTickMulti(); + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) + && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) + && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { + if (MathUtils.randInt(0, 4) == 4) { + final Random tRandom = aBaseMetaTileEntity.getWorld().rand; + aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", + (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), + aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), + (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D); + aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", + (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F), + aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F), + (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), 0.0D, 0.0D, 0.0D); + aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", + (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F), + aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F), + (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("mCanProcessRecipe", this.mCanProcessRecipe); + aNBT.setBoolean("mCharging", this.mCharging); + aNBT.setLong("mChargeConsumed", this.mChargeConsumed); + aNBT.setInteger("mEfficiency", this.mEfficiency); + aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease); + aNBT.setInteger("mEfficiencyMax", this.mEfficiencyMax); + aNBT.setInteger("mStartUpCheck", this.mStartUpCheck); + aNBT.setInteger("mUpdate", mUpdate); + aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease); + aNBT.setBoolean("mRunningOnLoad", this.mRunningOnLoad); + aNBT.setBoolean("mMachine", this.mMachine); + aNBT.setLong("mEUStore", this.mEUStore); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + if (mMaxProgresstime > 0) + mRunningOnLoad = true; + this.mCanProcessRecipe = aNBT.getBoolean("mCanProcessRecipe"); + this.mCharging = aNBT.getBoolean("mCharging"); + this.mChargeConsumed = aNBT.getLong("mChargeConsumed"); + this.mEfficiency = aNBT.getInteger("mEfficiency"); + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mEfficiencyMax = aNBT.getInteger("mEfficiencyMax"); + this.mStartUpCheck = aNBT.getInteger("mStartUpCheck"); + this.mUpdate = aNBT.getInteger("mUpdate"); + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mRunningOnLoad = aNBT.getBoolean("mRunningOnLoad"); + this.mMachine = aNBT.getBoolean("mMachine"); + this.mEUStore = aNBT.getLong("mEUStore"); + super.loadNBTData(aNBT); + } + + @Override + public String[] getInfoData() { + String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III"; + float plasmaOut = 0; + String fusionName = ""; + int powerRequired = 0; + if (this.mLastRecipe != null) { + fusionName = this.mLastRecipe.mFluidOutputs[0].getLocalizedName() + " Fusion."; + powerRequired = this.mLastRecipe.mEUt; + if (this.mLastRecipe.getFluidOutput(0) != null) { + plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration; + } + } + + return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t", + "Stored EU: " + this.getEUVar() + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t", + "Current Recipe: " + fusionName }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab) }; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), + new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + } + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), + new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active) }; + } + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + } + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; + } + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; + } + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), + new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) }; + } + + @Override + public void onMachineBlockUpdate() { + this.mUpdate = 50; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + // super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + // Logger.MACHINE_INFO("1"); + if (mEfficiency < 0) + mEfficiency = 0; + if (mRunningOnLoad) { + Logger.MACHINE_INFO("2"); + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + checkRecipeMulti(); + } + if (--mUpdate == 0 || --mStartUpCheck == 0) { + Logger.MACHINE_INFO("3"); + mMachine = true; + } + if (mStartUpCheck < 0) { + //Logger.MACHINE_INFO("4"); + if (mMachine) { + //Logger.MACHINE_INFO("5"); + + if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { + if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { + //Logger.MACHINE_INFO("5.5 A"); + } + else { + //Logger.MACHINE_INFO("5.5 B"); + } + } + if (this.mEUStore <= 0 && mMaxProgresstime > 0) { + Logger.MACHINE_INFO("6"); + stopMachine(); + this.mLastRecipe = null; + } + if (mMaxProgresstime > 0) { + Logger.MACHINE_INFO("7"); + this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); + if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { + if (mOutputFluids != null) + for (FluidStack tStack : mOutputFluids) + if (tStack != null) + addOutput(tStack); + mEfficiency = Math.max(0, (mEfficiency + mEfficiencyIncrease)); + mProgresstime = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + if (mOutputFluids != null && mOutputFluids.length > 0) { + + } + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + if (aBaseMetaTileEntity.isAllowedToWork()) + checkRecipeMulti(); + } + } + else { + //Logger.MACHINE_INFO("8"); + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() + || aBaseMetaTileEntity.hasInventoryBeenModified()) { + Logger.MACHINE_INFO("9"); + // turnCasingActive(mMaxProgresstime > 0); + if (aBaseMetaTileEntity.isAllowedToWork()) { + Logger.MACHINE_INFO("10"); + if (checkRecipeMulti()) { + Logger.MACHINE_INFO("11"); + if (this.mEUStore < this.mLastRecipe.mSpecialValue) { + Logger.MACHINE_INFO("12"); + mMaxProgresstime = 0; + // turnCasingActive(false); + } + aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true); + } + } + if (mMaxProgresstime <= 0) + mEfficiency = Math.max(0, mEfficiency - 1000); + } + } + } + else { + // turnCasingActive(false); + Logger.MACHINE_INFO("Bad"); + this.mLastRecipe = null; + stopMachine(); + } + } + Logger.MACHINE_INFO("Good | "+mMaxProgresstime); + aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); + } + } + + public boolean onRunningTickMulti() { + if (this.getBaseMetaTileEntity().isServerSide()) { + if (mEUt < 0) { + if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { + this.mLastRecipe = null; + stopMachine(); + Logger.MACHINE_INFO("a1"); + return false; + } + } + if (this.mEUStore <= 0) { + this.mLastRecipe = null; + stopMachine(); + Logger.MACHINE_INFO("a2"); + return false; + } + } + return true; + } + + public boolean drainEnergyInput(long aEU) { + return false; + } + + public boolean addOutput(FluidStack aLiquid) { + if (aLiquid == null) + return false; + FluidStack copiedFluidStack = aLiquid.copy(); + this.mOutputFluid = copiedFluidStack; + return false; + } + + public void stopMachine() { + mEUt = 0; + mEfficiency = 0; + mProgresstime = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + getBaseMetaTileEntity().disableWorking(); + } + + @Override + public boolean isLiquidInput(byte aSide) { + switch (aSide) { + case 0: + return true; + case 1: + return true; + case 2: + return true; + case 3: + return false; + case 4: + return false; + case 5: + return false; + default: + return false; + } + } + + @Override + public boolean isLiquidOutput(byte aSide) { + switch (aSide) { + case 0: + return false; + case 1: + return false; + case 2: + return false; + case 3: + return true; + case 4: + return true; + case 5: + return true; + default: + return true; + } + } + + @Override + public int fill(FluidStack aFluid, boolean doFill) { + return super.fill(aFluid, doFill); + } + + @Override + public FluidStack drain(int maxDrain, boolean doDrain) { + return super.drain(maxDrain, doDrain); + } + + @Override + public int getTankPressure() { + return 500; + } + + @Override + public boolean canFill(ForgeDirection aSide, Fluid aFluid) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return false; + } + else { + return super.canFill(aSide, aFluid); + } + } + + @Override + public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.canDrain(aSide, aFluid); + } + else { + return false; + } + } + + @Override + public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return 0; + } + else { + return super.fill_default(aSide, aFluid, doFill); + } + } + + @Override + public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.fill(aSide, aFluid, doFill); + } + else { + return 0; + } + } + + @Override + public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.drain(aSide, aFluid, doDrain); + } + else { + return null; + } + } + + @Override + public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.drain(aSide, maxDrain, doDrain); + } + else { + return null; + } + } + + @Override + public boolean isOverclockerUpgradable() { + return true; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + // TODO Auto-generated method stub + return super.onRightclick(aBaseMetaTileEntity, aPlayer); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + // TODO Auto-generated method stub + return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + // TODO Auto-generated method stub + return super.getServerGUI(aID, aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + // TODO Auto-generated method stub + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + return false; + } + + @Override + public void onExplosion() { + // TODO Auto-generated method stub + super.onExplosion(); + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, + aZ); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java new file mode 100644 index 0000000000..6cae58ced2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java @@ -0,0 +1,704 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_DeluxeMachine { + + private boolean mCanProcessRecipe = false; + private boolean mCharging = false; + private long mChargeConsumed = 0; + + private GT_Recipe mLastRecipe; + private long mEUStore; + private boolean mRunningOnLoad = false; + private boolean mMachine = false; + private int mEfficiency, mEfficiencyIncrease, mEfficiencyMax = 0; + private int mStartUpCheck = 100, mUpdate = 0; + private FluidStack[] mOutputFluids = null; + + public GregtechMetaTileEntity_PocketFusion(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "It's like a midget Ra.", 1, 1, "PotionBrewer.png", ""); + } + + public GregtechMetaTileEntity_PocketFusion(String aName, int aTier, String aDescription, + ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + @Override + public String[] getDescription() { + return new String[] { this.mDescription, "Not Very Fast, but not very big either.", + "Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.", + "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2.", CORE.GT_Tooltip }; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_PocketFusion(this.mName, this.mTier, this.mDescription, + this.mTextures, this.mGUIName, this.mNEIName); + } + + public int tier() { + return this.mTier; + } + + public int tierOverclock() { + return this.mTier == 6 ? 0 : this.mTier == 7 ? 1 : 2; + } + + private GT_RenderedTexture getCasingTexture() { + return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1]; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide == this.getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return (aFluid.getFluid().getName().contains("plasma")) || (super.isFluidInputAllowed(aFluid)); + } + + @Override + public int getCapacity() { + return 32000; + } + + @Override + public void abortProcess() { + super.abortProcess(); + } + + long mFusionPoint = 20000000L; + + @Override + public int checkRecipe() { + Logger.MACHINE_INFO("Recipe Tick 1."); + if (!this.mCanProcessRecipe) { + Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); + if (this.mChargeConsumed < mFusionPoint) { + Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + this.mCharging = true; + this.mCanProcessRecipe = false; + if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { + Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + + mFusionPoint); + mChargeConsumed += (mFusionPoint / 100); + } + } + else { + mChargeConsumed = 0; + this.mCharging = false; + this.mCanProcessRecipe = true; + + } + } + else { + Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); + if (checkRecipeMulti()) { + Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); + return 2; + } + } + Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); + return 0; + } + + public ArrayList getStoredFluids() { + ArrayList mList = new ArrayList(); + mList.add(this.mFluid); + mList.add(this.mFluid2); + return mList; + } + + public boolean checkRecipeMulti() { + ArrayList tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } + else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + } + if (tFluidList.size() > 1) { + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); + GT_Recipe tRecipe = getRecipeList().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, + GT_Values.V[8], tFluids, new ItemStack[] {}); + + if (tRecipe == null) { + return false; + } + + if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { + this.mLastRecipe = null; + Logger.MACHINE_INFO("Just plain bad."); + return false; + } + if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { + this.mLastRecipe = tRecipe; + this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); + this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); + + this.mEfficiencyIncrease = 10000; + + this.mOutputFluids = this.mLastRecipe.mFluidOutputs; + mRunningOnLoad = false; + return true; + } + } + return false; + } + + public int overclock(int mStartEnergy) { + if (tierOverclock() == 1) { + return 1; + } + if (tierOverclock() == 2) { + return mStartEnergy < 160000000 ? 2 : 1; + } + return mStartEnergy < 160000000 ? 4 : mStartEnergy < 320000000 ? 2 : 1; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean doesAutoOutputFluids() { + return true; + } + + @Override + public boolean doesEmptyContainers() { + return true; + } + + @Override + public boolean doesFillContainers() { + return true; + } + + @Override + public long maxAmperesIn() { + return 16L; + } + + @Override + public long maxEUStore() { + return Long.MAX_VALUE; + } + + @Override + public void doExplosion(long aExplosionPower) { + super.doExplosion(aExplosionPower * 2); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + onRunningTickMulti(); + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) + && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) + && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { + if (MathUtils.randInt(0, 4) == 4) { + final Random tRandom = aBaseMetaTileEntity.getWorld().rand; + aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", + (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), + aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), + (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D); + aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", + (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F), + aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F), + (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), 0.0D, 0.0D, 0.0D); + aBaseMetaTileEntity.getWorld().spawnParticle("magicCrit", + (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F), + aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F), + (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("mCanProcessRecipe", this.mCanProcessRecipe); + aNBT.setBoolean("mCharging", this.mCharging); + aNBT.setLong("mChargeConsumed", this.mChargeConsumed); + aNBT.setInteger("mEfficiency", this.mEfficiency); + aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease); + aNBT.setInteger("mEfficiencyMax", this.mEfficiencyMax); + aNBT.setInteger("mStartUpCheck", this.mStartUpCheck); + aNBT.setInteger("mUpdate", mUpdate); + aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease); + aNBT.setBoolean("mRunningOnLoad", this.mRunningOnLoad); + aNBT.setBoolean("mMachine", this.mMachine); + aNBT.setLong("mEUStore", this.mEUStore); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + if (mMaxProgresstime > 0) + mRunningOnLoad = true; + this.mCanProcessRecipe = aNBT.getBoolean("mCanProcessRecipe"); + this.mCharging = aNBT.getBoolean("mCharging"); + this.mChargeConsumed = aNBT.getLong("mChargeConsumed"); + this.mEfficiency = aNBT.getInteger("mEfficiency"); + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mEfficiencyMax = aNBT.getInteger("mEfficiencyMax"); + this.mStartUpCheck = aNBT.getInteger("mStartUpCheck"); + this.mUpdate = aNBT.getInteger("mUpdate"); + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease"); + this.mRunningOnLoad = aNBT.getBoolean("mRunningOnLoad"); + this.mMachine = aNBT.getBoolean("mMachine"); + this.mEUStore = aNBT.getLong("mEUStore"); + super.loadNBTData(aNBT); + } + + @Override + public String[] getInfoData() { + String tier = tier() == 6 ? "I" : tier() == 7 ? "II" : "III"; + float plasmaOut = 0; + String fusionName = ""; + int powerRequired = 0; + if (this.mLastRecipe != null) { + fusionName = this.mLastRecipe.mFluidOutputs[0].getLocalizedName() + " Fusion."; + powerRequired = this.mLastRecipe.mEUt; + if (this.mLastRecipe.getFluidOutput(0) != null) { + plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration; + } + } + + return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t", + "Stored EU: " + this.getEUVar() + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t", + "Current Recipe: " + fusionName }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab) }; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), + new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + } + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), + new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active) }; + } + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + } + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; + } + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; + } + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[] { this.getCasingTexture(), + new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) }; + } + + @Override + public void onMachineBlockUpdate() { + this.mUpdate = 50; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + // super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + // Logger.MACHINE_INFO("1"); + if (mEfficiency < 0) + mEfficiency = 0; + if (mRunningOnLoad) { + Logger.MACHINE_INFO("2"); + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + checkRecipeMulti(); + } + if (--mUpdate == 0 || --mStartUpCheck == 0) { + Logger.MACHINE_INFO("3"); + mMachine = true; + } + if (mStartUpCheck < 0) { + //Logger.MACHINE_INFO("4"); + if (mMachine) { + //Logger.MACHINE_INFO("5"); + + if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { + if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { + //Logger.MACHINE_INFO("5.5 A"); + } + else { + //Logger.MACHINE_INFO("5.5 B"); + } + } + if (this.mEUStore <= 0 && mMaxProgresstime > 0) { + Logger.MACHINE_INFO("6"); + stopMachine(); + this.mLastRecipe = null; + } + if (mMaxProgresstime > 0) { + Logger.MACHINE_INFO("7"); + this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); + if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { + if (mOutputFluids != null) + for (FluidStack tStack : mOutputFluids) + if (tStack != null) + addOutput(tStack); + mEfficiency = Math.max(0, (mEfficiency + mEfficiencyIncrease)); + mProgresstime = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + if (mOutputFluids != null && mOutputFluids.length > 0) { + + } + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + if (aBaseMetaTileEntity.isAllowedToWork()) + checkRecipeMulti(); + } + } + else { + //Logger.MACHINE_INFO("8"); + this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); + if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() + || aBaseMetaTileEntity.hasInventoryBeenModified()) { + Logger.MACHINE_INFO("9"); + // turnCasingActive(mMaxProgresstime > 0); + if (aBaseMetaTileEntity.isAllowedToWork()) { + Logger.MACHINE_INFO("10"); + if (checkRecipeMulti()) { + Logger.MACHINE_INFO("11"); + if (this.mEUStore < this.mLastRecipe.mSpecialValue) { + Logger.MACHINE_INFO("12"); + mMaxProgresstime = 0; + // turnCasingActive(false); + } + aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true); + } + } + if (mMaxProgresstime <= 0) + mEfficiency = Math.max(0, mEfficiency - 1000); + } + } + } + else { + // turnCasingActive(false); + Logger.MACHINE_INFO("Bad"); + this.mLastRecipe = null; + stopMachine(); + } + } + Logger.MACHINE_INFO("Good | "+mMaxProgresstime); + aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); + } + } + + public boolean onRunningTickMulti() { + if (this.getBaseMetaTileEntity().isServerSide()) { + if (mEUt < 0) { + if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { + this.mLastRecipe = null; + stopMachine(); + Logger.MACHINE_INFO("a1"); + return false; + } + } + if (this.mEUStore <= 0) { + this.mLastRecipe = null; + stopMachine(); + Logger.MACHINE_INFO("a2"); + return false; + } + } + return true; + } + + public boolean drainEnergyInput(long aEU) { + return false; + } + + public boolean addOutput(FluidStack aLiquid) { + if (aLiquid == null) + return false; + FluidStack copiedFluidStack = aLiquid.copy(); + this.mOutputFluid = copiedFluidStack; + return false; + } + + public void stopMachine() { + mEUt = 0; + mEfficiency = 0; + mProgresstime = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + getBaseMetaTileEntity().disableWorking(); + } + + @Override + public boolean isLiquidInput(byte aSide) { + switch (aSide) { + case 0: + return true; + case 1: + return true; + case 2: + return true; + case 3: + return false; + case 4: + return false; + case 5: + return false; + default: + return false; + } + } + + @Override + public boolean isLiquidOutput(byte aSide) { + switch (aSide) { + case 0: + return false; + case 1: + return false; + case 2: + return false; + case 3: + return true; + case 4: + return true; + case 5: + return true; + default: + return true; + } + } + + @Override + public int fill(FluidStack aFluid, boolean doFill) { + return super.fill(aFluid, doFill); + } + + @Override + public FluidStack drain(int maxDrain, boolean doDrain) { + return super.drain(maxDrain, doDrain); + } + + @Override + public int getTankPressure() { + return 500; + } + + @Override + public boolean canFill(ForgeDirection aSide, Fluid aFluid) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return false; + } + else { + return super.canFill(aSide, aFluid); + } + } + + @Override + public boolean canDrain(ForgeDirection aSide, Fluid aFluid) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.canDrain(aSide, aFluid); + } + else { + return false; + } + } + + @Override + public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return 0; + } + else { + return super.fill_default(aSide, aFluid, doFill); + } + } + + @Override + public int fill(ForgeDirection aSide, FluidStack aFluid, boolean doFill) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.fill(aSide, aFluid, doFill); + } + else { + return 0; + } + } + + @Override + public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.drain(aSide, aFluid, doDrain); + } + else { + return null; + } + } + + @Override + public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) { + if (aSide == ForgeDirection.UP || aSide == ForgeDirection.DOWN) { + return super.drain(aSide, maxDrain, doDrain); + } + else { + return null; + } + } + + @Override + public boolean isOverclockerUpgradable() { + return true; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + // TODO Auto-generated method stub + return super.onRightclick(aBaseMetaTileEntity, aPlayer); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + // TODO Auto-generated method stub + return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + // TODO Auto-generated method stub + return super.getServerGUI(aID, aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + // TODO Auto-generated method stub + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + return false; + } + + @Override + public void onExplosion() { + // TODO Auto-generated method stub + super.onExplosion(); + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 1) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, + aZ); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java new file mode 100644 index 0000000000..85e2df42c9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java @@ -0,0 +1,67 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_ReactorColdTrap extends GT_MetaTileEntity_BasicMachine { + + public GregtechMetaTileEntity_ReactorColdTrap(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, + "Just like the Arctic", 2, 9, "Dehydrator.png", "", + new ITexture[]{ + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP) + } + ); + } + + public GregtechMetaTileEntity_ReactorColdTrap(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, "Does not require ice cubes", CORE.GT_Tooltip}; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_ReactorColdTrap(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GTPP_Recipe.GTPP_Recipe_Map.sColdTrapRecipes; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return super.isFluidInputAllowed(aFluid); + } + + @Override + public int getCapacity() { + return 16000 * Math.max(1, this.mTier); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java new file mode 100644 index 0000000000..60e2ec8c0a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java @@ -0,0 +1,67 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_ReactorProcessingUnit extends GT_MetaTileEntity_BasicMachine { + + public GregtechMetaTileEntity_ReactorProcessingUnit(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, + "Processes Nuclear things", 2, 9, "Dehydrator.png", "", + new ITexture[]{ + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE), + new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP) + } + ); + } + + public GregtechMetaTileEntity_ReactorProcessingUnit(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + @Override + public String[] getDescription() { + return new String[]{this.mDescription, CORE.GT_Tooltip}; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_ReactorProcessingUnit(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeList() { + return GTPP_Recipe.GTPP_Recipe_Map.sReactorProcessingUnitRecipes; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return super.isFluidInputAllowed(aFluid); + } + + @Override + public int getCapacity() { + return 8000 * Math.max(1, this.mTier); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java new file mode 100644 index 0000000000..ffaa77a0be --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java @@ -0,0 +1,560 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; + +public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity { + + private boolean mHasBeenMapped = false; + private int mCurrentDimension = 0; + public int mMode = 0; + + public GregtechMetaWirelessCharger(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); + } + + public GregtechMetaWirelessCharger(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, + "3 Modes, Long-Range, Local and Mixed.", + "Long-Range: Can supply 2A of power to a single player up to "+(GT_Values.V[this.mTier]*4)+"m away.", + "Local: Can supply several Amps to each player within "+this.mTier*20+"m.", + "Mixed: Provides both 2A of long range and 1A per player locally.", + "Mixed mode is more conservative of power and as a result only", + "Gets half the distances each singular mode gets.", + CORE.GT_Tooltip + }; + } + + public int getTier(){ + return this.mTier; + } + + public int getMode(){ + return this.mMode; + } + + public int getDimensionID(){ + return this.mCurrentDimension; + } + + public Map getLocalMap(){ + return this.mLocalChargingMap; + } + + public Map getLongRangeMap(){ + return this.mWirelessChargingMap; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)}; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mWirelessChargingMap.clear(); + mLocalChargingMap.clear(); + + if (!this.getBaseMetaTileEntity().getWorld().playerEntities.isEmpty()){ + for (Object mTempPlayer : this.getBaseMetaTileEntity().getWorld().playerEntities){ + if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ + EntityPlayer mTemp = (EntityPlayer) mTempPlayer; + ChargingHelper.removeValidPlayer(mTemp, this); + } + } + } + + if (this.mMode >= 2){ + this.mMode = 0; + } + else { + this.mMode++; + } + if (this.mMode == 0){ + PlayerUtils.messagePlayer(aPlayer, "Now in Long-Range Charge Mode."); + } + else if (this.mMode == 1){ + PlayerUtils.messagePlayer(aPlayer, "Now in Local Charge Mode."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Now in Mixed Charge Mode."); + } + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaWirelessCharger(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); + } + + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isElectric() {return true;} + @Override public boolean isValidSlot(final int aIndex) {return true;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isEnetOutput() {return false;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 0;} + @Override public long maxEUStore() {return GT_Values.V[this.mTier]*128;} + + @Override + public int getCapacity() { + return (int) (GT_Values.V[this.mTier]*32); + } + + @Override + public long maxEUInput() { + return GT_Values.V[this.mTier]; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + if (this.mMode == 0){ + return 2; + } + else if (this.mMode == 1){ + return this.mLocalChargingMap.size()*8; + } + else { + return ((this.mLocalChargingMap.size()*4)+this.mWirelessChargingMap.size()); + } + } + + @Override + public long maxAmperesOut() { + return 0; + } + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} + @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + } + return true; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName()}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { + } + + @Override + public String getInventoryName() { + return null; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return false; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mMode", this.mMode); + aNBT.setInteger("mCurrentDimension", this.mCurrentDimension); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mMode = aNBT.getInteger("mMode"); + this.mCurrentDimension = aNBT.getInteger("mCurrentDimension"); + } + + @Override + public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + } + + + private Map mWirelessChargingMap = new HashMap(); + private Map mLocalChargingMap = new HashMap(); + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.getBaseMetaTileEntity().isServerSide()) { + + if (this.mCurrentDimension != aBaseMetaTileEntity.getWorld().provider.dimensionId){ + this.mCurrentDimension = aBaseMetaTileEntity.getWorld().provider.dimensionId; + } + + if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){ + mHasBeenMapped = true; + } + + if (aTick % 20 == 0 && mHasBeenMapped){ + if (!aBaseMetaTileEntity.getWorld().playerEntities.isEmpty()){ + for (Object mTempPlayer : aBaseMetaTileEntity.getWorld().playerEntities){ + if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ + EntityPlayer mTemp = (EntityPlayer) mTempPlayer; + + if (this.mMode == 1 || this.mMode == 2){ + int tempRange = (this.mMode == 1 ? this.mTier*20 : this.mTier*10); + if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) < tempRange){ + if (!mLocalChargingMap.containsKey(mTemp.getPersistentID())){ + mLocalChargingMap.put(mTemp.getPersistentID(), mTemp); + ChargingHelper.addValidPlayer(mTemp, this); + //PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m - Local]."); + } + } + else { + if (mLocalChargingMap.containsKey(mTemp.getPersistentID())){ + if (mLocalChargingMap.remove(mTemp.getPersistentID()) != null){ + //PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m - Local]."); + ChargingHelper.removeValidPlayer(mTemp, this); + } + } + } + } + if (this.mMode == 0 || this.mMode == 2){ + int tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); + if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) <= tempRange){ + if (!mWirelessChargingMap.containsKey(mTemp)){ + if (mTemp.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) { + mWirelessChargingMap.put(mTemp, mTemp.getPersistentID()); + ChargingHelper.addValidPlayer(mTemp, this); + PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m - Long-Range]."); + } + } + } + else { + if (mWirelessChargingMap.containsKey(mTemp)){ + if (mWirelessChargingMap.remove(mTemp) != null){ + PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m - Long Range]."); + ChargingHelper.removeValidPlayer(mTemp, this); + } + } + } + if (mWirelessChargingMap.containsKey(mTemp) && !mTemp.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())){ + if (mWirelessChargingMap.remove(mTemp) != null){ + ChargingHelper.removeValidPlayer(mTemp, this); + } + } + } + /*if (this.mMode == 0 || this.mMode == 2){ + int tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); + if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) < tempRange){ + if (!mWirelessChargingMap.containsKey(mTemp)){ + mWirelessChargingMap.put(mTemp, mTemp.getPersistentID()); + PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m]."); + ChargingHelper.addValidPlayer(mTemp, this); + } + } + else { + if (mWirelessChargingMap.containsKey(mTemp)){ + if (mWirelessChargingMap.remove(mTemp) != null){ + PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m]."); + ChargingHelper.removeValidPlayer(mTemp, this); + } + } + } + } */ + + } + } + } + } + + + } + } + + public BlockPos getTileEntityPosition(){ + return new BlockPos(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld()); + } + + public BlockPos getPositionOfEntity(Entity mEntity){ + if (mEntity == null){ + return null; + } + return EntityUtils.findBlockPosUnderEntity(mEntity); + } + + public double getDistanceBetweenTwoPositions(BlockPos objectA, BlockPos objectB){ + if (objectA == null || objectB == null){ + return 0f; + } + int[] objectArray1 = new int[]{objectA.xPos, objectA.yPos, objectA.zPos}; + int[] objectArray2 = new int[]{objectB.xPos, objectB.yPos, objectB.zPos}; + + final double distance = Math.sqrt( + (objectArray2[0]-objectArray1[0])*(objectArray2[0]-objectArray1[0]) + +(objectArray2[1]-objectArray1[1])*(objectArray2[1]-objectArray1[1]) + +(objectArray2[2]-objectArray1[2])*(objectArray2[2]-objectArray1[2])); + return distance; + } + + @Override + public void onRemoval() { + + ChargingHelper.removeEntry(getTileEntityPosition(), this); + + mWirelessChargingMap.clear(); + mLocalChargingMap.clear(); + if (!this.getBaseMetaTileEntity().getWorld().playerEntities.isEmpty()){ + for (Object mTempPlayer : this.getBaseMetaTileEntity().getWorld().playerEntities){ + if (mTempPlayer instanceof EntityPlayer || mTempPlayer instanceof EntityPlayerMP){ + EntityPlayer mTemp = (EntityPlayer) mTempPlayer; + ChargingHelper.removeValidPlayer(mTemp, this); + } + } + } + + + super.onRemoval(); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, + EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + + int tempRange; + + if (this.mMode == 0 || this.mMode == 2){ + tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); + } + else { + tempRange = this.mMode == 1 ? this.mTier*20 : this.mTier*10; + } + + if (this.mMode == 2){ + PlayerUtils.messagePlayer(aPlayer, "Mixed Mode | Local: "+this.mTier*10+"m | Long: "+tempRange+"m"); + } + else if (this.mMode == 1){ + PlayerUtils.messagePlayer(aPlayer, "Local Mode: "+this.mTier*20+"m"); + + } + else { + PlayerUtils.messagePlayer(aPlayer, "Long-range Mode: "+tempRange+"m"); + + } + + return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + } + + @Override + public void onServerStart() { + mWirelessChargingMap.clear(); + mLocalChargingMap.clear(); + super.onServerStart(); + } + + @Override + public void onExplosion() { + ChargingHelper.removeEntry(getTileEntityPosition(), this); + super.onExplosion(); + } + + @Override + public void doExplosion(long aExplosionPower) { + ChargingHelper.removeEntry(getTileEntityPosition(), this); + super.doExplosion(aExplosionPower); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (!mHasBeenMapped && ChargingHelper.addEntry(getTileEntityPosition(), this)){ + mHasBeenMapped = true; + } + super.onPreTick(aBaseMetaTileEntity, aTick); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java new file mode 100644 index 0000000000..b8f24d6c5e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java @@ -0,0 +1,323 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; + +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.*; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.ItemStackData; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { + + private long mVoltage; + private byte mTier; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GMTE_AmazonPackager(mName); + } + + public GMTE_AmazonPackager(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GMTE_AmazonPackager(String aName) { + super(aName); + } + + @Override + public String getMachineType() { + return "Packager"; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "Generic3By3"; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GMTE_AmazonPackager::addAmazonPackagerList, TAE.getIndexFromPage(2, 9), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 9 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + + + public final boolean addAmazonPackagerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Amazon Warehouse") + .addInfo("This Multiblock is used for EXTREME packaging requirements") + .addInfo("Dust Schematics are inserted into the input busses") + .addInfo("If inserted into the controller, it is shared across all busses") + .addInfo("1x, 2x, 3x & Other Schematics are to be placed into the controller GUI slot") + .addInfo("Uncomparably fast compared to a single packager of the same tier") + .addInfo("Only uses 75% of the eu/t normally required") + .addInfo("Processes five items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Supply Depot Casings", 10) + .addInputBus("Any casing", 1) + .addOutputBus("Any casing", 1) + .addEnergyHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1) + .addMufflerHatch("Any casing", 1) + .toolTipFinisher("GT++"); + return tt; + } + + private final void initFields() { + mVoltage = getMaxInputVoltage(); + mTier = (byte) Math.max(1, GT_Utility.getTier(mVoltage)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(2, 1)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(2, 1))}; + } + + + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; + } + + public void sortInputBusses() { + for (GT_MetaTileEntity_Hatch_InputBus h : this.mInputBusses) { + h.updateSlots(); + } + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + + //Just the best place to check this~ + initFields(); + + ArrayList tItems = getStoredInputs(); + if (this.getGUIItemStack() != null) { + tItems.add(this.getGUIItemStack()); + } + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + boolean state = checkRecipeGeneric(tItemInputs, tFluidInputs, 5 * GT_Utility.getTier(this.getMaxInputVoltage()), 75, 500, 10000); + + + if (state) { + return true; + } + else { + tItems = getStoredInputs(); + AutoMap mCompleted = new AutoMap(); + AutoMap mSchematics = new AutoMap(); + for (ItemStack tInputItem : tItems) { + if (tInputItem != null) { + if (ItemList.Schematic_1by1.isStackEqual((Object) tInputItem) || ItemList.Schematic_2by2.isStackEqual((Object) tInputItem) || ItemList.Schematic_3by3.isStackEqual((Object) tInputItem)) { + mSchematics.put(new ItemStackData(tInputItem)); + } + } + } + if (mSchematics.size() > 0) { + for (ItemStackData g : mSchematics) { + for (ItemStack tInputItem : tItems) { + if (tInputItem != null) { + mCompleted.put(new ItemStackData(tInputItem)); + checkRecipe(tInputItem, g.getStack()); + } + } + } + } + + return mCompleted != null && mCompleted.size() > 0; + } + } + + public boolean checkRecipe(ItemStack inputStack, ItemStack schematicStack) { + if (GT_Utility.isStackValid((Object) inputStack) && GT_Utility.isStackValid((Object) schematicStack) + && GT_Utility.getContainerItem(inputStack, true) == null) { + ItemStack tOutputStack; + if (ItemList.Schematic_1by1.isStackEqual((Object) schematicStack)&& inputStack.stackSize >= 1) { + tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{inputStack}); + if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { + final ItemStack input = inputStack; + --input.stackSize; + this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + //this.mMaxProgresstime = 16 / (1 << this.mTier - 1); + this.mMaxProgresstime = 2; + this.addOutput(tOutputStack); + updateSlots(); + return true; + } + return false; + } else if (ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) + && inputStack.stackSize >= 4) { + tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{inputStack, + inputStack, null, inputStack, inputStack}); + if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { + final ItemStack input2 = inputStack; + input2.stackSize -= 4; + this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + //this.mMaxProgresstime = 32 / (1 << this.mTier - 1); + this.mMaxProgresstime = 4; + this.addOutput(tOutputStack); + updateSlots(); + return true; + } + return false; + } else if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack) + && inputStack.stackSize >= 9) { + tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[]{inputStack, + inputStack, inputStack, inputStack, inputStack, + inputStack, inputStack, inputStack, inputStack}); + if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { + final ItemStack input3 = inputStack; + input3.stackSize -= 9; + this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + //this.mMaxProgresstime = 64 / (1 << this.mTier - 1); + this.mMaxProgresstime = 6; + this.addOutput(tOutputStack); + updateSlots(); + return true; + } + return false; + } + } + return false; + } + + public boolean allowPutStack(final ItemStack aStack, ItemStack schematicStack) { + //If Schematic Static is not 1x1, 2x2, 3x3 + if (!ItemList.Schematic_1by1.isStackEqual((Object) schematicStack) && !ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) && !ItemList.Schematic_3by3.isStackEqual((Object) schematicStack)) { + return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack); + } + //Something + if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe((IHasWorldObjectAndCoords) this.getBaseMetaTileEntity(), true, GT_Values.V[this.mTier], + (FluidStack[]) null, new ItemStack[]{GT_Utility.copyAmount(64L, new Object[]{aStack}), schematicStack}) != null) { + return true; + } + //1x1 + if (ItemList.Schematic_1by1.isStackEqual((Object) schematicStack) + && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack}) != null) { + return true; + } + //2x2 + if (ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) + && GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, null, aStack, aStack}) != null) { + return true; + } + //3x3 + if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack) && GT_ModHandler.getRecipeOutput( + new ItemStack[]{aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack}) != null) { + return true; + } + return false; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + } + + @Override + public int getMaxEfficiency(ItemStack p0) { + return 10000; + } + + @Override + public int getPollutionPerSecond(ItemStack arg0){ + return CORE.ConfigSwitches.pollutionPerSecondMultiPackager; + } + + @Override + public int getMaxParallelRecipes() { + return 9; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java new file mode 100644 index 0000000000..7ddf16b36f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java @@ -0,0 +1,479 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; + +import static gregtech.api.enums.GT_Values.*; + +import java.util.*; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.entity.EntityTeslaTowerLightning; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraftforge.common.util.ForgeDirection; + +public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { + + private Block casingBlock; + private int casingMeta; + private int frameMeta; + private int casingTextureIndex; + + private ForgeDirection back; + + private int xLoc, yLoc, zLoc; + + protected int mRange; + */ +/** + * Machine Mode, + * {@value false} Attacks all entities, + * {@value true} Only attacks players. + *//* + + protected volatile boolean mMode = false; + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMTE_TeslaTower(mName); + } + + public GregtechMTE_TeslaTower(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + initFields(); + } + + public GregtechMTE_TeslaTower(String aName) { + super(aName); + initFields(); + } + + @Override + public String getMachineType() { + return "Weaponized Lighting Rod"; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String[] getTooltip() { + String casings = getCasingBlockItem().get(0).getDisplayName(); + return new String[]{ + "Controller Block for the Tesla Defence Tower Mk3200", + "Enemies within "+this.mRange+"m are blasted with a high energy plasma.", + "This uses 5,000,000EU per blast.", + "Can screwdriver to toggle mode between Players and all Entities.", + "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", + "3x1x3 Base of " + casings, + "1x3x1 " + casings + " pillar (Center of base)", + "1x3x1 " + MaterialUtils.getMaterialName(getFrameMaterial()) + " Frame Boxes (Each pillar side and on top)", + "1x Maintenance Hatch (One of base casings)", + "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)"}; + } + + private final void initFields() { + casingBlock = ModBlocks.blockCasings2Misc; + casingMeta = getCasingBlockItem().get(0).getItemDamage(); + int frameId = 4096 + getFrameMaterial().mMetaItemSubID; + frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; + casingTextureIndex = getCasingTextureIndex(); + mRange = 50; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("mMode", this.mMode); + aNBT.setInteger("mRange", this.mRange); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + this.mMode = aNBT.getBoolean("mMode"); + this.mRange = aNBT.getInteger("mRange"); + super.loadNBTData(aNBT); + } + + private boolean isEnergyEnough() { + if (this.getEUVar() >= 5000000){ + return true; + } + return false; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + */ +/*if (!isEnergyEnough()) { + this.mProgresstime = 0; + this.mMaxProgresstime = 20; + this.getBaseMetaTileEntity().setActive(false); + stopMachine(); + } + else {*//* +*/ +/* + this.mProgresstime = 1; + this.mMaxProgresstime = 100; + this.getBaseMetaTileEntity().setActive(true);*//* + + //} + return false; + } + + @Override + public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + updateCoordinates(); + //check base layer + for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) { + for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) { + if (xOff == 0 && zOff == 0) continue; + + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff); + if (!checkCasingBlock(xOff, 0, zOff) + && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex) + && !addEnergyInputToMachineList(tTileEntity, casingTextureIndex)){ + Logger.INFO("bad block"); + return false; + } + } + } + if(!checkHatches()){ + Logger.INFO("bad Hatches"); + return false; + } + if (GT_Utility.getTier(getMaxInputVoltage()) < getMinTier()){ + Logger.INFO("bad Voltage"); + return false; + } + //check tower + for (int yOff = 1; yOff < 4; yOff++) { + if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ) + || !checkFrameBlock(back.offsetX + 1, yOff, back.offsetZ) + || !checkFrameBlock(back.offsetX - 1, yOff, back.offsetZ) + || !checkFrameBlock(back.offsetX, yOff, back.offsetZ + 1) + || !checkFrameBlock(back.offsetX, yOff, back.offsetZ - 1) + || !checkFrameBlock(back.offsetX, yOff + 3, back.offsetZ)){ + Logger.INFO("bad frame?"); + return false; + } + } + Logger.INFO("good"); + return true; + } + + private void updateCoordinates() { + casingTextureIndex = getCasingTextureIndex(); + mRange = 50; + xLoc = getBaseMetaTileEntity().getXCoord(); + yLoc = getBaseMetaTileEntity().getYCoord(); + zLoc = getBaseMetaTileEntity().getZCoord(); + back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()); + } + + protected boolean checkCasingBlock(int xOff, int yOff, int zOff) { + Logger.INFO("Looking For Casing."); + return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta); + } + //meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation) + protected boolean checkFrameBlock(int xOff, int yOff, int zOff) { + Logger.INFO("Looking For Frame."); + return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta); + } + + protected boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) { + return checkBlockAndMeta(xLoc + xOff, yLoc + yOff, zLoc + zOff, block, meta); + } + + private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) { + Logger.INFO("Found: "+getBaseMetaTileEntity().getBlock(x, y, z).getLocalizedName()+" | Meta: "+getBaseMetaTileEntity().getMetaID(x, y, z)); + Logger.INFO("Expected: "+block.getLocalizedName()+" | Meta: "+meta); + return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta) + && getBaseMetaTileEntity().getBlock(x, y, z) == block; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + protected int getMinTier() { + return 7; + } + + protected boolean checkHatches() { + return !mMaintenanceHatches.isEmpty() && !mEnergyHatches.isEmpty(); + } + + private Map, Entity> mInRange = new HashMap, Entity>(); + + @SuppressWarnings("unchecked") + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + try { + if (this.getBaseMetaTileEntity().isServerSide()){ + if (this.mEnergyHatches.size() > 0) { + for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches){ + if (isValidMetaTileEntity(tHatch)) { + long mHT = tHatch.getBaseMetaTileEntity().getInputVoltage(); + if (tHatch.getEUVar() >= mHT) { + for (int o=0;o<(tHatch.getEUVar()/mHT);o++){ + //1A + if (this.getEUVar()<(this.maxEUStore()-mHT)){ + tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mHT, false); + this.setEUVar(this.getEUVar()+mHT); + } + //2A + if (this.getEUVar()<(this.maxEUStore()-mHT)){ + tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mHT, false); + this.setEUVar(this.getEUVar()+mHT); + } + } + } + } + } + } + + if (aTick % 10 == 0){ + if (this.getEUVar() >= 5000000){ + //Logger.INFO("Can Zap."); + this.getBaseMetaTileEntity().enableWorking(); + this.getBaseMetaTileEntity().setActive(true); + if (this.mProgresstime <= 0){ + this.mProgresstime++; + } + else if (this.mProgresstime >= 100){ + this.mProgresstime = 0; + } + this.mMaxProgresstime = 10000; + } + //Logger.INFO("Allowed to be Working? "+this.getBaseMetaTileEntity().isAllowedToWork()); + //Logger.INFO("Working? "+this.getBaseMetaTileEntity().isActive()); + //Logger.INFO("Has Working just been enabled? "+this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()); + } + + + if (aTick % 20 == 0){ + List o = aBaseMetaTileEntity.getWorld().loadedEntityList; + //Clean up old entities first + if (this.mInRange.size() > 0){ + for (Entity j : this.mInRange.values()){ + if (((Entity) j).getDistance(this.xLoc, this.yLoc, this.zLoc) > this.mRange){ + mInRange.remove(new Pair(((Entity) j).getUniqueID().getMostSignificantBits(), ((Entity) j).getUniqueID().getLeastSignificantBits()), (Entity) j); + } + } + } + //Add new entities + if (o.size() > 0){ + for (Object r : o){ + if (r instanceof Entity){ + if (!((Entity) r).getUniqueID().equals(getOwner())){ + if (((Entity) r).isEntityAlive() || r instanceof EntityLiving){ + if (((Entity) r).getDistance(this.xLoc, this.yLoc, this.zLoc) <= this.mRange){ + if (r instanceof EntityItem){ + //Do nothing + } + else { + if (!this.mMode){ + mInRange.put(new Pair(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); + } + else { + if (r instanceof EntityPlayer){ + mInRange.put(new Pair(((Entity) r).getUniqueID().getMostSignificantBits(), ((Entity) r).getUniqueID().getLeastSignificantBits()), (Entity) r); + } + } + } + } + } + } + } + } + } + } + } + } + catch (Throwable r){ + + } + super.onPreTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + try { + if (this.getBaseMetaTileEntity().isServerSide()){ + //Handle Progress Time + if (this.getEUVar() >= 0 && !this.getBaseMetaTileEntity().isAllowedToWork()){ + this.mProgresstime = 20; + this.mMaxProgresstime = 40; + } + else if (this.getEUVar() >= 0 && this.getBaseMetaTileEntity().isAllowedToWork()){ + this.mProgresstime = 20; + this.mMaxProgresstime = 40; + } + + if (aTick % 10 == 0){ + if (this.mInRange.size() > 0){ + if (this.getEUVar() >= 5000000){ + + for (Entity f : mInRange.values()){ + if (f instanceof EntityLiving){ + int j1 = (int) f.posX; + int l1 = (int) f.posY; + int k1 = (int) f.posZ; + World world = aBaseMetaTileEntity.getWorld(); + + if (f.isEntityAlive() && !f.getUniqueID().equals(getOwner())){ + //if (world.canLightningStrikeAt(j1, l1+1, k1)){ + //if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1))){ + if (isEnergyEnough() && world.addWeatherEffect(new EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1, f, getOwner()))){ + if (f == null || f.isDead || !f.isEntityAlive()){ + this.mInRange.remove(new Pair(f.getUniqueID().getMostSignificantBits(), f.getUniqueID().getLeastSignificantBits())); + } + this.setEUVar(this.getEUVar()-5000000); + } + //} + } + + } + } + } + } + } + } + } + catch (Throwable r){ + + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + + protected GregtechItemList getCasingBlockItem() { + return GregtechItemList.Casing_TeslaTower; + } + + protected Materials getFrameMaterial() { + */ +/*casingBlock = getCasingBlockItem().getBlock(); + casingMeta = getCasingBlockItem().get(0).getItemDamage(); + int frameId = 4096 + getFrameMaterial().mMetaItemSubID; + frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; + *//* +return Materials.get("TungstenCarbide"); + } + + protected int getCasingTextureIndex() { + return TAE.GTPP_INDEX(30); + } + + public UUID getOwner(){ + return PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()); + } + + @Override + public boolean isEnetInput() { + return false; + } + + @Override + public long maxAmperesIn() { + return 32; + } + + @Override + public long maxEUInput() { + return 131072; + } + + @Override + public long maxEUStore() { + return Integer.MAX_VALUE; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mMode = Utils.invertBoolean(mMode); + this.mInRange.clear(); + if (mMode){ + PlayerUtils.messagePlayer(aPlayer, "[Tesla Tower] Now only targetting players."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "[Tesla Tower] Targetting all types of entities."); + } + } + + @Override + public int getMaxParallelRecipes() { + return 0; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java new file mode 100644 index 0000000000..df01d01679 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java @@ -0,0 +1,403 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gtPlusPlus.core.lib.CORE; +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_MultiBlockBase { + + public static int CASING_TEXTURE_ID; + private HeatingCoilLevel mHeatingCapacity; + private int mLevel = 0; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialAlloySmelter(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 1); + } + + public GregtechMetaTileEntity_IndustrialAlloySmelter(String aName) { + super(aName); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 1); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialAlloySmelter(this.mName); + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiFurnace.png"); + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialAlloySmelter; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Alloy Smelter"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Alloy Smelter") + .addInfo("Gains one parallel per voltage tier") + .addInfo("Gains one multiplier per coil tier") + .addInfo("parallel = tier * coil tier") + .addInfo("Gains 5% speed bonus per coil tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 5, 3, true) + .addController("Bottom center") + .addCasingInfo("Inconel Reinforced Casings", 10) + .addCasingInfo("Integral Encasement V", 8) + .addCasingInfo("Heating Coils", 16) + .addInputBus("Any Inconel Reinforced Casing", 1) + .addOutputBus("Any Inconel Reinforced Casing", 1) + .addEnergyHatch("Any Inconel Reinforced Casing", 1) + .addMaintenanceHatch("Any Inconel Reinforced Casing", 1) + .addMufflerHatch("Any Inconel Reinforced Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"HHH", "H-H", "HHH"}, + {"VVV", "V-V", "VVV"}, + {"HHH", "H-H", "HHH"}, + {"C~C", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialAlloySmelter::addIndustrialAlloySmelterList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 1 + ) + ) + ) + ) + .addElement( + 'H', + ofCoil( + GregtechMetaTileEntity_IndustrialAlloySmelter::setCoilLevel, GregtechMetaTileEntity_IndustrialAlloySmelter::getCoilLevel + ) + ) + .addElement( + 'V', + ofBlock( + ModBlocks.blockCasingsTieredGTPP, 4 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addIndustrialAlloySmelterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 4, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mLevel = 0; + setCoilLevel(HeatingCoilLevel.None); + return checkPiece(mName, 1, 4, 0) && mCasing >= 10 && getCoilLevel() != HeatingCoilLevel.None && (mLevel = getCoilLevel().getTier() + 1) > 0 && checkHatch(); + } + + @Override + public int getMaxParallelRecipes() { + return (this.mLevel * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + + @Override + public boolean checkRecipe(ItemStack aStack) { + FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tInputs = new ArrayList<>(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) { + tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + if (tInputs.size() > 1) { + ItemStack[] tItems = tInputs.toArray(new ItemStack[0]); + if (checkRecipeGeneric(tItems, tFluids, getMaxParallelRecipes(), 100, 5 * this.mLevel, 10000)) { + return true; + } + } + } + return false; + } + + @Override + public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, + int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[] {}; + this.mOutputFluids = new FluidStack[] {}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + Logger.WARNING("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + Logger.WARNING("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe == null) { + Logger.WARNING("BAD RETURN - 1"); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + Logger.WARNING("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + int tHeatCapacityDivTiers = (int) mHeatingCapacity.getHeat() / 900; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + // Count recipes to do in parallel, consuming input items and fluids and + // considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + Logger.WARNING("Broke at " + parallelRecipes + "."); + break; + } + Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + "."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + Logger.WARNING("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = mLevel * 5; + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); + int rInt = 2; + + this.mEUt = (int) Math.max(Math.ceil(tTotalEUt), 1); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= (tHeatCapacityDivTiers >= rInt ? 4 : 2); + } + } + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) + tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + Logger.WARNING("GOOD RETURN - 1"); + return true; + + } + + public HeatingCoilLevel getCoilLevel() { + return mHeatingCapacity; + } + + public void setCoilLevel(HeatingCoilLevel aCoilLevel) { + mHeatingCapacity = aCoilLevel; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java new file mode 100644 index 0000000000..35a92d5be3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java @@ -0,0 +1,320 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialArcFurnace +extends GregtechMeta_MultiBlockBase { + + //862 + private static final int mCasingTextureID = TAE.getIndexFromPage(3, 3); + public static String mCasingName = "Tempered Arc Furnace Casing"; + private boolean mPlasmaMode = false; + private int mSize = 0; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialArcFurnace(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); + } + + public GregtechMetaTileEntity_IndustrialArcFurnace(final String aName) { + super(aName); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialArcFurnace(this.mName); + } + + @Override + public String getMachineType() { + return "(Plasma/Electric) Arc Furnace"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); + } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for Industrial Arc Furnace") + .addInfo("250% faster than using single block machines of the same voltage") + .addInfo("Processes 8 items per voltage tier") + .addInfo("Max Size required to process Plasma recipes") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .addController("Top center") + .addStructureInfo("Size: nx3xn [WxHxL] (Hollow)") + .addStructureInfo("n can be 3, 5 or 7") + .addCasingInfo(mCasingName, 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName + "3", new String[][]{ + {"CCC", "C~C", "CCC"}, + {"CCC", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + }) + .addShape(mName + "5", new String[][]{ + {"CCCCC", "CCCCC", "CC~CC", "CCCCC", "CCCCC"}, + {"CCCCC", "C---C", "C---C", "C---C", "CCCCC"}, + {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, + }) + .addShape(mName + "7", new String[][]{ + {"CCCCCCC", "CCCCCCC", "CCCCCCC", "CCC~CCC", "CCCCCCC", "CCCCCCC", "CCCCCCC"}, + {"CCCCCCC", "C-----C", "C-----C", "C-----C", "C-----C", "C-----C", "CCCCCCC"}, + {"CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC"}, + }) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialArcFurnace::addIndustrialArcFurnaceList, mCasingTextureID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings4Misc, 3 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public void clearHatches() { + mOutputHatches.clear(); + mInputHatches.clear(); + mOutputBusses.clear(); + mInputBusses.clear(); + mEnergyHatches.clear(); + mMaintenanceHatches.clear(); + mMufflerHatches.clear(); + } + + public final boolean addIndustrialArcFurnaceList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + int size; + switch (stackSize.stackSize) { + case 1: size = 3; break; + case 2: size = 5; break; + default: size = 7; break; + } + buildPiece(mName + size, stackSize, hintsOnly, (size - 1) / 2, (size - 1) / 2, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mSize = 0; + if (checkPiece(mName + "3", 1, 1, 0)) { + mSize = 3; + return mCasing >= 10 && checkHatch(); + } + mCasing = 0; + clearHatches(); + if (checkPiece(mName + "5", 2, 2, 0)) { + mSize = 5; + return mCasing >= 10 && checkHatch(); + } + mCasing = 0; + clearHatches(); + if (checkPiece(mName + "7", 3, 3, 0)) { + mSize = 3; + return mCasing >= 10 && checkHatch(); + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(207)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(mCasingTextureID), + new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(mCasingTextureID)}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialExtruder"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return mPlasmaMode ? GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes : GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return this.checkRecipeGeneric(this.mSize * 8 * GT_Utility.getTier(this.getMaxInputVoltage()), 100, 250); + } + + @Override + public int getMaxParallelRecipes() { + return (this.mSize * 8 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialArcFurnace; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings4Misc; + } + + + public byte getCasingMeta() { + return 3; + } + + public Block getCasingBlock2() { + return ModBlocks.blockCasings3Misc; + } + + + public byte getCasingMeta2() { + return 15; + } + + public byte getCasingTextureIndex() { + return (byte) mCasingTextureID; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (this.mSize > 3) { + this.mPlasmaMode = Utils.invertBoolean(mPlasmaMode); + if (mPlasmaMode) { + PlayerUtils.messagePlayer(aPlayer, "["+EnumChatFormatting.RED+"MODE"+EnumChatFormatting.RESET+"] "+EnumChatFormatting.LIGHT_PURPLE+"Plasma"+EnumChatFormatting.RESET); + } + else { + PlayerUtils.messagePlayer(aPlayer, "["+EnumChatFormatting.RED+"MODE"+EnumChatFormatting.RESET+"] "+EnumChatFormatting.YELLOW+"Electric"+EnumChatFormatting.RESET); + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mPlasmaMode", mPlasmaMode); + aNBT.setInteger("mSize", mSize); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mPlasmaMode = aNBT.getBoolean("mPlasmaMode"); + mSize = aNBT.getInteger("mSize"); + } + + @Override + public void onMachineBlockUpdate() { + mUpdate = 100; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java new file mode 100644 index 0000000000..8802a7148b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java @@ -0,0 +1,263 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialCentrifuge +extends GregtechMeta_MultiBlockBase { + + private boolean mIsAnimated; + private static ITexture frontFace; + private static ITexture frontFaceActive; + private static CustomIcon GT9_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); + private static CustomIcon GT9_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + //public static double recipesComplete = 0; + + public GregtechMetaTileEntity_IndustrialCentrifuge(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + frontFaceActive = new GT_RenderedTexture(GT9_5_Active); + frontFace = new GT_RenderedTexture(GT9_5); + mIsAnimated = true; + } + + public GregtechMetaTileEntity_IndustrialCentrifuge(final String aName) { + super(aName); + mIsAnimated = true; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialCentrifuge(this.mName); + } + + @Override + public String getMachineType() { + return "Centrifuge"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Centrifuge") + .addInfo("125% faster than using single block machines of the same voltage") + .addInfo("Disable animations with a screwdriver") + .addInfo("Only uses 90% of the eu/t normally required") + .addInfo("Processes six items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Centrifuge Casings", 10) + .addInputBus("Any Casing except front", 1) + .addOutputBus("Any Casing except front", 1) + .addInputHatch("Any Casing except front", 1) + .addOutputHatch("Any Casing except front", 1) + .addEnergyHatch("Any Casing except front", 1) + .addMaintenanceHatch("Any Casing except front", 1) + .addMufflerHatch("Any Casing except front", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialCentrifuge::addIndustrialCentrifugeList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 0 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + } + + public final boolean addIndustrialCentrifugeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(0)), aFacing == aSide ? aActive ? getFrontFacingTurbineTexture(aActive) : getFrontFacingTurbineTexture(aActive) : Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(0))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialCentrifuge"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(6* GT_Utility.getTier(this.getMaxInputVoltage()), 90, 125); + } + + @Override + public int getMaxParallelRecipes() { + return (6 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 90; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasingsMisc; + } + + public byte getCasingMeta() { + return 0; + } + + public byte getCasingTextureIndex() { + return (byte) TAE.GTPP_INDEX(0); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialCentrifuge; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + this.mIsAnimated = !mIsAnimated; + Logger.INFO("Is Centrifuge animated "+this.mIsAnimated); + if (this.mIsAnimated) { + PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture. "); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture. "); + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mIsAnimated", mIsAnimated); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + if (aNBT.hasKey("mIsAnimated")) { + mIsAnimated = aNBT.getBoolean("mIsAnimated"); + } + else { + mIsAnimated = true; + } + } + + public boolean usingAnimations() { + //Logger.INFO("Is animated? "+this.mIsAnimated); + return this.mIsAnimated; + } + + private ITexture getFrontFacingTurbineTexture(boolean isActive) { + if (usingAnimations()) { + if (isActive) { + return frontFaceActive; + } + } + return frontFace; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java new file mode 100644 index 0000000000..21caf135b1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java @@ -0,0 +1,230 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialCokeOven +extends GregtechMeta_MultiBlockBase { + private int mLevel = 0; + private int mCasing; + private int mCasing1; + private int mCasing2; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialCokeOven(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialCokeOven(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialCokeOven(this.mName); + } + + @Override + public String getMachineType() { + return "Coke Oven"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Processes Logs and Coal into Charcoal and Coal Coke.") + .addInfo("Controller Block for the Industrial Coke Oven") + .addInfo("Gain 4% speed bonus per voltage tier increased") + .addInfo("Process 12x materials with Heat Resistant Casings") + .addInfo("Or 24x materials with Heat Proof Casings") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front middle at bottom") + .addCasingInfo("Structural Coke Oven Casings", 8) + .addCasingInfo("Heat Resistant/Proof Coke Oven Casings", 8) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "C-C", "CCC"}, + {"HHH", "H-H", "HHH"}, + {"C~C", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialCokeOven::addIndustrialCokeOvenList, TAE.GTPP_INDEX(1), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 1 + ) + ) + ) + ) + .addElement( + 'H', + ofChain( + onElementPass( + x -> ++x.mCasing1, + ofBlock( + ModBlocks.blockCasingsMisc, 2 + ) + ), + onElementPass( + x -> ++x.mCasing2, + ofBlock( + ModBlocks.blockCasingsMisc, 3 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 2, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mCasing1 = 0; + mCasing2 = 0; + mLevel = 0; + if (checkPiece(mName, 1, 2, 0)) { + if (mCasing1 == 8) mLevel = 1; + if (mCasing2 == 8) mLevel = 2; + return mLevel > 0 && mCasing >= 8 && checkHatch(); + } + return false; + } + + public final boolean addIndustrialCokeOvenList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(207)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "CokeOven"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes; + + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); + } + + @Override + public int getMaxParallelRecipes() { + return this.mLevel * 12; + } + + @Override + public int getEuDiscountForParallelism() { + return (100-(GT_Utility.getTier(this.getMaxInputVoltage())*4)); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialCokeOven; + } + + @Override + public int getAmountOfOutputs() { + return 24; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java new file mode 100644 index 0000000000..bf5f8aaeaf --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java @@ -0,0 +1,234 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialCuttingMachine +extends GregtechMeta_MultiBlockBase { + + private boolean mCuttingMode = true; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialCuttingMachine(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialCuttingMachine(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialCuttingMachine(this.mName); + } + + @Override + public String getMachineType() { + return "Cutting Machine / Slicing Machine"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Cutting Factory") + .addInfo("200% faster than using single block machines of the same voltage") + .addInfo("Only uses 75% of the eu/t normally required") + .addInfo("Processes four items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 5, true) + .addController("Front Center") + .addCasingInfo("Cutting Factory Frames", 26) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC", "CCC", "CCC"}, + {"C~C", "C-C", "C-C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialCuttingMachine::addIndustrialCuttingMachineList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 13 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 26 && checkHatch(); + } + + public final boolean addIndustrialCuttingMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(29)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(29))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialCuttingMachine"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return mCuttingMode ? GT_Recipe.GT_Recipe_Map.sCutterRecipes : GT_Recipe.GT_Recipe_Map.sSlicerRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 200); + } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 75; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialCuttingMachine; + } + + @Override + public int getAmountOfOutputs() { + return 2; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings2Misc; + } + + + public byte getCasingMeta() { + return 13; + } + + + public byte getCasingTextureIndex() { + return (byte) TAE.GTPP_INDEX(29); + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mCuttingMode = Utils.invertBoolean(mCuttingMode); + String aMode = mCuttingMode ? "Cutting" : "Slicing"; + PlayerUtils.messagePlayer(aPlayer, "Mode: "+aMode); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mCuttingMode", mCuttingMode); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + if (aNBT.hasKey("mCuttingMode")) { + mCuttingMode = aNBT.getBoolean("mCuttingMode"); + } + else { + mCuttingMode = true; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java new file mode 100644 index 0000000000..44552ea2f7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java @@ -0,0 +1,415 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gtPlusPlus.core.lib.CORE; +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_MultiBlockBase { + + private static int CASING_TEXTURE_ID; + private static String mCasingName = "Vacuum Casing"; + private HeatingCoilLevel mHeatingCapacity; + private boolean mDehydratorMode = false; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialDehydrator(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + CASING_TEXTURE_ID = TAE.getIndexFromPage(3, 10); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10); + } + + public GregtechMetaTileEntity_IndustrialDehydrator(String aName) { + super(aName); + CASING_TEXTURE_ID = TAE.getIndexFromPage(3, 10); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialDehydrator(mName); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10); + } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Factory Grade Vacuum Furnace") + .addInfo("Can toggle the operation temperature with a Screwdriver") + .addInfo("All Dehydrator recipes are Low Temp recipes") + .addInfo("Speed: 120% | Eu Usage: 50% | Parallel: 4") + .addInfo("Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)") + .addInfo("Each 1800K over the min. Heat Capacity allows for one upgraded overclock") + .addInfo("Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 4, 3, true) + .addController("Bottom Center") + .addCasingInfo(mCasingName, 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"HHH", "H-H", "HHH"}, + {"HHH", "H-H", "HHH"}, + {"HHH", "H-H", "HHH"}, + {"C~C", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialDehydrator::addIndustrialDehydratorList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings4Misc, 10 + ) + ) + ) + ) + .addElement( + 'H', + ofCoil( + GregtechMetaTileEntity_IndustrialDehydrator::setCoilLevel, GregtechMetaTileEntity_IndustrialDehydrator::getCoilLevel + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 4, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + setCoilLevel(HeatingCoilLevel.None); + return checkPiece(mName, 1, 4, 0) && mCasing >= 10 && getCoilLevel() != HeatingCoilLevel.None && checkHatch(); + } + + public final boolean addIndustrialDehydratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active + : TexturesGtBlock.Overlay_Machine_Controller_Advanced) }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return mDehydratorMode ? GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes : GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialDehydrator; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getMachineType() { + return "Vacuum Furnace / Dehydrator"; + } + + @Override + public int getMaxParallelRecipes() { + return 4; + } + + @Override + public int getEuDiscountForParallelism() { + return 50; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "ElectricBlastFurnace"; + } + + public boolean checkRecipe(ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 120); + } + + @Override + public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, + int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[] {}; + this.mOutputFluids = new FluidStack[] {}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + Logger.WARNING("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + Logger.WARNING("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe == null || this.mHeatingCapacity.getHeat() < tRecipe.mSpecialValue) { + Logger.WARNING("BAD RETURN - 1"); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + Logger.WARNING("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + int tHeatCapacityDivTiers = (int) (mHeatingCapacity.getHeat() - tRecipe.mSpecialValue) / 900; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + // Count recipes to do in parallel, consuming input items and fluids and + // considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + Logger.WARNING("Broke at " + parallelRecipes + "."); + break; + } + Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + "."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + Logger.WARNING("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); + int rInt = 2; + + this.mEUt = (int) Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= (tHeatCapacityDivTiers >= rInt ? 4 : 2); + } + } + + if (tHeatCapacityDivTiers > 0) { + this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); + } + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) + tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + Logger.WARNING("GOOD RETURN - 1"); + return true; + + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mDehydratorMode = Utils.invertBoolean(mDehydratorMode); + String aMode = mDehydratorMode ? "Dehydrator" : "Vacuum Furnace"; + PlayerUtils.messagePlayer(aPlayer, "Mode: "+aMode); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mDehydratorMode", mDehydratorMode); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mDehydratorMode = aNBT.getBoolean("mDehydratorMode"); + } + + public HeatingCoilLevel getCoilLevel() { + return mHeatingCapacity; + } + + public void setCoilLevel(HeatingCoilLevel aCoilLevel) { + mHeatingCapacity = aCoilLevel; + } +} + + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java new file mode 100644 index 0000000000..f6613980ca --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java @@ -0,0 +1,193 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialElectrolyzer +extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialElectrolyzer(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialElectrolyzer(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialElectrolyzer(this.mName); + } + + @Override + public String getMachineType() { + return "Electrolyzer"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Electrolyzer") + .addInfo("180% faster than using single block machines of the same voltage") + .addInfo("Only uses 90% of the eu/t normally required") + .addInfo("Processes two items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Electrolyzer Casings", 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialElectrolyzer::addIndustrialElectrolyzerList, TAE.GTPP_INDEX(5), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 5 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + } + + public final boolean addIndustrialElectrolyzerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(5)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(5))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialElectrolyzer"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(2* GT_Utility.getTier(this.getMaxInputVoltage()), 90, 180); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialElectrolyzer; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 2* GT_Utility.getTier(this.getMaxInputVoltage()); + } + + @Override + public int getEuDiscountForParallelism() { + return 90; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java new file mode 100644 index 0000000000..a5c7f62578 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java @@ -0,0 +1,260 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialExtruder +extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + + public GregtechMetaTileEntity_IndustrialExtruder(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialExtruder(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialExtruder(this.mName); + } + + @Override + public String getMachineType() { + return "Extruder"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Material Extruder") + .addInfo("250% faster than using single block machines of the same voltage") + .addInfo("Processes four items per voltage tier") + .addInfo("Extrusion Shape for recipe goes in the Input Bus") + .addInfo("Each Input Bus can have a different shape!") + .addInfo("You can use several input buses per multiblock") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 5, true) + .addController("Front Center") + .addCasingInfo("Inconel Reinforced Casings", 28) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Back Center", 2) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC", "CCC", "CCC"}, + {"C~C", "C-C", "C-C", "C-C", "CMC"}, + {"CCC", "CCC", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialExtruder::addIndustrialExtruderList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .addElement( + 'M', + ofHatchAdder( + GregtechMetaTileEntity_IndustrialExtruder::addIndustrialExtruderMufflerList, getCasingTextureIndex(), 2 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 28 && checkHatch(); + } + + public final boolean addIndustrialExtruderList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addIndustrialExtruderMufflerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(203)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(33)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(33))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialExtruder"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sExtruderRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tBusItems = new ArrayList(); + tBus.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) + tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + ItemStack[] inputs = new ItemStack[tBusItems.size()]; + int slot = 0; + for (ItemStack g : tBusItems) { + inputs[slot++] = g; + } + if (inputs.length > 0) { + int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); + log("Recipe. ["+inputs.length+"]["+para+"]"); + if (checkRecipeGeneric(inputs, new FluidStack[]{}, para, 100, 250, 10000)) { + log("Recipe 2."); + return true; + } + } + + } + return false; + } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialExtruder; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings3Misc; + } + + public byte getCasingMeta() { + return 1; + } + + public byte getCasingTextureIndex() { + return (byte) TAE.GTPP_INDEX(33); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java new file mode 100644 index 0000000000..b6e072b653 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java @@ -0,0 +1,259 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import java.util.Random; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialMacerator +extends GregtechMeta_MultiBlockBase { + private int mCasing; + private int mPerLayer; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialMacerator(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialMacerator(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialMacerator(this.mName); + } + + @Override + public String getMachineType() { + return "Macerator/Pulverizer"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Maceration Stack") + .addInfo("60% faster than using single block machines of the same voltage") + .addInfo("Processes 8*tier materials at a time") + .addInfo("ULV = Tier 0, LV = Tier 1, etc.") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 6, 3, true) + .addController("Bottom Center") + .addCasingInfo("Maceration Stack Casings", 26) + .addInputBus("Bottom Casing", 1) + .addEnergyHatch("Bottom Casing", 1) + .addMaintenanceHatch("Bottom Casing", 1) + .addOutputBus("One per layer except bottom layer", 2) + .addMufflerHatch("Any Casing", 2) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName + "top", transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + })) + .addShape(mName + "mid", transpose(new String[][]{ + {"CCC", "C-C", "CCC"}, + })) + .addShape(mName + "bottom", transpose(new String[][]{ + {"B~B", "BBB", "BBB"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialMacerator::addIndustrialMaceratorMidList, TAE.GTPP_INDEX(7), 2 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 7 + ) + ) + ) + ) + .addElement( + 'B', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialMacerator::addIndustrialMaceratorBottomList, TAE.GTPP_INDEX(7), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 7 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName + "bottom", stackSize, hintsOnly, 1, 0, 0); + buildPiece(mName + "mid", stackSize, hintsOnly, 1, 1, 0); + buildPiece(mName + "mid", stackSize, hintsOnly, 1, 2, 0); + buildPiece(mName + "mid", stackSize, hintsOnly, 1, 3, 0); + buildPiece(mName + "mid", stackSize, hintsOnly, 1, 4, 0); + buildPiece(mName + "top", stackSize, hintsOnly, 1, 5, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mPerLayer = 0; + if (checkPiece(mName + "bottom", 1, 0 ,0)) { + while (mPerLayer < 4) { + if (!checkPiece(mName + "mid", 1, mPerLayer + 1, 0) || + mPerLayer + 1 != mOutputBusses.size()) return false; + mPerLayer ++; + } + return checkPiece(mName + "top", 1, 5, 0) && mOutputBusses.size() == 5 && mCasing >= 26 && checkHatch(); + } + return false; + } + + public final boolean addIndustrialMaceratorBottomList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addIndustrialMaceratorMidList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(201)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_MatterFab_Active : TexturesGtBlock.Overlay_MatterFab)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "MacerationStack"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; + } + + @Override + public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { + final Random tRandom = aBaseMetaTileEntity.getWorld().rand; + aBaseMetaTileEntity.getWorld().spawnParticle("smoke", (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D); + } + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 60, 7500); + } + + @Override + protected boolean doesMachineBoostOutput() { + return true; + } + + @Override + public int getMaxParallelRecipes() { + final long tVoltage = getMaxInputVoltage(); + final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + return Math.max(1, 8 * tTier); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMacerator; + } + + @Override + public int getAmountOfOutputs() { + return 16; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java new file mode 100644 index 0000000000..5e405d426d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java @@ -0,0 +1,257 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialMixer +extends GregtechMeta_MultiBlockBase { + + public static int CASING_TEXTURE_ID; + public static String mCasingName = "Advanced Blast Furnace Casing"; + public static String mCasingName2 = "Advanced Blast Furnace Casing"; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + + public GregtechMetaTileEntity_IndustrialMixer(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 2); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 2); + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockCasings4, 11); + } + + public GregtechMetaTileEntity_IndustrialMixer(final String aName) { + super(aName); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 2); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 2); + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockCasings4, 11); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialMixer(this.mName); + } + + @Override + public String getMachineType() { + return "Mixer"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 2); + } + if (mCasingName2.toLowerCase().contains(".name")) { + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockCasings4, 11); + } + + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Mixer") + .addInfo("250% faster than using single block machines of the same voltage") + .addInfo("Processes eight recipes per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 4, 3, false) + .addController("Second Layer Center") + .addCasingInfo(mCasingName, 16) + .addCasingInfo(mCasingName2, 2) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"CCC", "CMC", "CCC"}, + {"C~C", "CMC", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialMixer::addIndustrialMixerList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 2 + ) + ) + ) + ) + .addElement( + 'M', + ofBlock( + GregTech_API.sBlockCasings4, 11 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 2, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 2, 0) && mCasing >= 16 && checkHatch(); + } + + public final boolean addIndustrialMixerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(203)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialMixer"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tBusItems = new ArrayList(); + tBus.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) + tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + ItemStack[] inputs = new ItemStack[tBusItems.size()]; + int slot = 0; + for (ItemStack g : tBusItems) { + inputs[slot++] = g; + } + if (inputs.length > 0) { + log("Recipe. ["+inputs.length+"]["+getMaxParallelRecipes()+"]"); + FluidStack[] fluid = this.getStoredFluids().toArray(new FluidStack[] {}); + if (checkRecipeGeneric(inputs,fluid , getMaxParallelRecipes(), getEuDiscountForParallelism(), 250, 10000)) { + log("Recipe 2."); + return true; + } + } + + } + return false; + } + + @Override + public int getMaxParallelRecipes() { + return (8 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMixer; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java new file mode 100644 index 0000000000..a0909a4fff --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java @@ -0,0 +1,541 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.*; +import gtPlusPlus.core.lib.CORE; +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_IndustrialMultiMachine +extends GregtechMeta_MultiBlockBase { + + protected int mInternalMode = 0; + protected GT_Recipe[] mLastRecipeExtended = new GT_Recipe[9]; + private static final int MODE_COMPRESSOR = 0; + private static final int MODE_LATHE = 1; + private static final int MODE_MAGNETIC = 2; + private static final int MODE_FERMENTER = 3; + private static final int MODE_FLUIDEXTRACT = 4; + private static final int MODE_EXTRACTOR = 5; + private static final int MODE_LASER = 6; + private static final int MODE_AUTOCLAVE = 7; + private static final int MODE_FLUIDSOLIDIFY = 8; + private static final int[][] MODE_MAP = new int[][] {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}}; + public static final String[] aToolTipNames = new String[9]; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + static { + for (int id = 0; id < 9; id++) { + String aNEI = GT_LanguageManager.getTranslation(getRecipeMap(id).mUnlocalizedName); + aToolTipNames[id] = aNEI != null ? aNEI : "BAD NEI NAME (Report to Github)"; + } + } + + + public GregtechMetaTileEntity_IndustrialMultiMachine(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialMultiMachine(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialMultiMachine(this.mName); + } + + @Override + public String getMachineType() { + return "Nine in One"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + + String[] aBuiltStrings = new String[3]; + aBuiltStrings[0] = aToolTipNames[0] + ", " + aToolTipNames[1] + ", " + aToolTipNames[2]; + aBuiltStrings[1] = aToolTipNames[3] + ", " + aToolTipNames[4] + ", " + aToolTipNames[5]; + aBuiltStrings[2] = aToolTipNames[6] + ", " + aToolTipNames[7]; + + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Multi-Machine") + .addInfo("250% faster than using single block machines of the same voltage") + .addInfo("Only uses 80% of the eu/t normally required") + .addInfo("Processes two items per voltage tier") + .addInfo("Machine Type: [A] - " + EnumChatFormatting.YELLOW + aBuiltStrings[0] + EnumChatFormatting.RESET) + .addInfo("Machine Type: [B] - " + EnumChatFormatting.YELLOW + aBuiltStrings[1] + EnumChatFormatting.RESET) + .addInfo("Machine Type: [C] - " + EnumChatFormatting.YELLOW + aBuiltStrings[2] + EnumChatFormatting.RESET) + .addInfo("Read Multi-Machine Manual for extra information") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Multi-Use Casings", 6) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialMultiMachine::addIndustrialMultiMachineList, getTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 2 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 6 && checkHatch(); + } + + public final boolean addIndustrialMultiMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getTextureIndex()), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getTextureIndex())}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "Generic3By3"; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + ArrayList tFluids = getStoredFluids(); + //Logger.MACHINE_INFO("1"); + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tBusItems = new ArrayList(); + tBus.mRecipeMap = getRecipeMap(); + //Logger.MACHINE_INFO("2"); + if (isValidMetaTileEntity(tBus)) { + //Logger.MACHINE_INFO("3"); + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) + tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + + boolean aFoundCircuitInBus = false; + for (ItemStack aBusItem : tBusItems) { + if (ItemUtils.isControlCircuit(aBusItem)) { + aFoundCircuitInBus = true; + } + } + if (!aFoundCircuitInBus) { + continue; + } + + Object[] tempArray = tFluids.toArray(new FluidStack[] {}); + FluidStack[] properArray; + properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {}); + + //Logger.MACHINE_INFO("4"); + if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), properArray, + (2*GT_Utility.getTier(this.getMaxInputVoltage())), 80, 250, 10000)) return true; + } + return false; + + //return checkRecipeGeneric(2*GT_Utility.getTier(this.getMaxInputVoltage()), 90, 180); + } + + @Override + public int getMaxParallelRecipes() { + return (2 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 80; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + if (mInternalMode == 0) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal; + } + else if (mInternalMode == 1) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid; + } + else { //config 2 + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc; + } + } + + public int getTextureIndex() { + return TAE.getIndexFromPage(2, 2); + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + private ItemStack getCircuit(ItemStack[] t) { + for (ItemStack j : t) { + if (j.getItem() == CI.getNumberedCircuit(0).getItem()) { + if (j.getItemDamage() >= 20 && j.getItemDamage() <= 22) { + return j; + } + } + } + return null; + } + + private final int getCircuitID(ItemStack circuit) { + int H = circuit.getItemDamage(); + int T = (H == 20 ? 0 : (H == 21 ? 1 : (H == 22 ? 2 : -1))); + return MODE_MAP[this.mInternalMode][T]; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + private final GT_Recipe.GT_Recipe_Map getRecipeMap(ItemStack circuit) { + return getRecipeMap(getCircuitID(circuit)); + } + + private static final GT_Recipe.GT_Recipe_Map getRecipeMap(int aMode) { + if (aMode == MODE_COMPRESSOR) { + return GT_Recipe.GT_Recipe_Map.sCompressorRecipes; + } + else if (aMode == MODE_LATHE) { + return GT_Recipe.GT_Recipe_Map.sLatheRecipes; + } + else if (aMode == MODE_MAGNETIC) { + return GT_Recipe.GT_Recipe_Map.sPolarizerRecipes; + } + else if (aMode == MODE_FERMENTER) { + return GT_Recipe.GT_Recipe_Map.sFermentingRecipes; + } + else if (aMode == MODE_FLUIDEXTRACT) { + return GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes; + } + else if (aMode == MODE_EXTRACTOR) { + return GT_Recipe.GT_Recipe_Map.sExtractorRecipes; + } + else if (aMode == MODE_LASER) { + return GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes; + } + else if (aMode == MODE_AUTOCLAVE) { + return GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes; + } + else if (aMode == MODE_FLUIDSOLIDIFY) { + return GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes; + } + else { + return null; + } + } + + @Override + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll) { + + // Based on the Processing Array. A bit overkill, but very flexible. + + // Get Circuit info for this recipe. + ItemStack tCircuit = getCircuit(aItemInputs); + int tCircuitID = getCircuitID(tCircuit); + + Logger.MACHINE_INFO("Mode: "+tCircuitID); + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + GT_Recipe.GT_Recipe_Map tRecipeMap = this.getRecipeMap(tCircuit); + if (tRecipeMap == null) + return false; + GT_Recipe tRecipe = tRecipeMap.findRecipe( + getBaseMetaTileEntity(), this.mLastRecipeExtended[tCircuitID], false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + // Remember last recipe - an optimization for findRecipe() + //this.mLastRecipe = tRecipe; //Let's not do this, it's bad. + //Instead, how about I use a array for types? + this.mLastRecipeExtended[tCircuitID] = tRecipe; + + if (tRecipe == null) { + Logger.MACHINE_INFO("BAD RETURN - 1|"+tCircuitID); + + if (aItemInputs.length > 0) { + Logger.MACHINE_INFO("Input Items: "+ItemUtils.getArrayStackNames(aItemInputs)); + } + if (aFluidInputs.length > 0) { + Logger.MACHINE_INFO("Input Fluids: "+ItemUtils.getFluidArrayStackNames(aFluidInputs)); + } + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + Logger.MACHINE_INFO("BAD RETURN - 2|"+tCircuitID); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + Logger.WARNING("parallelRecipes: "+parallelRecipes); + Logger.WARNING("aMaxParallelRecipes: "+aMaxParallelRecipes); + Logger.WARNING("tTotalEUt: "+tTotalEUt); + Logger.WARNING("tVoltage: "+tVoltage); + Logger.WARNING("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + Logger.WARNING("Broke at "+parallelRecipes+"."); + break; + } + Logger.WARNING("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + Logger.MACHINE_INFO("BAD RETURN - 3|"+tCircuitID); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + Logger.MACHINE_INFO("GOOD RETURN - 1|"+tCircuitID); + return true; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (mInternalMode < 2) { + mInternalMode++; + } + else { + mInternalMode = 0; + } + String mModeString = (mInternalMode == 0 ? "Metal" : mInternalMode == 1 ? "Fluid" : mInternalMode == 2 ? "Misc." : "null"); + PlayerUtils.messagePlayer(aPlayer, "Multi-Machine is now in "+mModeString+" mode."); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mInternalMode", mInternalMode); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + this.mInternalMode = aNBT.getInteger("mInternalMode"); + super.loadNBTData(aNBT); + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java new file mode 100644 index 0000000000..007d1a0d0f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java @@ -0,0 +1,242 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_MultiBlockBase { + + private boolean mFormingMode = false; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialPlatePress(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialPlatePress(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialPlatePress(this.mName); + } + + @Override + public String getMachineType() { + return "Bending Machine, Forming Press"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for Advanced Bending & Forming") + .addInfo("500% faster than using single block machines of the same voltage") + .addInfo("Processes four items per voltage tier") + .addInfo("Circuit for recipe goes in the Input Bus") + .addInfo("Each Input Bus can have a different Circuit/Shape!") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Material Press Machine Casings", 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialPlatePress::addIndustrialPlatePressList, 50, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 4 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + } + + public final boolean addIndustrialPlatePressList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(203)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50)}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "MaterialPress"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return mFormingMode ? GT_Recipe.GT_Recipe_Map.sPressRecipes : GT_Recipe.GT_Recipe_Map.sBenderRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tBusItems = new ArrayList(); + tBus.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) + tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + + if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, + (4* GT_Utility.getTier(this.getMaxInputVoltage())), 100, 500, 10000)) return true; + } + return false; + } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + if (this.mFormingMode) return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialPlatePress_ModeForming; + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialPlatePress_ModeBending; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("mFormingMode", mFormingMode); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mFormingMode = aNBT.getBoolean("mFormingMode"); + super.loadNBTData(aNBT); + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mFormingMode = Utils.invertBoolean(mFormingMode); + if (mFormingMode){ + PlayerUtils.messagePlayer(aPlayer, "Now running in Forming Press Mode."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Now running in Bending Mode."); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java new file mode 100644 index 0000000000..c5450fec5b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java @@ -0,0 +1,225 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import java.util.Random; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialSifter +extends GregtechMeta_MultiBlockBase { + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialSifter(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialSifter(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialSifter(this.mName); + } + + @Override + public String getMachineType() { + return "Sifter"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Sifter") + .addInfo("400% faster than single-block machines of the same voltage") + .addInfo("Only uses 75% of the eu/t normally required") + .addInfo("Processes four items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(5, 3, 5, false) + .addController("Bottom Center") + .addCasingInfo("Sieve Grate", 18) + .addCasingInfo("Sieve Casings", 35) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC"}, + {"CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC"}, + {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialSifter::addIndustrialSifterList, TAE.GTPP_INDEX(21), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 5 + ) + ) + ) + ) + .addElement( + 'M', + ofBlock( + ModBlocks.blockCasings2Misc, 6 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 2, 2, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 2, 2, 0) && mCasing >= 35 && mOutputBusses.size() >= 4 && checkHatch(); + } + + public final boolean addIndustrialSifterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(21)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(21))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialSifter"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sSifterRecipes; + } + + @Override + public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) { + final Random tRandom = aBaseMetaTileEntity.getWorld().rand; + if (tRandom.nextFloat() > 0.4) return; + + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2; + + aBaseMetaTileEntity.getWorld().spawnParticle("smoke", + (aBaseMetaTileEntity.getXCoord() + xDir + 2.1F) - (tRandom.nextFloat() * 3.2F), + aBaseMetaTileEntity.getYCoord() + 2.5f + (tRandom.nextFloat() * 1.2F), + (aBaseMetaTileEntity.getZCoord() + zDir + 2.1F) - (tRandom.nextFloat() * 3.2F), + 0.0, 0.0, 0.0); + + } + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 400, 10000); + } + + @Override + protected boolean doesMachineBoostOutput() { + return false; + } + + @Override + public int getMaxParallelRecipes() { + return (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 75; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialSifter; + } + + @Override + public int getAmountOfOutputs() { + return 16; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return true; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java new file mode 100644 index 0000000000..5a62c6c335 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java @@ -0,0 +1,268 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaTileEntity_IndustrialSinter +extends GT_MetaTileEntity_MultiBlockBase { + + + RenderBlocks asdasd = RenderBlocks.getInstance(); + + public GregtechMetaTileEntity_IndustrialSinter(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialSinter(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialSinter(this.mName); + } + + @Override + public String[] getDescription() { + return new String[]{ + "Controller Block for the Industrial Sinter Furnace", + "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)", + "2x Input Bus (side centered)", + "2x Output Bus (side centered)", + "1x Energy Hatch (top or bottom centered)", + "1x Maintenance Hatch (back centered)", + "Sinter Furnace Casings for the rest (32 at least!)", + "Causes " + 20 * this.getPollutionPerTick(null) + " Pollution per second", + CORE.GT_Tooltip + }; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7))}; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png"); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sWiremillRecipes; + } + + @Override + public boolean isCorrectMachinePart(final ItemStack aStack) { + return true; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return aFacing > 1; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + final ArrayList tInputList = this.getStoredInputs(); + for (final ItemStack tInput : tInputList) { + final long tVoltage = this.getMaxInputVoltage(); + final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput}); + if (tRecipe != null) { + if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) { + this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000)); + this.mEfficiencyIncrease = 10000; + if (tRecipe.mEUt <= 16) { + this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1))); + this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1))); + } else { + this.mEUt = tRecipe.mEUt; + this.mMaxProgresstime = tRecipe.mDuration; + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; + this.updateSlots(); + return true; + } + } + } + return false; + } + + @Override + public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { + final int controllerX = aBaseMetaTileEntity.getXCoord(); + final int controllerY = aBaseMetaTileEntity.getYCoord(); + final int controllerZ = aBaseMetaTileEntity.getZCoord(); + + final byte tSide = this.getBaseMetaTileEntity().getBackFacing(); + if ((this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 3)))) { + int tAirCount = 0; + for (byte i = -1; i < 2; i = (byte) (i + 1)) { + for (byte j = -1; j < 2; j = (byte) (j + 1)) { + for (byte k = -1; k < 2; k = (byte) (k + 1)) { + if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) { + Logger.INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k)); + //if (aBaseMetaTileEntity.getWorld().isRemote){ + //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k)); + //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN); + //} + tAirCount++; + } + } + } + } + if (tAirCount != 10) { + Logger.INFO("False. Air != 10. Air == "+tAirCount); + //return false; + } + for (byte i = 2; i < 6; i = (byte) (i + 1)) { + //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ), Color.LIME_GREEN); + IGregTechTileEntity tTileEntity; + if ((null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) && + (tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) && + ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter))) { + //Utils.LOG_INFO("False 1"); + return false; + } + } + final int tX = this.getBaseMetaTileEntity().getXCoord(); + final int tY = this.getBaseMetaTileEntity().getYCoord(); + final int tZ = this.getBaseMetaTileEntity().getZCoord(); + for (byte i = -1; i < 2; i = (byte) (i + 1)) { + for (byte j = -1; j < 2; j = (byte) (j + 1)) { + if ((i != 0) || (j != 0)) { + for (byte k = 0; k < 5; k = (byte) (k + 1)) { + //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.ORANGE); + if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) { + //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.TOMATO); + if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) { + } + else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) { + Logger.INFO("False 2"); + return false; + } + } + else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) { + } + else { + Logger.INFO("False 3"); + return false; + } + } + } + } + } + if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) { + Logger.INFO("Use Busses, Not Hatches for Input/Output."); + return false; + } + if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) { + Logger.INFO("Incorrect amount of Input & Output busses."); + return false; + } + this.mMaintenanceHatches.clear(); + final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4); + if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { + if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) { + this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity()); + ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex(); + } else { + Logger.INFO("Maintenance hatch must be in the middle block on the back."); + return false; + } + } + if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) { + Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); + return false; + } + } else { + Logger.INFO("False 5"); + return false; + } + Logger.INFO("True"); + return true; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(final ItemStack aStack) { + return 0; + } + + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasingsMisc; + } + + + public byte getCasingMeta() { + return 6; + } + + + public byte getCasingTextureIndex() { + return 1; //TODO + } + + private boolean addToMachineList(final IGregTechTileEntity tTileEntity) { + return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex()))); + } + + private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) { + return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex()))); + } +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java new file mode 100644 index 0000000000..01b887694a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java @@ -0,0 +1,224 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialThermalCentrifuge +extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialThermalCentrifuge(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialThermalCentrifuge(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialThermalCentrifuge(this.mName); + } + + @Override + public String getMachineType() { + return "Thermal Centrifuge"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Thermal Centrifuge") + .addInfo("150% faster than using single block machines of the same voltage") + .addInfo("Only uses 80% of the eu/t normally required") + .addInfo("Processes eight items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 2, 3, false) + .addController("Front Center") + .addCasingInfo("Thermal Processing Casings/Noise Hazard Sign Blocks", 8) + .addInputBus("Bottom Casing", 1) + .addOutputBus("Bottom Casing", 1) + .addEnergyHatch("Bottom Casing", 1) + .addMaintenanceHatch("Bottom Casing", 1) + .addMufflerHatch("Bottom Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"X~X", "XXX", "XXX"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialThermalCentrifuge::addIndustrialThermalCentrifugeList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 0 + ) + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + GregTech_API.sBlockCasings3, 9 + ) + ) + ) + ) + .addElement( + 'X', + ofChain( + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 0 + ) + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + GregTech_API.sBlockCasings3, 9 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 0, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 0, 0) && mCasing >= 8 && checkHatch(); + } + + public final boolean addIndustrialThermalCentrifugeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialThermalCentrifuge"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric((8* GT_Utility.getTier(this.getMaxInputVoltage())), 80, 150); + } + + @Override + public int getMaxParallelRecipes() { + return (8 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 80; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialThermalCentrifuge; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings2Misc; + } + + public byte getCasingMeta() { + return 0; + } + + public byte getCasingTextureIndex() { + return (byte) TAE.GTPP_INDEX(16); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java new file mode 100644 index 0000000000..1f63995651 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java @@ -0,0 +1,261 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta_MultiBlockBase { + + public static int CASING_TEXTURE_ID; + public static String mCryoFuelName = "Gelid Cryotheum"; + public static String mCasingName = "Advanced Cryogenic Casing"; + public static String mHatchName = "Cryotheum Hatch"; + public static FluidStack mFuelStack; + private boolean mHaveHatch; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + + public GregtechMetaTileEntity_IndustrialVacuumFreezer(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + mFuelStack = FluidUtils.getFluidStack("cryotheum", 1); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); + mCryoFuelName = mFuelStack.getLocalizedName(); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); + } + + public GregtechMetaTileEntity_IndustrialVacuumFreezer(final String aName) { + super(aName); + mFuelStack = FluidUtils.getFluidStack("cryotheum", 1); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); + mCryoFuelName = mFuelStack.getLocalizedName(); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); + } + + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (IMetaTileEntity) new GregtechMetaTileEntity_IndustrialVacuumFreezer(this.mName); + } + + @Override + public String getMachineType() { + return "Vacuum Freezer"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 10); + } + if (mCryoFuelName.toLowerCase().contains(".")) { + mCryoFuelName = FluidUtils.getFluidStack("cryotheum", 1).getLocalizedName(); + } + if (mHatchName.toLowerCase().contains(".name")) { + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); + } + + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Factory Grade Advanced Vacuum Freezer") + .addInfo("Speed: 200% | Eu Usage: 100% | Parallel: 4") + .addInfo("Consumes 1L of " + mCryoFuelName + "/t during operation") + .addInfo("Constructed exactly the same as a normal Vacuum Freezer") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo(mCasingName, 10) + .addStructureHint(mHatchName, 1) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialVacuumFreezer::addIndustrialVacuumFreezerList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 10 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mHaveHatch = false; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && mHaveHatch && checkHatch(); + } + + public final boolean addIndustrialVacuumFreezerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 967) { + mHaveHatch = true; + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + new GT_RenderedTexture((IIconContainer) (aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced))}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "VacuumFreezer"; + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT; + } + + public boolean isCorrectMachinePart(final ItemStack aStack) { + return true; + } + + public boolean checkRecipe(final ItemStack aStack) { + return this.checkRecipeGeneric(4, 100, 100); + } + + @Override + public int getMaxParallelRecipes() { + return 4; + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialVacuumFreezer; + } + + public int getDamageToComponent(final ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + private volatile int mGraceTimer = 2; + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + /*if (this.getBaseMetaTileEntity().isActive()) { + if (!this.depleteInput(mFuelStack.copy())) { + this.getBaseMetaTileEntity().setActive(false); + } + } */ + super.onPostTick(aBaseMetaTileEntity, aTick); + + if (this.mStartUpCheck < 0) { + if (this.mMaxProgresstime > 0 && this.mProgresstime != 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + if (aTick % 10 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + if (!this.depleteInput(FluidUtils.getFluidStack("cryotheum", 10))) { + if (mGraceTimer-- == 0) { + this.causeMaintenanceIssue(); + this.stopMachine(); + mGraceTimer = 2; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java new file mode 100644 index 0000000000..168d4ff6d6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java @@ -0,0 +1,335 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import ic2.core.init.BlocksItems; +import ic2.core.init.InternalName; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialWashPlant +extends GregtechMeta_MultiBlockBase { + + private boolean mChemicalMode = false; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialWashPlant(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialWashPlant(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialWashPlant(this.mName); + } + + @Override + public String getMachineType() { + return "Ore Washer, Chemical Bath"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Ore Washing Plant") + .addInfo("Can be configured with a screwdriver to also process Chemical Bathing") + .addInfo("400% faster than using single block machines of the same voltage") + .addInfo("Processes four item per voltage tier") + .addInfo("Always requires an Input Hatch full of water to refill structure") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(5, 3, 7, true) + .addController("Front Center") + .addCasingInfo("Wash Plant Casings", 40) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCCCC", "C C", "C C", "C C", "C C", "C C", "CCCCC"}, + {"CC~CC", "C C", "C C", "C C", "C C", "C C", "CCCCC"}, + {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialWashPlant::addIndustrialWashPlantList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 2, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 2, 1, 0) && mCasing >= 40 && checkHatch(); + } + + public final boolean addIndustrialWashPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + // don't rotate a washer, water will flow out. + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialWashPlant"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return mChemicalMode ? GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes : GT_Recipe.GT_Recipe_Map.sOreWasherRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + if (checkForWater()) { + return checkRecipeGeneric((4 * GT_Utility.getTier(this.getMaxInputVoltage())), 100, 400); + } + return false; + } + + @Override + public int getMaxParallelRecipes() { + return (4* GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + if (this.mChemicalMode) return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath; + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialWashPlant_ModeWasher; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings2Misc; + } + + + public byte getCasingMeta() { + return 4; + } + + + public byte getCasingTextureIndex() { + return (byte) TAE.GTPP_INDEX(11); + } + + public boolean checkForWater() { + + //Get Facing direction + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int mCurrentDirectionX; + int mCurrentDirectionZ; + int mOffsetX_Lower = 0; + int mOffsetX_Upper = 0; + int mOffsetZ_Lower = 0; + int mOffsetZ_Upper = 0; + + if (mDirectionX == 0){ + mCurrentDirectionX = 2; + mCurrentDirectionZ = 3; + mOffsetX_Lower = -2; + mOffsetX_Upper = 2; + mOffsetZ_Lower = -3; + mOffsetZ_Upper = 3; + } + else { + mCurrentDirectionX = 3; + mCurrentDirectionZ = 2; + mOffsetX_Lower = -3; + mOffsetX_Upper = 3; + mOffsetZ_Lower = -2; + mOffsetZ_Upper = 2; + } + + //if (aBaseMetaTileEntity.fac) + + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ; + + int tAmount = 0; + for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) { + for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { + for (int h = 0; h < 2; ++h) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water) { + if (this.getStoredFluids() != null) { + for (FluidStack stored : this.getStoredFluids()) { + if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) { + if (stored.amount >= 1000) { + //Utils.LOG_WARNING("Going to try swap an air block for water from inut bus."); + stored.amount -= 1000; + Block fluidUsed = null; + if (tBlock == Blocks.air || tBlock == Blocks.flowing_water) { + fluidUsed = Blocks.water; + } + if (tBlock == Blocks.water) { + fluidUsed = BlocksItems.getFluidBlock(InternalName.fluidDistilledWater); + } + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord() + xDir + i, aBaseMetaTileEntity.getYCoord() + h, aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed); + + + } + } + } + } + } + if (tBlock == Blocks.water) { + ++tAmount; + //Utils.LOG_WARNING("Found Water"); + } else if (tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) { + ++tAmount; + ++tAmount; + //Utils.LOG_WARNING("Found Distilled Water"); + } + } + } + } + if ((tAmount >= 45)){ + Logger.WARNING("Filled structure."); + } + else { + Logger.WARNING("Did not fill structure."); + } + return (tAmount >= 45); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("mChemicalMode", mChemicalMode); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mChemicalMode = aNBT.getBoolean("mChemicalMode"); + super.loadNBTData(aNBT); + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mChemicalMode = Utils.invertBoolean(mChemicalMode); + if (mChemicalMode){ + PlayerUtils.messagePlayer(aPlayer, "Wash Plant is now running in Chemical Bath Mode."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Wash Plant is now running in Ore Washer Mode."); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java new file mode 100644 index 0000000000..ccce25d925 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java @@ -0,0 +1,206 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_IndustrialWireMill +extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialWireMill(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialWireMill(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialWireMill(this.mName); + } + + @Override + public String getMachineType() { + return "Wiremill"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Wire Factory") + .addInfo("200% faster than using single block machines of the same voltage") + .addInfo("Only uses 75% of the eu/t normally required") + .addInfo("Processes four items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 5, true) + .addController("Front Center") + .addCasingInfo("Wire Factory Casings", 32) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC", "CCC", "CCC"}, + {"C~C", "C-C", "C-C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialWireMill::addIndustrialWireMillList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 32 && checkHatch(); + } + + public final boolean addIndustrialWireMillList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(204)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(6)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(6))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "IndustrialWireFactory"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sWiremillRecipes; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric((4* GT_Utility.getTier(this.getMaxInputVoltage())), 75, 200); + } + + @Override + public int getMaxParallelRecipes() { + return (4* GT_Utility.getTier(this.getMaxInputVoltage())); + } + + @Override + public int getEuDiscountForParallelism() { + return 75; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialWireMill; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasingsMisc; + } + + public byte getCasingMeta() { + return 6; + } + + public byte getCasingTextureIndex() { + return (byte) TAE.GTPP_INDEX(6); + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java new file mode 100644 index 0000000000..5d6904bd46 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java @@ -0,0 +1,403 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_IronBlastFurnace; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_IronBlastFurnace; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraftforge.common.util.ForgeDirection; + +public class GregtechMetaTileEntity_IronBlastFurnace +extends MetaTileEntity { + private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)}; + private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)}; + private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)}; + public int mMaxProgresstime = 0; + public int mUpdate = 30; + public int mProgresstime = 0; + public boolean mMachine = false; + public ItemStack mOutputItem1; + public ItemStack mOutputItem2; + + public GregtechMetaTileEntity_IronBlastFurnace(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional, 4); + } + + public GregtechMetaTileEntity_IronBlastFurnace(final String aName) { + super(aName, 4); + } + + @Override + public String[] getDescription() { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + return new String[]{"Iron is a much better furnace material!", + "Can be Automated", + "Multiblock: 3x3x5 hollow with opening on top", + "Same shape as Bronze/Bricked blast furnace, except one ring of 8 taller.", + "40 Iron Plated Bricks required", + }; + } + else { + return new String[]{"Sloooowly, Skip the Bronze age, Get some Steel!", + "Multiblock: 3x3x5 hollow with opening on top", + "40 Iron Plated Bricks required", + "----", + "Even though Iron melts hotter than bronze,", + "this machine is to help players skip looking", + "for tin and copper, which are not as common", + "as Iron is. This machine takes 5x longer than the bronze", + "blast furnace as a result.", + "----", + }; + } + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return aActive ? FACING_ACTIVE : FACING_FRONT; + } + return FACING_SIDE; + } + + @Override + public boolean isSteampowered() { + return false; + } + + @Override + public boolean isElectric() { + return false; + } + + @Override + public boolean isPneumatic() { + return false; + } + + @Override + public boolean isEnetInput() { + return false; + } + + @Override + public boolean isEnetOutput() { + return false; + } + + @Override + public boolean isInputFacing(final byte aSide) { + return false; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return false; + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return aFacing > 1; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public int getProgresstime() { + return this.mProgresstime; + } + + @Override + public int maxProgresstime() { + return this.mMaxProgresstime; + } + + @Override + public int increaseProgress(final int aProgress) { + this.mProgresstime += aProgress; + return this.mMaxProgresstime - this.mProgresstime; + } + + @Override + public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) { + return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID)); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IronBlastFurnace(this.mName); + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("mProgresstime", this.mProgresstime); + aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime); + if (this.mOutputItem1 != null) { + final NBTTagCompound tNBT = new NBTTagCompound(); + this.mOutputItem1.writeToNBT(tNBT); + aNBT.setTag("mOutputItem1", tNBT); + } + if (this.mOutputItem2 != null) { + final NBTTagCompound tNBT = new NBTTagCompound(); + this.mOutputItem2.writeToNBT(tNBT); + aNBT.setTag("mOutputItem2", tNBT); + } + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + this.mUpdate = 30; + this.mProgresstime = aNBT.getInteger("mProgresstime"); + this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime"); + this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1"); + this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2"); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity); + } + + private boolean checkMachine() { + final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX; + final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ; + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 4; j++) { //This is height + for (int k = -1; k < 2; k++) { + if (((xDir + i) != 0) || (j != 0) || ((zDir + k) != 0)) { + if ((i != 0) || (j == -1) || (k != 0)) { + if ((this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k) != ModBlocks.blockCasingsMisc) || (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) { + return false; + } + } else if ((!GT_Utility.arrayContains(this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[]{Blocks.lava, Blocks.flowing_lava, null})) && (!this.getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) { + return false; + } + } + } + } + } + return true; + } + + @Override + public void onMachineBlockUpdate() { + this.mUpdate = 30; + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { + if ((aBaseMetaTileEntity.isClientSide()) && + (aBaseMetaTileEntity.isActive())) { + aBaseMetaTileEntity.getWorld().spawnParticle("cloud", aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), 0.0D, 0.3D, 0.0D); + } + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate-- == 0) { + this.mMachine = this.checkMachine(); + } + if (this.mMachine) { + if (this.mMaxProgresstime > 0) { + if (++this.mProgresstime >= this.mMaxProgresstime) { + this.addOutputProducts(); + this.mOutputItem1 = null; + this.mOutputItem2 = null; + this.mProgresstime = 0; + this.mMaxProgresstime = 0; + try { + GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel"); + } catch (final Exception e) { + } + } + } else if (aBaseMetaTileEntity.isAllowedToWork()) { + this.checkRecipe(); + } + } + aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); + if (aBaseMetaTileEntity.isActive()) { + if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2); + this.mUpdate = 1; + } + if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2); + this.mUpdate = 1; + } + } else { + if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2); + this.mUpdate = 1; + } + if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2); + this.mUpdate = 1; + } + } + } + } + + private void addOutputProducts() { + if (this.mOutputItem1 != null) { + if (this.mInventory[2] == null) { + this.mInventory[2] = GT_Utility.copy(new Object[]{this.mOutputItem1}); + } else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) { + this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(), this.mOutputItem1.stackSize + this.mInventory[2].stackSize); + } + } + if (this.mOutputItem2 != null) { + if (this.mInventory[3] == null) { + this.mInventory[3] = GT_Utility.copy(new Object[]{this.mOutputItem2}); + } else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) { + this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(), this.mOutputItem2.stackSize + this.mInventory[3].stackSize); + } + } + } + + private boolean spaceForOutput(final ItemStack aStack1, final ItemStack aStack2) { + if (((this.mInventory[2] == null) || (aStack1 == null) || (((this.mInventory[2].stackSize + aStack1.stackSize) <= this.mInventory[2].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1)))) && ( + (this.mInventory[3] == null) || (aStack2 == null) || (((this.mInventory[3].stackSize + aStack2.stackSize) <= this.mInventory[3].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) { + return true; + } + return false; + } + + private int getProperTime(int time) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + return (int) (time/3); + } + else { + return time; + } + } + + private boolean checkRecipe() { + + if (!this.mMachine) { + return false; + } + if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) { + if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) { + if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 4*3); + this.mMaxProgresstime = getProperTime(36000); + return true; + } + if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 2*3); + this.mMaxProgresstime = getProperTime(4800); + return true; + } + if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 9); + this.getBaseMetaTileEntity().decrStackSize(1, 4*3); + this.mMaxProgresstime = getProperTime(64800); + return true; + } + } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) { + if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 2*3); + this.mMaxProgresstime = getProperTime(3600); + return true; + } + if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 1) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 1*3); + this.mMaxProgresstime = getProperTime(2400); + return true; + } + if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 9); + this.getBaseMetaTileEntity().decrStackSize(1, 2*3); + this.mMaxProgresstime = getProperTime(32400); + return true; + } + } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) { + if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 64); + this.mMaxProgresstime = getProperTime(64800); + return true; + } + if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 18) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 18*3); + this.mMaxProgresstime = getProperTime(43200); + return true; + } + if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) { + this.getBaseMetaTileEntity().decrStackSize(0, 1); + this.getBaseMetaTileEntity().decrStackSize(1, 4*3); + this.mMaxProgresstime = getProperTime(64800); + return true; + } + } + } + this.mOutputItem1 = null; + this.mOutputItem2 = null; + return false; + } + + @Override + public boolean isGivingInformation() { + return false; + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return aIndex > 1; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + if (aIndex < 2) { + } + return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]); + } + + @Override + public byte getTileEntityBaseType() { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java new file mode 100644 index 0000000000..59e6e78757 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java @@ -0,0 +1,666 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gtPlusPlus.core.lib.CORE; +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.EntityUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_MillingBalls; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import net.minecraft.block.Block; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase { + + protected boolean boostEu = false; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + private static ITexture frontFace; + private static ITexture frontFaceActive; + + private ArrayList mMillingBallBuses = new ArrayList(); + private static final DamageSource mIsaMillDamageSource = new DamageSource("gtpp.grinder").setDamageBypassesArmor(); + + public GregtechMetaTileEntity_IsaMill(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + frontFaceActive = new GT_RenderedTexture(new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5")); + frontFace = new GT_RenderedTexture(new CustomIcon("iconsets/Grinder/GRINDER5")); + } + + public GregtechMetaTileEntity_IsaMill(String aName) { + super(aName); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Large Grinding Machine") + .addInfo("Grind ores.") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 7, false) + .addController("Front Center") + .addCasingInfo("IsaMill Exterior Casing", 40) + .addOtherStructurePart("IsaMill Gearbox", "Inner Blocks") + .addOtherStructurePart("IsaMill Piping", "8x, ring around controller") + .addStructureInfo("IsaMill Pipings must not be obstructed in front (only air blocks)") + .addOtherStructurePart("Milling Ball Hatch", "Any Casing") + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC"}, + {"D~D", "CGC", "CGC", "CGC", "CGC", "CGC", "CCC"}, + {"DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IsaMill::addToMachineList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .addElement( + 'D', + ofBlock( + getIntakeBlock(), getIntakeMeta() + ) + ) + .addElement( + 'G', + ofBlock( + getGearboxBlock(), getGearboxMeta() + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mMillingBallBuses.clear(); + return checkPiece(mName, 1, 1, 0) && mCasing >= 48 - 8 && checkHatch(); + } + + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return new ITexture[]{ + Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(2)), + aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(2))}; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return getMaxEfficiency(aStack) > 0; + } + + @Override + public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_MillingBalls) { + log("Found GT_MetaTileEntity_Hatch_MillingBalls"); + return addToMachineListInternal(mMillingBallBuses, aMetaTileEntity, aBaseCasingIndex); + } + return super.addToMachineList(aTileEntity, aBaseCasingIndex); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate == 1 || this.mStartUpCheck == 1) { + this.mMillingBallBuses.clear(); + } + } + if (aTick % 20 == 0) { + checkForEntities(aBaseMetaTileEntity, aTick); + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + private final AutoMap mFrontBlockPosCache = new AutoMap(); + + public void checkForEntities(IGregTechTileEntity aBaseMetaTileEntity, long aTime) { + + if (aTime % 100 == 0) { + mFrontBlockPosCache.clear(); + } + if (mFrontBlockPosCache.isEmpty()) { + byte tSide = aBaseMetaTileEntity.getBackFacing(); + int aTileX = aBaseMetaTileEntity.getXCoord(); + int aTileY = aBaseMetaTileEntity.getYCoord(); + int aTileZ = aBaseMetaTileEntity.getZCoord(); + boolean xFacing = (tSide == 4 || tSide == 5); + boolean zFacing = (tSide == 2 || tSide == 3); + + // Check Casings + int aDepthOffset = (tSide == 2 || tSide == 4) ? 1 : -1; + for (int aHorizontalOffset = -1; aHorizontalOffset < 2; aHorizontalOffset++) { + for (int aVerticalOffset = -1; aVerticalOffset < 2; aVerticalOffset++) { + int aX = !xFacing ? (aTileX + aHorizontalOffset) : (aTileX + aDepthOffset); + int aY = aTileY + aVerticalOffset; + int aZ = !zFacing ? (aTileZ + aHorizontalOffset) : (aTileZ + aDepthOffset); + mFrontBlockPosCache.add(new BlockPos(aX, aY, aZ, aBaseMetaTileEntity.getWorld())); + } + } + } + + AutoMap aEntities = getEntities(mFrontBlockPosCache, aBaseMetaTileEntity.getWorld()); + if (!aEntities.isEmpty()) { + for (EntityLivingBase aFoundEntity : aEntities) { + if (aFoundEntity instanceof EntityPlayer) { + EntityPlayer aPlayer = (EntityPlayer) aFoundEntity; + if (PlayerUtils.isCreative(aPlayer) || !PlayerUtils.canTakeDamage(aPlayer)) { + continue; + } + else { + if (aFoundEntity.getHealth() > 0) { + EntityUtils.doDamage(aFoundEntity, mIsaMillDamageSource, (int) (aFoundEntity.getMaxHealth() / 5)); + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { + generateParticles(aFoundEntity); + } + } + } + } + if (aFoundEntity.getHealth() > 0) { + EntityUtils.doDamage(aFoundEntity, mIsaMillDamageSource, Math.max(1, (int) (aFoundEntity.getMaxHealth() / 3))); + if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) { + generateParticles(aFoundEntity); + } + } + } + } + } + + private static final AutoMap getEntities(AutoMap aPositionsToCheck, World aWorld){ + AutoMap aEntities = new AutoMap(); + HashSet aChunksToCheck = new HashSet(); + if (!aPositionsToCheck.isEmpty()) { + Chunk aLocalChunk; + for (BlockPos aPos : aPositionsToCheck) { + aLocalChunk = aWorld.getChunkFromBlockCoords(aPos.xPos, aPos.zPos); + aChunksToCheck.add(aLocalChunk); + } + } + if (!aChunksToCheck.isEmpty()) { + AutoMap aEntitiesFound = new AutoMap(); + for (Chunk aChunk : aChunksToCheck) { + if (aChunk.isChunkLoaded) { + List[] aEntityLists = aChunk.entityLists; + for (List aEntitySubList : aEntityLists) { + for (Object aEntity : aEntitySubList) { + if (aEntity instanceof EntityLivingBase) { + EntityLivingBase aPlayer = (EntityLivingBase) aEntity; + aEntitiesFound.add(aPlayer); + } + } + } + } + } + if (!aEntitiesFound.isEmpty()) { + for (EntityLivingBase aEntity : aEntitiesFound) { + BlockPos aPlayerPos = EntityUtils.findBlockPosOfEntity(aEntity); + for (BlockPos aBlockSpaceToCheck : aPositionsToCheck) { + if (aBlockSpaceToCheck.equals(aPlayerPos)) { + aEntities.add(aEntity); + } + } + } + } + } + return aEntities; + } + + private static void generateParticles(EntityLivingBase aEntity) { + BlockPos aPlayerPosBottom = EntityUtils.findBlockPosOfEntity(aEntity); + BlockPos aPlayerPosTop = aPlayerPosBottom.getUp(); + AutoMap aEntityPositions = new AutoMap(); + aEntityPositions.add(aPlayerPosBottom); + aEntityPositions.add(aPlayerPosTop); + for (int i = 0; i < 64; i++) { + BlockPos aEffectPos = aEntityPositions.get(aEntity.height > 1f ? MathUtils.randInt(0, 1) : 0); + float aOffsetX = MathUtils.randFloat(-0.35f, 0.35f); + float aOffsetY = MathUtils.randFloat(-0.25f, 0.35f); + float aOffsetZ = MathUtils.randFloat(-0.35f, 0.35f); + aEntity.worldObj.spawnParticle("reddust", aEffectPos.xPos + aOffsetX, aEffectPos.yPos + 0.3f + aOffsetY, aEffectPos.zPos + aOffsetZ, 0.0D, 0.0D, 0.0D); + } + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + return checkRecipeGeneric(); + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings5Misc; + } + + public byte getCasingMeta() { + return 0; + } + + public Block getIntakeBlock() { + return ModBlocks.blockCasings5Misc; + } + + public byte getIntakeMeta() { + return 1; + } + + public Block getGearboxBlock() { + return ModBlocks.blockCasings5Misc; + } + + public byte getGearboxMeta() { + return 2; + } + + public byte getCasingTextureIndex() { + return 66; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IsaMill(this.mName); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 1; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIsaMill; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public String[] getExtraInfoData() { + return new String[]{ + "IsaMill Grinding Machine", + "Current Efficiency: " + (mEfficiency / 100) + "%", + getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Grinding Machine"; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + /* + * Milling Ball Handling + */ + + @Override + public ArrayList getStoredInputs() { + ArrayList tItems = super.getStoredInputs(); + for (GT_MetaTileEntity_Hatch_MillingBalls tHatch : mMillingBallBuses) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + tItems.addAll(tHatch.getContentUsageSlots()); + } + } + return tItems; + } + + + public int getMaxBallDurability(ItemStack aStack) { + return ItemGenericChemBase.getMaxBallDurability(aStack); + } + + private ItemStack findMillingBall(ItemStack[] aItemInputs) { + if (mMillingBallBuses.isEmpty() || mMillingBallBuses.size() > 1) { + return null; + } + else { + GT_MetaTileEntity_Hatch_MillingBalls aBus = mMillingBallBuses.get(0); + if (aBus != null) { + AutoMap aAvailableItems = aBus.getContentUsageSlots(); + if (!aAvailableItems.isEmpty()) { + for (final ItemStack aInput : aItemInputs) { + if (ItemUtils.isMillingBall(aInput)) { + for (ItemStack aBall : aAvailableItems) { + if (GT_Utility.areStacksEqual(aBall, aInput, true)) { + Logger.INFO("Found a valid milling ball to use."); + return aBall; + } + } + } + } + } + } + } + return null; + } + + + private void damageMillingBall(ItemStack aStack) { + if (MathUtils.randFloat(0, 10000000)/10000000f < (1.2f - (0.2 * 1))) { + int damage = getMillingBallDamage(aStack) + 1; + log("damage milling ball "+damage); + if (damage >= getMaxBallDurability(aStack)) { + log("consuming milling ball"); + aStack.stackSize -= 1; + } + else { + setDamage(aStack,damage); + } + } + else { + log("not damaging milling ball"); + } + } + + private int getMillingBallDamage(ItemStack aStack) { + return ItemGenericChemBase.getMillingBallDamage(aStack); + } + + private void setDamage(ItemStack aStack,int aAmount) { + ItemGenericChemBase.setMillingBallDamage(aStack, aAmount); + } + + + @Override + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) { + + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + log("Running checkRecipeGeneric(0)"); + + // checks if it has a milling ball with enough durability + ItemStack tMillingBallRecipe = findMillingBall(aItemInputs); + if (tMillingBallRecipe == null) { + log("does not have milling ball"); + return false; + } + + GT_Recipe tRecipe = findRecipe( + getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + + log("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + + if (tRecipe == null) { + log("BAD RETURN - 1"); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + log("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + log("aEUPercent "+aEUPercent); + log("mEUt "+tRecipe.mEUt); + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+1); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tEnergy: "+tEnergy); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < 1 && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + + // Damage Milling ball once all is said and done. + if (tMillingBallRecipe != null) { + log("damaging milling ball"); + damageMillingBall(tMillingBallRecipe); + } + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java new file mode 100644 index 0000000000..81f8ba9edb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java @@ -0,0 +1,414 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +import java.util.ArrayList; +import java.util.List; + +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GasSpargingRecipe; +import gregtech.api.util.GasSpargingRecipeMap; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockBase { + + protected static final String STRUCTURE_PIECE_BASE = "base"; + protected static final String STRUCTURE_PIECE_LAYER = "layer"; + protected static final String STRUCTURE_PIECE_LAYER_HINT = "layerHint"; + protected static final String STRUCTURE_PIECE_TOP_HINT = "topHint"; + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][]{ + {"b~b", "bbb", "bbb"}, + })) + .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][]{ + {"lll", "lcl", "lll"} + })) + .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][]{ + {"lll", "l-l", "lll"} + })) + .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][]{ + {"lll", "lll", "lll"} + })) + .addElement('b', ofChain( + ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 1), + ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addInputToMachineList, getCasingIndex(), 1), + ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 1), + onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4)) + )) + .addElement('l', ofChain( + ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 2), + ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addLayerOutputHatch, getCasingIndex(), 2), + ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 2), + onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4)) + )) + .addElement('c', ofChain( + onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addOutputToMachineList, getCasingIndex(), 3)), + onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 3)), + onElementPass(t -> t.onTopLayerFound(true), ofBlock(ModBlocks.blockCasings5Misc, 4)), + isAir() + )) + .build(); + + protected final List> mOutputHatchesByLayer = new ArrayList<>(); + protected int mHeight; + protected int mCasing; + protected boolean mTopLayerFound; + + public GregtechMetaTileEntity_SpargeTower(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_SpargeTower(String aName) { + super(aName); + } + + public static int getCasingIndex() { + return 68; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_SpargeTower(this.mName); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Gas Sparge Tower") + .addInfo("Controller block for the Sparging Tower") + .addInfo("Fluids are only put out at the correct height") + .addInfo("The correct height equals the slot number in the NEI recipe") + .addSeparator() + .beginStructureBlock(3, 8, 3, true) + .addController("Front bottom") + .addOtherStructurePart("Sparge Tower Exterior Casing", "45 (minimum)") + .addEnergyHatch("Any casing", 1, 2) + .addMaintenanceHatch("Any casing", 1, 2, 3) + .addInputHatch("2x Input Hatches (Any bottom layer casing)", 1) + .addOutputHatch("6x Output Hatches (At least one per layer except bottom layer)", 2, 3) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + if (aActive) + return new ITexture[]{ + BlockIcons.getCasingTextureForId(getCasingIndex()), + TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active).extFacing().build()}; + return new ITexture[]{ + BlockIcons.getCasingTextureForId(getCasingIndex()), + TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced).extFacing().build()}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingIndex())}; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png"); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + if (GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.isEmpty()) { + generateRecipes(); + } + return GTPP_Recipe_Map.sSpargeTowerRecipes; + } + + private static boolean generateRecipes() { + for (GasSpargingRecipe aRecipe : GasSpargingRecipeMap.mRecipes) { + GTPP_Recipe newRecipe = new GTPP_Recipe( + false, + new ItemStack[] {}, + new ItemStack[] {}, + null, + null, + aRecipe.mFluidInputs.clone(), + new FluidStack[] {}, + aRecipe.mDuration, + aRecipe.mEUt, + 0); + GTPP_Recipe_Map.sSpargeTowerRecipes.add(newRecipe); + } + if (GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.isEmpty()) { + return false; + } + return true; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + ArrayList tFluidList = getStoredFluids(); + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(0, GT_Utility.getTier(tVoltage)); + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); + if (tFluids.length > 0) { + Logger.INFO("Found "+tFluids.length+" input fluids. Searching "+GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.size()+" recipes."); + GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids); + if (tRecipe != null) { + Logger.INFO("Found recipe!"); + if (tRecipe.isRecipeInputEqual(true, tFluids)) { + Logger.INFO("Found recipe that matches!"); + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Reset outputs and progress stats + this.mEUt = 0; + this.mProgresstime = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + this.mLastRecipe = tRecipe; + + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + int aDevProgress = this.mMaxProgresstime / 10; + this.mMaxProgresstime = Math.max(1, aDevProgress); + this.mOutputItems = new ItemStack[]{}; + ArrayList aFluidOutputs = getByproductsOfSparge(tRecipe.mFluidInputs[0], tRecipe.mFluidInputs[1]); + this.mOutputFluids = (FluidStack[]) aFluidOutputs.toArray(new FluidStack[0]); + updateSlots(); + Logger.INFO("Done!"); + return true; + } + } + else { + Logger.INFO("Did not find recipe!"); + } + } + this.mEUt = 0; + this.mEfficiency = 0; + Logger.INFO("Did not find recipe! (2)"); + return false; + } + + private static ArrayList getByproductsOfSparge(final FluidStack aSpargeGas, final FluidStack aSpentFuel){ + GasSpargingRecipe aSpargeRecipe = GasSpargingRecipeMap.findRecipe(aSpargeGas, aSpentFuel); + ArrayList aOutputGases = new ArrayList(); + if (aSpargeRecipe == null) { + Logger.INFO("Did not find sparge recipe!"); + return aOutputGases; + } + int aSpargeGasAmount = aSpargeRecipe.mInputGas.amount; + + aOutputGases.add(aSpargeRecipe.mOutputSpargedFuel.copy()); + ArrayList aTempMap = new ArrayList(); + for (int i=2;i 0) { + aSpargeOutput = new FluidStack(aOutput.getFluid(), aGasAmount); + } + aTempMap.add(aSpargeOutput); + } + Logger.INFO("Sparge gas left: "+aSpargeGasAmount); + if (aSpargeGasAmount > 0) { + aOutputGases.add(new FluidStack(aSpargeRecipe.mInputGas.getFluid(), aSpargeGasAmount)); + } + //Logger.INFO("Sparge Outputs: "+ItemUtils.getArrayStackNames(aTempMap)); + aOutputGases.addAll(aTempMap); + Logger.INFO("Sparge output size: "+aOutputGases.size()); + //Logger.INFO("Output of sparging: "+ItemUtils.getArrayStackNames(aOutputGases)); + return aOutputGases; + } + + protected void onCasingFound() { + mCasing++; + } + + protected void onTopLayerFound(boolean aIsCasing) { + mTopLayerFound = true; + if (aIsCasing) { + onCasingFound(); + } + } + + protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) { + Logger.INFO("Bad Output Hatch"); + return false; + } + while (mOutputHatchesByLayer.size() < mHeight) { + mOutputHatchesByLayer.add(new ArrayList<>()); + } + GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity(); + tHatch.updateTexture(aBaseCasingIndex); + boolean addedHatch = mOutputHatchesByLayer.get(mHeight - 1).add(tHatch); + Logger.INFO("Added Hatch: "+addedHatch); + return addedHatch; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + // don't rotate a freaking tower, it won't work + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); + } + + @Override + public IStructureDefinition getStructureDefinition() { + return STRUCTURE_DEFINITION; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + // reset + mOutputHatchesByLayer.forEach(List::clear); + mHeight = 1; + mTopLayerFound = false; + mCasing = 0; + + // check base + if (!checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0)) { + Logger.INFO("Bad Base. Height: "+mHeight); + return false; + } + + // check each layer + while (mHeight < 8 && checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0) && !mTopLayerFound) { + if (mOutputHatchesByLayer.get(mHeight - 1).isEmpty()) { + // layer without output hatch + Logger.INFO("Height: "+mHeight + " - Missing output on "+(mHeight - 1)); + return false; + } + // not top + mHeight++; + } + + // validate final invariants... + Logger.INFO("Height: "+mHeight); + Logger.INFO("Casings: "+mCasing); + Logger.INFO("Required: "+(7 * mHeight - 5)); + Logger.INFO("Found Top: "+mTopLayerFound); + return mCasing >= 45 && mTopLayerFound && mMaintenanceHatches.size() == 1; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + protected void addFluidOutputs(FluidStack[] mOutputFluids2) { + for (int i = 0; i < mOutputFluids2.length && i < mOutputHatchesByLayer.size(); i++) { + FluidStack tStack = mOutputFluids2[i] != null ? mOutputFluids2[i].copy() : null; + if (tStack == null) { + continue; + } + if (!dumpFluid(mOutputHatchesByLayer.get(i), tStack, true)) { + dumpFluid(mOutputHatchesByLayer.get(i), tStack, false); + } + } + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(STRUCTURE_PIECE_BASE, stackSize, hintsOnly, 1, 0, 0); + int tTotalHeight = 8; // min 2 output layer, so at least 1 + 2 height + for (int i = 1; i < tTotalHeight - 1; i++) { + buildPiece(STRUCTURE_PIECE_LAYER_HINT, stackSize, hintsOnly, 1, i, 0); + } + buildPiece(STRUCTURE_PIECE_TOP_HINT, stackSize, hintsOnly, 1, tTotalHeight - 1, 0); + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getMachineType() { + return "Gas Sparger"; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + int aLayerIndex = 0; + PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatchesByLayer.size()+" layers of output hatches."); + for (List layer : this.mOutputHatchesByLayer) { + int aHatchIndex = 0; + for (GT_MetaTileEntity_Hatch_Output hatch : layer) { + if (hatch.mFluid != null) { + PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+" on layer "+aLayerIndex+"."); + hatch.mFluid = null; + } + aHatchIndex++; + } + aLayerIndex++; + } + return aLayerIndex > 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java new file mode 100644 index 0000000000..8c9e886e94 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java @@ -0,0 +1,629 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; + +import java.util.ArrayList; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.minecraft.LangUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Naquadah; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_Adv_AssemblyLine + extends GregtechMeta_MultiBlockBase { + + public ArrayList mDataAccessHatches = new ArrayList(); + + public static String[] mCasingName = new String[5]; + private final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 13); + private final int META_BaseCasing = 0; //4 + private final int META_ContainmentCasing = 15; //3 + private final int META_Shielding = 13; //1 + private final int META_PipeCasing = 1; //4 + private final int META_IntegralCasing = 6; //0 + private final int META_ContainmentChamberCasing = 2; //4 + + + public GregtechMetaTileEntity_Adv_AssemblyLine(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); + mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); + mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); + mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); + mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); + } + + public GregtechMetaTileEntity_Adv_AssemblyLine(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Adv_AssemblyLine(this.mName); + } + + public String[] getTooltip() { + if (mCasingName[0].toLowerCase().contains(".name")) { + mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); + } + if (mCasingName[1].toLowerCase().contains(".name")) { + mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); + } + if (mCasingName[2].toLowerCase().contains(".name")) { + mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); + } + if (mCasingName[3].toLowerCase().contains(".name")) { + mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); + } + if (mCasingName[4].toLowerCase().contains(".name")) { + mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); + } + return new String[]{ + "Advanced Integrated Assembly Line" + }; + } + + private Block getCasing(int casingID) { + if (casingID == 1) { + return ModBlocks.blockCasingsMisc; + } + else if (casingID == 2) { + return ModBlocks.blockCasings2Misc; + } + else if (casingID == 3) { + return ModBlocks.blockCasings3Misc; + } + else if (casingID == 4) { + return ModBlocks.blockCasings4Misc; + } + else { + return ModBlocks.blockCasingsTieredGTPP; + } + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(16), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(16)}; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png"); + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + public boolean checkRecipe(ItemStack aStack) { + if(GT_Values.D1)System.out.println("Start ALine recipe check"); + ArrayList tDataStickList = getDataItems(2); + if (tDataStickList.size() == 0) return false; + if(GT_Values.D1)System.out.println("Stick accepted, " + tDataStickList.size() + " Data Sticks found"); + + ItemStack tStack[] = new ItemStack[15]; + FluidStack[] tFluids = new FluidStack[4]; + boolean findRecipe = false; + nextDS:for (ItemStack tDataStick : tDataStickList){ + NBTTagCompound tTag = tDataStick.getTagCompound(); + if (tTag == null) continue; + for (int i = 0; i < 15; i++) { + int count = tTag.getInteger("a"+i); + if (!tTag.hasKey("" + i) && count <= 0) continue; + if (mInputBusses.get(i) == null) { + continue nextDS; + } + + ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0); + boolean flag = true; + if (count > 0) { + for (int j = 0; j < count; j++) { + tStack[i] = GT_Utility.loadItem(tTag, "a" + i + ":" + j); + if (tStack[i] == null) continue; + if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName()); + if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { + flag = false; + break; + } + } + } + if (flag) { + tStack[i] = GT_Utility.loadItem(tTag, "" + i); + if (tStack[i] == null) { + flag = false; + continue; + } + if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName()); + if (GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) && tStack[i].stackSize <= stackInSlot.stackSize) { + flag = false; + } + } + if(GT_Values.D1) System.out.println(i + (flag ? " not accepted" : " accepted")); + if (flag) continue nextDS; + } + + if(GT_Values.D1)System.out.println("All Items done, start fluid check"); + for (int i = 0; i < 4; i++) { + if (!tTag.hasKey("f" + i)) continue; + tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i); + if (tFluids[i] == null) continue; + if(GT_Values.D1)System.out.println("Fluid "+i+" "+tFluids[i].getUnlocalizedName()); + if (mInputHatches.get(i) == null) { + continue nextDS; + } + FluidStack fluidInHatch = mInputHatches.get(i).mFluid; + if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) { + if(GT_Values.D1)System.out.println(i+" not accepted"); + continue nextDS; + } + if(GT_Values.D1)System.out.println(i+" accepted"); + } + + if(GT_Values.D1)System.out.println("Input accepted, check other values"); + if (!tTag.hasKey("output")) continue; + mOutputItems = new ItemStack[]{GT_Utility.loadItem(tTag, "output")}; + if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0])) + continue; + + if (!tTag.hasKey("time")) continue; + mMaxProgresstime = tTag.getInteger("time"); + if (mMaxProgresstime <= 0) continue; + + if (!tTag.hasKey("eu")) continue; + mEUt = tTag.getInteger("eu"); + + if(GT_Values.D1)System.out.println("Find avaiable recipe"); + findRecipe = true; + break; + } + if (!findRecipe) return false; + + if(GT_Values.D1)System.out.println("All checked start consuming inputs"); + for (int i = 0; i < 15; i++) { + if (tStack[i] == null) continue; + ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0); + stackInSlot.stackSize -= tStack[i].stackSize; + } + + for (int i = 0; i < 4; i++) { + if (tFluids[i] == null) continue; + mInputHatches.get(i).mFluid.amount -= tFluids[i].amount; + if (mInputHatches.get(i).mFluid.amount <= 0) { + mInputHatches.get(i).mFluid = null; + } + } + if(GT_Values.D1)System.out.println("Check overclock"); + + byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + if (mEUt <= 16) { + this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + if (this.mEUt > 0) { + this.mEUt = -this.mEUt; + } + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + updateSlots(); + if(GT_Values.D1)System.out.println("Recipe sucessfull"); + return true; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 20) { + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ); + } + } + + public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4; + + // Counts for all Casing Types + int aBaseCasingCount = 0; + int aContainmentCasingCount = 0; + int aShieldingCount = 0; + int aPipeCount = 0; + int aIntegralCasingCount = 0; + int aContainmentChamberCount = 0; + + // Bottom Layer + aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, -7, xDir, zDir); + log("Bottom Layer is Valid. Moving to Layer 1."); + + // Layer 1 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -6, xDir, zDir); + aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -6, xDir, zDir); + aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir); + log("Layer 1 is Valid. Moving to Layer 2."); + + // Layer 2 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -5, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -5, xDir, zDir); + log("Layer 2 is Valid. Moving to Layer 3."); + + // Layer 3 + aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir); + log("Layer 3 is Valid. Moving to Layer 4."); + + // Layer 4 + aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir); + log("Layer 4 is Valid. Moving to Layer 5."); + + // Layer 5 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -2, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -2, xDir, zDir); + log("Layer 5 is Valid. Moving to Layer 6."); + + // Layer 6 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir); + aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir); + aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -1, xDir, zDir); + log("Layer 6 is Valid. Moving to Top Layer."); + + // Top Layer + aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, 0, xDir, zDir); + + log("Found "+aBaseCasingCount+" "+mCasingName[0]+"s"); + log("Found "+aShieldingCount+" "+mCasingName[4]+"s"); + log("Found "+aPipeCount+" "+mCasingName[1]+"s"); + log("Found "+aContainmentCasingCount+" "+mCasingName[3]+"s"); + log("Found "+aIntegralCasingCount+" "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s"); + log("Found "+aContainmentChamberCount+" "+mCasingName[2]+"s"); + + // Try mesage player + String aOwnerName = this.getBaseMetaTileEntity().getOwnerName(); + EntityPlayer aOwner = null; + if (aOwnerName != null && aOwnerName.length() > 0) { + aOwner = PlayerUtils.getPlayer(aOwnerName); + } + + if (aShieldingCount != 128) { + log("Not enough "+mCasingName[4]+"s, require 128."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[4]+"s, require 128."); + } + return false; + } + if (aPipeCount != 20) { + log("Not enough "+mCasingName[1]+"s, require 20."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[1]+"s, require 20."); + } + return false; + } + if (aContainmentCasingCount != 64) { + log("Not enough "+mCasingName[3]+"s, require 64."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[3]+"s, require 64."); + } + return false; + } + if (aContainmentChamberCount != 42) { + log("Not enough "+mCasingName[2]+"s, require 42."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[2]+"s, require 42."); + } + return false; + } + if (aBaseCasingCount < 140) { + log("Not enough "+mCasingName[0]+"s, require 140 at a minimum."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[0]+"s, require 140 at a minimum."); + } + return false; + } + if (aIntegralCasingCount != 48) { + log("Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); + } + return false; + } + log("LNR Formed."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Large Naquadah Reactor has formed successfully."); + } + return true; + } + + public boolean addNaquadahHatchToMachineInput(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity); + } + return false; + } + + public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -4; x < 5; x++) { + for (int z = -4; z < 5; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { + continue; + } + // Skip controller + if (aY == 0 && x == 0 && z == 0) { + continue; + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + + public int checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -4; x < 5; x++) { + for (int z = -4; z < 5; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { + continue; + } + + // If we are on the 5x5 ring, proceed + if ((x > -4 && x < 4 ) && (z > -4 && z < 4)) { + if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + } + else { + continue; + } + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -3; x < 4; x++) { + for (int z = -3; z < 4; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { + continue; + } + + // If we are on the 5x5 ring, proceed + if ((x > -3 && x < 3 ) && (z > -3 && z < 3)) { + if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + } + else { + continue; + } + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + + public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -1; x < 2; x++) { + for (int z = -1; z < 2; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 1 && z == 1) || (x == -1 && z == -1) || (x == 1 && z == -1) || (x == -1 && z == 1) || (x == 0 && z == 0)) { + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Pipe has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + }; + } + } + } + return aCasingCount; + } + + public int checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -2; x < 3; x++) { + for (int z = -2; z < 3; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { + continue; + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + + */ +/** + * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb + *//* + + private boolean isCorrectDataItem(ItemStack aStack, int state){ + if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true; + if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true; + if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true; + return false; + } + + */ +/** + * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb + *//* + + public ArrayList getDataItems(int state) { + ArrayList rList = new ArrayList(); + if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) { + rList.add(mInventory[1]); + } + for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) { + if (isValidMetaTileEntity(tHatch)) { + for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) { + if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null + && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state)) + rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + return rList; + } + + public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) return false; + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) return false; + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity); + } + return false; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Assembly Line"; + } + + @Override + public int getMaxParallelRecipes() { + return 0; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java new file mode 100644 index 0000000000..6d8ca49d7d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java @@ -0,0 +1,481 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; + +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; + +public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_MultiBlockBase { + + private short mControllerY = 0; + private byte mMode = 0; + private boolean mUpgraded = false; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_Adv_DistillationTower(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_Adv_DistillationTower(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Adv_DistillationTower(this.mName); + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName + "bottom", transpose(new String[][]{ + {"I~I", "III", "III"} + })) + .addShape(mName + "mid", transpose(new String[][]{ + {"CCC", "C-C", "CCC"} + })) + .addShape(mName + "top", transpose(new String[][]{ + {"MMM", "MMM", "MMM"} + })) + .addElement( + 'I', + ofHatchAdderOptional( + GregtechMetaTileEntity_Adv_DistillationTower::addAdvDistillationTowerBottomList, getCasingTextureID(), + 1, GregTech_API.sBlockCasings4, 1 + ) + ) + .addElement( + 'C', + ofHatchAdderOptional( + GregtechMetaTileEntity_Adv_DistillationTower::addAdvDistillationTowerMidList, getCasingTextureID(), + 2, GregTech_API.sBlockCasings4, 1 + ) + ) + .addElement( + 'M', + ofHatchAdderOptional( + GregtechMetaTileEntity_Adv_DistillationTower::addAdvDistillationTowerTopList, getCasingTextureID(), + 3, GregTech_API.sBlockCasings4, 1 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addAdvDistillationTowerBottomList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addAdvDistillationTowerMidList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addAdvDistillationTowerTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Advanced Distillation Tower") + .addInfo("T1 and T2 constructed identical to standard DT") + .addInfo("Right click the controller with screwdriver to change mode.") + .addInfo("Max parallel dictated by tower tier and mode") + .addInfo("DTower Mode: T1=4, T2=12") + .addInfo("Distilery Mode: Tower Tier * (4*InputTier)") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .addCasingInfo("Clean Stainless Steel Machine Casing", 7) + .addInputBus("Bottom Casing", 1) + .addOutputBus("Bottom Casing", 1) + .addInputHatch("Bottom Casing", 1) + .addMaintenanceHatch("Bottom Casing", 1) + .addEnergyHatch("Bottom Casing", 1) + .addOutputHatch("One per layer except bottom", 2) + .addMufflerHatch("Top Center Casing", 3) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + int layer = Math.min(stackSize.stackSize + 2, 12); + buildPiece(mName + "bottom", stackSize, hintsOnly, 1, 0, 0); + for (int i = 1; i < layer - 1; i++) { + buildPiece(mName + "mid", stackSize, hintsOnly, 1, i, 0); + } + buildPiece(mName + "top", stackSize, hintsOnly, 1, layer - 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + if (!checkPiece(mName + "bottom", 1, 0, 0)) + return false; + int layer = 1; + while (checkPiece(mName + "mid", 1, layer, 0)) { + if (layer != mOutputHatches.size()) return false; + layer ++; + } + if (layer > 12 || !checkPiece(mName + "top", 1, layer, 0)) + return false; + return layer == mOutputHatches.size() && checkHatch(); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName()+(mUpgraded ? " T2" : ""), "MultiblockDisplay.png"); + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return mMode == 0 ? GT_Recipe.GT_Recipe_Map.sDistillationRecipes : GT_Recipe.GT_Recipe_Map.sDistilleryRecipes; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + // don't rotate a freaking tower, it won't work + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(ItemStack aStack) { + if (this.mMode == 1) return CORE.ConfigSwitches.pollutionPerSecondMultiAdvDistillationTower_ModeDistillery; + return CORE.ConfigSwitches.pollutionPerSecondMultiAdvDistillationTower_ModeDT; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setByte("mMode", mMode); + aNBT.setInteger("mCasingTier", this.mCasingTier); + aNBT.setBoolean("mUpgraded", mUpgraded); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mMode = aNBT.getByte("mMode"); + mCasingTier = aNBT.getInteger("mCasingTier"); + mUpgraded = aNBT.getBoolean("mUpgraded"); + super.loadNBTData(aNBT); + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(203)); + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mMode++; + if (mMode > 1){ + mMode = 0; + PlayerUtils.messagePlayer(aPlayer, "Now running in Distillation Tower Mode."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Now running in Distillery Mode."); + } + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public boolean addOutput(FluidStack aLiquid) { + if (aLiquid == null) return false; + FluidStack tLiquid = aLiquid.copy(); + for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { + if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { + if (tHatch.getBaseMetaTileEntity().getYCoord() == this.mControllerY + 1) { + int tAmount = tHatch.fill(tLiquid, false); + if (tAmount >= tLiquid.amount) { + return tHatch.fill(tLiquid, true) >= tLiquid.amount; + } else if (tAmount > 0) { + tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); + } + } + } + } + return false; + } + + @Override + protected void addFluidOutputs(FluidStack[] mOutputFluids2) { + for (int i = 0; i < mOutputFluids2.length; i++) { + if (mOutputHatches.size() > i && mOutputHatches.get(i) != null && mOutputFluids2[i] != null && isValidMetaTileEntity(mOutputHatches.get(i))) { + if (mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord() == this.mControllerY + 1 + i) { + mOutputHatches.get(i).fill(mOutputFluids2[i], true); + } + } + } + + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "DistillationTower"; + } + + @Override + public String getMachineType() { + return "Distillery, Distillation Tower"; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + // Run standard recipe handling for distillery recipes + if (mMode == 1) { + return this.checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 100); + } + else { + for (GT_MetaTileEntity_Hatch_Input hatch : mInputHatches) { + FluidStack tFluid = hatch.getFluid(); + if (tFluid != null) { + int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); + if (checkRecipeGeneric(null, new FluidStack[]{tFluid}, para,100, 250, 10000)) { + return true; + } + } + } + return false; + } + } + + @Override + public int getMaxParallelRecipes() { + if (this.mMode == 0) { + return getTierOfTower() == 1 ? 4 : getTierOfTower() == 2 ? 12 : 0; + } + else if (this.mMode == 1) { + return getTierOfTower() * (4 * GT_Utility.getTier(this.getMaxInputVoltage())); + } + return 0; + } + + @Override + public int getEuDiscountForParallelism() { + return 15; + } + + private int getTierOfTower() { + return mUpgraded ? 2 : 1; + } + + private int mCasingTier = 0; + + private int getMachineCasingTier() { + return mCasingTier; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + + ITexture aOriginalTexture; + + // Check things exist client side (The worst code ever) + if (aBaseMetaTileEntity.getWorld() != null) { + + } + // Check the Tier Client Side + int aTier = mCasingTier; + + if (aTier == 0) { + aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(49); + } + else if (aTier == 1) { + aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(43); + } + else { + aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(49); + } + + if (aSide == aFacing) { + return new ITexture[]{aOriginalTexture, new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER)}; + } + return new ITexture[]{aOriginalTexture}; + } + + private int getCasingTextureID() { + // Check the Tier Client Side + int aTier = mCasingTier; + + if (aTier == 1) { + return 49; + } + else if (aTier == 2) { + return 43; + } + else { + return 49; + } + } + + public boolean addToMachineList(IGregTechTileEntity aTileEntity) { + int aMaxTier = getMachineCasingTier(); + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { + GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity; + int aTileTier = aMachineBlock.mTier; + if (aTileTier > aMaxTier) { + Logger.INFO("Hatch tier too high."); + return false; + } + else { + return addToMachineList(aTileEntity, getCasingTextureID()); + } + } + else { + Logger.INFO("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know.. + return false; + } + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aTick % 20 == 0 && !mUpgraded) { + ItemStack aGuiStack = this.getGUIItemStack(); + if (aGuiStack != null) { + if (GT_Utility.areStacksEqual(aGuiStack, GregtechItemList.Distillus_Upgrade_Chip.get(1))) { + this.mUpgraded = true; + ItemUtils.depleteStack(aGuiStack); + } + } + } + // Silly Client Syncing + if (aBaseMetaTileEntity.isClientSide()) { + this.mCasingTier = getCasingTierOnClientSide(); + } + } + + + + @SideOnly(Side.CLIENT) + private final int getCasingTierOnClientSide() { + if (this == null || this.getBaseMetaTileEntity().getWorld() == null) { + return 0; + } + try { + Block aInitStructureCheck; + int aInitStructureCheckMeta; + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + if (aBaseMetaTileEntity == null || aBaseMetaTileEntity.getWorld() == null || aBaseMetaTileEntity.getWorld().getChunkFromBlockCoords(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getZCoord()) == null) { + return 0; + } + for (int i=1;i<10;i++) { + aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, i, 0); + aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, i, 0); + if (aInitStructureCheck == null) { + continue; + } + if (aInitStructureCheck == GregTech_API.sBlockCasings4 && aInitStructureCheckMeta == 1) { + return 0; + } + else if (aInitStructureCheck == ModBlocks.blockCasingsTieredGTPP) { + return 1; + } + } + } + catch (Throwable t) { + //t.printStackTrace(); + } + return 0; + + } + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + aNBT.setBoolean("mUpgraded", mUpgraded); + super.setItemNBT(aNBT); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java new file mode 100644 index 0000000000..ce54aef282 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -0,0 +1,484 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ChatComponentTranslation; +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase { + + public static int CASING_TEXTURE_ID; + public static String mHotFuelName = "Blazing Pyrotheum"; + public static String mCasingName = "Advanced Blast Furnace Casing"; + public static String mHatchName = "Pyrotheum Hatch"; + private IStructureDefinition STRUCTURE_DEFINITION = null; + private int mCasing; + private boolean mHaveHatch; + + private HeatingCoilLevel mHeatingCapacity; + private boolean isBussesSeparate = false; + + public GregtechMetaTileEntity_Adv_EBF(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 11); + mHotFuelName = FluidUtils.getFluidStack("pyrotheum", 1).getLocalizedName(); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 11); + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); + } + + public GregtechMetaTileEntity_Adv_EBF(String aName) { + super(aName); + CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 11); + mHotFuelName = FluidUtils.getFluidStack("pyrotheum", 1).getLocalizedName(); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 11); + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); + } + + @Override + public String getMachineType() { + return "Blast Furnace"; + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Adv_EBF(this.mName); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 11); + } + if (mHotFuelName.toLowerCase().contains(".")) { + mHotFuelName = FluidUtils.getFluidStack("pyrotheum", 1).getLocalizedName(); + } + if (mHatchName.toLowerCase().contains(".name")) { + mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 968); + } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Factory Grade Advanced Blast Furnace") + .addInfo("Speed: 120% | Eu Usage: 90% | Parallel: 8") + .addInfo("Consumes 10L of " + mHotFuelName + " per second during operation") + .addInfo("Constructed exactly the same as a normal EBF") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .addController("Bottom center") + .addCasingInfo(mCasingName, 9) + .addInputHatch("Any Casing", 1) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addStructureHint(mHatchName, 1) + .addEnergyHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"HHH", "H-H", "HHH"}, + {"HHH", "H-H", "HHH"}, + {"C~C", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_Adv_EBF::addAdvEBFList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 11 + ) + ) + ) + ) + .addElement( + 'H', + ofCoil( + GregtechMetaTileEntity_Adv_EBF::setCoilLevel, GregtechMetaTileEntity_Adv_EBF::getCoilLevel + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 3, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mHaveHatch = false; + setCoilLevel(HeatingCoilLevel.None); + return checkPiece(mName, 1, 3, 0) && mCasing >= 9 && mHaveHatch && getCoilLevel() != HeatingCoilLevel.None && checkHatch(); + } + + public final boolean addAdvEBFList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 968) { + mHaveHatch = true; + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced) }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID) }; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "ElectricBlastFurnace"; + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sBlastRecipes; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + if (isBussesSeparate) { + FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tInputs = new ArrayList<>(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) { + tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + if (tInputs.size() > 0) { + if (checkRecipeGeneric(tInputs.toArray(new ItemStack[0]), tFluids, 8, 90, 120, 10000)) { + return true; + } + } + } + return false; + } else { + return checkRecipeGeneric(8, 90, 120); + } + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiAdvEBF; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, + int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[] {}; + this.mOutputFluids = new FluidStack[] {}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + Logger.WARNING("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + Logger.WARNING("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe == null || this.mHeatingCapacity.getHeat() < tRecipe.mSpecialValue) { + Logger.WARNING("BAD RETURN - 1"); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + Logger.WARNING("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + int tHeatCapacityDivTiers = (int) (mHeatingCapacity.getHeat() - tRecipe.mSpecialValue) / 900; + if (tHeatCapacityDivTiers > 0) + tRecipeEUt = (int) (tRecipeEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + // Count recipes to do in parallel, consuming input items and fluids and + // considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + Logger.WARNING("Broke at " + parallelRecipes + "."); + break; + } + Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + "."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + Logger.WARNING("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); + int tHalfHeatCapacityDivTiers = tHeatCapacityDivTiers / 2; + + this.mEUt = (int) Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + if (tHalfHeatCapacityDivTiers > 0) { + this.mMaxProgresstime = mMaxProgresstime / 4; + tHalfHeatCapacityDivTiers--; + } else { + this.mMaxProgresstime = mMaxProgresstime / 2; + } + if (this.mMaxProgresstime <= 1) { + break; + } + } + } + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) + tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + Logger.WARNING("GOOD RETURN - 1"); + return true; + + } + + private volatile int mGraceTimer = 2; + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + //Try dry Pyrotheum after all other logic + if (this.mStartUpCheck < 0) { + if (this.mMaxProgresstime > 0 && this.mProgresstime != 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + if (aTick % 10 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + if (!this.depleteInput(FluidUtils.getFluidStack("pyrotheum", 5))) { + if (mGraceTimer-- == 0) { + this.causeMaintenanceIssue(); + this.stopMachine(); + mGraceTimer = 2; + } + } + } + } + } + + } + + @Override + public int getMaxParallelRecipes() { + return 8; + } + + @Override + public int getEuDiscountForParallelism() { + return 90; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + isBussesSeparate = !isBussesSeparate; + aPlayer.addChatMessage(new ChatComponentTranslation(isBussesSeparate ? "interaction.separateBusses.enabled" : "interaction.separateBusses.disabled")); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("isBussesSeparate", isBussesSeparate); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + isBussesSeparate = aNBT.getBoolean("isBussesSeparate"); + super.loadNBTData(aNBT); + } + + public HeatingCoilLevel getCoilLevel() { + return mHeatingCapacity; + } + + public void setCoilLevel(HeatingCoilLevel aCoilLevel) { + mHeatingCapacity = aCoilLevel; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java new file mode 100644 index 0000000000..56206f8178 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java @@ -0,0 +1,153 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; + +import gregtech.api.enums.Dyes; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; + +import java.lang.reflect.Method; + +public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_FusionComputer { + + public static final Method mUpdateHatchTexture; + + static { + mUpdateHatchTexture = ReflectionUtils.getMethod(GT_MetaTileEntity_Hatch.class, "updateTexture", int.class); + } + + public GregtechMetaTileEntity_Adv_Fusion_MK4(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, 6); + } + + public GregtechMetaTileEntity_Adv_Fusion_MK4(String aName) { + super(aName); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor") + .addInfo("HARNESSING THE POWER OF A NEUTRON STAR") + .addSeparator() + .beginStructureBlock(15, 3, 15, false) + .addController("See diagram when placed") + .addCasingInfo("Fusion Machine Casings MK III", 79) + .addStructureInfo("Cover the coils with casing") + .addOtherStructurePart("Advanced Fusion Coils", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings", 2) + .addInputHatch("2-16, Specified casings", 1) + .addOutputHatch("1-16, Specified casings", 3) + .addStructureInfo("ALL Hatches must be UHV or better") + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public int tier() { + return 9; + } + + @Override + public long maxEUStore() { + return (640010000L * 4) * (Math.min(16, this.mEnergyHatches.size())) / 8L; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Adv_Fusion_MK4(mName); + } + + @Override + public Block getCasing() { + return getFusionCoil(); + } + + @Override + public int getCasingMeta() { + return 12; + } + + @Override + public Block getFusionCoil() { + return ModBlocks.blockCasings3Misc; + } + + @Override + public int getFusionCoilMeta() { + return 13; + } + + @Override + public int tierOverclock() { + return 8; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + ITexture[] sTexture; + if (aSide == aFacing) { + sTexture = new ITexture[]{ + new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, + Dyes.getModulation(-1, Dyes._NULL.mRGBa)), + new GT_RenderedTexture(this.getIconOverlay())}; + } else if (!aActive) { + sTexture = new ITexture[]{ + new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, + Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; + } else { + sTexture = new ITexture[]{ + new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA, + Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; + } + return sTexture; + } + + @Override + public ITexture getTextureOverlay() { + return new GT_RenderedTexture(this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1); + } + + public IIconContainer getIconOverlay() { + return this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1; + } + + public boolean turnCasingActive(final boolean status) { + try { + if (this.mEnergyHatches != null) { + for (final GT_MetaTileEntity_Hatch_Energy hatch : this.mEnergyHatches) { + mUpdateHatchTexture.invoke(hatch, (status ? TAE.getIndexFromPage(2, 14) : 53)); + } + } + if (this.mOutputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Output hatch2 : this.mOutputHatches) { + mUpdateHatchTexture.invoke(hatch2, (status ? TAE.getIndexFromPage(2, 14) : 53)); + } + } + if (this.mInputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Input hatch3 : this.mInputHatches) { + mUpdateHatchTexture.invoke(hatch3, (status ? TAE.getIndexFromPage(2, 14) : 53)); + } + } + } + catch (Throwable t) { + return false; + } + return true; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java new file mode 100644 index 0000000000..aff614184a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java @@ -0,0 +1,207 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.GregTech_API.sBlockCasings4; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_Adv_Implosion +extends GregtechMeta_MultiBlockBase { + + private String mCasingName; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_Adv_Implosion(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); + } + + public GregtechMetaTileEntity_Adv_Implosion(String aName) { + super(aName); + mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Adv_Implosion(this.mName); + } + + @Override + public String getMachineType() { + return "Implosion Compressor"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.contains("gt.blockcasings")) { + mCasingName = ItemList.Casing_RobustTungstenSteel.get(1).getDisplayName(); + } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Factory Grade Advanced Implosion Compressor") + .addInfo("Speed: 100% | Eu Usage: 100% | Parallel: ((Tier/2)+1)") + .addInfo("Constructed exactly the same as a normal Implosion Compressor") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo(mCasingName, 10) + .addInputBus("Any casing", 1) + .addOutputBus("Any casing", 1) + .addEnergyHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1) + .addMufflerHatch("Any casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_Adv_Implosion::addAdvImplosionList, 48, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + sBlockCasings4, 0 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addAdvImplosionList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48)}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "ImplosionCompressor"; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sImplosionRecipes; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric((GT_Utility.getTier(this.getMaxInputVoltage())/2+1), 100, 100); + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 20) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ); + } + } + + @Override + public String getSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(5)); + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiAdvImplosion; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public int getMaxParallelRecipes() { + return (GT_Utility.getTier(this.getMaxInputVoltage())/2+1); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java new file mode 100644 index 0000000000..3191f56889 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java @@ -0,0 +1,165 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.GregTech_API.sBlockCasings1; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase; +import net.minecraft.item.ItemStack; + +public class GregtechMetaTileEntity_SteamMacerator extends GregtechMeta_SteamMultiBase { + + private String mCasingName = "Bronze Plated Bricks"; + private IStructureDefinition STRUCTURE_DEFINITION = null; + private int mCasing; + + public GregtechMetaTileEntity_SteamMacerator(String aName) { + super(aName); + } + + public GregtechMetaTileEntity_SteamMacerator(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { + return new GregtechMetaTileEntity_SteamMacerator(this.mName); + } + + @Override + protected GT_RenderedTexture getFrontOverlay() { + return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR); + } + + @Override + protected GT_RenderedTexture getFrontOverlayActive() { + return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE); + } + + @Override + public String getMachineType() { + return "Macerator"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.contains("gt.blockcasings")) { + mCasingName = ItemList.Casing_BronzePlatedBricks.get(1).getDisplayName(); + } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Steam Macerator") + .addInfo("Macerates " + getMaxParallelRecipes() + " ores at a time") + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo(mCasingName, 14) + .addStructureHint("Input Bus (Steam)", 1) + .addStructureHint("Output Bus (Steam)", 1) + .addStructureHint("Steam Hatch", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_SteamMacerator::addSteamMaceratorList, 10, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + sBlockCasings1, 10 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addSteamMaceratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 31040){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + fixAllMaintenanceIssue(); + return checkPiece(mName, 1, 1, 0) && mCasing >= 14; + } + + @Override + public int getMaxParallelRecipes() { + return 8; + } + + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; + } + + @Override + public ItemStack[] getOutputItems(GT_Recipe aRecipe) { + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[1]; + for (int h = 0; h < 1; h++) { + if (aRecipe.getOutput(h) != null) { + tOutputItems[h] = aRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + return tOutputItems; + } + + @Override + public int getOutputCount(ItemStack[] aOutputs) { + return 1; + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java new file mode 100644 index 0000000000..eae51e5c1d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java @@ -0,0 +1,656 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.lang.reflect.Field; +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.helpers.CraftingHelper; +import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase { + + private MODE mMachineMode = MODE.ASSEMBLY; + private byte mTier = 1; + protected GT_Recipe mLastRecipeToBuffer; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + /** The crafting matrix inventory (3x3). */ + public CraftingHelper mInventoryCrafter; + + public static enum MODE { + CRAFTING("CIRCUIT", "ASSEMBLY"), ASSEMBLY("CRAFTING", "DISASSEMBLY"), DISASSEMBLY("ASSEMBLY", "CIRCUIT"), CIRCUIT("DISASSEMBLY", "CRAFTING"); + + private final String lastMode; + private final String nextMode; + + MODE(String previous, String next) { + this.lastMode = previous; + this.nextMode = next; + } + + public MODE nextMode() { + return MODE.valueOf(this.nextMode); + } + + public MODE lastMode() { + return MODE.valueOf(this.lastMode); + } + + } + + public void onRightclick(EntityPlayer aPlayer) { + } + + public GT4Entity_AutoCrafter(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT4Entity_AutoCrafter(String mName) { + super(mName); + } + + @Override + public String getMachineType() { + String sType = "Assembler, Disassembler, "+((CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && !CORE.GTNH) ? "Circuit Assembler" : ""); + return sType; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_AutoCrafter(this.mName); + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + return super.onRunningTick(aStack); + //return true; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiAutoCrafter; + } + + public int getAmountOfOutputs() { + return 1; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Highly Advanced Autocrafter") + .addInfo("Right Click with a Screwdriver to change mode") + .addInfo("200% faster than using single block machines of the same voltage") + .addInfo("Processes two items per voltage tier") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Autocrafter Frame", 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(0, 10)), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE + : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER) }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(0, 10)) }; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GT4Entity_AutoCrafter::addAutoCrafterList, TAE.getIndexFromPage(0, 10), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 12 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + if (checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch()) { + setTier(); + return true; + } else return false; + } + + public final boolean addAutoCrafterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + private static GT_Recipe_Map fCircuitMap; + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + if (this.mMachineMode == MODE.ASSEMBLY) { + return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; + } + else if (this.mMachineMode == MODE.CIRCUIT && !CORE.GTNH) { + if (fCircuitMap != null) { + return fCircuitMap; + } + GT_Recipe_Map r; + try { + Field f = ReflectionUtils.getField(GT_Recipe.GT_Recipe_Map.class, "sCircuitAssemblerRecipes"); + if (f != null) { + r = (GT_Recipe_Map) f.get(null); + if (r != null) { + fCircuitMap = r; + return r; + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + else if (this.mMachineMode == MODE.DISASSEMBLY || this.mMachineMode == MODE.CRAFTING) { + return null; + } + return GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; + } + + private boolean isModernGT = true; + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (isModernGT && !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + isModernGT = false; + } + //5.09 support + if (isModernGT && !CORE.GTNH) { + mMachineMode = mMachineMode.nextMode(); + if (mMachineMode == MODE.CRAFTING) { + PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.AQUA+"AutoCrafting"); + } else if (mMachineMode == MODE.ASSEMBLY) { + PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.GREEN+"Assembly"); + } else if (mMachineMode == MODE.DISASSEMBLY) { + PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.RED+"Disassembly"); + } else { + PlayerUtils.messagePlayer(aPlayer, "Running the Auto-Crafter in mode: "+EnumChatFormatting.YELLOW+"Circuit Assembly"); + } + } + //5.08 support + else { + if (mMachineMode.nextMode() == MODE.CIRCUIT) { + mMachineMode = MODE.ASSEMBLY; + } + else if (mMachineMode.nextMode() == MODE.CRAFTING) { + mMachineMode = MODE.ASSEMBLY; + } + else { + mMachineMode = mMachineMode.nextMode(); + } + + if (mMachineMode == MODE.CRAFTING) { + PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.AQUA+"AutoCrafting"); + } else if (mMachineMode == MODE.ASSEMBLY) { + PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.GREEN+"Assembly"); + } else { + PlayerUtils.messagePlayer(aPlayer, "You are now running the Auto-Crafter in mode: "+EnumChatFormatting.RED+"Disassembly"); + } + } + } + +// @Override +// public boolean checkRecipe(final ItemStack aStack) { +// +// final long tVoltage = this.getMaxInputVoltage(); +// final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); +// +// if (mMachineMode == MODE.DISASSEMBLY) { +// return doDisassembly(); +// } else if (mMachineMode == MODE.CRAFTING) { +// return doCrafting(aStack); +// } else { +// return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200); +// } +// } + + private void setTier() { + long tVoltage = getMaxInputVoltage(); + this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + if (mMachineMode == MODE.DISASSEMBLY) { + return doDisassembly(); + } else if (mMachineMode == MODE.CRAFTING) { + return doCrafting(aStack); + } else { + ArrayList tFluids = getStoredFluids(); + //Logger.MACHINE_INFO("1"); + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tBusItems = new ArrayList(); + //Logger.MACHINE_INFO("2"); + if (isValidMetaTileEntity(tBus)) { + //Logger.MACHINE_INFO("3"); + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) + tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + + Object[] tempArray = tFluids.toArray(new FluidStack[] {}); + FluidStack[] properArray; + properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {}); + + //Logger.MACHINE_INFO("4"); + if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), properArray, + getMaxParallelRecipes(), 100, 200, 10000)) return true; + } + return false; + } + } + + @Override + public int getMaxParallelRecipes() { + return 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage()))); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + public boolean doDisassembly() { + + final ArrayList tInputList = this.getStoredInputs(); + for (int tInputList_sS = tInputList.size(), i = 0; i < tInputList_sS - 1; ++i) { + for (int j = i + 1; j < tInputList_sS; ++j) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize < tInputList.get(j).stackSize) { + tInputList.remove(i--); + tInputList_sS = tInputList.size(); + break; + } + tInputList.remove(j--); + tInputList_sS = tInputList.size(); + } + } + } + final ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]); + + ItemStack inputItem = tInputs[0]; + if (tInputs[0].stackSize <= 0) { + tInputs[0] = null; + this.updateSlots(); + } + int outputSlots = this.mOutputBusses.get(0).getSizeInventory(); + + if (this.mOutputBusses.size() > 1) { + outputSlots = 0; + for (GT_MetaTileEntity_Hatch_OutputBus r : this.mOutputBusses) { + outputSlots += r.getSizeInventory(); + } + } + + this.mOutputItems = new ItemStack[outputSlots]; + if (inputItem != null && inputItem.stackSize > 0) { + NBTTagCompound tNBT = inputItem.getTagCompound(); + if (tNBT != null) { + tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); + if (tNBT != null) { + this.mEUt = 16 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + this.mMaxProgresstime = (100 - (8 * this.mTier)); + for (int i = 0; i < this.mOutputItems.length; ++i) { + if (this.getBaseMetaTileEntity().getRandomNumber(100) < 60 + 12 * this.mTier) { + this.mOutputItems[i] = GT_Utility.loadItem(tNBT, "Ingredient." + i); + if (this.mOutputItems[i] != null) { + this.mMaxProgresstime *= (int) 1.5; + } + } + } + + if (this.mTier > 5) { + this.mMaxProgresstime >>= this.mTier - 5; + } + if (this.mEUt > 0) + this.mEUt = (-this.mEUt); + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + inputItem.stackSize--; + if (inputItem.stackSize <= 0) { + tInputs[0] = null; + } + this.updateSlots(); + return true; + + } + } + } + return false; + } + + private boolean doesCrafterHave9SlotInput() { + GT_MetaTileEntity_Hatch_InputBus craftingInput = null; + if (!this.mInputBusses.isEmpty()) { + for (GT_MetaTileEntity_Hatch_InputBus x : this.mInputBusses) { + if (x.mInventory.length == 9) { + craftingInput = x; + } + } + } + // Return if no input hatch set. + if (craftingInput == null) { + Logger.WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV]."); + return false; + + } else { + return true; + } + } + + private boolean doCrafting(ItemStack aStack) { + this.mMaxProgresstime = 0; + return false; // do nothing + /* + try { + // Set Crafting input hatch + if (!doesCrafterHave9SlotInput()) { + return false; + } + + // Read stored data from encrypted data stick. + ItemStack storedData_Output[] = NBTUtils.readItemsFromNBT(aStack, "Output"); + ItemStack storedData_Input[] = NBTUtils.readItemsFromNBT(aStack); + if (storedData_Output != null && storedData_Input != null) { + ItemStack loadedData[] = new ItemStack[9]; + if (storedData_Input.length >= 1) { + int number = 0; + for (ItemStack a : storedData_Input) { + if (a.getItem() == ModItems.ZZZ_Empty) { + // Utils.LOG_WARNING("Allocating free memory into crafting manager slot + // "+number+"."); + loadedData[number] = null; + } else { + // Utils.LOG_WARNING("Downloading "+a.getDisplayName()+" into crafting manager + // slot "+number+"."); + loadedData[number] = a; + } + number++; + } + } + + // Remove inputs here + ArrayList mInputArray = new ArrayList(); + ItemStack allInputs[]; + + for (GT_MetaTileEntity_Hatch_InputBus x : this.mInputBusses) { + if (x.mInventory.length > 0) { + for (ItemStack r : x.mInventory) { + if (r != null) { + mInputArray.add(r); + } + } + } + } + + if (mInputArray.isEmpty()) { + return false; + } else { + List list = mInputArray; + allInputs = list.toArray(new ItemStack[list.size()]); + + if (allInputs != null && allInputs.length > 0) { + + this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + this.mMaxProgresstime = MathUtils.roundToClosestInt((50 - (5 + * MathUtils.randDouble(((this.mTier - 2) <= 0 ? 1 : (this.mTier - 2)), this.mTier)))); + + Logger.WARNING("MPT: " + mMaxProgresstime + " | " + mEUt); + this.getBaseMetaTileEntity().setActive(true); + + // Setup some vars + int counter = 0; + + ItemStack toUse[] = new ItemStack[9]; + + outerloop: for (ItemStack inputItem : loadedData) { + if (inputItem == null) { + toUse[counter] = null; + continue outerloop; + } + for (ItemStack r : allInputs) { + if (r != null) { + // Utils.LOG_WARNING("Input Bus Inventory Iteration - Found:" + // +r.getDisplayName()+" | "+allInputs.length); + if (GT_Utility.areStacksEqual(r, inputItem)) { + if (this.getBaseMetaTileEntity().isServerSide()) { + toUse[counter] = inputItem; + counter++; + continue outerloop; + } + + } + } + } + counter++; + } + + int mCorrectInputs = 0; + for (ItemStack isValid : toUse) { + if (isValid == null || this.depleteInput(isValid)) { + mCorrectInputs++; + } else { + Logger.WARNING("Input in Slot " + mCorrectInputs + " was not valid."); + } + } + + if (this.mTier > 5) { + this.mMaxProgresstime >>= this.mTier - 5; + } + if (this.mEUt > 0) + this.mEUt = (-this.mEUt); + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + if (mCorrectInputs == 9) { + ItemStack mOutputItem = storedData_Output[0]; + NBTUtils.writeItemsToGtCraftingComponents(mOutputItem, loadedData, true); + this.addOutput(mOutputItem); + this.updateSlots(); + return true; + } else { + return false; + } + + } + } + } + } + // End Debug + catch (Throwable t) { + t.printStackTrace(); + this.mMaxProgresstime = 0; + } + + this.mMaxProgresstime = 0; + return false; + */ + } + + @Override + public String[] getExtraInfoData() { + final String tRunning = (this.mMaxProgresstime > 0 ? "Auto-Crafter running" : "Auto-Crafter stopped"); + final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" + : "Needs Maintainance"); + String tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts."; + String tMode; + if (mMachineMode == MODE.DISASSEMBLY) { + tMode = "§cDisassembly"; + tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts."; + } else if (mMachineMode == MODE.ASSEMBLY || mMachineMode == MODE.CIRCUIT) { + tMode = mMachineMode == MODE.ASSEMBLY ? "§aAssembly" : "§eCircuit Assembly"; + if (mLastRecipeToBuffer != null && mLastRecipeToBuffer.mOutputs[0].getDisplayName() != null) { + tSpecialText = "Currently processing: " + mLastRecipeToBuffer.mOutputs[0].getDisplayName(); + } else { + tSpecialText = "Currently processing: Nothing"; + } + } else { + tMode = "§dAuto-Crafting"; + tSpecialText = "Does Auto-Crafter have 9-slot input bus? " + doesCrafterHave9SlotInput(); + } + + return new String[] { "Large Scale Auto-Asesembler v1.01c", tRunning, tMaintainance, "Mode: " + tMode, + tSpecialText }; + } + + private String getMode() { + return this.mMachineMode.name(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + String mMode = getMode(); + aNBT.setString("mMode", mMode); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + String modeString = aNBT.getString("mMode"); + MODE newMode = MODE.valueOf(modeString); + this.mMachineMode = newMode; + super.loadNBTData(aNBT); + } + + @Override + public void explodeMultiblock() { + AC_Helper_Utils.removeCrafter(this); + super.explodeMultiblock(); + } + + @Override + public void onExplosion() { + AC_Helper_Utils.removeCrafter(this); + super.onExplosion(); + } + + @Override + public void onRemoval() { + AC_Helper_Utils.removeCrafter(this); + super.onRemoval(); + } + + @Override + public void doExplosion(long aExplosionPower) { + AC_Helper_Utils.removeCrafter(this); + super.doExplosion(aExplosionPower); + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "Generic3By3"; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java new file mode 100644 index 0000000000..65474d38ed --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java @@ -0,0 +1,354 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.*; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.general.ItemLavaFilter; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GT4Entity_ThermalBoiler +extends GregtechMeta_MultiBlockBase +{ + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + private int mSuperEfficencyIncrease = 0; + + public void onRightclick(EntityPlayer aPlayer) + { + getBaseMetaTileEntity().openGUI(aPlayer, 158); + } + + public GT4Entity_ThermalBoiler(int aID, String aName, String aNameRegional) + { + super(aID, aName, aNameRegional); + } + + public GT4Entity_ThermalBoiler(String mName) { + super(mName); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT4Entity_ThermalBoiler(this.mName); + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) + { + return true; + } + + @Override + public String getMachineType() { + return "Boiler"; + } + + @Override + public int getDamageToComponent(ItemStack aStack){ + //log("Trying to damage component."); + return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0; + } + + private static Item mLavaFilter; + + @Override + public boolean checkRecipe(ItemStack aStack) { + this.mSuperEfficencyIncrease=0; + + if (mLavaFilter == null) { + mLavaFilter = ItemList.Component_LavaFilter.getItem(); + } + + //Try reload new Lava Filter + if (aStack == null) { + ItemStack uStack = this.findItemInInventory(mLavaFilter); + if (uStack != null) { + this.setGUIItemStack(uStack); + aStack = this.getGUIItemStack(); + } + } + + + for (GT_Recipe tRecipe : GTPP_Recipe.GTPP_Recipe_Map.sThermalFuels.mRecipeList) { + FluidStack tFluid = tRecipe.mFluidInputs[0]; + if (tFluid != null) { + if (depleteInput(tFluid)) { + this.mMaxProgresstime = Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2)); + this.mEUt = getEUt(); + this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); + + int loot_MAXCHANCE = 100000; + if (mLavaFilter.getClass().isInstance(aStack.getItem())) { + + if ((tRecipe.getOutput(0) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(0))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(0) }) }; + } + if ((tRecipe.getOutput(1) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(1))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(1) }) }; + } + if ((tRecipe.getOutput(2) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(2))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(2) }) }; + } + if ((tRecipe.getOutput(3) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(3))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(3) }) }; + } + if ((tRecipe.getOutput(4) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(4))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(4) }) }; + } + if ((tRecipe.getOutput(5) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(5))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(5) }) }; + } + + } + //Give Obsidian without Lava Filter + if (tFluid.isFluidEqual(GT_ModHandler.getLava(86))){ + if ((tRecipe.getOutput(6) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(6))) { + this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(6) }) }; + } + } + + + return true; + } + } + } + this.mMaxProgresstime = 0; + this.mEUt = 0; + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (this.mEUt > 0) { + if(this.mSuperEfficencyIncrease>0){ + this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); + } + int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); + if (tGeneratedEU > 0) { + long amount = (tGeneratedEU + 160) / 160; + if (depleteInput(Materials.Water.getFluid(amount)) || depleteInput(GT_ModHandler.getDistilledWater(amount))) { + addOutput(GT_ModHandler.getSteam(tGeneratedEU)); + } else { + explodeMultiblock(); + } + } + return true; + } + return true; + } + + public int getEUt() { + return 400; + } + + public int getEfficiencyIncrease() { + return 12; + } + + int runtimeBoost(int mTime) { + return mTime * 150 / 100; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) + { + return false; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) + { + return 10000; + } + + @Override + public int getPollutionPerSecond(ItemStack aStack) + { + return CORE.ConfigSwitches.pollutionPerSecondMultiThermalBoiler; + } + + public int getAmountOfOutputs() + { + return 7; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Thermal Boiler Controller") + .addInfo("Converts Water & Heat into Steam") + .addInfo("Consult user manual for more information") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Thermal Containment Casings", 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), + new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GT4Entity_ThermalBoiler::addThermalBoilerList, TAE.getIndexFromPage(0, 1), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 11 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + } + + public final boolean addThermalBoilerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public void damageFilter(){ + ItemStack filter = this.mInventory[1]; + if (filter != null){ + if (filter.getItem() instanceof ItemLavaFilter){ + + long currentUse = ItemLavaFilter.getFilterDamage(filter); + + //Remove broken Filter + if (currentUse >= 100-1){ + this.mInventory[1] = null; + } + else { + //Do Damage + ItemLavaFilter.setFilterDamage(filter, currentUse+1); + } + } + } + + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()){ + // Reload Lava Filter + if (this.getGUIItemStack() == null) { + if (this.mInputBusses.size() > 0) { + for (GT_MetaTileEntity_Hatch_InputBus aBus : this.mInputBusses) { + for (ItemStack aStack : aBus.mInventory) { + if (aStack != null && aStack.getItem() instanceof ItemLavaFilter) { + this.setGUIItemStack(aStack); + } + } + } + } + } + + if (this.mEUt > 0){ + if (aTick % 600L == 0L){ + damageFilter(); + } + } + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "Generic3By3"; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java new file mode 100644 index 0000000000..326cc01de7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java @@ -0,0 +1,744 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import org.apache.commons.lang3.ArrayUtils; + +import com.gtnewhorizon.structurelib.StructureLibAPI; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.IStructureElement; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Triplet; +import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase { + + private int mSolidCasingTier = 0; + private int mMachineCasingTier = 0; + private int mPipeCasingTier = 0; + private int mCoilTier = 0; + private int checkCoil; + private int[] checkCasing = new int[8]; + private int checkMachine; + private int checkPipe; + private int maxTierOfHatch; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + private ArrayList mReplicatorDataOrbHatches = new ArrayList(); + + private static final HashMap> mTieredBlockRegistry = new HashMap>(); + + public GregtechMTE_ElementalDuplicator(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMTE_ElementalDuplicator(final String aName) { + super(aName); + } + + public static boolean registerMachineCasingForTier(int aTier, Block aBlock, int aMeta, int aCasingTextureID) { + int aSize = mTieredBlockRegistry.size(); + int aSize2 = aSize; + Triplet aCasingData = new Triplet(aBlock, aMeta, aCasingTextureID); + if (mTieredBlockRegistry.containsKey(aTier)) { + CORE.crash("Tried to register a Machine casing for tier "+aTier+" to the Chemical Plant, however this tier already contains one."); + } + mTieredBlockRegistry.put(aTier, aCasingData); + aSize = mTieredBlockRegistry.size(); + return aSize > aSize2; + } + + private static int getCasingTextureIdForTier(int aTier) { + if (!mTieredBlockRegistry.containsKey(aTier)) { + return 10; + } + int aCasingID = mTieredBlockRegistry.get(aTier).getValue_3(); + //Logger.INFO("Found casing texture ID "+aCasingID+" for tier "+aTier); + return aCasingID; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMTE_ElementalDuplicator(this.mName); + } + + @Override + public String getMachineType() { + return "Replicator"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Replication Machine") + .addInfo("Now replication is less painful") + .addInfo("Please read to user manual for more information on construction & usage") + .addSeparator() + .addController("Bottom Center") + .addStructureHint("Catalyst Housing", 1) + .addInputBus("Bottom Casing", 1) + .addOutputBus("Bottom Casing", 1) + .addInputHatch("Bottom Casing", 1) + .addOutputHatch("Bottom Casing", 1) + .addEnergyHatch("Bottom Casing", 1) + .addMaintenanceHatch("Bottom Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + public void setMachineMeta(int meta) { + checkMachine = meta; + } + + public int getMachineMeta() { + return checkMachine; + } + + public void setPipeMeta(int meta) { + checkPipe = meta; + } + + public int getPipeMeta() { + return checkPipe; + } + + public void setCoilMeta(int meta) { + checkCoil = meta; + } + + public int getCoilMeta() { + return checkCoil; + } + + public int coilTier(int meta) { + switch (meta) { + case 0: return 1; + case 1: return 2; + case 2: return 3; + case 3: return 4; + case 4: return 5; + case 5: return 7; + case 6: return 8; + case 7: return 10; + case 8: return 11; + case 9: return 6; + case 10: return 9; + } + return 0; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"}, + {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, + {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, + {"X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X"}, + {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, + {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, + {"CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMTE_ElementalDuplicator::addChemicalPlantList, getCasingTextureID(), 1 + ), + onElementPass( + x -> {++x.checkCasing[0]; ++x.mCasing;}, + ofSolidCasing(0) + ), + onElementPass( + x -> {++x.checkCasing[1]; ++x.mCasing;}, + ofSolidCasing(1) + ), + onElementPass( + x -> {++x.checkCasing[2]; ++x.mCasing;}, + ofSolidCasing(2) + ), + onElementPass( + x -> {++x.checkCasing[3]; ++x.mCasing;}, + ofSolidCasing(3) + ), + onElementPass( + x -> {++x.checkCasing[4]; ++x.mCasing;}, + ofSolidCasing(4) + ), + onElementPass( + x -> {++x.checkCasing[5]; ++x.mCasing;}, + ofSolidCasing(5) + ), + onElementPass( + x -> {++x.checkCasing[6]; ++x.mCasing;}, + ofSolidCasing(6) + ), + onElementPass( + x -> {++x.checkCasing[7]; ++x.mCasing;}, + ofSolidCasing(7) + ) + ) + ) + .addElement( + 'X', + ofChain( + onElementPass( + x -> {++x.checkCasing[0]; ++x.mCasing;}, + ofSolidCasing(0) + ), + onElementPass( + x -> {++x.checkCasing[1]; ++x.mCasing;}, + ofSolidCasing(1) + ), + onElementPass( + x -> {++x.checkCasing[2]; ++x.mCasing;}, + ofSolidCasing(2) + ), + onElementPass( + x -> {++x.checkCasing[3]; ++x.mCasing;}, + ofSolidCasing(3) + ), + onElementPass( + x -> {++x.checkCasing[4]; ++x.mCasing;}, + ofSolidCasing(4) + ), + onElementPass( + x -> {++x.checkCasing[5]; ++x.mCasing;}, + ofSolidCasing(5) + ), + onElementPass( + x -> {++x.checkCasing[6]; ++x.mCasing;}, + ofSolidCasing(6) + ), + onElementPass( + x -> {++x.checkCasing[7]; ++x.mCasing;}, + ofSolidCasing(7) + ) + ) + ) + .addElement( + 'M', + addTieredBlock( + GregTech_API.sBlockCasings1, GregtechMTE_ElementalDuplicator::setMachineMeta, GregtechMTE_ElementalDuplicator::getMachineMeta, 10 + ) + ) + .addElement( + 'H', + addTieredBlock( + GregTech_API.sBlockCasings5, GregtechMTE_ElementalDuplicator::setCoilMeta, GregtechMTE_ElementalDuplicator::getCoilMeta, 11 + ) + ) + .addElement( + 'P', + addTieredBlock( + GregTech_API.sBlockCasings2, GregtechMTE_ElementalDuplicator::setPipeMeta, GregtechMTE_ElementalDuplicator::getPipeMeta, 12, 16 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public static IStructureElement ofSolidCasing(int aIndex) { + return new IStructureElement() { + @Override + public boolean check(T t, World world, int x, int y, int z) { + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + Block target = mTieredBlockRegistry.get(aIndex).getValue_1(); + int targetMeta = mTieredBlockRegistry.get(aIndex).getValue_2(); + return target.equals(block) && meta == targetMeta; + } + + int getIndex(int size) { + if (size > 8) size = 8; + return size - 1; + } + + @Override + public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { + StructureLibAPI.hintParticle(world, x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2()); + return true; + } + + @Override + public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { + return world.setBlock(x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2(), 3); + } + }; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 3, 6, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + for (int i = 0; i < 8; i++) { + checkCasing[i] = 0; + } + checkCoil = 0; + checkPipe = 0; + checkMachine = 0; + mSolidCasingTier = 0; + mMachineCasingTier = 0; + mPipeCasingTier = 0; + mCoilTier = 0; + mReplicatorDataOrbHatches.clear(); + if (checkPiece(mName, 3, 6, 0) && mCasing >= 80) { + for (int i = 0; i < 8; i++) { + if (checkCasing[i] == mCasing) { + mSolidCasingTier = i; + } + else if (checkCasing[i] > 0) + return false; + } + mMachineCasingTier = checkMachine - 1; + mPipeCasingTier = checkPipe - 12; + mCoilTier = coilTier(checkCoil - 1); + updateHatchTexture(); + return mMachineCasingTier >= maxTierOfHatch; + } + return false; + } + + public void updateHatchTexture() { + for (GT_MetaTileEntity_Hatch h : mReplicatorDataOrbHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mInputBusses) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mMaintenanceHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mEnergyHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mOutputBusses) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mInputHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mOutputHatches) h.updateTexture(getCasingTextureID()); + } + + public final boolean addChemicalPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ElementalDataOrbHolder){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(207)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + + ITexture aOriginalTexture; + + // Check things exist client side (The worst code ever) + if (aBaseMetaTileEntity.getWorld() != null) { + + } + int aCasingID = getCasingTextureID(); + aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(aCasingID); + + if (aSide == aFacing) { + return new ITexture[]{aOriginalTexture, new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{aOriginalTexture}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + if (GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList.size() == 0) { + generateRecipes(); + } + return GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT; + } + + public static void generateRecipes() { + for (GT_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { + GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.add(i); + } + } + + @Override + public int getMaxParallelRecipes() { + return 2 * getPipeCasingTier(); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + private int getSolidCasingTier() { + return this.mSolidCasingTier; + } + + private int getMachineCasingTier() { + return mMachineCasingTier; + } + + private int getPipeCasingTier() { + return mPipeCasingTier; + } + + private int getCasingTextureID() { + // Check the Tier Client Side + int aTier = mSolidCasingTier; + int aCasingID = getCasingTextureIdForTier(aTier); + return aCasingID; + } + + public boolean addToMachineList(IGregTechTileEntity aTileEntity) { + int aMaxTier = getMachineCasingTier(); + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { + GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity; + int aTileTier = aMachineBlock.mTier; + if (aTileTier > aMaxTier) { + log("Hatch tier too high."); + return false; + } + else { + return addToMachineList(aTileEntity, getCasingTextureID()); + } + } + else { + log("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know.. + return false; + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mSolidCasingTier", this.mSolidCasingTier); + aNBT.setInteger("mMachineCasingTier", this.mMachineCasingTier); + aNBT.setInteger("mPipeCasingTier", this.mPipeCasingTier); + aNBT.setInteger("mCoilTier", this.mCoilTier); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mSolidCasingTier = aNBT.getInteger("mSolidCasingTier"); + mMachineCasingTier = aNBT.getInteger("mMachineCasingTier"); + mPipeCasingTier = aNBT.getInteger("mPipeCasingTier"); + mCoilTier = aNBT.getInteger("mCoilTier"); + } + + @Override + public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ElementalDataOrbHolder) { + log("Found GT_MetaTileEntity_Hatch_ElementalDataOrbHolder"); + ((GT_MetaTileEntity_Hatch_ElementalDataOrbHolder) aTileEntity).mRecipeMap = getRecipeMap(); + return addToMachineListInternal(mReplicatorDataOrbHatches, aMetaTileEntity, aBaseCasingIndex); + } + return super.addToMachineList(aTileEntity, aBaseCasingIndex); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 100; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + // Same speed bonus as pyro oven + public int getSpeedBonus() { + return 50 * (this.mCoilTier - 2); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate == 1 || this.mStartUpCheck == 1) { + this.mReplicatorDataOrbHatches.clear(); + } + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), getSpeedBonus()); + } + + + @Override + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) { + return false; + } + + private static final HashMap> mTieredRecipeMap = new HashMap>(); + private static final AutoMap aTier0Recipes = new AutoMap(); + private static final AutoMap aTier1Recipes = new AutoMap(); + private static final AutoMap aTier2Recipes = new AutoMap(); + private static final AutoMap aTier3Recipes = new AutoMap(); + private static final AutoMap aTier4Recipes = new AutoMap(); + private static final AutoMap aTier5Recipes = new AutoMap(); + private static final AutoMap aTier6Recipes = new AutoMap(); + private static final AutoMap aTier7Recipes = new AutoMap(); + private static boolean mInitRecipeCache = false; + + private static void initRecipeCaches() { + if (!mInitRecipeCache) { + mTieredRecipeMap.put((long) 0, aTier0Recipes); + mTieredRecipeMap.put((long) 1, aTier1Recipes); + mTieredRecipeMap.put((long) 2, aTier2Recipes); + mTieredRecipeMap.put((long) 3, aTier3Recipes); + mTieredRecipeMap.put((long) 4, aTier4Recipes); + mTieredRecipeMap.put((long) 5, aTier5Recipes); + mTieredRecipeMap.put((long) 6, aTier6Recipes); + mTieredRecipeMap.put((long) 7, aTier7Recipes); + for (GT_Recipe aRecipe : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList) { + if (aRecipe != null) { + switch (aRecipe.mSpecialValue) { + case 0: + aTier0Recipes.add(aRecipe); + continue; + case 1: + aTier1Recipes.add(aRecipe); + continue; + case 2: + aTier2Recipes.add(aRecipe); + continue; + case 3: + aTier3Recipes.add(aRecipe); + continue; + case 4: + aTier4Recipes.add(aRecipe); + continue; + case 5: + aTier5Recipes.add(aRecipe); + continue; + case 6: + aTier6Recipes.add(aRecipe); + continue; + case 7: + aTier7Recipes.add(aRecipe); + continue; + } + } + } + mInitRecipeCache = true; + } + } + + private static boolean areInputsEqual(GT_Recipe aComparator, ItemStack[] aInputs, FluidStack[] aFluids) { + int aInputCount = aComparator.mInputs.length; + if (aInputCount > 0) { + //Logger.INFO("Looking for recipe with "+aInputCount+" Items"); + int aMatchingInputs = 0; + recipe : for (ItemStack a : aComparator.mInputs) { + for (ItemStack b : aInputs) { + if (a.getItem() == b.getItem()) { + if (a.getItemDamage() == b.getItemDamage()) { + //Logger.INFO("Found matching Item Input - "+b.getUnlocalizedName()); + aMatchingInputs++; + continue recipe; + } + } + } + } + if (aMatchingInputs != aInputCount) { + return false; + } + } + int aFluidInputCount = aComparator.mFluidInputs.length; + if (aFluidInputCount > 0) { + //Logger.INFO("Looking for recipe with "+aFluidInputCount+" Fluids"); + int aMatchingFluidInputs = 0; + recipe : for (FluidStack b : aComparator.mFluidInputs) { + //Logger.INFO("Checking for fluid "+b.getLocalizedName()); + for (FluidStack a : aFluids) { + if (GT_Utility.areFluidsEqual(a, b)) { + //Logger.INFO("Found matching Fluid Input - "+b.getLocalizedName()); + aMatchingFluidInputs++; + continue recipe; + } + else { + //Logger.INFO("Found fluid which did not match - "+a.getLocalizedName()); + } + } + } + if (aMatchingFluidInputs != aFluidInputCount) { + return false; + } + } + Logger.INFO("Recipes Match!"); + return true; + } + + public GT_Recipe findRecipe(final GT_Recipe aRecipe, final long aVoltage, final long aSpecialValue, ItemStack[] aInputs, final FluidStack[] aFluids) { + if (!mInitRecipeCache) { + initRecipeCaches(); + } + if (this.getRecipeMap().mRecipeList.isEmpty()) { + log("No Recipes in Map to search through."); + return null; + } + else { + log("Checking tier "+aSpecialValue+" recipes and below. Using Input Voltage of "+aVoltage+"V."); + log("We have "+aInputs.length+" Items and "+aFluids.length+" Fluids."); + // Try check the cached recipe first + if (aRecipe != null) { + if (areInputsEqual(aRecipe, aInputs, aFluids)) { + if (aRecipe.mEUt <= aVoltage) { + Logger.INFO("Using cached recipe."); + return aRecipe; + } + } + } + + // Get all recipes for the tier + AutoMap> aMasterMap = new AutoMap>(); + for (long i=0;i<=aSpecialValue;i++) { + aMasterMap.add(mTieredRecipeMap.get(i)); + } + GT_Recipe aFoundRecipe = null; + + // Iterate the tiers recipes until we find the one with all inputs matching + master : for (AutoMap aTieredMap : aMasterMap) { + for (GT_Recipe aRecipeToCheck : aTieredMap) { + if (areInputsEqual(aRecipeToCheck, aInputs, aFluids)) { + log("Found recipe with matching inputs!"); + if (aRecipeToCheck.mSpecialValue <= aSpecialValue) { + if (aRecipeToCheck.mEUt <= aVoltage) { + aFoundRecipe = aRecipeToCheck; + break master; + } + } + } + } + } + + // If we found a recipe, return it + if (aFoundRecipe != null) { + log("Found valid recipe."); + return aFoundRecipe; + } + } + log("Did not find valid recipe."); + return null; + } + + /* + * Catalyst Handling + */ + + @Override + public ArrayList getStoredInputs() { + ArrayList tItems = super.getStoredInputs(); + for (GT_MetaTileEntity_Hatch_ElementalDataOrbHolder tHatch : mReplicatorDataOrbHatches) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + tItems.addAll(tHatch.getInventory()); + } + } + return tItems; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java new file mode 100644 index 0000000000..3941d59edb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java @@ -0,0 +1,231 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMTE_FastNeutronReactor +extends GregtechMeta_MultiBlockBase +{ + + private int mSuperEfficencyIncrease = 0; + + + public GregtechMTE_FastNeutronReactor(int aID, String aName, String aNameRegional) + { + super(aID, aName, aNameRegional); + } + + public GregtechMTE_FastNeutronReactor(String mName) { + super(mName); + } + + @Override + public String getMachineType() { + return "Reactor"; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GregtechMTE_FastNeutronReactor(this.mName); + } + @Override + public boolean isFacingValid(byte aFacing) + { + return aFacing > 1; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) + { + return true; + } + + @Override + public int getDamageToComponent(ItemStack aStack){ + return 0; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + this.mSuperEfficencyIncrease=0; + if (processing_Stage_1()) { + if (processing_Stage_2()) { + if (processing_Stage_3()) { + if (processing_Stage_4()) { + + } + else { + //Stage 4 + } + } + else { + //Stage 3 + } + } + else { + //Stage 2 + } + } + else { + //Stage 1 + } + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + public boolean processing_Stage_1() { //Deplete Water, Add More Progress Time + for (GT_MetaTileEntity_Hatch_Input tRecipe : this.mInputHatches) { + if (tRecipe.getFluid() != null){ + FluidStack tFluid = FluidUtils.getFluidStack(tRecipe.getFluid(), 200); + if (tFluid != null) { + if (tFluid == GT_ModHandler.getDistilledWater(1)) { + if (depleteInput(tFluid)) { + this.mMaxProgresstime = Math.max(1, runtimeBoost(8 * 2)); + this.mEUt = getEUt(); + this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); + return true; + } + } + + } + } + } + this.mMaxProgresstime = 0; + this.mEUt = 0; + return false; + } + public boolean processing_Stage_2() { + return false; + } + public boolean processing_Stage_3() { + return false; + } + public boolean processing_Stage_4() { + return false; + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (this.mEUt > 0) { + if(this.mSuperEfficencyIncrease>0){ + this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); + } + int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); + if (tGeneratedEU > 0) { + long amount = (tGeneratedEU + 160) / 160; + if (!depleteInput(GT_ModHandler.getDistilledWater(amount))) { + explodeMultiblock(); + } else { + addOutput(GT_ModHandler.getSteam(tGeneratedEU)); + } + } + return true; + } + return true; + } + + public int getEUt() { + return 0; //Default 400 + } + + public int getEfficiencyIncrease() { + return 0; //Default 12 + } + + int runtimeBoost(int mTime) { + return mTime * 150 / 100; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) + { + return true; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) + { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) + { + return 0; + } + + public int getAmountOfOutputs() + { + return 1; + } + + @Override + public String[] getTooltip() + { + return new String[]{ + "Fukushima-Daiichi Reactor No. 6", + "------------------------------------------", + "Boiling Water Reactor", + "Harness the power of Nuclear Fission", + "------------------------------------------", + "Consult user manual for more information", + }; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; + } + + @Override + public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) { + return true; + } + + public boolean damageFilter(){ + return false; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java new file mode 100644 index 0000000000..8a936525f0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java @@ -0,0 +1,449 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gtPlusPlus.core.lib.CORE; +import org.apache.commons.lang3.ArrayUtils; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMTE_FrothFlotationCell(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMTE_FrothFlotationCell(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMTE_FrothFlotationCell(this.mName); + } + + @Override + public String getMachineType() { + return "Flotation Cell"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Process that milled ore!") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front Center") + .addCasingInfo("Inconel Reinforced Casing", 68) + .addCasingInfo("Flotation Casings", 52) + .addInputBus("Bottom Casing", 1) + .addInputHatch("Bottom Casing", 1) + .addOutputHatch("Bottom Casing", 1) + .addEnergyHatch("Bottom Casing", 1) + .addMaintenanceHatch("Bottom Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(207)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + int aID = TAE.getIndexFromPage(2, 1); + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID)}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, new String[][]{ + {" ", " ", " X ", " X~X ", " X ", " ", " "}, + {" ", " F ", " FFF ", " FF FF ", " FFF ", " F ", " "}, + {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, + {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, + {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, + {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, + {" ", " F ", " F F ", " F F ", " F F ", " F ", " "}, + {" CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC "}, + {" CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC "}, + }) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMTE_FrothFlotationCell::addFrothFlotationCellList, TAE.getIndexFromPage(2, 1), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 1 + ) + ) + ) + ) + .addElement( + 'F', + ofBlock( + ModBlocks.blockSpecialMultiCasings, 9 + ) + ) + .addElement( + 'X', + ofBlock( + ModBlocks.blockCasings3Misc, 1 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 3, 3, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 3, 3, 0) && mCasing >= 68 - 4 && checkHatch(); + } + + public final boolean addFrothFlotationCellList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiFrothFlotationCell; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + // Fix GT bug + if (this.getBaseMetaTileEntity().getFrontFacing() == 0 && this.getBaseMetaTileEntity().getBackFacing() == 1) { + log("Fixing Bad Facing. (GT Bug)"); + this.getBaseMetaTileEntity().setFrontFacing((byte) 1); + } + } + + @Override + public boolean checkRecipe(ItemStack arg0) { + return super.checkRecipeGeneric(); + } + + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + log("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = findRecipe( + getBaseMetaTileEntity(), mLastRecipe, false, + gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + + log("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe == null) { + log("BAD RETURN - 1"); + return false; + } + + /* + * + * Material Hash checks + * Makes sure we can only ever use one type of material in this flotation cell. + * + */ + int aExpectedMaterialHash; + // Set the hash of expected material type + if (mLockedOreType == -1) { + mLockedOreType = FlotationRecipeHandler.getHashForMaterial(FlotationRecipeHandler.getMaterialOfMilledProduct(FlotationRecipeHandler.findMilledStack(aRecipe))); + } + // Set the hash for this recipe check + aExpectedMaterialHash = mLockedOreType; + + // Compute hash of current inputs + int aFoundMaterialHash = FlotationRecipeHandler.getHashForMaterial(FlotationRecipeHandler.getMaterialOfMilledProduct(FlotationRecipeHandler.findMilledStack(aItemInputs))); + + // Check hashes match + if (aExpectedMaterialHash != aFoundMaterialHash) { + log("Did not find the correct milled type."); + log("Found: "+aFoundMaterialHash); + log("Expected: "+mLockedOreType); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + log("BAD RETURN - 2"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+aMaxParallelRecipes); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; + } + + /* + * Handle NBT + */ + + private int mLockedOreType = -1; + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + if (mLockedOreType != -1) { + aNBT.setInteger("mLockedOreType", mLockedOreType); + } + super.setItemNBT(aNBT); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + if (mLockedOreType != -1) { + aNBT.setInteger("mLockedOreType", mLockedOreType); + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mLockedOreType = aNBT.getInteger("mLockedOreType"); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java new file mode 100644 index 0000000000..1ead7edad5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java @@ -0,0 +1,501 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.minecraft.LangUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Naquadah; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.common.util.ForgeDirection; + +public class GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase { + + public ArrayList mNaqHatches = new ArrayList(); + public static String[] mCasingName = new String[5]; + public static String mHatchName = "Naquadah Fuel Hatch"; + + private final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 13); + private final int META_BaseCasing = 0; //4 + private final int META_ContainmentCasing = 15; //3 + private final int META_Shielding = 13; //1 + private final int META_PipeCasing = 1; //4 + private final int META_IntegralCasing = 6; //0 + private final int META_ContainmentChamberCasing = 2; //4 + + public GregtechMTE_LargeNaqReactor(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); + mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); + mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); + mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); + mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); + mHatchName = LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969); + } + + public GregtechMTE_LargeNaqReactor(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMTE_LargeNaqReactor(this.mName); + } + + public String[] getTooltip() { + if (mCasingName[0].toLowerCase().contains(".name")) { + mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); + } + if (mCasingName[1].toLowerCase().contains(".name")) { + mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); + } + if (mCasingName[2].toLowerCase().contains(".name")) { + mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); + } + if (mCasingName[3].toLowerCase().contains(".name")) { + mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); + } + if (mCasingName[4].toLowerCase().contains(".name")) { + mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); + } + if (mHatchName.toLowerCase().contains(".name")) { + mHatchName = LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969); + } + return new String[]{ + "Naquadah reacts violently with potassium, ", + "resulting in massive explosions with radioactive potential.", + "Size: 3x4x12, WxHxL", + "Bottom Layer: "+mCasingName[0]+"s, (30x min)", + "Middle Layer: "+mCasingName[2]+"s (10x), with", + " "+mCasingName[3]+"s on either side", + " "+mCasingName[3]+"s also on each end (x26)", + "Middle Layer2: "+mCasingName[1]+" (12x total), with", + " "+mCasingName[4]+"s on either side (x24)", + "Top: Single row of "+mCasingName[0]+" along the middle (x12) ", + "", + "1x " + mHatchName + " (Any bottom layer casing)", + "1x " + "Maintenance Hatch" + " (Any bottom layer side casing)", + "1x " + "Energy Hatch" + " (Any top layer casing)", + + }; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + return aSide == aFacing + ? new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0)), + new GT_RenderedTexture(aActive + ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active + : TexturesGtBlock.Overlay_Machine_Controller_Default)} + : new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0))}; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), + "AssemblyLine.png"); + } + + public GT_Recipe_Map getRecipeMap() { + return null; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return aFacing == 1; + } + + public boolean checkRecipe(ItemStack aStack) { + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == 20) { + GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, + aZ); + } + } + + @Override + public String getSound() { + return (String) GregTech_API.sSoundList.get(Integer.valueOf(212)); + } + + private Block getCasing(int casingID) { + if (casingID == 1) { + return ModBlocks.blockCasingsMisc; + } + else if (casingID == 2) { + return ModBlocks.blockCasings2Misc; + } + else if (casingID == 3) { + return ModBlocks.blockCasings3Misc; + } + else if (casingID == 4) { + return ModBlocks.blockCasings4Misc; + } + else { + return ModBlocks.blockCasingsTieredGTPP; + } + } + + + + //Casing3, Meta 10 - "Grate Machine Casing"); + //Casing2, Meta 0 - "Solid Steel Machine Casing" + //Casing2, Meta 5 - "Assembling Line Casing" + //Casing2, Meta 9 - "Assembler Machine Casing" + //Magic Glass - blockAlloyGlass + + public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4; + + // Counts for all Casing Types + int aBaseCasingCount = 0; + int aContainmentCasingCount = 0; + int aShieldingCount = 0; + int aPipeCount = 0; + int aIntegralCasingCount = 0; + int aContainmentChamberCount = 0; + + // Bottom Layer + aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, -7, xDir, zDir); + log("Bottom Layer is Valid. Moving to Layer 1."); + + // Layer 1 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -6, xDir, zDir); + aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -6, xDir, zDir); + aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir); + log("Layer 1 is Valid. Moving to Layer 2."); + + // Layer 2 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -5, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -5, xDir, zDir); + log("Layer 2 is Valid. Moving to Layer 3."); + + // Layer 3 + aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir); + log("Layer 3 is Valid. Moving to Layer 4."); + + // Layer 4 + aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir); + log("Layer 4 is Valid. Moving to Layer 5."); + + // Layer 5 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -2, xDir, zDir); + aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -2, xDir, zDir); + log("Layer 5 is Valid. Moving to Layer 6."); + + // Layer 6 + aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir); + aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir); + aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -1, xDir, zDir); + log("Layer 6 is Valid. Moving to Top Layer."); + + // Top Layer + aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, 0, xDir, zDir); + + log("Found "+aBaseCasingCount+" "+mCasingName[0]+"s"); + log("Found "+aShieldingCount+" "+mCasingName[4]+"s"); + log("Found "+aPipeCount+" "+mCasingName[1]+"s"); + log("Found "+aContainmentCasingCount+" "+mCasingName[3]+"s"); + log("Found "+aIntegralCasingCount+" "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s"); + log("Found "+aContainmentChamberCount+" "+mCasingName[2]+"s"); + + // Try mesage player + String aOwnerName = this.getBaseMetaTileEntity().getOwnerName(); + EntityPlayer aOwner = null; + if (aOwnerName != null && aOwnerName.length() > 0) { + aOwner = PlayerUtils.getPlayer(aOwnerName); + } + + if (aShieldingCount != 128) { + log("Not enough "+mCasingName[4]+"s, require 128."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[4]+"s, require 128."); + } + return false; + } + if (aPipeCount != 20) { + log("Not enough "+mCasingName[1]+"s, require 20."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[1]+"s, require 20."); + } + return false; + } + if (aContainmentCasingCount != 64) { + log("Not enough "+mCasingName[3]+"s, require 64."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[3]+"s, require 64."); + } + return false; + } + if (aContainmentChamberCount != 42) { + log("Not enough "+mCasingName[2]+"s, require 42."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[2]+"s, require 42."); + } + return false; + } + if (aBaseCasingCount < 140) { + log("Not enough "+mCasingName[0]+"s, require 140 at a minimum."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[0]+"s, require 140 at a minimum."); + } + return false; + } + if (aIntegralCasingCount != 48) { + log("Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); + } + return false; + } + log("LNR Formed."); + if (aOwner != null) { + PlayerUtils.messagePlayer(aOwner, "Large Naquadah Reactor has formed successfully."); + } + return true; + } + + public boolean addNaquadahHatchToMachineInput(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Naquadah) { + this.updateTexture(aMetaTileEntity, aBaseCasingIndex); + return this.mNaqHatches.add((GT_MetaTileEntity_Hatch_Naquadah) aMetaTileEntity); + } else { + return false; + } + } + } + + public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -4; x < 5; x++) { + for (int z = -4; z < 5; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { + continue; + } + // Skip controller + if (aY == 0 && x == 0 && z == 0) { + continue; + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + + public int checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -4; x < 5; x++) { + for (int z = -4; z < 5; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { + continue; + } + + // If we are on the 5x5 ring, proceed + if ((x > -4 && x < 4 ) && (z > -4 && z < 4)) { + if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + } + else { + continue; + } + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -3; x < 4; x++) { + for (int z = -3; z < 4; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { + continue; + } + + // If we are on the 5x5 ring, proceed + if ((x > -3 && x < 3 ) && (z > -3 && z < 3)) { + if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + } + else { + continue; + } + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + + public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -1; x < 2; x++) { + for (int z = -1; z < 2; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 1 && z == 1) || (x == -1 && z == -1) || (x == 1 && z == -1) || (x == -1 && z == 1) || (x == 0 && z == 0)) { + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Pipe has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + }; + } + } + } + return aCasingCount; + } + + public int checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { + int aCasingCount = 0; + for (int x = -2; x < 3; x++) { + for (int z = -2; z < 3; z++) { + int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; + int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; + int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; + //Skip the corners + if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { + continue; + } + + Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); + int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); + if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) { + aCasingCount++; + } + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); + if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { + log("Layer has error. Height: "+aY); + //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); + return 0; + } + } + } + return aCasingCount; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerTick(ItemStack aStack) { + return 133; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Reactor"; + } +}*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java new file mode 100644 index 0000000000..9c2e3289c3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java @@ -0,0 +1,386 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ControlCore; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Plasma; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { + + public long currentVoltage = GT_Values.V[7]; + public byte currentTier = 8; + + public void upvolt() { + byte f = currentTier; + if ((f+1) > 10) { + f = 8; + } + else { + f++; + } + this.currentTier = f; + updateVoltage(); + } + + public void downvolt() { + byte f = currentTier; + if ((f-1) < 8) { + f = 10; + } + else { + f--; + } + this.currentTier = f; + updateVoltage(); + } + + private long updateVoltage() { + this.currentVoltage = GT_Values.V[this.currentTier-1]; + return currentVoltage; + } + + public GregtechMTE_MiniFusionPlant(String aName) { + super(aName); + } + + public GregtechMTE_MiniFusionPlant(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMTE_MiniFusionPlant(this.mName); + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == this.getBaseMetaTileEntity().getBackFacing()) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), + Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]}; + } + if (aSide == 1) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]}; + } + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10))}; + } + + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Fusion Reactor"; + } + + @Override + public String[] getTooltip() { + return new String[] { + "Small scale fusion", + "16x slower than using Multiblock of the same voltage", + //"Input voltage can be changed within the GUI", + "Place Input/Output Hatches on sides and bottom", + "Power can only be inserted into the back", + //e"Power can only be extracted from the top", + TAG_HIDE_HATCHES + }; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + int xDir2 = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetX; + int zDir2 = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetZ; + int tAmount = 0; + + ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); + + //Require air in front, I think + if (!aBaseMetaTileEntity.getAirOffset(xDir2, 0, zDir2)) { + Logger.INFO("Did not find air in front"); + return false; + } else { + for (int i = -1; i < 2; ++i) { + for (int j = -1; j < 2; ++j) { + for (int h = -1; h < 2; ++h) { + if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, + h, zDir + j); + if (this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(10))) { + tAmount++; + } + } + } + } + } + } + Logger.INFO("Tanks found: "+tAmount); + return tAmount == 3; + } + + @Override + public boolean checkRecipe(ItemStack arg0) { + + + ArrayList tFluidList = this.getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + + for (int tFluids = 0; tFluids < tFluidList_sS - 1; ++tFluids) { + for (int tRecipe = tFluids + 1; tRecipe < tFluidList_sS; ++tRecipe) { + if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(tFluids), + (FluidStack) tFluidList.get(tRecipe))) { + if (((FluidStack) tFluidList.get(tFluids)).amount < ((FluidStack) tFluidList.get(tRecipe)).amount) { + tFluidList.remove(tFluids--); + tFluidList_sS = tFluidList.size(); + break; + } + + tFluidList.remove(tRecipe--); + tFluidList_sS = tFluidList.size(); + } + } + } + int aStep = 0; + //Logger.INFO("Step "+aStep++); + if (tFluidList.size() > 1) { + //Logger.INFO("Step "+aStep++); + FluidStack[] arg5 = (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]); + GT_Recipe arg6 = getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, + false, this.getMaxInputVoltage(), arg5, new ItemStack[0]); + if (arg6 == null && !this.mRunningOnLoad || (arg6 != null && this.maxEUStore() < (long) arg6.mSpecialValue)) { + //Logger.INFO("Bad Step "+aStep++); + //this.turnCasingActive(false); + this.mLastRecipe = null; + return false; + } + //Logger.INFO("Step "+aStep++); + + if (this.mRunningOnLoad || (arg6 != null && arg6.isRecipeInputEqual(true, arg5, new ItemStack[0]))) { + //Logger.INFO("Step "+aStep++); + this.mLastRecipe = arg6; + this.mEUt = this.mLastRecipe.mEUt * 1; + this.mMaxProgresstime = this.mLastRecipe.mDuration / 1; + this.mEfficiencyIncrease = 10000; + this.mOutputFluids = this.mLastRecipe.mFluidOutputs; + //this.turnCasingActive(true); + this.mRunningOnLoad = false; + return true; + } + //Logger.INFO("Step "+aStep++); + } + //Logger.INFO("Step "+aStep++); + + return false; + + + + + //return this.checkRecipeGeneric(this.getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); + } + + @Override + public int getMaxEfficiency(ItemStack arg0) { + return 10000; + } + + @Override + public boolean drainEnergyInput(long aEU) { + // Not applicable to this machine + return true; + } + + @Override + public boolean addEnergyOutput(long aEU) { + // Not applicable to this machine + return true; + } + + @Override + public long maxEUStore() { + return this.getMaxInputVoltage() * 256 * 512; + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public String[] getExtraInfoData() { + String mode = EnumChatFormatting.BLUE + "" + currentVoltage + EnumChatFormatting.RESET; + String aOutput = EnumChatFormatting.BLUE + "" + mEUt + EnumChatFormatting.RESET; + String storedEnergyText; + if (this.getEUVar() > maxEUStore()) { + storedEnergyText = EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; + } else { + storedEnergyText = EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; + } + + return new String[]{ + "Stored EU: " + storedEnergyText, + "Capacity: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.maxEUStore()) + EnumChatFormatting.RESET, + "Voltage: " + mode, + "Output Voltage: " + aOutput + }; + } + + @Override + public void explodeMultiblock() { + super.explodeMultiblock(); + } + + @Override + public void doExplosion(long aExplosionPower) { + super.doExplosion(aExplosionPower); + } + + @Override + public long getMaxInputVoltage() { + return updateVoltage(); + } + + @Override + public long getInputTier() { + return (long) GT_Utility.getTier(maxEUInput()); + } + + @Override + public boolean isElectric() { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isEnetOutput() { + return false; + } + + @Override + public boolean isInputFacing(byte aSide) { + return (aSide == this.getBaseMetaTileEntity().getBackFacing()); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == 1; + } + + @Override + public long maxAmperesIn() { + return 32; + } + + @Override + public long maxAmperesOut() { + return 1; + } + + @Override + public long maxEUInput() { + return updateVoltage(); + } + + @Override + public long maxEUOutput() { + return mEUt > 0 ? mEUt : 0; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + this.mWrench = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mHardHammer = true; + this.mSolderingTool = true; + this.mCrowbar = true; + } + + @Override + public boolean causeMaintenanceIssue() { + return true; + } + + @Override + public int getControlCoreTier() { + return this.currentTier; + } + + @Override + public int getPollutionPerTick(ItemStack arg0) { + return 0; + } + + @Override + public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() { + GT_MetaTileEntity_Hatch_ControlCore x = new GT_MetaTileEntity_Hatch_ControlCore("", 0, "", null); + return (GT_MetaTileEntity_Hatch_ControlCore) x; + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java new file mode 100644 index 0000000000..1f6ae41be2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java @@ -0,0 +1,523 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +import java.util.Collection; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.nuclear.NUCLIDE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase { + + protected int mFuelRemaining = 0; + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + + public GregtechMTE_NuclearReactor(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMTE_NuclearReactor(final String aName) { + super(aName); + } + + @Override + public long maxEUStore() { + return (640000000L * (Math.min(16, this.mEnergyHatches.size()))) / 16L; + } + + @Override + public String getMachineType() { + return "Reactor"; + } + + @Override + public GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Liquid Fluoride Thorium Reactor.") + .addInfo("Produces Heat & Energy from Radioactive Beta Decay.") + .addInfo("Outputs U233 every 10 seconds, on average") + .addInfo("Input Fluorine and Helium for bonus byproducts") + .addInfo("Input Li2BeF4 and a molten salt as fuel.") + .addInfo("LiFBeF2ThF4UF4, LiFBeF2ZrF4UF4 or LiFBeF2ZrF4U235") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(7, 4, 7, true) + .addController("Bottom Center") + .addCasingInfo("Hastelloy-N Reactor Casing", 27) + .addCasingInfo("Zeron-100 Reactor Shielding", 26) + .addInputHatch("Top or bottom layer edges", 1) + .addOutputHatch("Top or bottom layer edges", 1) + .addDynamoHatch("Top or bottom layer edges", 1) + .addMaintenanceHatch("Top or bottom layer edges", 1) + .addMufflerHatch("Top 3x3", 2) + .addStructureInfo("All dynamos must be IV or LuV tier.") + .addStructureInfo("All other hatches must be IV+ tier.") + .addStructureInfo("3x Output Hatches, 2x Input Hatches, 4x Dynamo Hatches") + .addStructureInfo("2x Maintenance Hatches, 4x Mufflers") + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public String[] getExtraInfoData() { + final String tRunning = (this.mMaxProgresstime>0 ? "Reactor running":"Reactor stopped"); + final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"); + + return new String[]{ + "Liquid Fluoride Thorium Reactor", + tRunning, + tMaintainance, + "Current Output: "+this.mEUt+" EU/t", + "Fuel Remaining: "+this.mFuelRemaining+" Litres", + "Current Efficiency: "+(this.mEfficiency/5)+"%", + "Current Efficiency (Raw): "+(this.mEfficiency), + "It requires you to have 100% Efficiency."}; + } + + @Override + public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aStack) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + boolean aWarmedUp = this.mEfficiency == this.getMaxEfficiency(null); + if (!aBaseMetaTileEntity.isActive() || !aWarmedUp){ + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))}; + } + else if(aBaseMetaTileEntity.isActive() && aWarmedUp){ + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13))}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))}; + + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "MatterFabricator"; + } + + public final boolean addNuclearReactorEdgeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo && (((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier >= 5 && ((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier <= 6)){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output && ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier >= 5) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addNuclearReactorTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 5) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCCCCCC", "COOOOOC", "COXXXOC", "COXXXOC", "COXXXOC", "COOOOOC", "CCCCCCC"}, + {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"}, + {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"}, + {"CCC~CCC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "CCCCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMTE_NuclearReactor::addNuclearReactorEdgeList, TAE.GTPP_INDEX(12), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 12 + ) + ) + ) + ) + .addElement( + 'X', + ofChain( + ofHatchAdder( + GregtechMTE_NuclearReactor::addNuclearReactorTopList, TAE.GTPP_INDEX(12), 2 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 12 + ) + ) + ) + ) + .addElement( + 'O', + ofBlock( + ModBlocks.blockCasingsMisc, 12 + ) + ) + .addElement( + 'G', + ofBlock( + ModBlocks.blockCasingsMisc, 13 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 3, 3, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + if (checkPiece(mName, 3, 3, 0) && mCasing >= 27) { + if (mOutputHatches.size() >= 3 && mInputHatches.size() >= 2 && mDynamoHatches.size() == 4 && + mMufflerHatches.size() == 4 && mMaintenanceHatches.size() == 2) { + this.mWrench = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mHardHammer = true; + this.mSolderingTool = true; + this.mCrowbar = true; + this.turnCasingActive(false); + return true; + } + } + return false; + } + + // Alk's Life Lessons from Greg. + /* + [23:41:15] xdir and zdir are x2 and not x3 + [23:41:26] thats you issue + [23:44:33] mmm? + [23:44:49] Should they be x3? + [23:44:50] you just do a x2, what is for a 5x5 multiblock + [23:45:01] x3 is for a 7x7 one + [23:45:06] I have no idea what that value does, tbh.. + [23:45:15] its the offset + [23:45:23] Debugging checkMachine has been a pain and I usually trash designs that don't work straight up.. + [23:45:28] it determines the horizontal middle of the multiblock + [23:45:47] which is in your case THREE blocks away from the controller + [23:45:51] Ahh + [23:45:57] and not 2 + [23:46:06] Noted, thanks :D + */ + + @Override + public boolean isCorrectMachinePart(final ItemStack aStack) { + return true; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(final ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return true; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMTE_NuclearReactor(this.mName); + } + + public boolean turnCasingActive(final boolean status) { + //TODO + if (this.mDynamoHatches != null) { + for (final GT_MetaTileEntity_Hatch_Dynamo hatch : this.mDynamoHatches) { + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); + } + } + if (this.mMufflerHatches != null) { + for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) { + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); + } + } + if (this.mOutputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); + } + } + if (this.mInputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) { + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); + } + } + if (this.mMaintenanceHatches != null) { + for (final GT_MetaTileEntity_Hatch_Maintenance hatch : this.mMaintenanceHatches) { + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); + } + } + return true; + } + + public FluidStack[] getStoredFluidsAsArray() { + return getStoredFluids().toArray(new FluidStack[0]); + } + + public int getStoredFuel(GT_Recipe aRecipe) { + int aFuelStored = 0; + FluidStack aFuelFluid = null; + for (FluidStack aFluidInput : aRecipe.mFluidInputs) { + if (!aFluidInput.getFluid().equals(NUCLIDE.Li2BeF4.getFluid())) { + aFuelFluid = aFluidInput; + break; + } + } + if (aFuelFluid != null) { + for (GT_MetaTileEntity_Hatch_Input aInputHatch : this.mInputHatches) { + if (aInputHatch.getFluid() != null && aInputHatch.getFluidAmount() > 0) { + if (aInputHatch.getFluid().isFluidEqual(aFuelFluid)) { + aFuelStored += aInputHatch.getFluidAmount(); + } + } + } + } + return aFuelStored; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + // Warm up for 4~ minutes + Logger.WARNING("Checking LFTR recipes."); + if (mEfficiency < this.getMaxEfficiency(null)) { + this.mProgresstime = 0; + this.mMaxProgresstime = 1; + this.mEfficiencyIncrease = 2; + Logger.WARNING("Warming Up! "+this.mEfficiency+"/"+this.getMaxEfficiency(null)); + return true; + } + Logger.WARNING("Warmed up, checking LFTR recipes."); + + final FluidStack[] tFluids = getStoredFluidsAsArray(); + final Collection tRecipeList = getRecipeMap().mRecipeList; + if(tFluids.length > 0 && tRecipeList != null && tRecipeList.size() > 0) { //Does input hatch have a LFTR fuel? + Logger.WARNING("Found more than one input fluid and a list of valid recipes."); + // Find a valid recipe + GT_Recipe aFuelProcessing = this.findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, 0, tFluids, new ItemStack[] {}); + if (aFuelProcessing == null) { + Logger.WARNING("Did not find valid recipe for given inputs."); + return false; + } + else { + Logger.WARNING("Found recipe? "+(aFuelProcessing != null ? "true" : "false")); + for (FluidStack aFluidInput : aFuelProcessing.mFluidInputs) { + Logger.WARNING("Using "+aFluidInput.getLocalizedName()); + } + } + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + this.mLastRecipe = aFuelProcessing; + // Deplete Inputs + if (aFuelProcessing.mFluidInputs.length > 0) { + for (FluidStack aInputToConsume : aFuelProcessing.mFluidInputs) { + Logger.WARNING("Depleting "+aInputToConsume.getLocalizedName()+" - "+aInputToConsume.amount+"L"); + this.depleteInput(aInputToConsume); + } + } + // -- Try not to fail after this point - inputs have already been consumed! -- + this.mMaxProgresstime = (int)(aFuelProcessing.mDuration); + this.mEUt = aFuelProcessing.mSpecialValue * 4; + Logger.WARNING("Outputting "+this.mEUt+"eu/t"); + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + Logger.WARNING("Recipe time: "+this.mMaxProgresstime); + mFuelRemaining = getStoredFuel(aFuelProcessing); //Record available fuel + + this.mOutputFluids = aFuelProcessing.mFluidOutputs.clone(); + updateSlots(); + Logger.WARNING("Recipe Good!"); + return true; + } + this.mEUt = 0; + this.mEfficiency = 0; + Logger.WARNING("Recipe Bad!"); + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public void explodeMultiblock() { + this.mInventory[1] = null; + long explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + for (final MetaTileEntity tTileEntity : this.mInputBusses) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mOutputBusses) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mInputHatches) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mOutputHatches) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mDynamoHatches) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mMufflerHatches) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mEnergyHatches) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + for (final MetaTileEntity tTileEntity : this.mMaintenanceHatches) { + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + tTileEntity.getBaseMetaTileEntity().doExplosion(explodevalue); + } + explodevalue = MathUtils.randLong(Integer.MAX_VALUE, 8589934588L); + this.getBaseMetaTileEntity().doExplosion(explodevalue); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.getWorld().isRemote) { + if (aBaseMetaTileEntity.isActive()){ + // Set casings active if we're warmed up. + if (this.mEfficiency == this.getMaxEfficiency(null)){ + this.turnCasingActive(true); + } + else { + this.turnCasingActive(false); + } + } + else { + this.turnCasingActive(false); + } + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + // See if we're warmed up. + if (this.mEfficiency == this.getMaxEfficiency(null)){ + // Try output some Uranium-233 + if (MathUtils.randInt(1, 300) == 1){ + this.addOutput(ELEMENT.getInstance().URANIUM233.getFluidStack(MathUtils.randInt(1, 10))); + } + + } + return super.onRunningTick(aStack); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mFuelRemaining", this.mFuelRemaining); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + this.mFuelRemaining = aNBT.getInteger("mFuelRemaining"); + super.loadNBTData(aNBT); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java new file mode 100644 index 0000000000..cccee84c99 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java @@ -0,0 +1,521 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntityGeneratorArray(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntityGeneratorArray(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityGeneratorArray(this.mName); + } + + @Override + public String getMachineType() { + return "Processing Array"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Generator Array") + .addInfo("Runs supplied generators as if placed in the world") + .addInfo("Place up to 16 Single Block GT Generators into the Controller") + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Robust Tungstensteel Machine Casings", 10) + .addInputBus("Any casing", 1) + .addOutputBus("Any casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addDynamoHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(48)}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "ProcessingArray"; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + this.mMode = getModeFromInventorySlot(this.getGUIItemStack()); + if (this.mMode == MODE_NONE) { + return null; + } + else if (this.mMode == MODE_STEAM) { + return GTPP_Recipe.GTPP_Recipe_Map.sSteamTurbineFuels; + } + else if (this.mMode == MODE_DIESEL) { + return GT_Recipe.GT_Recipe_Map.sDieselFuels; + } + else if (this.mMode == MODE_GAS) { + return GT_Recipe.GT_Recipe_Map.sTurbineFuels; + } + else if (this.mMode == MODE_SEMIFLUID) { + return GTPP_Recipe.GTPP_Recipe_Map.sSemiFluidLiquidFuels; + } + else if (this.mMode == MODE_GEOTHERMAL) { + return GTPP_Recipe.GTPP_Recipe_Map.sThermalFuels; + } + else if (this.mMode == MODE_ROCKETFUEL) { + return GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels; + } + else if (this.mMode == MODE_MAGIC_A) { + return GT_Recipe.GT_Recipe_Map.sMagicFuels; + } + else if (this.mMode == MODE_PLASMA) { + return GT_Recipe.GT_Recipe_Map.sPlasmaFuels; + } + else if (this.mMode == MODE_NAQUADAH) { + return GT_Recipe.GT_Recipe_Map.sFluidNaquadahReactorFuels; + } + return null; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + if (aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.")) { + return true; + } + return false; + } + + public String mMachine = ""; + protected int fuelConsumption = 0; + protected int fuelValue = 0; + protected int fuelRemaining = 0; + protected boolean boostEu = false; + + int mMode = 0; + + private final static int MODE_STEAM = 0; + private final static int MODE_DIESEL = 1; + private final static int MODE_GAS = 2; + private final static int MODE_SEMIFLUID = 3; + private final static int MODE_GEOTHERMAL = 4; + private final static int MODE_ROCKETFUEL = 5; + private final static int MODE_MAGIC_A = 6; + private final static int MODE_MAGIC_B_DISABLED = 7; + private final static int MODE_PLASMA = 8; + private final static int MODE_NAQUADAH = 9; + private final static int MODE_NONE = 100; + + private final static int[] ID_STEAM = new int[] {962, 1120, 1121, 1122}; + private final static int[] ID_GAS = new int[] {961, 1115, 1116, 1117}; + private final static int[] ID_DIESEL = new int[] {960, 1110, 1111, 1112}; + private final static int[] ID_SEMIFLUID = new int[] {837, 838, 839}; + private final static int[] ID_GEOTHERMAL = new int[] {830, 831, 832}; + private final static int[] ID_ROCKETFUEL = new int[] {793, 794, 795}; + private final static int[] ID_MAGIC_A = new int[] {1123, 1124, 1125}; + private final static int[] ID_MAGIC_B_DISABLED = new int[] {1127, 1128, 1129, 1130}; + private final static int[] ID_PLASMA = new int[] {1196, 1197, 1198}; + private final static int[] ID_NAQUADAH = new int[] {1190, 1191, 1192}; + + private static final int getModeFromInventorySlot(ItemStack aStack) { + + if (aStack == null) { + return MODE_NONE; + } + + String aItemStackName = aStack == null ? "" : aStack.getUnlocalizedName(); + //Logger.INFO("Item Name: "+aItemStackName+" ("+aStack.getItemDamage()+")"); + if (aItemStackName.toLowerCase().contains("gt.blockmachines")) { + for (int g : ID_STEAM) { + if (aStack.getItemDamage() == g) { + return MODE_STEAM; + } + } + for (int g : ID_GAS) { + if (aStack.getItemDamage() == g) { + return MODE_GAS; + } + } + for (int g : ID_DIESEL) { + if (aStack.getItemDamage() == g) { + return MODE_DIESEL; + } + } + for (int g : ID_SEMIFLUID) { + if (aStack.getItemDamage() == g) { + return MODE_SEMIFLUID; + } + } + for (int g : ID_GEOTHERMAL) { + if (aStack.getItemDamage() == g) { + return MODE_GEOTHERMAL; + } + } + for (int g : ID_ROCKETFUEL) { + if (aStack.getItemDamage() == g) { + return MODE_ROCKETFUEL; + } + } + for (int g : ID_MAGIC_A) { + if (aStack.getItemDamage() == g) { + return MODE_MAGIC_A; + } + } + for (int g : ID_PLASMA) { + if (aStack.getItemDamage() == g) { + return MODE_PLASMA; + } + } + for (int g : ID_NAQUADAH) { + if (aStack.getItemDamage() == g) { + return MODE_NAQUADAH; + } + } + } + return MODE_NONE; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + + this.resetRecipeMapForAllInputHatches(); + this.mMode = getModeFromInventorySlot(aStack); + if (mMode == MODE_NONE) { + Logger.INFO("Did not find valid generator."); + return false; + } + else { + Logger.INFO("Changed Mode to "+mMode); + } + int aMulti = this.getGUIItemStack() != null ? this.getGUIItemStack().stackSize : 0; + if (aMulti > 16 || aMulti == 0) { + return false; + } + + + + ArrayList tFluids = this.getStoredFluids(); + + Collection tRecipeList = this.getRecipeMap().mRecipeList; + Logger.INFO("Got Recipe Map"); + if (tFluids.size() > 0 && tRecipeList != null) { + Logger.INFO("Found Fuels for Map."); + Iterator arg3 = tFluids.iterator(); + int aCount = 0; + while (arg3.hasNext()) { + FluidStack hatchFluid1 = (FluidStack) arg3.next(); + Logger.INFO("Iterating Fluid Found "+(aCount++)+" | "+hatchFluid1.getLocalizedName()); + Iterator arg5 = tRecipeList.iterator(); + + int Hatch = 0; + int totalFuelValue = 0; + while (arg5.hasNext()) { + Logger.INFO("Iterating Recipe "+(Hatch++)); + GT_Recipe aFuel = (GT_Recipe) arg5.next(); + FluidStack tLiquid; + boolean addedFuelOnce = false; + for (int a = 0; a < aMulti; a++) { + if ((tLiquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null + && hatchFluid1.isFluidEqual(tLiquid)) { + this.fuelConsumption = tLiquid.amount = this.boostEu + ? 4096 / aFuel.mSpecialValue + : 2048 / aFuel.mSpecialValue; + if (this.depleteInput(tLiquid)) { + Logger.INFO("Depleted Fuel"); + this.boostEu = this.depleteInput(Materials.Oxygen.getGas(2L)); + +/*if (!tFluids.contains(Materials.Lubricant.getFluid(1L))) { + Logger.INFO("No Lube."); + return false; + }*/ + + if (this.mRuntime % 72 == 0 || this.mRuntime == 0) { + this.depleteInput(Materials.Lubricant.getFluid(this.boostEu ? 2L : 1L)); + } + Logger.INFO("ADDING POWER"); + this.fuelRemaining = hatchFluid1.amount; + totalFuelValue++; + } + } + } + //Do things after consuming Fuel + if (totalFuelValue == aMulti) { + this.fuelValue = aFuel.mSpecialValue*aMulti; + this.mEUt = this.mEfficiency < 2000 ? 0 : aFuel.mSpecialValue*aMulti; + this.mProgresstime = aMulti; + this.mMaxProgresstime = aMulti; + this.mEfficiencyIncrease = 15*aMulti; + return true; + } + } + } + } + + this.mEUt = 0; + this.mEfficiency = 0; + return false; + } + + public static ItemStack[] clean(final ItemStack[] v) { + List list = new ArrayList(Arrays.asList(v)); + list.removeAll(Collections.singleton(null)); + return list.toArray(new ItemStack[list.size()]); + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntityGeneratorArray::addGeneratorArrayList, 48, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + GregTech_API.sBlockCasings4, 0 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10; + } + + public final boolean addGeneratorArrayList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + /** + * Code from single blocks + */ + + public void tryProcessFuelItems(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a) { + if (a != null + && aBaseMetaTileEntity.getUniversalEnergyStored() < this.maxEUOutput() * 20L + this.getMinimumStoredEU() + && GT_Utility.getFluidForFilledItem(a, true) == null) { + int tFuelValue; + tFuelValue = this.getFuelValue(a); + if (tFuelValue > 0) { + ItemStack tEmptyContainer1 = this.getEmptyContainer(a); + if (this.addOutput(tEmptyContainer1)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits((long) tFuelValue, true); + this.depleteInput(a); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); + } + } + } + } + + public void tryProcessFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick, FluidStack mFluid) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) { + int tFuelValue; + if (mFluid != null) { + tFuelValue = this.getFuelValue(mFluid); + int tEmptyContainer = this.consumedFluidPerOperation(mFluid); + if (tFuelValue > 0 && tEmptyContainer > 0 && mFluid.amount > tEmptyContainer) { + long tFluidAmountToUse = Math.min((long) (mFluid.amount / tEmptyContainer), + (this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue); + if (tFluidAmountToUse > 0L && aBaseMetaTileEntity + .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) { + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null)); + mFluid.amount = (int) ((long) mFluid.amount + - tFluidAmountToUse * (long) tEmptyContainer); + } + } + } + + //Check items + } + + if (aBaseMetaTileEntity.isServerSide()) { + aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity + .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU()); + } + + } + + public boolean isFluidInputAllowed(FluidStack aFluid) { + return this.getFuelValue(aFluid) > 0; + } + + + public int consumedFluidPerOperation(FluidStack aLiquid) { + return 1; + } + + public int getFuelValue(FluidStack aLiquid) { + if (aLiquid != null && this.getRecipeMap() != null) { + Collection tRecipeList = this.getRecipeMap().mRecipeList; + if (tRecipeList != null) { + Iterator arg3 = tRecipeList.iterator(); + + while (arg3.hasNext()) { + GT_Recipe tFuel = (GT_Recipe) arg3.next(); + FluidStack tLiquid; + if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null + && aLiquid.isFluidEqual(tLiquid)) { + return (int) ((long) tFuel.mSpecialValue * (long) this.mEfficiency + * (long) this.consumedFluidPerOperation(tLiquid) / 100L); + } + } + } + + return 0; + } else { + return 0; + } + } + + public int getFuelValue(ItemStack aStack) { + if (!GT_Utility.isStackInvalid(aStack) && this.getRecipeMap() != null) { + GT_Recipe tFuel = this.getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, + (FluidStack[]) null, new ItemStack[]{aStack}); + return tFuel != null ? (int) ((long) tFuel.mSpecialValue * 1000L * (long) this.mEfficiency / 100L) : 0; + } else { + return 0; + } + } + + public ItemStack getEmptyContainer(ItemStack aStack) { + if (!GT_Utility.isStackInvalid(aStack) && this.getRecipeMap() != null) { + GT_Recipe tFuel = this.getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, + (FluidStack[]) null, new ItemStack[]{aStack}); + return tFuel != null + ? GT_Utility.copy(new Object[]{tFuel.getOutput(0)}) + : GT_Utility.getContainerItem(aStack, true); + } else { + return null; + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java new file mode 100644 index 0000000000..83b8eae458 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -0,0 +1,332 @@ + +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import codechicken.nei.ItemStackMap; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.*; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.*; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.helpers.TreeFarmHelper; +import gtPlusPlus.xmod.gregtech.common.helpers.treefarm.TreeGenerator; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase { + + public static int CASING_TEXTURE_ID; + public static String mCasingName = "Advanced Cryogenic Casing"; + public static TreeGenerator mTreeData; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + static { + new Thread("GTPP-TreeDataWorker") { + @Override + public void run() { + mTreeData = new TreeGenerator(); + } + }.start(); + } + + private static ItemStack aLeaves; + + public GregtechMetaTileEntityTreeFarm(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + CASING_TEXTURE_ID = TAE.getIndexFromPage(1, 15); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); + } + + public GregtechMetaTileEntityTreeFarm(final String aName) { + super(aName); + CASING_TEXTURE_ID = TAE.getIndexFromPage(1, 15); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); + } + + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityTreeFarm(this.mName); + } + + @Override + public String getMachineType() { + return "Tree Farm"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); + } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Converts EU to Oak Logs") + .addInfo("Eu Usage: 100% | Parallel: 1") + .addInfo("Requires a Saw or Chainsaw in GUI slot") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Sterile Farm Casing", 10) + .addInputBus("Any casing", 1) + .addOutputBus("Any casing", 1) + .addEnergyHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1) + .addMufflerHatch("Any casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + TextureFactory.of(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "VacuumFreezer"; + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + public boolean isCorrectMachinePart(final ItemStack aStack) { + // is correct part && either not powered tool or have enough power + return TreeFarmHelper.getPartType(aStack) != null && !GT_ModHandler.isElectricItem(aStack) || GT_ModHandler.canUseElectricItem(aStack, 1); + } + + public boolean checkRecipe(final ItemStack aStack) { + if (mTreeData == null) + // not finished somehow + return false; + if (aStack == null && !replaceTool()) + // no tool + return false; + if (!isCorrectMachinePart(aStack)) + // not a tool + return false; + if (mTreeData != null) { + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + this.mMaxProgresstime = 100; + this.mEUt = (int) tVoltage; + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + + int aChance = MathUtils.randInt(0, 10); + + try { + if (aChance < 8) { + ItemStackMap allOutputs = new ItemStackMap<>(); + if (aLeaves == null) + aLeaves = ItemUtils.getSimpleStack(Blocks.leaves); + //1% Chance per Tick + for (int u = 0; u < (Math.max(4, (MathUtils.randInt((3 * tTier), 100) * tTier * tTier) / 14)); u++) { + AutoMap aOutputs = mTreeData.generateOutput(0); + if (aOutputs.size() > 0) { + for (ItemStack aOutputItemStack : aOutputs) { + if (!GT_Utility.areStacksEqual(aLeaves, aOutputItemStack)) { + Integer oldStackSize = allOutputs.get(aOutputItemStack); + int oldStackSizeUnboxed = oldStackSize == null ? 0 : oldStackSize; + allOutputs.put(aOutputItemStack, oldStackSizeUnboxed + aOutputItemStack.stackSize); + } + } + } + } + + mOutputItems = allOutputs.entries().stream() + .map(e -> { + e.key.stackSize = e.value; + return e.key; + }).toArray(ItemStack[]::new); + } + } catch (Throwable t) { + t.printStackTrace(GT_Log.err); + } + return true; + } else { + return false; + } + } + + @Override + public boolean checkHatch() { + return super.checkHatch() && mEnergyHatches.size() == 1; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10 - 8 && checkHatch(); + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntityTreeFarm::addTreeFarmList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 15 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addTreeFarmList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiTreeFarm; + } + + public int getDamageToComponent(final ItemStack aStack) { + return MathUtils.balance((int) (75 - ((GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).getMass()))), 5, 120); + } + + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public boolean replaceTool() { + ItemStack invItem = this.mInventory[1]; + if (invItem == null) { + for (GT_MetaTileEntity_Hatch_InputBus mInputBus : this.mInputBusses) { + for (int i = 0; i < mInputBus.mInventory.length; i++) { + ItemStack uStack = mInputBus.mInventory[i]; + if (uStack != null && TreeFarmHelper.getPartType(uStack) != null) { + this.setGUIItemStack(uStack); + return true; + } + } + } + } + return false; + } + + public boolean tryDamageTool(ItemStack invItem) { + if (invItem != null && invItem.getItem() instanceof GT_MetaGenerated_Tool) { + long aDmg = GT_MetaGenerated_Tool.getToolDamage(invItem); + long aDmgMax = GT_MetaGenerated_Tool.getToolMaxDamage(invItem); + if (aDmg < aDmgMax && GT_MetaGenerated_Tool.getPrimaryMaterial(invItem) != Materials._NULL) { + return GT_ModHandler.damageOrDechargeItem(invItem, 1, 0, null); + } + } + return false; + } + + @Override + public boolean doRandomMaintenanceDamage() { + ItemStack tSaw = mInventory[1]; + if (!isCorrectMachinePart(tSaw) || getRepairStatus() == 0) { + stopMachine(); + return false; + } + if (CORE.RANDOM.nextInt(200) == 0) { + if (!tryDamageTool(tSaw)) { + if (tSaw.getItem().isDamageable()) + addOutput(tSaw); + this.mInventory[1] = null; + if (!replaceTool()) + this.getBaseMetaTileEntity().disableWorking(); + tryDamageTool(tSaw); + } + } + return super.doRandomMaintenanceDamage(); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + replaceTool(); + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java new file mode 100644 index 0000000000..c84c5e162e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java @@ -0,0 +1,336 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_AlloyBlastSmelter +extends GregtechMeta_MultiBlockBase { + + private int mMode = 0; + private boolean isUsingControllerCircuit = false; + private static Item circuit; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + + public GregtechMetaTileEntity_AlloyBlastSmelter(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_AlloyBlastSmelter(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_AlloyBlastSmelter(this.mName); + } + + @Override + public String getMachineType() { + return "Fluid Alloy Cooker"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Alloy Blast Smelter") + .addInfo("20% Faster than the Electric Blast Furnace") + .addInfo("Allows Complex GT++ alloys to be created") + .addInfo("Circuit for recipe goes in the Input Bus or GUI slot") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 4, 3, true) + .addController("Bottom Center") + .addCasingInfo("Blast Smelter Casings", 10) + .addCasingInfo("Blast Smelter Heat Containment Coils", 16) + .addInputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"HHH", "H-H", "HHH"}, + {"HHH", "H-H", "HHH"}, + {"C~C", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_AlloyBlastSmelter::addAlloyBlastSmelterList, TAE.GTPP_INDEX(15), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 15 + ) + ) + ) + ) + .addElement( + 'H', + ofBlock( + ModBlocks.blockCasingsMisc, 14 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 3, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 3, 0) && mCasing >= 10 && mEnergyHatches.size() == 1 && checkHatch(); + } + + public final boolean addAlloyBlastSmelterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(208)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15))}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public boolean requiresVanillaGtGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return "ElectricBlastFurnace"; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes; + } + + @Override + public boolean isCorrectMachinePart(final ItemStack aStack) { + if (this.getBaseMetaTileEntity().isServerSide()) { + //Get Controller Circuit + if (circuit == null) { + circuit = CI.getNumberedCircuit(0).getItem(); + } + if (aStack != null && aStack.getItem() == circuit) { + this.mMode = aStack.getItemDamage(); + return this.isUsingControllerCircuit = true; + } + else { + if (aStack == null) { + this.isUsingControllerCircuit = false; + return true; //Allowed empty + } + Logger.WARNING("Not circuit in GUI inputs."); + return this.isUsingControllerCircuit = false; + } + } + Logger.WARNING("No Circuit, clientside."); + return this.isUsingControllerCircuit = false; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + + if (this.getBaseMetaTileEntity().isServerSide()) { + //Get Controller Circuit + this.isUsingControllerCircuit = isCorrectMachinePart(aStack); + + final ArrayList tInputList = this.getStoredInputs(); + for (int i = 0; i < (tInputList.size() - 1); i++) { + for (int j = i + 1; j < tInputList.size(); j++) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + } else { + tInputList.remove(i--); + break; + } + } + } + } + + //Validity check + if ((isUsingControllerCircuit && tInputList.size() < 1) || (!isUsingControllerCircuit && tInputList.size() < 2)) { + Logger.WARNING("Not enough inputs."); + return false; + } + else if (isUsingControllerCircuit && tInputList.size() >= 1) { + tInputList.add(CI.getNumberedCircuit(this.mMode)); + } + + + final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, tInputList.size()); + + final ArrayList tFluidList = this.getStoredFluids(); + for (int i = 0; i < (tFluidList.size() - 1); i++) { + for (int j = i + 1; j < tFluidList.size(); j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + } else { + tFluidList.remove(i--); + break; + } + } + } + } + final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1); + if (tInputList.size() > 1) { + final long tVoltage = this.getMaxInputVoltage(); + final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + final GT_Recipe tRecipe = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) { + Logger.WARNING("Found some Valid Inputs."); + this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000)); + this.mEfficiencyIncrease = 10000; + if (tRecipe.mEUt <= 16) { + this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1))); + this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1))); + } else { + this.mEUt = tRecipe.mEUt; + this.mMaxProgresstime = tRecipe.mDuration; + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + List tOutPutItems = new ArrayList(); + for (ItemStack tOut : tRecipe.mOutputs) { + if (ItemUtils.checkForInvalidItems(tOut)) { + tOutPutItems.add(tOut); + } + } + if (tOutPutItems.size() > 0) + this.mOutputItems = tOutPutItems.toArray(new ItemStack[tOutPutItems.size()]); + this.updateSlots(); + return true; + } + } + } + Logger.WARNING("Failed to find some Valid Inputs or Clientside."); + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiABS; + } + + @Override + public int getDamageToComponent(final ItemStack aStack) { + return 0; + } + + @Override + public int getAmountOfOutputs() { + return 2; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java new file mode 100644 index 0000000000..ecd4882516 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -0,0 +1,481 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.chemistry.IonParticles; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_Cyclotron(int aID, String aName, String aNameRegional, int tier) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_Cyclotron(String aName) { + super(aName); + } + + @Override + public String getMachineType() { + return "Particle Accelerator"; + } + + public int tier(){ + return 5; + } + + @Override + public long maxEUStore() { + return 1800000000L; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return super.getServerGUI(aID, aPlayerInventory, aBaseMetaTileEntity); + //return new CONTAINER_Cyclotron(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return super.getClientGUI(aID, aPlayerInventory, aBaseMetaTileEntity); + //return new GUI_Cyclotron(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.mNEIName); + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Cyclotron(this.mName); + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return aSide != getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + { + " ", + " hhh ", + " hh hh ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " hh hh ", + " hhh ", + " ", + }, + { + " hhh ", + " hhccchh ", + " hcchhhcch ", + " hchh hhch ", + " hch hch ", + " hch hch ", + "hch hch", + "hch hch", + "hch hch", + " hch hch ", + " hch hch ", + " hchh hhch ", + " hcch~hcch ", + " hhccchh ", + " hhh ", + }, + { + " ", + " hhh ", + " hh hh ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " h h ", + " hh hh ", + " hhh ", + " ", + } + })) + .addElement( + 'h', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_Cyclotron::addCyclotronList, 44, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasing(), getCasingMeta() + ) + ) + ) + ) + .addElement( + 'c', + ofBlock( + getCyclotronCoil(), getCyclotronCoilMeta() + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 7, 1, 12); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 7, 1, 12) && mCasing >= 40 && checkHatch(); + } + + public final boolean addCyclotronList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus && ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier >= 5){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy && ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier >= 5){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus && ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier >= 5) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 5) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public Block getCasing() { + return ModBlocks.blockCasings2Misc; + } + + public int getCasingMeta() { + return 10; + } + + public Block getCyclotronCoil() { + return ModBlocks.blockCasings2Misc; + } + + public int getCyclotronCoilMeta() { + return 9; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Super Magnetic Speed Shooter") + .addSeparator() + .addInfo("Particles are accelerated over 186 revolutions to 80% light speed") + .addInfo("Can produce a continuous beam current of 2.2 mA at 590 MeV") + .addInfo("Which will be extracted from the Isochronous Cyclotron") + .addSeparator() + .addInfo("Consists of the same layout as a Fusion Reactor") + .addInfo("Any external casing can be a hatch/bus, unlike Fusion") + .addInfo("Cyclotron Machine Casings around Cyclotron Coil Blocks") + .addInfo("All Hatches must be IV or better") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .addCasingInfo("Cyclotron Machine Casings", 40) + .addCasingInfo("Cyclotron Coil", 32) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + ITexture[] sTexture; + if (aSide == aFacing) { + sTexture = new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44), new GT_RenderedTexture(getIconOverlay())}; + } else { + if (!aActive) { + sTexture = new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44)}; + } else { + sTexture = new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44)}; + } + } + return sTexture; + } + + public IIconContainer getIconOverlay() { + if (this.getBaseMetaTileEntity().isActive()){ + return TexturesGtBlock.Overlay_MatterFab_Active_Animated; + } + return TexturesGtBlock.Overlay_MatterFab_Animated; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + + /*if (CORE.DEVENV) { + return this.checkRecipeGeneric(); + }*/ + this.fixAllMaintenanceIssue(); + + //log("Recipe Check."); + ArrayList tItemList = getStoredInputs(); + ItemStack[] tItemInputs = tItemList.toArray(new ItemStack[tItemList.size()]); + ArrayList tInputList = getStoredFluids(); + FluidStack[] tFluidInputs = tInputList.toArray(new FluidStack[tInputList.size()]); + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + GT_Recipe tRecipe = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.findRecipe(getBaseMetaTileEntity(), false, + gregtech.api.enums.GT_Values.V[tTier], tFluidInputs, tItemInputs); + if (tRecipe != null){ + if (tRecipe.isRecipeInputEqual(true, tFluidInputs, tItemInputs)) { + + this.mEfficiency = (10000 - ((getIdealStatus() - getRepairStatus()) * 1000)); + this.mEfficiencyIncrease = 10000; + this.mEUt = tRecipe.mEUt; + this.mMaxProgresstime = tRecipe.mDuration; + + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + final ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length]; + for (int i = 0; i < tRecipe.mOutputs.length; i++){ + if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)){ + Logger.WARNING("Adding a bonus output"); + outputs[i] = tRecipe.getOutput(i); + } + else { + Logger.WARNING("Adding null output"); + outputs[i] = null; + } + } + + for (ItemStack s : outputs) { + if (s != null) { + if (s.getItem() instanceof IonParticles) { + long aCharge = IonParticles.getChargeState(s); + if (aCharge == 0) { + IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] { + -5, -5, + -4, -4, -4, + -3, -3, -3, -3, -3, + -2, -2, -2, -2, -2, -2, -2, + -1, -1, -1, -1, -1, -1, -1, -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, + 5, 5, 5, + 6, 6})); + } + } + } + } + + this.mOutputItems = outputs; + this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; + return true; + } + } + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (this.mOutputBusses.size() > 0) { + for (GT_MetaTileEntity_Hatch_OutputBus g : this.mOutputBusses) { + if (g != null) { + for (ItemStack s : g.mInventory) { + if (s != null) { + if (s.getItem() instanceof IonParticles) { + long aCharge = IonParticles.getChargeState(s); + if (aCharge == 0) { + IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] { + -5, -5, + -4, -4, -4, + -3, -3, -3, -3, -3, + -2, -2, -2, -2, -2, -2, -2, + -1, -1, -1, -1, -1, -1, -1, -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, + 5, 5, 5, + 6, 6})); + } + } + } + } + } + } + } + this.fixAllMaintenanceIssue(); + return super.onRunningTick(aStack); + } + + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiCyclotron; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public String[] getExtraInfoData() { + String tier = tier() == 5 ? "I" : "II"; + float plasmaOut = 0; + int powerRequired = 0; + if (this.mLastRecipe != null) { + powerRequired = this.mLastRecipe.mEUt; + if (this.mLastRecipe.getFluidOutput(0) != null) { + plasmaOut = (float)this.mLastRecipe.getFluidOutput(0).amount / (float)this.mLastRecipe.mDuration; + } + } + + return new String[]{ + "COMET - Compact Cyclotron MK "+tier, + "EU Required: "+powerRequired+"EU/t", + "Stored EU: "+this.getEUVar()+" / "+maxEUStore()}; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @SuppressWarnings("deprecation") + public boolean turnCasingActive(final boolean status) { + if (this.mEnergyHatches != null) { + for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) { + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; + } + } + if (this.mOutputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; + } + } + if (this.mInputHatches != null) { + for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) { + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; + } + } + if (this.mMaintenanceHatches != null) { + for (final GT_MetaTileEntity_Hatch_Maintenance hatch : this.mMaintenanceHatches) { + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; + } + } + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java new file mode 100644 index 0000000000..80eb09640d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java @@ -0,0 +1,623 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.*; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import ic2.core.init.BlocksItems; +import ic2.core.init.InternalName; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.WeightedRandomFishable; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_MultiBlockBase { + + private boolean isUsingControllerCircuit = false; + private static final Item circuit = CI.getNumberedCircuit(0).getItem(); + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_IndustrialFishingPond(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_IndustrialFishingPond(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_IndustrialFishingPond(this.mName); + } + + @Override + public String getMachineType() { + return "Fish Trap"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Fishing Pond") + .addInfo("Can process (Tier + 1) * 2 recipes") + .addInfo("Put a numbered circuit into the input bus.") + .addInfo("Circuit 14 for Fish") + .addInfo("Circuit 15 for Junk") + .addInfo("Circuit 16 for Treasure") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(9, 3, 9, true) + .addController("Front Center") + .addCasingInfo("Aquatic Casings", 64) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + // fuck + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"XXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, + {"XXXX~XXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, + {"XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX"}, + })) + .addElement( + 'X', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialFishingPond::addIndustrialFishingPondList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addIndustrialFishingPondList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 4, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 4, 1, 0) && mCasing >= 64 && checkHatch(); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE + : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER) }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) }; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + if (aStack != null) { + log("Found " + aStack.getDisplayName()); + if (aStack.getItem() == circuit) { + this.isUsingControllerCircuit = true; + this.mMode = aStack.getItemDamage(); + log("Found Circuit!"); + } else { + this.isUsingControllerCircuit = false; + } + } else { + this.isUsingControllerCircuit = false; + } + if (!hasGenerateRecipes) { + log("Generating Recipes."); + generateRecipes(); + } + if (hasGenerateRecipes) { + if (!checkForWater()) { + return false; + } + + log("Trying to run recipe."); + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + + if (!isUsingControllerCircuit && tItems.size() == 0) { + return false; + } + + return checkRecipeGeneric(tItemInputs, tFluidInputs, getMaxParallelRecipes(), 100, 80, 100); + } + return true; + } + + @Override + public int getMaxParallelRecipes() { + return (2 * (GT_Utility.getTier(this.getMaxInputVoltage())+1)); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialFishingPond; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings3Misc; + } + + public byte getCasingMeta() { + return 0; + } + + public int getCasingTextureIndex() { + return TAE.GTPP_INDEX(32); + } + + public boolean checkForWater() { + + // Get Facing direction + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int mCurrentDirectionX; + int mCurrentDirectionZ; + int mOffsetX_Lower = 0; + int mOffsetX_Upper = 0; + int mOffsetZ_Lower = 0; + int mOffsetZ_Upper = 0; + + mCurrentDirectionX = 4; + mCurrentDirectionZ = 4; + + mOffsetX_Lower = -4; + mOffsetX_Upper = 4; + mOffsetZ_Lower = -4; + mOffsetZ_Upper = 4; + + // if (aBaseMetaTileEntity.fac) + + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX + * mCurrentDirectionX; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ + * mCurrentDirectionZ; + + int tAmount = 0; + for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) { + for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { + for (int h = 0; h < 2; h++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + // byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) { + if (this.getStoredFluids() != null) { + for (FluidStack stored : this.getStoredFluids()) { + if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) { + if (stored.amount >= 1000) { + // Utils.LOG_WARNING("Going to try swap an air block for water from inut bus."); + stored.amount -= 1000; + Block fluidUsed = Blocks.water; + aBaseMetaTileEntity.getWorld().setBlock( + aBaseMetaTileEntity.getXCoord() + xDir + i, + aBaseMetaTileEntity.getYCoord() + h, + aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed); + + } + } + } + } + } + tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + if (tBlock == Blocks.water || tBlock == Blocks.flowing_water) { + ++tAmount; + // log("Found Water"); + } + } + } + } + + boolean isValidWater = tAmount >= 60; + + if (isValidWater) { + log("Filled structure."); + return true; + } + else { + + long aAvgVoltage = 0; + for (GT_MetaTileEntity_Hatch_Energy g : this.mEnergyHatches) { + if (g != null) { + aAvgVoltage += (g.maxEUInput() * g.maxAmperesIn()); + } + } + this.mEUt = (int) Math.max(30, aAvgVoltage); + this.mMaxProgresstime = (int) Math.max(((aAvgVoltage/8)*20/10), 100); + this.mProgresstime = 1; + log("Did not fill structure. Consuming "+aAvgVoltage+"eu/t to try fill."); + return false; + } + } + + private static AutoMap> categories = new AutoMap>(); + private static AutoMap categoryFish = new AutoMap(); + private static AutoMap categoryJunk = new AutoMap(); + private static AutoMap categoryLoot = new AutoMap(); + private static boolean hasGenerateRecipes = false; + private int mMode = 14; + private int mMax = 8; + + private boolean generateRecipes() { + if (!hasGenerateRecipes) { + categories.put(categoryFish); + categories.put(categoryJunk); + categories.put(categoryLoot); + for (WeightedRandomFishable h : FishPondFakeRecipe.fish) { + categoryFish.put(h); + } + for (WeightedRandomFishable h : FishPondFakeRecipe.junk) { + categoryJunk.put(h); + } + for (WeightedRandomFishable h : FishPondFakeRecipe.treasure) { + categoryLoot.put(h); + } + hasGenerateRecipes = true; + return true; + } else { + return true; + } + } + + private int getCircuit(ItemStack[] t) { + if (!this.isUsingControllerCircuit) { + for (ItemStack j : t) { + if (j.getItem() == CI.getNumberedCircuit(0).getItem()) { + // Fish + if (j.getItemDamage() == 14) { + mMax = 8 + (this.getMaxParallelRecipes() - 2); + this.mMode = 14; + break; + } + // Junk + else if (j.getItemDamage() == 15) { + this.mMode = 15; + mMax = 4; + break; + } + // Loot + else if (j.getItemDamage() == 16) { + this.mMode = 16; + mMax = 4; + break; + } else { + this.mMode = 0; + mMax = 0; + break; + } + } else { + this.mMode = 0; + mMax = 0; + break; + } + } + } + return this.mMode; + } + + // reflection map + private static Map reflectiveFishMap = new HashMap(); + + private ItemStack reflectiveFish(WeightedRandomFishable y) { + if (reflectiveFishMap.containsKey(y)) { + return reflectiveFishMap.get(y); + } + ItemStack t; + try { + t = (ItemStack) ReflectionUtils.getField(WeightedRandomFishable.class, "field_150711_b").get(y); + ItemStack k = ItemUtils.getSimpleStack(t, 1); + reflectiveFishMap.put(y, k); + return t; + } catch (IllegalArgumentException | IllegalAccessException e) { + } + return null; + } + + private ItemStack[] generateLoot(int mode) { + ItemStack[] mFishOutput = new ItemStack[this.mMax]; + if (this.mMode == 14) { + for (int k = 0; k < this.mMax; k++) { + if (mFishOutput[k] == null) + for (WeightedRandomFishable g : categoryFish.values()) { + if (MathUtils.randInt(0, (65 - getMaxParallelRecipes())) <= 2) { + ItemStack t = reflectiveFish(g); + if (t != null) { + mFishOutput[k] = ItemUtils.getSimpleStack(t, 1); + } + } + } + } + } else if (this.mMode == 15) { + for (int k = 0; k < this.mMax; k++) { + if (mFishOutput[k] == null) + for (WeightedRandomFishable g : categoryJunk.values()) { + if (MathUtils.randInt(0, 100) <= 1) { + ItemStack t = reflectiveFish(g); + if (t != null) { + mFishOutput[k] = ItemUtils.getSimpleStack(t, 1); + } + } + } + } + } else if (this.mMode == 16) { + for (int k = 0; k < this.mMax; k++) { + if (mFishOutput[k] == null) + for (WeightedRandomFishable g : categoryLoot.values()) { + if (MathUtils.randInt(0, 1000) <= 2) { + ItemStack t = reflectiveFish(g); + if (t != null) { + mFishOutput[k] = ItemUtils.getSimpleStack(t, 1); + } + } + } + } + } else { + mFishOutput = null; + } + return mFishOutput; + } + + @Override + public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, + int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { + + + + //Control Core to control the Multiblocks behaviour. + int aControlCoreTier = getControlCoreTier(); + + //If no core, return false; + if (aControlCoreTier == 0 && CORE.ConfigSwitches.requireControlCores) { + log("Invalid/No Control Core"); + return false; + } + + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + log("Running checkRecipeGeneric(0)"); + + //Check to see if Voltage Tier > Control Core Tier + if (tTier > aControlCoreTier && CORE.ConfigSwitches.requireControlCores) { + return false; + } + + // Based on the Processing Array. A bit overkill, but very flexible. + getCircuit(aItemInputs); + + /* + * GT_Recipe tRecipe = this.getRecipeMap().findRecipe( getBaseMetaTileEntity(), + * mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, + * aItemInputs); + */ + + ItemStack[] mFishOutput = generateLoot(this.mMode); + mFishOutput = removeNulls(mFishOutput); + GT_Recipe g = new GTPP_Recipe(true, new ItemStack[] {}, mFishOutput, null, new int[] {}, aFluidInputs, mOutputFluids, 200, 16, 0); + aMaxParallelRecipes = this.canBufferOutputs(g, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + log("No Space"); + return false; + } + + log("Mode: " + this.mMode + " | Is loot valid? " + (mFishOutput != null)); + + int jslot = 0; + for (ItemStack x : mFishOutput) { + if (x != null) { + log( + "Slot " + jslot + " in mFishOutput contains " + x.stackSize + "x " + x.getDisplayName() + "."); + } else { + log("Slot " + jslot + " in mFishOutput was null."); + } + jslot++; + } + + // EU discount + float tRecipeEUt = (8 * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+aMaxParallelRecipes); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(20 * tTimeFactor * 4); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + + //Only Overclock as high as the control circuit. + byte tTierOld = tTier; + tTier = CORE.ConfigSwitches.requireControlCores ? (byte) aControlCoreTier : tTierOld; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + + log("Recipe Step. [3]"); + // Collect output item types + ItemStack[] tOutputItems = mFishOutput; + + int rslot = 0; + tOutputItems = removeNulls(mFishOutput); + + for (ItemStack x : tOutputItems) { + if (x != null) { + log( + "rSlot " + rslot + " in mFishOutput contains " + x.stackSize + "x " + x.getDisplayName() + "."); + } else { + log("rSlot " + rslot + " in mFishOutput was null."); + } + rslot++; + } + + // Commit outputs + this.mOutputItems = tOutputItems; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + return true; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java new file mode 100644 index 0000000000..d9162cea89 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java @@ -0,0 +1,629 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; +import java.util.Collection; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.item.chemistry.RocketFuels; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_AirIntake; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_MultiBlockBase +{ + protected int fuelConsumption; + protected int fuelValue; + protected int fuelRemaining; + protected int freeFuelTicks = 0; + protected int euProduction = 0; + protected boolean boostEu; + + public static String mLubricantName = "Carbon Dioxide"; + public static String mCoolantName = "Liquid Hydrogen"; + + public static String mCasingName = "Turbodyne Casing"; + public static String mIntakeHatchName = "Tungstensteel Turbine Casing"; + public static String mGearboxName = "Inconel Reinforced Casing"; + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + private final static int CASING_ID = TAE.getIndexFromPage(3, 11); + + public GregtechMetaTileEntity_LargeRocketEngine(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + this.fuelConsumption = 0; + this.fuelValue = 0; + this.fuelRemaining = 0; + this.boostEu = false; + } + + public GregtechMetaTileEntity_LargeRocketEngine(final String aName) { + super(aName); + this.fuelConsumption = 0; + this.fuelValue = 0; + this.fuelRemaining = 0; + this.boostEu = false; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 11); + } + if (mIntakeHatchName.toLowerCase().contains(".name")) { + mIntakeHatchName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 11); + } + if (mGearboxName.toLowerCase().contains(".name")) { + mGearboxName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 1); + } + if (mLubricantName.toLowerCase().contains(".")) { + mLubricantName = FluidUtils.getFluidStack("carbondioxide", 1).getLocalizedName(); + } + if (mCoolantName.toLowerCase().contains(".")) { + mCoolantName = FluidUtils.getFluidStack("liquidhydrogen", 1).getLocalizedName(); + } + + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Large Rocket Engine") + .addInfo("Supply Rocket Fuels and 1000L(3000L boosted) of " + mLubricantName + " per hour to run") + .addInfo("Supply 4L of " + mCoolantName + " per second per 2100 eu/t to boost output (optional)") + .addInfo("Consumes 2000L/s of air per 16384 eu/t produced") + .addInfo("Produces as much energy as you put fuel in") + .addInfo("Produces 1500 pollution/S per 16384 eu/t produced") + .addInfo("When producing more then 32K eu/t fuel wil be consume less efficiently (3x - 1.5x eff@57Keu/t input energy)") + .addInfo("formula: x = input of energy (10K^(1/3)/ x^(1/3)) * (40K^(1/3)/ x^(1/3))") + .addInfo("Boosting will produce 3x the amount of power but will consume 3x fuel") + .addSeparator() + .beginStructureBlock(3, 3, 10, false) + .addController("Front Center") + .addCasingInfo(mCasingName, 64) + .addCasingInfo(mGearboxName, 8) + .addStructureHint("Air Intake Hatch", 1) + .addInputBus("Side center line", 1) + .addInputHatch("Side center line", 1) + .addMaintenanceHatch("Side center line", 1) + .addDynamoHatch("Top center line", 2) + .addMufflerHatch("Back Center", 3) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CCC"}, + {"C~C", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "CMC"}, + {"CCC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CCC"}, + })) + .addElement( + 'C', + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + .addElement( + 'I', + ofBlock( + getGearboxBlock(), getGearboxMeta() + ) + ) + .addElement( + 'T', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_LargeRocketEngine::addLargeRocketEngineTopList, getCasingTextureIndex(), 2 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .addElement( + 'S', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_LargeRocketEngine::addLargeRocketEngineSideList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .addElement( + 'M', + ofHatchAdder( + GregtechMetaTileEntity_LargeRocketEngine::addLargeRocketEngineBackList, getCasingTextureIndex(), 3 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + this.mTecTechDynamoHatches.clear(); + this.mAllDynamoHatches.clear(); + this.mAirIntakes.clear(); + return checkPiece(mName, 1, 1, 0) && mCasing >= 64 - 48 && mAirIntakes.size() >= 8 && checkHatch(); + } + + public final boolean addLargeRocketEngineTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } if (LoadedMods.TecTech) { + if (isThisHatchMultiDynamo(aMetaTileEntity)) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + } + return false; + } + + public final boolean addLargeRocketEngineSideList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addLargeRocketEngineBackList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_ID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced) }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_ID) }; + } + + @Override + public boolean isCorrectMachinePart(final ItemStack aStack) { + return this.getMaxEfficiency(aStack) > 0; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return super.getClientGUI(aID, aPlayerInventory, aBaseMetaTileEntity); + } + + public int getAir() { + if (this.mAirIntakes.isEmpty() || this.mAirIntakes.size() <= 0) { + return 0; + } + else { + int totalAir = 0; + FluidStack airstack = FluidUtils.getFluidStack("air", 1); + for (GT_MetaTileEntity_Hatch_AirIntake u : this.mAirIntakes) { + if (u != null && u.mFluid != null) { + // had this trow errors cousing the machine to stop probebly fixed + FluidStack f = u.mFluid; + if (f.isFluidEqual(airstack)) { + totalAir += f.amount; + } + } + } + return totalAir; + } + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + final ArrayList tFluids = this.getStoredFluids(); + FluidStack air = FluidUtils.getFluidStack("air", 1); + + int aircount = getAir() ; + if (aircount < euProduction/100) { + //log("Not Enough Air to Run "+aircount); + return false; + } + else { + boolean hasIntakeAir = this.depleteInput(FluidUtils.getFluidStack(air, euProduction/100)); + if (!hasIntakeAir) { + //log("Could not consume Air to run "+aircount); + freeFuelTicks = 0; + return false; + } + } + // reste fuel ticks incase it does not reset when it stops + if (freeFuelTicks != 0 && this.mProgresstime == 0 && this.mEfficiency == 0) + freeFuelTicks = 0; + + //log("Running "+aircount); + log("looking at hatch"); + final Collection tRecipeList = GTPP_Recipe.GTPP_Recipe_Map.sRocketFuels.mRecipeList; + + + if (tFluids.size() > 0 && tRecipeList != null) { + + if (tFluids.contains(MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(this.boostEu ? 3 : 1)) || tFluids.contains(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) { + if (this.mRuntime % 72 == 0 || this.mRuntime == 0) { + if (!consumeCO2()) { + freeFuelTicks = 0; + return false; + } + } + } else + { + freeFuelTicks = 0; + return false; + } + + if (freeFuelTicks == 0) + this.boostEu = consumeLOH(); + + for (final FluidStack hatchFluid1 : tFluids) { + if (hatchFluid1.isFluidEqual(air)) { + continue; + } + + if (freeFuelTicks == 0) { + for (final GT_Recipe aFuel : tRecipeList) { + final FluidStack tLiquid; + tLiquid = aFuel.mFluidInputs[0]; + if (hatchFluid1.isFluidEqual(tLiquid)) { + if (!consumeFuel(aFuel,hatchFluid1.amount)) { + continue; + } + this.fuelValue = aFuel.mSpecialValue; + this.fuelRemaining = hatchFluid1.amount; + this.mEUt = (int) ((this.mEfficiency < 2000) ? 0 : GT_Values.V[5]<<1); + this.mProgresstime = 1; + this.mMaxProgresstime = 1; + this.mEfficiencyIncrease = euProduction/2000; + return true; + //log(""); + } + } + + } else + { + this.mEfficiencyIncrease = euProduction/2000; + freeFuelTicks--; + this.mEUt = (int) ((this.mEfficiency < 1000) ? 0 : GT_Values.V[5]<<1); + this.mProgresstime = 1; + this.mMaxProgresstime = 1; + return true; + } + + } + } + this.mEUt = 0; + this.mEfficiency = 0; + freeFuelTicks = 0; + return false; + } + + /** + * Consumes Fuel if required. Free Fuel Ticks are handled here. + * @param aFuel + * @return + */ + public boolean consumeFuel(GT_Recipe aFuel,int amount) { + amount *= this.boostEu ? 0.3 : 0.9; + freeFuelTicks = 0; + int value = aFuel.mSpecialValue * 3; + int energy = value * amount; + if (amount < 5) + return false; + FluidStack tLiquid = FluidUtils.getFluidStack(aFuel.mFluidInputs[0], (this.boostEu ? amount * 3 : amount)); + if (!this.depleteInput(tLiquid)) { + return false; + } + else { + this.fuelConsumption = this.boostEu ? amount * 3 : amount; + this.freeFuelTicks = 20; + setEUProduction(energy); + return true; + } + } + + public void setEUProduction(int energy){ + energy /= 20; + double energyEfficiency; + double tDevideEnergy = Math.cbrt(energy); + if (energy > 10000) { + //cbrt(10 000) / + energyEfficiency = ((double) 21.5443469/tDevideEnergy); + if (energy >= 40000) + //cbrt(40 000) / + energyEfficiency *= ((double)34.19951893/tDevideEnergy); + energyEfficiency *= energy; + } + else { + energyEfficiency = energy; + } + euProduction = (int) ((double) energyEfficiency * 1.84); + if (this.boostEu) + euProduction *= 3; + } + + public boolean consumeCO2() { + if (this.depleteInput(MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(this.boostEu ? 3 : 1)) || this.depleteInput(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) { + return true; + } + else { + return false; + } + } + + public boolean consumeLOH() { + int LOHamount = (3 * euProduction)/1000; + return this.depleteInput(FluidUtils.getFluidStack(RocketFuels.Liquid_Hydrogen, LOHamount)); //(40 * ((long) euProduction / 10000)) + } + + @Override + public boolean addEnergyOutput(long aEU) { + if (aEU <= 0) { + return true; + } + if (mAllDynamoHatches.size() > 0) { + return addEnergyOutputMultipleDynamos(aEU, true); + } + return false; + } + + + public boolean addEnergyOutputMultipleDynamos(long aEU, boolean aAllowMixedVoltageDynamos) { + int injected = 0; + long totalOutput = 0; + long aFirstVoltageFound = -1; + boolean aFoundMixedDynamos = false; + for (GT_MetaTileEntity_Hatch aDynamo : mAllDynamoHatches) { + if( aDynamo == null ) { + return false; + } + if (isValidMetaTileEntity(aDynamo)) { + long aVoltage = aDynamo.maxEUOutput(); + long aTotal = aDynamo.maxAmperesOut() * aVoltage; + // Check against voltage to check when hatch mixing + if (aFirstVoltageFound == -1) { + aFirstVoltageFound = aVoltage; + } + else { + /** + * Calcualtes overclocked ness using long integers + * @param aEUt - recipe EUt + * @param aDuration - recipe Duration + * @param mAmperage - should be 1 ? + */ + //Long time calculation + if (aFirstVoltageFound != aVoltage) { + aFoundMixedDynamos = true; + } + } + totalOutput += aTotal; + } + } + + if (totalOutput < aEU || (aFoundMixedDynamos && !aAllowMixedVoltageDynamos)) { + explodeMultiblock(); + return false; + } + + long leftToInject; + //Long EUt calculation + long aVoltage; + //Isnt too low EUt check? + int aAmpsToInject; + int aRemainder; + + //xEUt *= 4;//this is effect of everclocking + for (GT_MetaTileEntity_Hatch aDynamo : mAllDynamoHatches) { + if (isValidMetaTileEntity(aDynamo)) { + leftToInject = aEU - injected; + aVoltage = aDynamo.maxEUOutput(); + aAmpsToInject = (int) (leftToInject / aVoltage); + aRemainder = (int) (leftToInject - (aAmpsToInject * aVoltage)); + long powerGain; + for (int i = 0; i < Math.min(aDynamo.maxAmperesOut(), aAmpsToInject + 1); i++) { + if (i == Math.min(aDynamo.maxAmperesOut(), aAmpsToInject)){ + powerGain = aRemainder; + }else{ + powerGain = aVoltage; + } + aDynamo.getBaseMetaTileEntity().increaseStoredEnergyUnits(powerGain, false); + injected += powerGain; + } + } + } + return injected > 0; + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (this.mRuntime%20 == 0) { + if (mMufflerHatches.size() == 1 && mMufflerHatches.get(0) instanceof GT_MetaTileEntity_Hatch_Muffler_Adv) { + GT_MetaTileEntity_Hatch_Muffler_Adv tMuffler = (GT_MetaTileEntity_Hatch_Muffler_Adv) mMufflerHatches.get(0); + if (!tMuffler.hasValidFilter()) { + ArrayList tInputs = getStoredInputs(); + for (ItemStack tItem : tInputs) { + if (tMuffler.isAirFilter(tItem)) { + tMuffler.mInventory[0] = tItem.copy(); + depleteInput(tItem); + updateSlots(); + break; + } + } + } + } + } + super.onRunningTick(aStack); + return true; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings4Misc; + } + + public byte getCasingMeta() { + return 11; + } + + public Block getGearboxBlock() { + return ModBlocks.blockCasings3Misc; + } + + public byte getGearboxMeta() { + return 1; + } + + public byte getCasingTextureIndex() { + return (byte) CASING_ID; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_LargeRocketEngine(this.mName); + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setInteger("freeFuelTicks", freeFuelTicks); + aNBT.setInteger("euProduction", euProduction); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + freeFuelTicks = aNBT.getInteger("freeFuelTicks"); + euProduction = aNBT.getInteger("euProduction"); + } + + @Override + public int getDamageToComponent(final ItemStack aStack) { + return 1; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return euProduction; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 75 * ( euProduction / 10000); + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return true; + } + + @Override + public String[] getExtraInfoData() { + return new String[] { + "Rocket Engine", + "Current Air: "+getAir(), + "Current Pollution: " + getPollutionPerTick(null), + "Time until next fuel consumption: "+freeFuelTicks, + "Current Output: " + this.mEUt * this.mEfficiency / 10000 + " EU/t", + "Fuel Consumption: " + (this.fuelConsumption) + "L/s", + "Fuel Value: " + this.fuelValue*3 + " EU/L", + "Fuel Remaining: " + this.fuelRemaining + " Litres", + "Current Efficiency: " + this.mEfficiency / 100 + "%", + (this.getIdealStatus() == this.getRepairStatus()) ? "No Maintainance issues" : "Needs Maintainance" }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Rocket Engine"; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java new file mode 100644 index 0000000000..9be787e922 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java @@ -0,0 +1,341 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_LargeSemifluidGenerator extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + protected int fuelConsumption = 0; + protected int fuelValue = 0; + protected int fuelRemaining = 0; + protected boolean boostEu = false; + + public GregtechMetaTileEntity_LargeSemifluidGenerator(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_LargeSemifluidGenerator(String aName) { + super(aName); + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Large Semifluid Generator") + .addInfo("Engine Intake Casings must not be obstructed in front (only air blocks)") + .addInfo("Supply Semifluid Fuels and 2000L of Lubricant per hour to run.") + .addInfo("Supply 80L of Oxygen per second to boost output (optional).") + .addInfo("Default: Produces 2048EU/t at 100% efficiency") + .addInfo("Boosted: Produces 6144EU/t at 150% efficiency") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 3, 4, false) + .addController("Front Center") + .addCasingInfo("Stable Titanium Machine Casing", 16) + .addCasingInfo("Steel Gear Box Machine Casing", 2) + .addCasingInfo("Engine Intake Machine Casing", 8) + .addInputHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .addDynamoHatch("Back Center", 2) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(50)}; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return getMaxEfficiency(aStack) > 0; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png"); + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + ArrayList tFluids = getStoredFluids(); + + // Check for lubricant and oxygen first, so we can compute costs ahead of time. + // This will allow us to check costs without needing to actually try to deplete fluids + // (wasting earlier fluids in the check if later fluids turn out to be insufficient). + FluidStack lubricant = Materials.Lubricant.getFluid(0L); + FluidStack oxygen = Materials.Oxygen.getGas(0L); + for (FluidStack hatchFluid : tFluids) { + if (hatchFluid.isFluidEqual(lubricant)) { + lubricant.amount = Math.max(lubricant.amount, hatchFluid.amount); + } else if (hatchFluid.isFluidEqual(oxygen)) { + oxygen.amount = Math.max(oxygen.amount, hatchFluid.amount); + } + } + boostEu = oxygen.amount >= 4L; + long lubricantCost = boostEu ? 2L : 1L; + if (lubricant.amount < lubricantCost) { + return false; + } + + for (FluidStack hatchFluid : tFluids) { //Loops through hatches + GT_Recipe aFuel = GTPP_Recipe_Map.sSemiFluidLiquidFuels.findFuel(hatchFluid); + if (aFuel == null) { + // Not a valid semi-fluid fuel. + continue; + } + + int newEUt = boostEu ? 4096 : 2048; + fuelConsumption = newEUt / aFuel.mSpecialValue; //Calc fuel consumption + FluidStack tLiquid = new FluidStack(hatchFluid.getFluid(), fuelConsumption); + if(depleteInput(tLiquid)) { //Deplete that amount + // We checked beforehand, so both of these depletions should succeed. + // But check the return values anyway just to be safe. + if (boostEu) { + if (!depleteInput(Materials.Oxygen.getGas(4L))) { + return false; + } + } + //Deplete Lubricant. 2000L should = 1 hour of runtime (if baseEU = 2048) + if(mRuntime % 72 == 0 || mRuntime == 0) { + if(!depleteInput(Materials.Lubricant.getFluid(lubricantCost))) { + return false; + } + } + + fuelValue = aFuel.mSpecialValue; + fuelRemaining = hatchFluid.amount; //Record available fuel + this.mEUt = mEfficiency < 2000 ? 0 : newEUt; //Output 0 if startup is less than 20% + this.mProgresstime = 1; + this.mMaxProgresstime = 1; + this.mEfficiencyIncrease = 15; + return true; + } + } + + this.mEUt = 0; + this.mEfficiency = 0; + return false; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"III", "CCC", "CCC", "CCC"}, + {"I~I", "CGC", "CGC", "CMC"}, + {"III", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_LargeSemifluidGenerator::addLargeSemifluidGeneratorList, getCasingTextureIndex(), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + getCasingBlock(), getCasingMeta() + ) + ) + ) + ) + .addElement( + 'G', + ofBlock( + getGearboxBlock(), getGearboxMeta() + ) + ) + .addElement( + 'I', + ofBlock( + getIntakeBlock(), getIntakeMeta() + ) + ) + .addElement( + 'M', + ofHatchAdder( + GregtechMetaTileEntity_LargeSemifluidGenerator::addLargeSemifluidGeneratorBackList, getCasingTextureIndex(), 2 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mDynamoHatches.clear(); + return checkPiece(mName, 1, 1, 0) && mCasing >= 16 && checkHatch(); + } + + public final boolean addLargeSemifluidGeneratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public final boolean addLargeSemifluidGeneratorBackList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || this.isThisHatchMultiDynamo(aTileEntity)){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + public Block getCasingBlock() { + return GregTech_API.sBlockCasings4; + } + + public byte getCasingMeta() { + return 2; + } + + public Block getIntakeBlock() { + return GregTech_API.sBlockCasings4; + } + + public byte getIntakeMeta() { + return 13; + } + + public Block getGearboxBlock() { + return GregTech_API.sBlockCasings2; + } + + public byte getGearboxMeta() { + return 3; + } + + public byte getCasingTextureIndex() { + return 50; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_LargeSemifluidGenerator(this.mName); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 1; + } + + public int getMaxEfficiency(ItemStack aStack) { + return boostEu ? 15000 : 10000; + } + + @Override + public int getPollutionPerSecond(ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiLargeSemiFluidGenerator; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return true; + } + + @Override + public String[] getExtraInfoData() { + return new String[]{ + "Large Semifluid Generator", + "Current Output: " + mEUt * mEfficiency / 10000 + " EU/t", + "Fuel Consumption: " + fuelConsumption + "L/t", + "Fuel Value: " + fuelValue + " EU/L", + "Fuel Remaining: " + fuelRemaining + " Litres", + "Current Efficiency: " + (mEfficiency / 100) + "%", + getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Semifluid Generator"; + } + + @Override + public int getMaxParallelRecipes() { + return 0; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java new file mode 100644 index 0000000000..f016288547 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java @@ -0,0 +1,425 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.ArrayList; +import java.util.Collection; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.*; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_MatterFab; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlockBase { + + public static int sUUAperUUM = 1; + public static int sUUASpeedBonus = 4; + public static int sDurationMultiplier = 3200; + + private int mMatterProduced = 0; + private int mScrapProduced = 0; + private int mAmplifierProduced = 0; + private int mScrapUsed = 0; + private int mAmplifierUsed = 0; + + public static String mCasingName1 = "Matter Fabricator Casing"; + public static String mCasingName2 = "Containment Casing"; + public static String mCasingName3 = "Matter Generation Coil"; + + private int mMode = 0; + + private final static int MODE_SCRAP = 1; + private final static int MODE_UU = 0; + + public static boolean sRequiresUUA = false; + private static FluidStack[] mUU = new FluidStack[2]; + private static ItemStack mScrap[] = new ItemStack[2]; + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public int getAmplifierUsed(){ + return this.mAmplifierUsed; + } + + public int getMatterProduced(){ + return this.mMatterProduced; + } + + public GregtechMetaTileEntity_MassFabricator(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); + mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); + } + + public GregtechMetaTileEntity_MassFabricator(final String aName) { + super(aName); + mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); + mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); + } + + @Override + public String getMachineType() { + return "Mass Fabricator / Recycler"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + + if (mCasingName1.toLowerCase().contains(".name")) { + mCasingName1 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 9); + } + if (mCasingName2.toLowerCase().contains(".name")) { + mCasingName2 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 15); + } + if (mCasingName3.toLowerCase().contains(".name")) { + mCasingName3 = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasingsMisc, 8); + } + + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Matter Fabricator") + .addInfo("Produces UU-A, UU-M & Scrap") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(5, 4, 5, true) + .addController("Front Center") + .addCasingInfo(mCasingName3, 9) + .addCasingInfo(mCasingName2, 24) + .addCasingInfo(mCasingName1, 40) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(9)), + new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_MatterFab_Active_Animated : TexturesGtBlock.Overlay_MatterFab_Animated)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(9))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "MatterFabricator"; + } + + public static ItemStack getScrapPile() { + if (mScrap[0] == null) { + mScrap[0] = ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrap")); + } + return mScrap[0]; + } + public static ItemStack getScrapBox() { + if (mScrap[1] == null) { + mScrap[1] = ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrapbox")); + } + return mScrap[1]; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_MatterFab(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png"); + } + + @Override + public void onConfigLoad(final GT_Config aConfig) { + super.onConfigLoad(aConfig); + sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier); + sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM); + sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus); + sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA); + //Materials.UUAmplifier.mChemicalFormula = ("Mass Fabricator Eff/Speed Bonus: x" + sUUASpeedBonus); + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + return checkRecipeGeneric(tItemInputs, tFluidInputs, 4, 80, 00, 100); + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"}, + {"CGGGC", "G---G", "G---G", "G---G", "CGGGC"}, + {"CGGGC", "G---G", "G---G", "G---G", "CGGGC"}, + {"CC~CC", "CHHHC", "CHHHC", "CHHHC", "CCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_MassFabricator::addMassFabricatorList, TAE.GTPP_INDEX(9), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasingsMisc, 9 + ) + ) + ) + ) + .addElement( + 'H', + ofBlock( + ModBlocks.blockCasingsMisc, 8 + ) + ) + .addElement( + 'G', + ofBlock( + ModBlocks.blockCasings3Misc, 15 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 2, 3, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 2, 3, 0) && mCasing >= 40 && checkHatch(); + } + + public final boolean addMassFabricatorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiMassFabricator; + } + + @Override + public int getAmountOfOutputs() { + return 10; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_MassFabricator(this.mName); + } + + public boolean doesHatchContainUUA() { + if (mUU[0] == null) { + mUU[0] = Materials.UUAmplifier.getFluid(100); + } + if (mUU[1] == null) { + mUU[1] = Materials.UUMatter.getFluid(100); + } + + if (mUU[0] != null && mUU[1] != null) { + for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { + if (g.getFluid() != null) { + if (g.mFluid.isFluidEqual(mUU[0])) { + return true; + } + } + } + } + + return false; + } + + + /** + * Special Recipe Handling + */ + + + @Override + public GT_Recipe_Map getRecipeMap() { + return this.mMode == MODE_SCRAP ? GT_Recipe_Map.sRecyclerRecipes : GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes; + //return Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes; + } + + @Override + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll) { + + if (this.mMode == MODE_SCRAP) { + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + GT_Recipe c = new GTPP_Recipe(false, new ItemStack[] { GT_Utility.copyAmount(1, aItemInputs[0]) }, + GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aItemInputs[0]), 0) == null ? null + : new ItemStack[] { ItemList.IC2_Scrap.get(1) }, + null, new int[] { 2000 }, null, null, 100, + (int) gregtech.api.enums.GT_Values.V[2], 0); + + // EU discount + float tRecipeEUt = (c.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!c.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + this.mEUt = (int) gregtech.api.enums.GT_Values.V[tTier]; + this.mMaxProgresstime = 10; + return true; + } + + return super.checkRecipeGeneric(c, getMaxParallelRecipes(), getEuDiscountForParallelism(), aSpeedBonusPercent, aOutputChanceRoll, true); + } + + //Return normal Recipe handling + return super.checkRecipeGeneric(aItemInputs, aFluidInputs, getMaxParallelRecipes(), getEuDiscountForParallelism(), aSpeedBonusPercent, aOutputChanceRoll, true); + } + + @Override + public int getMaxParallelRecipes() { + return this.mMode == MODE_SCRAP ? 32 : 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage()))); + } + + @Override + public int getEuDiscountForParallelism() { + return 80; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + int aMode = this.mMode + 1; + if (aMode > 1) { + this.mMode = MODE_UU; + PlayerUtils.messagePlayer(aPlayer, "Mode ["+this.mMode+"]: Matter/AmpliFabricator"); + } + else if (aMode == 1) { + this.mMode = MODE_SCRAP; + PlayerUtils.messagePlayer(aPlayer, "Mode ["+this.mMode+"]: Recycler"); + } + else { + this.mMode = MODE_SCRAP; + PlayerUtils.messagePlayer(aPlayer, "Mode ["+this.mMode+"]: Recycler"); + } + GT_Recipe_Map r = this.getRecipeMap(); + final Collection x = r.mRecipeList; + Logger.INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug. size: "+x.size()); + for (final GT_Recipe newBo : x) { + Logger.INFO("========================"); + Logger.INFO("Dumping Input: " + ItemUtils.getArrayStackNames(newBo.mInputs)); + Logger.INFO("Dumping Inputs " + ItemUtils.getFluidArrayStackNames(newBo.mFluidInputs)); + Logger.INFO("Dumping Duration: " + newBo.mDuration); + Logger.INFO("Dumping EU/t: " + newBo.mEUt); + Logger.INFO("Dumping Output: " + ItemUtils.getArrayStackNames(newBo.mOutputs)); + Logger.INFO("Dumping Output: " + ItemUtils.getFluidArrayStackNames(newBo.mFluidOutputs)); + Logger.INFO("========================"); + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mScrapProduced", mScrapProduced); + aNBT.setInteger("mAmplifierProduced", mAmplifierProduced); + aNBT.setInteger("mMatterProduced", mMatterProduced); + aNBT.setInteger("mScrapUsed", mScrapUsed); + aNBT.setInteger("mAmplifierUsed", mAmplifierUsed); + aNBT.setInteger("mMode", mMode); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mScrapProduced = aNBT.getInteger("mScrapProduced"); + mAmplifierProduced = aNBT.getInteger("mAmplifierProduced"); + mMatterProduced = aNBT.getInteger("mMatterProduced"); + mScrapUsed = aNBT.getInteger("mScrapUsed"); + mAmplifierUsed = aNBT.getInteger("mAmplifierUsed"); + mMode = aNBT.getInteger("mMode"); + super.loadNBTData(aNBT); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java new file mode 100644 index 0000000000..f86ecf3196 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java @@ -0,0 +1,238 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.item.ItemStack; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase { + + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_Refinery(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_Refinery(final String aName) { + super(aName); + } + + @Override + public String getMachineType() { + return "Fuel Refinery"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Fission Fuel Processing Unit") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(3, 9, 3, false) + .addController("Bottom Center") + .addCasingInfo("Hastelloy-X Structural Casing", 7) + .addCasingInfo("Incoloy-DS Fluid Containment Block", 5) + .addCasingInfo("Zeron-100 Reactor Shielding", 4) + .addCasingInfo("Hastelloy-N Sealant Blocks", 17) + .addInputHatch("Base platform", 1) + .addOutputHatch("Base platform", 1) + .addOutputBus("Base platform", 1) + .addMufflerHatch("Base platform", 1) + .addMaintenanceHatch("Base platform", 1) + .addEnergyHatch("Base platform", 1) + .addStructureInfo("Muffler's Tier must be LuV+") + .addStructureInfo("4x Input Hatches, 2x Output Hatches, 1x Output Bus") + .addStructureInfo("1x Muffler, 1x Maintenance Hatch, 1x Energy Hatch") + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(18)), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(18))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return "MatterFabricator"; + } + + @Override + public GT_Recipe_Map getRecipeMap() { + return GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + //this.resetRecipeMapForAllInputHatches(); + for (GT_MetaTileEntity_Hatch_Input g : this.mInputHatches) { + g.mRecipeMap = null; + } + boolean ab = super.checkRecipeGeneric(); + //Logger.INFO("Did Recipe? "+ab); + return ab; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + public final boolean addRefineryList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 6) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {" ", " N ", " "}, + {" N ", "NIN", " N "}, + {" N ", "NIN", " N "}, + {" N ", "NIN", " N "}, + {" Z ", "ZIZ", " Z "}, + {" N ", "NIN", " N "}, + {"XXX", "XXX", "XXX"}, + {"X~X", "XXX", "XXX"}, + })) + .addElement( + 'X', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_Refinery::addRefineryList, TAE.GTPP_INDEX(18), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 2 + ) + ) + ) + ) + .addElement( + 'I', + ofBlock( + ModBlocks.blockCasings2Misc, 3 + ) + ) + .addElement( + 'N', + ofBlock( + ModBlocks.blockCasings2Misc, 1 + ) + ) + .addElement( + 'Z', + ofBlock( + ModBlocks.blockCasingsMisc, 13 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 1, 7, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + if (checkPiece(mName, 1, 7, 0) && mCasing >= 7) { + if (this.mInputHatches.size() == 4 && this.mOutputHatches.size() == 2 && + this.mOutputBusses.size() == 1 && this.mMufflerHatches.size() == 1 && + this.mMaintenanceHatches.size() == 1 && this.mEnergyHatches.size() == 1) { + this.resetRecipeMapForAllInputHatches(this.getRecipeMap()); + return true; + } + } + return false; + } + + @Override + public boolean isCorrectMachinePart(final ItemStack aStack) { + return true; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiRefinery; + } + + @Override + public int getDamageToComponent(final ItemStack aStack) { + return 0; + } + + public int getAmountOfOutputs() { + return 5; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_Refinery(this.mName); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java new file mode 100644 index 0000000000..d42b33a403 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java @@ -0,0 +1,702 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.tileentities.misc.TileEntitySolarHeater; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class GregtechMetaTileEntity_SolarTower +extends GregtechMeta_MultiBlockBase { + + //862 + private static final int mCasingTextureID = TAE.getIndexFromPage(3, 4); + public static String mCasingName = ""; + private int mHeight = 0; + private int mHeatLevel = 0; + + public GregtechMetaTileEntity_SolarTower(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 4); + } + + public GregtechMetaTileEntity_SolarTower(final String aName) { + super(aName); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 4); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_SolarTower(this.mName); + } + + @Override + public String getMachineType() { + return "Solar Tower"; + } + + @Override + public String[] getTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 4); + } + return new String[]{ + "Contributing Green Energy towards the future", + mCasingName+"s for the base of the tower", + }; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(212)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == 0 || aSide == 1) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 6)), + new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 6))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return aFacing <= 1; + } + + private Set mCachedReflectors = new HashSet(); + + public Set getConnectedSolarReflectors(){ + Set mValidTilePositions = new HashSet(); + IGregTechTileEntity tTileEntity; + Map mFastMap = new HashMap(); + for (int x = -64; x <= 64; x++) { + for (int z = -64; z <= 64; z++) { + int aX, aY, aZ; + aX = this.getBaseMetaTileEntity().getXCoord(); + aY = this.mHeight; + aZ = this.getBaseMetaTileEntity().getZCoord(); + BlockPos b = new BlockPos(aX+x, aY, aZ+z, this.getBaseMetaTileEntity().getWorld()); + + tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(aX + x, this.mHeight, aZ + z); + if (tTileEntity == null) { + continue; + } + else { + Logger.INFO("Found Tile Entity at "+b.getLocationString()); + if (tTileEntity.getMetaTileEntity() instanceof TileEntitySolarHeater) { + TileEntitySolarHeater mTile = (TileEntitySolarHeater) tTileEntity.getMetaTileEntity(); + if (mTile != null) { + b = new BlockPos(tTileEntity.getXCoord(), tTileEntity.getYCoord(), tTileEntity.getZCoord(), tTileEntity.getWorld()); + if (!mTile.mHasTower || mTile.mSolarTower == null) { + Logger.INFO("Found Solar Reflector, Injecting Data."); + mTile.setSolarTower(b); + } + mFastMap.put(b.getUniqueIdentifier(), b); + } + } + else { + continue; + } + } + + if (addToMachineList(tTileEntity, mCasingTextureID)) { + continue; + } + } + } + + for (BlockPos p : mFastMap.values()) { + if (mValidTilePositions.add(p.getUniqueIdentifier())); + } + mCachedReflectors = mValidTilePositions; + return mCachedReflectors; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + //this.mEfficiencyIncrease = 100; + //this.mMaxProgresstime = 100; + //this.mEUt = -4; + return true; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public void startProcess() { + this.sendLoopStart((byte) 1); + } + + @Override + public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { + this.mHeight = 0; + for (int i = 0; i <= 19; i++) { + if (!checkLayer(i)) { + Logger.INFO("Invalid Structure on Y level "+i); + return false; + } + } + if (mMaintenanceHatches.size() != 1) { + Logger.INFO("Bad Hatches"); + return false; + } + + this.mHeight = this.getBaseMetaTileEntity().getYCoord() - 19; + Logger.INFO("Built Structure"); + if (!aBaseMetaTileEntity.getWorld().isRemote) + getConnectedSolarReflectors(); + return true; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 0; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings4Misc; + } + + + public byte getCasingMeta() { + return 4; + } + + + public byte getCasingMeta2() { + return 5; + } + + + public byte getCasingMeta3() { + return 6; + } + + public boolean isValidCasingBlock(Block aBlock, int aMeta) { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta()) { + return true; + } + if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { + return true; + } + if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { + return true; + } + Logger.INFO("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + "With Meta "+aMeta); + return false; + } + + public byte getCasingTextureIndex() { + return (byte) mCasingTextureID; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (this.mHeight > 3) {} + + + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mHeight", mHeight); + aNBT.setInteger("mHeatLevel", mHeatLevel); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mHeight = aNBT.getInteger("mHeight"); + mHeatLevel = aNBT.getInteger("mHeatLevel"); + } + + public boolean checkLayer(int aY) { + if (aY >= 0 && aY <= 6) { + return checkTopLayers(-aY); + } + if (aY >= 7 && aY <= 16) { + return checkTowerLayer(-aY); + } + else if (aY >= 17 && aY <= 19) { + return checkBaseLayer(-aY); + } + Logger.INFO("Bad Y level to check"); + return false; + } + + public boolean checkTopLayers(int aY) { + Block aBlock; + int aMeta; + + if (aY == 0) { + return true; + } else if (aY == -1) { + for (int x = -1; x <= 1; x++) { + for (int z = -1; z <= 1; z++) { + aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + } else if (aY == -2 || aY == -6) { + for (int x = -2; x <= 2; x++) { + for (int z = -2; z <= 2; z++) { + aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + //Edge Casing + if (x == -2 || x == 2 || z == -2 || z == 2) { + //Edge Corners + if ((x == 2 || x == -2) && (z == 2 | z == -2)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + else { + continue; + } + } + else { + //Edge Sides + if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + + //Internal + else { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + } + } + //Top Layers 7x7 + else if (aY == -3 || aY == -5) { + for (int x = -3; x <= 3; x++) { + for (int z = -3; z <= 3; z++) { + aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + //Edge Casing + if (x == -3 || x == 3 || z == -3 || z == 3) { + + //3, 3 + //2, 3 + //3, 2 + + //Air Spacing + if (x == 3 && (z == -3 || z == -2 || z == 2 || z == 3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + else { + continue; + } + } + else if (x == -3 && (z == -3 || z == -2 || z == 2 || z == 3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + else { + continue; + } + } + else if (z == 3 && (x == -3 || x == -2 || x == 2 || x == 3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + else { + continue; + } + } + else if (z == -3 && (x == -3 || x == -2 || x == 2 || x == 3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Outside Corner "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + else { + continue; + } + } + else { + //Edge Sides + if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + else if ((x == -2 || x == 2) & (z == -2 || z == 2)) { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta3()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + //Internal + else { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + } + } + //Midle Top Layer 9x9 + else if (aY == -4) { + //Check Inner 5x5 + for (int x = -2; x <= 2; x++) { + for (int z = -2; z <= 2; z++) { + if (getBaseMetaTileEntity().getBlockOffset(x, aY, z) != getCasingBlock() && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z) != getCasingMeta2()) { + Logger.INFO("Error at offset: X:" + x + ", Y:" + aY + ", Z:" + z); + return false; + } + else { + continue; + } + } + } + //Check Pos Sides + for (int z = -1; z <= -1; z++) { + if (getBaseMetaTileEntity().getBlockOffset(3, aY, z) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(3, aY, z) == getCasingMeta2()) { + continue; + } else if (getBaseMetaTileEntity().getBlockOffset(-3, aY, z) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(-3, aY, z) == getCasingMeta2()) { + continue; + } else { + Logger.INFO("1 Error at offset: X:3/-3" + ", Y:" + aY + ", Z:" + z); + return false; + } + + } + for (int x = -1; x <= -1; x++) { + if (getBaseMetaTileEntity().getBlockOffset(x, aY, 3) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, 3) == getCasingMeta2()) { + continue; + } else if (getBaseMetaTileEntity().getBlockOffset(x, aY, -3) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, -3) == getCasingMeta2()) { + continue; + } else { + Logger.INFO("1 Error at offset: X:" + x + ", Y:" + aY + ", Z:3/-3"); + return false; + } + } + + //Corner Casings + for (int z = -2; z <= -2; z++) { + if (z == -2 || z == 2) { + if (getBaseMetaTileEntity().getBlockOffset(3, aY, z) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(3, aY, z) == getCasingMeta3()) { + continue; + } else if (getBaseMetaTileEntity().getBlockOffset(-3, aY, z) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(-3, aY, z) == getCasingMeta3()) { + continue; + } else { + Logger.INFO("2 Error at offset: X:3/-3" + ", Y:" + aY + ", Z:" + z); + return false; + } + } + } + for (int x = -2; x <= -2; x++) { + if (x == -2 || x == 2) { + if (getBaseMetaTileEntity().getBlockOffset(x, aY, 3) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, 3) == getCasingMeta3()) { + continue; + } else if (getBaseMetaTileEntity().getBlockOffset(x, aY, -3) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, -3) == getCasingMeta3()) { + continue; + } else { + Logger.INFO("2 Error at offset: X:" + x + ", Y:" + aY + ", Z:3/-3"); + return false; + } + } + } + //Check Sides Casings + for (int z = -1; z <= -1; z++) { + if (getBaseMetaTileEntity().getBlockOffset(4, aY, z) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(4, aY, z) == getCasingMeta3()) { + continue; + } else if (getBaseMetaTileEntity().getBlockOffset(-4, aY, z) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(-4, aY, z) == getCasingMeta3()) { + continue; + } else { + Logger.INFO("1 Error at offset: X:3/-3" + ", Y:" + aY + ", Z:" + z); + return false; + } + + } + for (int x = -1; x <= -1; x++) { + if (getBaseMetaTileEntity().getBlockOffset(x, aY, 4) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, 4) == getCasingMeta3()) { + continue; + } else if (getBaseMetaTileEntity().getBlockOffset(x, aY, -4) == getCasingBlock() + && this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, -4) == getCasingMeta3()) { + continue; + } else { + Logger.INFO("1 Error at offset: X:" + x + ", Y:" + aY + ", Z:3/-3"); + return false; + } + } + } + return true; + } + + public boolean checkTowerLayer(int aY) { + Block aBlock; + int aMeta; + for (int x = -1; x <= 1; x++) { + for (int z = -1; z <= 1; z++) { + aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + if (x == -1 || x == 1 || z == -1 || z == 1) { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block Externally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } else { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta2()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + } + return true; + } + + public boolean checkBaseLayer(int aY) { + Block aBlock; + int aMeta; + + int requiredMeta = getCasingMeta2(); + if (aY == -19) { + requiredMeta = getCasingMeta(); + } + + for (int x = -3; x <= 3; x++) { + for (int z = -3; z <= 3; z++) { + aBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + aMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + + if ((x == 3 && z == 3) || (x == 2 && z == 2) || (x == 3 && z == 2) || (x == 2 && z == 3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + return false; + } + } + else if ((x == -3 && z == -3) || (x == -2 && z == -2) || (x == -3 && z == -2) || (x == -2 && z == -3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + return false; + } + } + else if ((x == -3 && z == 3) || (x == -2 && z == 2) || (x == -3 && z == 2) || (x == -2 && z == 3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + return false; + } + } + else if ((x == 3 && z == -3) || (x == 2 && z == -2) || (x == 3 && z == -2) || (x == 2 && z == -3)) { + if (!getBaseMetaTileEntity().getAirOffset(x, aY, z)) { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + return false; + } + } + else { + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (addToMachineList(tTileEntity, mCasingTextureID)) { + continue; + } + if (x == 0 && z == 0) { + if (aBlock == getCasingBlock() && aMeta == requiredMeta) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + else { + if (aBlock == getCasingBlock() && aMeta == getCasingMeta()) { + continue; + } else { + Logger.INFO("Error at offset: X:"+x+", Y:"+aY+", Z:"+z); + Logger.INFO("Found Bad Block Internally on Layer "+aY+": "+(aBlock != null ? aBlock.getLocalizedName() : "Air")+" | Meta: "+aMeta); + return false; + } + } + } + } + } + return true; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + //Add Heat every second + if (aTick % 20 == 0) { + + //Add Heat First, if sources available + int aCacheSize = this.mCachedReflectors.size(); + if (aCacheSize > 0) { + int aCount = aCacheSize; + for (int i = 0; i < aCount; i++) { + this.mHeatLevel++; + } + } + + //Remove Heat, based on time of day + World w = this.getBaseMetaTileEntity().getWorld(); + if (w != null) { + int aRemovalFactor = 0; + if (w.isDaytime()) { + aRemovalFactor = 1; + } + else { + aRemovalFactor = 3; + } + for (int i = 0; i STRUCTURE_DEFINITION = null; + private int checkMeta; + + public GregtechMTE_AlgaePondBase(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMTE_AlgaePondBase(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMTE_AlgaePondBase(this.mName); + } + + @Override + public String getMachineType() { + return "Algae Pond"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Grows Algae!") + .addInfo("Controller Block for the Algae Farm") + .addInfo("Provide compost to boost production by one tier") + .addInfo("Does not require power or maintenance") + .addInfo("All Machine Casings must be the same tier, this dictates machine speed.") + .addInfo("Fill Input Hatch with water.") + .addPollutionAmount(getPollutionPerSecond(null)) + .addSeparator() + .beginStructureBlock(9, 3, 9, true) + .addController("Front Center") + .addCasingInfo("Machine Casings", 64) + .addCasingInfo("Sterile Farm Casings", 34) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + public void setMeta(int meta) { + checkMeta = meta; + } + + public int getMeta() { + return checkMeta; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"XXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, + {"XXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXX"}, + {"CCCC~CCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMTE_AlgaePondBase::addAlgaePondBaseList, TAE.getIndexFromPage(1, 15), 1 + ), + onElementPass( + x -> ++x.mCasing, + addTieredBlock( + GregTech_API.sBlockCasings1, GregtechMTE_AlgaePondBase::setMeta, GregtechMTE_AlgaePondBase::getMeta, 10 + ) + ) + ) + ) + .addElement( + 'X', + ofBlock( + ModBlocks.blockCasings2Misc, 15 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 4, 2, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mLevel = 0; + checkMeta = 0; + if (checkPiece(mName, 4, 2, 0) && mCasing >= 64 && checkMeta > 0) { + mLevel = checkMeta - 1; + return true; + } + return false; + } + + public final boolean addAlgaePondBaseList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + }else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + // fuck + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(207)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + + int aID = TAE.getIndexFromPage(1, 15); + if (mLevel > -1) { + aID = mLevel; + } + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(aID)}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + @Override + public int getMaxParallelRecipes() { + return 2; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + public boolean checkForWater() { + + // Get Facing direction + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int mCurrentDirectionX; + int mCurrentDirectionZ; + int mOffsetX_Lower = 0; + int mOffsetX_Upper = 0; + int mOffsetZ_Lower = 0; + int mOffsetZ_Upper = 0; + + mCurrentDirectionX = 4; + mCurrentDirectionZ = 4; + + mOffsetX_Lower = -4; + mOffsetX_Upper = 4; + mOffsetZ_Lower = -4; + mOffsetZ_Upper = 4; + + // if (aBaseMetaTileEntity.fac) + + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX + * mCurrentDirectionX; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ + * mCurrentDirectionZ; + + int tAmount = 0; + for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) { + for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { + for (int h = 0; h < 2; h++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + // byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) { + if (this.getStoredFluids() != null) { + for (FluidStack stored : this.getStoredFluids()) { + if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) { + if (stored.amount >= 1000) { + // Utils.LOG_WARNING("Going to try swap an air block for water from inut bus."); + stored.amount -= 1000; + Block fluidUsed = Blocks.water; + aBaseMetaTileEntity.getWorld().setBlock( + aBaseMetaTileEntity.getXCoord() + xDir + i, + aBaseMetaTileEntity.getYCoord() + h, + aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed); + + } + } + } + } + } + tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + if (tBlock == Blocks.water || tBlock == Blocks.flowing_water) { + ++tAmount; + // Logger.INFO("Found Water"); + } + } + } + } + + boolean isValidWater = tAmount >= 60; + + if (isValidWater) { + Logger.INFO("Filled structure."); + return true; + } + else { + return false; + } + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerSecond(final ItemStack aStack) { + return CORE.ConfigSwitches.pollutionPerSecondMultiAlgaePond; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + this.fixAllMaintenanceIssue(); + // Silly Client Syncing + if (aBaseMetaTileEntity.isClientSide()) { + this.mLevel = getCasingTier(); + } + + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); + } + + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { + + if (this.mLevel < 0) { + Logger.INFO("Bad Tier."); + return false; + } + + if (!checkForWater()) { + Logger.INFO("Not enough Water."); + return false; + } + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + Logger.INFO("Running checkRecipeGeneric(0)"); + + GT_Recipe tRecipe = RecipeLoader_AlgaeFarm.getTieredRecipeFromCache(this.mLevel, isUsingCompost(aItemInputs)); + + this.mLastRecipe = tRecipe; + + if (tRecipe == null) { + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + return false; + } + if (tRecipe.mInputs.length > 0) { + for (ItemStack aInputToConsume : tRecipe.mInputs) { + this.depleteInput(aInputToConsume); + } + } + + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + this.mMaxProgresstime = (int)(tRecipe.mDuration); + this.mEUt = 0; + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + Logger.INFO("Recipe time: "+this.mMaxProgresstime); + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= aMaxParallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < aMaxParallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + Logger.INFO("GOOD RETURN - 1"); + return true; + + } + + private boolean isUsingCompost(ItemStack[] aItemInputs) { + ItemStack aCompost = ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 1); + for (ItemStack i : aItemInputs) { + if (GT_Utility.areStacksEqual(aCompost, i)) { + if (i.stackSize >= 8) { + return true; + } + } + } + return false; + } + + + private int getCasingTier() { + if (this.getBaseMetaTileEntity().getWorld() == null) { + return 0; + } + try { + Block aInitStructureCheck; + int aInitStructureCheckMeta; + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(xDir, -1, zDir); + aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, zDir); + if (aInitStructureCheck == GregTech_API.sBlockCasings1) { + return aInitStructureCheckMeta; + } + return 0; + } + catch (Throwable t) { + t.printStackTrace(); + return 0; + } + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java new file mode 100644 index 0000000000..018120d614 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java @@ -0,0 +1,46 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; + +import gregtech.api.enums.TAE; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.Material; + +public class GregtechMetaTileEntity_BedrockMiningPlatform1 extends GregtechMetaTileEntity_BedrockMiningPlatformBase { + public GregtechMetaTileEntity_BedrockMiningPlatform1(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_BedrockMiningPlatform1(final String aName) { + super(aName); + } + + public String[] getTooltip() { + return this.getDescriptionInternal("I"); + } + + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (IMetaTileEntity) new GregtechMetaTileEntity_BedrockMiningPlatform1(this.mName); + } + + protected Material getFrameMaterial() { + return ALLOY.INCONEL_690; + } + + protected int getCasingTextureIndex() { + return TAE.getIndexFromPage(0, 14); + } + + protected int getRadiusInChunks() { + return 9; + } + + protected int getMinTier() { + return 5; + } + + protected int getBaseProgressTime() { + return (int) (420*(this.mProductionModifier/100)); + } +}*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java new file mode 100644 index 0000000000..6b97cb7ee2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java @@ -0,0 +1,46 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; + +public class GregtechMetaTileEntity_BedrockMiningPlatform2 extends GregtechMetaTileEntity_BedrockMiningPlatformBase { + public GregtechMetaTileEntity_BedrockMiningPlatform2(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_BedrockMiningPlatform2(final String aName) { + super(aName); + } + + public String[] getTooltip() { + return this.getDescriptionInternal("II"); + } + + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return (IMetaTileEntity) new GregtechMetaTileEntity_BedrockMiningPlatform2(this.mName); + } + + protected Material getFrameMaterial() { + return ELEMENT.getInstance().AMERICIUM241; + } + + protected int getCasingTextureIndex() { + return 62; + } + + protected int getRadiusInChunks() { + return 9; + } + + protected int getMinTier() { + return 5; + } + + protected int getBaseProgressTime() { + return 480; + } +}*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java new file mode 100644 index 0000000000..05a05d53e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java @@ -0,0 +1,683 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Worldgen_GT_Ore_Layer; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.ORES; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MiningUtils; +import gtPlusPlus.core.util.minecraft.OreDictUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; + +public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends GregtechMeta_MultiBlockBase { + + protected double mProductionModifier = 0; + + + private static final ItemStack miningPipe; + private static final ItemStack miningPipeTip; + + private Block casingBlock; + private int casingMeta; + // private int frameMeta; + private int casingTextureIndex; + + private ForgeDirection back; + + private int xDrill; + private int yDrill; + private int zDrill; + + private int[] xCenter = new int[5]; + private int[] zCenter = new int[5]; + + public GregtechMetaTileEntity_BedrockMiningPlatformBase(final int aID, final String aName, + final String aNameRegional) { + super(aID, aName, aNameRegional); + this.initFields(); + } + + public GregtechMetaTileEntity_BedrockMiningPlatformBase(final String aName) { + super(aName); + this.initFields(); + } + + private void initFields() { + this.casingBlock = this.getCasingBlockItem().getBlock(); + this.casingMeta = this.getCasingBlockItem().get(0L, new Object[0]).getItemDamage(); + this.casingTextureIndex = this.getCasingTextureIndex(); + } + + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(this.casingTextureIndex), + new GT_RenderedTexture( + (IIconContainer) (aActive ? Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE + : Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT)) }; + } + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(this.casingTextureIndex) }; + } + + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), + "OreDrillingPlant.png"); + } + + + public int getAmountOfOutputs() { + return 1; + } + + public void saveNBTData(final NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setDouble("mProductionModifier", mProductionModifier); + } + + public void loadNBTData(final NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.mProductionModifier = aNBT.getDouble("mProductionModifier"); + } + + public boolean checkRecipe(final ItemStack aStack) { + //this.setElectricityStats(); + + + if (true) { + return false; + } + + boolean[] didWork = new boolean[5]; + + if (!this.tryConsumeDrillingFluid()) { + Logger.INFO("No drilling Fluid."); + return false; + } + + if (MathUtils.isNumberEven((int) this.mProductionModifier)) { + if (!this.tryConsumePyrotheum()) { + Logger.INFO("No tryConsumePyrotheum Fluid."); + return false; + } + else { + mProductionModifier++; + } + } + else { + if (!this.tryConsumeCryotheum()) { + Logger.INFO("No tryConsumeCryotheum Fluid."); + return false; + } + else { + mProductionModifier++; + } + } + + for (int i = 0; i < 5; i++) { + process(); + didWork[i] = true; + } + + // Fail recipe handling if one pipe didn't handle properly, to try again + // next run. + for (boolean y : didWork) { + if (!y) { + Logger.INFO("[Bedrock Miner] Fail [x]"); + return false; + } + } + + this.mEUt = -8000; + this.mMaxProgresstime = 1; + this.mEfficiencyIncrease = 10000; + + return true; + } + + private boolean isEnergyEnough() { + long requiredEnergy = 512L + this.getMaxInputVoltage() * 4L; + for (final GT_MetaTileEntity_Hatch_Energy energyHatch : this.mEnergyHatches) { + requiredEnergy -= energyHatch.getEUVar(); + if (requiredEnergy <= 0L) { + return true; + } + } + return false; + } + + private void setElectricityStats() { + //this.mEfficiency = this.getCurrentEfficiency((ItemStack) null); + this.mEfficiencyIncrease = 10000; + final int overclock = 8 << GT_Utility.getTier(this.getMaxInputVoltage()); + //this.mEUt = -12 * overclock * overclock; + Logger.INFO("Trying to set EU to "+(12 * overclock * overclock)); + int mCombinedAvgTime = 0; + for (int g = 0; g < 5; g++) { + mCombinedAvgTime += this.getBaseProgressTime() / overclock; + } + Logger.INFO("Trying to set Max Time to "+(mCombinedAvgTime)); + //this.mMaxProgresstime = (mCombinedAvgTime / 5); + } + + private boolean tryConsumeDrillingFluid() { + boolean consumed = false; + boolean g = (this.getBaseMetaTileEntity().getWorld().getTotalWorldTime() % 2 == 0); + consumed = (g ? tryConsumePyrotheum() : tryConsumeCryotheum()); + if (consumed) { + //increaseProduction(g ? 2 : 1); + } + else { + //lowerProduction(g ? 5 : 3); + } + return consumed; + } + + private boolean tryConsumePyrotheum() { + return this.depleteInput(FluidUtils.getFluidStack("pyrotheum", 4)); + } + + private boolean tryConsumeCryotheum() { + return this.depleteInput(FluidUtils.getFluidStack("cryotheum", 4)); + } + + private void putMiningPipesFromInputsInController() { + final int maxPipes = 64; + if (this.isHasMiningPipes(maxPipes)) { + return; + } + ItemStack pipes = this.getStackInSlot(1); + for (final ItemStack storedItem : this.getStoredInputs()) { + if (!storedItem.isItemEqual(GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe)) { + continue; + } + if (pipes == null) { + this.setInventorySlotContents(1, + GT_Utility.copy(new Object[] { GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe })); + pipes = this.getStackInSlot(1); + } + if (pipes.stackSize == maxPipes) { + break; + } + final int needPipes = maxPipes - pipes.stackSize; + final int transferPipes = (storedItem.stackSize < needPipes) ? storedItem.stackSize : needPipes; + final ItemStack itemStack = pipes; + itemStack.stackSize += transferPipes; + final ItemStack itemStack2 = storedItem; + itemStack2.stackSize -= transferPipes; + } + this.updateSlots(); + } + + + + private boolean isHasMiningPipes(final int minCount) { + final ItemStack pipe = this.getStackInSlot(1); + return pipe != null && pipe.stackSize > minCount - 1 + && pipe.isItemEqual(GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe); + } + + public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { + this.updateCoordinates(); + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + int tAmount = 0; + if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { + return false; + } else { + + Block aCasing = Block.getBlockFromItem(getCasingBlockItem().getItem()); + + for (int i = -1; i < 2; ++i) { + for (int j = -1; j < 2; ++j) { + for (int h = -1; h < 2; ++h) { + if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, + h, zDir + j); + Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + + if (!this.addToMachineList(tTileEntity, 48)) { + if (aBlock != aCasing) { + Logger.INFO("Found Bad Casing"); + return false; + } + if (aMeta != 3) { + Logger.INFO("Found Bad Meta"); + return false; + } + } + ++tAmount; + + + + /*if (!isValidBlockForStructure(tTileEntity, 48, true, aBlock, aMeta, sBlockCasings4, 0)) { + Logger.INFO("Bad centrifuge casing"); + return false; + }*/ + + } + } + } + } + return tAmount >= 10; + } + + } + + private void updateCoordinates() { + this.xDrill = this.getBaseMetaTileEntity().getXCoord(); + this.yDrill = this.getBaseMetaTileEntity().getYCoord()-1; + this.zDrill = this.getBaseMetaTileEntity().getZCoord(); + this.back = ForgeDirection.getOrientation((int) this.getBaseMetaTileEntity().getBackFacing()); + + // Middle + this.xCenter[0] = this.xDrill + this.back.offsetX; + this.zCenter[0] = this.zDrill + this.back.offsetZ; + + this.xCenter[1] = xCenter[0] + 1; + this.zCenter[1] = zCenter[0]; + + this.xCenter[2] = xCenter[0] - 1; + this.zCenter[2] = zCenter[0]; + + this.xCenter[3] = xCenter[0]; + this.zCenter[3] = zCenter[0] + 1; + + this.xCenter[4] = xCenter[0]; + this.zCenter[4] = zCenter[0] - 1; + + } + + public boolean isCorrectMachinePart(final ItemStack aStack) { + return true; + } + + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + public int getPollutionPerTick(final ItemStack aStack) { + return 0; + } + + public int getDamageToComponent(final ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + protected GregtechItemList getCasingBlockItem() { + return GregtechItemList.Casing_BedrockMiner; + } + + protected abstract Material getFrameMaterial(); + + protected abstract int getCasingTextureIndex(); + + protected abstract int getRadiusInChunks(); + + protected abstract int getMinTier(); + + protected abstract int getBaseProgressTime(); + + protected String[] getDescriptionInternal(final String tierSuffix) { + final String casings = this.getCasingBlockItem().get(0L, new Object[0]).getDisplayName(); + return new String[] { + "Controller Block for the Experimental Deep Earth Drilling Platform - MK " + + ((tierSuffix != null) ? tierSuffix : ""), + "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", "3x1x3 Base of " + casings, + "1x3x1 " + casings + " pillar (Center of base)", + "1x3x1 " + this.getFrameMaterial().getLocalizedName() + " Frame Boxes (Each pillar side and on top)", + "2x Input Hatch (Any bottom layer casing)", + "1x Input Bus for mining pipes (Any bottom layer casing; not necessary)", + "1x Output Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", + "1x " + GT_Values.VN[this.getMinTier()] + "+ Energy Hatch (Any bottom layer casing)", + "Radius is " + (this.getRadiusInChunks() << 4) + " blocks", + "Every tick, this machine altenates betweem consumption of Pyrotheum & Cryotheum", + "Pyrotheum is used to bore through the Mantle of the world", + "Cryotheum is used to keep the internal components cool",}; + } + + static { + miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0L); + miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0L); + } + + + + + + + + + + + + + + + + + + + + + + + + + + private AutoMap mOutputs; + + public void process() { + ItemStack aOutput = generateOutputWithchance(); + if (aOutput != null) { + this.addOutput(aOutput); + Logger.INFO("Mined some "+aOutput.getDisplayName()); + } + this.updateSlots(); + } + + public ItemStack generateOutputWithchance() { + int aChance = MathUtils.randInt(0, 7500); + if (aChance < 100) { + return generateOutput(); + } + else { + return null; + } + } + + public ItemStack generateOutput() { + AutoMap aData = generateOreForOutput(); + int aMax = aData.size()-1; + return aData.get(MathUtils.randInt(0, aMax)); + } + + /** + * Here we generate valid ores and also a basic loot set + */ + + public AutoMap generateOreForOutput() { + + if (mOutputs != null) { + return mOutputs; + } + + AutoMap aOverWorldOres = MiningUtils.getOresForDim(0); + AutoMap aNetherOres = MiningUtils.getOresForDim(-1); + AutoMap aEndOres = MiningUtils.getOresForDim(1); + + AutoMap aTempMap = new AutoMap(); + Block tOreBlock = GregTech_API.sBlockOres1; + Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Initial]"); + + for (GT_Worldgen_GT_Ore_Layer layer : aOverWorldOres) { + if (layer.mEnabled) { + ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1); + ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1); + ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1); + ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1); + aTempMap.put(aTempOreStack1); + aTempMap.put(aTempOreStack2); + aTempMap.put(aTempOreStack3); + aTempMap.put(aTempOreStack4); + aTempMap.put(aTempOreStack1); + aTempMap.put(aTempOreStack2); + aTempMap.put(aTempOreStack3); + aTempMap.put(aTempOreStack4); + aTempMap.put(aTempOreStack1); + aTempMap.put(aTempOreStack2); + aTempMap.put(aTempOreStack3); + aTempMap.put(aTempOreStack4); + } + } + Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Overworld]"); + for (GT_Worldgen_GT_Ore_Layer layer : aNetherOres) { + if (layer.mEnabled) { + ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1); + ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1); + ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1); + ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1); + aTempMap.put(aTempOreStack1); + aTempMap.put(aTempOreStack2); + aTempMap.put(aTempOreStack3); + aTempMap.put(aTempOreStack4); + aTempMap.put(aTempOreStack1); + aTempMap.put(aTempOreStack2); + aTempMap.put(aTempOreStack3); + aTempMap.put(aTempOreStack4); + } + } + Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Nether]"); + for (GT_Worldgen_GT_Ore_Layer layer : aEndOres) { + if (layer.mEnabled) { + ItemStack aTempOreStack1 = ItemUtils.simpleMetaStack(tOreBlock, layer.mPrimaryMeta, 1); + ItemStack aTempOreStack2 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSecondaryMeta, 1); + ItemStack aTempOreStack3 = ItemUtils.simpleMetaStack(tOreBlock, layer.mBetweenMeta, 1); + ItemStack aTempOreStack4 = ItemUtils.simpleMetaStack(tOreBlock, layer.mSporadicMeta, 1); + aTempMap.put(aTempOreStack1); + aTempMap.put(aTempOreStack2); + aTempMap.put(aTempOreStack3); + aTempMap.put(aTempOreStack4); + } + } + Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [End]"); + + addOreTypeToMap(ELEMENT.getInstance().IRON, 200, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().COPPER, 175, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().TIN, 150, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().GOLD, 150, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().SILVER, 110, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().NICKEL, 40, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().ZINC, 40, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().LEAD, 40, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().ALUMINIUM, 30, aTempMap); + addOreTypeToMap(ELEMENT.getInstance().THORIUM, 20, aTempMap); + Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [Extra Common Ores]"); + + AutoMap> mMixedOreData = new AutoMap>(); + mMixedOreData.put(new Pair("oreRuby", 30)); + mMixedOreData.put(new Pair("oreSapphire", 25)); + mMixedOreData.put(new Pair("oreEmerald", 25)); + mMixedOreData.put(new Pair("oreLapis", 40)); + mMixedOreData.put(new Pair("oreRedstone", 40)); + + if (LoadedMods.Thaumcraft || (OreDictUtils.containsValidEntries("oreAmber") && OreDictUtils.containsValidEntries("oreCinnabar"))) { + mMixedOreData.put(new Pair("oreAmber", 20)); + mMixedOreData.put(new Pair("oreCinnabar", 20)); + } + if (LoadedMods.Railcraft || OreDictUtils.containsValidEntries("oreSaltpeter")) { + mMixedOreData.put(new Pair("oreSaltpeter", 10)); + } + if (LoadedMods.IndustrialCraft2 || OreDictUtils.containsValidEntries("oreUranium")) { + mMixedOreData.put(new Pair("oreUranium", 10)); + } + if (OreDictUtils.containsValidEntries("oreSulfur")) { + mMixedOreData.put(new Pair("oreSulfur", 15)); + } + if (OreDictUtils.containsValidEntries("oreSilicon")) { + mMixedOreData.put(new Pair("oreSilicon", 15)); + } + if (OreDictUtils.containsValidEntries("oreApatite")) { + mMixedOreData.put(new Pair("oreApatite", 25)); + } + + mMixedOreData.put(new Pair("oreFirestone", 2)); + mMixedOreData.put(new Pair("oreBismuth", 20)); + mMixedOreData.put(new Pair("oreLithium", 20)); + mMixedOreData.put(new Pair("oreManganese", 20)); + mMixedOreData.put(new Pair("oreBeryllium", 20)); + mMixedOreData.put(new Pair("oreCoal", 75)); + mMixedOreData.put(new Pair("oreLignite", 75)); + mMixedOreData.put(new Pair("oreSalt", 15)); + mMixedOreData.put(new Pair("oreCalcite", 15)); + mMixedOreData.put(new Pair("oreBauxite", 20)); + mMixedOreData.put(new Pair("oreAlmandine", 15)); + mMixedOreData.put(new Pair("oreGraphite", 25)); + mMixedOreData.put(new Pair("oreGlauconite", 15)); + mMixedOreData.put(new Pair("orePyrolusite", 15)); + mMixedOreData.put(new Pair("oreGrossular", 15)); + mMixedOreData.put(new Pair("oreTantalite", 15)); + + for (Pair g : mMixedOreData) { + for (int i=0; i aMyOreMaterials = new AutoMap(); + aMyOreMaterials.add(ORES.CROCROITE); + aMyOreMaterials.add(ORES.GEIKIELITE); + aMyOreMaterials.add(ORES.NICHROMITE); + aMyOreMaterials.add(ORES.TITANITE); + aMyOreMaterials.add(ORES.ZIMBABWEITE); + aMyOreMaterials.add(ORES.ZIRCONILITE); + aMyOreMaterials.add(ORES.GADOLINITE_CE); + aMyOreMaterials.add(ORES.GADOLINITE_Y); + aMyOreMaterials.add(ORES.LEPERSONNITE); + aMyOreMaterials.add(ORES.SAMARSKITE_Y); + aMyOreMaterials.add(ORES.SAMARSKITE_YB); + aMyOreMaterials.add(ORES.XENOTIME); + aMyOreMaterials.add(ORES.YTTRIAITE); + aMyOreMaterials.add(ORES.YTTRIALITE); + aMyOreMaterials.add(ORES.YTTROCERITE); + aMyOreMaterials.add(ORES.ZIRCON); + aMyOreMaterials.add(ORES.POLYCRASE); + aMyOreMaterials.add(ORES.ZIRCOPHYLLITE); + aMyOreMaterials.add(ORES.ZIRKELITE); + aMyOreMaterials.add(ORES.LANTHANITE_LA); + aMyOreMaterials.add(ORES.LANTHANITE_CE); + aMyOreMaterials.add(ORES.LANTHANITE_ND); + aMyOreMaterials.add(ORES.AGARDITE_Y); + aMyOreMaterials.add(ORES.AGARDITE_CD); + aMyOreMaterials.add(ORES.AGARDITE_LA); + aMyOreMaterials.add(ORES.AGARDITE_ND); + aMyOreMaterials.add(ORES.HIBONITE); + aMyOreMaterials.add(ORES.CERITE); + aMyOreMaterials.add(ORES.FLUORCAPHITE); + aMyOreMaterials.add(ORES.FLORENCITE); + aMyOreMaterials.add(ORES.CRYOLITE); + aMyOreMaterials.add(ORES.LAUTARITE); + aMyOreMaterials.add(ORES.LAFOSSAITE); + aMyOreMaterials.add(ORES.DEMICHELEITE_BR); + aMyOreMaterials.add(ORES.COMANCHEITE); + aMyOreMaterials.add(ORES.PERROUDITE); + aMyOreMaterials.add(ORES.HONEAITE); + aMyOreMaterials.add(ORES.ALBURNITE); + aMyOreMaterials.add(ORES.MIESSIITE); + aMyOreMaterials.add(ORES.KASHINITE); + aMyOreMaterials.add(ORES.IRARSITE); + aMyOreMaterials.add(ORES.RADIOBARITE); + aMyOreMaterials.add(ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT); + + for (Material aOreType : aMyOreMaterials) { + if (aOreType == ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT || aOreType == ORES.RADIOBARITE) { + addOreTypeToMap(aOreType, 4, aTempMap); + } + else { + addOreTypeToMap(aOreType, 7, aTempMap); + } + } + + //Cleanup Map + Logger.INFO("Ore Map contains "+aTempMap.size()+" values. [GT++]"); + AutoMap aCleanUp = new AutoMap(); + for (ItemStack verify : aTempMap) { + if (!ItemUtils.checkForInvalidItems(verify)) { + aCleanUp.put(verify); + } + } + Logger.INFO("Cleanup Map contains "+aCleanUp.size()+" values."); + for (ItemStack remove : aCleanUp) { + aTempMap.remove(remove); + } + + //Generate Massive Map + AutoMap aFinalMap = new AutoMap(); + for (ItemStack aTempItem : aTempMap) { + int aTempMulti = MathUtils.randInt(20, 50); + for (int i=0;i aMap) { + for (int i=0; i STRUCTURE_DEFINITION = null; + + private ArrayList mCatalystBuses = new ArrayList(); + + private static final HashMap> mTieredBlockRegistry = new HashMap>(); + + public GregtechMTE_ChemicalPlant(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMTE_ChemicalPlant(final String aName) { + super(aName); + } + + public static boolean registerMachineCasingForTier(int aTier, Block aBlock, int aMeta, int aCasingTextureID) { + int aSize = mTieredBlockRegistry.size(); + int aSize2 = aSize; + Triplet aCasingData = new Triplet(aBlock, aMeta, aCasingTextureID); + if (mTieredBlockRegistry.containsKey(aTier)) { + CORE.crash("Tried to register a Machine casing for tier "+aTier+" to the Chemical Plant, however this tier already contains one."); + } + mTieredBlockRegistry.put(aTier, aCasingData); + aSize = mTieredBlockRegistry.size(); + return aSize > aSize2; + } + + private static int getCasingTextureIdForTier(int aTier) { + if (!mTieredBlockRegistry.containsKey(aTier)) { + return 10; + } + int aCasingID = mTieredBlockRegistry.get(aTier).getValue_3(); + //Logger.INFO("Found casing texture ID "+aCasingID+" for tier "+aTier); + return aCasingID; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMTE_ChemicalPlant(this.mName); + } + + @Override + public String getMachineType() { + return "Chemical Plant"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Chemical Plant") + .addInfo("Heavy Industry, now right at your doorstep!") + .addInfo("Please read the user manual for more information on construction and usage") + .addSeparator() + .addController("Bottom Center") + .addStructureHint("Catalyst Housing", 1) + .addInputBus("Bottom Casing", 1) + .addOutputBus("Bottom Casing", 1) + .addInputHatch("Bottom Casing", 1) + .addOutputHatch("Bottom Casing", 1) + .addEnergyHatch("Bottom Casing", 1) + .addMaintenanceHatch("Bottom Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + public void setMachineMeta(int meta) { + checkMachine = meta; + } + + public int getMachineMeta() { + return checkMachine; + } + + public void setPipeMeta(int meta) { + checkPipe = meta; + } + + public int getPipeMeta() { + return checkPipe; + } + + public void setCoilMeta(int meta) { + checkCoil = meta; + } + + public int getCoilMeta() { + return checkCoil; + } + + public int coilTier(int meta) { + switch (meta) { + case 0: return 1; + case 1: return 2; + case 2: return 3; + case 3: return 4; + case 4: return 5; + case 5: return 7; + case 6: return 8; + case 7: return 10; + case 8: return 11; + case 9: return 6; + case 10: return 9; + } + return 0; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"}, + {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, + {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, + {"X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X"}, + {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"}, + {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"}, + {"CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMTE_ChemicalPlant::addChemicalPlantList, getCasingTextureID(), 1 + ), + onElementPass( + x -> {++x.checkCasing[0]; ++x.mCasing;}, + ofSolidCasing(0) + ), + onElementPass( + x -> {++x.checkCasing[1]; ++x.mCasing;}, + ofSolidCasing(1) + ), + onElementPass( + x -> {++x.checkCasing[2]; ++x.mCasing;}, + ofSolidCasing(2) + ), + onElementPass( + x -> {++x.checkCasing[3]; ++x.mCasing;}, + ofSolidCasing(3) + ), + onElementPass( + x -> {++x.checkCasing[4]; ++x.mCasing;}, + ofSolidCasing(4) + ), + onElementPass( + x -> {++x.checkCasing[5]; ++x.mCasing;}, + ofSolidCasing(5) + ), + onElementPass( + x -> {++x.checkCasing[6]; ++x.mCasing;}, + ofSolidCasing(6) + ), + onElementPass( + x -> {++x.checkCasing[7]; ++x.mCasing;}, + ofSolidCasing(7) + ) + ) + ) + .addElement( + 'X', + ofChain( + onElementPass( + x -> {++x.checkCasing[0]; ++x.mCasing;}, + ofSolidCasing(0) + ), + onElementPass( + x -> {++x.checkCasing[1]; ++x.mCasing;}, + ofSolidCasing(1) + ), + onElementPass( + x -> {++x.checkCasing[2]; ++x.mCasing;}, + ofSolidCasing(2) + ), + onElementPass( + x -> {++x.checkCasing[3]; ++x.mCasing;}, + ofSolidCasing(3) + ), + onElementPass( + x -> {++x.checkCasing[4]; ++x.mCasing;}, + ofSolidCasing(4) + ), + onElementPass( + x -> {++x.checkCasing[5]; ++x.mCasing;}, + ofSolidCasing(5) + ), + onElementPass( + x -> {++x.checkCasing[6]; ++x.mCasing;}, + ofSolidCasing(6) + ), + onElementPass( + x -> {++x.checkCasing[7]; ++x.mCasing;}, + ofSolidCasing(7) + ) + ) + ) + .addElement( + 'M', + addTieredBlock( + GregTech_API.sBlockCasings1, GregtechMTE_ChemicalPlant::setMachineMeta, GregtechMTE_ChemicalPlant::getMachineMeta, 10 + ) + ) + .addElement( + 'H', + addTieredBlock( + GregTech_API.sBlockCasings5, GregtechMTE_ChemicalPlant::setCoilMeta, GregtechMTE_ChemicalPlant::getCoilMeta, 11 + ) + ) + .addElement( + 'P', + addTieredBlock( + GregTech_API.sBlockCasings2, GregtechMTE_ChemicalPlant::setPipeMeta, GregtechMTE_ChemicalPlant::getPipeMeta, 12, 16 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public static IStructureElement ofSolidCasing(int aIndex) { + return new IStructureElement() { + @Override + public boolean check(T t, World world, int x, int y, int z) { + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + Block target = mTieredBlockRegistry.get(aIndex).getValue_1(); + int targetMeta = mTieredBlockRegistry.get(aIndex).getValue_2(); + return target.equals(block) && meta == targetMeta; + } + + int getIndex(int size) { + if (size > 8) size = 8; + return size - 1; + } + + @Override + public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { + StructureLibAPI.hintParticle(world, x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2()); + return true; + } + + @Override + public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { + return world.setBlock(x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2(), 3); + } + }; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName , stackSize, hintsOnly, 3, 6, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + for (int i = 0; i < 8; i++) { + checkCasing[i] = 0; + } + checkCoil = 0; + checkPipe = 0; + checkMachine = 0; + mSolidCasingTier = 0; + mMachineCasingTier = 0; + mPipeCasingTier = 0; + mCoilTier = 0; + mCatalystBuses.clear(); + if (checkPiece(mName, 3, 6, 0) && mCasing >= 80) { + for (int i = 0; i < 8; i++) { + if (checkCasing[i] == mCasing) { + mSolidCasingTier = i; + } + else if (checkCasing[i] > 0) + return false; + } + mMachineCasingTier = checkMachine - 1; + mPipeCasingTier = checkPipe - 12; + mCoilTier = coilTier(checkCoil - 1); + updateHatchTexture(); + return mMachineCasingTier >= maxTierOfHatch; + } + return false; + } + + public void updateHatchTexture() { + for (GT_MetaTileEntity_Hatch h : mCatalystBuses) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mInputBusses) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mMaintenanceHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mEnergyHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mOutputBusses) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mInputHatches) h.updateTexture(getCasingTextureID()); + for (GT_MetaTileEntity_Hatch h : mOutputHatches) h.updateTexture(getCasingTextureID()); + } + + public final boolean addChemicalPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Catalysts){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier); + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public String getSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(207)); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + + ITexture aOriginalTexture; + + // Check things exist client side (The worst code ever) + if (aBaseMetaTileEntity.getWorld() != null) { + + } + int aCasingID = getCasingTextureID(); + aOriginalTexture = Textures.BlockIcons.getCasingTextureForId(aCasingID); + + if (aSide == aFacing) { + return new ITexture[]{aOriginalTexture, new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced)}; + } + return new ITexture[]{aOriginalTexture}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + if (GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList.size() == 0) { + generateRecipes(); + } + return GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT; + } + + public static void generateRecipes() { + for (GT_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { + GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.add(i); + } + } + + @Override + public int getMaxParallelRecipes() { + return 2 * getPipeCasingTier(); + } + + @Override + public int getEuDiscountForParallelism() { + return 100; + } + + private int getSolidCasingTier() { + return this.mSolidCasingTier; + } + + private int getMachineCasingTier() { + return mMachineCasingTier; + } + + private int getPipeCasingTier() { + return mPipeCasingTier; + } + + private int getCasingTextureID() { + // Check the Tier Client Side + int aTier = mSolidCasingTier; + return getCasingTextureIdForTier(aTier); + } + + public boolean addToMachineList(IGregTechTileEntity aTileEntity) { + int aMaxTier = getMachineCasingTier(); + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { + GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity; + int aTileTier = aMachineBlock.mTier; + if (aTileTier > aMaxTier) { + log("Hatch tier too high."); + return false; + } + else { + return addToMachineList(aTileEntity, getCasingTextureID()); + } + } + else { + log("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know.. + return false; + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mSolidCasingTier", this.mSolidCasingTier); + aNBT.setInteger("mMachineCasingTier", this.mMachineCasingTier); + aNBT.setInteger("mPipeCasingTier", this.mPipeCasingTier); + aNBT.setInteger("mCoilTier", this.mCoilTier); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mSolidCasingTier = aNBT.getInteger("mSolidCasingTier"); + mMachineCasingTier = aNBT.getInteger("mMachineCasingTier"); + mPipeCasingTier = aNBT.getInteger("mPipeCasingTier"); + mCoilTier = aNBT.getInteger("mCoilTier"); + } + + @Override + public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Catalysts) { + log("Found GT_MetaTileEntity_Hatch_Catalysts"); + return addToMachineListInternal(mCatalystBuses, aMetaTileEntity, aBaseCasingIndex); + } + return super.addToMachineList(aTileEntity, aBaseCasingIndex); + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 0; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + // Same speed bonus as pyro oven + public int getSpeedBonus() { + return 50 * (this.mCoilTier - 2); + } + + public int getMaxCatalystDurability() { + return 50; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + if (this.mUpdate == 1 || this.mStartUpCheck == 1) { + this.mCatalystBuses.clear(); + } + } + // Silly Client Syncing + if (aBaseMetaTileEntity.isClientSide()) { + if (this != null && this.getBaseMetaTileEntity() != null && this.getBaseMetaTileEntity().getWorld() != null) { + this.mSolidCasingTier = getCasingTierOnClientSide(); + markDirty(); + } + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), getSpeedBonus()); + } + + + @Override + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) { + + // Based on the Processing Array. A bit overkill, but very flexible. + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + long tEnergy = getMaxInputEnergy(); + log("Running checkRecipeGeneric(0)"); + + //GT_Recipe tRecipe = findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + GT_Recipe tRecipe = findRecipe(mLastRecipe, gregtech.api.enums.GT_Values.V[tTier], getSolidCasingTier(), aItemInputs, aFluidInputs); + + if (tRecipe == null) { + log("BAD RETURN - 1"); + return false; + } + + // checks if it has a catalyst + ItemStack tCatalystRecipe = findCatalyst(aItemInputs); + boolean aDoesRecipeNeedCatalyst = false; + for (ItemStack aInputItem : tRecipe.mInputs) { + if (ItemUtils.isCatalyst(aInputItem)) { + aDoesRecipeNeedCatalyst = true; + break; + } + } + if (aDoesRecipeNeedCatalyst) { + if (tCatalystRecipe == null) { + log("does not have catalyst"); + return false; + } + if (mCatalystBuses.size() != 1) { + log("does not have correct number of catalyst hatches. (Required 1, found "+mCatalystBuses.size()+")"); + return false; + } + } + + + log("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + + if (tRecipe.mSpecialValue > this.mSolidCasingTier) { + log("solid tier is too low"); + return false; + } + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); + if (aMaxParallelRecipes == 0) { + log("BAD RETURN - 2"); + return false; + } + + // checks if it has enough catalyst durability + ArrayListtCatalysts = null; + int tMaxParallelCatalyst = aMaxParallelRecipes; + if (tCatalystRecipe != null) { + tCatalysts = new ArrayList(); + tMaxParallelCatalyst = getCatalysts(aItemInputs, tCatalystRecipe, aMaxParallelRecipes, tCatalysts); + log("Can process "+tMaxParallelCatalyst+" recipes. If less than "+aMaxParallelRecipes+", catalyst does not have enough durability."); + } + + if (tMaxParallelCatalyst == 0) { + log("found not enough catalysts"); + return false; + } + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + log("aEUPercent "+aEUPercent); + log("mEUt "+tRecipe.mEUt); + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+tMaxParallelCatalyst); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tEnergy: "+tEnergy); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < tMaxParallelCatalyst && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Damage catalyst once all is said and done. + if (tCatalystRecipe != null) { + log("damaging catalyst"); + damageCatalyst(tCatalystRecipe, parallelRecipes); + } + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + for (GT_MetaTileEntity_Hatch_Catalysts h : mCatalystBuses) { + h.updateSlots(); + h.tryFillUsageSlots(); + } + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; + } + + private static final HashMap> mTieredRecipeMap = new HashMap>(); + private static final AutoMap aTier0Recipes = new AutoMap(); + private static final AutoMap aTier1Recipes = new AutoMap(); + private static final AutoMap aTier2Recipes = new AutoMap(); + private static final AutoMap aTier3Recipes = new AutoMap(); + private static final AutoMap aTier4Recipes = new AutoMap(); + private static final AutoMap aTier5Recipes = new AutoMap(); + private static final AutoMap aTier6Recipes = new AutoMap(); + private static final AutoMap aTier7Recipes = new AutoMap(); + private static boolean mInitRecipeCache = false; + + private static void initRecipeCaches() { + if (!mInitRecipeCache) { + mTieredRecipeMap.put((long) 0, aTier0Recipes); + mTieredRecipeMap.put((long) 1, aTier1Recipes); + mTieredRecipeMap.put((long) 2, aTier2Recipes); + mTieredRecipeMap.put((long) 3, aTier3Recipes); + mTieredRecipeMap.put((long) 4, aTier4Recipes); + mTieredRecipeMap.put((long) 5, aTier5Recipes); + mTieredRecipeMap.put((long) 6, aTier6Recipes); + mTieredRecipeMap.put((long) 7, aTier7Recipes); + for (GT_Recipe aRecipe : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList) { + if (aRecipe != null) { + switch (aRecipe.mSpecialValue) { + case 0: + aTier0Recipes.add(aRecipe); + continue; + case 1: + aTier1Recipes.add(aRecipe); + continue; + case 2: + aTier2Recipes.add(aRecipe); + continue; + case 3: + aTier3Recipes.add(aRecipe); + continue; + case 4: + aTier4Recipes.add(aRecipe); + continue; + case 5: + aTier5Recipes.add(aRecipe); + continue; + case 6: + aTier6Recipes.add(aRecipe); + continue; + case 7: + aTier7Recipes.add(aRecipe); + continue; + } + } + } + mInitRecipeCache = true; + } + } + + private static boolean areInputsEqual(GT_Recipe aComparator, ItemStack[] aInputs, FluidStack[] aFluids) { + int aInputCount = aComparator.mInputs.length; + if (aInputCount > 0) { + //Logger.INFO("Looking for recipe with "+aInputCount+" Items"); + int aMatchingInputs = 0; + recipe : for (ItemStack a : aComparator.mInputs) { + for (ItemStack b : aInputs) { + if (a.getItem() == b.getItem()) { + if (a.getItemDamage() == b.getItemDamage()) { + //Logger.INFO("Found matching Item Input - "+b.getUnlocalizedName()); + aMatchingInputs++; + continue recipe; + } + } + } + } + if (aMatchingInputs != aInputCount) { + return false; + } + } + int aFluidInputCount = aComparator.mFluidInputs.length; + if (aFluidInputCount > 0) { + //Logger.INFO("Looking for recipe with "+aFluidInputCount+" Fluids"); + int aMatchingFluidInputs = 0; + recipe : for (FluidStack b : aComparator.mFluidInputs) { + //Logger.INFO("Checking for fluid "+b.getLocalizedName()); + for (FluidStack a : aFluids) { + if (GT_Utility.areFluidsEqual(a, b)) { + //Logger.INFO("Found matching Fluid Input - "+b.getLocalizedName()); + aMatchingFluidInputs++; + continue recipe; + } + else { + //Logger.INFO("Found fluid which did not match - "+a.getLocalizedName()); + } + } + } + if (aMatchingFluidInputs != aFluidInputCount) { + return false; + } + } + Logger.INFO("Recipes Match!"); + return true; + } + + public GT_Recipe findRecipe(final GT_Recipe aRecipe, final long aVoltage, final long aSpecialValue, ItemStack[] aInputs, final FluidStack[] aFluids) { + if (!mInitRecipeCache) { + initRecipeCaches(); + } + if (this.getRecipeMap().mRecipeList.isEmpty()) { + log("No Recipes in Map to search through."); + return null; + } + else { + log("Checking tier "+aSpecialValue+" recipes and below. Using Input Voltage of "+aVoltage+"V."); + log("We have "+aInputs.length+" Items and "+aFluids.length+" Fluids."); + // Try check the cached recipe first + if (aRecipe != null) { + if (areInputsEqual(aRecipe, aInputs, aFluids)) { + if (aRecipe.mEUt <= aVoltage) { + Logger.INFO("Using cached recipe."); + return aRecipe; + } + } + } + + // Get all recipes for the tier + AutoMap> aMasterMap = new AutoMap>(); + for (long i=0;i<=aSpecialValue;i++) { + aMasterMap.add(mTieredRecipeMap.get(i)); + } + GT_Recipe aFoundRecipe = null; + + // Iterate the tiers recipes until we find the one with all inputs matching + master : for (AutoMap aTieredMap : aMasterMap) { + for (GT_Recipe aRecipeToCheck : aTieredMap) { + if (areInputsEqual(aRecipeToCheck, aInputs, aFluids)) { + log("Found recipe with matching inputs!"); + if (aRecipeToCheck.mSpecialValue <= aSpecialValue) { + if (aRecipeToCheck.mEUt <= aVoltage) { + aFoundRecipe = aRecipeToCheck; + break master; + } + } + } + } + } + + // If we found a recipe, return it + if (aFoundRecipe != null) { + log("Found valid recipe."); + return aFoundRecipe; + } + } + log("Did not find valid recipe."); + return null; + } + + private int getCatalysts(ItemStack[] aItemInputs, ItemStack aRecipeCatalyst, int aMaxParrallel, ArrayList aOutPut) { + int allowedParallel = 0; + for (final ItemStack aInput : aItemInputs) { + if (aRecipeCatalyst.isItemEqual(aInput)) { + int aDurabilityRemaining = getMaxCatalystDurability() - getDamage(aInput); + return Math.min(aMaxParrallel, aDurabilityRemaining); + } + } + return allowedParallel; + } + + private ItemStack findCatalyst(ItemStack[] aItemInputs) { + if (aItemInputs != null) { + for (final ItemStack aInput : aItemInputs) { + if (aInput != null) { + if (ItemUtils.isCatalyst(aInput)) { + return aInput; + } + } + } + } + return null; + } + + + private void damageCatalyst(ItemStack aStack, int parallelRecipes) { + for (int i=0; i= getMaxCatalystDurability()) { + log("consume catalyst"); + addOutput(CI.getEmptyCatalyst(1)); + aStack.stackSize -= 1; + } + else { + log("damaging catalyst"); + setDamage(aStack, damage); + } + } + else { + log("not consuming catalyst"); + } + } + } + + private int getDamage(ItemStack aStack) { + return ItemGenericChemBase.getCatalystDamage(aStack); + } + + private void setDamage(ItemStack aStack,int aAmount) { + ItemGenericChemBase.setCatalystDamage(aStack, aAmount); + } + + @SideOnly(Side.CLIENT) + private final int getCasingTierOnClientSide() { + + if (this == null || this.getBaseMetaTileEntity().getWorld() == null) { + return 0; + } + try { + Block aInitStructureCheck; + int aInitStructureCheckMeta; + IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3; + if (xDir == 0) { + aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(zDir, 1, 0); + aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(zDir, 1, 0); + } + else { + aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, 1, xDir); + aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 1, xDir); + } + for (int aTier : mTieredBlockRegistry.keySet()) { + Triplet aData = mTieredBlockRegistry.get(aTier); + if (aData.getValue_1() == aInitStructureCheck && aData.getValue_2() == aInitStructureCheckMeta) { + return aTier; + } + } + return 0; + } + catch (Throwable t) { + t.printStackTrace(); + return 0; + } + } + + /* + * Catalyst Handling + */ + + @Override + public ArrayList getStoredInputs() { + ArrayList tItems = super.getStoredInputs(); + for (GT_MetaTileEntity_Hatch_Catalysts tHatch : mCatalystBuses) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch)) { + tItems.addAll(tHatch.getContentUsageSlots()); + } + } + return tItems; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java new file mode 100644 index 0000000000..f52f02b5de --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java @@ -0,0 +1,179 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines; + +import java.util.ArrayList; + +import gregtech.GT_Mod; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTurbineBase { + + public boolean achievement = false; + private boolean looseFit=false; + + public GT_MTE_LargeTurbine_SHSteam(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MTE_LargeTurbine_SHSteam(String aName) { + super(aName); + } + + public String[] getTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 9); + } + return new String[]{ + "Controller Block for the XL High Pressure Steam Turbine", + "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", + "1x Superheated Steam Input Hatch (Side centered)", + "1x Maintenance Hatch (Side centered)", + "1x Dynamo Hatch (Back centered)", + "1x Output Hatch for Steam (Side centered)", + mCasingName+"s for the rest (24 at least!)", + "Needs a Turbine Item (Inside controller GUI)", + "Output depending on Rotor and fitting", + "Use screwdriver to adjust fitting of turbine"}; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MTE_LargeTurbine_SHSteam(mName); + } + + @Override + public Block getCasingBlock() { + return ModBlocks.blockCasings4Misc; + } + + @Override + public byte getCasingMeta() { + return 9; + } + + @Override + public byte getCasingTextureIndex() { + return 59; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { + if(looseFit) { + aOptFlow*=4; + if(aBaseEff>10000){ + aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); + aBaseEff=7500; + }else if(aBaseEff>7500){ + aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); + aBaseEff*=0.75f; + }else{ + aBaseEff*=0.75f; + } + } + int tEU = 0; + int totalFlow = 0; // Byproducts are based on actual flow + int flow = 0; + int remainingFlow = MathUtils.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + this.realOptFlow = aOptFlow; + + storedFluid=0; + for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { + String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); + if (fluidName.equals("ic2.fluidSuperheatedSteam")) { + flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount + this.storedFluid += aFluids.get(i).amount; + remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches + totalFlow += flow; // track total input used + if (!achievement) { + try { + GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); + } catch (Exception e) { + } + achievement = true; + } + }else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){ + depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); + } + } + if(totalFlow<=0)return 0; + tEU = totalFlow; + addOutput(GT_ModHandler.getSteam(totalFlow)); + if (totalFlow != aOptFlow) { + float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); + //if(totalFlow>aOptFlow){efficiency = 1.0f;} + tEU *= efficiency; + tEU = Math.max(1, MathUtils.safeInt((long)tEU * (long)aBaseEff / 10000L)); + } else { + tEU = MathUtils.safeInt((long)tEU * (long)aBaseEff / 10000L); + } + + return tEU; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) { + looseFit^=true; + GT_Utility.sendChatToPlayer(aPlayer, looseFit ? "Fitting: Loose - More Flow" : "Fitting: Tight - More Efficiency"); + } + super.onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return (looseFit && CORE.RANDOM.nextInt(4)==0)?0:1; + } + + @Override + public String[] getExtraInfoData() { + super.looseFit = looseFit; + return super.getInfoData(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("turbineFitting",looseFit); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + looseFit=aNBT.getBoolean("turbineFitting"); + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Large Super-heated Steam Turbine"; + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java new file mode 100644 index 0000000000..2e6f6149e7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java @@ -0,0 +1,189 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines; + +import static gtPlusPlus.core.lib.CORE.RANDOM; + +import java.util.ArrayList; + +import gregtech.GT_Mod; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurbineBase { + + private float water; + private boolean achievement = false; + private boolean looseFit=false; + + public GT_MTE_LargeTurbine_Steam(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + + public GT_MTE_LargeTurbine_Steam(String aName) { + super(aName); + } + + public String[] getTooltip() { + if (mCasingName.toLowerCase().contains(".name")) { + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 8); + } + return new String[]{ + "Controller Block for the XL Steam Turbine", + "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", + "1x Steam Input Hatch (Side centered)", + "1x Maintenance Hatch (Side centered)", + "1x Dynamo Hatch (Back centered)", + "1x Output Hatch for Distilled Water (Side centered)", + mCasingName+"s for the rest (24 at least!)", + "Needs a Turbine Item (Inside controller GUI)", + "Output depending on Rotor and fitting", + "Use screwdriver to adjust fitting of turbine"}; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MTE_LargeTurbine_Steam(mName); + } + + @Override + public Block getCasingBlock() { + return ModBlocks.blockCasings4Misc; + } + + @Override + public byte getCasingMeta() { + return 8; + } + + @Override + public byte getCasingTextureIndex() { + return 16; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + private int useWater(float input) { + water = water + input; + int usage = (int) water; + water = water - usage; + return usage; + } + + @Override + int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { + if(looseFit) { + aOptFlow*=4; + if(aBaseEff>10000){ + aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); + aBaseEff=7500; + }else if(aBaseEff>7500){ + aOptFlow*=Math.pow(1.1f,((aBaseEff-7500)/10000F)*20f); + aBaseEff*=0.75f; + }else{ + aBaseEff*=0.75f; + } + } + int tEU = 0; + int totalFlow = 0; // Byproducts are based on actual flow + int flow = 0; + int remainingFlow = MathUtils.safeInt((long)(aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + this.realOptFlow = aOptFlow; + + storedFluid=0; + for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals. + String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i)); + if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")) { + flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount + this.storedFluid += aFluids.get(i).amount; + remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches + totalFlow += flow; // track total input used + if (!achievement) { + GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); + achievement = true; + } + }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){ + depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); + } + } + if(totalFlow<=0)return 0; + tEU = totalFlow; + int waterToOutput = useWater(totalFlow / 160.0f); + addOutput(GT_ModHandler.getDistilledWater(waterToOutput)); + if (totalFlow != aOptFlow) { + float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float)aOptFlow); + //if(totalFlow>aOptFlow){efficiency = 1.0f;} + tEU *= efficiency; + tEU = Math.max(1, MathUtils.safeInt((long)tEU * (long)aBaseEff / 20000L)); + } else { + tEU = MathUtils.safeInt((long)tEU * (long)aBaseEff / 20000L); + } + + return tEU; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) { + looseFit^=true; + GT_Utility.sendChatToPlayer(aPlayer, looseFit ? "Fitting: Loose - More Flow" : "Fitting: Tight - More Efficiency"); + } + super.onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return (looseFit && RANDOM.nextInt(4)==0)?0:1; + } + + + @Override + public String[] getExtraInfoData() { + super.looseFit = looseFit; + return super.getInfoData(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("turbineFitting",looseFit); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + looseFit=aNBT.getBoolean("turbineFitting"); + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public String getMachineType() { + return "Large Steam Turbine"; + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java new file mode 100644 index 0000000000..9da724c6eb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java @@ -0,0 +1,663 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines; + +import java.util.ArrayList; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; + +public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechMeta_MultiBlockBase { + + protected int baseEff = 0; + protected int optFlow = 0; + protected double realOptFlow = 0; + protected int storedFluid = 0; + protected int counter = 0; + protected boolean looseFit=false; + + private final int mCasingTextureID; + public static String mCasingName; + + public ArrayList mTurbineRotorHatches = new ArrayList(); + + public GregtechMetaTileEntity_LargerTurbineBase(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); + mCasingTextureID = getTAE(); + GT9_5_Active = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFaceActive_4 : LargeTurbineTextureHandler.frontFaceHPActive_4; + GT9_5 = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFace_4 : LargeTurbineTextureHandler.frontFaceHP_4; + frontFaceActive = new GT_RenderedTexture(GT9_5_Active); + frontFace = new GT_RenderedTexture(GT9_5); + + } + public GregtechMetaTileEntity_LargerTurbineBase(String aName) { + super(aName); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); + mCasingTextureID = getTAE(); + GT9_5_Active = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFaceActive_4 : LargeTurbineTextureHandler.frontFaceHPActive_4; + GT9_5 = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFace_4 : LargeTurbineTextureHandler.frontFaceHP_4; + frontFaceActive = new GT_RenderedTexture(GT9_5_Active); + frontFace = new GT_RenderedTexture(GT9_5); + } + + public final int getTAE() { + return TAE.getIndexFromPage(3, getCasingMeta()); + } + + public final String getCasingNaming() { + return ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return getMaxEfficiency(aStack) > 0; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png"); + } + + @Override + public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + return checkMachine2(aBaseMetaTileEntity, aStack); + } + + public boolean checkMachine2(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { + //9 high + //7x7 + + this.mDynamoHatches.clear(); + this.mTurbineRotorHatches.clear(); + this.mMaintenanceHatches.clear(); + this.mMufflerHatches.clear(); + this.mInputHatches.clear(); + this.mOutputHatches.clear(); + + for (int i=0;i>-9;i--) { + if (!getLayer(i)) { + Logger.INFO("Bad Layer: "+(+i)); + return false; + } + } + + Logger.INFO("Hatches | Found "+mTurbineRotorHatches.size()+" Rotor Assemblies, "+12+" are required."); + Logger.INFO("Hatches | Found "+mMaintenanceHatches.size()+" Maint. hatches, "+1+" are required."); + Logger.INFO("Hatches | Found "+mDynamoHatches.size()+" Dynamos, "+1+" or more are required."); + Logger.INFO("Hatches | Found "+mMufflerHatches.size()+" Mufflers, "+4+" are required."); + Logger.INFO("Hatches | Found "+mInputHatches.size()+" Input Hatches, "+1+" or more are required."); + Logger.INFO("Hatches | Found "+mOutputHatches.size()+" Output Hatches, "+1+" ore more are required."); + + if (mTurbineRotorHatches.size() != 12 || + mMaintenanceHatches.size() != 1 || + mDynamoHatches.size() < 1 || + mMufflerHatches.size() != 4 || + mInputHatches.size() < 1 || + mOutputHatches.size() < 1 + ) { + return false; + } + Logger.INFO("Built Structure"); + return true; + } + + + public boolean getLayer(int aY) { + if (aY == 0 || aY == -2 || aY == -3 || aY == -5 || aY == -6 || aY == -8) { + return checkNormalLayer(aY); + } + else { + return checkTurbineLayer(aY); + } + } + + public boolean checkNormalLayer(int aY) { + Block tBlock; + int tMeta; + for (int x = -3; x <= 3; x++) { + for (int z = -3; z <= 3; z++) { + tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + IGregTechTileEntity tTileEntity; + + if (aY == 0 && x == 0 && z == 0) { + continue; + } + else if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || + ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { + tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { + Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); + continue; + } + } + else if (isValidCasingBlock(tBlock, tMeta)) { + continue; + } else { + if (tBlock != null) { + log("Offset: "+x+", "+aY+", "+z); + log("Found "+tBlock.getLocalizedName()+" with Meta "+tMeta); + log("Expected "+getCasingBlock().getLocalizedName()+" with Meta "+getCasingMeta()); + } + return false; + } + } + } + return true; + } + + + public boolean checkTurbineLayer(int aY) { + if (!checkTurbineLayerX(aY)) { + return checkTurbineLayerZ(aY); + } + else { + return true; + } + } + + public boolean checkTurbineLayerX(int aY) { + Logger.INFO("checking X"); + Block tBlock; + int tMeta; + for (int x = -3; x <= 3; x++) { + for (int z = -3; z <= 3; z++) { + tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + + if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || + ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { + Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); + continue; + } + } + + + if (x == -2 || x == 2) { + + //Find Hatches on the ends + if (z == -3 || z == 3) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addTurbineHatch(tTileEntity, this.mCasingTextureID)) { + log("Found x axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + continue; + } + else { + log("Missing x axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + } + } + + if (isValidTurbineBlock(tBlock, tMeta)) { + continue; + } + else { + return false; + } + } + else { + if (isValidCasingBlock(tBlock, tMeta)) { + continue; + } + else { + return false; + } + } + } + } + return true; + } + + public boolean checkTurbineLayerZ(int aY) { + Logger.INFO("checking Z"); + Block tBlock; + int tMeta; + for (int x = -3; x <= 3; x++) { + for (int z = -3; z <= 3; z++) { + tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); + tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); + + if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || + ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { + Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); + continue; + } + } + + if (z == -2 || z == 2) { + + //Find Hatches on the ends + if (x == -3 || x == 3) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addTurbineHatch(tTileEntity, this.mCasingTextureID)) { + log("Found z axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + continue; + } + else { + log("Missing z axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + } + } + + if (isValidTurbineBlock(tBlock, tMeta)) { + continue; + } + else { + return false; + } + } + else { + if (isValidCasingBlock(tBlock, tMeta)) { + continue; + } + else { + return false; + } + } + } + } + return true; + } + + public boolean isValidCasingBlock(Block aBlock, int aMeta) { + if (GregTech_API.sBlockMachines == aBlock) { + return true; + } + if (Block.isEqualTo(aBlock, getCasingBlock()) && (int) aMeta == (int) getCasingMeta()) { + return true; + } + log("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMeta()); + return false; + } + + public boolean isValidTurbineBlock(Block aBlock, int aMeta) { + if (aBlock == getCasingBlock() && aMeta == getCasingMetaTurbine()) { + return true; + } + log("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMetaTurbine()); + return false; + } + + public Block getCasingBlock() { + return ModBlocks.blockCasings4Misc; + } + + public abstract byte getCasingMeta(); + + public byte getCasingMetaTurbine() { + return 7; + } + + public abstract byte getCasingTextureIndex(); + + @Override + public boolean checkRecipe(ItemStack aStack) { + if((counter&7)==0 && (aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)) { + stopMachine(); + return false; + } + ArrayList tFluids = getStoredFluids(); + if (tFluids.size() > 0) { + if (baseEff == 0 || optFlow == 0 || counter >= 512 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() + || this.getBaseMetaTileEntity().hasInventoryBeenModified()) { + counter = 0; + baseEff = MathUtils.safeInt((long)((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); + optFlow = MathUtils.safeInt((long)Math.max(Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() + * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed + * 50)); + if(optFlow<=0 || baseEff<=0){ + stopMachine();//in case the turbine got removed + return false; + } + } else { + counter++; + } + } + else { + Logger.INFO("Did not find any valid input fluids."); + } + + int newPower = fluidIntoPower(tFluids, optFlow, baseEff); // How much the turbine should be producing with this flow + int difference = newPower - this.mEUt; // difference between current output and new output + + // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the difference in power level (per tick) + // This is how much the turbine can actually change during this tick + int maxChangeAllowed = Math.max(10, MathUtils.safeInt((long)Math.abs(difference)/100)); + + if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change + int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. + this.mEUt += change; // Apply the change + } else { + this.mEUt = newPower; + } + + if (this.mEUt <= 0) { + //stopMachine(); + this.mEUt=0; + this.mEfficiency=0; + return false; + } else { + this.mMaxProgresstime = 1; + this.mEfficiencyIncrease = 10; + if(this.mDynamoHatches.size()>0){ + for(GT_MetaTileEntity_Hatch dynamo:mDynamoHatches) + if(isValidMetaTileEntity(dynamo) && dynamo.maxEUOutput() < mEUt) + explodeMultiblock(); + } + return true; + } + } + + abstract int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff); + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 1; + } + + public int getMaxEfficiency(ItemStack aStack) { + if (GT_Utility.isStackInvalid(aStack)) { + return 0; + } + if (aStack.getItem() instanceof GT_MetaGenerated_Tool_01) { + return 10000; + } + return 0; + } + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return true; + } + + @Override + public String[] getExtraInfoData() { + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(StaticFields59.calculatePollutionReducation(tHatch, 100),mPollutionReduction); + } + } + + String tRunning = mMaxProgresstime>0 ? + + EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.running.true")+EnumChatFormatting.RESET : + EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.running.false")+EnumChatFormatting.RESET; + String tMaintainance = getIdealStatus() == getRepairStatus() ? + EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.maintenance.false")+EnumChatFormatting.RESET : + EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.maintenance.true")+EnumChatFormatting.RESET ; + int tDura = 0; + + if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { + tDura = MathUtils.safeInt((long)(100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + } + + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + String[] ret = new String[]{ + // 8 Lines available for information panels + tRunning + ": " + EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", */ +/* 1 *//* + + tMaintainance, */ +/* 2 *//* + + StatCollector.translateToLocal("GT5U.turbine.efficiency")+": "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", */ +/* 2 *//* + + StatCollector.translateToLocal("GT5U.multiblock.energy")+": " + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ */ +/* 3 *//* + + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + StatCollector.translateToLocal("GT5U.turbine.flow")+": "+EnumChatFormatting.YELLOW+MathUtils.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t" + */ +/* 4 *//* + + EnumChatFormatting.YELLOW+" ("+(looseFit?StatCollector.translateToLocal("GT5U.turbine.loose"):StatCollector.translateToLocal("GT5U.turbine.tight"))+")", */ +/* 5 *//* + + StatCollector.translateToLocal("GT5U.turbine.fuel")+": "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", */ +/* 6 *//* + + StatCollector.translateToLocal("GT5U.turbine.dmg")+": "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", */ +/* 7 *//* + + StatCollector.translateToLocal("GT5U.multiblock.pollution")+": "+ EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" */ +/* 8 *//* + + }; + if (!this.getClass().getName().contains("Steam")) + ret[4]=StatCollector.translateToLocal("GT5U.turbine.flow")+": "+EnumChatFormatting.YELLOW+MathUtils.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t"; + return ret; + + + } + + @Override + public boolean isGivingInformation() { + return true; + } + + + public boolean polluteEnvironment(int aPollutionLevel) { + mPollution += aPollutionLevel; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + if (mPollution >= 1000) { + if (tHatch.polluteEnvironment()) { + mPollution -= 1000; + } + } else { + break; + } + } + } + return mPollution < 1000; + } + @Override + public long maxAmperesOut() { + return 16; + } + + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!KeyboardUtils.isShiftKeyDown()) { + //super.onModeChangeByScrewdriver(aSide, aPlayer, aX, aY, aZ); + } + else { + this.mIsAnimated = Utils.invertBoolean(mIsAnimated); + if (this.mIsAnimated) { + PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); + } + if (mTurbineRotorHatches.size() > 0) { + for (GT_MetaTileEntity_Hatch_Turbine h : mTurbineRotorHatches) { + if (h != null) { + h.mUsingAnimation = mIsAnimated; + } + } + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mIsAnimated", mIsAnimated); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mIsAnimated = aNBT.getBoolean("mIsAnimated"); + } + + private boolean mIsAnimated = true; + public ITexture frontFace; + public ITexture frontFaceActive; + private CustomIcon GT9_5_Active; + private CustomIcon GT9_5; + + public boolean usingAnimations() { + return mIsAnimated; + } + + @Override + public final ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? getFrontFacingTurbineTexture(aActive) : Textures.BlockIcons.getCasingTextureForId(getTAE())}; + } + + protected ITexture getFrontFacingTurbineTexture(boolean isActive) { + if (usingAnimations()) { + if (isActive) { + return frontFaceActive; + } + } + return frontFace; + } + + public boolean addTurbineHatch(final IGregTechTileEntity aTileEntity, + final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + log("Found GT_MetaTileEntity_Hatch_Turbine"); + updateTexture(aTileEntity, aBaseCasingIndex); + GT_MetaTileEntity_Hatch_Turbine aTurbineHatch = (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; + IGregTechTileEntity g = this.getBaseMetaTileEntity(); + if (aTurbineHatch.setController(new BlockPos(g.getXCoord(), g.getYCoord(), g.getZCoord(), g.getWorld()))) { + Logger.INFO("Injected Controller into Turbine Assembly."); + return this.mTurbineRotorHatches.add(aTurbineHatch); + } + else { + Logger.INFO("Failed to inject controller into Turbine Assembly Hatch."); + } + } + return false; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + if (mUpdate == 0 || this.mStartUpCheck == 0) { + this.mTurbineRotorHatches.clear(); + } + } + if (aTick % 20 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + enableAllTurbineHatches(); + } + + } + @Override + public void startProcess() { + super.startProcess(); + enableAllTurbineHatches(); + } + @Override + public void onMachineBlockUpdate() { + super.onMachineBlockUpdate(); + } + @Override + public boolean onRunningTick(ItemStack aStack) { + return super.onRunningTick(aStack); + } + @Override + public void stopMachine() { + super.stopMachine(); + disableAllTurbineHatches(); + } + @Override + public void onRemoval() { + super.onRemoval(); + for (GT_MetaTileEntity_Hatch_Turbine h : this.mTurbineRotorHatches) { + h.clearController(); + } + disableAllTurbineHatches(); + this.mTurbineRotorHatches.clear(); + } + + public boolean enableAllTurbineHatches() { + return updateTurbineHatches(this.isMachineRunning()) > 0; + } + public boolean disableAllTurbineHatches() { + return updateTurbineHatches(false) > 0; + } + + private Long mLastHatchUpdate; + public int updateTurbineHatches(boolean aState) { + int aUpdated = 0; + if (mLastHatchUpdate == null) { + mLastHatchUpdate = System.currentTimeMillis()/1000; + } + if (this.mTurbineRotorHatches.isEmpty() || ((System.currentTimeMillis()/1000)-mLastHatchUpdate) <= 2) { + return 0; + } + for (GT_MetaTileEntity_Hatch_Turbine h : this.mTurbineRotorHatches) { + h.setActive(aState); + aUpdated++; + } + + mLastHatchUpdate = System.currentTimeMillis()/1000; + return aUpdated; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java new file mode 100644 index 0000000000..6ed14eb2a9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java @@ -0,0 +1,621 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage; + +import java.util.ArrayList; +import java.util.Arrays; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechMetaTileEntity_MultiTank +extends GregtechMeta_MultiBlockBase { + public GregtechMetaTileEntity_MultiTank(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + private short multiblockCasingCount = 0; + private int mInternalSaveClock = 0; + private final short storageMultiplier = 1; + private int maximumFluidStorage = 128000; + private FluidStack internalStorageTank = null; + private final NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound(); + + @Override + public String getMachineType() { + return "Fluid Tank"; + } + + @Override + public String[] getExtraInfoData() { + final ArrayList mTier = this.mEnergyHatches; + if (!mTier.isEmpty()){ + final int temp = mTier.get(0).mTier; + if (this.internalStorageTank == null) { + return new String[]{ + GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank", + "Stored Fluid: No Fluid", + "Internal | Current: "+Integer.toString(0) + "L", + "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; + } + return new String[]{ + GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank", + "Stored Fluid: "+this.internalStorageTank.getLocalizedName(), + "Internal | Current: "+Integer.toString(this.internalStorageTank.amount) + "L", + "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; + } + return new String[]{ + "Voltage Tier not set -" +" Large Fluid Tank", + "Stored Fluid: No Fluid", + "Internal | Current: "+Integer.toString(0) + "L", + "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + */ +/*final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents"); + if (gtCraftingComponentsTag != null){ + + Utils.LOG_WARNING("Got Crafting Tag"); + + if (this.internalStorageTank != null){ + Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data."); + + gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName()); + gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount); + gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage); + + aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); + } + else { + Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data."); + gtCraftingComponentsTag.removeTag("xFluid"); + gtCraftingComponentsTag.removeTag("xAmount"); + gtCraftingComponentsTag.removeTag("xAmountMax"); + gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage); + + + aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); + } + }*//* + + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + */ +/*final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents"); + String xFluid = null; + int xAmount = 0; + if (gtCraftingComponentsTag.hasNoTags()){ + if (this.internalStorageTank != null){ + Utils.LOG_WARNING("mFluid was not null, Creating TileEntity NBT data."); + gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount); + gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName()); + aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); + } + } + else { + + //internalCraftingComponentsTag = gtCraftingComponentsTag.getCompoundTag("backupTag"); + + if (gtCraftingComponentsTag.hasKey("xFluid")){ + Utils.LOG_WARNING("xFluid was not null, Loading TileEntity NBT data."); + xFluid = gtCraftingComponentsTag.getString("xFluid"); + } + if (gtCraftingComponentsTag.hasKey("xAmount")){ + Utils.LOG_WARNING("xAmount was not null, Loading TileEntity NBT data."); + xAmount = gtCraftingComponentsTag.getInteger("xAmount"); + } + if ((xFluid != null) && (xAmount != 0)){ + Utils.LOG_WARNING("Setting Internal Tank, loading "+xAmount+"L of "+xFluid); + this.setInternalTank(xFluid, xAmount); + } + }*//* + + } + + private boolean setInternalTank(final String fluidName, final int amount){ + final FluidStack temp = FluidUtils.getFluidStack(fluidName, amount); + if (temp != null){ + if (this.internalStorageTank == null){ + this.internalStorageTank = temp; + Logger.WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L"); + } + else{ + Logger.WARNING("Retained Fluid."); + Logger.WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L"); + } + this.markDirty(); + return true; + } + return false; + } + + @Override + public void onLeftclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + this.tryForceNBTUpdate(); + super.onLeftclick(aBaseMetaTileEntity, aPlayer); + } + + @Override + public boolean onWrenchRightClick(final byte aSide, final byte aWrenchingSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) { + this.tryForceNBTUpdate(); + return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + } + + @Override + public void onRemoval() { + this.tryForceNBTUpdate(); + super.onRemoval(); + } + + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + if ((this.internalStorageTank != null) && this.internalStorageTank.amount >= this.maximumFluidStorage){ + if (this.internalStorageTank.amount > this.maximumFluidStorage){ + this.internalStorageTank.amount = this.maximumFluidStorage; + } + this.stopMachine(); + } + + if (this.mInternalSaveClock != 20){ + this.mInternalSaveClock++; + } + else { + this.mInternalSaveClock = 0; + this.tryForceNBTUpdate(); + } + + } + + public GregtechMetaTileEntity_MultiTank(final String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_MultiTank(this.mName); + } + + @Override + public String[] getTooltip() { + return new String[]{ + "Controller Block for the Multitank", + "Size: 3xHx3 (Block behind controller must be air)", + "Structure must be at least 4 blocks tall, maximum 20.", + "Each casing within the structure adds 128000L storage.", + "Multitank Exterior Casings (16 at least!)", + "Controller (front centered)", + "1x Input hatch", + "1x Output hatch", + "1x Energy Hatch", + }; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11))}; + } + + @Override + public boolean hasSlotInGUI() { + return false; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return aFacing > 1; + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + + final ArrayList tInputList = this.getStoredInputs(); + for (int i = 0; i < (tInputList.size() - 1); i++) { + for (int j = i + 1; j < tInputList.size(); j++) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + } else { + tInputList.remove(i--); + break; + } + } + } + } + final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2); + + final ArrayList tFluidList = this.getStoredFluids(); + for (int i = 0; i < (tFluidList.size() - 1); i++) { + for (int j = i + 1; j < tFluidList.size(); j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + } else { + tFluidList.remove(i--); + break; + } + } + } + } + final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1); + + if (tFluids.length >= 2){ + Logger.WARNING("Bad"); + return false; + } + + final ArrayList> rList = new ArrayList<>(); + int slotInputCount = 0; + for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) { + boolean containsFluid = false; + if (isValidMetaTileEntity(tHatch)) { + slotInputCount++; + for (int i=0; i(tHatch, containsFluid)); + } + } + if ((tFluids.length <= 0) || (slotInputCount > 1)){ + Logger.WARNING("Bad"); + return false; + } + + Logger.WARNING("Okay - 2"); + if (this.internalStorageTank == null){ + Logger.WARNING("Okay - 3"); + if ((rList.get(0).getKey().mFluid != null) && (rList.get(0).getKey().mFluid.amount > 0)){ + Logger.WARNING("Okay - 4"); + Logger.WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount */ +/*+" internalStorageTank:"+internalStorageTank.amount*//* +); + final FluidStack tempFluidStack = rList.get(0).getKey().mFluid; + final Fluid tempFluid = tempFluidStack.getFluid(); + this.internalStorageTank = FluidUtils.getFluidStack(tempFluid.getName(), tempFluidStack.amount); + rList.get(0).getKey().mFluid.amount = 0; + Logger.WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+this.internalStorageTank.amount); + return true; + } + Logger.WARNING("No Fluid in hatch."); + return false; + } + else if (this.internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){ + Logger.WARNING("Storing "+rList.get(0).getKey().mFluid.amount+"L"); + Logger.WARNING("Contains "+this.internalStorageTank.amount+"L"); + + + int tempAdd = 0; + tempAdd = rList.get(0).getKey().getFluidAmount(); + rList.get(0).getKey().mFluid = null; + Logger.WARNING("adding "+tempAdd); + this.internalStorageTank.amount = this.internalStorageTank.amount + tempAdd; + Logger.WARNING("Tank now Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+"."); + + + //Utils.LOG_WARNING("Tank"); + return true; + } + else { + final FluidStack superTempFluidStack = rList.get(0).getKey().mFluid; + Logger.WARNING("is input fluid equal to stored fluid? "+(this.internalStorageTank.isFluidEqual(superTempFluidStack))); + if (superTempFluidStack != null) { + Logger.WARNING("Input hatch[0] Contains "+superTempFluidStack.amount+"L of "+superTempFluidStack.getFluid().getName()+"."); + } + Logger.WARNING("Large Multi-Tank Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+"."); + + if (this.internalStorageTank.amount <= 0){ + Logger.WARNING("Internal Tank is empty, sitting idle."); + return false; + } + + if ((this.mOutputHatches.get(0).mFluid == null) || this.mOutputHatches.isEmpty() || (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.internalStorageTank) && (this.mOutputHatches.get(0).mFluid.amount < this.mOutputHatches.get(0).getCapacity()))){ + Logger.WARNING("Okay - 3"); + final int tempCurrentStored = this.internalStorageTank.amount; + int tempResult = 0; + final int tempHatchSize = this.mOutputHatches.get(0).getCapacity(); + final int tempHatchCurrentHolding = this.mOutputHatches.get(0).getFluidAmount(); + final int tempHatchRemainingSpace = tempHatchSize - tempHatchCurrentHolding; + final FluidStack tempOutputFluid = this.internalStorageTank; + if (tempHatchRemainingSpace <= 0){ + return false; + } + Logger.WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left."); + + if (tempHatchSize >= tempHatchRemainingSpace){ + Logger.WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left."); + + int adder; + if ((tempCurrentStored > 0) && (tempCurrentStored <= tempHatchSize)){ + adder = tempCurrentStored; + if (adder >= tempHatchRemainingSpace){ + adder = tempHatchRemainingSpace; + } + } + else { + adder = 0; + if (tempCurrentStored >= tempHatchRemainingSpace){ + adder = tempHatchRemainingSpace; + } + } + + tempResult = adder; + tempOutputFluid.amount = tempResult; + Logger.WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName()); + this.mOutputHatches.get(0).fill(tempOutputFluid, true); + //mOutputHatches.get(0).mFluid.amount = tempResult; + this.internalStorageTank.amount = (tempCurrentStored-adder); + Logger.WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.internalStorageTank.amount +"L | output hatch contains: "+this.mOutputHatches.get(0).mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.getFluid().getName()); + */ +/*if (internalStorageTank.amount <= 0) + internalStorageTank = null;*//* + + } + Logger.WARNING("Tank ok."); + return true; + } + } + //this.getBaseMetaTileEntity().(tFluids[0].amount, true); + Logger.WARNING("Tank"); + return false; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + @Override + public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { + Logger.WARNING("Must be hollow."); + return false; + } + int tAmount = 0; + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + for (int h = -1; h < 19; h++) { + if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); + if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { + if (h < 3){ + Logger.WARNING("Casing Expected."); + return false; + } + else if (h >= 3){ + //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); + } + } + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 11) { + if (h < 3){ + Logger.WARNING("Wrong Meta."); + return false; + } + else if (h >= 3){ + //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); + } + } + if (h < 3){ + tAmount++; + } + else if (h >= 3){ + if ((aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air) || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){ + Logger.WARNING("Found air"); + } + else { + Logger.WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank."); + tAmount++; + } + } + } + } + } + } + } + this.multiblockCasingCount = (short) tAmount; + this.maximumFluidStorage = getMaximumTankStorage(tAmount); + Logger.INFO("Your Multitank can be 20 blocks tall."); + Logger.INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L"); + this.tryForceNBTUpdate(); + return tAmount >= 16; + } + + */ +/*public int countCasings() { + Utils.LOG_INFO("Counting Machine Casings"); + try{ + if (this.getBaseMetaTileEntity().getWorld() == null){ + Utils.LOG_INFO("Tile Entity's world was null for casing count."); + return 0; + } + if (this.getBaseMetaTileEntity() == null){ + Utils.LOG_INFO("Tile Entity was null for casing count."); + return 0; + } + } catch(NullPointerException r){ + Utils.LOG_INFO("Null Pointer Exception caught."); + return 0; + } + int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ; + if (!this.getBaseMetaTileEntity().getAirOffset(xDir, 0, zDir)) { + Utils.LOG_INFO("Failed due to air being misplaced."); + Utils.LOG_WARNING("Must be hollow."); + return 0; + } + int tAmount = 0; + Utils.LOG_INFO("Casing Count set to 0."); + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + for (int h = -1; h < 19; h++) { + if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(xDir + i, h, zDir + j); + if ((!addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) { + if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { + if (h < 3){ + Utils.LOG_WARNING("Casing Expected."); + return 0; + } + else if (h >= 3){ + //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); + } + } + if (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, h, zDir + j) != 11) { + if (h < 3){ + Utils.LOG_WARNING("Wrong Meta."); + return 0; + } + else if (h >= 3){ + //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); + } + } + if (h < 3){ + tAmount++; + } + else if (h >= 3){ + if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) == Blocks.air || this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){ + Utils.LOG_WARNING("Found air"); + } + else { + Utils.LOG_WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank."); + tAmount++; + } + } + } + } + } + } + } + Utils.LOG_INFO("Finished counting."); + multiblockCasingCount = (short) tAmount; + //Utils.LOG_INFO("Your Multitank can be 20 blocks tall."); + Utils.LOG_INFO("Casings Count: "+tAmount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+getMaximumTankStorage(tAmount)+"L"); + return tAmount; + }*//* + + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(final ItemStack aStack) { + return 5; + } + + @Override + public int getAmountOfOutputs() { + return 1; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + private static short getStorageMultiplier(final int casingCount){ + final int tsm = 1*casingCount; + if (tsm <= 0){ + return 1; + } + return (short) tsm; + } + + private static int getMaximumTankStorage(final int casingCount){ + final int multiplier = getStorageMultiplier(casingCount); + final int tempTankStorageMax = 128000*multiplier; + if (tempTankStorageMax <= 0){return 128000;} + return tempTankStorageMax; + } + + private boolean tryForceNBTUpdate(){ +*/ +/* + //Block is invalid. + if ((this == null) || (this.getBaseMetaTileEntity() == null)){ + Utils.LOG_WARNING("Block was not valid for saving data."); + return false; + } + + //Don't need this to run clientside. + if (!this.getBaseMetaTileEntity().isServerSide()) { + return false; + } + + //Internal Tag was not valid. + try{ + if (this.internalCraftingComponentsTag == null){ + Utils.LOG_WARNING("Internal NBT data tag was null."); + return false; + } + } catch (final NullPointerException x){ + Utils.LOG_WARNING("Caught null NBT."); + } + + //Internal tag was valid. + this.saveNBTData(this.internalCraftingComponentsTag); + + + //Mark block for update + int x,y,z = 0; + x = this.getBaseMetaTileEntity().getXCoord(); + y = this.getBaseMetaTileEntity().getYCoord(); + z = this.getBaseMetaTileEntity().getZCoord(); + this.getBaseMetaTileEntity().getWorld().markBlockForUpdate(x, y, z); + + //Mark block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly) + this.getBaseMetaTileEntity().markDirty();*//* + + return true; + } +}*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java new file mode 100644 index 0000000000..a90c962cae --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -0,0 +1,657 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +import com.gtnewhorizon.structurelib.StructureLibAPI; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.IStructureElement; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.preloader.asm.AsmConfig; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_PowerSubStation; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_PowerSubStation; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMeta_MultiBlockBase { + + protected long mAverageEuUsage = 0; + protected long mTotalEnergyAdded = 0; + protected long mTotalEnergyConsumed = 0; + protected long mTotalEnergyLost = 0; + protected boolean mIsOutputtingPower = false; + protected long mBatteryCapacity = 0; + + private final int ENERGY_TAX = 2; + + private int mCasing; + private int[] cellCount = new int[6]; + private IStructureDefinition STRUCTURE_DEFINITION = null; + + public GregtechMetaTileEntity_PowerSubStationController(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMetaTileEntity_PowerSubStationController(final String aName) { + super(aName); + } + + @Override + public String getMachineType() { + return "Energy Buffer"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("[BUG] GUI does not work until structure is assembled correctly. (Do Not Report issue)") + .addInfo("Consumes " + this.ENERGY_TAX + "% of the average voltage of all energy type hatches") + .addInfo("Does not require maintenance") + .addInfo("Can be built with variable height between " + (CELL_HEIGHT_MIN + 2) + "-" + (CELL_HEIGHT_MAX + 2) + "") + .addInfo("Hatches can be placed nearly anywhere") + .addInfo("HV Energy/Dynamo Hatches are the lowest tier you can use") + .addInfo("Supports voltages >= UHV using MAX tier components.") + .addSeparator() + .addController("Bottom Center") + .addCasingInfo("Sub-Station External Casings", 10) + .addDynamoHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; + } + if (aSide == this.getBaseMetaTileEntity().getBackFacing()) { + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)), + mIsOutputtingPower ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()] : Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]}; + } + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(23))}; + } + + @Override + public boolean hasSlotInGUI() { + return true; + } + + @Override + public String getCustomGUIResourceName() { + return null; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (mBatteryCapacity <= 0) return false; + if (!aBaseMetaTileEntity.isClientSide()) { + aBaseMetaTileEntity.openGUI(aPlayer); + } + return true; + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_PowerSubStation(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "Ergon Energy - Sub Station"); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_PowerSubStation(aPlayerInventory, aBaseMetaTileEntity); + } + + private void checkMachineProblem(String msg, int xOff, int yOff, int zOff) { + final IGregTechTileEntity te = this.getBaseMetaTileEntity(); + final Block tBlock = te.getBlockOffset(xOff, yOff, zOff); + final byte tMeta = te.getMetaIDOffset(xOff, yOff, zOff); + String name = tBlock.getLocalizedName(); + String problem = msg + ": (" + xOff + ", " + yOff + ", " + zOff + ") " + name + ":" + tMeta; + checkMachineProblem(problem); + } + private void checkMachineProblem(String msg) { + if (!AsmConfig.disableAllLogging) { + Logger.INFO("Power Sub-Station problem: " + msg); + } + } + + public static int getCellTier(Block aBlock, int aMeta) { + if (aBlock == ModBlocks.blockCasings2Misc && aMeta == 7) { + return 4; + } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 4) { + return 5; + } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 5) { + return 6; + } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 6) { + return 7; + } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 7) { + return 8; + } else if (aBlock == ModBlocks.blockCasings3Misc && aMeta == 8) { + return 9; + } else { + return -1; + } + } + + public static int getMetaFromTier(int tier) { + if (tier == 4) return 7; + if (tier >= 5 && tier <= 9) return tier - 1; + return 0; + } + + public static Block getBlockFromTier(int tier) { + switch (tier) { + case 4: return ModBlocks.blockCasings2Misc; + case 5: case 6: case 7: case 8: case 9: return ModBlocks.blockCasings3Misc; + default: return null; + } + } + + public static int getMaxHatchTier(int aCellTier) { + switch(aCellTier) { + case 9: + return CORE.GTNH ? 15 : 9; + default: + if (aCellTier < 4) { + return 0; + } + else { + return aCellTier; + } + } + } + + public static final int CELL_HEIGHT_MAX = 16; + public static final int CELL_HEIGHT_MIN = 2; + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName + "bottom", transpose(new String[][]{ + {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"} + })) + .addShape(mName + "mid", transpose(new String[][]{ + {"CCCCC", "CHHHC", "CHHHC", "CHHHC", "CCCCC"} + })) + .addShape(mName + "top", transpose(new String[][]{ + {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"} + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_PowerSubStationController::addPowerSubStationList, TAE.GTPP_INDEX(24), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings2Misc, 8 + ) + ) + ) + ) + .addElement( + 'H', + ofChain( + onElementPass( + x -> ++x.cellCount[0], + ofCell(4) + ), + onElementPass( + x -> ++x.cellCount[1], + ofCell(5) + ), + onElementPass( + x -> ++x.cellCount[2], + ofCell(6) + ), + onElementPass( + x -> ++x.cellCount[3], + ofCell(7) + ), + onElementPass( + x -> ++x.cellCount[4], + ofCell(8) + ), + onElementPass( + x -> ++x.cellCount[5], + ofCell(9) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public static IStructureElement ofCell(int aIndex) { + return new IStructureElement() { + @Override + public boolean check(T t, World world, int x, int y, int z) { + Block block = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); + int tier = getCellTier(block, meta); + return aIndex == tier; + } + + public int getIndex(int size) { + if (size > 6) size = 6; + return size + 3; + } + + @Override + public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { + StructureLibAPI.hintParticle(world, x, y, z, getBlockFromTier(getIndex(trigger.stackSize)), getMetaFromTier(getIndex(trigger.stackSize))); + return true; + } + + @Override + public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { + return world.setBlock(x, y, z, getBlockFromTier(getIndex(trigger.stackSize)), getMetaFromTier(getIndex(trigger.stackSize)), 3); + } + }; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + int layer = Math.min(stackSize.stackSize + 3, 18); + buildPiece(mName + "bottom" , stackSize, hintsOnly, 2, 0, 0); + for (int i = 1; i < layer - 1; i++) { + buildPiece(mName + "mid", stackSize, hintsOnly, 2, i, 0); + } + buildPiece(mName + "top", stackSize, hintsOnly, 2, layer - 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mAllEnergyHatches.clear(); + mAllDynamoHatches.clear(); + for (int i = 0; i < 6; i++) { + cellCount[i] = 0; + } + if (!checkPiece(mName + "bottom", 2, 0, 0)) + return false; + int layer = 1; + while (checkPiece(mName + "mid", 2, layer, 0)) { + layer ++; + } + if (layer > 19 || !checkPiece(mName + "top", 2, layer, 0)) + return false; + int level = 0; + for (int i = 0; i < 6; i++) { + if (cellCount[i] != 0) { + if (level == 0) level = i + 4; + else return false; + } + } + int tier = getMaxHatchTier(level); + long volSum = 0; + for (GT_MetaTileEntity_Hatch hatch : mAllDynamoHatches) { + if (hatch.mTier > tier || hatch.mTier < 3) return false; + volSum += (8 << (hatch.mTier * 2)); + } + for (GT_MetaTileEntity_Hatch hatch : mAllEnergyHatches) { + if (hatch.mTier > tier || hatch.mTier < 3) return false; + volSum += (8 << (hatch.mTier * 2)); + } + mBatteryCapacity = getCapacityFromCellTier(level) * cellCount[level - 4]; + if (mAllEnergyHatches.size() + mAllDynamoHatches.size() > 0) { + mAverageEuUsage = volSum / (mAllEnergyHatches.size() + mAllDynamoHatches.size()); + } + else mAverageEuUsage = 0; + fixAllMaintenanceIssue(); + return true; + } + + public final boolean addPowerSubStationList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } if (LoadedMods.TecTech) { + if (isThisHatchMultiDynamo(aMetaTileEntity)) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (isThisHatchMultiEnergy(aMetaTileEntity)) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + } + return false; + } + + // Define storage capacity of smallest cell tier (EV) and compute higher tiers from it + private static final long CELL_TIER_EV_CAPACITY = 100 * 1000 * 1000; // one lapotronic orb + private static final long CELL_TIER_MULTIPLIER = 4; // each tier's capacity is this many times the previous tier + + public static long getCapacityFromCellTier(int aOverallCellTier) { + // Use integer math instead of `Math.pow` to avoid range/precision errors + if (aOverallCellTier < 4) return 0; + aOverallCellTier -= 4; + long capacity = CELL_TIER_EV_CAPACITY; + while (aOverallCellTier > 0) { + capacity *= CELL_TIER_MULTIPLIER; + aOverallCellTier--; + } + return capacity; + } + + @Override + public int getMaxEfficiency(final ItemStack aStack) { + return 10000; + } + + @Override + public boolean explodesOnComponentBreak(final ItemStack aStack) { + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntity_PowerSubStationController(this.mName); + } + + //mTotalEnergyAdded + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setLong("mAverageEuUsage", this.mAverageEuUsage); + + //Usage Stats + aNBT.setLong("mTotalEnergyAdded", this.mTotalEnergyAdded); + aNBT.setLong("mTotalEnergyLost", this.mTotalEnergyLost); + aNBT.setLong("mTotalEnergyConsumed", this.mTotalEnergyConsumed); + aNBT.setLong("mTotalRunTime", this.mTotalRunTime); + aNBT.setBoolean("mIsOutputtingPower", this.mIsOutputtingPower); + aNBT.setLong("mBatteryCapacity", this.mBatteryCapacity); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + + // Best not to get a long if the Tag Map is holding an int + if (aNBT.hasKey("mAverageEuUsage")) { + this.mAverageEuUsage = aNBT.getLong("mAverageEuUsage"); + } + + //Usage Stats + this.mTotalEnergyAdded = aNBT.getLong("mTotalEnergyAdded"); + this.mTotalEnergyLost = aNBT.getLong("mTotalEnergyLost"); + this.mTotalEnergyConsumed = aNBT.getLong("mTotalEnergyConsumed"); + this.mTotalRunTime = aNBT.getLong("mTotalRunTime"); + + this.mIsOutputtingPower = aNBT.getBoolean("mIsOutputtingPower"); + + this.mBatteryCapacity = aNBT.getLong("mBatteryCapacity"); + + super.loadNBTData(aNBT); + } + + @Override + public boolean checkRecipe(final ItemStack aStack) { + this.mProgresstime = 1; + this.mMaxProgresstime = 1; + this.mEUt = 0; + this.mEfficiencyIncrease = 10000; + this.fixAllMaintenanceIssue(); + return true; + } + + @Override + public int getMaxParallelRecipes() { + return 1; + } + + @Override + public int getEuDiscountForParallelism() { + return 0; + } + + private void drawEnergyFromHatch(MetaTileEntity aHatch) { + if (!isValidMetaTileEntity(aHatch)) return; + + long stored = aHatch.getEUVar(); + long voltage = aHatch.maxEUInput() * aHatch.maxAmperesIn(); + + if (voltage > stored) { + return; + } + + if (this.getBaseMetaTileEntity().increaseStoredEnergyUnits(voltage, false)) { + aHatch.setEUVar((stored - voltage)); + this.mTotalEnergyAdded += voltage; + } + } + + private void addEnergyToHatch(MetaTileEntity aHatch) { + if (!isValidMetaTileEntity(aHatch)) return; + + long voltage = aHatch.maxEUOutput() * aHatch.maxAmperesOut(); + + if (aHatch.getEUVar() > aHatch.maxEUStore() - voltage) return; + + if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(voltage, false)) { + aHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(voltage, false); + this.mTotalEnergyConsumed+=voltage; + } + + } + + private long computeEnergyTax() { + float mTax = mAverageEuUsage * (ENERGY_TAX / 100f); + + // Increase tax up to 2x if machine is not fully repaired + mTax = mTax * (1f + (10000f - mEfficiency) / 10000f); + + return MathUtils.roundToClosestLong(mTax); + } + + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + this.fixAllMaintenanceIssue(); + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + // First, decay overcharge (0.1% of stored energy plus 1000 EU per tick) + if (this.getEUVar() > this.mBatteryCapacity) { + long energy = (long) (this.getEUVar() * 0.999f) - 1000; + this.setEUVar(energy); + } + + // Pay Tax + long mDecrease = computeEnergyTax(); + this.mTotalEnergyLost += Math.min(mDecrease, this.getEUVar()); + this.setEUVar(Math.max(0, this.getEUVar() - mDecrease)); + + // Input Power + for (Object THatch : this.mDischargeHatches) { + GT_MetaTileEntity_Hatch_OutputBattery tHatch = (GT_MetaTileEntity_Hatch_OutputBattery) THatch; + drawEnergyFromHatch(tHatch); + } + for (GT_MetaTileEntity_Hatch tHatch : this.mAllEnergyHatches) { + drawEnergyFromHatch(tHatch); + } + + // Output Power + for (Object THatch : this.mChargeHatches) { + GT_MetaTileEntity_Hatch_InputBattery tHatch = (GT_MetaTileEntity_Hatch_InputBattery) THatch; + addEnergyToHatch(tHatch); + } + for (GT_MetaTileEntity_Hatch tHatch : this.mAllDynamoHatches) { + addEnergyToHatch(tHatch); + } + + return true; + + } + + @Override + public boolean drainEnergyInput(long aEU) { + // Not applicable to this machine + return true; + } + + @Override + public boolean addEnergyOutput(long aEU) { + // Not applicable to this machine + return true; + } + + @Override + public long maxEUStore() { + return mBatteryCapacity; + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public String[] getExtraInfoData() { + String mode; + if (mIsOutputtingPower) { + mode = EnumChatFormatting.GOLD + "Output" + EnumChatFormatting.RESET; + } else { + mode = EnumChatFormatting.BLUE + "Input" + EnumChatFormatting.RESET; + } + + String storedEnergyText; + if (this.getEUVar() > this.mBatteryCapacity) { + storedEnergyText = EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; + } else { + storedEnergyText = EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; + } + + int errorCode = this.getBaseMetaTileEntity().getErrorDisplayID(); + boolean mMaint = (errorCode != 0); + + return new String[]{ + "Ergon Energy - District Sub-Station", + "Stored EU: " + storedEnergyText, + "Capacity: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.maxEUStore()) + EnumChatFormatting.RESET, + "Running Costs: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.computeEnergyTax()) + EnumChatFormatting.RESET + " EU/t", + "Controller Mode: " + mode, + "Requires Maintenance: " + (!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED)+ mMaint + EnumChatFormatting.RESET +" | Code: ["+(!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + errorCode + EnumChatFormatting.RESET +"]", + "----------------------", + "Stats for Nerds", + "Total Input: " + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(this.mTotalEnergyAdded) + EnumChatFormatting.RESET + " EU", + "Total Output: " + EnumChatFormatting.GOLD + GT_Utility.formatNumbers(this.mTotalEnergyConsumed) + EnumChatFormatting.RESET + " EU", + "Total Costs: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.mTotalEnergyLost) + EnumChatFormatting.RESET + " EU", + }; + } + + @Override + public void explodeMultiblock() { + // TODO Auto-generated method stub + super.explodeMultiblock(); + } + + @Override + public void doExplosion(long aExplosionPower) { + // TODO Auto-generated method stub + super.doExplosion(aExplosionPower); + } + + @Override + public long getMaxInputVoltage() { + return 32768; + } + + @Override + public boolean isElectric() { + return true; + } + + @Override + public boolean isEnetInput() { + return !mIsOutputtingPower; + } + + @Override + public boolean isEnetOutput() { + return mIsOutputtingPower; + } + + @Override + public boolean isInputFacing(byte aSide) { + return (aSide == this.getBaseMetaTileEntity().getBackFacing() && !mIsOutputtingPower); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return (aSide == this.getBaseMetaTileEntity().getBackFacing() && mIsOutputtingPower); + } + + @Override + public long maxAmperesIn() { + return 32; + } + + @Override + public long maxAmperesOut() { + return 32; + } + + @Override + public long maxEUInput() { + return 32768; + } + + @Override + public long maxEUOutput() { + return 32768; + } + + @Override + public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + mIsOutputtingPower = Utils.invertBoolean(mIsOutputtingPower); + if (mIsOutputtingPower) { + PlayerUtils.messagePlayer(aPlayer, "Sub-Station is now outputting power from the controller."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Sub-Station is now inputting power into the controller."); + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java new file mode 100644 index 0000000000..5d8e9d468d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java @@ -0,0 +1,348 @@ +/* +package gtPlusPlus.xmod.gregtech.common.tileentities.misc; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_SolarTower; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock { + + public String mSolarTower; + public boolean mHasTower = false; + + private Integer mTX, mTY, mTZ; + private Byte mRequiredFacing; + + public TileEntitySolarHeater(final int aID, final String aName, final String aNameRegional, final int aTier, + final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); + } + + public TileEntitySolarHeater(final String aName, final int aTier, final String aDescription, + final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] { + this.mDescription, + "Point me at a Solar Tower", + CORE.GT_Tooltip }; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) }; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; + } + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; + } + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; + } + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + } + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) }; + } + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new TileEntitySolarHeater(this.mName, this.mTier, this.mDescription, this.mTextures, 0); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName(), + "Testificate" + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return false; + } + + public boolean allowCoverOnSide(final byte aSide, final int aCoverID) { + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public long maxEUStore() { + return 0; + } + + @Override + public int getCapacity() { + return 0; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + + @Override + public boolean isElectric() { + return false; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return false; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return aFacing >= 2; + } + + @Override + public boolean isEnetInput() { + return false; + } + + @Override + public boolean isEnetOutput() { + return false; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("mHasTower", mHasTower); + if (mHasTower && mTX != null && mTY != null && mTZ != null) { + aNBT.setInteger("mTX", mTX); + aNBT.setInteger("mTY", mTY); + aNBT.setInteger("mTZ", mTZ); + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + this.mHasTower = aNBT.getBoolean("mHasTower"); + if (this.mHasTower) { + if (aNBT.hasKey("mTX")) + this.mTX = aNBT.getInteger("mTX"); + if (aNBT.hasKey("mTY")) + this.mTY = aNBT.getInteger("mTY"); + if (aNBT.hasKey("mTZ")) + this.mTZ = aNBT.getInteger("mTZ"); + } + } + + @Override + public long getInputTier() { + return 0; + } + + @Override + public long getOutputTier() { + return 0; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return false; + } + + @Override + public void onExplosion() { + + } + + public GregtechMetaTileEntity_SolarTower getSolarTower() { + if (this.mHasTower && this.mSolarTower != null && this.mSolarTower.length() > 0) { + BlockPos p = BlockPos.generateBlockPos(mSolarTower); + if (p != null) { + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(p.xPos, p.yPos, p.zPos); + if (tTileEntity != null && tTileEntity instanceof GregtechMetaTileEntity_SolarTower) { + return (GregtechMetaTileEntity_SolarTower) tTileEntity; + } + } + } + return null; + } + + + public boolean setSolarTower(BlockPos aTowerPos) { + if (!this.mHasTower && setSolarTowerInternal(aTowerPos.getUniqueIdentifier())) { + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(aTowerPos.xPos, aTowerPos.yPos, aTowerPos.zPos); + if (tTileEntity != null && tTileEntity instanceof GregtechMetaTileEntity_SolarTower) { + this.mTX = tTileEntity.getXCoord(); + this.mTY = (int) tTileEntity.getYCoord(); + this.mTZ = tTileEntity.getZCoord(); + this.mHasTower = true; + return true; + } + } + return false; + } + + private boolean clearSolarTower() { + if (mHasTower || mTX != null || mTY != null || mTZ != null || mRequiredFacing != null || this.mSolarTower != null) { + this.mTX = null; + this.mTY = null; + this.mTZ = null; + this.mRequiredFacing = null; + this.mSolarTower = null; + this.mHasTower = false; + return true; + } + return false; + } + + private final boolean setSolarTowerInternal(String aTowerPos) { + this.mSolarTower = aTowerPos; + return this.mSolarTower != null && this.mSolarTower.length() > 0; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + + } + + @Override + public void onRemoval() { + super.onRemoval(); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide > 1; + } + + @Override + public boolean isInputFacing(byte aSide) { + return false; + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public void onFacingChange() { + super.onFacingChange(); + } + + @Override + public void doExplosion(long aExplosionPower) { + + } +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java new file mode 100644 index 0000000000..a3c11d486b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java @@ -0,0 +1,574 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.data.ArrayUtils; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_TieredMachineBlock { + + /*sides.put(getUp()); + sides.put(getDown()); + sides.put(getXPos()); + sides.put(getXNeg()); + sides.put(getZPos()); + sides.put(getZNeg());*/ + + public int mItemCount = 0; + public ItemStack mItemStack = null; + private final static double mStorageFactor = 2; + + //Meta Tile ID + public final static int mCrateID = 955; + + //Sides + public final static int SIDE_Up = 0; + public final static int SIDE_Down = 1; + public final static int SIDE_XPos = 2; + public final static int SIDE_XNeg = 3; + public final static int SIDE_ZPos = 4; + public final static int SIDE_ZNeg = 5; + public final static int[] SIDES = new int[] {SIDE_Up, SIDE_Down, SIDE_XPos, SIDE_XNeg, SIDE_ZPos, SIDE_ZNeg}; + + //Neighbour Cache + private GT_MetaTileEntity_ConnectableCrate[] mNeighbourCache = new GT_MetaTileEntity_ConnectableCrate[6]; + //Cached Crate Location + private BlockPos mCurrentPos = null; + //Master Crate Position + protected BlockPos mMasterCrateLocation = null; + //Is Master? + protected boolean mIsMaster = false; + //Is Connected? + protected boolean mIsConnected[] = new boolean[] {false, false, false, false, false, false}; + //How many are connected? + protected int mConnectedCount = 0; + //Map of connected locations + protected AutoMap mConnectedCache = new AutoMap(); + + + public GT_MetaTileEntity_ConnectableCrate(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 3, + "This Crate stores " + (int) (Math.pow(6.0D, (double) aTier) * mStorageFactor) + " Items", new ITexture[0]); + } + + public GT_MetaTileEntity_ConnectableCrate(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip}; + } + + public boolean isSimpleMachine() { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return true; + } + + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + public boolean isValidSlot(int aIndex) { + return true; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ConnectableCrate(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public int getOppositeSide(int side) { + if (side == SIDE_Up) { + return SIDE_Down; + } + else if (side == SIDE_Down) { + return SIDE_Up; + } + else if (side == SIDE_XNeg) { + return SIDE_XPos; + } + else if (side == SIDE_XPos) { + return SIDE_XNeg; + } + else if (side == SIDE_ZNeg) { + return SIDE_ZPos; + } + else { + return SIDE_ZNeg; + } + } + + public boolean calculateOwnershipIfConnected() { + if (mCurrentPos == null) { + mCurrentPos = new BlockPos(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld()); + } + AutoMap n = mCurrentPos.getSurroundingBlocks(); + int p = 0; + for (BlockPos i : n) { + if (i != null) { + if (doesSideContainCrate(p)) { + GT_MetaTileEntity_ConnectableCrate yu = getCrateAtBlockPos(i); + if (yu != null) { + mNeighbourCache[p] = yu; + } + } + } + p++; + } + + int e4 = 0; + if (mNeighbourCache.length > 0) { + for (GT_MetaTileEntity_ConnectableCrate e : mNeighbourCache) { + this.mConnectedCount = this.mConnectedCache.size(); + if (e != null) { + //First, we check if this Crate is a Master, if not, continue checking what it is. + if (this.mIsMaster) { + //So this other Crate is also a master? Which is more Powerful + if (e.mIsMaster) { + //This crate holds more connected, it becomes master now. + if (this.mConnectedCount > e.mConnectedCount) { + e.mIsMaster = false; + e.mMasterCrateLocation = this.mCurrentPos; + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + this.mConnectedCache = ArrayUtils.mergeTwoMaps(this.mConnectedCache, e.mConnectedCache); + continue; + } + //Other crate held more connected, it is now master. + else { + this.mIsMaster = false; + this.mMasterCrateLocation = e.mCurrentPos; + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + e.mConnectedCache = ArrayUtils.mergeTwoMaps(e.mConnectedCache, this.mConnectedCache); + //Best wipe our cache of connected blocks then, since they no longer hold value. + mConnectedCache.clear(); + continue; + } + } + //Other Crate was not a Master, but we are, time to inherit it into our connection hivemind. + else { + //It would appear this controller has another master, time to query it. + if (e.mMasterCrateLocation != null && !e.mMasterCrateLocation.getUniqueIdentifier().equalsIgnoreCase(this.mMasterCrateLocation.getUniqueIdentifier())) { + GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation); + if (gM != null) { + //Lets compare controller strengths + int gM_Owned = gM.mConnectedCount; + //We are stronger, let's inherit it. + if (this.mConnectedCount > gM_Owned) { + e.mIsMaster = false; + e.mMasterCrateLocation = this.mCurrentPos; + gM.mIsMaster = false; + gM.mMasterCrateLocation = this.mCurrentPos; + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + this.mConnectedCache = ArrayUtils.mergeTwoMaps(this.mConnectedCache, gM.mConnectedCache); + continue; + } + //We lost, time to submit to a new master crate + else { + this.mIsMaster = false; + this.mMasterCrateLocation = e.mMasterCrateLocation; + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + gM.mConnectedCache = ArrayUtils.mergeTwoMaps(gM.mConnectedCache, this.mConnectedCache); + //Best wipe our cache of connected blocks then, since they no longer hold value. + mConnectedCache.clear(); + continue; + } + } + else { + //Could not get the Tile Entity for the Other Master Crate.. Guess I can just ignore this case for now~ TODO + continue; + } + } + //Either the other crate has no known Master or it is already this crate. + else { + //The other crate has no master, time to inherit. + if (e.mMasterCrateLocation == null || (!e.mIsConnected[getOppositeSide(e4)])) { + e.mMasterCrateLocation = this.mCurrentPos; + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + mConnectedCache.put(e.mCurrentPos.getUniqueIdentifier()); + continue; + } + else { + //Do nothing, we own this Crate already :) + continue; + } + + + } + } + } + + //We are not a Storage Master Crate, into a brave new world we go + else { + //Best wipe our cache of connected blocks then, since they no longer hold value. + mConnectedCache.clear(); + + //Dang, the other crate is a master, time to get incorporated. + if (e.mIsMaster) { + this.mIsMaster = false; + this.mMasterCrateLocation = e.mCurrentPos; + this.mIsConnected[e4] = true; + if (!e.mIsConnected[e4]) { + e.mIsConnected[e4] = true; + } + if (e.mMasterCrateLocation == null) { + e.mMasterCrateLocation = e.mCurrentPos; + } + e.mConnectedCache.put(this.mCurrentPos.getUniqueIdentifier()); + continue; + } + //So the Crate we Checked is not a Master, so let's see if it knows where one is + else { + //So, this Crate we have found knows about a master + if (e.mMasterCrateLocation != null) { + GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation); + //Found the master crate + if (gM != null) { + this.mIsMaster = false; + this.mMasterCrateLocation = e.mMasterCrateLocation; + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + gM.mConnectedCache.put(this.mCurrentPos.getUniqueIdentifier()); + continue; + } + else { + //Could not get the Tile Entity for the Other Master Crate.. Guess I can just ignore this case for now~ TODO + continue; + } + } + //This crate has no master, not going to check if it's connected. + else { + this.mIsMaster = true; + this.mMasterCrateLocation = this.mCurrentPos; + e.mIsMaster = false; + e.mMasterCrateLocation = this.mCurrentPos; + if (!e.mIsConnected[getOppositeSide(e4)]) { + e.mIsConnected[getOppositeSide(e4)] = true; + } + if (!this.mIsConnected[e4]) { + this.mIsConnected[e4] = true; + } + mConnectedCache.put(e.mCurrentPos.getUniqueIdentifier()); + continue; + } + } + } + } + e4++; + } + return true; + } + else { + return false; + } + + + + + } + + public boolean doesSideContainCrate(int side) { + return checkSideForDataType(0, side); + } + + public boolean isCrateAtSideController(int side) { + return checkSideForDataType(1, side); + } + + private boolean checkSideForDataType(int aType, int aSide) { + BlockPos mPosToCheck = + aSide == SIDE_Up ? mCurrentPos.getUp() : + aSide == SIDE_Down ? mCurrentPos.getDown() : + aSide == SIDE_XPos ? mCurrentPos.getXPos() : + aSide == SIDE_XNeg ? mCurrentPos.getXNeg() : + aSide == SIDE_ZPos ? mCurrentPos.getZPos() : + mCurrentPos.getZNeg(); + GT_MetaTileEntity_ConnectableCrate g = getCrateAtBlockPos(mPosToCheck); + if (g != null) { + if (aType == 0) { + return true; + } + else { + if (g.mIsMaster) { + return true; + } + } + } + return false; + } + + public GT_MetaTileEntity_ConnectableCrate getCrateAtBlockPos(BlockPos pos) { + if (pos != null) { + Block b = pos.getBlockAtPos(); + int m = pos.getMetaAtPos(); + TileEntity t = pos.world.getTileEntity(pos.xPos, pos.yPos, pos.zPos); + if (b != null && t != null) { + if (b == GregTech_API.sBlockMachines && m == mCrateID) { + if (t instanceof IGregTechTileEntity) { + IGregTechTileEntity g = (IGregTechTileEntity) t; + final IMetaTileEntity aMetaTileEntity = g.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return null; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_ConnectableCrate) { + return ((GT_MetaTileEntity_ConnectableCrate) aMetaTileEntity); + + } + } + } + } + } + return null; + } + + + + + + + + + + + + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } else { + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + } + + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_SuperChest(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_SuperChest(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); + } + + + + + + + + + + + + + + + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) { + if (this.getItemCount() <= 0) { + this.mItemStack = null; + this.mItemCount = 0; + } + + if (this.mItemStack == null && this.mInventory[0] != null) { + this.mItemStack = this.mInventory[0].copy(); + } + + if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount() + && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) { + this.mItemCount += this.mInventory[0].stackSize; + if (this.mItemCount > this.getMaxItemCount()) { + this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount(); + this.mItemCount = this.getMaxItemCount(); + } else { + this.mInventory[0] = null; + } + } + + if (this.mInventory[1] == null && this.mItemStack != null) { + this.mInventory[1] = this.mItemStack.copy(); + this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); + this.mItemCount -= this.mInventory[1].stackSize; + } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) + && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { + int tmp = Math.min(this.mItemCount, + this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); + this.mInventory[1].stackSize += tmp; + this.mItemCount -= tmp; + } + + if (this.mItemStack != null) { + this.mInventory[2] = this.mItemStack.copy(); + this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); + } else { + this.mInventory[2] = null; + } + } + + } + + private int getItemCount() { + return this.mItemCount; + } + + public void setItemCount(int aCount) { + this.mItemCount = aCount; + } + + public int getProgresstime() { + return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize) + + (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize); + } + + public int maxProgresstime() { + return this.getMaxItemCount(); + } + + public int getMaxItemCount() { + return (int) (Math.pow(6.0D, (double) this.mTier) * mStorageFactor - 128.0D); + } + + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 1; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 0 && (this.mInventory[0] == null || GT_Utility.areStacksEqual(this.mInventory[0], aStack)); + } + + public String[] getInfoData() { + return this.mItemStack == null + ? new String[]{"Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0), + Integer.toString(this.getMaxItemCount())} + : new String[]{"Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(), + Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount())}; + } + + public boolean isGivingInformation() { + return true; + } + + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mItemCount", this.mItemCount); + if (this.mItemStack != null) { + aNBT.setTag("mItemStack", this.mItemStack.writeToNBT(new NBTTagCompound())); + } + aNBT.setString("mMasterCrateLocation", mMasterCrateLocation.getUniqueIdentifier()); + aNBT.setBoolean("mIsMaster", mIsMaster); + for (int y=0;y this.getMaxItemCount()) { + this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount(); + this.mItemCount = this.getMaxItemCount(); + } else { + this.mInventory[0] = null; + } + } + + if (this.mInventory[1] == null && this.mItemStack != null) { + this.mInventory[1] = this.mItemStack.copy(); + this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); + this.mItemCount -= this.mInventory[1].stackSize; + } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) + && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { + int tmp = Math.min(this.mItemCount, + this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); + this.mInventory[1].stackSize += tmp; + this.mItemCount -= tmp; + } + + if (this.mItemStack != null) { + this.mInventory[2] = this.mItemStack.copy(); + this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); + } else { + this.mInventory[2] = null; + } + } + + } + + private int getItemCount() { + return this.mItemCount; + } + + public void setItemCount(int aCount) { + this.mItemCount = aCount; + } + + public int getProgresstime() { + return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize) + + (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize); + } + + public int maxProgresstime() { + return this.getMaxItemCount(); + } + + public int getMaxItemCount() { + return (int) (Math.pow(6.0D, (double) this.mTier) * mStorageFactor - 128.0D); + } + + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 1; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 0 && (this.mInventory[0] == null || GT_Utility.areStacksEqual(this.mInventory[0], aStack)); + } + + public String[] getInfoData() { + return this.mItemStack == null + ? new String[]{"Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0), + Integer.toString(this.getMaxItemCount())} + : new String[]{"Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(), + Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount())}; + } + + public boolean isGivingInformation() { + return true; + } + + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mItemCount", this.mItemCount); + if (this.mItemStack != null) { + aNBT.setTag("mItemStack", this.mItemStack.writeToNBT(new NBTTagCompound())); + } + + } + + public void loadNBTData(NBTTagCompound aNBT) { + if (aNBT.hasKey("mItemCount")) { + this.mItemCount = aNBT.getInteger("mItemCount"); + } + + if (aNBT.hasKey("mItemStack")) { + this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack")); + } + + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { + return aBaseMetaTileEntity.getFrontFacing() == 0 && aSide == 4 + ? new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], + new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)} + : (aSide == aBaseMetaTileEntity.getFrontFacing() + ? new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], + new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)} + : new ITexture[]{BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]}); + } + + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return new ITexture[0][0][0]; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java new file mode 100644 index 0000000000..ef7fe829d4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java @@ -0,0 +1,160 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.preloader.asm.AsmConfig; + +public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank { + + public GT_MetaTileEntity_TieredTank(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid"); + } + + public GT_MetaTileEntity_TieredTank(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid", aTextures); + } + + @Override + public String[] getDescription() { + String[] aTip; + + String aTankPortableness = "portable"; + + if (this.mFluid == null) { + aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", CORE.GT_Tooltip}; + } + else { + aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", "Fluid: "+mFluid.getLocalizedName()+" "+mFluid.amount+"L", CORE.GT_Tooltip}; + } + return aTip; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + return new ITexture[0][0][0]; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(final byte aFacing) { + return true; + } + + @Override + public boolean isAccessAllowed(final EntityPlayer aPlayer) { + return true; + } + + @Override + public final byte getUpdateData() { + return 0x00; + } + + @Override + public boolean doesFillContainers() { + return true; + } + + @Override + public boolean doesEmptyContainers() { + return true; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return true; + } + + @Override + public String[] getInfoData() { + + if (this.mFluid == null) { + return new String[]{ + GT_Values.VOLTAGE_NAMES[this.mTier]+" Fluid Tank", + "Stored Fluid:", + "No Fluid", + Integer.toString(0) + "L", + Integer.toString(this.getCapacity()) + "L"}; + } + return new String[]{ + GT_Values.VOLTAGE_NAMES[this.mTier]+" Fluid Tank", + "Stored Fluid:", + this.mFluid.getLocalizedName(), + Integer.toString(this.mFluid.amount) + "L", + Integer.toString(this.getCapacity()) + "L"}; + } + + @Override + public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_TieredTank(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public int getCapacity() { + return (int) (Math.pow(2, this.mTier) * 32000); + } + + @Override + public int getTankPressure() { + return 100; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()){ + //setVars(); + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public boolean displaysItemStack() { + return true; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) { + if (mFluid != null){ + Logger.WARNING("Setting item fluid nbt"); + aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound())); + if (aNBT.hasKey("mFluid")) { + Logger.WARNING("Set mFluid to NBT."); + } + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java new file mode 100644 index 0000000000..320e2175b0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java @@ -0,0 +1,421 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import static gregtech.api.enums.GT_Values.V; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_1by1; +import gregtech.api.gui.GT_GUIContainer_1by1; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity { + + protected byte aCurrentOutputAmperage = 4; + + public GregtechMetaEnergyBuffer(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final int aSlotCount) { + super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription); + } + + public GregtechMetaEnergyBuffer(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures, final int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, + "Defaults 4A In/Out", + "Change output Amperage with a screwdriver", + "Now Portable!", + CORE.GT_Tooltip}; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { + return true; + } + return super.allowCoverOnSide(aSide, aCover); + } + + /* + * MACHINE_STEEL_SIDE + */ + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)}; + } + + /*@Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[2][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture( + Textures.BlockIcons.MACHINE_HEATPROOFCASING) }; + rTextures[1][i + 1] = new ITexture[] { + new GT_RenderedTexture( + Textures.BlockIcons.MACHINE_HEATPROOFCASING), + mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] + : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; + } + return rTextures; + }*/ + + /* + * @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { + * ITexture[][][] rTextures = new ITexture[5][17][]; for (byte i = -1; i < + * 16; i = (byte) (i + 1)) { ITexture[] tmp0 = { new GT_RenderedTexture( + * Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, + * Dyes._NULL.mRGBa)) }; rTextures[0][(i + 1)] = tmp0; ITexture[] tmp1 = { + * new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_TOP) }; + * rTextures[1][(i + 1)] = tmp1; ITexture[] tmp2 = { new GT_RenderedTexture( + * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, + * Dyes._NULL.mRGBa)), new + * GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; rTextures[2][(i + + * 1)] = tmp2; ITexture[] tmp4 = { new GT_RenderedTexture( + * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, + * Dyes._NULL.mRGBa)), new + * GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; rTextures[3][(i + + * 1)] = tmp4; ITexture[] tmp5 = { new GT_RenderedTexture( + * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, + * Dyes._NULL.mRGBa)), new GT_RenderedTexture( + * Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; rTextures[4][(i + 1)] = tmp5; + * } return rTextures; } + */ + + /*@Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return mTextures[aSide == aFacing ? 1 : 0][aColorIndex+1]; + }*/ + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaEnergyBuffer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length); + } + + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isElectric() {return true;} + @Override public boolean isValidSlot(final int aIndex) {return true;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isEnetOutput() {return true;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return V[this.mTier]*2;} + @Override public long maxEUStore() {return V[this.mTier]*250000;} + + @Override + public long maxEUInput() { + return V[this.mTier]; + } + + @Override + public long maxEUOutput() { + return V[this.mTier]; + } + + @Override + public long maxAmperesIn() { + return aCurrentOutputAmperage; + } + + @Override + public long maxAmperesOut() { + return aCurrentOutputAmperage; + } + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} + @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + aNBT.setByte("aCurrentOutputAmperage", aCurrentOutputAmperage); + if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) { + long aEU = this.getBaseMetaTileEntity().getStoredEU(); + if (aEU > 0){ + aNBT.setLong("aStoredEU", aEU); + if (aNBT.hasKey("aStoredEU")) { + Logger.WARNING("Set aStoredEU to NBT."); + } + } + } + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + aCurrentOutputAmperage = aNBT.getByte("aCurrentOutputAmperage"); + if (aNBT.hasKey("aStoredEU")) { + this.setEUVar(aNBT.getLong("aStoredEU")); + } + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + Logger.WARNING("Right Click on MTE by Player"); + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + //aBaseMetaTileEntity.openGUI(aPlayer); + } + + Logger.WARNING("MTE is Client-side"); + this.showEnergy(aPlayer.getEntityWorld(), aPlayer); + return true; + } + + private void showEnergy(final World worldIn, final EntityPlayer playerIn){ + final long tempStorage = this.getBaseMetaTileEntity().getStoredEU(); + final double c = ((double) tempStorage / this.maxEUStore()) * 100; + final double roundOff = Math.round(c * 100.00) / 100.00; + PlayerUtils.messagePlayer(playerIn, "Energy: " + GT_Utility.formatNumbers(tempStorage) + " EU at "+V[this.mTier]+"v ("+roundOff+"%)"); + PlayerUtils.messagePlayer(playerIn, "Amperage: " + GT_Utility.formatNumbers(maxAmperesOut())+"A"); + + } + //Utils.LOG_WARNING("Begin Show Energy"); + /* + * + //Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" C: "+c); + Utils.LOG_INFO("getProgressTime: "+getProgresstime()); + Utils.LOG_INFO("maxProgressTime: "+maxProgresstime()); + Utils.LOG_INFO("getMinimumStoredEU: "+getMinimumStoredEU()); + Utils.LOG_INFO("maxEUStore: "+maxEUStore());*/ + /*final long d = (tempStorage * 100L) / maxEUStore(); + Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" D: "+d); + final double roundOff2 = Math.round(d * 100.00) / 100.00; + Utils.messagePlayer(playerIn, "Energy: " + tempStorage + " EU at "+V[mTier]+"v ("+roundOff2+"%)"); + Utils.LOG_WARNING("Making new instance of Guihandler"); + GuiHandler block = new GuiHandler(); + Utils.LOG_WARNING("Guihandler.toString(): "+block.toString()); + block.getClientGuiElement(1, playerIn, worldIn, (int) playerIn.posX, (int) playerIn.posY, (int) playerIn.posZ);*/ + + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_1by1(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public String[] getInfoData() { + String cur = GT_Utility.formatNumbers(this.getBaseMetaTileEntity().getStoredEU()); + String max = GT_Utility.formatNumbers(this.getBaseMetaTileEntity().getEUCapacity()); + + // Right-align current storage with maximum storage + String fmt = String.format("%%%ds", max.length()); + cur = String.format(fmt, cur); + + return new String[] { + cur+" EU stored", + max+" EU capacity"}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { + } + + @Override + public String getInventoryName() { + return super.getInventoryName(); + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return false; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { + return false; + } + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) { + aNBT.setByte("aCurrentOutputAmperage", aCurrentOutputAmperage); + long aEU = this.getBaseMetaTileEntity().getStoredEU(); + if (aEU > 0){ + aNBT.setLong("aStoredEU", aEU); + if (aNBT.hasKey("aStoredEU")) { + Logger.WARNING("Set aStoredEU to NBT."); + } + } + } + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + byte aTest = (byte) (aCurrentOutputAmperage + 1); + if (aTest > 16 || aTest <= 0 ) { + aTest = 1; + } + aCurrentOutputAmperage = aTest; + PlayerUtils.messagePlayer(aPlayer, "Now handling "+aCurrentOutputAmperage+" Amps."); + } + + + + + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java new file mode 100644 index 0000000000..63042d4702 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java @@ -0,0 +1,62 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import net.minecraft.entity.player.InventoryPlayer; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SafeBlock; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_SafeBlock; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase; + +public class GregtechMetaSafeBlock +extends GregtechMetaSafeBlockBase { + + public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier) { + super(aID, aName, aNameRegional, aTier, 28, "Protecting your items from sticky fingers."); + } + + public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier, final int aInvSlotCount, final String aDescription) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); + } + + public GregtechMetaSafeBlock(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip}; + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaSafeBlock(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + } + + @Override + public ITexture getOverlayIcon() { + return new GT_RenderedTexture(Textures.BlockIcons.VOID); + } + + @Override + public boolean isValidSlot(final int aIndex) { + return aIndex < (this.mInventory.length - 1); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_SafeBlock(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_SafeBlock(aPlayerInventory, aBaseMetaTileEntity); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java new file mode 100644 index 0000000000..fb37f33055 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java @@ -0,0 +1,105 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; + +public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_TieredChest { + + public GT_MetaTileEntity_InfiniteItemHolder(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_InfiniteItemHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip}; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.getWorld().isRemote) { + return false; + } + + if (!KeyboardUtils.isShiftKeyDown()) { + if (this.mItemStack == null) { + if (aPlayer.getHeldItem() != null) { + this.mItemStack = aPlayer.getHeldItem().copy(); + this.mItemCount = Short.MAX_VALUE; + aPlayer.setCurrentItemOrArmor(0, null); + PlayerUtils.messagePlayer(aPlayer, "Now holding "+this.mItemStack.getDisplayName()+" x"+Short.MAX_VALUE+"."); + return true; + } + } + else { + if (aPlayer.getHeldItem() == null) { + aPlayer.entityDropItem(mItemStack, 1); + this.mItemStack = null; + this.mItemCount = 0; + PlayerUtils.messagePlayer(aPlayer, "Emptying."); + return true; + } + } + } + + PlayerUtils.messagePlayer(aPlayer, "Currently holding: "+(this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing")+" x"+this.mItemCount); + return true; + //return super.onRightclick(aBaseMetaTileEntity, aPlayer); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (mItemStack != null) { + setItemCount(0); + } + super.onPostTick(aBaseMetaTileEntity, aTimer); + } + + @Override + public void setItemCount(int aCount) { + super.setItemCount(Short.MAX_VALUE); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return true; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_InfiniteItemHolder(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java new file mode 100644 index 0000000000..43d5cffe82 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java @@ -0,0 +1,359 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; + +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.enums.*; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.GT_MetaGenerated_Tool_01; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; + +public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric { + public byte mType = 0; + public String mOldDesc = ""; + public boolean mLocked = false; + protected byte mIndex = (byte) MathUtils.randInt(1, 3); + public static GT_RenderedTexture texBottom = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_bottom")); + public static GT_RenderedTexture texTop = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_top")); + public static GT_RenderedTexture texSide = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side")); + public static GT_RenderedTexture texSideCabinet = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side_cabinet")); + + public GT4Entity_Shelf(final int aID, final String aName, final String aNameRegional, final String aDescription) { + super(aID, aName, aNameRegional, 0, aDescription); + mOldDesc = aDescription; + } + + public GT4Entity_Shelf(final String aName, final String aDescription, final ITexture[][][] aTextures) { + super(aName, 0, aDescription, aTextures); + mOldDesc = aDescription; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + public int getInvSize() { + return 1; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + if (this.getBaseMetaTileEntity().getOwnerName().equalsIgnoreCase(aPlayer.getDisplayName())) { + return true; + } + PlayerUtils.messagePlayer(aPlayer, "This container belongs to "+this.getBaseMetaTileEntity().getOwnerName()+"."); + return false; + } + + @Override + public boolean ownerControl() { + return false; + } + + @Override + public boolean isEnetOutput() { + return false; + } + + @Override + public boolean isEnetInput() { + return false; + } + + @Override + public boolean isOutputFacing(final byte aSide) { + return aSide != this.getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public boolean isInputFacing(byte aSide) { + return false; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) { + if (aTile.isClientSide()) { + return true; + } + ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem); + if (tStack == null) { + if (KeyboardUtils.isCtrlKeyDown()) { + if (this.mInventory[0] != null) { + PlayerUtils.messagePlayer(aPlayer, "Contains "+this.mInventory[0].getDisplayName()+" x"+this.mInventory[0].stackSize+"."); + } + return false; + } + else { + if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) { + if (!this.mLocked) { + PlayerUtils.messagePlayer(aPlayer, "Removed "+this.mInventory[0].getDisplayName()+" x"+this.mInventory[0].stackSize+"."); + aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]); + getBaseMetaTileEntity().setInventorySlotContents(0, null); + this.mType = 0; + return true; + } + else { + PlayerUtils.messagePlayer(aPlayer, "This container is locked. It belongs to "+aTile.getOwnerName()+"."); + return false; + } + } + return false; + } + } + else if (tStack != null && this.mInventory[0] == null) { + + if (KeyboardUtils.isCtrlKeyDown() || GT_MetaGenerated_Tool_01.class.isInstance(tStack.getItem())) { + return false; + } + PlayerUtils.messagePlayer(aPlayer, "Stored "+tStack.getDisplayName()+" x"+tStack.stackSize+"."); + aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null); + getBaseMetaTileEntity().setInventorySlotContents(0, tStack); + this.mType = (byte) MathUtils.randInt(1, 3); + return true; + } + else { + if (this.mInventory[0] == null) { + this.mType = 0; + } + return super.onRightclick(aTile, aPlayer); + } + } + + @Override + public void onLeftclick(IGregTechTileEntity aTile,EntityPlayer aPlayer) { + if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) { + ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] }); + if (!aPlayer.isSneaking()) { + tOutput.stackSize = 1; + } + getBaseMetaTileEntity().decrStackSize(0, tOutput.stackSize); + EntityItem tEntity = new EntityItem(getBaseMetaTileEntity().getWorld(), + getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, + getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, + getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, tOutput); + tEntity.motionX = 0.0D; + tEntity.motionY = 0.0D; + tEntity.motionZ = 0.0D; + getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity); + if (this.mInventory[0] == null) { + this.mType = 0; + } + } + super.onLeftclick(aTile, aPlayer); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_Shelf(this.mName, this.mDescription, this.mTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) {//mLocked + aNBT.setInteger("mType", this.mType); + aNBT.setBoolean("mLocked", this.mLocked); + aNBT.setByte("mIndex", this.mIndex); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + if (aNBT.hasKey("mIndex")) { + this.mType = ((byte) aNBT.getInteger("mType")); + } + if (aNBT.hasKey("mIndex")) { + this.mLocked = (aNBT.getBoolean("mLocked")); + } + if (aNBT.hasKey("mIndex")) { + this.mIndex = aNBT.getByte("mIndex"); + } + } + + @Override + public void onValueUpdate(byte aValue) { + this.mType = aValue; + } + + @Override + public byte getUpdateData() { + return this.mType; + } + + @Override + public String[] getDescription() { + return new String[] { + mOldDesc, + "Decorative Item Storage", + "Right click to store/remove something", + "Ctrl + Rmb to check contents", + "Ctrl + Rmb with a screwdriver to lock", + }; + } + + @Override + public byte getTileEntityBaseType() { + return 0; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + //return aSide != getBaseMetaTileEntity().getFrontFacing(); + return false; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) { + return true; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) { + return false; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[7][17][]; + for (byte i = -1; i < 16; i = (byte) (i + 1)) { + ITexture[] tmp0 = {this.getBottom((byte) 0)[0]}; + rTextures[0][(i + 1)] = tmp0; + ITexture[] tmp1 = { this.getTop((byte) 0)[0]}; + rTextures[1][(i + 1)] = tmp1; + ITexture[] tmp2 = { this.getSides((byte) 0)[0]}; + rTextures[2][(i + 1)] = tmp2; + ITexture[] tmp4 = {this.getSides((byte) 0)[0]}; + rTextures[3][(i + 1)] = tmp4; + ITexture[] tmp5 = {this.getSides((byte) 0)[0], getFront((byte) 0)[0]}; + rTextures[4][(i + 1)] = tmp5; + ITexture[] tmp6 = {this.getSides((byte) 0)[0], getFront((byte) 1)[0]}; + rTextures[5][(i + 1)] = tmp6; + ITexture[] tmp7 = {this.getSides((byte) 0)[0], getFront((byte) 2)[0]}; + rTextures[6][(i + 1)] = tmp7; + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, + final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, + final boolean aRedstone) { + + ITexture[] tmp = this.mTextures[(aSide >= 2) ? ((aSide != aFacing) ? 2 : ((byte) this.mType == 0 ? 4 : this.mType == 1 || this.mType == 2 ? 5 : this.mType == 3 ? 6 : 0)) : aSide][aColorIndex + 1]; + if (aSide != aFacing && tmp.length == 2) { + tmp = new ITexture[]{tmp[0]}; + } + return tmp; + } + + private static GT_RenderedTexture x1 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_FRONT); + private static GT_RenderedTexture x2 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_PAPER_FRONT); + private static GT_RenderedTexture x3 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_CANS_FRONT); + + public ITexture[] getFrontNormal() { + return new ITexture[]{x1}; + } + public ITexture[] getFrontActive() { + return new ITexture[]{x2}; + } + public ITexture[] getFrontAlternative() { + return new ITexture[]{x3}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log)}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } + + public ITexture[] getFrontActive(final byte aColor) { + return this.getFrontNormal(); + } + + public ITexture[] getBackActive(final byte aColor) { + return this.getBack(aColor); + } + + public ITexture[] getBottomActive(final byte aColor) { + return this.getBottom(aColor); + } + + public ITexture[] getTopActive(final byte aColor) { + return this.getTop(aColor); + } + + public ITexture[] getSidesActive(final byte aColor) { + return this.getSides(aColor); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + public ITexture[] getFront(byte aColour) { + if (aColour == 1) { + return getFrontActive(); + } + else if (aColour == 2) { + return getFrontAlternative(); + } + return getFrontNormal(); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (KeyboardUtils.isCtrlKeyDown()) { + if (!aPlayer.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) { + PlayerUtils.messagePlayer(aPlayer, "Container is not yours to lock."); + } + else { + this.mLocked = Utils.invertBoolean(this.mLocked); + if (this.mLocked) { + PlayerUtils.messagePlayer(aPlayer, "Container is now locked."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Container is now unlocked."); + } + } + } + else { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java new file mode 100644 index 0000000000..7dcb76a22e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java @@ -0,0 +1,39 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; + +import net.minecraft.entity.player.EntityPlayer; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf { + + + public GT4Entity_Shelf_Compartment(final int aID, final String aName, final String aNameRegional, final String aDescription) { + super(aID, aName, aNameRegional, aDescription); + } + + public GT4Entity_Shelf_Compartment(String mName, String mDescriptionArray, ITexture[][][] mTextures) { + super(mName, mDescriptionArray, mTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_Shelf_Compartment(this.mName, this.mDescription, this.mTextures); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) { + this.mType = ((byte) ((this.mType + 1) % 16)); + PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+"."); + } + } + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0]}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java new file mode 100644 index 0000000000..2c7186a3ce --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java @@ -0,0 +1,45 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf { + + public GT4Entity_Shelf_Desk(final int aID, final String aName, final String aNameRegional, final String aDescription) { + super(aID, aName, aNameRegional, aDescription); + } + + public GT4Entity_Shelf_Desk(String mName, String mDescriptionArray, ITexture[][][] mTextures) { + super(mName, mDescriptionArray, mTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_Shelf_Desk(this.mName, this.mDescription, this.mTextures); + } + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java new file mode 100644 index 0000000000..93bb7d5bb9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; + +import net.minecraft.entity.player.EntityPlayer; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; + +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; + +public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf { + + public GT4Entity_Shelf_FileCabinet(final int aID, final String aName, final String aNameRegional, final String aDescription) { + super(aID, aName, aNameRegional, aDescription); + } + + public GT4Entity_Shelf_FileCabinet(String mName, String mDescriptionArray, ITexture[][][] mTextures) { + super(mName, mDescriptionArray, mTextures); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) { + this.mType = ((byte) ((this.mType + 1) % 16)); + PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+"."); + } + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_Shelf_FileCabinet(this.mName, this.mDescription, this.mTextures); + } + + @Override + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{texSide}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{texBottom}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{texTop}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{texSide}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java new file mode 100644 index 0000000000..606496501f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java @@ -0,0 +1,41 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; + +public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf { + + public GT4Entity_Shelf_Iron(final int aID, final String aName, final String aNameRegional, final String aDescription) { + super(aID, aName, aNameRegional, aDescription); + } + + public GT4Entity_Shelf_Iron(String mName, String mDescriptionArray, ITexture[][][] mTextures) { + super(mName, mDescriptionArray, mTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_Shelf_Iron(this.mName, this.mDescription, this.mTextures); + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{texSideCabinet}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{texSide}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{texBottom}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{texTop}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{texSide}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java new file mode 100644 index 0000000000..cc17f49d83 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java @@ -0,0 +1,266 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTBase; +import net.minecraft.nbt.NBTTagCompound; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest; +import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest; + +public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { + + private final int mSize; + public int mItemCount; + public ItemStack mItemStack; + + + public GT4Entity_Shelf_Large(final int aID, final String aName, final String aNameRegional, final String aDescription, final int aSize) { + super(aID, aName, aNameRegional, aDescription); + this.mSize = aSize; + this.mItemCount = 0; + this.mItemStack = null; + } + + public GT4Entity_Shelf_Large(String mName, String mDescriptionArray, final int aSize, ITexture[][][] mTextures) { + super(mName, mDescriptionArray, mTextures); + this.mSize = aSize; + this.mItemCount = 0; + this.mItemStack = null; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT4Entity_Shelf_Large(this.mName, this.mDescription, mSize, this.mTextures); + } + + /*@Override + public int getInvSize() { + return (mSize > 0 && mSize < 255 ? mSize : 255); + }*/ + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public boolean isDigitalChest() { + return true; + } + + @Override + public boolean isValidSlot(final int aIndex) { + return true; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + if (KeyboardUtils.isCtrlKeyDown()) { + String itemName = (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing."); + String itemAmount = (this.mItemCount > 0 ? ""+this.mItemCount : "bad"); + String itemMessage = "This container currently holds "+(itemAmount.equalsIgnoreCase("bad") ? "nothing." : itemName+" x"+itemAmount+"."); + PlayerUtils.messagePlayer(aPlayer, itemMessage); + } + else { + aBaseMetaTileEntity.openGUI(aPlayer); + } + return true; + } + + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return new CONTAINER_SuperChest(aPlayerInventory, aBaseMetaTileEntity); + } + + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, + final IGregTechTileEntity aBaseMetaTileEntity) { + return new GUI_SuperChest(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName()); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mItemCount", this.mItemCount); + if (this.mItemStack != null) { + aNBT.setTag("mItemStack", (NBTBase) this.mItemStack.writeToNBT(new NBTTagCompound())); + } + super.saveNBTData(aNBT); + + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + if (aNBT.hasKey("mItemCount")) { + this.mItemCount = aNBT.getInteger("mItemCount"); + } + if (aNBT.hasKey("mItemStack")) { + this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack")); + } + super.loadNBTData(aNBT); + } + + @Override + public void onOpenGUI() { + super.onOpenGUI(); + } + + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { + if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) { + try { + if (this.mInventory[0] != null) { + this.mType = (byte) this.mIndex; + } + else { + this.mType = 0; + } + + if (this.getItemCount() <= 0) { + this.mItemStack = null; + this.mItemCount = 0; + } + if (this.mItemStack == null && this.mInventory[0] != null) { + this.mItemStack = this.mInventory[0].copy(); + } + if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount() + && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) { + this.mItemCount += this.mInventory[0].stackSize; + if (this.mItemCount > this.getMaxItemCount()) { + this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount(); + this.mItemCount = this.getMaxItemCount(); + } else { + this.mInventory[0] = null; + } + } + if (this.mInventory[1] == null && this.mItemStack != null) { + this.mInventory[1] = this.mItemStack.copy(); + this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); + this.mItemCount -= this.mInventory[1].stackSize; + } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack) + && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) { + final int tmp = Math.min(this.mItemCount, + this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize); + final ItemStack itemStack = this.mInventory[1]; + itemStack.stackSize += tmp; + this.mItemCount -= tmp; + } + if (this.mItemStack != null) { + this.mInventory[2] = this.mItemStack.copy(); + this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount); + } else { + this.mInventory[2] = null; + } + } + catch (Throwable t) { + if (t instanceof ArrayIndexOutOfBoundsException) { + + } + } + } + } + + private int getItemCount() { + return this.mItemCount; + } + + public void setItemCount(final int aCount) { + this.mItemCount = aCount; + } + + public int getProgresstime() { + try { + return this.mItemCount + ((this.mInventory[0] == null) ? 0 : this.mInventory[0].stackSize) + + ((this.mInventory[1] == null) ? 0 : this.mInventory[1].stackSize); + } + catch (Throwable t) { + return 0; + } + } + + public int maxProgresstime() { + return this.getMaxItemCount(); + } + + public int getMaxItemCount() { + return this.mSize; + } + + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return aIndex == 1; + } + + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, + final ItemStack aStack) { + return aIndex == 0 && ((this.mInventory[0] == null && this.mItemStack == null) || GT_Utility.areStacksEqual(this.mInventory[0], aStack) || (this.mItemStack != null && GT_Utility.areStacksEqual(this.mItemStack, aStack))); + } + + public String[] getInfoData() { + if (this.mItemStack == null) { + return new String[]{ + this.getLocalName(), "No Items Stored", "Free Space: "+Integer.toString(this.getMaxItemCount())}; + } + return new String[]{ + this.getLocalName(), + "Storing: "+this.mItemStack.getDisplayName()+" x"+Integer.toString(this.mItemCount), + "Space Remaining: "+Integer.toString(this.getMaxItemCount()-this.getItemCount())+"/"+Integer.toString(this.getMaxItemCount())}; + } + + @Override + public String[] getDescription() { + String[] mSuper = super.getDescription(); + String[] desc = new String[mSuper.length+1]; + for (int i=0;i>mSuper.length;i++) { + desc[i] = mSuper[i]; + } + desc[desc.length-1] = "Control + Rmb block to check contents"; + return desc; + } + + @Override + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + Logger.INFO("1:"+aIndex); + if (aIndex == 2) { + if (ItemStack.areItemStacksEqual(aStack, mItemStack)) { + return true; + } + else { + if (mItemStack == null) { + return true; + } + return false; + } + } + return super.isItemValidForSlot(aIndex, aStack); + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + Logger.INFO("2:"+aIndex); + if (aIndex == 0) { + if (ItemStack.areItemStacksEqual(aStack, mItemStack)) { + return true; + } + else { + if (mItemStack == null) { + return true; + } + return false; + } + } + return super.canInsertItem(aIndex, aStack, aSide); + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java new file mode 100644 index 0000000000..27f118e363 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java @@ -0,0 +1,199 @@ +package gtPlusPlus.xmod.gregtech.common.tools; + +import java.util.Arrays; +import java.util.List; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_None; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +public class TOOL_Gregtech_AngleGrinder +extends GT_Tool { + + public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + + + @Override + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf(".") + 1); + return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + @Override + public int getToolDamagePerBlockBreak() { + return 50; + } + + @Override + public int getToolDamagePerDropConversion() { + return 100; + } + + @Override + public int getToolDamagePerContainerCraft() { + return 400; + } + + @Override + public int getToolDamagePerEntityAttack() { + return 100; + } + + @Override + public int getBaseQuality() { + return 0; + } + + @Override + public float getBaseDamage() { + return 8.0F; + } + + @Override + public float getSpeedMultiplier() { + return 2F; + } + + @Override + public float getMaxDurabilityMultiplier() { + return 1.8F; + } + + @Override + public String getCraftingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(1)); + } + + @Override + public String getEntityHitSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(2)); + } + + @Override + public String getBreakingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + @Override + public String getMiningSound() { + return null; + } + + @Override + public boolean canBlock() { + return false; + } + + public boolean isWrench(){ + return false; + } + + @Override + public boolean isCrowbar() { + return false; + } + + @Override + public boolean isWeapon() { + return true; + } + + @Override + public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { + final String tTool = aBlock.getHarvestTool(aMetaData); + return (tTool != null) && (tTool.equals("sword") || tTool.equals("file")); + } + + + @Override + public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { + int rConversions = 0; + /*GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); + if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { + for (final ItemStack tDrop : aDrops) { + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); + if (tRecipe != null) { + final ItemStack tHammeringOutput = tRecipe.getOutput(0); + if (tHammeringOutput != null) { + rConversions += tDrop.stackSize; + tDrop.stackSize *= tHammeringOutput.stackSize; + tHammeringOutput.stackSize = tDrop.stackSize; + GT_Utility.setStack(tDrop, tHammeringOutput); + } + } + } + } else { + aDrops.clear(); + aDrops.add(tRecipe.getOutput(0)); + rConversions++; + }*/ + return rConversions; + } + + @Override + public ItemStack getBrokenItem(final ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return (IIconContainer) (aIsToolHead + ? TexturesGtTools.ANGLE_GRINDER + : ItemIcons.POWER_UNIT_HV); + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : Materials.TungstenSteel.mRGBa; + } + + + + + @Override + public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + try { + GT_Mod.achievements.issueAchievement(aPlayer, "tools"); + GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); + } catch (final Exception e) { + } + } + + @Override + public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Ground out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } + + @Override + public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { + aItem.addItemBehavior(aID, new Behaviour_None()); + } + + @Override + public boolean isGrafter() { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java new file mode 100644 index 0000000000..97f9a43187 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java @@ -0,0 +1,180 @@ +package gtPlusPlus.xmod.gregtech.common.tools; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EntityDamageSource; +import net.minecraft.util.IChatComponent; + +import gregtech.api.GregTech_API; +import gregtech.api.damagesources.GT_DamageSources; + +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats; +import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool; +import net.minecraftforge.event.world.BlockEvent; + +public abstract class TOOL_Gregtech_Base +implements Interface_ToolStats { + public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune}; + public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting}; + public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0]; + public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0]; + + @Override + public int getToolDamagePerBlockBreak() { + return 100; + } + + @Override + public int getToolDamagePerDropConversion() { + return 100; + } + + @Override + public int getToolDamagePerContainerCraft() { + return 800; + } + + @Override + public int getToolDamagePerEntityAttack() { + return 200; + } + + @Override + public float getSpeedMultiplier() { + return 1.0F; + } + + @Override + public float getMaxDurabilityMultiplier() { + return 1.0F; + } + + @Override + public int getHurtResistanceTime(final int aOriginalHurtResistance, final Entity aEntity) { + return aOriginalHurtResistance; + } + + @Override + public String getMiningSound() { + return null; + } + + @Override + public String getCraftingSound() { + return null; + } + + @Override + public String getEntityHitSound() { + return null; + } + + @Override + public String getBreakingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + @Override + public int getBaseQuality() { + return 0; + } + + @Override + public boolean canBlock() { + return false; + } + + @Override + public boolean isCrowbar() { + return false; + } + + @Override + public boolean isWrench() { + return false; + } + + @Override + public boolean isWeapon() { + return false; + } + + @Override + public boolean isRangedWeapon() { + return false; + } + + @Override + public boolean isMiningTool() { + return true; + } + + public boolean isChainsaw(){ + return false; + } + + + @Override + public boolean isGrafter(){ + return false; + } + + + @Override + public DamageSource getDamageSource(final EntityLivingBase aPlayer, final Entity aEntity) { + return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); + } + + public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { + return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity); + } + + @Override + public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { + return 0; + } + + @Override + public ItemStack getBrokenItem(final ItemStack aStack) { + return null; + } + + @Override + public Enchantment[] getEnchantments(final ItemStack aStack) { + return ZERO_ENCHANTMENTS; + } + + @Override + public int[] getEnchantmentLevels(final ItemStack aStack) { + return ZERO_ENCHANTMENT_LEVELS; + } + + @Override + public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { + aPlayer.triggerAchievement(AchievementList.openInventory); + aPlayer.triggerAchievement(AchievementList.mineWood); + aPlayer.triggerAchievement(AchievementList.buildWorkBench); + } + + @Override + public void onStatsAddedToTool(final Gregtech_MetaTool aItem, final int aID) { + } + + @Override + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + return aOriginalDamage; + } + + @Override + public float getMagicDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + return aOriginalDamage; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java new file mode 100644 index 0000000000..1fd1e8241a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java @@ -0,0 +1,196 @@ +package gtPlusPlus.xmod.gregtech.common.tools; + +import java.util.Arrays; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.tools.GT_Tool; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher; +import net.minecraftforge.event.world.BlockEvent; + +public class TOOL_Gregtech_Choocher +extends GT_Tool { + + public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + + + @Override + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf(".") + 1); + return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + @Override + public int getToolDamagePerBlockBreak() { + return 50; + } + + @Override + public int getToolDamagePerDropConversion() { + return 100; + } + + @Override + public int getToolDamagePerContainerCraft() { + return 400; + } + + @Override + public int getToolDamagePerEntityAttack() { + return 100; + } + + @Override + public int getBaseQuality() { + return 0; + } + + @Override + public float getBaseDamage() { + return 4.0F; + } + + @Override + public float getSpeedMultiplier() { + return 0.85F; + } + + @Override + public float getMaxDurabilityMultiplier() { + return 1.2F; + } + + @Override + public String getCraftingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(1)); + } + + @Override + public String getEntityHitSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(2)); + } + + @Override + public String getBreakingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + @Override + public String getMiningSound() { + return null; + } + + @Override + public boolean canBlock() { + return true; + } + + public boolean isWrench(){ + return true; + } + + @Override + public boolean isCrowbar() { + return false; + } + + @Override + public boolean isWeapon() { + return true; + } + + @Override + public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { + final String tTool = aBlock.getHarvestTool(aMetaData); + return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench")) || (tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge); + } + + @Override + public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { + int rConversions = 0; + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); + if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) { + for (final ItemStack tDrop : aDrops) { + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); + if (tRecipe != null) { + final ItemStack tHammeringOutput = tRecipe.getOutput(0); + if (tHammeringOutput != null) { + rConversions += tDrop.stackSize; + tDrop.stackSize *= tHammeringOutput.stackSize; + tHammeringOutput.stackSize = tDrop.stackSize; + GT_Utility.setStack(tDrop, tHammeringOutput); + } + } + } + } else { + aDrops.clear(); + aDrops.add(tRecipe.getOutput(0)); + rConversions++; + } + return rConversions; + } + + @Override + public ItemStack getBrokenItem(final ItemStack aStack) { + return null; + } + + @Override + public IIconContainer getIcon(final boolean aIsToolHead, final ItemStack aStack) { + //Utils.LOG_INFO("Texture: "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile()); + return TexturesGtTools.SKOOKUM_CHOOCHER; + } + + @Override + public short[] getRGBa(final boolean aIsToolHead, final ItemStack aStack) { + return GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa; + } + + @Override + public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + try { + GT_Mod.achievements.issueAchievement(aPlayer, "tools"); + GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); + } catch (final Exception e) { + } + } + + @Override + public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } + + @Override + public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { + aItem.addItemBehavior(aID, new Behaviour_Choocher()); + } + + @Override + public boolean isGrafter() { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java new file mode 100644 index 0000000000..7aa7529817 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java @@ -0,0 +1,192 @@ +package gtPlusPlus.xmod.gregtech.common.tools; + +import java.util.Arrays; +import java.util.List; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.items.behaviors.Behaviour_None; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.event.world.BlockEvent; + +public class TOOL_Gregtech_ElectricButcherKnife +extends GT_Tool { + + public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + + + @Override + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf(".") + 1); + return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + @Override + public int getToolDamagePerBlockBreak() { + return 100; + } + + @Override + public int getToolDamagePerDropConversion() { + return 100; + } + + @Override + public int getToolDamagePerContainerCraft() { + return 100; + } + + @Override + public int getToolDamagePerEntityAttack() { + return 200; + } + + @Override + public int getBaseQuality() { + return 0; + } + + @Override + public float getBaseDamage() { + return 8.0F; + } + + @Override + public float getSpeedMultiplier() { + return 2F; + } + + @Override + public float getMaxDurabilityMultiplier() { + return 1.8F; + } + + @Override + public String getCraftingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(1)); + } + + @Override + public String getEntityHitSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(2)); + } + + @Override + public String getBreakingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + @Override + public String getMiningSound() { + return null; + } + + @Override + public boolean canBlock() { + return false; + } + + public boolean isWrench(){ + return false; + } + + @Override + public boolean isCrowbar() { + return false; + } + + @Override + public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { + final String tTool = aBlock.getHarvestTool(aMetaData); + return (tTool != null) && (tTool.equals("sword") || tTool.equals("knife")); + } + + @Override + public ItemStack getBrokenItem(final ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return (IIconContainer) (aIsToolHead + ? TexturesGtTools.ELECTRIC_BUTCHER_KNIFE + : ItemIcons.POWER_UNIT_HV); + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : Materials.RedSteel.mRGBa; + } + + + + + @Override + public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + try { + GT_Mod.achievements.issueAchievement(aPlayer, "tools"); + GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); + } catch (final Exception e) { + } + } + + @Override + public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Sliced out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } + + @Override + public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { + aItem.addItemBehavior(aID, new Behaviour_None()); + } + + @Override + public boolean isGrafter() { + return false; + } + + @Override + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) { + return aOriginalHurtResistance * 2; + } + + @Override + public boolean isWeapon() { + return true; + } + + @Override + public boolean isMiningTool() { + return false; + } + + @Override + public Enchantment[] getEnchantments(ItemStack aStack) { + return LOOTING_ENCHANTMENT; + } + + @Override + public int[] getEnchantmentLevels(ItemStack aStack) { + return new int[]{(4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java new file mode 100644 index 0000000000..395a7c42cb --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java @@ -0,0 +1,166 @@ +package gtPlusPlus.xmod.gregtech.common.tools; + +import java.util.Arrays; +import java.util.List; + +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.tools.GT_Tool; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class TOOL_Gregtech_ElectricLighter +extends GT_Tool { + + public static final List mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"}); + + + @Override + public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) { + String tName = aEntity.getClass().getName(); + tName = tName.substring(tName.lastIndexOf(".") + 1); + return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; + } + + @Override + public int getToolDamagePerBlockBreak() { + return 50; + } + + @Override + public int getToolDamagePerDropConversion() { + return 100; + } + + @Override + public int getToolDamagePerContainerCraft() { + return 400; + } + + @Override + public int getToolDamagePerEntityAttack() { + return 100; + } + + @Override + public int getBaseQuality() { + return 0; + } + + @Override + public float getBaseDamage() { + return 8.0F; + } + + @Override + public float getSpeedMultiplier() { + return 2F; + } + + @Override + public float getMaxDurabilityMultiplier() { + return 1.8F; + } + + @Override + public String getCraftingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(1)); + } + + @Override + public String getEntityHitSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(2)); + } + + @Override + public String getBreakingSound() { + return GregTech_API.sSoundList.get(Integer.valueOf(0)); + } + + @Override + public String getMiningSound() { + return null; + } + + @Override + public boolean canBlock() { + return false; + } + + public boolean isWrench(){ + return false; + } + + @Override + public boolean isCrowbar() { + return false; + } + + @Override + public boolean isWeapon() { + return true; + } + + @Override + public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { + return false; + } + + @Override + public ItemStack getBrokenItem(final ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return (IIconContainer) (aIsToolHead + ? TexturesGtTools.ELECTRIC_LIGHTER + : ItemIcons.POWER_UNIT_HV); + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return !aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : Materials.Silver.mRGBa; + } + + @Override + public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + try { + GT_Mod.achievements.issueAchievement(aPlayer, "tools"); + GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); + } catch (final Exception e) { + } + } + + @Override + public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been burnt out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } + + @Override + public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) { + aItem.addItemBehavior(aID, new Behaviour_Electric_Lighter()); + } + + @Override + public boolean isGrafter() { + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java new file mode 100644 index 0000000000..2277ce339f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java @@ -0,0 +1,97 @@ +package gtPlusPlus.xmod.gregtech.common.tools; + +import gregtech.GT_Mod; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures.ItemIcons; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.items.GT_MetaGenerated_Tool; +import gregtech.common.tools.GT_Tool_WireCutter; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.stats.AchievementList; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; + +public class TOOL_Gregtech_ElectricSnips +extends GT_Tool_WireCutter { + + + @Override + public int getToolDamagePerBlockBreak() { + return 50; + } + + @Override + public int getToolDamagePerDropConversion() { + return 100; + } + + @Override + public int getToolDamagePerContainerCraft() { + return 400; + } + + @Override + public int getToolDamagePerEntityAttack() { + return 100; + } + + @Override + public int getBaseQuality() { + return 0; + } + + @Override + public float getBaseDamage() { + return 4.0F; + } + + @Override + public float getSpeedMultiplier() { + return 1F; + } + + @Override + public float getMaxDurabilityMultiplier() { + return 1.4F; + } + + @Override + public ItemStack getBrokenItem(final ItemStack aStack) { + return null; + } + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { + return (IIconContainer) (aIsToolHead + ? TexturesGtTools.ELECTRIC_SNIPS + : ItemIcons.POWER_UNIT_MV); + } + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { + return aIsToolHead + ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa + : Materials.TungstenSteel.mRGBa; + } + + + + @Override + public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) { + super.onToolCrafted(aStack, aPlayer); + aPlayer.triggerAchievement(AchievementList.buildSword); + try { + GT_Mod.achievements.issueAchievement(aPlayer, "tools"); + GT_Mod.achievements.issueAchievement(aPlayer, "unitool"); + } catch (final Exception e) { + } + } + + @Override + public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) { + return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Snipped out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java new file mode 100644 index 0000000000..4c8707e5e8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java @@ -0,0 +1,290 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.lang.reflect.*; +import java.util.HashMap; +import java.util.Map; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class GT_Material_Loader { + + private volatile static GT_Material_Loader instance = new GT_Material_Loader(); + private volatile Object mProxyObject; + private static AutoMap mMaterials = new AutoMap(); + private static volatile boolean mHasRun = false; + + public synchronized GT_Material_Loader getInstance(){ + return GT_Material_Loader.instance; + } + + public synchronized boolean getRunAbility(){ + return (mHasRun ? false : true); + } + public synchronized void setRunAbility(boolean b){ + mHasRun = Utils.invertBoolean(b); + } + + public GT_Material_Loader() { + if (getRunAbility()){ + //Set Singleton Instance + instance = this; + + //Try Reflectively add ourselves to the GT loader. + Class mInterface = ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler"); + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && mInterface != null){ + + //Make this class Dynamically implement IMaterialHandler + if (mProxyObject == null){ + mProxyObject = Proxy.newProxyInstance( + mInterface.getClassLoader(), new Class[] { mInterface }, + new MaterialHandler(getInstance())); + } + + if (ReflectionUtils.invoke(Materials.class, "add", new Class[]{ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler")}, new Object[]{mProxyObject})){ + Logger.REFLECTION("Successfully invoked add, on the proxied object implementing IMaterialHandler."); + + + Logger.REFLECTION("Examining Proxy to ensure it implements the correct Interface."); + Class[] i = mProxyObject.getClass().getInterfaces(); + for (int r=0;r 0){ + Logger.DEBUG_MATERIALS("Success - Re-enabled all components for "+MaterialUtils.getMaterialName(material)); + } + else { + Logger.DEBUG_MATERIALS("Failure - Did not enable any components for "+MaterialUtils.getMaterialName(material)); + } + return mValid > 0; + } + catch (SecurityException | IllegalArgumentException e) { + Logger.DEBUG_MATERIALS("Total Failure - Unable to re-enable "+MaterialUtils.getMaterialName(material)+". Most likely an IllegalArgumentException, but small chance it's a SecurityException."); + return false; + } + } + + + + + + + + + + /** + * Special Dynamic Interface Class + */ + + public class MaterialHandler implements InvocationHandler { + + private final Map methods = new HashMap(); + private Object target; + + public MaterialHandler(Object target) { + Logger.REFLECTION("Created a Proxy Interface which implements IMaterialHandler."); + this.target = target; + for(Method method: target.getClass().getDeclaredMethods()) { + Logger.REFLECTION("Adding "+method.getName()+" to internal method map."); + this.methods.put(method.getName(), method); + } + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) + throws Throwable { + long start = System.nanoTime(); + Object result = methods.get(method.getName()).invoke(target, args); + long elapsed = System.nanoTime() - start; + Logger.INFO("[Debug] Executed "+method.getName()+" in "+elapsed+" ns"); + return result; + } + } + + + /* + public static class ProxyListener implements java.lang.reflect.InvocationHandler { + + public static Object IMaterialHandlerProxy; + + ProxyListener(){ + + Logger.REFLECTION("Failed setting IMaterialHandler Proxy instance."); + } + + //Loading the class at runtime + public static void main(String[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException { + Class someInterface = ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler"); + Object instance = Proxy.newProxyInstance(someInterface.getClassLoader(), new Class[]{someInterface}, new InvocationHandler() { + + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + //Handle the invocations + if(method.getName().equals("onMaterialsInit")){ + Logger.REFLECTION("Invoked onMaterialsInit() via IMaterialHandler proxy"); + return 1; + } + else if(method.getName().equals("onComponentInit")){ + Logger.REFLECTION("Invoked onComponentInit() via IMaterialHandler proxy"); + return 2; + } + else if(method.getName().equals("onComponentIteration")){ + Logger.REFLECTION("Invoked onComponentIteration() via IMaterialHandler proxy"); + return 3; + } + else { + return -1; + } + } + }); + System.out.println(instance.getClass().getDeclaredMethod("someMethod", (Class[])null).invoke(instance, new Object[]{})); + } + + private static class MaterialHandler implements InvocationHandler { + private final Object original; + + public MaterialHandler(Object original) { + this.original = original; + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) + throws IllegalAccessException, IllegalArgumentException, + InvocationTargetException { + System.out.println("BEFORE"); + method.invoke(original, args); + System.out.println("AFTER"); + return null; + } + } + + public static void init(){ + + Class someInterface = ReflectionUtils.getClass("gregtech.api.interfaces.IMaterialHandler"); + GT_Material_Loader original = GT_Material_Loader.instance; + MaterialHandler handler = new MaterialHandler(original); + + Object f = Proxy.newProxyInstance(someInterface.getClassLoader(), + new Class[] { someInterface }, + handler); + + f.originalMethod("Hallo"); + } + + + + } + + */ +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java new file mode 100644 index 0000000000..e918d8015e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.xmod.gregtech.common.blocks.*; + +public class Gregtech_Blocks { + + public static void run(){ + + //Casing Blocks + ModBlocks.blockCasingsMisc = new GregtechMetaCasingBlocks(); + ModBlocks.blockCasings2Misc = new GregtechMetaCasingBlocks2(); + ModBlocks.blockCasings3Misc = new GregtechMetaCasingBlocks3(); + ModBlocks.blockCasings4Misc = new GregtechMetaCasingBlocks4(); + ModBlocks.blockCasings5Misc = new GregtechMetaCasingBlocks5(); + + ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1(); + ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings(); + ModBlocks.blockCustomMachineCasings = new GregtechMetaSpecialMachineCasings(); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java new file mode 100644 index 0000000000..51316f024a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingAngleGrinder.java @@ -0,0 +1,135 @@ + +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_ModHandler.RecipeBits; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import net.minecraft.item.ItemStack; + +public class ProcessingAngleGrinder implements Interface_OreRecipeRegistrator, Runnable { + public ProcessingAngleGrinder() { + GregtechOrePrefixes.toolAngleGrinder.add(this); + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { + if (aMaterial != Materials.Rubber) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING))) { + + } + } + } + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + // TODO Auto-generated method stub + + } + + public void materialsLoops() { + final Materials[] i = Materials.values(); + final int size = i.length; + Logger.MATERIALS("Materials to attempt tool gen. with: " + size); + int used = 0; + Materials aMaterial = null; + for (int r = 0; r < size; r++) { + aMaterial = i[r]; + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) + && (aMaterial != Materials._NULL)) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) + && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) + && (!aMaterial.contains(SubTag.NO_SMELTING))) { + Logger.MATERIALS("Generating Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)); + // Input 1 + + + final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); + final ItemStack longrod = GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 1L); + + if ((null != plate && longrod != null)) { + addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); + addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); + addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); + used++; + } else { + Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+(longrod == null)+" |"); + } + // GT_ModHandler.addCraftingRecipe(, + // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | + // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", + // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), + // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), + // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); + } else { + Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)); + } + } else { + Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)); + } + + } + + Logger.INFO("Materials used for tool gen: " + used); + } + + @Override + public void run() { + Logger.INFO("Generating Angle Grinders for all valid GT Materials."); + this.materialsLoops(); + } + + public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { + + ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( + MetaGeneratedGregtechTools.ANGLE_GRINDER, + 1, + aMaterial, + Materials.Titanium, + new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); + + + + long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); + if (aDura <= 32000) { + Logger.MATERIALS("Unable to generate Angle Grinder from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); + return false; + } + + return GT_ModHandler.addCraftingRecipe( + aOutputStack, + RecipeBits.DISMANTLEABLE | RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | RecipeBits.BUFFERED, + new Object[]{ + "SXL", + "GMG", + "PBP", + 'X', ItemList.Component_Grinder_Tungsten.get(1), + 'M', CI.getElectricMotor(aVoltageTier, 1), + 'S', OrePrefixes.screw.get(Materials.Titanium), + 'L', OrePrefixes.stickLong.get(aMaterial), + 'P', OrePrefixes.plate.get(aMaterial), + 'G', ELEMENT.STANDALONE.BLACK_METAL.getGear(1), + 'B', aBattery + }); + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java new file mode 100644 index 0000000000..9fe9ad7816 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricButcherKnife.java @@ -0,0 +1,134 @@ + +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_ModHandler.RecipeBits; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import net.minecraft.item.ItemStack; + +public class ProcessingElectricButcherKnife implements Interface_OreRecipeRegistrator, Runnable { + public ProcessingElectricButcherKnife() { + GregtechOrePrefixes.toolElectricButcherKnife.add(this); + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { + if (aMaterial != Materials.Rubber) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING))) { + + } + } + } + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + // TODO Auto-generated method stub + + } + + public void materialsLoops() { + final Materials[] i = Materials.values(); + final int size = i.length; + Logger.MATERIALS("Materials to attempt tool gen. with: " + size); + int used = 0; + Materials aMaterial = null; + for (int r = 0; r < size; r++) { + aMaterial = i[r]; + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) + && (aMaterial != Materials._NULL)) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) + && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) + && (!aMaterial.contains(SubTag.NO_SMELTING))) { + Logger.MATERIALS("Generating Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)); + // Input 1 + + + final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); + final ItemStack screw = GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1L); + + if ((null != plate) && screw != null) { + addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); + addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); + addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); + used++; + } else { + Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+" |"); + } + // GT_ModHandler.addCraftingRecipe(, + // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | + // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", + // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), + // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), + // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); + } else { + Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)); + } + } else { + Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)); + } + + } + + Logger.INFO("Materials used for tool gen: " + used); + } + + @Override + public void run() { + Logger.INFO("Generating Electric Butcher Knives for all valid GT Materials."); + this.materialsLoops(); + } + + public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { + + ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( + MetaGeneratedGregtechTools.ELECTRIC_BUTCHER_KNIFE, + 1, + aMaterial, + Materials.Titanium, + new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); + + ItemStack aInputCutter = GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, + 1, + aMaterial, + aMaterial, + null); + + long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); + if (aDura <= 32000) { + Logger.MATERIALS("Unable to generate Electric Butcher Knife from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); + return false; + } + + + + return RecipeUtils.addShapedRecipe( + OrePrefixes.wireFine.get(Materials.Electrum), aInputCutter, OrePrefixes.wireFine.get(Materials.Electrum), + OrePrefixes.plate.get(aMaterial), CI.getElectricMotor(aVoltageTier, 1), OrePrefixes.plate.get(aMaterial), + OrePrefixes.screw.get(aMaterial), aBattery, OrePrefixes.screw.get(aMaterial), + aOutputStack); + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java new file mode 100644 index 0000000000..5f6c5a0427 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricLighter.java @@ -0,0 +1,131 @@ + +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_ModHandler.RecipeBits; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import net.minecraft.item.ItemStack; + +public class ProcessingElectricLighter implements Interface_OreRecipeRegistrator, Runnable { + public ProcessingElectricLighter() { + GregtechOrePrefixes.toolElectricLighter.add(this); + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { + if (aMaterial != Materials.Rubber) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING))) { + + } + } + } + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + // TODO Auto-generated method stub + + } + + public void materialsLoops() { + final Materials[] i = Materials.values(); + final int size = i.length; + Logger.MATERIALS("Materials to attempt tool gen. with: " + size); + int used = 0; + Materials aMaterial = null; + for (int r = 0; r < size; r++) { + aMaterial = i[r]; + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) + && (aMaterial != Materials._NULL)) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) + && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) + && (!aMaterial.contains(SubTag.NO_SMELTING))) { + Logger.MATERIALS("Generating Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)); + // Input 1 + + + final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); + + if ((null != plate)) { + addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); + addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); + addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); + used++; + } else { + Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+" |"); + } + // GT_ModHandler.addCraftingRecipe(, + // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | + // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", + // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), + // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), + // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); + } else { + Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)); + } + } else { + Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)); + } + + } + + Logger.INFO("Materials used for tool gen: " + used); + } + + @Override + public void run() { + Logger.INFO("Generating Electric Lighters for all valid GT Materials."); + this.materialsLoops(); + } + + public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { + + ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( + MetaGeneratedGregtechTools.ELECTRIC_LIGHTER, + 1, + aMaterial, + Materials.Titanium, + new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); + + ItemStack aInputCutter = GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, + 1, + aMaterial, + aMaterial, + null); + + long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); + if (aDura <= 32000) { + Logger.MATERIALS("Unable to generate Electric Lighter from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); + return false; + } + + return RecipeUtils.addShapedRecipe( + OrePrefixes.wireGt04.get(Materials.Gold), aInputCutter, OrePrefixes.wireGt04.get(Materials.Gold), + ELEMENT.STANDALONE.RUNITE.getPlate(1), CI.getSensor(aVoltageTier, 1), ELEMENT.STANDALONE.RUNITE.getPlate(1), + OrePrefixes.plate.get(aMaterial), aBattery, OrePrefixes.plate.get(aMaterial), + aOutputStack); + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java new file mode 100644 index 0000000000..dfcb7de4f8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingElectricSnips.java @@ -0,0 +1,130 @@ + +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_ModHandler.RecipeBits; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; +import net.minecraft.item.ItemStack; + +public class ProcessingElectricSnips implements Interface_OreRecipeRegistrator, Runnable { + public ProcessingElectricSnips() { + GregtechOrePrefixes.toolElectricSnips.add(this); + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { + if (aMaterial != Materials.Rubber) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING))) { + + } + } + } + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aOreDictName, + final String aModName, final ItemStack aStack) { + // TODO Auto-generated method stub + + } + + public void materialsLoops() { + final Materials[] i = Materials.values(); + final int size = i.length; + Logger.MATERIALS("Materials to attempt tool gen. with: " + size); + int used = 0; + Materials aMaterial = null; + for (int r = 0; r < size; r++) { + aMaterial = i[r]; + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) + && (aMaterial != Materials._NULL)) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) + && (!aMaterial.contains(SubTag.NO_SMASHING)) && (!aMaterial.contains(SubTag.TRANSPARENT)) + && (!aMaterial.contains(SubTag.FLAMMABLE)) && (!aMaterial.contains(SubTag.MAGICAL)) + && (!aMaterial.contains(SubTag.NO_SMELTING))) { + Logger.MATERIALS("Generating Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)); + // Input 1 + + + final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L); + + if ((null != plate)) { + addRecipe(aMaterial, 1600000L, 3, ItemList.Battery_RE_HV_Lithium.get(1)); + addRecipe(aMaterial, 1200000L, 3, ItemList.Battery_RE_HV_Cadmium.get(1)); + addRecipe(aMaterial, 800000L, 3, ItemList.Battery_RE_HV_Sodium.get(1)); + used++; + } else { + Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)+", Plate or Long Rod may be invalid. Invalid | Plate? "+(plate == null) +" | Rod? "+" |"); + } + // GT_ModHandler.addCraftingRecipe(, + // GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | + // GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", + // Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), + // Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), + // Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)}); + } else { + Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)); + } + } else { + Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)); + } + + } + + Logger.INFO("Materials used for tool gen: " + used); + } + + @Override + public void run() { + Logger.INFO("Generating Electric Snips for all valid GT Materials."); + this.materialsLoops(); + } + + public boolean addRecipe(Materials aMaterial, long aBatteryStorage, int aVoltageTier, ItemStack aBattery) { + + ItemStack aOutputStack = MetaGeneratedGregtechTools.INSTANCE.getToolWithStats( + MetaGeneratedGregtechTools.ELECTRIC_SNIPS, + 1, + aMaterial, + Materials.Titanium, + new long[]{aBatteryStorage, GT_Values.V[aVoltageTier], 3L, -1L}); + + ItemStack aInputCutter = GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.WIRECUTTER, + 1, + aMaterial, + aMaterial, + null); + + long aDura = MetaGeneratedGregtechTools.getToolMaxDamage(aOutputStack); + if (aDura <= 32000) { + Logger.MATERIALS("Unable to generate Electric Snips from "+MaterialUtils.getMaterialName(aMaterial)+", Durability: "+aDura); + return false; + } + return RecipeUtils.addShapedRecipe( + OrePrefixes.wireFine.get(Materials.Electrum), aInputCutter, OrePrefixes.wireFine.get(Materials.Electrum), + ELEMENT.STANDALONE.WHITE_METAL.getGear(1), CI.getElectricMotor(aVoltageTier, 1), ELEMENT.STANDALONE.WHITE_METAL.getGear(1), + OrePrefixes.plate.get(aMaterial), aBattery, OrePrefixes.plate.get(aMaterial), + aOutputStack); + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java new file mode 100644 index 0000000000..e4858f8cd1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java @@ -0,0 +1,92 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator; +import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; + +public class ProcessingToolHeadChoocher implements Interface_OreRecipeRegistrator, Runnable { + public ProcessingToolHeadChoocher() { + GregtechOrePrefixes.toolSkookumChoocher.add(this); + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { + if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint)) { + if (aMaterial != Materials.Rubber) { + if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) && (!aMaterial.contains(SubTag.NO_SMASHING))) { + GT_ModHandler.addCraftingRecipe(MetaGeneratedGregtechTools.INSTANCE.getToolWithStats(16, 1, aMaterial, aMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial)}); + } + } + } + } + + @Override + public void registerOre(final GregtechOrePrefixes aPrefix, + final GT_Materials aMaterial, final String aOreDictName, final String aModName, + final ItemStack aStack) { + // TODO Auto-generated method stub + + } + + public void materialsLoops(){ + final Materials[] i = Materials.values(); + final int size = i.length; + Logger.WARNING("Materials to attempt tool gen. with: "+size); + int used = 0; + Materials aMaterial = null; + for (int r=0;r> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_AlloySmelter(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material){ + final int tVoltageMultiplier = material.vVoltageMultiplier; + + + + //Nuggets + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getNugget(1))) + GT_Values.RA.addAlloySmelterRecipe( + material.getIngot(1), + ItemList.Shape_Mold_Nugget.get(0), + material.getNugget(9), + (int) Math.max(material.getMass() * 2L, 1L), + tVoltageMultiplier); + + //Gears + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) + GT_Values.RA.addAlloySmelterRecipe( + material.getIngot(8), + ItemList.Shape_Mold_Gear.get(0), + material.getGear(1), + (int) Math.max(material.getMass() * 2L, 1L), + tVoltageMultiplier); + + //Ingot + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getNugget(1))) + GT_Values.RA.addAlloySmelterRecipe( + material.getNugget(9), + ItemList.Shape_Mold_Ingot.get(0), + material.getIngot(1), + (int) Math.max(material.getMass() * 2L, 1L), + tVoltageMultiplier); + + } + +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java new file mode 100644 index 0000000000..d7244919d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java @@ -0,0 +1,81 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; + +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class RecipeGen_Assembler extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Assembler(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material){ + + //Frame Box + if (ItemUtils.checkForInvalidItems(new ItemStack[] {material.getRod(1), material.getFrameBox(1)})) + GT_Values.RA.addAssemblerRecipe( + material.getRod(4), + ItemUtils.getGregtechCircuit(4), + material.getFrameBox(1), + 60, + material.vVoltageMultiplier); + + //Rotor + if (ItemUtils.checkForInvalidItems(new ItemStack[] {material.getPlate(1), material.getRing(1), material.getRotor(1)})) + addAssemblerRecipe( + material.getPlate(4), + material.getRing(1), + material.getRotor(1), + 240, + material.vVoltageMultiplier); + + } + + private static void addAssemblerRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1, final int seconds, final int euCost){ + GT_Values.RA.addAssemblerRecipe( + input1, + input2, + FluidUtils.getFluidStack("molten.solderingalloy", 16), + output1, + seconds, + euCost); + GT_Values.RA.addAssemblerRecipe( + input1, + input2, + FluidUtils.getFluidStack("molten.tin", 32), + output1, + seconds, + euCost); + GT_Values.RA.addAssemblerRecipe( + input1, + input2, + FluidUtils.getFluidStack("molten.lead", 48), + output1, + seconds, + euCost); + } + + +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java new file mode 100644 index 0000000000..7e9153679f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Base.java @@ -0,0 +1,16 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.core.material.Material; + +public abstract class RecipeGen_Base implements RunnableWithInfo{ + + protected Material toGenerate; + protected boolean disableOptional; + + @Override + public Material getInfoData() { + return toGenerate; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java new file mode 100644 index 0000000000..9e58d486d3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java @@ -0,0 +1,280 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.material.nuclear.NUCLIDE; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeGen_BlastSmelter extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_BlastSmelter(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateARecipe(this.toGenerate); + } + + private void generateARecipe(final Material M){ + + //Add a Blast Smelting Recipe, Let's go! + ItemStack tStack; + if (null != (tStack = M.getDust(1))) { + + final Material[] badMaterials = { + FLUORIDES.THORIUM_HEXAFLUORIDE, + FLUORIDES.THORIUM_TETRAFLUORIDE, + ALLOY.BLOODSTEEL, + NUCLIDE.LiFBeF2ThF4UF4, + NUCLIDE.LiFBeF2ZrF4UF4, + NUCLIDE.LiFBeF2ZrF4U235 + }; + for (final Material R : badMaterials){ + if (M == R){ + return; + } + } + + //Prepare some Variables + ItemStack[] components; + ArrayList tMaterial = new ArrayList<>(); + int inputStackCount=0; + int fluidAmount=0; + final boolean doTest = true; + tMaterial = M.getComposites(); + + //This Bad boy here is what dictates unique recipes. Fuck life, right? + ItemStack circuitGT = ItemUtils.getGregtechCircuit(0); + + + //Set a duration - OLD + /*int duration = 0; + if (M.getMeltingPointK() > 150){ + duration = (int) Math.max(M.getMass() / 50L, 1L) * M.getMeltingPointK(); + } + else { + duration = (int) Math.max(M.getMass() / 50L, 1L) * 150; + }*/ + + long aVoltage = MaterialUtils.getVoltageForTier(M.vTier); + + + //Set a duration - NEW + int duration = 120*M.vTier*10; + + if (M.vTier <= 4){ + duration = 20*M.vTier*10; + } + + int mMaterialListSize=0; + + int mTotalPartsCounter = M.smallestStackSizeWhenProcessing; + + if (M.getComposites() != null){ + for (final gtPlusPlus.core.material.MaterialStack ternkfsdf : M.getComposites()){ + if (ternkfsdf != null) { + mMaterialListSize++; + //mTotalPartsCounter += ternkfsdf.getSmallestStackSizes()[0]; + } + } + } + else { + mMaterialListSize = 1; + } + + if (duration <= 0){ + final int second = 20; + duration = 14*second*mMaterialListSize*8; + } + + Logger.WARNING("[BAS] Size: "+mMaterialListSize); + + + //Make a simple one Material Materialstack[] and log it for validity. + circuitGT = ItemUtils.getGregtechCircuit(1); + final ItemStack[] tItemStackTest = new ItemStack[]{circuitGT, tStack}; + inputStackCount = 1; + fluidAmount = 144*inputStackCount; + Logger.WARNING("[BAS] Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+". Gives "+fluidAmount+"L of molten metal."); + for (int das=0;das 1); + + //Generate Recipes for all singular materials that can be made molten. + if (hasMoreInputThanACircuit){ + if (M.requiresBlastFurnace()) { + if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, (duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)), (int) aVoltage)){ + Logger.WARNING("[BAS] Success."); + Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe."); + if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration, 120)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + } + if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/9, 120)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + } + /*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + } + if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/9, 120)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + }*/ + } + } + else { + Logger.WARNING("[BAS] Failed."); + } + } + else { + if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)/2, (int) aVoltage)){ + Logger.WARNING("[BAS] Success."); + if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), M.getFluidStack(144), M.getIngot(1), duration/2, 60)){ + Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe."); + if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration/2, 60)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + } + if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/2/9, 60)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + } + /*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + } + if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/2/9, 60)){ + Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); + }*/ + } + } + else { + Logger.WARNING("[BAS] Failed."); + } + } + + if (tMaterial != null){ + //Reset the Variables for compounds if last recipe was a success. + inputStackCount=0; + + //If this Material has some kind of compound list, proceed + if (mMaterialListSize > 1){ + final gtPlusPlus.core.material.MaterialStack[] tempStack = new gtPlusPlus.core.material.MaterialStack[mMaterialListSize]; + circuitGT = ItemUtils.getGregtechCircuit(mMaterialListSize); + //Just double checking + if (tempStack.length > 1){ + + //Builds me a MaterialStack[] from the MaterialList of M. + int ooo=0; + for (final gtPlusPlus.core.material.MaterialStack xMaterial : M.getComposites()){ + if (xMaterial != null){ + if (xMaterial.getStackMaterial() != null){ + Logger.WARNING("[BAS] FOUND: "+xMaterial.getStackMaterial().getLocalizedName()); + Logger.WARNING("[BAS] ADDING: "+xMaterial.getStackMaterial().getLocalizedName()); + } + tempStack[ooo] = xMaterial; + } + ooo++; + } + + //Builds me an ItemStack[] of the materials. - Without a circuit - this gets a good count for the 144L fluid multiplier + components = new ItemStack[9]; + inputStackCount=0; + FluidStack componentsFluid = null; + for (int irc=0;irc 0) && (xr <= 100)){ + final int mathmatics = (r*1000); + componentsFluid = FluidUtils.getFluidStack(M.getComposites().get(irc).getStackMaterial().getFluidStack(mathmatics), mathmatics); + } + } + else { + components[irc] = M.getComposites().get(irc).getDustStack(r); + } + } + } + + + //Adds a circuit + if ((mMaterialListSize < 9) && (mMaterialListSize != 0)){ + final ItemStack[] components_NoCircuit = components; + //Builds me an ItemStack[] of the materials. - With a circuit + components = new ItemStack[components_NoCircuit.length+1]; + for (int fr=0;fr 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); + if (aMaterial.mBlastFurnaceTemp <= 1000) { + GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copyAmount(1L, new Object[]{tDustStack}), aMaterial.mBlastFurnaceTemp); + } + } + } + } + case ingot: + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ + if ((null != (tDustStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L))) && (!aMaterial.contains(SubTag.NO_SMELTING))) { + if (aMaterial.mBlastFurnaceRequired) { + addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); + } + } + } + break; + case dustSmall: + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ + if (aMaterial.mBlastFurnaceRequired) { + addBlastRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); + } + } + break; + case dustTiny: + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ + if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) { + if (aMaterial.mBlastFurnaceRequired) { + addBlastRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); + + } + } + } + break; + default: + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ + if (!aMaterial.contains(SubTag.NO_SMELTING)) { + if ((aMaterial.mBlastFurnaceRequired) || (aMaterial.mDirectSmelting.mBlastFurnaceRequired)) { + addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); + if (aMaterial.mBlastFurnaceTemp <= 1000) + GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), aMaterial.mBlastFurnaceTemp * 2); + } + } + } + break; + } + } + + public boolean addBlastRecipe(ItemStack input1, ItemStack input2, + FluidStack fluid1, FluidStack fluid2, ItemStack output1, + ItemStack output2, int time, int euCost, Materials smeltInto) { + + //Set up variables. + ItemStack[] components; + int count = 0; + + if (smeltInto == Materials._NULL){ + //If the material is null then we probably don't want to try. + return false; + } + if (input1 != null && input2 != null){ + count = 2; + } + else if (input1 == null && input2 == null){ + //If both inputs are null, then we don't want to try. + return false; + } + else { + count = 1; + } + //Set up input components. + ItemStack configCircuit = ItemUtils.getGregtechCircuit(count); + components = new ItemStack[]{configCircuit, input1, input2}; + if (fluid1 != null || fluid2 != null){ + //If it uses an input fluid, we cannot handle this. So let's not try. (Annealed copper for example) + //return false; + if (fluid1 != null && fluid2 != null){ + //Cannot handle two input fluids + return false; + } + + FluidStack mInputfluidstack; + mInputfluidstack = (fluid1 != null) ? fluid1 : fluid2; + + //Try with new handler + //Add Blast Smelter Recipe. + return CORE.RA.addBlastSmelterRecipe( + components, + mInputfluidstack, + smeltInto.mSmeltInto.getMolten(144L), + 100, + MathUtils.roundToClosestInt(time*0.8), + euCost); // EU Cost + + } + + //Add Blast Smelter Recipe. + return CORE.RA.addBlastSmelterRecipe( + components, + smeltInto.mSmeltInto.getMolten(144L), + 100, + MathUtils.roundToClosestInt(time*0.8), + euCost); // EU Cost + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java new file mode 100644 index 0000000000..63c2d18783 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java @@ -0,0 +1,215 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.util.*; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.ItemStackData; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +import java.util.HashMap; +import java.util.Map; + +public class RecipeGen_BlastSmelterGT_GTNH { + + private static Map mCachedIngotToFluidRegistry = new HashMap(); + private static Map mCachedHotToColdRegistry = new HashMap(); + + private synchronized static void setIngotToFluid(final ItemStackData stack, final FluidStack fluid) { + if (stack != null && fluid != null) { + mCachedIngotToFluidRegistry.put(stack.getUniqueDataIdentifier(), fluid); + } + } + + private synchronized static void setHotToCold(final ItemStackData hot, final ItemStackData cold) { + if (hot != null && cold != null) { + mCachedHotToColdRegistry.put(hot.getUniqueDataIdentifier(), cold.getUniqueDataIdentifier()); + } + } + + private synchronized static FluidStack getFluidFromIngot(final ItemStackData ingot) { + ItemStackData h = ingot; + if (mCachedIngotToFluidRegistry.containsKey(h.getUniqueDataIdentifier())) { + Logger.MACHINE_INFO("[ABS] mCachedIngotToFluidRegistry contains Output Ingot."); + return mCachedIngotToFluidRegistry.get(h.getUniqueDataIdentifier()); + } + if (mCachedHotToColdRegistry.containsKey(h.getUniqueDataIdentifier())) { + Logger.MACHINE_INFO("[ABS] mCachedHotToColdRegistry contains Output Ingot."); + return mCachedIngotToFluidRegistry.get(mCachedHotToColdRegistry.get(h.getUniqueDataIdentifier())); + } + Logger.MACHINE_INFO("[ABS] Neither Cache contains Output Ingot."); + return null; + } + + private static boolean isValid(final ItemStack[] inputs, final ItemStack outputs[], final FluidStack[] fluidIn, final FluidStack fluidOut) { + if (inputs != null && outputs != null && fluidIn != null && fluidOut != null && inputs.length > 0 && outputs.length > 0) { + return true; + } + return false; + } + + public synchronized static boolean generateGTNHBlastSmelterRecipesFromEBFList() { + + //Make a counting object + int mSuccess = 0; + + Logger.INFO("[ABS] Starting recipe generation based on EBF recipe map."); + Logger.INFO("[ABS] Caching Ingots and their Molten fluid.."); + //First, we make sure that we have a valid recipe map of Ingots/Dusts -> Fluids + if (GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size() > 0) { + //So, let's check every recipe + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList) { + ItemStack validInput = null; + FluidStack validOutput = null; + //If we the input is an ingot and it and the output are valid, map it to cache. + if (x.mInputs[0] != null) { + for(int tag: OreDictionary.getOreIDs(x.mInputs[0])) { + String oreName = OreDictionary.getOreName(tag).toLowerCase(); + String mType = "dust"; + if (CORE.GTNH) { + mType = "ingot"; + } + if(oreName.startsWith(mType) && !oreName.contains("double") && !oreName.contains("triple") && !oreName.contains("quad") && !oreName.contains("quintuple")) { + validInput = x.mInputs[0]; + } + } + } + if (x.mFluidOutputs[0] != null) { + validOutput = x.mFluidOutputs[0]; + } + if (validInput != null && validOutput != null) { + ItemStackData R = new ItemStackData(validInput); + setIngotToFluid(R, validOutput); + Logger.MACHINE_INFO("[ABS][I2F] Cached "+validInput.getDisplayName()+" to "+validOutput.getLocalizedName()+". Stored Under ID of "+R.getUniqueDataIdentifier()); + } + } + } + + Logger.INFO("[ABS] Caching Ingots and their Hot form..."); + //Second, we make sure that we have a valid recipe map of Hot Ingots -> Cold Ingots + if (GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList.size() > 0) { + //So, let's check every recipe + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList) { + ItemStack validInput = null; + ItemStack validOutput = null; + //If we the input is an ingot and it and the output are valid, map it to cache. + if (x.mInputs != null && x.mInputs.length > 0 && x.mInputs[0] != null) { + validInput = x.mInputs[0]; + } + if (x.mOutputs != null && x.mOutputs.length > 0 && x.mOutputs[0] != null) { + validOutput = x.mOutputs[0]; + } + if (validInput != null && validOutput != null) { + ItemStackData R1 = new ItemStackData(validInput); + ItemStackData R2 = new ItemStackData(validOutput); + setHotToCold(R1, R2); + Logger.MACHINE_INFO("[ABS][H2C] Cached "+validInput.getDisplayName()+" to "+validOutput.getDisplayName()+". Stored Under ID of "+R1.getUniqueDataIdentifier()+", links to ID "+R2.getUniqueDataIdentifier()); + } + } + } + + Logger.INFO("[ABS] Generating recipes based on existing EBF recipes."); + //Okay, so now lets Iterate existing EBF recipes. + if (GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList.size() > 0) { + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList) { + if (x == null) { + continue; + } + ItemStack[] inputs, outputs; + FluidStack[] inputsF; + int voltage, time, special; + boolean enabled; + inputs = x.mInputs; + outputs = x.mOutputs; + inputsF = x.mFluidInputs; + voltage = x.mEUt; + time = x.mDuration; + enabled = x.mEnabled; + special = x.mSpecialValue; + + //Check for GTNH, if it's found, continue to next recipe if the Temp is too high. + if (CORE.GTNH && special > 3600) { + Logger.MACHINE_INFO("[ABS] Skipping ABS addition for GTNH due to temp."); + continue; + } + else { + FluidStack mMoltenStack = null; + int mMoltenCount = 0; + //If We have a valid Output, let's try use our cached data to get it's molten form. + if (x.mOutputs != null && x.mOutputs[0] != null) { + mMoltenCount = x.mOutputs[0].stackSize; + ItemStackData R = new ItemStackData(x.mOutputs[0]); + Logger.MACHINE_INFO("[ABS] Found "+x.mOutputs[0].getDisplayName()+" as valid EBF output, finding it's fluid from the cache. We will require "+(144*mMoltenCount)+"L. Looking for ID "+R.getUniqueDataIdentifier()); + FluidStack tempFluid = getFluidFromIngot(R); + if (tempFluid != null) { + //Logger.MACHINE_INFO("[ABS] Got Fluid from Cache."); + mMoltenStack = FluidUtils.getFluidStack(tempFluid, mMoltenCount*144); + } + else { + Logger.MACHINE_INFO("[ABS] Failed to get Fluid from Cache."); + } + } + //If this recipe is enabled and we have a valid molten fluidstack, let's try add this recipe. + if (enabled && isValid(inputs, outputs, inputsF, mMoltenStack)) { + //Build correct input stack + ItemStack[] newInput = new ItemStack[inputs.length+1]; + int l = 1; + for (ItemStack y : inputs) { + newInput[l++] = y; + } + newInput[0] = CI.getNumberedCircuit(inputs.length); + //Logger.MACHINE_INFO("[ABS] Generating ABS recipe for "+mMoltenStack.getLocalizedName()+"."); + if (CORE.RA.addBlastSmelterRecipe(newInput, (inputsF.length > 0 ? inputsF[0] : null), mMoltenStack, 100, MathUtils.roundToClosestInt(time*0.8), voltage, special)) { + //Logger.MACHINE_INFO("[ABS] Success."); + mSuccess++; + } + else { + Logger.MACHINE_INFO("[ABS] Failure."); + } + } + else { + if (!enabled) { + Logger.MACHINE_INFO("[ABS] Failure. EBF recipe was not enabled."); + } + else { + Logger.MACHINE_INFO("[ABS] Failure. Invalid Inputs or Outputs."); + if (inputs == null) { + Logger.MACHINE_INFO("[ABS] Inputs were not Valid."); + } + else { + Logger.MACHINE_INFO("[ABS] inputs size: "+inputs.length); + } + if (outputs == null) { + Logger.MACHINE_INFO("[ABS] Outputs were not Valid."); + } + else { + Logger.MACHINE_INFO("[ABS] outputs size: "+outputs.length); + } + if (inputsF == null) { + Logger.MACHINE_INFO("[ABS] Input Fluids were not Valid."); + } + else { + Logger.MACHINE_INFO("[ABS] inputsF size: "+inputsF.length); + } + if (mMoltenStack == null) { + Logger.MACHINE_INFO("[ABS] Output Fluid were not Valid."); + } + } + } + } + } + } + else { + Logger.MACHINE_INFO("[ABS] Failure. Did not find any EBF recipes to iterate."); + } + + Logger.INFO("[ABS] Processed "+mSuccess+" recipes."); + return mSuccess > 0; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java new file mode 100644 index 0000000000..24c8eb488f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java @@ -0,0 +1,444 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeGen_DustGeneration extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_DustGeneration(final Material M){ + this(M, false); + } + + public RecipeGen_DustGeneration(final Material M, final boolean O){ + this.toGenerate = M; + this.disableOptional = O; + mRecipeGenMap.add(this); + final ItemStack normalDust = M.getDust(1); + final ItemStack smallDust = M.getSmallDust(1); + final ItemStack tinyDust = M.getTinyDust(1); + if (tinyDust != null && normalDust != null) { + if (RecipeUtils.addShapedRecipe( + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + normalDust)){ + Logger.INFO("9 Tiny dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Success"); + } + else { + Logger.INFO("9 Tiny dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Failed"); + } + + if (RecipeUtils.addShapedRecipe( + normalDust, null, null, + null, null, null, + null, null, null, + M.getTinyDust(9))){ + Logger.INFO("9 Tiny dust from 1 Recipe: "+M.getLocalizedName()+" - Success"); + } + else { + Logger.INFO("9 Tiny dust from 1 Recipe: "+M.getLocalizedName()+" - Failed"); + } + } + + if (smallDust != null && normalDust != null) { + if (RecipeUtils.addShapedRecipe( + smallDust, smallDust, null, + smallDust, smallDust, null, + null, null, null, + normalDust)){ + Logger.INFO("4 Small dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Success"); + } + else { + Logger.INFO("4 Small dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Failed"); + } + if (RecipeUtils.addShapedRecipe( + null, normalDust, null, + null, null, null, + null, null, null, + M.getSmallDust(4))){ + Logger.INFO("4 Small dust from 1 Dust Recipe: "+M.getLocalizedName()+" - Success"); + } + else { + Logger.INFO("4 Small dust from 1 Dust Recipe: "+M.getLocalizedName()+" - Failed"); + } + } + } + + @Override + public void run() { + generateRecipes(this.toGenerate, this.disableOptional); + } + + private void generateRecipes(final Material material, final boolean disableOptional){ + + Logger.INFO("Generating Shaped Crafting recipes for "+material.getLocalizedName()); + + final ItemStack normalDust = material.getDust(1); + final ItemStack smallDust = material.getSmallDust(1); + final ItemStack tinyDust = material.getTinyDust(1); + + final ItemStack[] inputStacks = material.getMaterialComposites(); + final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); + + //Macerate blocks back to dusts. + final ItemStack materialBlock = material.getBlock(1); + final ItemStack materialFrameBox = material.getFrameBox(1); + + if (ItemUtils.checkForInvalidItems(materialBlock)) { + GT_ModHandler.addPulverisationRecipe(materialBlock, material.getDust(9)); + } + + if (ItemUtils.checkForInvalidItems(materialFrameBox)) { + GT_ModHandler.addPulverisationRecipe(materialFrameBox, material.getDust(2)); + } + + if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(tinyDust)) { + generatePackagerRecipes(material); + } + + ItemStack ingot = material.getIngot(1); + if (ItemUtils.checkForInvalidItems(normalDust) && ItemUtils.checkForInvalidItems(ingot)) { + addFurnaceRecipe(material); + addMacerationRecipe(material); + } + + //Is this a composite? + if ((inputStacks != null) && !disableOptional){ + //Is this a composite? + Logger.WARNING("mixer length: "+inputStacks.length); + if ((inputStacks.length != 0) && (inputStacks.length <= 4)){ + //Log Input items + Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); + final long[] inputStackSize = material.vSmallestRatio; + Logger.WARNING("mixer is stacksizeVar null? "+(inputStackSize != null)); + //Is smallest ratio invalid? + if (inputStackSize != null){ + //set stack sizes on an input ItemStack[] + for (short x=0;x= 1) ? ((inputStacks[0] == null) ? null : inputStacks[0]) : null; + input[1] = (inputStacks.length >= 2) ? ((inputStacks[1] == null) ? null : inputStacks[1]) : null; + input[2] = (inputStacks.length >= 3) ? ((inputStacks[2] == null) ? null : inputStacks[2]) : null; + input[3] = (inputStacks.length >= 4) ? ((inputStacks[3] == null) ? null : inputStacks[3]) : null; + + + if (inputStacks.length == 1) { + input[1] = input[0]; + input[0] = CI.getNumberedCircuit(inputStacks.length+10); + } + else if (inputStacks.length == 2) { + input[2] = input[1]; + input[1] = input[0]; + input[0] = CI.getNumberedCircuit(inputStacks.length+10); + + } + else if (inputStacks.length == 3) { + input[3] = input[2]; + input[2] = input[1]; + input[1] = input[0]; + input[0] = CI.getNumberedCircuit(inputStacks.length+10); + } + + + /*for (int g = 0; g<4; g++) { + if(inputStacks.length > g) { + input[g] = inputStacks[g] != null ? inputStacks[g] : null; + } + else { + input[g] = CI.getNumberedCircuit(g+10); + break; + } + }*/ + + //Add mixer Recipe + FluidStack oxygen = GT_Values.NF; + if (material.getComposites() != null){ + for (final MaterialStack x : material.getComposites()){ + if (!material.getComposites().isEmpty()){ + if (x != null){ + if (x.getStackMaterial() != null){ + if (x.getStackMaterial().getDust(1) == null){ + if (x.getStackMaterial().getState() != MaterialState.SOLID && x.getStackMaterial().getState() != MaterialState.ORE && x.getStackMaterial().getState() != MaterialState.PLASMA){ + oxygen = x.getStackMaterial().getFluidStack(1000); + break; + } + } + } + } + } + } + } + + input = ItemUtils.cleanItemStackArray(input); + + //Add mixer Recipe + if (GT_Values.RA.addMixerRecipe( + input[0], input[1], + input[2], input[3], + oxygen, + null, + outputStacks, + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. + { + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Add Shapeless recipe for low tier alloys. + /*if (tVoltageMultiplier <= 30){ + if (RecipeUtils.addShapedGregtechRecipe(inputStacks, outputStacks)){ + Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed"); + } + }*/ + } + } + } + + + + + + + } + + public static boolean addMixerRecipe_Standalone(final Material material){ + final ItemStack[] inputStacks = material.getMaterialComposites(); + final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); + //Is this a composite? + if ((inputStacks != null)){ + //Is this a composite? + Logger.WARNING("mixer length: "+inputStacks.length); + if ((inputStacks.length >= 1) && (inputStacks.length <= 4)){ + //Log Input items + Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks)); + final long[] inputStackSize = material.vSmallestRatio; + Logger.WARNING("mixer is stacksizeVar not null? "+(inputStackSize != null)); + //Is smallest ratio invalid? + if (inputStackSize != null){ + //set stack sizes on an input ItemStack[] + for (short x=0;x= 2) ? (input2 = (inputStacks[1] == null) ? null : inputStacks[1]) : null; + input3 = (inputStacks.length >= 3) ? (input3 = (inputStacks[2] == null) ? null : inputStacks[2]) : null; + input4 = (inputStacks.length >= 4) ? (input4 = (inputStacks[3] == null) ? null : inputStacks[3]) : null; + + if (inputStacks.length == 1) { + input2 = input1; + input1 = CI.getNumberedCircuit(20); + } + else if (inputStacks.length == 2) { + input3 = input2; + input2 = input1; + input1 = CI.getNumberedCircuit(20); + + } + else if (inputStacks.length == 3) { + input4 = input3; + input3 = input2; + input2 = input1; + input1 = CI.getNumberedCircuit(20); + } + + //Add mixer Recipe + FluidStack oxygen = GT_Values.NF; + if (material.getComposites() != null){ + int compSlot = 0; + for (final MaterialStack x : material.getComposites()){ + if (!material.getComposites().isEmpty()){ + if (x != null){ + if (x.getStackMaterial() != null){ + if (x.getStackMaterial().getDust(1) == null){ + MaterialState f = x.getStackMaterial().getState(); + if (f == MaterialState.GAS || f == MaterialState.LIQUID || f == MaterialState.PURE_LIQUID || f == MaterialState.PURE_GAS){ + oxygen = x.getStackMaterial().getFluidStack((int) (material.vSmallestRatio[compSlot] * 1000)); + } + } + } + } + } + compSlot++; + } + + } + + //Add mixer Recipe + try { + if (GT_Values.RA.addMixerRecipe( + input1, input2, + input3, input4, + oxygen, + null, + outputStacks, + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example. + { + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success"); + return true; + } + else { + Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed"); + return false; + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + else { + Logger.WARNING("inputStackSize == NUll - "+material.getLocalizedName()); + } + } + else { + Logger.WARNING("InputStacks is out range 1-4 - "+material.getLocalizedName()); + } + } + else { + Logger.WARNING("InputStacks == NUll - "+material.getLocalizedName()); + } + return false; + } + + public static boolean generatePackagerRecipes(Material aMatInfo) { + AutoMap aResults = new AutoMap(); + //Small Dust + aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, new Object[]{aMatInfo.getSmallDust(4)}), ItemList.Schematic_Dust.get(0L, new Object[0]), aMatInfo.getDust(1), 100, 4)); + //Tiny Dust + aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, new Object[]{aMatInfo.getTinyDust(9)}), ItemList.Schematic_Dust.get(0L, new Object[0]), aMatInfo.getDust(1), 100, 4)); + + for (boolean b : aResults) { + if (!b) { + return false; + } + } + return true; + } + + private void addMacerationRecipe(Material aMatInfo){ + try { + Logger.MATERIALS("Adding Maceration recipe for "+aMatInfo.getLocalizedName()+" Ingot -> Dusts"); + final int chance = (aMatInfo.vTier*10)/MathUtils.randInt(10, 20); + GT_ModHandler.addPulverisationRecipe(aMatInfo.getIngot(1), aMatInfo.getDust(1), null, chance); + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + private void addFurnaceRecipe(Material aMatInfo){ + + ItemStack aDust = aMatInfo.getDust(1); + ItemStack aOutput; + try { + if (aMatInfo.requiresBlastFurnace()) { + aOutput = aMatInfo.getHotIngot(1); + if (ItemUtils.checkForInvalidItems(aOutput)) { + if (addBlastFurnaceRecipe(aMatInfo, aDust, null, aOutput, null, aMatInfo.getMeltingPointK())){ + Logger.MATERIALS("Successfully added a blast furnace recipe for "+aMatInfo.getLocalizedName()); + } + else { + Logger.MATERIALS("Failed to add a blast furnace recipe for "+aMatInfo.getLocalizedName()); + } + } + else { + Logger.MATERIALS("Failed to add a blast furnace recipe for "+aMatInfo.getLocalizedName()); + } + } + else { + aOutput = aMatInfo.getIngot(1); + if (ItemUtils.checkForInvalidItems(aOutput)) { + if (CORE.RA.addSmeltingAndAlloySmeltingRecipe(aDust, aOutput)){ + Logger.MATERIALS("Successfully added a furnace recipe for "+aMatInfo.getLocalizedName()); + } + else { + Logger.MATERIALS("Failed to add a furnace recipe for "+aMatInfo.getLocalizedName()); + } + } + } + } + catch (Throwable t) { + t.printStackTrace(); + } + + } + + private boolean addBlastFurnaceRecipe(Material aMatInfo, final ItemStack input1, final ItemStack input2, final ItemStack output1, final ItemStack output2, final int tempRequired){ + + try { + int timeTaken = 125*aMatInfo.vTier*10; + + if (aMatInfo.vTier <= 4){ + timeTaken = 25*aMatInfo.vTier*10; + } + int aSlot = aMatInfo.vTier; + if (aSlot < 2) { + aSlot = 2; + } + long aVoltage = aMatInfo.vVoltageMultiplier; + + return GT_Values.RA.addBlastRecipe( + input1, + input2, + GT_Values.NF, GT_Values.NF, + output1, + output2, + timeTaken, + (int) aVoltage, + tempRequired); + } + catch (Throwable t) { + t.printStackTrace(); + return false; + } + } + +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java new file mode 100644 index 0000000000..cd43d6201c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java @@ -0,0 +1,176 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import net.minecraft.item.ItemStack; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_Recipe; + +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class RecipeGen_Extruder extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Extruder(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material){ + + final ItemStack itemIngot = material.getIngot(1); + final ItemStack itemPlate = material.getPlate(1); + final ItemStack itemGear = material.getGear(1); + + final ItemStack shape_Plate = ItemList.Shape_Extruder_Plate.get(0); + final ItemStack shape_Ring = ItemList.Shape_Extruder_Ring.get(0); + final ItemStack shape_Gear = ItemList.Shape_Extruder_Gear.get(0); + final ItemStack shape_Rod = ItemList.Shape_Extruder_Rod.get(0); + final ItemStack shape_Bolt = ItemList.Shape_Extruder_Bolt.get(0); + final ItemStack shape_Block = ItemList.Shape_Extruder_Block.get(0); + final ItemStack shape_Ingot = ItemList.Shape_Extruder_Ingot.get(0); + + Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName()); + + + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) { + //Ingot Recipe + if (addExtruderRecipe( + material.getBlock(1), + shape_Ingot, + material.getIngot(9), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Block Recipe + if (addExtruderRecipe( + material.getIngot(9), + shape_Block, + material.getBlock(1), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + + //Plate Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) + if (addExtruderRecipe( + itemIngot, + shape_Plate, + itemPlate, + 10, + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Ring Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1))) + if (!material.isRadioactive){ + if (addExtruderRecipe( + itemIngot, + shape_Ring, + material.getRing(4), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + + //Gear Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) + if (!material.isRadioactive){ + if (addExtruderRecipe( + material.getIngot(4), + shape_Gear, + itemGear, + (int) Math.max(material.getMass() * 5L, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + + //Rod Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) + if (addExtruderRecipe( + itemIngot, + shape_Rod, + material.getRod(2), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } + + + //Bolt Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) + if (!material.isRadioactive){ + if (addExtruderRecipe( + itemIngot, + shape_Bolt, + material.getBolt(8), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + } + + + public static boolean addExtruderRecipe(final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) { + if ((aInput == null) || (aShape == null) || (aOutput == null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + return true; + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java new file mode 100644 index 0000000000..9fe86985f4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java @@ -0,0 +1,230 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeGen_FluidCanning implements Runnable { + + public static void init() { + FluidCanningRunnableHandler x = new FluidCanningRunnableHandler(); + x.run(); + } + + private static class FluidCanningRunnableHandler implements RunnableWithInfo { + + @Override + public void run() { + mHasRun = true; + for (RecipeGen_FluidCanning aRecipe : mCache) { + aRecipe.run(); + } + } + + @Override + public String getInfoData() { + return "Fluid Canning Recipes"; + } + } + + private static boolean mHasRun = false; + + private static HashSet mCache = new HashSet(); + + private static void addRunnableToRecipeCache(RecipeGen_FluidCanning r) { + if (mHasRun) { + CORE.crash(); + } + mCache.add(r); + } + + protected boolean disableOptional; + + private final GT_Recipe recipe; + private final boolean isValid; + + public boolean valid() { + return isValid; + } + public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluid) { + this(aExtracting, aEmpty, aFull, aFluid, GT_Values.NF, null, null); + } + + public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluidIn, FluidStack aFluidOut) { + this(aExtracting, aEmpty, aFull, aFluidIn, aFluidOut, null, null); + } + + public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluid, Integer aDuration, Integer aEUt) { + this(aExtracting, aEmpty, aFull, aFluid, GT_Values.NF, aDuration, aEUt); + } + + // Alternative Constructor + public RecipeGen_FluidCanning(boolean aExtracting, ItemStack aEmpty, ItemStack aFull, FluidStack aFluidIn, FluidStack aFluidOut, Integer aDuration, Integer aEUt) { + ItemStack aInput; + ItemStack aOutput; + FluidStack aFluidInput; + FluidStack aFluidOutput; + + // Safety check on the duration + if (aDuration == null || aDuration <= 0) { + aDuration = (aFluidIn != null) ? (aFluidIn.amount / 62) : ((aFluidOut != null) ? (aFluidOut.amount / 62) : 10); + } + + // Safety check on the EU + if (aEUt == null || aEUt <= 0) { + if (aExtracting) { + aEUt = 2; + } + else { + aEUt = 1; + } + } + + // Set Item stacks correctly, invert if extraction recipe. + if (aExtracting) { + aInput = aFull; + aOutput = aEmpty; + aFluidInput = GT_Values.NF; + aFluidOutput = aFluidIn; + } + else { + aInput = aEmpty; + aOutput = aFull; + aFluidInput = aFluidIn; + aFluidOutput = aFluidOut != null ? aFluidOut : GT_Values.NF; + } + + //Check validity + + GTPP_Recipe aRecipe = new GTPP_Recipe( + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + new int[] {10000}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); + + + // Check Valid + boolean aTempValidityCheck = false; + //Logger.INFO("Validity Check."); + if (aExtracting) { + Logger.INFO("Extracting."); + if (aInput != null && aFluidOutput != null) { + //Logger.INFO("Pass."); + aTempValidityCheck = true; + } + } + else { + //Logger.INFO("Canning."); + if (aInput != null && aOutput != null && (aFluidInput != null || aFluidOutput != null)) { + //Logger.INFO("Pass."); + aTempValidityCheck = true; + } + } + + + if (aTempValidityCheck) { + // Valid Recipe + recipe = aRecipe; + disableOptional = aExtracting; + isValid = true; + //Logger.INFO("Passed Validity Check. Hash: "+recipe.hashCode()); + //Logger.INFO("Mapped as: "+(disableOptional ? "Extracting" : "Canning")); + addRunnableToRecipeCache(this); + } + else { + //Logger.INFO("Failed Validity Check."); + isValid = false; + disableOptional = aExtracting; + aRecipe.mEnabled = false; + aRecipe.mHidden = true; + recipe = null; + } + } + + @Override + public void run() { + Logger.INFO("Processing Recipe with Hash: "+recipe.hashCode()); + generateRecipes(); + } + + private void generateRecipes() { + if (isValid && recipe != null) { + //Logger.INFO("Processing "+(disableOptional ? "Extracting" : "Canning")+" Recipe."); + if (this.disableOptional) { + addFluidExtractionRecipe(recipe); + } + else { + addFluidCannerRecipe(recipe); + } + } + } + + private final boolean addFluidExtractionRecipe(GT_Recipe aRecipe) { + boolean result = false; + int aCount1 = GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size(); + int aCount2 = aCount1; + GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(aRecipe); + aCount1 = GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size(); + result = aCount1 > aCount2; + if (result) { + //Logger.INFO("[FIND] Added Extraction recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); + } + else { + Logger.INFO("[ERROR] Failed adding Extraction recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); + //dumpStack(); + } + return result; + } + + private final boolean addFluidCannerRecipe(GT_Recipe aRecipe) { + boolean result = false; + int aCount1 = GT_Recipe_Map.sFluidCannerRecipes.mRecipeList.size(); + int aCount2 = aCount1; + GT_Recipe_Map.sFluidCannerRecipes.addRecipe(aRecipe); + aCount1 = GT_Recipe_Map.sFluidCannerRecipes.mRecipeList.size(); + result = aCount1 > aCount2; + if (result) { + //Logger.INFO("[FIND] Added Canning recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); + } + else { + Logger.INFO("[ERROR] Failed adding Canning recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs)); + //dumpStack(); + } + return result; + } + + private void dumpStack() { + int parents = 2; + for (int i=0;i<6;i++) { + Logger.INFO((disableOptional ? "EXTRACTING" : "CANNING")+" DEBUG | "+(i == 0 ? "Called from: " : "Parent: ")+ReflectionUtils.getMethodName(i+parents)); + } + + } + + private String buildLogString() { + int solidSize = getMapSize(GT_Recipe_Map.sCannerRecipes); + int fluidSize = getMapSize(GT_Recipe_Map.sFluidCannerRecipes); + return (disableOptional ? "EXTRACTING" : "CANNING")+" DEBUG | Solids: "+solidSize+" | Liquids: "+fluidSize+" | "; + } + + private final int getMapSize(GT_Recipe_Map aMap) { + return aMap.mRecipeList.size(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java new file mode 100644 index 0000000000..e87fc08c90 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java @@ -0,0 +1,298 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; + +public class RecipeGen_Fluids extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Fluids(final Material M) { + this(M, false); + } + + public RecipeGen_Fluids(final Material M, final boolean dO) { + this.toGenerate = M; + this.disableOptional = dO; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate, this.disableOptional); + } + + private void generateRecipes(final Material material, final boolean dO) { + + if (material == null) { + return; + } + + // Melting Shapes to fluid + if (material.getFluidStack(1) != null + && !material.getFluidStack(1).getUnlocalizedName().toLowerCase().contains("plasma")) { + + if (!material.requiresBlastFurnace()) { + + // Ingot + if (ItemUtils.checkForInvalidItems(material.getIngot(1))) + if (CORE.RA.addFluidExtractionRecipe( + material.getIngot(1), // Input + material.getFluidStack(144), // Fluid Output + 1 * 20, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING("144l fluid extractor from 1 ingot Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING("144l fluid extractor from 1 ingot Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Plate + if (ItemUtils.checkForInvalidItems(material.getPlate(1))) + if (CORE.RA.addFluidExtractionRecipe( + material.getPlate(1), // Input + material.getFluidStack(144), // Fluid Output + 1 * 20, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING("144l fluid extractor from 1 plate Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING("144l fluid extractor from 1 plate Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Double Plate + if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1))) + if (CORE.RA.addFluidExtractionRecipe( + material.getPlateDouble(1), // Input + material.getFluidStack(288), // Fluid Output + 1 * 20, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING("144l fluid extractor from 1 double plate Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING("144l fluid extractor from 1 double plate Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Nugget + if (ItemUtils.checkForInvalidItems(material.getNugget(1))) + if (CORE.RA.addFluidExtractionRecipe( + material.getNugget(1), // Input + material.getFluidStack(16), // Fluid Output + 16, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING("16l fluid extractor from 1 nugget Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING("16l fluid extractor from 1 nugget Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Block + if (ItemUtils.checkForInvalidItems(material.getBlock(1))) + if (CORE.RA.addFluidExtractionRecipe( + material.getBlock(1), // Input + material.getFluidStack(144 * 9), // Fluid Output + 288, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid extractor from 1 block Recipe: " + + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid extractor from 1 block Recipe: " + + material.getLocalizedName() + " - Failed"); + } + + } + + // Making Shapes from fluid + + // Ingot + if (ItemUtils.checkForInvalidItems(material.getIngot(1))) + if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), // Item Shape + material.getFluidStack(144), // Fluid Input + material.getIngot(1), // output + 32, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING( + "144l fluid molder for 1 ingot Recipe: " + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING( + "144l fluid molder for 1 ingot Recipe: " + material.getLocalizedName() + " - Failed"); + } + + // Plate + if (ItemUtils.checkForInvalidItems(material.getPlate(1))) + if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0), // Item Shape + material.getFluidStack(144), // Fluid Input + material.getPlate(1), // output + 32, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING( + "144l fluid molder for 1 plate Recipe: " + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING( + "144l fluid molder for 1 plate Recipe: " + material.getLocalizedName() + " - Failed"); + } + + // Nugget + if (ItemUtils.checkForInvalidItems(material.getNugget(1))) + if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), // Item Shape + material.getFluidStack(16), // Fluid Input + material.getNugget(1), // output + 16, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING( + "16l fluid molder for 1 nugget Recipe: " + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING( + "16l fluid molder for 1 nugget Recipe: " + material.getLocalizedName() + " - Failed"); + } + + // Gears + if (ItemUtils.checkForInvalidItems(material.getGear(1))) + if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0), // Item Shape + material.getFluidStack(576), // Fluid Input + material.getGear(1), // output + 128, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING( + "576l fluid molder for 1 gear Recipe: " + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING("576l fluid molder for 1 gear Recipe: " + material.getLocalizedName() + " - Failed"); + } + + // Blocks + if (ItemUtils.checkForInvalidItems(material.getBlock(1))) + if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), // Item Shape + material.getFluidStack(144 * 9), // Fluid Input + material.getBlock(1), // output + 288, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 block Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 block Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + if (CORE.GTNH) { + + // GTNH + + // Shape_Mold_Rod + // Shape_Mold_Rod_Long + // Shape_Mold_Bolt, + // Shape_Mold_Screw, + // Shape_Mold_Ring, + + + ItemList mold_Rod = ItemUtils.getValueOfItemList("Shape_Mold_Rod", null); + ItemList mold_Rod_Long = ItemUtils.getValueOfItemList("Shape_Mold_Rod_Long", null); + ItemList mold_Bolt = ItemUtils.getValueOfItemList("Shape_Mold_Bolt", null); + ItemList mold_Screw = ItemUtils.getValueOfItemList("Shape_Mold_Screw", null); + ItemList mold_Ring = ItemUtils.getValueOfItemList("Shape_Mold_Ring", null); + + // Rod + if (ItemUtils.checkForInvalidItems(material.getRod(1))) + if (mold_Rod != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod.get(0), // Item Shape + material.getFluidStack(72), // Fluid Input + material.getRod(1), // output + 150, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 rod Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 rod Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Rod Long + if (ItemUtils.checkForInvalidItems(material.getLongRod(1))) + if (mold_Rod_Long != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod_Long.get(0), // Item + // Shape + material.getFluidStack(144), // Fluid Input + material.getLongRod(1), // output + 300, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 rod long Recipe: " + + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 rod long Recipe: " + + material.getLocalizedName() + " - Failed"); + } + + // Bolt + if (ItemUtils.checkForInvalidItems(material.getBolt(1))) + if (mold_Bolt != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Bolt.get(0), // Item Shape + material.getFluidStack(18), // Fluid Input + material.getBolt(1), // output + 50, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 bolt Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 bolt Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Screw + if (ItemUtils.checkForInvalidItems(material.getScrew(1))) + if (mold_Screw != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Screw.get(0), // Item Shape + material.getFluidStack(18), // Fluid Input + material.getScrew(1), // output + 50, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 screw Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 screw Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + // Ring + if (ItemUtils.checkForInvalidItems(material.getRing(1))) + if (mold_Ring != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Ring.get(0), // Item Shape + material.getFluidStack(36), // Fluid Input + material.getRing(1), // output + 100, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName() + + " - Failed"); + } + + } + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java new file mode 100644 index 0000000000..f8108852f4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java @@ -0,0 +1,274 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import net.minecraft.item.ItemStack; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Recipe; + +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeGen_MaterialProcessing extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_MaterialProcessing(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material){ + + if (material.getMaterialComposites().length > 1){ + Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]"); + final int tVoltageMultiplier = material.vVoltageMultiplier; + int[] partSizes = new int[99]; + if (material.vSmallestRatio != null) { + partSizes = new int[material.vSmallestRatio.length]; + for (int hu=0;hu> componentMap = new AutoMap>(); + int alnsnfds = 0; + for (MaterialStack r : material.getComposites()){ + if (r != null){ + componentMap.put(new Pair(partSizes[alnsnfds], r.getStackMaterial())); + } + alnsnfds++; + } + + + + + + /** + * Electrolyzer + */ + + //Process Dust + if (componentMap.size() > 0 && componentMap.size() <= 6){ + ItemStack mInternalOutputs[] = new ItemStack[6]; + int mChances[] = new int[6]; + int mCellCount = 0; + + int mTotalCount = 0; + + int mCounter = 0; + for (Pair f : componentMap){ + if (f.getValue().getState() != MaterialState.SOLID){ + Logger.MATERIALS("[Electrolyzer] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); + mCellCount += f.getKey(); + mTotalCount += f.getKey(); + Logger.MATERIALS("[Electrolyzer] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); + } + else { + Logger.MATERIALS("[Electrolyzer] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); + mTotalCount += f.getKey(); + } + } + + //Build Output Array + for (int g=0;g 0){ + emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); + Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mCellCount+" empty cells as input."); + } + + ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); + if (mainDust != null){ + Logger.MATERIALS("[Electrolyzer] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); + } + else { + mainDust = material.getDust(mTotalCount); + Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, trying alternative."); + if (mainDust != null){ + Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); + } + else { + Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, exiting."); + } + } + + for (int j=0;j 6 && componentMap.size() <= 9){ + Logger.MATERIALS("[Issue][Electrolyzer] "+material.getLocalizedName()+" is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead."); + + ItemStack mInternalOutputs[] = new ItemStack[9]; + int mChances[] = new int[9]; + int mCellCount = 0; + + int mTotalCount = 0; + + int mCounter = 0; + for (Pair f : componentMap){ + if (f.getValue().getState() != MaterialState.SOLID){ + Logger.MATERIALS("[Dehydrator] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); + mCellCount += f.getKey(); + mTotalCount += f.getKey(); + Logger.MATERIALS("[Dehydrator] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); + } + else { + Logger.MATERIALS("[Dehydrator] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); + mTotalCount += f.getKey(); + } + } + + //Build Output Array + for (int g=0;g 0){ + emptyCell = CI.emptyCells(mCellCount); + Logger.MATERIALS("[Dehydrator] Recipe now requires "+mCellCount+" empty cells as input."); + } + + ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); + if (mainDust != null){ + Logger.MATERIALS("[Dehydrator] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); + } + else { + mainDust = material.getDust(mTotalCount); + Logger.MATERIALS("[Dehydrator] Could not find valid input dust, trying alternative."); + if (mainDust != null){ + Logger.MATERIALS("[Dehydrator] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); + } + else { + Logger.MATERIALS("[Dehydrator] Could not find valid input dust, exiting."); + } + } + + for (int j=0;j> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_MetalRecipe(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material) { + + Logger.WARNING("Generating Metal recipes for "+material.getLocalizedName()); + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) + if (GT_ModHandler.addCompressionRecipe( + material.getIngot(9), + material.getBlock(1) + )){ + Logger.WARNING("Compress Block Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Compress Block Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) + if (GT_Values.RA.addLatheRecipe( + material.getIngot(1), + material.getRod(1), + material.getSmallDust(2), + (int) Math.max(material.getMass() / 8L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Lathe Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Lathe Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) + if (GT_Values.RA.addCutterRecipe( + material.getRod(1), + material.getBolt(4), + null, + (int) Math.max(material.getMass() * 2L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Cut Bolt Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Cut Bolt Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getHotIngot(1))) + if (CORE.RA.addVacuumFreezerRecipe( + material.getHotIngot(1), + material.getIngot(1), + (int) Math.max(material.getMass() * 3L, 1L), + material.vVoltageMultiplier) + ){ + Logger.WARNING("Cool Hot Ingot Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Cool Hot Ingot Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getLongRod(1))) { + if (GT_Values.RA.addForgeHammerRecipe( + material.getRod(2), + material.getLongRod(1), + (int) Math.max(material.getMass(), 1L), + 16)){ + Logger.WARNING("Hammer Long Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Hammer Long Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } + + GT_Values.RA.addCutterRecipe( + material.getLongRod(1), + material.getRod(2), + null, + (int) Math.max(material.getMass(), 1L), + 4); + } + + if (ItemUtils.checkForInvalidItems(material.getBolt(1)) && ItemUtils.checkForInvalidItems(material.getScrew(1))) + if (GT_Values.RA.addLatheRecipe( + material.getBolt(1), + material.getScrew(1), + null, + (int) Math.max(material.getMass() / 8L, 1L), + 4)){ + Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Failed"); + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java new file mode 100644 index 0000000000..a76322e4f4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java @@ -0,0 +1,187 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.util.GTPP_Recipe; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map_Internal; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeGen_MultisUsingFluidInsteadOfCells { + + + private static ItemStack mEmptyCell; + private static AutoMap mItemsToIgnore = new AutoMap(); + private static boolean mInit = false; + + private static void init() { + if (!mInit) { + mInit = true; + mItemsToIgnore.add(ItemUtils.simpleMetaStack(CI.emptyCells(1).getItem(), 8, 1)); + + + } + } + + private static boolean doesItemMatchIgnoringStackSize(ItemStack a, ItemStack b) { + if (a == null || b == null) { + return false; + } + if (a.getItem() == b.getItem()) { + if (a.getItemDamage() == b.getItemDamage()) { + return true; + } + } + return false; + } + + private static boolean isEmptyCell(ItemStack aCell) { + if (aCell == null) { + return false; + } + if (mEmptyCell == null) { + mEmptyCell = CI.emptyCells(1); + } + if (mEmptyCell != null) { + ItemStack aTempStack = mEmptyCell.copy(); + aTempStack.stackSize = aCell.stackSize; + if (GT_Utility.areStacksEqual(aTempStack, aCell)) { + return true; + } + } + return false; + } + + private synchronized static FluidStack getFluidFromItemStack(final ItemStack ingot) { + if (ingot == null) { + return null; + } + FluidStack aFluid = GT_Utility.getFluidForFilledItem(ingot, true); + if (aFluid != null) { + return aFluid; + } + return null; + } + + public synchronized static int generateRecipesNotUsingCells(GT_Recipe_Map aInputs, GTPP_Recipe_Map_Internal aOutputs) { + init(); + int aRecipesHandled = 0; + int aInvalidRecipesToConvert = 0; + int aOriginalCount = aInputs.mRecipeList.size(); + + recipe : for (GT_Recipe x : aInputs.mRecipeList) { + if (x != null) { + + ItemStack[] aInputItems = x.mInputs.clone(); + ItemStack[] aOutputItems = x.mOutputs.clone(); + FluidStack[] aInputFluids = x.mFluidInputs.clone(); + FluidStack[] aOutputFluids = x.mFluidOutputs.clone(); + + AutoMap aInputItemsMap = new AutoMap(); + AutoMap aOutputItemsMap = new AutoMap(); + AutoMap aInputFluidsMap = new AutoMap(); + AutoMap aOutputFluidsMap = new AutoMap(); + + // Iterate Inputs, Convert valid items into fluids + inputs : for (ItemStack aInputStack : aInputItems) { + FluidStack aFoundFluid = getFluidFromItemStack(aInputStack); + if (aFoundFluid == null) { + for (ItemStack aBadStack : mItemsToIgnore) { + if (doesItemMatchIgnoringStackSize(aInputStack, aBadStack)) { + continue recipe; // Skip this recipe entirely if we find an item we don't like + } + } + if (!isEmptyCell(aInputStack)) { + aInputItemsMap.add(aInputStack); + } + } + else { + aFoundFluid.amount = aFoundFluid.amount * aInputStack.stackSize; + aInputFluidsMap.add(aFoundFluid); + } + } + // Iterate Outputs, Convert valid items into fluids + outputs: for (ItemStack aOutputStack : aOutputItems) { + FluidStack aFoundFluid = getFluidFromItemStack(aOutputStack); + if (aFoundFluid == null) { + for (ItemStack aBadStack : mItemsToIgnore) { + if (doesItemMatchIgnoringStackSize(aOutputStack, aBadStack)) { + continue recipe; // Skip this recipe entirely if we find an item we don't like + } + } + if (!isEmptyCell(aOutputStack)) { + aOutputItemsMap.add(aOutputStack); + } + } + else { + aFoundFluid.amount = aFoundFluid.amount * aOutputStack.stackSize; + aOutputFluidsMap.add(aFoundFluid); + } + } + // Add Input fluids second + for (FluidStack aInputFluid : aInputFluids) { + aInputFluidsMap.add(aInputFluid); + } + // Add Output fluids second + for (FluidStack aOutputFluid : aOutputFluids) { + aOutputFluidsMap.add(aOutputFluid); + } + + // Make some new Arrays + ItemStack[] aNewItemInputs = new ItemStack[aInputItemsMap.size()]; + ItemStack[] aNewItemOutputs = new ItemStack[aOutputItemsMap.size()]; + FluidStack[] aNewFluidInputs = new FluidStack[aInputFluidsMap.size()]; + FluidStack[] aNewFluidOutputs = new FluidStack[aOutputFluidsMap.size()]; + + // Add AutoMap contents to Arrays + for (int i = 0; i < aInputItemsMap.size(); i++) { + aNewItemInputs[i] = aInputItemsMap.get(i); + } + for (int i = 0; i < aOutputItemsMap.size(); i++) { + aNewItemOutputs[i] = aOutputItemsMap.get(i); + } + for (int i = 0; i < aInputFluidsMap.size(); i++) { + aNewFluidInputs[i] = aInputFluidsMap.get(i); + } + for (int i = 0; i < aOutputFluidsMap.size(); i++) { + aNewFluidOutputs[i] = aOutputFluidsMap.get(i); + } + + if (!ItemUtils.checkForInvalidItems(aNewItemInputs, aNewItemOutputs)) { + aInvalidRecipesToConvert++; + continue recipe; // Skip this recipe entirely if we find an item we don't like + } + + // Add Recipe to map + GT_Recipe aNewRecipe = new GTPP_Recipe( + false, + aNewItemInputs, + aNewItemOutputs, + x.mSpecialItems, + x.mChances, + aNewFluidInputs, + aNewFluidOutputs, + x.mDuration, + x.mEUt, + x.mSpecialValue); + aOutputs.add(aNewRecipe); + aRecipesHandled++; + } + else { + aInvalidRecipesToConvert++; + } + } + + Logger.INFO("Generated Recipes for "+aOutputs.mNEIName); + Logger.INFO("Original Map contains "+aOriginalCount+" recipes."); + Logger.INFO("Output Map contains "+aRecipesHandled+" recipes."); + Logger.INFO("There were "+aInvalidRecipesToConvert+" invalid recipes."); + return aRecipesHandled; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java new file mode 100644 index 0000000000..b7043b5983 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java @@ -0,0 +1,573 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import net.minecraft.item.ItemStack; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeGen_Ore extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Ore(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private static Material mStone; + + public static void generateRecipes(final Material material){ + + if (mStone == null) { + mStone = MaterialUtils.generateMaterialFromGtENUM(Materials.Stone); + } + + //if (material.getMaterialComposites().length > 1){ + Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]"); + int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier); + + final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1); + Material bonusA = null; //Ni + Material bonusB = null; //Tin + + if (material.getComposites().size() >= 1 && material.getComposites().get(0) != null){ + bonusA = material.getComposites().get(0).getStackMaterial(); + } + else { + bonusA = material; + } + + boolean allFailed = false; + + + //Setup Bonuses + ArrayList aMatComp = new ArrayList(); + for (Material j : MaterialUtils.getCompoundMaterialsRecursively(material)) { + aMatComp.add(j); + } + + if (aMatComp.size() < 3) { + while (aMatComp.size() < 3) { + aMatComp.add(material); + } + } + + AutoMap amJ = new AutoMap(); + int aIndexCounter = 0; + for (Material g : aMatComp) { + if (g.hasSolidForm()) { + if (getDust(g) != null && getTinyDust(g) != null) { + amJ.put(g); + } + } + } + + if (amJ.size() < 2) { + if (material.getComposites().size() >= 2 && material.getComposites().get(1) != null){ + bonusB = material.getComposites().get(1).getStackMaterial(); + //If Secondary Output has no solid output, try the third (If it exists) + if (!bonusB.hasSolidForm() && material.getComposites().size() >= 3 && material.getComposites().get(2) != null) { + bonusB = material.getComposites().get(2).getStackMaterial(); + //If Third Output has no solid output, try the Fourth (If it exists) + if (!bonusB.hasSolidForm() && material.getComposites().size() >= 4 && material.getComposites().get(3) != null) { + bonusB = material.getComposites().get(3).getStackMaterial(); + //If Fourth Output has no solid output, try the Fifth (If it exists) + if (!bonusB.hasSolidForm() && material.getComposites().size() >= 5 && material.getComposites().get(4) != null) { + bonusB = material.getComposites().get(4).getStackMaterial(); + //If Fifth Output has no solid output, default out to Stone dust. + if (!bonusB.hasSolidForm()) { + allFailed = true; + bonusB = mStone; + } + } + } + } + } + else { + allFailed = true; + } + } + else { + bonusA = amJ.get(0); + bonusB = amJ.get(1); + } + + //Default out if it's made of fluids or some shit. + if (bonusA == null) { + bonusA = tVoltageMultiplier > 100 ? material : mStone; + } + //Default out if it's made of fluids or some shit. + if (allFailed || bonusB == null) { + bonusB = tVoltageMultiplier > 100 ? material : mStone; + } + + AutoMap> componentMap = new AutoMap>(); + for (MaterialStack r : material.getComposites()){ + if (r != null){ + componentMap.put(new Pair(r.getPartsPerOneHundred(), r.getStackMaterial())); + } + } + + //Need two valid outputs + if (bonusA == null || bonusB == null || !bonusA.hasSolidForm() || !bonusB.hasSolidForm()) { + if (bonusA == null) { + bonusA = mStone; + } + if (bonusB == null) { + bonusB = mStone; + } + if (!bonusA.hasSolidForm()) { + bonusA = mStone; + } + if (!bonusB.hasSolidForm()) { + bonusB = mStone; + } + } + + ItemStack tinyDustA = getTinyDust(bonusA); + ItemStack tinyDustB = getTinyDust(bonusB); + ItemStack matDust = getDust(material); + ItemStack matDustA = getDust(bonusA); + ItemStack matDustB = getDust(bonusB); + + /** + * Package + */ + //Allow ore dusts to be packaged + if (ItemUtils.checkForInvalidItems(material.getSmallDust(1)) && ItemUtils.checkForInvalidItems(material.getTinyDust(1))) { + RecipeGen_DustGeneration.generatePackagerRecipes(material); + } + + + /** + * Macerate + */ + //Macerate ore to Crushed + if (GT_Values.RA.addPulveriserRecipe(material.getOre(1), new ItemStack[]{material.getCrushed(2)}, new int[]{10000}, 20*20, tVoltageMultiplier/2)){ + Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate ore to Crushed ore'"); + } + //Macerate Crushed to Impure Dust + if (GT_Values.RA.addPulveriserRecipe(material.getCrushed(1), new ItemStack[]{material.getDustImpure(1), matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ + Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Crushed ore to Impure Dust'"); + } + //Macerate Washed to Purified Dust + if (GT_Values.RA.addPulveriserRecipe(material.getCrushedPurified(1), new ItemStack[]{material.getDustPurified(1), matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ + Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Washed ore to Purified Dust'"); + } + //Macerate Centrifuged to Pure Dust + if (GT_Values.RA.addPulveriserRecipe(material.getCrushedCentrifuged(1), new ItemStack[]{matDust, matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){ + Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Centrifuged ore to Pure Dust'"); + } + + /** + * Wash + */ + //Wash into Purified Crushed + /*if (GT_Values.RA.addOreWasherRecipe(material.getCrushed(1), material.getCrushedPurified(1), bonusA.getTinyDust(1), dustStone, FluidUtils.getWater(1000), 25*20, 16)){ + Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'"); + }*/ + //.08 compat method + if (GT_ModHandler.addOreWasherRecipe(material.getCrushed(1), 1000, material.getCrushedPurified(1), tinyDustA, dustStone)){ + Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'"); + } + + + + + + /** + * Thermal Centrifuge + */ + /*//Crushed ore to Centrifuged Ore + if (GT_Values.RA.addThermalCentrifugeRecipe(material.getCrushed(1), material.getCrushedCentrifuged(1), tinyDustB, dustStone, 25*20, 24)){ + Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore'"); + } + //Washed ore to Centrifuged Ore + if (GT_Values.RA.addThermalCentrifugeRecipe(material.getCrushedPurified(1), material.getCrushedCentrifuged(1), bonusA.getTinyDust(1), dustStone, 25*20, 24)){ + Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore'"); + }*/ + + Logger.MATERIALS("material.getCrushed(1): "+(material.getCrushed(1) != null)); + Logger.MATERIALS("material.getCrushedPurified(1): "+(material.getCrushedPurified(1) != null)); + + Logger.MATERIALS("material.getTinyDust(1): "+(ItemUtils.getItemName(bonusA.getCrushed(1)))); + Logger.MATERIALS("material.getTinyDust(1): "+(ItemUtils.getItemName(bonusB.getCrushed(1)))); + + try { + //.08 compat + if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushed(1), 200, material.getCrushedCentrifuged(1), tinyDustB, dustStone)){ + Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore' | Input: "+material.getCrushed(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustB.getDisplayName()+", "+dustStone.getDisplayName()+"."); + } + } + catch (Throwable t) {} + try { + if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), 200, material.getCrushedCentrifuged(1), tinyDustA, dustStone)){ + Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore' | Input: "+material.getCrushedPurified(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustA.getDisplayName()+", "+dustStone.getDisplayName()+"."); + } + } + catch (Throwable t) {} + + + /** + * Forge Hammer + */ + if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), matDust, 10, tVoltageMultiplier/4)){ + Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'"); + } + if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedPurified(1), material.getDustPurified(1), 10, tVoltageMultiplier/4)){ + Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Purified to Purified Dust'"); + } + if (GT_Values.RA.addForgeHammerRecipe(material.getOre(1), material.getCrushed(1), 10, tVoltageMultiplier/4)){ + Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Ore to Crushed'"); + } + + /** + * Centrifuge + */ + //Purified Dust to Clean + if (GT_Values.RA.addCentrifugeRecipe( + material.getDustPurified(1), null, + null, //In Fluid + null, //Out Fluid + matDust, tinyDustA,null, + null, null,null, + new int[]{10000, 10000}, //Chances + 5*20, //Time + tVoltageMultiplier/2)){ //Eu + Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust"); + } + + //Impure Dust to Clean + if (GT_Values.RA.addCentrifugeRecipe( + material.getDustImpure(1), null, + null, //In Fluid + null, //Out Fluid + matDust, tinyDustB,null, + null, null,null, + new int[]{10000, 10000}, //Chances + 5*20, //Time + tVoltageMultiplier/2)){ //Eu + Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust"); + } + + + /** + * Electrolyzer + */ + + //Process Dust + if (componentMap.size() > 0 && componentMap.size() <= 6){ + + ItemStack mInternalOutputs[] = new ItemStack[6]; + int mChances[] = new int[6]; + int mCellCount = 0; + + int mTotalCount = 0; + + int mCounter = 0; + for (Pair f : componentMap){ + if (f.getValue().getState() != MaterialState.SOLID){ + Logger.MATERIALS("[Electrolyzer] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); + mCellCount += f.getKey(); + mTotalCount += f.getKey(); + Logger.MATERIALS("[Electrolyzer] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); + } + else { + Logger.MATERIALS("[Electrolyzer] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); + mTotalCount += f.getKey(); + } + } + + //Build Output Array + for (int g=0;g 0){ + emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); + Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mCellCount+" empty cells as input."); + } + + ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); + if (mainDust != null){ + Logger.MATERIALS("[Electrolyzer] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); + } + else { + mainDust = material.getDust(mTotalCount); + Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, trying alternative."); + if (mainDust != null){ + Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); + } + else { + Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, exiting."); + } + } + + for (int j=0;j 6 && componentMap.size() <= 9){ + Logger.MATERIALS("[Issue][Electrolyzer] "+material.getLocalizedName()+" is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead."); + + ItemStack mInternalOutputs[] = new ItemStack[9]; + int mChances[] = new int[9]; + int mCellCount = 0; + + int mTotalCount = 0; + + int mCounter = 0; + for (Pair f : componentMap){ + if (f.getValue().getState() != MaterialState.SOLID && f.getValue().getState() != MaterialState.ORE){ + Logger.MATERIALS("[Dehydrator] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); + mCellCount += f.getKey(); + mTotalCount += f.getKey(); + Logger.MATERIALS("[Dehydrator] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing."); + } + else { + Logger.MATERIALS("[Dehydrator] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+"."); + mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey()); + mTotalCount += f.getKey(); + } + } + + //Build Output Array + for (int g=0;g 0){ + emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount); + Logger.MATERIALS("[Dehydrator] Recipe now requires "+mCellCount+" empty cells as input."); + } + + ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing); + if (mainDust != null){ + Logger.MATERIALS("[Dehydrator] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input."); + } + else { + mainDust = material.getDust(mTotalCount); + Logger.MATERIALS("[Dehydrator] Could not find valid input dust, trying alternative."); + if (mainDust != null){ + Logger.MATERIALS("[Dehydrator] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input."); + } + else { + Logger.MATERIALS("[Dehydrator] Could not find valid input dust, exiting."); + } + } + + for (int j=0;j> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Plasma(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material) { + // Cool Plasma + ItemStack aPlasmaCell = material.getPlasmaCell(1); + ItemStack aCell = material.getCell(1); + if (material.getPlasmaCell(1) != null){ + GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : null, (int) Math.max(1024L, 1024L * material.getMass()), 4); + } + if (material.getCell(1) != null && material.getPlasmaCell(1) != null){ + GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L)); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java new file mode 100644 index 0000000000..56d11520d0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java @@ -0,0 +1,154 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; + +public class RecipeGen_Plates extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_Plates(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material){ + + final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15; + final ItemStack ingotStackOne = material.getIngot(1); + final ItemStack ingotStackTwo = material.getIngot(2); + final ItemStack shape_Mold = ItemList.Shape_Mold_Plate.get(0); + final ItemStack plate_Single = material.getPlate(1); + final ItemStack plate_SingleTwo = material.getPlate(2); + final ItemStack plate_SingleNine = material.getPlate(9); + final ItemStack plate_Double = material.getPlateDouble(1); + final ItemStack block = material.getBlock(1); + + Logger.WARNING("Generating Plate recipes for "+material.getLocalizedName()); + + //Forge Hammer + if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) + if (addForgeHammerRecipe( + ingotStackTwo, + plate_Single, + (int) Math.max(material.getMass(), 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Failed"); + } + //Bender + if (ItemUtils.checkForInvalidItems(ingotStackOne) && ItemUtils.checkForInvalidItems(plate_Single)) + if (addBenderRecipe( + ingotStackOne, + plate_Single, + (int) Math.max(material.getMass() * 1L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); + } + //Alloy Smelter + if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) + if (GT_Values.RA.addAlloySmelterRecipe( + ingotStackTwo, + shape_Mold, + plate_Single, + (int) Math.max(material.getMass() * 2L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Failed"); + } + //Cutting Machine + if (ItemUtils.checkForInvalidItems(block) && ItemUtils.checkForInvalidItems(plate_Single)) + if (GT_Values.RA.addCutterRecipe( + block, + null, + plate_SingleNine, + (int) Math.max(material.getMass() * 10L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("ACutting Machine Recipe: "+material.getLocalizedName()+" - Failed"); + } + + + //Making Double Plates + if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Double)) + if (addBenderRecipe( + ingotStackTwo, + plate_Double, + (int) Math.max(material.getMass() * 2L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); + } + + if (ItemUtils.checkForInvalidItems(plate_SingleTwo) && ItemUtils.checkForInvalidItems(plate_Double)) + if (addBenderRecipe( + plate_SingleTwo, + plate_Double, + (int) Math.max(material.getMass() * 2L, 1L), + material.vVoltageMultiplier)){ + Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + public static boolean addBenderRecipe(final ItemStack aInput1, final ItemStack aOutput1, int aDuration, final int aEUt) { + return GT_Values.RA.addBenderRecipe(aInput1, aOutput1, aDuration, aEUt); + } + + public static boolean addExtruderRecipe(final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) { + if ((aInput == null) || (aShape == null) || (aOutput == null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); + return true; + } + + public static boolean addForgeHammerRecipe(final ItemStack aInput1, final ItemStack aOutput1, final int aDuration, final int aEUt) { + if ((aInput1 == null) || (aOutput1 == null)) { + return false; + } + if (!GregTech_API.sRecipeFile.get("forgehammer", aOutput1, true)) { + return false; + } + GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); + return true; + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java new file mode 100644 index 0000000000..acb7e5fe02 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java @@ -0,0 +1,373 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import static gregtech.api.enums.GT_Values.M; + +import java.util.ArrayList; +import java.util.Map; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class RecipeGen_Recycling implements Runnable { + + public static AutoMap mQueuedRecyclingGenerators = new AutoMap(); + + public static void executeGenerators() { + if (mQueuedRecyclingGenerators.size() > 0) { + for (Runnable R : mQueuedRecyclingGenerators.values()) { + R.run(); + } + } + } + + final Material toGenerate; + public static Map mNameMap; + + public RecipeGen_Recycling(final Material M) { + this.toGenerate = M; + if (mNameMap == null){ + mNameMap = this.getNameMap(); + } + mQueuedRecyclingGenerators.put(this); + } + + @Override + public void run() { + if (mNameMap != null){ + generateRecipes(this.toGenerate); + } + } + + public static void generateRecipes(final Material material) { + + if (material != null) + Logger.WARNING("Generating Recycling recipes for " + material.getLocalizedName()); + + final OrePrefixes[] mValidPrefixesAsString = { OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.nugget, + OrePrefixes.plate, OrePrefixes.plateDense, OrePrefixes.plateDouble, OrePrefixes.plateTriple, + OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.stick, OrePrefixes.stickLong, + OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.rotor, OrePrefixes.gearGt, + OrePrefixes.gearGtSmall, OrePrefixes.gear, OrePrefixes.block, OrePrefixes.cableGt01, OrePrefixes.cableGt02, + OrePrefixes.cableGt04, OrePrefixes.cableGt08, OrePrefixes.cableGt12, OrePrefixes.wireFine, OrePrefixes.wireGt01, + OrePrefixes.wireGt02, OrePrefixes.wireGt04, OrePrefixes.wireGt08, OrePrefixes.wireGt12, OrePrefixes.wireGt16, + OrePrefixes.foil, OrePrefixes.frameGt, OrePrefixes.pipeHuge, OrePrefixes.pipeLarge, OrePrefixes.pipeMedium, OrePrefixes.pipeSmall, OrePrefixes.pipeTiny, + }; + + int mSlotIndex = 0; + Pair[] mValidPairs = new Pair[mValidPrefixesAsString.length]; + + for (int r=0;r(mValidPrefixesAsString[r], temp.copy()); + } + } + + if (mValidPairs.length > 0){ + int validCounter = 0; + Pair[] temp = mValidPairs; + for (Pair temp2 : mValidPairs){ + if (temp2 != null){ + Logger.WARNING("Valid: "+temp2.getValue().getDisplayName()); + validCounter++; + } + } + Pair temp3[] = new Pair[validCounter]; + int temp4 = 0; + for (Pair r : mValidPairs){ + if (r != null){ + temp3[temp4++] = r; + } + } + if (temp3.length > 0){ + mValidPairs = temp3.clone(); + } + } + + if (mValidPrefixesAsString.length >= 1) { + for (final Pair validPrefix : mValidPairs) { + try { + + if (material == null || validPrefix == null || material.getState() != MaterialState.SOLID || validPrefix.getKey() == OrePrefixes.ingotHot) { + continue; + } + + final ItemStack tempStack = validPrefix.getValue(); + final ItemStack mDust = getDust(material, validPrefix.getKey()); + final Pair mData = getDustData(material, validPrefix.getKey()); + int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(validPrefix.getKey().mMaterialAmount, true); + + //Maceration + if (ItemUtils.checkForInvalidItems(tempStack)) { + // mValidItems[mSlotIndex++] = tempStack; + if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)) { + Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " + + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName()); + } + else { + Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Failed"); + if (mDust == null) { + Logger.WARNING("Invalid Dust output."); + } + } + } + + //Arc Furnace + if (ItemUtils.checkForInvalidItems(tempStack)) { + + } + + //Fluid Extractor + if (ItemUtils.checkForInvalidItems(tempStack)) { + // mValidItems[mSlotIndex++] = tempStack; + if ((mDust != null) && CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluidStack(mFluidAmount), 30, material.vVoltageMultiplier)) { + Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " + + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluidStack(1).getLocalizedName()+"."); + } + else { + Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Failed"); + if (mDust == null) { + Logger.WARNING("Invalid Dust output."); + } + } + } + + } + catch (final Throwable t) { + t.printStackTrace(); + // Utils.LOG_WARNING("Returning Null. Throwable Info: + // "+t.getMessage()); + // Utils.LOG_WARNING("Throwable Info: "+t.toString()); + // Utils.LOG_WARNING("Throwable Info: + // "+t.getCause().toString()); + } + + } + } + } + + public static Pair getDustData(final Material aMaterial, final OrePrefixes aPrefix) { + return getDustData(aMaterial, aPrefix.mMaterialAmount); + } + + public static Pair getDustData(final Material aMaterial, final long aMaterialAmount) { + ItemStack mDust = null; + OrePrefixes mPrefix = null; + + if (aMaterial == null || aMaterialAmount <= 0) { + return null; + } + if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) { + mDust = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); + mPrefix = OrePrefixes.dust; + } + if ((mDust == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) { + mDust = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); + mPrefix = OrePrefixes.dustSmall; + } + if ((mDust == null) && (((aMaterialAmount * 9) >= M))) { + mDust = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); + mPrefix = OrePrefixes.dustTiny; + } + + if (mPrefix != null && mDust != null){ + Logger.WARNING("Built valid dust pair."); + return new Pair(mPrefix, mDust); + } + else { + Logger.WARNING("mPrefix: "+(mPrefix!=null)); + Logger.WARNING("mDust: "+(mDust!=null)); + } + Logger.WARNING("Failed to build valid dust pair."); + return null; + } + + public static ItemStack getDust(final Material aMaterial, final OrePrefixes aPrefix) { + return aMaterial == null ? null : getDust(aMaterial, aPrefix.mMaterialAmount); + } + + public static ItemStack getDust(final Material aMaterial, final long aMaterialAmount) { + if (aMaterialAmount <= 0) { + return null; + } + ItemStack rStack = null; + if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) { + Logger.WARNING("Trying to get a Dust"); + rStack = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M); + } + if ((rStack == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) { + Logger.WARNING("Trying to get a Small Dust"); + rStack = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M); + } + if ((rStack == null) && (((aMaterialAmount * 9) >= M))) { + Logger.WARNING("Trying to get a Tiny Dust"); + rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M); + } + return rStack; + } + + public static ItemStack get(final Object aName, final long aAmount) { + return get(aName, null, aAmount, true, true); + } + + public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount) { + return get(aName, aReplacement, aAmount, true, true); + } + + public static ItemStack get(final OrePrefixes aPrefix, final Material aMaterial, final long aAmount) { + return get(aPrefix, aMaterial, null, aAmount); + } + + public static ItemStack get(final OrePrefixes aPrefix, final Material aMaterial, final ItemStack aReplacement, + final long aAmount) { + return get(aPrefix.name()+Utils.sanitizeString(aMaterial.getLocalizedName()), aReplacement, aAmount, false, true); + } + + public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount, + final boolean aMentionPossibleTypos, final boolean aNoInvalidAmounts) { + if (aNoInvalidAmounts && (aAmount < 1L)) { + Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4)); + return null; + } + if (!mNameMap.containsKey(aName.toString()) && aMentionPossibleTypos) { + Logger.WARNING("Unknown Key for Unification, Typo? " + aName); + } + return GT_Utility.copyAmount(aAmount, + new Object[] { mNameMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement }); + } + + public static ItemStack getFirstOre(final Object aName, final long aAmount) { + if (GT_Utility.isStringInvalid(aName)) { + Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3)); + Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4)); + return null; + } + final ItemStack tStack = mNameMap.get(aName.toString()); + if (GT_Utility.isStackValid(tStack)) { + Logger.WARNING("Found valid stack."); + return GT_Utility.copyAmount(aAmount, new Object[] { tStack }); + } + return GT_Utility.copyAmount(aAmount, getOres(aName).toArray()); + } + + public static ArrayList getOres(final Object aOreName) { + final String aName = (aOreName == null) ? "" : aOreName.toString(); + final ArrayList rList = new ArrayList(); + if (GT_Utility.isStringValid(aName)) { + Logger.WARNING("Making a list of all OreDict entries for "+aOreName+"."); + if (rList.addAll(OreDictionary.getOres(aName))){ + Logger.WARNING("Added "+rList.size()+" elements to list."); + } + else { + Logger.WARNING("Failed to Add Collection from oreDictionary, forcing an entry."); + rList.add(ItemUtils.getItemStackOfAmountFromOreDict((String) aOreName, 1)); + } + } + return rList; + } + + @SuppressWarnings("unchecked") + public Map getNameMap() { + Map tempMap; + try { + tempMap = (Map) FieldUtils.readStaticField(GT_OreDictUnificator.class, "sName2StackMap", + true); + if (tempMap != null) { + Logger.WARNING("Found 'sName2StackMap' in GT_OreDictUnificator.class."); + return tempMap; + } + } + catch (final IllegalAccessException e) { + e.printStackTrace(); + } + Logger.WARNING("Invalid map stored in GT_OreDictUnificator.class, unable to find sName2StackMap field."); + return null; + } + + public static ItemStack getItemStackOfAmountFromOreDictNoBroken(String oredictName, final int amount) { + + try { + + if (oredictName.contains("-") || oredictName.contains("_")) { + oredictName = Utils.sanitizeString(oredictName, new char[] {'-', '_'}); + } + else { + oredictName = Utils.sanitizeString(oredictName); + } + + // Adds a check to grab dusts using GT methodology if possible. + ItemStack returnValue = null; + if (oredictName.toLowerCase().contains("dust")) { + final String MaterialName = oredictName.toLowerCase().replace("dust", ""); + final Materials m = Materials.get(MaterialName); + if (m != null && m != Materials._NULL) { + returnValue = ItemUtils.getGregtechDust(m, amount); + if (ItemUtils.checkForInvalidItems(returnValue)) { + return returnValue; + } + } + } + if (returnValue == null) { + returnValue = getItemStackOfAmountFromOreDict(oredictName, amount); + if (ItemUtils.checkForInvalidItems(returnValue)) { + return returnValue.copy(); + } + } + return null; + } catch (final Throwable t) { + return null; + } + } + + public static ItemStack getItemStackOfAmountFromOreDict(String oredictName, final int amount) { + String mTemp = oredictName; + + // Banned Materials and replacements for GT5.8 compat. + + if (oredictName.toLowerCase().contains("ingotclay")) { + return ItemUtils.getSimpleStack(Items.clay_ball, amount); + } + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + if (oredictName.toLowerCase().contains("rutile")) { + mTemp = oredictName.replace("Rutile", "Titanium"); + } + if (oredictName.toLowerCase().contains("vanadiumsteel")) { + mTemp = oredictName.replace("VanadiumSteel", "StainlessSteel"); + } + } + final ArrayList oreDictList = OreDictionary.getOres(mTemp); + if (!oreDictList.isEmpty()) { + final ItemStack returnValue = oreDictList.get(0).copy(); + returnValue.stackSize = amount; + return returnValue; + } + return null; + //return getItemStackOfAmountFromOreDictNoBroken(mTemp, amount); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java new file mode 100644 index 0000000000..ea129a2b0e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -0,0 +1,264 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import java.util.HashSet; +import java.util.Set; + +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.interfaces.RunnableWithInfo; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import net.minecraft.item.ItemStack; + +public class RecipeGen_ShapedCrafting extends RecipeGen_Base { + + public final static Set> mRecipeGenMap = new HashSet>(); + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } + + public RecipeGen_ShapedCrafting(final Material M){ + this.toGenerate = M; + mRecipeGenMap.add(this); + } + + @Override + public void run() { + generateRecipes(this.toGenerate); + } + + private void generateRecipes(final Material material){ + Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO + + if (!CORE.GTNH) { + //Nuggets + if (ItemUtils.checkForInvalidItems(material.getNugget(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + GT_ModHandler.addShapelessCraftingRecipe( + material.getIngot(1), + new Object[]{ + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1) + }); + } + + //Plates + + //Single Plate Shaped/Shapeless + if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + if (material.getPlate(1) != null && material.getIngot(1) != null) + GT_ModHandler.addCraftingRecipe( + material.getPlate(1), + gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"h", "B", "I", + Character.valueOf('I'), + material.getIngot(1), + Character.valueOf('B'), + material.getIngot(1)}); + + if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + GT_ModHandler.addShapelessCraftingRecipe( + material.getPlate(1), + new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + material.getIngot(1), + material.getIngot(1)}); + + //Double Plate Shaped/Shapeless + if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) + GT_ModHandler.addCraftingRecipe( + material.getPlateDouble(1), + gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"I", "B", "h", + Character.valueOf('I'), + material.getPlate(1), + Character.valueOf('B'), + material.getPlate(1)}); + + if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) + GT_ModHandler.addShapelessCraftingRecipe( + material.getPlateDouble(1), + new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + material.getPlate(1), + material.getPlate(1)}); + + //Ring Recipe + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getRing(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { + if (CORE.GTNH){ + if (RecipeUtils.addShapedRecipe( + "craftingToolHardHammer", null, null, + "craftingToolFile", material.getRod(1), null, + null, null, null, + material.getRing(1))){ + Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + else { + if (RecipeUtils.addShapedRecipe( + "craftingToolHardHammer", null, null, + null, material.getRod(1), null, + null, null, null, + material.getRing(1))){ + Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + } + + + //Framebox Recipe + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getFrameBox(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { + final ItemStack stackStick = material.getRod(1); + if (RecipeUtils.addShapedRecipe( + stackStick, stackStick, stackStick, + stackStick, "craftingToolWrench", stackStick, + stackStick, stackStick, stackStick, + material.getFrameBox(2))){ + Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + + /*final int tVoltageMultiplier = material.getMeltingPointK() >= 1600 ? 60 : 15; + + + //Add a shapeless recipe for each dust this way - Compat mode. + ItemStack[] inputStacks = material.getMaterialComposites(); + ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); + + if (inputStacks.length > 0 && tVoltageMultiplier == 15){ + Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); + long[] inputStackSize = material.vSmallestRatio; + if (inputStackSize != null){ + for (short x=0;x mAchievementMap; + public static ConcurrentHashMap mIssuedAchievementMap; + public static int adjX = 5; + public static int adjY = 9; + private static boolean active = true; + + public AssLineAchievements() { + Logger.INFO(active ? "Loading custom achievement page for Assembly Line recipes." + : "Achievements are disabled."); + Utils.registerEvent(this); + } + + private static boolean ready = false; + private static int recipeTotal = 0; + private static int recipeCount = 0; + private static void init() { + if (!ready) { + active = GT_Mod.gregtechproxy.mAchievements; + try { + recipeTotal = ((GT_Recipe.GT_Recipe_Map) StaticFields59.mAssLineVisualMapNEI.get(null)).mRecipeList.size(); + } catch (IllegalArgumentException | IllegalAccessException e) { + recipeTotal = 0; + } + mAchievementMap = new ConcurrentHashMap(); + mIssuedAchievementMap = new ConcurrentHashMap(); + ready = true; + } + + } + + public static void registerAchievements() { + if (active && mAchievementMap.size() > 0) { + AchievementPage.registerAchievementPage(new AchievementPage("GT Assembly Line", + (Achievement[]) mAchievementMap.values().toArray(new Achievement[mAchievementMap.size()]))); + } + else if (active) { + Logger.INFO("Unable to register custom achievement page for Assembly Line recipes."); + } + } + + public static Achievement registerAssAchievement(GT_Recipe recipe) { + init(); + String aSafeUnlocalName; + // Debugging + if (recipe == null) { + Logger.INFO( + "Someone tried to register an achievement for an invalid recipe. Please report this to Alkalus."); + return null; + } + if (recipe.getOutput(0) == null) { + Logger.INFO( + "Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); + return null; + } + ItemStack aStack = recipe.getOutput(0); + try { + aSafeUnlocalName = aStack.getUnlocalizedName(); + } catch (Throwable t) { + aSafeUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); + } + + Achievement aYouDidSomethingInGT; + if (mAchievementMap.get(aSafeUnlocalName) == null) { + assReg++; + recipeCount++; + aYouDidSomethingInGT = registerAchievement(aSafeUnlocalName, -(11 + assReg % 5), ((assReg) / 5) - 8, + recipe.getOutput(0), AchievementList.openInventory, false); + } + else { + aYouDidSomethingInGT = null; + } + if (recipeCount >= recipeTotal) { + Logger.INFO("Critical mass achieved. ["+recipeCount+"]"); + registerAchievements(); + } + + return aYouDidSomethingInGT; + } + + public static Achievement registerAchievement(String textId, int x, int y, ItemStack icon, + Achievement requirement, boolean special) { + if (!GT_Mod.gregtechproxy.mAchievements) { + return null; + } + Achievement achievement = new Achievement(textId, textId, adjX + x, adjY + y, icon, requirement); + if (special) { + achievement.setSpecial(); + } + achievement.registerStat(); + if (CORE.DEVENV) { + GT_Log.out.println("achievement." + textId + "="); + GT_Log.out.println("achievement." + textId + ".desc="); + } + mAchievementMap.put(textId, achievement); + return achievement; + } + + public static void issueAchievement(EntityPlayer entityplayer, String textId) { + if (entityplayer == null || !GT_Mod.gregtechproxy.mAchievements) { + return; + } + + entityplayer.triggerAchievement((StatBase) getAchievement(textId)); + } + + public static Achievement getAchievement(String textId) { + if (mAchievementMap.containsKey(textId)) { + Logger.INFO("Found Achivement: "+textId); + return (Achievement) mAchievementMap.get(textId); + } + return null; + } + + @SubscribeEvent + public void onItemPickup(EntityItemPickupEvent event) { + EntityPlayer player = event.entityPlayer; + ItemStack stack = event.item.getEntityItem(); + String aPickupUnlocalSafe = ItemUtils.getUnlocalizedItemName(stack); + if (player == null || stack == null) { + return; + } + + if (StaticFields59.sAssemblylineVisualRecipes == null) { + return; + } + + Logger.INFO("Trying to check for achievements"); + // Debug scanner unlocks all AL recipes in creative + if (player.capabilities.isCreativeMode && aPickupUnlocalSafe.equals("gt.metaitem.01.32761")) { + for (GT_Recipe recipe : StaticFields59.sAssemblylineVisualRecipes.mRecipeList) { + issueAchievement(player, recipe.getOutput(0).getUnlocalizedName()); + recipe.mHidden = false; + } + } + for (GT_Recipe recipe : StaticFields59.sAssemblylineVisualRecipes.mRecipeList) { + + String aSafeUnlocalName; + if (recipe.getOutput(0) == null) { + Logger.INFO( + "Someone tried to register an achievement for a recipe with null output. Please report this to Alkalus."); + continue; + } + ItemStack aStack = recipe.getOutput(0); + aSafeUnlocalName = ItemUtils.getUnlocalizedItemName(aStack); + if (aSafeUnlocalName.equals(aPickupUnlocalSafe)) { + issueAchievement(player, aSafeUnlocalName); + recipe.mHidden = false; + Logger.INFO("FOUND: " + aSafeUnlocalName + " | " + aPickupUnlocalSafe); + } + else { + //Logger.INFO(aSafeUnlocalName + " | " + aPickupUnlocalSafe); + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java new file mode 100644 index 0000000000..053c71c89d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_AlgaeFarm.java @@ -0,0 +1,207 @@ +package gtPlusPlus.xmod.gregtech.loaders.recipe; + +import java.util.HashMap; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.WeightedCollection; +import gtPlusPlus.core.item.chemistry.AgriculturalChem; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeLoader_AlgaeFarm { + + private static final HashMap> mRecipeCache = new HashMap>(); + private static final HashMap> mRecipeCompostCache = new HashMap>(); + + public static final void generateRecipes() { + for (int i=0;i<10;i++) { + getTieredRecipeFromCache(i, false); + } + for (int i=0;i<10;i++) { + getTieredRecipeFromCache(i, true); + } + } + + public static GT_Recipe getTieredRecipeFromCache(int aTier, boolean aCompost) { + HashMap> aMap = aCompost ? mRecipeCompostCache : mRecipeCache; + String aComp = aCompost ? "(Compost)" : ""; + + AutoMap aTemp = aMap.get(aTier); + if (aTemp == null || aTemp.isEmpty()) { + aTemp = new AutoMap(); + aMap.put(aTier, aTemp); + Logger.INFO("Tier "+aTier+aComp+" had no recipes, initialising new map."); + } + if (aTemp.size() < 500) { + Logger.INFO("Tier "+aTier+aComp+" has less than 500 recipes, generating "+(500 - aTemp.size())+"."); + for (int i=aTemp.size();i<500;i++) { + aTemp.put(generateBaseRecipe(aCompost, aTier)); + } + } + int aIndex = MathUtils.randInt(0, aTemp.isEmpty() ? 1 : aTemp.size()); + Logger.INFO("Using recipe with index of "+aIndex+". "+aComp); + return aTemp.get(aIndex); + } + + private static GT_Recipe generateBaseRecipe(boolean aUsingCompost, int aTier) { + + // Type Safety + if (aTier < 0) { + return null; + } + + WeightedCollection aOutputTimeMulti = new WeightedCollection(); + for (int i=100;i> 0;i--) { + float aValue = 0; + if (i < 10) { + aValue = 3f; + } + else if (i < 20) { + aValue = 2f; + } + else { + aValue = 1f; + } + aOutputTimeMulti.put(i, aValue); + } + + final int[] aDurations = new int[] { + 432000, + 378000, + 216000, + 162000, + 108000, + 81000, + 54000, + 40500, + 27000, + 20250, + 13500, + 6750, + 3375, + 1686, + 843, + 421 + }; + + ItemStack[] aInputs = new ItemStack[] {}; + + if (aUsingCompost) { + // Make it use 4 compost per tier if we have some available + ItemStack aCompost = ItemUtils.getSimpleStack(AgriculturalChem.mCompost, aTier * 4); + aInputs = new ItemStack[] {aCompost}; + // Boost Tier by one if using compost so it gets a speed boost + aTier++; + } + + // We set these elsewhere + ItemStack[] aOutputs = getOutputsForTier(aTier); + + GT_Recipe tRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + (Object) null, + new int[] {}, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {GT_Values.NF}, + (int) (aDurations[aTier] * aOutputTimeMulti.get() / 2), // Time + 0, + 0); + + tRecipe.mSpecialValue = tRecipe.hashCode(); + + return tRecipe; + } + + private static ItemStack[] getOutputsForTier(int aTier) { + + // Create an Automap to dump contents into + AutoMap aOutputMap = new AutoMap(); + + // Buff output by yielding 6-8 times more. + for (int i=0;i= 0) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(16, 32))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(32, 64))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(8, 16))); + } + } + if (aTier >= 1) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mAlgaeBiosmass, MathUtils.randInt(16, 32))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(4, 8))); + } + } + if (aTier >= 2) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(8, 16))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(4, 8))); + } + } + if (aTier >= 3) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGreenAlgaeBiosmass, MathUtils.randInt(16, 32))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(2, 8))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(8, 16))); + } + } + if (aTier >= 4) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(32, 64))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(4, 8))); + } + } + if (aTier >= 5) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(1, 2))); + } + } + // Tier 6 is Highest for outputs + if (aTier >= 6) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(16, 32))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16))); + if (MathUtils.randInt(0, 10) > 9) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16))); + } + } + + // Iterate a special loop at higher tiers to provide more Red/Gold Algae. + for (int i2=0;i2<(9-aTier);i2++) { + if (aTier >= (6+i2)) { + int aMulti = i2 + 1; + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownAlgaeBiosmass, MathUtils.randInt(4, 8*aMulti))); + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(4, 8*aMulti))); + if (MathUtils.randInt(0, 10) > 8) { + aOutputMap.put(ItemUtils.getSimpleStack(AgriculturalChem.mRedAlgaeBiosmass, MathUtils.randInt(8, 16*aMulti))); + } + } + } + } + + + + // Map the AutoMap contents to an Itemstack Array. + ItemStack[] aOutputs = new ItemStack[aOutputMap.size()]; + for (int i=0;i mNobleGases; + private static AutoMap mFluorideGases; + private static AutoMap mSpargeGases; + + private static void configureSparging() { + if (mSpargeGases == null) { + mSpargeGases = new AutoMap(); + mSpargeGases.add(Materials.Helium.getGas(1).getFluid()); + mSpargeGases.add(Materials.Fluorine.getGas(1).getFluid()); + } + if (mNobleGases == null) { + mNobleGases = new AutoMap(); + mNobleGases.add(mSpargeGases.get(0)); + mNobleGases.add(ELEMENT.getInstance().XENON.getFluid()); + mNobleGases.add(ELEMENT.getInstance().NEON.getFluid()); + mNobleGases.add(ELEMENT.getInstance().ARGON.getFluid()); + mNobleGases.add(ELEMENT.getInstance().KRYPTON.getFluid()); + mNobleGases.add(ELEMENT.getInstance().RADON.getFluid()); + } + if (mFluorideGases == null) { + mFluorideGases = new AutoMap(); + mFluorideGases.add(mSpargeGases.get(1)); + mFluorideGases.add(FLUORIDES.LITHIUM_FLUORIDE.getFluid()); + mFluorideGases.add(FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid()); + mFluorideGases.add(FLUORIDES.TECHNETIUM_HEXAFLUORIDE.getFluid()); + mFluorideGases.add(FLUORIDES.SELENIUM_HEXAFLUORIDE.getFluid()); + mFluorideGases.add(FLUORIDES.THORIUM_TETRAFLUORIDE.getFluid()); + } + } + + public static void generate() { + // Fli2BeF4 + Thorium TetraFluoride = Uranium233 + //72k Ticks/hr + //1l/4t = 1000l/hr + //1l/40t = 1000l/10hr (Probably better) LiFBeF2ThF4UF4 + //1l/20t= 1000l/2.5hr LiFBeF2ZrF4UF4 + //1l/10t= 1000l/2.5hr LiFBeF2ZrF4U235 + + configureSparging(); + FluidStack Li2BeF4 = NUCLIDE.Li2BeF4.getFluidStack(200); + + //LiFBeF2ThF4UF4 - T3 + GT_Recipe LFTR1 = new GTPP_Recipe( + false, + new ItemStack[] {}, + new ItemStack[] {}, + null, new int[] {10000, 10000, 5000, 2500}, + new FluidStack[] { + NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(100), + Li2BeF4 + }, + new FluidStack[] { + NUCLIDE.LiFBeF2UF4FP.getFluidStack(100), + NUCLIDE.LiFBeF2ThF4.getFluidStack(200), + FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(20), + FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(10) + }, + 400 * 20,//time + 0,//cost + 8192*4//fuel value + ); + + //LiFBeF2ZrF4UF4 - T2 + GT_Recipe LFTR2 = new GTPP_Recipe( + false, + new ItemStack[] {}, + new ItemStack[] {}, + null, new int[] {10000, 10000, 2500, 1250}, + new FluidStack[] { + NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(100), + Li2BeF4 + }, + new FluidStack[] { + NUCLIDE.LiFBeF2UF4FP.getFluidStack(50), + NUCLIDE.LiFBeF2ThF4.getFluidStack(100), + FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(10), + FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(5) + }, + 400 * 20,//time + 0,//cost + 8192//fuel value + ); + + //LiFBeF2ZrF4U235 - T1 + GT_Recipe LFTR3 = new GTPP_Recipe( + false, + new ItemStack[] {}, + new ItemStack[] {}, + null, new int[] {10000, 10000, 1000, 500}, + new FluidStack[] { + NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(100), + Li2BeF4 + }, + new FluidStack[] { + NUCLIDE.LiFBeF2UF4FP.getFluidStack(25), + NUCLIDE.LiFThF4.getFluidStack(50), + FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(4), + FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(2) + }, + 100 *20,//time + 0,//cost + 8192//fuel value + ); + + // Sparging NEI Recipes + GasSpargingRecipeMap.addRecipe( + new FluidStack(mSpargeGases.get(0), 50), + NUCLIDE.LiFBeF2UF4FP.getFluidStack(50), + NUCLIDE.Sparged_LiFBeF2UF4FP.getFluidStack(50), + new FluidStack[] { + new FluidStack(mNobleGases.get(1), 10), + new FluidStack(mNobleGases.get(2), 10), + new FluidStack(mNobleGases.get(3), 10), + new FluidStack(mNobleGases.get(4), 10), + new FluidStack(mNobleGases.get(5), 10) + }, + new int[] { + 1000, 1000, 1000, 1000, 1000 + }); + + GasSpargingRecipeMap.addRecipe( + new FluidStack(mSpargeGases.get(1), 50), + NUCLIDE.LiFThF4.getFluidStack(50), + NUCLIDE.Sparged_LiFThF4.getFluidStack(50), + new FluidStack[] { + new FluidStack(mFluorideGases.get(1), 5), + new FluidStack(mFluorideGases.get(2), 5), + new FluidStack(mFluorideGases.get(3), 5), + new FluidStack(mFluorideGases.get(4), 5), + new FluidStack(mFluorideGases.get(5), 5) + }, + new int[] { + 500, 500, 500, 500, 500 + }); + + GasSpargingRecipeMap.addRecipe( + new FluidStack(mSpargeGases.get(1), 50), + NUCLIDE.LiFBeF2ThF4.getFluidStack(50), + NUCLIDE.Sparged_LiFBeF2ThF4.getFluidStack(50), + new FluidStack[] { + new FluidStack(mFluorideGases.get(1), 10), + new FluidStack(mFluorideGases.get(2), 10), + new FluidStack(mFluorideGases.get(3), 10), + new FluidStack(mFluorideGases.get(4), 10), + new FluidStack(mFluorideGases.get(5), 10) + }, + new int[] { + 1000, 1000, 1000, 1000, 1000 + }); + + GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR1); + GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR2); + GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR3); + + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java new file mode 100644 index 0000000000..330d507115 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java @@ -0,0 +1,695 @@ +package gtPlusPlus.xmod.gregtech.loaders.recipe; + +import static gtPlusPlus.core.lib.CORE.GTNH; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.chemistry.GenericChem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.material.nuclear.NUCLIDE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeLoader_Nuclear { + + + + public static void generate() { + createRecipes(); + RecipeLoader_LFTR.generate(); + RecipeLoader_NuclearFuelProcessing.generate(); + } + + private static void createRecipes() { + autoclave(); + blastFurnace(); + centrifugeRecipes(); + chemicalBathRecipes(); + chemicalReactorRecipes(); + dehydratorRecipes(); + electroMagneticSeperator(); + fluidExtractorRecipes(); + fluidHeater(); + macerator(); + mixerRecipes(); + sifter(); + } + + private static void autoclave() { + + GT_Values.RA.addAutoclaveRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 9), + FluidUtils.getFluidStack("chlorine", 9 * 4 * 144), + ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 9), + 0, + 120 * 20, + 30); + + } + + private static void blastFurnace() { + + GT_Values.RA.addBlastRecipe( + FLUORIDES.LITHIUM_FLUORIDE.getDust(2), + FLUORIDES.BERYLLIUM_FLUORIDE.getDust(1), + GT_Values.NF, + GT_Values.NF, + NUCLIDE.Li2BeF4.getDust(3), + null, + 60 * 20, 2000, + 3000); + + GT_Values.RA.addBlastRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1), + null, + GT_Values.NF, + GT_Values.NF, + ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 1), + null, + 60 * 20, + 340, + 300); + + } + + + private static void centrifugeRecipes() { + + //Process Used Fuel Rods for Krypton + + //Uranium + GT_Values.RA.addCentrifugeRecipe( + CI.getNumberedCircuit(20), + ItemUtils.getItemStackFromFQRN("IC2:reactorUraniumSimpledepleted", 8), + GT_Values.NF, + ELEMENT.getInstance().KRYPTON.getFluidStack(60), + ItemList.IC2_Fuel_Rod_Empty.get(8), + ELEMENT.getInstance().URANIUM238.getDust(2), + ELEMENT.getInstance().URANIUM232.getSmallDust(1), + ELEMENT.getInstance().URANIUM233.getSmallDust(1), + ELEMENT.getInstance().URANIUM235.getSmallDust(1), + ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), + new int[] { 0, 0, 1000, 1000, 1000, 500 }, 500 * 20, 4000); + //Mox + GT_Values.RA.addCentrifugeRecipe( + CI.getNumberedCircuit(20), + ItemUtils.getItemStackFromFQRN("IC2:reactorMOXSimpledepleted", 8), + GT_Values.NF, + ELEMENT.getInstance().KRYPTON.getFluidStack(90), + ItemList.IC2_Fuel_Rod_Empty.get(8), + ELEMENT.getInstance().PLUTONIUM244.getDust(2), + ELEMENT.getInstance().PLUTONIUM241.getTinyDust(1), + ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), + ELEMENT.getInstance().PLUTONIUM238.getTinyDust(1), + ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), + new int[] { 0, 0, 500, 500, 500, 500 }, 750 * 20, 4000); + + //Thorium + GT_Values.RA.addCentrifugeRecipe( + CI.getNumberedCircuit(20), + ItemList.Depleted_Thorium_1.get(8), + GT_Values.NF, + ELEMENT.getInstance().KRYPTON.getFluidStack(30), + ItemList.IC2_Fuel_Rod_Empty.get(8), + ELEMENT.getInstance().THORIUM.getDust(2), + ELEMENT.getInstance().THORIUM232.getDust(1), + ELEMENT.getInstance().LUTETIUM.getSmallDust(1), + ELEMENT.getInstance().POLONIUM.getSmallDust(1), + ELEMENT.getInstance().THALLIUM.getTinyDust(1), + new int[] { 0, 0, 5000, 5000, 5000, 2500 }, 250 * 20, 4000); + + } + + + private static void chemicalBathRecipes() { + + int[] chances = {9000, 6000, 3000}; + GT_Values.RA.addChemicalBathRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 12), + FluidUtils.getFluidStack("chlorine", 2400), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 4), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 5), + chances, + 30 * 20, + 480); + + chances = new int[]{9000, 3000, 1000}; + GT_Values.RA.addChemicalBathRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRutile", 5), + FluidUtils.getFluidStack("chlorine", 4000), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustTitanium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1), + chances, + 30 * 20, + 1024); + + GT_Values.RA.addChemicalBathRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 10), + FluidUtils.getFluidStack("hydrofluoricacid", 10 * 144), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 10), + null, + null, + new int[] {}, + 90 * 20, + 500); + + } + + + private static void chemicalReactorRecipes() { + + ItemStack aGtHydrofluoricAcid = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellHydrofluoricAcid_GT5U", 2); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 5), // Input + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 5), // Input + null, // Fluid Input + null, // Fluid Output + ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 10), + 600 * 20); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 5), // Input + null, // Input Stack 2 + FluidUtils.getFluidStack("hydrofluoricacid", 5 * 144), + FluidUtils.getFluidStack("water", 5 * 144), // Fluid Output + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 5), + 600 * 20); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 1), null, + FluidUtils.getFluidStack("sulfuricacid", 144 * 8), + FluidUtils.getFluidStack("sulfuriclithium", 144 * 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium7", 1), + 20 * 20); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 16), + FluidUtils.getFluidStack("water", 1000), + FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4), + CI.emptyCells(1), + 300 * 20); + + // LFTR Fuel Related Compounds + if (GTNH) { + // Hydroxide + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ELEMENT.getInstance().OXYGEN.getCell(1), + ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), + MISC_MATERIALS.HYDROXIDE.getFluidStack(2000), + CI.emptyCells(2), + GT_Values.NI, + 8 * 20, + 30); + // Beryllium Hydroxide + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ELEMENT.getInstance().BERYLLIUM.getDust(7), + MISC_MATERIALS.HYDROXIDE.getFluidStack(1000), + FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), + GT_Values.NI, + 8 * 20, + 30); + // Ammonium Bifluoride + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 1), + MISC_MATERIALS.AMMONIUM.getFluidStack(1000), + FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000), + CI.emptyCells(1), + 20 * 20, + 30); + if (aGtHydrofluoricAcid != null) { + // Ammonium Bifluoride + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + aGtHydrofluoricAcid, + MISC_MATERIALS.AMMONIUM.getFluidStack(1000), + FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000), + CI.emptyCells(2), + 40 * 20, + 30); + } + // Ammonium + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ELEMENT.getInstance().HYDROGEN.getCell(1), + MISC_MATERIALS.AMMONIA.getFluidStack(1000), + MISC_MATERIALS.AMMONIUM.getFluidStack(2000), + CI.emptyCells(1), + GT_Values.NI, + 20 * 20, + 30); + } + + if (!GTNH) { + // Hydroxide + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ELEMENT.getInstance().OXYGEN.getCell(1), + ELEMENT.getInstance().HYDROGEN.getFluidStack(1000), + MISC_MATERIALS.HYDROXIDE.getFluidStack(2000), + CI.emptyCells(2), + GT_Values.NI, + 8 * 20, + 30); + // Beryllium Hydroxide + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ELEMENT.getInstance().BERYLLIUM.getDust(7), + MISC_MATERIALS.HYDROXIDE.getFluidStack(1000), + FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), + GT_Values.NI, + 8 * 20, + 30); + // Ammonium Bifluoride + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 1), + MISC_MATERIALS.AMMONIUM.getFluidStack(1000), + FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(3000), + CI.emptyCells(1), + 20 * 20, + 30); + + if (aGtHydrofluoricAcid != null) { + // Ammonium Bifluoride + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + aGtHydrofluoricAcid, + MISC_MATERIALS.AMMONIUM.getFluidStack(1000), + FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000), + CI.emptyCells(2), + 40 * 20, + 30); + } + + // Ammonium + GT_Values.RA.addChemicalRecipe( + ItemUtils.getGregtechCircuit(3), + ELEMENT.getInstance().HYDROGEN.getCell(1), + MISC_MATERIALS.AMMONIA.getFluidStack(1000), + MISC_MATERIALS.AMMONIUM.getFluidStack(2000), + CI.emptyCells(1), + GT_Values.NI, + 20 * 20, + 30); + // Ammonia + GT_Values.RA.addChemicalRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustMagnetite", 0), + FluidUtils.getFluidStack("nitrogen", 1000), + FluidUtils.getFluidStack("ammonia", 1000), + CI.emptyCells(3), + 14 * 20); + } + + + //Technetium + GT_Values.RA.addChemicalRecipe( + CI.getNumberedAdvancedCircuit(22), + ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium99", 1), + FluidUtils.getFluidStack("sulfuricacid", 1000), + FluidUtils.getFluidStack("sulfuricacid", 144 * 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium", 1), + 100 * 20); + + // Sodium Hydroxide + GT_Values.RA.addChemicalRecipe( + CI.getNumberedBioCircuit(15), + ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1), + FluidUtils.getFluidStack("hydrofluoricacid", 500), + FluidUtils.getWater(1000), + FLUORIDES.SODIUM_FLUORIDE.getDust(1), + 60 * 20); + + if (FluidUtils.doesFluidExist("hydrofluoricacid_gt5u")) { + GT_Values.RA.addChemicalRecipe( + CI.getNumberedBioCircuit(15), + ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1), + FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 1000), + FluidUtils.getWater(1000), + FLUORIDES.SODIUM_FLUORIDE.getDust(1), + 60 * 20); + } + + } + + private static void dehydratorRecipes() { + + // Makes 7-Lithium + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(14), + ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1) + }, + FluidUtils.getFluidStack("sulfuriclithium", 440), + null, + new ItemStack[] { + CI.emptyCells(1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3), + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 4) + }, + new int[] {10000, 10000, 10000, 10000, 10000}, + 30 * 20, + 30); + + // Makes Lithium Carbonate + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.emptyCells(12), + ItemUtils.getItemStackOfAmountFromOreDict("dustLepidolite", 20) + }, // Item input (Array, up to 2) + FluidUtils.getFluidStack("sulfuricacid", 10000), + FluidUtils.getFluidStack("sulfuriclithium", 10000), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4), + ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 10), + ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 3), // LithiumCarbonate + }, // Output Array of Items - Upto 9, + new int[] { 10000, 10000, 10000, 10000, 10000 }, + 75 * 20, // Time in ticks + 1000); // EU + + // Calcium Hydroxide + if ((ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) || LoadedMods.IHL) { + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(20), + ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) + }, + FluidUtils.getFluidStack("water", 10000), + null, // Fluid output (slot 2) + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 20) + }, // Output + new int[] { 10000 }, + 120 * 20, // Time in ticks + 120); // EU + } + else { + Logger.INFO("[dustCalciumHydroxide] FAILED TO LOAD RECIPE"); + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) { + Logger.INFO("Could not find dustQuicklime, cannot make dustCalciumHydroxide."); + } + else if (!LoadedMods.IHL) { + Logger.INFO("IHL not loaded."); + } + } + + // 2 LiOH + CaCO3 + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(20), + ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 5) + }, // Item + null, // Fluid input (slot 1) + null, // Fluid output (slot 2) + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 3) + }, // Output + new int[] { 10000, 10000 }, + 120 * 20, // Time in ticks + 1000); // EU + + // LiOH Liquid to Dust + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(22) + }, + FluidUtils.getFluidStack("lithiumhydroxide", 144), + null, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 1) + }, + new int[] { 10000 }, + 1 * 20, // Time in ticks + 64); // EU + + // Zirconium Chloride -> TetraFluoride + FluidStack aHydrogenChloride = new FluidStack(GenericChem.HydrochloricAcid, 9000); + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(11), + ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9), + }, // Item + FluidUtils.getFluidStack("hydrofluoricacid", 9 * 144), + aHydrogenChloride, + new ItemStack[] { + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9) + }, + new int[] { 10000 }, + 120 * 20, // Time in ticks + 500); // EU + + // Zirconium Chloride -> TetraFluoride + FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 1); + if (aGregtechHydro != null || Utils.getGregtechVersionAsInt() >= 50929) { + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(10), + ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9) + }, + FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 18 * 144), + aHydrogenChloride, + new ItemStack[] { + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9) + }, + new int[] { 10000 }, + 240 * 20, // Time in ticks + 500); // EU + } + + // Be(OH)2 + 2 (NH4)HF2 → (NH4)2BeF4 + 2 H2O + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(6), + FLUORIDES.AMMONIUM_BIFLUORIDE.getCell(4) + }, + FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), // Fluid input (slot 1) + FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE.getFluidStack(6000), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 4) + }, + new int[] { 10000}, + 32 * 20, // Time in ticks + 64); // EU + + // (NH4)2BeF4 → 2 NH3 + 2 HF + BeF2 + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(17), + CI.emptyCells(5) + }, + FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE.getFluidStack(5000), + null, + new ItemStack[] { + MISC_MATERIALS.AMMONIA.getCell(2), + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2), + FLUORIDES.BERYLLIUM_FLUORIDE.getCell(1) + }, + new int[] {10000, 10000, 10000}, + 5 * 60 * 20, + 120); + + } + + private static void electroMagneticSeperator() { + + // Zirconium + GT_Values.RA.addElectromagneticSeparatorRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedBauxite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustBauxite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallRutile", 1), + ItemUtils.getItemStackOfAmountFromOreDict("nuggetZirconium", 1), + new int[] { 10000, 2500, 4000 }, + 20 * 20, + 24); + + // Zircon + GT_Values.RA.addElectromagneticSeparatorRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMagnetite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustMagnetite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1), + new int[] { 10000, 1250, 2500 }, + 20 * 20, + 24); + GT_Values.RA.addElectromagneticSeparatorRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCassiterite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustCassiterite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1), + new int[] { 10000, 1250, 2500 }, + 20 * 20, + 24); + + } + + private static void fluidExtractorRecipes() { + + //FLiBe fuel + CORE.RA.addFluidExtractionRecipe( + NUCLIDE.Li2BeF4.getDust(1), + NUCLIDE.Li2BeF4.getFluidStack(144), + 100, + 500); + //LFTR Fuel 1 + CORE.RA.addFluidExtractionRecipe( + NUCLIDE.LiFBeF2ZrF4U235.getDust(1), + NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(144), + 250, + 1000); + CORE.RA.addFluidExtractionRecipe( + NUCLIDE.LiFBeF2ZrF4UF4.getDust(1), + NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(144), + 150, + 1500); + CORE.RA.addFluidExtractionRecipe( + NUCLIDE.LiFBeF2ThF4UF4.getDust(1), + NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(144), + 150, + 2000); + + //ZIRCONIUM_TETRAFLUORIDE + CORE.RA.addFluidExtractionRecipe( + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(1), + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(144), + 200, + 512+256); + + } + + private static void macerator() { + + GT_ModHandler.addPulverisationRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1)); + + } + + private static void mixerRecipes() { + + GT_Values.RA.addMixerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("dustUranium233", 4), + ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1), + null, + null, + FluidUtils.getFluidStack("hydrofluoricacid", 5000), + FLUORIDES.URANIUM_TETRAFLUORIDE.getFluidStack(5000), + null, + 3000, + 500); + + } + + + private static void sifter() { + + // Zirconium + GT_Values.RA.addSifterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIlmenite", 1), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyWroughtIron", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1) }, + new int[] { 5000, 2500, 1000, 1000, 300, 300 }, + 20 * 30, + 500); + GT_Values.RA.addSifterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedTin", 1), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZinc", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) }, + new int[] { 10000, 5000, 1500, 1000, 500, 500 }, + 20 * 30, + 500); + GT_Values.RA.addSifterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCassiterite", 1), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustCassiterite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyTin", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) }, + new int[] { 10000, 5000, 1500, 1000, 500, 500 }, + 20 * 30, + 500); + + // Radium + GT_Values.RA.addSifterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUranium", 1), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) }, + new int[] { 10000, 5000, 1000, 500, 500, 500 }, + 20 * 30, + 500); + GT_Values.RA.addSifterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUraninite", 1), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustUraninite", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyUranium", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) }, + new int[] { 10000, 5000, 500, 250, 250, 250 }, + 20 * 30, + 500); + GT_Values.RA.addSifterRecipe( + ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPitchblende", 1), + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustPitchblende", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1), + ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) }, + new int[] { 10000, 5000, 500, 250, 250, 250 }, + 20 * 30, + 500); + } + + private static void fluidHeater() { + + CORE.RA.addFluidHeaterRecipe( + FLUORIDES.SODIUM_FLUORIDE.getDust(1), + null, + FLUORIDES.SODIUM_FLUORIDE.getFluidStack(144), + 20 * 30, + 500); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java new file mode 100644 index 0000000000..c2c8c01f45 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java @@ -0,0 +1,372 @@ +package gtPlusPlus.xmod.gregtech.loaders.recipe; + +import gregtech.api.enums.GT_Values; +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.chemistry.NuclearChem; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.material.nuclear.NUCLIDE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipeLoader_NuclearFuelProcessing { + + public static void generate() { + + // Create Fuels + + final FluidStack aLithiumFluoride = FLUORIDES.LITHIUM_FLUORIDE.getFluidStack(100); + final FluidStack aBerylliumFluoride = FLUORIDES.BERYLLIUM_FLUORIDE.getFluidStack(100); + final FluidStack aThoriumFluoride = FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(100); + final FluidStack aZirconiumFluoride = FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(100); + final FluidStack aUraniumTetraFluoride = FLUORIDES.URANIUM_TETRAFLUORIDE.getFluidStack(100); + final FluidStack aUranium235 = ELEMENT.getInstance().URANIUM235.getFluidStack(1000); + final FluidStack aLiFBeF2ZrF4U235 = NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(100); + final FluidStack aLiFBeF2ZrF4UF4 = NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(100); + final FluidStack aLiFBeF2ThF4UF4 = NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(100); + + // 7LiF - BeF2 - ZrF4 - U235 - 590C + CORE.RA.addFissionFuel( + FluidUtils.getFluidStack(aLithiumFluoride, 550), + FluidUtils.getFluidStack(aBerylliumFluoride, 150), + FluidUtils.getFluidStack(aZirconiumFluoride, 60), + FluidUtils.getFluidStack(aUranium235, 240), + null, null, null, null, null, // Extra 5 inputs + FluidUtils.getFluidStack(aLiFBeF2ZrF4U235, 1000), + null, + 90 * 60 * 20, // Duration + MaterialUtils.getVoltageForTier(4) + ); + + // 7LiF - BeF2 - ZrF4 - UF4 - 650C + CORE.RA.addFissionFuel( + FluidUtils.getFluidStack(aLithiumFluoride, 600), + FluidUtils.getFluidStack(aBerylliumFluoride, 250), + FluidUtils.getFluidStack(aZirconiumFluoride, 80), + FluidUtils.getFluidStack(aUraniumTetraFluoride, 70), + null, null, null, null, null, // Extra 5 inputs + FluidUtils.getFluidStack(aLiFBeF2ZrF4UF4, 1000), + null, + 120 * 60 * 20, + MaterialUtils.getVoltageForTier(5) + ); + + // 7liF - BeF2 - ThF4 - UF4 - 566C + CORE.RA.addFissionFuel( + FluidUtils.getFluidStack(aLithiumFluoride, 580), + FluidUtils.getFluidStack(aBerylliumFluoride, 270), + FluidUtils.getFluidStack(aThoriumFluoride, 80), + FluidUtils.getFluidStack(aUraniumTetraFluoride, 70), + null, null, null, null, null, // Extra 5 inputs + FluidUtils.getFluidStack(aLiFBeF2ThF4UF4, 1000), + null, + 150 * 60 * 20, // Duration + MaterialUtils.getVoltageForTier(5) + ); + + + // Reprocess Fuels + + + // Reactor Blanket step 1 - Fluorination + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(17), + ELEMENT.getInstance().FLUORINE.getCell(6), + NUCLIDE.LiFThF4.getFluidStack(10000), + new ItemStack[] { + CI.emptyCells(5), + FLUORIDES.LITHIUM_FLUORIDE.getCell(1), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233) + }, + new int[] {10000, 10000, 500, 500, 500, 250, 250, 250}, + NUCLIDE.UF6F2.getFluidStack(1500), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(5)); + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(18), + ELEMENT.getInstance().FLUORINE.getCell(6), + NUCLIDE.LiFBeF2ThF4.getFluidStack(10000), + new ItemStack[] { + CI.emptyCells(4), + FLUORIDES.LITHIUM_FLUORIDE.getCell(1), + FLUORIDES.BERYLLIUM_FLUORIDE.getCell(1), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233) + }, + new int[] {10000, 10000, 10000, 1000, 1000, 1000, 500, 500, 500}, + NUCLIDE.UF6F2.getFluidStack(3000), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(5)); + + // Reactor Blanket step 1 - Fluorination + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(7), + ELEMENT.getInstance().FLUORINE.getCell(6), + NUCLIDE.Sparged_LiFThF4.getFluidStack(10000), + new ItemStack[] { + CI.emptyCells(4), + FLUORIDES.LITHIUM_FLUORIDE.getCell(2), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233) + }, + new int[] {10000, 10000, 1000, 1000, 1000, 1000, 1000, 1000}, + NUCLIDE.UF6F2.getFluidStack(3000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5)); + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(8), + ELEMENT.getInstance().FLUORINE.getCell(6), + NUCLIDE.Sparged_LiFBeF2ThF4.getFluidStack(10000), + new ItemStack[] { + CI.emptyCells(2), + FLUORIDES.LITHIUM_FLUORIDE.getCell(2), + FLUORIDES.BERYLLIUM_FLUORIDE.getCell(2), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233), + ItemUtils.getSimpleStack(ModItems.dustProtactinium233) + }, + new int[] {10000, 10000, 10000, 2000, 2000, 2000, 2000, 2000, 2000}, + NUCLIDE.UF6F2.getFluidStack(6000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5)); + + + // Reactor Blanket step 2 - Sorption + Cold Trap + CORE.RA.addColdTrapRecipe( + 8, + FLUORIDES.SODIUM_FLUORIDE.getCell(4), + NUCLIDE.UF6F2.getFluidStack(3000), + new ItemStack[] { + ELEMENT.getInstance().FLUORINE.getCell(2), + FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2), + ELEMENT.getInstance().URANIUM233.getDust(1), + ELEMENT.getInstance().URANIUM233.getDust(1), + ELEMENT.getInstance().URANIUM233.getDust(1) + }, + new int[] {10000, 10000, 3000, 2000, 1000}, + FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(3)); + + + + + // Reactor Core step 0 - Process Burnt Salt + // Tier 1 Fuel - Gives back FLIBE and breeds U233 + /* CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(1), + CI.emptyCells(2), + new FluidStack(NuclearChem.Burnt_LiFBeF2ZrF4U235, 4000), + new ItemStack[] { + FLUORIDES.LITHIUM_FLUORIDE.getCell(1), + ELEMENT.getInstance().URANIUM233.getCell(1) + }, + new int[] {10000, 10000}, + NUCLIDE.LiFBeF2.getFluidStack(2000), + 20 * 60 * 60, + MaterialUtils.getVoltageForTier(3));*/ + + + + // LiBeF2UF4FP + F2 = LiFBeF2 & UF6F2FP + // Reactor Core step 1 - Process Burnt Salt + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(1), + ELEMENT.getInstance().FLUORINE.getCell(1), + NUCLIDE.LiFBeF2UF4FP.getFluidStack(1000), + new ItemStack[] { + NUCLIDE.UF6F2FP.getCell(1) + }, + new int[] {10000}, + FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 1000), + 20 * 60 * 120, + MaterialUtils.getVoltageForTier(3)); + + // LiBeF2UF4FP + F2 = LiFBeF2 & UF6F2FP + // Reactor Core step 1 - Process Burnt Salt + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(1), + ELEMENT.getInstance().FLUORINE.getCell(3), + NUCLIDE.Sparged_LiFBeF2UF4FP.getFluidStack(1000), + new ItemStack[] { + CI.emptyCells(1), + NUCLIDE.UF6F2FP.getCell(2) + }, + new int[] {10000}, + FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 2000), + 20 * 60 * 60, + MaterialUtils.getVoltageForTier(3)); + + + + // Reactor Core step 2A - Sorption + Cold Trap + CORE.RA.addColdTrapRecipe( + 8, + FLUORIDES.SODIUM_FLUORIDE.getCell(3), + NUCLIDE.UF6F2FP.getFluidStack(2000), + new ItemStack[] { + ELEMENT.getInstance().FLUORINE.getCell(1), + FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2), + ELEMENT.getInstance().PHOSPHORUS.getDust(1), + ELEMENT.getInstance().PHOSPHORUS.getDust(1), + ELEMENT.getInstance().PHOSPHORUS.getDust(1), + ELEMENT.getInstance().PHOSPHORUS.getDust(1), + ELEMENT.getInstance().PHOSPHORUS.getDust(1), + ELEMENT.getInstance().PHOSPHORUS.getDust(1), + ELEMENT.getInstance().PHOSPHORUS.getDust(1) + }, + new int[] {10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000, 5000}, + FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(4)); + + + // Reactor Core step 2B - Distillation + GT_Values.RA.addDistillationTowerRecipe( + FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 1000), + new FluidStack[] { + NUCLIDE.LiFBeF2.getFluidStack(250) + }, + null, + 120 * 60 * 20, + MaterialUtils.getVoltageForTier(3)); + + + // UF6 -> UF4 reduction + // UF6 + LiFBeF2 + H2 -> LiFBeF2UF4 + HF + CORE.RA.addBlastRecipe( + new ItemStack[] { + FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(1), + NUCLIDE.LiFBeF2.getCell(1) + }, + new FluidStack[] { + ELEMENT.getInstance().HYDROGEN.getFluidStack(2000) + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2), + CI.emptyCells(1) + }, + new FluidStack[] { + NUCLIDE.LiFBeF2UF4.getFluidStack(3000) + }, + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(4), + 6500); + + + + + // LiFBeF2ZrF4U235 - We can't add both ZrF4 and U235 here, so best we leave this disabled. + /*CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(8), + NUCLIDE.LiFBeF2UF4.getCell(9), + ELEMENT.getInstance().URANIUM235.getFluidStack(1000), + new ItemStack[] { + CI.emptyCells(9) + }, + new int[] {10000}, + NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(10000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(4));*/ + + // LiFBeF2ZrF4UF4 + /*CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(9), + NUCLIDE.LiFBeF2UF4.getCell(9), + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(1000), + new ItemStack[] { + CI.emptyCells(9) + }, + new int[] {10000}, + NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(9), + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getCell(1), + NUCLIDE.LiFBeF2UF4.getFluidStack(9000), + new ItemStack[] { + CI.emptyCells(1) + }, + new int[] {10000}, + NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5));*/ + + CORE.RA.addFissionFuel( + FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(1000), + NUCLIDE.LiFBeF2UF4.getFluidStack(9000), + null, + null, + null, null, null, null, null, + NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000), + null, + 20 * 60 * 120, // Duration + MaterialUtils.getVoltageForTier(5) + ); + + // LiFBeF2ThF4UF4 + /*CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(10), + NUCLIDE.LiFBeF2UF4.getCell(9), + FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(1000), + new ItemStack[] { + CI.emptyCells(9) + }, + new int[] {10000}, + NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addReactorProcessingUnitRecipe( + CI.getNumberedAdvancedCircuit(10), + FLUORIDES.THORIUM_TETRAFLUORIDE.getCell(1), + NUCLIDE.LiFBeF2UF4.getFluidStack(9000), + new ItemStack[] { + CI.emptyCells(1) + }, + new int[] {10000}, + NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(5));*/ + + + CORE.RA.addFissionFuel( + FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(1000), + NUCLIDE.LiFBeF2UF4.getFluidStack(9000), + null, + null, + null, null, null, null, null, + NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000), + null, + 20 * 60 * 150, // Duration + MaterialUtils.getVoltageForTier(5) + ); + + + + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java new file mode 100644 index 0000000000..be4d6a8f7d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -0,0 +1,1851 @@ +package gtPlusPlus.xmod.gregtech.recipes; + +import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gtPlusPlus.core.lib.CORE.GTNH; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.internal.IGT_RecipeAdder; +import gregtech.api.util.*; +import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; +import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.data.ArrayUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG; +import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_MatterFabricator; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + +public class GregtechRecipeAdder implements IGregtech_RecipeAdder { + + @Override + public boolean addCokeOvenRecipe(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, + final FluidStack aFluidOutput, final ItemStack aOutput, int aDuration, final int aEUt) { + try { + try { + // RECIPEHANDLER_CokeOven.debug1(); + if (((aInput1 == null) /* && (aFluidInput == null) */) + || ((aOutput == null) || (aFluidOutput == null))) { + // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" + // aInput2:"+aInput2.toString()+" + // aFluidInput:"+aFluidInput.toString()+" + // aFluidOutput:"+aFluidOutput.toString()+" + // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" + // aEU/t:"+aEUt); + Logger.WARNING("Something was null, returning false"); + return false; + } + + } + catch (final NullPointerException e) { + e.getStackTrace(); + } + try { + // RECIPEHANDLER_CokeOven.debug2(aInput1, aInput2, aFluidInput, + // aFluidOutput, aOutput, aDuration, aEUt); + if ((aOutput != null) + && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) { + // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" + // aInput2:"+aInput2.toString()+" + // aFluidInput:"+aFluidInput.toString()+" + // aFluidOutput:"+aFluidOutput.toString()+" + // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" + // aEU/t:"+aEUt); + Logger.WARNING("Something was null, returning false"); + return false; + } + + } + catch (final NullPointerException e) { + e.getStackTrace(); + } + try { + // RECIPEHANDLER_CokeOven.debug3(aInput1, aInput2, aFluidInput, + // aFluidOutput, aOutput, aDuration, aEUt); + if ((aFluidOutput == null) || ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", + aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" + // aInput2:"+aInput2.toString()+" + // aFluidInput:"+aFluidInput.toString()+" + // aFluidOutput:"+aFluidOutput.toString()+" + // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" + // aEU/t:"+aEUt); + Logger.WARNING("Something was null, returning false"); + return false; + } + + } + catch (final NullPointerException e) { + e.getStackTrace(); + } + try { + + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + true, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput }, + null, + new int[] {}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size(); + + + // RECIPEHANDLER_CokeOven.debug4(aInput1, aInput2, aFluidInput, + // aFluidOutput, aOutput, aDuration, aEUt); + /*if (aFluidInput == null && aInput2 != null) { + GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration, + aEUt, 0); + } + else if (aFluidInput == null && aInput2 == null) { + GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration, + aEUt, 0); + } + else { + GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput }, null, null, new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); + }*/ + // RECIPEHANDLER_CokeOven.debug5(aInput1, aInput2, aFluidInput, + // aFluidOutput, aOutput, aDuration, aEUt); + + return aSize > aSize2; + + } + catch (final NullPointerException e) { + Logger.WARNING("Something was null, returning false"); + return false; + } + } + catch (final Throwable e) { + // Logger.WARNING("aInput1:"+aInput1.toString()+" + // aInput2:"+aInput2.toString()+" + // aFluidInput:"+aFluidInput.toString()+" + // aFluidOutput:"+aFluidOutput.toString()+" + // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" + // aEU/t:"+aEUt); + Logger.WARNING("Failed."); + e.getStackTrace(); + return false; + } + } + + + @Override + public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) { + return addCokeOvenRecipe(CI.getNumberedCircuit(aCircuit), aInput2, aFluidInputs, aFluidOutputs, aOutputs, aDuration, aEUt); + } + + @Override + public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) { + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + true, + new ItemStack[] { aInput1, aInput2 }, + aOutputs, + null, + new int[] {}, + aFluidInputs, + aFluidOutputs, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size(); + GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe); + return GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size() > aSize; + } + + @Override + public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput, + final int aDuration, final int aEUt) { + try { + try { + // RECIPEHANDLER_MatterFabricator.debug1(); + if (aFluidOutput == null) { + // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" + // aFluidOutput:"+aFluidOutput.toString()+" + // aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Something was null, returning false"); + return false; + } + + } + catch (final NullPointerException e) { + e.getStackTrace(); + } + try { + + // RECIPEHANDLER_MatterFabricator.debug4(aFluidInput, + // aFluidOutput, aDuration, aEUt); + if (aFluidInput == null) { + // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, + // null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, + // 0); + + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); + } + else { + // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, + // new FluidStack[]{aFluidInput}, new + // FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); + } + RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt); + + return true; + + } + catch (final NullPointerException e) { + return false; + } + } + catch (final Throwable e) { + // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" + // aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" + // aEU/t:"+aEUt); + Logger.WARNING("Failed."); + e.getStackTrace(); + return false; + } + } + + @Override + public boolean addMatterFabricatorRecipe(final ItemStack aInputStack, final FluidStack aFluidInput, + final FluidStack aFluidOutput, final int aDuration, final int aEUt) { + try { + try { + if ((aFluidOutput == null) || (aInputStack == null)) { + return false; + } + } + catch (final NullPointerException e) { + } + try { + if (aFluidInput == null) { + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { aInputStack }, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); + } + else { + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { aInputStack }, + new ItemStack[] {}, + null, + new int[] {}, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aDuration, + aEUt, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe); + } + RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt); + return true; + } + catch (final NullPointerException e) { + return false; + } + } + catch (final Throwable e) { + return false; + } + } + + @Override + public boolean addFuel(final ItemStack aInput1, final ItemStack aOutput1, final int aEU, final int aType) { + if (aInput1 == null) { + Logger.WARNING("Fuel Input is Invalid."); + return false; + } + // new GregtechRecipe(aInput1, aOutput1, + // GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType); + return true; + } + + /* + * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack + * aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack + * aOutputFluid, int aDuration, int aEUt) { if ((aItemA == null) || (aItemB + * == null) || (aOutputItems == null)) { return false; } for (ItemStack + * tStack : aOutputItems) { if (tStack != null) { if ((aDuration = + * GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) { + * return false; } + * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, + * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null, + * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, + * aFluid, aOutputFluid, aOutputItems, aDuration, aEUt); return true; } } + * return false; } + * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack + * aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt) { if ((aItemA + * == null) || (aItemB == null) || (aOutputItems == null)) { return false; } + * if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA, + * aDuration)) <= 0) { return false; } + * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, + * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null, + * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, + * null, null, aOutputItems, aDuration, aEUt); return true; } + * @Override public boolean addDehydratorRecipe(FluidStack aFluid, + * FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int + * aEUt){ if ((aFluid == null) || (aOutputFluid == null || aOutputItems == + * null)) { return false; } if ((aDuration = + * GregTech_API.sRecipeFile.get("dehydrator", aFluid.getUnlocalizedName(), + * aDuration)) <= 0) { return false; } + * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, + * null, aOutputItems, null, new FluidStack[]{aFluid}, new + * FluidStack[]{aOutputFluid}, aDuration, aEUt, 0); + * RECIPEHANDLER_Dehydrator.debug5(null, null, aFluid, aOutputFluid, + * aOutputItems, aDuration, aEUt); return true; } + */ + + /*@Override + public boolean addDehydratorRecipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput, + int aDuration, final int aEUt) { + Logger.WARNING("Trying to add a Dehydrator recipe."); + try { + if ((aInput == null) || (aFluid == null) || (aOutput == null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aInput, aDuration)) <= 0) { + return false; + } + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { aInput }, + aOutput, + null, + new int[] {}, + new FluidStack[] { aFluid }, + new FluidStack[] {}, + aDuration, + aEUt, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(aRecipe); + // RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null, + // aOutput, aDuration, aEUt); + return true; + } + catch (final NullPointerException e) { + Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + return false; + } + }*/ + + @Override + public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput, + final FluidStack aFluidOutput, final ItemStack[] aOutputItems, final int[] aChances, int aDuration, + final int aEUt) throws IndexOutOfBoundsException { + Logger.WARNING("Trying to add a Dehydrator recipe."); + try { + if (aInput != null && aInput.length > 0) { + if (aInput[0] != null) { + Logger.WARNING("Recipe requires input: " + aInput[0].getDisplayName() + " x" + aInput[0].stackSize); + } + if (aInput.length > 1) { + if (aInput[1] != null) { + Logger.WARNING("Recipe requires input: " + aInput[1].getDisplayName() + " x" + aInput[1].stackSize); + } + } + } + if (aFluidInput != null) { + Logger.WARNING("Recipe requires input: " + aFluidInput.getFluid().getName() + " " + aFluidInput.amount + + "mbs"); + } + if (((aInput == null || aInput.length == 0) && (aFluidInput == null)) || ((aOutputItems == null || aOutputItems.length == 0) && (aFluidOutput == null))) { + return false; + } + if (aOutputItems != null) { + Logger.WARNING("Recipe will output: " + ItemUtils.getArrayStackNames(aOutputItems)); + } + if (aFluidOutput != null) { + Logger.WARNING("Recipe will output: " + aFluidOutput.getFluid().getName()); + } + + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + true, + aInput, + aOutputItems, + null, + aChances, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mRecipeList.size(); + + /*if (aInput.length == 1) { + Logger.WARNING("Dehydrator recipe only has a single input item."); + GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, + aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, + 0); + + } + else { + Logger.WARNING("Dehydrator recipe has two input items."); + GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, + aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, + 0); + }*/ + + return aSize > aSize2; + } + catch (final NullPointerException e) { + Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + return false; + } + } + + @Override + public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration, + final int aEUt) { + return addBlastSmelterRecipe(aInput, null, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700); + } + + @Override + public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, + final int aChance, int aDuration, final int aEUt) { + return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700); + } + + @Override + public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, + final int aChance[], int aDuration, final int aEUt) { + return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, 3700); + } + + @Override + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, + int aDuration, int aEUt, int aSpecialValue) { + return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, aSpecialValue); + } + + @Override + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, + int aDuration, int aEUt, int aSpecialValue) { + if ((aInput == null) || (aOutput == null)) { + Logger.WARNING("Fail - Input or Output was null."); + return false; + } + + if (aOutput.isFluidEqual(Materials.PhasedGold.getMolten(1))) { + aOutput = Materials.VibrantAlloy.getMolten(aOutput.amount); + } + if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) { + aOutput = Materials.PulsatingIron.getMolten(aOutput.amount); + } + if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) { + Logger.WARNING("Recipe did not register."); + return false; + } + + for (int das = 0; das < aInput.length; das++) { + if (aInput[das] != null) { + Logger.WARNING("tMaterial[" + das + "]: " + aInput[das].getDisplayName() + ", Amount: " + + aInput[das].stackSize); + } + } + + ArrayUtils.removeNulls(aInput); + if (aInput.length <= 1) { + return false; + } + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + true, + aInput, + aOutputStack, + null, + aChance, + new FluidStack[] { aInputFluid }, + new FluidStack[] { aOutput }, + Math.max(1, aDuration), + Math.max(1, aEUt), + aSpecialValue); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size(); + + + /*GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, aOutputStack, null, + aChance, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt, + aSpecialValue);*/ + + return aSize > aSize2; + } + + @Override + public boolean addLFTRRecipe(final ItemStack aInput1, final FluidStack aInput2, final ItemStack aOutput1, + final FluidStack aOutput2, final int aDuration, final int aEUt) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean addLFTRRecipe(final ItemStack aInput1, final ItemStack aInput2, final ItemStack aOutput1, + final int aDuration, final int aEUt) { + return false; + } + + @Override + public boolean addLFTRRecipe(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aOutput1, + final int aDuration, final int aEUt) { + if ((aInput1 == null) || (aInput2 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) { + return false; + } + GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(null, + new FluidStack[] { aInput1, aInput2 }, new FluidStack[] { aOutput1 }, aDuration, aEUt, 16000); + return true; + } + + @Override + public boolean addFissionFuel(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3, + final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7, + final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2, + final int aDuration, final int aEUt) { + return addFissionFuel(false, aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9, aOutput1, aOutput2, aDuration, aEUt); + } + + @Override + public boolean addFissionFuel(final boolean aOptimise, final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3, + final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7, + final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2, + final int aDuration, final int aEUt) { + + if ((aInput1 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) { + return false; + } + final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; + final FluidStack outputs[] = { aOutput1, aOutput2 }; + + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + aOptimise, + new ItemStack[] {}, + new ItemStack[] {}, + null, + new int[] {}, + inputs, + outputs, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size(); + + if (aSize > aSize2) { + Logger.INFO("Added Nuclear Fuel Recipe."); + return true; + } + return false; + } + + @Override + public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs, + FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { + return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs, aFluidOutput, aChances, aDuration, aEUt, aSpecialValue); + } + + @Override + public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput, + FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { + if (aOutput == null || aOutput.length < 1 || !ItemUtils.checkForInvalidItems(aOutput)) { + Logger.INFO("Bad output for Cyclotron Recipe."); + return false; + } + + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + true, + aInputs, + aOutput, + null, + aChances, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + Math.max(1, aDuration), + Math.max(1, aEUt), + aSpecialValue); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.mRecipeList.size(); + + if (aSize > aSize2) { + Logger.INFO("Added Cyclotron Recipe."); + return true; + } + + Logger.INFO("Failed to add Cyclotron Recipe. Output: "+ItemUtils.getArrayStackNames(aOutput)); + return false; + } + + @Override + public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, + ItemStack aOutput4, int aDuration, int aEUt) { + if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { + return false; + } + if ((aOutput1 != null) + && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", aOutput1, aDuration)) <= 0)) { + return false; + } + if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", + aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + return false; + } + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + true, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, + null, + new int[] {}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size(); + + /*GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.addRecipe(true, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null, + new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);*/ + + return aSize > aSize2; + } + + // Machine Component Assembler + @Override + public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, + int aDuration, int aEUt) { + if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) { + return false; + } + if (aOutput1 == null) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) { + return false; + } + if (GTNH) { + return false; + } + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + aInputs, + new ItemStack[] { aOutput1 }, + null, + new int[] {}, + new FluidStack[] {aFluidInput}, + new FluidStack[] {}, + aDuration, + aEUt, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes.addRecipe(aRecipe); + return true; + } + + + public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){ + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { + return false; + } + + if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { + Logger.INFO("[Recipe] Error generating Large Centrifuge recipe."); + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); + return false; + } + + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUtick, + aSpecial); + GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.addRecipe(aRecipe); + + //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + return true; + } + + public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){ + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { + return false; + } + if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { + Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe."); + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); + return false; + } + + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUtick, + aSpecial); + GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.addRecipe(aRecipe); + //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + return true; + } + + + public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial) { + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { + return false; + } + + if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { + Logger.INFO("[Recipe] Error generating Adv. Vac Freezer recipe."); + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); + return false; + } + + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUtick, + aSpecial); + GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.addRecipe(aRecipe); + /*if (GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) { + return true; + }*/ + return false; + + } + + public boolean addMultiblockMixerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){ + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { + return false; + } + if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { + Logger.INFO("[Recipe] Error generating Large Mixer recipe."); + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); + return false; + } + + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUtick, + aSpecial); + GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.addRecipe(aRecipe); + return true; + } + + public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) { + if (aInput1 instanceof String || aInput2 instanceof String) { + int mCompleted = 0; + if (aInput1 instanceof String && aInput2 instanceof String) { + List x = OreDictionary.getOres((String) aInput1, false); + List x1 = OreDictionary.getOres((String) aInput2, false); + if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) { + for (ItemStack r : x) { + r.stackSize = aAmount1; + for (ItemStack r1 : x1) { + r1.stackSize = aAmount2; + if (GT_Values.RA.addAssemblerRecipe(r, r1, aOutput, a1, a2)) { + mCompleted++; + } + } + } + } + } + else if (aInput1 instanceof String) { + List x = OreDictionary.getOres((String) aInput1, false); + if (x != null && x.size() > 0) { + for (ItemStack r : x) { + r.stackSize = aAmount1; + if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aOutput, a1, a2)) { + mCompleted++; + } + } + } + + } + else { + List x = OreDictionary.getOres((String) aInput2, false); + if (x != null && x.size() > 0) { + for (ItemStack r : x) { + r.stackSize = aAmount1; + if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aOutput, a1, a2)) { + mCompleted++; + } + } + } + } + return mCompleted > 0; + } + else { + return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aOutput, a1, a2); + } + } + + public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2) { + if (aInput1 instanceof String || aInput2 instanceof String) { + int mCompleted = 0; + if (aInput1 instanceof String && aInput2 instanceof String) { + List x = OreDictionary.getOres((String) aInput1, false); + List x1 = OreDictionary.getOres((String) aInput2, false); + if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) { + for (ItemStack r : x) { + r.stackSize = aAmount1; + for (ItemStack r1 : x1) { + r1.stackSize = aAmount2; + if (GT_Values.RA.addAssemblerRecipe(r, r1, aInputFluid, aOutput, a1, a2)) { + mCompleted++; + } + } + } + } + } + else if (aInput1 instanceof String) { + List x = OreDictionary.getOres((String) aInput1, false); + if (x != null && x.size() > 0) { + for (ItemStack r : x) { + r.stackSize = aAmount1; + if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2)) { + mCompleted++; + } + } + } + + } + else { + List x = OreDictionary.getOres((String) aInput2, false); + if (x != null && x.size() > 0) { + for (ItemStack r : x) { + r.stackSize = aAmount1; + if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aInputFluid, aOutput, a1, a2)) { + mCompleted++; + } + } + } + } + return mCompleted > 0; + } + else { + return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2); + } + } + + /* + * Reflection Based Recipe Additions with Fallbacks + */ + + private static final Method mSixSlotAssembly; + private static final Method mAssemblyLine; + private static final Method mScannerTT; + private static final Method[] mChemicalRecipe = new Method[3]; + private static final Method mLargeChemReactor; + private static final Method mPyroOven; + + static { + + //Get GT's RA class; + Class clazz = GT_Values.RA.getClass(); + + mChemicalRecipe[0] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class); + + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + //6 Slot Assembler + mSixSlotAssembly = ReflectionUtils.getMethod(clazz, "addAssemblerRecipe", ItemStack[].class, FluidStack.class, ItemStack.class, int.class, int.class); + //Assembly Line + mAssemblyLine = ReflectionUtils.getMethod(clazz, "addAssemblylineRecipe", ItemStack.class, int.class, ItemStack[].class, FluidStack[].class, ItemStack.class, int.class, int.class); + + + Method T = null; + if (LoadedMods.TecTech) { + Class TTRecipeAdder = ReflectionUtils.getClass("com.github.technus.tectech.recipe.TT_recipeAdder"); + if (TTRecipeAdder != null) { + Method ttTest = ReflectionUtils.getMethod(TTRecipeAdder, "addResearchableAssemblylineRecipe", + ItemStack.class, int.class, int.class, int.class, int.class, Object[].class, + FluidStack[].class, ItemStack.class, int.class, int.class); + if (ttTest != null) { + T = ttTest; + } + else { + Method[] aDump = TTRecipeAdder.getDeclaredMethods(); + for (Method m : aDump) { + if (m != null) { + Logger.INFO("Found "+m.getName()+" | "+m.getModifiers()+" | "+ArrayUtils.toString(m.getParameters(), "EMPTY")+""); + if (m.getName().toLowerCase().equals("addresearchableassemblylinerecipe")){ + Logger.INFO("Types: "+ArrayUtils.toString(m.getParameterTypes())); + } + } + } + } + } + } + else { + T = null; + } + mScannerTT = T; + + mChemicalRecipe[1] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class, int.class); + mChemicalRecipe[2] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class); + + mLargeChemReactor = ReflectionUtils.getMethod(clazz, "addMultiblockChemicalRecipe", ItemStack[].class, FluidStack[].class, FluidStack[].class, ItemStack[].class, int.class, int.class); + + mPyroOven = ReflectionUtils.getMethod(clazz, "addPyrolyseRecipe", ItemStack.class, FluidStack.class, int.class, ItemStack.class, FluidStack.class, int.class, int.class); + + + + } + else { + mSixSlotAssembly = null; + mAssemblyLine = null; + mLargeChemReactor = null; + mScannerTT = null; + mPyroOven = null; + } + + + } + + + + + + + public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt) { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + if (mSixSlotAssembly != null) { + try { + return (boolean) mSixSlotAssembly.invoke(GT_Values.RA, aInputs, aInputFluid, aOutput1, aDuration, aEUt); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + if (CORE.GTNH) { + return false; + } + } + } + } + return CORE.RA.addComponentMakerRecipe(aInputs, aInputFluid, aOutput1, aDuration, aEUt); + } + + @Override + public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { + if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { + return false; + } + for(ItemStack tItem : aInputs){ + if(tItem==null){ + GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe"); + } + } + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201); + GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); + GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt)); + return true; + } + + @Override + public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { + if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { + return false; + } + ItemStack[] tInputs = new ItemStack[aInputs.length]; + ItemStack[][] tAlts = new ItemStack[aInputs.length][]; + for(int i = 0; i < aInputs.length; i++){ + Object obj = aInputs[i]; + if (obj instanceof ItemStack) { + tInputs[i] = (ItemStack) obj; + tAlts[i] = null; + continue; + } else if (obj instanceof ItemStack[]) { + ItemStack[] aStacks = (ItemStack[]) obj; + if (aStacks.length > 0) { + tInputs[i] = aStacks[0]; + tAlts[i] = (ItemStack[]) Arrays.copyOf(aStacks, aStacks.length); + continue; + } + } else if (obj instanceof Object[]) { + Object[] objs = (Object[]) obj; + List tList; + if (objs.length >= 2 && !(tList = GT_OreDictUnificator.getOres(objs[0])).isEmpty()) { + try { + int tAmount = ((Number) objs[1]).intValue(); + List uList = new ArrayList<>(); + for (ItemStack tStack : tList) { + ItemStack uStack = GT_Utility.copyAmount(tAmount, tStack); + if (GT_Utility.isStackValid(uStack)) { + uList.add(uStack); + if (tInputs[i] == null) + tInputs[i] = uStack; + } + } + tAlts[i] = uList.toArray(new ItemStack[uList.size()]); + continue; + } catch (Exception t) {} + } + } + GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe"); + } + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201); + GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])},aFluidInputs,null,aDuration,aEUt,0,tAlts,true); + GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, tInputs, aFluidInputs, aOutput, aDuration, aEUt, tAlts)); + return true; + } + + private boolean tryAddTecTechScannerRecipe(ItemStack aResearchItem, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int assDuration, int assEUt) { + if (!LoadedMods.TecTech) { + return true; + } + else { + + int compSec = (GT_Utility.getTier(assEUt)+1) * 16; + int compMax = (GT_Utility.getTier(assEUt)+1) * 10000; + + if (mScannerTT != null) { + try { + boolean aResult = (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec, + (assEUt/2), 16, aInputs, aFluidInputs, aOutput, assDuration, assEUt); + Logger.INFO("Added TecTech Scanner Recipe for "+ItemUtils.getItemName(aResearchItem)+"? "+aResult); + return aResult; + + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus. [Severe]"); + e.printStackTrace(); + } + } + } + return false; + } + + + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu){ + return addChemicalRecipe(input1, input2, inputFluid, outputFluid, output, null, time, eu); + } + + @Override + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu) { + try { + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time); + } + else { + return (boolean) mChemicalRecipe[1].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time, eu); + } + } + catch (Throwable t) { + return false; + } + } + + @Override + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time) { + try { + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time); + } + else { + return (boolean) mChemicalRecipe[2].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, output2, time); + } + } + catch (Throwable t) { + return false; + } + } + + @Override + public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, int aCircuit, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time, int eu) { + if (aCircuit < 0 || aCircuit > 24) { + aCircuit = 22; + } + GT_Recipe aSpecialRecipe = new GTPP_Recipe( + false, + new ItemStack[] {input1, input2}, + new ItemStack[] {output, output2}, + CI.getNumberedCircuit(aCircuit), + new int[] {}, + new FluidStack[] {inputFluid}, + new FluidStack[] {outputFluid}, + time, + eu, + 0); + return GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList.add(aSpecialRecipe); + } + + @Override + public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu) { + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || mLargeChemReactor == null) { + return false; + } + try { + return (boolean) mLargeChemReactor.invoke(GT_Values.RA, itemStacks, fluidStacks, fluidStacks2, outputs, time, eu); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + + + + + + + + private boolean areItemsAndFluidsBothNull(final ItemStack[] items, final FluidStack[] fluids) { + boolean itemsNull = true; + if (items != null) { + for (final ItemStack itemStack : items) { + if (itemStack != null) { + itemsNull = false; + break; + } + } + } + boolean fluidsNull = true; + if (fluids != null) { + for (final FluidStack fluidStack : fluids) { + if (fluidStack != null) { + fluidsNull = false; + break; + } + } + } + return itemsNull && fluidsNull; + } + + @Override + public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { + if ((aInput1 == null) || (aOutput1 == null)) { + return false; + } + if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0)) { + return false; + } + GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0); + return true; + } + + @Override + public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) { + return addBrewingRecipe(CI.getNumberedCircuit(aCircuit), aInput, aOutput, aTime, aEu, aHidden); + } + + @Override + public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) { + if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { + return false; + } + if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { + return false; + } + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aTime, aEu, 0); + if ((aHidden) && (tRecipe != null)) { + tRecipe.mHidden = true; + } + return true; + } + + + /** + * Lets me add recipes for GT 5.08 & 5.09, since someone broke the method headers. + */ + @Override + public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput) { + Method m = StaticFields59.mAddFurnaceRecipe; + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + try { + return (boolean) m.invoke(null, aDust, aOutput); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + else { + try { + return (boolean) m.invoke(null, aDust, aOutput, true); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + } + + @Override + public boolean addFluidExtractionRecipe(ItemStack input, FluidStack output, int aTime, int aEu) { + return MaterialGenerator.addFluidExtractionRecipe(GT_Values.NI, input, output, aTime, aEu); + } + + @Override + public boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid, int aDuration, int aEU) { + return MaterialGenerator.addFluidExtractionRecipe(aEmpty, aRemains, aFluid, aDuration, aEU); + } + + @Override + public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn) { + return MaterialGenerator.addFluidCannerRecipe(aContainer, aFullContainer, rFluidIn, null); + } + + @Override + public boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, FluidStack rFluidOut) { + return MaterialGenerator.addFluidCannerRecipe(aContainer, aFullContainer, rFluidIn, rFluidOut); + } + + + @Override + public boolean addFluidCannerRecipe(ItemStack aFullContainer, ItemStack container, FluidStack rFluidIn, FluidStack rFluidOut, int aTime, int aEu) { + return MaterialGenerator.addFluidCannerRecipe(container, aFullContainer, rFluidIn, rFluidOut, aTime, aEu); + } + + /** + * Adds a Fusion reactor Recipe + * + * @param aInputStackA = first Input (not null, and respects StackSize) + * @param aInputStackB = second Input (not null, and respects StackSize) + * @param plasma = Output of the Fusion (can be null, and respects StackSize) + * @param aOutputChance = chance to output plasma (can be 0) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aEu = The EU generated per Tick (can even be negative!) + * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) + */ + @Override + public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma, + int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) { + if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) { + return false; + } + GTPP_Recipe aFusionCustom = new GTPP_Recipe( + true, + null, + null, + null, + new int[] {aOutputChance}, + new FluidStack[]{aInputStackA, aInputStackB}, + new FluidStack[]{plasma}, + aFusionDurationInTicks, + aEu, + aSpecial); + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom); + return true; + } + + + + + + + /** + * Adds a Fusion reactor Recipe + * + * @param aInputStackA = first Input (not null, and respects StackSize) + * @param aInputStackB = second Input (not null, and respects StackSize) + * @param plasma = Output of the Fusion (can be null, and respects StackSize) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aEu = The EU generated per Tick (can even be negative!) + * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) + */ + @Override + public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, + int aFusionDurationInTicks, int aEu, int aSpecial) { + return addFusionReactorRecipe(aInputStackA, aInputStackB, plasma, 10000, aFusionDurationInTicks, aEu, aSpecial); + } + + + /** + * Adds a Fusion reactor Recipe + * + * @param aInputStackA = first Input (not null, and respects StackSize) + * @param aInputStackB = second Input (not null, and respects StackSize) + * @param plasma = Output of the Fusion (can be null, and respects StackSize) + * @param aOutputChance = chance to output plasma (can be 0) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aEu = The EU generated per Tick (can even be negative!) + * @param aSpecial = EU needed for heating the Reactor up (must be >= 0) + */ + @Override + public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, + int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) { + if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) { + return false; + } + GTPP_Recipe aFusionCustom = new GTPP_Recipe( + true, + new ItemStack[]{aInputStackA, aInputStackB}, + null, + null, + new int[] {aOutputChance}, + null, + new FluidStack[]{plasma}, + aFusionDurationInTicks, + aEu, + aSpecial); + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom); + return true; + + } + + @Override + public boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue) { + return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue); + } + + @Override + public boolean addSemifluidFuel(FluidStack aFuelItem, int aFuelValue) { + return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue); + } + + + + + @Override + public boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, + ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { + if (aInput1 != null && aOutput1 != null) { + return addVacuumFurnaceRecipe(new ItemStack[] {aInput1, aInput2}, new FluidStack[] {aFluidInput}, new ItemStack[] {aOutput1, aOutput2}, new FluidStack[] {aFluidOutput}, aDuration, aEUt, aLevel); + } + else { + return false; + } + } + + + @Override + public boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel) { + if (aInputs != null && aOutputs != null) { + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + new int[] {}, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aLevel); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.addRecipe(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size(); + return aSize > aSize2; + } else { + return false; + } + } + + @Override + public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu) { + // Generate Special Laser Recipe + GT_Recipe u = new GTPP_Recipe( + false, + new ItemStack[] { + aInput1, + aInput2, + }, + new ItemStack[] { + aOutput + }, + GregtechItemList.Laser_Lens_WoodsGlass.get(1), + new int[] { + 10000 + }, + new FluidStack[] {}, + new FluidStack[] {}, + time, + (int) eu, + 0); + return GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.mRecipeList.add(u); + } + + @Override + public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu) { + return addUvLaserRecipe(aInput1, aInput2, aOutput, time, eu); + } + + + @Override + public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier) { + return addChemicalPlantRecipe(aInputs, aInputFluids, aOutputs, aFluidOutputs, new int[] {}, time, eu, aTier); + } + + @Override + public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier) { + + if (aInputs.length > 4 || aInputFluids.length > 4 || aOutputs.length > 4 || aFluidOutputs.length > 2) { + Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); + Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aInputFluids)); + Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs)); + Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs)); + CORE.crash(); + } + + + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aInputFluids, + aFluidOutputs, + time, + (int) eu, + aTier); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size(); + int aSize2 = aSize; + GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.add(aSpecialRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size(); + return aSize > aSize2; + } + + @Override + public boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aHeat) { + GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( + false, + aInputs, + aOutputs, + null, + new int[] {}, + aInputFluids, + aFluidOutputs, + time, + (int) eu, + aHeat); + + int aSize = GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList.size(); + int aSize2 = aSize; + GT_Recipe.GT_Recipe_Map.sBlastRecipes.add(aSpecialRecipe); + aSize = GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList.size(); + return aSize > aSize2; + + } + + @Override + public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt) { + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || mPyroOven == null) { + return false; + } + try { + return (boolean) mPyroOven.invoke(GT_Values.RA, aInput, aFluidInput, intCircuit, aOutput, aFluidOutput, aDuration, aEUt); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + @Override + public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { + if (aInput != null && aOutput != null) { + if ((aDuration = GregTech_API.sRecipeFile.get("distillery", aOutput.getFluid().getUnlocalizedName(), + aDuration)) <= 0) { + return false; + } else { + GT_Recipe tRecipe = GT_Recipe_Map.sDistilleryRecipes.addRecipe(true, new ItemStack[]{aCircuit}, + new ItemStack[] {aSolidOutput}, (Object) null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, + aDuration, aEUt, 0); + if (aHidden && tRecipe != null) { + tRecipe.mHidden = true; + } + return true; + } + } else { + return false; + } + } + + @Override + public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { + if (aInput != null && aOutput != null) { + if ((aDuration = GregTech_API.sRecipeFile.get("extractor", aInput, aDuration)) <= 0) { + return false; + } else { + GT_Recipe_Map.sExtractorRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, + (Object) null, (FluidStack[]) null, (FluidStack[]) null, aDuration, aEUt, 0); + return true; + } + } else { + return false; + } + } + + @Override + public boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3) { + //return GT_Values.RA.addPulveriserRecipe(arg0, arg1, arg2, arg3, arg4) + + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + aOutput2 = GT_OreDictUnificator.get(true, aOutput2); + aOutput3 = GT_OreDictUnificator.get(true, aOutput3); + if ((GT_Utility.isStackInvalid(aInput)) || (GT_Utility.isStackInvalid(aOutput1))) { + return false; + } + if (GT_Utility.getContainerItem(aInput, false) == null) { + + if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, true)) { + GT_Utility.addSimpleIC2MachineRecipe(aInput, GT_ModHandler.getMaceratorRecipeList(), null, + new Object[] { aOutput1 }); + } + GT_Values.RA.addPulveriserRecipe(aInput, new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + new int[] { 10000, 10000, 10000 }, 400, 2); + } + return true; + + } + + @Override + public boolean addMillingRecipe(Materials aMat, int aEU) { + return addMillingRecipe(MaterialUtils.generateMaterialFromGtENUM(aMat), aEU); + } + + @Override + public boolean addMillingRecipe(Material aMat, int aEU) { + + ItemStack aOreStack = aMat.getOre(16); + ItemStack aCrushedStack = aMat.getCrushed(16); + + ItemStack aMilledStackOres1 = aMat.getMilled(64); + ItemStack aMilledStackCrushed1 = aMat.getMilled(32); + ItemStack aMilledStackOres2 = aMat.getMilled(48); + ItemStack aMilledStackCrushed2 = aMat.getMilled(16); + + ItemStack aMillingBall_Alumina = GregtechItemList.Milling_Ball_Alumina.get(0); + ItemStack aMillingBall_Soapstone = GregtechItemList.Milling_Ball_Soapstone.get(0); + + // Inputs + ItemStack[] aInputsOre1 = new ItemStack[] { + CI.getNumberedCircuit(10), + aOreStack, + aMillingBall_Alumina + }; + + ItemStack[] aInputsOre2 = new ItemStack[] { + CI.getNumberedCircuit(11), + aOreStack, + aMillingBall_Soapstone + }; + + ItemStack[] aInputsCrushed1 = new ItemStack[] { + CI.getNumberedCircuit(10), + aCrushedStack, + aMillingBall_Alumina + }; + + ItemStack[] aInputsCrushed2 = new ItemStack[] { + CI.getNumberedCircuit(11), + aCrushedStack, + aMillingBall_Soapstone + }; + + // Outputs + ItemStack[] aOutputsOre1 = new ItemStack[] { + aMilledStackOres1 + }; + + ItemStack[] aOutputsOre2 = new ItemStack[] { + aMilledStackOres2 + }; + + ItemStack[] aOutputsCrushed1 = new ItemStack[] { + aMilledStackCrushed1 + }; + + ItemStack[] aOutputsCrushed2 = new ItemStack[] { + aMilledStackCrushed2 + }; + + ItemStack[][] aInputArray = new ItemStack[][] {aInputsOre1, aInputsOre2, aInputsCrushed1, aInputsCrushed2}; + ItemStack[][] aOutputArray = new ItemStack[][] {aOutputsOre1, aOutputsOre2, aOutputsCrushed1, aOutputsCrushed2}; + int[] aTime = new int[] {6000, 7500, 7500, 9000}; + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes.mRecipeList.size(); + int aSize2 = aSize; + + for (int i=0;i<4;i++) { + GTPP_Recipe aOreRecipe = new GTPP_Recipe( + false, + aInputArray[i], + aOutputArray[i], + null, + new int[] {}, + null, + null, + aTime[i], + aEU, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes.add(aOreRecipe); + } + + aSize = GTPP_Recipe.GTPP_Recipe_Map.sOreMillRecipes.mRecipeList.size(); + return aSize > aSize2; + } + + @Override + public boolean addFlotationRecipe(Materials aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU) { + return addFlotationRecipe(MaterialUtils.generateMaterialFromGtENUM(aMat), aXanthate, aInputFluids, aOutputFluids, aTime, aEU); + } + + @Override + public boolean addFlotationRecipe(Material aMat, ItemStack aXanthate, FluidStack[] aInputFluids, FluidStack[] aOutputFluids, int aTime, int aEU) { + + FlotationRecipeHandler.registerOreType(aMat); + int aSpecialValue = FlotationRecipeHandler.getHashForMaterial(aMat); + + int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes.mRecipeList.size(); + int aSize2 = aSize; + + GT_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { + ItemUtils.getSimpleStack(aXanthate, 32), + aMat.getMilled(64), + aMat.getMilled(64), + aMat.getMilled(64), + aMat.getMilled(64), + }, + new ItemStack[] { + + }, + null, + new int[] {}, + aInputFluids, + aOutputFluids, + aTime, + aEU, + aSpecialValue); + + GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes.add(aRecipe); + aSize = GTPP_Recipe.GTPP_Recipe_Map.sFlotationCellRecipes.mRecipeList.size(); + + return aSize > aSize2; + } + + @Override + public boolean addpackagerRecipe(ItemStack aRecipeType, ItemStack aSmallDust, ItemStack aTinyDust, ItemStack aOutputStack1) { + AutoMap aResults = new AutoMap(); + //Dust 1 + aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, new Object[]{aSmallDust}), aRecipeType, aOutputStack1, 100, 4)); + //Dust 2 + aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, new Object[]{aTinyDust}), aRecipeType, aOutputStack1, 100, 4)); + for (boolean b : aResults) { + if (!b) { + return false; + } + } + return true; + } + + @Override + public boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage) { + int aSize1 = GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels.mRecipeList.size(); + GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels.addRecipe( + true, + new ItemStack[]{aFuelPellet}, + new ItemStack[]{}, + null, + null, + null, + 0, + aVoltage, + aFuelDays); + int aSize2 = GTPP_Recipe.GTPP_Recipe_Map.sRTGFuels.mRecipeList.size(); + + if (aSize2 > aSize1) { + long eu = GregtechMetaTileEntity_RTG.getTotalEUGenerated(GregtechMetaTileEntity_RTG.convertDaysToTicks(aFuelDays), aVoltage); + GT_MetaTileEntity_Hatch_Energy_RTG.registerPelletForHatch(aFuelPellet, eu); + return true; + } + else { + return false; + } + } + + + @Override + public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU) { + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedAdvancedCircuit(aCircuit), aInput}, + aOutputs, + null, + aChances, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aTime, + aEU, + 0); + + int aSize = GTPP_Recipe_Map.sColdTrapRecipes.mRecipeList.size(); + GTPP_Recipe_Map.sColdTrapRecipes.add(aRecipe); + return GTPP_Recipe_Map.sColdTrapRecipes.mRecipeList.size() > aSize; + } + + + @Override + public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU) { + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] {aInput1, aInput2}, + aOutputs, + null, + aChances, + new FluidStack[] {aFluidInput}, + new FluidStack[] {aFluidOutput}, + aTime, + aEU, + 0); + + int aSize = GTPP_Recipe_Map.sReactorProcessingUnitRecipes.mRecipeList.size(); + GTPP_Recipe_Map.sReactorProcessingUnitRecipes.add(aRecipe); + return GTPP_Recipe_Map.sReactorProcessingUnitRecipes.mRecipeList.size() > aSize; + } + + + @Override + public boolean addFluidHeaterRecipe(ItemStack aInput, FluidStack aFluidInput, FluidStack aOutput, int aDuration, int aEUt) { + if ((aInput == null && aFluidInput == null) || (aOutput == null)) { + return false; + } + GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe(true, new ItemStack[]{aInput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0); + return true; + } + + + @Override + public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { + if ((aInput == null) || (aOutput == null)) { + return false; + } + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] {aInput}, + new ItemStack[] {aOutput}, + null, + new int[] {10000}, + new FluidStack[] {}, + new FluidStack[] {}, + aDuration, + aEUt, + 0); + + int aSize = GT_Recipe_Map.sVacuumRecipes.mRecipeList.size(); + GT_Recipe_Map.sVacuumRecipes.add(aRecipe); + return GT_Recipe_Map.sVacuumRecipes.mRecipeList.size() > aSize; + } + + + + + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java new file mode 100644 index 0000000000..99e3d5c4d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java @@ -0,0 +1,57 @@ +package gtPlusPlus.xmod.gregtech.recipes; + +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.ORES; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipesToRemove { + + public static void go() { + + Logger.INFO("Processing Gregtech recipe maps, removing recipes to suit GT++."); + + //Remove Rare Earth Centrifuging + //1 Rare Earth Dust - 25% chance for small piles of: neodymium, yttrium, lanthanum, cerium, cadmium, and caesium + //Replaced by advanced sifting recipe. + GT_Recipe aRareEarthCentrifuging = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(null, false, 20, new FluidStack[] {}, new ItemStack[] {ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1)}); + if (aRareEarthCentrifuging != null && aRareEarthCentrifuging.mEnabled) { + aRareEarthCentrifuging.mEnabled = false; + aRareEarthCentrifuging.mHidden = true; + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); + //GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); + GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging); + Logger.INFO("Removed vanilla GT Rare Earth processing."); + //Set the Chemical Symbol for Rare Earth now that we are giving it custom outputs + //Best not to set this unless the original recipe is removed. + /*Materials.RareEarth.mChemicalFormula = "(" + +ELEMENT.getInstance().YTTRIUM.vChemicalSymbol + +ELEMENT.getInstance().NEODYMIUM.vChemicalSymbol + +ELEMENT.getInstance().LANTHANUM.vChemicalSymbol + +ELEMENT.getInstance().CERIUM.vChemicalSymbol + +ELEMENT.getInstance().CADMIUM.vChemicalSymbol + +ELEMENT.getInstance().CAESIUM.vChemicalSymbol + +ELEMENT.getInstance().YTTERBIUM.vChemicalSymbol + +ELEMENT.getInstance().SAMARIUM.vChemicalSymbol + +ELEMENT.getInstance().GADOLINIUM.vChemicalSymbol+ + ")";*/ + + Material[] aLowTierOutputMaterials = new Material[] { + ORES.GREENOCKITE + }; + + + + + + + + } + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java new file mode 100644 index 0000000000..15115647ae --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java @@ -0,0 +1,20 @@ +package gtPlusPlus.xmod.gregtech.recipes.machines; + +import net.minecraft.item.ItemStack; + +import net.minecraftforge.fluids.FluidStack; + +public class RECIPEHANDLER_AssemblyLine { + + public static boolean addAssemblylineRecipe( + ItemStack paramItemStack1, + int paramInt1, + ItemStack[] paramArrayOfItemStack, + FluidStack[] paramArrayOfFluidStack, + ItemStack paramItemStack2, + int paramInt2, int paramInt3){ + + return false; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java new file mode 100644 index 0000000000..cd06f86ef9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java @@ -0,0 +1,47 @@ +package gtPlusPlus.xmod.gregtech.recipes.machines; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import net.minecraftforge.fluids.FluidStack; + +public class RECIPEHANDLER_CokeOven { + + public static void debug1(){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("Walking Through CokeOven Recipe Creation."); + Logger.WARNING("My name is Ralph and I will be your humble host."); + } + public static void debug2(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + } + public static void debug3(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + } + public static void debug4(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + + } + public static void debug5(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.INFO("Successfully added a Coke Oven recipe for: "+aOutput.getDisplayName()+" & "+aFluidOutput.getFluid().getName()+", Using "+aInput1.getDisplayName()+" & "+aInput2.getDisplayName()+" & liquid "+aFluidInput.getFluid().getName()+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t."); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java new file mode 100644 index 0000000000..402d47d3e5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java @@ -0,0 +1,82 @@ +package gtPlusPlus.xmod.gregtech.recipes.machines; + +import net.minecraft.item.ItemStack; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraftforge.fluids.FluidStack; + +public class RECIPEHANDLER_Dehydrator { + + public static void debug1(){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("Walking Through Chemical Dehydrator Recipe Creation."); + Logger.WARNING("My name is Willus and I will be your humble host."); + } + public static void debug2(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + } + public static void debug3(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + } + public static void debug4(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + + } + public static void debug5(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack[] aOutput, final int aDuration, final int aEUt){ + + String inputAname; + String inputBname; + String inputFluidname; + String outputFluidName; + + if (aInput1 != null){ + inputAname = aInput1.getDisplayName(); + } + else { + inputAname = "null"; + } + + if (aInput2 != null){ + inputBname = aInput2.getDisplayName(); + } + else { + inputBname = "null"; + } + + if (aFluidInput != null){ + inputFluidname = aFluidInput.getFluid().getName(); + } + else { + inputFluidname = "null"; + } + + if (aFluidOutput != null){ + outputFluidName = aFluidOutput.getFluid().getName(); + } + else { + outputFluidName = "null"; + } + + Logger.INFO("Successfully added a Chemical Dehydrator recipe for: "+ItemUtils.getArrayStackNames(aOutput)+" & "+outputFluidName+", Using "+inputAname+" & "+inputBname+" & liquid "+inputFluidname+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t."); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java new file mode 100644 index 0000000000..df51f1ad77 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.gregtech.recipes.machines; + +import gtPlusPlus.api.objects.Logger; +import net.minecraftforge.fluids.FluidStack; + +public class RECIPEHANDLER_MatterFabricator { + + public static void debug1(){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("Walking Through Matter Fabrication Recipe Creation."); + Logger.WARNING("My name is Ralph and I will be your humble host."); + } + public static void debug2(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); + Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + } + public static void debug3(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); + Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + } + public static void debug4(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ + Logger.WARNING("=================================================================================="); + Logger.WARNING("Taking a step forward."); + Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); + Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Logger.WARNING("Passed."); + Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + + } + public static void debug5(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){ + String a = "nothing"; + String b = ""; + + if (aFluidInput != null){ + a = aFluidInput.getFluid().getName(); + } + if (aFluidOutput != null){ + b = aFluidOutput.getFluid().getName(); + } + + Logger.INFO("Successfully added a Matter Fabrication recipe for: "+b+", Using "+" liquid "+a+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t."); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + Logger.WARNING("=================================================================================="); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java new file mode 100644 index 0000000000..0817202e85 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -0,0 +1,85 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.*; + +public class Gregtech4Content { + + // ID Range 828, 829, 833 - 850 + + public static void run() { + if (LoadedMods.Gregtech) { + workbenches(); + thermalBoiler(); + multiCrafter(); + tesseracts(); + shelves(); + } + } + + private static void workbenches() { + // Gregtech 4 Workbenches + //Utils.LOG_INFO("Gregtech 4 Content | Registering Workbenches."); + // Free //GregtechItemList.GT4_Workbench_Bronze.set(new + // GT_MetaTileEntity_BronzeCraftingTable(828, "workbench.bronze", + // "Bronze Workbench", 0).getStackForm(1L)); + } + + private static void tesseracts() { + // Gregtech 4 Tesseracts + Logger.INFO("Gregtech 4 Content | Registering Tesseracts."); + GregtechItemList.GT4_Tesseract_Generator + .set(new GT_MetaTileEntity_TesseractGenerator(833, "tesseract.generator", "Tesseract Generator", 4) + .getStackForm(1L)); + GregtechItemList.GT4_Tesseract_Terminal + .set(new GT_MetaTileEntity_TesseractTerminal(834, "tesseract.terminal", "Tesseract Terminal", 4) + .getStackForm(1L)); + } + + private static void shelves() { + // Gregtech 4 Shelves + Logger.INFO("Gregtech 4 Content | Registering Shelves."); + GregtechItemList.GT4_Shelf + .set(new GT4Entity_Shelf(870, "gtplusplus.shelf.wooden", "Wooden Shelf", "Usually used for books") + .getStackForm(1L)); + GregtechItemList.GT4_Shelf_Iron.set( + new GT4Entity_Shelf_Iron(871, "gtplusplus.shelf.iron", "Metal Shelf", "A heavy duty shelf") + .getStackForm(1L)); + GregtechItemList.GT4_Shelf_FileCabinet.set(new GT4Entity_Shelf_FileCabinet(872, "gtplusplus.shelf.filecabinet", + "File Cabinet", "Could look nice in your office").getStackForm(1L)); + GregtechItemList.GT4_Shelf_Desk.set( + new GT4Entity_Shelf_Desk(873, "gtplusplus.shelf.desk", "Metal encased Desk", "A place to study") + .getStackForm(1L)); + GregtechItemList.GT4_Shelf_Compartment.set(new GT4Entity_Shelf_Compartment(874, "gtplusplus.shelf.compartment", + "Compartment", "Stores Books & Things").getStackForm(1L)); + + //Custom Storage + GregtechItemList.GT4_Shelf_Large.set( + new GT4Entity_Shelf_Large(966, "gtplusplus.shelf.large", "Large Shelf", "A spacious shelf", 2048) + .getStackForm(1L)); + } + + private static void thermalBoiler() { + // Gregtech 4 Thermal Boiler + if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){ + Logger.INFO("Gregtech 4 Content | Registering Thermal Boiler."); + GregtechItemList.GT4_Thermal_Boiler + .set(new GT4Entity_ThermalBoiler(875, "gtplusplus.thermal.boiler", "Thermal Boiler").getStackForm(1L)); + } + + } + + private static void multiCrafter() { + // Gregtech 4 Multiblock Auto-Crafter + Logger.INFO("Gregtech 4 Content | Registering Multiblock Crafter."); + GregtechItemList.GT4_Multi_Crafter.set( + new GT4Entity_AutoCrafter(876, "gtplusplus.autocrafter.multi", "Large Scale Auto-Assembler v1.01").getStackForm(1L)); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java new file mode 100644 index 0000000000..d50a8f3924 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java @@ -0,0 +1,104 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.recipe.RECIPES_MachineComponents; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_HV; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_LV; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_MV; + +public class GregtechAdvancedBoilers { + + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Advanced Boilers."); + run1(); + } + } + + private static void run1() { + // Boilers + GregtechItemList.Boiler_Advanced_LV + .set(new GT_MetaTileEntity_Boiler_LV(753, "Advanced Boiler [LV]", 1).getStackForm(1L)); + GregtechItemList.Boiler_Advanced_MV + .set(new GT_MetaTileEntity_Boiler_MV(754, "Advanced Boiler [MV]", 2).getStackForm(1L)); + GregtechItemList.Boiler_Advanced_HV + .set(new GT_MetaTileEntity_Boiler_HV(755, "Advanced Boiler [HV]", 3).getStackForm(1L)); + + ItemStack chassisT1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", + 0, 1); + ItemStack chassisT2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", + 1, 1); + ItemStack chassisT3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", + 2, 1); + + // Make the Coil in each following recipe a hammer and a Screwdriver. + + // Chassis Recipes + GT_ModHandler.addCraftingRecipe(chassisT1, + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "WCW", "GMG", "WPW", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('P'), + OrePrefixes.pipeLarge.get(Materials.Bronze), Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), + OrePrefixes.plate.get(Materials.Lead), Character.valueOf('G'), + OrePrefixes.pipeSmall.get(Materials.Copper) }); + + GT_ModHandler.addCraftingRecipe(chassisT2, + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "WCW", "GMG", "WPW", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('P'), + OrePrefixes.pipeLarge.get(Materials.Steel), Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), + OrePrefixes.plate.get(Materials.Steel), Character.valueOf('G'), + OrePrefixes.pipeSmall.get(Materials.Bronze) }); + + GT_ModHandler.addCraftingRecipe(chassisT3, + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "WCW", "GMG", "WPW", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('P'), + OrePrefixes.pipeLarge.get(Materials.StainlessSteel), Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), + OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('G'), + OrePrefixes.pipeSmall.get(Materials.Steel) }); + + ItemStack pipeTier1 = ItemUtils.getItemStackOfAmountFromOreDict(RECIPES_MachineComponents.pipeTier7, 1); + ItemStack pipeTier2 = ItemUtils.getItemStackOfAmountFromOreDict(RECIPES_MachineComponents.pipeTier8, 1); + ItemStack pipeTier3 = ItemUtils.getItemStackOfAmountFromOreDict(RECIPES_MachineComponents.pipeTier9, 1); + + // Boiler Recipes + GT_ModHandler.addCraftingRecipe(GregtechItemList.Boiler_Advanced_LV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "dCw", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('P'), + pipeTier1, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), + Character.valueOf('W'), chassisT1, Character.valueOf('G'), + OrePrefixes.gear.get(Materials.Steel) }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Boiler_Advanced_MV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "dCw", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('P'), + pipeTier2, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), + Character.valueOf('W'), chassisT2, Character.valueOf('G'), ALLOY.SILICON_CARBIDE.getGear(1) }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Boiler_Advanced_HV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "dCw", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('P'), + pipeTier3, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), + Character.valueOf('W'), chassisT3, Character.valueOf('G'), ALLOY.SILICON_CARBIDE.getGear(1) }); + + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java new file mode 100644 index 0000000000..3cefaa1bf7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java @@ -0,0 +1,132 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import java.util.Collection; + +import gregtech.api.enums.ItemList; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GTPP_Recipe; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class GregtechAdvancedMixer { + + private static int mID = 851; + + public static void run(){ + //generateMixerRecipeMap(); + run1(); + } + + private static GT_Recipe_Map map = GT_Recipe.GT_Recipe_Map.sMixerRecipes; + + private static boolean generateMixerRecipeMap(){ + if (GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size() == 0){ + GT_Recipe_Map oldMap = GT_Recipe.GT_Recipe_Map.sMixerRecipes; + GT_Recipe_Map map = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes; + final Collection x = oldMap.mRecipeList; + //Logger.INFO("Generating " + map.mUnlocalizedName + " Recipes."); + for (final GT_Recipe g : x) { + GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.add(g); + } + + if (GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size() > 0){ + return true; + } + else { + Logger.INFO("Failed to generate "+ map.mUnlocalizedName +" recipes."); + return false; + } + + } + return true; + } + + private static void run1(){ + GregtechItemList.Machine_Advanced_LV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.01", + "Basic Combiner", 1, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + ItemList.Machine_LV_Mixer, Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + GregtechItemList.Machine_Advanced_MV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.02", + "Advanced Combiner I", 2, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + ItemList.Machine_MV_Mixer, Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + GregtechItemList.Machine_Advanced_HV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.03", + "Advanced Combiner II", 3, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + ItemList.Machine_HV_Mixer, Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + GregtechItemList.Machine_Advanced_EV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.04", + "Super Combiner I", 4, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + ItemList.Machine_EV_Mixer, Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + GregtechItemList.Machine_Advanced_IV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.05", + "Super Combiner II", 5, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + ItemList.Machine_IV_Mixer, Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + try { + GregtechItemList.Machine_Advanced_LuV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.06", + "Mega Combiner I", 6, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + //ItemList.Machine_LuV_Mixer, Character.valueOf('E'), + ItemList.valueOf("Machine_LuV_Mixer"), Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + GregtechItemList.Machine_Advanced_ZPM_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.07", + "Mega Combiner II", 7, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + //ItemList.Machine_ZPM_Mixer, Character.valueOf('E'), + ItemList.valueOf("Machine_ZPM_Mixer"), Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + GregtechItemList.Machine_Advanced_UV_Mixer.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(mID++, "advancedmachine.mixer.tier.08", + "Ultra Combiner I", 8, "Indeed, It does blend!", map, 4, 4, 32000, 0, 1, + "MixerAdvanced.png", "", false, false, 0, "MIXER", null + /*new Object[] { "GRG", "GEG", "CMC", Character.valueOf('M'), + //ItemList.Machine_UV_Mixer, Character.valueOf('E'), + ItemList.valueOf("Machine_UV_Mixer"), Character.valueOf('E'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('R'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, Character.valueOf('C'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, Character.valueOf('G'), + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PLATE }*/).getStackForm(1L)); + } + catch (Throwable t){} + } + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java new file mode 100644 index 0000000000..6ddc971f85 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_Catalysts; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.algae.GregtechMTE_AlgaePondBase; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.chemplant.GregtechMTE_ChemicalPlant; + +public class GregtechAlgaeContent { + + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Algae Content."); + run1(); + } + } + + private static void run1() { + + // Algae Pond + GregtechItemList.AlgaeFarm_Controller.set(new GregtechMTE_AlgaePondBase(997, "algaefarm.controller.tier.single", "Algae Farm").getStackForm(1L)); + + // Chemical Plant + GregtechItemList.ChemicalPlant_Controller.set(new GregtechMTE_ChemicalPlant(998, "chemicalplant.controller.tier.single", "ExxonMobil Chemical Plant").getStackForm(1L)); + + GregtechItemList.Bus_Catalysts.set((new GT_MetaTileEntity_Hatch_Catalysts(31030, "hatch.catalysts", "Catalyst Housing")).getStackForm(1L)); + + + int aTier = 0; + // Bronze + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 0, 10); + // Steel + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings2, 0, 16); + // Aluminium + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 1, 17); + // Stainless + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings4, 1, 49); + // Titanium + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings4, 2, 50); + // Tungsten + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, GregTech_API.sBlockCasings4, 0, 48); + // Laurenium + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 2, 84); + // Botmium + GregtechMTE_ChemicalPlant.registerMachineCasingForTier(aTier++, ModBlocks.blockCustomMachineCasings, 3, 11); + + + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java new file mode 100644 index 0000000000..8adf580011 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc.GMTE_AmazonPackager; + +public class GregtechAmazonWarehouse { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Amazon Warehouse Multiblock."); + run1(); + } + } + + private static void run1() { + // Amazon packager multiblock + GregtechItemList.Amazon_Warehouse_Controller.set(new GMTE_AmazonPackager(942, "amazonprime.controller.tier.single", "Amazon Warehousing Depot.").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java new file mode 100644 index 0000000000..43a9402be2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBedrockPlatforms.java @@ -0,0 +1,18 @@ +/* +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock.GregtechMetaTileEntity_BedrockMiningPlatform1; + +public class GregtechBedrockPlatforms { + + //941-945 + + public static void run() { + Logger.INFO("Gregtech5u Content | Registering Bedrock Mining Platform."); + GregtechItemList.BedrockMiner_MKI.set(new GregtechMetaTileEntity_BedrockMiningPlatform1(941, "multimachine.tier.01.bedrockminer", "Experimental Deep Earth Drilling Platform - MK I").getStackForm(1)); + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java new file mode 100644 index 0000000000..f236002505 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechBufferDynamos.java @@ -0,0 +1,64 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import static gtPlusPlus.core.recipe.common.CI.bitsd; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DynamoBuffer; + +public class GregtechBufferDynamos { + + private static int mID = 899; + public static void run() { + run2(); + } + + private static final void run2() { + GregtechItemList.Hatch_Buffer_Dynamo_ULV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.00", "ULV Dynamo Hatch [Buffered]", 0).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_LV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.01", "LV Dynamo Hatch [Buffered]", 1).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_MV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.02", "MV Dynamo Hatch [Buffered]", 2).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_HV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.03", "HV Dynamo Hatch [Buffered]", 3).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_EV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.04", "EV Dynamo Hatch [Buffered]", 4).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_IV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.05", "IV Dynamo Hatch [Buffered]", 5).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_LuV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.06", "LuV Dynamo Hatch [Buffered]", 6).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_ZPM.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.07", "ZPM Dynamo Hatch [Buffered]", 7).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_UV.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.08", "UV Dynamo Hatch [Buffered]", 8).getStackForm(1L)); + GregtechItemList.Hatch_Buffer_Dynamo_MAX.set( + new GT_MetaTileEntity_Hatch_DynamoBuffer(mID++, "hatch.dynamo.buffer.tier.09", "Max Dynamo Hatch [Buffered]", 9).getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_ULV.get(1L, new Object[0]), bitsd, + new Object[]{"TMC", 'M', ItemList.Hatch_Dynamo_ULV, 'T', CI.getTieredCircuit(0), 'C', OrePrefixes.cableGt04.get((Object) Materials.Lead)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_LV.get(1L, new Object[0]), bitsd, + new Object[]{"TMC", 'M', ItemList.Hatch_Dynamo_LV, 'T', CI.getTieredCircuit(1), 'C', OrePrefixes.cableGt04.get((Object) Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_MV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', + ItemList.Hatch_Dynamo_MV, 'T', CI.getTieredCircuit(2), 'C', OrePrefixes.cableGt04.get((Object) Materials.AnyCopper)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_HV.get(1L, new Object[0]), bitsd, + new Object[]{"TMC", 'M', ItemList.Hatch_Dynamo_HV, 'T', CI.getTieredCircuit(3), 'C', OrePrefixes.cableGt04.get((Object) Materials.Gold)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_EV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', + ItemList.Hatch_Dynamo_EV, 'T', CI.getTieredCircuit(4), 'C', OrePrefixes.cableGt04.get((Object) Materials.Aluminium)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_IV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', + ItemList.Hatch_Dynamo_IV, 'T', CI.getTieredCircuit(5), 'C', OrePrefixes.cableGt04.get((Object) Materials.Tungsten)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_LuV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", + 'M', ItemList.Hatch_Dynamo_LuV, 'T', CI.getTieredCircuit(6), 'C', OrePrefixes.cableGt04.get((Object) Materials.VanadiumGallium)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_ZPM.get(1L, new Object[0]), bitsd, new Object[]{"TMC", + 'M', ItemList.Hatch_Dynamo_ZPM, 'T', CI.getTieredCircuit(7), 'C', OrePrefixes.cableGt04.get((Object) Materials.Naquadah)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_UV.get(1L, new Object[0]), bitsd, new Object[]{"TMC", 'M', + ItemList.Hatch_Dynamo_UV, 'T', CI.getTieredCircuit(8), 'C', OrePrefixes.wireGt12.get((Object) Materials.NaquadahAlloy)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Buffer_Dynamo_MAX.get(1L, new Object[0]), bitsd, new Object[]{"TMC", + 'M', ItemList.Hatch_Dynamo_MAX, 'T', CI.getTieredCircuit(9), 'C', OrePrefixes.wireGt04.get((Object) Materials.Superconductor)}); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java new file mode 100644 index 0000000000..73d29b2174 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java @@ -0,0 +1,532 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMachine_ComponentAssemblers; + +import java.util.ArrayList; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.*; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; +import gregtech.api.util.GTPP_Recipe; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraftforge.oredict.OreDictionary; + +public class GregtechComponentAssembler { + + public static void run() { + + if (!enableMachine_ComponentAssemblers) { + return; + } + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + Logger.INFO("Component Assemblers cannot be created in 5.08.33 during the pre-release. Please wait for 1.7.0 release."); + return; + } + + GregtechItemList.Machine_LV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(985, + "basicmachine.componentmaker.tier.01", "Basic Component Maker", 1, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_MV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(986, + "basicmachine.componentmaker.tier.02", "Advanced Component Maker", 2, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_HV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(987, + "basicmachine.componentmaker.tier.03", "Advanced Component Maker II", 3, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_EV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(988, + "basicmachine.componentmaker.tier.04", "Advanced Component Maker III", 4, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_IV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(989, + "basicmachine.componentmaker.tier.05", "Advanced Component Maker IV", 5, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 16000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_LuV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(31012, + "basicmachine.componentmaker.tier.06", "Advanced Component Maker V", 6, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 24000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_ZPM_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(31013, + "basicmachine.componentmaker.tier.07", "Advanced Component Maker VI", 7, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 32000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + GregtechItemList.Machine_UV_Component_Maker.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(31014, + "basicmachine.componentmaker.tier.08", "Advanced Component Maker VII", 8, "Components, Unite!", + GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes, 6, 1, 48000, 0, 1, "Assembler.png", "", false, + false, 0, "ASSEMBLER", + new Object[] { "ACA", "VMV", "WCW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'A', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PISTON, 'C', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', + GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE4 }).getStackForm(1L)); + + // Motors + // addRecipeMotor(0, Materials.Lead, 1, Materials.RedAlloy, 1, + // Materials.WroughtIron, Materials.IronMagnetic); + addRecipeMotor(1, Materials.Copper, 1, Materials.Tin, 1, Materials.Iron, Materials.IronMagnetic); + addRecipeMotor(2, Materials.Copper, 2, Materials.Copper, 1, Materials.Aluminium, Materials.SteelMagnetic); + addRecipeMotor(3, Materials.Copper, 4, Materials.Gold, 1, Materials.StainlessSteel, Materials.SteelMagnetic); + addRecipeMotor(4, Materials.Copper, 8, Materials.Aluminium, 1, Materials.Titanium, Materials.NeodymiumMagnetic); + addRecipeMotor(5, Materials.Copper, 16, Materials.Tungsten, 1, Materials.TungstenSteel, + Materials.NeodymiumMagnetic); + + // Pistons + // addRecipePiston(0, Materials.Lead, Materials.Lead); + addRecipePiston(1, Materials.Steel, Materials.Tin); + addRecipePiston(2, Materials.Aluminium, Materials.Copper); + addRecipePiston(3, Materials.StainlessSteel, Materials.Gold); + addRecipePiston(4, Materials.Titanium, Materials.Aluminium); + addRecipePiston(5, Materials.TungstenSteel, Materials.Tungsten); + + // Conveyors + // addRecipeConveyor(0, Materials.Lead); + addRecipeConveyor(1, Materials.Tin); + addRecipeConveyor(2, Materials.Copper); + addRecipeConveyor(3, Materials.Gold); + addRecipeConveyor(4, Materials.Aluminium); + addRecipeConveyor(5, Materials.Tungsten); + + // Pumps + // addRecipePump(0, Materials.Lead, Materials.Lead, Materials.Lead); + addRecipePump(1, Materials.Tin, Materials.Copper, Materials.Tin); + addRecipePump(2, Materials.Bronze, Materials.Steel, Materials.Copper); + addRecipePump(3, Materials.Steel, Materials.StainlessSteel, Materials.Gold); + addRecipePump(4, Materials.StainlessSteel, Materials.Titanium, Materials.Aluminium); + addRecipePump(5, Materials.TungstenSteel, Materials.TungstenSteel, Materials.Tungsten); + + // Robot Arms + // addRecipeRobotArm(0, Materials.Lead, Materials.Lead); + addRecipeRobotArm(1, Materials.Steel, Materials.Tin); + addRecipeRobotArm(2, Materials.Aluminium, Materials.Copper); + addRecipeRobotArm(3, Materials.StainlessSteel, Materials.Gold); + addRecipeRobotArm(4, Materials.Titanium, Materials.Aluminium); + addRecipeRobotArm(5, Materials.TungstenSteel, Materials.Tungsten); + + // Field Generators + // addRecipeFieldGenerator(0, Materials.Lead); + addRecipeFieldGenerator(1); + addRecipeFieldGenerator(2); + addRecipeFieldGenerator(3); + addRecipeFieldGenerator(4); + addRecipeFieldGenerator(5); + + // Emitters + // addRecipeEmitter(0, Materials.Lead, Materials.IronMagnetic); + addRecipeEmitter(1, Materials.Tin, Materials.Brass, Materials.Quartzite); + addRecipeEmitter(2, Materials.Copper, Materials.Electrum, Materials.NetherQuartz); + addRecipeEmitter(3, Materials.Gold, Materials.Chrome, Materials.Emerald); + addRecipeEmitter(4, Materials.Aluminium, Materials.Platinum, Materials.EnderPearl); + addRecipeEmitter(5, Materials.Tungsten, Materials.Osmium, Materials.EnderEye); + + // Sensors + // addRecipeSensor(0, Materials.WroughtIron, Materials.IronMagnetic, + // Materials.Apatite); + addRecipeSensor(1, Materials.Steel, Materials.Brass, Materials.Quartzite); + addRecipeSensor(2, Materials.Aluminium, Materials.Electrum, Materials.NetherQuartz); + addRecipeSensor(3, Materials.StainlessSteel, Materials.Chrome, Materials.Emerald); + addRecipeSensor(4, Materials.Titanium, Materials.Platinum, Materials.EnderPearl); + addRecipeSensor(5, Materials.TungstenSteel, Materials.Osmium, Materials.EnderEye); + + } + + private static boolean addRecipeMotor(int tier, Materials wire, int wirethickness, Materials cable, + int cablethickness, Materials stick, Materials magstick) { + try { + String mWT = "" + wirethickness; + String mCT = "" + cablethickness; + + if (wirethickness < 10) { + mWT = "0" + wirethickness; + } + if (cablethickness < 10) { + mCT = "0" + cablethickness; + } + + OrePrefixes prefixWire = OrePrefixes.getOrePrefix("wireGt" + mWT); + OrePrefixes prefixCable = OrePrefixes.getOrePrefix("cableGt" + mCT); + + ItemStack wireStack = ItemUtils.getGregtechOreStack(prefixWire, wire, 4); + ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 2); + ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 2); + ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, magstick, 1); + + ItemStack Input[] = { wireStack, cableStack, rodStack, magrodStack }; + + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getElectricMotor(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipePiston(int tier, Materials mat, Materials cable) { + try { + + OrePrefixes prefixCable = OrePrefixes.cableGt01; + ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 2); + ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, mat, 2); + ItemStack plateStack = ItemUtils.getGregtechOreStack(OrePrefixes.plate, mat, 3); + ItemStack gearStack = ItemUtils.getGregtechOreStack(OrePrefixes.gearGtSmall, mat, 1); + ItemStack motorStack = CI.getElectricMotor(tier, 1); + + ItemStack Input[] = { plateStack, cableStack, rodStack, gearStack, motorStack }; + + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getElectricPiston(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipeConveyor(int tier, Materials cable) { + try { + OrePrefixes prefixCable = OrePrefixes.cableGt01; + ItemStack cableStack = ItemUtils.getGregtechOreStack(prefixCable, cable, 1); + ItemStack motorStack = CI.getElectricMotor(tier, 2); + boolean mAdd[]; + final ArrayList oreDictList = OreDictionary.getOres("plateAnyRubber"); + if (!oreDictList.isEmpty()) { + int mcount = 0; + mAdd = new boolean[oreDictList.size()]; + for (ItemStack mRubberType : oreDictList) { + final ItemStack returnValue = mRubberType.copy(); + returnValue.stackSize = 6; + ItemStack Input[] = { cableStack, motorStack, returnValue }; + mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getConveyor(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + int added = 0; + for (boolean y : mAdd) { + if (y) { + added++; + } + } + if (added >= (oreDictList.size() / 2)) { + return true; + } + else { + return false; + } + } + else { + ItemStack Input[] = { cableStack, motorStack, + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateRubber", 6) }; + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getConveyor(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipePump(int tier, Materials main, Materials pipe, Materials cable) { + try { + ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 1); + ItemStack screwStack = ItemUtils.getGregtechOreStack(OrePrefixes.screw, main, 1); + ItemStack rotorStack = ItemUtils.getGregtechOreStack(OrePrefixes.rotor, main, 1); + ItemStack pipeStack = ItemUtils.getGregtechOreStack(OrePrefixes.pipeMedium, pipe, 1); + ItemStack motorStack = CI.getElectricMotor(tier, 1); + boolean mAdd[]; + final ArrayList oreDictList = OreDictionary.getOres("ringAnyRubber"); + if (!oreDictList.isEmpty()) { + int mcount = 0; + mAdd = new boolean[oreDictList.size()]; + for (ItemStack mRubberType : oreDictList) { + final ItemStack returnValue = mRubberType.copy(); + returnValue.stackSize = 2; + ItemStack Input[] = { cableStack, screwStack, rotorStack, pipeStack, motorStack, returnValue }; + mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getElectricPump(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + int added = 0; + for (boolean y : mAdd) { + if (y) { + added++; + } + } + if (added >= (oreDictList.size() / 2)) { + return true; + } + else { + return false; + } + } + else { + ItemStack Input[] = { cableStack, screwStack, rotorStack, pipeStack, motorStack, + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ringRubber", 2) }; + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getElectricPump(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipeRobotArm(int tier, Materials stick, Materials cable) { + try { + ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 3); + ItemStack rodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 2); + ItemStack motorStack = CI.getElectricMotor(tier, 2); + ItemStack pistonStack = CI.getElectricPiston(tier, 1); + + boolean mAdd[]; + final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); + if (oreDictList.length > 0) { + int mcount = 0, added = 0; + mAdd = new boolean[oreDictList.length]; + for (ItemStack mCircuitType : oreDictList) { + final ItemStack returnValue = mCircuitType.copy(); + returnValue.stackSize = 1; + ItemStack Input[] = { returnValue, cableStack, rodStack, pistonStack, motorStack }; + mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getRobotArm(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + for (boolean y : mAdd) { + if (y) { + added++; + } + } + if (added >= (oreDictList.length / 2)) { + return true; + } + else { + return false; + } + } + else { + ItemStack Input[] = { ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 1), cableStack, rodStack, pistonStack, motorStack }; + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getRobotArm(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + + + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipeFieldGenerator(int tier) { + try { + ItemStack gem; + String mWT; + if (tier == 1) + mWT = "01"; + else if (tier == 2) + mWT = "02"; + else if (tier == 3) + mWT = "04"; + else if (tier == 4) + mWT = "08"; + else if (tier == 5) + mWT = "16"; + else + mWT = "01"; + + ItemStack eyeQuantum = ItemUtils.getValueOfItemList("QuantumEye", 1, ItemUtils.getSimpleStack(Items.ender_eye, 4)); + ItemStack starQuantum = ItemUtils.getValueOfItemList("QuantumStar", 1, ItemUtils.getSimpleStack(Items.nether_star, 4)); + + if (tier == 1) + gem = ItemUtils.getSimpleStack(Items.ender_pearl); + else if (tier == 2) + gem = ItemUtils.getSimpleStack(Items.ender_eye); + else if (tier == 3) + gem = eyeQuantum; + else if (tier == 4) + gem = ItemUtils.getSimpleStack(Items.nether_star); + else if (tier == 5) + gem = starQuantum; + else + gem = ItemUtils.getSimpleStack(Items.ender_pearl); + + OrePrefixes prefixWire = OrePrefixes.getOrePrefix("wireGt" + mWT); + ItemStack wireStack = ItemUtils.getGregtechOreStack(prefixWire, Materials.Osmium, 4); + + boolean mAdd[]; + final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); + if (oreDictList.length > 0) { + int mcount = 0, added = 0; + mAdd = new boolean[oreDictList.length]; + for (ItemStack mCircuitType : oreDictList) { + final ItemStack returnValue = mCircuitType.copy(); + returnValue.stackSize = 4; + ItemStack Input[] = { returnValue, wireStack, gem }; + mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getFieldGenerator(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + for (boolean y : mAdd) { + if (y) { + added++; + } + } + if (added >= (oreDictList.length / 2)) { + return true; + } + else { + return false; + } + } + else { + ItemStack Input[] = { ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 4), wireStack, gem }; + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getFieldGenerator(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipeEmitter(int tier, Materials cable, Materials stick, Materials gem) { + try { + ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.cableGt01, cable, 2); + ItemStack gemstack = ItemUtils.getGregtechOreStack(OrePrefixes.gem, gem, 1); + ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, stick, 4); + + boolean mAdd[]; + final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); + if (oreDictList.length > 0) { + int mcount = 0, added = 0; + mAdd = new boolean[oreDictList.length]; + for (ItemStack mCircuitType : oreDictList) { + final ItemStack returnValue = mCircuitType.copy(); + returnValue.stackSize = 2; + ItemStack Input[] = { returnValue, cableStack, gemstack, magrodStack }; + mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getEmitter(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + for (boolean y : mAdd) { + if (y) { + added++; + } + } + if (added >= (oreDictList.length / 2)) { + return true; + } + else { + return false; + } + } + else { + ItemStack Input[] = { ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 2), cableStack, gemstack, magrodStack }; + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getEmitter(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + + + + } + catch (Throwable t) { + return false; + } + } + + private static boolean addRecipeSensor(int tier, Materials plate, Materials rod, Materials gem) { + try { + ItemStack cableStack = ItemUtils.getGregtechOreStack(OrePrefixes.plate, plate, 4); + ItemStack magrodStack = ItemUtils.getGregtechOreStack(OrePrefixes.stick, rod, 1); + ItemStack gemStack = ItemUtils.getGregtechOreStack(OrePrefixes.gem, gem, 1); + + boolean mAdd[]; + final ItemStack oreDictList[] = CI.getAllCircuitsOfTier(tier); + if (oreDictList.length > 0) { + int mcount = 0, added = 0; + mAdd = new boolean[oreDictList.length]; + for (ItemStack mCircuitType : oreDictList) { + final ItemStack returnValue = mCircuitType.copy(); + returnValue.stackSize = 1; + ItemStack Input[] = { gemStack, cableStack, returnValue, magrodStack }; + mAdd[mcount++] = CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getSensor(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + for (boolean y : mAdd) { + if (y) { + added++; + } + } + if (added >= (oreDictList.length / 2)) { + return true; + } + else { + return false; + } + } + else { + ItemStack Input[] = { gemStack, cableStack, magrodStack, ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(tier), 1) }; + return CORE.RA.addComponentMakerRecipe(Input, GT_Values.NF, + CI.getSensor(tier, 1), (tier * 40), + ((int) GT_Values.V[tier] / 16) * 15); + } + + + } + catch (Throwable t) { + return false; + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java new file mode 100644 index 0000000000..9a5fa6f6de --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -0,0 +1,698 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import static gtPlusPlus.core.lib.CORE.GTNH; +import static gtPlusPlus.core.lib.LoadedMods.Gregtech; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaPipeEntityFluid; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaPipeEntity_Cable; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public class GregtechConduits { + /** + * + * The Voltage Tiers. Use this Array instead of the old named Voltage Variables + * public static final long[] V = new long[] {0=8, 1=32, 2=128, 3=512, 4=2048, 5=8192, 6=32768, 7=131072, 8=524288, 9=Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE}; + * + */ + + private static OrePrefixes cableGt16; + static{ + if(GTNH) { + try { + cableGt16=(OrePrefixes) GT_Utility.getField(OrePrefixes.class,"cableGt16").get(null); + }catch (IllegalAccessException | NullPointerException e){ + e.printStackTrace(); + } + } + } + + //30000-30999 + + private static int BaseWireID = 30600; + private static int BasePipeID = 30700; + private static int BasePipeHexadecupleID = 30100; + + + public static void run() + { + if (Gregtech){ + Logger.INFO("Gregtech5u Content | Registering Custom Cables/Wires/Pipes."); + if (CORE.ConfigSwitches.enableCustom_Cables) { + run1(); + } + if (CORE.ConfigSwitches.enableCustom_Pipes) { + run2(); + run3(); + } + } + + } + + private static void run3() { + + if (Utils.getGregtechVersionAsInt() >= 50930) { + try { + Class aPipeEntity = GT_MetaPipeEntity_Fluid.class; + Constructor constructor = aPipeEntity.getConstructor(int.class, String.class, String.class, float.class, Materials.class, int.class, int.class, boolean.class, int.class); + if (constructor != null) { + Logger.INFO("Generating Hexadecuple pipes."); + generateFluidMultiPipes(constructor, Materials.Copper, MaterialUtils.getMaterialName(Materials.Copper), "Copper", BasePipeHexadecupleID++, 60, 1000, true); + generateFluidMultiPipes(constructor, Materials.Bronze, MaterialUtils.getMaterialName(Materials.Bronze), "Bronze", BasePipeHexadecupleID++, 120, 2000, true); + generateFluidMultiPipes(constructor, Materials.Steel, MaterialUtils.getMaterialName(Materials.Steel), "Steel", BasePipeHexadecupleID++, 240, 2500, true); + generateFluidMultiPipes(constructor, Materials.StainlessSteel, MaterialUtils.getMaterialName(Materials.StainlessSteel), "Stainless Steel", BasePipeHexadecupleID++, 360, 3000, true); + generateFluidMultiPipes(constructor, Materials.Titanium, MaterialUtils.getMaterialName(Materials.Titanium), "Titanium", BasePipeHexadecupleID++, 480, 5000, true); + generateFluidMultiPipes(constructor, Materials.TungstenSteel, MaterialUtils.getMaterialName(Materials.TungstenSteel), "Tungsten Steel", BasePipeHexadecupleID++, 600, 7500, true); + generateFluidMultiPipes(constructor, Materials.Plastic, MaterialUtils.getMaterialName(Materials.Plastic), "Plastic", BasePipeHexadecupleID++, 360, 350, true); + + Materials aPTFE = Materials.get("Polytetrafluoroethylene"); + if (aPTFE != null) { + generateFluidMultiPipes(constructor, aPTFE, MaterialUtils.getMaterialName(aPTFE), "PTFE", BasePipeHexadecupleID++, 480, 600, true); + } + } + else { + Logger.INFO("Failed during Hexadecuple pipe generation."); + } + + } catch (NoSuchMethodException | SecurityException e) { + Logger.INFO("Failed during Hexadecuple pipe generation. [Ecx]"); + e.printStackTrace(); + } + } + + + //Generate Heat Pipes + //GregtechItemList.HeatPipe_Tier_1.set(new GT_MetaPipeEntity_Heat(31021, "gtpp.pipe.heat.basic.01", "Lead Heat Pipe (500C)", Materials.Lead, 500).getStackForm(1L)); + //GregtechItemList.HeatPipe_Tier_2.set(new GT_MetaPipeEntity_Heat(31022, "gtpp.pipe.heat.basic.02", "Iron Heat Pipe (500C)", Materials.Iron, 500).getStackForm(1L)); + //GregtechItemList.HeatPipe_Tier_3.set(new GT_MetaPipeEntity_Heat(31023, "gtpp.pipe.heat.basic.03", "Silver Heat Pipe (1500C)", Materials.Silver, 1500).getStackForm(1L)); + + + + } + + private static void generateFluidMultiPipes(Constructor aClazz, Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ + GT_MetaPipeEntity_Fluid aPipe; + try { + aPipe = aClazz.newInstance(startID, "GT_Pipe_" + name + "_Hexadecuple", + "Hexadecuple " + displayName + " Fluid Pipe", 1.0F, aMaterial, baseCapacity, heatCapacity, gasProof, + 16); + if (aPipe == null) { + Logger.INFO("Failed to Generate "+aMaterial+" Hexadecuple pipes."); + } + else { + Logger.INFO("Generated "+aMaterial+" Hexadecuple pipes."); + GT_OreDictUnificator.registerOre("pipeHexadecuple" + aMaterial, aPipe.getStackForm(1L)); + } + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + Logger.INFO("Failed to Generate "+aMaterial+" Hexadecuple pipes. [Ecx]"); + e.printStackTrace(); + } + } + + private static void run1(){ + + if (LoadedMods.Big_Reactors){ + wireFactory("Blutonium", 8196, BaseWireID, 8, 32, 2, new short[]{28, 28, 218, 0}); + wireFactory("Cyanite", 512, BaseWireID+15, 2, 16, 4, new short[]{27, 130, 178, 0}); + wireFactory("Yellorium", 2048, BaseWireID+30, 4, 16, 2, new short[]{150, 195, 54, 0}); + } + + if (LoadedMods.EnderIO){ + wireFactory("RedstoneAlloy", 32, BaseWireID+45, 0, 2, 1, new short[]{178,34,34, 0}); + } + + if(!GTNH) { + customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID + 56, 1, 2, 2); + customWireFactory(ELEMENT.getInstance().ZIRCONIUM, 128, BaseWireID + 67, 1, 2, 2); + customWireFactory(ALLOY.HG1223, 32768, BaseWireID + 78, 2, 8, 4); + customWireFactory(ALLOY.TRINIUM_TITANIUM, 2048, BaseWireID + 89, 1, 2, 16); + } + + + //superConductorFactory(GT_Materials.Superconductor, 524288, 30660, 0, 0, 8); + if (LoadedMods.Thaumcraft){ + //superConductorFactory(GT_Materials.Void, 512, 30661, 0, 0, 8); + } + } + + private static void run2(){ + generateNonGTFluidPipes(GT_Materials.Staballoy, ALLOY.STABALLOY, BasePipeID, 6250, 7500, true); + generateNonGTFluidPipes(GT_Materials.Tantalloy60, ALLOY.TANTALLOY_60, BasePipeID+5, 5000, 4250, true); + generateNonGTFluidPipes(GT_Materials.Tantalloy61, ALLOY.TANTALLOY_61, BasePipeID+10, 6000, 5800, true); + if (LoadedMods.Thaumcraft){ + generateNonGTFluidPipes(GT_Materials.Void, null, BasePipeID+15, 800, 25000, true); + } + generateGTFluidPipes(Materials.Europium, BasePipeID+20, 12000, 7500, true); + generateNonGTFluidPipes(GT_Materials.Potin, ALLOY.POTIN, BasePipeID+25, 480, 2000, true); + generateNonGTFluidPipes(GT_Materials.MaragingSteel300, ALLOY.MARAGING300, BasePipeID+30, 7000, 2500, true); + generateNonGTFluidPipes(GT_Materials.MaragingSteel350, ALLOY.MARAGING350, BasePipeID+35, 8000, 2500, true); + generateNonGTFluidPipes(GT_Materials.Inconel690, ALLOY.INCONEL_690, BasePipeID+40, 7500, 4800, true); + generateNonGTFluidPipes(GT_Materials.Inconel792, ALLOY.INCONEL_792, BasePipeID+45, 8000, 5500, true); + generateNonGTFluidPipes(GT_Materials.HastelloyX, ALLOY.HASTELLOY_X, BasePipeID+50, 10000, 4200, true); + + generateGTFluidPipes(Materials.Tungsten, BasePipeID+55, 4320, 7200, true); + if (LoadedMods.EnderIO){ + generateGTFluidPipes(Materials.DarkSteel, BasePipeID+60, 2320, 2750, true); + } + generateGTFluidPipes(Materials.Clay, BasePipeID+65, 100, 500, false); + generateGTFluidPipes(Materials.Lead, BasePipeID+70, 720, 1200, true); + + generateNonGTFluidPipes(GT_Materials.TriniumNaquadahCarbonite, ALLOY.TRINIUM_NAQUADAH_CARBON, 30500, 10, 250000, true); + + } + + private static void wireFactory(final String Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps, final short[] rgb){ + @SuppressWarnings("deprecation") + final Materials T = Materials.valueOf(Material); + int V = GT_Utility.getTier(Voltage); + if (V == -1){ + Logger.ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set."); + Logger.ERROR(Material+" has defaulted to 8v."); + V=0; + } + makeWires(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false, rgb); + } + + @SuppressWarnings("deprecation") + private static void makeWires(final Materials aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated, final short[] aRGB) + { + Logger.WARNING("Gregtech5u Content | Registered "+aMaterial.name() +" as a new material for Wire & Cable."); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Wire", 0.50F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", GTNH?0.625F:0.75F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", GTNH?0.75F:1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + if (aInsulatable) + { + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Cable", 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", GTNH?0.75F:0.875F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + if(GTNH){ + GT_OreDictUnificator.registerOre(cableGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Cable", 0.875f, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + } + } + } + + private static void customWireFactory(final Material Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps){ + int V = GT_Utility.getTier(Voltage); + if (V == -1){ + Logger.ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set."); + Logger.ERROR(Material+" has defaulted to 8v."); + V=0; + } + makeCustomWires(Material, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false); + } + + private static void makeCustomWires(final Material aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated) + { + Logger.WARNING("Gregtech5u Content | Registered "+aMaterial.getLocalizedName() +" as a new material for Wire & Cable."); + registerOre(OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".01", "1x " + aMaterial.getLocalizedName() + " Wire", 0.125F, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Wire", 0.25F, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Wire", 0.375F, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".08", "8x " + aMaterial.getLocalizedName() + " Wire", 0.50F, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Wire", GTNH?0.625F:0.75F, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Wire", GTNH?0.75F:1.0F, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + if (aInsulatable) + { + registerOre(OrePrefixes.cableGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".01", "1x " + aMaterial.getLocalizedName() + " Cable", 0.25F, aLossInsulated, 1L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.cableGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Cable", 0.375F, aLossInsulated, 2L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.cableGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Cable", 0.5F, aLossInsulated, 4L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.cableGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".08", "8x " + aMaterial.getLocalizedName() + " Cable", 0.625F, aLossInsulated, 8L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Cable", GTNH?0.75F:0.875F, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + if(GTNH){ + registerOre(cableGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Cable", 0.875f, aLossInsulated, 16L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + } + } + + } + + private static void superConductorFactory(final GT_Materials Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps){ + final GT_Materials T = Material; + int V = 0; + if (Voltage == 8){ + V = 0; + } + else if (Voltage == 32){ + V = 1; + } + else if (Voltage == 128){ + V = 2; + } + else if (Voltage == 512){ + V = 3; + } + else if (Voltage == 2048){ + V = 4; + } + else if (Voltage == 8196){ + V = 5; + } + else if (Voltage == 32768){ + V = 6; + } + else if (Voltage == 131072){ + V = 7; + } + else if (Voltage == 524288){ + V = 8; + } + else if (Voltage == Integer.MAX_VALUE){ + V = 9; + } + else { + Logger.ERROR("Failed to set voltage on "+Material.name()+". Invalid voltage of "+Voltage+"V set."); + Logger.ERROR(Material.name()+" has defaulted to 8v."); + V = 0; + } + //makeWires(T, ID, 2L, 4L, 2L, GT_Values.V[V], true, false); + //makeSuperConductors(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false); + //makeWires(T, ID, bEC ? 2L : 2L, bEC ? 4L : 4L, 2L, gregtech.api.enums.GT_Values.V[V], true, false); + } + + + private static void generateGTFluidPipes(final Materials material, final int startID, final int transferRatePerSec, final int heatResistance, final boolean isGasProof){ + final int transferRatePerTick = transferRatePerSec/20; + final long mass = material.getMass(); + final long voltage = material.mMeltingPoint >= 2800 ? 64 : 16; + GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(material), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_"+material.mDefaultLocalName+"_Tiny", "Tiny "+material.mDefaultLocalName+" Fluid Pipe", 0.25F, material, transferRatePerTick*2, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material), new GT_MetaPipeEntity_Fluid(startID+1, "GT_Pipe_"+material.mDefaultLocalName+"_Small", "Small "+material.mDefaultLocalName+" Fluid Pipe", 0.375F, material, transferRatePerTick*4, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GT_MetaPipeEntity_Fluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*12, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GT_MetaPipeEntity_Fluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*24, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GT_MetaPipeEntity_Fluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*48, heatResistance, isGasProof).getStackForm(1L)); + //generatePipeRecipes(material.mDefaultLocalName, mass, voltage); + } + + private static void generateNonGTFluidPipes(final GT_Materials material, final Material myMaterial, final int startID, final int transferRatePerSec, final int heatResistance, final boolean isGasProof){ + final int transferRatePerTick = transferRatePerSec/10; + long mass; + if (myMaterial != null){ + mass = myMaterial.getMass(); + } + else { + mass = ELEMENT.getInstance().IRON.getMass(); + } + + int tVoltageMultiplier = (material.mBlastFurnaceTemp >= 2800) ? 64 : 16; + + GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(material), new GregtechMetaPipeEntityFluid(startID, "GT_Pipe_"+material.mDefaultLocalName+"_Tiny", "Tiny "+material.mDefaultLocalName+" Fluid Pipe", 0.25F, material, transferRatePerTick*2, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material), new GregtechMetaPipeEntityFluid(startID+1, "GT_Pipe_"+material.mDefaultLocalName+"_Small", "Small "+material.mDefaultLocalName+" Fluid Pipe", 0.375F, material, transferRatePerTick*4, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GregtechMetaPipeEntityFluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*12, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GregtechMetaPipeEntityFluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*24, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GregtechMetaPipeEntityFluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*48, heatResistance, isGasProof).getStackForm(1L)); + //generatePipeRecipes(material.mDefaultLocalName, mass, tVoltageMultiplier); + + } + + public static void generatePipeRecipes(final String materialName, final long Mass, final long vMulti){ + + String output = materialName.substring(0, 1).toUpperCase() + materialName.substring(1); + output = Utils.sanitizeString(output); + + if (output.equals("VoidMetal")){ + output = "Void"; + } + + Logger.INFO("Generating "+output+" pipes & respective recipes."); + + ItemStack pipeIngot = ItemUtils.getItemStackOfAmountFromOreDict("ingot"+output, 1); + ItemStack pipePlate = ItemUtils.getItemStackOfAmountFromOreDict("plate"+output, 1); + + if (pipeIngot == null){ + if (pipePlate != null){ + pipeIngot = pipePlate; + } + } + + //Check all pipes are not null + Logger.WARNING("Generated pipeTiny from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Tiny"+output, 1) != null) ? true : false)); + Logger.WARNING("Generated pipeSmall from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 1) != null) ? true : false)); + Logger.WARNING("Generated pipeNormal from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 1) != null) ? true : false)); + Logger.WARNING("Generated pipeLarge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1) != null) ? true : false)); + Logger.WARNING("Generated pipeHuge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1) != null) ? true : false)); + + int eut = 120; + eut = (int) (8 * vMulti); + + + //Add the Three Shaped Recipes First + RecipeUtils.addShapedRecipe( + pipePlate, "craftingToolWrench", pipePlate, + pipePlate, null, pipePlate, + pipePlate, "craftingToolHardHammer", pipePlate, + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 6)); + + RecipeUtils.addShapedRecipe( + pipePlate, pipePlate, pipePlate, + "craftingToolWrench", null, "craftingToolHardHammer", + pipePlate, pipePlate, pipePlate, + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 2)); + + RecipeUtils.addShapedRecipe( + pipePlate, "craftingToolHardHammer", pipePlate, + pipePlate, null, pipePlate, + pipePlate, "craftingToolWrench", pipePlate, + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1)); + + if (pipeIngot != null && ItemUtils.checkForInvalidItems(pipeIngot)) { + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(pipeIngot, 1), + ItemList.Shape_Extruder_Pipe_Tiny.get(0), + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("pipe"+"Tiny"+output, 2), + 5, eut); + + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(pipeIngot, 1), + ItemList.Shape_Extruder_Pipe_Small.get(0), + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 1), + 10, eut); + + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(pipeIngot, 3), + ItemList.Shape_Extruder_Pipe_Medium.get(0), + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 1), + 1*20, eut); + + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(pipeIngot, 6), + ItemList.Shape_Extruder_Pipe_Large.get(0), + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1), + 2*20, eut); + + GT_Values.RA.addExtruderRecipe( + ItemUtils.getSimpleStack(pipeIngot, 12), + ItemList.Shape_Extruder_Pipe_Huge.get(0), + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1), + 4*20, eut); + + } + + if ((eut < 512) && !output.equals("Void")){ + try { + final ItemStack pipePlateDouble = ItemUtils.getItemStackOfAmountFromOreDict("plateDouble"+output, 1).copy(); + if (pipePlateDouble != null) { + RecipeUtils.addShapedRecipe( + pipePlateDouble, "craftingToolHardHammer", pipePlateDouble, + pipePlateDouble, null, pipePlateDouble, + pipePlateDouble, "craftingToolWrench", pipePlateDouble, + ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1)); + } else { + Logger.INFO("Failed to add a recipe for "+materialName+" Huge pipes. Double plates probably do not exist."); + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + + + } + + public static boolean registerOre(OrePrefixes aPrefix, Material aMaterial, ItemStack aStack) { + return registerOre(aPrefix.get(Utils.sanitizeString(aMaterial.getLocalizedName())), aStack); + } + + public static boolean registerOre(Object aName, ItemStack aStack) { + if ((aName == null) || (GT_Utility.isStackInvalid(aStack))) + return false; + String tName = aName.toString(); + if (GT_Utility.isStringInvalid(tName)) + return false; + ArrayList tList = GT_OreDictUnificator.getOres(tName); + for (int i = 0; i < tList.size(); ++i) + if (GT_Utility.areStacksEqual((ItemStack) tList.get(i), aStack, true)) + return false; + OreDictionary.registerOre(tName, GT_Utility.copyAmount(1L, new Object[] { aStack })); + return true; + } + + public static boolean generateWireRecipes(Material aMaterial){ + + //Adds manual crafting recipe + RecipeUtils.addShapedRecipe( + Utils.sanitizeString("plate"+aMaterial.getLocalizedName()), CI.craftingToolWireCutter, null, + null, null, null, + null, null, null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1)); + + //Wire mill + GT_Values.RA.addWiremillRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + 5*20, + 4); + + //Extruder + GT_Values.RA.addExtruderRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), + ItemList.Shape_Extruder_Wire.get(0), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + 196, + 96); + + GT_Values.RA.addUnboxingRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + null, + 100, + 8); + + //Shapeless Down-Crafting + //2x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1)}, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2) + ); + //4x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1)}, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 4) + ); + //8x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1)}, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 8) + ); + //12x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1)}, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 12) + ); + //16x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1)}, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 16) + ); + + + //1x -> 2x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) + ); + + //2x -> 4x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) + ); + + //4x -> 8x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) + ); + + //8x -> 12x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) + ); + + //12x -> 16x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) + ); + + //8x -> 16x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) + ); + + //1x -> 4x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) + ); + + //1x -> 8x + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[]{ + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) + }, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) + ); + + + //Wire to Cable + //1x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 144), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), + 100, + 8); + //2x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 144), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt02"+aMaterial.getLocalizedName()), 1), + 100, + 8); + //4x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 288), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt04"+aMaterial.getLocalizedName()), 1), + 100, + 8); + //8x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 432), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt08"+aMaterial.getLocalizedName()), 1), + 100, + 8); + //12x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 576), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt12"+aMaterial.getLocalizedName()), 1), + 100, + 8); + + if(GTNH){ + //16x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 720), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt16"+aMaterial.getLocalizedName()), 1), + 100, + 8); + } + + //Assemble small wires into bigger wires + + //2x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(2), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), + 100, + 8); + + //4x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(4), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + 100, + 8); + + //8x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(8), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), + 100, + 8); + + //12x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(12), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), + 100, + 8); + + //16x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(16), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), + 100, + 8); + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java new file mode 100644 index 0000000000..64e77393bd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java @@ -0,0 +1,217 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.*; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; + +import java.lang.reflect.Constructor; + +public class GregtechCustomHatches { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Custom Fluid Hatches."); + run1(); + if (PollutionUtils.isPollutionEnabled()) { + run2(); + } + run3(); + run4(); + } + } + + private static void run1() { + + GregtechItemList.Hatch_Input_Cryotheum + .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getFluidStack("cryotheum", 1).getFluid(), // Fluid + // to + // resitrct + // hatch + // to + 128000, // Capacity + 967, // ID + "hatch.cryotheum.input.tier.00", // unlocal name + "Cryotheum Cooling Hatch" // Local name + ).getStackForm(1L)); + + GregtechItemList.Hatch_Input_Pyrotheum + .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getFluidStack("pyrotheum", 1).getFluid(), // Fluid + // to + // resitrct + // hatch + // to + 128000, // Capacity + 968, // ID + "hatch.pyrotheum.input.tier.00", // unlocal name + "Pyrotheum Heating Vent" // Local name + ).getStackForm(1L)); + + GregtechItemList.Hatch_Input_Naquadah.set(new GT_MetaTileEntity_Hatch_Naquadah(969, // ID + "hatch.naquadah.input.tier.00", // unlocal name + "Naquadah Reactor Input hatch" // Local name + ).getStackForm(1L)); + + + GregtechItemList.Hatch_Input_TurbineHousing.set(new GT_MetaTileEntity_Hatch_TurbineProvider(31025, // ID + "hatch.turbine.input.tier.00", // unlocal name + "Turbine Housing", // Local name + 8 + ).getStackForm(1L)); + + // Multiblock Control Core Bus + GregtechItemList.Hatch_Control_Core.set((new GT_MetaTileEntity_Hatch_ControlCore(30020, "hatch.control.adv", "Control Core Module", 1)).getStackForm(1L)); + + // Multiblock Air Intake Hatch + GregtechItemList.Hatch_Air_Intake.set(new GT_MetaTileEntity_Hatch_AirIntake(861, "hatch.air.intake.tier.00", "Air Intake Hatch", 5).getStackForm(1L)); + + // Steam Hatch + GregtechItemList.Hatch_Input_Steam + .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getSteam(1).getFluid(), // Fluid + // to + // resitrct + // hatch + // to + 64000, // Capacity + 31040, // ID + "hatch.steam.input.tier.00", // unlocal name + "Steam Hatch" // Local name + ).getStackForm(1L)); + + + + + + } + + private static void run2() { + GregtechItemList.Hatch_Muffler_Adv_LV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30001, "hatch.muffler.adv.tier.01", "Advanced Muffler Hatch (LV)", 1)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_MV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30002, "hatch.muffler.adv.tier.02", "Advanced Muffler Hatch (MV)", 2)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_HV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30003, "hatch.muffler.adv.tier.03", "Advanced Muffler Hatch (HV)", 3)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_EV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30004, "hatch.muffler.adv.tier.04", "Advanced Muffler Hatch (EV)", 4)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_IV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30005, "hatch.muffler.adv.tier.05", "Advanced Muffler Hatch (IV)", 5)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_LuV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30006, "hatch.muffler.adv.tier.06", "Advanced Muffler Hatch (LuV)", 6)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_ZPM + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30007, "hatch.muffler.adv.tier.07", "Advanced Muffler Hatch (ZPM)", 7)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_UV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30008, "hatch.muffler.adv.tier.08", "Advanced Muffler Hatch (UV)", 8)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_MAX + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30009, "hatch.muffler.adv.tier.09", "Advanced Muffler Hatch (MAX)", 9)) + .getStackForm(1L)); + } + + private static void run3() { + /* + * Super Input Busses + */ + + int aStartID = 30021; + + GregtechItemList.Hatch_SuperBus_Input_ULV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.00", "Super Bus (I) (ULV)", 0)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_LV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.01", "Super Bus (I) (LV)", 1)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_MV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.02", "Super Bus (I) (MV)", 2)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_HV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.03", "Super Bus (I) (HV)", 3)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_EV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.04", "Super Bus (I) (EV)", 4)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_IV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.05", "Super Bus (I) (IV)", 5)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_LuV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.06", "Super Bus (I) (LuV)", 6)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_ZPM + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.07", "Super Bus (I) (ZPM)", 7)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_UV + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.08", "Super Bus (I) (UV)", 8)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Input_MAX + .set(((IMetaTileEntity) makeInputBus(aStartID++, "hatch.superbus.input.tier.09", "Super Bus (I) (MAX)", 9)) + .getStackForm(1L)); + + /* + * Super Output Busses + */ + + GregtechItemList.Hatch_SuperBus_Output_ULV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.00", "Super Bus (O) (ULV)", 0)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_LV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.01", "Super Bus (O) (LV)", 1)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_MV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.02", "Super Bus (O) (MV)", 2)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_HV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.03", "Super Bus (O) (HV)", 3)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_EV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.04", "Super Bus (O) (EV)", 4)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_IV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.05", "Super Bus (O) (IV)", 5)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_LuV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.06", "Super Bus (O) (LuV)", 6)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_ZPM + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.07", "Super Bus (O) (ZPM)", 7)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_UV + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.08", "Super Bus (O) (UV)", 8)) + .getStackForm(1L)); + GregtechItemList.Hatch_SuperBus_Output_MAX + .set(((IMetaTileEntity) makeOutputBus(aStartID++, "hatch.superbus.output.tier.09", "Super Bus (O) (MAX)", 9)) + .getStackForm(1L)); + } + + private static GT_MetaTileEntity_SuperBus_Input makeInputBus(int id, String unlocalizedName, String localizedName, int tier) { + return new GT_MetaTileEntity_SuperBus_Input(id, unlocalizedName, localizedName, tier); + } + + private static GT_MetaTileEntity_SuperBus_Output makeOutputBus(int id, String unlocalizedName, String localizedName, int tier) { + return new GT_MetaTileEntity_SuperBus_Output(id, unlocalizedName, localizedName, tier); + } + + private static void run4() { + int aID = 31060; + //41, "hatch.energy.tier.01", "LV Energy Hatch", 1 + Constructor aRTG = ReflectionUtils.getConstructor(GT_MetaTileEntity_Hatch_Energy_RTG.class, new Class[]{int.class, String.class, String.class, int.class, int.class}); + Object aHatch1 = ReflectionUtils.createNewInstanceFromConstructor(aRTG, new Object[]{aID++, "hatch.energy.rtg.tier.01", "RTG Power Unit [LV]", 1, 9}); + Object aHatch2 = ReflectionUtils.createNewInstanceFromConstructor(aRTG, new Object[]{aID++, "hatch.energy.rtg.tier.02", "RTG Power Unit [MV]", 2, 9}); + Object aHatch3 = ReflectionUtils.createNewInstanceFromConstructor(aRTG, new Object[]{aID++, "hatch.energy.rtg.tier.03", "RTG Power Unit [HV]", 3, 9}); + + GregtechItemList.Hatch_RTG_LV.set(((IMetaTileEntity) aHatch1).getStackForm(1L)); + GregtechItemList.Hatch_RTG_MV.set(((IMetaTileEntity) aHatch2).getStackForm(1L)); + GregtechItemList.Hatch_RTG_HV.set(((IMetaTileEntity) aHatch3).getStackForm(1L)); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java new file mode 100644 index 0000000000..e095ed4cbe --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_Cyclotron; + +public class GregtechCyclotron { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering COMET Cyclotron."); + run1(); + } + } + + private static void run1() { + GregtechItemList.COMET_Cyclotron + .set(new GregtechMetaTileEntity_Cyclotron(828, "cyclotron.tier.single", "COMET - Compact Cyclotron", 6) + .getStackForm(1L)); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java new file mode 100644 index 0000000000..a8b5aea0e6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java @@ -0,0 +1,193 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Dehydrator; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialDehydrator; +import net.minecraft.item.ItemStack; + +public class GregtechDehydrator { + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Chemical Dehydrators."); + if (CORE.ConfigSwitches.enableMachine_Dehydrators) { + run1(); + } + } + + } + + private static void run1() { + + /* + * + * public GT_MetaTileEntity_BasicMachine_GT_Recipe( int aID, String + * aName, String aNameRegional, int aTier, String aDescription, + * GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int + * aTankCapacity, int aGUIParameterA, int aGUIParameterB, String + * aGUIName, String aSound, boolean aSharedTank, boolean + * aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, + * Object[] aRecipe) { + * + */ + + //Basic + GregtechItemList.GT_Dehydrator_MV + .set(new GT_MetaTileEntity_Dehydrator( + 911, + "machine.dehydrator.tier.00", + "Basic Dehydrator I", + 2, + "This dehydrates your Grapes into Raisins.", + 16000) + .getStackForm(1L)); + + GregtechItemList.GT_Dehydrator_HV + .set(new GT_MetaTileEntity_Dehydrator( + 912, + "machine.dehydrator.tier.01", + "Basic Dehydrator II", + 3, + "This dehydrates your Grapes into Raisins.", + 32000) + .getStackForm(1L)); + + + //Chemical + + GregtechItemList.GT_Dehydrator_EV + .set(new GT_MetaTileEntity_Dehydrator( + 813, + "advancedmachine.dehydrator.tier.01", + "Chemical Dehydrator I", + 4, + "A hangover is the way your body reacts to dehydration.", + 48000) + .getStackForm(1L)); + + GregtechItemList.GT_Dehydrator_IV + .set(new GT_MetaTileEntity_Dehydrator( + 814, + "advancedmachine.dehydrator.tier.02", + "Chemical Dehydrator II", + 5, + "A hangover is the way your body reacts to dehydration.", + 48000) + .getStackForm(1L)); + + GregtechItemList.GT_Dehydrator_LuV + .set(new GT_MetaTileEntity_Dehydrator( + 815, + "advancedmachine.dehydrator.tier.03", + "Chemical Dehydrator III", + 6, + "You could probably make space icecream with this..", + 64000) + .getStackForm(1L)); + + GregtechItemList.GT_Dehydrator_ZPM + .set(new GT_MetaTileEntity_Dehydrator( + 816, + "advancedmachine.dehydrator.tier.04", + "Chemical Dehydrator IV", + 7, + "You can definitely make space icecream with this..", + 64000) + .getStackForm(1L)); + + //Advanced + GregtechItemList.Controller_Vacuum_Furnace.set(new GregtechMetaTileEntity_IndustrialDehydrator(995, "multimachine.adv.vacuumfurnace", "Utupu-Tanuri").getStackForm(1L)); + + + ItemStack coilWire1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire", "coilWire1", 0, + 4); + ItemStack coilWire2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:1", "coilWire2", 1, + 4); + ItemStack coilWire3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:2", "coilWire3", 2, + 4); + ItemStack coilWire4 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire:3", "coilWire4", 3, + 4); + ItemStack coilT1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil", "coil1", 0, 1); + ItemStack coilT2 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil:1", "coil2", 1, 1); + ItemStack coilT3 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil:2", "coil3", 2, 1); + ItemStack coilT4 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoil:3", "coil4", 3, 1); + ItemStack spoolT1 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumBronze", 1); + ItemStack spoolT2 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumSteel", 1); + ItemStack spoolT3 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumStainlessSteel", 1); + ItemStack spoolT4 = ItemUtils.getItemStackOfAmountFromOreDict("pipeMediumTitanium", 1); + + // Make some coils by wrapping wire around a spool. + GT_Values.RA.addAssemblerRecipe(coilWire1, spoolT1, coilT1, 8 * 20, 120); + GT_Values.RA.addAssemblerRecipe(coilWire2, spoolT2, coilT2, 8 * 20, 240); + GT_Values.RA.addAssemblerRecipe(coilWire3, spoolT3, coilT3, 8 * 20, 480); + GT_Values.RA.addAssemblerRecipe(coilWire4, spoolT4, coilT4, 8 * 20, 960); + + // Add recipes for the Dehydrators. + + //Basic + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_MV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('P'), + ItemList.Robot_Arm_MV, Character.valueOf('E'), OrePrefixes.wireFine.get(Materials.RedAlloy), Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Copper), Character.valueOf('G'), + OrePrefixes.gearGt.get(Materials.Steel) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_HV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('P'), + ItemList.Robot_Arm_HV, Character.valueOf('E'), OrePrefixes.wireFine.get(Materials.Electrum), Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Silver), Character.valueOf('G'), + ALLOY.POTIN.getGear(1) }); + + //Chemical + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_EV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), + ItemList.Robot_Arm_EV, Character.valueOf('E'), coilT1, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Data), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Aluminium), Character.valueOf('G'), + ALLOY.TUMBAGA.getGear(1) }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_IV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), + ItemList.Robot_Arm_IV, Character.valueOf('E'), coilT2, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Tungsten), Character.valueOf('G'), + ALLOY.INCONEL_690.getGear(1) }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_LuV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), + CI.robotArm_LuV, Character.valueOf('E'), coilT3, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Master), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Naquadah), Character.valueOf('G'), + ALLOY.HASTELLOY_N.getGear(1) }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Dehydrator_ZPM.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "ECE", "WMW", "GPG", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('P'), + CI.robotArm_ZPM, Character.valueOf('E'), coilT4, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Osmium), Character.valueOf('G'), + ALLOY.ZERON_100.getGear(1) }); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java new file mode 100644 index 0000000000..e82fade029 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java @@ -0,0 +1,94 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechOreDictNames; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_RfConvertor; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative.GregtechMetaCreativeEnergyBuffer; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer; + +public class GregtechEnergyBuffer +{ + + //Misc Items + //public static Item itemBufferCore; + + public static void run() + { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech){ + Logger.INFO("Gregtech5u Content | Registering Energy Buffer Blocks."); + run1(); + } + } + + private static void run1() + { + + //itemBufferCore = new Item().setUnlocalizedName("itemBufferCore").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemBufferCore"); + + //Registry + //GameRegistry.registerItem(itemBufferCore, "itemBufferCore"); + //LanguageRegistry.addName(itemBufferCore, "Buffer Core"); + //OreDictionary.registerOre("itemBufferCore", itemBufferCore); + + + //Energy Buffers + GregtechItemList.Energy_Buffer_1by1_ULV.set(new GregtechMetaEnergyBuffer(770, "energybuffer.tier.00", "Ultra Low Voltage Energy Buffer", 0, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_LV.set(new GregtechMetaEnergyBuffer(771, "energybuffer.tier.01", "Low Voltage Energy Buffer", 1, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_MV.set(new GregtechMetaEnergyBuffer(772, "energybuffer.tier.02", "Medium Voltage Energy Buffer", 2, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_HV.set(new GregtechMetaEnergyBuffer(773, "energybuffer.tier.03", "High Voltage Energy Buffer", 3, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_EV.set(new GregtechMetaEnergyBuffer(774, "energybuffer.tier.04", "Extreme Voltage Energy Buffer", 4, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_IV.set(new GregtechMetaEnergyBuffer(775, "energybuffer.tier.05", "Insane Voltage Energy Buffer", 5, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_LuV.set(new GregtechMetaEnergyBuffer(776, "energybuffer.tier.06", "Ludicrous Voltage Energy Buffer", 6, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_ZPM.set(new GregtechMetaEnergyBuffer(777, "energybuffer.tier.07", "ZPM Voltage Energy Buffer", 7, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_UV.set(new GregtechMetaEnergyBuffer(778, "energybuffer.tier.08", "Ultimate Voltage Energy Buffer", 8, "", 1).getStackForm(1L)); + GregtechItemList.Energy_Buffer_1by1_MAX.set(new GregtechMetaEnergyBuffer(779, "energybuffer.tier.09", "MAX Voltage Energy Buffer", 9, "", 1).getStackForm(1L)); + // Creative Buffer Has Special ID + GregtechItemList.Energy_Buffer_CREATIVE + .set(new GregtechMetaCreativeEnergyBuffer(750, + "energybuffer.tier.xx", + "512V Creative Energy Buffer", 3, "", 0) + .getStackForm(1L)); + + if (LoadedMods.CoFHCore && CORE.ConfigSwitches.enableMachine_RF_Convetor) { + // RF Convertor Buffer Has Special ID + GregtechItemList.Energy_Buffer_RF_Convertor + .set(new GT_MetaTileEntity_RfConvertor(31022, + "energybuffer.rf.tier.01", + "RF Energy Convertor", 3, "", 0) + .getStackForm(1L)); + } + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_ULV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Lead), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Tin), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.AnyCopper), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Gold), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Aluminium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Tungsten), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_LuV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_ZPM.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_UV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Energy_Buffer_1by1_MAX.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MAX, Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Superconductor), Character.valueOf('T'), GregtechOreDictNames.buffer_core }); + /*GT_ModHandler.addCraftingRecipe( + GregtechItemList.Energy_Buffer_1by1_MAX.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE + | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE + | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { + "WTW", "WMW", Character.valueOf('M'), + ItemList.Hull_MAX, Character.valueOf('W'), + OrePrefixes.wireGt08.get(Materials.Superconductor), + Character.valueOf('T'), GregtechOreDictNames.buffer_core });*/ + + + + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java new file mode 100644 index 0000000000..8340b7088c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java @@ -0,0 +1,35 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialVacuumFreezer; +//import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_AssemblyLine; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_DistillationTower; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_EBF; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Fusion_MK4; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Implosion; + +public class GregtechFactoryGradeReplacementMultis { + + public static void run() { + run1(); + } + + private static void run1() { + Logger.INFO("Gregtech 5 Content | Registering Advanced GT Multiblock replacements."); + GregtechItemList.Machine_Adv_BlastFurnace.set(new GregtechMetaTileEntity_Adv_EBF(963, "multimachine.adv.blastfurnace", "Volcanus").getStackForm(1L)); + GregtechItemList.Machine_Adv_ImplosionCompressor.set(new GregtechMetaTileEntity_Adv_Implosion(964, "multimachine.adv.implosioncompressor", "Density^2").getStackForm(1L)); + GregtechItemList.Industrial_Cryogenic_Freezer.set(new GregtechMetaTileEntity_IndustrialVacuumFreezer(910, "multimachine.adv.industrialfreezer", "Cryogenic Freezer").getStackForm(1L)); + GregtechItemList.FusionComputer_UV2.set(new GregtechMetaTileEntity_Adv_Fusion_MK4(965, "fusioncomputer.tier.09", "FusionTech MK IV").getStackForm(1L)); + + + //31021 + GregtechItemList.Machine_Adv_DistillationTower.set(new GregtechMetaTileEntity_Adv_DistillationTower(31021, "multimachine.adv.distillationtower", "Dangote Distillus").getStackForm(1L)); + /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + GregtechItemList.Machine_Adv_AssemblyLine.set(new GregtechMetaTileEntity_Adv_AssemblyLine(31024, "multimachine.adv.assemblyline", "Compound Fabricator").getStackForm(1L)); + }*/ + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java new file mode 100644 index 0000000000..86146640fd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFluidReactor.java @@ -0,0 +1,25 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ChemicalReactor; + +public class GregtechFluidReactor { + + public static void run() { + + /* + * GregtechItemList.FluidReactor_LV .set(new + * GregtechMetaTileEntity_ChemicalReactor(31021, "chemicalplant.01.tier.01", + * "Chemical Plant I", 1) .getStackForm(1L)); GregtechItemList.FluidReactor_HV + * .set(new GregtechMetaTileEntity_ChemicalReactor(31022, + * "chemicalplant.01.tier.02", "Chemical Plant II", 3) .getStackForm(1L)); + * GregtechItemList.FluidReactor_IV .set(new + * GregtechMetaTileEntity_ChemicalReactor(31023, "chemicalplant.01.tier.03", + * "Chemical Plant III", 5) .getStackForm(1L)); + * GregtechItemList.FluidReactor_ZPM .set(new + * GregtechMetaTileEntity_ChemicalReactor(31024, "chemicalplant.01.tier.04", + * "Chemical Plant IV", 7) .getStackForm(1L)); + */ + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV new file mode 100644 index 0000000000..d063d85b1f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV @@ -0,0 +1,15 @@ + + +public class GregtechGeneratorsULV { + public static void run(){ + + GregtechItemList.Generator_Diesel_ULV.set(new GT_MetaTileEntity_ULV_CombustionGenerator(960, "basicgenerator.diesel.tier.00", "Simple Combustion Generator", 0).getStackForm(1L)); + GregtechItemList.Generator_Gas_Turbine_ULV.set(new GT_MetaTileEntity_ULV_GasTurbine(961, "basicgenerator.gas.tier.00", "Simple Gas Turbine", 0).getStackForm(1L)); + GregtechItemList.Generator_Steam_Turbine_ULV.set(new GT_MetaTileEntity_ULV_SteamTurbine(962, "basicgenerator.steam.tier.00", "Simple Steam Turbine", 0).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Diesel_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_ULV, 'P', GregtechItemList.Electric_Piston_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'G', OrePrefixes.gearGt.get(Materials.Bronze)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Gas_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"CRC", "RMR", aTextMotorWire, 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Steam_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "RMR", aTextMotorWire, 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.pipeMedium.get(Materials.Copper)}); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java new file mode 100644 index 0000000000..1663c9ada4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeneratorsULV.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV.GT_MetaTileEntity_ULV_CombustionGenerator; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV.GT_MetaTileEntity_ULV_GasTurbine; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV.GT_MetaTileEntity_ULV_SteamTurbine; + +import static gtPlusPlus.core.recipe.common.CI.bitsd; + +public class GregtechGeneratorsULV { + public static void run(){ + + GregtechItemList.Generator_Diesel_ULV.set(new GT_MetaTileEntity_ULV_CombustionGenerator(960, "basicgenerator.diesel.tier.00", "Simple Combustion Generator", 0).getStackForm(1L)); + GregtechItemList.Generator_Gas_Turbine_ULV.set(new GT_MetaTileEntity_ULV_GasTurbine(961, "basicgenerator.gas.tier.00", "Simple Gas Turbine", 0).getStackForm(1L)); + GregtechItemList.Generator_Steam_Turbine_ULV.set(new GT_MetaTileEntity_ULV_SteamTurbine(962, "basicgenerator.steam.tier.00", "Simple Steam Turbine", 0).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Diesel_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_ULV, 'P', GregtechItemList.Electric_Piston_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'G', OrePrefixes.gearGt.get(Materials.Bronze)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Gas_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"CRC", "RMR", "EWE", 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Generator_Steam_Turbine_ULV.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "RMR", "EWE", 'M', ItemList.Hull_ULV, 'E', GregtechItemList.Electric_Motor_ULV, 'R', OrePrefixes.rotor.get(Materials.Tin), 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.pipeMedium.get(Materials.Copper)}); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java new file mode 100644 index 0000000000..2e7e96dd2f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java @@ -0,0 +1,68 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityGeothermalGenerator; + +public class GregtechGeothermalThermalGenerator { + + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Geothermal Engines."); + if (CORE.ConfigSwitches.enableMachine_GeothermalEngines) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Geothermal_Engine_EV.set(new GregtechMetaTileEntityGeothermalGenerator(830, + "advancedgenerator.geothermalFuel.tier.01", "Basic Geothermal Engine", 4).getStackForm(1L)); + GregtechItemList.Geothermal_Engine_IV.set(new GregtechMetaTileEntityGeothermalGenerator(831, + "advancedgenerator.geothermalFuel.tier.02", "Turbo Geothermal Engine", 5).getStackForm(1L)); + GregtechItemList.Geothermal_Engine_LuV.set(new GregtechMetaTileEntityGeothermalGenerator(832, + "advancedgenerator.geothermalFuel.tier.03", "Vulcan Geothermal Engine", 6).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_EV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), + ItemList.Electric_Piston_EV, Character.valueOf('E'), ItemList.Electric_Motor_EV, + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Aluminium), Character.valueOf('G'), + ALLOY.TANTALLOY_61.getGear(1) }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_IV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), + ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Superconductor), + Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Platinum), Character.valueOf('G'), + ALLOY.STELLITE.getGear(1) }); + + final ItemStack INGREDIENT_1 = CI.electricPiston_LuV; + final ItemStack INGREDIENT_2 = CI.electricMotor_LuV; + GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_LuV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CEC", "GMG", "PWP", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), + INGREDIENT_1, Character.valueOf('E'), INGREDIENT_2, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Infinite), Character.valueOf('W'), + OrePrefixes.cableGt04.get(Materials.Tungsten), Character.valueOf('G'), + ALLOY.ZERON_100.getGear(1) }); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java new file mode 100644 index 0000000000..a69c91e93b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java @@ -0,0 +1,158 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import static gtPlusPlus.core.lib.CORE.GTNH; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTransformerHiAmp; +import gtPlusPlus.xmod.gregtech.common.StaticFields59; +import net.minecraft.item.ItemStack; + +public class GregtechHiAmpTransformer { + + + public static void run(){ + + long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + int mID = 877; + + String mHammerName = "Hammer"; + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + mHammerName = "Mallet"; + } + + GregtechItemList.Transformer_HA_LV_ULV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.00", + "ULV Hi-Amp Transformer", 0, "LV -> ULV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_MV_LV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.01", + "LV Hi-Amp Transformer", 1, "MV -> LV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_HV_MV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.02", + "MV Hi-Amp Transformer", 2, "HV -> MV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_EV_HV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.03", + "HV Hi-Amp Transformer", 3, "EV -> HV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_IV_EV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.04", + "EV Hi-Amp Transformer", 4, "IV -> EV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_LuV_IV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.05", + "IV Hi-Amp Transformer", 5, "LuV -> IV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_ZPM_LuV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.06", + "LuV Hi-Amp Transformer", 6, "ZPM -> LuV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + GregtechItemList.Transformer_HA_UV_ZPM.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.07", + "ZPM Hi-Amp Transformer", 7, "UV -> ZPM (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + if (!GTNH) { + GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", + "UV Hi-Amp Transformer", 8, "Any Voltage -> UV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + } else { + GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", + "UV Hi-Amp Transformer", 8, "UHV -> UV (Use Soft "+mHammerName+" to invert)").getStackForm(1L)); + } + ItemStack mItem_1; + ItemStack mItem_2; + ItemStack mItem_3; + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + mItem_1 = ItemUtils.simpleMetaStack(ItemUtils.getSimpleStack(StaticFields59.getBlockCasings5()).getItem(), 3, 1); + mItem_2 = ItemUtils.simpleMetaStack(ItemUtils.getSimpleStack(StaticFields59.getBlockCasings5()).getItem(), 4, 1); + mItem_3 = ItemUtils.simpleMetaStack(ItemUtils.getSimpleStack(StaticFields59.getBlockCasings5()).getItem(), 5, 1); + } + else { + mItem_1 = ItemList.Circuit_Elite.get(1); + mItem_2 = ItemList.Circuit_Master.get(1); + mItem_3 = ItemList.Circuit_Ultimate.get(1); + } + + if(!GTNH){ + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Lead) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Copper), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tin) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.AnnealedCopper) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), + ItemList.Casing_Coil_Cupronickel }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), + ItemList.Casing_Coil_Kanthal }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), + ItemList.Casing_Coil_Nichrome }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), + mItem_1 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('C'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), + mItem_2 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('C'), + OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), + mItem_3 }); + }else{ + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_LV_ULV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Lead) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_MV_LV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.AnyCopper), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tin) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_HV_MV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.AnyCopper) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_EV_HV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), + ItemList.Casing_Coil_Cupronickel }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_IV_EV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), + ItemList.Casing_Coil_Kanthal }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_LuV_IV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), + ItemList.Casing_Coil_Nichrome }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_ZPM_LuV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), + mItem_1 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_UV_ZPM, Character.valueOf('C'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), + mItem_2 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_MAX_UV, Character.valueOf('C'), + OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), + mItem_3 }); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java new file mode 100644 index 0000000000..6587e3a253 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialAlloySmelter.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialAlloySmelter; + +public class GregtechIndustrialAlloySmelter { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Alloy Smelter Multiblock."); + run1(); + } + + } + + private static void run1() { + GregtechItemList.Industrial_AlloySmelter.set(new GregtechMetaTileEntity_IndustrialAlloySmelter(31023, + "industrialalloysmelter.controller.tier.single", "Zyngen").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java new file mode 100644 index 0000000000..fb8f69e865 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialArcFurnace; + +public class GregtechIndustrialArcFurnace { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Arc Furnace Multiblock."); + run1(); + } + + } + + private static void run1() { + // Industrial Arc Furnace Multiblock + GregtechItemList.Industrial_Arc_Furnace.set(new GregtechMetaTileEntity_IndustrialArcFurnace(862, "industrialarcfurnace.controller.tier.single", "High Current Industrial Arc Furnace").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java new file mode 100644 index 0000000000..15c2d9b238 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_AlloyBlastSmelter; + +public class GregtechIndustrialBlastSmelter { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Alloy Blast Smelter Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_AlloyBlastSmelter) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Alloy Blast Smelter Multiblock + GregtechItemList.Industrial_AlloyBlastSmelter.set(new GregtechMetaTileEntity_AlloyBlastSmelter(810, + "industrialsalloyamelter.controller.tier.single", "Alloy Blast Smelter").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java new file mode 100644 index 0000000000..dfbe7304ef --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; + +public class GregtechIndustrialCentrifuge { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Centrifuge Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCentrifuge) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Centrifuge Multiblock + GregtechItemList.Industrial_Centrifuge.set(new GregtechMetaTileEntity_IndustrialCentrifuge(790, + "industrialcentrifuge.controller.tier.single", "Industrial Centrifuge").getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java new file mode 100644 index 0000000000..7afc73709a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCokeOven; + +public class GregtechIndustrialCokeOven { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Coke Oven Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Centrifuge Multiblock + GregtechItemList.Industrial_CokeOven.set(new GregtechMetaTileEntity_IndustrialCokeOven(791, + "industrialcokeoven.controller.tier.single", "Industrial Coke Oven").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java new file mode 100644 index 0000000000..f6133f6bf3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java @@ -0,0 +1,25 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCuttingMachine; + +public class GregtechIndustrialCuttingFactory { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Cutting Factory Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCuttingMachine) { + run1(); + } + } + } + + private static void run1() { + // Industrial Wire Factory Multiblock + GregtechItemList.Industrial_CuttingFactoryController.set(new GregtechMetaTileEntity_IndustrialCuttingMachine(992, + "industrialcuttingmachine.controller.tier.01", "Cutting Factory Controller").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java new file mode 100644 index 0000000000..10d7510625 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialElectrolyzer; + +public class GregtechIndustrialElectrolyzer { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Electrolyzer Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialElectrolyzer) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Electrolyzer Multiblock + GregtechItemList.Industrial_Electrolyzer.set(new GregtechMetaTileEntity_IndustrialElectrolyzer(796, + "industrialelectrolyzer.controller.tier.single", "Industrial Electrolyzer").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java new file mode 100644 index 0000000000..9e940dff26 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java @@ -0,0 +1,20 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_ElementalDuplicator; + +public class GregtechIndustrialElementDuplicator { + + public static void run(){ + + Logger.INFO("Gregtech5u Content | Registering Elemental Duplicator Multiblock."); + + GregtechItemList.Controller_ElementalDuplicator.set(new GregtechMTE_ElementalDuplicator(31050, "gtpp.multimachine.replicator", "Elemental Duplicator").getStackForm(1L)); + GregtechItemList.Hatch_Input_Elemental_Duplicator.set(new GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(31051, "hatch.input_bus.elementalorbholder", "Elemental Data Orb Storage", 7).getStackForm(1L)); + + } + +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java new file mode 100644 index 0000000000..51b2f4b0d5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialExtruder; + +public class GregtechIndustrialExtruder { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Extrusion Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialExtrudingMachine) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Presser Multiblock + GregtechItemList.Industrial_Extruder.set(new GregtechMetaTileEntity_IndustrialExtruder(859, + "industrialextruder.controller.tier.single", "Industrial Extrusion Machine").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java new file mode 100644 index 0000000000..681256a385 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_IndustrialFishingPond; + +public class GregtechIndustrialFishPond { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Fishing Pond Multiblock."); + //if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant) { + run1(); + //} + } + + } + + private static void run1() { + GregtechItemList.Industrial_FishingPond.set(new GregtechMetaTileEntity_IndustrialFishingPond(829, + "industrial.fishpond.controller.tier.single", "Zhuhai - Fishing Port").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java new file mode 100644 index 0000000000..0b6dcb1b94 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_Refinery; + +public class GregtechIndustrialFuelRefinery { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Fuel Processing and Refinery Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_NuclearFuelRefinery) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Maceration Stack Multiblock + GregtechItemList.Industrial_FuelRefinery.set(new GregtechMetaTileEntity_Refinery(835, + "industrialrefinery.controller.tier.single", "Reactor Fuel Processing Plant").getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java new file mode 100644 index 0000000000..9bdcf231d0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityGeneratorArray; + +public class GregtechIndustrialGeneratorArray { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Generator Array Multiblock."); + //if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter) { // TODO + run1(); + //} + } + + } + + private static void run1() { + // Industrial Maceration Stack Multiblock + GregtechItemList.Generator_Array_Controller.set(new GregtechMetaTileEntityGeneratorArray( + 990, + "generatorarray.controller.tier.01", + "Large Generator Array").getStackForm(1L)); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java new file mode 100644 index 0000000000..c67296fc53 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialMacerator; + +public class GregtechIndustrialMacerator { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Maceration Stack Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialMacerationStack) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Maceration Stack Multiblock + GregtechItemList.Industrial_MacerationStack.set(new GregtechMetaTileEntity_IndustrialMacerator(797, + "industrialmacerator.controller.tier.single", "Maceration Stack Controller").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java new file mode 100644 index 0000000000..f07be17ffd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java @@ -0,0 +1,230 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_MassFabricator; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechIndustrialMassFabricator { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Matter Fabricator Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_MatterFabricator) { + generateRecipes(); + run1(); + } + } + + } + + private static void run1() { + // Industrial Matter Fabricator Multiblock + GregtechItemList.Industrial_MassFab.set(new GregtechMetaTileEntity_MassFabricator(799, + "industrialmassfab.controller.tier.single", "Matter Fabrication CPU").getStackForm(1L)); + } + + private static void generateRecipes() { + + //Generate Scrap->UUA Recipes + + + + //Basic UUA1 + GT_Recipe UUA_From_Scrap = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(9), ItemUtils.getSimpleStack(getScrapPile(), 9)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + 9*20, + 32, + 0); + //Basic UUA2 + GT_Recipe UUA_From_ScrapBoxes = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(19), ItemUtils.getSimpleStack(getScrapBox(), 1)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + 9*20, + 32, + 0); + + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(UUA_From_Scrap); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(UUA_From_ScrapBoxes); + + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + //Basic UUM + GT_Recipe generateUUM = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(1)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 160*20, + 32, + 0); + + //Basic UUM + GT_Recipe generateUUMFromUUA = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(2)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 40*20, + 32, + 0); + + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA); + } + else { + + //Basic UUM + GT_Recipe generateUUM_LV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(15)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 160*20, + 256, + 0); + GT_Recipe generateUUM_MV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(14)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 160*20, + 512, + 0); + GT_Recipe generateUUM_HV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(13)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 160*20, + 1024, + 0); + GT_Recipe generateUUM_EV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(12)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 160*20, + 2048, + 0); + GT_Recipe generateUUM_IV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(11)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {GT_Values.NF}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 160*20, + 4096, + 0); + + //Basic UUM + GT_Recipe generateUUMFromUUA_LV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(5)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 40*20, + 256, + 0); + GT_Recipe generateUUMFromUUA_MV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(4)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 40*20, + 512, + 0); + GT_Recipe generateUUMFromUUA_HV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(3)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 40*20, + 1024, + 0); + GT_Recipe generateUUMFromUUA_EV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(2)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 40*20, + 2048, + 0); + GT_Recipe generateUUMFromUUA_IV = new GTPP_Recipe( + false, + new ItemStack[] {CI.getNumberedCircuit(1)}, + new ItemStack[] {GT_Values.NI}, + null, null, + new FluidStack[] {Materials.UUAmplifier.getFluid(1)}, + new FluidStack[] {Materials.UUMatter.getFluid(1)}, + 40*20, + 4096, + 0); + + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_LV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_MV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_HV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_EV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUM_IV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_LV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_MV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_HV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_EV); + GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.add(generateUUMFromUUA_IV); + + } + + Logger.INFO("Generated "+GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.mRecipeList.size()+" Matter Fabricator recipes."); + + + + + } + + + + public static ItemStack getScrapPile() { + return ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrap")); + } + public static ItemStack getScrapBox() { + return ItemUtils.getSimpleStack(ItemUtils.getItemFromFQRN("IC2:itemScrapbox")); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java new file mode 100644 index 0000000000..9c8673682c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMixer.java @@ -0,0 +1,27 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialMixer; + +public class GregtechIndustrialMixer { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Mixer Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Mixer Multiblock + GregtechItemList.Industrial_Mixer.set(new GregtechMetaTileEntity_IndustrialMixer(811, + "industrialmixer.controller.tier.single", "Industrial Mixing Machine").getStackForm(1L)); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java new file mode 100644 index 0000000000..40d6c12f0b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiMachine.java @@ -0,0 +1,25 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialMultiMachine; + +public class GregtechIndustrialMultiMachine { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Multi-Machine Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialMultiMachine) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Industrial_MultiMachine.set(new GregtechMetaTileEntity_IndustrialMultiMachine(860, + "industrialmultimachine.controller.tier.single", "Large Processing Factory").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java new file mode 100644 index 0000000000..1d723784ac --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java @@ -0,0 +1,32 @@ +/* +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_MultiTank; + +public class GregtechIndustrialMultiTank { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Multitank controller blocks."); + if (CORE.ConfigSwitches.enableMultiblock_MultiTank) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Industrial_MultiTank + .set(new GregtechMetaTileEntity_MultiTank(827, "multitank.controller.tier.single", "Gregtech Multitank") + .getStackForm(1L)); + // GregtechItemList.Industrial_MultiTankDense.set(new + // GregtechMetaTileEntityMultiTankDense(828, + // "multitankdense.controller.tier.single", "Gregtech Dense + // Multitank").getStackForm(1L)); + + } +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java new file mode 100644 index 0000000000..ecf1e73675 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialPlatePress; + +public class GregtechIndustrialPlatePress { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Press Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Presser Multiblock + GregtechItemList.Industrial_PlatePress.set(new GregtechMetaTileEntity_IndustrialPlatePress(792, + "industrialbender.controller.tier.single", "Industrial Material Press").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java new file mode 100644 index 0000000000..15bf42c9d4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialSifter; + +public class GregtechIndustrialSifter { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Sifter Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter) { // TODO + run1(); + } + } + + } + + private static void run1() { + // Industrial Maceration Stack Multiblock + GregtechItemList.Industrial_Sifter.set(new GregtechMetaTileEntity_IndustrialSifter(840, + "industrialsifter.controller.tier.single", "Large Sifter Control Block").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java new file mode 100644 index 0000000000..01c04b4668 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java @@ -0,0 +1,25 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialThermalCentrifuge; + +public class GregtechIndustrialThermalCentrifuge { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Thermal Centrifuge Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialThermalCentrifuge) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Industrial_ThermalCentrifuge.set(new GregtechMetaTileEntity_IndustrialThermalCentrifuge(849, + "industrialthermalcentrifuge.controller.tier.single", "Large Thermal Refinery").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java new file mode 100644 index 0000000000..47dd3c265f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java @@ -0,0 +1,28 @@ + +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityTreeFarm; + +public class GregtechIndustrialTreeFarm { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Tree Farm Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer) { + run1(); + } + } + + } + + private static void run1() { + // Industrial Maceration Stack Multiblock + GregtechItemList.Industrial_TreeFarm + .set(new GregtechMetaTileEntityTreeFarm(836, "treefarm.controller.tier.single", "Tree Growth Simulator") + .getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java new file mode 100644 index 0000000000..f66ebca60e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java @@ -0,0 +1,25 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialWashPlant; + +public class GregtechIndustrialWashPlant { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Wash Plant Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Industrial_WashPlant.set(new GregtechMetaTileEntity_IndustrialWashPlant(850, + "industrialwashplant.controller.tier.single", "Ore Washing Plant").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java new file mode 100644 index 0000000000..6d575991bd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java @@ -0,0 +1,25 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialWireMill; + +public class GregtechIndustrialWiremill { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Wire Factory Multiblock."); + if (CORE.ConfigSwitches.enableMultiblock_IndustrialWireMill) { + run1(); + } + } + } + + private static void run1() { + // Industrial Wire Factory Multiblock + GregtechItemList.Industrial_WireFactory.set(new GregtechMetaTileEntity_IndustrialWireMill(798, + "industrialwiremill.controller.tier.single", "Wire Factory Controller").getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java new file mode 100644 index 0000000000..1bcd0f3300 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java @@ -0,0 +1,24 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IronBlastFurnace; + +public class GregtechIronBlastFurnace { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Iron Blast Furnace."); + if (CORE.ConfigSwitches.enableMultiblock_IronBlastFurnace) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Machine_Iron_BlastFurnace.set(new GregtechMetaTileEntity_IronBlastFurnace(768, + "ironmachine.blastfurnace", "Iron Plated Blast Furnace").getStackForm(1L)); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java new file mode 100644 index 0000000000..19c361be93 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIsaMill.java @@ -0,0 +1,23 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_MillingBalls; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IsaMill; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_FrothFlotationCell; + +public class GregtechIsaMill { + + public static void run(){ + + Logger.INFO("Gregtech5u Content | Registering Milling Content."); + + GregtechItemList.Controller_IsaMill.set(new GregtechMetaTileEntity_IsaMill(31027, "gtpp.multimachine.isamill", "IsaMill Grinding Machine").getStackForm(1L)); + GregtechItemList.Controller_Flotation_Cell.set(new GregtechMTE_FrothFlotationCell(31028, "gtpp.multimachine.flotationcell", "Flotation Cell Regulator").getStackForm(1L)); + + // Milling Ball Bus + GregtechItemList.Bus_Milling_Balls.set((new GT_MetaTileEntity_Hatch_MillingBalls(31029, "hatch.milling", "Ball Housing")).getStackForm(1L)); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java new file mode 100644 index 0000000000..cef60ba712 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ReactorColdTrap; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ReactorProcessingUnit; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_SpargeTower; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_NuclearReactor; + +public class GregtechLFTR { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Liquid Fluorine Thorium Reactor [LFTR]."); + if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor) { + run1(); + } + } + + } + + private static void run1() { + // LFTR + GregtechItemList.ThoriumReactor.set(new GregtechMTE_NuclearReactor(751, "lftr.controller.single", "Thorium Reactor [LFTR]").getStackForm(1L)); + // Reactor Processing Units + GregtechItemList.ReactorProcessingUnit_IV.set(new GregtechMetaTileEntity_ReactorProcessingUnit(31031, "rpu.tier.01", "Reactor Processing Unit I", 5).getStackForm(1L)); + GregtechItemList.ReactorProcessingUnit_ZPM.set(new GregtechMetaTileEntity_ReactorProcessingUnit(31032, "rpu.tier.02", "Reactor Processing Unit II", 7).getStackForm(1L)); + // Cold Traps + GregtechItemList.ColdTrap_IV.set(new GregtechMetaTileEntity_ReactorColdTrap(31033, "coldtrap.tier.01", "Cold Trap I", 5).getStackForm(1L)); + GregtechItemList.ColdTrap_ZPM.set(new GregtechMetaTileEntity_ReactorColdTrap(31034, "coldtrap.tier.02", "Cold Trap II", 7).getStackForm(1L)); + // Sparge Tower + GregtechItemList.Controller_Sparge_Tower.set(new GregtechMetaTileEntity_SpargeTower(31035, "sparge.controller.single", "Sparge Tower Controller").getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java new file mode 100644 index 0000000000..9b9f5fd59b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +public class GregtechLargeTurbinesAndHeatExchanger { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Larger Turbines & Extra Large Heat Exchanger."); + run1(); + } + + } + + private static void run1() { + /* GregtechItemList.Large_Steam_Turbine.set(new GT_MTE_LargeTurbine_Steam(865, "multimachine.largerturbine", "XL Turbo Steam Turbine").getStackForm(1L)); + GregtechItemList.Large_HPSteam_Turbine.set(new GT_MTE_LargeTurbine_SHSteam(866, "multimachine.largerhpturbine", "XL Turbo HP Steam Turbine").getStackForm(1L)); + GregtechItemList.Hatch_Turbine_Rotor.set(new GT_MetaTileEntity_Hatch_Turbine(30010, "hatch.turbine", "Rotor Assembly", 8).getStackForm(1L)); + */ + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java new file mode 100644 index 0000000000..aea40c564c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java @@ -0,0 +1,45 @@ +/* +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTPP_Recipe; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Plasma; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_MiniFusionPlant; + +public class GregtechMiniRaFusion { + + public static void run() { + // Register the Simple Fusion Entity. + GregtechItemList.Miniature_Fusion.set(new GregtechMTE_MiniFusionPlant(31015, "gtplusplus.fusion.single", "Helium Prime").getStackForm(1L)); + GregtechItemList.Plasma_Tank.set(new GT_MetaTileEntity_Hatch_Plasma(31016, "gtplusplus.tank.plasma", "Plasma Tank").getStackForm(1L)); + + } + + public static boolean generateSlowFusionrecipes() { + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList){ + if (x.mEnabled) { + GT_Recipe y = x.copy(); + y.mDuration *= 16; + long z = y.mEUt * 4; + if (z > Integer.MAX_VALUE) { + y.mEnabled = false; + continue; + } + y.mEUt = (int) Math.min(Math.max(0, z), Integer.MAX_VALUE); + y.mCanBeBuffered = true; + GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes.add(y); + } + } + int mRecipeCount = GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes.mRecipeList.size(); + if (mRecipeCount > 0) { + Logger.INFO("[Pocket Fusion] Generated "+mRecipeCount+" recipes for the Pocket Fusion Reactor."); + return true; + } + return false; + } + + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java new file mode 100644 index 0000000000..e2c63c77da --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNaqReactor.java @@ -0,0 +1,24 @@ +/* +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_LargeNaqReactor; + +public class GregtechNaqReactor { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Futuristic Naquadah Reactor {LNR]."); + run1(); + } + + } + + private static void run1() { + // LFTR + GregtechItemList.Controller_Naq_Reactor.set(new GregtechMTE_LargeNaqReactor(970, "lnr.controller.single", "Naquadah Reactor Mark XII").getStackForm(1L)); + + } +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java new file mode 100644 index 0000000000..6095413150 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java @@ -0,0 +1,182 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import net.minecraft.item.ItemStack; + +import gregtech.GT_Mod; +import gregtech.api.enums.*; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechNitroDieselFix { + + @SuppressWarnings("unchecked") + public static void run(){ + if (CORE.ConfigSwitches.enableNitroFix){ + Logger.INFO("Gregtech5u Content | Attempting to Fix Nitro-Diesel production."); + try { + int mSub = Utils.getGregtechSubVersion(); + if (mSub != 0){ + if (mSub >= 30){ + Class mb = ReflectionUtils.getClass("gregtech.api.enums.MaterialBuilder"); + Object df = mb.getConstructor(int.class, TextureSet.class, String.class).newInstance(975, TextureSet.SET_FLUID, "Nitro-Diesel [Old]"); + if (mb.isInstance(df)){ + + Logger.INFO("[Nitro] Created new instance of Material builder, for Nitro fix."); + + //Get Methods + Method addFluid = mb.getDeclaredMethod("addFluid"); + Method addCell = mb.getDeclaredMethod("addCell"); + Method setColour = mb.getDeclaredMethod("setColor", Dyes.class); + Method setFuelPower = mb.getDeclaredMethod("setFuelPower", int.class); + Method setMaterials = mb.getDeclaredMethod("setMaterialList", List.class); + Method setTemp = mb.getDeclaredMethod("setLiquidTemperature", int.class); + Method setRGB = mb.getDeclaredMethod("setRGB", int.class, int.class, int.class); + Method construct = mb.getDeclaredMethod("constructMaterial"); + Logger.INFO("[Nitro] Got internal methods for setting fields."); + + //Invoke the methods + addFluid.invoke(df); + addCell.invoke(df); + setColour.invoke(df, Dyes.dyeLime); + setFuelPower.invoke(df, 512000); + setMaterials.invoke(df, Arrays.asList(new MaterialStack(Materials.Glyceryl, 1), new MaterialStack(Materials.Fuel, 4))); + setTemp.invoke(df, 295); + setRGB.invoke(df, 200, 255, 0); + Materials mNitroFix = (Materials) construct.invoke(df); + Logger.INFO("[Nitro] Invoked 8 method calls successfully."); + + GT_Mod.gregtechproxy.addFluid("NitroFuel_Old", "Nitro Diesel [Old]", mNitroFix, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, mNitroFix, 1L), ItemUtils.getEmptyCell(), 1000); + Logger.INFO("[Nitro] Added a fluid."); + + + /** + * Reflectively get all the values to maintain 5.08.xx compat + */ + + + GT_Recipe_Map recipeMapMultiblockChemReactor; + recipeMapMultiblockChemReactor = (GT_Recipe_Map) FieldUtils.getDeclaredField(GT_Recipe_Map.class, "sMultiblockChemicalRecipes", true).get(null); + + + + /** + * Do Recipe Stuff + */ + + //Set up some Variables + final Collection xSingle = GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList; + final Collection xMulti = recipeMapMultiblockChemReactor.mRecipeList; + final FluidStack mNitroStack = Materials.NitroFuel.getFluid(1000); + GT_Recipe toRemoveSingle[] = new GT_Recipe[99]; + GT_Recipe toRemoveMulti[] = new GT_Recipe[99]; + int mIndexSingle = 0; + int mIndexMulti = 0; + + //Iterate Single Block recipes for Nitro production. + for (GT_Recipe rnd : xSingle){ + for (FluidStack mOutputFluid : rnd.mFluidOutputs){ + if (mOutputFluid.isFluidEqual(mNitroStack)){ + toRemoveSingle[mIndexSingle++] = rnd; + } + } + } + Logger.INFO("[Nitro] Found "+mIndexSingle+" single block Chemical Reactor recipes to remove."); + + //Iterate Multi Block recipes for Nitro production. + for (GT_Recipe rnd : xMulti){ + for (FluidStack mOutputFluid : rnd.mFluidOutputs){ + if (mOutputFluid.isFluidEqual(mNitroStack)){ + toRemoveMulti[mIndexMulti++] = rnd; + } + } + } + Logger.INFO("[Nitro] Found "+mIndexMulti+" multi block Chemical Reactor recipes to remove."); + + //Remove Single Block recipes found. + int mRemovedSingle = 0; + int mRemovedMulti = 0; + for (GT_Recipe single : toRemoveSingle){ + if (GT_Recipe.GT_Recipe_Map.sChemicalRecipes.mRecipeList.remove(single)){ + mRemovedSingle++; + } + } + Logger.INFO("[Nitro] Removed "+mRemovedSingle+" single block Chemical Reactor recipes."); + + //Remove Multi Block recipes found. + for (GT_Recipe multi : toRemoveMulti){ + if (recipeMapMultiblockChemReactor.mRecipeList.remove(multi)){ + mRemovedMulti++; + } + } + Logger.INFO("[Nitro] Removed "+mRemovedMulti+" multi block Chemical Reactor recipes."); + + Materials mGlycerol = Materials.valueOf("Glycerol"); + Materials mLightFuel = Materials.valueOf("LightFuel"); + + //Build a New Recipe set + Materials mFuels[] = {mLightFuel, Materials.Fuel}; + for (Materials fuel : mFuels){ + boolean didAdd[] = new boolean[3]; + Logger.INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the mixer, using "+fuel.mDefaultLocalName+" as the fuel input."); + didAdd[0] = GT_Values.RA.addMixerRecipe(getCells(fuel, 4), getCells(mGlycerol, 1), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, getCells(mNitroFix, 5), 20, 30); + didAdd[1] = GT_Values.RA.addMixerRecipe(getCells(fuel, 4), GT_Values.NI, GT_Values.NI, GT_Values.NI, mGlycerol.getFluid(1000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(4L), 20, 30); + didAdd[2] = GT_Values.RA.addMixerRecipe(getCells(mGlycerol, 1), GT_Values.NI,GT_Values.NI,GT_Values.NI, fuel.getFluid(4000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(1L), 20, 30); + Logger.INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]); + } + + for (Materials fuel : mFuels){ + boolean didAdd[] = new boolean[3]; + Logger.INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the chemical reactors, using "+fuel.mDefaultLocalName+" as the fuel input."); + didAdd[0] = GT_Values.RA.addChemicalRecipe(getCells(fuel, 4), getCells(mGlycerol, 1), GT_Values.NF, GT_Values.NF, getCells(mNitroFix, 5), 20); + didAdd[1] = GT_Values.RA.addChemicalRecipe(getCells(fuel, 4), GT_Values.NI, mGlycerol.getFluid(1000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(4L), 20); + didAdd[2] = GT_Values.RA.addChemicalRecipe(getCells(mGlycerol, 1), GT_Values.NI, fuel.getFluid(4000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(1L), 20); + Logger.INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]); + } + + Logger.INFO("[Nitro] Getting ready to add back in the old glycerol recipe!"); + GT_Values.RA.addChemicalRecipe(getCells(Materials.Nitrogen, 1), getDust(Materials.Carbon, 1), Materials.Water.getFluid(2000L), mGlycerol.getFluid(3000L), ItemList.Cell_Empty.get(1), 3000); + Logger.INFO("[Nitro] Added recipes."); + + } + } + } + } + catch (IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) { + Logger.INFO("[Nitro] ================ Error ================"); + e.printStackTrace(); + Logger.INFO("[Nitro] ================ Error ================"); + } + } + } + + + public static ItemStack getCells(Materials mat, int amount){ + String mName = MaterialUtils.getMaterialName(mat); + return ItemUtils.getItemStackOfAmountFromOreDict("cell"+mName, amount); + } + + public static ItemStack getDust(Materials mat, int amount){ + String mName = MaterialUtils.getMaterialName(mat); + return ItemUtils.getItemStackOfAmountFromOreDict("dust"+mName, amount); + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java new file mode 100644 index 0000000000..c470243822 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java @@ -0,0 +1,57 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionCreator; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionDetector; + +public class GregtechPollutionDevices { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + if (PollutionUtils.isPollutionEnabled()) { + Logger.INFO("Gregtech5u Content | Registering Anti-Pollution Devices."); + run1(); + } + } + } + + private static void run1() { + if (CORE.ConfigSwitches.enableMachine_Pollution){ + // 759 + GregtechItemList.Pollution_Detector.set( + new GregtechMetaPollutionDetector(756, "pollutiondetector.01.tier.single", "Pollution Detection Device", + 0, "Tells you if you're living in Gwalior yet.", 0).getStackForm(1L)); + GregtechItemList.Pollution_Creator.set(new GregtechMetaPollutionCreator(951, "pollutioncreator.01.tier.single", + "Smog Device", 4, "Polluting the skies.", 0).getStackForm(1L)); + + GregtechItemList.Pollution_Cleaner_ULV.set(new GregtechMetaAtmosphericReconditioner(757, + "pollutioncleaner.01.tier.single", "Pollution Scrubber", 0).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_LV.set(new GregtechMetaAtmosphericReconditioner(758, + "pollutioncleaner.02.tier.single", "Upgraded Pollution Scrubber", 1).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_MV.set(new GregtechMetaAtmosphericReconditioner(759, + "pollutioncleaner.03.tier.single", "Advanced Pollution Scrubber", 2).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_HV.set(new GregtechMetaAtmosphericReconditioner(760, + "pollutioncleaner.04.tier.single", "Precision Pollution Scrubber", 3).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_EV.set(new GregtechMetaAtmosphericReconditioner(761, + "pollutioncleaner.05.tier.single", "Air Recycler", 4).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_IV.set(new GregtechMetaAtmosphericReconditioner(762, + "pollutioncleaner.06.tier.single", "Upgraded Air Recycler", 5).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_LuV.set(new GregtechMetaAtmosphericReconditioner(763, + "pollutioncleaner.07.tier.single", "Advanced Air Recycler", 6).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_ZPM.set(new GregtechMetaAtmosphericReconditioner(764, + "pollutioncleaner.08.tier.single", "Precision Air Recycler", 7).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_UV.set(new GregtechMetaAtmosphericReconditioner(765, + "pollutioncleaner.09.tier.single", "Atmospheric Cleaner", 8).getStackForm(1L)); + GregtechItemList.Pollution_Cleaner_MAX.set(new GregtechMetaAtmosphericReconditioner(766, + "pollutioncleaner.10.tier.single", "Biosphere Cleanser", 9).getStackForm(1L)); + } + + + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java new file mode 100644 index 0000000000..3e9582b80a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerBreakers.java @@ -0,0 +1,42 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBreaker; + +public class GregtechPowerBreakers { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Power Breakers."); + run1(); + } + + } + + private static void run1() { + //30200 + int aStartID = 30400; + GregtechItemList.BreakerBox_ULV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.00", + "Ultra Low Voltage Breaker Box", 0, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_LV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.01", + "Low Voltage Breaker Box", 1, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_MV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.02", + "Medium Voltage Breaker Box", 2, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_HV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.03", + "High Voltage Breaker Box", 3, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_EV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.04", + "Extreme Voltage Breaker Box", 16, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_IV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.05", + "Insane Voltage Breaker Box", 5, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_LuV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.06", + "Ludicrous Voltage Breaker Box", 6, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_ZPM.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.07", + "ZPM Voltage Breaker Box", 7, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_UV.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.08", + "Ultimate Voltage Breaker Box", 8, "", 16)).getStackForm(1L)); + GregtechItemList.BreakerBox_MAX.set((new GT_MetaTileEntity_BasicBreaker(aStartID++, "breaker.tier.09", + "MAX Voltage Breaker Box", 9, "", 16)).getStackForm(1L)); + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java new file mode 100644 index 0000000000..9e94d633f6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java @@ -0,0 +1,43 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; + +public class GregtechPowerSubStation { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Power Substation Node."); + if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation) { + run1(); + } + } + + } + + private static void run1() { + // Steam Condensors + GregtechItemList.PowerSubStation.set(new GregtechMetaTileEntity_PowerSubStationController(812, + "substation.01.input.single", "Power Station Control Node").getStackForm(1L)); + int tID = 886; + GregtechItemList.Hatch_Input_Battery_MV.set(new GT_MetaTileEntity_Hatch_InputBattery(tID++, "hatch.input_battery.tier.00", "Charging Bus (MV)", 2).getStackForm(1L)); + GregtechItemList.Hatch_Input_Battery_EV.set(new GT_MetaTileEntity_Hatch_InputBattery(tID++, "hatch.input_battery.tier.01", "Charging Bus (EV)", 4).getStackForm(1L)); + + GregtechItemList.Hatch_Output_Battery_MV.set(new GT_MetaTileEntity_Hatch_OutputBattery(tID++, "hatch.output_battery.tier.00", "Discharging Bus (MV)", 2).getStackForm(1L)); + GregtechItemList.Hatch_Output_Battery_EV.set(new GT_MetaTileEntity_Hatch_OutputBattery(tID++, "hatch.output_battery.tier.01", "Discharging Bus (EV)", 4).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Input_Battery_MV.get(1L, new Object[0]), CI.bitsd, new Object[]{"C", "M", 'M', ItemList.Hull_MV, 'C', ItemList.Battery_Buffer_2by2_MV}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Input_Battery_EV.get(1L, new Object[0]), CI.bitsd, new Object[]{"C", "M", 'M', ItemList.Hull_EV, 'C', ItemList.Battery_Buffer_4by4_EV}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Output_Battery_MV.get(1L, new Object[0]), CI.bitsd, new Object[]{"M", "C", 'M', ItemList.Hull_MV, 'C', ItemList.Battery_Buffer_2by2_MV}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Output_Battery_EV.get(1L, new Object[0]), CI.bitsd, new Object[]{"M", "C", 'M', ItemList.Hull_EV, 'C', ItemList.Battery_Buffer_4by4_EV}); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java new file mode 100644 index 0000000000..a7332657ce --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG; + +public class GregtechRTG { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering RTG."); + run1(); + } + } + + private static void run1() { + GregtechItemList.RTG.set( + new GregtechMetaTileEntity_RTG(869, "basicgenerator.rtg.tier.01", "Radioisotope Thermoelectric Generator", 3) + .getStackForm(1L)); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java new file mode 100644 index 0000000000..5a7d3a50d7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java @@ -0,0 +1,128 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityRocketFuelGenerator; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_LargeRocketEngine; + +public class GregtechRocketFuelGenerator { + + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Industrial Rocket Engines."); + if (CORE.ConfigSwitches.enableMachine_RocketEngines) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.Controller_RocketEngine.set( + new GregtechMetaTileEntity_LargeRocketEngine(996, "gtpp.multimachine.rocketengine", "Rocketdyne F-1A Engine").getStackForm(1L)); + + + ItemList aDieselEngine = ItemUtils.getValueOfItemList("Machine_Multi_DieselEngine", ItemList.Machine_Multi_LargeBoiler_TungstenSteel); + + GT_ModHandler.addCraftingRecipe( + GregtechItemList.Controller_RocketEngine.get(1L), + CI.bitsd, + new Object[]{ + "PCP", "EME", "GWG", + 'M', aDieselEngine, + 'P', ItemList.Electric_Piston_IV, + 'E', ItemList.Field_Generator_EV, + 'C', OrePrefixes.circuit.get(Materials.Master), + 'W', OrePrefixes.cableGt08.get(Materials.Platinum), + 'G', ALLOY.MARAGING350.getGear(1)}); + + GT_ModHandler.addCraftingRecipe( + GregtechItemList.Casing_RocketEngine.get(1L), + CI.bitsd, + new Object[]{ + "PhP", "RFR", "PWP", + 'R', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), + 'F', ItemList.Casing_RobustTungstenSteel, + 'P', ALLOY.NITINOL_60.getGear(1)}); + + GregtechItemList.Rocket_Engine_EV.set(new GregtechMetaTileEntityRocketFuelGenerator(793, + "advancedgenerator.rocketFuel.tier.01", "Basic Rocket Engine", 4).getStackForm(1L)); + GregtechItemList.Rocket_Engine_IV.set(new GregtechMetaTileEntityRocketFuelGenerator(794, + "advancedgenerator.rocketFuel.tier.02", "Advanced Rocket Engine", 5).getStackForm(1L)); + GregtechItemList.Rocket_Engine_LuV.set(new GregtechMetaTileEntityRocketFuelGenerator(795, + "advancedgenerator.rocketFuel.tier.03", "Turbo Rocket Engine", 6).getStackForm(1L)); + if (!CORE.GTNH) { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_EV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), + ItemList.Electric_Piston_EV, Character.valueOf('E'), ItemList.Electric_Motor_EV, + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), + OrePrefixes.cableGt02.get(Materials.Aluminium), Character.valueOf('G'), + ALLOY.TANTALLOY_61.getGear(1)}); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_IV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), + ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Superconductor), + Character.valueOf('W'), OrePrefixes.cableGt02.get(Materials.Platinum), Character.valueOf('G'), + ALLOY.STELLITE.getGear(1)}); + } + if (CORE.GTNH) { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_EV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('P'), + ItemList.Electric_Piston_EV, Character.valueOf('E'), ItemList.Electric_Motor_EV, + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), + OrePrefixes.cableGt02.get(Materials.Aluminium), Character.valueOf('G'), + ALLOY.TANTALLOY_61.getGear(1)}); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_IV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('P'), + ItemList.Electric_Piston_IV, Character.valueOf('E'), ItemList.Electric_Motor_IV, + Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Master), + Character.valueOf('W'), OrePrefixes.cableGt02.get(Materials.Platinum), Character.valueOf('G'), + ALLOY.STELLITE.getGear(1)}); + } + final ItemStack INGREDIENT_1 = CI.electricPiston_LuV; + final ItemStack INGREDIENT_2 = CI.electricMotor_LuV; + if (!CORE.GTNH) { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_LuV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), + INGREDIENT_1, Character.valueOf('E'), INGREDIENT_2, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Infinite), Character.valueOf('W'), + OrePrefixes.cableGt02.get(Materials.Tungsten), Character.valueOf('G'), + ALLOY.ZERON_100.getGear(1)}); + } + if (CORE.GTNH) { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Rocket_Engine_LuV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"PCP", "EME", "GWG", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('P'), + INGREDIENT_1, Character.valueOf('E'), INGREDIENT_2, Character.valueOf('C'), + OrePrefixes.circuit.get(Materials.Ultimate), Character.valueOf('W'), + OrePrefixes.cableGt02.get(Materials.Tungsten), Character.valueOf('G'), + ALLOY.ZERON_100.getGear(1)}); + } + } +} + diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java new file mode 100644 index 0000000000..124b5d114d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java @@ -0,0 +1,118 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock; + +public class GregtechSafeBlock { + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Lockable Safe Blocks."); + if (CORE.ConfigSwitches.enableMachine_Safes) { + run1(); + } + } + + } + + private static void run1() { + + GregtechItemList.GT_Safe_ULV + .set(new GregtechMetaSafeBlock(780, "protection.playersafe.tier.00", "Ultra Low Voltage Player Safe", 0) + .getStackForm(1L)); + GregtechItemList.GT_Safe_LV + .set(new GregtechMetaSafeBlock(781, "protection.playersafe.tier.01", "Low Voltage Player Safe", 1) + .getStackForm(1L)); + GregtechItemList.GT_Safe_MV + .set(new GregtechMetaSafeBlock(782, "protection.playersafe.tier.02", "Medium Voltage Player Safe", 2) + .getStackForm(1L)); + GregtechItemList.GT_Safe_HV + .set(new GregtechMetaSafeBlock(783, "protection.playersafe.tier.03", "High Voltage Player Safe", 3) + .getStackForm(1L)); + GregtechItemList.GT_Safe_EV + .set(new GregtechMetaSafeBlock(784, "protection.playersafe.tier.04", "Extreme Voltage Player Safe", 4) + .getStackForm(1L)); + GregtechItemList.GT_Safe_IV + .set(new GregtechMetaSafeBlock(785, "protection.playersafe.tier.05", "Insane Voltage Player Safe", 5) + .getStackForm(1L)); + GregtechItemList.GT_Safe_LuV + .set(new GregtechMetaSafeBlock(786, "protection.playersafe.tier.06", "Ludicrous Voltage Player Safe", 6) + .getStackForm(1L)); + GregtechItemList.GT_Safe_ZPM + .set(new GregtechMetaSafeBlock(787, "protection.playersafe.tier.07", "ZPM Voltage Player Safe", 7) + .getStackForm(1L)); + GregtechItemList.GT_Safe_UV + .set(new GregtechMetaSafeBlock(788, "protection.playersafe.tier.08", "Ultimate Voltage Player Safe", 8) + .getStackForm(1L)); + GregtechItemList.GT_Safe_MAX + .set(new GregtechMetaSafeBlock(789, "protection.playersafe.tier.09", "MAX Voltage Player Safe", 9) + .getStackForm(1L)); + + // To-Do Change Recipes + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_ULV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Basic) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_LV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Good) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_MV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Good) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_HV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Advanced) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_EV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Elite) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_IV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Master) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_LuV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Master) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_ZPM.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Master) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_UV.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Master), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Superconductor) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.GT_Safe_MAX.get(1L, new Object[0]), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "CMV", " X ", Character.valueOf('M'), ItemList.Hull_MAX, Character.valueOf('V'), + OrePrefixes.circuit.get(Materials.Master), Character.valueOf('C'), OreDictNames.craftingChest, + Character.valueOf('X'), OrePrefixes.circuit.get(Materials.Infinite) }); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java new file mode 100644 index 0000000000..6b38415db1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSemiFluidgenerators.java @@ -0,0 +1,20 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_SemiFluidGenerator; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_LargeSemifluidGenerator; + +public class GregtechSemiFluidgenerators { + + public static void run(){ + GregtechItemList.Generator_SemiFluid_LV.set(new GT_MetaTileEntity_SemiFluidGenerator(837, "basicgenerator.semifluid.tier.01", + "Basic Semi-Fluid Generator", 1).getStackForm(1L)); + GregtechItemList.Generator_SemiFluid_MV.set(new GT_MetaTileEntity_SemiFluidGenerator(838, "basicgenerator.semifluid.tier.02", + "Advanced Semi-Fluid Generator", 2).getStackForm(1L)); + GregtechItemList.Generator_SemiFluid_HV.set(new GT_MetaTileEntity_SemiFluidGenerator(839, "basicgenerator.semifluid.tier.03", + "Turbo Semi-Fluid Generator", 3).getStackForm(1L)); + GregtechItemList.Controller_LargeSemifluidGenerator.set(new GregtechMetaTileEntity_LargeSemifluidGenerator(31026, "gtpp.multimachine.semifluidgenerator", "Large Semifluid Burner").getStackForm(1L)); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java new file mode 100644 index 0000000000..d2087b22f4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java @@ -0,0 +1,109 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GTPP_Recipe; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_BasicWasher; +import net.minecraftforge.fluids.FluidStack; + +public class GregtechSimpleWasher { + + public static void run() { + if (CORE.ConfigSwitches.enableMachine_SimpleWasher){ + generateDirtyDustRecipes(); + generateDirtyCrushedRecipes(); + // Register the Simple Washer Entity. + GregtechItemList.SimpleDustWasher_ULV + .set(new GregtechMetaTileEntity_BasicWasher(767, "simplewasher.01.tier.01", "Simple Washer I", 0) + .getStackForm(1L)); + + //People want them in higher tiers apparently + GregtechItemList.SimpleDustWasher_MV + .set(new GregtechMetaTileEntity_BasicWasher(31017, "simplewasher.01.tier.02", "Simple Washer II", 2) + .getStackForm(1L)); + GregtechItemList.SimpleDustWasher_EV + .set(new GregtechMetaTileEntity_BasicWasher(31018, "simplewasher.01.tier.03", "Simple Washer III", 4) + .getStackForm(1L)); + GregtechItemList.SimpleDustWasher_LuV + .set(new GregtechMetaTileEntity_BasicWasher(31019, "simplewasher.01.tier.04", "Simple Washer IV", 6) + .getStackForm(1L)); + GregtechItemList.SimpleDustWasher_UV + .set(new GregtechMetaTileEntity_BasicWasher(31020, "simplewasher.01.tier.05", "Simple Washer V", 8) + .getStackForm(1L)); + } + } + + private static boolean generateDirtyDustRecipes(){ + boolean disablePlat = CORE.GTNH; + int mRecipeCount = 0; + // Generate Recipe Map for the Dust Washer. + ItemStack dustClean; + ItemStack dustDirty; + for (Materials v : Materials.values()) { + if (disablePlat) { + if (v == Materials.Platinum || v == Materials.Osmium || v == Materials.Iridium || v == Materials.Palladium) { + continue; + } + } + + dustClean = GT_OreDictUnificator.get(OrePrefixes.dust, v, 1L); + dustDirty = GT_OreDictUnificator.get(OrePrefixes.dustImpure, v, 1L); + if (dustClean != null && dustDirty != null) { + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { dustDirty }, + new ItemStack[] { dustClean }, + null, + new int[] {}, + new FluidStack[] { FluidUtils.getFluidStack("water", 100) }, + new FluidStack[] {}, + 5, + 8, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.addRecipe(aRecipe); + } + } + + if (GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.mRecipeList.size() > mRecipeCount){ + return true; + } + return false; + } + + private static boolean generateDirtyCrushedRecipes(){ + int mRecipeCount = GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.mRecipeList.size(); + // Generate Recipe Map for the Dust Washer. + ItemStack crushedClean; + ItemStack crushedDirty; + for (Materials v : Materials.values()) { + crushedClean = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, v, 1L); + crushedDirty = GT_OreDictUnificator.get(OrePrefixes.crushed, v, 1L); + if (crushedClean != null && crushedDirty != null) { + GTPP_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { crushedDirty }, + new ItemStack[] { crushedClean }, + null, + new int[] {}, + new FluidStack[] { FluidUtils.getFluidStack("water", 100) }, + new FluidStack[] {}, + 5, + 8, + 0); + GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.addRecipe(aRecipe); + } + } + + if (GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes.mRecipeList.size() > mRecipeCount){ + return true; + } + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java new file mode 100644 index 0000000000..45f78d660b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java @@ -0,0 +1,49 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntitySolarGenerator; + +public class GregtechSolarGenerators { + public static void run() { + if (LoadedMods.Gregtech && ConfigSwitches.enableMachine_SolarGenerators) { + Logger.INFO("Gregtech5u Content | Registering Solar Generator Blocks."); + if (CORE.ConfigSwitches.enableMachine_SolarGenerators) { + run1(); + } + } + + } + + private static void run1() { + + GregtechItemList.GT_Solar_ULV.set(new GregtechMetaTileEntitySolarGenerator(800, "sunabsorber.tier.00", + "Ultra Low Voltage Solar Generator", 0).getStackForm(1L)); + GregtechItemList.GT_Solar_LV.set( + new GregtechMetaTileEntitySolarGenerator(801, "sunabsorber.tier.01", "Low Voltage Solar Generator", 1) + .getStackForm(1L)); + GregtechItemList.GT_Solar_MV.set(new GregtechMetaTileEntitySolarGenerator(802, "sunabsorber.tier.02", + "Medium Voltage Solar Generator", 2).getStackForm(1L)); + GregtechItemList.GT_Solar_HV.set( + new GregtechMetaTileEntitySolarGenerator(803, "sunabsorber.tier.03", "High Voltage Solar Generator", 3) + .getStackForm(1L)); + GregtechItemList.GT_Solar_EV.set(new GregtechMetaTileEntitySolarGenerator(804, "sunabsorber.tier.04", + "Extreme Voltage Solar Generator", 4).getStackForm(1L)); + GregtechItemList.GT_Solar_IV.set(new GregtechMetaTileEntitySolarGenerator(805, "sunabsorber.tier.05", + "Insane Voltage Solar Generator", 5).getStackForm(1L)); + GregtechItemList.GT_Solar_LuV.set(new GregtechMetaTileEntitySolarGenerator(806, "sunabsorber.tier.06", + "Ludicrous Voltage Solar Generator", 6).getStackForm(1L)); + GregtechItemList.GT_Solar_ZPM.set( + new GregtechMetaTileEntitySolarGenerator(807, "sunabsorber.tier.07", "ZPM Voltage Solar Generator", 7) + .getStackForm(1L)); + GregtechItemList.GT_Solar_UV.set(new GregtechMetaTileEntitySolarGenerator(808, "sunabsorber.tier.08", + "Ultimate Voltage Solar Generator", 8).getStackForm(1L)); + GregtechItemList.GT_Solar_MAX.set( + new GregtechMetaTileEntitySolarGenerator(809, "sunabsorber.tier.09", "MAX Voltage Solar Generator", 9) + .getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java new file mode 100644 index 0000000000..d7f8f7f4d5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java @@ -0,0 +1,32 @@ +/* +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_SolarTower; +import gtPlusPlus.xmod.gregtech.common.tileentities.misc.TileEntitySolarHeater; + +public class GregtechSolarTower { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Solar Tower."); + run1(); + } + + } + + private static void run1() { + // Solar Tower + GregtechItemList.Industrial_Solar_Tower.set(new GregtechMetaTileEntity_SolarTower(863, "solartower.controller.tier.single", "Solar Tower").getStackForm(1L)); + GregtechItemList.Solar_Tower_Reflector.set( + new TileEntitySolarHeater( + 864, + "solarreflector.simple.single", + "Solar Reflector", + 8, + "Part of the Clean Green energy movement", + 0).getStackForm(1L)); + + } +}*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java new file mode 100644 index 0000000000..60e6b31936 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaCondensor; + +public class GregtechSteamCondenser { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Steam Condensor."); + if (CORE.ConfigSwitches.enableMachine_SteamConverter) { + run1(); + } + } + + } + + private static void run1() { + // Steam Condensors + GregtechItemList.Condensor_MAX.set( + new GregtechMetaCondensor(769, "steamcondensor.01.tier.single", "Steam Condensor").getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java new file mode 100644 index 0000000000..add0400d87 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamMultis.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam.GregtechMetaTileEntity_SteamMacerator; + +public class GregtechSteamMultis { + + public static void run(){ + + Logger.INFO("Gregtech5u Content | Registering Steam Multiblocks."); + + GregtechItemList.Controller_SteamMaceratorMulti.set(new GregtechMetaTileEntity_SteamMacerator(31041, "gtpp.multimachine.steam.macerator", "Steam Grinder").getStackForm(1L)); + + GregtechItemList.Hatch_Input_Bus_Steam.set(new GT_MetaTileEntity_Hatch_Steam_BusInput(31046, "hatch.input_bus.tier.steam", "Input Bus (Steam)", 0).getStackForm(1L)); + GregtechItemList.Hatch_Output_Bus_Steam.set(new GT_MetaTileEntity_Hatch_Steam_BusOutput(31047, "hatch.output_bus.tier.steam", "Output Bus (Steam)", 0).getStackForm(1L)); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java new file mode 100644 index 0000000000..5027e2d6e8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperChests.java @@ -0,0 +1,73 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import static gtPlusPlus.core.recipe.common.CI.bitsd; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_ConnectableCrate; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; + +public class GregtechSuperChests { + + public static void run() { + int mId = 946; + + String aSuffix = ""; + if (CORE.GTNH) { + aSuffix = " [Disabled]"; + } + + GregtechItemList.Super_Chest_LV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.01", "Super Chest I"+aSuffix, 1)).getStackForm(1L)); + GregtechItemList.Super_Chest_MV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.02", "Super Chest II"+aSuffix, 2)).getStackForm(1L)); + GregtechItemList.Super_Chest_HV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.03", "Super Chest III"+aSuffix, 3)).getStackForm(1L)); + GregtechItemList.Super_Chest_EV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.04", "Super Chest IV"+aSuffix, 4)).getStackForm(1L)); + GregtechItemList.Super_Chest_IV.set((new GT_MetaTileEntity_TieredChest(mId++, "super.chest.gtpp.tier.05", "Super Chest V"+aSuffix, 5)).getStackForm(1L)); + + // Do not add Recipes for GTNH, hide them from NEI instead. + if (CORE.GTNH) { + ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_LV.get(1L)); + ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_MV.get(1L)); + ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_HV.get(1L)); + ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_EV.get(1L)); + ItemUtils.hideItemFromNEI(GregtechItemList.Super_Chest_IV.get(1L)); + } + else { + GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_LV.get(1L, new Object[0]), bitsd, + new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('G'), + ItemList.Automation_ChestBuffer_LV, Character.valueOf('D'), + OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('P'), + OrePrefixes.plate.get(Materials.Invar)}); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_MV.get(1L, new Object[0]), bitsd, + new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('G'), + ItemList.Automation_ChestBuffer_MV, Character.valueOf('D'), OrePrefixes.circuit.get(Materials.Good), + Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium)}); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_HV.get(1L, new Object[0]), bitsd, + new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('G'), + ItemList.Automation_ChestBuffer_HV, Character.valueOf('D'), OrePrefixes.circuit.get(Materials.Advanced), + Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel)}); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_EV.get(1L, new Object[0]), bitsd, + new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('G'), + ItemList.Automation_ChestBuffer_EV, Character.valueOf('D'), OrePrefixes.circuit.get(Materials.Data), + Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium)}); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.Super_Chest_IV.get(1L, new Object[0]), bitsd, + new Object[]{"DPD", "PMP", "DGD", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('G'), + ItemList.Automation_ChestBuffer_IV, Character.valueOf('D'), + OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('P'), + OrePrefixes.plate.get(Materials.Tungsten)}); + } + + //Test Thing + GregtechItemList.CrateStorage.set((new GT_MetaTileEntity_ConnectableCrate(GT_MetaTileEntity_ConnectableCrate.mCrateID, "crate.tier.01", "Interconnecting Storage Crate", 0)).getStackForm(1L)); + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java new file mode 100644 index 0000000000..1376f4313d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java @@ -0,0 +1,19 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +public class GregtechSuperConductionPoint { + + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + //Utils.LOG_INFO("Gregtech5u Content | Registering Super Conductor Input Node."); + run1(); + } + + } + + private static void run1() { + // Steam Condensors + //GregtechItemList.SuperConductorInputNode.set(new GregtechMetaTileEntitySuperCondensor(811, + // "superconductor.01.input.single", "Power Phase Shifting Station", 8).getStackForm(1L)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java new file mode 100644 index 0000000000..1c5181130b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTeslaTower.java @@ -0,0 +1,17 @@ +/* +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc.GregtechMTE_TeslaTower; + +public class GregtechTeslaTower { + + public static void run() { + Logger.INFO("Gregtech5u Content | Registering Tesla Tower."); + GregtechItemList.TelsaTower.set(new GregtechMTE_TeslaTower(984, "multimachine.telsatower", "Tesla's Last Testament").getStackForm(1)); + + } + +} +*/ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java new file mode 100644 index 0000000000..398d2caf01 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThaumcraftDevices.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionCreator; + +public class GregtechThaumcraftDevices { + + public static void run() { + if (LoadedMods.Gregtech && LoadedMods.Thaumcraft) { + Logger.INFO("Gregtech5u Content | Registering Thaumcraft content."); + run1(); + } + } + + private static void run1() { + //956-960 + GregtechItemList.Thaumcraft_Researcher.set(new GregtechMetaPollutionCreator(956, "thaumcraft.gtpp.machine.01", + "Arcane Researcher", 5, "Thinking for you.", 0).getStackForm(1L)); + + + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java new file mode 100644 index 0000000000..23c9f7e666 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechThreadedBuffers.java @@ -0,0 +1,136 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.ItemList; + +import gregtech.api.util.GT_Recipe; +import gregtech.common.tileentities.automation.GT_MetaTileEntity_SuperBuffer; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative.GT_MetaTileEntity_InfiniteItemHolder; +import net.minecraft.item.ItemStack; + +public class GregtechThreadedBuffers { + + public static void run() { + run2(); + } + + private static void run2() { + + GregtechItemList.Infinite_Item_Chest.set((new GT_MetaTileEntity_InfiniteItemHolder(31010, "infinite.chest.tier.01", "Infinite Item Chest", 1)).getStackForm(1L)); + + /* + * This file used to contain registration and recipes for GT++ threaded super buffers. Those have now been + * deprecated and replaced by the original GT super buffers. + * + * To avoid breaking existing bases, we've assigned the threaded super buffer metadata IDs to a copy of the GT + * super buffers, with a deprecation notice attached. We've also provided disassembler recipes that are the + * reverse of the original crafting recipes, allowing players to reclaim their original materials as well as + * convert the deprecated threaded super buffer metadata ID item back to the original GT super buffer metadata + * ID item. + */ + + final String deprecationNotice = "**DEPRECATED - Drop in disassembler!** "; + GregtechItemList.Automation_Threaded_SuperBuffer_ULV.set((new GT_MetaTileEntity_SuperBuffer(31000, "automation.superbuffer.tier.00.deprecated", deprecationNotice + "Ultra Low Voltage Super Buffer", 0)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_LV.set((new GT_MetaTileEntity_SuperBuffer(31001, "automation.superbuffer.tier.01.deprecated", deprecationNotice + "Low Voltage Super Buffer", 1)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_MV.set((new GT_MetaTileEntity_SuperBuffer(31002, "automation.superbuffer.tier.02.deprecated", deprecationNotice + "Medium Voltage Super Buffer", 2)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_HV.set((new GT_MetaTileEntity_SuperBuffer(31003, "automation.superbuffer.tier.03.deprecated", deprecationNotice + "High Voltage Super Buffer", 3)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_EV.set((new GT_MetaTileEntity_SuperBuffer(31004, "automation.superbuffer.tier.04.deprecated", deprecationNotice + "Extreme Voltage Super Buffer", 4)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_IV.set((new GT_MetaTileEntity_SuperBuffer(31005, "automation.superbuffer.tier.05.deprecated", deprecationNotice + "Insane Voltage Super Buffer", 5)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_LuV.set((new GT_MetaTileEntity_SuperBuffer(31006, "automation.superbuffer.tier.06.deprecated", deprecationNotice + "Ludicrous Voltage Super Buffer", 6)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_ZPM.set((new GT_MetaTileEntity_SuperBuffer(31007, "automation.superbuffer.tier.07.deprecated", deprecationNotice + "ZPM Voltage Super Buffer", 7)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_UV.set((new GT_MetaTileEntity_SuperBuffer(31008, "automation.superbuffer.tier.08.deprecated", deprecationNotice + "Ultimate Voltage Super Buffer", 8)).getStackForm(1L)); + GregtechItemList.Automation_Threaded_SuperBuffer_MAX.set((new GT_MetaTileEntity_SuperBuffer(31009, "automation.superbuffer.tier.09.deprecated", deprecationNotice + "Highly Ultimate Voltage Super Buffer", 9)).getStackForm(1L)); + + // These recipes are all 1 sec @ 32 EU/t + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_ULV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_ULV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_LV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_LV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_LV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_LV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_MV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_MV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_MV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_HV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_HV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_HV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_EV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_EV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_EV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_IV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_IV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_IV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_LuV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_LuV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_LuV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_ZPM.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_ZPM.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_UV.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_UV.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + ItemList.Conveyor_Module_UV.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.addRecipe( + true, + new ItemStack[]{ GregtechItemList.Automation_Threaded_SuperBuffer_MAX.get(1L, new Object[0]) }, + new ItemStack[]{ + ItemList.Automation_SuperBuffer_MAX.get(1L, new Object[0]), + ItemList.Tool_DataOrb.get(1L, new Object[0]), + GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), + }, + null, null, null, 20, 32, -100); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java new file mode 100644 index 0000000000..bbfd568e54 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredChunkloaders.java @@ -0,0 +1,28 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntityChunkLoader; + +public class GregtechTieredChunkloaders { + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Chunk Loaders."); + run1(); + } + } + + private static void run1() { + int ID = 943; + GregtechItemList.GT_Chunkloader_HV + .set(new GregtechMetaTileEntityChunkLoader(ID++, "chunkloader.tier.01", "Chunkloader MK I", 3) + .getStackForm(1L)); + GregtechItemList.GT_Chunkloader_IV + .set(new GregtechMetaTileEntityChunkLoader(ID++, "chunkloader.tier.02", "Chunkloader MK II", 5) + .getStackForm(1L)); + GregtechItemList.GT_Chunkloader_ZPM + .set(new GregtechMetaTileEntityChunkLoader(ID++, "chunkloader.tier.03", "Chunkloader MK III", 7) + .getStackForm(1L)); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java new file mode 100644 index 0000000000..2a4a2b9f85 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java @@ -0,0 +1,58 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredTank; + +public class GregtechTieredFluidTanks { + public static void run() { + if (LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Portable Fluid Tanks."); + if (CORE.ConfigSwitches.enableMachine_FluidTanks) { + run1(); + } + } + + } + + private static void run1() { + int ID = 817; + if (CORE.GTNH) { + Logger.INFO("Only loading ULV-IV tier tanks for New Horizons Modpack."); + } + GregtechItemList.GT_FluidTank_ULV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.00", "Ultra Low Voltage Fluid Tank", 0) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_LV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.01", "Low Voltage Fluid Tank", 1) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_MV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.02", "Medium Voltage Fluid Tank", 2) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_HV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.03", "High Voltage Fluid Tank", 3) + .getStackForm(1L)); + if (!CORE.GTNH) { + GregtechItemList.GT_FluidTank_EV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.04", "Extreme Voltage Fluid Tank", 4) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_IV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.05", "Insane Voltage Fluid Tank", 5) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_LuV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.06", "Ludicrous Voltage Fluid Tank", 6) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_ZPM + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.07", "ZPM Voltage Fluid Tank", 7) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_UV + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.08", "Ultimate Voltage Fluid Tank", 8) + .getStackForm(1L)); + GregtechItemList.GT_FluidTank_MAX + .set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.09", "MAX Voltage Fluid Tank", 9) + .getStackForm(1L)); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java new file mode 100644 index 0000000000..07139da024 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaTreeFarmerStructural; + +public class GregtechTreeFarmerTE { + public static void run() { + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Tree Farmer Structural Block."); + if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer) { + run1(); + } + } + } + + private static void run1() { + GregtechItemList.TreeFarmer_Structural.set( + new GregtechMetaTreeFarmerStructural(752, "treefarmer.structural", "Farm Keeper", 0).getStackForm(1L)); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java new file mode 100644 index 0000000000..ca90724400 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java @@ -0,0 +1,48 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaWirelessCharger; + +public class GregtechWirelessChargers { + + + public static void run(){ + + if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { + Logger.INFO("Gregtech5u Content | Registering Wireless Chargers."); + + + long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED; + int mID = 890; + + Utils.registerEvent(new ChargingHelper()); + + GregtechItemList.Charger_LV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.01.tier.single", + "Wireless Charger MK I", 1, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_MV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.02.tier.single", + "Wireless Charger MK II", 2, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_HV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.03.tier.single", + "Wireless Charger MK III", 3, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_EV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.04.tier.single", + "Wireless Charger MK IV", 4, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_IV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.05.tier.single", + "Wireless Charger MK V", 5, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_LuV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.06.tier.single", + "Wireless Charger MK VI", 6, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_ZPM.set(new GregtechMetaWirelessCharger(mID++, "wificharger.07.tier.single", + "Wireless Charger MK VII", 7, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_UV.set(new GregtechMetaWirelessCharger(mID++, "wificharger.08.tier.single", + "Wireless Charger MK VIII", 8, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + GregtechItemList.Charger_MAX.set(new GregtechMetaWirelessCharger(mID++, "wificharger.09.tier.single", + "Wireless Charger MK IX", 9, "Hopefully won't give you cancer.", 0).getStackForm(1L)); + + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java new file mode 100644 index 0000000000..d5b95a61bf --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java @@ -0,0 +1,99 @@ +package gtPlusPlus.xmod.gregtech.registration.gregtech; + +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator; + +public class NewHorizonsAccelerator { + + public static void run() { + if (LoadedMods.Gregtech && !CORE.GTNH) { + Logger.INFO("New Horizons Content | Registering World Accelerators."); + if (CORE.ConfigSwitches.enableMachine_WorldAccelerators) { + run1(); + } + } + + } + + private static void run1() { + GregtechItemList.AcceleratorLV.set(new GT_MetaTileEntity_WorldAccelerator(841, + "basicmachine.accelerator.tier.01", "Basic World Accelerator", 1).getStackForm(1L)); + GregtechItemList.AcceleratorMV.set(new GT_MetaTileEntity_WorldAccelerator(842, + "basicmachine.accelerator.tier.02", "Advanced World Accelerator", 2).getStackForm(1L)); + GregtechItemList.AcceleratorHV.set(new GT_MetaTileEntity_WorldAccelerator(843, + "basicmachine.accelerator.tier.03", "Advanced World Accelerator II", 3).getStackForm(1L)); + GregtechItemList.AcceleratorEV.set(new GT_MetaTileEntity_WorldAccelerator(844, + "basicmachine.accelerator.tier.04", "Advanced World Accelerator III", 4).getStackForm(1L)); + GregtechItemList.AcceleratorIV.set(new GT_MetaTileEntity_WorldAccelerator(845, + "basicmachine.accelerator.tier.05", "Advanced World Accelerator IV", 5).getStackForm(1L)); + GregtechItemList.AcceleratorLuV.set(new GT_MetaTileEntity_WorldAccelerator(846, + "basicmachine.accelerator.tier.06", "Elite World Accelerator", 6).getStackForm(1L)); + GregtechItemList.AcceleratorZPM.set(new GT_MetaTileEntity_WorldAccelerator(847, + "basicmachine.accelerator.tier.07", "Elite World Accelerator II", 7).getStackForm(1L)); + GregtechItemList.AcceleratorUV.set(new GT_MetaTileEntity_WorldAccelerator(848, + "basicmachine.accelerator.tier.08", "Ultimate Time Anomaly", 8).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorLV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_LV, 'M', ItemList.Electric_Motor_LV, 'P', + ItemList.Electric_Pump_LV, 'B', ItemList.Hull_LV, 'C', ItemList.Conveyor_Module_LV, 'I', + ItemList.Electric_Piston_LV }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorMV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_MV, 'M', ItemList.Electric_Motor_MV, 'P', + ItemList.Electric_Pump_MV, 'B', ItemList.Hull_MV, 'C', ItemList.Conveyor_Module_MV, 'I', + ItemList.Electric_Piston_MV }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorHV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_HV, 'M', ItemList.Electric_Motor_HV, 'P', + ItemList.Electric_Pump_HV, 'B', ItemList.Hull_HV, 'C', ItemList.Conveyor_Module_HV, 'I', + ItemList.Electric_Piston_HV }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorEV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_EV, 'M', ItemList.Electric_Motor_EV, 'P', + ItemList.Electric_Pump_EV, 'B', ItemList.Hull_EV, 'C', ItemList.Conveyor_Module_EV, 'I', + ItemList.Electric_Piston_EV }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorIV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_IV, 'M', ItemList.Electric_Motor_IV, 'P', + ItemList.Electric_Pump_IV, 'B', ItemList.Hull_IV, 'C', ItemList.Conveyor_Module_IV, 'I', + ItemList.Electric_Piston_IV }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorLuV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_LuV, 'M', ItemList.Electric_Motor_LuV, 'P', + ItemList.Electric_Pump_LuV, 'B', ItemList.Hull_LuV, 'C', ItemList.Conveyor_Module_LuV, 'I', + ItemList.Electric_Piston_LuV }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorZPM.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_ZPM, 'M', ItemList.Electric_Motor_ZPM, 'P', + ItemList.Electric_Pump_ZPM, 'B', ItemList.Hull_ZPM, 'C', ItemList.Conveyor_Module_ZPM, 'I', + ItemList.Electric_Piston_ZPM }); + + GT_ModHandler.addCraftingRecipe(GregtechItemList.AcceleratorUV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { "RMR", "PBC", "IMI", 'R', ItemList.Robot_Arm_UV, 'M', ItemList.Electric_Motor_UV, 'P', + ItemList.Electric_Pump_UV, 'B', ItemList.Hull_UV, 'C', ItemList.Conveyor_Module_UV, 'I', + ItemList.Electric_Piston_UV }); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java b/src/main/java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java new file mode 100644 index 0000000000..d2f85e5daa --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/growthcraft/HANDLER_GC.java @@ -0,0 +1,26 @@ +package gtPlusPlus.xmod.growthcraft; + +import gtPlusPlus.core.lib.LoadedMods; + +public class HANDLER_GC { + + + //Run me during Pre-Init + public static void preInit(){ + if (LoadedMods.Growthcraft){ + //Register_Booze.preInit(); + } + } + + public static void init(){ + if (LoadedMods.Growthcraft){ + } + } + + public static void postInit(){ + if (LoadedMods.Growthcraft){ + + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java new file mode 100644 index 0000000000..43347949b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java @@ -0,0 +1,232 @@ +package gtPlusPlus.xmod.growthcraft.fishtrap; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.ItemStack; + +public class FishTrapHandler { + + private static final String[] fishTypes = {"fish", "junk", "treasure"}; + private static Object mFishingRegistry; + private static Growthcraft_Old mHandler; + + public static Object getFishingRegistry(){ + if (mFishingRegistry != null){ + return mFishingRegistry; + } + else { + return setFishTrapRegistry(); + } + } + + private final static Object setFishTrapRegistry(){ + Class mFishingRegistryClass; + try { + mFishingRegistryClass = ReflectionUtils.getClass("growthcraft.api.fishtrap.FishTrapRegistry"); + final Method mFishingRegistryMethod = mFishingRegistryClass.getDeclaredMethod("getInstance"); + mFishingRegistry = mFishingRegistryMethod.invoke(null); + if (mFishingRegistry != null){ + return mFishingRegistry; + } + } + catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + return null; + } + + protected static void addFish(final String lootType, final ItemStack lootStack, final int lootChance){ + + if (mFishingRegistry == null){ + setFishTrapRegistry(); + } + if (mHandler == null){ + mHandler = new Growthcraft_Old(); + } + + final String GCVersion = LoadedMods.getModVersion("Growthcraft"); + final String[] versionString = GCVersion.split("//."); + + if (LoadedMods.getModVersion("Growthcraft").contains("2.3.1") || versionString[1].equals("3")){ + if (lootType.equals(fishTypes[0])){ + mHandler.addTrapFish(lootStack, lootChance); + Logger.INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps."); + } + else if (lootType.equals(fishTypes[1])){ + mHandler.addTrapJunk(lootStack, lootChance); + Logger.INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps."); + } + else if (lootType.equals(fishTypes[2])){ + mHandler.addTrapTreasure(lootStack, lootChance); + Logger.INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps."); + } + else { + return; + } + }/* + else if (LoadedMods.getModVersion("Growthcraft").contains("2.7.2")){ + if (lootType.equals(fishTypes[0])){ + Growthcraft_New.addTrapFish(lootStack, lootChance); + Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps."); + } + else if (lootType.equals(fishTypes[1])){ + Growthcraft_New.addTrapJunk(lootStack, lootChance); + Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps."); + } + else if (lootType.equals(fishTypes[2])){ + Growthcraft_New.addTrapTreasure(lootStack, lootChance); + Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps."); + } + else { + return; + } + }*/ + + else { + Logger.INFO("Extra Fish loot for Growthcraft Fishtraps disabled. Found V."+LoadedMods.getModVersion("Growthcraft")); + } + + } + //FishTrapHandler.pamsHarvestCraftCompat(); + final static String prefix = "food"; + final static String suffix = "raw"; + final static String seaweed = "cropSeaweed"; + final static String greenheartFish = "foodGreenheartfish"; + private static final String[] harvestcraftFish = { + "Anchovy", "Bass", "Carp", "Catfish", "Charr", "Clam", "Crab", "Crayfish", "Eel", "Frog", "Grouper", "Herring", + "Jellyfish", "Mudfish", "Octopus", "Perch", "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walley"}; + public static void pamsHarvestCraftCompat(){ + for (int i = 0; i < harvestcraftFish.length; i++){ + final String itemName = prefix+harvestcraftFish[i]+suffix; + final int lootChance = getLootChance(harvestcraftFish[i]); + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken(itemName, 1) != null){ + //addFish("fish", ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1), lootChance); + addGregtechMaceratorRecipe(ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1)); + addGregtechCentrifugeRecipe(ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1)); + addGregtechFluidRecipe(ItemUtils.getItemStackOfAmountFromOreDict(itemName, 1)); + } + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken(greenheartFish, 1) != null){ + //addFish("fish", ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1), getLootChance(greenheartFish)); + addGregtechMaceratorRecipe(ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1)); + addGregtechCentrifugeRecipe(ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1)); + addGregtechFluidRecipe(ItemUtils.getItemStackOfAmountFromOreDict(greenheartFish, 1)); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken(seaweed, 1) != null){ + //addFish("junk", ItemUtils.getItemStackOfAmountFromOreDict(seaweed, 1), getLootChance(seaweed)); + } + } + + private static int getLootChance(final String name){ + if (name.equals(harvestcraftFish[0])){ + return 20; + } + else if (name.equals(harvestcraftFish[1])){ + return 10; + } + else if (name.equals(harvestcraftFish[2])){ + return 15; + } + else if (name.equals(harvestcraftFish[3])){ + return 55; + } + else if (name.equals(harvestcraftFish[4])){ + return 5; + } + else if (name.equals(harvestcraftFish[5])){ + return 8; + } + else if (name.equals(harvestcraftFish[6])){ + return 11; + } + else if (name.equals(harvestcraftFish[7])){ + return 11; + } + else if (name.equals(harvestcraftFish[8])){ + return 15; + } + else if (name.equals(harvestcraftFish[9])){ + return 1; + } + else if (name.equals(harvestcraftFish[10])){ + return 5; + } + else if (name.equals(harvestcraftFish[11])){ + return 10; + } + else if (name.equals(harvestcraftFish[12])){ + return 25; + } + else if (name.equals(harvestcraftFish[13])){ + return 15; + } + else if (name.equals(harvestcraftFish[14])){ + return 20; + } //"Perch", "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walleye"}; + else if (name.equals(harvestcraftFish[15])){ + return 22; + } + else if (name.equals(harvestcraftFish[16])){ + return 10; + } + else if (name.equals(harvestcraftFish[17])){ + return 35; + } + else if (name.equals(harvestcraftFish[18])){ + return 3; + } + else if (name.equals(harvestcraftFish[19])){ + return 20; + } + else if (name.equals(harvestcraftFish[20])){ + return 4; + } + else if (name.equals(harvestcraftFish[21])){ + return 40; + } + else if (name.equals(harvestcraftFish[22])){ + return 30; + } + else if (name.equals(harvestcraftFish[23])){ + return 5; + } + else if (name.equals(harvestcraftFish[24])){ + return 8; + } + else { + return 25; + } + } + + private static void addGregtechCentrifugeRecipe(final ItemStack input){ + if (LoadedMods.Gregtech){ + GT_Values.RA.addCentrifugeRecipe(input, null, null, FluidUtils.getFluidStack("methane", 96), null, null, null, null, null, null, null, 19*20, 5); + } + } + + private static void addGregtechMaceratorRecipe(final ItemStack input){ + if (LoadedMods.Gregtech){ + GT_ModHandler.addPulverisationRecipe(input, ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustTinyBone", 1), 0); + } + } + + private static void addGregtechFluidRecipe(final ItemStack input){ + if (LoadedMods.Gregtech){ + if (CORE.GTNH) { + CORE.RA.addFluidExtractionRecipe(input, FluidUtils.getFluidStack("fishoil", 50), 16, 4); + } + else { + CORE.RA.addFluidExtractionRecipe(input, FluidUtils.getFluidStack("fishoil", 4), 16, 4); //4eu/t total eu used = 64 so time = 64/4 + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java new file mode 100644 index 0000000000..41fec179b5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java @@ -0,0 +1,86 @@ +package gtPlusPlus.xmod.growthcraft.fishtrap; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.minecraft.item.ItemStack; + +public class Growthcraft_New { + + Method addTrapJunk; + Method addTrapTreasure; + Method addTrapFish; + Object FishTrapRegistryO; + + public Growthcraft_New(){ + setFishTrapRegistry(); + } + + void setFishTrapRegistry(){ + try { + Class FishTrapRegistryClass = Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry"); + Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); + if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())){ + addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry); + addTrapTreasure = FishTrapRegistryClass.getDeclaredMethod("addTrapTreasure", FishTrapEntry); + addTrapFish = FishTrapRegistryClass.getDeclaredMethod("addTrapFish", FishTrapEntry); + FishTrapRegistryO = FishTrapHandler.getFishingRegistry(); + } + } + catch (ClassNotFoundException | NoSuchMethodException | SecurityException e) { + e.printStackTrace(); + } + } + + private Object createFishTrapEntry(ItemStack loot, int chance){ + try { + Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); + Object o = FishTrapEntry.getConstructor(ItemStack.class, int.class); + if (FishTrapEntry != null){ + Constructor[] constructors = FishTrapEntry.getDeclaredConstructors(); + constructors[0].setAccessible(true); + Object x = constructors[0].newInstance(loot, chance); + if (x != null){ + return x; + } + } + } + catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + + return null; + } + + private boolean invoke(Method m, ItemStack o, int p){ + try { + Object I = createFishTrapEntry(o, p); + m.invoke(FishTrapRegistryO, I); + return true; + } + catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + return false; + } + + public void addTrapJunk(final ItemStack loot, final int lootChance){ + //FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance)); + if (addTrapJunk != null){ + invoke(addTrapJunk, loot, lootChance); + } + + } + + public void addTrapTreasure(final ItemStack loot, final int lootChance){ + //FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance)); + if (addTrapTreasure != null){ + invoke(addTrapTreasure, loot, lootChance); + } + } + + public void addTrapFish(final ItemStack loot, final int lootChance){ + //FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance)); + if (addTrapFish != null){ + invoke(addTrapFish, loot, lootChance); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java new file mode 100644 index 0000000000..ab11c062e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java @@ -0,0 +1,86 @@ +package gtPlusPlus.xmod.growthcraft.fishtrap; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.minecraft.item.ItemStack; + +public class Growthcraft_Old { + + Method addTrapJunk; + Method addTrapTreasure; + Method addTrapFish; + Object FishTrapRegistryO; + + public Growthcraft_Old(){ + setFishTrapRegistry(); + } + + void setFishTrapRegistry(){ + try { + Class FishTrapRegistryClass = Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry"); + Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); + if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())){ + addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry); + addTrapTreasure = FishTrapRegistryClass.getDeclaredMethod("addTrapTreasure", FishTrapEntry); + addTrapFish = FishTrapRegistryClass.getDeclaredMethod("addTrapFish", FishTrapEntry); + FishTrapRegistryO = FishTrapHandler.getFishingRegistry(); + } + } + catch (ClassNotFoundException | NoSuchMethodException | SecurityException e) { + e.printStackTrace(); + } + } + + private Object createFishTrapEntry(ItemStack loot, int chance){ + try { + Class FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry"); + Object o = FishTrapEntry.getConstructor(ItemStack.class, int.class); + if (FishTrapEntry != null){ + Constructor[] constructors = FishTrapEntry.getDeclaredConstructors(); + constructors[0].setAccessible(true); + Object x = constructors[0].newInstance(loot, chance); + if (x != null){ + return x; + } + } + } + catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + + return null; + } + + private boolean invoke(Method m, ItemStack o, int p){ + try { + Object I = createFishTrapEntry(o, p); + m.invoke(FishTrapRegistryO, I); + return true; + } + catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {} + return false; + } + + public void addTrapJunk(final ItemStack loot, final int lootChance){ + //FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance)); + if (addTrapJunk != null){ + invoke(addTrapJunk, loot, lootChance); + } + + } + + public void addTrapTreasure(final ItemStack loot, final int lootChance){ + //FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance)); + if (addTrapTreasure != null){ + invoke(addTrapTreasure, loot, lootChance); + } + } + + public void addTrapFish(final ItemStack loot, final int lootChance){ + //FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance)); + if (addTrapFish != null){ + invoke(addTrapFish, loot, lootChance); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/CustomInternalName.java b/src/main/java/gtPlusPlus/xmod/ic2/CustomInternalName.java new file mode 100644 index 0000000000..a349d7f86e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/CustomInternalName.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.ic2; + +import ic2.core.init.InternalName; +import net.minecraftforge.common.util.EnumHelper; + +public class CustomInternalName { + + public static InternalName aHazmatHelmetEx; + public static InternalName aHazmatChestEx; + public static InternalName aHazmatLegsEx; + public static InternalName aHazmatBootsEx; + + public static void init() { + aHazmatHelmetEx = EnumHelper.addEnum(InternalName.class, "itemArmorHazmatHelmetEx", new Class[] {}, new Object[] {}); + aHazmatChestEx = EnumHelper.addEnum(InternalName.class, "itemArmorHazmatChestplateEx", new Class[] {}, new Object[] {}); + aHazmatLegsEx = EnumHelper.addEnum(InternalName.class, "itemArmorHazmatLeggingsEx", new Class[] {}, new Object[] {}); + aHazmatBootsEx = EnumHelper.addEnum(InternalName.class, "itemArmorRubBootsEx", new Class[] {}, new Object[] {}); + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java b/src/main/java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java new file mode 100644 index 0000000000..bb97132ab4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java @@ -0,0 +1,28 @@ +package gtPlusPlus.xmod.ic2; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.ic2.item.IC2_Items; +import gtPlusPlus.xmod.ic2.recipe.RECIPE_IC2; + +public class HANDLER_IC2{ + + public static void preInit() { + if (LoadedMods.IndustrialCraft2){ + IC2_Items.register(); + //new BlockRTG(InternalName.beer); + } + } + + public static void init() { + if (LoadedMods.IndustrialCraft2){ + + } + } + + public static void postInit() { + if (LoadedMods.IndustrialCraft2){ + RECIPE_IC2.initRecipes(); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java new file mode 100644 index 0000000000..2a1b5ab44d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java @@ -0,0 +1,208 @@ +package gtPlusPlus.xmod.ic2.block.RTGGenerator; + +import java.util.List; +import java.util.Random; + +import org.apache.commons.lang3.mutable.MutableObject; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.xmod.ic2.block.kieticgenerator.tileentity.TileEntityKineticWindGenerator; +import gtPlusPlus.xmod.ic2.item.IC2_Items; +import gtPlusPlus.xmod.ic2.item.ItemGenerators; +import ic2.core.IC2; +import ic2.core.Ic2Items; +import ic2.core.block.BlockMultiID; +import ic2.core.block.TileEntityBlock; +import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric; +import ic2.core.init.InternalName; + +public class BlockRTG +extends BlockMultiID +{ + public BlockRTG(final InternalName internalName1) + { + super(internalName1, Material.iron, ItemGenerators.class); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setHardness(3.0F); + this.setStepSound(soundTypeMetal); + + IC2_Items.blockRTG = new ItemStack(this, 1, 0); + IC2_Items.blockKineticGenerator = new ItemStack(this, 1, 1); + + GameRegistry.registerTileEntity(TileEntityRTG.class, "RTG Mach II"); + GameRegistry.registerTileEntity(TileEntityKineticWindGenerator.class, "Wind Ripper Mach II"); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Override + public void getSubBlocks(final Item j, final CreativeTabs tabs, final List itemList) { + final Item item = Item.getItemFromBlock(this); + if (!item.getHasSubtypes()) { + itemList.add(new ItemStack(this)); + } else { + for (int i = 0; i < 16; i++) + { + final ItemStack is = new ItemStack(this, 1, i); + if (is.getItem().getUnlocalizedName(is) == null) { + break; + } + itemList.add(is); + } + } + } + + + @Override + public String getTextureFolder(final int id) + { + return "generator"; + } + + @Override + public int damageDropped(final int meta) + { + switch (meta) + { + case 2: + return 2; + } + return 0; + } + + @Override + public Class getTeClass(final int meta, final MutableObject[]> ctorArgTypes, final MutableObject ctorArgs) + { + try + { + switch (meta) + { + case 0: + return TileEntityRTG.class; + case 1: + return TileEntityKineticWindGenerator.class; + } + } + catch (final Exception e) + { + throw new RuntimeException(e); + } + return null; + } + + /* + * + * { + case 0: + return TileEntityGenerator.class; + case 1: + return TileEntityGeoGenerator.class; + case 2: + return TileEntityWaterGenerator.class; + case 3: + return TileEntitySolarGenerator.class; + case 4: + return TileEntityWindGenerator.class; + case 5: + return TileEntityNuclearReactorElectric.class; + case 6: + return TileEntityRTGenerator.class; + case 7: + return TileEntitySemifluidGenerator.class; + case 8: + return TileEntityStirlingGenerator.class; + case 9: + return TileEntityKineticGenerator.class; + } + * + * (non-Javadoc) + * @see net.minecraft.block.Block#randomDisplayTick(net.minecraft.world.World, int, int, int, java.util.Random) + */ + + @Override + public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random random) + { + if (!IC2.platform.isRendering()) { + return; + } + final int meta = world.getBlockMetadata(x, y, z); + if ((meta == 0) && (this.isActive(world, x, y, z))) + { + final TileEntityBlock te = (TileEntityBlock)this.getOwnTe(world, x, y, z); + if (te == null) { + return; + } + final int l = te.getFacing(); + final float f = x + 0.5F; + final float f1 = y + 0.0F + ((random.nextFloat() * 6.0F) / 16.0F); + final float f2 = z + 0.5F; + final float f3 = 0.52F; + final float f4 = (random.nextFloat() * 0.6F) - 0.3F; + switch (l) + { + case 4: + world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + break; + case 5: + world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + break; + case 2: + world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + break; + case 3: + world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + } + } + else if (meta == 5) + { + final TileEntityNuclearReactorElectric te = (TileEntityNuclearReactorElectric)this.getOwnTe(world, x, y, z); + if (te == null) { + return; + } + int puffs = te.heat / 1000; + if (puffs <= 0) { + return; + } + puffs = world.rand.nextInt(puffs); + for (int n = 0; n < puffs; n++) { + world.spawnParticle("smoke", x + random.nextFloat(), y + 0.95F, z + random.nextFloat(), 0.0D, 0.0D, 0.0D); + } + puffs -= world.rand.nextInt(4) + 3; + for (int n = 0; n < puffs; n++) { + world.spawnParticle("flame", x + random.nextFloat(), y + 1.0F, z + random.nextFloat(), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override + public boolean onBlockActivated(final World world, final int i, final int j, final int k, final EntityPlayer entityplayer, final int side, final float a, final float b, final float c) + { + if ((entityplayer.getCurrentEquippedItem() != null) && (entityplayer.getCurrentEquippedItem().isItemEqual(Ic2Items.reactorChamber))) { + return false; + } + return super.onBlockActivated(world, i, j, k, entityplayer, side, a, b, c); + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack stack) + { + return stack.getItemDamage() == 5 ? EnumRarity.uncommon : EnumRarity.common; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java new file mode 100644 index 0000000000..aa50243914 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java @@ -0,0 +1,88 @@ +package gtPlusPlus.xmod.ic2.block.RTGGenerator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; + +import gtPlusPlus.xmod.ic2.block.RTGGenerator.gui.CONTAINER_RTG; +import gtPlusPlus.xmod.ic2.block.RTGGenerator.gui.GUI_RTG; +import ic2.core.ContainerBase; +import ic2.core.Ic2Items; +import ic2.core.block.generator.tileentity.TileEntityRTGenerator; +import ic2.core.block.invslot.InvSlotConsumable; +import ic2.core.block.invslot.InvSlotConsumableId; + +public class TileEntityRTG +extends TileEntityRTGenerator +{ + public final InvSlotConsumable fuelSlot; + + public TileEntityRTG() + { + this.fuelSlot = new InvSlotConsumableId(this, "fuelSlot", 0, 12, new Item[] { Ic2Items.RTGPellets.getItem() }); + } + + @Override + public int gaugeFuelScaled(final int i) + { + return i; + } + + @Override + public boolean gainEnergy() + { + int counter = 0; + for (int i = 0; i < this.fuelSlot.size(); i++) { + if (this.fuelSlot.get(i) != null) { + counter++; + } + } + if (counter == 0) { + return false; + } + this.storage += (int)Math.pow(2.0D, counter - 1); + return true; + } + + @Override + public boolean gainFuel() + { + return false; + } + + @Override + public boolean needsFuel() + { + return true; + } + + @Override + public String getInventoryName() + { + return "RTG"; + } + + @Override + public ContainerBase getGuiContainer(final EntityPlayer entityPlayer) + { + return new CONTAINER_RTG(entityPlayer, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen getGui(final EntityPlayer entityPlayer, final boolean isAdmin) + { + return new GUI_RTG(new CONTAINER_RTG(entityPlayer, this)); + } + + @Override + public boolean delayActiveUpdate() + { + return true; + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java new file mode 100644 index 0000000000..0afe47c983 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java @@ -0,0 +1,37 @@ +package gtPlusPlus.xmod.ic2.block.RTGGenerator.gui; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; + +import gtPlusPlus.xmod.ic2.block.RTGGenerator.TileEntityRTG; +import ic2.core.block.generator.container.ContainerRTGenerator; +import ic2.core.slot.SlotInvSlot; + +public class CONTAINER_RTG +extends ContainerRTGenerator +{ + public CONTAINER_RTG(final EntityPlayer entityPlayer, final TileEntityRTG tileEntity1) + { + super(entityPlayer, tileEntity1); + for (int i = 0; i < 4; i++) { + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + (i * 18), 18)); + } + for (int i = 4; i < 8; i++) { + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + ((i - 4) * 18), 36)); + } + for (int i = 8; i < 12; i++) { + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + ((i - 8) * 18), 54)); + } + } + + @Override + public List getNetworkedFields() + { + final List ret = super.getNetworkedFields(); + + ret.add("storage"); + + return ret; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java new file mode 100644 index 0000000000..c6e09a78d1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java @@ -0,0 +1,52 @@ +package gtPlusPlus.xmod.ic2.block.RTGGenerator.gui; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import gtPlusPlus.xmod.ic2.block.RTGGenerator.TileEntityRTG; +import ic2.core.IC2; +import ic2.core.block.generator.gui.GuiRTGenerator; +import ic2.core.util.GuiTooltipHelper; + +@SideOnly(Side.CLIENT) +public class GUI_RTG +extends GuiRTGenerator +{ + public CONTAINER_RTG container; + + public GUI_RTG(final CONTAINER_RTG container1) + { + super(container1); + + this.container = container1; + this.name = "RTG Mach II"; + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) + { + this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 4, 4210752); + + GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocalFormatted("ic2.generic.text.bufferEU", new Object[] { Double.valueOf(((TileEntityRTG)this.container.base).storage) }), 117, 38, 150, 48); + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int x, final int y) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(background); + final int j = (this.width - this.xSize) / 2; + final int k = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize); + + final int i1 = ((TileEntityRTG)this.container.base).gaugeStorageScaled(31); + this.drawTexturedModalRect(j + 119, k + 40, 179, 3, i1, 8); + } + + private static final ResourceLocation background = new ResourceLocation(IC2.textureDomain, "textures/gui/GUIRTGenerator.png"); +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java new file mode 100644 index 0000000000..95e785d1a1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_BlockKineticGenerator.java @@ -0,0 +1,77 @@ +package gtPlusPlus.xmod.ic2.block.kieticgenerator; + +import org.apache.commons.lang3.mutable.MutableObject; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import ic2.core.block.BlockMultiID; +import ic2.core.block.kineticgenerator.tileentity.TileEntityManualKineticGenerator; +import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator; +import ic2.core.init.InternalName; +import ic2.core.item.block.ItemKineticGenerator; + +public class IC2_BlockKineticGenerator +extends BlockMultiID +{ + public IC2_BlockKineticGenerator(final InternalName internalName1) + { + super(internalName1, Material.iron, ItemKineticGenerator.class); + + this.setHardness(3.0F); + this.setStepSound(Block.soundTypeMetal); + this.setCreativeTab(AddToCreativeTab.tabMachines); + + GameRegistry.registerTileEntity(TileEntityWindKineticGenerator.class, "Advanced Kinetic Wind Generator"); + + } + + @Override + public String getTextureFolder(final int id) + { + return "kineticgenerator"; + } + + @Override + public int damageDropped(final int meta) + { + return meta; + } + + @Override + public Class getTeClass(final int meta, final MutableObject[]> ctorArgTypes, final MutableObject ctorArgs) + { + try + { + switch (meta) + { + case 0: + return TileEntityWindKineticGenerator.class; + } + } + catch (final Exception e) + { + e.printStackTrace(); + } + return null; + } + + @Override + public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer entityPlayer, final int side, final float a, final float b, final float c) + { + if (entityPlayer.isSneaking()) { + return false; + } + final TileEntity te = this.getOwnTe(world, x, y, z); + if ((te != null) && ((te instanceof TileEntityManualKineticGenerator))) { + return ((TileEntityManualKineticGenerator)te).playerKlicked(entityPlayer); + } + return super.onBlockActivated(world, x, y, z, entityPlayer, side, a, b, c); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java new file mode 100644 index 0000000000..2c4c2e1d16 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/IC2_TEComponent.java @@ -0,0 +1,48 @@ +package gtPlusPlus.xmod.ic2.block.kieticgenerator; + +import java.io.DataInput; +import java.io.IOException; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTTagCompound; + +import ic2.core.block.TileEntityBlock; + +public abstract class IC2_TEComponent +{ + protected final TileEntityBlock parent; + + public IC2_TEComponent(final TileEntityBlock parent) + { + this.parent = parent; + } + + public abstract String getDefaultName(); + + public void readFromNbt(final NBTTagCompound nbt) {} + + public NBTTagCompound writeToNbt() + { + return null; + } + + public void onLoaded() {} + + public void onUnloaded() {} + + public void onNeighborUpdate(final Block srcBlock) {} + + public void onContainerUpdate(final String name, final EntityPlayerMP player) {} + + public void onNetworkUpdate(final DataInput is) + throws IOException + {} + + public boolean enableWorldTick() + { + return false; + } + + public void onWorldTick() {} +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java new file mode 100644 index 0000000000..2a5b4dc9ae --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/ContainerKineticWindgenerator.java @@ -0,0 +1,28 @@ +package gtPlusPlus.xmod.ic2.block.kieticgenerator.container; + +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; + +import ic2.core.ContainerFullInv; +import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator; +import ic2.core.slot.SlotInvSlot; + +public class ContainerKineticWindgenerator +extends ContainerFullInv +{ + public ContainerKineticWindgenerator(final EntityPlayer entityPlayer, final TileEntityWindKineticGenerator tileEntity1) + { + super(entityPlayer, tileEntity1, 166); + + this.addSlotToContainer(new SlotInvSlot(tileEntity1.rotorSlot, 0, 80, 26)); + } + + @Override + public List getNetworkedFields() + { + final List ret = super.getNetworkedFields(); + ret.add("windStrength"); + return ret; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java new file mode 100644 index 0000000000..740991c5d3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/container/IC2_ContainerBase.java @@ -0,0 +1,5 @@ +package gtPlusPlus.xmod.ic2.block.kieticgenerator.container; + +public class IC2_ContainerBase { + +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java new file mode 100644 index 0000000000..44053ed2e0 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/gui/GuiKineticWindGenerator.java @@ -0,0 +1,78 @@ +package gtPlusPlus.xmod.ic2.block.kieticgenerator.gui; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import ic2.core.IC2; +import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator; +import ic2.core.util.GuiTooltipHelper; + +@SideOnly(Side.CLIENT) +public class GuiKineticWindGenerator +extends GuiContainer +{ + public ContainerWindKineticGenerator container; + public String name; + + public GuiKineticWindGenerator(final ContainerWindKineticGenerator container1) + { + super(container1); + + this.container = container1; + this.name = StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.name"); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int par1, final int par2) + { + this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 6, 4210752); + if (this.container.base.checkrotor()) + { + if (!this.container.base.rotorspace()) + { + this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotorspace"), 20, 52, 2157374); + } + else if ((this.container.base.checkrotor()) && (!this.container.base.guiisminWindStrength())) + { + this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak1"), 27, 52, 2157374); + this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.windweak2"), 24, 69, 2157374); + } + else + { + this.fontRendererObj.drawString(StatCollector.translateToLocalFormatted("ic2.WindKineticGenerator.gui.output", new Object[] { Integer.valueOf(this.container.base.getKuOutput()) }), 55, 52, 2157374); + this.fontRendererObj.drawString(this.container.base.getRotorhealth() + " %", 46, 70, 2157374); + if (this.container.base.guiisoverload()) + { + GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocal("ic2.WindKineticGenerator.error.overload"), 44, 20, 79, 45); + GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocal("ic2.WindKineticGenerator.error.overload2"), 102, 20, 131, 45); + } + } + } + else { + this.fontRendererObj.drawString(StatCollector.translateToLocal("ic2.WindKineticGenerator.gui.rotormiss"), 27, 52, 2157374); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int x, final int y) + { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(background); + final int j = (this.width - this.xSize) / 2; + final int k = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize); + if ((this.container.base.guiisoverload()) && (this.container.base.checkrotor())) + { + this.drawTexturedModalRect(j + 44, k + 20, 176, 0, 30, 26); + this.drawTexturedModalRect(j + 102, k + 20, 176, 0, 30, 26); + } + } + + private static final ResourceLocation background = new ResourceLocation(IC2.textureDomain, "textures/gui/GUIWindKineticGenerator.png"); +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java new file mode 100644 index 0000000000..a2c39cb17b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/block/kieticgenerator/tileentity/TileEntityKineticWindGenerator.java @@ -0,0 +1,389 @@ +package gtPlusPlus.xmod.ic2.block.kieticgenerator.tileentity; + +import java.util.List; +import java.util.Vector; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.block.Block; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import net.minecraft.world.ChunkCache; + +import ic2.api.energy.tile.IKineticSource; +import ic2.api.item.IKineticRotor; +import ic2.api.item.IKineticRotor.GearboxType; +import ic2.core.*; +import ic2.core.block.invslot.InvSlotConsumableKineticRotor; +import ic2.core.block.kineticgenerator.container.ContainerWindKineticGenerator; +import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; +import ic2.core.block.kineticgenerator.tileentity.TileEntityWindKineticGenerator; +import ic2.core.util.Util; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEntityKineticWindGenerator +extends TileEntityWindKineticGenerator +implements IKineticSource, IHasGui +{ + public final InvSlotConsumableKineticRotor rotorSlot; + private double windStrength; + private int obstructedCrossSection; + private int crossSection; + private int updateTicker; + private float rotationSpeed; + private static final double efficiencyRollOffExponent = 2.0D; + private static final int nominalRotationPeriod = 500; + + public TileEntityKineticWindGenerator() + { + this.updateTicker = IC2.random.nextInt(this.getTickRate()); + this.rotorSlot = new InvSlotConsumableKineticRotor(this, "rotorslot", 0, null, 1, null, GearboxType.WIND); + } + + + public void update2Entity() + { + super.updateEntity(); + + assert (IC2.platform.isSimulating()); + if ((this.updateTicker++ % this.getTickRate()) != 0) { + return; + } + boolean needsInvUpdate = false; + if (!this.rotorSlot.isEmpty()) + { + if (this.checkSpace(1, true) == 0) + { + if (this.getActive() != true) { + this.setActive(true); + } + needsInvUpdate = true; + } + else + { + if (this.getActive()) { + this.setActive(false); + } + needsInvUpdate = true; + } + } + else + { + if (this.getActive()) { + this.setActive(false); + } + needsInvUpdate = true; + } + if (this.getActive()) + { + this.crossSection = (((this.getRotorDiameter() / 2) * 2 * 2) + 1); + + this.crossSection *= this.crossSection; + this.obstructedCrossSection = this.checkSpace(this.getRotorDiameter() * 3, false); + if ((this.obstructedCrossSection > 0) && (this.obstructedCrossSection <= ((this.getRotorDiameter() + 1) / 2))) { + this.obstructedCrossSection = 0; + } else if (this.obstructedCrossSection < 0) { + this.obstructedCrossSection = this.crossSection; + } + this.windStrength = this.calcWindStrength(); + + final float speed = (float)Util.limit((this.windStrength - this.getMinWindStrength()) / this.getMaxWindStrength(), 0.0D, 2.0D); + + + this.setRotationSpeed(speed*2); + if (this.windStrength >= this.getMinWindStrength()) { + if (this.windStrength <= this.getMaxWindStrength()) { + this.rotorSlot.damage(1, false); + } else { + this.rotorSlot.damage(4, false); + } + } + } + } + + + + @Override + public List getNetworkedFields() + { + final List ret = new Vector<>(1); + + ret.add("rotationSpeed"); + ret.add("rotorSlot"); + ret.addAll(super.getNetworkedFields()); + + return ret; + } + + @Override + public ContainerBase getGuiContainer(final EntityPlayer entityPlayer) + { + return new ContainerWindKineticGenerator(entityPlayer, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen getGui(final EntityPlayer entityPlayer, final boolean isAdmin) + { + return new GuiWindKineticGenerator(new ContainerWindKineticGenerator(entityPlayer, this)); + } + + @Override + public boolean facingMatchesDirection(final ForgeDirection direction) + { + return direction.ordinal() == this.getFacing(); + } + + @Override + public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) + { + if ((side == 0) || (side == 1)) { + return false; + } + return this.getFacing() != side; + } + + @Override + public void setFacing(final short side) + { + super.setFacing(side); + } + + public boolean enableUpdateEntity() + { + return IC2.platform.isSimulating(); + } + + @Override + public String getRotorhealth() + { + if (!this.rotorSlot.isEmpty()) { + return StatCollector.translateToLocalFormatted("ic2.WindKineticGenerator.gui.rotorhealth", new Object[] { Integer.valueOf((int)(100.0F - ((this.rotorSlot.get().getItemDamage() / this.rotorSlot.get().getMaxDamage()) * 100.0F))) }); + } + return ""; + } + + @Override + public int maxrequestkineticenergyTick(final ForgeDirection directionFrom) + { + return this.getKuOutput(); + } + + @Override + public int requestkineticenergy(final ForgeDirection directionFrom, final int requestkineticenergy) + { + if (this.facingMatchesDirection(directionFrom.getOpposite())) { + return Math.min(requestkineticenergy, this.getKuOutput()); + } + return 0; + } + + @Override + public String getInventoryName() + { + return "Advanced Kinetic Wind Generator"; + } + + @Override + public void onGuiClosed(final EntityPlayer entityPlayer) {} + + @Override + public boolean shouldRenderInPass(final int pass) + { + return pass == 0; + } + + @Override + public int checkSpace(int length, final boolean onlyrotor) + { + int box = this.getRotorDiameter() / 2; + int lentemp = 0; + if (onlyrotor) + { + length = 1; + lentemp = length + 1; + } + if (!onlyrotor) { + box *= 2; + } + final ForgeDirection fwdDir = ForgeDirection.VALID_DIRECTIONS[this.getFacing()]; + final ForgeDirection rightDir = fwdDir.getRotation(ForgeDirection.DOWN); + + final int xMaxDist = Math.abs((length * fwdDir.offsetX) + (box * rightDir.offsetX)); + + final int zMaxDist = Math.abs((length * fwdDir.offsetZ) + (box * rightDir.offsetZ)); + + + final ChunkCache chunkCache = new ChunkCache(this.worldObj, this.xCoord - xMaxDist, this.yCoord - box, this.zCoord - zMaxDist, this.xCoord + xMaxDist, this.yCoord + box, this.zCoord + zMaxDist, 0); + + + + int ret = 0; + for (int up = -box; up <= box; up++) + { + final int y = this.yCoord + up; + for (int right = -box; right <= box; right++) + { + boolean occupied = false; + for (int fwd = lentemp - length; fwd <= length; fwd++) + { + final int x = this.xCoord + (fwd * fwdDir.offsetX) + (right * rightDir.offsetX); + + final int z = this.zCoord + (fwd * fwdDir.offsetZ) + (right * rightDir.offsetZ); + + + assert (Math.abs(x - this.xCoord) <= xMaxDist); + assert (Math.abs(z - this.zCoord) <= zMaxDist); + + final Block block = chunkCache.getBlock(x, y, z); + if (!block.isAir(chunkCache, x, y, z)) + { + occupied = true; + if (((up != 0) || (right != 0) || (fwd != 0)) && ((chunkCache.getTileEntity(x, y, z) instanceof TileEntityKineticWindGenerator)) && (!onlyrotor)) { + return -1; + } + } + } + if (occupied) { + ret++; + } + } + } + return ret; + } + + @Override + public boolean checkrotor() + { + return !this.rotorSlot.isEmpty(); + } + + @Override + public boolean rotorspace() + { + return this.checkSpace(1, true) == 0; + } + + private void setRotationSpeed(final float speed) + { + if (this.rotationSpeed != speed) + { + this.rotationSpeed = speed; + IC2.network.get().updateTileEntityField(this, "rotationSpeed"); + } + } + + @Override + public int getTickRate() + { + return 32; + } + + @Override + public double calcWindStrength() + { + double windStr = WorldData.get(this.worldObj).windSim.getWindAt(this.yCoord); + + windStr *= (1.0D - Math.pow(this.obstructedCrossSection / this.crossSection, 2.0D)); + + + return Math.max(0.0D, windStr); + } + + @Override + public float getAngle() + { + if (this.rotationSpeed > 0.0F) + { + final long period = (long) (5.0E+008F / this.rotationSpeed); + + + return ((float)(System.nanoTime() % period) / (float)period) * 360.0F; + } + return 0.0F; + } + + @Override + public float getefficiency() + { + final ItemStack stack = this.rotorSlot.get(); + if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { + return (float) (((IKineticRotor)stack.getItem()).getEfficiency(stack)*1.5); + } + return 0.0F; + } + + @Override + public int getMinWindStrength() + { + final ItemStack stack = this.rotorSlot.get(); + if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { + return ((IKineticRotor)stack.getItem()).getMinWindStrength(stack)/2; + } + return 0; + } + + @Override + public int getMaxWindStrength() + { + final ItemStack stack = this.rotorSlot.get(); + if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { + return ((IKineticRotor)stack.getItem()).getMaxWindStrength(stack)*2; + } + return 0; + } + + @Override + public int getRotorDiameter() + { + final ItemStack stack = this.rotorSlot.get(); + if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { + return ((IKineticRotor)stack.getItem()).getDiameter(stack)/2; + } + return 0; + } + + @Override + public ResourceLocation getRotorRenderTexture() + { + final ItemStack stack = this.rotorSlot.get(); + if ((stack != null) && ((stack.getItem() instanceof IKineticRotor))) { + return ((IKineticRotor)stack.getItem()).getRotorRenderTexture(stack); + } + return new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorWoodmodel.png"); + } + + @Override + public boolean guiisoverload() + { + if (this.windStrength > this.getMaxWindStrength()) { + return true; + } + return false; + } + + @Override + public boolean guiisminWindStrength() + { + return this.windStrength >= this.getMinWindStrength(); + } + + @Override + public int getKuOutput() + { + if ((this.windStrength >= this.getMinWindStrength()) && (this.getActive())) { + return (int)(this.windStrength * 50.0D * this.getefficiency()); + } + return 0; + } + + @Override + public int getWindStrength() + { + return (int)this.windStrength; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java b/src/main/java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java new file mode 100644 index 0000000000..92d711101b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/CustomKineticRotor.java @@ -0,0 +1,276 @@ +package gtPlusPlus.xmod.ic2.item; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.Utils; +import ic2.api.item.IKineticRotor; +import ic2.core.IC2; +import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator; +import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +public class CustomKineticRotor extends Item implements IKineticRotor { + + private final int mTier; + + @SideOnly(Side.CLIENT) + private IIcon[] mTextures; + + private static final String[] mRegistrationNames = new String[] { + "itemwoodrotor", "itemironrotor", "itemsteelrotor", "itemwcarbonrotor" + }; + + private static final String[] mUnlocalNames = new String[] { + "itemEnergeticRotor", + "itemTungstenSteelRotor", + "itemVibrantRotor", + "itemIridiumRotor", + "itemMagnaliumRotor", + "itemUltimetRotor", + }; + private static final int[] mMaxDurability = new int[] { + 512000, 809600, 1600000, 3200000 + }; + private static final int[] mRadius = new int[] { + 9, 11, 13, 15 + }; + private static final float[] mEfficiency = new float[] { + 0.9f, 1.0f, 1.2f, 1.5f + }; + private static final int[] mMinWindStrength = new int[] { + 12, 14, 16, 18 + }; + private static final int[] mMaxWindStrength = new int[] { + 80, 120, 160, 320 + }; + + private static final ResourceLocation[] mResourceLocations = new ResourceLocation[] { + new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorEnergeticModel.png"), + new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorTungstenSteelModel.png"), + new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorVibrantModel.png"), + new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorIridiumModel.png"), + new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorMagnaliumModel.png"), + new ResourceLocation(IC2.textureDomain, "textures/items/rotors/rotorUltimetModel.png"), + }; + + private final int maxWindStrength; + private final int minWindStrength; + private final int radius; + private final float efficiency; + private final ResourceLocation renderTexture; + + public CustomKineticRotor(int aTier) { + mTier = aTier; + this.setMaxStackSize(1); + // Handle Differences if EIO is not loaded + if (!LoadedMods.EnderIO && (aTier == 0 || aTier == 2)) { + this.renderTexture = mResourceLocations[(aTier == 0 ? 4 : 5)]; + this.setUnlocalizedName(mUnlocalNames[(aTier == 0 ? 4 : 5)]); + } + else { + this.renderTexture = mResourceLocations[aTier]; + this.setUnlocalizedName(mUnlocalNames[aTier]); + } + this.setMaxDamage(mMaxDurability[aTier]); + this.radius = mRadius[aTier]; + this.efficiency = mEfficiency[aTier]; + this.minWindStrength = mMinWindStrength[aTier]; + this.maxWindStrength = mMaxWindStrength[aTier]; + this.setNoRepair(); + this.setCreativeTab(IC2.tabIC2); + GameRegistry.registerItem(this, mRegistrationNames[aTier]); + } + + @Override + public void setDamage(final ItemStack stack, final int damage) { + if (mTier < 3) { + super.setDamage(stack, damage); + } + } + + @Override + public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) { + + info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", new Object[]{this.minWindStrength, this.maxWindStrength})); + + GearboxType type = null; + if (Minecraft.getMinecraft().currentScreen != null && Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator) { + type = GearboxType.WATER; + } + else if (Minecraft.getMinecraft().currentScreen != null && Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator) { + type = GearboxType.WIND; + } + + if (type != null) { + info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + this.isAcceptedType(itemStack, type))); + } + + } + + @Override + public int getDiameter(final ItemStack stack) + { + return this.radius; + } + + @Override + public ResourceLocation getRotorRenderTexture(final ItemStack stack) + { + return this.renderTexture; + } + + @Override + public float getEfficiency(final ItemStack stack) + { + return this.efficiency; + } + + @Override + public int getMinWindStrength(final ItemStack stack) + { + return this.minWindStrength; + } + + @Override + public int getMaxWindStrength(final ItemStack stack) + { + return this.maxWindStrength; + } + + @Override + public boolean isAcceptedType(final ItemStack stack, final IKineticRotor.GearboxType type){ + return (type == IKineticRotor.GearboxType.WIND) || (type == IKineticRotor.GearboxType.WATER); + } + + public String getUnlocalizedName() { + return "ic2." + super.getUnlocalizedName().substring(5); + } + + public String getUnlocalizedName(ItemStack itemStack) { + return this.getUnlocalizedName(); + } + + public String getItemStackDisplayName(ItemStack itemStack) { + return StatCollector.translateToLocal(this.getUnlocalizedName(itemStack)); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return mTier < 3; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { + if (mTier == 0) { + return mTextures[4]; + } + else { + return mTextures[5]; + } + } + else { + return mTextures[mTier]; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconIndex(ItemStack aIndex) { + if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { + if (mTier == 0) { + return mTextures[4]; + } + else { + return mTextures[5]; + } + } + else { + return mTextures[mTier]; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamageForRenderPass(int aDmg, int aPass) { + if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { + if (mTier == 0) { + return mTextures[4]; + } + else { + return mTextures[5]; + } + } + else { + return mTextures[mTier]; + } + } + + @Override + protected String getIconString() { + return super.getIconString(); + } + + @Override + public int getDisplayDamage(ItemStack stack) { + return super.getDisplayDamage(stack); + } + + @Override + public double getDurabilityForDisplay(ItemStack stack) { + return super.getDurabilityForDisplay(stack); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { + if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { + if (mTier == 0) { + return mTextures[4]; + } + else { + return mTextures[5]; + } + } + else { + return mTextures[mTier]; + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(ItemStack stack, int pass) { + if (!LoadedMods.EnderIO && (mTier == 0 || mTier == 2)) { + if (mTier == 0) { + return mTextures[4]; + } + else { + return mTextures[5]; + } + } + else { + return mTextures[mTier]; + } + } + + @Override + public void registerIcons(IIconRegister iconRegister) { + int aIndex = 0; + mTextures = new IIcon[6]; + for (String y : mUnlocalNames) { + mTextures[aIndex++] = iconRegister.registerIcon(IC2.textureDomain + ":" + "rotors/" + y); + } + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java new file mode 100644 index 0000000000..bd1ad91588 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradual.java @@ -0,0 +1,43 @@ +package gtPlusPlus.xmod.ic2.item; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; + +public class IC2_ItemGradual +extends CoreItem +{ + public IC2_ItemGradual(final String internalName) + { + super(internalName, AddToCreativeTab.tabMachines, 1, 10000, "", EnumRarity.uncommon); + this.setNoRepair(); + } + + @Override + public boolean isDamaged(final ItemStack stack) + { + return this.getDamage(stack) > 1; + } + + @Override + public boolean showDurabilityBar(final ItemStack stack) + { + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(final Item item, final CreativeTabs tabs, final List itemList) + { + itemList.add(new ItemStack(this, 1, 1)); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java new file mode 100644 index 0000000000..3ccb2cb0ee --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemGradualInteger.java @@ -0,0 +1,54 @@ +package gtPlusPlus.xmod.ic2.item; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import ic2.api.item.ICustomDamageItem; +import ic2.core.util.StackUtil; + +public class IC2_ItemGradualInteger +extends IC2_ItemGradual +implements ICustomDamageItem +{ + private final int maxDmg; + + public IC2_ItemGradualInteger(final String internalName, final int maxdmg) + { + super(internalName); + + this.maxDmg = maxdmg; + } + + @Override + public int getCustomDamage(final ItemStack stack) + { + final NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); + return nbt.getInteger("advDmg"); + } + + @Override + public int getMaxCustomDamage(final ItemStack stack) + { + return this.maxDmg; + } + + @Override + public void setCustomDamage(final ItemStack stack, final int damage) + { + final NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); + nbt.setInteger("advDmg", 0); + + final int maxStackDamage = stack.getMaxDamage(); + if (maxStackDamage > 2) { + //stack.setItemDamage(1 + (int)Util.map(damage, this.maxDmg, maxStackDamage - 2)); + } + } + + @Override + public boolean applyCustomDamage(final ItemStack stack, final int damage, final EntityLivingBase src) + { + this.setCustomDamage(stack, this.getCustomDamage(stack) + damage); + return true; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java new file mode 100644 index 0000000000..897e831b73 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java @@ -0,0 +1,106 @@ +package gtPlusPlus.xmod.ic2.item; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + +public class IC2_ItemIC2 +extends Item +{ + public IC2_ItemIC2(final String internalName) + { + this.setUnlocalizedName(internalName); + this.setCreativeTab(AddToCreativeTab.tabMachines); + this.setTextureName(CORE.MODID + ":" + internalName); + + GameRegistry.registerItem(this, internalName); + } + + public String getTextureFolder() + { + return null; + } + + /* public String getTextureName(int index) + { + if ((!this.hasSubtypes) && (index > 0)) { + return null; + } + String name = getUnlocalizedName(new ItemStack(this, 1, index)); + if ((name != null) && (name.length() > 4)) { + return name.substring(4); + } + return name; + } + + @Override +@SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + int indexCount = 0; + while (getTextureName(indexCount) != null) + { + indexCount++; + if (indexCount > 32767) { + throw new RuntimeException("More Item Icons than actually possible @ " + getUnlocalizedName()); + } + } + this.textures = new IIcon[indexCount]; + for (int index = 0; index < indexCount; index++) { + this.textures[index] = iconRegister.registerIcon(CORE.MODID + ":" + getUnlocalizedName()); + } + } + + @Override +@SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + if (meta < this.textures.length) { + return this.textures[meta]; + } + return this.textures.length < 1 ? null : this.textures[0]; + }*/ + + @Override + public String getUnlocalizedName() + { + return super.getUnlocalizedName(); + } + + @Override + public String getUnlocalizedName(final ItemStack itemStack) + { + return this.getUnlocalizedName(); + } + + @Override + public String getItemStackDisplayName(final ItemStack itemStack) + { + return StatCollector.translateToLocal(this.getUnlocalizedName(itemStack)); + } + + public IC2_ItemIC2 setRarity(final int aRarity) + { + this.rarity = aRarity; + return this; + } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(final ItemStack stack) + { + return EnumRarity.values()[this.rarity]; + } + + private int rarity = 0; + protected IIcon[] textures; +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_Items.java b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_Items.java new file mode 100644 index 0000000000..8c8b2ea7ad --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_Items.java @@ -0,0 +1,60 @@ +package gtPlusPlus.xmod.ic2.item; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.item.wearable.hazmat.ItemArmorHazmatEx; +import gtPlusPlus.core.lib.LoadedMods; +import net.minecraft.item.ItemStack; + +public class IC2_Items { + + public static ItemStack rotor_Material_1; //Energetic Alloy + public static ItemStack rotor_Material_2; //TungstenSteel + public static ItemStack rotor_Material_3; //Vibrant Alloy + public static ItemStack rotor_Material_4; //Iridium + + public static ItemStack rotor_Blade_Material_1; + public static ItemStack rotor_Blade_Material_2; + public static ItemStack rotor_Blade_Material_3; + public static ItemStack rotor_Blade_Material_4; + + public static ItemStack shaft_Material_1; //Energetic Alloy + public static ItemStack shaft_Material_2; //TungstenSteel + public static ItemStack shaft_Material_3; //Vibrant Alloy + public static ItemStack shaft_Material_4; //Iridium + + public static ItemStack blockRTG; + public static ItemStack blockKineticGenerator; + + private static final String[] mData1 = new String[] {"itemEnergeticRotorBlade", "itemMagnaliumRotorBlade"}; + private static final String[] mData2 = new String[] {"itemEnergeticShaft", "itemMagnaliumShaft"}; + private static final String[] mData3 = new String[] {"itemVibrantRotorBlade", "itemUltimetRotorBlade"}; + private static final String[] mData4 = new String[] {"itemVibrantShaft", "itemUltimetShaft"}; + + + public static void register(){ + + int aIndexEIO = (LoadedMods.EnderIO ? 0 : 1); + + // Rotor Blades + rotor_Blade_Material_1 = new ItemStack (new CoreItem(mData1[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + rotor_Blade_Material_2 = new ItemStack (new CoreItem("itemTungstenSteelRotorBlade", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + rotor_Blade_Material_3 = new ItemStack (new CoreItem(mData3[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + rotor_Blade_Material_4 = new ItemStack (new CoreItem("itemIridiumRotorBlade", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + + // Rotor Shafts + shaft_Material_1 = new ItemStack (new CoreItem(mData2[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + shaft_Material_2 = new ItemStack (new CoreItem("itemTungstenSteelShaft", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + shaft_Material_3 = new ItemStack (new CoreItem(mData4[aIndexEIO], AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + shaft_Material_4 = new ItemStack (new CoreItem("itemIridiumShaft", AddToCreativeTab.tabMachines, 16, "A part for an advanced Kinetic Rotor")); + + // Rotors + rotor_Material_1 = new ItemStack (new CustomKineticRotor(0)); + rotor_Material_2 = new ItemStack (new CustomKineticRotor(1)); + rotor_Material_3 = new ItemStack (new CustomKineticRotor(2)); + rotor_Material_4 = new ItemStack (new CustomKineticRotor(3)); + + ItemArmorHazmatEx.init(); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java b/src/main/java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java new file mode 100644 index 0000000000..0df2c8d7f1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/ItemGenerators.java @@ -0,0 +1,55 @@ +package gtPlusPlus.xmod.ic2.item; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + +import ic2.core.item.block.ItemBlockIC2; + +public class ItemGenerators +extends ItemBlockIC2 +{ + public ItemGenerators(final Block block) + { + super(block); + + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + @Override + public int getMetadata(final int i) + { + return i; + } + + @Override + public String getUnlocalizedName(final ItemStack itemstack) + { + final int meta = itemstack.getItemDamage(); + switch (meta) + { + case 0: + return "ic2.blockRTGenerator2"; + case 1: + return "ic2.blockKineticGenerator2"; + } + return null; + } + + @Override + public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) + { + final int meta = itemStack.getItemDamage(); + switch (meta) + { + case 0: + info.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerOutput") + " 1-32 EU/t " + StatCollector.translateToLocal("ic2.item.tooltip.max")); break; + case 1: + info.add(StatCollector.translateToLocal("ic2.item.tooltip.PowerOutput") + " 1-512 EU/t " + StatCollector.translateToLocal("ic2.item.tooltip.max")); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/RotorBase.java b/src/main/java/gtPlusPlus/xmod/ic2/item/RotorBase.java new file mode 100644 index 0000000000..b9f9ab68ef --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/RotorBase.java @@ -0,0 +1,100 @@ +package gtPlusPlus.xmod.ic2.item; + +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import ic2.api.item.IKineticRotor; +import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator; +import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; +import ic2.core.init.InternalName; +import ic2.core.item.resources.ItemWindRotor; + +public class RotorBase extends ItemWindRotor{ + + private final int maxWindStrength; + private final int minWindStrength; + private final int radius; + private final float efficiency; + private final ResourceLocation renderTexture; + private final boolean water; + + public RotorBase(final InternalName internalName, final int Radius, final int durability, final float efficiency, final int minWindStrength, final int maxWindStrength, final ResourceLocation RenderTexture) + { + super(internalName, Radius, durability, efficiency, minWindStrength, maxWindStrength, RenderTexture); + + + + this.setMaxStackSize(1); + this.setMaxDamage(durability); + + this.radius = Radius; + this.efficiency = efficiency; + this.renderTexture = RenderTexture; + this.minWindStrength = minWindStrength; + this.maxWindStrength = maxWindStrength; + this.water = true; + } + + @Override + public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) + { + info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", new Object[] { Integer.valueOf(this.minWindStrength), Integer.valueOf(this.maxWindStrength) })); + IKineticRotor.GearboxType type = null; + if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator))) { + type = IKineticRotor.GearboxType.WATER; + } else if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator))) { + type = IKineticRotor.GearboxType.WIND; + } + if (type != null) { + //info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + isAcceptedType(itemStack, type))); + } + } + + @Override + public String getTextureFolder() + { + return "rotors"; + } + + @Override + public int getDiameter(final ItemStack stack) + { + return this.radius; + } + + @Override + public ResourceLocation getRotorRenderTexture(final ItemStack stack) + { + return this.renderTexture; + } + + @Override + public float getEfficiency(final ItemStack stack) + { + return this.efficiency; + } + + @Override + public int getMinWindStrength(final ItemStack stack) + { + return this.minWindStrength; + } + + @Override + public int getMaxWindStrength(final ItemStack stack) + { + return this.maxWindStrength; + } + + @Override + public boolean isAcceptedType(final ItemStack stack, final IKineticRotor.GearboxType type) + { + return (type == IKineticRotor.GearboxType.WIND) || (this.water); + } +} + diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/RotorIridium.java b/src/main/java/gtPlusPlus/xmod/ic2/item/RotorIridium.java new file mode 100644 index 0000000000..b9dffbd371 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/RotorIridium.java @@ -0,0 +1,127 @@ +package gtPlusPlus.xmod.ic2.item; + +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import ic2.api.item.IKineticRotor; +import ic2.core.block.kineticgenerator.gui.GuiWaterKineticGenerator; +import ic2.core.block.kineticgenerator.gui.GuiWindKineticGenerator; +import ic2.core.init.InternalName; +import ic2.core.util.StackUtil; + +public class RotorIridium extends RotorBase{ + + private final int maxWindStrength; + private final int minWindStrength; + private final int radius; + private final float efficiency; + private final ResourceLocation renderTexture; + private final boolean water; + + public RotorIridium(final InternalName internalName, final int Radius, final int durability, final float efficiency, final int minWindStrength, final int maxWindStrength, final ResourceLocation RenderTexture) + { + super(internalName, Radius, durability, efficiency, minWindStrength, maxWindStrength, RenderTexture); + + + + this.setMaxStackSize(1); + this.setMaxDamage(Integer.MAX_VALUE); + + this.radius = Radius; + this.efficiency = efficiency; + this.renderTexture = RenderTexture; + this.minWindStrength = minWindStrength; + this.maxWindStrength = maxWindStrength; + this.water = (internalName != InternalName.itemwoodrotor); + } + + @Override + public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List info, final boolean b) + { + info.add(StatCollector.translateToLocalFormatted("ic2.itemrotor.wind.info", new Object[] { Integer.valueOf(this.minWindStrength), Integer.valueOf(this.maxWindStrength) })); + IKineticRotor.GearboxType type = null; + if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWaterKineticGenerator))) { + type = IKineticRotor.GearboxType.WATER; + } else if ((Minecraft.getMinecraft().currentScreen != null) && ((Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator))) { + type = IKineticRotor.GearboxType.WIND; + } + if (type != null) { + //info.add(StatCollector.translateToLocal("ic2.itemrotor.fitsin." + isAcceptedType(itemStack, type))); + } + } + + @Override + public String getTextureFolder() + { + return "rotors"; + } + + @Override + public int getDiameter(final ItemStack stack) + { + return this.radius; + } + + @Override + public ResourceLocation getRotorRenderTexture(final ItemStack stack) + { + return this.renderTexture; + } + + @Override + public float getEfficiency(final ItemStack stack) + { + return this.efficiency; + } + + @Override + public int getMinWindStrength(final ItemStack stack) + { + return this.minWindStrength; + } + + @Override + public int getMaxWindStrength(final ItemStack stack) + { + return this.maxWindStrength; + } + + @Override + public boolean isAcceptedType(final ItemStack stack, final IKineticRotor.GearboxType type) + { + return (type == IKineticRotor.GearboxType.WIND) || (this.water); + } + + + @Override + public void setCustomDamage(final ItemStack stack, final int damage) + { + final NBTTagCompound nbt = StackUtil.getOrCreateNbtData(stack); + nbt.setInteger("advDmg", 0); + + final int maxStackDamage = stack.getMaxDamage(); + if (maxStackDamage > 2) { + //stack.setItemDamage(1 + (int)Util.map(damage, this.maxDmg, maxStackDamage - 2)); + } + } + + @Override + public boolean applyCustomDamage(final ItemStack stack, final int damage, final EntityLivingBase src) + { + this.setCustomDamage(stack, this.getCustomDamage(stack) + damage); + return true; + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } +} + diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java b/src/main/java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java new file mode 100644 index 0000000000..01151024c4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/reactor/IC2_FuelRod_Base.java @@ -0,0 +1,52 @@ +package gtPlusPlus.xmod.ic2.item.reactor; + +import ic2.api.reactor.IReactor; +import ic2.api.reactor.IReactorComponent; +import net.minecraft.item.ItemStack; + +public class IC2_FuelRod_Base implements IReactorComponent { + + @Override + public void processChamber(IReactor var1, ItemStack var2, int var3, int var4, boolean var5) { + // TODO Auto-generated method stub + + } + + @Override + public boolean acceptUraniumPulse(IReactor var1, ItemStack var2, ItemStack var3, int var4, int var5, int var6, + int var7, boolean var8) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean canStoreHeat(IReactor var1, ItemStack var2, int var3, int var4) { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getMaxHeat(IReactor var1, ItemStack var2, int var3, int var4) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getCurrentHeat(IReactor var1, ItemStack var2, int var3, int var4) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int alterHeat(IReactor var1, ItemStack var2, int var3, int var4, int var5) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public float influenceExplosion(IReactor var1, ItemStack var2) { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java b/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java new file mode 100644 index 0000000000..1b090cc51a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java @@ -0,0 +1,326 @@ +package gtPlusPlus.xmod.ic2.recipe; + +import static gtPlusPlus.core.recipe.RECIPES_Tools.*; + +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.ic2.item.IC2_Items; +import ic2.core.Ic2Items; + +public class RECIPE_IC2 { + + public static String plate_T1 = "plateEnergeticAlloy"; + public static String plate_T2 = "plateTungstenSteel"; + public static String plate_T3 = "plateVibrantAlloy"; + public static String plate_T4 = "plateAlloyIridium"; + + public static ItemStack block_T1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.EnergeticAlloy, 1L); + public static ItemStack block_T2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L); + public static ItemStack block_T3 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.VibrantAlloy, 1L); + public static ItemStack block_T4 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L); + + public static ItemStack shaft_block_T1 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.EnergeticAlloy, 1L); + public static ItemStack shaft_block_T2 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.TungstenSteel, 1L); + public static ItemStack shaft_block_T3 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.VibrantAlloy, 1L); + public static ItemStack shaft_block_T4 = GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iridium, 1L); + + public static String ingot_T1 = "ingotEnergeticAlloy"; + public static String ingot_T2 = "ingotTungstenSteel"; + public static String ingot_T3 = "ingotVibrantAlloy"; + public static String ingot_T4 = "ingotIridium"; + + public static String ring_T1 = "ringStainlessSteel"; + public static String ring_T2 = "ringTungstenSteel"; + public static String ring_T3 = "ringChrome"; + public static String ring_T4 = "ringOsmiridium"; + + + private static ItemStack rotor_blade_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_1.getItem()); + private static ItemStack rotor_blade_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_2.getItem()); + private static ItemStack rotor_blade_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_3.getItem()); + private static ItemStack rotor_blade_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Blade_Material_4.getItem()); + + private static ItemStack shaft_T1 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_1.getItem()); + private static ItemStack shaft_T2 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_2.getItem()); + private static ItemStack shaft_T3 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_3.getItem()); + private static ItemStack shaft_T4 = ItemUtils.getSimpleStack(IC2_Items.shaft_Material_4.getItem()); + + private static ItemStack rotor_T1 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_1.getItem()); + private static ItemStack rotor_T2 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_2.getItem()); + private static ItemStack rotor_T3 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_3.getItem()); + private static ItemStack rotor_T4 = ItemUtils.getSimpleStack(IC2_Items.rotor_Material_4.getItem()); + + private static boolean checkForEnderIO(){ + if(!LoadedMods.EnderIO){ + plate_T1 = "plateMagnalium"; + plate_T2 = "plateTungstenSteel"; + plate_T3 = "plateUltimet"; + plate_T4 = "plateAlloyIridium"; + + block_T1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Magnalium, 1L); + block_T2 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.TungstenSteel, 1L); + block_T3 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Ultimet, 1L); + block_T4 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iridium, 1L); + + ingot_T1 = "ingotMagnalium"; + ingot_T2 = "ingotTungstenSteel"; + ingot_T3 = "ingotUltimet"; + ingot_T4 = "ingotIridium"; + return true; + } + return false; + } + + public static void initRecipes() { + + checkForEnderIO(); + addAdvancedHazmat(); + + if (!CORE.GTNH) { + //Rotor Blade Recipes + + RecipeUtils.addShapedRecipe( + plate_T1, ingot_T1, plate_T1, + plate_T1, ingot_T1, plate_T1, + plate_T1, ingot_T1, plate_T1, + rotor_blade_T1); + + RecipeUtils.addShapedRecipe( + plate_T2, ingot_T2, plate_T2, + plate_T2, ingot_T2, plate_T2, + plate_T2, ingot_T2, plate_T2, + rotor_blade_T2); + + RecipeUtils.addShapedRecipe( + plate_T3, ingot_T3, plate_T3, + plate_T3, ingot_T3, plate_T3, + plate_T3, ingot_T3, plate_T3, + rotor_blade_T3); + + RecipeUtils.addShapedRecipe( + plate_T4, ingot_T4, plate_T4, + plate_T4, ingot_T4, plate_T4, + plate_T4, ingot_T4, plate_T4, + rotor_blade_T4); + } + if (CORE.GTNH) { + + RecipeUtils.addShapedRecipe( + plate_T1, plate_T1, plate_T1, + plate_T1, ring_T1, plate_T1, + plate_T1, plate_T1, plate_T1, + rotor_blade_T1); + + RecipeUtils.addShapedRecipe( + plate_T2, plate_T2, plate_T2, + plate_T2, ring_T2, plate_T2, + plate_T2, plate_T2, plate_T2, + rotor_blade_T2); + + RecipeUtils.addShapedRecipe( + plate_T3, plate_T3, plate_T3, + plate_T3, ring_T3, plate_T3, + plate_T3, plate_T3, plate_T3, + rotor_blade_T3); + + RecipeUtils.addShapedRecipe( + plate_T4, plate_T4, plate_T4, + plate_T4, ring_T4, plate_T4, + plate_T4, plate_T4, plate_T4, + rotor_blade_T4); + + } + + //Shaft Extruder Recipe + GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.DarkSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.DarkSteel)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.TungstenSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.TungstenSteel)}); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.Molybdenum), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Molybdenum)}); + Logger.INFO("Added recipe item for GT5 Extruder: Shaft Shape"); + + + //Custm Recipes for Iron and Steel + ItemStack mShaftIron = ItemList.IC2_ShaftIron.get(1); + ItemStack mShaftSteel = ItemList.IC2_ShaftSteel.get(1); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.WroughtIron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftIron, 32*20, 120); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftSteel, 64*20, 120); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, GT_OreDictUnificator.get(OrePrefixes.block, Materials.Steel, 1L)), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), mShaftSteel, 64*20, 120); + + + //Shaft Recipes + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T1), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T1, 2560, 250); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T1), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T1, 2560, 250); + if (LoadedMods.EnderIO || CORE.GTNH) { + Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Energetic]"); + } else { + Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Magnalium]"); + } + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T2), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T2, 5120, 500); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T2), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T2, 5120, 500); + + Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [TungstenSteel]"); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T3), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T3, 10240, 2000); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T3), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T3, 10240, 2000); + if (LoadedMods.EnderIO || CORE.GTNH) { + Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Vibrant]"); + } else { + Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Ultimet]"); + } + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T4), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T4, 20480, 4000); + GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T4), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T4, 20480, 4000); + Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Iridium]"); + + if (!CORE.GTNH) { + //Rotor Recipes + RecipeUtils.addShapedRecipe( + null, rotor_blade_T1, null, + rotor_blade_T1, shaft_T1, rotor_blade_T1, + null, rotor_blade_T1, null, + rotor_T1); + + RecipeUtils.addShapedRecipe( + null, rotor_blade_T2, null, + rotor_blade_T2, shaft_T2, rotor_blade_T2, + null, rotor_blade_T2, null, + rotor_T2); + + RecipeUtils.addShapedRecipe( + null, rotor_blade_T3, null, + rotor_blade_T3, shaft_T3, rotor_blade_T3, + null, rotor_blade_T3, null, + rotor_T3); + + RecipeUtils.addShapedRecipe( + null, rotor_blade_T4, null, + rotor_blade_T4, shaft_T4, rotor_blade_T4, + null, rotor_blade_T4, null, + rotor_T4); + + } + if (CORE.GTNH) { + RecipeUtils.addShapedRecipe( + shaft_T1, rotor_blade_T1, craftingToolHardHammer, + rotor_blade_T1, ring_T1, rotor_blade_T1, + craftingToolWrench, rotor_blade_T1, shaft_T1, + rotor_T1); + + RecipeUtils.addShapedRecipe( + shaft_T2, rotor_blade_T2, craftingToolHardHammer, + rotor_blade_T2, ring_T2, rotor_blade_T2, + craftingToolWrench, rotor_blade_T2, shaft_T2, + rotor_T2); + + RecipeUtils.addShapedRecipe( + shaft_T3, rotor_blade_T3, craftingToolHardHammer, + rotor_blade_T3, ring_T3, rotor_blade_T3, + craftingToolWrench, rotor_blade_T3, shaft_T3, + rotor_T3); + + RecipeUtils.addShapedRecipe( + shaft_T4, rotor_blade_T4, craftingToolHardHammer, + rotor_blade_T4, ring_T4, rotor_blade_T4, + craftingToolWrench, rotor_blade_T4, shaft_T4, + rotor_T4); + } + + + } + + private static void addAdvancedHazmat() { + + ItemStack[] aBasicHazmatPieces = new ItemStack[] { + Ic2Items.hazmatHelmet.copy(), + Ic2Items.hazmatChestplate.copy(), + Ic2Items.hazmatLeggings.copy(), + Ic2Items.hazmatBoots.copy() + }; + + Material aRubber = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubber); + ItemStack aYellowWool = ItemUtils.getSimpleStack(Blocks.wool, 4, 1); + ItemStack aBlackWool = ItemUtils.getSimpleStack(Blocks.wool, 15, 1); + ItemStack aCoilIC2 = Ic2Items.coil; + ItemStack aPlateCobalt = CI.getTieredComponentOfMaterial(Materials.Cobalt, OrePrefixes.plate, 1); + ItemStack aGearSmallSteel = CI.getTieredComponentOfMaterial(Materials.Steel, OrePrefixes.gearGtSmall, 1); + ItemStack aGearSmallAluminium = CI.getTieredComponentOfMaterial(Materials.Aluminium, OrePrefixes.gearGtSmall, 1); + ItemStack aGearPotin = ALLOY.TUMBAGA.getGear(1); + ItemStack aGearSiliconCarbide = ALLOY.SILICON_CARBIDE.getGear(1); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(2), + aBasicHazmatPieces[0], + ItemUtils.getSimpleStack(aYellowWool,16), + ItemUtils.getSimpleStack(aPlateCobalt, 4), + ItemUtils.getSimpleStack(aCoilIC2, 8), + ItemUtils.getSimpleStack(aGearSmallAluminium, 4), + }, + aRubber.getFluidStack(144 * 4), + GregtechItemList.Armour_Hazmat_Advanced_Helmet.get(1), + 30 * 20, + MaterialUtils.getVoltageForTier(2)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(2), + aBasicHazmatPieces[1], + ItemUtils.getSimpleStack(aYellowWool, 64), + ItemUtils.getSimpleStack(aCoilIC2, 32), + ItemUtils.getSimpleStack(aPlateCobalt, 16), + ItemUtils.getSimpleStack(aGearSiliconCarbide, 8), + }, + aRubber.getFluidStack(144 * 10), + GregtechItemList.Armour_Hazmat_Advanced_Chest.get(1), + 90 * 20, + MaterialUtils.getVoltageForTier(2)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(2), + aBasicHazmatPieces[2], + ItemUtils.getSimpleStack(aYellowWool, 32), + ItemUtils.getSimpleStack(aCoilIC2, 16), + ItemUtils.getSimpleStack(aPlateCobalt, 8), + ItemUtils.getSimpleStack(aGearSiliconCarbide, 4), + }, + aRubber.getFluidStack(144 * 8), + GregtechItemList.Armour_Hazmat_Advanced_Legs.get(1), + 75 * 20, + MaterialUtils.getVoltageForTier(2)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(2), + aBasicHazmatPieces[3], + ItemUtils.getSimpleStack(aBlackWool, 16), + ItemUtils.getSimpleStack(aCoilIC2, 6), + ItemUtils.getSimpleStack(aGearSmallSteel, 8), + ItemUtils.getSimpleStack(aGearPotin, 4), + }, + aRubber.getFluidStack(144 * 6), + GregtechItemList.Armour_Hazmat_Advanced_Boots.get(1), + 45 * 20, + MaterialUtils.getVoltageForTier(2)); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java b/src/main/java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java new file mode 100644 index 0000000000..9073f2ec7f --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java @@ -0,0 +1,277 @@ +package gtPlusPlus.xmod.mekanism; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GT_ModHandler; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; +import gtPlusPlus.core.util.minecraft.RecipeUtils; + +public class HANDLER_Mekanism { + + public static void preInit(){ + if (LoadedMods.Mekanism){ + + } + } + + public static void init(){ + if (LoadedMods.Mekanism){ + + } + } + + public static void postInit(){ + if (LoadedMods.Mekanism && !LoadedMods.RedTech){ + + Logger.INFO("Performing GT recipe balance for Mek. now that it's Osmium is useless."); + + //Steel Casing + final ItemStack tSteelCasing = ItemUtils.simpleMetaStack("Mekanism:BasicBlock:8", 8, 1); + addNewRecipe( + "plateSteel", "blockGlass", "plateSteel", + "blockGlass", "plateStainlessSteel", "blockGlass", + "plateSteel", "blockGlass", "plateSteel", + tSteelCasing); + + //Energy Storage + final ItemStack tAdvancedEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); + NBTUtils.setString(tAdvancedEnergyCube, "tier", "Advanced"); + final ItemStack tBasicEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); + NBTUtils.setString(tBasicEnergyCube, "tier", "Basic"); + + //Gas tanks + final ItemStack tBasicGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + NBTUtils.setInteger(tBasicGasTank, "tier", 0); + final ItemStack tAdvancedGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + NBTUtils.setInteger(tAdvancedGasTank, "tier", 1); + final ItemStack tEliteGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + NBTUtils.setInteger(tEliteGasTank, "tier", 2); + final ItemStack tMasterGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + NBTUtils.setInteger(tMasterGasTank, "tier", 3); + + //Machines that use Osmium + final ItemStack tMachineBlock_Basic = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:5", 5, 1); + final ItemStack tMachineBlock = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:6", 6, 1); + + //Smelting + final ItemStack tMachineBlock_0_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_0_Basic, "recipeType", 0); + final ItemStack tMachineBlock_0 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_0, "recipeType", 0); + //Enriching + final ItemStack tMachineBlock_1_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_1_Basic, "recipeType", 1); + final ItemStack tMachineBlock_1 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_1, "recipeType", 1); + //Crushing + final ItemStack tMachineBlock_2_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_2_Basic, "recipeType", 2); + final ItemStack tMachineBlock_2 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_2, "recipeType", 2); + //Compressing + final ItemStack tMachineBlock_3_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_3_Basic, "recipeType", 3); + final ItemStack tMachineBlock_3 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_3, "recipeType", 3); + //Combining + final ItemStack tMachineBlock_4_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_4_Basic, "recipeType", 4); + final ItemStack tMachineBlock_4 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_4, "recipeType", 4); + //Purifying + final ItemStack tMachineBlock_5_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_5_Basic, "recipeType", 5); + final ItemStack tMachineBlock_5 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_5, "recipeType", 5); + //Injecting + final ItemStack tMachineBlock_6_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_6_Basic, "recipeType", 6); + final ItemStack tMachineBlock_6 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_6, "recipeType", 6); + //Infusing + final ItemStack tMachineBlock_7_Basic = tMachineBlock_Basic.copy(); + NBTUtils.setInteger(tMachineBlock_7_Basic, "recipeType", 7); + final ItemStack tMachineBlock_7 = tMachineBlock.copy(); + NBTUtils.setInteger(tMachineBlock_7, "recipeType", 7); + + //Infuser + final ItemStack tMachineBlock_8 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:8", 8, 1); + //Purification + final ItemStack tMachineBlock_9 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:9", 9, 1); + //Pump + final ItemStack tMachineBlock_12 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:12", 12, 1); + + // + final ItemStack tItem_1 = ItemUtils.simpleMetaStack("Mekanism:ElectrolyticCore", 0, 1); + // + final ItemStack tItem_2 = ItemUtils.simpleMetaStack("Mekanism:FactoryInstaller:1", 1, 1); + // + final ItemStack tItem_3 = ItemUtils.simpleMetaStack("Mekanism:SpeedUpgrade", 0, 1); + + //MiscItems + final String tAdvancedAlloy = "alloyAdvanced"; + final String tCircuitAdvanced = "circuitAdvanced"; + final ItemStack tMekBatterySimple = ItemUtils.simpleMetaStack("Mekanism:EnergyTablet", 0, 1); + + //Items + addNewRecipe( + tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, + "dustIron", tAdvancedAlloy, "dustGold", + tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, + tItem_1); + addNewRecipe( + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + "plateStainlessSteel", "plankWood", "plateStainlessSteel", + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + tItem_2); + addNewRecipe( + null, "blockGlass", null, + tAdvancedAlloy, "plateTungsten", tAdvancedAlloy, + null, "blockGlass", null, + tItem_3); + + //Power Storage + addNewRecipe( + tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, + "plateAluminium", tBasicEnergyCube, "plateAluminium", + tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, + tAdvancedEnergyCube); + + //Blocks + addNewRecipe( + "plateSteel", "craftingFurnace", "plateSteel", + "plateRedstone", "platePlatinum", "plateRedstone", + "plateSteel", "craftingFurnace", "plateSteel", + tMachineBlock_8); + addNewRecipe( + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + "plateTitanium", ItemUtils.simpleMetaStack("Mekanism:MachineBlock", 0, 1), "plateTitanium", + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + tMachineBlock_9); + addNewRecipe( + null, ItemUtils.getSimpleStack(Items.bucket), null, + tAdvancedAlloy, tSteelCasing, tAdvancedAlloy, + "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", + tMachineBlock_12); + + //Machines + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_0_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_0); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_1_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_1); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_2_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_2); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_3_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_3); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_4_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_4); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_5_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_5); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_6_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_6); + addNewRecipe( + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_7_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_7); + + //Gas Tanks + addNewRecipe( + "plateRedstone", "plateAluminium", "plateRedstone", + "plateAluminium", null, "plateAluminium", + "plateRedstone", "plateAluminium", "plateRedstone", + tBasicGasTank); + addNewRecipe( + tAdvancedAlloy, "plateStainlessSteel", tAdvancedAlloy, + "plateStainlessSteel", tBasicGasTank, "plateStainlessSteel", + tAdvancedAlloy, "plateStainlessSteel", tAdvancedAlloy, + tAdvancedGasTank); + addNewRecipe( + "alloyElite", "plateTitanium", "alloyElite", + "plateTitanium", tAdvancedGasTank, "plateTitanium", + "alloyElite", "plateTitanium", "alloyElite", + tEliteGasTank); + addNewRecipe( + "alloyUltimate", "plateTungsten", "alloyUltimate", + "plateTungsten", tEliteGasTank, "plateTungsten", + "alloyUltimate", "plateTungsten", "alloyUltimate", + tMasterGasTank); + } + } + + private static boolean addNewRecipe( + final Object InputItem1, final Object InputItem2, final Object InputItem3, + final Object InputItem4, final Object InputItem5, final Object InputItem6, + final Object InputItem7, final Object InputItem8, final Object InputItem9, + final ItemStack OutputItem){ + + /*if (removeRecipe(OutputItem)){ + return RecipeUtils.recipeBuilder( + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9, + OutputItem); + }*/ + + removeRecipe(OutputItem); + return RecipeUtils.recipeBuilder( + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9, + OutputItem); + } + + private static boolean removeRecipe(final ItemStack item){ + Class mekUtils; + boolean removed = false; + try { + mekUtils = Class.forName("mekanism.common.util.RecipeUtils"); + if (mekUtils != null){ + final Method mRemoveRecipe = mekUtils.getDeclaredMethod("removeRecipes", ItemStack.class); + if (mRemoveRecipe != null){ + removed = (boolean) mRemoveRecipe.invoke(null, item); + if (!removed) { + removed = (boolean) mRemoveRecipe.invoke(mekUtils, item); + } + } + } + } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + Logger.INFO("[Mek] Failed to use the built-in recipe remover from Mekanism."); + } + if (!removed){ + removed = GT_ModHandler.removeRecipeByOutput(item); + } + Logger.INFO("[Mek] Successfully removed the recipe for "+item.getDisplayName()+"."); + return removed; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java b/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java new file mode 100644 index 0000000000..a190511b02 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ob/GliderHandler.java @@ -0,0 +1,127 @@ +package gtPlusPlus.xmod.ob; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; + +public class GliderHandler { + + private static final AutoMap mDimensionalBlacklist = new AutoMap(); + + @SubscribeEvent + public void onItemUsageEx(final PlayerInteractEvent event) { + if (event != null && event.entityPlayer != null) { + + if (event.action != Action.RIGHT_CLICK_BLOCK && event.action != Action.RIGHT_CLICK_AIR) { + Logger.WARNING("[OpenBlocks] Wrong type of PlayerInteractEvent, skipping."); + } + if (event.entityPlayer.worldObj.isRemote) { + return; + } + + ItemStack aItem = PlayerUtils.getItemStackInPlayersHand(event.entityPlayer); + if (ItemUtils.checkForInvalidItems(aItem)) { + Class aItemGliderClass = ReflectionUtils.getClass("openblocks.common.item.ItemHangGlider"); + if (aItemGliderClass.isInstance(aItem.getItem())) { + if (!canPlayerGlideInThisDimension(event.entityPlayer)){ + event.setCanceled(true); + PlayerUtils.messagePlayer(event.entityPlayer, "Glider is blacklisted in this dimension."); + Logger.WARNING("[OpenBlocks] "+event.entityPlayer.getCommandSenderName()+" tried to use glider in dimension "+event.entityPlayer.getEntityWorld().provider.dimensionId+"."); + } + else { + Logger.WARNING("[OpenBlocks] "+event.entityPlayer.getCommandSenderName()+" used glider in dimension "+event.entityPlayer.getEntityWorld().provider.dimensionId+"."); + } + } + else { + Logger.WARNING("[OpenBlocks] Item was not a glider."); + } + } + else { + Logger.WARNING("[OpenBlocks] Bad Item in player hand."); + } + } + else { + Logger.WARNING("[OpenBlocks] Bad event or player."); + } + + + } + + private static final boolean canPlayerGlideInThisDimension(EntityPlayer aPlayer) { + World aWorld = aPlayer.worldObj; + if (aWorld == null) { + return false; + } + else { + if (aWorld.provider == null) { + return false; + } + else { + int aDimID = aWorld.provider.dimensionId; + for (int i : mDimensionalBlacklist) { + if (i == aDimID) { + return false; + } + } + } + } + return true; + } + + static final void populateBlacklist() { + if (!mDimensionalBlacklist.isEmpty()) { + return; + } + File aBlacklist = gtPlusPlus.core.util.data.FileUtils.getFile("config/GTplusplus/", "GliderBlacklist", "cfg"); + List lines = new ArrayList(); + try { + lines = org.apache.commons.io.FileUtils.readLines(aBlacklist, "utf-8"); + } catch (IOException e) { + e.printStackTrace(); + } + if (lines.isEmpty()) { + FileWriter fw; + try { + String aInfoTip = "# Add one dimension ID per line. Lines with a # are comments and are ignored."; + fw = new FileWriter(aBlacklist); + fw.write(aInfoTip); + fw.close(); + lines.add(aInfoTip); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (!lines.isEmpty()) { + for (String s : lines) { + if (s != null && !s.equals("") && !s.contains("#")) { + s = StringUtils.remove(s, " "); + s = StringUtils.trim(s); + s = StringUtils.remove(s, ","); + Integer g = Integer.decode(s); + if (g != null) { + mDimensionalBlacklist.add(g); + Logger.INFO("[OpenBlocks] Added Dimension with ID '"+g+"' to Blacklist for Glider."); + } + } + } + } + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java b/src/main/java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java new file mode 100644 index 0000000000..c1b678f5ee --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ob/HANDLER_OpenBlocks.java @@ -0,0 +1,38 @@ +package gtPlusPlus.xmod.ob; + +import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.base.BaseItemBurnable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.railcraft.utils.RailcraftUtils; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class HANDLER_OpenBlocks { + + public static void preInit() { + if (LoadedMods.OpenBlocks) { + + } + } + + public static void init() { + if (LoadedMods.OpenBlocks) { + GliderHandler.populateBlacklist(); + } + } + + public static void postInit() { + if (LoadedMods.OpenBlocks) { + Utils.registerEvent(new GliderHandler()); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/ob/SprinklerHandler.java b/src/main/java/gtPlusPlus/xmod/ob/SprinklerHandler.java new file mode 100644 index 0000000000..85f8ded290 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/ob/SprinklerHandler.java @@ -0,0 +1,66 @@ +package gtPlusPlus.xmod.ob; + +import java.util.HashMap; + +import com.google.common.base.Objects; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +/** + * Wrapper Class to assist in handling the OB Sprinkler. + * @author Alkalus + * + */ +public class SprinklerHandler { + + + private static final HashMap mValidFerts = new HashMap(); + + /** + * @return - A valid {@link Map} of all Fertilizers for the OB Sprinkler. + */ + public static HashMap getValidFerts() { + return mValidFerts; + } + + /** + * @param aFert - An {@link ItemStack} which is to be registered for OB Sprinklers. + */ + public static void registerSprinklerFertilizer(ItemStack aFert) { + int aHash = Objects.hashCode(aFert.getItem(), aFert.getItemDamage()); + if (!mValidFerts.containsKey(aHash)) { + Logger.INFO("Registering "+aFert.getDisplayName()+" as OB Sprinkler Fertilizer."); + mValidFerts.put(aHash, aFert.copy()); + } + } + + public static void registerModFerts() { + ItemStack f; + + f = new ItemStack(Items.dye, 1, 15); + SprinklerHandler.registerSprinklerFertilizer(f); + + if (LoadedMods.Forestry) { + f = ItemUtils.getCorrectStacktype("Forestry:fertilizerBio", 1); + if (f != null) { + registerSprinklerFertilizer(f); + } + f = ItemUtils.getCorrectStacktype("Forestry:fertilizerCompound", 1); + if (f != null) { + registerSprinklerFertilizer(f); + } + } + if (LoadedMods.IndustrialCraft2) { + f = ItemUtils.getCorrectStacktype("IC2:itemFertilizer", 1); + if (f != null) { + registerSprinklerFertilizer(f); + } + + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java b/src/main/java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java new file mode 100644 index 0000000000..a21a759a77 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/railcraft/HANDLER_Railcraft.java @@ -0,0 +1,83 @@ +package gtPlusPlus.xmod.railcraft; + +import static gtPlusPlus.core.creative.AddToCreativeTab.tabMisc; + +import gtPlusPlus.core.item.ModItems; +import gtPlusPlus.core.item.base.BaseItemBurnable; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.railcraft.utils.RailcraftUtils; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class HANDLER_Railcraft { + + + + public static void preInit() { + if (LoadedMods.Railcraft) { + + } + + //Register Custom Coal Coke + ModItems.itemCoalCoke = new BaseItemBurnable("itemCoalCoke", "Coking Coal", tabMisc, 64, 0, "Used for metallurgy.", "fuelCoke", 3200, 0).setTextureName(CORE.MODID + ":burnables/itemCoalCoke"); + + //Add in things that once existed in 1.5.2 + ModItems.itemCactusCharcoal = new BaseItemBurnable("itemCactusCharcoal", "Cactus Charcoal", tabMisc, 64, 0, "Used for smelting.", "fuelCactusCharcoal", 400, 0).setTextureName(CORE.MODID + ":burnables/itemCactusCharcoal"); + ModItems.itemSugarCharcoal = new BaseItemBurnable("itemSugarCharcoal", "Sugar Charcoal", tabMisc, 64, 0, "Used for smelting.", "fuelSugarCharcoal", 400, 0).setTextureName(CORE.MODID + ":burnables/itemSugarCharcoal"); + ModItems.itemCactusCoke = new BaseItemBurnable("itemCactusCoke", "Cactus Coke", tabMisc, 64, 0, "Used for smelting.", "fuelCactusCoke", 800, 0).setTextureName(CORE.MODID + ":burnables/itemCactusCoke"); + ModItems.itemSugarCoke = new BaseItemBurnable("itemSugarCoke", "Sugar Coke", tabMisc, 64, 0, "Used for smelting.", "fuelSugarCoke", 800, 0).setTextureName(CORE.MODID + ":burnables/itemSugarCoke"); + + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemCactusCharcoal), "itemCharcoalCactus"); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemCactusCoke), "itemCokeCactus"); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemSugarCharcoal), "itemCharcoalSugar"); + ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemSugarCoke), "itemCokeSugar"); + + } + + public static void init() { + if (LoadedMods.Railcraft) { + + } + } + + public static void postInit() { + if (LoadedMods.Railcraft) { + + } + generateCokeOvenRecipes(); + } + + + private static void generateCokeOvenRecipes() { + ItemStack[] aInputs1 = new ItemStack[] { + ItemUtils.getSimpleStack(Blocks.cactus), + ItemUtils.getSimpleStack(Items.reeds) + }; + ItemStack[] aInputs2 = new ItemStack[] { + ItemUtils.getSimpleStack(ModItems.itemCactusCharcoal), + ItemUtils.getSimpleStack(ModItems.itemSugarCharcoal) + }; + ItemStack[] aOutputs = new ItemStack[] { + ItemUtils.getSimpleStack(ModItems.itemCactusCoke), + ItemUtils.getSimpleStack(ModItems.itemSugarCoke) + }; + for (int i=0;i CLASS_MAIN = ReflectionUtils.getClass("xreliquary.Reliquary"); + private static Field FIELD_CONTENT = ReflectionUtils.getField(CLASS_MAIN, "CONTENT"); + private static Object OBJECT_CONTENT = ReflectionUtils.getFieldValue(FIELD_CONTENT); + private static Method METHOD_GETITEM = ReflectionUtils.getMethod(OBJECT_CONTENT, "getItem", new Class[] {String.class}); + + public static Item getItem(String name) { + try { + return (Item) METHOD_GETITEM.invoke(OBJECT_CONTENT, name); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + return null; + } + + public static ItemStack emptyVoidTear() { + return new ItemStack(getItem("void_tear_empty"), 1, 0); + } + + public static ItemStack glowingWater() { + return new ItemStack(getItem("glowing_water")); + } + + public static ItemStack emptyVial() { + return new ItemStack(getItem("potion"), 1, 0); + } + + public static ItemStack emperorChalice() { + return new ItemStack(getItem("emperor_chalice")); + } + + public static ItemStack infernalChalice() { + return new ItemStack(getItem("infernal_chalice")); + } + + public static ItemStack witherSkull() { + return new ItemStack(Items.skull, 1, 1); + } + + public static ItemStack roseBush() { + return new ItemStack(Blocks.double_plant, 1, 4); + } + + public static ItemStack blackWool() { + return new ItemStack(Blocks.wool, 1, 15); + } + + public static ItemStack lapis() { + return new ItemStack(Items.dye, 1, 4); + } + + public static ItemStack gunPart(int i, int m) { + return new ItemStack(getItem("gun_part"), i, m); + } + + public static ItemStack magazine(int m) { + return magazine(1, m); + } + + public static ItemStack magazine(int i, int m) { + return new ItemStack(getItem("magazine"), i, m); + } + + public static ItemStack bullet(int m) { + return bullet(1, m); + } + + public static ItemStack bullet(int i, int m) { + return new ItemStack(getItem("bullet"), i, m); + } + + public static ItemStack ingredient(int m) { + return new ItemStack(getItem("mob_ingredient"), 1, m); + } + + public static ItemStack enderHeart() { + return ingredient(11); + } + + public static ItemStack creeperGland() { + return ingredient(3); + } + + public static ItemStack slimePearl() { + return ingredient(4); + } + + public static ItemStack batWing() { + return ingredient(5); + } + + public static ItemStack ribBone() { + return ingredient(0); + } + + public static ItemStack witherRib() { + return ingredient(1); + } + + public static ItemStack stormEye() { + return ingredient(8); + } + + public static ItemStack fertileEssence() { + return ingredient(9); + } + + public static ItemStack frozenCore() { + return ingredient(10); + } + + public static ItemStack moltenCore() { + return ingredient(7); + } + + public static ItemStack zombieHeart() { + return ingredient(6); + } + + public static ItemStack infernalClaw() { + return ingredient(13); + } + + public static ItemStack shellFragment() { + return ingredient(14); + } + + public static ItemStack squidBeak() { + return ingredient(12); + } + + public static ItemStack spiderFangs() { + return ingredient(2); + } + + public static ItemStack heartPearl(int m) { + return new ItemStack(getItem("heart_pearl"), 1, m); + } + + public static ItemStack nianZhu(int m) { + return new ItemStack(getItem("heart_zhu"), 1, m); + } + + public static ItemStack emptyVoidSatchel() { + return new ItemStack(getItem("void_tear_empty"), 1, 0); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java b/src/main/java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java new file mode 100644 index 0000000000..6086b74ec4 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/reliquary/util/AlkahestRecipeWrapper.java @@ -0,0 +1,47 @@ +package gtPlusPlus.xmod.reliquary.util; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.ItemStack; + +public class AlkahestRecipeWrapper { + public ItemStack item = null; + public int yield = 0; + public int cost = 0; + public String dictionaryName = null; + + public AlkahestRecipeWrapper(ItemStack par1, int par2, int par3) { + this.item = par1; + this.yield = par2; + this.cost = par3; + } + + public AlkahestRecipeWrapper(String par1, int par2, int par3) { + this.dictionaryName = par1; + this.yield = par2; + this.cost = par3; + } + + public Object getOriginalRecipe() { + try { + Constructor o; + if (dictionaryName == null) { + o = ReflectionUtils.getClass("xreliquary.util.alkahestry.AlkahestRecipe").getConstructor(ItemStack.class, int.class, int.class); + } + else { + o = ReflectionUtils.getClass("xreliquary.util.alkahestry.AlkahestRecipe").getConstructor(String.class, int.class, int.class); + } + + Object r = o.newInstance(dictionaryName == null ? item : dictionaryName, yield, cost); + if (r != null) { + return r; + } + + } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + // oops + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java b/src/main/java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java new file mode 100644 index 0000000000..1133e67fe6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/reliquary/util/ReliquaryRecipeHandler.java @@ -0,0 +1,56 @@ +package gtPlusPlus.xmod.reliquary.util; + +import static gtPlusPlus.core.lib.CORE.GTNH; + +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.reliquary.item.ReliquaryItems; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +public class ReliquaryRecipeHandler { + + public static boolean removeAlkahestRecipe(ItemStack aOutput) { + return false; + } + + public static boolean addAlkahestRecipe(ItemStack[] aInputs, ItemStack aOutput) { + if (aInputs == null || aInputs.length <= 0 || aInputs.length > 9) { + return false; + } + return false; + } + + public static void gregifyDefaultRecipes() { + Logger.INFO("Gregifying Reliquary recipes."); + if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.glowingWater())) { + Logger.INFO("Removing recipe for Glowing Water."); + } + if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.emptyVoidTear())) { + Logger.INFO("Removing recipe for Empty Void Tears."); + } + if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.emperorChalice())) { + Logger.INFO("Removing recipe for the Emperor Chalice."); + } + if (GT_ModHandler.removeRecipeByOutput(ReliquaryItems.infernalChalice())) { + Logger.INFO("Removing recipe for the Infernal Chalice."); + } + Logger.INFO("Finished removing original recipes."); + + // Add new recipes + if (CORE.RA.addChemicalRecipe(ALLOY.ENERGYCRYSTAL.getDust(4), ReliquaryItems.emptyVial(), FluidUtils.getHotWater(2000), null, ReliquaryItems.glowingWater(), 20 * 30, 500)) { + Logger.INFO("Added new recipe for Glowing Water."); + } + if (CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.simpleMetaStack(Items.ender_eye, 0, 32), CI.getFieldGenerator(5, GTNH ? 8 : 4), CI.getTieredComponent(OrePrefixes.plate, 5, GTNH ? 16 : 8), CI.getEmitter(3, 20)}, FluidUtils.getUUM(50), ReliquaryItems.emptyVoidTear(), 20 * 2000, 2000)){ + Logger.INFO("Added new recipe for Empty Void Tears."); + } + Logger.INFO("Finished adding new recipes."); + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java b/src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java new file mode 100644 index 0000000000..f39a69dfbc --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/sc2/HANDLER_SC2.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.sc2; + +import gtPlusPlus.core.lib.LoadedMods; +import vswe.stevescarts.ModuleData.GppModuleData; + +public class HANDLER_SC2 { + + public synchronized static void preInit() { + if (LoadedMods.StevesCarts){ + GppModuleData.loadGpp(); + } + } + + public static void init(){ + } + + public static void postInit(){ + } + + +} diff --git a/src/main/java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java b/src/main/java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java new file mode 100644 index 0000000000..dfaec8b703 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/sc2/modules/ModuleExoticSeeds.java @@ -0,0 +1,117 @@ +package gtPlusPlus.xmod.sc2.modules; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import static net.minecraft.init.Blocks.farmland; + +import java.lang.reflect.Field; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockCrops; +import net.minecraft.item.Item; +import net.minecraft.item.ItemSeeds; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import vswe.stevescarts.Carts.MinecartModular; +import vswe.stevescarts.Modules.ICropModule; +import vswe.stevescarts.Modules.Addons.ModuleAddon; + +public class ModuleExoticSeeds extends ModuleAddon implements ICropModule { + + public ModuleExoticSeeds(MinecartModular cart) { + super(cart); + } + + private synchronized Block getBlockFromItemSeeds(ItemStack seed) { + try { + + Item seedItem = seed.getItem(); + if (!(seedItem instanceof ItemSeeds)) return null; + + Block cropBlock = (Block) ReflectionUtils.getField(ItemSeeds.class, "field_150925_a").get(seedItem); + + return cropBlock; + } catch (Throwable t) { + + } + return null; + } + + @Override + public boolean isSeedValid(ItemStack seed) { + return getBlockFromItemSeeds(seed) != null; + } + + @Override + public Block getCropFromSeed(ItemStack seed) { + return getBlockFromItemSeeds(seed); + } + + @Override + public boolean isReadyToHarvest(int x, int y, int z) { + World world = getCart().worldObj; + Block b = world.getBlock(x, y, z); + int m = world.getBlockMetadata(x, y, z); + + //If Forestry is loaded, let's make this upgrade convert farmland to Humus. + /*if (LoadedMods.Forestry) { + Block mFarmLand = world.getBlock(x, y-1, z); + if (mFarmLand == farmland) { + Block h = tryGetHumus(); + if (h != farmland) { + world.setBlock(x, y-1, z, h); + } + } + }*/ + + + return b instanceof BlockCrops && m == 7; + } + + + + /** + * Static Class & Block References for Forestry content. + * Stops Forestry being a hard requirement for this feature without having to make @Optional annotations. + */ + + private static Class mForestryHumusBlockClass; + private static Class mForestryBlockRegistryCoreClass; + private static Block mForestryHumusBlock; + + private synchronized Block tryGetHumus() { + if (!LoadedMods.Forestry) { + return farmland; + } + else { + if (mForestryHumusBlockClass == null || mForestryHumusBlock == null) { + try { + mForestryHumusBlockClass = ReflectionUtils.getClass("forestry.plugins.PluginCore"); + Field blocks = ReflectionUtils.getField(mForestryHumusBlockClass, "blocks"); + if (blocks != null) { + Object blockRegistryCoreObject = blocks.get(null); + mForestryBlockRegistryCoreClass = ReflectionUtils.getClass("forestry.core.blocks.BlockRegistryCore"); + if (mForestryBlockRegistryCoreClass != null && blockRegistryCoreObject != null) { + Field soil = ReflectionUtils.getField(mForestryBlockRegistryCoreClass, "soil"); + if (soil != null) { + Block testHumus = (Block) soil.get(blockRegistryCoreObject); + if (testHumus != null) { + mForestryHumusBlock = testHumus; + } + } + } + } + } + catch (Throwable t) { + t.printStackTrace(); + } + } + if (mForestryHumusBlock != null) { + return mForestryHumusBlock; + } + } + return farmland; + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java b/src/main/java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java new file mode 100644 index 0000000000..11cc5da89c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/sol/HANDLER_SpiceOfLife.java @@ -0,0 +1,61 @@ +package gtPlusPlus.xmod.sol; + +import java.lang.reflect.Constructor; + +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.Item; + +public class HANDLER_SpiceOfLife { + + public static final void preInit() { + if (LoadedMods.SpiceOfLife) { + //Add a new Lunch Box with a reasonable amount of slots + tryRegisterNewLunchBox("foodcrate", 12); + } + } + + public static final void init() { + if (LoadedMods.SpiceOfLife) { + + } + } + + public static final void postInit() { + if (LoadedMods.SpiceOfLife) { + + } + } + + private static boolean tryRegisterNewLunchBox(String aItemName, int aSlots) { + Item aNewBox = getNewLunchBox(aItemName, aSlots); + if (aNewBox != null) { + GameRegistry.registerItem(aNewBox, aItemName); + Logger.INFO("[Spice of Life] Registered "+aItemName+" as a new food container."); + return true; + } + return false; + } + + private static Item getNewLunchBox(String aItemName, int aSlots) { + Class aItemFoodContainer = ReflectionUtils.getClass("squeek.spiceoflife.items.ItemFoodContainer"); + if (aItemFoodContainer != null) { + Constructor aItemFoodContainerConstructor = ReflectionUtils.getConstructor(aItemFoodContainer, new Class[] {String.class, int.class}); + if (aItemFoodContainerConstructor != null) { + Object aNewObject = ReflectionUtils.createNewInstanceFromConstructor(aItemFoodContainerConstructor, new Object[] {aItemName, aSlots}); + if (aNewObject instanceof Item) { + Item aNewInstance = (Item) aNewObject; + return aNewInstance; + } + } + } + return null; + } + + + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java new file mode 100644 index 0000000000..b1353cc481 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java @@ -0,0 +1,59 @@ +package gtPlusPlus.xmod.thaumcraft; + +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectCompat; +import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectStack; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class HANDLER_Thaumcraft { + + public static GTPP_AspectCompat sThaumcraftCompat; + public static Item mResearchNotes; + public static final AutoMap> sItemsToGetAspects = new AutoMap>(); + + public static void preInit(){ + if (LoadedMods.Thaumcraft){ + } + } + + public static void init(){ + if (LoadedMods.Thaumcraft){ + try { + mResearchNotes = (Item) ReflectionUtils.getField(ReflectionUtils.getClass("thaumcraft.common.config.ConfigItems"), "itemResearchNotes").get(null); + } + catch (IllegalArgumentException | IllegalAccessException e) { + mResearchNotes = Items.paper; + } + } + } + + public static void postInit(){ + if (LoadedMods.Thaumcraft){ + //Add Custom Aspects + + + //sThaumcraftCompat = (IThaumcraftCompat) GT_Utility.callConstructor("gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectCompat", 0, null, GT_Values.D1, new Object[0]); + //sThaumcraftCompat = new GTPP_AspectCompat(); + + /*if (!sItemsToGetAspects.isEmpty() && false) { + for (Pair j : sItemsToGetAspects) { + if (j .getKey() != null && (j.getValue() != null && j.getValue().length > 0)) { + List list = Arrays.asList(j.getValue()); + if (ThaumcraftUtils.registerThaumcraftAspectsToItem(j.getKey(), list, true)) { + Logger.WARNING("[Aspect] Successfully added Aspects to "+j.getKey().getDisplayName()+"."); + } + else { + Logger.WARNING("[Aspect] Failed adding Aspects to "+j.getKey().getDisplayName()+"."); + } + } + } + }*/ + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java new file mode 100644 index 0000000000..56ad95c5e3 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java @@ -0,0 +1,200 @@ +package gtPlusPlus.xmod.thaumcraft.aspect; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; + +import gregtech.api.enums.TC_Aspects; +import gregtech.common.GT_ThaumcraftCompat; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; +import net.minecraft.util.ResourceLocation; + +public class GTPP_AspectCompat { + + public static volatile Method m = null; + + private static HashMap mAspectCache = new LinkedHashMap(); + + + public static TC_Aspect_Wrapper ASPECT_BALANCE; + public static TC_Aspect_Wrapper ASPECT_LUST; + public static TC_Aspect_Wrapper ASPECT_STARBOUND; + public static TC_Aspect_Wrapper ASPECT_TOXIC; + public static TC_Aspect_Wrapper ASPECT_HEAVEN; + + +/* TC_Aspects.AER.mAspect = Aspect.AIR; + TC_Aspects.ALIENIS.mAspect = Aspect.ELDRITCH; + TC_Aspects.AQUA.mAspect = Aspect.WATER; + TC_Aspects.ARBOR.mAspect = Aspect.TREE; + TC_Aspects.AURAM.mAspect = Aspect.AURA; + TC_Aspects.BESTIA.mAspect = Aspect.BEAST; + TC_Aspects.COGNITIO.mAspect = Aspect.MIND; + TC_Aspects.CORPUS.mAspect = Aspect.FLESH; + TC_Aspects.EXANIMIS.mAspect = Aspect.UNDEAD; + TC_Aspects.FABRICO.mAspect = Aspect.CRAFT; + TC_Aspects.FAMES.mAspect = Aspect.HUNGER; + TC_Aspects.GELUM.mAspect = Aspect.COLD; + TC_Aspects.GRANUM.mAspect = Aspect.PLANT; + TC_Aspects.HERBA.mAspect = Aspect.PLANT; + TC_Aspects.HUMANUS.mAspect = Aspect.MAN; + TC_Aspects.IGNIS.mAspect = Aspect.FIRE; + TC_Aspects.INSTRUMENTUM.mAspect = Aspect.TOOL; + TC_Aspects.ITER.mAspect = Aspect.TRAVEL; + TC_Aspects.LIMUS.mAspect = Aspect.SLIME; + TC_Aspects.LUCRUM.mAspect = Aspect.GREED; + TC_Aspects.LUX.mAspect = Aspect.LIGHT; + TC_Aspects.MACHINA.mAspect = Aspect.MECHANISM; + TC_Aspects.MESSIS.mAspect = Aspect.CROP; + TC_Aspects.METALLUM.mAspect = Aspect.METAL; + TC_Aspects.METO.mAspect = Aspect.HARVEST; + TC_Aspects.MORTUUS.mAspect = Aspect.DEATH; + TC_Aspects.MOTUS.mAspect = Aspect.MOTION; + TC_Aspects.ORDO.mAspect = Aspect.ORDER; + TC_Aspects.PANNUS.mAspect = Aspect.CLOTH; + TC_Aspects.PERDITIO.mAspect = Aspect.ENTROPY; + TC_Aspects.PERFODIO.mAspect = Aspect.MINE; + TC_Aspects.PERMUTATIO.mAspect = Aspect.EXCHANGE; + TC_Aspects.POTENTIA.mAspect = Aspect.ENERGY; + TC_Aspects.PRAECANTATIO.mAspect = Aspect.MAGIC; + TC_Aspects.SANO.mAspect = Aspect.HEAL; + TC_Aspects.SENSUS.mAspect = Aspect.SENSES; + TC_Aspects.SPIRITUS.mAspect = Aspect.SOUL; + TC_Aspects.TELUM.mAspect = Aspect.WEAPON; + TC_Aspects.TERRA.mAspect = Aspect.EARTH; + TC_Aspects.TEMPESTAS.mAspect = Aspect.WEATHER; + TC_Aspects.TENEBRAE.mAspect = Aspect.DARKNESS; + TC_Aspects.TUTAMEN.mAspect = Aspect.ARMOR; + TC_Aspects.VACUOS.mAspect = Aspect.VOID; + TC_Aspects.VENENUM.mAspect = Aspect.POISON; + TC_Aspects.VICTUS.mAspect = Aspect.LIFE; + TC_Aspects.VINCULUM.mAspect = Aspect.TRAP; + TC_Aspects.VITIUM.mAspect = Aspect.TAINT; + TC_Aspects.VITREUS.mAspect = Aspect.CRYSTAL; + TC_Aspects.VOLATUS.mAspect = Aspect.FLIGHT;*/ + + + public GTPP_AspectCompat() { + + + // Generate all existing Aspects as TC_Aspects + LinkedHashMap h = TC_Aspect_Wrapper.getVanillaAspectList(); + for (String g : h.keySet()) { + Object aBaseAspect = h.get(g); + if (aBaseAspect != null && TC_Aspect_Wrapper.isObjectAnAspect(aBaseAspect)) { + TC_Aspect_Wrapper aS = TC_Aspect_Wrapper.getAspect(g); + if (aS != null) { + mAspectCache.put(g, aS); + continue; + } + } + } + + + + + // Custom Aspects + ASPECT_BALANCE = + new TC_Aspect_Wrapper( + "Sagrausten", + Utils.rgbtoHexValue(125, 125, 125), + new TC_Aspect_Wrapper[]{ + ASPECT_STARBOUND, + get(TC_Aspects.RADIO) + }, + new ResourceLocation(CORE.MODID+":textures/aspects/" + "Sagrausten.png"), + false, + 1, + "Ancient Knowledge"); + + ASPECT_LUST = + new TC_Aspect_Wrapper( + "Slusium", + Utils.rgbtoHexValue(175, 125, 25), + new TC_Aspect_Wrapper[]{ + ASPECT_BALANCE, + get(TC_Aspects.NEBRISUM) + }, + new ResourceLocation(CORE.MODID+":textures/aspects/" + "Slusium.png"), + false, + 1, + "Warped Thoughts"); + + ASPECT_STARBOUND = + new TC_Aspect_Wrapper( + "Xenil", + Utils.rgbtoHexValue(25, 25, 25), + new TC_Aspect_Wrapper[]{ + get(TC_Aspects.MAGNETO), + get(TC_Aspects.RADIO)}, + new ResourceLocation(CORE.MODID+":textures/aspects/" + "Xenil.png"), + false, + 1, + "A beginning to something new"); + + ASPECT_TOXIC = + new TC_Aspect_Wrapper( + "Xablum", + Utils.rgbtoHexValue(25, 185, 25), + new TC_Aspect_Wrapper[]{ + ASPECT_STARBOUND, + ASPECT_LUST + }, + new ResourceLocation(CORE.MODID+":textures/aspects/" + "Xablum.png"), + false, + 1, + "Insanity"); + + ASPECT_HEAVEN = + new TC_Aspect_Wrapper( + "Zetralt", + Utils.rgbtoHexValue(225, 225, 225), + new TC_Aspect_Wrapper[]{ + get(TC_Aspects.AURAM), + ASPECT_TOXIC + }, + new ResourceLocation(CORE.MODID+":textures/aspects/" + "Zetralt.png"), + false, + 1, + "Control, Respect, Glory"); + + + } + + private TC_Aspect_Wrapper get(TC_Aspects aGtObjects) { + try { + return TC_Aspect_Wrapper.generate(aGtObjects.mAspect); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + return null; + } + } + + public static synchronized final TC_AspectList_Wrapper getTC_AspectList_Wrapper(final List aAspects) { + TC_AspectList_Wrapper o = null; + try { + if (m == null || (m != null && !m.isAccessible())) { + m = GT_ThaumcraftCompat.class.getDeclaredMethod("getTC_AspectList_Wrapper", List.class); + m.setAccessible(true); + } + if (m != null) { + o = (TC_AspectList_Wrapper) m.invoke(null, aAspects); + } + } + catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + if (o == null) { + Logger.REFLECTION("[Aspect] Did not retrieve valid aspect list from reflective invocation."); + } + return o; + } + + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java new file mode 100644 index 0000000000..23e9035f40 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectStack.java @@ -0,0 +1,15 @@ +package gtPlusPlus.xmod.thaumcraft.aspect; + +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; + +public class GTPP_AspectStack { + + public final TC_Aspect_Wrapper mAspect; + public final int mAmount; + + public GTPP_AspectStack(TC_Aspect_Wrapper aAspect, int aAmount) { + mAspect = aAspect; + mAmount= aAmount; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java new file mode 100644 index 0000000000..dda5a62b27 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/commands/CommandDumpAspects.java @@ -0,0 +1,90 @@ +package gtPlusPlus.xmod.thaumcraft.commands; + +import static gtPlusPlus.core.util.minecraft.PlayerUtils.messagePlayer; + +import java.util.ArrayList; +import java.util.List; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.commands.CommandUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.thaumcraft.objects.ThreadAspectScanner; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; + +public class CommandDumpAspects implements ICommand { + private final List aliases; + public static long mLastScanTime = System.currentTimeMillis(); + + public CommandDumpAspects() { + this.aliases = new ArrayList<>(); + this.aliases.add("DA"); + this.aliases.add("da"); + this.aliases.add("dumpaspects"); + this.aliases.add("dumptc"); + Logger.INFO("Registered Aspect Dump Command."); + } + + @Override + public int compareTo(final Object o) { + return 0; + } + + @Override + public String getCommandName() { + return "DumpAspects"; + } + + @Override + public String getCommandUsage(final ICommandSender var1) { + return "/DumpAspects"; + } + + @Override + public List getCommandAliases() { + return this.aliases; + } + + @Override + public void processCommand(final ICommandSender S, final String[] argString) { + final EntityPlayer P = CommandUtils.getPlayer(S); + final long T = System.currentTimeMillis(); + final long D = T - mLastScanTime; + final int Z = (int) (D / 1000); + if (Z >= 30) { + // Lets process this in the Background on a new Thread. + Thread t = createNewThread(); + messagePlayer(P, "Beginning to dump information about all items/blocks & their aspects to file."); + messagePlayer(P, "Please do not close your game during this process, you will be notified upon completion."); + t.start(); + } else { + messagePlayer(P, "Your last run of DA was less than 30 seconds ago, please wait " + (30 - Z) + + " seconds before trying again."); + } + } + + @Override + public boolean canCommandSenderUseCommand(final ICommandSender var1) { + final EntityPlayer P = CommandUtils.getPlayer(var1); + if (P == null || !PlayerUtils.isPlayerOP(P)) { + return false; + } + return true; + } + + @Override + public List addTabCompletionOptions(final ICommandSender var1, final String[] var2) { + return null; + } + + @Override + public boolean isUsernameIndex(final String[] var1, final int var2) { + return false; + } + + private static Thread createNewThread() { + return new ThreadAspectScanner(); + } + +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java new file mode 100644 index 0000000000..fdcf7b8498 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/ThreadAspectScanner.java @@ -0,0 +1,158 @@ +package gtPlusPlus.xmod.thaumcraft.objects; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.data.FileUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ThreadAspectScanner extends Thread { + + public static boolean mDoWeScan = false; + private static final Map> mAllGameContent = new HashMap>(); + public final File mAspectCacheFile; + + public ThreadAspectScanner() { + mAspectCacheFile = FileUtils.getFile("config/GTplusplus", "AspectInfo", "txt"); + mDoWeScan = true; + } + + private void tryCacheObject(ItemStack aStack) { + if (aStack == null) { + return; + } + String nameKey; + try { + nameKey = ItemUtils.getUnlocalizedItemName(aStack); + } catch (NullPointerException n) { + try { + nameKey = Utils.sanitizeString(aStack.getDisplayName().toLowerCase()); + } catch (NullPointerException n2) { + try { + nameKey = aStack.getItem().getUnlocalizedName(); + } catch (NullPointerException n3) { + nameKey = "BadItemsGalore"; + } + } + } + AutoMap m = new AutoMap(); + if (mAllGameContent.containsKey(nameKey)) { + m = mAllGameContent.get(nameKey); + } + m.put(aStack); + mAllGameContent.put(nameKey, m); + } + + @SuppressWarnings({ "rawtypes" }) + @Override + public void run() { + if (mDoWeScan) { + Iterator iterator; + Logger.INFO("Finding Blocks and Items to scan for Aspect data."); + long mBlocksCounter = 0; + long mItemsCounter = 0; + + // First, find blocks + iterator = Block.blockRegistry.getKeys().iterator(); + while (iterator.hasNext()) { + String s = (String) iterator.next(); + Block block = (Block) Block.blockRegistry.getObject(s); + if (block != null) { + tryCacheObject(ItemUtils.getSimpleStack(block)); + mBlocksCounter++; + } + } + Logger.INFO("Completed Block Scan. Counted "+mBlocksCounter); + + // Second Find items, Skipping things that exist. + iterator = Item.itemRegistry.getKeys().iterator(); + while (iterator.hasNext()) { + String s = (String) iterator.next(); + Item item = (Item) Item.itemRegistry.getObject(s); + if (item != null) { + if (item.getHasSubtypes()) { + List q1 = new ArrayList(); + item.getSubItems(item, item.getCreativeTab(), q1); + if (q1 != null && q1.size() > 0) { + for (int e = 0; e < q1.size(); e++) { + ItemStack check = ItemUtils.simpleMetaStack(item, e, 1); + if (check != null) { + tryCacheObject(check); + mItemsCounter++; + } + } + } else { + tryCacheObject(ItemUtils.getSimpleStack(item)); + mItemsCounter++; + } + } else { + tryCacheObject(ItemUtils.getSimpleStack(item)); + mItemsCounter++; + } + } + } + Logger.INFO("Completed Item Scan. Counted "+mItemsCounter); + + Set y = mAllGameContent.keySet(); + Logger.INFO("Beginning iteration of "+y.size()+" itemstacks for aspect information."); + + for (String key : y) { + //Logger.INFO("Looking for key: "+key); + if (mAllGameContent.containsKey(key)) { + AutoMap group = mAllGameContent.get(key); + if (group == null || group.size() <= 0) { + continue; + } + for (ItemStack stack : group) { + thaumcraft.api.aspects.AspectList a = thaumcraft.common.lib.crafting.ThaumcraftCraftingManager + .getObjectTags(stack); + if (a == null) { + continue; + } else { + AutoMap> aspectPairs = new AutoMap>(); + for (thaumcraft.api.aspects.Aspect c : a.getAspectsSortedAmount()) { + if (c != null) { + aspectPairs.put(new Pair(c.getName(), a.getAmount(c))); + } + } + try { + List mList = new ArrayList(); + mList.add(stack.getDisplayName() + " | Meta: " + stack.getItemDamage() + + " | Unlocal: " + stack.getUnlocalizedName()); + for (Pair r : aspectPairs) { + if (r != null) { + mList.add(r.getKey() + " x" + r.getValue()); + } + } + mList.add(""); + if (mAspectCacheFile != null && mList.size() >= 3) { + FileUtils.appendListToFile(mAspectCacheFile, mList); + } + } + catch (Throwable t) { + Logger.INFO("Error while iterating one item. "+t); + } + } + } + } + } + Logger.INFO("Completed Aspect Iteration. AspectInfo.txt is now available to process in the GTplusplus configuration folder."); + CommandDumpAspects.mLastScanTime = System.currentTimeMillis(); + } + return; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java new file mode 100644 index 0000000000..9df38ca384 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_AspectList_Wrapper.java @@ -0,0 +1,40 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect; + +import net.minecraft.item.ItemStack; + +public class TC_AspectList_Wrapper { + + + //thaumcraft.api.aspects.Aspect; + //thaumcraft.api.aspects.AspectList; + + public TC_AspectList_Wrapper() { + + } + + public TC_AspectList_Wrapper(ItemStack stack) { + + } + + public TC_AspectList_Wrapper(Object invoke) { + // TODO Auto-generated constructor stub + } + + public int size() { + // TODO Auto-generated method stub + return 0; + } + + public Object getVanillaAspectList() { + // TODO Auto-generated method stub + return null; + } + + public void add(TC_Aspect_Wrapper mAspect, int mAmount) { + // TODO Auto-generated method stub + + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java new file mode 100644 index 0000000000..fda0fd27c5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java @@ -0,0 +1,327 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect; + +import java.lang.reflect.Array; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.LinkedHashMap; +import java.util.Map; + +import gregtech.api.enums.TC_Aspects; +import gregtech.api.util.GT_LanguageManager; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils; +import net.minecraft.util.ResourceLocation; + +/** + * Wrapper class for Thaumcraft Aspects. + * Used to avoid compile time dependencies. + * @author Alkalus + * + */ +public class TC_Aspect_Wrapper { + + private static Class mClass_Aspect; + private static Field mField_Aspects; + + private final String tag; + private final TC_Aspect_Wrapper[] components; + private final int color; + private String chatcolor; + private final ResourceLocation image; + private final int blend; + + public final Object mAspect; + + /** + * May be null, but links back to the TC_Aspects class from GT for convinience. + */ + public final TC_Aspects mGtEnumField; + + + + + /** + * Statically set the Class objects + */ + static { + mClass_Aspect = ReflectionUtils.getClass("thaumcraft.api.aspects.Aspect"); + } + + /** + * Gets the total aspect list from Thaumcraft, which should contain all other registered aspects. + * @return - A LinkedHashMap(String, Aspect); + */ + public static LinkedHashMap getVanillaAspectList() { + try { + if (mField_Aspects == null) { + mField_Aspects = ReflectionUtils.getField(mClass_Aspect, "aspects"); + } + return (LinkedHashMap) mField_Aspects.get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + Logger.REFLECTION("Failed configuring TC Aspect compatibility."); + return new LinkedHashMap(); + } + } + + public static Object getVanillaAspectObject(String aAspectName) { + return getVanillaAspectList().get(aAspectName); + } + + + + + + + + + + + + + + + /** + * Vanilla Aspect Constructor + * @param tag - Aspect Name + * @param color + * @param chatcolor + * @param blend + */ + public TC_Aspect_Wrapper(String tag, int color, String chatcolor, int blend, String aTooltip) { + this(tag, color, (TC_Aspect_Wrapper[]) null, blend, aTooltip); + this.chatcolor = chatcolor; + } + + /** + * + * Vanilla Aspect Constructor + * @param tag - Aspect Name + * @param color + * @param components + */ + public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, String aTooltip) { + this(tag, color, components, false, 1, aTooltip); + } + + /** + * + * Vanilla Aspect Constructor + * @param tag - Aspect Name + * @param color + * @param components + * @param blend + */ + public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, int blend, String aTooltip) { + this(tag, color, components, false, blend, aTooltip); + } + + + /** + * + * Vanilla Aspect Constructor + * @param tag - Aspect Name + * @param color + * @param components + * @param image + * @param blend + */ + public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, boolean vanilla, int blend, String aTooltip) { + this(tag, color, components, vanilla ? new ResourceLocation("thaumcraft", "textures/aspects/" + tag.toLowerCase() + ".png") : new ResourceLocation(CORE.MODID, "textures/aspects/" + tag.toLowerCase() + ".png"), vanilla, blend, aTooltip); + } + + private static int aInternalAspectIDAllocation = 1; + + public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, ResourceLocation image, boolean vanilla, int blend, String aTooltip) { + if (components == null) { + components = new TC_Aspect_Wrapper[] {}; + } + //String aTag = vanilla ? tag.toLowerCase() : "custom"+(aInternalAspectIDAllocation++); + String aTag = tag.toLowerCase(); + if (getAspectList().containsKey(tag.toLowerCase())) { + this.tag = aTag; + this.components = components; + this.color = color; + this.image = image; + this.blend = blend; + this.mAspect = null; + this.mGtEnumField = null; + } else { + this.tag = aTag; + this.components = components; + this.color = color; + this.image = image; + this.blend = blend; + this.mAspect = vanilla ? getVanillaAspectObject(this.tag) : this.generateTcAspect(); + + // Set GT Type if exists + TC_Aspects y = null; + for (TC_Aspects e : TC_Aspects.values()) { + try { + String gtTag = ThaumcraftUtils.getTagFromAspectObject(e.mAspect); + if (gtTag != null) { + if (gtTag.equals(this.tag)) { + y = e; + break; + } + } + } catch (IllegalArgumentException e1) { + e1.printStackTrace(); + } + } + this.mGtEnumField = y; + mInternalAspectCache.put(this.tag, this); + // Double link custom Aspects, but internalise names using custom# instead + if (!vanilla) { + mInternalAspectCache.put("custom"+(aInternalAspectIDAllocation++), this); + GT_LanguageManager.addStringLocalization("tc.aspect."+aTag, aTooltip); + } + Logger.INFO("[Thaumcraft++] Adding support for Aspect: "+tag); + } + } + + + + /** + * Generates a TC_Aspect from an object, presummed to be a TC Aspect. + * @param aBaseAspect - The TC Aspect to generate from. + * @return + * @throws IllegalArgumentException + * @throws IllegalAccessException + */ + @SuppressWarnings("unused") + public static TC_Aspect_Wrapper generate(Object aBaseAspect) { + try { + Field aTagF = ReflectionUtils.getField(mClass_Aspect, "tag"); + if (aTagF == null) { + return null; + } + String aTafB = (String) aTagF.get(aBaseAspect); + if (aTafB == null) { + return null; + } + String aTag = aTafB.toLowerCase(); + if (aTag != null && getAspectList().containsKey(aTag.toLowerCase())) { + return getAspect(aTag); + } else { + TC_Aspect_Wrapper aTemp = new TC_Aspect_Wrapper( + aTag, + (int) ReflectionUtils.getField(mClass_Aspect, "color").get(aBaseAspect), + generateAspectArrayInternal(ReflectionUtils.getField(mClass_Aspect, "components"), (aBaseAspect)), + (ResourceLocation) ReflectionUtils.getField(mClass_Aspect, "image").get(aBaseAspect), + true, + (int) ReflectionUtils.getField(mClass_Aspect, "blend").get(aBaseAspect), + "" + ); + if (aTemp != null) { + aTemp.chatcolor = (String) ReflectionUtils.getField(mClass_Aspect, "chatcolor").get(aBaseAspect); + return aTemp; + } + else { + return null; + } + } + } + catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + + /** + * Internal Map containing all the TC_Aspects. + */ + private static Map mInternalAspectCache = new LinkedHashMap(); + + /** + * Public getter for all TC_Aspects + * @param aAspectName - Aspect Name + * @return - A GT++ Aspect wrapper or null. (TC_Aspect) + */ + public static TC_Aspect_Wrapper getAspect(String aAspectName) { + String aName = aAspectName.toLowerCase(); + TC_Aspect_Wrapper g = mInternalAspectCache.get(aName); + if (g != null) { + return g; + } + else { + try { + TC_Aspect_Wrapper aTemp = generate(getVanillaAspectList().get(aName)); + if (aTemp != null) { + mInternalAspectCache.put(aName, aTemp); + return aTemp; + } + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } + } + return null; + } + + public static Map getAspectList(){ + return mInternalAspectCache; + } + + + private static TC_Aspect_Wrapper[] generateAspectArrayInternal(Field aField, Object aInstance) { + //thaumcraft.api.aspects.Aspect.Aspect() + Object[] components; + TC_Aspect_Wrapper[] aAspectArray; + try { + components = (Object[]) aField.get(aInstance); + aAspectArray = new TC_Aspect_Wrapper[components == null ? 0 : components.length]; + if (aAspectArray.length > 0) { + int i = 0; + for (Object g : components) { + aAspectArray[i] = getAspect((String) ReflectionUtils.getField(mClass_Aspect, "tag").get(g)); + i++; + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + aAspectArray = new TC_Aspect_Wrapper[0]; + } + return aAspectArray; + } + + /** + * Tasty code to generate TC Aspects reflectively. + * @return + */ + public Object generateTcAspect() { + try { + //thaumcraft.api.aspects.Aspect.Aspect() + Object aAspectArray = (Object[]) Array.newInstance(mClass_Aspect, 0); + if (components.length > 0) { + aAspectArray = (Object[]) Array.newInstance(mClass_Aspect, components.length); + int i = 0; + for (TC_Aspect_Wrapper g : components) { + if (g != null && g.mAspect != null) + ((Object[]) aAspectArray)[i++] = g.mAspect; + } + } + Constructor constructor = mClass_Aspect.getConstructor(String.class, int.class, aAspectArray.getClass(), ResourceLocation.class, int.class); + Object myObject = constructor.newInstance(tag, color, aAspectArray, image, blend); + + //Set chat colour + if (chatcolor != null && chatcolor.length() > 0) { + Method setChatColour = ReflectionUtils.getMethod(mClass_Aspect, "setChatcolor", String.class); + if (setChatColour != null) { + setChatColour.invoke(myObject, chatcolor); + } + } + return myObject; + } catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + public static boolean isObjectAnAspect(Object aAspect) { + return mClass_Aspect.isInstance(aAspect); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java new file mode 100644 index 0000000000..914144445c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/Base_Recipe_Wrapper.java @@ -0,0 +1,10 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; + +import net.minecraft.item.ItemStack; + +public interface Base_Recipe_Wrapper { + + public abstract ItemStack getRecipeOutput(); + + public abstract ItemStack getRecipeInput(); +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java new file mode 100644 index 0000000000..8ee4e7011d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_CrucibleRecipe_Wrapper.java @@ -0,0 +1,19 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; + +import net.minecraft.item.ItemStack; + +public class TC_CrucibleRecipe_Wrapper implements Base_Recipe_Wrapper { + + @Override + public ItemStack getRecipeInput() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack getRecipeOutput() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java new file mode 100644 index 0000000000..fede079f7b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_IArcaneRecipe_Wrapper.java @@ -0,0 +1,19 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; + +import net.minecraft.item.ItemStack; + +public class TC_IArcaneRecipe_Wrapper implements Base_Recipe_Wrapper { + + @Override + public ItemStack getRecipeInput() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack getRecipeOutput() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java new file mode 100644 index 0000000000..b52fa0e6a7 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionEnchantmentRecipe_Wrapper.java @@ -0,0 +1,19 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; + +import net.minecraft.item.ItemStack; + +public class TC_InfusionEnchantmentRecipe_Wrapper implements Base_Recipe_Wrapper { + + @Override + public ItemStack getRecipeInput() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack getRecipeOutput() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java new file mode 100644 index 0000000000..a0c539f937 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/recipe/TC_InfusionRecipe_Wrapper.java @@ -0,0 +1,19 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe; + +import net.minecraft.item.ItemStack; + +public class TC_InfusionRecipe_Wrapper implements Base_Recipe_Wrapper { + + @Override + public ItemStack getRecipeInput() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ItemStack getRecipeOutput() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java new file mode 100644 index 0000000000..d6c7f66988 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java @@ -0,0 +1,17 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; + +public class TC_PageType_Wrapper { + + public static final TC_PageType_Wrapper TEXT = null; + public static final TC_PageType_Wrapper TEXT_CONCEALED = null; + public static final TC_PageType_Wrapper NORMAL_CRAFTING = null; + public static final TC_PageType_Wrapper ARCANE_CRAFTING = null; + public static final TC_PageType_Wrapper CRUCIBLE_CRAFTING = null; + public static final TC_PageType_Wrapper INFUSION_CRAFTING = null; + public static final TC_PageType_Wrapper COMPOUND_CRAFTING = null; + public static final TC_PageType_Wrapper SMELTING = null; + public static final TC_PageType_Wrapper INFUSION_ENCHANTMENT = null; + public static final TC_PageType_Wrapper IMAGE = null; + public static final TC_PageType_Wrapper ASPECTS = null; + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java new file mode 100644 index 0000000000..93869cb8d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java @@ -0,0 +1,89 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; + +import cpw.mods.fml.common.FMLLog; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedHashMap; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +import org.apache.logging.log4j.Level; + +public class TC_ResearchCategories_Wrapper { + + public static LinkedHashMap researchCategories = new LinkedHashMap(); + + public static TC_ResearchCategoryList_Wrapper getResearchList(String key) { + return (TC_ResearchCategoryList_Wrapper) researchCategories.get(key); + } + + public static String getCategoryName(String key) { + return StatCollector.translateToLocal("tc.research_category." + key); + } + + public static TC_ResearchItem_Wrapper getResearch(String key) { + Collection rc = researchCategories.values(); + Iterator i$ = rc.iterator(); + + while (i$.hasNext()) { + Object cat = i$.next(); + Collection rl = ((TC_ResearchCategoryList_Wrapper) cat).research.values(); + Iterator i$1 = rl.iterator(); + + while (i$1.hasNext()) { + Object ri = i$1.next(); + if (((TC_ResearchItem_Wrapper) ri).key.equals(key)) { + return (TC_ResearchItem_Wrapper) ri; + } + } + } + + return null; + } + + public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) { + if (getResearchList(key) == null) { + TC_ResearchCategoryList_Wrapper rl = new TC_ResearchCategoryList_Wrapper(icon, background); + researchCategories.put(key, rl); + } + + } + + public static void addResearch(TC_ResearchItem_Wrapper ri) { + TC_ResearchCategoryList_Wrapper rl = getResearchList(ri.category); + if (rl != null && !rl.research.containsKey(ri.key)) { + if (!ri.isVirtual()) { + Iterator i$ = rl.research.values().iterator(); + + while (i$.hasNext()) { + TC_ResearchItem_Wrapper rr = (TC_ResearchItem_Wrapper) i$.next(); + 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() + "]", + new Object[0]); + 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; + } + } + + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java new file mode 100644 index 0000000000..3e6f5b78f2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java @@ -0,0 +1,21 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; + +import java.util.HashMap; +import java.util.Map; + +import net.minecraft.util.ResourceLocation; + +public class TC_ResearchCategoryList_Wrapper { + public int minDisplayColumn; + public int minDisplayRow; + public int maxDisplayColumn; + public int maxDisplayRow; + public ResourceLocation icon; + public ResourceLocation background; + public Map research = new HashMap(); + + public TC_ResearchCategoryList_Wrapper(ResourceLocation icon, ResourceLocation background) { + this.icon = icon; + this.background = background; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java new file mode 100644 index 0000000000..6372cc0371 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java @@ -0,0 +1,246 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; + +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; +import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +public class TC_ResearchItem_Wrapper { + + public final String key; + public final String category; + public final TC_AspectList_Wrapper tags; + public String[] parents = null; + public String[] parentsHidden = null; + public String[] siblings = null; + public final int displayColumn; + public final int displayRow; + public final ItemStack icon_item; + public final ResourceLocation icon_resource; + private int complexity; + private boolean isSpecial; + private boolean isSecondary; + private boolean isRound; + private boolean isStub; + private boolean isVirtual; + private boolean isConcealed; + private boolean isHidden; + private boolean isLost; + private boolean isAutoUnlock; + private ItemStack[] itemTriggers; + private String[] entityTriggers; + private TC_Aspect_Wrapper[] aspectTriggers; + private Object[] pages = null; + + public TC_ResearchItem_Wrapper(String key, String category) { + this.key = key; + this.category = category; + this.tags = new TC_AspectList_Wrapper(); + this.icon_resource = null; + this.icon_item = null; + this.displayColumn = 0; + this.displayRow = 0; + this.setVirtual(); + } + + public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper 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 (this.complexity < 1) { + this.complexity = 1; + } + + if (this.complexity > 3) { + this.complexity = 3; + } + + } + + public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper 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 (this.complexity < 1) { + this.complexity = 1; + } + + if (this.complexity > 3) { + this.complexity = 3; + } + + } + + public TC_ResearchItem_Wrapper setSpecial() { + this.isSpecial = true; + return this; + } + + public TC_ResearchItem_Wrapper setStub() { + this.isStub = true; + return this; + } + + public TC_ResearchItem_Wrapper setLost() { + this.isLost = true; + return this; + } + + public TC_ResearchItem_Wrapper setConcealed() { + this.isConcealed = true; + return this; + } + + public TC_ResearchItem_Wrapper setHidden() { + this.isHidden = true; + return this; + } + + public TC_ResearchItem_Wrapper setVirtual() { + this.isVirtual = true; + return this; + } + + public TC_ResearchItem_Wrapper setParents(String... par) { + this.parents = par; + return this; + } + + public TC_ResearchItem_Wrapper setParentsHidden(String... par) { + this.parentsHidden = par; + return this; + } + + public TC_ResearchItem_Wrapper setSiblings(String... sib) { + this.siblings = sib; + return this; + } + + public TC_ResearchItem_Wrapper setPages(Object... par) { + this.pages = par; + return this; + } + + public Object[] getPages() { + return this.pages; + } + + public TC_ResearchItem_Wrapper setItemTriggers(ItemStack... par) { + this.itemTriggers = par; + return this; + } + + public TC_ResearchItem_Wrapper setEntityTriggers(String... par) { + this.entityTriggers = par; + return this; + } + + public TC_ResearchItem_Wrapper setAspectTriggers(TC_Aspect_Wrapper... par) { + this.aspectTriggers = par; + return this; + } + + public ItemStack[] getItemTriggers() { + return this.itemTriggers; + } + + public String[] getEntityTriggers() { + return this.entityTriggers; + } + + public TC_Aspect_Wrapper[] getAspectTriggers() { + return this.aspectTriggers; + } + + public TC_ResearchItem_Wrapper registerResearchItem() { + ThaumcraftUtils.addResearch(this); + return this; + } + + public String getName() { + return StatCollector.translateToLocal("tc.research_name." + this.key); + } + + public String getText() { + return StatCollector.translateToLocal("tc.research_text." + this.key); + } + + public boolean isSpecial() { + return this.isSpecial; + } + + public boolean isStub() { + return this.isStub; + } + + 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 this.isAutoUnlock; + } + + public TC_ResearchItem_Wrapper setAutoUnlock() { + this.isAutoUnlock = true; + return this; + } + + public boolean isRound() { + return this.isRound; + } + + public TC_ResearchItem_Wrapper setRound() { + this.isRound = true; + return this; + } + + public boolean isSecondary() { + return this.isSecondary; + } + + public TC_ResearchItem_Wrapper setSecondary() { + this.isSecondary = true; + return this; + } + + public int getComplexity() { + return this.complexity; + } + + public TC_ResearchItem_Wrapper setComplexity(int complexity) { + this.complexity = complexity; + return this; + } + + public TC_Aspect_Wrapper getResearchPrimaryTag() { + //TODO + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java new file mode 100644 index 0000000000..5adf0150d9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java @@ -0,0 +1,14 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; + +public class TC_ResearchNoteData_Wrapper { + + public TC_ResearchNoteData_Wrapper(Object researchNoteData) { + // TODO Auto-generated constructor stub + } + + public Object getResearchNoteData() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java new file mode 100644 index 0000000000..998f37bf8c --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java @@ -0,0 +1,228 @@ +package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research; + +import java.util.List; + +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_CrucibleRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_IArcaneRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionEnchantmentRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionRecipe_Wrapper; +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; + +public class TC_ResearchPage_Wrapper { + public TC_PageType_Wrapper type; + public String text; + public String research; + public ResourceLocation image; + public TC_AspectList_Wrapper aspects; + public Object recipe; + public ItemStack recipeOutput; + + public TC_ResearchPage_Wrapper(String text) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.TEXT; + this.text = text; + } + + public TC_ResearchPage_Wrapper(String research, String text) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.TEXT_CONCEALED; + this.research = research; + this.text = text; + } + + public TC_ResearchPage_Wrapper(IRecipe recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.NORMAL_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + public TC_ResearchPage_Wrapper(IRecipe[] recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.NORMAL_CRAFTING; + this.recipe = recipe; + } + + public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper[] recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.ARCANE_CRAFTING; + this.recipe = recipe; + } + + public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper[] recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING; + this.recipe = recipe; + } + + public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper[] recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.INFUSION_CRAFTING; + this.recipe = recipe; + } + + public TC_ResearchPage_Wrapper(List recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.COMPOUND_CRAFTING; + this.recipe = recipe; + } + + public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.ARCANE_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING; + this.recipe = recipe; + this.recipeOutput = recipe.getRecipeOutput(); + } + + public TC_ResearchPage_Wrapper(ItemStack input) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.SMELTING; + this.recipe = input; + this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input); + } + + public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.INFUSION_CRAFTING; + this.recipe = recipe; + if (recipe.getRecipeOutput() instanceof ItemStack) { + this.recipeOutput = (ItemStack) recipe.getRecipeOutput(); + } else { + this.recipeOutput = recipe.getRecipeInput(); + } + + } + + public TC_ResearchPage_Wrapper(TC_InfusionEnchantmentRecipe_Wrapper recipe) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.INFUSION_ENCHANTMENT; + this.recipe = recipe; + } + + public TC_ResearchPage_Wrapper(ResourceLocation image, String caption) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.IMAGE; + this.image = image; + this.text = caption; + } + + public TC_ResearchPage_Wrapper(TC_AspectList_Wrapper as) { + this.type = TC_PageType_Wrapper.TEXT; + this.text = null; + this.research = null; + this.image = null; + this.aspects = null; + this.recipe = null; + this.recipeOutput = null; + this.type = TC_PageType_Wrapper.ASPECTS; + this.aspects = as; + } + + public String getTranslatedText() { + String ret = ""; + if (this.text != null) { + ret = StatCollector.translateToLocal(this.text); + if (ret.isEmpty()) { + ret = this.text; + } + } + + return ret; + } +} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java b/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java new file mode 100644 index 0000000000..4f1006693e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thaumcraft/util/ThaumcraftUtils.java @@ -0,0 +1,464 @@ +package gtPlusPlus.xmod.thaumcraft.util; + +import static gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft.sItemsToGetAspects; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.Pair; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.thaumcraft.HANDLER_Thaumcraft; +import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_AspectStack; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_CrucibleRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_IArcaneRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionEnchantmentRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionRecipe_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchCategories_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchCategoryList_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchItem_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchNoteData_Wrapper; +import gtPlusPlus.xmod.thaumcraft.objects.wrapper.research.TC_ResearchPage_Wrapper; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.world.World; + +public class ThaumcraftUtils { + + + private static Class mClass_Aspect; + private static Field mField_Aspects; + + static { + mClass_Aspect = ReflectionUtils.getClass("thaumcraft.api.aspects.Aspect"); + if (mClass_Aspect != null) { + Field aTagF = ReflectionUtils.getField(mClass_Aspect, "tag"); + if (aTagF != null) { + mField_Aspects = aTagF; + } + } + } + + public static boolean addAspectToItem(ItemStack item, TC_Aspect_Wrapper aspect, int amount) { + return addAspectToItem(item, new TC_Aspect_Wrapper[] {aspect}, new Integer[] {amount}); + + } + + public static boolean addAspectToItem(ItemStack item, TC_Aspect_Wrapper[] aspect, Integer[] amounts) { + GTPP_AspectStack[] aspects = new GTPP_AspectStack[aspect.length]; + for (int g=0;g 0) { + //aspects[g] = new GTPP_AspectStack(aspect[g], amounts[g]); + } + } + Pair k = new Pair(item, aspects); + int mSizeA = sItemsToGetAspects.size(); + sItemsToGetAspects.put(k); + if (sItemsToGetAspects.size() > mSizeA) { + Logger.MATERIALS("[Aspect] Successfully queued an ItemStack for Aspect addition."); + return true; + } + Logger.MATERIALS("[Aspect] Failed to queue an ItemStack for Aspect addition."); + //Logger.INFO("[Aspect] "); + return false; + } + + + public static TC_Aspect_Wrapper getAspect(String name) { + return TC_Aspect_Wrapper.getAspect(name); + } + + public static TC_Aspects getEnumAspect(String name) { + TC_Aspect_Wrapper r = getAspect(name); + return r.mGtEnumField; + } + + + + public static Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, List aAspects, ItemStack[] aResearchTriggers, Object[] aPages) { + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { + return null; + } + TC_ResearchCategoryList_Wrapper tCategory = TC_ResearchCategories_Wrapper.getResearchList(aCategory); + if (tCategory == null) { + return null; + } + for (Iterator i$ = tCategory.research.values().iterator(); i$.hasNext(); ) { + TC_ResearchItem_Wrapper tResearch = (TC_ResearchItem_Wrapper) i$.next(); + if ((tResearch.displayColumn == aX) && (tResearch.displayRow == aY)) { + aX += (aX > 0 ? 5 : -5); + aY += (aY > 0 ? 5 : -5); + } + } + TC_ResearchItem_Wrapper rResearch = new TC_ResearchItem_Wrapper(aResearch, aCategory, getAspectList_Ex(aAspects), aX, aY, aComplexity, aIcon); + ArrayList tPages = new ArrayList(aPages.length); + GT_LanguageManager.addStringLocalization("tc.research_name." + aResearch, aName); + GT_LanguageManager.addStringLocalization("tc.research_text." + aResearch, "[GT++] " + aText); + for (Object tPage : aPages) { + if ((tPage instanceof String)) { + tPages.add(new TC_ResearchPage_Wrapper((String) tPage)); + } else if ((tPage instanceof IRecipe)) { + tPages.add(new TC_ResearchPage_Wrapper((IRecipe) tPage)); + } + else if ((tPage instanceof TC_IArcaneRecipe_Wrapper)) { + tPages.add(new TC_ResearchPage_Wrapper((TC_IArcaneRecipe_Wrapper) tPage)); + } else if ((tPage instanceof TC_CrucibleRecipe_Wrapper)) { + tPages.add(new TC_ResearchPage_Wrapper((TC_CrucibleRecipe_Wrapper) tPage)); + } else if ((tPage instanceof TC_InfusionRecipe_Wrapper)) { + tPages.add(new TC_ResearchPage_Wrapper((TC_InfusionRecipe_Wrapper) tPage)); + } else if ((tPage instanceof TC_InfusionEnchantmentRecipe_Wrapper)) { + tPages.add(new TC_ResearchPage_Wrapper((TC_InfusionEnchantmentRecipe_Wrapper) tPage)); + } + } + if ((aType & 0x40) != 0) { + rResearch.setAutoUnlock(); + } + if ((aType & 0x1) != 0) { + rResearch.setSecondary(); + } + if ((aType & 0x20) != 0) { + rResearch.setSpecial(); + } + if ((aType & 0x8) != 0) { + rResearch.setVirtual(); + } + if ((aType & 0x4) != 0) { + rResearch.setHidden(); + } + if ((aType & 0x10) != 0) { + rResearch.setRound(); + } + if ((aType & 0x2) != 0) { + rResearch.setStub(); + } + if (aParentResearches != null) { + ArrayList tParentResearches = new ArrayList(); + for (String tParent : aParentResearches) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { + tParentResearches.add(tParent); + } + } + if (tParentResearches.size() > 0) { + rResearch.setParents((String[]) tParentResearches.toArray(new String[tParentResearches.size()])); + rResearch.setConcealed(); + } + } + if (aResearchTriggers != null) { + rResearch.setItemTriggers(aResearchTriggers); + rResearch.setHidden(); + } + + Object[] aVarArgs = (TC_ResearchPage_Wrapper[]) tPages.toArray(new TC_ResearchPage_Wrapper[tPages.size()]); + rResearch.setPages(aVarArgs); + return rResearch.registerResearchItem(); + } + + + public static Object addCrucibleRecipe(final String aResearch, final Object aInput, final ItemStack aOutput, + final List aAspects) { + if (GT_Utility.isStringInvalid((Object) aResearch) || aInput == null || aOutput == null || aAspects == null + || aAspects.isEmpty()) { + return null; + } + return addCrucibleRecipe(aResearch, GT_Utility.copy(new Object[]{aOutput}), + (aInput instanceof ItemStack || aInput instanceof ArrayList) ? aInput : aInput.toString(), + getAspectList_Ex(aAspects)); + } + + public static Object addInfusionRecipe(final String aResearch, final ItemStack aMainInput, final ItemStack[] aSideInputs, + final ItemStack aOutput, final int aInstability, final List aAspects) { + if (GT_Utility.isStringInvalid((Object) aResearch) || aMainInput == null || aSideInputs == null + || aOutput == null || aAspects == null || aAspects.isEmpty()) { + return null; + } + return addInfusionCraftingRecipe(aResearch, (Object) GT_Utility.copy(new Object[]{aOutput}), + aInstability, getAspectList_Ex(aAspects), aMainInput, aSideInputs); + } + + public static boolean registerThaumcraftAspectsToItem(final ItemStack aExampleStack, + final List aAspects, final String aOreDict) { + if (aAspects.isEmpty()) { + return false; + } + registerObjectTag(aOreDict, getAspectList_Ex(aAspects)); + return true; + } + + public static boolean registerThaumcraftAspectsToItem(final ItemStack aStack, + final List aAspects, final boolean aAdditive) { + try { + if (aAspects.isEmpty()) { + return false; + } + TC_AspectList_Wrapper h = getAspectList_Ex(aAspects); + if (aAdditive && (h != null && h.size() > 0)) { + registerComplexObjectTag(aStack, getAspectList_Ex(aAspects)); + return true; + } + else { + Logger.MATERIALS("[Aspect] Failed adding aspects to "+aStack.getDisplayName()+"."); + } + final TC_AspectList_Wrapper tAlreadyRegisteredAspects = getObjectAspects(aStack); + if (tAlreadyRegisteredAspects == null || tAlreadyRegisteredAspects.size() <= 0) { + registerObjectTag(aStack, getAspectList_Ex(aAspects)); + } + return true; + } + catch (Throwable t) { + Logger.MATERIALS("[Aspect] Failed adding aspects to "+aStack.getDisplayName()+"."); + t.printStackTrace(); + return false; + } + } + + + private static final Class mClass_ThaumcraftApi; + private static final Class mClass_ThaumcraftApiHelper; + private static final Class mClass_AspectList; + private static final Class mClass_ResearchManager; + private static final Method mMethod_registerObjectTag1; + private static final Method mMethod_registerObjectTag2; + private static final Method mMethod_registerComplexObjectTag; + private static final Method mMethod_addInfusionCraftingRecipe; + private static final Method mMethod_addCrucibleRecipe; + private static final Method mMethod_getObjectAspects; + private static final Method mMethod_updateData; + private static final Method mMethod_getData; + + private static final Field mField_PortholeBlacklist; + static { + /* + * Classes + */ + mClass_ThaumcraftApi = ReflectionUtils.getClass("thaumcraft.api.ThaumcraftApi"); + mClass_ThaumcraftApiHelper = ReflectionUtils.getClass("thaumcraft.api.ThaumcraftApiHelper"); + mClass_AspectList = ReflectionUtils.getClass("thaumcraft.api.aspects.AspectList"); + mClass_ResearchManager = ReflectionUtils.getClass("thaumcraft.common.lib.research.ResearchManager"); + + /* + * Methods + */ + mMethod_registerObjectTag1 = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "registerObjectTag", + ItemStack.class, mClass_AspectList); + + mMethod_registerObjectTag2 = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "registerObjectTag", String.class, + mClass_AspectList); + + mMethod_registerComplexObjectTag = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "registerComplexObjectTag", + ItemStack.class, mClass_AspectList); + + mMethod_addInfusionCraftingRecipe = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "addInfusionCraftingRecipe", + String.class, Object.class, int.class, mClass_AspectList, ItemStack.class, ItemStack[].class); + + mMethod_addCrucibleRecipe = ReflectionUtils.getMethod(mClass_ThaumcraftApi, "addCrucibleRecipe", String.class, + ItemStack.class, Object.class, mClass_AspectList); + + + mMethod_getObjectAspects = ReflectionUtils.getMethod(mClass_ThaumcraftApiHelper, "getObjectAspects", ItemStack.class); + + + mMethod_updateData = ReflectionUtils.getMethod(mClass_ResearchManager, "updateData", ItemStack.class, ReflectionUtils.getClass("thaumcraft.common.lib.research.ResearchNoteData")); + mMethod_getData = ReflectionUtils.getMethod(mClass_ResearchManager, "getData", ItemStack.class); + + /* + * Fields + */ + mField_PortholeBlacklist = ReflectionUtils.getField(mClass_ThaumcraftApi, "portableHoleBlackList"); + + } + + public static void registerObjectTag(ItemStack aStack, TC_AspectList_Wrapper aAspectList) { + try { + mMethod_registerObjectTag1.invoke(null, aStack, aAspectList.getVanillaAspectList()); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + public static void registerObjectTag(String aOreDict, TC_AspectList_Wrapper aAspectList) { + try { + mMethod_registerObjectTag2.invoke(null, aOreDict, aAspectList.getVanillaAspectList()); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + public static void registerComplexObjectTag(ItemStack aStack, TC_AspectList_Wrapper aAspectList) { + try { + mMethod_registerComplexObjectTag.invoke(null, aStack, aAspectList.getVanillaAspectList()); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + + public static TC_AspectList_Wrapper getObjectAspects(ItemStack aStack) { + try { + return new TC_AspectList_Wrapper(mMethod_getObjectAspects.invoke(null, aStack)); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + + + public static Object addCrucibleRecipe(String aResearch, ItemStack copy, Object aOutput, + TC_AspectList_Wrapper aAspectList) { + try { + return mMethod_addCrucibleRecipe.invoke(null, aResearch, copy, aOutput, aAspectList); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + public static Object addInfusionCraftingRecipe(String aResearch, Object copy, int aInstability, + TC_AspectList_Wrapper aAspectList, ItemStack aMainInput, ItemStack[] aSideInputs) { + try { + return mMethod_addInfusionCraftingRecipe.invoke(null, aResearch, copy, aInstability, aAspectList, aMainInput, aSideInputs); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + + public static boolean registerPortholeBlacklistedBlock(final Block aBlock) { + try { + ((ArrayList) mField_PortholeBlacklist.get(null)).add(aBlock); + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + return false; + } + return true; + } + + + public static String getTagFromAspectObject(Object aAspect) { + try { + if (mClass_Aspect == null || mField_Aspects == null) { + return null; + } + String aTafB = (String) mField_Aspects.get(aAspect); + if (aTafB == null) { + return null; + } + String aTag = aTafB.toLowerCase(); + return aTag; + } catch (IllegalArgumentException | IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return "error"; + } + } + + + public static void updateResearchNote(ItemStack a, TC_ResearchNoteData_Wrapper b) { + //updateData(a, b.getResearchNoteData()); + try { + mMethod_updateData.invoke(a, b.getResearchNoteData()); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + public static Object getResearchNoteData(ItemStack a) { + //getData(a); + try { + return mMethod_getData.invoke(a); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + return null; + } + + public static boolean isItemResearchNotes(ItemStack aStack) { + if (aStack != null && aStack.getItem() == HANDLER_Thaumcraft.mResearchNotes && HANDLER_Thaumcraft.mResearchNotes.getClass().isInstance(aStack.getItem())) { + return true; + } + return false; + } + + public static boolean isItemStackValidResearchNotes(ItemStack aStack) { + if (isItemResearchNotes(aStack) && aStack.getItemDamage() < 64) { + return true; + } + return false; + } + + public static TC_ResearchNoteData_Wrapper gatherResults(ItemStack note) { + TC_ResearchNoteData_Wrapper research = null; + if (isItemResearchNotes(note)) { + research = new TC_ResearchNoteData_Wrapper(getResearchNoteData(note)); + } + return research; + } + + public static void placeAspectIntoResearchNote(ItemStack note, World aWorld, final int q, final int r, final TC_Aspect_Wrapper aspect) { + /*TC_ResearchNoteData_Wrapper data = gatherResults(note); + String mGTPP = CORE.gameProfile.getName(); + EntityPlayer player = CORE.getFakePlayer(aWorld); + + if (isItemResearchNotes(note) && data != null && note.getItemDamage() < 64) { + final boolean r2 = ResearchManager.isResearchComplete(mGTPP, "RESEARCHER1"); + final boolean r3 = ResearchManager.isResearchComplete(mGTPP, "RESEARCHER2"); + final HexUtils.Hex hex = new HexUtils.Hex(q, r); + ResearchManager.HexEntry he = null; + if (aspect != null) { + he = new ResearchManager.HexEntry(aspect, 2); + if (r3 && aWorld.rand.nextFloat() < 0.1f) { + aWorld.playSoundAtEntity((Entity) player, "random.orb", 0.2f, 0.9f + player.worldObj.rand.nextFloat() * 0.2f); + } + } else { + final float f = aWorld.rand.nextFloat(); + if (data.hexEntries.get(hex.toString()).aspect != null + && ((r2 && f < 0.25f) || (r3 && f < 0.5f))) { + aWorld.playSoundAtEntity((Entity) player, "random.orb", 0.2f, + 0.9f + player.worldObj.rand.nextFloat() * 0.2f); + ResearchManager.scheduleSave(player); + } + he = new ResearchManager.HexEntry((Aspect) null, 0); + } + data.hexEntries.put(hex.toString(), he); + data.hexes.put(hex.toString(), hex); + updateResearchNote(note, data); + if (!aWorld.isRemote && ResearchManager.checkResearchCompletion(note, data, player.getCommandSenderName())) { + note.setItemDamage(64); + } + }*/ + } + + public static void completeResearchNote(World aWorld, ItemStack aStack) { + if (!aWorld.isRemote) { + if (isItemResearchNotes(aStack)) { + aStack.setItemDamage(64); + } + } + } + + public static synchronized final TC_AspectList_Wrapper getAspectList_Ex(final List aAspects) { + final TC_AspectList_Wrapper rAspects = new TC_AspectList_Wrapper(); + for (final GTPP_AspectStack tAspect : aAspects) { + rAspects.add(tAspect.mAspect, tAspect.mAmount); + } + return rAspects; + } + + public static void addResearch(TC_ResearchItem_Wrapper tc_ResearchItem_Wrapper) { + // TODO Auto-generated method stub + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java new file mode 100644 index 0000000000..fe9a82c6b5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java @@ -0,0 +1,43 @@ +package gtPlusPlus.xmod.thermalfoundation; + +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.thermalfoundation.block.TF_Blocks; +import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; +import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; +import gtPlusPlus.xmod.thermalfoundation.recipe.TF_Gregtech_Recipes; + +public class HANDLER_TF{ + + public static void preInit(){ + if (LoadedMods.CoFHCore && !LoadedMods.ThermalFoundation){ + TF_Fluids.preInit(); + TF_Items.preInit(); + TF_Blocks.preInit(); + if (LoadedMods.Gregtech){ + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + //mGregMatLoader.enableMaterial(Materials.Enderium); + } + } + } + } + + public static void init(){ + if (LoadedMods.CoFHCore && !LoadedMods.ThermalFoundation){ + TF_Fluids.init(); + TF_Blocks.init(); + TF_Items.init(); + } + } + + public static void postInit(){ + if (LoadedMods.CoFHCore && !LoadedMods.ThermalFoundation){ + TF_Fluids.postInit(); + TF_Items.postInit(); + TF_Blocks.postInit(); + if(LoadedMods.Gregtech){ + TF_Gregtech_Recipes.run(); + } + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java new file mode 100644 index 0000000000..a0480e907e --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Cryotheum.java @@ -0,0 +1,191 @@ +package gtPlusPlus.xmod.thermalfoundation.block; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.*; +import net.minecraft.init.Blocks; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import cofh.core.fluid.BlockFluidInteractive; +import cofh.lib.util.BlockWrapper; +import cofh.lib.util.helpers.DamageHelper; +import cofh.lib.util.helpers.ServerHelper; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; +import net.minecraftforge.common.util.ForgeDirection; + +public class TF_Block_Fluid_Cryotheum +extends BlockFluidInteractive +{ + Random random = new Random(); + public static final int LEVELS = 5; + public static final Material materialFluidCryotheum = new MaterialLiquid(MapColor.iceColor); + private static boolean enableSourceFall = true; + private static boolean effect = true; + + public TF_Block_Fluid_Cryotheum() + { + super(CORE.MODID, TF_Fluids.fluidCryotheum, materialFluidCryotheum, "cryotheum"); + this.setQuantaPerBlock(5); + this.setTickRate(15); + + this.setHardness(1000.0F); + this.setLightOpacity(1); + this.setParticleColor(0.15F, 0.7F, 1.0F); + } + + @Override + public boolean preInit() + { + GameRegistry.registerBlock(this, "FluidCryotheum"); + + this.addInteraction(Blocks.grass, Blocks.dirt); + this.addInteraction(Blocks.water, 0, Blocks.ice); + this.addInteraction(Blocks.water, Blocks.snow); + this.addInteraction(Blocks.flowing_water, 0, Blocks.ice); + this.addInteraction(Blocks.flowing_water, Blocks.snow); + this.addInteraction(Blocks.lava, 0, Blocks.obsidian); + this.addInteraction(Blocks.lava, Blocks.stone); + this.addInteraction(Blocks.flowing_lava, 0, Blocks.obsidian); + this.addInteraction(Blocks.flowing_lava, Blocks.stone); + this.addInteraction(Blocks.leaves, Blocks.air); + this.addInteraction(Blocks.tallgrass, Blocks.air); + this.addInteraction(Blocks.fire, Blocks.air); + //addInteraction(TFBlocks.blockFluidGlowstone, 0, Blocks.glowstone); + + final String str1 = "Fluid.Cryotheum"; + String str2 = "Enable this for Fluid Cryotheum to be worse than lava, except cold."; + effect = true; + + str2 = "Enable this for Fluid Cryotheum Source blocks to gradually fall downwards."; + enableSourceFall = true; + + return true; + } + + @Override + public void onEntityCollidedWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Entity paramEntity) + { + paramEntity.extinguish(); + if (!effect) { + return; + } + if ((paramEntity.motionY < -0.05D) || (paramEntity.motionY > 0.05D)) { + paramEntity.motionY *= 0.05D; + } + if ((paramEntity.motionZ < -0.05D) || (paramEntity.motionZ > 0.05D)) { + paramEntity.motionZ *= 0.05D; + } + if ((paramEntity.motionX < -0.05D) || (paramEntity.motionX > 0.05D)) { + paramEntity.motionX *= 0.05D; + } + if (ServerHelper.isClientWorld(paramWorld)) { + return; + } + if ((paramWorld.getTotalWorldTime() % 8L) != 0L) { + return; + } + if (((paramEntity instanceof EntityZombie)) || ((paramEntity instanceof EntityCreeper))) + { + final EntitySnowman localEntitySnowman = new EntitySnowman(paramWorld); + localEntitySnowman.setLocationAndAngles(paramEntity.posX, paramEntity.posY, paramEntity.posZ, paramEntity.rotationYaw, paramEntity.rotationPitch); + paramWorld.spawnEntityInWorld(localEntitySnowman); + + paramEntity.setDead(); + } + else if (/*((paramEntity instanceof EntityBlizz)) ||*/((paramEntity instanceof EntitySnowman))) + { + ((EntityLivingBase)paramEntity).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 120, 0)); + ((EntityLivingBase)paramEntity).addPotionEffect(new PotionEffect(Potion.regeneration.id, 120, 0)); + } + else if ((paramEntity instanceof EntityBlaze)) + { + paramEntity.attackEntityFrom(DamageHelper.cryotheum, 10.0F); + } + else + { + final boolean bool = paramEntity.velocityChanged; + paramEntity.attackEntityFrom(DamageHelper.cryotheum, 2.0F); + paramEntity.velocityChanged = bool; + } + } + + @Override + public int getLightValue(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3) + { + return TF_Fluids.fluidCryotheum.getLuminosity(); + } + + @Override + public void updateTick(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Random paramRandom) + { + if (effect) { + this.checkForInteraction(paramWorld, paramInt1, paramInt2, paramInt3); + } + if ((enableSourceFall) && (paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3) == 0)) + { + final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2 + this.densityDir, paramInt3); + final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2 + this.densityDir, paramInt3); + if ((localBlock == this) && (i != 0)) + { + paramWorld.setBlock(paramInt1, paramInt2 + this.densityDir, paramInt3, this, 0, 3); + paramWorld.setBlockToAir(paramInt1, paramInt2, paramInt3); + return; + } + } + super.updateTick(paramWorld, paramInt1, paramInt2, paramInt3, paramRandom); + } + + protected void checkForInteraction(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) + { + if (paramWorld.getBlock(paramInt1, paramInt2, paramInt3) != this) { + return; + } + int i = paramInt1; + int j = paramInt2; + int k = paramInt3; + for (int m = 0; m < 6; m++) + { + i = paramInt1 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][0]; + j = paramInt2 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][1]; + k = paramInt3 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][2]; + + this.interactWithBlock(paramWorld, i, j, k); + } + this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 - 1); + this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 + 1); + this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 - 1); + this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 + 1); + } + + protected void interactWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) + { + final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2, paramInt3); + if ((localBlock == Blocks.air) || (localBlock == this)) { + return; + } + final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3); + if (this.hasInteraction(localBlock, i)) + { + final BlockWrapper localBlockWrapper = this.getInteraction(localBlock, i); + paramWorld.setBlock(paramInt1, paramInt2, paramInt3, localBlockWrapper.block, localBlockWrapper.metadata, 3); + } + else if ((paramWorld.isSideSolid(paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) && (paramWorld.isAirBlock(paramInt1, paramInt2 + 1, paramInt3))) + { + paramWorld.setBlock(paramInt1, paramInt2 + 1, paramInt3, Blocks.snow_layer, 0, 3); + } + } + + protected void triggerInteractionEffects(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) {} +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java new file mode 100644 index 0000000000..513fe51fd9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java @@ -0,0 +1,68 @@ +package gtPlusPlus.xmod.thermalfoundation.block; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.entity.Entity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import cofh.core.fluid.BlockFluidCoFHBase; +import cofh.core.util.CoreUtils; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; + +public class TF_Block_Fluid_Ender + extends BlockFluidCoFHBase +{ + public static final int LEVELS = 4; + public static final Material materialFluidEnder = new MaterialLiquid(MapColor.greenColor); + private static boolean effect = true; + + public TF_Block_Fluid_Ender() + { + super(CORE.MODID, TF_Fluids.fluidEnder, materialFluidEnder, "ender"); + setQuantaPerBlock(4); + setTickRate(20); + + setHardness(2000.0F); + setLightOpacity(7); + setParticleColor(0.05F, 0.2F, 0.2F); + } + + @Override +public boolean preInit() + { + GameRegistry.registerBlock(this, "FluidEnder"); + + String str1 = "Fluid.Ender"; + String str2 = "Enable this for Fluid Ender to randomly teleport entities on contact."; + + return true; + } + + @Override +public void onEntityCollidedWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Entity paramEntity) + { + if ((!effect) || (paramWorld.isRemote)) { + return; + } + if (paramWorld.getTotalWorldTime() % 8L == 0L) + { + int i = paramInt1 - 8 + paramWorld.rand.nextInt(17); + int j = paramInt2 + paramWorld.rand.nextInt(8); + int k = paramInt3 - 8 + paramWorld.rand.nextInt(17); + if (!paramWorld.getBlock(i, j, k).getMaterial().isSolid()) { + CoreUtils.teleportEntityTo(paramEntity, i, j, k); + } + } + } + + @Override +public int getLightValue(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3) + { + return TF_Fluids.fluidEnder.getLuminosity(); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java new file mode 100644 index 0000000000..5444e8d5ad --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Pyrotheum.java @@ -0,0 +1,191 @@ +package gtPlusPlus.xmod.thermalfoundation.block; + +import java.util.Random; + +import cpw.mods.fml.common.registry.GameRegistry; + +import net.minecraft.block.Block; +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import cofh.core.fluid.BlockFluidInteractive; +import cofh.lib.util.BlockWrapper; +import cofh.lib.util.helpers.ServerHelper; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; +import net.minecraftforge.common.util.ForgeDirection; + +public class TF_Block_Fluid_Pyrotheum +extends BlockFluidInteractive +{ + Random random = new Random(); + public static final int LEVELS = 5; + public static final Material materialFluidPyrotheum = new MaterialLiquid(MapColor.tntColor); + private static boolean effect = true; + private static boolean enableSourceFall = true; + + public TF_Block_Fluid_Pyrotheum() + { + super(CORE.MODID, TF_Fluids.fluidPyrotheum, Material.lava, "pyrotheum"); + this.setQuantaPerBlock(5); + this.setTickRate(10); + + this.setHardness(1000.0F); + this.setLightOpacity(1); + this.setParticleColor(1.0F, 0.7F, 0.15F); + } + + @Override + public boolean preInit() + { + GameRegistry.registerBlock(this, "FluidPyrotheum"); + + this.addInteraction(Blocks.cobblestone, Blocks.stone); + this.addInteraction(Blocks.grass, Blocks.dirt); + this.addInteraction(Blocks.sand, Blocks.glass); + this.addInteraction(Blocks.water, Blocks.stone); + this.addInteraction(Blocks.flowing_water, Blocks.stone); + this.addInteraction(Blocks.clay, Blocks.hardened_clay); + this.addInteraction(Blocks.ice, Blocks.stone); + this.addInteraction(Blocks.snow, Blocks.air); + this.addInteraction(Blocks.snow_layer, Blocks.air); + for (int i = 0; i < 8; i++) { + this.addInteraction(Blocks.stone_stairs, i, Blocks.stone_brick_stairs, i); + } + final String str1 = "Fluid.Pyrotheum"; + String str2 = "Enable this for Fluid Pyrotheum to be worse than lava."; + effect = true; + + str2 = "Enable this for Fluid Pyrotheum Source blocks to gradually fall downwards."; + enableSourceFall = true; + + return true; + } + + @Override + public void onEntityCollidedWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Entity paramEntity) + { + if (!effect) { + return; + } + if (ServerHelper.isClientWorld(paramWorld)) { + return; + } + if (!(paramEntity instanceof EntityPlayer)) { + if ((paramEntity instanceof EntityCreeper)) + { + paramWorld.createExplosion(paramEntity, paramEntity.posX, paramEntity.posY, paramEntity.posZ, 6.0F, paramEntity.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")); + paramEntity.setDead(); + } + } + } + + @Override + public int getLightValue(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3) + { + return TF_Fluids.fluidPyrotheum.getLuminosity(); + } + + @Override + public int getFireSpreadSpeed(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) + { + return effect ? 800 : 0; + } + + @Override + public int getFlammability(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) + { + return 0; + } + + @Override + public boolean isFlammable(final IBlockAccess paramIBlockAccess, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) + { + return (effect) && (paramForgeDirection.ordinal() > ForgeDirection.UP.ordinal()) && (paramIBlockAccess.getBlock(paramInt1, paramInt2 - 1, paramInt3) != this); + } + + @Override + public boolean isFireSource(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final ForgeDirection paramForgeDirection) + { + return effect; + } + + @Override + public void updateTick(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3, final Random paramRandom) + { + if (effect) { + this.checkForInteraction(paramWorld, paramInt1, paramInt2, paramInt3); + } + if ((enableSourceFall) && (paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3) == 0)) + { + final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2 + this.densityDir, paramInt3); + final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2 + this.densityDir, paramInt3); + if (((localBlock == this) && (i != 0)) || (localBlock.isFlammable(paramWorld, paramInt1, paramInt2 + this.densityDir, paramInt3, ForgeDirection.UP))) + { + paramWorld.setBlock(paramInt1, paramInt2 + this.densityDir, paramInt3, this, 0, 3); + paramWorld.setBlockToAir(paramInt1, paramInt2, paramInt3); + return; + } + } + super.updateTick(paramWorld, paramInt1, paramInt2, paramInt3, paramRandom); + } + + protected void checkForInteraction(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) + { + if (paramWorld.getBlock(paramInt1, paramInt2, paramInt3) != this) { + return; + } + int i = paramInt1; + int j = paramInt2; + int k = paramInt3; + for (int m = 0; m < 6; m++) + { + i = paramInt1 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][0]; + j = paramInt2 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][1]; + k = paramInt3 + cofh.lib.util.helpers.BlockHelper.SIDE_COORD_MOD[m][2]; + + this.interactWithBlock(paramWorld, i, j, k); + } + this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 - 1); + this.interactWithBlock(paramWorld, paramInt1 - 1, paramInt2, paramInt3 + 1); + this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 - 1); + this.interactWithBlock(paramWorld, paramInt1 + 1, paramInt2, paramInt3 + 1); + } + + protected void interactWithBlock(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) + { + final Block localBlock = paramWorld.getBlock(paramInt1, paramInt2, paramInt3); + if ((localBlock == Blocks.air) || (localBlock == this)) { + return; + } + final int i = paramWorld.getBlockMetadata(paramInt1, paramInt2, paramInt3); + if (this.hasInteraction(localBlock, i)) + { + final BlockWrapper localBlockWrapper = this.getInteraction(localBlock, i); + paramWorld.setBlock(paramInt1, paramInt2, paramInt3, localBlockWrapper.block, localBlockWrapper.metadata, 3); + this.triggerInteractionEffects(paramWorld, paramInt1, paramInt2, paramInt3); + } + else if (localBlock.isFlammable(paramWorld, paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) + { + paramWorld.setBlock(paramInt1, paramInt2, paramInt3, Blocks.fire); + } + else if ((paramWorld.isSideSolid(paramInt1, paramInt2, paramInt3, ForgeDirection.UP)) && (paramWorld.isAirBlock(paramInt1, paramInt2 + 1, paramInt3))) + { + paramWorld.setBlock(paramInt1, paramInt2 + 1, paramInt3, Blocks.fire, 0, 3); + } + } + + protected void triggerInteractionEffects(final World paramWorld, final int paramInt1, final int paramInt2, final int paramInt3) + { + if (this.random.nextInt(16) == 0) { + paramWorld.playSoundEffect(paramInt1 + 0.5F, paramInt2 + 0.5F, paramInt3 + 0.5F, "random.fizz", 0.5F, 2.2F + ((paramWorld.rand.nextFloat() - paramWorld.rand.nextFloat()) * 0.8F)); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java new file mode 100644 index 0000000000..6b56262b1a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java @@ -0,0 +1,29 @@ +package gtPlusPlus.xmod.thermalfoundation.block; + +import cofh.core.fluid.BlockFluidCoFHBase; + +public class TF_Blocks +{ + + public static BlockFluidCoFHBase blockFluidPyrotheum; + public static BlockFluidCoFHBase blockFluidCryotheum; + public static BlockFluidCoFHBase blockFluidEnder; + + + public static void preInit() + { + blockFluidPyrotheum = new TF_Block_Fluid_Pyrotheum(); + blockFluidCryotheum = new TF_Block_Fluid_Cryotheum(); + blockFluidEnder = new TF_Block_Fluid_Ender(); + blockFluidPyrotheum.preInit(); + blockFluidCryotheum.preInit(); + blockFluidEnder.preInit(); + } + + public static void init() {} + + public static void postInit() + { + + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java new file mode 100644 index 0000000000..6ebae64384 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java @@ -0,0 +1,79 @@ +package gtPlusPlus.xmod.thermalfoundation.fluid; + +import net.minecraft.block.BlockDispenser; +import net.minecraft.init.Items; +import net.minecraft.item.EnumRarity; + +import cofh.core.util.fluid.DispenserEmptyBucketHandler; +import cofh.core.util.fluid.DispenserFilledBucketHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public class TF_Fluids +{ + public static Fluid fluidPyrotheum; + public static Fluid fluidCryotheum; + public static Fluid fluidEnder; + + public static void preInit() + { + if (!LoadedMods.ThermalFoundation){ + Logger.INFO("Adding in our own versions of Thermal Foundation Fluids - Non-GT"); + final Fluid pyrotheum = FluidRegistry.getFluid("pyrotheum"); + final Fluid cryotheum = FluidRegistry.getFluid("cryotheum"); + final Fluid ender = FluidRegistry.getFluid("ender"); + + if (pyrotheum == null){ + Logger.INFO("Registering Blazing Pyrotheum as it does not exist."); + fluidPyrotheum = new Fluid("pyrotheum").setLuminosity(15).setDensity(2000).setViscosity(1200).setTemperature(4000).setRarity(EnumRarity.rare); + registerFluid(fluidPyrotheum, "pyrotheum"); + } + else { + Logger.INFO("Registering Blazing Pyrotheum as it is an already existing Fluid."); + fluidPyrotheum = pyrotheum; + } + if (cryotheum == null){ + Logger.INFO("Registering Gelid Cryotheum as it does not exist."); + fluidCryotheum = new Fluid("cryotheum").setLuminosity(0).setDensity(4000).setViscosity(3000).setTemperature(50).setRarity(EnumRarity.rare); + registerFluid(fluidCryotheum, "cryotheum"); + } + else { + Logger.INFO("Registering Gelid Cryotheum as it is an already existing Fluid."); + fluidCryotheum = cryotheum; + } + + if (ender == null){ + Logger.INFO("Registering Resonant Ender as it does not exist."); + fluidEnder = new Fluid("ender").setLuminosity(3).setDensity(4000).setViscosity(3000).setTemperature(300).setRarity(EnumRarity.uncommon); + registerFluid(fluidEnder, "ender"); + } + else { + Logger.INFO("Registering Resonant Ender as it is an already existing Fluid."); + fluidEnder = ender; + } + } + else { + Logger.INFO("Thermal Foundation is already loaded, no need to add our own Cryotheum/Pyrotheum."); + } + } + + public static void init() {} + + public static void postInit() {} + + public static void registerFluid(final Fluid paramFluid, final String paramString) + { + if (!FluidRegistry.isFluidRegistered(paramString)) { + FluidRegistry.registerFluid(paramFluid); + } + } + + public static void registerDispenserHandlers() + { + BlockDispenser.dispenseBehaviorRegistry.putObject(TF_Items.itemBucket, new DispenserFilledBucketHandler()); + BlockDispenser.dispenseBehaviorRegistry.putObject(Items.bucket, new DispenserEmptyBucketHandler()); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java new file mode 100644 index 0000000000..a628b9c5b6 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/item/TF_Items.java @@ -0,0 +1,88 @@ +package gtPlusPlus.xmod.thermalfoundation.item; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; + +import cofh.core.item.ItemBase; +import cofh.core.item.ItemBucket; +import cofh.core.util.energy.FurnaceFuelHandler; +import cofh.core.util.fluid.BucketHandler; +import cofh.lib.util.helpers.ItemHelper; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.thermalfoundation.block.TF_Blocks; +import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; +import net.minecraftforge.fluids.FluidContainerRegistry; + +public class TF_Items { + + public static ItemBase itemMaterial; + public static ItemStack rodBlizz; + public static ItemStack dustBlizz; + public static ItemStack dustPyrotheum; + public static ItemStack dustCryotheum; + public static ItemBucket itemBucket; + public static ItemStack bucketPyrotheum; + public static ItemStack bucketCryotheum; + public static ItemStack bucketEnder; + + public static ItemStack itemDustBlizz; + public static ItemStack itemDustPyrotheum; + public static ItemStack itemDustCryotheum; + public static ItemStack itemRodBlizz; + + public static void preInit(){ + + + itemBucket = (ItemBucket)new ItemBucket("MiscUtils").setUnlocalizedName("bucket").setCreativeTab(AddToCreativeTab.tabMisc); + itemMaterial = (ItemBase)new ItemBase("MiscUtils").setUnlocalizedName("material").setCreativeTab(AddToCreativeTab.tabMisc); + + + bucketPyrotheum = itemBucket.addOreDictItem(1, "bucketPyrotheum"); + bucketCryotheum = itemBucket.addOreDictItem(2, "bucketCryotheum"); + bucketEnder = itemBucket.addOreDictItem(3, "bucketEnder", 1); + rodBlizz = itemMaterial.addOreDictItem(1, "rodBlizz"); + dustBlizz = itemMaterial.addOreDictItem(2, "dustBlizz"); + dustPyrotheum = itemMaterial.addOreDictItem(3, "dustPyrotheum"); + dustCryotheum = itemMaterial.addOreDictItem(4, "dustCryotheum"); + + if (ReflectionUtils.doesClassExist("cofh.core.util.energy.FurnaceFuelHandler")){ + FurnaceFuelHandler.registerFuel(dustPyrotheum, 2400); //cofh.core.util.energy.FurnaceFuelHandler.registerFuel(ItemStack, int) + } + + ItemUtils.addItemToOreDictionary(rodBlizz, "stickBlizz"); + + itemRodBlizz = ItemUtils.simpleMetaStack(itemMaterial, 1, 1); + itemDustBlizz = ItemUtils.simpleMetaStack(itemMaterial, 2, 1); + itemDustPyrotheum = ItemUtils.simpleMetaStack(itemMaterial, 3, 1); + itemDustCryotheum = ItemUtils.simpleMetaStack(itemMaterial, 4, 1); + + + + } + + public static void init(){ + + BucketHandler.registerBucket(TF_Blocks.blockFluidPyrotheum, 0, bucketPyrotheum); + BucketHandler.registerBucket(TF_Blocks.blockFluidCryotheum, 0, bucketCryotheum); + BucketHandler.registerBucket(TF_Blocks.blockFluidEnder, 0, bucketEnder); + FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidPyrotheum, bucketPyrotheum, FluidContainerRegistry.EMPTY_BUCKET); + FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidCryotheum, bucketCryotheum, FluidContainerRegistry.EMPTY_BUCKET); + FluidContainerRegistry.registerFluidContainer(TF_Fluids.fluidEnder, bucketEnder, FluidContainerRegistry.EMPTY_BUCKET); + + + } + + public static void postInit(){ + if (!CORE.GTNH) { + ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustPyrotheum, 1), new Object[] { "dustCoal", "dustSulfur", "dustRedstone", "dustBlaze" })); + ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustCryotheum, 1), new Object[] { Items.snowball, "dustSaltpeter", "dustRedstone", "dustBlizz" })); + ItemHelper.addRecipe(ItemHelper.ShapelessRecipe(ItemHelper.cloneStack(dustCryotheum, 1), new Object[] { Items.snowball, "dustNitor", "dustRedstone", "dustBlizz" })); + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java b/src/main/java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java new file mode 100644 index 0000000000..85485b5565 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java @@ -0,0 +1,101 @@ +package gtPlusPlus.xmod.thermalfoundation.recipe; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; + +import cofh.lib.util.helpers.ItemHelper; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class TF_Gregtech_Recipes { + + public static void run(){ + start(); + } + + private static void start(){ + //Get Items to work with + final ItemStack dust_Cryotheum = ItemUtils.getItemStackOfAmountFromOreDict("dustCryotheum", 1); + final ItemStack dust_Pyrotheum = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrotheum, 1L); + final ItemStack dust_Blizz = ItemUtils.getItemStackOfAmountFromOreDict("dustBlizz", 1); + final ItemStack dust_Blizz3 = ItemUtils.getItemStackOfAmountFromOreDict("dustBlizz", 3); + final ItemStack rod_Blizz = ItemUtils.getItemStackOfAmountFromOreDict("stickBlizz", 1); + + final FluidStack moltenBlaze = getFluidStack("molten.blaze", 1440); + + //Gelid Cryotheum + GT_Values.RA.addChemicalBathRecipe((GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Cinnabar, 1L)), getFluidStack("cryotheum", 144), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cinnabar, 3L), GT_Values.NI, GT_Values.NI, null, 400, 30); + + //Blizz Powder + GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.snowball, 4), moltenBlaze, dust_Blizz, GT_Values.NI, GT_Values.NI, null, 400, 240); + + //Blizz Rod + GT_Values.RA.addVacuumFreezerRecipe(new ItemStack(Items.blaze_rod), rod_Blizz, (int) Math.max((Materials.Blaze.getMass()*4) * 3L, 1L)); + GT_ModHandler.addPulverisationRecipe(rod_Blizz, dust_Blizz3, new ItemStack(Items.snowball, 1), 50, false); + + ItemStack dustCoal = ItemUtils.getItemStackOfAmountFromOreDict("dustCoal", 1); + ItemStack dustSulfur = ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1); + ItemStack dustRedstone = ItemUtils.getItemStackOfAmountFromOreDict("dustRedstone", 1); + ItemStack dustBlaze = ItemUtils.getItemStackOfAmountFromOreDict("dustBlaze", 1); + ItemStack dustSaltpeter = ItemUtils.getItemStackOfAmountFromOreDict("dustSaltpeter", 1); + ItemStack dustSnow = ItemUtils.getItemStackOfAmountFromOreDict("dustSnow", 1); + ItemStack dustBlizz = ItemUtils.getItemStackOfAmountFromOreDict("dustBlizz", 1); + ItemStack dustNiter = ItemUtils.getItemStackOfAmountFromOreDict("dustNiter", 1); + + if (ItemUtils.checkForInvalidItems(new ItemStack[] {dustCoal, dustSulfur, dustRedstone, dustBlaze})) { + GT_Values.RA.addMixerRecipe( + dustCoal, + dustSulfur, + dustRedstone, + dustBlaze, //Input + null, //F in + null, //F out + ItemHelper.cloneStack(dust_Pyrotheum, 1), //Output + 20*8, + 120); + } + + if (ItemUtils.checkForInvalidItems(new ItemStack[] {dustSaltpeter, dustSnow, dustRedstone, dustBlizz})) { + GT_Values.RA.addMixerRecipe( + dustSaltpeter, + dustSnow, + dustRedstone, + dustBlizz, //Input + null, //F in + null, //F out + ItemHelper.cloneStack(dust_Cryotheum, 1), //Output + 20*8, + 120); + } + + if (ItemUtils.checkForInvalidItems(new ItemStack[] {dustNiter, dustSnow, dustRedstone, dustBlizz})) { + GT_Values.RA.addMixerRecipe( + dustNiter, + dustSnow, + dustRedstone, + dustBlizz, //Input + null, //F in + null, //F out + ItemHelper.cloneStack(dust_Cryotheum, 1), //Output + 20*8, + 120); + } + + } + + private static FluidStack getFluidStack(final String fluidName, final int amount){ + return FluidUtils.getFluidStack(fluidName, amount); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java b/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java new file mode 100644 index 0000000000..4a3f9cd504 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/tinkers/HANDLER_Tinkers.java @@ -0,0 +1,105 @@ +package gtPlusPlus.xmod.tinkers; + +import java.lang.reflect.Field; + +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; +import gtPlusPlus.xmod.tinkers.util.TinkersDryingRecipe; +import gtPlusPlus.xmod.tinkers.util.TinkersUtils; +import net.minecraft.block.Block; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public class HANDLER_Tinkers { + + public static AutoMap mTinkerMaterials = new AutoMap(); + + public static final void preInit() { + if (LoadedMods.TiCon) { + + } + } + + public static final void init() { + if (LoadedMods.TiCon) { + + } + } + + public static final void postInit() { + if (LoadedMods.TiCon) { + + Fluid pyrotheumFluid = FluidRegistry.getFluid("pyrotheum"); + if (pyrotheumFluid != null) { + //Enable Pyrotheum as Fuel for the Smeltery + TinkersUtils.addSmelteryFuel(pyrotheumFluid, 5000, 70); // pyrotheum lasts 3.5 seconds per 15 mb + } + + //Generate Drying Rack recipes + TinkersDryingRecipe.generateAllDryingRecipes(); + + for (BaseTinkersMaterial y : mTinkerMaterials) { + //y.generate(); + } + + Class aTinkersSmeltery = ReflectionUtils.getClass("tconstruct.smeltery.TinkerSmeltery"); + AutoMap aTweakedFluids = new AutoMap(); + if (aTinkersSmeltery != null) { + try { + Logger.INFO("Manipulating the light levels of fluids in TiCon. Molten 'metals' in world are now very luminescent!"); + Field aFluidArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluids"); + Field aBlockArrayField = ReflectionUtils.getField(aTinkersSmeltery, "fluidBlocks"); + Fluid[] aTiconFluids = (Fluid[]) aFluidArrayField.get(null); + Block[] aTiconFluidBlocks = (Block[]) aBlockArrayField.get(null); + if (aTiconFluids != null && aTiconFluidBlocks != null) { + for (Fluid a : aTiconFluids) { + if (a == null) { + continue; + } else { + if (a.getLuminosity() <= 15) { + //if (a.getTemperature() >= 500) { + a.setLuminosity(16); + aTweakedFluids.put(a); + //} + } else { + aTweakedFluids.put(a); + continue; + } + } + } + for (Block a : aTiconFluidBlocks) { + if (a == null) { + continue; + } else { + Fluid f = FluidRegistry.lookupFluidForBlock(a); + boolean isHot = false; + if (f != null && f.getTemperature() >= 500) { + if (f.getLuminosity() <= 16 && !aTweakedFluids.containsValue(f)) { + f.setLuminosity(16); + } + isHot = true; + } + if (a.getLightValue() <= 16f) { + if (isHot) { + a.setLightLevel(16f); + } else { + if (a.getLightValue() <= 16f) { + a.setLightLevel(16f); + } + } + } else { + continue; + } + } + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java b/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java new file mode 100644 index 0000000000..0d2c79db08 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/tinkers/material/BaseTinkersMaterial.java @@ -0,0 +1,274 @@ +package gtPlusPlus.xmod.tinkers.material; + +import static gtPlusPlus.core.util.math.MathUtils.safeCast_LongToInt; + +import java.util.HashMap; + +import cpw.mods.fml.common.event.FMLInterModComms; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.xmod.tinkers.HANDLER_Tinkers; +import gtPlusPlus.xmod.tinkers.util.TinkersUtils; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.Fluid; + +public class BaseTinkersMaterial { + + + + private static HashMap aInternalMaterialIdMap = new HashMap(); + private static int aNextFreeID; + + public final String mLocalName; + + private final String mUnlocalName; + private final int mID; + private final Material mMaterial; + + static { + aNextFreeID = (Short.MAX_VALUE/2)+420; + } + + public BaseTinkersMaterial(Material aMaterial) { + mLocalName = aMaterial.getLocalizedName(); + mUnlocalName = "material.gtpp."+Utils.sanitizeString(mLocalName); + mMaterial = aMaterial; + mID = aNextFreeID++; + Logger.INFO("[TiCon] Assigning ID "+mID+" to "+mLocalName+"."); + aInternalMaterialIdMap.put(mUnlocalName, mID); + HANDLER_Tinkers.mTinkerMaterials.put(this); + } + + public String getUnlocalName() { + return mUnlocalName; + } + + private static int calcDurability(Material aMaterial) { + return safeCast_LongToInt(aMaterial.vDurability); + } + + private static int calcMiningSpeed(Material aMaterial) { + return (aMaterial.vHarvestLevel * 2)+aMaterial.vTier; + } + + private static int calcHarvestLevel(Material aMaterial) { + return aMaterial.vHarvestLevel; + } + + private static int calcAttack(Material aMaterial) { + return aMaterial.vHarvestLevel+aMaterial.vTier+aMaterial.vRadiationLevel; + } + + private static float calcHandleModifier(Material aMaterial) { + return 1f; + } + + private static int calcReinforced(Material aMaterial) { + return aMaterial.getMeltingPointC()/3600; + } + + private static int calcBowProjectileSpeed(Material aMaterial) { + return aMaterial.vHarvestLevel+2; + } + + private static int calcBowDrawSpeed(Material aMaterial) { + return aMaterial.vHarvestLevel+8; + } + + private static float calcProjectileMass(Material aMaterial) { + return (aMaterial.getMeltingPointC()/1800)*0.1f; + } + + private static float calcProjectileFragility(Material aMaterial) { + return 0f; + } + + private static String calcStyle(Material aMaterial) { + String aReturn = "" + EnumChatFormatting.WHITE; + int aTemp = aMaterial.getMeltingPointC(); + if (aTemp < 3600) { + aReturn = "" + EnumChatFormatting.WHITE; + } + else if (aTemp >= 3600) { + aReturn = "" + EnumChatFormatting.YELLOW; + } + else if (aTemp >= (3600*2)) { + aReturn = "" + EnumChatFormatting.GREEN; + } + else if (aTemp >= (3600*3)) { + aReturn = "" + EnumChatFormatting.RED; + } + else if (aTemp >= (3600*4)) { + aReturn = "" + EnumChatFormatting.DARK_RED; + } + else { + aReturn = "" + EnumChatFormatting.GOLD; + } + return aReturn; + } + + private static int calcColour(Material aMaterial) { + return aMaterial.getRgbAsHex(); + } + + public Object generateToolMaterial(Material aMaterial) { + int level, dura, speed, dmg, reinf, primColour; + float handle, stonebound; + level = calcHarvestLevel(aMaterial); + dura = calcDurability(aMaterial); + speed = calcMiningSpeed(aMaterial); + dmg = calcAttack(aMaterial); + reinf = calcReinforced(aMaterial); + primColour = calcColour(aMaterial); + handle = calcHandleModifier(aMaterial); + //stonebound = calcHarvestLevel(aMaterial); + stonebound = 0; + return TinkersUtils.generateToolMaterial(aMaterial.getLocalizedName(), aMaterial.getUnlocalizedName(), level, dura, speed, dmg, handle, reinf, stonebound, calcStyle(aMaterial), primColour); + } + + public void generate() { + + Logger.INFO("[TiCon] Trying to generate Material: "+mLocalName); + int id = mID; + if (id > 0) { + + //Object aTinkersCustomMaterial = generateToolMaterial(mMaterial); + //Logger.INFO("[TiCon] Created Material: "+mLocalName); + + //TinkersUtils.addToolMaterial(id, aTinkersCustomMaterial); + //TinkersUtils.addDefaultToolPartMaterial(id); + //TinkersUtils.addBowMaterial(id, calcBowDrawSpeed(mMaterial), 1.0F); + //TinkersUtils.addArrowMaterial(id, calcProjectileMass(mMaterial), calcProjectileFragility(mMaterial)); + + NBTTagCompound tag = new NBTTagCompound(); + tag.setInteger("Id", id); + tag.setString("Name", mUnlocalName); + tag.setString("localizationString", mLocalName); + tag.setInteger("Durability", calcDurability(mMaterial)); // 97 + tag.setInteger("MiningSpeed", calcMiningSpeed(mMaterial)); // 150 + tag.setInteger("HarvestLevel", calcHarvestLevel(mMaterial)); // 1 + tag.setInteger("Attack", calcAttack(mMaterial)); // 0 + tag.setFloat("HandleModifier", calcHandleModifier(mMaterial)); // 1.0f + tag.setInteger("Reinforced", calcReinforced(mMaterial)); // 0 + tag.setFloat("Bow_ProjectileSpeed", calcBowProjectileSpeed(mMaterial)); // 3.0f + tag.setInteger("Bow_DrawSpeed", calcBowDrawSpeed(mMaterial)); // 18 + tag.setFloat("Projectile_Mass", calcProjectileMass(mMaterial)); // 0.69f + tag.setFloat("Projectile_Fragility", calcProjectileFragility(mMaterial)); // 0.2f + tag.setString("Style", calcStyle(mMaterial)); + tag.setInteger("Color", calcColour(mMaterial)); + + + boolean generate = generateRecipes(mMaterial, id); + + if (generate) { + Logger.INFO("[TiCon] Sending IMC: addMaterial - "+mLocalName+"."); + FMLInterModComms.sendMessage("TConstruct", "addMaterial", tag); + + ItemStack itemstack = mMaterial.getIngot(1); + tag = new NBTTagCompound(); + tag.setInteger("MaterialId", id); + NBTTagCompound item = new NBTTagCompound(); + itemstack.writeToNBT(item); + tag.setTag("Item", item); + tag.setInteger("Value", 2); // What is value for? + + Logger.INFO("[TiCon] Sending IMC: addPartBuilderMaterial - "+mLocalName+"."); + FMLInterModComms.sendMessage("TConstruct", "addPartBuilderMaterial", tag); + + tag = new NBTTagCompound(); + tag.setInteger("MaterialId", id); + tag.setInteger("Value", 2); // What is value for? + item = new NBTTagCompound(); + itemstack.writeToNBT(item); + tag.setTag("Item", item); + + Logger.INFO("[TiCon] Sending IMC: addMaterialItem - "+mLocalName+"."); + FMLInterModComms.sendMessage("TConstruct", "addMaterialItem", tag); + } + + + } + + } + + private boolean generateRecipes(Material aMaterial, int aID) { + + Block aMatBlock; + Integer aMelt; + Fluid aFluid; + + try { + aMatBlock = aMaterial.getBlock(); + aMelt = aMaterial.getMeltingPointC(); + aFluid = aMaterial.getFluidStack(0).getFluid(); + } + catch (Throwable t) { + return false; + } + + if (aMatBlock == null || aMelt == null || aFluid == null) { + return false; + } + + + //Smeltery.addMelting(new ItemStack(ExtraUtils.unstableIngot, 1, 0), ExtraUtils.decorative1, 5, 850, aMaterial.getFluid(72)); + TinkersUtils.registerFluidType(mLocalName, aMatBlock, 0, aMelt, aFluid, true); + TinkersUtils.addMelting(aMaterial.getBlock(1), aMatBlock, 0, aMelt, aMaterial.getFluidStack(144*9)); + TinkersUtils.addMelting(aMaterial.getIngot(1), aMatBlock, 0, aMelt, aMaterial.getFluidStack(144)); + if (aMelt <= 3600) { + ItemStack ingotcast = TinkersUtils.getPattern(1); + TinkersUtils.addBasinRecipe(aMaterial.getBlock(1), + aMaterial.getFluidStack(144*9), (ItemStack) null, true, 100); + TinkersUtils.addCastingTableRecipe(aMaterial.getIngot(1), + aMaterial.getFluidStack(144), ingotcast, false, 50); + } + + boolean extended = TinkersUtils.generateCastingRecipes(aMaterial, aID); + + + + + + + //TConstructRegistry.getBasinCasting().addCastingRecipe(new ItemStack(ExtraUtils.decorative1, 1, 5), new FluidStack(unstable, 1296), (ItemStack)null, true, 100); + + + + + + + + + + + + + + + + + + + + + + + + + + + + return true; + } + + + + + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java new file mode 100644 index 0000000000..8bc7ffef29 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersDryingRecipe.java @@ -0,0 +1,120 @@ +package gtPlusPlus.xmod.tinkers.util; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.enums.GT_Values; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class TinkersDryingRecipe { + + public static AutoMap recipes = new AutoMap(); + + public final int time; + public final ItemStack input; + public final ItemStack result; + + public static void generateAllDryingRecipes() { + List aRecipes = TinkersUtils.getDryingRecipes(); + if (aRecipes != null && aRecipes.size() > 0) { + for (Object o : aRecipes) { + Logger.INFO("Trying to generate recipe using object of type "+o.getClass().getSimpleName()); + generateFromTinkersRecipeObject(o); + } + } + else { + Logger.INFO("Error generating Drying recipes, map was either null or empty. Null? "+(aRecipes != null)+", Size: "+aRecipes.size()); + } + if (!recipes.isEmpty()) { + Logger.INFO("Adding "+recipes.size()+" drying rack recipes to the dehydrator."); + for (TinkersDryingRecipe r : recipes) { + CORE.RA.addDehydratorRecipe( + new ItemStack[] { + CI.getNumberedCircuit(16), + r.input + }, + GT_Values.NF, + GT_Values.NF, + new ItemStack[] {r.result}, + new int[] {}, + r.time/10, + 30); + } + } + } + + public static TinkersDryingRecipe generateFromTinkersRecipeObject(Object o) { + Field aTime; + Field aInput; + Field aOutput; + Class aTinkerClass = ReflectionUtils.getClass("tconstruct.library.crafting.DryingRackRecipes.DryingRecipe");//o.getClass(); + if (aTinkerClass == null || !LoadedMods.TiCon) { + Logger.INFO("Error generating Drying Recipe, could not find class. Exists? "+ReflectionUtils.doesClassExist("tconstruct.library.crafting.DryingRackRecipes.DryingRecipe")); + Class clazz = ReflectionUtils.getClass("tconstruct.library.crafting.DryingRackRecipes"); + Class[] y = clazz.getDeclaredClasses(); + if (y == null || y.length <= 0) { + Logger.INFO("No hidden inner classes."); + return null; + } + else { + boolean found = false; + for (Class h : y) { + Logger.INFO("Found hidden inner class: "+h.getCanonicalName()); + if (h.getSimpleName().toLowerCase().equals("dryingrecipe")) { + Logger.INFO("Found correct recipe. Caching at correct location."); + ReflectionUtils.mCachedClasses.put("tconstruct.library.crafting.DryingRackRecipes.DryingRecipe", h); + aTinkerClass = h; + found = true; + break; + } + } + if (!found) { + return null; + } + } + } + aTime = ReflectionUtils.getField(aTinkerClass, "time"); + aInput = ReflectionUtils.getField(aTinkerClass, "input"); + aOutput = ReflectionUtils.getField(aTinkerClass, "result"); + try { + int time_internal = aTime.getInt(o); + ItemStack input_internal = (ItemStack) aInput.get(o); + ItemStack result_internal = (ItemStack) aOutput.get(o); + return new TinkersDryingRecipe(input_internal, time_internal, result_internal); + } catch (Throwable b) { + b.printStackTrace(); + } + return null; + } + + public TinkersDryingRecipe(final ItemStack input, final int time, final ItemStack result) { + this.time = time; + this.input = input; + this.result = result; + Logger.INFO("Generating Drying Recipe. Input: "+input.getDisplayName()+", Output: "+result.getDisplayName()); + recipes.add(this); + } + + public boolean matches(ItemStack input) { + if (input.hasTagCompound()) { + input = input.copy(); + input.getTagCompound().removeTag("frypanKill"); + if (input.getTagCompound().hasNoTags()) { + input.setTagCompound((NBTTagCompound) null); + } + } + return ItemStack.areItemStacksEqual(this.input, input); + } + + public ItemStack getResult() { + return this.result.copy(); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java new file mode 100644 index 0000000000..cf3284bfae --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java @@ -0,0 +1,544 @@ +package gtPlusPlus.xmod.tinkers.util; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; + +import gregtech.api.enums.Materials; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +public class TinkersUtils { + + private static final Class mClass_Smeltery; + private static final Class mClass_TConstructRegistry; + private static final Class mClass_ToolMaterial; + private static final Class mClass_IPattern; + private static final Class mClass_DynamicToolPart; + private static final Class mClass_FluidType; + private static final Class mClass_CastingRecipe; + private static final Class mClass_TinkerSmeltery; + + private static final Field mField_MoltenIronFluid; + + private static final Method mMethod_getFluidType; + private static final Method mMethod_getCastingRecipes; + + private static Object mSmelteryInstance; + private static Object mTinkersRegistryInstance; + + private static final HashMap mMethodCache = new LinkedHashMap(); + + + static { + mClass_Smeltery = ReflectionUtils.getClass("tconstruct.library.crafting.Smeltery"); + mClass_TConstructRegistry = ReflectionUtils.getClass("tconstruct.library.TConstructRegistry"); + + mClass_ToolMaterial = ReflectionUtils.getClass("tconstruct.library.tools.ToolMaterial"); + mClass_IPattern = ReflectionUtils.getClass("tconstruct.library.util.IPattern"); + mClass_DynamicToolPart = ReflectionUtils.getClass("tconstruct.library.tools.DynamicToolPart"); + mClass_FluidType = ReflectionUtils.getClass("tconstruct.library.crafting.FluidType"); + mClass_CastingRecipe = ReflectionUtils.getClass("tconstruct.library.crafting.CastingRecipe"); + mClass_TinkerSmeltery = ReflectionUtils.getClass("tconstruct.smeltery.TinkerSmeltery"); + + mField_MoltenIronFluid = ReflectionUtils.getField(mClass_TinkerSmeltery, "moltenIronFluid"); + + mMethod_getFluidType = ReflectionUtils.getMethod(mClass_FluidType, "getFluidType", String.class); + mMethod_getCastingRecipes = ReflectionUtils.getMethod(getCastingInstance(0), "getCastingRecipes", new Class[] {}); + } + + + /** + * + * @param aSwitch - The Registry to return + */ + private static void setTiConDataInstance() { + if (!LoadedMods.TiCon) { + return; + } else { + if (mSmelteryInstance == null) { + if (mClass_Smeltery != null) { + try { + mSmelteryInstance = ReflectionUtils.getField(mClass_Smeltery, "instance").get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + } + if (mTinkersRegistryInstance == null) { + if (mClass_TConstructRegistry != null) { + try { + mTinkersRegistryInstance = ReflectionUtils.getField(mClass_TConstructRegistry, "instance").get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + } + } + } + + public static final boolean isTiConFirstInOD() { + if (LoadedMods.TiCon) { + try { + return (boolean) ReflectionUtils.getField(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst").get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + return false; + } + + public static final boolean stopTiconLoadingFirst() { + if (isTiConFirstInOD()) { + try { + ReflectionUtils.setFinalFieldValue(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst", false); + if ((boolean) ReflectionUtils.getField(ReflectionUtils.getClass("PHConstruct"), "tconComesFirst").get(null) == false) { + return true; + } + //Did not work, let's see where TiCon uses this and prevent it. + else { + ItemUtils.getNonTinkersDust("", 1); + } + } + catch (Exception e) {} + } + return false; + } + + /** + * Add a new fluid as a valid Smeltery fuel. + * @param fluid The fluid. + * @param power The temperature of the fluid. This also influences the melting speed. Lava is 1000. + * @param duration How long one "portion" of liquid fuels the smeltery. Lava is 10. + */ + public static void addSmelteryFuel (Fluid fluid, int power, int duration){ + setTiConDataInstance(); + ReflectionUtils.invokeVoid(mSmelteryInstance, "addSmelteryFuel", new Class[] {Fluid.class, int.class, int.class}, new Object[] {fluid, power, duration}); + } + + /** + * Returns true if the liquid is a valid smeltery fuel. + */ + public static boolean isSmelteryFuel (Fluid fluid){ + setTiConDataInstance(); + return ReflectionUtils.invoke(mSmelteryInstance, "isSmelteryFuel", new Class[] {Fluid.class}, new Object[] {fluid}); + } + + /** + * Returns the power of a smeltery fuel or 0 if it's not a fuel. + */ + public static int getFuelPower (Fluid fluid){ + setTiConDataInstance(); + return (int) ReflectionUtils.invokeNonBool(mSmelteryInstance, "getFuelPower", new Class[] {Fluid.class}, new Object[] {fluid}); + } + + /** + * Returns the duration of a smeltery fuel or 0 if it's not a fuel. + */ + public static int getFuelDuration (Fluid fluid){ + setTiConDataInstance(); + return (int) ReflectionUtils.invokeNonBool(mSmelteryInstance, "getFuelDuration", new Class[] {Fluid.class}, new Object[] {fluid}); + } + + + + + + + + public static boolean registerFluidType(String name, Block block, int meta, int baseTemperature, Fluid fluid, boolean isToolpart) { + if (mMethodCache.get("registerFluidType") == null) { + Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.FluidType"), "registerFluidType", String.class, Block.class, int.class, int.class, Fluid.class, boolean.class); + mMethodCache.put("registerFluidType", m); + } + try { + mMethodCache.get("registerFluidType").invoke(null, name, block, meta, baseTemperature, fluid, isToolpart); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + + + + + + + + public static boolean addBaseMeltingRecipes(Material aMaterial) { + return addMelting(aMaterial.getBlock(1), aMaterial.getBlock(), 0, aMaterial.getMeltingPointC(), aMaterial.getFluidStack(144*9)) && + addMelting(aMaterial.getIngot(1), aMaterial.getBlock(), 0, aMaterial.getMeltingPointC(), aMaterial.getFluidStack(144)); + } + + public static boolean addMelting(ItemStack input, Block block, int metadata, int temperature, FluidStack liquid) { + if (mMethodCache.get("addMelting") == null) { + Method m = ReflectionUtils.getMethod(mClass_Smeltery, "addMelting", ItemStack.class, Block.class, int.class, int.class, FluidStack.class); + mMethodCache.put("addMelting", m); + } + try { + mMethodCache.get("addMelting").invoke(null, input, block, metadata, temperature, liquid); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + public static boolean addMelting(Object type, ItemStack input, int temperatureDifference, int fluidAmount) { + if (mMethodCache.get("addMelting") == null) { + Method m = ReflectionUtils.getMethod(mClass_Smeltery, "addMelting", mClass_FluidType, ItemStack.class, int.class, int.class); + mMethodCache.put("addMelting", m); + } + try { + mMethodCache.get("addMelting").invoke(null, type, input, temperatureDifference, fluidAmount); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + + + + + + + + + + + public static boolean addBaseBasinRecipes(Material aMaterial) { + return addBasinRecipe(aMaterial.getBlock(1), aMaterial.getFluidStack(144*9), (ItemStack) null, true, 100); + } + + public static boolean addBasinRecipe(ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay) { + if (mMethodCache.get("addBasinRecipe") == null) { + Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.LiquidCasting"), "addCastingRecipe", ItemStack.class, FluidStack.class, ItemStack.class, boolean.class, int.class); + mMethodCache.put("addBasinRecipe", m); + } + try { + mMethodCache.get("addBasinRecipe").invoke(getCastingInstance(0), output, metal, cast, consume, delay); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + + + + + + + public static boolean addBaseCastingRecipes(Material aMaterial) { + ItemStack ingotcast = getPattern(1); + return addCastingTableRecipe(aMaterial.getIngot(1), aMaterial.getFluidStack(144), ingotcast, false, 50); + } + + public static boolean addCastingTableRecipe(ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay) { + if (mMethodCache.get("addCastingTableRecipe") == null) { + Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.LiquidCasting"), "addCastingRecipe", ItemStack.class, FluidStack.class, ItemStack.class, boolean.class, int.class); + mMethodCache.put("addCastingTableRecipe", m); + } + try { + mMethodCache.get("addCastingTableRecipe").invoke(getCastingInstance(1), output, metal, cast, consume, delay); + return true; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + return false; + } + } + + + + + + + + /** + * 0 For Table, 1 For Basin. + * @param aType - Casting Type + * @return - The casting instance. + */ + public static Object getCastingInstance(int aType) { + + setTiConDataInstance(); + + Method m = null; + if (aType == 0) { + m = ReflectionUtils.getMethod(mTinkersRegistryInstance, "getTableCasting", new Class[] {}); + //return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getTableCasting", new Class[] {}, new Object[] {}); + } + else if (aType == 1) { + m = ReflectionUtils.getMethod(mTinkersRegistryInstance, "getBasinCasting", new Class[] {}); + //return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getBasinCasting", new Class[] {}, new Object[] {}); + } + else { + //return null; + } + + if (m != null) { + try { + return m.invoke(mTinkersRegistryInstance, new Object[] {}); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + return null; + } + + + private static Item mTinkerMetalPattern; + public static ItemStack getPattern(int aType) { + if (mTinkerMetalPattern == null) { + Field m = ReflectionUtils.getField(mClass_TinkerSmeltery, "metalPattern"); + if (m != null) { + try { + mTinkerMetalPattern = (Item) m.get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + } + } + if (mTinkerMetalPattern != null) { + ItemStack ingotCast = new ItemStack(mTinkerMetalPattern, aType, 0); + return ingotCast; + } + return ItemUtils.getErrorStack(1, "Bad Tinkers Pattern"); + } + + private static AutoMap mDryingRackRecipes; + + public static List getDryingRecipes(){ + if (mDryingRackRecipes != null) { + return mDryingRackRecipes; + } + AutoMap aData = new AutoMap(); + int aCount = 0; + try { + ArrayList recipes = (ArrayList) ReflectionUtils.getField(ReflectionUtils.getClass("tconstruct.library.crafting.DryingRackRecipes"), "recipes").get(null); + if (recipes != null) { + for (Object o : recipes) { + aData.put(o); + aCount++; + } + Logger.INFO("Found "+aCount+" Tinkers drying rack recipes."); + } + else { + Logger.INFO("Failed to find any Tinkers drying rack recipes."); + } + } catch (IllegalArgumentException | IllegalAccessException e) { + Logger.INFO("Failed to find any Tinkers drying rack recipes."); + } + mDryingRackRecipes = aData; + return aData; + } + + /** + * Generates Tinkers {@link ToolMaterial}'s reflectively. + * @param name + * @param localizationString + * @param level + * @param durability + * @param speed + * @param damage + * @param handle + * @param reinforced + * @param stonebound + * @param style + * @param primaryColor + * @return + */ + public static Object generateToolMaterial(String name, String localizationString, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style, int primaryColor) { + try { + Constructor constructor = mClass_ToolMaterial.getConstructor(String.class, String.class, int.class, int.class, int.class, int.class, float.class, int.class, float.class, String.class, int.class); + Object myObject = constructor.newInstance(name, localizationString, level, durability, speed, damage, handle, reinforced, stonebound, style, primaryColor); + return myObject; + } catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + + + + + + + + + + + public static void addToolMaterial(int id, Object aToolMaterial) { + if (mMethodCache.get("addToolMaterial") == null) { + Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addtoolMaterial", int.class, mClass_ToolMaterial); + mMethodCache.put("addToolMaterial", m); + } + try { + mMethodCache.get("addToolMaterial").invoke(mClass_TConstructRegistry, id, aToolMaterial); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + + } + } + + public static void addDefaultToolPartMaterial(int id) { + if (mMethodCache.get("addDefaultToolPartMaterial") == null) { + Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addDefaultToolPartMaterial", int.class); + mMethodCache.put("addDefaultToolPartMaterial", m); + } + try { + mMethodCache.get("addDefaultToolPartMaterial").invoke(mClass_TConstructRegistry, id); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + + public static void addBowMaterial(int id, int drawspeed, float maxSpeed) { + if (mMethodCache.get("addBowMaterial") == null) { + Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addBowMaterial", int.class, int.class, float.class); + mMethodCache.put("addBowMaterial", m); + } + try { + mMethodCache.get("addBowMaterial").invoke(mClass_TConstructRegistry, id, drawspeed, maxSpeed); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + + public static void addArrowMaterial(int id, float mass, float fragility) { + if (mMethodCache.get("addArrowMaterial") == null) { + Method m = ReflectionUtils.getMethod(mClass_TConstructRegistry, "addArrowMaterial", int.class, float.class, float.class); + mMethodCache.put("addArrowMaterial", m); + } + try { + mMethodCache.get("addArrowMaterial").invoke(mClass_TConstructRegistry, id, mass, fragility); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + } + } + + public static List getTableCastingRecipes(){ + Object aCastingTableHandlerInstance = getCastingInstance(0); + List aTemp; + try { + aTemp = (List) mMethod_getCastingRecipes.invoke(aCastingTableHandlerInstance, new Object[] {}); + return aTemp; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + return new ArrayList(); + } + + public static boolean generateCastingRecipes(Material aMaterial, int aID) { + + List newRecipies = new LinkedList(); + + + Iterator iterator1 = getTableCastingRecipes().iterator(); + Fluid aMoltenIron = null; + if (aMoltenIron == null) { + try { + aMoltenIron = (Fluid) mField_MoltenIronFluid.get(null); + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + aMoltenIron = Materials.Iron.getMolten(0).getFluid(); + } + } + while (iterator1.hasNext()) { + CastingRecipeHandler recipe = new CastingRecipeHandler(iterator1.next()); + if (recipe == null || !recipe.valid) { + continue; + } + try { + if (recipe.castingMetal.getFluid() == aMoltenIron && recipe.cast != null + && mClass_IPattern.isInstance(recipe.cast.getItem()) && mClass_DynamicToolPart.isInstance(recipe.getResult().getItem())) { + newRecipies.add(recipe); + } + } catch (IllegalArgumentException e) { + e.printStackTrace(); + return false; + } + } + + + Object ft; + try { + ft = mMethod_getFluidType.invoke(null, aMaterial.getLocalizedName()); + Iterator iterator2 = newRecipies.iterator(); + while (iterator2.hasNext()) { + CastingRecipeHandler recipe = new CastingRecipeHandler(iterator2.next()); + if (!recipe.valid){ + continue; + } + //CastingRecipe recipe = (CastingRecipe) i$.next(); + ItemStack output = recipe.getResult().copy(); + output.setItemDamage(aID); + FluidStack liquid2 = new FluidStack(aMaterial.getFluidStack(0).getFluid(), recipe.castingMetal.amount); + addCastingTableRecipe(output, liquid2, recipe.cast, recipe.consumeCast, recipe.coolTime); + addMelting(ft, output, 0, liquid2.amount / 2); + } + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + return false; + } + + return true; + } + + private static class CastingRecipeHandler { + + public ItemStack output; + public FluidStack castingMetal; + public ItemStack cast; + public boolean consumeCast; + public int coolTime; + + public boolean valid; + + public CastingRecipeHandler(Object aCastingRecipe) { + if (mClass_CastingRecipe.isInstance(aCastingRecipe)) { + try { + Field aF_output = ReflectionUtils.getField(mClass_CastingRecipe, "output"); + Field aF_castingMetal = ReflectionUtils.getField(mClass_CastingRecipe, "castingMetal"); + Field aF_cast = ReflectionUtils.getField(mClass_CastingRecipe, "cast"); + Field aF_consumeCast = ReflectionUtils.getField(mClass_CastingRecipe, "consumeCast"); + Field aF_coolTime = ReflectionUtils.getField(mClass_CastingRecipe, "coolTime"); + + output = (ItemStack) aF_output.get(aCastingRecipe); + castingMetal = (FluidStack) aF_castingMetal.get(aCastingRecipe); + cast = (ItemStack) aF_cast.get(aCastingRecipe); + consumeCast = (boolean) aF_consumeCast.get(aCastingRecipe); + coolTime = (int) aF_coolTime.get(aCastingRecipe); + valid = true; + } + catch (Throwable t) { + t.printStackTrace(); + valid = false; + } + } + else { + valid = false; + } + } + + public boolean matches(FluidStack metal, ItemStack inputCast) { + return this.castingMetal.isFluidEqual(metal) && (this.cast != null && this.cast.getItemDamage() == 32767 + && inputCast.getItem() == this.cast.getItem() || ItemStack.areItemStacksEqual(this.cast, inputCast)); + } + + public ItemStack getResult() { + return this.output.copy(); + } + + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java b/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java new file mode 100644 index 0000000000..35f9f4bbe8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/witchery/WitchUtils.java @@ -0,0 +1,99 @@ +package gtPlusPlus.xmod.witchery; + +import java.lang.reflect.Field; +import java.util.ArrayList; + +import com.mojang.authlib.GameProfile; + +import gtPlusPlus.core.lib.LoadedMods; +import gtPlusPlus.core.material.ALLOY; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.oredict.OreDictionary; + +public class WitchUtils { + + private static final GameProfile NORMAL_MINER_PROFILE; + private static final GameProfile KOBOLDITE_MINER_PROFILE; + + static { + Field a1 = null, a2 = null; + GameProfile b1 = null, b2 = null; + if (LoadedMods.Witchery) { + try { + a1 = getField("com.emoniph.witchery.entity.ai.EntityAIDigBlocks", "NORMAL_MINER_PROFILE"); + a2 = getField("com.emoniph.witchery.entity.ai.EntityAIDigBlocks", "KOBOLDITE_MINER_PROFILE"); + b1 = (GameProfile) a1.get(null); + b2 = (GameProfile) a2.get(null); + } + catch (Throwable t) { + } + } + NORMAL_MINER_PROFILE = b1; + KOBOLDITE_MINER_PROFILE = b2; + } + + //com.emoniph.witchery.entity.ai.EntityAIDigBlocks.onHarvestDrops(EntityPlayer, HarvestDropsEvent) + public static void onHarvestDrops(final EntityPlayer harvester, final BlockEvent.HarvestDropsEvent event) { + + + if (LoadedMods.Witchery) { + + if (harvester != null && !harvester.worldObj.isRemote && !event.isCanceled() && (isEqual(harvester.getGameProfile(), KOBOLDITE_MINER_PROFILE) || isEqual(harvester.getGameProfile(), NORMAL_MINER_PROFILE))) { + final boolean hasKobolditePick = isEqual(harvester.getGameProfile(), KOBOLDITE_MINER_PROFILE); + final ArrayList newDrops = new ArrayList(); + double kobolditeChance = hasKobolditePick ? 0.02 : 0.01; + for (final ItemStack drop : event.drops) { + final int[] oreIDs = OreDictionary.getOreIDs(drop); + boolean addOriginal = true; + if (oreIDs.length > 0) { + final String oreName = OreDictionary.getOreName(oreIDs[0]); + if (oreName != null && oreName.startsWith("ore")) { + final ItemStack smeltedDrop = FurnaceRecipes.smelting().getSmeltingResult(drop); + if (smeltedDrop != null && hasKobolditePick && harvester.worldObj.rand.nextDouble() < 0.5) { + addOriginal = false; + newDrops.add(smeltedDrop.copy()); + newDrops.add(smeltedDrop.copy()); + if (harvester.worldObj.rand.nextDouble() < 0.25) { + newDrops.add(smeltedDrop.copy()); + } + } + kobolditeChance = (hasKobolditePick ? 0.08 : 0.05); + } + } + if (addOriginal) { + newDrops.add(drop); + } + } + event.drops.clear(); + for (final ItemStack newDrop : newDrops) { + event.drops.add(newDrop); + } + if (kobolditeChance > 0.0 && harvester.worldObj.rand.nextDouble() < kobolditeChance) { + event.drops.add(ALLOY.KOBOLDITE.getDust(1)); + } + } + } + + } + + public static Field getField(String aClassName, String aFieldName) { + Class c; + c = ReflectionUtils.getClass(aClassName); + if (c != null) { + Field f = ReflectionUtils.getField(c, aFieldName); + if (f != null) { + return f; + } + } + return null; + } + + public static boolean isEqual(final GameProfile a, final GameProfile b) { + return a != null && b != null && a.getId() != null && b.getId() != null && a.getId().equals(b.getId()); + } + +} diff --git a/src/main/java/vswe/stevescarts/ModuleData/GppModuleData.java b/src/main/java/vswe/stevescarts/ModuleData/GppModuleData.java new file mode 100644 index 0000000000..eb8a8f319f --- /dev/null +++ b/src/main/java/vswe/stevescarts/ModuleData/GppModuleData.java @@ -0,0 +1,49 @@ +package vswe.stevescarts.ModuleData; + +import java.util.ArrayList; +import java.util.HashMap; + +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.sc2.modules.ModuleExoticSeeds; +import net.minecraft.init.Items; +import vswe.stevescarts.Helpers.ComponentTypes; +import vswe.stevescarts.Items.ModItems; +import vswe.stevescarts.Modules.ModuleBase; + +public class GppModuleData extends ModuleData { + + static byte ID_ExoticSeedAddon = 105; + public static ArrayList moduleListCustom = new ArrayList<>(); + + public GppModuleData(int id, String name, Class moduleClass, int modularCost) { + super(id, name, moduleClass, modularCost); + } + + @SuppressWarnings("unchecked") + public static void loadGpp() { + try { + HashMap moduleList = + (HashMap) (ReflectionUtils.getField(ModuleData.class, "moduleList").get(ModuleData.class)); + ModuleData netherWartModule = moduleList.get((byte)58); + + ModuleDataGroup farmerGroup = netherWartModule.getRequirement().get(0); + + ModuleData exoticSeedModule = + new ModuleData(ID_ExoticSeedAddon, "Crop: Exotic Seeds", ModuleExoticSeeds.class, 20).addRequirement(farmerGroup) + .addRecipe(new Object[][]{{Items.wheat_seeds}, + {ComponentTypes.EMPTY_DISK.getItemStack()} + }); + + moduleListCustom.add(exoticSeedModule); + + HashMap validModules = + (HashMap) (ReflectionUtils.getField(ModItems.class, "validModules").get(ModItems.class)); + + validModules.put(ID_ExoticSeedAddon, true); + + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + +} diff --git a/src/main/resources/assets/forestry/AlvearyFrame.png b/src/main/resources/assets/forestry/AlvearyFrame.png new file mode 100644 index 0000000000..c69ead8dd0 Binary files /dev/null and b/src/main/resources/assets/forestry/AlvearyFrame.png differ diff --git a/src/main/resources/assets/forestry/AlvearyMutator.png b/src/main/resources/assets/forestry/AlvearyMutator.png new file mode 100644 index 0000000000..2225f2748f Binary files /dev/null and b/src/main/resources/assets/forestry/AlvearyMutator.png differ diff --git a/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png new file mode 100644 index 0000000000..f21e59ec96 Binary files /dev/null and b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png differ diff --git a/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png new file mode 100644 index 0000000000..f21e59ec96 Binary files /dev/null and b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png differ diff --git a/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png new file mode 100644 index 0000000000..51336c00b9 Binary files /dev/null and b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png differ diff --git a/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png new file mode 100644 index 0000000000..51336c00b9 Binary files /dev/null and b/src/main/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png differ diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang new file mode 100644 index 0000000000..4f6b835f67 --- /dev/null +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -0,0 +1,222 @@ + +//Shit I stole from GTNH~ + +GTPP.EBF.heat=Heat capacity + +GTPP.machines.tier=Tier +GTPP.machines.input=Input +GTPP.machines.output=Output + +GTPP.multiblock.pollutionreduced=Pollution reduced to +GTPP.multiblock.pollution=Pollution +GTPP.multiblock.energy=Stored Energy +GTPP.multiblock.progress=Progress +GTPP.multiblock.efficiency=Efficiency +GTPP.multiblock.problems=Problems +GTPP.multiblock.mei=Max Energy Income +GTPP.multiblock.usage=Probably uses +GTPP.multiblock.specialvalue=Special Value +GTPP.multiblock.duration=Duration + + + +GTPP.CC.machinetier=Control Core Tier +GTPP.CC.discount=EU Discount +GTPP.CC.parallel=Maximum Parallel Processing + +//Tooltips for the Charger Packs +GTPP.battpack.tooltip.1=Worn as a Belt within Baubles +GTPP.battpack.tooltip.2=Drains +GTPP.battpack.tooltip.3=to charge worn armour +GTPP.battpack.tooltip.4=Also charges items on the hotbar + +//Tooltips for the Personal Healing Bauble +GTPP.nanohealer.tooltip.1=Worn as a Necklace within Baubles +GTPP.nanohealer.tooltip.2=Drains 1638400EU per operation +GTPP.nanohealer.tooltip.3=Can restore HP, Hunger and Saturation +GTPP.nanohealer.tooltip.4=WILL NOT PREVENT DEATH +GTPP.nanohealer.tooltip.5=Shift+RMB to toggle notifications +GTPP.nanohealer.hidden=Hiding Info? + +//10/4/19 +//Tooltips for the Mob Killing Baubles +GTPP.monsterkiller.tooltip.1=Worn as an Amulet within Baubles +GTPP.monsterkiller.tooltip.2=Drains +GTPP.monsterkiller.tooltip.3=per each kill +GTPP.monsterkiller.tooltip.4=Target Type: + +//17/08/19 +GTPP.container.decaychest.name=Decayables + + + + + + + + + + + + +//NEI INFORMATION +GTPP.nei.info=Information +GTPP.nei.eutick=Eu/t +GTPP.nei.timetaken=Time Taken +GTPP.nei.output=Output +GTPP.nei.input=Input +GTPP.nei.result=Result +GTPP.nei.radioation=Radiation Level + +//Some Generic Words +GTPP.info.eu=EU +GTPP.info.euInfo=EU Information +GTPP.info.inputLimit=Input Limit +GTPP.info.currentPower=Current Power +GTPP.info.hidden=Hidden + +//Some Time Words +GTPP.time.ticks=Ticks +GTPP.time.seconds=Seconds +GTPP.time.minutes=Minutes +GTPP.time.hours=Hours +GTPP.time.days=Days +GTPP.time.weeks=Weeks +GTPP.time.months=Months + + + + + + + + + + + + +//Achievements + +//4/2/19 +achievement.gt.blockmachines.fusioncomputer.tier.09=Fusion Computer Mark IV +achievement.gtplusplus.blockcasings.3.12=Fusion Casing MK III +achievement.gtplusplus.blockcasings.3.13=Advanced Magnetic Containment! +achievement.gtplusplus.blockcasings.3.15=Quantum Containment! +achievement.gt.blockmachines.fusioncomputer.tier.09.desc=[AL] Pickup this item to see the recipe in NEI +achievement.gtplusplus.blockcasings.3.12.desc=[AL] Pickup this item to see the recipe in NEI +achievement.gtplusplus.blockcasings.3.13.desc=[AL] Pickup this item to see the recipe in NEI +achievement.gtplusplus.blockcasings.3.15.desc=[AL] Pickup this item to see the recipe in NEI +achievement.gt.blockmachines.gtplusplus.fusion.single=Alternative Fusion +achievement.gt.blockmachines.gtplusplus.tank.plasma=Plasma Storage +achievement.gt.blockmachines.gtplusplus.fusion.single.desc=[AL] Pickup this item to see the recipe in NEI +achievement.gt.blockmachines.gtplusplus.tank.plasma.desc=[AL] Pickup this item to see the recipe in NEI + + +//5/2/19 +achievement.MU-metaitem.01.32106=Junior Physicist +achievement.MU-metaitem.01.32107=Graduate Physicist +achievement.MU-metaitem.01.32108=Scholarly Physicist +achievement.MU-metaitem.01.32109=Master Physicist +achievement.MU-metaitem.01.32106.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32107.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32108.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32109.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32066=Proton Containment +achievement.MU-metaitem.01.32068=Electron Containment +achievement.MU-metaitem.01.32070=Quark Containment +achievement.MU-metaitem.01.32110=Graviton Containment +achievement.MU-metaitem.01.32066.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32068.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32070.desc=[AL] Pickup this item to see the recipe in NEI +achievement.MU-metaitem.01.32110.desc=[AL] Pickup this item to see the recipe in NEI +achievement.item.personalHealingDevice=Food is for chumps +achievement.item.personalHealingDevice.desc=[AL] You have upgraded to the nano, the future is yours +achievement.item.GTPP.BattPack.06.name=Charge Pack Mk I +achievement.item.GTPP.BattPack.07.name=Charge Pack Mk II +achievement.item.GTPP.BattPack.08.name=Charge Pack Mk III +achievement.item.GTPP.BattPack.09.name=Charge Pack Mk IV +achievement.item.GTPP.BattPack.06.name.desc=[AL] Pickup this item to see the recipe in NEI +achievement.item.GTPP.BattPack.07.name.desc=[AL] Pickup this item to see the recipe in NEI +achievement.item.GTPP.BattPack.08.name.desc=[AL] Pickup this item to see the recipe in NEI +achievement.item.GTPP.BattPack.09.name.desc=[AL] Pickup this item to see the recipe in NEI + + + +//14/2/19 +achievement.gtpp.start=Gregtech++ +achievement.gtpp.start.desc=So, think you've got what it takes? +achievement.hatch.control=This is where you put the Control Core +achievement.hatch.control.desc=A special hatch required by all GT++ Multiblocks. +achievement.hatch.dynamo.buffered=Buffered Dynamo Hatch +achievement.hatch.dynamo.buffered.desc=Don't EVER use these on large turbines. +achievement.multi.abs=Alloy Blast Smelter [ABS] +achievement.multi.abs.desc=Used to create most late game alloys. +achievement.dust.potin=Potin! +achievement.dust.potin.desc=Well, you gotta start somewhere... +achievement.dust.eglin=Eglin Steel! +achievement.dust.eglin.desc=Progress, albeit slow... +achievement.dust.staballoy=Staballoy! +achievement.dust.staballoy.desc=Now we're talking... +achievement.dust.quantum=Quantum! +achievement.dust.quantum.desc=Raw Matter. +achievement.dust.hypogen=Hypogen! +achievement.dust.hypogen.desc=What even is this material? +achievement.block.fishtrap=Free Fish +achievement.block.fishtrap.desc=Better than HarvestCraft. +achievement.block.withercage=Jail +achievement.block.withercage.desc=Trap a Wither/Dragon with this. +achievement.rtg=Radioisotope Thermoelectric Generation! +achievement.rtg.desc=Probably stolen from Russia, use with care. +achievement.dehydrate=Dehydration +achievement.dehydrate.desc=Drink some water. +achievement.semifluid=It's like a fluid, but it's not +achievement.semifluid.desc=Semifluids are confusing. +achievement.earlywasher=Simple Ore Washer +achievement.earlywasher.desc=Runs on ULV only. +achievement.advancedsteam=Alternative Steam options +achievement.advancedsteam.desc=Smart fuel consumption +achievement.pollutionremoval=Pollution, no more! +achievement.pollutionremoval.desc=POLLUTION IS BAD +achievement.hiampxform=High Amp Transformers +achievement.hiampxform.desc=Advanced power transformation +achievement.multi.pss=Power Sub-Station [PSS] +achievement.multi.pss.desc=Grid Power Storage. +achievement.multi.cyclo=Cyclotron +achievement.multi.cyclo.desc=Advanced Science +achievement.multi.sifter=Industrial Sifter +achievement.multi.sifter.desc=Faster than a turtle. +achievement.multi.cokeoven=Industrial Coke Oven [ICO] +achievement.multi.cokeoven.desc=Better than a Pyrolyse +achievement.multi.boiler.thermal=Thermal Boiler +achievement.multi.boiler.thermal.desc=Pahoehoe works too! +achievement.multi.zhuhai=Zhuhai, Fishing Port +achievement.multi.zhuhai.desc=Actually exists +achievement.casing.abs=Slow Progress +achievement.casing.abs.desc=Eventually, you will have your ABS. +achievement.casing.cyclotron.coil=Slower Progress +achievement.casing.cyclotron.coil.desc=Consider why you're even doing this.. +achievement.casing.multiuse=I'm going to make lots of these +achievement.casing.multiuse.desc=Don't start counting. +achievement.casing.containment=What's this for? +achievement.casing.containment.desc=I should probably try find out. +achievement.decay.neptunium238=Neptunium 238 +achievement.decay.neptunium238.desc=Cyclotron Product +achievement.decay.radium226=Radium 226 +achievement.decay.radium226.desc=Cyclotron Product +achievement.decay.molybdenum99=Molybdenum 99 +achievement.decay.molybdenum99.desc=Cyclotron Product +achievement.decay.technetium99m=Technetium 99M +achievement.decay.technetium99m.desc=Cyclotron Product +achievement.decay.technetium99=Technetium 99 +achievement.decay.technetium99.desc=Cyclotron Product + +//24/11/19 +achievement.gt.blockmachines.hatch.turbine.input.tier.00=Turbine Housing +achievement.gt.blockmachines.hatch.turbine.input.tier.00.desc=[AL] Pickup this item to see the recipe in NEI + +//Added 6/12/21 +achievement.gt.blockmachines.gtpp.multimachine.flotationcell=Flotation Cell +achievement.gt.blockmachines.gtpp.multimachine.flotationcell.desc=[AL] Pickup this item to see the recipe in NEI +achievement.gt.blockmachines.gtpp.multimachine.isamill=IsaMill +achievement.gt.blockmachines.gtpp.multimachine.isamill.desc=[AL] Pickup this item to see the recipe in NEI + diff --git a/src/main/resources/assets/gregtech/lang/zh_CN.lang b/src/main/resources/assets/gregtech/lang/zh_CN.lang new file mode 100644 index 0000000000..1731d7c3cb --- /dev/null +++ b/src/main/resources/assets/gregtech/lang/zh_CN.lang @@ -0,0 +1,239 @@ + +//Shit I stole from GTNH~ + +GTPP.EBF.heat=热容 + +GTPP.machines.tier=等级 +GTPP.machines.input=输入 +GTPP.machines.output=输出 + +GTPP.multiblock.pollutionreduced=å‡å°‘污染至 +GTPP.multiblock.pollution=污染 +GTPP.multiblock.energy=能é‡å­˜å‚¨ +GTPP.multiblock.progress=进程 +GTPP.multiblock.efficiency=效率 +GTPP.multiblock.problems=为æ¯æ¡¶ +GTPP.multiblock.mei=最大能é‡è¾“å…¥ +GTPP.multiblock.usage=å¤§æ¦‚èƒ½ç”¨æ¥ +GTPP.multiblock.specialvalue=特殊值 +GTPP.multiblock.duration=æŒç»­æ—¶é—´ + + + +GTPP.CC.machinetier=控制核心等级 +GTPP.CC.discount=EUæŸè€— +GTPP.CC.parallel=最大并行处ç†è¿›ç¨‹ + +//Tooltips for the Charger Packs +GTPP.battpack.tooltip.1=在Baubles的腰带æ å†…使用 +GTPP.battpack.tooltip.2=消耗 +GTPP.battpack.tooltip.3=给穿ç€çš„盔甲充能 +GTPP.battpack.tooltip.4=åŒæ ·ç»™å¿«æ·æ å†…的物å“充能 + +//Tooltips for the Personal Healing Bauble +GTPP.nanohealer.tooltip.1=在Baubles的项链æ å†…使用 +GTPP.nanohealer.tooltip.2=æ¯æ¬¡æ“作消耗1638400EU +GTPP.nanohealer.tooltip.3=å¯ä»¥æ¢å¤è¡€é‡,饥饿和饱和度 +GTPP.nanohealer.tooltip.4=ä¸ä¼šé˜»æ­¢æ­»äº¡ +GTPP.nanohealer.tooltip.5=Shift+å³é”®æ¥åˆ‡æ¢ä¿¡æ¯ +GTPP.nanohealer.hidden=éšè—ä¿¡æ¯? + +//10/4/19 +//Tooltips for the Mob Killing Baubles +GTPP.monsterkiller.tooltip.1=在Baubles的护身符æ å†…使用 +GTPP.monsterkiller.tooltip.2=排泄 +GTPP.monsterkiller.tooltip.3=æ¯å‡»æ€ +GTPP.monsterkiller.tooltip.4=目标类型: + +//17/08/19 +GTPP.container.decaychest.name=è¡°å˜çš„ + + + + + + + + + + + + +//NEI INFORMATION +GTPP.nei.info=ä¿¡æ¯ +GTPP.nei.eutick=Eu/t +GTPP.nei.timetaken=耗时 +GTPP.nei.output=输出 +GTPP.nei.input=输入 +GTPP.nei.result=结果 +GTPP.nei.radioation=è¾å°„等级 + +//Some Generic Words +GTPP.info.eu=EU +GTPP.info.euInfo=EUä¿¡æ¯ +GTPP.info.inputLimit=输入é™åˆ¶ +GTPP.info.currentPower=当å‰åŠŸçŽ‡ +GTPP.info.hidden=éšè— + +//Some Time Words +GTPP.time.ticks=刻 +GTPP.time.seconds=秒 +GTPP.time.minutes=分 +GTPP.time.hours=æ—¶ +GTPP.time.days=æ—¥ +GTPP.time.weeks=周 +GTPP.time.months=月 + + + + + + + + + + + + +//Achievements + +//4/2/19 +achievement.gt.blockmachines.fusioncomputer.tier.09=èšå˜è®¡ç®—机MK IV +achievement.gtplusplus.blockcasings.3.12=èšå˜æ¡†æž¶MK III +achievement.gtplusplus.blockcasings.3.13=进阶ç£åŠ›é制! +achievement.gtplusplus.blockcasings.3.15=é‡å­é制! +achievement.gt.blockmachines.fusioncomputer.tier.09.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.gtplusplus.blockcasings.3.12.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.gtplusplus.blockcasings.3.13.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.gtplusplus.blockcasings.3.15.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.gt.blockmachines.gtplusplus.fusion.single=å¯æŽ§èšå˜ +achievement.gt.blockmachines.gtplusplus.tank.plasma=等离å­å­˜å‚¨ +achievement.gt.blockmachines.gtplusplus.fusion.single.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.gt.blockmachines.gtplusplus.tank.plasma.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ + + +//5/2/19 +achievement.MU-metaitem.01.32106=åˆçº§ç‰©ç†å­¦å®¶ +achievement.MU-metaitem.01.32107=研究生物ç†å­¦å®¶ +achievement.MU-metaitem.01.32108=学术物ç†å­¦å®¶ +achievement.MU-metaitem.01.32109=物ç†å­¦ç¡•å£« +achievement.MU-metaitem.01.32106.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32107.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32108.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32109.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32066=è´¨å­é制 +achievement.MU-metaitem.01.32068=电å­é制 +achievement.MU-metaitem.01.32070=夸克é制 +achievement.MU-metaitem.01.32110=引力é制 +achievement.MU-metaitem.01.32066.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32068.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32070.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.MU-metaitem.01.32110.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.item.personalHealingDevice=食物是为了笨蛋 +achievement.item.personalHealingDevice.desc=[AL]ä½ å·²ç»å‡çº§åˆ°çº³ç±³ï¼Œæœªæ¥å°±æ˜¯ä½ çš„ +achievement.item.GTPP.BattPack.06.name=充电工具包Mk I +achievement.item.GTPP.BattPack.07.name=充电工具包Mk II +achievement.item.GTPP.BattPack.08.name=充电工具包Mk III +achievement.item.GTPP.BattPack.09.name=充电工具包Mk IV +achievement.item.GTPP.BattPack.06.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.item.GTPP.BattPack.07.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.item.GTPP.BattPack.08.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ +achievement.item.GTPP.BattPack.09.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ + + + +//14/2/19 +achievement.gtpp.start=Gregtech++ +achievement.gtpp.start.desc=所以,你认为你已ç»å¾—到了它? +achievement.hatch.control=这是你放置控制核心的地方 +achievement.hatch.control.desc=所有GT++的多方å—都需è¦ç‰¹æ®Šçš„å¡«å……. +achievement.hatch.dynamo.buffered=缓冲åŽçš„å‘电机填充物 +achievement.hatch.dynamo.buffered.desc=ä¸è¦åœ¨å¤§åž‹æ¶¡è½®æœºä¸Šä½¿ç”¨è¿™äº›. +achievement.multi.abs=åˆé‡‘冶炼炉[ABS] +achievement.multi.abs.desc=用于制造大多数åŽæœŸåˆé‡‘. +achievement.dust.potin=ç²—é’é“œåˆé‡‘! +achievement.dust.potin.desc=好å§,你得从æŸä¸ªåœ°æ–¹å¼€å§‹... +achievement.dust.eglin=埃格林钢é“! +achievement.dust.eglin.desc=进展虽然缓慢... +achievement.dust.staballoy=è´«é“€åˆé‡‘! +achievement.dust.staballoy.desc=现在我们正在讨论... +achievement.dust.quantum=é‡å­! +achievement.dust.quantum.desc=原料. +achievement.dust.hypogen=æµ·ç€ç! +achievement.dust.hypogen.desc=这甚至是什么ææ–™? +achievement.block.fishtrap=å…费的鱼 +achievement.block.fishtrap.desc=比潘马斯农场好. +achievement.block.withercage=监狱 +achievement.block.withercage.desc=用此æ•æ‰å‡‹é›¶/末影龙. +achievement.rtg=放射性åŒä½ç´ çƒ­ç”µå‘电! +achievement.rtg.desc=å¯èƒ½ç›—于俄罗斯,å°å¿ƒä½¿ç”¨. +achievement.dehydrate=脱水 +achievement.dehydrate.desc=å–些水. +achievement.semifluid=它åƒæ˜¯æ¶²ä½“,但它ä¸æ˜¯ +achievement.semifluid.desc=åŠæµä½“令人困惑. +achievement.earlywasher=简å•çš„洗矿场 +achievement.earlywasher.desc=åªåœ¨ULV下工作. +achievement.advancedsteam=替代蒸汽选项 +achievement.advancedsteam.desc=智能油耗 +achievement.pollutionremoval=污染,没了! +achievement.pollutionremoval.desc=污染ä¸å¥½ +achievement.hiampxform=高放大å˜åŽ‹å™¨ +achievement.hiampxform.desc=è¿›é˜¶ç”µåŠ›è½¬æ¢ +achievement.multi.pss=能æºç«™[PSS] +achievement.multi.pss.desc=电力网络存储. +achievement.multi.cyclo=回旋加速器 +achievement.multi.cyclo.desc=高级科学 +achievement.multi.sifter=工业筛选机 +achievement.multi.sifter.desc=比乌龟快. +achievement.multi.cokeoven=工业焦炉[ICO] +achievement.multi.cokeoven.desc=比热解炉更好 +achievement.multi.boiler.thermal=地热锅炉 +achievement.multi.boiler.thermal.desc=熔岩也有效! +achievement.multi.zhuhai=ç æµ·,渔场 +achievement.multi.zhuhai.desc=实际存在 +achievement.casing.abs=进展缓慢 +achievement.casing.abs.desc=最终,你将拥有你的åˆé‡‘冶炼炉. +achievement.casing.cyclotron.coil=进展缓慢 +achievement.casing.cyclotron.coil.desc=考虑为什么你甚至这样åš.. +achievement.casing.multiuse=我è¦åšå¾ˆå¤šè¿™äº› +achievement.casing.multiuse.desc=ä¸è¦å¼€å§‹è®¡æ•°. +achievement.casing.containment=这个是干什么的? +achievement.casing.containment.desc=我应该试ç€æ‰¾å‡ºæ¥. +achievement.decay.neptunium238=é•Ž238 +achievement.decay.neptunium238.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ +achievement.decay.radium226=é•­226 +achievement.decay.radium226.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ +achievement.decay.molybdenum99=é’¼99 +achievement.decay.molybdenum99.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ +achievement.decay.technetium99m=é”99M +achievement.decay.technetium99m.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ +achievement.decay.technetium99=é”99 +achievement.decay.technetium99.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ + + + +//24/11/19 +achievement.gt.blockmachines.hatch.turbine.input.tier.00=涡轮框架 +achievement.gt.blockmachines.hatch.turbine.input.tier.00.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ + + + + + + + + + + + + + + + + + + + + + +//This zh_CN.lang is translated by huajijam for GregTech++ (3/1/20) \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png b/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png new file mode 100644 index 0000000000..e29ce83f82 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png b/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png new file mode 100644 index 0000000000..4569cb8af3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta new file mode 100644 index 0000000000..0df7234a79 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png new file mode 100644 index 0000000000..e1d4a0f009 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png new file mode 100644 index 0000000000..cac886f252 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png new file mode 100644 index 0000000000..6de133ad06 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..18e5c3223b --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":12 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png new file mode 100644 index 0000000000..8aeb6c7c5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png new file mode 100644 index 0000000000..a03b2bdd49 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..18e5c3223b --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":12 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png new file mode 100644 index 0000000000..e1d4a0f009 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png new file mode 100644 index 0000000000..ad51b6f35f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png new file mode 100644 index 0000000000..9544681ea6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png new file mode 100644 index 0000000000..161d37faf8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png new file mode 100644 index 0000000000..7d3a6d1e29 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png new file mode 100644 index 0000000000..a8a4b0e1f2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png new file mode 100644 index 0000000000..ad51b6f35f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png new file mode 100644 index 0000000000..2edad5a448 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png new file mode 100644 index 0000000000..2041e4d562 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png new file mode 100644 index 0000000000..6e4e79b4fa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png new file mode 100644 index 0000000000..0a7e9d6e9e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png new file mode 100644 index 0000000000..0032fdd6e5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta new file mode 100644 index 0000000000..676faf4fb4 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 4, 3, 3, 2, 2, 1, 1] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png new file mode 100644 index 0000000000..7985626666 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png new file mode 100644 index 0000000000..f1daedc2c9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png new file mode 100644 index 0000000000..9927fa293e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png new file mode 100644 index 0000000000..aec8883d6a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png new file mode 100644 index 0000000000..6c29b067f3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png new file mode 100644 index 0000000000..c1ef295198 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png new file mode 100644 index 0000000000..455335e5c2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png new file mode 100644 index 0000000000..161d37faf8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png new file mode 100644 index 0000000000..9544681ea6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png new file mode 100644 index 0000000000..161d37faf8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png new file mode 100644 index 0000000000..7d3a6d1e29 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png new file mode 100644 index 0000000000..a8a4b0e1f2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png new file mode 100644 index 0000000000..ad51b6f35f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png new file mode 100644 index 0000000000..2edad5a448 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png new file mode 100644 index 0000000000..2041e4d562 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png new file mode 100644 index 0000000000..ed3f2f1581 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png new file mode 100644 index 0000000000..0a7e9d6e9e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png new file mode 100644 index 0000000000..7985626666 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png new file mode 100644 index 0000000000..f1daedc2c9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png new file mode 100644 index 0000000000..9927fa293e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png new file mode 100644 index 0000000000..aec8883d6a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png new file mode 100644 index 0000000000..6c29b067f3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png new file mode 100644 index 0000000000..c1ef295198 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png new file mode 100644 index 0000000000..455335e5c2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png new file mode 100644 index 0000000000..ad51b6f35f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png new file mode 100644 index 0000000000..9544681ea6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png new file mode 100644 index 0000000000..161d37faf8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png new file mode 100644 index 0000000000..7d3a6d1e29 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png new file mode 100644 index 0000000000..a8a4b0e1f2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png new file mode 100644 index 0000000000..ad51b6f35f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png new file mode 100644 index 0000000000..2edad5a448 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png new file mode 100644 index 0000000000..2041e4d562 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png new file mode 100644 index 0000000000..919d9bb70a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta new file mode 100644 index 0000000000..d2c3416c73 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png new file mode 100644 index 0000000000..0a7e9d6e9e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png new file mode 100644 index 0000000000..7985626666 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png new file mode 100644 index 0000000000..f1daedc2c9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png new file mode 100644 index 0000000000..9927fa293e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png new file mode 100644 index 0000000000..aec8883d6a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png new file mode 100644 index 0000000000..6c29b067f3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png new file mode 100644 index 0000000000..c1ef295198 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png new file mode 100644 index 0000000000..455335e5c2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png new file mode 100644 index 0000000000..3e33d0feec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png new file mode 100644 index 0000000000..9544681ea6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png new file mode 100644 index 0000000000..161d37faf8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png new file mode 100644 index 0000000000..7d3a6d1e29 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png new file mode 100644 index 0000000000..a8a4b0e1f2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png new file mode 100644 index 0000000000..ad51b6f35f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png new file mode 100644 index 0000000000..2edad5a448 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png new file mode 100644 index 0000000000..2041e4d562 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png new file mode 100644 index 0000000000..9cb38f3f8e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png new file mode 100644 index 0000000000..0a7e9d6e9e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png new file mode 100644 index 0000000000..4feeed528c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png new file mode 100644 index 0000000000..055c104f1c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png new file mode 100644 index 0000000000..0bb50256c5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png new file mode 100644 index 0000000000..d229926034 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png new file mode 100644 index 0000000000..1684ec116b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png new file mode 100644 index 0000000000..f9838c8829 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png new file mode 100644 index 0000000000..455335e5c2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png b/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png new file mode 100644 index 0000000000..a669575ce1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png b/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png new file mode 100644 index 0000000000..7ed8d56b0e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png b/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png new file mode 100644 index 0000000000..ccbea96e0c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/PowerSubStation.png b/src/main/resources/assets/gregtech/textures/gui/PowerSubStation.png new file mode 100644 index 0000000000..0463dbedca Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/PowerSubStation.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png new file mode 100644 index 0000000000..f21ebc1026 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png new file mode 100644 index 0000000000..6b086039ba Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png new file mode 100644 index 0000000000..e95be5c31a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png new file mode 100644 index 0000000000..fd3f751671 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png new file mode 100644 index 0000000000..21eedab2f5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/LFTR.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/LFTR.png new file mode 100644 index 0000000000..fd3f751671 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/multimachines/LFTR.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png new file mode 100644 index 0000000000..13b37c999d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png new file mode 100644 index 0000000000..3fd5382926 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png new file mode 100644 index 0000000000..ffd9d4893b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png new file mode 100644 index 0000000000..a08018f561 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png new file mode 100644 index 0000000000..59611725f8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png new file mode 100644 index 0000000000..6b17748ece Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png new file mode 100644 index 0000000000..7cb996d669 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png new file mode 100644 index 0000000000..172506c26c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png new file mode 100644 index 0000000000..f9f1162ce6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png new file mode 100644 index 0000000000..8675564a9b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png new file mode 100644 index 0000000000..9c310b5b09 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png new file mode 100644 index 0000000000..27d4df7081 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png new file mode 100644 index 0000000000..ce3c6377c7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png new file mode 100644 index 0000000000..1c93293744 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png new file mode 100644 index 0000000000..f02365b9ff Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png new file mode 100644 index 0000000000..fad582745d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png new file mode 100644 index 0000000000..64d56b48ea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png new file mode 100644 index 0000000000..a4418db9e1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png new file mode 100644 index 0000000000..9798a597e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png new file mode 100644 index 0000000000..85e42b0cd2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png new file mode 100644 index 0000000000..2f0577d65f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png new file mode 100644 index 0000000000..8b48da35d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png new file mode 100644 index 0000000000..ae6d73b7a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png new file mode 100644 index 0000000000..8a240a574d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png new file mode 100644 index 0000000000..f74931d42a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png new file mode 100644 index 0000000000..3741866149 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png new file mode 100644 index 0000000000..17859801da Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png new file mode 100644 index 0000000000..1918a7fa45 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png new file mode 100644 index 0000000000..7cdf09b174 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png new file mode 100644 index 0000000000..d1282f4248 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png new file mode 100644 index 0000000000..0d8c321826 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png new file mode 100644 index 0000000000..79216e0918 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png new file mode 100644 index 0000000000..f29479bf55 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png new file mode 100644 index 0000000000..a35dccba2b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png new file mode 100644 index 0000000000..859cd70116 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png new file mode 100644 index 0000000000..03c07f2760 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png new file mode 100644 index 0000000000..cbc30cc68e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png new file mode 100644 index 0000000000..cdce151f9a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png new file mode 100644 index 0000000000..f6fa0b94cc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png new file mode 100644 index 0000000000..a7bc0f90f1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png new file mode 100644 index 0000000000..0fe97b84fd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png new file mode 100644 index 0000000000..dddb4764ce Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png new file mode 100644 index 0000000000..d8471aed5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png new file mode 100644 index 0000000000..b63f9c3b35 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png new file mode 100644 index 0000000000..6b7fc73d7a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png new file mode 100644 index 0000000000..c5abe856a0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png new file mode 100644 index 0000000000..fbbe56cb1c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png new file mode 100644 index 0000000000..50d407491e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png new file mode 100644 index 0000000000..499bf464b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png new file mode 100644 index 0000000000..3561f91a07 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png new file mode 100644 index 0000000000..925e5f7eea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png new file mode 100644 index 0000000000..82f557e199 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png new file mode 100644 index 0000000000..55468929e9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png new file mode 100644 index 0000000000..85f543676f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png new file mode 100644 index 0000000000..92bc131a2f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png new file mode 100644 index 0000000000..678c35518b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png new file mode 100644 index 0000000000..c844854d37 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png new file mode 100644 index 0000000000..6fc93f933b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png new file mode 100644 index 0000000000..ebf9b80323 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png new file mode 100644 index 0000000000..b62d361f19 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png new file mode 100644 index 0000000000..2a63953e92 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png new file mode 100644 index 0000000000..e3ab084563 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png new file mode 100644 index 0000000000..896be7f08e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png new file mode 100644 index 0000000000..b8853a770e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png new file mode 100644 index 0000000000..c086bca2bb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png new file mode 100644 index 0000000000..c59ef7b1bb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png new file mode 100644 index 0000000000..4b29fca4c1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png new file mode 100644 index 0000000000..f3bcc922b2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png new file mode 100644 index 0000000000..b1636ee569 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png new file mode 100644 index 0000000000..2af89ec304 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png new file mode 100644 index 0000000000..d31178c3c6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png new file mode 100644 index 0000000000..4666dd5902 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png new file mode 100644 index 0000000000..037d829395 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png new file mode 100644 index 0000000000..edb7970730 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png new file mode 100644 index 0000000000..cd358f9d96 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png new file mode 100644 index 0000000000..6840fd312a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png new file mode 100644 index 0000000000..de8ae5af6f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png new file mode 100644 index 0000000000..8a71537dee Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png new file mode 100644 index 0000000000..2d7a80f45e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png new file mode 100644 index 0000000000..6e5d95061c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png new file mode 100644 index 0000000000..f73c531239 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png new file mode 100644 index 0000000000..f52c654ee5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png new file mode 100644 index 0000000000..eb9dfd5e21 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png new file mode 100644 index 0000000000..5879963ad2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png new file mode 100644 index 0000000000..4eefbcd6e3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png new file mode 100644 index 0000000000..f0d87d27df Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png new file mode 100644 index 0000000000..98480bf685 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png new file mode 100644 index 0000000000..0916369702 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png new file mode 100644 index 0000000000..faca2c6e3d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png new file mode 100644 index 0000000000..c540788917 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png new file mode 100644 index 0000000000..df442ed454 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png new file mode 100644 index 0000000000..54b3afb24e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png new file mode 100644 index 0000000000..a8170f57d6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png new file mode 100644 index 0000000000..fdb0756839 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png new file mode 100644 index 0000000000..d999179b3c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png new file mode 100644 index 0000000000..1580b911f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png new file mode 100644 index 0000000000..54b47c2224 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png new file mode 100644 index 0000000000..04634628ac Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png new file mode 100644 index 0000000000..8cdc9f196f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png new file mode 100644 index 0000000000..09af435c20 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png new file mode 100644 index 0000000000..b09c2128da Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png new file mode 100644 index 0000000000..7f05e61552 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png new file mode 100644 index 0000000000..4a19f4c251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png new file mode 100644 index 0000000000..778916b614 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png new file mode 100644 index 0000000000..3ab90f5b05 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png new file mode 100644 index 0000000000..318ea2af2d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png new file mode 100644 index 0000000000..0c5f99482c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png new file mode 100644 index 0000000000..3dbeb7da6e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png new file mode 100644 index 0000000000..e52d0a01fa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png new file mode 100644 index 0000000000..7890213e56 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png new file mode 100644 index 0000000000..747f647e7e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png new file mode 100644 index 0000000000..b36140bea2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png new file mode 100644 index 0000000000..d0dcfd1e5d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png new file mode 100644 index 0000000000..225d5d1907 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png new file mode 100644 index 0000000000..28d51f02af Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png new file mode 100644 index 0000000000..d10fab88aa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png new file mode 100644 index 0000000000..9374970a7f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png new file mode 100644 index 0000000000..c15a8cdbfa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png new file mode 100644 index 0000000000..520f1bb48c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png new file mode 100644 index 0000000000..eede998107 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png new file mode 100644 index 0000000000..27b69fc23a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png new file mode 100644 index 0000000000..6b0517b879 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png new file mode 100644 index 0000000000..2aea2f961d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png new file mode 100644 index 0000000000..06a7479e5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png new file mode 100644 index 0000000000..fe6d646dd8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png new file mode 100644 index 0000000000..89fa86a4ce Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png new file mode 100644 index 0000000000..fa0da0ce2a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png new file mode 100644 index 0000000000..5665e03aee Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png new file mode 100644 index 0000000000..36e515be25 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png new file mode 100644 index 0000000000..b9a16a484a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png new file mode 100644 index 0000000000..2f162be760 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png new file mode 100644 index 0000000000..c95bf030b4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png new file mode 100644 index 0000000000..cde1376f59 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png new file mode 100644 index 0000000000..9d0db6f7fb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png new file mode 100644 index 0000000000..59611725f8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png new file mode 100644 index 0000000000..06f24ab18b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png new file mode 100644 index 0000000000..d5ce76b80f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png new file mode 100644 index 0000000000..c78a1d5570 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png new file mode 100644 index 0000000000..d34a721d96 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png new file mode 100644 index 0000000000..3ffb9e31e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png new file mode 100644 index 0000000000..20de92b986 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png new file mode 100644 index 0000000000..948953f827 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png new file mode 100644 index 0000000000..8675564a9b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png new file mode 100644 index 0000000000..27d4df7081 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png new file mode 100644 index 0000000000..ce3c6377c7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png new file mode 100644 index 0000000000..1c93293744 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png new file mode 100644 index 0000000000..f02365b9ff Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png new file mode 100644 index 0000000000..fad582745d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png new file mode 100644 index 0000000000..64d56b48ea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png new file mode 100644 index 0000000000..a4418db9e1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png new file mode 100644 index 0000000000..9798a597e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png new file mode 100644 index 0000000000..85e42b0cd2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png new file mode 100644 index 0000000000..2f0577d65f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png new file mode 100644 index 0000000000..8b48da35d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png new file mode 100644 index 0000000000..ae6d73b7a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png new file mode 100644 index 0000000000..8a240a574d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png new file mode 100644 index 0000000000..f74931d42a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png new file mode 100644 index 0000000000..17859801da Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png new file mode 100644 index 0000000000..b546c4eeec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png new file mode 100644 index 0000000000..d1282f4248 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png new file mode 100644 index 0000000000..e60e7b6d18 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png new file mode 100644 index 0000000000..496dd33d5b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png new file mode 100644 index 0000000000..f29479bf55 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png new file mode 100644 index 0000000000..ebaf1512a8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png new file mode 100644 index 0000000000..859cd70116 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png new file mode 100644 index 0000000000..3fad40a7e4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png new file mode 100644 index 0000000000..8529b87f57 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png new file mode 100644 index 0000000000..cdce151f9a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png new file mode 100644 index 0000000000..a7bc0f90f1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png new file mode 100644 index 0000000000..0fe97b84fd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png new file mode 100644 index 0000000000..47ab97c308 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png new file mode 100644 index 0000000000..97d42fe104 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png new file mode 100644 index 0000000000..235bdd740b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png new file mode 100644 index 0000000000..6b7fc73d7a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png new file mode 100644 index 0000000000..fbbe56cb1c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png new file mode 100644 index 0000000000..499bf464b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png new file mode 100644 index 0000000000..925e5f7eea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png new file mode 100644 index 0000000000..9021949091 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png new file mode 100644 index 0000000000..92bc131a2f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png new file mode 100644 index 0000000000..678c35518b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png new file mode 100644 index 0000000000..6fc93f933b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png new file mode 100644 index 0000000000..ebf9b80323 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png new file mode 100644 index 0000000000..b62d361f19 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png new file mode 100644 index 0000000000..e3ab084563 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png new file mode 100644 index 0000000000..b8853a770e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png new file mode 100644 index 0000000000..fdd7cd358a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png new file mode 100644 index 0000000000..4b29fca4c1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png new file mode 100644 index 0000000000..20436f976e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png new file mode 100644 index 0000000000..b1636ee569 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png new file mode 100644 index 0000000000..e8e1fef899 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png new file mode 100644 index 0000000000..d31178c3c6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png new file mode 100644 index 0000000000..4666dd5902 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png new file mode 100644 index 0000000000..edb7970730 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png new file mode 100644 index 0000000000..6840fd312a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png new file mode 100644 index 0000000000..8a71537dee Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png new file mode 100644 index 0000000000..6e5d95061c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png new file mode 100644 index 0000000000..4b5c1998f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png new file mode 100644 index 0000000000..eb9dfd5e21 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png new file mode 100644 index 0000000000..d5a0c95c2e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png new file mode 100644 index 0000000000..14b62252ae Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png new file mode 100644 index 0000000000..98480bf685 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png new file mode 100644 index 0000000000..faca2c6e3d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png new file mode 100644 index 0000000000..df442ed454 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png new file mode 100644 index 0000000000..54b3afb24e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png new file mode 100644 index 0000000000..d999179b3c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png new file mode 100644 index 0000000000..1580b911f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png new file mode 100644 index 0000000000..f18ad52a73 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png new file mode 100644 index 0000000000..0f220d5406 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png new file mode 100644 index 0000000000..244fde8251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png new file mode 100644 index 0000000000..b09c2128da Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png new file mode 100644 index 0000000000..4a19f4c251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png new file mode 100644 index 0000000000..3ab90f5b05 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png new file mode 100644 index 0000000000..0c5f99482c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png new file mode 100644 index 0000000000..e52d0a01fa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png new file mode 100644 index 0000000000..747f647e7e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png new file mode 100644 index 0000000000..d0dcfd1e5d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png new file mode 100644 index 0000000000..5ca5a9b6ed Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png new file mode 100644 index 0000000000..d10fab88aa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png new file mode 100644 index 0000000000..c15a8cdbfa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png new file mode 100644 index 0000000000..eede998107 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png new file mode 100644 index 0000000000..6b0517b879 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png new file mode 100644 index 0000000000..06a7479e5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png new file mode 100644 index 0000000000..89fa86a4ce Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png new file mode 100644 index 0000000000..fa9e379c16 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png new file mode 100644 index 0000000000..36e515be25 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png new file mode 100644 index 0000000000..2f162be760 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png new file mode 100644 index 0000000000..cde1376f59 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png new file mode 100644 index 0000000000..c78a1d5570 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png new file mode 100644 index 0000000000..06f24ab18b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png new file mode 100644 index 0000000000..5e9e05d5b0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png new file mode 100644 index 0000000000..27d4df7081 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png new file mode 100644 index 0000000000..ce3c6377c7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png new file mode 100644 index 0000000000..1c93293744 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png new file mode 100644 index 0000000000..f02365b9ff Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png new file mode 100644 index 0000000000..fad582745d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png new file mode 100644 index 0000000000..64d56b48ea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png new file mode 100644 index 0000000000..a4418db9e1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png new file mode 100644 index 0000000000..9798a597e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png new file mode 100644 index 0000000000..85e42b0cd2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png new file mode 100644 index 0000000000..2f0577d65f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png new file mode 100644 index 0000000000..8b48da35d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png new file mode 100644 index 0000000000..ae6d73b7a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png new file mode 100644 index 0000000000..3741866149 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png new file mode 100644 index 0000000000..1918a7fa45 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png new file mode 100644 index 0000000000..7cdf09b174 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png new file mode 100644 index 0000000000..03c07f2760 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png new file mode 100644 index 0000000000..cbc30cc68e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png new file mode 100644 index 0000000000..f6fa0b94cc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png new file mode 100644 index 0000000000..dddb4764ce Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png new file mode 100644 index 0000000000..d8471aed5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png new file mode 100644 index 0000000000..c5abe856a0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png new file mode 100644 index 0000000000..50d407491e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png new file mode 100644 index 0000000000..3561f91a07 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png new file mode 100644 index 0000000000..82f557e199 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png new file mode 100644 index 0000000000..55468929e9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png new file mode 100644 index 0000000000..c844854d37 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png new file mode 100644 index 0000000000..ebf9b80323 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png new file mode 100644 index 0000000000..2a63953e92 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png new file mode 100644 index 0000000000..896be7f08e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png new file mode 100644 index 0000000000..c086bca2bb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png new file mode 100644 index 0000000000..c59ef7b1bb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png new file mode 100644 index 0000000000..4b29fca4c1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png new file mode 100644 index 0000000000..f3bcc922b2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png new file mode 100644 index 0000000000..2af89ec304 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png new file mode 100644 index 0000000000..037d829395 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png new file mode 100644 index 0000000000..cd358f9d96 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png new file mode 100644 index 0000000000..de8ae5af6f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png new file mode 100644 index 0000000000..2d7a80f45e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png new file mode 100644 index 0000000000..f73c531239 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png new file mode 100644 index 0000000000..f52c654ee5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png new file mode 100644 index 0000000000..5879963ad2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png new file mode 100644 index 0000000000..f0d87d27df Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png new file mode 100644 index 0000000000..0916369702 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png new file mode 100644 index 0000000000..c540788917 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png new file mode 100644 index 0000000000..a8170f57d6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png new file mode 100644 index 0000000000..fdb0756839 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png new file mode 100644 index 0000000000..54b47c2224 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png new file mode 100644 index 0000000000..04634628ac Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png new file mode 100644 index 0000000000..06f24ab18b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png new file mode 100644 index 0000000000..d5ce76b80f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png new file mode 100644 index 0000000000..4523be43b9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png new file mode 100644 index 0000000000..d34a721d96 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png new file mode 100644 index 0000000000..3ffb9e31e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png new file mode 100644 index 0000000000..20de92b986 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png new file mode 100644 index 0000000000..948953f827 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png new file mode 100644 index 0000000000..8675564a9b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png new file mode 100644 index 0000000000..27d4df7081 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png new file mode 100644 index 0000000000..ce3c6377c7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png new file mode 100644 index 0000000000..1c93293744 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png new file mode 100644 index 0000000000..f02365b9ff Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png new file mode 100644 index 0000000000..fad582745d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png new file mode 100644 index 0000000000..64d56b48ea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png new file mode 100644 index 0000000000..a4418db9e1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png new file mode 100644 index 0000000000..9798a597e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png new file mode 100644 index 0000000000..85e42b0cd2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png new file mode 100644 index 0000000000..2f0577d65f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png new file mode 100644 index 0000000000..8b48da35d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png new file mode 100644 index 0000000000..ae6d73b7a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png new file mode 100644 index 0000000000..7f49597676 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png new file mode 100644 index 0000000000..f74931d42a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png new file mode 100644 index 0000000000..819f43c6f6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png new file mode 100644 index 0000000000..e2edcad772 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png new file mode 100644 index 0000000000..75b134d3ef Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png new file mode 100644 index 0000000000..9ee7575a02 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png new file mode 100644 index 0000000000..d1282f4248 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png new file mode 100644 index 0000000000..e60e7b6d18 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png new file mode 100644 index 0000000000..496dd33d5b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png new file mode 100644 index 0000000000..f29479bf55 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png new file mode 100644 index 0000000000..9758a35399 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png new file mode 100644 index 0000000000..859cd70116 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png new file mode 100644 index 0000000000..9ab216d5d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png new file mode 100644 index 0000000000..4d00229736 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png new file mode 100644 index 0000000000..cdce151f9a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png new file mode 100644 index 0000000000..5c94fdce69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png new file mode 100644 index 0000000000..a7bc0f90f1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png new file mode 100644 index 0000000000..0fe97b84fd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png new file mode 100644 index 0000000000..47ab97c308 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png new file mode 100644 index 0000000000..97d42fe104 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png new file mode 100644 index 0000000000..13a798cdc3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png new file mode 100644 index 0000000000..6b7fc73d7a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png new file mode 100644 index 0000000000..9608d2d182 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png new file mode 100644 index 0000000000..fbbe56cb1c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png new file mode 100644 index 0000000000..10d9d54e65 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png new file mode 100644 index 0000000000..499bf464b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png new file mode 100644 index 0000000000..df8b7b9a75 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png new file mode 100644 index 0000000000..925e5f7eea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png new file mode 100644 index 0000000000..d5845995cc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png new file mode 100644 index 0000000000..e1fe9bed43 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png new file mode 100644 index 0000000000..9021949091 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png new file mode 100644 index 0000000000..92bc131a2f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png new file mode 100644 index 0000000000..678c35518b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png new file mode 100644 index 0000000000..6fc93f933b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png new file mode 100644 index 0000000000..ebf9b80323 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png new file mode 100644 index 0000000000..b62d361f19 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png new file mode 100644 index 0000000000..e3ab084563 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png new file mode 100644 index 0000000000..b8853a770e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png new file mode 100644 index 0000000000..e0a49831b5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png new file mode 100644 index 0000000000..4b29fca4c1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png new file mode 100644 index 0000000000..20436f976e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png new file mode 100644 index 0000000000..b1636ee569 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png new file mode 100644 index 0000000000..78caf2a7ee Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png new file mode 100644 index 0000000000..d31178c3c6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png new file mode 100644 index 0000000000..4666dd5902 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png new file mode 100644 index 0000000000..b3441fbf19 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png new file mode 100644 index 0000000000..edb7970730 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png new file mode 100644 index 0000000000..4253929300 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png new file mode 100644 index 0000000000..6840fd312a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png new file mode 100644 index 0000000000..8a71537dee Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png new file mode 100644 index 0000000000..6e5d95061c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png new file mode 100644 index 0000000000..574c36552c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png new file mode 100644 index 0000000000..eb9dfd5e21 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png new file mode 100644 index 0000000000..d5a0c95c2e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png new file mode 100644 index 0000000000..14b62252ae Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png new file mode 100644 index 0000000000..98480bf685 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png new file mode 100644 index 0000000000..faca2c6e3d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png new file mode 100644 index 0000000000..df442ed454 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png new file mode 100644 index 0000000000..54b3afb24e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png new file mode 100644 index 0000000000..d999179b3c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png new file mode 100644 index 0000000000..1580b911f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png new file mode 100644 index 0000000000..99a3fb2e2b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png new file mode 100644 index 0000000000..3de14933fa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png new file mode 100644 index 0000000000..0f220d5406 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png new file mode 100644 index 0000000000..244fde8251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png new file mode 100644 index 0000000000..b09c2128da Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png new file mode 100644 index 0000000000..4a19f4c251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png new file mode 100644 index 0000000000..3ab90f5b05 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png new file mode 100644 index 0000000000..0c5f99482c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png new file mode 100644 index 0000000000..e52d0a01fa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png new file mode 100644 index 0000000000..747f647e7e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png new file mode 100644 index 0000000000..d0dcfd1e5d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png new file mode 100644 index 0000000000..5ca5a9b6ed Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png new file mode 100644 index 0000000000..d10fab88aa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png new file mode 100644 index 0000000000..c15a8cdbfa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png new file mode 100644 index 0000000000..eede998107 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png new file mode 100644 index 0000000000..6b0517b879 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png new file mode 100644 index 0000000000..06a7479e5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png new file mode 100644 index 0000000000..89fa86a4ce Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png new file mode 100644 index 0000000000..fa9e379c16 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png new file mode 100644 index 0000000000..36e515be25 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png new file mode 100644 index 0000000000..2f162be760 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png new file mode 100644 index 0000000000..cde1376f59 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png new file mode 100644 index 0000000000..4523be43b9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png new file mode 100644 index 0000000000..06f24ab18b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png new file mode 100644 index 0000000000..5e9e05d5b0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png new file mode 100644 index 0000000000..4523be43b9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png new file mode 100644 index 0000000000..d34a721d96 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png new file mode 100644 index 0000000000..3ffb9e31e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png new file mode 100644 index 0000000000..20de92b986 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png new file mode 100644 index 0000000000..948953f827 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png new file mode 100644 index 0000000000..8675564a9b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png new file mode 100644 index 0000000000..27d4df7081 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png new file mode 100644 index 0000000000..ce3c6377c7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png new file mode 100644 index 0000000000..1c93293744 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png new file mode 100644 index 0000000000..f02365b9ff Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png new file mode 100644 index 0000000000..fad582745d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png new file mode 100644 index 0000000000..64d56b48ea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png new file mode 100644 index 0000000000..a4418db9e1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png new file mode 100644 index 0000000000..9798a597e0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png new file mode 100644 index 0000000000..85e42b0cd2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png new file mode 100644 index 0000000000..2f0577d65f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png new file mode 100644 index 0000000000..8b48da35d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png new file mode 100644 index 0000000000..ae6d73b7a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png new file mode 100644 index 0000000000..6f893e05b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png new file mode 100644 index 0000000000..f74931d42a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png new file mode 100644 index 0000000000..12a99bfde1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png new file mode 100644 index 0000000000..2a7b9e6d6c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png new file mode 100644 index 0000000000..d1282f4248 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png new file mode 100644 index 0000000000..e60e7b6d18 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png new file mode 100644 index 0000000000..8918e54459 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png new file mode 100644 index 0000000000..496dd33d5b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png new file mode 100644 index 0000000000..f29479bf55 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png new file mode 100644 index 0000000000..ebaf1512a8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png new file mode 100644 index 0000000000..859cd70116 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png new file mode 100644 index 0000000000..3fad40a7e4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png new file mode 100644 index 0000000000..8529b87f57 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png new file mode 100644 index 0000000000..cdce151f9a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png new file mode 100644 index 0000000000..a7bc0f90f1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png new file mode 100644 index 0000000000..0fe97b84fd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png new file mode 100644 index 0000000000..47ab97c308 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png new file mode 100644 index 0000000000..97d42fe104 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png new file mode 100644 index 0000000000..721d19529e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png new file mode 100644 index 0000000000..6b7fc73d7a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png new file mode 100644 index 0000000000..fbbe56cb1c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png new file mode 100644 index 0000000000..499bf464b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png new file mode 100644 index 0000000000..925e5f7eea Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png new file mode 100644 index 0000000000..38a7fc65c9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png new file mode 100644 index 0000000000..92bc131a2f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png new file mode 100644 index 0000000000..678c35518b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png new file mode 100644 index 0000000000..6fc93f933b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png new file mode 100644 index 0000000000..ebf9b80323 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png new file mode 100644 index 0000000000..b62d361f19 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png new file mode 100644 index 0000000000..e3ab084563 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png new file mode 100644 index 0000000000..b8853a770e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png new file mode 100644 index 0000000000..fdd7cd358a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png new file mode 100644 index 0000000000..4b29fca4c1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png new file mode 100644 index 0000000000..23b3ac8f76 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png new file mode 100644 index 0000000000..b1636ee569 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png new file mode 100644 index 0000000000..e8e1fef899 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png new file mode 100644 index 0000000000..d31178c3c6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png new file mode 100644 index 0000000000..4666dd5902 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png new file mode 100644 index 0000000000..edb7970730 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png new file mode 100644 index 0000000000..6840fd312a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png new file mode 100644 index 0000000000..8a71537dee Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png new file mode 100644 index 0000000000..6e5d95061c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png new file mode 100644 index 0000000000..4b5c1998f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png new file mode 100644 index 0000000000..eb9dfd5e21 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png new file mode 100644 index 0000000000..d5a0c95c2e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png new file mode 100644 index 0000000000..751111417a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png new file mode 100644 index 0000000000..98480bf685 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png new file mode 100644 index 0000000000..faca2c6e3d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png new file mode 100644 index 0000000000..df442ed454 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png new file mode 100644 index 0000000000..54b3afb24e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png new file mode 100644 index 0000000000..d999179b3c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png new file mode 100644 index 0000000000..1580b911f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png new file mode 100644 index 0000000000..f18ad52a73 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png new file mode 100644 index 0000000000..0f220d5406 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png new file mode 100644 index 0000000000..244fde8251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png new file mode 100644 index 0000000000..b09c2128da Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png new file mode 100644 index 0000000000..4a19f4c251 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png new file mode 100644 index 0000000000..3ab90f5b05 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png new file mode 100644 index 0000000000..0c5f99482c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png new file mode 100644 index 0000000000..e52d0a01fa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png new file mode 100644 index 0000000000..747f647e7e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png new file mode 100644 index 0000000000..d0dcfd1e5d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png new file mode 100644 index 0000000000..29bd613285 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png new file mode 100644 index 0000000000..d10fab88aa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png new file mode 100644 index 0000000000..c15a8cdbfa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png new file mode 100644 index 0000000000..eede998107 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png new file mode 100644 index 0000000000..6b0517b879 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png new file mode 100644 index 0000000000..06a7479e5f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png new file mode 100644 index 0000000000..89fa86a4ce Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png new file mode 100644 index 0000000000..242dbd14fc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png new file mode 100644 index 0000000000..36e515be25 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png new file mode 100644 index 0000000000..2f162be760 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png new file mode 100644 index 0000000000..cde1376f59 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png new file mode 100644 index 0000000000..4523be43b9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png new file mode 100644 index 0000000000..06f24ab18b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png new file mode 100644 index 0000000000..5e9e05d5b0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png differ diff --git a/src/main/resources/assets/ic2/lang/de_DE.lang b/src/main/resources/assets/ic2/lang/de_DE.lang new file mode 100644 index 0000000000..2d562c59e7 --- /dev/null +++ b/src/main/resources/assets/ic2/lang/de_DE.lang @@ -0,0 +1,29 @@ +ic2.itemEnergeticRotor=Kinetischer Getriebe-Rotor (Energische Legierung) +ic2.itemTungstenSteelRotor=Kinetischer Getriebe-Rotor (Wolframstahl) +ic2.itemVibrantRotor=Kinetischer Getriebe-Rotor (Schwingende Legierung) +ic2.itemIridiumRotor=Kinetischer Getriebe-Rotor (Iridium) + +ic2.itemMagnaliumRotor=Kinetischer Getriebe-Rotor (Magnalium) +ic2.itemUltimetRotor=Kinetischer Getriebe-Rotor (Ultimet) + +ic2.blockGenerator=RTG ENERGIE +ic2.blockGenerator.0=RTG ENERGIE +ic2.blockGenerator.1=KINETISCHE ENERGIE +ic2.blockGenerator.2=FEHLER ENERGIE +ic2.blockGenerator.3=MEHR FEHLER ENERGIE + +ic2.blockRTGenerator2=RTG ENERGIE 2 +ic2.blockKineticGenerator2=KINETISCHE ENERGIE 2 + +ic2.HydrofluoricAcid=Zelle mit industriell verstärkter Flusssäure +ic2.SulfurDioxide=Zelle mit Schwefeldioxid +ic2.SulfuricApatite=Zelle mit schwefligem Apatit +ic2.SulfurousAcid=Zelle mit Schwefelsäure + +ic2.HydrogenChloride=Zelle mit industriell verstärkter Salzsäure +ic2.LithiumHydroxide=Zelle mit Lithiumhydroxid +ic2.SulfuricLithium=Zelle mit schwefeligem Lithium + +ic2.UraniumHexaFluoride=Zelle mit Uran-Hexafluorid +ic2.ThoriumTetraFluoride=Zelle mit Thorium-Tetrafluorid +ic2.UraniumTetraFluoride=Zelle mit Uran-Tetrafluorid diff --git a/src/main/resources/assets/ic2/lang/en_US.lang b/src/main/resources/assets/ic2/lang/en_US.lang new file mode 100644 index 0000000000..9b44f2d14e --- /dev/null +++ b/src/main/resources/assets/ic2/lang/en_US.lang @@ -0,0 +1,35 @@ +ic2.itemEnergeticRotor=Kinetic Gearbox Rotor (Energetic Alloy) +ic2.itemTungstenSteelRotor=Kinetic Gearbox Rotor (TungstenSteel) +ic2.itemVibrantRotor=Kinetic Gearbox Rotor (Vibrant Alloy) +ic2.itemIridiumRotor=Kinetic Gearbox Rotor (Iridium) + +ic2.itemMagnaliumRotor=Kinetic Gearbox Rotor (Magnalium) +ic2.itemUltimetRotor=Kinetic Gearbox Rotor (Ultimet) + +ic2.blockGenerator=RTG POWARZ +ic2.blockGenerator.0=RTG POWA +ic2.blockGenerator.1=KINETIC POWA +ic2.blockGenerator.2=ERROR POWA +ic2.blockGenerator.3=MOAR ERROR POWA + +ic2.blockRTGenerator2=RTG POWARZ 2 +ic2.blockKineticGenerator2=KINETIC POWA 2 + +ic2.HydrofluoricAcid=Industrial Strength Hydrofluoric Acid Cell +ic2.SulfurDioxide=Sulfur Dioxide Cell +ic2.SulfuricApatite=Sulfuric Apatite Cell +ic2.SulfurousAcid=Sulfurous Acid Cell + +ic2.HydrogenChloride=Industrial Strength Hydrogen Chloride Cell +ic2.LithiumHydroxide=Lithium Hydroxide Cell +ic2.SulfuricLithium=Sulfuric Lithium Cell + +ic2.UraniumHexaFluoride=Uranium Hexafluoride Cell +ic2.ThoriumTetraFluoride=Thorium Tetrafluoride Cell +ic2.UraniumTetraFluoride=Uranium Tetrafluoride Cell + + +ic2.itemArmorHazmatHelmetEx=Advanced Hazmat Helmet +ic2.itemArmorHazmatChestplateEx=Advanced Hazmat Suit +ic2.itemArmorHazmatLeggingsEx=Advanced Hazmat Leggings +ic2.itemArmorRubBootsEx=Advanced Hazmat Boots \ No newline at end of file diff --git a/src/main/resources/assets/ic2/lang/zh_CN.lang b/src/main/resources/assets/ic2/lang/zh_CN.lang new file mode 100644 index 0000000000..0811dbcdb0 --- /dev/null +++ b/src/main/resources/assets/ic2/lang/zh_CN.lang @@ -0,0 +1,29 @@ +ic2.itemEnergeticRotor=动力齿轮转å­(充能åˆé‡‘) +ic2.itemTungstenSteelRotor=动力齿轮转å­(钨钢) +ic2.itemVibrantRotor=动力齿轮转å­(脉冲åˆé‡‘) +ic2.itemIridiumRotor=动力齿轮转å­(铱) + +ic2.itemMagnaliumRotor=动力齿轮转å­(é•é“åˆé‡‘) +ic2.itemUltimetRotor=动力齿轮转å­(哈æ°åˆé‡‘) + +ic2.blockGenerator=RTG POWARZ +ic2.blockGenerator.0=RTG POWA +ic2.blockGenerator.1=KINETIC POWA +ic2.blockGenerator.2=ERROR POWA +ic2.blockGenerator.3=MOAR ERROR POWA + +ic2.blockRTGenerator2=RTG POWARZ 2 +ic2.blockKineticGenerator2=KINETIC POWA 2 + +ic2.HydrofluoricAcid=工业强化氢氟酸å•å…ƒ +ic2.SulfurDioxide=二氧化硫å•å…ƒ +ic2.SulfuricApatite=硫酸磷ç°çŸ³å•å…ƒ +ic2.SulfurousAcid=亚硫酸å•å…ƒ + +ic2.HydrogenChloride=工业强化氯化氢å•å…ƒ +ic2.LithiumHydroxide=氢氧化锂å•å…ƒ +ic2.SulfuricLithium=硫酸锂å•å…ƒ + +ic2.UraniumHexaFluoride=六氟化铀å•å…ƒ +ic2.ThoriumTetraFluoride=四氟化é’å•å…ƒ +ic2.UraniumTetraFluoride=四氟化铀å•å…ƒ \ No newline at end of file diff --git a/src/main/resources/assets/ic2/textures/armor/hazmatEx_1.png b/src/main/resources/assets/ic2/textures/armor/hazmatEx_1.png new file mode 100644 index 0000000000..2275007fbe Binary files /dev/null and b/src/main/resources/assets/ic2/textures/armor/hazmatEx_1.png differ diff --git a/src/main/resources/assets/ic2/textures/armor/hazmatEx_2.png b/src/main/resources/assets/ic2/textures/armor/hazmatEx_2.png new file mode 100644 index 0000000000..758adafdf2 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/armor/hazmatEx_2.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png b/src/main/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png new file mode 100644 index 0000000000..ed907728d4 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/HydrogenChloride.png b/src/main/resources/assets/ic2/textures/items/cell/HydrogenChloride.png new file mode 100644 index 0000000000..135d293637 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/HydrogenChloride.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png b/src/main/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png new file mode 100644 index 0000000000..7fefe04c5e Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/SulfurDioxide.png b/src/main/resources/assets/ic2/textures/items/cell/SulfurDioxide.png new file mode 100644 index 0000000000..f8bf8329b5 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/SulfurDioxide.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/SulfuricApatite.png b/src/main/resources/assets/ic2/textures/items/cell/SulfuricApatite.png new file mode 100644 index 0000000000..5c62c379ab Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/SulfuricApatite.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/SulfuricLithium.png b/src/main/resources/assets/ic2/textures/items/cell/SulfuricLithium.png new file mode 100644 index 0000000000..b8d02729ba Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/SulfuricLithium.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/SulfurousAcid.png b/src/main/resources/assets/ic2/textures/items/cell/SulfurousAcid.png new file mode 100644 index 0000000000..53f8604e13 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/SulfurousAcid.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png b/src/main/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png new file mode 100644 index 0000000000..413179e396 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png b/src/main/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png new file mode 100644 index 0000000000..2fe0c893fe Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png differ diff --git a/src/main/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png b/src/main/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png new file mode 100644 index 0000000000..ba2d239308 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png differ diff --git a/src/main/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png b/src/main/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png new file mode 100644 index 0000000000..742d1d7035 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png differ diff --git a/src/main/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png b/src/main/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png new file mode 100644 index 0000000000..5340375595 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png differ diff --git a/src/main/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png b/src/main/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png new file mode 100644 index 0000000000..80cdca9b23 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png differ diff --git a/src/main/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png b/src/main/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png new file mode 100644 index 0000000000..901a8fbc35 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png b/src/main/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png new file mode 100644 index 0000000000..9fef2ec178 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png b/src/main/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png new file mode 100644 index 0000000000..1f1770ff1c Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png b/src/main/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png new file mode 100644 index 0000000000..d1e2970117 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png b/src/main/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png new file mode 100644 index 0000000000..aec47b7c6b Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png b/src/main/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png new file mode 100644 index 0000000000..03704d5d12 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png b/src/main/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png new file mode 100644 index 0000000000..34949af9a6 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png b/src/main/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png new file mode 100644 index 0000000000..045470a2b1 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png b/src/main/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png new file mode 100644 index 0000000000..b967b4f1dd Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png b/src/main/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png new file mode 100644 index 0000000000..a638c0389f Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png b/src/main/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png new file mode 100644 index 0000000000..7dd2e69f7e Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png b/src/main/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png new file mode 100644 index 0000000000..b6c3f36716 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png differ diff --git a/src/main/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png b/src/main/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png new file mode 100644 index 0000000000..321de66ff9 Binary files /dev/null and b/src/main/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/death.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/death.ogg new file mode 100644 index 0000000000..412fe5c591 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/death.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/hit1.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/hit1.ogg new file mode 100644 index 0000000000..91ec4976b9 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/hit1.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/hit2.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/hit2.ogg new file mode 100644 index 0000000000..0bdc21aa52 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/hit2.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/hit3.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/hit3.ogg new file mode 100644 index 0000000000..b7d4429989 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/hit3.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/hit4.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/hit4.ogg new file mode 100644 index 0000000000..c810364be4 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/hit4.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/idle1.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/idle1.ogg new file mode 100644 index 0000000000..4596d850c1 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/idle1.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/idle2.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/idle2.ogg new file mode 100644 index 0000000000..9d60d58843 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/idle2.ogg differ diff --git a/src/main/resources/assets/minecraft/sounds/mob/witch/idle3.ogg b/src/main/resources/assets/minecraft/sounds/mob/witch/idle3.ogg new file mode 100644 index 0000000000..b5134e84d9 Binary files /dev/null and b/src/main/resources/assets/minecraft/sounds/mob/witch/idle3.ogg differ diff --git a/src/main/resources/assets/miscutils/lang/de_DE.lang b/src/main/resources/assets/miscutils/lang/de_DE.lang new file mode 100644 index 0000000000..6dd49228a2 --- /dev/null +++ b/src/main/resources/assets/miscutils/lang/de_DE.lang @@ -0,0 +1,1908 @@ +//GT++ Items + + +//Creative Tabs +itemGroup.MiscUtilBlockTab=[GT++] Blöcke +itemGroup.MiscUtilMiscTab=[GT++] Gegenstände +itemGroup.MiscUtilCombatTab=[GT++] Kampf +itemGroup.MiscUtilToolsTab=[GT++] Werkzeuge +itemGroup.MiscUtilMachineTab=[GT++] Maschinen +itemGroup.MiscUtilOtherTab=[GT++] Gegenstände II +itemGroup.MiscUtilBOP=[GT++] Biomes O'Plenty Gegenstände + +//Debug +item.AAA_Broken.name=[Nicht implementierter Gegenstand] Bitte melde dieses Rezept auf Github. +item.itemBedLocator_Base.name=Bett-Lokalisierer [NBT Test] +item.itemBaseItemWithCharge.name=Aufladbarer Basisgegenstand +item.miscutils_itemDebugShapeSpawner.name=[Debug] Formen + +//Fluids +tile.fluidSludge.name=Stehendes Abwasser +tile.fluidSludge.0.name=Stehendes Abwasser + +//Death Messages +death.attack.plasmabolt=%s wurde durch brennend heißes Plasma getötet. +death.attack.plasmabolt.player=%1$s wurde von %2$s mit Hilfe von Plasma getötet. + +//Alternative Materials +item.itemPlateBatteryAlloy.name=Platte aus Batterie-Legierung +item.itemIngotBatteryAlloy.name=Barren aus Batterie-Legierung +item.itemStickyRubber.name=Gumlet aus klebrigem Gummi + +//Unused Fuel rods +item.itemFuelRod_Empty.name=Leeres Brennelement +item.itemFuelRod_Thorium.name=Thorium-Brennelement +item.itemFuelRod_Uranium.name=Uran-Brennelement +item.itemFuelRod_Plutonium.name=Plutonium-Brennelement + +//Entities +entity.constructStaballoy.name=Stablegierungskonstrukt +entity.sickBlaze.name=Infizierter Fanatiker + +//Tile Entities +tile.blockToolBuilder.name=GregTech Werkzeug-Konstrukteur + +//Tools +item.itemBufferCore.name=Pufferkern +item.itemStaballoyPickaxe.name=Tunnelgräber +item.itemStaballoyAxe.name=Baumfäller +item.itemSandstoneHammer.name=Bruchsteinbrecher + +//Thermal Foundation Stuff +item.MiscUtils.bucket.bucketPyrotheum.name=Eimer mit flammendem Pyrotheum +item.MiscUtils.bucket.bucketCryotheum.name=Eimer mit gelenem Kryotheum +item.MiscUtils.bucket.bucketEnder.name=Eimer mit resonantem Ender +item.MiscUtils.material.dustPyrotheum.name=Pyrotheumstaub +item.MiscUtils.material.dustCryotheum.name=Kryotheumstaub +item.MiscUtils.material.rodBlizz.name=Blizzrute +item.MiscUtils.material.dustBlizz.name=Blizzstaub +tile.MiscUtils.fluid.pyrotheum.name=Flammendes Pyrotheum +tile.MiscUtils.fluid.cryotheum.name=Gelenes Kryotheum +tile.miscutils.fluid.ender.name=Resonantes Ender + +//Forestry Stuff +item.frameAccelerated.name=Beschleunigter Rahmen +item.frameVoid.name=Nichts-Rahmen +item.frameMutagenic.name=Erbgutverändernder Rahmen +item.frameBusy.name=Arbeitender Rahmen +item.frameChocolate.name=Schokoladiger Rahmen +item.frameRestraint.name=Zurückhaltender Rahmen +item.frameSoul.name=Seelen-Rahmen +item.frameHealing.name=Heilender Rahmen +item.frameNova.name=Nova-Rahmen +item.frameArborists.name=Försters Rahmen +item.frameDecaying.name=Zersetzender Rahmen +item.frameSlowing.name=Lähmender Rahmen +item.frameStabilizing.name=Stabilisierender Rahmen +item.frameUseless.name=Nutzloser Ramen + +//IC2 stuff +item.itemEnergeticRotorBlade.name=Rotorblatt aus energischer Legierung +item.itemTungstenSteelRotorBlade.name=Rotorblatt aus Wolframstahl +item.itemVibrantRotorBlade.name=Rotorblatt aus schwingender Legierung +item.itemIridiumRotorBlade.name=Rotorblatt aus Iridium +item.itemEnergeticShaft.name=Welle aus energischer Legierung +item.itemTungstenSteelShaft.name=Welle aus Wolframstahl +item.itemVibrantShaft.name=Welle aus schwingender Legierung +item.itemIridiumShaft.name=Welle aus Iridium +item.itemMagnaliumRotorBlade.name=Rotorblatt aus Magnalium +item.itemUltimetRotorBlade.name=Rotorblatt aus Ultimet +item.itemMagnaliumShaft.name=Welle aus Magnalium +item.itemUltimetShaft.name=Welle aus Ultimet + + +//Misc Items +item.itemPLACEHOLDER_Circuit.name=Quark-Manipulator (UV) +item.itemPlateEnrichedSoularium.name=Platte aus angereichertem Soularium +item.itemHeliumBlob.name=Geheimnisvolle Wasserstoffsubstanz +item.itemAlkalusDisk.name=Alkalus-Schallplatte +item.itemHotIngotRaisinBread.name=Heißer Laib Rosinenbrot +item.itemIngotRaisinBread.name=§5ImQ009's §fRosinenbrot + +//Misc Blocks +tile.blockCompressedObsidian.0.name=Komprimierter Obsidian (9) +tile.blockCompressedObsidian.1.name=Doppelt-Komprimierter Obsidian (81) +tile.blockCompressedObsidian.2.name=Dreifach-Komprimierter Obsidian (729) +tile.blockCompressedObsidian.3.name=Vierfach-Komprimierter Obsidian (6561) +tile.blockCompressedObsidian.4.name=Fünffach-Komprimierter Obsidian (59049) +tile.blockCompressedObsidian.5.name=Umgekehrter Obsidian +tile.blockNet.name=Netz + + + +//Meta Tool +MU-metaitem.01.0.name=MU-metaitem.01.0.name + +//Cells +item.SulfurDioxide.name=Hochwertige Schwefeldioxidzelle +item.Fertiliser.name=Düngemittelzelle +item.UN32Fertiliser.name=UN-32 Düngemittelzelle +item.UN18Fertiliser.name=UN-18 Düngemittelzelle +item.RaisinJuice.name=Rosinensaftzelle + +//Resources +item.itemStickyRubber.name=Gumlet aus klebrigem Gummi +item.itemCoalCoke.name=Verkokste Kohle +item.itemHydrogenBlob.name=Mysteriöses Wasserstofftröpfchen +item.itemHeliumBlob.name=Mysteriöse Wasserstoffsubstanz + +//Normal Items +item.itemAlkalusDisk.name=Alkalus-Schallplatte +item.itemSimpleFiremaker.name=Einfache Zündhilfe +item.itemFiber.name=Pflanzenfaser +item.itemRope.name=Tau +item.BackpackRed.name=Roter Rucksack +item.BackpackGreen.name=Grüner Rucksack +item.BackpackBlue.name=Blauer Rucksack +item.BackpackYellow.name=Gelber Rucksack +item.BackpackPurple.name=Lila Rucksack +item.BackpackCyan.name=Cyaner Rucksack +item.BackpackMaroon.name=Kastanienbrauner Rucksack +item.BackpackOlive.name=Olivengrüner Rucksack +item.BackpackDarkGreen.name=Dunkelgrüner Rucksack +item.BackpackDarkPurple.name=Dunkellila Rucksack +item.BackpackTeal.name=Blaugrüner Rucksack +item.BackpackNavy.name=Navy Rucksack +item.BackpackSilver.name=Silberner Rucksack +item.BackpackGray.name=Grauer Rucksack +item.BackpackBlack.name=Schwarzer Rucksack +item.BackpackWhite.name=Weißer Rucksack +item.itemBlueprint.name=Blaupause [Ich bin nutzlos] +item.itemGemShards.name=Diamantscherbe +item.itemHalfCompleteCasings.name=Halb-fertige Hülle I +item.itemSulfuricPotion.name=Werfbare Phiole mit Schwefelsäure +item.itemHydrofluoricPotion.name=Werfbare Phiole mit Flusssäure +item.itemIngotRaisinBread.name=Eine Portion Rosinenbrot +item.itemHotIngotRaisinBread.name=Eine Portion heißes Rosinenbrot +item.itemFoodRaisinToast.name=Eine Portion Rosinentoast +item.itemHotFoodRaisinToast.name=Eine Portion heißer Rosinentoast +item.itemFoodCurriedSausages.name=Eine Portion Currywurst +item.itemHotFoodCurriedSausages.name=Eine Portion heiße Currywurst + + + +//Material Items +item.itemDustGadolinium.name=Gadolinium-Staub +item.itemDustSmallGadolinium.name=Kleines Häufchen Gadolinium-Staub +item.itemDustTinyGadolinium.name=Winziges Häufchen Gadolinium-Staub +item.itemDustYtterbium.name=Ytterbium-Staub +item.itemDustSmallYtterbium.name=Kleines Häufchen Ytterbium-Staub +item.itemDustTinyYtterbium.name=Winziges Häufchen Ytterbium-Staub +item.itemDustSamarium.name=Samarium-Staub +item.itemDustSmallSamarium.name=Kleines Häufchen Samarium-Staub +item.itemDustTinySamarium.name=Winziges Häufchen Samarium-Staub +item.itemDustLanthanum.name=Lanthan-Staub +item.itemDustSmallLanthanum.name=Kleines Häufchen Lanthan-Staub +item.itemDustTinyLanthanum.name=Winziges Häufchen Lanthan-Staub +item.itemCellNeon.name=Neon-Zelle +item.itemCellGermanium.name=Germanium-Zelle +item.itemCellSelenium.name=Selen-Zelle +item.itemCellBromine.name=Brom-Zelle +item.itemCellKrypton.name=Krypton-Zelle +item.itemCellZirconium.name=Zirkonium-Zelle +item.itemCellTechnetium.name=Technetium-Zelle +item.itemCellRuthenium.name=Ruthenium-Zelle +item.itemCellRhodium.name=Rhodium-Zelle +item.itemCellIodine.name=Iod-Zelle +item.itemCellXenon.name=Xenon-Zelle +item.itemCellHafnium.name=Hafnium-Zelle +item.itemCellRhenium.name=Rhenium-Zelle +item.itemCellThallium.name=Thallium-Zelle +item.itemCellPolonium.name=Polonium-Zelle +item.itemCellAstatine.name=Astat-Zelle +item.itemCellFrancium.name=Francium-Zelle +item.itemCellRadium.name=Radium-Zelle +item.itemCellActinium.name=Actinium-Zelle +item.itemCellProtactinium.name=Protactinium-Zelle +item.itemCellNeptunium.name=Neptunium-Zelle +item.itemCellCurium.name=Curium-Zelle +item.itemCellBerkelium.name=Berkelium-Zelle +item.itemCellCalifornium.name=Californium-Zelle +item.itemCellEinsteinium.name=Einsteinium-Zelle +item.itemCellFermium.name=Fermium-Zelle +item.itemCellRefinedTrinium.name=Raffinierte Trinium-Zelle +item.itemIngotSelenium.name=Selen-Barren +item.itemDustSelenium.name=Selen-Staub +item.itemDustTinySelenium.name=Winziges Häufchen Selen-Staub +item.itemDustSmallSelenium.name=Kleines Häufchen Selen-Staub +item.itemNuggetSelenium.name=Selen-Nugget +item.itemPlateSelenium.name=Selen-Platte +item.itemPlateDoubleSelenium.name=Doppelte Selen-Platte +item.itemBoltSelenium.name=Selen-Bolzen +item.itemRodSelenium.name=Selen-Stange +item.itemRodLongSelenium.name=Lange Selen-Stange +item.itemRingSelenium.name=Selen-Ring +item.itemScrewSelenium.name=Selen-Schraube +item.itemRotorSelenium.name=Selen-Rotor +item.itemGearSelenium.name=Selen-Zahnrad +item.itemCellUranium232.name=Uran-232-Zelle +item.itemCellUranium233.name=Uran-233-Zelle +item.itemCellThoriumTetrafluoride.name=Thorium-Tetrafluorid-Zelle +item.itemCellThoriumHexafluoride.name=Thorium-Hexafluorid-Zelle +item.itemCellUraniumTetrafluoride.name=Uran-Tetrafluorid-Zelle +item.itemCellUraniumHexafluoride.name=Uran-Hexafluorid-Zelle +item.itemCellZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Zelle +item.itemCellBerylliumFluoride.name=Beryllium-Fluorid-Zelle +item.itemCellLithiumFluoride.name=Lithium-Fluorid-Zelle +item.itemCellHydroxide.name=Hydroxid-Zelle +item.itemCellAmmonium.name=Ammonium-Zelle +item.itemCellAmmoniumBifluoride.name=Ammonium-Bifluorid-Zelle +item.itemCellBerylliumHydroxide.name=Beryllium-Hydroxid-Zelle +item.itemCellAmmoniumTetrafluoroberyllate.name=Ammonium-Tetrafluoroberyllat-Zelle +item.itemCellNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Zelle +item.itemCellTechnetiumHexafluoride.name=Technetium-Hexafluorid-Zelle +item.itemCellSeleniumHexafluoride.name=Selen-Hexafluorid-Zelle +item.itemCellEnergyCrystal.name=Energiekristall-Zelle +item.itemCellBloodSteel.name=Blutstahl-Zelle +item.itemCellStaballoy.name=Staballoy-Zelle +item.itemCellTantalloy60.name=Tantalloy-60-Zelle +item.itemCellTantalloy61.name=Tantalloy-61-Zelle +item.itemCellTumbaga.name=Tumbaga-Zelle +item.itemCellPotin.name=Potin-Zelle +item.itemCellInconel625.name=Inconel-625-Zelle +item.itemCellInconel690.name=Inconel-690-Zelle +item.itemCellInconel792.name=Inconel-792-Zelle +item.itemCellZeron100.name=Zeron-100-Zelle +item.itemCellMaragingSteel250.name=Maraging-Stahl-250-Zelle +item.itemCellMaragingSteel300.name=Maraging-Stahl-300-Zelle +item.itemCellMaragingSteel350.name=Maraging-Stahl-350-Zelle +item.itemCellStellite.name=Stellite-Zelle +item.itemCellTalonite.name=Talonite-Zelle +item.itemCellHastelloyW.name=Hastelloy-W-Zelle +item.itemCellHastelloyX.name=Hastelloy-X-Zelle +item.itemCellHastelloyN.name=Hastelloy-N-Zelle +item.itemCellHastelloyC276.name=Hastelloy-C276-Zelle +item.itemCellIncoloy020.name=Incoloy-020-Zelle +item.itemCellIncoloyDS.name=Incoloy-DS-Zelle +item.itemCellIncoloyMA956.name=Incoloy-MA956-Zelle +item.itemCellTungstenCarbide.name=Wolframcarbid-Zelle +item.itemCellSiliconCarbide.name=Siliziumcarbid-Zelle +item.itemCellTantalumCarbide.name=Tantalcarbid-Zelle +item.itemCellZirconiumCarbide.name=Zirkoniumcarbid-Zelle +item.itemCellNiobiumCarbide.name=Niobcarbid-Zelle +item.itemCellGrisium.name=Grisium-Zelle +item.itemCellEglinSteelBaseCompound.name=Eglin-Stahl Base Compound-Zelle +item.itemCellEglinSteel.name=Eglin-Stahl-Zelle +item.itemCellHG1223.name=HG-1223-Zelle +item.itemCellTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Zelle +item.itemCellTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Zelle +item.itemCellTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Zelle +item.itemCellQuantum.name=Quanten-Zelle +item.itemIngotBromine.name=Brom-Barren +item.itemDustBromine.name=Brom-Staub +item.itemDustTinyBromine.name=Winziges Häufchen Brom-Staub +item.itemDustSmallBromine.name=Kleines Häufchen Brom-Staub +item.itemNuggetBromine.name=Brom-Nugget +item.itemPlateBromine.name=Brom-Platte +item.itemPlateDoubleBromine.name=Doppelte Brom-Platte +item.itemIngotStrontium.name=Strontium-Barren +item.itemDustStrontium.name=Strontium-Staub +item.itemDustTinyStrontium.name=Winziges Häufchen Strontium-Staub +item.itemDustSmallStrontium.name=Kleines Häufchen Strontium-Staub +item.itemNuggetStrontium.name=Strontium-Nugget +item.itemPlateStrontium.name=Strontium-Platte +item.itemPlateDoubleStrontium.name=Doppelte Strontium-Platte +item.itemBoltStrontium.name=Strontium-Bolzen +item.itemRodStrontium.name=Strontium-Stange +item.itemRodLongStrontium.name=Lange Strontium-Stange +item.itemRingStrontium.name=Strontium-Ring +item.itemScrewStrontium.name=Strontium-Schraube +item.itemRotorStrontium.name=Strontium-Rotor +item.itemGearStrontium.name=Strontium-Zahnrad +item.itemIngotZirconium.name=Zirkonium-Barren +item.itemDustZirconium.name=Zirkonium-Staub +item.itemDustTinyZirconium.name=Winziges Häufchen Zirkonium-Staub +item.itemDustSmallZirconium.name=Kleines Häufchen Zirkonium-Staub +item.itemNuggetZirconium.name=Zirkonium-Nugget +item.itemPlateZirconium.name=Zirkonium-Platte +item.itemPlateDoubleZirconium.name=Doppelte Zirkonium-Platte +item.itemBoltZirconium.name=Zirkonium-Bolzen +item.itemRodZirconium.name=Zirkonium-Stange +item.itemRodLongZirconium.name=Lange Zirkonium-Stange +item.itemRingZirconium.name=Zirkonium-Ring +item.itemScrewZirconium.name=Zirkonium-Schraube +item.itemRotorZirconium.name=Zirkonium-Rotor +item.itemGearZirconium.name=Zirkonium-Zahnrad +item.itemIngotRuthenium.name=Ruthenium-Barren +item.itemDustRuthenium.name=Ruthenium-Staub +item.itemDustTinyRuthenium.name=Winziges Häufchen Ruthenium-Staub +item.itemDustSmallRuthenium.name=Kleines Häufchen Ruthenium-Staub +item.itemNuggetRuthenium.name=Ruthenium-Nugget +item.itemPlateRuthenium.name=Ruthenium-Platte +item.itemPlateDoubleRuthenium.name=Doppelte Ruthenium-Platte +item.itemBoltRuthenium.name=Ruthenium-Bolzen +item.itemRodRuthenium.name=Ruthenium-Stange +item.itemRodLongRuthenium.name=Lange Ruthenium-Stange +item.itemRingRuthenium.name=Ruthenium-Ring +item.itemScrewRuthenium.name=Ruthenium-Schraube +item.itemRotorRuthenium.name=Ruthenium-Rotor +item.itemGearRuthenium.name=Ruthenium-Zahnrad +item.itemIngotIodine.name=Iod-Barren +item.itemDustIodine.name=Iod-Staub +item.itemDustTinyIodine.name=Winziges Häufchen Iod-Staub +item.itemDustSmallIodine.name=Kleines Häufchen Iod-Staub +item.itemNuggetIodine.name=Iod-Nugget +item.itemPlateIodine.name=Iod-Platte +item.itemPlateDoubleIodine.name=Doppelte Iod-Platte +item.itemBoltIodine.name=Iod-Bolzen +item.itemRodIodine.name=Iod-Stange +item.itemRodLongIodine.name=Lange Iod-Stange +item.itemRingIodine.name=Iod-Ring +item.itemScrewIodine.name=Iod-Schraube +item.itemRotorIodine.name=Iod-Rotor +item.itemGearIodine.name=Iod-Zahnrad +item.itemIngotHafnium.name=Hafnium-Barren +item.itemDustHafnium.name=Hafnium-Staub +item.itemDustTinyHafnium.name=Winziges Häufchen Hafnium-Staub +item.itemDustSmallHafnium.name=Kleines Häufchen Hafnium-Staub +item.itemNuggetHafnium.name=Hafnium-Nugget +item.itemPlateHafnium.name=Hafnium-Platte +item.itemPlateDoubleHafnium.name=Doppelte Hafnium-Platte +item.itemBoltHafnium.name=Hafnium-Bolzen +item.itemRodHafnium.name=Hafnium-Stange +item.itemRodLongHafnium.name=Lange Hafnium-Stange +item.itemRingHafnium.name=Hafnium-Ring +item.itemScrewHafnium.name=Hafnium-Schraube +item.itemRotorHafnium.name=Hafnium-Rotor +item.itemGearHafnium.name=Hafnium-Zahnrad +item.itemIngotDysprosium.name=Dysprosium-Barren +item.itemDustDysprosium.name=Dysprosium-Staub +item.itemDustTinyDysprosium.name=Winziges Häufchen Dysprosium-Staub +item.itemDustSmallDysprosium.name=Kleines Häufchen Dysprosium-Staub +item.itemNuggetDysprosium.name=Dysprosium-Nugget +item.itemPlateDysprosium.name=Dysprosium-Platte +item.itemPlateDoubleDysprosium.name=Doppelte Dysprosium-Platte +item.itemBoltDysprosium.name=Dysprosium-Bolzen +item.itemRodDysprosium.name=Dysprosium-Stange +item.itemRodLongDysprosium.name=Lange Dysprosium-Stange +item.itemRingDysprosium.name=Dysprosium-Ring +item.itemScrewDysprosium.name=Dysprosium-Schraube +item.itemRotorDysprosium.name=Dysprosium-Rotor +item.itemGearDysprosium.name=Dysprosium-Zahnrad +item.itemIngotTellurium.name=Tellurium-Barren +item.itemDustTellurium.name=Tellurium-Staub +item.itemDustTinyTellurium.name=Winziges Häufchen Tellurium-Staub +item.itemDustSmallTellurium.name=Kleines Häufchen Tellurium-Staub +item.itemNuggetTellurium.name=Tellurium-Nugget +item.itemPlateTellurium.name=Tellurium-Platte +item.itemPlateDoubleTellurium.name=Doppelte Tellurium-Platte +item.itemBoltTellurium.name=Tellurium-Bolzen +item.itemRodTellurium.name=Tellurium-Stange +item.itemRodLongTellurium.name=Lange Tellurium-Stange +item.itemRingTellurium.name=Tellurium-Ring +item.itemScrewTellurium.name=Tellurium-Schraube +item.itemRotorTellurium.name=Tellurium-Rotor +item.itemGearTellurium.name=Tellurium-Zahnrad +item.itemIngotRhodium.name=Rhodium-Barren +item.itemDustRhodium.name=Rhodium-Staub +item.itemDustTinyRhodium.name=Winziges Häufchen Rhodium-Staub +item.itemDustSmallRhodium.name=Kleines Häufchen Rhodium-Staub +item.itemNuggetRhodium.name=Rhodium-Nugget +item.itemPlateRhodium.name=Rhodium-Platte +item.itemPlateDoubleRhodium.name=Doppelte Rhodium-Platte +item.itemBoltRhodium.name=Rhodium-Bolzen +item.itemRodRhodium.name=Rhodium-Stange +item.itemRodLongRhodium.name=Lange Rhodium-Stange +item.itemRingRhodium.name=Rhodium-Ring +item.itemScrewRhodium.name=Rhodium-Schraube +item.itemRotorRhodium.name=Rhodium-Rotor +item.itemGearRhodium.name=Rhodium-Zahnrad +item.itemIngotRhenium.name=Rhenium-Barren +item.itemDustRhenium.name=Rhenium-Staub +item.itemDustTinyRhenium.name=Winziges Häufchen Rhenium-Staub +item.itemDustSmallRhenium.name=Kleines Häufchen Rhenium-Staub +item.itemNuggetRhenium.name=Rhenium-Nugget +item.itemPlateRhenium.name=Rhenium-Platte +item.itemPlateDoubleRhenium.name=Doppelte Rhenium-Platte +item.itemBoltRhenium.name=Rhenium-Bolzen +item.itemRodRhenium.name=Rhenium-Stange +item.itemRodLongRhenium.name=Lange Rhenium-Stange +item.itemRingRhenium.name=Rhenium-Ring +item.itemScrewRhenium.name=Rhenium-Schraube +item.itemRotorRhenium.name=Rhenium-Rotor +item.itemGearRhenium.name=Rhenium-Zahnrad +item.itemIngotThallium.name=Thallium-Barren +item.itemDustThallium.name=Thallium-Staub +item.itemDustTinyThallium.name=Winziges Häufchen Thallium-Staub +item.itemDustSmallThallium.name=Kleines Häufchen Thallium-Staub +item.itemNuggetThallium.name=Thallium-Nugget +item.itemPlateThallium.name=Thallium-Platte +item.itemPlateDoubleThallium.name=Doppelte Thallium-Platte +item.itemBoltThallium.name=Thallium-Bolzen +item.itemRodThallium.name=Thallium-Stange +item.itemRodLongThallium.name=Lange Thallium-Stange +item.itemRingThallium.name=Thallium-Ring +item.itemScrewThallium.name=Thallium-Schraube +item.itemRotorThallium.name=Thallium-Rotor +item.itemGearThallium.name=Thallium-Zahnrad +item.itemIngotTechnetium.name=Technetium-Barren +item.itemDustTechnetium.name=Technetium-Staub +item.itemDustTinyTechnetium.name=Winziges Häufchen Technetium-Staub +item.itemDustSmallTechnetium.name=Kleines Häufchen Technetium-Staub +item.itemNuggetTechnetium.name=Technetium-Nugget +item.itemPlateTechnetium.name=Technetium-Platte +item.itemPlateDoubleTechnetium.name=Doppelte Technetium-Platte +item.itemIngotPolonium.name=Polonium-Barren +item.itemDustPolonium.name=Polonium-Staub +item.itemDustTinyPolonium.name=Winziges Häufchen Polonium-Staub +item.itemDustSmallPolonium.name=Kleines Häufchen Polonium-Staub +item.itemNuggetPolonium.name=Polonium-Nugget +item.itemPlatePolonium.name=Polonium-Platte +item.itemPlateDoublePolonium.name=Doppelte Polonium-Platte +item.itemIngotAstatine.name=Astat-Barren +item.itemDustAstatine.name=Astat-Staub +item.itemDustTinyAstatine.name=Winziges Häufchen Astat-Staub +item.itemDustSmallAstatine.name=Kleines Häufchen Astat-Staub +item.itemNuggetAstatine.name=Astat-Nugget +item.itemPlateAstatine.name=Astat-Platte +item.itemPlateDoubleAstatine.name=Doppelte Astat-Platte +item.itemIngotFrancium.name=Francium-Barren +item.itemDustFrancium.name=Francium-Staub +item.itemDustTinyFrancium.name=Winziges Häufchen Francium-Staub +item.itemDustSmallFrancium.name=Kleines Häufchen Francium-Staub +item.itemNuggetFrancium.name=Francium-Nugget +item.itemPlateFrancium.name=Francium-Platte +item.itemPlateDoubleFrancium.name=Doppelte Francium-Platte +item.itemIngotRadium.name=Radium-Barren +item.itemDustRadium.name=Radium-Staub +item.itemDustTinyRadium.name=Winziges Häufchen Radium-Staub +item.itemDustSmallRadium.name=Kleines Häufchen Radium-Staub +item.itemNuggetRadium.name=Radium-Nugget +item.itemPlateRadium.name=Radium-Platte +item.itemPlateDoubleRadium.name=Doppelte Radium-Platte +item.itemIngotActinium.name=Actinium-Barren +item.itemDustActinium.name=Actinium-Staub +item.itemDustTinyActinium.name=Winziges Häufchen Actinium-Staub +item.itemDustSmallActinium.name=Kleines Häufchen Actinium-Staub +item.itemNuggetActinium.name=Actinium-Nugget +item.itemPlateActinium.name=Actinium-Platte +item.itemPlateDoubleActinium.name=Doppelte Actinium-Platte +item.itemIngotProtactinium.name=Protactinium-Barren +item.itemDustProtactinium.name=Protactinium-Staub +item.itemDustTinyProtactinium.name=Winziges Häufchen Protactinium-Staub +item.itemDustSmallProtactinium.name=Kleines Häufchen Protactinium-Staub +item.itemNuggetProtactinium.name=Protactinium-Nugget +item.itemPlateProtactinium.name=Protactinium-Platte +item.itemPlateDoubleProtactinium.name=Doppelte Protactinium-Platte +item.itemIngotNeptunium.name=Neptunium-Barren +item.itemDustNeptunium.name=Neptunium-Staub +item.itemDustTinyNeptunium.name=Winziges Häufchen Neptunium-Staub +item.itemDustSmallNeptunium.name=Kleines Häufchen Neptunium-Staub +item.itemNuggetNeptunium.name=Neptunium-Nugget +item.itemPlateNeptunium.name=Neptunium-Platte +item.itemPlateDoubleNeptunium.name=Doppelte Neptunium-Platte +item.itemIngotCurium.name=Curium-Barren +item.itemDustCurium.name=Curium-Staub +item.itemDustTinyCurium.name=Winziges Häufchen Curium-Staub +item.itemDustSmallCurium.name=Kleines Häufchen Curium-Staub +item.itemNuggetCurium.name=Curium-Nugget +item.itemPlateCurium.name=Curium-Platte +item.itemPlateDoubleCurium.name=Doppelte Curium-Platte +item.itemIngotBerkelium.name=Berkelium-Barren +item.itemDustBerkelium.name=Berkelium-Staub +item.itemDustTinyBerkelium.name=Winziges Häufchen Berkelium-Staub +item.itemDustSmallBerkelium.name=Kleines Häufchen Berkelium-Staub +item.itemNuggetBerkelium.name=Berkelium-Nugget +item.itemPlateBerkelium.name=Berkelium-Platte +item.itemPlateDoubleBerkelium.name=Doppelte Berkelium-Platte +item.itemIngotCalifornium.name=Californium-Barren +item.itemDustCalifornium.name=Californium-Staub +item.itemDustTinyCalifornium.name=Winziges Häufchen Californium-Staub +item.itemDustSmallCalifornium.name=Kleines Häufchen Californium-Staub +item.itemNuggetCalifornium.name=Californium-Nugget +item.itemPlateCalifornium.name=Californium-Platte +item.itemPlateDoubleCalifornium.name=Doppelte Californium-Platte +item.itemIngotEinsteinium.name=Einsteinium-Barren +item.itemDustEinsteinium.name=Einsteinium-Staub +item.itemDustTinyEinsteinium.name=Winziges Häufchen Einsteinium-Staub +item.itemDustSmallEinsteinium.name=Kleines Häufchen Einsteinium-Staub +item.itemNuggetEinsteinium.name=Einsteinium-Nugget +item.itemPlateEinsteinium.name=Einsteinium-Platte +item.itemPlateDoubleEinsteinium.name=Doppelte Einsteinium-Platte +item.itemIngotFermium.name=Fermium-Barren +item.itemDustFermium.name=Fermium-Staub +item.itemDustTinyFermium.name=Winziges Häufchen Fermium-Staub +item.itemDustSmallFermium.name=Kleines Häufchen Fermium-Staub +item.itemNuggetFermium.name=Fermium-Nugget +item.itemPlateFermium.name=Fermium-Platte +item.itemPlateDoubleFermium.name=Doppelte Fermium-Platte +item.itemIngotLithium7.name=Lithium-7-Barren +item.itemDustLithium7.name=Lithium-7-Staub +item.itemDustTinyLithium7.name=Winziges Häufchen Lithium-7-Staub +item.itemDustSmallLithium7.name=Kleines Häufchen Lithium-7-Staub +item.itemNuggetLithium7.name=Lithium-7-Nugget +item.itemPlateLithium7.name=Lithium-7-Platte +item.itemPlateDoubleLithium7.name=Doppelte Lithium-7-Platte +item.itemIngotThorium232.name=Thorium-232-Barren +item.itemDustThorium232.name=Thorium-232-Staub +item.itemDustTinyThorium232.name=Winziges Häufchen Thorium-232-Staub +item.itemDustSmallThorium232.name=Kleines Häufchen Thorium-232-Staub +item.itemNuggetThorium232.name=Thorium-232-Nugget +item.itemPlateThorium232.name=Thorium-232-Platte +item.itemPlateDoubleThorium232.name=Doppelte Thorium-232-Platte +item.itemIngotUranium232.name=Uran-232-Barren +item.itemDustUranium232.name=Uran-232-Staub +item.itemDustTinyUranium232.name=Winziges Häufchen Uran-232-Staub +item.itemDustSmallUranium232.name=Kleines Häufchen Uran-232-Staub +item.itemNuggetUranium232.name=Uran-232-Nugget +item.itemPlateUranium232.name=Uran-232-Platte +item.itemRodUranium232.name=Uran-232-Stange +item.itemRodLongUranium232.name=Lange Uran-232-Stange +item.itemIngotUranium233.name=Uran-233-Barren +item.itemDustUranium233.name=Uran-233-Staub +item.itemDustTinyUranium233.name=Winziges Häufchen Uran-233-Staub +item.itemDustSmallUranium233.name=Kleines Häufchen Uran-233-Staub +item.itemNuggetUranium233.name=Uran-233-Nugget +item.itemPlateUranium233.name=Uran-233-Platte +item.itemRodUranium233.name=Uran-233-Stange +item.itemRodLongUranium233.name=Lange Uran-233-Stange +item.itemIngotPlutonium238.name=Plutonium-238-Barren +item.itemDustPlutonium238.name=Plutonium-238-Staub +item.itemDustTinyPlutonium238.name=Winziges Häufchen Plutonium-238-Staub +item.itemDustSmallPlutonium238.name=Kleines Häufchen Plutonium-238-Staub +item.itemNuggetPlutonium238.name=Plutonium-238-Nugget +item.itemPlatePlutonium238.name=Plutonium-238-Platte +item.itemPlateDoublePlutonium238.name=Doppelte Plutonium-238-Platte +item.itemIngotStrontium90.name=Strontium-90-Barren +item.itemDustStrontium90.name=Strontium-90-Staub +item.itemDustTinyStrontium90.name=Winziges Häufchen Strontium-90-Staub +item.itemDustSmallStrontium90.name=Kleines Häufchen Strontium-90-Staub +item.itemNuggetStrontium90.name=Strontium-90-Nugget +item.itemPlateStrontium90.name=Strontium-90-Platte +item.itemPlateDoubleStrontium90.name=Doppelte Strontium-90-Platte +item.itemIngotPolonium210.name=Polonium-210-Barren +item.itemDustPolonium210.name=Polonium-210-Staub +item.itemDustTinyPolonium210.name=Winziges Häufchen Polonium-210-Staub +item.itemDustSmallPolonium210.name=Kleines Häufchen Polonium-210-Staub +item.itemNuggetPolonium210.name=Polonium-210-Nugget +item.itemPlatePolonium210.name=Polonium-210-Platte +item.itemPlateDoublePolonium210.name=Doppelte Polonium-210-Platte +item.itemIngotAmericium241.name=Americium-241-Barren +item.itemDustAmericium241.name=Americium-241-Staub +item.itemDustTinyAmericium241.name=Winziges Häufchen Americium-241-Staub +item.itemDustSmallAmericium241.name=Kleines Häufchen Americium-241-Staub +item.itemNuggetAmericium241.name=Americium-241-Nugget +item.itemPlateAmericium241.name=Americium-241-Platte +item.itemPlateDoubleAmericium241.name=Doppelte Americium-241-Platte +item.itemIngotSiliconCarbide.name=Siliziumcarbid-Barren +item.itemDustSiliconCarbide.name=Siliziumcarbid-Staub +item.itemDustTinySiliconCarbide.name=Winziges Häufchen Siliziumcarbid-Staub +item.itemDustSmallSiliconCarbide.name=Kleines Häufchen Siliziumcarbid-Staub +item.itemNuggetSiliconCarbide.name=Siliziumcarbid-Nugget +item.itemPlateSiliconCarbide.name=Siliziumcarbid-Platte +item.itemPlateDoubleSiliconCarbide.name=Doppelte Siliziumcarbid-Platte +item.itemBoltSiliconCarbide.name=Siliziumcarbid-Bolzen +item.itemRodSiliconCarbide.name=Siliziumcarbid-Stange +item.itemRodLongSiliconCarbide.name=Lange Siliziumcarbid-Stange +item.itemRingSiliconCarbide.name=Siliziumcarbid-Ring +item.itemScrewSiliconCarbide.name=Siliziumcarbid-Schraube +item.itemRotorSiliconCarbide.name=Siliziumcarbid-Rotor +item.itemGearSiliconCarbide.name=Siliziumcarbid-Zahnrad +item.itemIngotZirconiumCarbide.name=Zirkoniumcarbid-Barren +item.itemHotIngotZirconiumCarbide.name=Hot Zirkoniumcarbid-Barren +item.itemDustZirconiumCarbide.name=Zirkoniumcarbid-Staub +item.itemDustTinyZirconiumCarbide.name=Winziges Häufchen Zirkoniumcarbid-Staub +item.itemDustSmallZirconiumCarbide.name=Kleines Häufchen Zirkoniumcarbid-Staub +item.itemNuggetZirconiumCarbide.name=Zirkoniumcarbid-Nugget +item.itemPlateZirconiumCarbide.name=Zirkoniumcarbid-Platte +item.itemPlateDoubleZirconiumCarbide.name=Doppelte Zirkoniumcarbid-Platte +item.itemBoltZirconiumCarbide.name=Zirkoniumcarbid-Bolzen +item.itemRodZirconiumCarbide.name=Zirkoniumcarbid-Stange +item.itemRodLongZirconiumCarbide.name=Lange Zirkoniumcarbid-Stange +item.itemRingZirconiumCarbide.name=Zirkoniumcarbid-Ring +item.itemScrewZirconiumCarbide.name=Zirkoniumcarbid-Schraube +item.itemRotorZirconiumCarbide.name=Zirkoniumcarbid-Rotor +item.itemGearZirconiumCarbide.name=Zirkoniumcarbid-Zahnrad +item.itemIngotTantalumCarbide.name=Tantalcarbid-Barren +item.itemHotIngotTantalumCarbide.name=Hot Tantalcarbid-Barren +item.itemDustTantalumCarbide.name=Tantalcarbid-Staub +item.itemDustTinyTantalumCarbide.name=Winziges Häufchen Tantalcarbid-Staub +item.itemDustSmallTantalumCarbide.name=Kleines Häufchen Tantalcarbid-Staub +item.itemNuggetTantalumCarbide.name=Tantalcarbid-Nugget +item.itemPlateTantalumCarbide.name=Tantalcarbid-Platte +item.itemPlateDoubleTantalumCarbide.name=Doppelte Tantalcarbid-Platte +item.itemBoltTantalumCarbide.name=Tantalcarbid-Bolzen +item.itemRodTantalumCarbide.name=Tantalcarbid-Stange +item.itemRodLongTantalumCarbide.name=Lange Tantalcarbid-Stange +item.itemRingTantalumCarbide.name=Tantalcarbid-Ring +item.itemScrewTantalumCarbide.name=Tantalcarbid-Schraube +item.itemRotorTantalumCarbide.name=Tantalcarbid-Rotor +item.itemGearTantalumCarbide.name=Tantalcarbid-Zahnrad +item.itemIngotNiobiumCarbide.name=Niobcarbid-Barren +item.itemHotIngotNiobiumCarbide.name=Hot Niobcarbid-Barren +item.itemDustNiobiumCarbide.name=Niobcarbid-Staub +item.itemDustTinyNiobiumCarbide.name=Winziges Häufchen Niobcarbid-Staub +item.itemDustSmallNiobiumCarbide.name=Kleines Häufchen Niobcarbid-Staub +item.itemNuggetNiobiumCarbide.name=Niobcarbid-Nugget +item.itemPlateNiobiumCarbide.name=Niobcarbid-Platte +item.itemPlateDoubleNiobiumCarbide.name=Doppelte Niobcarbid-Platte +item.itemBoltNiobiumCarbide.name=Niobcarbid-Bolzen +item.itemRodNiobiumCarbide.name=Niobcarbid-Stange +item.itemRodLongNiobiumCarbide.name=Lange Niobcarbid-Stange +item.itemRingNiobiumCarbide.name=Niobcarbid-Ring +item.itemScrewNiobiumCarbide.name=Niobcarbid-Schraube +item.itemRotorNiobiumCarbide.name=Niobcarbid-Rotor +item.itemGearNiobiumCarbide.name=Niobcarbid-Zahnrad +item.itemIngotBerylliumFluoride.name=Beryllium-Fluorid-Barren +item.itemDustBerylliumFluoride.name=Beryllium-Fluorid-Staub +item.itemDustTinyBerylliumFluoride.name=Winziges Häufchen Beryllium-Fluorid-Staub +item.itemDustSmallBerylliumFluoride.name=Kleines Häufchen Beryllium-Fluorid-Staub +item.itemNuggetBerylliumFluoride.name=Beryllium-Fluorid-Nugget +item.itemPlateBerylliumFluoride.name=Beryllium-Fluorid-Platte +item.itemPlateDoubleBerylliumFluoride.name=Doppelte Beryllium-Fluorid-Platte +item.itemIngotLithiumFluoride.name=Lithium-Fluorid-Barren +item.itemDustLithiumFluoride.name=Lithium-Fluorid-Staub +item.itemDustTinyLithiumFluoride.name=Winziges Häufchen Lithium-Fluorid-Staub +item.itemDustSmallLithiumFluoride.name=Kleines Häufchen Lithium-Fluorid-Staub +item.itemNuggetLithiumFluoride.name=Lithium-Fluorid-Nugget +item.itemPlateLithiumFluoride.name=Lithium-Fluorid-Platte +item.itemPlateDoubleLithiumFluoride.name=Doppelte Lithium-Fluorid-Platte +item.itemIngotThoriumTetrafluoride.name=Thorium-Tetrafluorid-Barren +item.itemDustThoriumTetrafluoride.name=Thorium-Tetrafluorid-Staub +item.itemDustTinyThoriumTetrafluoride.name=Winziges Häufchen Thorium-Tetrafluorid-Staub +item.itemDustSmallThoriumTetrafluoride.name=Kleines Häufchen Thorium-Tetrafluorid-Staub +item.itemNuggetThoriumTetrafluoride.name=Thorium-Tetrafluorid-Nugget +item.itemPlateThoriumTetrafluoride.name=Thorium-Tetrafluorid-Platte +item.itemPlateDoubleThoriumTetrafluoride.name=Doppelte Thorium-Tetrafluorid-Platte +item.itemIngotThoriumHexafluoride.name=Thorium-Hexafluorid-Barren +item.itemDustThoriumHexafluoride.name=Thorium-Hexafluorid-Staub +item.itemDustTinyThoriumHexafluoride.name=Winziges Häufchen Thorium-Hexafluorid-Staub +item.itemDustSmallThoriumHexafluoride.name=Kleines Häufchen Thorium-Hexafluorid-Staub +item.itemNuggetThoriumHexafluoride.name=Thorium-Hexafluorid-Nugget +item.itemPlateThoriumHexafluoride.name=Thorium-Hexafluorid-Platte +item.itemPlateDoubleThoriumHexafluoride.name=Doppelte Thorium-Hexafluorid-Platte +item.itemIngotUraniumTetrafluoride.name=Uran-Tetrafluorid-Barren +item.itemDustUraniumTetrafluoride.name=Uran-Tetrafluorid-Staub +item.itemDustTinyUraniumTetrafluoride.name=Winziges Häufchen Uran-Tetrafluorid-Staub +item.itemDustSmallUraniumTetrafluoride.name=Kleines Häufchen Uran-Tetrafluorid-Staub +item.itemNuggetUraniumTetrafluoride.name=Uran-Tetrafluorid-Nugget +item.itemPlateUraniumTetrafluoride.name=Uran-Tetrafluorid-Platte +item.itemPlateDoubleUraniumTetrafluoride.name=Doppelte Uran-Tetrafluorid-Platte +item.itemIngotUraniumHexafluoride.name=Uran-Hexafluorid-Barren +item.itemDustUraniumHexafluoride.name=Uran-Hexafluorid-Staub +item.itemDustTinyUraniumHexafluoride.name=Winziges Häufchen Uran-Hexafluorid-Staub +item.itemDustSmallUraniumHexafluoride.name=Kleines Häufchen Uran-Hexafluorid-Staub +item.itemNuggetUraniumHexafluoride.name=Uran-Hexafluorid-Nugget +item.itemPlateUraniumHexafluoride.name=Uran-Hexafluorid-Platte +item.itemPlateDoubleUraniumHexafluoride.name=Doppelte Uran-Hexafluorid-Platte +item.itemIngotZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Barren +item.itemDustZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Staub +item.itemDustTinyZirconiumTetrafluoride.name=Winziges Häufchen Zirkonium-Tetrafluorid-Staub +item.itemDustSmallZirconiumTetrafluoride.name=Kleines Häufchen Zirkonium-Tetrafluorid-Staub +item.itemNuggetZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Nugget +item.itemPlateZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Platte +item.itemPlateDoubleZirconiumTetrafluoride.name=Doppelte Zirkonium-Tetrafluorid-Platte +item.itemIngotNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Barren +item.itemDustNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Staub +item.itemDustTinyNeptuniumHexafluoride.name=Winziges Häufchen Neptunium-Hexafluorid-Staub +item.itemDustSmallNeptuniumHexafluoride.name=Kleines Häufchen Neptunium-Hexafluorid-Staub +item.itemNuggetNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Nugget +item.itemPlateNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Platte +item.itemPlateDoubleNeptuniumHexafluoride.name=Doppelte Neptunium-Hexafluorid-Platte +item.itemIngotTechnetiumHexafluoride.name=Technetium-Hexafluorid-Barren +item.itemDustTechnetiumHexafluoride.name=Technetium-Hexafluorid-Staub +item.itemDustTinyTechnetiumHexafluoride.name=Winziges Häufchen Technetium-Hexafluorid-Staub +item.itemDustSmallTechnetiumHexafluoride.name=Kleines Häufchen Technetium-Hexafluorid-Staub +item.itemNuggetTechnetiumHexafluoride.name=Technetium-Hexafluorid-Nugget +item.itemPlateTechnetiumHexafluoride.name=Technetium-Hexafluorid-Platte +item.itemPlateDoubleTechnetiumHexafluoride.name=Doppelte Technetium-Hexafluorid-Platte +item.itemIngotSeleniumHexafluoride.name=Selen-Hexafluorid-Barren +item.itemDustSeleniumHexafluoride.name=Selen-Hexafluorid-Staub +item.itemDustTinySeleniumHexafluoride.name=Winziges Häufchen Selen-Hexafluorid-Staub +item.itemDustSmallSeleniumHexafluoride.name=Kleines Häufchen Selen-Hexafluorid-Staub +item.itemNuggetSeleniumHexafluoride.name=Selen-Hexafluorid-Nugget +item.itemPlateSeleniumHexafluoride.name=Selen-Hexafluorid-Platte +item.itemPlateDoubleSeleniumHexafluoride.name=Doppelte Selen-Hexafluorid-Platte +item.itemIngotLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Barren +item.itemDustLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Staub +item.itemDustTinyLiFBeF2ZrF4U235.name=Winziges Häufchen LiFBeF2ZrF4U235-Staub +item.itemDustSmallLiFBeF2ZrF4U235.name=Kleines Häufchen LiFBeF2ZrF4U235-Staub +item.itemNuggetLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Nugget +item.itemPlateLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Platte +item.itemPlateDoubleLiFBeF2ZrF4U235.name=Doppelte LiFBeF2ZrF4U235-Platte +item.itemIngotLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Barren +item.itemDustLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Staub +item.itemDustTinyLiFBeF2ZrF4UF4.name=Winziges Häufchen LiFBeF2ZrF4UF4-Staub +item.itemDustSmallLiFBeF2ZrF4UF4.name=Kleines Häufchen LiFBeF2ZrF4UF4-Staub +item.itemNuggetLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Nugget +item.itemPlateLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Platte +item.itemPlateDoubleLiFBeF2ZrF4UF4.name=Doppelte LiFBeF2ZrF4UF4-Platte +item.itemIngotLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Barren +item.itemDustLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Staub +item.itemDustTinyLiFBeF2ThF4UF4.name=Winziges Häufchen LiFBeF2ThF4UF4-Staub +item.itemDustSmallLiFBeF2ThF4UF4.name=Kleines Häufchen LiFBeF2ThF4UF4-Staub +item.itemNuggetLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Nugget +item.itemPlateLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Platte +item.itemPlateDoubleLiFBeF2ThF4UF4.name=Doppelte LiFBeF2ThF4UF4-Platte +item.itemIngotEnergyCrystal.name=Energy Crystal-Barren +item.itemHotIngotEnergyCrystal.name=Hot Energy Crystal-Barren +item.itemDustEnergyCrystal.name=Energy Crystal-Staub +item.itemDustTinyEnergyCrystal.name=Winziges Häufchen Energy Crystal-Staub +item.itemDustSmallEnergyCrystal.name=Kleines Häufchen Energy Crystal-Staub +item.itemNuggetEnergyCrystal.name=Energy Crystal-Nugget +item.itemPlateEnergyCrystal.name=Energy Crystal-Platte +item.itemPlateDoubleEnergyCrystal.name=Doppelte Energy Crystal-Platte +item.itemBoltEnergyCrystal.name=Energy Crystal-Bolzen +item.itemRodEnergyCrystal.name=Energy Crystal-Stange +item.itemRodLongEnergyCrystal.name=Lange Energy Crystal-Stange +item.itemRingEnergyCrystal.name=Energy Crystal-Ring +item.itemScrewEnergyCrystal.name=Energy Crystal-Schraube +item.itemRotorEnergyCrystal.name=Energy Crystal-Rotor +item.itemGearEnergyCrystal.name=Energy Crystal-Zahnrad +item.itemIngotBloodSteel.name=Blutstahl-Barren +item.itemDustBloodSteel.name=Blutstahl-Staub +item.itemDustTinyBloodSteel.name=Winziges Häufchen Blutstahl-Staub +item.itemDustSmallBloodSteel.name=Kleines Häufchen Blutstahl-Staub +item.itemNuggetBloodSteel.name=Blutstahl-Nugget +item.itemPlateBloodSteel.name=Blutstahl-Platte +item.itemPlateDoubleBloodSteel.name=Doppelte Blutstahl-Platte +item.itemBoltBloodSteel.name=Blutstahl-Bolzen +item.itemRodBloodSteel.name=Blutstahl-Stange +item.itemRodLongBloodSteel.name=Lange Blutstahl-Stange +item.itemRingBloodSteel.name=Blutstahl-Ring +item.itemScrewBloodSteel.name=Blutstahl-Schraube +item.itemRotorBloodSteel.name=Blutstahl-Rotor +item.itemGearBloodSteel.name=Blutstahl-Zahnrad +item.itemIngotZeron100.name=Zeron-100-Barren +item.itemHotIngotZeron100.name=Hot Zeron-100-Barren +item.itemDustZeron100.name=Zeron-100-Staub +item.itemDustTinyZeron100.name=Winziges Häufchen Zeron-100-Staub +item.itemDustSmallZeron100.name=Kleines Häufchen Zeron-100-Staub +item.itemNuggetZeron100.name=Zeron-100-Nugget +item.itemPlateZeron100.name=Zeron-100-Platte +item.itemPlateDoubleZeron100.name=Doppelte Zeron-100-Platte +item.itemBoltZeron100.name=Zeron-100-Bolzen +item.itemRodZeron100.name=Zeron-100-Stange +item.itemRodLongZeron100.name=Lange Zeron-100-Stange +item.itemRingZeron100.name=Zeron-100-Ring +item.itemScrewZeron100.name=Zeron-100-Schraube +item.itemRotorZeron100.name=Zeron-100-Rotor +item.itemGearZeron100.name=Zeron-100-Zahnrad +item.itemIngotTumbaga.name=Tumbaga-Barren +item.itemDustTumbaga.name=Tumbaga-Staub +item.itemDustTinyTumbaga.name=Winziges Häufchen Tumbaga-Staub +item.itemDustSmallTumbaga.name=Kleines Häufchen Tumbaga-Staub +item.itemNuggetTumbaga.name=Tumbaga-Nugget +item.itemPlateTumbaga.name=Tumbaga-Platte +item.itemPlateDoubleTumbaga.name=Doppelte Tumbaga-Platte +item.itemBoltTumbaga.name=Tumbaga-Bolzen +item.itemRodTumbaga.name=Tumbaga-Stange +item.itemRodLongTumbaga.name=Lange Tumbaga-Stange +item.itemRingTumbaga.name=Tumbaga-Ring +item.itemScrewTumbaga.name=Tumbaga-Schraube +item.itemRotorTumbaga.name=Tumbaga-Rotor +item.itemGearTumbaga.name=Tumbaga-Zahnrad +item.itemIngotPotin.name=Potin-Barren +item.itemDustPotin.name=Potin-Staub +item.itemDustTinyPotin.name=Winziges Häufchen Potin-Staub +item.itemDustSmallPotin.name=Kleines Häufchen Potin-Staub +item.itemNuggetPotin.name=Potin-Nugget +item.itemPlatePotin.name=Potin-Platte +item.itemPlateDoublePotin.name=Doppelte Potin-Platte +item.itemBoltPotin.name=Potin-Bolzen +item.itemRodPotin.name=Potin-Stange +item.itemRodLongPotin.name=Lange Potin-Stange +item.itemRingPotin.name=Potin-Ring +item.itemScrewPotin.name=Potin-Schraube +item.itemRotorPotin.name=Potin-Rotor +item.itemGearPotin.name=Potin-Zahnrad +item.itemIngotStaballoy.name=Staballoy-Barren +item.itemHotIngotStaballoy.name=Hot Staballoy-Barren +item.itemDustStaballoy.name=Staballoy-Staub +item.itemDustTinyStaballoy.name=Winziges Häufchen Staballoy-Staub +item.itemDustSmallStaballoy.name=Kleines Häufchen Staballoy-Staub +item.itemNuggetStaballoy.name=Staballoy-Nugget +item.itemPlateStaballoy.name=Staballoy-Platte +item.itemPlateDoubleStaballoy.name=Doppelte Staballoy-Platte +item.itemBoltStaballoy.name=Staballoy-Bolzen +item.itemRodStaballoy.name=Staballoy-Stange +item.itemRodLongStaballoy.name=Lange Staballoy-Stange +item.itemRingStaballoy.name=Staballoy-Ring +item.itemScrewStaballoy.name=Staballoy-Schraube +item.itemRotorStaballoy.name=Staballoy-Rotor +item.itemGearStaballoy.name=Staballoy-Zahnrad +item.itemIngotTantalloy60.name=Tantalloy-60-Barren +item.itemHotIngotTantalloy60.name=Hot Tantalloy-60-Barren +item.itemDustTantalloy60.name=Tantalloy-60-Staub +item.itemDustTinyTantalloy60.name=Winziges Häufchen Tantalloy-60-Staub +item.itemDustSmallTantalloy60.name=Kleines Häufchen Tantalloy-60-Staub +item.itemNuggetTantalloy60.name=Tantalloy-60-Nugget +item.itemPlateTantalloy60.name=Tantalloy-60-Platte +item.itemPlateDoubleTantalloy60.name=Doppelte Tantalloy-60-Platte +item.itemBoltTantalloy60.name=Tantalloy-60-Bolzen +item.itemRodTantalloy60.name=Tantalloy-60-Stange +item.itemRodLongTantalloy60.name=Lange Tantalloy-60-Stange +item.itemRingTantalloy60.name=Tantalloy-60-Ring +item.itemScrewTantalloy60.name=Tantalloy-60-Schraube +item.itemRotorTantalloy60.name=Tantalloy-60-Rotor +item.itemGearTantalloy60.name=Tantalloy-60-Zahnrad +item.itemIngotTantalloy61.name=Tantalloy-61-Barren +item.itemHotIngotTantalloy61.name=Hot Tantalloy-61-Barren +item.itemDustTantalloy61.name=Tantalloy-61-Staub +item.itemDustTinyTantalloy61.name=Winziges Häufchen Tantalloy-61-Staub +item.itemDustSmallTantalloy61.name=Kleines Häufchen Tantalloy-61-Staub +item.itemNuggetTantalloy61.name=Tantalloy-61-Nugget +item.itemPlateTantalloy61.name=Tantalloy-61-Platte +item.itemPlateDoubleTantalloy61.name=Doppelte Tantalloy-61-Platte +item.itemBoltTantalloy61.name=Tantalloy-61-Bolzen +item.itemRodTantalloy61.name=Tantalloy-61-Stange +item.itemRodLongTantalloy61.name=Lange Tantalloy-61-Stange +item.itemRingTantalloy61.name=Tantalloy-61-Ring +item.itemScrewTantalloy61.name=Tantalloy-61-Schraube +item.itemRotorTantalloy61.name=Tantalloy-61-Rotor +item.itemGearTantalloy61.name=Tantalloy-61-Zahnrad +item.itemIngotInconel625.name=Inconel-625-Barren +item.itemHotIngotInconel625.name=Hot Inconel-625-Barren +item.itemDustInconel625.name=Inconel-625-Staub +item.itemDustTinyInconel625.name=Winziges Häufchen Inconel-625-Staub +item.itemDustSmallInconel625.name=Kleines Häufchen Inconel-625-Staub +item.itemNuggetInconel625.name=Inconel-625-Nugget +item.itemPlateInconel625.name=Inconel-625-Platte +item.itemPlateDoubleInconel625.name=Doppelte Inconel-625-Platte +item.itemBoltInconel625.name=Inconel-625-Bolzen +item.itemRodInconel625.name=Inconel-625-Stange +item.itemRodLongInconel625.name=Lange Inconel-625-Stange +item.itemRingInconel625.name=Inconel-625-Ring +item.itemScrewInconel625.name=Inconel-625-Schraube +item.itemRotorInconel625.name=Inconel-625-Rotor +item.itemGearInconel625.name=Inconel-625-Zahnrad +item.itemIngotInconel690.name=Inconel-690-Barren +item.itemHotIngotInconel690.name=Hot Inconel-690-Barren +item.itemDustInconel690.name=Inconel-690-Staub +item.itemDustTinyInconel690.name=Winziges Häufchen Inconel-690-Staub +item.itemDustSmallInconel690.name=Kleines Häufchen Inconel-690-Staub +item.itemNuggetInconel690.name=Inconel-690-Nugget +item.itemPlateInconel690.name=Inconel-690-Platte +item.itemPlateDoubleInconel690.name=Doppelte Inconel-690-Platte +item.itemBoltInconel690.name=Inconel-690-Bolzen +item.itemRodInconel690.name=Inconel-690-Stange +item.itemRodLongInconel690.name=Lange Inconel-690-Stange +item.itemRingInconel690.name=Inconel-690-Ring +item.itemScrewInconel690.name=Inconel-690-Schraube +item.itemRotorInconel690.name=Inconel-690-Rotor +item.itemGearInconel690.name=Inconel-690-Zahnrad +item.itemIngotInconel792.name=Inconel-792-Barren +item.itemHotIngotInconel792.name=Hot Inconel-792-Barren +item.itemDustInconel792.name=Inconel-792-Staub +item.itemDustTinyInconel792.name=Winziges Häufchen Inconel-792-Staub +item.itemDustSmallInconel792.name=Kleines Häufchen Inconel-792-Staub +item.itemNuggetInconel792.name=Inconel-792-Nugget +item.itemPlateInconel792.name=Inconel-792-Platte +item.itemPlateDoubleInconel792.name=Doppelte Inconel-792-Platte +item.itemBoltInconel792.name=Inconel-792-Bolzen +item.itemRodInconel792.name=Inconel-792-Stange +item.itemRodLongInconel792.name=Lange Inconel-792-Stange +item.itemRingInconel792.name=Inconel-792-Ring +item.itemScrewInconel792.name=Inconel-792-Schraube +item.itemRotorInconel792.name=Inconel-792-Rotor +item.itemGearInconel792.name=Inconel-792-Zahnrad +item.itemDustEglinSteelBaseCompound.name=Eglin-Stahl Base Compound-Staub +item.itemDustTinyEglinSteelBaseCompound.name=Winziges Häufchen Eglin-Stahl Base Compound-Staub +item.itemDustSmallEglinSteelBaseCompound.name=Kleines Häufchen Eglin-Stahl Base Compound-Staub +item.itemIngotEglinSteel.name=Eglin-Stahl-Barren +item.itemDustEglinSteel.name=Eglin-Stahl-Staub +item.itemDustTinyEglinSteel.name=Winziges Häufchen Eglin-Stahl-Staub +item.itemDustSmallEglinSteel.name=Kleines Häufchen Eglin-Stahl-Staub +item.itemNuggetEglinSteel.name=Eglin-Stahl-Nugget +item.itemPlateEglinSteel.name=Eglin-Stahl-Platte +item.itemPlateDoubleEglinSteel.name=Doppelte Eglin-Stahl-Platte +item.itemBoltEglinSteel.name=Eglin-Stahl-Bolzen +item.itemRodEglinSteel.name=Eglin-Stahl-Stange +item.itemRodLongEglinSteel.name=Lange Eglin-Stahl-Stange +item.itemRingEglinSteel.name=Eglin-Stahl-Ring +item.itemScrewEglinSteel.name=Eglin-Stahl-Schraube +item.itemRotorEglinSteel.name=Eglin-Stahl-Rotor +item.itemGearEglinSteel.name=Eglin-Stahl-Zahnrad +item.itemIngotMaragingSteel250.name=Maraging-Stahl-250-Barren +item.itemHotIngotMaragingSteel250.name=Hot Maraging-Stahl-250-Barren +item.itemDustMaragingSteel250.name=Maraging-Stahl-250-Staub +item.itemDustTinyMaragingSteel250.name=Winziges Häufchen Maraging-Stahl-250-Staub +item.itemDustSmallMaragingSteel250.name=Kleines Häufchen Maraging-Stahl-250-Staub +item.itemNuggetMaragingSteel250.name=Maraging-Stahl-250-Nugget +item.itemPlateMaragingSteel250.name=Maraging-Stahl-250-Platte +item.itemPlateDoubleMaragingSteel250.name=Doppelte Maraging-Stahl-250-Platte +item.itemBoltMaragingSteel250.name=Maraging-Stahl-250-Bolzen +item.itemRodMaragingSteel250.name=Maraging-Stahl-250-Stange +item.itemRodLongMaragingSteel250.name=Lange Maraging-Stahl-250-Stange +item.itemRingMaragingSteel250.name=Maraging-Stahl-250-Ring +item.itemScrewMaragingSteel250.name=Maraging-Stahl-250-Schraube +item.itemRotorMaragingSteel250.name=Maraging-Stahl-250-Rotor +item.itemGearMaragingSteel250.name=Maraging-Stahl-250-Zahnrad +item.itemIngotMaragingSteel300.name=Maraging-Stahl-300-Barren +item.itemHotIngotMaragingSteel300.name=Hot Maraging-Stahl-300-Barren +item.itemDustMaragingSteel300.name=Maraging-Stahl-300-Staub +item.itemDustTinyMaragingSteel300.name=Winziges Häufchen Maraging-Stahl-300-Staub +item.itemDustSmallMaragingSteel300.name=Kleines Häufchen Maraging-Stahl-300-Staub +item.itemNuggetMaragingSteel300.name=Maraging-Stahl-300-Nugget +item.itemPlateMaragingSteel300.name=Maraging-Stahl-300-Platte +item.itemPlateDoubleMaragingSteel300.name=Doppelte Maraging-Stahl-300-Platte +item.itemBoltMaragingSteel300.name=Maraging-Stahl-300-Bolzen +item.itemRodMaragingSteel300.name=Maraging-Stahl-300-Stange +item.itemRodLongMaragingSteel300.name=Lange Maraging-Stahl-300-Stange +item.itemRingMaragingSteel300.name=Maraging-Stahl-300-Ring +item.itemScrewMaragingSteel300.name=Maraging-Stahl-300-Schraube +item.itemRotorMaragingSteel300.name=Maraging-Stahl-300-Rotor +item.itemGearMaragingSteel300.name=Maraging-Stahl-300-Zahnrad +item.itemIngotMaragingSteel350.name=Maraging-Stahl-350-Barren +item.itemHotIngotMaragingSteel350.name=Hot Maraging-Stahl-350-Barren +item.itemDustMaragingSteel350.name=Maraging-Stahl-350-Staub +item.itemDustTinyMaragingSteel350.name=Winziges Häufchen Maraging-Stahl-350-Staub +item.itemDustSmallMaragingSteel350.name=Kleines Häufchen Maraging-Stahl-350-Staub +item.itemNuggetMaragingSteel350.name=Maraging-Stahl-350-Nugget +item.itemPlateMaragingSteel350.name=Maraging-Stahl-350-Platte +item.itemPlateDoubleMaragingSteel350.name=Doppelte Maraging-Stahl-350-Platte +item.itemBoltMaragingSteel350.name=Maraging-Stahl-350-Bolzen +item.itemRodMaragingSteel350.name=Maraging-Stahl-350-Stange +item.itemRodLongMaragingSteel350.name=Lange Maraging-Stahl-350-Stange +item.itemRingMaragingSteel350.name=Maraging-Stahl-350-Ring +item.itemScrewMaragingSteel350.name=Maraging-Stahl-350-Schraube +item.itemRotorMaragingSteel350.name=Maraging-Stahl-350-Rotor +item.itemGearMaragingSteel350.name=Maraging-Stahl-350-Zahnrad +item.itemIngotStellite.name=Stellite-Barren +item.itemHotIngotStellite.name=Hot Stellite-Barren +item.itemDustStellite.name=Stellite-Staub +item.itemDustTinyStellite.name=Winziges Häufchen Stellite-Staub +item.itemDustSmallStellite.name=Kleines Häufchen Stellite-Staub +item.itemNuggetStellite.name=Stellite-Nugget +item.itemPlateStellite.name=Stellite-Platte +item.itemPlateDoubleStellite.name=Doppelte Stellite-Platte +item.itemBoltStellite.name=Stellite-Bolzen +item.itemRodStellite.name=Stellite-Stange +item.itemRodLongStellite.name=Lange Stellite-Stange +item.itemRingStellite.name=Stellite-Ring +item.itemScrewStellite.name=Stellite-Schraube +item.itemRotorStellite.name=Stellite-Rotor +item.itemGearStellite.name=Stellite-Zahnrad +item.itemIngotTalonite.name=Talonite-Barren +item.itemDustTalonite.name=Talonite-Staub +item.itemDustTinyTalonite.name=Winziges Häufchen Talonite-Staub +item.itemDustSmallTalonite.name=Kleines Häufchen Talonite-Staub +item.itemNuggetTalonite.name=Talonite-Nugget +item.itemPlateTalonite.name=Talonite-Platte +item.itemPlateDoubleTalonite.name=Doppelte Talonite-Platte +item.itemBoltTalonite.name=Talonite-Bolzen +item.itemRodTalonite.name=Talonite-Stange +item.itemRodLongTalonite.name=Lange Talonite-Stange +item.itemRingTalonite.name=Talonite-Ring +item.itemScrewTalonite.name=Talonite-Schraube +item.itemRotorTalonite.name=Talonite-Rotor +item.itemGearTalonite.name=Talonite-Zahnrad +item.itemIngotHastelloyW.name=Hastelloy-W-Barren +item.itemDustHastelloyW.name=Hastelloy-W-Staub +item.itemDustTinyHastelloyW.name=Winziges Häufchen Hastelloy-W-Staub +item.itemDustSmallHastelloyW.name=Kleines Häufchen Hastelloy-W-Staub +item.itemNuggetHastelloyW.name=Hastelloy-W-Nugget +item.itemPlateHastelloyW.name=Hastelloy-W-Platte +item.itemPlateDoubleHastelloyW.name=Doppelte Hastelloy-W-Platte +item.itemBoltHastelloyW.name=Hastelloy-W-Bolzen +item.itemRodHastelloyW.name=Hastelloy-W-Stange +item.itemRodLongHastelloyW.name=Lange Hastelloy-W-Stange +item.itemRingHastelloyW.name=Hastelloy-W-Ring +item.itemScrewHastelloyW.name=Hastelloy-W-Schraube +item.itemRotorHastelloyW.name=Hastelloy-W-Rotor +item.itemGearHastelloyW.name=Hastelloy-W-Zahnrad +item.itemIngotHastelloyX.name=Hastelloy-X-Barren +item.itemDustHastelloyX.name=Hastelloy-X-Staub +item.itemDustTinyHastelloyX.name=Winziges Häufchen Hastelloy-X-Staub +item.itemDustSmallHastelloyX.name=Kleines Häufchen Hastelloy-X-Staub +item.itemNuggetHastelloyX.name=Hastelloy-X-Nugget +item.itemPlateHastelloyX.name=Hastelloy-X-Platte +item.itemPlateDoubleHastelloyX.name=Doppelte Hastelloy-X-Platte +item.itemBoltHastelloyX.name=Hastelloy-X-Bolzen +item.itemRodHastelloyX.name=Hastelloy-X-Stange +item.itemRodLongHastelloyX.name=Lange Hastelloy-X-Stange +item.itemRingHastelloyX.name=Hastelloy-X-Ring +item.itemScrewHastelloyX.name=Hastelloy-X-Schraube +item.itemRotorHastelloyX.name=Hastelloy-X-Rotor +item.itemGearHastelloyX.name=Hastelloy-X-Zahnrad +item.itemIngotHastelloyC276.name=Hastelloy-C276-Barren +item.itemHotIngotHastelloyC276.name=Hot Hastelloy-C276-Barren +item.itemDustHastelloyC276.name=Hastelloy-C276-Staub +item.itemDustTinyHastelloyC276.name=Winziges Häufchen Hastelloy-C276-Staub +item.itemDustSmallHastelloyC276.name=Kleines Häufchen Hastelloy-C276-Staub +item.itemNuggetHastelloyC276.name=Hastelloy-C276-Nugget +item.itemPlateHastelloyC276.name=Hastelloy-C276-Platte +item.itemPlateDoubleHastelloyC276.name=Doppelte Hastelloy-C276-Platte +item.itemBoltHastelloyC276.name=Hastelloy-C276-Bolzen +item.itemRodHastelloyC276.name=Hastelloy-C276-Stange +item.itemRodLongHastelloyC276.name=Lange Hastelloy-C276-Stange +item.itemRingHastelloyC276.name=Hastelloy-C276-Ring +item.itemScrewHastelloyC276.name=Hastelloy-C276-Schraube +item.itemRotorHastelloyC276.name=Hastelloy-C276-Rotor +item.itemGearHastelloyC276.name=Hastelloy-C276-Zahnrad +item.itemIngotHastelloyN.name=Hastelloy-N-Barren +item.itemHotIngotHastelloyN.name=Hot Hastelloy-N-Barren +item.itemDustHastelloyN.name=Hastelloy-N-Staub +item.itemDustTinyHastelloyN.name=Winziges Häufchen Hastelloy-N-Staub +item.itemDustSmallHastelloyN.name=Kleines Häufchen Hastelloy-N-Staub +item.itemNuggetHastelloyN.name=Hastelloy-N-Nugget +item.itemPlateHastelloyN.name=Hastelloy-N-Platte +item.itemPlateDoubleHastelloyN.name=Doppelte Hastelloy-N-Platte +item.itemBoltHastelloyN.name=Hastelloy-N-Bolzen +item.itemRodHastelloyN.name=Hastelloy-N-Stange +item.itemRodLongHastelloyN.name=Lange Hastelloy-N-Stange +item.itemRingHastelloyN.name=Hastelloy-N-Ring +item.itemScrewHastelloyN.name=Hastelloy-N-Schraube +item.itemRotorHastelloyN.name=Hastelloy-N-Rotor +item.itemGearHastelloyN.name=Hastelloy-N-Zahnrad +item.itemIngotIncoloy020.name=Incoloy-020-Barren +item.itemDustIncoloy020.name=Incoloy-020-Staub +item.itemDustTinyIncoloy020.name=Winziges Häufchen Incoloy-020-Staub +item.itemDustSmallIncoloy020.name=Kleines Häufchen Incoloy-020-Staub +item.itemNuggetIncoloy020.name=Incoloy-020-Nugget +item.itemPlateIncoloy020.name=Incoloy-020-Platte +item.itemPlateDoubleIncoloy020.name=Doppelte Incoloy-020-Platte +item.itemBoltIncoloy020.name=Incoloy-020-Bolzen +item.itemRodIncoloy020.name=Incoloy-020-Stange +item.itemRodLongIncoloy020.name=Lange Incoloy-020-Stange +item.itemRingIncoloy020.name=Incoloy-020-Ring +item.itemScrewIncoloy020.name=Incoloy-020-Schraube +item.itemRotorIncoloy020.name=Incoloy-020-Rotor +item.itemGearIncoloy020.name=Incoloy-020-Zahnrad +item.itemIngotIncoloyDS.name=Incoloy-DS-Barren +item.itemDustIncoloyDS.name=Incoloy-DS-Staub +item.itemDustTinyIncoloyDS.name=Winziges Häufchen Incoloy-DS-Staub +item.itemDustSmallIncoloyDS.name=Kleines Häufchen Incoloy-DS-Staub +item.itemNuggetIncoloyDS.name=Incoloy-DS-Nugget +item.itemPlateIncoloyDS.name=Incoloy-DS-Platte +item.itemPlateDoubleIncoloyDS.name=Doppelte Incoloy-DS-Platte +item.itemBoltIncoloyDS.name=Incoloy-DS-Bolzen +item.itemRodIncoloyDS.name=Incoloy-DS-Stange +item.itemRodLongIncoloyDS.name=Lange Incoloy-DS-Stange +item.itemRingIncoloyDS.name=Incoloy-DS-Ring +item.itemScrewIncoloyDS.name=Incoloy-DS-Schraube +item.itemRotorIncoloyDS.name=Incoloy-DS-Rotor +item.itemGearIncoloyDS.name=Incoloy-DS-Zahnrad +item.itemIngotIncoloyMA956.name=Incoloy-MA956-Barren +item.itemHotIngotIncoloyMA956.name=Hot Incoloy-MA956-Barren +item.itemDustIncoloyMA956.name=Incoloy-MA956-Staub +item.itemDustTinyIncoloyMA956.name=Winziges Häufchen Incoloy-MA956-Staub +item.itemDustSmallIncoloyMA956.name=Kleines Häufchen Incoloy-MA956-Staub +item.itemNuggetIncoloyMA956.name=Incoloy-MA956-Nugget +item.itemPlateIncoloyMA956.name=Incoloy-MA956-Platte +item.itemPlateDoubleIncoloyMA956.name=Doppelte Incoloy-MA956-Platte +item.itemBoltIncoloyMA956.name=Incoloy-MA956-Bolzen +item.itemRodIncoloyMA956.name=Incoloy-MA956-Stange +item.itemRodLongIncoloyMA956.name=Lange Incoloy-MA956-Stange +item.itemRingIncoloyMA956.name=Incoloy-MA956-Ring +item.itemScrewIncoloyMA956.name=Incoloy-MA956-Schraube +item.itemRotorIncoloyMA956.name=Incoloy-MA956-Rotor +item.itemGearIncoloyMA956.name=Incoloy-MA956-Zahnrad +item.itemIngotGrisium.name=Grisium-Barren +item.itemHotIngotGrisium.name=Hot Grisium-Barren +item.itemDustGrisium.name=Grisium-Staub +item.itemDustTinyGrisium.name=Winziges Häufchen Grisium-Staub +item.itemDustSmallGrisium.name=Kleines Häufchen Grisium-Staub +item.itemNuggetGrisium.name=Grisium-Nugget +item.itemPlateGrisium.name=Grisium-Platte +item.itemPlateDoubleGrisium.name=Doppelte Grisium-Platte +item.itemBoltGrisium.name=Grisium-Bolzen +item.itemRodGrisium.name=Grisium-Stange +item.itemRodLongGrisium.name=Lange Grisium-Stange +item.itemRingGrisium.name=Grisium-Ring +item.itemScrewGrisium.name=Grisium-Schraube +item.itemRotorGrisium.name=Grisium-Rotor +item.itemGearGrisium.name=Grisium-Zahnrad +item.itemIngotHG1223.name=HG-1223-Barren +item.itemDustHG1223.name=HG-1223-Staub +item.itemDustTinyHG1223.name=Winziges Häufchen HG-1223-Staub +item.itemDustSmallHG1223.name=Kleines Häufchen HG-1223-Staub +item.itemNuggetHG1223.name=HG-1223-Nugget +item.itemPlateHG1223.name=HG-1223-Platte +item.itemPlateDoubleHG1223.name=Doppelte HG-1223-Platte +item.itemIngotTrinium.name=Trinium-Barren +item.itemDustTrinium.name=Trinium-Staub +item.itemDustTinyTrinium.name=Winziges Häufchen Trinium-Staub +item.itemDustSmallTrinium.name=Kleines Häufchen Trinium-Staub +item.itemNuggetTrinium.name=Trinium-Nugget +item.itemPlateTrinium.name=Trinium-Platte +item.itemPlateDoubleTrinium.name=Doppelte Trinium-Platte +item.itemIngotRefinedTrinium.name=Raffinierter Trinium-Barren +item.itemDustRefinedTrinium.name=Raffinierter Trinium-Staub +item.itemDustTinyRefinedTrinium.name=Winziges Häufchen raffinierter Trinium-Staub +item.itemDustSmallRefinedTrinium.name=Kleines Häufchen raffinierter Trinium-Staub +item.itemNuggetRefinedTrinium.name=Raffinierter Trinium-Nugget +item.itemPlateRefinedTrinium.name=Raffinierte Trinium-Platte +item.itemPlateDoubleRefinedTrinium.name=Doppelte raffinierte Trinium-Platte +item.itemIngotTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Barren +item.itemHotIngotTriniumTitaniumAlloy.name=Hot Trinium-Titanium-Legierung-Barren +item.itemDustTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Staub +item.itemDustTinyTriniumTitaniumAlloy.name=Winziges Häufchen Trinium-Titanium-Legierung-Staub +item.itemDustSmallTriniumTitaniumAlloy.name=Kleines Häufchen Trinium-Titanium-Legierung-Staub +item.itemNuggetTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Nugget +item.itemPlateTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Platte +item.itemPlateDoubleTriniumTitaniumAlloy.name=Doppelte Trinium-Titanium-Legierung-Platte +item.itemBoltTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Bolzen +item.itemRodTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Stange +item.itemRodLongTriniumTitaniumAlloy.name=Lange Trinium-Titanium-Legierung-Stange +item.itemRingTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Ring +item.itemScrewTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Schraube +item.itemRotorTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Rotor +item.itemGearTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Zahnrad +item.itemIngotTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Barren +item.itemDustTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Staub +item.itemDustTinyTriniumNaquadahAlloy.name=Winziges Häufchen Trinium-Naquadah-Legierung-Staub +item.itemDustSmallTriniumNaquadahAlloy.name=Kleines Häufchen Trinium-Naquadah-Legierung-Staub +item.itemNuggetTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Nugget +item.itemPlateTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Platte +item.itemPlateDoubleTriniumNaquadahAlloy.name=Doppelte Trinium-Naquadah-Legierung-Platte +item.itemIngotTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Barren +item.itemHotIngotTriniumNaquadahCarbonite.name=Hot Trinium-Naquadah-Carbonit-Barren +item.itemDustTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Staub +item.itemDustTinyTriniumNaquadahCarbonite.name=Winziges Häufchen Trinium-Naquadah-Carbonit-Staub +item.itemDustSmallTriniumNaquadahCarbonite.name=Kleines Häufchen Trinium-Naquadah-Carbonit-Staub +item.itemNuggetTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Nugget +item.itemPlateTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Platte +item.itemPlateDoubleTriniumNaquadahCarbonite.name=Doppelte Trinium-Naquadah-Carbonit-Platte +item.itemBoltTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Bolzen +item.itemRodTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Stange +item.itemRodLongTriniumNaquadahCarbonite.name=Lange Trinium-Naquadah-Carbonit-Stange +item.itemRingTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Ring +item.itemScrewTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Schraube +item.itemRotorTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Rotor +item.itemGearTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Zahnrad +item.itemIngotQuantum.name=Quanten-Barren +item.itemHotIngotQuantum.name=Hot Quanten-Barren +item.itemDustQuantum.name=Quanten-Staub +item.itemDustTinyQuantum.name=Winziges Häufchen Quanten-Staub +item.itemDustSmallQuantum.name=Kleines Häufchen Quanten-Staub +item.itemNuggetQuantum.name=Quanten-Nugget +item.itemPlateQuantum.name=Quanten-Platte +item.itemPlateDoubleQuantum.name=Doppelte Quanten-Platte +item.itemBoltQuantum.name=Quanten-Bolzen +item.itemRodQuantum.name=Quanten-Stange +item.itemRodLongQuantum.name=Lange Quanten-Stange +item.itemRingQuantum.name=Quanten-Ring +item.itemScrewQuantum.name=Quanten-Schraube +item.itemRotorQuantum.name=Quanten-Rotor +item.itemGearQuantum.name=Quanten-Zahnrad +item.itemDustFluorite.name=Fluorit-Staub +item.itemDustTinyFluorite.name=Winziges Häufchen Fluorit-Staub +item.itemDustSmallFluorite.name=Kleines Häufchen Fluorit-Staub +item.crushedFluorite.name=Zerkleinertes Fluorit-Erz +item.crushedCentrifugedFluorite.name=Zentrifugiertes zerkleinertes Fluorit-Erz +item.crushedPurifiedFluorite.name=Gereinigtes zerkleinertes Fluorit-Erz +item.dustImpureFluorite.name=Ungereinigtes Fluorit-Staub +item.dustPureFluorite.name=Gereinigtes Fluorit-Staub +item.itemDustCrocoite.name=Crocoit-Staub +item.itemDustTinyCrocoite.name=Winziges Häufchen Crocoit-Staub +item.itemDustSmallCrocoite.name=Kleines Häufchen Crocoit-Staub +item.crushedCrocoite.name=Zerkleinertes Crocoit-Erz +item.crushedCentrifugedCrocoite.name=Zentrifugiertes zerkleinertes Crocoit-Erz +item.crushedPurifiedCrocoite.name=Gereinigtes zerkleinertes Crocoit-Erz +item.dustImpureCrocoite.name=Ungereinigtes Crocoit-Staub +item.dustPureCrocoite.name=Gereinigtes Crocoit-Staub +item.itemDustGeikielite.name=Geikielite-Staub +item.itemDustTinyGeikielite.name=Winziges Häufchen Geikielite-Staub +item.itemDustSmallGeikielite.name=Kleines Häufchen Geikielite-Staub +item.crushedGeikielite.name=Zerkleinertes Geikielite-Erz +item.crushedCentrifugedGeikielite.name=Zentrifugiertes zerkleinertes Geikielite-Erz +item.crushedPurifiedGeikielite.name=Gereinigtes zerkleinertes Geikielite-Erz +item.dustImpureGeikielite.name=Ungereinigtes Geikielite-Staub +item.dustPureGeikielite.name=Gereinigtes Geikielite-Staub +item.itemDustNichromite.name=Nichromit-Staub +item.itemDustTinyNichromite.name=Winziges Häufchen Nichromit-Staub +item.itemDustSmallNichromite.name=Kleines Häufchen Nichromit-Staub +item.crushedNichromite.name=Zerkleinertes Nichromit-Erz +item.crushedCentrifugedNichromite.name=Zentrifugiertes zerkleinertes Nichromit-Erz +item.crushedPurifiedNichromite.name=Gereinigtes zerkleinertes Nichromit-Erz +item.dustImpureNichromite.name=Ungereinigtes Nichromit-Staub +item.dustPureNichromite.name=Gereinigtes Nichromit-Staub +item.itemDustTitanite.name=Titanit-Staub +item.itemDustTinyTitanite.name=Winziges Häufchen Titanit-Staub +item.itemDustSmallTitanite.name=Kleines Häufchen Titanit-Staub +item.crushedTitanite.name=Zerkleinertes Titanit-Erz +item.crushedCentrifugedTitanite.name=Zentrifugiertes zerkleinertes Titanit-Erz +item.crushedPurifiedTitanite.name=Gereinigtes zerkleinertes Titanit-Erz +item.dustImpureTitanite.name=Ungereinigtes Titanit-Staub +item.dustPureTitanite.name=Gereinigtes Titanit-Staub +item.itemDustZimbabweite.name=Zimbabweit-Staub +item.itemDustTinyZimbabweite.name=Winziges Häufchen Zimbabweit-Staub +item.itemDustSmallZimbabweite.name=Kleines Häufchen Zimbabweit-Staub +item.crushedZimbabweite.name=Zerkleinertes Zimbabweit-Erz +item.crushedCentrifugedZimbabweite.name=Zentrifugiertes zerkleinertes Zimbabweit-Erz +item.crushedPurifiedZimbabweite.name=Gereinigtes zerkleinertes Zimbabweit-Erz +item.dustImpureZimbabweite.name=Ungereinigtes Zimbabweit-Staub +item.dustPureZimbabweite.name=Gereinigtes Zimbabweit-Staub +item.itemDustZirconolite.name=Zirkonolit-Staub +item.itemDustTinyZirconolite.name=Winziges Häufchen Zirkonolit-Staub +item.itemDustSmallZirconolite.name=Kleines Häufchen Zirkonolit-Staub +item.crushedZirconolite.name=Zerkleinertes Zirkonolit-Erz +item.crushedCentrifugedZirconolite.name=Zentrifugiertes zerkleinertes Zirkonolit-Erz +item.crushedPurifiedZirconolite.name=Gereinigtes zerkleinertes Zirkonolit-Erz +item.dustImpureZirconolite.name=Ungereinigter Zirkonolit-Staub +item.dustPureZirconolite.name=Gereinigter Zirkonolit-Staub +item.itemDustGadoliniteCe.name=Gadolinit(Ce)-Staub +item.itemDustTinyGadoliniteCe.name=Winziges Häufchen Gadolinit(Ce)-Staub +item.itemDustSmallGadoliniteCe.name=Kleines Häufchen Gadolinit(Ce)-Staub +item.crushedGadoliniteCe.name=Zerkleinertes Gadolinit(Ce)-Erz +item.crushedCentrifugedGadoliniteCe.name=Zentrifugiertes zerkleinertes Gadolinit(Ce)-Erz +item.crushedPurifiedGadoliniteCe.name=Gereinigtes zerkleinertes Gadolinit(Ce)-Erz +item.dustImpureGadoliniteCe.name=Ungereinigter Gadolinit(Ce)-Staub +item.dustPureGadoliniteCe.name=Gereinigter Gadolinit(Ce)-Staub +item.itemDustGadoliniteY.name=Gadolinit(Y)-Staub +item.itemDustTinyGadoliniteY.name=Winziges Häufchen Gadolinit(Y)-Staub +item.itemDustSmallGadoliniteY.name=Kleines Häufchen Gadolinit(Y)-Staub +item.crushedGadoliniteY.name=Zerkleinertes Gadolinit(Y)-Erz +item.crushedCentrifugedGadoliniteY.name=Zentrifugiertes zerkleinertes Gadolinit(Y)-Erz +item.crushedPurifiedGadoliniteY.name=Gereinigtes zerkleinertes Gadolinit(Y)-Erz +item.dustImpureGadoliniteY.name=Ungereinigter Gadolinit(Y)-Staub +item.dustPureGadoliniteY.name=Gereinigter Gadolinit(Y)-Staub +item.itemDustLepersonnite.name=Lepersonnit-Staub +item.itemDustTinyLepersonnite.name=Winziges Häufchen Lepersonnite-Staub +item.itemDustSmallLepersonnite.name=Kleines Häufchen Lepersonnite-Staub +item.crushedLepersonnite.name=Zerkleinertes Lepersonnite-Erz +item.crushedCentrifugedLepersonnite.name=Zentrifugiertes zerkleinertes Lepersonnite-Erz +item.crushedPurifiedLepersonnite.name=Gereinigtes zerkleinertes Lepersonnite-Erz +item.dustImpureLepersonnite.name=Ungereinigter Lepersonnite-Staub +item.dustPureLepersonnite.name=Gereinigter Lepersonnite-Staub +item.itemDustSamarskiteY.name=Samarsikt(Y)-Staub +item.itemDustTinySamarskiteY.name=Winziges Häufchen Samarsikt(Y)-Staub +item.itemDustSmallSamarskiteY.name=Kleines Häufchen Samarsikt(Y)-Staub +item.crushedSamarskiteY.name=Zerkleinertes Samarsikt(Y)-Erz +item.crushedCentrifugedSamarskiteY.name=Zentrifugiertes zerkleinertes Samarsikt(Y)-Erz +item.crushedPurifiedSamarskiteY.name=Gereinigtes zerkleinertes Samarsikt(Y)-Erz +item.dustImpureSamarskiteY.name=Ungereinigter Samarsikt(Y)-Staub +item.dustPureSamarskiteY.name=Gereinigter Samarsikt(Y)-Staub +item.itemDustSamarskiteYb.name=Samarsikt(Yb)-Staub +item.itemDustTinySamarskiteYb.name=Winziges Häufchen Samarsikt(Yb)-Staub +item.itemDustSmallSamarskiteYb.name=Kleines Häufchen Samarsikt(Yb)-Staub +item.crushedSamarskiteYb.name=Zerkleinertes Samarsikt(Yb)-Erz +item.crushedCentrifugedSamarskiteYb.name=Zentrifugiertes zerkleinertes Samarsikt(Yb)-Erz +item.crushedPurifiedSamarskiteYb.name=Gereinigtes zerkleinertes Samarsikt(Yb)-Erz +item.dustImpureSamarskiteYb.name=Ungereinigter Samarsikt(Yb)-Staub +item.dustPureSamarskiteYb.name=Gereinigter Samarsikt(Yb)-Staub +item.itemDustXenotime.name=Xenotime-Staub +item.itemDustTinyXenotime.name=Winziges Häufchen Xenotime-Staub +item.itemDustSmallXenotime.name=Kleines Häufchen Xenotime-Staub +item.crushedXenotime.name=Zerkleinertes Xenotime-Erz +item.crushedCentrifugedXenotime.name=Zentrifugiertes zerkleinertes Xenotime-Erz +item.crushedPurifiedXenotime.name=Gereinigtes zerkleinertes Xenotime-Erz +item.dustImpureXenotime.name=Ungereinigter Xenotime-Staub +item.dustPureXenotime.name=Gereinigter Xenotime-Staub +item.itemDustYttriaite.name=Yttriait-Staub +item.itemDustTinyYttriaite.name=Winziges Häufchen Yttriait-Staub +item.itemDustSmallYttriaite.name=Kleines Häufchen Yttriait-Staub +item.crushedYttriaite.name=Zerkleinertes Yttriait-Erz +item.crushedCentrifugedYttriaite.name=Zentrifugiertes zerkleinertes Yttriait-Erz +item.crushedPurifiedYttriaite.name=Gereinigtes zerkleinertes Yttriait-Erz +item.dustImpureYttriaite.name=Ungereinigter Yttriait-Staub +item.dustPureYttriaite.name=Gereinigter Yttriait-Staub +item.itemDustYttrialite.name=Yttrialit-Staub +item.itemDustTinyYttrialite.name=Winziges Häufchen Yttrialit-Staub +item.itemDustSmallYttrialite.name=Kleines Häufchen Yttrialit-Staub +item.crushedYttrialite.name=Zerkleinertes Yttrialit-Erz +item.crushedCentrifugedYttrialite.name=Zentrifugiertes zerkleinertes Yttrialit-Erz +item.crushedPurifiedYttrialite.name=Gereinigtes zerkleinertes Yttrialit-Erz +item.dustImpureYttrialite.name=Ungereinigter Yttrialit-Staub +item.dustPureYttrialite.name=Gereinigter Yttrialit-Staub +item.itemDustYttrocerite.name=Yttrocerite-Staub +item.itemDustTinyYttrocerite.name=Winziges Häufchen Yttrocerite-Staub +item.itemDustSmallYttrocerite.name=Kleines Häufchen Yttrocerite-Staub +item.crushedYttrocerite.name=Zerkleinertes Yttrocerite-Erz +item.crushedCentrifugedYttrocerite.name=Zentrifugiertes zerkleinertes Yttrocerite-Erz +item.crushedPurifiedYttrocerite.name=Gereinigtes zerkleinertes Yttrocerite-Erz +item.dustImpureYttrocerite.name=Ungereinigter Yttrocerite-Staub +item.dustPureYttrocerite.name=Gereinigter Yttrocerite-Staub +item.itemDustZircon.name=Zirkon-Staub +item.itemDustTinyZircon.name=Winziges Häufchen Zirkon-Staub +item.itemDustSmallZircon.name=Kleines Häufchen Zirkon-Staub +item.crushedZircon.name=Zerkleinertes Zirkon-Erz +item.crushedCentrifugedZircon.name=Zentrifugiertes zerkleinertes Zirkon-Erz +item.crushedPurifiedZircon.name=Gereinigtes zerkleinertes Zirkon-Erz +item.dustImpureZircon.name=Ungereinigter Zirkon-Staub +item.dustPureZircon.name=Gereinigter Zirkon-Staub +item.itemDustPolycrase.name=Polycrase-Staub +item.itemDustTinyPolycrase.name=Winziges Häufchen Polycrase-Staub +item.itemDustSmallPolycrase.name=Kleines Häufchen Polycrase-Staub +item.crushedPolycrase.name=Zerkleinertes Polycrase-Erz +item.crushedCentrifugedPolycrase.name=Zentrifugiertes zerkleinertes Polycrase-Erz +item.crushedPurifiedPolycrase.name=Gereinigtes zerkleinertes Polycrase-Erz +item.dustImpurePolycrase.name=Ungereinigter Polycrase-Staub +item.dustPurePolycrase.name=Gereinigter Polycrase-Staub +item.itemDustZircophyllite.name=Zirkophyllit-Staub +item.itemDustTinyZircophyllite.name=Winziges Häufchen Zirkophyllit-Staub +item.itemDustSmallZircophyllite.name=Kleines Häufchen Zirkophyllit-Staub +item.crushedZircophyllite.name=Zerkleinertes Zirkophyllit-Erz +item.crushedCentrifugedZircophyllite.name=Zentrifugiertes zerkleinertes Zirkophyllit-Erz +item.crushedPurifiedZircophyllite.name=Gereinigtes zerkleinertes Zirkophyllit-Erz +item.dustImpureZircophyllite.name=Ungereinigter Zirkophyllit-Staub +item.dustPureZircophyllite.name=Gereinigter Zirkophyllit-Staub +item.itemDustZirkelite.name=Zirkelit-Staub +item.itemDustTinyZirkelite.name=Winziges Häufchen Zirkelit-Staub +item.itemDustSmallZirkelite.name=Kleines Häufchen Zirkelit-Staub +item.crushedZirkelite.name=Zerkleinertes Zirkelit-Erz +item.crushedCentrifugedZirkelite.name=Zentrifugiertes zerkleinertes Zirkelit-Erz +item.crushedPurifiedZirkelite.name=Gereinigtes zerkleinertes Zirkelit-Erz +item.dustImpureZirkelite.name=Ungereinigter Zirkelit-Staub +item.dustPureZirkelite.name=Gereinigter Zirkelit-Staub +item.itemDustLanthaniteLa.name=Lanthanit(La)-Staub +item.itemDustTinyLanthaniteLa.name=Winziges Häufchen Lanthanit(La)-Staub +item.itemDustSmallLanthaniteLa.name=Kleines Häufchen Lanthanit(La)-Staub +item.crushedLanthaniteLa.name=Zerkleinertes Lanthanit(La)-Erz +item.crushedCentrifugedLanthaniteLa.name=Zentrifugiertes zerkleinertes Lanthanit(La)-Erz +item.crushedPurifiedLanthaniteLa.name=Gereinigtes zerkleinertes Lanthanit(La)-Erz +item.dustImpureLanthaniteLa.name=Ungereinigter Lanthanit(La)-Staub +item.dustPureLanthaniteLa.name=Gereinigter Lanthanit(La)-Staub +item.itemDustLanthaniteCe.name=Lanthanit(Ce)-Staub +item.itemDustTinyLanthaniteCe.name=Winziges Häufchen Lanthanit(Ce)-Staub +item.itemDustSmallLanthaniteCe.name=Kleines Häufchen Lanthanit(Ce)-Staub +item.crushedLanthaniteCe.name=Zerkleinertes Lanthanit(Ce)-Erz +item.crushedCentrifugedLanthaniteCe.name=Zentrifugiertes zerkleinertes Lanthanit(Ce)-Erz +item.crushedPurifiedLanthaniteCe.name=Gereinigtes zerkleinertes Lanthanit(Ce)-Erz +item.dustImpureLanthaniteCe.name=Ungereinigter Lanthanit(Ce)-Staub +item.dustPureLanthaniteCe.name=Gereinigter Lanthanit(Ce)-Staub +item.itemDustLanthaniteNd.name=Lanthanit(Nd)-Staub +item.itemDustTinyLanthaniteNd.name=Winziges Häufchen Lanthanit(Nd)-Staub +item.itemDustSmallLanthaniteNd.name=Kleines Häufchen Lanthanit(Nd)-Staub +item.crushedLanthaniteNd.name=Zerkleinertes Lanthanit(Nd)-Erz +item.crushedCentrifugedLanthaniteNd.name=Zentrifugiertes zerkleinertes Lanthanit(Nd)-Erz +item.crushedPurifiedLanthaniteNd.name=Gereinigtes zerkleinertes Lanthanit(Nd)-Erz +item.dustImpureLanthaniteNd.name=Ungereinigter Lanthanit(Nd)-Staub +item.dustPureLanthaniteNd.name=Gereinigter Lanthanit(Nd)-Staub +item.itemDustAgarditeY.name=Agardit(Y)-Staub +item.itemDustTinyAgarditeY.name=Winziges Häufchen Agardit(Y)-Staub +item.itemDustSmallAgarditeY.name=Kleines Häufchen Agardit(Y)-Staub +item.crushedAgarditeY.name=Zerkleinertes Agardit(Y)-Erz +item.crushedCentrifugedAgarditeY.name=Zentrifugiertes zerkleinertes Agardit(Y)-Erz +item.crushedPurifiedAgarditeY.name=Gereinigtes zerkleinertes Agardit(Y)-Erz +item.dustImpureAgarditeY.name=Ungereinigter Agardit(Y)-Staub +item.dustPureAgarditeY.name=Gereinigter Agardit(Y)-Staub +item.itemDustAgarditeCd.name=Agardit(Cd)-Staub +item.itemDustTinyAgarditeCd.name=Winziges Häufchen Agardit(Cd)-Staub +item.itemDustSmallAgarditeCd.name=Kleines Häufchen Agardit(Cd)-Staub +item.crushedAgarditeCd.name=Zerkleinertes Agardit(Cd)-Erz +item.crushedCentrifugedAgarditeCd.name=Zentrifugiertes zerkleinertes Agardit(Cd)-Erz +item.crushedPurifiedAgarditeCd.name=Gereinigtes zerkleinertes Agardit(Cd)-Erz +item.dustImpureAgarditeCd.name=Ungereinigter Agardit(Cd)-Staub +item.dustPureAgarditeCd.name=Gereinigter Agardit(Cd)-Staub +item.itemDustAgarditeLa.name=Agardit(La)-Staub +item.itemDustTinyAgarditeLa.name=Winziges Häufchen Agardit(La)-Staub +item.itemDustSmallAgarditeLa.name=Kleines Häufchen Agardit(La)-Staub +item.crushedAgarditeLa.name=Zerkleinertes Agardit(La)-Erz +item.crushedCentrifugedAgarditeLa.name=Zentrifugiertes zerkleinertes Agardit(La)-Erz +item.crushedPurifiedAgarditeLa.name=Gereinigtes zerkleinertes Agardit(La)-Erz +item.dustImpureAgarditeLa.name=Ungereinigter Agardit(La)-Staub +item.dustPureAgarditeLa.name=Gereinigter Agardit(La)-Staub +item.itemDustAgarditeNd.name=Agardit(Nd)-Staub +item.itemDustTinyAgarditeNd.name=Winziges Häufchen Agardit(Nd)-Staub +item.itemDustSmallAgarditeNd.name=Kleines Häufchen Agardit(Nd)-Staub +item.crushedAgarditeNd.name=Zerkleinertes Agardit(Nd)-Erz +item.crushedCentrifugedAgarditeNd.name=Zentrifugiertes zerkleinertes Agardit(Nd)-Erz +item.crushedPurifiedAgarditeNd.name=Gereinigtes zerkleinertes Agardit(Nd)-Erz +item.dustImpureAgarditeNd.name=Ungereinigter Agardit(Nd)-Staub +item.dustPureAgarditeNd.name=Gereinigter Agardit(Nd)-Staub +item.itemDustHibonite.name=Hibonit-Staub +item.itemDustTinyHibonite.name=Winziges Häufchen Hibonit-Staub +item.itemDustSmallHibonite.name=Kleines Häufchen Hibonit-Staub +item.crushedHibonite.name=Zerkleinertes Hibonit-Erz +item.crushedCentrifugedHibonite.name=Zentrifugiertes zerkleinertes Hibonit-Erz +item.crushedPurifiedHibonite.name=Gereinigtes zerkleinertes Hibonit-Erz +item.dustImpureHibonite.name=Ungereinigter Hibonit-Staub +item.dustPureHibonite.name=Gereinigter Hibonit-Staub +item.itemDustCerite.name=Cerit-Staub +item.itemDustTinyCerite.name=Winziges Häufchen Cerit-Staub +item.itemDustSmallCerite.name=Kleines Häufchen Cerit-Staub +item.crushedCerite.name=Zerkleinertes Cerit-Erz +item.crushedCentrifugedCerite.name=Zentrifugiertes zerkleinertes Cerit-Erz +item.crushedPurifiedCerite.name=Gereinigtes zerkleinertes Cerit-Erz +item.dustImpureCerite.name=Ungereinigter Cerit-Staub +item.dustPureCerite.name=Gereinigter Cerit-Staub +item.itemDustFluorcaphite.name=Fluorcaphit-Staub +item.itemDustTinyFluorcaphite.name=Winziges Häufchen Fluorcaphit-Staub +item.itemDustSmallFluorcaphite.name=Kleines Häufchen Fluorcaphit-Staub +item.crushedFluorcaphite.name=Zerkleinertes Fluorcaphit-Erz +item.crushedCentrifugedFluorcaphite.name=Zentrifugiertes zerkleinertes Fluorcaphit-Erz +item.crushedPurifiedFluorcaphite.name=Gereinigtes zerkleinertes Fluorcaphit-Erz +item.dustImpureFluorcaphite.name=Ungereinigter Fluorcaphit-Staub +item.dustPureFluorcaphite.name=Gereinigter Fluorcaphit-Staub +item.itemDustFlorencite.name=Florencit-Staub +item.itemDustTinyFlorencite.name=Winziges Häufchen Florencit-Staub +item.itemDustSmallFlorencite.name=Kleines Häufchen Florencit-Staub +item.crushedFlorencite.name=Zerkleinertes Florencit-Erz +item.crushedCentrifugedFlorencite.name=Zentrifugiertes zerkleinertes Florencit-Erz +item.crushedPurifiedFlorencite.name=Gereinigtes zerkleinertes Florencit-Erz +item.dustImpureFlorencite.name=Ungereinigter Florencit-Staub +item.dustPureFlorencite.name=Gereinigter Florencit-Staub +item.itemDustCryolite.name=Cryolit-Staub +item.itemDustTinyCryolite.name=Winziges Häufchen Cryolit-Staub +item.itemDustSmallCryolite.name=Kleines Häufchen Cryolit-Staub +item.crushedCryolite.name=Zerkleinertes Cryolit-Erz +item.crushedCentrifugedCryolite.name=Zentrifugiertes zerkleinertes Cryolit-Erz +item.crushedPurifiedCryolite.name=Gereinigtes zerkleinertes Cryolit-Erz +item.dustImpureCryolite.name=Ungereinigter Cryolit-Staub +item.dustPureCryolite.name=Gereinigter Cryolit-Staub + +//Shards +item.itemDrained.name=Erschöpfte Scherbe +item.itemDustInfusedAir.name=Infundierter Luftstaub +item.itemDustInfusedFire.name=Infundierter Feuerstaub +item.itemDustInfusedEarth.name=Infundierter Erdstaub +item.itemDustInfusedWater.name=Infundierter Wasserstaub + + +//Misc Material Items +item.itemDustLithiumCarbonate.name=Lithium-Karbonat-Staub +item.itemDustSmallLithiumCarbonate.name=Kleines Häufchen Lithium-Karbonat-Staub +item.itemDustTinyLithiumCarbonate.name=Winziges Häufchen Lithium-Karbonat-Staub +item.itemDustLithiumPeroxide.name=Lithium-Peroxid-Staub +item.itemDustSmallLithiumPeroxide.name=Kleines Häufchen Lithium-Peroxid-Staub +item.itemDustTinyLithiumPeroxide.name=Winziges Häufchen Lithium-Peroxid-Staub +item.itemDustLithiumHydroxide.name=Lithium-Hydroxid-Staub +item.itemDustSmallLithiumHydroxide.name=Kleines Häufchen Lithium-Hydroxid-Staub +item.itemDustTinyLithiumHydroxide.name=Winziges Häufchen Lithium-Hydroxid-Staub +item.itemDustCalciumHydroxide.name=Kalkhydrat-Staub +item.itemDustSmallCalciumHydroxide.name=Kleines Häufchen Kalkhydrat-Staub +item.itemDustTinyCalciumHydroxide.name=Winziges Häufchen Kalkhydrat-Staub +item.itemDustCalciumCarbonate.name=Calcium-Karbonat-Staub +item.itemDustSmallCalciumCarbonate.name=Kleines Häufchen Calcium-Karbonat-Staub +item.itemDustTinyCalciumCarbonate.name=Winziges Häufchen Calcium-Karbonat-Staub +item.itemDustGypsum.name=Calcium-Sulfat(Gypsum)-Staub +item.itemDustSmallGypsum.name=Kleines Häufchen Calcium-Sulfat(Gypsum)-Staub +item.itemDustTinyGypsum.name=Winziges Häufchen Calcium-Sulfat(Gypsum)-Staub +item.itemDustLi2CO3CaOH2.name=Li2CO3 + Ca(OH)2 Komposit-Staub +item.itemDustSmallLi2CO3CaOH2.name=Kleines Häufchen Li2CO3 + Ca(OH)2 Komposit-Staub +item.itemDustTinyLi2CO3CaOH2.name=Winziges Häufchen Li2CO3 + Ca(OH)2 Komposit-Staub +item.itemDustLi2BeF4.name=Li2BeF4 Treibstoff-Komposit-Staub +item.itemDustSmallLi2BeF4.name=Kleines Häufchen Li2BeF4 Treibstoff-Komposit-Staub +item.itemDustTinyLi2BeF4.name=Winziges Häufchen Li2BeF4 Treibstoff-Komposit-Staub +item.Li2BeF4.name=Li2BeF4-Zelle +item.itemCircuitLFTR.name=§aThorium Reaktorkontrollschaltung +item.itemZirconiumPellet.name=Zirkonium-Pellet [ZrClâ‚„] +item.itemDustZrCl4.name=ZrCl4-Staub +item.itemDustSmallZrCl4.name=Kleines Häufchen ZrCl4-Staub +item.itemDustTinyZrCl4.name=Winziges Häufchen ZrCl4-Staub +item.itemDustCookedZrCl4.name=gebrannter ZrCl4-Staub +item.itemDustSmallCookedZrCl4.name=Kleines Häufchen gebrannter ZrCl4-Staub +item.itemDustTinyCookedZrCl4.name=Winziges Häufchen gebrannter ZrCl4-Staub +item.itemDustUN18Fertiliser.name=UN-18 Dünger-Staub +item.itemDustSmallUN18Fertiliser.name=Kleines Häufchen UN-18 Dünger-Staub +item.itemDustTinyUN18Fertiliser.name=Winziges Häufchen UN-18 Dünger-Staub +item.itemDustUN32Fertiliser.name=UN-32 Dünger-Staub +item.itemDustSmallUN32Fertiliser.name=Kleines Häufchen UN-32 Dünger-Staub +item.itemDustTinyUN32Fertiliser.name=Winziges Häufchen UN-32 Dünger-Staub + +//Multitools +item.AluminiumMultipick.name=Aluminium-Multi-Spitzhacke +item.AluminiumMultispade.name=Aluminium-Multi-Schaufel +item.BerylliumMultispade.name=Beryllium-Multi-Schaufel +item.BismuthMultispade.name=Bismuth-Multi-Schaufel +item.CarbonMultispade.name=Karbon-Multi-Schaufel +item.ChromeMultipick.name=Chrom-Multi-Spitzhacke +item.ChromeMultispade.name=Chrom-Multi-Schaufel +item.CobaltMultipick.name=Kobalt-Multi-Spitzhacke +item.CobaltMultispade.name=Kobalt-Multi-Schaufel +item.GoldMultispade.name=Gold-Multi-Schaufel +item.IridiumMultipick.name=Iridium-Multi-Spitzhacke +item.IridiumMultispade.name=Iridium-Multi-Schaufel +item.IronMultipick.name=Eisen-Multi-Spitzhacke +item.IronMultispade.name=Eisen-Multi-Schaufel +item.LeadMultispade.name=Blei-Multi-Schaufel +item.ManganeseMultipick.name=Mangan-Multi-Spitzhacke +item.ManganeseMultispade.name=Mangan-Multi-Schaufel +item.MolybdenumMultipick.name=Molybdän-Multi-Spitzhacke +item.MolybdenumMultispade.name=Molybdän-Multi-Schaufel +item.NeodymiumMultipick.name=Neodym-Multi-Spitzhacke +item.NeodymiumMultispade.name=Neodym-Multi-Schaufel +item.NeutroniumMultipick.name=Neutronium-Multi-Spitzhacke +item.NeutroniumMultispade.name=Neutronium-Multi-Schaufel +item.NickelMultispade.name=Nickel-Multi-Schaufel +item.OsmiumMultipick.name=Osmium-Multi-Spitzhacke +item.OsmiumMultispade.name=Osmium-Multi-Schaufel +item.PalladiumMultipick.name=Palladium-Multi-Spitzhacke +item.PalladiumMultispade.name=Palladium-Multi-Schaufel +item.PlatinumMultispade.name=Platin-Multi-Schaufel +item.Plutonium241Multipick.name=Plutonium-241-Multi-Spitzhacke +item.Plutonium241Multispade.name=Plutonium-241-Multi-Schaufel +item.SilverMultispade.name=Silber-Multi-Schaufel +item.ThoriumMultipick.name=Thorium-Multi-Spitzhacke +item.ThoriumMultispade.name=Thorium-Multi-Schaufel +item.TitaniumMultipick.name=Titan-Multi-Spitzhacke +item.TitaniumMultispade.name=Titan-Multi-Schaufel +item.TungstenMultipick.name=Wolfram-Multi-Spitzhacke +item.TungstenMultispade.name=Wolfram-Multi-Schaufel +item.Uranium235Multipick.name=Uran-235-Multi-Spitzhacke +item.Uranium235Multispade.name=Uran-235-Multi-Schaufel +item.DarkSteelMultipick.name=Dunkelstahl-Multi-Spitzhacke +item.DarkSteelMultispade.name=Dunkelstahl-Multi-Schaufel +item.DuraniumMultipick.name=Duranium-Multi-Spitzhacke +item.DuraniumMultispade.name=Duranium-Multi-Schaufel +item.InfusedGoldMultispade.name=Infundiertes-Gold-Multi-Schaufel +item.NaquadahMultipick.name=Naquadah-Multi-Spitzhacke +item.NaquadahMultispade.name=Naquadah-Multi-Schaufel +item.NaquadahAlloyMultipick.name=Naquadah-Legierung-Multi-Spitzhacke +item.NaquadahAlloyMultispade.name=Naquadah-Legierung-Multi-Schaufel +item.NaquadriaMultipick.name=Naquadria-Multi-Spitzhacke +item.NaquadriaMultispade.name=Naquadria-Multi-Schaufel +item.TritaniumMultipick.name=Tritanium-Multi-Spitzhacke +item.TritaniumMultispade.name=Tritanium-Multi-Schaufel +item.OsmiridiumMultipick.name=Osmiridium-Multi-Spitzhacke +item.OsmiridiumMultispade.name=Osmiridium-Multi-Schaufel +item.BrassMultispade.name=Messing-Multi-Schaufel +item.BronzeMultipick.name=Bronze-Multi-Spitzhacke +item.BronzeMultispade.name=Bronze-Multi-Schaufel +item.CupronickelMultispade.name=Cupronickel-Multi-Schaufel +item.ElectrumMultispade.name=Electrum-Multi-Schaufel +item.InvarMultipick.name=Invar-Multi-Spitzhacke +item.InvarMultispade.name=Invar-Multi-Schaufel +item.KanthalMultispade.name=Kanthal-Multi-Schaufel +item.MagnaliumMultipick.name=Magnalium-Multi-Spitzhacke +item.MagnaliumMultispade.name=Magnalium-Multi-Schaufel +item.NichromeMultispade.name=Nichrom-Multi-Schaufel +item.PigIronMultipick.name=Schweineisen-Multi-Spitzhacke +item.PigIronMultispade.name=Schweineisen-Multi-Schaufel +item.PolycaprolactamMultispade.name=Polycaprolactam-Multi-Schaufel +item.PolytetrafluoroethyleneMultispade.name=Polytetrafluoroethylene-Multi-Schaufel +item.NickelZincFerriteMultispade.name=Nickel-Zink-Ferrit-Multi-Schaufel +item.PolyphenyleneSulfideMultispade.name=Polyphenylene-Sulfit-Multi-Schaufel +item.StainlessSteelMultipick.name=Edelstahl-Multi-Spitzhacke +item.StainlessSteelMultispade.name=Edelstahl-Multi-Schaufel +item.SteelMultipick.name=Stahl-Multi-Spitzhacke +item.SteelMultispade.name=Stahl-Multi-Schaufel +item.TinAlloyMultispade.name=Zinnlegierung-Multi-Schaufel +item.UltimetMultipick.name=Ultimet-Multi-Spitzhacke +item.UltimetMultispade.name=Ultimet-Multi-Schaufel +item.WroughtIronMultipick.name=Schmiedeisen-Multi-Spitzhacke +item.WroughtIronMultispade.name=Schmiedeisen-Multi-Schaufel +item.SterlingSilverMultipick.name=Sterlingsilber-Multi-Spitzhacke +item.SterlingSilverMultispade.name=Sterlingsilber-Multi-Schaufel +item.RoseGoldMultipick.name=Rosegold-Multi-Spitzhacke +item.RoseGoldMultispade.name=Rosegold-Multi-Schaufel +item.BlackBronzeMultipick.name=Schwarzbronze-Multi-Spitzhacke +item.BlackBronzeMultispade.name=Schwarzbronze-Multi-Schaufel +item.BismuthBronzeMultipick.name=Bismuth-Bronze-Multi-Spitzhacke +item.BismuthBronzeMultispade.name=Bismuth-Bronze-Multi-Schaufel +item.BlackSteelMultipick.name=Schwarzstahl-Multi-Spitzhacke +item.BlackSteelMultispade.name=Schwarzstahl-Multi-Schaufel +item.RedSteelMultipick.name=Rotstahl-Multi-Spitzhacke +item.RedSteelMultispade.name=Rotstahl-Multi-Schaufel +item.BlueSteelMultipick.name=Blaustahl-Multi-Spitzhacke +item.BlueSteelMultispade.name=Blaustahl-Multi-Schaufel +item.DamascusSteelMultipick.name=Damaskusstahl-Multi-Spitzhacke +item.DamascusSteelMultispade.name=Damaskusstahl-Multi-Schaufel +item.MithrilMultispade.name=Mithril-Multi-Schaufel +item.CobaltBrassMultipick.name=Kobaltmessing-Multi-Spitzhacke +item.CobaltBrassMultispade.name=Kobaltmessing-Multi-Schaufel +item.ThaumiumMultipick.name=Thaumium-Multi-Spitzhacke +item.ThaumiumMultispade.name=Thaumium-Multi-Schaufel +item.HSSGMultipick.name=HSS-G-Multi-Spitzhacke +item.HSSGMultispade.name=HSS-G-Multi-Schaufel +item.HSSEMultipick.name=HSS-E-Multi-Spitzhacke +item.HSSEMultispade.name=HSS-E-Multi-Schaufel +item.HSSSMultipick.name=HSS-S-Multi-Spitzhacke +item.HSSSMultispade.name=HSS-S-Multi-Schaufel +item.HastelloyC276Multipick.name=Hastelloy-C276-Multi-Spitzhacke +item.HastelloyC276Multispade.name=Hastelloy-C276-Multi-Schaufel +item.HastelloyNMultipick.name=Hastelloy-N-Multi-Spitzhacke +item.HastelloyNMultispade.name=Hastelloy-N-Multi-Schaufel +item.HastelloyWMultipick.name=Hastelloy-W-Multi-Spitzhacke +item.HastelloyWMultispade.name=Hastelloy-W-Multi-Schaufel +item.HastelloyXMultipick.name=Hastelloy-X-Multi-Spitzhacke +item.HastelloyXMultispade.name=Hastelloy-X-Multi-Schaufel +item.Incoloy020Multipick.name=Incoloy-020-Multi-Spitzhacke +item.Incoloy020Multispade.name=Incoloy-020-Multi-Schaufel +item.IncoloyDSMultipick.name=Incoloy-DS-Multi-Spitzhacke +item.IncoloyDSMultispade.name=Incoloy-DS-Multi-Schaufel +item.IncoloyMA956Multipick.name=Incoloy-MA956-Multi-Spitzhacke +item.IncoloyMA956Multispade.name=Incoloy-MA956-Multi-Schaufel +item.Inconel625Multipick.name=Inconel-625-Multi-Spitzhacke +item.Inconel625Multispade.name=Inconel-625-Multi-Schaufel +item.Inconel690Multipick.name=Inconel-690-Multi-Spitzhacke +item.Inconel690Multispade.name=Inconel-690-Multi-Schaufel +item.Inconel792Multipick.name=Inconel-792-Multi-Spitzhacke +item.Inconel792Multispade.name=Inconel-792-Multi-Schaufel +item.GrisiumMultipick.name=Grisium-Multi-Spitzhacke +item.GrisiumMultispade.name=Grisium-Multi-Schaufel +item.Tantalloy60Multipick.name=Tantalloy-60-Multi-Spitzhacke +item.Tantalloy60Multispade.name=Tantalloy-60-Multi-Schaufel +item.Tantalloy61Multipick.name=Tantalloy-61-Multi-Spitzhacke +item.Tantalloy61Multispade.name=Tantalloy-61-Multi-Schaufel +item.StaballoyMultipick.name=Staballoy-Multi-Spitzhacke +item.StaballoyMultispade.name=Staballoy-Multi-Schaufel +item.QuantumMultipick.name=Quanten-Multi-Spitzhacke +item.QuantumMultispade.name=Quanten-Multi-Schaufel +item.PotinMultipick.name=Potin-Multi-Spitzhacke +item.PotinMultispade.name=Potin-Multi-Schaufel +item.TumbagaMultipick.name=Tumbaga-Multi-Spitzhacke +item.TumbagaMultispade.name=Tumbaga-Multi-Schaufel +item.TaloniteMultipick.name=Talonite-Multi-Spitzhacke +item.TaloniteMultispade.name=Talonite-Multi-Schaufel +item.StelliteMultipick.name=Stellite-Multi-Spitzhacke +item.StelliteMultispade.name=Stellite-Multi-Schaufel +item.TungstenCarbideMultipick.name=Wolframcarbid-Multi-Spitzhacke +item.TungstenCarbideMultispade.name=Wolframcarbid-Multi-Schaufel +item.TantalumCarbideMultipick.name=Tantalcarbid-Multi-Spitzhacke +item.TantalumCarbideMultispade.name=Tantalcarbid-Multi-Schaufel + +item.mobessence.name=Mobessenz-Zell +item.itemPlateClay.name=Lehm-Platte +item.itemPlateDoubleClay.name=Doppelte Lehm-Platte +item.itemSmallGearWroughtIron.name=Kleines Schmiedeisen-Zahnrad +item.itemPlateLithium.name=Lithium-Platte +item.itemPlateDoubleEuropium.name=Doppelte Europium-Platte +item.itemBoilerChassis_0.name=Fortgeschrittenes Boiler-Chassis [Stufe 1] +item.itemDehydratorCoilWire_0.name=Spulendraht [EV] +item.itemDehydratorCoil_0.name=Dehydratorspule [EV] +item.itemAirFilter_0.name=Luftfilter [Stufe 1] +item.itemLavaFilter.name=Lavafilter +item.itemGrindleTablet.name=Git +item.itemDragonJar.name=Drachenfangbehälter +item.CoalGas.name=Kohlegas-Zelle +item.Ethylbenzene.name=Ethylbenzin-Zelle +item.Anthracene.name=Anthracen-Zelle +item.Toluene.name=Toluol-Zelle +item.CoalTar.name=Kohl-Teer-Zelle +item.CoalTarOil.name=Kohl-Teeröl-Zelle +item.SulfuricCoalTarOil.name=Schweflige Kohl-Teeröl-Zelle +item.Naphthalene.name=Naphthalin-Zelle +item.PhthalicAcid.name=Phthalsäure-Zelle +item.itemDustPhthalicAnhydride.name=Phthalsäureanhydrid-Staub +item.itemDustSmallPhthalicAnhydride.name=Kleines Häufchen Phthalsäureanhydrid-Staub +item.itemDustTinyPhthalicAnhydride.name=Winziges Häufchen Phthalsäureanhydrid-Staub +item.2Ethylanthraquinone.name=2-Ethylanthrachinon-Zelle +item.2Ethylanthrahydroquinone.name=2-Ethylanthrachinon-Zelle +item.HydrogenPeroxide.name=Wasserstoffperoxid-Zelle +item.itemDustLithiumHydroperoxide.name=Lithium-Wasserstoffperoxid-Staub +item.itemDustSmallLithiumHydroperoxide.name=Kleines Häufchen Lithium-Wasserstoffperoxid-Staub +item.itemDustTinyLithiumHydroperoxide.name=Winziges Häufchen Lithium-Wasserstoffperoxid-Staub +item.LithiumPeroxide.name=Lithium-Peroxid-Zelle +item.itemPotionChilly.name=Frostiger Trank +item.itemKeyBig4000DC's.name=4000DC's großer Schlüssel +item.itemGemDull.name=Stumpfer Edelstein +item.itemMushroomForest.name=Waldpilz +item.itemPlateVanadium.name=Vanadium-Platte +item.thekeytothecity.name=Der Schlüssel zur Stadt +item.modularbauble.name=Modular Bauble +item.itemDustSoularium.name=Soularium-Staub +item.itemDustSmallSoularium.name=Kleines Häufchen Soularium-Staub +item.itemDustTinySoularium.name=Winziges Häufchen Soularium-Staub +item.itemDustRedstoneAlloy.name=Redstone-Legierung-Staub +item.itemDustSmallRedstoneAlloy.name=Kleines Häufchen Redstone-Legierung-Staub +item.itemDustTinyRedstoneAlloy.name=Winziges Häufchen Redstone-Legierung-Staub +item.itemDustElectricalSteel.name=Elektrisches-Stahl-Staub +item.itemDustSmallElectricalSteel.name=Kleines Häufchen Elektrisches-Stahl-Staub +item.itemDustTinyElectricalSteel.name=Winziges Häufchen Elektrisches-Stahl-Staub +item.itemDustPulsatingIron.name=Pulsierendes-Eisen-Staub +item.itemDustSmallPulsatingIron.name=Kleines Häufchen Pulsierendes-Eisen-Staub +item.itemDustTinyPulsatingIron.name=Winziges Häufchen Pulsierendes-Eisen-Staub +item.itemDustEnergeticAlloy.name=Energetische-Legierung-Staub +item.itemDustSmallEnergeticAlloy.name=Kleines Häufchen Energetische-Legierung-Staub +item.itemDustTinyEnergeticAlloy.name=Winziges Häufchen Energetische-Legierung-Staub +item.itemDustVibrantAlloy.name=Dynamische-Legierung-Staub +item.itemDustSmallVibrantAlloy.name=Kleines Häufchen Dynamische-Legierung-Staub +item.itemDustTinyVibrantAlloy.name=Winziges Häufchen Dynamische-Legierung-Staub +item.itemDustConductiveIron.name=Leitendes-Iron-Staub +item.itemDustSmallConductiveIron.name=Kleines Häufchen Leitendes-Iron-Staub +item.itemDustTinyConductiveIron.name=Winziges Häufchen Leitendes-Iron-Staub +item.itemPlateSoularium.name=Soularium-Plate +item.itemPlateRedstoneAlloy.name=Redstone-Legierung-Platte +item.itemPlateElectricalSteel.name=Elektrisches-Stahl-Platte +item.itemPlatePhasedIron.name=Pulsierende-Eisen-Platte +item.itemPlateEnergeticAlloy.name=Energetische-Legierung-Platte +item.itemPlateVibrantAlloy.name=Vibrant Alloy plate +item.itemPlateConductiveIron.name=Conductive Iron plate +item.itemPlateBlutonium.name=Blutonium-Platte +item.itemPlateCyanite.name=Cyanit-Platte +item.itemPlateLudicrite.name=Ludikrit-Platte +item.itemPlateVoid.name="Nichts"-Platte +item.itemPlateDimensionShard.name=Dimensionsscherben-Platte +item.rfEUBattery.name=Universelle Ladbare Batterie +item.personalCloakingDevice.name=§9Persönliches Drapiergerät§7 +item.personalHealingDevice.name=§9Persönliche Helungsnanobooster§r +item.SlowBuildingRing.name=§eLangsamer Bau-Ring§7 +item.itemStaballoyPickaxe.name=Tunnelgräber +item.itemStaballoyAxe.name=Baumfäller +item.itemSandstoneHammer.name=Bruchsteinbrecher +item.itemBufferCore.name=Pufferkern [ULV]. +item.itemBufferCore.name=Pufferkern [LV]. +item.itemBufferCore.name=Pufferkern [MV]. +item.itemBufferCore.name=Pufferkern [HV]. +item.itemBufferCore.name=Pufferkern [EV]. +item.itemBufferCore.name=Pufferkern [IV]. +item.itemBufferCore.name=Pufferkern [LuV]. +item.itemBufferCore.name=Pufferkern [ZPM]. +item.itemBufferCore.name=Pufferkern [UV]. +item.itemBufferCore.name=Pufferkern [MAX]. +item.itemPLACEHOLDER_Circuit.name=Quarks Manipulator (UV) +item.itembookgt.name=§oThermal-Boiler-Anleitung + +// Everglade Items +item.everglades.trigger.name=§6Alkalus Schallplatte [§cAktiviert§6] + + + + + + + +//Blocks +tile.blockRainforestOakLog.name=Regenwaldeiche +tile.blockRainforestOakLeaves.name=Eichenblatt +tile.blockRainforestOakSapling.name=Regenwaldeichensetzling + +//TC Stuff +tile.blockFastAlchemyFurnace.0.name=Kaputt +tile.blockFastArcaneAlembic.1.name=Kaputt + +//Frame Boxes +tile.Block of Selenium.name=Block aus Selen +tile.Selenium Frame Box.name=Selen-Rahmen-Box +tile.Block of Bromine.name=Block aus Bromine +tile.Block of Strontium.name=Block aus Strontium +tile.Strontium Frame Box.name=Strontium-Rahmen-Box +tile.Block of Zirconium.name=Block aus Zirconium +tile.Zirconium Frame Box.name=Zirkonium-Rahmen-Box +tile.Block of Ruthenium.name=Block aus Ruthenium +tile.Ruthenium Frame Box.name=Ruthenium-Rahmen-Box +tile.Block of Iodine.name=Block aus Iod +tile.Iodine Frame Box.name=Iod-Rahmen-Box +tile.Block of Hafnium.name=Block aus Hafnium +tile.Hafnium Frame Box.name=Hafnium-Rahmen-Box +tile.Block of Dysprosium.name=Block aus Dysprosium +tile.Dysprosium Frame Box.name=Dysprosium-Rahmen-Box +tile.Block of Tellurium.name=Block aus Tellur +tile.Tellurium Frame Box.name=Tellur-Rahmen-Box +tile.Block of Rhodium.name=Block aus Rhodium +tile.Rhodium Frame Box.name=Rhodium-Rahmen-Box +tile.Block of Rhenium.name=Block aus Rhenium +tile.Rhenium Frame Box.name=Rhenium-Rahmen-Box +tile.Block of Thallium.name=Block aus Thallium +tile.Thallium Frame Box.name=Thallium-Rahmen-Box +tile.Block of Technetium.name=Block aus Technetium +tile.Block of Polonium.name=Block aus Polonium +tile.Block of Astatine.name=Block aus Astata +tile.Block of Francium.name=Block aus Francium +tile.Block of Radium.name=Block aus Radium +tile.Block of Actinium.name=Block aus Actinium +tile.Block of Protactinium.name=Block aus Protactinium +tile.Block of Neptunium.name=Block aus Neptunium +tile.Block of Curium.name=Block aus Curium +tile.Block of Berkelium.name=Block aus Berkelium +tile.Block of Californium.name=Block aus Californium +tile.Block of Einsteinium.name=Block aus Einsteinium +tile.Block of Fermium.name=Block aus Fermium +tile.Block of Thorium 232.name=Block aus Thorium-232 +tile.Block of Uranium 232.name=Block aus Uran-232 +tile.Block of Uranium 233.name=Block aus Uran-233 +tile.Block of Plutonium-238.name=Block aus Plutonium-238 +tile.Block of Strontium-90.name=Block aus Strontium-90 +tile.Block of Polonium-210.name=Block aus Polonium-210 +tile.Block of Americium-241.name=Block aus Americium-241 +tile.Block of Silicon Carbide.name=Block aus Siliconcarbid +tile.Silicon Carbide Frame Box.name=Siliconcarbid-Rahmen-Box +tile.Block of Zirconium Carbide.name=Block aus Zirkoniumcarbid +tile.Zirconium Carbide Frame Box.name=Zirkoniumcarbide-Rahmen-Box +tile.Block of Tantalum Carbide.name=Block aus Tantalcarbid +tile.Tantalum Carbide Frame Box.name=Tantalcarbide-Rahmen-Box +tile.Block of Niobium Carbide.name=Block aus Niobcarbid +tile.Niobium Carbide Frame Box.name=Niobium Carbide-Rahmen-Box +tile.Block of Beryllium Fluoride.name=Block aus Beryllium-Fluorid +tile.Block of Lithium Fluoride.name=Block aus Lithium-Fluorid +tile.Block of Thorium Tetrafluoride.name=Block aus Thorium-Tetrafluorid +tile.Block of Thorium Hexafluoride.name=Block aus Thorium-Hexafluorid +tile.Block of Uranium Tetrafluoride.name=Block aus Uran-Tetrafluorid +tile.Block of Uranium Hexafluoride.name=Block aus Uran-Hexafluorid +tile.Block of Zirconium Tetrafluoride.name=Block aus Zirkonium-Tetrafluorid +tile.Block of Neptunium Hexafluoride.name=Block aus Neptunium-Hexafluorid +tile.Block of Technetium Hexafluoride.name=Block aus Technetium-Hexafluorid +tile.Block of Selenium Hexafluoride.name=Block aus Selen-Hexafluorid +tile.Block of LiFBeF2ZrF4U235.name=Block aus LiFBeF2ZrF4U235 +tile.Block of LiFBeF2ZrF4UF4.name=Block aus LiFBeF2ZrF4UF4 +tile.Block of LiFBeF2ThF4UF4.name=Block aus LiFBeF2ThF4UF4 +tile.Block of Energy Crystal.name=Block aus Energiekristall +tile.Energy Crystal Frame Box.name=Energiekristall-Rahmen-Box +tile.Block of Blood Steel.name=Block aus Blutstahl +tile.Blutstahl Frame Box.name=Blutstahl-Rahmen-Box +tile.Block of Zeron-100.name=Block aus Zeron-100 +tile.Zeron-100 Frame Box.name=Zeron-100-Rahmen-Box +tile.Block of Tumbaga.name=Block aus Tumbaga +tile.Tumbaga Frame Box.name=Tumbaga-Rahmen-Box +tile.Block of Potin.name=Block aus Potin +tile.Potin Frame Box.name=Potin-Rahmen-Box +tile.Block of Staballoy.name=Block aus Staballoy +tile.Staballoy Frame Box.name=Staballoy-Rahmen-Box +tile.Block of Tantalloy-60.name=Block aus Tantalloy-60 +tile.Tantalloy-60 Frame Box.name=Tantalloy-60-Rahmen-Box +tile.Block of Tantalloy-61.name=Block aus Tantalloy-61 +tile.Tantalloy-61 Frame Box.name=Tantalloy-61-Rahmen-Box +tile.Block of Inconel-625.name=Block aus Inconel-625 +tile.Inconel-625 Frame Box.name=Inconel-625-Rahmen-Box +tile.Block of Inconel-690.name=Block aus Inconel-690 +tile.Inconel-690 Frame Box.name=Inconel-690-Rahmen-Box +tile.Block of Inconel-792.name=Block aus Inconel-792 +tile.Inconel-792 Frame Box.name=Inconel-792-Rahmen-Box +tile.Block of Eglin Steel.name=Block aus Eglin Steel +tile.Eglin Steel Frame Box.name=Eglin Steel-Rahmen-Box +tile.Block of Maraging Steel 250.name=Block aus Maraging-Stahl 250 +tile.Maraging Steel 250 Frame Box.name=Maraging-Stahl 250-Rahmen-Box +tile.Block of Maraging Steel 300.name=Block aus Maraging-Stahl 300 +tile.Maraging Steel 300 Frame Box.name=Maraging-Stahl 300-Rahmen-Box +tile.Block of Maraging Steel 350.name=Block aus Maraging-Stahl 350 +tile.Maraging Steel 350 Frame Box.name=Maraging-Stahl 350-Rahmen-Box +tile.Block of Stellite.name=Block aus Stellite +tile.Stellite Frame Box.name=Stellite-Rahmen-Box +tile.Block of Talonite.name=Block aus Talonite +tile.Talonite Frame Box.name=Talonite-Rahmen-Box +tile.Block of Hastelloy-W.name=Block aus Hastelloy-W +tile.Hastelloy-W Frame Box.name=Hastelloy-W-Rahmen-Box +tile.Block of Hastelloy-X.name=Block aus Hastelloy-X +tile.Hastelloy-X Frame Box.name=Hastelloy-X-Rahmen-Box +tile.Block of Hastelloy-C276.name=Block aus Hastelloy-C276 +tile.Hastelloy-C276 Frame Box.name=Hastelloy-C276-Rahmen-Box +tile.Block of Hastelloy-N.name=Block aus Hastelloy-N +tile.Hastelloy-N Frame Box.name=Hastelloy-N-Rahmen-Box +tile.Block of Incoloy-020.name=Block aus Incoloy-020 +tile.Incoloy-020 Frame Box.name=Incoloy-020-Rahmen-Box +tile.Block of Incoloy-DS.name=Block aus Incoloy-DS +tile.Incoloy-DS Frame Box.name=Incoloy-DS-Rahmen-Box +tile.Block of Incoloy-MA956.name=Block aus Incoloy-MA956 +tile.Incoloy-MA956 Frame Box.name=Incoloy-MA956-Rahmen-Box +tile.Block of Grisium.name=Block aus Grisium +tile.Grisium Frame Box.name=Grisium-Rahmen-Box +tile.Block of Trinium.name=Block aus Trinium +tile.Block of Refined Trinium.name=Block aus raffiniertem Trinium +tile.Block of Trinium Titanium Alloy.name=Block aus Trinium-Titanium-Legierung +tile.Trinium Titanium Alloy Frame Box.name=Trinium-Titanium-Legierung-Rahmen-Box +tile.Block of Trinium Naquadah Alloy.name=Block aus Trinium-Naquadah-Legierung +tile.Block of Trinium Naquadah Carbonite.name=Block aus Trinium-Naquadah-Carbonit +tile.Trinium Naquadah Carbonite Frame Box.name=Trinium-Naquadah-Carbonit-Rahmen-Box +tile.Block of Quantum.name=Block aus Quanten +tile.Quantum Frame Box.name=Quanten-Rahmenbox + +//Ores +tile.OreFluorite.name=Fluoriterz +tile.OreCrocoite.name=Crocoiterz +tile.OreGeikielite.name=Geikielieerz +tile.OreNichromite.name=Nichromiterz +tile.OreTitanite.name=Titaniterz +tile.OreZimbabweite.name=Zimbabweiterz +tile.OreZirconolite.name=Zirconoliterz +tile.OreGadoliniteCe.name=Gadoliniterz(Ce) +tile.OreGadoliniteY.name=Gadoliniterz(Y) +tile.OreLepersonnite.name=Lepersonniterz +tile.OreSamarskiteY.name=Samarskiterz(Y) +tile.OreSamarskiteYb.name=Samarskiterz(Yb) +tile.OreXenotime.name=Xenotimerz +tile.OreYttriaite.name=Yttriaiterz +tile.OreYttrialite.name=Yttrialiterz +tile.OreYttrocerite.name=Yttroceriterz +tile.OreZircon.name=Zirconerz +tile.OrePolycrase.name=Polycraserz +tile.OreZircophyllite.name=Zircophylliterz +tile.OreZirkelite.name=Zirkeliterz +tile.OreLanthaniteLa.name=Lanthaniterz(La) +tile.OreLanthaniteCe.name=Lanthaniterz(Ce) +tile.OreLanthaniteNd.name=Lanthaniterz(Nd) +tile.OreAgarditeY.name=Agarditerz(Y) +tile.OreAgarditeCd.name=Agarditerz(Cd) +tile.OreAgarditeLa.name=Agarditerz(La) +tile.OreAgarditeNd.name=Agarditerz(Nd) +tile.OreHibonite.name=Hiboniterz +tile.OreCerite.name=Ceriterz +tile.OreFluorcaphite.name=Fluorcaphiterz +tile.OreFlerzncite.name=Flerznciterz +tile.OreCryolite.name=Cryoliterz + +//Misc +tile.blockMFEffect.name=Spezial +tile.fluidBlockSludge.name=Brühe +tile.blockWorkbenchGT.name=Werkbank +tile.blockWorkbenchGTAdvanced.name=Fortgeschrittene Werkbank +tile.blockHeliumGenerator.name=Helium Generator +tile.blockFirePit.name=Feuerstelle +tile.blockFishTrap.name=Fischfalle +tile.blockInfiniteFluidTank.name=Unendlicher Tank +tile.blockMiningExplosives.name=Minensprengstoff +tile.blockHellFire.name=Höllenfeuer +tile.blockProjectBench.name=Projektplanungstisch +tile.blockTradeBench.name=Handelstisch +tile.blockModularity.name=Modulare Werkbank +tile.blockBlackGate.name=Witherkäfig +tile.blockTankXpConverter.name=Erfahrungswandler(XP) + +//Everglades Blocks +tile.fluidSludge.0.name=Stehendes Abwasser +tile.blockDarkWorldPortal.name=Portalstein für die Dunkle Welt +tile.blockDarkWorldGround.name=Grundstein der Dunklen Welt +tile.blockDarkWorldGround2.name=Grundstein der Dunklen Welt +tile.blockDarkWorldPortalFrame.name=Portalrahmen für die Dunkle Welt diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang new file mode 100644 index 0000000000..e2f034282a --- /dev/null +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -0,0 +1,3366 @@ +//Creative Tabs +itemGroup.MiscUtilBlockTab=[GT++] Blocks +itemGroup.MiscUtilMiscTab=[GT++] Items +itemGroup.MiscUtilCombatTab=[GT++] Combat +itemGroup.MiscUtilToolsTab=[GT++] Tools +itemGroup.MiscUtilMachineTab=[GT++] Machines +itemGroup.MiscUtilOtherTab=[GT++] Items II +itemGroup.MiscUtilBOP=[GT++] Biomes O'Plenty Additions + +//Debug +item.AAA_Broken.name=[Non-existent Item] Report This Recipe On Github, Please. +item.itemBedLocator_Base.name=Bed Locator [NBT Test] +item.itemBaseItemWithCharge.name=Base Chargeable Item +item.miscutils_itemDebugShapeSpawner.name=[Debug] Shapes + +//Fluids +tile.fluidSludge.name=Stagnant Waste Water +tile.fluidSludge.0.name=Stagnant Waste Water + +//Death Messages +death.attack.plasmabolt=%s died by burning hot plasma. +death.attack.plasmabolt.player=%1$s was killed by %2$s using plasma. +death.attack.gtpp.grinder=%s was ground into nothingness by an IsaMill. + +//Alternative Materials +item.itemPlateBatteryAlloy.name=Plate of Battery Alloy +item.itemIngotBatteryAlloy.name=Ingot of Battery Alloy +item.itemStickyRubber.name=Gumlet of Sticky Rubber + +//Unused Fuel rods +item.itemFuelRod_Empty.name=Empty Fuel Rod +item.itemFuelRod_Thorium.name=Thorium Fuel Rod +item.itemFuelRod_Uranium.name=Uranium Fuel Rod +item.itemFuelRod_Plutonium.name=Plutonium Fuel Rod + +//Entities +entity.constructStaballoy.name=Staballoy Construct +entity.sickBlaze.name=Infected Zealot + +//Tile Entities +tile.blockToolBuilder.name=GregTech Tool Constructor + +//Tools +item.itemBufferCore.name=Energy Core +item.itemStaballoyPickaxe.name=Tunnel Digger +item.itemStaballoyAxe.name=Tree Feller +item.itemSandstoneHammer.name=Cobblestone Breaker + +//Thermal Foundation Stuff +item.MiscUtils.bucket.bucketPyrotheum.name=Blazing Pyrotheum Bucket +item.MiscUtils.bucket.bucketCryotheum.name=Gelid Cryotheum Bucket +item.MiscUtils.bucket.bucketEnder.name=Resonant Ender Bucket +item.MiscUtils.material.dustPyrotheum.name=Pyrotheum Dust +item.MiscUtils.material.dustCryotheum.name=Cryotheum Dust +item.MiscUtils.material.rodBlizz.name=Blizz Rod +item.MiscUtils.material.dustBlizz.name=Blizz Powder + +//============= 'miscutils' is Case Sensitive Here, unsure why +tile.miscutils.fluid.pyrotheum.name=Blazing Pyrotheum +tile.miscutils.fluid.cryotheum.name=Gelid Cryotheum +tile.miscutils.fluid.ender.name=Resonant Ender +//============== + +//Forestry Stuff +item.frameAccelerated.name=Accelerated Frame +item.frameVoid.name=Void Frame +item.frameMutagenic.name=Mutagenic Frame +item.frameBusy.name=Working Frame +item.frameChocolate.name=Chocolate Frame +item.frameRestraint.name=Restraining Frame +item.frameSoul.name=Soul Frame +item.frameHealing.name=Healing Frame +item.frameNova.name=Nova Frame +item.frameArborists.name=Arborist Frame +item.frameDecaying.name=Decaying Frame +item.frameSlowing.name=Slowing Frame +item.frameStabilizing.name=Stabilizing Frame +item.frameUseless.name=Useless Frame + +//IC2 stuff +item.itemEnergeticRotorBlade.name=Energetic Alloy Rotor Blade +item.itemTungstenSteelRotorBlade.name=TungstenSteel Rotor Blade +item.itemVibrantRotorBlade.name=Vibrant Alloy Rotor Blade +item.itemIridiumRotorBlade.name=Iridium Rotor Blade +item.itemEnergeticShaft.name=Energetic Alloy Shaft +item.itemTungstenSteelShaft.name=TungstenSteel Shaft +item.itemVibrantShaft.name=Vibrant Alloy Shaft +item.itemIridiumShaft.name=Iridium Shaft +item.itemMagnaliumRotorBlade.name=Magnalium Rotor Blade +item.itemUltimetRotorBlade.name=Ultimet Blade +item.itemMagnaliumShaft.name=Magnalium Shaft +item.itemUltimetShaft.name=Ultimet Shaft + + +//Misc Items +item.itemPLACEHOLDER_Circuit.name=Quark Manipulator (UV) +item.itemPlateEnrichedSoularium.name=Enriched Soularium Plate +item.itemHeliumBlob.name=Mysterious Hydrogen Substance +item.itemAlkalusDisk.name=Alkalus Disk +item.itemHotIngotRaisinBread.name=Hot Loaf of Raisin Bread +item.itemIngotRaisinBread.name=§5ImQ009's §fRaisin Bread + +//Misc Blocks +tile.blockCompressedObsidian.0.name=Compressed Obsidian (9) +tile.blockCompressedObsidian.1.name=Double Compressed Obsidian (81) +tile.blockCompressedObsidian.2.name=Triple Compressed Obsidian (729) +tile.blockCompressedObsidian.3.name=Quadruple Compressed Obsidian (6561) +tile.blockCompressedObsidian.4.name=Quintuple Compressed Obsidian (59049) +tile.blockCompressedObsidian.5.name=Inverted Obsidian +tile.blockNet.name=Net + + +//GT++ Items + +//Meta Tool +MU-metaitem.01.0.name=MU-metaitem.01.0.name + +//Cells +item.SulfurDioxide.name=High Quality Sulfur Dioxide Cell +item.mobessence.name=Mob Essence Cell +item.Fertiliser.name=Fertiliser Cell +item.UN32Fertiliser.name=UN-32 Fertiliser Cell +item.UN18Fertiliser.name=UN-18 Fertiliser Cell +item.RaisinJuice.name=Raisin Juice Cell +item.BerylliumHydroxide.name=Beryllium Hydroxide Cell +item.AmmoniumBifluoride.name=Ammonium Bifluoride Cell +item.Hydroxide.name=Hydroxide Cell +item.Ammonium.name=Ammonium Cell +item.AmmoniumTetrafluoroberyllate.name=Ammonium Tetrafluoroberyllate Cell + +//Resources +item.itemStickyRubber.name=Gumlet of Sticky Rubber +item.itemCoalCoke.name=Coking Coal +item.itemHydrogenBlob.name=Mysterious Hydrogen Blob +item.itemHeliumBlob.name=Mysterious Hydrogen Substance + +//Normal Items +item.itemAlkalusDisk.name=Alkalus Disk +item.itemSimpleFiremaker.name=Basic Firemaker +item.itemFiber.name=Plant Fiber +item.itemRope.name=Rope +item.backpackRed.name=Red Backpack +item.backpackGreen.name=Green Backpack +item.backpackBlue.name=Blue Backpack +item.backpackYellow.name=Yellow Backpack +item.backpackPurple.name=Purple Backpack +item.backpackCyan.name=Cyan Backpack +item.backpackMaroon.name=Maroon Backpack +item.backpackOlive.name=Olive Backpack +item.backpackDarkGreen.name=Dark Green Backpack +item.backpackDarkPurple.name=Dark Purple Backpack +item.backpackTeal.name=Teal Backpack +item.backpackNavy.name=Navy Backpack +item.backpackSilver.name=Silver Backpack +item.backpackGray.name=Gray Backpack +item.backpackBlack.name=Black Backpack +item.backpackWhite.name=White Backpack +item.itemBlueprint.name=Blueprint [I am useless] +item.itemGemShards.name=Diamond Shards +item.itemHalfCompleteCasings.name=Half Complete Casing +item.itemSulfuricPotion.name=Throwable Vial of Sulfuric Acid +item.itemHydrofluoricPotion.name=Throwable Vial of Hydrofluoric Acid +item.itemIngotRaisinBread.name=A Serving of Raisin Bread +item.itemHotIngotRaisinBread.name=A Serving of Hot Raisin Bread +item.itemFoodRaisinToast.name=A Serving of Raisin Toast +item.itemHotFoodRaisinToast.name=A Serving of Hot Raisin Toast +item.itemFoodCurriedSausages.name=A Serving of Curried Sausages +item.itemHotFoodCurriedSausages.name=A Serving of Hot Curried Sausages + + +//Conversion Dusts +item.dustNeptunium238.name=Neptunium 238 Dust +item.dustRadium226.name=Radium 226 Dust +item.itemDustDecayedRadium226.name=Decayed Radium 226 Dust +item.itemDustSmallDecayedRadium226.name=Small Decayed Radium 226 Dust +item.itemDustTinyDecayedRadium226.name=Tiny Decayed Radium 226 Dust + +//Material Items +item.itemDustGadolinium.name=Gadolinium Dust +item.itemDustSmallGadolinium.name=Small Pile of Gadolinium Dust +item.itemDustTinyGadolinium.name=Tiny Pile of Gadolinium Dust +item.itemDustYtterbium.name=Ytterbium Dust +item.itemDustSmallYtterbium.name=Small Pile of Ytterbium Dust +item.itemDustTinyYtterbium.name=Tiny Pile of Ytterbium Dust +item.itemDustSamarium.name=Samarium Dust +item.itemDustSmallSamarium.name=Small Pile of Samarium Dust +item.itemDustTinySamarium.name=Tiny Pile of Samarium Dust +item.itemDustLanthanum.name=Lanthanum Dust +item.itemDustSmallLanthanum.name=Small Pile of Lanthanum Dust +item.itemDustTinyLanthanum.name=Tiny Pile of Lanthanum Dust +item.itemCellNeon.name=Neon Cell +item.itemCellGermanium.name=Germanium Cell +item.itemCellSelenium.name=Selenium Cell +item.itemCellBromine.name=Bromine Cell +item.itemCellKrypton.name=Krypton Cell +item.itemCellZirconium.name=Zirconium Cell +item.itemCellTechnetium.name=Technetium Cell +item.itemCellRuthenium.name=Ruthenium Cell +item.itemCellRhodium.name=Rhodium Cell +item.itemCellIodine.name=Iodine Cell +item.itemCellXenon.name=Xenon Cell +item.itemCellHafnium.name=Hafnium Cell +item.itemCellRhenium.name=Rhenium Cell +item.itemCellThallium.name=Thallium Cell +item.itemCellPolonium.name=Polonium Cell +item.itemCellAstatine.name=Astatine Cell +item.itemCellFrancium.name=Francium Cell +item.itemCellRadium.name=Radium Cell +item.itemCellActinium.name=Actinium Cell +item.itemCellProtactinium.name=Protactinium Cell +item.itemCellNeptunium.name=Neptunium Cell +item.itemCellCurium.name=Curium Cell +item.itemCellBerkelium.name=Berkelium Cell +item.itemCellCalifornium.name=Californium Cell +item.itemCellEinsteinium.name=Einsteinium Cell +item.itemCellFermium.name=Fermium Cell +item.itemCellRefinedTrinium.name=Refined Trinium Cell +item.itemIngotSelenium.name=Selenium Ingot +item.itemDustSelenium.name=Selenium Dust +item.itemDustTinySelenium.name=Tiny Pile of Selenium Dust +item.itemDustSmallSelenium.name=Small Pile of Selenium Dust +item.itemNuggetSelenium.name=Selenium Nugget +item.itemPlateSelenium.name=Selenium Plate +item.itemPlateDoubleSelenium.name=Double Selenium Plate +item.itemBoltSelenium.name=Selenium Bolt +item.itemRodSelenium.name=Selenium Rod +item.itemRodLongSelenium.name=Long Selenium Rod +item.itemRingSelenium.name=Selenium Ring +item.itemScrewSelenium.name=Selenium Screw +item.itemRotorSelenium.name=Selenium Rotor +item.itemGearSelenium.name=Selenium Gear +item.itemCellUranium232.name=Uranium 232 Cell +item.itemCellUranium233.name=Uranium 233 Cell +item.itemCellThoriumTetrafluoride.name=Thorium Tetrafluoride Cell +item.itemCellThoriumHexafluoride.name=Thorium Hexafluoride Cell +item.itemCellUraniumTetrafluoride.name=Uranium Tetrafluoride Cell +item.itemCellUraniumHexafluoride.name=Uranium Hexafluoride Cell +item.itemCellZirconiumTetrafluoride.name=Zirconium Tetrafluoride Cell +item.itemCellBerylliumFluoride.name=Beryllium Fluoride Cell +item.itemCellLithiumFluoride.name=Lithium Fluoride Cell +item.itemCellHydroxide.name=Hydroxide Cell +item.itemCellAmmonium.name=Ammonium Cell +item.itemCellAmmoniumBifluoride.name=Ammonium Bifluoride Cell +item.itemCellBerylliumHydroxide.name=Beryllium Hydroxide Cell +item.itemCellAmmoniumTetrafluoroberyllate.name=Ammonium Tetrafluoroberyllate Cell +item.itemCellNeptuniumHexafluoride.name=Neptunium Hexafluoride Cell +item.itemCellTechnetiumHexafluoride.name=Technetium Hexafluoride Cell +item.itemCellSeleniumHexafluoride.name=Selenium Hexafluoride Cell +item.itemCellEnergyCrystal.name=Energy Crystal Cell +item.itemCellBloodSteel.name=Blood Steel Cell +item.itemCellStaballoy.name=Staballoy Cell +item.itemCellTantalloy60.name=Tantalloy-60 Cell +item.itemCellTantalloy61.name=Tantalloy-61 Cell +item.itemCellTumbaga.name=Tumbaga Cell +item.itemCellPotin.name=Potin Cell +item.itemCellInconel625.name=Inconel-625 Cell +item.itemCellInconel690.name=Inconel-690 Cell +item.itemCellInconel792.name=Inconel-792 Cell +item.itemCellZeron100.name=Zeron-100 Cell +item.itemCellMaragingSteel250.name=Maraging Steel 250 Cell +item.itemCellMaragingSteel300.name=Maraging Steel 300 Cell +item.itemCellMaragingSteel350.name=Maraging Steel 350 Cell +item.itemCellStellite.name=Stellite Cell +item.itemCellTalonite.name=Talonite Cell +item.itemCellHastelloyW.name=Hastelloy-W Cell +item.itemCellHastelloyX.name=Hastelloy-X Cell +item.itemCellHastelloyN.name=Hastelloy-N Cell +item.itemCellHastelloyC276.name=Hastelloy-C276 Cell +item.itemCellIncoloy020.name=Incoloy-020 Cell +item.itemCellIncoloyDS.name=Incoloy-DS Cell +item.itemCellIncoloyMA956.name=Incoloy-MA956 Cell +item.itemCellTungstenCarbide.name=Tungsten Carbide Cell +item.itemCellSiliconCarbide.name=Silicon Carbide Cell +item.itemCellTantalumCarbide.name=Tantalum Carbide Cell +item.itemCellZirconiumCarbide.name=Zirconium Carbide Cell +item.itemCellNiobiumCarbide.name=Niobium Carbide Cell +item.itemCellGrisium.name=Grisium Cell +item.itemCellEglinSteelBaseCompound.name=Eglin Steel Base Compound Cell +item.itemCellEglinSteel.name=Eglin Steel Cell +item.itemCellHG1223.name=HG-1223 Cell +item.itemCellTriniumTitaniumAlloy.name=Trinium Titanium Alloy Cell +item.itemCellTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Cell +item.itemCellTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Cell +item.itemCellQuantum.name=Quantum Cell +item.itemIngotBromine.name=Bromine Ingot +item.itemDustBromine.name=Bromine Dust +item.itemDustTinyBromine.name=Tiny Pile of Bromine Dust +item.itemDustSmallBromine.name=Small Pile of Bromine Dust +item.itemNuggetBromine.name=Bromine Nugget +item.itemPlateBromine.name=Bromine Plate +item.itemPlateDoubleBromine.name=Double Bromine Plate +item.itemIngotStrontium.name=Strontium Ingot +item.itemDustStrontium.name=Strontium Dust +item.itemDustTinyStrontium.name=Tiny Pile of Strontium Dust +item.itemDustSmallStrontium.name=Small Pile of Strontium Dust +item.itemNuggetStrontium.name=Strontium Nugget +item.itemPlateStrontium.name=Strontium Plate +item.itemPlateDoubleStrontium.name=Double Strontium Plate +item.itemBoltStrontium.name=Strontium Bolt +item.itemRodStrontium.name=Strontium Rod +item.itemRodLongStrontium.name=Long Strontium Rod +item.itemRingStrontium.name=Strontium Ring +item.itemScrewStrontium.name=Strontium Screw +item.itemRotorStrontium.name=Strontium Rotor +item.itemGearStrontium.name=Strontium Gear +item.itemIngotZirconium.name=Zirconium Ingot +item.itemDustZirconium.name=Zirconium Dust +item.itemDustTinyZirconium.name=Tiny Pile of Zirconium Dust +item.itemDustSmallZirconium.name=Small Pile of Zirconium Dust +item.itemNuggetZirconium.name=Zirconium Nugget +item.itemPlateZirconium.name=Zirconium Plate +item.itemPlateDoubleZirconium.name=Double Zirconium Plate +item.itemBoltZirconium.name=Zirconium Bolt +item.itemRodZirconium.name=Zirconium Rod +item.itemRodLongZirconium.name=Long Zirconium Rod +item.itemRingZirconium.name=Zirconium Ring +item.itemScrewZirconium.name=Zirconium Screw +item.itemRotorZirconium.name=Zirconium Rotor +item.itemGearZirconium.name=Zirconium Gear +item.itemIngotRuthenium.name=Ruthenium Ingot +item.itemDustRuthenium.name=Ruthenium Dust +item.itemDustTinyRuthenium.name=Tiny Pile of Ruthenium Dust +item.itemDustSmallRuthenium.name=Small Pile of Ruthenium Dust +item.itemNuggetRuthenium.name=Ruthenium Nugget +item.itemPlateRuthenium.name=Ruthenium Plate +item.itemPlateDoubleRuthenium.name=Double Ruthenium Plate +item.itemBoltRuthenium.name=Ruthenium Bolt +item.itemRodRuthenium.name=Ruthenium Rod +item.itemRodLongRuthenium.name=Long Ruthenium Rod +item.itemRingRuthenium.name=Ruthenium Ring +item.itemScrewRuthenium.name=Ruthenium Screw +item.itemRotorRuthenium.name=Ruthenium Rotor +item.itemGearRuthenium.name=Ruthenium Gear +item.itemIngotIodine.name=Iodine Ingot +item.itemDustIodine.name=Iodine Dust +item.itemDustTinyIodine.name=Tiny Pile of Iodine Dust +item.itemDustSmallIodine.name=Small Pile of Iodine Dust +item.itemNuggetIodine.name=Iodine Nugget +item.itemPlateIodine.name=Iodine Plate +item.itemPlateDoubleIodine.name=Double Iodine Plate +item.itemBoltIodine.name=Iodine Bolt +item.itemRodIodine.name=Iodine Rod +item.itemRodLongIodine.name=Long Iodine Rod +item.itemRingIodine.name=Iodine Ring +item.itemScrewIodine.name=Iodine Screw +item.itemRotorIodine.name=Iodine Rotor +item.itemGearIodine.name=Iodine Gear +item.itemIngotHafnium.name=Hafnium Ingot +item.itemDustHafnium.name=Hafnium Dust +item.itemDustTinyHafnium.name=Tiny Pile of Hafnium Dust +item.itemDustSmallHafnium.name=Small Pile of Hafnium Dust +item.itemNuggetHafnium.name=Hafnium Nugget +item.itemPlateHafnium.name=Hafnium Plate +item.itemPlateDoubleHafnium.name=Double Hafnium Plate +item.itemBoltHafnium.name=Hafnium Bolt +item.itemRodHafnium.name=Hafnium Rod +item.itemRodLongHafnium.name=Long Hafnium Rod +item.itemRingHafnium.name=Hafnium Ring +item.itemScrewHafnium.name=Hafnium Screw +item.itemRotorHafnium.name=Hafnium Rotor +item.itemGearHafnium.name=Hafnium Gear +item.itemIngotDysprosium.name=Dysprosium Ingot +item.itemDustDysprosium.name=Dysprosium Dust +item.itemDustTinyDysprosium.name=Tiny Pile of Dysprosium Dust +item.itemDustSmallDysprosium.name=Small Pile of Dysprosium Dust +item.itemNuggetDysprosium.name=Dysprosium Nugget +item.itemPlateDysprosium.name=Dysprosium Plate +item.itemPlateDoubleDysprosium.name=Double Dysprosium Plate +item.itemBoltDysprosium.name=Dysprosium Bolt +item.itemRodDysprosium.name=Dysprosium Rod +item.itemRodLongDysprosium.name=Long Dysprosium Rod +item.itemRingDysprosium.name=Dysprosium Ring +item.itemScrewDysprosium.name=Dysprosium Screw +item.itemRotorDysprosium.name=Dysprosium Rotor +item.itemGearDysprosium.name=Dysprosium Gear +item.itemIngotTellurium.name=Tellurium Ingot +item.itemDustTellurium.name=Tellurium Dust +item.itemDustTinyTellurium.name=Tiny Pile of Tellurium Dust +item.itemDustSmallTellurium.name=Small Pile of Tellurium Dust +item.itemNuggetTellurium.name=Tellurium Nugget +item.itemPlateTellurium.name=Tellurium Plate +item.itemPlateDoubleTellurium.name=Double Tellurium Plate +item.itemBoltTellurium.name=Tellurium Bolt +item.itemRodTellurium.name=Tellurium Rod +item.itemRodLongTellurium.name=Long Tellurium Rod +item.itemRingTellurium.name=Tellurium Ring +item.itemScrewTellurium.name=Tellurium Screw +item.itemRotorTellurium.name=Tellurium Rotor +item.itemGearTellurium.name=Tellurium Gear +item.itemIngotRhodium.name=Rhodium Ingot +item.itemDustRhodium.name=Rhodium Dust +item.itemDustTinyRhodium.name=Tiny Pile of Rhodium Dust +item.itemDustSmallRhodium.name=Small Pile of Rhodium Dust +item.itemNuggetRhodium.name=Rhodium Nugget +item.itemPlateRhodium.name=Rhodium Plate +item.itemPlateDoubleRhodium.name=Double Rhodium Plate +item.itemBoltRhodium.name=Rhodium Bolt +item.itemRodRhodium.name=Rhodium Rod +item.itemRodLongRhodium.name=Long Rhodium Rod +item.itemRingRhodium.name=Rhodium Ring +item.itemScrewRhodium.name=Rhodium Screw +item.itemRotorRhodium.name=Rhodium Rotor +item.itemGearRhodium.name=Rhodium Gear +item.itemIngotRhenium.name=Rhenium Ingot +item.itemDustRhenium.name=Rhenium Dust +item.itemDustTinyRhenium.name=Tiny Pile of Rhenium Dust +item.itemDustSmallRhenium.name=Small Pile of Rhenium Dust +item.itemNuggetRhenium.name=Rhenium Nugget +item.itemPlateRhenium.name=Rhenium Plate +item.itemPlateDoubleRhenium.name=Double Rhenium Plate +item.itemBoltRhenium.name=Rhenium Bolt +item.itemRodRhenium.name=Rhenium Rod +item.itemRodLongRhenium.name=Long Rhenium Rod +item.itemRingRhenium.name=Rhenium Ring +item.itemScrewRhenium.name=Rhenium Screw +item.itemRotorRhenium.name=Rhenium Rotor +item.itemGearRhenium.name=Rhenium Gear +item.itemIngotThallium.name=Thallium Ingot +item.itemDustThallium.name=Thallium Dust +item.itemDustTinyThallium.name=Tiny Pile of Thallium Dust +item.itemDustSmallThallium.name=Small Pile of Thallium Dust +item.itemNuggetThallium.name=Thallium Nugget +item.itemPlateThallium.name=Thallium Plate +item.itemPlateDoubleThallium.name=Double Thallium Plate +item.itemBoltThallium.name=Thallium Bolt +item.itemRodThallium.name=Thallium Rod +item.itemRodLongThallium.name=Long Thallium Rod +item.itemRingThallium.name=Thallium Ring +item.itemScrewThallium.name=Thallium Screw +item.itemRotorThallium.name=Thallium Rotor +item.itemGearThallium.name=Thallium Gear +item.itemIngotTechnetium.name=Technetium Ingot +item.itemDustTechnetium.name=Technetium Dust +item.itemDustTinyTechnetium.name=Tiny Pile of Technetium Dust +item.itemDustSmallTechnetium.name=Small Pile of Technetium Dust +item.itemNuggetTechnetium.name=Technetium Nugget +item.itemPlateTechnetium.name=Technetium Plate +item.itemPlateDoubleTechnetium.name=Double Technetium Plate +item.itemIngotPolonium.name=Polonium Ingot +item.itemDustPolonium.name=Polonium Dust +item.itemDustTinyPolonium.name=Tiny Pile of Polonium Dust +item.itemDustSmallPolonium.name=Small Pile of Polonium Dust +item.itemNuggetPolonium.name=Polonium Nugget +item.itemPlatePolonium.name=Polonium Plate +item.itemPlateDoublePolonium.name=Double Polonium Plate +item.itemIngotAstatine.name=Astatine Ingot +item.itemDustAstatine.name=Astatine Dust +item.itemDustTinyAstatine.name=Tiny Pile of Astatine Dust +item.itemDustSmallAstatine.name=Small Pile of Astatine Dust +item.itemNuggetAstatine.name=Astatine Nugget +item.itemPlateAstatine.name=Astatine Plate +item.itemPlateDoubleAstatine.name=Double Astatine Plate +item.itemIngotFrancium.name=Francium Ingot +item.itemDustFrancium.name=Francium Dust +item.itemDustTinyFrancium.name=Tiny Pile of Francium Dust +item.itemDustSmallFrancium.name=Small Pile of Francium Dust +item.itemNuggetFrancium.name=Francium Nugget +item.itemPlateFrancium.name=Francium Plate +item.itemPlateDoubleFrancium.name=Double Francium Plate +item.itemIngotRadium.name=Radium Ingot +item.itemDustRadium.name=Radium Dust +item.itemDustTinyRadium.name=Tiny Pile of Radium Dust +item.itemDustSmallRadium.name=Small Pile of Radium Dust +item.itemNuggetRadium.name=Radium Nugget +item.itemPlateRadium.name=Radium Plate +item.itemPlateDoubleRadium.name=Double Radium Plate +item.itemIngotActinium.name=Actinium Ingot +item.itemDustActinium.name=Actinium Dust +item.itemDustTinyActinium.name=Tiny Pile of Actinium Dust +item.itemDustSmallActinium.name=Small Pile of Actinium Dust +item.itemNuggetActinium.name=Actinium Nugget +item.itemPlateActinium.name=Actinium Plate +item.itemPlateDoubleActinium.name=Double Actinium Plate +item.itemIngotProtactinium.name=Protactinium Ingot +item.itemDustProtactinium.name=Protactinium Dust +item.itemDustTinyProtactinium.name=Tiny Pile of Protactinium Dust +item.itemDustSmallProtactinium.name=Small Pile of Protactinium Dust +item.itemNuggetProtactinium.name=Protactinium Nugget +item.itemPlateProtactinium.name=Protactinium Plate +item.itemPlateDoubleProtactinium.name=Double Protactinium Plate +item.itemIngotNeptunium.name=Neptunium Ingot +item.itemDustNeptunium.name=Neptunium Dust +item.itemDustTinyNeptunium.name=Tiny Pile of Neptunium Dust +item.itemDustSmallNeptunium.name=Small Pile of Neptunium Dust +item.itemNuggetNeptunium.name=Neptunium Nugget +item.itemPlateNeptunium.name=Neptunium Plate +item.itemPlateDoubleNeptunium.name=Double Neptunium Plate +item.itemIngotCurium.name=Curium Ingot +item.itemDustCurium.name=Curium Dust +item.itemDustTinyCurium.name=Tiny Pile of Curium Dust +item.itemDustSmallCurium.name=Small Pile of Curium Dust +item.itemNuggetCurium.name=Curium Nugget +item.itemPlateCurium.name=Curium Plate +item.itemPlateDoubleCurium.name=Double Curium Plate +item.itemIngotBerkelium.name=Berkelium Ingot +item.itemDustBerkelium.name=Berkelium Dust +item.itemDustTinyBerkelium.name=Tiny Pile of Berkelium Dust +item.itemDustSmallBerkelium.name=Small Pile of Berkelium Dust +item.itemNuggetBerkelium.name=Berkelium Nugget +item.itemPlateBerkelium.name=Berkelium Plate +item.itemPlateDoubleBerkelium.name=Double Berkelium Plate +item.itemIngotCalifornium.name=Californium Ingot +item.itemDustCalifornium.name=Californium Dust +item.itemDustTinyCalifornium.name=Tiny Pile of Californium Dust +item.itemDustSmallCalifornium.name=Small Pile of Californium Dust +item.itemNuggetCalifornium.name=Californium Nugget +item.itemPlateCalifornium.name=Californium Plate +item.itemPlateDoubleCalifornium.name=Double Californium Plate +item.itemIngotEinsteinium.name=Einsteinium Ingot +item.itemDustEinsteinium.name=Einsteinium Dust +item.itemDustTinyEinsteinium.name=Tiny Pile of Einsteinium Dust +item.itemDustSmallEinsteinium.name=Small Pile of Einsteinium Dust +item.itemNuggetEinsteinium.name=Einsteinium Nugget +item.itemPlateEinsteinium.name=Einsteinium Plate +item.itemPlateDoubleEinsteinium.name=Double Einsteinium Plate +item.itemIngotFermium.name=Fermium Ingot +item.itemDustFermium.name=Fermium Dust +item.itemDustTinyFermium.name=Tiny Pile of Fermium Dust +item.itemDustSmallFermium.name=Small Pile of Fermium Dust +item.itemNuggetFermium.name=Fermium Nugget +item.itemPlateFermium.name=Fermium Plate +item.itemPlateDoubleFermium.name=Double Fermium Plate +item.itemIngotLithium7.name=Lithium 7 Ingot +item.itemDustLithium7.name=Lithium 7 Dust +item.itemDustTinyLithium7.name=Tiny Pile of Lithium 7 Dust +item.itemDustSmallLithium7.name=Small Pile of Lithium 7 Dust +item.itemNuggetLithium7.name=Lithium 7 Nugget +item.itemPlateLithium7.name=Lithium 7 Plate +item.itemPlateDoubleLithium7.name=Double Lithium 7 Plate +item.itemIngotThorium232.name=Thorium 232 Ingot +item.itemDustThorium232.name=Thorium 232 Dust +item.itemDustTinyThorium232.name=Tiny Pile of Thorium 232 Dust +item.itemDustSmallThorium232.name=Small Pile of Thorium 232 Dust +item.itemNuggetThorium232.name=Thorium 232 Nugget +item.itemPlateThorium232.name=Thorium 232 Plate +item.itemPlateDoubleThorium232.name=Double Thorium 232 Plate +item.itemIngotUranium232.name=Uranium 232 Ingot +item.itemDustUranium232.name=Uranium 232 Dust +item.itemDustTinyUranium232.name=Tiny Pile of Uranium 232 Dust +item.itemDustSmallUranium232.name=Small Pile of Uranium 232 Dust +item.itemNuggetUranium232.name=Uranium 232 Nugget +item.itemPlateUranium232.name=Uranium 232 Plate +item.itemRodUranium232.name=Uranium 232 Rod +item.itemRodLongUranium232.name=Long Uranium 232 Rod +item.itemIngotUranium233.name=Uranium 233 Ingot +item.itemDustUranium233.name=Uranium 233 Dust +item.itemDustTinyUranium233.name=Tiny Pile of Uranium 233 Dust +item.itemDustSmallUranium233.name=Small Pile of Uranium 233 Dust +item.itemNuggetUranium233.name=Uranium 233 Nugget +item.itemPlateUranium233.name=Uranium 233 Plate +item.itemRodUranium233.name=Uranium 233 Rod +item.itemRodLongUranium233.name=Long Uranium 233 Rod +item.itemIngotPlutonium238.name=Plutonium 238 Ingot +item.itemDustPlutonium238.name=Plutonium 238 Dust +item.itemDustTinyPlutonium238.name=Tiny Pile of Plutonium 238 Dust +item.itemDustSmallPlutonium238.name=Small Pile of Plutonium 238 Dust +item.itemNuggetPlutonium238.name=Plutonium 238 Nugget +item.itemPlatePlutonium238.name=Plutonium 238 Plate +item.itemPlateDoublePlutonium238.name=Double Plutonium 238 Plate +item.itemIngotStrontium90.name=Strontium 90 Ingot +item.itemDustStrontium90.name=Strontium 90 Dust +item.itemDustTinyStrontium90.name=Tiny Pile of Strontium 90 Dust +item.itemDustSmallStrontium90.name=Small Pile of Strontium 90 Dust +item.itemNuggetStrontium90.name=Strontium 90 Nugget +item.itemPlateStrontium90.name=Strontium 90 Plate +item.itemPlateDoubleStrontium90.name=Double Strontium 90 Plate +item.itemIngotPolonium210.name=Polonium 210 Ingot +item.itemDustPolonium210.name=Polonium 210 Dust +item.itemDustTinyPolonium210.name=Tiny Pile of Polonium 210 Dust +item.itemDustSmallPolonium210.name=Small Pile of Polonium 210 Dust +item.itemNuggetPolonium210.name=Polonium 210 Nugget +item.itemPlatePolonium210.name=Polonium 210 Plate +item.itemPlateDoublePolonium210.name=Double Polonium 210 Plate +item.itemIngotAmericium241.name=Americium 241 Ingot +item.itemDustAmericium241.name=Americium 241 Dust +item.itemDustTinyAmericium241.name=Tiny Pile of Americium 241 Dust +item.itemDustSmallAmericium241.name=Small Pile of Americium 241 Dust +item.itemNuggetAmericium241.name=Americium 241 Nugget +item.itemPlateAmericium241.name=Americium 241 Plate +item.itemPlateDoubleAmericium241.name=Double Americium 241 Plate +item.itemIngotSiliconCarbide.name=Silicon Carbide Ingot +item.itemDustSiliconCarbide.name=Silicon Carbide Dust +item.itemDustTinySiliconCarbide.name=Tiny Pile of Silicon Carbide Dust +item.itemDustSmallSiliconCarbide.name=Small Pile of Silicon Carbide Dust +item.itemNuggetSiliconCarbide.name=Silicon Carbide Nugget +item.itemPlateSiliconCarbide.name=Silicon Carbide Plate +item.itemPlateDoubleSiliconCarbide.name=Double Silicon Carbide Plate +item.itemBoltSiliconCarbide.name=Silicon Carbide Bolt +item.itemRodSiliconCarbide.name=Silicon Carbide Rod +item.itemRodLongSiliconCarbide.name=Long Silicon Carbide Rod +item.itemRingSiliconCarbide.name=Silicon Carbide Ring +item.itemScrewSiliconCarbide.name=Silicon Carbide Screw +item.itemRotorSiliconCarbide.name=Silicon Carbide Rotor +item.itemGearSiliconCarbide.name=Silicon Carbide Gear +item.itemIngotZirconiumCarbide.name=Zirconium Carbide Ingot +item.itemHotIngotZirconiumCarbide.name=Hot Zirconium Carbide Ingot +item.itemDustZirconiumCarbide.name=Zirconium Carbide Dust +item.itemDustTinyZirconiumCarbide.name=Tiny Pile of Zirconium Carbide Dust +item.itemDustSmallZirconiumCarbide.name=Small Pile of Zirconium Carbide Dust +item.itemNuggetZirconiumCarbide.name=Zirconium Carbide Nugget +item.itemPlateZirconiumCarbide.name=Zirconium Carbide Plate +item.itemPlateDoubleZirconiumCarbide.name=Double Zirconium Carbide Plate +item.itemBoltZirconiumCarbide.name=Zirconium Carbide Bolt +item.itemRodZirconiumCarbide.name=Zirconium Carbide Rod +item.itemRodLongZirconiumCarbide.name=Long Zirconium Carbide Rod +item.itemRingZirconiumCarbide.name=Zirconium Carbide Ring +item.itemScrewZirconiumCarbide.name=Zirconium Carbide Screw +item.itemRotorZirconiumCarbide.name=Zirconium Carbide Rotor +item.itemGearZirconiumCarbide.name=Zirconium Carbide Gear +item.itemIngotTantalumCarbide.name=Tantalum Carbide Ingot +item.itemHotIngotTantalumCarbide.name=Hot Tantalum Carbide Ingot +item.itemDustTantalumCarbide.name=Tantalum Carbide Dust +item.itemDustTinyTantalumCarbide.name=Tiny Pile of Tantalum Carbide Dust +item.itemDustSmallTantalumCarbide.name=Small Pile of Tantalum Carbide Dust +item.itemNuggetTantalumCarbide.name=Tantalum Carbide Nugget +item.itemPlateTantalumCarbide.name=Tantalum Carbide Plate +item.itemPlateDoubleTantalumCarbide.name=Double Tantalum Carbide Plate +item.itemBoltTantalumCarbide.name=Tantalum Carbide Bolt +item.itemRodTantalumCarbide.name=Tantalum Carbide Rod +item.itemRodLongTantalumCarbide.name=Long Tantalum Carbide Rod +item.itemRingTantalumCarbide.name=Tantalum Carbide Ring +item.itemScrewTantalumCarbide.name=Tantalum Carbide Screw +item.itemRotorTantalumCarbide.name=Tantalum Carbide Rotor +item.itemGearTantalumCarbide.name=Tantalum Carbide Gear +item.itemIngotNiobiumCarbide.name=Niobium Carbide Ingot +item.itemHotIngotNiobiumCarbide.name=Hot Niobium Carbide Ingot +item.itemDustNiobiumCarbide.name=Niobium Carbide Dust +item.itemDustTinyNiobiumCarbide.name=Tiny Pile of Niobium Carbide Dust +item.itemDustSmallNiobiumCarbide.name=Small Pile of Niobium Carbide Dust +item.itemNuggetNiobiumCarbide.name=Niobium Carbide Nugget +item.itemPlateNiobiumCarbide.name=Niobium Carbide Plate +item.itemPlateDoubleNiobiumCarbide.name=Double Niobium Carbide Plate +item.itemBoltNiobiumCarbide.name=Niobium Carbide Bolt +item.itemRodNiobiumCarbide.name=Niobium Carbide Rod +item.itemRodLongNiobiumCarbide.name=Long Niobium Carbide Rod +item.itemRingNiobiumCarbide.name=Niobium Carbide Ring +item.itemScrewNiobiumCarbide.name=Niobium Carbide Screw +item.itemRotorNiobiumCarbide.name=Niobium Carbide Rotor +item.itemGearNiobiumCarbide.name=Niobium Carbide Gear +item.itemIngotBerylliumFluoride.name=Beryllium Fluoride Ingot +item.itemDustBerylliumFluoride.name=Beryllium Fluoride Dust +item.itemDustTinyBerylliumFluoride.name=Tiny Pile of Beryllium Fluoride Dust +item.itemDustSmallBerylliumFluoride.name=Small Pile of Beryllium Fluoride Dust +item.itemNuggetBerylliumFluoride.name=Beryllium Fluoride Nugget +item.itemPlateBerylliumFluoride.name=Beryllium Fluoride Plate +item.itemPlateDoubleBerylliumFluoride.name=Double Beryllium Fluoride Plate +item.itemIngotLithiumFluoride.name=Lithium Fluoride Ingot +item.itemDustLithiumFluoride.name=Lithium Fluoride Dust +item.itemDustTinyLithiumFluoride.name=Tiny Pile of Lithium Fluoride Dust +item.itemDustSmallLithiumFluoride.name=Small Pile of Lithium Fluoride Dust +item.itemNuggetLithiumFluoride.name=Lithium Fluoride Nugget +item.itemPlateLithiumFluoride.name=Lithium Fluoride Plate +item.itemPlateDoubleLithiumFluoride.name=Double Lithium Fluoride Plate +item.itemIngotThoriumTetrafluoride.name=Thorium Tetrafluoride Ingot +item.itemDustThoriumTetrafluoride.name=Thorium Tetrafluoride Dust +item.itemDustTinyThoriumTetrafluoride.name=Tiny Pile of Thorium Tetrafluoride Dust +item.itemDustSmallThoriumTetrafluoride.name=Small Pile of Thorium Tetrafluoride Dust +item.itemNuggetThoriumTetrafluoride.name=Thorium Tetrafluoride Nugget +item.itemPlateThoriumTetrafluoride.name=Thorium Tetrafluoride Plate +item.itemPlateDoubleThoriumTetrafluoride.name=Double Thorium Tetrafluoride Plate +item.itemIngotThoriumHexafluoride.name=Thorium Hexafluoride Ingot +item.itemDustThoriumHexafluoride.name=Thorium Hexafluoride Dust +item.itemDustTinyThoriumHexafluoride.name=Tiny Pile of Thorium Hexafluoride Dust +item.itemDustSmallThoriumHexafluoride.name=Small Pile of Thorium Hexafluoride Dust +item.itemNuggetThoriumHexafluoride.name=Thorium Hexafluoride Nugget +item.itemPlateThoriumHexafluoride.name=Thorium Hexafluoride Plate +item.itemPlateDoubleThoriumHexafluoride.name=Double Thorium Hexafluoride Plate +item.itemIngotUraniumTetrafluoride.name=Uranium Tetrafluoride Ingot +item.itemDustUraniumTetrafluoride.name=Uranium Tetrafluoride Dust +item.itemDustTinyUraniumTetrafluoride.name=Tiny Pile of Uranium Tetrafluoride Dust +item.itemDustSmallUraniumTetrafluoride.name=Small Pile of Uranium Tetrafluoride Dust +item.itemNuggetUraniumTetrafluoride.name=Uranium Tetrafluoride Nugget +item.itemPlateUraniumTetrafluoride.name=Uranium Tetrafluoride Plate +item.itemPlateDoubleUraniumTetrafluoride.name=Double Uranium Tetrafluoride Plate +item.itemIngotUraniumHexafluoride.name=Uranium Hexafluoride Ingot +item.itemDustUraniumHexafluoride.name=Uranium Hexafluoride Dust +item.itemDustTinyUraniumHexafluoride.name=Tiny Pile of Uranium Hexafluoride Dust +item.itemDustSmallUraniumHexafluoride.name=Small Pile of Uranium Hexafluoride Dust +item.itemNuggetUraniumHexafluoride.name=Uranium Hexafluoride Nugget +item.itemPlateUraniumHexafluoride.name=Uranium Hexafluoride Plate +item.itemPlateDoubleUraniumHexafluoride.name=Double Uranium Hexafluoride Plate +item.itemIngotZirconiumTetrafluoride.name=Zirconium Tetrafluoride Ingot +item.itemDustZirconiumTetrafluoride.name=Zirconium Tetrafluoride Dust +item.itemDustTinyZirconiumTetrafluoride.name=Tiny Pile of Zirconium Tetrafluoride Dust +item.itemDustSmallZirconiumTetrafluoride.name=Small Pile of Zirconium Tetrafluoride Dust +item.itemNuggetZirconiumTetrafluoride.name=Zirconium Tetrafluoride Nugget +item.itemPlateZirconiumTetrafluoride.name=Zirconium Tetrafluoride Plate +item.itemPlateDoubleZirconiumTetrafluoride.name=Double Zirconium Tetrafluoride Plate +item.itemIngotNeptuniumHexafluoride.name=Neptunium Hexafluoride Ingot +item.itemDustNeptuniumHexafluoride.name=Neptunium Hexafluoride Dust +item.itemDustTinyNeptuniumHexafluoride.name=Tiny Pile of Neptunium Hexafluoride Dust +item.itemDustSmallNeptuniumHexafluoride.name=Small Pile of Neptunium Hexafluoride Dust +item.itemNuggetNeptuniumHexafluoride.name=Neptunium Hexafluoride Nugget +item.itemPlateNeptuniumHexafluoride.name=Neptunium Hexafluoride Plate +item.itemPlateDoubleNeptuniumHexafluoride.name=Double Neptunium Hexafluoride Plate +item.itemIngotTechnetiumHexafluoride.name=Technetium Hexafluoride Ingot +item.itemDustTechnetiumHexafluoride.name=Technetium Hexafluoride Dust +item.itemDustTinyTechnetiumHexafluoride.name=Tiny Pile of Technetium Hexafluoride Dust +item.itemDustSmallTechnetiumHexafluoride.name=Small Pile of Technetium Hexafluoride Dust +item.itemNuggetTechnetiumHexafluoride.name=Technetium Hexafluoride Nugget +item.itemPlateTechnetiumHexafluoride.name=Technetium Hexafluoride Plate +item.itemPlateDoubleTechnetiumHexafluoride.name=Double Technetium Hexafluoride Plate +item.itemIngotSeleniumHexafluoride.name=Selenium Hexafluoride Ingot +item.itemDustSeleniumHexafluoride.name=Selenium Hexafluoride Dust +item.itemDustTinySeleniumHexafluoride.name=Tiny Pile of Selenium Hexafluoride Dust +item.itemDustSmallSeleniumHexafluoride.name=Small Pile of Selenium Hexafluoride Dust +item.itemNuggetSeleniumHexafluoride.name=Selenium Hexafluoride Nugget +item.itemPlateSeleniumHexafluoride.name=Selenium Hexafluoride Plate +item.itemPlateDoubleSeleniumHexafluoride.name=Double Selenium Hexafluoride Plate +item.itemIngotLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Ingot +item.itemDustLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Dust +item.itemDustTinyLiFBeF2ZrF4U235.name=Tiny Pile of LiFBeF2ZrF4U235 Dust +item.itemDustSmallLiFBeF2ZrF4U235.name=Small Pile of LiFBeF2ZrF4U235 Dust +item.itemNuggetLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Nugget +item.itemPlateLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Plate +item.itemPlateDoubleLiFBeF2ZrF4U235.name=Double LiFBeF2ZrF4U235 Plate +item.itemIngotLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Ingot +item.itemDustLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Dust +item.itemDustTinyLiFBeF2ZrF4UF4.name=Tiny Pile of LiFBeF2ZrF4UF4 Dust +item.itemDustSmallLiFBeF2ZrF4UF4.name=Small Pile of LiFBeF2ZrF4UF4 Dust +item.itemNuggetLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Nugget +item.itemPlateLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Plate +item.itemPlateDoubleLiFBeF2ZrF4UF4.name=Double LiFBeF2ZrF4UF4 Plate +item.itemIngotLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Ingot +item.itemDustLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Dust +item.itemDustTinyLiFBeF2ThF4UF4.name=Tiny Pile of LiFBeF2ThF4UF4 Dust +item.itemDustSmallLiFBeF2ThF4UF4.name=Small Pile of LiFBeF2ThF4UF4 Dust +item.itemNuggetLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Nugget +item.itemPlateLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Plate +item.itemPlateDoubleLiFBeF2ThF4UF4.name=Double LiFBeF2ThF4UF4 Plate +item.itemIngotEnergyCrystal.name=Energy Crystal Ingot +item.itemHotIngotEnergyCrystal.name=Hot Energy Crystal Ingot +item.itemDustEnergyCrystal.name=Energy Crystal Dust +item.itemDustTinyEnergyCrystal.name=Tiny Pile of Energy Crystal Dust +item.itemDustSmallEnergyCrystal.name=Small Pile of Energy Crystal Dust +item.itemNuggetEnergyCrystal.name=Energy Crystal Nugget +item.itemPlateEnergyCrystal.name=Energy Crystal Plate +item.itemPlateDoubleEnergyCrystal.name=Double Energy Crystal Plate +item.itemBoltEnergyCrystal.name=Energy Crystal Bolt +item.itemRodEnergyCrystal.name=Energy Crystal Rod +item.itemRodLongEnergyCrystal.name=Long Energy Crystal Rod +item.itemRingEnergyCrystal.name=Energy Crystal Ring +item.itemScrewEnergyCrystal.name=Energy Crystal Screw +item.itemRotorEnergyCrystal.name=Energy Crystal Rotor +item.itemGearEnergyCrystal.name=Energy Crystal Gear +item.itemIngotBloodSteel.name=Blood Steel Ingot +item.itemDustBloodSteel.name=Blood Steel Dust +item.itemDustTinyBloodSteel.name=Tiny Pile of Blood Steel Dust +item.itemDustSmallBloodSteel.name=Small Pile of Blood Steel Dust +item.itemNuggetBloodSteel.name=Blood Steel Nugget +item.itemPlateBloodSteel.name=Blood Steel Plate +item.itemPlateDoubleBloodSteel.name=Double Blood Steel Plate +item.itemBoltBloodSteel.name=Blood Steel Bolt +item.itemRodBloodSteel.name=Blood Steel Rod +item.itemRodLongBloodSteel.name=Long Blood Steel Rod +item.itemRingBloodSteel.name=Blood Steel Ring +item.itemScrewBloodSteel.name=Blood Steel Screw +item.itemRotorBloodSteel.name=Blood Steel Rotor +item.itemGearBloodSteel.name=Blood Steel Gear +item.itemIngotZeron100.name=Zeron-100 Ingot +item.itemHotIngotZeron100.name=Hot Zeron-100 Ingot +item.itemDustZeron100.name=Zeron-100 Dust +item.itemDustTinyZeron100.name=Tiny Pile of Zeron-100 Dust +item.itemDustSmallZeron100.name=Small Pile of Zeron-100 Dust +item.itemNuggetZeron100.name=Zeron-100 Nugget +item.itemPlateZeron100.name=Zeron-100 Plate +item.itemPlateDoubleZeron100.name=Double Zeron-100 Plate +item.itemBoltZeron100.name=Zeron-100 Bolt +item.itemRodZeron100.name=Zeron-100 Rod +item.itemRodLongZeron100.name=Long Zeron-100 Rod +item.itemRingZeron100.name=Zeron-100 Ring +item.itemScrewZeron100.name=Zeron-100 Screw +item.itemRotorZeron100.name=Zeron-100 Rotor +item.itemGearZeron100.name=Zeron-100 Gear +item.itemIngotTumbaga.name=Tumbaga Ingot +item.itemDustTumbaga.name=Tumbaga Dust +item.itemDustTinyTumbaga.name=Tiny Pile of Tumbaga Dust +item.itemDustSmallTumbaga.name=Small Pile of Tumbaga Dust +item.itemNuggetTumbaga.name=Tumbaga Nugget +item.itemPlateTumbaga.name=Tumbaga Plate +item.itemPlateDoubleTumbaga.name=Double Tumbaga Plate +item.itemBoltTumbaga.name=Tumbaga Bolt +item.itemRodTumbaga.name=Tumbaga Rod +item.itemRodLongTumbaga.name=Long Tumbaga Rod +item.itemRingTumbaga.name=Tumbaga Ring +item.itemScrewTumbaga.name=Tumbaga Screw +item.itemRotorTumbaga.name=Tumbaga Rotor +item.itemGearTumbaga.name=Tumbaga Gear +item.itemIngotPotin.name=Potin Ingot +item.itemDustPotin.name=Potin Dust +item.itemDustTinyPotin.name=Tiny Pile of Potin Dust +item.itemDustSmallPotin.name=Small Pile of Potin Dust +item.itemNuggetPotin.name=Potin Nugget +item.itemPlatePotin.name=Potin Plate +item.itemPlateDoublePotin.name=Double Potin Plate +item.itemBoltPotin.name=Potin Bolt +item.itemRodPotin.name=Potin Rod +item.itemRodLongPotin.name=Long Potin Rod +item.itemRingPotin.name=Potin Ring +item.itemScrewPotin.name=Potin Screw +item.itemRotorPotin.name=Potin Rotor +item.itemGearPotin.name=Potin Gear +item.itemIngotStaballoy.name=Staballoy Ingot +item.itemHotIngotStaballoy.name=Hot Staballoy Ingot +item.itemDustStaballoy.name=Staballoy Dust +item.itemDustTinyStaballoy.name=Tiny Pile of Staballoy Dust +item.itemDustSmallStaballoy.name=Small Pile of Staballoy Dust +item.itemNuggetStaballoy.name=Staballoy Nugget +item.itemPlateStaballoy.name=Staballoy Plate +item.itemPlateDoubleStaballoy.name=Double Staballoy Plate +item.itemBoltStaballoy.name=Staballoy Bolt +item.itemRodStaballoy.name=Staballoy Rod +item.itemRodLongStaballoy.name=Long Staballoy Rod +item.itemRingStaballoy.name=Staballoy Ring +item.itemScrewStaballoy.name=Staballoy Screw +item.itemRotorStaballoy.name=Staballoy Rotor +item.itemGearStaballoy.name=Staballoy Gear +item.itemIngotTantalloy60.name=Tantalloy-60 Ingot +item.itemHotIngotTantalloy60.name=Hot Tantalloy-60 Ingot +item.itemDustTantalloy60.name=Tantalloy-60 Dust +item.itemDustTinyTantalloy60.name=Tiny Pile of Tantalloy-60 Dust +item.itemDustSmallTantalloy60.name=Small Pile of Tantalloy-60 Dust +item.itemNuggetTantalloy60.name=Tantalloy-60 Nugget +item.itemPlateTantalloy60.name=Tantalloy-60 Plate +item.itemPlateDoubleTantalloy60.name=Double Tantalloy-60 Plate +item.itemBoltTantalloy60.name=Tantalloy-60 Bolt +item.itemRodTantalloy60.name=Tantalloy-60 Rod +item.itemRodLongTantalloy60.name=Long Tantalloy-60 Rod +item.itemRingTantalloy60.name=Tantalloy-60 Ring +item.itemScrewTantalloy60.name=Tantalloy-60 Screw +item.itemRotorTantalloy60.name=Tantalloy-60 Rotor +item.itemGearTantalloy60.name=Tantalloy-60 Gear +item.itemIngotTantalloy61.name=Tantalloy-61 Ingot +item.itemHotIngotTantalloy61.name=Hot Tantalloy-61 Ingot +item.itemDustTantalloy61.name=Tantalloy-61 Dust +item.itemDustTinyTantalloy61.name=Tiny Pile of Tantalloy-61 Dust +item.itemDustSmallTantalloy61.name=Small Pile of Tantalloy-61 Dust +item.itemNuggetTantalloy61.name=Tantalloy-61 Nugget +item.itemPlateTantalloy61.name=Tantalloy-61 Plate +item.itemPlateDoubleTantalloy61.name=Double Tantalloy-61 Plate +item.itemBoltTantalloy61.name=Tantalloy-61 Bolt +item.itemRodTantalloy61.name=Tantalloy-61 Rod +item.itemRodLongTantalloy61.name=Long Tantalloy-61 Rod +item.itemRingTantalloy61.name=Tantalloy-61 Ring +item.itemScrewTantalloy61.name=Tantalloy-61 Screw +item.itemRotorTantalloy61.name=Tantalloy-61 Rotor +item.itemGearTantalloy61.name=Tantalloy-61 Gear +item.itemIngotInconel625.name=Inconel-625 Ingot +item.itemHotIngotInconel625.name=Hot Inconel-625 Ingot +item.itemDustInconel625.name=Inconel-625 Dust +item.itemDustTinyInconel625.name=Tiny Pile of Inconel-625 Dust +item.itemDustSmallInconel625.name=Small Pile of Inconel-625 Dust +item.itemNuggetInconel625.name=Inconel-625 Nugget +item.itemPlateInconel625.name=Inconel-625 Plate +item.itemPlateDoubleInconel625.name=Double Inconel-625 Plate +item.itemBoltInconel625.name=Inconel-625 Bolt +item.itemRodInconel625.name=Inconel-625 Rod +item.itemRodLongInconel625.name=Long Inconel-625 Rod +item.itemRingInconel625.name=Inconel-625 Ring +item.itemScrewInconel625.name=Inconel-625 Screw +item.itemRotorInconel625.name=Inconel-625 Rotor +item.itemGearInconel625.name=Inconel-625 Gear +item.itemIngotInconel690.name=Inconel-690 Ingot +item.itemHotIngotInconel690.name=Hot Inconel-690 Ingot +item.itemDustInconel690.name=Inconel-690 Dust +item.itemDustTinyInconel690.name=Tiny Pile of Inconel-690 Dust +item.itemDustSmallInconel690.name=Small Pile of Inconel-690 Dust +item.itemNuggetInconel690.name=Inconel-690 Nugget +item.itemPlateInconel690.name=Inconel-690 Plate +item.itemPlateDoubleInconel690.name=Double Inconel-690 Plate +item.itemBoltInconel690.name=Inconel-690 Bolt +item.itemRodInconel690.name=Inconel-690 Rod +item.itemRodLongInconel690.name=Long Inconel-690 Rod +item.itemRingInconel690.name=Inconel-690 Ring +item.itemScrewInconel690.name=Inconel-690 Screw +item.itemRotorInconel690.name=Inconel-690 Rotor +item.itemGearInconel690.name=Inconel-690 Gear +item.itemIngotInconel792.name=Inconel-792 Ingot +item.itemHotIngotInconel792.name=Hot Inconel-792 Ingot +item.itemDustInconel792.name=Inconel-792 Dust +item.itemDustTinyInconel792.name=Tiny Pile of Inconel-792 Dust +item.itemDustSmallInconel792.name=Small Pile of Inconel-792 Dust +item.itemNuggetInconel792.name=Inconel-792 Nugget +item.itemPlateInconel792.name=Inconel-792 Plate +item.itemPlateDoubleInconel792.name=Double Inconel-792 Plate +item.itemBoltInconel792.name=Inconel-792 Bolt +item.itemRodInconel792.name=Inconel-792 Rod +item.itemRodLongInconel792.name=Long Inconel-792 Rod +item.itemRingInconel792.name=Inconel-792 Ring +item.itemScrewInconel792.name=Inconel-792 Screw +item.itemRotorInconel792.name=Inconel-792 Rotor +item.itemGearInconel792.name=Inconel-792 Gear +item.itemDustEglinSteelBaseCompound.name=Eglin Steel Base Compound Dust +item.itemDustTinyEglinSteelBaseCompound.name=Tiny Pile of Eglin Steel Base Compound Dust +item.itemDustSmallEglinSteelBaseCompound.name=Small Pile of Eglin Steel Base Compound Dust +item.itemIngotEglinSteel.name=Eglin Steel Ingot +item.itemDustEglinSteel.name=Eglin Steel Dust +item.itemDustTinyEglinSteel.name=Tiny Pile of Eglin Steel Dust +item.itemDustSmallEglinSteel.name=Small Pile of Eglin Steel Dust +item.itemNuggetEglinSteel.name=Eglin Steel Nugget +item.itemPlateEglinSteel.name=Eglin Steel Plate +item.itemPlateDoubleEglinSteel.name=Double Eglin Steel Plate +item.itemBoltEglinSteel.name=Eglin Steel Bolt +item.itemRodEglinSteel.name=Eglin Steel Rod +item.itemRodLongEglinSteel.name=Long Eglin Steel Rod +item.itemRingEglinSteel.name=Eglin Steel Ring +item.itemScrewEglinSteel.name=Eglin Steel Screw +item.itemRotorEglinSteel.name=Eglin Steel Rotor +item.itemGearEglinSteel.name=Eglin Steel Gear +item.itemIngotMaragingSteel250.name=Maraging Steel 250 Ingot +item.itemHotIngotMaragingSteel250.name=Hot Maraging Steel 250 Ingot +item.itemDustMaragingSteel250.name=Maraging Steel 250 Dust +item.itemDustTinyMaragingSteel250.name=Tiny Pile of Maraging Steel 250 Dust +item.itemDustSmallMaragingSteel250.name=Small Pile of Maraging Steel 250 Dust +item.itemNuggetMaragingSteel250.name=Maraging Steel 250 Nugget +item.itemPlateMaragingSteel250.name=Maraging Steel 250 Plate +item.itemPlateDoubleMaragingSteel250.name=Double Maraging Steel 250 Plate +item.itemBoltMaragingSteel250.name=Maraging Steel 250 Bolt +item.itemRodMaragingSteel250.name=Maraging Steel 250 Rod +item.itemRodLongMaragingSteel250.name=Long Maraging Steel 250 Rod +item.itemRingMaragingSteel250.name=Maraging Steel 250 Ring +item.itemScrewMaragingSteel250.name=Maraging Steel 250 Screw +item.itemRotorMaragingSteel250.name=Maraging Steel 250 Rotor +item.itemGearMaragingSteel250.name=Maraging Steel 250 Gear +item.itemIngotMaragingSteel300.name=Maraging Steel 300 Ingot +item.itemHotIngotMaragingSteel300.name=Hot Maraging Steel 300 Ingot +item.itemDustMaragingSteel300.name=Maraging Steel 300 Dust +item.itemDustTinyMaragingSteel300.name=Tiny Pile of Maraging Steel 300 Dust +item.itemDustSmallMaragingSteel300.name=Small Pile of Maraging Steel 300 Dust +item.itemNuggetMaragingSteel300.name=Maraging Steel 300 Nugget +item.itemPlateMaragingSteel300.name=Maraging Steel 300 Plate +item.itemPlateDoubleMaragingSteel300.name=Double Maraging Steel 300 Plate +item.itemBoltMaragingSteel300.name=Maraging Steel 300 Bolt +item.itemRodMaragingSteel300.name=Maraging Steel 300 Rod +item.itemRodLongMaragingSteel300.name=Long Maraging Steel 300 Rod +item.itemRingMaragingSteel300.name=Maraging Steel 300 Ring +item.itemScrewMaragingSteel300.name=Maraging Steel 300 Screw +item.itemRotorMaragingSteel300.name=Maraging Steel 300 Rotor +item.itemGearMaragingSteel300.name=Maraging Steel 300 Gear +item.itemIngotMaragingSteel350.name=Maraging Steel 350 Ingot +item.itemHotIngotMaragingSteel350.name=Hot Maraging Steel 350 Ingot +item.itemDustMaragingSteel350.name=Maraging Steel 350 Dust +item.itemDustTinyMaragingSteel350.name=Tiny Pile of Maraging Steel 350 Dust +item.itemDustSmallMaragingSteel350.name=Small Pile of Maraging Steel 350 Dust +item.itemNuggetMaragingSteel350.name=Maraging Steel 350 Nugget +item.itemPlateMaragingSteel350.name=Maraging Steel 350 Plate +item.itemPlateDoubleMaragingSteel350.name=Double Maraging Steel 350 Plate +item.itemBoltMaragingSteel350.name=Maraging Steel 350 Bolt +item.itemRodMaragingSteel350.name=Maraging Steel 350 Rod +item.itemRodLongMaragingSteel350.name=Long Maraging Steel 350 Rod +item.itemRingMaragingSteel350.name=Maraging Steel 350 Ring +item.itemScrewMaragingSteel350.name=Maraging Steel 350 Screw +item.itemRotorMaragingSteel350.name=Maraging Steel 350 Rotor +item.itemGearMaragingSteel350.name=Maraging Steel 350 Gear +item.itemIngotStellite.name=Stellite Ingot +item.itemHotIngotStellite.name=Hot Stellite Ingot +item.itemDustStellite.name=Stellite Dust +item.itemDustTinyStellite.name=Tiny Pile of Stellite Dust +item.itemDustSmallStellite.name=Small Pile of Stellite Dust +item.itemNuggetStellite.name=Stellite Nugget +item.itemPlateStellite.name=Stellite Plate +item.itemPlateDoubleStellite.name=Double Stellite Plate +item.itemBoltStellite.name=Stellite Bolt +item.itemRodStellite.name=Stellite Rod +item.itemRodLongStellite.name=Long Stellite Rod +item.itemRingStellite.name=Stellite Ring +item.itemScrewStellite.name=Stellite Screw +item.itemRotorStellite.name=Stellite Rotor +item.itemGearStellite.name=Stellite Gear +item.itemIngotTalonite.name=Talonite Ingot +item.itemDustTalonite.name=Talonite Dust +item.itemDustTinyTalonite.name=Tiny Pile of Talonite Dust +item.itemDustSmallTalonite.name=Small Pile of Talonite Dust +item.itemNuggetTalonite.name=Talonite Nugget +item.itemPlateTalonite.name=Talonite Plate +item.itemPlateDoubleTalonite.name=Double Talonite Plate +item.itemBoltTalonite.name=Talonite Bolt +item.itemRodTalonite.name=Talonite Rod +item.itemRodLongTalonite.name=Long Talonite Rod +item.itemRingTalonite.name=Talonite Ring +item.itemScrewTalonite.name=Talonite Screw +item.itemRotorTalonite.name=Talonite Rotor +item.itemGearTalonite.name=Talonite Gear +item.itemIngotHastelloyW.name=Hastelloy-W Ingot +item.itemDustHastelloyW.name=Hastelloy-W Dust +item.itemDustTinyHastelloyW.name=Tiny Pile of Hastelloy-W Dust +item.itemDustSmallHastelloyW.name=Small Pile of Hastelloy-W Dust +item.itemNuggetHastelloyW.name=Hastelloy-W Nugget +item.itemPlateHastelloyW.name=Hastelloy-W Plate +item.itemPlateDoubleHastelloyW.name=Double Hastelloy-W Plate +item.itemBoltHastelloyW.name=Hastelloy-W Bolt +item.itemRodHastelloyW.name=Hastelloy-W Rod +item.itemRodLongHastelloyW.name=Long Hastelloy-W Rod +item.itemRingHastelloyW.name=Hastelloy-W Ring +item.itemScrewHastelloyW.name=Hastelloy-W Screw +item.itemRotorHastelloyW.name=Hastelloy-W Rotor +item.itemGearHastelloyW.name=Hastelloy-W Gear +item.itemIngotHastelloyX.name=Hastelloy-X Ingot +item.itemDustHastelloyX.name=Hastelloy-X Dust +item.itemDustTinyHastelloyX.name=Tiny Pile of Hastelloy-X Dust +item.itemDustSmallHastelloyX.name=Small Pile of Hastelloy-X Dust +item.itemNuggetHastelloyX.name=Hastelloy-X Nugget +item.itemPlateHastelloyX.name=Hastelloy-X Plate +item.itemPlateDoubleHastelloyX.name=Double Hastelloy-X Plate +item.itemBoltHastelloyX.name=Hastelloy-X Bolt +item.itemRodHastelloyX.name=Hastelloy-X Rod +item.itemRodLongHastelloyX.name=Long Hastelloy-X Rod +item.itemRingHastelloyX.name=Hastelloy-X Ring +item.itemScrewHastelloyX.name=Hastelloy-X Screw +item.itemRotorHastelloyX.name=Hastelloy-X Rotor +item.itemGearHastelloyX.name=Hastelloy-X Gear +item.itemIngotHastelloyC276.name=Hastelloy-C276 Ingot +item.itemHotIngotHastelloyC276.name=Hot Hastelloy-C276 Ingot +item.itemDustHastelloyC276.name=Hastelloy-C276 Dust +item.itemDustTinyHastelloyC276.name=Tiny Pile of Hastelloy-C276 Dust +item.itemDustSmallHastelloyC276.name=Small Pile of Hastelloy-C276 Dust +item.itemNuggetHastelloyC276.name=Hastelloy-C276 Nugget +item.itemPlateHastelloyC276.name=Hastelloy-C276 Plate +item.itemPlateDoubleHastelloyC276.name=Double Hastelloy-C276 Plate +item.itemBoltHastelloyC276.name=Hastelloy-C276 Bolt +item.itemRodHastelloyC276.name=Hastelloy-C276 Rod +item.itemRodLongHastelloyC276.name=Long Hastelloy-C276 Rod +item.itemRingHastelloyC276.name=Hastelloy-C276 Ring +item.itemScrewHastelloyC276.name=Hastelloy-C276 Screw +item.itemRotorHastelloyC276.name=Hastelloy-C276 Rotor +item.itemGearHastelloyC276.name=Hastelloy-C276 Gear +item.itemIngotHastelloyN.name=Hastelloy-N Ingot +item.itemHotIngotHastelloyN.name=Hot Hastelloy-N Ingot +item.itemDustHastelloyN.name=Hastelloy-N Dust +item.itemDustTinyHastelloyN.name=Tiny Pile of Hastelloy-N Dust +item.itemDustSmallHastelloyN.name=Small Pile of Hastelloy-N Dust +item.itemNuggetHastelloyN.name=Hastelloy-N Nugget +item.itemPlateHastelloyN.name=Hastelloy-N Plate +item.itemPlateDoubleHastelloyN.name=Double Hastelloy-N Plate +item.itemBoltHastelloyN.name=Hastelloy-N Bolt +item.itemRodHastelloyN.name=Hastelloy-N Rod +item.itemRodLongHastelloyN.name=Long Hastelloy-N Rod +item.itemRingHastelloyN.name=Hastelloy-N Ring +item.itemScrewHastelloyN.name=Hastelloy-N Screw +item.itemRotorHastelloyN.name=Hastelloy-N Rotor +item.itemGearHastelloyN.name=Hastelloy-N Gear +item.itemIngotIncoloy020.name=Incoloy-020 Ingot +item.itemDustIncoloy020.name=Incoloy-020 Dust +item.itemDustTinyIncoloy020.name=Tiny Pile of Incoloy-020 Dust +item.itemDustSmallIncoloy020.name=Small Pile of Incoloy-020 Dust +item.itemNuggetIncoloy020.name=Incoloy-020 Nugget +item.itemPlateIncoloy020.name=Incoloy-020 Plate +item.itemPlateDoubleIncoloy020.name=Double Incoloy-020 Plate +item.itemBoltIncoloy020.name=Incoloy-020 Bolt +item.itemRodIncoloy020.name=Incoloy-020 Rod +item.itemRodLongIncoloy020.name=Long Incoloy-020 Rod +item.itemRingIncoloy020.name=Incoloy-020 Ring +item.itemScrewIncoloy020.name=Incoloy-020 Screw +item.itemRotorIncoloy020.name=Incoloy-020 Rotor +item.itemGearIncoloy020.name=Incoloy-020 Gear +item.itemIngotIncoloyDS.name=Incoloy-DS Ingot +item.itemDustIncoloyDS.name=Incoloy-DS Dust +item.itemDustTinyIncoloyDS.name=Tiny Pile of Incoloy-DS Dust +item.itemDustSmallIncoloyDS.name=Small Pile of Incoloy-DS Dust +item.itemNuggetIncoloyDS.name=Incoloy-DS Nugget +item.itemPlateIncoloyDS.name=Incoloy-DS Plate +item.itemPlateDoubleIncoloyDS.name=Double Incoloy-DS Plate +item.itemBoltIncoloyDS.name=Incoloy-DS Bolt +item.itemRodIncoloyDS.name=Incoloy-DS Rod +item.itemRodLongIncoloyDS.name=Long Incoloy-DS Rod +item.itemRingIncoloyDS.name=Incoloy-DS Ring +item.itemScrewIncoloyDS.name=Incoloy-DS Screw +item.itemRotorIncoloyDS.name=Incoloy-DS Rotor +item.itemGearIncoloyDS.name=Incoloy-DS Gear +item.itemIngotIncoloyMA956.name=Incoloy-MA956 Ingot +item.itemHotIngotIncoloyMA956.name=Hot Incoloy-MA956 Ingot +item.itemDustIncoloyMA956.name=Incoloy-MA956 Dust +item.itemDustTinyIncoloyMA956.name=Tiny Pile of Incoloy-MA956 Dust +item.itemDustSmallIncoloyMA956.name=Small Pile of Incoloy-MA956 Dust +item.itemNuggetIncoloyMA956.name=Incoloy-MA956 Nugget +item.itemPlateIncoloyMA956.name=Incoloy-MA956 Plate +item.itemPlateDoubleIncoloyMA956.name=Double Incoloy-MA956 Plate +item.itemBoltIncoloyMA956.name=Incoloy-MA956 Bolt +item.itemRodIncoloyMA956.name=Incoloy-MA956 Rod +item.itemRodLongIncoloyMA956.name=Long Incoloy-MA956 Rod +item.itemRingIncoloyMA956.name=Incoloy-MA956 Ring +item.itemScrewIncoloyMA956.name=Incoloy-MA956 Screw +item.itemRotorIncoloyMA956.name=Incoloy-MA956 Rotor +item.itemGearIncoloyMA956.name=Incoloy-MA956 Gear +item.itemIngotGrisium.name=Grisium Ingot +item.itemHotIngotGrisium.name=Hot Grisium Ingot +item.itemDustGrisium.name=Grisium Dust +item.itemDustTinyGrisium.name=Tiny Pile of Grisium Dust +item.itemDustSmallGrisium.name=Small Pile of Grisium Dust +item.itemNuggetGrisium.name=Grisium Nugget +item.itemPlateGrisium.name=Grisium Plate +item.itemPlateDoubleGrisium.name=Double Grisium Plate +item.itemBoltGrisium.name=Grisium Bolt +item.itemRodGrisium.name=Grisium Rod +item.itemRodLongGrisium.name=Long Grisium Rod +item.itemRingGrisium.name=Grisium Ring +item.itemScrewGrisium.name=Grisium Screw +item.itemRotorGrisium.name=Grisium Rotor +item.itemGearGrisium.name=Grisium Gear +item.itemIngotHG1223.name=HG-1223 Ingot +item.itemDustHG1223.name=HG-1223 Dust +item.itemDustTinyHG1223.name=Tiny Pile of HG-1223 Dust +item.itemDustSmallHG1223.name=Small Pile of HG-1223 Dust +item.itemNuggetHG1223.name=HG-1223 Nugget +item.itemPlateHG1223.name=HG-1223 Plate +item.itemPlateDoubleHG1223.name=Double HG-1223 Plate +item.itemIngotTrinium.name=Trinium Ingot +item.itemDustTrinium.name=Trinium Dust +item.itemDustTinyTrinium.name=Tiny Pile of Trinium Dust +item.itemDustSmallTrinium.name=Small Pile of Trinium Dust +item.itemNuggetTrinium.name=Trinium Nugget +item.itemPlateTrinium.name=Trinium Plate +item.itemPlateDoubleTrinium.name=Double Trinium Plate +item.itemIngotRefinedTrinium.name=Refined Trinium Ingot +item.itemDustRefinedTrinium.name=Refined Trinium Dust +item.itemDustTinyRefinedTrinium.name=Tiny Pile of Refined Trinium Dust +item.itemDustSmallRefinedTrinium.name=Small Pile of Refined Trinium Dust +item.itemNuggetRefinedTrinium.name=Refined Trinium Nugget +item.itemPlateRefinedTrinium.name=Refined Trinium Plate +item.itemPlateDoubleRefinedTrinium.name=Double Refined Trinium Plate +item.itemIngotTriniumTitaniumAlloy.name=Trinium Titanium Alloy Ingot +item.itemHotIngotTriniumTitaniumAlloy.name=Hot Trinium Titanium Alloy Ingot +item.itemDustTriniumTitaniumAlloy.name=Trinium Titanium Alloy Dust +item.itemDustTinyTriniumTitaniumAlloy.name=Tiny Pile of Trinium Titanium Alloy Dust +item.itemDustSmallTriniumTitaniumAlloy.name=Small Pile of Trinium Titanium Alloy Dust +item.itemNuggetTriniumTitaniumAlloy.name=Trinium Titanium Alloy Nugget +item.itemPlateTriniumTitaniumAlloy.name=Trinium Titanium Alloy Plate +item.itemPlateDoubleTriniumTitaniumAlloy.name=Double Trinium Titanium Alloy Plate +item.itemBoltTriniumTitaniumAlloy.name=Trinium Titanium Alloy Bolt +item.itemRodTriniumTitaniumAlloy.name=Trinium Titanium Alloy Rod +item.itemRodLongTriniumTitaniumAlloy.name=Long Trinium Titanium Alloy Rod +item.itemRingTriniumTitaniumAlloy.name=Trinium Titanium Alloy Ring +item.itemScrewTriniumTitaniumAlloy.name=Trinium Titanium Alloy Screw +item.itemRotorTriniumTitaniumAlloy.name=Trinium Titanium Alloy Rotor +item.itemGearTriniumTitaniumAlloy.name=Trinium Titanium Alloy Gear +item.itemIngotTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Ingot +item.itemDustTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Dust +item.itemDustTinyTriniumNaquadahAlloy.name=Tiny Pile of Trinium Naquadah Alloy Dust +item.itemDustSmallTriniumNaquadahAlloy.name=Small Pile of Trinium Naquadah Alloy Dust +item.itemNuggetTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Nugget +item.itemPlateTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Plate +item.itemPlateDoubleTriniumNaquadahAlloy.name=Double Trinium Naquadah Alloy Plate +item.itemIngotTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Ingot +item.itemHotIngotTriniumNaquadahCarbonite.name=Hot Trinium Naquadah Carbonite Ingot +item.itemDustTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Dust +item.itemDustTinyTriniumNaquadahCarbonite.name=Tiny Pile of Trinium Naquadah Carbonite Dust +item.itemDustSmallTriniumNaquadahCarbonite.name=Small Pile of Trinium Naquadah Carbonite Dust +item.itemNuggetTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Nugget +item.itemPlateTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Plate +item.itemPlateDoubleTriniumNaquadahCarbonite.name=Double Trinium Naquadah Carbonite Plate +item.itemBoltTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Bolt +item.itemRodTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Rod +item.itemRodLongTriniumNaquadahCarbonite.name=Long Trinium Naquadah Carbonite Rod +item.itemRingTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Ring +item.itemScrewTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Screw +item.itemRotorTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Rotor +item.itemGearTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Gear +item.itemIngotQuantum.name=Quantum Ingot +item.itemHotIngotQuantum.name=Hot Quantum Ingot +item.itemDustQuantum.name=Quantum Dust +item.itemDustTinyQuantum.name=Tiny Pile of Quantum Dust +item.itemDustSmallQuantum.name=Small Pile of Quantum Dust +item.itemNuggetQuantum.name=Quantum Nugget +item.itemPlateQuantum.name=Quantum Plate +item.itemPlateDoubleQuantum.name=Double Quantum Plate +item.itemBoltQuantum.name=Quantum Bolt +item.itemRodQuantum.name=Quantum Rod +item.itemRodLongQuantum.name=Long Quantum Rod +item.itemRingQuantum.name=Quantum Ring +item.itemScrewQuantum.name=Quantum Screw +item.itemRotorQuantum.name=Quantum Rotor +item.itemGearQuantum.name=Quantum Gear +item.itemDustFluorite.name=Fluorite Dust +item.itemDustTinyFluorite.name=Tiny Pile of Fluorite Dust +item.itemDustSmallFluorite.name=Small Pile of Fluorite Dust +item.crushedFluorite.name=Crushed Fluorite Ore +item.crushedCentrifugedFluorite.name=Centrifuged Crushed Fluorite Ore +item.crushedPurifiedFluorite.name=Purified Crushed Fluorite Ore +item.dustImpureFluorite.name=Impure Fluorite Dust +item.dustPureFluorite.name=Purified Fluorite Dust +item.itemDustCrocoite.name=Crocoite Dust +item.itemDustTinyCrocoite.name=Tiny Pile of Crocoite Dust +item.itemDustSmallCrocoite.name=Small Pile of Crocoite Dust +item.crushedCrocoite.name=Crushed Crocoite Ore +item.crushedCentrifugedCrocoite.name=Centrifuged Crushed Crocoite Ore +item.crushedPurifiedCrocoite.name=Purified Crushed Crocoite Ore +item.dustImpureCrocoite.name=Impure Crocoite Dust +item.dustPureCrocoite.name=Purified Crocoite Dust +item.itemDustGeikielite.name=Geikielite Dust +item.itemDustTinyGeikielite.name=Tiny Pile of Geikielite Dust +item.itemDustSmallGeikielite.name=Small Pile of Geikielite Dust +item.crushedGeikielite.name=Crushed Geikielite Ore +item.crushedCentrifugedGeikielite.name=Centrifuged Crushed Geikielite Ore +item.crushedPurifiedGeikielite.name=Purified Crushed Geikielite Ore +item.dustImpureGeikielite.name=Impure Geikielite Dust +item.dustPureGeikielite.name=Purified Geikielite Dust +item.itemDustNichromite.name=Nichromite Dust +item.itemDustTinyNichromite.name=Tiny Pile of Nichromite Dust +item.itemDustSmallNichromite.name=Small Pile of Nichromite Dust +item.crushedNichromite.name=Crushed Nichromite Ore +item.crushedCentrifugedNichromite.name=Centrifuged Crushed Nichromite Ore +item.crushedPurifiedNichromite.name=Purified Crushed Nichromite Ore +item.dustImpureNichromite.name=Impure Nichromite Dust +item.dustPureNichromite.name=Purified Nichromite Dust +item.itemDustTitanite.name=Titanite Dust +item.itemDustTinyTitanite.name=Tiny Pile of Titanite Dust +item.itemDustSmallTitanite.name=Small Pile of Titanite Dust +item.crushedTitanite.name=Crushed Titanite Ore +item.crushedCentrifugedTitanite.name=Centrifuged Crushed Titanite Ore +item.crushedPurifiedTitanite.name=Purified Crushed Titanite Ore +item.dustImpureTitanite.name=Impure Titanite Dust +item.dustPureTitanite.name=Purified Titanite Dust +item.itemDustZimbabweite.name=Zimbabweite Dust +item.itemDustTinyZimbabweite.name=Tiny Pile of Zimbabweite Dust +item.itemDustSmallZimbabweite.name=Small Pile of Zimbabweite Dust +item.crushedZimbabweite.name=Crushed Zimbabweite Ore +item.crushedCentrifugedZimbabweite.name=Centrifuged Crushed Zimbabweite Ore +item.crushedPurifiedZimbabweite.name=Purified Crushed Zimbabweite Ore +item.dustImpureZimbabweite.name=Impure Zimbabweite Dust +item.dustPureZimbabweite.name=Purified Zimbabweite Dust +item.itemDustZirconolite.name=Zirconolite Dust +item.itemDustTinyZirconolite.name=Tiny Pile of Zirconolite Dust +item.itemDustSmallZirconolite.name=Small Pile of Zirconolite Dust +item.crushedZirconolite.name=Crushed Zirconolite Ore +item.crushedCentrifugedZirconolite.name=Centrifuged Crushed Zirconolite Ore +item.crushedPurifiedZirconolite.name=Purified Crushed Zirconolite Ore +item.dustImpureZirconolite.name=Impure Zirconolite Dust +item.dustPureZirconolite.name=Purified Zirconolite Dust +item.itemDustGadoliniteCe.name=Gadolinite (Ce) Dust +item.itemDustTinyGadoliniteCe.name=Tiny Pile of Gadolinite (Ce) Dust +item.itemDustSmallGadoliniteCe.name=Small Pile of Gadolinite (Ce) Dust +item.crushedGadoliniteCe.name=Crushed Gadolinite (Ce) Ore +item.crushedCentrifugedGadoliniteCe.name=Centrifuged Crushed Gadolinite (Ce) Ore +item.crushedPurifiedGadoliniteCe.name=Purified Crushed Gadolinite (Ce) Ore +item.dustImpureGadoliniteCe.name=Impure Gadolinite (Ce) Dust +item.dustPureGadoliniteCe.name=Purified Gadolinite (Ce) Dust +item.itemDustGadoliniteY.name=Gadolinite (Y) Dust +item.itemDustTinyGadoliniteY.name=Tiny Pile of Gadolinite (Y) Dust +item.itemDustSmallGadoliniteY.name=Small Pile of Gadolinite (Y) Dust +item.crushedGadoliniteY.name=Crushed Gadolinite (Y) Ore +item.crushedCentrifugedGadoliniteY.name=Centrifuged Crushed Gadolinite (Y) Ore +item.crushedPurifiedGadoliniteY.name=Purified Crushed Gadolinite (Y) Ore +item.dustImpureGadoliniteY.name=Impure Gadolinite (Y) Dust +item.dustPureGadoliniteY.name=Purified Gadolinite (Y) Dust +item.itemDustLepersonnite.name=Lepersonnite Dust +item.itemDustTinyLepersonnite.name=Tiny Pile of Lepersonnite Dust +item.itemDustSmallLepersonnite.name=Small Pile of Lepersonnite Dust +item.crushedLepersonnite.name=Crushed Lepersonnite Ore +item.crushedCentrifugedLepersonnite.name=Centrifuged Crushed Lepersonnite Ore +item.crushedPurifiedLepersonnite.name=Purified Crushed Lepersonnite Ore +item.dustImpureLepersonnite.name=Impure Lepersonnite Dust +item.dustPureLepersonnite.name=Purified Lepersonnite Dust +item.itemDustSamarskiteY.name=Samarskite (Y) Dust +item.itemDustTinySamarskiteY.name=Tiny Pile of Samarskite (Y) Dust +item.itemDustSmallSamarskiteY.name=Small Pile of Samarskite (Y) Dust +item.crushedSamarskiteY.name=Crushed Samarskite (Y) Ore +item.crushedCentrifugedSamarskiteY.name=Centrifuged Crushed Samarskite (Y) Ore +item.crushedPurifiedSamarskiteY.name=Purified Crushed Samarskite (Y) Ore +item.dustImpureSamarskiteY.name=Impure Samarskite (Y) Dust +item.dustPureSamarskiteY.name=Purified Samarskite (Y) Dust +item.itemDustSamarskiteYb.name=Samarskite (Yb) Dust +item.itemDustTinySamarskiteYb.name=Tiny Pile of Samarskite (Yb) Dust +item.itemDustSmallSamarskiteYb.name=Small Pile of Samarskite (Yb) Dust +item.crushedSamarskiteYb.name=Crushed Samarskite (Yb) Ore +item.crushedCentrifugedSamarskiteYb.name=Centrifuged Crushed Samarskite (Yb) Ore +item.crushedPurifiedSamarskiteYb.name=Purified Crushed Samarskite (Yb) Ore +item.dustImpureSamarskiteYb.name=Impure Samarskite (Yb) Dust +item.dustPureSamarskiteYb.name=Purified Samarskite (Yb) Dust +item.itemDustXenotime.name=Xenotime Dust +item.itemDustTinyXenotime.name=Tiny Pile of Xenotime Dust +item.itemDustSmallXenotime.name=Small Pile of Xenotime Dust +item.crushedXenotime.name=Crushed Xenotime Ore +item.crushedCentrifugedXenotime.name=Centrifuged Crushed Xenotime Ore +item.crushedPurifiedXenotime.name=Purified Crushed Xenotime Ore +item.dustImpureXenotime.name=Impure Xenotime Dust +item.dustPureXenotime.name=Purified Xenotime Dust +item.itemDustYttriaite.name=Yttriaite Dust +item.itemDustTinyYttriaite.name=Tiny Pile of Yttriaite Dust +item.itemDustSmallYttriaite.name=Small Pile of Yttriaite Dust +item.crushedYttriaite.name=Crushed Yttriaite Ore +item.crushedCentrifugedYttriaite.name=Centrifuged Crushed Yttriaite Ore +item.crushedPurifiedYttriaite.name=Purified Crushed Yttriaite Ore +item.dustImpureYttriaite.name=Impure Yttriaite Dust +item.dustPureYttriaite.name=Purified Yttriaite Dust +item.itemDustYttrialite.name=Yttrialite Dust +item.itemDustTinyYttrialite.name=Tiny Pile of Yttrialite Dust +item.itemDustSmallYttrialite.name=Small Pile of Yttrialite Dust +item.crushedYttrialite.name=Crushed Yttrialite Ore +item.crushedCentrifugedYttrialite.name=Centrifuged Crushed Yttrialite Ore +item.crushedPurifiedYttrialite.name=Purified Crushed Yttrialite Ore +item.dustImpureYttrialite.name=Impure Yttrialite Dust +item.dustPureYttrialite.name=Purified Yttrialite Dust +item.itemDustYttrocerite.name=Yttrocerite Dust +item.itemDustTinyYttrocerite.name=Tiny Pile of Yttrocerite Dust +item.itemDustSmallYttrocerite.name=Small Pile of Yttrocerite Dust +item.crushedYttrocerite.name=Crushed Yttrocerite Ore +item.crushedCentrifugedYttrocerite.name=Centrifuged Crushed Yttrocerite Ore +item.crushedPurifiedYttrocerite.name=Purified Crushed Yttrocerite Ore +item.dustImpureYttrocerite.name=Impure Yttrocerite Dust +item.dustPureYttrocerite.name=Purified Yttrocerite Dust +item.itemDustZircon.name=Zircon Dust +item.itemDustTinyZircon.name=Tiny Pile of Zircon Dust +item.itemDustSmallZircon.name=Small Pile of Zircon Dust +item.crushedZircon.name=Crushed Zircon Ore +item.crushedCentrifugedZircon.name=Centrifuged Crushed Zircon Ore +item.crushedPurifiedZircon.name=Purified Crushed Zircon Ore +item.dustImpureZircon.name=Impure Zircon Dust +item.dustPureZircon.name=Purified Zircon Dust +item.itemDustPolycrase.name=Polycrase Dust +item.itemDustTinyPolycrase.name=Tiny Pile of Polycrase Dust +item.itemDustSmallPolycrase.name=Small Pile of Polycrase Dust +item.crushedPolycrase.name=Crushed Polycrase Ore +item.crushedCentrifugedPolycrase.name=Centrifuged Crushed Polycrase Ore +item.crushedPurifiedPolycrase.name=Purified Crushed Polycrase Ore +item.dustImpurePolycrase.name=Impure Polycrase Dust +item.dustPurePolycrase.name=Purified Polycrase Dust +item.itemDustZircophyllite.name=Zircophyllite Dust +item.itemDustTinyZircophyllite.name=Tiny Pile of Zircophyllite Dust +item.itemDustSmallZircophyllite.name=Small Pile of Zircophyllite Dust +item.crushedZircophyllite.name=Crushed Zircophyllite Ore +item.crushedCentrifugedZircophyllite.name=Centrifuged Crushed Zircophyllite Ore +item.crushedPurifiedZircophyllite.name=Purified Crushed Zircophyllite Ore +item.dustImpureZircophyllite.name=Impure Zircophyllite Dust +item.dustPureZircophyllite.name=Purified Zircophyllite Dust +item.itemDustZirkelite.name=Zirkelite Dust +item.itemDustTinyZirkelite.name=Tiny Pile of Zirkelite Dust +item.itemDustSmallZirkelite.name=Small Pile of Zirkelite Dust +item.crushedZirkelite.name=Crushed Zirkelite Ore +item.crushedCentrifugedZirkelite.name=Centrifuged Crushed Zirkelite Ore +item.crushedPurifiedZirkelite.name=Purified Crushed Zirkelite Ore +item.dustImpureZirkelite.name=Impure Zirkelite Dust +item.dustPureZirkelite.name=Purified Zirkelite Dust +item.itemDustLanthaniteLa.name=Lanthanite (La) Dust +item.itemDustTinyLanthaniteLa.name=Tiny Pile of Lanthanite (La) Dust +item.itemDustSmallLanthaniteLa.name=Small Pile of Lanthanite (La) Dust +item.crushedLanthaniteLa.name=Crushed Lanthanite (La) Ore +item.crushedCentrifugedLanthaniteLa.name=Centrifuged Crushed Lanthanite (La) Ore +item.crushedPurifiedLanthaniteLa.name=Purified Crushed Lanthanite (La) Ore +item.dustImpureLanthaniteLa.name=Impure Lanthanite (La) Dust +item.dustPureLanthaniteLa.name=Purified Lanthanite (La) Dust +item.itemDustLanthaniteCe.name=Lanthanite (Ce) Dust +item.itemDustTinyLanthaniteCe.name=Tiny Pile of Lanthanite (Ce) Dust +item.itemDustSmallLanthaniteCe.name=Small Pile of Lanthanite (Ce) Dust +item.crushedLanthaniteCe.name=Crushed Lanthanite (Ce) Ore +item.crushedCentrifugedLanthaniteCe.name=Centrifuged Crushed Lanthanite (Ce) Ore +item.crushedPurifiedLanthaniteCe.name=Purified Crushed Lanthanite (Ce) Ore +item.dustImpureLanthaniteCe.name=Impure Lanthanite (Ce) Dust +item.dustPureLanthaniteCe.name=Purified Lanthanite (Ce) Dust +item.itemDustLanthaniteNd.name=Lanthanite (Nd) Dust +item.itemDustTinyLanthaniteNd.name=Tiny Pile of Lanthanite (Nd) Dust +item.itemDustSmallLanthaniteNd.name=Small Pile of Lanthanite (Nd) Dust +item.crushedLanthaniteNd.name=Crushed Lanthanite (Nd) Ore +item.crushedCentrifugedLanthaniteNd.name=Centrifuged Crushed Lanthanite (Nd) Ore +item.crushedPurifiedLanthaniteNd.name=Purified Crushed Lanthanite (Nd) Ore +item.dustImpureLanthaniteNd.name=Impure Lanthanite (Nd) Dust +item.dustPureLanthaniteNd.name=Purified Lanthanite (Nd) Dust +item.itemDustAgarditeY.name=Agardite (Y) Dust +item.itemDustTinyAgarditeY.name=Tiny Pile of Agardite (Y) Dust +item.itemDustSmallAgarditeY.name=Small Pile of Agardite (Y) Dust +item.crushedAgarditeY.name=Crushed Agardite (Y) Ore +item.crushedCentrifugedAgarditeY.name=Centrifuged Crushed Agardite (Y) Ore +item.crushedPurifiedAgarditeY.name=Purified Crushed Agardite (Y) Ore +item.dustImpureAgarditeY.name=Impure Agardite (Y) Dust +item.dustPureAgarditeY.name=Purified Agardite (Y) Dust +item.itemDustAgarditeCd.name=Agardite (Cd) Dust +item.itemDustTinyAgarditeCd.name=Tiny Pile of Agardite (Cd) Dust +item.itemDustSmallAgarditeCd.name=Small Pile of Agardite (Cd) Dust +item.crushedAgarditeCd.name=Crushed Agardite (Cd) Ore +item.crushedCentrifugedAgarditeCd.name=Centrifuged Crushed Agardite (Cd) Ore +item.crushedPurifiedAgarditeCd.name=Purified Crushed Agardite (Cd) Ore +item.dustImpureAgarditeCd.name=Impure Agardite (Cd) Dust +item.dustPureAgarditeCd.name=Purified Agardite (Cd) Dust +item.itemDustAgarditeLa.name=Agardite (La) Dust +item.itemDustTinyAgarditeLa.name=Tiny Pile of Agardite (La) Dust +item.itemDustSmallAgarditeLa.name=Small Pile of Agardite (La) Dust +item.crushedAgarditeLa.name=Crushed Agardite (La) Ore +item.crushedCentrifugedAgarditeLa.name=Centrifuged Crushed Agardite (La) Ore +item.crushedPurifiedAgarditeLa.name=Purified Crushed Agardite (La) Ore +item.dustImpureAgarditeLa.name=Impure Agardite (La) Dust +item.dustPureAgarditeLa.name=Purified Agardite (La) Dust +item.itemDustAgarditeNd.name=Agardite (Nd) Dust +item.itemDustTinyAgarditeNd.name=Tiny Pile of Agardite (Nd) Dust +item.itemDustSmallAgarditeNd.name=Small Pile of Agardite (Nd) Dust +item.crushedAgarditeNd.name=Crushed Agardite (Nd) Ore +item.crushedCentrifugedAgarditeNd.name=Centrifuged Crushed Agardite (Nd) Ore +item.crushedPurifiedAgarditeNd.name=Purified Crushed Agardite (Nd) Ore +item.dustImpureAgarditeNd.name=Impure Agardite (Nd) Dust +item.dustPureAgarditeNd.name=Purified Agardite (Nd) Dust +item.itemDustHibonite.name=Hibonite Dust +item.itemDustTinyHibonite.name=Tiny Pile of Hibonite Dust +item.itemDustSmallHibonite.name=Small Pile of Hibonite Dust +item.crushedHibonite.name=Crushed Hibonite Ore +item.crushedCentrifugedHibonite.name=Centrifuged Crushed Hibonite Ore +item.crushedPurifiedHibonite.name=Purified Crushed Hibonite Ore +item.dustImpureHibonite.name=Impure Hibonite Dust +item.dustPureHibonite.name=Purified Hibonite Dust +item.itemDustCerite.name=Cerite Dust +item.itemDustTinyCerite.name=Tiny Pile of Cerite Dust +item.itemDustSmallCerite.name=Small Pile of Cerite Dust +item.crushedCerite.name=Crushed Cerite Ore +item.crushedCentrifugedCerite.name=Centrifuged Crushed Cerite Ore +item.crushedPurifiedCerite.name=Purified Crushed Cerite Ore +item.dustImpureCerite.name=Impure Cerite Dust +item.dustPureCerite.name=Purified Cerite Dust +item.itemDustFluorcaphite.name=Fluorcaphite Dust +item.itemDustTinyFluorcaphite.name=Tiny Pile of Fluorcaphite Dust +item.itemDustSmallFluorcaphite.name=Small Pile of Fluorcaphite Dust +item.crushedFluorcaphite.name=Crushed Fluorcaphite Ore +item.crushedCentrifugedFluorcaphite.name=Centrifuged Crushed Fluorcaphite Ore +item.crushedPurifiedFluorcaphite.name=Purified Crushed Fluorcaphite Ore +item.dustImpureFluorcaphite.name=Impure Fluorcaphite Dust +item.dustPureFluorcaphite.name=Purified Fluorcaphite Dust +item.itemDustFlorencite.name=Florencite Dust +item.itemDustTinyFlorencite.name=Tiny Pile of Florencite Dust +item.itemDustSmallFlorencite.name=Small Pile of Florencite Dust +item.crushedFlorencite.name=Crushed Florencite Ore +item.crushedCentrifugedFlorencite.name=Centrifuged Crushed Florencite Ore +item.crushedPurifiedFlorencite.name=Purified Crushed Florencite Ore +item.dustImpureFlorencite.name=Impure Florencite Dust +item.dustPureFlorencite.name=Purified Florencite Dust +item.itemDustCryoliteF.name=Cryolite (F) Dust +item.itemDustTinyCryoliteF.name=Tiny Pile of Cryolite (F) Dust +item.itemDustSmallCryoliteF.name=Small Pile of Cryolite (F) Dust +item.crushedCryoliteF.name=Crushed Cryolite (F) Ore +item.crushedCentrifugedCryoliteF.name=Centrifuged Crushed Cryolite (F) Ore +item.crushedPurifiedCryoliteF.name=Purified Crushed Cryolite (F) Ore +item.dustImpureCryoliteF.name=Impure Cryolite (F) Dust +item.dustPureCryoliteF.name=Purified Cryolite (F) Dust +item.itemDustTinyYellorium.name=Tiny Pile of Yellorium Dust +item.itemDustSmallYellorium.name=Small Pile of Yellorium Dust +item.crushedYellorium.name=Crushed Yellorium Ore +item.crushedCentrifugedYellorium.name=Centrifuged Crushed Yellorium Ore +item.crushedPurifiedYellorium.name=Purified Crushed Yellorium Ore +item.dustImpureYellorium.name=Impure Yellorium Dust +item.dustPureYellorium.name=Purified Yellorium Dust + +//Shards +item.itemDrained.name=Drained Shard +item.itemDustInfusedAir.name=Infused Air Dust +item.itemDustInfusedFire.name=Infused Fire Dust +item.itemDustInfusedEarth.name=Infused Earth Dust +item.itemDustInfusedWater.name=Infused Water Dust + + +//Misc Material Items +item.itemDustLithiumCarbonate.name=Lithium Carbonate Dust +item.itemDustSmallLithiumCarbonate.name=Small Pile of Lithium Carbonate Dust +item.itemDustTinyLithiumCarbonate.name=Tiny Pile of Lithium Carbonate Dust +item.itemDustLithiumPeroxide.name=Lithium Peroxide Dust +item.itemDustSmallLithiumPeroxide.name=Small Pile of Lithium Peroxide Dust +item.itemDustTinyLithiumPeroxide.name=Tiny Pile of Lithium Peroxide Dust +item.itemDustLithiumHydroxide.name=Lithium Hydroxide Dust +item.itemDustSmallLithiumHydroxide.name=Small Pile of Lithium Hydroxide Dust +item.itemDustTinyLithiumHydroxide.name=Tiny Pile of Lithium Hydroxide Dust +item.itemDustCalciumHydroxide.name=Hydrated Lime Dust +item.itemDustSmallCalciumHydroxide.name=Small Pile of Hydrated Lime Dust +item.itemDustTinyCalciumHydroxide.name=Tiny Pile of Hydrated Lime Dust +item.itemDustCalciumCarbonate.name=Calcium Carbonate Dust +item.itemDustSmallCalciumCarbonate.name=Small Pile of Calcium Carbonate Dust +item.itemDustTinyCalciumCarbonate.name=Tiny Pile of Calcium Carbonate Dust +item.itemDustGypsum.name=Calcium Sulfate (Gypsum) Dust +item.itemDustSmallGypsum.name=Small Pile of Calcium Sulfate (Gypsum) Dust +item.itemDustTinyGypsum.name=Tiny Pile of Calcium Sulfate (Gypsum) Dust +item.itemDustLi2CO3CaOH2.name=Li2CO3 + Ca(OH)2 Compound Dust +item.itemDustSmallLi2CO3CaOH2.name=Small Pile of Li2CO3 + Ca(OH)2 Compound Dust +item.itemDustTinyLi2CO3CaOH2.name=Tiny Pile of Li2CO3 + Ca(OH)2 Compound Dust +item.itemDustLi2BeF4.name=Li2BeF4 Fuel Compound Dust +item.itemDustSmallLi2BeF4.name=Small Pile of Li2BeF4 Fuel Compound Dust +item.itemDustTinyLi2BeF4.name=Tiny Pile of Li2BeF4 Fuel Compound Dust +item.Li2BeF4.name=Li2BeF4 Cell +item.itemCircuitLFTR.name=§aControl Circuit +item.itemZirconiumPellet.name=Zirconium Pellet [ZrClâ‚„] +item.itemDustZrCl4.name=ZrCl4 Dust +item.itemDustSmallZrCl4.name=Small Pile of ZrCl4 Dust +item.itemDustTinyZrCl4.name=Tiny Pile of ZrCl4 Dust +item.itemDustCookedZrCl4.name=Cooked ZrCl4 Dust +item.itemDustSmallCookedZrCl4.name=Small Pile of Cooked ZrCl4 Dust +item.itemDustTinyCookedZrCl4.name=Tiny Pile of Cooked ZrCl4 Dust +item.itemDustUN18Fertiliser.name=UN-18 Fertiliser Dust +item.itemDustSmallUN18Fertiliser.name=Small Pile of UN-18 Fertiliser Dust +item.itemDustTinyUN18Fertiliser.name=Tiny Pile of UN-18 Fertiliser Dust +item.itemDustUN32Fertiliser.name=UN-32 Fertiliser Dust +item.itemDustSmallUN32Fertiliser.name=Small Pile of UN-32 Fertiliser Dust +item.itemDustTinyUN32Fertiliser.name=Tiny Pile of UN-32 Fertiliser Dust +item.itemNuggetPlutonium239.name=Plutonium 239 Nugget +item.itemCellPlutonium239.name=Plutonium 239 Cell +item.itemIngotPlutonium239.name=Plutonium 239 Ingot +item.itemPlatePlutonium239.name=Plutonium 239 Plate +item.itemPlateDoublePlutonium239.name=Double Plutonium 239 Plate +item.itemDustPlutonium239.name=Plutonium 239 Dust +item.itemDustSmallPlutonium239.name=Small Plutonium 239 Dust +item.itemDustTinyPlutonium239.name=Tiny Plutonium 239 Dust + + +//Multitools +item.AluminiumMultipick.name=Aluminium Multipick +item.AluminiumMultispade.name=Aluminium Multispade +item.BerylliumMultispade.name=Beryllium Multispade +item.BismuthMultispade.name=Bismuth Multispade +item.CarbonMultispade.name=Carbon Multispade +item.ChromeMultipick.name=Chrome Multipick +item.ChromeMultispade.name=Chrome Multispade +item.CobaltMultipick.name=Cobalt Multipick +item.CobaltMultispade.name=Cobalt Multispade +item.GoldMultispade.name=Gold Multispade +item.IridiumMultipick.name=Iridium Multipick +item.IridiumMultispade.name=Iridium Multispade +item.IronMultipick.name=Iron Multipick +item.IronMultispade.name=Iron Multispade +item.LeadMultispade.name=Lead Multispade +item.ManganeseMultipick.name=Manganese Multipick +item.ManganeseMultispade.name=Manganese Multispade +item.MolybdenumMultipick.name=Molybdenum Multipick +item.MolybdenumMultispade.name=Molybdenum Multispade +item.NeodymiumMultipick.name=Neodymium Multipick +item.NeodymiumMultispade.name=Neodymium Multispade +item.NeutroniumMultipick.name=Neutronium Multipick +item.NeutroniumMultispade.name=Neutronium Multispade +item.NickelMultispade.name=Nickel Multispade +item.OsmiumMultipick.name=Osmium Multipick +item.OsmiumMultispade.name=Osmium Multispade +item.PalladiumMultipick.name=Palladium Multipick +item.PalladiumMultispade.name=Palladium Multispade +item.PlatinumMultispade.name=Platinum Multispade +item.Plutonium241Multipick.name=Plutonium 241 Multipick +item.Plutonium241Multispade.name=Plutonium 241 Multispade +item.SilverMultispade.name=Silver Multispade +item.ThoriumMultipick.name=Thorium Multipick +item.ThoriumMultispade.name=Thorium Multispade +item.TitaniumMultipick.name=Titanium Multipick +item.TitaniumMultispade.name=Titanium Multispade +item.TungstenMultipick.name=Tungsten Multipick +item.TungstenMultispade.name=Tungsten Multispade +item.Uranium235Multipick.name=Uranium 235 Multipick +item.Uranium235Multispade.name=Uranium 235 Multispade +item.DarkSteelMultipick.name=Dark Steel Multipick +item.DarkSteelMultispade.name=Dark Steel Multispade +item.DuraniumMultipick.name=Duranium Multipick +item.DuraniumMultispade.name=Duranium Multispade +item.InfusedGoldMultispade.name=Infused Gold Multispade +item.NaquadahMultipick.name=Naquadah Multipick +item.NaquadahMultispade.name=Naquadah Multispade +item.NaquadahAlloyMultipick.name=Naquadah Alloy Multipick +item.NaquadahAlloyMultispade.name=Naquadah Alloy Multispade +item.NaquadriaMultipick.name=Naquadria Multipick +item.NaquadriaMultispade.name=Naquadria Multispade +item.TritaniumMultipick.name=Tritanium Multipick +item.TritaniumMultispade.name=Tritanium Multispade +item.OsmiridiumMultipick.name=Osmiridium Multipick +item.OsmiridiumMultispade.name=Osmiridium Multispade +item.BrassMultispade.name=Brass Multispade +item.BronzeMultipick.name=Bronze Multipick +item.BronzeMultispade.name=Bronze Multispade +item.CupronickelMultispade.name=Cupronickel Multispade +item.ElectrumMultispade.name=Electrum Multispade +item.InvarMultipick.name=Invar Multipick +item.InvarMultispade.name=Invar Multispade +item.KanthalMultispade.name=Kanthal Multispade +item.MagnaliumMultipick.name=Magnalium Multipick +item.MagnaliumMultispade.name=Magnalium Multispade +item.NichromeMultispade.name=Nichrome Multispade +item.PigIronMultipick.name=Pig Iron Multipick +item.PigIronMultispade.name=Pig Iron Multispade +item.PolycaprolactamMultispade.name=Polycaprolactam Multispade +item.PolytetrafluoroethyleneMultispade.name=Polytetrafluoroethylene Multispade +item.NickelZincFerriteMultispade.name=Nickel-Zinc Ferrite Multispade +item.PolyphenyleneSulfideMultispade.name=Polyphenylene Sulfide Multispade +item.StainlessSteelMultipick.name=Stainless Steel Multipick +item.StainlessSteelMultispade.name=Stainless Steel Multispade +item.SteelMultipick.name=Steel Multipick +item.SteelMultispade.name=Steel Multispade +item.TinAlloyMultispade.name=Tin Alloy Multispade +item.UltimetMultipick.name=Ultimet Multipick +item.UltimetMultispade.name=Ultimet Multispade +item.WroughtIronMultipick.name=Wrought Iron Multipick +item.WroughtIronMultispade.name=Wrought Iron Multispade +item.SterlingSilverMultipick.name=Sterling Silver Multipick +item.SterlingSilverMultispade.name=Sterling Silver Multispade +item.RoseGoldMultipick.name=Rose Gold Multipick +item.RoseGoldMultispade.name=Rose Gold Multispade +item.BlackBronzeMultipick.name=Black Bronze Multipick +item.BlackBronzeMultispade.name=Black Bronze Multispade +item.BismuthBronzeMultipick.name=Bismuth Bronze Multipick +item.BismuthBronzeMultispade.name=Bismuth Bronze Multispade +item.BlackSteelMultipick.name=Black Steel Multipick +item.BlackSteelMultispade.name=Black Steel Multispade +item.RedSteelMultipick.name=Red Steel Multipick +item.RedSteelMultispade.name=Red Steel Multispade +item.BlueSteelMultipick.name=Blue Steel Multipick +item.BlueSteelMultispade.name=Blue Steel Multispade +item.DamascusSteelMultipick.name=Damascus Steel Multipick +item.DamascusSteelMultispade.name=Damascus Steel Multispade +item.MithrilMultispade.name=Mithril Multispade +item.CobaltBrassMultipick.name=Cobalt Brass Multipick +item.CobaltBrassMultispade.name=Cobalt Brass Multispade +item.ThaumiumMultipick.name=Thaumium Multipick +item.ThaumiumMultispade.name=Thaumium Multispade +item.HSSGMultipick.name=HSS-G Multipick +item.HSSGMultispade.name=HSS-G Multispade +item.HSSEMultipick.name=HSS-E Multipick +item.HSSEMultispade.name=HSS-E Multispade +item.HSSSMultipick.name=HSS-S Multipick +item.HSSSMultispade.name=HSS-S Multispade +item.HastelloyC276Multipick.name=Hastelloy-C276 Multipick +item.HastelloyC276Multispade.name=Hastelloy-C276 Multispade +item.HastelloyNMultipick.name=Hastelloy-N Multipick +item.HastelloyNMultispade.name=Hastelloy-N Multispade +item.HastelloyWMultipick.name=Hastelloy-W Multipick +item.HastelloyWMultispade.name=Hastelloy-W Multispade +item.HastelloyXMultipick.name=Hastelloy-X Multipick +item.HastelloyXMultispade.name=Hastelloy-X Multispade +item.Incoloy020Multipick.name=Incoloy-020 Multipick +item.Incoloy020Multispade.name=Incoloy-020 Multispade +item.IncoloyDSMultipick.name=Incoloy-DS Multipick +item.IncoloyDSMultispade.name=Incoloy-DS Multispade +item.IncoloyMA956Multipick.name=Incoloy-MA956 Multipick +item.IncoloyMA956Multispade.name=Incoloy-MA956 Multispade +item.Inconel625Multipick.name=Inconel-625 Multipick +item.Inconel625Multispade.name=Inconel-625 Multispade +item.Inconel690Multipick.name=Inconel-690 Multipick +item.Inconel690Multispade.name=Inconel-690 Multispade +item.Inconel792Multipick.name=Inconel-792 Multipick +item.Inconel792Multispade.name=Inconel-792 Multispade +item.GrisiumMultipick.name=Grisium Multipick +item.GrisiumMultispade.name=Grisium Multispade +item.Tantalloy60Multipick.name=Tantalloy-60 Multipick +item.Tantalloy60Multispade.name=Tantalloy-60 Multispade +item.Tantalloy61Multipick.name=Tantalloy-61 Multipick +item.Tantalloy61Multispade.name=Tantalloy-61 Multispade +item.StaballoyMultipick.name=Staballoy Multipick +item.StaballoyMultispade.name=Staballoy Multispade +item.QuantumMultipick.name=Quantum Multipick +item.QuantumMultispade.name=Quantum Multispade +item.PotinMultipick.name=Potin Multipick +item.PotinMultispade.name=Potin Multispade +item.TumbagaMultipick.name=Tumbaga Multipick +item.TumbagaMultispade.name=Tumbaga Multispade +item.TaloniteMultipick.name=Talonite Multipick +item.TaloniteMultispade.name=Talonite Multispade +item.StelliteMultipick.name=Stellite Multipick +item.StelliteMultispade.name=Stellite Multispade +item.TungstenCarbideMultipick.name=Tungsten Carbide Multipick +item.TungstenCarbideMultispade.name=Tungsten Carbide Multispade +item.TantalumCarbideMultipick.name=Tantalum Carbide Multipick +item.TantalumCarbideMultispade.name=Tantalum Carbide Multispade + + +//Items that Don't fit into another category + +//Plates +item.itemPlateClay.name=Clay Plate +item.itemPlateDoubleClay.name=Double Clay Plate +item.itemPlateLithium.name=Lithium Plate +item.itemPlateDoubleEuropium.name=Double Europium Plate + +//Gears +item.itemSmallGearWroughtIron.name=Small Wrought Iron Gear + +//Misc +item.itemFoilUranium235.name=Uranium 235 Foil + +item.itemBoilerChassis_0.name=Advanced Boiler Chassis [Tier 1] +item.itemDehydratorCoilWire_0.name=Coil Wire [EV] +item.itemDehydratorCoil_0.name=Dehydrator Coil [EV] +item.itemAirFilter_0.name=Air Filter +item.itemAirFilter_1.name=Air Filter +item.itemLavaFilter.name=Lava Filter +item.itemGrindleTablet.name=Git +item.itemDragonJar.name=Dragon Capture Jar +item.CoalGas.name=Coal Gas Cell +item.Ethylbenzene.name=Ethylbenzene Cell +item.Anthracene.name=Anthracene Cell +item.Toluene.name=Toluene Cell +item.CoalTar.name=Coal Tar Cell +item.CoalTarOil.name=Coal Tar Oil Cell +item.SulfuricCoalTarOil.name=Sulfuric Coal Tar Oil Cell +item.Naphthalene.name=Naphthalene Cell +item.PhthalicAcid.name=Phthalic Acid Cell +item.itemDustPhthalicAnhydride.name=Phthalic Anhydride Dust +item.itemDustSmallPhthalicAnhydride.name=Small Pile of Phthalic Anhydride Dust +item.itemDustTinyPhthalicAnhydride.name=Tiny Pile of Phthalic Anhydride Dust +item.2Ethylanthraquinone.name=2-Ethylanthraquinone Cell +item.2Ethylanthrahydroquinone.name=2-Ethylanthrahydroquinone Cell +item.HydrogenPeroxide.name=Hydrogen Peroxide Cell +item.itemDustLithiumHydroperoxide.name=Lithium Hydroperoxide Dust +item.itemDustSmallLithiumHydroperoxide.name=Small Pile of Lithium Hydroperoxide Dust +item.itemDustTinyLithiumHydroperoxide.name=Tiny Pile of Lithium Hydroperoxide Dust +item.LithiumPeroxide.name=Lithium Peroxide Cell +item.itemPotionChilly.name=Chilly Potion +item.itemKeyBig4000DC's.name=4000DC's Big Key +item.itemGemDull.name=Dull Gemstone +item.itemMushroomForest.name=Forest Mushroom +item.itemPlateVanadium.name=Vanadium Plate +item.thekeytothecity.name=The Key to the City +item.modularbauble.name=Modular Bauble +item.itemDustSoularium.name=Soularium Dust +item.itemDustSmallSoularium.name=Small Pile of Soularium Dust +item.itemDustTinySoularium.name=Tiny Pile of Soularium Dust +item.itemDustRedstoneAlloy.name=Redstone Alloy Dust +item.itemDustSmallRedstoneAlloy.name=Small Pile of Redstone Alloy Dust +item.itemDustTinyRedstoneAlloy.name=Tiny Pile of Redstone Alloy Dust +item.itemDustElectricalSteel.name=Electrical Steel Dust +item.itemDustSmallElectricalSteel.name=Small Pile of Electrical Steel Dust +item.itemDustTinyElectricalSteel.name=Tiny Pile of Electrical Steel Dust +item.itemDustPulsatingIron.name=Pulsating Iron Dust +item.itemDustSmallPulsatingIron.name=Small Pile of Pulsating Iron Dust +item.itemDustTinyPulsatingIron.name=Tiny Pile of Pulsating Iron Dust +item.itemDustEnergeticAlloy.name=Energetic Alloy Dust +item.itemDustSmallEnergeticAlloy.name=Small Pile of Energetic Alloy Dust +item.itemDustTinyEnergeticAlloy.name=Tiny Pile of Energetic Alloy Dust +item.itemDustVibrantAlloy.name=Vibrant Alloy Dust +item.itemDustSmallVibrantAlloy.name=Small Pile of Vibrant Alloy Dust +item.itemDustTinyVibrantAlloy.name=Tiny Pile of Vibrant Alloy Dust +item.itemDustConductiveIron.name=Conductive Iron Dust +item.itemDustSmallConductiveIron.name=Small Pile of Conductive Iron Dust +item.itemDustTinyConductiveIron.name=Tiny Pile of Conductive Iron Dust +item.itemPlateSoularium.name=Soularium plate +item.itemPlateRedstoneAlloy.name=Redstone Alloy plate +item.itemPlateElectricalSteel.name=Electrical Steel plate +item.itemPlatePhasedIron.name=Phased Iron plate +item.itemPlateEnergeticAlloy.name=Energetic Alloy plate +item.itemPlateVibrantAlloy.name=Vibrant Alloy plate +item.itemPlateConductiveIron.name=Conductive Iron plate +item.itemPlateBlutonium.name=Blutonium plate +item.itemPlateCyanite.name=Cyanite plate +item.itemPlateLudicrite.name=Ludicrite plate +item.itemPlateVoid.name=Void plate +item.itemPlateDimensionShard.name=Dimensional Shard plate +item.rfEUBattery.name=Universally Chargeable Battery +item.personalCloakingDevice.name=§9Personal Cloaking Device§7 +item.personalHealingDevice.name=§9Personal Healing NanoBooster§r +item.SlowBuildingRing.name=§eSlow Building Ring§7 +item.itemStaballoyPickaxe.name=Tunnel Digger +item.itemStaballoyAxe.name=Tree Feller +item.itemSandstoneHammer.name=Cobblestone Breaker +item.itemBufferCore1.name=Energy Core [ULV]. +item.itemBufferCore2.name=Energy Core [LV]. +item.itemBufferCore3.name=Energy Core [MV]. +item.itemBufferCore4.name=Energy Core [HV]. +item.itemBufferCore5.name=Energy Core [EV]. +item.itemBufferCore6.name=Energy Core [IV]. +item.itemBufferCore7.name=Energy Core [LuV]. +item.itemBufferCore8.name=Energy Core [ZPM]. +item.itemBufferCore9.name=Energy Core [UV]. +item.itemBufferCore10.name=Energy Core [MAX]. +item.itemPLACEHOLDER_Circuit.name=Quark Manipulator (UV) +item.itembookgt.name=§oThermal Boiler Manual + +// Everglade Items +item.everglades.trigger.name=§6Alkalus Disk [§cActivated§6] + + + + + + + +//Blocks +tile.blockRainforestOakLog.name=Rainforest Oak +tile.blockRainforestOakLeaves.name=Oak Leaves +tile.blockRainforestOakSapling.name=Rainforest Oak Sapling + +//TC Stuff +tile.blockFastAlchemyFurnace.0.name=Broken +tile.blockFastArcaneAlembic.1.name=Broken + +//Frame Boxes +tile.Block of Selenium.name=Block of Selenium +tile.Selenium Frame Box.name=Selenium Frame Box +tile.Block of Bromine.name=Block of Bromine +tile.Block of Strontium.name=Block of Strontium +tile.Strontium Frame Box.name=Strontium Frame Box +tile.Block of Zirconium.name=Block of Zirconium +tile.Zirconium Frame Box.name=Zirconium Frame Box +tile.Block of Ruthenium.name=Block of Ruthenium +tile.Ruthenium Frame Box.name=Ruthenium Frame Box +tile.Block of Iodine.name=Block of Iodine +tile.Iodine Frame Box.name=Iodine Frame Box +tile.Block of Hafnium.name=Block of Hafnium +tile.Hafnium Frame Box.name=Hafnium Frame Box +tile.Block of Dysprosium.name=Block of Dysprosium +tile.Dysprosium Frame Box.name=Dysprosium Frame Box +tile.Block of Tellurium.name=Block of Tellurium +tile.Tellurium Frame Box.name=Tellurium Frame Box +tile.Block of Rhodium.name=Block of Rhodium +tile.Rhodium Frame Box.name=Rhodium Frame Box +tile.Block of Rhenium.name=Block of Rhenium +tile.Rhenium Frame Box.name=Rhenium Frame Box +tile.Block of Thallium.name=Block of Thallium +tile.Thallium Frame Box.name=Thallium Frame Box +tile.Block of Technetium.name=Block of Technetium +tile.Block of Polonium.name=Block of Polonium +tile.Block of Astatine.name=Block of Astatine +tile.Block of Francium.name=Block of Francium +tile.Block of Radium.name=Block of Radium +tile.Block of Actinium.name=Block of Actinium +tile.Block of Protactinium.name=Block of Protactinium +tile.Block of Neptunium.name=Block of Neptunium +tile.Block of Curium.name=Block of Curium +tile.Block of Berkelium.name=Block of Berkelium +tile.Block of Californium.name=Block of Californium +tile.Block of Einsteinium.name=Block of Einsteinium +tile.Block of Fermium.name=Block of Fermium +tile.Block of Thorium 232.name=Block of Thorium 232 +tile.Block of Uranium 232.name=Block of Uranium 232 +tile.Block of Uranium 233.name=Block of Uranium 233 +tile.Block of Plutonium-238.name=Block of Plutonium 238 +tile.Block of Strontium-90.name=Block of Strontium 90 +tile.Block of Polonium-210.name=Block of Polonium 210 +tile.Block of Americium-241.name=Block of Americium 241 +tile.Block of Silicon Carbide.name=Block of Silicon Carbide +tile.Silicon Carbide Frame Box.name=Silicon Carbide Frame Box +tile.Block of Zirconium Carbide.name=Block of Zirconium Carbide +tile.Zirconium Carbide Frame Box.name=Zirconium Carbide Frame Box +tile.Block of Tantalum Carbide.name=Block of Tantalum Carbide +tile.Tantalum Carbide Frame Box.name=Tantalum Carbide Frame Box +tile.Block of Niobium Carbide.name=Block of Niobium Carbide +tile.Niobium Carbide Frame Box.name=Niobium Carbide Frame Box +tile.Block of Beryllium Fluoride.name=Block of Beryllium Fluoride +tile.Block of Lithium Fluoride.name=Block of Lithium Fluoride +tile.Block of Thorium Tetrafluoride.name=Block of Thorium Tetrafluoride +tile.Block of Thorium Hexafluoride.name=Block of Thorium Hexafluoride +tile.Block of Uranium Tetrafluoride.name=Block of Uranium Tetrafluoride +tile.Block of Uranium Hexafluoride.name=Block of Uranium Hexafluoride +tile.Block of Zirconium Tetrafluoride.name=Block of Zirconium Tetrafluoride +tile.Block of Neptunium Hexafluoride.name=Block of Neptunium Hexafluoride +tile.Block of Technetium Hexafluoride.name=Block of Technetium Hexafluoride +tile.Block of Selenium Hexafluoride.name=Block of Selenium Hexafluoride +tile.Block of LiFBeF2ZrF4U235.name=Block of LiFBeF2ZrF4U235 +tile.Block of LiFBeF2ZrF4UF4.name=Block of LiFBeF2ZrF4UF4 +tile.Block of LiFBeF2ThF4UF4.name=Block of LiFBeF2ThF4UF4 +tile.Block of Energy Crystal.name=Block of Energy Crystal +tile.Energy Crystal Frame Box.name=Energy Crystal Frame Box +tile.Block of Blood Steel.name=Block of Blood Steel +tile.Blood Steel Frame Box.name=Blood Steel Frame Box +tile.Block of Zeron-100.name=Block of Zeron-100 +tile.Zeron-100 Frame Box.name=Zeron-100 Frame Box +tile.Block of Tumbaga.name=Block of Tumbaga +tile.Tumbaga Frame Box.name=Tumbaga Frame Box +tile.Block of Potin.name=Block of Potin +tile.Potin Frame Box.name=Potin Frame Box +tile.Block of Staballoy.name=Block of Staballoy +tile.Staballoy Frame Box.name=Staballoy Frame Box +tile.Block of Tantalloy-60.name=Block of Tantalloy-60 +tile.Tantalloy-60 Frame Box.name=Tantalloy-60 Frame Box +tile.Block of Tantalloy-61.name=Block of Tantalloy-61 +tile.Tantalloy-61 Frame Box.name=Tantalloy-61 Frame Box +tile.Block of Inconel-625.name=Block of Inconel-625 +tile.Inconel-625 Frame Box.name=Inconel-625 Frame Box +tile.Block of Inconel-690.name=Block of Inconel-690 +tile.Inconel-690 Frame Box.name=Inconel-690 Frame Box +tile.Block of Inconel-792.name=Block of Inconel-792 +tile.Inconel-792 Frame Box.name=Inconel-792 Frame Box +tile.Block of Eglin Steel.name=Block of Eglin Steel +tile.Eglin Steel Frame Box.name=Eglin Steel Frame Box +tile.Block of Maraging Steel 250.name=Block of Maraging Steel 250 +tile.Maraging Steel 250 Frame Box.name=Maraging Steel 250 Frame Box +tile.Block of Maraging Steel 300.name=Block of Maraging Steel 300 +tile.Maraging Steel 300 Frame Box.name=Maraging Steel 300 Frame Box +tile.Block of Maraging Steel 350.name=Block of Maraging Steel 350 +tile.Maraging Steel 350 Frame Box.name=Maraging Steel 350 Frame Box +tile.Block of Stellite.name=Block of Stellite +tile.Stellite Frame Box.name=Stellite Frame Box +tile.Block of Talonite.name=Block of Talonite +tile.Talonite Frame Box.name=Talonite Frame Box +tile.Block of Hastelloy-W.name=Block of Hastelloy-W +tile.Hastelloy-W Frame Box.name=Hastelloy-W Frame Box +tile.Block of Hastelloy-X.name=Block of Hastelloy-X +tile.Hastelloy-X Frame Box.name=Hastelloy-X Frame Box +tile.Block of Hastelloy-C276.name=Block of Hastelloy-C276 +tile.Hastelloy-C276 Frame Box.name=Hastelloy-C276 Frame Box +tile.Block of Hastelloy-N.name=Block of Hastelloy-N +tile.Hastelloy-N Frame Box.name=Hastelloy-N Frame Box +tile.Block of Incoloy-020.name=Block of Incoloy-020 +tile.Incoloy-020 Frame Box.name=Incoloy-020 Frame Box +tile.Block of Incoloy-DS.name=Block of Incoloy-DS +tile.Incoloy-DS Frame Box.name=Incoloy-DS Frame Box +tile.Block of Incoloy-MA956.name=Block of Incoloy-MA956 +tile.Incoloy-MA956 Frame Box.name=Incoloy-MA956 Frame Box +tile.Block of Grisium.name=Block of Grisium +tile.Grisium Frame Box.name=Grisium Frame Box +tile.Block of Trinium.name=Block of Trinium +tile.Block of Refined Trinium.name=Block of Refined Trinium +tile.Block of Trinium Titanium Alloy.name=Block of Trinium Titanium Alloy +tile.Trinium Titanium Alloy Frame Box.name=Trinium Titanium Alloy Frame Box +tile.Block of Trinium Naquadah Alloy.name=Block of Trinium Naquadah Alloy +tile.Block of Trinium Naquadah Carbonite.name=Block of Trinium Naquadah Carbonite +tile.Trinium Naquadah Carbonite Frame Box.name=Trinium Naquadah Carbonite Frame Box +tile.Block of Quantum.name=Block of Quantum +tile.Quantum Frame Box.name=Quantum Frame Box + +//Ores +tile.OreFluorite.name=Fluorite Ore +tile.OreCrocoite.name=Crocoite Ore +tile.OreGeikielite.name=Geikielite Ore +tile.OreNichromite.name=Nichromite Ore +tile.OreTitanite.name=Titanite Ore +tile.OreZimbabweite.name=Zimbabweite Ore +tile.OreZirconolite.name=Zirconolite Ore +tile.OreGadoliniteCe.name=Gadolinite (Ce) Ore +tile.OreGadoliniteY.name=Gadolinite (Y) Ore +tile.OreLepersonnite.name=Lepersonnite Ore +tile.OreSamarskiteY.name=Samarskite (Y) Ore +tile.OreSamarskiteYb.name=Samarskite (Yb) Ore +tile.OreXenotime.name=Xenotime Ore +tile.OreYttriaite.name=Yttriaite Ore +tile.OreYttrialite.name=Yttrialite Ore +tile.OreYttrocerite.name=Yttrocerite Ore +tile.OreZircon.name=Zircon Ore +tile.OrePolycrase.name=Polycrase Ore +tile.OreZircophyllite.name=Zircophyllite Ore +tile.OreZirkelite.name=Zirkelite Ore +tile.OreLanthaniteLa.name=Lanthanite (La) Ore +tile.OreLanthaniteCe.name=Lanthanite (Ce) Ore +tile.OreLanthaniteNd.name=Lanthanite (Nd) Ore +tile.OreAgarditeY.name=Agardite (Y) Ore +tile.OreAgarditeCd.name=Agardite (Cd) Ore +tile.OreAgarditeLa.name=Agardite (La) Ore +tile.OreAgarditeNd.name=Agardite (Nd) Ore +tile.OreHibonite.name=Hibonite Ore +tile.OreCerite.name=Cerite Ore +tile.OreFluorcaphite.name=Fluorcaphite Ore +tile.OreFlorencite.name=Florencite Ore +tile.OreCryoliteF.name=Cryolite (F) Ore + +//Misc +tile.blockMFEffect.name=Special +tile.fluidBlockSludge.name=Sludge +tile.blockWorkbenchGT.name=Workbench +tile.blockWorkbenchGTAdvanced.name=Advanced Workbench +tile.blockHeliumGenerator.name=Helium Generator +tile.blockFirePit.name=Fire Pit +tile.blockFishTrap.name=Fish Catcher +tile.blockInfiniteFluidTank.name=Infinite Fluid Tank +tile.blockMiningExplosives.name=Mining Explosives +tile.blockHellFire.name=Hellish Fire +tile.blockProjectBench.name=Project Table +tile.blockTradeBench.name=Trade Bench +tile.blockModularity.name=Modularity Bench +tile.blockBlackGate.name=Wither Cage +tile.blockTankXpConverter.name=Experience Converter + +//Everglades Blocks +tile.fluidSludge.0.name=Stagnant Waste Water +tile.blockDarkWorldPortal.name=A Glimpse of the Future +tile.blockDarkWorldGround.name=Unstable Earth +tile.blockDarkWorldGround2.name=Polluted Soil +tile.blockDarkWorldGround2.2.name=Highly Polluted Soil +tile.blockDarkWorldPortalFrame.name=Containment Frame + + +//Added 1/4/18 +tile.Block of Plutonium-239.name=Block of Plutonium-239 +tile.Fluorite Ore [Old].name=Fluorite Ore [Deprecated] +tile.blockMiningPipeFake.name=Strengthened Mining Pipe +tile.blockMiningHeadFake.name=Bedrock Drill +item.itemCellLiFBeF2ThF4UF4.name=Cell of Molten Salt [LiFBeF2ThF4UF4] +item.itemCellLiFBeF2ZrF4UF4.name=Cell of Molten Salt [LiFBeF2ZrF4UF4] +item.itemCellLiFBeF2ZrF4U235.name=Cell of Molten Salt [LiFBeF2ZrF4U235] +item.itemPlateMeatRaw.name=Fleshy Panel +tile.Block of MeatRaw.name=Block of Raw Meat + +//Added 26/5/18 +item.BurntLiFBeF2ThF4UF4.name=Cell of Used Reactor Fuel [LiFBeF2ThF4UF4] +item.BurntLiFBeF2ZrF4UF4.name=Cell of Used Reactor Fuel [LiFBeF2ZrF4UF4] +item.BurntLiFBeF2ZrF4U235.name=Cell of Used Reactor Fuel [LiFBeF2ZrF4U235] +item.itemBigEgg.name= ounce Chicken Egg +item.itemPlateSodium.name=Sodium Plate + +item.itemNuggetPromethium.name=Promethium Nugget +item.itemIngotPromethium.name=Promethium Ingot +item.itemDustSmallPromethium.name=Small Pile of Promethium +item.itemDustTinyPromethium.name=Tiny Pile of Promethium +item.itemDustPromethium.name=Promethium Dust +tile.Block of Promethium.name=Block of Promethium + +item.itemCellAmericium241.name=Americium 241 Cell +item.itemCellPolonium210.name=Polonium 210 Cell +item.itemCellStrontium90.name=Strontium 90 Cell +item.itemCellPlutonium238.name=Plutonium 238 Cell + +entity.MiningCharge.name=Mining Charge +entity.throwablePotionSulfuric.name=Flask of Sulfuric Acid +entity.throwablePotionHydrofluoric.name=Flask of Hydrofluoric Acid +entity.toxinBall.name=Toxin globule +entity.plasmaBolt.name=Plasma +entity.bigChickenFriendly.name=Giant Chicken + +//Added 26/6/18 +tile.OreTrinium.name=Trinium Ore +item.crushedTrinium.name=Crushed Trinium Ore +item.crushedCentrifugedTrinium.name=Centrifuged Crushed Trinium Ore +item.crushedPurifiedTrinium.name=Purified Crushed Trinium Ore +item.dustImpureTrinium.name=Impure Trinium Dust +item.dustPureTrinium.name=Purified Trinium Dust + +//Added 1/7/18 +entity.WiseVillager.name=Wise Villager +tile.blockMobSpawnerEx.0.name=Monster Spawner +tile.blockMobSpawnerEx.1.name=Monster Spawner +tile.blockMobSpawnerEx.2.name=Monster Spawner +tile.blockMobSpawnerEx.3.name=Monster Spawner +tile.blockMobSpawnerEx.4.name=Monster Spawner +tile.blockMobSpawnerEx.5.name=Monster Spawner +tile.blockMobSpawnerEx.6.name=Monster Spawner +tile.blockMobSpawnerEx.7.name=Monster Spawner +tile.blockMobSpawnerEx.8.name=Monster Spawner +tile.blockMobSpawnerEx.9.name=Monster Spawner +tile.blockMobSpawnerEx.10.name=Monster Spawner +tile.blockMobSpawnerEx.11.name=Monster Spawner +tile.blockMobSpawnerEx.12.name=Monster Spawner +tile.blockMobSpawnerEx.13.name=Monster Spawner +tile.blockMobSpawnerEx.14.name=Monster Spawner +tile.blockMobSpawnerEx.15.name=Monster Spawner +description.villager.profession.miscutils.banker=Banker +description.villager.profession.miscutils.technician=GT Technician +description.villager.profession.miscutils.trader=Ore Trader +description.villager.profession.miscutils.aboriginal=Native Australian + +//Added 23/8/18 +item.itemHatTinFoil.name=Tin Foil Hat + +//Added 13/9/18 +entity.WiseVillager.name=Wise Villager +entity.Aboriginal.name=Native +entity.miscutils.constructStaballoy.name=Staballoy Construct +entity.miscutils.sickBlaze.name=Infected Zealot + +//Added 15/9/18 +item.ZirconiumTetrafluoride.name=Zirconium Tetrafluoride Cell +item.Formaldehyde.name=Formaldehyde Cell +item.RocketFuelMixA.name=H8N4C2O4 Rocket Fuel Cell +item.RocketFuelMixB.name=RP-1 Rocket Fuel Cell +item.RocketFuelMixC.name=CN3H7O3 Rocket Fuel Cell +item.RocketFuelMixD.name=Dense Hydrazine Rocket Fuel Cell +item.RP1Fuel.name=RP-1 Fuel Cell +item.Monomethylhydrazine.name=Monomethylhydrazine Cell +item.Hydrazine.name=Hydrazine Cell +item.NitrogenTetroxide.name=Nitrogen Tetroxide Cell +item.NitrousOxide.name=Nitrous Oxide Cell +item.AmmoniumNitrateSlurry.name=Ammonium Nitrate Slurry Cell +item.Kerosene.name=Kerosene Cell +item.LiquidOxygen.name=Liquid Oxygen Cell [LOX] + +//Added 8/1/19 + +//Ores + +tile.OreIrarsite.name=Irarsite Ore +item.crushedIrarsite.name=Crushed Irarsite Ore +item.crushedCentrifugedIrarsite.name=Centrifuged Crushed Irarsite Ore +item.crushedPurifiedIrarsite.name=Purified Crushed Irarsite Ore +item.dustImpureIrarsite.name=Impure Irarsite Dust +item.dustPureIrarsite.name=Purified Irarsite Dust +item.itemDustIrarsite.name=Irarsite Dust +item.itemDustTinyIrarsite.name=Tiny Pile of Irarsite Dust +item.itemDustSmallIrarsite.name=Small Pile of Irarsite Dust + +tile.OreMiessiite.name=Miessiite Ore +item.crushedMiessiite.name=Crushed Miessiite Ore +item.crushedCentrifugedMiessiite.name=Centrifuged Crushed Miessiite Ore +item.crushedPurifiedMiessiite.name=Purified Crushed Miessiite Ore +item.dustImpureMiessiite.name=Impure Miessiite Dust +item.dustPureMiessiite.name=Purified Miessiite Dust +item.itemDustMiessiite.name=Miessiite Dust +item.itemDustTinyMiessiite.name=Tiny Pile of Miessiite Dust +item.itemDustSmallMiessiite.name=Small Pile of Miessiite Dust + +tile.OreComancheite.name=Comancheite Ore +item.crushedComancheite.name=Crushed Comancheite Ore +item.crushedCentrifugedComancheite.name=Centrifuged Crushed Comancheite Ore +item.crushedPurifiedComancheite.name=Purified Crushed Comancheite Ore +item.dustImpureComancheite.name=Impure Comancheite Dust +item.dustPureComancheite.name=Purified Comancheite Dust +item.itemDustComancheite.name=Comancheite Dust +item.itemDustTinyComancheite.name=Tiny Pile of Comancheite Dust +item.itemDustSmallComancheite.name=Small Pile of Comancheite Dust + +tile.OreKoboldite.name=Koboldite Ore +item.crushedKoboldite.name=Crushed Koboldite Ore +item.crushedCentrifugedKoboldite.name=Centrifuged Crushed Koboldite Ore +item.crushedPurifiedKoboldite.name=Purified Crushed Koboldite Ore +item.dustImpureKoboldite.name=Impure Koboldite Dust +item.dustPureKoboldite.name=Purified Koboldite Dust +item.itemDustKoboldite.name=Koboldite Dust +item.itemDustTinyKoboldite.name=Tiny Pile of Koboldite Dust +item.itemDustSmallKoboldite.name=Small Pile of Koboldite Dust + +tile.OrePerroudite.name=Perroudite Ore +item.crushedPerroudite.name=Crushed Perroudite Ore +item.crushedCentrifugedPerroudite.name=Centrifuged Crushed Perroudite Ore +item.crushedPurifiedPerroudite.name=Purified Crushed Perroudite Ore +item.dustImpurePerroudite.name=Impure Perroudite Dust +item.dustPurePerroudite.name=Purified Perroudite Dust +item.itemDustPerroudite.name=Perroudite Dust +item.itemDustTinyPerroudite.name=Tiny Pile of Perroudite Dust +item.itemDustSmallPerroudite.name=Small Pile of Perroudite Dust + +tile.OreDemicheleite.name=Demicheleite Ore +item.crushedDemicheleite.name=Crushed Demicheleite Ore +item.crushedCentrifugedDemicheleite.name=Centrifuged Crushed Demicheleite Ore +item.crushedPurifiedDemicheleite.name=Purified Crushed Demicheleite Ore +item.dustImpureDemicheleite.name=Impure Demicheleite Dust +item.dustPureDemicheleite.name=Purified Demicheleite Dust +item.itemDustDemicheleite.name=Demicheleite Dust +item.itemDustTinyDemicheleite.name=Tiny Pile of Demicheleite Dust +item.itemDustSmallDemicheleite.name=Small Pile of Demicheleite Dust + +tile.OreAlburnite.name=Alburnite Ore +item.crushedAlburnite.name=Crushed Alburnite Ore +item.crushedCentrifugedAlburnite.name=Centrifuged Crushed Alburnite Ore +item.crushedPurifiedAlburnite.name=Purified Crushed Alburnite Ore +item.dustImpureAlburnite.name=Impure Alburnite Dust +item.dustPureAlburnite.name=Purified Alburnite Dust +item.itemDustAlburnite.name=Alburnite Dust +item.itemDustTinyAlburnite.name=Tiny Pile of Alburnite Dust +item.itemDustSmallAlburnite.name=Small Pile of Alburnite Dust + +tile.OreLautarite.name=Lautarite Ore +item.crushedLautarite.name=Crushed Lautarite Ore +item.crushedCentrifugedLautarite.name=Centrifuged Crushed Lautarite Ore +item.crushedPurifiedLautarite.name=Purified Crushed Lautarite Ore +item.dustImpureLautarite.name=Impure Lautarite Dust +item.dustPureLautarite.name=Purified Lautarite Dust +item.itemDustLautarite.name=Lautarite Dust +item.itemDustTinyLautarite.name=Tiny Pile of Lautarite Dust +item.itemDustSmallLautarite.name=Small Pile of Lautarite Dust + +tile.OreBariteRd.name=Barite (Rd) Ore +item.crushedBariteRd.name=Crushed Barite (Rd) Ore +item.crushedCentrifugedBariteRd.name=Centrifuged Crushed Barite (Rd) Ore +item.crushedPurifiedBariteRd.name=Purified Crushed Barite (Rd) Ore +item.dustImpureBariteRd.name=Impure Barite (Rd) Dust +item.dustPureBariteRd.name=Purified Barite (Rd) Dust +item.itemDustBariteRd.name=Barite (Rd) Dust +item.itemDustTinyBariteRd.name=Tiny Pile of Barite (Rd) Dust +item.itemDustSmallBariteRd.name=Small Pile of Barite (Rd) Dust + +tile.OreHoneaite.name=Honeaite Ore +item.crushedHoneaite.name=Crushed Honeaite Ore +item.crushedCentrifugedHoneaite.name=Centrifuged Crushed Honeaite Ore +item.crushedPurifiedHoneaite.name=Purified Crushed Honeaite Ore +item.dustImpureHoneaite.name=Impure Honeaite Dust +item.dustPureHoneaite.name=Purified Honeaite Dust +item.itemDustHoneaite.name=Honeaite Dust +item.itemDustTinyHoneaite.name=Tiny Pile of Honeaite Dust +item.itemDustSmallHoneaite.name=Small Pile of Honeaite Dust + +tile.OreLafossaite.name=Lafossaite Ore +item.crushedLafossaite.name=Crushed Lafossaite Ore +item.crushedCentrifugedLafossaite.name=Centrifuged Crushed Lafossaite Ore +item.crushedPurifiedLafossaite.name=Purified Crushed Lafossaite Ore +item.dustImpureLafossaite.name=Impure Lafossaite Dust +item.dustPureLafossaite.name=Purified Lafossaite Dust +item.itemDustLafossaite.name=Lafossaite Dust +item.itemDustTinyLafossaite.name=Tiny Pile of Lafossaite Dust +item.itemDustSmallLafossaite.name=Small Pile of Lafossaite Dust + +tile.OreKashinite.name=Kashinite Ore +item.crushedKashinite.name=Crushed Kashinite Ore +item.crushedCentrifugedKashinite.name=Centrifuged Crushed Kashinite Ore +item.crushedPurifiedKashinite.name=Purified Crushed Kashinite Ore +item.dustImpureKashinite.name=Impure Kashinite Dust +item.dustPureKashinite.name=Purified Kashinite Dust +item.itemDustKashinite.name=Kashinite Dust +item.itemDustTinyKashinite.name=Tiny Pile of Kashinite Dust +item.itemDustSmallKashinite.name=Small Pile of Kashinite Dust + +tile.OreRadioactiveMineralMix.name=Strange Ore +item.crushedRadioactiveMineralMix.name=Crushed Strange Ore +item.crushedCentrifugedRadioactiveMineralMix.name=Centrifuged Crushed Strange Ore +item.crushedPurifiedRadioactiveMineralMix.name=Purified Crushed Strange Ore +item.dustImpureRadioactiveMineralMix.name=Impure Strange Dust +item.dustPureRadioactiveMineralMix.name=Purified Strange Dust +item.itemDustRadioactiveMineralMix.name=Strange Dust +item.itemDustTinyRadioactiveMineralMix.name=Tiny Pile of Strange Dust +item.itemDustSmallRadioactiveMineralMix.name=Small Pile of Strange Dust + +tile.OreDemicheleiteBr.name=Demicheleite (Br) Ore +item.crushedDemicheleiteBr.name=Crushed Demicheleite (Br) Ore +item.crushedCentrifugedDemicheleiteBr.name=Centrifuged Crushed Demicheleite (Br) Ore +item.crushedPurifiedDemicheleiteBr.name=Purified Crushed Demicheleite (Br) Ore +item.dustImpureDemicheleiteBr.name=Impure Demicheleite (Br) Dust +item.dustPureDemicheleiteBr.name=Purified Demicheleite (Br) Dust +item.itemDustDemicheleiteBr.name=Demicheleite (Br) Dust + + +//Materials + +item.itemIngotTitansteel.name=Titansteel Ingot +item.itemHotIngotTitansteel.name=Hot Titansteel Ingot +item.itemDustTitansteel.name=Titansteel Dust +item.itemDustTinyTitansteel.name=Tiny Pile of Titansteel Dust +item.itemDustSmallTitansteel.name=Small Pile of Titansteel Dust +item.itemNuggetTitansteel.name=Titansteel Nugget +item.itemPlateTitansteel.name=Titansteel Plate +item.itemPlateDoubleTitansteel.name=Double Titansteel Plate +item.itemBoltTitansteel.name=Titansteel Bolt +item.itemRodTitansteel.name=Titansteel Rod +item.itemRodLongTitansteel.name=Long Titansteel Rod +item.itemRingTitansteel.name=Titansteel Ring +item.itemScrewTitansteel.name=Titansteel Screw +item.itemRotorTitansteel.name=Titansteel Rotor +item.itemGearTitansteel.name=Titansteel Gear +item.itemCellTitansteel.name=Titansteel Cell +tile.Block of Titansteel.name=Block of Titansteel +tile.Titansteel Frame Box.name=Titansteel Frame Box + +item.itemIngotOctiron.name=Octiron Ingot +item.itemHotIngotOctiron.name=Hot Octiron Ingot +item.itemDustOctiron.name=Octiron Dust +item.itemDustTinyOctiron.name=Tiny Pile of Octiron Dust +item.itemDustSmallOctiron.name=Small Pile of Octiron Dust +item.itemNuggetOctiron.name=Octiron Nugget +item.itemPlateOctiron.name=Octiron Plate +item.itemPlateDoubleOctiron.name=Double Octiron Plate +item.itemBoltOctiron.name=Octiron Bolt +item.itemRodOctiron.name=Octiron Rod +item.itemRodLongOctiron.name=Long Octiron Rod +item.itemRingOctiron.name=Octiron Ring +item.itemScrewOctiron.name=Octiron Screw +item.itemRotorOctiron.name=Octiron Rotor +item.itemGearOctiron.name=Octiron Gear +item.itemCellOctiron.name=Octiron Cell +tile.Block of Octiron.name=Block of Octiron +tile.Octiron Frame Box.name=Octiron Frame Box + +item.itemIngotWatertightSteel.name=Watertight Steel Ingot +item.itemHotIngotWatertightSteel.name=Hot Watertight Steel Ingot +item.itemDustWatertightSteel.name=Watertight Steel Dust +item.itemDustTinyWatertightSteel.name=Tiny Pile of Watertight Steel Dust +item.itemDustSmallWatertightSteel.name=Small Pile of Watertight Steel Dust +item.itemNuggetWatertightSteel.name=Watertight Steel Nugget +item.itemPlateWatertightSteel.name=Watertight Steel Plate +item.itemPlateDoubleWatertightSteel.name=Double Watertight Steel Plate +item.itemBoltWatertightSteel.name=Watertight Steel Bolt +item.itemRodWatertightSteel.name=Watertight Steel Rod +item.itemRodLongWatertightSteel.name=Long Watertight Steel Rod +item.itemRingWatertightSteel.name=Watertight Steel Ring +item.itemScrewWatertightSteel.name=Watertight Steel Screw +item.itemRotorWatertightSteel.name=Watertight Steel Rotor +item.itemGearWatertightSteel.name=Watertight Steel Gear +item.itemCellWatertightSteel.name=Watertight Steel Cell +tile.Block of Watertight Steel.name=Block of Watertight Steel +tile.Watertight Steel Frame Box.name=Watertight Steel Frame Box + +item.itemIngotCelestialTungsten.name=Celestial Tungsten Ingot +item.itemHotIngotCelestialTungsten.name=Hot Celestial Tungsten Ingot +item.itemDustCelestialTungsten.name=Celestial Tungsten Dust +item.itemDustTinyCelestialTungsten.name=Tiny Pile of Celestial Tungsten Dust +item.itemDustSmallCelestialTungsten.name=Small Pile of Celestial Tungsten Dust +item.itemNuggetCelestialTungsten.name=Celestial Tungsten Nugget +item.itemPlateCelestialTungsten.name=Celestial Tungsten Plate +item.itemPlateDoubleCelestialTungsten.name=Double Celestial Tungsten Plate +item.itemBoltCelestialTungsten.name=Celestial Tungsten Bolt +item.itemRodCelestialTungsten.name=Celestial Tungsten Rod +item.itemRodLongCelestialTungsten.name=Long Celestial Tungsten Rod +item.itemRingCelestialTungsten.name=Celestial Tungsten Ring +item.itemScrewCelestialTungsten.name=Celestial Tungsten Screw +item.itemRotorCelestialTungsten.name=Celestial Tungsten Rotor +item.itemGearCelestialTungsten.name=Celestial Tungsten Gear +item.itemCellCelestialTungsten.name=Celestial Tungsten Cell +tile.Block of Celestial Tungsten.name=Block of Celestial Tungsten +tile.Celestial Tungsten Frame Box.name=Celestial Tungsten Frame Box + +item.itemIngotHypogen.name=Hypogen Ingot +item.itemHotIngotHypogen.name=Hot Hypogen Ingot +item.itemDustHypogen.name=Hypogen Dust +item.itemDustTinyHypogen.name=Tiny Pile of Hypogen Dust +item.itemDustSmallHypogen.name=Small Pile of Hypogen Dust +item.itemNuggetHypogen.name=Hypogen Nugget +item.itemPlateHypogen.name=Hypogen Plate +item.itemPlateDoubleHypogen.name=Double Hypogen Plate +item.itemBoltHypogen.name=Hypogen Bolt +item.itemRodHypogen.name=Hypogen Rod +item.itemRodLongHypogen.name=Long Hypogen Rod +item.itemRingHypogen.name=Hypogen Ring +item.itemScrewHypogen.name=Hypogen Screw +item.itemRotorHypogen.name=Hypogen Rotor +item.itemGearHypogen.name=Hypogen Gear +item.itemCellHypogen.name=Hypogen Cell +tile.Block of Hypogen.name=Block of Hypogen +tile.Hypogen Frame Box.name=Hypogen Frame Box + +item.itemIngotArceusAlloy2B.name=Arceus Alloy 2B Ingot +item.itemHotIngotArceusAlloy2B.name=Hot Arceus Alloy 2B Ingot +item.itemDustArceusAlloy2B.name=Arceus Alloy 2B Dust +item.itemDustTinyArceusAlloy2B.name=Tiny Pile of Arceus Alloy 2B Dust +item.itemDustSmallArceusAlloy2B.name=Small Pile of Arceus Alloy 2B Dust +item.itemNuggetArceusAlloy2B.name=Arceus Alloy 2B Nugget +item.itemPlateArceusAlloy2B.name=Arceus Alloy 2B Plate +item.itemPlateDoubleArceusAlloy2B.name=Double Arceus Alloy 2B Plate +item.itemBoltArceusAlloy2B.name=Arceus Alloy 2B Bolt +item.itemRodArceusAlloy2B.name=Arceus Alloy 2B Rod +item.itemRodLongArceusAlloy2B.name=Long Arceus Alloy 2B Rod +item.itemRingArceusAlloy2B.name=Arceus Alloy 2B Ring +item.itemScrewArceusAlloy2B.name=Arceus Alloy 2B Screw +item.itemRotorArceusAlloy2B.name=Arceus Alloy 2B Rotor +item.itemGearArceusAlloy2B.name=Arceus Alloy 2B Gear +item.itemCellArceusAlloy2B.name=Arceus Alloy 2B Cell +tile.Block of Arceus Alloy 2B.name=Block of Arceus Alloy 2B +tile.Arceus Alloy 2B Frame Box.name=Arceus Alloy 2B Frame Box + +item.itemIngotChromaticGlass.name=Chromatic Glass Ingot +item.itemHotIngotChromaticGlass.name=Hot Chromatic Glass Ingot +item.itemDustChromaticGlass.name=Chromatic Glass Dust +item.itemDustTinyChromaticGlass.name=Tiny Pile of Chromatic Glass Dust +item.itemDustSmallChromaticGlass.name=Small Pile of Chromatic Glass Dust +item.itemNuggetChromaticGlass.name=Chromatic Glass Nugget +item.itemPlateChromaticGlass.name=Chromatic Glass Plate +item.itemPlateDoubleChromaticGlass.name=Double Chromatic Glass Plate +item.itemBoltChromaticGlass.name=Chromatic Glass Bolt +item.itemRodChromaticGlass.name=Chromatic Glass Rod +item.itemRodLongChromaticGlass.name=Long Chromatic Glass Rod +item.itemRingChromaticGlass.name=Chromatic Glass Ring +item.itemScrewChromaticGlass.name=Chromatic Glass Screw +item.itemRotorChromaticGlass.name=Chromatic Glass Rotor +item.itemGearChromaticGlass.name=Chromatic Glass Gear +item.itemCellChromaticGlass.name=Chromatic Glass Cell +tile.Block of Chromatic Glass.name=Block of Chromatic Glass +tile.Chromatic Glass Frame Box.name=Chromatic Glass Frame Box + +item.itemIngotAstralTitanium.name=Astral Titanium Ingot +item.itemHotIngotAstralTitanium.name=Hot Astral Titanium Ingot +item.itemDustAstralTitanium.name=Astral Titanium Dust +item.itemDustTinyAstralTitanium.name=Tiny Pile of Astral Titanium Dust +item.itemDustSmallAstralTitanium.name=Small Pile of Astral Titanium Dust +item.itemNuggetAstralTitanium.name=Astral Titanium Nugget +item.itemPlateAstralTitanium.name=Astral Titanium Plate +item.itemPlateDoubleAstralTitanium.name=Double Astral Titanium Plate +item.itemBoltAstralTitanium.name=Astral Titanium Bolt +item.itemRodAstralTitanium.name=Astral Titanium Rod +item.itemRodLongAstralTitanium.name=Long Astral Titanium Rod +item.itemRingAstralTitanium.name=Astral Titanium Ring +item.itemScrewAstralTitanium.name=Astral Titanium Screw +item.itemRotorAstralTitanium.name=Astral Titanium Rotor +item.itemGearAstralTitanium.name=Astral Titanium Gear +item.itemCellAstralTitanium.name=Astral Titanium Cell +tile.Block of Astral Titanium.name=Block of Astral Titanium +tile.Astral Titanium Frame Box.name=Astral Titanium Frame Box + +item.itemIngotTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Ingot +item.itemHotIngotTungstenTitaniumCarbide.name=Hot Tungsten Titanium Carbide Ingot +item.itemDustTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Dust +item.itemDustTinyTungstenTitaniumCarbide.name=Tiny Pile of Tungsten Titanium Carbide Dust +item.itemDustSmallTungstenTitaniumCarbide.name=Small Pile of Tungsten Titanium Carbide Dust +item.itemNuggetTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Nugget +item.itemPlateTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Plate +item.itemPlateDoubleTungstenTitaniumCarbide.name=Double Tungsten Titanium Carbide Plate +item.itemBoltTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Bolt +item.itemRodTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Rod +item.itemRodLongTungstenTitaniumCarbide.name=Long Tungsten Titanium Carbide Rod +item.itemRingTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Ring +item.itemScrewTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Screw +item.itemRotorTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Rotor +item.itemGearTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Gear +item.itemCellTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Cell +tile.Block of Tungsten Titanium Carbide.name=Block of Tungsten Titanium Carbide +tile.Tungsten Titanium Carbide Frame Box.name=Tungsten Titanium Carbide Frame Box + +item.itemIngotNitinol60.name=Nitinol 60 Ingot +item.itemHotIngotNitinol60.name=Hot Nitinol 60 Ingot +item.itemDustNitinol60.name=Nitinol 60 Dust +item.itemDustTinyNitinol60.name=Tiny Pile of Nitinol 60 Dust +item.itemDustSmallNitinol60.name=Small Pile of Nitinol 60 Dust +item.itemNuggetNitinol60.name=Nitinol 60 Nugget +item.itemPlateNitinol60.name=Nitinol 60 Plate +item.itemPlateDoubleNitinol60.name=Double Nitinol 60 Plate +item.itemBoltNitinol60.name=Nitinol 60 Bolt +item.itemRodNitinol60.name=Nitinol 60 Rod +item.itemRodLongNitinol60.name=Long Nitinol 60 Rod +item.itemRingNitinol60.name=Nitinol 60 Ring +item.itemScrewNitinol60.name=Nitinol 60 Screw +item.itemRotorNitinol60.name=Nitinol 60 Rotor +item.itemGearNitinol60.name=Nitinol 60 Gear +item.itemCellNitinol60.name=Nitinol 60 Cell +tile.Block of Nitinol 60.name=Block of Nitinol 60 +tile.Nitinol 60 Frame Box.name=Nitinol 60 Frame Box + +item.itemIngotAdvancedNitinol.name=Advanced Nitinol Ingot +item.itemHotIngotAdvancedNitinol.name=Hot Advanced Nitinol Ingot +item.itemDustAdvancedNitinol.name=Advanced Nitinol Dust +item.itemDustTinyAdvancedNitinol.name=Tiny Pile of Advanced Nitinol Dust +item.itemDustSmallAdvancedNitinol.name=Small Pile of Advanced Nitinol Dust +item.itemNuggetAdvancedNitinol.name=Advanced Nitinol Nugget +item.itemPlateAdvancedNitinol.name=Advanced Nitinol Plate +item.itemPlateDoubleAdvancedNitinol.name=Double Advanced Nitinol Plate +item.itemBoltAdvancedNitinol.name=Advanced Nitinol Bolt +item.itemRodAdvancedNitinol.name=Advanced Nitinol Rod +item.itemRodLongAdvancedNitinol.name=Long Advanced Nitinol Rod +item.itemRingAdvancedNitinol.name=Advanced Nitinol Ring +item.itemScrewAdvancedNitinol.name=Advanced Nitinol Screw +item.itemRotorAdvancedNitinol.name=Advanced Nitinol Rotor +item.itemGearAdvancedNitinol.name=Advanced Nitinol Gear +item.itemCellAdvancedNitinol.name=Advanced Nitinol Cell +tile.Block of Advanced Nitinol.name=Block of Advanced Nitinol +tile.Advanced Nitinol Frame Box.name=Advanced Nitinol Frame Box + +item.itemIngotArcanite.name=Arcanite Ingot +item.itemHotIngotArcanite.name=Hot Arcanite Ingot +item.itemDustArcanite.name=Arcanite Dust +item.itemDustTinyArcanite.name=Tiny Pile of Arcanite Dust +item.itemDustSmallArcanite.name=Small Pile of Arcanite Dust +item.itemNuggetArcanite.name=Arcanite Nugget +item.itemPlateArcanite.name=Arcanite Plate +item.itemPlateDoubleArcanite.name=Double Arcanite Plate +item.itemBoltArcanite.name=Arcanite Bolt +item.itemRodArcanite.name=Arcanite Rod +item.itemRodLongArcanite.name=Long Arcanite Rod +item.itemRingArcanite.name=Arcanite Ring +item.itemScrewArcanite.name=Arcanite Screw +item.itemRotorArcanite.name=Arcanite Rotor +item.itemGearArcanite.name=Arcanite Gear +item.itemCellArcanite.name=Arcanite Cell +tile.Block of Arcanite.name=Block of Arcanite +tile.Arcanite Frame Box.name=Arcanite Frame Box + +item.itemIngotPikyonium64B.name=Pikyonium 64B Ingot +item.itemHotIngotPikyonium64B.name=Hot Pikyonium 64B Ingot +item.itemDustPikyonium64B.name=Pikyonium 64B Dust +item.itemDustTinyPikyonium64B.name=Tiny Pile of Pikyonium 64B Dust +item.itemDustSmallPikyonium64B.name=Small Pile of Pikyonium 64B Dust +item.itemNuggetPikyonium64B.name=Pikyonium 64B Nugget +item.itemPlatePikyonium64B.name=Pikyonium 64B Plate +item.itemPlateDoublePikyonium64B.name=Double Pikyonium 64B Plate +item.itemBoltPikyonium64B.name=Pikyonium 64B Bolt +item.itemRodPikyonium64B.name=Pikyonium 64B Rod +item.itemRodLongPikyonium64B.name=Long Pikyonium 64B Rod +item.itemRingPikyonium64B.name=Pikyonium 64B Ring +item.itemScrewPikyonium64B.name=Pikyonium 64B Screw +item.itemRotorPikyonium64B.name=Pikyonium 64B Rotor +item.itemGearPikyonium64B.name=Pikyonium 64B Gear +item.itemCellPikyonium64B.name=Pikyonium 64B Cell +tile.Block of Pikyonium 64B.name=Block of Pikyonium 64B +tile.Pikyonium 64B Frame Box.name=Pikyonium 64B Frame Box + +item.itemIngotCinobiteA243.name=Cinobite A243 Ingot +item.itemHotIngotCinobiteA243.name=Hot Cinobite A243 Ingot +item.itemDustCinobiteA243.name=Cinobite A243 Dust +item.itemDustTinyCinobiteA243.name=Tiny Pile of Cinobite A243 Dust +item.itemDustSmallCinobiteA243.name=Small Pile of Cinobite A243 Dust +item.itemNuggetCinobiteA243.name=Cinobite A243 Nugget +item.itemPlateCinobiteA243.name=Cinobite A243 Plate +item.itemPlateDoubleCinobiteA243.name=Double Cinobite A243 Plate +item.itemBoltCinobiteA243.name=Cinobite A243 Bolt +item.itemRodCinobiteA243.name=Cinobite A243 Rod +item.itemRodLongCinobiteA243.name=Long Cinobite A243 Rod +item.itemRingCinobiteA243.name=Cinobite A243 Ring +item.itemScrewCinobiteA243.name=Cinobite A243 Screw +item.itemRotorCinobiteA243.name=Cinobite A243 Rotor +item.itemGearCinobiteA243.name=Cinobite A243 Gear +item.itemCellCinobiteA243.name=Cinobite A243 Cell +tile.Block of Cinobite A243.name=Block of Cinobite A243 +tile.Cinobite A243 Frame Box.name=Cinobite A243 Frame Box + +item.itemIngotLafiumCompound.name=Lafium Compound Ingot +item.itemHotIngotLafiumCompound.name=Hot Lafium Compound Ingot +item.itemDustLafiumCompound.name=Lafium Compound Dust +item.itemDustTinyLafiumCompound.name=Tiny Pile of Lafium Compound Dust +item.itemDustSmallLafiumCompound.name=Small Pile of Lafium Compound Dust +item.itemNuggetLafiumCompound.name=Lafium Compound Nugget +item.itemPlateLafiumCompound.name=Lafium Compound Plate +item.itemPlateDoubleLafiumCompound.name=Double Lafium Compound Plate +item.itemBoltLafiumCompound.name=Lafium Compound Bolt +item.itemRodLafiumCompound.name=Lafium Compound Rod +item.itemRodLongLafiumCompound.name=Long Lafium Compound Rod +item.itemRingLafiumCompound.name=Lafium Compound Ring +item.itemScrewLafiumCompound.name=Lafium Compound Screw +item.itemRotorLafiumCompound.name=Lafium Compound Rotor +item.itemGearLafiumCompound.name=Lafium Compound Gear +item.itemCellLafiumCompound.name=Lafium Compound Cell +tile.Block of Lafium Compound.name=Block of Lafium Compound +tile.Lafium Compound Frame Box.name=Lafium Compound Frame Box + +item.itemIngotKoboldite.name=Koboldite Ingot +item.itemHotIngotKoboldite.name=Hot Koboldite Ingot +item.itemDustKoboldite.name=Koboldite Dust +item.itemDustTinyKoboldite.name=Tiny Pile of Koboldite Dust +item.itemDustSmallKoboldite.name=Small Pile of Koboldite Dust +item.itemNuggetKoboldite.name=Koboldite Nugget +item.itemPlateKoboldite.name=Koboldite Plate +item.itemPlateDoubleKoboldite.name=Double Koboldite Plate +item.itemBoltKoboldite.name=Koboldite Bolt +item.itemRodKoboldite.name=Koboldite Rod +item.itemRodLongKoboldite.name=Long Koboldite Rod +item.itemRingKoboldite.name=Koboldite Ring +item.itemScrewKoboldite.name=Koboldite Screw +item.itemRotorKoboldite.name=Koboldite Rotor +item.itemGearKoboldite.name=Koboldite Gear +item.itemCellKoboldite.name=Koboldite Cell +tile.Block of Koboldite.name=Block of Koboldite +tile.Koboldite Frame Box.name=Koboldite Frame Box + +item.itemIngotAbyssalAlloy.name=Abyssal Alloy Ingot +item.itemHotIngotAbyssalAlloy.name=Hot Abyssal Alloy Ingot +item.itemDustAbyssalAlloy.name=Abyssal Alloy Dust +item.itemDustTinyAbyssalAlloy.name=Tiny Pile of Abyssal Alloy Dust +item.itemDustSmallAbyssalAlloy.name=Small Pile of Abyssal Alloy Dust +item.itemNuggetAbyssalAlloy.name=Abyssal Alloy Nugget +item.itemPlateAbyssalAlloy.name=Abyssal Alloy Plate +item.itemPlateDoubleAbyssalAlloy.name=Double Abyssal Alloy Plate +item.itemBoltAbyssalAlloy.name=Abyssal Alloy Bolt +item.itemRodAbyssalAlloy.name=Abyssal Alloy Rod +item.itemRodLongAbyssalAlloy.name=Long Abyssal Alloy Rod +item.itemRingAbyssalAlloy.name=Abyssal Alloy Ring +item.itemScrewAbyssalAlloy.name=Abyssal Alloy Screw +item.itemRotorAbyssalAlloy.name=Abyssal Alloy Rotor +item.itemGearAbyssalAlloy.name=Abyssal Alloy Gear +item.itemCellAbyssalAlloy.name=Abyssal Alloy Cell +tile.Block of Abyssal Alloy.name=Block of Abyssal Alloy +tile.Abyssal Alloy Frame Box.name=Abyssal Alloy Frame Box + + + + + + + + + + + + + + + + + + + +//Radioactive +item.dustTechnetium99M.name=Technetium 99M Dust +item.dustTechnetium99.name=Technetium 99 Dust +item.dustMolybdenum99.name=Molybdenum 99 Dust + +//Bags +item.item.MysticBag.name=Mystic Pouch +item.item.Eatotron9000.name=Eatotronic 9000 +item.item.ToolBox.name=Workers Toolbox + +//Cells +item.Bromine.name=Bromine Cell +item.Krypton.name=Krypton Cell +item.cryotheum.name=Cryotheum Cell +item.pyrotheum.name=Pyrotheum Cell +item.GeneticMutagen.name=Mutagen Cell + +//Ingots +item.itemHotIngotIncoloy020.name=Hot Incoloy-020 Ingot +item.itemHotIngotIncoloyDS.name=Hot Incoloy-DS Ingot +item.itemHotIngotTalonite.name=Hot Talonite Ingot +item.itemHotIngotHastelloyX.name=Hot Hastelloy-X Ingot +item.itemHotIngotHastelloyW.name=Hot Hastelloy-W Carbide Ingot + +//Railcraft Fix +item.railcraft.part.plate.lead.name=Lead Plate + +//Ions +item.particle.ion.Hydrogen.name=Hydrogen Ion +item.particle.ion.Helium.name=Helium Ion +item.particle.ion.Lithium.name=Lithium Ion +item.particle.ion.Beryllium.name=Beryllium Ion +item.particle.ion.Boron.name=Boron Ion +item.particle.ion.Carbon.name=Carbon Ion +item.particle.ion.Nitrogen.name=Nitrogen Ion +item.particle.ion.Oxygen.name=Oxygen Ion +item.particle.ion.Fluorine.name=Fluorine Ion +item.particle.ion.Neon.name=Neon Ion +item.particle.ion.Sodium.name=Sodium Ion +item.particle.ion.Magnesium.name=Magnesium Ion +item.particle.ion.Aluminum.name=Aluminum Ion +item.particle.ion.Silicon.name=Silicon Ion +item.particle.ion.Phosphorus.name=Phosphorus Ion +item.particle.ion.Sulfur.name=Sulfur Ion +item.particle.ion.Chlorine.name=Chlorine Ion +item.particle.ion.Argon.name=Argon Ion +item.particle.ion.Potassium.name=Potassium Ion +item.particle.ion.Calcium.name=Calcium Ion +item.particle.ion.Scandium.name=Scandium Ion +item.particle.ion.Titanium.name=Titanium Ion +item.particle.ion.Vanadium.name=Vanadium Ion +item.particle.ion.Chromium.name=Chromium Ion +item.particle.ion.Manganese.name=Manganese Ion +item.particle.ion.Iron.name=Iron Ion +item.particle.ion.Cobalt.name=Cobalt Ion +item.particle.ion.Nickel.name=Nickel Ion +item.particle.ion.Copper.name=Copper Ion +item.particle.ion.Zinc.name=Zinc Ion +item.particle.ion.Gallium.name=Gallium Ion +item.particle.ion.Germanium.name=Germanium Ion +item.particle.ion.Arsenic.name=Arsenic Ion +item.particle.ion.Selenium.name=Selenium Ion +item.particle.ion.Bromine.name=Bromine Ion +item.particle.ion.Krypton.name=Krypton Ion +item.particle.ion.Rubidium.name=Rubidium Ion +item.particle.ion.Strontium.name=Strontium Ion +item.particle.ion.Yttrium.name=Yttrium Ion +item.particle.ion.Zirconium.name=Zirconium Ion +item.particle.ion.Niobium.name=Niobium Ion +item.particle.ion.Molybdenum.name=Molybdenum Ion +item.particle.ion.Technetium.name=Technetium Ion +item.particle.ion.Ruthenium.name=Ruthenium Ion +item.particle.ion.Rhodium.name=Rhodium Ion +item.particle.ion.Palladium.name=Palladium Ion +item.particle.ion.Silver.name=Silver Ion +item.particle.ion.Cadmium.name=Cadmium Ion +item.particle.ion.Indium.name=Indium Ion +item.particle.ion.Tin.name=Tin Ion +item.particle.ion.Antimony.name=Antimony Ion +item.particle.ion.Tellurium.name=Tellurium Ion +item.particle.ion.Iodine.name=Iodine Ion +item.particle.ion.Xenon.name=Xenon Ion +item.particle.ion.Cesium.name=Caesium Ion +item.particle.ion.Barium.name=Barium Ion +item.particle.ion.Lanthanum.name=Lanthanum Ion +item.particle.ion.Cerium.name=Cerium Ion +item.particle.ion.Praseodymium.name=Praseodymium Ion +item.particle.ion.Neodymium.name=Neodymium Ion +item.particle.ion.Promethium.name=Promethium Ion +item.particle.ion.Samarium.name=Samarium Ion +item.particle.ion.Europium.name=Europium Ion +item.particle.ion.Gadolinium.name=Gadolinium Ion +item.particle.ion.Terbium.name=Terbium Ion +item.particle.ion.Dysprosium.name=Dysprosium Ion +item.particle.ion.Holmium.name=Holmium Ion +item.particle.ion.Erbium.name=Erbium Ion +item.particle.ion.Thulium.name=Thulium Ion +item.particle.ion.Ytterbium.name=Ytterbium Ion +item.particle.ion.Lutetium.name=Lutetium Ion +item.particle.ion.Hafnium.name=Hafnium Ion +item.particle.ion.Tantalum.name=Tantalum Ion +item.particle.ion.Tungsten.name=Tungsten Ion +item.particle.ion.Rhenium.name=Rhenium Ion +item.particle.ion.Osmium.name=Osmium Ion +item.particle.ion.Iridium.name=Iridium Ion +item.particle.ion.Platinum.name=Platinum Ion +item.particle.ion.Gold.name=Gold Ion +item.particle.ion.Mercury.name=Mercury Ion +item.particle.ion.Thallium.name=Thallium Ion +item.particle.ion.Lead.name=Lead Ion +item.particle.ion.Bismuth.name=Bismuth Ion +item.particle.ion.Polonium.name=Polonium Ion +item.particle.ion.Astatine.name=Astatine Ion +item.particle.ion.Radon.name=Radon Ion +item.particle.ion.Francium.name=Francium Ion +item.particle.ion.Radium.name=Radium Ion +item.particle.ion.Actinium.name=Actinium Ion +item.particle.ion.Thorium.name=Thorium Ion +item.particle.ion.Protactinium.name=Protactinium Ion +item.particle.ion.Uranium.name=Uranium Ion +item.particle.ion.Neptunium.name=Neptunium Ion +item.particle.ion.Plutonium.name=Plutonium Ion +item.particle.ion.Americium.name=Americium Ion +item.particle.ion.Curium.name=Curium Ion +item.particle.ion.Berkelium.name=Berkelium Ion +item.particle.ion.Californium.name=Californium Ion +item.particle.ion.Einsteinium.name=Einsteinium Ion +item.particle.ion.Fermium.name=Fermium Ion +item.particle.ion.Mendelevium.name=Mendelevium Ion +item.particle.ion.Nobelium.name=Nobelium Ion +item.particle.ion.Lawrencium.name=Lawrencium Ion +item.particle.ion.Rutherfordium.name=Rutherfordium Ion +item.particle.ion.Dubnium.name=Dubnium Ion +item.particle.ion.Seaborgium.name=Seaborgium Ion +item.particle.ion.Bohrium.name=Bohrium Ion +item.particle.ion.Hassium.name=Hassium Ion +item.particle.ion.Meitnerium.name=Meitnerium Ion +item.particle.ion.Darmstadtium.name=Darmstadtium Ion +item.particle.ion.Roentgenium.name=Roentgenium Ion +item.particle.ion.Copernicium.name=Copernicium Ion +item.particle.ion.Nihonium.name=Nihonium Ion +item.particle.ion.Flerovium.name=Flerovium Ion +item.particle.ion.Moscovium.name=Moscovium Ion +item.particle.ion.Livermorium.name=Livermorium Ion +item.particle.ion.Tennessine.name=Tennessine Ion +item.particle.ion.Oganesson.name=Oganesson Ion + + +item.particle.base.Graviton.name=Graviton +item.particle.base.Up.name=Up Quark +item.particle.base.Down.name=Down Quark +item.particle.base.Charm.name=Charm Quark +item.particle.base.Strange.name=Strange Quark +item.particle.base.Top.name=Top Quark +item.particle.base.Bottom.name=Bottom Quark +item.particle.base.Electron.name=Electron +item.particle.base.Electron Neutrino.name=Electron Neutrino +item.particle.base.Muon.name=Muon +item.particle.base.Muon Neutrino.name=Muon Neutrino +item.particle.base.Tau.name=Tau +item.particle.base.Tau Neutrino.name=Tau Neutrino +item.particle.base.Gluon.name=Gluon +item.particle.base.Photon.name=Photon +item.particle.base.Z Boson.name=Z Boson +item.particle.base.W Boson.name=W Boson +item.particle.base.Higgs Boson.name=Higgs Boson +item.particle.base.Proton.name=Proton +item.particle.base.Neutron.name=Neutron +item.particle.base.Lambda.name=Lambda +item.particle.base.Omega.name=Omega +item.particle.base.Pion.name=Pion +item.particle.base.ETA Meson.name=ETA Meson +item.particle.base.Unknown.name=Unknown Particle + +//Added 12/1/19 + +tile.playerDoorGlass.name=Glass Auto-Door +tile.playerDoorCactus.name=Cactus Auto-Door +tile.playerDoorIce.name=Ice Auto-Door +tile.playerDoorIron.name=Iron Auto-Door +tile.playerDoorWood.name=Wooden Auto-Door + +//Added 4/2/19 + +item.GTPP.BattPack.06.name=Charge Pack [LuV] +item.GTPP.BattPack.07.name=Charge Pack [ZPM] +item.GTPP.BattPack.08.name=Charge Pack [UV] +item.GTPP.BattPack.09.name=Charge Pack [MAX] + + +//Added 13/3/19 +item.gtpp.debug.scanner.name=GT++ Debug Scanner +item.RawWaste.name=Cell of Animal Waste +item.ManureSlurry.name=Cell of Manure Slurry +item.FertileManureSlurry.name=Cell of Fertile Slurry +item.itemDustTinyDemicheleiteBr.name=Tiny Pile of Demicheleite (Br) +item.itemDustSmallDemicheleiteBr.name=Small Pile of Demicheleite (Br) +tile.blockPooCollector.name=Agricultural Sewer +tile.Block of Lithium 7.name=Block of Lithium 7 + +//Added 14/3/19 +item.blood.name=Cell of Blood +item.aniline.name=Aniline Cell +item.cadaverine.name=Cadaverine Cell +item.polyurethane.name=Polyurethane Cell +item.putrescine.name=Putrescine Cell +item.cyclohexane.name=Cyclohexane Cell +item.cyclohexanone.name=Cyclohexanone Cell +item.nitrobenzene.name=Nitrobenzene Cell +item.ender.name=Cell of Liquid Ender +item.xpjuice.name=Cell of Liquid Xp +item.itemBombUnf.name=Throwable Bomb (unf) +item.itemBombCasing.name=Bomb Casing +item.gtpp.throwable.bomb.name=Throwable Bomb +item.itemDetCable.name=Bomb Fuse +tile.blockPooCollector.0.name=Agricultural Sewer +tile.blockPooCollector.8.name=Biocomposite Collector +item.itemIngotBakelite.name=Bakelite Ingot +item.itemDustBakelite.name=Bakelite Dust +item.itemDustTinyBakelite.name=Tiny Pile of Bakelite Dust +item.itemDustSmallBakelite.name=Small Pile of Bakelite Dust +item.itemNuggetBakelite.name=Bakelite Nugget +item.itemPlateBakelite.name=Bakelite Plate +item.itemPlateDoubleBakelite.name=Double Bakelite Plate +item.itemCellBakelite.name=Bakelite Cell +tile.Block of Bakelite.name=Block of Bakelite +item.itemIngotNylon.name=Nylon Ingot +item.itemDustNylon.name=Nylon Dust +item.itemDustTinyNylon.name=Tiny Pile of Nylon Dust +item.itemDustSmallNylon.name=Small Pile of Nylon Dust +item.itemNuggetNylon.name=Nylon Nugget +item.itemPlateNylon.name=Nylon Plate +item.itemPlateDoubleNylon.name=Double Nylon Plate +item.itemCellNylon.name=Nylon Cell +tile.Block of Nylon.name=Block of Nylon +item.itemIngotTeflon.name=Teflon Ingot +item.itemDustTeflon.name=Teflon Dust +item.itemDustTinyTeflon.name=Tiny Pile of Teflon Dust +item.itemDustSmallTeflon.name=Small Pile of Teflon Dust +item.itemNuggetTeflon.name=Teflon Nugget +item.itemPlateTeflon.name=Teflon Plate +item.itemPlateDoubleTeflon.name=Double Teflon Plate +item.itemCellTeflon.name=Teflon Cell +tile.Block of Teflon.name=Block of Teflon + +//Added 17/4/19 +//Spelling Corrections +item.particle.ion.Aluminium.name=Aluminium Ion +item.particle.ion.Caesium.name=Caesium Ion + +item.GTPP.MonsterKiller.Enderman.name=Enderman Killer +item.GTPP.MonsterKiller.Spider.name=Spider Killer +item.GTPP.MonsterKiller.Skeleton.name=Skeleton Killer +item.GTPP.MonsterKiller.Creeper.name=Creeper Killer +item.GTPP.MonsterKiller.Zombie.name=Zombie Killer +item.GTPP.MonsterKiller.Hellish.name=Nether Mob Killer + +item.itemIngotRunite.name=Runite Ingot +item.itemDustRunite.name=Runite Dust +item.itemDustTinyRunite.name=Tiny Pile of Runite Dust +item.itemDustSmallRunite.name=Small Pile of Runite Dust +item.itemNuggetRunite.name=Runite Nugget +item.itemPlateRunite.name=Runite Plate +item.itemPlateDoubleRunite.name=Double Runite Plate +item.itemCellRunite.name=Runite Cell +tile.Block of Runite.name=Block of Runite + +item.itemIngotDragonblood.name=Dragon Metal Ingot +item.itemDustDragonblood.name=Dragon Metal Dust +item.itemDustTinyDragonblood.name=Tiny Pile of Dragon Metal Dust +item.itemDustSmallDragonblood.name=Small Pile of Dragon Metal Dust +item.itemNuggetDragonblood.name=Shard of Dragonblood +item.itemPlateDragonblood.name=Dragon Metal Plate +item.itemPlateDoubleDragonblood.name=Double Dragon Metal Plate +item.itemCellDragonblood.name=Dragonblood Cell +tile.Block of Dragonblood.name=Block of Dragon Metal + +item.itemIngotBlackTitanium.name=Black Titanium Ingot +item.itemDustBlackTitanium.name=Black Titanium Dust +item.itemDustTinyBlackTitanium.name=Tiny Pile of Black Titanium Dust +item.itemDustSmallBlackTitanium.name=Small Pile of Black Titanium Dust +item.itemNuggetBlackTitanium.name=Black Titanium Nugget +item.itemPlateBlackTitanium.name=Black Titanium Plate +item.itemPlateDoubleBlackTitanium.name=Double Black Titanium Plate +item.itemCellBlackTitanium.name=Black Titanium Cell +tile.Block of Black Titanium.name=Block of Black Titanium + +item.itemIngotAncientGranite.name=Ancient Granite Ingot +item.itemHotIngotAncientGranite.name=Hot Ancient Granite Ingot +item.itemDustAncientGranite.name=Ancient Granite Dust +item.itemDustTinyAncientGranite.name=Tiny Pile of Ancient Granite Dust +item.itemDustSmallAncientGranite.name=Small Pile of Ancient Granite Dust +item.itemNuggetAncientGranite.name=Ancient Granite Nugget +item.itemPlateAncientGranite.name=Ancient Granite Plate +item.itemPlateDoubleAncientGranite.name=Double Ancient Granite Plate +tile.Block of Ancient Granite.name=Block of Ancient Granite + +item.itemIngotBabbitAlloy.name=Babbit Alloy Ingot +item.itemHotIngotBabbitAlloy.name=Hot Babbit Alloy Ingot +item.itemDustBabbitAlloy.name=Babbit Alloy Dust +item.itemDustTinyBabbitAlloy.name=Tiny Pile of Babbit Alloy Dust +item.itemDustSmallBabbitAlloy.name=Small Pile of Babbit Alloy Dust +item.itemNuggetBabbitAlloy.name=Babbit Alloy Nugget +item.itemPlateBabbitAlloy.name=Babbit Alloy Plate +item.itemPlateDoubleBabbitAlloy.name=Double Babbit Alloy Plate +item.itemCellBabbitAlloy.name=Babbit Alloy Cell +tile.Block of Babbit Alloy.name=Block of Babbit Alloy + +item.itemIngotBlackMetal.name=Black Metal Ingot +item.itemHotIngotBlackMetal.name=Hot Black Metal Ingot +item.itemDustBlackMetal.name=Black Metal Dust +item.itemDustTinyBlackMetal.name=Tiny Pile of Black Metal Dust +item.itemDustSmallBlackMetal.name=Small Pile of Black Metal Dust +item.itemNuggetBlackMetal.name=Black Metal Nugget +item.itemPlateBlackMetal.name=Black Metal Plate +item.itemPlateDoubleBlackMetal.name=Double Black Metal Plate +item.itemBoltBlackMetal.name=Black Metal Bolt +item.itemRodBlackMetal.name=Black Metal Rod +item.itemRodLongBlackMetal.name=Long Black Metal Rod +item.itemRingBlackMetal.name=Black Metal Ring +item.itemScrewBlackMetal.name=Black Metal Screw +item.itemRotorBlackMetal.name=Black Metal Rotor +item.itemGearBlackMetal.name=Black Metal Gear +item.itemCellBlackMetal.name=Black Metal Cell +tile.Block of Black Metal.name=Block of Black Metal +tile.Black Metal Frame Box.name=Black Metal Frame Box + +item.itemIngotWhiteMetal.name=White Metal Ingot +item.itemHotIngotWhiteMetal.name=Hot White Metal Ingot +item.itemDustWhiteMetal.name=White Metal Dust +item.itemDustTinyWhiteMetal.name=Tiny Pile of White Metal Dust +item.itemDustSmallWhiteMetal.name=Small Pile of White Metal Dust +item.itemNuggetWhiteMetal.name=White Metal Nugget +item.itemPlateWhiteMetal.name=White Metal Plate +item.itemPlateDoubleWhiteMetal.name=Double White Metal Plate +item.itemBoltWhiteMetal.name=White Metal Bolt +item.itemRodWhiteMetal.name=White Metal Rod +item.itemRodLongWhiteMetal.name=Long White Metal Rod +item.itemRingWhiteMetal.name=White Metal Ring +item.itemScrewWhiteMetal.name=White Metal Screw +item.itemRotorWhiteMetal.name=White Metal Rotor +item.itemGearWhiteMetal.name=White Metal Gear +item.itemCellWhiteMetal.name=White Metal Cell +tile.Block of White Metal.name=Block of White Metal +tile.White Metal Frame Box.name=White Metal Frame Box + +//Added 29/04/2019 +tile.OreRunite.name=Runite Ore +item.crushedRunite.name=Crushed Runite Ore +item.crushedCentrifugedRunite.name=Centrifuged Crushed Runite Ore +item.crushedPurifiedRunite.name=Purified Crushed Runite Ore +item.dustImpureRunite.name=Impure Runite Dust +item.dustPureRunite.name=Purified Runite Dust + +tile.OreAncientGranite.name=Ancient Granite Ore +item.crushedAncientGranite.name=Crushed Ancient Granite Ore +item.crushedCentrifugedAncientGranite.name=Centrifuged Crushed Ancient Granite Ore +item.crushedPurifiedAncientGranite.name=Purified Crushed Ancient Granite Ore +item.dustImpureAncientGranite.name=Impure Ancient Granite Dust +item.dustPureAncientGranite.name=Purified Ancient Granite Dust + +item.itemIngotRhugnor.name=Rhugnor Ingot +item.itemDustRhugnor.name=Rhugnor Dust +item.itemDustTinyRhugnor.name=Tiny Pile of Rhugnor Dust +item.itemDustSmallRhugnor.name=Small Pile of Rhugnor Dust +item.itemNuggetRhugnor.name=Rhugnor Nugget +item.itemPlateRhugnor.name=Rhugnor Plate +item.itemPlateDoubleRhugnor.name=Double Rhugnor Plate +item.itemCellRhugnor.name=Rhugnor Cell +tile.Block of Rhugnor.name=Block of Rhugnor + + + + +//Added 13/5/19 + +item.GTPP.BattPack.01.name=Charge Pack [LV] +item.GTPP.BattPack.02.name=Charge Pack [MV] +item.GTPP.BattPack.03.name=Charge Pack [HV] +item.GTPP.BattPack.04.name=Charge Pack [EV] +item.GTPP.BattPack.05.name=Charge Pack [IV] +item.IndustrialDiamondExquisite.name=Exquisite Industrial Diamond + +item.itemSpringCelestialTungsten.name=Celestial Tungsten Spring +item.itemSpringWhiteMetal.name=White Metal Spring +item.itemSpringNitinol60.name=Nitinol 60 Spring +item.itemSpringWatertightSteel.name=Watertight Steel Spring +item.itemSpringEglinSteel.name=Eglin Steel Spring + +item.itemSmallSpringMaragingSteel250.name=Small Maraging Steel 250 Spring +item.itemSmallSpringNichrome.name=Small Nichrome Spring +item.itemSmallSpringStaballoy.name=Small Staballoy Spring +item.itemSmallSpringBlackSteel.name=Small Black Steel Spring +item.itemSmallSpringBlackTitanium.name=Small Black Titanium Spring + +item.itemFineWireWhiteMetal.name=Fine White Metal Wire +item.itemFineWirePalladium.name=Fine Palladium Wire +item.itemFineWireZirconium.name=Fine Zirconium Wire +item.itemFineWireGrisium.name=Fine Grisium Wire +item.itemFineWireBabbitAlloy.name=Fine Babbit Alloy Wire +item.itemFineWireKoboldite.name=Fine Koboldite Wire +item.itemFineWireHG1223.name=Fine HG-1223 Wire +item.itemFineWireQuantum.name=Fine Quantum Wire + +item.itemHeavyPlatePotin.name=Heavy Potin Plate +item.itemHeavyPlateWatertightSteel.name=Heavy Watertight Steel Plate +item.itemHeavyPlateBronze.name=Heavy Bronze Plate +item.itemHeavyPlateOsmiridium.name=Heavy Osmiridium Plate +item.itemHeavyPlateQuantum.name=Heavy Quantum Plate +item.itemHeavyPlateBlackSteel.name=Heavy Black Steel Plate +item.itemHeavyPlateStainlessSteel.name=Heavy Stainless Steel Plate +item.itemHeavyPlateEglinSteel.name=Heavy Eglin Steel Plate +item.itemHeavyPlateMaragingSteel300.name=Heavy Maraging Steel 300 Plate +item.itemHeavyPlateTalonite.name=Heavy Talonite Plate +item.itemHeavyPlateHypogen.name=Heavy Hypogen Plate +item.itemHeavyPlateRhugnor.name=Heavy Rhugnor Plate +item.itemHeavyPlateAdvancedNitinol.name=Heavy Advanced Nitinol Plate +item.itemHeavyPlateAstralTitanium.name=Heavy Astral Titanium Plate +item.itemHeavyPlateCelestialTungsten.name=Heavy Celestial Tungsten Plate +item.itemHeavyPlateWhiteMetal.name=Heavy White Metal Plate +item.itemHeavyPlateBlackMetal.name=Heavy Black Metal Plate +item.itemHeavyPlateAncientGranite.name=Heavy Ancient Granite Plate + +item.GTPP.bauble.fireprotection.0.name=Supreme Pizza Gloves + + +//Added 16/5/19 +item.itemCellSeleniumDioxide.name=Selenium Dioxide Cell +item.itemCellSeleniousAcid.name=Selenious Acid Cell + +//Added 25/7/19 +container.pestkiller=Pest Killer + +//Added 15/8/19 +gtpp.nei.decayables=Decayables Chest +entity.batKing.name=Bat King +item.itemCellCarbyne.name=Carbyne Cell +item.itemCellHydrogenCyanide.name=Cell of Hydrogen Cyanide +item.itemCactusCharcoal.name=Cactus Charcoal +item.itemCactusCoke.name=Cactus Coke +item.itemSugarCharcoal.name=Sugar Charcoal +item.itemSugarCoke.name=Sugar Coke +item.LiquidHydrogen.name=Liquid Hydrogen Cell [LOH] + + + +//Added 24/8/19 +//Debug Labels +tile.blockDoorAlloy.name=Reinforced Door +tile.blockInhibitorObelisk.name=Inhibitor Obelisk +tile.Battlesign.name=Battlesign +tile.blockMagicBox.name=Magic Box +tile.blockManaPod.name=Mana Pod Stem +tile.buildToolBlock.name=Tool Block +tile.blockRedPlasma.name=Red Plasma Block +tile.pipeBlock.name=Pipe +item.null.name=REPORT ERROR TO ALKALUS + + +//Added 24/8/19 +tile.OreGreenockite.name=Greenockite Ore +item.crushedGreenockite.name=Crushed Greenockite Ore +item.crushedCentrifugedGreenockite.name=Centrifuged Crushed Greenockite Ore +item.crushedPurifiedGreenockite.name=Purified Crushed Greenockite Ore +item.dustImpureGreenockite.name=Impure Greenockite Dust +item.dustPureGreenockite.name=Purified Greenockite Dust +item.itemDustGreenockite.name=Greenockite Dust +item.itemDustTinyGreenockite.name=Tiny Pile of Greenockite Dust +item.itemDustSmallGreenockite.name=Small Pile of Greenockite Dust + +tile.OreRareEarthI.name=Rare Earth (I) Ore +item.crushedRareEarthI.name=Crushed Rare Earth (I) Ore +item.crushedCentrifugedRareEarthI.name=Centrifuged Crushed Rare Earth (I) Ore +item.crushedPurifiedRareEarthI.name=Purified Crushed Rare Earth (I) Ore +item.dustImpureRareEarthI.name=Impure Rare Earth (I) Dust +item.dustPureRareEarthI.name=Purified Rare Earth (I) Dust +item.itemDustRareEarthI.name=Rare Earth (I) Dust +item.itemDustTinyRareEarthI.name=Tiny Pile of Rare Earth (I) Dust +item.itemDustSmallRareEarthI.name=Small Pile of Rare Earth (I) Dust + +tile.OreRareEarthII.name=Rare Earth (II) Ore +item.crushedRareEarthII.name=Crushed Rare Earth (II) Ore +item.crushedCentrifugedRareEarthII.name=Centrifuged Crushed Rare Earth (II) Ore +item.crushedPurifiedRareEarthII.name=Purified Crushed Rare Earth (II) Ore +item.dustImpureRareEarthII.name=Impure Rare Earth (II) Dust +item.dustPureRareEarthII.name=Purified Rare Earth (II) Dust +item.itemDustRareEarthII.name=Rare Earth (II) Dust +item.itemDustTinyRareEarthII.name=Tiny Pile of Rare Earth (II) Dust +item.itemDustSmallRareEarthII.name=Small Pile of Rare Earth (II) Dust + +tile.OreRareEarthIII.name=Rare Earth (III) Ore +item.crushedRareEarthIII.name=Crushed Rare Earth (III) Ore +item.crushedCentrifugedRareEarthIII.name=Centrifuged Crushed Rare Earth (III) Ore +item.crushedPurifiedRareEarthIII.name=Purified Crushed Rare Earth (III) Ore +item.dustImpureRareEarthIII.name=Impure Rare Earth (III) Dust +item.dustPureRareEarthIII.name=Purified Rare Earth (III) Dust +item.itemDustRareEarthIII.name=Rare Earth (III) Dust +item.itemDustTinyRareEarthIII.name=Tiny Pile of Rare Earth (III) Dust +item.itemDustSmallRareEarthIII.name=Small Pile of Rare Earth (III) Dust + + + +//Added 13/10/19 +tile.blockRoundRobinator.0.name=Round Robinator I +tile.blockRoundRobinator.1.name=Round Robinator II +tile.blockRoundRobinator.2.name=Round Robinator III +tile.blockRoundRobinator.3.name=Round Robinator IV +tile.blockRoundRobinator.4.name=Round Robinator V + + +//Added 16/10/19 +item.BioRecipeSelector.name=Programmed Bio Circuit +item.FermentationBase.name=Cell of Fermentation Base +item.ureamix.name=Cell of Urea Mix +item.liquidresin.name=Cell of Liquid Resin +item.propionicacid.name=Propionic Acid Cell +item.aceticacid.name=Acetic Acid Cell +item.BasicAgrichemItem.0.name=Algae Biomass +item.BasicAgrichemItem.1.name=Green Algae Biomass +item.BasicAgrichemItem.2.name=Brown Algae Biomass +item.BasicAgrichemItem.3.name=Golden-Brown Algae Biomass +item.BasicAgrichemItem.4.name=Red Algae Biomass +item.BasicAgrichemItem.5.name=Cellulose Fiber +item.BasicAgrichemItem.6.name=Golden-Brown Cellulose Fiber +item.BasicAgrichemItem.7.name=Red Cellulose Fiber +item.BasicAgrichemItem.8.name=Compost +item.BasicAgrichemItem.9.name=Wood Pellet +item.BasicAgrichemItem.10.name=Wood Brick +item.BasicAgrichemItem.11.name=Cellulose Pulp +item.BasicAgrichemItem.12.name=Raw Bio Resin +item.BasicAgrichemItem.13.name=Catalyst Carrier +item.BasicAgrichemItem.14.name=Green Metal Catalyst +item.BasicAgrichemItem.15.name=Alginic Acid +item.BasicAgrichemItem.16.name=Alumina +item.BasicAgrichemItem.17.name=Aluminium Pellet +item.BasicAgrichemItem.18.name=Sodium Aluminate +item.BasicAgrichemItem.19.name=Sodium Hydroxide +item.BasicAgrichemItem.20.name=Sodium Carbonate +item.BasicAgrichemItem.21.name=Lithium Chloride + +//Added 24/10/19 +item.butanol.name=Butanol Cell + +//Try Fix IC2 Garbage vv +fluidHotWater=Heated Water +fluidHotWater.name=Heated Water +//Try Fix IC2 Garbage ^^ + + +//Added 11/12/19 +item.itemHotIngotTitanium.name=Hot Titanium Ingot +item.OilHeavy.name=Heavy Oil Cell +item.UnsymmetricalDimethylhydrazine.name=Unsymmetrical Dimethylhydrazine Cell +item.benzene.name=Benzene Cell +item.Benzene.name=Benzene Cell +item.phenol.name=Phenol Cell +item.CarbonDioxide.name=Carbon Dioxide Cell +item.itemCellCarbonDioxide.name=Carbon Dioxide Cell +item.CarbonMonoxide.name=Carbon Monoxide Cell +item.itemCellCarbonMonoxide.name=Carbon Monoxide Cell +item.acetone.name=Acetone Cell +item.saltwater.name=Salt Water Cell +item.BasicAgrichemItem.22.name=Mold (Pellet) +item.BasicAgrichemItem.23.name=Clean Aluminium Mix + +//Added 12/12/19 + +item.BasicGenericChemItem.0.name=Red Metal Catalyst +item.BasicGenericChemItem.1.name=Yellow Metal Catalyst +item.BasicGenericChemItem.2.name=Blue Metal Catalyst +item.BasicGenericChemItem.3.name=Orange Metal Catalyst +item.BasicGenericChemItem.4.name=Purple Metal Catalyst +item.BasicGenericChemItem.5.name=Brown Metal Catalyst +item.MudRedSlurry.name=Cell of Red Mud Slurry +item.liquid_toluene.name=Toluene Cell + +item.BasicAlgaeItem.0.name=Algae Spore (I) +item.BasicAlgaeItem.1.name=Algae Spore (II) +item.BasicAlgaeItem.2.name=Algae Spore (III) +item.BasicAlgaeItem.3.name=Algae Spore (IV) +item.BasicAlgaeItem.4.name=Algae Spore (V) +item.BasicAlgaeItem.5.name=Algae Spore (VI) +item.BasicAlgaeItem.6.name=Algae Spore (VII) + +//Added 17/01/20 +item.BasicGenericChemItem.6.name=Pink Metal Catalyst + +//Added 23/03/20 +item.BasicMetaFood.0.name=Raw Human Meat +item.BasicMetaFood.1.name=Cooked Human Meat +item.BasicMetaFood.2.name=Raw Horse Meat +item.BasicMetaFood.3.name=Cooked Horse Meat +item.BasicMetaFood.4.name=Raw Wolf Meat +item.BasicMetaFood.5.name=Cooked Wolf Meat +item.BasicMetaFood.6.name=Raw Ocelot Meat +item.BasicMetaFood.7.name=Cooked Ocelot Meat +item.BasicMetaFood.8.name=Blaze Flesh + +item.itemCellNaquadahFuel.name=Naquadah Fuel Cell +item.itemCellEnrichedNaquadahFuel.name=Enriched Naquadah Fuel Cell +item.itemCellNaquadriaFuel.name=Naquadria Fuel Cell +item.boricacid.name=Boric Acid Cell +item.hydrochloricacid.name=Hydrochloric Acid Cell + +item.BasicAlgaeItem.name=Breedable Algae +item.BasicAlgaeItem.0.name=Breedable Algae +item.BasicAlgaeItem.1.name=Breedable Algae +item.BasicAlgaeItem.2.name=Breedable Algae +item.BasicAlgaeItem.3.name=Breedable Algae +item.BasicAlgaeItem.4.name=Breedable Algae +item.BasicAlgaeItem.5.name=Breedable Algae +item.BasicAlgaeItem.6.name=Breedable Algae + +//Added 30/03/20 +item.milledChalcopyrite.name=Milled Chalcopyrite +item.milledSphalerite.name=Milled Sphalerite +item.milledNickel.name=Milled Nickel +item.milledPlatinum.name=Milled Platinum +item.milledPentlandite.name=Milled Pentlandite +item.FrothZincflotation.name=Sphalerite Flotation Froth Cell +item.FrothCopperflotation.name=Chalcopyrite Flotation Froth Cell +item.FrothNickelflotation.name=Nickel Flotation Froth Cell +item.FrothPlatinumflotation.name=Platinum Flotation Froth Cell +item.FrothPentlanditeflotation.name=Pentlandite Flotation Froth Cell +item.BasicGenericChemItem.7.name=Alumina Milling Ball +item.BasicGenericChemItem.8.name=Soapstone Milling Ball + +//Added 31/03/20 +item.BasicGenericChemItem.9.name=Sodium Ethoxide Dust +item.BasicGenericChemItem.10.name=Sodium Ethyl Xanthate Dust +item.BasicGenericChemItem.11.name=Potassium Ethyl Xanthate Dust +item.BasicGenericChemItem.12.name=Potassium Hydroxide Dust +item.CarbonDisulfide.name=Carbon Disulfide Cell +item.HydrogenSulfide.name=Hydrogen Sulfide Cell +item.BasicAgrichemItem.24.name=Pinecone +item.BasicAgrichemItem.25.name=Crushed Pine Materials +item.pineoil.name=Pine Oil Cell + +//Added 11/4/20 +item.milledRedstone.name=Milled Redstone +item.milledSpessartine.name=Milled Spessartine +item.milledGrossular.name=Milled Grossular +item.milledAlmandine.name=Milled Almandine +item.milledPyrope.name=Milled Pyrope +item.FrothRedstoneflotation.name=Redstone Flotation Froth Cell +item.FrothSpessartineflotation.name=Spessartine Flotation Froth Cell +item.FrothGrossularflotation.name=Grossular Flotation Froth Cell +item.FrothAlmandineflotation.name=Almandine Flotation Froth Cell +item.FrothPyropeflotation.name=Pyrope Flotation Froth Cell + +//Added 13/04/20 +item.T3RecipeSelector.name=Programmed Breakthrough Circuit + +//Added 03/05/20 +entity.miscutils.batKing.name=Spectral Bat +entity.miscutils.bigChickenFriendly.name=Giant Chicken +entity.miscutils.AusDingo.name=Dingo +entity.miscutils.AusBoar.name=Wild Boar +entity.miscutils.AusSpider.name=Forest Spider +entity.miscutils.AusOctopus.name=Octopus +container.EggBox=Egg Hatching Box + +//Added 24/05/20 +container.VolumetricFlaskSetter=Volumetric Flask Configurator + +//Added 26/05/20 +item.itemIngotLaurenium.name=Laurenium Ingot +item.itemHotIngotLaurenium.name=Hot Laurenium Ingot +item.itemDustLaurenium.name=Laurenium Dust +item.itemDustTinyLaurenium.name=Tiny Pile of Laurenium Dust +item.itemDustSmallLaurenium.name=Small Pile of Laurenium Dust +item.itemNuggetLaurenium.name=Laurenium Nugget +item.itemPlateLaurenium.name=Laurenium Plate +item.itemPlateDoubleLaurenium.name=Double Laurenium Plate +item.itemBoltLaurenium.name=Laurenium Bolt +item.itemRodLaurenium.name=Laurenium Rod +item.itemRodLongLaurenium.name=Long Laurenium Rod +item.itemRingLaurenium.name=Laurenium Ring +item.itemScrewLaurenium.name=Laurenium Screw +item.itemRotorLaurenium.name=Laurenium Rotor +item.itemGearLaurenium.name=Laurenium Gear +item.itemCellLaurenium.name=Laurenium Cell +tile.Block of Laurenium.name=Block of Laurenium +tile.Laurenium Frame Box.name=Laurenium Frame Box +item.itemIngotBotmium.name=Botmium Ingot +item.itemHotIngotBotmium.name=Hot Botmium Ingot +item.itemDustBotmium.name=Botmium Dust +item.itemDustTinyBotmium.name=Tiny Pile of Botmium Dust +item.itemDustSmallBotmium.name=Small Pile of Botmium Dust +item.itemNuggetBotmium.name=Botmium Nugget +item.itemPlateBotmium.name=Botmium Plate +item.itemPlateDoubleBotmium.name=Double Botmium Plate +item.itemBoltBotmium.name=Botmium Bolt +item.itemRodBotmium.name=Botmium Rod +item.itemRodLongBotmium.name=Long Botmium Rod +item.itemRingBotmium.name=Botmium Ring +item.itemScrewBotmium.name=Botmium Screw +item.itemRotorBotmium.name=Botmium Rotor +item.itemGearBotmium.name=Botmium Gear +item.itemCellBotmium.name=Botmium Cell +tile.Block of Botmium.name=Block of Botmium +tile.Botmium Frame Box.name=Botmium Frame Box + +//Added 29/05/20 +item.itemBasicTurbine.name=Basic Turbine +item.itemBasicTurbine_0.name=Basic Iron Turbine +item.itemBasicTurbine_1.name=Basic Bronze Turbine + +interaction.voidexcess.enabled=Void Excess Enabled +interaction.voidexcess.disabled=Void Excess Disabled + +interaction.separateBusses.enabled=Input busses are separated +interaction.separateBusses.disabled=Input busses are not separated + +//Added 29/11/21 + +item.BasicNuclearChemItem.0.name=Uranium Residue Mix +item.BasicNuclearChemItem.1.name=Plutonium Residue Mix +item.BasicNuclearChemItem.2.name=Fluoride Residue Mix +item.BasicNuclearChemItem.3.name=Noble Residue Mix +item.BasicNuclearChemItem.4.name=Red Algae Biomass +item.BasicNuclearChemItem.5.name=Cellulose Fiber +item.BasicNuclearChemItem.6.name=Golden-Brown Cellulose Fiber +item.BasicNuclearChemItem.7.name=Red Cellulose Fiber + +item.itemCellLiFBeF2ZrF4U235.name=LFTR Fuel I Cell +item.itemCellLiFBeF2ZrF4UF4.name=LFTR Fuel II Cell +item.itemCellLiFBeF2ThF4UF4.name=LFTR Fuel III Cell +item.Li2BeF2UF4.name=Burnt Li2BeF2UF4 Cell + +//Added 6/12/21 +item.itemCellLiFBeF2UF4FP.name=LiFBeF2UF4FP Cell +item.itemCellUF6F2.name=UF6F2 Cell +item.itemCellLiFBeF2ThF4.name=LiFBeF2ThF4 Cell +item.itemCellUF6F2FP.name=UF6F2FP Cell +item.dustProtactinium233.name=Protactinium-233 Dust +item.itemCellLiFThF4.name=LiFThF4 Cell +item.NuclearWaste.name=Nuclear Waste Cell +item.itemCellLiFBeF2UF4.name=LiFBeF2UF4 Cell +item.itemCellSodiumFluoride.name=Sodium Fluoride Cell +item.itemCellLiFBeF2.name=LiFBeF2 Cell + +//Added 7/12/21 +item.itemCellDysprosium.name=Dysprosium Cell +item.itemCellThorium.name=Thorium Cell +item.itemCellTellurium.name=Tellurium Cell +item.itemCellThorium232.name=Thorium-232 Cell +item.itemCellLithiumTetrafluoroberyllate.name=Lithium Tetrafluoroberyllate Cell +item.itemCellBurntReactorFuelI.name=Spent LFTR Fuel I Cell +item.itemCellBurntReactorFuelII.name=Spent LFTR Fuel II Cell +item.itemDustTinyIndium.name=Tiny Indium Dust +item.itemDustSmallIndium.name=Small Indium Dust +item.itemDustIndium.name=Indium Dust +item.itemDustTinyBerylliumHydroxide.name=Tiny Beryllium Hydroxide Dust +item.itemDustSmallBerylliumHydroxide.name=Small Beryllium Hydroxide Dust +item.itemDustBerylliumHydroxide.name=Beryllium Hydroxide Dust +item.itemDustTinyAmmoniumBifluoride.name=Tiny Ammonium Bifluoride Dust +item.itemDustSmallAmmoniumBifluoride.name=Small Ammonium Bifluoride Dust +item.itemDustAmmoniumBifluoride.name=Ammonium Bifluoride Dust +item.itemDustTinyAmmoniumTetrafluoroberyllate.name=Tiny Ammonium Tetrafluoroberyllate Dust +item.itemDustSmallAmmoniumTetrafluoroberyllate.name=Small Ammonium Tetrafluoroberyllate Dust +item.itemDustAmmoniumTetrafluoroberyllate.name=Ammonium Tetrafluoroberyllate Dust + +//Added 10/12/21 +item.ImpureLiFBeF2.name=Impure LiFBeF2 Cell +item.itemCellHeliumSpargedLiFBeF2UF4FP.name=Helium Sparged LiFBeF2UF4FP Cell +item.itemCellFluorineSpargedLiFThF4.name=Fluorine Sparged LiFThF4 Cell +item.itemCellFluorineSpargedLiFBeF2ThF4.name=Fluorine Sparged LiFBeF2ThF4 Cell +item.itemIngotHS188A.name=HS-188A Ingot +item.itemHotIngotHS188A.name=Hot HS-188A Ingot +item.itemDustHS188A.name=HS-188A Dust +item.itemDustTinyHS188A.name=Tiny Pile of HS-188A Dust +item.itemDustSmallHS188A.name=Small Pile of HS-188A Dust +item.itemNuggetHS188A.name=HS-188A Nugget +item.itemPlateHS188A.name=HS-188A Plate +item.itemPlateDoubleHS188A.name=Double HS-188A Plate +item.itemBoltHS188A.name=HS-188A Bolt +item.itemRodHS188A.name=HS-188A Rod +item.itemRodLongHS188A.name=Long HS-188A Rod +item.itemRingHS188A.name=HS-188A Ring +item.itemScrewHS188A.name=HS-188A Screw +item.itemRotorHS188A.name=HS-188A Rotor +item.itemGearHS188A.name=HS-188A Gear +item.itemCellHS188A.name=HS-188A Cell + +//Added 12/12/21 +item.itemIngotErbium.name=Erbium Ingot +item.itemHotIngotErbium.name=Hot Erbium Ingot +item.itemDustErbium.name=Erbium Dust +item.itemDustTinyErbium.name=Tiny Pile of Erbium Dust +item.itemDustSmallErbium.name=Small Pile of Erbium Dust +item.itemNuggetErbium.name=Erbium Nugget +item.itemPlateErbium.name=Erbium Plate +item.itemPlateDoubleErbium.name=Double Erbium Plate +item.itemBoltErbium.name=Erbium Bolt +item.itemRodErbium.name=Erbium Rod +item.itemRodLongErbium.name=Long Erbium Rod +item.itemRingErbium.name=Erbium Ring +item.itemScrewErbium.name=Erbium Screw +item.itemRotorErbium.name=Erbium Rotor +item.itemGearErbium.name=Erbium Gear +item.itemCellErbium.name=Erbium Cell +item.itemIngotHeLiCoPtEr.name=HeLiCoPtEr Ingot +item.itemHotIngotHeLiCoPtEr.name=Hot HeLiCoPtEr Ingot +item.itemDustHeLiCoPtEr.name=HeLiCoPtEr Dust +item.itemDustTinyHeLiCoPtEr.name=Tiny Pile of HeLiCoPtEr Dust +item.itemDustSmallHeLiCoPtEr.name=Small Pile of HeLiCoPtEr Dust +item.itemNuggetHeLiCoPtEr.name=HeLiCoPtEr Nugget +item.itemPlateHeLiCoPtEr.name=HeLiCoPtEr Plate +item.itemPlateDoubleHeLiCoPtEr.name=Double HeLiCoPtEr Plate +item.itemBoltHeLiCoPtEr.name=HeLiCoPtEr Bolt +item.itemRodHeLiCoPtEr.name=HeLiCoPtEr Rod +item.itemRodLongHeLiCoPtEr.name=Long HeLiCoPtEr Rod +item.itemRingHeLiCoPtEr.name=HeLiCoPtEr Ring +item.itemScrewHeLiCoPtEr.name=HeLiCoPtEr Screw +item.itemRotorHeLiCoPtEr.name=HeLiCoPtEr Rotor +item.itemGearHeLiCoPtEr.name=HeLiCoPtEr Gear +item.itemCellHeLiCoPtEr.name=HeLiCoPtEr Cell +item.itemIngotPraseodymium.name=Praseodymium Ingot +item.itemHotIngotPraseodymium.name=Hot Praseodymium Ingot +item.itemDustPraseodymium.name=Praseodymium Dust +item.itemDustTinyPraseodymium.name=Tiny Pile of Praseodymium Dust +item.itemDustSmallPraseodymium.name=Small Pile of Praseodymium Dust +item.itemNuggetPraseodymium.name=Praseodymium Nugget +item.itemPlatePraseodymium.name=Praseodymium Plate +item.itemPlateDoublePraseodymium.name=Double Praseodymium Plate +item.itemBoltPraseodymium.name=Praseodymium Bolt +item.itemRodPraseodymium.name=Praseodymium Rod +item.itemRodLongPraseodymium.name=Long Praseodymium Rod +item.itemRingPraseodymium.name=Praseodymium Ring +item.itemScrewPraseodymium.name=Praseodymium Screw +item.itemRotorPraseodymium.name=Praseodymium Rotor +item.itemGearPraseodymium.name=Praseodymium Gear +item.itemCellPraseodymium.name=Praseodymium Cell +item.milledMonazite.name=Milled Monazite +item.FrothMonaziteflotation.name=Monazite Flotation Froth Cell diff --git a/src/main/resources/assets/miscutils/lang/ru_RU.lang b/src/main/resources/assets/miscutils/lang/ru_RU.lang new file mode 100644 index 0000000000..37de35c563 --- /dev/null +++ b/src/main/resources/assets/miscutils/lang/ru_RU.lang @@ -0,0 +1,303 @@ +item.itemDustSelenium.name=Пыль Селена +item.itemDustBromine.name=Пыль Брома +item.itemDustStrontium.name=Пыль Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ +item.itemDustZirconium.name=Пыль Ð¦Ð¸Ñ€ÐºÐ¾Ð½Ð¸Ñ +item.itemDustRuthenium.name=Пыль Ð ÑƒÑ‚ÐµÐ½Ð¸Ñ +item.itemDustIodine.name=Пыль Йода +item.itemDustHafnium.name=Пыль Ð“Ð°Ñ„Ð½Ð¸Ñ +item.itemDustRhodium.name=Пыль Ð Ð¾Ð´Ð¸Ñ +item.itemDustRhenium.name=Пыль Ð ÐµÐ½Ð¸Ñ +item.itemDustThallium.name=Пыль Ð¢Ð°Ð»Ð»Ð¸Ñ +item.itemDustTechnetium.name=Пыль Ð¢ÐµÑ…Ð½ÐµÑ†Ð¸Ñ +item.itemDustPolonium.name=Пыль ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ +item.itemDustAstatine.name=Пыль ÐÑтатина +item.itemDustFrancium.name=Пыль Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ +item.itemDustRadium.name=Пыль Ð Ð°Ð´Ð¸Ñ +item.itemDustActinium.name=Пыль ÐÐºÑ‚Ð¸Ð½Ð¸Ñ +item.itemDustProtactinium.name=Пыль ÐŸÑ€Ð¾Ñ‚Ð°ÐºÑ‚Ð¸Ð½Ð¸Ñ +item.itemDustNeptunium.name=Пыль ÐÐµÐ¿Ñ‚ÑƒÐ½Ð¸Ñ +item.itemDustCurium.name=Пыль ÐšÑŽÑ€Ð¸Ñ +item.itemDustBerkelium.name=Пыль Ð‘ÐµÑ€ÐºÐµÐ»Ð¸Ñ +item.itemDustCalifornium.name=Пыль ÐšÐ°Ð»Ð¸Ñ„Ð¾Ñ€Ð½Ð¸Ñ +item.itemDustEinsteinium.name=Пыль Ð­Ð¹Ð½ÑˆÑ‚ÐµÐ¹Ð½Ð¸Ñ +item.itemDustFermium.name=Пыль Ð¤ÐµÑ€Ð¼Ð¸Ñ +item.itemDustLithium7.name=Пыль Ð›Ð¸Ñ‚Ð¸Ñ 7 +item.itemDustThorium232.name=Пыль Ð¢Ð¾Ñ€Ð¸Ñ 232 +item.itemDustUranium232.name=Пыль Урана 232 +item.itemDustUranium233.name=Пыль Урана 233 +item.itemDustPlutonium238.name=Пыль ÐŸÐ»ÑƒÑ‚Ð¾Ð½Ð¸Ñ 238 +item.itemDustPlutonium239.name=Пыль ÐŸÐ»ÑƒÑ‚Ð¾Ð½Ð¸Ñ 239 +item.itemDustStrontium90.name=Пыль Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ 90 +item.itemDustPolonium210.name=Пыль ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ 210 +item.itemDustAmericium241.name=Пыль ÐÐ¼ÐµÑ€Ð¸Ñ†Ð¸Ñ 241 +item.itemDustSiliconCarbide.name=Пыль Силиконового Карбида +item.itemDustZirconiumCarbide.name=Пыль Циркониевого Карбида +item.itemDustTantalumCarbide.name=Пыль Танталового Карбида +item.itemDustNiobiumCarbide.name=Пыль Ðиобиевого Карбида +item.itemDustBerylliumFluoride.name=Пыль Бериллиевого Фторида +item.itemDustLithiumFluoride.name=Пыль Литиевого Фторида +item.itemDustThoriumTetrafluoride.name=Пыль Ториевого Тетрафторида +item.itemDustThoriumHexafluoride.name=Пыль Ториевого ГекÑафторида +item.itemDustUraniumTetrafluoride.name=Пыль Ураниевого Тетрафторида +item.itemDustUraniumHexafluoride.name=Пыль Ураниевого ГекÑафторида +item.itemDustZirconiumTetrafluoride.name=Пыль Циркониевого Тетрафторида +item.itemDustNeptuniumHexafluoride.name=Пыль Ðептуниевого ГекÑафторида +item.itemDustTechnetiumHexafluoride.name=Пыль Технециевого ГекÑафторида +item.itemDustSeleniumHexafluoride.name=Пыль ГекÑафторида Селена +item.itemDustLiFBeF2ZrF4U235.name=Пыль Железорана 235 +item.itemDustLiFBeF2ZrF4UF4.name=Пыль Циркониевого Железорана +item.itemDustLiFBeF2ThF4UF4.name=Пыль Ториевого Железорана +item.itemDustEnergyCrystal.name=Пыль ЭнергетичеÑкого КриÑталла +item.itemDustBloodSteel.name=Пыль Кровавой Стали +item.itemDustZeron100.name=Пыль Церона 100 +item.itemDustTumbaga.name=Пыль Тумбага +item.itemDustPotin.name=Пыль Потина +item.itemDustStaballoy.name=Пыль Стального Сплава +item.itemDustTantalloy60.name=Пыль Сплава Тантала 60 +item.itemDustTantalloy61.name=Пыль Сплава Тантала 61 +item.itemDustInconel625.name=Пыль Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 625 +item.itemDustInconel690.name=Пыль Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 690 +item.itemDustInconel792.name=Пыль Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 792 +item.itemDustEglinSteelBaseCompound.name=Пыль Эглинового Стального Базового Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ +item.itemDustEglinSteel.name=Пыль Эглиновой Стали +item.itemDustMaragingSteel250.name=Пыль МарагинÑкой Стали 250 +item.itemDustMaragingSteel300.name=Пыль МарагинÑкой Стали 300 +item.itemDustMaragingSteel350.name=Пыль МарагинÑкой Стали 350 +item.itemDustStellite.name=Пыль Стеллита +item.itemDustTalonite.name=пыль Талонита +item.itemDustHastelloyW.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ W +item.itemDustHastelloyX.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ X +item.itemDustHastelloyC276.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ C276 +item.itemDustHastelloyN.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ N +item.itemDustIncoloy020.name=Пыль Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ 020 +item.itemDustIncoloyDS.name=Пыль Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ DS +item.itemDustIncoloyMA956.name=Пыль Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ MA956 +item.itemDustGrisium.name=Пыль ГриÑиума +item.itemDustHG1223.name=Пыль HG1223 +item.itemDustTriniumTitaniumAlloy.name=Пыль Сплава Тритий Титана +item.itemDustTriniumNaquadahAlloy.name=Пыль Сплава Тритий Ðаквадаха +item.itemDustTriniumNaquadahCarbonite.name=Пыль Карбонита Тритий Ðаквадаха +item.itemDustQuantum.name=Пыль Кванта +item.itemDustFluorite.name=Пыль Флюорита +item.itemDustCrocoite.name=Пыль Крокоита +item.itemDustGeikielite.name=Пыль Гейкелита +item.itemDustNichromite.name=Пыль Ðихромата +item.itemDustTitanite.name=Пыль Титанита +item.itemDustZimbabweite.name=Пыль Зимбабвайта +item.itemDustZirconolite.name=Пыль Цирконолита +item.itemDustGadoliniteCe.name=Пыль Пыль Гадолинита Ce +item.itemDustGadoliniteY.name=Пыль Гадолинита Y +item.itemDustLepersonnite.name=Пыль ЛеперÑоннита +item.itemDustSamarskiteY.name=Пыль СамарÑкита Y +item.itemDustSamarskiteYb.name=Пыль СамарÑкита Yb +item.itemDustXenotime.name=Пыль КÑенотима +item.itemDustYttrialite.name=Пыль Иттриалита +item.itemDustYttrocerite.name=Пыль Иттроцерита +item.itemDustZircon.name=Пыль Циркона +item.itemDustPolycrase.name=Пыль ПоликраÑа +item.itemDustZircophyllite.name=Пыль Циркофиллита +item.itemDustZirkelite.name=Пыль Циркелита +item.itemDustLanthaniteLa.name=Пыль Лантанита La +item.itemDustLanthaniteCe.name=Пыль Лантанита Ce +item.itemDustLanthaniteNd.name=Пыль Лантанита Nd +item.itemDustAgarditeY.name=Пыль Ðгардита Y +item.itemDustAgarditeCd.name=Пыль Ðгардита Cd +item.itemDustAgarditeLa.name=Пыль Ðгардита La +item.itemDustAgarditeNd.name=Пыль Ðгардита Nd +item.itemDustHibonite.name=Пыль Гибонита +item.itemDustCerite.name=Пыль Церита +item.itemDustFluorcaphite.name=Пыль Фторокафита +item.itemDustFlorencite.name=Пыль Флоренцита +item.itemDustCryolite.name=Пыль Криолита + + +tile.Block of Selenium.name=Блок Селена +tile.Selenium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Селена +tile.Block of Bromine.name=Блок Брома +tile.Block of Strontium.name=Блок Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ +tile.Strontium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ +tile.Block of Zirconium.name=Блок Ð¦Ð¸Ñ€ÐºÐ¾Ð½Ð¸Ñ +tile.Zirconium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð¦Ð¸Ñ€ÐºÐ¾Ð½Ð¸Ñ +tile.Block of Ruthenium.name=Блок Ð ÑƒÑ‚ÐµÐ½Ð¸Ñ +tile.Ruthenium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð ÑƒÑ‚ÐµÐ½Ð¸Ñ +tile.Block of Iodine.name=Блок Йода +tile.Iodine Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Йода +tile.Block of Hafnium.name=Блок Ð“Ð°Ñ„Ð½Ð¸Ñ +tile.Hafnium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð“Ð°Ñ„Ð½Ð¸Ñ +tile.Block of Dysprosium.name=Блок ДиÑÐ¿Ñ€Ð¾Ð·Ð¸Ñ +tile.Dysprosium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð”Ð¸Ð¿Ñ€Ð¾Ð·Ð¸Ñ +tile.Block of Tellurium.name=Блок Теллура +tile.Tellurium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Теллура +tile.Block of Rhodium.name=Блок Ð Ð¾Ð´Ð¸Ñ +tile.Rhodium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð Ð¾Ð´Ð¸Ñ +tile.Block of Rhenium.name=Блок Ð ÐµÐ½Ð¸Ñ +tile.Rhenium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð ÐµÐ½Ð¸Ñ +tile.Block of Thallium.name=Блок Ð¢Ð°Ð»Ð»Ð¸Ñ +tile.Thallium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð¢Ð°Ð»Ð»Ð¸Ñ +tile.Block of Technetium.name=Блок Ð¢ÐµÑ…Ð½ÐµÑ†Ð¸Ñ +tile.Block of Polonium.name=Блок ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ +tile.Block of Astatine.name=Блок ÐÑтатина +tile.Block of Francium.name=Блок Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ +tile.Block of Radium.name=Блок Ð Ð°Ð´Ð¸Ñ +tile.Block of Promethium.name=Блок ÐŸÑ€Ð¾Ð¼ÐµÑ‚Ð¸Ñ +tile.Block of Actinium.name=Блок ÐÐºÑ‚Ð¸Ð½Ð¸Ñ +tile.Block of Protactinium.name=Блок ÐŸÑ€Ð¾Ñ‚Ð°ÐºÑ‚Ð¸Ð½Ð¸Ñ +tile.Block of Neptunium.name=Блок ÐÐµÐ¿Ñ‚ÑƒÐ½Ð¸Ñ +tile.Block of Curium.name=Блок ÐšÑŽÑ€Ð¸Ñ +tile.Block of Berkelium.name=Блок Ð‘ÐµÑ€ÐºÐ¸Ð»Ð¸Ñ +tile.Block of Californium.name=Блок ÐšÐ°Ð»Ð¸Ñ„Ð¾Ñ€Ð½Ð¸Ñ +tile.Block of Einsteinium.name=Блок Ð­Ð¹Ð½ÑˆÑ‚ÐµÐ¹Ð½Ð¸Ñ +tile.Block of Fermium.name=Блок Ð¤ÐµÑ€Ð¼Ð¸Ñ +tile.Block of Thorium 232.name=Блок Ð¢Ð¾Ñ€Ð¸Ñ 232 +tile.Block of Uranium 232.name=Блок Урана 232 +tile.Block of Uranium 233.name=Блок Урана 233 +tile.Block of Plutonium-238.name=Блок Плутона 238 +tile.Block of Plutonium-239.name=Блок Плутона 239 +tile.Block of Strontium-90.name=Блок Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ 90 +tile.Block of Polonium-210.name=Блок ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ 210 +tile.Block of Americium-241.name=Блок ÐÐ¼ÐµÑ€Ð¸Ñ†Ð¸Ñ 241 +tile.Block of Silicon Carbide.name=Блок Силиконового Карбида +tile.Silicon Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Силиконового Карбида +tile.Block of Zirconium Carbide.name=Блок Циркониевого Карбида +tile.Zirconium Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Циркониевого Карбида +tile.Block of Tantalum Carbide.name=Блок Карбида Тантала +tile.Tantalum Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Карбида Тантала +tile.Block of Niobium Carbide.name=Блок Ðиобиевого Карбида +tile.Niobium Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ðиобиевого Карбида +tile.Block of Beryllium Fluoride.name=Блок Бериллиевого Фторида +tile.Block of Lithium Fluoride.name=Блок Литиевого Фторида +tile.Block of Thorium Tetrafluoride.name=Блок Ториевого Тетрафторида +tile.Block of Thorium Hexafluoride.name=Блок Ториевого ГекÑафторида +tile.Block of Uranium Tetrafluoride.name=Блок Ураниевого Тетрафторида +tile.Block of Uranium Hexafluoride.name=Блок Ураниевого ГекÑафторида +tile.Block of Zirconium Tetrafluoride.name=Блок Циркониевого Тетрафторида +tile.Block of Neptunium Hexafluoride.name=Блок Ðептуниевого ГекÑафторида +tile.Block of Technetium Hexafluoride.name=Блок Технециевого ГекÑафторида +tile.Block of Selenium Hexafluoride.name=Блок ГекÑафторида Селена +tile.Block of LiFBeF2ZrF4U235.name=Блок Железорана 235 +tile.Block of LiFBeF2ZrF4UF4.name=Блок Циркониевого Железорана +tile.Block of LiFBeF2ThF4UF4.name=Блок Ториевого Железорана +tile.Block of Energy Crystal.name=Блок ЭнергетичеÑкого КриÑталла +tile.Energy Crystal Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ЭнергетичеÑкого КриÑталла +tile.Block of Blood Steel.name=Блок Кровавой Стали +tile.Blood Steel Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Кровавой Стали +tile.Block of Zeron-100.name=Блок Церона 100 +tile.Zeron-100 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Церона 100 +tile.Block of Tumbaga.name=Блок Из Тумбага +tile.Tumbaga Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Тумбага +tile.Block of Potin.name=Блок Потина +tile.Potin Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Потина +tile.Block of Staballoy.name=Блок Стального Сплава +tile.Staballoy Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Стального Сплава +tile.Block of Tantalloy-60.name=Блок Сплава Тантала 60 +tile.Tantalloy-60 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Сплава Тантала 60 +tile.Block of Tantalloy-61.name=Блок Сплава Тантала 61 +tile.Tantalloy-61 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Сплава Тантала 61 +tile.Block of Inconel-625.name=Блок Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 625 +tile.Inconel-625 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 625 +tile.Block of Inconel-690.name=Блок Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 690 +tile.Inconel-690 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 690 +tile.Block of Inconel-792.name=Блок Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 792 +tile.Inconel-792 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 792 +tile.Block of Eglin Steel.name=Блок Эглиновой Стали +tile.Eglin Steel Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Эглиновой Стали +tile.Block of Maraging Steel 250.name=Блок МарагинÑкой Стали 250 +tile.Maraging Steel 250 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· МарагинÑкой Стали 250 +tile.Block of Maraging Steel 300.name=Блок МарагинÑкой Стали 300 +tile.Maraging Steel 300 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· МарагинÑкой Стали 300 +tile.Block of Maraging Steel 350.name=Блок МарагинÑкой Стали 350 +tile.Maraging Steel 350 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· МарагинÑкой Стали 350 +tile.Block of Stellite.name=Блок Стеллита +tile.Stellite Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Стеллита +tile.Block of Talonite.name=Блок Талонита +tile.Talonite Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Талонита +tile.Block of Hastelloy-W.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ W +tile.Hastelloy-W Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ W +tile.Block of Hastelloy-X.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ X +tile.Hastelloy-X Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ X +tile.Block of Hastelloy-C276.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ C276 +tile.Hastelloy-C276 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ C276 +tile.Block of Hastelloy-N.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ N +tile.Hastelloy-N Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ N +tile.Block of Incoloy-020.name=Блок Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ 020 +tile.Incoloy-020 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ 020 +tile.Block of Incoloy-DS.name=Блок Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ DS +tile.Incoloy-DS Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ DS +tile.Block of Incoloy-MA956.name=Блок Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ MA956 +tile.Incoloy-MA956 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ MA956 +tile.Block of Grisium.name=Блок ГриÑиума +tile.Grisium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ГриÑиума +tile.Block of Trinium Titanium Alloy.name=Блок Сплава Тритий Титана +tile.Trinium Titanium Alloy Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Сплава Тритий Титана +tile.Block of Trinium Naquadah Alloy.name=Блок Сплава Тритий Ðаквадаха +tile.Block of Trinium Naquadah Carbonite.name=Блок Карбонита Тритий Ðаквадаха +tile.Trinium Naquadah Carbonite Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Карбонита Тритий Ðаквадаха +tile.Block of Quantum.name=Блок Кванта +tile.Quantum Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Кванта +tile.OreFluorite.name=Руда Флюорита +tile.OreCrocoite.name=Руда Крокоита +tile.OreGeikielite.name=Руда Гейкелита +tile.OreNichromite.name=Руда Ðихромата +tile.OreTitanite.name=Руда Титанита +tile.OreZimbabweite.name=Руда Зимбабвайта +tile.OreZirconolite.name=Руда Цирконолита +tile.OreGadoliniteCe.name=Руда Гадолинита Ce +tile.OreGadoliniteY.name=Руда Гадолинита Y +tile.OreLepersonnite.name=Руда ЛеперÑоннита +tile.OreSamarskiteY.name=Руда СамарÑкита Y +tile.OreSamarskiteYb.name=Руда СамарÑкита Yb +tile.OreXenotime.name=Руда КÑенотима +tile.OreYttriaite.name=Руда Иттриайта +tile.OreYttrialite.name=Руда Иттриалита +tile.OreYttrocerite.name=Руда Иттроцерита +tile.OreZircon.name=Руда Циркона +tile.OrePolycrase.name=Руда ПоликраÑа +tile.OreZircophyllite.name=Руда Циркофиллита +tile.OreZirkelite.name=Руда Циркелита +tile.OreLanthaniteLa.name=Руда Лантанита La +tile.OreLanthaniteCe.name=Руда Лантанита Ce +tile.OreLanthaniteNd.name=Руда Лантанита Nd +tile.OreAgarditeY.name=Руда Ðгардита Y +tile.OreAgarditeCd.name=Руда Ðгардита Cd +tile.OreAgarditeLa.name=Руда Ðгардита La +tile.OreAgarditeNd.name=Руда Ðгардита Nd +tile.OreHibonite.name=Руда Гибонита +tile.OreCerite.name=Руда Церита +tile.OreFluorcaphite.name=Руда Фторокафита +tile.OreFlorencite.name=Руда Флоренцита +tile.OreCryolite.name=Руда Криолита +tile.blockMFEffect.name=Эффект MF +tile.fluidBlockSludge.name=Жидкий Блок ГрÑзи +tile.blockWorkbenchGT.name=ВерÑтак +tile.blockWorkbenchGTAdvanced.name=Улучшенный ВерÑтак +tile.blockHeliumGenerator.name=Гелиевый Генератор +tile.blockFirePit.name=ÐžÐ³Ð½ÐµÐ½Ð½Ð°Ñ Ð¯Ð¼Ð° +tile.blockFishTrap.name=Ð Ñ‹Ð±Ð½Ð°Ñ Ð›Ð¾Ð²ÑƒÑˆÐºÐ° +tile.blockInfiniteFluidTank.name=БеÑконечный ЖидкоÑтный Резервуар +tile.Fluorite Ore [Old].name=Руда Флюорита [ОбычнаÑ] +tile.blockMiningExplosives.name=Взрывчатые ВещеÑтва +tile.blockHellFire.name=ÐдÑкий огонь +tile.blockProjectBench.name=Проект Скамейки +tile.blockTradeBench.name=Ð¢Ð¾Ñ€Ð³Ð¾Ð²Ð°Ñ Ð¡ÐºÐ°Ð¼ÐµÐ¹ÐºÐ° +tile.blockModularity.name=МодульноÑÑ‚ÑŒ +tile.blockBlackGate.name=Черные Ворота +tile.blockTankXpConverter.name=Резервуар Конвертора Опыта +tile.blockCompressedObsidian.0.name=КомпреÑÑированный ОбÑидиан +tile.blockNet.name=Ñети +tile.blockMiningPipeFake.name=Добыча Полезных ИÑкопаемых +tile.blockMiningHeadFake.name=Руководитель По Добыче Полезных ИÑкопаемых +tile.miscutils.fluid.pyrotheum.name=Жидкий Пиротеум +tile.miscutils.fluid.cryotheum.name=Жидкий Криотеум +tile.miscutils.fluid.ender.name=Жидкий Эндер +tile.blockRainforestOakLog.name=ТропичеÑкий Ð›ÐµÑ +tile.blockRainforestOakLeaves.name=ТропичеÑкие ЛиÑÑ‚ÑŒÑ +tile.blockRainforestOakSapling.name=ТропичеÑкие Саженцы +[ToxicEverglades] tile.fluidSludge.0.name=Жидкий Ил +[ToxicEverglades] tile.blockDarkWorldPortal.name=Черный Мировой Портал +[ToxicEverglades] tile.blockDarkWorldGround.name=Ð§ÐµÑ€Ð½Ð°Ñ ÐœÐ¸Ñ€Ð¾Ð²Ð°Ñ Ð—ÐµÐ¼Ð»Ñ +[ToxicEverglades] tile.blockDarkWorldGround2.name=Ð§ÐµÑ€Ð½Ð°Ñ ÐœÐ¸Ñ€Ð¾Ð²Ð°Ñ Ð—ÐµÐ¼Ð»Ñ 2 +[ToxicEverglades] tile.blockDarkWorldPortalFrame.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾ Мирового Портала +tile.blockMobSpawnerEx.0.name=Спавнер МонÑтров Ex +miscutils.blockcasings.0.name=ÐšÐµÐ¹Ñ 1 +gtplusplus.blockcasings.2.0.name=ÐšÐµÐ¹Ñ 2 +gtplusplus.blockcasings.3.0.name=ÐšÐµÐ¹Ñ 3 diff --git a/src/main/resources/assets/miscutils/lang/zh_CN.lang b/src/main/resources/assets/miscutils/lang/zh_CN.lang new file mode 100644 index 0000000000..1e77d28562 --- /dev/null +++ b/src/main/resources/assets/miscutils/lang/zh_CN.lang @@ -0,0 +1,3243 @@ +//Creative Tabs +itemGroup.MiscUtilBlockTab=[GT++] æ–¹å— +itemGroup.MiscUtilMiscTab=[GT++] ç‰©å“ +itemGroup.MiscUtilCombatTab=[GT++] 战斗 +itemGroup.MiscUtilToolsTab=[GT++] 工具 +itemGroup.MiscUtilMachineTab=[GT++] 机器 +itemGroup.MiscUtilOtherTab=[GT++] ç‰©å“ II +itemGroup.MiscUtilBOP=[GT++]超多生物群系附属 + +//Debug +item.AAA_Broken.name=[ä¸å­˜åœ¨çš„物å“]请在Github上å馈这个åˆæˆ +item.itemBedLocator_Base.name=床定ä½å™¨[NBT测试] +item.itemBaseItemWithCharge.name=基础å¯å……ç”µç‰©å“ +item.miscutils_itemDebugShapeSpawner.name=[调试用]å¡‘å½¢ + +//Fluids +tile.fluidSludge.name=ä¸æµåŠ¨çš„废水 +tile.fluidSludge.0.name=ä¸æµåŠ¨çš„废水 + +//Death Messages +death.attack.plasmabolt=%s 死于滚烫的等离å­ä½“. +death.attack.plasmabolt.player=%1$s 被 %2$s 使用等离å­ä½“击æ€. +death.attack.gtpp.grinder=%s 被艾è¨ç ”磨机磨æˆäº†æ¸£æ¸£. + +//Alternative Materials +item.itemPlateBatteryAlloy.name=电池åˆé‡‘æ¿ +item.itemIngotBatteryAlloy.name=电池åˆé‡‘é”­ +item.itemStickyRubber.name=粘性橡胶团 + +//Unused Fuel rods +item.itemFuelRod_Empty.name=空燃料棒 +item.itemFuelRod_Thorium.name=é’燃料棒 +item.itemFuelRod_Uranium.name=铀燃料棒 +item.itemFuelRod_Plutonium.name=钚燃料棒 + +//Entities +entity.constructStaballoy.name=è´«é“€åˆé‡‘结构 +entity.sickBlaze.name=被感染的狂热者 + +//Tile Entities +tile.blockToolBuilder.name=æ ¼é›·å·¥å…·ç»„è£…å° + +//Tools +item.itemBufferCore.name=能é‡æ ¸å¿ƒ +item.itemStaballoyPickaxe.name=隧é“挖掘者 +item.itemStaballoyAxe.name=æ ‘æž—ç ä¼è€… +item.itemSandstoneHammer.name=圆石粉碎者 + +//Thermal Foundation Stuff +item.MiscUtils.bucket.bucketPyrotheum.name=烈焰之炽焱桶 +item.MiscUtils.bucket.bucketCryotheum.name=æžå¯’之凛冰桶 +item.MiscUtils.bucket.bucketEnder.name=è°æŒ¯ç†”èžæœ«å½±çç æ¡¶ +item.MiscUtils.material.dustPyrotheum.name=炽焱之尘 +item.MiscUtils.material.dustCryotheum.name=凛冰之尘 +item.MiscUtils.material.rodBlizz.name=暴雪棒 +item.MiscUtils.material.dustBlizz.name=暴雪粉 + +//============== +tile.miscutils.fluid.pyrotheum.name=烈焰之炽焱 +tile.miscutils.fluid.cryotheum.name=æžå¯’之凛冰 +tile.miscutils.fluid.ender.name=è°æŒ¯ç†”èžæœ«å½±çç  +//============== + +//Forestry Stuff +item.frameAccelerated.name=加速框架 +item.frameVoid.name=虚空框架 +item.frameMutagenic.name=诱å˜æ¡†æž¶ +item.frameBusy.name=工作框架 +item.frameChocolate.name=巧克力框架 +item.frameRestraint.name=约æŸæ¡†æž¶ +item.frameSoul.name=çµé­‚框架 +item.frameHealing.name=治愈框架 +item.frameNova.name=新星框架 +item.frameArborists.name=树艺框架 +item.frameDecaying.name=è…烂框架 +item.frameSlowing.name=å‡é€Ÿæ¡†æž¶ +item.frameStabilizing.name=稳定框架 +item.frameUseless.name=无用框架 + +//IC2 stuff +item.itemEnergeticRotorBlade.name=充能åˆé‡‘æ‰‡å¶ +item.itemTungstenSteelRotorBlade.name=é’¨é’¢æ‰‡å¶ +item.itemVibrantRotorBlade.name=脉冲åˆé‡‘æ‰‡å¶ +item.itemIridiumRotorBlade.name=é“±æ‰‡å¶ +item.itemEnergeticShaft.name=充能åˆé‡‘è½´ +item.itemTungstenSteelShaft.name=钨钢轴 +item.itemVibrantShaft.name=脉冲åˆé‡‘è½´ +item.itemIridiumShaft.name=铱轴 +item.itemMagnaliumRotorBlade.name=é•é“åˆé‡‘æ‰‡å¶ +item.itemUltimetRotorBlade.name=哈æ°åˆé‡‘æ‰‡å¶ +item.itemMagnaliumShaft.name=é•é“åˆé‡‘è½´ +item.itemUltimetShaft.name=哈æ°åˆé‡‘è½´ + + +//Misc Items +item.itemPLACEHOLDER_Circuit.name=夸克æ“纵者 (UV) +item.itemPlateEnrichedSoularium.name=富集阳光åˆé‡‘æ¿ +item.itemHeliumBlob.name=神秘氢气物质 +item.itemAlkalusDisk.name=Alkalus圆盘 +item.itemHotIngotRaisinBread.name=一份热葡è„å¹²é¢åŒ… +item.itemIngotRaisinBread.name=一份葡è„å¹²é¢åŒ… + +//Misc Blocks +tile.blockCompressedObsidian.0.name=压缩黑曜石(9) +tile.blockCompressedObsidian.1.name=二é‡åŽ‹ç¼©é»‘曜石(81) +tile.blockCompressedObsidian.2.name=三é‡åŽ‹ç¼©é»‘曜石(729) +tile.blockCompressedObsidian.3.name=å››é‡åŽ‹ç¼©é»‘曜石(6561) +tile.blockCompressedObsidian.4.name=五é‡åŽ‹ç¼©é»‘曜石(59049) +tile.blockCompressedObsidian.5.name=å转黑曜石 +tile.blockNet.name=网 + + +//GT++ Items + +//Meta Tool +MU-metaitem.01.0.name=MU-metaitem.01.0.name + +//Cells +item.SulfurDioxide.name=优质二氧化硫å•å…ƒ +item.mobessence.name=怪物精åŽæ¶²å•å…ƒ +item.Fertiliser.name=æµä½“肥料å•å…ƒ +item.UN32Fertiliser.name=UN-32肥料å•å…ƒ +item.UN18Fertiliser.name=UN-18肥料å•å…ƒ +item.RaisinJuice.name=è‘¡è„æ±å•å…ƒ +item.BerylliumHydroxide.name=氢氧化é“å•å…ƒ +item.AmmoniumBifluoride.name=氟化氢铵å•å…ƒ +item.Hydroxide.name=氢氧化物å•å…ƒ +item.Ammonium.name=铵å•å…ƒ +item.AmmoniumTetrafluoroberyllate.name=四氟硼酸铵å•å…ƒ + +//Resources +item.itemStickyRubber.name=粘性橡胶团 +item.itemCoalCoke.name=焦煤 +item.itemHydrogenBlob.name=神秘氢气团 +item.itemHeliumBlob.name=神秘氢气物质 + +//Normal Items +item.itemAlkalusDisk.name=Alkalus圆盘 +item.itemSimpleFiremaker.name=基础起ç«å™¨ +item.itemFiber.name=æ¤ç‰©çº¤ç»´ +item.itemRope.name=绳索 +item.backpackRed.name=红色背包 +item.backpackGreen.name=绿色背包 +item.backpackBlue.name=è“色背包 +item.backpackYellow.name=黄色背包 +item.backpackPurple.name=紫色背包 +item.backpackCyan.name=é’色背包 +item.backpackMaroon.name=棕色背包 +item.backpackOlive.name=橄榄绿色背包 +item.backpackDarkGreen.name=深绿色背包 +item.backpackDarkPurple.name=深紫色背包 +item.backpackTeal.name=è“绿色背包 +item.backpackNavy.name=æ·±è“色背包 +item.backpackSilver.name=银色背包 +item.backpackGray.name=ç°è‰²èƒŒåŒ… +item.backpackBlack.name=黑色背包 +item.backpackWhite.name=白色背包 +item.itemBlueprint.name=è“图[无用] +item.itemGemShards.name=钻石碎片 +item.itemHalfCompleteCasings.name=åŠæˆå“æœºæ¢°æ–¹å— +item.itemSulfuricPotion.name=喷溅型 ç¡«é…¸ +item.itemHydrofluoricPotion.name=喷溅型 氢氟酸 +item.itemIngotRaisinBread.name=一份葡è„å¹²é¢åŒ… +item.itemHotIngotRaisinBread.name=一份热葡è„å¹²é¢åŒ… +item.itemFoodRaisinToast.name=一份葡è„干烤é¢åŒ… +item.itemHotFoodRaisinToast.name=一份热葡è„干烤é¢åŒ… +item.itemFoodCurriedSausages.name=一份咖喱香肠 +item.itemHotFoodCurriedSausages.name=一份热咖喱香肠 + + +//Conversion Dusts +item.dustNeptunium238.name=é•Ž 238粉 +item.dustRadium226.name=é•­ 226粉 +item.itemDustDecayedRadium226.name=è¡°å˜é•­ 226粉 +item.itemDustSmallDecayedRadium226.name=å°å †è¡°å˜é•­ 226粉 +item.itemDustTinyDecayedRadium226.name=å°æ’®è¡°å˜é•­ 226粉 + +//Material Items +item.itemDustGadolinium.name=钆粉 +item.itemDustSmallGadolinium.name=å°å †é’†ç²‰ +item.itemDustTinyGadolinium.name=å°æ’®é’†ç²‰ +item.itemDustYtterbium.name=镱粉 +item.itemDustSmallYtterbium.name=å°å †é•±ç²‰ +item.itemDustTinyYtterbium.name=å°æ’®é•±ç²‰ +item.itemDustSamarium.name=é’粉 +item.itemDustSmallSamarium.name=å°å †é’粉 +item.itemDustTinySamarium.name=å°æ’®é’粉 +item.itemDustLanthanum.name=镧粉 +item.itemDustSmallLanthanum.name=å°å †é•§ç²‰ +item.itemDustTinyLanthanum.name=å°æ’®é•§ç²‰ +item.itemCellNeon.name=æ°–å•å…ƒ +item.itemCellGermanium.name=é”—å•å…ƒ +item.itemCellSelenium.name=ç¡’å•å…ƒ +item.itemCellBromine.name=溴å•å…ƒ +item.itemCellKrypton.name=æ°ªå•å…ƒ +item.itemCellZirconium.name=锆å•å…ƒ +item.itemCellTechnetium.name=é”å•å…ƒ +item.itemCellRuthenium.name=é’Œå•å…ƒ +item.itemCellRhodium.name=é“‘å•å…ƒ +item.itemCellIodine.name=碘å•å…ƒ +item.itemCellXenon.name=æ°™å•å…ƒ +item.itemCellHafnium.name=铪å•å…ƒ +item.itemCellRhenium.name=铼å•å…ƒ +item.itemCellThallium.name=é“Šå•å…ƒ +item.itemCellPolonium.name=é’‹å•å…ƒ +item.itemCellAstatine.name=ç ¹å•å…ƒ +item.itemCellFrancium.name=é’«å•å…ƒ +item.itemCellRadium.name=é•­å•å…ƒ +item.itemCellActinium.name=锕å•å…ƒ +item.itemCellProtactinium.name=镤å•å…ƒ +item.itemCellNeptunium.name=é•Žå•å…ƒ +item.itemCellCurium.name=é””å•å…ƒ +item.itemCellBerkelium.name=锫å•å…ƒ +item.itemCellCalifornium.name=锎å•å…ƒ +item.itemCellEinsteinium.name=锿å•å…ƒ +item.itemCellFermium.name=é•„å•å…ƒ +item.itemCellRefinedTrinium.name=精制三元金属å•å…ƒ +item.itemIngotSelenium.name=ç¡’é”­ +item.itemDustSelenium.name=硒粉 +item.itemDustTinySelenium.name=å°æ’®ç¡’粉 +item.itemDustSmallSelenium.name=å°å †ç¡’粉 +item.itemNuggetSelenium.name=ç¡’ç²’ +item.itemPlateSelenium.name=ç¡’æ¿ +item.itemPlateDoubleSelenium.name=åŒé‡ç¡’æ¿ +item.itemBoltSelenium.name=硒螺栓 +item.itemRodSelenium.name=ç¡’æ† +item.itemRodLongSelenium.name=é•¿ç¡’æ† +item.itemRingSelenium.name=硒环 +item.itemScrewSelenium.name=ç¡’èžºä¸ +item.itemRotorSelenium.name=ç¡’è½¬å­ +item.itemGearSelenium.name=硒齿轮 +item.itemCellUranium232.name=é“€-232å•å…ƒ +item.itemCellUranium233.name=é“€-233å•å…ƒ +item.itemCellThoriumTetrafluoride.name=四氟化é’å•å…ƒ +item.itemCellThoriumHexafluoride.name=六氟化é’å•å…ƒ +item.itemCellUraniumTetrafluoride.name=四氟化铀å•å…ƒ +item.itemCellUraniumHexafluoride.name=六氟化铀å•å…ƒ +item.itemCellZirconiumTetrafluoride.name=四氟化锆å•å…ƒ +item.itemCellBerylliumFluoride.name=氟化é“å•å…ƒ +item.itemCellLithiumFluoride.name=氟化锂å•å…ƒ +item.itemCellHydroxide.name=氢氧化物å•å…ƒ +item.itemCellAmmonium.name=铵å•å…ƒ +item.itemCellAmmoniumBifluoride.name=氟化氢铵å•å…ƒ +item.itemCellBerylliumHydroxide.name=氢氧化é“å•å…ƒ +item.itemCellAmmoniumTetrafluoroberyllate.name=æ°Ÿé“酸铵å•å…ƒ +item.itemCellNeptuniumHexafluoride.name=六氟化铀å•å…ƒ +item.itemCellTechnetiumHexafluoride.name=六氟化é”å•å…ƒ +item.itemCellSeleniumHexafluoride.name=六氟化硒å•å…ƒ +item.itemCellEnergyCrystal.name=能é‡æ°´æ™¶å•å…ƒ +item.itemCellBloodSteel.name=血钢å•å…ƒ +item.itemCellStaballoy.name=è´«é“€åˆé‡‘å•å…ƒ +item.itemCellTantalloy60.name=钽钨åˆé‡‘-60å•å…ƒ +item.itemCellTantalloy61.name=钽钨åˆé‡‘-61å•å…ƒ +item.itemCellTumbaga.name=铜金åˆé‡‘å•å…ƒ +item.itemCellPotin.name=ç²—é’é“œåˆé‡‘å•å…ƒ +item.itemCellInconel625.name=é•é“¬åŸºåˆé‡‘-625å•å…ƒ +item.itemCellInconel690.name=é•é“¬åŸºåˆé‡‘-690å•å…ƒ +item.itemCellInconel792.name=é•é“¬åŸºåˆé‡‘-792å•å…ƒ +item.itemCellZeron100.name=å¡žé¾™-100å•å…ƒ +item.itemCellMaragingSteel250.name=马æ°ä½“时效钢250å•å…ƒ +item.itemCellMaragingSteel300.name=马æ°ä½“时效钢300å•å…ƒ +item.itemCellMaragingSteel350.name=马æ°ä½“时效钢350å•å…ƒ +item.itemCellStellite.name=铬钴锰钛åˆé‡‘å•å…ƒ +item.itemCellTalonite.name=铬钴磷酸ç›åˆé‡‘å•å…ƒ +item.itemCellHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wå•å…ƒ +item.itemCellHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xå•å…ƒ +item.itemCellHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nå•å…ƒ +item.itemCellHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276å•å…ƒ +item.itemCellIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020å•å…ƒ +item.itemCellIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSå•å…ƒ +item.itemCellIncoloyMA956.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-MA956å•å…ƒ +item.itemCellTungstenCarbide.name=碳化钨å•å…ƒ +item.itemCellSiliconCarbide.name=碳化硅å•å…ƒ +item.itemCellTantalumCarbide.name=碳化钽å•å…ƒ +item.itemCellZirconiumCarbide.name=碳化锆å•å…ƒ +item.itemCellNiobiumCarbide.name=碳化铌å•å…ƒ +item.itemCellGrisium.name=ç°é’›åˆé‡‘å•å…ƒ +item.itemCellEglinSteelBaseCompound.name=埃格林钢å•å…ƒ +item.itemCellEglinSteel.name=埃格林钢å•å…ƒ +item.itemCellHG1223.name=HG-1223å•å…ƒ +item.itemCellTriniumTitaniumAlloy.name=三元钛åˆé‡‘å•å…ƒ +item.itemCellTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘å•å…ƒ +item.itemCellTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘å•å…ƒ +item.itemCellQuantum.name=é‡å­åˆé‡‘å•å…ƒ +item.itemIngotBromine.name=溴锭 +item.itemDustBromine.name=溴粉 +item.itemDustTinyBromine.name=å°æ’®æº´ç²‰ +item.itemDustSmallBromine.name=å°å †æº´ç²‰ +item.itemNuggetBromine.name=溴粒 +item.itemPlateBromine.name=æº´æ¿ +item.itemPlateDoubleBromine.name=åŒé‡æº´æ¿ +item.itemIngotStrontium.name=锶锭 +item.itemDustStrontium.name=锶粉 +item.itemDustTinyStrontium.name=å°æ’®é”¶ç²‰ +item.itemDustSmallStrontium.name=å°å †é”¶ç²‰ +item.itemNuggetStrontium.name=锶粒 +item.itemPlateStrontium.name=é”¶æ¿ +item.itemPlateDoubleStrontium.name=åŒé‡é”¶æ¿ +item.itemBoltStrontium.name=锶螺栓 +item.itemRodStrontium.name=é”¶æ† +item.itemRodLongStrontium.name=é•¿é”¶æ† +item.itemRingStrontium.name=锶环 +item.itemScrewStrontium.name=é”¶èžºä¸ +item.itemRotorStrontium.name=é”¶è½¬å­ +item.itemGearStrontium.name=锶齿轮 +item.itemIngotZirconium.name=锆锭 +item.itemDustZirconium.name=锆粉 +item.itemDustTinyZirconium.name=å°æ’®é”†ç²‰ +item.itemDustSmallZirconium.name=å°å †é”†ç²‰ +item.itemNuggetZirconium.name=锆粒 +item.itemPlateZirconium.name=é”†æ¿ +item.itemPlateDoubleZirconium.name=åŒé‡é”†æ¿ +item.itemBoltZirconium.name=锆螺栓 +item.itemRodZirconium.name=é”†æ† +item.itemRodLongZirconium.name=é•¿é”†æ† +item.itemRingZirconium.name=锆环 +item.itemScrewZirconium.name=é”†èžºä¸ +item.itemRotorZirconium.name=é”†è½¬å­ +item.itemGearZirconium.name=锆齿轮 +item.itemIngotRuthenium.name=钌锭 +item.itemDustRuthenium.name=钌粉 +item.itemDustTinyRuthenium.name=å°æ’®é’Œç²‰ +item.itemDustSmallRuthenium.name=å°å †é’Œç²‰ +item.itemNuggetRuthenium.name=钌粒 +item.itemPlateRuthenium.name=é’Œæ¿ +item.itemPlateDoubleRuthenium.name=åŒé‡é’Œæ¿ +item.itemBoltRuthenium.name=钌螺栓 +item.itemRodRuthenium.name=é’Œæ† +item.itemRodLongRuthenium.name=é•¿é’Œæ† +item.itemRingRuthenium.name=钌环 +item.itemScrewRuthenium.name=é’Œèžºä¸ +item.itemRotorRuthenium.name=é’Œè½¬å­ +item.itemGearRuthenium.name=钌齿轮 +item.itemIngotIodine.name=碘锭 +item.itemDustIodine.name=碘粉 +item.itemDustTinyIodine.name=å°æ’®ç¢˜ç²‰ +item.itemDustSmallIodine.name=å°å †ç¢˜ç²‰ +item.itemNuggetIodine.name=碘粒 +item.itemPlateIodine.name=ç¢˜æ¿ +item.itemPlateDoubleIodine.name=åŒé‡ç¢˜æ¿ +item.itemBoltIodine.name=碘螺栓 +item.itemRodIodine.name=ç¢˜æ† +item.itemRodLongIodine.name=é•¿ç¢˜æ† +item.itemRingIodine.name=碘环 +item.itemScrewIodine.name=ç¢˜èžºä¸ +item.itemRotorIodine.name=ç¢˜è½¬å­ +item.itemGearIodine.name=碘齿轮 +item.itemIngotHafnium.name=铪锭 +item.itemDustHafnium.name=铪粉 +item.itemDustTinyHafnium.name=å°æ’®é“ªç²‰ +item.itemDustSmallHafnium.name=å°å †é“ªç²‰ +item.itemNuggetHafnium.name=铪粒 +item.itemPlateHafnium.name=é“ªæ¿ +item.itemPlateDoubleHafnium.name=åŒé‡é“ªæ¿ +item.itemBoltHafnium.name=铪螺栓 +item.itemRodHafnium.name=é“ªæ† +item.itemRodLongHafnium.name=é•¿é“ªæ† +item.itemRingHafnium.name=铪环 +item.itemScrewHafnium.name=é“ªèžºä¸ +item.itemRotorHafnium.name=é“ªè½¬å­ +item.itemGearHafnium.name=铪齿轮 +item.itemIngotDysprosium.name=é•é”­ +item.itemDustDysprosium.name=é•ç²‰ +item.itemDustTinyDysprosium.name=å°æ’®é•ç²‰ +item.itemDustSmallDysprosium.name=å°å †é•ç²‰ +item.itemNuggetDysprosium.name=é•ç²’ +item.itemPlateDysprosium.name=é•æ¿ +item.itemPlateDoubleDysprosium.name=åŒé‡é•æ¿ +item.itemBoltDysprosium.name=é•èžºæ “ +item.itemRodDysprosium.name=é•æ† +item.itemRodLongDysprosium.name=é•¿é•æ† +item.itemRingDysprosium.name=é•çŽ¯ +item.itemScrewDysprosium.name=é•èžºä¸ +item.itemRotorDysprosium.name=é•è½¬å­ +item.itemGearDysprosium.name=é•é½¿è½® +item.itemIngotTellurium.name=碲锭 +item.itemDustTellurium.name=碲粉 +item.itemDustTinyTellurium.name=å°æ’®ç¢²ç²‰ +item.itemDustSmallTellurium.name=å°å †ç¢²ç²‰ +item.itemNuggetTellurium.name=碲粒 +item.itemPlateTellurium.name=ç¢²æ¿ +item.itemPlateDoubleTellurium.name=åŒé‡ç¢²æ¿ +item.itemBoltTellurium.name=碲螺栓 +item.itemRodTellurium.name=ç¢²æ† +item.itemRodLongTellurium.name=é•¿ç¢²æ† +item.itemRingTellurium.name=碲环 +item.itemScrewTellurium.name=ç¢²èžºä¸ +item.itemRotorTellurium.name=ç¢²è½¬å­ +item.itemGearTellurium.name=碲齿轮 +item.itemIngotRhodium.name=é“‘é”­ +item.itemDustRhodium.name=铑粉 +item.itemDustTinyRhodium.name=å°æ’®é“‘粉 +item.itemDustSmallRhodium.name=å°å †é“‘粉 +item.itemNuggetRhodium.name=é“‘ç²’ +item.itemPlateRhodium.name=é“‘æ¿ +item.itemPlateDoubleRhodium.name=åŒé‡é“‘æ¿ +item.itemBoltRhodium.name=铑螺栓 +item.itemRodRhodium.name=é“‘æ† +item.itemRodLongRhodium.name=é•¿é“‘æ† +item.itemRingRhodium.name=铑环 +item.itemScrewRhodium.name=é“‘èžºä¸ +item.itemRotorRhodium.name=é“‘è½¬å­ +item.itemGearRhodium.name=铑齿轮 +item.itemIngotRhenium.name=铼锭 +item.itemDustRhenium.name=铼粉 +item.itemDustTinyRhenium.name=å°æ’®é“¼ç²‰ +item.itemDustSmallRhenium.name=å°å †é“¼ç²‰ +item.itemNuggetRhenium.name=铼粒 +item.itemPlateRhenium.name=é“¼æ¿ +item.itemPlateDoubleRhenium.name=åŒé‡é“¼æ¿ +item.itemBoltRhenium.name=铼螺栓 +item.itemRodRhenium.name=é“¼æ† +item.itemRodLongRhenium.name=é•¿é“¼æ† +item.itemRingRhenium.name=铼环 +item.itemScrewRhenium.name=é“¼èžºä¸ +item.itemRotorRhenium.name=é“¼è½¬å­ +item.itemGearRhenium.name=铼齿轮 +item.itemIngotThallium.name=é“Šé”­ +item.itemDustThallium.name=铊粉 +item.itemDustTinyThallium.name=å°æ’®é“Šç²‰ +item.itemDustSmallThallium.name=å°å †é“Šç²‰ +item.itemNuggetThallium.name=é“Šç²’ +item.itemPlateThallium.name=é“Šæ¿ +item.itemPlateDoubleThallium.name=åŒé‡é“Šæ¿ +item.itemBoltThallium.name=铊螺栓 +item.itemRodThallium.name=é“Šæ† +item.itemRodLongThallium.name=é•¿é“Šæ† +item.itemRingThallium.name=铊环 +item.itemScrewThallium.name=é“Šèžºä¸ +item.itemRotorThallium.name=é“Šè½¬å­ +item.itemGearThallium.name=铊齿轮 +item.itemIngotTechnetium.name=é”é”­ +item.itemDustTechnetium.name=é”粉 +item.itemDustTinyTechnetium.name=å°æ’®é”粉 +item.itemDustSmallTechnetium.name=å°å †é”粉 +item.itemNuggetTechnetium.name=é”ç²’ +item.itemPlateTechnetium.name=é”æ¿ +item.itemPlateDoubleTechnetium.name=åŒé‡é”æ¿ +item.itemIngotPolonium.name=é’‹é”­ +item.itemDustPolonium.name=钋粉 +item.itemDustTinyPolonium.name=å°æ’®é’‹ç²‰ +item.itemDustSmallPolonium.name=å°å †é’‹ç²‰ +item.itemNuggetPolonium.name=é’‹ç²’ +item.itemPlatePolonium.name=é’‹æ¿ +item.itemPlateDoublePolonium.name=åŒé‡é’‹æ¿ +item.itemIngotAstatine.name=砹锭 +item.itemDustAstatine.name=砹粉 +item.itemDustTinyAstatine.name=å°æ’®ç ¹ç²‰ +item.itemDustSmallAstatine.name=å°å †ç ¹ç²‰ +item.itemNuggetAstatine.name=砹粒 +item.itemPlateAstatine.name=ç ¹æ¿ +item.itemPlateDoubleAstatine.name=åŒé‡ç ¹æ¿ +item.itemIngotFrancium.name=é’«é”­ +item.itemDustFrancium.name=钫粉 +item.itemDustTinyFrancium.name=å°æ’®é’«ç²‰ +item.itemDustSmallFrancium.name=å°å †é’«ç²‰ +item.itemNuggetFrancium.name=é’«ç²’ +item.itemPlateFrancium.name=é’«æ¿ +item.itemPlateDoubleFrancium.name=åŒé‡é’«æ¿ +item.itemIngotRadium.name=é•­é”­ +item.itemDustRadium.name=镭粉 +item.itemDustTinyRadium.name=å°æ’®é•­ç²‰ +item.itemDustSmallRadium.name=å°å †é•­ç²‰ +item.itemNuggetRadium.name=é•­ç²’ +item.itemPlateRadium.name=é•­æ¿ +item.itemPlateDoubleRadium.name=åŒé‡é•­æ¿ +item.itemIngotActinium.name=锕锭 +item.itemDustActinium.name=锕粉 +item.itemDustTinyActinium.name=å°æ’®é”•ç²‰ +item.itemDustSmallActinium.name=å°å †é”•ç²‰ +item.itemNuggetActinium.name=锕粒 +item.itemPlateActinium.name=é”•æ¿ +item.itemPlateDoubleActinium.name=åŒé‡é”•æ¿ +item.itemIngotProtactinium.name=镤锭 +item.itemDustProtactinium.name=镤粉 +item.itemDustTinyProtactinium.name=å°æ’®é•¤ç²‰ +item.itemDustSmallProtactinium.name=å°å †é•¤ç²‰ +item.itemNuggetProtactinium.name=镤粒 +item.itemPlateProtactinium.name=é•¤æ¿ +item.itemPlateDoubleProtactinium.name=åŒé‡é•¤æ¿ +item.itemIngotNeptunium.name=é•Žé”­ +item.itemDustNeptunium.name=镎粉 +item.itemDustTinyNeptunium.name=å°æ’®é•Žç²‰ +item.itemDustSmallNeptunium.name=å°å †é•Žç²‰ +item.itemNuggetNeptunium.name=é•Žç²’ +item.itemPlateNeptunium.name=é•Žæ¿ +item.itemPlateDoubleNeptunium.name=åŒé‡é•Žæ¿ +item.itemIngotCurium.name=锔锭 +item.itemDustCurium.name=锔粉 +item.itemDustTinyCurium.name=å°æ’®é””粉 +item.itemDustSmallCurium.name=å°å †é””粉 +item.itemNuggetCurium.name=锔粒 +item.itemPlateCurium.name=é””æ¿ +item.itemPlateDoubleCurium.name=åŒé‡é””æ¿ +item.itemIngotBerkelium.name=锫锭 +item.itemDustBerkelium.name=锫粉 +item.itemDustTinyBerkelium.name=å°æ’®é”«ç²‰ +item.itemDustSmallBerkelium.name=å°å †é”«ç²‰ +item.itemNuggetBerkelium.name=锫粒 +item.itemPlateBerkelium.name=é”«æ¿ +item.itemPlateDoubleBerkelium.name=åŒé‡é”«æ¿ +item.itemIngotCalifornium.name=锎锭 +item.itemDustCalifornium.name=锎粉 +item.itemDustTinyCalifornium.name=å°æ’®é”Žç²‰ +item.itemDustSmallCalifornium.name=å°å †é”Žç²‰ +item.itemNuggetCalifornium.name=锎粒 +item.itemPlateCalifornium.name=é”Žæ¿ +item.itemPlateDoubleCalifornium.name=åŒé‡é”Žæ¿ +item.itemIngotEinsteinium.name=锿锭 +item.itemDustEinsteinium.name=锿粉 +item.itemDustTinyEinsteinium.name=å°æ’®é”¿ç²‰ +item.itemDustSmallEinsteinium.name=å°å †é”¿ç²‰ +item.itemNuggetEinsteinium.name=锿粒 +item.itemPlateEinsteinium.name=é”¿æ¿ +item.itemPlateDoubleEinsteinium.name=åŒé‡é”¿æ¿ +item.itemIngotFermium.name=é•„é”­ +item.itemDustFermium.name=镄粉 +item.itemDustTinyFermium.name=å°æ’®é•„粉 +item.itemDustSmallFermium.name=å°å †é•„粉 +item.itemNuggetFermium.name=é•„ç²’ +item.itemPlateFermium.name=é•„æ¿ +item.itemPlateDoubleFermium.name=åŒé‡é•„æ¿ +item.itemIngotLithium7.name=锂 7é”­ +item.itemDustLithium7.name=锂 7粉 +item.itemDustTinyLithium7.name=å°æ’®é”‚ 7粉 +item.itemDustSmallLithium7.name=å°å †é”‚ 7粉 +item.itemNuggetLithium7.name=锂 7ç²’ +item.itemPlateLithium7.name=锂 7æ¿ +item.itemPlateDoubleLithium7.name=åŒé‡é”‚ 7æ¿ +item.itemIngotThorium232.name=é’-232é”­ +item.itemDustThorium232.name=é’-232粉 +item.itemDustTinyThorium232.name=å°æ’®é’-232粉 +item.itemDustSmallThorium232.name=å°å †é’-232粉 +item.itemNuggetThorium232.name=é’-232ç²’ +item.itemPlateThorium232.name=é’-232æ¿ +item.itemPlateDoubleThorium232.name=åŒé‡é’-232æ¿ +item.itemIngotUranium232.name=é“€-232é”­ +item.itemDustUranium232.name=é“€-232粉 +item.itemDustTinyUranium232.name=å°æ’®é“€-232粉 +item.itemDustSmallUranium232.name=å°å †é“€-232粉 +item.itemNuggetUranium232.name=é“€-232ç²’ +item.itemPlateUranium232.name=é“€-232æ¿ +item.itemRodUranium232.name=é“€-232æ† +item.itemRodLongUranium232.name=é•¿é“€-232æ† +item.itemIngotUranium233.name=é“€-233é”­ +item.itemDustUranium233.name=é“€-233粉 +item.itemDustTinyUranium233.name=å°æ’®é“€-233粉 +item.itemDustSmallUranium233.name=å°å †é“€-233粉 +item.itemNuggetUranium233.name=é“€-233ç²’ +item.itemPlateUranium233.name=é“€-233æ¿ +item.itemRodUranium233.name=é“€-233æ† +item.itemRodLongUranium233.name=é•¿é“€-233æ† +item.itemIngotPlutonium238.name=é’š-238é”­ +item.itemDustPlutonium238.name=é’š-238粉 +item.itemDustTinyPlutonium238.name=å°æ’®é’š-238粉 +item.itemDustSmallPlutonium238.name=å°å †é’š-238粉 +item.itemNuggetPlutonium238.name=é’š-238ç²’ +item.itemPlatePlutonium238.name=é’š-238æ¿ +item.itemPlateDoublePlutonium238.name=åŒé‡é’š-238æ¿ +item.itemIngotStrontium90.name=锶-90é”­ +item.itemDustStrontium90.name=锶-90粉 +item.itemDustTinyStrontium90.name=å°æ’®é”¶-90粉 +item.itemDustSmallStrontium90.name=å°å †é”¶-90粉 +item.itemNuggetStrontium90.name=锶-90ç²’ +item.itemPlateStrontium90.name=锶-90æ¿ +item.itemPlateDoubleStrontium90.name=åŒé‡é”¶-90æ¿ +item.itemIngotPolonium210.name=é’‹-210é”­ +item.itemDustPolonium210.name=é’‹-210粉 +item.itemDustTinyPolonium210.name=å°æ’®é’‹-210粉 +item.itemDustSmallPolonium210.name=å°å †é’‹-210粉 +item.itemNuggetPolonium210.name=é’‹-210ç²’ +item.itemPlatePolonium210.name=é’‹-210æ¿ +item.itemPlateDoublePolonium210.name=åŒé‡é’‹-210æ¿ +item.itemIngotAmericium241.name=é•…-241é”­ +item.itemDustAmericium241.name=é•…-241粉 +item.itemDustTinyAmericium241.name=å°æ’®é•…-241粉 +item.itemDustSmallAmericium241.name=å°å †é•…-241粉 +item.itemNuggetAmericium241.name=é•…-241ç²’ +item.itemPlateAmericium241.name=é•…-241æ¿ +item.itemPlateDoubleAmericium241.name=åŒé‡é•…-241æ¿ +item.itemIngotSiliconCarbide.name=碳化硅锭 +item.itemDustSiliconCarbide.name=碳化硅粉 +item.itemDustTinySiliconCarbide.name=å°æ’®ç¢³åŒ–硅粉 +item.itemDustSmallSiliconCarbide.name=å°å †ç¢³åŒ–硅粉 +item.itemNuggetSiliconCarbide.name=碳化硅粒 +item.itemPlateSiliconCarbide.name=ç¢³åŒ–ç¡…æ¿ +item.itemPlateDoubleSiliconCarbide.name=åŒé‡ç¢³åŒ–ç¡…æ¿ +item.itemBoltSiliconCarbide.name=碳化硅螺栓 +item.itemRodSiliconCarbide.name=ç¢³åŒ–ç¡…æ† +item.itemRodLongSiliconCarbide.name=é•¿ç¢³åŒ–ç¡…æ† +item.itemRingSiliconCarbide.name=碳化硅环 +item.itemScrewSiliconCarbide.name=ç¢³åŒ–ç¡…èžºä¸ +item.itemRotorSiliconCarbide.name=ç¢³åŒ–ç¡…è½¬å­ +item.itemGearSiliconCarbide.name=碳化硅齿轮 +item.itemIngotZirconiumCarbide.name=碳化锆锭 +item.itemHotIngotZirconiumCarbide.name=热碳化锆锭 +item.itemDustZirconiumCarbide.name=碳化锆粉 +item.itemDustTinyZirconiumCarbide.name=å°æ’®ç¢³åŒ–锆粉 +item.itemDustSmallZirconiumCarbide.name=å°å †ç¢³åŒ–锆粉 +item.itemNuggetZirconiumCarbide.name=碳化锆粒 +item.itemPlateZirconiumCarbide.name=ç¢³åŒ–é”†æ¿ +item.itemPlateDoubleZirconiumCarbide.name=åŒé‡ç¢³åŒ–é”†æ¿ +item.itemBoltZirconiumCarbide.name=碳化锆螺栓 +item.itemRodZirconiumCarbide.name=ç¢³åŒ–é”†æ† +item.itemRodLongZirconiumCarbide.name=é•¿ç¢³åŒ–é”†æ† +item.itemRingZirconiumCarbide.name=碳化锆环 +item.itemScrewZirconiumCarbide.name=ç¢³åŒ–é”†èžºä¸ +item.itemRotorZirconiumCarbide.name=ç¢³åŒ–é”†è½¬å­ +item.itemGearZirconiumCarbide.name=碳化锆齿轮 +item.itemIngotTantalumCarbide.name=碳化钽锭 +item.itemHotIngotTantalumCarbide.name=热碳化钽锭 +item.itemDustTantalumCarbide.name=碳化钽粉 +item.itemDustTinyTantalumCarbide.name=å°æ’®ç¢³åŒ–钽粉 +item.itemDustSmallTantalumCarbide.name=å°å †ç¢³åŒ–钽粉 +item.itemNuggetTantalumCarbide.name=碳化钽粒 +item.itemPlateTantalumCarbide.name=ç¢³åŒ–é’½æ¿ +item.itemPlateDoubleTantalumCarbide.name=åŒé‡ç¢³åŒ–é’½æ¿ +item.itemBoltTantalumCarbide.name=碳化钽螺栓 +item.itemRodTantalumCarbide.name=ç¢³åŒ–é’½æ† +item.itemRodLongTantalumCarbide.name=é•¿ç¢³åŒ–é’½æ† +item.itemRingTantalumCarbide.name=碳化钽环 +item.itemScrewTantalumCarbide.name=ç¢³åŒ–é’½èžºä¸ +item.itemRotorTantalumCarbide.name=ç¢³åŒ–é’½è½¬å­ +item.itemGearTantalumCarbide.name=碳化钽齿轮 +item.itemIngotNiobiumCarbide.name=碳化铌锭 +item.itemHotIngotNiobiumCarbide.name=热碳化铌锭 +item.itemDustNiobiumCarbide.name=碳化铌粉 +item.itemDustTinyNiobiumCarbide.name=å°æ’®ç¢³åŒ–铌粉 +item.itemDustSmallNiobiumCarbide.name=å°å †ç¢³åŒ–铌粉 +item.itemNuggetNiobiumCarbide.name=碳化铌粒 +item.itemPlateNiobiumCarbide.name=ç¢³åŒ–é“Œæ¿ +item.itemPlateDoubleNiobiumCarbide.name=åŒé‡ç¢³åŒ–é“Œæ¿ +item.itemBoltNiobiumCarbide.name=碳化铌螺栓 +item.itemRodNiobiumCarbide.name=ç¢³åŒ–é“Œæ† +item.itemRodLongNiobiumCarbide.name=é•¿ç¢³åŒ–é“Œæ† +item.itemRingNiobiumCarbide.name=碳化铌环 +item.itemScrewNiobiumCarbide.name=ç¢³åŒ–é“Œèžºä¸ +item.itemRotorNiobiumCarbide.name=ç¢³åŒ–é“Œè½¬å­ +item.itemGearNiobiumCarbide.name=碳化铌齿轮 +item.itemIngotBerylliumFluoride.name=氟化é“é”­ +item.itemDustBerylliumFluoride.name=氟化é“粉 +item.itemDustTinyBerylliumFluoride.name=å°æ’®æ°ŸåŒ–é“粉 +item.itemDustSmallBerylliumFluoride.name=å°å †æ°ŸåŒ–é“粉 +item.itemNuggetBerylliumFluoride.name=氟化é“ç²’ +item.itemPlateBerylliumFluoride.name=氟化é“æ¿ +item.itemPlateDoubleBerylliumFluoride.name=åŒé‡æ°ŸåŒ–é“æ¿ +item.itemIngotLithiumFluoride.name=氟化锂锭 +item.itemDustLithiumFluoride.name=氟化锂粉 +item.itemDustTinyLithiumFluoride.name=å°æ’®æ°ŸåŒ–锂粉 +item.itemDustSmallLithiumFluoride.name=å°å †æ°ŸåŒ–锂粉 +item.itemNuggetLithiumFluoride.name=氟化锂粒 +item.itemPlateLithiumFluoride.name=æ°ŸåŒ–é”‚æ¿ +item.itemPlateDoubleLithiumFluoride.name=åŒé‡æ°ŸåŒ–é”‚æ¿ +item.itemIngotThoriumTetrafluoride.name=四氟化é’é”­ +item.itemDustThoriumTetrafluoride.name=四氟化é’粉 +item.itemDustTinyThoriumTetrafluoride.name=å°æ’®å››æ°ŸåŒ–é’粉 +item.itemDustSmallThoriumTetrafluoride.name=å°å †å››æ°ŸåŒ–é’粉 +item.itemNuggetThoriumTetrafluoride.name=四氟化é’ç²’ +item.itemPlateThoriumTetrafluoride.name=四氟化é’æ¿ +item.itemPlateDoubleThoriumTetrafluoride.name=åŒé‡å››æ°ŸåŒ–é’æ¿ +item.itemIngotThoriumHexafluoride.name=六氟化é’é”­ +item.itemDustThoriumHexafluoride.name=六氟化é’粉 +item.itemDustTinyThoriumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–é’粉 +item.itemDustSmallThoriumHexafluoride.name=å°å †å…­æ°ŸåŒ–é’粉 +item.itemNuggetThoriumHexafluoride.name=六氟化é’ç²’ +item.itemPlateThoriumHexafluoride.name=六氟化é’æ¿ +item.itemPlateDoubleThoriumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é’æ¿ +item.itemIngotUraniumTetrafluoride.name=四氟化铀锭 +item.itemDustUraniumTetrafluoride.name=四氟化铀粉 +item.itemDustTinyUraniumTetrafluoride.name=å°æ’®å››æ°ŸåŒ–铀粉 +item.itemDustSmallUraniumTetrafluoride.name=å°å †å››æ°ŸåŒ–铀粉 +item.itemNuggetUraniumTetrafluoride.name=四氟化铀粒 +item.itemPlateUraniumTetrafluoride.name=å››æ°ŸåŒ–é“€æ¿ +item.itemPlateDoubleUraniumTetrafluoride.name=åŒé‡å››æ°ŸåŒ–é“€æ¿ +item.itemIngotUraniumHexafluoride.name=六氟化铀锭 +item.itemDustUraniumHexafluoride.name=六氟化铀粉 +item.itemDustTinyUraniumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–铀粉 +item.itemDustSmallUraniumHexafluoride.name=å°å †å…­æ°ŸåŒ–铀粉 +item.itemNuggetUraniumHexafluoride.name=六氟化铀粒 +item.itemPlateUraniumHexafluoride.name=å…­æ°ŸåŒ–é“€æ¿ +item.itemPlateDoubleUraniumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é“€æ¿ +item.itemIngotZirconiumTetrafluoride.name=四氟化锆锭 +item.itemDustZirconiumTetrafluoride.name=四氟化锆粉 +item.itemDustTinyZirconiumTetrafluoride.name=å°æ’®å››æ°ŸåŒ–锆粉 +item.itemDustSmallZirconiumTetrafluoride.name=å°å †å››æ°ŸåŒ–锆粉 +item.itemNuggetZirconiumTetrafluoride.name=四氟化锆粒 +item.itemPlateZirconiumTetrafluoride.name=å››æ°ŸåŒ–é”†æ¿ +item.itemPlateDoubleZirconiumTetrafluoride.name=åŒé‡å››æ°ŸåŒ–é”†æ¿ +item.itemIngotNeptuniumHexafluoride.name=六氟化镎锭 +item.itemDustNeptuniumHexafluoride.name=六氟化镎粉 +item.itemDustTinyNeptuniumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–镎粉 +item.itemDustSmallNeptuniumHexafluoride.name=å°å †å…­æ°ŸåŒ–镎粉 +item.itemNuggetNeptuniumHexafluoride.name=六氟化镎粒 +item.itemPlateNeptuniumHexafluoride.name=å…­æ°ŸåŒ–é•Žæ¿ +item.itemPlateDoubleNeptuniumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é•Žæ¿ +item.itemIngotTechnetiumHexafluoride.name=六氟化é”é”­ +item.itemDustTechnetiumHexafluoride.name=六氟化é”粉 +item.itemDustTinyTechnetiumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–é”粉 +item.itemDustSmallTechnetiumHexafluoride.name=å°å †å…­æ°ŸåŒ–é”粉 +item.itemNuggetTechnetiumHexafluoride.name=六氟化é”ç²’ +item.itemPlateTechnetiumHexafluoride.name=六氟化é”æ¿ +item.itemPlateDoubleTechnetiumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é”æ¿ +item.itemIngotSeleniumHexafluoride.name=六氟化硒锭 +item.itemDustSeleniumHexafluoride.name=六氟化硒粉 +item.itemDustTinySeleniumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–硒粉 +item.itemDustSmallSeleniumHexafluoride.name=å°å †å…­æ°ŸåŒ–硒粉 +item.itemNuggetSeleniumHexafluoride.name=六氟化硒粒 +item.itemPlateSeleniumHexafluoride.name=å…­æ°ŸåŒ–ç¡’æ¿ +item.itemPlateDoubleSeleniumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–ç¡’æ¿ +item.itemIngotLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–物锭 +item.itemDustLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–物粉 +item.itemDustTinyLiFBeF2ZrF4U235.name=å°æ’®é“€235å¤åˆæ°ŸåŒ–物粉 +item.itemDustSmallLiFBeF2ZrF4U235.name=å°å †é“€235å¤åˆæ°ŸåŒ–物粉 +item.itemNuggetLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–物粒 +item.itemPlateLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–ç‰©æ¿ +item.itemPlateDoubleLiFBeF2ZrF4U235.name=åŒé‡é“€235å¤åˆæ°ŸåŒ–ç‰©æ¿ +item.itemIngotLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–物锭 +item.itemDustLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–物粉 +item.itemDustTinyLiFBeF2ZrF4UF4.name=å°æ’®é“€é”†å¤åˆæ°ŸåŒ–物粉 +item.itemDustSmallLiFBeF2ZrF4UF4.name=å°å †é“€é”†å¤åˆæ°ŸåŒ–物粉 +item.itemNuggetLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–物粒 +item.itemPlateLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–ç‰©æ¿ +item.itemPlateDoubleLiFBeF2ZrF4UF4.name=åŒé‡é“€é”†å¤åˆæ°ŸåŒ–ç‰©æ¿ +item.itemIngotLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–物锭 +item.itemDustLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–物粉 +item.itemDustTinyLiFBeF2ThF4UF4.name=å°æ’®é“€é’å¤åˆæ°ŸåŒ–物粉 +item.itemDustSmallLiFBeF2ThF4UF4.name=å°å †é“€é’å¤åˆæ°ŸåŒ–物粉 +item.itemNuggetLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–物粒 +item.itemPlateLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–ç‰©æ¿ +item.itemPlateDoubleLiFBeF2ThF4UF4.name=åŒé‡é“€é’å¤åˆæ°ŸåŒ–ç‰©æ¿ +item.itemIngotEnergyCrystal.name=能é‡æ°´æ™¶é”­ +item.itemHotIngotEnergyCrystal.name=热能é‡æ°´æ™¶é”­ +item.itemDustEnergyCrystal.name=能é‡æ°´æ™¶ç²‰ +item.itemDustTinyEnergyCrystal.name=å°æ’®èƒ½é‡æ°´æ™¶ç²‰ +item.itemDustSmallEnergyCrystal.name=å°å †èƒ½é‡æ°´æ™¶ç²‰ +item.itemNuggetEnergyCrystal.name=能é‡æ°´æ™¶ç²’ +item.itemPlateEnergyCrystal.name=能é‡æ°´æ™¶æ¿ +item.itemPlateDoubleEnergyCrystal.name=åŒé‡èƒ½é‡æ°´æ™¶æ¿ +item.itemBoltEnergyCrystal.name=能é‡æ°´æ™¶èžºæ “ +item.itemRodEnergyCrystal.name=能é‡æ°´æ™¶æ† +item.itemRodLongEnergyCrystal.name=长能é‡æ°´æ™¶æ† +item.itemRingEnergyCrystal.name=能é‡æ°´æ™¶çŽ¯ +item.itemScrewEnergyCrystal.name=能é‡æ°´æ™¶èžºä¸ +item.itemRotorEnergyCrystal.name=能é‡æ°´æ™¶è½¬å­ +item.itemGearEnergyCrystal.name=能é‡æ°´æ™¶é½¿è½® +item.itemIngotBloodSteel.name=血钢锭 +item.itemDustBloodSteel.name=血钢粉 +item.itemDustTinyBloodSteel.name=å°æ’®è¡€é’¢ç²‰ +item.itemDustSmallBloodSteel.name=å°å †è¡€é’¢ç²‰ +item.itemNuggetBloodSteel.name=血钢粒 +item.itemPlateBloodSteel.name=è¡€é’¢æ¿ +item.itemPlateDoubleBloodSteel.name=åŒé‡è¡€é’¢æ¿ +item.itemBoltBloodSteel.name=血钢螺栓 +item.itemRodBloodSteel.name=è¡€é’¢æ† +item.itemRodLongBloodSteel.name=é•¿è¡€é’¢æ† +item.itemRingBloodSteel.name=血钢环 +item.itemScrewBloodSteel.name=è¡€é’¢èžºä¸ +item.itemRotorBloodSteel.name=è¡€é’¢è½¬å­ +item.itemGearBloodSteel.name=血钢齿轮 +item.itemIngotZeron100.name=å¡žé¾™-100é”­ +item.itemHotIngotZeron100.name=热塞龙-100é”­ +item.itemDustZeron100.name=å¡žé¾™-100粉 +item.itemDustTinyZeron100.name=å°æ’®å¡žé¾™-100粉 +item.itemDustSmallZeron100.name=å°å †å¡žé¾™-100粉 +item.itemNuggetZeron100.name=å¡žé¾™-100ç²’ +item.itemPlateZeron100.name=å¡žé¾™-100æ¿ +item.itemPlateDoubleZeron100.name=åŒé‡å¡žé¾™-100æ¿ +item.itemBoltZeron100.name=å¡žé¾™-100螺栓 +item.itemRodZeron100.name=å¡žé¾™-100æ† +item.itemRodLongZeron100.name=é•¿å¡žé¾™100æ† +item.itemRingZeron100.name=å¡žé¾™-100环 +item.itemScrewZeron100.name=å¡žé¾™-100èžºä¸ +item.itemRotorZeron100.name=å¡žé¾™-100è½¬å­ +item.itemGearZeron100.name=å¡žé¾™-100齿轮 +item.itemIngotTumbaga.name=铜金åˆé‡‘é”­ +item.itemDustTumbaga.name=铜金åˆé‡‘粉 +item.itemDustTinyTumbaga.name=å°æ’®é“œé‡‘åˆé‡‘粉 +item.itemDustSmallTumbaga.name=å°å †é“œé‡‘åˆé‡‘粉 +item.itemNuggetTumbaga.name=铜金åˆé‡‘ç²’ +item.itemPlateTumbaga.name=铜金åˆé‡‘æ¿ +item.itemPlateDoubleTumbaga.name=åŒé‡é“œé‡‘åˆé‡‘æ¿ +item.itemBoltTumbaga.name=铜金åˆé‡‘螺栓 +item.itemRodTumbaga.name=铜金åˆé‡‘æ† +item.itemRodLongTumbaga.name=长铜金åˆé‡‘æ† +item.itemRingTumbaga.name=铜金åˆé‡‘环 +item.itemScrewTumbaga.name=铜金åˆé‡‘èžºä¸ +item.itemRotorTumbaga.name=铜金åˆé‡‘è½¬å­ +item.itemGearTumbaga.name=铜金åˆé‡‘齿轮 +item.itemIngotPotin.name=ç²—é’é“œåˆé‡‘é”­ +item.itemDustPotin.name=ç²—é’é“œåˆé‡‘粉 +item.itemDustTinyPotin.name=å°æ’®ç²—é’é“œåˆé‡‘粉 +item.itemDustSmallPotin.name=å°å †ç²—é’é“œåˆé‡‘粉 +item.itemNuggetPotin.name=ç²—é’é“œåˆé‡‘ç²’ +item.itemPlatePotin.name=ç²—é’é“œåˆé‡‘æ¿ +item.itemPlateDoublePotin.name=åŒé‡ç²—é’é“œåˆé‡‘æ¿ +item.itemBoltPotin.name=ç²—é’é“œåˆé‡‘螺栓 +item.itemRodPotin.name=ç²—é’é“œåˆé‡‘æ† +item.itemRodLongPotin.name=é•¿ç²—é’é“œåˆé‡‘æ† +item.itemRingPotin.name=ç²—é’é“œåˆé‡‘环 +item.itemScrewPotin.name=ç²—é’é“œåˆé‡‘èžºä¸ +item.itemRotorPotin.name=ç²—é’é“œåˆé‡‘è½¬å­ +item.itemGearPotin.name=ç²—é’é“œåˆé‡‘齿轮 +item.itemIngotStaballoy.name=è´«é“€åˆé‡‘é”­ +item.itemHotIngotStaballoy.name=热贫铀åˆé‡‘é”­ +item.itemDustStaballoy.name=è´«é“€åˆé‡‘粉 +item.itemDustTinyStaballoy.name=å°æ’®è´«é“€åˆé‡‘粉 +item.itemDustSmallStaballoy.name=å°å †è´«é“€åˆé‡‘粉 +item.itemNuggetStaballoy.name=è´«é“€åˆé‡‘ç²’ +item.itemPlateStaballoy.name=è´«é“€åˆé‡‘æ¿ +item.itemPlateDoubleStaballoy.name=åŒé‡è´«é“€åˆé‡‘æ¿ +item.itemBoltStaballoy.name=è´«é“€åˆé‡‘螺栓 +item.itemRodStaballoy.name=è´«é“€åˆé‡‘æ† +item.itemRodLongStaballoy.name=é•¿è´«é“€åˆé‡‘æ† +item.itemRingStaballoy.name=è´«é“€åˆé‡‘环 +item.itemScrewStaballoy.name=è´«é“€åˆé‡‘èžºä¸ +item.itemRotorStaballoy.name=è´«é“€åˆé‡‘è½¬å­ +item.itemGearStaballoy.name=è´«é“€åˆé‡‘齿轮 +item.itemIngotTantalloy60.name=钽钨åˆé‡‘-60é”­ +item.itemHotIngotTantalloy60.name=热钽钨åˆé‡‘-60é”­ +item.itemDustTantalloy60.name=钽钨åˆé‡‘-60粉 +item.itemDustTinyTantalloy60.name=å°æ’®é’½é’¨åˆé‡‘-60粉 +item.itemDustSmallTantalloy60.name=å°å †é’½é’¨åˆé‡‘-60粉 +item.itemNuggetTantalloy60.name=钽钨åˆé‡‘-60ç²’ +item.itemPlateTantalloy60.name=钽钨åˆé‡‘-60æ¿ +item.itemPlateDoubleTantalloy60.name=åŒé‡é’½é’¨åˆé‡‘-60æ¿ +item.itemBoltTantalloy60.name=钽钨åˆé‡‘-60螺栓 +item.itemRodTantalloy60.name=钽钨åˆé‡‘-60æ† +item.itemRodLongTantalloy60.name=长钽钨åˆé‡‘-60æ† +item.itemRingTantalloy60.name=钽钨åˆé‡‘-60环 +item.itemScrewTantalloy60.name=钽钨åˆé‡‘-60èžºä¸ +item.itemRotorTantalloy60.name=钽钨åˆé‡‘-60è½¬å­ +item.itemGearTantalloy60.name=钽钨åˆé‡‘-60齿轮 +item.itemIngotTantalloy61.name=钽钨åˆé‡‘-61é”­ +item.itemHotIngotTantalloy61.name=热钽钨åˆé‡‘-61é”­ +item.itemDustTantalloy61.name=钽钨åˆé‡‘-61粉 +item.itemDustTinyTantalloy61.name=å°æ’®é’½é’¨åˆé‡‘-61粉 +item.itemDustSmallTantalloy61.name=å°å †é’½é’¨åˆé‡‘-61粉 +item.itemNuggetTantalloy61.name=钽钨åˆé‡‘-61ç²’ +item.itemPlateTantalloy61.name=钽钨åˆé‡‘-61æ¿ +item.itemPlateDoubleTantalloy61.name=åŒé‡é’½é’¨åˆé‡‘-61æ¿ +item.itemBoltTantalloy61.name=钽钨åˆé‡‘-61螺栓 +item.itemRodTantalloy61.name=钽钨åˆé‡‘-61æ† +item.itemRodLongTantalloy61.name=长钽钨åˆé‡‘-61æ† +item.itemRingTantalloy61.name=钽钨åˆé‡‘-61环 +item.itemScrewTantalloy61.name=钽钨åˆé‡‘-61èžºä¸ +item.itemRotorTantalloy61.name=钽钨åˆé‡‘-61è½¬å­ +item.itemGearTantalloy61.name=钽钨åˆé‡‘-61齿轮 +item.itemIngotInconel625.name=é•é“¬åŸºåˆé‡‘-625é”­ +item.itemHotIngotInconel625.name=热é•é“¬åŸºåˆé‡‘-625é”­ +item.itemDustInconel625.name=é•é“¬åŸºåˆé‡‘-625粉 +item.itemDustTinyInconel625.name=å°æ’®é•é“¬åŸºåˆé‡‘-625粉 +item.itemDustSmallInconel625.name=å°å †é•é“¬åŸºåˆé‡‘-625粉 +item.itemNuggetInconel625.name=é•é“¬åŸºåˆé‡‘-625ç²’ +item.itemPlateInconel625.name=é•é“¬åŸºåˆé‡‘-625æ¿ +item.itemPlateDoubleInconel625.name=åŒé‡é•é“¬åŸºåˆé‡‘-625æ¿ +item.itemBoltInconel625.name=é•é“¬åŸºåˆé‡‘-625螺栓 +item.itemRodInconel625.name=é•é“¬åŸºåˆé‡‘-625æ† +item.itemRodLongInconel625.name=é•¿é•é“¬åŸºåˆé‡‘-625æ† +item.itemRingInconel625.name=é•é“¬åŸºåˆé‡‘-625环 +item.itemScrewInconel625.name=é•é“¬åŸºåˆé‡‘-625èžºä¸ +item.itemRotorInconel625.name=é•é“¬åŸºåˆé‡‘-625è½¬å­ +item.itemGearInconel625.name=é•é“¬åŸºåˆé‡‘-625齿轮 +item.itemIngotInconel690.name=é•é“¬åŸºåˆé‡‘-690é”­ +item.itemHotIngotInconel690.name=热é•é“¬åŸºåˆé‡‘-690é”­ +item.itemDustInconel690.name=é•é“¬åŸºåˆé‡‘-690粉 +item.itemDustTinyInconel690.name=å°æ’®é•é“¬åŸºåˆé‡‘-690粉 +item.itemDustSmallInconel690.name=å°å †é•é“¬åŸºåˆé‡‘-690粉 +item.itemNuggetInconel690.name=é•é“¬åŸºåˆé‡‘-690ç²’ +item.itemPlateInconel690.name=é•é“¬åŸºåˆé‡‘-690æ¿ +item.itemPlateDoubleInconel690.name=åŒé‡é•é“¬åŸºåˆé‡‘-690æ¿ +item.itemBoltInconel690.name=é•é“¬åŸºåˆé‡‘-690螺栓 +item.itemRodInconel690.name=é•é“¬åŸºåˆé‡‘-690æ† +item.itemRodLongInconel690.name=é•¿é•é“¬åŸºåˆé‡‘-690æ† +item.itemRingInconel690.name=é•é“¬åŸºåˆé‡‘-690环 +item.itemScrewInconel690.name=é•é“¬åŸºåˆé‡‘-690èžºä¸ +item.itemRotorInconel690.name=é•é“¬åŸºåˆé‡‘-690è½¬å­ +item.itemGearInconel690.name=é•é“¬åŸºåˆé‡‘-690齿轮 +item.itemIngotInconel792.name=é•é“¬åŸºåˆé‡‘-792é”­ +item.itemHotIngotInconel792.name=热é•é“¬åŸºåˆé‡‘-792é”­ +item.itemDustInconel792.name=é•é“¬åŸºåˆé‡‘-792粉 +item.itemDustTinyInconel792.name=å°æ’®é•é“¬åŸºåˆé‡‘-792粉 +item.itemDustSmallInconel792.name=å°å †é•é“¬åŸºåˆé‡‘-792粉 +item.itemNuggetInconel792.name=é•é“¬åŸºåˆé‡‘-792ç²’ +item.itemPlateInconel792.name=é•é“¬åŸºåˆé‡‘-792æ¿ +item.itemPlateDoubleInconel792.name=åŒé‡é•é“¬åŸºåˆé‡‘-792æ¿ +item.itemBoltInconel792.name=é•é“¬åŸºåˆé‡‘-792螺栓 +item.itemRodInconel792.name=é•é“¬åŸºåˆé‡‘-792æ† +item.itemRodLongInconel792.name=é•¿é•é“¬åŸºåˆé‡‘-792æ† +item.itemRingInconel792.name=é•é“¬åŸºåˆé‡‘-792环 +item.itemScrewInconel792.name=é•é“¬åŸºåˆé‡‘-792èžºä¸ +item.itemRotorInconel792.name=é•é“¬åŸºåˆé‡‘-792è½¬å­ +item.itemGearInconel792.name=é•é“¬åŸºåˆé‡‘-792齿轮 +item.itemDustEglinSteelBaseCompound.name=埃格林钢基础化åˆç‰©ç²‰ +item.itemDustTinyEglinSteelBaseCompound.name=å°æ’®åŸƒæ ¼æž—钢基础化åˆç‰©ç²‰ +item.itemDustSmallEglinSteelBaseCompound.name=å°å †åŸƒæ ¼æž—钢基础化åˆç‰©ç²‰ +item.itemIngotEglinSteel.name=埃格林钢锭 +item.itemDustEglinSteel.name=埃格林钢粉 +item.itemDustTinyEglinSteel.name=å°æ’®åŸƒæ ¼æž—钢粉 +item.itemDustSmallEglinSteel.name=å°å †åŸƒæ ¼æž—钢粉 +item.itemNuggetEglinSteel.name=埃格林钢粒 +item.itemPlateEglinSteel.name=åŸƒæ ¼æž—é’¢æ¿ +item.itemPlateDoubleEglinSteel.name=åŒé‡åŸƒæ ¼æž—é’¢æ¿ +item.itemBoltEglinSteel.name=埃格林钢螺栓 +item.itemRodEglinSteel.name=åŸƒæ ¼æž—é’¢æ† +item.itemRodLongEglinSteel.name=é•¿åŸƒæ ¼æž—é’¢æ† +item.itemRingEglinSteel.name=埃格林钢环 +item.itemScrewEglinSteel.name=åŸƒæ ¼æž—é’¢èžºä¸ +item.itemRotorEglinSteel.name=åŸƒæ ¼æž—é’¢è½¬å­ +item.itemGearEglinSteel.name=埃格林钢齿轮 +item.itemIngotMaragingSteel250.name=马æ°ä½“时效钢250é”­ +item.itemHotIngotMaragingSteel250.name=热马æ°ä½“时效钢250é”­ +item.itemDustMaragingSteel250.name=马æ°ä½“时效钢250粉 +item.itemDustTinyMaragingSteel250.name=å°æ’®é©¬æ°ä½“时效钢250粉 +item.itemDustSmallMaragingSteel250.name=å°å †é©¬æ°ä½“时效钢250粉 +item.itemNuggetMaragingSteel250.name=马æ°ä½“时效钢250ç²’ +item.itemPlateMaragingSteel250.name=马æ°ä½“时效钢250æ¿ +item.itemPlateDoubleMaragingSteel250.name=åŒé‡é©¬æ°ä½“时效钢250æ¿ +item.itemBoltMaragingSteel250.name=马æ°ä½“时效钢250螺栓 +item.itemRodMaragingSteel250.name=马æ°ä½“时效钢250æ† +item.itemRodLongMaragingSteel250.name=长马æ°ä½“时效钢250æ† +item.itemRingMaragingSteel250.name=马æ°ä½“时效钢250环 +item.itemScrewMaragingSteel250.name=马æ°ä½“时效钢250èžºä¸ +item.itemRotorMaragingSteel250.name=马æ°ä½“时效钢250è½¬å­ +item.itemGearMaragingSteel250.name=马æ°ä½“时效钢250齿轮 +item.itemIngotMaragingSteel300.name=马æ°ä½“时效钢300é”­ +item.itemHotIngotMaragingSteel300.name=热马æ°ä½“时效钢300é”­ +item.itemDustMaragingSteel300.name=马æ°ä½“时效钢300粉 +item.itemDustTinyMaragingSteel300.name=å°æ’®é©¬æ°ä½“时效钢300粉 +item.itemDustSmallMaragingSteel300.name=å°å †é©¬æ°ä½“时效钢300粉 +item.itemNuggetMaragingSteel300.name=马æ°ä½“时效钢300ç²’ +item.itemPlateMaragingSteel300.name=马æ°ä½“时效钢300æ¿ +item.itemPlateDoubleMaragingSteel300.name=åŒé‡é©¬æ°ä½“时效钢300æ¿ +item.itemBoltMaragingSteel300.name=马æ°ä½“时效钢300螺栓 +item.itemRodMaragingSteel300.name=马æ°ä½“时效钢300æ† +item.itemRodLongMaragingSteel300.name=长马æ°ä½“时效钢300æ† +item.itemRingMaragingSteel300.name=马æ°ä½“时效钢300环 +item.itemScrewMaragingSteel300.name=马æ°ä½“时效钢300èžºä¸ +item.itemRotorMaragingSteel300.name=马æ°ä½“时效钢300è½¬å­ +item.itemGearMaragingSteel300.name=马æ°ä½“时效钢300齿轮 +item.itemIngotMaragingSteel350.name=马æ°ä½“时效钢350é”­ +item.itemHotIngotMaragingSteel350.name=热马æ°ä½“时效钢350é”­ +item.itemDustMaragingSteel350.name=马æ°ä½“时效钢350粉 +item.itemDustTinyMaragingSteel350.name=å°æ’®é©¬æ°ä½“时效钢350粉 +item.itemDustSmallMaragingSteel350.name=å°å †é©¬æ°ä½“时效钢350粉 +item.itemNuggetMaragingSteel350.name=马æ°ä½“时效钢350ç²’ +item.itemPlateMaragingSteel350.name=马æ°ä½“时效钢350æ¿ +item.itemPlateDoubleMaragingSteel350.name=åŒé‡é©¬æ°ä½“时效钢350æ¿ +item.itemBoltMaragingSteel350.name=马æ°ä½“时效钢350螺栓 +item.itemRodMaragingSteel350.name=马æ°ä½“时效钢350æ† +item.itemRodLongMaragingSteel350.name=长马æ°ä½“时效钢350æ† +item.itemRingMaragingSteel350.name=马æ°ä½“时效钢350环 +item.itemScrewMaragingSteel350.name=马æ°ä½“时效钢350èžºä¸ +item.itemRotorMaragingSteel350.name=马æ°ä½“时效钢350è½¬å­ +item.itemGearMaragingSteel350.name=马æ°ä½“时效钢350齿轮 +item.itemIngotStellite.name=铬钴锰钛åˆé‡‘é”­ +item.itemHotIngotStellite.name=热铬钴锰钛åˆé‡‘é”­ +item.itemDustStellite.name=铬钴锰钛åˆé‡‘粉 +item.itemDustTinyStellite.name=å°æ’®é“¬é’´é”°é’›åˆé‡‘粉 +item.itemDustSmallStellite.name=å°å †é“¬é’´é”°é’›åˆé‡‘粉 +item.itemNuggetStellite.name=铬钴锰钛åˆé‡‘ç²’ +item.itemPlateStellite.name=铬钴锰钛åˆé‡‘æ¿ +item.itemPlateDoubleStellite.name=åŒé‡é“¬é’´é”°é’›åˆé‡‘æ¿ +item.itemBoltStellite.name=铬钴锰钛åˆé‡‘螺栓 +item.itemRodStellite.name=铬钴锰钛åˆé‡‘æ† +item.itemRodLongStellite.name=长铬钴锰钛åˆé‡‘æ† +item.itemRingStellite.name=铬钴锰钛åˆé‡‘环 +item.itemScrewStellite.name=铬钴锰钛åˆé‡‘èžºä¸ +item.itemRotorStellite.name=铬钴锰钛åˆé‡‘è½¬å­ +item.itemGearStellite.name=铬钴锰钛åˆé‡‘齿轮 +item.itemIngotTalonite.name=铬钴磷酸ç›åˆé‡‘é”­ +item.itemDustTalonite.name=铬钴磷酸ç›åˆé‡‘粉 +item.itemDustTinyTalonite.name=å°æ’®é“¬é’´ç£·é…¸ç›åˆé‡‘粉 +item.itemDustSmallTalonite.name=å°å †é“¬é’´ç£·é…¸ç›åˆé‡‘粉 +item.itemNuggetTalonite.name=铬钴磷酸ç›åˆé‡‘ç²’ +item.itemPlateTalonite.name=铬钴磷酸ç›åˆé‡‘æ¿ +item.itemPlateDoubleTalonite.name=åŒé‡é“¬é’´ç£·é…¸ç›åˆé‡‘æ¿ +item.itemBoltTalonite.name=铬钴磷酸ç›åˆé‡‘螺栓 +item.itemRodTalonite.name=铬钴磷酸ç›åˆé‡‘æ† +item.itemRodLongTalonite.name=长铬钴磷酸ç›åˆé‡‘æ† +item.itemRingTalonite.name=铬钴磷酸ç›åˆé‡‘环 +item.itemScrewTalonite.name=铬钴磷酸ç›åˆé‡‘èžºä¸ +item.itemRotorTalonite.name=铬钴磷酸ç›åˆé‡‘è½¬å­ +item.itemGearTalonite.name=铬钴磷酸ç›åˆé‡‘齿轮 +item.itemIngotHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wé”­ +item.itemDustHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W粉 +item.itemDustTinyHastelloyW.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-W粉 +item.itemDustSmallHastelloyW.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-W粉 +item.itemNuggetHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wç²’ +item.itemPlateHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wæ¿ +item.itemPlateDoubleHastelloyW.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-Wæ¿ +item.itemBoltHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W螺栓 +item.itemRodHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wæ† +item.itemRodLongHastelloyW.name=长哈斯特洛ä¾åˆé‡‘-Wæ† +item.itemRingHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W环 +item.itemScrewHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wèžºä¸ +item.itemRotorHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wè½¬å­ +item.itemGearHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W齿轮 +item.itemIngotHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xé”­ +item.itemDustHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X粉 +item.itemDustTinyHastelloyX.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-X粉 +item.itemDustSmallHastelloyX.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-X粉 +item.itemNuggetHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xç²’ +item.itemPlateHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xæ¿ +item.itemPlateDoubleHastelloyX.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-Xæ¿ +item.itemBoltHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X螺栓 +item.itemRodHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xæ† +item.itemRodLongHastelloyX.name=长哈斯特洛ä¾åˆé‡‘-Xæ† +item.itemRingHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X环 +item.itemScrewHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xèžºä¸ +item.itemRotorHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xè½¬å­ +item.itemGearHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X齿轮 +item.itemIngotHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276é”­ +item.itemHotIngotHastelloyC276.name=热哈斯特洛ä¾åˆé‡‘-C276é”­ +item.itemDustHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276粉 +item.itemDustTinyHastelloyC276.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-C276粉 +item.itemDustSmallHastelloyC276.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-C276粉 +item.itemNuggetHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276ç²’ +item.itemPlateHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276æ¿ +item.itemPlateDoubleHastelloyC276.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-C276æ¿ +item.itemBoltHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276螺栓 +item.itemRodHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276æ† +item.itemRodLongHastelloyC276.name=长哈斯特洛ä¾åˆé‡‘-C276æ† +item.itemRingHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276环 +item.itemScrewHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276èžºä¸ +item.itemRotorHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276è½¬å­ +item.itemGearHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276齿轮 +item.itemIngotHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Né”­ +item.itemHotIngotHastelloyN.name=热哈斯特洛ä¾åˆé‡‘-Né”­ +item.itemDustHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N粉 +item.itemDustTinyHastelloyN.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-N粉 +item.itemDustSmallHastelloyN.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-N粉 +item.itemNuggetHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nç²’ +item.itemPlateHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Næ¿ +item.itemPlateDoubleHastelloyN.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-Næ¿ +item.itemBoltHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N螺栓 +item.itemRodHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Næ† +item.itemRodLongHastelloyN.name=长哈斯特洛ä¾åˆé‡‘-Næ† +item.itemRingHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N环 +item.itemScrewHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nèžºä¸ +item.itemRotorHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nè½¬å­ +item.itemGearHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N齿轮 +item.itemIngotIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020é”­ +item.itemDustIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020粉 +item.itemDustTinyIncoloy020.name=å°æ’®è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020粉 +item.itemDustSmallIncoloy020.name=å°å †è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020粉 +item.itemNuggetIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020ç²’ +item.itemPlateIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ¿ +item.itemPlateDoubleIncoloy020.name=åŒé‡è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ¿ +item.itemBoltIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020螺栓 +item.itemRodIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ† +item.itemRodLongIncoloy020.name=é•¿è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ† +item.itemRingIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020环 +item.itemScrewIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020èžºä¸ +item.itemRotorIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020è½¬å­ +item.itemGearIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020齿轮 +item.itemIngotIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSé”­ +item.itemDustIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS粉 +item.itemDustTinyIncoloyDS.name=å°æ’®è€çƒ­é“¬é“åˆé‡‘-DS粉 +item.itemDustSmallIncoloyDS.name=å°å †è€çƒ­é“¬é“åˆé‡‘-DS粉 +item.itemNuggetIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSç²’ +item.itemPlateIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSæ¿ +item.itemPlateDoubleIncoloyDS.name=åŒé‡è€çƒ­é“¬é“åˆé‡‘-DSæ¿ +item.itemBoltIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS螺栓 +item.itemRodIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSæ† +item.itemRodLongIncoloyDS.name=é•¿è€çƒ­é“¬é“åˆé‡‘-DSæ† +item.itemRingIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS环 +item.itemScrewIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSèžºä¸ +item.itemRotorIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSè½¬å­ +item.itemGearIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS齿轮 +item.itemIngotIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956é”­ +item.itemHotIngotIncoloyMA956.name=热è€çƒ­é“¬é“åˆé‡‘-MA956é”­ +item.itemDustIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956粉 +item.itemDustTinyIncoloyMA956.name=å°æ’®è€çƒ­é“¬é“åˆé‡‘-MA956粉 +item.itemDustSmallIncoloyMA956.name=å°å †è€çƒ­é“¬é“åˆé‡‘-MA956粉 +item.itemNuggetIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956ç²’ +item.itemPlateIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956æ¿ +item.itemPlateDoubleIncoloyMA956.name=åŒé‡è€çƒ­é“¬é“åˆé‡‘-MA956æ¿ +item.itemBoltIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956螺栓 +item.itemRodIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956æ† +item.itemRodLongIncoloyMA956.name=é•¿è€çƒ­é“¬é“åˆé‡‘-MA956æ† +item.itemRingIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956环 +item.itemScrewIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956èžºä¸ +item.itemRotorIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956è½¬å­ +item.itemGearIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956齿轮 +item.itemIngotGrisium.name=ç°é’›åˆé‡‘é”­ +item.itemHotIngotGrisium.name=热ç°é’›åˆé‡‘é”­ +item.itemDustGrisium.name=ç°é’›åˆé‡‘粉 +item.itemDustTinyGrisium.name=å°æ’®ç°é’›åˆé‡‘粉 +item.itemDustSmallGrisium.name=å°å †ç°é’›åˆé‡‘粉 +item.itemNuggetGrisium.name=ç°é’›åˆé‡‘ç²’ +item.itemPlateGrisium.name=ç°é’›åˆé‡‘æ¿ +item.itemPlateDoubleGrisium.name=åŒé‡ç°é’›åˆé‡‘æ¿ +item.itemBoltGrisium.name=ç°é’›åˆé‡‘螺栓 +item.itemRodGrisium.name=ç°é’›åˆé‡‘æ† +item.itemRodLongGrisium.name=é•¿ç°é’›åˆé‡‘æ† +item.itemRingGrisium.name=ç°é’›åˆé‡‘环 +item.itemScrewGrisium.name=ç°é’›åˆé‡‘èžºä¸ +item.itemRotorGrisium.name=ç°é’›åˆé‡‘è½¬å­ +item.itemGearGrisium.name=ç°é’›åˆé‡‘齿轮 +item.itemIngotHG1223.name=HG-1223é”­ +item.itemDustHG1223.name=HG-1223粉 +item.itemDustTinyHG1223.name=å°æ’®HG-1223粉 +item.itemDustSmallHG1223.name=å°å †HG-1223粉 +item.itemNuggetHG1223.name=HG-1223ç²’ +item.itemPlateHG1223.name=HG-1223æ¿ +item.itemPlateDoubleHG1223.name=åŒé‡HG-1223æ¿ +item.itemIngotTrinium.name=三元金属锭 +item.itemDustTrinium.name=三元金属粉 +item.itemDustTinyTrinium.name=å°æ’®ä¸‰å…ƒé‡‘属粉 +item.itemDustSmallTrinium.name=å°å †ä¸‰å…ƒé‡‘属粉 +item.itemNuggetTrinium.name=三元金属粒 +item.itemPlateTrinium.name=ä¸‰å…ƒé‡‘å±žæ¿ +item.itemPlateDoubleTrinium.name=åŒé‡ä¸‰å…ƒé‡‘å±žæ¿ +item.itemIngotRefinedTrinium.name=精制三元金属锭 +item.itemDustRefinedTrinium.name=精制三元金属粉 +item.itemDustTinyRefinedTrinium.name=å°æ’®ç²¾åˆ¶ä¸‰å…ƒé‡‘属粉 +item.itemDustSmallRefinedTrinium.name=å°å †ç²¾åˆ¶ä¸‰å…ƒé‡‘属粉 +item.itemNuggetRefinedTrinium.name=精制三元金属粒 +item.itemPlateRefinedTrinium.name=ç²¾åˆ¶ä¸‰å…ƒé‡‘å±žæ¿ +item.itemPlateDoubleRefinedTrinium.name=åŒé‡ç²¾åˆ¶ä¸‰å…ƒé‡‘å±žæ¿ +item.itemIngotTriniumTitaniumAlloy.name=三元钛åˆé‡‘é”­ +item.itemHotIngotTriniumTitaniumAlloy.name=热三元钛åˆé‡‘é”­ +item.itemDustTriniumTitaniumAlloy.name=三元钛åˆé‡‘粉 +item.itemDustTinyTriniumTitaniumAlloy.name=å°æ’®ä¸‰å…ƒé’›åˆé‡‘粉 +item.itemDustSmallTriniumTitaniumAlloy.name=å°å †ä¸‰å…ƒé’›åˆé‡‘粉 +item.itemNuggetTriniumTitaniumAlloy.name=三元钛åˆé‡‘ç²’ +item.itemPlateTriniumTitaniumAlloy.name=三元钛åˆé‡‘æ¿ +item.itemPlateDoubleTriniumTitaniumAlloy.name=åŒé‡ä¸‰å…ƒé’›åˆé‡‘æ¿ +item.itemBoltTriniumTitaniumAlloy.name=三元钛åˆé‡‘螺栓 +item.itemRodTriniumTitaniumAlloy.name=三元钛åˆé‡‘æ† +item.itemRodLongTriniumTitaniumAlloy.name=长三元钛åˆé‡‘æ† +item.itemRingTriniumTitaniumAlloy.name=三元钛åˆé‡‘环 +item.itemScrewTriniumTitaniumAlloy.name=三元钛åˆé‡‘èžºä¸ +item.itemRotorTriniumTitaniumAlloy.name=三元钛åˆé‡‘è½¬å­ +item.itemGearTriniumTitaniumAlloy.name=三元钛åˆé‡‘齿轮 +item.itemIngotTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘é”­ +item.itemDustTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘粉 +item.itemDustTinyTriniumNaquadahAlloy.name=å°æ’®ä¸‰å…ƒç¡…岩åˆé‡‘粉 +item.itemDustSmallTriniumNaquadahAlloy.name=å°å †ä¸‰å…ƒç¡…岩åˆé‡‘粉 +item.itemNuggetTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘ç²’ +item.itemPlateTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘æ¿ +item.itemPlateDoubleTriniumNaquadahAlloy.name=åŒé‡ä¸‰å…ƒç¡…岩åˆé‡‘æ¿ +item.itemIngotTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘é”­ +item.itemHotIngotTriniumNaquadahCarbonite.name=热碳化三元硅岩åˆé‡‘é”­ +item.itemDustTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘粉 +item.itemDustTinyTriniumNaquadahCarbonite.name=å°æ’®ç¢³åŒ–三元硅岩åˆé‡‘粉 +item.itemDustSmallTriniumNaquadahCarbonite.name=å°å †ç¢³åŒ–三元硅岩åˆé‡‘粉 +item.itemNuggetTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘ç²’ +item.itemPlateTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘æ¿ +item.itemPlateDoubleTriniumNaquadahCarbonite.name=åŒé‡ç¢³åŒ–三元硅岩åˆé‡‘æ¿ +item.itemBoltTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘螺栓 +item.itemRodTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘æ† +item.itemRodLongTriniumNaquadahCarbonite.name=长碳化三元硅岩åˆé‡‘æ† +item.itemRingTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘环 +item.itemScrewTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘èžºä¸ +item.itemRotorTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘è½¬å­ +item.itemGearTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘齿轮 +item.itemIngotQuantum.name=é‡å­åˆé‡‘é”­ +item.itemHotIngotQuantum.name=热é‡å­åˆé‡‘é”­ +item.itemDustQuantum.name=é‡å­åˆé‡‘粉 +item.itemDustTinyQuantum.name=å°æ’®é‡å­åˆé‡‘粉 +item.itemDustSmallQuantum.name=å°å †é‡å­åˆé‡‘粉 +item.itemNuggetQuantum.name=é‡å­åˆé‡‘ç²’ +item.itemPlateQuantum.name=é‡å­åˆé‡‘æ¿ +item.itemPlateDoubleQuantum.name=åŒé‡é‡å­åˆé‡‘æ¿ +item.itemBoltQuantum.name=é‡å­åˆé‡‘螺栓 +item.itemRodQuantum.name=é‡å­åˆé‡‘æ† +item.itemRodLongQuantum.name=é•¿é‡å­åˆé‡‘æ† +item.itemRingQuantum.name=é‡å­åˆé‡‘环 +item.itemScrewQuantum.name=é‡å­åˆé‡‘èžºä¸ +item.itemRotorQuantum.name=é‡å­åˆé‡‘è½¬å­ +item.itemGearQuantum.name=é‡å­åˆé‡‘齿轮 +item.itemDustFluorite.name=氟石粉 +item.itemDustTinyFluorite.name=å°æ’®æ°ŸçŸ³ç²‰ +item.itemDustSmallFluorite.name=å°å †æ°ŸçŸ³ç²‰ +item.crushedFluorite.name=粉碎的氟石矿石 +item.crushedCentrifugedFluorite.name=离心氟石矿石 +item.crushedPurifiedFluorite.name=洗净的氟石矿石 +item.dustImpureFluorite.name=å«æ‚氟石粉 +item.dustPureFluorite.name=æ´å‡€æ°ŸçŸ³ç²‰ +item.itemDustCrocoite.name=赤铅矿粉 +item.itemDustTinyCrocoite.name=å°æ’®èµ¤é“…矿粉 +item.itemDustSmallCrocoite.name=å°å †èµ¤é“…矿粉 +item.crushedCrocoite.name=粉碎的赤铅矿矿石 +item.crushedCentrifugedCrocoite.name=离心赤铅矿矿石 +item.crushedPurifiedCrocoite.name=洗净的赤铅矿矿石 +item.dustImpureCrocoite.name=å«æ‚赤铅矿粉 +item.dustPureCrocoite.name=æ´å‡€èµ¤é“…矿粉 +item.itemDustGeikielite.name=é•é’›çŸ¿ç²‰ +item.itemDustTinyGeikielite.name=å°æ’®é•é’›çŸ¿ç²‰ +item.itemDustSmallGeikielite.name=å°å †é•é’›çŸ¿ç²‰ +item.crushedGeikielite.name=粉碎的é•é’›çŸ¿çŸ¿çŸ³ +item.crushedCentrifugedGeikielite.name=离心é•é’›çŸ¿çŸ¿çŸ³ +item.crushedPurifiedGeikielite.name=洗净的é•é’›çŸ¿çŸ¿çŸ³ +item.dustImpureGeikielite.name=å«æ‚é•é’›çŸ¿ç²‰ +item.dustPureGeikielite.name=æ´å‡€é•é’›çŸ¿ç²‰ +item.itemDustNichromite.name=é•é“¬çŸ¿ç²‰ +item.itemDustTinyNichromite.name=å°æ’®é•é“¬çŸ¿ç²‰ +item.itemDustSmallNichromite.name=å°å †é•é“¬çŸ¿ç²‰ +item.crushedNichromite.name=粉碎的é•é“¬çŸ¿çŸ¿çŸ³ +item.crushedCentrifugedNichromite.name=离心é•é“¬çŸ¿çŸ¿çŸ³ +item.crushedPurifiedNichromite.name=洗净的é•é“¬çŸ¿çŸ¿çŸ³ +item.dustImpureNichromite.name=å«æ‚é•é“¬çŸ¿ç²‰ +item.dustPureNichromite.name=æ´å‡€é•é“¬çŸ¿ç²‰ +item.itemDustTitanite.name=æ¦çŸ³ç²‰ +item.itemDustTinyTitanite.name=å°æ’®æ¦çŸ³ç²‰ +item.itemDustSmallTitanite.name=å°å †æ¦çŸ³ç²‰ +item.crushedTitanite.name=粉碎的æ¦çŸ³çŸ¿çŸ³ +item.crushedCentrifugedTitanite.name=离心æ¦çŸ³çŸ¿çŸ³ +item.crushedPurifiedTitanite.name=洗净的æ¦çŸ³çŸ¿çŸ³ +item.dustImpureTitanite.name=å«æ‚æ¦çŸ³ç²‰ +item.dustPureTitanite.name=æ´å‡€æ¦çŸ³ç²‰ +item.itemDustZimbabweite.name=钛铌铅钠石粉 +item.itemDustTinyZimbabweite.name=å°æ’®é’›é“Œé“…钠石粉 +item.itemDustSmallZimbabweite.name=å°å †é’›é“Œé“…钠石粉 +item.crushedZimbabweite.name=粉碎的钛铌铅钠石矿石 +item.crushedCentrifugedZimbabweite.name=离心钛铌铅钠石矿石 +item.crushedPurifiedZimbabweite.name=洗净的钛铌铅钠石矿石 +item.dustImpureZimbabweite.name=å«æ‚钛铌铅钠石粉 +item.dustPureZimbabweite.name=æ´å‡€é’›é“Œé“…钠石粉 +item.itemDustZirconolite.name=钛锆é’矿粉 +item.itemDustTinyZirconolite.name=å°æ’®é’›é”†é’矿粉 +item.itemDustSmallZirconolite.name=å°å †é’›é”†é’矿粉 +item.crushedZirconolite.name=粉碎的钛锆é’矿矿石 +item.crushedCentrifugedZirconolite.name=离心钛锆é’矿矿石 +item.crushedPurifiedZirconolite.name=洗净的钛锆é’矿矿石 +item.dustImpureZirconolite.name=å«æ‚钛锆é’矿粉 +item.dustPureZirconolite.name=æ´å‡€é’›é”†é’矿粉 +item.itemDustGadoliniteCe.name=ç¡…é“钇矿(Ce)粉 +item.itemDustTinyGadoliniteCe.name=å°æ’®ç¡…é“钇矿(Ce)粉 +item.itemDustSmallGadoliniteCe.name=å°å †ç¡…é“钇矿(Ce)粉 +item.crushedGadoliniteCe.name=粉碎的硅é“钇矿(Ce)矿石 +item.crushedCentrifugedGadoliniteCe.name=离心硅é“钇矿(Ce)矿石 +item.crushedPurifiedGadoliniteCe.name=洗净的硅é“钇矿(Ce)矿石 +item.dustImpureGadoliniteCe.name=å«æ‚ç¡…é“钇矿(Ce)粉 +item.dustPureGadoliniteCe.name=æ´å‡€ç¡…é“钇矿(Ce)粉 +item.itemDustGadoliniteY.name=ç¡…é“钇矿(Y)粉 +item.itemDustTinyGadoliniteY.name=å°æ’®ç¡…é“钇矿(Y)粉 +item.itemDustSmallGadoliniteY.name=å°å †ç¡…é“钇矿(Y)粉 +item.crushedGadoliniteY.name=粉碎的硅é“钇矿(Y)矿石 +item.crushedCentrifugedGadoliniteY.name=离心硅é“钇矿(Y)矿石 +item.crushedPurifiedGadoliniteY.name=洗净的硅é“钇矿(Y)矿石 +item.dustImpureGadoliniteY.name=å«æ‚ç¡…é“钇矿(Y)粉 +item.dustPureGadoliniteY.name=æ´å‡€ç¡…é“钇矿(Y)粉 +item.itemDustLepersonnite.name=绿泥石粉 +item.itemDustTinyLepersonnite.name=å°æ’®ç»¿æ³¥çŸ³ç²‰ +item.itemDustSmallLepersonnite.name=å°å †ç»¿æ³¥çŸ³ç²‰ +item.crushedLepersonnite.name=粉碎的绿泥石矿石 +item.crushedCentrifugedLepersonnite.name=离心绿泥石矿石 +item.crushedPurifiedLepersonnite.name=洗净的绿泥石矿石 +item.dustImpureLepersonnite.name=å«æ‚绿泥石粉 +item.dustPureLepersonnite.name=æ´å‡€ç»¿æ³¥çŸ³ç²‰ +item.itemDustSamarskiteY.name=铌钇矿(Y)粉 +item.itemDustTinySamarskiteY.name=å°æ’®é“Œé’‡çŸ¿(Y)粉 +item.itemDustSmallSamarskiteY.name=å°å †é“Œé’‡çŸ¿(Y)粉 +item.crushedSamarskiteY.name=粉碎的铌钇矿(Y)矿石 +item.crushedCentrifugedSamarskiteY.name=离心铌钇矿(Y)矿石 +item.crushedPurifiedSamarskiteY.name=洗净的铌钇矿(Y)矿石 +item.dustImpureSamarskiteY.name=å«æ‚铌钇矿(Y)粉 +item.dustPureSamarskiteY.name=æ´å‡€é“Œé’‡çŸ¿(Y)粉 +item.itemDustSamarskiteYb.name=铌钇矿(Yb)粉 +item.itemDustTinySamarskiteYb.name=å°æ’®é“Œé’‡çŸ¿(Yb)粉 +item.itemDustSmallSamarskiteYb.name=å°å †é“Œé’‡çŸ¿(Yb)粉 +item.crushedSamarskiteYb.name=粉碎的铌钇矿(Yb)矿石 +item.crushedCentrifugedSamarskiteYb.name=离心铌钇矿(Yb)矿石 +item.crushedPurifiedSamarskiteYb.name=洗净的铌钇矿(Yb)矿石 +item.dustImpureSamarskiteYb.name=å«æ‚铌钇矿(Yb)粉 +item.dustPureSamarskiteYb.name=æ´å‡€é“Œé’‡çŸ¿(Yb)粉 +item.itemDustXenotime.name=磷钇矿粉 +item.itemDustTinyXenotime.name=å°æ’®ç£·é’‡çŸ¿ç²‰ +item.itemDustSmallXenotime.name=å°å †ç£·é’‡çŸ¿ç²‰ +item.crushedXenotime.name=粉碎的磷钇矿矿石 +item.crushedCentrifugedXenotime.name=离心磷钇矿矿石 +item.crushedPurifiedXenotime.name=洗净的磷钇矿矿石 +item.dustImpureXenotime.name=å«æ‚磷钇矿粉 +item.dustPureXenotime.name=æ´å‡€ç£·é’‡çŸ¿ç²‰ +item.itemDustYttriaite.name=钇矿粉 +item.itemDustTinyYttriaite.name=å°æ’®é’‡çŸ¿ç²‰ +item.itemDustSmallYttriaite.name=å°å †é’‡çŸ¿ç²‰ +item.crushedYttriaite.name=粉碎的钇矿矿石 +item.crushedCentrifugedYttriaite.name=离心钇矿矿石 +item.crushedPurifiedYttriaite.name=洗净的钇矿矿石 +item.dustImpureYttriaite.name=å«æ‚钇矿粉 +item.dustPureYttriaite.name=æ´å‡€é’‡çŸ¿ç²‰ +item.itemDustYttrialite.name=ç¡…é’钇矿粉 +item.itemDustTinyYttrialite.name=å°æ’®ç¡…é’钇矿粉 +item.itemDustSmallYttrialite.name=å°å †ç¡…é’钇矿粉 +item.crushedYttrialite.name=粉碎的硅é’钇矿矿石 +item.crushedCentrifugedYttrialite.name=离心硅é’钇矿矿石 +item.crushedPurifiedYttrialite.name=洗净的硅é’钇矿矿石 +item.dustImpureYttrialite.name=å«æ‚ç¡…é’钇矿粉 +item.dustPureYttrialite.name=æ´å‡€ç¡…é’钇矿粉 +item.itemDustYttrocerite.name=铈钇矿粉 +item.itemDustTinyYttrocerite.name=å°æ’®é“ˆé’‡çŸ¿ç²‰ +item.itemDustSmallYttrocerite.name=å°å †é“ˆé’‡çŸ¿ç²‰ +item.crushedYttrocerite.name=粉碎的铈钇矿矿石 +item.crushedCentrifugedYttrocerite.name=离心铈钇矿矿石 +item.crushedPurifiedYttrocerite.name=洗净的铈钇矿矿石 +item.dustImpureYttrocerite.name=å«æ‚铈钇矿粉 +item.dustPureYttrocerite.name=æ´å‡€é“ˆé’‡çŸ¿ç²‰ +item.itemDustZircon.name=锆石粉 +item.itemDustTinyZircon.name=å°æ’®é”†çŸ³ç²‰ +item.itemDustSmallZircon.name=å°å †é”†çŸ³ç²‰ +item.crushedZircon.name=粉碎的锆石矿石 +item.crushedCentrifugedZircon.name=离心锆石矿石 +item.crushedPurifiedZircon.name=洗净的锆石矿石 +item.dustImpureZircon.name=å«æ‚锆石粉 +item.dustPureZircon.name=æ´å‡€é”†çŸ³ç²‰ +item.itemDustPolycrase.name=锗铀钇矿粉 +item.itemDustTinyPolycrase.name=å°æ’®é”—铀钇矿粉 +item.itemDustSmallPolycrase.name=å°å †é”—铀钇矿粉 +item.crushedPolycrase.name=粉碎的锗铀钇矿矿石 +item.crushedCentrifugedPolycrase.name=离心锗铀钇矿矿石 +item.crushedPurifiedPolycrase.name=洗净的锗铀钇矿矿石 +item.dustImpurePolycrase.name=å«æ‚锗铀钇矿粉 +item.dustPurePolycrase.name=æ´å‡€é”—铀钇矿粉 +item.itemDustZircophyllite.name=锆星å¶çŸ³ç²‰ +item.itemDustTinyZircophyllite.name=å°æ’®é”†æ˜Ÿå¶çŸ³ç²‰ +item.itemDustSmallZircophyllite.name=å°å †é”†æ˜Ÿå¶çŸ³ç²‰ +item.crushedZircophyllite.name=粉碎的锆星å¶çŸ³çŸ¿çŸ³ +item.crushedCentrifugedZircophyllite.name=离心锆星å¶çŸ³çŸ¿çŸ³ +item.crushedPurifiedZircophyllite.name=洗净的锆星å¶çŸ³çŸ¿çŸ³ +item.dustImpureZircophyllite.name=å«æ‚锆星å¶çŸ³ç²‰ +item.dustPureZircophyllite.name=æ´å‡€é”†æ˜Ÿå¶çŸ³ç²‰ +item.itemDustZirkelite.name=锆英石粉 +item.itemDustTinyZirkelite.name=å°æ’®é”†è‹±çŸ³ç²‰ +item.itemDustSmallZirkelite.name=å°å †é”†è‹±çŸ³ç²‰ +item.crushedZirkelite.name=粉碎的锆英石矿石 +item.crushedCentrifugedZirkelite.name=离心锆英石矿石 +item.crushedPurifiedZirkelite.name=洗净的锆英石矿石 +item.dustImpureZirkelite.name=å«æ‚锆英石粉 +item.dustPureZirkelite.name=æ´å‡€é”†è‹±çŸ³ç²‰ +item.itemDustLanthaniteLa.name=镧石(La)粉 +item.itemDustTinyLanthaniteLa.name=å°æ’®é•§çŸ³(La)粉 +item.itemDustSmallLanthaniteLa.name=å°å †é•§çŸ³(La)粉 +item.crushedLanthaniteLa.name=粉碎的镧石(La)矿石 +item.crushedCentrifugedLanthaniteLa.name=离心镧石(La)矿石 +item.crushedPurifiedLanthaniteLa.name=洗净的镧石(La)矿石 +item.dustImpureLanthaniteLa.name=å«æ‚镧石(La)粉 +item.dustPureLanthaniteLa.name=æ´å‡€é•§çŸ³(La)粉 +item.itemDustLanthaniteCe.name=镧石(Ce)粉 +item.itemDustTinyLanthaniteCe.name=å°æ’®é•§çŸ³(Ce)粉 +item.itemDustSmallLanthaniteCe.name=å°å †é•§çŸ³(Ce)粉 +item.crushedLanthaniteCe.name=粉碎的镧石(Ce)矿石 +item.crushedCentrifugedLanthaniteCe.name=离心镧石(Ce)矿石 +item.crushedPurifiedLanthaniteCe.name=洗净的镧石(Ce)矿石 +item.dustImpureLanthaniteCe.name=å«æ‚镧石(Ce)粉 +item.dustPureLanthaniteCe.name=æ´å‡€é•§çŸ³(Ce)粉 +item.itemDustLanthaniteNd.name=镧石(Nd)粉 +item.itemDustTinyLanthaniteNd.name=å°æ’®é•§çŸ³(Nd)粉 +item.itemDustSmallLanthaniteNd.name=å°å †é•§çŸ³(Nd)粉 +item.crushedLanthaniteNd.name=粉碎的镧石(Nd)矿石 +item.crushedCentrifugedLanthaniteNd.name=离心镧石(Nd)矿石 +item.crushedPurifiedLanthaniteNd.name=洗净的镧石(Nd)矿石 +item.dustImpureLanthaniteNd.name=å«æ‚镧石(Nd)粉 +item.dustPureLanthaniteNd.name=æ´å‡€é•§çŸ³(Nd)粉 +item.itemDustAgarditeY.name=è±é“矿(Y)粉 +item.itemDustTinyAgarditeY.name=å°æ’®è±é“矿(Y)粉 +item.itemDustSmallAgarditeY.name=å°å †è±é“矿(Y)粉 +item.crushedAgarditeY.name=粉碎的è±é“矿(Y)矿石 +item.crushedCentrifugedAgarditeY.name=离心è±é“矿(Y)矿石 +item.crushedPurifiedAgarditeY.name=洗净的è±é“矿(Y)矿石 +item.dustImpureAgarditeY.name=å«æ‚è±é“矿(Y)粉 +item.dustPureAgarditeY.name=æ´å‡€è±é“矿(Y)粉 +item.itemDustAgarditeCd.name=è±é“矿(Cd)粉 +item.itemDustTinyAgarditeCd.name=å°æ’®è±é“矿(Cd)粉 +item.itemDustSmallAgarditeCd.name=å°å †è±é“矿(Cd)粉 +item.crushedAgarditeCd.name=粉碎的è±é“矿(Cd)矿石 +item.crushedCentrifugedAgarditeCd.name=离心è±é“矿(Cd)矿石 +item.crushedPurifiedAgarditeCd.name=洗净的è±é“矿(Cd)矿石 +item.dustImpureAgarditeCd.name=å«æ‚è±é“矿(Cd)粉 +item.dustPureAgarditeCd.name=æ´å‡€è±é“矿(Cd)粉 +item.itemDustAgarditeLa.name=è±é“矿(La)粉 +item.itemDustTinyAgarditeLa.name=å°æ’®è±é“矿(La)粉 +item.itemDustSmallAgarditeLa.name=å°å †è±é“矿(La)粉 +item.crushedAgarditeLa.name=粉碎的è±é“矿(La)矿石 +item.crushedCentrifugedAgarditeLa.name=离心è±é“矿(La)矿石 +item.crushedPurifiedAgarditeLa.name=洗净的è±é“矿(La)矿石 +item.dustImpureAgarditeLa.name=å«æ‚è±é“矿(La)粉 +item.dustPureAgarditeLa.name=æ´å‡€è±é“矿(La)粉 +item.itemDustAgarditeNd.name=è±é“矿(Nd)粉 +item.itemDustTinyAgarditeNd.name=å°æ’®è±é“矿(Nd)粉 +item.itemDustSmallAgarditeNd.name=å°å †è±é“矿(Nd)粉 +item.crushedAgarditeNd.name=粉碎的è±é“矿(Nd)矿石 +item.crushedCentrifugedAgarditeNd.name=离心è±é“矿(Nd)矿石 +item.crushedPurifiedAgarditeNd.name=洗净的è±é“矿(Nd)矿石 +item.dustImpureAgarditeNd.name=å«æ‚è±é“矿(Nd)粉 +item.dustPureAgarditeNd.name=æ´å‡€è±é“矿(Nd)粉 +item.itemDustHibonite.name=黑é“钙石粉 +item.itemDustTinyHibonite.name=å°æ’®é»‘é“钙石粉 +item.itemDustSmallHibonite.name=å°å †é»‘é“钙石粉 +item.crushedHibonite.name=粉碎的黑é“钙石矿石 +item.crushedCentrifugedHibonite.name=离心黑é“钙石矿石 +item.crushedPurifiedHibonite.name=洗净的黑é“钙石矿石 +item.dustImpureHibonite.name=å«æ‚黑é“钙石粉 +item.dustPureHibonite.name=æ´å‡€é»‘é“钙石粉 +item.itemDustCerite.name=铈硅石粉 +item.itemDustTinyCerite.name=å°æ’®é“ˆç¡…石粉 +item.itemDustSmallCerite.name=å°å †é“ˆç¡…石粉 +item.crushedCerite.name=粉碎的铈硅石矿石 +item.crushedCentrifugedCerite.name=离心铈硅石矿石 +item.crushedPurifiedCerite.name=洗净的铈硅石矿石 +item.dustImpureCerite.name=å«æ‚铈硅石粉 +item.dustPureCerite.name=æ´å‡€é“ˆç¡…石粉 +item.itemDustFluorcaphite.name=氟碳铈矿粉 +item.itemDustTinyFluorcaphite.name=å°æ’®æ°Ÿç¢³é“ˆçŸ¿ç²‰ +item.itemDustSmallFluorcaphite.name=å°å †æ°Ÿç¢³é“ˆçŸ¿ç²‰ +item.crushedFluorcaphite.name=粉碎的氟碳铈矿矿石 +item.crushedCentrifugedFluorcaphite.name=离心氟碳铈矿矿石 +item.crushedPurifiedFluorcaphite.name=洗净的氟碳铈矿矿石 +item.dustImpureFluorcaphite.name=å«æ‚氟碳铈矿粉 +item.dustPureFluorcaphite.name=æ´å‡€æ°Ÿç¢³é“ˆçŸ¿ç²‰ +item.itemDustFlorencite.name=磷é“铈矿粉 +item.itemDustTinyFlorencite.name=å°æ’®ç£·é“铈矿粉 +item.itemDustSmallFlorencite.name=å°å †ç£·é“铈矿粉 +item.crushedFlorencite.name=粉碎的磷é“铈矿矿石 +item.crushedCentrifugedFlorencite.name=离心磷é“铈矿矿石 +item.crushedPurifiedFlorencite.name=洗净的磷é“铈矿矿石 +item.dustImpureFlorencite.name=å«æ‚磷é“铈矿粉 +item.dustPureFlorencite.name=æ´å‡€ç£·é“铈矿粉 +item.itemDustCryolite.name=冰晶石粉 +item.itemDustTinyCryolite.name=å°æ’®å†°æ™¶çŸ³ç²‰ +item.itemDustSmallCryolite.name=å°å †å†°æ™¶çŸ³ç²‰ +item.crushedCryolite.name=粉碎的冰晶石矿石 +item.crushedCentrifugedCryolite.name=离心冰晶石矿石 +item.crushedPurifiedCryolite.name=洗净的冰晶石矿石 +item.dustImpureCryolite.name=å«æ‚冰晶石粉 +item.dustPureCryolite.name=æ´å‡€å†°æ™¶çŸ³ç²‰ +item.itemDustTinyYellorium.name=å°æ’®é»„铀矿粉 +item.itemDustSmallYellorium.name=å°å †é»„铀矿粉 +item.crushedYellorium.name=粉碎的黄铀矿矿石 +item.crushedCentrifugedYellorium.name=离心黄铀矿矿石 +item.crushedPurifiedYellorium.name=洗净的黄铀矿矿石 +item.dustImpureYellorium.name=å«æ‚黄铀矿粉 +item.dustPureYellorium.name=æ´å‡€é»„铀矿粉 + +//Shards +item.itemDrained.name=枯竭碎片 +item.itemDustInfusedAir.name=风之魔晶粉 +item.itemDustInfusedFire.name=ç«ä¹‹é­”晶粉 +item.itemDustInfusedEarth.name=地之魔晶粉 +item.itemDustInfusedWater.name=水之魔晶粉 + + +//Misc Material Items +item.itemDustLithiumCarbonate.name=碳酸锂粉 +item.itemDustSmallLithiumCarbonate.name=å°å †ç¢³é…¸é”‚粉 +item.itemDustTinyLithiumCarbonate.name=å°æ’®ç¢³é…¸é”‚粉 +item.itemDustLithiumPeroxide.name=过氧化锂粉 +item.itemDustSmallLithiumPeroxide.name=å°å †è¿‡æ°§åŒ–锂粉 +item.itemDustTinyLithiumPeroxide.name=å°æ’®è¿‡æ°§åŒ–锂粉 +item.itemDustLithiumHydroxide.name=氢氧化锂粉 +item.itemDustSmallLithiumHydroxide.name=å°å †æ°¢æ°§åŒ–锂粉 +item.itemDustTinyLithiumHydroxide.name=å°æ’®æ°¢æ°§åŒ–锂粉 +item.itemDustCalciumHydroxide.name=氢氧化钙粉 +item.itemDustSmallCalciumHydroxide.name=å°å †æ°¢æ°§åŒ–钙粉 +item.itemDustTinyCalciumHydroxide.name=å°æ’®æ°¢æ°§åŒ–钙粉 +item.itemDustCalciumCarbonate.name=碳酸钙粉 +item.itemDustSmallCalciumCarbonate.name=å°å †ç¢³é…¸é’™ç²‰ +item.itemDustTinyCalciumCarbonate.name=å°æ’®ç¢³é…¸é’™ç²‰ +item.itemDustGypsum.name=硫酸钙(石è†)粉 +item.itemDustSmallGypsum.name=å°å †ç¡«é…¸é’™(石è†)粉 +item.itemDustTinyGypsum.name=å°æ’®ç¡«é…¸é’™(石è†)粉 +item.itemDustLi2CO3CaOH2.name=碳酸锂+氢氧化钙å¤åˆç‰©ç²‰ +item.itemDustSmallLi2CO3CaOH2.name=å°å †ç¢³é…¸é”‚+氢氧化钙å¤åˆç‰©ç²‰ +item.itemDustTinyLi2CO3CaOH2.name=å°æ’®ç¢³é…¸é”‚+氢氧化钙å¤åˆç‰©ç²‰ +item.itemDustLi2BeF4.name=Li2BeF4 燃料å¤åˆç‰©ç²‰ +item.itemDustSmallLi2BeF4.name=å°å †Li2BeF4燃料å¤åˆç‰©ç²‰ +item.itemDustTinyLi2BeF4.name=å°æ’®Li2BeF4燃料å¤åˆç‰©ç²‰ +item.Li2BeF4.name=Li2BeF4å•å…ƒ +item.itemCircuitLFTR.name=§a§a控制电路 +item.itemZirconiumPellet.name=锆颗粒[氯化锆] +item.itemDustZrCl4.name=氯化锆粉 +item.itemDustSmallZrCl4.name=å°å †æ°¯åŒ–锆粉 +item.itemDustTinyZrCl4.name=å°æ’®æ°¯åŒ–锆粉 +item.itemDustCookedZrCl4.name=焙烧过的氯化锆粉 +item.itemDustSmallCookedZrCl4.name=å°å †ç„™çƒ§è¿‡çš„氯化锆粉 +item.itemDustTinyCookedZrCl4.name=å°æ’®ç„™çƒ§è¿‡çš„氯化锆粉 +item.itemDustUN18Fertiliser.name=æµä½“肥料UN-18粉 +item.itemDustSmallUN18Fertiliser.name=å°å †æµä½“肥料UN-18粉 +item.itemDustTinyUN18Fertiliser.name=å°æ’®æµä½“肥料un-18粉 +item.itemDustUN32Fertiliser.name=æµä½“肥料UN-32粉 +item.itemDustSmallUN32Fertiliser.name=å°å †æµä½“肥料UN-32粉 +item.itemDustTinyUN32Fertiliser.name=å°æ’®æµä½“肥料UN-32粉 +item.itemNuggetPlutonium239.name=é’š 239ç²’ +item.itemCellPlutonium239.name=é’š 239å•å…ƒ +item.itemIngotPlutonium239.name=é’š 239é”­ +item.itemPlatePlutonium239.name=é’š 239æ¿ +item.itemPlateDoublePlutonium239.name=åŒé‡é’š 239æ¿ +item.itemDustPlutonium239.name=é’š 239粉 +item.itemDustSmallPlutonium239.name=å°å †é’š 239粉 +item.itemDustTinyPlutonium239.name=å°æ’®é’š 239粉 + + +//Multitools +item.AluminiumMultipick.name=é“å¤åˆç¨¿ +item.AluminiumMultispade.name=é“å¤åˆé“² +item.BerylliumMultispade.name=é“å¤åˆé“² +item.BismuthMultispade.name=é“‹å¤åˆé“² +item.CarbonMultispade.name=碳å¤åˆé“² +item.ChromeMultipick.name=铬å¤åˆç¨¿ +item.ChromeMultispade.name=铬å¤åˆé“² +item.CobaltMultipick.name=é’´å¤åˆç¨¿ +item.CobaltMultispade.name=é’´å¤åˆé“² +item.GoldMultispade.name=金å¤åˆé“² +item.IridiumMultipick.name=铱å¤åˆç¨¿ +item.IridiumMultispade.name=铱å¤åˆé“² +item.IronMultipick.name=é“å¤åˆç¨¿ +item.IronMultispade.name=é“å¤åˆé“² +item.LeadMultispade.name=é“…å¤åˆé“² +item.ManganeseMultipick.name=é”°å¤åˆç¨¿ +item.ManganeseMultispade.name=é”°å¤åˆé“² +item.MolybdenumMultipick.name=é’¼å¤åˆç¨¿ +item.MolybdenumMultispade.name=é’¼å¤åˆé“² +item.NeodymiumMultipick.name=é’•å¤åˆé• +item.NeodymiumMultispade.name=é’•å¤åˆé“² +item.NeutroniumMultipick.name=中å­ç´ å¤åˆé• +item.NeutroniumMultispade.name=中å­ç´ å¤åˆé“² +item.NickelMultispade.name=é•å¤åˆé“² +item.OsmiumMultipick.name=锇å¤åˆé• +item.OsmiumMultispade.name=锇å¤åˆé“² +item.PalladiumMultipick.name=é’¯å¤åˆé• +item.PalladiumMultispade.name=é’¯å¤åˆé“² +item.PlatinumMultispade.name=é“‚å¤åˆé“² +item.Plutonium241Multipick.name=é’š 241å¤åˆé• +item.Plutonium241Multispade.name=é’š 241å¤åˆé“² +item.SilverMultispade.name=银å¤åˆé“² +item.ThoriumMultipick.name=é’å¤åˆé• +item.ThoriumMultispade.name=é’å¤åˆé“² +item.TitaniumMultipick.name=é’›å¤åˆé• +item.TitaniumMultispade.name=é’›å¤åˆé“² +item.TungstenMultipick.name=é’¨å¤åˆé• +item.TungstenMultispade.name=é’¨å¤åˆé“² +item.Uranium235Multipick.name=é“€ 235å¤åˆé• +item.Uranium235Multispade.name=é“€ 235å¤åˆé“² +item.DarkSteelMultipick.name=玄钢å¤åˆé• +item.DarkSteelMultispade.name=玄钢å¤åˆé“² +item.DuraniumMultipick.name=é“¿é“€å¤åˆé• +item.DuraniumMultispade.name=é“¿é“€å¤åˆé“² +item.InfusedGoldMultispade.name=注魔金å¤åˆé“² +item.NaquadahMultipick.name=硅岩å¤åˆé• +item.NaquadahMultispade.name=硅岩å¤åˆé“² +item.NaquadahAlloyMultipick.name=硅岩åˆé‡‘å¤åˆé• +item.NaquadahAlloyMultispade.name=硅岩åˆé‡‘å¤åˆé“² +item.NaquadriaMultipick.name=超能硅岩å¤åˆé• +item.NaquadriaMultispade.name=超能硅岩å¤åˆé“² +item.TritaniumMultipick.name=三钛å¤åˆé• +item.TritaniumMultispade.name=三钛å¤åˆé“² +item.OsmiridiumMultipick.name=铱锇åˆé‡‘å¤åˆé• +item.OsmiridiumMultispade.name=铱锇åˆé‡‘å¤åˆé“² +item.BrassMultispade.name=黄铜å¤åˆé“² +item.BronzeMultipick.name=é’é“œå¤åˆé• +item.BronzeMultispade.name=é’é“œå¤åˆé“² +item.CupronickelMultispade.name=白铜å¤åˆé“² +item.ElectrumMultispade.name=ç¥ç€é‡‘å¤åˆé“² +item.InvarMultipick.name=æ®·é’¢å¤åˆé• +item.InvarMultispade.name=æ®·é’¢å¤åˆé“² +item.KanthalMultispade.name=åŽå¡”å°”åˆé‡‘å¤åˆé“² +item.MagnaliumMultipick.name=é•é“åˆé‡‘å¤åˆé• +item.MagnaliumMultispade.name=é•é“åˆé‡‘å¤åˆé“² +item.NichromeMultispade.name=é•é“¬åˆé‡‘å¤åˆé“² +item.PigIronMultipick.name=生é“å¤åˆé• +item.PigIronMultispade.name=生é“å¤åˆé“² +item.PolycaprolactamMultispade.name=èšå·±å†…酰胺å¤åˆé“² +item.PolytetrafluoroethyleneMultispade.name=èšå››æ°Ÿä¹™çƒ¯å¤åˆé“² +item.NickelZincFerriteMultispade.name=é•é”Œé“氧体å¤åˆé“² +item.PolyphenyleneSulfideMultispade.name=èšè‹¯ç¡«é†šå¤åˆé“² +item.StainlessSteelMultipick.name=ä¸é”ˆé’¢å¤åˆé• +item.StainlessSteelMultispade.name=ä¸é”ˆé’¢å¤åˆé“² +item.SteelMultipick.name=é’¢å¤åˆé• +item.SteelMultispade.name=é’¢å¤åˆé“² +item.TinAlloyMultispade.name=锡é“åˆé‡‘å¤åˆé“² +item.UltimetMultipick.name=哈æ°åˆé‡‘å¤åˆé• +item.UltimetMultispade.name=哈æ°åˆé‡‘å¤åˆé“² +item.WroughtIronMultipick.name=é”»é“å¤åˆé• +item.WroughtIronMultispade.name=é”»é“å¤åˆé“² +item.SterlingSilverMultipick.name=标准纯银å¤åˆé• +item.SterlingSilverMultispade.name=标准纯银å¤åˆé“² +item.RoseGoldMultipick.name=玫瑰金å¤åˆé• +item.RoseGoldMultispade.name=玫瑰金å¤åˆé“² +item.BlackBronzeMultipick.name=黑é’é“œå¤åˆé• +item.BlackBronzeMultispade.name=黑é’é“œå¤åˆé“² +item.BismuthBronzeMultipick.name=é“‹é’é“œå¤åˆé• +item.BismuthBronzeMultispade.name=é“‹é’é“œå¤åˆé“² +item.BlackSteelMultipick.name=黑钢å¤åˆé• +item.BlackSteelMultispade.name=黑钢å¤åˆé“² +item.RedSteelMultipick.name=红钢å¤åˆé• +item.RedSteelMultispade.name=红钢å¤åˆé“² +item.BlueSteelMultipick.name=è“é’¢å¤åˆé• +item.BlueSteelMultispade.name=è“é’¢å¤åˆé“² +item.DamascusSteelMultipick.name=大马士é©é’¢å¤åˆé• +item.DamascusSteelMultispade.name=大马士é©é’¢å¤åˆé“² +item.MithrilMultispade.name=秘银å¤åˆé“² +item.CobaltBrassMultipick.name=钴黄铜å¤åˆé• +item.CobaltBrassMultispade.name=钴黄铜å¤åˆé“² +item.ThaumiumMultipick.name=神秘锭å¤åˆé• +item.ThaumiumMultispade.name=神秘锭å¤åˆé“² +item.HSSGMultipick.name=高速钢-Gå¤åˆé• +item.HSSGMultispade.name=高速钢-Gå¤åˆé“² +item.HSSEMultipick.name=高速钢-Eå¤åˆé• +item.HSSEMultispade.name=高速钢-Eå¤åˆé“² +item.HSSSMultipick.name=高速钢-Så¤åˆé• +item.HSSSMultispade.name=高速钢-Så¤åˆé“² +item.HastelloyC276Multipick.name=哈斯特洛ä¾åˆé‡‘-C276å¤åˆé• +item.HastelloyC276Multispade.name=哈斯特洛ä¾åˆé‡‘-C276å¤åˆé“² +item.HastelloyNMultipick.name=哈斯特洛ä¾åˆé‡‘-Nå¤åˆé• +item.HastelloyNMultispade.name=哈斯特洛ä¾åˆé‡‘-Nå¤åˆé“² +item.HastelloyWMultipick.name=哈斯特洛ä¾åˆé‡‘-Wå¤åˆé• +item.HastelloyWMultispade.name=哈斯特洛ä¾åˆé‡‘-Wå¤åˆé“² +item.HastelloyXMultipick.name=哈斯特洛ä¾åˆé‡‘-Xå¤åˆé• +item.HastelloyXMultispade.name=哈斯特洛ä¾åˆé‡‘-Xå¤åˆé“² +item.Incoloy020Multipick.name=è€çƒ­é“¬é“åˆé‡‘-020å¤åˆé• +item.Incoloy020Multispade.name=è€çƒ­é“¬é“åˆé‡‘-020å¤åˆé“² +item.IncoloyDSMultipick.name=è€çƒ­é“¬é“åˆé‡‘-DSå¤åˆé• +item.IncoloyDSMultispade.name=è€çƒ­é“¬é“åˆé‡‘-DSå¤åˆé“² +item.IncoloyMA956Multipick.name=è€çƒ­é“¬é“åˆé‡‘-MA956å¤åˆé• +item.IncoloyMA956Multispade.name=è€çƒ­é“¬é“åˆé‡‘-MA956å¤åˆé“² +item.Inconel625Multipick.name=é•é“¬åŸºåˆé‡‘-625å¤åˆé• +item.Inconel625Multispade.name=é•é“¬åŸºåˆé‡‘-625å¤åˆé“² +item.Inconel690Multipick.name=é•é“¬åŸºåˆé‡‘-690å¤åˆé• +item.Inconel690Multispade.name=é•é“¬åŸºåˆé‡‘-690å¤åˆé“² +item.Inconel792Multipick.name=é•é“¬åŸºåˆé‡‘-792å¤åˆé• +item.Inconel792Multispade.name=é•é“¬åŸºåˆé‡‘-792å¤åˆé“² +item.GrisiumMultipick.name=ç°é’›åˆé‡‘å¤åˆé• +item.GrisiumMultispade.name=ç°é’›åˆé‡‘å¤åˆé“² +item.Tantalloy60Multipick.name=钽钨åˆé‡‘-60å¤åˆé• +item.Tantalloy60Multispade.name=钽钨åˆé‡‘-60å¤åˆé“² +item.Tantalloy61Multipick.name=钽钨åˆé‡‘-61å¤åˆé• +item.Tantalloy61Multispade.name=钽钨åˆé‡‘-61å¤åˆé“² +item.StaballoyMultipick.name=è´«é“€åˆé‡‘å¤åˆé• +item.StaballoyMultispade.name=è´«é“€åˆé‡‘å¤åˆé“² +item.QuantumMultipick.name=é‡å­åˆé‡‘å¤åˆé• +item.QuantumMultispade.name=é‡å­åˆé‡‘å¤åˆé“² +item.PotinMultipick.name=ç²—é’é“œåˆé‡‘å¤åˆé• +item.PotinMultispade.name=ç²—é’é“œåˆé‡‘å¤åˆé“² +item.TumbagaMultipick.name=铜金åˆé‡‘å¤åˆé• +item.TumbagaMultispade.name=铜金åˆé‡‘å¤åˆé“² +item.TaloniteMultipick.name=铬钴磷酸ç›åˆé‡‘å¤åˆé• +item.TaloniteMultispade.name=铬钴磷酸ç›åˆé‡‘å¤åˆé“² +item.StelliteMultipick.name=铬钴锰钛åˆé‡‘å¤åˆé• +item.StelliteMultispade.name=铬钴锰钛åˆé‡‘å¤åˆé“² +item.TungstenCarbideMultipick.name=碳化钨å¤åˆé• +item.TungstenCarbideMultispade.name=碳化钨å¤åˆé“² +item.TantalumCarbideMultipick.name=碳化钽å¤åˆé• +item.TantalumCarbideMultispade.name=碳化钽å¤åˆé“² + + +//Items that Don't fit into another category + +//Plates +item.itemPlateClay.name=ç²˜åœŸæ¿ +item.itemPlateDoubleClay.name=åŒé‡ç²˜åœŸæ¿ +item.itemPlateLithium.name=é”‚æ¿ +item.itemPlateDoubleEuropium.name=åŒé‡é“•æ¿ + +//Gears +item.itemSmallGearWroughtIron.name=å°åž‹é”»é“齿轮 + +//Misc +item.itemFoilUranium235.name=é“€235ç®” + +item.itemBoilerChassis_0.name=高级锅炉外壳[1级] +item.itemDehydratorCoilWire_0.name=缠绕导线 [EV] +item.itemDehydratorCoil_0.name=脱水线圈 [EV] +item.itemAirFilter_0.name=空气过滤器 +item.itemAirFilter_1.name=空气过滤器 +item.itemLavaFilter.name=岩浆过滤器 +item.itemGrindleTablet.name=Git +item.itemDragonJar.name=é¾™æ•èŽ·ä¹‹å£¶ +item.CoalGas.name=煤气å•å…ƒ +item.Ethylbenzene.name=乙苯å•å…ƒ +item.Anthracene.name=è’½å•å…ƒ +item.Toluene.name=甲苯å•å…ƒ +item.CoalTar.name=煤焦油å•å…ƒ +item.CoalTarOil.name=煤焦油å•å…ƒ +item.SulfuricCoalTarOil.name=硫酸煤焦油å•å…ƒ +item.Naphthalene.name=è˜å•å…ƒ +item.PhthalicAcid.name=邻苯二甲酸å•å…ƒ +item.itemDustPhthalicAnhydride.name=邻苯二甲酸é…粉 +item.itemDustSmallPhthalicAnhydride.name=å°å †é‚»è‹¯äºŒç”²é…¸é…粉 +item.itemDustTinyPhthalicAnhydride.name=å°æ’®é‚»è‹¯äºŒç”²é…¸é…粉 +item.2Ethylanthraquinone.name=2-乙基蒽醌å•å…ƒ +item.2Ethylanthrahydroquinone.name=2-乙基氢蒽醌å•å…ƒ +item.HydrogenPeroxide.name=过氧化氢å•å…ƒ +item.itemDustLithiumHydroperoxide.name=过氧化氢锂粉 +item.itemDustSmallLithiumHydroperoxide.name=å°å †è¿‡æ°§åŒ–氢锂粉 +item.itemDustTinyLithiumHydroperoxide.name=å°æ’®è¿‡æ°§åŒ–氢锂粉 +item.LithiumPeroxide.name=过氧化锂å•å…ƒ +item.itemPotionChilly.name=冰凉è¯æ°´ +item.itemKeyBig4000DC's.name=4000DC的大钥匙 +item.itemGemDull.name=沉闷å®çŸ³ +item.itemMushroomForest.name=æ£®æž—è˜‘è‡ +item.itemPlateVanadium.name=é’’é’¢æ¿ +item.thekeytothecity.name=通往城市的钥匙 +item.modularbauble.name=模å—åŒ–é¥°å“ +item.itemDustSoularium.name=魂金粉 +item.itemDustSmallSoularium.name=å°å †é­‚金粉 +item.itemDustTinySoularium.name=å°æ’®é­‚金粉 +item.itemDustRedstoneAlloy.name=红石åˆé‡‘粉 +item.itemDustSmallRedstoneAlloy.name=å°å †çº¢çŸ³åˆé‡‘粉 +item.itemDustTinyRedstoneAlloy.name=å°æ’®çº¢çŸ³åˆé‡‘粉 +item.itemDustElectricalSteel.name=ç£é’¢ç²‰ +item.itemDustSmallElectricalSteel.name=å°å †ç£é’¢ç²‰ +item.itemDustTinyElectricalSteel.name=å°æ’®ç£é’¢ç²‰ +item.itemDustPulsatingIron.name=脉冲é“粉 +item.itemDustSmallPulsatingIron.name=å°å †è„‰å†²é“粉 +item.itemDustTinyPulsatingIron.name=å°æ’®è„‰å†²é“粉 +item.itemDustEnergeticAlloy.name=充能åˆé‡‘粉 +item.itemDustSmallEnergeticAlloy.name=å°å †å……能åˆé‡‘粉 +item.itemDustTinyEnergeticAlloy.name=å°æ’®å……能åˆé‡‘粉 +item.itemDustVibrantAlloy.name=脉冲åˆé‡‘粉 +item.itemDustSmallVibrantAlloy.name=å°å †è„‰å†²åˆé‡‘粉 +item.itemDustTinyVibrantAlloy.name=å°æ’®è„‰å†²åˆé‡‘粉 +item.itemDustConductiveIron.name=导电é“粉 +item.itemDustSmallConductiveIron.name=å°å †å¯¼ç”µé“粉 +item.itemDustTinyConductiveIron.name=å°æ’®å¯¼ç”µé“粉 +item.itemPlateSoularium.name=é­‚é‡‘æ¿ +item.itemPlateRedstoneAlloy.name=红石åˆé‡‘æ¿ +item.itemPlateElectricalSteel.name=ç£é’¢æ¿ +item.itemPlatePhasedIron.name=脉冲é“æ¿ +item.itemPlateEnergeticAlloy.name=充能åˆé‡‘æ¿ +item.itemPlateVibrantAlloy.name=脉冲åˆé‡‘æ¿ +item.itemPlateConductiveIron.name=导电é“æ¿ +item.itemPlateBlutonium.name=è“é’šæ¿ +item.itemPlateCyanite.name=è“æ™¶çŸ³æ¿ +item.itemPlateLudicrite.name=çº¯é•¥æ¿ +item.itemPlateVoid.name=è™šç©ºæ¿ +item.itemPlateDimensionShard.name=ç»´åº¦ç¢Žç‰‡æ¿ +item.rfEUBattery.name=通用充电电池 +item.personalCloakingDevice.name=§9§9个人éšå½¢è£…置§7 +item.personalHealingDevice.name=§9§9个人纳米治疗加速器§r +item.SlowBuildingRing.name=§e§e缓建指环§7 +item.itemStaballoyPickaxe.name=隧é“挖掘者 +item.itemStaballoyAxe.name=æ ‘æž—ç ä¼è€… +item.itemSandstoneHammer.name=圆石粉碎者 +item.itemBufferCore1.name=能é‡æ ¸å¿ƒ [ULV] +item.itemBufferCore2.name=能é‡æ ¸å¿ƒ [LV] +item.itemBufferCore3.name=能é‡æ ¸å¿ƒ [MV] +item.itemBufferCore4.name=能é‡æ ¸å¿ƒ [HV] +item.itemBufferCore5.name=能é‡æ ¸å¿ƒ [EV] +item.itemBufferCore6.name=能é‡æ ¸å¿ƒ [IV] +item.itemBufferCore7.name=能é‡æ ¸å¿ƒ [LuV] +item.itemBufferCore8.name=能é‡æ ¸å¿ƒ [ZPM] +item.itemBufferCore9.name=能é‡æ ¸å¿ƒ [UV] +item.itemBufferCore10.name=能é‡æ ¸å¿ƒ [MAX] +item.itemPLACEHOLDER_Circuit.name=夸克æ“纵者 (UV) +item.itembookgt.name=§o§o热力锅炉手册 + +// Everglade Items +item.everglades.trigger.name=§6§6Alkalus圆盘[§c激活§6] + + + + + + + +//Blocks +tile.blockRainforestOakLog.name=雨林橡木 +tile.blockRainforestOakLeaves.name=æ©¡æ ‘æ ‘å¶ +tile.blockRainforestOakSapling.name=雨林橡树树苗 + +//TC Stuff +tile.blockFastAlchemyFurnace.0.name=æŸå +tile.blockFastArcaneAlembic.1.name=æŸå + +//Frame Boxes +tile.Block of Selenium.name=ç¡’å— +tile.Selenium Frame Box.name=硒框架 +tile.Block of Bromine.name=æº´å— +tile.Block of Strontium.name=é”¶å— +tile.Strontium Frame Box.name=锶框架 +tile.Block of Zirconium.name=é”†å— +tile.Zirconium Frame Box.name=锆框架 +tile.Block of Ruthenium.name=é’Œå— +tile.Ruthenium Frame Box.name=钌框架 +tile.Block of Iodine.name=ç¢˜å— +tile.Iodine Frame Box.name=碘框架 +tile.Block of Hafnium.name=é“ªå— +tile.Hafnium Frame Box.name=铪框架 +tile.Block of Dysprosium.name=é•å— +tile.Dysprosium Frame Box.name=é•æ¡†æž¶ +tile.Block of Tellurium.name=ç¢²å— +tile.Tellurium Frame Box.name=碲框架 +tile.Block of Rhodium.name=é“‘å— +tile.Rhodium Frame Box.name=铑框架 +tile.Block of Rhenium.name=é“¼å— +tile.Rhenium Frame Box.name=铼框架 +tile.Block of Thallium.name=é“Šå— +tile.Thallium Frame Box.name=铊框架 +tile.Block of Technetium.name=é”å— +tile.Block of Polonium.name=é’‹å— +tile.Block of Astatine.name=ç ¹å— +tile.Block of Francium.name=é’«å— +tile.Block of Radium.name=é•­å— +tile.Block of Actinium.name=é”•å— +tile.Block of Protactinium.name=é•¤å— +tile.Block of Neptunium.name=é•Žå— +tile.Block of Curium.name=é””å— +tile.Block of Berkelium.name=é”«å— +tile.Block of Californium.name=é”Žå— +tile.Block of Einsteinium.name=é”¿å— +tile.Block of Fermium.name=é•„å— +tile.Block of Thorium 232.name=é’-232å— +tile.Block of Uranium 232.name=é“€-232å— +tile.Block of Uranium 233.name=é“€-233å— +tile.Block of Plutonium-238.name=é’š-238å— +tile.Block of Strontium-90.name=锶-90å— +tile.Block of Polonium-210.name=é’‹-210å— +tile.Block of Americium-241.name=é•…-241å— +tile.Block of Silicon Carbide.name=ç¢³åŒ–ç¡…å— +tile.Silicon Carbide Frame Box.name=碳化硅框架 +tile.Block of Zirconium Carbide.name=ç¢³åŒ–é”†å— +tile.Zirconium Carbide Frame Box.name=碳化锆框架 +tile.Block of Tantalum Carbide.name=ç¢³åŒ–é’½å— +tile.Tantalum Carbide Frame Box.name=碳化钽框架 +tile.Block of Niobium Carbide.name=ç¢³åŒ–é“Œå— +tile.Niobium Carbide Frame Box.name=碳化铌框架 +tile.Block of Beryllium Fluoride.name=氟化é“å— +tile.Block of Lithium Fluoride.name=æ°ŸåŒ–é”‚å— +tile.Block of Thorium Tetrafluoride.name=四氟化é’å— +tile.Block of Thorium Hexafluoride.name=六氟化é’å— +tile.Block of Uranium Tetrafluoride.name=å››æ°ŸåŒ–é“€å— +tile.Block of Uranium Hexafluoride.name=å…­æ°ŸåŒ–é“€å— +tile.Block of Zirconium Tetrafluoride.name=å››æ°ŸåŒ–é”†å— +tile.Block of Neptunium Hexafluoride.name=å…­æ°ŸåŒ–é•Žå— +tile.Block of Technetium Hexafluoride.name=六氟化é”å— +tile.Block of Selenium Hexafluoride.name=å…­æ°ŸåŒ–ç¡’å— +tile.Block of LiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–ç‰©å— +tile.Block of LiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–ç‰©å— +tile.Block of LiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–ç‰©å— +tile.Block of Energy Crystal.name=能é‡æ°´æ™¶å— +tile.Energy Crystal Frame Box.name=能é‡æ°´æ™¶æ¡†æž¶ +tile.Block of Blood Steel.name=è¡€é’¢å— +tile.Blood Steel Frame Box.name=血钢框架 +tile.Block of Zeron-100.name=å¡žé¾™-100å— +tile.Zeron-100 Frame Box.name=å¡žé¾™-100框架 +tile.Block of Tumbaga.name=铜金åˆé‡‘å— +tile.Tumbaga Frame Box.name=铜金åˆé‡‘框架 +tile.Block of Potin.name=ç²—é’é“œåˆé‡‘å— +tile.Potin Frame Box.name=ç²—é’é“œåˆé‡‘框架 +tile.Block of Staballoy.name=è´«é“€åˆé‡‘å— +tile.Staballoy Frame Box.name=è´«é“€åˆé‡‘框架 +tile.Block of Tantalloy-60.name=钽钨åˆé‡‘-60å— +tile.Tantalloy-60 Frame Box.name=钽钨åˆé‡‘-60框架 +tile.Block of Tantalloy-61.name=钽钨åˆé‡‘-61å— +tile.Tantalloy-61 Frame Box.name=钽钨åˆé‡‘-61框架 +tile.Block of Inconel-625.name=é•é“¬åŸºåˆé‡‘-625å— +tile.Inconel-625 Frame Box.name=é•é“¬åŸºåˆé‡‘-625框架 +tile.Block of Inconel-690.name=é•é“¬åŸºåˆé‡‘-690å— +tile.Inconel-690 Frame Box.name=é•é“¬åŸºåˆé‡‘-690框架 +tile.Block of Inconel-792.name=é•é“¬åŸºåˆé‡‘-792å— +tile.Inconel-792 Frame Box.name=é•é“¬åŸºåˆé‡‘-792框架 +tile.Block of Eglin Steel.name=åŸƒæ ¼æž—é’¢å— +tile.Eglin Steel Frame Box.name=埃格林钢框架 +tile.Block of Maraging Steel 250.name=马æ°ä½“时效钢250å— +tile.Maraging Steel 250 Frame Box.name=马æ°ä½“时效钢250框架 +tile.Block of Maraging Steel 300.name=马æ°ä½“时效钢300å— +tile.Maraging Steel 300 Frame Box.name=马æ°ä½“时效钢300框架 +tile.Block of Maraging Steel 350.name=马æ°ä½“时效钢350å— +tile.Maraging Steel 350 Frame Box.name=马æ°ä½“时效钢350框架 +tile.Block of Stellite.name=铬钴锰钛åˆé‡‘å— +tile.Stellite Frame Box.name=铬钴锰钛åˆé‡‘框架 +tile.Block of Talonite.name=铬钴磷酸ç›åˆé‡‘å— +tile.Talonite Frame Box.name=铬钴磷酸ç›åˆé‡‘框架 +tile.Block of Hastelloy-W.name=哈斯特洛ä¾åˆé‡‘-Wå— +tile.Hastelloy-W Frame Box.name=哈斯特洛ä¾åˆé‡‘-W框架 +tile.Block of Hastelloy-X.name=哈斯特洛ä¾åˆé‡‘-Xå— +tile.Hastelloy-X Frame Box.name=哈斯特洛ä¾åˆé‡‘-X框架 +tile.Block of Hastelloy-C276.name=哈斯特洛ä¾åˆé‡‘-C276å— +tile.Hastelloy-C276 Frame Box.name=哈斯特洛ä¾åˆé‡‘-C276框架 +tile.Block of Hastelloy-N.name=哈斯特洛ä¾åˆé‡‘-Nå— +tile.Hastelloy-N Frame Box.name=哈斯特洛ä¾åˆé‡‘-N框架 +tile.Block of Incoloy-020.name=è€çƒ­é“¬é“åˆé‡‘-020å— +tile.Incoloy-020 Frame Box.name=è€çƒ­é“¬é“åˆé‡‘-020框架 +tile.Block of Incoloy-DS.name=è€çƒ­é“¬é“åˆé‡‘-DSå— +tile.Incoloy-DS Frame Box.name=è€çƒ­é“¬é“åˆé‡‘-DS框架 +tile.Block of Incoloy-MA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956å— +tile.Incoloy-MA956 Frame Box.name=è€çƒ­é“¬é“åˆé‡‘-MA956框架 +tile.Block of Grisium.name=ç°é’›åˆé‡‘å— +tile.Grisium Frame Box.name=ç°é’›åˆé‡‘框架 +tile.Block of Trinium.name=ä¸‰å…ƒé‡‘å±žå— +tile.Block of Refined Trinium.name=ç²¾åˆ¶ä¸‰å…ƒé‡‘å±žå— +tile.Block of Trinium Titanium Alloy.name=三元钛åˆé‡‘å— +tile.Trinium Titanium Alloy Frame Box.name=三元钛åˆé‡‘框架 +tile.Block of Trinium Naquadah Alloy.name=三元硅岩åˆé‡‘å— +tile.Block of Trinium Naquadah Carbonite.name=碳化三元硅岩åˆé‡‘å— +tile.Trinium Naquadah Carbonite Frame Box.name=碳化三元硅岩åˆé‡‘框架 +tile.Block of Quantum.name=é‡å­åˆé‡‘å— +tile.Quantum Frame Box.name=é‡å­åˆé‡‘框架 + +//Ores +tile.OreFluorite.name=氟石矿石 +tile.OreCrocoite.name=赤铅矿矿石 +tile.OreGeikielite.name=é•é’›çŸ¿çŸ¿çŸ³ +tile.OreNichromite.name=é•é“¬çŸ¿çŸ¿çŸ³ +tile.OreTitanite.name=æ¦çŸ³çŸ¿çŸ³ +tile.OreZimbabweite.name=钛铌铅钠石矿石 +tile.OreZirconolite.name=钛锆é’矿矿石 +tile.OreGadoliniteCe.name=ç¡…é“钇矿(Ce)矿石 +tile.OreGadoliniteY.name=ç¡…é“钇矿(Y)矿石 +tile.OreLepersonnite.name=绿泥石矿石 +tile.OreSamarskiteY.name=铌钇矿(Y)矿石 +tile.OreSamarskiteYb.name=铌钇矿(Yb)矿石 +tile.OreXenotime.name=磷钇矿矿石 +tile.OreYttriaite.name=钇矿矿石 +tile.OreYttrialite.name=ç¡…é’钇矿矿石 +tile.OreYttrocerite.name=铈钇矿矿石 +tile.OreZircon.name=锆石矿石 +tile.OrePolycrase.name=锗铀钇矿矿石 +tile.OreZircophyllite.name=锆星å¶çŸ³çŸ¿çŸ³ +tile.OreZirkelite.name=锆英石矿石 +tile.OreLanthaniteLa.name=镧石(La)矿石 +tile.OreLanthaniteCe.name=镧石(Ce)矿石 +tile.OreLanthaniteNd.name=镧石(Nd)矿石 +tile.OreAgarditeY.name=è±é“矿(Y)矿石 +tile.OreAgarditeCd.name=è±é“矿(Cd)矿石 +tile.OreAgarditeLa.name=è±é“矿(La)矿石 +tile.OreAgarditeNd.name=è±é“矿(Nd)矿石 +tile.OreHibonite.name=黑é“钙石矿石 +tile.OreCerite.name=铈硅石矿石 +tile.OreFluorcaphite.name=氟碳铈矿矿石 +tile.OreFlorencite.name=磷é“铈矿矿石 +tile.OreCryolite.name=冰晶石矿石 + +//Misc +tile.blockMFEffect.name=特殊 +tile.fluidBlockSludge.name=污泥 +tile.blockWorkbenchGT.name=å·¥ä½œå° +tile.blockWorkbenchGTAdvanced.name=é«˜çº§å·¥ä½œå° +tile.blockHeliumGenerator.name=æ°¦å‘生器 +tile.blockFirePit.name=ç«å‘ +tile.blockFishTrap.name=æ•é±¼è€… +tile.blockInfiniteFluidTank.name=æ— é™æµä½“å‚¨ç½ +tile.blockMiningExplosives.name=çŸ¿ç”¨ç‚¸è¯ +tile.blockHellFire.name=åœ°ç‹±ä¹‹ç« +tile.blockProjectBench.name=å·¥ç¨‹å° +tile.blockTradeBench.name=è´¸æ˜“å° +tile.blockModularity.name=模å—åŒ–å·¥ä½œå° +tile.blockBlackGate.name=å‡‹é›¶ç¬¼å­ +tile.blockTankXpConverter.name=ç»éªŒè½¬æ¢å™¨ + +//Everglades Blocks +tile.fluidSludge.0.name=ä¸æµåŠ¨çš„废水 +tile.blockDarkWorldPortal.name=未æ¥çš„掠影 +tile.blockDarkWorldGround.name=ä¸ç¨³å®šçš„土壤 +tile.blockDarkWorldGround2.name=污染的土壤 +tile.blockDarkWorldGround2.2.name=高度污染的土壤 +tile.blockDarkWorldPortalFrame.name=é制框架 + + +//Added 1/4/18 +tile.Block of Plutonium-239.name=é’š-239å— +tile.Fluorite Ore [Old].name=氟石矿[ä¸å¯ç”¨çš„] +tile.blockMiningPipeFake.name=å¼ºåŒ–é’¢ç­‹æŒ–æŽ˜ç®¡é“ +tile.blockMiningHeadFake.name=基岩钻头 +item.itemCellLiFBeF2ThF4UF4.name=熔ç›å•å…ƒ[é“€é’å¤åˆæ°ŸåŒ–物] +item.itemCellLiFBeF2ZrF4UF4.name=熔ç›å•å…ƒ[铀锆å¤åˆæ°ŸåŒ–物] +item.itemCellLiFBeF2ZrF4U235.name=熔ç›å•å…ƒ[é“€235å¤åˆæ°ŸåŒ–物] +item.itemPlateMeatRaw.name=ç”Ÿè‚‰æ¿ +tile.Block of MeatRaw.name=ç”Ÿè‚‰å— + +//Added 26/5/18 +item.BurntLiFBeF2ThF4UF4.name=枯竭熔ç›å•å…ƒ[é“€é’å¤åˆæ°ŸåŒ–物] +item.BurntLiFBeF2ZrF4UF4.name=枯竭熔ç›å•å…ƒ[铀锆å¤åˆæ°ŸåŒ–物] +item.BurntLiFBeF2ZrF4U235.name=枯竭熔ç›å•å…ƒ[é“€235å¤åˆæ°ŸåŒ–物] +item.itemBigEgg.name= 盎å¸çš„大鸡蛋 +item.itemPlateSodium.name=é’ æ¿ + +item.itemNuggetPromethium.name=é’·ç²’ +item.itemIngotPromethium.name=é’·é”­ +item.itemDustSmallPromethium.name=å°å †é’·ç²‰ +item.itemDustTinyPromethium.name=å°æ’®é’·ç²‰ +item.itemDustPromethium.name=钷粉 +tile.Block of Promethium.name=é’·å— + +item.itemCellAmericium241.name=é•…-241å•å…ƒ +item.itemCellPolonium210.name=é’‹-210å•å…ƒ +item.itemCellStrontium90.name=锶-90å•å…ƒ +item.itemCellPlutonium238.name=é’š-238å•å…ƒ + +entity.MiningCharge.name=采矿费用 +entity.throwablePotionSulfuric.name=硫酸烧瓶 +entity.throwablePotionHydrofluoric.name=氢氟酸烧瓶 +entity.toxinBall.name=毒素å°çƒ +entity.plasmaBolt.name=等离å­ä½“ +entity.bigChickenFriendly.name=巨大的鸡 + +//Added 26/6/18 +tile.OreTrinium.name=三元金属矿石 +item.crushedTrinium.name=粉碎三元金属矿石 +item.crushedCentrifugedTrinium.name=离心三元金属矿石 +item.crushedPurifiedTrinium.name=洗净的三元金属矿石 +item.dustImpureTrinium.name=å«æ‚三元金属粉 +item.dustPureTrinium.name=洗净的三元金属粉 + +//Added 1/7/18 +entity.WiseVillager.name=èªæ˜Žçš„æ‘æ°‘ +tile.blockMobSpawnerEx.0.name=刷怪笼 +tile.blockMobSpawnerEx.1.name=刷怪笼 +tile.blockMobSpawnerEx.2.name=刷怪笼 +tile.blockMobSpawnerEx.3.name=刷怪笼 +tile.blockMobSpawnerEx.4.name=刷怪笼 +tile.blockMobSpawnerEx.5.name=刷怪笼 +tile.blockMobSpawnerEx.6.name=刷怪笼 +tile.blockMobSpawnerEx.7.name=刷怪笼 +tile.blockMobSpawnerEx.8.name=刷怪笼 +tile.blockMobSpawnerEx.9.name=刷怪笼 +tile.blockMobSpawnerEx.10.name=刷怪笼 +tile.blockMobSpawnerEx.11.name=刷怪笼 +tile.blockMobSpawnerEx.12.name=刷怪笼 +tile.blockMobSpawnerEx.13.name=刷怪笼 +tile.blockMobSpawnerEx.14.name=刷怪笼 +tile.blockMobSpawnerEx.15.name=刷怪笼 +description.villager.profession.miscutils.banker=银行家 +description.villager.profession.miscutils.technician=GT技术员 +description.villager.profession.miscutils.trader=矿石交易员 +description.villager.profession.miscutils.aboriginal=澳大利亚土著 + +//Added 23/8/18 +item.itemHatTinFoil.name=锡薄帽 + +//Added 13/9/18 +entity.WiseVillager.name=èªæ˜Žçš„æ‘æ°‘ +entity.Aboriginal.name=澳大利亚土著 +entity.miscutils.constructStaballoy.name=è´«é“€åˆé‡‘结构 +entity.miscutils.sickBlaze.name=被感染的狂热者 + +//Added 15/9/18 +item.ZirconiumTetrafluoride.name=四氟化锆å•å…ƒ +item.Formaldehyde.name=甲醛å•å…ƒ +item.RocketFuelMixA.name=H8N4C2O4ç«ç®­ç‡ƒæ–™å•å…ƒ +item.RocketFuelMixB.name=RP-1ç«ç®­ç‡ƒæ–™å•å…ƒ +item.RocketFuelMixC.name=CN3H7O3ç«ç®­ç‡ƒæ–™å•å…ƒ +item.RocketFuelMixD.name=密集肼ç«ç®­ç‡ƒæ–™å•å…ƒ +item.RP1Fuel.name=RP-1燃料å•å…ƒ +item.Monomethylhydrazine.name=甲基肼å•å…ƒ +item.Hydrazine.name=肼å•å…ƒ +item.NitrogenTetroxide.name=四氧化二氮å•å…ƒ +item.NitrousOxide.name=一氧化二氮å•å…ƒ +item.AmmoniumNitrateSlurry.name=ç¡é…¸é“µæµ†æ¶²å•å…ƒ +item.Kerosene.name=煤油å•å…ƒ +item.LiquidOxygen.name=液化氧å•å…ƒ[LOX] + +//Added 8/1/19 + +//Ores + +tile.OreIrarsite.name=硫砷铱矿石 +item.crushedIrarsite.name=粉碎硫砷铱矿石 +item.crushedCentrifugedIrarsite.name=离心粉碎硫砷铱矿石 +item.crushedPurifiedIrarsite.name=纯净粉碎硫砷铱矿石 +item.dustImpureIrarsite.name=å«æ‚硫砷铱粉 +item.dustPureIrarsite.name=纯净硫砷铱粉 +item.itemDustIrarsite.name=硫砷铱粉 +item.itemDustTinyIrarsite.name=å°æ’®ç¡«ç ·é“±ç²‰ +item.itemDustSmallIrarsite.name=å°å †ç¡«ç ·é“±ç²‰ + +tile.OreMiessiite.name=ç¡…ç°çŸ³çŸ¿çŸ³ +item.crushedMiessiite.name=粉碎硅ç°çŸ³çŸ¿çŸ³ +item.crushedCentrifugedMiessiite.name=离心粉碎硅ç°çŸ³çŸ¿çŸ³ +item.crushedPurifiedMiessiite.name=纯净硅ç°çŸ³çŸ¿çŸ³ +item.dustImpureMiessiite.name=å«æ‚ç¡…ç°çŸ³ç²‰ +item.dustPureMiessiite.name=纯净硅ç°çŸ³ç²‰ +item.itemDustMiessiite.name=ç¡…ç°çŸ³ç²‰ +item.itemDustTinyMiessiite.name=å°æ’®ç¡…ç°çŸ³ç²‰ +item.itemDustSmallMiessiite.name=å°å †ç¡…ç°çŸ³ç²‰ + +tile.OreComancheite.name=溴汞石矿石 +item.crushedComancheite.name=粉碎溴汞石矿石 +item.crushedCentrifugedComancheite.name=离心粉碎溴汞石矿石 +item.crushedPurifiedComancheite.name=纯净粉碎溴汞石矿石 +item.dustImpureComancheite.name=å«æ‚溴汞石矿石 +item.dustPureComancheite.name=纯净溴汞石粉 +item.itemDustComancheite.name=溴汞石粉 +item.itemDustTinyComancheite.name=å°æ’®æº´æ±žçŸ³ç²‰ +item.itemDustSmallComancheite.name=å°å †æº´æ±žçŸ³ç²‰ + +tile.OreKoboldite.name=妖金矿石 +item.crushedKoboldite.name=粉碎妖金矿石 +item.crushedCentrifugedKoboldite.name=离心粉碎妖金矿石 +item.crushedPurifiedKoboldite.name=纯净粉碎妖金矿石 +item.dustImpureKoboldite.name=å«æ‚妖金粉 +item.dustPureKoboldite.name=纯净妖金粉 +item.itemDustKoboldite.name=妖金粉 +item.itemDustTinyKoboldite.name=å°æ’®å¦–金粉 +item.itemDustSmallKoboldite.name=å°å †å¦–金粉 + +tile.OrePerroudite.name=溴硫银汞矿石 +item.crushedPerroudite.name=粉碎溴硫银汞矿石 +item.crushedCentrifugedPerroudite.name=离心溴硫银汞矿石 +item.crushedPurifiedPerroudite.name=纯净溴硫银汞矿石 +item.dustImpurePerroudite.name=å«æ‚溴硫银汞粉 +item.dustPurePerroudite.name=纯净溴硫银汞粉 +item.itemDustPerroudite.name=溴硫银汞粉 +item.itemDustTinyPerroudite.name=å°æ’®æº´ç¡«é“¶æ±žç²‰ +item.itemDustSmallPerroudite.name=å°å †æº´ç¡«é“¶æ±žç²‰ + +tile.OreDemicheleite.name=é‡é—ªçŸ³çŸ¿çŸ³ +item.crushedDemicheleite.name=粉碎é‡é—ªçŸ³çŸ¿çŸ³ +item.crushedCentrifugedDemicheleite.name=离心粉碎é‡é—ªçŸ³çŸ¿çŸ³ +item.crushedPurifiedDemicheleite.name=纯净粉碎é‡é—ªçŸ³çŸ¿çŸ³ +item.dustImpureDemicheleite.name=å«æ‚é‡é—ªçŸ³ç²‰ +item.dustPureDemicheleite.name=纯净é‡é—ªçŸ³ç²‰ +item.itemDustDemicheleite.name=é‡é—ªçŸ³ç²‰ +item.itemDustTinyDemicheleite.name=å°æ’®é‡é—ªçŸ³ç²‰ +item.itemDustSmallDemicheleite.name=å°å †é‡é—ªçŸ³ç²‰ + +tile.OreAlburnite.name=é“尖晶石矿石 +item.crushedAlburnite.name=粉碎é“尖晶石矿石 +item.crushedCentrifugedAlburnite.name=离心粉碎é“尖晶石矿石 +item.crushedPurifiedAlburnite.name=纯净粉碎é“尖晶石矿石 +item.dustImpureAlburnite.name=å«æ‚é“尖晶石粉 +item.dustPureAlburnite.name=纯净é“尖晶石粉 +item.itemDustAlburnite.name=é“尖晶石粉 +item.itemDustTinyAlburnite.name=å°æ’®é“尖晶石粉 +item.itemDustSmallAlburnite.name=å°å †é“尖晶石粉 + +tile.OreLautarite.name=碘钙石矿石 +item.crushedLautarite.name=粉碎碘钙石矿石 +item.crushedCentrifugedLautarite.name=离心粉碎碘钙石矿石 +item.crushedPurifiedLautarite.name=纯净粉碎碘钙石矿石 +item.dustImpureLautarite.name=å«æ‚碘钙石粉 +item.dustPureLautarite.name=纯净碘钙石粉 +item.itemDustLautarite.name=碘钙石粉 +item.itemDustTinyLautarite.name=å°æ’®ç¢˜é’™çŸ³ç²‰ +item.itemDustSmallLautarite.name=å°å †ç¢˜é’™çŸ³ç²‰ + +tile.OreBariteRd.name=é‡æ™¶çŸ³(Rd)矿石 +item.crushedBariteRd.name=粉碎é‡æ™¶çŸ³(Rd)矿石 +item.crushedCentrifugedBariteRd.name=离心粉碎 é‡æ™¶çŸ³(Rd)矿石 +item.crushedPurifiedBariteRd.name=纯净粉碎é‡æ™¶çŸ³(Rd)矿石 +item.dustImpureBariteRd.name=å«æ‚ é‡æ™¶çŸ³(Rd)粉 +item.dustPureBariteRd.name=纯净 é‡æ™¶çŸ³(Rd)粉 +item.itemDustBariteRd.name=é‡æ™¶çŸ³(Rd)粉 +item.itemDustTinyBariteRd.name=å°æ’®é‡æ™¶çŸ³(Rd)粉 +item.itemDustSmallBariteRd.name=å°å †é‡æ™¶çŸ³(Rd)粉 + +tile.OreHoneaite.name=碲化金铊矿石 +item.crushedHoneaite.name=粉碎碲化金铊矿石 +item.crushedCentrifugedHoneaite.name=离心粉碎碲化金铊矿石 +item.crushedPurifiedHoneaite.name=纯净粉碎碲化金铊矿石 +item.dustImpureHoneaite.name=å«æ‚碲化金铊粉 +item.dustPureHoneaite.name=纯净碲化金铊粉 +item.itemDustHoneaite.name=碲化金铊粉 +item.itemDustTinyHoneaite.name=å°æ’®ç¢²åŒ–金铊粉 +item.itemDustSmallHoneaite.name=å°å †ç¢²åŒ–金铊粉 + +tile.OreLafossaite.name=é“Šç›çŸ¿çŸ³ +item.crushedLafossaite.name=粉碎铊ç›çŸ¿çŸ³ +item.crushedCentrifugedLafossaite.name=离心粉碎铊ç›çŸ¿çŸ³ +item.crushedPurifiedLafossaite.name=纯净粉碎铊ç›çŸ¿çŸ³ +item.dustImpureLafossaite.name=å«æ‚é“Šç›ç²‰ +item.dustPureLafossaite.name=纯净铊ç›ç²‰ +item.itemDustLafossaite.name=é“Šç›ç²‰ +item.itemDustTinyLafossaite.name=å°æ’®é“Šç›ç²‰ +item.itemDustSmallLafossaite.name=å°å †é“Šç›ç²‰ + +tile.OreKashinite.name=硫铑钛铜矿石 +item.crushedKashinite.name=粉碎硫铑钛铜矿石 +item.crushedCentrifugedKashinite.name=离心粉碎硫铑钛铜矿石 +item.crushedPurifiedKashinite.name=纯净粉碎硫铑钛铜矿石 +item.dustImpureKashinite.name=å«æ‚硫铑钛铜粉 +item.dustPureKashinite.name=纯净硫铑钛铜粉 +item.itemDustKashinite.name=硫铑钛铜粉 +item.itemDustTinyKashinite.name=å°æ’®ç¡«é“‘钛铜粉 +item.itemDustSmallKashinite.name=å°å †ç¡«é“‘钛铜粉 + +tile.OreRadioactiveMineralMix.name=奇异矿石 +item.crushedRadioactiveMineralMix.name=粉碎奇异矿石 +item.crushedCentrifugedRadioactiveMineralMix.name=离心粉碎奇异矿石 +item.crushedPurifiedRadioactiveMineralMix.name=纯净粉碎奇异矿石 +item.dustImpureRadioactiveMineralMix.name=å«æ‚奇异粉 +item.dustPureRadioactiveMineralMix.name=纯净奇异粉 +item.itemDustRadioactiveMineralMix.name=奇异粉 +item.itemDustTinyRadioactiveMineralMix.name=å°æ’®å¥‡å¼‚粉 +item.itemDustSmallRadioactiveMineralMix.name=å°å †å¥‡å¼‚粉 + +tile.OreDemicheleiteBr.name=é‡é—ªçŸ³(Br)矿石 +item.crushedDemicheleiteBr.name=粉碎é‡é—ªçŸ³(Br)矿石 +item.crushedCentrifugedDemicheleiteBr.name=离心粉碎é‡é—ªçŸ³(Br)矿石 +item.crushedPurifiedDemicheleiteBr.name=纯净粉碎é‡é—ªçŸ³(Br)矿石 +item.dustImpureDemicheleiteBr.name=å«æ‚é‡é—ªçŸ³(Br)粉 +item.dustPureDemicheleiteBr.name=纯净é‡é—ªçŸ³(Br)粉 +item.itemDustDemicheleiteBr.name=é‡é—ªçŸ³(Br)粉 + + +//Materials + +item.itemIngotTitansteel.name=æ³°å¦ç²¾é’¢ +item.itemHotIngotTitansteel.name=热泰å¦ç²¾é’¢ +item.itemDustTitansteel.name=æ³°å¦ç²¾é’¢ç²‰ +item.itemDustTinyTitansteel.name=å°æ’®æ³°å¦ç²¾é’¢ç²‰ +item.itemDustSmallTitansteel.name=å°å †æ³°å¦ç²¾é’¢ç²‰ +item.itemNuggetTitansteel.name=æ³°å¦ç²¾é’¢ç²’ +item.itemPlateTitansteel.name=æ³°å¦ç²¾é’¢æ¿ +item.itemPlateDoubleTitansteel.name=åŒé‡æ³°å¦ç²¾é’¢æ¿ +item.itemBoltTitansteel.name=æ³°å¦ç²¾é’¢èžºæ “ +item.itemRodTitansteel.name=æ³°å¦ç²¾é’¢æ† +item.itemRodLongTitansteel.name=é•¿æ³°å¦ç²¾é’¢æ† +item.itemRingTitansteel.name=æ³°å¦ç²¾é’¢çŽ¯ +item.itemScrewTitansteel.name=æ³°å¦ç²¾é’¢èžºä¸ +item.itemRotorTitansteel.name=æ³°å¦ç²¾é’¢è½¬å­ +item.itemGearTitansteel.name=æ³°å¦ç²¾é’¢é½¿è½® +item.itemCellTitansteel.name=æ³°å¦ç²¾é’¢å•å…ƒ +tile.Block of Titansteel.name=æ³°å¦ç²¾é’¢å— +tile.Titansteel Frame Box.name=æ³°å¦ç²¾é’¢æ¡†æž¶ + +item.itemIngotOctiron.name=八角é“é”­ +item.itemHotIngotOctiron.name=热八角é“é”­ +item.itemDustOctiron.name=八角é“粉 +item.itemDustTinyOctiron.name=å°æ’®å…«è§’é“粉 +item.itemDustSmallOctiron.name=å°å †å…«è§’é“粉 +item.itemNuggetOctiron.name=八角é“ç²’ +item.itemPlateOctiron.name=八角é“æ¿ +item.itemPlateDoubleOctiron.name=åŒé‡å…«è§’é“æ¿ +item.itemBoltOctiron.name=八角é“螺栓 +item.itemRodOctiron.name=八角é“æ† +item.itemRodLongOctiron.name=长八角é“æ† +item.itemRingOctiron.name=八角é“环 +item.itemScrewOctiron.name=八角é“èžºä¸ +item.itemRotorOctiron.name=八角é“è½¬å­ +item.itemGearOctiron.name=八角é“齿轮 +item.itemCellOctiron.name=八角é“å•å…ƒ +tile.Block of Octiron.name=八角é“å— +tile.Octiron Frame Box.name=八角é“框架 + +item.itemIngotWatertightSteel.name=防水钢锭 +item.itemHotIngotWatertightSteel.name=热防水钢锭 +item.itemDustWatertightSteel.name=防水钢粉 +item.itemDustTinyWatertightSteel.name=å°æ’®é˜²æ°´é’¢ç²‰ +item.itemDustSmallWatertightSteel.name=å°å †é˜²æ°´é’¢ç²‰ +item.itemNuggetWatertightSteel.name=防水钢粒 +item.itemPlateWatertightSteel.name=é˜²æ°´é’¢æ¿ +item.itemPlateDoubleWatertightSteel.name=åŒé‡é˜²æ°´é’¢æ¿ +item.itemBoltWatertightSteel.name=防水钢螺栓 +item.itemRodWatertightSteel.name=é˜²æ°´é’¢æ† +item.itemRodLongWatertightSteel.name=é•¿é˜²æ°´é’¢æ† +item.itemRingWatertightSteel.name=防水钢环 +item.itemScrewWatertightSteel.name=é˜²æ°´é’¢èžºä¸ +item.itemRotorWatertightSteel.name=é˜²æ°´é’¢è½¬å­ +item.itemGearWatertightSteel.name=防水钢齿轮 +item.itemCellWatertightSteel.name=防水钢å•å…ƒ +tile.Block of Watertight Steel.name=é˜²æ°´é’¢å— +tile.Watertight Steel Frame Box.name=防水钢框架 + +item.itemIngotCelestialTungsten.name=天体钨锭 +item.itemHotIngotCelestialTungsten.name=热天体钨锭 +item.itemDustCelestialTungsten.name=天体钨粉 +item.itemDustTinyCelestialTungsten.name=å°æ’®å¤©ä½“钨粉 +item.itemDustSmallCelestialTungsten.name=å°å †å¤©ä½“钨粉 +item.itemNuggetCelestialTungsten.name=天体钨粒 +item.itemPlateCelestialTungsten.name=å¤©ä½“é’¨æ¿ +item.itemPlateDoubleCelestialTungsten.name=åŒé‡å¤©ä½“é’¨æ¿ +item.itemBoltCelestialTungsten.name=天体钨螺栓 +item.itemRodCelestialTungsten.name=å¤©ä½“é’¨æ† +item.itemRodLongCelestialTungsten.name=é•¿å¤©ä½“é’¨æ† +item.itemRingCelestialTungsten.name=天体钨环 +item.itemScrewCelestialTungsten.name=å¤©ä½“é’¨èžºä¸ +item.itemRotorCelestialTungsten.name=å¤©ä½“é’¨è½¬å­ +item.itemGearCelestialTungsten.name=天体钨齿轮 +item.itemCellCelestialTungsten.name=天体钨å•å…ƒ +tile.Block of Celestial Tungsten.name=å¤©ä½“é’¨å— +tile.Celestial Tungsten Frame Box.name=天体钨框架 + +item.itemIngotHypogen.name=æµ·ç€çé”­ +item.itemHotIngotHypogen.name=热海ç€çé”­ +item.itemDustHypogen.name=æµ·ç€ç粉 +item.itemDustTinyHypogen.name=å°æ’®æµ·ç€ç粉 +item.itemDustSmallHypogen.name=å°å †æµ·ç€ç粉 +item.itemNuggetHypogen.name=æµ·ç€çç²’ +item.itemPlateHypogen.name=æµ·ç€çæ¿ +item.itemPlateDoubleHypogen.name=åŒé‡æµ·ç€çæ¿ +item.itemBoltHypogen.name=æµ·ç€ç螺栓 +item.itemRodHypogen.name=æµ·ç€çæ† +item.itemRodLongHypogen.name=é•¿æµ·ç€çæ† +item.itemRingHypogen.name=æµ·ç€ç环 +item.itemScrewHypogen.name=æµ·ç€çèžºä¸ +item.itemRotorHypogen.name=æµ·ç€çè½¬å­ +item.itemGearHypogen.name=æµ·ç€ç齿轮 +item.itemCellHypogen.name=æµ·ç€çå•å…ƒ +tile.Block of Hypogen.name=æµ·ç€çå— +tile.Hypogen Frame Box.name=æµ·ç€ç框架 + +item.itemIngotArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bé”­ +item.itemHotIngotArceusAlloy2B.name=热阿塞俄斯åˆé‡‘2Bé”­ +item.itemDustArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B粉 +item.itemDustTinyArceusAlloy2B.name=å°æ’®é˜¿å¡žä¿„æ–¯åˆé‡‘2B粉 +item.itemDustSmallArceusAlloy2B.name=å°å †é˜¿å¡žä¿„æ–¯åˆé‡‘2B粉 +item.itemNuggetArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bç²’ +item.itemPlateArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bæ¿ +item.itemPlateDoubleArceusAlloy2B.name=åŒé‡é˜¿å¡žä¿„æ–¯åˆé‡‘2Bæ¿ +item.itemBoltArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B螺栓 +item.itemRodArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bæ† +item.itemRodLongArceusAlloy2B.name=长阿塞俄斯åˆé‡‘2Bæ† +item.itemRingArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B环 +item.itemScrewArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bèžºä¸ +item.itemRotorArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bè½¬å­ +item.itemGearArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B齿轮 +item.itemCellArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bå•å…ƒ +tile.Block of Arceus Alloy 2B.name=阿塞俄斯åˆé‡‘2Bå— +tile.Arceus Alloy 2B Frame Box.name=阿塞俄斯åˆé‡‘2B框架 + +item.itemIngotChromaticGlass.name=彩色玻璃锭 +item.itemHotIngotChromaticGlass.name=热彩色玻璃锭 +item.itemDustChromaticGlass.name=彩色玻璃粉 +item.itemDustTinyChromaticGlass.name=å°æ’®å½©è‰²çŽ»ç’ƒç²‰ +item.itemDustSmallChromaticGlass.name=å°å †å½©è‰²çŽ»ç’ƒç²‰ +item.itemNuggetChromaticGlass.name=彩色玻璃粒 +item.itemPlateChromaticGlass.name=å½©è‰²çŽ»ç’ƒæ¿ +item.itemPlateDoubleChromaticGlass.name=åŒé‡å½©è‰²çŽ»ç’ƒæ¿ +item.itemBoltChromaticGlass.name=彩色玻璃螺栓 +item.itemRodChromaticGlass.name=å½©è‰²çŽ»ç’ƒæ† +item.itemRodLongChromaticGlass.name=é•¿å½©è‰²çŽ»ç’ƒæ† +item.itemRingChromaticGlass.name=彩色玻璃环 +item.itemScrewChromaticGlass.name=å½©è‰²çŽ»ç’ƒèžºä¸ +item.itemRotorChromaticGlass.name=å½©è‰²çŽ»ç’ƒè½¬å­ +item.itemGearChromaticGlass.name=彩色玻璃齿轮 +item.itemCellChromaticGlass.name=彩色玻璃å•å…ƒ +tile.Block of Chromatic Glass.name=å½©è‰²çŽ»ç’ƒå— +tile.Chromatic Glass Frame Box.name=彩色玻璃框架 + +item.itemIngotAstralTitanium.name=星体钛锭 +item.itemHotIngotAstralTitanium.name=热星体钛锭 +item.itemDustAstralTitanium.name=星体钛粉 +item.itemDustTinyAstralTitanium.name=å°æ’®æ˜Ÿä½“钛粉 +item.itemDustSmallAstralTitanium.name=å°å †æ˜Ÿä½“钛粉 +item.itemNuggetAstralTitanium.name=星体钛粒 +item.itemPlateAstralTitanium.name=æ˜Ÿä½“é’›æ¿ +item.itemPlateDoubleAstralTitanium.name=åŒé‡æ˜Ÿä½“é’›æ¿ +item.itemBoltAstralTitanium.name=星体钛螺栓 +item.itemRodAstralTitanium.name=æ˜Ÿä½“é’›æ† +item.itemRodLongAstralTitanium.name=é•¿æ˜Ÿä½“é’›æ† +item.itemRingAstralTitanium.name=星体钛环 +item.itemScrewAstralTitanium.name=æ˜Ÿä½“é’›èžºä¸ +item.itemRotorAstralTitanium.name=æ˜Ÿä½“é’›è½¬å­ +item.itemGearAstralTitanium.name=星体钛齿轮 +item.itemCellAstralTitanium.name=星体钛å•å…ƒ +tile.Block of Astral Titanium.name=æ˜Ÿä½“é’›å— +tile.Astral Titanium Frame Box.name=星体钛框架 + +item.itemIngotTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘é”­ +item.itemHotIngotTungstenTitaniumCarbide.name=热碳化钨钛åˆé‡‘é”­ +item.itemDustTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘粉 +item.itemDustTinyTungstenTitaniumCarbide.name=å°æ’®ç¢³åŒ–钨钛åˆé‡‘粉 +item.itemDustSmallTungstenTitaniumCarbide.name=å°å †ç¢³åŒ–钨钛åˆé‡‘粉 +item.itemNuggetTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘ç²’ +item.itemPlateTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘æ¿ +item.itemPlateDoubleTungstenTitaniumCarbide.name=åŒé‡ç¢³åŒ–钨钛åˆé‡‘æ¿ +item.itemBoltTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘螺栓 +item.itemRodTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘æ† +item.itemRodLongTungstenTitaniumCarbide.name=长碳化钨钛åˆé‡‘æ† +item.itemRingTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘环 +item.itemScrewTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘èžºä¸ +item.itemRotorTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘è½¬å­ +item.itemGearTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘齿轮 +item.itemCellTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘å•å…ƒ +tile.Block of Tungsten Titanium Carbide.name=碳化钨钛åˆé‡‘å— +tile.Tungsten Titanium Carbide Frame Box.name=碳化钨钛åˆé‡‘框架 + +item.itemIngotNitinol60.name=é•é’›è¯º60é”­ +item.itemHotIngotNitinol60.name=热é•é’›è¯º60é”­ +item.itemDustNitinol60.name=é•é’›è¯º60粉 +item.itemDustTinyNitinol60.name=å°æ’®é•é’›è¯º60粉 +item.itemDustSmallNitinol60.name=å°å †é•é’›è¯º60粉 +item.itemNuggetNitinol60.name=é•é’›è¯º60ç²’ +item.itemPlateNitinol60.name=é•é’›è¯º60æ¿ +item.itemPlateDoubleNitinol60.name=åŒé‡é•é’›è¯º60æ¿ +item.itemBoltNitinol60.name=é•é’›è¯º60螺栓 +item.itemRodNitinol60.name=é•é’›è¯º60æ† +item.itemRodLongNitinol60.name=é•¿é•é’›è¯º60æ† +item.itemRingNitinol60.name=é•é’›è¯º60环 +item.itemScrewNitinol60.name=é•é’›è¯º60èžºä¸ +item.itemRotorNitinol60.name=é•é’›è¯º60è½¬å­ +item.itemGearNitinol60.name=é•é’›è¯º60齿轮 +item.itemCellNitinol60.name=é•é’›è¯º60å•å…ƒ +tile.Block of Nitinol 60.name=é•é’›è¯º60å— +tile.Nitinol 60 Frame Box.name=é•é’›è¯º60框架 + +item.itemIngotAdvancedNitinol.name=高级é•é’›è¯ºé”­ +item.itemHotIngotAdvancedNitinol.name=热高级é•é’›è¯ºé”­ +item.itemDustAdvancedNitinol.name=高级é•é’›è¯ºç²‰ +item.itemDustTinyAdvancedNitinol.name=å°æ’®é«˜çº§é•é’›è¯ºç²‰ +item.itemDustSmallAdvancedNitinol.name=å°å †é«˜çº§é•é’›è¯ºç²‰ +item.itemNuggetAdvancedNitinol.name=高级é•é’›è¯ºç²’ +item.itemPlateAdvancedNitinol.name=高级é•é’›è¯ºæ¿ +item.itemPlateDoubleAdvancedNitinol.name=åŒé‡é«˜çº§é•é’›è¯ºæ¿ +item.itemBoltAdvancedNitinol.name=高级é•é’›è¯ºèžºæ “ +item.itemRodAdvancedNitinol.name=高级é•é’›è¯ºæ† +item.itemRodLongAdvancedNitinol.name=长高级é•é’›è¯ºæ† +item.itemRingAdvancedNitinol.name=高级é•é’›è¯ºçŽ¯ +item.itemScrewAdvancedNitinol.name=高级é•é’›è¯ºèžºä¸ +item.itemRotorAdvancedNitinol.name=高级é•é’›è¯ºè½¬å­ +item.itemGearAdvancedNitinol.name=高级é•é’›è¯ºé½¿è½® +item.itemCellAdvancedNitinol.name=高级é•é’›è¯ºå•å…ƒ +tile.Block of Advanced Nitinol.name=高级é•é’›è¯ºå— +tile.Advanced Nitinol Frame Box.name=高级é•é’›è¯ºæ¡†æž¶ + +item.itemIngotArcanite.name=奥金锭 +item.itemHotIngotArcanite.name=热奥金锭 +item.itemDustArcanite.name=奥金粉 +item.itemDustTinyArcanite.name=å°æ’®å¥¥é‡‘粉 +item.itemDustSmallArcanite.name=å°å †å¥¥é‡‘粉 +item.itemNuggetArcanite.name=奥金粒 +item.itemPlateArcanite.name=å¥¥é‡‘æ¿ +item.itemPlateDoubleArcanite.name=åŒé‡å¥¥é‡‘æ¿ +item.itemBoltArcanite.name=奥金螺栓 +item.itemRodArcanite.name=å¥¥é‡‘æ† +item.itemRodLongArcanite.name=é•¿å¥¥é‡‘æ† +item.itemRingArcanite.name=奥金环 +item.itemScrewArcanite.name=å¥¥é‡‘èžºä¸ +item.itemRotorArcanite.name=å¥¥é‡‘è½¬å­ +item.itemGearArcanite.name=奥金齿轮 +item.itemCellArcanite.name=奥金å•å…ƒ +tile.Block of Arcanite.name=å¥¥é‡‘å— +tile.Arcanite Frame Box.name=奥金框架 + +item.itemIngotPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bé”­ +item.itemHotIngotPikyonium64B.name=热皮å¡ä¼˜åˆé‡‘64Bé”­ +item.itemDustPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B粉 +item.itemDustTinyPikyonium64B.name=å°æ’®çš®å¡ä¼˜åˆé‡‘64B粉 +item.itemDustSmallPikyonium64B.name=å°å †çš®å¡ä¼˜åˆé‡‘64B粉 +item.itemNuggetPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bç²’ +item.itemPlatePikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bæ¿ +item.itemPlateDoublePikyonium64B.name=åŒé‡çš®å¡ä¼˜åˆé‡‘64Bæ¿ +item.itemBoltPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B螺栓 +item.itemRodPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bæ† +item.itemRodLongPikyonium64B.name=é•¿çš®å¡ä¼˜åˆé‡‘64Bæ† +item.itemRingPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B环 +item.itemScrewPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bèžºä¸ +item.itemRotorPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bè½¬å­ +item.itemGearPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B齿轮 +item.itemCellPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bå•å…ƒ +tile.Block of Pikyonium 64B.name=çš®å¡ä¼˜åˆé‡‘64Bå— +tile.Pikyonium 64B Frame Box.name=çš®å¡ä¼˜åˆé‡‘64B框架 + +item.itemIngotCinobiteA243.name=西诺æŸA243é”­ +item.itemHotIngotCinobiteA243.name=热西诺æŸA243é”­ +item.itemDustCinobiteA243.name=西诺æŸA243粉 +item.itemDustTinyCinobiteA243.name=å°æ’®è¥¿è¯ºæŸA243粉 +item.itemDustSmallCinobiteA243.name=å°å †è¥¿è¯ºæŸA243粉 +item.itemNuggetCinobiteA243.name=西诺æŸA243ç²’ +item.itemPlateCinobiteA243.name=西诺æŸA243æ¿ +item.itemPlateDoubleCinobiteA243.name=åŒé‡è¥¿è¯ºæŸA243æ¿ +item.itemBoltCinobiteA243.name=西诺æŸA243螺栓 +item.itemRodCinobiteA243.name=西诺æŸA243æ† +item.itemRodLongCinobiteA243.name=长西诺æŸA243æ† +item.itemRingCinobiteA243.name=西诺æŸA243环 +item.itemScrewCinobiteA243.name=西诺æŸA243èžºä¸ +item.itemRotorCinobiteA243.name=西诺æŸA243è½¬å­ +item.itemGearCinobiteA243.name=西诺æŸA243齿轮 +item.itemCellCinobiteA243.name=西诺æŸA243å•å…ƒ +tile.Block of Cinobite A243.name=西诺æŸA243å— +tile.Cinobite A243 Frame Box.name=西诺æŸA243框架 + +item.itemIngotLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©é”­ +item.itemHotIngotLafiumCompound.name=热路è²æ©åŒ–åˆç‰©é”­ +item.itemDustLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©ç²‰ +item.itemDustTinyLafiumCompound.name=å°æ’®è·¯è²æ©åŒ–åˆç‰©ç²‰ +item.itemDustSmallLafiumCompound.name=å°å †è·¯è²æ©åŒ–åˆç‰©ç²‰ +item.itemNuggetLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©ç²’ +item.itemPlateLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©æ¿ +item.itemPlateDoubleLafiumCompound.name=åŒé‡è·¯è²æ©åŒ–åˆç‰©æ¿ +item.itemBoltLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©èžºæ “ +item.itemRodLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©æ† +item.itemRodLongLafiumCompound.name=é•¿è·¯è²æ©åŒ–åˆç‰©æ† +item.itemRingLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©çŽ¯ +item.itemScrewLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©èžºä¸ +item.itemRotorLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©è½¬å­ +item.itemGearLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©é½¿è½® +item.itemCellLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©å•å…ƒ +tile.Block of Lafium Compound.name=è·¯è²æ©åŒ–åˆç‰©å— +tile.Lafium Compound Frame Box.name=è·¯è²æ©åŒ–åˆç‰©æ¡†æž¶ + +item.itemIngotKoboldite.name=妖金锭 +item.itemHotIngotKoboldite.name=热妖金锭 +item.itemDustKoboldite.name=妖金粉 +item.itemDustTinyKoboldite.name=å°æ’®å¦–金粉 +item.itemDustSmallKoboldite.name=å°å †å¦–金粉 +item.itemNuggetKoboldite.name=妖金粒 +item.itemPlateKoboldite.name=å¦–é‡‘æ¿ +item.itemPlateDoubleKoboldite.name=åŒé‡å¦–é‡‘æ¿ +item.itemBoltKoboldite.name=妖金螺栓 +item.itemRodKoboldite.name=å¦–é‡‘æ† +item.itemRodLongKoboldite.name=é•¿å¦–é‡‘æ† +item.itemRingKoboldite.name=妖金环 +item.itemScrewKoboldite.name=å¦–é‡‘èžºä¸ +item.itemRotorKoboldite.name=å¦–é‡‘è½¬å­ +item.itemGearKoboldite.name=妖金齿轮 +item.itemCellKoboldite.name=妖金å•å…ƒ +tile.Block of Koboldite.name=å¦–é‡‘å— +tile.Koboldite Frame Box.name=妖金框架 + +item.itemIngotAbyssalAlloy.name=深渊åˆé‡‘é”­ +item.itemHotIngotAbyssalAlloy.name=热深渊åˆé‡‘é”­ +item.itemDustAbyssalAlloy.name=深渊åˆé‡‘粉 +item.itemDustTinyAbyssalAlloy.name=å°æ’®æ·±æ¸Šåˆé‡‘粉 +item.itemDustSmallAbyssalAlloy.name=å°å †æ·±æ¸Šåˆé‡‘粉 +item.itemNuggetAbyssalAlloy.name=深渊åˆé‡‘ç²’ +item.itemPlateAbyssalAlloy.name=深渊åˆé‡‘æ¿ +item.itemPlateDoubleAbyssalAlloy.name=åŒé‡æ·±æ¸Šåˆé‡‘æ¿ +item.itemBoltAbyssalAlloy.name=深渊åˆé‡‘螺栓 +item.itemRodAbyssalAlloy.name=深渊åˆé‡‘æ† +item.itemRodLongAbyssalAlloy.name=长深渊åˆé‡‘æ† +item.itemRingAbyssalAlloy.name=深渊åˆé‡‘环 +item.itemScrewAbyssalAlloy.name=深渊åˆé‡‘èžºä¸ +item.itemRotorAbyssalAlloy.name=深渊åˆé‡‘è½¬å­ +item.itemGearAbyssalAlloy.name=深渊åˆé‡‘齿轮 +item.itemCellAbyssalAlloy.name=深渊åˆé‡‘å•å…ƒ +tile.Block of Abyssal Alloy.name=深渊åˆé‡‘å— +tile.Abyssal Alloy Frame Box.name=深渊åˆé‡‘框架 + + + + + + + + + + + + + + + + + + + +//Radioactive +item.dustTechnetium99M.name=é”99M粉 +item.dustTechnetium99.name=é”99粉 +item.dustMolybdenum99.name=é’¼99粉 + +//Bags +item.item.MysticBag.name=神秘袋 +item.item.Eatotron9000.name=埃托特洛尼克9000åž‹ +item.item.ToolBox.name=工人的工具箱 + +//Cells +item.Bromine.name=溴å•å…ƒ +item.Krypton.name=æ°ªå•å…ƒ +item.cryotheum.name=凛冰å•å…ƒ +item.pyrotheum.name=烈焰之炽焱å•å…ƒ +item.GeneticMutagen.name=诱å˜å‰‚å•å…ƒ + +//Ingots +item.itemHotIngotIncoloy020.name=热è€çƒ­é“¬é“åˆé‡‘-020é”­ +item.itemHotIngotIncoloyDS.name=热è€çƒ­é“¬é“åˆé‡‘-DSé”­ +item.itemHotIngotTalonite.name=热铬钴磷酸ç›åˆé‡‘é”­ +item.itemHotIngotHastelloyX.name=热哈斯特洛ä¾åˆé‡‘-Xé”­ +item.itemHotIngotHastelloyW.name=热哈斯特洛ä¾åˆé‡‘-W碳化物锭 + +//Railcraft Fix +item.railcraft.part.plate.lead.name=é“…æ¿ + +//Ions +item.particle.ion.Hydrogen.name=æ°¢ç¦»å­ +item.particle.ion.Helium.name=æ°¦ç¦»å­ +item.particle.ion.Lithium.name=é”‚ç¦»å­ +item.particle.ion.Beryllium.name=é“ç¦»å­ +item.particle.ion.Boron.name=ç¡¼ç¦»å­ +item.particle.ion.Carbon.name=ç¢³ç¦»å­ +item.particle.ion.Nitrogen.name=æ°®ç¦»å­ +item.particle.ion.Oxygen.name=æ°§ç¦»å­ +item.particle.ion.Fluorine.name=æ°Ÿç¦»å­ +item.particle.ion.Neon.name=æ°–ç¦»å­ +item.particle.ion.Sodium.name=é’ ç¦»å­ +item.particle.ion.Magnesium.name=é•ç¦»å­ +item.particle.ion.Aluminum.name=é“ç¦»å­ +item.particle.ion.Silicon.name=ç¡…ç¦»å­ +item.particle.ion.Phosphorus.name=ç£·ç¦»å­ +item.particle.ion.Sulfur.name=ç¡«ç¦»å­ +item.particle.ion.Chlorine.name=æ°¯ç¦»å­ +item.particle.ion.Argon.name=æ°©ç¦»å­ +item.particle.ion.Potassium.name=é’¾ç¦»å­ +item.particle.ion.Calcium.name=é’™ç¦»å­ +item.particle.ion.Scandium.name=é’ªç¦»å­ +item.particle.ion.Titanium.name=é’›ç¦»å­ +item.particle.ion.Vanadium.name=é’’ç¦»å­ +item.particle.ion.Chromium.name=é“¬ç¦»å­ +item.particle.ion.Manganese.name=é”°ç¦»å­ +item.particle.ion.Iron.name=é“ç¦»å­ +item.particle.ion.Cobalt.name=é’´ç¦»å­ +item.particle.ion.Nickel.name=é•ç¦»å­ +item.particle.ion.Copper.name=é“œç¦»å­ +item.particle.ion.Zinc.name=é”Œç¦»å­ +item.particle.ion.Gallium.name=é•“ç¦»å­ +item.particle.ion.Germanium.name=é”—ç¦»å­ +item.particle.ion.Arsenic.name=ç ·ç¦»å­ +item.particle.ion.Selenium.name=ç¡’ç¦»å­ +item.particle.ion.Bromine.name=æº´ç¦»å­ +item.particle.ion.Krypton.name=æ°ªç¦»å­ +item.particle.ion.Rubidium.name=é“·ç¦»å­ +item.particle.ion.Strontium.name=é”¶ç¦»å­ +item.particle.ion.Yttrium.name=é’‡ç¦»å­ +item.particle.ion.Zirconium.name=é”†ç¦»å­ +item.particle.ion.Niobium.name=é“Œç¦»å­ +item.particle.ion.Molybdenum.name=é’¼ç¦»å­ +item.particle.ion.Technetium.name=é”ç¦»å­ +item.particle.ion.Ruthenium.name=é’Œç¦»å­ +item.particle.ion.Rhodium.name=é“‘ç¦»å­ +item.particle.ion.Palladium.name=é’¯ç¦»å­ +item.particle.ion.Silver.name=é“¶ç¦»å­ +item.particle.ion.Cadmium.name=é•‰ç¦»å­ +item.particle.ion.Indium.name=é“Ÿç¦»å­ +item.particle.ion.Tin.name=é”¡ç¦»å­ +item.particle.ion.Antimony.name=é”‘ç¦»å­ +item.particle.ion.Tellurium.name=ç¢²ç¦»å­ +item.particle.ion.Iodine.name=ç¢˜ç¦»å­ +item.particle.ion.Xenon.name=æ°™ç¦»å­ +item.particle.ion.Cesium.name=é“¯ç¦»å­ +item.particle.ion.Barium.name=é’¡ç¦»å­ +item.particle.ion.Lanthanum.name=é•§ç¦»å­ +item.particle.ion.Cerium.name=é“ˆç¦»å­ +item.particle.ion.Praseodymium.name=é•¨ç¦»å­ +item.particle.ion.Neodymium.name=é’•ç¦»å­ +item.particle.ion.Promethium.name=é’·ç¦»å­ +item.particle.ion.Samarium.name=é’ç¦»å­ +item.particle.ion.Europium.name=é“•ç¦»å­ +item.particle.ion.Gadolinium.name=é’†ç¦»å­ +item.particle.ion.Terbium.name=é“½ç¦»å­ +item.particle.ion.Dysprosium.name=é•ç¦»å­ +item.particle.ion.Holmium.name=é’¬ç¦»å­ +item.particle.ion.Erbium.name=é“’ç¦»å­ +item.particle.ion.Thulium.name=é“¥ç¦»å­ +item.particle.ion.Ytterbium.name=é•±ç¦»å­ +item.particle.ion.Lutetium.name=é•ç¦»å­ +item.particle.ion.Hafnium.name=é“ªç¦»å­ +item.particle.ion.Tantalum.name=é’½ç¦»å­ +item.particle.ion.Tungsten.name=é’¨ç¦»å­ +item.particle.ion.Rhenium.name=é“¼ç¦»å­ +item.particle.ion.Osmium.name=é”‡ç¦»å­ +item.particle.ion.Iridium.name=é“±ç¦»å­ +item.particle.ion.Platinum.name=é“‚ç¦»å­ +item.particle.ion.Gold.name=é‡‘ç¦»å­ +item.particle.ion.Mercury.name=æ±žç¦»å­ +item.particle.ion.Thallium.name=é“Šç¦»å­ +item.particle.ion.Lead.name=é“…ç¦»å­ +item.particle.ion.Bismuth.name=é“‹ç¦»å­ +item.particle.ion.Polonium.name=é’‹ç¦»å­ +item.particle.ion.Astatine.name=ç ¹ç¦»å­ +item.particle.ion.Radon.name=æ°¡ç¦»å­ +item.particle.ion.Francium.name=é’«ç¦»å­ +item.particle.ion.Radium.name=é•­ç¦»å­ +item.particle.ion.Actinium.name=é”•ç¦»å­ +item.particle.ion.Thorium.name=é’ç¦»å­ +item.particle.ion.Protactinium.name=é•¤ç¦»å­ +item.particle.ion.Uranium.name=é“€ç¦»å­ +item.particle.ion.Neptunium.name=é•Žç¦»å­ +item.particle.ion.Plutonium.name=é’šç¦»å­ +item.particle.ion.Americium.name=é•…ç¦»å­ +item.particle.ion.Curium.name=é””ç¦»å­ +item.particle.ion.Berkelium.name=é”«ç¦»å­ +item.particle.ion.Californium.name=é”Žç¦»å­ +item.particle.ion.Einsteinium.name=é”¿ç¦»å­ +item.particle.ion.Fermium.name=é•„ç¦»å­ +item.particle.ion.Mendelevium.name=é’”ç¦»å­ +item.particle.ion.Nobelium.name=é”˜ç¦»å­ +item.particle.ion.Lawrencium.name=é“¹ç¦»å­ +item.particle.ion.Rutherfordium.name=î¤€ç¦»å­ +item.particle.ion.Dubnium.name=î¤ç¦»å­ +item.particle.ion.Seaborgium.name=î¤‚ç¦»å­ +item.particle.ion.Bohrium.name=î¤ƒç¦»å­ +item.particle.ion.Hassium.name=î¤„ç¦»å­ +item.particle.ion.Meitnerium.name=é¿ç¦»å­ +item.particle.ion.Darmstadtium.name=î¤†ç¦»å­ +item.particle.ion.Roentgenium.name=î¤‡ç¦»å­ +item.particle.ion.Copernicium.name=é¿”ç¦»å­ +item.particle.ion.Nihonium.name=é¿­ç¦»å­ +item.particle.ion.Flerovium.name=î¤Šç¦»å­ +item.particle.ion.Moscovium.name=é•†ç¦»å­ +item.particle.ion.Livermorium.name=î¤Œç¦»å­ +item.particle.ion.Tennessine.name=é¿¬ç¦»å­ +item.particle.ion.Oganesson.name=é¿«ç¦»å­ + + +item.particle.base.Graviton.name=å¼•åŠ›å­ +item.particle.base.Up.name=u夸克 +item.particle.base.Down.name=b夸克 +item.particle.base.Charm.name=c夸克 +item.particle.base.Strange.name=s夸克 +item.particle.base.Top.name=t夸克 +item.particle.base.Bottom.name=b夸克 +item.particle.base.Electron.name=eå­ +item.particle.base.Electron Neutrino.name=eå­ä¸­å¾®å­ +item.particle.base.Muon.name=Î¼å­ +item.particle.base.Muon Neutrino.name=μå­ä¸­å¾®å­ +item.particle.base.Tau.name=Ï„å­ +item.particle.base.Tau Neutrino.name=Ï„å­ä¸­å¾®å­ +item.particle.base.Gluon.name=èƒ¶å­ +item.particle.base.Photon.name=å…‰å­ +item.particle.base.Z Boson.name=ZçŽ»è‰²å­ +item.particle.base.W Boson.name=WçŽ»è‰²å­ +item.particle.base.Higgs Boson.name=å¸Œæ ¼æ–¯çŽ»è‰²å­ +item.particle.base.Proton.name=è´¨å­ +item.particle.base.Neutron.name=ä¸­å­ +item.particle.base.Lambda.name=λ +item.particle.base.Omega.name=Ω +item.particle.base.Pion.name=ä»‹å­ +item.particle.base.ETA Meson.name=Î·ä»‹å­ +item.particle.base.Unknown.name=æœªçŸ¥ç²’å­ + +//Added 12/1/19 + +tile.playerDoorGlass.name=玻璃自动门 +tile.playerDoorCactus.name=仙人掌自动门 +tile.playerDoorIce.name=冰自动门 +tile.playerDoorIron.name=é“自动门 +tile.playerDoorWood.name=木自动门 + +//Added 4/2/19 + +item.GTPP.BattPack.06.name=充电工具包[LuV] +item.GTPP.BattPack.07.name=充电工具包[ZPM] +item.GTPP.BattPack.08.name=充电工具包[UV] +item.GTPP.BattPack.09.name=充电工具包[MAX] + + +//Added 13/3/19 +item.gtpp.debug.scanner.name=GT++排错扫æ器 +item.RawWaste.name=动物粪便å•å…ƒ +item.ManureSlurry.name=粪浆å•å…ƒ +item.FertileManureSlurry.name=肥沃的粪浆å•å…ƒ +item.itemDustTinyDemicheleiteBr.name=å°æ’®å¾·ç±³å‡¯èŽ±(Br) +item.itemDustSmallDemicheleiteBr.name=å°å †å¾·ç±³å‡¯èŽ±(Br) +tile.blockPooCollector.name=å†œä¸šä¸‹æ°´é“ +tile.Block of Lithium 7.name=锂7å— + +//Added 14/3/19 +item.blood.name=è¡€å•å…ƒ +item.aniline.name=苯胺å•å…ƒ +item.cadaverine.name=尸胺å•å…ƒ +item.polyurethane.name=èšæ°¨é…¯å•å…ƒ +item.putrescine.name=è…胺å•å…ƒ +item.cyclohexane.name=环己胺å•å…ƒ +item.cyclohexanone.name=环己酮å•å…ƒ +item.nitrobenzene.name=ç¡åŸºè‹¯å•å…ƒ +item.ender.name=液体末影å•å…ƒ +item.xpjuice.name=液体ç»éªŒå•å…ƒ +item.itemBombUnf.name=å¯æŠ•æŽ·ç‚¸å¼¹(未完æˆ) +item.itemBombCasing.name=炸弹框架 +item.gtpp.throwable.bomb.name=å¯æŠ•æŽ·ç‚¸å¼¹ +item.itemDetCable.name=炸弹ä¿é™©ä¸ +tile.blockPooCollector.0.name=å†œä¸šä¸‹æ°´é“ +tile.blockPooCollector.8.name=生物å¤åˆæ”¶é›†å™¨ +item.itemIngotBakelite.name=电木锭 +item.itemDustBakelite.name=电木粉 +item.itemDustTinyBakelite.name=å°æ’®ç”µæœ¨ç²‰ +item.itemDustSmallBakelite.name=å°å †ç”µæœ¨ç²‰ +item.itemNuggetBakelite.name=电木粒 +item.itemPlateBakelite.name=ç”µæœ¨æ¿ +item.itemPlateDoubleBakelite.name=åŒé‡ç”µæœ¨æ¿ +item.itemCellBakelite.name=电木å•å…ƒ +tile.Block of Bakelite.name=ç”µæœ¨å— +item.itemIngotNylon.name=尼龙锭 +item.itemDustNylon.name=尼龙粉 +item.itemDustTinyNylon.name=å°æ’®å°¼é¾™ç²‰ +item.itemDustSmallNylon.name=å°å †å°¼é¾™ç²‰ +item.itemNuggetNylon.name=尼龙粒 +item.itemPlateNylon.name=å°¼é¾™æ¿ +item.itemPlateDoubleNylon.name=åŒé‡å°¼é¾™æ¿ +item.itemCellNylon.name=尼龙å•å…ƒ +tile.Block of Nylon.name=å°¼é¾™å— +item.itemIngotTeflon.name=特氟龙锭 +item.itemDustTeflon.name=特氟龙粉 +item.itemDustTinyTeflon.name=å°æ’®ç‰¹æ°Ÿé¾™ç²‰ +item.itemDustSmallTeflon.name=å°å †ç‰¹æ°Ÿé¾™ç²‰ +item.itemNuggetTeflon.name=特氟龙粒 +item.itemPlateTeflon.name=ç‰¹æ°Ÿé¾™æ¿ +item.itemPlateDoubleTeflon.name=åŒé‡ç‰¹æ°Ÿé¾™æ¿ +item.itemCellTeflon.name=特氟龙å•å…ƒ +tile.Block of Teflon.name=ç‰¹æ°Ÿé¾™å— + +//Added 17/4/19 +//Spelling Corrections +item.particle.ion.Aluminium.name=é“ç¦»å­ +item.particle.ion.Caesium.name=é“¯ç¦»å­ + +item.GTPP.MonsterKiller.Enderman.name=末影人æ€æ‰‹ +item.GTPP.MonsterKiller.Spider.name=蜘蛛æ€æ‰‹ +item.GTPP.MonsterKiller.Skeleton.name=骷髅æ€æ‰‹ +item.GTPP.MonsterKiller.Creeper.name=爬行者æ€æ‰‹ +item.GTPP.MonsterKiller.Zombie.name=僵尸æ€æ‰‹ +item.GTPP.MonsterKiller.Hellish.name=下界生物æ€æ‰‹ + +item.itemIngotRunite.name=虚æ©é”­ +item.itemDustRunite.name=虚æ©ç²‰ +item.itemDustTinyRunite.name=å°æ’®è™šæ©ç²‰ +item.itemDustSmallRunite.name=å°å †è™šæ©ç²‰ +item.itemNuggetRunite.name=虚æ©é”­ +item.itemPlateRunite.name=虚æ©æ¿ +item.itemPlateDoubleRunite.name=åŒé‡è™šæ©æ¿ +item.itemCellRunite.name=虚æ©å•å…ƒ +tile.Block of Runite.name=虚æ©å— + +item.itemIngotDragonblood.name=龙血锭 +item.itemDustDragonblood.name=龙血粉 +item.itemDustTinyDragonblood.name=å°æ’®é¾™è¡€ç²‰ +item.itemDustSmallDragonblood.name=å°å †é¾™è¡€ç²‰ +item.itemNuggetDragonblood.name=龙血粒 +item.itemPlateDragonblood.name=é¾™è¡€æ¿ +item.itemPlateDoubleDragonblood.name=åŒé‡é¾™è¡€æ¿ +item.itemCellDragonblood.name=龙血å•å…ƒ +tile.Block of Dragonblood.name=é¾™è¡€å— + +item.itemIngotBlackTitanium.name=黑钛锭 +item.itemDustBlackTitanium.name=黑钛粉 +item.itemDustTinyBlackTitanium.name=å°æ’®é»‘钛粉 +item.itemDustSmallBlackTitanium.name=å°å †é»‘钛粉 +item.itemNuggetBlackTitanium.name=黑钛粒 +item.itemPlateBlackTitanium.name=é»‘é’›æ¿ +item.itemPlateDoubleBlackTitanium.name=åŒé‡é»‘é’›æ¿ +item.itemCellBlackTitanium.name=黑钛å•å…ƒ +tile.Block of Black Titanium.name=é»‘é’›å— + +item.itemIngotAncientGranite.name=å¤èŠ±å²—岩锭 +item.itemHotIngotAncientGranite.name=热å¤èŠ±å²—岩锭 +item.itemDustAncientGranite.name=å¤èŠ±å²—岩粉 +item.itemDustTinyAncientGranite.name=å°æ’®å¤èŠ±å²—岩粉 +item.itemDustSmallAncientGranite.name=å°å †å¤èŠ±å²—岩粉 +item.itemNuggetAncientGranite.name=å¤èŠ±å²—岩粒 +item.itemPlateAncientGranite.name=å¤èŠ±å²—å²©æ¿ +item.itemPlateDoubleAncientGranite.name=åŒé‡å¤èŠ±å²—å²©æ¿ +tile.Block of Ancient Granite.name=å¤èŠ±å²—å²©å— + +item.itemIngotBabbitAlloy.name=å·´æ°åˆé‡‘é”­ +item.itemHotIngotBabbitAlloy.name=热巴æ°åˆé‡‘é”­ +item.itemDustBabbitAlloy.name=å·´æ°åˆé‡‘粉 +item.itemDustTinyBabbitAlloy.name=å°æ’®å·´æ°åˆé‡‘粉 +item.itemDustSmallBabbitAlloy.name=å°å †å·´æ°åˆé‡‘粉 +item.itemNuggetBabbitAlloy.name=å·´æ°åˆé‡‘ç²’ +item.itemPlateBabbitAlloy.name=å·´æ°åˆé‡‘æ¿ +item.itemPlateDoubleBabbitAlloy.name=åŒé‡å·´æ°åˆé‡‘æ¿ +item.itemCellBabbitAlloy.name=å·´æ°åˆé‡‘å•å…ƒ +tile.Block of Babbit Alloy.name=å·´æ°åˆé‡‘å— + +item.itemIngotBlackMetal.name=黑物质锭 +item.itemHotIngotBlackMetal.name=热黑物质锭 +item.itemDustBlackMetal.name=黑物质粉 +item.itemDustTinyBlackMetal.name=å°æ’®é»‘物质粉 +item.itemDustSmallBlackMetal.name=å°å †é»‘物质粉 +item.itemNuggetBlackMetal.name=黑物质粒 +item.itemPlateBlackMetal.name=é»‘ç‰©è´¨æ¿ +item.itemPlateDoubleBlackMetal.name=åŒé‡é»‘ç‰©è´¨æ¿ +item.itemBoltBlackMetal.name=黑物质螺栓 +item.itemRodBlackMetal.name=é»‘ç‰©è´¨æ† +item.itemRodLongBlackMetal.name=é•¿é»‘ç‰©è´¨æ† +item.itemRingBlackMetal.name=黑物质环 +item.itemScrewBlackMetal.name=é»‘ç‰©è´¨èžºä¸ +item.itemRotorBlackMetal.name=é»‘ç‰©è´¨è½¬å­ +item.itemGearBlackMetal.name=黑物质齿轮 +item.itemCellBlackMetal.name=黑物质å•å…ƒ +tile.Block of Black Metal.name=é»‘ç‰©è´¨å— +tile.Black Metal Frame Box.name=黑物质框架 + +item.itemIngotWhiteMetal.name=白物质锭 +item.itemHotIngotWhiteMetal.name=热白物质锭 +item.itemDustWhiteMetal.name=白物质粉 +item.itemDustTinyWhiteMetal.name=å°æ’®ç™½ç‰©è´¨ç²‰ +item.itemDustSmallWhiteMetal.name=å°å †ç™½ç‰©è´¨ç²‰ +item.itemNuggetWhiteMetal.name=白物质粒 +item.itemPlateWhiteMetal.name=ç™½ç‰©è´¨æ¿ +item.itemPlateDoubleWhiteMetal.name=åŒé‡ç™½ç‰©è´¨æ¿ +item.itemBoltWhiteMetal.name=白物质螺栓 +item.itemRodWhiteMetal.name=ç™½ç‰©è´¨æ† +item.itemRodLongWhiteMetal.name=é•¿ç™½ç‰©è´¨æ† +item.itemRingWhiteMetal.name=白物质环 +item.itemScrewWhiteMetal.name=ç™½ç‰©è´¨èžºä¸ +item.itemRotorWhiteMetal.name=ç™½ç‰©è´¨è½¬å­ +item.itemGearWhiteMetal.name=白物质齿轮 +item.itemCellWhiteMetal.name=白物质å•å…ƒ +tile.Block of White Metal.name=ç™½ç‰©è´¨å— +tile.White Metal Frame Box.name=白物质框架 + +//Added 29/04/2019 +tile.OreRunite.name=虚æ©çŸ¿ +item.crushedRunite.name=粉碎的虚æ©çŸ¿ +item.crushedCentrifugedRunite.name=离心的粉碎虚æ©çŸ¿ +item.crushedPurifiedRunite.name=洗净的的粉碎虚æ©çŸ¿ +item.dustImpureRunite.name=å«æ‚虚æ©ç²‰ +item.dustPureRunite.name=洗净虚æ©ç²‰ + +tile.OreAncientGranite.name=å¤èŠ±å²—岩矿 +item.crushedAncientGranite.name=粉碎的å¤èŠ±å²—岩矿 +item.crushedCentrifugedAncientGranite.name=离心的粉碎å¤èŠ±å²—岩矿 +item.crushedPurifiedAncientGranite.name=洗净的粉碎å¤èŠ±å²—岩矿 +item.dustImpureAncientGranite.name=å«æ‚å¤èŠ±å²—岩粉 +item.dustPureAncientGranite.name=洗净å¤èŠ±å²—岩粉 + +item.itemIngotRhugnor.name=é²æ ¼è¯ºé”­ +item.itemDustRhugnor.name=é²æ ¼è¯ºç²‰ +item.itemDustTinyRhugnor.name=å°æ’®é²æ ¼è¯ºç²‰ +item.itemDustSmallRhugnor.name=å°å †é²æ ¼è¯ºç²‰ +item.itemNuggetRhugnor.name=é²æ ¼è¯ºç²’ +item.itemPlateRhugnor.name=é²æ ¼è¯ºæ¿ +item.itemPlateDoubleRhugnor.name=åŒé‡é²æ ¼è¯ºæ¿ +item.itemCellRhugnor.name=é²æ ¼è¯ºå•å…ƒ +tile.Block of Rhugnor.name=é²æ ¼è¯ºå— + + + + +//Added 13/5/19 + +item.GTPP.BattPack.01.name=充电工具包[LV] +item.GTPP.BattPack.02.name=充电工具包[MV] +item.GTPP.BattPack.03.name=充电工具包[HV] +item.GTPP.BattPack.04.name=充电工具包[EV] +item.GTPP.BattPack.05.name=充电工具包[IV] +item.IndustrialDiamondExquisite.name=精致的工业钻石 + +item.itemSpringCelestialTungsten.name=天体钨弹簧 +item.itemSpringWhiteMetal.name=白物质弹簧 +item.itemSpringNitinol60.name=é•é’›è¯º60弹簧 +item.itemSpringWatertightSteel.name=防水钢弹簧 +item.itemSpringEglinSteel.name=埃格林钢弹簧 + +item.itemSmallSpringMaragingSteel250.name=å°åž‹é©¬æ°ä½“时效钢250弹簧 +item.itemSmallSpringNichrome.name=å°åž‹é•é“¬åˆé‡‘弹簧 +item.itemSmallSpringStaballoy.name=å°åž‹è´«é“€åˆé‡‘弹簧 +item.itemSmallSpringBlackSteel.name=å°åž‹é»‘钢弹簧 +item.itemSmallSpringBlackTitanium.name=å°åž‹é»‘钛弹簧 + +item.itemFineWireWhiteMetal.name=精致白物质导线 +item.itemFineWirePalladium.name=精致钯导线 +item.itemFineWireZirconium.name=精致锆导线 +item.itemFineWireGrisium.name=精致ç°é’›åˆé‡‘导线 +item.itemFineWireBabbitAlloy.name=精致巴æ°åˆé‡‘导线 +item.itemFineWireKoboldite.name=精致妖金导线 +item.itemFineWireHG1223.name=精致HG-1223导线 +item.itemFineWireQuantum.name=精致é‡å­å¯¼çº¿ + +item.itemHeavyPlatePotin.name=é‡åž‹ç²—é’é“œæ¿ +item.itemHeavyPlateWatertightSteel.name=é‡åž‹é˜²æ°´é’¢æ¿ +item.itemHeavyPlateBronze.name=é‡åž‹é’é“œæ¿ +item.itemHeavyPlateOsmiridium.name=é‡åž‹é“±é”‡åˆé‡‘æ¿ +item.itemHeavyPlateQuantum.name=é‡åž‹é‡å­æ¿ +item.itemHeavyPlateBlackSteel.name=é‡åž‹é»‘é’¢æ¿ +item.itemHeavyPlateStainlessSteel.name=é‡åž‹ä¸é”ˆé’¢æ¿ +item.itemHeavyPlateEglinSteel.name=é‡åž‹åŸƒæ ¼æž—é’¢æ¿ +item.itemHeavyPlateMaragingSteel300.name=é‡åž‹é©¬æ°ä½“时效钢300æ¿ +item.itemHeavyPlateTalonite.name=铬钴磷酸ç›åˆé‡‘æ¿ +item.itemHeavyPlateHypogen.name=é‡åž‹æµ·ç€çæ¿ +item.itemHeavyPlateRhugnor.name=é‡åž‹é²æ ¼è¯ºæ¿ +item.itemHeavyPlateAdvancedNitinol.name=é‡åž‹é«˜çº§é•é’›è¯ºæ¿ +item.itemHeavyPlateAstralTitanium.name=é‡åž‹æ˜Ÿä½“é’›æ¿ +item.itemHeavyPlateCelestialTungsten.name=é‡åž‹å¤©ä½“é’¨æ¿ +item.itemHeavyPlateWhiteMetal.name=é‡åž‹ç™½ç‰©è´¨æ¿ +item.itemHeavyPlateBlackMetal.name=é‡åž‹é»‘ç‰©è´¨æ¿ +item.itemHeavyPlateAncientGranite.name=é‡åž‹å¤èŠ±å²—å²©æ¿ + +item.GTPP.bauble.fireprotection.0.name=超级披è¨æ‰‹å¥— + + +//Added 16/5/19 +item.itemCellSeleniumDioxide.name=二氧化硒å•å…ƒ +item.itemCellSeleniousAcid.name=亚硒酸å•å…ƒ + +//Added 25/7/19 +container.pestkiller=害虫æ€æ‰‹ + +//Added 15/8/19 +gtpp.nei.decayables=å¯è¡°å˜ç®±å­(é“…å°ç›’) +entity.batKing.name=è™è ä¹‹çŽ‹ +item.itemCellCarbyne.name=直链乙炔碳å•å…ƒ +item.itemCellHydrogenCyanide.name=氢氰酸å•å…ƒ +item.itemCactusCharcoal.name=仙人掌炭 +item.itemCactusCoke.name=仙人掌焦炭 +item.itemSugarCharcoal.name=ç³–ç‚­ +item.itemSugarCoke.name=糖焦炭 +item.LiquidHydrogen.name=液氢å•å…ƒ[LOH] + + + +//Added 24/8/19 +//Debug Labels +tile.blockDoorAlloy.name=防爆门 +tile.blockInhibitorObelisk.name=ä¼ é€æŠ‘制方尖碑 +tile.Battlesign.name=æˆ˜æ–—ç‰Œå­ +tile.blockMagicBox.name=奥法之盒 +tile.blockManaPod.name=法力èšèŒŽ +tile.buildToolBlock.name=å·¥å…·æ–¹å— +tile.blockRedPlasma.name=红色等离å­ä½“æ–¹å— +tile.pipeBlock.name=ç®¡é“ +item.null.name=å‘ALKALUS报告错误 + + +//Added 24/8/19 +tile.OreGreenockite.name=硫镉矿石 +item.crushedGreenockite.name=粉碎的硫镉矿石 +item.crushedCentrifugedGreenockite.name=离心硫镉矿石 +item.crushedPurifiedGreenockite.name=洗净的硫镉矿石 +item.dustImpureGreenockite.name=å«æ‚硫镉矿粉 +item.dustPureGreenockite.name=æ´å‡€ç¡«é•‰çŸ¿ç²‰ +item.itemDustGreenockite.name=硫镉矿粉 +item.itemDustTinyGreenockite.name=å°æ’®ç¡«é•‰çŸ¿ç²‰ +item.itemDustSmallGreenockite.name=å°å †ç¡«é•‰çŸ¿ç²‰ + +tile.OreRareEarthI.name=稀土(I)矿石 +item.crushedRareEarthI.name=粉碎的稀土(I)矿石 +item.crushedCentrifugedRareEarthI.name=离心稀土(I)矿石 +item.crushedPurifiedRareEarthI.name=洗净的稀土(I)矿石 +item.dustImpureRareEarthI.name=å«æ‚稀土(I)粉 +item.dustPureRareEarthI.name=æ´å‡€ç¨€åœŸ(I)粉 +item.itemDustRareEarthI.name=稀土(I)粉 +item.itemDustTinyRareEarthI.name=å°æ’®ç¨€åœŸ(I)粉 +item.itemDustSmallRareEarthI.name=å°å †ç¨€åœŸ(I)粉 + +tile.OreRareEarthII.name=稀土(II)矿石 +item.crushedRareEarthII.name=粉碎的稀土(II)矿石 +item.crushedCentrifugedRareEarthII.name=离心稀土(II)矿石 +item.crushedPurifiedRareEarthII.name=洗净的稀土(II)矿石 +item.dustImpureRareEarthII.name=å«æ‚稀土(II)粉 +item.dustPureRareEarthII.name=æ´å‡€ç¨€åœŸ(II)粉 +item.itemDustRareEarthII.name=稀土(II)粉 +item.itemDustTinyRareEarthII.name=å°æ’®ç¨€åœŸ(II)粉 +item.itemDustSmallRareEarthII.name=å°å †ç¨€åœŸ(II)粉 + +tile.OreRareEarthIII.name=稀土(III)矿石 +item.crushedRareEarthIII.name=粉碎的稀土(III)矿石 +item.crushedCentrifugedRareEarthIII.name=离心稀土(III)矿石 +item.crushedPurifiedRareEarthIII.name=洗净的稀土(III)矿石 +item.dustImpureRareEarthIII.name=å«æ‚稀土(III)粉 +item.dustPureRareEarthIII.name=æ´å‡€ç¨€åœŸ(III)粉 +item.itemDustRareEarthIII.name=稀土(III)粉 +item.itemDustTinyRareEarthIII.name=å°æ’®ç¨€åœŸ(III)粉 +item.itemDustSmallRareEarthIII.name=å°å †ç¨€åœŸ(III)粉 + + + +//Added 13/10/19 +tile.blockRoundRobinator.0.name=自动输出机 I +tile.blockRoundRobinator.1.name=自动输出机 II +tile.blockRoundRobinator.2.name=自动输出机 III +tile.blockRoundRobinator.3.name=自动输出机 IV +tile.blockRoundRobinator.4.name=自动输出机 V + + +//Added 16/10/19 +item.BioRecipeSelector.name=编程生物电路 +item.FermentationBase.name=å‘酵基å•å…ƒ +item.ureamix.name=å°¿ç´ æ··åˆç‰©å•å…ƒ +item.liquidresin.name=液æ€æ ‘è„‚å•å…ƒ +item.propionicacid.name=丙酸å•å…ƒ +item.aceticacid.name=乙酸å•å…ƒ +item.BasicAgrichemItem.0.name=藻类生物质 +item.BasicAgrichemItem.1.name=绿藻生物质 +item.BasicAgrichemItem.2.name=è¤è—»ç”Ÿç‰©è´¨ +item.BasicAgrichemItem.3.name=金è¤è—»ç”Ÿç‰©è´¨ +item.BasicAgrichemItem.4.name=红藻生物质 +item.BasicAgrichemItem.5.name=纤维素纤维 +item.BasicAgrichemItem.6.name=金è¤çº¤ç»´ç´ çº¤ç»´ +item.BasicAgrichemItem.7.name=红色纤维素纤维 +item.BasicAgrichemItem.8.name=堆肥 +item.BasicAgrichemItem.9.name=木颗粒 +item.BasicAgrichemItem.10.name=木砖 +item.BasicAgrichemItem.11.name=纤维素浆 +item.BasicAgrichemItem.12.name=粗制生物树脂 +item.BasicAgrichemItem.13.name=催化剂载体 +item.BasicAgrichemItem.14.name=绿色金属催化剂 +item.BasicAgrichemItem.15.name=藻酸 +item.BasicAgrichemItem.16.name=æ°§åŒ–é“ +item.BasicAgrichemItem.17.name=é“颗粒 +item.BasicAgrichemItem.18.name=é“酸钠 +item.BasicAgrichemItem.19.name=氢氧化钠 +item.BasicAgrichemItem.20.name=碳酸钠 +item.BasicAgrichemItem.21.name=氯化锂 + +//Added 24/10/19 +item.butanol.name=ä¸é†‡å•å…ƒ + +//Try Fix IC2 Garbage vv +fluidHotWater=热水 +fluidHotWater.name=热水 +//Try Fix IC2 Garbage ^^ + + +//Added 11/12/19 +item.itemHotIngotTitanium.name=热钛锭 +item.OilHeavy.name=é‡æ²¹å•å…ƒ +item.UnsymmetricalDimethylhydrazine.name=å二甲肼å•å…ƒ +item.benzene.name=苯å•å…ƒ +item.Benzene.name=苯å•å…ƒ +item.phenol.name=苯酚å•å…ƒ +item.CarbonDioxide.name=二氧化碳å•å…ƒ +item.itemCellCarbonDioxide.name=二氧化碳å•å…ƒ +item.CarbonMonoxide.name=一氧化碳å•å…ƒ +item.itemCellCarbonMonoxide.name=一氧化碳å•å…ƒ +item.acetone.name=丙酮å•å…ƒ +item.saltwater.name=ç›æ°´å•å…ƒ +item.BasicAgrichemItem.22.name=模具(颗粒) +item.BasicAgrichemItem.23.name=æ´å‡€é“æ··åˆç‰© + +//Added 12/12/19 + +item.BasicGenericChemItem.0.name=红色金属催化剂 +item.BasicGenericChemItem.1.name=黄色金属催化剂 +item.BasicGenericChemItem.2.name=è“色金属催化剂 +item.BasicGenericChemItem.3.name=橙色金属催化剂 +item.BasicGenericChemItem.4.name=紫色金属催化剂 +item.BasicGenericChemItem.5.name=棕色金属催化剂 +item.MudRedSlurry.name=红色泥浆å•å…ƒ +item.liquid_toluene.name=甲苯å•å…ƒ + +item.BasicAlgaeItem.0.name=å¯åŸ¹æ¤è—»ç±»(I) +item.BasicAlgaeItem.1.name=å¯åŸ¹æ¤è—»ç±»(II) +item.BasicAlgaeItem.2.name=å¯åŸ¹æ¤è—»ç±»(III) +item.BasicAlgaeItem.3.name=å¯åŸ¹æ¤è—»ç±»(IV) +item.BasicAlgaeItem.4.name=å¯åŸ¹æ¤è—»ç±»(V) +item.BasicAlgaeItem.5.name=å¯åŸ¹æ¤è—»ç±»(VI) +item.BasicAlgaeItem.6.name=å¯åŸ¹æ¤è—»ç±»(VII) + +//Added 17/01/20 +item.BasicGenericChemItem.6.name=粉色金属催化剂 + +//Added 23/03/20 +item.BasicMetaFood.0.name=生人肉 +item.BasicMetaFood.1.name=熟人肉 +item.BasicMetaFood.2.name=生马肉 +item.BasicMetaFood.3.name=熟马肉 +item.BasicMetaFood.4.name=生狼肉 +item.BasicMetaFood.5.name=熟狼肉 +item.BasicMetaFood.6.name=生猫肉 +item.BasicMetaFood.7.name=熟猫肉 +item.BasicMetaFood.8.name=烈焰人肉 + +item.itemCellNaquadahFuel.name=硅岩燃料å•å…ƒ +item.itemCellEnrichedNaquadahFuel.name=富集硅岩燃料å•å…ƒ +item.itemCellNaquadriaFuel.name=超能硅岩燃料å•å…ƒ +item.boricacid.name=硼酸å•å…ƒ +item.hydrochloricacid.name=ç›é…¸å•å…ƒ + +item.BasicAlgaeItem.name=å¯åŸ¹æ¤è—»ç±» +item.BasicAlgaeItem.0.name=å¯åŸ¹æ¤è—»ç±»(I) +item.BasicAlgaeItem.1.name=å¯åŸ¹æ¤è—»ç±»(II) +item.BasicAlgaeItem.2.name=å¯åŸ¹æ¤è—»ç±»(III) +item.BasicAlgaeItem.3.name=å¯åŸ¹æ¤è—»ç±»(IV) +item.BasicAlgaeItem.4.name=å¯åŸ¹æ¤è—»ç±»(V) +item.BasicAlgaeItem.5.name=å¯åŸ¹æ¤è—»ç±»(VI) +item.BasicAlgaeItem.6.name=å¯åŸ¹æ¤è—»ç±»(VII) + +//Added 30/03/20 +item.milledChalcopyrite.name=研磨黄铜矿 +item.milledSphalerite.name=研磨闪锌矿 +item.milledNickel.name=研磨é•çŸ¿ +item.milledPlatinum.name=研磨铂矿 +item.milledPentlandite.name=研磨é•é»„é“矿 +item.FrothZincflotation.name=闪锌矿浮选泡沫å•å…ƒ +item.FrothCopperflotation.name=黄铜矿浮选泡沫å•å…ƒ +item.FrothNickelflotation.name=é•çŸ¿æµ®é€‰æ³¡æ²«å•å…ƒ +item.FrothPlatinumflotation.name=铂矿浮选泡沫å•å…ƒ +item.FrothPentlanditeflotation.name=é•é»„é“矿浮选泡沫å•å…ƒ +item.BasicGenericChemItem.7.name=é“ç ”ç£¨çƒ +item.BasicGenericChemItem.8.name=çš‚çŸ³ç ”ç£¨çƒ + +//Added 31/03/20 +item.BasicGenericChemItem.9.name=乙醇钠粉 +item.BasicGenericChemItem.10.name=乙基黄原酸钠粉 +item.BasicGenericChemItem.11.name=乙基黄原酸钾粉 +item.BasicGenericChemItem.12.name=氢氧化钾粉 +item.CarbonDisulfide.name=二硫化碳å•å…ƒ +item.HydrogenSulfide.name=硫化氢å•å…ƒ +item.BasicAgrichemItem.24.name=æ¾æžœ +item.BasicAgrichemItem.25.name=æ¾æ ‘碎料 +item.pineoil.name=æ¾æ²¹å•å…ƒ + +//Added 11/4/20 +item.milledRedstone.name=研磨红石矿 +item.milledSpessartine.name=研磨锰é“榴石 +item.milledGrossular.name=研磨钙é“榴石 +item.milledAlmandine.name=研磨é“é“榴石 +item.milledPyrope.name=研磨é•é“榴石 +item.FrothRedstoneflotation.name=红石矿浮选泡沫å•å…ƒ +item.FrothSpessartineflotation.name=é”°é“榴石浮选泡沫å•å…ƒ +item.FrothGrossularflotation.name=é’™é“榴石浮选泡沫å•å…ƒ +item.FrothAlmandineflotation.name=é“é“榴石浮选泡沫å•å…ƒ +item.FrothPyropeflotation.name=é•é“榴石浮选泡沫å•å…ƒ + +//Added 13/04/20 +item.T3RecipeSelector.name=çªç ´ç¼–程电路 + +//Added 03/05/20 +entity.miscutils.batKing.name=å¹½çµè™è  +entity.miscutils.bigChickenFriendly.name=巨大的鸡 +entity.miscutils.AusDingo.name=澳洲野狗 +entity.miscutils.AusBoar.name=澳洲野猪 +entity.miscutils.AusSpider.name=森林蜘蛛 +entity.miscutils.AusOctopus.name=澳洲章鱼 +container.EggBox=鸡蛋孵化盒 + +//Added 24/05/20 +container.VolumetricFlaskSetter=容é‡ç“¶é…置器 + +//Added 26/05/20 +item.itemIngotLaurenium.name=劳伦姆åˆé‡‘é”­ +item.itemHotIngotLaurenium.name=热劳伦姆åˆé‡‘é”­ +item.itemDustLaurenium.name=劳伦姆åˆé‡‘粉 +item.itemDustTinyLaurenium.name=å°æ’®åŠ³ä¼¦å§†åˆé‡‘粉 +item.itemDustSmallLaurenium.name=å°å †åŠ³ä¼¦å§†åˆé‡‘粉 +item.itemNuggetLaurenium.name=劳伦姆åˆé‡‘ç²’ +item.itemPlateLaurenium.name=劳伦姆åˆé‡‘æ¿ +item.itemPlateDoubleLaurenium.name=åŒé‡åŠ³ä¼¦å§†åˆé‡‘æ¿ +item.itemBoltLaurenium.name=劳伦姆åˆé‡‘螺栓 +item.itemRodLaurenium.name=劳伦姆åˆé‡‘æ† +item.itemRodLongLaurenium.name=长劳伦姆åˆé‡‘æ† +item.itemRingLaurenium.name=劳伦姆åˆé‡‘环 +item.itemScrewLaurenium.name=劳伦姆åˆé‡‘èžºä¸ +item.itemRotorLaurenium.name=劳伦姆åˆé‡‘è½¬å­ +item.itemGearLaurenium.name=劳伦姆åˆé‡‘齿轮 +item.itemCellLaurenium.name=劳伦姆åˆé‡‘å•å…ƒ +tile.Block of Laurenium.name=劳伦姆åˆé‡‘å— +tile.Laurenium Frame Box.name=劳伦姆åˆé‡‘框架 +item.itemIngotBotmium.name=åšç‰¹å§†åˆé‡‘é”­ +item.itemHotIngotBotmium.name=热åšç‰¹å§†åˆé‡‘é”­ +item.itemDustBotmium.name=åšç‰¹å§†åˆé‡‘粉 +item.itemDustTinyBotmium.name=å°æ’®åšç‰¹å§†åˆé‡‘粉 +item.itemDustSmallBotmium.name=å°å †åšç‰¹å§†åˆé‡‘粉 +item.itemNuggetBotmium.name=åšç‰¹å§†åˆé‡‘ç²’ +item.itemPlateBotmium.name=åšç‰¹å§†åˆé‡‘æ¿ +item.itemPlateDoubleBotmium.name=åŒé‡åšç‰¹å§†åˆé‡‘æ¿ +item.itemBoltBotmium.name=åšç‰¹å§†åˆé‡‘螺栓 +item.itemRodBotmium.name=åšç‰¹å§†åˆé‡‘æ† +item.itemRodLongBotmium.name=é•¿åšç‰¹å§†åˆé‡‘æ† +item.itemRingBotmium.name=åšç‰¹å§†åˆé‡‘环 +item.itemScrewBotmium.name=åšç‰¹å§†åˆé‡‘èžºä¸ +item.itemRotorBotmium.name=åšç‰¹å§†åˆé‡‘è½¬å­ +item.itemGearBotmium.name=åšç‰¹å§†åˆé‡‘齿轮 +item.itemCellBotmium.name=åšç‰¹å§†åˆé‡‘å•å…ƒ +tile.Block of Botmium.name=åšç‰¹å§†åˆé‡‘å— +tile.Botmium Frame Box.name=åšç‰¹å§†åˆé‡‘框架 + +//Added 29/05/20 +item.itemBasicTurbine.name=基础涡轮 +item.itemBasicTurbine_0.name=基础é“涡轮 +item.itemBasicTurbine_1.name=基础é’铜涡轮 + +interaction.voidexcess.enabled=å¯ç”¨è¿‡é‡é”€æ¯ +interaction.voidexcess.disabled=ç¦ç”¨è¿‡é‡é”€æ¯ + +interaction.separateBusses.enabled=独立输入总线 +interaction.separateBusses.disabled=è”åˆè¾“入总线 \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/DevCape.png b/src/main/resources/assets/miscutils/textures/DevCape.png new file mode 100644 index 0000000000..15c2b758ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/DevCape.png differ diff --git a/src/main/resources/assets/miscutils/textures/DevCapeHD.png b/src/main/resources/assets/miscutils/textures/DevCapeHD.png new file mode 100644 index 0000000000..f74bd8c9e3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/DevCapeHD.png differ diff --git a/src/main/resources/assets/miscutils/textures/FancyCape.png b/src/main/resources/assets/miscutils/textures/FancyCape.png new file mode 100644 index 0000000000..ca63a0f335 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/FancyCape.png differ diff --git a/src/main/resources/assets/miscutils/textures/FancyCapeHD.png b/src/main/resources/assets/miscutils/textures/FancyCapeHD.png new file mode 100644 index 0000000000..d8da3ba76d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/FancyCapeHD.png differ diff --git a/src/main/resources/assets/miscutils/textures/Orange.png b/src/main/resources/assets/miscutils/textures/Orange.png new file mode 100644 index 0000000000..9de164d437 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/Orange.png differ diff --git a/src/main/resources/assets/miscutils/textures/OrangeHD.png b/src/main/resources/assets/miscutils/textures/OrangeHD.png new file mode 100644 index 0000000000..ea5e8af8cf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/OrangeHD.png differ diff --git a/src/main/resources/assets/miscutils/textures/PatreonCapeHD.png b/src/main/resources/assets/miscutils/textures/PatreonCapeHD.png new file mode 100644 index 0000000000..c4ebef82b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/PatreonCapeHD.png differ diff --git a/src/main/resources/assets/miscutils/textures/TesterCape.png b/src/main/resources/assets/miscutils/textures/TesterCape.png new file mode 100644 index 0000000000..8504d06049 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/TesterCape.png differ diff --git a/src/main/resources/assets/miscutils/textures/TesterCapeHD.png b/src/main/resources/assets/miscutils/textures/TesterCapeHD.png new file mode 100644 index 0000000000..da3ee2e50f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/TesterCapeHD.png differ diff --git a/src/main/resources/assets/miscutils/textures/aspects/Sagrausten.png b/src/main/resources/assets/miscutils/textures/aspects/Sagrausten.png new file mode 100644 index 0000000000..a2c461f94e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/aspects/Sagrausten.png differ diff --git a/src/main/resources/assets/miscutils/textures/aspects/Slusium.png b/src/main/resources/assets/miscutils/textures/aspects/Slusium.png new file mode 100644 index 0000000000..fd2c42414d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/aspects/Slusium.png differ diff --git a/src/main/resources/assets/miscutils/textures/aspects/Xablum.png b/src/main/resources/assets/miscutils/textures/aspects/Xablum.png new file mode 100644 index 0000000000..a19d64039a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/aspects/Xablum.png differ diff --git a/src/main/resources/assets/miscutils/textures/aspects/Xenil.png b/src/main/resources/assets/miscutils/textures/aspects/Xenil.png new file mode 100644 index 0000000000..e3b5ecda82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/aspects/Xenil.png differ diff --git a/src/main/resources/assets/miscutils/textures/aspects/Zetralt.png b/src/main/resources/assets/miscutils/textures/aspects/Zetralt.png new file mode 100644 index 0000000000..001edf8ea3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/aspects/Zetralt.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn b/src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn new file mode 100644 index 0000000000..453b7325c8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png b/src/main/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png new file mode 100644 index 0000000000..78e400a5a0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png b/src/main/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png new file mode 100644 index 0000000000..42202d8fae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/SwirlBlue.png b/src/main/resources/assets/miscutils/textures/blocks/SwirlBlue.png new file mode 100644 index 0000000000..e79a08a151 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/SwirlBlue.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/SwirlCyan.png b/src/main/resources/assets/miscutils/textures/blocks/SwirlCyan.png new file mode 100644 index 0000000000..45d8feb48b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/SwirlCyan.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/SwirlGray.png b/src/main/resources/assets/miscutils/textures/blocks/SwirlGray.png new file mode 100644 index 0000000000..337d5fd1bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/SwirlGray.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/SwirlRed.png b/src/main/resources/assets/miscutils/textures/blocks/SwirlRed.png new file mode 100644 index 0000000000..e13c73be5b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/SwirlRed.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/SwirlYellow.png b/src/main/resources/assets/miscutils/textures/blocks/SwirlYellow.png new file mode 100644 index 0000000000..2b920a8387 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/SwirlYellow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png new file mode 100644 index 0000000000..88d5cb9c72 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png new file mode 100644 index 0000000000..ff1a809196 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png new file mode 100644 index 0000000000..4af5b49f1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png new file mode 100644 index 0000000000..0ea134fb93 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png new file mode 100644 index 0000000000..52c1a02d54 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png new file mode 100644 index 0000000000..0c791d1d7c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png new file mode 100644 index 0000000000..51cefde2a7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png new file mode 100644 index 0000000000..6150873b54 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png new file mode 100644 index 0000000000..4483072085 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png new file mode 100644 index 0000000000..137b4231c6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png new file mode 100644 index 0000000000..0dd1f2ae5f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png new file mode 100644 index 0000000000..fd7adea957 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png new file mode 100644 index 0000000000..a0b7d1544e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png new file mode 100644 index 0000000000..1f395cc891 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png new file mode 100644 index 0000000000..5f36f9e7b5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png new file mode 100644 index 0000000000..191dd4f5ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png new file mode 100644 index 0000000000..7df2cbec19 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png new file mode 100644 index 0000000000..7185cd1be1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png new file mode 100644 index 0000000000..09ee5cd360 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png new file mode 100644 index 0000000000..3e88422126 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png new file mode 100644 index 0000000000..3d84925c61 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png new file mode 100644 index 0000000000..6c4c1fb228 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png new file mode 100644 index 0000000000..f113ac0ab5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png new file mode 100644 index 0000000000..d896829cfb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png new file mode 100644 index 0000000000..f1bfc1063d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png new file mode 100644 index 0000000000..bbc35cf318 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png new file mode 100644 index 0000000000..e7f0363217 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png new file mode 100644 index 0000000000..2ec68c00ff Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png new file mode 100644 index 0000000000..2ffeb029fb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png new file mode 100644 index 0000000000..f2c5b72b0c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png new file mode 100644 index 0000000000..63cbcf0851 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png new file mode 100644 index 0000000000..69efbeb6de Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png new file mode 100644 index 0000000000..acd54acf07 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png new file mode 100644 index 0000000000..7a3700a854 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png new file mode 100644 index 0000000000..672a513513 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png new file mode 100644 index 0000000000..e0ec5ef95a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png new file mode 100644 index 0000000000..d1a5b4f1b0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png new file mode 100644 index 0000000000..ee332fba19 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png new file mode 100644 index 0000000000..b0c62a7b3d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png new file mode 100644 index 0000000000..b61a42b935 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png new file mode 100644 index 0000000000..0647c2105f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png new file mode 100644 index 0000000000..787572ea3b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png new file mode 100644 index 0000000000..771fef125a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png new file mode 100644 index 0000000000..d766cc9f3f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png new file mode 100644 index 0000000000..e92b9c9ff8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png new file mode 100644 index 0000000000..8a47157d2b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..1367b80758 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 0, 1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png new file mode 100644 index 0000000000..b926eb1ef2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png new file mode 100644 index 0000000000..ae63da7746 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..8447c98f9a --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png new file mode 100644 index 0000000000..e9b20bd486 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png new file mode 100644 index 0000000000..25ea33ce3a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png new file mode 100644 index 0000000000..a9bed9ce0c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png new file mode 100644 index 0000000000..7222ca77d7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png new file mode 100644 index 0000000000..eb7affaa01 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png new file mode 100644 index 0000000000..a650d73983 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png new file mode 100644 index 0000000000..8a0391538b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png new file mode 100644 index 0000000000..22c7cd7978 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png new file mode 100644 index 0000000000..5965bfce89 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png new file mode 100644 index 0000000000..eb8020f1c9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png new file mode 100644 index 0000000000..05c8741fa7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png new file mode 100644 index 0000000000..4f7290c571 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png new file mode 100644 index 0000000000..df4e3a1a41 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png new file mode 100644 index 0000000000..d8677eda87 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png new file mode 100644 index 0000000000..02bd653538 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png new file mode 100644 index 0000000000..c0065f8379 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png new file mode 100644 index 0000000000..89fed025b4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png new file mode 100644 index 0000000000..4a8cbd634c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png new file mode 100644 index 0000000000..fc2b8c5c89 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png new file mode 100644 index 0000000000..7753c1920a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png new file mode 100644 index 0000000000..373cccb65d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png new file mode 100644 index 0000000000..52e1a73063 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png new file mode 100644 index 0000000000..ab3a76d006 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png new file mode 100644 index 0000000000..75f21218d9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png new file mode 100644 index 0000000000..05f1cc1d42 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png new file mode 100644 index 0000000000..066a926278 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png new file mode 100644 index 0000000000..9ba5c0e255 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png new file mode 100644 index 0000000000..4b707d2ca2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png new file mode 100644 index 0000000000..64b28d0233 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png new file mode 100644 index 0000000000..91d3660711 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png new file mode 100644 index 0000000000..c82b335f0c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png new file mode 100644 index 0000000000..6a5dba4448 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png new file mode 100644 index 0000000000..651c539c5b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png new file mode 100644 index 0000000000..1d71c95ea4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png new file mode 100644 index 0000000000..d6cb89d67d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png new file mode 100644 index 0000000000..6c45ff313f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png new file mode 100644 index 0000000000..2602f44af3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png new file mode 100644 index 0000000000..42c1df75cf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png new file mode 100644 index 0000000000..57d9cc6f86 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png new file mode 100644 index 0000000000..869b06039f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png new file mode 100644 index 0000000000..012c63a088 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png new file mode 100644 index 0000000000..30856a6284 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png new file mode 100644 index 0000000000..d577f0cbb3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png new file mode 100644 index 0000000000..e41790f90f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..f4cce85820 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":5, + "frames": [0, 1, 2, 3, 2, 1] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png new file mode 100644 index 0000000000..e9b20bd486 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png new file mode 100644 index 0000000000..4469a809e9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png new file mode 100644 index 0000000000..b7a77be826 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png new file mode 100644 index 0000000000..8a47157d2b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..1367b80758 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 0, 1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png new file mode 100644 index 0000000000..671bbd7d97 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png new file mode 100644 index 0000000000..ae63da7746 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..8447c98f9a --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png new file mode 100644 index 0000000000..a9ab34e963 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png new file mode 100644 index 0000000000..8a5c131623 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png new file mode 100644 index 0000000000..6d9fb32d7e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png new file mode 100644 index 0000000000..cbf604f2b3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png new file mode 100644 index 0000000000..3b7ac3d50e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png new file mode 100644 index 0000000000..a5a5e2c559 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png new file mode 100644 index 0000000000..b68c900ddd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png new file mode 100644 index 0000000000..df182aeaa5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png new file mode 100644 index 0000000000..85bc3f16cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png new file mode 100644 index 0000000000..f82185ebdb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png new file mode 100644 index 0000000000..345476e03c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png new file mode 100644 index 0000000000..971164eb3e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png new file mode 100644 index 0000000000..5b5bac3ad2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png new file mode 100644 index 0000000000..8ae37e61d4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png new file mode 100644 index 0000000000..9dc63e146e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png new file mode 100644 index 0000000000..d391da4eaf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta new file mode 100644 index 0000000000..60af678259 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png new file mode 100644 index 0000000000..ce051d468c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta new file mode 100644 index 0000000000..60af678259 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png new file mode 100644 index 0000000000..9d454b17d4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta new file mode 100644 index 0000000000..60af678259 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png new file mode 100644 index 0000000000..d5f23d447f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png new file mode 100644 index 0000000000..5a4f23d3ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png new file mode 100644 index 0000000000..d40c95f3aa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png new file mode 100644 index 0000000000..69330145ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta new file mode 100644 index 0000000000..49e988e8bb --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png new file mode 100644 index 0000000000..2af5057b3d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta new file mode 100644 index 0000000000..49e988e8bb --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png new file mode 100644 index 0000000000..a8a857b5b8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png new file mode 100644 index 0000000000..fc9c6e5d8a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png new file mode 100644 index 0000000000..695451fafc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta new file mode 100644 index 0000000000..19b79a1e22 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames":[{"index":0,"time":100},{"index":1,"time":3},{"index":2,"time":2},{"index":3,"time":3},0,1,2,3] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png new file mode 100644 index 0000000000..7157b7541d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta new file mode 100644 index 0000000000..60af678259 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png new file mode 100644 index 0000000000..7157b7541d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta new file mode 100644 index 0000000000..97596ba817 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png new file mode 100644 index 0000000000..7157b7541d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png new file mode 100644 index 0000000000..6a1894756d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png new file mode 100644 index 0000000000..c9663bf711 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png new file mode 100644 index 0000000000..7037204d20 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png new file mode 100644 index 0000000000..600def1e1b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png new file mode 100644 index 0000000000..652245a61c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png new file mode 100644 index 0000000000..455264cffa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png new file mode 100644 index 0000000000..eeb0bae10f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png new file mode 100644 index 0000000000..386f3c8e67 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png new file mode 100644 index 0000000000..a61413240b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png new file mode 100644 index 0000000000..26b3b1e4c1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png new file mode 100644 index 0000000000..72e8c12c07 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png new file mode 100644 index 0000000000..148d5e4955 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png new file mode 100644 index 0000000000..ebeda86aa0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png new file mode 100644 index 0000000000..a0767f7836 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png new file mode 100644 index 0000000000..ba45c43891 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png new file mode 100644 index 0000000000..9fd8c3be81 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png new file mode 100644 index 0000000000..6f1e9c0664 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png new file mode 100644 index 0000000000..815ad92daf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png new file mode 100644 index 0000000000..c594b58add Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png new file mode 100644 index 0000000000..fe779e8a9e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta new file mode 100644 index 0000000000..60af678259 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png new file mode 100644 index 0000000000..68b4e3e9c2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png new file mode 100644 index 0000000000..ba45c43891 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png new file mode 100644 index 0000000000..815ad92daf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png new file mode 100644 index 0000000000..3bd3092cc0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png new file mode 100644 index 0000000000..e402d9b6d0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png new file mode 100644 index 0000000000..975f4aed86 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta new file mode 100644 index 0000000000..97596ba817 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png new file mode 100644 index 0000000000..bf1cb0e6a5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta new file mode 100644 index 0000000000..97596ba817 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png new file mode 100644 index 0000000000..3256b41734 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png new file mode 100644 index 0000000000..3256b41734 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png new file mode 100644 index 0000000000..a8e497ec01 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png new file mode 100644 index 0000000000..34d35b44e3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png new file mode 100644 index 0000000000..1754172689 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png new file mode 100644 index 0000000000..4835240aee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockAntiGrief.png b/src/main/resources/assets/miscutils/textures/blocks/blockAntiGrief.png new file mode 100644 index 0000000000..4168d9d934 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockAntiGrief.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockBlock.png b/src/main/resources/assets/miscutils/textures/blocks/blockBlock.png new file mode 100644 index 0000000000..1276f5fa24 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockBlock.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockBloodSteel.png b/src/main/resources/assets/miscutils/textures/blocks/blockBloodSteel.png new file mode 100644 index 0000000000..d23f8721e4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockBloodSteel.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockDefault.png b/src/main/resources/assets/miscutils/textures/blocks/blockDefault.png new file mode 100644 index 0000000000..84a6b68e0e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockDefault.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockFrameGt.png b/src/main/resources/assets/miscutils/textures/blocks/blockFrameGt.png new file mode 100644 index 0000000000..56a56cf752 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockFrameGt.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockMFEffect.png b/src/main/resources/assets/miscutils/textures/blocks/blockMFEffect.png new file mode 100644 index 0000000000..8e48e12070 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockMFEffect.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png b/src/main/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png new file mode 100644 index 0000000000..f5f51c7175 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png b/src/main/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png new file mode 100644 index 0000000000..b7155ba3dc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockStaballoy.png b/src/main/resources/assets/miscutils/textures/blocks/blockStaballoy.png new file mode 100644 index 0000000000..84a6b68e0e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockStaballoy.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/blockStone.png b/src/main/resources/assets/miscutils/textures/blocks/blockStone.png new file mode 100644 index 0000000000..87e19ff46b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/blockStone.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png new file mode 100644 index 0000000000..6761aa4773 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png new file mode 100644 index 0000000000..befbe80c9f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png new file mode 100644 index 0000000000..e52a1b11dc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png new file mode 100644 index 0000000000..b24e8657f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png new file mode 100644 index 0000000000..4f84e52ab1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png new file mode 100644 index 0000000000..ba4f079ba9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png new file mode 100644 index 0000000000..28b1b4dbed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png new file mode 100644 index 0000000000..2c56924c8b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png new file mode 100644 index 0000000000..223ae1cad3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png new file mode 100644 index 0000000000..8d56915ff2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png new file mode 100644 index 0000000000..a08f7e1c25 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png new file mode 100644 index 0000000000..46c385c4ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png new file mode 100644 index 0000000000..951871ce12 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png new file mode 100644 index 0000000000..1e9356ba6c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png new file mode 100644 index 0000000000..f555273f65 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png new file mode 100644 index 0000000000..6a1c62579d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png new file mode 100644 index 0000000000..e93c9c35c2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png new file mode 100644 index 0000000000..1952b3d14e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png new file mode 100644 index 0000000000..5307adb9f5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png new file mode 100644 index 0000000000..4862094cbd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png b/src/main/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png new file mode 100644 index 0000000000..0d32fdeec8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/clear_flow.png b/src/main/resources/assets/miscutils/textures/blocks/clear_flow.png new file mode 100644 index 0000000000..84a6b68e0e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/clear_flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/clear_still.png b/src/main/resources/assets/miscutils/textures/blocks/clear_still.png new file mode 100644 index 0000000000..84a6b68e0e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/clear_still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png new file mode 100644 index 0000000000..0970b27745 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png new file mode 100644 index 0000000000..6cf79c75c4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png new file mode 100644 index 0000000000..0cf85541e4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png new file mode 100644 index 0000000000..4d9c3d2f67 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png new file mode 100644 index 0000000000..149ae598d0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png new file mode 100644 index 0000000000..8c55fdddd3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png new file mode 100644 index 0000000000..8c5f1ec338 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png new file mode 100644 index 0000000000..75ff7b2558 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png new file mode 100644 index 0000000000..edcfc53edd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png new file mode 100644 index 0000000000..8176e98807 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png new file mode 100644 index 0000000000..0737748bb9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/door_cactus_lower.png b/src/main/resources/assets/miscutils/textures/blocks/door_cactus_lower.png new file mode 100644 index 0000000000..2beea822b4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/door_cactus_lower.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/door_cactus_upper.png b/src/main/resources/assets/miscutils/textures/blocks/door_cactus_upper.png new file mode 100644 index 0000000000..75ddf4ddfe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/door_cactus_upper.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/door_glass_lower.png b/src/main/resources/assets/miscutils/textures/blocks/door_glass_lower.png new file mode 100644 index 0000000000..29d3ebf7ad Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/door_glass_lower.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/door_glass_upper.png b/src/main/resources/assets/miscutils/textures/blocks/door_glass_upper.png new file mode 100644 index 0000000000..9cb8b98946 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/door_glass_upper.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/door_ice_lower.png b/src/main/resources/assets/miscutils/textures/blocks/door_ice_lower.png new file mode 100644 index 0000000000..c80ab691f1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/door_ice_lower.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/door_ice_upper.png b/src/main/resources/assets/miscutils/textures/blocks/door_ice_upper.png new file mode 100644 index 0000000000..f647ed3621 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/door_ice_upper.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png new file mode 100644 index 0000000000..6ea5b4c515 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta new file mode 100644 index 0000000000..70cc4d313c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 6 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png new file mode 100644 index 0000000000..7f1f2aa712 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta new file mode 100644 index 0000000000..aa41c3d5c8 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 8, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png new file mode 100644 index 0000000000..b24939367a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta new file mode 100644 index 0000000000..7e77c64858 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png new file mode 100644 index 0000000000..3fb18d9c00 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta new file mode 100644 index 0000000000..4fadce8aff --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png new file mode 100644 index 0000000000..fa4fa813bf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta new file mode 100644 index 0000000000..70cc4d313c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 6 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png new file mode 100644 index 0000000000..00355135df Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta new file mode 100644 index 0000000000..aa41c3d5c8 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 8, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png new file mode 100644 index 0000000000..50414d57db Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta new file mode 100644 index 0000000000..7e77c64858 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png new file mode 100644 index 0000000000..edf0166265 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta new file mode 100644 index 0000000000..4fadce8aff --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png new file mode 100644 index 0000000000..b51346219b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta new file mode 100644 index 0000000000..aa41c3d5c8 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 8, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png new file mode 100644 index 0000000000..3fb18d9c00 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta new file mode 100644 index 0000000000..4fadce8aff --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png new file mode 100644 index 0000000000..003d1597a6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta new file mode 100644 index 0000000000..4f0718ac96 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png new file mode 100644 index 0000000000..512df7ce04 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta new file mode 100644 index 0000000000..b8533e5109 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png new file mode 100644 index 0000000000..ef08c75bc8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta new file mode 100644 index 0000000000..0645f48c62 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png new file mode 100644 index 0000000000..61d77a51d3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta new file mode 100644 index 0000000000..70cc4d313c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 6 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png new file mode 100644 index 0000000000..f79564ea36 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta new file mode 100644 index 0000000000..7e77c64858 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png new file mode 100644 index 0000000000..a752755254 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta new file mode 100644 index 0000000000..0df7234a79 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png new file mode 100644 index 0000000000..251206d195 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta new file mode 100644 index 0000000000..eb608948b6 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 16 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png new file mode 100644 index 0000000000..6e44e97212 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png new file mode 100644 index 0000000000..512df7ce04 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png new file mode 100644 index 0000000000..7c5ffd0c77 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta new file mode 100644 index 0000000000..b8533e5109 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png new file mode 100644 index 0000000000..f0265d8ad2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta new file mode 100644 index 0000000000..87c542d295 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png new file mode 100644 index 0000000000..00355135df Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta new file mode 100644 index 0000000000..aa41c3d5c8 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta @@ -0,0 +1,45 @@ +{ + "animation": { + "frametime": 8, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 18, + 17, + 16, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png new file mode 100644 index 0000000000..2ff3fb6e7b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta new file mode 100644 index 0000000000..3fc1338d74 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 12 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png new file mode 100644 index 0000000000..902015b8e1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta new file mode 100644 index 0000000000..7e77c64858 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png new file mode 100644 index 0000000000..fee5f03cd5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta new file mode 100644 index 0000000000..eb608948b6 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 16 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png new file mode 100644 index 0000000000..73fa814eb5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta new file mode 100644 index 0000000000..70cc4d313c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 6 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png new file mode 100644 index 0000000000..63e9189c45 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png new file mode 100644 index 0000000000..05d4c69e1a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta new file mode 100644 index 0000000000..f6730e30a9 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png new file mode 100644 index 0000000000..90cbef3417 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta new file mode 100644 index 0000000000..f6730e30a9 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png new file mode 100644 index 0000000000..90cbef3417 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta new file mode 100644 index 0000000000..5169aabdc2 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 8 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png new file mode 100644 index 0000000000..d4e45d6adf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta new file mode 100644 index 0000000000..76446714d8 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta @@ -0,0 +1,38 @@ +{ + "animation": { + "frames": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + } +} diff --git a/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png new file mode 100644 index 0000000000..739abd1090 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta new file mode 100644 index 0000000000..4f0718ac96 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png new file mode 100644 index 0000000000..2780ffe2dd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png new file mode 100644 index 0000000000..c3ca19138c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png new file mode 100644 index 0000000000..d04b15cd89 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png new file mode 100644 index 0000000000..d8ec997508 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png new file mode 100644 index 0000000000..3466822e04 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png new file mode 100644 index 0000000000..853e88b189 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png new file mode 100644 index 0000000000..3979e4ae76 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png new file mode 100644 index 0000000000..503022d656 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png new file mode 100644 index 0000000000..e1ae9fafb0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png new file mode 100644 index 0000000000..7b14db3bda Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png new file mode 100644 index 0000000000..d8880393ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png new file mode 100644 index 0000000000..84f6f55c22 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png new file mode 100644 index 0000000000..b79fa87cf6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png new file mode 100644 index 0000000000..49e957bc1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png new file mode 100644 index 0000000000..150c1312c9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png new file mode 100644 index 0000000000..2c5541ec6d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png new file mode 100644 index 0000000000..c62b04a499 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png new file mode 100644 index 0000000000..3712f39fdd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png new file mode 100644 index 0000000000..719aad5646 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png new file mode 100644 index 0000000000..855132c0b3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png new file mode 100644 index 0000000000..3354bbe815 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png new file mode 100644 index 0000000000..16e4db14ad Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png new file mode 100644 index 0000000000..3466822e04 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png new file mode 100644 index 0000000000..f332bb77e5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png new file mode 100644 index 0000000000..b6576c39e4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png new file mode 100644 index 0000000000..2c11681fcd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png new file mode 100644 index 0000000000..0d3178a481 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png new file mode 100644 index 0000000000..b0f38da9c9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png new file mode 100644 index 0000000000..f614e41d52 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png new file mode 100644 index 0000000000..c011a999de Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png new file mode 100644 index 0000000000..21a2847a7c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png new file mode 100644 index 0000000000..49e957bc1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png new file mode 100644 index 0000000000..98bf3224ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png new file mode 100644 index 0000000000..cad7674ce5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png new file mode 100644 index 0000000000..a5501d12d2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png new file mode 100644 index 0000000000..b294af5b63 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png new file mode 100644 index 0000000000..9b82677382 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png new file mode 100644 index 0000000000..bb8649fabc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png new file mode 100644 index 0000000000..60ac4bce02 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png new file mode 100644 index 0000000000..f7e479652f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png new file mode 100644 index 0000000000..8d1e3f14e2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png new file mode 100644 index 0000000000..9f997cedf8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png new file mode 100644 index 0000000000..ff2c73964a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png new file mode 100644 index 0000000000..107d539765 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png new file mode 100644 index 0000000000..5dd516f5e2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png new file mode 100644 index 0000000000..eb8cd5882d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png new file mode 100644 index 0000000000..fa3e6027a7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png new file mode 100644 index 0000000000..ce258e3c13 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png new file mode 100644 index 0000000000..ce1c2ef3d8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png new file mode 100644 index 0000000000..84e1ac6350 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png new file mode 100644 index 0000000000..4f716e4c61 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png new file mode 100644 index 0000000000..fa9e98a6f5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png new file mode 100644 index 0000000000..6c05b315b6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png new file mode 100644 index 0000000000..d4a3888fe5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png new file mode 100644 index 0000000000..8346cccf41 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png new file mode 100644 index 0000000000..31bbffb4d4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png new file mode 100644 index 0000000000..0858b2d399 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png new file mode 100644 index 0000000000..1bc399315d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png new file mode 100644 index 0000000000..32ea4edd45 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png new file mode 100644 index 0000000000..eb530ffb75 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn new file mode 100644 index 0000000000..3c8bbeb696 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png new file mode 100644 index 0000000000..1050d78b01 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png new file mode 100644 index 0000000000..b59c940f5e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png new file mode 100644 index 0000000000..8bde3ca423 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png new file mode 100644 index 0000000000..1b1b12db3b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png new file mode 100644 index 0000000000..da672b0e24 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png new file mode 100644 index 0000000000..f082c94c55 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png new file mode 100644 index 0000000000..020ed28da8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png new file mode 100644 index 0000000000..12e321b7e9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png new file mode 100644 index 0000000000..c6d7715356 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png new file mode 100644 index 0000000000..7f21c841aa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png new file mode 100644 index 0000000000..3466822e04 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png new file mode 100644 index 0000000000..c1ae3ca1af Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png new file mode 100644 index 0000000000..a0263e4341 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png new file mode 100644 index 0000000000..26956df456 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png new file mode 100644 index 0000000000..f30b34fe4a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png new file mode 100644 index 0000000000..288df82736 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png new file mode 100644 index 0000000000..b8c344736e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png new file mode 100644 index 0000000000..0ef17da006 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png new file mode 100644 index 0000000000..07dd921123 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png new file mode 100644 index 0000000000..49e957bc1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png new file mode 100644 index 0000000000..2dd6ca5a8e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png new file mode 100644 index 0000000000..16091f0e18 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png new file mode 100644 index 0000000000..698d96bf11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png new file mode 100644 index 0000000000..963d8b1a22 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png new file mode 100644 index 0000000000..b0aa8bf5e5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png new file mode 100644 index 0000000000..6322205460 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png new file mode 100644 index 0000000000..0c9e529514 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png new file mode 100644 index 0000000000..110e9ee38f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta new file mode 100644 index 0000000000..24f863c95e --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png new file mode 100644 index 0000000000..574f481c68 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png new file mode 100644 index 0000000000..8af98deabf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png new file mode 100644 index 0000000000..56b02d1914 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png new file mode 100644 index 0000000000..8b5f405322 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png new file mode 100644 index 0000000000..2424eef68f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png new file mode 100644 index 0000000000..1fd61ede58 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta new file mode 100644 index 0000000000..24f863c95e --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png new file mode 100644 index 0000000000..5433ee1ff2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..97596ba817 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png new file mode 100644 index 0000000000..6a749e96a9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png new file mode 100644 index 0000000000..92910c9cdf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png new file mode 100644 index 0000000000..b7b2bed6de Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta new file mode 100644 index 0000000000..60af678259 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png new file mode 100644 index 0000000000..8c93e83d2d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..24f863c95e --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png new file mode 100644 index 0000000000..c7b22a7ef8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta new file mode 100644 index 0000000000..5d86d73ad2 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":5 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png new file mode 100644 index 0000000000..ce88198867 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png new file mode 100644 index 0000000000..edd4efbba9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta new file mode 100644 index 0000000000..330653c04d --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [3, 2, 1, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png new file mode 100644 index 0000000000..d70927f140 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png new file mode 100644 index 0000000000..13310d6f57 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png new file mode 100644 index 0000000000..7ef41870d4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png new file mode 100644 index 0000000000..e42acc5c01 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png new file mode 100644 index 0000000000..440c987d6e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png new file mode 100644 index 0000000000..453cc94662 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png new file mode 100644 index 0000000000..b1f29058ec Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png new file mode 100644 index 0000000000..747adeb2e5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png new file mode 100644 index 0000000000..23cc2c60c2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png new file mode 100644 index 0000000000..230e78fe96 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/mash_flow.png b/src/main/resources/assets/miscutils/textures/blocks/mash_flow.png new file mode 100644 index 0000000000..f155520eae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/mash_flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/mash_still.png b/src/main/resources/assets/miscutils/textures/blocks/mash_still.png new file mode 100644 index 0000000000..f155520eae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/mash_still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png new file mode 100644 index 0000000000..950a44d2b7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png new file mode 100644 index 0000000000..1f53895490 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta new file mode 100644 index 0000000000..0285ac2f3b --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":2, + "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png new file mode 100644 index 0000000000..50be701a0b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png new file mode 100644 index 0000000000..8eeb0179d7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png new file mode 100644 index 0000000000..ffac706bbd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png new file mode 100644 index 0000000000..87c6017569 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png new file mode 100644 index 0000000000..61d1f49a12 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png new file mode 100644 index 0000000000..47f1792843 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png new file mode 100644 index 0000000000..548c0ec283 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png new file mode 100644 index 0000000000..172fab4657 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png new file mode 100644 index 0000000000..68ab46a03d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png new file mode 100644 index 0000000000..4443dc8024 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png new file mode 100644 index 0000000000..44bc5362ac Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png new file mode 100644 index 0000000000..ed8ad55ba2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta new file mode 100644 index 0000000000..ba9119c7ad --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png new file mode 100644 index 0000000000..48315c82cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png new file mode 100644 index 0000000000..e3a652f3f9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png new file mode 100644 index 0000000000..d759a163a4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png new file mode 100644 index 0000000000..eb6c62491e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png new file mode 100644 index 0000000000..f8d0b84c10 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png new file mode 100644 index 0000000000..eb3257c754 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png new file mode 100644 index 0000000000..3a1b683837 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png new file mode 100644 index 0000000000..a5d73f716d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png new file mode 100644 index 0000000000..53df62051b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png new file mode 100644 index 0000000000..5bc352238f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png new file mode 100644 index 0000000000..32b6735a0d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png new file mode 100644 index 0000000000..946559cf4e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png new file mode 100644 index 0000000000..196600afdb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png new file mode 100644 index 0000000000..1bcd1ec78f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png new file mode 100644 index 0000000000..54381fcf21 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png new file mode 100644 index 0000000000..0cf3f40762 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/net.png b/src/main/resources/assets/miscutils/textures/blocks/net.png new file mode 100644 index 0000000000..e885ed12db Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/net.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redox/redox1.png b/src/main/resources/assets/miscutils/textures/blocks/redox/redox1.png new file mode 100644 index 0000000000..05b752e0e7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redox/redox1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redox/redox2.png b/src/main/resources/assets/miscutils/textures/blocks/redox/redox2.png new file mode 100644 index 0000000000..231b6b17af Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redox/redox2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redox/redox3.png b/src/main/resources/assets/miscutils/textures/blocks/redox/redox3.png new file mode 100644 index 0000000000..88cb664c41 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redox/redox3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redox/redox4.png b/src/main/resources/assets/miscutils/textures/blocks/redox/redox4.png new file mode 100644 index 0000000000..a627b64eef Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redox/redox4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redox/redox5.png b/src/main/resources/assets/miscutils/textures/blocks/redox/redox5.png new file mode 100644 index 0000000000..9564596329 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redox/redox5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redox/redox6.png b/src/main/resources/assets/miscutils/textures/blocks/redox/redox6.png new file mode 100644 index 0000000000..1023b718cc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redox/redox6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png b/src/main/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png new file mode 100644 index 0000000000..ba45c43891 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/rum_mature_flow.png b/src/main/resources/assets/miscutils/textures/blocks/rum_mature_flow.png new file mode 100644 index 0000000000..f155520eae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/rum_mature_flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/rum_mature_still.png b/src/main/resources/assets/miscutils/textures/blocks/rum_mature_still.png new file mode 100644 index 0000000000..f155520eae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/rum_mature_still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png b/src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png new file mode 100644 index 0000000000..f155520eae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png b/src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png new file mode 100644 index 0000000000..f155520eae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png new file mode 100644 index 0000000000..68949e5f47 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png new file mode 100644 index 0000000000..c7c0d6492f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png new file mode 100644 index 0000000000..ddccb0e4fa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png new file mode 100644 index 0000000000..96e756c22c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png new file mode 100644 index 0000000000..ae77894258 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png new file mode 100644 index 0000000000..146b0a99b6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png new file mode 100644 index 0000000000..3ff2ee2021 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png new file mode 100644 index 0000000000..99137b6f26 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png b/src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png new file mode 100644 index 0000000000..f4c3ca84ac Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png b/src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png new file mode 100644 index 0000000000..93d414d695 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/workbench.png b/src/main/resources/assets/miscutils/textures/blocks/workbench.png new file mode 100644 index 0000000000..b40ad65c71 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/workbench.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/workbench_top.png b/src/main/resources/assets/miscutils/textures/blocks/workbench_top.png new file mode 100644 index 0000000000..5cd53a54bf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/workbench_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/boar.png b/src/main/resources/assets/miscutils/textures/entity/australia/boar.png new file mode 100644 index 0000000000..147fc906fc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/boar.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/bush_spider.png b/src/main/resources/assets/miscutils/textures/entity/australia/bush_spider.png new file mode 100644 index 0000000000..5e05105be5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/bush_spider.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png new file mode 100644 index 0000000000..3fa3b44ea7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png new file mode 100644 index 0000000000..9b2912aba5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png new file mode 100644 index 0000000000..6e37c611cb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png new file mode 100644 index 0000000000..cd539c5773 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/australia/octopus.png b/src/main/resources/assets/miscutils/textures/entity/australia/octopus.png new file mode 100644 index 0000000000..8ce98b003c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/australia/octopus.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/batKing.png b/src/main/resources/assets/miscutils/textures/entity/batKing.png new file mode 100644 index 0000000000..ced2722563 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/batKing.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/golemStaballoy.png b/src/main/resources/assets/miscutils/textures/entity/golemStaballoy.png new file mode 100644 index 0000000000..307a25bd3f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/golemStaballoy.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/sickBlaze.png b/src/main/resources/assets/miscutils/textures/entity/sickBlaze.png new file mode 100644 index 0000000000..d2b36d633d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/sickBlaze.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/villager/aboriginal.png b/src/main/resources/assets/miscutils/textures/entity/villager/aboriginal.png new file mode 100644 index 0000000000..cd0474869f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/villager/aboriginal.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/villager/banker.png b/src/main/resources/assets/miscutils/textures/entity/villager/banker.png new file mode 100644 index 0000000000..afe65842cb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/villager/banker.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/villager/technician.png b/src/main/resources/assets/miscutils/textures/entity/villager/technician.png new file mode 100644 index 0000000000..3df6503f9e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/villager/technician.png differ diff --git a/src/main/resources/assets/miscutils/textures/entity/villager/trader.png b/src/main/resources/assets/miscutils/textures/entity/villager/trader.png new file mode 100644 index 0000000000..f21c4eea6c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/entity/villager/trader.png differ diff --git a/src/main/resources/assets/miscutils/textures/enviroment/moon_phases.png b/src/main/resources/assets/miscutils/textures/enviroment/moon_phases.png new file mode 100644 index 0000000000..9131d0f58c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/enviroment/moon_phases.png differ diff --git a/src/main/resources/assets/miscutils/textures/enviroment/snow.png b/src/main/resources/assets/miscutils/textures/enviroment/snow.png new file mode 100644 index 0000000000..a91935ee0e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/enviroment/snow.png differ diff --git a/src/main/resources/assets/miscutils/textures/enviroment/sun.png b/src/main/resources/assets/miscutils/textures/enviroment/sun.png new file mode 100644 index 0000000000..6c25e9c637 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/enviroment/sun.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/AdvancedBoiler.png b/src/main/resources/assets/miscutils/textures/gui/AdvancedBoiler.png new file mode 100644 index 0000000000..e678d0fdb2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/AdvancedBoiler.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png b/src/main/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png new file mode 100644 index 0000000000..1b2314c488 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png b/src/main/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png new file mode 100644 index 0000000000..ea9319a50e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/CircuitProgrammer.png b/src/main/resources/assets/miscutils/textures/gui/CircuitProgrammer.png new file mode 100644 index 0000000000..8f77124bbb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/CircuitProgrammer.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/CokeOven.png b/src/main/resources/assets/miscutils/textures/gui/CokeOven.png new file mode 100644 index 0000000000..c094d9c319 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/CokeOven.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/Cyclotron.png b/src/main/resources/assets/miscutils/textures/gui/Cyclotron.png new file mode 100644 index 0000000000..98c374ace8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/Cyclotron.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/FishTrap.png b/src/main/resources/assets/miscutils/textures/gui/FishTrap.png new file mode 100644 index 0000000000..35423fffb9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/FishTrap.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/FluidReactor.png b/src/main/resources/assets/miscutils/textures/gui/FluidReactor.png new file mode 100644 index 0000000000..b8e88bd461 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/FluidReactor.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/Generic3By3.png b/src/main/resources/assets/miscutils/textures/gui/Generic3By3.png new file mode 100644 index 0000000000..1d8c806693 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/Generic3By3.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png new file mode 100644 index 0000000000..95ec56941d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png new file mode 100644 index 0000000000..a555f14f11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png new file mode 100644 index 0000000000..ec8d7eb118 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialExtruder.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialExtruder.png new file mode 100644 index 0000000000..a555f14f11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialExtruder.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialMixer.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialMixer.png new file mode 100644 index 0000000000..1c24391f02 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialMixer.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialSifter.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialSifter.png new file mode 100644 index 0000000000..34641e3a09 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialSifter.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png new file mode 100644 index 0000000000..d75e2b6ae6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png new file mode 100644 index 0000000000..4475138f7b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png b/src/main/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png new file mode 100644 index 0000000000..dd0c5ce5e7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/IronBlastFurnace.png b/src/main/resources/assets/miscutils/textures/gui/IronBlastFurnace.png new file mode 100644 index 0000000000..c2ccbba96b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/IronBlastFurnace.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/MacerationStack.png b/src/main/resources/assets/miscutils/textures/gui/MacerationStack.png new file mode 100644 index 0000000000..7fb4099566 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/MacerationStack.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/MaterialPress.png b/src/main/resources/assets/miscutils/textures/gui/MaterialPress.png new file mode 100644 index 0000000000..70befc17f0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/MaterialPress.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/MatterFabricator.png b/src/main/resources/assets/miscutils/textures/gui/MatterFabricator.png new file mode 100644 index 0000000000..1d5e9d27b8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/MatterFabricator.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/ModularityTable.png b/src/main/resources/assets/miscutils/textures/gui/ModularityTable.png new file mode 100644 index 0000000000..1a455d4f95 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/ModularityTable.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay.png b/src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay.png new file mode 100644 index 0000000000..bec61bce18 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png b/src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png new file mode 100644 index 0000000000..c1ed0e5f37 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/PestKiller.png b/src/main/resources/assets/miscutils/textures/gui/PestKiller.png new file mode 100644 index 0000000000..d1978ae04a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/PestKiller.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/PollutionCleaner.png b/src/main/resources/assets/miscutils/textures/gui/PollutionCleaner.png new file mode 100644 index 0000000000..6162c2fdc3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/PollutionCleaner.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/PowerSubStation.png b/src/main/resources/assets/miscutils/textures/gui/PowerSubStation.png new file mode 100644 index 0000000000..a764dc719a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/PowerSubStation.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/ProjectTable.png b/src/main/resources/assets/miscutils/textures/gui/ProjectTable.png new file mode 100644 index 0000000000..e8f65a6752 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/ProjectTable.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/RoundRobinator.png b/src/main/resources/assets/miscutils/textures/gui/RoundRobinator.png new file mode 100644 index 0000000000..54c06f22ae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/RoundRobinator.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/SafeBlock.png b/src/main/resources/assets/miscutils/textures/gui/SafeBlock.png new file mode 100644 index 0000000000..fe60913941 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/SafeBlock.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/SlowFusion.png b/src/main/resources/assets/miscutils/textures/gui/SlowFusion.png new file mode 100644 index 0000000000..76c6c91ad1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/SlowFusion.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/SteelBoiler.png b/src/main/resources/assets/miscutils/textures/gui/SteelBoiler.png new file mode 100644 index 0000000000..e4f2869e8f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/SteelBoiler.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/SuperJukebox.png b/src/main/resources/assets/miscutils/textures/gui/SuperJukebox.png new file mode 100644 index 0000000000..c50c0da4a5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/SuperJukebox.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/TreeFarmer.png b/src/main/resources/assets/miscutils/textures/gui/TreeFarmer.png new file mode 100644 index 0000000000..cd2e86dcb4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/TreeFarmer.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png b/src/main/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png new file mode 100644 index 0000000000..08f9761233 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/Workbench.png b/src/main/resources/assets/miscutils/textures/gui/Workbench.png new file mode 100644 index 0000000000..95d93d3c4c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/Workbench.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/helium_collector_gui.png b/src/main/resources/assets/miscutils/textures/gui/helium_collector_gui.png new file mode 100644 index 0000000000..b22d0ed947 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/helium_collector_gui.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/itemBackpack.png b/src/main/resources/assets/miscutils/textures/gui/itemBackpack.png new file mode 100644 index 0000000000..08ac08a2db Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/itemBackpack.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/itemGrindle.png b/src/main/resources/assets/miscutils/textures/gui/itemGrindle.png new file mode 100644 index 0000000000..98ccb311d0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/itemGrindle.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/machine_Charger.png b/src/main/resources/assets/miscutils/textures/gui/machine_Charger.png new file mode 100644 index 0000000000..dcad2b2983 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/machine_Charger.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/nei/decayables.png b/src/main/resources/assets/miscutils/textures/gui/nei/decayables.png new file mode 100644 index 0000000000..d1827433a0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/nei/decayables.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/nei/widgets.png b/src/main/resources/assets/miscutils/textures/gui/nei/widgets.png new file mode 100644 index 0000000000..0dc26c43e4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/nei/widgets.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png b/src/main/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png new file mode 100644 index 0000000000..5427f66858 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png new file mode 100644 index 0000000000..4a7c1ce427 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png new file mode 100644 index 0000000000..4a7c1ce427 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png new file mode 100644 index 0000000000..bf81a1b4b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png new file mode 100644 index 0000000000..cedee004e4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png new file mode 100644 index 0000000000..1ebe9648e6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png new file mode 100644 index 0000000000..c73159e9da Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png new file mode 100644 index 0000000000..5e2e56f927 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png new file mode 100644 index 0000000000..8ad5f2ee31 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png new file mode 100644 index 0000000000..f9ebf8c4a5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png new file mode 100644 index 0000000000..b3b257e59c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png new file mode 100644 index 0000000000..3d47ce434c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png new file mode 100644 index 0000000000..2b99670ea1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png new file mode 100644 index 0000000000..e516903d26 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png new file mode 100644 index 0000000000..bf81a1b4b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png new file mode 100644 index 0000000000..97767a73c6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png new file mode 100644 index 0000000000..3147037815 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png new file mode 100644 index 0000000000..dce530370f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png new file mode 100644 index 0000000000..0c85939327 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png new file mode 100644 index 0000000000..b3c3716abb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png new file mode 100644 index 0000000000..a9a9c6fcee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png new file mode 100644 index 0000000000..051b45e6bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png new file mode 100644 index 0000000000..051b45e6bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png new file mode 100644 index 0000000000..1938287f27 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png new file mode 100644 index 0000000000..327e530f1b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png new file mode 100644 index 0000000000..635be463af Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png new file mode 100644 index 0000000000..24afa30c17 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png new file mode 100644 index 0000000000..847e54ef60 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png new file mode 100644 index 0000000000..ddd9cb7a2f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png new file mode 100644 index 0000000000..e21c4fb78c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png new file mode 100644 index 0000000000..29e270f862 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png new file mode 100644 index 0000000000..87a48050fd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png new file mode 100644 index 0000000000..3836414587 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png new file mode 100644 index 0000000000..051b45e6bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png new file mode 100644 index 0000000000..8b38dcd9ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png new file mode 100644 index 0000000000..53682976a8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png new file mode 100644 index 0000000000..8a21902982 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png new file mode 100644 index 0000000000..81f418e1a8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png new file mode 100644 index 0000000000..2e66f92a2c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png new file mode 100644 index 0000000000..61a783176e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png new file mode 100644 index 0000000000..16a79d6896 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png new file mode 100644 index 0000000000..4b39623750 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png new file mode 100644 index 0000000000..fbe1b9ac82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png new file mode 100644 index 0000000000..5979772ace Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png new file mode 100644 index 0000000000..051b45e6bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png new file mode 100644 index 0000000000..254680aff4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png new file mode 100644 index 0000000000..29ba464570 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png new file mode 100644 index 0000000000..5ddb32de79 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png new file mode 100644 index 0000000000..fa7f814d3a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png new file mode 100644 index 0000000000..673c6e011b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png new file mode 100644 index 0000000000..65fc3f7d6e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png new file mode 100644 index 0000000000..5ddb32de79 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png new file mode 100644 index 0000000000..5ddb32de79 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png new file mode 100644 index 0000000000..5ddb32de79 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png new file mode 100644 index 0000000000..4a7c1ce427 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png new file mode 100644 index 0000000000..38f7ec8756 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png new file mode 100644 index 0000000000..e10815677a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png new file mode 100644 index 0000000000..661cd14817 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png new file mode 100644 index 0000000000..6c64b90877 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png new file mode 100644 index 0000000000..ec3c0358a1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png new file mode 100644 index 0000000000..daace0f92a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png new file mode 100644 index 0000000000..f5d5a1bc39 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png new file mode 100644 index 0000000000..d6ff394c66 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png new file mode 100644 index 0000000000..9f03d572b7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png new file mode 100644 index 0000000000..548784db2a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png new file mode 100644 index 0000000000..38f7ec8756 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png new file mode 100644 index 0000000000..6f403c14f5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png new file mode 100644 index 0000000000..6614c152a6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png new file mode 100644 index 0000000000..98c4b4f2b7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png new file mode 100644 index 0000000000..56da7e8d0d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png new file mode 100644 index 0000000000..cffad53f13 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png new file mode 100644 index 0000000000..6c9c006044 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png new file mode 100644 index 0000000000..ee1c87e1b1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png new file mode 100644 index 0000000000..5d6a74cd72 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png new file mode 100644 index 0000000000..881bdaa78a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png new file mode 100644 index 0000000000..38f7ec8756 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png new file mode 100644 index 0000000000..00900203dc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png new file mode 100644 index 0000000000..ccf9edc4a4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png new file mode 100644 index 0000000000..38f7ec8756 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png new file mode 100644 index 0000000000..a1c2183ee8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png new file mode 100644 index 0000000000..a1c2183ee8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png new file mode 100644 index 0000000000..a1c2183ee8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png new file mode 100644 index 0000000000..a1c2183ee8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png new file mode 100644 index 0000000000..5e4886b0f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png new file mode 100644 index 0000000000..5e4886b0f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png new file mode 100644 index 0000000000..4a7c1ce427 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png new file mode 100644 index 0000000000..5e4886b0f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png new file mode 100644 index 0000000000..5e4886b0f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png new file mode 100644 index 0000000000..4a7c1ce427 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png new file mode 100644 index 0000000000..1a3acd9e94 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png new file mode 100644 index 0000000000..bf81a1b4b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png new file mode 100644 index 0000000000..051b45e6bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png new file mode 100644 index 0000000000..5ddb32de79 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png new file mode 100644 index 0000000000..38f7ec8756 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png new file mode 100644 index 0000000000..a1c2183ee8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png new file mode 100644 index 0000000000..5e4886b0f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png new file mode 100644 index 0000000000..1a3acd9e94 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png new file mode 100644 index 0000000000..a1b063620a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png new file mode 100644 index 0000000000..9b9c314475 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png new file mode 100644 index 0000000000..b3f174ebd4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png new file mode 100644 index 0000000000..0939c7eb87 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png new file mode 100644 index 0000000000..23cc1deb66 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png new file mode 100644 index 0000000000..1a3acd9e94 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png new file mode 100644 index 0000000000..52d46cb62c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png new file mode 100644 index 0000000000..6660384d76 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png new file mode 100644 index 0000000000..0b4e7d6583 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png new file mode 100644 index 0000000000..554a7d8e52 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png new file mode 100644 index 0000000000..b567a0cd15 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png new file mode 100644 index 0000000000..891608d308 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png new file mode 100644 index 0000000000..246319069a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png new file mode 100644 index 0000000000..296c9b6c97 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png new file mode 100644 index 0000000000..fe22c02056 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png new file mode 100644 index 0000000000..52d46cb62c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png new file mode 100644 index 0000000000..6660384d76 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png new file mode 100644 index 0000000000..0b4e7d6583 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png new file mode 100644 index 0000000000..554a7d8e52 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png new file mode 100644 index 0000000000..b567a0cd15 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png new file mode 100644 index 0000000000..891608d308 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png new file mode 100644 index 0000000000..246319069a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png new file mode 100644 index 0000000000..296c9b6c97 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png new file mode 100644 index 0000000000..fe22c02056 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png new file mode 100644 index 0000000000..52d46cb62c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png new file mode 100644 index 0000000000..6660384d76 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png new file mode 100644 index 0000000000..0b4e7d6583 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png new file mode 100644 index 0000000000..554a7d8e52 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png new file mode 100644 index 0000000000..b567a0cd15 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png new file mode 100644 index 0000000000..891608d308 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png new file mode 100644 index 0000000000..246319069a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png new file mode 100644 index 0000000000..296c9b6c97 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png new file mode 100644 index 0000000000..fe22c02056 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png new file mode 100644 index 0000000000..23e0a10e06 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png new file mode 100644 index 0000000000..1a3acd9e94 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png new file mode 100644 index 0000000000..08122e5042 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png new file mode 100644 index 0000000000..f1756e78ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png new file mode 100644 index 0000000000..9190330469 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png new file mode 100644 index 0000000000..f1756e78ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png new file mode 100644 index 0000000000..032a256989 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png new file mode 100644 index 0000000000..d96558c8f5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png new file mode 100644 index 0000000000..4d8f366b9c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png new file mode 100644 index 0000000000..1a3acd9e94 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png new file mode 100644 index 0000000000..e914a7c788 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png new file mode 100644 index 0000000000..af05b249b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png new file mode 100644 index 0000000000..87d68083fa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png new file mode 100644 index 0000000000..197729ce5c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png new file mode 100644 index 0000000000..9f75ddb6f2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png new file mode 100644 index 0000000000..011f12583d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png new file mode 100644 index 0000000000..2968f9e0f9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png new file mode 100644 index 0000000000..ab26c57778 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png new file mode 100644 index 0000000000..84cb315d59 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png new file mode 100644 index 0000000000..ac695c9089 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png new file mode 100644 index 0000000000..bd629f0ee4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png new file mode 100644 index 0000000000..9555795cbe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png new file mode 100644 index 0000000000..b8294d66d5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png new file mode 100644 index 0000000000..d1ddb92013 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png new file mode 100644 index 0000000000..db0d4d4dde Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png new file mode 100644 index 0000000000..dd3de3ecff Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png new file mode 100644 index 0000000000..dd3de3ecff Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png new file mode 100644 index 0000000000..506ab6621b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png new file mode 100644 index 0000000000..506ab6621b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png new file mode 100644 index 0000000000..506ab6621b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png new file mode 100644 index 0000000000..05c3440206 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png new file mode 100644 index 0000000000..e1ea94bac6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png new file mode 100644 index 0000000000..6b6d885084 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png new file mode 100644 index 0000000000..23b7878fdd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png new file mode 100644 index 0000000000..68de2aba73 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png new file mode 100644 index 0000000000..c0d974240c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png new file mode 100644 index 0000000000..e1f8be799b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png new file mode 100644 index 0000000000..ee106b029f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png new file mode 100644 index 0000000000..3aed0ef200 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png new file mode 100644 index 0000000000..03d271872e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png new file mode 100644 index 0000000000..dd87199ae2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png new file mode 100644 index 0000000000..5b9053e1f4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png new file mode 100644 index 0000000000..23c87b8a2d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png new file mode 100644 index 0000000000..511366e648 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png new file mode 100644 index 0000000000..d8d2012c51 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png new file mode 100644 index 0000000000..1e538bce45 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png new file mode 100644 index 0000000000..ed806126fb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png new file mode 100644 index 0000000000..a7452f94ee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png new file mode 100644 index 0000000000..e371af02f9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png new file mode 100644 index 0000000000..e911b80d03 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png new file mode 100644 index 0000000000..bf81a1b4b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png new file mode 100644 index 0000000000..bf81a1b4b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/0.png b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/0.png new file mode 100644 index 0000000000..3bcbace856 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/1.png b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/1.png new file mode 100644 index 0000000000..eb6baf34ae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/2.png b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/2.png new file mode 100644 index 0000000000..3b72cb69b6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/3.png b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/3.png new file mode 100644 index 0000000000..ca0ad43c3b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metatool.01/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/StoneStatue.png b/src/main/resources/assets/miscutils/textures/items/StoneStatue.png new file mode 100644 index 0000000000..36ab6ccd56 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/StoneStatue.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png b/src/main/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png new file mode 100644 index 0000000000..8576ae1b7a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png b/src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png new file mode 100644 index 0000000000..efa1a6e0ca Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png b/src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png new file mode 100644 index 0000000000..aaea7803b5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png b/src/main/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png new file mode 100644 index 0000000000..c2736be76c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png new file mode 100644 index 0000000000..57d77be16a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png new file mode 100644 index 0000000000..51bb4587d9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png new file mode 100644 index 0000000000..e81bae4aae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png new file mode 100644 index 0000000000..0cc273996e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png new file mode 100644 index 0000000000..dca743acd3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png new file mode 100644 index 0000000000..15257d9efd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png new file mode 100644 index 0000000000..f81fc43aff Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png new file mode 100644 index 0000000000..31951671cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png new file mode 100644 index 0000000000..2c6e0b8cb6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png new file mode 100644 index 0000000000..4309f3a975 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png new file mode 100644 index 0000000000..e82660e9f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png new file mode 100644 index 0000000000..dc2070e635 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png new file mode 100644 index 0000000000..2cdf37adad Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png new file mode 100644 index 0000000000..9b536f84d0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png new file mode 100644 index 0000000000..1a04c2415c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png new file mode 100644 index 0000000000..77be3ef6a8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png new file mode 100644 index 0000000000..110cd7f8e8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png new file mode 100644 index 0000000000..0c065db4ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png new file mode 100644 index 0000000000..168b15adb3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png new file mode 100644 index 0000000000..c98e2d6319 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png new file mode 100644 index 0000000000..af0bcc7064 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png new file mode 100644 index 0000000000..1b60b7f555 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png new file mode 100644 index 0000000000..7f6f045430 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png new file mode 100644 index 0000000000..8a2cd2891b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png new file mode 100644 index 0000000000..c8c6299d7b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png new file mode 100644 index 0000000000..df99f3f5e8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bomb.png b/src/main/resources/assets/miscutils/textures/items/bomb.png new file mode 100644 index 0000000000..e8e9b0f532 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bomb.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bomb_casing.png b/src/main/resources/assets/miscutils/textures/items/bomb_casing.png new file mode 100644 index 0000000000..d4238babe2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bomb_casing.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bomb_lit.png b/src/main/resources/assets/miscutils/textures/items/bomb_lit.png new file mode 100644 index 0000000000..e40029160b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bomb_lit.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bucket.generic.overlay.png b/src/main/resources/assets/miscutils/textures/items/bucket.generic.overlay.png new file mode 100644 index 0000000000..1597a9cc4a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bucket.generic.overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png b/src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png new file mode 100644 index 0000000000..f6c9a9f131 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta b/src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta new file mode 100644 index 0000000000..70cc4d313c --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 6 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png b/src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png new file mode 100644 index 0000000000..6a00cf1509 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta b/src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta new file mode 100644 index 0000000000..f6730e30a9 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 4 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png b/src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png new file mode 100644 index 0000000000..82f1bb4b84 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta b/src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta new file mode 100644 index 0000000000..ddc2f9fb7a --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta @@ -0,0 +1,23 @@ +{ + "animation": { + "frametime": 2, + "frames": [ + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1, + 0 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png b/src/main/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png new file mode 100644 index 0000000000..99a6af0f18 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png b/src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png new file mode 100644 index 0000000000..3cb0ac7097 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png b/src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png new file mode 100644 index 0000000000..9dc98ba18d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png b/src/main/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png new file mode 100644 index 0000000000..4f8fd406d4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png b/src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png new file mode 100644 index 0000000000..f66a217c78 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png b/src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png new file mode 100644 index 0000000000..055655ebe1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/1.png b/src/main/resources/assets/miscutils/textures/items/chargepack/1.png new file mode 100644 index 0000000000..9039d443c3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/2.png b/src/main/resources/assets/miscutils/textures/items/chargepack/2.png new file mode 100644 index 0000000000..7023e7ce82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/3.png b/src/main/resources/assets/miscutils/textures/items/chargepack/3.png new file mode 100644 index 0000000000..4d787e7aa8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/4.png b/src/main/resources/assets/miscutils/textures/items/chargepack/4.png new file mode 100644 index 0000000000..9320de0611 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/5.png b/src/main/resources/assets/miscutils/textures/items/chargepack/5.png new file mode 100644 index 0000000000..ab8771c89c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/6.png b/src/main/resources/assets/miscutils/textures/items/chargepack/6.png new file mode 100644 index 0000000000..a01f435e72 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/7.png b/src/main/resources/assets/miscutils/textures/items/chargepack/7.png new file mode 100644 index 0000000000..fb5a5fba43 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/8.png b/src/main/resources/assets/miscutils/textures/items/chargepack/8.png new file mode 100644 index 0000000000..aff1ec693f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/chargepack/9.png b/src/main/resources/assets/miscutils/textures/items/chargepack/9.png new file mode 100644 index 0000000000..0b9cf4d18e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/chargepack/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_0.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_0.png new file mode 100644 index 0000000000..a35084d087 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_1.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_1.png new file mode 100644 index 0000000000..93c1d6fd31 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_2.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_2.png new file mode 100644 index 0000000000..7eb734b97d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_3.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_3.png new file mode 100644 index 0000000000..7613641938 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_4.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_4.png new file mode 100644 index 0000000000..83fe4225c8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_5.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_5.png new file mode 100644 index 0000000000..15f0e28421 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_6.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_6.png new file mode 100644 index 0000000000..da59694ac6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_7.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_7.png new file mode 100644 index 0000000000..2055a6cb57 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_8.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_8.png new file mode 100644 index 0000000000..3f8a60db8d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/controlcore/Core_9.png b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_9.png new file mode 100644 index 0000000000..15046c1fbb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/controlcore/Core_9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/0.png b/src/main/resources/assets/miscutils/textures/items/covers/0.png new file mode 100644 index 0000000000..1938287f27 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/1.png b/src/main/resources/assets/miscutils/textures/items/covers/1.png new file mode 100644 index 0000000000..327e530f1b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/10.png b/src/main/resources/assets/miscutils/textures/items/covers/10.png new file mode 100644 index 0000000000..9e48f50335 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/11.png b/src/main/resources/assets/miscutils/textures/items/covers/11.png new file mode 100644 index 0000000000..32ffcb8008 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/12.png b/src/main/resources/assets/miscutils/textures/items/covers/12.png new file mode 100644 index 0000000000..48b1eadf93 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/13.png b/src/main/resources/assets/miscutils/textures/items/covers/13.png new file mode 100644 index 0000000000..7f6a13cb82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/14.png b/src/main/resources/assets/miscutils/textures/items/covers/14.png new file mode 100644 index 0000000000..9f59404337 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/15.png b/src/main/resources/assets/miscutils/textures/items/covers/15.png new file mode 100644 index 0000000000..ed0f49bd0f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/2.png b/src/main/resources/assets/miscutils/textures/items/covers/2.png new file mode 100644 index 0000000000..635be463af Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/3.png b/src/main/resources/assets/miscutils/textures/items/covers/3.png new file mode 100644 index 0000000000..24afa30c17 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/4.png b/src/main/resources/assets/miscutils/textures/items/covers/4.png new file mode 100644 index 0000000000..847e54ef60 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/5.png b/src/main/resources/assets/miscutils/textures/items/covers/5.png new file mode 100644 index 0000000000..ddd9cb7a2f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/6.png b/src/main/resources/assets/miscutils/textures/items/covers/6.png new file mode 100644 index 0000000000..e21c4fb78c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/7.png b/src/main/resources/assets/miscutils/textures/items/covers/7.png new file mode 100644 index 0000000000..29e270f862 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/8.png b/src/main/resources/assets/miscutils/textures/items/covers/8.png new file mode 100644 index 0000000000..87a48050fd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/covers/9.png b/src/main/resources/assets/miscutils/textures/items/covers/9.png new file mode 100644 index 0000000000..3836414587 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/covers/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png new file mode 100644 index 0000000000..652f68aeb7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png new file mode 100644 index 0000000000..7a14abccbd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png new file mode 100644 index 0000000000..cc0a5fe94d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png new file mode 100644 index 0000000000..ce0dbab306 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png new file mode 100644 index 0000000000..2b2f615676 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png new file mode 100644 index 0000000000..f01ba96be9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png new file mode 100644 index 0000000000..f57bb1308b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png new file mode 100644 index 0000000000..77a416a3a6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dust.png b/src/main/resources/assets/miscutils/textures/items/dust.png new file mode 100644 index 0000000000..4c8e6485ec Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dust.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dustSmall.png b/src/main/resources/assets/miscutils/textures/items/dustSmall.png new file mode 100644 index 0000000000..c432a032c2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dustSmall.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/dustTiny.png b/src/main/resources/assets/miscutils/textures/items/dustTiny.png new file mode 100644 index 0000000000..8f597c61e0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/dustTiny.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/0.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/0.png new file mode 100644 index 0000000000..944ab47126 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/1.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/1.png new file mode 100644 index 0000000000..2d235ca65d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/2.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/2.png new file mode 100644 index 0000000000..ec81acba2c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/3.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/3.png new file mode 100644 index 0000000000..1fc103297a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/4.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/4.png new file mode 100644 index 0000000000..db5ddf0063 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/5.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/5.png new file mode 100644 index 0000000000..2497c88e2d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/6.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/6.png new file mode 100644 index 0000000000..083db84ef1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/7.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/7.png new file mode 100644 index 0000000000..27927d0db6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/8.png b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/8.png new file mode 100644 index 0000000000..7013c41d6b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/food/MetaItem1/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameAccelerated.png b/src/main/resources/assets/miscutils/textures/items/frameAccelerated.png new file mode 100644 index 0000000000..e02bd78586 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameAccelerated.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameArborists.png b/src/main/resources/assets/miscutils/textures/items/frameArborists.png new file mode 100644 index 0000000000..b55d3a92e6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameArborists.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameBusy.png b/src/main/resources/assets/miscutils/textures/items/frameBusy.png new file mode 100644 index 0000000000..ea20d3d046 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameBusy.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameChocolate.png b/src/main/resources/assets/miscutils/textures/items/frameChocolate.png new file mode 100644 index 0000000000..624e9b674b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameChocolate.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameDecaying.png b/src/main/resources/assets/miscutils/textures/items/frameDecaying.png new file mode 100644 index 0000000000..3e6feb1a3c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameDecaying.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameHealing.png b/src/main/resources/assets/miscutils/textures/items/frameHealing.png new file mode 100644 index 0000000000..7756b84da2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameHealing.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameMutagenic.png b/src/main/resources/assets/miscutils/textures/items/frameMutagenic.png new file mode 100644 index 0000000000..0a24289776 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameMutagenic.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameNova.png b/src/main/resources/assets/miscutils/textures/items/frameNova.png new file mode 100644 index 0000000000..3ed54fef87 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameNova.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameRestraint.png b/src/main/resources/assets/miscutils/textures/items/frameRestraint.png new file mode 100644 index 0000000000..4fc5cd3ab4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameRestraint.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameSlowing.png b/src/main/resources/assets/miscutils/textures/items/frameSlowing.png new file mode 100644 index 0000000000..8d07fdd47b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameSlowing.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameSoul.png b/src/main/resources/assets/miscutils/textures/items/frameSoul.png new file mode 100644 index 0000000000..c044632ec9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameSoul.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameStabilizing.png b/src/main/resources/assets/miscutils/textures/items/frameStabilizing.png new file mode 100644 index 0000000000..1fed360bf7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameStabilizing.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameUseless.png b/src/main/resources/assets/miscutils/textures/items/frameUseless.png new file mode 100644 index 0000000000..e316e0a5d6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameUseless.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/frameVoid.png b/src/main/resources/assets/miscutils/textures/items/frameVoid.png new file mode 100644 index 0000000000..45fc307328 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/frameVoid.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png new file mode 100644 index 0000000000..3030cbe6aa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png new file mode 100644 index 0000000000..5114f2c9a8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png new file mode 100644 index 0000000000..1c6257f336 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png new file mode 100644 index 0000000000..1c91860461 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png new file mode 100644 index 0000000000..8ccd7f3c1a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png b/src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png new file mode 100644 index 0000000000..ae13305b96 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png new file mode 100644 index 0000000000..ae13305b96 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png b/src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png new file mode 100644 index 0000000000..d6ba7ec2ca Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png new file mode 100644 index 0000000000..d83a131004 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/VOID.png b/src/main/resources/assets/miscutils/textures/items/iconsets/VOID.png new file mode 100644 index 0000000000..db16e741fe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/VOID.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/0.png b/src/main/resources/assets/miscutils/textures/items/ion/0.png new file mode 100644 index 0000000000..c56a04238f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/1.png b/src/main/resources/assets/miscutils/textures/items/ion/1.png new file mode 100644 index 0000000000..174d2ad950 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/10.png b/src/main/resources/assets/miscutils/textures/items/ion/10.png new file mode 100644 index 0000000000..8e3348f582 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/100.png b/src/main/resources/assets/miscutils/textures/items/ion/100.png new file mode 100644 index 0000000000..3d92a39004 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/100.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/101.png b/src/main/resources/assets/miscutils/textures/items/ion/101.png new file mode 100644 index 0000000000..85b8f58ad9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/101.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/102.png b/src/main/resources/assets/miscutils/textures/items/ion/102.png new file mode 100644 index 0000000000..6993d5e4cf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/102.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/103.png b/src/main/resources/assets/miscutils/textures/items/ion/103.png new file mode 100644 index 0000000000..a3faa8a260 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/103.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/104.png b/src/main/resources/assets/miscutils/textures/items/ion/104.png new file mode 100644 index 0000000000..9c80b9d1f0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/104.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/105.png b/src/main/resources/assets/miscutils/textures/items/ion/105.png new file mode 100644 index 0000000000..2633689df4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/105.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/106.png b/src/main/resources/assets/miscutils/textures/items/ion/106.png new file mode 100644 index 0000000000..c368411d12 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/106.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/107.png b/src/main/resources/assets/miscutils/textures/items/ion/107.png new file mode 100644 index 0000000000..fc8e4c2844 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/107.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/108.png b/src/main/resources/assets/miscutils/textures/items/ion/108.png new file mode 100644 index 0000000000..d2b271526a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/108.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/109.png b/src/main/resources/assets/miscutils/textures/items/ion/109.png new file mode 100644 index 0000000000..585321db38 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/109.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/11.png b/src/main/resources/assets/miscutils/textures/items/ion/11.png new file mode 100644 index 0000000000..72baf3d9e9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/110.png b/src/main/resources/assets/miscutils/textures/items/ion/110.png new file mode 100644 index 0000000000..82d73b7aca Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/110.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/111.png b/src/main/resources/assets/miscutils/textures/items/ion/111.png new file mode 100644 index 0000000000..869435fd75 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/111.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/112.png b/src/main/resources/assets/miscutils/textures/items/ion/112.png new file mode 100644 index 0000000000..bb14befcfe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/112.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/113.png b/src/main/resources/assets/miscutils/textures/items/ion/113.png new file mode 100644 index 0000000000..5aae8d7814 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/113.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/114.png b/src/main/resources/assets/miscutils/textures/items/ion/114.png new file mode 100644 index 0000000000..ea4897286d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/114.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/115.png b/src/main/resources/assets/miscutils/textures/items/ion/115.png new file mode 100644 index 0000000000..815acfb339 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/115.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/116.png b/src/main/resources/assets/miscutils/textures/items/ion/116.png new file mode 100644 index 0000000000..a335c2bb70 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/116.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/117.png b/src/main/resources/assets/miscutils/textures/items/ion/117.png new file mode 100644 index 0000000000..f3d46e4bb6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/117.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/12.png b/src/main/resources/assets/miscutils/textures/items/ion/12.png new file mode 100644 index 0000000000..c2698ef286 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/13.png b/src/main/resources/assets/miscutils/textures/items/ion/13.png new file mode 100644 index 0000000000..d9f17334f7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/14.png b/src/main/resources/assets/miscutils/textures/items/ion/14.png new file mode 100644 index 0000000000..0640a05827 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/15.png b/src/main/resources/assets/miscutils/textures/items/ion/15.png new file mode 100644 index 0000000000..8b9a6c872e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/16.png b/src/main/resources/assets/miscutils/textures/items/ion/16.png new file mode 100644 index 0000000000..3e0dbe1143 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/17.png b/src/main/resources/assets/miscutils/textures/items/ion/17.png new file mode 100644 index 0000000000..dfcb224a3e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/18.png b/src/main/resources/assets/miscutils/textures/items/ion/18.png new file mode 100644 index 0000000000..910712afc5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/19.png b/src/main/resources/assets/miscutils/textures/items/ion/19.png new file mode 100644 index 0000000000..63627d13a3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/2.png b/src/main/resources/assets/miscutils/textures/items/ion/2.png new file mode 100644 index 0000000000..ab4474425e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/20.png b/src/main/resources/assets/miscutils/textures/items/ion/20.png new file mode 100644 index 0000000000..c4c2b0da40 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/21.png b/src/main/resources/assets/miscutils/textures/items/ion/21.png new file mode 100644 index 0000000000..ad8c2b6dbf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/22.png b/src/main/resources/assets/miscutils/textures/items/ion/22.png new file mode 100644 index 0000000000..ce4fcd3ff2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/23.png b/src/main/resources/assets/miscutils/textures/items/ion/23.png new file mode 100644 index 0000000000..fe75b049ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/24.png b/src/main/resources/assets/miscutils/textures/items/ion/24.png new file mode 100644 index 0000000000..bb256ca2bb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/25.png b/src/main/resources/assets/miscutils/textures/items/ion/25.png new file mode 100644 index 0000000000..6d413674c2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/26.png b/src/main/resources/assets/miscutils/textures/items/ion/26.png new file mode 100644 index 0000000000..c93c306f5a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/26.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/27.png b/src/main/resources/assets/miscutils/textures/items/ion/27.png new file mode 100644 index 0000000000..f822d7a4bb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/27.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/28.png b/src/main/resources/assets/miscutils/textures/items/ion/28.png new file mode 100644 index 0000000000..1b65383965 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/28.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/29.png b/src/main/resources/assets/miscutils/textures/items/ion/29.png new file mode 100644 index 0000000000..a3c412094e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/29.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/3.png b/src/main/resources/assets/miscutils/textures/items/ion/3.png new file mode 100644 index 0000000000..59ad76340c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/30.png b/src/main/resources/assets/miscutils/textures/items/ion/30.png new file mode 100644 index 0000000000..3ae749cc91 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/30.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/31.png b/src/main/resources/assets/miscutils/textures/items/ion/31.png new file mode 100644 index 0000000000..6bb1f6c61f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/31.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/32.png b/src/main/resources/assets/miscutils/textures/items/ion/32.png new file mode 100644 index 0000000000..c8bc92a688 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/32.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/33.png b/src/main/resources/assets/miscutils/textures/items/ion/33.png new file mode 100644 index 0000000000..5062c0c109 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/33.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/34.png b/src/main/resources/assets/miscutils/textures/items/ion/34.png new file mode 100644 index 0000000000..bd1e33c191 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/34.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/35.png b/src/main/resources/assets/miscutils/textures/items/ion/35.png new file mode 100644 index 0000000000..c2a42ac980 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/35.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/36.png b/src/main/resources/assets/miscutils/textures/items/ion/36.png new file mode 100644 index 0000000000..403d45a66c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/36.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/37.png b/src/main/resources/assets/miscutils/textures/items/ion/37.png new file mode 100644 index 0000000000..89f011e548 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/37.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/38.png b/src/main/resources/assets/miscutils/textures/items/ion/38.png new file mode 100644 index 0000000000..b00ab7f5fc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/38.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/39.png b/src/main/resources/assets/miscutils/textures/items/ion/39.png new file mode 100644 index 0000000000..9fc883c731 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/39.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/4.png b/src/main/resources/assets/miscutils/textures/items/ion/4.png new file mode 100644 index 0000000000..122cd9e837 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/40.png b/src/main/resources/assets/miscutils/textures/items/ion/40.png new file mode 100644 index 0000000000..371171fe61 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/40.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/41.png b/src/main/resources/assets/miscutils/textures/items/ion/41.png new file mode 100644 index 0000000000..acc8d4df0b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/41.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/42.png b/src/main/resources/assets/miscutils/textures/items/ion/42.png new file mode 100644 index 0000000000..0f8432ea59 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/42.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/43.png b/src/main/resources/assets/miscutils/textures/items/ion/43.png new file mode 100644 index 0000000000..1f62a1a4f9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/43.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/44.png b/src/main/resources/assets/miscutils/textures/items/ion/44.png new file mode 100644 index 0000000000..f26b23050a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/44.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/45.png b/src/main/resources/assets/miscutils/textures/items/ion/45.png new file mode 100644 index 0000000000..e2d6413dee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/45.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/46.png b/src/main/resources/assets/miscutils/textures/items/ion/46.png new file mode 100644 index 0000000000..50920e75b5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/46.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/47.png b/src/main/resources/assets/miscutils/textures/items/ion/47.png new file mode 100644 index 0000000000..c31a2ad43d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/47.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/48.png b/src/main/resources/assets/miscutils/textures/items/ion/48.png new file mode 100644 index 0000000000..90b6ab544e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/48.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/49.png b/src/main/resources/assets/miscutils/textures/items/ion/49.png new file mode 100644 index 0000000000..1c1ed02d40 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/49.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/5.png b/src/main/resources/assets/miscutils/textures/items/ion/5.png new file mode 100644 index 0000000000..0f33a3363c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/50.png b/src/main/resources/assets/miscutils/textures/items/ion/50.png new file mode 100644 index 0000000000..c47f4a297e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/50.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/51.png b/src/main/resources/assets/miscutils/textures/items/ion/51.png new file mode 100644 index 0000000000..606a1e8ef4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/51.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/52.png b/src/main/resources/assets/miscutils/textures/items/ion/52.png new file mode 100644 index 0000000000..0a535c6158 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/52.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/53.png b/src/main/resources/assets/miscutils/textures/items/ion/53.png new file mode 100644 index 0000000000..1fef4e5f2f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/53.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/54.png b/src/main/resources/assets/miscutils/textures/items/ion/54.png new file mode 100644 index 0000000000..663170c84d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/54.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/55.png b/src/main/resources/assets/miscutils/textures/items/ion/55.png new file mode 100644 index 0000000000..4519b12d97 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/55.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/56.png b/src/main/resources/assets/miscutils/textures/items/ion/56.png new file mode 100644 index 0000000000..926b37bc80 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/56.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/57.png b/src/main/resources/assets/miscutils/textures/items/ion/57.png new file mode 100644 index 0000000000..c80a29d94e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/57.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/58.png b/src/main/resources/assets/miscutils/textures/items/ion/58.png new file mode 100644 index 0000000000..e33f90d6bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/58.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/59.png b/src/main/resources/assets/miscutils/textures/items/ion/59.png new file mode 100644 index 0000000000..14b48b0c39 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/59.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/6.png b/src/main/resources/assets/miscutils/textures/items/ion/6.png new file mode 100644 index 0000000000..a8a9b906d2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/60.png b/src/main/resources/assets/miscutils/textures/items/ion/60.png new file mode 100644 index 0000000000..4d77e6d779 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/60.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/61.png b/src/main/resources/assets/miscutils/textures/items/ion/61.png new file mode 100644 index 0000000000..42e2669011 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/61.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/62.png b/src/main/resources/assets/miscutils/textures/items/ion/62.png new file mode 100644 index 0000000000..5b0ce84ee4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/62.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/63.png b/src/main/resources/assets/miscutils/textures/items/ion/63.png new file mode 100644 index 0000000000..372d256a0e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/63.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/64.png b/src/main/resources/assets/miscutils/textures/items/ion/64.png new file mode 100644 index 0000000000..61b6521d64 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/64.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/65.png b/src/main/resources/assets/miscutils/textures/items/ion/65.png new file mode 100644 index 0000000000..66129d8bab Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/65.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/66.png b/src/main/resources/assets/miscutils/textures/items/ion/66.png new file mode 100644 index 0000000000..5ec0a6c747 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/66.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/67.png b/src/main/resources/assets/miscutils/textures/items/ion/67.png new file mode 100644 index 0000000000..09c9dd8b12 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/67.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/68.png b/src/main/resources/assets/miscutils/textures/items/ion/68.png new file mode 100644 index 0000000000..d809bd3646 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/68.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/69.png b/src/main/resources/assets/miscutils/textures/items/ion/69.png new file mode 100644 index 0000000000..9e0d0b0d75 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/69.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/7.png b/src/main/resources/assets/miscutils/textures/items/ion/7.png new file mode 100644 index 0000000000..6d1f5c229c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/70.png b/src/main/resources/assets/miscutils/textures/items/ion/70.png new file mode 100644 index 0000000000..5bf9df2778 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/70.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/71.png b/src/main/resources/assets/miscutils/textures/items/ion/71.png new file mode 100644 index 0000000000..f052e1c772 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/71.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/72.png b/src/main/resources/assets/miscutils/textures/items/ion/72.png new file mode 100644 index 0000000000..044e445356 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/72.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/73.png b/src/main/resources/assets/miscutils/textures/items/ion/73.png new file mode 100644 index 0000000000..24bf977862 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/73.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/74.png b/src/main/resources/assets/miscutils/textures/items/ion/74.png new file mode 100644 index 0000000000..7768bd6f4e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/74.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/75.png b/src/main/resources/assets/miscutils/textures/items/ion/75.png new file mode 100644 index 0000000000..ed9961e54f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/75.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/76.png b/src/main/resources/assets/miscutils/textures/items/ion/76.png new file mode 100644 index 0000000000..9010680490 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/76.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/77.png b/src/main/resources/assets/miscutils/textures/items/ion/77.png new file mode 100644 index 0000000000..007497b931 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/77.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/78.png b/src/main/resources/assets/miscutils/textures/items/ion/78.png new file mode 100644 index 0000000000..36c2031937 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/78.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/79.png b/src/main/resources/assets/miscutils/textures/items/ion/79.png new file mode 100644 index 0000000000..144e55beae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/79.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/8.png b/src/main/resources/assets/miscutils/textures/items/ion/8.png new file mode 100644 index 0000000000..0249fbcf3b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/80.png b/src/main/resources/assets/miscutils/textures/items/ion/80.png new file mode 100644 index 0000000000..ec7de9fda2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/80.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/81.png b/src/main/resources/assets/miscutils/textures/items/ion/81.png new file mode 100644 index 0000000000..9e19f0dbde Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/81.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/82.png b/src/main/resources/assets/miscutils/textures/items/ion/82.png new file mode 100644 index 0000000000..f321ff1073 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/82.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/83.png b/src/main/resources/assets/miscutils/textures/items/ion/83.png new file mode 100644 index 0000000000..c219309000 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/83.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/84.png b/src/main/resources/assets/miscutils/textures/items/ion/84.png new file mode 100644 index 0000000000..c7be4342ad Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/84.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/85.png b/src/main/resources/assets/miscutils/textures/items/ion/85.png new file mode 100644 index 0000000000..f0d9995742 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/85.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/86.png b/src/main/resources/assets/miscutils/textures/items/ion/86.png new file mode 100644 index 0000000000..df5da1cc2e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/86.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/87.png b/src/main/resources/assets/miscutils/textures/items/ion/87.png new file mode 100644 index 0000000000..ec37e331ff Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/87.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/88.png b/src/main/resources/assets/miscutils/textures/items/ion/88.png new file mode 100644 index 0000000000..9c53cfa885 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/88.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/89.png b/src/main/resources/assets/miscutils/textures/items/ion/89.png new file mode 100644 index 0000000000..1e7f46a245 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/89.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/9.png b/src/main/resources/assets/miscutils/textures/items/ion/9.png new file mode 100644 index 0000000000..946246b360 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/90.png b/src/main/resources/assets/miscutils/textures/items/ion/90.png new file mode 100644 index 0000000000..023364b0fb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/90.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/91.png b/src/main/resources/assets/miscutils/textures/items/ion/91.png new file mode 100644 index 0000000000..44f463ff62 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/91.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/92.png b/src/main/resources/assets/miscutils/textures/items/ion/92.png new file mode 100644 index 0000000000..ef1d21c530 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/92.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/93.png b/src/main/resources/assets/miscutils/textures/items/ion/93.png new file mode 100644 index 0000000000..175f6bf84e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/93.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/94.png b/src/main/resources/assets/miscutils/textures/items/ion/94.png new file mode 100644 index 0000000000..544749b556 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/94.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/95.png b/src/main/resources/assets/miscutils/textures/items/ion/95.png new file mode 100644 index 0000000000..a2d38fa96e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/95.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/96.png b/src/main/resources/assets/miscutils/textures/items/ion/96.png new file mode 100644 index 0000000000..12e545a65f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/96.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/97.png b/src/main/resources/assets/miscutils/textures/items/ion/97.png new file mode 100644 index 0000000000..ee9ed016dc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/97.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/98.png b/src/main/resources/assets/miscutils/textures/items/ion/98.png new file mode 100644 index 0000000000..aa8a1bf7ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/98.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/99.png b/src/main/resources/assets/miscutils/textures/items/ion/99.png new file mode 100644 index 0000000000..b5ba289886 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/99.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/ion/IonBase.png b/src/main/resources/assets/miscutils/textures/items/ion/IonBase.png new file mode 100644 index 0000000000..fd342f7db2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/ion/IonBase.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/item.empty.png b/src/main/resources/assets/miscutils/textures/items/item.empty.png new file mode 100644 index 0000000000..c054d35cce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/item.empty.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemAirFilter.png b/src/main/resources/assets/miscutils/textures/items/itemAirFilter.png new file mode 100644 index 0000000000..da4b975517 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemAirFilter.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemAlkalusDisk.png b/src/main/resources/assets/miscutils/textures/items/itemAlkalusDisk.png new file mode 100644 index 0000000000..8553a13cfb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemAlkalusDisk.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemAmulet.png b/src/main/resources/assets/miscutils/textures/items/itemAmulet.png new file mode 100644 index 0000000000..0009e340ec Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemAmulet.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBackpack.png b/src/main/resources/assets/miscutils/textures/items/itemBackpack.png new file mode 100644 index 0000000000..99add96c2b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBackpack.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBasicTurbine.png b/src/main/resources/assets/miscutils/textures/items/itemBasicTurbine.png new file mode 100644 index 0000000000..62de905fb9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBasicTurbine.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBelt.png b/src/main/resources/assets/miscutils/textures/items/itemBelt.png new file mode 100644 index 0000000000..93474d12e1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBelt.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBigEgg.png b/src/main/resources/assets/miscutils/textures/items/itemBigEgg.png new file mode 100644 index 0000000000..54db66b4c5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBigEgg.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBlueprint.png b/src/main/resources/assets/miscutils/textures/items/itemBlueprint.png new file mode 100644 index 0000000000..593ba0ac17 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBlueprint.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBoilerChassis.png b/src/main/resources/assets/miscutils/textures/items/itemBoilerChassis.png new file mode 100644 index 0000000000..1ac3bff818 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBoilerChassis.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBolt.png b/src/main/resources/assets/miscutils/textures/items/itemBolt.png new file mode 100644 index 0000000000..8675564a9b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBolt.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBook.png b/src/main/resources/assets/miscutils/textures/items/itemBook.png new file mode 100644 index 0000000000..f6cdf72bda Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBook.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBoots.png b/src/main/resources/assets/miscutils/textures/items/itemBoots.png new file mode 100644 index 0000000000..9cd07048cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBoots.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBottle.png b/src/main/resources/assets/miscutils/textures/items/itemBottle.png new file mode 100644 index 0000000000..942a9ffb5f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBottle.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBread.png b/src/main/resources/assets/miscutils/textures/items/itemBread.png new file mode 100644 index 0000000000..332b994342 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBread.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemBufferCore.png b/src/main/resources/assets/miscutils/textures/items/itemBufferCore.png new file mode 100644 index 0000000000..3e41cfaa1c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemBufferCore.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemCell.png b/src/main/resources/assets/miscutils/textures/items/itemCell.png new file mode 100644 index 0000000000..023291b957 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemCell.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemCellPlasma.png b/src/main/resources/assets/miscutils/textures/items/itemCellPlasma.png new file mode 100644 index 0000000000..1c93293744 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemCellPlasma.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png b/src/main/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png new file mode 100644 index 0000000000..ce3c6377c7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemCell_Overlay.png b/src/main/resources/assets/miscutils/textures/items/itemCell_Overlay.png new file mode 100644 index 0000000000..35c124ab0c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemCell_Overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemCentidust.png b/src/main/resources/assets/miscutils/textures/items/itemCentidust.png new file mode 100644 index 0000000000..13658b477f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemCentidust.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemCircuitLFTR.png b/src/main/resources/assets/miscutils/textures/items/itemCircuitLFTR.png new file mode 100644 index 0000000000..723f62e278 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemCircuitLFTR.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png b/src/main/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png new file mode 100644 index 0000000000..3fa59812e9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemDecidust.png b/src/main/resources/assets/miscutils/textures/items/itemDecidust.png new file mode 100644 index 0000000000..1d7766cca5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemDecidust.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemDefault.png b/src/main/resources/assets/miscutils/textures/items/itemDefault.png new file mode 100644 index 0000000000..9ed71de6dd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemDefault.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemDehydratorCoil.png b/src/main/resources/assets/miscutils/textures/items/itemDehydratorCoil.png new file mode 100644 index 0000000000..c7a849556f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemDehydratorCoil.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png b/src/main/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png new file mode 100644 index 0000000000..8687d1c8ca Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemDroplet.png b/src/main/resources/assets/miscutils/textures/items/itemDroplet.png new file mode 100644 index 0000000000..31f30e524a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemDroplet.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png b/src/main/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png new file mode 100644 index 0000000000..7c03ca0ada Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemEnergeticShaft.png b/src/main/resources/assets/miscutils/textures/items/itemEnergeticShaft.png new file mode 100644 index 0000000000..bf9ab22ce2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemEnergeticShaft.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemFiber.png b/src/main/resources/assets/miscutils/textures/items/itemFiber.png new file mode 100644 index 0000000000..c2eb959c6c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemFiber.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemFineWire.png b/src/main/resources/assets/miscutils/textures/items/itemFineWire.png new file mode 100644 index 0000000000..1804dc358b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemFineWire.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemFireStarter.png b/src/main/resources/assets/miscutils/textures/items/itemFireStarter.png new file mode 100644 index 0000000000..e3027edff8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemFireStarter.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png b/src/main/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png new file mode 100644 index 0000000000..55a9e7c912 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png b/src/main/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png new file mode 100644 index 0000000000..12a1962cd3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemGear.png b/src/main/resources/assets/miscutils/textures/items/itemGear.png new file mode 100644 index 0000000000..6d0cf3be50 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemGear.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemGem.png b/src/main/resources/assets/miscutils/textures/items/itemGem.png new file mode 100644 index 0000000000..ad5126851a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemGem.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHatTinFoil.png b/src/main/resources/assets/miscutils/textures/items/itemHatTinFoil.png new file mode 100644 index 0000000000..91f1cad62e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHatTinFoil.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHeavyPlate.png b/src/main/resources/assets/miscutils/textures/items/itemHeavyPlate.png new file mode 100644 index 0000000000..e09ff6d1df Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHeavyPlate.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png b/src/main/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png new file mode 100644 index 0000000000..c3835b07c1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHeliumBlob.png b/src/main/resources/assets/miscutils/textures/items/itemHeliumBlob.png new file mode 100644 index 0000000000..f86ce276cc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHeliumBlob.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHelmet.png b/src/main/resources/assets/miscutils/textures/items/itemHelmet.png new file mode 100644 index 0000000000..d7c34334b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHelmet.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png b/src/main/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png new file mode 100644 index 0000000000..332b994342 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemHydrogenBlob.png b/src/main/resources/assets/miscutils/textures/items/itemHydrogenBlob.png new file mode 100644 index 0000000000..29296faf74 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemHydrogenBlob.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemIngot.png b/src/main/resources/assets/miscutils/textures/items/itemIngot.png new file mode 100644 index 0000000000..a904365fba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemIngot.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png b/src/main/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png new file mode 100644 index 0000000000..edaac2807f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemIngotHot.png b/src/main/resources/assets/miscutils/textures/items/itemIngotHot.png new file mode 100644 index 0000000000..d0f73e2868 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemIngotHot.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png b/src/main/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png new file mode 100644 index 0000000000..332b994342 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png b/src/main/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png new file mode 100644 index 0000000000..73c2cbe026 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemIridiumShaft.png b/src/main/resources/assets/miscutils/textures/items/itemIridiumShaft.png new file mode 100644 index 0000000000..585b862d12 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemIridiumShaft.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemKey.png b/src/main/resources/assets/miscutils/textures/items/itemKey.png new file mode 100644 index 0000000000..19527cc2ae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemKey.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemKeyBig.png b/src/main/resources/assets/miscutils/textures/items/itemKeyBig.png new file mode 100644 index 0000000000..abfefc9aba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemKeyBig.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemKeyGold.png b/src/main/resources/assets/miscutils/textures/items/itemKeyGold.png new file mode 100644 index 0000000000..289dac1df6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemKeyGold.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png b/src/main/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png new file mode 100644 index 0000000000..11e8312714 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemLavaFilter.png b/src/main/resources/assets/miscutils/textures/items/itemLavaFilter.png new file mode 100644 index 0000000000..92a06a3a9a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemLavaFilter.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png b/src/main/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png new file mode 100644 index 0000000000..d10128babd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png b/src/main/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png new file mode 100644 index 0000000000..b93430f732 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemMushroom.png b/src/main/resources/assets/miscutils/textures/items/itemMushroom.png new file mode 100644 index 0000000000..d63f079f45 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemMushroom.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemMushroomRed.png b/src/main/resources/assets/miscutils/textures/items/itemMushroomRed.png new file mode 100644 index 0000000000..2bbf1bcb00 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemMushroomRed.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemNugget.png b/src/main/resources/assets/miscutils/textures/items/itemNugget.png new file mode 100644 index 0000000000..e4d3e0c89c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemNugget.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png b/src/main/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png new file mode 100644 index 0000000000..aba5bf6850 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPickaxe.png b/src/main/resources/assets/miscutils/textures/items/itemPickaxe.png new file mode 100644 index 0000000000..d21440bd11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPickaxe.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPineapple.png b/src/main/resources/assets/miscutils/textures/items/itemPineapple.png new file mode 100644 index 0000000000..1185738eb8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPineapple.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPlate.png b/src/main/resources/assets/miscutils/textures/items/itemPlate.png new file mode 100644 index 0000000000..b5a9ab5214 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPlate.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png b/src/main/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png new file mode 100644 index 0000000000..fb293722f6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPlateDouble.png b/src/main/resources/assets/miscutils/textures/items/itemPlateDouble.png new file mode 100644 index 0000000000..edb7970730 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPlateDouble.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPlatebody.png b/src/main/resources/assets/miscutils/textures/items/itemPlatebody.png new file mode 100644 index 0000000000..ec472a86a0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPlatebody.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPlatelegs.png b/src/main/resources/assets/miscutils/textures/items/itemPlatelegs.png new file mode 100644 index 0000000000..bcaa1338e6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPlatelegs.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPotion.png b/src/main/resources/assets/miscutils/textures/items/itemPotion.png new file mode 100644 index 0000000000..a1ff53ef8d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPotion.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPotionBlack.png b/src/main/resources/assets/miscutils/textures/items/itemPotionBlack.png new file mode 100644 index 0000000000..07a5951140 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPotionBlack.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemPotionRed.png b/src/main/resources/assets/miscutils/textures/items/itemPotionRed.png new file mode 100644 index 0000000000..b6b611bbbb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemPotionRed.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemRing.png b/src/main/resources/assets/miscutils/textures/items/itemRing.png new file mode 100644 index 0000000000..eb9dfd5e21 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemRing.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemRingWearable.png b/src/main/resources/assets/miscutils/textures/items/itemRingWearable.png new file mode 100644 index 0000000000..4601dbbe13 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemRingWearable.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemRod.png b/src/main/resources/assets/miscutils/textures/items/itemRod.png new file mode 100644 index 0000000000..18c9ee59c1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemRod.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemRodLong.png b/src/main/resources/assets/miscutils/textures/items/itemRodLong.png new file mode 100644 index 0000000000..1580b911f0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemRodLong.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemRope.png b/src/main/resources/assets/miscutils/textures/items/itemRope.png new file mode 100644 index 0000000000..061938234d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemRope.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemRotor.png b/src/main/resources/assets/miscutils/textures/items/itemRotor.png new file mode 100644 index 0000000000..c593cee35b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemRotor.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSandstoneHammer.png b/src/main/resources/assets/miscutils/textures/items/itemSandstoneHammer.png new file mode 100644 index 0000000000..ae8fc32267 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSandstoneHammer.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemScrew.png b/src/main/resources/assets/miscutils/textures/items/itemScrew.png new file mode 100644 index 0000000000..faca2c6e3d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemScrew.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemShard.png b/src/main/resources/assets/miscutils/textures/items/itemShard.png new file mode 100644 index 0000000000..104a59d2b3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemShard.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemShovel.png b/src/main/resources/assets/miscutils/textures/items/itemShovel.png new file mode 100644 index 0000000000..8e1c0c2826 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemShovel.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png b/src/main/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png new file mode 100644 index 0000000000..f711563765 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSmallSpring.png b/src/main/resources/assets/miscutils/textures/items/itemSmallSpring.png new file mode 100644 index 0000000000..54b3afb24e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSmallSpring.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSpring.png b/src/main/resources/assets/miscutils/textures/items/itemSpring.png new file mode 100644 index 0000000000..df442ed454 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSpring.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemStaballoyAxe.png b/src/main/resources/assets/miscutils/textures/items/itemStaballoyAxe.png new file mode 100644 index 0000000000..d7f8ed262f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemStaballoyAxe.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png b/src/main/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png new file mode 100644 index 0000000000..024f4f384c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemStickyRubber.png b/src/main/resources/assets/miscutils/textures/items/itemStickyRubber.png new file mode 100644 index 0000000000..c95353c892 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemStickyRubber.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png b/src/main/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png new file mode 100644 index 0000000000..5e7201a558 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSword.png b/src/main/resources/assets/miscutils/textures/items/itemSword.png new file mode 100644 index 0000000000..56ac390aa8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSword.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemTablet.png b/src/main/resources/assets/miscutils/textures/items/itemTablet.png new file mode 100644 index 0000000000..8e10b0529a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemTablet.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png b/src/main/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png new file mode 100644 index 0000000000..cd376cb5cb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png b/src/main/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png new file mode 100644 index 0000000000..f08ba26585 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png b/src/main/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png new file mode 100644 index 0000000000..89f7b9474a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemUltimetShaft.png b/src/main/resources/assets/miscutils/textures/items/itemUltimetShaft.png new file mode 100644 index 0000000000..df6c9b9c49 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemUltimetShaft.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png b/src/main/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png new file mode 100644 index 0000000000..5dea2ec1e5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemVibrantShaft.png b/src/main/resources/assets/miscutils/textures/items/itemVibrantShaft.png new file mode 100644 index 0000000000..3a1fe64176 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemVibrantShaft.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemWaterBottle.png b/src/main/resources/assets/miscutils/textures/items/itemWaterBottle.png new file mode 100644 index 0000000000..942a9ffb5f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemWaterBottle.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png b/src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png new file mode 100644 index 0000000000..e253eea6de Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta b/src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta new file mode 100644 index 0000000000..c5d457f93d --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png b/src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png new file mode 100644 index 0000000000..960b304439 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta b/src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta new file mode 100644 index 0000000000..c5d457f93d --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png b/src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png new file mode 100644 index 0000000000..eaf605e762 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta b/src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta new file mode 100644 index 0000000000..c5d457f93d --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/miscutils/textures/items/material/RodBlizz.png b/src/main/resources/assets/miscutils/textures/items/material/RodBlizz.png new file mode 100644 index 0000000000..d813e6b746 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/material/RodBlizz.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/0.PNG b/src/main/resources/assets/miscutils/textures/items/particle/0.PNG new file mode 100644 index 0000000000..a0a32d4508 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/0.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/1.png b/src/main/resources/assets/miscutils/textures/items/particle/1.png new file mode 100644 index 0000000000..4eddfa1727 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/10.PNG b/src/main/resources/assets/miscutils/textures/items/particle/10.PNG new file mode 100644 index 0000000000..09eee049a9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/10.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/11.PNG b/src/main/resources/assets/miscutils/textures/items/particle/11.PNG new file mode 100644 index 0000000000..7f636919b6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/11.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/12.PNG b/src/main/resources/assets/miscutils/textures/items/particle/12.PNG new file mode 100644 index 0000000000..4e9504b03f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/12.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/13.PNG b/src/main/resources/assets/miscutils/textures/items/particle/13.PNG new file mode 100644 index 0000000000..d929480c16 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/13.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/14.PNG b/src/main/resources/assets/miscutils/textures/items/particle/14.PNG new file mode 100644 index 0000000000..7338066c1a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/14.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/15.PNG b/src/main/resources/assets/miscutils/textures/items/particle/15.PNG new file mode 100644 index 0000000000..189a3127d9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/15.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/16.PNG b/src/main/resources/assets/miscutils/textures/items/particle/16.PNG new file mode 100644 index 0000000000..8824201ff3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/16.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/17.PNG b/src/main/resources/assets/miscutils/textures/items/particle/17.PNG new file mode 100644 index 0000000000..edea5115c0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/17.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/18.PNG b/src/main/resources/assets/miscutils/textures/items/particle/18.PNG new file mode 100644 index 0000000000..d3e63562d7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/18.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/19.PNG b/src/main/resources/assets/miscutils/textures/items/particle/19.PNG new file mode 100644 index 0000000000..43f9278b2c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/19.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/2.png b/src/main/resources/assets/miscutils/textures/items/particle/2.png new file mode 100644 index 0000000000..292207ae7e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/20.PNG b/src/main/resources/assets/miscutils/textures/items/particle/20.PNG new file mode 100644 index 0000000000..0e2ce23565 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/20.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/21.PNG b/src/main/resources/assets/miscutils/textures/items/particle/21.PNG new file mode 100644 index 0000000000..758fa46941 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/21.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/22.PNG b/src/main/resources/assets/miscutils/textures/items/particle/22.PNG new file mode 100644 index 0000000000..08bda97b66 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/22.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/23.PNG b/src/main/resources/assets/miscutils/textures/items/particle/23.PNG new file mode 100644 index 0000000000..9ba21b22eb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/23.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/24.PNG b/src/main/resources/assets/miscutils/textures/items/particle/24.PNG new file mode 100644 index 0000000000..bc6aec8854 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/24.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/3.png b/src/main/resources/assets/miscutils/textures/items/particle/3.png new file mode 100644 index 0000000000..d085b86507 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/4.png b/src/main/resources/assets/miscutils/textures/items/particle/4.png new file mode 100644 index 0000000000..faf8db0576 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/5.png b/src/main/resources/assets/miscutils/textures/items/particle/5.png new file mode 100644 index 0000000000..3a30274238 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/6.png b/src/main/resources/assets/miscutils/textures/items/particle/6.png new file mode 100644 index 0000000000..8930ce52ef Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/7.PNG b/src/main/resources/assets/miscutils/textures/items/particle/7.PNG new file mode 100644 index 0000000000..0581d47446 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/7.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/8.PNG b/src/main/resources/assets/miscutils/textures/items/particle/8.PNG new file mode 100644 index 0000000000..6bd3c2c682 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/8.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/9.PNG b/src/main/resources/assets/miscutils/textures/items/particle/9.PNG new file mode 100644 index 0000000000..430f1aed3d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/9.PNG differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/0.png b/src/main/resources/assets/miscutils/textures/items/particle/new/0.png new file mode 100644 index 0000000000..3fe49c3a57 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/1.png b/src/main/resources/assets/miscutils/textures/items/particle/new/1.png new file mode 100644 index 0000000000..39ffa85711 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/10.png b/src/main/resources/assets/miscutils/textures/items/particle/new/10.png new file mode 100644 index 0000000000..18ded814cf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/11.png b/src/main/resources/assets/miscutils/textures/items/particle/new/11.png new file mode 100644 index 0000000000..b7e191c79f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/12.png b/src/main/resources/assets/miscutils/textures/items/particle/new/12.png new file mode 100644 index 0000000000..49feb199e0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/13.png b/src/main/resources/assets/miscutils/textures/items/particle/new/13.png new file mode 100644 index 0000000000..b70178d315 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/14.png b/src/main/resources/assets/miscutils/textures/items/particle/new/14.png new file mode 100644 index 0000000000..77741644ed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/15.png b/src/main/resources/assets/miscutils/textures/items/particle/new/15.png new file mode 100644 index 0000000000..d48096c85c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/16.png b/src/main/resources/assets/miscutils/textures/items/particle/new/16.png new file mode 100644 index 0000000000..cef33d17fd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/17.png b/src/main/resources/assets/miscutils/textures/items/particle/new/17.png new file mode 100644 index 0000000000..4b752e7a9a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/18.png b/src/main/resources/assets/miscutils/textures/items/particle/new/18.png new file mode 100644 index 0000000000..23fdb190c7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/19.png b/src/main/resources/assets/miscutils/textures/items/particle/new/19.png new file mode 100644 index 0000000000..94e2a856c9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/2.png b/src/main/resources/assets/miscutils/textures/items/particle/new/2.png new file mode 100644 index 0000000000..d86b5b357d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/20.png b/src/main/resources/assets/miscutils/textures/items/particle/new/20.png new file mode 100644 index 0000000000..d7cbdb8f45 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/21.png b/src/main/resources/assets/miscutils/textures/items/particle/new/21.png new file mode 100644 index 0000000000..2531eaff52 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/22.png b/src/main/resources/assets/miscutils/textures/items/particle/new/22.png new file mode 100644 index 0000000000..d594dc4be8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/23.png b/src/main/resources/assets/miscutils/textures/items/particle/new/23.png new file mode 100644 index 0000000000..d96dd2b000 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/24.png b/src/main/resources/assets/miscutils/textures/items/particle/new/24.png new file mode 100644 index 0000000000..56067466ad Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/3.png b/src/main/resources/assets/miscutils/textures/items/particle/new/3.png new file mode 100644 index 0000000000..43438c4ce5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/4.png b/src/main/resources/assets/miscutils/textures/items/particle/new/4.png new file mode 100644 index 0000000000..8f0db073cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/5.png b/src/main/resources/assets/miscutils/textures/items/particle/new/5.png new file mode 100644 index 0000000000..40ec84db70 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/6.png b/src/main/resources/assets/miscutils/textures/items/particle/new/6.png new file mode 100644 index 0000000000..c63ad0ba19 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/7.png b/src/main/resources/assets/miscutils/textures/items/particle/new/7.png new file mode 100644 index 0000000000..aad8c7ca62 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/8.png b/src/main/resources/assets/miscutils/textures/items/particle/new/8.png new file mode 100644 index 0000000000..c9b908ec61 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/particle/new/9.png b/src/main/resources/assets/miscutils/textures/items/particle/new/9.png new file mode 100644 index 0000000000..b8e02c82ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/particle/new/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/personalCloakingDevice.png b/src/main/resources/assets/miscutils/textures/items/personalCloakingDevice.png new file mode 100644 index 0000000000..2d196cb9ed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/personalCloakingDevice.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png b/src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png new file mode 100644 index 0000000000..2c56204a7e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png b/src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png new file mode 100644 index 0000000000..cfec0f5d8e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/research/note.png b/src/main/resources/assets/miscutils/textures/items/research/note.png new file mode 100644 index 0000000000..795eaeb193 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/research/note.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/Atom.png b/src/main/resources/assets/miscutils/textures/items/science/Atom.png new file mode 100644 index 0000000000..eec0344eda Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/Atom.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png b/src/main/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png new file mode 100644 index 0000000000..8bcfa62ae4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png new file mode 100644 index 0000000000..f4ba0a2f0a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png new file mode 100644 index 0000000000..db59db96e3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png new file mode 100644 index 0000000000..b50c781c6d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png new file mode 100644 index 0000000000..0656c10957 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png new file mode 100644 index 0000000000..3a32ed06fc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png new file mode 100644 index 0000000000..4649393bb2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png new file mode 100644 index 0000000000..5b47d172be Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png new file mode 100644 index 0000000000..995b19953c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png new file mode 100644 index 0000000000..3ec2502da2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png new file mode 100644 index 0000000000..aa65838418 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png new file mode 100644 index 0000000000..985954250c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png new file mode 100644 index 0000000000..9b857a9277 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png new file mode 100644 index 0000000000..0c165f3e59 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png new file mode 100644 index 0000000000..7adcc6adcf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png new file mode 100644 index 0000000000..2064052fa5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png new file mode 100644 index 0000000000..a974943866 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png new file mode 100644 index 0000000000..97a796c871 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png new file mode 100644 index 0000000000..b50c781c6d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png new file mode 100644 index 0000000000..b50c781c6d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png new file mode 100644 index 0000000000..b50c781c6d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/spawn_egg.png b/src/main/resources/assets/miscutils/textures/items/spawn_egg.png new file mode 100644 index 0000000000..23259c71f5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/spawn_egg.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/spawn_egg_overlay.png b/src/main/resources/assets/miscutils/textures/items/spawn_egg_overlay.png new file mode 100644 index 0000000000..83ec78f172 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/spawn_egg_overlay.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/token/0.png b/src/main/resources/assets/miscutils/textures/items/token/0.png new file mode 100644 index 0000000000..7947f30bb6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/token/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/token/1.png b/src/main/resources/assets/miscutils/textures/items/token/1.png new file mode 100644 index 0000000000..850acc3e71 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/token/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/token/2.png b/src/main/resources/assets/miscutils/textures/items/token/2.png new file mode 100644 index 0000000000..fa619dd1ed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/token/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/token/3.png b/src/main/resources/assets/miscutils/textures/items/token/3.png new file mode 100644 index 0000000000..3ba45ed7af Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/token/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/token/4.png b/src/main/resources/assets/miscutils/textures/items/token/4.png new file mode 100644 index 0000000000..81af6a91c8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/token/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/models/TinFoil.png b/src/main/resources/assets/miscutils/textures/models/TinFoil.png new file mode 100644 index 0000000000..6c8e967db5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/models/TinFoil.png differ diff --git a/src/main/resources/assets/miscutils/textures/space/RocketGui.png b/src/main/resources/assets/miscutils/textures/space/RocketGui.png new file mode 100644 index 0000000000..2aa4a893ed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/space/RocketGui.png differ diff --git a/src/main/resources/assets/miscutils/textures/space/hd10180/A.png b/src/main/resources/assets/miscutils/textures/space/hd10180/A.png new file mode 100644 index 0000000000..b3499184b5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/space/hd10180/A.png differ diff --git a/src/main/resources/assets/miscutils/textures/space/hd10180/B.png b/src/main/resources/assets/miscutils/textures/space/hd10180/B.png new file mode 100644 index 0000000000..659aacbba7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/space/hd10180/B.png differ diff --git a/src/main/resources/assets/miscutils/textures/space/hd10180/C.png b/src/main/resources/assets/miscutils/textures/space/hd10180/C.png new file mode 100644 index 0000000000..659aacbba7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/space/hd10180/C.png differ diff --git a/src/main/resources/assets/miscutils/textures/space/hd10180/D.png b/src/main/resources/assets/miscutils/textures/space/hd10180/D.png new file mode 100644 index 0000000000..61e5d6b520 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/space/hd10180/D.png differ diff --git a/src/main/resources/assets/spiceoflife/lang/de_DE.lang b/src/main/resources/assets/spiceoflife/lang/de_DE.lang new file mode 100644 index 0000000000..63ad1e2a98 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/de_DE.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=Voedselkrat \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/en_US.lang b/src/main/resources/assets/spiceoflife/lang/en_US.lang new file mode 100644 index 0000000000..bf16f4dc93 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/en_US.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=Food Crate \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/es_ES.lang b/src/main/resources/assets/spiceoflife/lang/es_ES.lang new file mode 100644 index 0000000000..02fe4c8806 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/es_ES.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=Caja de comida \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/fr_FR.lang b/src/main/resources/assets/spiceoflife/lang/fr_FR.lang new file mode 100644 index 0000000000..418c2b7053 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/fr_FR.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=Caisse alimentaire \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/it_IT.lang b/src/main/resources/assets/spiceoflife/lang/it_IT.lang new file mode 100644 index 0000000000..841b97c63f --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/it_IT.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=Cassa Alimentare \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/ko_KR.lang b/src/main/resources/assets/spiceoflife/lang/ko_KR.lang new file mode 100644 index 0000000000..7e9973e936 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/ko_KR.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=ìŒì‹ ìƒìž \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/ru_RU.lang b/src/main/resources/assets/spiceoflife/lang/ru_RU.lang new file mode 100644 index 0000000000..e167a0ae03 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/ru_RU.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=ПродовольÑтвенный Ñщик \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/lang/zh_CN.lang b/src/main/resources/assets/spiceoflife/lang/zh_CN.lang new file mode 100644 index 0000000000..bb211e7b57 --- /dev/null +++ b/src/main/resources/assets/spiceoflife/lang/zh_CN.lang @@ -0,0 +1,2 @@ +# Items +item.spiceoflife.foodcrate.name=食å“ç®± \ No newline at end of file diff --git a/src/main/resources/assets/spiceoflife/textures/items/foodcrate.png b/src/main/resources/assets/spiceoflife/textures/items/foodcrate.png new file mode 100644 index 0000000000..b717dd0318 Binary files /dev/null and b/src/main/resources/assets/spiceoflife/textures/items/foodcrate.png differ diff --git a/src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png b/src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png new file mode 100644 index 0000000000..4dbfd54ea7 Binary files /dev/null and b/src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png differ diff --git a/src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png b/src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png new file mode 100644 index 0000000000..0284bd29ad Binary files /dev/null and b/src/main/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png differ diff --git a/src/main/resources/assets/stevescarts/lang/en_US.lang b/src/main/resources/assets/stevescarts/lang/en_US.lang new file mode 100644 index 0000000000..56dc8390a6 --- /dev/null +++ b/src/main/resources/assets/stevescarts/lang/en_US.lang @@ -0,0 +1 @@ +item.SC2:crop_exotic_seeds.name=Exotic Seed Module [GT++] \ No newline at end of file diff --git a/src/main/resources/assets/stevescarts/lang/zh_CN.lang b/src/main/resources/assets/stevescarts/lang/zh_CN.lang new file mode 100644 index 0000000000..84ce64f528 --- /dev/null +++ b/src/main/resources/assets/stevescarts/lang/zh_CN.lang @@ -0,0 +1,2 @@ +item.SC2:crop_exotic_seeds.name=异域ç§å­æ¨¡å—[GT++] +//This zh_CN.lang is translated by huajijam for GregTech++ (18/1/19) \ No newline at end of file diff --git a/src/main/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png b/src/main/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png new file mode 100644 index 0000000000..63e0593119 Binary files /dev/null and b/src/main/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000000..f9465a0258 --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,18 @@ +[ +{ + "modid": "${modId}", + "name": "${modName}", + "description": "Adds over 100 new Multiblocks, Machines, etc to Gregtech.", + "credits": "", + "logoFile": "", + "version": "${modVersion}", + "mcversion": "${minecraftVersion}", + "url": "https://github.com/draknyte1/GTplusplus/wiki", + "updateUrl": "https://github.com/draknyte1/GTplusplus/releases/latest", + "authorList": [ "Alkalus/Draknyte1" ], + "screenshots": [ "" ], + "dependencies": [ + "mod_MinecraftForge" + ] +} +] diff --git a/src/resources/GradleStartClient.java b/src/resources/GradleStartClient.java deleted file mode 100644 index 97edde8b04..0000000000 --- a/src/resources/GradleStartClient.java +++ /dev/null @@ -1,103 +0,0 @@ -import java.io.File; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; - -import com.google.common.base.Strings; - -import net.minecraftforge.gradle.GradleStartCommon; - -public class GradleStartClient extends GradleStart { - - public static void main(String[] args) { - - // hack natives. - try { - GradleStartCommon.LOGGER.info("Injecting Natives!"); - hack(); - GradleStartCommon.LOGGER.info("Natives Injected!"); - // launch - Method launch = GradleStartCommon.class.getDeclaredMethod("launch", String[].class); - if (launch != null) { - launch.setAccessible(true); - GradleStart aStart = new GradleStart(); - GradleStartCommon.LOGGER.info("Launching!"); - launch.invoke(aStart, new Object[]{args}); - } - } - catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - } - } - - private static final void hack() { - GradleStartCommon.LOGGER.info("[FG_1.3] Doing Classloader hack."); - String paths = System.getProperty("java.library.path"); - String nativesDir = "@@NATIVESDIR@@"; - - if (Strings.isNullOrEmpty(paths)) - paths = nativesDir; - else - paths += File.pathSeparator + nativesDir; - - hackNativesFixed(paths); - //addLibraryPath(nativesDir); - //addLibraryPath(paths); - } - - private static final void hackNativesFixed(String paths) { - System.setProperty("java.library.path", paths); - // hack the classloader now. - try - { - String aPathData = System.getProperty("java.library.path"); - final Method initializePathMethod = ClassLoader.class.getDeclaredMethod("initializePath", String.class); - GradleStartCommon.LOGGER.info("[FG_1.3] Setting private method 'initializePath' to be accessible."); - initializePathMethod.setAccessible(true); - GradleStartCommon.LOGGER.info("[FG_1.3] Invoking 'initializePath' with arg 'java.library.path'."); - GradleStartCommon.LOGGER.info("[FG_1.3] Path Value: "+aPathData); - final Object usrPathsValue = initializePathMethod.invoke(null, "java.library.path"); - final Field usrPathsField = ClassLoader.class.getDeclaredField("usr_paths"); - GradleStartCommon.LOGGER.info("[FG_1.3] Setting private field 'usr_paths' to be accessible."); - usrPathsField.setAccessible(true); - GradleStartCommon.LOGGER.info("[FG_1.3] Injecting path data."); - usrPathsField.set(null, usrPathsValue); - GradleStartCommon.LOGGER.info("[FG_1.3] Finished Classloader hack."); - } - catch(Throwable t) { - GradleStartCommon.LOGGER.info("[FG_1.3] Error handling Classloader hack, printing stack trace."); - t.printStackTrace(); - }; - } - - public static void addLibraryPath(String pathToAdd){ - Field usrPathsField; - try { - usrPathsField = ClassLoader.class.getDeclaredField("usr_paths"); - usrPathsField.setAccessible(true); - - //get array of paths - final String[] paths = (String[])usrPathsField.get(null); - - //check if the path to add is already present - for(String path : paths) { - if(path.equals(pathToAdd)) { - GradleStartCommon.LOGGER.info("[FG_1.3] Found existing PATH data, skipping."); - return; - } - } - GradleStartCommon.LOGGER.info("[FG_1.3] Injecting path data. ["+pathToAdd+"]"); - //add the new path - final String[] newPaths = Arrays.copyOf(paths, paths.length + 1); - newPaths[newPaths.length-1] = pathToAdd; - usrPathsField.set(null, newPaths); - } - catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - GradleStartCommon.LOGGER.info("[FG_1.3] Error handling Classloader hack, printing stack trace."); - e.printStackTrace(); - } - - } - -} diff --git a/src/resources/assets/forestry/AlvearyFrame.png b/src/resources/assets/forestry/AlvearyFrame.png deleted file mode 100644 index c69ead8dd0..0000000000 Binary files a/src/resources/assets/forestry/AlvearyFrame.png and /dev/null differ diff --git a/src/resources/assets/forestry/AlvearyMutator.png b/src/resources/assets/forestry/AlvearyMutator.png deleted file mode 100644 index 2225f2748f..0000000000 Binary files a/src/resources/assets/forestry/AlvearyMutator.png and /dev/null differ diff --git a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png b/src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png deleted file mode 100644 index f21e59ec96..0000000000 Binary files a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.off.png and /dev/null differ diff --git a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png b/src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png deleted file mode 100644 index f21e59ec96..0000000000 Binary files a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.framehousing.on.png and /dev/null differ diff --git a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png b/src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png deleted file mode 100644 index 51336c00b9..0000000000 Binary files a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.off.png and /dev/null differ diff --git a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png b/src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png deleted file mode 100644 index 51336c00b9..0000000000 Binary files a/src/resources/assets/forestry/textures/blocks/apiculture/alveary.mutator.on.png and /dev/null differ diff --git a/src/resources/assets/gregtech/lang/en_US.lang b/src/resources/assets/gregtech/lang/en_US.lang deleted file mode 100644 index 4f6b835f67..0000000000 --- a/src/resources/assets/gregtech/lang/en_US.lang +++ /dev/null @@ -1,222 +0,0 @@ - -//Shit I stole from GTNH~ - -GTPP.EBF.heat=Heat capacity - -GTPP.machines.tier=Tier -GTPP.machines.input=Input -GTPP.machines.output=Output - -GTPP.multiblock.pollutionreduced=Pollution reduced to -GTPP.multiblock.pollution=Pollution -GTPP.multiblock.energy=Stored Energy -GTPP.multiblock.progress=Progress -GTPP.multiblock.efficiency=Efficiency -GTPP.multiblock.problems=Problems -GTPP.multiblock.mei=Max Energy Income -GTPP.multiblock.usage=Probably uses -GTPP.multiblock.specialvalue=Special Value -GTPP.multiblock.duration=Duration - - - -GTPP.CC.machinetier=Control Core Tier -GTPP.CC.discount=EU Discount -GTPP.CC.parallel=Maximum Parallel Processing - -//Tooltips for the Charger Packs -GTPP.battpack.tooltip.1=Worn as a Belt within Baubles -GTPP.battpack.tooltip.2=Drains -GTPP.battpack.tooltip.3=to charge worn armour -GTPP.battpack.tooltip.4=Also charges items on the hotbar - -//Tooltips for the Personal Healing Bauble -GTPP.nanohealer.tooltip.1=Worn as a Necklace within Baubles -GTPP.nanohealer.tooltip.2=Drains 1638400EU per operation -GTPP.nanohealer.tooltip.3=Can restore HP, Hunger and Saturation -GTPP.nanohealer.tooltip.4=WILL NOT PREVENT DEATH -GTPP.nanohealer.tooltip.5=Shift+RMB to toggle notifications -GTPP.nanohealer.hidden=Hiding Info? - -//10/4/19 -//Tooltips for the Mob Killing Baubles -GTPP.monsterkiller.tooltip.1=Worn as an Amulet within Baubles -GTPP.monsterkiller.tooltip.2=Drains -GTPP.monsterkiller.tooltip.3=per each kill -GTPP.monsterkiller.tooltip.4=Target Type: - -//17/08/19 -GTPP.container.decaychest.name=Decayables - - - - - - - - - - - - -//NEI INFORMATION -GTPP.nei.info=Information -GTPP.nei.eutick=Eu/t -GTPP.nei.timetaken=Time Taken -GTPP.nei.output=Output -GTPP.nei.input=Input -GTPP.nei.result=Result -GTPP.nei.radioation=Radiation Level - -//Some Generic Words -GTPP.info.eu=EU -GTPP.info.euInfo=EU Information -GTPP.info.inputLimit=Input Limit -GTPP.info.currentPower=Current Power -GTPP.info.hidden=Hidden - -//Some Time Words -GTPP.time.ticks=Ticks -GTPP.time.seconds=Seconds -GTPP.time.minutes=Minutes -GTPP.time.hours=Hours -GTPP.time.days=Days -GTPP.time.weeks=Weeks -GTPP.time.months=Months - - - - - - - - - - - - -//Achievements - -//4/2/19 -achievement.gt.blockmachines.fusioncomputer.tier.09=Fusion Computer Mark IV -achievement.gtplusplus.blockcasings.3.12=Fusion Casing MK III -achievement.gtplusplus.blockcasings.3.13=Advanced Magnetic Containment! -achievement.gtplusplus.blockcasings.3.15=Quantum Containment! -achievement.gt.blockmachines.fusioncomputer.tier.09.desc=[AL] Pickup this item to see the recipe in NEI -achievement.gtplusplus.blockcasings.3.12.desc=[AL] Pickup this item to see the recipe in NEI -achievement.gtplusplus.blockcasings.3.13.desc=[AL] Pickup this item to see the recipe in NEI -achievement.gtplusplus.blockcasings.3.15.desc=[AL] Pickup this item to see the recipe in NEI -achievement.gt.blockmachines.gtplusplus.fusion.single=Alternative Fusion -achievement.gt.blockmachines.gtplusplus.tank.plasma=Plasma Storage -achievement.gt.blockmachines.gtplusplus.fusion.single.desc=[AL] Pickup this item to see the recipe in NEI -achievement.gt.blockmachines.gtplusplus.tank.plasma.desc=[AL] Pickup this item to see the recipe in NEI - - -//5/2/19 -achievement.MU-metaitem.01.32106=Junior Physicist -achievement.MU-metaitem.01.32107=Graduate Physicist -achievement.MU-metaitem.01.32108=Scholarly Physicist -achievement.MU-metaitem.01.32109=Master Physicist -achievement.MU-metaitem.01.32106.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32107.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32108.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32109.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32066=Proton Containment -achievement.MU-metaitem.01.32068=Electron Containment -achievement.MU-metaitem.01.32070=Quark Containment -achievement.MU-metaitem.01.32110=Graviton Containment -achievement.MU-metaitem.01.32066.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32068.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32070.desc=[AL] Pickup this item to see the recipe in NEI -achievement.MU-metaitem.01.32110.desc=[AL] Pickup this item to see the recipe in NEI -achievement.item.personalHealingDevice=Food is for chumps -achievement.item.personalHealingDevice.desc=[AL] You have upgraded to the nano, the future is yours -achievement.item.GTPP.BattPack.06.name=Charge Pack Mk I -achievement.item.GTPP.BattPack.07.name=Charge Pack Mk II -achievement.item.GTPP.BattPack.08.name=Charge Pack Mk III -achievement.item.GTPP.BattPack.09.name=Charge Pack Mk IV -achievement.item.GTPP.BattPack.06.name.desc=[AL] Pickup this item to see the recipe in NEI -achievement.item.GTPP.BattPack.07.name.desc=[AL] Pickup this item to see the recipe in NEI -achievement.item.GTPP.BattPack.08.name.desc=[AL] Pickup this item to see the recipe in NEI -achievement.item.GTPP.BattPack.09.name.desc=[AL] Pickup this item to see the recipe in NEI - - - -//14/2/19 -achievement.gtpp.start=Gregtech++ -achievement.gtpp.start.desc=So, think you've got what it takes? -achievement.hatch.control=This is where you put the Control Core -achievement.hatch.control.desc=A special hatch required by all GT++ Multiblocks. -achievement.hatch.dynamo.buffered=Buffered Dynamo Hatch -achievement.hatch.dynamo.buffered.desc=Don't EVER use these on large turbines. -achievement.multi.abs=Alloy Blast Smelter [ABS] -achievement.multi.abs.desc=Used to create most late game alloys. -achievement.dust.potin=Potin! -achievement.dust.potin.desc=Well, you gotta start somewhere... -achievement.dust.eglin=Eglin Steel! -achievement.dust.eglin.desc=Progress, albeit slow... -achievement.dust.staballoy=Staballoy! -achievement.dust.staballoy.desc=Now we're talking... -achievement.dust.quantum=Quantum! -achievement.dust.quantum.desc=Raw Matter. -achievement.dust.hypogen=Hypogen! -achievement.dust.hypogen.desc=What even is this material? -achievement.block.fishtrap=Free Fish -achievement.block.fishtrap.desc=Better than HarvestCraft. -achievement.block.withercage=Jail -achievement.block.withercage.desc=Trap a Wither/Dragon with this. -achievement.rtg=Radioisotope Thermoelectric Generation! -achievement.rtg.desc=Probably stolen from Russia, use with care. -achievement.dehydrate=Dehydration -achievement.dehydrate.desc=Drink some water. -achievement.semifluid=It's like a fluid, but it's not -achievement.semifluid.desc=Semifluids are confusing. -achievement.earlywasher=Simple Ore Washer -achievement.earlywasher.desc=Runs on ULV only. -achievement.advancedsteam=Alternative Steam options -achievement.advancedsteam.desc=Smart fuel consumption -achievement.pollutionremoval=Pollution, no more! -achievement.pollutionremoval.desc=POLLUTION IS BAD -achievement.hiampxform=High Amp Transformers -achievement.hiampxform.desc=Advanced power transformation -achievement.multi.pss=Power Sub-Station [PSS] -achievement.multi.pss.desc=Grid Power Storage. -achievement.multi.cyclo=Cyclotron -achievement.multi.cyclo.desc=Advanced Science -achievement.multi.sifter=Industrial Sifter -achievement.multi.sifter.desc=Faster than a turtle. -achievement.multi.cokeoven=Industrial Coke Oven [ICO] -achievement.multi.cokeoven.desc=Better than a Pyrolyse -achievement.multi.boiler.thermal=Thermal Boiler -achievement.multi.boiler.thermal.desc=Pahoehoe works too! -achievement.multi.zhuhai=Zhuhai, Fishing Port -achievement.multi.zhuhai.desc=Actually exists -achievement.casing.abs=Slow Progress -achievement.casing.abs.desc=Eventually, you will have your ABS. -achievement.casing.cyclotron.coil=Slower Progress -achievement.casing.cyclotron.coil.desc=Consider why you're even doing this.. -achievement.casing.multiuse=I'm going to make lots of these -achievement.casing.multiuse.desc=Don't start counting. -achievement.casing.containment=What's this for? -achievement.casing.containment.desc=I should probably try find out. -achievement.decay.neptunium238=Neptunium 238 -achievement.decay.neptunium238.desc=Cyclotron Product -achievement.decay.radium226=Radium 226 -achievement.decay.radium226.desc=Cyclotron Product -achievement.decay.molybdenum99=Molybdenum 99 -achievement.decay.molybdenum99.desc=Cyclotron Product -achievement.decay.technetium99m=Technetium 99M -achievement.decay.technetium99m.desc=Cyclotron Product -achievement.decay.technetium99=Technetium 99 -achievement.decay.technetium99.desc=Cyclotron Product - -//24/11/19 -achievement.gt.blockmachines.hatch.turbine.input.tier.00=Turbine Housing -achievement.gt.blockmachines.hatch.turbine.input.tier.00.desc=[AL] Pickup this item to see the recipe in NEI - -//Added 6/12/21 -achievement.gt.blockmachines.gtpp.multimachine.flotationcell=Flotation Cell -achievement.gt.blockmachines.gtpp.multimachine.flotationcell.desc=[AL] Pickup this item to see the recipe in NEI -achievement.gt.blockmachines.gtpp.multimachine.isamill=IsaMill -achievement.gt.blockmachines.gtpp.multimachine.isamill.desc=[AL] Pickup this item to see the recipe in NEI - diff --git a/src/resources/assets/gregtech/lang/zh_CN.lang b/src/resources/assets/gregtech/lang/zh_CN.lang deleted file mode 100644 index 1731d7c3cb..0000000000 --- a/src/resources/assets/gregtech/lang/zh_CN.lang +++ /dev/null @@ -1,239 +0,0 @@ - -//Shit I stole from GTNH~ - -GTPP.EBF.heat=热容 - -GTPP.machines.tier=等级 -GTPP.machines.input=输入 -GTPP.machines.output=输出 - -GTPP.multiblock.pollutionreduced=å‡å°‘污染至 -GTPP.multiblock.pollution=污染 -GTPP.multiblock.energy=能é‡å­˜å‚¨ -GTPP.multiblock.progress=进程 -GTPP.multiblock.efficiency=效率 -GTPP.multiblock.problems=为æ¯æ¡¶ -GTPP.multiblock.mei=最大能é‡è¾“å…¥ -GTPP.multiblock.usage=å¤§æ¦‚èƒ½ç”¨æ¥ -GTPP.multiblock.specialvalue=特殊值 -GTPP.multiblock.duration=æŒç»­æ—¶é—´ - - - -GTPP.CC.machinetier=控制核心等级 -GTPP.CC.discount=EUæŸè€— -GTPP.CC.parallel=最大并行处ç†è¿›ç¨‹ - -//Tooltips for the Charger Packs -GTPP.battpack.tooltip.1=在Baubles的腰带æ å†…使用 -GTPP.battpack.tooltip.2=消耗 -GTPP.battpack.tooltip.3=给穿ç€çš„盔甲充能 -GTPP.battpack.tooltip.4=åŒæ ·ç»™å¿«æ·æ å†…的物å“充能 - -//Tooltips for the Personal Healing Bauble -GTPP.nanohealer.tooltip.1=在Baubles的项链æ å†…使用 -GTPP.nanohealer.tooltip.2=æ¯æ¬¡æ“作消耗1638400EU -GTPP.nanohealer.tooltip.3=å¯ä»¥æ¢å¤è¡€é‡,饥饿和饱和度 -GTPP.nanohealer.tooltip.4=ä¸ä¼šé˜»æ­¢æ­»äº¡ -GTPP.nanohealer.tooltip.5=Shift+å³é”®æ¥åˆ‡æ¢ä¿¡æ¯ -GTPP.nanohealer.hidden=éšè—ä¿¡æ¯? - -//10/4/19 -//Tooltips for the Mob Killing Baubles -GTPP.monsterkiller.tooltip.1=在Baubles的护身符æ å†…使用 -GTPP.monsterkiller.tooltip.2=排泄 -GTPP.monsterkiller.tooltip.3=æ¯å‡»æ€ -GTPP.monsterkiller.tooltip.4=目标类型: - -//17/08/19 -GTPP.container.decaychest.name=è¡°å˜çš„ - - - - - - - - - - - - -//NEI INFORMATION -GTPP.nei.info=ä¿¡æ¯ -GTPP.nei.eutick=Eu/t -GTPP.nei.timetaken=耗时 -GTPP.nei.output=输出 -GTPP.nei.input=输入 -GTPP.nei.result=结果 -GTPP.nei.radioation=è¾å°„等级 - -//Some Generic Words -GTPP.info.eu=EU -GTPP.info.euInfo=EUä¿¡æ¯ -GTPP.info.inputLimit=输入é™åˆ¶ -GTPP.info.currentPower=当å‰åŠŸçŽ‡ -GTPP.info.hidden=éšè— - -//Some Time Words -GTPP.time.ticks=刻 -GTPP.time.seconds=秒 -GTPP.time.minutes=分 -GTPP.time.hours=æ—¶ -GTPP.time.days=æ—¥ -GTPP.time.weeks=周 -GTPP.time.months=月 - - - - - - - - - - - - -//Achievements - -//4/2/19 -achievement.gt.blockmachines.fusioncomputer.tier.09=èšå˜è®¡ç®—机MK IV -achievement.gtplusplus.blockcasings.3.12=èšå˜æ¡†æž¶MK III -achievement.gtplusplus.blockcasings.3.13=进阶ç£åŠ›é制! -achievement.gtplusplus.blockcasings.3.15=é‡å­é制! -achievement.gt.blockmachines.fusioncomputer.tier.09.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.gtplusplus.blockcasings.3.12.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.gtplusplus.blockcasings.3.13.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.gtplusplus.blockcasings.3.15.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.gt.blockmachines.gtplusplus.fusion.single=å¯æŽ§èšå˜ -achievement.gt.blockmachines.gtplusplus.tank.plasma=等离å­å­˜å‚¨ -achievement.gt.blockmachines.gtplusplus.fusion.single.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.gt.blockmachines.gtplusplus.tank.plasma.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ - - -//5/2/19 -achievement.MU-metaitem.01.32106=åˆçº§ç‰©ç†å­¦å®¶ -achievement.MU-metaitem.01.32107=研究生物ç†å­¦å®¶ -achievement.MU-metaitem.01.32108=学术物ç†å­¦å®¶ -achievement.MU-metaitem.01.32109=物ç†å­¦ç¡•å£« -achievement.MU-metaitem.01.32106.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32107.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32108.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32109.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32066=è´¨å­é制 -achievement.MU-metaitem.01.32068=电å­é制 -achievement.MU-metaitem.01.32070=夸克é制 -achievement.MU-metaitem.01.32110=引力é制 -achievement.MU-metaitem.01.32066.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32068.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32070.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.MU-metaitem.01.32110.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.item.personalHealingDevice=食物是为了笨蛋 -achievement.item.personalHealingDevice.desc=[AL]ä½ å·²ç»å‡çº§åˆ°çº³ç±³ï¼Œæœªæ¥å°±æ˜¯ä½ çš„ -achievement.item.GTPP.BattPack.06.name=充电工具包Mk I -achievement.item.GTPP.BattPack.07.name=充电工具包Mk II -achievement.item.GTPP.BattPack.08.name=充电工具包Mk III -achievement.item.GTPP.BattPack.09.name=充电工具包Mk IV -achievement.item.GTPP.BattPack.06.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.item.GTPP.BattPack.07.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.item.GTPP.BattPack.08.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ -achievement.item.GTPP.BattPack.09.name.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ - - - -//14/2/19 -achievement.gtpp.start=Gregtech++ -achievement.gtpp.start.desc=所以,你认为你已ç»å¾—到了它? -achievement.hatch.control=这是你放置控制核心的地方 -achievement.hatch.control.desc=所有GT++的多方å—都需è¦ç‰¹æ®Šçš„å¡«å……. -achievement.hatch.dynamo.buffered=缓冲åŽçš„å‘电机填充物 -achievement.hatch.dynamo.buffered.desc=ä¸è¦åœ¨å¤§åž‹æ¶¡è½®æœºä¸Šä½¿ç”¨è¿™äº›. -achievement.multi.abs=åˆé‡‘冶炼炉[ABS] -achievement.multi.abs.desc=用于制造大多数åŽæœŸåˆé‡‘. -achievement.dust.potin=ç²—é’é“œåˆé‡‘! -achievement.dust.potin.desc=好å§,你得从æŸä¸ªåœ°æ–¹å¼€å§‹... -achievement.dust.eglin=埃格林钢é“! -achievement.dust.eglin.desc=进展虽然缓慢... -achievement.dust.staballoy=è´«é“€åˆé‡‘! -achievement.dust.staballoy.desc=现在我们正在讨论... -achievement.dust.quantum=é‡å­! -achievement.dust.quantum.desc=原料. -achievement.dust.hypogen=æµ·ç€ç! -achievement.dust.hypogen.desc=这甚至是什么ææ–™? -achievement.block.fishtrap=å…费的鱼 -achievement.block.fishtrap.desc=比潘马斯农场好. -achievement.block.withercage=监狱 -achievement.block.withercage.desc=用此æ•æ‰å‡‹é›¶/末影龙. -achievement.rtg=放射性åŒä½ç´ çƒ­ç”µå‘电! -achievement.rtg.desc=å¯èƒ½ç›—于俄罗斯,å°å¿ƒä½¿ç”¨. -achievement.dehydrate=脱水 -achievement.dehydrate.desc=å–些水. -achievement.semifluid=它åƒæ˜¯æ¶²ä½“,但它ä¸æ˜¯ -achievement.semifluid.desc=åŠæµä½“令人困惑. -achievement.earlywasher=简å•çš„洗矿场 -achievement.earlywasher.desc=åªåœ¨ULV下工作. -achievement.advancedsteam=替代蒸汽选项 -achievement.advancedsteam.desc=智能油耗 -achievement.pollutionremoval=污染,没了! -achievement.pollutionremoval.desc=污染ä¸å¥½ -achievement.hiampxform=高放大å˜åŽ‹å™¨ -achievement.hiampxform.desc=è¿›é˜¶ç”µåŠ›è½¬æ¢ -achievement.multi.pss=能æºç«™[PSS] -achievement.multi.pss.desc=电力网络存储. -achievement.multi.cyclo=回旋加速器 -achievement.multi.cyclo.desc=高级科学 -achievement.multi.sifter=工业筛选机 -achievement.multi.sifter.desc=比乌龟快. -achievement.multi.cokeoven=工业焦炉[ICO] -achievement.multi.cokeoven.desc=比热解炉更好 -achievement.multi.boiler.thermal=地热锅炉 -achievement.multi.boiler.thermal.desc=熔岩也有效! -achievement.multi.zhuhai=ç æµ·,渔场 -achievement.multi.zhuhai.desc=实际存在 -achievement.casing.abs=进展缓慢 -achievement.casing.abs.desc=最终,你将拥有你的åˆé‡‘冶炼炉. -achievement.casing.cyclotron.coil=进展缓慢 -achievement.casing.cyclotron.coil.desc=考虑为什么你甚至这样åš.. -achievement.casing.multiuse=我è¦åšå¾ˆå¤šè¿™äº› -achievement.casing.multiuse.desc=ä¸è¦å¼€å§‹è®¡æ•°. -achievement.casing.containment=这个是干什么的? -achievement.casing.containment.desc=我应该试ç€æ‰¾å‡ºæ¥. -achievement.decay.neptunium238=é•Ž238 -achievement.decay.neptunium238.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ -achievement.decay.radium226=é•­226 -achievement.decay.radium226.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ -achievement.decay.molybdenum99=é’¼99 -achievement.decay.molybdenum99.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ -achievement.decay.technetium99m=é”99M -achievement.decay.technetium99m.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ -achievement.decay.technetium99=é”99 -achievement.decay.technetium99.desc=å›žæ—‹åŠ é€Ÿå™¨äº§å“ - - - -//24/11/19 -achievement.gt.blockmachines.hatch.turbine.input.tier.00=涡轮框架 -achievement.gt.blockmachines.hatch.turbine.input.tier.00.desc=[AL]æ¡èµ·è¿™ä¸ªç‰©å“以在NEI内查看é…æ–¹ - - - - - - - - - - - - - - - - - - - - - -//This zh_CN.lang is translated by huajijam for GregTech++ (3/1/20) \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png b/src/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png deleted file mode 100644 index e29ce83f82..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/fluids/fluid.argon.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png b/src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png deleted file mode 100644 index 4569cb8af3..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta deleted file mode 100644 index 0df7234a79..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/fluids/fluid.nitrofuel_old.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png b/src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png deleted file mode 100644 index e1d4a0f009..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/iconsets/GAS_TURBINE_SIDE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png b/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png deleted file mode 100644 index cac886f252..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png b/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png deleted file mode 100644 index 6de133ad06..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta deleted file mode 100644 index 18e5c3223b..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":12 - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png b/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png deleted file mode 100644 index 8aeb6c7c5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png b/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png deleted file mode 100644 index a03b2bdd49..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta deleted file mode 100644 index 18e5c3223b..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_ACCELERATOR_TE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":12 - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png b/src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png deleted file mode 100644 index e1d4a0f009..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/iconsets/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png deleted file mode 100644 index ad51b6f35f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block1.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png deleted file mode 100644 index 9544681ea6..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block2.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png deleted file mode 100644 index 161d37faf8..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block3.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png deleted file mode 100644 index 7d3a6d1e29..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block4.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png deleted file mode 100644 index a8a4b0e1f2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block5.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png deleted file mode 100644 index ad51b6f35f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/block6.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png deleted file mode 100644 index 2edad5a448..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png deleted file mode 100644 index 2041e4d562..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/frameGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png deleted file mode 100644 index 6e4e79b4fa..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png deleted file mode 100644 index 0a7e9d6e9e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/oreSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png deleted file mode 100644 index 0032fdd6e5..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta deleted file mode 100644 index 676faf4fb4..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/ore_animated.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 4, 3, 3, 2, 2, 1, 1] - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png deleted file mode 100644 index 7985626666..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeHuge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png deleted file mode 100644 index f1daedc2c9..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeLarge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png deleted file mode 100644 index 9927fa293e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeMedium.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png deleted file mode 100644 index aec8883d6a..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSide.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png deleted file mode 100644 index 6c29b067f3..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png deleted file mode 100644 index c1ef295198..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/pipeTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png b/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png deleted file mode 100644 index 455335e5c2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/ENRICHED/wire.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png deleted file mode 100644 index 161d37faf8..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block1.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png deleted file mode 100644 index 9544681ea6..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block2.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png deleted file mode 100644 index 161d37faf8..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block3.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png deleted file mode 100644 index 7d3a6d1e29..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block4.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png deleted file mode 100644 index a8a4b0e1f2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block5.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png deleted file mode 100644 index ad51b6f35f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/block6.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png deleted file mode 100644 index 2edad5a448..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png deleted file mode 100644 index 2041e4d562..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/frameGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png deleted file mode 100644 index ed3f2f1581..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/ore.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png deleted file mode 100644 index 0a7e9d6e9e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/oreSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png deleted file mode 100644 index 7985626666..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeHuge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png deleted file mode 100644 index f1daedc2c9..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeLarge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png deleted file mode 100644 index 9927fa293e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeMedium.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png deleted file mode 100644 index aec8883d6a..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSide.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png deleted file mode 100644 index 6c29b067f3..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png deleted file mode 100644 index c1ef295198..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/pipeTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png b/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png deleted file mode 100644 index 455335e5c2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/GEM_A/wire.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png deleted file mode 100644 index ad51b6f35f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block1.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png deleted file mode 100644 index 9544681ea6..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block2.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png deleted file mode 100644 index 161d37faf8..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block3.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png deleted file mode 100644 index 7d3a6d1e29..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block4.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png deleted file mode 100644 index a8a4b0e1f2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block5.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png deleted file mode 100644 index ad51b6f35f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/block6.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png deleted file mode 100644 index 2edad5a448..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png deleted file mode 100644 index 2041e4d562..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/frameGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png deleted file mode 100644 index 919d9bb70a..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta deleted file mode 100644 index d2c3416c73..0000000000 --- a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/ore.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1] - } -} \ No newline at end of file diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png deleted file mode 100644 index 0a7e9d6e9e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/oreSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png deleted file mode 100644 index 7985626666..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeHuge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png deleted file mode 100644 index f1daedc2c9..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeLarge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png deleted file mode 100644 index 9927fa293e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeMedium.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png deleted file mode 100644 index aec8883d6a..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSide.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png deleted file mode 100644 index 6c29b067f3..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png deleted file mode 100644 index c1ef295198..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/pipeTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png b/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png deleted file mode 100644 index 455335e5c2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/NUCLEAR/wire.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png deleted file mode 100644 index 3e33d0feec..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block1.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png deleted file mode 100644 index 9544681ea6..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block2.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png deleted file mode 100644 index 161d37faf8..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block3.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png deleted file mode 100644 index 7d3a6d1e29..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block4.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png deleted file mode 100644 index a8a4b0e1f2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block5.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png deleted file mode 100644 index ad51b6f35f..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/block6.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png deleted file mode 100644 index 2edad5a448..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png deleted file mode 100644 index 2041e4d562..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/frameGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png deleted file mode 100644 index 9cb38f3f8e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/ore.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png deleted file mode 100644 index 0a7e9d6e9e..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/oreSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png deleted file mode 100644 index 4feeed528c..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeHuge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png deleted file mode 100644 index 055c104f1c..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeLarge.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png deleted file mode 100644 index 0bb50256c5..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeMedium.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png deleted file mode 100644 index d229926034..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSide.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png deleted file mode 100644 index 1684ec116b..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png deleted file mode 100644 index f9838c8829..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/pipeTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png b/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png deleted file mode 100644 index 455335e5c2..0000000000 Binary files a/src/resources/assets/gregtech/textures/blocks/materialicons/REFINED/wire.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png b/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png deleted file mode 100644 index a669575ce1..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_2By2.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png b/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png deleted file mode 100644 index 7ed8d56b0e..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_3By3.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png b/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png deleted file mode 100644 index ccbea96e0c..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/HatchNbtConsumable_4By4.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/PowerSubStation.png b/src/resources/assets/gregtech/textures/gui/PowerSubStation.png deleted file mode 100644 index 0463dbedca..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/PowerSubStation.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png b/src/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png deleted file mode 100644 index f21ebc1026..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/basicmachines/BlastSmelter.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png b/src/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png deleted file mode 100644 index 6b086039ba..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/basicmachines/Dehydrator.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png b/src/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png deleted file mode 100644 index e95be5c31a..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/basicmachines/FissionFuel.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png b/src/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png deleted file mode 100644 index fd3f751671..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/basicmachines/LFTR.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png b/src/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png deleted file mode 100644 index 21eedab2f5..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/basicmachines/MixerAdvanced.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/gui/multimachines/LFTR.png b/src/resources/assets/gregtech/textures/gui/multimachines/LFTR.png deleted file mode 100644 index fd3f751671..0000000000 Binary files a/src/resources/assets/gregtech/textures/gui/multimachines/LFTR.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png b/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png deleted file mode 100644 index 13b37c999d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png b/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png deleted file mode 100644 index 3fd5382926..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_32k.window.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png b/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png deleted file mode 100644 index ffd9d4893b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png b/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png deleted file mode 100644 index a08018f561..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/gt.Volumetric_Flask_8k.window.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png deleted file mode 100644 index 59611725f8..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/TURBINE_BLADE_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png deleted file mode 100644 index 6b17748ece..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png deleted file mode 100644 index 7cb996d669..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtPlastic_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png deleted file mode 100644 index 172506c26c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png deleted file mode 100644 index f9f1162ce6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/arrowGtWood_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png deleted file mode 100644 index 8675564a9b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png deleted file mode 100644 index 9c310b5b09..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/bolt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png deleted file mode 100644 index 27d4df7081..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png deleted file mode 100644 index ce3c6377c7..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png deleted file mode 100644 index 1c93293744..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cellPlasma_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png deleted file mode 100644 index f02365b9ff..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/cell_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png deleted file mode 100644 index fad582745d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png deleted file mode 100644 index 64d56b48ea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtDust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png deleted file mode 100644 index a4418db9e1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png deleted file mode 100644 index 9798a597e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtGem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png deleted file mode 100644 index 85e42b0cd2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png deleted file mode 100644 index 2f0577d65f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtIngot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png deleted file mode 100644 index 8b48da35d2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png deleted file mode 100644 index ae6d73b7a6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crateGtPlate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png deleted file mode 100644 index 8a240a574d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png deleted file mode 100644 index f74931d42a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png deleted file mode 100644 index 3741866149..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedCentrifuged_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png deleted file mode 100644 index 17859801da..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png deleted file mode 100644 index 1918a7fa45..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushedPurified_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png deleted file mode 100644 index 7cdf09b174..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/crushed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png deleted file mode 100644 index d1282f4248..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png deleted file mode 100644 index 0d8c321826..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustImpure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png deleted file mode 100644 index 79216e0918..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustPure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png deleted file mode 100644 index f29479bf55..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png deleted file mode 100644 index a35dccba2b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png deleted file mode 100644 index 859cd70116..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png deleted file mode 100644 index 03c07f2760..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dustTiny_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png deleted file mode 100644 index cbc30cc68e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/dust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png deleted file mode 100644 index cdce151f9a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png deleted file mode 100644 index f6fa0b94cc..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/foil_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png deleted file mode 100644 index a7bc0f90f1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png deleted file mode 100644 index 0fe97b84fd..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png deleted file mode 100644 index dddb4764ce..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGtSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png deleted file mode 100644 index d8471aed5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gearGt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png deleted file mode 100644 index b63f9c3b35..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png deleted file mode 100644 index 6b7fc73d7a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png deleted file mode 100644 index c5abe856a0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemChipped_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png deleted file mode 100644 index fbbe56cb1c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png deleted file mode 100644 index 50d407491e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemExquisite_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png deleted file mode 100644 index 499bf464b3..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png deleted file mode 100644 index 3561f91a07..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png deleted file mode 100644 index 925e5f7eea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png deleted file mode 100644 index 82f557e199..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gemFlawless_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png deleted file mode 100644 index 55468929e9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/gem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png deleted file mode 100644 index 85f543676f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/handleMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png deleted file mode 100644 index 92bc131a2f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png deleted file mode 100644 index 678c35518b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png deleted file mode 100644 index c844854d37..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png deleted file mode 100644 index 6fc93f933b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png deleted file mode 100644 index ebf9b80323..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotHot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png deleted file mode 100644 index b62d361f19..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png deleted file mode 100644 index 2a63953e92..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png deleted file mode 100644 index e3ab084563..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png deleted file mode 100644 index 896be7f08e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png deleted file mode 100644 index b8853a770e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png deleted file mode 100644 index c086bca2bb..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingotTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png deleted file mode 100644 index c59ef7b1bb..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ingot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png deleted file mode 100644 index 4b29fca4c1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png deleted file mode 100644 index f3bcc922b2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/lens_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png deleted file mode 100644 index b1636ee569..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png deleted file mode 100644 index 2af89ec304..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/nugget_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png deleted file mode 100644 index d31178c3c6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png deleted file mode 100644 index 4666dd5902..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png deleted file mode 100644 index 037d829395..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png deleted file mode 100644 index edb7970730..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png deleted file mode 100644 index cd358f9d96..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png deleted file mode 100644 index 6840fd312a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png deleted file mode 100644 index de8ae5af6f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png deleted file mode 100644 index 8a71537dee..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png deleted file mode 100644 index 2d7a80f45e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png deleted file mode 100644 index 6e5d95061c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png deleted file mode 100644 index f73c531239..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plateTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png deleted file mode 100644 index f52c654ee5..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/plate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png deleted file mode 100644 index eb9dfd5e21..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png deleted file mode 100644 index 5879963ad2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/ring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png deleted file mode 100644 index 4eefbcd6e3..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png deleted file mode 100644 index f0d87d27df..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/rotor_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png deleted file mode 100644 index 98480bf685..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png deleted file mode 100644 index 0916369702..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/round_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png deleted file mode 100644 index faca2c6e3d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png deleted file mode 100644 index c540788917..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/screw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png deleted file mode 100644 index df442ed454..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png deleted file mode 100644 index 54b3afb24e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png deleted file mode 100644 index a8170f57d6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/springSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png deleted file mode 100644 index fdb0756839..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/spring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png deleted file mode 100644 index d999179b3c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png deleted file mode 100644 index 1580b911f0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png deleted file mode 100644 index 54b47c2224..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stickLong_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png deleted file mode 100644 index 04634628ac..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/stick_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png deleted file mode 100644 index 8cdc9f196f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png deleted file mode 100644 index 09af435c20..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadArrow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png deleted file mode 100644 index b09c2128da..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png deleted file mode 100644 index 7f05e61552..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadAxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png deleted file mode 100644 index 4a19f4c251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png deleted file mode 100644 index 778916b614..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadBuzzSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png deleted file mode 100644 index 3ab90f5b05..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png deleted file mode 100644 index 318ea2af2d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadChainsaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png deleted file mode 100644 index 0c5f99482c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png deleted file mode 100644 index 3dbeb7da6e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadDrill_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png deleted file mode 100644 index e52d0a01fa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png deleted file mode 100644 index 7890213e56..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadFile_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png deleted file mode 100644 index 747f647e7e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png deleted file mode 100644 index b36140bea2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHammer_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png deleted file mode 100644 index d0dcfd1e5d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png deleted file mode 100644 index 225d5d1907..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadHoe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png deleted file mode 100644 index 28d51f02af..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png deleted file mode 100644 index d10fab88aa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png deleted file mode 100644 index 9374970a7f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPickaxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png deleted file mode 100644 index c15a8cdbfa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png deleted file mode 100644 index 520f1bb48c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadPlow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png deleted file mode 100644 index eede998107..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png deleted file mode 100644 index 27b69fc23a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png deleted file mode 100644 index 6b0517b879..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png deleted file mode 100644 index 2aea2f961d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadScrewdriver_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png deleted file mode 100644 index 06a7479e5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png deleted file mode 100644 index fe6d646dd8..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png deleted file mode 100644 index 89fa86a4ce..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png deleted file mode 100644 index fa0da0ce2a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadShovel_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png deleted file mode 100644 index 5665e03aee..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSoldering_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png deleted file mode 100644 index 36e515be25..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png deleted file mode 100644 index b9a16a484a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadSword_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png deleted file mode 100644 index 2f162be760..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png deleted file mode 100644 index c95bf030b4..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadUniversalSpade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png deleted file mode 100644 index cde1376f59..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png deleted file mode 100644 index 9d0db6f7fb..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/toolHeadWrench_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png deleted file mode 100644 index 59611725f8..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/turbineBlade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/void_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png deleted file mode 100644 index 06f24ab18b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png deleted file mode 100644 index d5ce76b80f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/ENRICHED/wireFine_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png deleted file mode 100644 index c78a1d5570..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/TURBINE_BLADE_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png deleted file mode 100644 index d34a721d96..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png deleted file mode 100644 index 3ffb9e31e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtPlastic_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png deleted file mode 100644 index 20de92b986..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png deleted file mode 100644 index 948953f827..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/arrowGtWood_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png deleted file mode 100644 index 8675564a9b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/bolt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png deleted file mode 100644 index 27d4df7081..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png deleted file mode 100644 index ce3c6377c7..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png deleted file mode 100644 index 1c93293744..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cellPlasma_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png deleted file mode 100644 index f02365b9ff..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/cell_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png deleted file mode 100644 index fad582745d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png deleted file mode 100644 index 64d56b48ea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtDust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png deleted file mode 100644 index a4418db9e1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png deleted file mode 100644 index 9798a597e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtGem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png deleted file mode 100644 index 85e42b0cd2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png deleted file mode 100644 index 2f0577d65f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtIngot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png deleted file mode 100644 index 8b48da35d2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png deleted file mode 100644 index ae6d73b7a6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crateGtPlate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png deleted file mode 100644 index 8a240a574d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png deleted file mode 100644 index f74931d42a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedCentrifuged_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png deleted file mode 100644 index 17859801da..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushedPurified_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png deleted file mode 100644 index b546c4eeec..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/crushed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png deleted file mode 100644 index d1282f4248..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png deleted file mode 100644 index e60e7b6d18..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustImpure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png deleted file mode 100644 index 496dd33d5b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustPure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png deleted file mode 100644 index f29479bf55..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png deleted file mode 100644 index ebaf1512a8..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png deleted file mode 100644 index 859cd70116..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png deleted file mode 100644 index 3fad40a7e4..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dustTiny_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png deleted file mode 100644 index 8529b87f57..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/dust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png deleted file mode 100644 index cdce151f9a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/foil_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png deleted file mode 100644 index a7bc0f90f1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png deleted file mode 100644 index 0fe97b84fd..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png deleted file mode 100644 index 47ab97c308..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGtSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png deleted file mode 100644 index 97d42fe104..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gearGt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png deleted file mode 100644 index 235bdd740b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png deleted file mode 100644 index 6b7fc73d7a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemChipped_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png deleted file mode 100644 index fbbe56cb1c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemExquisite_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png deleted file mode 100644 index 499bf464b3..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png deleted file mode 100644 index 925e5f7eea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gemFlawless_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/gem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png deleted file mode 100644 index 9021949091..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/handleMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png deleted file mode 100644 index 92bc131a2f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png deleted file mode 100644 index 678c35518b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png deleted file mode 100644 index 6fc93f933b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png deleted file mode 100644 index ebf9b80323..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotHot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png deleted file mode 100644 index b62d361f19..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png deleted file mode 100644 index e3ab084563..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png deleted file mode 100644 index b8853a770e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingotTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png deleted file mode 100644 index fdd7cd358a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ingot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png deleted file mode 100644 index 4b29fca4c1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png deleted file mode 100644 index 20436f976e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/lens_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png deleted file mode 100644 index b1636ee569..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png deleted file mode 100644 index e8e1fef899..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/nugget_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png deleted file mode 100644 index d31178c3c6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png deleted file mode 100644 index 4666dd5902..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png deleted file mode 100644 index edb7970730..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png deleted file mode 100644 index 6840fd312a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png deleted file mode 100644 index 8a71537dee..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png deleted file mode 100644 index 6e5d95061c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plateTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png deleted file mode 100644 index 4b5c1998f0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/plate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png deleted file mode 100644 index eb9dfd5e21..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png deleted file mode 100644 index d5a0c95c2e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/ring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png deleted file mode 100644 index 14b62252ae..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/rotor_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png deleted file mode 100644 index 98480bf685..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/round_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png deleted file mode 100644 index faca2c6e3d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/screw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png deleted file mode 100644 index df442ed454..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png deleted file mode 100644 index 54b3afb24e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/springSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/spring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png deleted file mode 100644 index d999179b3c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png deleted file mode 100644 index 1580b911f0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stickLong_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png deleted file mode 100644 index f18ad52a73..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/stick_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png deleted file mode 100644 index 0f220d5406..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png deleted file mode 100644 index 244fde8251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadArrow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png deleted file mode 100644 index b09c2128da..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadAxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png deleted file mode 100644 index 4a19f4c251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadBuzzSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png deleted file mode 100644 index 3ab90f5b05..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadChainsaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png deleted file mode 100644 index 0c5f99482c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadDrill_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png deleted file mode 100644 index e52d0a01fa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadFile_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png deleted file mode 100644 index 747f647e7e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHammer_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png deleted file mode 100644 index d0dcfd1e5d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadHoe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png deleted file mode 100644 index 5ca5a9b6ed..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png deleted file mode 100644 index d10fab88aa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPickaxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png deleted file mode 100644 index c15a8cdbfa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadPlow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png deleted file mode 100644 index eede998107..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png deleted file mode 100644 index 6b0517b879..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadScrewdriver_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png deleted file mode 100644 index 06a7479e5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png deleted file mode 100644 index 89fa86a4ce..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadShovel_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png deleted file mode 100644 index fa9e379c16..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSoldering_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png deleted file mode 100644 index 36e515be25..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadSword_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png deleted file mode 100644 index 2f162be760..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadUniversalSpade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png deleted file mode 100644 index cde1376f59..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/toolHeadWrench_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png deleted file mode 100644 index c78a1d5570..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/turbineBlade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/void_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png deleted file mode 100644 index 06f24ab18b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png deleted file mode 100644 index 5e9e05d5b0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/GEM_A/wireFine_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png deleted file mode 100644 index 27d4df7081..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png deleted file mode 100644 index ce3c6377c7..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png deleted file mode 100644 index 1c93293744..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cellPlasma_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png deleted file mode 100644 index f02365b9ff..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/cell_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png deleted file mode 100644 index fad582745d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png deleted file mode 100644 index 64d56b48ea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtDust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png deleted file mode 100644 index a4418db9e1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png deleted file mode 100644 index 9798a597e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtGem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png deleted file mode 100644 index 85e42b0cd2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png deleted file mode 100644 index 2f0577d65f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtIngot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png deleted file mode 100644 index 8b48da35d2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png deleted file mode 100644 index ae6d73b7a6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crateGtPlate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png deleted file mode 100644 index 3741866149..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedCentrifuged_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png deleted file mode 100644 index 1918a7fa45..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushedPurified_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png deleted file mode 100644 index 7cdf09b174..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/crushed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png deleted file mode 100644 index 03c07f2760..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dustTiny_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png deleted file mode 100644 index cbc30cc68e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/dust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png deleted file mode 100644 index f6fa0b94cc..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/foil_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png deleted file mode 100644 index dddb4764ce..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGtSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png deleted file mode 100644 index d8471aed5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gearGt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png deleted file mode 100644 index c5abe856a0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemChipped_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png deleted file mode 100644 index 50d407491e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemExquisite_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png deleted file mode 100644 index 3561f91a07..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png deleted file mode 100644 index 82f557e199..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gemFlawless_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png deleted file mode 100644 index 55468929e9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/gem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png deleted file mode 100644 index c844854d37..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png deleted file mode 100644 index ebf9b80323..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotHot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png deleted file mode 100644 index 2a63953e92..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png deleted file mode 100644 index 896be7f08e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png deleted file mode 100644 index c086bca2bb..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingotTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png deleted file mode 100644 index c59ef7b1bb..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ingot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png deleted file mode 100644 index 4b29fca4c1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png deleted file mode 100644 index f3bcc922b2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/lens_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png deleted file mode 100644 index 2af89ec304..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/nugget_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png deleted file mode 100644 index 037d829395..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png deleted file mode 100644 index cd358f9d96..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png deleted file mode 100644 index de8ae5af6f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png deleted file mode 100644 index 2d7a80f45e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png deleted file mode 100644 index f73c531239..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plateTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png deleted file mode 100644 index f52c654ee5..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/plate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png deleted file mode 100644 index 5879963ad2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/ring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png deleted file mode 100644 index f0d87d27df..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/rotor_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png deleted file mode 100644 index 0916369702..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/round_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png deleted file mode 100644 index c540788917..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/screw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png deleted file mode 100644 index a8170f57d6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/springSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png deleted file mode 100644 index fdb0756839..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/spring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png deleted file mode 100644 index 54b47c2224..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stickLong_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png deleted file mode 100644 index 04634628ac..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/stick_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png deleted file mode 100644 index 06f24ab18b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png deleted file mode 100644 index d5ce76b80f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/Fiery/wireFine_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png deleted file mode 100644 index 4523be43b9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/TURBINE_BLADE_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png deleted file mode 100644 index d34a721d96..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png deleted file mode 100644 index 3ffb9e31e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtPlastic_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png deleted file mode 100644 index 20de92b986..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png deleted file mode 100644 index 948953f827..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/arrowGtWood_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png deleted file mode 100644 index 8675564a9b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/bolt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png deleted file mode 100644 index 27d4df7081..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png deleted file mode 100644 index ce3c6377c7..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png deleted file mode 100644 index 1c93293744..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cellPlasma_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png deleted file mode 100644 index f02365b9ff..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/cell_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png deleted file mode 100644 index fad582745d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png deleted file mode 100644 index 64d56b48ea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtDust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png deleted file mode 100644 index a4418db9e1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png deleted file mode 100644 index 9798a597e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtGem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png deleted file mode 100644 index 85e42b0cd2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png deleted file mode 100644 index 2f0577d65f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtIngot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png deleted file mode 100644 index 8b48da35d2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png deleted file mode 100644 index ae6d73b7a6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crateGtPlate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png deleted file mode 100644 index 7f49597676..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png deleted file mode 100644 index f74931d42a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png deleted file mode 100644 index 819f43c6f6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedCentrifuged_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png deleted file mode 100644 index e2edcad772..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png deleted file mode 100644 index 75b134d3ef..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushedPurified_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png deleted file mode 100644 index 9ee7575a02..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/crushed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png deleted file mode 100644 index d1282f4248..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png deleted file mode 100644 index e60e7b6d18..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustImpure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png deleted file mode 100644 index 496dd33d5b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustPure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png deleted file mode 100644 index f29479bf55..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png deleted file mode 100644 index 9758a35399..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png deleted file mode 100644 index 859cd70116..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png deleted file mode 100644 index 9ab216d5d2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dustTiny_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png deleted file mode 100644 index 4d00229736..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/dust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png deleted file mode 100644 index cdce151f9a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png deleted file mode 100644 index 5c94fdce69..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/foil_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png deleted file mode 100644 index a7bc0f90f1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png deleted file mode 100644 index 0fe97b84fd..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png deleted file mode 100644 index 47ab97c308..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGtSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png deleted file mode 100644 index 97d42fe104..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gearGt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png deleted file mode 100644 index 13a798cdc3..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png deleted file mode 100644 index 6b7fc73d7a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png deleted file mode 100644 index 9608d2d182..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemChipped_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png deleted file mode 100644 index fbbe56cb1c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png deleted file mode 100644 index 10d9d54e65..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemExquisite_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png deleted file mode 100644 index 499bf464b3..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png deleted file mode 100644 index df8b7b9a75..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png deleted file mode 100644 index 925e5f7eea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png deleted file mode 100644 index d5845995cc..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gemFlawless_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png deleted file mode 100644 index e1fe9bed43..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/gem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png deleted file mode 100644 index 9021949091..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/handleMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png deleted file mode 100644 index 92bc131a2f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png deleted file mode 100644 index 678c35518b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png deleted file mode 100644 index 6fc93f933b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png deleted file mode 100644 index ebf9b80323..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotHot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png deleted file mode 100644 index b62d361f19..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png deleted file mode 100644 index e3ab084563..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png deleted file mode 100644 index b8853a770e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingotTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png deleted file mode 100644 index e0a49831b5..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ingot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png deleted file mode 100644 index 4b29fca4c1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png deleted file mode 100644 index 20436f976e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/lens_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png deleted file mode 100644 index b1636ee569..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png deleted file mode 100644 index 78caf2a7ee..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/nugget_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png deleted file mode 100644 index d31178c3c6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png deleted file mode 100644 index 4666dd5902..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png deleted file mode 100644 index b3441fbf19..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png deleted file mode 100644 index edb7970730..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png deleted file mode 100644 index 4253929300..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png deleted file mode 100644 index 6840fd312a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png deleted file mode 100644 index 8a71537dee..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png deleted file mode 100644 index 6e5d95061c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plateTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png deleted file mode 100644 index 574c36552c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/plate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png deleted file mode 100644 index eb9dfd5e21..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png deleted file mode 100644 index d5a0c95c2e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/ring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png deleted file mode 100644 index 14b62252ae..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/rotor_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png deleted file mode 100644 index 98480bf685..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/round_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png deleted file mode 100644 index faca2c6e3d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/screw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png deleted file mode 100644 index df442ed454..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png deleted file mode 100644 index 54b3afb24e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/springSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/spring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png deleted file mode 100644 index d999179b3c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png deleted file mode 100644 index 1580b911f0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png deleted file mode 100644 index 99a3fb2e2b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stickLong_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png deleted file mode 100644 index 3de14933fa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/stick_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png deleted file mode 100644 index 0f220d5406..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png deleted file mode 100644 index 244fde8251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadArrow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png deleted file mode 100644 index b09c2128da..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadAxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png deleted file mode 100644 index 4a19f4c251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadBuzzSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png deleted file mode 100644 index 3ab90f5b05..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadChainsaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png deleted file mode 100644 index 0c5f99482c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadDrill_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png deleted file mode 100644 index e52d0a01fa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadFile_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png deleted file mode 100644 index 747f647e7e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHammer_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png deleted file mode 100644 index d0dcfd1e5d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadHoe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png deleted file mode 100644 index 5ca5a9b6ed..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png deleted file mode 100644 index d10fab88aa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPickaxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png deleted file mode 100644 index c15a8cdbfa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadPlow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png deleted file mode 100644 index eede998107..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png deleted file mode 100644 index 6b0517b879..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadScrewdriver_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png deleted file mode 100644 index 06a7479e5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png deleted file mode 100644 index 89fa86a4ce..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadShovel_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png deleted file mode 100644 index fa9e379c16..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSoldering_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png deleted file mode 100644 index 36e515be25..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadSword_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png deleted file mode 100644 index 2f162be760..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadUniversalSpade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png deleted file mode 100644 index cde1376f59..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/toolHeadWrench_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png deleted file mode 100644 index 4523be43b9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/turbineBlade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/void_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png deleted file mode 100644 index 06f24ab18b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png deleted file mode 100644 index 5e9e05d5b0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/NUCLEAR/wireFine_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png deleted file mode 100644 index 4523be43b9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/TURBINE_BLADE_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png deleted file mode 100644 index d34a721d96..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png deleted file mode 100644 index 3ffb9e31e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtPlastic_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png deleted file mode 100644 index 20de92b986..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png deleted file mode 100644 index 948953f827..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/arrowGtWood_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png deleted file mode 100644 index 8675564a9b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/bolt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png deleted file mode 100644 index 27d4df7081..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png deleted file mode 100644 index ce3c6377c7..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png deleted file mode 100644 index 1c93293744..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cellPlasma_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png deleted file mode 100644 index f02365b9ff..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/cell_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png deleted file mode 100644 index fad582745d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png deleted file mode 100644 index 64d56b48ea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtDust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png deleted file mode 100644 index a4418db9e1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png deleted file mode 100644 index 9798a597e0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtGem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png deleted file mode 100644 index 85e42b0cd2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png deleted file mode 100644 index 2f0577d65f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtIngot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png deleted file mode 100644 index 8b48da35d2..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png deleted file mode 100644 index ae6d73b7a6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crateGtPlate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png deleted file mode 100644 index 6f893e05b7..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png deleted file mode 100644 index f74931d42a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedCentrifuged_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png deleted file mode 100644 index 12a99bfde1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushedPurified_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png deleted file mode 100644 index 2a7b9e6d6c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/crushed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png deleted file mode 100644 index d1282f4248..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png deleted file mode 100644 index e60e7b6d18..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustImpure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png deleted file mode 100644 index 8918e54459..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png deleted file mode 100644 index 496dd33d5b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustPure_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png deleted file mode 100644 index f29479bf55..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png deleted file mode 100644 index ebaf1512a8..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png deleted file mode 100644 index 859cd70116..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png deleted file mode 100644 index 3fad40a7e4..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dustTiny_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png deleted file mode 100644 index 8529b87f57..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/dust_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png deleted file mode 100644 index cdce151f9a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/foil_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png deleted file mode 100644 index a7bc0f90f1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png deleted file mode 100644 index 0fe97b84fd..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png deleted file mode 100644 index 47ab97c308..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGtSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png deleted file mode 100644 index 97d42fe104..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gearGt_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png deleted file mode 100644 index 721d19529e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png deleted file mode 100644 index 6b7fc73d7a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemChipped_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png deleted file mode 100644 index fbbe56cb1c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemExquisite_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png deleted file mode 100644 index 499bf464b3..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawed_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png deleted file mode 100644 index 925e5f7eea..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gemFlawless_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/gem_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png deleted file mode 100644 index 38a7fc65c9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/handleMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png deleted file mode 100644 index 92bc131a2f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png deleted file mode 100644 index 678c35518b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png deleted file mode 100644 index 6fc93f933b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png deleted file mode 100644 index ebf9b80323..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotHot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png deleted file mode 100644 index b62d361f19..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png deleted file mode 100644 index e3ab084563..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png deleted file mode 100644 index b8853a770e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingotTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png deleted file mode 100644 index fdd7cd358a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ingot_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png deleted file mode 100644 index 4b29fca4c1..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png deleted file mode 100644 index 23b3ac8f76..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/lens_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png deleted file mode 100644 index b1636ee569..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png deleted file mode 100644 index e8e1fef899..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/nugget_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png deleted file mode 100644 index d31178c3c6..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png deleted file mode 100644 index 4666dd5902..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png deleted file mode 100644 index edb7970730..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateDouble_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png deleted file mode 100644 index 6840fd312a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuadruple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png deleted file mode 100644 index 8a71537dee..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateQuintuple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png deleted file mode 100644 index 6e5d95061c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plateTriple_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png deleted file mode 100644 index 4b5c1998f0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/plate_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png deleted file mode 100644 index eb9dfd5e21..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png deleted file mode 100644 index d5a0c95c2e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/ring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png deleted file mode 100644 index 751111417a..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/rotor_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png deleted file mode 100644 index 98480bf685..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/round.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/round_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png deleted file mode 100644 index faca2c6e3d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/screw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png deleted file mode 100644 index df442ed454..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png deleted file mode 100644 index 54b3afb24e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/springSmall_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/spring_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png deleted file mode 100644 index d999179b3c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png deleted file mode 100644 index 1580b911f0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stickLong_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png deleted file mode 100644 index f18ad52a73..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/stick_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png deleted file mode 100644 index 0f220d5406..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png deleted file mode 100644 index 244fde8251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadArrow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png deleted file mode 100644 index b09c2128da..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadAxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png deleted file mode 100644 index 4a19f4c251..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadBuzzSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png deleted file mode 100644 index 3ab90f5b05..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadChainsaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png deleted file mode 100644 index 0c5f99482c..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadDrill_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png deleted file mode 100644 index e52d0a01fa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadFile_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png deleted file mode 100644 index 747f647e7e..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHammer_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png deleted file mode 100644 index d0dcfd1e5d..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadHoe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png deleted file mode 100644 index 29bd613285..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadMallet_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png deleted file mode 100644 index d10fab88aa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPickaxe_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png deleted file mode 100644 index c15a8cdbfa..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadPlow_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png deleted file mode 100644 index eede998107..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSaw_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png deleted file mode 100644 index 6b0517b879..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadScrewdriver_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png deleted file mode 100644 index 06a7479e5f..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSense_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png deleted file mode 100644 index 89fa86a4ce..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadShovel_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png deleted file mode 100644 index 242dbd14fc..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSoldering_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png deleted file mode 100644 index 36e515be25..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadSword_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png deleted file mode 100644 index 2f162be760..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadUniversalSpade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png deleted file mode 100644 index cde1376f59..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/toolHeadWrench_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png deleted file mode 100644 index 4523be43b9..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/turbineBlade_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/void.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/void_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png deleted file mode 100644 index 06f24ab18b..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine.png and /dev/null differ diff --git a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png b/src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png deleted file mode 100644 index 5e9e05d5b0..0000000000 Binary files a/src/resources/assets/gregtech/textures/items/materialicons/REFINED/wireFine_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/ic2/lang/de_DE.lang b/src/resources/assets/ic2/lang/de_DE.lang deleted file mode 100644 index 2d562c59e7..0000000000 --- a/src/resources/assets/ic2/lang/de_DE.lang +++ /dev/null @@ -1,29 +0,0 @@ -ic2.itemEnergeticRotor=Kinetischer Getriebe-Rotor (Energische Legierung) -ic2.itemTungstenSteelRotor=Kinetischer Getriebe-Rotor (Wolframstahl) -ic2.itemVibrantRotor=Kinetischer Getriebe-Rotor (Schwingende Legierung) -ic2.itemIridiumRotor=Kinetischer Getriebe-Rotor (Iridium) - -ic2.itemMagnaliumRotor=Kinetischer Getriebe-Rotor (Magnalium) -ic2.itemUltimetRotor=Kinetischer Getriebe-Rotor (Ultimet) - -ic2.blockGenerator=RTG ENERGIE -ic2.blockGenerator.0=RTG ENERGIE -ic2.blockGenerator.1=KINETISCHE ENERGIE -ic2.blockGenerator.2=FEHLER ENERGIE -ic2.blockGenerator.3=MEHR FEHLER ENERGIE - -ic2.blockRTGenerator2=RTG ENERGIE 2 -ic2.blockKineticGenerator2=KINETISCHE ENERGIE 2 - -ic2.HydrofluoricAcid=Zelle mit industriell verstärkter Flusssäure -ic2.SulfurDioxide=Zelle mit Schwefeldioxid -ic2.SulfuricApatite=Zelle mit schwefligem Apatit -ic2.SulfurousAcid=Zelle mit Schwefelsäure - -ic2.HydrogenChloride=Zelle mit industriell verstärkter Salzsäure -ic2.LithiumHydroxide=Zelle mit Lithiumhydroxid -ic2.SulfuricLithium=Zelle mit schwefeligem Lithium - -ic2.UraniumHexaFluoride=Zelle mit Uran-Hexafluorid -ic2.ThoriumTetraFluoride=Zelle mit Thorium-Tetrafluorid -ic2.UraniumTetraFluoride=Zelle mit Uran-Tetrafluorid diff --git a/src/resources/assets/ic2/lang/en_US.lang b/src/resources/assets/ic2/lang/en_US.lang deleted file mode 100644 index 9b44f2d14e..0000000000 --- a/src/resources/assets/ic2/lang/en_US.lang +++ /dev/null @@ -1,35 +0,0 @@ -ic2.itemEnergeticRotor=Kinetic Gearbox Rotor (Energetic Alloy) -ic2.itemTungstenSteelRotor=Kinetic Gearbox Rotor (TungstenSteel) -ic2.itemVibrantRotor=Kinetic Gearbox Rotor (Vibrant Alloy) -ic2.itemIridiumRotor=Kinetic Gearbox Rotor (Iridium) - -ic2.itemMagnaliumRotor=Kinetic Gearbox Rotor (Magnalium) -ic2.itemUltimetRotor=Kinetic Gearbox Rotor (Ultimet) - -ic2.blockGenerator=RTG POWARZ -ic2.blockGenerator.0=RTG POWA -ic2.blockGenerator.1=KINETIC POWA -ic2.blockGenerator.2=ERROR POWA -ic2.blockGenerator.3=MOAR ERROR POWA - -ic2.blockRTGenerator2=RTG POWARZ 2 -ic2.blockKineticGenerator2=KINETIC POWA 2 - -ic2.HydrofluoricAcid=Industrial Strength Hydrofluoric Acid Cell -ic2.SulfurDioxide=Sulfur Dioxide Cell -ic2.SulfuricApatite=Sulfuric Apatite Cell -ic2.SulfurousAcid=Sulfurous Acid Cell - -ic2.HydrogenChloride=Industrial Strength Hydrogen Chloride Cell -ic2.LithiumHydroxide=Lithium Hydroxide Cell -ic2.SulfuricLithium=Sulfuric Lithium Cell - -ic2.UraniumHexaFluoride=Uranium Hexafluoride Cell -ic2.ThoriumTetraFluoride=Thorium Tetrafluoride Cell -ic2.UraniumTetraFluoride=Uranium Tetrafluoride Cell - - -ic2.itemArmorHazmatHelmetEx=Advanced Hazmat Helmet -ic2.itemArmorHazmatChestplateEx=Advanced Hazmat Suit -ic2.itemArmorHazmatLeggingsEx=Advanced Hazmat Leggings -ic2.itemArmorRubBootsEx=Advanced Hazmat Boots \ No newline at end of file diff --git a/src/resources/assets/ic2/lang/zh_CN.lang b/src/resources/assets/ic2/lang/zh_CN.lang deleted file mode 100644 index 0811dbcdb0..0000000000 --- a/src/resources/assets/ic2/lang/zh_CN.lang +++ /dev/null @@ -1,29 +0,0 @@ -ic2.itemEnergeticRotor=动力齿轮转å­(充能åˆé‡‘) -ic2.itemTungstenSteelRotor=动力齿轮转å­(钨钢) -ic2.itemVibrantRotor=动力齿轮转å­(脉冲åˆé‡‘) -ic2.itemIridiumRotor=动力齿轮转å­(铱) - -ic2.itemMagnaliumRotor=动力齿轮转å­(é•é“åˆé‡‘) -ic2.itemUltimetRotor=动力齿轮转å­(哈æ°åˆé‡‘) - -ic2.blockGenerator=RTG POWARZ -ic2.blockGenerator.0=RTG POWA -ic2.blockGenerator.1=KINETIC POWA -ic2.blockGenerator.2=ERROR POWA -ic2.blockGenerator.3=MOAR ERROR POWA - -ic2.blockRTGenerator2=RTG POWARZ 2 -ic2.blockKineticGenerator2=KINETIC POWA 2 - -ic2.HydrofluoricAcid=工业强化氢氟酸å•å…ƒ -ic2.SulfurDioxide=二氧化硫å•å…ƒ -ic2.SulfuricApatite=硫酸磷ç°çŸ³å•å…ƒ -ic2.SulfurousAcid=亚硫酸å•å…ƒ - -ic2.HydrogenChloride=工业强化氯化氢å•å…ƒ -ic2.LithiumHydroxide=氢氧化锂å•å…ƒ -ic2.SulfuricLithium=硫酸锂å•å…ƒ - -ic2.UraniumHexaFluoride=六氟化铀å•å…ƒ -ic2.ThoriumTetraFluoride=四氟化é’å•å…ƒ -ic2.UraniumTetraFluoride=四氟化铀å•å…ƒ \ No newline at end of file diff --git a/src/resources/assets/ic2/textures/armor/hazmatEx_1.png b/src/resources/assets/ic2/textures/armor/hazmatEx_1.png deleted file mode 100644 index 2275007fbe..0000000000 Binary files a/src/resources/assets/ic2/textures/armor/hazmatEx_1.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/armor/hazmatEx_2.png b/src/resources/assets/ic2/textures/armor/hazmatEx_2.png deleted file mode 100644 index 758adafdf2..0000000000 Binary files a/src/resources/assets/ic2/textures/armor/hazmatEx_2.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png b/src/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png deleted file mode 100644 index ed907728d4..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/HydrofluoricAcid.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/HydrogenChloride.png b/src/resources/assets/ic2/textures/items/cell/HydrogenChloride.png deleted file mode 100644 index 135d293637..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/HydrogenChloride.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png b/src/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png deleted file mode 100644 index 7fefe04c5e..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/LithiumHydroxide.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/SulfurDioxide.png b/src/resources/assets/ic2/textures/items/cell/SulfurDioxide.png deleted file mode 100644 index f8bf8329b5..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/SulfurDioxide.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/SulfuricApatite.png b/src/resources/assets/ic2/textures/items/cell/SulfuricApatite.png deleted file mode 100644 index 5c62c379ab..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/SulfuricApatite.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/SulfuricLithium.png b/src/resources/assets/ic2/textures/items/cell/SulfuricLithium.png deleted file mode 100644 index b8d02729ba..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/SulfuricLithium.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/SulfurousAcid.png b/src/resources/assets/ic2/textures/items/cell/SulfurousAcid.png deleted file mode 100644 index 53f8604e13..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/SulfurousAcid.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png b/src/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png deleted file mode 100644 index 413179e396..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/ThoriumTetraFluoride.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png b/src/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png deleted file mode 100644 index 2fe0c893fe..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/UraniumHexaFluoride.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png b/src/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png deleted file mode 100644 index ba2d239308..0000000000 Binary files a/src/resources/assets/ic2/textures/items/cell/UraniumTetraFluoride.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png b/src/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png deleted file mode 100644 index 742d1d7035..0000000000 Binary files a/src/resources/assets/ic2/textures/items/itemArmorHazmatChestplateEx.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png b/src/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png deleted file mode 100644 index 5340375595..0000000000 Binary files a/src/resources/assets/ic2/textures/items/itemArmorHazmatHelmetEx.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png b/src/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png deleted file mode 100644 index 80cdca9b23..0000000000 Binary files a/src/resources/assets/ic2/textures/items/itemArmorHazmatLeggingsEx.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png b/src/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png deleted file mode 100644 index 901a8fbc35..0000000000 Binary files a/src/resources/assets/ic2/textures/items/itemArmorRubBootsEx.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png b/src/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png deleted file mode 100644 index 9fef2ec178..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/itemEnergeticRotor.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png b/src/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png deleted file mode 100644 index 1f1770ff1c..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/itemIridiumRotor.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png b/src/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png deleted file mode 100644 index d1e2970117..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/itemMagnaliumRotor.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png b/src/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png deleted file mode 100644 index aec47b7c6b..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/itemTungstenSteelRotor.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png b/src/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png deleted file mode 100644 index 03704d5d12..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/itemUltimetRotor.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png b/src/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png deleted file mode 100644 index 34949af9a6..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/itemVibrantRotor.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png b/src/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png deleted file mode 100644 index 045470a2b1..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/rotorEnergeticModel.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png b/src/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png deleted file mode 100644 index b967b4f1dd..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/rotorIridiumModel.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png b/src/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png deleted file mode 100644 index a638c0389f..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/rotorMagnaliumModel.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png b/src/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png deleted file mode 100644 index 7dd2e69f7e..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/rotorTungstenSteelModel.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png b/src/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png deleted file mode 100644 index b6c3f36716..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/rotorUltimetModel.png and /dev/null differ diff --git a/src/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png b/src/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png deleted file mode 100644 index 321de66ff9..0000000000 Binary files a/src/resources/assets/ic2/textures/items/rotors/rotorVibrantModel.png and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/death.ogg b/src/resources/assets/minecraft/sounds/mob/witch/death.ogg deleted file mode 100644 index 412fe5c591..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/death.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/hit1.ogg b/src/resources/assets/minecraft/sounds/mob/witch/hit1.ogg deleted file mode 100644 index 91ec4976b9..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/hit1.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/hit2.ogg b/src/resources/assets/minecraft/sounds/mob/witch/hit2.ogg deleted file mode 100644 index 0bdc21aa52..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/hit2.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/hit3.ogg b/src/resources/assets/minecraft/sounds/mob/witch/hit3.ogg deleted file mode 100644 index b7d4429989..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/hit3.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/hit4.ogg b/src/resources/assets/minecraft/sounds/mob/witch/hit4.ogg deleted file mode 100644 index c810364be4..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/hit4.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/idle1.ogg b/src/resources/assets/minecraft/sounds/mob/witch/idle1.ogg deleted file mode 100644 index 4596d850c1..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/idle1.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/idle2.ogg b/src/resources/assets/minecraft/sounds/mob/witch/idle2.ogg deleted file mode 100644 index 9d60d58843..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/idle2.ogg and /dev/null differ diff --git a/src/resources/assets/minecraft/sounds/mob/witch/idle3.ogg b/src/resources/assets/minecraft/sounds/mob/witch/idle3.ogg deleted file mode 100644 index b5134e84d9..0000000000 Binary files a/src/resources/assets/minecraft/sounds/mob/witch/idle3.ogg and /dev/null differ diff --git a/src/resources/assets/miscutils/lang/de_DE.lang b/src/resources/assets/miscutils/lang/de_DE.lang deleted file mode 100644 index 6dd49228a2..0000000000 --- a/src/resources/assets/miscutils/lang/de_DE.lang +++ /dev/null @@ -1,1908 +0,0 @@ -//GT++ Items - - -//Creative Tabs -itemGroup.MiscUtilBlockTab=[GT++] Blöcke -itemGroup.MiscUtilMiscTab=[GT++] Gegenstände -itemGroup.MiscUtilCombatTab=[GT++] Kampf -itemGroup.MiscUtilToolsTab=[GT++] Werkzeuge -itemGroup.MiscUtilMachineTab=[GT++] Maschinen -itemGroup.MiscUtilOtherTab=[GT++] Gegenstände II -itemGroup.MiscUtilBOP=[GT++] Biomes O'Plenty Gegenstände - -//Debug -item.AAA_Broken.name=[Nicht implementierter Gegenstand] Bitte melde dieses Rezept auf Github. -item.itemBedLocator_Base.name=Bett-Lokalisierer [NBT Test] -item.itemBaseItemWithCharge.name=Aufladbarer Basisgegenstand -item.miscutils_itemDebugShapeSpawner.name=[Debug] Formen - -//Fluids -tile.fluidSludge.name=Stehendes Abwasser -tile.fluidSludge.0.name=Stehendes Abwasser - -//Death Messages -death.attack.plasmabolt=%s wurde durch brennend heißes Plasma getötet. -death.attack.plasmabolt.player=%1$s wurde von %2$s mit Hilfe von Plasma getötet. - -//Alternative Materials -item.itemPlateBatteryAlloy.name=Platte aus Batterie-Legierung -item.itemIngotBatteryAlloy.name=Barren aus Batterie-Legierung -item.itemStickyRubber.name=Gumlet aus klebrigem Gummi - -//Unused Fuel rods -item.itemFuelRod_Empty.name=Leeres Brennelement -item.itemFuelRod_Thorium.name=Thorium-Brennelement -item.itemFuelRod_Uranium.name=Uran-Brennelement -item.itemFuelRod_Plutonium.name=Plutonium-Brennelement - -//Entities -entity.constructStaballoy.name=Stablegierungskonstrukt -entity.sickBlaze.name=Infizierter Fanatiker - -//Tile Entities -tile.blockToolBuilder.name=GregTech Werkzeug-Konstrukteur - -//Tools -item.itemBufferCore.name=Pufferkern -item.itemStaballoyPickaxe.name=Tunnelgräber -item.itemStaballoyAxe.name=Baumfäller -item.itemSandstoneHammer.name=Bruchsteinbrecher - -//Thermal Foundation Stuff -item.MiscUtils.bucket.bucketPyrotheum.name=Eimer mit flammendem Pyrotheum -item.MiscUtils.bucket.bucketCryotheum.name=Eimer mit gelenem Kryotheum -item.MiscUtils.bucket.bucketEnder.name=Eimer mit resonantem Ender -item.MiscUtils.material.dustPyrotheum.name=Pyrotheumstaub -item.MiscUtils.material.dustCryotheum.name=Kryotheumstaub -item.MiscUtils.material.rodBlizz.name=Blizzrute -item.MiscUtils.material.dustBlizz.name=Blizzstaub -tile.MiscUtils.fluid.pyrotheum.name=Flammendes Pyrotheum -tile.MiscUtils.fluid.cryotheum.name=Gelenes Kryotheum -tile.miscutils.fluid.ender.name=Resonantes Ender - -//Forestry Stuff -item.frameAccelerated.name=Beschleunigter Rahmen -item.frameVoid.name=Nichts-Rahmen -item.frameMutagenic.name=Erbgutverändernder Rahmen -item.frameBusy.name=Arbeitender Rahmen -item.frameChocolate.name=Schokoladiger Rahmen -item.frameRestraint.name=Zurückhaltender Rahmen -item.frameSoul.name=Seelen-Rahmen -item.frameHealing.name=Heilender Rahmen -item.frameNova.name=Nova-Rahmen -item.frameArborists.name=Försters Rahmen -item.frameDecaying.name=Zersetzender Rahmen -item.frameSlowing.name=Lähmender Rahmen -item.frameStabilizing.name=Stabilisierender Rahmen -item.frameUseless.name=Nutzloser Ramen - -//IC2 stuff -item.itemEnergeticRotorBlade.name=Rotorblatt aus energischer Legierung -item.itemTungstenSteelRotorBlade.name=Rotorblatt aus Wolframstahl -item.itemVibrantRotorBlade.name=Rotorblatt aus schwingender Legierung -item.itemIridiumRotorBlade.name=Rotorblatt aus Iridium -item.itemEnergeticShaft.name=Welle aus energischer Legierung -item.itemTungstenSteelShaft.name=Welle aus Wolframstahl -item.itemVibrantShaft.name=Welle aus schwingender Legierung -item.itemIridiumShaft.name=Welle aus Iridium -item.itemMagnaliumRotorBlade.name=Rotorblatt aus Magnalium -item.itemUltimetRotorBlade.name=Rotorblatt aus Ultimet -item.itemMagnaliumShaft.name=Welle aus Magnalium -item.itemUltimetShaft.name=Welle aus Ultimet - - -//Misc Items -item.itemPLACEHOLDER_Circuit.name=Quark-Manipulator (UV) -item.itemPlateEnrichedSoularium.name=Platte aus angereichertem Soularium -item.itemHeliumBlob.name=Geheimnisvolle Wasserstoffsubstanz -item.itemAlkalusDisk.name=Alkalus-Schallplatte -item.itemHotIngotRaisinBread.name=Heißer Laib Rosinenbrot -item.itemIngotRaisinBread.name=§5ImQ009's §fRosinenbrot - -//Misc Blocks -tile.blockCompressedObsidian.0.name=Komprimierter Obsidian (9) -tile.blockCompressedObsidian.1.name=Doppelt-Komprimierter Obsidian (81) -tile.blockCompressedObsidian.2.name=Dreifach-Komprimierter Obsidian (729) -tile.blockCompressedObsidian.3.name=Vierfach-Komprimierter Obsidian (6561) -tile.blockCompressedObsidian.4.name=Fünffach-Komprimierter Obsidian (59049) -tile.blockCompressedObsidian.5.name=Umgekehrter Obsidian -tile.blockNet.name=Netz - - - -//Meta Tool -MU-metaitem.01.0.name=MU-metaitem.01.0.name - -//Cells -item.SulfurDioxide.name=Hochwertige Schwefeldioxidzelle -item.Fertiliser.name=Düngemittelzelle -item.UN32Fertiliser.name=UN-32 Düngemittelzelle -item.UN18Fertiliser.name=UN-18 Düngemittelzelle -item.RaisinJuice.name=Rosinensaftzelle - -//Resources -item.itemStickyRubber.name=Gumlet aus klebrigem Gummi -item.itemCoalCoke.name=Verkokste Kohle -item.itemHydrogenBlob.name=Mysteriöses Wasserstofftröpfchen -item.itemHeliumBlob.name=Mysteriöse Wasserstoffsubstanz - -//Normal Items -item.itemAlkalusDisk.name=Alkalus-Schallplatte -item.itemSimpleFiremaker.name=Einfache Zündhilfe -item.itemFiber.name=Pflanzenfaser -item.itemRope.name=Tau -item.BackpackRed.name=Roter Rucksack -item.BackpackGreen.name=Grüner Rucksack -item.BackpackBlue.name=Blauer Rucksack -item.BackpackYellow.name=Gelber Rucksack -item.BackpackPurple.name=Lila Rucksack -item.BackpackCyan.name=Cyaner Rucksack -item.BackpackMaroon.name=Kastanienbrauner Rucksack -item.BackpackOlive.name=Olivengrüner Rucksack -item.BackpackDarkGreen.name=Dunkelgrüner Rucksack -item.BackpackDarkPurple.name=Dunkellila Rucksack -item.BackpackTeal.name=Blaugrüner Rucksack -item.BackpackNavy.name=Navy Rucksack -item.BackpackSilver.name=Silberner Rucksack -item.BackpackGray.name=Grauer Rucksack -item.BackpackBlack.name=Schwarzer Rucksack -item.BackpackWhite.name=Weißer Rucksack -item.itemBlueprint.name=Blaupause [Ich bin nutzlos] -item.itemGemShards.name=Diamantscherbe -item.itemHalfCompleteCasings.name=Halb-fertige Hülle I -item.itemSulfuricPotion.name=Werfbare Phiole mit Schwefelsäure -item.itemHydrofluoricPotion.name=Werfbare Phiole mit Flusssäure -item.itemIngotRaisinBread.name=Eine Portion Rosinenbrot -item.itemHotIngotRaisinBread.name=Eine Portion heißes Rosinenbrot -item.itemFoodRaisinToast.name=Eine Portion Rosinentoast -item.itemHotFoodRaisinToast.name=Eine Portion heißer Rosinentoast -item.itemFoodCurriedSausages.name=Eine Portion Currywurst -item.itemHotFoodCurriedSausages.name=Eine Portion heiße Currywurst - - - -//Material Items -item.itemDustGadolinium.name=Gadolinium-Staub -item.itemDustSmallGadolinium.name=Kleines Häufchen Gadolinium-Staub -item.itemDustTinyGadolinium.name=Winziges Häufchen Gadolinium-Staub -item.itemDustYtterbium.name=Ytterbium-Staub -item.itemDustSmallYtterbium.name=Kleines Häufchen Ytterbium-Staub -item.itemDustTinyYtterbium.name=Winziges Häufchen Ytterbium-Staub -item.itemDustSamarium.name=Samarium-Staub -item.itemDustSmallSamarium.name=Kleines Häufchen Samarium-Staub -item.itemDustTinySamarium.name=Winziges Häufchen Samarium-Staub -item.itemDustLanthanum.name=Lanthan-Staub -item.itemDustSmallLanthanum.name=Kleines Häufchen Lanthan-Staub -item.itemDustTinyLanthanum.name=Winziges Häufchen Lanthan-Staub -item.itemCellNeon.name=Neon-Zelle -item.itemCellGermanium.name=Germanium-Zelle -item.itemCellSelenium.name=Selen-Zelle -item.itemCellBromine.name=Brom-Zelle -item.itemCellKrypton.name=Krypton-Zelle -item.itemCellZirconium.name=Zirkonium-Zelle -item.itemCellTechnetium.name=Technetium-Zelle -item.itemCellRuthenium.name=Ruthenium-Zelle -item.itemCellRhodium.name=Rhodium-Zelle -item.itemCellIodine.name=Iod-Zelle -item.itemCellXenon.name=Xenon-Zelle -item.itemCellHafnium.name=Hafnium-Zelle -item.itemCellRhenium.name=Rhenium-Zelle -item.itemCellThallium.name=Thallium-Zelle -item.itemCellPolonium.name=Polonium-Zelle -item.itemCellAstatine.name=Astat-Zelle -item.itemCellFrancium.name=Francium-Zelle -item.itemCellRadium.name=Radium-Zelle -item.itemCellActinium.name=Actinium-Zelle -item.itemCellProtactinium.name=Protactinium-Zelle -item.itemCellNeptunium.name=Neptunium-Zelle -item.itemCellCurium.name=Curium-Zelle -item.itemCellBerkelium.name=Berkelium-Zelle -item.itemCellCalifornium.name=Californium-Zelle -item.itemCellEinsteinium.name=Einsteinium-Zelle -item.itemCellFermium.name=Fermium-Zelle -item.itemCellRefinedTrinium.name=Raffinierte Trinium-Zelle -item.itemIngotSelenium.name=Selen-Barren -item.itemDustSelenium.name=Selen-Staub -item.itemDustTinySelenium.name=Winziges Häufchen Selen-Staub -item.itemDustSmallSelenium.name=Kleines Häufchen Selen-Staub -item.itemNuggetSelenium.name=Selen-Nugget -item.itemPlateSelenium.name=Selen-Platte -item.itemPlateDoubleSelenium.name=Doppelte Selen-Platte -item.itemBoltSelenium.name=Selen-Bolzen -item.itemRodSelenium.name=Selen-Stange -item.itemRodLongSelenium.name=Lange Selen-Stange -item.itemRingSelenium.name=Selen-Ring -item.itemScrewSelenium.name=Selen-Schraube -item.itemRotorSelenium.name=Selen-Rotor -item.itemGearSelenium.name=Selen-Zahnrad -item.itemCellUranium232.name=Uran-232-Zelle -item.itemCellUranium233.name=Uran-233-Zelle -item.itemCellThoriumTetrafluoride.name=Thorium-Tetrafluorid-Zelle -item.itemCellThoriumHexafluoride.name=Thorium-Hexafluorid-Zelle -item.itemCellUraniumTetrafluoride.name=Uran-Tetrafluorid-Zelle -item.itemCellUraniumHexafluoride.name=Uran-Hexafluorid-Zelle -item.itemCellZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Zelle -item.itemCellBerylliumFluoride.name=Beryllium-Fluorid-Zelle -item.itemCellLithiumFluoride.name=Lithium-Fluorid-Zelle -item.itemCellHydroxide.name=Hydroxid-Zelle -item.itemCellAmmonium.name=Ammonium-Zelle -item.itemCellAmmoniumBifluoride.name=Ammonium-Bifluorid-Zelle -item.itemCellBerylliumHydroxide.name=Beryllium-Hydroxid-Zelle -item.itemCellAmmoniumTetrafluoroberyllate.name=Ammonium-Tetrafluoroberyllat-Zelle -item.itemCellNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Zelle -item.itemCellTechnetiumHexafluoride.name=Technetium-Hexafluorid-Zelle -item.itemCellSeleniumHexafluoride.name=Selen-Hexafluorid-Zelle -item.itemCellEnergyCrystal.name=Energiekristall-Zelle -item.itemCellBloodSteel.name=Blutstahl-Zelle -item.itemCellStaballoy.name=Staballoy-Zelle -item.itemCellTantalloy60.name=Tantalloy-60-Zelle -item.itemCellTantalloy61.name=Tantalloy-61-Zelle -item.itemCellTumbaga.name=Tumbaga-Zelle -item.itemCellPotin.name=Potin-Zelle -item.itemCellInconel625.name=Inconel-625-Zelle -item.itemCellInconel690.name=Inconel-690-Zelle -item.itemCellInconel792.name=Inconel-792-Zelle -item.itemCellZeron100.name=Zeron-100-Zelle -item.itemCellMaragingSteel250.name=Maraging-Stahl-250-Zelle -item.itemCellMaragingSteel300.name=Maraging-Stahl-300-Zelle -item.itemCellMaragingSteel350.name=Maraging-Stahl-350-Zelle -item.itemCellStellite.name=Stellite-Zelle -item.itemCellTalonite.name=Talonite-Zelle -item.itemCellHastelloyW.name=Hastelloy-W-Zelle -item.itemCellHastelloyX.name=Hastelloy-X-Zelle -item.itemCellHastelloyN.name=Hastelloy-N-Zelle -item.itemCellHastelloyC276.name=Hastelloy-C276-Zelle -item.itemCellIncoloy020.name=Incoloy-020-Zelle -item.itemCellIncoloyDS.name=Incoloy-DS-Zelle -item.itemCellIncoloyMA956.name=Incoloy-MA956-Zelle -item.itemCellTungstenCarbide.name=Wolframcarbid-Zelle -item.itemCellSiliconCarbide.name=Siliziumcarbid-Zelle -item.itemCellTantalumCarbide.name=Tantalcarbid-Zelle -item.itemCellZirconiumCarbide.name=Zirkoniumcarbid-Zelle -item.itemCellNiobiumCarbide.name=Niobcarbid-Zelle -item.itemCellGrisium.name=Grisium-Zelle -item.itemCellEglinSteelBaseCompound.name=Eglin-Stahl Base Compound-Zelle -item.itemCellEglinSteel.name=Eglin-Stahl-Zelle -item.itemCellHG1223.name=HG-1223-Zelle -item.itemCellTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Zelle -item.itemCellTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Zelle -item.itemCellTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Zelle -item.itemCellQuantum.name=Quanten-Zelle -item.itemIngotBromine.name=Brom-Barren -item.itemDustBromine.name=Brom-Staub -item.itemDustTinyBromine.name=Winziges Häufchen Brom-Staub -item.itemDustSmallBromine.name=Kleines Häufchen Brom-Staub -item.itemNuggetBromine.name=Brom-Nugget -item.itemPlateBromine.name=Brom-Platte -item.itemPlateDoubleBromine.name=Doppelte Brom-Platte -item.itemIngotStrontium.name=Strontium-Barren -item.itemDustStrontium.name=Strontium-Staub -item.itemDustTinyStrontium.name=Winziges Häufchen Strontium-Staub -item.itemDustSmallStrontium.name=Kleines Häufchen Strontium-Staub -item.itemNuggetStrontium.name=Strontium-Nugget -item.itemPlateStrontium.name=Strontium-Platte -item.itemPlateDoubleStrontium.name=Doppelte Strontium-Platte -item.itemBoltStrontium.name=Strontium-Bolzen -item.itemRodStrontium.name=Strontium-Stange -item.itemRodLongStrontium.name=Lange Strontium-Stange -item.itemRingStrontium.name=Strontium-Ring -item.itemScrewStrontium.name=Strontium-Schraube -item.itemRotorStrontium.name=Strontium-Rotor -item.itemGearStrontium.name=Strontium-Zahnrad -item.itemIngotZirconium.name=Zirkonium-Barren -item.itemDustZirconium.name=Zirkonium-Staub -item.itemDustTinyZirconium.name=Winziges Häufchen Zirkonium-Staub -item.itemDustSmallZirconium.name=Kleines Häufchen Zirkonium-Staub -item.itemNuggetZirconium.name=Zirkonium-Nugget -item.itemPlateZirconium.name=Zirkonium-Platte -item.itemPlateDoubleZirconium.name=Doppelte Zirkonium-Platte -item.itemBoltZirconium.name=Zirkonium-Bolzen -item.itemRodZirconium.name=Zirkonium-Stange -item.itemRodLongZirconium.name=Lange Zirkonium-Stange -item.itemRingZirconium.name=Zirkonium-Ring -item.itemScrewZirconium.name=Zirkonium-Schraube -item.itemRotorZirconium.name=Zirkonium-Rotor -item.itemGearZirconium.name=Zirkonium-Zahnrad -item.itemIngotRuthenium.name=Ruthenium-Barren -item.itemDustRuthenium.name=Ruthenium-Staub -item.itemDustTinyRuthenium.name=Winziges Häufchen Ruthenium-Staub -item.itemDustSmallRuthenium.name=Kleines Häufchen Ruthenium-Staub -item.itemNuggetRuthenium.name=Ruthenium-Nugget -item.itemPlateRuthenium.name=Ruthenium-Platte -item.itemPlateDoubleRuthenium.name=Doppelte Ruthenium-Platte -item.itemBoltRuthenium.name=Ruthenium-Bolzen -item.itemRodRuthenium.name=Ruthenium-Stange -item.itemRodLongRuthenium.name=Lange Ruthenium-Stange -item.itemRingRuthenium.name=Ruthenium-Ring -item.itemScrewRuthenium.name=Ruthenium-Schraube -item.itemRotorRuthenium.name=Ruthenium-Rotor -item.itemGearRuthenium.name=Ruthenium-Zahnrad -item.itemIngotIodine.name=Iod-Barren -item.itemDustIodine.name=Iod-Staub -item.itemDustTinyIodine.name=Winziges Häufchen Iod-Staub -item.itemDustSmallIodine.name=Kleines Häufchen Iod-Staub -item.itemNuggetIodine.name=Iod-Nugget -item.itemPlateIodine.name=Iod-Platte -item.itemPlateDoubleIodine.name=Doppelte Iod-Platte -item.itemBoltIodine.name=Iod-Bolzen -item.itemRodIodine.name=Iod-Stange -item.itemRodLongIodine.name=Lange Iod-Stange -item.itemRingIodine.name=Iod-Ring -item.itemScrewIodine.name=Iod-Schraube -item.itemRotorIodine.name=Iod-Rotor -item.itemGearIodine.name=Iod-Zahnrad -item.itemIngotHafnium.name=Hafnium-Barren -item.itemDustHafnium.name=Hafnium-Staub -item.itemDustTinyHafnium.name=Winziges Häufchen Hafnium-Staub -item.itemDustSmallHafnium.name=Kleines Häufchen Hafnium-Staub -item.itemNuggetHafnium.name=Hafnium-Nugget -item.itemPlateHafnium.name=Hafnium-Platte -item.itemPlateDoubleHafnium.name=Doppelte Hafnium-Platte -item.itemBoltHafnium.name=Hafnium-Bolzen -item.itemRodHafnium.name=Hafnium-Stange -item.itemRodLongHafnium.name=Lange Hafnium-Stange -item.itemRingHafnium.name=Hafnium-Ring -item.itemScrewHafnium.name=Hafnium-Schraube -item.itemRotorHafnium.name=Hafnium-Rotor -item.itemGearHafnium.name=Hafnium-Zahnrad -item.itemIngotDysprosium.name=Dysprosium-Barren -item.itemDustDysprosium.name=Dysprosium-Staub -item.itemDustTinyDysprosium.name=Winziges Häufchen Dysprosium-Staub -item.itemDustSmallDysprosium.name=Kleines Häufchen Dysprosium-Staub -item.itemNuggetDysprosium.name=Dysprosium-Nugget -item.itemPlateDysprosium.name=Dysprosium-Platte -item.itemPlateDoubleDysprosium.name=Doppelte Dysprosium-Platte -item.itemBoltDysprosium.name=Dysprosium-Bolzen -item.itemRodDysprosium.name=Dysprosium-Stange -item.itemRodLongDysprosium.name=Lange Dysprosium-Stange -item.itemRingDysprosium.name=Dysprosium-Ring -item.itemScrewDysprosium.name=Dysprosium-Schraube -item.itemRotorDysprosium.name=Dysprosium-Rotor -item.itemGearDysprosium.name=Dysprosium-Zahnrad -item.itemIngotTellurium.name=Tellurium-Barren -item.itemDustTellurium.name=Tellurium-Staub -item.itemDustTinyTellurium.name=Winziges Häufchen Tellurium-Staub -item.itemDustSmallTellurium.name=Kleines Häufchen Tellurium-Staub -item.itemNuggetTellurium.name=Tellurium-Nugget -item.itemPlateTellurium.name=Tellurium-Platte -item.itemPlateDoubleTellurium.name=Doppelte Tellurium-Platte -item.itemBoltTellurium.name=Tellurium-Bolzen -item.itemRodTellurium.name=Tellurium-Stange -item.itemRodLongTellurium.name=Lange Tellurium-Stange -item.itemRingTellurium.name=Tellurium-Ring -item.itemScrewTellurium.name=Tellurium-Schraube -item.itemRotorTellurium.name=Tellurium-Rotor -item.itemGearTellurium.name=Tellurium-Zahnrad -item.itemIngotRhodium.name=Rhodium-Barren -item.itemDustRhodium.name=Rhodium-Staub -item.itemDustTinyRhodium.name=Winziges Häufchen Rhodium-Staub -item.itemDustSmallRhodium.name=Kleines Häufchen Rhodium-Staub -item.itemNuggetRhodium.name=Rhodium-Nugget -item.itemPlateRhodium.name=Rhodium-Platte -item.itemPlateDoubleRhodium.name=Doppelte Rhodium-Platte -item.itemBoltRhodium.name=Rhodium-Bolzen -item.itemRodRhodium.name=Rhodium-Stange -item.itemRodLongRhodium.name=Lange Rhodium-Stange -item.itemRingRhodium.name=Rhodium-Ring -item.itemScrewRhodium.name=Rhodium-Schraube -item.itemRotorRhodium.name=Rhodium-Rotor -item.itemGearRhodium.name=Rhodium-Zahnrad -item.itemIngotRhenium.name=Rhenium-Barren -item.itemDustRhenium.name=Rhenium-Staub -item.itemDustTinyRhenium.name=Winziges Häufchen Rhenium-Staub -item.itemDustSmallRhenium.name=Kleines Häufchen Rhenium-Staub -item.itemNuggetRhenium.name=Rhenium-Nugget -item.itemPlateRhenium.name=Rhenium-Platte -item.itemPlateDoubleRhenium.name=Doppelte Rhenium-Platte -item.itemBoltRhenium.name=Rhenium-Bolzen -item.itemRodRhenium.name=Rhenium-Stange -item.itemRodLongRhenium.name=Lange Rhenium-Stange -item.itemRingRhenium.name=Rhenium-Ring -item.itemScrewRhenium.name=Rhenium-Schraube -item.itemRotorRhenium.name=Rhenium-Rotor -item.itemGearRhenium.name=Rhenium-Zahnrad -item.itemIngotThallium.name=Thallium-Barren -item.itemDustThallium.name=Thallium-Staub -item.itemDustTinyThallium.name=Winziges Häufchen Thallium-Staub -item.itemDustSmallThallium.name=Kleines Häufchen Thallium-Staub -item.itemNuggetThallium.name=Thallium-Nugget -item.itemPlateThallium.name=Thallium-Platte -item.itemPlateDoubleThallium.name=Doppelte Thallium-Platte -item.itemBoltThallium.name=Thallium-Bolzen -item.itemRodThallium.name=Thallium-Stange -item.itemRodLongThallium.name=Lange Thallium-Stange -item.itemRingThallium.name=Thallium-Ring -item.itemScrewThallium.name=Thallium-Schraube -item.itemRotorThallium.name=Thallium-Rotor -item.itemGearThallium.name=Thallium-Zahnrad -item.itemIngotTechnetium.name=Technetium-Barren -item.itemDustTechnetium.name=Technetium-Staub -item.itemDustTinyTechnetium.name=Winziges Häufchen Technetium-Staub -item.itemDustSmallTechnetium.name=Kleines Häufchen Technetium-Staub -item.itemNuggetTechnetium.name=Technetium-Nugget -item.itemPlateTechnetium.name=Technetium-Platte -item.itemPlateDoubleTechnetium.name=Doppelte Technetium-Platte -item.itemIngotPolonium.name=Polonium-Barren -item.itemDustPolonium.name=Polonium-Staub -item.itemDustTinyPolonium.name=Winziges Häufchen Polonium-Staub -item.itemDustSmallPolonium.name=Kleines Häufchen Polonium-Staub -item.itemNuggetPolonium.name=Polonium-Nugget -item.itemPlatePolonium.name=Polonium-Platte -item.itemPlateDoublePolonium.name=Doppelte Polonium-Platte -item.itemIngotAstatine.name=Astat-Barren -item.itemDustAstatine.name=Astat-Staub -item.itemDustTinyAstatine.name=Winziges Häufchen Astat-Staub -item.itemDustSmallAstatine.name=Kleines Häufchen Astat-Staub -item.itemNuggetAstatine.name=Astat-Nugget -item.itemPlateAstatine.name=Astat-Platte -item.itemPlateDoubleAstatine.name=Doppelte Astat-Platte -item.itemIngotFrancium.name=Francium-Barren -item.itemDustFrancium.name=Francium-Staub -item.itemDustTinyFrancium.name=Winziges Häufchen Francium-Staub -item.itemDustSmallFrancium.name=Kleines Häufchen Francium-Staub -item.itemNuggetFrancium.name=Francium-Nugget -item.itemPlateFrancium.name=Francium-Platte -item.itemPlateDoubleFrancium.name=Doppelte Francium-Platte -item.itemIngotRadium.name=Radium-Barren -item.itemDustRadium.name=Radium-Staub -item.itemDustTinyRadium.name=Winziges Häufchen Radium-Staub -item.itemDustSmallRadium.name=Kleines Häufchen Radium-Staub -item.itemNuggetRadium.name=Radium-Nugget -item.itemPlateRadium.name=Radium-Platte -item.itemPlateDoubleRadium.name=Doppelte Radium-Platte -item.itemIngotActinium.name=Actinium-Barren -item.itemDustActinium.name=Actinium-Staub -item.itemDustTinyActinium.name=Winziges Häufchen Actinium-Staub -item.itemDustSmallActinium.name=Kleines Häufchen Actinium-Staub -item.itemNuggetActinium.name=Actinium-Nugget -item.itemPlateActinium.name=Actinium-Platte -item.itemPlateDoubleActinium.name=Doppelte Actinium-Platte -item.itemIngotProtactinium.name=Protactinium-Barren -item.itemDustProtactinium.name=Protactinium-Staub -item.itemDustTinyProtactinium.name=Winziges Häufchen Protactinium-Staub -item.itemDustSmallProtactinium.name=Kleines Häufchen Protactinium-Staub -item.itemNuggetProtactinium.name=Protactinium-Nugget -item.itemPlateProtactinium.name=Protactinium-Platte -item.itemPlateDoubleProtactinium.name=Doppelte Protactinium-Platte -item.itemIngotNeptunium.name=Neptunium-Barren -item.itemDustNeptunium.name=Neptunium-Staub -item.itemDustTinyNeptunium.name=Winziges Häufchen Neptunium-Staub -item.itemDustSmallNeptunium.name=Kleines Häufchen Neptunium-Staub -item.itemNuggetNeptunium.name=Neptunium-Nugget -item.itemPlateNeptunium.name=Neptunium-Platte -item.itemPlateDoubleNeptunium.name=Doppelte Neptunium-Platte -item.itemIngotCurium.name=Curium-Barren -item.itemDustCurium.name=Curium-Staub -item.itemDustTinyCurium.name=Winziges Häufchen Curium-Staub -item.itemDustSmallCurium.name=Kleines Häufchen Curium-Staub -item.itemNuggetCurium.name=Curium-Nugget -item.itemPlateCurium.name=Curium-Platte -item.itemPlateDoubleCurium.name=Doppelte Curium-Platte -item.itemIngotBerkelium.name=Berkelium-Barren -item.itemDustBerkelium.name=Berkelium-Staub -item.itemDustTinyBerkelium.name=Winziges Häufchen Berkelium-Staub -item.itemDustSmallBerkelium.name=Kleines Häufchen Berkelium-Staub -item.itemNuggetBerkelium.name=Berkelium-Nugget -item.itemPlateBerkelium.name=Berkelium-Platte -item.itemPlateDoubleBerkelium.name=Doppelte Berkelium-Platte -item.itemIngotCalifornium.name=Californium-Barren -item.itemDustCalifornium.name=Californium-Staub -item.itemDustTinyCalifornium.name=Winziges Häufchen Californium-Staub -item.itemDustSmallCalifornium.name=Kleines Häufchen Californium-Staub -item.itemNuggetCalifornium.name=Californium-Nugget -item.itemPlateCalifornium.name=Californium-Platte -item.itemPlateDoubleCalifornium.name=Doppelte Californium-Platte -item.itemIngotEinsteinium.name=Einsteinium-Barren -item.itemDustEinsteinium.name=Einsteinium-Staub -item.itemDustTinyEinsteinium.name=Winziges Häufchen Einsteinium-Staub -item.itemDustSmallEinsteinium.name=Kleines Häufchen Einsteinium-Staub -item.itemNuggetEinsteinium.name=Einsteinium-Nugget -item.itemPlateEinsteinium.name=Einsteinium-Platte -item.itemPlateDoubleEinsteinium.name=Doppelte Einsteinium-Platte -item.itemIngotFermium.name=Fermium-Barren -item.itemDustFermium.name=Fermium-Staub -item.itemDustTinyFermium.name=Winziges Häufchen Fermium-Staub -item.itemDustSmallFermium.name=Kleines Häufchen Fermium-Staub -item.itemNuggetFermium.name=Fermium-Nugget -item.itemPlateFermium.name=Fermium-Platte -item.itemPlateDoubleFermium.name=Doppelte Fermium-Platte -item.itemIngotLithium7.name=Lithium-7-Barren -item.itemDustLithium7.name=Lithium-7-Staub -item.itemDustTinyLithium7.name=Winziges Häufchen Lithium-7-Staub -item.itemDustSmallLithium7.name=Kleines Häufchen Lithium-7-Staub -item.itemNuggetLithium7.name=Lithium-7-Nugget -item.itemPlateLithium7.name=Lithium-7-Platte -item.itemPlateDoubleLithium7.name=Doppelte Lithium-7-Platte -item.itemIngotThorium232.name=Thorium-232-Barren -item.itemDustThorium232.name=Thorium-232-Staub -item.itemDustTinyThorium232.name=Winziges Häufchen Thorium-232-Staub -item.itemDustSmallThorium232.name=Kleines Häufchen Thorium-232-Staub -item.itemNuggetThorium232.name=Thorium-232-Nugget -item.itemPlateThorium232.name=Thorium-232-Platte -item.itemPlateDoubleThorium232.name=Doppelte Thorium-232-Platte -item.itemIngotUranium232.name=Uran-232-Barren -item.itemDustUranium232.name=Uran-232-Staub -item.itemDustTinyUranium232.name=Winziges Häufchen Uran-232-Staub -item.itemDustSmallUranium232.name=Kleines Häufchen Uran-232-Staub -item.itemNuggetUranium232.name=Uran-232-Nugget -item.itemPlateUranium232.name=Uran-232-Platte -item.itemRodUranium232.name=Uran-232-Stange -item.itemRodLongUranium232.name=Lange Uran-232-Stange -item.itemIngotUranium233.name=Uran-233-Barren -item.itemDustUranium233.name=Uran-233-Staub -item.itemDustTinyUranium233.name=Winziges Häufchen Uran-233-Staub -item.itemDustSmallUranium233.name=Kleines Häufchen Uran-233-Staub -item.itemNuggetUranium233.name=Uran-233-Nugget -item.itemPlateUranium233.name=Uran-233-Platte -item.itemRodUranium233.name=Uran-233-Stange -item.itemRodLongUranium233.name=Lange Uran-233-Stange -item.itemIngotPlutonium238.name=Plutonium-238-Barren -item.itemDustPlutonium238.name=Plutonium-238-Staub -item.itemDustTinyPlutonium238.name=Winziges Häufchen Plutonium-238-Staub -item.itemDustSmallPlutonium238.name=Kleines Häufchen Plutonium-238-Staub -item.itemNuggetPlutonium238.name=Plutonium-238-Nugget -item.itemPlatePlutonium238.name=Plutonium-238-Platte -item.itemPlateDoublePlutonium238.name=Doppelte Plutonium-238-Platte -item.itemIngotStrontium90.name=Strontium-90-Barren -item.itemDustStrontium90.name=Strontium-90-Staub -item.itemDustTinyStrontium90.name=Winziges Häufchen Strontium-90-Staub -item.itemDustSmallStrontium90.name=Kleines Häufchen Strontium-90-Staub -item.itemNuggetStrontium90.name=Strontium-90-Nugget -item.itemPlateStrontium90.name=Strontium-90-Platte -item.itemPlateDoubleStrontium90.name=Doppelte Strontium-90-Platte -item.itemIngotPolonium210.name=Polonium-210-Barren -item.itemDustPolonium210.name=Polonium-210-Staub -item.itemDustTinyPolonium210.name=Winziges Häufchen Polonium-210-Staub -item.itemDustSmallPolonium210.name=Kleines Häufchen Polonium-210-Staub -item.itemNuggetPolonium210.name=Polonium-210-Nugget -item.itemPlatePolonium210.name=Polonium-210-Platte -item.itemPlateDoublePolonium210.name=Doppelte Polonium-210-Platte -item.itemIngotAmericium241.name=Americium-241-Barren -item.itemDustAmericium241.name=Americium-241-Staub -item.itemDustTinyAmericium241.name=Winziges Häufchen Americium-241-Staub -item.itemDustSmallAmericium241.name=Kleines Häufchen Americium-241-Staub -item.itemNuggetAmericium241.name=Americium-241-Nugget -item.itemPlateAmericium241.name=Americium-241-Platte -item.itemPlateDoubleAmericium241.name=Doppelte Americium-241-Platte -item.itemIngotSiliconCarbide.name=Siliziumcarbid-Barren -item.itemDustSiliconCarbide.name=Siliziumcarbid-Staub -item.itemDustTinySiliconCarbide.name=Winziges Häufchen Siliziumcarbid-Staub -item.itemDustSmallSiliconCarbide.name=Kleines Häufchen Siliziumcarbid-Staub -item.itemNuggetSiliconCarbide.name=Siliziumcarbid-Nugget -item.itemPlateSiliconCarbide.name=Siliziumcarbid-Platte -item.itemPlateDoubleSiliconCarbide.name=Doppelte Siliziumcarbid-Platte -item.itemBoltSiliconCarbide.name=Siliziumcarbid-Bolzen -item.itemRodSiliconCarbide.name=Siliziumcarbid-Stange -item.itemRodLongSiliconCarbide.name=Lange Siliziumcarbid-Stange -item.itemRingSiliconCarbide.name=Siliziumcarbid-Ring -item.itemScrewSiliconCarbide.name=Siliziumcarbid-Schraube -item.itemRotorSiliconCarbide.name=Siliziumcarbid-Rotor -item.itemGearSiliconCarbide.name=Siliziumcarbid-Zahnrad -item.itemIngotZirconiumCarbide.name=Zirkoniumcarbid-Barren -item.itemHotIngotZirconiumCarbide.name=Hot Zirkoniumcarbid-Barren -item.itemDustZirconiumCarbide.name=Zirkoniumcarbid-Staub -item.itemDustTinyZirconiumCarbide.name=Winziges Häufchen Zirkoniumcarbid-Staub -item.itemDustSmallZirconiumCarbide.name=Kleines Häufchen Zirkoniumcarbid-Staub -item.itemNuggetZirconiumCarbide.name=Zirkoniumcarbid-Nugget -item.itemPlateZirconiumCarbide.name=Zirkoniumcarbid-Platte -item.itemPlateDoubleZirconiumCarbide.name=Doppelte Zirkoniumcarbid-Platte -item.itemBoltZirconiumCarbide.name=Zirkoniumcarbid-Bolzen -item.itemRodZirconiumCarbide.name=Zirkoniumcarbid-Stange -item.itemRodLongZirconiumCarbide.name=Lange Zirkoniumcarbid-Stange -item.itemRingZirconiumCarbide.name=Zirkoniumcarbid-Ring -item.itemScrewZirconiumCarbide.name=Zirkoniumcarbid-Schraube -item.itemRotorZirconiumCarbide.name=Zirkoniumcarbid-Rotor -item.itemGearZirconiumCarbide.name=Zirkoniumcarbid-Zahnrad -item.itemIngotTantalumCarbide.name=Tantalcarbid-Barren -item.itemHotIngotTantalumCarbide.name=Hot Tantalcarbid-Barren -item.itemDustTantalumCarbide.name=Tantalcarbid-Staub -item.itemDustTinyTantalumCarbide.name=Winziges Häufchen Tantalcarbid-Staub -item.itemDustSmallTantalumCarbide.name=Kleines Häufchen Tantalcarbid-Staub -item.itemNuggetTantalumCarbide.name=Tantalcarbid-Nugget -item.itemPlateTantalumCarbide.name=Tantalcarbid-Platte -item.itemPlateDoubleTantalumCarbide.name=Doppelte Tantalcarbid-Platte -item.itemBoltTantalumCarbide.name=Tantalcarbid-Bolzen -item.itemRodTantalumCarbide.name=Tantalcarbid-Stange -item.itemRodLongTantalumCarbide.name=Lange Tantalcarbid-Stange -item.itemRingTantalumCarbide.name=Tantalcarbid-Ring -item.itemScrewTantalumCarbide.name=Tantalcarbid-Schraube -item.itemRotorTantalumCarbide.name=Tantalcarbid-Rotor -item.itemGearTantalumCarbide.name=Tantalcarbid-Zahnrad -item.itemIngotNiobiumCarbide.name=Niobcarbid-Barren -item.itemHotIngotNiobiumCarbide.name=Hot Niobcarbid-Barren -item.itemDustNiobiumCarbide.name=Niobcarbid-Staub -item.itemDustTinyNiobiumCarbide.name=Winziges Häufchen Niobcarbid-Staub -item.itemDustSmallNiobiumCarbide.name=Kleines Häufchen Niobcarbid-Staub -item.itemNuggetNiobiumCarbide.name=Niobcarbid-Nugget -item.itemPlateNiobiumCarbide.name=Niobcarbid-Platte -item.itemPlateDoubleNiobiumCarbide.name=Doppelte Niobcarbid-Platte -item.itemBoltNiobiumCarbide.name=Niobcarbid-Bolzen -item.itemRodNiobiumCarbide.name=Niobcarbid-Stange -item.itemRodLongNiobiumCarbide.name=Lange Niobcarbid-Stange -item.itemRingNiobiumCarbide.name=Niobcarbid-Ring -item.itemScrewNiobiumCarbide.name=Niobcarbid-Schraube -item.itemRotorNiobiumCarbide.name=Niobcarbid-Rotor -item.itemGearNiobiumCarbide.name=Niobcarbid-Zahnrad -item.itemIngotBerylliumFluoride.name=Beryllium-Fluorid-Barren -item.itemDustBerylliumFluoride.name=Beryllium-Fluorid-Staub -item.itemDustTinyBerylliumFluoride.name=Winziges Häufchen Beryllium-Fluorid-Staub -item.itemDustSmallBerylliumFluoride.name=Kleines Häufchen Beryllium-Fluorid-Staub -item.itemNuggetBerylliumFluoride.name=Beryllium-Fluorid-Nugget -item.itemPlateBerylliumFluoride.name=Beryllium-Fluorid-Platte -item.itemPlateDoubleBerylliumFluoride.name=Doppelte Beryllium-Fluorid-Platte -item.itemIngotLithiumFluoride.name=Lithium-Fluorid-Barren -item.itemDustLithiumFluoride.name=Lithium-Fluorid-Staub -item.itemDustTinyLithiumFluoride.name=Winziges Häufchen Lithium-Fluorid-Staub -item.itemDustSmallLithiumFluoride.name=Kleines Häufchen Lithium-Fluorid-Staub -item.itemNuggetLithiumFluoride.name=Lithium-Fluorid-Nugget -item.itemPlateLithiumFluoride.name=Lithium-Fluorid-Platte -item.itemPlateDoubleLithiumFluoride.name=Doppelte Lithium-Fluorid-Platte -item.itemIngotThoriumTetrafluoride.name=Thorium-Tetrafluorid-Barren -item.itemDustThoriumTetrafluoride.name=Thorium-Tetrafluorid-Staub -item.itemDustTinyThoriumTetrafluoride.name=Winziges Häufchen Thorium-Tetrafluorid-Staub -item.itemDustSmallThoriumTetrafluoride.name=Kleines Häufchen Thorium-Tetrafluorid-Staub -item.itemNuggetThoriumTetrafluoride.name=Thorium-Tetrafluorid-Nugget -item.itemPlateThoriumTetrafluoride.name=Thorium-Tetrafluorid-Platte -item.itemPlateDoubleThoriumTetrafluoride.name=Doppelte Thorium-Tetrafluorid-Platte -item.itemIngotThoriumHexafluoride.name=Thorium-Hexafluorid-Barren -item.itemDustThoriumHexafluoride.name=Thorium-Hexafluorid-Staub -item.itemDustTinyThoriumHexafluoride.name=Winziges Häufchen Thorium-Hexafluorid-Staub -item.itemDustSmallThoriumHexafluoride.name=Kleines Häufchen Thorium-Hexafluorid-Staub -item.itemNuggetThoriumHexafluoride.name=Thorium-Hexafluorid-Nugget -item.itemPlateThoriumHexafluoride.name=Thorium-Hexafluorid-Platte -item.itemPlateDoubleThoriumHexafluoride.name=Doppelte Thorium-Hexafluorid-Platte -item.itemIngotUraniumTetrafluoride.name=Uran-Tetrafluorid-Barren -item.itemDustUraniumTetrafluoride.name=Uran-Tetrafluorid-Staub -item.itemDustTinyUraniumTetrafluoride.name=Winziges Häufchen Uran-Tetrafluorid-Staub -item.itemDustSmallUraniumTetrafluoride.name=Kleines Häufchen Uran-Tetrafluorid-Staub -item.itemNuggetUraniumTetrafluoride.name=Uran-Tetrafluorid-Nugget -item.itemPlateUraniumTetrafluoride.name=Uran-Tetrafluorid-Platte -item.itemPlateDoubleUraniumTetrafluoride.name=Doppelte Uran-Tetrafluorid-Platte -item.itemIngotUraniumHexafluoride.name=Uran-Hexafluorid-Barren -item.itemDustUraniumHexafluoride.name=Uran-Hexafluorid-Staub -item.itemDustTinyUraniumHexafluoride.name=Winziges Häufchen Uran-Hexafluorid-Staub -item.itemDustSmallUraniumHexafluoride.name=Kleines Häufchen Uran-Hexafluorid-Staub -item.itemNuggetUraniumHexafluoride.name=Uran-Hexafluorid-Nugget -item.itemPlateUraniumHexafluoride.name=Uran-Hexafluorid-Platte -item.itemPlateDoubleUraniumHexafluoride.name=Doppelte Uran-Hexafluorid-Platte -item.itemIngotZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Barren -item.itemDustZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Staub -item.itemDustTinyZirconiumTetrafluoride.name=Winziges Häufchen Zirkonium-Tetrafluorid-Staub -item.itemDustSmallZirconiumTetrafluoride.name=Kleines Häufchen Zirkonium-Tetrafluorid-Staub -item.itemNuggetZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Nugget -item.itemPlateZirconiumTetrafluoride.name=Zirkonium-Tetrafluorid-Platte -item.itemPlateDoubleZirconiumTetrafluoride.name=Doppelte Zirkonium-Tetrafluorid-Platte -item.itemIngotNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Barren -item.itemDustNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Staub -item.itemDustTinyNeptuniumHexafluoride.name=Winziges Häufchen Neptunium-Hexafluorid-Staub -item.itemDustSmallNeptuniumHexafluoride.name=Kleines Häufchen Neptunium-Hexafluorid-Staub -item.itemNuggetNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Nugget -item.itemPlateNeptuniumHexafluoride.name=Neptunium-Hexafluorid-Platte -item.itemPlateDoubleNeptuniumHexafluoride.name=Doppelte Neptunium-Hexafluorid-Platte -item.itemIngotTechnetiumHexafluoride.name=Technetium-Hexafluorid-Barren -item.itemDustTechnetiumHexafluoride.name=Technetium-Hexafluorid-Staub -item.itemDustTinyTechnetiumHexafluoride.name=Winziges Häufchen Technetium-Hexafluorid-Staub -item.itemDustSmallTechnetiumHexafluoride.name=Kleines Häufchen Technetium-Hexafluorid-Staub -item.itemNuggetTechnetiumHexafluoride.name=Technetium-Hexafluorid-Nugget -item.itemPlateTechnetiumHexafluoride.name=Technetium-Hexafluorid-Platte -item.itemPlateDoubleTechnetiumHexafluoride.name=Doppelte Technetium-Hexafluorid-Platte -item.itemIngotSeleniumHexafluoride.name=Selen-Hexafluorid-Barren -item.itemDustSeleniumHexafluoride.name=Selen-Hexafluorid-Staub -item.itemDustTinySeleniumHexafluoride.name=Winziges Häufchen Selen-Hexafluorid-Staub -item.itemDustSmallSeleniumHexafluoride.name=Kleines Häufchen Selen-Hexafluorid-Staub -item.itemNuggetSeleniumHexafluoride.name=Selen-Hexafluorid-Nugget -item.itemPlateSeleniumHexafluoride.name=Selen-Hexafluorid-Platte -item.itemPlateDoubleSeleniumHexafluoride.name=Doppelte Selen-Hexafluorid-Platte -item.itemIngotLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Barren -item.itemDustLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Staub -item.itemDustTinyLiFBeF2ZrF4U235.name=Winziges Häufchen LiFBeF2ZrF4U235-Staub -item.itemDustSmallLiFBeF2ZrF4U235.name=Kleines Häufchen LiFBeF2ZrF4U235-Staub -item.itemNuggetLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Nugget -item.itemPlateLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235-Platte -item.itemPlateDoubleLiFBeF2ZrF4U235.name=Doppelte LiFBeF2ZrF4U235-Platte -item.itemIngotLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Barren -item.itemDustLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Staub -item.itemDustTinyLiFBeF2ZrF4UF4.name=Winziges Häufchen LiFBeF2ZrF4UF4-Staub -item.itemDustSmallLiFBeF2ZrF4UF4.name=Kleines Häufchen LiFBeF2ZrF4UF4-Staub -item.itemNuggetLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Nugget -item.itemPlateLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4-Platte -item.itemPlateDoubleLiFBeF2ZrF4UF4.name=Doppelte LiFBeF2ZrF4UF4-Platte -item.itemIngotLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Barren -item.itemDustLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Staub -item.itemDustTinyLiFBeF2ThF4UF4.name=Winziges Häufchen LiFBeF2ThF4UF4-Staub -item.itemDustSmallLiFBeF2ThF4UF4.name=Kleines Häufchen LiFBeF2ThF4UF4-Staub -item.itemNuggetLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Nugget -item.itemPlateLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4-Platte -item.itemPlateDoubleLiFBeF2ThF4UF4.name=Doppelte LiFBeF2ThF4UF4-Platte -item.itemIngotEnergyCrystal.name=Energy Crystal-Barren -item.itemHotIngotEnergyCrystal.name=Hot Energy Crystal-Barren -item.itemDustEnergyCrystal.name=Energy Crystal-Staub -item.itemDustTinyEnergyCrystal.name=Winziges Häufchen Energy Crystal-Staub -item.itemDustSmallEnergyCrystal.name=Kleines Häufchen Energy Crystal-Staub -item.itemNuggetEnergyCrystal.name=Energy Crystal-Nugget -item.itemPlateEnergyCrystal.name=Energy Crystal-Platte -item.itemPlateDoubleEnergyCrystal.name=Doppelte Energy Crystal-Platte -item.itemBoltEnergyCrystal.name=Energy Crystal-Bolzen -item.itemRodEnergyCrystal.name=Energy Crystal-Stange -item.itemRodLongEnergyCrystal.name=Lange Energy Crystal-Stange -item.itemRingEnergyCrystal.name=Energy Crystal-Ring -item.itemScrewEnergyCrystal.name=Energy Crystal-Schraube -item.itemRotorEnergyCrystal.name=Energy Crystal-Rotor -item.itemGearEnergyCrystal.name=Energy Crystal-Zahnrad -item.itemIngotBloodSteel.name=Blutstahl-Barren -item.itemDustBloodSteel.name=Blutstahl-Staub -item.itemDustTinyBloodSteel.name=Winziges Häufchen Blutstahl-Staub -item.itemDustSmallBloodSteel.name=Kleines Häufchen Blutstahl-Staub -item.itemNuggetBloodSteel.name=Blutstahl-Nugget -item.itemPlateBloodSteel.name=Blutstahl-Platte -item.itemPlateDoubleBloodSteel.name=Doppelte Blutstahl-Platte -item.itemBoltBloodSteel.name=Blutstahl-Bolzen -item.itemRodBloodSteel.name=Blutstahl-Stange -item.itemRodLongBloodSteel.name=Lange Blutstahl-Stange -item.itemRingBloodSteel.name=Blutstahl-Ring -item.itemScrewBloodSteel.name=Blutstahl-Schraube -item.itemRotorBloodSteel.name=Blutstahl-Rotor -item.itemGearBloodSteel.name=Blutstahl-Zahnrad -item.itemIngotZeron100.name=Zeron-100-Barren -item.itemHotIngotZeron100.name=Hot Zeron-100-Barren -item.itemDustZeron100.name=Zeron-100-Staub -item.itemDustTinyZeron100.name=Winziges Häufchen Zeron-100-Staub -item.itemDustSmallZeron100.name=Kleines Häufchen Zeron-100-Staub -item.itemNuggetZeron100.name=Zeron-100-Nugget -item.itemPlateZeron100.name=Zeron-100-Platte -item.itemPlateDoubleZeron100.name=Doppelte Zeron-100-Platte -item.itemBoltZeron100.name=Zeron-100-Bolzen -item.itemRodZeron100.name=Zeron-100-Stange -item.itemRodLongZeron100.name=Lange Zeron-100-Stange -item.itemRingZeron100.name=Zeron-100-Ring -item.itemScrewZeron100.name=Zeron-100-Schraube -item.itemRotorZeron100.name=Zeron-100-Rotor -item.itemGearZeron100.name=Zeron-100-Zahnrad -item.itemIngotTumbaga.name=Tumbaga-Barren -item.itemDustTumbaga.name=Tumbaga-Staub -item.itemDustTinyTumbaga.name=Winziges Häufchen Tumbaga-Staub -item.itemDustSmallTumbaga.name=Kleines Häufchen Tumbaga-Staub -item.itemNuggetTumbaga.name=Tumbaga-Nugget -item.itemPlateTumbaga.name=Tumbaga-Platte -item.itemPlateDoubleTumbaga.name=Doppelte Tumbaga-Platte -item.itemBoltTumbaga.name=Tumbaga-Bolzen -item.itemRodTumbaga.name=Tumbaga-Stange -item.itemRodLongTumbaga.name=Lange Tumbaga-Stange -item.itemRingTumbaga.name=Tumbaga-Ring -item.itemScrewTumbaga.name=Tumbaga-Schraube -item.itemRotorTumbaga.name=Tumbaga-Rotor -item.itemGearTumbaga.name=Tumbaga-Zahnrad -item.itemIngotPotin.name=Potin-Barren -item.itemDustPotin.name=Potin-Staub -item.itemDustTinyPotin.name=Winziges Häufchen Potin-Staub -item.itemDustSmallPotin.name=Kleines Häufchen Potin-Staub -item.itemNuggetPotin.name=Potin-Nugget -item.itemPlatePotin.name=Potin-Platte -item.itemPlateDoublePotin.name=Doppelte Potin-Platte -item.itemBoltPotin.name=Potin-Bolzen -item.itemRodPotin.name=Potin-Stange -item.itemRodLongPotin.name=Lange Potin-Stange -item.itemRingPotin.name=Potin-Ring -item.itemScrewPotin.name=Potin-Schraube -item.itemRotorPotin.name=Potin-Rotor -item.itemGearPotin.name=Potin-Zahnrad -item.itemIngotStaballoy.name=Staballoy-Barren -item.itemHotIngotStaballoy.name=Hot Staballoy-Barren -item.itemDustStaballoy.name=Staballoy-Staub -item.itemDustTinyStaballoy.name=Winziges Häufchen Staballoy-Staub -item.itemDustSmallStaballoy.name=Kleines Häufchen Staballoy-Staub -item.itemNuggetStaballoy.name=Staballoy-Nugget -item.itemPlateStaballoy.name=Staballoy-Platte -item.itemPlateDoubleStaballoy.name=Doppelte Staballoy-Platte -item.itemBoltStaballoy.name=Staballoy-Bolzen -item.itemRodStaballoy.name=Staballoy-Stange -item.itemRodLongStaballoy.name=Lange Staballoy-Stange -item.itemRingStaballoy.name=Staballoy-Ring -item.itemScrewStaballoy.name=Staballoy-Schraube -item.itemRotorStaballoy.name=Staballoy-Rotor -item.itemGearStaballoy.name=Staballoy-Zahnrad -item.itemIngotTantalloy60.name=Tantalloy-60-Barren -item.itemHotIngotTantalloy60.name=Hot Tantalloy-60-Barren -item.itemDustTantalloy60.name=Tantalloy-60-Staub -item.itemDustTinyTantalloy60.name=Winziges Häufchen Tantalloy-60-Staub -item.itemDustSmallTantalloy60.name=Kleines Häufchen Tantalloy-60-Staub -item.itemNuggetTantalloy60.name=Tantalloy-60-Nugget -item.itemPlateTantalloy60.name=Tantalloy-60-Platte -item.itemPlateDoubleTantalloy60.name=Doppelte Tantalloy-60-Platte -item.itemBoltTantalloy60.name=Tantalloy-60-Bolzen -item.itemRodTantalloy60.name=Tantalloy-60-Stange -item.itemRodLongTantalloy60.name=Lange Tantalloy-60-Stange -item.itemRingTantalloy60.name=Tantalloy-60-Ring -item.itemScrewTantalloy60.name=Tantalloy-60-Schraube -item.itemRotorTantalloy60.name=Tantalloy-60-Rotor -item.itemGearTantalloy60.name=Tantalloy-60-Zahnrad -item.itemIngotTantalloy61.name=Tantalloy-61-Barren -item.itemHotIngotTantalloy61.name=Hot Tantalloy-61-Barren -item.itemDustTantalloy61.name=Tantalloy-61-Staub -item.itemDustTinyTantalloy61.name=Winziges Häufchen Tantalloy-61-Staub -item.itemDustSmallTantalloy61.name=Kleines Häufchen Tantalloy-61-Staub -item.itemNuggetTantalloy61.name=Tantalloy-61-Nugget -item.itemPlateTantalloy61.name=Tantalloy-61-Platte -item.itemPlateDoubleTantalloy61.name=Doppelte Tantalloy-61-Platte -item.itemBoltTantalloy61.name=Tantalloy-61-Bolzen -item.itemRodTantalloy61.name=Tantalloy-61-Stange -item.itemRodLongTantalloy61.name=Lange Tantalloy-61-Stange -item.itemRingTantalloy61.name=Tantalloy-61-Ring -item.itemScrewTantalloy61.name=Tantalloy-61-Schraube -item.itemRotorTantalloy61.name=Tantalloy-61-Rotor -item.itemGearTantalloy61.name=Tantalloy-61-Zahnrad -item.itemIngotInconel625.name=Inconel-625-Barren -item.itemHotIngotInconel625.name=Hot Inconel-625-Barren -item.itemDustInconel625.name=Inconel-625-Staub -item.itemDustTinyInconel625.name=Winziges Häufchen Inconel-625-Staub -item.itemDustSmallInconel625.name=Kleines Häufchen Inconel-625-Staub -item.itemNuggetInconel625.name=Inconel-625-Nugget -item.itemPlateInconel625.name=Inconel-625-Platte -item.itemPlateDoubleInconel625.name=Doppelte Inconel-625-Platte -item.itemBoltInconel625.name=Inconel-625-Bolzen -item.itemRodInconel625.name=Inconel-625-Stange -item.itemRodLongInconel625.name=Lange Inconel-625-Stange -item.itemRingInconel625.name=Inconel-625-Ring -item.itemScrewInconel625.name=Inconel-625-Schraube -item.itemRotorInconel625.name=Inconel-625-Rotor -item.itemGearInconel625.name=Inconel-625-Zahnrad -item.itemIngotInconel690.name=Inconel-690-Barren -item.itemHotIngotInconel690.name=Hot Inconel-690-Barren -item.itemDustInconel690.name=Inconel-690-Staub -item.itemDustTinyInconel690.name=Winziges Häufchen Inconel-690-Staub -item.itemDustSmallInconel690.name=Kleines Häufchen Inconel-690-Staub -item.itemNuggetInconel690.name=Inconel-690-Nugget -item.itemPlateInconel690.name=Inconel-690-Platte -item.itemPlateDoubleInconel690.name=Doppelte Inconel-690-Platte -item.itemBoltInconel690.name=Inconel-690-Bolzen -item.itemRodInconel690.name=Inconel-690-Stange -item.itemRodLongInconel690.name=Lange Inconel-690-Stange -item.itemRingInconel690.name=Inconel-690-Ring -item.itemScrewInconel690.name=Inconel-690-Schraube -item.itemRotorInconel690.name=Inconel-690-Rotor -item.itemGearInconel690.name=Inconel-690-Zahnrad -item.itemIngotInconel792.name=Inconel-792-Barren -item.itemHotIngotInconel792.name=Hot Inconel-792-Barren -item.itemDustInconel792.name=Inconel-792-Staub -item.itemDustTinyInconel792.name=Winziges Häufchen Inconel-792-Staub -item.itemDustSmallInconel792.name=Kleines Häufchen Inconel-792-Staub -item.itemNuggetInconel792.name=Inconel-792-Nugget -item.itemPlateInconel792.name=Inconel-792-Platte -item.itemPlateDoubleInconel792.name=Doppelte Inconel-792-Platte -item.itemBoltInconel792.name=Inconel-792-Bolzen -item.itemRodInconel792.name=Inconel-792-Stange -item.itemRodLongInconel792.name=Lange Inconel-792-Stange -item.itemRingInconel792.name=Inconel-792-Ring -item.itemScrewInconel792.name=Inconel-792-Schraube -item.itemRotorInconel792.name=Inconel-792-Rotor -item.itemGearInconel792.name=Inconel-792-Zahnrad -item.itemDustEglinSteelBaseCompound.name=Eglin-Stahl Base Compound-Staub -item.itemDustTinyEglinSteelBaseCompound.name=Winziges Häufchen Eglin-Stahl Base Compound-Staub -item.itemDustSmallEglinSteelBaseCompound.name=Kleines Häufchen Eglin-Stahl Base Compound-Staub -item.itemIngotEglinSteel.name=Eglin-Stahl-Barren -item.itemDustEglinSteel.name=Eglin-Stahl-Staub -item.itemDustTinyEglinSteel.name=Winziges Häufchen Eglin-Stahl-Staub -item.itemDustSmallEglinSteel.name=Kleines Häufchen Eglin-Stahl-Staub -item.itemNuggetEglinSteel.name=Eglin-Stahl-Nugget -item.itemPlateEglinSteel.name=Eglin-Stahl-Platte -item.itemPlateDoubleEglinSteel.name=Doppelte Eglin-Stahl-Platte -item.itemBoltEglinSteel.name=Eglin-Stahl-Bolzen -item.itemRodEglinSteel.name=Eglin-Stahl-Stange -item.itemRodLongEglinSteel.name=Lange Eglin-Stahl-Stange -item.itemRingEglinSteel.name=Eglin-Stahl-Ring -item.itemScrewEglinSteel.name=Eglin-Stahl-Schraube -item.itemRotorEglinSteel.name=Eglin-Stahl-Rotor -item.itemGearEglinSteel.name=Eglin-Stahl-Zahnrad -item.itemIngotMaragingSteel250.name=Maraging-Stahl-250-Barren -item.itemHotIngotMaragingSteel250.name=Hot Maraging-Stahl-250-Barren -item.itemDustMaragingSteel250.name=Maraging-Stahl-250-Staub -item.itemDustTinyMaragingSteel250.name=Winziges Häufchen Maraging-Stahl-250-Staub -item.itemDustSmallMaragingSteel250.name=Kleines Häufchen Maraging-Stahl-250-Staub -item.itemNuggetMaragingSteel250.name=Maraging-Stahl-250-Nugget -item.itemPlateMaragingSteel250.name=Maraging-Stahl-250-Platte -item.itemPlateDoubleMaragingSteel250.name=Doppelte Maraging-Stahl-250-Platte -item.itemBoltMaragingSteel250.name=Maraging-Stahl-250-Bolzen -item.itemRodMaragingSteel250.name=Maraging-Stahl-250-Stange -item.itemRodLongMaragingSteel250.name=Lange Maraging-Stahl-250-Stange -item.itemRingMaragingSteel250.name=Maraging-Stahl-250-Ring -item.itemScrewMaragingSteel250.name=Maraging-Stahl-250-Schraube -item.itemRotorMaragingSteel250.name=Maraging-Stahl-250-Rotor -item.itemGearMaragingSteel250.name=Maraging-Stahl-250-Zahnrad -item.itemIngotMaragingSteel300.name=Maraging-Stahl-300-Barren -item.itemHotIngotMaragingSteel300.name=Hot Maraging-Stahl-300-Barren -item.itemDustMaragingSteel300.name=Maraging-Stahl-300-Staub -item.itemDustTinyMaragingSteel300.name=Winziges Häufchen Maraging-Stahl-300-Staub -item.itemDustSmallMaragingSteel300.name=Kleines Häufchen Maraging-Stahl-300-Staub -item.itemNuggetMaragingSteel300.name=Maraging-Stahl-300-Nugget -item.itemPlateMaragingSteel300.name=Maraging-Stahl-300-Platte -item.itemPlateDoubleMaragingSteel300.name=Doppelte Maraging-Stahl-300-Platte -item.itemBoltMaragingSteel300.name=Maraging-Stahl-300-Bolzen -item.itemRodMaragingSteel300.name=Maraging-Stahl-300-Stange -item.itemRodLongMaragingSteel300.name=Lange Maraging-Stahl-300-Stange -item.itemRingMaragingSteel300.name=Maraging-Stahl-300-Ring -item.itemScrewMaragingSteel300.name=Maraging-Stahl-300-Schraube -item.itemRotorMaragingSteel300.name=Maraging-Stahl-300-Rotor -item.itemGearMaragingSteel300.name=Maraging-Stahl-300-Zahnrad -item.itemIngotMaragingSteel350.name=Maraging-Stahl-350-Barren -item.itemHotIngotMaragingSteel350.name=Hot Maraging-Stahl-350-Barren -item.itemDustMaragingSteel350.name=Maraging-Stahl-350-Staub -item.itemDustTinyMaragingSteel350.name=Winziges Häufchen Maraging-Stahl-350-Staub -item.itemDustSmallMaragingSteel350.name=Kleines Häufchen Maraging-Stahl-350-Staub -item.itemNuggetMaragingSteel350.name=Maraging-Stahl-350-Nugget -item.itemPlateMaragingSteel350.name=Maraging-Stahl-350-Platte -item.itemPlateDoubleMaragingSteel350.name=Doppelte Maraging-Stahl-350-Platte -item.itemBoltMaragingSteel350.name=Maraging-Stahl-350-Bolzen -item.itemRodMaragingSteel350.name=Maraging-Stahl-350-Stange -item.itemRodLongMaragingSteel350.name=Lange Maraging-Stahl-350-Stange -item.itemRingMaragingSteel350.name=Maraging-Stahl-350-Ring -item.itemScrewMaragingSteel350.name=Maraging-Stahl-350-Schraube -item.itemRotorMaragingSteel350.name=Maraging-Stahl-350-Rotor -item.itemGearMaragingSteel350.name=Maraging-Stahl-350-Zahnrad -item.itemIngotStellite.name=Stellite-Barren -item.itemHotIngotStellite.name=Hot Stellite-Barren -item.itemDustStellite.name=Stellite-Staub -item.itemDustTinyStellite.name=Winziges Häufchen Stellite-Staub -item.itemDustSmallStellite.name=Kleines Häufchen Stellite-Staub -item.itemNuggetStellite.name=Stellite-Nugget -item.itemPlateStellite.name=Stellite-Platte -item.itemPlateDoubleStellite.name=Doppelte Stellite-Platte -item.itemBoltStellite.name=Stellite-Bolzen -item.itemRodStellite.name=Stellite-Stange -item.itemRodLongStellite.name=Lange Stellite-Stange -item.itemRingStellite.name=Stellite-Ring -item.itemScrewStellite.name=Stellite-Schraube -item.itemRotorStellite.name=Stellite-Rotor -item.itemGearStellite.name=Stellite-Zahnrad -item.itemIngotTalonite.name=Talonite-Barren -item.itemDustTalonite.name=Talonite-Staub -item.itemDustTinyTalonite.name=Winziges Häufchen Talonite-Staub -item.itemDustSmallTalonite.name=Kleines Häufchen Talonite-Staub -item.itemNuggetTalonite.name=Talonite-Nugget -item.itemPlateTalonite.name=Talonite-Platte -item.itemPlateDoubleTalonite.name=Doppelte Talonite-Platte -item.itemBoltTalonite.name=Talonite-Bolzen -item.itemRodTalonite.name=Talonite-Stange -item.itemRodLongTalonite.name=Lange Talonite-Stange -item.itemRingTalonite.name=Talonite-Ring -item.itemScrewTalonite.name=Talonite-Schraube -item.itemRotorTalonite.name=Talonite-Rotor -item.itemGearTalonite.name=Talonite-Zahnrad -item.itemIngotHastelloyW.name=Hastelloy-W-Barren -item.itemDustHastelloyW.name=Hastelloy-W-Staub -item.itemDustTinyHastelloyW.name=Winziges Häufchen Hastelloy-W-Staub -item.itemDustSmallHastelloyW.name=Kleines Häufchen Hastelloy-W-Staub -item.itemNuggetHastelloyW.name=Hastelloy-W-Nugget -item.itemPlateHastelloyW.name=Hastelloy-W-Platte -item.itemPlateDoubleHastelloyW.name=Doppelte Hastelloy-W-Platte -item.itemBoltHastelloyW.name=Hastelloy-W-Bolzen -item.itemRodHastelloyW.name=Hastelloy-W-Stange -item.itemRodLongHastelloyW.name=Lange Hastelloy-W-Stange -item.itemRingHastelloyW.name=Hastelloy-W-Ring -item.itemScrewHastelloyW.name=Hastelloy-W-Schraube -item.itemRotorHastelloyW.name=Hastelloy-W-Rotor -item.itemGearHastelloyW.name=Hastelloy-W-Zahnrad -item.itemIngotHastelloyX.name=Hastelloy-X-Barren -item.itemDustHastelloyX.name=Hastelloy-X-Staub -item.itemDustTinyHastelloyX.name=Winziges Häufchen Hastelloy-X-Staub -item.itemDustSmallHastelloyX.name=Kleines Häufchen Hastelloy-X-Staub -item.itemNuggetHastelloyX.name=Hastelloy-X-Nugget -item.itemPlateHastelloyX.name=Hastelloy-X-Platte -item.itemPlateDoubleHastelloyX.name=Doppelte Hastelloy-X-Platte -item.itemBoltHastelloyX.name=Hastelloy-X-Bolzen -item.itemRodHastelloyX.name=Hastelloy-X-Stange -item.itemRodLongHastelloyX.name=Lange Hastelloy-X-Stange -item.itemRingHastelloyX.name=Hastelloy-X-Ring -item.itemScrewHastelloyX.name=Hastelloy-X-Schraube -item.itemRotorHastelloyX.name=Hastelloy-X-Rotor -item.itemGearHastelloyX.name=Hastelloy-X-Zahnrad -item.itemIngotHastelloyC276.name=Hastelloy-C276-Barren -item.itemHotIngotHastelloyC276.name=Hot Hastelloy-C276-Barren -item.itemDustHastelloyC276.name=Hastelloy-C276-Staub -item.itemDustTinyHastelloyC276.name=Winziges Häufchen Hastelloy-C276-Staub -item.itemDustSmallHastelloyC276.name=Kleines Häufchen Hastelloy-C276-Staub -item.itemNuggetHastelloyC276.name=Hastelloy-C276-Nugget -item.itemPlateHastelloyC276.name=Hastelloy-C276-Platte -item.itemPlateDoubleHastelloyC276.name=Doppelte Hastelloy-C276-Platte -item.itemBoltHastelloyC276.name=Hastelloy-C276-Bolzen -item.itemRodHastelloyC276.name=Hastelloy-C276-Stange -item.itemRodLongHastelloyC276.name=Lange Hastelloy-C276-Stange -item.itemRingHastelloyC276.name=Hastelloy-C276-Ring -item.itemScrewHastelloyC276.name=Hastelloy-C276-Schraube -item.itemRotorHastelloyC276.name=Hastelloy-C276-Rotor -item.itemGearHastelloyC276.name=Hastelloy-C276-Zahnrad -item.itemIngotHastelloyN.name=Hastelloy-N-Barren -item.itemHotIngotHastelloyN.name=Hot Hastelloy-N-Barren -item.itemDustHastelloyN.name=Hastelloy-N-Staub -item.itemDustTinyHastelloyN.name=Winziges Häufchen Hastelloy-N-Staub -item.itemDustSmallHastelloyN.name=Kleines Häufchen Hastelloy-N-Staub -item.itemNuggetHastelloyN.name=Hastelloy-N-Nugget -item.itemPlateHastelloyN.name=Hastelloy-N-Platte -item.itemPlateDoubleHastelloyN.name=Doppelte Hastelloy-N-Platte -item.itemBoltHastelloyN.name=Hastelloy-N-Bolzen -item.itemRodHastelloyN.name=Hastelloy-N-Stange -item.itemRodLongHastelloyN.name=Lange Hastelloy-N-Stange -item.itemRingHastelloyN.name=Hastelloy-N-Ring -item.itemScrewHastelloyN.name=Hastelloy-N-Schraube -item.itemRotorHastelloyN.name=Hastelloy-N-Rotor -item.itemGearHastelloyN.name=Hastelloy-N-Zahnrad -item.itemIngotIncoloy020.name=Incoloy-020-Barren -item.itemDustIncoloy020.name=Incoloy-020-Staub -item.itemDustTinyIncoloy020.name=Winziges Häufchen Incoloy-020-Staub -item.itemDustSmallIncoloy020.name=Kleines Häufchen Incoloy-020-Staub -item.itemNuggetIncoloy020.name=Incoloy-020-Nugget -item.itemPlateIncoloy020.name=Incoloy-020-Platte -item.itemPlateDoubleIncoloy020.name=Doppelte Incoloy-020-Platte -item.itemBoltIncoloy020.name=Incoloy-020-Bolzen -item.itemRodIncoloy020.name=Incoloy-020-Stange -item.itemRodLongIncoloy020.name=Lange Incoloy-020-Stange -item.itemRingIncoloy020.name=Incoloy-020-Ring -item.itemScrewIncoloy020.name=Incoloy-020-Schraube -item.itemRotorIncoloy020.name=Incoloy-020-Rotor -item.itemGearIncoloy020.name=Incoloy-020-Zahnrad -item.itemIngotIncoloyDS.name=Incoloy-DS-Barren -item.itemDustIncoloyDS.name=Incoloy-DS-Staub -item.itemDustTinyIncoloyDS.name=Winziges Häufchen Incoloy-DS-Staub -item.itemDustSmallIncoloyDS.name=Kleines Häufchen Incoloy-DS-Staub -item.itemNuggetIncoloyDS.name=Incoloy-DS-Nugget -item.itemPlateIncoloyDS.name=Incoloy-DS-Platte -item.itemPlateDoubleIncoloyDS.name=Doppelte Incoloy-DS-Platte -item.itemBoltIncoloyDS.name=Incoloy-DS-Bolzen -item.itemRodIncoloyDS.name=Incoloy-DS-Stange -item.itemRodLongIncoloyDS.name=Lange Incoloy-DS-Stange -item.itemRingIncoloyDS.name=Incoloy-DS-Ring -item.itemScrewIncoloyDS.name=Incoloy-DS-Schraube -item.itemRotorIncoloyDS.name=Incoloy-DS-Rotor -item.itemGearIncoloyDS.name=Incoloy-DS-Zahnrad -item.itemIngotIncoloyMA956.name=Incoloy-MA956-Barren -item.itemHotIngotIncoloyMA956.name=Hot Incoloy-MA956-Barren -item.itemDustIncoloyMA956.name=Incoloy-MA956-Staub -item.itemDustTinyIncoloyMA956.name=Winziges Häufchen Incoloy-MA956-Staub -item.itemDustSmallIncoloyMA956.name=Kleines Häufchen Incoloy-MA956-Staub -item.itemNuggetIncoloyMA956.name=Incoloy-MA956-Nugget -item.itemPlateIncoloyMA956.name=Incoloy-MA956-Platte -item.itemPlateDoubleIncoloyMA956.name=Doppelte Incoloy-MA956-Platte -item.itemBoltIncoloyMA956.name=Incoloy-MA956-Bolzen -item.itemRodIncoloyMA956.name=Incoloy-MA956-Stange -item.itemRodLongIncoloyMA956.name=Lange Incoloy-MA956-Stange -item.itemRingIncoloyMA956.name=Incoloy-MA956-Ring -item.itemScrewIncoloyMA956.name=Incoloy-MA956-Schraube -item.itemRotorIncoloyMA956.name=Incoloy-MA956-Rotor -item.itemGearIncoloyMA956.name=Incoloy-MA956-Zahnrad -item.itemIngotGrisium.name=Grisium-Barren -item.itemHotIngotGrisium.name=Hot Grisium-Barren -item.itemDustGrisium.name=Grisium-Staub -item.itemDustTinyGrisium.name=Winziges Häufchen Grisium-Staub -item.itemDustSmallGrisium.name=Kleines Häufchen Grisium-Staub -item.itemNuggetGrisium.name=Grisium-Nugget -item.itemPlateGrisium.name=Grisium-Platte -item.itemPlateDoubleGrisium.name=Doppelte Grisium-Platte -item.itemBoltGrisium.name=Grisium-Bolzen -item.itemRodGrisium.name=Grisium-Stange -item.itemRodLongGrisium.name=Lange Grisium-Stange -item.itemRingGrisium.name=Grisium-Ring -item.itemScrewGrisium.name=Grisium-Schraube -item.itemRotorGrisium.name=Grisium-Rotor -item.itemGearGrisium.name=Grisium-Zahnrad -item.itemIngotHG1223.name=HG-1223-Barren -item.itemDustHG1223.name=HG-1223-Staub -item.itemDustTinyHG1223.name=Winziges Häufchen HG-1223-Staub -item.itemDustSmallHG1223.name=Kleines Häufchen HG-1223-Staub -item.itemNuggetHG1223.name=HG-1223-Nugget -item.itemPlateHG1223.name=HG-1223-Platte -item.itemPlateDoubleHG1223.name=Doppelte HG-1223-Platte -item.itemIngotTrinium.name=Trinium-Barren -item.itemDustTrinium.name=Trinium-Staub -item.itemDustTinyTrinium.name=Winziges Häufchen Trinium-Staub -item.itemDustSmallTrinium.name=Kleines Häufchen Trinium-Staub -item.itemNuggetTrinium.name=Trinium-Nugget -item.itemPlateTrinium.name=Trinium-Platte -item.itemPlateDoubleTrinium.name=Doppelte Trinium-Platte -item.itemIngotRefinedTrinium.name=Raffinierter Trinium-Barren -item.itemDustRefinedTrinium.name=Raffinierter Trinium-Staub -item.itemDustTinyRefinedTrinium.name=Winziges Häufchen raffinierter Trinium-Staub -item.itemDustSmallRefinedTrinium.name=Kleines Häufchen raffinierter Trinium-Staub -item.itemNuggetRefinedTrinium.name=Raffinierter Trinium-Nugget -item.itemPlateRefinedTrinium.name=Raffinierte Trinium-Platte -item.itemPlateDoubleRefinedTrinium.name=Doppelte raffinierte Trinium-Platte -item.itemIngotTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Barren -item.itemHotIngotTriniumTitaniumAlloy.name=Hot Trinium-Titanium-Legierung-Barren -item.itemDustTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Staub -item.itemDustTinyTriniumTitaniumAlloy.name=Winziges Häufchen Trinium-Titanium-Legierung-Staub -item.itemDustSmallTriniumTitaniumAlloy.name=Kleines Häufchen Trinium-Titanium-Legierung-Staub -item.itemNuggetTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Nugget -item.itemPlateTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Platte -item.itemPlateDoubleTriniumTitaniumAlloy.name=Doppelte Trinium-Titanium-Legierung-Platte -item.itemBoltTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Bolzen -item.itemRodTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Stange -item.itemRodLongTriniumTitaniumAlloy.name=Lange Trinium-Titanium-Legierung-Stange -item.itemRingTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Ring -item.itemScrewTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Schraube -item.itemRotorTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Rotor -item.itemGearTriniumTitaniumAlloy.name=Trinium-Titanium-Legierung-Zahnrad -item.itemIngotTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Barren -item.itemDustTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Staub -item.itemDustTinyTriniumNaquadahAlloy.name=Winziges Häufchen Trinium-Naquadah-Legierung-Staub -item.itemDustSmallTriniumNaquadahAlloy.name=Kleines Häufchen Trinium-Naquadah-Legierung-Staub -item.itemNuggetTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Nugget -item.itemPlateTriniumNaquadahAlloy.name=Trinium-Naquadah-Legierung-Platte -item.itemPlateDoubleTriniumNaquadahAlloy.name=Doppelte Trinium-Naquadah-Legierung-Platte -item.itemIngotTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Barren -item.itemHotIngotTriniumNaquadahCarbonite.name=Hot Trinium-Naquadah-Carbonit-Barren -item.itemDustTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Staub -item.itemDustTinyTriniumNaquadahCarbonite.name=Winziges Häufchen Trinium-Naquadah-Carbonit-Staub -item.itemDustSmallTriniumNaquadahCarbonite.name=Kleines Häufchen Trinium-Naquadah-Carbonit-Staub -item.itemNuggetTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Nugget -item.itemPlateTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Platte -item.itemPlateDoubleTriniumNaquadahCarbonite.name=Doppelte Trinium-Naquadah-Carbonit-Platte -item.itemBoltTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Bolzen -item.itemRodTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Stange -item.itemRodLongTriniumNaquadahCarbonite.name=Lange Trinium-Naquadah-Carbonit-Stange -item.itemRingTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Ring -item.itemScrewTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Schraube -item.itemRotorTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Rotor -item.itemGearTriniumNaquadahCarbonite.name=Trinium-Naquadah-Carbonit-Zahnrad -item.itemIngotQuantum.name=Quanten-Barren -item.itemHotIngotQuantum.name=Hot Quanten-Barren -item.itemDustQuantum.name=Quanten-Staub -item.itemDustTinyQuantum.name=Winziges Häufchen Quanten-Staub -item.itemDustSmallQuantum.name=Kleines Häufchen Quanten-Staub -item.itemNuggetQuantum.name=Quanten-Nugget -item.itemPlateQuantum.name=Quanten-Platte -item.itemPlateDoubleQuantum.name=Doppelte Quanten-Platte -item.itemBoltQuantum.name=Quanten-Bolzen -item.itemRodQuantum.name=Quanten-Stange -item.itemRodLongQuantum.name=Lange Quanten-Stange -item.itemRingQuantum.name=Quanten-Ring -item.itemScrewQuantum.name=Quanten-Schraube -item.itemRotorQuantum.name=Quanten-Rotor -item.itemGearQuantum.name=Quanten-Zahnrad -item.itemDustFluorite.name=Fluorit-Staub -item.itemDustTinyFluorite.name=Winziges Häufchen Fluorit-Staub -item.itemDustSmallFluorite.name=Kleines Häufchen Fluorit-Staub -item.crushedFluorite.name=Zerkleinertes Fluorit-Erz -item.crushedCentrifugedFluorite.name=Zentrifugiertes zerkleinertes Fluorit-Erz -item.crushedPurifiedFluorite.name=Gereinigtes zerkleinertes Fluorit-Erz -item.dustImpureFluorite.name=Ungereinigtes Fluorit-Staub -item.dustPureFluorite.name=Gereinigtes Fluorit-Staub -item.itemDustCrocoite.name=Crocoit-Staub -item.itemDustTinyCrocoite.name=Winziges Häufchen Crocoit-Staub -item.itemDustSmallCrocoite.name=Kleines Häufchen Crocoit-Staub -item.crushedCrocoite.name=Zerkleinertes Crocoit-Erz -item.crushedCentrifugedCrocoite.name=Zentrifugiertes zerkleinertes Crocoit-Erz -item.crushedPurifiedCrocoite.name=Gereinigtes zerkleinertes Crocoit-Erz -item.dustImpureCrocoite.name=Ungereinigtes Crocoit-Staub -item.dustPureCrocoite.name=Gereinigtes Crocoit-Staub -item.itemDustGeikielite.name=Geikielite-Staub -item.itemDustTinyGeikielite.name=Winziges Häufchen Geikielite-Staub -item.itemDustSmallGeikielite.name=Kleines Häufchen Geikielite-Staub -item.crushedGeikielite.name=Zerkleinertes Geikielite-Erz -item.crushedCentrifugedGeikielite.name=Zentrifugiertes zerkleinertes Geikielite-Erz -item.crushedPurifiedGeikielite.name=Gereinigtes zerkleinertes Geikielite-Erz -item.dustImpureGeikielite.name=Ungereinigtes Geikielite-Staub -item.dustPureGeikielite.name=Gereinigtes Geikielite-Staub -item.itemDustNichromite.name=Nichromit-Staub -item.itemDustTinyNichromite.name=Winziges Häufchen Nichromit-Staub -item.itemDustSmallNichromite.name=Kleines Häufchen Nichromit-Staub -item.crushedNichromite.name=Zerkleinertes Nichromit-Erz -item.crushedCentrifugedNichromite.name=Zentrifugiertes zerkleinertes Nichromit-Erz -item.crushedPurifiedNichromite.name=Gereinigtes zerkleinertes Nichromit-Erz -item.dustImpureNichromite.name=Ungereinigtes Nichromit-Staub -item.dustPureNichromite.name=Gereinigtes Nichromit-Staub -item.itemDustTitanite.name=Titanit-Staub -item.itemDustTinyTitanite.name=Winziges Häufchen Titanit-Staub -item.itemDustSmallTitanite.name=Kleines Häufchen Titanit-Staub -item.crushedTitanite.name=Zerkleinertes Titanit-Erz -item.crushedCentrifugedTitanite.name=Zentrifugiertes zerkleinertes Titanit-Erz -item.crushedPurifiedTitanite.name=Gereinigtes zerkleinertes Titanit-Erz -item.dustImpureTitanite.name=Ungereinigtes Titanit-Staub -item.dustPureTitanite.name=Gereinigtes Titanit-Staub -item.itemDustZimbabweite.name=Zimbabweit-Staub -item.itemDustTinyZimbabweite.name=Winziges Häufchen Zimbabweit-Staub -item.itemDustSmallZimbabweite.name=Kleines Häufchen Zimbabweit-Staub -item.crushedZimbabweite.name=Zerkleinertes Zimbabweit-Erz -item.crushedCentrifugedZimbabweite.name=Zentrifugiertes zerkleinertes Zimbabweit-Erz -item.crushedPurifiedZimbabweite.name=Gereinigtes zerkleinertes Zimbabweit-Erz -item.dustImpureZimbabweite.name=Ungereinigtes Zimbabweit-Staub -item.dustPureZimbabweite.name=Gereinigtes Zimbabweit-Staub -item.itemDustZirconolite.name=Zirkonolit-Staub -item.itemDustTinyZirconolite.name=Winziges Häufchen Zirkonolit-Staub -item.itemDustSmallZirconolite.name=Kleines Häufchen Zirkonolit-Staub -item.crushedZirconolite.name=Zerkleinertes Zirkonolit-Erz -item.crushedCentrifugedZirconolite.name=Zentrifugiertes zerkleinertes Zirkonolit-Erz -item.crushedPurifiedZirconolite.name=Gereinigtes zerkleinertes Zirkonolit-Erz -item.dustImpureZirconolite.name=Ungereinigter Zirkonolit-Staub -item.dustPureZirconolite.name=Gereinigter Zirkonolit-Staub -item.itemDustGadoliniteCe.name=Gadolinit(Ce)-Staub -item.itemDustTinyGadoliniteCe.name=Winziges Häufchen Gadolinit(Ce)-Staub -item.itemDustSmallGadoliniteCe.name=Kleines Häufchen Gadolinit(Ce)-Staub -item.crushedGadoliniteCe.name=Zerkleinertes Gadolinit(Ce)-Erz -item.crushedCentrifugedGadoliniteCe.name=Zentrifugiertes zerkleinertes Gadolinit(Ce)-Erz -item.crushedPurifiedGadoliniteCe.name=Gereinigtes zerkleinertes Gadolinit(Ce)-Erz -item.dustImpureGadoliniteCe.name=Ungereinigter Gadolinit(Ce)-Staub -item.dustPureGadoliniteCe.name=Gereinigter Gadolinit(Ce)-Staub -item.itemDustGadoliniteY.name=Gadolinit(Y)-Staub -item.itemDustTinyGadoliniteY.name=Winziges Häufchen Gadolinit(Y)-Staub -item.itemDustSmallGadoliniteY.name=Kleines Häufchen Gadolinit(Y)-Staub -item.crushedGadoliniteY.name=Zerkleinertes Gadolinit(Y)-Erz -item.crushedCentrifugedGadoliniteY.name=Zentrifugiertes zerkleinertes Gadolinit(Y)-Erz -item.crushedPurifiedGadoliniteY.name=Gereinigtes zerkleinertes Gadolinit(Y)-Erz -item.dustImpureGadoliniteY.name=Ungereinigter Gadolinit(Y)-Staub -item.dustPureGadoliniteY.name=Gereinigter Gadolinit(Y)-Staub -item.itemDustLepersonnite.name=Lepersonnit-Staub -item.itemDustTinyLepersonnite.name=Winziges Häufchen Lepersonnite-Staub -item.itemDustSmallLepersonnite.name=Kleines Häufchen Lepersonnite-Staub -item.crushedLepersonnite.name=Zerkleinertes Lepersonnite-Erz -item.crushedCentrifugedLepersonnite.name=Zentrifugiertes zerkleinertes Lepersonnite-Erz -item.crushedPurifiedLepersonnite.name=Gereinigtes zerkleinertes Lepersonnite-Erz -item.dustImpureLepersonnite.name=Ungereinigter Lepersonnite-Staub -item.dustPureLepersonnite.name=Gereinigter Lepersonnite-Staub -item.itemDustSamarskiteY.name=Samarsikt(Y)-Staub -item.itemDustTinySamarskiteY.name=Winziges Häufchen Samarsikt(Y)-Staub -item.itemDustSmallSamarskiteY.name=Kleines Häufchen Samarsikt(Y)-Staub -item.crushedSamarskiteY.name=Zerkleinertes Samarsikt(Y)-Erz -item.crushedCentrifugedSamarskiteY.name=Zentrifugiertes zerkleinertes Samarsikt(Y)-Erz -item.crushedPurifiedSamarskiteY.name=Gereinigtes zerkleinertes Samarsikt(Y)-Erz -item.dustImpureSamarskiteY.name=Ungereinigter Samarsikt(Y)-Staub -item.dustPureSamarskiteY.name=Gereinigter Samarsikt(Y)-Staub -item.itemDustSamarskiteYb.name=Samarsikt(Yb)-Staub -item.itemDustTinySamarskiteYb.name=Winziges Häufchen Samarsikt(Yb)-Staub -item.itemDustSmallSamarskiteYb.name=Kleines Häufchen Samarsikt(Yb)-Staub -item.crushedSamarskiteYb.name=Zerkleinertes Samarsikt(Yb)-Erz -item.crushedCentrifugedSamarskiteYb.name=Zentrifugiertes zerkleinertes Samarsikt(Yb)-Erz -item.crushedPurifiedSamarskiteYb.name=Gereinigtes zerkleinertes Samarsikt(Yb)-Erz -item.dustImpureSamarskiteYb.name=Ungereinigter Samarsikt(Yb)-Staub -item.dustPureSamarskiteYb.name=Gereinigter Samarsikt(Yb)-Staub -item.itemDustXenotime.name=Xenotime-Staub -item.itemDustTinyXenotime.name=Winziges Häufchen Xenotime-Staub -item.itemDustSmallXenotime.name=Kleines Häufchen Xenotime-Staub -item.crushedXenotime.name=Zerkleinertes Xenotime-Erz -item.crushedCentrifugedXenotime.name=Zentrifugiertes zerkleinertes Xenotime-Erz -item.crushedPurifiedXenotime.name=Gereinigtes zerkleinertes Xenotime-Erz -item.dustImpureXenotime.name=Ungereinigter Xenotime-Staub -item.dustPureXenotime.name=Gereinigter Xenotime-Staub -item.itemDustYttriaite.name=Yttriait-Staub -item.itemDustTinyYttriaite.name=Winziges Häufchen Yttriait-Staub -item.itemDustSmallYttriaite.name=Kleines Häufchen Yttriait-Staub -item.crushedYttriaite.name=Zerkleinertes Yttriait-Erz -item.crushedCentrifugedYttriaite.name=Zentrifugiertes zerkleinertes Yttriait-Erz -item.crushedPurifiedYttriaite.name=Gereinigtes zerkleinertes Yttriait-Erz -item.dustImpureYttriaite.name=Ungereinigter Yttriait-Staub -item.dustPureYttriaite.name=Gereinigter Yttriait-Staub -item.itemDustYttrialite.name=Yttrialit-Staub -item.itemDustTinyYttrialite.name=Winziges Häufchen Yttrialit-Staub -item.itemDustSmallYttrialite.name=Kleines Häufchen Yttrialit-Staub -item.crushedYttrialite.name=Zerkleinertes Yttrialit-Erz -item.crushedCentrifugedYttrialite.name=Zentrifugiertes zerkleinertes Yttrialit-Erz -item.crushedPurifiedYttrialite.name=Gereinigtes zerkleinertes Yttrialit-Erz -item.dustImpureYttrialite.name=Ungereinigter Yttrialit-Staub -item.dustPureYttrialite.name=Gereinigter Yttrialit-Staub -item.itemDustYttrocerite.name=Yttrocerite-Staub -item.itemDustTinyYttrocerite.name=Winziges Häufchen Yttrocerite-Staub -item.itemDustSmallYttrocerite.name=Kleines Häufchen Yttrocerite-Staub -item.crushedYttrocerite.name=Zerkleinertes Yttrocerite-Erz -item.crushedCentrifugedYttrocerite.name=Zentrifugiertes zerkleinertes Yttrocerite-Erz -item.crushedPurifiedYttrocerite.name=Gereinigtes zerkleinertes Yttrocerite-Erz -item.dustImpureYttrocerite.name=Ungereinigter Yttrocerite-Staub -item.dustPureYttrocerite.name=Gereinigter Yttrocerite-Staub -item.itemDustZircon.name=Zirkon-Staub -item.itemDustTinyZircon.name=Winziges Häufchen Zirkon-Staub -item.itemDustSmallZircon.name=Kleines Häufchen Zirkon-Staub -item.crushedZircon.name=Zerkleinertes Zirkon-Erz -item.crushedCentrifugedZircon.name=Zentrifugiertes zerkleinertes Zirkon-Erz -item.crushedPurifiedZircon.name=Gereinigtes zerkleinertes Zirkon-Erz -item.dustImpureZircon.name=Ungereinigter Zirkon-Staub -item.dustPureZircon.name=Gereinigter Zirkon-Staub -item.itemDustPolycrase.name=Polycrase-Staub -item.itemDustTinyPolycrase.name=Winziges Häufchen Polycrase-Staub -item.itemDustSmallPolycrase.name=Kleines Häufchen Polycrase-Staub -item.crushedPolycrase.name=Zerkleinertes Polycrase-Erz -item.crushedCentrifugedPolycrase.name=Zentrifugiertes zerkleinertes Polycrase-Erz -item.crushedPurifiedPolycrase.name=Gereinigtes zerkleinertes Polycrase-Erz -item.dustImpurePolycrase.name=Ungereinigter Polycrase-Staub -item.dustPurePolycrase.name=Gereinigter Polycrase-Staub -item.itemDustZircophyllite.name=Zirkophyllit-Staub -item.itemDustTinyZircophyllite.name=Winziges Häufchen Zirkophyllit-Staub -item.itemDustSmallZircophyllite.name=Kleines Häufchen Zirkophyllit-Staub -item.crushedZircophyllite.name=Zerkleinertes Zirkophyllit-Erz -item.crushedCentrifugedZircophyllite.name=Zentrifugiertes zerkleinertes Zirkophyllit-Erz -item.crushedPurifiedZircophyllite.name=Gereinigtes zerkleinertes Zirkophyllit-Erz -item.dustImpureZircophyllite.name=Ungereinigter Zirkophyllit-Staub -item.dustPureZircophyllite.name=Gereinigter Zirkophyllit-Staub -item.itemDustZirkelite.name=Zirkelit-Staub -item.itemDustTinyZirkelite.name=Winziges Häufchen Zirkelit-Staub -item.itemDustSmallZirkelite.name=Kleines Häufchen Zirkelit-Staub -item.crushedZirkelite.name=Zerkleinertes Zirkelit-Erz -item.crushedCentrifugedZirkelite.name=Zentrifugiertes zerkleinertes Zirkelit-Erz -item.crushedPurifiedZirkelite.name=Gereinigtes zerkleinertes Zirkelit-Erz -item.dustImpureZirkelite.name=Ungereinigter Zirkelit-Staub -item.dustPureZirkelite.name=Gereinigter Zirkelit-Staub -item.itemDustLanthaniteLa.name=Lanthanit(La)-Staub -item.itemDustTinyLanthaniteLa.name=Winziges Häufchen Lanthanit(La)-Staub -item.itemDustSmallLanthaniteLa.name=Kleines Häufchen Lanthanit(La)-Staub -item.crushedLanthaniteLa.name=Zerkleinertes Lanthanit(La)-Erz -item.crushedCentrifugedLanthaniteLa.name=Zentrifugiertes zerkleinertes Lanthanit(La)-Erz -item.crushedPurifiedLanthaniteLa.name=Gereinigtes zerkleinertes Lanthanit(La)-Erz -item.dustImpureLanthaniteLa.name=Ungereinigter Lanthanit(La)-Staub -item.dustPureLanthaniteLa.name=Gereinigter Lanthanit(La)-Staub -item.itemDustLanthaniteCe.name=Lanthanit(Ce)-Staub -item.itemDustTinyLanthaniteCe.name=Winziges Häufchen Lanthanit(Ce)-Staub -item.itemDustSmallLanthaniteCe.name=Kleines Häufchen Lanthanit(Ce)-Staub -item.crushedLanthaniteCe.name=Zerkleinertes Lanthanit(Ce)-Erz -item.crushedCentrifugedLanthaniteCe.name=Zentrifugiertes zerkleinertes Lanthanit(Ce)-Erz -item.crushedPurifiedLanthaniteCe.name=Gereinigtes zerkleinertes Lanthanit(Ce)-Erz -item.dustImpureLanthaniteCe.name=Ungereinigter Lanthanit(Ce)-Staub -item.dustPureLanthaniteCe.name=Gereinigter Lanthanit(Ce)-Staub -item.itemDustLanthaniteNd.name=Lanthanit(Nd)-Staub -item.itemDustTinyLanthaniteNd.name=Winziges Häufchen Lanthanit(Nd)-Staub -item.itemDustSmallLanthaniteNd.name=Kleines Häufchen Lanthanit(Nd)-Staub -item.crushedLanthaniteNd.name=Zerkleinertes Lanthanit(Nd)-Erz -item.crushedCentrifugedLanthaniteNd.name=Zentrifugiertes zerkleinertes Lanthanit(Nd)-Erz -item.crushedPurifiedLanthaniteNd.name=Gereinigtes zerkleinertes Lanthanit(Nd)-Erz -item.dustImpureLanthaniteNd.name=Ungereinigter Lanthanit(Nd)-Staub -item.dustPureLanthaniteNd.name=Gereinigter Lanthanit(Nd)-Staub -item.itemDustAgarditeY.name=Agardit(Y)-Staub -item.itemDustTinyAgarditeY.name=Winziges Häufchen Agardit(Y)-Staub -item.itemDustSmallAgarditeY.name=Kleines Häufchen Agardit(Y)-Staub -item.crushedAgarditeY.name=Zerkleinertes Agardit(Y)-Erz -item.crushedCentrifugedAgarditeY.name=Zentrifugiertes zerkleinertes Agardit(Y)-Erz -item.crushedPurifiedAgarditeY.name=Gereinigtes zerkleinertes Agardit(Y)-Erz -item.dustImpureAgarditeY.name=Ungereinigter Agardit(Y)-Staub -item.dustPureAgarditeY.name=Gereinigter Agardit(Y)-Staub -item.itemDustAgarditeCd.name=Agardit(Cd)-Staub -item.itemDustTinyAgarditeCd.name=Winziges Häufchen Agardit(Cd)-Staub -item.itemDustSmallAgarditeCd.name=Kleines Häufchen Agardit(Cd)-Staub -item.crushedAgarditeCd.name=Zerkleinertes Agardit(Cd)-Erz -item.crushedCentrifugedAgarditeCd.name=Zentrifugiertes zerkleinertes Agardit(Cd)-Erz -item.crushedPurifiedAgarditeCd.name=Gereinigtes zerkleinertes Agardit(Cd)-Erz -item.dustImpureAgarditeCd.name=Ungereinigter Agardit(Cd)-Staub -item.dustPureAgarditeCd.name=Gereinigter Agardit(Cd)-Staub -item.itemDustAgarditeLa.name=Agardit(La)-Staub -item.itemDustTinyAgarditeLa.name=Winziges Häufchen Agardit(La)-Staub -item.itemDustSmallAgarditeLa.name=Kleines Häufchen Agardit(La)-Staub -item.crushedAgarditeLa.name=Zerkleinertes Agardit(La)-Erz -item.crushedCentrifugedAgarditeLa.name=Zentrifugiertes zerkleinertes Agardit(La)-Erz -item.crushedPurifiedAgarditeLa.name=Gereinigtes zerkleinertes Agardit(La)-Erz -item.dustImpureAgarditeLa.name=Ungereinigter Agardit(La)-Staub -item.dustPureAgarditeLa.name=Gereinigter Agardit(La)-Staub -item.itemDustAgarditeNd.name=Agardit(Nd)-Staub -item.itemDustTinyAgarditeNd.name=Winziges Häufchen Agardit(Nd)-Staub -item.itemDustSmallAgarditeNd.name=Kleines Häufchen Agardit(Nd)-Staub -item.crushedAgarditeNd.name=Zerkleinertes Agardit(Nd)-Erz -item.crushedCentrifugedAgarditeNd.name=Zentrifugiertes zerkleinertes Agardit(Nd)-Erz -item.crushedPurifiedAgarditeNd.name=Gereinigtes zerkleinertes Agardit(Nd)-Erz -item.dustImpureAgarditeNd.name=Ungereinigter Agardit(Nd)-Staub -item.dustPureAgarditeNd.name=Gereinigter Agardit(Nd)-Staub -item.itemDustHibonite.name=Hibonit-Staub -item.itemDustTinyHibonite.name=Winziges Häufchen Hibonit-Staub -item.itemDustSmallHibonite.name=Kleines Häufchen Hibonit-Staub -item.crushedHibonite.name=Zerkleinertes Hibonit-Erz -item.crushedCentrifugedHibonite.name=Zentrifugiertes zerkleinertes Hibonit-Erz -item.crushedPurifiedHibonite.name=Gereinigtes zerkleinertes Hibonit-Erz -item.dustImpureHibonite.name=Ungereinigter Hibonit-Staub -item.dustPureHibonite.name=Gereinigter Hibonit-Staub -item.itemDustCerite.name=Cerit-Staub -item.itemDustTinyCerite.name=Winziges Häufchen Cerit-Staub -item.itemDustSmallCerite.name=Kleines Häufchen Cerit-Staub -item.crushedCerite.name=Zerkleinertes Cerit-Erz -item.crushedCentrifugedCerite.name=Zentrifugiertes zerkleinertes Cerit-Erz -item.crushedPurifiedCerite.name=Gereinigtes zerkleinertes Cerit-Erz -item.dustImpureCerite.name=Ungereinigter Cerit-Staub -item.dustPureCerite.name=Gereinigter Cerit-Staub -item.itemDustFluorcaphite.name=Fluorcaphit-Staub -item.itemDustTinyFluorcaphite.name=Winziges Häufchen Fluorcaphit-Staub -item.itemDustSmallFluorcaphite.name=Kleines Häufchen Fluorcaphit-Staub -item.crushedFluorcaphite.name=Zerkleinertes Fluorcaphit-Erz -item.crushedCentrifugedFluorcaphite.name=Zentrifugiertes zerkleinertes Fluorcaphit-Erz -item.crushedPurifiedFluorcaphite.name=Gereinigtes zerkleinertes Fluorcaphit-Erz -item.dustImpureFluorcaphite.name=Ungereinigter Fluorcaphit-Staub -item.dustPureFluorcaphite.name=Gereinigter Fluorcaphit-Staub -item.itemDustFlorencite.name=Florencit-Staub -item.itemDustTinyFlorencite.name=Winziges Häufchen Florencit-Staub -item.itemDustSmallFlorencite.name=Kleines Häufchen Florencit-Staub -item.crushedFlorencite.name=Zerkleinertes Florencit-Erz -item.crushedCentrifugedFlorencite.name=Zentrifugiertes zerkleinertes Florencit-Erz -item.crushedPurifiedFlorencite.name=Gereinigtes zerkleinertes Florencit-Erz -item.dustImpureFlorencite.name=Ungereinigter Florencit-Staub -item.dustPureFlorencite.name=Gereinigter Florencit-Staub -item.itemDustCryolite.name=Cryolit-Staub -item.itemDustTinyCryolite.name=Winziges Häufchen Cryolit-Staub -item.itemDustSmallCryolite.name=Kleines Häufchen Cryolit-Staub -item.crushedCryolite.name=Zerkleinertes Cryolit-Erz -item.crushedCentrifugedCryolite.name=Zentrifugiertes zerkleinertes Cryolit-Erz -item.crushedPurifiedCryolite.name=Gereinigtes zerkleinertes Cryolit-Erz -item.dustImpureCryolite.name=Ungereinigter Cryolit-Staub -item.dustPureCryolite.name=Gereinigter Cryolit-Staub - -//Shards -item.itemDrained.name=Erschöpfte Scherbe -item.itemDustInfusedAir.name=Infundierter Luftstaub -item.itemDustInfusedFire.name=Infundierter Feuerstaub -item.itemDustInfusedEarth.name=Infundierter Erdstaub -item.itemDustInfusedWater.name=Infundierter Wasserstaub - - -//Misc Material Items -item.itemDustLithiumCarbonate.name=Lithium-Karbonat-Staub -item.itemDustSmallLithiumCarbonate.name=Kleines Häufchen Lithium-Karbonat-Staub -item.itemDustTinyLithiumCarbonate.name=Winziges Häufchen Lithium-Karbonat-Staub -item.itemDustLithiumPeroxide.name=Lithium-Peroxid-Staub -item.itemDustSmallLithiumPeroxide.name=Kleines Häufchen Lithium-Peroxid-Staub -item.itemDustTinyLithiumPeroxide.name=Winziges Häufchen Lithium-Peroxid-Staub -item.itemDustLithiumHydroxide.name=Lithium-Hydroxid-Staub -item.itemDustSmallLithiumHydroxide.name=Kleines Häufchen Lithium-Hydroxid-Staub -item.itemDustTinyLithiumHydroxide.name=Winziges Häufchen Lithium-Hydroxid-Staub -item.itemDustCalciumHydroxide.name=Kalkhydrat-Staub -item.itemDustSmallCalciumHydroxide.name=Kleines Häufchen Kalkhydrat-Staub -item.itemDustTinyCalciumHydroxide.name=Winziges Häufchen Kalkhydrat-Staub -item.itemDustCalciumCarbonate.name=Calcium-Karbonat-Staub -item.itemDustSmallCalciumCarbonate.name=Kleines Häufchen Calcium-Karbonat-Staub -item.itemDustTinyCalciumCarbonate.name=Winziges Häufchen Calcium-Karbonat-Staub -item.itemDustGypsum.name=Calcium-Sulfat(Gypsum)-Staub -item.itemDustSmallGypsum.name=Kleines Häufchen Calcium-Sulfat(Gypsum)-Staub -item.itemDustTinyGypsum.name=Winziges Häufchen Calcium-Sulfat(Gypsum)-Staub -item.itemDustLi2CO3CaOH2.name=Li2CO3 + Ca(OH)2 Komposit-Staub -item.itemDustSmallLi2CO3CaOH2.name=Kleines Häufchen Li2CO3 + Ca(OH)2 Komposit-Staub -item.itemDustTinyLi2CO3CaOH2.name=Winziges Häufchen Li2CO3 + Ca(OH)2 Komposit-Staub -item.itemDustLi2BeF4.name=Li2BeF4 Treibstoff-Komposit-Staub -item.itemDustSmallLi2BeF4.name=Kleines Häufchen Li2BeF4 Treibstoff-Komposit-Staub -item.itemDustTinyLi2BeF4.name=Winziges Häufchen Li2BeF4 Treibstoff-Komposit-Staub -item.Li2BeF4.name=Li2BeF4-Zelle -item.itemCircuitLFTR.name=§aThorium Reaktorkontrollschaltung -item.itemZirconiumPellet.name=Zirkonium-Pellet [ZrClâ‚„] -item.itemDustZrCl4.name=ZrCl4-Staub -item.itemDustSmallZrCl4.name=Kleines Häufchen ZrCl4-Staub -item.itemDustTinyZrCl4.name=Winziges Häufchen ZrCl4-Staub -item.itemDustCookedZrCl4.name=gebrannter ZrCl4-Staub -item.itemDustSmallCookedZrCl4.name=Kleines Häufchen gebrannter ZrCl4-Staub -item.itemDustTinyCookedZrCl4.name=Winziges Häufchen gebrannter ZrCl4-Staub -item.itemDustUN18Fertiliser.name=UN-18 Dünger-Staub -item.itemDustSmallUN18Fertiliser.name=Kleines Häufchen UN-18 Dünger-Staub -item.itemDustTinyUN18Fertiliser.name=Winziges Häufchen UN-18 Dünger-Staub -item.itemDustUN32Fertiliser.name=UN-32 Dünger-Staub -item.itemDustSmallUN32Fertiliser.name=Kleines Häufchen UN-32 Dünger-Staub -item.itemDustTinyUN32Fertiliser.name=Winziges Häufchen UN-32 Dünger-Staub - -//Multitools -item.AluminiumMultipick.name=Aluminium-Multi-Spitzhacke -item.AluminiumMultispade.name=Aluminium-Multi-Schaufel -item.BerylliumMultispade.name=Beryllium-Multi-Schaufel -item.BismuthMultispade.name=Bismuth-Multi-Schaufel -item.CarbonMultispade.name=Karbon-Multi-Schaufel -item.ChromeMultipick.name=Chrom-Multi-Spitzhacke -item.ChromeMultispade.name=Chrom-Multi-Schaufel -item.CobaltMultipick.name=Kobalt-Multi-Spitzhacke -item.CobaltMultispade.name=Kobalt-Multi-Schaufel -item.GoldMultispade.name=Gold-Multi-Schaufel -item.IridiumMultipick.name=Iridium-Multi-Spitzhacke -item.IridiumMultispade.name=Iridium-Multi-Schaufel -item.IronMultipick.name=Eisen-Multi-Spitzhacke -item.IronMultispade.name=Eisen-Multi-Schaufel -item.LeadMultispade.name=Blei-Multi-Schaufel -item.ManganeseMultipick.name=Mangan-Multi-Spitzhacke -item.ManganeseMultispade.name=Mangan-Multi-Schaufel -item.MolybdenumMultipick.name=Molybdän-Multi-Spitzhacke -item.MolybdenumMultispade.name=Molybdän-Multi-Schaufel -item.NeodymiumMultipick.name=Neodym-Multi-Spitzhacke -item.NeodymiumMultispade.name=Neodym-Multi-Schaufel -item.NeutroniumMultipick.name=Neutronium-Multi-Spitzhacke -item.NeutroniumMultispade.name=Neutronium-Multi-Schaufel -item.NickelMultispade.name=Nickel-Multi-Schaufel -item.OsmiumMultipick.name=Osmium-Multi-Spitzhacke -item.OsmiumMultispade.name=Osmium-Multi-Schaufel -item.PalladiumMultipick.name=Palladium-Multi-Spitzhacke -item.PalladiumMultispade.name=Palladium-Multi-Schaufel -item.PlatinumMultispade.name=Platin-Multi-Schaufel -item.Plutonium241Multipick.name=Plutonium-241-Multi-Spitzhacke -item.Plutonium241Multispade.name=Plutonium-241-Multi-Schaufel -item.SilverMultispade.name=Silber-Multi-Schaufel -item.ThoriumMultipick.name=Thorium-Multi-Spitzhacke -item.ThoriumMultispade.name=Thorium-Multi-Schaufel -item.TitaniumMultipick.name=Titan-Multi-Spitzhacke -item.TitaniumMultispade.name=Titan-Multi-Schaufel -item.TungstenMultipick.name=Wolfram-Multi-Spitzhacke -item.TungstenMultispade.name=Wolfram-Multi-Schaufel -item.Uranium235Multipick.name=Uran-235-Multi-Spitzhacke -item.Uranium235Multispade.name=Uran-235-Multi-Schaufel -item.DarkSteelMultipick.name=Dunkelstahl-Multi-Spitzhacke -item.DarkSteelMultispade.name=Dunkelstahl-Multi-Schaufel -item.DuraniumMultipick.name=Duranium-Multi-Spitzhacke -item.DuraniumMultispade.name=Duranium-Multi-Schaufel -item.InfusedGoldMultispade.name=Infundiertes-Gold-Multi-Schaufel -item.NaquadahMultipick.name=Naquadah-Multi-Spitzhacke -item.NaquadahMultispade.name=Naquadah-Multi-Schaufel -item.NaquadahAlloyMultipick.name=Naquadah-Legierung-Multi-Spitzhacke -item.NaquadahAlloyMultispade.name=Naquadah-Legierung-Multi-Schaufel -item.NaquadriaMultipick.name=Naquadria-Multi-Spitzhacke -item.NaquadriaMultispade.name=Naquadria-Multi-Schaufel -item.TritaniumMultipick.name=Tritanium-Multi-Spitzhacke -item.TritaniumMultispade.name=Tritanium-Multi-Schaufel -item.OsmiridiumMultipick.name=Osmiridium-Multi-Spitzhacke -item.OsmiridiumMultispade.name=Osmiridium-Multi-Schaufel -item.BrassMultispade.name=Messing-Multi-Schaufel -item.BronzeMultipick.name=Bronze-Multi-Spitzhacke -item.BronzeMultispade.name=Bronze-Multi-Schaufel -item.CupronickelMultispade.name=Cupronickel-Multi-Schaufel -item.ElectrumMultispade.name=Electrum-Multi-Schaufel -item.InvarMultipick.name=Invar-Multi-Spitzhacke -item.InvarMultispade.name=Invar-Multi-Schaufel -item.KanthalMultispade.name=Kanthal-Multi-Schaufel -item.MagnaliumMultipick.name=Magnalium-Multi-Spitzhacke -item.MagnaliumMultispade.name=Magnalium-Multi-Schaufel -item.NichromeMultispade.name=Nichrom-Multi-Schaufel -item.PigIronMultipick.name=Schweineisen-Multi-Spitzhacke -item.PigIronMultispade.name=Schweineisen-Multi-Schaufel -item.PolycaprolactamMultispade.name=Polycaprolactam-Multi-Schaufel -item.PolytetrafluoroethyleneMultispade.name=Polytetrafluoroethylene-Multi-Schaufel -item.NickelZincFerriteMultispade.name=Nickel-Zink-Ferrit-Multi-Schaufel -item.PolyphenyleneSulfideMultispade.name=Polyphenylene-Sulfit-Multi-Schaufel -item.StainlessSteelMultipick.name=Edelstahl-Multi-Spitzhacke -item.StainlessSteelMultispade.name=Edelstahl-Multi-Schaufel -item.SteelMultipick.name=Stahl-Multi-Spitzhacke -item.SteelMultispade.name=Stahl-Multi-Schaufel -item.TinAlloyMultispade.name=Zinnlegierung-Multi-Schaufel -item.UltimetMultipick.name=Ultimet-Multi-Spitzhacke -item.UltimetMultispade.name=Ultimet-Multi-Schaufel -item.WroughtIronMultipick.name=Schmiedeisen-Multi-Spitzhacke -item.WroughtIronMultispade.name=Schmiedeisen-Multi-Schaufel -item.SterlingSilverMultipick.name=Sterlingsilber-Multi-Spitzhacke -item.SterlingSilverMultispade.name=Sterlingsilber-Multi-Schaufel -item.RoseGoldMultipick.name=Rosegold-Multi-Spitzhacke -item.RoseGoldMultispade.name=Rosegold-Multi-Schaufel -item.BlackBronzeMultipick.name=Schwarzbronze-Multi-Spitzhacke -item.BlackBronzeMultispade.name=Schwarzbronze-Multi-Schaufel -item.BismuthBronzeMultipick.name=Bismuth-Bronze-Multi-Spitzhacke -item.BismuthBronzeMultispade.name=Bismuth-Bronze-Multi-Schaufel -item.BlackSteelMultipick.name=Schwarzstahl-Multi-Spitzhacke -item.BlackSteelMultispade.name=Schwarzstahl-Multi-Schaufel -item.RedSteelMultipick.name=Rotstahl-Multi-Spitzhacke -item.RedSteelMultispade.name=Rotstahl-Multi-Schaufel -item.BlueSteelMultipick.name=Blaustahl-Multi-Spitzhacke -item.BlueSteelMultispade.name=Blaustahl-Multi-Schaufel -item.DamascusSteelMultipick.name=Damaskusstahl-Multi-Spitzhacke -item.DamascusSteelMultispade.name=Damaskusstahl-Multi-Schaufel -item.MithrilMultispade.name=Mithril-Multi-Schaufel -item.CobaltBrassMultipick.name=Kobaltmessing-Multi-Spitzhacke -item.CobaltBrassMultispade.name=Kobaltmessing-Multi-Schaufel -item.ThaumiumMultipick.name=Thaumium-Multi-Spitzhacke -item.ThaumiumMultispade.name=Thaumium-Multi-Schaufel -item.HSSGMultipick.name=HSS-G-Multi-Spitzhacke -item.HSSGMultispade.name=HSS-G-Multi-Schaufel -item.HSSEMultipick.name=HSS-E-Multi-Spitzhacke -item.HSSEMultispade.name=HSS-E-Multi-Schaufel -item.HSSSMultipick.name=HSS-S-Multi-Spitzhacke -item.HSSSMultispade.name=HSS-S-Multi-Schaufel -item.HastelloyC276Multipick.name=Hastelloy-C276-Multi-Spitzhacke -item.HastelloyC276Multispade.name=Hastelloy-C276-Multi-Schaufel -item.HastelloyNMultipick.name=Hastelloy-N-Multi-Spitzhacke -item.HastelloyNMultispade.name=Hastelloy-N-Multi-Schaufel -item.HastelloyWMultipick.name=Hastelloy-W-Multi-Spitzhacke -item.HastelloyWMultispade.name=Hastelloy-W-Multi-Schaufel -item.HastelloyXMultipick.name=Hastelloy-X-Multi-Spitzhacke -item.HastelloyXMultispade.name=Hastelloy-X-Multi-Schaufel -item.Incoloy020Multipick.name=Incoloy-020-Multi-Spitzhacke -item.Incoloy020Multispade.name=Incoloy-020-Multi-Schaufel -item.IncoloyDSMultipick.name=Incoloy-DS-Multi-Spitzhacke -item.IncoloyDSMultispade.name=Incoloy-DS-Multi-Schaufel -item.IncoloyMA956Multipick.name=Incoloy-MA956-Multi-Spitzhacke -item.IncoloyMA956Multispade.name=Incoloy-MA956-Multi-Schaufel -item.Inconel625Multipick.name=Inconel-625-Multi-Spitzhacke -item.Inconel625Multispade.name=Inconel-625-Multi-Schaufel -item.Inconel690Multipick.name=Inconel-690-Multi-Spitzhacke -item.Inconel690Multispade.name=Inconel-690-Multi-Schaufel -item.Inconel792Multipick.name=Inconel-792-Multi-Spitzhacke -item.Inconel792Multispade.name=Inconel-792-Multi-Schaufel -item.GrisiumMultipick.name=Grisium-Multi-Spitzhacke -item.GrisiumMultispade.name=Grisium-Multi-Schaufel -item.Tantalloy60Multipick.name=Tantalloy-60-Multi-Spitzhacke -item.Tantalloy60Multispade.name=Tantalloy-60-Multi-Schaufel -item.Tantalloy61Multipick.name=Tantalloy-61-Multi-Spitzhacke -item.Tantalloy61Multispade.name=Tantalloy-61-Multi-Schaufel -item.StaballoyMultipick.name=Staballoy-Multi-Spitzhacke -item.StaballoyMultispade.name=Staballoy-Multi-Schaufel -item.QuantumMultipick.name=Quanten-Multi-Spitzhacke -item.QuantumMultispade.name=Quanten-Multi-Schaufel -item.PotinMultipick.name=Potin-Multi-Spitzhacke -item.PotinMultispade.name=Potin-Multi-Schaufel -item.TumbagaMultipick.name=Tumbaga-Multi-Spitzhacke -item.TumbagaMultispade.name=Tumbaga-Multi-Schaufel -item.TaloniteMultipick.name=Talonite-Multi-Spitzhacke -item.TaloniteMultispade.name=Talonite-Multi-Schaufel -item.StelliteMultipick.name=Stellite-Multi-Spitzhacke -item.StelliteMultispade.name=Stellite-Multi-Schaufel -item.TungstenCarbideMultipick.name=Wolframcarbid-Multi-Spitzhacke -item.TungstenCarbideMultispade.name=Wolframcarbid-Multi-Schaufel -item.TantalumCarbideMultipick.name=Tantalcarbid-Multi-Spitzhacke -item.TantalumCarbideMultispade.name=Tantalcarbid-Multi-Schaufel - -item.mobessence.name=Mobessenz-Zell -item.itemPlateClay.name=Lehm-Platte -item.itemPlateDoubleClay.name=Doppelte Lehm-Platte -item.itemSmallGearWroughtIron.name=Kleines Schmiedeisen-Zahnrad -item.itemPlateLithium.name=Lithium-Platte -item.itemPlateDoubleEuropium.name=Doppelte Europium-Platte -item.itemBoilerChassis_0.name=Fortgeschrittenes Boiler-Chassis [Stufe 1] -item.itemDehydratorCoilWire_0.name=Spulendraht [EV] -item.itemDehydratorCoil_0.name=Dehydratorspule [EV] -item.itemAirFilter_0.name=Luftfilter [Stufe 1] -item.itemLavaFilter.name=Lavafilter -item.itemGrindleTablet.name=Git -item.itemDragonJar.name=Drachenfangbehälter -item.CoalGas.name=Kohlegas-Zelle -item.Ethylbenzene.name=Ethylbenzin-Zelle -item.Anthracene.name=Anthracen-Zelle -item.Toluene.name=Toluol-Zelle -item.CoalTar.name=Kohl-Teer-Zelle -item.CoalTarOil.name=Kohl-Teeröl-Zelle -item.SulfuricCoalTarOil.name=Schweflige Kohl-Teeröl-Zelle -item.Naphthalene.name=Naphthalin-Zelle -item.PhthalicAcid.name=Phthalsäure-Zelle -item.itemDustPhthalicAnhydride.name=Phthalsäureanhydrid-Staub -item.itemDustSmallPhthalicAnhydride.name=Kleines Häufchen Phthalsäureanhydrid-Staub -item.itemDustTinyPhthalicAnhydride.name=Winziges Häufchen Phthalsäureanhydrid-Staub -item.2Ethylanthraquinone.name=2-Ethylanthrachinon-Zelle -item.2Ethylanthrahydroquinone.name=2-Ethylanthrachinon-Zelle -item.HydrogenPeroxide.name=Wasserstoffperoxid-Zelle -item.itemDustLithiumHydroperoxide.name=Lithium-Wasserstoffperoxid-Staub -item.itemDustSmallLithiumHydroperoxide.name=Kleines Häufchen Lithium-Wasserstoffperoxid-Staub -item.itemDustTinyLithiumHydroperoxide.name=Winziges Häufchen Lithium-Wasserstoffperoxid-Staub -item.LithiumPeroxide.name=Lithium-Peroxid-Zelle -item.itemPotionChilly.name=Frostiger Trank -item.itemKeyBig4000DC's.name=4000DC's großer Schlüssel -item.itemGemDull.name=Stumpfer Edelstein -item.itemMushroomForest.name=Waldpilz -item.itemPlateVanadium.name=Vanadium-Platte -item.thekeytothecity.name=Der Schlüssel zur Stadt -item.modularbauble.name=Modular Bauble -item.itemDustSoularium.name=Soularium-Staub -item.itemDustSmallSoularium.name=Kleines Häufchen Soularium-Staub -item.itemDustTinySoularium.name=Winziges Häufchen Soularium-Staub -item.itemDustRedstoneAlloy.name=Redstone-Legierung-Staub -item.itemDustSmallRedstoneAlloy.name=Kleines Häufchen Redstone-Legierung-Staub -item.itemDustTinyRedstoneAlloy.name=Winziges Häufchen Redstone-Legierung-Staub -item.itemDustElectricalSteel.name=Elektrisches-Stahl-Staub -item.itemDustSmallElectricalSteel.name=Kleines Häufchen Elektrisches-Stahl-Staub -item.itemDustTinyElectricalSteel.name=Winziges Häufchen Elektrisches-Stahl-Staub -item.itemDustPulsatingIron.name=Pulsierendes-Eisen-Staub -item.itemDustSmallPulsatingIron.name=Kleines Häufchen Pulsierendes-Eisen-Staub -item.itemDustTinyPulsatingIron.name=Winziges Häufchen Pulsierendes-Eisen-Staub -item.itemDustEnergeticAlloy.name=Energetische-Legierung-Staub -item.itemDustSmallEnergeticAlloy.name=Kleines Häufchen Energetische-Legierung-Staub -item.itemDustTinyEnergeticAlloy.name=Winziges Häufchen Energetische-Legierung-Staub -item.itemDustVibrantAlloy.name=Dynamische-Legierung-Staub -item.itemDustSmallVibrantAlloy.name=Kleines Häufchen Dynamische-Legierung-Staub -item.itemDustTinyVibrantAlloy.name=Winziges Häufchen Dynamische-Legierung-Staub -item.itemDustConductiveIron.name=Leitendes-Iron-Staub -item.itemDustSmallConductiveIron.name=Kleines Häufchen Leitendes-Iron-Staub -item.itemDustTinyConductiveIron.name=Winziges Häufchen Leitendes-Iron-Staub -item.itemPlateSoularium.name=Soularium-Plate -item.itemPlateRedstoneAlloy.name=Redstone-Legierung-Platte -item.itemPlateElectricalSteel.name=Elektrisches-Stahl-Platte -item.itemPlatePhasedIron.name=Pulsierende-Eisen-Platte -item.itemPlateEnergeticAlloy.name=Energetische-Legierung-Platte -item.itemPlateVibrantAlloy.name=Vibrant Alloy plate -item.itemPlateConductiveIron.name=Conductive Iron plate -item.itemPlateBlutonium.name=Blutonium-Platte -item.itemPlateCyanite.name=Cyanit-Platte -item.itemPlateLudicrite.name=Ludikrit-Platte -item.itemPlateVoid.name="Nichts"-Platte -item.itemPlateDimensionShard.name=Dimensionsscherben-Platte -item.rfEUBattery.name=Universelle Ladbare Batterie -item.personalCloakingDevice.name=§9Persönliches Drapiergerät§7 -item.personalHealingDevice.name=§9Persönliche Helungsnanobooster§r -item.SlowBuildingRing.name=§eLangsamer Bau-Ring§7 -item.itemStaballoyPickaxe.name=Tunnelgräber -item.itemStaballoyAxe.name=Baumfäller -item.itemSandstoneHammer.name=Bruchsteinbrecher -item.itemBufferCore.name=Pufferkern [ULV]. -item.itemBufferCore.name=Pufferkern [LV]. -item.itemBufferCore.name=Pufferkern [MV]. -item.itemBufferCore.name=Pufferkern [HV]. -item.itemBufferCore.name=Pufferkern [EV]. -item.itemBufferCore.name=Pufferkern [IV]. -item.itemBufferCore.name=Pufferkern [LuV]. -item.itemBufferCore.name=Pufferkern [ZPM]. -item.itemBufferCore.name=Pufferkern [UV]. -item.itemBufferCore.name=Pufferkern [MAX]. -item.itemPLACEHOLDER_Circuit.name=Quarks Manipulator (UV) -item.itembookgt.name=§oThermal-Boiler-Anleitung - -// Everglade Items -item.everglades.trigger.name=§6Alkalus Schallplatte [§cAktiviert§6] - - - - - - - -//Blocks -tile.blockRainforestOakLog.name=Regenwaldeiche -tile.blockRainforestOakLeaves.name=Eichenblatt -tile.blockRainforestOakSapling.name=Regenwaldeichensetzling - -//TC Stuff -tile.blockFastAlchemyFurnace.0.name=Kaputt -tile.blockFastArcaneAlembic.1.name=Kaputt - -//Frame Boxes -tile.Block of Selenium.name=Block aus Selen -tile.Selenium Frame Box.name=Selen-Rahmen-Box -tile.Block of Bromine.name=Block aus Bromine -tile.Block of Strontium.name=Block aus Strontium -tile.Strontium Frame Box.name=Strontium-Rahmen-Box -tile.Block of Zirconium.name=Block aus Zirconium -tile.Zirconium Frame Box.name=Zirkonium-Rahmen-Box -tile.Block of Ruthenium.name=Block aus Ruthenium -tile.Ruthenium Frame Box.name=Ruthenium-Rahmen-Box -tile.Block of Iodine.name=Block aus Iod -tile.Iodine Frame Box.name=Iod-Rahmen-Box -tile.Block of Hafnium.name=Block aus Hafnium -tile.Hafnium Frame Box.name=Hafnium-Rahmen-Box -tile.Block of Dysprosium.name=Block aus Dysprosium -tile.Dysprosium Frame Box.name=Dysprosium-Rahmen-Box -tile.Block of Tellurium.name=Block aus Tellur -tile.Tellurium Frame Box.name=Tellur-Rahmen-Box -tile.Block of Rhodium.name=Block aus Rhodium -tile.Rhodium Frame Box.name=Rhodium-Rahmen-Box -tile.Block of Rhenium.name=Block aus Rhenium -tile.Rhenium Frame Box.name=Rhenium-Rahmen-Box -tile.Block of Thallium.name=Block aus Thallium -tile.Thallium Frame Box.name=Thallium-Rahmen-Box -tile.Block of Technetium.name=Block aus Technetium -tile.Block of Polonium.name=Block aus Polonium -tile.Block of Astatine.name=Block aus Astata -tile.Block of Francium.name=Block aus Francium -tile.Block of Radium.name=Block aus Radium -tile.Block of Actinium.name=Block aus Actinium -tile.Block of Protactinium.name=Block aus Protactinium -tile.Block of Neptunium.name=Block aus Neptunium -tile.Block of Curium.name=Block aus Curium -tile.Block of Berkelium.name=Block aus Berkelium -tile.Block of Californium.name=Block aus Californium -tile.Block of Einsteinium.name=Block aus Einsteinium -tile.Block of Fermium.name=Block aus Fermium -tile.Block of Thorium 232.name=Block aus Thorium-232 -tile.Block of Uranium 232.name=Block aus Uran-232 -tile.Block of Uranium 233.name=Block aus Uran-233 -tile.Block of Plutonium-238.name=Block aus Plutonium-238 -tile.Block of Strontium-90.name=Block aus Strontium-90 -tile.Block of Polonium-210.name=Block aus Polonium-210 -tile.Block of Americium-241.name=Block aus Americium-241 -tile.Block of Silicon Carbide.name=Block aus Siliconcarbid -tile.Silicon Carbide Frame Box.name=Siliconcarbid-Rahmen-Box -tile.Block of Zirconium Carbide.name=Block aus Zirkoniumcarbid -tile.Zirconium Carbide Frame Box.name=Zirkoniumcarbide-Rahmen-Box -tile.Block of Tantalum Carbide.name=Block aus Tantalcarbid -tile.Tantalum Carbide Frame Box.name=Tantalcarbide-Rahmen-Box -tile.Block of Niobium Carbide.name=Block aus Niobcarbid -tile.Niobium Carbide Frame Box.name=Niobium Carbide-Rahmen-Box -tile.Block of Beryllium Fluoride.name=Block aus Beryllium-Fluorid -tile.Block of Lithium Fluoride.name=Block aus Lithium-Fluorid -tile.Block of Thorium Tetrafluoride.name=Block aus Thorium-Tetrafluorid -tile.Block of Thorium Hexafluoride.name=Block aus Thorium-Hexafluorid -tile.Block of Uranium Tetrafluoride.name=Block aus Uran-Tetrafluorid -tile.Block of Uranium Hexafluoride.name=Block aus Uran-Hexafluorid -tile.Block of Zirconium Tetrafluoride.name=Block aus Zirkonium-Tetrafluorid -tile.Block of Neptunium Hexafluoride.name=Block aus Neptunium-Hexafluorid -tile.Block of Technetium Hexafluoride.name=Block aus Technetium-Hexafluorid -tile.Block of Selenium Hexafluoride.name=Block aus Selen-Hexafluorid -tile.Block of LiFBeF2ZrF4U235.name=Block aus LiFBeF2ZrF4U235 -tile.Block of LiFBeF2ZrF4UF4.name=Block aus LiFBeF2ZrF4UF4 -tile.Block of LiFBeF2ThF4UF4.name=Block aus LiFBeF2ThF4UF4 -tile.Block of Energy Crystal.name=Block aus Energiekristall -tile.Energy Crystal Frame Box.name=Energiekristall-Rahmen-Box -tile.Block of Blood Steel.name=Block aus Blutstahl -tile.Blutstahl Frame Box.name=Blutstahl-Rahmen-Box -tile.Block of Zeron-100.name=Block aus Zeron-100 -tile.Zeron-100 Frame Box.name=Zeron-100-Rahmen-Box -tile.Block of Tumbaga.name=Block aus Tumbaga -tile.Tumbaga Frame Box.name=Tumbaga-Rahmen-Box -tile.Block of Potin.name=Block aus Potin -tile.Potin Frame Box.name=Potin-Rahmen-Box -tile.Block of Staballoy.name=Block aus Staballoy -tile.Staballoy Frame Box.name=Staballoy-Rahmen-Box -tile.Block of Tantalloy-60.name=Block aus Tantalloy-60 -tile.Tantalloy-60 Frame Box.name=Tantalloy-60-Rahmen-Box -tile.Block of Tantalloy-61.name=Block aus Tantalloy-61 -tile.Tantalloy-61 Frame Box.name=Tantalloy-61-Rahmen-Box -tile.Block of Inconel-625.name=Block aus Inconel-625 -tile.Inconel-625 Frame Box.name=Inconel-625-Rahmen-Box -tile.Block of Inconel-690.name=Block aus Inconel-690 -tile.Inconel-690 Frame Box.name=Inconel-690-Rahmen-Box -tile.Block of Inconel-792.name=Block aus Inconel-792 -tile.Inconel-792 Frame Box.name=Inconel-792-Rahmen-Box -tile.Block of Eglin Steel.name=Block aus Eglin Steel -tile.Eglin Steel Frame Box.name=Eglin Steel-Rahmen-Box -tile.Block of Maraging Steel 250.name=Block aus Maraging-Stahl 250 -tile.Maraging Steel 250 Frame Box.name=Maraging-Stahl 250-Rahmen-Box -tile.Block of Maraging Steel 300.name=Block aus Maraging-Stahl 300 -tile.Maraging Steel 300 Frame Box.name=Maraging-Stahl 300-Rahmen-Box -tile.Block of Maraging Steel 350.name=Block aus Maraging-Stahl 350 -tile.Maraging Steel 350 Frame Box.name=Maraging-Stahl 350-Rahmen-Box -tile.Block of Stellite.name=Block aus Stellite -tile.Stellite Frame Box.name=Stellite-Rahmen-Box -tile.Block of Talonite.name=Block aus Talonite -tile.Talonite Frame Box.name=Talonite-Rahmen-Box -tile.Block of Hastelloy-W.name=Block aus Hastelloy-W -tile.Hastelloy-W Frame Box.name=Hastelloy-W-Rahmen-Box -tile.Block of Hastelloy-X.name=Block aus Hastelloy-X -tile.Hastelloy-X Frame Box.name=Hastelloy-X-Rahmen-Box -tile.Block of Hastelloy-C276.name=Block aus Hastelloy-C276 -tile.Hastelloy-C276 Frame Box.name=Hastelloy-C276-Rahmen-Box -tile.Block of Hastelloy-N.name=Block aus Hastelloy-N -tile.Hastelloy-N Frame Box.name=Hastelloy-N-Rahmen-Box -tile.Block of Incoloy-020.name=Block aus Incoloy-020 -tile.Incoloy-020 Frame Box.name=Incoloy-020-Rahmen-Box -tile.Block of Incoloy-DS.name=Block aus Incoloy-DS -tile.Incoloy-DS Frame Box.name=Incoloy-DS-Rahmen-Box -tile.Block of Incoloy-MA956.name=Block aus Incoloy-MA956 -tile.Incoloy-MA956 Frame Box.name=Incoloy-MA956-Rahmen-Box -tile.Block of Grisium.name=Block aus Grisium -tile.Grisium Frame Box.name=Grisium-Rahmen-Box -tile.Block of Trinium.name=Block aus Trinium -tile.Block of Refined Trinium.name=Block aus raffiniertem Trinium -tile.Block of Trinium Titanium Alloy.name=Block aus Trinium-Titanium-Legierung -tile.Trinium Titanium Alloy Frame Box.name=Trinium-Titanium-Legierung-Rahmen-Box -tile.Block of Trinium Naquadah Alloy.name=Block aus Trinium-Naquadah-Legierung -tile.Block of Trinium Naquadah Carbonite.name=Block aus Trinium-Naquadah-Carbonit -tile.Trinium Naquadah Carbonite Frame Box.name=Trinium-Naquadah-Carbonit-Rahmen-Box -tile.Block of Quantum.name=Block aus Quanten -tile.Quantum Frame Box.name=Quanten-Rahmenbox - -//Ores -tile.OreFluorite.name=Fluoriterz -tile.OreCrocoite.name=Crocoiterz -tile.OreGeikielite.name=Geikielieerz -tile.OreNichromite.name=Nichromiterz -tile.OreTitanite.name=Titaniterz -tile.OreZimbabweite.name=Zimbabweiterz -tile.OreZirconolite.name=Zirconoliterz -tile.OreGadoliniteCe.name=Gadoliniterz(Ce) -tile.OreGadoliniteY.name=Gadoliniterz(Y) -tile.OreLepersonnite.name=Lepersonniterz -tile.OreSamarskiteY.name=Samarskiterz(Y) -tile.OreSamarskiteYb.name=Samarskiterz(Yb) -tile.OreXenotime.name=Xenotimerz -tile.OreYttriaite.name=Yttriaiterz -tile.OreYttrialite.name=Yttrialiterz -tile.OreYttrocerite.name=Yttroceriterz -tile.OreZircon.name=Zirconerz -tile.OrePolycrase.name=Polycraserz -tile.OreZircophyllite.name=Zircophylliterz -tile.OreZirkelite.name=Zirkeliterz -tile.OreLanthaniteLa.name=Lanthaniterz(La) -tile.OreLanthaniteCe.name=Lanthaniterz(Ce) -tile.OreLanthaniteNd.name=Lanthaniterz(Nd) -tile.OreAgarditeY.name=Agarditerz(Y) -tile.OreAgarditeCd.name=Agarditerz(Cd) -tile.OreAgarditeLa.name=Agarditerz(La) -tile.OreAgarditeNd.name=Agarditerz(Nd) -tile.OreHibonite.name=Hiboniterz -tile.OreCerite.name=Ceriterz -tile.OreFluorcaphite.name=Fluorcaphiterz -tile.OreFlerzncite.name=Flerznciterz -tile.OreCryolite.name=Cryoliterz - -//Misc -tile.blockMFEffect.name=Spezial -tile.fluidBlockSludge.name=Brühe -tile.blockWorkbenchGT.name=Werkbank -tile.blockWorkbenchGTAdvanced.name=Fortgeschrittene Werkbank -tile.blockHeliumGenerator.name=Helium Generator -tile.blockFirePit.name=Feuerstelle -tile.blockFishTrap.name=Fischfalle -tile.blockInfiniteFluidTank.name=Unendlicher Tank -tile.blockMiningExplosives.name=Minensprengstoff -tile.blockHellFire.name=Höllenfeuer -tile.blockProjectBench.name=Projektplanungstisch -tile.blockTradeBench.name=Handelstisch -tile.blockModularity.name=Modulare Werkbank -tile.blockBlackGate.name=Witherkäfig -tile.blockTankXpConverter.name=Erfahrungswandler(XP) - -//Everglades Blocks -tile.fluidSludge.0.name=Stehendes Abwasser -tile.blockDarkWorldPortal.name=Portalstein für die Dunkle Welt -tile.blockDarkWorldGround.name=Grundstein der Dunklen Welt -tile.blockDarkWorldGround2.name=Grundstein der Dunklen Welt -tile.blockDarkWorldPortalFrame.name=Portalrahmen für die Dunkle Welt diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang deleted file mode 100644 index e2f034282a..0000000000 --- a/src/resources/assets/miscutils/lang/en_US.lang +++ /dev/null @@ -1,3366 +0,0 @@ -//Creative Tabs -itemGroup.MiscUtilBlockTab=[GT++] Blocks -itemGroup.MiscUtilMiscTab=[GT++] Items -itemGroup.MiscUtilCombatTab=[GT++] Combat -itemGroup.MiscUtilToolsTab=[GT++] Tools -itemGroup.MiscUtilMachineTab=[GT++] Machines -itemGroup.MiscUtilOtherTab=[GT++] Items II -itemGroup.MiscUtilBOP=[GT++] Biomes O'Plenty Additions - -//Debug -item.AAA_Broken.name=[Non-existent Item] Report This Recipe On Github, Please. -item.itemBedLocator_Base.name=Bed Locator [NBT Test] -item.itemBaseItemWithCharge.name=Base Chargeable Item -item.miscutils_itemDebugShapeSpawner.name=[Debug] Shapes - -//Fluids -tile.fluidSludge.name=Stagnant Waste Water -tile.fluidSludge.0.name=Stagnant Waste Water - -//Death Messages -death.attack.plasmabolt=%s died by burning hot plasma. -death.attack.plasmabolt.player=%1$s was killed by %2$s using plasma. -death.attack.gtpp.grinder=%s was ground into nothingness by an IsaMill. - -//Alternative Materials -item.itemPlateBatteryAlloy.name=Plate of Battery Alloy -item.itemIngotBatteryAlloy.name=Ingot of Battery Alloy -item.itemStickyRubber.name=Gumlet of Sticky Rubber - -//Unused Fuel rods -item.itemFuelRod_Empty.name=Empty Fuel Rod -item.itemFuelRod_Thorium.name=Thorium Fuel Rod -item.itemFuelRod_Uranium.name=Uranium Fuel Rod -item.itemFuelRod_Plutonium.name=Plutonium Fuel Rod - -//Entities -entity.constructStaballoy.name=Staballoy Construct -entity.sickBlaze.name=Infected Zealot - -//Tile Entities -tile.blockToolBuilder.name=GregTech Tool Constructor - -//Tools -item.itemBufferCore.name=Energy Core -item.itemStaballoyPickaxe.name=Tunnel Digger -item.itemStaballoyAxe.name=Tree Feller -item.itemSandstoneHammer.name=Cobblestone Breaker - -//Thermal Foundation Stuff -item.MiscUtils.bucket.bucketPyrotheum.name=Blazing Pyrotheum Bucket -item.MiscUtils.bucket.bucketCryotheum.name=Gelid Cryotheum Bucket -item.MiscUtils.bucket.bucketEnder.name=Resonant Ender Bucket -item.MiscUtils.material.dustPyrotheum.name=Pyrotheum Dust -item.MiscUtils.material.dustCryotheum.name=Cryotheum Dust -item.MiscUtils.material.rodBlizz.name=Blizz Rod -item.MiscUtils.material.dustBlizz.name=Blizz Powder - -//============= 'miscutils' is Case Sensitive Here, unsure why -tile.miscutils.fluid.pyrotheum.name=Blazing Pyrotheum -tile.miscutils.fluid.cryotheum.name=Gelid Cryotheum -tile.miscutils.fluid.ender.name=Resonant Ender -//============== - -//Forestry Stuff -item.frameAccelerated.name=Accelerated Frame -item.frameVoid.name=Void Frame -item.frameMutagenic.name=Mutagenic Frame -item.frameBusy.name=Working Frame -item.frameChocolate.name=Chocolate Frame -item.frameRestraint.name=Restraining Frame -item.frameSoul.name=Soul Frame -item.frameHealing.name=Healing Frame -item.frameNova.name=Nova Frame -item.frameArborists.name=Arborist Frame -item.frameDecaying.name=Decaying Frame -item.frameSlowing.name=Slowing Frame -item.frameStabilizing.name=Stabilizing Frame -item.frameUseless.name=Useless Frame - -//IC2 stuff -item.itemEnergeticRotorBlade.name=Energetic Alloy Rotor Blade -item.itemTungstenSteelRotorBlade.name=TungstenSteel Rotor Blade -item.itemVibrantRotorBlade.name=Vibrant Alloy Rotor Blade -item.itemIridiumRotorBlade.name=Iridium Rotor Blade -item.itemEnergeticShaft.name=Energetic Alloy Shaft -item.itemTungstenSteelShaft.name=TungstenSteel Shaft -item.itemVibrantShaft.name=Vibrant Alloy Shaft -item.itemIridiumShaft.name=Iridium Shaft -item.itemMagnaliumRotorBlade.name=Magnalium Rotor Blade -item.itemUltimetRotorBlade.name=Ultimet Blade -item.itemMagnaliumShaft.name=Magnalium Shaft -item.itemUltimetShaft.name=Ultimet Shaft - - -//Misc Items -item.itemPLACEHOLDER_Circuit.name=Quark Manipulator (UV) -item.itemPlateEnrichedSoularium.name=Enriched Soularium Plate -item.itemHeliumBlob.name=Mysterious Hydrogen Substance -item.itemAlkalusDisk.name=Alkalus Disk -item.itemHotIngotRaisinBread.name=Hot Loaf of Raisin Bread -item.itemIngotRaisinBread.name=§5ImQ009's §fRaisin Bread - -//Misc Blocks -tile.blockCompressedObsidian.0.name=Compressed Obsidian (9) -tile.blockCompressedObsidian.1.name=Double Compressed Obsidian (81) -tile.blockCompressedObsidian.2.name=Triple Compressed Obsidian (729) -tile.blockCompressedObsidian.3.name=Quadruple Compressed Obsidian (6561) -tile.blockCompressedObsidian.4.name=Quintuple Compressed Obsidian (59049) -tile.blockCompressedObsidian.5.name=Inverted Obsidian -tile.blockNet.name=Net - - -//GT++ Items - -//Meta Tool -MU-metaitem.01.0.name=MU-metaitem.01.0.name - -//Cells -item.SulfurDioxide.name=High Quality Sulfur Dioxide Cell -item.mobessence.name=Mob Essence Cell -item.Fertiliser.name=Fertiliser Cell -item.UN32Fertiliser.name=UN-32 Fertiliser Cell -item.UN18Fertiliser.name=UN-18 Fertiliser Cell -item.RaisinJuice.name=Raisin Juice Cell -item.BerylliumHydroxide.name=Beryllium Hydroxide Cell -item.AmmoniumBifluoride.name=Ammonium Bifluoride Cell -item.Hydroxide.name=Hydroxide Cell -item.Ammonium.name=Ammonium Cell -item.AmmoniumTetrafluoroberyllate.name=Ammonium Tetrafluoroberyllate Cell - -//Resources -item.itemStickyRubber.name=Gumlet of Sticky Rubber -item.itemCoalCoke.name=Coking Coal -item.itemHydrogenBlob.name=Mysterious Hydrogen Blob -item.itemHeliumBlob.name=Mysterious Hydrogen Substance - -//Normal Items -item.itemAlkalusDisk.name=Alkalus Disk -item.itemSimpleFiremaker.name=Basic Firemaker -item.itemFiber.name=Plant Fiber -item.itemRope.name=Rope -item.backpackRed.name=Red Backpack -item.backpackGreen.name=Green Backpack -item.backpackBlue.name=Blue Backpack -item.backpackYellow.name=Yellow Backpack -item.backpackPurple.name=Purple Backpack -item.backpackCyan.name=Cyan Backpack -item.backpackMaroon.name=Maroon Backpack -item.backpackOlive.name=Olive Backpack -item.backpackDarkGreen.name=Dark Green Backpack -item.backpackDarkPurple.name=Dark Purple Backpack -item.backpackTeal.name=Teal Backpack -item.backpackNavy.name=Navy Backpack -item.backpackSilver.name=Silver Backpack -item.backpackGray.name=Gray Backpack -item.backpackBlack.name=Black Backpack -item.backpackWhite.name=White Backpack -item.itemBlueprint.name=Blueprint [I am useless] -item.itemGemShards.name=Diamond Shards -item.itemHalfCompleteCasings.name=Half Complete Casing -item.itemSulfuricPotion.name=Throwable Vial of Sulfuric Acid -item.itemHydrofluoricPotion.name=Throwable Vial of Hydrofluoric Acid -item.itemIngotRaisinBread.name=A Serving of Raisin Bread -item.itemHotIngotRaisinBread.name=A Serving of Hot Raisin Bread -item.itemFoodRaisinToast.name=A Serving of Raisin Toast -item.itemHotFoodRaisinToast.name=A Serving of Hot Raisin Toast -item.itemFoodCurriedSausages.name=A Serving of Curried Sausages -item.itemHotFoodCurriedSausages.name=A Serving of Hot Curried Sausages - - -//Conversion Dusts -item.dustNeptunium238.name=Neptunium 238 Dust -item.dustRadium226.name=Radium 226 Dust -item.itemDustDecayedRadium226.name=Decayed Radium 226 Dust -item.itemDustSmallDecayedRadium226.name=Small Decayed Radium 226 Dust -item.itemDustTinyDecayedRadium226.name=Tiny Decayed Radium 226 Dust - -//Material Items -item.itemDustGadolinium.name=Gadolinium Dust -item.itemDustSmallGadolinium.name=Small Pile of Gadolinium Dust -item.itemDustTinyGadolinium.name=Tiny Pile of Gadolinium Dust -item.itemDustYtterbium.name=Ytterbium Dust -item.itemDustSmallYtterbium.name=Small Pile of Ytterbium Dust -item.itemDustTinyYtterbium.name=Tiny Pile of Ytterbium Dust -item.itemDustSamarium.name=Samarium Dust -item.itemDustSmallSamarium.name=Small Pile of Samarium Dust -item.itemDustTinySamarium.name=Tiny Pile of Samarium Dust -item.itemDustLanthanum.name=Lanthanum Dust -item.itemDustSmallLanthanum.name=Small Pile of Lanthanum Dust -item.itemDustTinyLanthanum.name=Tiny Pile of Lanthanum Dust -item.itemCellNeon.name=Neon Cell -item.itemCellGermanium.name=Germanium Cell -item.itemCellSelenium.name=Selenium Cell -item.itemCellBromine.name=Bromine Cell -item.itemCellKrypton.name=Krypton Cell -item.itemCellZirconium.name=Zirconium Cell -item.itemCellTechnetium.name=Technetium Cell -item.itemCellRuthenium.name=Ruthenium Cell -item.itemCellRhodium.name=Rhodium Cell -item.itemCellIodine.name=Iodine Cell -item.itemCellXenon.name=Xenon Cell -item.itemCellHafnium.name=Hafnium Cell -item.itemCellRhenium.name=Rhenium Cell -item.itemCellThallium.name=Thallium Cell -item.itemCellPolonium.name=Polonium Cell -item.itemCellAstatine.name=Astatine Cell -item.itemCellFrancium.name=Francium Cell -item.itemCellRadium.name=Radium Cell -item.itemCellActinium.name=Actinium Cell -item.itemCellProtactinium.name=Protactinium Cell -item.itemCellNeptunium.name=Neptunium Cell -item.itemCellCurium.name=Curium Cell -item.itemCellBerkelium.name=Berkelium Cell -item.itemCellCalifornium.name=Californium Cell -item.itemCellEinsteinium.name=Einsteinium Cell -item.itemCellFermium.name=Fermium Cell -item.itemCellRefinedTrinium.name=Refined Trinium Cell -item.itemIngotSelenium.name=Selenium Ingot -item.itemDustSelenium.name=Selenium Dust -item.itemDustTinySelenium.name=Tiny Pile of Selenium Dust -item.itemDustSmallSelenium.name=Small Pile of Selenium Dust -item.itemNuggetSelenium.name=Selenium Nugget -item.itemPlateSelenium.name=Selenium Plate -item.itemPlateDoubleSelenium.name=Double Selenium Plate -item.itemBoltSelenium.name=Selenium Bolt -item.itemRodSelenium.name=Selenium Rod -item.itemRodLongSelenium.name=Long Selenium Rod -item.itemRingSelenium.name=Selenium Ring -item.itemScrewSelenium.name=Selenium Screw -item.itemRotorSelenium.name=Selenium Rotor -item.itemGearSelenium.name=Selenium Gear -item.itemCellUranium232.name=Uranium 232 Cell -item.itemCellUranium233.name=Uranium 233 Cell -item.itemCellThoriumTetrafluoride.name=Thorium Tetrafluoride Cell -item.itemCellThoriumHexafluoride.name=Thorium Hexafluoride Cell -item.itemCellUraniumTetrafluoride.name=Uranium Tetrafluoride Cell -item.itemCellUraniumHexafluoride.name=Uranium Hexafluoride Cell -item.itemCellZirconiumTetrafluoride.name=Zirconium Tetrafluoride Cell -item.itemCellBerylliumFluoride.name=Beryllium Fluoride Cell -item.itemCellLithiumFluoride.name=Lithium Fluoride Cell -item.itemCellHydroxide.name=Hydroxide Cell -item.itemCellAmmonium.name=Ammonium Cell -item.itemCellAmmoniumBifluoride.name=Ammonium Bifluoride Cell -item.itemCellBerylliumHydroxide.name=Beryllium Hydroxide Cell -item.itemCellAmmoniumTetrafluoroberyllate.name=Ammonium Tetrafluoroberyllate Cell -item.itemCellNeptuniumHexafluoride.name=Neptunium Hexafluoride Cell -item.itemCellTechnetiumHexafluoride.name=Technetium Hexafluoride Cell -item.itemCellSeleniumHexafluoride.name=Selenium Hexafluoride Cell -item.itemCellEnergyCrystal.name=Energy Crystal Cell -item.itemCellBloodSteel.name=Blood Steel Cell -item.itemCellStaballoy.name=Staballoy Cell -item.itemCellTantalloy60.name=Tantalloy-60 Cell -item.itemCellTantalloy61.name=Tantalloy-61 Cell -item.itemCellTumbaga.name=Tumbaga Cell -item.itemCellPotin.name=Potin Cell -item.itemCellInconel625.name=Inconel-625 Cell -item.itemCellInconel690.name=Inconel-690 Cell -item.itemCellInconel792.name=Inconel-792 Cell -item.itemCellZeron100.name=Zeron-100 Cell -item.itemCellMaragingSteel250.name=Maraging Steel 250 Cell -item.itemCellMaragingSteel300.name=Maraging Steel 300 Cell -item.itemCellMaragingSteel350.name=Maraging Steel 350 Cell -item.itemCellStellite.name=Stellite Cell -item.itemCellTalonite.name=Talonite Cell -item.itemCellHastelloyW.name=Hastelloy-W Cell -item.itemCellHastelloyX.name=Hastelloy-X Cell -item.itemCellHastelloyN.name=Hastelloy-N Cell -item.itemCellHastelloyC276.name=Hastelloy-C276 Cell -item.itemCellIncoloy020.name=Incoloy-020 Cell -item.itemCellIncoloyDS.name=Incoloy-DS Cell -item.itemCellIncoloyMA956.name=Incoloy-MA956 Cell -item.itemCellTungstenCarbide.name=Tungsten Carbide Cell -item.itemCellSiliconCarbide.name=Silicon Carbide Cell -item.itemCellTantalumCarbide.name=Tantalum Carbide Cell -item.itemCellZirconiumCarbide.name=Zirconium Carbide Cell -item.itemCellNiobiumCarbide.name=Niobium Carbide Cell -item.itemCellGrisium.name=Grisium Cell -item.itemCellEglinSteelBaseCompound.name=Eglin Steel Base Compound Cell -item.itemCellEglinSteel.name=Eglin Steel Cell -item.itemCellHG1223.name=HG-1223 Cell -item.itemCellTriniumTitaniumAlloy.name=Trinium Titanium Alloy Cell -item.itemCellTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Cell -item.itemCellTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Cell -item.itemCellQuantum.name=Quantum Cell -item.itemIngotBromine.name=Bromine Ingot -item.itemDustBromine.name=Bromine Dust -item.itemDustTinyBromine.name=Tiny Pile of Bromine Dust -item.itemDustSmallBromine.name=Small Pile of Bromine Dust -item.itemNuggetBromine.name=Bromine Nugget -item.itemPlateBromine.name=Bromine Plate -item.itemPlateDoubleBromine.name=Double Bromine Plate -item.itemIngotStrontium.name=Strontium Ingot -item.itemDustStrontium.name=Strontium Dust -item.itemDustTinyStrontium.name=Tiny Pile of Strontium Dust -item.itemDustSmallStrontium.name=Small Pile of Strontium Dust -item.itemNuggetStrontium.name=Strontium Nugget -item.itemPlateStrontium.name=Strontium Plate -item.itemPlateDoubleStrontium.name=Double Strontium Plate -item.itemBoltStrontium.name=Strontium Bolt -item.itemRodStrontium.name=Strontium Rod -item.itemRodLongStrontium.name=Long Strontium Rod -item.itemRingStrontium.name=Strontium Ring -item.itemScrewStrontium.name=Strontium Screw -item.itemRotorStrontium.name=Strontium Rotor -item.itemGearStrontium.name=Strontium Gear -item.itemIngotZirconium.name=Zirconium Ingot -item.itemDustZirconium.name=Zirconium Dust -item.itemDustTinyZirconium.name=Tiny Pile of Zirconium Dust -item.itemDustSmallZirconium.name=Small Pile of Zirconium Dust -item.itemNuggetZirconium.name=Zirconium Nugget -item.itemPlateZirconium.name=Zirconium Plate -item.itemPlateDoubleZirconium.name=Double Zirconium Plate -item.itemBoltZirconium.name=Zirconium Bolt -item.itemRodZirconium.name=Zirconium Rod -item.itemRodLongZirconium.name=Long Zirconium Rod -item.itemRingZirconium.name=Zirconium Ring -item.itemScrewZirconium.name=Zirconium Screw -item.itemRotorZirconium.name=Zirconium Rotor -item.itemGearZirconium.name=Zirconium Gear -item.itemIngotRuthenium.name=Ruthenium Ingot -item.itemDustRuthenium.name=Ruthenium Dust -item.itemDustTinyRuthenium.name=Tiny Pile of Ruthenium Dust -item.itemDustSmallRuthenium.name=Small Pile of Ruthenium Dust -item.itemNuggetRuthenium.name=Ruthenium Nugget -item.itemPlateRuthenium.name=Ruthenium Plate -item.itemPlateDoubleRuthenium.name=Double Ruthenium Plate -item.itemBoltRuthenium.name=Ruthenium Bolt -item.itemRodRuthenium.name=Ruthenium Rod -item.itemRodLongRuthenium.name=Long Ruthenium Rod -item.itemRingRuthenium.name=Ruthenium Ring -item.itemScrewRuthenium.name=Ruthenium Screw -item.itemRotorRuthenium.name=Ruthenium Rotor -item.itemGearRuthenium.name=Ruthenium Gear -item.itemIngotIodine.name=Iodine Ingot -item.itemDustIodine.name=Iodine Dust -item.itemDustTinyIodine.name=Tiny Pile of Iodine Dust -item.itemDustSmallIodine.name=Small Pile of Iodine Dust -item.itemNuggetIodine.name=Iodine Nugget -item.itemPlateIodine.name=Iodine Plate -item.itemPlateDoubleIodine.name=Double Iodine Plate -item.itemBoltIodine.name=Iodine Bolt -item.itemRodIodine.name=Iodine Rod -item.itemRodLongIodine.name=Long Iodine Rod -item.itemRingIodine.name=Iodine Ring -item.itemScrewIodine.name=Iodine Screw -item.itemRotorIodine.name=Iodine Rotor -item.itemGearIodine.name=Iodine Gear -item.itemIngotHafnium.name=Hafnium Ingot -item.itemDustHafnium.name=Hafnium Dust -item.itemDustTinyHafnium.name=Tiny Pile of Hafnium Dust -item.itemDustSmallHafnium.name=Small Pile of Hafnium Dust -item.itemNuggetHafnium.name=Hafnium Nugget -item.itemPlateHafnium.name=Hafnium Plate -item.itemPlateDoubleHafnium.name=Double Hafnium Plate -item.itemBoltHafnium.name=Hafnium Bolt -item.itemRodHafnium.name=Hafnium Rod -item.itemRodLongHafnium.name=Long Hafnium Rod -item.itemRingHafnium.name=Hafnium Ring -item.itemScrewHafnium.name=Hafnium Screw -item.itemRotorHafnium.name=Hafnium Rotor -item.itemGearHafnium.name=Hafnium Gear -item.itemIngotDysprosium.name=Dysprosium Ingot -item.itemDustDysprosium.name=Dysprosium Dust -item.itemDustTinyDysprosium.name=Tiny Pile of Dysprosium Dust -item.itemDustSmallDysprosium.name=Small Pile of Dysprosium Dust -item.itemNuggetDysprosium.name=Dysprosium Nugget -item.itemPlateDysprosium.name=Dysprosium Plate -item.itemPlateDoubleDysprosium.name=Double Dysprosium Plate -item.itemBoltDysprosium.name=Dysprosium Bolt -item.itemRodDysprosium.name=Dysprosium Rod -item.itemRodLongDysprosium.name=Long Dysprosium Rod -item.itemRingDysprosium.name=Dysprosium Ring -item.itemScrewDysprosium.name=Dysprosium Screw -item.itemRotorDysprosium.name=Dysprosium Rotor -item.itemGearDysprosium.name=Dysprosium Gear -item.itemIngotTellurium.name=Tellurium Ingot -item.itemDustTellurium.name=Tellurium Dust -item.itemDustTinyTellurium.name=Tiny Pile of Tellurium Dust -item.itemDustSmallTellurium.name=Small Pile of Tellurium Dust -item.itemNuggetTellurium.name=Tellurium Nugget -item.itemPlateTellurium.name=Tellurium Plate -item.itemPlateDoubleTellurium.name=Double Tellurium Plate -item.itemBoltTellurium.name=Tellurium Bolt -item.itemRodTellurium.name=Tellurium Rod -item.itemRodLongTellurium.name=Long Tellurium Rod -item.itemRingTellurium.name=Tellurium Ring -item.itemScrewTellurium.name=Tellurium Screw -item.itemRotorTellurium.name=Tellurium Rotor -item.itemGearTellurium.name=Tellurium Gear -item.itemIngotRhodium.name=Rhodium Ingot -item.itemDustRhodium.name=Rhodium Dust -item.itemDustTinyRhodium.name=Tiny Pile of Rhodium Dust -item.itemDustSmallRhodium.name=Small Pile of Rhodium Dust -item.itemNuggetRhodium.name=Rhodium Nugget -item.itemPlateRhodium.name=Rhodium Plate -item.itemPlateDoubleRhodium.name=Double Rhodium Plate -item.itemBoltRhodium.name=Rhodium Bolt -item.itemRodRhodium.name=Rhodium Rod -item.itemRodLongRhodium.name=Long Rhodium Rod -item.itemRingRhodium.name=Rhodium Ring -item.itemScrewRhodium.name=Rhodium Screw -item.itemRotorRhodium.name=Rhodium Rotor -item.itemGearRhodium.name=Rhodium Gear -item.itemIngotRhenium.name=Rhenium Ingot -item.itemDustRhenium.name=Rhenium Dust -item.itemDustTinyRhenium.name=Tiny Pile of Rhenium Dust -item.itemDustSmallRhenium.name=Small Pile of Rhenium Dust -item.itemNuggetRhenium.name=Rhenium Nugget -item.itemPlateRhenium.name=Rhenium Plate -item.itemPlateDoubleRhenium.name=Double Rhenium Plate -item.itemBoltRhenium.name=Rhenium Bolt -item.itemRodRhenium.name=Rhenium Rod -item.itemRodLongRhenium.name=Long Rhenium Rod -item.itemRingRhenium.name=Rhenium Ring -item.itemScrewRhenium.name=Rhenium Screw -item.itemRotorRhenium.name=Rhenium Rotor -item.itemGearRhenium.name=Rhenium Gear -item.itemIngotThallium.name=Thallium Ingot -item.itemDustThallium.name=Thallium Dust -item.itemDustTinyThallium.name=Tiny Pile of Thallium Dust -item.itemDustSmallThallium.name=Small Pile of Thallium Dust -item.itemNuggetThallium.name=Thallium Nugget -item.itemPlateThallium.name=Thallium Plate -item.itemPlateDoubleThallium.name=Double Thallium Plate -item.itemBoltThallium.name=Thallium Bolt -item.itemRodThallium.name=Thallium Rod -item.itemRodLongThallium.name=Long Thallium Rod -item.itemRingThallium.name=Thallium Ring -item.itemScrewThallium.name=Thallium Screw -item.itemRotorThallium.name=Thallium Rotor -item.itemGearThallium.name=Thallium Gear -item.itemIngotTechnetium.name=Technetium Ingot -item.itemDustTechnetium.name=Technetium Dust -item.itemDustTinyTechnetium.name=Tiny Pile of Technetium Dust -item.itemDustSmallTechnetium.name=Small Pile of Technetium Dust -item.itemNuggetTechnetium.name=Technetium Nugget -item.itemPlateTechnetium.name=Technetium Plate -item.itemPlateDoubleTechnetium.name=Double Technetium Plate -item.itemIngotPolonium.name=Polonium Ingot -item.itemDustPolonium.name=Polonium Dust -item.itemDustTinyPolonium.name=Tiny Pile of Polonium Dust -item.itemDustSmallPolonium.name=Small Pile of Polonium Dust -item.itemNuggetPolonium.name=Polonium Nugget -item.itemPlatePolonium.name=Polonium Plate -item.itemPlateDoublePolonium.name=Double Polonium Plate -item.itemIngotAstatine.name=Astatine Ingot -item.itemDustAstatine.name=Astatine Dust -item.itemDustTinyAstatine.name=Tiny Pile of Astatine Dust -item.itemDustSmallAstatine.name=Small Pile of Astatine Dust -item.itemNuggetAstatine.name=Astatine Nugget -item.itemPlateAstatine.name=Astatine Plate -item.itemPlateDoubleAstatine.name=Double Astatine Plate -item.itemIngotFrancium.name=Francium Ingot -item.itemDustFrancium.name=Francium Dust -item.itemDustTinyFrancium.name=Tiny Pile of Francium Dust -item.itemDustSmallFrancium.name=Small Pile of Francium Dust -item.itemNuggetFrancium.name=Francium Nugget -item.itemPlateFrancium.name=Francium Plate -item.itemPlateDoubleFrancium.name=Double Francium Plate -item.itemIngotRadium.name=Radium Ingot -item.itemDustRadium.name=Radium Dust -item.itemDustTinyRadium.name=Tiny Pile of Radium Dust -item.itemDustSmallRadium.name=Small Pile of Radium Dust -item.itemNuggetRadium.name=Radium Nugget -item.itemPlateRadium.name=Radium Plate -item.itemPlateDoubleRadium.name=Double Radium Plate -item.itemIngotActinium.name=Actinium Ingot -item.itemDustActinium.name=Actinium Dust -item.itemDustTinyActinium.name=Tiny Pile of Actinium Dust -item.itemDustSmallActinium.name=Small Pile of Actinium Dust -item.itemNuggetActinium.name=Actinium Nugget -item.itemPlateActinium.name=Actinium Plate -item.itemPlateDoubleActinium.name=Double Actinium Plate -item.itemIngotProtactinium.name=Protactinium Ingot -item.itemDustProtactinium.name=Protactinium Dust -item.itemDustTinyProtactinium.name=Tiny Pile of Protactinium Dust -item.itemDustSmallProtactinium.name=Small Pile of Protactinium Dust -item.itemNuggetProtactinium.name=Protactinium Nugget -item.itemPlateProtactinium.name=Protactinium Plate -item.itemPlateDoubleProtactinium.name=Double Protactinium Plate -item.itemIngotNeptunium.name=Neptunium Ingot -item.itemDustNeptunium.name=Neptunium Dust -item.itemDustTinyNeptunium.name=Tiny Pile of Neptunium Dust -item.itemDustSmallNeptunium.name=Small Pile of Neptunium Dust -item.itemNuggetNeptunium.name=Neptunium Nugget -item.itemPlateNeptunium.name=Neptunium Plate -item.itemPlateDoubleNeptunium.name=Double Neptunium Plate -item.itemIngotCurium.name=Curium Ingot -item.itemDustCurium.name=Curium Dust -item.itemDustTinyCurium.name=Tiny Pile of Curium Dust -item.itemDustSmallCurium.name=Small Pile of Curium Dust -item.itemNuggetCurium.name=Curium Nugget -item.itemPlateCurium.name=Curium Plate -item.itemPlateDoubleCurium.name=Double Curium Plate -item.itemIngotBerkelium.name=Berkelium Ingot -item.itemDustBerkelium.name=Berkelium Dust -item.itemDustTinyBerkelium.name=Tiny Pile of Berkelium Dust -item.itemDustSmallBerkelium.name=Small Pile of Berkelium Dust -item.itemNuggetBerkelium.name=Berkelium Nugget -item.itemPlateBerkelium.name=Berkelium Plate -item.itemPlateDoubleBerkelium.name=Double Berkelium Plate -item.itemIngotCalifornium.name=Californium Ingot -item.itemDustCalifornium.name=Californium Dust -item.itemDustTinyCalifornium.name=Tiny Pile of Californium Dust -item.itemDustSmallCalifornium.name=Small Pile of Californium Dust -item.itemNuggetCalifornium.name=Californium Nugget -item.itemPlateCalifornium.name=Californium Plate -item.itemPlateDoubleCalifornium.name=Double Californium Plate -item.itemIngotEinsteinium.name=Einsteinium Ingot -item.itemDustEinsteinium.name=Einsteinium Dust -item.itemDustTinyEinsteinium.name=Tiny Pile of Einsteinium Dust -item.itemDustSmallEinsteinium.name=Small Pile of Einsteinium Dust -item.itemNuggetEinsteinium.name=Einsteinium Nugget -item.itemPlateEinsteinium.name=Einsteinium Plate -item.itemPlateDoubleEinsteinium.name=Double Einsteinium Plate -item.itemIngotFermium.name=Fermium Ingot -item.itemDustFermium.name=Fermium Dust -item.itemDustTinyFermium.name=Tiny Pile of Fermium Dust -item.itemDustSmallFermium.name=Small Pile of Fermium Dust -item.itemNuggetFermium.name=Fermium Nugget -item.itemPlateFermium.name=Fermium Plate -item.itemPlateDoubleFermium.name=Double Fermium Plate -item.itemIngotLithium7.name=Lithium 7 Ingot -item.itemDustLithium7.name=Lithium 7 Dust -item.itemDustTinyLithium7.name=Tiny Pile of Lithium 7 Dust -item.itemDustSmallLithium7.name=Small Pile of Lithium 7 Dust -item.itemNuggetLithium7.name=Lithium 7 Nugget -item.itemPlateLithium7.name=Lithium 7 Plate -item.itemPlateDoubleLithium7.name=Double Lithium 7 Plate -item.itemIngotThorium232.name=Thorium 232 Ingot -item.itemDustThorium232.name=Thorium 232 Dust -item.itemDustTinyThorium232.name=Tiny Pile of Thorium 232 Dust -item.itemDustSmallThorium232.name=Small Pile of Thorium 232 Dust -item.itemNuggetThorium232.name=Thorium 232 Nugget -item.itemPlateThorium232.name=Thorium 232 Plate -item.itemPlateDoubleThorium232.name=Double Thorium 232 Plate -item.itemIngotUranium232.name=Uranium 232 Ingot -item.itemDustUranium232.name=Uranium 232 Dust -item.itemDustTinyUranium232.name=Tiny Pile of Uranium 232 Dust -item.itemDustSmallUranium232.name=Small Pile of Uranium 232 Dust -item.itemNuggetUranium232.name=Uranium 232 Nugget -item.itemPlateUranium232.name=Uranium 232 Plate -item.itemRodUranium232.name=Uranium 232 Rod -item.itemRodLongUranium232.name=Long Uranium 232 Rod -item.itemIngotUranium233.name=Uranium 233 Ingot -item.itemDustUranium233.name=Uranium 233 Dust -item.itemDustTinyUranium233.name=Tiny Pile of Uranium 233 Dust -item.itemDustSmallUranium233.name=Small Pile of Uranium 233 Dust -item.itemNuggetUranium233.name=Uranium 233 Nugget -item.itemPlateUranium233.name=Uranium 233 Plate -item.itemRodUranium233.name=Uranium 233 Rod -item.itemRodLongUranium233.name=Long Uranium 233 Rod -item.itemIngotPlutonium238.name=Plutonium 238 Ingot -item.itemDustPlutonium238.name=Plutonium 238 Dust -item.itemDustTinyPlutonium238.name=Tiny Pile of Plutonium 238 Dust -item.itemDustSmallPlutonium238.name=Small Pile of Plutonium 238 Dust -item.itemNuggetPlutonium238.name=Plutonium 238 Nugget -item.itemPlatePlutonium238.name=Plutonium 238 Plate -item.itemPlateDoublePlutonium238.name=Double Plutonium 238 Plate -item.itemIngotStrontium90.name=Strontium 90 Ingot -item.itemDustStrontium90.name=Strontium 90 Dust -item.itemDustTinyStrontium90.name=Tiny Pile of Strontium 90 Dust -item.itemDustSmallStrontium90.name=Small Pile of Strontium 90 Dust -item.itemNuggetStrontium90.name=Strontium 90 Nugget -item.itemPlateStrontium90.name=Strontium 90 Plate -item.itemPlateDoubleStrontium90.name=Double Strontium 90 Plate -item.itemIngotPolonium210.name=Polonium 210 Ingot -item.itemDustPolonium210.name=Polonium 210 Dust -item.itemDustTinyPolonium210.name=Tiny Pile of Polonium 210 Dust -item.itemDustSmallPolonium210.name=Small Pile of Polonium 210 Dust -item.itemNuggetPolonium210.name=Polonium 210 Nugget -item.itemPlatePolonium210.name=Polonium 210 Plate -item.itemPlateDoublePolonium210.name=Double Polonium 210 Plate -item.itemIngotAmericium241.name=Americium 241 Ingot -item.itemDustAmericium241.name=Americium 241 Dust -item.itemDustTinyAmericium241.name=Tiny Pile of Americium 241 Dust -item.itemDustSmallAmericium241.name=Small Pile of Americium 241 Dust -item.itemNuggetAmericium241.name=Americium 241 Nugget -item.itemPlateAmericium241.name=Americium 241 Plate -item.itemPlateDoubleAmericium241.name=Double Americium 241 Plate -item.itemIngotSiliconCarbide.name=Silicon Carbide Ingot -item.itemDustSiliconCarbide.name=Silicon Carbide Dust -item.itemDustTinySiliconCarbide.name=Tiny Pile of Silicon Carbide Dust -item.itemDustSmallSiliconCarbide.name=Small Pile of Silicon Carbide Dust -item.itemNuggetSiliconCarbide.name=Silicon Carbide Nugget -item.itemPlateSiliconCarbide.name=Silicon Carbide Plate -item.itemPlateDoubleSiliconCarbide.name=Double Silicon Carbide Plate -item.itemBoltSiliconCarbide.name=Silicon Carbide Bolt -item.itemRodSiliconCarbide.name=Silicon Carbide Rod -item.itemRodLongSiliconCarbide.name=Long Silicon Carbide Rod -item.itemRingSiliconCarbide.name=Silicon Carbide Ring -item.itemScrewSiliconCarbide.name=Silicon Carbide Screw -item.itemRotorSiliconCarbide.name=Silicon Carbide Rotor -item.itemGearSiliconCarbide.name=Silicon Carbide Gear -item.itemIngotZirconiumCarbide.name=Zirconium Carbide Ingot -item.itemHotIngotZirconiumCarbide.name=Hot Zirconium Carbide Ingot -item.itemDustZirconiumCarbide.name=Zirconium Carbide Dust -item.itemDustTinyZirconiumCarbide.name=Tiny Pile of Zirconium Carbide Dust -item.itemDustSmallZirconiumCarbide.name=Small Pile of Zirconium Carbide Dust -item.itemNuggetZirconiumCarbide.name=Zirconium Carbide Nugget -item.itemPlateZirconiumCarbide.name=Zirconium Carbide Plate -item.itemPlateDoubleZirconiumCarbide.name=Double Zirconium Carbide Plate -item.itemBoltZirconiumCarbide.name=Zirconium Carbide Bolt -item.itemRodZirconiumCarbide.name=Zirconium Carbide Rod -item.itemRodLongZirconiumCarbide.name=Long Zirconium Carbide Rod -item.itemRingZirconiumCarbide.name=Zirconium Carbide Ring -item.itemScrewZirconiumCarbide.name=Zirconium Carbide Screw -item.itemRotorZirconiumCarbide.name=Zirconium Carbide Rotor -item.itemGearZirconiumCarbide.name=Zirconium Carbide Gear -item.itemIngotTantalumCarbide.name=Tantalum Carbide Ingot -item.itemHotIngotTantalumCarbide.name=Hot Tantalum Carbide Ingot -item.itemDustTantalumCarbide.name=Tantalum Carbide Dust -item.itemDustTinyTantalumCarbide.name=Tiny Pile of Tantalum Carbide Dust -item.itemDustSmallTantalumCarbide.name=Small Pile of Tantalum Carbide Dust -item.itemNuggetTantalumCarbide.name=Tantalum Carbide Nugget -item.itemPlateTantalumCarbide.name=Tantalum Carbide Plate -item.itemPlateDoubleTantalumCarbide.name=Double Tantalum Carbide Plate -item.itemBoltTantalumCarbide.name=Tantalum Carbide Bolt -item.itemRodTantalumCarbide.name=Tantalum Carbide Rod -item.itemRodLongTantalumCarbide.name=Long Tantalum Carbide Rod -item.itemRingTantalumCarbide.name=Tantalum Carbide Ring -item.itemScrewTantalumCarbide.name=Tantalum Carbide Screw -item.itemRotorTantalumCarbide.name=Tantalum Carbide Rotor -item.itemGearTantalumCarbide.name=Tantalum Carbide Gear -item.itemIngotNiobiumCarbide.name=Niobium Carbide Ingot -item.itemHotIngotNiobiumCarbide.name=Hot Niobium Carbide Ingot -item.itemDustNiobiumCarbide.name=Niobium Carbide Dust -item.itemDustTinyNiobiumCarbide.name=Tiny Pile of Niobium Carbide Dust -item.itemDustSmallNiobiumCarbide.name=Small Pile of Niobium Carbide Dust -item.itemNuggetNiobiumCarbide.name=Niobium Carbide Nugget -item.itemPlateNiobiumCarbide.name=Niobium Carbide Plate -item.itemPlateDoubleNiobiumCarbide.name=Double Niobium Carbide Plate -item.itemBoltNiobiumCarbide.name=Niobium Carbide Bolt -item.itemRodNiobiumCarbide.name=Niobium Carbide Rod -item.itemRodLongNiobiumCarbide.name=Long Niobium Carbide Rod -item.itemRingNiobiumCarbide.name=Niobium Carbide Ring -item.itemScrewNiobiumCarbide.name=Niobium Carbide Screw -item.itemRotorNiobiumCarbide.name=Niobium Carbide Rotor -item.itemGearNiobiumCarbide.name=Niobium Carbide Gear -item.itemIngotBerylliumFluoride.name=Beryllium Fluoride Ingot -item.itemDustBerylliumFluoride.name=Beryllium Fluoride Dust -item.itemDustTinyBerylliumFluoride.name=Tiny Pile of Beryllium Fluoride Dust -item.itemDustSmallBerylliumFluoride.name=Small Pile of Beryllium Fluoride Dust -item.itemNuggetBerylliumFluoride.name=Beryllium Fluoride Nugget -item.itemPlateBerylliumFluoride.name=Beryllium Fluoride Plate -item.itemPlateDoubleBerylliumFluoride.name=Double Beryllium Fluoride Plate -item.itemIngotLithiumFluoride.name=Lithium Fluoride Ingot -item.itemDustLithiumFluoride.name=Lithium Fluoride Dust -item.itemDustTinyLithiumFluoride.name=Tiny Pile of Lithium Fluoride Dust -item.itemDustSmallLithiumFluoride.name=Small Pile of Lithium Fluoride Dust -item.itemNuggetLithiumFluoride.name=Lithium Fluoride Nugget -item.itemPlateLithiumFluoride.name=Lithium Fluoride Plate -item.itemPlateDoubleLithiumFluoride.name=Double Lithium Fluoride Plate -item.itemIngotThoriumTetrafluoride.name=Thorium Tetrafluoride Ingot -item.itemDustThoriumTetrafluoride.name=Thorium Tetrafluoride Dust -item.itemDustTinyThoriumTetrafluoride.name=Tiny Pile of Thorium Tetrafluoride Dust -item.itemDustSmallThoriumTetrafluoride.name=Small Pile of Thorium Tetrafluoride Dust -item.itemNuggetThoriumTetrafluoride.name=Thorium Tetrafluoride Nugget -item.itemPlateThoriumTetrafluoride.name=Thorium Tetrafluoride Plate -item.itemPlateDoubleThoriumTetrafluoride.name=Double Thorium Tetrafluoride Plate -item.itemIngotThoriumHexafluoride.name=Thorium Hexafluoride Ingot -item.itemDustThoriumHexafluoride.name=Thorium Hexafluoride Dust -item.itemDustTinyThoriumHexafluoride.name=Tiny Pile of Thorium Hexafluoride Dust -item.itemDustSmallThoriumHexafluoride.name=Small Pile of Thorium Hexafluoride Dust -item.itemNuggetThoriumHexafluoride.name=Thorium Hexafluoride Nugget -item.itemPlateThoriumHexafluoride.name=Thorium Hexafluoride Plate -item.itemPlateDoubleThoriumHexafluoride.name=Double Thorium Hexafluoride Plate -item.itemIngotUraniumTetrafluoride.name=Uranium Tetrafluoride Ingot -item.itemDustUraniumTetrafluoride.name=Uranium Tetrafluoride Dust -item.itemDustTinyUraniumTetrafluoride.name=Tiny Pile of Uranium Tetrafluoride Dust -item.itemDustSmallUraniumTetrafluoride.name=Small Pile of Uranium Tetrafluoride Dust -item.itemNuggetUraniumTetrafluoride.name=Uranium Tetrafluoride Nugget -item.itemPlateUraniumTetrafluoride.name=Uranium Tetrafluoride Plate -item.itemPlateDoubleUraniumTetrafluoride.name=Double Uranium Tetrafluoride Plate -item.itemIngotUraniumHexafluoride.name=Uranium Hexafluoride Ingot -item.itemDustUraniumHexafluoride.name=Uranium Hexafluoride Dust -item.itemDustTinyUraniumHexafluoride.name=Tiny Pile of Uranium Hexafluoride Dust -item.itemDustSmallUraniumHexafluoride.name=Small Pile of Uranium Hexafluoride Dust -item.itemNuggetUraniumHexafluoride.name=Uranium Hexafluoride Nugget -item.itemPlateUraniumHexafluoride.name=Uranium Hexafluoride Plate -item.itemPlateDoubleUraniumHexafluoride.name=Double Uranium Hexafluoride Plate -item.itemIngotZirconiumTetrafluoride.name=Zirconium Tetrafluoride Ingot -item.itemDustZirconiumTetrafluoride.name=Zirconium Tetrafluoride Dust -item.itemDustTinyZirconiumTetrafluoride.name=Tiny Pile of Zirconium Tetrafluoride Dust -item.itemDustSmallZirconiumTetrafluoride.name=Small Pile of Zirconium Tetrafluoride Dust -item.itemNuggetZirconiumTetrafluoride.name=Zirconium Tetrafluoride Nugget -item.itemPlateZirconiumTetrafluoride.name=Zirconium Tetrafluoride Plate -item.itemPlateDoubleZirconiumTetrafluoride.name=Double Zirconium Tetrafluoride Plate -item.itemIngotNeptuniumHexafluoride.name=Neptunium Hexafluoride Ingot -item.itemDustNeptuniumHexafluoride.name=Neptunium Hexafluoride Dust -item.itemDustTinyNeptuniumHexafluoride.name=Tiny Pile of Neptunium Hexafluoride Dust -item.itemDustSmallNeptuniumHexafluoride.name=Small Pile of Neptunium Hexafluoride Dust -item.itemNuggetNeptuniumHexafluoride.name=Neptunium Hexafluoride Nugget -item.itemPlateNeptuniumHexafluoride.name=Neptunium Hexafluoride Plate -item.itemPlateDoubleNeptuniumHexafluoride.name=Double Neptunium Hexafluoride Plate -item.itemIngotTechnetiumHexafluoride.name=Technetium Hexafluoride Ingot -item.itemDustTechnetiumHexafluoride.name=Technetium Hexafluoride Dust -item.itemDustTinyTechnetiumHexafluoride.name=Tiny Pile of Technetium Hexafluoride Dust -item.itemDustSmallTechnetiumHexafluoride.name=Small Pile of Technetium Hexafluoride Dust -item.itemNuggetTechnetiumHexafluoride.name=Technetium Hexafluoride Nugget -item.itemPlateTechnetiumHexafluoride.name=Technetium Hexafluoride Plate -item.itemPlateDoubleTechnetiumHexafluoride.name=Double Technetium Hexafluoride Plate -item.itemIngotSeleniumHexafluoride.name=Selenium Hexafluoride Ingot -item.itemDustSeleniumHexafluoride.name=Selenium Hexafluoride Dust -item.itemDustTinySeleniumHexafluoride.name=Tiny Pile of Selenium Hexafluoride Dust -item.itemDustSmallSeleniumHexafluoride.name=Small Pile of Selenium Hexafluoride Dust -item.itemNuggetSeleniumHexafluoride.name=Selenium Hexafluoride Nugget -item.itemPlateSeleniumHexafluoride.name=Selenium Hexafluoride Plate -item.itemPlateDoubleSeleniumHexafluoride.name=Double Selenium Hexafluoride Plate -item.itemIngotLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Ingot -item.itemDustLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Dust -item.itemDustTinyLiFBeF2ZrF4U235.name=Tiny Pile of LiFBeF2ZrF4U235 Dust -item.itemDustSmallLiFBeF2ZrF4U235.name=Small Pile of LiFBeF2ZrF4U235 Dust -item.itemNuggetLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Nugget -item.itemPlateLiFBeF2ZrF4U235.name=LiFBeF2ZrF4U235 Plate -item.itemPlateDoubleLiFBeF2ZrF4U235.name=Double LiFBeF2ZrF4U235 Plate -item.itemIngotLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Ingot -item.itemDustLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Dust -item.itemDustTinyLiFBeF2ZrF4UF4.name=Tiny Pile of LiFBeF2ZrF4UF4 Dust -item.itemDustSmallLiFBeF2ZrF4UF4.name=Small Pile of LiFBeF2ZrF4UF4 Dust -item.itemNuggetLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Nugget -item.itemPlateLiFBeF2ZrF4UF4.name=LiFBeF2ZrF4UF4 Plate -item.itemPlateDoubleLiFBeF2ZrF4UF4.name=Double LiFBeF2ZrF4UF4 Plate -item.itemIngotLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Ingot -item.itemDustLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Dust -item.itemDustTinyLiFBeF2ThF4UF4.name=Tiny Pile of LiFBeF2ThF4UF4 Dust -item.itemDustSmallLiFBeF2ThF4UF4.name=Small Pile of LiFBeF2ThF4UF4 Dust -item.itemNuggetLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Nugget -item.itemPlateLiFBeF2ThF4UF4.name=LiFBeF2ThF4UF4 Plate -item.itemPlateDoubleLiFBeF2ThF4UF4.name=Double LiFBeF2ThF4UF4 Plate -item.itemIngotEnergyCrystal.name=Energy Crystal Ingot -item.itemHotIngotEnergyCrystal.name=Hot Energy Crystal Ingot -item.itemDustEnergyCrystal.name=Energy Crystal Dust -item.itemDustTinyEnergyCrystal.name=Tiny Pile of Energy Crystal Dust -item.itemDustSmallEnergyCrystal.name=Small Pile of Energy Crystal Dust -item.itemNuggetEnergyCrystal.name=Energy Crystal Nugget -item.itemPlateEnergyCrystal.name=Energy Crystal Plate -item.itemPlateDoubleEnergyCrystal.name=Double Energy Crystal Plate -item.itemBoltEnergyCrystal.name=Energy Crystal Bolt -item.itemRodEnergyCrystal.name=Energy Crystal Rod -item.itemRodLongEnergyCrystal.name=Long Energy Crystal Rod -item.itemRingEnergyCrystal.name=Energy Crystal Ring -item.itemScrewEnergyCrystal.name=Energy Crystal Screw -item.itemRotorEnergyCrystal.name=Energy Crystal Rotor -item.itemGearEnergyCrystal.name=Energy Crystal Gear -item.itemIngotBloodSteel.name=Blood Steel Ingot -item.itemDustBloodSteel.name=Blood Steel Dust -item.itemDustTinyBloodSteel.name=Tiny Pile of Blood Steel Dust -item.itemDustSmallBloodSteel.name=Small Pile of Blood Steel Dust -item.itemNuggetBloodSteel.name=Blood Steel Nugget -item.itemPlateBloodSteel.name=Blood Steel Plate -item.itemPlateDoubleBloodSteel.name=Double Blood Steel Plate -item.itemBoltBloodSteel.name=Blood Steel Bolt -item.itemRodBloodSteel.name=Blood Steel Rod -item.itemRodLongBloodSteel.name=Long Blood Steel Rod -item.itemRingBloodSteel.name=Blood Steel Ring -item.itemScrewBloodSteel.name=Blood Steel Screw -item.itemRotorBloodSteel.name=Blood Steel Rotor -item.itemGearBloodSteel.name=Blood Steel Gear -item.itemIngotZeron100.name=Zeron-100 Ingot -item.itemHotIngotZeron100.name=Hot Zeron-100 Ingot -item.itemDustZeron100.name=Zeron-100 Dust -item.itemDustTinyZeron100.name=Tiny Pile of Zeron-100 Dust -item.itemDustSmallZeron100.name=Small Pile of Zeron-100 Dust -item.itemNuggetZeron100.name=Zeron-100 Nugget -item.itemPlateZeron100.name=Zeron-100 Plate -item.itemPlateDoubleZeron100.name=Double Zeron-100 Plate -item.itemBoltZeron100.name=Zeron-100 Bolt -item.itemRodZeron100.name=Zeron-100 Rod -item.itemRodLongZeron100.name=Long Zeron-100 Rod -item.itemRingZeron100.name=Zeron-100 Ring -item.itemScrewZeron100.name=Zeron-100 Screw -item.itemRotorZeron100.name=Zeron-100 Rotor -item.itemGearZeron100.name=Zeron-100 Gear -item.itemIngotTumbaga.name=Tumbaga Ingot -item.itemDustTumbaga.name=Tumbaga Dust -item.itemDustTinyTumbaga.name=Tiny Pile of Tumbaga Dust -item.itemDustSmallTumbaga.name=Small Pile of Tumbaga Dust -item.itemNuggetTumbaga.name=Tumbaga Nugget -item.itemPlateTumbaga.name=Tumbaga Plate -item.itemPlateDoubleTumbaga.name=Double Tumbaga Plate -item.itemBoltTumbaga.name=Tumbaga Bolt -item.itemRodTumbaga.name=Tumbaga Rod -item.itemRodLongTumbaga.name=Long Tumbaga Rod -item.itemRingTumbaga.name=Tumbaga Ring -item.itemScrewTumbaga.name=Tumbaga Screw -item.itemRotorTumbaga.name=Tumbaga Rotor -item.itemGearTumbaga.name=Tumbaga Gear -item.itemIngotPotin.name=Potin Ingot -item.itemDustPotin.name=Potin Dust -item.itemDustTinyPotin.name=Tiny Pile of Potin Dust -item.itemDustSmallPotin.name=Small Pile of Potin Dust -item.itemNuggetPotin.name=Potin Nugget -item.itemPlatePotin.name=Potin Plate -item.itemPlateDoublePotin.name=Double Potin Plate -item.itemBoltPotin.name=Potin Bolt -item.itemRodPotin.name=Potin Rod -item.itemRodLongPotin.name=Long Potin Rod -item.itemRingPotin.name=Potin Ring -item.itemScrewPotin.name=Potin Screw -item.itemRotorPotin.name=Potin Rotor -item.itemGearPotin.name=Potin Gear -item.itemIngotStaballoy.name=Staballoy Ingot -item.itemHotIngotStaballoy.name=Hot Staballoy Ingot -item.itemDustStaballoy.name=Staballoy Dust -item.itemDustTinyStaballoy.name=Tiny Pile of Staballoy Dust -item.itemDustSmallStaballoy.name=Small Pile of Staballoy Dust -item.itemNuggetStaballoy.name=Staballoy Nugget -item.itemPlateStaballoy.name=Staballoy Plate -item.itemPlateDoubleStaballoy.name=Double Staballoy Plate -item.itemBoltStaballoy.name=Staballoy Bolt -item.itemRodStaballoy.name=Staballoy Rod -item.itemRodLongStaballoy.name=Long Staballoy Rod -item.itemRingStaballoy.name=Staballoy Ring -item.itemScrewStaballoy.name=Staballoy Screw -item.itemRotorStaballoy.name=Staballoy Rotor -item.itemGearStaballoy.name=Staballoy Gear -item.itemIngotTantalloy60.name=Tantalloy-60 Ingot -item.itemHotIngotTantalloy60.name=Hot Tantalloy-60 Ingot -item.itemDustTantalloy60.name=Tantalloy-60 Dust -item.itemDustTinyTantalloy60.name=Tiny Pile of Tantalloy-60 Dust -item.itemDustSmallTantalloy60.name=Small Pile of Tantalloy-60 Dust -item.itemNuggetTantalloy60.name=Tantalloy-60 Nugget -item.itemPlateTantalloy60.name=Tantalloy-60 Plate -item.itemPlateDoubleTantalloy60.name=Double Tantalloy-60 Plate -item.itemBoltTantalloy60.name=Tantalloy-60 Bolt -item.itemRodTantalloy60.name=Tantalloy-60 Rod -item.itemRodLongTantalloy60.name=Long Tantalloy-60 Rod -item.itemRingTantalloy60.name=Tantalloy-60 Ring -item.itemScrewTantalloy60.name=Tantalloy-60 Screw -item.itemRotorTantalloy60.name=Tantalloy-60 Rotor -item.itemGearTantalloy60.name=Tantalloy-60 Gear -item.itemIngotTantalloy61.name=Tantalloy-61 Ingot -item.itemHotIngotTantalloy61.name=Hot Tantalloy-61 Ingot -item.itemDustTantalloy61.name=Tantalloy-61 Dust -item.itemDustTinyTantalloy61.name=Tiny Pile of Tantalloy-61 Dust -item.itemDustSmallTantalloy61.name=Small Pile of Tantalloy-61 Dust -item.itemNuggetTantalloy61.name=Tantalloy-61 Nugget -item.itemPlateTantalloy61.name=Tantalloy-61 Plate -item.itemPlateDoubleTantalloy61.name=Double Tantalloy-61 Plate -item.itemBoltTantalloy61.name=Tantalloy-61 Bolt -item.itemRodTantalloy61.name=Tantalloy-61 Rod -item.itemRodLongTantalloy61.name=Long Tantalloy-61 Rod -item.itemRingTantalloy61.name=Tantalloy-61 Ring -item.itemScrewTantalloy61.name=Tantalloy-61 Screw -item.itemRotorTantalloy61.name=Tantalloy-61 Rotor -item.itemGearTantalloy61.name=Tantalloy-61 Gear -item.itemIngotInconel625.name=Inconel-625 Ingot -item.itemHotIngotInconel625.name=Hot Inconel-625 Ingot -item.itemDustInconel625.name=Inconel-625 Dust -item.itemDustTinyInconel625.name=Tiny Pile of Inconel-625 Dust -item.itemDustSmallInconel625.name=Small Pile of Inconel-625 Dust -item.itemNuggetInconel625.name=Inconel-625 Nugget -item.itemPlateInconel625.name=Inconel-625 Plate -item.itemPlateDoubleInconel625.name=Double Inconel-625 Plate -item.itemBoltInconel625.name=Inconel-625 Bolt -item.itemRodInconel625.name=Inconel-625 Rod -item.itemRodLongInconel625.name=Long Inconel-625 Rod -item.itemRingInconel625.name=Inconel-625 Ring -item.itemScrewInconel625.name=Inconel-625 Screw -item.itemRotorInconel625.name=Inconel-625 Rotor -item.itemGearInconel625.name=Inconel-625 Gear -item.itemIngotInconel690.name=Inconel-690 Ingot -item.itemHotIngotInconel690.name=Hot Inconel-690 Ingot -item.itemDustInconel690.name=Inconel-690 Dust -item.itemDustTinyInconel690.name=Tiny Pile of Inconel-690 Dust -item.itemDustSmallInconel690.name=Small Pile of Inconel-690 Dust -item.itemNuggetInconel690.name=Inconel-690 Nugget -item.itemPlateInconel690.name=Inconel-690 Plate -item.itemPlateDoubleInconel690.name=Double Inconel-690 Plate -item.itemBoltInconel690.name=Inconel-690 Bolt -item.itemRodInconel690.name=Inconel-690 Rod -item.itemRodLongInconel690.name=Long Inconel-690 Rod -item.itemRingInconel690.name=Inconel-690 Ring -item.itemScrewInconel690.name=Inconel-690 Screw -item.itemRotorInconel690.name=Inconel-690 Rotor -item.itemGearInconel690.name=Inconel-690 Gear -item.itemIngotInconel792.name=Inconel-792 Ingot -item.itemHotIngotInconel792.name=Hot Inconel-792 Ingot -item.itemDustInconel792.name=Inconel-792 Dust -item.itemDustTinyInconel792.name=Tiny Pile of Inconel-792 Dust -item.itemDustSmallInconel792.name=Small Pile of Inconel-792 Dust -item.itemNuggetInconel792.name=Inconel-792 Nugget -item.itemPlateInconel792.name=Inconel-792 Plate -item.itemPlateDoubleInconel792.name=Double Inconel-792 Plate -item.itemBoltInconel792.name=Inconel-792 Bolt -item.itemRodInconel792.name=Inconel-792 Rod -item.itemRodLongInconel792.name=Long Inconel-792 Rod -item.itemRingInconel792.name=Inconel-792 Ring -item.itemScrewInconel792.name=Inconel-792 Screw -item.itemRotorInconel792.name=Inconel-792 Rotor -item.itemGearInconel792.name=Inconel-792 Gear -item.itemDustEglinSteelBaseCompound.name=Eglin Steel Base Compound Dust -item.itemDustTinyEglinSteelBaseCompound.name=Tiny Pile of Eglin Steel Base Compound Dust -item.itemDustSmallEglinSteelBaseCompound.name=Small Pile of Eglin Steel Base Compound Dust -item.itemIngotEglinSteel.name=Eglin Steel Ingot -item.itemDustEglinSteel.name=Eglin Steel Dust -item.itemDustTinyEglinSteel.name=Tiny Pile of Eglin Steel Dust -item.itemDustSmallEglinSteel.name=Small Pile of Eglin Steel Dust -item.itemNuggetEglinSteel.name=Eglin Steel Nugget -item.itemPlateEglinSteel.name=Eglin Steel Plate -item.itemPlateDoubleEglinSteel.name=Double Eglin Steel Plate -item.itemBoltEglinSteel.name=Eglin Steel Bolt -item.itemRodEglinSteel.name=Eglin Steel Rod -item.itemRodLongEglinSteel.name=Long Eglin Steel Rod -item.itemRingEglinSteel.name=Eglin Steel Ring -item.itemScrewEglinSteel.name=Eglin Steel Screw -item.itemRotorEglinSteel.name=Eglin Steel Rotor -item.itemGearEglinSteel.name=Eglin Steel Gear -item.itemIngotMaragingSteel250.name=Maraging Steel 250 Ingot -item.itemHotIngotMaragingSteel250.name=Hot Maraging Steel 250 Ingot -item.itemDustMaragingSteel250.name=Maraging Steel 250 Dust -item.itemDustTinyMaragingSteel250.name=Tiny Pile of Maraging Steel 250 Dust -item.itemDustSmallMaragingSteel250.name=Small Pile of Maraging Steel 250 Dust -item.itemNuggetMaragingSteel250.name=Maraging Steel 250 Nugget -item.itemPlateMaragingSteel250.name=Maraging Steel 250 Plate -item.itemPlateDoubleMaragingSteel250.name=Double Maraging Steel 250 Plate -item.itemBoltMaragingSteel250.name=Maraging Steel 250 Bolt -item.itemRodMaragingSteel250.name=Maraging Steel 250 Rod -item.itemRodLongMaragingSteel250.name=Long Maraging Steel 250 Rod -item.itemRingMaragingSteel250.name=Maraging Steel 250 Ring -item.itemScrewMaragingSteel250.name=Maraging Steel 250 Screw -item.itemRotorMaragingSteel250.name=Maraging Steel 250 Rotor -item.itemGearMaragingSteel250.name=Maraging Steel 250 Gear -item.itemIngotMaragingSteel300.name=Maraging Steel 300 Ingot -item.itemHotIngotMaragingSteel300.name=Hot Maraging Steel 300 Ingot -item.itemDustMaragingSteel300.name=Maraging Steel 300 Dust -item.itemDustTinyMaragingSteel300.name=Tiny Pile of Maraging Steel 300 Dust -item.itemDustSmallMaragingSteel300.name=Small Pile of Maraging Steel 300 Dust -item.itemNuggetMaragingSteel300.name=Maraging Steel 300 Nugget -item.itemPlateMaragingSteel300.name=Maraging Steel 300 Plate -item.itemPlateDoubleMaragingSteel300.name=Double Maraging Steel 300 Plate -item.itemBoltMaragingSteel300.name=Maraging Steel 300 Bolt -item.itemRodMaragingSteel300.name=Maraging Steel 300 Rod -item.itemRodLongMaragingSteel300.name=Long Maraging Steel 300 Rod -item.itemRingMaragingSteel300.name=Maraging Steel 300 Ring -item.itemScrewMaragingSteel300.name=Maraging Steel 300 Screw -item.itemRotorMaragingSteel300.name=Maraging Steel 300 Rotor -item.itemGearMaragingSteel300.name=Maraging Steel 300 Gear -item.itemIngotMaragingSteel350.name=Maraging Steel 350 Ingot -item.itemHotIngotMaragingSteel350.name=Hot Maraging Steel 350 Ingot -item.itemDustMaragingSteel350.name=Maraging Steel 350 Dust -item.itemDustTinyMaragingSteel350.name=Tiny Pile of Maraging Steel 350 Dust -item.itemDustSmallMaragingSteel350.name=Small Pile of Maraging Steel 350 Dust -item.itemNuggetMaragingSteel350.name=Maraging Steel 350 Nugget -item.itemPlateMaragingSteel350.name=Maraging Steel 350 Plate -item.itemPlateDoubleMaragingSteel350.name=Double Maraging Steel 350 Plate -item.itemBoltMaragingSteel350.name=Maraging Steel 350 Bolt -item.itemRodMaragingSteel350.name=Maraging Steel 350 Rod -item.itemRodLongMaragingSteel350.name=Long Maraging Steel 350 Rod -item.itemRingMaragingSteel350.name=Maraging Steel 350 Ring -item.itemScrewMaragingSteel350.name=Maraging Steel 350 Screw -item.itemRotorMaragingSteel350.name=Maraging Steel 350 Rotor -item.itemGearMaragingSteel350.name=Maraging Steel 350 Gear -item.itemIngotStellite.name=Stellite Ingot -item.itemHotIngotStellite.name=Hot Stellite Ingot -item.itemDustStellite.name=Stellite Dust -item.itemDustTinyStellite.name=Tiny Pile of Stellite Dust -item.itemDustSmallStellite.name=Small Pile of Stellite Dust -item.itemNuggetStellite.name=Stellite Nugget -item.itemPlateStellite.name=Stellite Plate -item.itemPlateDoubleStellite.name=Double Stellite Plate -item.itemBoltStellite.name=Stellite Bolt -item.itemRodStellite.name=Stellite Rod -item.itemRodLongStellite.name=Long Stellite Rod -item.itemRingStellite.name=Stellite Ring -item.itemScrewStellite.name=Stellite Screw -item.itemRotorStellite.name=Stellite Rotor -item.itemGearStellite.name=Stellite Gear -item.itemIngotTalonite.name=Talonite Ingot -item.itemDustTalonite.name=Talonite Dust -item.itemDustTinyTalonite.name=Tiny Pile of Talonite Dust -item.itemDustSmallTalonite.name=Small Pile of Talonite Dust -item.itemNuggetTalonite.name=Talonite Nugget -item.itemPlateTalonite.name=Talonite Plate -item.itemPlateDoubleTalonite.name=Double Talonite Plate -item.itemBoltTalonite.name=Talonite Bolt -item.itemRodTalonite.name=Talonite Rod -item.itemRodLongTalonite.name=Long Talonite Rod -item.itemRingTalonite.name=Talonite Ring -item.itemScrewTalonite.name=Talonite Screw -item.itemRotorTalonite.name=Talonite Rotor -item.itemGearTalonite.name=Talonite Gear -item.itemIngotHastelloyW.name=Hastelloy-W Ingot -item.itemDustHastelloyW.name=Hastelloy-W Dust -item.itemDustTinyHastelloyW.name=Tiny Pile of Hastelloy-W Dust -item.itemDustSmallHastelloyW.name=Small Pile of Hastelloy-W Dust -item.itemNuggetHastelloyW.name=Hastelloy-W Nugget -item.itemPlateHastelloyW.name=Hastelloy-W Plate -item.itemPlateDoubleHastelloyW.name=Double Hastelloy-W Plate -item.itemBoltHastelloyW.name=Hastelloy-W Bolt -item.itemRodHastelloyW.name=Hastelloy-W Rod -item.itemRodLongHastelloyW.name=Long Hastelloy-W Rod -item.itemRingHastelloyW.name=Hastelloy-W Ring -item.itemScrewHastelloyW.name=Hastelloy-W Screw -item.itemRotorHastelloyW.name=Hastelloy-W Rotor -item.itemGearHastelloyW.name=Hastelloy-W Gear -item.itemIngotHastelloyX.name=Hastelloy-X Ingot -item.itemDustHastelloyX.name=Hastelloy-X Dust -item.itemDustTinyHastelloyX.name=Tiny Pile of Hastelloy-X Dust -item.itemDustSmallHastelloyX.name=Small Pile of Hastelloy-X Dust -item.itemNuggetHastelloyX.name=Hastelloy-X Nugget -item.itemPlateHastelloyX.name=Hastelloy-X Plate -item.itemPlateDoubleHastelloyX.name=Double Hastelloy-X Plate -item.itemBoltHastelloyX.name=Hastelloy-X Bolt -item.itemRodHastelloyX.name=Hastelloy-X Rod -item.itemRodLongHastelloyX.name=Long Hastelloy-X Rod -item.itemRingHastelloyX.name=Hastelloy-X Ring -item.itemScrewHastelloyX.name=Hastelloy-X Screw -item.itemRotorHastelloyX.name=Hastelloy-X Rotor -item.itemGearHastelloyX.name=Hastelloy-X Gear -item.itemIngotHastelloyC276.name=Hastelloy-C276 Ingot -item.itemHotIngotHastelloyC276.name=Hot Hastelloy-C276 Ingot -item.itemDustHastelloyC276.name=Hastelloy-C276 Dust -item.itemDustTinyHastelloyC276.name=Tiny Pile of Hastelloy-C276 Dust -item.itemDustSmallHastelloyC276.name=Small Pile of Hastelloy-C276 Dust -item.itemNuggetHastelloyC276.name=Hastelloy-C276 Nugget -item.itemPlateHastelloyC276.name=Hastelloy-C276 Plate -item.itemPlateDoubleHastelloyC276.name=Double Hastelloy-C276 Plate -item.itemBoltHastelloyC276.name=Hastelloy-C276 Bolt -item.itemRodHastelloyC276.name=Hastelloy-C276 Rod -item.itemRodLongHastelloyC276.name=Long Hastelloy-C276 Rod -item.itemRingHastelloyC276.name=Hastelloy-C276 Ring -item.itemScrewHastelloyC276.name=Hastelloy-C276 Screw -item.itemRotorHastelloyC276.name=Hastelloy-C276 Rotor -item.itemGearHastelloyC276.name=Hastelloy-C276 Gear -item.itemIngotHastelloyN.name=Hastelloy-N Ingot -item.itemHotIngotHastelloyN.name=Hot Hastelloy-N Ingot -item.itemDustHastelloyN.name=Hastelloy-N Dust -item.itemDustTinyHastelloyN.name=Tiny Pile of Hastelloy-N Dust -item.itemDustSmallHastelloyN.name=Small Pile of Hastelloy-N Dust -item.itemNuggetHastelloyN.name=Hastelloy-N Nugget -item.itemPlateHastelloyN.name=Hastelloy-N Plate -item.itemPlateDoubleHastelloyN.name=Double Hastelloy-N Plate -item.itemBoltHastelloyN.name=Hastelloy-N Bolt -item.itemRodHastelloyN.name=Hastelloy-N Rod -item.itemRodLongHastelloyN.name=Long Hastelloy-N Rod -item.itemRingHastelloyN.name=Hastelloy-N Ring -item.itemScrewHastelloyN.name=Hastelloy-N Screw -item.itemRotorHastelloyN.name=Hastelloy-N Rotor -item.itemGearHastelloyN.name=Hastelloy-N Gear -item.itemIngotIncoloy020.name=Incoloy-020 Ingot -item.itemDustIncoloy020.name=Incoloy-020 Dust -item.itemDustTinyIncoloy020.name=Tiny Pile of Incoloy-020 Dust -item.itemDustSmallIncoloy020.name=Small Pile of Incoloy-020 Dust -item.itemNuggetIncoloy020.name=Incoloy-020 Nugget -item.itemPlateIncoloy020.name=Incoloy-020 Plate -item.itemPlateDoubleIncoloy020.name=Double Incoloy-020 Plate -item.itemBoltIncoloy020.name=Incoloy-020 Bolt -item.itemRodIncoloy020.name=Incoloy-020 Rod -item.itemRodLongIncoloy020.name=Long Incoloy-020 Rod -item.itemRingIncoloy020.name=Incoloy-020 Ring -item.itemScrewIncoloy020.name=Incoloy-020 Screw -item.itemRotorIncoloy020.name=Incoloy-020 Rotor -item.itemGearIncoloy020.name=Incoloy-020 Gear -item.itemIngotIncoloyDS.name=Incoloy-DS Ingot -item.itemDustIncoloyDS.name=Incoloy-DS Dust -item.itemDustTinyIncoloyDS.name=Tiny Pile of Incoloy-DS Dust -item.itemDustSmallIncoloyDS.name=Small Pile of Incoloy-DS Dust -item.itemNuggetIncoloyDS.name=Incoloy-DS Nugget -item.itemPlateIncoloyDS.name=Incoloy-DS Plate -item.itemPlateDoubleIncoloyDS.name=Double Incoloy-DS Plate -item.itemBoltIncoloyDS.name=Incoloy-DS Bolt -item.itemRodIncoloyDS.name=Incoloy-DS Rod -item.itemRodLongIncoloyDS.name=Long Incoloy-DS Rod -item.itemRingIncoloyDS.name=Incoloy-DS Ring -item.itemScrewIncoloyDS.name=Incoloy-DS Screw -item.itemRotorIncoloyDS.name=Incoloy-DS Rotor -item.itemGearIncoloyDS.name=Incoloy-DS Gear -item.itemIngotIncoloyMA956.name=Incoloy-MA956 Ingot -item.itemHotIngotIncoloyMA956.name=Hot Incoloy-MA956 Ingot -item.itemDustIncoloyMA956.name=Incoloy-MA956 Dust -item.itemDustTinyIncoloyMA956.name=Tiny Pile of Incoloy-MA956 Dust -item.itemDustSmallIncoloyMA956.name=Small Pile of Incoloy-MA956 Dust -item.itemNuggetIncoloyMA956.name=Incoloy-MA956 Nugget -item.itemPlateIncoloyMA956.name=Incoloy-MA956 Plate -item.itemPlateDoubleIncoloyMA956.name=Double Incoloy-MA956 Plate -item.itemBoltIncoloyMA956.name=Incoloy-MA956 Bolt -item.itemRodIncoloyMA956.name=Incoloy-MA956 Rod -item.itemRodLongIncoloyMA956.name=Long Incoloy-MA956 Rod -item.itemRingIncoloyMA956.name=Incoloy-MA956 Ring -item.itemScrewIncoloyMA956.name=Incoloy-MA956 Screw -item.itemRotorIncoloyMA956.name=Incoloy-MA956 Rotor -item.itemGearIncoloyMA956.name=Incoloy-MA956 Gear -item.itemIngotGrisium.name=Grisium Ingot -item.itemHotIngotGrisium.name=Hot Grisium Ingot -item.itemDustGrisium.name=Grisium Dust -item.itemDustTinyGrisium.name=Tiny Pile of Grisium Dust -item.itemDustSmallGrisium.name=Small Pile of Grisium Dust -item.itemNuggetGrisium.name=Grisium Nugget -item.itemPlateGrisium.name=Grisium Plate -item.itemPlateDoubleGrisium.name=Double Grisium Plate -item.itemBoltGrisium.name=Grisium Bolt -item.itemRodGrisium.name=Grisium Rod -item.itemRodLongGrisium.name=Long Grisium Rod -item.itemRingGrisium.name=Grisium Ring -item.itemScrewGrisium.name=Grisium Screw -item.itemRotorGrisium.name=Grisium Rotor -item.itemGearGrisium.name=Grisium Gear -item.itemIngotHG1223.name=HG-1223 Ingot -item.itemDustHG1223.name=HG-1223 Dust -item.itemDustTinyHG1223.name=Tiny Pile of HG-1223 Dust -item.itemDustSmallHG1223.name=Small Pile of HG-1223 Dust -item.itemNuggetHG1223.name=HG-1223 Nugget -item.itemPlateHG1223.name=HG-1223 Plate -item.itemPlateDoubleHG1223.name=Double HG-1223 Plate -item.itemIngotTrinium.name=Trinium Ingot -item.itemDustTrinium.name=Trinium Dust -item.itemDustTinyTrinium.name=Tiny Pile of Trinium Dust -item.itemDustSmallTrinium.name=Small Pile of Trinium Dust -item.itemNuggetTrinium.name=Trinium Nugget -item.itemPlateTrinium.name=Trinium Plate -item.itemPlateDoubleTrinium.name=Double Trinium Plate -item.itemIngotRefinedTrinium.name=Refined Trinium Ingot -item.itemDustRefinedTrinium.name=Refined Trinium Dust -item.itemDustTinyRefinedTrinium.name=Tiny Pile of Refined Trinium Dust -item.itemDustSmallRefinedTrinium.name=Small Pile of Refined Trinium Dust -item.itemNuggetRefinedTrinium.name=Refined Trinium Nugget -item.itemPlateRefinedTrinium.name=Refined Trinium Plate -item.itemPlateDoubleRefinedTrinium.name=Double Refined Trinium Plate -item.itemIngotTriniumTitaniumAlloy.name=Trinium Titanium Alloy Ingot -item.itemHotIngotTriniumTitaniumAlloy.name=Hot Trinium Titanium Alloy Ingot -item.itemDustTriniumTitaniumAlloy.name=Trinium Titanium Alloy Dust -item.itemDustTinyTriniumTitaniumAlloy.name=Tiny Pile of Trinium Titanium Alloy Dust -item.itemDustSmallTriniumTitaniumAlloy.name=Small Pile of Trinium Titanium Alloy Dust -item.itemNuggetTriniumTitaniumAlloy.name=Trinium Titanium Alloy Nugget -item.itemPlateTriniumTitaniumAlloy.name=Trinium Titanium Alloy Plate -item.itemPlateDoubleTriniumTitaniumAlloy.name=Double Trinium Titanium Alloy Plate -item.itemBoltTriniumTitaniumAlloy.name=Trinium Titanium Alloy Bolt -item.itemRodTriniumTitaniumAlloy.name=Trinium Titanium Alloy Rod -item.itemRodLongTriniumTitaniumAlloy.name=Long Trinium Titanium Alloy Rod -item.itemRingTriniumTitaniumAlloy.name=Trinium Titanium Alloy Ring -item.itemScrewTriniumTitaniumAlloy.name=Trinium Titanium Alloy Screw -item.itemRotorTriniumTitaniumAlloy.name=Trinium Titanium Alloy Rotor -item.itemGearTriniumTitaniumAlloy.name=Trinium Titanium Alloy Gear -item.itemIngotTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Ingot -item.itemDustTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Dust -item.itemDustTinyTriniumNaquadahAlloy.name=Tiny Pile of Trinium Naquadah Alloy Dust -item.itemDustSmallTriniumNaquadahAlloy.name=Small Pile of Trinium Naquadah Alloy Dust -item.itemNuggetTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Nugget -item.itemPlateTriniumNaquadahAlloy.name=Trinium Naquadah Alloy Plate -item.itemPlateDoubleTriniumNaquadahAlloy.name=Double Trinium Naquadah Alloy Plate -item.itemIngotTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Ingot -item.itemHotIngotTriniumNaquadahCarbonite.name=Hot Trinium Naquadah Carbonite Ingot -item.itemDustTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Dust -item.itemDustTinyTriniumNaquadahCarbonite.name=Tiny Pile of Trinium Naquadah Carbonite Dust -item.itemDustSmallTriniumNaquadahCarbonite.name=Small Pile of Trinium Naquadah Carbonite Dust -item.itemNuggetTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Nugget -item.itemPlateTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Plate -item.itemPlateDoubleTriniumNaquadahCarbonite.name=Double Trinium Naquadah Carbonite Plate -item.itemBoltTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Bolt -item.itemRodTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Rod -item.itemRodLongTriniumNaquadahCarbonite.name=Long Trinium Naquadah Carbonite Rod -item.itemRingTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Ring -item.itemScrewTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Screw -item.itemRotorTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Rotor -item.itemGearTriniumNaquadahCarbonite.name=Trinium Naquadah Carbonite Gear -item.itemIngotQuantum.name=Quantum Ingot -item.itemHotIngotQuantum.name=Hot Quantum Ingot -item.itemDustQuantum.name=Quantum Dust -item.itemDustTinyQuantum.name=Tiny Pile of Quantum Dust -item.itemDustSmallQuantum.name=Small Pile of Quantum Dust -item.itemNuggetQuantum.name=Quantum Nugget -item.itemPlateQuantum.name=Quantum Plate -item.itemPlateDoubleQuantum.name=Double Quantum Plate -item.itemBoltQuantum.name=Quantum Bolt -item.itemRodQuantum.name=Quantum Rod -item.itemRodLongQuantum.name=Long Quantum Rod -item.itemRingQuantum.name=Quantum Ring -item.itemScrewQuantum.name=Quantum Screw -item.itemRotorQuantum.name=Quantum Rotor -item.itemGearQuantum.name=Quantum Gear -item.itemDustFluorite.name=Fluorite Dust -item.itemDustTinyFluorite.name=Tiny Pile of Fluorite Dust -item.itemDustSmallFluorite.name=Small Pile of Fluorite Dust -item.crushedFluorite.name=Crushed Fluorite Ore -item.crushedCentrifugedFluorite.name=Centrifuged Crushed Fluorite Ore -item.crushedPurifiedFluorite.name=Purified Crushed Fluorite Ore -item.dustImpureFluorite.name=Impure Fluorite Dust -item.dustPureFluorite.name=Purified Fluorite Dust -item.itemDustCrocoite.name=Crocoite Dust -item.itemDustTinyCrocoite.name=Tiny Pile of Crocoite Dust -item.itemDustSmallCrocoite.name=Small Pile of Crocoite Dust -item.crushedCrocoite.name=Crushed Crocoite Ore -item.crushedCentrifugedCrocoite.name=Centrifuged Crushed Crocoite Ore -item.crushedPurifiedCrocoite.name=Purified Crushed Crocoite Ore -item.dustImpureCrocoite.name=Impure Crocoite Dust -item.dustPureCrocoite.name=Purified Crocoite Dust -item.itemDustGeikielite.name=Geikielite Dust -item.itemDustTinyGeikielite.name=Tiny Pile of Geikielite Dust -item.itemDustSmallGeikielite.name=Small Pile of Geikielite Dust -item.crushedGeikielite.name=Crushed Geikielite Ore -item.crushedCentrifugedGeikielite.name=Centrifuged Crushed Geikielite Ore -item.crushedPurifiedGeikielite.name=Purified Crushed Geikielite Ore -item.dustImpureGeikielite.name=Impure Geikielite Dust -item.dustPureGeikielite.name=Purified Geikielite Dust -item.itemDustNichromite.name=Nichromite Dust -item.itemDustTinyNichromite.name=Tiny Pile of Nichromite Dust -item.itemDustSmallNichromite.name=Small Pile of Nichromite Dust -item.crushedNichromite.name=Crushed Nichromite Ore -item.crushedCentrifugedNichromite.name=Centrifuged Crushed Nichromite Ore -item.crushedPurifiedNichromite.name=Purified Crushed Nichromite Ore -item.dustImpureNichromite.name=Impure Nichromite Dust -item.dustPureNichromite.name=Purified Nichromite Dust -item.itemDustTitanite.name=Titanite Dust -item.itemDustTinyTitanite.name=Tiny Pile of Titanite Dust -item.itemDustSmallTitanite.name=Small Pile of Titanite Dust -item.crushedTitanite.name=Crushed Titanite Ore -item.crushedCentrifugedTitanite.name=Centrifuged Crushed Titanite Ore -item.crushedPurifiedTitanite.name=Purified Crushed Titanite Ore -item.dustImpureTitanite.name=Impure Titanite Dust -item.dustPureTitanite.name=Purified Titanite Dust -item.itemDustZimbabweite.name=Zimbabweite Dust -item.itemDustTinyZimbabweite.name=Tiny Pile of Zimbabweite Dust -item.itemDustSmallZimbabweite.name=Small Pile of Zimbabweite Dust -item.crushedZimbabweite.name=Crushed Zimbabweite Ore -item.crushedCentrifugedZimbabweite.name=Centrifuged Crushed Zimbabweite Ore -item.crushedPurifiedZimbabweite.name=Purified Crushed Zimbabweite Ore -item.dustImpureZimbabweite.name=Impure Zimbabweite Dust -item.dustPureZimbabweite.name=Purified Zimbabweite Dust -item.itemDustZirconolite.name=Zirconolite Dust -item.itemDustTinyZirconolite.name=Tiny Pile of Zirconolite Dust -item.itemDustSmallZirconolite.name=Small Pile of Zirconolite Dust -item.crushedZirconolite.name=Crushed Zirconolite Ore -item.crushedCentrifugedZirconolite.name=Centrifuged Crushed Zirconolite Ore -item.crushedPurifiedZirconolite.name=Purified Crushed Zirconolite Ore -item.dustImpureZirconolite.name=Impure Zirconolite Dust -item.dustPureZirconolite.name=Purified Zirconolite Dust -item.itemDustGadoliniteCe.name=Gadolinite (Ce) Dust -item.itemDustTinyGadoliniteCe.name=Tiny Pile of Gadolinite (Ce) Dust -item.itemDustSmallGadoliniteCe.name=Small Pile of Gadolinite (Ce) Dust -item.crushedGadoliniteCe.name=Crushed Gadolinite (Ce) Ore -item.crushedCentrifugedGadoliniteCe.name=Centrifuged Crushed Gadolinite (Ce) Ore -item.crushedPurifiedGadoliniteCe.name=Purified Crushed Gadolinite (Ce) Ore -item.dustImpureGadoliniteCe.name=Impure Gadolinite (Ce) Dust -item.dustPureGadoliniteCe.name=Purified Gadolinite (Ce) Dust -item.itemDustGadoliniteY.name=Gadolinite (Y) Dust -item.itemDustTinyGadoliniteY.name=Tiny Pile of Gadolinite (Y) Dust -item.itemDustSmallGadoliniteY.name=Small Pile of Gadolinite (Y) Dust -item.crushedGadoliniteY.name=Crushed Gadolinite (Y) Ore -item.crushedCentrifugedGadoliniteY.name=Centrifuged Crushed Gadolinite (Y) Ore -item.crushedPurifiedGadoliniteY.name=Purified Crushed Gadolinite (Y) Ore -item.dustImpureGadoliniteY.name=Impure Gadolinite (Y) Dust -item.dustPureGadoliniteY.name=Purified Gadolinite (Y) Dust -item.itemDustLepersonnite.name=Lepersonnite Dust -item.itemDustTinyLepersonnite.name=Tiny Pile of Lepersonnite Dust -item.itemDustSmallLepersonnite.name=Small Pile of Lepersonnite Dust -item.crushedLepersonnite.name=Crushed Lepersonnite Ore -item.crushedCentrifugedLepersonnite.name=Centrifuged Crushed Lepersonnite Ore -item.crushedPurifiedLepersonnite.name=Purified Crushed Lepersonnite Ore -item.dustImpureLepersonnite.name=Impure Lepersonnite Dust -item.dustPureLepersonnite.name=Purified Lepersonnite Dust -item.itemDustSamarskiteY.name=Samarskite (Y) Dust -item.itemDustTinySamarskiteY.name=Tiny Pile of Samarskite (Y) Dust -item.itemDustSmallSamarskiteY.name=Small Pile of Samarskite (Y) Dust -item.crushedSamarskiteY.name=Crushed Samarskite (Y) Ore -item.crushedCentrifugedSamarskiteY.name=Centrifuged Crushed Samarskite (Y) Ore -item.crushedPurifiedSamarskiteY.name=Purified Crushed Samarskite (Y) Ore -item.dustImpureSamarskiteY.name=Impure Samarskite (Y) Dust -item.dustPureSamarskiteY.name=Purified Samarskite (Y) Dust -item.itemDustSamarskiteYb.name=Samarskite (Yb) Dust -item.itemDustTinySamarskiteYb.name=Tiny Pile of Samarskite (Yb) Dust -item.itemDustSmallSamarskiteYb.name=Small Pile of Samarskite (Yb) Dust -item.crushedSamarskiteYb.name=Crushed Samarskite (Yb) Ore -item.crushedCentrifugedSamarskiteYb.name=Centrifuged Crushed Samarskite (Yb) Ore -item.crushedPurifiedSamarskiteYb.name=Purified Crushed Samarskite (Yb) Ore -item.dustImpureSamarskiteYb.name=Impure Samarskite (Yb) Dust -item.dustPureSamarskiteYb.name=Purified Samarskite (Yb) Dust -item.itemDustXenotime.name=Xenotime Dust -item.itemDustTinyXenotime.name=Tiny Pile of Xenotime Dust -item.itemDustSmallXenotime.name=Small Pile of Xenotime Dust -item.crushedXenotime.name=Crushed Xenotime Ore -item.crushedCentrifugedXenotime.name=Centrifuged Crushed Xenotime Ore -item.crushedPurifiedXenotime.name=Purified Crushed Xenotime Ore -item.dustImpureXenotime.name=Impure Xenotime Dust -item.dustPureXenotime.name=Purified Xenotime Dust -item.itemDustYttriaite.name=Yttriaite Dust -item.itemDustTinyYttriaite.name=Tiny Pile of Yttriaite Dust -item.itemDustSmallYttriaite.name=Small Pile of Yttriaite Dust -item.crushedYttriaite.name=Crushed Yttriaite Ore -item.crushedCentrifugedYttriaite.name=Centrifuged Crushed Yttriaite Ore -item.crushedPurifiedYttriaite.name=Purified Crushed Yttriaite Ore -item.dustImpureYttriaite.name=Impure Yttriaite Dust -item.dustPureYttriaite.name=Purified Yttriaite Dust -item.itemDustYttrialite.name=Yttrialite Dust -item.itemDustTinyYttrialite.name=Tiny Pile of Yttrialite Dust -item.itemDustSmallYttrialite.name=Small Pile of Yttrialite Dust -item.crushedYttrialite.name=Crushed Yttrialite Ore -item.crushedCentrifugedYttrialite.name=Centrifuged Crushed Yttrialite Ore -item.crushedPurifiedYttrialite.name=Purified Crushed Yttrialite Ore -item.dustImpureYttrialite.name=Impure Yttrialite Dust -item.dustPureYttrialite.name=Purified Yttrialite Dust -item.itemDustYttrocerite.name=Yttrocerite Dust -item.itemDustTinyYttrocerite.name=Tiny Pile of Yttrocerite Dust -item.itemDustSmallYttrocerite.name=Small Pile of Yttrocerite Dust -item.crushedYttrocerite.name=Crushed Yttrocerite Ore -item.crushedCentrifugedYttrocerite.name=Centrifuged Crushed Yttrocerite Ore -item.crushedPurifiedYttrocerite.name=Purified Crushed Yttrocerite Ore -item.dustImpureYttrocerite.name=Impure Yttrocerite Dust -item.dustPureYttrocerite.name=Purified Yttrocerite Dust -item.itemDustZircon.name=Zircon Dust -item.itemDustTinyZircon.name=Tiny Pile of Zircon Dust -item.itemDustSmallZircon.name=Small Pile of Zircon Dust -item.crushedZircon.name=Crushed Zircon Ore -item.crushedCentrifugedZircon.name=Centrifuged Crushed Zircon Ore -item.crushedPurifiedZircon.name=Purified Crushed Zircon Ore -item.dustImpureZircon.name=Impure Zircon Dust -item.dustPureZircon.name=Purified Zircon Dust -item.itemDustPolycrase.name=Polycrase Dust -item.itemDustTinyPolycrase.name=Tiny Pile of Polycrase Dust -item.itemDustSmallPolycrase.name=Small Pile of Polycrase Dust -item.crushedPolycrase.name=Crushed Polycrase Ore -item.crushedCentrifugedPolycrase.name=Centrifuged Crushed Polycrase Ore -item.crushedPurifiedPolycrase.name=Purified Crushed Polycrase Ore -item.dustImpurePolycrase.name=Impure Polycrase Dust -item.dustPurePolycrase.name=Purified Polycrase Dust -item.itemDustZircophyllite.name=Zircophyllite Dust -item.itemDustTinyZircophyllite.name=Tiny Pile of Zircophyllite Dust -item.itemDustSmallZircophyllite.name=Small Pile of Zircophyllite Dust -item.crushedZircophyllite.name=Crushed Zircophyllite Ore -item.crushedCentrifugedZircophyllite.name=Centrifuged Crushed Zircophyllite Ore -item.crushedPurifiedZircophyllite.name=Purified Crushed Zircophyllite Ore -item.dustImpureZircophyllite.name=Impure Zircophyllite Dust -item.dustPureZircophyllite.name=Purified Zircophyllite Dust -item.itemDustZirkelite.name=Zirkelite Dust -item.itemDustTinyZirkelite.name=Tiny Pile of Zirkelite Dust -item.itemDustSmallZirkelite.name=Small Pile of Zirkelite Dust -item.crushedZirkelite.name=Crushed Zirkelite Ore -item.crushedCentrifugedZirkelite.name=Centrifuged Crushed Zirkelite Ore -item.crushedPurifiedZirkelite.name=Purified Crushed Zirkelite Ore -item.dustImpureZirkelite.name=Impure Zirkelite Dust -item.dustPureZirkelite.name=Purified Zirkelite Dust -item.itemDustLanthaniteLa.name=Lanthanite (La) Dust -item.itemDustTinyLanthaniteLa.name=Tiny Pile of Lanthanite (La) Dust -item.itemDustSmallLanthaniteLa.name=Small Pile of Lanthanite (La) Dust -item.crushedLanthaniteLa.name=Crushed Lanthanite (La) Ore -item.crushedCentrifugedLanthaniteLa.name=Centrifuged Crushed Lanthanite (La) Ore -item.crushedPurifiedLanthaniteLa.name=Purified Crushed Lanthanite (La) Ore -item.dustImpureLanthaniteLa.name=Impure Lanthanite (La) Dust -item.dustPureLanthaniteLa.name=Purified Lanthanite (La) Dust -item.itemDustLanthaniteCe.name=Lanthanite (Ce) Dust -item.itemDustTinyLanthaniteCe.name=Tiny Pile of Lanthanite (Ce) Dust -item.itemDustSmallLanthaniteCe.name=Small Pile of Lanthanite (Ce) Dust -item.crushedLanthaniteCe.name=Crushed Lanthanite (Ce) Ore -item.crushedCentrifugedLanthaniteCe.name=Centrifuged Crushed Lanthanite (Ce) Ore -item.crushedPurifiedLanthaniteCe.name=Purified Crushed Lanthanite (Ce) Ore -item.dustImpureLanthaniteCe.name=Impure Lanthanite (Ce) Dust -item.dustPureLanthaniteCe.name=Purified Lanthanite (Ce) Dust -item.itemDustLanthaniteNd.name=Lanthanite (Nd) Dust -item.itemDustTinyLanthaniteNd.name=Tiny Pile of Lanthanite (Nd) Dust -item.itemDustSmallLanthaniteNd.name=Small Pile of Lanthanite (Nd) Dust -item.crushedLanthaniteNd.name=Crushed Lanthanite (Nd) Ore -item.crushedCentrifugedLanthaniteNd.name=Centrifuged Crushed Lanthanite (Nd) Ore -item.crushedPurifiedLanthaniteNd.name=Purified Crushed Lanthanite (Nd) Ore -item.dustImpureLanthaniteNd.name=Impure Lanthanite (Nd) Dust -item.dustPureLanthaniteNd.name=Purified Lanthanite (Nd) Dust -item.itemDustAgarditeY.name=Agardite (Y) Dust -item.itemDustTinyAgarditeY.name=Tiny Pile of Agardite (Y) Dust -item.itemDustSmallAgarditeY.name=Small Pile of Agardite (Y) Dust -item.crushedAgarditeY.name=Crushed Agardite (Y) Ore -item.crushedCentrifugedAgarditeY.name=Centrifuged Crushed Agardite (Y) Ore -item.crushedPurifiedAgarditeY.name=Purified Crushed Agardite (Y) Ore -item.dustImpureAgarditeY.name=Impure Agardite (Y) Dust -item.dustPureAgarditeY.name=Purified Agardite (Y) Dust -item.itemDustAgarditeCd.name=Agardite (Cd) Dust -item.itemDustTinyAgarditeCd.name=Tiny Pile of Agardite (Cd) Dust -item.itemDustSmallAgarditeCd.name=Small Pile of Agardite (Cd) Dust -item.crushedAgarditeCd.name=Crushed Agardite (Cd) Ore -item.crushedCentrifugedAgarditeCd.name=Centrifuged Crushed Agardite (Cd) Ore -item.crushedPurifiedAgarditeCd.name=Purified Crushed Agardite (Cd) Ore -item.dustImpureAgarditeCd.name=Impure Agardite (Cd) Dust -item.dustPureAgarditeCd.name=Purified Agardite (Cd) Dust -item.itemDustAgarditeLa.name=Agardite (La) Dust -item.itemDustTinyAgarditeLa.name=Tiny Pile of Agardite (La) Dust -item.itemDustSmallAgarditeLa.name=Small Pile of Agardite (La) Dust -item.crushedAgarditeLa.name=Crushed Agardite (La) Ore -item.crushedCentrifugedAgarditeLa.name=Centrifuged Crushed Agardite (La) Ore -item.crushedPurifiedAgarditeLa.name=Purified Crushed Agardite (La) Ore -item.dustImpureAgarditeLa.name=Impure Agardite (La) Dust -item.dustPureAgarditeLa.name=Purified Agardite (La) Dust -item.itemDustAgarditeNd.name=Agardite (Nd) Dust -item.itemDustTinyAgarditeNd.name=Tiny Pile of Agardite (Nd) Dust -item.itemDustSmallAgarditeNd.name=Small Pile of Agardite (Nd) Dust -item.crushedAgarditeNd.name=Crushed Agardite (Nd) Ore -item.crushedCentrifugedAgarditeNd.name=Centrifuged Crushed Agardite (Nd) Ore -item.crushedPurifiedAgarditeNd.name=Purified Crushed Agardite (Nd) Ore -item.dustImpureAgarditeNd.name=Impure Agardite (Nd) Dust -item.dustPureAgarditeNd.name=Purified Agardite (Nd) Dust -item.itemDustHibonite.name=Hibonite Dust -item.itemDustTinyHibonite.name=Tiny Pile of Hibonite Dust -item.itemDustSmallHibonite.name=Small Pile of Hibonite Dust -item.crushedHibonite.name=Crushed Hibonite Ore -item.crushedCentrifugedHibonite.name=Centrifuged Crushed Hibonite Ore -item.crushedPurifiedHibonite.name=Purified Crushed Hibonite Ore -item.dustImpureHibonite.name=Impure Hibonite Dust -item.dustPureHibonite.name=Purified Hibonite Dust -item.itemDustCerite.name=Cerite Dust -item.itemDustTinyCerite.name=Tiny Pile of Cerite Dust -item.itemDustSmallCerite.name=Small Pile of Cerite Dust -item.crushedCerite.name=Crushed Cerite Ore -item.crushedCentrifugedCerite.name=Centrifuged Crushed Cerite Ore -item.crushedPurifiedCerite.name=Purified Crushed Cerite Ore -item.dustImpureCerite.name=Impure Cerite Dust -item.dustPureCerite.name=Purified Cerite Dust -item.itemDustFluorcaphite.name=Fluorcaphite Dust -item.itemDustTinyFluorcaphite.name=Tiny Pile of Fluorcaphite Dust -item.itemDustSmallFluorcaphite.name=Small Pile of Fluorcaphite Dust -item.crushedFluorcaphite.name=Crushed Fluorcaphite Ore -item.crushedCentrifugedFluorcaphite.name=Centrifuged Crushed Fluorcaphite Ore -item.crushedPurifiedFluorcaphite.name=Purified Crushed Fluorcaphite Ore -item.dustImpureFluorcaphite.name=Impure Fluorcaphite Dust -item.dustPureFluorcaphite.name=Purified Fluorcaphite Dust -item.itemDustFlorencite.name=Florencite Dust -item.itemDustTinyFlorencite.name=Tiny Pile of Florencite Dust -item.itemDustSmallFlorencite.name=Small Pile of Florencite Dust -item.crushedFlorencite.name=Crushed Florencite Ore -item.crushedCentrifugedFlorencite.name=Centrifuged Crushed Florencite Ore -item.crushedPurifiedFlorencite.name=Purified Crushed Florencite Ore -item.dustImpureFlorencite.name=Impure Florencite Dust -item.dustPureFlorencite.name=Purified Florencite Dust -item.itemDustCryoliteF.name=Cryolite (F) Dust -item.itemDustTinyCryoliteF.name=Tiny Pile of Cryolite (F) Dust -item.itemDustSmallCryoliteF.name=Small Pile of Cryolite (F) Dust -item.crushedCryoliteF.name=Crushed Cryolite (F) Ore -item.crushedCentrifugedCryoliteF.name=Centrifuged Crushed Cryolite (F) Ore -item.crushedPurifiedCryoliteF.name=Purified Crushed Cryolite (F) Ore -item.dustImpureCryoliteF.name=Impure Cryolite (F) Dust -item.dustPureCryoliteF.name=Purified Cryolite (F) Dust -item.itemDustTinyYellorium.name=Tiny Pile of Yellorium Dust -item.itemDustSmallYellorium.name=Small Pile of Yellorium Dust -item.crushedYellorium.name=Crushed Yellorium Ore -item.crushedCentrifugedYellorium.name=Centrifuged Crushed Yellorium Ore -item.crushedPurifiedYellorium.name=Purified Crushed Yellorium Ore -item.dustImpureYellorium.name=Impure Yellorium Dust -item.dustPureYellorium.name=Purified Yellorium Dust - -//Shards -item.itemDrained.name=Drained Shard -item.itemDustInfusedAir.name=Infused Air Dust -item.itemDustInfusedFire.name=Infused Fire Dust -item.itemDustInfusedEarth.name=Infused Earth Dust -item.itemDustInfusedWater.name=Infused Water Dust - - -//Misc Material Items -item.itemDustLithiumCarbonate.name=Lithium Carbonate Dust -item.itemDustSmallLithiumCarbonate.name=Small Pile of Lithium Carbonate Dust -item.itemDustTinyLithiumCarbonate.name=Tiny Pile of Lithium Carbonate Dust -item.itemDustLithiumPeroxide.name=Lithium Peroxide Dust -item.itemDustSmallLithiumPeroxide.name=Small Pile of Lithium Peroxide Dust -item.itemDustTinyLithiumPeroxide.name=Tiny Pile of Lithium Peroxide Dust -item.itemDustLithiumHydroxide.name=Lithium Hydroxide Dust -item.itemDustSmallLithiumHydroxide.name=Small Pile of Lithium Hydroxide Dust -item.itemDustTinyLithiumHydroxide.name=Tiny Pile of Lithium Hydroxide Dust -item.itemDustCalciumHydroxide.name=Hydrated Lime Dust -item.itemDustSmallCalciumHydroxide.name=Small Pile of Hydrated Lime Dust -item.itemDustTinyCalciumHydroxide.name=Tiny Pile of Hydrated Lime Dust -item.itemDustCalciumCarbonate.name=Calcium Carbonate Dust -item.itemDustSmallCalciumCarbonate.name=Small Pile of Calcium Carbonate Dust -item.itemDustTinyCalciumCarbonate.name=Tiny Pile of Calcium Carbonate Dust -item.itemDustGypsum.name=Calcium Sulfate (Gypsum) Dust -item.itemDustSmallGypsum.name=Small Pile of Calcium Sulfate (Gypsum) Dust -item.itemDustTinyGypsum.name=Tiny Pile of Calcium Sulfate (Gypsum) Dust -item.itemDustLi2CO3CaOH2.name=Li2CO3 + Ca(OH)2 Compound Dust -item.itemDustSmallLi2CO3CaOH2.name=Small Pile of Li2CO3 + Ca(OH)2 Compound Dust -item.itemDustTinyLi2CO3CaOH2.name=Tiny Pile of Li2CO3 + Ca(OH)2 Compound Dust -item.itemDustLi2BeF4.name=Li2BeF4 Fuel Compound Dust -item.itemDustSmallLi2BeF4.name=Small Pile of Li2BeF4 Fuel Compound Dust -item.itemDustTinyLi2BeF4.name=Tiny Pile of Li2BeF4 Fuel Compound Dust -item.Li2BeF4.name=Li2BeF4 Cell -item.itemCircuitLFTR.name=§aControl Circuit -item.itemZirconiumPellet.name=Zirconium Pellet [ZrClâ‚„] -item.itemDustZrCl4.name=ZrCl4 Dust -item.itemDustSmallZrCl4.name=Small Pile of ZrCl4 Dust -item.itemDustTinyZrCl4.name=Tiny Pile of ZrCl4 Dust -item.itemDustCookedZrCl4.name=Cooked ZrCl4 Dust -item.itemDustSmallCookedZrCl4.name=Small Pile of Cooked ZrCl4 Dust -item.itemDustTinyCookedZrCl4.name=Tiny Pile of Cooked ZrCl4 Dust -item.itemDustUN18Fertiliser.name=UN-18 Fertiliser Dust -item.itemDustSmallUN18Fertiliser.name=Small Pile of UN-18 Fertiliser Dust -item.itemDustTinyUN18Fertiliser.name=Tiny Pile of UN-18 Fertiliser Dust -item.itemDustUN32Fertiliser.name=UN-32 Fertiliser Dust -item.itemDustSmallUN32Fertiliser.name=Small Pile of UN-32 Fertiliser Dust -item.itemDustTinyUN32Fertiliser.name=Tiny Pile of UN-32 Fertiliser Dust -item.itemNuggetPlutonium239.name=Plutonium 239 Nugget -item.itemCellPlutonium239.name=Plutonium 239 Cell -item.itemIngotPlutonium239.name=Plutonium 239 Ingot -item.itemPlatePlutonium239.name=Plutonium 239 Plate -item.itemPlateDoublePlutonium239.name=Double Plutonium 239 Plate -item.itemDustPlutonium239.name=Plutonium 239 Dust -item.itemDustSmallPlutonium239.name=Small Plutonium 239 Dust -item.itemDustTinyPlutonium239.name=Tiny Plutonium 239 Dust - - -//Multitools -item.AluminiumMultipick.name=Aluminium Multipick -item.AluminiumMultispade.name=Aluminium Multispade -item.BerylliumMultispade.name=Beryllium Multispade -item.BismuthMultispade.name=Bismuth Multispade -item.CarbonMultispade.name=Carbon Multispade -item.ChromeMultipick.name=Chrome Multipick -item.ChromeMultispade.name=Chrome Multispade -item.CobaltMultipick.name=Cobalt Multipick -item.CobaltMultispade.name=Cobalt Multispade -item.GoldMultispade.name=Gold Multispade -item.IridiumMultipick.name=Iridium Multipick -item.IridiumMultispade.name=Iridium Multispade -item.IronMultipick.name=Iron Multipick -item.IronMultispade.name=Iron Multispade -item.LeadMultispade.name=Lead Multispade -item.ManganeseMultipick.name=Manganese Multipick -item.ManganeseMultispade.name=Manganese Multispade -item.MolybdenumMultipick.name=Molybdenum Multipick -item.MolybdenumMultispade.name=Molybdenum Multispade -item.NeodymiumMultipick.name=Neodymium Multipick -item.NeodymiumMultispade.name=Neodymium Multispade -item.NeutroniumMultipick.name=Neutronium Multipick -item.NeutroniumMultispade.name=Neutronium Multispade -item.NickelMultispade.name=Nickel Multispade -item.OsmiumMultipick.name=Osmium Multipick -item.OsmiumMultispade.name=Osmium Multispade -item.PalladiumMultipick.name=Palladium Multipick -item.PalladiumMultispade.name=Palladium Multispade -item.PlatinumMultispade.name=Platinum Multispade -item.Plutonium241Multipick.name=Plutonium 241 Multipick -item.Plutonium241Multispade.name=Plutonium 241 Multispade -item.SilverMultispade.name=Silver Multispade -item.ThoriumMultipick.name=Thorium Multipick -item.ThoriumMultispade.name=Thorium Multispade -item.TitaniumMultipick.name=Titanium Multipick -item.TitaniumMultispade.name=Titanium Multispade -item.TungstenMultipick.name=Tungsten Multipick -item.TungstenMultispade.name=Tungsten Multispade -item.Uranium235Multipick.name=Uranium 235 Multipick -item.Uranium235Multispade.name=Uranium 235 Multispade -item.DarkSteelMultipick.name=Dark Steel Multipick -item.DarkSteelMultispade.name=Dark Steel Multispade -item.DuraniumMultipick.name=Duranium Multipick -item.DuraniumMultispade.name=Duranium Multispade -item.InfusedGoldMultispade.name=Infused Gold Multispade -item.NaquadahMultipick.name=Naquadah Multipick -item.NaquadahMultispade.name=Naquadah Multispade -item.NaquadahAlloyMultipick.name=Naquadah Alloy Multipick -item.NaquadahAlloyMultispade.name=Naquadah Alloy Multispade -item.NaquadriaMultipick.name=Naquadria Multipick -item.NaquadriaMultispade.name=Naquadria Multispade -item.TritaniumMultipick.name=Tritanium Multipick -item.TritaniumMultispade.name=Tritanium Multispade -item.OsmiridiumMultipick.name=Osmiridium Multipick -item.OsmiridiumMultispade.name=Osmiridium Multispade -item.BrassMultispade.name=Brass Multispade -item.BronzeMultipick.name=Bronze Multipick -item.BronzeMultispade.name=Bronze Multispade -item.CupronickelMultispade.name=Cupronickel Multispade -item.ElectrumMultispade.name=Electrum Multispade -item.InvarMultipick.name=Invar Multipick -item.InvarMultispade.name=Invar Multispade -item.KanthalMultispade.name=Kanthal Multispade -item.MagnaliumMultipick.name=Magnalium Multipick -item.MagnaliumMultispade.name=Magnalium Multispade -item.NichromeMultispade.name=Nichrome Multispade -item.PigIronMultipick.name=Pig Iron Multipick -item.PigIronMultispade.name=Pig Iron Multispade -item.PolycaprolactamMultispade.name=Polycaprolactam Multispade -item.PolytetrafluoroethyleneMultispade.name=Polytetrafluoroethylene Multispade -item.NickelZincFerriteMultispade.name=Nickel-Zinc Ferrite Multispade -item.PolyphenyleneSulfideMultispade.name=Polyphenylene Sulfide Multispade -item.StainlessSteelMultipick.name=Stainless Steel Multipick -item.StainlessSteelMultispade.name=Stainless Steel Multispade -item.SteelMultipick.name=Steel Multipick -item.SteelMultispade.name=Steel Multispade -item.TinAlloyMultispade.name=Tin Alloy Multispade -item.UltimetMultipick.name=Ultimet Multipick -item.UltimetMultispade.name=Ultimet Multispade -item.WroughtIronMultipick.name=Wrought Iron Multipick -item.WroughtIronMultispade.name=Wrought Iron Multispade -item.SterlingSilverMultipick.name=Sterling Silver Multipick -item.SterlingSilverMultispade.name=Sterling Silver Multispade -item.RoseGoldMultipick.name=Rose Gold Multipick -item.RoseGoldMultispade.name=Rose Gold Multispade -item.BlackBronzeMultipick.name=Black Bronze Multipick -item.BlackBronzeMultispade.name=Black Bronze Multispade -item.BismuthBronzeMultipick.name=Bismuth Bronze Multipick -item.BismuthBronzeMultispade.name=Bismuth Bronze Multispade -item.BlackSteelMultipick.name=Black Steel Multipick -item.BlackSteelMultispade.name=Black Steel Multispade -item.RedSteelMultipick.name=Red Steel Multipick -item.RedSteelMultispade.name=Red Steel Multispade -item.BlueSteelMultipick.name=Blue Steel Multipick -item.BlueSteelMultispade.name=Blue Steel Multispade -item.DamascusSteelMultipick.name=Damascus Steel Multipick -item.DamascusSteelMultispade.name=Damascus Steel Multispade -item.MithrilMultispade.name=Mithril Multispade -item.CobaltBrassMultipick.name=Cobalt Brass Multipick -item.CobaltBrassMultispade.name=Cobalt Brass Multispade -item.ThaumiumMultipick.name=Thaumium Multipick -item.ThaumiumMultispade.name=Thaumium Multispade -item.HSSGMultipick.name=HSS-G Multipick -item.HSSGMultispade.name=HSS-G Multispade -item.HSSEMultipick.name=HSS-E Multipick -item.HSSEMultispade.name=HSS-E Multispade -item.HSSSMultipick.name=HSS-S Multipick -item.HSSSMultispade.name=HSS-S Multispade -item.HastelloyC276Multipick.name=Hastelloy-C276 Multipick -item.HastelloyC276Multispade.name=Hastelloy-C276 Multispade -item.HastelloyNMultipick.name=Hastelloy-N Multipick -item.HastelloyNMultispade.name=Hastelloy-N Multispade -item.HastelloyWMultipick.name=Hastelloy-W Multipick -item.HastelloyWMultispade.name=Hastelloy-W Multispade -item.HastelloyXMultipick.name=Hastelloy-X Multipick -item.HastelloyXMultispade.name=Hastelloy-X Multispade -item.Incoloy020Multipick.name=Incoloy-020 Multipick -item.Incoloy020Multispade.name=Incoloy-020 Multispade -item.IncoloyDSMultipick.name=Incoloy-DS Multipick -item.IncoloyDSMultispade.name=Incoloy-DS Multispade -item.IncoloyMA956Multipick.name=Incoloy-MA956 Multipick -item.IncoloyMA956Multispade.name=Incoloy-MA956 Multispade -item.Inconel625Multipick.name=Inconel-625 Multipick -item.Inconel625Multispade.name=Inconel-625 Multispade -item.Inconel690Multipick.name=Inconel-690 Multipick -item.Inconel690Multispade.name=Inconel-690 Multispade -item.Inconel792Multipick.name=Inconel-792 Multipick -item.Inconel792Multispade.name=Inconel-792 Multispade -item.GrisiumMultipick.name=Grisium Multipick -item.GrisiumMultispade.name=Grisium Multispade -item.Tantalloy60Multipick.name=Tantalloy-60 Multipick -item.Tantalloy60Multispade.name=Tantalloy-60 Multispade -item.Tantalloy61Multipick.name=Tantalloy-61 Multipick -item.Tantalloy61Multispade.name=Tantalloy-61 Multispade -item.StaballoyMultipick.name=Staballoy Multipick -item.StaballoyMultispade.name=Staballoy Multispade -item.QuantumMultipick.name=Quantum Multipick -item.QuantumMultispade.name=Quantum Multispade -item.PotinMultipick.name=Potin Multipick -item.PotinMultispade.name=Potin Multispade -item.TumbagaMultipick.name=Tumbaga Multipick -item.TumbagaMultispade.name=Tumbaga Multispade -item.TaloniteMultipick.name=Talonite Multipick -item.TaloniteMultispade.name=Talonite Multispade -item.StelliteMultipick.name=Stellite Multipick -item.StelliteMultispade.name=Stellite Multispade -item.TungstenCarbideMultipick.name=Tungsten Carbide Multipick -item.TungstenCarbideMultispade.name=Tungsten Carbide Multispade -item.TantalumCarbideMultipick.name=Tantalum Carbide Multipick -item.TantalumCarbideMultispade.name=Tantalum Carbide Multispade - - -//Items that Don't fit into another category - -//Plates -item.itemPlateClay.name=Clay Plate -item.itemPlateDoubleClay.name=Double Clay Plate -item.itemPlateLithium.name=Lithium Plate -item.itemPlateDoubleEuropium.name=Double Europium Plate - -//Gears -item.itemSmallGearWroughtIron.name=Small Wrought Iron Gear - -//Misc -item.itemFoilUranium235.name=Uranium 235 Foil - -item.itemBoilerChassis_0.name=Advanced Boiler Chassis [Tier 1] -item.itemDehydratorCoilWire_0.name=Coil Wire [EV] -item.itemDehydratorCoil_0.name=Dehydrator Coil [EV] -item.itemAirFilter_0.name=Air Filter -item.itemAirFilter_1.name=Air Filter -item.itemLavaFilter.name=Lava Filter -item.itemGrindleTablet.name=Git -item.itemDragonJar.name=Dragon Capture Jar -item.CoalGas.name=Coal Gas Cell -item.Ethylbenzene.name=Ethylbenzene Cell -item.Anthracene.name=Anthracene Cell -item.Toluene.name=Toluene Cell -item.CoalTar.name=Coal Tar Cell -item.CoalTarOil.name=Coal Tar Oil Cell -item.SulfuricCoalTarOil.name=Sulfuric Coal Tar Oil Cell -item.Naphthalene.name=Naphthalene Cell -item.PhthalicAcid.name=Phthalic Acid Cell -item.itemDustPhthalicAnhydride.name=Phthalic Anhydride Dust -item.itemDustSmallPhthalicAnhydride.name=Small Pile of Phthalic Anhydride Dust -item.itemDustTinyPhthalicAnhydride.name=Tiny Pile of Phthalic Anhydride Dust -item.2Ethylanthraquinone.name=2-Ethylanthraquinone Cell -item.2Ethylanthrahydroquinone.name=2-Ethylanthrahydroquinone Cell -item.HydrogenPeroxide.name=Hydrogen Peroxide Cell -item.itemDustLithiumHydroperoxide.name=Lithium Hydroperoxide Dust -item.itemDustSmallLithiumHydroperoxide.name=Small Pile of Lithium Hydroperoxide Dust -item.itemDustTinyLithiumHydroperoxide.name=Tiny Pile of Lithium Hydroperoxide Dust -item.LithiumPeroxide.name=Lithium Peroxide Cell -item.itemPotionChilly.name=Chilly Potion -item.itemKeyBig4000DC's.name=4000DC's Big Key -item.itemGemDull.name=Dull Gemstone -item.itemMushroomForest.name=Forest Mushroom -item.itemPlateVanadium.name=Vanadium Plate -item.thekeytothecity.name=The Key to the City -item.modularbauble.name=Modular Bauble -item.itemDustSoularium.name=Soularium Dust -item.itemDustSmallSoularium.name=Small Pile of Soularium Dust -item.itemDustTinySoularium.name=Tiny Pile of Soularium Dust -item.itemDustRedstoneAlloy.name=Redstone Alloy Dust -item.itemDustSmallRedstoneAlloy.name=Small Pile of Redstone Alloy Dust -item.itemDustTinyRedstoneAlloy.name=Tiny Pile of Redstone Alloy Dust -item.itemDustElectricalSteel.name=Electrical Steel Dust -item.itemDustSmallElectricalSteel.name=Small Pile of Electrical Steel Dust -item.itemDustTinyElectricalSteel.name=Tiny Pile of Electrical Steel Dust -item.itemDustPulsatingIron.name=Pulsating Iron Dust -item.itemDustSmallPulsatingIron.name=Small Pile of Pulsating Iron Dust -item.itemDustTinyPulsatingIron.name=Tiny Pile of Pulsating Iron Dust -item.itemDustEnergeticAlloy.name=Energetic Alloy Dust -item.itemDustSmallEnergeticAlloy.name=Small Pile of Energetic Alloy Dust -item.itemDustTinyEnergeticAlloy.name=Tiny Pile of Energetic Alloy Dust -item.itemDustVibrantAlloy.name=Vibrant Alloy Dust -item.itemDustSmallVibrantAlloy.name=Small Pile of Vibrant Alloy Dust -item.itemDustTinyVibrantAlloy.name=Tiny Pile of Vibrant Alloy Dust -item.itemDustConductiveIron.name=Conductive Iron Dust -item.itemDustSmallConductiveIron.name=Small Pile of Conductive Iron Dust -item.itemDustTinyConductiveIron.name=Tiny Pile of Conductive Iron Dust -item.itemPlateSoularium.name=Soularium plate -item.itemPlateRedstoneAlloy.name=Redstone Alloy plate -item.itemPlateElectricalSteel.name=Electrical Steel plate -item.itemPlatePhasedIron.name=Phased Iron plate -item.itemPlateEnergeticAlloy.name=Energetic Alloy plate -item.itemPlateVibrantAlloy.name=Vibrant Alloy plate -item.itemPlateConductiveIron.name=Conductive Iron plate -item.itemPlateBlutonium.name=Blutonium plate -item.itemPlateCyanite.name=Cyanite plate -item.itemPlateLudicrite.name=Ludicrite plate -item.itemPlateVoid.name=Void plate -item.itemPlateDimensionShard.name=Dimensional Shard plate -item.rfEUBattery.name=Universally Chargeable Battery -item.personalCloakingDevice.name=§9Personal Cloaking Device§7 -item.personalHealingDevice.name=§9Personal Healing NanoBooster§r -item.SlowBuildingRing.name=§eSlow Building Ring§7 -item.itemStaballoyPickaxe.name=Tunnel Digger -item.itemStaballoyAxe.name=Tree Feller -item.itemSandstoneHammer.name=Cobblestone Breaker -item.itemBufferCore1.name=Energy Core [ULV]. -item.itemBufferCore2.name=Energy Core [LV]. -item.itemBufferCore3.name=Energy Core [MV]. -item.itemBufferCore4.name=Energy Core [HV]. -item.itemBufferCore5.name=Energy Core [EV]. -item.itemBufferCore6.name=Energy Core [IV]. -item.itemBufferCore7.name=Energy Core [LuV]. -item.itemBufferCore8.name=Energy Core [ZPM]. -item.itemBufferCore9.name=Energy Core [UV]. -item.itemBufferCore10.name=Energy Core [MAX]. -item.itemPLACEHOLDER_Circuit.name=Quark Manipulator (UV) -item.itembookgt.name=§oThermal Boiler Manual - -// Everglade Items -item.everglades.trigger.name=§6Alkalus Disk [§cActivated§6] - - - - - - - -//Blocks -tile.blockRainforestOakLog.name=Rainforest Oak -tile.blockRainforestOakLeaves.name=Oak Leaves -tile.blockRainforestOakSapling.name=Rainforest Oak Sapling - -//TC Stuff -tile.blockFastAlchemyFurnace.0.name=Broken -tile.blockFastArcaneAlembic.1.name=Broken - -//Frame Boxes -tile.Block of Selenium.name=Block of Selenium -tile.Selenium Frame Box.name=Selenium Frame Box -tile.Block of Bromine.name=Block of Bromine -tile.Block of Strontium.name=Block of Strontium -tile.Strontium Frame Box.name=Strontium Frame Box -tile.Block of Zirconium.name=Block of Zirconium -tile.Zirconium Frame Box.name=Zirconium Frame Box -tile.Block of Ruthenium.name=Block of Ruthenium -tile.Ruthenium Frame Box.name=Ruthenium Frame Box -tile.Block of Iodine.name=Block of Iodine -tile.Iodine Frame Box.name=Iodine Frame Box -tile.Block of Hafnium.name=Block of Hafnium -tile.Hafnium Frame Box.name=Hafnium Frame Box -tile.Block of Dysprosium.name=Block of Dysprosium -tile.Dysprosium Frame Box.name=Dysprosium Frame Box -tile.Block of Tellurium.name=Block of Tellurium -tile.Tellurium Frame Box.name=Tellurium Frame Box -tile.Block of Rhodium.name=Block of Rhodium -tile.Rhodium Frame Box.name=Rhodium Frame Box -tile.Block of Rhenium.name=Block of Rhenium -tile.Rhenium Frame Box.name=Rhenium Frame Box -tile.Block of Thallium.name=Block of Thallium -tile.Thallium Frame Box.name=Thallium Frame Box -tile.Block of Technetium.name=Block of Technetium -tile.Block of Polonium.name=Block of Polonium -tile.Block of Astatine.name=Block of Astatine -tile.Block of Francium.name=Block of Francium -tile.Block of Radium.name=Block of Radium -tile.Block of Actinium.name=Block of Actinium -tile.Block of Protactinium.name=Block of Protactinium -tile.Block of Neptunium.name=Block of Neptunium -tile.Block of Curium.name=Block of Curium -tile.Block of Berkelium.name=Block of Berkelium -tile.Block of Californium.name=Block of Californium -tile.Block of Einsteinium.name=Block of Einsteinium -tile.Block of Fermium.name=Block of Fermium -tile.Block of Thorium 232.name=Block of Thorium 232 -tile.Block of Uranium 232.name=Block of Uranium 232 -tile.Block of Uranium 233.name=Block of Uranium 233 -tile.Block of Plutonium-238.name=Block of Plutonium 238 -tile.Block of Strontium-90.name=Block of Strontium 90 -tile.Block of Polonium-210.name=Block of Polonium 210 -tile.Block of Americium-241.name=Block of Americium 241 -tile.Block of Silicon Carbide.name=Block of Silicon Carbide -tile.Silicon Carbide Frame Box.name=Silicon Carbide Frame Box -tile.Block of Zirconium Carbide.name=Block of Zirconium Carbide -tile.Zirconium Carbide Frame Box.name=Zirconium Carbide Frame Box -tile.Block of Tantalum Carbide.name=Block of Tantalum Carbide -tile.Tantalum Carbide Frame Box.name=Tantalum Carbide Frame Box -tile.Block of Niobium Carbide.name=Block of Niobium Carbide -tile.Niobium Carbide Frame Box.name=Niobium Carbide Frame Box -tile.Block of Beryllium Fluoride.name=Block of Beryllium Fluoride -tile.Block of Lithium Fluoride.name=Block of Lithium Fluoride -tile.Block of Thorium Tetrafluoride.name=Block of Thorium Tetrafluoride -tile.Block of Thorium Hexafluoride.name=Block of Thorium Hexafluoride -tile.Block of Uranium Tetrafluoride.name=Block of Uranium Tetrafluoride -tile.Block of Uranium Hexafluoride.name=Block of Uranium Hexafluoride -tile.Block of Zirconium Tetrafluoride.name=Block of Zirconium Tetrafluoride -tile.Block of Neptunium Hexafluoride.name=Block of Neptunium Hexafluoride -tile.Block of Technetium Hexafluoride.name=Block of Technetium Hexafluoride -tile.Block of Selenium Hexafluoride.name=Block of Selenium Hexafluoride -tile.Block of LiFBeF2ZrF4U235.name=Block of LiFBeF2ZrF4U235 -tile.Block of LiFBeF2ZrF4UF4.name=Block of LiFBeF2ZrF4UF4 -tile.Block of LiFBeF2ThF4UF4.name=Block of LiFBeF2ThF4UF4 -tile.Block of Energy Crystal.name=Block of Energy Crystal -tile.Energy Crystal Frame Box.name=Energy Crystal Frame Box -tile.Block of Blood Steel.name=Block of Blood Steel -tile.Blood Steel Frame Box.name=Blood Steel Frame Box -tile.Block of Zeron-100.name=Block of Zeron-100 -tile.Zeron-100 Frame Box.name=Zeron-100 Frame Box -tile.Block of Tumbaga.name=Block of Tumbaga -tile.Tumbaga Frame Box.name=Tumbaga Frame Box -tile.Block of Potin.name=Block of Potin -tile.Potin Frame Box.name=Potin Frame Box -tile.Block of Staballoy.name=Block of Staballoy -tile.Staballoy Frame Box.name=Staballoy Frame Box -tile.Block of Tantalloy-60.name=Block of Tantalloy-60 -tile.Tantalloy-60 Frame Box.name=Tantalloy-60 Frame Box -tile.Block of Tantalloy-61.name=Block of Tantalloy-61 -tile.Tantalloy-61 Frame Box.name=Tantalloy-61 Frame Box -tile.Block of Inconel-625.name=Block of Inconel-625 -tile.Inconel-625 Frame Box.name=Inconel-625 Frame Box -tile.Block of Inconel-690.name=Block of Inconel-690 -tile.Inconel-690 Frame Box.name=Inconel-690 Frame Box -tile.Block of Inconel-792.name=Block of Inconel-792 -tile.Inconel-792 Frame Box.name=Inconel-792 Frame Box -tile.Block of Eglin Steel.name=Block of Eglin Steel -tile.Eglin Steel Frame Box.name=Eglin Steel Frame Box -tile.Block of Maraging Steel 250.name=Block of Maraging Steel 250 -tile.Maraging Steel 250 Frame Box.name=Maraging Steel 250 Frame Box -tile.Block of Maraging Steel 300.name=Block of Maraging Steel 300 -tile.Maraging Steel 300 Frame Box.name=Maraging Steel 300 Frame Box -tile.Block of Maraging Steel 350.name=Block of Maraging Steel 350 -tile.Maraging Steel 350 Frame Box.name=Maraging Steel 350 Frame Box -tile.Block of Stellite.name=Block of Stellite -tile.Stellite Frame Box.name=Stellite Frame Box -tile.Block of Talonite.name=Block of Talonite -tile.Talonite Frame Box.name=Talonite Frame Box -tile.Block of Hastelloy-W.name=Block of Hastelloy-W -tile.Hastelloy-W Frame Box.name=Hastelloy-W Frame Box -tile.Block of Hastelloy-X.name=Block of Hastelloy-X -tile.Hastelloy-X Frame Box.name=Hastelloy-X Frame Box -tile.Block of Hastelloy-C276.name=Block of Hastelloy-C276 -tile.Hastelloy-C276 Frame Box.name=Hastelloy-C276 Frame Box -tile.Block of Hastelloy-N.name=Block of Hastelloy-N -tile.Hastelloy-N Frame Box.name=Hastelloy-N Frame Box -tile.Block of Incoloy-020.name=Block of Incoloy-020 -tile.Incoloy-020 Frame Box.name=Incoloy-020 Frame Box -tile.Block of Incoloy-DS.name=Block of Incoloy-DS -tile.Incoloy-DS Frame Box.name=Incoloy-DS Frame Box -tile.Block of Incoloy-MA956.name=Block of Incoloy-MA956 -tile.Incoloy-MA956 Frame Box.name=Incoloy-MA956 Frame Box -tile.Block of Grisium.name=Block of Grisium -tile.Grisium Frame Box.name=Grisium Frame Box -tile.Block of Trinium.name=Block of Trinium -tile.Block of Refined Trinium.name=Block of Refined Trinium -tile.Block of Trinium Titanium Alloy.name=Block of Trinium Titanium Alloy -tile.Trinium Titanium Alloy Frame Box.name=Trinium Titanium Alloy Frame Box -tile.Block of Trinium Naquadah Alloy.name=Block of Trinium Naquadah Alloy -tile.Block of Trinium Naquadah Carbonite.name=Block of Trinium Naquadah Carbonite -tile.Trinium Naquadah Carbonite Frame Box.name=Trinium Naquadah Carbonite Frame Box -tile.Block of Quantum.name=Block of Quantum -tile.Quantum Frame Box.name=Quantum Frame Box - -//Ores -tile.OreFluorite.name=Fluorite Ore -tile.OreCrocoite.name=Crocoite Ore -tile.OreGeikielite.name=Geikielite Ore -tile.OreNichromite.name=Nichromite Ore -tile.OreTitanite.name=Titanite Ore -tile.OreZimbabweite.name=Zimbabweite Ore -tile.OreZirconolite.name=Zirconolite Ore -tile.OreGadoliniteCe.name=Gadolinite (Ce) Ore -tile.OreGadoliniteY.name=Gadolinite (Y) Ore -tile.OreLepersonnite.name=Lepersonnite Ore -tile.OreSamarskiteY.name=Samarskite (Y) Ore -tile.OreSamarskiteYb.name=Samarskite (Yb) Ore -tile.OreXenotime.name=Xenotime Ore -tile.OreYttriaite.name=Yttriaite Ore -tile.OreYttrialite.name=Yttrialite Ore -tile.OreYttrocerite.name=Yttrocerite Ore -tile.OreZircon.name=Zircon Ore -tile.OrePolycrase.name=Polycrase Ore -tile.OreZircophyllite.name=Zircophyllite Ore -tile.OreZirkelite.name=Zirkelite Ore -tile.OreLanthaniteLa.name=Lanthanite (La) Ore -tile.OreLanthaniteCe.name=Lanthanite (Ce) Ore -tile.OreLanthaniteNd.name=Lanthanite (Nd) Ore -tile.OreAgarditeY.name=Agardite (Y) Ore -tile.OreAgarditeCd.name=Agardite (Cd) Ore -tile.OreAgarditeLa.name=Agardite (La) Ore -tile.OreAgarditeNd.name=Agardite (Nd) Ore -tile.OreHibonite.name=Hibonite Ore -tile.OreCerite.name=Cerite Ore -tile.OreFluorcaphite.name=Fluorcaphite Ore -tile.OreFlorencite.name=Florencite Ore -tile.OreCryoliteF.name=Cryolite (F) Ore - -//Misc -tile.blockMFEffect.name=Special -tile.fluidBlockSludge.name=Sludge -tile.blockWorkbenchGT.name=Workbench -tile.blockWorkbenchGTAdvanced.name=Advanced Workbench -tile.blockHeliumGenerator.name=Helium Generator -tile.blockFirePit.name=Fire Pit -tile.blockFishTrap.name=Fish Catcher -tile.blockInfiniteFluidTank.name=Infinite Fluid Tank -tile.blockMiningExplosives.name=Mining Explosives -tile.blockHellFire.name=Hellish Fire -tile.blockProjectBench.name=Project Table -tile.blockTradeBench.name=Trade Bench -tile.blockModularity.name=Modularity Bench -tile.blockBlackGate.name=Wither Cage -tile.blockTankXpConverter.name=Experience Converter - -//Everglades Blocks -tile.fluidSludge.0.name=Stagnant Waste Water -tile.blockDarkWorldPortal.name=A Glimpse of the Future -tile.blockDarkWorldGround.name=Unstable Earth -tile.blockDarkWorldGround2.name=Polluted Soil -tile.blockDarkWorldGround2.2.name=Highly Polluted Soil -tile.blockDarkWorldPortalFrame.name=Containment Frame - - -//Added 1/4/18 -tile.Block of Plutonium-239.name=Block of Plutonium-239 -tile.Fluorite Ore [Old].name=Fluorite Ore [Deprecated] -tile.blockMiningPipeFake.name=Strengthened Mining Pipe -tile.blockMiningHeadFake.name=Bedrock Drill -item.itemCellLiFBeF2ThF4UF4.name=Cell of Molten Salt [LiFBeF2ThF4UF4] -item.itemCellLiFBeF2ZrF4UF4.name=Cell of Molten Salt [LiFBeF2ZrF4UF4] -item.itemCellLiFBeF2ZrF4U235.name=Cell of Molten Salt [LiFBeF2ZrF4U235] -item.itemPlateMeatRaw.name=Fleshy Panel -tile.Block of MeatRaw.name=Block of Raw Meat - -//Added 26/5/18 -item.BurntLiFBeF2ThF4UF4.name=Cell of Used Reactor Fuel [LiFBeF2ThF4UF4] -item.BurntLiFBeF2ZrF4UF4.name=Cell of Used Reactor Fuel [LiFBeF2ZrF4UF4] -item.BurntLiFBeF2ZrF4U235.name=Cell of Used Reactor Fuel [LiFBeF2ZrF4U235] -item.itemBigEgg.name= ounce Chicken Egg -item.itemPlateSodium.name=Sodium Plate - -item.itemNuggetPromethium.name=Promethium Nugget -item.itemIngotPromethium.name=Promethium Ingot -item.itemDustSmallPromethium.name=Small Pile of Promethium -item.itemDustTinyPromethium.name=Tiny Pile of Promethium -item.itemDustPromethium.name=Promethium Dust -tile.Block of Promethium.name=Block of Promethium - -item.itemCellAmericium241.name=Americium 241 Cell -item.itemCellPolonium210.name=Polonium 210 Cell -item.itemCellStrontium90.name=Strontium 90 Cell -item.itemCellPlutonium238.name=Plutonium 238 Cell - -entity.MiningCharge.name=Mining Charge -entity.throwablePotionSulfuric.name=Flask of Sulfuric Acid -entity.throwablePotionHydrofluoric.name=Flask of Hydrofluoric Acid -entity.toxinBall.name=Toxin globule -entity.plasmaBolt.name=Plasma -entity.bigChickenFriendly.name=Giant Chicken - -//Added 26/6/18 -tile.OreTrinium.name=Trinium Ore -item.crushedTrinium.name=Crushed Trinium Ore -item.crushedCentrifugedTrinium.name=Centrifuged Crushed Trinium Ore -item.crushedPurifiedTrinium.name=Purified Crushed Trinium Ore -item.dustImpureTrinium.name=Impure Trinium Dust -item.dustPureTrinium.name=Purified Trinium Dust - -//Added 1/7/18 -entity.WiseVillager.name=Wise Villager -tile.blockMobSpawnerEx.0.name=Monster Spawner -tile.blockMobSpawnerEx.1.name=Monster Spawner -tile.blockMobSpawnerEx.2.name=Monster Spawner -tile.blockMobSpawnerEx.3.name=Monster Spawner -tile.blockMobSpawnerEx.4.name=Monster Spawner -tile.blockMobSpawnerEx.5.name=Monster Spawner -tile.blockMobSpawnerEx.6.name=Monster Spawner -tile.blockMobSpawnerEx.7.name=Monster Spawner -tile.blockMobSpawnerEx.8.name=Monster Spawner -tile.blockMobSpawnerEx.9.name=Monster Spawner -tile.blockMobSpawnerEx.10.name=Monster Spawner -tile.blockMobSpawnerEx.11.name=Monster Spawner -tile.blockMobSpawnerEx.12.name=Monster Spawner -tile.blockMobSpawnerEx.13.name=Monster Spawner -tile.blockMobSpawnerEx.14.name=Monster Spawner -tile.blockMobSpawnerEx.15.name=Monster Spawner -description.villager.profession.miscutils.banker=Banker -description.villager.profession.miscutils.technician=GT Technician -description.villager.profession.miscutils.trader=Ore Trader -description.villager.profession.miscutils.aboriginal=Native Australian - -//Added 23/8/18 -item.itemHatTinFoil.name=Tin Foil Hat - -//Added 13/9/18 -entity.WiseVillager.name=Wise Villager -entity.Aboriginal.name=Native -entity.miscutils.constructStaballoy.name=Staballoy Construct -entity.miscutils.sickBlaze.name=Infected Zealot - -//Added 15/9/18 -item.ZirconiumTetrafluoride.name=Zirconium Tetrafluoride Cell -item.Formaldehyde.name=Formaldehyde Cell -item.RocketFuelMixA.name=H8N4C2O4 Rocket Fuel Cell -item.RocketFuelMixB.name=RP-1 Rocket Fuel Cell -item.RocketFuelMixC.name=CN3H7O3 Rocket Fuel Cell -item.RocketFuelMixD.name=Dense Hydrazine Rocket Fuel Cell -item.RP1Fuel.name=RP-1 Fuel Cell -item.Monomethylhydrazine.name=Monomethylhydrazine Cell -item.Hydrazine.name=Hydrazine Cell -item.NitrogenTetroxide.name=Nitrogen Tetroxide Cell -item.NitrousOxide.name=Nitrous Oxide Cell -item.AmmoniumNitrateSlurry.name=Ammonium Nitrate Slurry Cell -item.Kerosene.name=Kerosene Cell -item.LiquidOxygen.name=Liquid Oxygen Cell [LOX] - -//Added 8/1/19 - -//Ores - -tile.OreIrarsite.name=Irarsite Ore -item.crushedIrarsite.name=Crushed Irarsite Ore -item.crushedCentrifugedIrarsite.name=Centrifuged Crushed Irarsite Ore -item.crushedPurifiedIrarsite.name=Purified Crushed Irarsite Ore -item.dustImpureIrarsite.name=Impure Irarsite Dust -item.dustPureIrarsite.name=Purified Irarsite Dust -item.itemDustIrarsite.name=Irarsite Dust -item.itemDustTinyIrarsite.name=Tiny Pile of Irarsite Dust -item.itemDustSmallIrarsite.name=Small Pile of Irarsite Dust - -tile.OreMiessiite.name=Miessiite Ore -item.crushedMiessiite.name=Crushed Miessiite Ore -item.crushedCentrifugedMiessiite.name=Centrifuged Crushed Miessiite Ore -item.crushedPurifiedMiessiite.name=Purified Crushed Miessiite Ore -item.dustImpureMiessiite.name=Impure Miessiite Dust -item.dustPureMiessiite.name=Purified Miessiite Dust -item.itemDustMiessiite.name=Miessiite Dust -item.itemDustTinyMiessiite.name=Tiny Pile of Miessiite Dust -item.itemDustSmallMiessiite.name=Small Pile of Miessiite Dust - -tile.OreComancheite.name=Comancheite Ore -item.crushedComancheite.name=Crushed Comancheite Ore -item.crushedCentrifugedComancheite.name=Centrifuged Crushed Comancheite Ore -item.crushedPurifiedComancheite.name=Purified Crushed Comancheite Ore -item.dustImpureComancheite.name=Impure Comancheite Dust -item.dustPureComancheite.name=Purified Comancheite Dust -item.itemDustComancheite.name=Comancheite Dust -item.itemDustTinyComancheite.name=Tiny Pile of Comancheite Dust -item.itemDustSmallComancheite.name=Small Pile of Comancheite Dust - -tile.OreKoboldite.name=Koboldite Ore -item.crushedKoboldite.name=Crushed Koboldite Ore -item.crushedCentrifugedKoboldite.name=Centrifuged Crushed Koboldite Ore -item.crushedPurifiedKoboldite.name=Purified Crushed Koboldite Ore -item.dustImpureKoboldite.name=Impure Koboldite Dust -item.dustPureKoboldite.name=Purified Koboldite Dust -item.itemDustKoboldite.name=Koboldite Dust -item.itemDustTinyKoboldite.name=Tiny Pile of Koboldite Dust -item.itemDustSmallKoboldite.name=Small Pile of Koboldite Dust - -tile.OrePerroudite.name=Perroudite Ore -item.crushedPerroudite.name=Crushed Perroudite Ore -item.crushedCentrifugedPerroudite.name=Centrifuged Crushed Perroudite Ore -item.crushedPurifiedPerroudite.name=Purified Crushed Perroudite Ore -item.dustImpurePerroudite.name=Impure Perroudite Dust -item.dustPurePerroudite.name=Purified Perroudite Dust -item.itemDustPerroudite.name=Perroudite Dust -item.itemDustTinyPerroudite.name=Tiny Pile of Perroudite Dust -item.itemDustSmallPerroudite.name=Small Pile of Perroudite Dust - -tile.OreDemicheleite.name=Demicheleite Ore -item.crushedDemicheleite.name=Crushed Demicheleite Ore -item.crushedCentrifugedDemicheleite.name=Centrifuged Crushed Demicheleite Ore -item.crushedPurifiedDemicheleite.name=Purified Crushed Demicheleite Ore -item.dustImpureDemicheleite.name=Impure Demicheleite Dust -item.dustPureDemicheleite.name=Purified Demicheleite Dust -item.itemDustDemicheleite.name=Demicheleite Dust -item.itemDustTinyDemicheleite.name=Tiny Pile of Demicheleite Dust -item.itemDustSmallDemicheleite.name=Small Pile of Demicheleite Dust - -tile.OreAlburnite.name=Alburnite Ore -item.crushedAlburnite.name=Crushed Alburnite Ore -item.crushedCentrifugedAlburnite.name=Centrifuged Crushed Alburnite Ore -item.crushedPurifiedAlburnite.name=Purified Crushed Alburnite Ore -item.dustImpureAlburnite.name=Impure Alburnite Dust -item.dustPureAlburnite.name=Purified Alburnite Dust -item.itemDustAlburnite.name=Alburnite Dust -item.itemDustTinyAlburnite.name=Tiny Pile of Alburnite Dust -item.itemDustSmallAlburnite.name=Small Pile of Alburnite Dust - -tile.OreLautarite.name=Lautarite Ore -item.crushedLautarite.name=Crushed Lautarite Ore -item.crushedCentrifugedLautarite.name=Centrifuged Crushed Lautarite Ore -item.crushedPurifiedLautarite.name=Purified Crushed Lautarite Ore -item.dustImpureLautarite.name=Impure Lautarite Dust -item.dustPureLautarite.name=Purified Lautarite Dust -item.itemDustLautarite.name=Lautarite Dust -item.itemDustTinyLautarite.name=Tiny Pile of Lautarite Dust -item.itemDustSmallLautarite.name=Small Pile of Lautarite Dust - -tile.OreBariteRd.name=Barite (Rd) Ore -item.crushedBariteRd.name=Crushed Barite (Rd) Ore -item.crushedCentrifugedBariteRd.name=Centrifuged Crushed Barite (Rd) Ore -item.crushedPurifiedBariteRd.name=Purified Crushed Barite (Rd) Ore -item.dustImpureBariteRd.name=Impure Barite (Rd) Dust -item.dustPureBariteRd.name=Purified Barite (Rd) Dust -item.itemDustBariteRd.name=Barite (Rd) Dust -item.itemDustTinyBariteRd.name=Tiny Pile of Barite (Rd) Dust -item.itemDustSmallBariteRd.name=Small Pile of Barite (Rd) Dust - -tile.OreHoneaite.name=Honeaite Ore -item.crushedHoneaite.name=Crushed Honeaite Ore -item.crushedCentrifugedHoneaite.name=Centrifuged Crushed Honeaite Ore -item.crushedPurifiedHoneaite.name=Purified Crushed Honeaite Ore -item.dustImpureHoneaite.name=Impure Honeaite Dust -item.dustPureHoneaite.name=Purified Honeaite Dust -item.itemDustHoneaite.name=Honeaite Dust -item.itemDustTinyHoneaite.name=Tiny Pile of Honeaite Dust -item.itemDustSmallHoneaite.name=Small Pile of Honeaite Dust - -tile.OreLafossaite.name=Lafossaite Ore -item.crushedLafossaite.name=Crushed Lafossaite Ore -item.crushedCentrifugedLafossaite.name=Centrifuged Crushed Lafossaite Ore -item.crushedPurifiedLafossaite.name=Purified Crushed Lafossaite Ore -item.dustImpureLafossaite.name=Impure Lafossaite Dust -item.dustPureLafossaite.name=Purified Lafossaite Dust -item.itemDustLafossaite.name=Lafossaite Dust -item.itemDustTinyLafossaite.name=Tiny Pile of Lafossaite Dust -item.itemDustSmallLafossaite.name=Small Pile of Lafossaite Dust - -tile.OreKashinite.name=Kashinite Ore -item.crushedKashinite.name=Crushed Kashinite Ore -item.crushedCentrifugedKashinite.name=Centrifuged Crushed Kashinite Ore -item.crushedPurifiedKashinite.name=Purified Crushed Kashinite Ore -item.dustImpureKashinite.name=Impure Kashinite Dust -item.dustPureKashinite.name=Purified Kashinite Dust -item.itemDustKashinite.name=Kashinite Dust -item.itemDustTinyKashinite.name=Tiny Pile of Kashinite Dust -item.itemDustSmallKashinite.name=Small Pile of Kashinite Dust - -tile.OreRadioactiveMineralMix.name=Strange Ore -item.crushedRadioactiveMineralMix.name=Crushed Strange Ore -item.crushedCentrifugedRadioactiveMineralMix.name=Centrifuged Crushed Strange Ore -item.crushedPurifiedRadioactiveMineralMix.name=Purified Crushed Strange Ore -item.dustImpureRadioactiveMineralMix.name=Impure Strange Dust -item.dustPureRadioactiveMineralMix.name=Purified Strange Dust -item.itemDustRadioactiveMineralMix.name=Strange Dust -item.itemDustTinyRadioactiveMineralMix.name=Tiny Pile of Strange Dust -item.itemDustSmallRadioactiveMineralMix.name=Small Pile of Strange Dust - -tile.OreDemicheleiteBr.name=Demicheleite (Br) Ore -item.crushedDemicheleiteBr.name=Crushed Demicheleite (Br) Ore -item.crushedCentrifugedDemicheleiteBr.name=Centrifuged Crushed Demicheleite (Br) Ore -item.crushedPurifiedDemicheleiteBr.name=Purified Crushed Demicheleite (Br) Ore -item.dustImpureDemicheleiteBr.name=Impure Demicheleite (Br) Dust -item.dustPureDemicheleiteBr.name=Purified Demicheleite (Br) Dust -item.itemDustDemicheleiteBr.name=Demicheleite (Br) Dust - - -//Materials - -item.itemIngotTitansteel.name=Titansteel Ingot -item.itemHotIngotTitansteel.name=Hot Titansteel Ingot -item.itemDustTitansteel.name=Titansteel Dust -item.itemDustTinyTitansteel.name=Tiny Pile of Titansteel Dust -item.itemDustSmallTitansteel.name=Small Pile of Titansteel Dust -item.itemNuggetTitansteel.name=Titansteel Nugget -item.itemPlateTitansteel.name=Titansteel Plate -item.itemPlateDoubleTitansteel.name=Double Titansteel Plate -item.itemBoltTitansteel.name=Titansteel Bolt -item.itemRodTitansteel.name=Titansteel Rod -item.itemRodLongTitansteel.name=Long Titansteel Rod -item.itemRingTitansteel.name=Titansteel Ring -item.itemScrewTitansteel.name=Titansteel Screw -item.itemRotorTitansteel.name=Titansteel Rotor -item.itemGearTitansteel.name=Titansteel Gear -item.itemCellTitansteel.name=Titansteel Cell -tile.Block of Titansteel.name=Block of Titansteel -tile.Titansteel Frame Box.name=Titansteel Frame Box - -item.itemIngotOctiron.name=Octiron Ingot -item.itemHotIngotOctiron.name=Hot Octiron Ingot -item.itemDustOctiron.name=Octiron Dust -item.itemDustTinyOctiron.name=Tiny Pile of Octiron Dust -item.itemDustSmallOctiron.name=Small Pile of Octiron Dust -item.itemNuggetOctiron.name=Octiron Nugget -item.itemPlateOctiron.name=Octiron Plate -item.itemPlateDoubleOctiron.name=Double Octiron Plate -item.itemBoltOctiron.name=Octiron Bolt -item.itemRodOctiron.name=Octiron Rod -item.itemRodLongOctiron.name=Long Octiron Rod -item.itemRingOctiron.name=Octiron Ring -item.itemScrewOctiron.name=Octiron Screw -item.itemRotorOctiron.name=Octiron Rotor -item.itemGearOctiron.name=Octiron Gear -item.itemCellOctiron.name=Octiron Cell -tile.Block of Octiron.name=Block of Octiron -tile.Octiron Frame Box.name=Octiron Frame Box - -item.itemIngotWatertightSteel.name=Watertight Steel Ingot -item.itemHotIngotWatertightSteel.name=Hot Watertight Steel Ingot -item.itemDustWatertightSteel.name=Watertight Steel Dust -item.itemDustTinyWatertightSteel.name=Tiny Pile of Watertight Steel Dust -item.itemDustSmallWatertightSteel.name=Small Pile of Watertight Steel Dust -item.itemNuggetWatertightSteel.name=Watertight Steel Nugget -item.itemPlateWatertightSteel.name=Watertight Steel Plate -item.itemPlateDoubleWatertightSteel.name=Double Watertight Steel Plate -item.itemBoltWatertightSteel.name=Watertight Steel Bolt -item.itemRodWatertightSteel.name=Watertight Steel Rod -item.itemRodLongWatertightSteel.name=Long Watertight Steel Rod -item.itemRingWatertightSteel.name=Watertight Steel Ring -item.itemScrewWatertightSteel.name=Watertight Steel Screw -item.itemRotorWatertightSteel.name=Watertight Steel Rotor -item.itemGearWatertightSteel.name=Watertight Steel Gear -item.itemCellWatertightSteel.name=Watertight Steel Cell -tile.Block of Watertight Steel.name=Block of Watertight Steel -tile.Watertight Steel Frame Box.name=Watertight Steel Frame Box - -item.itemIngotCelestialTungsten.name=Celestial Tungsten Ingot -item.itemHotIngotCelestialTungsten.name=Hot Celestial Tungsten Ingot -item.itemDustCelestialTungsten.name=Celestial Tungsten Dust -item.itemDustTinyCelestialTungsten.name=Tiny Pile of Celestial Tungsten Dust -item.itemDustSmallCelestialTungsten.name=Small Pile of Celestial Tungsten Dust -item.itemNuggetCelestialTungsten.name=Celestial Tungsten Nugget -item.itemPlateCelestialTungsten.name=Celestial Tungsten Plate -item.itemPlateDoubleCelestialTungsten.name=Double Celestial Tungsten Plate -item.itemBoltCelestialTungsten.name=Celestial Tungsten Bolt -item.itemRodCelestialTungsten.name=Celestial Tungsten Rod -item.itemRodLongCelestialTungsten.name=Long Celestial Tungsten Rod -item.itemRingCelestialTungsten.name=Celestial Tungsten Ring -item.itemScrewCelestialTungsten.name=Celestial Tungsten Screw -item.itemRotorCelestialTungsten.name=Celestial Tungsten Rotor -item.itemGearCelestialTungsten.name=Celestial Tungsten Gear -item.itemCellCelestialTungsten.name=Celestial Tungsten Cell -tile.Block of Celestial Tungsten.name=Block of Celestial Tungsten -tile.Celestial Tungsten Frame Box.name=Celestial Tungsten Frame Box - -item.itemIngotHypogen.name=Hypogen Ingot -item.itemHotIngotHypogen.name=Hot Hypogen Ingot -item.itemDustHypogen.name=Hypogen Dust -item.itemDustTinyHypogen.name=Tiny Pile of Hypogen Dust -item.itemDustSmallHypogen.name=Small Pile of Hypogen Dust -item.itemNuggetHypogen.name=Hypogen Nugget -item.itemPlateHypogen.name=Hypogen Plate -item.itemPlateDoubleHypogen.name=Double Hypogen Plate -item.itemBoltHypogen.name=Hypogen Bolt -item.itemRodHypogen.name=Hypogen Rod -item.itemRodLongHypogen.name=Long Hypogen Rod -item.itemRingHypogen.name=Hypogen Ring -item.itemScrewHypogen.name=Hypogen Screw -item.itemRotorHypogen.name=Hypogen Rotor -item.itemGearHypogen.name=Hypogen Gear -item.itemCellHypogen.name=Hypogen Cell -tile.Block of Hypogen.name=Block of Hypogen -tile.Hypogen Frame Box.name=Hypogen Frame Box - -item.itemIngotArceusAlloy2B.name=Arceus Alloy 2B Ingot -item.itemHotIngotArceusAlloy2B.name=Hot Arceus Alloy 2B Ingot -item.itemDustArceusAlloy2B.name=Arceus Alloy 2B Dust -item.itemDustTinyArceusAlloy2B.name=Tiny Pile of Arceus Alloy 2B Dust -item.itemDustSmallArceusAlloy2B.name=Small Pile of Arceus Alloy 2B Dust -item.itemNuggetArceusAlloy2B.name=Arceus Alloy 2B Nugget -item.itemPlateArceusAlloy2B.name=Arceus Alloy 2B Plate -item.itemPlateDoubleArceusAlloy2B.name=Double Arceus Alloy 2B Plate -item.itemBoltArceusAlloy2B.name=Arceus Alloy 2B Bolt -item.itemRodArceusAlloy2B.name=Arceus Alloy 2B Rod -item.itemRodLongArceusAlloy2B.name=Long Arceus Alloy 2B Rod -item.itemRingArceusAlloy2B.name=Arceus Alloy 2B Ring -item.itemScrewArceusAlloy2B.name=Arceus Alloy 2B Screw -item.itemRotorArceusAlloy2B.name=Arceus Alloy 2B Rotor -item.itemGearArceusAlloy2B.name=Arceus Alloy 2B Gear -item.itemCellArceusAlloy2B.name=Arceus Alloy 2B Cell -tile.Block of Arceus Alloy 2B.name=Block of Arceus Alloy 2B -tile.Arceus Alloy 2B Frame Box.name=Arceus Alloy 2B Frame Box - -item.itemIngotChromaticGlass.name=Chromatic Glass Ingot -item.itemHotIngotChromaticGlass.name=Hot Chromatic Glass Ingot -item.itemDustChromaticGlass.name=Chromatic Glass Dust -item.itemDustTinyChromaticGlass.name=Tiny Pile of Chromatic Glass Dust -item.itemDustSmallChromaticGlass.name=Small Pile of Chromatic Glass Dust -item.itemNuggetChromaticGlass.name=Chromatic Glass Nugget -item.itemPlateChromaticGlass.name=Chromatic Glass Plate -item.itemPlateDoubleChromaticGlass.name=Double Chromatic Glass Plate -item.itemBoltChromaticGlass.name=Chromatic Glass Bolt -item.itemRodChromaticGlass.name=Chromatic Glass Rod -item.itemRodLongChromaticGlass.name=Long Chromatic Glass Rod -item.itemRingChromaticGlass.name=Chromatic Glass Ring -item.itemScrewChromaticGlass.name=Chromatic Glass Screw -item.itemRotorChromaticGlass.name=Chromatic Glass Rotor -item.itemGearChromaticGlass.name=Chromatic Glass Gear -item.itemCellChromaticGlass.name=Chromatic Glass Cell -tile.Block of Chromatic Glass.name=Block of Chromatic Glass -tile.Chromatic Glass Frame Box.name=Chromatic Glass Frame Box - -item.itemIngotAstralTitanium.name=Astral Titanium Ingot -item.itemHotIngotAstralTitanium.name=Hot Astral Titanium Ingot -item.itemDustAstralTitanium.name=Astral Titanium Dust -item.itemDustTinyAstralTitanium.name=Tiny Pile of Astral Titanium Dust -item.itemDustSmallAstralTitanium.name=Small Pile of Astral Titanium Dust -item.itemNuggetAstralTitanium.name=Astral Titanium Nugget -item.itemPlateAstralTitanium.name=Astral Titanium Plate -item.itemPlateDoubleAstralTitanium.name=Double Astral Titanium Plate -item.itemBoltAstralTitanium.name=Astral Titanium Bolt -item.itemRodAstralTitanium.name=Astral Titanium Rod -item.itemRodLongAstralTitanium.name=Long Astral Titanium Rod -item.itemRingAstralTitanium.name=Astral Titanium Ring -item.itemScrewAstralTitanium.name=Astral Titanium Screw -item.itemRotorAstralTitanium.name=Astral Titanium Rotor -item.itemGearAstralTitanium.name=Astral Titanium Gear -item.itemCellAstralTitanium.name=Astral Titanium Cell -tile.Block of Astral Titanium.name=Block of Astral Titanium -tile.Astral Titanium Frame Box.name=Astral Titanium Frame Box - -item.itemIngotTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Ingot -item.itemHotIngotTungstenTitaniumCarbide.name=Hot Tungsten Titanium Carbide Ingot -item.itemDustTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Dust -item.itemDustTinyTungstenTitaniumCarbide.name=Tiny Pile of Tungsten Titanium Carbide Dust -item.itemDustSmallTungstenTitaniumCarbide.name=Small Pile of Tungsten Titanium Carbide Dust -item.itemNuggetTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Nugget -item.itemPlateTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Plate -item.itemPlateDoubleTungstenTitaniumCarbide.name=Double Tungsten Titanium Carbide Plate -item.itemBoltTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Bolt -item.itemRodTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Rod -item.itemRodLongTungstenTitaniumCarbide.name=Long Tungsten Titanium Carbide Rod -item.itemRingTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Ring -item.itemScrewTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Screw -item.itemRotorTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Rotor -item.itemGearTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Gear -item.itemCellTungstenTitaniumCarbide.name=Tungsten Titanium Carbide Cell -tile.Block of Tungsten Titanium Carbide.name=Block of Tungsten Titanium Carbide -tile.Tungsten Titanium Carbide Frame Box.name=Tungsten Titanium Carbide Frame Box - -item.itemIngotNitinol60.name=Nitinol 60 Ingot -item.itemHotIngotNitinol60.name=Hot Nitinol 60 Ingot -item.itemDustNitinol60.name=Nitinol 60 Dust -item.itemDustTinyNitinol60.name=Tiny Pile of Nitinol 60 Dust -item.itemDustSmallNitinol60.name=Small Pile of Nitinol 60 Dust -item.itemNuggetNitinol60.name=Nitinol 60 Nugget -item.itemPlateNitinol60.name=Nitinol 60 Plate -item.itemPlateDoubleNitinol60.name=Double Nitinol 60 Plate -item.itemBoltNitinol60.name=Nitinol 60 Bolt -item.itemRodNitinol60.name=Nitinol 60 Rod -item.itemRodLongNitinol60.name=Long Nitinol 60 Rod -item.itemRingNitinol60.name=Nitinol 60 Ring -item.itemScrewNitinol60.name=Nitinol 60 Screw -item.itemRotorNitinol60.name=Nitinol 60 Rotor -item.itemGearNitinol60.name=Nitinol 60 Gear -item.itemCellNitinol60.name=Nitinol 60 Cell -tile.Block of Nitinol 60.name=Block of Nitinol 60 -tile.Nitinol 60 Frame Box.name=Nitinol 60 Frame Box - -item.itemIngotAdvancedNitinol.name=Advanced Nitinol Ingot -item.itemHotIngotAdvancedNitinol.name=Hot Advanced Nitinol Ingot -item.itemDustAdvancedNitinol.name=Advanced Nitinol Dust -item.itemDustTinyAdvancedNitinol.name=Tiny Pile of Advanced Nitinol Dust -item.itemDustSmallAdvancedNitinol.name=Small Pile of Advanced Nitinol Dust -item.itemNuggetAdvancedNitinol.name=Advanced Nitinol Nugget -item.itemPlateAdvancedNitinol.name=Advanced Nitinol Plate -item.itemPlateDoubleAdvancedNitinol.name=Double Advanced Nitinol Plate -item.itemBoltAdvancedNitinol.name=Advanced Nitinol Bolt -item.itemRodAdvancedNitinol.name=Advanced Nitinol Rod -item.itemRodLongAdvancedNitinol.name=Long Advanced Nitinol Rod -item.itemRingAdvancedNitinol.name=Advanced Nitinol Ring -item.itemScrewAdvancedNitinol.name=Advanced Nitinol Screw -item.itemRotorAdvancedNitinol.name=Advanced Nitinol Rotor -item.itemGearAdvancedNitinol.name=Advanced Nitinol Gear -item.itemCellAdvancedNitinol.name=Advanced Nitinol Cell -tile.Block of Advanced Nitinol.name=Block of Advanced Nitinol -tile.Advanced Nitinol Frame Box.name=Advanced Nitinol Frame Box - -item.itemIngotArcanite.name=Arcanite Ingot -item.itemHotIngotArcanite.name=Hot Arcanite Ingot -item.itemDustArcanite.name=Arcanite Dust -item.itemDustTinyArcanite.name=Tiny Pile of Arcanite Dust -item.itemDustSmallArcanite.name=Small Pile of Arcanite Dust -item.itemNuggetArcanite.name=Arcanite Nugget -item.itemPlateArcanite.name=Arcanite Plate -item.itemPlateDoubleArcanite.name=Double Arcanite Plate -item.itemBoltArcanite.name=Arcanite Bolt -item.itemRodArcanite.name=Arcanite Rod -item.itemRodLongArcanite.name=Long Arcanite Rod -item.itemRingArcanite.name=Arcanite Ring -item.itemScrewArcanite.name=Arcanite Screw -item.itemRotorArcanite.name=Arcanite Rotor -item.itemGearArcanite.name=Arcanite Gear -item.itemCellArcanite.name=Arcanite Cell -tile.Block of Arcanite.name=Block of Arcanite -tile.Arcanite Frame Box.name=Arcanite Frame Box - -item.itemIngotPikyonium64B.name=Pikyonium 64B Ingot -item.itemHotIngotPikyonium64B.name=Hot Pikyonium 64B Ingot -item.itemDustPikyonium64B.name=Pikyonium 64B Dust -item.itemDustTinyPikyonium64B.name=Tiny Pile of Pikyonium 64B Dust -item.itemDustSmallPikyonium64B.name=Small Pile of Pikyonium 64B Dust -item.itemNuggetPikyonium64B.name=Pikyonium 64B Nugget -item.itemPlatePikyonium64B.name=Pikyonium 64B Plate -item.itemPlateDoublePikyonium64B.name=Double Pikyonium 64B Plate -item.itemBoltPikyonium64B.name=Pikyonium 64B Bolt -item.itemRodPikyonium64B.name=Pikyonium 64B Rod -item.itemRodLongPikyonium64B.name=Long Pikyonium 64B Rod -item.itemRingPikyonium64B.name=Pikyonium 64B Ring -item.itemScrewPikyonium64B.name=Pikyonium 64B Screw -item.itemRotorPikyonium64B.name=Pikyonium 64B Rotor -item.itemGearPikyonium64B.name=Pikyonium 64B Gear -item.itemCellPikyonium64B.name=Pikyonium 64B Cell -tile.Block of Pikyonium 64B.name=Block of Pikyonium 64B -tile.Pikyonium 64B Frame Box.name=Pikyonium 64B Frame Box - -item.itemIngotCinobiteA243.name=Cinobite A243 Ingot -item.itemHotIngotCinobiteA243.name=Hot Cinobite A243 Ingot -item.itemDustCinobiteA243.name=Cinobite A243 Dust -item.itemDustTinyCinobiteA243.name=Tiny Pile of Cinobite A243 Dust -item.itemDustSmallCinobiteA243.name=Small Pile of Cinobite A243 Dust -item.itemNuggetCinobiteA243.name=Cinobite A243 Nugget -item.itemPlateCinobiteA243.name=Cinobite A243 Plate -item.itemPlateDoubleCinobiteA243.name=Double Cinobite A243 Plate -item.itemBoltCinobiteA243.name=Cinobite A243 Bolt -item.itemRodCinobiteA243.name=Cinobite A243 Rod -item.itemRodLongCinobiteA243.name=Long Cinobite A243 Rod -item.itemRingCinobiteA243.name=Cinobite A243 Ring -item.itemScrewCinobiteA243.name=Cinobite A243 Screw -item.itemRotorCinobiteA243.name=Cinobite A243 Rotor -item.itemGearCinobiteA243.name=Cinobite A243 Gear -item.itemCellCinobiteA243.name=Cinobite A243 Cell -tile.Block of Cinobite A243.name=Block of Cinobite A243 -tile.Cinobite A243 Frame Box.name=Cinobite A243 Frame Box - -item.itemIngotLafiumCompound.name=Lafium Compound Ingot -item.itemHotIngotLafiumCompound.name=Hot Lafium Compound Ingot -item.itemDustLafiumCompound.name=Lafium Compound Dust -item.itemDustTinyLafiumCompound.name=Tiny Pile of Lafium Compound Dust -item.itemDustSmallLafiumCompound.name=Small Pile of Lafium Compound Dust -item.itemNuggetLafiumCompound.name=Lafium Compound Nugget -item.itemPlateLafiumCompound.name=Lafium Compound Plate -item.itemPlateDoubleLafiumCompound.name=Double Lafium Compound Plate -item.itemBoltLafiumCompound.name=Lafium Compound Bolt -item.itemRodLafiumCompound.name=Lafium Compound Rod -item.itemRodLongLafiumCompound.name=Long Lafium Compound Rod -item.itemRingLafiumCompound.name=Lafium Compound Ring -item.itemScrewLafiumCompound.name=Lafium Compound Screw -item.itemRotorLafiumCompound.name=Lafium Compound Rotor -item.itemGearLafiumCompound.name=Lafium Compound Gear -item.itemCellLafiumCompound.name=Lafium Compound Cell -tile.Block of Lafium Compound.name=Block of Lafium Compound -tile.Lafium Compound Frame Box.name=Lafium Compound Frame Box - -item.itemIngotKoboldite.name=Koboldite Ingot -item.itemHotIngotKoboldite.name=Hot Koboldite Ingot -item.itemDustKoboldite.name=Koboldite Dust -item.itemDustTinyKoboldite.name=Tiny Pile of Koboldite Dust -item.itemDustSmallKoboldite.name=Small Pile of Koboldite Dust -item.itemNuggetKoboldite.name=Koboldite Nugget -item.itemPlateKoboldite.name=Koboldite Plate -item.itemPlateDoubleKoboldite.name=Double Koboldite Plate -item.itemBoltKoboldite.name=Koboldite Bolt -item.itemRodKoboldite.name=Koboldite Rod -item.itemRodLongKoboldite.name=Long Koboldite Rod -item.itemRingKoboldite.name=Koboldite Ring -item.itemScrewKoboldite.name=Koboldite Screw -item.itemRotorKoboldite.name=Koboldite Rotor -item.itemGearKoboldite.name=Koboldite Gear -item.itemCellKoboldite.name=Koboldite Cell -tile.Block of Koboldite.name=Block of Koboldite -tile.Koboldite Frame Box.name=Koboldite Frame Box - -item.itemIngotAbyssalAlloy.name=Abyssal Alloy Ingot -item.itemHotIngotAbyssalAlloy.name=Hot Abyssal Alloy Ingot -item.itemDustAbyssalAlloy.name=Abyssal Alloy Dust -item.itemDustTinyAbyssalAlloy.name=Tiny Pile of Abyssal Alloy Dust -item.itemDustSmallAbyssalAlloy.name=Small Pile of Abyssal Alloy Dust -item.itemNuggetAbyssalAlloy.name=Abyssal Alloy Nugget -item.itemPlateAbyssalAlloy.name=Abyssal Alloy Plate -item.itemPlateDoubleAbyssalAlloy.name=Double Abyssal Alloy Plate -item.itemBoltAbyssalAlloy.name=Abyssal Alloy Bolt -item.itemRodAbyssalAlloy.name=Abyssal Alloy Rod -item.itemRodLongAbyssalAlloy.name=Long Abyssal Alloy Rod -item.itemRingAbyssalAlloy.name=Abyssal Alloy Ring -item.itemScrewAbyssalAlloy.name=Abyssal Alloy Screw -item.itemRotorAbyssalAlloy.name=Abyssal Alloy Rotor -item.itemGearAbyssalAlloy.name=Abyssal Alloy Gear -item.itemCellAbyssalAlloy.name=Abyssal Alloy Cell -tile.Block of Abyssal Alloy.name=Block of Abyssal Alloy -tile.Abyssal Alloy Frame Box.name=Abyssal Alloy Frame Box - - - - - - - - - - - - - - - - - - - -//Radioactive -item.dustTechnetium99M.name=Technetium 99M Dust -item.dustTechnetium99.name=Technetium 99 Dust -item.dustMolybdenum99.name=Molybdenum 99 Dust - -//Bags -item.item.MysticBag.name=Mystic Pouch -item.item.Eatotron9000.name=Eatotronic 9000 -item.item.ToolBox.name=Workers Toolbox - -//Cells -item.Bromine.name=Bromine Cell -item.Krypton.name=Krypton Cell -item.cryotheum.name=Cryotheum Cell -item.pyrotheum.name=Pyrotheum Cell -item.GeneticMutagen.name=Mutagen Cell - -//Ingots -item.itemHotIngotIncoloy020.name=Hot Incoloy-020 Ingot -item.itemHotIngotIncoloyDS.name=Hot Incoloy-DS Ingot -item.itemHotIngotTalonite.name=Hot Talonite Ingot -item.itemHotIngotHastelloyX.name=Hot Hastelloy-X Ingot -item.itemHotIngotHastelloyW.name=Hot Hastelloy-W Carbide Ingot - -//Railcraft Fix -item.railcraft.part.plate.lead.name=Lead Plate - -//Ions -item.particle.ion.Hydrogen.name=Hydrogen Ion -item.particle.ion.Helium.name=Helium Ion -item.particle.ion.Lithium.name=Lithium Ion -item.particle.ion.Beryllium.name=Beryllium Ion -item.particle.ion.Boron.name=Boron Ion -item.particle.ion.Carbon.name=Carbon Ion -item.particle.ion.Nitrogen.name=Nitrogen Ion -item.particle.ion.Oxygen.name=Oxygen Ion -item.particle.ion.Fluorine.name=Fluorine Ion -item.particle.ion.Neon.name=Neon Ion -item.particle.ion.Sodium.name=Sodium Ion -item.particle.ion.Magnesium.name=Magnesium Ion -item.particle.ion.Aluminum.name=Aluminum Ion -item.particle.ion.Silicon.name=Silicon Ion -item.particle.ion.Phosphorus.name=Phosphorus Ion -item.particle.ion.Sulfur.name=Sulfur Ion -item.particle.ion.Chlorine.name=Chlorine Ion -item.particle.ion.Argon.name=Argon Ion -item.particle.ion.Potassium.name=Potassium Ion -item.particle.ion.Calcium.name=Calcium Ion -item.particle.ion.Scandium.name=Scandium Ion -item.particle.ion.Titanium.name=Titanium Ion -item.particle.ion.Vanadium.name=Vanadium Ion -item.particle.ion.Chromium.name=Chromium Ion -item.particle.ion.Manganese.name=Manganese Ion -item.particle.ion.Iron.name=Iron Ion -item.particle.ion.Cobalt.name=Cobalt Ion -item.particle.ion.Nickel.name=Nickel Ion -item.particle.ion.Copper.name=Copper Ion -item.particle.ion.Zinc.name=Zinc Ion -item.particle.ion.Gallium.name=Gallium Ion -item.particle.ion.Germanium.name=Germanium Ion -item.particle.ion.Arsenic.name=Arsenic Ion -item.particle.ion.Selenium.name=Selenium Ion -item.particle.ion.Bromine.name=Bromine Ion -item.particle.ion.Krypton.name=Krypton Ion -item.particle.ion.Rubidium.name=Rubidium Ion -item.particle.ion.Strontium.name=Strontium Ion -item.particle.ion.Yttrium.name=Yttrium Ion -item.particle.ion.Zirconium.name=Zirconium Ion -item.particle.ion.Niobium.name=Niobium Ion -item.particle.ion.Molybdenum.name=Molybdenum Ion -item.particle.ion.Technetium.name=Technetium Ion -item.particle.ion.Ruthenium.name=Ruthenium Ion -item.particle.ion.Rhodium.name=Rhodium Ion -item.particle.ion.Palladium.name=Palladium Ion -item.particle.ion.Silver.name=Silver Ion -item.particle.ion.Cadmium.name=Cadmium Ion -item.particle.ion.Indium.name=Indium Ion -item.particle.ion.Tin.name=Tin Ion -item.particle.ion.Antimony.name=Antimony Ion -item.particle.ion.Tellurium.name=Tellurium Ion -item.particle.ion.Iodine.name=Iodine Ion -item.particle.ion.Xenon.name=Xenon Ion -item.particle.ion.Cesium.name=Caesium Ion -item.particle.ion.Barium.name=Barium Ion -item.particle.ion.Lanthanum.name=Lanthanum Ion -item.particle.ion.Cerium.name=Cerium Ion -item.particle.ion.Praseodymium.name=Praseodymium Ion -item.particle.ion.Neodymium.name=Neodymium Ion -item.particle.ion.Promethium.name=Promethium Ion -item.particle.ion.Samarium.name=Samarium Ion -item.particle.ion.Europium.name=Europium Ion -item.particle.ion.Gadolinium.name=Gadolinium Ion -item.particle.ion.Terbium.name=Terbium Ion -item.particle.ion.Dysprosium.name=Dysprosium Ion -item.particle.ion.Holmium.name=Holmium Ion -item.particle.ion.Erbium.name=Erbium Ion -item.particle.ion.Thulium.name=Thulium Ion -item.particle.ion.Ytterbium.name=Ytterbium Ion -item.particle.ion.Lutetium.name=Lutetium Ion -item.particle.ion.Hafnium.name=Hafnium Ion -item.particle.ion.Tantalum.name=Tantalum Ion -item.particle.ion.Tungsten.name=Tungsten Ion -item.particle.ion.Rhenium.name=Rhenium Ion -item.particle.ion.Osmium.name=Osmium Ion -item.particle.ion.Iridium.name=Iridium Ion -item.particle.ion.Platinum.name=Platinum Ion -item.particle.ion.Gold.name=Gold Ion -item.particle.ion.Mercury.name=Mercury Ion -item.particle.ion.Thallium.name=Thallium Ion -item.particle.ion.Lead.name=Lead Ion -item.particle.ion.Bismuth.name=Bismuth Ion -item.particle.ion.Polonium.name=Polonium Ion -item.particle.ion.Astatine.name=Astatine Ion -item.particle.ion.Radon.name=Radon Ion -item.particle.ion.Francium.name=Francium Ion -item.particle.ion.Radium.name=Radium Ion -item.particle.ion.Actinium.name=Actinium Ion -item.particle.ion.Thorium.name=Thorium Ion -item.particle.ion.Protactinium.name=Protactinium Ion -item.particle.ion.Uranium.name=Uranium Ion -item.particle.ion.Neptunium.name=Neptunium Ion -item.particle.ion.Plutonium.name=Plutonium Ion -item.particle.ion.Americium.name=Americium Ion -item.particle.ion.Curium.name=Curium Ion -item.particle.ion.Berkelium.name=Berkelium Ion -item.particle.ion.Californium.name=Californium Ion -item.particle.ion.Einsteinium.name=Einsteinium Ion -item.particle.ion.Fermium.name=Fermium Ion -item.particle.ion.Mendelevium.name=Mendelevium Ion -item.particle.ion.Nobelium.name=Nobelium Ion -item.particle.ion.Lawrencium.name=Lawrencium Ion -item.particle.ion.Rutherfordium.name=Rutherfordium Ion -item.particle.ion.Dubnium.name=Dubnium Ion -item.particle.ion.Seaborgium.name=Seaborgium Ion -item.particle.ion.Bohrium.name=Bohrium Ion -item.particle.ion.Hassium.name=Hassium Ion -item.particle.ion.Meitnerium.name=Meitnerium Ion -item.particle.ion.Darmstadtium.name=Darmstadtium Ion -item.particle.ion.Roentgenium.name=Roentgenium Ion -item.particle.ion.Copernicium.name=Copernicium Ion -item.particle.ion.Nihonium.name=Nihonium Ion -item.particle.ion.Flerovium.name=Flerovium Ion -item.particle.ion.Moscovium.name=Moscovium Ion -item.particle.ion.Livermorium.name=Livermorium Ion -item.particle.ion.Tennessine.name=Tennessine Ion -item.particle.ion.Oganesson.name=Oganesson Ion - - -item.particle.base.Graviton.name=Graviton -item.particle.base.Up.name=Up Quark -item.particle.base.Down.name=Down Quark -item.particle.base.Charm.name=Charm Quark -item.particle.base.Strange.name=Strange Quark -item.particle.base.Top.name=Top Quark -item.particle.base.Bottom.name=Bottom Quark -item.particle.base.Electron.name=Electron -item.particle.base.Electron Neutrino.name=Electron Neutrino -item.particle.base.Muon.name=Muon -item.particle.base.Muon Neutrino.name=Muon Neutrino -item.particle.base.Tau.name=Tau -item.particle.base.Tau Neutrino.name=Tau Neutrino -item.particle.base.Gluon.name=Gluon -item.particle.base.Photon.name=Photon -item.particle.base.Z Boson.name=Z Boson -item.particle.base.W Boson.name=W Boson -item.particle.base.Higgs Boson.name=Higgs Boson -item.particle.base.Proton.name=Proton -item.particle.base.Neutron.name=Neutron -item.particle.base.Lambda.name=Lambda -item.particle.base.Omega.name=Omega -item.particle.base.Pion.name=Pion -item.particle.base.ETA Meson.name=ETA Meson -item.particle.base.Unknown.name=Unknown Particle - -//Added 12/1/19 - -tile.playerDoorGlass.name=Glass Auto-Door -tile.playerDoorCactus.name=Cactus Auto-Door -tile.playerDoorIce.name=Ice Auto-Door -tile.playerDoorIron.name=Iron Auto-Door -tile.playerDoorWood.name=Wooden Auto-Door - -//Added 4/2/19 - -item.GTPP.BattPack.06.name=Charge Pack [LuV] -item.GTPP.BattPack.07.name=Charge Pack [ZPM] -item.GTPP.BattPack.08.name=Charge Pack [UV] -item.GTPP.BattPack.09.name=Charge Pack [MAX] - - -//Added 13/3/19 -item.gtpp.debug.scanner.name=GT++ Debug Scanner -item.RawWaste.name=Cell of Animal Waste -item.ManureSlurry.name=Cell of Manure Slurry -item.FertileManureSlurry.name=Cell of Fertile Slurry -item.itemDustTinyDemicheleiteBr.name=Tiny Pile of Demicheleite (Br) -item.itemDustSmallDemicheleiteBr.name=Small Pile of Demicheleite (Br) -tile.blockPooCollector.name=Agricultural Sewer -tile.Block of Lithium 7.name=Block of Lithium 7 - -//Added 14/3/19 -item.blood.name=Cell of Blood -item.aniline.name=Aniline Cell -item.cadaverine.name=Cadaverine Cell -item.polyurethane.name=Polyurethane Cell -item.putrescine.name=Putrescine Cell -item.cyclohexane.name=Cyclohexane Cell -item.cyclohexanone.name=Cyclohexanone Cell -item.nitrobenzene.name=Nitrobenzene Cell -item.ender.name=Cell of Liquid Ender -item.xpjuice.name=Cell of Liquid Xp -item.itemBombUnf.name=Throwable Bomb (unf) -item.itemBombCasing.name=Bomb Casing -item.gtpp.throwable.bomb.name=Throwable Bomb -item.itemDetCable.name=Bomb Fuse -tile.blockPooCollector.0.name=Agricultural Sewer -tile.blockPooCollector.8.name=Biocomposite Collector -item.itemIngotBakelite.name=Bakelite Ingot -item.itemDustBakelite.name=Bakelite Dust -item.itemDustTinyBakelite.name=Tiny Pile of Bakelite Dust -item.itemDustSmallBakelite.name=Small Pile of Bakelite Dust -item.itemNuggetBakelite.name=Bakelite Nugget -item.itemPlateBakelite.name=Bakelite Plate -item.itemPlateDoubleBakelite.name=Double Bakelite Plate -item.itemCellBakelite.name=Bakelite Cell -tile.Block of Bakelite.name=Block of Bakelite -item.itemIngotNylon.name=Nylon Ingot -item.itemDustNylon.name=Nylon Dust -item.itemDustTinyNylon.name=Tiny Pile of Nylon Dust -item.itemDustSmallNylon.name=Small Pile of Nylon Dust -item.itemNuggetNylon.name=Nylon Nugget -item.itemPlateNylon.name=Nylon Plate -item.itemPlateDoubleNylon.name=Double Nylon Plate -item.itemCellNylon.name=Nylon Cell -tile.Block of Nylon.name=Block of Nylon -item.itemIngotTeflon.name=Teflon Ingot -item.itemDustTeflon.name=Teflon Dust -item.itemDustTinyTeflon.name=Tiny Pile of Teflon Dust -item.itemDustSmallTeflon.name=Small Pile of Teflon Dust -item.itemNuggetTeflon.name=Teflon Nugget -item.itemPlateTeflon.name=Teflon Plate -item.itemPlateDoubleTeflon.name=Double Teflon Plate -item.itemCellTeflon.name=Teflon Cell -tile.Block of Teflon.name=Block of Teflon - -//Added 17/4/19 -//Spelling Corrections -item.particle.ion.Aluminium.name=Aluminium Ion -item.particle.ion.Caesium.name=Caesium Ion - -item.GTPP.MonsterKiller.Enderman.name=Enderman Killer -item.GTPP.MonsterKiller.Spider.name=Spider Killer -item.GTPP.MonsterKiller.Skeleton.name=Skeleton Killer -item.GTPP.MonsterKiller.Creeper.name=Creeper Killer -item.GTPP.MonsterKiller.Zombie.name=Zombie Killer -item.GTPP.MonsterKiller.Hellish.name=Nether Mob Killer - -item.itemIngotRunite.name=Runite Ingot -item.itemDustRunite.name=Runite Dust -item.itemDustTinyRunite.name=Tiny Pile of Runite Dust -item.itemDustSmallRunite.name=Small Pile of Runite Dust -item.itemNuggetRunite.name=Runite Nugget -item.itemPlateRunite.name=Runite Plate -item.itemPlateDoubleRunite.name=Double Runite Plate -item.itemCellRunite.name=Runite Cell -tile.Block of Runite.name=Block of Runite - -item.itemIngotDragonblood.name=Dragon Metal Ingot -item.itemDustDragonblood.name=Dragon Metal Dust -item.itemDustTinyDragonblood.name=Tiny Pile of Dragon Metal Dust -item.itemDustSmallDragonblood.name=Small Pile of Dragon Metal Dust -item.itemNuggetDragonblood.name=Shard of Dragonblood -item.itemPlateDragonblood.name=Dragon Metal Plate -item.itemPlateDoubleDragonblood.name=Double Dragon Metal Plate -item.itemCellDragonblood.name=Dragonblood Cell -tile.Block of Dragonblood.name=Block of Dragon Metal - -item.itemIngotBlackTitanium.name=Black Titanium Ingot -item.itemDustBlackTitanium.name=Black Titanium Dust -item.itemDustTinyBlackTitanium.name=Tiny Pile of Black Titanium Dust -item.itemDustSmallBlackTitanium.name=Small Pile of Black Titanium Dust -item.itemNuggetBlackTitanium.name=Black Titanium Nugget -item.itemPlateBlackTitanium.name=Black Titanium Plate -item.itemPlateDoubleBlackTitanium.name=Double Black Titanium Plate -item.itemCellBlackTitanium.name=Black Titanium Cell -tile.Block of Black Titanium.name=Block of Black Titanium - -item.itemIngotAncientGranite.name=Ancient Granite Ingot -item.itemHotIngotAncientGranite.name=Hot Ancient Granite Ingot -item.itemDustAncientGranite.name=Ancient Granite Dust -item.itemDustTinyAncientGranite.name=Tiny Pile of Ancient Granite Dust -item.itemDustSmallAncientGranite.name=Small Pile of Ancient Granite Dust -item.itemNuggetAncientGranite.name=Ancient Granite Nugget -item.itemPlateAncientGranite.name=Ancient Granite Plate -item.itemPlateDoubleAncientGranite.name=Double Ancient Granite Plate -tile.Block of Ancient Granite.name=Block of Ancient Granite - -item.itemIngotBabbitAlloy.name=Babbit Alloy Ingot -item.itemHotIngotBabbitAlloy.name=Hot Babbit Alloy Ingot -item.itemDustBabbitAlloy.name=Babbit Alloy Dust -item.itemDustTinyBabbitAlloy.name=Tiny Pile of Babbit Alloy Dust -item.itemDustSmallBabbitAlloy.name=Small Pile of Babbit Alloy Dust -item.itemNuggetBabbitAlloy.name=Babbit Alloy Nugget -item.itemPlateBabbitAlloy.name=Babbit Alloy Plate -item.itemPlateDoubleBabbitAlloy.name=Double Babbit Alloy Plate -item.itemCellBabbitAlloy.name=Babbit Alloy Cell -tile.Block of Babbit Alloy.name=Block of Babbit Alloy - -item.itemIngotBlackMetal.name=Black Metal Ingot -item.itemHotIngotBlackMetal.name=Hot Black Metal Ingot -item.itemDustBlackMetal.name=Black Metal Dust -item.itemDustTinyBlackMetal.name=Tiny Pile of Black Metal Dust -item.itemDustSmallBlackMetal.name=Small Pile of Black Metal Dust -item.itemNuggetBlackMetal.name=Black Metal Nugget -item.itemPlateBlackMetal.name=Black Metal Plate -item.itemPlateDoubleBlackMetal.name=Double Black Metal Plate -item.itemBoltBlackMetal.name=Black Metal Bolt -item.itemRodBlackMetal.name=Black Metal Rod -item.itemRodLongBlackMetal.name=Long Black Metal Rod -item.itemRingBlackMetal.name=Black Metal Ring -item.itemScrewBlackMetal.name=Black Metal Screw -item.itemRotorBlackMetal.name=Black Metal Rotor -item.itemGearBlackMetal.name=Black Metal Gear -item.itemCellBlackMetal.name=Black Metal Cell -tile.Block of Black Metal.name=Block of Black Metal -tile.Black Metal Frame Box.name=Black Metal Frame Box - -item.itemIngotWhiteMetal.name=White Metal Ingot -item.itemHotIngotWhiteMetal.name=Hot White Metal Ingot -item.itemDustWhiteMetal.name=White Metal Dust -item.itemDustTinyWhiteMetal.name=Tiny Pile of White Metal Dust -item.itemDustSmallWhiteMetal.name=Small Pile of White Metal Dust -item.itemNuggetWhiteMetal.name=White Metal Nugget -item.itemPlateWhiteMetal.name=White Metal Plate -item.itemPlateDoubleWhiteMetal.name=Double White Metal Plate -item.itemBoltWhiteMetal.name=White Metal Bolt -item.itemRodWhiteMetal.name=White Metal Rod -item.itemRodLongWhiteMetal.name=Long White Metal Rod -item.itemRingWhiteMetal.name=White Metal Ring -item.itemScrewWhiteMetal.name=White Metal Screw -item.itemRotorWhiteMetal.name=White Metal Rotor -item.itemGearWhiteMetal.name=White Metal Gear -item.itemCellWhiteMetal.name=White Metal Cell -tile.Block of White Metal.name=Block of White Metal -tile.White Metal Frame Box.name=White Metal Frame Box - -//Added 29/04/2019 -tile.OreRunite.name=Runite Ore -item.crushedRunite.name=Crushed Runite Ore -item.crushedCentrifugedRunite.name=Centrifuged Crushed Runite Ore -item.crushedPurifiedRunite.name=Purified Crushed Runite Ore -item.dustImpureRunite.name=Impure Runite Dust -item.dustPureRunite.name=Purified Runite Dust - -tile.OreAncientGranite.name=Ancient Granite Ore -item.crushedAncientGranite.name=Crushed Ancient Granite Ore -item.crushedCentrifugedAncientGranite.name=Centrifuged Crushed Ancient Granite Ore -item.crushedPurifiedAncientGranite.name=Purified Crushed Ancient Granite Ore -item.dustImpureAncientGranite.name=Impure Ancient Granite Dust -item.dustPureAncientGranite.name=Purified Ancient Granite Dust - -item.itemIngotRhugnor.name=Rhugnor Ingot -item.itemDustRhugnor.name=Rhugnor Dust -item.itemDustTinyRhugnor.name=Tiny Pile of Rhugnor Dust -item.itemDustSmallRhugnor.name=Small Pile of Rhugnor Dust -item.itemNuggetRhugnor.name=Rhugnor Nugget -item.itemPlateRhugnor.name=Rhugnor Plate -item.itemPlateDoubleRhugnor.name=Double Rhugnor Plate -item.itemCellRhugnor.name=Rhugnor Cell -tile.Block of Rhugnor.name=Block of Rhugnor - - - - -//Added 13/5/19 - -item.GTPP.BattPack.01.name=Charge Pack [LV] -item.GTPP.BattPack.02.name=Charge Pack [MV] -item.GTPP.BattPack.03.name=Charge Pack [HV] -item.GTPP.BattPack.04.name=Charge Pack [EV] -item.GTPP.BattPack.05.name=Charge Pack [IV] -item.IndustrialDiamondExquisite.name=Exquisite Industrial Diamond - -item.itemSpringCelestialTungsten.name=Celestial Tungsten Spring -item.itemSpringWhiteMetal.name=White Metal Spring -item.itemSpringNitinol60.name=Nitinol 60 Spring -item.itemSpringWatertightSteel.name=Watertight Steel Spring -item.itemSpringEglinSteel.name=Eglin Steel Spring - -item.itemSmallSpringMaragingSteel250.name=Small Maraging Steel 250 Spring -item.itemSmallSpringNichrome.name=Small Nichrome Spring -item.itemSmallSpringStaballoy.name=Small Staballoy Spring -item.itemSmallSpringBlackSteel.name=Small Black Steel Spring -item.itemSmallSpringBlackTitanium.name=Small Black Titanium Spring - -item.itemFineWireWhiteMetal.name=Fine White Metal Wire -item.itemFineWirePalladium.name=Fine Palladium Wire -item.itemFineWireZirconium.name=Fine Zirconium Wire -item.itemFineWireGrisium.name=Fine Grisium Wire -item.itemFineWireBabbitAlloy.name=Fine Babbit Alloy Wire -item.itemFineWireKoboldite.name=Fine Koboldite Wire -item.itemFineWireHG1223.name=Fine HG-1223 Wire -item.itemFineWireQuantum.name=Fine Quantum Wire - -item.itemHeavyPlatePotin.name=Heavy Potin Plate -item.itemHeavyPlateWatertightSteel.name=Heavy Watertight Steel Plate -item.itemHeavyPlateBronze.name=Heavy Bronze Plate -item.itemHeavyPlateOsmiridium.name=Heavy Osmiridium Plate -item.itemHeavyPlateQuantum.name=Heavy Quantum Plate -item.itemHeavyPlateBlackSteel.name=Heavy Black Steel Plate -item.itemHeavyPlateStainlessSteel.name=Heavy Stainless Steel Plate -item.itemHeavyPlateEglinSteel.name=Heavy Eglin Steel Plate -item.itemHeavyPlateMaragingSteel300.name=Heavy Maraging Steel 300 Plate -item.itemHeavyPlateTalonite.name=Heavy Talonite Plate -item.itemHeavyPlateHypogen.name=Heavy Hypogen Plate -item.itemHeavyPlateRhugnor.name=Heavy Rhugnor Plate -item.itemHeavyPlateAdvancedNitinol.name=Heavy Advanced Nitinol Plate -item.itemHeavyPlateAstralTitanium.name=Heavy Astral Titanium Plate -item.itemHeavyPlateCelestialTungsten.name=Heavy Celestial Tungsten Plate -item.itemHeavyPlateWhiteMetal.name=Heavy White Metal Plate -item.itemHeavyPlateBlackMetal.name=Heavy Black Metal Plate -item.itemHeavyPlateAncientGranite.name=Heavy Ancient Granite Plate - -item.GTPP.bauble.fireprotection.0.name=Supreme Pizza Gloves - - -//Added 16/5/19 -item.itemCellSeleniumDioxide.name=Selenium Dioxide Cell -item.itemCellSeleniousAcid.name=Selenious Acid Cell - -//Added 25/7/19 -container.pestkiller=Pest Killer - -//Added 15/8/19 -gtpp.nei.decayables=Decayables Chest -entity.batKing.name=Bat King -item.itemCellCarbyne.name=Carbyne Cell -item.itemCellHydrogenCyanide.name=Cell of Hydrogen Cyanide -item.itemCactusCharcoal.name=Cactus Charcoal -item.itemCactusCoke.name=Cactus Coke -item.itemSugarCharcoal.name=Sugar Charcoal -item.itemSugarCoke.name=Sugar Coke -item.LiquidHydrogen.name=Liquid Hydrogen Cell [LOH] - - - -//Added 24/8/19 -//Debug Labels -tile.blockDoorAlloy.name=Reinforced Door -tile.blockInhibitorObelisk.name=Inhibitor Obelisk -tile.Battlesign.name=Battlesign -tile.blockMagicBox.name=Magic Box -tile.blockManaPod.name=Mana Pod Stem -tile.buildToolBlock.name=Tool Block -tile.blockRedPlasma.name=Red Plasma Block -tile.pipeBlock.name=Pipe -item.null.name=REPORT ERROR TO ALKALUS - - -//Added 24/8/19 -tile.OreGreenockite.name=Greenockite Ore -item.crushedGreenockite.name=Crushed Greenockite Ore -item.crushedCentrifugedGreenockite.name=Centrifuged Crushed Greenockite Ore -item.crushedPurifiedGreenockite.name=Purified Crushed Greenockite Ore -item.dustImpureGreenockite.name=Impure Greenockite Dust -item.dustPureGreenockite.name=Purified Greenockite Dust -item.itemDustGreenockite.name=Greenockite Dust -item.itemDustTinyGreenockite.name=Tiny Pile of Greenockite Dust -item.itemDustSmallGreenockite.name=Small Pile of Greenockite Dust - -tile.OreRareEarthI.name=Rare Earth (I) Ore -item.crushedRareEarthI.name=Crushed Rare Earth (I) Ore -item.crushedCentrifugedRareEarthI.name=Centrifuged Crushed Rare Earth (I) Ore -item.crushedPurifiedRareEarthI.name=Purified Crushed Rare Earth (I) Ore -item.dustImpureRareEarthI.name=Impure Rare Earth (I) Dust -item.dustPureRareEarthI.name=Purified Rare Earth (I) Dust -item.itemDustRareEarthI.name=Rare Earth (I) Dust -item.itemDustTinyRareEarthI.name=Tiny Pile of Rare Earth (I) Dust -item.itemDustSmallRareEarthI.name=Small Pile of Rare Earth (I) Dust - -tile.OreRareEarthII.name=Rare Earth (II) Ore -item.crushedRareEarthII.name=Crushed Rare Earth (II) Ore -item.crushedCentrifugedRareEarthII.name=Centrifuged Crushed Rare Earth (II) Ore -item.crushedPurifiedRareEarthII.name=Purified Crushed Rare Earth (II) Ore -item.dustImpureRareEarthII.name=Impure Rare Earth (II) Dust -item.dustPureRareEarthII.name=Purified Rare Earth (II) Dust -item.itemDustRareEarthII.name=Rare Earth (II) Dust -item.itemDustTinyRareEarthII.name=Tiny Pile of Rare Earth (II) Dust -item.itemDustSmallRareEarthII.name=Small Pile of Rare Earth (II) Dust - -tile.OreRareEarthIII.name=Rare Earth (III) Ore -item.crushedRareEarthIII.name=Crushed Rare Earth (III) Ore -item.crushedCentrifugedRareEarthIII.name=Centrifuged Crushed Rare Earth (III) Ore -item.crushedPurifiedRareEarthIII.name=Purified Crushed Rare Earth (III) Ore -item.dustImpureRareEarthIII.name=Impure Rare Earth (III) Dust -item.dustPureRareEarthIII.name=Purified Rare Earth (III) Dust -item.itemDustRareEarthIII.name=Rare Earth (III) Dust -item.itemDustTinyRareEarthIII.name=Tiny Pile of Rare Earth (III) Dust -item.itemDustSmallRareEarthIII.name=Small Pile of Rare Earth (III) Dust - - - -//Added 13/10/19 -tile.blockRoundRobinator.0.name=Round Robinator I -tile.blockRoundRobinator.1.name=Round Robinator II -tile.blockRoundRobinator.2.name=Round Robinator III -tile.blockRoundRobinator.3.name=Round Robinator IV -tile.blockRoundRobinator.4.name=Round Robinator V - - -//Added 16/10/19 -item.BioRecipeSelector.name=Programmed Bio Circuit -item.FermentationBase.name=Cell of Fermentation Base -item.ureamix.name=Cell of Urea Mix -item.liquidresin.name=Cell of Liquid Resin -item.propionicacid.name=Propionic Acid Cell -item.aceticacid.name=Acetic Acid Cell -item.BasicAgrichemItem.0.name=Algae Biomass -item.BasicAgrichemItem.1.name=Green Algae Biomass -item.BasicAgrichemItem.2.name=Brown Algae Biomass -item.BasicAgrichemItem.3.name=Golden-Brown Algae Biomass -item.BasicAgrichemItem.4.name=Red Algae Biomass -item.BasicAgrichemItem.5.name=Cellulose Fiber -item.BasicAgrichemItem.6.name=Golden-Brown Cellulose Fiber -item.BasicAgrichemItem.7.name=Red Cellulose Fiber -item.BasicAgrichemItem.8.name=Compost -item.BasicAgrichemItem.9.name=Wood Pellet -item.BasicAgrichemItem.10.name=Wood Brick -item.BasicAgrichemItem.11.name=Cellulose Pulp -item.BasicAgrichemItem.12.name=Raw Bio Resin -item.BasicAgrichemItem.13.name=Catalyst Carrier -item.BasicAgrichemItem.14.name=Green Metal Catalyst -item.BasicAgrichemItem.15.name=Alginic Acid -item.BasicAgrichemItem.16.name=Alumina -item.BasicAgrichemItem.17.name=Aluminium Pellet -item.BasicAgrichemItem.18.name=Sodium Aluminate -item.BasicAgrichemItem.19.name=Sodium Hydroxide -item.BasicAgrichemItem.20.name=Sodium Carbonate -item.BasicAgrichemItem.21.name=Lithium Chloride - -//Added 24/10/19 -item.butanol.name=Butanol Cell - -//Try Fix IC2 Garbage vv -fluidHotWater=Heated Water -fluidHotWater.name=Heated Water -//Try Fix IC2 Garbage ^^ - - -//Added 11/12/19 -item.itemHotIngotTitanium.name=Hot Titanium Ingot -item.OilHeavy.name=Heavy Oil Cell -item.UnsymmetricalDimethylhydrazine.name=Unsymmetrical Dimethylhydrazine Cell -item.benzene.name=Benzene Cell -item.Benzene.name=Benzene Cell -item.phenol.name=Phenol Cell -item.CarbonDioxide.name=Carbon Dioxide Cell -item.itemCellCarbonDioxide.name=Carbon Dioxide Cell -item.CarbonMonoxide.name=Carbon Monoxide Cell -item.itemCellCarbonMonoxide.name=Carbon Monoxide Cell -item.acetone.name=Acetone Cell -item.saltwater.name=Salt Water Cell -item.BasicAgrichemItem.22.name=Mold (Pellet) -item.BasicAgrichemItem.23.name=Clean Aluminium Mix - -//Added 12/12/19 - -item.BasicGenericChemItem.0.name=Red Metal Catalyst -item.BasicGenericChemItem.1.name=Yellow Metal Catalyst -item.BasicGenericChemItem.2.name=Blue Metal Catalyst -item.BasicGenericChemItem.3.name=Orange Metal Catalyst -item.BasicGenericChemItem.4.name=Purple Metal Catalyst -item.BasicGenericChemItem.5.name=Brown Metal Catalyst -item.MudRedSlurry.name=Cell of Red Mud Slurry -item.liquid_toluene.name=Toluene Cell - -item.BasicAlgaeItem.0.name=Algae Spore (I) -item.BasicAlgaeItem.1.name=Algae Spore (II) -item.BasicAlgaeItem.2.name=Algae Spore (III) -item.BasicAlgaeItem.3.name=Algae Spore (IV) -item.BasicAlgaeItem.4.name=Algae Spore (V) -item.BasicAlgaeItem.5.name=Algae Spore (VI) -item.BasicAlgaeItem.6.name=Algae Spore (VII) - -//Added 17/01/20 -item.BasicGenericChemItem.6.name=Pink Metal Catalyst - -//Added 23/03/20 -item.BasicMetaFood.0.name=Raw Human Meat -item.BasicMetaFood.1.name=Cooked Human Meat -item.BasicMetaFood.2.name=Raw Horse Meat -item.BasicMetaFood.3.name=Cooked Horse Meat -item.BasicMetaFood.4.name=Raw Wolf Meat -item.BasicMetaFood.5.name=Cooked Wolf Meat -item.BasicMetaFood.6.name=Raw Ocelot Meat -item.BasicMetaFood.7.name=Cooked Ocelot Meat -item.BasicMetaFood.8.name=Blaze Flesh - -item.itemCellNaquadahFuel.name=Naquadah Fuel Cell -item.itemCellEnrichedNaquadahFuel.name=Enriched Naquadah Fuel Cell -item.itemCellNaquadriaFuel.name=Naquadria Fuel Cell -item.boricacid.name=Boric Acid Cell -item.hydrochloricacid.name=Hydrochloric Acid Cell - -item.BasicAlgaeItem.name=Breedable Algae -item.BasicAlgaeItem.0.name=Breedable Algae -item.BasicAlgaeItem.1.name=Breedable Algae -item.BasicAlgaeItem.2.name=Breedable Algae -item.BasicAlgaeItem.3.name=Breedable Algae -item.BasicAlgaeItem.4.name=Breedable Algae -item.BasicAlgaeItem.5.name=Breedable Algae -item.BasicAlgaeItem.6.name=Breedable Algae - -//Added 30/03/20 -item.milledChalcopyrite.name=Milled Chalcopyrite -item.milledSphalerite.name=Milled Sphalerite -item.milledNickel.name=Milled Nickel -item.milledPlatinum.name=Milled Platinum -item.milledPentlandite.name=Milled Pentlandite -item.FrothZincflotation.name=Sphalerite Flotation Froth Cell -item.FrothCopperflotation.name=Chalcopyrite Flotation Froth Cell -item.FrothNickelflotation.name=Nickel Flotation Froth Cell -item.FrothPlatinumflotation.name=Platinum Flotation Froth Cell -item.FrothPentlanditeflotation.name=Pentlandite Flotation Froth Cell -item.BasicGenericChemItem.7.name=Alumina Milling Ball -item.BasicGenericChemItem.8.name=Soapstone Milling Ball - -//Added 31/03/20 -item.BasicGenericChemItem.9.name=Sodium Ethoxide Dust -item.BasicGenericChemItem.10.name=Sodium Ethyl Xanthate Dust -item.BasicGenericChemItem.11.name=Potassium Ethyl Xanthate Dust -item.BasicGenericChemItem.12.name=Potassium Hydroxide Dust -item.CarbonDisulfide.name=Carbon Disulfide Cell -item.HydrogenSulfide.name=Hydrogen Sulfide Cell -item.BasicAgrichemItem.24.name=Pinecone -item.BasicAgrichemItem.25.name=Crushed Pine Materials -item.pineoil.name=Pine Oil Cell - -//Added 11/4/20 -item.milledRedstone.name=Milled Redstone -item.milledSpessartine.name=Milled Spessartine -item.milledGrossular.name=Milled Grossular -item.milledAlmandine.name=Milled Almandine -item.milledPyrope.name=Milled Pyrope -item.FrothRedstoneflotation.name=Redstone Flotation Froth Cell -item.FrothSpessartineflotation.name=Spessartine Flotation Froth Cell -item.FrothGrossularflotation.name=Grossular Flotation Froth Cell -item.FrothAlmandineflotation.name=Almandine Flotation Froth Cell -item.FrothPyropeflotation.name=Pyrope Flotation Froth Cell - -//Added 13/04/20 -item.T3RecipeSelector.name=Programmed Breakthrough Circuit - -//Added 03/05/20 -entity.miscutils.batKing.name=Spectral Bat -entity.miscutils.bigChickenFriendly.name=Giant Chicken -entity.miscutils.AusDingo.name=Dingo -entity.miscutils.AusBoar.name=Wild Boar -entity.miscutils.AusSpider.name=Forest Spider -entity.miscutils.AusOctopus.name=Octopus -container.EggBox=Egg Hatching Box - -//Added 24/05/20 -container.VolumetricFlaskSetter=Volumetric Flask Configurator - -//Added 26/05/20 -item.itemIngotLaurenium.name=Laurenium Ingot -item.itemHotIngotLaurenium.name=Hot Laurenium Ingot -item.itemDustLaurenium.name=Laurenium Dust -item.itemDustTinyLaurenium.name=Tiny Pile of Laurenium Dust -item.itemDustSmallLaurenium.name=Small Pile of Laurenium Dust -item.itemNuggetLaurenium.name=Laurenium Nugget -item.itemPlateLaurenium.name=Laurenium Plate -item.itemPlateDoubleLaurenium.name=Double Laurenium Plate -item.itemBoltLaurenium.name=Laurenium Bolt -item.itemRodLaurenium.name=Laurenium Rod -item.itemRodLongLaurenium.name=Long Laurenium Rod -item.itemRingLaurenium.name=Laurenium Ring -item.itemScrewLaurenium.name=Laurenium Screw -item.itemRotorLaurenium.name=Laurenium Rotor -item.itemGearLaurenium.name=Laurenium Gear -item.itemCellLaurenium.name=Laurenium Cell -tile.Block of Laurenium.name=Block of Laurenium -tile.Laurenium Frame Box.name=Laurenium Frame Box -item.itemIngotBotmium.name=Botmium Ingot -item.itemHotIngotBotmium.name=Hot Botmium Ingot -item.itemDustBotmium.name=Botmium Dust -item.itemDustTinyBotmium.name=Tiny Pile of Botmium Dust -item.itemDustSmallBotmium.name=Small Pile of Botmium Dust -item.itemNuggetBotmium.name=Botmium Nugget -item.itemPlateBotmium.name=Botmium Plate -item.itemPlateDoubleBotmium.name=Double Botmium Plate -item.itemBoltBotmium.name=Botmium Bolt -item.itemRodBotmium.name=Botmium Rod -item.itemRodLongBotmium.name=Long Botmium Rod -item.itemRingBotmium.name=Botmium Ring -item.itemScrewBotmium.name=Botmium Screw -item.itemRotorBotmium.name=Botmium Rotor -item.itemGearBotmium.name=Botmium Gear -item.itemCellBotmium.name=Botmium Cell -tile.Block of Botmium.name=Block of Botmium -tile.Botmium Frame Box.name=Botmium Frame Box - -//Added 29/05/20 -item.itemBasicTurbine.name=Basic Turbine -item.itemBasicTurbine_0.name=Basic Iron Turbine -item.itemBasicTurbine_1.name=Basic Bronze Turbine - -interaction.voidexcess.enabled=Void Excess Enabled -interaction.voidexcess.disabled=Void Excess Disabled - -interaction.separateBusses.enabled=Input busses are separated -interaction.separateBusses.disabled=Input busses are not separated - -//Added 29/11/21 - -item.BasicNuclearChemItem.0.name=Uranium Residue Mix -item.BasicNuclearChemItem.1.name=Plutonium Residue Mix -item.BasicNuclearChemItem.2.name=Fluoride Residue Mix -item.BasicNuclearChemItem.3.name=Noble Residue Mix -item.BasicNuclearChemItem.4.name=Red Algae Biomass -item.BasicNuclearChemItem.5.name=Cellulose Fiber -item.BasicNuclearChemItem.6.name=Golden-Brown Cellulose Fiber -item.BasicNuclearChemItem.7.name=Red Cellulose Fiber - -item.itemCellLiFBeF2ZrF4U235.name=LFTR Fuel I Cell -item.itemCellLiFBeF2ZrF4UF4.name=LFTR Fuel II Cell -item.itemCellLiFBeF2ThF4UF4.name=LFTR Fuel III Cell -item.Li2BeF2UF4.name=Burnt Li2BeF2UF4 Cell - -//Added 6/12/21 -item.itemCellLiFBeF2UF4FP.name=LiFBeF2UF4FP Cell -item.itemCellUF6F2.name=UF6F2 Cell -item.itemCellLiFBeF2ThF4.name=LiFBeF2ThF4 Cell -item.itemCellUF6F2FP.name=UF6F2FP Cell -item.dustProtactinium233.name=Protactinium-233 Dust -item.itemCellLiFThF4.name=LiFThF4 Cell -item.NuclearWaste.name=Nuclear Waste Cell -item.itemCellLiFBeF2UF4.name=LiFBeF2UF4 Cell -item.itemCellSodiumFluoride.name=Sodium Fluoride Cell -item.itemCellLiFBeF2.name=LiFBeF2 Cell - -//Added 7/12/21 -item.itemCellDysprosium.name=Dysprosium Cell -item.itemCellThorium.name=Thorium Cell -item.itemCellTellurium.name=Tellurium Cell -item.itemCellThorium232.name=Thorium-232 Cell -item.itemCellLithiumTetrafluoroberyllate.name=Lithium Tetrafluoroberyllate Cell -item.itemCellBurntReactorFuelI.name=Spent LFTR Fuel I Cell -item.itemCellBurntReactorFuelII.name=Spent LFTR Fuel II Cell -item.itemDustTinyIndium.name=Tiny Indium Dust -item.itemDustSmallIndium.name=Small Indium Dust -item.itemDustIndium.name=Indium Dust -item.itemDustTinyBerylliumHydroxide.name=Tiny Beryllium Hydroxide Dust -item.itemDustSmallBerylliumHydroxide.name=Small Beryllium Hydroxide Dust -item.itemDustBerylliumHydroxide.name=Beryllium Hydroxide Dust -item.itemDustTinyAmmoniumBifluoride.name=Tiny Ammonium Bifluoride Dust -item.itemDustSmallAmmoniumBifluoride.name=Small Ammonium Bifluoride Dust -item.itemDustAmmoniumBifluoride.name=Ammonium Bifluoride Dust -item.itemDustTinyAmmoniumTetrafluoroberyllate.name=Tiny Ammonium Tetrafluoroberyllate Dust -item.itemDustSmallAmmoniumTetrafluoroberyllate.name=Small Ammonium Tetrafluoroberyllate Dust -item.itemDustAmmoniumTetrafluoroberyllate.name=Ammonium Tetrafluoroberyllate Dust - -//Added 10/12/21 -item.ImpureLiFBeF2.name=Impure LiFBeF2 Cell -item.itemCellHeliumSpargedLiFBeF2UF4FP.name=Helium Sparged LiFBeF2UF4FP Cell -item.itemCellFluorineSpargedLiFThF4.name=Fluorine Sparged LiFThF4 Cell -item.itemCellFluorineSpargedLiFBeF2ThF4.name=Fluorine Sparged LiFBeF2ThF4 Cell -item.itemIngotHS188A.name=HS-188A Ingot -item.itemHotIngotHS188A.name=Hot HS-188A Ingot -item.itemDustHS188A.name=HS-188A Dust -item.itemDustTinyHS188A.name=Tiny Pile of HS-188A Dust -item.itemDustSmallHS188A.name=Small Pile of HS-188A Dust -item.itemNuggetHS188A.name=HS-188A Nugget -item.itemPlateHS188A.name=HS-188A Plate -item.itemPlateDoubleHS188A.name=Double HS-188A Plate -item.itemBoltHS188A.name=HS-188A Bolt -item.itemRodHS188A.name=HS-188A Rod -item.itemRodLongHS188A.name=Long HS-188A Rod -item.itemRingHS188A.name=HS-188A Ring -item.itemScrewHS188A.name=HS-188A Screw -item.itemRotorHS188A.name=HS-188A Rotor -item.itemGearHS188A.name=HS-188A Gear -item.itemCellHS188A.name=HS-188A Cell - -//Added 12/12/21 -item.itemIngotErbium.name=Erbium Ingot -item.itemHotIngotErbium.name=Hot Erbium Ingot -item.itemDustErbium.name=Erbium Dust -item.itemDustTinyErbium.name=Tiny Pile of Erbium Dust -item.itemDustSmallErbium.name=Small Pile of Erbium Dust -item.itemNuggetErbium.name=Erbium Nugget -item.itemPlateErbium.name=Erbium Plate -item.itemPlateDoubleErbium.name=Double Erbium Plate -item.itemBoltErbium.name=Erbium Bolt -item.itemRodErbium.name=Erbium Rod -item.itemRodLongErbium.name=Long Erbium Rod -item.itemRingErbium.name=Erbium Ring -item.itemScrewErbium.name=Erbium Screw -item.itemRotorErbium.name=Erbium Rotor -item.itemGearErbium.name=Erbium Gear -item.itemCellErbium.name=Erbium Cell -item.itemIngotHeLiCoPtEr.name=HeLiCoPtEr Ingot -item.itemHotIngotHeLiCoPtEr.name=Hot HeLiCoPtEr Ingot -item.itemDustHeLiCoPtEr.name=HeLiCoPtEr Dust -item.itemDustTinyHeLiCoPtEr.name=Tiny Pile of HeLiCoPtEr Dust -item.itemDustSmallHeLiCoPtEr.name=Small Pile of HeLiCoPtEr Dust -item.itemNuggetHeLiCoPtEr.name=HeLiCoPtEr Nugget -item.itemPlateHeLiCoPtEr.name=HeLiCoPtEr Plate -item.itemPlateDoubleHeLiCoPtEr.name=Double HeLiCoPtEr Plate -item.itemBoltHeLiCoPtEr.name=HeLiCoPtEr Bolt -item.itemRodHeLiCoPtEr.name=HeLiCoPtEr Rod -item.itemRodLongHeLiCoPtEr.name=Long HeLiCoPtEr Rod -item.itemRingHeLiCoPtEr.name=HeLiCoPtEr Ring -item.itemScrewHeLiCoPtEr.name=HeLiCoPtEr Screw -item.itemRotorHeLiCoPtEr.name=HeLiCoPtEr Rotor -item.itemGearHeLiCoPtEr.name=HeLiCoPtEr Gear -item.itemCellHeLiCoPtEr.name=HeLiCoPtEr Cell -item.itemIngotPraseodymium.name=Praseodymium Ingot -item.itemHotIngotPraseodymium.name=Hot Praseodymium Ingot -item.itemDustPraseodymium.name=Praseodymium Dust -item.itemDustTinyPraseodymium.name=Tiny Pile of Praseodymium Dust -item.itemDustSmallPraseodymium.name=Small Pile of Praseodymium Dust -item.itemNuggetPraseodymium.name=Praseodymium Nugget -item.itemPlatePraseodymium.name=Praseodymium Plate -item.itemPlateDoublePraseodymium.name=Double Praseodymium Plate -item.itemBoltPraseodymium.name=Praseodymium Bolt -item.itemRodPraseodymium.name=Praseodymium Rod -item.itemRodLongPraseodymium.name=Long Praseodymium Rod -item.itemRingPraseodymium.name=Praseodymium Ring -item.itemScrewPraseodymium.name=Praseodymium Screw -item.itemRotorPraseodymium.name=Praseodymium Rotor -item.itemGearPraseodymium.name=Praseodymium Gear -item.itemCellPraseodymium.name=Praseodymium Cell -item.milledMonazite.name=Milled Monazite -item.FrothMonaziteflotation.name=Monazite Flotation Froth Cell diff --git a/src/resources/assets/miscutils/lang/ru_RU.lang b/src/resources/assets/miscutils/lang/ru_RU.lang deleted file mode 100644 index 37de35c563..0000000000 --- a/src/resources/assets/miscutils/lang/ru_RU.lang +++ /dev/null @@ -1,303 +0,0 @@ -item.itemDustSelenium.name=Пыль Селена -item.itemDustBromine.name=Пыль Брома -item.itemDustStrontium.name=Пыль Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ -item.itemDustZirconium.name=Пыль Ð¦Ð¸Ñ€ÐºÐ¾Ð½Ð¸Ñ -item.itemDustRuthenium.name=Пыль Ð ÑƒÑ‚ÐµÐ½Ð¸Ñ -item.itemDustIodine.name=Пыль Йода -item.itemDustHafnium.name=Пыль Ð“Ð°Ñ„Ð½Ð¸Ñ -item.itemDustRhodium.name=Пыль Ð Ð¾Ð´Ð¸Ñ -item.itemDustRhenium.name=Пыль Ð ÐµÐ½Ð¸Ñ -item.itemDustThallium.name=Пыль Ð¢Ð°Ð»Ð»Ð¸Ñ -item.itemDustTechnetium.name=Пыль Ð¢ÐµÑ…Ð½ÐµÑ†Ð¸Ñ -item.itemDustPolonium.name=Пыль ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ -item.itemDustAstatine.name=Пыль ÐÑтатина -item.itemDustFrancium.name=Пыль Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ -item.itemDustRadium.name=Пыль Ð Ð°Ð´Ð¸Ñ -item.itemDustActinium.name=Пыль ÐÐºÑ‚Ð¸Ð½Ð¸Ñ -item.itemDustProtactinium.name=Пыль ÐŸÑ€Ð¾Ñ‚Ð°ÐºÑ‚Ð¸Ð½Ð¸Ñ -item.itemDustNeptunium.name=Пыль ÐÐµÐ¿Ñ‚ÑƒÐ½Ð¸Ñ -item.itemDustCurium.name=Пыль ÐšÑŽÑ€Ð¸Ñ -item.itemDustBerkelium.name=Пыль Ð‘ÐµÑ€ÐºÐµÐ»Ð¸Ñ -item.itemDustCalifornium.name=Пыль ÐšÐ°Ð»Ð¸Ñ„Ð¾Ñ€Ð½Ð¸Ñ -item.itemDustEinsteinium.name=Пыль Ð­Ð¹Ð½ÑˆÑ‚ÐµÐ¹Ð½Ð¸Ñ -item.itemDustFermium.name=Пыль Ð¤ÐµÑ€Ð¼Ð¸Ñ -item.itemDustLithium7.name=Пыль Ð›Ð¸Ñ‚Ð¸Ñ 7 -item.itemDustThorium232.name=Пыль Ð¢Ð¾Ñ€Ð¸Ñ 232 -item.itemDustUranium232.name=Пыль Урана 232 -item.itemDustUranium233.name=Пыль Урана 233 -item.itemDustPlutonium238.name=Пыль ÐŸÐ»ÑƒÑ‚Ð¾Ð½Ð¸Ñ 238 -item.itemDustPlutonium239.name=Пыль ÐŸÐ»ÑƒÑ‚Ð¾Ð½Ð¸Ñ 239 -item.itemDustStrontium90.name=Пыль Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ 90 -item.itemDustPolonium210.name=Пыль ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ 210 -item.itemDustAmericium241.name=Пыль ÐÐ¼ÐµÑ€Ð¸Ñ†Ð¸Ñ 241 -item.itemDustSiliconCarbide.name=Пыль Силиконового Карбида -item.itemDustZirconiumCarbide.name=Пыль Циркониевого Карбида -item.itemDustTantalumCarbide.name=Пыль Танталового Карбида -item.itemDustNiobiumCarbide.name=Пыль Ðиобиевого Карбида -item.itemDustBerylliumFluoride.name=Пыль Бериллиевого Фторида -item.itemDustLithiumFluoride.name=Пыль Литиевого Фторида -item.itemDustThoriumTetrafluoride.name=Пыль Ториевого Тетрафторида -item.itemDustThoriumHexafluoride.name=Пыль Ториевого ГекÑафторида -item.itemDustUraniumTetrafluoride.name=Пыль Ураниевого Тетрафторида -item.itemDustUraniumHexafluoride.name=Пыль Ураниевого ГекÑафторида -item.itemDustZirconiumTetrafluoride.name=Пыль Циркониевого Тетрафторида -item.itemDustNeptuniumHexafluoride.name=Пыль Ðептуниевого ГекÑафторида -item.itemDustTechnetiumHexafluoride.name=Пыль Технециевого ГекÑафторида -item.itemDustSeleniumHexafluoride.name=Пыль ГекÑафторида Селена -item.itemDustLiFBeF2ZrF4U235.name=Пыль Железорана 235 -item.itemDustLiFBeF2ZrF4UF4.name=Пыль Циркониевого Железорана -item.itemDustLiFBeF2ThF4UF4.name=Пыль Ториевого Железорана -item.itemDustEnergyCrystal.name=Пыль ЭнергетичеÑкого КриÑталла -item.itemDustBloodSteel.name=Пыль Кровавой Стали -item.itemDustZeron100.name=Пыль Церона 100 -item.itemDustTumbaga.name=Пыль Тумбага -item.itemDustPotin.name=Пыль Потина -item.itemDustStaballoy.name=Пыль Стального Сплава -item.itemDustTantalloy60.name=Пыль Сплава Тантала 60 -item.itemDustTantalloy61.name=Пыль Сплава Тантала 61 -item.itemDustInconel625.name=Пыль Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 625 -item.itemDustInconel690.name=Пыль Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 690 -item.itemDustInconel792.name=Пыль Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 792 -item.itemDustEglinSteelBaseCompound.name=Пыль Эглинового Стального Базового Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ -item.itemDustEglinSteel.name=Пыль Эглиновой Стали -item.itemDustMaragingSteel250.name=Пыль МарагинÑкой Стали 250 -item.itemDustMaragingSteel300.name=Пыль МарагинÑкой Стали 300 -item.itemDustMaragingSteel350.name=Пыль МарагинÑкой Стали 350 -item.itemDustStellite.name=Пыль Стеллита -item.itemDustTalonite.name=пыль Талонита -item.itemDustHastelloyW.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ W -item.itemDustHastelloyX.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ X -item.itemDustHastelloyC276.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ C276 -item.itemDustHastelloyN.name=Пыль ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ N -item.itemDustIncoloy020.name=Пыль Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ 020 -item.itemDustIncoloyDS.name=Пыль Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ DS -item.itemDustIncoloyMA956.name=Пыль Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ MA956 -item.itemDustGrisium.name=Пыль ГриÑиума -item.itemDustHG1223.name=Пыль HG1223 -item.itemDustTriniumTitaniumAlloy.name=Пыль Сплава Тритий Титана -item.itemDustTriniumNaquadahAlloy.name=Пыль Сплава Тритий Ðаквадаха -item.itemDustTriniumNaquadahCarbonite.name=Пыль Карбонита Тритий Ðаквадаха -item.itemDustQuantum.name=Пыль Кванта -item.itemDustFluorite.name=Пыль Флюорита -item.itemDustCrocoite.name=Пыль Крокоита -item.itemDustGeikielite.name=Пыль Гейкелита -item.itemDustNichromite.name=Пыль Ðихромата -item.itemDustTitanite.name=Пыль Титанита -item.itemDustZimbabweite.name=Пыль Зимбабвайта -item.itemDustZirconolite.name=Пыль Цирконолита -item.itemDustGadoliniteCe.name=Пыль Пыль Гадолинита Ce -item.itemDustGadoliniteY.name=Пыль Гадолинита Y -item.itemDustLepersonnite.name=Пыль ЛеперÑоннита -item.itemDustSamarskiteY.name=Пыль СамарÑкита Y -item.itemDustSamarskiteYb.name=Пыль СамарÑкита Yb -item.itemDustXenotime.name=Пыль КÑенотима -item.itemDustYttrialite.name=Пыль Иттриалита -item.itemDustYttrocerite.name=Пыль Иттроцерита -item.itemDustZircon.name=Пыль Циркона -item.itemDustPolycrase.name=Пыль ПоликраÑа -item.itemDustZircophyllite.name=Пыль Циркофиллита -item.itemDustZirkelite.name=Пыль Циркелита -item.itemDustLanthaniteLa.name=Пыль Лантанита La -item.itemDustLanthaniteCe.name=Пыль Лантанита Ce -item.itemDustLanthaniteNd.name=Пыль Лантанита Nd -item.itemDustAgarditeY.name=Пыль Ðгардита Y -item.itemDustAgarditeCd.name=Пыль Ðгардита Cd -item.itemDustAgarditeLa.name=Пыль Ðгардита La -item.itemDustAgarditeNd.name=Пыль Ðгардита Nd -item.itemDustHibonite.name=Пыль Гибонита -item.itemDustCerite.name=Пыль Церита -item.itemDustFluorcaphite.name=Пыль Фторокафита -item.itemDustFlorencite.name=Пыль Флоренцита -item.itemDustCryolite.name=Пыль Криолита - - -tile.Block of Selenium.name=Блок Селена -tile.Selenium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Селена -tile.Block of Bromine.name=Блок Брома -tile.Block of Strontium.name=Блок Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ -tile.Strontium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ -tile.Block of Zirconium.name=Блок Ð¦Ð¸Ñ€ÐºÐ¾Ð½Ð¸Ñ -tile.Zirconium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð¦Ð¸Ñ€ÐºÐ¾Ð½Ð¸Ñ -tile.Block of Ruthenium.name=Блок Ð ÑƒÑ‚ÐµÐ½Ð¸Ñ -tile.Ruthenium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð ÑƒÑ‚ÐµÐ½Ð¸Ñ -tile.Block of Iodine.name=Блок Йода -tile.Iodine Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Йода -tile.Block of Hafnium.name=Блок Ð“Ð°Ñ„Ð½Ð¸Ñ -tile.Hafnium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð“Ð°Ñ„Ð½Ð¸Ñ -tile.Block of Dysprosium.name=Блок ДиÑÐ¿Ñ€Ð¾Ð·Ð¸Ñ -tile.Dysprosium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð”Ð¸Ð¿Ñ€Ð¾Ð·Ð¸Ñ -tile.Block of Tellurium.name=Блок Теллура -tile.Tellurium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Теллура -tile.Block of Rhodium.name=Блок Ð Ð¾Ð´Ð¸Ñ -tile.Rhodium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð Ð¾Ð´Ð¸Ñ -tile.Block of Rhenium.name=Блок Ð ÐµÐ½Ð¸Ñ -tile.Rhenium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð ÐµÐ½Ð¸Ñ -tile.Block of Thallium.name=Блок Ð¢Ð°Ð»Ð»Ð¸Ñ -tile.Thallium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð¢Ð°Ð»Ð»Ð¸Ñ -tile.Block of Technetium.name=Блок Ð¢ÐµÑ…Ð½ÐµÑ†Ð¸Ñ -tile.Block of Polonium.name=Блок ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ -tile.Block of Astatine.name=Блок ÐÑтатина -tile.Block of Francium.name=Блок Ð¤Ñ€Ð°Ð½Ñ†Ð¸Ñ -tile.Block of Radium.name=Блок Ð Ð°Ð´Ð¸Ñ -tile.Block of Promethium.name=Блок ÐŸÑ€Ð¾Ð¼ÐµÑ‚Ð¸Ñ -tile.Block of Actinium.name=Блок ÐÐºÑ‚Ð¸Ð½Ð¸Ñ -tile.Block of Protactinium.name=Блок ÐŸÑ€Ð¾Ñ‚Ð°ÐºÑ‚Ð¸Ð½Ð¸Ñ -tile.Block of Neptunium.name=Блок ÐÐµÐ¿Ñ‚ÑƒÐ½Ð¸Ñ -tile.Block of Curium.name=Блок ÐšÑŽÑ€Ð¸Ñ -tile.Block of Berkelium.name=Блок Ð‘ÐµÑ€ÐºÐ¸Ð»Ð¸Ñ -tile.Block of Californium.name=Блок ÐšÐ°Ð»Ð¸Ñ„Ð¾Ñ€Ð½Ð¸Ñ -tile.Block of Einsteinium.name=Блок Ð­Ð¹Ð½ÑˆÑ‚ÐµÐ¹Ð½Ð¸Ñ -tile.Block of Fermium.name=Блок Ð¤ÐµÑ€Ð¼Ð¸Ñ -tile.Block of Thorium 232.name=Блок Ð¢Ð¾Ñ€Ð¸Ñ 232 -tile.Block of Uranium 232.name=Блок Урана 232 -tile.Block of Uranium 233.name=Блок Урана 233 -tile.Block of Plutonium-238.name=Блок Плутона 238 -tile.Block of Plutonium-239.name=Блок Плутона 239 -tile.Block of Strontium-90.name=Блок Ð¡Ñ‚Ñ€Ð¾Ð½Ñ†Ð¸Ñ 90 -tile.Block of Polonium-210.name=Блок ÐŸÐ¾Ð»Ð¾Ð½Ð¸Ñ 210 -tile.Block of Americium-241.name=Блок ÐÐ¼ÐµÑ€Ð¸Ñ†Ð¸Ñ 241 -tile.Block of Silicon Carbide.name=Блок Силиконового Карбида -tile.Silicon Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Силиконового Карбида -tile.Block of Zirconium Carbide.name=Блок Циркониевого Карбида -tile.Zirconium Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Циркониевого Карбида -tile.Block of Tantalum Carbide.name=Блок Карбида Тантала -tile.Tantalum Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Карбида Тантала -tile.Block of Niobium Carbide.name=Блок Ðиобиевого Карбида -tile.Niobium Carbide Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ðиобиевого Карбида -tile.Block of Beryllium Fluoride.name=Блок Бериллиевого Фторида -tile.Block of Lithium Fluoride.name=Блок Литиевого Фторида -tile.Block of Thorium Tetrafluoride.name=Блок Ториевого Тетрафторида -tile.Block of Thorium Hexafluoride.name=Блок Ториевого ГекÑафторида -tile.Block of Uranium Tetrafluoride.name=Блок Ураниевого Тетрафторида -tile.Block of Uranium Hexafluoride.name=Блок Ураниевого ГекÑафторида -tile.Block of Zirconium Tetrafluoride.name=Блок Циркониевого Тетрафторида -tile.Block of Neptunium Hexafluoride.name=Блок Ðептуниевого ГекÑафторида -tile.Block of Technetium Hexafluoride.name=Блок Технециевого ГекÑафторида -tile.Block of Selenium Hexafluoride.name=Блок ГекÑафторида Селена -tile.Block of LiFBeF2ZrF4U235.name=Блок Железорана 235 -tile.Block of LiFBeF2ZrF4UF4.name=Блок Циркониевого Железорана -tile.Block of LiFBeF2ThF4UF4.name=Блок Ториевого Железорана -tile.Block of Energy Crystal.name=Блок ЭнергетичеÑкого КриÑталла -tile.Energy Crystal Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ЭнергетичеÑкого КриÑталла -tile.Block of Blood Steel.name=Блок Кровавой Стали -tile.Blood Steel Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Кровавой Стали -tile.Block of Zeron-100.name=Блок Церона 100 -tile.Zeron-100 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Церона 100 -tile.Block of Tumbaga.name=Блок Из Тумбага -tile.Tumbaga Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Тумбага -tile.Block of Potin.name=Блок Потина -tile.Potin Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Потина -tile.Block of Staballoy.name=Блок Стального Сплава -tile.Staballoy Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Стального Сплава -tile.Block of Tantalloy-60.name=Блок Сплава Тантала 60 -tile.Tantalloy-60 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Сплава Тантала 60 -tile.Block of Tantalloy-61.name=Блок Сплава Тантала 61 -tile.Tantalloy-61 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Сплава Тантала 61 -tile.Block of Inconel-625.name=Блок Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 625 -tile.Inconel-625 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 625 -tile.Block of Inconel-690.name=Блок Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 690 -tile.Inconel-690 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 690 -tile.Block of Inconel-792.name=Блок Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 792 -tile.Inconel-792 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð½ÐµÐ»Ñ 792 -tile.Block of Eglin Steel.name=Блок Эглиновой Стали -tile.Eglin Steel Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Эглиновой Стали -tile.Block of Maraging Steel 250.name=Блок МарагинÑкой Стали 250 -tile.Maraging Steel 250 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· МарагинÑкой Стали 250 -tile.Block of Maraging Steel 300.name=Блок МарагинÑкой Стали 300 -tile.Maraging Steel 300 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· МарагинÑкой Стали 300 -tile.Block of Maraging Steel 350.name=Блок МарагинÑкой Стали 350 -tile.Maraging Steel 350 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· МарагинÑкой Стали 350 -tile.Block of Stellite.name=Блок Стеллита -tile.Stellite Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Стеллита -tile.Block of Talonite.name=Блок Талонита -tile.Talonite Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Талонита -tile.Block of Hastelloy-W.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ W -tile.Hastelloy-W Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ W -tile.Block of Hastelloy-X.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ X -tile.Hastelloy-X Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ X -tile.Block of Hastelloy-C276.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ C276 -tile.Hastelloy-C276 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ C276 -tile.Block of Hastelloy-N.name=Блок ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ N -tile.Hastelloy-N Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ХаÑÑ‚ÐµÐ»Ð»Ð¾Ñ N -tile.Block of Incoloy-020.name=Блок Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ 020 -tile.Incoloy-020 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ 020 -tile.Block of Incoloy-DS.name=Блок Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ DS -tile.Incoloy-DS Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ DS -tile.Block of Incoloy-MA956.name=Блок Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ MA956 -tile.Incoloy-MA956 Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Ð˜Ð½ÐºÐ¾Ð»Ð¾Ñ MA956 -tile.Block of Grisium.name=Блок ГриÑиума -tile.Grisium Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· ГриÑиума -tile.Block of Trinium Titanium Alloy.name=Блок Сплава Тритий Титана -tile.Trinium Titanium Alloy Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Сплава Тритий Титана -tile.Block of Trinium Naquadah Alloy.name=Блок Сплава Тритий Ðаквадаха -tile.Block of Trinium Naquadah Carbonite.name=Блок Карбонита Тритий Ðаквадаха -tile.Trinium Naquadah Carbonite Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Карбонита Тритий Ðаквадаха -tile.Block of Quantum.name=Блок Кванта -tile.Quantum Frame Box.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð˜Ð· Кванта -tile.OreFluorite.name=Руда Флюорита -tile.OreCrocoite.name=Руда Крокоита -tile.OreGeikielite.name=Руда Гейкелита -tile.OreNichromite.name=Руда Ðихромата -tile.OreTitanite.name=Руда Титанита -tile.OreZimbabweite.name=Руда Зимбабвайта -tile.OreZirconolite.name=Руда Цирконолита -tile.OreGadoliniteCe.name=Руда Гадолинита Ce -tile.OreGadoliniteY.name=Руда Гадолинита Y -tile.OreLepersonnite.name=Руда ЛеперÑоннита -tile.OreSamarskiteY.name=Руда СамарÑкита Y -tile.OreSamarskiteYb.name=Руда СамарÑкита Yb -tile.OreXenotime.name=Руда КÑенотима -tile.OreYttriaite.name=Руда Иттриайта -tile.OreYttrialite.name=Руда Иттриалита -tile.OreYttrocerite.name=Руда Иттроцерита -tile.OreZircon.name=Руда Циркона -tile.OrePolycrase.name=Руда ПоликраÑа -tile.OreZircophyllite.name=Руда Циркофиллита -tile.OreZirkelite.name=Руда Циркелита -tile.OreLanthaniteLa.name=Руда Лантанита La -tile.OreLanthaniteCe.name=Руда Лантанита Ce -tile.OreLanthaniteNd.name=Руда Лантанита Nd -tile.OreAgarditeY.name=Руда Ðгардита Y -tile.OreAgarditeCd.name=Руда Ðгардита Cd -tile.OreAgarditeLa.name=Руда Ðгардита La -tile.OreAgarditeNd.name=Руда Ðгардита Nd -tile.OreHibonite.name=Руда Гибонита -tile.OreCerite.name=Руда Церита -tile.OreFluorcaphite.name=Руда Фторокафита -tile.OreFlorencite.name=Руда Флоренцита -tile.OreCryolite.name=Руда Криолита -tile.blockMFEffect.name=Эффект MF -tile.fluidBlockSludge.name=Жидкий Блок ГрÑзи -tile.blockWorkbenchGT.name=ВерÑтак -tile.blockWorkbenchGTAdvanced.name=Улучшенный ВерÑтак -tile.blockHeliumGenerator.name=Гелиевый Генератор -tile.blockFirePit.name=ÐžÐ³Ð½ÐµÐ½Ð½Ð°Ñ Ð¯Ð¼Ð° -tile.blockFishTrap.name=Ð Ñ‹Ð±Ð½Ð°Ñ Ð›Ð¾Ð²ÑƒÑˆÐºÐ° -tile.blockInfiniteFluidTank.name=БеÑконечный ЖидкоÑтный Резервуар -tile.Fluorite Ore [Old].name=Руда Флюорита [ОбычнаÑ] -tile.blockMiningExplosives.name=Взрывчатые ВещеÑтва -tile.blockHellFire.name=ÐдÑкий огонь -tile.blockProjectBench.name=Проект Скамейки -tile.blockTradeBench.name=Ð¢Ð¾Ñ€Ð³Ð¾Ð²Ð°Ñ Ð¡ÐºÐ°Ð¼ÐµÐ¹ÐºÐ° -tile.blockModularity.name=МодульноÑÑ‚ÑŒ -tile.blockBlackGate.name=Черные Ворота -tile.blockTankXpConverter.name=Резервуар Конвертора Опыта -tile.blockCompressedObsidian.0.name=КомпреÑÑированный ОбÑидиан -tile.blockNet.name=Ñети -tile.blockMiningPipeFake.name=Добыча Полезных ИÑкопаемых -tile.blockMiningHeadFake.name=Руководитель По Добыче Полезных ИÑкопаемых -tile.miscutils.fluid.pyrotheum.name=Жидкий Пиротеум -tile.miscutils.fluid.cryotheum.name=Жидкий Криотеум -tile.miscutils.fluid.ender.name=Жидкий Эндер -tile.blockRainforestOakLog.name=ТропичеÑкий Ð›ÐµÑ -tile.blockRainforestOakLeaves.name=ТропичеÑкие ЛиÑÑ‚ÑŒÑ -tile.blockRainforestOakSapling.name=ТропичеÑкие Саженцы -[ToxicEverglades] tile.fluidSludge.0.name=Жидкий Ил -[ToxicEverglades] tile.blockDarkWorldPortal.name=Черный Мировой Портал -[ToxicEverglades] tile.blockDarkWorldGround.name=Ð§ÐµÑ€Ð½Ð°Ñ ÐœÐ¸Ñ€Ð¾Ð²Ð°Ñ Ð—ÐµÐ¼Ð»Ñ -[ToxicEverglades] tile.blockDarkWorldGround2.name=Ð§ÐµÑ€Ð½Ð°Ñ ÐœÐ¸Ñ€Ð¾Ð²Ð°Ñ Ð—ÐµÐ¼Ð»Ñ 2 -[ToxicEverglades] tile.blockDarkWorldPortalFrame.name=ÐšÐ°Ñ€ÐºÐ°Ñ Ð§ÐµÑ€Ð½Ð¾Ð³Ð¾ Мирового Портала -tile.blockMobSpawnerEx.0.name=Спавнер МонÑтров Ex -miscutils.blockcasings.0.name=ÐšÐµÐ¹Ñ 1 -gtplusplus.blockcasings.2.0.name=ÐšÐµÐ¹Ñ 2 -gtplusplus.blockcasings.3.0.name=ÐšÐµÐ¹Ñ 3 diff --git a/src/resources/assets/miscutils/lang/zh_CN.lang b/src/resources/assets/miscutils/lang/zh_CN.lang deleted file mode 100644 index e01d85a522..0000000000 --- a/src/resources/assets/miscutils/lang/zh_CN.lang +++ /dev/null @@ -1,3243 +0,0 @@ -//Creative Tabs -itemGroup.MiscUtilBlockTab=[GT++] æ–¹å— -itemGroup.MiscUtilMiscTab=[GT++] ç‰©å“ -itemGroup.MiscUtilCombatTab=[GT++] 战斗 -itemGroup.MiscUtilToolsTab=[GT++] 工具 -itemGroup.MiscUtilMachineTab=[GT++] 机器 -itemGroup.MiscUtilOtherTab=[GT++] ç‰©å“ II -itemGroup.MiscUtilBOP=[GT++]超多生物群系附属 - -//Debug -item.AAA_Broken.name=[ä¸å­˜åœ¨çš„物å“]请在Github上å馈这个åˆæˆ -item.itemBedLocator_Base.name=床定ä½å™¨[NBT测试] -item.itemBaseItemWithCharge.name=基础å¯å……ç”µç‰©å“ -item.miscutils_itemDebugShapeSpawner.name=[调试用]å¡‘å½¢ - -//Fluids -tile.fluidSludge.name=ä¸æµåŠ¨çš„废水 -tile.fluidSludge.0.name=ä¸æµåŠ¨çš„废水 - -//Death Messages -death.attack.plasmabolt=%s 死于滚烫的等离å­ä½“. -death.attack.plasmabolt.player=%1$s 被 %2$s 使用等离å­ä½“击æ€. -death.attack.gtpp.grinder=%s 被艾è¨ç ”磨机磨æˆäº†æ¸£æ¸£. - -//Alternative Materials -item.itemPlateBatteryAlloy.name=电池åˆé‡‘æ¿ -item.itemIngotBatteryAlloy.name=电池åˆé‡‘é”­ -item.itemStickyRubber.name=粘性橡胶团 - -//Unused Fuel rods -item.itemFuelRod_Empty.name=空燃料棒 -item.itemFuelRod_Thorium.name=é’燃料棒 -item.itemFuelRod_Uranium.name=铀燃料棒 -item.itemFuelRod_Plutonium.name=钚燃料棒 - -//Entities -entity.constructStaballoy.name=è´«é“€åˆé‡‘结构 -entity.sickBlaze.name=被感染的狂热者 - -//Tile Entities -tile.blockToolBuilder.name=æ ¼é›·å·¥å…·ç»„è£…å° - -//Tools -item.itemBufferCore.name=能é‡æ ¸å¿ƒ -item.itemStaballoyPickaxe.name=隧é“挖掘者 -item.itemStaballoyAxe.name=æ ‘æž—ç ä¼è€… -item.itemSandstoneHammer.name=圆石粉碎者 - -//Thermal Foundation Stuff -item.MiscUtils.bucket.bucketPyrotheum.name=烈焰之炽焱桶 -item.MiscUtils.bucket.bucketCryotheum.name=æžå¯’之凛冰桶 -item.MiscUtils.bucket.bucketEnder.name=è°æŒ¯ç†”èžæœ«å½±çç æ¡¶ -item.MiscUtils.material.dustPyrotheum.name=炽焱之尘 -item.MiscUtils.material.dustCryotheum.name=凛冰之尘 -item.MiscUtils.material.rodBlizz.name=暴雪棒 -item.MiscUtils.material.dustBlizz.name=暴雪粉 - -//============== -tile.miscutils.fluid.pyrotheum.name=烈焰之炽焱 -tile.miscutils.fluid.cryotheum.name=æžå¯’之凛冰 -tile.miscutils.fluid.ender.name=è°æŒ¯ç†”èžæœ«å½±çç  -//============== - -//Forestry Stuff -item.frameAccelerated.name=加速框架 -item.frameVoid.name=虚空框架 -item.frameMutagenic.name=诱å˜æ¡†æž¶ -item.frameBusy.name=工作框架 -item.frameChocolate.name=巧克力框架 -item.frameRestraint.name=约æŸæ¡†æž¶ -item.frameSoul.name=çµé­‚框架 -item.frameHealing.name=治愈框架 -item.frameNova.name=新星框架 -item.frameArborists.name=树艺框架 -item.frameDecaying.name=è…烂框架 -item.frameSlowing.name=å‡é€Ÿæ¡†æž¶ -item.frameStabilizing.name=稳定框架 -item.frameUseless.name=无用框架 - -//IC2 stuff -item.itemEnergeticRotorBlade.name=充能åˆé‡‘æ‰‡å¶ -item.itemTungstenSteelRotorBlade.name=é’¨é’¢æ‰‡å¶ -item.itemVibrantRotorBlade.name=脉冲åˆé‡‘æ‰‡å¶ -item.itemIridiumRotorBlade.name=é“±æ‰‡å¶ -item.itemEnergeticShaft.name=充能åˆé‡‘è½´ -item.itemTungstenSteelShaft.name=钨钢轴 -item.itemVibrantShaft.name=脉冲åˆé‡‘è½´ -item.itemIridiumShaft.name=铱轴 -item.itemMagnaliumRotorBlade.name=é•é“åˆé‡‘æ‰‡å¶ -item.itemUltimetRotorBlade.name=哈æ°åˆé‡‘æ‰‡å¶ -item.itemMagnaliumShaft.name=é•é“åˆé‡‘è½´ -item.itemUltimetShaft.name=哈æ°åˆé‡‘è½´ - - -//Misc Items -item.itemPLACEHOLDER_Circuit.name=夸克æ“纵者 (UV) -item.itemPlateEnrichedSoularium.name=富集阳光åˆé‡‘æ¿ -item.itemHeliumBlob.name=神秘氢气物质 -item.itemAlkalusDisk.name=Alkalus圆盘 -item.itemHotIngotRaisinBread.name=一份热葡è„å¹²é¢åŒ… -item.itemIngotRaisinBread.name=一份葡è„å¹²é¢åŒ… - -//Misc Blocks -tile.blockCompressedObsidian.0.name=压缩黑曜石(9) -tile.blockCompressedObsidian.1.name=二é‡åŽ‹ç¼©é»‘曜石(81) -tile.blockCompressedObsidian.2.name=三é‡åŽ‹ç¼©é»‘曜石(729) -tile.blockCompressedObsidian.3.name=å››é‡åŽ‹ç¼©é»‘曜石(6561) -tile.blockCompressedObsidian.4.name=五é‡åŽ‹ç¼©é»‘曜石(59049) -tile.blockCompressedObsidian.5.name=å转黑曜石 -tile.blockNet.name=网 - - -//GT++ Items - -//Meta Tool -MU-metaitem.01.0.name=MU-metaitem.01.0.name - -//Cells -item.SulfurDioxide.name=优质二氧化硫å•å…ƒ -item.mobessence.name=怪物精åŽæ¶²å•å…ƒ -item.Fertiliser.name=æµä½“肥料å•å…ƒ -item.UN32Fertiliser.name=UN-32肥料å•å…ƒ -item.UN18Fertiliser.name=UN-18肥料å•å…ƒ -item.RaisinJuice.name=è‘¡è„æ±å•å…ƒ -item.BerylliumHydroxide.name=氢氧化é“å•å…ƒ -item.AmmoniumBifluoride.name=氟化氢铵å•å…ƒ -item.Hydroxide.name=氢氧化物å•å…ƒ -item.Ammonium.name=铵å•å…ƒ -item.AmmoniumTetrafluoroberyllate.name=四氟硼酸铵å•å…ƒ - -//Resources -item.itemStickyRubber.name=粘性橡胶团 -item.itemCoalCoke.name=焦煤 -item.itemHydrogenBlob.name=神秘氢气团 -item.itemHeliumBlob.name=神秘氢气物质 - -//Normal Items -item.itemAlkalusDisk.name=Alkalus圆盘 -item.itemSimpleFiremaker.name=基础起ç«å™¨ -item.itemFiber.name=æ¤ç‰©çº¤ç»´ -item.itemRope.name=绳索 -item.backpackRed.name=红色背包 -item.backpackGreen.name=绿色背包 -item.backpackBlue.name=è“色背包 -item.backpackYellow.name=黄色背包 -item.backpackPurple.name=紫色背包 -item.backpackCyan.name=é’色背包 -item.backpackMaroon.name=棕色背包 -item.backpackOlive.name=橄榄绿色背包 -item.backpackDarkGreen.name=深绿色背包 -item.backpackDarkPurple.name=深紫色背包 -item.backpackTeal.name=è“绿色背包 -item.backpackNavy.name=æ·±è“色背包 -item.backpackSilver.name=银色背包 -item.backpackGray.name=ç°è‰²èƒŒåŒ… -item.backpackBlack.name=黑色背包 -item.backpackWhite.name=白色背包 -item.itemBlueprint.name=è“图[无用] -item.itemGemShards.name=钻石碎片 -item.itemHalfCompleteCasings.name=åŠæˆå“æœºæ¢°æ–¹å— -item.itemSulfuricPotion.name=喷溅型 ç¡«é…¸ -item.itemHydrofluoricPotion.name=喷溅型 氢氟酸 -item.itemIngotRaisinBread.name=一份葡è„å¹²é¢åŒ… -item.itemHotIngotRaisinBread.name=一份热葡è„å¹²é¢åŒ… -item.itemFoodRaisinToast.name=一份葡è„干烤é¢åŒ… -item.itemHotFoodRaisinToast.name=一份热葡è„干烤é¢åŒ… -item.itemFoodCurriedSausages.name=一份咖喱香肠 -item.itemHotFoodCurriedSausages.name=一份热咖喱香肠 - - -//Conversion Dusts -item.dustNeptunium238.name=é•Ž 238粉 -item.dustRadium226.name=é•­ 226粉 -item.itemDustDecayedRadium226.name=è¡°å˜é•­ 226粉 -item.itemDustSmallDecayedRadium226.name=å°å †è¡°å˜é•­ 226粉 -item.itemDustTinyDecayedRadium226.name=å°æ’®è¡°å˜é•­ 226粉 - -//Material Items -item.itemDustGadolinium.name=钆粉 -item.itemDustSmallGadolinium.name=å°å †é’†ç²‰ -item.itemDustTinyGadolinium.name=å°æ’®é’†ç²‰ -item.itemDustYtterbium.name=镱粉 -item.itemDustSmallYtterbium.name=å°å †é•±ç²‰ -item.itemDustTinyYtterbium.name=å°æ’®é•±ç²‰ -item.itemDustSamarium.name=é’粉 -item.itemDustSmallSamarium.name=å°å †é’粉 -item.itemDustTinySamarium.name=å°æ’®é’粉 -item.itemDustLanthanum.name=镧粉 -item.itemDustSmallLanthanum.name=å°å †é•§ç²‰ -item.itemDustTinyLanthanum.name=å°æ’®é•§ç²‰ -item.itemCellNeon.name=æ°–å•å…ƒ -item.itemCellGermanium.name=é”—å•å…ƒ -item.itemCellSelenium.name=ç¡’å•å…ƒ -item.itemCellBromine.name=溴å•å…ƒ -item.itemCellKrypton.name=æ°ªå•å…ƒ -item.itemCellZirconium.name=锆å•å…ƒ -item.itemCellTechnetium.name=é”å•å…ƒ -item.itemCellRuthenium.name=é’Œå•å…ƒ -item.itemCellRhodium.name=é“‘å•å…ƒ -item.itemCellIodine.name=碘å•å…ƒ -item.itemCellXenon.name=æ°™å•å…ƒ -item.itemCellHafnium.name=铪å•å…ƒ -item.itemCellRhenium.name=铼å•å…ƒ -item.itemCellThallium.name=é“Šå•å…ƒ -item.itemCellPolonium.name=é’‹å•å…ƒ -item.itemCellAstatine.name=ç ¹å•å…ƒ -item.itemCellFrancium.name=é’«å•å…ƒ -item.itemCellRadium.name=é•­å•å…ƒ -item.itemCellActinium.name=锕å•å…ƒ -item.itemCellProtactinium.name=镤å•å…ƒ -item.itemCellNeptunium.name=é•Žå•å…ƒ -item.itemCellCurium.name=é””å•å…ƒ -item.itemCellBerkelium.name=锫å•å…ƒ -item.itemCellCalifornium.name=锎å•å…ƒ -item.itemCellEinsteinium.name=锿å•å…ƒ -item.itemCellFermium.name=é•„å•å…ƒ -item.itemCellRefinedTrinium.name=精制三元金属å•å…ƒ -item.itemIngotSelenium.name=ç¡’é”­ -item.itemDustSelenium.name=硒粉 -item.itemDustTinySelenium.name=å°æ’®ç¡’粉 -item.itemDustSmallSelenium.name=å°å †ç¡’粉 -item.itemNuggetSelenium.name=ç¡’ç²’ -item.itemPlateSelenium.name=ç¡’æ¿ -item.itemPlateDoubleSelenium.name=åŒé‡ç¡’æ¿ -item.itemBoltSelenium.name=硒螺栓 -item.itemRodSelenium.name=ç¡’æ† -item.itemRodLongSelenium.name=é•¿ç¡’æ† -item.itemRingSelenium.name=硒环 -item.itemScrewSelenium.name=ç¡’èžºä¸ -item.itemRotorSelenium.name=ç¡’è½¬å­ -item.itemGearSelenium.name=硒齿轮 -item.itemCellUranium232.name=é“€-232å•å…ƒ -item.itemCellUranium233.name=é“€-233å•å…ƒ -item.itemCellThoriumTetrafluoride.name=四氟化é’å•å…ƒ -item.itemCellThoriumHexafluoride.name=六氟化é’å•å…ƒ -item.itemCellUraniumTetrafluoride.name=四氟化铀å•å…ƒ -item.itemCellUraniumHexafluoride.name=六氟化铀å•å…ƒ -item.itemCellZirconiumTetrafluoride.name=四氟化锆å•å…ƒ -item.itemCellBerylliumFluoride.name=氟化é“å•å…ƒ -item.itemCellLithiumFluoride.name=氟化锂å•å…ƒ -item.itemCellHydroxide.name=氢氧化物å•å…ƒ -item.itemCellAmmonium.name=铵å•å…ƒ -item.itemCellAmmoniumBifluoride.name=氟化氢铵å•å…ƒ -item.itemCellBerylliumHydroxide.name=氢氧化é“å•å…ƒ -item.itemCellAmmoniumTetrafluoroberyllate.name=æ°Ÿé“酸铵å•å…ƒ -item.itemCellNeptuniumHexafluoride.name=六氟化铀å•å…ƒ -item.itemCellTechnetiumHexafluoride.name=六氟化é”å•å…ƒ -item.itemCellSeleniumHexafluoride.name=六氟化硒å•å…ƒ -item.itemCellEnergyCrystal.name=能é‡æ°´æ™¶å•å…ƒ -item.itemCellBloodSteel.name=血钢å•å…ƒ -item.itemCellStaballoy.name=è´«é“€åˆé‡‘å•å…ƒ -item.itemCellTantalloy60.name=钽钨åˆé‡‘-60å•å…ƒ -item.itemCellTantalloy61.name=钽钨åˆé‡‘-61å•å…ƒ -item.itemCellTumbaga.name=铜金åˆé‡‘å•å…ƒ -item.itemCellPotin.name=ç²—é’é“œåˆé‡‘å•å…ƒ -item.itemCellInconel625.name=é•é“¬åŸºåˆé‡‘-625å•å…ƒ -item.itemCellInconel690.name=é•é“¬åŸºåˆé‡‘-690å•å…ƒ -item.itemCellInconel792.name=é•é“¬åŸºåˆé‡‘-792å•å…ƒ -item.itemCellZeron100.name=å¡žé¾™-100å•å…ƒ -item.itemCellMaragingSteel250.name=马æ°ä½“时效钢250å•å…ƒ -item.itemCellMaragingSteel300.name=马æ°ä½“时效钢300å•å…ƒ -item.itemCellMaragingSteel350.name=马æ°ä½“时效钢350å•å…ƒ -item.itemCellStellite.name=铬钴锰钛åˆé‡‘å•å…ƒ -item.itemCellTalonite.name=铬钴磷酸ç›åˆé‡‘å•å…ƒ -item.itemCellHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wå•å…ƒ -item.itemCellHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xå•å…ƒ -item.itemCellHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nå•å…ƒ -item.itemCellHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276å•å…ƒ -item.itemCellIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020å•å…ƒ -item.itemCellIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSå•å…ƒ -item.itemCellIncoloyMA956.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-MA956å•å…ƒ -item.itemCellTungstenCarbide.name=碳化钨å•å…ƒ -item.itemCellSiliconCarbide.name=碳化硅å•å…ƒ -item.itemCellTantalumCarbide.name=碳化钽å•å…ƒ -item.itemCellZirconiumCarbide.name=碳化锆å•å…ƒ -item.itemCellNiobiumCarbide.name=碳化铌å•å…ƒ -item.itemCellGrisium.name=ç°é’›åˆé‡‘å•å…ƒ -item.itemCellEglinSteelBaseCompound.name=埃格林钢å•å…ƒ -item.itemCellEglinSteel.name=埃格林钢å•å…ƒ -item.itemCellHG1223.name=HG-1223å•å…ƒ -item.itemCellTriniumTitaniumAlloy.name=三元钛åˆé‡‘å•å…ƒ -item.itemCellTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘å•å…ƒ -item.itemCellTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘å•å…ƒ -item.itemCellQuantum.name=é‡å­åˆé‡‘å•å…ƒ -item.itemIngotBromine.name=溴锭 -item.itemDustBromine.name=溴粉 -item.itemDustTinyBromine.name=å°æ’®æº´ç²‰ -item.itemDustSmallBromine.name=å°å †æº´ç²‰ -item.itemNuggetBromine.name=溴粒 -item.itemPlateBromine.name=æº´æ¿ -item.itemPlateDoubleBromine.name=åŒé‡æº´æ¿ -item.itemIngotStrontium.name=锶锭 -item.itemDustStrontium.name=锶粉 -item.itemDustTinyStrontium.name=å°æ’®é”¶ç²‰ -item.itemDustSmallStrontium.name=å°å †é”¶ç²‰ -item.itemNuggetStrontium.name=锶粒 -item.itemPlateStrontium.name=é”¶æ¿ -item.itemPlateDoubleStrontium.name=åŒé‡é”¶æ¿ -item.itemBoltStrontium.name=锶螺栓 -item.itemRodStrontium.name=é”¶æ† -item.itemRodLongStrontium.name=é•¿é”¶æ† -item.itemRingStrontium.name=锶环 -item.itemScrewStrontium.name=é”¶èžºä¸ -item.itemRotorStrontium.name=é”¶è½¬å­ -item.itemGearStrontium.name=锶齿轮 -item.itemIngotZirconium.name=锆锭 -item.itemDustZirconium.name=锆粉 -item.itemDustTinyZirconium.name=å°æ’®é”†ç²‰ -item.itemDustSmallZirconium.name=å°å †é”†ç²‰ -item.itemNuggetZirconium.name=锆粒 -item.itemPlateZirconium.name=é”†æ¿ -item.itemPlateDoubleZirconium.name=åŒé‡é”†æ¿ -item.itemBoltZirconium.name=锆螺栓 -item.itemRodZirconium.name=é”†æ† -item.itemRodLongZirconium.name=é•¿é”†æ† -item.itemRingZirconium.name=锆环 -item.itemScrewZirconium.name=é”†èžºä¸ -item.itemRotorZirconium.name=é”†è½¬å­ -item.itemGearZirconium.name=锆齿轮 -item.itemIngotRuthenium.name=钌锭 -item.itemDustRuthenium.name=钌粉 -item.itemDustTinyRuthenium.name=å°æ’®é’Œç²‰ -item.itemDustSmallRuthenium.name=å°å †é’Œç²‰ -item.itemNuggetRuthenium.name=钌粒 -item.itemPlateRuthenium.name=é’Œæ¿ -item.itemPlateDoubleRuthenium.name=åŒé‡é’Œæ¿ -item.itemBoltRuthenium.name=钌螺栓 -item.itemRodRuthenium.name=é’Œæ† -item.itemRodLongRuthenium.name=é•¿é’Œæ† -item.itemRingRuthenium.name=钌环 -item.itemScrewRuthenium.name=é’Œèžºä¸ -item.itemRotorRuthenium.name=é’Œè½¬å­ -item.itemGearRuthenium.name=钌齿轮 -item.itemIngotIodine.name=碘锭 -item.itemDustIodine.name=碘粉 -item.itemDustTinyIodine.name=å°æ’®ç¢˜ç²‰ -item.itemDustSmallIodine.name=å°å †ç¢˜ç²‰ -item.itemNuggetIodine.name=碘粒 -item.itemPlateIodine.name=ç¢˜æ¿ -item.itemPlateDoubleIodine.name=åŒé‡ç¢˜æ¿ -item.itemBoltIodine.name=碘螺栓 -item.itemRodIodine.name=ç¢˜æ† -item.itemRodLongIodine.name=é•¿ç¢˜æ† -item.itemRingIodine.name=碘环 -item.itemScrewIodine.name=ç¢˜èžºä¸ -item.itemRotorIodine.name=ç¢˜è½¬å­ -item.itemGearIodine.name=碘齿轮 -item.itemIngotHafnium.name=铪锭 -item.itemDustHafnium.name=铪粉 -item.itemDustTinyHafnium.name=å°æ’®é“ªç²‰ -item.itemDustSmallHafnium.name=å°å †é“ªç²‰ -item.itemNuggetHafnium.name=铪粒 -item.itemPlateHafnium.name=é“ªæ¿ -item.itemPlateDoubleHafnium.name=åŒé‡é“ªæ¿ -item.itemBoltHafnium.name=铪螺栓 -item.itemRodHafnium.name=é“ªæ† -item.itemRodLongHafnium.name=é•¿é“ªæ† -item.itemRingHafnium.name=铪环 -item.itemScrewHafnium.name=é“ªèžºä¸ -item.itemRotorHafnium.name=é“ªè½¬å­ -item.itemGearHafnium.name=铪齿轮 -item.itemIngotDysprosium.name=é•é”­ -item.itemDustDysprosium.name=é•ç²‰ -item.itemDustTinyDysprosium.name=å°æ’®é•ç²‰ -item.itemDustSmallDysprosium.name=å°å †é•ç²‰ -item.itemNuggetDysprosium.name=é•ç²’ -item.itemPlateDysprosium.name=é•æ¿ -item.itemPlateDoubleDysprosium.name=åŒé‡é•æ¿ -item.itemBoltDysprosium.name=é•èžºæ “ -item.itemRodDysprosium.name=é•æ† -item.itemRodLongDysprosium.name=é•¿é•æ† -item.itemRingDysprosium.name=é•çŽ¯ -item.itemScrewDysprosium.name=é•èžºä¸ -item.itemRotorDysprosium.name=é•è½¬å­ -item.itemGearDysprosium.name=é•é½¿è½® -item.itemIngotTellurium.name=碲锭 -item.itemDustTellurium.name=碲粉 -item.itemDustTinyTellurium.name=å°æ’®ç¢²ç²‰ -item.itemDustSmallTellurium.name=å°å †ç¢²ç²‰ -item.itemNuggetTellurium.name=碲粒 -item.itemPlateTellurium.name=ç¢²æ¿ -item.itemPlateDoubleTellurium.name=åŒé‡ç¢²æ¿ -item.itemBoltTellurium.name=碲螺栓 -item.itemRodTellurium.name=ç¢²æ† -item.itemRodLongTellurium.name=é•¿ç¢²æ† -item.itemRingTellurium.name=碲环 -item.itemScrewTellurium.name=ç¢²èžºä¸ -item.itemRotorTellurium.name=ç¢²è½¬å­ -item.itemGearTellurium.name=碲齿轮 -item.itemIngotRhodium.name=é“‘é”­ -item.itemDustRhodium.name=铑粉 -item.itemDustTinyRhodium.name=å°æ’®é“‘粉 -item.itemDustSmallRhodium.name=å°å †é“‘粉 -item.itemNuggetRhodium.name=é“‘ç²’ -item.itemPlateRhodium.name=é“‘æ¿ -item.itemPlateDoubleRhodium.name=åŒé‡é“‘æ¿ -item.itemBoltRhodium.name=铑螺栓 -item.itemRodRhodium.name=é“‘æ† -item.itemRodLongRhodium.name=é•¿é“‘æ† -item.itemRingRhodium.name=铑环 -item.itemScrewRhodium.name=é“‘èžºä¸ -item.itemRotorRhodium.name=é“‘è½¬å­ -item.itemGearRhodium.name=铑齿轮 -item.itemIngotRhenium.name=铼锭 -item.itemDustRhenium.name=铼粉 -item.itemDustTinyRhenium.name=å°æ’®é“¼ç²‰ -item.itemDustSmallRhenium.name=å°å †é“¼ç²‰ -item.itemNuggetRhenium.name=铼粒 -item.itemPlateRhenium.name=é“¼æ¿ -item.itemPlateDoubleRhenium.name=åŒé‡é“¼æ¿ -item.itemBoltRhenium.name=铼螺栓 -item.itemRodRhenium.name=é“¼æ† -item.itemRodLongRhenium.name=é•¿é“¼æ† -item.itemRingRhenium.name=铼环 -item.itemScrewRhenium.name=é“¼èžºä¸ -item.itemRotorRhenium.name=é“¼è½¬å­ -item.itemGearRhenium.name=铼齿轮 -item.itemIngotThallium.name=é“Šé”­ -item.itemDustThallium.name=铊粉 -item.itemDustTinyThallium.name=å°æ’®é“Šç²‰ -item.itemDustSmallThallium.name=å°å †é“Šç²‰ -item.itemNuggetThallium.name=é“Šç²’ -item.itemPlateThallium.name=é“Šæ¿ -item.itemPlateDoubleThallium.name=åŒé‡é“Šæ¿ -item.itemBoltThallium.name=铊螺栓 -item.itemRodThallium.name=é“Šæ† -item.itemRodLongThallium.name=é•¿é“Šæ† -item.itemRingThallium.name=铊环 -item.itemScrewThallium.name=é“Šèžºä¸ -item.itemRotorThallium.name=é“Šè½¬å­ -item.itemGearThallium.name=铊齿轮 -item.itemIngotTechnetium.name=é”é”­ -item.itemDustTechnetium.name=é”粉 -item.itemDustTinyTechnetium.name=å°æ’®é”粉 -item.itemDustSmallTechnetium.name=å°å †é”粉 -item.itemNuggetTechnetium.name=é”ç²’ -item.itemPlateTechnetium.name=é”æ¿ -item.itemPlateDoubleTechnetium.name=åŒé‡é”æ¿ -item.itemIngotPolonium.name=é’‹é”­ -item.itemDustPolonium.name=钋粉 -item.itemDustTinyPolonium.name=å°æ’®é’‹ç²‰ -item.itemDustSmallPolonium.name=å°å †é’‹ç²‰ -item.itemNuggetPolonium.name=é’‹ç²’ -item.itemPlatePolonium.name=é’‹æ¿ -item.itemPlateDoublePolonium.name=åŒé‡é’‹æ¿ -item.itemIngotAstatine.name=砹锭 -item.itemDustAstatine.name=砹粉 -item.itemDustTinyAstatine.name=å°æ’®ç ¹ç²‰ -item.itemDustSmallAstatine.name=å°å †ç ¹ç²‰ -item.itemNuggetAstatine.name=砹粒 -item.itemPlateAstatine.name=ç ¹æ¿ -item.itemPlateDoubleAstatine.name=åŒé‡ç ¹æ¿ -item.itemIngotFrancium.name=é’«é”­ -item.itemDustFrancium.name=钫粉 -item.itemDustTinyFrancium.name=å°æ’®é’«ç²‰ -item.itemDustSmallFrancium.name=å°å †é’«ç²‰ -item.itemNuggetFrancium.name=é’«ç²’ -item.itemPlateFrancium.name=é’«æ¿ -item.itemPlateDoubleFrancium.name=åŒé‡é’«æ¿ -item.itemIngotRadium.name=é•­é”­ -item.itemDustRadium.name=镭粉 -item.itemDustTinyRadium.name=å°æ’®é•­ç²‰ -item.itemDustSmallRadium.name=å°å †é•­ç²‰ -item.itemNuggetRadium.name=é•­ç²’ -item.itemPlateRadium.name=é•­æ¿ -item.itemPlateDoubleRadium.name=åŒé‡é•­æ¿ -item.itemIngotActinium.name=锕锭 -item.itemDustActinium.name=锕粉 -item.itemDustTinyActinium.name=å°æ’®é”•ç²‰ -item.itemDustSmallActinium.name=å°å †é”•ç²‰ -item.itemNuggetActinium.name=锕粒 -item.itemPlateActinium.name=é”•æ¿ -item.itemPlateDoubleActinium.name=åŒé‡é”•æ¿ -item.itemIngotProtactinium.name=镤锭 -item.itemDustProtactinium.name=镤粉 -item.itemDustTinyProtactinium.name=å°æ’®é•¤ç²‰ -item.itemDustSmallProtactinium.name=å°å †é•¤ç²‰ -item.itemNuggetProtactinium.name=镤粒 -item.itemPlateProtactinium.name=é•¤æ¿ -item.itemPlateDoubleProtactinium.name=åŒé‡é•¤æ¿ -item.itemIngotNeptunium.name=é•Žé”­ -item.itemDustNeptunium.name=镎粉 -item.itemDustTinyNeptunium.name=å°æ’®é•Žç²‰ -item.itemDustSmallNeptunium.name=å°å †é•Žç²‰ -item.itemNuggetNeptunium.name=é•Žç²’ -item.itemPlateNeptunium.name=é•Žæ¿ -item.itemPlateDoubleNeptunium.name=åŒé‡é•Žæ¿ -item.itemIngotCurium.name=锔锭 -item.itemDustCurium.name=锔粉 -item.itemDustTinyCurium.name=å°æ’®é””粉 -item.itemDustSmallCurium.name=å°å †é””粉 -item.itemNuggetCurium.name=锔粒 -item.itemPlateCurium.name=é””æ¿ -item.itemPlateDoubleCurium.name=åŒé‡é””æ¿ -item.itemIngotBerkelium.name=锫锭 -item.itemDustBerkelium.name=锫粉 -item.itemDustTinyBerkelium.name=å°æ’®é”«ç²‰ -item.itemDustSmallBerkelium.name=å°å †é”«ç²‰ -item.itemNuggetBerkelium.name=锫粒 -item.itemPlateBerkelium.name=é”«æ¿ -item.itemPlateDoubleBerkelium.name=åŒé‡é”«æ¿ -item.itemIngotCalifornium.name=锎锭 -item.itemDustCalifornium.name=锎粉 -item.itemDustTinyCalifornium.name=å°æ’®é”Žç²‰ -item.itemDustSmallCalifornium.name=å°å †é”Žç²‰ -item.itemNuggetCalifornium.name=锎粒 -item.itemPlateCalifornium.name=é”Žæ¿ -item.itemPlateDoubleCalifornium.name=åŒé‡é”Žæ¿ -item.itemIngotEinsteinium.name=锿锭 -item.itemDustEinsteinium.name=锿粉 -item.itemDustTinyEinsteinium.name=å°æ’®é”¿ç²‰ -item.itemDustSmallEinsteinium.name=å°å †é”¿ç²‰ -item.itemNuggetEinsteinium.name=锿粒 -item.itemPlateEinsteinium.name=é”¿æ¿ -item.itemPlateDoubleEinsteinium.name=åŒé‡é”¿æ¿ -item.itemIngotFermium.name=é•„é”­ -item.itemDustFermium.name=镄粉 -item.itemDustTinyFermium.name=å°æ’®é•„粉 -item.itemDustSmallFermium.name=å°å †é•„粉 -item.itemNuggetFermium.name=é•„ç²’ -item.itemPlateFermium.name=é•„æ¿ -item.itemPlateDoubleFermium.name=åŒé‡é•„æ¿ -item.itemIngotLithium7.name=锂 7é”­ -item.itemDustLithium7.name=锂 7粉 -item.itemDustTinyLithium7.name=å°æ’®é”‚ 7粉 -item.itemDustSmallLithium7.name=å°å †é”‚ 7粉 -item.itemNuggetLithium7.name=锂 7ç²’ -item.itemPlateLithium7.name=锂 7æ¿ -item.itemPlateDoubleLithium7.name=åŒé‡é”‚ 7æ¿ -item.itemIngotThorium232.name=é’-232é”­ -item.itemDustThorium232.name=é’-232粉 -item.itemDustTinyThorium232.name=å°æ’®é’-232粉 -item.itemDustSmallThorium232.name=å°å †é’-232粉 -item.itemNuggetThorium232.name=é’-232ç²’ -item.itemPlateThorium232.name=é’-232æ¿ -item.itemPlateDoubleThorium232.name=åŒé‡é’-232æ¿ -item.itemIngotUranium232.name=é“€-232é”­ -item.itemDustUranium232.name=é“€-232粉 -item.itemDustTinyUranium232.name=å°æ’®é“€-232粉 -item.itemDustSmallUranium232.name=å°å †é“€-232粉 -item.itemNuggetUranium232.name=é“€-232ç²’ -item.itemPlateUranium232.name=é“€-232æ¿ -item.itemRodUranium232.name=é“€-232æ† -item.itemRodLongUranium232.name=é•¿é“€-232æ† -item.itemIngotUranium233.name=é“€-233é”­ -item.itemDustUranium233.name=é“€-233粉 -item.itemDustTinyUranium233.name=å°æ’®é“€-233粉 -item.itemDustSmallUranium233.name=å°å †é“€-233粉 -item.itemNuggetUranium233.name=é“€-233ç²’ -item.itemPlateUranium233.name=é“€-233æ¿ -item.itemRodUranium233.name=é“€-233æ† -item.itemRodLongUranium233.name=é•¿é“€-233æ† -item.itemIngotPlutonium238.name=é’š-238é”­ -item.itemDustPlutonium238.name=é’š-238粉 -item.itemDustTinyPlutonium238.name=å°æ’®é’š-238粉 -item.itemDustSmallPlutonium238.name=å°å †é’š-238粉 -item.itemNuggetPlutonium238.name=é’š-238ç²’ -item.itemPlatePlutonium238.name=é’š-238æ¿ -item.itemPlateDoublePlutonium238.name=åŒé‡é’š-238æ¿ -item.itemIngotStrontium90.name=锶-90é”­ -item.itemDustStrontium90.name=锶-90粉 -item.itemDustTinyStrontium90.name=å°æ’®é”¶-90粉 -item.itemDustSmallStrontium90.name=å°å †é”¶-90粉 -item.itemNuggetStrontium90.name=锶-90ç²’ -item.itemPlateStrontium90.name=锶-90æ¿ -item.itemPlateDoubleStrontium90.name=åŒé‡é”¶-90æ¿ -item.itemIngotPolonium210.name=é’‹-210é”­ -item.itemDustPolonium210.name=é’‹-210粉 -item.itemDustTinyPolonium210.name=å°æ’®é’‹-210粉 -item.itemDustSmallPolonium210.name=å°å †é’‹-210粉 -item.itemNuggetPolonium210.name=é’‹-210ç²’ -item.itemPlatePolonium210.name=é’‹-210æ¿ -item.itemPlateDoublePolonium210.name=åŒé‡é’‹-210æ¿ -item.itemIngotAmericium241.name=é•…-241é”­ -item.itemDustAmericium241.name=é•…-241粉 -item.itemDustTinyAmericium241.name=å°æ’®é•…-241粉 -item.itemDustSmallAmericium241.name=å°å †é•…-241粉 -item.itemNuggetAmericium241.name=é•…-241ç²’ -item.itemPlateAmericium241.name=é•…-241æ¿ -item.itemPlateDoubleAmericium241.name=åŒé‡é•…-241æ¿ -item.itemIngotSiliconCarbide.name=碳化硅锭 -item.itemDustSiliconCarbide.name=碳化硅粉 -item.itemDustTinySiliconCarbide.name=å°æ’®ç¢³åŒ–硅粉 -item.itemDustSmallSiliconCarbide.name=å°å †ç¢³åŒ–硅粉 -item.itemNuggetSiliconCarbide.name=碳化硅粒 -item.itemPlateSiliconCarbide.name=ç¢³åŒ–ç¡…æ¿ -item.itemPlateDoubleSiliconCarbide.name=åŒé‡ç¢³åŒ–ç¡…æ¿ -item.itemBoltSiliconCarbide.name=碳化硅螺栓 -item.itemRodSiliconCarbide.name=ç¢³åŒ–ç¡…æ† -item.itemRodLongSiliconCarbide.name=é•¿ç¢³åŒ–ç¡…æ† -item.itemRingSiliconCarbide.name=碳化硅环 -item.itemScrewSiliconCarbide.name=ç¢³åŒ–ç¡…èžºä¸ -item.itemRotorSiliconCarbide.name=ç¢³åŒ–ç¡…è½¬å­ -item.itemGearSiliconCarbide.name=碳化硅齿轮 -item.itemIngotZirconiumCarbide.name=碳化锆锭 -item.itemHotIngotZirconiumCarbide.name=热碳化锆锭 -item.itemDustZirconiumCarbide.name=碳化锆粉 -item.itemDustTinyZirconiumCarbide.name=å°æ’®ç¢³åŒ–锆粉 -item.itemDustSmallZirconiumCarbide.name=å°å †ç¢³åŒ–锆粉 -item.itemNuggetZirconiumCarbide.name=碳化锆粒 -item.itemPlateZirconiumCarbide.name=ç¢³åŒ–é”†æ¿ -item.itemPlateDoubleZirconiumCarbide.name=åŒé‡ç¢³åŒ–é”†æ¿ -item.itemBoltZirconiumCarbide.name=碳化锆螺栓 -item.itemRodZirconiumCarbide.name=ç¢³åŒ–é”†æ† -item.itemRodLongZirconiumCarbide.name=é•¿ç¢³åŒ–é”†æ† -item.itemRingZirconiumCarbide.name=碳化锆环 -item.itemScrewZirconiumCarbide.name=ç¢³åŒ–é”†èžºä¸ -item.itemRotorZirconiumCarbide.name=ç¢³åŒ–é”†è½¬å­ -item.itemGearZirconiumCarbide.name=碳化锆齿轮 -item.itemIngotTantalumCarbide.name=碳化钽锭 -item.itemHotIngotTantalumCarbide.name=热碳化钽锭 -item.itemDustTantalumCarbide.name=碳化钽粉 -item.itemDustTinyTantalumCarbide.name=å°æ’®ç¢³åŒ–钽粉 -item.itemDustSmallTantalumCarbide.name=å°å †ç¢³åŒ–钽粉 -item.itemNuggetTantalumCarbide.name=碳化钽粒 -item.itemPlateTantalumCarbide.name=ç¢³åŒ–é’½æ¿ -item.itemPlateDoubleTantalumCarbide.name=åŒé‡ç¢³åŒ–é’½æ¿ -item.itemBoltTantalumCarbide.name=碳化钽螺栓 -item.itemRodTantalumCarbide.name=ç¢³åŒ–é’½æ† -item.itemRodLongTantalumCarbide.name=é•¿ç¢³åŒ–é’½æ† -item.itemRingTantalumCarbide.name=碳化钽环 -item.itemScrewTantalumCarbide.name=ç¢³åŒ–é’½èžºä¸ -item.itemRotorTantalumCarbide.name=ç¢³åŒ–é’½è½¬å­ -item.itemGearTantalumCarbide.name=碳化钽齿轮 -item.itemIngotNiobiumCarbide.name=碳化铌锭 -item.itemHotIngotNiobiumCarbide.name=热碳化铌锭 -item.itemDustNiobiumCarbide.name=碳化铌粉 -item.itemDustTinyNiobiumCarbide.name=å°æ’®ç¢³åŒ–铌粉 -item.itemDustSmallNiobiumCarbide.name=å°å †ç¢³åŒ–铌粉 -item.itemNuggetNiobiumCarbide.name=碳化铌粒 -item.itemPlateNiobiumCarbide.name=ç¢³åŒ–é“Œæ¿ -item.itemPlateDoubleNiobiumCarbide.name=åŒé‡ç¢³åŒ–é“Œæ¿ -item.itemBoltNiobiumCarbide.name=碳化铌螺栓 -item.itemRodNiobiumCarbide.name=ç¢³åŒ–é“Œæ† -item.itemRodLongNiobiumCarbide.name=é•¿ç¢³åŒ–é“Œæ† -item.itemRingNiobiumCarbide.name=碳化铌环 -item.itemScrewNiobiumCarbide.name=ç¢³åŒ–é“Œèžºä¸ -item.itemRotorNiobiumCarbide.name=ç¢³åŒ–é“Œè½¬å­ -item.itemGearNiobiumCarbide.name=碳化铌齿轮 -item.itemIngotBerylliumFluoride.name=氟化é“é”­ -item.itemDustBerylliumFluoride.name=氟化é“粉 -item.itemDustTinyBerylliumFluoride.name=å°æ’®æ°ŸåŒ–é“粉 -item.itemDustSmallBerylliumFluoride.name=å°å †æ°ŸåŒ–é“粉 -item.itemNuggetBerylliumFluoride.name=氟化é“ç²’ -item.itemPlateBerylliumFluoride.name=氟化é“æ¿ -item.itemPlateDoubleBerylliumFluoride.name=åŒé‡æ°ŸåŒ–é“æ¿ -item.itemIngotLithiumFluoride.name=氟化锂锭 -item.itemDustLithiumFluoride.name=氟化锂粉 -item.itemDustTinyLithiumFluoride.name=å°æ’®æ°ŸåŒ–锂粉 -item.itemDustSmallLithiumFluoride.name=å°å †æ°ŸåŒ–锂粉 -item.itemNuggetLithiumFluoride.name=氟化锂粒 -item.itemPlateLithiumFluoride.name=æ°ŸåŒ–é”‚æ¿ -item.itemPlateDoubleLithiumFluoride.name=åŒé‡æ°ŸåŒ–é”‚æ¿ -item.itemIngotThoriumTetrafluoride.name=四氟化é’é”­ -item.itemDustThoriumTetrafluoride.name=四氟化é’粉 -item.itemDustTinyThoriumTetrafluoride.name=å°æ’®å››æ°ŸåŒ–é’粉 -item.itemDustSmallThoriumTetrafluoride.name=å°å †å››æ°ŸåŒ–é’粉 -item.itemNuggetThoriumTetrafluoride.name=四氟化é’ç²’ -item.itemPlateThoriumTetrafluoride.name=四氟化é’æ¿ -item.itemPlateDoubleThoriumTetrafluoride.name=åŒé‡å››æ°ŸåŒ–é’æ¿ -item.itemIngotThoriumHexafluoride.name=六氟化é’é”­ -item.itemDustThoriumHexafluoride.name=六氟化é’粉 -item.itemDustTinyThoriumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–é’粉 -item.itemDustSmallThoriumHexafluoride.name=å°å †å…­æ°ŸåŒ–é’粉 -item.itemNuggetThoriumHexafluoride.name=六氟化é’ç²’ -item.itemPlateThoriumHexafluoride.name=六氟化é’æ¿ -item.itemPlateDoubleThoriumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é’æ¿ -item.itemIngotUraniumTetrafluoride.name=四氟化铀锭 -item.itemDustUraniumTetrafluoride.name=四氟化铀粉 -item.itemDustTinyUraniumTetrafluoride.name=å°æ’®å››æ°ŸåŒ–铀粉 -item.itemDustSmallUraniumTetrafluoride.name=å°å †å››æ°ŸåŒ–铀粉 -item.itemNuggetUraniumTetrafluoride.name=四氟化铀粒 -item.itemPlateUraniumTetrafluoride.name=å››æ°ŸåŒ–é“€æ¿ -item.itemPlateDoubleUraniumTetrafluoride.name=åŒé‡å››æ°ŸåŒ–é“€æ¿ -item.itemIngotUraniumHexafluoride.name=六氟化铀锭 -item.itemDustUraniumHexafluoride.name=六氟化铀粉 -item.itemDustTinyUraniumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–铀粉 -item.itemDustSmallUraniumHexafluoride.name=å°å †å…­æ°ŸåŒ–铀粉 -item.itemNuggetUraniumHexafluoride.name=六氟化铀粒 -item.itemPlateUraniumHexafluoride.name=å…­æ°ŸåŒ–é“€æ¿ -item.itemPlateDoubleUraniumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é“€æ¿ -item.itemIngotZirconiumTetrafluoride.name=四氟化锆锭 -item.itemDustZirconiumTetrafluoride.name=四氟化锆粉 -item.itemDustTinyZirconiumTetrafluoride.name=å°æ’®å››æ°ŸåŒ–锆粉 -item.itemDustSmallZirconiumTetrafluoride.name=å°å †å››æ°ŸåŒ–锆粉 -item.itemNuggetZirconiumTetrafluoride.name=四氟化锆粒 -item.itemPlateZirconiumTetrafluoride.name=å››æ°ŸåŒ–é”†æ¿ -item.itemPlateDoubleZirconiumTetrafluoride.name=åŒé‡å››æ°ŸåŒ–é”†æ¿ -item.itemIngotNeptuniumHexafluoride.name=六氟化镎锭 -item.itemDustNeptuniumHexafluoride.name=六氟化镎粉 -item.itemDustTinyNeptuniumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–镎粉 -item.itemDustSmallNeptuniumHexafluoride.name=å°å †å…­æ°ŸåŒ–镎粉 -item.itemNuggetNeptuniumHexafluoride.name=六氟化镎粒 -item.itemPlateNeptuniumHexafluoride.name=å…­æ°ŸåŒ–é•Žæ¿ -item.itemPlateDoubleNeptuniumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é•Žæ¿ -item.itemIngotTechnetiumHexafluoride.name=六氟化é”é”­ -item.itemDustTechnetiumHexafluoride.name=六氟化é”粉 -item.itemDustTinyTechnetiumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–é”粉 -item.itemDustSmallTechnetiumHexafluoride.name=å°å †å…­æ°ŸåŒ–é”粉 -item.itemNuggetTechnetiumHexafluoride.name=六氟化é”ç²’ -item.itemPlateTechnetiumHexafluoride.name=六氟化é”æ¿ -item.itemPlateDoubleTechnetiumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–é”æ¿ -item.itemIngotSeleniumHexafluoride.name=六氟化硒锭 -item.itemDustSeleniumHexafluoride.name=六氟化硒粉 -item.itemDustTinySeleniumHexafluoride.name=å°æ’®å…­æ°ŸåŒ–硒粉 -item.itemDustSmallSeleniumHexafluoride.name=å°å †å…­æ°ŸåŒ–硒粉 -item.itemNuggetSeleniumHexafluoride.name=六氟化硒粒 -item.itemPlateSeleniumHexafluoride.name=å…­æ°ŸåŒ–ç¡’æ¿ -item.itemPlateDoubleSeleniumHexafluoride.name=åŒé‡å…­æ°ŸåŒ–ç¡’æ¿ -item.itemIngotLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–物锭 -item.itemDustLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–物粉 -item.itemDustTinyLiFBeF2ZrF4U235.name=å°æ’®é“€235å¤åˆæ°ŸåŒ–物粉 -item.itemDustSmallLiFBeF2ZrF4U235.name=å°å †é“€235å¤åˆæ°ŸåŒ–物粉 -item.itemNuggetLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–物粒 -item.itemPlateLiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–ç‰©æ¿ -item.itemPlateDoubleLiFBeF2ZrF4U235.name=åŒé‡é“€235å¤åˆæ°ŸåŒ–ç‰©æ¿ -item.itemIngotLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–物锭 -item.itemDustLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–物粉 -item.itemDustTinyLiFBeF2ZrF4UF4.name=å°æ’®é“€é”†å¤åˆæ°ŸåŒ–物粉 -item.itemDustSmallLiFBeF2ZrF4UF4.name=å°å †é“€é”†å¤åˆæ°ŸåŒ–物粉 -item.itemNuggetLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–物粒 -item.itemPlateLiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–ç‰©æ¿ -item.itemPlateDoubleLiFBeF2ZrF4UF4.name=åŒé‡é“€é”†å¤åˆæ°ŸåŒ–ç‰©æ¿ -item.itemIngotLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–物锭 -item.itemDustLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–物粉 -item.itemDustTinyLiFBeF2ThF4UF4.name=å°æ’®é“€é’å¤åˆæ°ŸåŒ–物粉 -item.itemDustSmallLiFBeF2ThF4UF4.name=å°å †é“€é’å¤åˆæ°ŸåŒ–物粉 -item.itemNuggetLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–物粒 -item.itemPlateLiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–ç‰©æ¿ -item.itemPlateDoubleLiFBeF2ThF4UF4.name=åŒé‡é“€é’å¤åˆæ°ŸåŒ–ç‰©æ¿ -item.itemIngotEnergyCrystal.name=能é‡æ°´æ™¶é”­ -item.itemHotIngotEnergyCrystal.name=热能é‡æ°´æ™¶é”­ -item.itemDustEnergyCrystal.name=能é‡æ°´æ™¶ç²‰ -item.itemDustTinyEnergyCrystal.name=å°æ’®èƒ½é‡æ°´æ™¶ç²‰ -item.itemDustSmallEnergyCrystal.name=å°å †èƒ½é‡æ°´æ™¶ç²‰ -item.itemNuggetEnergyCrystal.name=能é‡æ°´æ™¶ç²’ -item.itemPlateEnergyCrystal.name=能é‡æ°´æ™¶æ¿ -item.itemPlateDoubleEnergyCrystal.name=åŒé‡èƒ½é‡æ°´æ™¶æ¿ -item.itemBoltEnergyCrystal.name=能é‡æ°´æ™¶èžºæ “ -item.itemRodEnergyCrystal.name=能é‡æ°´æ™¶æ† -item.itemRodLongEnergyCrystal.name=长能é‡æ°´æ™¶æ† -item.itemRingEnergyCrystal.name=能é‡æ°´æ™¶çŽ¯ -item.itemScrewEnergyCrystal.name=能é‡æ°´æ™¶èžºä¸ -item.itemRotorEnergyCrystal.name=能é‡æ°´æ™¶è½¬å­ -item.itemGearEnergyCrystal.name=能é‡æ°´æ™¶é½¿è½® -item.itemIngotBloodSteel.name=血钢锭 -item.itemDustBloodSteel.name=血钢粉 -item.itemDustTinyBloodSteel.name=å°æ’®è¡€é’¢ç²‰ -item.itemDustSmallBloodSteel.name=å°å †è¡€é’¢ç²‰ -item.itemNuggetBloodSteel.name=血钢粒 -item.itemPlateBloodSteel.name=è¡€é’¢æ¿ -item.itemPlateDoubleBloodSteel.name=åŒé‡è¡€é’¢æ¿ -item.itemBoltBloodSteel.name=血钢螺栓 -item.itemRodBloodSteel.name=è¡€é’¢æ† -item.itemRodLongBloodSteel.name=é•¿è¡€é’¢æ† -item.itemRingBloodSteel.name=血钢环 -item.itemScrewBloodSteel.name=è¡€é’¢èžºä¸ -item.itemRotorBloodSteel.name=è¡€é’¢è½¬å­ -item.itemGearBloodSteel.name=血钢齿轮 -item.itemIngotZeron100.name=å¡žé¾™-100é”­ -item.itemHotIngotZeron100.name=热塞龙-100é”­ -item.itemDustZeron100.name=å¡žé¾™-100粉 -item.itemDustTinyZeron100.name=å°æ’®å¡žé¾™-100粉 -item.itemDustSmallZeron100.name=å°å †å¡žé¾™-100粉 -item.itemNuggetZeron100.name=å¡žé¾™-100ç²’ -item.itemPlateZeron100.name=å¡žé¾™-100æ¿ -item.itemPlateDoubleZeron100.name=åŒé‡å¡žé¾™-100æ¿ -item.itemBoltZeron100.name=å¡žé¾™-100螺栓 -item.itemRodZeron100.name=å¡žé¾™-100æ† -item.itemRodLongZeron100.name=é•¿å¡žé¾™100æ† -item.itemRingZeron100.name=å¡žé¾™-100环 -item.itemScrewZeron100.name=å¡žé¾™-100èžºä¸ -item.itemRotorZeron100.name=å¡žé¾™-100è½¬å­ -item.itemGearZeron100.name=å¡žé¾™-100齿轮 -item.itemIngotTumbaga.name=铜金åˆé‡‘é”­ -item.itemDustTumbaga.name=铜金åˆé‡‘粉 -item.itemDustTinyTumbaga.name=å°æ’®é“œé‡‘åˆé‡‘粉 -item.itemDustSmallTumbaga.name=å°å †é“œé‡‘åˆé‡‘粉 -item.itemNuggetTumbaga.name=铜金åˆé‡‘ç²’ -item.itemPlateTumbaga.name=铜金åˆé‡‘æ¿ -item.itemPlateDoubleTumbaga.name=åŒé‡é“œé‡‘åˆé‡‘æ¿ -item.itemBoltTumbaga.name=铜金åˆé‡‘螺栓 -item.itemRodTumbaga.name=铜金åˆé‡‘æ† -item.itemRodLongTumbaga.name=长铜金åˆé‡‘æ† -item.itemRingTumbaga.name=铜金åˆé‡‘环 -item.itemScrewTumbaga.name=铜金åˆé‡‘èžºä¸ -item.itemRotorTumbaga.name=铜金åˆé‡‘è½¬å­ -item.itemGearTumbaga.name=铜金åˆé‡‘齿轮 -item.itemIngotPotin.name=ç²—é’é“œåˆé‡‘é”­ -item.itemDustPotin.name=ç²—é’é“œåˆé‡‘粉 -item.itemDustTinyPotin.name=å°æ’®ç²—é’é“œåˆé‡‘粉 -item.itemDustSmallPotin.name=å°å †ç²—é’é“œåˆé‡‘粉 -item.itemNuggetPotin.name=ç²—é’é“œåˆé‡‘ç²’ -item.itemPlatePotin.name=ç²—é’é“œåˆé‡‘æ¿ -item.itemPlateDoublePotin.name=åŒé‡ç²—é’é“œåˆé‡‘æ¿ -item.itemBoltPotin.name=ç²—é’é“œåˆé‡‘螺栓 -item.itemRodPotin.name=ç²—é’é“œåˆé‡‘æ† -item.itemRodLongPotin.name=é•¿ç²—é’é“œåˆé‡‘æ† -item.itemRingPotin.name=ç²—é’é“œåˆé‡‘环 -item.itemScrewPotin.name=ç²—é’é“œåˆé‡‘èžºä¸ -item.itemRotorPotin.name=ç²—é’é“œåˆé‡‘è½¬å­ -item.itemGearPotin.name=ç²—é’é“œåˆé‡‘齿轮 -item.itemIngotStaballoy.name=è´«é“€åˆé‡‘é”­ -item.itemHotIngotStaballoy.name=热贫铀åˆé‡‘é”­ -item.itemDustStaballoy.name=è´«é“€åˆé‡‘粉 -item.itemDustTinyStaballoy.name=å°æ’®è´«é“€åˆé‡‘粉 -item.itemDustSmallStaballoy.name=å°å †è´«é“€åˆé‡‘粉 -item.itemNuggetStaballoy.name=è´«é“€åˆé‡‘ç²’ -item.itemPlateStaballoy.name=è´«é“€åˆé‡‘æ¿ -item.itemPlateDoubleStaballoy.name=åŒé‡è´«é“€åˆé‡‘æ¿ -item.itemBoltStaballoy.name=è´«é“€åˆé‡‘螺栓 -item.itemRodStaballoy.name=è´«é“€åˆé‡‘æ† -item.itemRodLongStaballoy.name=é•¿è´«é“€åˆé‡‘æ† -item.itemRingStaballoy.name=è´«é“€åˆé‡‘环 -item.itemScrewStaballoy.name=è´«é“€åˆé‡‘èžºä¸ -item.itemRotorStaballoy.name=è´«é“€åˆé‡‘è½¬å­ -item.itemGearStaballoy.name=è´«é“€åˆé‡‘齿轮 -item.itemIngotTantalloy60.name=钽钨åˆé‡‘-60é”­ -item.itemHotIngotTantalloy60.name=热钽钨åˆé‡‘-60é”­ -item.itemDustTantalloy60.name=钽钨åˆé‡‘-60粉 -item.itemDustTinyTantalloy60.name=å°æ’®é’½é’¨åˆé‡‘-60粉 -item.itemDustSmallTantalloy60.name=å°å †é’½é’¨åˆé‡‘-60粉 -item.itemNuggetTantalloy60.name=钽钨åˆé‡‘-60ç²’ -item.itemPlateTantalloy60.name=钽钨åˆé‡‘-60æ¿ -item.itemPlateDoubleTantalloy60.name=åŒé‡é’½é’¨åˆé‡‘-60æ¿ -item.itemBoltTantalloy60.name=钽钨åˆé‡‘-60螺栓 -item.itemRodTantalloy60.name=钽钨åˆé‡‘-60æ† -item.itemRodLongTantalloy60.name=长钽钨åˆé‡‘-60æ† -item.itemRingTantalloy60.name=钽钨åˆé‡‘-60环 -item.itemScrewTantalloy60.name=钽钨åˆé‡‘-60èžºä¸ -item.itemRotorTantalloy60.name=钽钨åˆé‡‘-60è½¬å­ -item.itemGearTantalloy60.name=钽钨åˆé‡‘-60齿轮 -item.itemIngotTantalloy61.name=钽钨åˆé‡‘-61é”­ -item.itemHotIngotTantalloy61.name=热钽钨åˆé‡‘-61é”­ -item.itemDustTantalloy61.name=钽钨åˆé‡‘-61粉 -item.itemDustTinyTantalloy61.name=å°æ’®é’½é’¨åˆé‡‘-61粉 -item.itemDustSmallTantalloy61.name=å°å †é’½é’¨åˆé‡‘-61粉 -item.itemNuggetTantalloy61.name=钽钨åˆé‡‘-61ç²’ -item.itemPlateTantalloy61.name=钽钨åˆé‡‘-61æ¿ -item.itemPlateDoubleTantalloy61.name=åŒé‡é’½é’¨åˆé‡‘-61æ¿ -item.itemBoltTantalloy61.name=钽钨åˆé‡‘-61螺栓 -item.itemRodTantalloy61.name=钽钨åˆé‡‘-61æ† -item.itemRodLongTantalloy61.name=长钽钨åˆé‡‘-61æ† -item.itemRingTantalloy61.name=钽钨åˆé‡‘-61环 -item.itemScrewTantalloy61.name=钽钨åˆé‡‘-61èžºä¸ -item.itemRotorTantalloy61.name=钽钨åˆé‡‘-61è½¬å­ -item.itemGearTantalloy61.name=钽钨åˆé‡‘-61齿轮 -item.itemIngotInconel625.name=é•é“¬åŸºåˆé‡‘-625é”­ -item.itemHotIngotInconel625.name=热é•é“¬åŸºåˆé‡‘-625é”­ -item.itemDustInconel625.name=é•é“¬åŸºåˆé‡‘-625粉 -item.itemDustTinyInconel625.name=å°æ’®é•é“¬åŸºåˆé‡‘-625粉 -item.itemDustSmallInconel625.name=å°å †é•é“¬åŸºåˆé‡‘-625粉 -item.itemNuggetInconel625.name=é•é“¬åŸºåˆé‡‘-625ç²’ -item.itemPlateInconel625.name=é•é“¬åŸºåˆé‡‘-625æ¿ -item.itemPlateDoubleInconel625.name=åŒé‡é•é“¬åŸºåˆé‡‘-625æ¿ -item.itemBoltInconel625.name=é•é“¬åŸºåˆé‡‘-625螺栓 -item.itemRodInconel625.name=é•é“¬åŸºåˆé‡‘-625æ† -item.itemRodLongInconel625.name=é•¿é•é“¬åŸºåˆé‡‘-625æ† -item.itemRingInconel625.name=é•é“¬åŸºåˆé‡‘-625环 -item.itemScrewInconel625.name=é•é“¬åŸºåˆé‡‘-625èžºä¸ -item.itemRotorInconel625.name=é•é“¬åŸºåˆé‡‘-625è½¬å­ -item.itemGearInconel625.name=é•é“¬åŸºåˆé‡‘-625齿轮 -item.itemIngotInconel690.name=é•é“¬åŸºåˆé‡‘-690é”­ -item.itemHotIngotInconel690.name=热é•é“¬åŸºåˆé‡‘-690é”­ -item.itemDustInconel690.name=é•é“¬åŸºåˆé‡‘-690粉 -item.itemDustTinyInconel690.name=å°æ’®é•é“¬åŸºåˆé‡‘-690粉 -item.itemDustSmallInconel690.name=å°å †é•é“¬åŸºåˆé‡‘-690粉 -item.itemNuggetInconel690.name=é•é“¬åŸºåˆé‡‘-690ç²’ -item.itemPlateInconel690.name=é•é“¬åŸºåˆé‡‘-690æ¿ -item.itemPlateDoubleInconel690.name=åŒé‡é•é“¬åŸºåˆé‡‘-690æ¿ -item.itemBoltInconel690.name=é•é“¬åŸºåˆé‡‘-690螺栓 -item.itemRodInconel690.name=é•é“¬åŸºåˆé‡‘-690æ† -item.itemRodLongInconel690.name=é•¿é•é“¬åŸºåˆé‡‘-690æ† -item.itemRingInconel690.name=é•é“¬åŸºåˆé‡‘-690环 -item.itemScrewInconel690.name=é•é“¬åŸºåˆé‡‘-690èžºä¸ -item.itemRotorInconel690.name=é•é“¬åŸºåˆé‡‘-690è½¬å­ -item.itemGearInconel690.name=é•é“¬åŸºåˆé‡‘-690齿轮 -item.itemIngotInconel792.name=é•é“¬åŸºåˆé‡‘-792é”­ -item.itemHotIngotInconel792.name=热é•é“¬åŸºåˆé‡‘-792é”­ -item.itemDustInconel792.name=é•é“¬åŸºåˆé‡‘-792粉 -item.itemDustTinyInconel792.name=å°æ’®é•é“¬åŸºåˆé‡‘-792粉 -item.itemDustSmallInconel792.name=å°å †é•é“¬åŸºåˆé‡‘-792粉 -item.itemNuggetInconel792.name=é•é“¬åŸºåˆé‡‘-792ç²’ -item.itemPlateInconel792.name=é•é“¬åŸºåˆé‡‘-792æ¿ -item.itemPlateDoubleInconel792.name=åŒé‡é•é“¬åŸºåˆé‡‘-792æ¿ -item.itemBoltInconel792.name=é•é“¬åŸºåˆé‡‘-792螺栓 -item.itemRodInconel792.name=é•é“¬åŸºåˆé‡‘-792æ† -item.itemRodLongInconel792.name=é•¿é•é“¬åŸºåˆé‡‘-792æ† -item.itemRingInconel792.name=é•é“¬åŸºåˆé‡‘-792环 -item.itemScrewInconel792.name=é•é“¬åŸºåˆé‡‘-792èžºä¸ -item.itemRotorInconel792.name=é•é“¬åŸºåˆé‡‘-792è½¬å­ -item.itemGearInconel792.name=é•é“¬åŸºåˆé‡‘-792齿轮 -item.itemDustEglinSteelBaseCompound.name=埃格林钢基础化åˆç‰©ç²‰ -item.itemDustTinyEglinSteelBaseCompound.name=å°æ’®åŸƒæ ¼æž—钢基础化åˆç‰©ç²‰ -item.itemDustSmallEglinSteelBaseCompound.name=å°å †åŸƒæ ¼æž—钢基础化åˆç‰©ç²‰ -item.itemIngotEglinSteel.name=埃格林钢锭 -item.itemDustEglinSteel.name=埃格林钢粉 -item.itemDustTinyEglinSteel.name=å°æ’®åŸƒæ ¼æž—钢粉 -item.itemDustSmallEglinSteel.name=å°å †åŸƒæ ¼æž—钢粉 -item.itemNuggetEglinSteel.name=埃格林钢粒 -item.itemPlateEglinSteel.name=åŸƒæ ¼æž—é’¢æ¿ -item.itemPlateDoubleEglinSteel.name=åŒé‡åŸƒæ ¼æž—é’¢æ¿ -item.itemBoltEglinSteel.name=埃格林钢螺栓 -item.itemRodEglinSteel.name=åŸƒæ ¼æž—é’¢æ† -item.itemRodLongEglinSteel.name=é•¿åŸƒæ ¼æž—é’¢æ† -item.itemRingEglinSteel.name=埃格林钢环 -item.itemScrewEglinSteel.name=åŸƒæ ¼æž—é’¢èžºä¸ -item.itemRotorEglinSteel.name=åŸƒæ ¼æž—é’¢è½¬å­ -item.itemGearEglinSteel.name=埃格林钢齿轮 -item.itemIngotMaragingSteel250.name=马æ°ä½“时效钢250é”­ -item.itemHotIngotMaragingSteel250.name=热马æ°ä½“时效钢250é”­ -item.itemDustMaragingSteel250.name=马æ°ä½“时效钢250粉 -item.itemDustTinyMaragingSteel250.name=å°æ’®é©¬æ°ä½“时效钢250粉 -item.itemDustSmallMaragingSteel250.name=å°å †é©¬æ°ä½“时效钢250粉 -item.itemNuggetMaragingSteel250.name=马æ°ä½“时效钢250ç²’ -item.itemPlateMaragingSteel250.name=马æ°ä½“时效钢250æ¿ -item.itemPlateDoubleMaragingSteel250.name=åŒé‡é©¬æ°ä½“时效钢250æ¿ -item.itemBoltMaragingSteel250.name=马æ°ä½“时效钢250螺栓 -item.itemRodMaragingSteel250.name=马æ°ä½“时效钢250æ† -item.itemRodLongMaragingSteel250.name=长马æ°ä½“时效钢250æ† -item.itemRingMaragingSteel250.name=马æ°ä½“时效钢250环 -item.itemScrewMaragingSteel250.name=马æ°ä½“时效钢250èžºä¸ -item.itemRotorMaragingSteel250.name=马æ°ä½“时效钢250è½¬å­ -item.itemGearMaragingSteel250.name=马æ°ä½“时效钢250齿轮 -item.itemIngotMaragingSteel300.name=马æ°ä½“时效钢300é”­ -item.itemHotIngotMaragingSteel300.name=热马æ°ä½“时效钢300é”­ -item.itemDustMaragingSteel300.name=马æ°ä½“时效钢300粉 -item.itemDustTinyMaragingSteel300.name=å°æ’®é©¬æ°ä½“时效钢300粉 -item.itemDustSmallMaragingSteel300.name=å°å †é©¬æ°ä½“时效钢300粉 -item.itemNuggetMaragingSteel300.name=马æ°ä½“时效钢300ç²’ -item.itemPlateMaragingSteel300.name=马æ°ä½“时效钢300æ¿ -item.itemPlateDoubleMaragingSteel300.name=åŒé‡é©¬æ°ä½“时效钢300æ¿ -item.itemBoltMaragingSteel300.name=马æ°ä½“时效钢300螺栓 -item.itemRodMaragingSteel300.name=马æ°ä½“时效钢300æ† -item.itemRodLongMaragingSteel300.name=长马æ°ä½“时效钢300æ† -item.itemRingMaragingSteel300.name=马æ°ä½“时效钢300环 -item.itemScrewMaragingSteel300.name=马æ°ä½“时效钢300èžºä¸ -item.itemRotorMaragingSteel300.name=马æ°ä½“时效钢300è½¬å­ -item.itemGearMaragingSteel300.name=马æ°ä½“时效钢300齿轮 -item.itemIngotMaragingSteel350.name=马æ°ä½“时效钢350é”­ -item.itemHotIngotMaragingSteel350.name=热马æ°ä½“时效钢350é”­ -item.itemDustMaragingSteel350.name=马æ°ä½“时效钢350粉 -item.itemDustTinyMaragingSteel350.name=å°æ’®é©¬æ°ä½“时效钢350粉 -item.itemDustSmallMaragingSteel350.name=å°å †é©¬æ°ä½“时效钢350粉 -item.itemNuggetMaragingSteel350.name=马æ°ä½“时效钢350ç²’ -item.itemPlateMaragingSteel350.name=马æ°ä½“时效钢350æ¿ -item.itemPlateDoubleMaragingSteel350.name=åŒé‡é©¬æ°ä½“时效钢350æ¿ -item.itemBoltMaragingSteel350.name=马æ°ä½“时效钢350螺栓 -item.itemRodMaragingSteel350.name=马æ°ä½“时效钢350æ† -item.itemRodLongMaragingSteel350.name=长马æ°ä½“时效钢350æ† -item.itemRingMaragingSteel350.name=马æ°ä½“时效钢350环 -item.itemScrewMaragingSteel350.name=马æ°ä½“时效钢350èžºä¸ -item.itemRotorMaragingSteel350.name=马æ°ä½“时效钢350è½¬å­ -item.itemGearMaragingSteel350.name=马æ°ä½“时效钢350齿轮 -item.itemIngotStellite.name=铬钴锰钛åˆé‡‘é”­ -item.itemHotIngotStellite.name=热铬钴锰钛åˆé‡‘é”­ -item.itemDustStellite.name=铬钴锰钛åˆé‡‘粉 -item.itemDustTinyStellite.name=å°æ’®é“¬é’´é”°é’›åˆé‡‘粉 -item.itemDustSmallStellite.name=å°å †é“¬é’´é”°é’›åˆé‡‘粉 -item.itemNuggetStellite.name=铬钴锰钛åˆé‡‘ç²’ -item.itemPlateStellite.name=铬钴锰钛åˆé‡‘æ¿ -item.itemPlateDoubleStellite.name=åŒé‡é“¬é’´é”°é’›åˆé‡‘æ¿ -item.itemBoltStellite.name=铬钴锰钛åˆé‡‘螺栓 -item.itemRodStellite.name=铬钴锰钛åˆé‡‘æ† -item.itemRodLongStellite.name=长铬钴锰钛åˆé‡‘æ† -item.itemRingStellite.name=铬钴锰钛åˆé‡‘环 -item.itemScrewStellite.name=铬钴锰钛åˆé‡‘èžºä¸ -item.itemRotorStellite.name=铬钴锰钛åˆé‡‘è½¬å­ -item.itemGearStellite.name=铬钴锰钛åˆé‡‘齿轮 -item.itemIngotTalonite.name=铬钴磷酸ç›åˆé‡‘é”­ -item.itemDustTalonite.name=铬钴磷酸ç›åˆé‡‘粉 -item.itemDustTinyTalonite.name=å°æ’®é“¬é’´ç£·é…¸ç›åˆé‡‘粉 -item.itemDustSmallTalonite.name=å°å †é“¬é’´ç£·é…¸ç›åˆé‡‘粉 -item.itemNuggetTalonite.name=铬钴磷酸ç›åˆé‡‘ç²’ -item.itemPlateTalonite.name=铬钴磷酸ç›åˆé‡‘æ¿ -item.itemPlateDoubleTalonite.name=åŒé‡é“¬é’´ç£·é…¸ç›åˆé‡‘æ¿ -item.itemBoltTalonite.name=铬钴磷酸ç›åˆé‡‘螺栓 -item.itemRodTalonite.name=铬钴磷酸ç›åˆé‡‘æ† -item.itemRodLongTalonite.name=长铬钴磷酸ç›åˆé‡‘æ† -item.itemRingTalonite.name=铬钴磷酸ç›åˆé‡‘环 -item.itemScrewTalonite.name=铬钴磷酸ç›åˆé‡‘èžºä¸ -item.itemRotorTalonite.name=铬钴磷酸ç›åˆé‡‘è½¬å­ -item.itemGearTalonite.name=铬钴磷酸ç›åˆé‡‘齿轮 -item.itemIngotHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wé”­ -item.itemDustHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W粉 -item.itemDustTinyHastelloyW.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-W粉 -item.itemDustSmallHastelloyW.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-W粉 -item.itemNuggetHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wç²’ -item.itemPlateHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wæ¿ -item.itemPlateDoubleHastelloyW.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-Wæ¿ -item.itemBoltHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W螺栓 -item.itemRodHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wæ† -item.itemRodLongHastelloyW.name=长哈斯特洛ä¾åˆé‡‘-Wæ† -item.itemRingHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W环 -item.itemScrewHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wèžºä¸ -item.itemRotorHastelloyW.name=哈斯特洛ä¾åˆé‡‘-Wè½¬å­ -item.itemGearHastelloyW.name=哈斯特洛ä¾åˆé‡‘-W齿轮 -item.itemIngotHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xé”­ -item.itemDustHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X粉 -item.itemDustTinyHastelloyX.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-X粉 -item.itemDustSmallHastelloyX.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-X粉 -item.itemNuggetHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xç²’ -item.itemPlateHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xæ¿ -item.itemPlateDoubleHastelloyX.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-Xæ¿ -item.itemBoltHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X螺栓 -item.itemRodHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xæ† -item.itemRodLongHastelloyX.name=长哈斯特洛ä¾åˆé‡‘-Xæ† -item.itemRingHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X环 -item.itemScrewHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xèžºä¸ -item.itemRotorHastelloyX.name=哈斯特洛ä¾åˆé‡‘-Xè½¬å­ -item.itemGearHastelloyX.name=哈斯特洛ä¾åˆé‡‘-X齿轮 -item.itemIngotHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276é”­ -item.itemHotIngotHastelloyC276.name=热哈斯特洛ä¾åˆé‡‘-C276é”­ -item.itemDustHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276粉 -item.itemDustTinyHastelloyC276.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-C276粉 -item.itemDustSmallHastelloyC276.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-C276粉 -item.itemNuggetHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276ç²’ -item.itemPlateHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276æ¿ -item.itemPlateDoubleHastelloyC276.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-C276æ¿ -item.itemBoltHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276螺栓 -item.itemRodHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276æ† -item.itemRodLongHastelloyC276.name=长哈斯特洛ä¾åˆé‡‘-C276æ† -item.itemRingHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276环 -item.itemScrewHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276èžºä¸ -item.itemRotorHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276è½¬å­ -item.itemGearHastelloyC276.name=哈斯特洛ä¾åˆé‡‘-C276齿轮 -item.itemIngotHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Né”­ -item.itemHotIngotHastelloyN.name=热哈斯特洛ä¾åˆé‡‘-Né”­ -item.itemDustHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N粉 -item.itemDustTinyHastelloyN.name=å°æ’®å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-N粉 -item.itemDustSmallHastelloyN.name=å°å †å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-N粉 -item.itemNuggetHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nç²’ -item.itemPlateHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Næ¿ -item.itemPlateDoubleHastelloyN.name=åŒé‡å“ˆæ–¯ç‰¹æ´›ä¾åˆé‡‘-Næ¿ -item.itemBoltHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N螺栓 -item.itemRodHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Næ† -item.itemRodLongHastelloyN.name=长哈斯特洛ä¾åˆé‡‘-Næ† -item.itemRingHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N环 -item.itemScrewHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nèžºä¸ -item.itemRotorHastelloyN.name=哈斯特洛ä¾åˆé‡‘-Nè½¬å­ -item.itemGearHastelloyN.name=哈斯特洛ä¾åˆé‡‘-N齿轮 -item.itemIngotIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020é”­ -item.itemDustIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020粉 -item.itemDustTinyIncoloy020.name=å°æ’®è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020粉 -item.itemDustSmallIncoloy020.name=å°å †è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020粉 -item.itemNuggetIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020ç²’ -item.itemPlateIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ¿ -item.itemPlateDoubleIncoloy020.name=åŒé‡è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ¿ -item.itemBoltIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020螺栓 -item.itemRodIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ† -item.itemRodLongIncoloy020.name=é•¿è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020æ† -item.itemRingIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020环 -item.itemScrewIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020èžºä¸ -item.itemRotorIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020è½¬å­ -item.itemGearIncoloy020.name=è€çƒ­è€çƒ­é“¬é“åˆé‡‘-020齿轮 -item.itemIngotIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSé”­ -item.itemDustIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS粉 -item.itemDustTinyIncoloyDS.name=å°æ’®è€çƒ­é“¬é“åˆé‡‘-DS粉 -item.itemDustSmallIncoloyDS.name=å°å †è€çƒ­é“¬é“åˆé‡‘-DS粉 -item.itemNuggetIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSç²’ -item.itemPlateIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSæ¿ -item.itemPlateDoubleIncoloyDS.name=åŒé‡è€çƒ­é“¬é“åˆé‡‘-DSæ¿ -item.itemBoltIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS螺栓 -item.itemRodIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSæ† -item.itemRodLongIncoloyDS.name=é•¿è€çƒ­é“¬é“åˆé‡‘-DSæ† -item.itemRingIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS环 -item.itemScrewIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSèžºä¸ -item.itemRotorIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DSè½¬å­ -item.itemGearIncoloyDS.name=è€çƒ­é“¬é“åˆé‡‘-DS齿轮 -item.itemIngotIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956é”­ -item.itemHotIngotIncoloyMA956.name=热è€çƒ­é“¬é“åˆé‡‘-MA956é”­ -item.itemDustIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956粉 -item.itemDustTinyIncoloyMA956.name=å°æ’®è€çƒ­é“¬é“åˆé‡‘-MA956粉 -item.itemDustSmallIncoloyMA956.name=å°å †è€çƒ­é“¬é“åˆé‡‘-MA956粉 -item.itemNuggetIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956ç²’ -item.itemPlateIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956æ¿ -item.itemPlateDoubleIncoloyMA956.name=åŒé‡è€çƒ­é“¬é“åˆé‡‘-MA956æ¿ -item.itemBoltIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956螺栓 -item.itemRodIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956æ† -item.itemRodLongIncoloyMA956.name=é•¿è€çƒ­é“¬é“åˆé‡‘-MA956æ† -item.itemRingIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956环 -item.itemScrewIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956èžºä¸ -item.itemRotorIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956è½¬å­ -item.itemGearIncoloyMA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956齿轮 -item.itemIngotGrisium.name=ç°é’›åˆé‡‘é”­ -item.itemHotIngotGrisium.name=热ç°é’›åˆé‡‘é”­ -item.itemDustGrisium.name=ç°é’›åˆé‡‘粉 -item.itemDustTinyGrisium.name=å°æ’®ç°é’›åˆé‡‘粉 -item.itemDustSmallGrisium.name=å°å †ç°é’›åˆé‡‘粉 -item.itemNuggetGrisium.name=ç°é’›åˆé‡‘ç²’ -item.itemPlateGrisium.name=ç°é’›åˆé‡‘æ¿ -item.itemPlateDoubleGrisium.name=åŒé‡ç°é’›åˆé‡‘æ¿ -item.itemBoltGrisium.name=ç°é’›åˆé‡‘螺栓 -item.itemRodGrisium.name=ç°é’›åˆé‡‘æ† -item.itemRodLongGrisium.name=é•¿ç°é’›åˆé‡‘æ† -item.itemRingGrisium.name=ç°é’›åˆé‡‘环 -item.itemScrewGrisium.name=ç°é’›åˆé‡‘èžºä¸ -item.itemRotorGrisium.name=ç°é’›åˆé‡‘è½¬å­ -item.itemGearGrisium.name=ç°é’›åˆé‡‘齿轮 -item.itemIngotHG1223.name=HG-1223é”­ -item.itemDustHG1223.name=HG-1223粉 -item.itemDustTinyHG1223.name=å°æ’®HG-1223粉 -item.itemDustSmallHG1223.name=å°å †HG-1223粉 -item.itemNuggetHG1223.name=HG-1223ç²’ -item.itemPlateHG1223.name=HG-1223æ¿ -item.itemPlateDoubleHG1223.name=åŒé‡HG-1223æ¿ -item.itemIngotTrinium.name=三元金属锭 -item.itemDustTrinium.name=三元金属粉 -item.itemDustTinyTrinium.name=å°æ’®ä¸‰å…ƒé‡‘属粉 -item.itemDustSmallTrinium.name=å°å †ä¸‰å…ƒé‡‘属粉 -item.itemNuggetTrinium.name=三元金属粒 -item.itemPlateTrinium.name=ä¸‰å…ƒé‡‘å±žæ¿ -item.itemPlateDoubleTrinium.name=åŒé‡ä¸‰å…ƒé‡‘å±žæ¿ -item.itemIngotRefinedTrinium.name=精制三元金属锭 -item.itemDustRefinedTrinium.name=精制三元金属粉 -item.itemDustTinyRefinedTrinium.name=å°æ’®ç²¾åˆ¶ä¸‰å…ƒé‡‘属粉 -item.itemDustSmallRefinedTrinium.name=å°å †ç²¾åˆ¶ä¸‰å…ƒé‡‘属粉 -item.itemNuggetRefinedTrinium.name=精制三元金属粒 -item.itemPlateRefinedTrinium.name=ç²¾åˆ¶ä¸‰å…ƒé‡‘å±žæ¿ -item.itemPlateDoubleRefinedTrinium.name=åŒé‡ç²¾åˆ¶ä¸‰å…ƒé‡‘å±žæ¿ -item.itemIngotTriniumTitaniumAlloy.name=三元钛åˆé‡‘é”­ -item.itemHotIngotTriniumTitaniumAlloy.name=热三元钛åˆé‡‘é”­ -item.itemDustTriniumTitaniumAlloy.name=三元钛åˆé‡‘粉 -item.itemDustTinyTriniumTitaniumAlloy.name=å°æ’®ä¸‰å…ƒé’›åˆé‡‘粉 -item.itemDustSmallTriniumTitaniumAlloy.name=å°å †ä¸‰å…ƒé’›åˆé‡‘粉 -item.itemNuggetTriniumTitaniumAlloy.name=三元钛åˆé‡‘ç²’ -item.itemPlateTriniumTitaniumAlloy.name=三元钛åˆé‡‘æ¿ -item.itemPlateDoubleTriniumTitaniumAlloy.name=åŒé‡ä¸‰å…ƒé’›åˆé‡‘æ¿ -item.itemBoltTriniumTitaniumAlloy.name=三元钛åˆé‡‘螺栓 -item.itemRodTriniumTitaniumAlloy.name=三元钛åˆé‡‘æ† -item.itemRodLongTriniumTitaniumAlloy.name=长三元钛åˆé‡‘æ† -item.itemRingTriniumTitaniumAlloy.name=三元钛åˆé‡‘环 -item.itemScrewTriniumTitaniumAlloy.name=三元钛åˆé‡‘èžºä¸ -item.itemRotorTriniumTitaniumAlloy.name=三元钛åˆé‡‘è½¬å­ -item.itemGearTriniumTitaniumAlloy.name=三元钛åˆé‡‘齿轮 -item.itemIngotTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘é”­ -item.itemDustTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘粉 -item.itemDustTinyTriniumNaquadahAlloy.name=å°æ’®ä¸‰å…ƒç¡…岩åˆé‡‘粉 -item.itemDustSmallTriniumNaquadahAlloy.name=å°å †ä¸‰å…ƒç¡…岩åˆé‡‘粉 -item.itemNuggetTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘ç²’ -item.itemPlateTriniumNaquadahAlloy.name=三元硅岩åˆé‡‘æ¿ -item.itemPlateDoubleTriniumNaquadahAlloy.name=åŒé‡ä¸‰å…ƒç¡…岩åˆé‡‘æ¿ -item.itemIngotTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘é”­ -item.itemHotIngotTriniumNaquadahCarbonite.name=热碳化三元硅岩åˆé‡‘é”­ -item.itemDustTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘粉 -item.itemDustTinyTriniumNaquadahCarbonite.name=å°æ’®ç¢³åŒ–三元硅岩åˆé‡‘粉 -item.itemDustSmallTriniumNaquadahCarbonite.name=å°å †ç¢³åŒ–三元硅岩åˆé‡‘粉 -item.itemNuggetTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘ç²’ -item.itemPlateTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘æ¿ -item.itemPlateDoubleTriniumNaquadahCarbonite.name=åŒé‡ç¢³åŒ–三元硅岩åˆé‡‘æ¿ -item.itemBoltTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘螺栓 -item.itemRodTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘æ† -item.itemRodLongTriniumNaquadahCarbonite.name=长碳化三元硅岩åˆé‡‘æ† -item.itemRingTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘环 -item.itemScrewTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘èžºä¸ -item.itemRotorTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘è½¬å­ -item.itemGearTriniumNaquadahCarbonite.name=碳化三元硅岩åˆé‡‘齿轮 -item.itemIngotQuantum.name=é‡å­åˆé‡‘é”­ -item.itemHotIngotQuantum.name=热é‡å­åˆé‡‘é”­ -item.itemDustQuantum.name=é‡å­åˆé‡‘粉 -item.itemDustTinyQuantum.name=å°æ’®é‡å­åˆé‡‘粉 -item.itemDustSmallQuantum.name=å°å †é‡å­åˆé‡‘粉 -item.itemNuggetQuantum.name=é‡å­åˆé‡‘ç²’ -item.itemPlateQuantum.name=é‡å­åˆé‡‘æ¿ -item.itemPlateDoubleQuantum.name=åŒé‡é‡å­åˆé‡‘æ¿ -item.itemBoltQuantum.name=é‡å­åˆé‡‘螺栓 -item.itemRodQuantum.name=é‡å­åˆé‡‘æ† -item.itemRodLongQuantum.name=é•¿é‡å­åˆé‡‘æ† -item.itemRingQuantum.name=é‡å­åˆé‡‘环 -item.itemScrewQuantum.name=é‡å­åˆé‡‘èžºä¸ -item.itemRotorQuantum.name=é‡å­åˆé‡‘è½¬å­ -item.itemGearQuantum.name=é‡å­åˆé‡‘齿轮 -item.itemDustFluorite.name=氟石粉 -item.itemDustTinyFluorite.name=å°æ’®æ°ŸçŸ³ç²‰ -item.itemDustSmallFluorite.name=å°å †æ°ŸçŸ³ç²‰ -item.crushedFluorite.name=粉碎的氟石矿石 -item.crushedCentrifugedFluorite.name=离心氟石矿石 -item.crushedPurifiedFluorite.name=洗净的氟石矿石 -item.dustImpureFluorite.name=å«æ‚氟石粉 -item.dustPureFluorite.name=æ´å‡€æ°ŸçŸ³ç²‰ -item.itemDustCrocoite.name=赤铅矿粉 -item.itemDustTinyCrocoite.name=å°æ’®èµ¤é“…矿粉 -item.itemDustSmallCrocoite.name=å°å †èµ¤é“…矿粉 -item.crushedCrocoite.name=粉碎的赤铅矿矿石 -item.crushedCentrifugedCrocoite.name=离心赤铅矿矿石 -item.crushedPurifiedCrocoite.name=洗净的赤铅矿矿石 -item.dustImpureCrocoite.name=å«æ‚赤铅矿粉 -item.dustPureCrocoite.name=æ´å‡€èµ¤é“…矿粉 -item.itemDustGeikielite.name=é•é’›çŸ¿ç²‰ -item.itemDustTinyGeikielite.name=å°æ’®é•é’›çŸ¿ç²‰ -item.itemDustSmallGeikielite.name=å°å †é•é’›çŸ¿ç²‰ -item.crushedGeikielite.name=粉碎的é•é’›çŸ¿çŸ¿çŸ³ -item.crushedCentrifugedGeikielite.name=离心é•é’›çŸ¿çŸ¿çŸ³ -item.crushedPurifiedGeikielite.name=洗净的é•é’›çŸ¿çŸ¿çŸ³ -item.dustImpureGeikielite.name=å«æ‚é•é’›çŸ¿ç²‰ -item.dustPureGeikielite.name=æ´å‡€é•é’›çŸ¿ç²‰ -item.itemDustNichromite.name=é•é“¬çŸ¿ç²‰ -item.itemDustTinyNichromite.name=å°æ’®é•é“¬çŸ¿ç²‰ -item.itemDustSmallNichromite.name=å°å †é•é“¬çŸ¿ç²‰ -item.crushedNichromite.name=粉碎的é•é“¬çŸ¿çŸ¿çŸ³ -item.crushedCentrifugedNichromite.name=离心é•é“¬çŸ¿çŸ¿çŸ³ -item.crushedPurifiedNichromite.name=洗净的é•é“¬çŸ¿çŸ¿çŸ³ -item.dustImpureNichromite.name=å«æ‚é•é“¬çŸ¿ç²‰ -item.dustPureNichromite.name=æ´å‡€é•é“¬çŸ¿ç²‰ -item.itemDustTitanite.name=æ¦çŸ³ç²‰ -item.itemDustTinyTitanite.name=å°æ’®æ¦çŸ³ç²‰ -item.itemDustSmallTitanite.name=å°å †æ¦çŸ³ç²‰ -item.crushedTitanite.name=粉碎的æ¦çŸ³çŸ¿çŸ³ -item.crushedCentrifugedTitanite.name=离心æ¦çŸ³çŸ¿çŸ³ -item.crushedPurifiedTitanite.name=洗净的æ¦çŸ³çŸ¿çŸ³ -item.dustImpureTitanite.name=å«æ‚æ¦çŸ³ç²‰ -item.dustPureTitanite.name=æ´å‡€æ¦çŸ³ç²‰ -item.itemDustZimbabweite.name=钛铌铅钠石粉 -item.itemDustTinyZimbabweite.name=å°æ’®é’›é“Œé“…钠石粉 -item.itemDustSmallZimbabweite.name=å°å †é’›é“Œé“…钠石粉 -item.crushedZimbabweite.name=粉碎的钛铌铅钠石矿石 -item.crushedCentrifugedZimbabweite.name=离心钛铌铅钠石矿石 -item.crushedPurifiedZimbabweite.name=洗净的钛铌铅钠石矿石 -item.dustImpureZimbabweite.name=å«æ‚钛铌铅钠石粉 -item.dustPureZimbabweite.name=æ´å‡€é’›é“Œé“…钠石粉 -item.itemDustZirconolite.name=钛锆é’矿粉 -item.itemDustTinyZirconolite.name=å°æ’®é’›é”†é’矿粉 -item.itemDustSmallZirconolite.name=å°å †é’›é”†é’矿粉 -item.crushedZirconolite.name=粉碎的钛锆é’矿矿石 -item.crushedCentrifugedZirconolite.name=离心钛锆é’矿矿石 -item.crushedPurifiedZirconolite.name=洗净的钛锆é’矿矿石 -item.dustImpureZirconolite.name=å«æ‚钛锆é’矿粉 -item.dustPureZirconolite.name=æ´å‡€é’›é”†é’矿粉 -item.itemDustGadoliniteCe.name=ç¡…é“钇矿(Ce)粉 -item.itemDustTinyGadoliniteCe.name=å°æ’®ç¡…é“钇矿(Ce)粉 -item.itemDustSmallGadoliniteCe.name=å°å †ç¡…é“钇矿(Ce)粉 -item.crushedGadoliniteCe.name=粉碎的硅é“钇矿(Ce)矿石 -item.crushedCentrifugedGadoliniteCe.name=离心硅é“钇矿(Ce)矿石 -item.crushedPurifiedGadoliniteCe.name=洗净的硅é“钇矿(Ce)矿石 -item.dustImpureGadoliniteCe.name=å«æ‚ç¡…é“钇矿(Ce)粉 -item.dustPureGadoliniteCe.name=æ´å‡€ç¡…é“钇矿(Ce)粉 -item.itemDustGadoliniteY.name=ç¡…é“钇矿(Y)粉 -item.itemDustTinyGadoliniteY.name=å°æ’®ç¡…é“钇矿(Y)粉 -item.itemDustSmallGadoliniteY.name=å°å †ç¡…é“钇矿(Y)粉 -item.crushedGadoliniteY.name=粉碎的硅é“钇矿(Y)矿石 -item.crushedCentrifugedGadoliniteY.name=离心硅é“钇矿(Y)矿石 -item.crushedPurifiedGadoliniteY.name=洗净的硅é“钇矿(Y)矿石 -item.dustImpureGadoliniteY.name=å«æ‚ç¡…é“钇矿(Y)粉 -item.dustPureGadoliniteY.name=æ´å‡€ç¡…é“钇矿(Y)粉 -item.itemDustLepersonnite.name=绿泥石粉 -item.itemDustTinyLepersonnite.name=å°æ’®ç»¿æ³¥çŸ³ç²‰ -item.itemDustSmallLepersonnite.name=å°å †ç»¿æ³¥çŸ³ç²‰ -item.crushedLepersonnite.name=粉碎的绿泥石矿石 -item.crushedCentrifugedLepersonnite.name=离心绿泥石矿石 -item.crushedPurifiedLepersonnite.name=洗净的绿泥石矿石 -item.dustImpureLepersonnite.name=å«æ‚绿泥石粉 -item.dustPureLepersonnite.name=æ´å‡€ç»¿æ³¥çŸ³ç²‰ -item.itemDustSamarskiteY.name=铌钇矿(Y)粉 -item.itemDustTinySamarskiteY.name=å°æ’®é“Œé’‡çŸ¿(Y)粉 -item.itemDustSmallSamarskiteY.name=å°å †é“Œé’‡çŸ¿(Y)粉 -item.crushedSamarskiteY.name=粉碎的铌钇矿(Y)矿石 -item.crushedCentrifugedSamarskiteY.name=离心铌钇矿(Y)矿石 -item.crushedPurifiedSamarskiteY.name=洗净的铌钇矿(Y)矿石 -item.dustImpureSamarskiteY.name=å«æ‚铌钇矿(Y)粉 -item.dustPureSamarskiteY.name=æ´å‡€é“Œé’‡çŸ¿(Y)粉 -item.itemDustSamarskiteYb.name=铌钇矿(Yb)粉 -item.itemDustTinySamarskiteYb.name=å°æ’®é“Œé’‡çŸ¿(Yb)粉 -item.itemDustSmallSamarskiteYb.name=å°å †é“Œé’‡çŸ¿(Yb)粉 -item.crushedSamarskiteYb.name=粉碎的铌钇矿(Yb)矿石 -item.crushedCentrifugedSamarskiteYb.name=离心铌钇矿(Yb)矿石 -item.crushedPurifiedSamarskiteYb.name=洗净的铌钇矿(Yb)矿石 -item.dustImpureSamarskiteYb.name=å«æ‚铌钇矿(Yb)粉 -item.dustPureSamarskiteYb.name=æ´å‡€é“Œé’‡çŸ¿(Yb)粉 -item.itemDustXenotime.name=磷钇矿粉 -item.itemDustTinyXenotime.name=å°æ’®ç£·é’‡çŸ¿ç²‰ -item.itemDustSmallXenotime.name=å°å †ç£·é’‡çŸ¿ç²‰ -item.crushedXenotime.name=粉碎的磷钇矿矿石 -item.crushedCentrifugedXenotime.name=离心磷钇矿矿石 -item.crushedPurifiedXenotime.name=洗净的磷钇矿矿石 -item.dustImpureXenotime.name=å«æ‚磷钇矿粉 -item.dustPureXenotime.name=æ´å‡€ç£·é’‡çŸ¿ç²‰ -item.itemDustYttriaite.name=钇矿粉 -item.itemDustTinyYttriaite.name=å°æ’®é’‡çŸ¿ç²‰ -item.itemDustSmallYttriaite.name=å°å †é’‡çŸ¿ç²‰ -item.crushedYttriaite.name=粉碎的钇矿矿石 -item.crushedCentrifugedYttriaite.name=离心钇矿矿石 -item.crushedPurifiedYttriaite.name=洗净的钇矿矿石 -item.dustImpureYttriaite.name=å«æ‚钇矿粉 -item.dustPureYttriaite.name=æ´å‡€é’‡çŸ¿ç²‰ -item.itemDustYttrialite.name=ç¡…é’钇矿粉 -item.itemDustTinyYttrialite.name=å°æ’®ç¡…é’钇矿粉 -item.itemDustSmallYttrialite.name=å°å †ç¡…é’钇矿粉 -item.crushedYttrialite.name=粉碎的硅é’钇矿矿石 -item.crushedCentrifugedYttrialite.name=离心硅é’钇矿矿石 -item.crushedPurifiedYttrialite.name=洗净的硅é’钇矿矿石 -item.dustImpureYttrialite.name=å«æ‚ç¡…é’钇矿粉 -item.dustPureYttrialite.name=æ´å‡€ç¡…é’钇矿粉 -item.itemDustYttrocerite.name=铈钇矿粉 -item.itemDustTinyYttrocerite.name=å°æ’®é“ˆé’‡çŸ¿ç²‰ -item.itemDustSmallYttrocerite.name=å°å †é“ˆé’‡çŸ¿ç²‰ -item.crushedYttrocerite.name=粉碎的铈钇矿矿石 -item.crushedCentrifugedYttrocerite.name=离心铈钇矿矿石 -item.crushedPurifiedYttrocerite.name=洗净的铈钇矿矿石 -item.dustImpureYttrocerite.name=å«æ‚铈钇矿粉 -item.dustPureYttrocerite.name=æ´å‡€é“ˆé’‡çŸ¿ç²‰ -item.itemDustZircon.name=锆石粉 -item.itemDustTinyZircon.name=å°æ’®é”†çŸ³ç²‰ -item.itemDustSmallZircon.name=å°å †é”†çŸ³ç²‰ -item.crushedZircon.name=粉碎的锆石矿石 -item.crushedCentrifugedZircon.name=离心锆石矿石 -item.crushedPurifiedZircon.name=洗净的锆石矿石 -item.dustImpureZircon.name=å«æ‚锆石粉 -item.dustPureZircon.name=æ´å‡€é”†çŸ³ç²‰ -item.itemDustPolycrase.name=锗铀钇矿粉 -item.itemDustTinyPolycrase.name=å°æ’®é”—铀钇矿粉 -item.itemDustSmallPolycrase.name=å°å †é”—铀钇矿粉 -item.crushedPolycrase.name=粉碎的锗铀钇矿矿石 -item.crushedCentrifugedPolycrase.name=离心锗铀钇矿矿石 -item.crushedPurifiedPolycrase.name=洗净的锗铀钇矿矿石 -item.dustImpurePolycrase.name=å«æ‚锗铀钇矿粉 -item.dustPurePolycrase.name=æ´å‡€é”—铀钇矿粉 -item.itemDustZircophyllite.name=锆星å¶çŸ³ç²‰ -item.itemDustTinyZircophyllite.name=å°æ’®é”†æ˜Ÿå¶çŸ³ç²‰ -item.itemDustSmallZircophyllite.name=å°å †é”†æ˜Ÿå¶çŸ³ç²‰ -item.crushedZircophyllite.name=粉碎的锆星å¶çŸ³çŸ¿çŸ³ -item.crushedCentrifugedZircophyllite.name=离心锆星å¶çŸ³çŸ¿çŸ³ -item.crushedPurifiedZircophyllite.name=洗净的锆星å¶çŸ³çŸ¿çŸ³ -item.dustImpureZircophyllite.name=å«æ‚锆星å¶çŸ³ç²‰ -item.dustPureZircophyllite.name=æ´å‡€é”†æ˜Ÿå¶çŸ³ç²‰ -item.itemDustZirkelite.name=锆英石粉 -item.itemDustTinyZirkelite.name=å°æ’®é”†è‹±çŸ³ç²‰ -item.itemDustSmallZirkelite.name=å°å †é”†è‹±çŸ³ç²‰ -item.crushedZirkelite.name=粉碎的锆英石矿石 -item.crushedCentrifugedZirkelite.name=离心锆英石矿石 -item.crushedPurifiedZirkelite.name=洗净的锆英石矿石 -item.dustImpureZirkelite.name=å«æ‚锆英石粉 -item.dustPureZirkelite.name=æ´å‡€é”†è‹±çŸ³ç²‰ -item.itemDustLanthaniteLa.name=镧石(La)粉 -item.itemDustTinyLanthaniteLa.name=å°æ’®é•§çŸ³(La)粉 -item.itemDustSmallLanthaniteLa.name=å°å †é•§çŸ³(La)粉 -item.crushedLanthaniteLa.name=粉碎的镧石(La)矿石 -item.crushedCentrifugedLanthaniteLa.name=离心镧石(La)矿石 -item.crushedPurifiedLanthaniteLa.name=洗净的镧石(La)矿石 -item.dustImpureLanthaniteLa.name=å«æ‚镧石(La)粉 -item.dustPureLanthaniteLa.name=æ´å‡€é•§çŸ³(La)粉 -item.itemDustLanthaniteCe.name=镧石(Ce)粉 -item.itemDustTinyLanthaniteCe.name=å°æ’®é•§çŸ³(Ce)粉 -item.itemDustSmallLanthaniteCe.name=å°å †é•§çŸ³(Ce)粉 -item.crushedLanthaniteCe.name=粉碎的镧石(Ce)矿石 -item.crushedCentrifugedLanthaniteCe.name=离心镧石(Ce)矿石 -item.crushedPurifiedLanthaniteCe.name=洗净的镧石(Ce)矿石 -item.dustImpureLanthaniteCe.name=å«æ‚镧石(Ce)粉 -item.dustPureLanthaniteCe.name=æ´å‡€é•§çŸ³(Ce)粉 -item.itemDustLanthaniteNd.name=镧石(Nd)粉 -item.itemDustTinyLanthaniteNd.name=å°æ’®é•§çŸ³(Nd)粉 -item.itemDustSmallLanthaniteNd.name=å°å †é•§çŸ³(Nd)粉 -item.crushedLanthaniteNd.name=粉碎的镧石(Nd)矿石 -item.crushedCentrifugedLanthaniteNd.name=离心镧石(Nd)矿石 -item.crushedPurifiedLanthaniteNd.name=洗净的镧石(Nd)矿石 -item.dustImpureLanthaniteNd.name=å«æ‚镧石(Nd)粉 -item.dustPureLanthaniteNd.name=æ´å‡€é•§çŸ³(Nd)粉 -item.itemDustAgarditeY.name=è±é“矿(Y)粉 -item.itemDustTinyAgarditeY.name=å°æ’®è±é“矿(Y)粉 -item.itemDustSmallAgarditeY.name=å°å †è±é“矿(Y)粉 -item.crushedAgarditeY.name=粉碎的è±é“矿(Y)矿石 -item.crushedCentrifugedAgarditeY.name=离心è±é“矿(Y)矿石 -item.crushedPurifiedAgarditeY.name=洗净的è±é“矿(Y)矿石 -item.dustImpureAgarditeY.name=å«æ‚è±é“矿(Y)粉 -item.dustPureAgarditeY.name=æ´å‡€è±é“矿(Y)粉 -item.itemDustAgarditeCd.name=è±é“矿(Cd)粉 -item.itemDustTinyAgarditeCd.name=å°æ’®è±é“矿(Cd)粉 -item.itemDustSmallAgarditeCd.name=å°å †è±é“矿(Cd)粉 -item.crushedAgarditeCd.name=粉碎的è±é“矿(Cd)矿石 -item.crushedCentrifugedAgarditeCd.name=离心è±é“矿(Cd)矿石 -item.crushedPurifiedAgarditeCd.name=洗净的è±é“矿(Cd)矿石 -item.dustImpureAgarditeCd.name=å«æ‚è±é“矿(Cd)粉 -item.dustPureAgarditeCd.name=æ´å‡€è±é“矿(Cd)粉 -item.itemDustAgarditeLa.name=è±é“矿(La)粉 -item.itemDustTinyAgarditeLa.name=å°æ’®è±é“矿(La)粉 -item.itemDustSmallAgarditeLa.name=å°å †è±é“矿(La)粉 -item.crushedAgarditeLa.name=粉碎的è±é“矿(La)矿石 -item.crushedCentrifugedAgarditeLa.name=离心è±é“矿(La)矿石 -item.crushedPurifiedAgarditeLa.name=洗净的è±é“矿(La)矿石 -item.dustImpureAgarditeLa.name=å«æ‚è±é“矿(La)粉 -item.dustPureAgarditeLa.name=æ´å‡€è±é“矿(La)粉 -item.itemDustAgarditeNd.name=è±é“矿(Nd)粉 -item.itemDustTinyAgarditeNd.name=å°æ’®è±é“矿(Nd)粉 -item.itemDustSmallAgarditeNd.name=å°å †è±é“矿(Nd)粉 -item.crushedAgarditeNd.name=粉碎的è±é“矿(Nd)矿石 -item.crushedCentrifugedAgarditeNd.name=离心è±é“矿(Nd)矿石 -item.crushedPurifiedAgarditeNd.name=洗净的è±é“矿(Nd)矿石 -item.dustImpureAgarditeNd.name=å«æ‚è±é“矿(Nd)粉 -item.dustPureAgarditeNd.name=æ´å‡€è±é“矿(Nd)粉 -item.itemDustHibonite.name=黑é“钙石粉 -item.itemDustTinyHibonite.name=å°æ’®é»‘é“钙石粉 -item.itemDustSmallHibonite.name=å°å †é»‘é“钙石粉 -item.crushedHibonite.name=粉碎的黑é“钙石矿石 -item.crushedCentrifugedHibonite.name=离心黑é“钙石矿石 -item.crushedPurifiedHibonite.name=洗净的黑é“钙石矿石 -item.dustImpureHibonite.name=å«æ‚黑é“钙石粉 -item.dustPureHibonite.name=æ´å‡€é»‘é“钙石粉 -item.itemDustCerite.name=铈硅石粉 -item.itemDustTinyCerite.name=å°æ’®é“ˆç¡…石粉 -item.itemDustSmallCerite.name=å°å †é“ˆç¡…石粉 -item.crushedCerite.name=粉碎的铈硅石矿石 -item.crushedCentrifugedCerite.name=离心铈硅石矿石 -item.crushedPurifiedCerite.name=洗净的铈硅石矿石 -item.dustImpureCerite.name=å«æ‚铈硅石粉 -item.dustPureCerite.name=æ´å‡€é“ˆç¡…石粉 -item.itemDustFluorcaphite.name=氟碳铈矿粉 -item.itemDustTinyFluorcaphite.name=å°æ’®æ°Ÿç¢³é“ˆçŸ¿ç²‰ -item.itemDustSmallFluorcaphite.name=å°å †æ°Ÿç¢³é“ˆçŸ¿ç²‰ -item.crushedFluorcaphite.name=粉碎的氟碳铈矿矿石 -item.crushedCentrifugedFluorcaphite.name=离心氟碳铈矿矿石 -item.crushedPurifiedFluorcaphite.name=洗净的氟碳铈矿矿石 -item.dustImpureFluorcaphite.name=å«æ‚氟碳铈矿粉 -item.dustPureFluorcaphite.name=æ´å‡€æ°Ÿç¢³é“ˆçŸ¿ç²‰ -item.itemDustFlorencite.name=磷é“铈矿粉 -item.itemDustTinyFlorencite.name=å°æ’®ç£·é“铈矿粉 -item.itemDustSmallFlorencite.name=å°å †ç£·é“铈矿粉 -item.crushedFlorencite.name=粉碎的磷é“铈矿矿石 -item.crushedCentrifugedFlorencite.name=离心磷é“铈矿矿石 -item.crushedPurifiedFlorencite.name=洗净的磷é“铈矿矿石 -item.dustImpureFlorencite.name=å«æ‚磷é“铈矿粉 -item.dustPureFlorencite.name=æ´å‡€ç£·é“铈矿粉 -item.itemDustCryolite.name=冰晶石粉 -item.itemDustTinyCryolite.name=å°æ’®å†°æ™¶çŸ³ç²‰ -item.itemDustSmallCryolite.name=å°å †å†°æ™¶çŸ³ç²‰ -item.crushedCryolite.name=粉碎的冰晶石矿石 -item.crushedCentrifugedCryolite.name=离心冰晶石矿石 -item.crushedPurifiedCryolite.name=洗净的冰晶石矿石 -item.dustImpureCryolite.name=å«æ‚冰晶石粉 -item.dustPureCryolite.name=æ´å‡€å†°æ™¶çŸ³ç²‰ -item.itemDustTinyYellorium.name=å°æ’®é»„铀矿粉 -item.itemDustSmallYellorium.name=å°å †é»„铀矿粉 -item.crushedYellorium.name=粉碎的黄铀矿矿石 -item.crushedCentrifugedYellorium.name=离心黄铀矿矿石 -item.crushedPurifiedYellorium.name=洗净的黄铀矿矿石 -item.dustImpureYellorium.name=å«æ‚黄铀矿粉 -item.dustPureYellorium.name=æ´å‡€é»„铀矿粉 - -//Shards -item.itemDrained.name=枯竭碎片 -item.itemDustInfusedAir.name=风之魔晶粉 -item.itemDustInfusedFire.name=ç«ä¹‹é­”晶粉 -item.itemDustInfusedEarth.name=地之魔晶粉 -item.itemDustInfusedWater.name=水之魔晶粉 - - -//Misc Material Items -item.itemDustLithiumCarbonate.name=碳酸锂粉 -item.itemDustSmallLithiumCarbonate.name=å°å †ç¢³é…¸é”‚粉 -item.itemDustTinyLithiumCarbonate.name=å°æ’®ç¢³é…¸é”‚粉 -item.itemDustLithiumPeroxide.name=过氧化锂粉 -item.itemDustSmallLithiumPeroxide.name=å°å †è¿‡æ°§åŒ–锂粉 -item.itemDustTinyLithiumPeroxide.name=å°æ’®è¿‡æ°§åŒ–锂粉 -item.itemDustLithiumHydroxide.name=氢氧化锂粉 -item.itemDustSmallLithiumHydroxide.name=å°å †æ°¢æ°§åŒ–锂粉 -item.itemDustTinyLithiumHydroxide.name=å°æ’®æ°¢æ°§åŒ–锂粉 -item.itemDustCalciumHydroxide.name=氢氧化钙粉 -item.itemDustSmallCalciumHydroxide.name=å°å †æ°¢æ°§åŒ–钙粉 -item.itemDustTinyCalciumHydroxide.name=å°æ’®æ°¢æ°§åŒ–钙粉 -item.itemDustCalciumCarbonate.name=碳酸钙粉 -item.itemDustSmallCalciumCarbonate.name=å°å †ç¢³é…¸é’™ç²‰ -item.itemDustTinyCalciumCarbonate.name=å°æ’®ç¢³é…¸é’™ç²‰ -item.itemDustGypsum.name=硫酸钙(石è†)粉 -item.itemDustSmallGypsum.name=å°å †ç¡«é…¸é’™(石è†)粉 -item.itemDustTinyGypsum.name=å°æ’®ç¡«é…¸é’™(石è†)粉 -item.itemDustLi2CO3CaOH2.name=碳酸锂+氢氧化钙å¤åˆç‰©ç²‰ -item.itemDustSmallLi2CO3CaOH2.name=å°å †ç¢³é…¸é”‚+氢氧化钙å¤åˆç‰©ç²‰ -item.itemDustTinyLi2CO3CaOH2.name=å°æ’®ç¢³é…¸é”‚+氢氧化钙å¤åˆç‰©ç²‰ -item.itemDustLi2BeF4.name=Li2BeF4 燃料å¤åˆç‰©ç²‰ -item.itemDustSmallLi2BeF4.name=å°å †Li2BeF4燃料å¤åˆç‰©ç²‰ -item.itemDustTinyLi2BeF4.name=å°æ’®Li2BeF4燃料å¤åˆç‰©ç²‰ -item.Li2BeF4.name=Li2BeF4å•å…ƒ -item.itemCircuitLFTR.name=§a§a控制电路 -item.itemZirconiumPellet.name=锆颗粒[氯化锆] -item.itemDustZrCl4.name=氯化锆粉 -item.itemDustSmallZrCl4.name=å°å †æ°¯åŒ–锆粉 -item.itemDustTinyZrCl4.name=å°æ’®æ°¯åŒ–锆粉 -item.itemDustCookedZrCl4.name=焙烧过的氯化锆粉 -item.itemDustSmallCookedZrCl4.name=å°å †ç„™çƒ§è¿‡çš„氯化锆粉 -item.itemDustTinyCookedZrCl4.name=å°æ’®ç„™çƒ§è¿‡çš„氯化锆粉 -item.itemDustUN18Fertiliser.name=æµä½“肥料UN-18粉 -item.itemDustSmallUN18Fertiliser.name=å°å †æµä½“肥料UN-18粉 -item.itemDustTinyUN18Fertiliser.name=å°æ’®æµä½“肥料un-18粉 -item.itemDustUN32Fertiliser.name=æµä½“肥料UN-32粉 -item.itemDustSmallUN32Fertiliser.name=å°å †æµä½“肥料UN-32粉 -item.itemDustTinyUN32Fertiliser.name=å°æ’®æµä½“肥料UN-32粉 -item.itemNuggetPlutonium239.name=é’š 239ç²’ -item.itemCellPlutonium239.name=é’š 239å•å…ƒ -item.itemIngotPlutonium239.name=é’š 239é”­ -item.itemPlatePlutonium239.name=é’š 239æ¿ -item.itemPlateDoublePlutonium239.name=åŒé‡é’š 239æ¿ -item.itemDustPlutonium239.name=é’š 239粉 -item.itemDustSmallPlutonium239.name=å°å †é’š 239粉 -item.itemDustTinyPlutonium239.name=å°æ’®é’š 239粉 - - -//Multitools -item.AluminiumMultipick.name=é“å¤åˆç¨¿ -item.AluminiumMultispade.name=é“å¤åˆé“² -item.BerylliumMultispade.name=é“å¤åˆé“² -item.BismuthMultispade.name=é“‹å¤åˆé“² -item.CarbonMultispade.name=碳å¤åˆé“² -item.ChromeMultipick.name=铬å¤åˆç¨¿ -item.ChromeMultispade.name=铬å¤åˆé“² -item.CobaltMultipick.name=é’´å¤åˆç¨¿ -item.CobaltMultispade.name=é’´å¤åˆé“² -item.GoldMultispade.name=金å¤åˆé“² -item.IridiumMultipick.name=铱å¤åˆç¨¿ -item.IridiumMultispade.name=铱å¤åˆé“² -item.IronMultipick.name=é“å¤åˆç¨¿ -item.IronMultispade.name=é“å¤åˆé“² -item.LeadMultispade.name=é“…å¤åˆé“² -item.ManganeseMultipick.name=é”°å¤åˆç¨¿ -item.ManganeseMultispade.name=é”°å¤åˆé“² -item.MolybdenumMultipick.name=é’¼å¤åˆç¨¿ -item.MolybdenumMultispade.name=é’¼å¤åˆé“² -item.NeodymiumMultipick.name=é’•å¤åˆé• -item.NeodymiumMultispade.name=é’•å¤åˆé“² -item.NeutroniumMultipick.name=中å­ç´ å¤åˆé• -item.NeutroniumMultispade.name=中å­ç´ å¤åˆé“² -item.NickelMultispade.name=é•å¤åˆé“² -item.OsmiumMultipick.name=锇å¤åˆé• -item.OsmiumMultispade.name=锇å¤åˆé“² -item.PalladiumMultipick.name=é’¯å¤åˆé• -item.PalladiumMultispade.name=é’¯å¤åˆé“² -item.PlatinumMultispade.name=é“‚å¤åˆé“² -item.Plutonium241Multipick.name=é’š 241å¤åˆé• -item.Plutonium241Multispade.name=é’š 241å¤åˆé“² -item.SilverMultispade.name=银å¤åˆé“² -item.ThoriumMultipick.name=é’å¤åˆé• -item.ThoriumMultispade.name=é’å¤åˆé“² -item.TitaniumMultipick.name=é’›å¤åˆé• -item.TitaniumMultispade.name=é’›å¤åˆé“² -item.TungstenMultipick.name=é’¨å¤åˆé• -item.TungstenMultispade.name=é’¨å¤åˆé“² -item.Uranium235Multipick.name=é“€ 235å¤åˆé• -item.Uranium235Multispade.name=é“€ 235å¤åˆé“² -item.DarkSteelMultipick.name=玄钢å¤åˆé• -item.DarkSteelMultispade.name=玄钢å¤åˆé“² -item.DuraniumMultipick.name=é“¿é“€å¤åˆé• -item.DuraniumMultispade.name=é“¿é“€å¤åˆé“² -item.InfusedGoldMultispade.name=注魔金å¤åˆé“² -item.NaquadahMultipick.name=硅岩å¤åˆé• -item.NaquadahMultispade.name=硅岩å¤åˆé“² -item.NaquadahAlloyMultipick.name=硅岩åˆé‡‘å¤åˆé• -item.NaquadahAlloyMultispade.name=硅岩åˆé‡‘å¤åˆé“² -item.NaquadriaMultipick.name=超能硅岩å¤åˆé• -item.NaquadriaMultispade.name=超能硅岩å¤åˆé“² -item.TritaniumMultipick.name=三钛å¤åˆé• -item.TritaniumMultispade.name=三钛å¤åˆé“² -item.OsmiridiumMultipick.name=铱锇åˆé‡‘å¤åˆé• -item.OsmiridiumMultispade.name=铱锇åˆé‡‘å¤åˆé“² -item.BrassMultispade.name=黄铜å¤åˆé“² -item.BronzeMultipick.name=é’é“œå¤åˆé• -item.BronzeMultispade.name=é’é“œå¤åˆé“² -item.CupronickelMultispade.name=白铜å¤åˆé“² -item.ElectrumMultispade.name=ç¥ç€é‡‘å¤åˆé“² -item.InvarMultipick.name=æ®·é’¢å¤åˆé• -item.InvarMultispade.name=æ®·é’¢å¤åˆé“² -item.KanthalMultispade.name=åŽå¡”å°”åˆé‡‘å¤åˆé“² -item.MagnaliumMultipick.name=é•é“åˆé‡‘å¤åˆé• -item.MagnaliumMultispade.name=é•é“åˆé‡‘å¤åˆé“² -item.NichromeMultispade.name=é•é“¬åˆé‡‘å¤åˆé“² -item.PigIronMultipick.name=生é“å¤åˆé• -item.PigIronMultispade.name=生é“å¤åˆé“² -item.PolycaprolactamMultispade.name=èšå·±å†…酰胺å¤åˆé“² -item.PolytetrafluoroethyleneMultispade.name=èšå››æ°Ÿä¹™çƒ¯å¤åˆé“² -item.NickelZincFerriteMultispade.name=é•é”Œé“氧体å¤åˆé“² -item.PolyphenyleneSulfideMultispade.name=èšè‹¯ç¡«é†šå¤åˆé“² -item.StainlessSteelMultipick.name=ä¸é”ˆé’¢å¤åˆé• -item.StainlessSteelMultispade.name=ä¸é”ˆé’¢å¤åˆé“² -item.SteelMultipick.name=é’¢å¤åˆé• -item.SteelMultispade.name=é’¢å¤åˆé“² -item.TinAlloyMultispade.name=锡é“åˆé‡‘å¤åˆé“² -item.UltimetMultipick.name=哈æ°åˆé‡‘å¤åˆé• -item.UltimetMultispade.name=哈æ°åˆé‡‘å¤åˆé“² -item.WroughtIronMultipick.name=é”»é“å¤åˆé• -item.WroughtIronMultispade.name=é”»é“å¤åˆé“² -item.SterlingSilverMultipick.name=标准纯银å¤åˆé• -item.SterlingSilverMultispade.name=标准纯银å¤åˆé“² -item.RoseGoldMultipick.name=玫瑰金å¤åˆé• -item.RoseGoldMultispade.name=玫瑰金å¤åˆé“² -item.BlackBronzeMultipick.name=黑é’é“œå¤åˆé• -item.BlackBronzeMultispade.name=黑é’é“œå¤åˆé“² -item.BismuthBronzeMultipick.name=é“‹é’é“œå¤åˆé• -item.BismuthBronzeMultispade.name=é“‹é’é“œå¤åˆé“² -item.BlackSteelMultipick.name=黑钢å¤åˆé• -item.BlackSteelMultispade.name=黑钢å¤åˆé“² -item.RedSteelMultipick.name=红钢å¤åˆé• -item.RedSteelMultispade.name=红钢å¤åˆé“² -item.BlueSteelMultipick.name=è“é’¢å¤åˆé• -item.BlueSteelMultispade.name=è“é’¢å¤åˆé“² -item.DamascusSteelMultipick.name=大马士é©é’¢å¤åˆé• -item.DamascusSteelMultispade.name=大马士é©é’¢å¤åˆé“² -item.MithrilMultispade.name=秘银å¤åˆé“² -item.CobaltBrassMultipick.name=钴黄铜å¤åˆé• -item.CobaltBrassMultispade.name=钴黄铜å¤åˆé“² -item.ThaumiumMultipick.name=神秘锭å¤åˆé• -item.ThaumiumMultispade.name=神秘锭å¤åˆé“² -item.HSSGMultipick.name=高速钢-Gå¤åˆé• -item.HSSGMultispade.name=高速钢-Gå¤åˆé“² -item.HSSEMultipick.name=高速钢-Eå¤åˆé• -item.HSSEMultispade.name=高速钢-Eå¤åˆé“² -item.HSSSMultipick.name=高速钢-Så¤åˆé• -item.HSSSMultispade.name=高速钢-Så¤åˆé“² -item.HastelloyC276Multipick.name=哈斯特洛ä¾åˆé‡‘-C276å¤åˆé• -item.HastelloyC276Multispade.name=哈斯特洛ä¾åˆé‡‘-C276å¤åˆé“² -item.HastelloyNMultipick.name=哈斯特洛ä¾åˆé‡‘-Nå¤åˆé• -item.HastelloyNMultispade.name=哈斯特洛ä¾åˆé‡‘-Nå¤åˆé“² -item.HastelloyWMultipick.name=哈斯特洛ä¾åˆé‡‘-Wå¤åˆé• -item.HastelloyWMultispade.name=哈斯特洛ä¾åˆé‡‘-Wå¤åˆé“² -item.HastelloyXMultipick.name=哈斯特洛ä¾åˆé‡‘-Xå¤åˆé• -item.HastelloyXMultispade.name=哈斯特洛ä¾åˆé‡‘-Xå¤åˆé“² -item.Incoloy020Multipick.name=è€çƒ­é“¬é“åˆé‡‘-020å¤åˆé• -item.Incoloy020Multispade.name=è€çƒ­é“¬é“åˆé‡‘-020å¤åˆé“² -item.IncoloyDSMultipick.name=è€çƒ­é“¬é“åˆé‡‘-DSå¤åˆé• -item.IncoloyDSMultispade.name=è€çƒ­é“¬é“åˆé‡‘-DSå¤åˆé“² -item.IncoloyMA956Multipick.name=è€çƒ­é“¬é“åˆé‡‘-MA956å¤åˆé• -item.IncoloyMA956Multispade.name=è€çƒ­é“¬é“åˆé‡‘-MA956å¤åˆé“² -item.Inconel625Multipick.name=é•é“¬åŸºåˆé‡‘-625å¤åˆé• -item.Inconel625Multispade.name=é•é“¬åŸºåˆé‡‘-625å¤åˆé“² -item.Inconel690Multipick.name=é•é“¬åŸºåˆé‡‘-690å¤åˆé• -item.Inconel690Multispade.name=é•é“¬åŸºåˆé‡‘-690å¤åˆé“² -item.Inconel792Multipick.name=é•é“¬åŸºåˆé‡‘-792å¤åˆé• -item.Inconel792Multispade.name=é•é“¬åŸºåˆé‡‘-792å¤åˆé“² -item.GrisiumMultipick.name=ç°é’›åˆé‡‘å¤åˆé• -item.GrisiumMultispade.name=ç°é’›åˆé‡‘å¤åˆé“² -item.Tantalloy60Multipick.name=钽钨åˆé‡‘-60å¤åˆé• -item.Tantalloy60Multispade.name=钽钨åˆé‡‘-60å¤åˆé“² -item.Tantalloy61Multipick.name=钽钨åˆé‡‘-61å¤åˆé• -item.Tantalloy61Multispade.name=钽钨åˆé‡‘-61å¤åˆé“² -item.StaballoyMultipick.name=è´«é“€åˆé‡‘å¤åˆé• -item.StaballoyMultispade.name=è´«é“€åˆé‡‘å¤åˆé“² -item.QuantumMultipick.name=é‡å­åˆé‡‘å¤åˆé• -item.QuantumMultispade.name=é‡å­åˆé‡‘å¤åˆé“² -item.PotinMultipick.name=ç²—é’é“œåˆé‡‘å¤åˆé• -item.PotinMultispade.name=ç²—é’é“œåˆé‡‘å¤åˆé“² -item.TumbagaMultipick.name=铜金åˆé‡‘å¤åˆé• -item.TumbagaMultispade.name=铜金åˆé‡‘å¤åˆé“² -item.TaloniteMultipick.name=铬钴磷酸ç›åˆé‡‘å¤åˆé• -item.TaloniteMultispade.name=铬钴磷酸ç›åˆé‡‘å¤åˆé“² -item.StelliteMultipick.name=铬钴锰钛åˆé‡‘å¤åˆé• -item.StelliteMultispade.name=铬钴锰钛åˆé‡‘å¤åˆé“² -item.TungstenCarbideMultipick.name=碳化钨å¤åˆé• -item.TungstenCarbideMultispade.name=碳化钨å¤åˆé“² -item.TantalumCarbideMultipick.name=碳化钽å¤åˆé• -item.TantalumCarbideMultispade.name=碳化钽å¤åˆé“² - - -//Items that Don't fit into another category - -//Plates -item.itemPlateClay.name=ç²˜åœŸæ¿ -item.itemPlateDoubleClay.name=åŒé‡ç²˜åœŸæ¿ -item.itemPlateLithium.name=é”‚æ¿ -item.itemPlateDoubleEuropium.name=åŒé‡é“•æ¿ - -//Gears -item.itemSmallGearWroughtIron.name=å°åž‹é”»é“齿轮 - -//Misc -item.itemFoilUranium235.name=é“€235ç®” - -item.itemBoilerChassis_0.name=高级锅炉外壳[1级] -item.itemDehydratorCoilWire_0.name=缠绕导线 [EV] -item.itemDehydratorCoil_0.name=脱水线圈 [EV] -item.itemAirFilter_0.name=空气过滤器 -item.itemAirFilter_1.name=空气过滤器 -item.itemLavaFilter.name=岩浆过滤器 -item.itemGrindleTablet.name=Git -item.itemDragonJar.name=é¾™æ•èŽ·ä¹‹å£¶ -item.CoalGas.name=煤气å•å…ƒ -item.Ethylbenzene.name=乙苯å•å…ƒ -item.Anthracene.name=è’½å•å…ƒ -item.Toluene.name=甲苯å•å…ƒ -item.CoalTar.name=煤焦油å•å…ƒ -item.CoalTarOil.name=煤焦油å•å…ƒ -item.SulfuricCoalTarOil.name=硫酸煤焦油å•å…ƒ -item.Naphthalene.name=è˜å•å…ƒ -item.PhthalicAcid.name=邻苯二甲酸å•å…ƒ -item.itemDustPhthalicAnhydride.name=邻苯二甲酸é…粉 -item.itemDustSmallPhthalicAnhydride.name=å°å †é‚»è‹¯äºŒç”²é…¸é…粉 -item.itemDustTinyPhthalicAnhydride.name=å°æ’®é‚»è‹¯äºŒç”²é…¸é…粉 -item.2Ethylanthraquinone.name=2-乙基蒽醌å•å…ƒ -item.2Ethylanthrahydroquinone.name=2-乙基氢蒽醌å•å…ƒ -item.HydrogenPeroxide.name=过氧化氢å•å…ƒ -item.itemDustLithiumHydroperoxide.name=过氧化氢锂粉 -item.itemDustSmallLithiumHydroperoxide.name=å°å †è¿‡æ°§åŒ–氢锂粉 -item.itemDustTinyLithiumHydroperoxide.name=å°æ’®è¿‡æ°§åŒ–氢锂粉 -item.LithiumPeroxide.name=过氧化锂å•å…ƒ -item.itemPotionChilly.name=冰凉è¯æ°´ -item.itemKeyBig4000DC's.name=4000DC的大钥匙 -item.itemGemDull.name=沉闷å®çŸ³ -item.itemMushroomForest.name=æ£®æž—è˜‘è‡ -item.itemPlateVanadium.name=é’’é’¢æ¿ -item.thekeytothecity.name=通往城市的钥匙 -item.modularbauble.name=模å—åŒ–é¥°å“ -item.itemDustSoularium.name=魂金粉 -item.itemDustSmallSoularium.name=å°å †é­‚金粉 -item.itemDustTinySoularium.name=å°æ’®é­‚金粉 -item.itemDustRedstoneAlloy.name=红石åˆé‡‘粉 -item.itemDustSmallRedstoneAlloy.name=å°å †çº¢çŸ³åˆé‡‘粉 -item.itemDustTinyRedstoneAlloy.name=å°æ’®çº¢çŸ³åˆé‡‘粉 -item.itemDustElectricalSteel.name=ç£é’¢ç²‰ -item.itemDustSmallElectricalSteel.name=å°å †ç£é’¢ç²‰ -item.itemDustTinyElectricalSteel.name=å°æ’®ç£é’¢ç²‰ -item.itemDustPulsatingIron.name=脉冲é“粉 -item.itemDustSmallPulsatingIron.name=å°å †è„‰å†²é“粉 -item.itemDustTinyPulsatingIron.name=å°æ’®è„‰å†²é“粉 -item.itemDustEnergeticAlloy.name=充能åˆé‡‘粉 -item.itemDustSmallEnergeticAlloy.name=å°å †å……能åˆé‡‘粉 -item.itemDustTinyEnergeticAlloy.name=å°æ’®å……能åˆé‡‘粉 -item.itemDustVibrantAlloy.name=脉冲åˆé‡‘粉 -item.itemDustSmallVibrantAlloy.name=å°å †è„‰å†²åˆé‡‘粉 -item.itemDustTinyVibrantAlloy.name=å°æ’®è„‰å†²åˆé‡‘粉 -item.itemDustConductiveIron.name=导电é“粉 -item.itemDustSmallConductiveIron.name=å°å †å¯¼ç”µé“粉 -item.itemDustTinyConductiveIron.name=å°æ’®å¯¼ç”µé“粉 -item.itemPlateSoularium.name=é­‚é‡‘æ¿ -item.itemPlateRedstoneAlloy.name=红石åˆé‡‘æ¿ -item.itemPlateElectricalSteel.name=ç£é’¢æ¿ -item.itemPlatePhasedIron.name=脉冲é“æ¿ -item.itemPlateEnergeticAlloy.name=充能åˆé‡‘æ¿ -item.itemPlateVibrantAlloy.name=脉冲åˆé‡‘æ¿ -item.itemPlateConductiveIron.name=导电é“æ¿ -item.itemPlateBlutonium.name=è“é’šæ¿ -item.itemPlateCyanite.name=è“æ™¶çŸ³æ¿ -item.itemPlateLudicrite.name=çº¯é•¥æ¿ -item.itemPlateVoid.name=è™šç©ºæ¿ -item.itemPlateDimensionShard.name=ç»´åº¦ç¢Žç‰‡æ¿ -item.rfEUBattery.name=通用充电电池 -item.personalCloakingDevice.name=§9§9个人éšå½¢è£…置§7 -item.personalHealingDevice.name=§9§9个人纳米治疗加速器§r -item.SlowBuildingRing.name=§e§e缓建指环§7 -item.itemStaballoyPickaxe.name=隧é“挖掘者 -item.itemStaballoyAxe.name=æ ‘æž—ç ä¼è€… -item.itemSandstoneHammer.name=圆石粉碎者 -item.itemBufferCore1.name=能é‡æ ¸å¿ƒ [ULV] -item.itemBufferCore2.name=能é‡æ ¸å¿ƒ [LV] -item.itemBufferCore3.name=能é‡æ ¸å¿ƒ [MV] -item.itemBufferCore4.name=能é‡æ ¸å¿ƒ [HV] -item.itemBufferCore5.name=能é‡æ ¸å¿ƒ [EV] -item.itemBufferCore6.name=能é‡æ ¸å¿ƒ [IV] -item.itemBufferCore7.name=能é‡æ ¸å¿ƒ [LuV] -item.itemBufferCore8.name=能é‡æ ¸å¿ƒ [ZPM] -item.itemBufferCore9.name=能é‡æ ¸å¿ƒ [UV] -item.itemBufferCore10.name=能é‡æ ¸å¿ƒ [MAX] -item.itemPLACEHOLDER_Circuit.name=夸克æ“纵者 (UV) -item.itembookgt.name=§o§o热力锅炉手册 - -// Everglade Items -item.everglades.trigger.name=§6§6Alkalus圆盘[§c激活§6] - - - - - - - -//Blocks -tile.blockRainforestOakLog.name=雨林橡木 -tile.blockRainforestOakLeaves.name=æ©¡æ ‘æ ‘å¶ -tile.blockRainforestOakSapling.name=雨林橡树树苗 - -//TC Stuff -tile.blockFastAlchemyFurnace.0.name=æŸå -tile.blockFastArcaneAlembic.1.name=æŸå - -//Frame Boxes -tile.Block of Selenium.name=ç¡’å— -tile.Selenium Frame Box.name=硒框架 -tile.Block of Bromine.name=æº´å— -tile.Block of Strontium.name=é”¶å— -tile.Strontium Frame Box.name=锶框架 -tile.Block of Zirconium.name=é”†å— -tile.Zirconium Frame Box.name=锆框架 -tile.Block of Ruthenium.name=é’Œå— -tile.Ruthenium Frame Box.name=钌框架 -tile.Block of Iodine.name=ç¢˜å— -tile.Iodine Frame Box.name=碘框架 -tile.Block of Hafnium.name=é“ªå— -tile.Hafnium Frame Box.name=铪框架 -tile.Block of Dysprosium.name=é•å— -tile.Dysprosium Frame Box.name=é•æ¡†æž¶ -tile.Block of Tellurium.name=ç¢²å— -tile.Tellurium Frame Box.name=碲框架 -tile.Block of Rhodium.name=é“‘å— -tile.Rhodium Frame Box.name=铑框架 -tile.Block of Rhenium.name=é“¼å— -tile.Rhenium Frame Box.name=铼框架 -tile.Block of Thallium.name=é“Šå— -tile.Thallium Frame Box.name=铊框架 -tile.Block of Technetium.name=é”å— -tile.Block of Polonium.name=é’‹å— -tile.Block of Astatine.name=ç ¹å— -tile.Block of Francium.name=é’«å— -tile.Block of Radium.name=é•­å— -tile.Block of Actinium.name=é”•å— -tile.Block of Protactinium.name=é•¤å— -tile.Block of Neptunium.name=é•Žå— -tile.Block of Curium.name=é””å— -tile.Block of Berkelium.name=é”«å— -tile.Block of Californium.name=é”Žå— -tile.Block of Einsteinium.name=é”¿å— -tile.Block of Fermium.name=é•„å— -tile.Block of Thorium 232.name=é’-232å— -tile.Block of Uranium 232.name=é“€-232å— -tile.Block of Uranium 233.name=é“€-233å— -tile.Block of Plutonium-238.name=é’š-238å— -tile.Block of Strontium-90.name=锶-90å— -tile.Block of Polonium-210.name=é’‹-210å— -tile.Block of Americium-241.name=é•…-241å— -tile.Block of Silicon Carbide.name=ç¢³åŒ–ç¡…å— -tile.Silicon Carbide Frame Box.name=碳化硅框架 -tile.Block of Zirconium Carbide.name=ç¢³åŒ–é”†å— -tile.Zirconium Carbide Frame Box.name=碳化锆框架 -tile.Block of Tantalum Carbide.name=ç¢³åŒ–é’½å— -tile.Tantalum Carbide Frame Box.name=碳化钽框架 -tile.Block of Niobium Carbide.name=ç¢³åŒ–é“Œå— -tile.Niobium Carbide Frame Box.name=碳化铌框架 -tile.Block of Beryllium Fluoride.name=氟化é“å— -tile.Block of Lithium Fluoride.name=æ°ŸåŒ–é”‚å— -tile.Block of Thorium Tetrafluoride.name=四氟化é’å— -tile.Block of Thorium Hexafluoride.name=六氟化é’å— -tile.Block of Uranium Tetrafluoride.name=å››æ°ŸåŒ–é“€å— -tile.Block of Uranium Hexafluoride.name=å…­æ°ŸåŒ–é“€å— -tile.Block of Zirconium Tetrafluoride.name=å››æ°ŸåŒ–é”†å— -tile.Block of Neptunium Hexafluoride.name=å…­æ°ŸåŒ–é•Žå— -tile.Block of Technetium Hexafluoride.name=六氟化é”å— -tile.Block of Selenium Hexafluoride.name=å…­æ°ŸåŒ–ç¡’å— -tile.Block of LiFBeF2ZrF4U235.name=é“€235å¤åˆæ°ŸåŒ–ç‰©å— -tile.Block of LiFBeF2ZrF4UF4.name=铀锆å¤åˆæ°ŸåŒ–ç‰©å— -tile.Block of LiFBeF2ThF4UF4.name=é“€é’å¤åˆæ°ŸåŒ–ç‰©å— -tile.Block of Energy Crystal.name=能é‡æ°´æ™¶å— -tile.Energy Crystal Frame Box.name=能é‡æ°´æ™¶æ¡†æž¶ -tile.Block of Blood Steel.name=è¡€é’¢å— -tile.Blood Steel Frame Box.name=血钢框架 -tile.Block of Zeron-100.name=å¡žé¾™-100å— -tile.Zeron-100 Frame Box.name=å¡žé¾™-100框架 -tile.Block of Tumbaga.name=铜金åˆé‡‘å— -tile.Tumbaga Frame Box.name=铜金åˆé‡‘框架 -tile.Block of Potin.name=ç²—é’é“œåˆé‡‘å— -tile.Potin Frame Box.name=ç²—é’é“œåˆé‡‘框架 -tile.Block of Staballoy.name=è´«é“€åˆé‡‘å— -tile.Staballoy Frame Box.name=è´«é“€åˆé‡‘框架 -tile.Block of Tantalloy-60.name=钽钨åˆé‡‘-60å— -tile.Tantalloy-60 Frame Box.name=钽钨åˆé‡‘-60框架 -tile.Block of Tantalloy-61.name=钽钨åˆé‡‘-61å— -tile.Tantalloy-61 Frame Box.name=钽钨åˆé‡‘-61框架 -tile.Block of Inconel-625.name=é•é“¬åŸºåˆé‡‘-625å— -tile.Inconel-625 Frame Box.name=é•é“¬åŸºåˆé‡‘-625框架 -tile.Block of Inconel-690.name=é•é“¬åŸºåˆé‡‘-690å— -tile.Inconel-690 Frame Box.name=é•é“¬åŸºåˆé‡‘-690框架 -tile.Block of Inconel-792.name=é•é“¬åŸºåˆé‡‘-792å— -tile.Inconel-792 Frame Box.name=é•é“¬åŸºåˆé‡‘-792框架 -tile.Block of Eglin Steel.name=åŸƒæ ¼æž—é’¢å— -tile.Eglin Steel Frame Box.name=埃格林钢框架 -tile.Block of Maraging Steel 250.name=马æ°ä½“时效钢250å— -tile.Maraging Steel 250 Frame Box.name=马æ°ä½“时效钢250框架 -tile.Block of Maraging Steel 300.name=马æ°ä½“时效钢300å— -tile.Maraging Steel 300 Frame Box.name=马æ°ä½“时效钢300框架 -tile.Block of Maraging Steel 350.name=马æ°ä½“时效钢350å— -tile.Maraging Steel 350 Frame Box.name=马æ°ä½“时效钢350框架 -tile.Block of Stellite.name=铬钴锰钛åˆé‡‘å— -tile.Stellite Frame Box.name=铬钴锰钛åˆé‡‘框架 -tile.Block of Talonite.name=铬钴磷酸ç›åˆé‡‘å— -tile.Talonite Frame Box.name=铬钴磷酸ç›åˆé‡‘框架 -tile.Block of Hastelloy-W.name=哈斯特洛ä¾åˆé‡‘-Wå— -tile.Hastelloy-W Frame Box.name=哈斯特洛ä¾åˆé‡‘-W框架 -tile.Block of Hastelloy-X.name=哈斯特洛ä¾åˆé‡‘-Xå— -tile.Hastelloy-X Frame Box.name=哈斯特洛ä¾åˆé‡‘-X框架 -tile.Block of Hastelloy-C276.name=哈斯特洛ä¾åˆé‡‘-C276å— -tile.Hastelloy-C276 Frame Box.name=哈斯特洛ä¾åˆé‡‘-C276框架 -tile.Block of Hastelloy-N.name=哈斯特洛ä¾åˆé‡‘-Nå— -tile.Hastelloy-N Frame Box.name=哈斯特洛ä¾åˆé‡‘-N框架 -tile.Block of Incoloy-020.name=è€çƒ­é“¬é“åˆé‡‘-020å— -tile.Incoloy-020 Frame Box.name=è€çƒ­é“¬é“åˆé‡‘-020框架 -tile.Block of Incoloy-DS.name=è€çƒ­é“¬é“åˆé‡‘-DSå— -tile.Incoloy-DS Frame Box.name=è€çƒ­é“¬é“åˆé‡‘-DS框架 -tile.Block of Incoloy-MA956.name=è€çƒ­é“¬é“åˆé‡‘-MA956å— -tile.Incoloy-MA956 Frame Box.name=è€çƒ­é“¬é“åˆé‡‘-MA956框架 -tile.Block of Grisium.name=ç°é’›åˆé‡‘å— -tile.Grisium Frame Box.name=ç°é’›åˆé‡‘框架 -tile.Block of Trinium.name=ä¸‰å…ƒé‡‘å±žå— -tile.Block of Refined Trinium.name=ç²¾åˆ¶ä¸‰å…ƒé‡‘å±žå— -tile.Block of Trinium Titanium Alloy.name=三元钛åˆé‡‘å— -tile.Trinium Titanium Alloy Frame Box.name=三元钛åˆé‡‘框架 -tile.Block of Trinium Naquadah Alloy.name=三元硅岩åˆé‡‘å— -tile.Block of Trinium Naquadah Carbonite.name=碳化三元硅岩åˆé‡‘å— -tile.Trinium Naquadah Carbonite Frame Box.name=碳化三元硅岩åˆé‡‘框架 -tile.Block of Quantum.name=é‡å­åˆé‡‘å— -tile.Quantum Frame Box.name=é‡å­åˆé‡‘框架 - -//Ores -tile.OreFluorite.name=氟石矿石 -tile.OreCrocoite.name=赤铅矿矿石 -tile.OreGeikielite.name=é•é’›çŸ¿çŸ¿çŸ³ -tile.OreNichromite.name=é•é“¬çŸ¿çŸ¿çŸ³ -tile.OreTitanite.name=æ¦çŸ³çŸ¿çŸ³ -tile.OreZimbabweite.name=钛铌铅钠石矿石 -tile.OreZirconolite.name=钛锆é’矿矿石 -tile.OreGadoliniteCe.name=ç¡…é“钇矿(Ce)矿石 -tile.OreGadoliniteY.name=ç¡…é“钇矿(Y)矿石 -tile.OreLepersonnite.name=绿泥石矿石 -tile.OreSamarskiteY.name=铌钇矿(Y)矿石 -tile.OreSamarskiteYb.name=铌钇矿(Yb)矿石 -tile.OreXenotime.name=磷钇矿矿石 -tile.OreYttriaite.name=钇矿矿石 -tile.OreYttrialite.name=ç¡…é’钇矿矿石 -tile.OreYttrocerite.name=铈钇矿矿石 -tile.OreZircon.name=锆石矿石 -tile.OrePolycrase.name=锗铀钇矿矿石 -tile.OreZircophyllite.name=锆星å¶çŸ³çŸ¿çŸ³ -tile.OreZirkelite.name=锆英石矿石 -tile.OreLanthaniteLa.name=镧石(La)矿石 -tile.OreLanthaniteCe.name=镧石(Ce)矿石 -tile.OreLanthaniteNd.name=镧石(Nd)矿石 -tile.OreAgarditeY.name=è±é“矿(Y)矿石 -tile.OreAgarditeCd.name=è±é“矿(Cd)矿石 -tile.OreAgarditeLa.name=è±é“矿(La)矿石 -tile.OreAgarditeNd.name=è±é“矿(Nd)矿石 -tile.OreHibonite.name=黑é“钙石矿石 -tile.OreCerite.name=铈硅石矿石 -tile.OreFluorcaphite.name=氟碳铈矿矿石 -tile.OreFlorencite.name=磷é“铈矿矿石 -tile.OreCryolite.name=冰晶石矿石 - -//Misc -tile.blockMFEffect.name=特殊 -tile.fluidBlockSludge.name=污泥 -tile.blockWorkbenchGT.name=å·¥ä½œå° -tile.blockWorkbenchGTAdvanced.name=é«˜çº§å·¥ä½œå° -tile.blockHeliumGenerator.name=æ°¦å‘生器 -tile.blockFirePit.name=ç«å‘ -tile.blockFishTrap.name=æ•é±¼è€… -tile.blockInfiniteFluidTank.name=æ— é™æµä½“å‚¨ç½ -tile.blockMiningExplosives.name=çŸ¿ç”¨ç‚¸è¯ -tile.blockHellFire.name=åœ°ç‹±ä¹‹ç« -tile.blockProjectBench.name=å·¥ç¨‹å° -tile.blockTradeBench.name=è´¸æ˜“å° -tile.blockModularity.name=模å—åŒ–å·¥ä½œå° -tile.blockBlackGate.name=å‡‹é›¶ç¬¼å­ -tile.blockTankXpConverter.name=ç»éªŒè½¬æ¢å™¨ - -//Everglades Blocks -tile.fluidSludge.0.name=ä¸æµåŠ¨çš„废水 -tile.blockDarkWorldPortal.name=未æ¥çš„掠影 -tile.blockDarkWorldGround.name=ä¸ç¨³å®šçš„土壤 -tile.blockDarkWorldGround2.name=污染的土壤 -tile.blockDarkWorldGround2.2.name=高度污染的土壤 -tile.blockDarkWorldPortalFrame.name=é制框架 - - -//Added 1/4/18 -tile.Block of Plutonium-239.name=é’š-239å— -tile.Fluorite Ore [Old].name=氟石矿[ä¸å¯ç”¨çš„] -tile.blockMiningPipeFake.name=å¼ºåŒ–é’¢ç­‹æŒ–æŽ˜ç®¡é“ -tile.blockMiningHeadFake.name=基岩钻头 -item.itemCellLiFBeF2ThF4UF4.name=熔ç›å•å…ƒ[é“€é’å¤åˆæ°ŸåŒ–物] -item.itemCellLiFBeF2ZrF4UF4.name=熔ç›å•å…ƒ[铀锆å¤åˆæ°ŸåŒ–物] -item.itemCellLiFBeF2ZrF4U235.name=熔ç›å•å…ƒ[é“€235å¤åˆæ°ŸåŒ–物] -item.itemPlateMeatRaw.name=ç”Ÿè‚‰æ¿ -tile.Block of MeatRaw.name=ç”Ÿè‚‰å— - -//Added 26/5/18 -item.BurntLiFBeF2ThF4UF4.name=枯竭熔ç›å•å…ƒ[é“€é’å¤åˆæ°ŸåŒ–物] -item.BurntLiFBeF2ZrF4UF4.name=枯竭熔ç›å•å…ƒ[铀锆å¤åˆæ°ŸåŒ–物] -item.BurntLiFBeF2ZrF4U235.name=枯竭熔ç›å•å…ƒ[é“€235å¤åˆæ°ŸåŒ–物] -item.itemBigEgg.name= 盎å¸çš„大鸡蛋 -item.itemPlateSodium.name=é’ æ¿ - -item.itemNuggetPromethium.name=é’·ç²’ -item.itemIngotPromethium.name=é’·é”­ -item.itemDustSmallPromethium.name=å°å †é’·ç²‰ -item.itemDustTinyPromethium.name=å°æ’®é’·ç²‰ -item.itemDustPromethium.name=钷粉 -tile.Block of Promethium.name=é’·å— - -item.itemCellAmericium241.name=é•…-241å•å…ƒ -item.itemCellPolonium210.name=é’‹-210å•å…ƒ -item.itemCellStrontium90.name=锶-90å•å…ƒ -item.itemCellPlutonium238.name=é’š-238å•å…ƒ - -entity.MiningCharge.name=采矿费用 -entity.throwablePotionSulfuric.name=硫酸烧瓶 -entity.throwablePotionHydrofluoric.name=氢氟酸烧瓶 -entity.toxinBall.name=毒素å°çƒ -entity.plasmaBolt.name=等离å­ä½“ -entity.bigChickenFriendly.name=巨大的鸡 - -//Added 26/6/18 -tile.OreTrinium.name=三元金属矿石 -item.crushedTrinium.name=粉碎三元金属矿石 -item.crushedCentrifugedTrinium.name=离心三元金属矿石 -item.crushedPurifiedTrinium.name=洗净的三元金属矿石 -item.dustImpureTrinium.name=å«æ‚三元金属粉 -item.dustPureTrinium.name=洗净的三元金属粉 - -//Added 1/7/18 -entity.WiseVillager.name=èªæ˜Žçš„æ‘æ°‘ -tile.blockMobSpawnerEx.0.name=刷怪笼 -tile.blockMobSpawnerEx.1.name=刷怪笼 -tile.blockMobSpawnerEx.2.name=刷怪笼 -tile.blockMobSpawnerEx.3.name=刷怪笼 -tile.blockMobSpawnerEx.4.name=刷怪笼 -tile.blockMobSpawnerEx.5.name=刷怪笼 -tile.blockMobSpawnerEx.6.name=刷怪笼 -tile.blockMobSpawnerEx.7.name=刷怪笼 -tile.blockMobSpawnerEx.8.name=刷怪笼 -tile.blockMobSpawnerEx.9.name=刷怪笼 -tile.blockMobSpawnerEx.10.name=刷怪笼 -tile.blockMobSpawnerEx.11.name=刷怪笼 -tile.blockMobSpawnerEx.12.name=刷怪笼 -tile.blockMobSpawnerEx.13.name=刷怪笼 -tile.blockMobSpawnerEx.14.name=刷怪笼 -tile.blockMobSpawnerEx.15.name=刷怪笼 -description.villager.profession.miscutils.banker=银行家 -description.villager.profession.miscutils.technician=GT技术员 -description.villager.profession.miscutils.trader=矿石交易员 -description.villager.profession.miscutils.aboriginal=澳大利亚土著 - -//Added 23/8/18 -item.itemHatTinFoil.name=锡薄帽 - -//Added 13/9/18 -entity.WiseVillager.name=èªæ˜Žçš„æ‘æ°‘ -entity.Aboriginal.name=澳大利亚土著 -entity.miscutils.constructStaballoy.name=è´«é“€åˆé‡‘结构 -entity.miscutils.sickBlaze.name=被感染的狂热者 - -//Added 15/9/18 -item.ZirconiumTetrafluoride.name=四氟化锆å•å…ƒ -item.Formaldehyde.name=甲醛å•å…ƒ -item.RocketFuelMixA.name=H8N4C2O4ç«ç®­ç‡ƒæ–™å•å…ƒ -item.RocketFuelMixB.name=RP-1ç«ç®­ç‡ƒæ–™å•å…ƒ -item.RocketFuelMixC.name=CN3H7O3ç«ç®­ç‡ƒæ–™å•å…ƒ -item.RocketFuelMixD.name=密集肼ç«ç®­ç‡ƒæ–™å•å…ƒ -item.RP1Fuel.name=RP-1燃料å•å…ƒ -item.Monomethylhydrazine.name=甲基肼å•å…ƒ -item.Hydrazine.name=肼å•å…ƒ -item.NitrogenTetroxide.name=四氧化二氮å•å…ƒ -item.NitrousOxide.name=一氧化二氮å•å…ƒ -item.AmmoniumNitrateSlurry.name=ç¡é…¸é“µæµ†æ¶²å•å…ƒ -item.Kerosene.name=煤油å•å…ƒ -item.LiquidOxygen.name=液化氧å•å…ƒ[LOX] - -//Added 8/1/19 - -//Ores - -tile.OreIrarsite.name=硫砷铱矿石 -item.crushedIrarsite.name=粉碎硫砷铱矿石 -item.crushedCentrifugedIrarsite.name=离心粉碎硫砷铱矿石 -item.crushedPurifiedIrarsite.name=纯净粉碎硫砷铱矿石 -item.dustImpureIrarsite.name=å«æ‚硫砷铱粉 -item.dustPureIrarsite.name=纯净硫砷铱粉 -item.itemDustIrarsite.name=硫砷铱粉 -item.itemDustTinyIrarsite.name=å°æ’®ç¡«ç ·é“±ç²‰ -item.itemDustSmallIrarsite.name=å°å †ç¡«ç ·é“±ç²‰ - -tile.OreMiessiite.name=ç¡…ç°çŸ³çŸ¿çŸ³ -item.crushedMiessiite.name=粉碎硅ç°çŸ³çŸ¿çŸ³ -item.crushedCentrifugedMiessiite.name=离心粉碎硅ç°çŸ³çŸ¿çŸ³ -item.crushedPurifiedMiessiite.name=纯净硅ç°çŸ³çŸ¿çŸ³ -item.dustImpureMiessiite.name=å«æ‚ç¡…ç°çŸ³ç²‰ -item.dustPureMiessiite.name=纯净硅ç°çŸ³ç²‰ -item.itemDustMiessiite.name=ç¡…ç°çŸ³ç²‰ -item.itemDustTinyMiessiite.name=å°æ’®ç¡…ç°çŸ³ç²‰ -item.itemDustSmallMiessiite.name=å°å †ç¡…ç°çŸ³ç²‰ - -tile.OreComancheite.name=溴汞石矿石 -item.crushedComancheite.name=粉碎溴汞石矿石 -item.crushedCentrifugedComancheite.name=离心粉碎溴汞石矿石 -item.crushedPurifiedComancheite.name=纯净粉碎溴汞石矿石 -item.dustImpureComancheite.name=å«æ‚溴汞石矿石 -item.dustPureComancheite.name=纯净溴汞石粉 -item.itemDustComancheite.name=溴汞石粉 -item.itemDustTinyComancheite.name=å°æ’®æº´æ±žçŸ³ç²‰ -item.itemDustSmallComancheite.name=å°å †æº´æ±žçŸ³ç²‰ - -tile.OreKoboldite.name=妖金矿石 -item.crushedKoboldite.name=粉碎妖金矿石 -item.crushedCentrifugedKoboldite.name=离心粉碎妖金矿石 -item.crushedPurifiedKoboldite.name=纯净粉碎妖金矿石 -item.dustImpureKoboldite.name=å«æ‚妖金粉 -item.dustPureKoboldite.name=纯净妖金粉 -item.itemDustKoboldite.name=妖金粉 -item.itemDustTinyKoboldite.name=å°æ’®å¦–金粉 -item.itemDustSmallKoboldite.name=å°å †å¦–金粉 - -tile.OrePerroudite.name=溴硫银汞矿石 -item.crushedPerroudite.name=粉碎溴硫银汞矿石 -item.crushedCentrifugedPerroudite.name=离心溴硫银汞矿石 -item.crushedPurifiedPerroudite.name=纯净溴硫银汞矿石 -item.dustImpurePerroudite.name=å«æ‚溴硫银汞粉 -item.dustPurePerroudite.name=纯净溴硫银汞粉 -item.itemDustPerroudite.name=溴硫银汞粉 -item.itemDustTinyPerroudite.name=å°æ’®æº´ç¡«é“¶æ±žç²‰ -item.itemDustSmallPerroudite.name=å°å †æº´ç¡«é“¶æ±žç²‰ - -tile.OreDemicheleite.name=é‡é—ªçŸ³çŸ¿çŸ³ -item.crushedDemicheleite.name=粉碎é‡é—ªçŸ³çŸ¿çŸ³ -item.crushedCentrifugedDemicheleite.name=离心粉碎é‡é—ªçŸ³çŸ¿çŸ³ -item.crushedPurifiedDemicheleite.name=纯净粉碎é‡é—ªçŸ³çŸ¿çŸ³ -item.dustImpureDemicheleite.name=å«æ‚é‡é—ªçŸ³ç²‰ -item.dustPureDemicheleite.name=纯净é‡é—ªçŸ³ç²‰ -item.itemDustDemicheleite.name=é‡é—ªçŸ³ç²‰ -item.itemDustTinyDemicheleite.name=å°æ’®é‡é—ªçŸ³ç²‰ -item.itemDustSmallDemicheleite.name=å°å †é‡é—ªçŸ³ç²‰ - -tile.OreAlburnite.name=é“尖晶石矿石 -item.crushedAlburnite.name=粉碎é“尖晶石矿石 -item.crushedCentrifugedAlburnite.name=离心粉碎é“尖晶石矿石 -item.crushedPurifiedAlburnite.name=纯净粉碎é“尖晶石矿石 -item.dustImpureAlburnite.name=å«æ‚é“尖晶石粉 -item.dustPureAlburnite.name=纯净é“尖晶石粉 -item.itemDustAlburnite.name=é“尖晶石粉 -item.itemDustTinyAlburnite.name=å°æ’®é“尖晶石粉 -item.itemDustSmallAlburnite.name=å°å †é“尖晶石粉 - -tile.OreLautarite.name=碘钙石矿石 -item.crushedLautarite.name=粉碎碘钙石矿石 -item.crushedCentrifugedLautarite.name=离心粉碎碘钙石矿石 -item.crushedPurifiedLautarite.name=纯净粉碎碘钙石矿石 -item.dustImpureLautarite.name=å«æ‚碘钙石粉 -item.dustPureLautarite.name=纯净碘钙石粉 -item.itemDustLautarite.name=碘钙石粉 -item.itemDustTinyLautarite.name=å°æ’®ç¢˜é’™çŸ³ç²‰ -item.itemDustSmallLautarite.name=å°å †ç¢˜é’™çŸ³ç²‰ - -tile.OreBariteRd.name=é‡æ™¶çŸ³(Rd)矿石 -item.crushedBariteRd.name=粉碎é‡æ™¶çŸ³(Rd)矿石 -item.crushedCentrifugedBariteRd.name=离心粉碎 é‡æ™¶çŸ³(Rd)矿石 -item.crushedPurifiedBariteRd.name=纯净粉碎é‡æ™¶çŸ³(Rd)矿石 -item.dustImpureBariteRd.name=å«æ‚ é‡æ™¶çŸ³(Rd)粉 -item.dustPureBariteRd.name=纯净 é‡æ™¶çŸ³(Rd)粉 -item.itemDustBariteRd.name=é‡æ™¶çŸ³(Rd)粉 -item.itemDustTinyBariteRd.name=å°æ’®é‡æ™¶çŸ³(Rd)粉 -item.itemDustSmallBariteRd.name=å°å †é‡æ™¶çŸ³(Rd)粉 - -tile.OreHoneaite.name=碲化金铊矿石 -item.crushedHoneaite.name=粉碎碲化金铊矿石 -item.crushedCentrifugedHoneaite.name=离心粉碎碲化金铊矿石 -item.crushedPurifiedHoneaite.name=纯净粉碎碲化金铊矿石 -item.dustImpureHoneaite.name=å«æ‚碲化金铊粉 -item.dustPureHoneaite.name=纯净碲化金铊粉 -item.itemDustHoneaite.name=碲化金铊粉 -item.itemDustTinyHoneaite.name=å°æ’®ç¢²åŒ–金铊粉 -item.itemDustSmallHoneaite.name=å°å †ç¢²åŒ–金铊粉 - -tile.OreLafossaite.name=é“Šç›çŸ¿çŸ³ -item.crushedLafossaite.name=粉碎铊ç›çŸ¿çŸ³ -item.crushedCentrifugedLafossaite.name=离心粉碎铊ç›çŸ¿çŸ³ -item.crushedPurifiedLafossaite.name=纯净粉碎铊ç›çŸ¿çŸ³ -item.dustImpureLafossaite.name=å«æ‚é“Šç›ç²‰ -item.dustPureLafossaite.name=纯净铊ç›ç²‰ -item.itemDustLafossaite.name=é“Šç›ç²‰ -item.itemDustTinyLafossaite.name=å°æ’®é“Šç›ç²‰ -item.itemDustSmallLafossaite.name=å°å †é“Šç›ç²‰ - -tile.OreKashinite.name=硫铑钛铜矿石 -item.crushedKashinite.name=粉碎硫铑钛铜矿石 -item.crushedCentrifugedKashinite.name=离心粉碎硫铑钛铜矿石 -item.crushedPurifiedKashinite.name=纯净粉碎硫铑钛铜矿石 -item.dustImpureKashinite.name=å«æ‚硫铑钛铜粉 -item.dustPureKashinite.name=纯净硫铑钛铜粉 -item.itemDustKashinite.name=硫铑钛铜粉 -item.itemDustTinyKashinite.name=å°æ’®ç¡«é“‘钛铜粉 -item.itemDustSmallKashinite.name=å°å †ç¡«é“‘钛铜粉 - -tile.OreRadioactiveMineralMix.name=奇异矿石 -item.crushedRadioactiveMineralMix.name=粉碎奇异矿石 -item.crushedCentrifugedRadioactiveMineralMix.name=离心粉碎奇异矿石 -item.crushedPurifiedRadioactiveMineralMix.name=纯净粉碎奇异矿石 -item.dustImpureRadioactiveMineralMix.name=å«æ‚奇异粉 -item.dustPureRadioactiveMineralMix.name=纯净奇异粉 -item.itemDustRadioactiveMineralMix.name=奇异粉 -item.itemDustTinyRadioactiveMineralMix.name=å°æ’®å¥‡å¼‚粉 -item.itemDustSmallRadioactiveMineralMix.name=å°å †å¥‡å¼‚粉 - -tile.OreDemicheleiteBr.name=é‡é—ªçŸ³(Br)矿石 -item.crushedDemicheleiteBr.name=粉碎é‡é—ªçŸ³(Br)矿石 -item.crushedCentrifugedDemicheleiteBr.name=离心粉碎é‡é—ªçŸ³(Br)矿石 -item.crushedPurifiedDemicheleiteBr.name=纯净粉碎é‡é—ªçŸ³(Br)矿石 -item.dustImpureDemicheleiteBr.name=å«æ‚é‡é—ªçŸ³(Br)粉 -item.dustPureDemicheleiteBr.name=纯净é‡é—ªçŸ³(Br)粉 -item.itemDustDemicheleiteBr.name=é‡é—ªçŸ³(Br)粉 - - -//Materials - -item.itemIngotTitansteel.name=æ³°å¦ç²¾é’¢ -item.itemHotIngotTitansteel.name=热泰å¦ç²¾é’¢ -item.itemDustTitansteel.name=æ³°å¦ç²¾é’¢ç²‰ -item.itemDustTinyTitansteel.name=å°æ’®æ³°å¦ç²¾é’¢ç²‰ -item.itemDustSmallTitansteel.name=å°å †æ³°å¦ç²¾é’¢ç²‰ -item.itemNuggetTitansteel.name=æ³°å¦ç²¾é’¢ç²’ -item.itemPlateTitansteel.name=æ³°å¦ç²¾é’¢æ¿ -item.itemPlateDoubleTitansteel.name=åŒé‡æ³°å¦ç²¾é’¢æ¿ -item.itemBoltTitansteel.name=æ³°å¦ç²¾é’¢èžºæ “ -item.itemRodTitansteel.name=æ³°å¦ç²¾é’¢æ† -item.itemRodLongTitansteel.name=é•¿æ³°å¦ç²¾é’¢æ† -item.itemRingTitansteel.name=æ³°å¦ç²¾é’¢çŽ¯ -item.itemScrewTitansteel.name=æ³°å¦ç²¾é’¢èžºä¸ -item.itemRotorTitansteel.name=æ³°å¦ç²¾é’¢è½¬å­ -item.itemGearTitansteel.name=æ³°å¦ç²¾é’¢é½¿è½® -item.itemCellTitansteel.name=æ³°å¦ç²¾é’¢å•å…ƒ -tile.Block of Titansteel.name=æ³°å¦ç²¾é’¢å— -tile.Titansteel Frame Box.name=æ³°å¦ç²¾é’¢æ¡†æž¶ - -item.itemIngotOctiron.name=八角é“é”­ -item.itemHotIngotOctiron.name=热八角é“é”­ -item.itemDustOctiron.name=八角é“粉 -item.itemDustTinyOctiron.name=å°æ’®å…«è§’é“粉 -item.itemDustSmallOctiron.name=å°å †å…«è§’é“粉 -item.itemNuggetOctiron.name=八角é“ç²’ -item.itemPlateOctiron.name=八角é“æ¿ -item.itemPlateDoubleOctiron.name=åŒé‡å…«è§’é“æ¿ -item.itemBoltOctiron.name=八角é“螺栓 -item.itemRodOctiron.name=八角é“æ† -item.itemRodLongOctiron.name=长八角é“æ† -item.itemRingOctiron.name=八角é“环 -item.itemScrewOctiron.name=八角é“èžºä¸ -item.itemRotorOctiron.name=八角é“è½¬å­ -item.itemGearOctiron.name=八角é“齿轮 -item.itemCellOctiron.name=八角é“å•å…ƒ -tile.Block of Octiron.name=八角é“å— -tile.Octiron Frame Box.name=八角é“框架 - -item.itemIngotWatertightSteel.name=防水钢锭 -item.itemHotIngotWatertightSteel.name=热防水钢锭 -item.itemDustWatertightSteel.name=防水钢粉 -item.itemDustTinyWatertightSteel.name=å°æ’®é˜²æ°´é’¢ç²‰ -item.itemDustSmallWatertightSteel.name=å°å †é˜²æ°´é’¢ç²‰ -item.itemNuggetWatertightSteel.name=防水钢粒 -item.itemPlateWatertightSteel.name=é˜²æ°´é’¢æ¿ -item.itemPlateDoubleWatertightSteel.name=åŒé‡é˜²æ°´é’¢æ¿ -item.itemBoltWatertightSteel.name=防水钢螺栓 -item.itemRodWatertightSteel.name=é˜²æ°´é’¢æ† -item.itemRodLongWatertightSteel.name=é•¿é˜²æ°´é’¢æ† -item.itemRingWatertightSteel.name=防水钢环 -item.itemScrewWatertightSteel.name=é˜²æ°´é’¢èžºä¸ -item.itemRotorWatertightSteel.name=é˜²æ°´é’¢è½¬å­ -item.itemGearWatertightSteel.name=防水钢齿轮 -item.itemCellWatertightSteel.name=防水钢å•å…ƒ -tile.Block of Watertight Steel.name=é˜²æ°´é’¢å— -tile.Watertight Steel Frame Box.name=防水钢框架 - -item.itemIngotCelestialTungsten.name=天体钨锭 -item.itemHotIngotCelestialTungsten.name=热天体钨锭 -item.itemDustCelestialTungsten.name=天体钨粉 -item.itemDustTinyCelestialTungsten.name=å°æ’®å¤©ä½“钨粉 -item.itemDustSmallCelestialTungsten.name=å°å †å¤©ä½“钨粉 -item.itemNuggetCelestialTungsten.name=天体钨粒 -item.itemPlateCelestialTungsten.name=å¤©ä½“é’¨æ¿ -item.itemPlateDoubleCelestialTungsten.name=åŒé‡å¤©ä½“é’¨æ¿ -item.itemBoltCelestialTungsten.name=天体钨螺栓 -item.itemRodCelestialTungsten.name=å¤©ä½“é’¨æ† -item.itemRodLongCelestialTungsten.name=é•¿å¤©ä½“é’¨æ† -item.itemRingCelestialTungsten.name=天体钨环 -item.itemScrewCelestialTungsten.name=å¤©ä½“é’¨èžºä¸ -item.itemRotorCelestialTungsten.name=å¤©ä½“é’¨è½¬å­ -item.itemGearCelestialTungsten.name=天体钨齿轮 -item.itemCellCelestialTungsten.name=天体钨å•å…ƒ -tile.Block of Celestial Tungsten.name=å¤©ä½“é’¨å— -tile.Celestial Tungsten Frame Box.name=天体钨框架 - -item.itemIngotHypogen.name=æµ·ç€çé”­ -item.itemHotIngotHypogen.name=热海ç€çé”­ -item.itemDustHypogen.name=æµ·ç€ç粉 -item.itemDustTinyHypogen.name=å°æ’®æµ·ç€ç粉 -item.itemDustSmallHypogen.name=å°å †æµ·ç€ç粉 -item.itemNuggetHypogen.name=æµ·ç€çç²’ -item.itemPlateHypogen.name=æµ·ç€çæ¿ -item.itemPlateDoubleHypogen.name=åŒé‡æµ·ç€çæ¿ -item.itemBoltHypogen.name=æµ·ç€ç螺栓 -item.itemRodHypogen.name=æµ·ç€çæ† -item.itemRodLongHypogen.name=é•¿æµ·ç€çæ† -item.itemRingHypogen.name=æµ·ç€ç环 -item.itemScrewHypogen.name=æµ·ç€çèžºä¸ -item.itemRotorHypogen.name=æµ·ç€çè½¬å­ -item.itemGearHypogen.name=æµ·ç€ç齿轮 -item.itemCellHypogen.name=æµ·ç€çå•å…ƒ -tile.Block of Hypogen.name=æµ·ç€çå— -tile.Hypogen Frame Box.name=æµ·ç€ç框架 - -item.itemIngotArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bé”­ -item.itemHotIngotArceusAlloy2B.name=热阿塞俄斯åˆé‡‘2Bé”­ -item.itemDustArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B粉 -item.itemDustTinyArceusAlloy2B.name=å°æ’®é˜¿å¡žä¿„æ–¯åˆé‡‘2B粉 -item.itemDustSmallArceusAlloy2B.name=å°å †é˜¿å¡žä¿„æ–¯åˆé‡‘2B粉 -item.itemNuggetArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bç²’ -item.itemPlateArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bæ¿ -item.itemPlateDoubleArceusAlloy2B.name=åŒé‡é˜¿å¡žä¿„æ–¯åˆé‡‘2Bæ¿ -item.itemBoltArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B螺栓 -item.itemRodArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bæ† -item.itemRodLongArceusAlloy2B.name=长阿塞俄斯åˆé‡‘2Bæ† -item.itemRingArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B环 -item.itemScrewArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bèžºä¸ -item.itemRotorArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bè½¬å­ -item.itemGearArceusAlloy2B.name=阿塞俄斯åˆé‡‘2B齿轮 -item.itemCellArceusAlloy2B.name=阿塞俄斯åˆé‡‘2Bå•å…ƒ -tile.Block of Arceus Alloy 2B.name=阿塞俄斯åˆé‡‘2Bå— -tile.Arceus Alloy 2B Frame Box.name=阿塞俄斯åˆé‡‘2B框架 - -item.itemIngotChromaticGlass.name=彩色玻璃锭 -item.itemHotIngotChromaticGlass.name=热彩色玻璃锭 -item.itemDustChromaticGlass.name=彩色玻璃粉 -item.itemDustTinyChromaticGlass.name=å°æ’®å½©è‰²çŽ»ç’ƒç²‰ -item.itemDustSmallChromaticGlass.name=å°å †å½©è‰²çŽ»ç’ƒç²‰ -item.itemNuggetChromaticGlass.name=彩色玻璃粒 -item.itemPlateChromaticGlass.name=å½©è‰²çŽ»ç’ƒæ¿ -item.itemPlateDoubleChromaticGlass.name=åŒé‡å½©è‰²çŽ»ç’ƒæ¿ -item.itemBoltChromaticGlass.name=彩色玻璃螺栓 -item.itemRodChromaticGlass.name=å½©è‰²çŽ»ç’ƒæ† -item.itemRodLongChromaticGlass.name=é•¿å½©è‰²çŽ»ç’ƒæ† -item.itemRingChromaticGlass.name=彩色玻璃环 -item.itemScrewChromaticGlass.name=å½©è‰²çŽ»ç’ƒèžºä¸ -item.itemRotorChromaticGlass.name=å½©è‰²çŽ»ç’ƒè½¬å­ -item.itemGearChromaticGlass.name=彩色玻璃齿轮 -item.itemCellChromaticGlass.name=彩色玻璃å•å…ƒ -tile.Block of Chromatic Glass.name=å½©è‰²çŽ»ç’ƒå— -tile.Chromatic Glass Frame Box.name=彩色玻璃框架 - -item.itemIngotAstralTitanium.name=星体钛锭 -item.itemHotIngotAstralTitanium.name=热星体钛锭 -item.itemDustAstralTitanium.name=星体钛粉 -item.itemDustTinyAstralTitanium.name=å°æ’®æ˜Ÿä½“钛粉 -item.itemDustSmallAstralTitanium.name=å°å †æ˜Ÿä½“钛粉 -item.itemNuggetAstralTitanium.name=星体钛粒 -item.itemPlateAstralTitanium.name=æ˜Ÿä½“é’›æ¿ -item.itemPlateDoubleAstralTitanium.name=åŒé‡æ˜Ÿä½“é’›æ¿ -item.itemBoltAstralTitanium.name=星体钛螺栓 -item.itemRodAstralTitanium.name=æ˜Ÿä½“é’›æ† -item.itemRodLongAstralTitanium.name=é•¿æ˜Ÿä½“é’›æ† -item.itemRingAstralTitanium.name=星体钛环 -item.itemScrewAstralTitanium.name=æ˜Ÿä½“é’›èžºä¸ -item.itemRotorAstralTitanium.name=æ˜Ÿä½“é’›è½¬å­ -item.itemGearAstralTitanium.name=星体钛齿轮 -item.itemCellAstralTitanium.name=星体钛å•å…ƒ -tile.Block of Astral Titanium.name=æ˜Ÿä½“é’›å— -tile.Astral Titanium Frame Box.name=星体钛框架 - -item.itemIngotTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘é”­ -item.itemHotIngotTungstenTitaniumCarbide.name=热碳化钨钛åˆé‡‘é”­ -item.itemDustTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘粉 -item.itemDustTinyTungstenTitaniumCarbide.name=å°æ’®ç¢³åŒ–钨钛åˆé‡‘粉 -item.itemDustSmallTungstenTitaniumCarbide.name=å°å †ç¢³åŒ–钨钛åˆé‡‘粉 -item.itemNuggetTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘ç²’ -item.itemPlateTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘æ¿ -item.itemPlateDoubleTungstenTitaniumCarbide.name=åŒé‡ç¢³åŒ–钨钛åˆé‡‘æ¿ -item.itemBoltTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘螺栓 -item.itemRodTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘æ† -item.itemRodLongTungstenTitaniumCarbide.name=长碳化钨钛åˆé‡‘æ† -item.itemRingTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘环 -item.itemScrewTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘èžºä¸ -item.itemRotorTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘è½¬å­ -item.itemGearTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘齿轮 -item.itemCellTungstenTitaniumCarbide.name=碳化钨钛åˆé‡‘å•å…ƒ -tile.Block of Tungsten Titanium Carbide.name=碳化钨钛åˆé‡‘å— -tile.Tungsten Titanium Carbide Frame Box.name=碳化钨钛åˆé‡‘框架 - -item.itemIngotNitinol60.name=é•é’›è¯º60é”­ -item.itemHotIngotNitinol60.name=热é•é’›è¯º60é”­ -item.itemDustNitinol60.name=é•é’›è¯º60粉 -item.itemDustTinyNitinol60.name=å°æ’®é•é’›è¯º60粉 -item.itemDustSmallNitinol60.name=å°å †é•é’›è¯º60粉 -item.itemNuggetNitinol60.name=é•é’›è¯º60ç²’ -item.itemPlateNitinol60.name=é•é’›è¯º60æ¿ -item.itemPlateDoubleNitinol60.name=åŒé‡é•é’›è¯º60æ¿ -item.itemBoltNitinol60.name=é•é’›è¯º60螺栓 -item.itemRodNitinol60.name=é•é’›è¯º60æ† -item.itemRodLongNitinol60.name=é•¿é•é’›è¯º60æ† -item.itemRingNitinol60.name=é•é’›è¯º60环 -item.itemScrewNitinol60.name=é•é’›è¯º60èžºä¸ -item.itemRotorNitinol60.name=é•é’›è¯º60è½¬å­ -item.itemGearNitinol60.name=é•é’›è¯º60齿轮 -item.itemCellNitinol60.name=é•é’›è¯º60å•å…ƒ -tile.Block of Nitinol 60.name=é•é’›è¯º60å— -tile.Nitinol 60 Frame Box.name=é•é’›è¯º60框架 - -item.itemIngotAdvancedNitinol.name=高级é•é’›è¯ºé”­ -item.itemHotIngotAdvancedNitinol.name=热高级é•é’›è¯ºé”­ -item.itemDustAdvancedNitinol.name=高级é•é’›è¯ºç²‰ -item.itemDustTinyAdvancedNitinol.name=å°æ’®é«˜çº§é•é’›è¯ºç²‰ -item.itemDustSmallAdvancedNitinol.name=å°å †é«˜çº§é•é’›è¯ºç²‰ -item.itemNuggetAdvancedNitinol.name=高级é•é’›è¯ºç²’ -item.itemPlateAdvancedNitinol.name=高级é•é’›è¯ºæ¿ -item.itemPlateDoubleAdvancedNitinol.name=åŒé‡é«˜çº§é•é’›è¯ºæ¿ -item.itemBoltAdvancedNitinol.name=高级é•é’›è¯ºèžºæ “ -item.itemRodAdvancedNitinol.name=高级é•é’›è¯ºæ† -item.itemRodLongAdvancedNitinol.name=长高级é•é’›è¯ºæ† -item.itemRingAdvancedNitinol.name=高级é•é’›è¯ºçŽ¯ -item.itemScrewAdvancedNitinol.name=高级é•é’›è¯ºèžºä¸ -item.itemRotorAdvancedNitinol.name=高级é•é’›è¯ºè½¬å­ -item.itemGearAdvancedNitinol.name=高级é•é’›è¯ºé½¿è½® -item.itemCellAdvancedNitinol.name=高级é•é’›è¯ºå•å…ƒ -tile.Block of Advanced Nitinol.name=高级é•é’›è¯ºå— -tile.Advanced Nitinol Frame Box.name=高级é•é’›è¯ºæ¡†æž¶ - -item.itemIngotArcanite.name=奥金锭 -item.itemHotIngotArcanite.name=热奥金锭 -item.itemDustArcanite.name=奥金粉 -item.itemDustTinyArcanite.name=å°æ’®å¥¥é‡‘粉 -item.itemDustSmallArcanite.name=å°å †å¥¥é‡‘粉 -item.itemNuggetArcanite.name=奥金粒 -item.itemPlateArcanite.name=å¥¥é‡‘æ¿ -item.itemPlateDoubleArcanite.name=åŒé‡å¥¥é‡‘æ¿ -item.itemBoltArcanite.name=奥金螺栓 -item.itemRodArcanite.name=å¥¥é‡‘æ† -item.itemRodLongArcanite.name=é•¿å¥¥é‡‘æ† -item.itemRingArcanite.name=奥金环 -item.itemScrewArcanite.name=å¥¥é‡‘èžºä¸ -item.itemRotorArcanite.name=å¥¥é‡‘è½¬å­ -item.itemGearArcanite.name=奥金齿轮 -item.itemCellArcanite.name=奥金å•å…ƒ -tile.Block of Arcanite.name=å¥¥é‡‘å— -tile.Arcanite Frame Box.name=奥金框架 - -item.itemIngotPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bé”­ -item.itemHotIngotPikyonium64B.name=热皮å¡ä¼˜åˆé‡‘64Bé”­ -item.itemDustPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B粉 -item.itemDustTinyPikyonium64B.name=å°æ’®çš®å¡ä¼˜åˆé‡‘64B粉 -item.itemDustSmallPikyonium64B.name=å°å †çš®å¡ä¼˜åˆé‡‘64B粉 -item.itemNuggetPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bç²’ -item.itemPlatePikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bæ¿ -item.itemPlateDoublePikyonium64B.name=åŒé‡çš®å¡ä¼˜åˆé‡‘64Bæ¿ -item.itemBoltPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B螺栓 -item.itemRodPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bæ† -item.itemRodLongPikyonium64B.name=é•¿çš®å¡ä¼˜åˆé‡‘64Bæ† -item.itemRingPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B环 -item.itemScrewPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bèžºä¸ -item.itemRotorPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bè½¬å­ -item.itemGearPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64B齿轮 -item.itemCellPikyonium64B.name=çš®å¡ä¼˜åˆé‡‘64Bå•å…ƒ -tile.Block of Pikyonium 64B.name=çš®å¡ä¼˜åˆé‡‘64Bå— -tile.Pikyonium 64B Frame Box.name=çš®å¡ä¼˜åˆé‡‘64B框架 - -item.itemIngotCinobiteA243.name=西诺æŸA243é”­ -item.itemHotIngotCinobiteA243.name=热西诺æŸA243é”­ -item.itemDustCinobiteA243.name=西诺æŸA243粉 -item.itemDustTinyCinobiteA243.name=å°æ’®è¥¿è¯ºæŸA243粉 -item.itemDustSmallCinobiteA243.name=å°å †è¥¿è¯ºæŸA243粉 -item.itemNuggetCinobiteA243.name=西诺æŸA243ç²’ -item.itemPlateCinobiteA243.name=西诺æŸA243æ¿ -item.itemPlateDoubleCinobiteA243.name=åŒé‡è¥¿è¯ºæŸA243æ¿ -item.itemBoltCinobiteA243.name=西诺æŸA243螺栓 -item.itemRodCinobiteA243.name=西诺æŸA243æ† -item.itemRodLongCinobiteA243.name=长西诺æŸA243æ† -item.itemRingCinobiteA243.name=西诺æŸA243环 -item.itemScrewCinobiteA243.name=西诺æŸA243èžºä¸ -item.itemRotorCinobiteA243.name=西诺æŸA243è½¬å­ -item.itemGearCinobiteA243.name=西诺æŸA243齿轮 -item.itemCellCinobiteA243.name=西诺æŸA243å•å…ƒ -tile.Block of Cinobite A243.name=西诺æŸA243å— -tile.Cinobite A243 Frame Box.name=西诺æŸA243框架 - -item.itemIngotLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©é”­ -item.itemHotIngotLafiumCompound.name=热路è²æ©åŒ–åˆç‰©é”­ -item.itemDustLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©ç²‰ -item.itemDustTinyLafiumCompound.name=å°æ’®è·¯è²æ©åŒ–åˆç‰©ç²‰ -item.itemDustSmallLafiumCompound.name=å°å †è·¯è²æ©åŒ–åˆç‰©ç²‰ -item.itemNuggetLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©ç²’ -item.itemPlateLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©æ¿ -item.itemPlateDoubleLafiumCompound.name=åŒé‡è·¯è²æ©åŒ–åˆç‰©æ¿ -item.itemBoltLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©èžºæ “ -item.itemRodLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©æ† -item.itemRodLongLafiumCompound.name=é•¿è·¯è²æ©åŒ–åˆç‰©æ† -item.itemRingLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©çŽ¯ -item.itemScrewLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©èžºä¸ -item.itemRotorLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©è½¬å­ -item.itemGearLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©é½¿è½® -item.itemCellLafiumCompound.name=è·¯è²æ©åŒ–åˆç‰©å•å…ƒ -tile.Block of Lafium Compound.name=è·¯è²æ©åŒ–åˆç‰©å— -tile.Lafium Compound Frame Box.name=è·¯è²æ©åŒ–åˆç‰©æ¡†æž¶ - -item.itemIngotKoboldite.name=妖金锭 -item.itemHotIngotKoboldite.name=热妖金锭 -item.itemDustKoboldite.name=妖金粉 -item.itemDustTinyKoboldite.name=å°æ’®å¦–金粉 -item.itemDustSmallKoboldite.name=å°å †å¦–金粉 -item.itemNuggetKoboldite.name=妖金粒 -item.itemPlateKoboldite.name=å¦–é‡‘æ¿ -item.itemPlateDoubleKoboldite.name=åŒé‡å¦–é‡‘æ¿ -item.itemBoltKoboldite.name=妖金螺栓 -item.itemRodKoboldite.name=å¦–é‡‘æ† -item.itemRodLongKoboldite.name=é•¿å¦–é‡‘æ† -item.itemRingKoboldite.name=妖金环 -item.itemScrewKoboldite.name=å¦–é‡‘èžºä¸ -item.itemRotorKoboldite.name=å¦–é‡‘è½¬å­ -item.itemGearKoboldite.name=妖金齿轮 -item.itemCellKoboldite.name=妖金å•å…ƒ -tile.Block of Koboldite.name=å¦–é‡‘å— -tile.Koboldite Frame Box.name=妖金框架 - -item.itemIngotAbyssalAlloy.name=深渊åˆé‡‘é”­ -item.itemHotIngotAbyssalAlloy.name=热深渊åˆé‡‘é”­ -item.itemDustAbyssalAlloy.name=深渊åˆé‡‘粉 -item.itemDustTinyAbyssalAlloy.name=å°æ’®æ·±æ¸Šåˆé‡‘粉 -item.itemDustSmallAbyssalAlloy.name=å°å †æ·±æ¸Šåˆé‡‘粉 -item.itemNuggetAbyssalAlloy.name=深渊åˆé‡‘ç²’ -item.itemPlateAbyssalAlloy.name=深渊åˆé‡‘æ¿ -item.itemPlateDoubleAbyssalAlloy.name=åŒé‡æ·±æ¸Šåˆé‡‘æ¿ -item.itemBoltAbyssalAlloy.name=深渊åˆé‡‘螺栓 -item.itemRodAbyssalAlloy.name=深渊åˆé‡‘æ† -item.itemRodLongAbyssalAlloy.name=长深渊åˆé‡‘æ† -item.itemRingAbyssalAlloy.name=深渊åˆé‡‘环 -item.itemScrewAbyssalAlloy.name=深渊åˆé‡‘èžºä¸ -item.itemRotorAbyssalAlloy.name=深渊åˆé‡‘è½¬å­ -item.itemGearAbyssalAlloy.name=深渊åˆé‡‘齿轮 -item.itemCellAbyssalAlloy.name=深渊åˆé‡‘å•å…ƒ -tile.Block of Abyssal Alloy.name=深渊åˆé‡‘å— -tile.Abyssal Alloy Frame Box.name=深渊åˆé‡‘框架 - - - - - - - - - - - - - - - - - - - -//Radioactive -item.dustTechnetium99M.name=é”99M粉 -item.dustTechnetium99.name=é”99粉 -item.dustMolybdenum99.name=é’¼99粉 - -//Bags -item.item.MysticBag.name=神秘袋 -item.item.Eatotron9000.name=埃托特洛尼克9000åž‹ -item.item.ToolBox.name=工人的工具箱 - -//Cells -item.Bromine.name=溴å•å…ƒ -item.Krypton.name=æ°ªå•å…ƒ -item.cryotheum.name=凛冰å•å…ƒ -item.pyrotheum.name=烈焰之炽焱å•å…ƒ -item.GeneticMutagen.name=诱å˜å‰‚å•å…ƒ - -//Ingots -item.itemHotIngotIncoloy020.name=热è€çƒ­é“¬é“åˆé‡‘-020é”­ -item.itemHotIngotIncoloyDS.name=热è€çƒ­é“¬é“åˆé‡‘-DSé”­ -item.itemHotIngotTalonite.name=热铬钴磷酸ç›åˆé‡‘é”­ -item.itemHotIngotHastelloyX.name=热哈斯特洛ä¾åˆé‡‘-Xé”­ -item.itemHotIngotHastelloyW.name=热哈斯特洛ä¾åˆé‡‘-W碳化物锭 - -//Railcraft Fix -item.railcraft.part.plate.lead.name=é“…æ¿ - -//Ions -item.particle.ion.Hydrogen.name=æ°¢ç¦»å­ -item.particle.ion.Helium.name=æ°¦ç¦»å­ -item.particle.ion.Lithium.name=é”‚ç¦»å­ -item.particle.ion.Beryllium.name=é“ç¦»å­ -item.particle.ion.Boron.name=ç¡¼ç¦»å­ -item.particle.ion.Carbon.name=ç¢³ç¦»å­ -item.particle.ion.Nitrogen.name=æ°®ç¦»å­ -item.particle.ion.Oxygen.name=æ°§ç¦»å­ -item.particle.ion.Fluorine.name=æ°Ÿç¦»å­ -item.particle.ion.Neon.name=æ°–ç¦»å­ -item.particle.ion.Sodium.name=é’ ç¦»å­ -item.particle.ion.Magnesium.name=é•ç¦»å­ -item.particle.ion.Aluminum.name=é“ç¦»å­ -item.particle.ion.Silicon.name=ç¡…ç¦»å­ -item.particle.ion.Phosphorus.name=ç£·ç¦»å­ -item.particle.ion.Sulfur.name=ç¡«ç¦»å­ -item.particle.ion.Chlorine.name=æ°¯ç¦»å­ -item.particle.ion.Argon.name=æ°©ç¦»å­ -item.particle.ion.Potassium.name=é’¾ç¦»å­ -item.particle.ion.Calcium.name=é’™ç¦»å­ -item.particle.ion.Scandium.name=é’ªç¦»å­ -item.particle.ion.Titanium.name=é’›ç¦»å­ -item.particle.ion.Vanadium.name=é’’ç¦»å­ -item.particle.ion.Chromium.name=é“¬ç¦»å­ -item.particle.ion.Manganese.name=é”°ç¦»å­ -item.particle.ion.Iron.name=é“ç¦»å­ -item.particle.ion.Cobalt.name=é’´ç¦»å­ -item.particle.ion.Nickel.name=é•ç¦»å­ -item.particle.ion.Copper.name=é“œç¦»å­ -item.particle.ion.Zinc.name=é”Œç¦»å­ -item.particle.ion.Gallium.name=é•“ç¦»å­ -item.particle.ion.Germanium.name=é”—ç¦»å­ -item.particle.ion.Arsenic.name=ç ·ç¦»å­ -item.particle.ion.Selenium.name=ç¡’ç¦»å­ -item.particle.ion.Bromine.name=æº´ç¦»å­ -item.particle.ion.Krypton.name=æ°ªç¦»å­ -item.particle.ion.Rubidium.name=é“·ç¦»å­ -item.particle.ion.Strontium.name=é”¶ç¦»å­ -item.particle.ion.Yttrium.name=é’‡ç¦»å­ -item.particle.ion.Zirconium.name=é”†ç¦»å­ -item.particle.ion.Niobium.name=é“Œç¦»å­ -item.particle.ion.Molybdenum.name=é’¼ç¦»å­ -item.particle.ion.Technetium.name=é”ç¦»å­ -item.particle.ion.Ruthenium.name=é’Œç¦»å­ -item.particle.ion.Rhodium.name=é“‘ç¦»å­ -item.particle.ion.Palladium.name=é’¯ç¦»å­ -item.particle.ion.Silver.name=é“¶ç¦»å­ -item.particle.ion.Cadmium.name=é•‰ç¦»å­ -item.particle.ion.Indium.name=é“Ÿç¦»å­ -item.particle.ion.Tin.name=é”¡ç¦»å­ -item.particle.ion.Antimony.name=é”‘ç¦»å­ -item.particle.ion.Tellurium.name=ç¢²ç¦»å­ -item.particle.ion.Iodine.name=ç¢˜ç¦»å­ -item.particle.ion.Xenon.name=æ°™ç¦»å­ -item.particle.ion.Cesium.name=é“¯ç¦»å­ -item.particle.ion.Barium.name=é’¡ç¦»å­ -item.particle.ion.Lanthanum.name=é•§ç¦»å­ -item.particle.ion.Cerium.name=é“ˆç¦»å­ -item.particle.ion.Praseodymium.name=é•¨ç¦»å­ -item.particle.ion.Neodymium.name=é’•ç¦»å­ -item.particle.ion.Promethium.name=é’·ç¦»å­ -item.particle.ion.Samarium.name=é’ç¦»å­ -item.particle.ion.Europium.name=é“•ç¦»å­ -item.particle.ion.Gadolinium.name=é’†ç¦»å­ -item.particle.ion.Terbium.name=é“½ç¦»å­ -item.particle.ion.Dysprosium.name=é•ç¦»å­ -item.particle.ion.Holmium.name=é’¬ç¦»å­ -item.particle.ion.Erbium.name=é“’ç¦»å­ -item.particle.ion.Thulium.name=é“¥ç¦»å­ -item.particle.ion.Ytterbium.name=é•±ç¦»å­ -item.particle.ion.Lutetium.name=é•ç¦»å­ -item.particle.ion.Hafnium.name=é“ªç¦»å­ -item.particle.ion.Tantalum.name=é’½ç¦»å­ -item.particle.ion.Tungsten.name=é’¨ç¦»å­ -item.particle.ion.Rhenium.name=é“¼ç¦»å­ -item.particle.ion.Osmium.name=é”‡ç¦»å­ -item.particle.ion.Iridium.name=é“±ç¦»å­ -item.particle.ion.Platinum.name=é“‚ç¦»å­ -item.particle.ion.Gold.name=é‡‘ç¦»å­ -item.particle.ion.Mercury.name=æ±žç¦»å­ -item.particle.ion.Thallium.name=é“Šç¦»å­ -item.particle.ion.Lead.name=é“…ç¦»å­ -item.particle.ion.Bismuth.name=é“‹ç¦»å­ -item.particle.ion.Polonium.name=é’‹ç¦»å­ -item.particle.ion.Astatine.name=ç ¹ç¦»å­ -item.particle.ion.Radon.name=æ°¡ç¦»å­ -item.particle.ion.Francium.name=é’«ç¦»å­ -item.particle.ion.Radium.name=é•­ç¦»å­ -item.particle.ion.Actinium.name=é”•ç¦»å­ -item.particle.ion.Thorium.name=é’ç¦»å­ -item.particle.ion.Protactinium.name=é•¤ç¦»å­ -item.particle.ion.Uranium.name=é“€ç¦»å­ -item.particle.ion.Neptunium.name=é•Žç¦»å­ -item.particle.ion.Plutonium.name=é’šç¦»å­ -item.particle.ion.Americium.name=é•…ç¦»å­ -item.particle.ion.Curium.name=é””ç¦»å­ -item.particle.ion.Berkelium.name=é”«ç¦»å­ -item.particle.ion.Californium.name=é”Žç¦»å­ -item.particle.ion.Einsteinium.name=é”¿ç¦»å­ -item.particle.ion.Fermium.name=é•„ç¦»å­ -item.particle.ion.Mendelevium.name=é’”ç¦»å­ -item.particle.ion.Nobelium.name=é”˜ç¦»å­ -item.particle.ion.Lawrencium.name=é“¹ç¦»å­ -item.particle.ion.Rutherfordium.name=î¤€ç¦»å­ -item.particle.ion.Dubnium.name=î¤ç¦»å­ -item.particle.ion.Seaborgium.name=î¤‚ç¦»å­ -item.particle.ion.Bohrium.name=î¤ƒç¦»å­ -item.particle.ion.Hassium.name=î¤„ç¦»å­ -item.particle.ion.Meitnerium.name=é¿ç¦»å­ -item.particle.ion.Darmstadtium.name=î¤†ç¦»å­ -item.particle.ion.Roentgenium.name=î¤‡ç¦»å­ -item.particle.ion.Copernicium.name=é¿”ç¦»å­ -item.particle.ion.Nihonium.name=é¿­ç¦»å­ -item.particle.ion.Flerovium.name=î¤Šç¦»å­ -item.particle.ion.Moscovium.name=é•†ç¦»å­ -item.particle.ion.Livermorium.name=î¤Œç¦»å­ -item.particle.ion.Tennessine.name=é¿¬ç¦»å­ -item.particle.ion.Oganesson.name=é¿«ç¦»å­ - - -item.particle.base.Graviton.name=å¼•åŠ›å­ -item.particle.base.Up.name=u夸克 -item.particle.base.Down.name=b夸克 -item.particle.base.Charm.name=c夸克 -item.particle.base.Strange.name=s夸克 -item.particle.base.Top.name=t夸克 -item.particle.base.Bottom.name=b夸克 -item.particle.base.Electron.name=eå­ -item.particle.base.Electron Neutrino.name=eå­ä¸­å¾®å­ -item.particle.base.Muon.name=Î¼å­ -item.particle.base.Muon Neutrino.name=μå­ä¸­å¾®å­ -item.particle.base.Tau.name=Ï„å­ -item.particle.base.Tau Neutrino.name=Ï„å­ä¸­å¾®å­ -item.particle.base.Gluon.name=èƒ¶å­ -item.particle.base.Photon.name=å…‰å­ -item.particle.base.Z Boson.name=ZçŽ»è‰²å­ -item.particle.base.W Boson.name=WçŽ»è‰²å­ -item.particle.base.Higgs Boson.name=å¸Œæ ¼æ–¯çŽ»è‰²å­ -item.particle.base.Proton.name=è´¨å­ -item.particle.base.Neutron.name=ä¸­å­ -item.particle.base.Lambda.name=λ -item.particle.base.Omega.name=Ω -item.particle.base.Pion.name=ä»‹å­ -item.particle.base.ETA Meson.name=Î·ä»‹å­ -item.particle.base.Unknown.name=æœªçŸ¥ç²’å­ - -//Added 12/1/19 - -tile.playerDoorGlass.name=玻璃自动门 -tile.playerDoorCactus.name=仙人掌自动门 -tile.playerDoorIce.name=冰自动门 -tile.playerDoorIron.name=é“自动门 -tile.playerDoorWood.name=木自动门 - -//Added 4/2/19 - -item.GTPP.BattPack.06.name=充电工具包[LuV] -item.GTPP.BattPack.07.name=充电工具包[ZPM] -item.GTPP.BattPack.08.name=充电工具包[UV] -item.GTPP.BattPack.09.name=充电工具包[MAX] - - -//Added 13/3/19 -item.gtpp.debug.scanner.name=GT++排错扫æ器 -item.RawWaste.name=动物粪便å•å…ƒ -item.ManureSlurry.name=粪浆å•å…ƒ -item.FertileManureSlurry.name=肥沃的粪浆å•å…ƒ -item.itemDustTinyDemicheleiteBr.name=å°æ’®å¾·ç±³å‡¯èŽ±(Br) -item.itemDustSmallDemicheleiteBr.name=å°å †å¾·ç±³å‡¯èŽ±(Br) -tile.blockPooCollector.name=å†œä¸šä¸‹æ°´é“ -tile.Block of Lithium 7.name=锂7å— - -//Added 14/3/19 -item.blood.name=è¡€å•å…ƒ -item.aniline.name=苯胺å•å…ƒ -item.cadaverine.name=尸胺å•å…ƒ -item.polyurethane.name=èšæ°¨é…¯å•å…ƒ -item.putrescine.name=è…胺å•å…ƒ -item.cyclohexane.name=环己胺å•å…ƒ -item.cyclohexanone.name=环己酮å•å…ƒ -item.nitrobenzene.name=ç¡åŸºè‹¯å•å…ƒ -item.ender.name=液体末影å•å…ƒ -item.xpjuice.name=液体ç»éªŒå•å…ƒ -item.itemBombUnf.name=å¯æŠ•æŽ·ç‚¸å¼¹(未完æˆ) -item.itemBombCasing.name=炸弹框架 -item.gtpp.throwable.bomb.name=å¯æŠ•æŽ·ç‚¸å¼¹ -item.itemDetCable.name=炸弹ä¿é™©ä¸ -tile.blockPooCollector.0.name=å†œä¸šä¸‹æ°´é“ -tile.blockPooCollector.8.name=生物å¤åˆæ”¶é›†å™¨ -item.itemIngotBakelite.name=电木锭 -item.itemDustBakelite.name=电木粉 -item.itemDustTinyBakelite.name=å°æ’®ç”µæœ¨ç²‰ -item.itemDustSmallBakelite.name=å°å †ç”µæœ¨ç²‰ -item.itemNuggetBakelite.name=电木粒 -item.itemPlateBakelite.name=ç”µæœ¨æ¿ -item.itemPlateDoubleBakelite.name=åŒé‡ç”µæœ¨æ¿ -item.itemCellBakelite.name=电木å•å…ƒ -tile.Block of Bakelite.name=ç”µæœ¨å— -item.itemIngotNylon.name=尼龙锭 -item.itemDustNylon.name=尼龙粉 -item.itemDustTinyNylon.name=å°æ’®å°¼é¾™ç²‰ -item.itemDustSmallNylon.name=å°å †å°¼é¾™ç²‰ -item.itemNuggetNylon.name=尼龙粒 -item.itemPlateNylon.name=å°¼é¾™æ¿ -item.itemPlateDoubleNylon.name=åŒé‡å°¼é¾™æ¿ -item.itemCellNylon.name=尼龙å•å…ƒ -tile.Block of Nylon.name=å°¼é¾™å— -item.itemIngotTeflon.name=特氟龙锭 -item.itemDustTeflon.name=特氟龙粉 -item.itemDustTinyTeflon.name=å°æ’®ç‰¹æ°Ÿé¾™ç²‰ -item.itemDustSmallTeflon.name=å°å †ç‰¹æ°Ÿé¾™ç²‰ -item.itemNuggetTeflon.name=特氟龙粒 -item.itemPlateTeflon.name=ç‰¹æ°Ÿé¾™æ¿ -item.itemPlateDoubleTeflon.name=åŒé‡ç‰¹æ°Ÿé¾™æ¿ -item.itemCellTeflon.name=特氟龙å•å…ƒ -tile.Block of Teflon.name=ç‰¹æ°Ÿé¾™å— - -//Added 17/4/19 -//Spelling Corrections -item.particle.ion.Aluminium.name=é“ç¦»å­ -item.particle.ion.Caesium.name=é“¯ç¦»å­ - -item.GTPP.MonsterKiller.Enderman.name=末影人æ€æ‰‹ -item.GTPP.MonsterKiller.Spider.name=蜘蛛æ€æ‰‹ -item.GTPP.MonsterKiller.Skeleton.name=骷髅æ€æ‰‹ -item.GTPP.MonsterKiller.Creeper.name=爬行者æ€æ‰‹ -item.GTPP.MonsterKiller.Zombie.name=僵尸æ€æ‰‹ -item.GTPP.MonsterKiller.Hellish.name=下界生物æ€æ‰‹ - -item.itemIngotRunite.name=虚æ©é”­ -item.itemDustRunite.name=虚æ©ç²‰ -item.itemDustTinyRunite.name=å°æ’®è™šæ©ç²‰ -item.itemDustSmallRunite.name=å°å †è™šæ©ç²‰ -item.itemNuggetRunite.name=虚æ©é”­ -item.itemPlateRunite.name=虚æ©æ¿ -item.itemPlateDoubleRunite.name=åŒé‡è™šæ©æ¿ -item.itemCellRunite.name=虚æ©å•å…ƒ -tile.Block of Runite.name=虚æ©å— - -item.itemIngotDragonblood.name=龙血锭 -item.itemDustDragonblood.name=龙血粉 -item.itemDustTinyDragonblood.name=å°æ’®é¾™è¡€ç²‰ -item.itemDustSmallDragonblood.name=å°å †é¾™è¡€ç²‰ -item.itemNuggetDragonblood.name=龙血粒 -item.itemPlateDragonblood.name=é¾™è¡€æ¿ -item.itemPlateDoubleDragonblood.name=åŒé‡é¾™è¡€æ¿ -item.itemCellDragonblood.name=龙血å•å…ƒ -tile.Block of Dragonblood.name=é¾™è¡€å— - -item.itemIngotBlackTitanium.name=黑钛锭 -item.itemDustBlackTitanium.name=黑钛粉 -item.itemDustTinyBlackTitanium.name=å°æ’®é»‘钛粉 -item.itemDustSmallBlackTitanium.name=å°å †é»‘钛粉 -item.itemNuggetBlackTitanium.name=黑钛粒 -item.itemPlateBlackTitanium.name=é»‘é’›æ¿ -item.itemPlateDoubleBlackTitanium.name=åŒé‡é»‘é’›æ¿ -item.itemCellBlackTitanium.name=黑钛å•å…ƒ -tile.Block of Black Titanium.name=é»‘é’›å— - -item.itemIngotAncientGranite.name=å¤èŠ±å²—岩锭 -item.itemHotIngotAncientGranite.name=热å¤èŠ±å²—岩锭 -item.itemDustAncientGranite.name=å¤èŠ±å²—岩粉 -item.itemDustTinyAncientGranite.name=å°æ’®å¤èŠ±å²—岩粉 -item.itemDustSmallAncientGranite.name=å°å †å¤èŠ±å²—岩粉 -item.itemNuggetAncientGranite.name=å¤èŠ±å²—岩粒 -item.itemPlateAncientGranite.name=å¤èŠ±å²—å²©æ¿ -item.itemPlateDoubleAncientGranite.name=åŒé‡å¤èŠ±å²—å²©æ¿ -tile.Block of Ancient Granite.name=å¤èŠ±å²—å²©å— - -item.itemIngotBabbitAlloy.name=å·´æ°åˆé‡‘é”­ -item.itemHotIngotBabbitAlloy.name=热巴æ°åˆé‡‘é”­ -item.itemDustBabbitAlloy.name=å·´æ°åˆé‡‘粉 -item.itemDustTinyBabbitAlloy.name=å°æ’®å·´æ°åˆé‡‘粉 -item.itemDustSmallBabbitAlloy.name=å°å †å·´æ°åˆé‡‘粉 -item.itemNuggetBabbitAlloy.name=å·´æ°åˆé‡‘ç²’ -item.itemPlateBabbitAlloy.name=å·´æ°åˆé‡‘æ¿ -item.itemPlateDoubleBabbitAlloy.name=åŒé‡å·´æ°åˆé‡‘æ¿ -item.itemCellBabbitAlloy.name=å·´æ°åˆé‡‘å•å…ƒ -tile.Block of Babbit Alloy.name=å·´æ°åˆé‡‘å— - -item.itemIngotBlackMetal.name=黑物质锭 -item.itemHotIngotBlackMetal.name=热黑物质锭 -item.itemDustBlackMetal.name=黑物质粉 -item.itemDustTinyBlackMetal.name=å°æ’®é»‘物质粉 -item.itemDustSmallBlackMetal.name=å°å †é»‘物质粉 -item.itemNuggetBlackMetal.name=黑物质粒 -item.itemPlateBlackMetal.name=é»‘ç‰©è´¨æ¿ -item.itemPlateDoubleBlackMetal.name=åŒé‡é»‘ç‰©è´¨æ¿ -item.itemBoltBlackMetal.name=黑物质螺栓 -item.itemRodBlackMetal.name=é»‘ç‰©è´¨æ† -item.itemRodLongBlackMetal.name=é•¿é»‘ç‰©è´¨æ† -item.itemRingBlackMetal.name=黑物质环 -item.itemScrewBlackMetal.name=é»‘ç‰©è´¨èžºä¸ -item.itemRotorBlackMetal.name=é»‘ç‰©è´¨è½¬å­ -item.itemGearBlackMetal.name=黑物质齿轮 -item.itemCellBlackMetal.name=黑物质å•å…ƒ -tile.Block of Black Metal.name=é»‘ç‰©è´¨å— -tile.Black Metal Frame Box.name=黑物质框架 - -item.itemIngotWhiteMetal.name=白物质锭 -item.itemHotIngotWhiteMetal.name=热白物质锭 -item.itemDustWhiteMetal.name=白物质粉 -item.itemDustTinyWhiteMetal.name=å°æ’®ç™½ç‰©è´¨ç²‰ -item.itemDustSmallWhiteMetal.name=å°å †ç™½ç‰©è´¨ç²‰ -item.itemNuggetWhiteMetal.name=白物质粒 -item.itemPlateWhiteMetal.name=ç™½ç‰©è´¨æ¿ -item.itemPlateDoubleWhiteMetal.name=åŒé‡ç™½ç‰©è´¨æ¿ -item.itemBoltWhiteMetal.name=白物质螺栓 -item.itemRodWhiteMetal.name=ç™½ç‰©è´¨æ† -item.itemRodLongWhiteMetal.name=é•¿ç™½ç‰©è´¨æ† -item.itemRingWhiteMetal.name=白物质环 -item.itemScrewWhiteMetal.name=ç™½ç‰©è´¨èžºä¸ -item.itemRotorWhiteMetal.name=ç™½ç‰©è´¨è½¬å­ -item.itemGearWhiteMetal.name=白物质齿轮 -item.itemCellWhiteMetal.name=白物质å•å…ƒ -tile.Block of White Metal.name=ç™½ç‰©è´¨å— -tile.White Metal Frame Box.name=白物质框架 - -//Added 29/04/2019 -tile.OreRunite.name=虚æ©çŸ¿ -item.crushedRunite.name=粉碎的虚æ©çŸ¿ -item.crushedCentrifugedRunite.name=离心的粉碎虚æ©çŸ¿ -item.crushedPurifiedRunite.name=洗净的的粉碎虚æ©çŸ¿ -item.dustImpureRunite.name=å«æ‚虚æ©ç²‰ -item.dustPureRunite.name=洗净虚æ©ç²‰ - -tile.OreAncientGranite.name=å¤èŠ±å²—岩矿 -item.crushedAncientGranite.name=粉碎的å¤èŠ±å²—岩矿 -item.crushedCentrifugedAncientGranite.name=离心的粉碎å¤èŠ±å²—岩矿 -item.crushedPurifiedAncientGranite.name=洗净的粉碎å¤èŠ±å²—岩矿 -item.dustImpureAncientGranite.name=å«æ‚å¤èŠ±å²—岩粉 -item.dustPureAncientGranite.name=洗净å¤èŠ±å²—岩粉 - -item.itemIngotRhugnor.name=é²æ ¼è¯ºé”­ -item.itemDustRhugnor.name=é²æ ¼è¯ºç²‰ -item.itemDustTinyRhugnor.name=å°æ’®é²æ ¼è¯ºç²‰ -item.itemDustSmallRhugnor.name=å°å †é²æ ¼è¯ºç²‰ -item.itemNuggetRhugnor.name=é²æ ¼è¯ºç²’ -item.itemPlateRhugnor.name=é²æ ¼è¯ºæ¿ -item.itemPlateDoubleRhugnor.name=åŒé‡é²æ ¼è¯ºæ¿ -item.itemCellRhugnor.name=é²æ ¼è¯ºå•å…ƒ -tile.Block of Rhugnor.name=é²æ ¼è¯ºå— - - - - -//Added 13/5/19 - -item.GTPP.BattPack.01.name=充电工具包[LV] -item.GTPP.BattPack.02.name=充电工具包[MV] -item.GTPP.BattPack.03.name=充电工具包[HV] -item.GTPP.BattPack.04.name=充电工具包[EV] -item.GTPP.BattPack.05.name=充电工具包[IV] -item.IndustrialDiamondExquisite.name=精致的工业钻石 - -item.itemSpringCelestialTungsten.name=天体钨弹簧 -item.itemSpringWhiteMetal.name=白物质弹簧 -item.itemSpringNitinol60.name=é•é’›è¯º60弹簧 -item.itemSpringWatertightSteel.name=防水钢弹簧 -item.itemSpringEglinSteel.name=埃格林钢弹簧 - -item.itemSmallSpringMaragingSteel250.name=å°åž‹é©¬æ°ä½“时效钢250弹簧 -item.itemSmallSpringNichrome.name=å°åž‹é•é“¬åˆé‡‘弹簧 -item.itemSmallSpringStaballoy.name=å°åž‹è´«é“€åˆé‡‘弹簧 -item.itemSmallSpringBlackSteel.name=å°åž‹é»‘钢弹簧 -item.itemSmallSpringBlackTitanium.name=å°åž‹é»‘钛弹簧 - -item.itemFineWireWhiteMetal.name=精致白物质导线 -item.itemFineWirePalladium.name=精致钯导线 -item.itemFineWireZirconium.name=精致锆导线 -item.itemFineWireGrisium.name=精致ç°é’›åˆé‡‘导线 -item.itemFineWireBabbitAlloy.name=精致巴æ°åˆé‡‘导线 -item.itemFineWireKoboldite.name=精致妖金导线 -item.itemFineWireHG1223.name=精致HG-1223导线 -item.itemFineWireQuantum.name=精致é‡å­å¯¼çº¿ - -item.itemHeavyPlatePotin.name=é‡åž‹ç²—é’é“œæ¿ -item.itemHeavyPlateWatertightSteel.name=é‡åž‹é˜²æ°´é’¢æ¿ -item.itemHeavyPlateBronze.name=é‡åž‹é’é“œæ¿ -item.itemHeavyPlateOsmiridium.name=é‡åž‹é“±é”‡åˆé‡‘æ¿ -item.itemHeavyPlateQuantum.name=é‡åž‹é‡å­æ¿ -item.itemHeavyPlateBlackSteel.name=é‡åž‹é»‘é’¢æ¿ -item.itemHeavyPlateStainlessSteel.name=é‡åž‹ä¸é”ˆé’¢æ¿ -item.itemHeavyPlateEglinSteel.name=é‡åž‹åŸƒæ ¼æž—é’¢æ¿ -item.itemHeavyPlateMaragingSteel300.name=é‡åž‹é©¬æ°ä½“时效钢300æ¿ -item.itemHeavyPlateTalonite.name=铬钴磷酸ç›åˆé‡‘æ¿ -item.itemHeavyPlateHypogen.name=é‡åž‹æµ·ç€çæ¿ -item.itemHeavyPlateRhugnor.name=é‡åž‹é²æ ¼è¯ºæ¿ -item.itemHeavyPlateAdvancedNitinol.name=é‡åž‹é«˜çº§é•é’›è¯ºæ¿ -item.itemHeavyPlateAstralTitanium.name=é‡åž‹æ˜Ÿä½“é’›æ¿ -item.itemHeavyPlateCelestialTungsten.name=é‡åž‹å¤©ä½“é’¨æ¿ -item.itemHeavyPlateWhiteMetal.name=é‡åž‹ç™½ç‰©è´¨æ¿ -item.itemHeavyPlateBlackMetal.name=é‡åž‹é»‘ç‰©è´¨æ¿ -item.itemHeavyPlateAncientGranite.name=é‡åž‹å¤èŠ±å²—å²©æ¿ - -item.GTPP.bauble.fireprotection.0.name=超级披è¨æ‰‹å¥— - - -//Added 16/5/19 -item.itemCellSeleniumDioxide.name=二氧化硒å•å…ƒ -item.itemCellSeleniousAcid.name=亚硒酸å•å…ƒ - -//Added 25/7/19 -container.pestkiller=害虫æ€æ‰‹ - -//Added 15/8/19 -gtpp.nei.decayables=å¯è¡°å˜ç®±å­(é“…å°ç›’) -entity.batKing.name=è™è ä¹‹çŽ‹ -item.itemCellCarbyne.name=直链乙炔碳å•å…ƒ -item.itemCellHydrogenCyanide.name=氢氰酸å•å…ƒ -item.itemCactusCharcoal.name=仙人掌炭 -item.itemCactusCoke.name=仙人掌焦炭 -item.itemSugarCharcoal.name=ç³–ç‚­ -item.itemSugarCoke.name=糖焦炭 -item.LiquidHydrogen.name=液氢å•å…ƒ[LOH] - - - -//Added 24/8/19 -//Debug Labels -tile.blockDoorAlloy.name=防爆门 -tile.blockInhibitorObelisk.name=ä¼ é€æŠ‘制方尖碑 -tile.Battlesign.name=æˆ˜æ–—ç‰Œå­ -tile.blockMagicBox.name=奥法之盒 -tile.blockManaPod.name=法力èšèŒŽ -tile.buildToolBlock.name=å·¥å…·æ–¹å— -tile.blockRedPlasma.name=红色等离å­ä½“æ–¹å— -tile.pipeBlock.name=ç®¡é“ -item.null.name=å‘ALKALUS报告错误 - - -//Added 24/8/19 -tile.OreGreenockite.name=硫镉矿石 -item.crushedGreenockite.name=粉碎的硫镉矿石 -item.crushedCentrifugedGreenockite.name=离心硫镉矿石 -item.crushedPurifiedGreenockite.name=洗净的硫镉矿石 -item.dustImpureGreenockite.name=å«æ‚硫镉矿粉 -item.dustPureGreenockite.name=æ´å‡€ç¡«é•‰çŸ¿ç²‰ -item.itemDustGreenockite.name=硫镉矿粉 -item.itemDustTinyGreenockite.name=å°æ’®ç¡«é•‰çŸ¿ç²‰ -item.itemDustSmallGreenockite.name=å°å †ç¡«é•‰çŸ¿ç²‰ - -tile.OreRareEarthI.name=稀土(I)矿石 -item.crushedRareEarthI.name=粉碎的稀土(I)矿石 -item.crushedCentrifugedRareEarthI.name=离心稀土(I)矿石 -item.crushedPurifiedRareEarthI.name=洗净的稀土(I)矿石 -item.dustImpureRareEarthI.name=å«æ‚稀土(I)粉 -item.dustPureRareEarthI.name=æ´å‡€ç¨€åœŸ(I)粉 -item.itemDustRareEarthI.name=稀土(I)粉 -item.itemDustTinyRareEarthI.name=å°æ’®ç¨€åœŸ(I)粉 -item.itemDustSmallRareEarthI.name=å°å †ç¨€åœŸ(I)粉 - -tile.OreRareEarthII.name=稀土(II)矿石 -item.crushedRareEarthII.name=粉碎的稀土(II)矿石 -item.crushedCentrifugedRareEarthII.name=离心稀土(II)矿石 -item.crushedPurifiedRareEarthII.name=洗净的稀土(II)矿石 -item.dustImpureRareEarthII.name=å«æ‚稀土(II)粉 -item.dustPureRareEarthII.name=æ´å‡€ç¨€åœŸ(II)粉 -item.itemDustRareEarthII.name=稀土(II)粉 -item.itemDustTinyRareEarthII.name=å°æ’®ç¨€åœŸ(II)粉 -item.itemDustSmallRareEarthII.name=å°å †ç¨€åœŸ(II)粉 - -tile.OreRareEarthIII.name=稀土(III)矿石 -item.crushedRareEarthIII.name=粉碎的稀土(III)矿石 -item.crushedCentrifugedRareEarthIII.name=离心稀土(III)矿石 -item.crushedPurifiedRareEarthIII.name=洗净的稀土(III)矿石 -item.dustImpureRareEarthIII.name=å«æ‚稀土(III)粉 -item.dustPureRareEarthIII.name=æ´å‡€ç¨€åœŸ(III)粉 -item.itemDustRareEarthIII.name=稀土(III)粉 -item.itemDustTinyRareEarthIII.name=å°æ’®ç¨€åœŸ(III)粉 -item.itemDustSmallRareEarthIII.name=å°å †ç¨€åœŸ(III)粉 - - - -//Added 13/10/19 -tile.blockRoundRobinator.0.name=自动输出机 I -tile.blockRoundRobinator.1.name=自动输出机 II -tile.blockRoundRobinator.2.name=自动输出机 III -tile.blockRoundRobinator.3.name=自动输出机 IV -tile.blockRoundRobinator.4.name=自动输出机 V - - -//Added 16/10/19 -item.BioRecipeSelector.name=编程生物电路 -item.FermentationBase.name=å‘酵基å•å…ƒ -item.ureamix.name=å°¿ç´ æ··åˆç‰©å•å…ƒ -item.liquidresin.name=液æ€æ ‘è„‚å•å…ƒ -item.propionicacid.name=丙酸å•å…ƒ -item.aceticacid.name=乙酸å•å…ƒ -item.BasicAgrichemItem.0.name=藻类生物质 -item.BasicAgrichemItem.1.name=绿藻生物质 -item.BasicAgrichemItem.2.name=è¤è—»ç”Ÿç‰©è´¨ -item.BasicAgrichemItem.3.name=金è¤è—»ç”Ÿç‰©è´¨ -item.BasicAgrichemItem.4.name=红藻生物质 -item.BasicAgrichemItem.5.name=纤维素纤维 -item.BasicAgrichemItem.6.name=金è¤çº¤ç»´ç´ çº¤ç»´ -item.BasicAgrichemItem.7.name=红色纤维素纤维 -item.BasicAgrichemItem.8.name=堆肥 -item.BasicAgrichemItem.9.name=木颗粒 -item.BasicAgrichemItem.10.name=木砖 -item.BasicAgrichemItem.11.name=纤维素浆 -item.BasicAgrichemItem.12.name=粗制生物树脂 -item.BasicAgrichemItem.13.name=催化剂载体 -item.BasicAgrichemItem.14.name=绿色金属催化剂 -item.BasicAgrichemItem.15.name=藻酸 -item.BasicAgrichemItem.16.name=æ°§åŒ–é“ -item.BasicAgrichemItem.17.name=é“颗粒 -item.BasicAgrichemItem.18.name=é“酸钠 -item.BasicAgrichemItem.19.name=氢氧化钠 -item.BasicAgrichemItem.20.name=碳酸钠 -item.BasicAgrichemItem.21.name=氯化锂 - -//Added 24/10/19 -item.butanol.name=ä¸é†‡å•å…ƒ - -//Try Fix IC2 Garbage vv -fluidHotWater=热水 -fluidHotWater.name=热水 -//Try Fix IC2 Garbage ^^ - - -//Added 11/12/19 -item.itemHotIngotTitanium.name=热钛锭 -item.OilHeavy.name=é‡æ²¹å•å…ƒ -item.UnsymmetricalDimethylhydrazine.name=å二甲肼å•å…ƒ -item.benzene.name=苯å•å…ƒ -item.Benzene.name=苯å•å…ƒ -item.phenol.name=苯酚å•å…ƒ -item.CarbonDioxide.name=二氧化碳å•å…ƒ -item.itemCellCarbonDioxide.name=二氧化碳å•å…ƒ -item.CarbonMonoxide.name=一氧化碳å•å…ƒ -item.itemCellCarbonMonoxide.name=一氧化碳å•å…ƒ -item.acetone.name=丙酮å•å…ƒ -item.saltwater.name=ç›æ°´å•å…ƒ -item.BasicAgrichemItem.22.name=模具(颗粒) -item.BasicAgrichemItem.23.name=æ´å‡€é“æ··åˆç‰© - -//Added 12/12/19 - -item.BasicGenericChemItem.0.name=红色金属催化剂 -item.BasicGenericChemItem.1.name=黄色金属催化剂 -item.BasicGenericChemItem.2.name=è“色金属催化剂 -item.BasicGenericChemItem.3.name=橙色金属催化剂 -item.BasicGenericChemItem.4.name=紫色金属催化剂 -item.BasicGenericChemItem.5.name=棕色金属催化剂 -item.MudRedSlurry.name=红色泥浆å•å…ƒ -item.liquid_toluene.name=甲苯å•å…ƒ - -item.BasicAlgaeItem.0.name=å¯åŸ¹æ¤è—»ç±»(I) -item.BasicAlgaeItem.1.name=å¯åŸ¹æ¤è—»ç±»(II) -item.BasicAlgaeItem.2.name=å¯åŸ¹æ¤è—»ç±»(III) -item.BasicAlgaeItem.3.name=å¯åŸ¹æ¤è—»ç±»(IV) -item.BasicAlgaeItem.4.name=å¯åŸ¹æ¤è—»ç±»(V) -item.BasicAlgaeItem.5.name=å¯åŸ¹æ¤è—»ç±»(VI) -item.BasicAlgaeItem.6.name=å¯åŸ¹æ¤è—»ç±»(VII) - -//Added 17/01/20 -item.BasicGenericChemItem.6.name=粉色金属催化剂 - -//Added 23/03/20 -item.BasicMetaFood.0.name=生人肉 -item.BasicMetaFood.1.name=熟人肉 -item.BasicMetaFood.2.name=生马肉 -item.BasicMetaFood.3.name=熟马肉 -item.BasicMetaFood.4.name=生狼肉 -item.BasicMetaFood.5.name=熟狼肉 -item.BasicMetaFood.6.name=生猫肉 -item.BasicMetaFood.7.name=熟猫肉 -item.BasicMetaFood.8.name=烈焰人肉 - -item.itemCellNaquadahFuel.name=硅岩燃料å•å…ƒ -item.itemCellEnrichedNaquadahFuel.name=富集硅岩燃料å•å…ƒ -item.itemCellNaquadriaFuel.name=超能硅岩燃料å•å…ƒ -item.boricacid.name=硼酸å•å…ƒ -item.hydrochloricacid.name=ç›é…¸å•å…ƒ - -item.BasicAlgaeItem.name=å¯åŸ¹æ¤è—»ç±» -item.BasicAlgaeItem.0.name=å¯åŸ¹æ¤è—»ç±»(I) -item.BasicAlgaeItem.1.name=å¯åŸ¹æ¤è—»ç±»(II) -item.BasicAlgaeItem.2.name=å¯åŸ¹æ¤è—»ç±»(III) -item.BasicAlgaeItem.3.name=å¯åŸ¹æ¤è—»ç±»(IV) -item.BasicAlgaeItem.4.name=å¯åŸ¹æ¤è—»ç±»(V) -item.BasicAlgaeItem.5.name=å¯åŸ¹æ¤è—»ç±»(VI) -item.BasicAlgaeItem.6.name=å¯åŸ¹æ¤è—»ç±»(VII) - -//Added 30/03/20 -item.milledChalcopyrite.name=研磨黄铜矿 -item.milledSphalerite.name=研磨闪锌矿 -item.milledNickel.name=研磨é•çŸ¿ -item.milledPlatinum.name=研磨铂矿 -item.milledPentlandite.name=研磨é•é»„é“矿 -item.FrothZincflotation.name=闪锌矿浮选泡沫å•å…ƒ -item.FrothCopperflotation.name=黄铜矿浮选泡沫å•å…ƒ -item.FrothNickelflotation.name=é•çŸ¿æµ®é€‰æ³¡æ²«å•å…ƒ -item.FrothPlatinumflotation.name=铂矿浮选泡沫å•å…ƒ -item.FrothPentlanditeflotation.name=é•é»„é“矿浮选泡沫å•å…ƒ -item.BasicGenericChemItem.7.name=é“ç ”ç£¨çƒ -item.BasicGenericChemItem.8.name=çš‚çŸ³ç ”ç£¨çƒ - -//Added 31/03/20 -item.BasicGenericChemItem.9.name=乙醇钠粉 -item.BasicGenericChemItem.10.name=乙基黄原酸钠粉 -item.BasicGenericChemItem.11.name=乙基黄原酸钾粉 -item.BasicGenericChemItem.12.name=氢氧化钾粉 -item.CarbonDisulfide.name=二硫化碳å•å…ƒ -item.HydrogenSulfide.name=硫化氢å•å…ƒ -item.BasicAgrichemItem.24.name=æ¾æžœ -item.BasicAgrichemItem.25.name=æ¾æ ‘碎料 -item.pineoil.name=æ¾æ²¹å•å…ƒ - -//Added 11/4/20 -item.milledRedstone.name=研磨红石矿 -item.milledSpessartine.name=研磨锰é“榴石 -item.milledGrossular.name=研磨钙é“榴石 -item.milledAlmandine.name=研磨é“é“榴石 -item.milledPyrope.name=研磨é•é“榴石 -item.FrothRedstoneflotation.name=红石矿浮选泡沫å•å…ƒ -item.FrothSpessartineflotation.name=é”°é“榴石浮选泡沫å•å…ƒ -item.FrothGrossularflotation.name=é’™é“榴石浮选泡沫å•å…ƒ -item.FrothAlmandineflotation.name=é“é“榴石浮选泡沫å•å…ƒ -item.FrothPyropeflotation.name=é•é“榴石浮选泡沫å•å…ƒ - -//Added 13/04/20 -item.T3RecipeSelector.name=çªç ´ç¼–程电路 - -//Added 03/05/20 -entity.miscutils.batKing.name=å¹½çµè™è  -entity.miscutils.bigChickenFriendly.name=巨大的鸡 -entity.miscutils.AusDingo.name=澳洲野狗 -entity.miscutils.AusBoar.name=澳洲野猪 -entity.miscutils.AusSpider.name=森林蜘蛛 -entity.miscutils.AusOctopus.name=澳洲章鱼 -container.EggBox=鸡蛋孵化盒 - -//Added 24/05/20 -container.VolumetricFlaskSetter=容é‡ç“¶é…置器 - -//Added 26/05/20 -item.itemIngotLaurenium.name=劳伦姆åˆé‡‘é”­ -item.itemHotIngotLaurenium.name=热劳伦姆åˆé‡‘é”­ -item.itemDustLaurenium.name=劳伦姆åˆé‡‘粉 -item.itemDustTinyLaurenium.name=å°æ’®åŠ³ä¼¦å§†åˆé‡‘粉 -item.itemDustSmallLaurenium.name=å°å †åŠ³ä¼¦å§†åˆé‡‘粉 -item.itemNuggetLaurenium.name=劳伦姆åˆé‡‘ç²’ -item.itemPlateLaurenium.name=劳伦姆åˆé‡‘æ¿ -item.itemPlateDoubleLaurenium.name=åŒé‡åŠ³ä¼¦å§†åˆé‡‘æ¿ -item.itemBoltLaurenium.name=劳伦姆åˆé‡‘螺栓 -item.itemRodLaurenium.name=劳伦姆åˆé‡‘æ† -item.itemRodLongLaurenium.name=长劳伦姆åˆé‡‘æ† -item.itemRingLaurenium.name=劳伦姆åˆé‡‘环 -item.itemScrewLaurenium.name=劳伦姆åˆé‡‘èžºä¸ -item.itemRotorLaurenium.name=劳伦姆åˆé‡‘è½¬å­ -item.itemGearLaurenium.name=劳伦姆åˆé‡‘齿轮 -item.itemCellLaurenium.name=劳伦姆åˆé‡‘å•å…ƒ -tile.Block of Laurenium.name=劳伦姆åˆé‡‘å— -tile.Laurenium Frame Box.name=劳伦姆åˆé‡‘框架 -item.itemIngotBotmium.name=åšç‰¹å§†åˆé‡‘é”­ -item.itemHotIngotBotmium.name=热åšç‰¹å§†åˆé‡‘é”­ -item.itemDustBotmium.name=åšç‰¹å§†åˆé‡‘粉 -item.itemDustTinyBotmium.name=å°æ’®åšç‰¹å§†åˆé‡‘粉 -item.itemDustSmallBotmium.name=å°å †åšç‰¹å§†åˆé‡‘粉 -item.itemNuggetBotmium.name=åšç‰¹å§†åˆé‡‘ç²’ -item.itemPlateBotmium.name=åšç‰¹å§†åˆé‡‘æ¿ -item.itemPlateDoubleBotmium.name=åŒé‡åšç‰¹å§†åˆé‡‘æ¿ -item.itemBoltBotmium.name=åšç‰¹å§†åˆé‡‘螺栓 -item.itemRodBotmium.name=åšç‰¹å§†åˆé‡‘æ† -item.itemRodLongBotmium.name=é•¿åšç‰¹å§†åˆé‡‘æ† -item.itemRingBotmium.name=åšç‰¹å§†åˆé‡‘环 -item.itemScrewBotmium.name=åšç‰¹å§†åˆé‡‘èžºä¸ -item.itemRotorBotmium.name=åšç‰¹å§†åˆé‡‘è½¬å­ -item.itemGearBotmium.name=åšç‰¹å§†åˆé‡‘齿轮 -item.itemCellBotmium.name=åšç‰¹å§†åˆé‡‘å•å…ƒ -tile.Block of Botmium.name=åšç‰¹å§†åˆé‡‘å— -tile.Botmium Frame Box.name=åšç‰¹å§†åˆé‡‘框架 - -//Added 29/05/20 -item.itemBasicTurbine.name=基础涡轮 -item.itemBasicTurbine_0.name=基础é“涡轮 -item.itemBasicTurbine_1.name=基础é’铜涡轮 - -interaction.voidexcess.enabled=å¯ç”¨è¿‡é‡é”€æ¯ -interaction.voidexcess.disabled=ç¦ç”¨è¿‡é‡é”€æ¯ - -interaction.separateBusses.enabled=独立输入总线 -interaction.separateBusses.disabled=è”åˆè¾“入总线 \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/DevCape.png b/src/resources/assets/miscutils/textures/DevCape.png deleted file mode 100644 index 15c2b758ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/DevCape.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/DevCapeHD.png b/src/resources/assets/miscutils/textures/DevCapeHD.png deleted file mode 100644 index f74bd8c9e3..0000000000 Binary files a/src/resources/assets/miscutils/textures/DevCapeHD.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/FancyCape.png b/src/resources/assets/miscutils/textures/FancyCape.png deleted file mode 100644 index ca63a0f335..0000000000 Binary files a/src/resources/assets/miscutils/textures/FancyCape.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/FancyCapeHD.png b/src/resources/assets/miscutils/textures/FancyCapeHD.png deleted file mode 100644 index d8da3ba76d..0000000000 Binary files a/src/resources/assets/miscutils/textures/FancyCapeHD.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/Orange.png b/src/resources/assets/miscutils/textures/Orange.png deleted file mode 100644 index 9de164d437..0000000000 Binary files a/src/resources/assets/miscutils/textures/Orange.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/OrangeHD.png b/src/resources/assets/miscutils/textures/OrangeHD.png deleted file mode 100644 index ea5e8af8cf..0000000000 Binary files a/src/resources/assets/miscutils/textures/OrangeHD.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/PatreonCapeHD.png b/src/resources/assets/miscutils/textures/PatreonCapeHD.png deleted file mode 100644 index c4ebef82b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/PatreonCapeHD.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/TesterCape.png b/src/resources/assets/miscutils/textures/TesterCape.png deleted file mode 100644 index 8504d06049..0000000000 Binary files a/src/resources/assets/miscutils/textures/TesterCape.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/TesterCapeHD.png b/src/resources/assets/miscutils/textures/TesterCapeHD.png deleted file mode 100644 index da3ee2e50f..0000000000 Binary files a/src/resources/assets/miscutils/textures/TesterCapeHD.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/aspects/Sagrausten.png b/src/resources/assets/miscutils/textures/aspects/Sagrausten.png deleted file mode 100644 index a2c461f94e..0000000000 Binary files a/src/resources/assets/miscutils/textures/aspects/Sagrausten.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/aspects/Slusium.png b/src/resources/assets/miscutils/textures/aspects/Slusium.png deleted file mode 100644 index fd2c42414d..0000000000 Binary files a/src/resources/assets/miscutils/textures/aspects/Slusium.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/aspects/Xablum.png b/src/resources/assets/miscutils/textures/aspects/Xablum.png deleted file mode 100644 index a19d64039a..0000000000 Binary files a/src/resources/assets/miscutils/textures/aspects/Xablum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/aspects/Xenil.png b/src/resources/assets/miscutils/textures/aspects/Xenil.png deleted file mode 100644 index e3b5ecda82..0000000000 Binary files a/src/resources/assets/miscutils/textures/aspects/Xenil.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/aspects/Zetralt.png b/src/resources/assets/miscutils/textures/aspects/Zetralt.png deleted file mode 100644 index 001edf8ea3..0000000000 Binary files a/src/resources/assets/miscutils/textures/aspects/Zetralt.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn b/src/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn deleted file mode 100644 index 453b7325c8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/FirePit/Firepit.tcn and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png b/src/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png deleted file mode 100644 index 78e400a5a0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/FirePit/mossyFirepit.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png b/src/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png deleted file mode 100644 index 42202d8fae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/SwirlBigBlue.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/SwirlBlue.png b/src/resources/assets/miscutils/textures/blocks/SwirlBlue.png deleted file mode 100644 index e79a08a151..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/SwirlBlue.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/SwirlCyan.png b/src/resources/assets/miscutils/textures/blocks/SwirlCyan.png deleted file mode 100644 index 45d8feb48b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/SwirlCyan.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/SwirlGray.png b/src/resources/assets/miscutils/textures/blocks/SwirlGray.png deleted file mode 100644 index 337d5fd1bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/SwirlGray.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/SwirlRed.png b/src/resources/assets/miscutils/textures/blocks/SwirlRed.png deleted file mode 100644 index e13c73be5b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/SwirlRed.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/SwirlYellow.png b/src/resources/assets/miscutils/textures/blocks/SwirlYellow.png deleted file mode 100644 index 2b920a8387..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/SwirlYellow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png deleted file mode 100644 index 88d5cb9c72..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/CASING_AMAZON.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png deleted file mode 100644 index ff1a809196..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png deleted file mode 100644 index 4af5b49f1f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png deleted file mode 100644 index 0ea134fb93..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png deleted file mode 100644 index 52c1a02d54..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png deleted file mode 100644 index 0c791d1d7c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png deleted file mode 100644 index 51cefde2a7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/13.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png deleted file mode 100644 index 6150873b54..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/14.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png deleted file mode 100644 index 4483072085..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/15.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png deleted file mode 100644 index 137b4231c6..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/16.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png deleted file mode 100644 index 0dd1f2ae5f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/17.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png deleted file mode 100644 index fd7adea957..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/18.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png deleted file mode 100644 index a0b7d1544e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/19.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png deleted file mode 100644 index 1f395cc891..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png deleted file mode 100644 index 5f36f9e7b5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/20.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png deleted file mode 100644 index 191dd4f5ba..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/21.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png deleted file mode 100644 index 7df2cbec19..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/22.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png deleted file mode 100644 index 7185cd1be1..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/23.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png deleted file mode 100644 index 09ee5cd360..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/24.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png deleted file mode 100644 index 3e88422126..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/25.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png deleted file mode 100644 index 3d84925c61..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/26.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png deleted file mode 100644 index 6c4c1fb228..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/27.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png deleted file mode 100644 index f113ac0ab5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/28.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png deleted file mode 100644 index d896829cfb..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/29.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png deleted file mode 100644 index f1bfc1063d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png deleted file mode 100644 index bbc35cf318..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/30.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png deleted file mode 100644 index e7f0363217..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/31.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png deleted file mode 100644 index 2ec68c00ff..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png deleted file mode 100644 index 2ffeb029fb..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png deleted file mode 100644 index f2c5b72b0c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png deleted file mode 100644 index 63cbcf0851..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png deleted file mode 100644 index 69efbeb6de..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png deleted file mode 100644 index acd54acf07..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png deleted file mode 100644 index 7a3700a854..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png deleted file mode 100644 index 672a513513..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png deleted file mode 100644 index e0ec5ef95a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png deleted file mode 100644 index d1a5b4f1b0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png deleted file mode 100644 index ee332fba19..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_bottom_old.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png deleted file mode 100644 index b0c62a7b3d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_full.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png deleted file mode 100644 index b61a42b935..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_side.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png deleted file mode 100644 index 0647c2105f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/DecayablesChest_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png deleted file mode 100644 index 787572ea3b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_full.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png deleted file mode 100644 index 771fef125a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_side.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png deleted file mode 100644 index d766cc9f3f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/EggBox_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png deleted file mode 100644 index e92b9c9ff8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png deleted file mode 100644 index 8a47157d2b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta deleted file mode 100644 index 1367b80758..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 0, 1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png deleted file mode 100644 index b926eb1ef2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png deleted file mode 100644 index ae63da7746..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta deleted file mode 100644 index 8447c98f9a..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png deleted file mode 100644 index e9b20bd486..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png deleted file mode 100644 index 25ea33ce3a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png deleted file mode 100644 index a9bed9ce0c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/Generic_Creative_Texture.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png deleted file mode 100644 index 7222ca77d7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png deleted file mode 100644 index eb7affaa01..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png deleted file mode 100644 index a650d73983..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_CENTRIFUGE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png deleted file mode 100644 index 8a0391538b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png deleted file mode 100644 index 22c7cd7978..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FIREBOX_STABALLOY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png deleted file mode 100644 index 5965bfce89..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLOTATION.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png deleted file mode 100644 index eb8020f1c9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png deleted file mode 100644 index 05c8741fa7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png deleted file mode 100644 index 4f7290c571..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png deleted file mode 100644 index df4e3a1a41..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GEARBOX_T1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png deleted file mode 100644 index d8677eda87..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_GRINDING_FACTORY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png deleted file mode 100644 index 02bd653538..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_LAURENIUM.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png deleted file mode 100644 index c0065f8379..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_PIPE_T1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png deleted file mode 100644 index 89fed025b4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_ROCKETDYNE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png deleted file mode 100644 index 4a8cbd634c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_GRISIUM.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png deleted file mode 100644 index fc2b8c5c89..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png deleted file mode 100644 index 7753c1920a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png deleted file mode 100644 index 373cccb65d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_020.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png deleted file mode 100644 index 52e1a73063..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png deleted file mode 100644 index ab3a76d006..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png deleted file mode 100644 index 75f21218d9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png deleted file mode 100644 index 05f1cc1d42..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_POTIN.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png deleted file mode 100644 index 066a926278..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_RED_STEEL.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png deleted file mode 100644 index 9ba5c0e255..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_STELLITE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png deleted file mode 100644 index 4b707d2ca2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TALONITE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png deleted file mode 100644 index 64b28d0233..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TANTALLOY61.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png deleted file mode 100644 index 91d3660711..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png deleted file mode 100644 index c82b335f0c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png deleted file mode 100644 index 6a5dba4448..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png deleted file mode 100644 index 651c539c5b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png deleted file mode 100644 index 1d71c95ea4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_TUMBAGA.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png deleted file mode 100644 index d6cb89d67d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZERON100.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png deleted file mode 100644 index 6c45ff313f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png deleted file mode 100644 index 2602f44af3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/MACHINE_PESTKILLER_TOP.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png deleted file mode 100644 index 42c1df75cf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_output.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png deleted file mode 100644 index 57d9cc6f86..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_side.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png deleted file mode 100644 index 869b06039f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ModularTable_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png deleted file mode 100644 index 012c63a088..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png deleted file mode 100644 index 30856a6284..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png deleted file mode 100644 index d577f0cbb3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png deleted file mode 100644 index e41790f90f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta deleted file mode 100644 index f4cce85820..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":5, - "frames": [0, 1, 2, 3, 2, 1] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png deleted file mode 100644 index e9b20bd486..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png deleted file mode 100644 index 4469a809e9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png deleted file mode 100644 index b7a77be826..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png deleted file mode 100644 index 8a47157d2b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta deleted file mode 100644 index 1367b80758..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 0, 1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png deleted file mode 100644 index 671bbd7d97..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png deleted file mode 100644 index ae63da7746..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta deleted file mode 100644 index 8447c98f9a..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png deleted file mode 100644 index a9ab34e963..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png deleted file mode 100644 index 8a5c131623..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png deleted file mode 100644 index 6d9fb32d7e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/MACHINE_CASING_VENT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png deleted file mode 100644 index cbf604f2b3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png deleted file mode 100644 index 3b7ac3d50e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png deleted file mode 100644 index a5a5e2c559..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png deleted file mode 100644 index b68c900ddd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png deleted file mode 100644 index df182aeaa5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Side_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png deleted file mode 100644 index 85bc3f16cd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png deleted file mode 100644 index f82185ebdb..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png deleted file mode 100644 index 345476e03c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png deleted file mode 100644 index 971164eb3e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png deleted file mode 100644 index 5b5bac3ad2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/RoundRobinator/Top_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png deleted file mode 100644 index 8ae37e61d4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/STEAM_TURBINE_SIDE_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png deleted file mode 100644 index 9dc63e146e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/_PlaceHolder.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png deleted file mode 100644 index d391da4eaf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta deleted file mode 100644 index 60af678259..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png deleted file mode 100644 index ce051d468c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta deleted file mode 100644 index 60af678259..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_blue.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png deleted file mode 100644 index 9d454b17d4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta deleted file mode 100644 index 60af678259..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_dimensional_cover_orange.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png deleted file mode 100644 index d5f23d447f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_lesu.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png deleted file mode 100644 index 5a4f23d3ea..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png deleted file mode 100644 index d40c95f3aa..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png deleted file mode 100644 index 69330145ba..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta deleted file mode 100644 index 49e988e8bb..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_active_animated.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png deleted file mode 100644 index 2af5057b3d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta deleted file mode 100644 index 49e988e8bb..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_matterfab_animated.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png deleted file mode 100644 index a8a857b5b8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_oil.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png deleted file mode 100644 index fc9c6e5d8a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_frequency.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png deleted file mode 100644 index 695451fafc..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta deleted file mode 100644 index 19b79a1e22..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_logo.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":1, - "frames":[{"index":0,"time":100},{"index":1,"time":3},{"index":2,"time":2},{"index":3,"time":3},0,1,2,3] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png deleted file mode 100644 index 7157b7541d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta deleted file mode 100644 index 60af678259..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random1.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png deleted file mode 100644 index 7157b7541d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta deleted file mode 100644 index 97596ba817..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random2.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png deleted file mode 100644 index 7157b7541d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_screen_random3.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png deleted file mode 100644 index 6a1894756d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_uum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png deleted file mode 100644 index c9663bf711..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/adv_machine_vent_rotating.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png deleted file mode 100644 index 7037204d20..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png deleted file mode 100644 index 600def1e1b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/audio_out_active.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png deleted file mode 100644 index 652245a61c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png deleted file mode 100644 index 455264cffa..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_side_cabinet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png deleted file mode 100644 index eeb0bae10f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/bronze_top_crafting.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png deleted file mode 100644 index 386f3c8e67..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_charger.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png deleted file mode 100644 index a61413240b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_crafting.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png deleted file mode 100644 index 26b3b1e4c1..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_discharge.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png deleted file mode 100644 index 72e8c12c07..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_conductor.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png deleted file mode 100644 index 148d5e4955..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/cover_redstone_emitter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png deleted file mode 100644 index ebeda86aa0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/dirt_podzol_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png deleted file mode 100644 index a0767f7836..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/fishtrap.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png deleted file mode 100644 index ba45c43891..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png deleted file mode 100644 index 9fd8c3be81..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png deleted file mode 100644 index 6f1e9c0664..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png deleted file mode 100644 index 815ad92daf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png deleted file mode 100644 index c594b58add..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png deleted file mode 100644 index fe779e8a9e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta deleted file mode 100644 index 60af678259..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/high_adv_machine_dimensional.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png deleted file mode 100644 index 68b4e3e9c2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/log_acacia_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png deleted file mode 100644 index ba45c43891..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_bottom.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png deleted file mode 100644 index 815ad92daf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png deleted file mode 100644 index 3bd3092cc0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png deleted file mode 100644 index e402d9b6d0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png deleted file mode 100644 index 975f4aed86..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta deleted file mode 100644 index 97596ba817..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor2_active.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png deleted file mode 100644 index bf1cb0e6a5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta deleted file mode 100644 index 97596ba817..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_dieselmotor_active.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png deleted file mode 100644 index 3256b41734..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta deleted file mode 100644 index 5e86a7cd5f..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":8 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png deleted file mode 100644 index 3256b41734..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/TileEntities/machine_top_vent_rotating_fast.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png deleted file mode 100644 index a8e497ec01..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_sides.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png deleted file mode 100644 index 34d35b44e3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_adv_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png deleted file mode 100644 index 1754172689..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_sides.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png deleted file mode 100644 index 4835240aee..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/TileEntities/sewer_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockAntiGrief.png b/src/resources/assets/miscutils/textures/blocks/blockAntiGrief.png deleted file mode 100644 index 4168d9d934..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockAntiGrief.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockBlock.png b/src/resources/assets/miscutils/textures/blocks/blockBlock.png deleted file mode 100644 index 1276f5fa24..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockBlock.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockBloodSteel.png b/src/resources/assets/miscutils/textures/blocks/blockBloodSteel.png deleted file mode 100644 index d23f8721e4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockBloodSteel.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockDefault.png b/src/resources/assets/miscutils/textures/blocks/blockDefault.png deleted file mode 100644 index 84a6b68e0e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockDefault.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockFrameGt.png b/src/resources/assets/miscutils/textures/blocks/blockFrameGt.png deleted file mode 100644 index 56a56cf752..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockFrameGt.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockMFEffect.png b/src/resources/assets/miscutils/textures/blocks/blockMFEffect.png deleted file mode 100644 index 8e48e12070..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockMFEffect.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png b/src/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png deleted file mode 100644 index f5f51c7175..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockNuclearFueledHeliumGenerator.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png b/src/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png deleted file mode 100644 index b7155ba3dc..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockOre_Overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockStaballoy.png b/src/resources/assets/miscutils/textures/blocks/blockStaballoy.png deleted file mode 100644 index 84a6b68e0e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockStaballoy.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/blockStone.png b/src/resources/assets/miscutils/textures/blocks/blockStone.png deleted file mode 100644 index 87e19ff46b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/blockStone.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png b/src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png deleted file mode 100644 index 6761aa4773..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png b/src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png deleted file mode 100644 index befbe80c9f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/CyberPanel2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png deleted file mode 100644 index e52a1b11dc..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalFunnel.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png deleted file mode 100644 index b24e8657f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png deleted file mode 100644 index 4f84e52ab1..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png deleted file mode 100644 index ba4f079ba9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrate3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png deleted file mode 100644 index 28b1b4dbed..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalGrateA_Solid.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png deleted file mode 100644 index 2c56924c8b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalPanel.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png deleted file mode 100644 index 223ae1cad3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png deleted file mode 100644 index 8d56915ff2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png deleted file mode 100644 index a08f7e1c25..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png deleted file mode 100644 index 46c385c4ea..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png deleted file mode 100644 index 951871ce12..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png deleted file mode 100644 index 1e9356ba6c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png deleted file mode 100644 index f555273f65..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png deleted file mode 100644 index 6a1c62579d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png deleted file mode 100644 index e93c9c35c2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png deleted file mode 100644 index 1952b3d14e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png deleted file mode 100644 index 5307adb9f5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png b/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png deleted file mode 100644 index 4862094cbd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/MetalSheet9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png b/src/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png deleted file mode 100644 index 0d32fdeec8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/chrono/Overlay_Cyber.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/clear_flow.png b/src/resources/assets/miscutils/textures/blocks/clear_flow.png deleted file mode 100644 index 84a6b68e0e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/clear_flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/clear_still.png b/src/resources/assets/miscutils/textures/blocks/clear_still.png deleted file mode 100644 index 84a6b68e0e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/clear_still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png b/src/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png deleted file mode 100644 index 0970b27745..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png b/src/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png deleted file mode 100644 index 6cf79c75c4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png b/src/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png deleted file mode 100644 index 0cf85541e4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png b/src/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png deleted file mode 100644 index 4d9c3d2f67..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png b/src/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png deleted file mode 100644 index 149ae598d0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png b/src/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png deleted file mode 100644 index 8c55fdddd3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/compressed/obsidian_invert.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png b/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png deleted file mode 100644 index 8c5f1ec338..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png b/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png deleted file mode 100644 index 75ff7b2558..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png b/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png deleted file mode 100644 index edcfc53edd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png b/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png deleted file mode 100644 index 8176e98807..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png b/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png deleted file mode 100644 index 0737748bb9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/crop/blockCrop.Hemp.5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/door_cactus_lower.png b/src/resources/assets/miscutils/textures/blocks/door_cactus_lower.png deleted file mode 100644 index 2beea822b4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/door_cactus_lower.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/door_cactus_upper.png b/src/resources/assets/miscutils/textures/blocks/door_cactus_upper.png deleted file mode 100644 index 75ddf4ddfe..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/door_cactus_upper.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/door_glass_lower.png b/src/resources/assets/miscutils/textures/blocks/door_glass_lower.png deleted file mode 100644 index 29d3ebf7ad..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/door_glass_lower.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/door_glass_upper.png b/src/resources/assets/miscutils/textures/blocks/door_glass_upper.png deleted file mode 100644 index 9cb8b98946..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/door_glass_upper.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/door_ice_lower.png b/src/resources/assets/miscutils/textures/blocks/door_ice_lower.png deleted file mode 100644 index c80ab691f1..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/door_ice_lower.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/door_ice_upper.png b/src/resources/assets/miscutils/textures/blocks/door_ice_upper.png deleted file mode 100644 index f647ed3621..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/door_ice_upper.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png deleted file mode 100644 index 6ea5b4c515..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta deleted file mode 100644 index 70cc4d313c..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Flow.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 6 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png deleted file mode 100644 index 7f1f2aa712..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta deleted file mode 100644 index aa41c3d5c8..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Cryotheum_Still.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 8, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png deleted file mode 100644 index b24939367a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta deleted file mode 100644 index 7e77c64858..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Flow.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png deleted file mode 100644 index 3fb18d9c00..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta deleted file mode 100644 index 4fadce8aff..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Ender_Still.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 4, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png deleted file mode 100644 index fa4fa813bf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta deleted file mode 100644 index 70cc4d313c..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Flow.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 6 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png deleted file mode 100644 index 00355135df..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta deleted file mode 100644 index aa41c3d5c8..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Pyrotheum_Still.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 8, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png deleted file mode 100644 index 50414d57db..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta deleted file mode 100644 index 7e77c64858..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Flow.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png deleted file mode 100644 index edf0166265..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta deleted file mode 100644 index 4fadce8aff..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluid/Fluid_Sludge_Still.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 4, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png deleted file mode 100644 index b51346219b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta deleted file mode 100644 index aa41c3d5c8..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.cryotheum.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 8, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png deleted file mode 100644 index 3fb18d9c00..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta deleted file mode 100644 index 4fadce8aff..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.ender.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 4, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png deleted file mode 100644 index 003d1597a6..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta deleted file mode 100644 index 4f0718ac96..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.flowing.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation": {} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png deleted file mode 100644 index 512df7ce04..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta deleted file mode 100644 index b8533e5109..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png deleted file mode 100644 index ef08c75bc8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta deleted file mode 100644 index 0645f48c62..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.fluid.autogenerated.still.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 2 - } -} diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png deleted file mode 100644 index 61d77a51d3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta deleted file mode 100644 index 70cc4d313c..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrofluoricacid.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 6 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png deleted file mode 100644 index f79564ea36..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta deleted file mode 100644 index 7e77c64858..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.hydrogenchloride.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png deleted file mode 100644 index a752755254..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta deleted file mode 100644 index 0df7234a79..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.jackdaniels.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png deleted file mode 100644 index 251206d195..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta deleted file mode 100644 index eb608948b6..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.lithiumhydroxide.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 16 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png deleted file mode 100644 index 6e44e97212..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.new.1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png deleted file mode 100644 index 512df7ce04..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.old.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png deleted file mode 100644 index 7c5ffd0c77..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta deleted file mode 100644 index b8533e5109..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.molten.autogenerated.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png deleted file mode 100644 index f0265d8ad2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta deleted file mode 100644 index 87c542d295..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.plasma.autogenerated.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png deleted file mode 100644 index 00355135df..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta deleted file mode 100644 index aa41c3d5c8..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.pyrotheum.png.mcmeta +++ /dev/null @@ -1,45 +0,0 @@ -{ - "animation": { - "frametime": 8, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png deleted file mode 100644 index 2ff3fb6e7b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta deleted file mode 100644 index 3fc1338d74..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurdioxide.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 12 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png deleted file mode 100644 index 902015b8e1..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta deleted file mode 100644 index 7e77c64858..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuricapatite.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png deleted file mode 100644 index fee5f03cd5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta deleted file mode 100644 index eb608948b6..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfuriclithium.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 16 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png deleted file mode 100644 index 73fa814eb5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta deleted file mode 100644 index 70cc4d313c..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.sulfurousacid.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 6 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png deleted file mode 100644 index 63e9189c45..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumhexafluoride.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png deleted file mode 100644 index 05d4c69e1a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta deleted file mode 100644 index f6730e30a9..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.thoriumtetrafluoride.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png deleted file mode 100644 index 90cbef3417..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta deleted file mode 100644 index f6730e30a9..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumhexafluoride.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png deleted file mode 100644 index 90cbef3417..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta deleted file mode 100644 index 5169aabdc2..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/fluids/fluid.uraniumtetrafluoride.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 8 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png b/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png deleted file mode 100644 index d4e45d6adf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta deleted file mode 100644 index 76446714d8..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_0.png.mcmeta +++ /dev/null @@ -1,38 +0,0 @@ -{ - "animation": { - "frames": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15 - ] - } -} diff --git a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png b/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png deleted file mode 100644 index 739abd1090..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta deleted file mode 100644 index 4f0718ac96..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/hellfire/blockHellFire_layer_1.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation": {} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png deleted file mode 100644 index 2780ffe2dd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png deleted file mode 100644 index c3ca19138c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png deleted file mode 100644 index d04b15cd89..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png deleted file mode 100644 index d8ec997508..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png deleted file mode 100644 index 3466822e04..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png deleted file mode 100644 index 853e88b189..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png deleted file mode 100644 index 3979e4ae76..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png deleted file mode 100644 index 503022d656..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png deleted file mode 100644 index e1ae9fafb0..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png deleted file mode 100644 index 7b14db3bda..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png deleted file mode 100644 index d8880393ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png deleted file mode 100644 index 84f6f55c22..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png deleted file mode 100644 index b79fa87cf6..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png deleted file mode 100644 index 49e957bc1f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png deleted file mode 100644 index 150c1312c9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png deleted file mode 100644 index 2c5541ec6d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png deleted file mode 100644 index c62b04a499..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png deleted file mode 100644 index 3712f39fdd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png deleted file mode 100644 index 719aad5646..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png deleted file mode 100644 index 855132c0b3..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png deleted file mode 100644 index 3354bbe815..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png deleted file mode 100644 index 16e4db14ad..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png deleted file mode 100644 index 3466822e04..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png deleted file mode 100644 index f332bb77e5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png deleted file mode 100644 index b6576c39e4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png deleted file mode 100644 index 2c11681fcd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png deleted file mode 100644 index 0d3178a481..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png deleted file mode 100644 index b0f38da9c9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png deleted file mode 100644 index f614e41d52..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png deleted file mode 100644 index c011a999de..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png deleted file mode 100644 index 21a2847a7c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png deleted file mode 100644 index 49e957bc1f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png deleted file mode 100644 index 98bf3224ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png deleted file mode 100644 index cad7674ce5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png deleted file mode 100644 index a5501d12d2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png deleted file mode 100644 index b294af5b63..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png deleted file mode 100644 index 9b82677382..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png deleted file mode 100644 index bb8649fabc..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png deleted file mode 100644 index 60ac4bce02..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png deleted file mode 100644 index f7e479652f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png deleted file mode 100644 index 8d1e3f14e2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png deleted file mode 100644 index 9f997cedf8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png deleted file mode 100644 index ff2c73964a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png deleted file mode 100644 index 107d539765..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png deleted file mode 100644 index 5dd516f5e2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png deleted file mode 100644 index eb8cd5882d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png deleted file mode 100644 index fa3e6027a7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png deleted file mode 100644 index ce258e3c13..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/FUSIONIII_9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png deleted file mode 100644 index ce1c2ef3d8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png deleted file mode 100644 index 84e1ac6350..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png deleted file mode 100644 index 4f716e4c61..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png deleted file mode 100644 index fa9e98a6f5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png deleted file mode 100644 index 6c05b315b6..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png deleted file mode 100644 index d4a3888fe5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png deleted file mode 100644 index 8346cccf41..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png deleted file mode 100644 index 31bbffb4d4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png deleted file mode 100644 index 0858b2d399..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png deleted file mode 100644 index 1bc399315d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE1.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png deleted file mode 100644 index 32ea4edd45..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE2.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png deleted file mode 100644 index eb530ffb75..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE3.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn deleted file mode 100644 index 3c8bbeb696..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.pdn and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png deleted file mode 100644 index 1050d78b01..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE4.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png deleted file mode 100644 index b59c940f5e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE5.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png deleted file mode 100644 index 8bde3ca423..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE6.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png deleted file mode 100644 index 1b1b12db3b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE7.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png deleted file mode 100644 index da672b0e24..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE8.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png deleted file mode 100644 index f082c94c55..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/Grinder/GRINDER_ACTIVE9.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png deleted file mode 100644 index 020ed28da8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png deleted file mode 100644 index 12e321b7e9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png deleted file mode 100644 index c6d7715356..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png deleted file mode 100644 index 7f21c841aa..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png deleted file mode 100644 index 3466822e04..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png deleted file mode 100644 index c1ae3ca1af..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png deleted file mode 100644 index a0263e4341..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png deleted file mode 100644 index 26956df456..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png deleted file mode 100644 index f30b34fe4a..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png deleted file mode 100644 index 288df82736..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE1.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png deleted file mode 100644 index b8c344736e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE2.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png deleted file mode 100644 index 0ef17da006..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE3.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png deleted file mode 100644 index 07dd921123..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE4.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png deleted file mode 100644 index 49e957bc1f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE5.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png deleted file mode 100644 index 2dd6ca5a8e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE6.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png deleted file mode 100644 index 16091f0e18..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE7.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png deleted file mode 100644 index 698d96bf11..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE8.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png deleted file mode 100644 index 963d8b1a22..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta deleted file mode 100644 index d746756cbd..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/LARGECENTRIFUGE_ACTIVE9.png.mcmeta +++ /dev/null @@ -1,3 +0,0 @@ -{ - "animation":{} -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png deleted file mode 100644 index b0aa8bf5e5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png b/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png deleted file mode 100644 index 6322205460..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_COIL_II.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png b/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png deleted file mode 100644 index 0c9e529514..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png deleted file mode 100644 index 110e9ee38f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta deleted file mode 100644 index 24f863c95e..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CATALYSTS.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":3 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png deleted file mode 100644 index 574f481c68..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONTROL_CORE_BUS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png deleted file mode 100644 index 8af98deabf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_BUFFER.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png deleted file mode 100644 index 56b02d1914..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png deleted file mode 100644 index 8b5f405322..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_OFF.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png deleted file mode 100644 index 2424eef68f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ENERGY_RTG_ON.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png deleted file mode 100644 index 1fd61ede58..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta deleted file mode 100644 index 24f863c95e..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":3 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png deleted file mode 100644 index 5433ee1ff2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta deleted file mode 100644 index 97596ba817..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png deleted file mode 100644 index 6a749e96a9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png deleted file mode 100644 index 92910c9cdf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png deleted file mode 100644 index b7b2bed6de..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta deleted file mode 100644 index 60af678259..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png deleted file mode 100644 index 8c93e83d2d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta deleted file mode 100644 index 24f863c95e..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":3 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png deleted file mode 100644 index c7b22a7ef8..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta deleted file mode 100644 index 5d86d73ad2..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MILLING_BALL_BUS.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":5 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png deleted file mode 100644 index ce88198867..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_MUFFLER_ADV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png deleted file mode 100644 index edd4efbba9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta deleted file mode 100644 index 330653c04d..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_OVERFLOW_VALVE.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [3, 2, 1, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png deleted file mode 100644 index d70927f140..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_EV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png deleted file mode 100644 index 13310d6f57..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_HV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png deleted file mode 100644 index 7ef41870d4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_IV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png deleted file mode 100644 index e42acc5c01..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png deleted file mode 100644 index 440c987d6e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_LuV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png deleted file mode 100644 index 453cc94662..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MAX.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png deleted file mode 100644 index b1f29058ec..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_MV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png deleted file mode 100644 index 747adeb2e5..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ULV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png deleted file mode 100644 index 23cc2c60c2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_UV.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png b/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png deleted file mode 100644 index 230e78fe96..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/iconsets/TieredHulls/CASING_ZPM.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/mash_flow.png b/src/resources/assets/miscutils/textures/blocks/mash_flow.png deleted file mode 100644 index f155520eae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/mash_flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/mash_still.png b/src/resources/assets/miscutils/textures/blocks/mash_still.png deleted file mode 100644 index f155520eae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/mash_still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png b/src/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png deleted file mode 100644 index 950a44d2b7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/OVERLAY_GRATE_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png deleted file mode 100644 index 1f53895490..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta deleted file mode 100644 index 0285ac2f3b..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":2, - "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png deleted file mode 100644 index 50be701a0b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_GRATE_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png deleted file mode 100644 index 8eeb0179d7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png deleted file mode 100644 index ffac706bbd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_B.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png deleted file mode 100644 index 87c6017569..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_C.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png deleted file mode 100644 index 61d1f49a12..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_D.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png deleted file mode 100644 index 47f1792843..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_E.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png deleted file mode 100644 index 548c0ec283..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_F.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png deleted file mode 100644 index 172fab4657..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_G.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png deleted file mode 100644 index 68ab46a03d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_H.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png deleted file mode 100644 index 4443dc8024..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_METAL_PANEL_I.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png deleted file mode 100644 index 44bc5362ac..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png deleted file mode 100644 index ed8ad55ba2..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta deleted file mode 100644 index ba9119c7ad..0000000000 --- a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "animation":{ - "frametime":1, - "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png deleted file mode 100644 index 48315c82cd..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png deleted file mode 100644 index e3a652f3f9..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_LEFT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png deleted file mode 100644 index d759a163a4..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BIRD_A_RIGHT.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png deleted file mode 100644 index eb6c62491e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_BLUE_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png deleted file mode 100644 index f8d0b84c10..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_GREEN_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png deleted file mode 100644 index eb3257c754..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png deleted file mode 100644 index 3a1b683837..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png deleted file mode 100644 index a5d73f716d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png deleted file mode 100644 index 53df62051b..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_TABLET_B.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png deleted file mode 100644 index 5bc352238f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png deleted file mode 100644 index 32b6735a0d..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_B.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png deleted file mode 100644 index 946559cf4e..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_C.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png deleted file mode 100644 index 196600afdb..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png deleted file mode 100644 index 1bcd1ec78f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_B.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png deleted file mode 100644 index 54381fcf21..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_C.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png deleted file mode 100644 index 0cf3f40762..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_D.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/net.png b/src/resources/assets/miscutils/textures/blocks/net.png deleted file mode 100644 index e885ed12db..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/net.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redox/redox1.png b/src/resources/assets/miscutils/textures/blocks/redox/redox1.png deleted file mode 100644 index 05b752e0e7..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redox/redox1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redox/redox2.png b/src/resources/assets/miscutils/textures/blocks/redox/redox2.png deleted file mode 100644 index 231b6b17af..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redox/redox2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redox/redox3.png b/src/resources/assets/miscutils/textures/blocks/redox/redox3.png deleted file mode 100644 index 88cb664c41..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redox/redox3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redox/redox4.png b/src/resources/assets/miscutils/textures/blocks/redox/redox4.png deleted file mode 100644 index a627b64eef..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redox/redox4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redox/redox5.png b/src/resources/assets/miscutils/textures/blocks/redox/redox5.png deleted file mode 100644 index 9564596329..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redox/redox5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redox/redox6.png b/src/resources/assets/miscutils/textures/blocks/redox/redox6.png deleted file mode 100644 index 1023b718cc..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redox/redox6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png b/src/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png deleted file mode 100644 index ba45c43891..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/redstone/redstone_meter/top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/rum_mature_flow.png b/src/resources/assets/miscutils/textures/blocks/rum_mature_flow.png deleted file mode 100644 index f155520eae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/rum_mature_flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/rum_mature_still.png b/src/resources/assets/miscutils/textures/blocks/rum_mature_still.png deleted file mode 100644 index f155520eae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/rum_mature_still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png b/src/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png deleted file mode 100644 index f155520eae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/rum_semi_mature_flow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png b/src/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png deleted file mode 100644 index f155520eae..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/rum_semi_mature_still.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png deleted file mode 100644 index 68949e5f47..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png deleted file mode 100644 index c7c0d6492f..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_pine_opaque.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png deleted file mode 100644 index ddccb0e4fa..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png b/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png deleted file mode 100644 index 96e756c22c..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/leaves/leaves_rainforest_opaque.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png b/src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png deleted file mode 100644 index ae77894258..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png b/src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png deleted file mode 100644 index 146b0a99b6..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_pine_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png b/src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png deleted file mode 100644 index 3ff2ee2021..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png b/src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png deleted file mode 100644 index 99137b6f26..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/logs/log_rainforest_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png b/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png deleted file mode 100644 index f4c3ca84ac..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_pine.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png b/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png deleted file mode 100644 index 93d414d695..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/trees/saplings/sapling_rainforest.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/workbench.png b/src/resources/assets/miscutils/textures/blocks/workbench.png deleted file mode 100644 index b40ad65c71..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/workbench.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/blocks/workbench_top.png b/src/resources/assets/miscutils/textures/blocks/workbench_top.png deleted file mode 100644 index 5cd53a54bf..0000000000 Binary files a/src/resources/assets/miscutils/textures/blocks/workbench_top.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/boar.png b/src/resources/assets/miscutils/textures/entity/australia/boar.png deleted file mode 100644 index 147fc906fc..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/boar.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/bush_spider.png b/src/resources/assets/miscutils/textures/entity/australia/bush_spider.png deleted file mode 100644 index 5e05105be5..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/bush_spider.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png b/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png deleted file mode 100644 index 3fa3b44ea7..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png b/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png deleted file mode 100644 index 9b2912aba5..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_angry.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png b/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png deleted file mode 100644 index 6e37c611cb..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_collar.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png b/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png deleted file mode 100644 index cd539c5773..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/dingo/dingo_tame.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/australia/octopus.png b/src/resources/assets/miscutils/textures/entity/australia/octopus.png deleted file mode 100644 index 8ce98b003c..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/australia/octopus.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/batKing.png b/src/resources/assets/miscutils/textures/entity/batKing.png deleted file mode 100644 index ced2722563..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/batKing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/golemStaballoy.png b/src/resources/assets/miscutils/textures/entity/golemStaballoy.png deleted file mode 100644 index 307a25bd3f..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/golemStaballoy.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/sickBlaze.png b/src/resources/assets/miscutils/textures/entity/sickBlaze.png deleted file mode 100644 index d2b36d633d..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/sickBlaze.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/villager/aboriginal.png b/src/resources/assets/miscutils/textures/entity/villager/aboriginal.png deleted file mode 100644 index cd0474869f..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/villager/aboriginal.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/villager/banker.png b/src/resources/assets/miscutils/textures/entity/villager/banker.png deleted file mode 100644 index afe65842cb..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/villager/banker.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/villager/technician.png b/src/resources/assets/miscutils/textures/entity/villager/technician.png deleted file mode 100644 index 3df6503f9e..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/villager/technician.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/entity/villager/trader.png b/src/resources/assets/miscutils/textures/entity/villager/trader.png deleted file mode 100644 index f21c4eea6c..0000000000 Binary files a/src/resources/assets/miscutils/textures/entity/villager/trader.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/enviroment/moon_phases.png b/src/resources/assets/miscutils/textures/enviroment/moon_phases.png deleted file mode 100644 index 9131d0f58c..0000000000 Binary files a/src/resources/assets/miscutils/textures/enviroment/moon_phases.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/enviroment/snow.png b/src/resources/assets/miscutils/textures/enviroment/snow.png deleted file mode 100644 index a91935ee0e..0000000000 Binary files a/src/resources/assets/miscutils/textures/enviroment/snow.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/enviroment/sun.png b/src/resources/assets/miscutils/textures/enviroment/sun.png deleted file mode 100644 index 6c25e9c637..0000000000 Binary files a/src/resources/assets/miscutils/textures/enviroment/sun.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/AdvancedBoiler.png b/src/resources/assets/miscutils/textures/gui/AdvancedBoiler.png deleted file mode 100644 index e678d0fdb2..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/AdvancedBoiler.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png b/src/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png deleted file mode 100644 index 1b2314c488..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/AdvancedCraftingTable.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png b/src/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png deleted file mode 100644 index ea9319a50e..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/BronzeCraftingTable.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/CircuitProgrammer.png b/src/resources/assets/miscutils/textures/gui/CircuitProgrammer.png deleted file mode 100644 index 8f77124bbb..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/CircuitProgrammer.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/CokeOven.png b/src/resources/assets/miscutils/textures/gui/CokeOven.png deleted file mode 100644 index c094d9c319..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/CokeOven.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/Cyclotron.png b/src/resources/assets/miscutils/textures/gui/Cyclotron.png deleted file mode 100644 index 98c374ace8..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/Cyclotron.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/FishTrap.png b/src/resources/assets/miscutils/textures/gui/FishTrap.png deleted file mode 100644 index 35423fffb9..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/FishTrap.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/FluidReactor.png b/src/resources/assets/miscutils/textures/gui/FluidReactor.png deleted file mode 100644 index b8e88bd461..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/FluidReactor.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/Generic3By3.png b/src/resources/assets/miscutils/textures/gui/Generic3By3.png deleted file mode 100644 index 1d8c806693..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/Generic3By3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png b/src/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png deleted file mode 100644 index 95ec56941d..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialCentrifuge.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png b/src/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png deleted file mode 100644 index a555f14f11..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialCuttingMachine.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png b/src/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png deleted file mode 100644 index ec8d7eb118..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialElectrolyzer.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialExtruder.png b/src/resources/assets/miscutils/textures/gui/IndustrialExtruder.png deleted file mode 100644 index a555f14f11..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialExtruder.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialMixer.png b/src/resources/assets/miscutils/textures/gui/IndustrialMixer.png deleted file mode 100644 index 1c24391f02..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialMixer.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialSifter.png b/src/resources/assets/miscutils/textures/gui/IndustrialSifter.png deleted file mode 100644 index 34641e3a09..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialSifter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png b/src/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png deleted file mode 100644 index d75e2b6ae6..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialThermalCentrifuge.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png b/src/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png deleted file mode 100644 index 4475138f7b..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialWashPlant.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png b/src/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png deleted file mode 100644 index dd0c5ce5e7..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IndustrialWireFactory.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/IronBlastFurnace.png b/src/resources/assets/miscutils/textures/gui/IronBlastFurnace.png deleted file mode 100644 index c2ccbba96b..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/IronBlastFurnace.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/MacerationStack.png b/src/resources/assets/miscutils/textures/gui/MacerationStack.png deleted file mode 100644 index 7fb4099566..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/MacerationStack.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/MaterialPress.png b/src/resources/assets/miscutils/textures/gui/MaterialPress.png deleted file mode 100644 index 70befc17f0..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/MaterialPress.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/MatterFabricator.png b/src/resources/assets/miscutils/textures/gui/MatterFabricator.png deleted file mode 100644 index 1d5e9d27b8..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/MatterFabricator.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/ModularityTable.png b/src/resources/assets/miscutils/textures/gui/ModularityTable.png deleted file mode 100644 index 1a455d4f95..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/ModularityTable.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/MultiblockDisplay.png b/src/resources/assets/miscutils/textures/gui/MultiblockDisplay.png deleted file mode 100644 index bec61bce18..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/MultiblockDisplay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png b/src/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png deleted file mode 100644 index c1ed0e5f37..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/MultiblockDisplay_Generic.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/PestKiller.png b/src/resources/assets/miscutils/textures/gui/PestKiller.png deleted file mode 100644 index d1978ae04a..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/PestKiller.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/PollutionCleaner.png b/src/resources/assets/miscutils/textures/gui/PollutionCleaner.png deleted file mode 100644 index 6162c2fdc3..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/PollutionCleaner.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/PowerSubStation.png b/src/resources/assets/miscutils/textures/gui/PowerSubStation.png deleted file mode 100644 index a764dc719a..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/PowerSubStation.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/ProjectTable.png b/src/resources/assets/miscutils/textures/gui/ProjectTable.png deleted file mode 100644 index e8f65a6752..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/ProjectTable.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/RoundRobinator.png b/src/resources/assets/miscutils/textures/gui/RoundRobinator.png deleted file mode 100644 index 54c06f22ae..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/RoundRobinator.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/SafeBlock.png b/src/resources/assets/miscutils/textures/gui/SafeBlock.png deleted file mode 100644 index fe60913941..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/SafeBlock.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/SlowFusion.png b/src/resources/assets/miscutils/textures/gui/SlowFusion.png deleted file mode 100644 index 76c6c91ad1..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/SlowFusion.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/SteelBoiler.png b/src/resources/assets/miscutils/textures/gui/SteelBoiler.png deleted file mode 100644 index e4f2869e8f..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/SteelBoiler.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/SuperJukebox.png b/src/resources/assets/miscutils/textures/gui/SuperJukebox.png deleted file mode 100644 index c50c0da4a5..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/SuperJukebox.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/TreeFarmer.png b/src/resources/assets/miscutils/textures/gui/TreeFarmer.png deleted file mode 100644 index cd2e86dcb4..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/TreeFarmer.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png b/src/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png deleted file mode 100644 index 08f9761233..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/VolumetricFlaskSetter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/Workbench.png b/src/resources/assets/miscutils/textures/gui/Workbench.png deleted file mode 100644 index 95d93d3c4c..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/Workbench.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/helium_collector_gui.png b/src/resources/assets/miscutils/textures/gui/helium_collector_gui.png deleted file mode 100644 index b22d0ed947..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/helium_collector_gui.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/itemBackpack.png b/src/resources/assets/miscutils/textures/gui/itemBackpack.png deleted file mode 100644 index 08ac08a2db..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/itemBackpack.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/itemGrindle.png b/src/resources/assets/miscutils/textures/gui/itemGrindle.png deleted file mode 100644 index 98ccb311d0..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/itemGrindle.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/machine_Charger.png b/src/resources/assets/miscutils/textures/gui/machine_Charger.png deleted file mode 100644 index dcad2b2983..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/machine_Charger.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/nei/decayables.png b/src/resources/assets/miscutils/textures/gui/nei/decayables.png deleted file mode 100644 index d1827433a0..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/nei/decayables.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/gui/nei/widgets.png b/src/resources/assets/miscutils/textures/gui/nei/widgets.png deleted file mode 100644 index 0dc26c43e4..0000000000 Binary files a/src/resources/assets/miscutils/textures/gui/nei/widgets.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png b/src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png deleted file mode 100644 index 5427f66858..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png deleted file mode 100644 index 4a7c1ce427..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png deleted file mode 100644 index 4a7c1ce427..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png deleted file mode 100644 index bf81a1b4b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png deleted file mode 100644 index cedee004e4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/100.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png deleted file mode 100644 index 1ebe9648e6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/101.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png deleted file mode 100644 index c73159e9da..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/102.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png deleted file mode 100644 index 5e2e56f927..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/103.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png deleted file mode 100644 index 8ad5f2ee31..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/104.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png deleted file mode 100644 index f9ebf8c4a5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/105.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png deleted file mode 100644 index b3b257e59c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/106.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png deleted file mode 100644 index 3d47ce434c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/107.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png deleted file mode 100644 index 2b99670ea1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/108.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png deleted file mode 100644 index e516903d26..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/109.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png deleted file mode 100644 index bf81a1b4b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png deleted file mode 100644 index 97767a73c6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/110.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png deleted file mode 100644 index 3147037815..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/111.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png deleted file mode 100644 index dce530370f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/112.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png deleted file mode 100644 index 0c85939327..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/113.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png deleted file mode 100644 index b3c3716abb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/114.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png deleted file mode 100644 index a9a9c6fcee..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/115.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png deleted file mode 100644 index 051b45e6bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png deleted file mode 100644 index 051b45e6bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/13.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png deleted file mode 100644 index 1938287f27..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png deleted file mode 100644 index 327e530f1b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png deleted file mode 100644 index 635be463af..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png deleted file mode 100644 index 24afa30c17..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png deleted file mode 100644 index 847e54ef60..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png deleted file mode 100644 index ddd9cb7a2f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png deleted file mode 100644 index e21c4fb78c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png deleted file mode 100644 index 29e270f862..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png deleted file mode 100644 index 87a48050fd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png deleted file mode 100644 index 3836414587..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png deleted file mode 100644 index 051b45e6bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/14.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png deleted file mode 100644 index 8b38dcd9ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/140.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png deleted file mode 100644 index 53682976a8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/141.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png deleted file mode 100644 index 8a21902982..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/142.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png deleted file mode 100644 index 81f418e1a8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/143.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png deleted file mode 100644 index 2e66f92a2c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/144.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png deleted file mode 100644 index 61a783176e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/145.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png deleted file mode 100644 index 16a79d6896..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/146.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png deleted file mode 100644 index 4b39623750..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/147.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png deleted file mode 100644 index fbe1b9ac82..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/148.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png deleted file mode 100644 index 5979772ace..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/149.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png deleted file mode 100644 index 051b45e6bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/15.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png deleted file mode 100644 index 254680aff4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/150.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png deleted file mode 100644 index 29ba464570..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/151.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png deleted file mode 100644 index 5ddb32de79..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/16.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png deleted file mode 100644 index fa7f814d3a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/160.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png deleted file mode 100644 index 673c6e011b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/161.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png deleted file mode 100644 index 65fc3f7d6e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/162.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png deleted file mode 100644 index 5ddb32de79..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/17.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png deleted file mode 100644 index 5ddb32de79..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/18.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png deleted file mode 100644 index 5ddb32de79..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/19.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png deleted file mode 100644 index 4a7c1ce427..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png deleted file mode 100644 index 38f7ec8756..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/20.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png deleted file mode 100644 index e10815677a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/200.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png deleted file mode 100644 index 661cd14817..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/201.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png deleted file mode 100644 index 6c64b90877..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/202.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png deleted file mode 100644 index ec3c0358a1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/203.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png deleted file mode 100644 index daace0f92a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/204.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png deleted file mode 100644 index f5d5a1bc39..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/205.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png deleted file mode 100644 index d6ff394c66..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/206.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png deleted file mode 100644 index 9f03d572b7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/207.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png deleted file mode 100644 index 548784db2a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/208.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png deleted file mode 100644 index 38f7ec8756..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/21.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png deleted file mode 100644 index 6f403c14f5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/210.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png deleted file mode 100644 index 6614c152a6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/211.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png deleted file mode 100644 index 98c4b4f2b7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/212.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png deleted file mode 100644 index 7da7ab1e69..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/213.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png deleted file mode 100644 index 56da7e8d0d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/214.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png deleted file mode 100644 index cffad53f13..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/215.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png deleted file mode 100644 index 6c9c006044..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/216.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png deleted file mode 100644 index ee1c87e1b1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/217.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png deleted file mode 100644 index 5d6a74cd72..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/218.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png deleted file mode 100644 index 881bdaa78a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/219.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png deleted file mode 100644 index 38f7ec8756..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/22.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png deleted file mode 100644 index 00900203dc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/220.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png deleted file mode 100644 index ccf9edc4a4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/221.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png deleted file mode 100644 index 38f7ec8756..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/23.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png deleted file mode 100644 index a1c2183ee8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/24.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png deleted file mode 100644 index a1c2183ee8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/25.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png deleted file mode 100644 index a1c2183ee8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/26.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png deleted file mode 100644 index a1c2183ee8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/27.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png deleted file mode 100644 index 5e4886b0f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/28.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png deleted file mode 100644 index 5e4886b0f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/29.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png deleted file mode 100644 index 4a7c1ce427..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png deleted file mode 100644 index 5e4886b0f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/30.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png deleted file mode 100644 index 5e4886b0f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/31.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png deleted file mode 100644 index 4a7c1ce427..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/32.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png deleted file mode 100644 index 1a3acd9e94..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/33.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png deleted file mode 100644 index bf81a1b4b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/34.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png deleted file mode 100644 index 051b45e6bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/35.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png deleted file mode 100644 index 5ddb32de79..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/36.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png deleted file mode 100644 index 38f7ec8756..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/37.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png deleted file mode 100644 index a1c2183ee8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/38.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png deleted file mode 100644 index 5e4886b0f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/39.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png deleted file mode 100644 index 1a3acd9e94..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png deleted file mode 100644 index a1b063620a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/40.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png deleted file mode 100644 index 9b9c314475..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/41.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png deleted file mode 100644 index b3f174ebd4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/42.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png deleted file mode 100644 index 0939c7eb87..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/43.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png deleted file mode 100644 index 23cc1deb66..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/44.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png deleted file mode 100644 index 1a3acd9e94..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png deleted file mode 100644 index 52d46cb62c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png deleted file mode 100644 index 6660384d76..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png deleted file mode 100644 index 0b4e7d6583..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png deleted file mode 100644 index 554a7d8e52..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png deleted file mode 100644 index b567a0cd15..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png deleted file mode 100644 index 891608d308..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png deleted file mode 100644 index 246319069a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png deleted file mode 100644 index 296c9b6c97..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png deleted file mode 100644 index fe22c02056..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/50/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png deleted file mode 100644 index 52d46cb62c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png deleted file mode 100644 index 6660384d76..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png deleted file mode 100644 index 0b4e7d6583..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png deleted file mode 100644 index 554a7d8e52..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png deleted file mode 100644 index b567a0cd15..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png deleted file mode 100644 index 891608d308..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png deleted file mode 100644 index 246319069a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png deleted file mode 100644 index 296c9b6c97..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png deleted file mode 100644 index fe22c02056..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/52/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png deleted file mode 100644 index 52d46cb62c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png deleted file mode 100644 index 6660384d76..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png deleted file mode 100644 index 0b4e7d6583..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png deleted file mode 100644 index 554a7d8e52..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png deleted file mode 100644 index b567a0cd15..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png deleted file mode 100644 index 891608d308..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png deleted file mode 100644 index 246319069a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png deleted file mode 100644 index 296c9b6c97..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png deleted file mode 100644 index fe22c02056..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/54/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png deleted file mode 100644 index 23e0a10e06..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/55.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png deleted file mode 100644 index 1a3acd9e94..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png deleted file mode 100644 index 08122e5042..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/60.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png deleted file mode 100644 index f1756e78ba..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/61.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png deleted file mode 100644 index 9190330469..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/62.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png deleted file mode 100644 index f1756e78ba..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/63.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png deleted file mode 100644 index 032a256989..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/64.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png deleted file mode 100644 index d96558c8f5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png deleted file mode 100644 index 4d8f366b9c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png deleted file mode 100644 index 1a3acd9e94..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png deleted file mode 100644 index e914a7c788..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png deleted file mode 100644 index af05b249b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/700.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png deleted file mode 100644 index 87d68083fa..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/701.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png deleted file mode 100644 index 197729ce5c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/702.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png deleted file mode 100644 index 9f75ddb6f2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/703.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png deleted file mode 100644 index 011f12583d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/704.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png deleted file mode 100644 index 2968f9e0f9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/705.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png deleted file mode 100644 index ab26c57778..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/706.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png deleted file mode 100644 index 84cb315d59..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/707.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png deleted file mode 100644 index ac695c9089..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/708.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png deleted file mode 100644 index bd629f0ee4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/71.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png deleted file mode 100644 index 9555795cbe..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/710.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png deleted file mode 100644 index b8294d66d5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/711.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png deleted file mode 100644 index d1ddb92013..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/712.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png deleted file mode 100644 index db0d4d4dde..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/713.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png deleted file mode 100644 index dd3de3ecff..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/714.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png deleted file mode 100644 index dd3de3ecff..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/715.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png deleted file mode 100644 index 506ab6621b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/716.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png deleted file mode 100644 index 506ab6621b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/717.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png deleted file mode 100644 index 506ab6621b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/718.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png deleted file mode 100644 index 05c3440206..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/719.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png deleted file mode 100644 index e1ea94bac6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/72.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png deleted file mode 100644 index 6b6d885084..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/720.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png deleted file mode 100644 index 23b7878fdd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/721.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png deleted file mode 100644 index 68de2aba73..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/73.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png deleted file mode 100644 index c0d974240c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/74.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png deleted file mode 100644 index e1f8be799b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/75.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png deleted file mode 100644 index ee106b029f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/751.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png deleted file mode 100644 index 3aed0ef200..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/752.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png deleted file mode 100644 index 03d271872e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/753.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png deleted file mode 100644 index dd87199ae2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/754.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png deleted file mode 100644 index 5b9053e1f4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/755.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png deleted file mode 100644 index 23c87b8a2d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/756.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png deleted file mode 100644 index 511366e648..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/757.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png deleted file mode 100644 index d8d2012c51..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/758.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png deleted file mode 100644 index 1e538bce45..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/759.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png deleted file mode 100644 index ed806126fb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/76.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png deleted file mode 100644 index a7452f94ee..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/77.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png deleted file mode 100644 index e371af02f9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/78.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png deleted file mode 100644 index e911b80d03..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/79.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png deleted file mode 100644 index bf81a1b4b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png deleted file mode 100644 index bf81a1b4b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metatool.01/0.png b/src/resources/assets/miscutils/textures/items/MU-metatool.01/0.png deleted file mode 100644 index 3bcbace856..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metatool.01/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metatool.01/1.png b/src/resources/assets/miscutils/textures/items/MU-metatool.01/1.png deleted file mode 100644 index eb6baf34ae..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metatool.01/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metatool.01/2.png b/src/resources/assets/miscutils/textures/items/MU-metatool.01/2.png deleted file mode 100644 index 3b72cb69b6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metatool.01/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/MU-metatool.01/3.png b/src/resources/assets/miscutils/textures/items/MU-metatool.01/3.png deleted file mode 100644 index ca0ad43c3b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/MU-metatool.01/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/StoneStatue.png b/src/resources/assets/miscutils/textures/items/StoneStatue.png deleted file mode 100644 index 36ab6ccd56..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/StoneStatue.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png b/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png deleted file mode 100644 index 8576ae1b7a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png b/src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png deleted file mode 100644 index efa1a6e0ca..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png b/src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png deleted file mode 100644 index aaea7803b5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/BasicAlgae_Overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png b/src/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png deleted file mode 100644 index c2736be76c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/BioCircuit.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png deleted file mode 100644 index 57d77be16a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png deleted file mode 100644 index 51bb4587d9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png deleted file mode 100644 index e81bae4aae..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png deleted file mode 100644 index 0cc273996e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png deleted file mode 100644 index dca743acd3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png deleted file mode 100644 index 15257d9efd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/13.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png deleted file mode 100644 index f81fc43aff..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/14.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png deleted file mode 100644 index 31951671cd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/15.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png deleted file mode 100644 index 2c6e0b8cb6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/16.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png deleted file mode 100644 index 4309f3a975..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/17.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png deleted file mode 100644 index e82660e9f8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/18.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png deleted file mode 100644 index dc2070e635..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/19.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png deleted file mode 100644 index 2cdf37adad..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png deleted file mode 100644 index 9b536f84d0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/20.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png deleted file mode 100644 index 1a04c2415c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/21.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png deleted file mode 100644 index 77be3ef6a8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/22.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png deleted file mode 100644 index 110cd7f8e8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/23.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png deleted file mode 100644 index 0c065db4ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/24.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png deleted file mode 100644 index 168b15adb3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/25.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png deleted file mode 100644 index c98e2d6319..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png deleted file mode 100644 index af0bcc7064..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png deleted file mode 100644 index 1b60b7f555..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png deleted file mode 100644 index 7f6f045430..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png deleted file mode 100644 index 8a2cd2891b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png deleted file mode 100644 index c8c6299d7b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png b/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png deleted file mode 100644 index df99f3f5e8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bioscience/MetaItem1/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bomb.png b/src/resources/assets/miscutils/textures/items/bomb.png deleted file mode 100644 index e8e9b0f532..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bomb.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bomb_casing.png b/src/resources/assets/miscutils/textures/items/bomb_casing.png deleted file mode 100644 index d4238babe2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bomb_casing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bomb_lit.png b/src/resources/assets/miscutils/textures/items/bomb_lit.png deleted file mode 100644 index e40029160b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bomb_lit.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bucket.generic.overlay.png b/src/resources/assets/miscutils/textures/items/bucket.generic.overlay.png deleted file mode 100644 index 1597a9cc4a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bucket.generic.overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png b/src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png deleted file mode 100644 index f6c9a9f131..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta b/src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta deleted file mode 100644 index 70cc4d313c..0000000000 --- a/src/resources/assets/miscutils/textures/items/bucket/BucketCryotheum.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 6 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png b/src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png deleted file mode 100644 index 6a00cf1509..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta b/src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta deleted file mode 100644 index f6730e30a9..0000000000 --- a/src/resources/assets/miscutils/textures/items/bucket/BucketEnder.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 4 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png b/src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png deleted file mode 100644 index 82f1bb4b84..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta b/src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta deleted file mode 100644 index ddc2f9fb7a..0000000000 --- a/src/resources/assets/miscutils/textures/items/bucket/BucketPyrotheum.png.mcmeta +++ /dev/null @@ -1,23 +0,0 @@ -{ - "animation": { - "frametime": 2, - "frames": [ - 15, - 14, - 13, - 12, - 11, - 10, - 9, - 8, - 7, - 6, - 5, - 4, - 3, - 2, - 1, - 0 - ] - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png b/src/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png deleted file mode 100644 index 99a6af0f18..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/bucket/OverlayIcon.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png b/src/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png deleted file mode 100644 index 3cb0ac7097..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/burnables/itemCactusCharcoal.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png b/src/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png deleted file mode 100644 index 9dc98ba18d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/burnables/itemCactusCoke.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png b/src/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png deleted file mode 100644 index 4f8fd406d4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/burnables/itemCoalCoke.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png b/src/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png deleted file mode 100644 index f66a217c78..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/burnables/itemSugarCharcoal.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png b/src/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png deleted file mode 100644 index 055655ebe1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/burnables/itemSugarCoke.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/1.png b/src/resources/assets/miscutils/textures/items/chargepack/1.png deleted file mode 100644 index 9039d443c3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/2.png b/src/resources/assets/miscutils/textures/items/chargepack/2.png deleted file mode 100644 index 7023e7ce82..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/3.png b/src/resources/assets/miscutils/textures/items/chargepack/3.png deleted file mode 100644 index 4d787e7aa8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/4.png b/src/resources/assets/miscutils/textures/items/chargepack/4.png deleted file mode 100644 index 9320de0611..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/5.png b/src/resources/assets/miscutils/textures/items/chargepack/5.png deleted file mode 100644 index ab8771c89c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/6.png b/src/resources/assets/miscutils/textures/items/chargepack/6.png deleted file mode 100644 index a01f435e72..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/7.png b/src/resources/assets/miscutils/textures/items/chargepack/7.png deleted file mode 100644 index fb5a5fba43..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/8.png b/src/resources/assets/miscutils/textures/items/chargepack/8.png deleted file mode 100644 index aff1ec693f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/chargepack/9.png b/src/resources/assets/miscutils/textures/items/chargepack/9.png deleted file mode 100644 index 0b9cf4d18e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/chargepack/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_0.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_0.png deleted file mode 100644 index a35084d087..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_1.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_1.png deleted file mode 100644 index 93c1d6fd31..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_2.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_2.png deleted file mode 100644 index 7eb734b97d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_3.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_3.png deleted file mode 100644 index 7613641938..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_4.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_4.png deleted file mode 100644 index 83fe4225c8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_5.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_5.png deleted file mode 100644 index 15f0e28421..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_6.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_6.png deleted file mode 100644 index da59694ac6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_7.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_7.png deleted file mode 100644 index 2055a6cb57..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_8.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_8.png deleted file mode 100644 index 3f8a60db8d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/controlcore/Core_9.png b/src/resources/assets/miscutils/textures/items/controlcore/Core_9.png deleted file mode 100644 index 15046c1fbb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/controlcore/Core_9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/0.png b/src/resources/assets/miscutils/textures/items/covers/0.png deleted file mode 100644 index 1938287f27..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/1.png b/src/resources/assets/miscutils/textures/items/covers/1.png deleted file mode 100644 index 327e530f1b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/10.png b/src/resources/assets/miscutils/textures/items/covers/10.png deleted file mode 100644 index 9e48f50335..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/11.png b/src/resources/assets/miscutils/textures/items/covers/11.png deleted file mode 100644 index 32ffcb8008..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/12.png b/src/resources/assets/miscutils/textures/items/covers/12.png deleted file mode 100644 index 48b1eadf93..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/13.png b/src/resources/assets/miscutils/textures/items/covers/13.png deleted file mode 100644 index 7f6a13cb82..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/13.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/14.png b/src/resources/assets/miscutils/textures/items/covers/14.png deleted file mode 100644 index 9f59404337..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/14.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/15.png b/src/resources/assets/miscutils/textures/items/covers/15.png deleted file mode 100644 index ed0f49bd0f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/15.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/2.png b/src/resources/assets/miscutils/textures/items/covers/2.png deleted file mode 100644 index 635be463af..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/3.png b/src/resources/assets/miscutils/textures/items/covers/3.png deleted file mode 100644 index 24afa30c17..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/4.png b/src/resources/assets/miscutils/textures/items/covers/4.png deleted file mode 100644 index 847e54ef60..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/5.png b/src/resources/assets/miscutils/textures/items/covers/5.png deleted file mode 100644 index ddd9cb7a2f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/6.png b/src/resources/assets/miscutils/textures/items/covers/6.png deleted file mode 100644 index e21c4fb78c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/7.png b/src/resources/assets/miscutils/textures/items/covers/7.png deleted file mode 100644 index 29e270f862..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/8.png b/src/resources/assets/miscutils/textures/items/covers/8.png deleted file mode 100644 index 87a48050fd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/covers/9.png b/src/resources/assets/miscutils/textures/items/covers/9.png deleted file mode 100644 index 3836414587..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/covers/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png deleted file mode 100644 index 652f68aeb7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png deleted file mode 100644 index 7a14abccbd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png deleted file mode 100644 index cc0a5fe94d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png deleted file mode 100644 index ce0dbab306..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoilWire_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png deleted file mode 100644 index 2b2f615676..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png deleted file mode 100644 index f01ba96be9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png deleted file mode 100644 index f57bb1308b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png b/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png deleted file mode 100644 index 77a416a3a6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dehydrator/itemDehydratorCoil_3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dust.png b/src/resources/assets/miscutils/textures/items/dust.png deleted file mode 100644 index 4c8e6485ec..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dust.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dustSmall.png b/src/resources/assets/miscutils/textures/items/dustSmall.png deleted file mode 100644 index c432a032c2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dustSmall.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/dustTiny.png b/src/resources/assets/miscutils/textures/items/dustTiny.png deleted file mode 100644 index 8f597c61e0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/dustTiny.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/0.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/0.png deleted file mode 100644 index 944ab47126..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/1.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/1.png deleted file mode 100644 index 2d235ca65d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/2.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/2.png deleted file mode 100644 index ec81acba2c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/3.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/3.png deleted file mode 100644 index 1fc103297a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png deleted file mode 100644 index db5ddf0063..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/5.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/5.png deleted file mode 100644 index 2497c88e2d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/6.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/6.png deleted file mode 100644 index 083db84ef1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/7.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/7.png deleted file mode 100644 index 27927d0db6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/8.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/8.png deleted file mode 100644 index 7013c41d6b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/food/MetaItem1/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameAccelerated.png b/src/resources/assets/miscutils/textures/items/frameAccelerated.png deleted file mode 100644 index e02bd78586..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameAccelerated.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameArborists.png b/src/resources/assets/miscutils/textures/items/frameArborists.png deleted file mode 100644 index b55d3a92e6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameArborists.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameBusy.png b/src/resources/assets/miscutils/textures/items/frameBusy.png deleted file mode 100644 index ea20d3d046..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameBusy.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameChocolate.png b/src/resources/assets/miscutils/textures/items/frameChocolate.png deleted file mode 100644 index 624e9b674b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameChocolate.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameDecaying.png b/src/resources/assets/miscutils/textures/items/frameDecaying.png deleted file mode 100644 index 3e6feb1a3c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameDecaying.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameHealing.png b/src/resources/assets/miscutils/textures/items/frameHealing.png deleted file mode 100644 index 7756b84da2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameHealing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameMutagenic.png b/src/resources/assets/miscutils/textures/items/frameMutagenic.png deleted file mode 100644 index 0a24289776..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameMutagenic.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameNova.png b/src/resources/assets/miscutils/textures/items/frameNova.png deleted file mode 100644 index 3ed54fef87..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameNova.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameRestraint.png b/src/resources/assets/miscutils/textures/items/frameRestraint.png deleted file mode 100644 index 4fc5cd3ab4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameRestraint.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameSlowing.png b/src/resources/assets/miscutils/textures/items/frameSlowing.png deleted file mode 100644 index 8d07fdd47b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameSlowing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameSoul.png b/src/resources/assets/miscutils/textures/items/frameSoul.png deleted file mode 100644 index c044632ec9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameSoul.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameStabilizing.png b/src/resources/assets/miscutils/textures/items/frameStabilizing.png deleted file mode 100644 index 1fed360bf7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameStabilizing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameUseless.png b/src/resources/assets/miscutils/textures/items/frameUseless.png deleted file mode 100644 index e316e0a5d6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameUseless.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/frameVoid.png b/src/resources/assets/miscutils/textures/items/frameVoid.png deleted file mode 100644 index 45fc307328..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/frameVoid.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png b/src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png deleted file mode 100644 index 3030cbe6aa..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ANGLE_GRINDER_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png b/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png deleted file mode 100644 index 5114f2c9a8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_BUTCHER_KNIFE_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png b/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png deleted file mode 100644 index 1c6257f336..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png deleted file mode 100644 index 1c91860461..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_LIGHTER_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png b/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png deleted file mode 100644 index 8ccd7f3c1a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/ELECTRIC_SNIPS_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png deleted file mode 100644 index 6c7e63b924..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/PUMP_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png b/src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png deleted file mode 100644 index ae13305b96..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png deleted file mode 100644 index ae13305b96..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/RENDERING_ERROR_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png b/src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png deleted file mode 100644 index d6ba7ec2ca..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png deleted file mode 100644 index d83a131004..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/SKOOKUMCHOOCHER_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/VOID.png b/src/resources/assets/miscutils/textures/items/iconsets/VOID.png deleted file mode 100644 index db16e741fe..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/VOID.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png b/src/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png deleted file mode 100644 index 6c7e63b924..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/iconsets/VOID_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/0.png b/src/resources/assets/miscutils/textures/items/ion/0.png deleted file mode 100644 index c56a04238f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/1.png b/src/resources/assets/miscutils/textures/items/ion/1.png deleted file mode 100644 index 174d2ad950..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/10.png b/src/resources/assets/miscutils/textures/items/ion/10.png deleted file mode 100644 index 8e3348f582..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/100.png b/src/resources/assets/miscutils/textures/items/ion/100.png deleted file mode 100644 index 3d92a39004..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/100.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/101.png b/src/resources/assets/miscutils/textures/items/ion/101.png deleted file mode 100644 index 85b8f58ad9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/101.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/102.png b/src/resources/assets/miscutils/textures/items/ion/102.png deleted file mode 100644 index 6993d5e4cf..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/102.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/103.png b/src/resources/assets/miscutils/textures/items/ion/103.png deleted file mode 100644 index a3faa8a260..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/103.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/104.png b/src/resources/assets/miscutils/textures/items/ion/104.png deleted file mode 100644 index 9c80b9d1f0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/104.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/105.png b/src/resources/assets/miscutils/textures/items/ion/105.png deleted file mode 100644 index 2633689df4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/105.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/106.png b/src/resources/assets/miscutils/textures/items/ion/106.png deleted file mode 100644 index c368411d12..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/106.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/107.png b/src/resources/assets/miscutils/textures/items/ion/107.png deleted file mode 100644 index fc8e4c2844..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/107.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/108.png b/src/resources/assets/miscutils/textures/items/ion/108.png deleted file mode 100644 index d2b271526a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/108.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/109.png b/src/resources/assets/miscutils/textures/items/ion/109.png deleted file mode 100644 index 585321db38..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/109.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/11.png b/src/resources/assets/miscutils/textures/items/ion/11.png deleted file mode 100644 index 72baf3d9e9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/110.png b/src/resources/assets/miscutils/textures/items/ion/110.png deleted file mode 100644 index 82d73b7aca..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/110.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/111.png b/src/resources/assets/miscutils/textures/items/ion/111.png deleted file mode 100644 index 869435fd75..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/111.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/112.png b/src/resources/assets/miscutils/textures/items/ion/112.png deleted file mode 100644 index bb14befcfe..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/112.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/113.png b/src/resources/assets/miscutils/textures/items/ion/113.png deleted file mode 100644 index 5aae8d7814..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/113.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/114.png b/src/resources/assets/miscutils/textures/items/ion/114.png deleted file mode 100644 index ea4897286d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/114.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/115.png b/src/resources/assets/miscutils/textures/items/ion/115.png deleted file mode 100644 index 815acfb339..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/115.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/116.png b/src/resources/assets/miscutils/textures/items/ion/116.png deleted file mode 100644 index a335c2bb70..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/116.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/117.png b/src/resources/assets/miscutils/textures/items/ion/117.png deleted file mode 100644 index f3d46e4bb6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/117.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/12.png b/src/resources/assets/miscutils/textures/items/ion/12.png deleted file mode 100644 index c2698ef286..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/13.png b/src/resources/assets/miscutils/textures/items/ion/13.png deleted file mode 100644 index d9f17334f7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/13.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/14.png b/src/resources/assets/miscutils/textures/items/ion/14.png deleted file mode 100644 index 0640a05827..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/14.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/15.png b/src/resources/assets/miscutils/textures/items/ion/15.png deleted file mode 100644 index 8b9a6c872e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/15.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/16.png b/src/resources/assets/miscutils/textures/items/ion/16.png deleted file mode 100644 index 3e0dbe1143..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/16.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/17.png b/src/resources/assets/miscutils/textures/items/ion/17.png deleted file mode 100644 index dfcb224a3e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/17.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/18.png b/src/resources/assets/miscutils/textures/items/ion/18.png deleted file mode 100644 index 910712afc5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/18.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/19.png b/src/resources/assets/miscutils/textures/items/ion/19.png deleted file mode 100644 index 63627d13a3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/19.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/2.png b/src/resources/assets/miscutils/textures/items/ion/2.png deleted file mode 100644 index ab4474425e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/20.png b/src/resources/assets/miscutils/textures/items/ion/20.png deleted file mode 100644 index c4c2b0da40..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/20.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/21.png b/src/resources/assets/miscutils/textures/items/ion/21.png deleted file mode 100644 index ad8c2b6dbf..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/21.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/22.png b/src/resources/assets/miscutils/textures/items/ion/22.png deleted file mode 100644 index ce4fcd3ff2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/22.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/23.png b/src/resources/assets/miscutils/textures/items/ion/23.png deleted file mode 100644 index fe75b049ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/23.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/24.png b/src/resources/assets/miscutils/textures/items/ion/24.png deleted file mode 100644 index bb256ca2bb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/24.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/25.png b/src/resources/assets/miscutils/textures/items/ion/25.png deleted file mode 100644 index 6d413674c2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/25.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/26.png b/src/resources/assets/miscutils/textures/items/ion/26.png deleted file mode 100644 index c93c306f5a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/26.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/27.png b/src/resources/assets/miscutils/textures/items/ion/27.png deleted file mode 100644 index f822d7a4bb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/27.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/28.png b/src/resources/assets/miscutils/textures/items/ion/28.png deleted file mode 100644 index 1b65383965..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/28.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/29.png b/src/resources/assets/miscutils/textures/items/ion/29.png deleted file mode 100644 index a3c412094e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/29.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/3.png b/src/resources/assets/miscutils/textures/items/ion/3.png deleted file mode 100644 index 59ad76340c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/30.png b/src/resources/assets/miscutils/textures/items/ion/30.png deleted file mode 100644 index 3ae749cc91..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/30.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/31.png b/src/resources/assets/miscutils/textures/items/ion/31.png deleted file mode 100644 index 6bb1f6c61f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/31.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/32.png b/src/resources/assets/miscutils/textures/items/ion/32.png deleted file mode 100644 index c8bc92a688..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/32.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/33.png b/src/resources/assets/miscutils/textures/items/ion/33.png deleted file mode 100644 index 5062c0c109..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/33.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/34.png b/src/resources/assets/miscutils/textures/items/ion/34.png deleted file mode 100644 index bd1e33c191..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/34.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/35.png b/src/resources/assets/miscutils/textures/items/ion/35.png deleted file mode 100644 index c2a42ac980..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/35.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/36.png b/src/resources/assets/miscutils/textures/items/ion/36.png deleted file mode 100644 index 403d45a66c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/36.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/37.png b/src/resources/assets/miscutils/textures/items/ion/37.png deleted file mode 100644 index 89f011e548..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/37.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/38.png b/src/resources/assets/miscutils/textures/items/ion/38.png deleted file mode 100644 index b00ab7f5fc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/38.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/39.png b/src/resources/assets/miscutils/textures/items/ion/39.png deleted file mode 100644 index 9fc883c731..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/39.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/4.png b/src/resources/assets/miscutils/textures/items/ion/4.png deleted file mode 100644 index 122cd9e837..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/40.png b/src/resources/assets/miscutils/textures/items/ion/40.png deleted file mode 100644 index 371171fe61..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/40.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/41.png b/src/resources/assets/miscutils/textures/items/ion/41.png deleted file mode 100644 index acc8d4df0b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/41.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/42.png b/src/resources/assets/miscutils/textures/items/ion/42.png deleted file mode 100644 index 0f8432ea59..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/42.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/43.png b/src/resources/assets/miscutils/textures/items/ion/43.png deleted file mode 100644 index 1f62a1a4f9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/43.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/44.png b/src/resources/assets/miscutils/textures/items/ion/44.png deleted file mode 100644 index f26b23050a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/44.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/45.png b/src/resources/assets/miscutils/textures/items/ion/45.png deleted file mode 100644 index e2d6413dee..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/45.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/46.png b/src/resources/assets/miscutils/textures/items/ion/46.png deleted file mode 100644 index 50920e75b5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/46.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/47.png b/src/resources/assets/miscutils/textures/items/ion/47.png deleted file mode 100644 index c31a2ad43d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/47.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/48.png b/src/resources/assets/miscutils/textures/items/ion/48.png deleted file mode 100644 index 90b6ab544e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/48.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/49.png b/src/resources/assets/miscutils/textures/items/ion/49.png deleted file mode 100644 index 1c1ed02d40..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/49.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/5.png b/src/resources/assets/miscutils/textures/items/ion/5.png deleted file mode 100644 index 0f33a3363c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/50.png b/src/resources/assets/miscutils/textures/items/ion/50.png deleted file mode 100644 index c47f4a297e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/50.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/51.png b/src/resources/assets/miscutils/textures/items/ion/51.png deleted file mode 100644 index 606a1e8ef4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/51.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/52.png b/src/resources/assets/miscutils/textures/items/ion/52.png deleted file mode 100644 index 0a535c6158..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/52.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/53.png b/src/resources/assets/miscutils/textures/items/ion/53.png deleted file mode 100644 index 1fef4e5f2f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/53.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/54.png b/src/resources/assets/miscutils/textures/items/ion/54.png deleted file mode 100644 index 663170c84d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/54.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/55.png b/src/resources/assets/miscutils/textures/items/ion/55.png deleted file mode 100644 index 4519b12d97..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/55.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/56.png b/src/resources/assets/miscutils/textures/items/ion/56.png deleted file mode 100644 index 926b37bc80..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/56.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/57.png b/src/resources/assets/miscutils/textures/items/ion/57.png deleted file mode 100644 index c80a29d94e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/57.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/58.png b/src/resources/assets/miscutils/textures/items/ion/58.png deleted file mode 100644 index e33f90d6bc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/58.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/59.png b/src/resources/assets/miscutils/textures/items/ion/59.png deleted file mode 100644 index 14b48b0c39..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/59.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/6.png b/src/resources/assets/miscutils/textures/items/ion/6.png deleted file mode 100644 index a8a9b906d2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/60.png b/src/resources/assets/miscutils/textures/items/ion/60.png deleted file mode 100644 index 4d77e6d779..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/60.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/61.png b/src/resources/assets/miscutils/textures/items/ion/61.png deleted file mode 100644 index 42e2669011..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/61.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/62.png b/src/resources/assets/miscutils/textures/items/ion/62.png deleted file mode 100644 index 5b0ce84ee4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/62.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/63.png b/src/resources/assets/miscutils/textures/items/ion/63.png deleted file mode 100644 index 372d256a0e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/63.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/64.png b/src/resources/assets/miscutils/textures/items/ion/64.png deleted file mode 100644 index 61b6521d64..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/64.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/65.png b/src/resources/assets/miscutils/textures/items/ion/65.png deleted file mode 100644 index 66129d8bab..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/65.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/66.png b/src/resources/assets/miscutils/textures/items/ion/66.png deleted file mode 100644 index 5ec0a6c747..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/66.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/67.png b/src/resources/assets/miscutils/textures/items/ion/67.png deleted file mode 100644 index 09c9dd8b12..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/67.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/68.png b/src/resources/assets/miscutils/textures/items/ion/68.png deleted file mode 100644 index d809bd3646..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/68.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/69.png b/src/resources/assets/miscutils/textures/items/ion/69.png deleted file mode 100644 index 9e0d0b0d75..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/69.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/7.png b/src/resources/assets/miscutils/textures/items/ion/7.png deleted file mode 100644 index 6d1f5c229c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/70.png b/src/resources/assets/miscutils/textures/items/ion/70.png deleted file mode 100644 index 5bf9df2778..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/70.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/71.png b/src/resources/assets/miscutils/textures/items/ion/71.png deleted file mode 100644 index f052e1c772..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/71.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/72.png b/src/resources/assets/miscutils/textures/items/ion/72.png deleted file mode 100644 index 044e445356..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/72.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/73.png b/src/resources/assets/miscutils/textures/items/ion/73.png deleted file mode 100644 index 24bf977862..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/73.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/74.png b/src/resources/assets/miscutils/textures/items/ion/74.png deleted file mode 100644 index 7768bd6f4e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/74.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/75.png b/src/resources/assets/miscutils/textures/items/ion/75.png deleted file mode 100644 index ed9961e54f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/75.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/76.png b/src/resources/assets/miscutils/textures/items/ion/76.png deleted file mode 100644 index 9010680490..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/76.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/77.png b/src/resources/assets/miscutils/textures/items/ion/77.png deleted file mode 100644 index 007497b931..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/77.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/78.png b/src/resources/assets/miscutils/textures/items/ion/78.png deleted file mode 100644 index 36c2031937..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/78.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/79.png b/src/resources/assets/miscutils/textures/items/ion/79.png deleted file mode 100644 index 144e55beae..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/79.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/8.png b/src/resources/assets/miscutils/textures/items/ion/8.png deleted file mode 100644 index 0249fbcf3b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/80.png b/src/resources/assets/miscutils/textures/items/ion/80.png deleted file mode 100644 index ec7de9fda2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/80.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/81.png b/src/resources/assets/miscutils/textures/items/ion/81.png deleted file mode 100644 index 9e19f0dbde..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/81.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/82.png b/src/resources/assets/miscutils/textures/items/ion/82.png deleted file mode 100644 index f321ff1073..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/82.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/83.png b/src/resources/assets/miscutils/textures/items/ion/83.png deleted file mode 100644 index c219309000..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/83.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/84.png b/src/resources/assets/miscutils/textures/items/ion/84.png deleted file mode 100644 index c7be4342ad..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/84.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/85.png b/src/resources/assets/miscutils/textures/items/ion/85.png deleted file mode 100644 index f0d9995742..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/85.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/86.png b/src/resources/assets/miscutils/textures/items/ion/86.png deleted file mode 100644 index df5da1cc2e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/86.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/87.png b/src/resources/assets/miscutils/textures/items/ion/87.png deleted file mode 100644 index ec37e331ff..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/87.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/88.png b/src/resources/assets/miscutils/textures/items/ion/88.png deleted file mode 100644 index 9c53cfa885..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/88.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/89.png b/src/resources/assets/miscutils/textures/items/ion/89.png deleted file mode 100644 index 1e7f46a245..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/89.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/9.png b/src/resources/assets/miscutils/textures/items/ion/9.png deleted file mode 100644 index 946246b360..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/90.png b/src/resources/assets/miscutils/textures/items/ion/90.png deleted file mode 100644 index 023364b0fb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/90.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/91.png b/src/resources/assets/miscutils/textures/items/ion/91.png deleted file mode 100644 index 44f463ff62..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/91.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/92.png b/src/resources/assets/miscutils/textures/items/ion/92.png deleted file mode 100644 index ef1d21c530..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/92.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/93.png b/src/resources/assets/miscutils/textures/items/ion/93.png deleted file mode 100644 index 175f6bf84e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/93.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/94.png b/src/resources/assets/miscutils/textures/items/ion/94.png deleted file mode 100644 index 544749b556..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/94.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/95.png b/src/resources/assets/miscutils/textures/items/ion/95.png deleted file mode 100644 index a2d38fa96e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/95.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/96.png b/src/resources/assets/miscutils/textures/items/ion/96.png deleted file mode 100644 index 12e545a65f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/96.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/97.png b/src/resources/assets/miscutils/textures/items/ion/97.png deleted file mode 100644 index ee9ed016dc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/97.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/98.png b/src/resources/assets/miscutils/textures/items/ion/98.png deleted file mode 100644 index aa8a1bf7ce..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/98.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/99.png b/src/resources/assets/miscutils/textures/items/ion/99.png deleted file mode 100644 index b5ba289886..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/99.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/ion/IonBase.png b/src/resources/assets/miscutils/textures/items/ion/IonBase.png deleted file mode 100644 index fd342f7db2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/ion/IonBase.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/item.empty.png b/src/resources/assets/miscutils/textures/items/item.empty.png deleted file mode 100644 index c054d35cce..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/item.empty.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemAirFilter.png b/src/resources/assets/miscutils/textures/items/itemAirFilter.png deleted file mode 100644 index da4b975517..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemAirFilter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemAlkalusDisk.png b/src/resources/assets/miscutils/textures/items/itemAlkalusDisk.png deleted file mode 100644 index 8553a13cfb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemAlkalusDisk.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemAmulet.png b/src/resources/assets/miscutils/textures/items/itemAmulet.png deleted file mode 100644 index 0009e340ec..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemAmulet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBackpack.png b/src/resources/assets/miscutils/textures/items/itemBackpack.png deleted file mode 100644 index 99add96c2b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBackpack.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBasicTurbine.png b/src/resources/assets/miscutils/textures/items/itemBasicTurbine.png deleted file mode 100644 index 62de905fb9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBasicTurbine.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBelt.png b/src/resources/assets/miscutils/textures/items/itemBelt.png deleted file mode 100644 index 93474d12e1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBelt.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBigEgg.png b/src/resources/assets/miscutils/textures/items/itemBigEgg.png deleted file mode 100644 index 54db66b4c5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBigEgg.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBlueprint.png b/src/resources/assets/miscutils/textures/items/itemBlueprint.png deleted file mode 100644 index 593ba0ac17..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBlueprint.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBoilerChassis.png b/src/resources/assets/miscutils/textures/items/itemBoilerChassis.png deleted file mode 100644 index 1ac3bff818..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBoilerChassis.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBolt.png b/src/resources/assets/miscutils/textures/items/itemBolt.png deleted file mode 100644 index 8675564a9b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBolt.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBook.png b/src/resources/assets/miscutils/textures/items/itemBook.png deleted file mode 100644 index f6cdf72bda..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBook.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBoots.png b/src/resources/assets/miscutils/textures/items/itemBoots.png deleted file mode 100644 index 9cd07048cd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBoots.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBottle.png b/src/resources/assets/miscutils/textures/items/itemBottle.png deleted file mode 100644 index 942a9ffb5f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBottle.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBread.png b/src/resources/assets/miscutils/textures/items/itemBread.png deleted file mode 100644 index 332b994342..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBread.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemBufferCore.png b/src/resources/assets/miscutils/textures/items/itemBufferCore.png deleted file mode 100644 index 3e41cfaa1c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemBufferCore.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemCell.png b/src/resources/assets/miscutils/textures/items/itemCell.png deleted file mode 100644 index 023291b957..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemCell.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemCellPlasma.png b/src/resources/assets/miscutils/textures/items/itemCellPlasma.png deleted file mode 100644 index 1c93293744..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemCellPlasma.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png b/src/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png deleted file mode 100644 index ce3c6377c7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemCellPlasma_Overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemCell_Overlay.png b/src/resources/assets/miscutils/textures/items/itemCell_Overlay.png deleted file mode 100644 index 35c124ab0c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemCell_Overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemCentidust.png b/src/resources/assets/miscutils/textures/items/itemCentidust.png deleted file mode 100644 index 13658b477f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemCentidust.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png b/src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png deleted file mode 100644 index 723f62e278..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png b/src/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png deleted file mode 100644 index 3fa59812e9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemDebugShapeSpawner.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemDecidust.png b/src/resources/assets/miscutils/textures/items/itemDecidust.png deleted file mode 100644 index 1d7766cca5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemDecidust.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemDefault.png b/src/resources/assets/miscutils/textures/items/itemDefault.png deleted file mode 100644 index 9ed71de6dd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemDefault.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemDehydratorCoil.png b/src/resources/assets/miscutils/textures/items/itemDehydratorCoil.png deleted file mode 100644 index c7a849556f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemDehydratorCoil.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png b/src/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png deleted file mode 100644 index 8687d1c8ca..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemDehydratorCoilWire.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemDroplet.png b/src/resources/assets/miscutils/textures/items/itemDroplet.png deleted file mode 100644 index 31f30e524a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemDroplet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png b/src/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png deleted file mode 100644 index 7c03ca0ada..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemEnergeticRotorBlade.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemEnergeticShaft.png b/src/resources/assets/miscutils/textures/items/itemEnergeticShaft.png deleted file mode 100644 index bf9ab22ce2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemEnergeticShaft.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemFiber.png b/src/resources/assets/miscutils/textures/items/itemFiber.png deleted file mode 100644 index c2eb959c6c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemFiber.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemFineWire.png b/src/resources/assets/miscutils/textures/items/itemFineWire.png deleted file mode 100644 index 1804dc358b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemFineWire.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemFireStarter.png b/src/resources/assets/miscutils/textures/items/itemFireStarter.png deleted file mode 100644 index e3027edff8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemFireStarter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png b/src/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png deleted file mode 100644 index 55a9e7c912..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemFoodCurriedSausages.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png b/src/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png deleted file mode 100644 index 12a1962cd3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemFoodRaisinToast.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemGear.png b/src/resources/assets/miscutils/textures/items/itemGear.png deleted file mode 100644 index 6d0cf3be50..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemGear.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemGem.png b/src/resources/assets/miscutils/textures/items/itemGem.png deleted file mode 100644 index ad5126851a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemGem.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHatTinFoil.png b/src/resources/assets/miscutils/textures/items/itemHatTinFoil.png deleted file mode 100644 index 91f1cad62e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHatTinFoil.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png b/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png deleted file mode 100644 index e09ff6d1df..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png b/src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png deleted file mode 100644 index c3835b07c1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHeliumBlob.png b/src/resources/assets/miscutils/textures/items/itemHeliumBlob.png deleted file mode 100644 index f86ce276cc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHeliumBlob.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHelmet.png b/src/resources/assets/miscutils/textures/items/itemHelmet.png deleted file mode 100644 index d7c34334b2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHelmet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png b/src/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png deleted file mode 100644 index 332b994342..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHotIngotRaisinBread.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemHydrogenBlob.png b/src/resources/assets/miscutils/textures/items/itemHydrogenBlob.png deleted file mode 100644 index 29296faf74..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemHydrogenBlob.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemIngot.png b/src/resources/assets/miscutils/textures/items/itemIngot.png deleted file mode 100644 index a904365fba..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemIngot.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png b/src/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png deleted file mode 100644 index edaac2807f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemIngotBatteryAlloy.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemIngotHot.png b/src/resources/assets/miscutils/textures/items/itemIngotHot.png deleted file mode 100644 index d0f73e2868..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemIngotHot.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png b/src/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png deleted file mode 100644 index 332b994342..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemIngotRaisinBread.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png b/src/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png deleted file mode 100644 index 73c2cbe026..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemIridiumRotorBlade.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemIridiumShaft.png b/src/resources/assets/miscutils/textures/items/itemIridiumShaft.png deleted file mode 100644 index 585b862d12..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemIridiumShaft.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemKey.png b/src/resources/assets/miscutils/textures/items/itemKey.png deleted file mode 100644 index 19527cc2ae..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemKey.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemKeyBig.png b/src/resources/assets/miscutils/textures/items/itemKeyBig.png deleted file mode 100644 index abfefc9aba..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemKeyBig.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemKeyGold.png b/src/resources/assets/miscutils/textures/items/itemKeyGold.png deleted file mode 100644 index 289dac1df6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemKeyGold.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png b/src/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png deleted file mode 100644 index 11e8312714..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemKeyGoldBoss.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemLavaFilter.png b/src/resources/assets/miscutils/textures/items/itemLavaFilter.png deleted file mode 100644 index 92a06a3a9a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemLavaFilter.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png b/src/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png deleted file mode 100644 index d10128babd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemMagnaliumRotorBlade.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png b/src/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png deleted file mode 100644 index b93430f732..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemMagnaliumShaft.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemMushroom.png b/src/resources/assets/miscutils/textures/items/itemMushroom.png deleted file mode 100644 index d63f079f45..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemMushroom.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemMushroomRed.png b/src/resources/assets/miscutils/textures/items/itemMushroomRed.png deleted file mode 100644 index 2bbf1bcb00..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemMushroomRed.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemNugget.png b/src/resources/assets/miscutils/textures/items/itemNugget.png deleted file mode 100644 index e4d3e0c89c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemNugget.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png b/src/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png deleted file mode 100644 index aba5bf6850..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPLACEHOLDER_Circuit.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPickaxe.png b/src/resources/assets/miscutils/textures/items/itemPickaxe.png deleted file mode 100644 index d21440bd11..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPickaxe.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPineapple.png b/src/resources/assets/miscutils/textures/items/itemPineapple.png deleted file mode 100644 index 1185738eb8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPineapple.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPlate.png b/src/resources/assets/miscutils/textures/items/itemPlate.png deleted file mode 100644 index b5a9ab5214..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPlate.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png b/src/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png deleted file mode 100644 index fb293722f6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPlateBatteryAlloy.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPlateDouble.png b/src/resources/assets/miscutils/textures/items/itemPlateDouble.png deleted file mode 100644 index edb7970730..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPlateDouble.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPlatebody.png b/src/resources/assets/miscutils/textures/items/itemPlatebody.png deleted file mode 100644 index ec472a86a0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPlatebody.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPlatelegs.png b/src/resources/assets/miscutils/textures/items/itemPlatelegs.png deleted file mode 100644 index bcaa1338e6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPlatelegs.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPotion.png b/src/resources/assets/miscutils/textures/items/itemPotion.png deleted file mode 100644 index a1ff53ef8d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPotion.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPotionBlack.png b/src/resources/assets/miscutils/textures/items/itemPotionBlack.png deleted file mode 100644 index 07a5951140..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPotionBlack.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemPotionRed.png b/src/resources/assets/miscutils/textures/items/itemPotionRed.png deleted file mode 100644 index b6b611bbbb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemPotionRed.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemRing.png b/src/resources/assets/miscutils/textures/items/itemRing.png deleted file mode 100644 index eb9dfd5e21..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemRing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemRingWearable.png b/src/resources/assets/miscutils/textures/items/itemRingWearable.png deleted file mode 100644 index 4601dbbe13..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemRingWearable.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemRod.png b/src/resources/assets/miscutils/textures/items/itemRod.png deleted file mode 100644 index 18c9ee59c1..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemRod.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemRodLong.png b/src/resources/assets/miscutils/textures/items/itemRodLong.png deleted file mode 100644 index 1580b911f0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemRodLong.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemRope.png b/src/resources/assets/miscutils/textures/items/itemRope.png deleted file mode 100644 index 061938234d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemRope.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemRotor.png b/src/resources/assets/miscutils/textures/items/itemRotor.png deleted file mode 100644 index c593cee35b..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemRotor.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemSandstoneHammer.png b/src/resources/assets/miscutils/textures/items/itemSandstoneHammer.png deleted file mode 100644 index ae8fc32267..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemSandstoneHammer.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemScrew.png b/src/resources/assets/miscutils/textures/items/itemScrew.png deleted file mode 100644 index faca2c6e3d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemScrew.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemShard.png b/src/resources/assets/miscutils/textures/items/itemShard.png deleted file mode 100644 index 104a59d2b3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemShard.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemShovel.png b/src/resources/assets/miscutils/textures/items/itemShovel.png deleted file mode 100644 index 8e1c0c2826..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemShovel.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png b/src/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png deleted file mode 100644 index f711563765..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemSlowBuildersRing.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemSmallSpring.png b/src/resources/assets/miscutils/textures/items/itemSmallSpring.png deleted file mode 100644 index 54b3afb24e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemSmallSpring.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemSpring.png b/src/resources/assets/miscutils/textures/items/itemSpring.png deleted file mode 100644 index df442ed454..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemSpring.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemStaballoyAxe.png b/src/resources/assets/miscutils/textures/items/itemStaballoyAxe.png deleted file mode 100644 index d7f8ed262f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemStaballoyAxe.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png b/src/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png deleted file mode 100644 index 024f4f384c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemStaballoyPickaxe.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemStickyRubber.png b/src/resources/assets/miscutils/textures/items/itemStickyRubber.png deleted file mode 100644 index c95353c892..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemStickyRubber.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png b/src/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png deleted file mode 100644 index 5e7201a558..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemSulfuricAcidPotion.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemSword.png b/src/resources/assets/miscutils/textures/items/itemSword.png deleted file mode 100644 index 56ac390aa8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemSword.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemTablet.png b/src/resources/assets/miscutils/textures/items/itemTablet.png deleted file mode 100644 index 8e10b0529a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemTablet.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png b/src/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png deleted file mode 100644 index cd376cb5cb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemTungstenSteelRotorBlade.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png b/src/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png deleted file mode 100644 index f08ba26585..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemTungstenSteelShaft.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png b/src/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png deleted file mode 100644 index 89f7b9474a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemUltimetRotorBlade.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemUltimetShaft.png b/src/resources/assets/miscutils/textures/items/itemUltimetShaft.png deleted file mode 100644 index df6c9b9c49..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemUltimetShaft.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png b/src/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png deleted file mode 100644 index 5dea2ec1e5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemVibrantRotorBlade.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemVibrantShaft.png b/src/resources/assets/miscutils/textures/items/itemVibrantShaft.png deleted file mode 100644 index 3a1fe64176..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemVibrantShaft.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/itemWaterBottle.png b/src/resources/assets/miscutils/textures/items/itemWaterBottle.png deleted file mode 100644 index 942a9ffb5f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/itemWaterBottle.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/material/DustBlizz.png b/src/resources/assets/miscutils/textures/items/material/DustBlizz.png deleted file mode 100644 index e253eea6de..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/material/DustBlizz.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta b/src/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta deleted file mode 100644 index c5d457f93d..0000000000 --- a/src/resources/assets/miscutils/textures/items/material/DustBlizz.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/material/DustCryotheum.png b/src/resources/assets/miscutils/textures/items/material/DustCryotheum.png deleted file mode 100644 index 960b304439..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/material/DustCryotheum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta b/src/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta deleted file mode 100644 index c5d457f93d..0000000000 --- a/src/resources/assets/miscutils/textures/items/material/DustCryotheum.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png b/src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png deleted file mode 100644 index eaf605e762..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta b/src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta deleted file mode 100644 index c5d457f93d..0000000000 --- a/src/resources/assets/miscutils/textures/items/material/DustPyrotheum.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 1 - } -} \ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/material/RodBlizz.png b/src/resources/assets/miscutils/textures/items/material/RodBlizz.png deleted file mode 100644 index d813e6b746..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/material/RodBlizz.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/0.PNG b/src/resources/assets/miscutils/textures/items/particle/0.PNG deleted file mode 100644 index a0a32d4508..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/0.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/1.png b/src/resources/assets/miscutils/textures/items/particle/1.png deleted file mode 100644 index 4eddfa1727..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/10.PNG b/src/resources/assets/miscutils/textures/items/particle/10.PNG deleted file mode 100644 index 09eee049a9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/10.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/11.PNG b/src/resources/assets/miscutils/textures/items/particle/11.PNG deleted file mode 100644 index 7f636919b6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/11.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/12.PNG b/src/resources/assets/miscutils/textures/items/particle/12.PNG deleted file mode 100644 index 4e9504b03f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/12.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/13.PNG b/src/resources/assets/miscutils/textures/items/particle/13.PNG deleted file mode 100644 index d929480c16..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/13.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/14.PNG b/src/resources/assets/miscutils/textures/items/particle/14.PNG deleted file mode 100644 index 7338066c1a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/14.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/15.PNG b/src/resources/assets/miscutils/textures/items/particle/15.PNG deleted file mode 100644 index 189a3127d9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/15.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/16.PNG b/src/resources/assets/miscutils/textures/items/particle/16.PNG deleted file mode 100644 index 8824201ff3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/16.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/17.PNG b/src/resources/assets/miscutils/textures/items/particle/17.PNG deleted file mode 100644 index edea5115c0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/17.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/18.PNG b/src/resources/assets/miscutils/textures/items/particle/18.PNG deleted file mode 100644 index d3e63562d7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/18.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/19.PNG b/src/resources/assets/miscutils/textures/items/particle/19.PNG deleted file mode 100644 index 43f9278b2c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/19.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/2.png b/src/resources/assets/miscutils/textures/items/particle/2.png deleted file mode 100644 index 292207ae7e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/20.PNG b/src/resources/assets/miscutils/textures/items/particle/20.PNG deleted file mode 100644 index 0e2ce23565..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/20.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/21.PNG b/src/resources/assets/miscutils/textures/items/particle/21.PNG deleted file mode 100644 index 758fa46941..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/21.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/22.PNG b/src/resources/assets/miscutils/textures/items/particle/22.PNG deleted file mode 100644 index 08bda97b66..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/22.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/23.PNG b/src/resources/assets/miscutils/textures/items/particle/23.PNG deleted file mode 100644 index 9ba21b22eb..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/23.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/24.PNG b/src/resources/assets/miscutils/textures/items/particle/24.PNG deleted file mode 100644 index bc6aec8854..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/24.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/3.png b/src/resources/assets/miscutils/textures/items/particle/3.png deleted file mode 100644 index d085b86507..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/4.png b/src/resources/assets/miscutils/textures/items/particle/4.png deleted file mode 100644 index faf8db0576..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/5.png b/src/resources/assets/miscutils/textures/items/particle/5.png deleted file mode 100644 index 3a30274238..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/6.png b/src/resources/assets/miscutils/textures/items/particle/6.png deleted file mode 100644 index 8930ce52ef..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/7.PNG b/src/resources/assets/miscutils/textures/items/particle/7.PNG deleted file mode 100644 index 0581d47446..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/7.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/8.PNG b/src/resources/assets/miscutils/textures/items/particle/8.PNG deleted file mode 100644 index 6bd3c2c682..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/8.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/9.PNG b/src/resources/assets/miscutils/textures/items/particle/9.PNG deleted file mode 100644 index 430f1aed3d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/9.PNG and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/0.png b/src/resources/assets/miscutils/textures/items/particle/new/0.png deleted file mode 100644 index 3fe49c3a57..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/1.png b/src/resources/assets/miscutils/textures/items/particle/new/1.png deleted file mode 100644 index 39ffa85711..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/10.png b/src/resources/assets/miscutils/textures/items/particle/new/10.png deleted file mode 100644 index 18ded814cf..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/11.png b/src/resources/assets/miscutils/textures/items/particle/new/11.png deleted file mode 100644 index b7e191c79f..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/12.png b/src/resources/assets/miscutils/textures/items/particle/new/12.png deleted file mode 100644 index 49feb199e0..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/13.png b/src/resources/assets/miscutils/textures/items/particle/new/13.png deleted file mode 100644 index b70178d315..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/13.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/14.png b/src/resources/assets/miscutils/textures/items/particle/new/14.png deleted file mode 100644 index 77741644ed..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/14.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/15.png b/src/resources/assets/miscutils/textures/items/particle/new/15.png deleted file mode 100644 index d48096c85c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/15.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/16.png b/src/resources/assets/miscutils/textures/items/particle/new/16.png deleted file mode 100644 index cef33d17fd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/16.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/17.png b/src/resources/assets/miscutils/textures/items/particle/new/17.png deleted file mode 100644 index 4b752e7a9a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/17.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/18.png b/src/resources/assets/miscutils/textures/items/particle/new/18.png deleted file mode 100644 index 23fdb190c7..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/18.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/19.png b/src/resources/assets/miscutils/textures/items/particle/new/19.png deleted file mode 100644 index 94e2a856c9..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/19.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/2.png b/src/resources/assets/miscutils/textures/items/particle/new/2.png deleted file mode 100644 index d86b5b357d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/20.png b/src/resources/assets/miscutils/textures/items/particle/new/20.png deleted file mode 100644 index d7cbdb8f45..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/20.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/21.png b/src/resources/assets/miscutils/textures/items/particle/new/21.png deleted file mode 100644 index 2531eaff52..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/21.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/22.png b/src/resources/assets/miscutils/textures/items/particle/new/22.png deleted file mode 100644 index d594dc4be8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/22.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/23.png b/src/resources/assets/miscutils/textures/items/particle/new/23.png deleted file mode 100644 index d96dd2b000..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/23.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/24.png b/src/resources/assets/miscutils/textures/items/particle/new/24.png deleted file mode 100644 index 56067466ad..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/24.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/3.png b/src/resources/assets/miscutils/textures/items/particle/new/3.png deleted file mode 100644 index 43438c4ce5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/4.png b/src/resources/assets/miscutils/textures/items/particle/new/4.png deleted file mode 100644 index 8f0db073cd..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/5.png b/src/resources/assets/miscutils/textures/items/particle/new/5.png deleted file mode 100644 index 40ec84db70..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/6.png b/src/resources/assets/miscutils/textures/items/particle/new/6.png deleted file mode 100644 index c63ad0ba19..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/7.png b/src/resources/assets/miscutils/textures/items/particle/new/7.png deleted file mode 100644 index aad8c7ca62..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/8.png b/src/resources/assets/miscutils/textures/items/particle/new/8.png deleted file mode 100644 index c9b908ec61..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/particle/new/9.png b/src/resources/assets/miscutils/textures/items/particle/new/9.png deleted file mode 100644 index b8e02c82ea..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/particle/new/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/personalCloakingDevice.png b/src/resources/assets/miscutils/textures/items/personalCloakingDevice.png deleted file mode 100644 index 2d196cb9ed..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/personalCloakingDevice.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png b/src/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png deleted file mode 100644 index 2c56204a7e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/processing/MilledOre/milled.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png b/src/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png deleted file mode 100644 index cfec0f5d8e..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/processing/MilledOre/milled_OVERLAY.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/research/note.png b/src/resources/assets/miscutils/textures/items/research/note.png deleted file mode 100644 index 795eaeb193..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/research/note.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/Atom.png b/src/resources/assets/miscutils/textures/items/science/Atom.png deleted file mode 100644 index eec0344eda..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/Atom.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png b/src/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png deleted file mode 100644 index 8bcfa62ae4..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/AdvancedCircuit.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png deleted file mode 100644 index f4ba0a2f0a..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png deleted file mode 100644 index db59db96e3..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png deleted file mode 100644 index b50c781c6d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/10.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png deleted file mode 100644 index 0656c10957..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/11.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png deleted file mode 100644 index 3a32ed06fc..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/12.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png deleted file mode 100644 index 4649393bb2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png deleted file mode 100644 index 5b47d172be..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png deleted file mode 100644 index 995b19953c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png deleted file mode 100644 index 3ec2502da2..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png deleted file mode 100644 index aa65838418..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png deleted file mode 100644 index 985954250c..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/7.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png deleted file mode 100644 index 9b857a9277..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/8.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png b/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png deleted file mode 100644 index 0c165f3e59..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/general/MetaItem1/9.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png deleted file mode 100644 index 7adcc6adcf..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png deleted file mode 100644 index 2064052fa5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png deleted file mode 100644 index a974943866..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png deleted file mode 100644 index 97a796c871..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png deleted file mode 100644 index b50c781c6d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png deleted file mode 100644 index b50c781c6d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/5.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png b/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png deleted file mode 100644 index b50c781c6d..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/science/nuclear/MetaItem1/6.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/spawn_egg.png b/src/resources/assets/miscutils/textures/items/spawn_egg.png deleted file mode 100644 index 23259c71f5..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/spawn_egg.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/spawn_egg_overlay.png b/src/resources/assets/miscutils/textures/items/spawn_egg_overlay.png deleted file mode 100644 index 83ec78f172..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/spawn_egg_overlay.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/token/0.png b/src/resources/assets/miscutils/textures/items/token/0.png deleted file mode 100644 index 7947f30bb6..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/token/0.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/token/1.png b/src/resources/assets/miscutils/textures/items/token/1.png deleted file mode 100644 index 850acc3e71..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/token/1.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/token/2.png b/src/resources/assets/miscutils/textures/items/token/2.png deleted file mode 100644 index fa619dd1ed..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/token/2.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/token/3.png b/src/resources/assets/miscutils/textures/items/token/3.png deleted file mode 100644 index 3ba45ed7af..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/token/3.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/items/token/4.png b/src/resources/assets/miscutils/textures/items/token/4.png deleted file mode 100644 index 81af6a91c8..0000000000 Binary files a/src/resources/assets/miscutils/textures/items/token/4.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/models/TinFoil.png b/src/resources/assets/miscutils/textures/models/TinFoil.png deleted file mode 100644 index 6c8e967db5..0000000000 Binary files a/src/resources/assets/miscutils/textures/models/TinFoil.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/space/RocketGui.png b/src/resources/assets/miscutils/textures/space/RocketGui.png deleted file mode 100644 index 2aa4a893ed..0000000000 Binary files a/src/resources/assets/miscutils/textures/space/RocketGui.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/space/hd10180/A.png b/src/resources/assets/miscutils/textures/space/hd10180/A.png deleted file mode 100644 index b3499184b5..0000000000 Binary files a/src/resources/assets/miscutils/textures/space/hd10180/A.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/space/hd10180/B.png b/src/resources/assets/miscutils/textures/space/hd10180/B.png deleted file mode 100644 index 659aacbba7..0000000000 Binary files a/src/resources/assets/miscutils/textures/space/hd10180/B.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/space/hd10180/C.png b/src/resources/assets/miscutils/textures/space/hd10180/C.png deleted file mode 100644 index 659aacbba7..0000000000 Binary files a/src/resources/assets/miscutils/textures/space/hd10180/C.png and /dev/null differ diff --git a/src/resources/assets/miscutils/textures/space/hd10180/D.png b/src/resources/assets/miscutils/textures/space/hd10180/D.png deleted file mode 100644 index 61e5d6b520..0000000000 Binary files a/src/resources/assets/miscutils/textures/space/hd10180/D.png and /dev/null differ diff --git a/src/resources/assets/spiceoflife/lang/de_DE.lang b/src/resources/assets/spiceoflife/lang/de_DE.lang deleted file mode 100644 index 63ad1e2a98..0000000000 --- a/src/resources/assets/spiceoflife/lang/de_DE.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=Voedselkrat \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/en_US.lang b/src/resources/assets/spiceoflife/lang/en_US.lang deleted file mode 100644 index bf16f4dc93..0000000000 --- a/src/resources/assets/spiceoflife/lang/en_US.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=Food Crate \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/es_ES.lang b/src/resources/assets/spiceoflife/lang/es_ES.lang deleted file mode 100644 index 02fe4c8806..0000000000 --- a/src/resources/assets/spiceoflife/lang/es_ES.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=Caja de comida \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/fr_FR.lang b/src/resources/assets/spiceoflife/lang/fr_FR.lang deleted file mode 100644 index 418c2b7053..0000000000 --- a/src/resources/assets/spiceoflife/lang/fr_FR.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=Caisse alimentaire \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/it_IT.lang b/src/resources/assets/spiceoflife/lang/it_IT.lang deleted file mode 100644 index 841b97c63f..0000000000 --- a/src/resources/assets/spiceoflife/lang/it_IT.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=Cassa Alimentare \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/ko_KR.lang b/src/resources/assets/spiceoflife/lang/ko_KR.lang deleted file mode 100644 index 7e9973e936..0000000000 --- a/src/resources/assets/spiceoflife/lang/ko_KR.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=ìŒì‹ ìƒìž \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/ru_RU.lang b/src/resources/assets/spiceoflife/lang/ru_RU.lang deleted file mode 100644 index e167a0ae03..0000000000 --- a/src/resources/assets/spiceoflife/lang/ru_RU.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=ПродовольÑтвенный Ñщик \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/lang/zh_CN.lang b/src/resources/assets/spiceoflife/lang/zh_CN.lang deleted file mode 100644 index bb211e7b57..0000000000 --- a/src/resources/assets/spiceoflife/lang/zh_CN.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Items -item.spiceoflife.foodcrate.name=食å“ç®± \ No newline at end of file diff --git a/src/resources/assets/spiceoflife/textures/items/foodcrate.png b/src/resources/assets/spiceoflife/textures/items/foodcrate.png deleted file mode 100644 index b717dd0318..0000000000 Binary files a/src/resources/assets/spiceoflife/textures/items/foodcrate.png and /dev/null differ diff --git a/src/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png b/src/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png deleted file mode 100644 index 4dbfd54ea7..0000000000 Binary files a/src/resources/assets/spiceoflife/textures/items/foodcrate_open_empty.png and /dev/null differ diff --git a/src/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png b/src/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png deleted file mode 100644 index 0284bd29ad..0000000000 Binary files a/src/resources/assets/spiceoflife/textures/items/foodcrate_open_full.png and /dev/null differ diff --git a/src/resources/assets/stevescarts/lang/en_US.lang b/src/resources/assets/stevescarts/lang/en_US.lang deleted file mode 100644 index 56dc8390a6..0000000000 --- a/src/resources/assets/stevescarts/lang/en_US.lang +++ /dev/null @@ -1 +0,0 @@ -item.SC2:crop_exotic_seeds.name=Exotic Seed Module [GT++] \ No newline at end of file diff --git a/src/resources/assets/stevescarts/lang/zh_CN.lang b/src/resources/assets/stevescarts/lang/zh_CN.lang deleted file mode 100644 index 84ce64f528..0000000000 --- a/src/resources/assets/stevescarts/lang/zh_CN.lang +++ /dev/null @@ -1,2 +0,0 @@ -item.SC2:crop_exotic_seeds.name=异域ç§å­æ¨¡å—[GT++] -//This zh_CN.lang is translated by huajijam for GregTech++ (18/1/19) \ No newline at end of file diff --git a/src/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png b/src/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png deleted file mode 100644 index 63e0593119..0000000000 Binary files a/src/resources/assets/stevescarts/textures/items/crop_exotic_seeds_icon.png and /dev/null differ diff --git a/src/resources/mcmod.info b/src/resources/mcmod.info deleted file mode 100644 index 626949452a..0000000000 --- a/src/resources/mcmod.info +++ /dev/null @@ -1,18 +0,0 @@ -[ -{ - "modid": "miscutils", - "name": "GT++", - "description": "Adds over 100 new Multiblocks, Machines, etc to Gregtech.", - "credits": "", - "logoFile": "", - "version": "1.7.03.01", - "mcversion": "1.7.10", - "url": "https://github.com/draknyte1/GTplusplus/wiki", - "updateUrl": "https://github.com/draknyte1/GTplusplus/releases/latest", - "authorList": [ "Alkalus/Draknyte1" ], - "screenshots": [ "" ], - "dependencies": [ - "mod_MinecraftForge" - ] -} -] -- cgit From 20b5d2932ef44e1c96104d6ec0528012f5c83d21 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 12 Dec 2021 19:42:07 +0100 Subject: Migrated to unified build script --- .circleci/config.yml | 65 --- .gitattributes | 17 - .github/scripts/test-no-crash-reports.sh | 9 + .github/workflows/build-and-test.yml | 45 ++ .github/workflows/release-tags.yml | 45 ++ .gitignore | 169 +----- .gradle/2.0/taskArtifacts/cache.properties | 1 - .gradle/2.0/taskArtifacts/cache.properties.lock | Bin 17 -> 0 bytes .gradle/2.0/taskArtifacts/fileHashes.bin | Bin 521607 -> 0 bytes .gradle/2.0/taskArtifacts/fileSnapshots.bin | Bin 4430057 -> 0 bytes .gradle/2.0/taskArtifacts/outputFileStates.bin | Bin 18872 -> 0 bytes .gradle/2.0/taskArtifacts/taskArtifacts.bin | Bin 29153 -> 0 bytes .project | 23 - Recommended.txt | 1 - SupporterList.txt | 2 - _config.yml | 1 - addon.gradle | 3 + bitbucket-pipelines.yml.disabled | 19 - build.gradle | 661 ++++++++++++++++++------ build.properties | 8 - changelog.mustache | 29 -- changelogcurse.mustache | 20 - changeloggeneral.mustache | 17 - dependencies.gradle | 51 ++ gradle.properties | 64 +++ gradle/wrapper/gradle-wrapper.jar | Bin 53324 -> 55616 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 98 ++-- gradlew.bat | 30 +- jitpack.yml | 2 + repositories.gradle | 26 + src/main/java/gtPlusPlus/core/lib/CORE.java | 2 +- version.properties | 1 - 33 files changed, 844 insertions(+), 568 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .gitattributes create mode 100644 .github/scripts/test-no-crash-reports.sh create mode 100644 .github/workflows/build-and-test.yml create mode 100644 .github/workflows/release-tags.yml delete mode 100644 .gradle/2.0/taskArtifacts/cache.properties delete mode 100644 .gradle/2.0/taskArtifacts/cache.properties.lock delete mode 100644 .gradle/2.0/taskArtifacts/fileHashes.bin delete mode 100644 .gradle/2.0/taskArtifacts/fileSnapshots.bin delete mode 100644 .gradle/2.0/taskArtifacts/outputFileStates.bin delete mode 100644 .gradle/2.0/taskArtifacts/taskArtifacts.bin delete mode 100644 .project delete mode 100644 Recommended.txt delete mode 100644 SupporterList.txt delete mode 100644 _config.yml create mode 100644 addon.gradle delete mode 100644 bitbucket-pipelines.yml.disabled delete mode 100644 build.properties delete mode 100644 changelog.mustache delete mode 100644 changelogcurse.mustache delete mode 100644 changeloggeneral.mustache create mode 100644 dependencies.gradle create mode 100644 gradle.properties create mode 100644 jitpack.yml create mode 100644 repositories.gradle delete mode 100644 version.properties (limited to 'src') diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a70e1368c2..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,65 +0,0 @@ -version: 2 -jobs: - build: - working_directory: ~/repo - - docker: - - image: circleci/openjdk:8-jdk - - - environment: - JVM_OPTS: -Xms2048m Xmx4000m - - - steps: - - add_ssh_keys: - fingerprints: - - "17:37:c7:07:d3:2b:a9:b8:b8:8f:e8:d5:23:fd:9a:4c" - - - checkout - - - run: - name: Set Terminal - command: export TERM=${TERM:-dumb} - # && ./gradlew clean build - - - run: sudo chmod +x gradlew - - # Build Forge and MCP - - run: - name: Download Resource Builder [MCP/Forge] - command: wget https://alkcorp.overminddl1.com/GTPP_BuildRepo.sh - - - restore_cache: - key: jars-{{ checksum "GTPP_BuildRepo.sh" }}-{{ checksum "GTPP_BuildRepo.sh" }} - - - run: - name: Run Resource Builder [MCP/Forge] - command: sh GTPP_BuildRepo.sh - - # Cache All Libs - - save_cache: - paths: - - ~/.gradle - - ~/home/circleci/repo - key: jars-{{ checksum "GTPP_BuildRepo.sh" }}-{{ checksum "GTPP_BuildRepo.sh" }} - - # Build Mod - - run: - name: Download Build Script - command: wget https://alkcorp.overminddl1.com/Build_1_Master.sh - - - run: - name: Run Master Script - command: sh Build_1_Master.sh ${CIRCLE_BUILD_NUM} "${CIRCLE_BRANCH}" "${CIRCLE_USERNAME}" "${CIRCLE_SHA1}" "${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_PROJECT_USERNAME}" "https://bitbucket.org/draknyte1/gtpp-development/get/cb20041176eb.zip" - - - run: - name: Run Build Script - command: sh RunScript.sh "17:37:c7:07:d3:2b:a9:b8:b8:8f:e8:d5:23:fd:9a:4c" - - - store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ - path: build/libs - #destination: builds - #- store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ - #path: build/libs - # See https://circleci.com/docs/2.0/deployment-integrations/ for deploy examples diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cabc87..0000000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.github/scripts/test-no-crash-reports.sh b/.github/scripts/test-no-crash-reports.sh new file mode 100644 index 0000000000..c67e342c06 --- /dev/null +++ b/.github/scripts/test-no-crash-reports.sh @@ -0,0 +1,9 @@ +directory="run/crash-reports" +if [ -d $directory ]; then + echo "Crash reports detected:" + cat $directory/* + exit 1 +else + echo "No crash reports detected" + exit 0 +fi diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000000..a60a2b6468 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,45 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Build and test + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Run server for 1 minute + run: | + mkdir run + echo "eula=true" > run/eula.txt + timeout 60 ./gradlew runServer || true + + - name: Test no crashes happend + run: | + chmod +x .github/scripts/test-no-crash-reports.sh + .github/scripts/test-no-crash-reports.sh diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml new file mode 100644 index 0000000000..25c354b227 --- /dev/null +++ b/.github/workflows/release-tags.yml @@ -0,0 +1,45 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Release tagged build + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set release version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Release under current tag + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "${{ env.RELEASE_VERSION }}" + prerelease: false + title: "${{ env.RELEASE_VERSION }}" + files: build/libs/*.jar diff --git a/.gitignore b/.gitignore index 172ff53c26..558ad12d27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,149 +1,28 @@ -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.log -*.log.gz -*.msi -*.msm -*.msp -*.json -*.txt -*.zip - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# Created by https://www.gitignore.io/api/eclipse - -### Eclipse ### - -.metadata -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath - -# Eclipse Core -.project - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# PyDev specific (Python IDE for Eclipse) -*.pydevproject - -# CDT-specific (C/C++ Development Tooling) -.cproject - -# JDT-specific (Eclipse Java Development Tools) +.gradle +.settings +/.idea/ +/run/ +/build/ +/eclipse/ .classpath - -# Java annotation processor (APT) -.factorypath - -# PDT-specific (PHP Development Tools) -.buildpath - -# sbteclipse plugin -.target - -# TeXlipse plugin -.texlipse - -# STS (Spring Tool Suite) -.springBeans - -# IDEA -.idea/ +.project +/bin/ +/config/ +/crash-reports/ +/logs/ +options.txt +/saves/ +usernamecache.json +banned-ips.json +banned-players.json +eula.txt +ops.json +server.properties +servers.dat +usercache.json +whitelist.json +/out/ *.iml *.ipr *.iws - -# Other -backups -bin -blueprints -build -config -crash-reports -gradle -local -logs -modpack -mods -resourcepacks -saves -screenshots -scripts -.circleci -.gradle -.okhttpcache -/src/Java/gtPlusPlus/preloader/asm/visitors/ob/sprinkler/Visitor_Field_Sprinkler.java -/src/Java/gtPlusPlus/preloader/asm/visitors/ob/sprinkler/Visitor_Method_Sprinkler_GetInventory.java -/src/Java/gtPlusPlus/preloader/asm/visitors/ob/sprinkler/Visitor_Method_Sprinkler_UpdateEntity.java -/src/Java/gtPlusPlus/xmod/galacticraft/asm/EntityAutoRocket_ASM.java -/src/Java/gtPlusPlus/xmod/galacticraft/asm/FluidUtil_ASM.java -/src/Java/gtPlusPlus/xmod/galacticraft/asm/TileEntityFuelLoader_ASM.java -/src/Java/gtPlusPlus/xmod/ob/TileEntitySprinkler_ASM.java -/src/Java/gtPlusPlus/xmod/thermalfoundation/asm/OreDictionaryArbiter_ASM.java -/GeneratedIcons -/unused libs -/world -/server.properties -/servers.dat -/GregTech.cfg -/GregTech.lang -/GTPP.dat -/PlayerCache.dat -wip -*.bat -GT++.ipr -GT++.iws - - -out +src/main/resources/mixins.*.json diff --git a/.gradle/2.0/taskArtifacts/cache.properties b/.gradle/2.0/taskArtifacts/cache.properties deleted file mode 100644 index 8882797c67..0000000000 --- a/.gradle/2.0/taskArtifacts/cache.properties +++ /dev/null @@ -1 +0,0 @@ -#Sun Apr 01 01:00:20 AEST 2018 diff --git a/.gradle/2.0/taskArtifacts/cache.properties.lock b/.gradle/2.0/taskArtifacts/cache.properties.lock deleted file mode 100644 index f33ec6d27f..0000000000 Binary files a/.gradle/2.0/taskArtifacts/cache.properties.lock and /dev/null differ diff --git a/.gradle/2.0/taskArtifacts/fileHashes.bin b/.gradle/2.0/taskArtifacts/fileHashes.bin deleted file mode 100644 index 6e8e8c8a9a..0000000000 Binary files a/.gradle/2.0/taskArtifacts/fileHashes.bin and /dev/null differ diff --git a/.gradle/2.0/taskArtifacts/fileSnapshots.bin b/.gradle/2.0/taskArtifacts/fileSnapshots.bin deleted file mode 100644 index c7cf0e52eb..0000000000 Binary files a/.gradle/2.0/taskArtifacts/fileSnapshots.bin and /dev/null differ diff --git a/.gradle/2.0/taskArtifacts/outputFileStates.bin b/.gradle/2.0/taskArtifacts/outputFileStates.bin deleted file mode 100644 index ef2b32791e..0000000000 Binary files a/.gradle/2.0/taskArtifacts/outputFileStates.bin and /dev/null differ diff --git a/.gradle/2.0/taskArtifacts/taskArtifacts.bin b/.gradle/2.0/taskArtifacts/taskArtifacts.bin deleted file mode 100644 index c2a3ca022f..0000000000 Binary files a/.gradle/2.0/taskArtifacts/taskArtifacts.bin and /dev/null differ diff --git a/.project b/.project deleted file mode 100644 index d5d349ad52..0000000000 --- a/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - GTplusplus - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/Recommended.txt b/Recommended.txt deleted file mode 100644 index af09ff06ff..0000000000 --- a/Recommended.txt +++ /dev/null @@ -1 +0,0 @@ -1.7.02.09 \ No newline at end of file diff --git a/SupporterList.txt b/SupporterList.txt deleted file mode 100644 index 39f89922c2..0000000000 --- a/SupporterList.txt +++ /dev/null @@ -1,2 +0,0 @@ -Draknyte1 -Fobius \ No newline at end of file diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c4192631f2..0000000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file diff --git a/addon.gradle b/addon.gradle new file mode 100644 index 0000000000..cc0f5d57e5 --- /dev/null +++ b/addon.gradle @@ -0,0 +1,3 @@ +compileJava { + options.encoding = "UTF-8" +} diff --git a/bitbucket-pipelines.yml.disabled b/bitbucket-pipelines.yml.disabled deleted file mode 100644 index 0009fd8ee4..0000000000 --- a/bitbucket-pipelines.yml.disabled +++ /dev/null @@ -1,19 +0,0 @@ -# This is a sample build configuration for Java (Gradle). -# Check our guides at https://confluence.atlassian.com/x/zd-5Mw for more examples. -# Only use spaces to indent your .yml configuration. -# ----- -# You can specify a custom docker image from Docker Hub as your build environment. -image: openjdk:8 - -pipelines: - default: - - step: - caches: - - gradle - script: # Modify the commands below to build your repository. - # You must commit the Gradle wrapper to your repository - # https://docs.gradle.org/current/userguide/gradle_wrapper.html - - bash ./gradlew build - artifacts: # defining the artifacts to be kept. - - build/libs/*.jar - - build/libs/proguard.map \ No newline at end of file diff --git a/build.gradle b/build.gradle index 54a5f62eeb..18fedd355e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,206 +1,529 @@ +//version: 928ecf7feb33a1149538b0e2cd17e3bc5f281428 +/* +DO NOT CHANGE THIS FILE! + +Also, you may replace this file at any time if there is an update available. +Please check https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle for updates. + */ + + +import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + +import java.util.concurrent.TimeUnit + buildscript { - repositories { - mavenLocal() - mavenCentral() - jcenter() - maven { - name = "forge" - url = "https://maven.minecraftforge.net" - } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" - } - maven { - name = "jitpack" - url = "https://jitpack.io" - } - } - dependencies { - classpath "com.github.GTNewHorizons:ForgeGradle:1.2.4" - } -} - -// Because Forge is too stupid to fix Deprecation Issues, and we cannot fix it on our end! (until we fork Forge) -allprojects { - tasks.withType(Javadoc) { - //options.compilerArgs << "-Xlint:deprecation" - options.addStringOption('Xdoclint:none', '-quiet') - } -} - -apply plugin: 'eclipse' -eclipse { - classpath { - downloadJavadoc = true - downloadSources = true - } -} - -apply plugin: 'idea' -idea{ - module { - downloadJavadoc = true - downloadSources = true - } + repositories { + maven { + name = "forge" + url = "https://maven.minecraftforge.net" + } + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + maven { + name = "Scala CI dependencies" + url = "https://repo1.maven.org/maven2/" + } + maven { + name = "jitpack" + url = "https://jitpack.io" + } + } + dependencies { + classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.4' + } +} + +plugins { + id 'idea' + id 'scala' + id("org.ajoberstar.grgit") version("3.1.1") + id("com.github.johnrengelman.shadow") version("4.0.4") + id("com.palantir.git-version") version("0.12.3") } apply plugin: 'forge' -file "build.properties" withReader { - def prop = new Properties() - prop.load(it) - ext.config = new ConfigSlurper().parse prop +def projectJavaVersion = JavaLanguageVersion.of(8) + +java { + toolchain { + languageVersion.set(projectJavaVersion) + } +} + +idea { + module { + inheritOutputDirs = true + downloadJavadoc = true + downloadSources = true + } } -file "version.properties" withReader { - def prop = new Properties() - prop.load(it) - ext.config2 = new ConfigSlurper().parse prop +if(JavaVersion.current() != JavaVersion.VERSION_1_8) { + throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current()) } -//apply plugin: 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' +checkPropertyExists("modName") +checkPropertyExists("modId") +checkPropertyExists("modGroup") +checkPropertyExists("autoUpdateBuildScript") +checkPropertyExists("minecraftVersion") +checkPropertyExists("forgeVersion") +checkPropertyExists("replaceGradleTokenInFile") +checkPropertyExists("gradleTokenModId") +checkPropertyExists("gradleTokenModName") +checkPropertyExists("gradleTokenVersion") +checkPropertyExists("gradleTokenGroupName") +checkPropertyExists("apiPackage") +checkPropertyExists("accessTransformersFile") +checkPropertyExists("usesMixins") +checkPropertyExists("mixinPlugin") +checkPropertyExists("mixinsPackage") +checkPropertyExists("coreModClass") +checkPropertyExists("containsMixinsAndOrCoreModOnly") +checkPropertyExists("usesShadowedDependencies") +checkPropertyExists("developmentEnvironmentUserName") + -version = "${config.gtpp.version}.${config2.mod.version}" -group= "gtPlusPlus" -archivesBaseName = "GT-PlusPlus" +String javaSourceDir = "src/main/java/" +String scalaSourceDir = "src/main/scala/" +String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") +String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") +if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala) +} + +if(apiPackage) { + targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala) + } +} -//Java Version -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +if(accessTransformersFile) { + String targetFile = "src/main/resources/META-INF/" + accessTransformersFile + if(getFile(targetFile).exists() == false) { + throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + } +} + +if(usesMixins.toBoolean()) { + if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) { + throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!") + } + + targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") + targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") + if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala) + } + + String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" + String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala" + String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" + if((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists()) == false) { + throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava) + } +} + +if(coreModClass) { + String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" + String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala" + String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" + if((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists()) == false) { + throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava) + } +} + +configurations.all { + resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) + + // Make sure GregTech build won't time out + System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String) + System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String) +} + +// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version +'git config core.fileMode false'.execute() +// Pulls version from git tag +try { + version = minecraftVersion + "-" + gitVersion() +} +catch (Exception e) { + throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag!"); +} -//Compile against UTF-8 -compileTestJava.options.encoding = 'UTF-8' -javadoc.options.encoding = 'UTF-8' -compileJava.options.encoding = 'UTF-8' +group = modGroup +if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) { + archivesBaseName = customArchiveBaseName +} +else { + archivesBaseName = modId +} minecraft { - version = "${config.minecraft.version}-${config.forge.version}" - runDir = "eclipse" - srgExtra "PK: org/dom4j gtpp/shaded/org/dom4j" - srgExtra "PK: org/javassist gtpp/shaded/org/javassist" - srgExtra "PK: org/reflections/reflections gtpp/shaded/org/reflections" + version = minecraftVersion + "-" + forgeVersion + "-" + minecraftVersion + runDir = "run" + + if (replaceGradleTokenInFile) { + replaceIn replaceGradleTokenInFile + if(gradleTokenModId) { + replace gradleTokenModId, modId + } + if(gradleTokenModName) { + replace gradleTokenModName, modName + } + if(gradleTokenVersion) { + replace gradleTokenVersion, versionDetails().lastTag + } + if(gradleTokenGroupName) { + replace gradleTokenGroupName, modGroup + } + } } -idea { module { inheritOutputDirs = true } } +if(file("addon.gradle").exists()) { + apply from: "addon.gradle" +} + +apply from: 'repositories.gradle' configurations { - provided - embedded - shade - compile.extendsFrom provided, embedded, shade + implementation.extendsFrom(shadowImplementation) } repositories { - maven { - name = "gt" - url = "http://gregtech.overminddl1.com/" - } - maven { - name = "ic2" - url = "http://maven.ic2.player.to/" - } - ivy { - name = 'gtnh_download_source_stupid_underscore_typo' - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") - } - ivy { - name = 'gtnh_download_source' - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") - } - maven { - url = "https://jitpack.io" - } - maven { - url "https://cursemaven.com" - } -} - -sourceSets { - main { - java { srcDirs = ["$projectDir/src/Java"] } - resources { srcDirs = ["$projectDir/src/resources"] } - } + maven { + name = "Overmind forge repo mirror" + url = "https://gregtech.overminddl1.com/" + } + if(usesMixins.toBoolean()) { + maven { + name = "sponge" + url = "https://repo.spongepowered.org/repository/maven-public" + } + maven { + url = "https://jitpack.io" + } + } +} + +dependencies { + if(usesMixins.toBoolean()) { + annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3") + annotationProcessor("com.google.guava:guava:24.1.1-jre") + annotationProcessor("com.google.code.gson:gson:2.8.6") + annotationProcessor("org.spongepowered:mixin:0.8-SNAPSHOT") + // using 0.8 to workaround a issue in 0.7 which fails mixin application + compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") { + // Mixin includes a lot of dependencies that are too up-to-date + exclude module: "launchwrapper" + exclude module: "guava" + exclude module: "gson" + exclude module: "commons-io" + exclude module: "log4j-core" + } + compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev") + } +} + +apply from: 'dependencies.gradle' + +def mixingConfigRefMap = "mixins." + modId + ".refmap.json" +def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap +def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg" + +task generateAssets { + if(usesMixins.toBoolean()) { + getFile("/src/main/resources/mixins." + modId + ".json").text = """{ + "required": true, + "minVersion": "0.7.11", + "package": "${modGroup}.${mixinsPackage}", + "plugin": "${modGroup}.${mixinPlugin}", + "refmap": "${mixingConfigRefMap}", + "target": "@env(DEFAULT)", + "compatibilityLevel": "JAVA_8" +} + +""" + } +} + +task relocateShadowJar(type: ConfigureShadowRelocation) { + target = tasks.shadowJar + prefix = modGroup + ".shadow" +} + +shadowJar { + manifest { + attributes(getManifestAttributes()) + } + + minimize() // This will only allow shading for actually used classes + configurations = [project.configurations.shadowImplementation] + dependsOn(relocateShadowJar) +} + +jar { + manifest { + attributes(getManifestAttributes()) + } + + if(usesShadowedDependencies.toBoolean()) { + dependsOn(shadowJar) + enabled = false + } +} + +reobf { + if(usesMixins.toBoolean()) { + addExtraSrgFile mixinSrg + } +} + +afterEvaluate { + if(usesMixins.toBoolean()) { + tasks.compileJava { + options.compilerArgs += [ + "-AreobfSrgFile=${tasks.reobf.srg}", + "-AoutSrgFile=${mixinSrg}", + "-AoutRefMapFile=${refMap}", + // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code + "-XDenableSunApiLintControl", + "-XDignore.symbol.file" + ] + } + } +} + +runClient { + def arguments = [] + + if(usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] + } + + if(developmentEnvironmentUserName) { + arguments += [ + "--username", + developmentEnvironmentUserName + ] + } + + args(arguments) +} + +runServer { + def arguments = [] + + if (usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] + } + + args(arguments) +} + +tasks.withType(JavaExec).configureEach { + javaLauncher.set( + javaToolchains.launcherFor { + languageVersion = projectJavaVersion + } + ) } processResources -{ - // this will ensure that this task is redone when the versions change. - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - - // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' - - // replace version and mcversion - expand 'version':project.version, 'mcversion':project.minecraft.version - } - - // copy everything else, thats not the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude 'mcmod.info' - } - exclude '**/Thumbs.db' + { + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand "minecraftVersion": project.minecraft.version, + "modVersion": versionDetails().lastTag, + "modId": modId, + "modName": modName + } + + if(usesMixins.toBoolean()) { + from refMap + } + + // copy everything else, thats not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } + } + +def getManifestAttributes() { + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false && (usesMixins.toBoolean() || coreModClass)) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] + } + + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] + } + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] + } + + if(usesMixins.toBoolean()) { + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : "mixins." + modId + ".json", + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] + } + return manifestAttributes } -dependencies { - compile "com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev" +task sourcesJar(type: Jar) { + from (sourceSets.main.allJava) + from (file("$projectDir/LICENSE")) + getArchiveClassifier().set('sources') +} - // Used for productive reflection without class loading. (0.9.12 has no reliance on Guava either) - //shade group: 'org.reflections', name: 'reflections', version: '0.9.12' - //shade group: 'org.dom4j', name: 'dom4j', version: '2.1.1' - //compile group: 'org.javassist', name: 'javassist', version: '3.26.0-GA' +task shadowDevJar(type: ShadowJar) { + from sourceSets.main.output + getArchiveClassifier().set("dev") - implementation 'com.github.GTNewHorizons:GT5-Unofficial:master-SNAPSHOT:dev' - compile "com.github.GTNewHorizons:StructureLib:master-SNAPSHOT:dev" + manifest { + attributes(getManifestAttributes()) + } - provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev" + minimize() // This will only allow shading for actually used classes + configurations = [project.configurations.shadowImplementation] +} + +task relocateShadowDevJar(type: ConfigureShadowRelocation) { + target = tasks.shadowDevJar + prefix = modGroup + ".shadow" +} - compile "com.github.GTNewHorizons:Waila:master-SNAPSHOT:dev" - compile "com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev" - compile "api.player:PlayerAPI:1.7.10-1.4" - - compile "minetweaker:MineTweaker3:1.7.10-3.0.10:dev-full" +task circularResolverJar(type: Jar) { + dependsOn(relocateShadowDevJar) + dependsOn(shadowDevJar) + enabled = false +} - compile "com.github.GTNewHorizons:EnderIO:master-SNAPSHOT:dev" - - compile "curse.maven:cofh-core-69162:2388750" - compile "curse.maven:cofh-lib-220333:2388748" +task devJar(type: Jar) { + from sourceSets.main.output + getArchiveClassifier().set("dev") - implementation 'com.github.GTNewHorizons:ForestryMC:master-SNAPSHOT:dev' + manifest { + attributes(getManifestAttributes()) + } - compileOnly "com.github.GTNewHorizons:Railcraft:master-SNAPSHOT:dev" - implementation 'com.github.GTNewHorizons:SC2:master-SNAPSHOT' - - compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf" - compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf" - - //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev" - //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev" - //compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev" - - compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev" - compile "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf" + if(usesShadowedDependencies.toBoolean()) { + dependsOn(circularResolverJar) + enabled = false + } } -jar { - archiveName = archivesBaseName + "-" + version + ".jar" - manifest { - attributes 'FMLCorePlugin': 'gtPlusPlus.preloader.asm.Preloader_FMLLoadingPlugin' - attributes 'FMLCorePluginContainsFMLMod': 'true' - } - configurations.shade.each { dep -> - from(project.zipTree(dep)){ - exclude 'META-INF', 'META-INF/**' - } - } -} - -task generateDictionaries(type: JavaExec) { - group = "Execution" - description = "Generates the dictionaries for Proguard" - classpath = sourceSets.main.runtimeClasspath - main = "gtPlusPlus.GenerateDictionaries" +task apiJar(type: Jar) { + from (sourceSets.main.allJava) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' + } + + from (sourceSets.main.output) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' + } + + from (sourceSets.main.resources.srcDirs) { + include("LICENSE") + } + + getArchiveClassifier().set('api') +} + +artifacts { + archives sourcesJar + archives devJar + if(apiPackage) { + archives apiJar + } +} + +// Updating +task updateBuildScript { + doLast { + if (performBuildScriptUpdate(projectDir.toString())) return + + print("Build script already up-to-date!") + } +} + +if (isNewBuildScriptVersionAvailable(projectDir.toString())) { + if (autoUpdateBuildScript.toBoolean()) { + performBuildScriptUpdate(projectDir.toString()) + } else { + println("Build script update available! Run 'gradle updateBuildScript'") + } +} + +static URL availableBuildScriptUrl() { + new URL("https://raw.githubusercontent.com/SinTh0r4s/ExampleMod1.7.10/main/build.gradle") +} + +boolean performBuildScriptUpdate(String projectDir) { + if (isNewBuildScriptVersionAvailable(projectDir)) { + def buildscriptFile = getFile("build.gradle") + availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } } + print("Build script updated. Please REIMPORT the project or RESTART your IDE!") + return true + } + return false +} + +boolean isNewBuildScriptVersionAvailable(String projectDir) { + Map parameters = ["connectTimeout": 2000, "readTimeout": 2000] + + String currentBuildScript = getFile("build.gradle").getText() + String currentBuildScriptHash = getVersionHash(currentBuildScript) + String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() + String availableBuildScriptHash = getVersionHash(availableBuildScript) + + boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash + return !isUpToDate +} + +static String getVersionHash(String buildScriptContent) { + String versionLine = buildScriptContent.find("^//version: [a-z0-9]*") + if(versionLine != null) { + return versionLine.split(": ").last() + } + return "" +} + +configure(updateBuildScript) { + group = 'forgegradle' + description = 'Updates the build script to the latest version' +} + +// Helper methods + +def checkPropertyExists(String propertyName) { + if (project.hasProperty(propertyName) == false) { + throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/gradle.properties") + } +} + +def getFile(String relativePath) { + return new File(projectDir, relativePath) } diff --git a/build.properties b/build.properties deleted file mode 100644 index d8a31be99b..0000000000 --- a/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -minecraft.version=1.7.10 -forge.version=10.13.4.1614-1.7.10 -ic2.version=2.2.828-experimental -gt.version=5.09.37 -ae2.version=rv3-beta-22 -gtpp.version=1.7.18 -commit.hash=aa9f04218e5298414f900b9fe61131f7ed26b8f1 -structurelib.version=1.0.6 diff --git a/changelog.mustache b/changelog.mustache deleted file mode 100644 index 8094f6ac9c..0000000000 --- a/changelog.mustache +++ /dev/null @@ -1,29 +0,0 @@ -# Generated via Git Changelog Gradle plugin - -{{#tags}} -## {{name}} - {{#issues}} - {{#hasIssue}} - {{#hasLink}} -### {{name}} [{{issue}}]({{link}}) {{title}} - {{/hasLink}} - {{^hasLink}} -### {{name}} {{issue}} {{title}} - {{/hasLink}} - {{/hasIssue}} - {{^hasIssue}} -### {{name}} - {{/hasIssue}} - - {{#commits}} -[{{hash}}] | {{authorName}} | {{commitTime}} -``` -{{{messageTitle}}} -{{#messageBodyItems}} -{{.}} -{{/messageBodyItems}} -``` - {{/commits}} - - {{/issues}} -{{/tags}} \ No newline at end of file diff --git a/changelogcurse.mustache b/changelogcurse.mustache deleted file mode 100644 index 9d6ebd8572..0000000000 --- a/changelogcurse.mustache +++ /dev/null @@ -1,20 +0,0 @@ -# Generated via Git Changelog Gradle plugin for Curse/CurseForge -
-
-{{#tags}} -
-{{#commits}} -
-

-[{{hash}}] | {{authorName}} | {{commitTime}} -
-{{{messageTitle}}} -
-{{#messageBodyItems}} -{{.}} -
-{{/messageBodyItems}} -

- {{/commits}} -
-{{/tags}} \ No newline at end of file diff --git a/changeloggeneral.mustache b/changeloggeneral.mustache deleted file mode 100644 index c014e557de..0000000000 --- a/changeloggeneral.mustache +++ /dev/null @@ -1,17 +0,0 @@ -# Generated via Git Changelog Gradle plugin - -# Legend -# (+) - Addition -# (-) - Removal -# (%) - Change -# ($) - Fix -# (^) - Update - -{{#commits}} - -[{{hash}}] | {{authorName}} | {{commitTime}} -{{{messageTitle}}} -{{#messageBodyItems}} -{{.}} -{{/messageBodyItems}} -{{/commits}} \ No newline at end of file diff --git a/dependencies.gradle b/dependencies.gradle new file mode 100644 index 0000000000..4bb879b076 --- /dev/null +++ b/dependencies.gradle @@ -0,0 +1,51 @@ +// Add your dependencies here + +dependencies { + compile("com.github.GTNewHorizons:GT5-Unofficial:master-SNAPSHOT:dev") + /*compileOnly("com.github.GTNewHorizons:StructureLib:master-SNAPSHOT:dev") { // Transitive from GT5-Unofficial + transitive = false + } + compileOnly("com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev") { // Transitive from GT5-Unofficial + transitive = false + } + compileOnly("com.github.GTNewHorizons:CodeChickenLib:master-SNAPSHOT:dev") { // Transitive from GT5-Unofficial + transitive = false + } + compileOnly("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") { // Transitive from GT5-Unofficial + transitive = false + }*/ + + compile("curse.maven:cofh-core-69162:2388751") + + compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:Baubles:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:ForestryMC:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:Railcraft:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:EnderIO:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:EnderCore:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:SC2:master-SNAPSHOT:dev") { + transitive = false + } + + compileOnly("player-api:PlayerAPI:1.7.10:1.4") { + transitive = false + } + compileOnly("com.mod-buildcraft:buildcraft:7.1.23:dev") { + transitive = false + } + compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { + transitive = false + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..b59d9e5e45 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,64 @@ +modName = GT++ + +# This is a case-sensitive string to identify your mod. Convention is to use lower case. +modId = miscutils + +modGroup = gtPlusPlus + +# WHY is there no version field? +# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the +# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ + +# Will update your build.gradle automatically whenever an update is available +autoUpdateBuildScript = false + +minecraftVersion = 1.7.10 +forgeVersion = 10.13.4.1614 + +# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you +# restart Minecraft in development. Choose this dependent on your mod: +# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name +# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty +developmentEnvironmentUserName = "Developer" + +# Define a source file of your project with: +# public static final String VERSION = "GRADLETOKEN_VERSION"; +# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's +# version in @Mod([...], version = VERSION, [...]) +# Leave these properties empty to skip individual token replacements +replaceGradleTokenInFile = CORE.java +gradleTokenModId = +gradleTokenModName = +gradleTokenVersion = GRADLETOKEN_VERSION +gradleTokenGroupName = + +# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can +# leave this property empty. +# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api +apiPackage = + +# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/ +# Example value: mymodid_at.cfg +accessTransformersFile = + +# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! +usesMixins = false +# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. +mixinPlugin = +# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +mixinsPackage = +# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! +# This parameter is for legacy compatability only +# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin +coreModClass = preloader.asm.Preloader_FMLLoadingPlugin +# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class +# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! +containsMixinsAndOrCoreModOnly = false + +# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your +# responsibility check the licence and request permission for distribution, if required. +usesShadowedDependencies = false + +# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older +# projects. New projects should not use this parameter. +customArchiveBaseName = GT-PlusPlus diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3baa851b28..5c2d1cf016 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 82b0d2f5d7..3ab0b725ef 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sat Jan 04 01:52:14 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip diff --git a/gradlew b/gradlew index 91a7e269e1..83f2acfdc3 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## ## @@ -6,20 +22,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +64,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +75,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +105,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -110,10 +125,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +170,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 8a0b282aa6..9618d8d960 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,14 +24,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +62,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +75,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000000..09bbb514fc --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +before_install: + - ./gradlew setupCIWorkspace \ No newline at end of file diff --git a/repositories.gradle b/repositories.gradle new file mode 100644 index 0000000000..d88a8fcc74 --- /dev/null +++ b/repositories.gradle @@ -0,0 +1,26 @@ +// Add any additional repositories for your dependencies here + +repositories { + maven { + name = "ic2" + url = "http://maven.ic2.player.to/" + metadataSources { + mavenPom() + artifact() + } + } + maven { + name "CurseForge Maven" + url "https://minecraft.curseforge.com/api/maven/" + metadataSources { + mavenPom() + artifact() + } + } + maven { + url "https://cursemaven.com" + } + maven { + url = "https://jitpack.io" + } +} diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java index dfd536d21c..1ef04aa154 100644 --- a/src/main/java/gtPlusPlus/core/lib/CORE.java +++ b/src/main/java/gtPlusPlus/core/lib/CORE.java @@ -51,7 +51,7 @@ public class CORE { public static final String name = "GT++"; public static final String MODID = "miscutils"; - public static final String VERSION = "1.7.15-GTNH"; + public static final String VERSION = "GRADLETOKEN_VERSION"; //Tweakables public static int EVERGLADES_ID = 227; diff --git a/version.properties b/version.properties deleted file mode 100644 index f4fd30f46b..0000000000 --- a/version.properties +++ /dev/null @@ -1 +0,0 @@ -mod.version=GTNH \ No newline at end of file -- cgit From 3bc44bf69d4991288e4b9c22e4c997239109ee9d Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Wed, 15 Dec 2021 15:59:41 +0100 Subject: Removed build craft dependency --- dependencies.gradle | 3 - .../bees/tileentities/TileDenseBeeHouse.java | 92 ---------------------- 2 files changed, 95 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java (limited to 'src') diff --git a/dependencies.gradle b/dependencies.gradle index 4bb879b076..c78b27bc1e 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -42,9 +42,6 @@ dependencies { compileOnly("player-api:PlayerAPI:1.7.10:1.4") { transitive = false } - compileOnly("com.mod-buildcraft:buildcraft:7.1.23:dev") { - transitive = false - } compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java deleted file mode 100644 index 9b3424ef08..0000000000 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java +++ /dev/null @@ -1,92 +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 gtPlusPlus.xmod.forestry.bees.tileentities; - -import java.util.*; - -import cpw.mods.fml.common.Optional; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; - -import buildcraft.api.statements.ITriggerExternal; -import forestry.api.apiculture.*; -import forestry.apiculture.ApiaryBeeListener; -import forestry.apiculture.ApiaryBeeModifier; -import forestry.apiculture.IApiary; -import forestry.apiculture.inventory.IApiaryInventory; -import forestry.apiculture.inventory.InventoryApiary; -import forestry.apiculture.tiles.TileBeeHousingBase; -import forestry.apiculture.trigger.ApicultureTriggers; -import gtPlusPlus.xmod.forestry.bees.gui.ContainerBeeHouse; -import gtPlusPlus.xmod.forestry.bees.gui.GuiBeeHouse; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileDenseBeeHouse extends TileBeeHousingBase implements IApiary { - private final IBeeModifier beeModifier = new ApiaryBeeModifier(); - private final IBeeListener beeListener = new ApiaryBeeListener(this); - private final InventoryApiary inventory = new InventoryApiary(getAccessHandler()); - - public TileDenseBeeHouse() { - super("apiary2"); - setInternalInventory(inventory); - } - - @Override - public IBeeHousingInventory getBeeInventory() { - return inventory; - } - - @Override - public IApiaryInventory getApiaryInventory() { - return inventory; - } - - @Override - public Collection getBeeModifiers() { - List beeModifiers = new ArrayList<>(); - - beeModifiers.add(beeModifier); - - for (IHiveFrame frame : inventory.getFrames()) { - beeModifiers.add(frame.getBeeModifier()); - } - - return beeModifiers; - } - - @Override - public Iterable getBeeListeners() { - return Collections.singleton(beeListener); - } - - /* ITRIGGERPROVIDER */ - @Optional.Method(modid = "BuildCraftAPI|statements") - @Override - public Collection getExternalTriggers(ForgeDirection side, TileEntity tile) { - LinkedList res = new LinkedList<>(); - res.add(ApicultureTriggers.missingQueen); - res.add(ApicultureTriggers.missingDrone); - res.add(ApicultureTriggers.noFrames); - return res; - } - - @Override - public Object getGui(EntityPlayer player, int data) { - ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true); - return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY); - } - - @Override - public Object getContainer(EntityPlayer player, int data) { - return new ContainerBeeHouse(player.inventory, this, true); - } -} -- cgit From 10182ddb54b6df57118cfe0715a037edf0fee14b Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Wed, 15 Dec 2021 16:02:51 +0100 Subject: Revert "Removed build craft dependency" This reverts commit 3bc44bf69d4991288e4b9c22e4c997239109ee9d. --- dependencies.gradle | 3 + .../bees/tileentities/TileDenseBeeHouse.java | 92 ++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java (limited to 'src') diff --git a/dependencies.gradle b/dependencies.gradle index c78b27bc1e..4bb879b076 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -42,6 +42,9 @@ dependencies { compileOnly("player-api:PlayerAPI:1.7.10:1.4") { transitive = false } + compileOnly("com.mod-buildcraft:buildcraft:7.1.23:dev") { + transitive = false + } compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java new file mode 100644 index 0000000000..9b3424ef08 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * 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 gtPlusPlus.xmod.forestry.bees.tileentities; + +import java.util.*; + +import cpw.mods.fml.common.Optional; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; + +import buildcraft.api.statements.ITriggerExternal; +import forestry.api.apiculture.*; +import forestry.apiculture.ApiaryBeeListener; +import forestry.apiculture.ApiaryBeeModifier; +import forestry.apiculture.IApiary; +import forestry.apiculture.inventory.IApiaryInventory; +import forestry.apiculture.inventory.InventoryApiary; +import forestry.apiculture.tiles.TileBeeHousingBase; +import forestry.apiculture.trigger.ApicultureTriggers; +import gtPlusPlus.xmod.forestry.bees.gui.ContainerBeeHouse; +import gtPlusPlus.xmod.forestry.bees.gui.GuiBeeHouse; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileDenseBeeHouse extends TileBeeHousingBase implements IApiary { + private final IBeeModifier beeModifier = new ApiaryBeeModifier(); + private final IBeeListener beeListener = new ApiaryBeeListener(this); + private final InventoryApiary inventory = new InventoryApiary(getAccessHandler()); + + public TileDenseBeeHouse() { + super("apiary2"); + setInternalInventory(inventory); + } + + @Override + public IBeeHousingInventory getBeeInventory() { + return inventory; + } + + @Override + public IApiaryInventory getApiaryInventory() { + return inventory; + } + + @Override + public Collection getBeeModifiers() { + List beeModifiers = new ArrayList<>(); + + beeModifiers.add(beeModifier); + + for (IHiveFrame frame : inventory.getFrames()) { + beeModifiers.add(frame.getBeeModifier()); + } + + return beeModifiers; + } + + @Override + public Iterable getBeeListeners() { + return Collections.singleton(beeListener); + } + + /* ITRIGGERPROVIDER */ + @Optional.Method(modid = "BuildCraftAPI|statements") + @Override + public Collection getExternalTriggers(ForgeDirection side, TileEntity tile) { + LinkedList res = new LinkedList<>(); + res.add(ApicultureTriggers.missingQueen); + res.add(ApicultureTriggers.missingDrone); + res.add(ApicultureTriggers.noFrames); + return res; + } + + @Override + public Object getGui(EntityPlayer player, int data) { + ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true); + return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY); + } + + @Override + public Object getContainer(EntityPlayer player, int data) { + return new ContainerBeeHouse(player.inventory, this, true); + } +} -- cgit